// Code generated by 'ccgo -D__printf__=printf -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -hide TclWinCPUID -lmodernc.org/z/lib -o lib/tcl_windows_amd64.go -pkgname tcl -replace-fd-zero __ccgo_fd_zero -replace-tcl-default-double-rounding __ccgo_tcl_default_double_rounding -replace-tcl-ieee-double-rounding __ccgo_tcl_ieee_double_rounding -trace-translation-units --load-config "" -save-config "" /tmp/go-generate-271272855/cdb.json libtcl86.a libtclstub86.a', DO NOT EDIT.

package tcl

import (
	"math"
	"reflect"
	"sync/atomic"
	"unsafe"

	"modernc.org/libc"
	"modernc.org/libc/sys/types"
	"modernc.org/z/lib"
)

var _ = math.Pi
var _ reflect.Kind
var _ atomic.Value
var _ unsafe.Pointer
var _ *libc.TLS
var _ types.Size_t

const (
	BASE                                                                           = 65521
	BUILD_tcl                                                                      = 1
	CHAR_BIT                                                                       = 8
	CHAR_MAX                                                                       = 127
	CHAR_MIN                                                                       = -128
	DEF_MEM_LEVEL                                                                  = 8
	DEF_WBITS                                                                      = 15
	DUMMYSTRUCTNAME                                                                = 0
	DUMMYSTRUCTNAME1                                                               = 0
	DUMMYSTRUCTNAME2                                                               = 0
	DUMMYSTRUCTNAME3                                                               = 0
	DUMMYSTRUCTNAME4                                                               = 0
	DUMMYSTRUCTNAME5                                                               = 0
	DUMMYUNIONNAME                                                                 = 0
	DUMMYUNIONNAME1                                                                = 0
	DUMMYUNIONNAME2                                                                = 0
	DUMMYUNIONNAME3                                                                = 0
	DUMMYUNIONNAME4                                                                = 0
	DUMMYUNIONNAME5                                                                = 0
	DUMMYUNIONNAME6                                                                = 0
	DUMMYUNIONNAME7                                                                = 0
	DUMMYUNIONNAME8                                                                = 0
	DUMMYUNIONNAME9                                                                = 0
	DYN_TREES                                                                      = 2
	EXIT_FAILURE                                                                   = 1
	EXIT_SUCCESS                                                                   = 0
	FAR                                                                            = 0
	FTRUNCATE_DEFINED                                                              = 0
	F_OK                                                                           = 0
	HAVE_INTPTR_T                                                                  = 1
	HAVE_INTRIN_H                                                                  = 1
	HAVE_INTTYPES_H                                                                = 1
	HAVE_MEMCPY                                                                    = 0
	HAVE_MEMORY_H                                                                  = 1
	HAVE_NO_SEH                                                                    = 1
	HAVE_STDINT_H                                                                  = 1
	HAVE_STDLIB_H                                                                  = 1
	HAVE_STRINGS_H                                                                 = 1
	HAVE_STRING_H                                                                  = 1
	HAVE_SYS_STAT_H                                                                = 1
	HAVE_SYS_TYPES_H                                                               = 1
	HAVE_UINTPTR_T                                                                 = 1
	HAVE_UNISTD_H                                                                  = 1
	HAVE_WSPIAPI_H                                                                 = 1
	HAVE_ZLIB                                                                      = 1
	INT_MAX                                                                        = 2147483647
	INT_MIN                                                                        = -2147483648
	LLONG_MAX                                                                      = 9223372036854775807
	LLONG_MIN                                                                      = -9223372036854775808
	LONG_LONG_MAX                                                                  = 9223372036854775807
	LONG_LONG_MIN                                                                  = -9223372036854775808
	LONG_MAX                                                                       = 2147483647
	LONG_MIN                                                                       = -2147483648
	MAX_MATCH                                                                      = 258
	MAX_MEM_LEVEL                                                                  = 9
	MAX_WBITS                                                                      = 15
	MB_LEN_MAX                                                                     = 5
	MINGW_DDK_H                                                                    = 0
	MINGW_HAS_DDK_H                                                                = 1
	MINGW_HAS_SECURE_API                                                           = 1
	MINGW_SDK_INIT                                                                 = 0
	MIN_MATCH                                                                      = 3
	MP_FIXED_CUTOFFS                                                               = 1
	MP_NO_STDINT                                                                   = 1
	MP_PREC                                                                        = 4
	NDEBUG                                                                         = 1
	NMAX                                                                           = 5552
	OLD_P_OVERLAY                                                                  = 2
	OS_CODE                                                                        = 10
	PACKAGE_BUGREPORT                                                              = ""
	PACKAGE_NAME                                                                   = "tcl"
	PACKAGE_STRING                                                                 = "tcl 8.6"
	PACKAGE_TARNAME                                                                = "tcl"
	PACKAGE_VERSION                                                                = "8.6"
	PATH_MAX                                                                       = 260
	PRESET_DICT                                                                    = 0x20
	P_DETACH                                                                       = 4
	P_NOWAIT                                                                       = 1
	P_NOWAITO                                                                      = 3
	P_OVERLAY                                                                      = 2
	P_WAIT                                                                         = 0
	RAND_MAX                                                                       = 0x7fff
	R_OK                                                                           = 4
	SCHAR_MAX                                                                      = 127
	SCHAR_MIN                                                                      = -128
	SEEK_CUR                                                                       = 1
	SEEK_END                                                                       = 2
	SEEK_SET                                                                       = 0
	SHRT_MAX                                                                       = 32767
	SHRT_MIN                                                                       = -32768
	SIZE_MAX                                                                       = 18446744073709551615
	SSIZE_MAX                                                                      = 9223372036854775807
	STATIC_BUILD                                                                   = 1
	STATIC_TREES                                                                   = 1
	STDC                                                                           = 0
	STDC99                                                                         = 0
	STDC_HEADERS                                                                   = 1
	STDERR_FILENO                                                                  = 2
	STDIN_FILENO                                                                   = 0
	STDOUT_FILENO                                                                  = 1
	STORED_BLOCK                                                                   = 0
	TCL_CFGVAL_ENCODING                                                            = "cp1252"
	TCL_CFG_DO64BIT                                                                = 1
	TCL_CFG_OPTIMIZED                                                              = 1
	TCL_TOMMATH                                                                    = 1
	UCHAR_MAX                                                                      = 255
	UINT_MAX                                                                       = 4294967295
	ULLONG_MAX                                                                     = 18446744073709551615
	ULONG_LONG_MAX                                                                 = 18446744073709551615
	ULONG_MAX                                                                      = 4294967295
	UNALIGNED                                                                      = 0
	USE___UUIDOF                                                                   = 0
	USHRT_MAX                                                                      = 65535
	WAIT_CHILD                                                                     = 0
	WAIT_GRANDCHILD                                                                = 1
	WIN32                                                                          = 1
	WIN64                                                                          = 1
	WINNT                                                                          = 1
	WIN_PTHREADS_UNISTD_H                                                          = 0
	W_OK                                                                           = 2
	X_OK                                                                           = 1
	ZCONF_H                                                                        = 0
	ZEXPORT                                                                        = 0
	ZEXPORTVA                                                                      = 0
	ZLIB_H                                                                         = 0
	ZLIB_INTERNAL                                                                  = 0
	ZLIB_VERNUM                                                                    = 0x12b0
	ZLIB_VERSION                                                                   = "1.2.11"
	ZLIB_VER_MAJOR                                                                 = 1
	ZLIB_VER_MINOR                                                                 = 2
	ZLIB_VER_REVISION                                                              = 11
	ZLIB_VER_SUBREVISION                                                           = 0
	ZUTIL_H                                                                        = 0
	Z_ASCII                                                                        = 1
	Z_BEST_COMPRESSION                                                             = 9
	Z_BEST_SPEED                                                                   = 1
	Z_BINARY                                                                       = 0
	Z_BLOCK                                                                        = 5
	Z_BUF_ERROR                                                                    = -5
	Z_DATA_ERROR                                                                   = -3
	Z_DEFAULT_COMPRESSION                                                          = -1
	Z_DEFAULT_STRATEGY                                                             = 0
	Z_DEFLATED                                                                     = 8
	Z_ERRNO                                                                        = -1
	Z_FILTERED                                                                     = 1
	Z_FINISH                                                                       = 4
	Z_FIXED                                                                        = 4
	Z_FULL_FLUSH                                                                   = 3
	Z_HAVE_UNISTD_H                                                                = 0
	Z_HUFFMAN_ONLY                                                                 = 2
	Z_MEM_ERROR                                                                    = -4
	Z_NEED_DICT                                                                    = 2
	Z_NO_COMPRESSION                                                               = 0
	Z_NO_FLUSH                                                                     = 0
	Z_NULL                                                                         = 0
	Z_OK                                                                           = 0
	Z_PARTIAL_FLUSH                                                                = 1
	Z_RLE                                                                          = 3
	Z_STREAM_END                                                                   = 1
	Z_STREAM_ERROR                                                                 = -2
	Z_SYNC_FLUSH                                                                   = 2
	Z_TEXT                                                                         = 1
	Z_TREES                                                                        = 6
	Z_UNKNOWN                                                                      = 2
	Z_VERSION_ERROR                                                                = -6
	X_AGLOBAL                                                                      = 0
	X_ALLOCA_S_HEAP_MARKER                                                         = 0xDDDD
	X_ALLOCA_S_MARKER_SIZE                                                         = 16
	X_ALLOCA_S_STACK_MARKER                                                        = 0xCCCC
	X_ALLOCA_S_THRESHOLD                                                           = 1024
	X_ANONYMOUS_STRUCT                                                             = 0
	X_ANONYMOUS_UNION                                                              = 0
	X_ANSI_STDARG_H_                                                               = 0
	X_ANSI_STDDEF_H                                                                = 0
	X_ARGMAX                                                                       = 100
	X_ATL_XP_TARGETING                                                             = 1
	X_A_ARCH                                                                       = 0x20
	X_A_HIDDEN                                                                     = 0x02
	X_A_NORMAL                                                                     = 0x00
	X_A_RDONLY                                                                     = 0x01
	X_A_SUBDIR                                                                     = 0x10
	X_A_SYSTEM                                                                     = 0x04
	X_CALL_REPORTFAULT                                                             = 0x2
	X_CONST_RETURN                                                                 = 0
	X_CRTNOALIAS                                                                   = 0
	X_CRTRESTRICT                                                                  = 0
	X_CRT_ABS_DEFINED                                                              = 0
	X_CRT_ALGO_DEFINED                                                             = 0
	X_CRT_ALLOCATION_DEFINED                                                       = 0
	X_CRT_ALTERNATIVE_IMPORTED                                                     = 0
	X_CRT_ATOF_DEFINED                                                             = 0
	X_CRT_DIRECTORY_DEFINED                                                        = 0
	X_CRT_DOUBLE_DEC                                                               = 0
	X_CRT_ERRNO_DEFINED                                                            = 0
	X_CRT_GETPID_DEFINED                                                           = 0
	X_CRT_MANAGED_HEAP_DEPRECATE                                                   = 0
	X_CRT_MEMORY_DEFINED                                                           = 0
	X_CRT_PACKING                                                                  = 8
	X_CRT_PERROR_DEFINED                                                           = 0
	X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES                                         = 0
	X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY                                  = 0
	X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES                                       = 0
	X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT                                 = 0
	X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY                                = 0
	X_CRT_SWAB_DEFINED                                                             = 0
	X_CRT_SYSTEM_DEFINED                                                           = 0
	X_CRT_TERMINATE_DEFINED                                                        = 0
	X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP                                            = 0
	X_CRT_WPERROR_DEFINED                                                          = 0
	X_CRT_WSYSTEM_DEFINED                                                          = 0
	X_CVTBUFSIZE                                                                   = 349
	X_DEV_T_DEFINED                                                                = 0
	X_DIV_T_DEFINED                                                                = 0
	X_DLL                                                                          = 0
	X_ERRCODE_DEFINED                                                              = 0
	X_FILE_OFFSET_BITS                                                             = 64
	X_FILE_OFFSET_BITS_SET_FTRUNCATE                                               = 0
	X_FILE_OFFSET_BITS_SET_LSEEK                                                   = 0
	X_FILE_OFFSET_BITS_SET_OFFT                                                    = 0
	X_FINDDATA_T_DEFINED                                                           = 0
	X_FREEA_INLINE                                                                 = 0
	X_FREEENTRY                                                                    = 0
	X_FSIZE_T_DEFINED                                                              = 0
	X_GCC_LIMITS_H_                                                                = 0
	X_GCC_MAX_ALIGN_T                                                              = 0
	X_HEAPBADBEGIN                                                                 = -3
	X_HEAPBADNODE                                                                  = -4
	X_HEAPBADPTR                                                                   = -6
	X_HEAPEMPTY                                                                    = -1
	X_HEAPEND                                                                      = -5
	X_HEAPINFO_DEFINED                                                             = 0
	X_HEAPOK                                                                       = -2
	X_HEAP_MAXREQ                                                                  = 0xFFFFFFFFFFFFFFE0
	X_I16_MAX                                                                      = 32767
	X_I16_MIN                                                                      = -32768
	X_I32_MAX                                                                      = 2147483647
	X_I32_MIN                                                                      = -2147483648
	X_I64_MAX                                                                      = 9223372036854775807
	X_I64_MIN                                                                      = -9223372036854775808
	X_I8_MAX                                                                       = 127
	X_I8_MIN                                                                       = -128
	X_INC_CORECRT                                                                  = 0
	X_INC_CORECRT_STARTUP                                                          = 0
	X_INC_CORECRT_WSTDLIB                                                          = 0
	X_INC_CRTDEFS                                                                  = 0
	X_INC_CRTDEFS_MACRO                                                            = 0
	X_INC_LIMITS                                                                   = 0
	X_INC_MINGW_SECAPI                                                             = 0
	X_INC_PROCESS                                                                  = 0
	X_INC_STDARG                                                                   = 0
	X_INC_STDDEF                                                                   = 0
	X_INC_STDLIB                                                                   = 0
	X_INC_STDLIB_S                                                                 = 0
	X_INC_STRING                                                                   = 0
	X_INC_STRING_S                                                                 = 0
	X_INC_TYPES                                                                    = 0
	X_INC_VADEFS                                                                   = 0
	X_INC__MINGW_H                                                                 = 0
	X_INO_T_DEFINED                                                                = 0
	X_INT128_DEFINED                                                               = 0
	X_INTEGRAL_MAX_BITS                                                            = 64
	X_INTPTR_T_DEFINED                                                             = 0
	X_IO_H_                                                                        = 0
	X_LIMITS_H___                                                                  = 0
	X_MALLOC_H_                                                                    = 0
	X_MAX_DIR                                                                      = 256
	X_MAX_DRIVE                                                                    = 3
	X_MAX_ENV                                                                      = 32767
	X_MAX_EXT                                                                      = 256
	X_MAX_FNAME                                                                    = 256
	X_MAX_PATH                                                                     = 260
	X_MAX_WAIT_MALLOC_CRT                                                          = 60000
	X_MM_MALLOC_H_INCLUDED                                                         = 0
	X_MODE_T_                                                                      = 0
	X_MT                                                                           = 0
	X_M_AMD64                                                                      = 100
	X_M_X64                                                                        = 100
	X_NLSCMPERROR                                                                  = 2147483647
	X_NLSCMP_DEFINED                                                               = 0
	X_OFF64_T_DEFINED                                                              = 0
	X_OFF_T_                                                                       = 0
	X_OFF_T_DEFINED                                                                = 0
	X_OLD_P_OVERLAY                                                                = 2
	X_ONEXIT_T_DEFINED                                                             = 0
	X_OUT_TO_DEFAULT                                                               = 0
	X_OUT_TO_MSGBOX                                                                = 2
	X_OUT_TO_STDERR                                                                = 1
	X_PGLOBAL                                                                      = 0
	X_PID_T_                                                                       = 0
	X_POSIX_BARRIERS                                                               = 200112
	X_POSIX_CLOCK_SELECTION                                                        = 200112
	X_POSIX_READER_WRITER_LOCKS                                                    = 200112
	X_POSIX_SEMAPHORES                                                             = 200112
	X_POSIX_SPIN_LOCKS                                                             = 200112
	X_POSIX_THREADS                                                                = 200112
	X_POSIX_TIMEOUTS                                                               = 200112
	X_PTRDIFF_T_                                                                   = 0
	X_PTRDIFF_T_DEFINED                                                            = 0
	X_P_DETACH                                                                     = 4
	X_P_NOWAIT                                                                     = 1
	X_P_NOWAITO                                                                    = 3
	X_P_OVERLAY                                                                    = 2
	X_P_WAIT                                                                       = 0
	X_QSORT_S_DEFINED                                                              = 0
	X_REPORT_ERRMODE                                                               = 3
	X_RSIZE_T_DEFINED                                                              = 0
	X_SECURECRT_FILL_BUFFER_PATTERN                                                = 0xFD
	X_SIGSET_T_                                                                    = 0
	X_SIZE_T_DEFINED                                                               = 0
	X_SPAWNV_DEFINED                                                               = 0
	X_SSIZE_T_DEFINED                                                              = 0
	X_STDARG_H                                                                     = 0
	X_STDDEF_H                                                                     = 0
	X_STDDEF_H_                                                                    = 0
	X_TAGLC_ID_DEFINED                                                             = 0
	X_THREADLOCALEINFO                                                             = 0
	X_TIME32_T_DEFINED                                                             = 0
	X_TIME64_T_DEFINED                                                             = 0
	X_TIMESPEC_DEFINED                                                             = 0
	X_TIME_T_DEFINED                                                               = 0
	X_UI16_MAX                                                                     = 0xffff
	X_UI32_MAX                                                                     = 0xffffffff
	X_UI64_MAX                                                                     = 0xffffffffffffffff
	X_UI8_MAX                                                                      = 0xff
	X_UINTPTR_T_DEFINED                                                            = 0
	X_UNISTD_H                                                                     = 0
	X_USEDENTRY                                                                    = 1
	X_VA_LIST                                                                      = 0
	X_VA_LIST_                                                                     = 0
	X_VA_LIST_DEFINED                                                              = 0
	X_VA_LIST_T_H                                                                  = 0
	X_W64                                                                          = 0
	X_WAIT_CHILD                                                                   = 0
	X_WAIT_GRANDCHILD                                                              = 1
	X_WCHAR_T_DEFINED                                                              = 0
	X_WCTYPE_T_DEFINED                                                             = 0
	X_WConst_return                                                                = 0
	X_WEXEC_DEFINED                                                                = 0
	X_WFINDDATA_T_DEFINED                                                          = 0
	X_WIN32                                                                        = 1
	X_WIN32_WINNT                                                                  = 0x502
	X_WIN64                                                                        = 1
	X_WINT_T                                                                       = 0
	X_WIO_DEFINED                                                                  = 0
	X_WRITE_ABORT_MSG                                                              = 0x1
	X_WSPAWN_DEFINED                                                               = 0
	X_WSTDLIBP_DEFINED                                                             = 0
	X_WSTDLIB_DEFINED                                                              = 0
	X_WSTRING_DEFINED                                                              = 0
	X_WSTRING_S_DEFINED                                                            = 0
	Z_const                                                                        = 0
	ABORTDOC                                                                       = 2
	ABOVE_NORMAL_PRIORITY_CLASS                                                    = 0x8000
	ABSOLUTE                                                                       = 1
	ACCESS_ALLOWED_ACE_TYPE                                                        = 0
	ACCESS_ALLOWED_CALLBACK_ACE_TYPE                                               = 9
	ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE                                        = 11
	ACCESS_ALLOWED_COMPOUND_ACE_TYPE                                               = 4
	ACCESS_ALLOWED_OBJECT_ACE_TYPE                                                 = 5
	ACCESS_DENIED_ACE_TYPE                                                         = 1
	ACCESS_DENIED_CALLBACK_ACE_TYPE                                                = 10
	ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE                                         = 12
	ACCESS_DENIED_OBJECT_ACE_TYPE                                                  = 6
	ACCESS_DS_OBJECT_TYPE_NAME_A                                                   = "Directory Service Object"
	ACCESS_DS_SOURCE_A                                                             = "DS"
	ACCESS_FILTERKEYS                                                              = 0x0002
	ACCESS_MAX_LEVEL                                                               = 4
	ACCESS_MAX_MS_ACE_TYPE                                                         = 8
	ACCESS_MAX_MS_OBJECT_ACE_TYPE                                                  = 8
	ACCESS_MAX_MS_V2_ACE_TYPE                                                      = 3
	ACCESS_MAX_MS_V3_ACE_TYPE                                                      = 4
	ACCESS_MAX_MS_V4_ACE_TYPE                                                      = 8
	ACCESS_MAX_MS_V5_ACE_TYPE                                                      = 19
	ACCESS_MIN_MS_ACE_TYPE                                                         = 0
	ACCESS_MIN_MS_OBJECT_ACE_TYPE                                                  = 5
	ACCESS_MOUSEKEYS                                                               = 0x0003
	ACCESS_OBJECT_GUID                                                             = 0
	ACCESS_PROPERTY_GUID                                                           = 2
	ACCESS_PROPERTY_SET_GUID                                                       = 1
	ACCESS_REASON_DATA_MASK                                                        = 0x0000ffff
	ACCESS_REASON_EXDATA_MASK                                                      = 0x7f000000
	ACCESS_REASON_STAGING_MASK                                                     = 0x80000000
	ACCESS_REASON_TYPE_MASK                                                        = 0x00ff0000
	ACCESS_STICKYKEYS                                                              = 0x0001
	ACCESS_SYSTEM_SECURITY                                                         = 16777216
	ACE_INHERITED_OBJECT_TYPE_PRESENT                                              = 0x2
	ACE_OBJECT_TYPE_PRESENT                                                        = 0x1
	ACL_REVISION                                                                   = 2
	ACL_REVISION1                                                                  = 1
	ACL_REVISION2                                                                  = 2
	ACL_REVISION3                                                                  = 3
	ACL_REVISION4                                                                  = 4
	ACL_REVISION_DS                                                                = 4
	ACPI_PPM_HARDWARE_ALL                                                          = 0xfe
	ACPI_PPM_SOFTWARE_ALL                                                          = 0xfc
	ACPI_PPM_SOFTWARE_ANY                                                          = 0xfd
	ACTCTX_FLAG_APPLICATION_NAME_VALID                                             = 32
	ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID                                           = 4
	ACTCTX_FLAG_HMODULE_VALID                                                      = 128
	ACTCTX_FLAG_LANGID_VALID                                                       = 2
	ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID                                       = 1
	ACTCTX_FLAG_RESOURCE_NAME_VALID                                                = 8
	ACTCTX_FLAG_SET_PROCESS_DEFAULT                                                = 16
	ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF                                              = 64
	ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED                                   = 1
	ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF                                       = 4
	ACTIVATION_CONTEXT_PATH_TYPE_NONE                                              = 1
	ACTIVATION_CONTEXT_PATH_TYPE_URL                                               = 3
	ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE                                        = 2
	ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS                                = 10
	ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION                                = 1
	ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES                                      = 9
	ACTIVATION_CONTEXT_SECTION_COMPATIBILITY_INFO                                  = 11
	ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION                           = 5
	ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION                              = 7
	ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION                              = 4
	ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION                        = 6
	ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION                                     = 2
	ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE                          = 8
	ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION                            = 3
	AC_LINE_BACKUP_POWER                                                           = 0x02
	AC_LINE_OFFLINE                                                                = 0x00
	AC_LINE_ONLINE                                                                 = 0x01
	AC_LINE_UNKNOWN                                                                = 0xff
	AC_SRC_ALPHA                                                                   = 0x01
	AC_SRC_OVER                                                                    = 0x00
	ADDRESS_TAG_BIT                                                                = 0x40000000000
	AD_CLOCKWISE                                                                   = 2
	AD_COUNTERCLOCKWISE                                                            = 1
	AF_12844                                                                       = 25
	AF_APPLETALK                                                                   = 16
	AF_ATM                                                                         = 22
	AF_BAN                                                                         = 21
	AF_BTH                                                                         = 32
	AF_CCITT                                                                       = 10
	AF_CHAOS                                                                       = 5
	AF_CLUSTER                                                                     = 24
	AF_DATAKIT                                                                     = 9
	AF_DECnet                                                                      = 12
	AF_DLI                                                                         = 13
	AF_ECMA                                                                        = 8
	AF_FIREFOX                                                                     = 19
	AF_HYLINK                                                                      = 15
	AF_ICLFXBM                                                                     = 31
	AF_IMPLINK                                                                     = 3
	AF_INET                                                                        = 2
	AF_INET6                                                                       = 23
	AF_IPX                                                                         = 6
	AF_IRDA                                                                        = 26
	AF_ISO                                                                         = 7
	AF_LAT                                                                         = 14
	AF_MAX                                                                         = 33
	AF_NETBIOS                                                                     = 17
	AF_NETDES                                                                      = 28
	AF_NS                                                                          = 6
	AF_OSI                                                                         = 7
	AF_PUP                                                                         = 4
	AF_SNA                                                                         = 11
	AF_TCNMESSAGE                                                                  = 30
	AF_TCNPROCESS                                                                  = 29
	AF_UNIX                                                                        = 1
	AF_UNKNOWN1                                                                    = 20
	AF_UNSPEC                                                                      = 0
	AF_VOICEVIEW                                                                   = 18
	AI_CANONNAME                                                                   = 0x00000002
	AI_NUMERICHOST                                                                 = 0x00000004
	AI_PASSIVE                                                                     = 0x00000001
	ALERT_SYSTEM_CRITICAL                                                          = 5
	ALERT_SYSTEM_ERROR                                                             = 3
	ALERT_SYSTEM_INFORMATIONAL                                                     = 1
	ALERT_SYSTEM_QUERY                                                             = 4
	ALERT_SYSTEM_WARNING                                                           = 2
	ALIGNMENT_MACHINE                                                              = 0
	ALTERNATE                                                                      = 1
	ALTNUMPAD_BIT                                                                  = 0x4000000
	ANSI_CHARSET                                                                   = 0
	ANSI_FIXED_FONT                                                                = 11
	ANSI_VAR_FONT                                                                  = 12
	ANTIALIASED_QUALITY                                                            = 4
	ANYSIZE_ARRAY                                                                  = 1
	APIENTRY                                                                       = 0
	APIPRIVATE                                                                     = 0
	API_SET_EXTENSION_NAME_A                                                       = "EXT-"
	API_SET_LOAD_SCHEMA_ORDINAL                                                    = 1
	API_SET_LOOKUP_ORDINAL                                                         = 2
	API_SET_PREFIX_NAME_A                                                          = "API-"
	API_SET_RELEASE_SCHEMA_ORDINAL                                                 = 3
	API_SET_SCHEMA_VERSION                                                         = 2
	API_SET_SECTION_NAME                                                           = ".apiset"
	APPCOMMAND_BASS_BOOST                                                          = 20
	APPCOMMAND_BASS_DOWN                                                           = 19
	APPCOMMAND_BASS_UP                                                             = 21
	APPCOMMAND_BROWSER_BACKWARD                                                    = 1
	APPCOMMAND_BROWSER_FAVORITES                                                   = 6
	APPCOMMAND_BROWSER_FORWARD                                                     = 2
	APPCOMMAND_BROWSER_HOME                                                        = 7
	APPCOMMAND_BROWSER_REFRESH                                                     = 3
	APPCOMMAND_BROWSER_SEARCH                                                      = 5
	APPCOMMAND_BROWSER_STOP                                                        = 4
	APPCOMMAND_CLOSE                                                               = 31
	APPCOMMAND_COPY                                                                = 36
	APPCOMMAND_CORRECTION_LIST                                                     = 45
	APPCOMMAND_CUT                                                                 = 37
	APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE                                   = 43
	APPCOMMAND_FIND                                                                = 28
	APPCOMMAND_FORWARD_MAIL                                                        = 40
	APPCOMMAND_HELP                                                                = 27
	APPCOMMAND_LAUNCH_APP1                                                         = 17
	APPCOMMAND_LAUNCH_APP2                                                         = 18
	APPCOMMAND_LAUNCH_MAIL                                                         = 15
	APPCOMMAND_LAUNCH_MEDIA_SELECT                                                 = 16
	APPCOMMAND_MEDIA_CHANNEL_DOWN                                                  = 52
	APPCOMMAND_MEDIA_CHANNEL_UP                                                    = 51
	APPCOMMAND_MEDIA_FAST_FORWARD                                                  = 49
	APPCOMMAND_MEDIA_NEXTTRACK                                                     = 11
	APPCOMMAND_MEDIA_PAUSE                                                         = 47
	APPCOMMAND_MEDIA_PLAY                                                          = 46
	APPCOMMAND_MEDIA_PLAY_PAUSE                                                    = 14
	APPCOMMAND_MEDIA_PREVIOUSTRACK                                                 = 12
	APPCOMMAND_MEDIA_RECORD                                                        = 48
	APPCOMMAND_MEDIA_REWIND                                                        = 50
	APPCOMMAND_MEDIA_STOP                                                          = 13
	APPCOMMAND_MICROPHONE_VOLUME_DOWN                                              = 25
	APPCOMMAND_MICROPHONE_VOLUME_MUTE                                              = 24
	APPCOMMAND_MICROPHONE_VOLUME_UP                                                = 26
	APPCOMMAND_MIC_ON_OFF_TOGGLE                                                   = 44
	APPCOMMAND_NEW                                                                 = 29
	APPCOMMAND_OPEN                                                                = 30
	APPCOMMAND_PASTE                                                               = 38
	APPCOMMAND_PRINT                                                               = 33
	APPCOMMAND_REDO                                                                = 35
	APPCOMMAND_REPLY_TO_MAIL                                                       = 39
	APPCOMMAND_SAVE                                                                = 32
	APPCOMMAND_SEND_MAIL                                                           = 41
	APPCOMMAND_SPELL_CHECK                                                         = 42
	APPCOMMAND_TREBLE_DOWN                                                         = 22
	APPCOMMAND_TREBLE_UP                                                           = 23
	APPCOMMAND_UNDO                                                                = 34
	APPCOMMAND_VOLUME_DOWN                                                         = 9
	APPCOMMAND_VOLUME_MUTE                                                         = 8
	APPCOMMAND_VOLUME_UP                                                           = 10
	APPLICATION_ERROR_MASK                                                         = 0x20000000
	APPLICATION_VERIFIER_ACCESS_VIOLATION                                          = 0x0002
	APPLICATION_VERIFIER_BAD_HEAP_HANDLE                                           = 0x0005
	APPLICATION_VERIFIER_COM_API_IN_DLLMAIN                                        = 0x0401
	APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL                                  = 0x040A
	APPLICATION_VERIFIER_COM_ERROR                                                 = 0x0400
	APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL                                 = 0x040B
	APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL                                 = 0x0410
	APPLICATION_VERIFIER_COM_NULL_DACL                                             = 0x0406
	APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY                                = 0x040C
	APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL                                = 0x040D
	APPLICATION_VERIFIER_COM_SMUGGLED_PROXY                                        = 0x0409
	APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER                                      = 0x0408
	APPLICATION_VERIFIER_COM_UNBALANCED_COINIT                                     = 0x0403
	APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT                                    = 0x0404
	APPLICATION_VERIFIER_COM_UNBALANCED_SWC                                        = 0x0405
	APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION                                   = 0x0402
	APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION                                  = 0x0407
	APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY                                  = 0x040E
	APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL                                  = 0x040F
	APPLICATION_VERIFIER_CONTINUABLE_BREAK                                         = 0x10000000
	APPLICATION_VERIFIER_CORRUPTED_FREED_HEAP_BLOCK                                = 0x000E
	APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK                                      = 0x0008
	APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_END_STAMP                            = 0x0011
	APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_HEADER          = 0x000B
	APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_PROBING         = 0x000C
	APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_HEADER                               = 0x000D
	APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_PREFIX                               = 0x0012
	APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_START_STAMP                          = 0x0010
	APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_SUFFIX                               = 0x000F
	APPLICATION_VERIFIER_CORRUPTED_HEAP_LIST                                       = 0x0014
	APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP                                      = 0x0009
	APPLICATION_VERIFIER_DOUBLE_FREE                                               = 0x0007
	APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK                                     = 0x0200
	APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST                                      = 0x0004
	APPLICATION_VERIFIER_FIRST_CHANCE_ACCESS_VIOLATION                             = 0x0013
	APPLICATION_VERIFIER_INCORRECT_WAIT_CALL                                       = 0x0302
	APPLICATION_VERIFIER_INTERNAL_ERROR                                            = 0x80000000
	APPLICATION_VERIFIER_INTERNAL_WARNING                                          = 0x40000000
	APPLICATION_VERIFIER_INVALID_ALLOCMEM                                          = 0x0601
	APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL                                 = 0x0102
	APPLICATION_VERIFIER_INVALID_FREEMEM                                           = 0x0600
	APPLICATION_VERIFIER_INVALID_HANDLE                                            = 0x0300
	APPLICATION_VERIFIER_INVALID_MAPVIEW                                           = 0x0602
	APPLICATION_VERIFIER_INVALID_TLS_VALUE                                         = 0x0301
	APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED                                  = 0x0211
	APPLICATION_VERIFIER_LOCK_CORRUPTED                                            = 0x0205
	APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE                                    = 0x0203
	APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT                                   = 0x0208
	APPLICATION_VERIFIER_LOCK_INVALID_OWNER                                        = 0x0206
	APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT                              = 0x0207
	APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP                                        = 0x0202
	APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY                                      = 0x0204
	APPLICATION_VERIFIER_LOCK_IN_FREED_VMEM                                        = 0x0212
	APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL                                      = 0x0201
	APPLICATION_VERIFIER_LOCK_IN_UNMAPPED_MEM                                      = 0x0213
	APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED                                      = 0x0210
	APPLICATION_VERIFIER_LOCK_OVER_RELEASED                                        = 0x0209
	APPLICATION_VERIFIER_NO_BREAK                                                  = 0x20000000
	APPLICATION_VERIFIER_NULL_HANDLE                                               = 0x0303
	APPLICATION_VERIFIER_PROBE_FREE_MEM                                            = 0x0604
	APPLICATION_VERIFIER_PROBE_GUARD_PAGE                                          = 0x0605
	APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS                                     = 0x0603
	APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE                               = 0x0607
	APPLICATION_VERIFIER_PROBE_NULL                                                = 0x0606
	APPLICATION_VERIFIER_RPC_ERROR                                                 = 0x0500
	APPLICATION_VERIFIER_SIZE_HEAP_UNEXPECTED_EXCEPTION                            = 0x0618
	APPLICATION_VERIFIER_STACK_OVERFLOW                                            = 0x0101
	APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE                                      = 0x0006
	APPLICATION_VERIFIER_TERMINATE_THREAD_CALL                                     = 0x0100
	APPLICATION_VERIFIER_THREAD_NOT_LOCK_OWNER                                     = 0x0214
	APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION                                      = 0x000A
	APPLICATION_VERIFIER_UNKNOWN_ERROR                                             = 0x0001
	APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS                                     = 0x0003
	APPLICATION_VERIFIER_WAIT_IN_DLLMAIN                                           = 0x0304
	APPMODEL_ERROR_NO_APPLICATION                                                  = 15703
	APPMODEL_ERROR_NO_PACKAGE                                                      = 15700
	APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT                                        = 15702
	APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT                                         = 15701
	APP_LOCAL_DEVICE_ID_SIZE                                                       = 32
	ARABIC_CHARSET                                                                 = 178
	ARW_BOTTOMLEFT                                                                 = 0
	ARW_BOTTOMRIGHT                                                                = 1
	ARW_DOWN                                                                       = 4
	ARW_HIDE                                                                       = 8
	ARW_LEFT                                                                       = 0
	ARW_RIGHT                                                                      = 0
	ARW_STARTMASK                                                                  = 3
	ARW_STARTRIGHT                                                                 = 1
	ARW_STARTTOP                                                                   = 2
	ARW_TOPLEFT                                                                    = 2
	ARW_TOPRIGHT                                                                   = 3
	ARW_UP                                                                         = 4
	ASPECTX                                                                        = 40
	ASPECTXY                                                                       = 44
	ASPECTY                                                                        = 42
	ASPECT_FILTERING                                                               = 0x0001
	ATF_ONOFFFEEDBACK                                                              = 0x00000002
	ATF_TIMEOUTON                                                                  = 0x00000001
	ATOM_FLAG_GLOBAL                                                               = 0x2
	ATTRIBUTE_SECURITY_INFORMATION                                                 = 32
	ATTR_CONVERTED                                                                 = 0x02
	ATTR_FIXEDCONVERTED                                                            = 0x05
	ATTR_INPUT                                                                     = 0x00
	ATTR_INPUT_ERROR                                                               = 0x04
	ATTR_TARGET_CONVERTED                                                          = 0x01
	ATTR_TARGET_NOTCONVERTED                                                       = 0x03
	AUDIT_ALLOW_NO_PRIVILEGE                                                       = 0x1
	AW_ACTIVATE                                                                    = 0x00020000
	AW_BLEND                                                                       = 0x00080000
	AW_CENTER                                                                      = 0x00000010
	AW_HIDE                                                                        = 0x00010000
	AW_HOR_NEGATIVE                                                                = 0x00000002
	AW_HOR_POSITIVE                                                                = 0x00000001
	AW_SLIDE                                                                       = 0x00040000
	AW_VER_NEGATIVE                                                                = 0x00000008
	AW_VER_POSITIVE                                                                = 0x00000004
	BACKGROUND_BLUE                                                                = 0x10
	BACKGROUND_GREEN                                                               = 0x20
	BACKGROUND_INTENSITY                                                           = 0x80
	BACKGROUND_RED                                                                 = 0x40
	BACKUP_ALTERNATE_DATA                                                          = 0x00000004
	BACKUP_DATA                                                                    = 0x00000001
	BACKUP_EA_DATA                                                                 = 0x00000002
	BACKUP_INVALID                                                                 = 0x00000000
	BACKUP_LINK                                                                    = 0x00000005
	BACKUP_OBJECT_ID                                                               = 0x00000007
	BACKUP_PROPERTY_DATA                                                           = 0x00000006
	BACKUP_REPARSE_DATA                                                            = 0x00000008
	BACKUP_SECURITY_DATA                                                           = 0x00000003
	BACKUP_SECURITY_INFORMATION                                                    = 65536
	BACKUP_SPARSE_BLOCK                                                            = 0x00000009
	BACKUP_TXFS_DATA                                                               = 0x0000000a
	BALTIC_CHARSET                                                                 = 186
	BANDINFO                                                                       = 24
	BASETYPES                                                                      = 0
	BASE_PROTOCOL                                                                  = 1
	BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE                                       = 0x10000
	BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE                                        = 0x1
	BASE_SEARCH_PATH_INVALID_FLAGS                                                 = -98306
	BASE_SEARCH_PATH_PERMANENT                                                     = 0x8000
	BATTERY_DISCHARGE_FLAGS_ENABLE                                                 = 0x80000000
	BATTERY_DISCHARGE_FLAGS_EVENTCODE_MASK                                         = 0x00000007
	BATTERY_FLAG_CHARGING                                                          = 0x08
	BATTERY_FLAG_CRITICAL                                                          = 0x04
	BATTERY_FLAG_HIGH                                                              = 0x01
	BATTERY_FLAG_LOW                                                               = 0x02
	BATTERY_FLAG_NO_BATTERY                                                        = 0x80
	BATTERY_FLAG_UNKNOWN                                                           = 0xff
	BATTERY_LIFE_UNKNOWN                                                           = 0xffffffff
	BATTERY_PERCENTAGE_UNKNOWN                                                     = 0xff
	BDR_INNER                                                                      = 12
	BDR_OUTER                                                                      = 3
	BDR_RAISED                                                                     = 5
	BDR_RAISEDINNER                                                                = 0x0004
	BDR_RAISEDOUTER                                                                = 0x0001
	BDR_SUNKEN                                                                     = 10
	BDR_SUNKENINNER                                                                = 0x0008
	BDR_SUNKENOUTER                                                                = 0x0002
	BEGIN_PATH                                                                     = 4096
	BELOW_NORMAL_PRIORITY_CLASS                                                    = 0x4000
	BF_ADJUST                                                                      = 0x2000
	BF_BOTTOM                                                                      = 0x0008
	BF_BOTTOMLEFT                                                                  = 9
	BF_BOTTOMRIGHT                                                                 = 12
	BF_DIAGONAL                                                                    = 0x0010
	BF_DIAGONAL_ENDBOTTOMLEFT                                                      = 25
	BF_DIAGONAL_ENDBOTTOMRIGHT                                                     = 28
	BF_DIAGONAL_ENDTOPLEFT                                                         = 19
	BF_DIAGONAL_ENDTOPRIGHT                                                        = 22
	BF_FLAT                                                                        = 0x4000
	BF_LEFT                                                                        = 0x0001
	BF_MIDDLE                                                                      = 0x0800
	BF_MONO                                                                        = 0x8000
	BF_RECT                                                                        = 15
	BF_RIGHT                                                                       = 0x0004
	BF_SOFT                                                                        = 0x1000
	BF_TOP                                                                         = 0x0002
	BF_TOPLEFT                                                                     = 3
	BF_TOPRIGHT                                                                    = 6
	BIGENDIAN                                                                      = 0x0000
	BITSPIXEL                                                                      = 12
	BI_BITFIELDS                                                                   = 3
	BI_JPEG                                                                        = 4
	BI_PNG                                                                         = 5
	BI_RGB                                                                         = 0
	BI_RLE4                                                                        = 2
	BI_RLE8                                                                        = 1
	BKMODE_LAST                                                                    = 2
	BLACKONWHITE                                                                   = 1
	BLACK_BRUSH                                                                    = 4
	BLACK_PEN                                                                      = 7
	BLTALIGNMENT                                                                   = 119
	BM_CLICK                                                                       = 0x00F5
	BM_GETCHECK                                                                    = 0x00F0
	BM_GETIMAGE                                                                    = 0x00F6
	BM_GETSTATE                                                                    = 0x00F2
	BM_SETCHECK                                                                    = 0x00F1
	BM_SETIMAGE                                                                    = 0x00F7
	BM_SETSTATE                                                                    = 0x00F3
	BM_SETSTYLE                                                                    = 0x00F4
	BN_CLICKED                                                                     = 0
	BN_CUTOFFS_C                                                                   = 0
	BN_DBLCLK                                                                      = 5
	BN_DEPRECATED_C                                                                = 0
	BN_DISABLE                                                                     = 4
	BN_DOUBLECLICKED                                                               = 5
	BN_FAST_MP_INVMOD_C                                                            = 0
	BN_FAST_MP_MONTGOMERY_REDUCE_C                                                 = 0
	BN_FAST_S_MP_MUL_DIGS_C                                                        = 0
	BN_FAST_S_MP_MUL_HIGH_DIGS_C                                                   = 0
	BN_FAST_S_MP_SQR_C                                                             = 0
	BN_HILITE                                                                      = 2
	BN_H_                                                                          = 0
	BN_KILLFOCUS                                                                   = 7
	BN_MP_2EXPT_C                                                                  = 0
	BN_MP_ABS_C                                                                    = 0
	BN_MP_ADDMOD_C                                                                 = 0
	BN_MP_ADD_C                                                                    = 0
	BN_MP_ADD_D_C                                                                  = 0
	BN_MP_AND_C                                                                    = 0
	BN_MP_BALANCE_MUL_C                                                            = 0
	BN_MP_CLAMP_C                                                                  = 0
	BN_MP_CLEAR_C                                                                  = 0
	BN_MP_CLEAR_MULTI_C                                                            = 0
	BN_MP_CMP_C                                                                    = 0
	BN_MP_CMP_D_C                                                                  = 0
	BN_MP_CMP_MAG_C                                                                = 0
	BN_MP_CNT_LSB_C                                                                = 0
	BN_MP_COMPLEMENT_C                                                             = 0
	BN_MP_COPY_C                                                                   = 0
	BN_MP_COUNT_BITS_C                                                             = 0
	BN_MP_DECR_C                                                                   = 0
	BN_MP_DIV_2D_C                                                                 = 0
	BN_MP_DIV_2_C                                                                  = 0
	BN_MP_DIV_3_C                                                                  = 0
	BN_MP_DIV_C                                                                    = 0
	BN_MP_DIV_D_C                                                                  = 0
	BN_MP_DR_IS_MODULUS_C                                                          = 0
	BN_MP_DR_REDUCE_C                                                              = 0
	BN_MP_DR_SETUP_C                                                               = 0
	BN_MP_ERROR_TO_STRING_C                                                        = 0
	BN_MP_EXCH_C                                                                   = 0
	BN_MP_EXPORT_C                                                                 = 0
	BN_MP_EXPTMOD_C                                                                = 0
	BN_MP_EXPTMOD_FAST_C                                                           = 0
	BN_MP_EXPT_D_C                                                                 = 0
	BN_MP_EXPT_D_EX_C                                                              = 0
	BN_MP_EXPT_U32_C                                                               = 0
	BN_MP_EXTEUCLID_C                                                              = 0
	BN_MP_FREAD_C                                                                  = 0
	BN_MP_FROM_SBIN_C                                                              = 0
	BN_MP_FROM_UBIN_C                                                              = 0
	BN_MP_FWRITE_C                                                                 = 0
	BN_MP_GCD_C                                                                    = 0
	BN_MP_GET_BIT_C                                                                = 0
	BN_MP_GET_DOUBLE_C                                                             = 0
	BN_MP_GET_I32_C                                                                = 0
	BN_MP_GET_I64_C                                                                = 0
	BN_MP_GET_INT_C                                                                = 0
	BN_MP_GET_LL_C                                                                 = 0
	BN_MP_GET_LONG_C                                                               = 0
	BN_MP_GET_LONG_LONG_C                                                          = 0
	BN_MP_GET_L_C                                                                  = 0
	BN_MP_GET_MAG_U32_C                                                            = 0
	BN_MP_GET_MAG_U64_C                                                            = 0
	BN_MP_GET_MAG_ULL_C                                                            = 0
	BN_MP_GET_MAG_UL_C                                                             = 0
	BN_MP_GROW_C                                                                   = 0
	BN_MP_IMPORT_C                                                                 = 0
	BN_MP_INCR_C                                                                   = 0
	BN_MP_INIT_C                                                                   = 0
	BN_MP_INIT_COPY_C                                                              = 0
	BN_MP_INIT_I32_C                                                               = 0
	BN_MP_INIT_I64_C                                                               = 0
	BN_MP_INIT_LL_C                                                                = 0
	BN_MP_INIT_L_C                                                                 = 0
	BN_MP_INIT_MULTI_C                                                             = 0
	BN_MP_INIT_SET_C                                                               = 0
	BN_MP_INIT_SET_INT_C                                                           = 0
	BN_MP_INIT_SIZE_C                                                              = 0
	BN_MP_INIT_U32_C                                                               = 0
	BN_MP_INIT_U64_C                                                               = 0
	BN_MP_INIT_ULL_C                                                               = 0
	BN_MP_INIT_UL_C                                                                = 0
	BN_MP_INVMOD_C                                                                 = 0
	BN_MP_INVMOD_SLOW_C                                                            = 0
	BN_MP_ISEVEN_C                                                                 = 0
	BN_MP_ISODD_C                                                                  = 0
	BN_MP_IS_SQUARE_C                                                              = 0
	BN_MP_JACOBI_C                                                                 = 0
	BN_MP_KARATSUBA_MUL_C                                                          = 0
	BN_MP_KARATSUBA_SQR_C                                                          = 0
	BN_MP_KRONECKER_C                                                              = 0
	BN_MP_LCM_C                                                                    = 0
	BN_MP_LOG_U32_C                                                                = 0
	BN_MP_LSHD_C                                                                   = 0
	BN_MP_MOD_2D_C                                                                 = 0
	BN_MP_MOD_C                                                                    = 0
	BN_MP_MOD_D_C                                                                  = 0
	BN_MP_MONTGOMERY_CALC_NORMALIZATION_C                                          = 0
	BN_MP_MONTGOMERY_REDUCE_C                                                      = 0
	BN_MP_MONTGOMERY_SETUP_C                                                       = 0
	BN_MP_MULMOD_C                                                                 = 0
	BN_MP_MUL_2D_C                                                                 = 0
	BN_MP_MUL_2_C                                                                  = 0
	BN_MP_MUL_C                                                                    = 0
	BN_MP_MUL_D_C                                                                  = 0
	BN_MP_NEG_C                                                                    = 0
	BN_MP_N_ROOT_C                                                                 = 0
	BN_MP_N_ROOT_EX_C                                                              = 0
	BN_MP_OR_C                                                                     = 0
	BN_MP_PACK_C                                                                   = 0
	BN_MP_PACK_COUNT_C                                                             = 0
	BN_MP_PRIME_FERMAT_C                                                           = 0
	BN_MP_PRIME_FROBENIUS_UNDERWOOD_C                                              = 0
	BN_MP_PRIME_IS_DIVISIBLE_C                                                     = 0
	BN_MP_PRIME_IS_PRIME_C                                                         = 0
	BN_MP_PRIME_MILLER_RABIN_C                                                     = 0
	BN_MP_PRIME_NEXT_PRIME_C                                                       = 0
	BN_MP_PRIME_RABIN_MILLER_TRIALS_C                                              = 0
	BN_MP_PRIME_RANDOM_EX_C                                                        = 0
	BN_MP_PRIME_RAND_C                                                             = 0
	BN_MP_PRIME_STRONG_LUCAS_SELFRIDGE_C                                           = 0
	BN_MP_RADIX_SIZE_C                                                             = 0
	BN_MP_RADIX_SMAP_C                                                             = 0
	BN_MP_RAND_C                                                                   = 0
	BN_MP_RAND_DIGIT_C                                                             = 0
	BN_MP_RAND_SOURCE_C                                                            = 0
	BN_MP_READ_RADIX_C                                                             = 0
	BN_MP_READ_SIGNED_BIN_C                                                        = 0
	BN_MP_READ_UNSIGNED_BIN_C                                                      = 0
	BN_MP_REDUCE_2K_C                                                              = 0
	BN_MP_REDUCE_2K_L_C                                                            = 0
	BN_MP_REDUCE_2K_SETUP_C                                                        = 0
	BN_MP_REDUCE_2K_SETUP_L_C                                                      = 0
	BN_MP_REDUCE_C                                                                 = 0
	BN_MP_REDUCE_IS_2K_C                                                           = 0
	BN_MP_REDUCE_IS_2K_L_C                                                         = 0
	BN_MP_REDUCE_SETUP_C                                                           = 0
	BN_MP_ROOT_U32_C                                                               = 0
	BN_MP_RSHD_C                                                                   = 0
	BN_MP_SBIN_SIZE_C                                                              = 0
	BN_MP_SET_C                                                                    = 0
	BN_MP_SET_DOUBLE_C                                                             = 0
	BN_MP_SET_I32_C                                                                = 0
	BN_MP_SET_I64_C                                                                = 0
	BN_MP_SET_INT_C                                                                = 0
	BN_MP_SET_LL_C                                                                 = 0
	BN_MP_SET_LONG_C                                                               = 0
	BN_MP_SET_LONG_LONG_C                                                          = 0
	BN_MP_SET_L_C                                                                  = 0
	BN_MP_SET_U32_C                                                                = 0
	BN_MP_SET_U64_C                                                                = 0
	BN_MP_SET_ULL_C                                                                = 0
	BN_MP_SET_UL_C                                                                 = 0
	BN_MP_SHRINK_C                                                                 = 0
	BN_MP_SIGNED_BIN_SIZE_C                                                        = 0
	BN_MP_SIGNED_RSH_C                                                             = 0
	BN_MP_SQRMOD_C                                                                 = 0
	BN_MP_SQRTMOD_PRIME_C                                                          = 0
	BN_MP_SQRT_C                                                                   = 0
	BN_MP_SQR_C                                                                    = 0
	BN_MP_SUBMOD_C                                                                 = 0
	BN_MP_SUB_C                                                                    = 0
	BN_MP_SUB_D_C                                                                  = 0
	BN_MP_TC_AND_C                                                                 = 0
	BN_MP_TC_DIV_2D_C                                                              = 0
	BN_MP_TC_OR_C                                                                  = 0
	BN_MP_TC_XOR_C                                                                 = 0
	BN_MP_TOOM_MUL_C                                                               = 0
	BN_MP_TOOM_SQR_C                                                               = 0
	BN_MP_TORADIX_C                                                                = 0
	BN_MP_TORADIX_N_C                                                              = 0
	BN_MP_TO_RADIX_C                                                               = 0
	BN_MP_TO_SBIN_C                                                                = 0
	BN_MP_TO_SIGNED_BIN_C                                                          = 0
	BN_MP_TO_SIGNED_BIN_N_C                                                        = 0
	BN_MP_TO_UBIN_C                                                                = 0
	BN_MP_TO_UNSIGNED_BIN_C                                                        = 0
	BN_MP_TO_UNSIGNED_BIN_N_C                                                      = 0
	BN_MP_UBIN_SIZE_C                                                              = 0
	BN_MP_UNPACK_C                                                                 = 0
	BN_MP_UNSIGNED_BIN_SIZE_C                                                      = 0
	BN_MP_XOR_C                                                                    = 0
	BN_MP_ZERO_C                                                                   = 0
	BN_PAINT                                                                       = 1
	BN_PRIME_TAB_C                                                                 = 0
	BN_PUSHED                                                                      = 2
	BN_SETFOCUS                                                                    = 6
	BN_S_MP_ADD_C                                                                  = 0
	BN_S_MP_BALANCE_MUL_C                                                          = 0
	BN_S_MP_EXPTMOD_C                                                              = 0
	BN_S_MP_EXPTMOD_FAST_C                                                         = 0
	BN_S_MP_GET_BIT_C                                                              = 0
	BN_S_MP_INVMOD_FAST_C                                                          = 0
	BN_S_MP_INVMOD_SLOW_C                                                          = 0
	BN_S_MP_KARATSUBA_MUL_C                                                        = 0
	BN_S_MP_KARATSUBA_SQR_C                                                        = 0
	BN_S_MP_MONTGOMERY_REDUCE_FAST_C                                               = 0
	BN_S_MP_MUL_DIGS_C                                                             = 0
	BN_S_MP_MUL_DIGS_FAST_C                                                        = 0
	BN_S_MP_MUL_HIGH_DIGS_C                                                        = 0
	BN_S_MP_MUL_HIGH_DIGS_FAST_C                                                   = 0
	BN_S_MP_MUL_SI_C                                                               = 0
	BN_S_MP_PRIME_IS_DIVISIBLE_C                                                   = 0
	BN_S_MP_PRIME_RANDOM_EX_C                                                      = 0
	BN_S_MP_RAND_CB_C                                                              = 0
	BN_S_MP_RAND_JENKINS_C                                                         = 0
	BN_S_MP_RAND_JENKINS_INIT_C                                                    = 0
	BN_S_MP_RAND_PLATFORM_C                                                        = 0
	BN_S_MP_RAND_SOURCE_C                                                          = 0
	BN_S_MP_REVERSE_C                                                              = 0
	BN_S_MP_SQR_C                                                                  = 0
	BN_S_MP_SQR_FAST_C                                                             = 0
	BN_S_MP_SUB_C                                                                  = 0
	BN_S_MP_TOOM_MUL_C                                                             = 0
	BN_S_MP_TOOM_SQR_C                                                             = 0
	BN_UNHILITE                                                                    = 3
	BN_UNPUSHED                                                                    = 3
	BROADCAST_QUERY_DENY                                                           = 0x424D5144
	BSF_ALLOWSFW                                                                   = 0x00000080
	BSF_FLUSHDISK                                                                  = 0x00000004
	BSF_FORCEIFHUNG                                                                = 0x00000020
	BSF_IGNORECURRENTTASK                                                          = 0x00000002
	BSF_LUID                                                                       = 0x00000400
	BSF_NOHANG                                                                     = 0x00000008
	BSF_NOTIMEOUTIFNOTHUNG                                                         = 0x00000040
	BSF_POSTMESSAGE                                                                = 0x00000010
	BSF_QUERY                                                                      = 0x00000001
	BSF_RETURNHDESK                                                                = 0x00000200
	BSF_SENDNOTIFYMESSAGE                                                          = 0x00000100
	BSM_ALLCOMPONENTS                                                              = 0x00000000
	BSM_ALLDESKTOPS                                                                = 0x00000010
	BSM_APPLICATIONS                                                               = 0x00000008
	BSM_INSTALLABLEDRIVERS                                                         = 0x00000004
	BSM_NETDRIVER                                                                  = 0x00000002
	BSM_VXDS                                                                       = 0x00000001
	BST_CHECKED                                                                    = 0x0001
	BST_FOCUS                                                                      = 0x0008
	BST_INDETERMINATE                                                              = 0x0002
	BST_PUSHED                                                                     = 0x0004
	BST_UNCHECKED                                                                  = 0x0000
	BS_3STATE                                                                      = 5
	BS_AUTO3STATE                                                                  = 6
	BS_AUTOCHECKBOX                                                                = 3
	BS_AUTORADIOBUTTON                                                             = 9
	BS_BITMAP                                                                      = 128
	BS_BOTTOM                                                                      = 2048
	BS_CENTER                                                                      = 768
	BS_CHECKBOX                                                                    = 2
	BS_DEFPUSHBUTTON                                                               = 1
	BS_DIBPATTERN                                                                  = 5
	BS_DIBPATTERN8X8                                                               = 8
	BS_DIBPATTERNPT                                                                = 6
	BS_FLAT                                                                        = 32768
	BS_GROUPBOX                                                                    = 7
	BS_HATCHED                                                                     = 2
	BS_HOLLOW                                                                      = 1
	BS_ICON                                                                        = 64
	BS_INDEXED                                                                     = 4
	BS_LEFT                                                                        = 256
	BS_LEFTTEXT                                                                    = 32
	BS_MONOPATTERN                                                                 = 9
	BS_MULTILINE                                                                   = 8192
	BS_NOTIFY                                                                      = 16384
	BS_NULL                                                                        = 1
	BS_OWNERDRAW                                                                   = 11
	BS_PATTERN                                                                     = 3
	BS_PATTERN8X8                                                                  = 7
	BS_PUSHBOX                                                                     = 10
	BS_PUSHBUTTON                                                                  = 0
	BS_PUSHLIKE                                                                    = 4096
	BS_RADIOBUTTON                                                                 = 4
	BS_RIGHT                                                                       = 512
	BS_RIGHTBUTTON                                                                 = 32
	BS_SOLID                                                                       = 0
	BS_TEXT                                                                        = 0
	BS_TOP                                                                         = 1024
	BS_TYPEMASK                                                                    = 15
	BS_USERBUTTON                                                                  = 8
	BS_VCENTER                                                                     = 3072
	BUFSIZ                                                                         = 512
	C1_ALPHA                                                                       = 0x0100
	C1_BLANK                                                                       = 0x0040
	C1_CNTRL                                                                       = 0x0020
	C1_DEFINED                                                                     = 0x0200
	C1_DIGIT                                                                       = 0x0004
	C1_LOWER                                                                       = 0x0002
	C1_PUNCT                                                                       = 0x0010
	C1_SPACE                                                                       = 0x0008
	C1_UPPER                                                                       = 0x0001
	C1_XDIGIT                                                                      = 0x0080
	C2_ARABICNUMBER                                                                = 0x0006
	C2_BLOCKSEPARATOR                                                              = 0x0008
	C2_COMMONSEPARATOR                                                             = 0x0007
	C2_EUROPENUMBER                                                                = 0x0003
	C2_EUROPESEPARATOR                                                             = 0x0004
	C2_EUROPETERMINATOR                                                            = 0x0005
	C2_LEFTTORIGHT                                                                 = 0x0001
	C2_NOTAPPLICABLE                                                               = 0x0000
	C2_OTHERNEUTRAL                                                                = 0x000b
	C2_RIGHTTOLEFT                                                                 = 0x0002
	C2_SEGMENTSEPARATOR                                                            = 0x0009
	C2_WHITESPACE                                                                  = 0x000a
	C3_ALPHA                                                                       = 0x8000
	C3_DIACRITIC                                                                   = 0x0002
	C3_FULLWIDTH                                                                   = 0x0080
	C3_HALFWIDTH                                                                   = 0x0040
	C3_HIGHSURROGATE                                                               = 0x0800
	C3_HIRAGANA                                                                    = 0x0020
	C3_IDEOGRAPH                                                                   = 0x0100
	C3_KASHIDA                                                                     = 0x0200
	C3_KATAKANA                                                                    = 0x0010
	C3_LEXICAL                                                                     = 0x0400
	C3_LOWSURROGATE                                                                = 0x1000
	C3_NONSPACING                                                                  = 0x0001
	C3_NOTAPPLICABLE                                                               = 0x0000
	C3_SYMBOL                                                                      = 0x0008
	C3_VOWELMARK                                                                   = 0x0004
	CACHE_E_FIRST                                                                  = 2147746160
	CACHE_E_LAST                                                                   = 2147746175
	CACHE_FULLY_ASSOCIATIVE                                                        = 0xFF
	CACHE_S_FIRST                                                                  = 262512
	CACHE_S_LAST                                                                   = 262527
	CALERT_SYSTEM                                                                  = 6
	CALLBACK                                                                       = 0
	CALLBACK_CHUNK_FINISHED                                                        = 0x0
	CALLBACK_STREAM_SWITCH                                                         = 0x1
	CAL_GREGORIAN                                                                  = 1
	CAL_GREGORIAN_ARABIC                                                           = 10
	CAL_GREGORIAN_ME_FRENCH                                                        = 9
	CAL_GREGORIAN_US                                                               = 2
	CAL_GREGORIAN_XLIT_ENGLISH                                                     = 11
	CAL_GREGORIAN_XLIT_FRENCH                                                      = 12
	CAL_HEBREW                                                                     = 8
	CAL_HIJRI                                                                      = 6
	CAL_ICALINTVALUE                                                               = 0x00000001
	CAL_ITWODIGITYEARMAX                                                           = 0x00000030
	CAL_IYEAROFFSETRANGE                                                           = 0x00000003
	CAL_JAPAN                                                                      = 3
	CAL_KOREA                                                                      = 5
	CAL_NOUSEROVERRIDE                                                             = 2147483648
	CAL_RETURN_NUMBER                                                              = 536870912
	CAL_SABBREVDAYNAME1                                                            = 0x0000000e
	CAL_SABBREVDAYNAME2                                                            = 0x0000000f
	CAL_SABBREVDAYNAME3                                                            = 0x00000010
	CAL_SABBREVDAYNAME4                                                            = 0x00000011
	CAL_SABBREVDAYNAME5                                                            = 0x00000012
	CAL_SABBREVDAYNAME6                                                            = 0x00000013
	CAL_SABBREVDAYNAME7                                                            = 0x00000014
	CAL_SABBREVMONTHNAME1                                                          = 0x00000022
	CAL_SABBREVMONTHNAME10                                                         = 0x0000002b
	CAL_SABBREVMONTHNAME11                                                         = 0x0000002c
	CAL_SABBREVMONTHNAME12                                                         = 0x0000002d
	CAL_SABBREVMONTHNAME13                                                         = 0x0000002e
	CAL_SABBREVMONTHNAME2                                                          = 0x00000023
	CAL_SABBREVMONTHNAME3                                                          = 0x00000024
	CAL_SABBREVMONTHNAME4                                                          = 0x00000025
	CAL_SABBREVMONTHNAME5                                                          = 0x00000026
	CAL_SABBREVMONTHNAME6                                                          = 0x00000027
	CAL_SABBREVMONTHNAME7                                                          = 0x00000028
	CAL_SABBREVMONTHNAME8                                                          = 0x00000029
	CAL_SABBREVMONTHNAME9                                                          = 0x0000002a
	CAL_SCALNAME                                                                   = 0x00000002
	CAL_SDAYNAME1                                                                  = 0x00000007
	CAL_SDAYNAME2                                                                  = 0x00000008
	CAL_SDAYNAME3                                                                  = 0x00000009
	CAL_SDAYNAME4                                                                  = 0x0000000a
	CAL_SDAYNAME5                                                                  = 0x0000000b
	CAL_SDAYNAME6                                                                  = 0x0000000c
	CAL_SDAYNAME7                                                                  = 0x0000000d
	CAL_SERASTRING                                                                 = 0x00000004
	CAL_SLONGDATE                                                                  = 0x00000006
	CAL_SMONTHNAME1                                                                = 0x00000015
	CAL_SMONTHNAME10                                                               = 0x0000001e
	CAL_SMONTHNAME11                                                               = 0x0000001f
	CAL_SMONTHNAME12                                                               = 0x00000020
	CAL_SMONTHNAME13                                                               = 0x00000021
	CAL_SMONTHNAME2                                                                = 0x00000016
	CAL_SMONTHNAME3                                                                = 0x00000017
	CAL_SMONTHNAME4                                                                = 0x00000018
	CAL_SMONTHNAME5                                                                = 0x00000019
	CAL_SMONTHNAME6                                                                = 0x0000001a
	CAL_SMONTHNAME7                                                                = 0x0000001b
	CAL_SMONTHNAME8                                                                = 0x0000001c
	CAL_SMONTHNAME9                                                                = 0x0000001d
	CAL_SSHORTDATE                                                                 = 0x00000005
	CAL_SYEARMONTH                                                                 = 0x0000002f
	CAL_TAIWAN                                                                     = 4
	CAL_THAI                                                                       = 7
	CAL_UMALQURA                                                                   = 23
	CAL_USE_CP_ACP                                                                 = 1073741824
	CANCELED                                                                       = 0x1000
	CAPSLOCK_ON                                                                    = 0x80
	CAT_E_FIRST                                                                    = 2147746144
	CAT_E_LAST                                                                     = 2147746145
	CA_LOG_FILTER                                                                  = 0x0002
	CA_NEGATIVE                                                                    = 0x0001
	CBM_INIT                                                                       = 4
	CBN_CLOSEUP                                                                    = 8
	CBN_DBLCLK                                                                     = 2
	CBN_DROPDOWN                                                                   = 7
	CBN_EDITCHANGE                                                                 = 5
	CBN_EDITUPDATE                                                                 = 6
	CBN_ERRSPACE                                                                   = -1
	CBN_KILLFOCUS                                                                  = 4
	CBN_SELCHANGE                                                                  = 1
	CBN_SELENDCANCEL                                                               = 10
	CBN_SELENDOK                                                                   = 9
	CBN_SETFOCUS                                                                   = 3
	CBR_110                                                                        = 110
	CBR_115200                                                                     = 115200
	CBR_1200                                                                       = 1200
	CBR_128000                                                                     = 128000
	CBR_14400                                                                      = 14400
	CBR_19200                                                                      = 19200
	CBR_2400                                                                       = 2400
	CBR_256000                                                                     = 256000
	CBR_300                                                                        = 300
	CBR_38400                                                                      = 38400
	CBR_4800                                                                       = 4800
	CBR_56000                                                                      = 56000
	CBR_57600                                                                      = 57600
	CBR_600                                                                        = 600
	CBR_9600                                                                       = 9600
	CBS_AUTOHSCROLL                                                                = 64
	CBS_DISABLENOSCROLL                                                            = 2048
	CBS_DROPDOWN                                                                   = 2
	CBS_DROPDOWNLIST                                                               = 3
	CBS_HASSTRINGS                                                                 = 512
	CBS_LOWERCASE                                                                  = 16384
	CBS_NOINTEGRALHEIGHT                                                           = 1024
	CBS_OEMCONVERT                                                                 = 128
	CBS_OWNERDRAWFIXED                                                             = 16
	CBS_OWNERDRAWVARIABLE                                                          = 32
	CBS_SIMPLE                                                                     = 1
	CBS_SORT                                                                       = 256
	CBS_UPPERCASE                                                                  = 8192
	CB_ADDSTRING                                                                   = 0x0143
	CB_DELETESTRING                                                                = 0x0144
	CB_DIR                                                                         = 0x0145
	CB_ERR                                                                         = -1
	CB_ERRSPACE                                                                    = -2
	CB_FINDSTRING                                                                  = 0x014C
	CB_FINDSTRINGEXACT                                                             = 0x0158
	CB_GETCOMBOBOXINFO                                                             = 0x0164
	CB_GETCOUNT                                                                    = 0x0146
	CB_GETCURSEL                                                                   = 0x0147
	CB_GETDROPPEDCONTROLRECT                                                       = 0x0152
	CB_GETDROPPEDSTATE                                                             = 0x0157
	CB_GETDROPPEDWIDTH                                                             = 0x015f
	CB_GETEDITSEL                                                                  = 0x0140
	CB_GETEXTENDEDUI                                                               = 0x0156
	CB_GETHORIZONTALEXTENT                                                         = 0x015d
	CB_GETITEMDATA                                                                 = 0x0150
	CB_GETITEMHEIGHT                                                               = 0x0154
	CB_GETLBTEXT                                                                   = 0x0148
	CB_GETLBTEXTLEN                                                                = 0x0149
	CB_GETLOCALE                                                                   = 0x015A
	CB_GETTOPINDEX                                                                 = 0x015b
	CB_INITSTORAGE                                                                 = 0x0161
	CB_INSERTSTRING                                                                = 0x014A
	CB_LIMITTEXT                                                                   = 0x0141
	CB_MSGMAX                                                                      = 0x0165
	CB_OKAY                                                                        = 0
	CB_RESETCONTENT                                                                = 0x014B
	CB_SELECTSTRING                                                                = 0x014D
	CB_SETCURSEL                                                                   = 0x014E
	CB_SETDROPPEDWIDTH                                                             = 0x0160
	CB_SETEDITSEL                                                                  = 0x0142
	CB_SETEXTENDEDUI                                                               = 0x0155
	CB_SETHORIZONTALEXTENT                                                         = 0x015e
	CB_SETITEMDATA                                                                 = 0x0151
	CB_SETITEMHEIGHT                                                               = 0x0153
	CB_SETLOCALE                                                                   = 0x0159
	CB_SETTOPINDEX                                                                 = 0x015c
	CB_SHOWDROPDOWN                                                                = 0x014F
	CCHDEVICENAME                                                                  = 32
	CCHFORMNAME                                                                    = 32
	CCHILDREN_SCROLLBAR                                                            = 5
	CCHILDREN_TITLEBAR                                                             = 5
	CC_CHORD                                                                       = 4
	CC_CIRCLES                                                                     = 1
	CC_ELLIPSES                                                                    = 8
	CC_INTERIORS                                                                   = 128
	CC_NONE                                                                        = 0
	CC_PIE                                                                         = 2
	CC_ROUNDRECT                                                                   = 256
	CC_STYLED                                                                      = 32
	CC_WIDE                                                                        = 16
	CC_WIDESTYLED                                                                  = 64
	CDECL                                                                          = 0
	CDS_FULLSCREEN                                                                 = 0x00000004
	CDS_GLOBAL                                                                     = 0x00000008
	CDS_NORESET                                                                    = 0x10000000
	CDS_RESET                                                                      = 0x40000000
	CDS_RESET_EX                                                                   = 0x20000000
	CDS_SET_PRIMARY                                                                = 0x00000010
	CDS_TEST                                                                       = 0x00000002
	CDS_UPDATEREGISTRY                                                             = 0x00000001
	CDS_VIDEOPARAMETERS                                                            = 0x00000020
	CE_BREAK                                                                       = 0x10
	CE_DNS                                                                         = 0x800
	CE_FRAME                                                                       = 0x8
	CE_IOE                                                                         = 0x400
	CE_MODE                                                                        = 0x8000
	CE_OOP                                                                         = 0x1000
	CE_OVERRUN                                                                     = 0x2
	CE_PTO                                                                         = 0x200
	CE_RXOVER                                                                      = 0x1
	CE_RXPARITY                                                                    = 0x4
	CE_TXFULL                                                                      = 0x100
	CFG_CALL_TARGET_CONVERT_EXPORT_SUPPRESSED_TO_VALID                             = 0x04
	CFG_CALL_TARGET_PROCESSED                                                      = 0x02
	CFG_CALL_TARGET_VALID                                                          = 0x01
	CFS_CANDIDATEPOS                                                               = 0x0040
	CFS_DEFAULT                                                                    = 0x0000
	CFS_EXCLUDE                                                                    = 0x0080
	CFS_FORCE_POSITION                                                             = 0x0020
	CFS_POINT                                                                      = 0x0002
	CFS_RECT                                                                       = 0x0001
	CF_ACCEPT                                                                      = 0x0000
	CF_BITMAP                                                                      = 2
	CF_DEFER                                                                       = 0x0002
	CF_DIB                                                                         = 8
	CF_DIBV5                                                                       = 17
	CF_DIF                                                                         = 5
	CF_DSPBITMAP                                                                   = 0x0082
	CF_DSPENHMETAFILE                                                              = 0x008E
	CF_DSPMETAFILEPICT                                                             = 0x0083
	CF_DSPTEXT                                                                     = 0x0081
	CF_ENHMETAFILE                                                                 = 14
	CF_GDIOBJFIRST                                                                 = 0x0300
	CF_GDIOBJLAST                                                                  = 0x03FF
	CF_HDROP                                                                       = 15
	CF_LOCALE                                                                      = 16
	CF_MAX                                                                         = 18
	CF_METAFILEPICT                                                                = 3
	CF_OEMTEXT                                                                     = 7
	CF_OWNERDISPLAY                                                                = 0x0080
	CF_PALETTE                                                                     = 9
	CF_PENDATA                                                                     = 10
	CF_PRIVATEFIRST                                                                = 0x0200
	CF_PRIVATELAST                                                                 = 0x02FF
	CF_REJECT                                                                      = 0x0001
	CF_RIFF                                                                        = 11
	CF_SYLK                                                                        = 4
	CF_TEXT                                                                        = 1
	CF_TIFF                                                                        = 6
	CF_UNICODETEXT                                                                 = 13
	CF_WAVE                                                                        = 12
	CHECKJPEGFORMAT                                                                = 4119
	CHECKPNGFORMAT                                                                 = 4120
	CHILDID_SELF                                                                   = 0
	CHINESEBIG5_CHARSET                                                            = 136
	CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION                                  = 1
	CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1                               = 1
	CLAIM_SECURITY_ATTRIBUTE_CUSTOM_FLAGS                                          = 0xffff0000
	CLAIM_SECURITY_ATTRIBUTE_DISABLED                                              = 0x0010
	CLAIM_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT                                   = 0x0008
	CLAIM_SECURITY_ATTRIBUTE_MANDATORY                                             = 0x0020
	CLAIM_SECURITY_ATTRIBUTE_NON_INHERITABLE                                       = 0x0001
	CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN                                          = 0x06
	CLAIM_SECURITY_ATTRIBUTE_TYPE_FQBN                                             = 0x04
	CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64                                            = 0x01
	CLAIM_SECURITY_ATTRIBUTE_TYPE_INVALID                                          = 0x00
	CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING                                     = 0x10
	CLAIM_SECURITY_ATTRIBUTE_TYPE_SID                                              = 0x05
	CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING                                           = 0x03
	CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64                                           = 0x02
	CLAIM_SECURITY_ATTRIBUTE_USE_FOR_DENY_ONLY                                     = 0x0004
	CLAIM_SECURITY_ATTRIBUTE_VALID_FLAGS                                           = 63
	CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE                                  = 0x0002
	CLASSFACTORY_E_FIRST                                                           = 2147746064
	CLASSFACTORY_E_LAST                                                            = 2147746079
	CLASSFACTORY_S_FIRST                                                           = 262416
	CLASSFACTORY_S_LAST                                                            = 262431
	CLEARTYPE_NATURAL_QUALITY                                                      = 6
	CLEARTYPE_QUALITY                                                              = 5
	CLIENTSITE_E_FIRST                                                             = 2147746192
	CLIENTSITE_E_LAST                                                              = 2147746207
	CLIENTSITE_S_FIRST                                                             = 262544
	CLIENTSITE_S_LAST                                                              = 262559
	CLIPBRD_E_FIRST                                                                = 2147746256
	CLIPBRD_E_LAST                                                                 = 2147746271
	CLIPBRD_S_FIRST                                                                = 262608
	CLIPBRD_S_LAST                                                                 = 262623
	CLIPCAPS                                                                       = 36
	CLIP_CHARACTER_PRECIS                                                          = 1
	CLIP_DEFAULT_PRECIS                                                            = 0
	CLIP_EMBEDDED                                                                  = 128
	CLIP_LH_ANGLES                                                                 = 16
	CLIP_MASK                                                                      = 0xf
	CLIP_STROKE_PRECIS                                                             = 2
	CLIP_TO_PATH                                                                   = 4097
	CLIP_TT_ALWAYS                                                                 = 32
	CLK_TCK                                                                        = 1000
	CLL_END                                                                        = -1
	CLOCKS_PER_SEC                                                                 = 1000
	CLOCK_MONOTONIC                                                                = 1
	CLOCK_PROCESS_CPUTIME_ID                                                       = 2
	CLOCK_REALTIME                                                                 = 0
	CLOCK_THREAD_CPUTIME_ID                                                        = 3
	CLOSECHANNEL                                                                   = 4112
	CLRBREAK                                                                       = 9
	CLRDTR                                                                         = 6
	CLRRTS                                                                         = 4
	CLR_INVALID                                                                    = 0xFFFFFFFF
	CLSID_DEFINED                                                                  = 0
	CMD_COMPILES_EXPANDED                                                          = 0x08
	CMD_DEAD                                                                       = 0x40
	CMD_HAS_EXEC_TRACES                                                            = 0x04
	CMD_IS_DELETED                                                                 = 0x01
	CMD_REDEF_IN_PROGRESS                                                          = 0x10
	CMD_TRACE_ACTIVE                                                               = 0x02
	CMD_VIA_RESOLVER                                                               = 0x20
	CM_CMYK_COLOR                                                                  = 0x00000004
	CM_DEVICE_ICM                                                                  = 0x00000001
	CM_GAMMA_RAMP                                                                  = 0x00000002
	CM_IN_GAMUT                                                                    = 0
	CM_NONE                                                                        = 0x00000000
	CM_OUT_OF_GAMUT                                                                = 255
	CM_SERVICE_MEASURED_BOOT_LOAD                                                  = 0x00000020
	CM_SERVICE_NETWORK_BOOT_LOAD                                                   = 0x00000001
	CM_SERVICE_SD_DISK_BOOT_LOAD                                                   = 0x00000008
	CM_SERVICE_USB3_DISK_BOOT_LOAD                                                 = 0x00000010
	CM_SERVICE_USB_DISK_BOOT_LOAD                                                  = 0x00000004
	CM_SERVICE_VALID_PROMOTION_MASK                                                = 255
	CM_SERVICE_VERIFIER_BOOT_LOAD                                                  = 0x00000040
	CM_SERVICE_VIRTUAL_DISK_BOOT_LOAD                                              = 0x00000002
	CM_SERVICE_WINPE_BOOT_LOAD                                                     = 0x00000080
	COLORMATCHTOTARGET_EMBEDED                                                     = 0x00000001
	COLORMGMTCAPS                                                                  = 121
	COLORONCOLOR                                                                   = 3
	COLORRES                                                                       = 108
	COLOR_3DDKSHADOW                                                               = 21
	COLOR_3DFACE                                                                   = 15
	COLOR_3DHIGHLIGHT                                                              = 20
	COLOR_3DHILIGHT                                                                = 20
	COLOR_3DLIGHT                                                                  = 22
	COLOR_3DSHADOW                                                                 = 16
	COLOR_ACTIVEBORDER                                                             = 10
	COLOR_ACTIVECAPTION                                                            = 2
	COLOR_APPWORKSPACE                                                             = 12
	COLOR_BACKGROUND                                                               = 1
	COLOR_BTNFACE                                                                  = 15
	COLOR_BTNHIGHLIGHT                                                             = 20
	COLOR_BTNHILIGHT                                                               = 20
	COLOR_BTNSHADOW                                                                = 16
	COLOR_BTNTEXT                                                                  = 18
	COLOR_CAPTIONTEXT                                                              = 9
	COLOR_DESKTOP                                                                  = 1
	COLOR_GRADIENTACTIVECAPTION                                                    = 27
	COLOR_GRADIENTINACTIVECAPTION                                                  = 28
	COLOR_GRAYTEXT                                                                 = 17
	COLOR_HIGHLIGHT                                                                = 13
	COLOR_HIGHLIGHTTEXT                                                            = 14
	COLOR_HOTLIGHT                                                                 = 26
	COLOR_INACTIVEBORDER                                                           = 11
	COLOR_INACTIVECAPTION                                                          = 3
	COLOR_INACTIVECAPTIONTEXT                                                      = 19
	COLOR_INFOBK                                                                   = 24
	COLOR_INFOTEXT                                                                 = 23
	COLOR_MENU                                                                     = 4
	COLOR_MENUBAR                                                                  = 30
	COLOR_MENUHILIGHT                                                              = 29
	COLOR_MENUTEXT                                                                 = 7
	COLOR_SCROLLBAR                                                                = 0
	COLOR_WINDOW                                                                   = 5
	COLOR_WINDOWFRAME                                                              = 6
	COLOR_WINDOWTEXT                                                               = 8
	COMMON_LVB_GRID_HORIZONTAL                                                     = 0x400
	COMMON_LVB_GRID_LVERTICAL                                                      = 0x800
	COMMON_LVB_GRID_RVERTICAL                                                      = 0x1000
	COMMON_LVB_LEADING_BYTE                                                        = 0x100
	COMMON_LVB_REVERSE_VIDEO                                                       = 0x4000
	COMMON_LVB_SBCSDBCS                                                            = 0x300
	COMMON_LVB_TRAILING_BYTE                                                       = 0x200
	COMMON_LVB_UNDERSCORE                                                          = 0x8000
	COMPLEXREGION                                                                  = 3
	COMPRESSION_ENGINE_HIBER                                                       = 512
	COMPRESSION_ENGINE_MAXIMUM                                                     = 256
	COMPRESSION_ENGINE_STANDARD                                                    = 0
	COMPRESSION_FORMAT_DEFAULT                                                     = 1
	COMPRESSION_FORMAT_LZNT1                                                       = 2
	COMPRESSION_FORMAT_NONE                                                        = 0
	COMPRESSION_FORMAT_XPRESS                                                      = 3
	COMPRESSION_FORMAT_XPRESS_HUFF                                                 = 4
	CONCURRENCYSAL_HXX                                                             = 0
	CONDITION_VARIABLE_LOCKMODE_SHARED                                             = 1
	CONNDLG_CONN_POINT                                                             = 0x00000002
	CONNDLG_HIDE_BOX                                                               = 0x00000008
	CONNDLG_NOT_PERSIST                                                            = 0x00000020
	CONNDLG_PERSIST                                                                = 0x00000010
	CONNDLG_RO_PATH                                                                = 0x00000001
	CONNDLG_USE_MRU                                                                = 0x00000004
	CONNECT_CMD_SAVECRED                                                           = 0x00001000
	CONNECT_COMMANDLINE                                                            = 0x00000800
	CONNECT_CURRENT_MEDIA                                                          = 0x00000200
	CONNECT_DEFERRED                                                               = 0x00000400
	CONNECT_INTERACTIVE                                                            = 0x00000008
	CONNECT_LOCALDRIVE                                                             = 0x00000100
	CONNECT_NEED_DRIVE                                                             = 0x00000020
	CONNECT_PROMPT                                                                 = 0x00000010
	CONNECT_REDIRECT                                                               = 0x00000080
	CONNECT_REFCOUNT                                                               = 0x00000040
	CONNECT_RESERVED                                                               = 0xFF000000
	CONNECT_TEMPORARY                                                              = 0x00000004
	CONNECT_UPDATE_PROFILE                                                         = 0x00000001
	CONNECT_UPDATE_RECENT                                                          = 0x00000002
	CONSOLE_APPLICATION_16BIT                                                      = 0x0000
	CONSOLE_CARET_SELECTION                                                        = 0x0001
	CONSOLE_CARET_VISIBLE                                                          = 0x0002
	CONSOLE_FULLSCREEN                                                             = 1
	CONSOLE_FULLSCREEN_HARDWARE                                                    = 2
	CONSOLE_FULLSCREEN_MODE                                                        = 1
	CONSOLE_MOUSE_DOWN                                                             = 0x8
	CONSOLE_MOUSE_SELECTION                                                        = 0x4
	CONSOLE_NO_SELECTION                                                           = 0x0
	CONSOLE_SELECTION_IN_PROGRESS                                                  = 0x1
	CONSOLE_SELECTION_NOT_EMPTY                                                    = 0x2
	CONSOLE_TEXTMODE_BUFFER                                                        = 1
	CONSOLE_WINDOWED_MODE                                                          = 2
	CONTAINER_INHERIT_ACE                                                          = 2
	CONTEXT_ALL                                                                    = 1048607
	CONTEXT_AMD64                                                                  = 0x100000
	CONTEXT_CONTROL                                                                = 1048577
	CONTEXT_DEBUG_REGISTERS                                                        = 1048592
	CONTEXT_EXCEPTION_ACTIVE                                                       = 0x8000000
	CONTEXT_EXCEPTION_REPORTING                                                    = 0x80000000
	CONTEXT_EXCEPTION_REQUEST                                                      = 0x40000000
	CONTEXT_E_FIRST                                                                = 2147803136
	CONTEXT_E_LAST                                                                 = 2147803183
	CONTEXT_FLOATING_POINT                                                         = 1048584
	CONTEXT_FULL                                                                   = 1048587
	CONTEXT_INTEGER                                                                = 1048578
	CONTEXT_SEGMENTS                                                               = 1048580
	CONTEXT_SERVICE_ACTIVE                                                         = 0x10000000
	CONTEXT_S_FIRST                                                                = 319488
	CONTEXT_S_LAST                                                                 = 319535
	CONVERT10_E_FIRST                                                              = 2147746240
	CONVERT10_E_LAST                                                               = 2147746255
	CONVERT10_S_FIRST                                                              = 262592
	CONVERT10_S_LAST                                                               = 262607
	COPY_FILE_ALLOW_DECRYPTED_DESTINATION                                          = 0x8
	COPY_FILE_FAIL_IF_EXISTS                                                       = 0x1
	COPY_FILE_OPEN_SOURCE_FOR_WRITE                                                = 0x4
	COPY_FILE_RESTARTABLE                                                          = 0x2
	CORE_PARKING_POLICY_CHANGE_IDEAL                                               = 0
	CORE_PARKING_POLICY_CHANGE_MAX                                                 = 3
	CORE_PARKING_POLICY_CHANGE_MULTISTEP                                           = 3
	CORE_PARKING_POLICY_CHANGE_ROCKET                                              = 2
	CORE_PARKING_POLICY_CHANGE_SINGLE                                              = 1
	CO_E_FIRST                                                                     = 2147746288
	CO_E_LAST                                                                      = 2147746303
	CO_S_FIRST                                                                     = 262640
	CO_S_LAST                                                                      = 262655
	CPS_CANCEL                                                                     = 0x0004
	CPS_COMPLETE                                                                   = 0x0001
	CPS_CONVERT                                                                    = 0x0002
	CPS_REVERT                                                                     = 0x0003
	CP_ACP                                                                         = 0
	CP_INSTALLED                                                                   = 0x00000001
	CP_MACCP                                                                       = 2
	CP_NONE                                                                        = 0
	CP_OEMCP                                                                       = 1
	CP_RECTANGLE                                                                   = 1
	CP_REGION                                                                      = 2
	CP_SUPPORTED                                                                   = 0x00000002
	CP_SYMBOL                                                                      = 42
	CP_THREAD_ACP                                                                  = 3
	CP_UTF7                                                                        = 65000
	CP_UTF8                                                                        = 65001
	CREATECOLORSPACE_EMBEDED                                                       = 0x00000001
	CREATE_ALWAYS                                                                  = 2
	CREATE_BOUNDARY_DESCRIPTOR_ADD_APPCONTAINER_SID                                = 0x1
	CREATE_BREAKAWAY_FROM_JOB                                                      = 0x1000000
	CREATE_DEFAULT_ERROR_MODE                                                      = 0x4000000
	CREATE_FORCEDOS                                                                = 0x2000
	CREATE_FOR_DIR                                                                 = 2
	CREATE_FOR_IMPORT                                                              = 1
	CREATE_IGNORE_SYSTEM_DEFAULT                                                   = 0x80000000
	CREATE_NEW                                                                     = 1
	CREATE_NEW_CONSOLE                                                             = 0x10
	CREATE_NEW_PROCESS_GROUP                                                       = 0x200
	CREATE_NO_WINDOW                                                               = 0x8000000
	CREATE_PRESERVE_CODE_AUTHZ_LEVEL                                               = 0x2000000
	CREATE_PROCESS_DEBUG_EVENT                                                     = 3
	CREATE_PROTECTED_PROCESS                                                       = 0x40000
	CREATE_SEPARATE_WOW_VDM                                                        = 0x800
	CREATE_SHARED_WOW_VDM                                                          = 0x1000
	CREATE_SUSPENDED                                                               = 0x4
	CREATE_THREAD_DEBUG_EVENT                                                      = 2
	CREATE_UNICODE_ENVIRONMENT                                                     = 0x400
	CRITICAL_SECTION_NO_DEBUG_INFO                                                 = 16777216
	CRM_PROTOCOL_DYNAMIC_MARSHAL_INFO                                              = 0x00000002
	CRM_PROTOCOL_EXPLICIT_MARSHAL_ONLY                                             = 0x00000001
	CRM_PROTOCOL_MAXIMUM_OPTION                                                    = 0x00000003
	CSOUND_SYSTEM                                                                  = 16
	CSTR_EQUAL                                                                     = 2
	CSTR_GREATER_THAN                                                              = 3
	CSTR_LESS_THAN                                                                 = 1
	CS_BYTEALIGNCLIENT                                                             = 0x1000
	CS_BYTEALIGNWINDOW                                                             = 0x2000
	CS_CLASSDC                                                                     = 0x0040
	CS_DBLCLKS                                                                     = 0x0008
	CS_DELETE_TRANSFORM                                                            = 3
	CS_DISABLE                                                                     = 2
	CS_DROPSHADOW                                                                  = 0x00020000
	CS_ENABLE                                                                      = 1
	CS_E_FIRST                                                                     = 2147746148
	CS_E_LAST                                                                      = 2147746159
	CS_GLOBALCLASS                                                                 = 0x4000
	CS_HREDRAW                                                                     = 0x0002
	CS_IME                                                                         = 0x00010000
	CS_INSERTCHAR                                                                  = 0x2000
	CS_NOCLOSE                                                                     = 0x0200
	CS_NOMOVECARET                                                                 = 0x4000
	CS_OWNDC                                                                       = 0x0020
	CS_PARENTDC                                                                    = 0x0080
	CS_SAVEBITS                                                                    = 0x0800
	CS_VREDRAW                                                                     = 0x0001
	CTLCOLOR_BTN                                                                   = 3
	CTLCOLOR_DLG                                                                   = 4
	CTLCOLOR_EDIT                                                                  = 1
	CTLCOLOR_LISTBOX                                                               = 2
	CTLCOLOR_MAX                                                                   = 7
	CTLCOLOR_MSGBOX                                                                = 0
	CTLCOLOR_SCROLLBAR                                                             = 5
	CTLCOLOR_STATIC                                                                = 6
	CTRL_BREAK_EVENT                                                               = 1
	CTRL_CLOSE_EVENT                                                               = 2
	CTRL_C_EVENT                                                                   = 0
	CTRL_LOGOFF_EVENT                                                              = 5
	CTRL_SHUTDOWN_EVENT                                                            = 6
	CTRY_ALBANIA                                                                   = 355
	CTRY_ALGERIA                                                                   = 213
	CTRY_ARGENTINA                                                                 = 54
	CTRY_ARMENIA                                                                   = 374
	CTRY_AUSTRALIA                                                                 = 61
	CTRY_AUSTRIA                                                                   = 43
	CTRY_AZERBAIJAN                                                                = 994
	CTRY_BAHRAIN                                                                   = 973
	CTRY_BELARUS                                                                   = 375
	CTRY_BELGIUM                                                                   = 32
	CTRY_BELIZE                                                                    = 501
	CTRY_BOLIVIA                                                                   = 591
	CTRY_BRAZIL                                                                    = 55
	CTRY_BRUNEI_DARUSSALAM                                                         = 673
	CTRY_BULGARIA                                                                  = 359
	CTRY_CANADA                                                                    = 2
	CTRY_CARIBBEAN                                                                 = 1
	CTRY_CHILE                                                                     = 56
	CTRY_COLOMBIA                                                                  = 57
	CTRY_COSTA_RICA                                                                = 506
	CTRY_CROATIA                                                                   = 385
	CTRY_CZECH                                                                     = 420
	CTRY_DEFAULT                                                                   = 0
	CTRY_DENMARK                                                                   = 45
	CTRY_DOMINICAN_REPUBLIC                                                        = 1
	CTRY_ECUADOR                                                                   = 593
	CTRY_EGYPT                                                                     = 20
	CTRY_EL_SALVADOR                                                               = 503
	CTRY_ESTONIA                                                                   = 372
	CTRY_FAEROE_ISLANDS                                                            = 298
	CTRY_FINLAND                                                                   = 358
	CTRY_FRANCE                                                                    = 33
	CTRY_GEORGIA                                                                   = 995
	CTRY_GERMANY                                                                   = 49
	CTRY_GREECE                                                                    = 30
	CTRY_GUATEMALA                                                                 = 502
	CTRY_HONDURAS                                                                  = 504
	CTRY_HONG_KONG                                                                 = 852
	CTRY_HUNGARY                                                                   = 36
	CTRY_ICELAND                                                                   = 354
	CTRY_INDIA                                                                     = 91
	CTRY_INDONESIA                                                                 = 62
	CTRY_IRAN                                                                      = 981
	CTRY_IRAQ                                                                      = 964
	CTRY_IRELAND                                                                   = 353
	CTRY_ISRAEL                                                                    = 972
	CTRY_ITALY                                                                     = 39
	CTRY_JAMAICA                                                                   = 1
	CTRY_JAPAN                                                                     = 81
	CTRY_JORDAN                                                                    = 962
	CTRY_KAZAKSTAN                                                                 = 7
	CTRY_KENYA                                                                     = 254
	CTRY_KUWAIT                                                                    = 965
	CTRY_KYRGYZSTAN                                                                = 996
	CTRY_LATVIA                                                                    = 371
	CTRY_LEBANON                                                                   = 961
	CTRY_LIBYA                                                                     = 218
	CTRY_LIECHTENSTEIN                                                             = 41
	CTRY_LITHUANIA                                                                 = 370
	CTRY_LUXEMBOURG                                                                = 352
	CTRY_MACAU                                                                     = 853
	CTRY_MACEDONIA                                                                 = 389
	CTRY_MALAYSIA                                                                  = 60
	CTRY_MALDIVES                                                                  = 960
	CTRY_MEXICO                                                                    = 52
	CTRY_MONACO                                                                    = 33
	CTRY_MONGOLIA                                                                  = 976
	CTRY_MOROCCO                                                                   = 212
	CTRY_NETHERLANDS                                                               = 31
	CTRY_NEW_ZEALAND                                                               = 64
	CTRY_NICARAGUA                                                                 = 505
	CTRY_NORWAY                                                                    = 47
	CTRY_OMAN                                                                      = 968
	CTRY_PAKISTAN                                                                  = 92
	CTRY_PANAMA                                                                    = 507
	CTRY_PARAGUAY                                                                  = 595
	CTRY_PERU                                                                      = 51
	CTRY_PHILIPPINES                                                               = 63
	CTRY_POLAND                                                                    = 48
	CTRY_PORTUGAL                                                                  = 351
	CTRY_PRCHINA                                                                   = 86
	CTRY_PUERTO_RICO                                                               = 1
	CTRY_QATAR                                                                     = 974
	CTRY_ROMANIA                                                                   = 40
	CTRY_RUSSIA                                                                    = 7
	CTRY_SAUDI_ARABIA                                                              = 966
	CTRY_SERBIA                                                                    = 381
	CTRY_SINGAPORE                                                                 = 65
	CTRY_SLOVAK                                                                    = 421
	CTRY_SLOVENIA                                                                  = 386
	CTRY_SOUTH_AFRICA                                                              = 27
	CTRY_SOUTH_KOREA                                                               = 82
	CTRY_SPAIN                                                                     = 34
	CTRY_SWEDEN                                                                    = 46
	CTRY_SWITZERLAND                                                               = 41
	CTRY_SYRIA                                                                     = 963
	CTRY_TAIWAN                                                                    = 886
	CTRY_TATARSTAN                                                                 = 7
	CTRY_THAILAND                                                                  = 66
	CTRY_TRINIDAD_Y_TOBAGO                                                         = 1
	CTRY_TUNISIA                                                                   = 216
	CTRY_TURKEY                                                                    = 90
	CTRY_UAE                                                                       = 971
	CTRY_UKRAINE                                                                   = 380
	CTRY_UNITED_KINGDOM                                                            = 44
	CTRY_UNITED_STATES                                                             = 1
	CTRY_URUGUAY                                                                   = 598
	CTRY_UZBEKISTAN                                                                = 7
	CTRY_VENEZUELA                                                                 = 58
	CTRY_VIET_NAM                                                                  = 84
	CTRY_YEMEN                                                                     = 967
	CTRY_ZIMBABWE                                                                  = 263
	CT_CTYPE1                                                                      = 0x00000001
	CT_CTYPE2                                                                      = 0x00000002
	CT_CTYPE3                                                                      = 0x00000004
	CURRENT_IMPORT_REDIRECTION_VERSION                                             = 1
	CURSOR_SHOWING                                                                 = 0x00000001
	CURVECAPS                                                                      = 28
	CWF_CREATE_ONLY                                                                = 0x00000001
	CWP_ALL                                                                        = 0x0000
	CWP_SKIPDISABLED                                                               = 0x0002
	CWP_SKIPINVISIBLE                                                              = 0x0001
	CWP_SKIPTRANSPARENT                                                            = 0x0004
	CW_DEFAULT                                                                     = 524319
	DACL_SECURITY_INFORMATION                                                      = 4
	DATA_E_FIRST                                                                   = 2147746096
	DATA_E_LAST                                                                    = 2147746111
	DATA_S_FIRST                                                                   = 262448
	DATA_S_LAST                                                                    = 262463
	DATE_LONGDATE                                                                  = 0x00000002
	DATE_LTRREADING                                                                = 0x00000010
	DATE_RTLREADING                                                                = 0x00000020
	DATE_SHORTDATE                                                                 = 0x00000001
	DATE_USE_ALT_CALENDAR                                                          = 0x00000004
	DATE_YEARMONTH                                                                 = 0x00000008
	DBL_DECIMAL_DIG                                                                = 17
	DBL_DIG                                                                        = 15
	DBL_HAS_SUBNORM                                                                = 1
	DBL_MANT_DIG                                                                   = 53
	DBL_MAX_10_EXP                                                                 = 308
	DBL_MAX_EXP                                                                    = 1024
	DBL_MIN_10_EXP                                                                 = -307
	DBL_MIN_EXP                                                                    = -1021
	DCBA_FACEDOWNCENTER                                                            = 0x0101
	DCBA_FACEDOWNLEFT                                                              = 0x0102
	DCBA_FACEDOWNNONE                                                              = 0x0100
	DCBA_FACEDOWNRIGHT                                                             = 0x0103
	DCBA_FACEUPCENTER                                                              = 0x0001
	DCBA_FACEUPLEFT                                                                = 0x0002
	DCBA_FACEUPNONE                                                                = 0x0000
	DCBA_FACEUPRIGHT                                                               = 0x0003
	DCB_ACCUMULATE                                                                 = 0x0002
	DCB_DIRTY                                                                      = 2
	DCB_DISABLE                                                                    = 0x0008
	DCB_ENABLE                                                                     = 0x0004
	DCB_RESET                                                                      = 0x0001
	DCB_SET                                                                        = 3
	DCTT_BITMAP                                                                    = 1
	DCTT_DOWNLOAD                                                                  = 2
	DCTT_DOWNLOAD_OUTLINE                                                          = 8
	DCTT_SUBDEV                                                                    = 4
	DCX_CACHE                                                                      = 2
	DCX_CLIPCHILDREN                                                               = 8
	DCX_CLIPSIBLINGS                                                               = 16
	DCX_EXCLUDERGN                                                                 = 64
	DCX_EXCLUDEUPDATE                                                              = 256
	DCX_INTERSECTRGN                                                               = 128
	DCX_INTERSECTUPDATE                                                            = 512
	DCX_LOCKWINDOWUPDATE                                                           = 1024
	DCX_NORESETATTRS                                                               = 4
	DCX_PARENTCLIP                                                                 = 32
	DCX_VALIDATE                                                                   = 2097152
	DCX_WINDOW                                                                     = 1
	DC_ACTIVE                                                                      = 0x0001
	DC_BINADJUST                                                                   = 19
	DC_BINNAMES                                                                    = 12
	DC_BINS                                                                        = 6
	DC_BRUSH                                                                       = 18
	DC_BUTTONS                                                                     = 0x1000
	DC_COLLATE                                                                     = 22
	DC_COLORDEVICE                                                                 = 32
	DC_COPIES                                                                      = 18
	DC_DATATYPE_PRODUCED                                                           = 21
	DC_DRIVER                                                                      = 11
	DC_DUPLEX                                                                      = 7
	DC_EMF_COMPLIANT                                                               = 20
	DC_ENUMRESOLUTIONS                                                             = 13
	DC_EXTRA                                                                       = 9
	DC_FIELDS                                                                      = 1
	DC_FILEDEPENDENCIES                                                            = 14
	DC_GRADIENT                                                                    = 0x0020
	DC_HASDEFID                                                                    = 0x534B
	DC_ICON                                                                        = 0x0004
	DC_INBUTTON                                                                    = 0x0010
	DC_MANUFACTURER                                                                = 23
	DC_MAXEXTENT                                                                   = 5
	DC_MEDIAREADY                                                                  = 29
	DC_MEDIATYPENAMES                                                              = 34
	DC_MEDIATYPES                                                                  = 35
	DC_MINEXTENT                                                                   = 4
	DC_MODEL                                                                       = 24
	DC_NUP                                                                         = 33
	DC_ORIENTATION                                                                 = 17
	DC_PAPERNAMES                                                                  = 16
	DC_PAPERS                                                                      = 2
	DC_PAPERSIZE                                                                   = 3
	DC_PEN                                                                         = 19
	DC_PERSONALITY                                                                 = 25
	DC_PRINTERMEM                                                                  = 28
	DC_PRINTRATE                                                                   = 26
	DC_PRINTRATEPPM                                                                = 31
	DC_PRINTRATEUNIT                                                               = 27
	DC_SIZE                                                                        = 8
	DC_SMALLCAP                                                                    = 0x0002
	DC_STAPLE                                                                      = 30
	DC_TEXT                                                                        = 0x0008
	DC_TRUETYPE                                                                    = 15
	DC_VERSION                                                                     = 10
	DDD_EXACT_MATCH_ON_REMOVE                                                      = 0x00000004
	DDD_LUID_BROADCAST_DRIVE                                                       = 0x00000010
	DDD_NO_BROADCAST_SYSTEM                                                        = 0x00000008
	DDD_RAW_TARGET_PATH                                                            = 0x00000001
	DDD_REMOVE_DEFINITION                                                          = 0x00000002
	DDL_ARCHIVE                                                                    = 0x0020
	DDL_DIRECTORY                                                                  = 0x0010
	DDL_DRIVES                                                                     = 0x4000
	DDL_EXCLUSIVE                                                                  = 0x8000
	DDL_HIDDEN                                                                     = 0x0002
	DDL_POSTMSGS                                                                   = 0x2000
	DDL_READONLY                                                                   = 0x0001
	DDL_READWRITE                                                                  = 0x0000
	DDL_SYSTEM                                                                     = 0x0004
	DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION                                = 1
	DEBUG_ONLY_THIS_PROCESS                                                        = 0x2
	DEBUG_PROCESS                                                                  = 0x1
	DECIMAL_DIG                                                                    = 21
	DECLSPEC_ADDRSAFE                                                              = 0
	DECLSPEC_DEPRECATED_DDK                                                        = 0
	DECLSPEC_NOVTABLE                                                              = 0
	DEFAULT_CHARSET                                                                = 1
	DEFAULT_GUI_FONT                                                               = 17
	DEFAULT_PALETTE                                                                = 15
	DEFAULT_PITCH                                                                  = 0
	DEFAULT_QUALITY                                                                = 0
	DEFAULT_UNREACHABLE                                                            = 0
	DEFINED_LPUINT                                                                 = 0
	DELETE                                                                         = 65536
	DELETED                                                                        = 1
	DEPRECATE_SUPPORTED                                                            = 0
	DESKTOPHORZRES                                                                 = 118
	DESKTOPVERTRES                                                                 = 117
	DESKTOP_CREATEMENU                                                             = 4
	DESKTOP_CREATEWINDOW                                                           = 2
	DESKTOP_ENUMERATE                                                              = 64
	DESKTOP_HOOKCONTROL                                                            = 8
	DESKTOP_JOURNALPLAYBACK                                                        = 32
	DESKTOP_JOURNALRECORD                                                          = 16
	DESKTOP_READOBJECTS                                                            = 1
	DESKTOP_SWITCHDESKTOP                                                          = 256
	DESKTOP_WRITEOBJECTS                                                           = 128
	DETACHED_PROCESS                                                               = 0x8
	DEVICEDATA                                                                     = 19
	DEVICE_DEFAULT_FONT                                                            = 14
	DEVICE_FONTTYPE                                                                = 0x002
	DEVICE_NOTIFY_ALL_INTERFACE_CLASSES                                            = 0x00000004
	DEVICE_NOTIFY_SERVICE_HANDLE                                                   = 0x00000001
	DEVICE_NOTIFY_WINDOW_HANDLE                                                    = 0x00000000
	DFCS_ADJUSTRECT                                                                = 0x2000
	DFCS_BUTTON3STATE                                                              = 0x0008
	DFCS_BUTTONCHECK                                                               = 0x0000
	DFCS_BUTTONPUSH                                                                = 0x0010
	DFCS_BUTTONRADIO                                                               = 0x0004
	DFCS_BUTTONRADIOIMAGE                                                          = 0x0001
	DFCS_BUTTONRADIOMASK                                                           = 0x0002
	DFCS_CAPTIONCLOSE                                                              = 0x0000
	DFCS_CAPTIONHELP                                                               = 0x0004
	DFCS_CAPTIONMAX                                                                = 0x0002
	DFCS_CAPTIONMIN                                                                = 0x0001
	DFCS_CAPTIONRESTORE                                                            = 0x0003
	DFCS_CHECKED                                                                   = 0x0400
	DFCS_FLAT                                                                      = 0x4000
	DFCS_HOT                                                                       = 0x1000
	DFCS_INACTIVE                                                                  = 0x0100
	DFCS_MENUARROW                                                                 = 0x0000
	DFCS_MENUARROWRIGHT                                                            = 0x0004
	DFCS_MENUBULLET                                                                = 0x0002
	DFCS_MENUCHECK                                                                 = 0x0001
	DFCS_MONO                                                                      = 0x8000
	DFCS_PUSHED                                                                    = 0x0200
	DFCS_SCROLLCOMBOBOX                                                            = 0x0005
	DFCS_SCROLLDOWN                                                                = 0x0001
	DFCS_SCROLLLEFT                                                                = 0x0002
	DFCS_SCROLLRIGHT                                                               = 0x0003
	DFCS_SCROLLSIZEGRIP                                                            = 0x0008
	DFCS_SCROLLSIZEGRIPRIGHT                                                       = 0x0010
	DFCS_SCROLLUP                                                                  = 0x0000
	DFCS_TRANSPARENT                                                               = 0x0800
	DFC_BUTTON                                                                     = 4
	DFC_CAPTION                                                                    = 1
	DFC_MENU                                                                       = 2
	DFC_POPUPMENU                                                                  = 5
	DFC_SCROLL                                                                     = 3
	DF_ALLOWOTHERACCOUNTHOOK                                                       = 1
	DIAGNOSTIC_REASON_DETAILED_STRING                                              = 0x00000002
	DIAGNOSTIC_REASON_INVALID_FLAGS                                                = -2147483652
	DIAGNOSTIC_REASON_NOT_SPECIFIED                                                = 0x80000000
	DIAGNOSTIC_REASON_SIMPLE_STRING                                                = 0x00000001
	DIAGNOSTIC_REASON_VERSION                                                      = 0
	DIALOPTION_BILLING                                                             = 0x00000040
	DIALOPTION_DIALTONE                                                            = 0x00000100
	DIALOPTION_QUIET                                                               = 0x00000080
	DIB_PAL_COLORS                                                                 = 1
	DIB_RGB_COLORS                                                                 = 0
	DICT_PATH_CREATE                                                               = 5
	DICT_PATH_EXISTS                                                               = 2
	DICT_PATH_READ                                                                 = 0
	DICT_PATH_UPDATE                                                               = 1
	DIFFERENCE                                                                     = 11
	DIGIT_BIT                                                                      = 28
	DISABLE_MAX_PRIVILEGE                                                          = 0x1
	DISABLE_NEWLINE_AUTO_RETURN                                                    = 0x8
	DISCHARGE_POLICY_CRITICAL                                                      = 0
	DISCHARGE_POLICY_LOW                                                           = 1
	DISC_NO_FORCE                                                                  = 0x00000040
	DISC_UPDATE_PROFILE                                                            = 0x00000001
	DISPLAY_DEVICE_ACTIVE                                                          = 0x00000001
	DISPLAY_DEVICE_ATTACHED                                                        = 0x00000002
	DISPLAY_DEVICE_ATTACHED_TO_DESKTOP                                             = 0x00000001
	DISPLAY_DEVICE_DISCONNECT                                                      = 0x02000000
	DISPLAY_DEVICE_MIRRORING_DRIVER                                                = 0x00000008
	DISPLAY_DEVICE_MODESPRUNED                                                     = 0x08000000
	DISPLAY_DEVICE_MULTI_DRIVER                                                    = 0x00000002
	DISPLAY_DEVICE_PRIMARY_DEVICE                                                  = 0x00000004
	DISPLAY_DEVICE_RDPUDD                                                          = 0x01000000
	DISPLAY_DEVICE_REMOTE                                                          = 0x04000000
	DISPLAY_DEVICE_REMOVABLE                                                       = 0x00000020
	DISPLAY_DEVICE_TS_COMPATIBLE                                                   = 0x00200000
	DISPLAY_DEVICE_VGA_COMPATIBLE                                                  = 0x00000010
	DISP_CHANGE_BADDUALVIEW                                                        = -6
	DISP_CHANGE_BADFLAGS                                                           = -4
	DISP_CHANGE_BADMODE                                                            = -2
	DISP_CHANGE_BADPARAM                                                           = -5
	DISP_CHANGE_FAILED                                                             = -1
	DISP_CHANGE_NOTUPDATED                                                         = -3
	DISP_CHANGE_RESTART                                                            = 1
	DISP_CHANGE_SUCCESSFUL                                                         = 0
	DI_APPBANDING                                                                  = 0x00000001
	DI_COMPAT                                                                      = 0x0004
	DI_DEFAULTSIZE                                                                 = 0x0008
	DI_IMAGE                                                                       = 0x0002
	DI_MASK                                                                        = 0x0001
	DI_NOMIRROR                                                                    = 0x0010
	DI_NORMAL                                                                      = 0x0003
	DI_ROPS_READ_DESTINATION                                                       = 0x00000002
	DKGRAY_BRUSH                                                                   = 3
	DLGC_BUTTON                                                                    = 0x2000
	DLGC_DEFPUSHBUTTON                                                             = 0x0010
	DLGC_HASSETSEL                                                                 = 0x0008
	DLGC_RADIOBUTTON                                                               = 0x0040
	DLGC_STATIC                                                                    = 0x0100
	DLGC_UNDEFPUSHBUTTON                                                           = 0x0020
	DLGC_WANTALLKEYS                                                               = 0x0004
	DLGC_WANTARROWS                                                                = 0x0001
	DLGC_WANTCHARS                                                                 = 0x0080
	DLGC_WANTMESSAGE                                                               = 0x0004
	DLGC_WANTTAB                                                                   = 0x0002
	DLGWINDOWEXTRA                                                                 = 30
	DLLEXPORT                                                                      = 0
	DLLIMPORT                                                                      = 0
	DLL_PROCESS_ATTACH                                                             = 1
	DLL_PROCESS_DETACH                                                             = 0
	DLL_PROCESS_VERIFIER                                                           = 4
	DLL_THREAD_ATTACH                                                              = 2
	DLL_THREAD_DETACH                                                              = 3
	DMBIN_AUTO                                                                     = 7
	DMBIN_CASSETTE                                                                 = 14
	DMBIN_ENVELOPE                                                                 = 5
	DMBIN_ENVMANUAL                                                                = 6
	DMBIN_FIRST                                                                    = 1
	DMBIN_FORMSOURCE                                                               = 15
	DMBIN_LARGECAPACITY                                                            = 11
	DMBIN_LARGEFMT                                                                 = 10
	DMBIN_LAST                                                                     = 15
	DMBIN_LOWER                                                                    = 2
	DMBIN_MANUAL                                                                   = 4
	DMBIN_MIDDLE                                                                   = 3
	DMBIN_ONLYONE                                                                  = 1
	DMBIN_SMALLFMT                                                                 = 9
	DMBIN_TRACTOR                                                                  = 8
	DMBIN_UPPER                                                                    = 1
	DMBIN_USER                                                                     = 256
	DMCOLLATE_FALSE                                                                = 0
	DMCOLLATE_TRUE                                                                 = 1
	DMCOLOR_COLOR                                                                  = 2
	DMCOLOR_MONOCHROME                                                             = 1
	DMDFO_CENTER                                                                   = 2
	DMDFO_DEFAULT                                                                  = 0
	DMDFO_STRETCH                                                                  = 1
	DMDISPLAYFLAGS_TEXTMODE                                                        = 0x00000004
	DMDITHER_COARSE                                                                = 2
	DMDITHER_ERRORDIFFUSION                                                        = 5
	DMDITHER_FINE                                                                  = 3
	DMDITHER_GRAYSCALE                                                             = 10
	DMDITHER_LINEART                                                               = 4
	DMDITHER_NONE                                                                  = 1
	DMDITHER_RESERVED6                                                             = 6
	DMDITHER_RESERVED7                                                             = 7
	DMDITHER_RESERVED8                                                             = 8
	DMDITHER_RESERVED9                                                             = 9
	DMDITHER_USER                                                                  = 256
	DMDO_180                                                                       = 2
	DMDO_270                                                                       = 3
	DMDO_90                                                                        = 1
	DMDO_DEFAULT                                                                   = 0
	DMDUP_HORIZONTAL                                                               = 3
	DMDUP_SIMPLEX                                                                  = 1
	DMDUP_VERTICAL                                                                 = 2
	DMICMMETHOD_DEVICE                                                             = 4
	DMICMMETHOD_DRIVER                                                             = 3
	DMICMMETHOD_NONE                                                               = 1
	DMICMMETHOD_SYSTEM                                                             = 2
	DMICMMETHOD_USER                                                               = 256
	DMICM_ABS_COLORIMETRIC                                                         = 4
	DMICM_COLORIMETRIC                                                             = 3
	DMICM_CONTRAST                                                                 = 2
	DMICM_SATURATE                                                                 = 1
	DMICM_USER                                                                     = 256
	DMMEDIA_GLOSSY                                                                 = 3
	DMMEDIA_STANDARD                                                               = 1
	DMMEDIA_TRANSPARENCY                                                           = 2
	DMMEDIA_USER                                                                   = 256
	DMNUP_ONEUP                                                                    = 2
	DMNUP_SYSTEM                                                                   = 1
	DMORIENT_LANDSCAPE                                                             = 2
	DMORIENT_PORTRAIT                                                              = 1
	DMPAPER_10X11                                                                  = 45
	DMPAPER_10X14                                                                  = 16
	DMPAPER_11X17                                                                  = 17
	DMPAPER_12X11                                                                  = 90
	DMPAPER_15X11                                                                  = 46
	DMPAPER_9X11                                                                   = 44
	DMPAPER_A2                                                                     = 66
	DMPAPER_A3                                                                     = 8
	DMPAPER_A3_EXTRA                                                               = 63
	DMPAPER_A3_EXTRA_TRANSVERSE                                                    = 68
	DMPAPER_A3_ROTATED                                                             = 76
	DMPAPER_A3_TRANSVERSE                                                          = 67
	DMPAPER_A4                                                                     = 9
	DMPAPER_A4SMALL                                                                = 10
	DMPAPER_A4_EXTRA                                                               = 53
	DMPAPER_A4_PLUS                                                                = 60
	DMPAPER_A4_ROTATED                                                             = 77
	DMPAPER_A4_TRANSVERSE                                                          = 55
	DMPAPER_A5                                                                     = 11
	DMPAPER_A5_EXTRA                                                               = 64
	DMPAPER_A5_ROTATED                                                             = 78
	DMPAPER_A5_TRANSVERSE                                                          = 61
	DMPAPER_A6                                                                     = 70
	DMPAPER_A6_ROTATED                                                             = 83
	DMPAPER_A_PLUS                                                                 = 57
	DMPAPER_B4                                                                     = 12
	DMPAPER_B4_JIS_ROTATED                                                         = 79
	DMPAPER_B5                                                                     = 13
	DMPAPER_B5_EXTRA                                                               = 65
	DMPAPER_B5_JIS_ROTATED                                                         = 80
	DMPAPER_B5_TRANSVERSE                                                          = 62
	DMPAPER_B6_JIS                                                                 = 88
	DMPAPER_B6_JIS_ROTATED                                                         = 89
	DMPAPER_B_PLUS                                                                 = 58
	DMPAPER_CSHEET                                                                 = 24
	DMPAPER_DBL_JAPANESE_POSTCARD                                                  = 69
	DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED                                          = 82
	DMPAPER_DSHEET                                                                 = 25
	DMPAPER_ENV_10                                                                 = 20
	DMPAPER_ENV_11                                                                 = 21
	DMPAPER_ENV_12                                                                 = 22
	DMPAPER_ENV_14                                                                 = 23
	DMPAPER_ENV_9                                                                  = 19
	DMPAPER_ENV_B4                                                                 = 33
	DMPAPER_ENV_B5                                                                 = 34
	DMPAPER_ENV_B6                                                                 = 35
	DMPAPER_ENV_C3                                                                 = 29
	DMPAPER_ENV_C4                                                                 = 30
	DMPAPER_ENV_C5                                                                 = 28
	DMPAPER_ENV_C6                                                                 = 31
	DMPAPER_ENV_C65                                                                = 32
	DMPAPER_ENV_DL                                                                 = 27
	DMPAPER_ENV_INVITE                                                             = 47
	DMPAPER_ENV_ITALY                                                              = 36
	DMPAPER_ENV_MONARCH                                                            = 37
	DMPAPER_ENV_PERSONAL                                                           = 38
	DMPAPER_ESHEET                                                                 = 26
	DMPAPER_EXECUTIVE                                                              = 7
	DMPAPER_FANFOLD_LGL_GERMAN                                                     = 41
	DMPAPER_FANFOLD_STD_GERMAN                                                     = 40
	DMPAPER_FANFOLD_US                                                             = 39
	DMPAPER_FIRST                                                                  = 1
	DMPAPER_FOLIO                                                                  = 14
	DMPAPER_ISO_B4                                                                 = 42
	DMPAPER_JAPANESE_POSTCARD                                                      = 43
	DMPAPER_JAPANESE_POSTCARD_ROTATED                                              = 81
	DMPAPER_JENV_CHOU3                                                             = 73
	DMPAPER_JENV_CHOU3_ROTATED                                                     = 86
	DMPAPER_JENV_CHOU4                                                             = 74
	DMPAPER_JENV_CHOU4_ROTATED                                                     = 87
	DMPAPER_JENV_KAKU2                                                             = 71
	DMPAPER_JENV_KAKU2_ROTATED                                                     = 84
	DMPAPER_JENV_KAKU3                                                             = 72
	DMPAPER_JENV_KAKU3_ROTATED                                                     = 85
	DMPAPER_JENV_YOU4                                                              = 91
	DMPAPER_JENV_YOU4_ROTATED                                                      = 92
	DMPAPER_LAST                                                                   = 118
	DMPAPER_LEDGER                                                                 = 4
	DMPAPER_LEGAL                                                                  = 5
	DMPAPER_LEGAL_EXTRA                                                            = 51
	DMPAPER_LETTER                                                                 = 1
	DMPAPER_LETTERSMALL                                                            = 2
	DMPAPER_LETTER_EXTRA                                                           = 50
	DMPAPER_LETTER_EXTRA_TRANSVERSE                                                = 56
	DMPAPER_LETTER_PLUS                                                            = 59
	DMPAPER_LETTER_ROTATED                                                         = 75
	DMPAPER_LETTER_TRANSVERSE                                                      = 54
	DMPAPER_NOTE                                                                   = 18
	DMPAPER_P16K                                                                   = 93
	DMPAPER_P16K_ROTATED                                                           = 106
	DMPAPER_P32K                                                                   = 94
	DMPAPER_P32KBIG                                                                = 95
	DMPAPER_P32KBIG_ROTATED                                                        = 108
	DMPAPER_P32K_ROTATED                                                           = 107
	DMPAPER_PENV_1                                                                 = 96
	DMPAPER_PENV_10                                                                = 105
	DMPAPER_PENV_10_ROTATED                                                        = 118
	DMPAPER_PENV_1_ROTATED                                                         = 109
	DMPAPER_PENV_2                                                                 = 97
	DMPAPER_PENV_2_ROTATED                                                         = 110
	DMPAPER_PENV_3                                                                 = 98
	DMPAPER_PENV_3_ROTATED                                                         = 111
	DMPAPER_PENV_4                                                                 = 99
	DMPAPER_PENV_4_ROTATED                                                         = 112
	DMPAPER_PENV_5                                                                 = 100
	DMPAPER_PENV_5_ROTATED                                                         = 113
	DMPAPER_PENV_6                                                                 = 101
	DMPAPER_PENV_6_ROTATED                                                         = 114
	DMPAPER_PENV_7                                                                 = 102
	DMPAPER_PENV_7_ROTATED                                                         = 115
	DMPAPER_PENV_8                                                                 = 103
	DMPAPER_PENV_8_ROTATED                                                         = 116
	DMPAPER_PENV_9                                                                 = 104
	DMPAPER_PENV_9_ROTATED                                                         = 117
	DMPAPER_QUARTO                                                                 = 15
	DMPAPER_RESERVED_48                                                            = 48
	DMPAPER_RESERVED_49                                                            = 49
	DMPAPER_STATEMENT                                                              = 6
	DMPAPER_TABLOID                                                                = 3
	DMPAPER_TABLOID_EXTRA                                                          = 52
	DMPAPER_USER                                                                   = 256
	DMRES_DRAFT                                                                    = -1
	DMRES_HIGH                                                                     = -4
	DMRES_LOW                                                                      = -2
	DMRES_MEDIUM                                                                   = -3
	DMTT_BITMAP                                                                    = 1
	DMTT_DOWNLOAD                                                                  = 2
	DMTT_DOWNLOAD_OUTLINE                                                          = 4
	DMTT_SUBDEV                                                                    = 3
	DM_BITSPERPEL                                                                  = 262144
	DM_COLLATE                                                                     = 32768
	DM_COLOR                                                                       = 2048
	DM_COPIES                                                                      = 256
	DM_COPY                                                                        = 2
	DM_DEFAULTSOURCE                                                               = 512
	DM_DISPLAYFIXEDOUTPUT                                                          = 536870912
	DM_DISPLAYFLAGS                                                                = 2097152
	DM_DISPLAYFREQUENCY                                                            = 4194304
	DM_DISPLAYORIENTATION                                                          = 128
	DM_DITHERTYPE                                                                  = 67108864
	DM_DUPLEX                                                                      = 4096
	DM_FORMNAME                                                                    = 65536
	DM_GETDEFID                                                                    = 1024
	DM_ICMINTENT                                                                   = 16777216
	DM_ICMMETHOD                                                                   = 8388608
	DM_INTERLACED                                                                  = 0x00000002
	DM_IN_BUFFER                                                                   = 8
	DM_IN_PROMPT                                                                   = 4
	DM_LOGPIXELS                                                                   = 131072
	DM_MEDIATYPE                                                                   = 33554432
	DM_MODIFY                                                                      = 8
	DM_NUP                                                                         = 64
	DM_ORIENTATION                                                                 = 1
	DM_OUT_BUFFER                                                                  = 2
	DM_OUT_DEFAULT                                                                 = 1
	DM_PANNINGHEIGHT                                                               = 268435456
	DM_PANNINGWIDTH                                                                = 134217728
	DM_PAPERLENGTH                                                                 = 4
	DM_PAPERSIZE                                                                   = 2
	DM_PAPERWIDTH                                                                  = 8
	DM_PELSHEIGHT                                                                  = 1048576
	DM_PELSWIDTH                                                                   = 524288
	DM_POSITION                                                                    = 32
	DM_PRINTQUALITY                                                                = 1024
	DM_PROMPT                                                                      = 4
	DM_REPOSITION                                                                  = 1026
	DM_SCALE                                                                       = 16
	DM_SETDEFID                                                                    = 1025
	DM_SPECVERSION                                                                 = 0x0401
	DM_TTOPTION                                                                    = 16384
	DM_UPDATE                                                                      = 1
	DM_YRESOLUTION                                                                 = 8192
	DNS_ERROR_AUTOZONE_ALREADY_EXISTS                                              = 9610
	DNS_ERROR_AXFR                                                                 = 9752
	DNS_ERROR_BAD_PACKET                                                           = 9502
	DNS_ERROR_CANNOT_FIND_ROOT_HINTS                                               = 9564
	DNS_ERROR_CNAME_COLLISION                                                      = 9709
	DNS_ERROR_CNAME_LOOP                                                           = 9707
	DNS_ERROR_DATABASE_BASE                                                        = 9700
	DNS_ERROR_DATAFILE_BASE                                                        = 9650
	DNS_ERROR_DATAFILE_OPEN_FAILURE                                                = 9653
	DNS_ERROR_DATAFILE_PARSING                                                     = 9655
	DNS_ERROR_DP_ALREADY_ENLISTED                                                  = 9904
	DNS_ERROR_DP_ALREADY_EXISTS                                                    = 9902
	DNS_ERROR_DP_BASE                                                              = 9900
	DNS_ERROR_DP_DOES_NOT_EXIST                                                    = 9901
	DNS_ERROR_DP_FSMO_ERROR                                                        = 9906
	DNS_ERROR_DP_NOT_AVAILABLE                                                     = 9905
	DNS_ERROR_DP_NOT_ENLISTED                                                      = 9903
	DNS_ERROR_DS_UNAVAILABLE                                                       = 9717
	DNS_ERROR_DS_ZONE_ALREADY_EXISTS                                               = 9718
	DNS_ERROR_FILE_WRITEBACK_FAILED                                                = 9654
	DNS_ERROR_FORWARDER_ALREADY_EXISTS                                             = 9619
	DNS_ERROR_GENERAL_API_BASE                                                     = 9550
	DNS_ERROR_INCONSISTENT_ROOT_HINTS                                              = 9565
	DNS_ERROR_INVALID_DATA                                                         = 13
	DNS_ERROR_INVALID_DATAFILE_NAME                                                = 9652
	DNS_ERROR_INVALID_IP_ADDRESS                                                   = 9552
	DNS_ERROR_INVALID_NAME                                                         = 123
	DNS_ERROR_INVALID_NAME_CHAR                                                    = 9560
	DNS_ERROR_INVALID_PROPERTY                                                     = 9553
	DNS_ERROR_INVALID_TYPE                                                         = 9551
	DNS_ERROR_INVALID_ZONE_OPERATION                                               = 9603
	DNS_ERROR_INVALID_ZONE_TYPE                                                    = 9611
	DNS_ERROR_MASK                                                                 = 0x00002328
	DNS_ERROR_NAME_DOES_NOT_EXIST                                                  = 9714
	DNS_ERROR_NAME_NOT_IN_ZONE                                                     = 9706
	DNS_ERROR_NBSTAT_INIT_FAILED                                                   = 9617
	DNS_ERROR_NEED_SECONDARY_ADDRESSES                                             = 9614
	DNS_ERROR_NEED_WINS_SERVERS                                                    = 9616
	DNS_ERROR_NODE_CREATION_FAILED                                                 = 9703
	DNS_ERROR_NODE_IS_CNAME                                                        = 9708
	DNS_ERROR_NON_RFC_NAME                                                         = 9556
	DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER                                           = 9562
	DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION                                         = 9563
	DNS_ERROR_NOT_UNIQUE                                                           = 9555
	DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE                                               = 9719
	DNS_ERROR_NO_CREATE_CACHE_DATA                                                 = 9713
	DNS_ERROR_NO_DNS_SERVERS                                                       = 9852
	DNS_ERROR_NO_MEMORY                                                            = 14
	DNS_ERROR_NO_PACKET                                                            = 9503
	DNS_ERROR_NO_TCPIP                                                             = 9851
	DNS_ERROR_NO_ZONE_INFO                                                         = 9602
	DNS_ERROR_NUMERIC_NAME                                                         = 9561
	DNS_ERROR_OPERATION_BASE                                                       = 9750
	DNS_ERROR_PACKET_FMT_BASE                                                      = 9500
	DNS_ERROR_PRIMARY_REQUIRES_DATAFILE                                            = 9651
	DNS_ERROR_RCODE                                                                = 9504
	DNS_ERROR_RCODE_BADKEY                                                         = 9017
	DNS_ERROR_RCODE_BADSIG                                                         = 9016
	DNS_ERROR_RCODE_BADTIME                                                        = 9018
	DNS_ERROR_RCODE_FORMAT_ERROR                                                   = 9001
	DNS_ERROR_RCODE_LAST                                                           = 9018
	DNS_ERROR_RCODE_NAME_ERROR                                                     = 9003
	DNS_ERROR_RCODE_NOTAUTH                                                        = 9009
	DNS_ERROR_RCODE_NOTZONE                                                        = 9010
	DNS_ERROR_RCODE_NOT_IMPLEMENTED                                                = 9004
	DNS_ERROR_RCODE_NO_ERROR                                                       = 0
	DNS_ERROR_RCODE_NXRRSET                                                        = 9008
	DNS_ERROR_RCODE_REFUSED                                                        = 9005
	DNS_ERROR_RCODE_SERVER_FAILURE                                                 = 9002
	DNS_ERROR_RCODE_YXDOMAIN                                                       = 9006
	DNS_ERROR_RCODE_YXRRSET                                                        = 9007
	DNS_ERROR_RECORD_ALREADY_EXISTS                                                = 9711
	DNS_ERROR_RECORD_DOES_NOT_EXIST                                                = 9701
	DNS_ERROR_RECORD_FORMAT                                                        = 9702
	DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT                                             = 9710
	DNS_ERROR_RECORD_TIMED_OUT                                                     = 9705
	DNS_ERROR_RESPONSE_CODES_BASE                                                  = 9000
	DNS_ERROR_SECONDARY_DATA                                                       = 9712
	DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP                                         = 9612
	DNS_ERROR_SECURE_BASE                                                          = 9800
	DNS_ERROR_SETUP_BASE                                                           = 9850
	DNS_ERROR_SOA_DELETE_INVALID                                                   = 9618
	DNS_ERROR_TRY_AGAIN_LATER                                                      = 9554
	DNS_ERROR_UNKNOWN_RECORD_TYPE                                                  = 9704
	DNS_ERROR_UNSECURE_PACKET                                                      = 9505
	DNS_ERROR_WINS_INIT_FAILED                                                     = 9615
	DNS_ERROR_ZONE_ALREADY_EXISTS                                                  = 9609
	DNS_ERROR_ZONE_BASE                                                            = 9600
	DNS_ERROR_ZONE_CONFIGURATION_ERROR                                             = 9604
	DNS_ERROR_ZONE_CREATION_FAILED                                                 = 9608
	DNS_ERROR_ZONE_DOES_NOT_EXIST                                                  = 9601
	DNS_ERROR_ZONE_HAS_NO_NS_RECORDS                                               = 9606
	DNS_ERROR_ZONE_HAS_NO_SOA_RECORD                                               = 9605
	DNS_ERROR_ZONE_IS_SHUTDOWN                                                     = 9621
	DNS_ERROR_ZONE_LOCKED                                                          = 9607
	DNS_ERROR_ZONE_NOT_SECONDARY                                                   = 9613
	DNS_ERROR_ZONE_REQUIRES_MASTER_IP                                              = 9620
	DNS_INFO_ADDED_LOCAL_WINS                                                      = 9753
	DNS_INFO_AXFR_COMPLETE                                                         = 9751
	DNS_INFO_NO_RECORDS                                                            = 9501
	DNS_STATUS_CONTINUE_NEEDED                                                     = 9801
	DNS_STATUS_DOTTED_NAME                                                         = 9558
	DNS_STATUS_FQDN                                                                = 9557
	DNS_STATUS_PACKET_UNSECURE                                                     = 9505
	DNS_STATUS_SINGLE_PART_NAME                                                    = 9559
	DNS_WARNING_DOMAIN_UNDELETED                                                   = 9716
	DNS_WARNING_PTR_CREATE_FAILED                                                  = 9715
	DOCKINFO_DOCKED                                                                = 2
	DOCKINFO_UNDOCKED                                                              = 1
	DOCKINFO_USER_DOCKED                                                           = 6
	DOCKINFO_USER_SUPPLIED                                                         = 4
	DOCKINFO_USER_UNDOCKED                                                         = 5
	DOF_DIRECTORY                                                                  = 0x8003
	DOF_DOCUMENT                                                                   = 0x8002
	DOF_EXECUTABLE                                                                 = 0x8001
	DOF_MULTIPLE                                                                   = 0x8004
	DOF_PROGMAN                                                                    = 0x0001
	DOF_SHELLDATA                                                                  = 0x0002
	DOMAIN_ALIAS_RID_ACCESS_CONTROL_ASSISTANCE_OPS                                 = 579
	DOMAIN_ALIAS_RID_ACCOUNT_OPS                                                   = 548
	DOMAIN_ALIAS_RID_ADMINS                                                        = 544
	DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS                                           = 560
	DOMAIN_ALIAS_RID_BACKUP_OPS                                                    = 551
	DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP                                    = 571
	DOMAIN_ALIAS_RID_CERTSVC_DCOM_ACCESS_GROUP                                     = 574
	DOMAIN_ALIAS_RID_CRYPTO_OPERATORS                                              = 569
	DOMAIN_ALIAS_RID_DCOM_USERS                                                    = 562
	DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP                                       = 573
	DOMAIN_ALIAS_RID_GUESTS                                                        = 546
	DOMAIN_ALIAS_RID_HYPER_V_ADMINS                                                = 578
	DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS                                = 557
	DOMAIN_ALIAS_RID_IUSERS                                                        = 568
	DOMAIN_ALIAS_RID_LOGGING_USERS                                                 = 559
	DOMAIN_ALIAS_RID_MONITORING_USERS                                              = 558
	DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS                                     = 556
	DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP                                = 572
	DOMAIN_ALIAS_RID_POWER_USERS                                                   = 547
	DOMAIN_ALIAS_RID_PREW2KCOMPACCESS                                              = 554
	DOMAIN_ALIAS_RID_PRINT_OPS                                                     = 550
	DOMAIN_ALIAS_RID_RAS_SERVERS                                                   = 553
	DOMAIN_ALIAS_RID_RDS_ENDPOINT_SERVERS                                          = 576
	DOMAIN_ALIAS_RID_RDS_MANAGEMENT_SERVERS                                        = 577
	DOMAIN_ALIAS_RID_RDS_REMOTE_ACCESS_SERVERS                                     = 575
	DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS                                          = 555
	DOMAIN_ALIAS_RID_REMOTE_MANAGEMENT_USERS                                       = 580
	DOMAIN_ALIAS_RID_REPLICATOR                                                    = 552
	DOMAIN_ALIAS_RID_SYSTEM_OPS                                                    = 549
	DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS                                            = 561
	DOMAIN_ALIAS_RID_USERS                                                         = 545
	DOMAIN_GROUP_RID_ADMINS                                                        = 512
	DOMAIN_GROUP_RID_AUTHORIZATION_DATA_CONTAINS_CLAIMS                            = 497
	DOMAIN_GROUP_RID_AUTHORIZATION_DATA_IS_COMPOUNDED                              = 496
	DOMAIN_GROUP_RID_CERT_ADMINS                                                   = 517
	DOMAIN_GROUP_RID_CLONEABLE_CONTROLLERS                                         = 522
	DOMAIN_GROUP_RID_COMPUTERS                                                     = 515
	DOMAIN_GROUP_RID_CONTROLLERS                                                   = 516
	DOMAIN_GROUP_RID_ENTERPRISE_ADMINS                                             = 519
	DOMAIN_GROUP_RID_ENTERPRISE_READONLY_DOMAIN_CONTROLLERS                        = 498
	DOMAIN_GROUP_RID_GUESTS                                                        = 514
	DOMAIN_GROUP_RID_POLICY_ADMINS                                                 = 520
	DOMAIN_GROUP_RID_READONLY_CONTROLLERS                                          = 521
	DOMAIN_GROUP_RID_SCHEMA_ADMINS                                                 = 518
	DOMAIN_GROUP_RID_USERS                                                         = 513
	DOMAIN_USER_RID_ADMIN                                                          = 500
	DOMAIN_USER_RID_GUEST                                                          = 501
	DOMAIN_USER_RID_KRBTGT                                                         = 502
	DOMAIN_USER_RID_MAX                                                            = 999
	DONT_COMPILE_CMDS_INLINE                                                       = 0x20
	DONT_RESOLVE_DLL_REFERENCES                                                    = 0x1
	DOUBLE_CLICK                                                                   = 0x2
	DOWNLOADFACE                                                                   = 514
	DOWNLOADHEADER                                                                 = 4111
	DO_DROPFILE                                                                    = 1162627398
	DO_PRINTFILE                                                                   = 1414419024
	DRAFTMODE                                                                      = 7
	DRAFT_QUALITY                                                                  = 1
	DRAGDROP_E_FIRST                                                               = 2147746048
	DRAGDROP_E_LAST                                                                = 2147746063
	DRAGDROP_S_FIRST                                                               = 262400
	DRAGDROP_S_LAST                                                                = 262415
	DRAWPATTERNRECT                                                                = 25
	DRIVERSPECS_H                                                                  = 0
	DRIVERVERSION                                                                  = 0
	DRIVE_CDROM                                                                    = 5
	DRIVE_FIXED                                                                    = 3
	DRIVE_NO_ROOT_DIR                                                              = 1
	DRIVE_RAMDISK                                                                  = 6
	DRIVE_REMOTE                                                                   = 4
	DRIVE_REMOVABLE                                                                = 2
	DRIVE_UNKNOWN                                                                  = 0
	DSS_DISABLED                                                                   = 0x0020
	DSS_HIDEPREFIX                                                                 = 0x0200
	DSS_MONO                                                                       = 0x0080
	DSS_NORMAL                                                                     = 0x0000
	DSS_PREFIXONLY                                                                 = 0x0400
	DSS_RIGHT                                                                      = 0x8000
	DSS_UNION                                                                      = 0x0010
	DST_BITMAP                                                                     = 0x0004
	DST_COMPLEX                                                                    = 0x0000
	DST_ICON                                                                       = 0x0003
	DST_PREFIXTEXT                                                                 = 0x0002
	DST_TEXT                                                                       = 0x0001
	DS_3DLOOK                                                                      = 4
	DS_ABSALIGN                                                                    = 1
	DS_CENTER                                                                      = 2048
	DS_CENTERMOUSE                                                                 = 4096
	DS_CONTEXTHELP                                                                 = 8192
	DS_CONTROL                                                                     = 1024
	DS_FIXEDSYS                                                                    = 8
	DS_LOCALEDIT                                                                   = 32
	DS_MODALFRAME                                                                  = 128
	DS_NOFAILCREATE                                                                = 16
	DS_NOIDLEMSG                                                                   = 256
	DS_SETFONT                                                                     = 64
	DS_SETFOREGROUND                                                               = 512
	DS_SHELLFONT                                                                   = 72
	DS_SYSMODAL                                                                    = 2
	DS_S_SUCCESS                                                                   = 0
	DTR_CONTROL_DISABLE                                                            = 0x0
	DTR_CONTROL_ENABLE                                                             = 0x1
	DTR_CONTROL_HANDSHAKE                                                          = 0x2
	DT_BOTTOM                                                                      = 0x00000008
	DT_CALCRECT                                                                    = 0x00000400
	DT_CENTER                                                                      = 0x00000001
	DT_CHARSTREAM                                                                  = 4
	DT_DISPFILE                                                                    = 6
	DT_EDITCONTROL                                                                 = 0x00002000
	DT_END_ELLIPSIS                                                                = 0x00008000
	DT_EXPANDTABS                                                                  = 0x00000040
	DT_EXTERNALLEADING                                                             = 0x00000200
	DT_HIDEPREFIX                                                                  = 0x00100000
	DT_INTERNAL                                                                    = 0x00001000
	DT_LEFT                                                                        = 0x00000000
	DT_METAFILE                                                                    = 5
	DT_MODIFYSTRING                                                                = 0x00010000
	DT_NOCLIP                                                                      = 0x00000100
	DT_NOFULLWIDTHCHARBREAK                                                        = 0x00080000
	DT_NOPREFIX                                                                    = 0x00000800
	DT_PATH_ELLIPSIS                                                               = 0x00004000
	DT_PLOTTER                                                                     = 0
	DT_PREFIXONLY                                                                  = 0x00200000
	DT_RASCAMERA                                                                   = 3
	DT_RASDISPLAY                                                                  = 1
	DT_RASPRINTER                                                                  = 2
	DT_RIGHT                                                                       = 0x00000002
	DT_RTLREADING                                                                  = 0x00020000
	DT_SINGLELINE                                                                  = 0x00000020
	DT_TABSTOP                                                                     = 0x00000080
	DT_TOP                                                                         = 0x00000000
	DT_VCENTER                                                                     = 0x00000004
	DT_WORDBREAK                                                                   = 0x00000010
	DT_WORD_ELLIPSIS                                                               = 0x00040000
	DUPLICATE_CLOSE_SOURCE                                                         = 0x00000001
	DUPLICATE_SAME_ACCESS                                                          = 0x00000002
	DWLP_MSGRESULT                                                                 = 0
	E2BIG                                                                          = 7
	EACCES                                                                         = 13
	EADDRINUSE                                                                     = 100
	EADDRNOTAVAIL                                                                  = 101
	EAFNOSUPPORT                                                                   = 102
	EAGAIN                                                                         = 11
	EAI_AGAIN                                                                      = 11002
	EAI_BADFLAGS                                                                   = 10022
	EAI_FAIL                                                                       = 11003
	EAI_FAMILY                                                                     = 10047
	EAI_MEMORY                                                                     = 8
	EAI_NODATA                                                                     = 11004
	EAI_NONAME                                                                     = 11001
	EAI_SERVICE                                                                    = 10109
	EAI_SOCKTYPE                                                                   = 10044
	EALREADY                                                                       = 103
	EASTEUROPE_CHARSET                                                             = 238
	EBADF                                                                          = 9
	EBADMSG                                                                        = 104
	EBUSY                                                                          = 16
	ECANCELED                                                                      = 105
	ECHILD                                                                         = 10
	ECONNABORTED                                                                   = 106
	ECONNREFUSED                                                                   = 107
	ECONNRESET                                                                     = 108
	EC_LEFTMARGIN                                                                  = 0x0001
	EC_RIGHTMARGIN                                                                 = 0x0002
	EC_USEFONTINFO                                                                 = 0xffff
	EDD_GET_DEVICE_INTERFACE_NAME                                                  = 0x00000001
	EDEADLK                                                                        = 36
	EDESTADDRREQ                                                                   = 109
	EDGE_BUMP                                                                      = 9
	EDGE_ETCHED                                                                    = 6
	EDGE_RAISED                                                                    = 5
	EDGE_SUNKEN                                                                    = 10
	EDOM                                                                           = 33
	EDQUOT                                                                         = 245
	EDS_RAWMODE                                                                    = 0x00000002
	EDS_ROTATEDMODE                                                                = 0x00000004
	EEXIST                                                                         = 17
	EFAULT                                                                         = 14
	EFBIG                                                                          = 27
	EFSRPC_SECURE_ONLY                                                             = 8
	EFS_USE_RECOVERY_KEYS                                                          = 1
	EHOSTDOWN                                                                      = 243
	EHOSTUNREACH                                                                   = 110
	EIDRM                                                                          = 111
	EILSEQ                                                                         = 42
	EIMES_CANCELCOMPSTRINFOCUS                                                     = 0x0002
	EIMES_COMPLETECOMPSTRKILLFOCUS                                                 = 0x0004
	EIMES_GETCOMPSTRATONCE                                                         = 0x0001
	EINPROGRESS                                                                    = 112
	EINTR                                                                          = 4
	EINVAL                                                                         = 22
	EIO                                                                            = 5
	EISCONN                                                                        = 113
	EISDIR                                                                         = 21
	ELF_CULTURE_LATIN                                                              = 0
	ELF_VENDOR_SIZE                                                                = 4
	ELF_VERSION                                                                    = 0
	ELOOP                                                                          = 114
	EMARCH_ENC_I17_IC_INST_WORD_POS_X                                              = 12
	EMARCH_ENC_I17_IC_INST_WORD_X                                                  = 3
	EMARCH_ENC_I17_IC_SIZE_X                                                       = 1
	EMARCH_ENC_I17_IC_VAL_POS_X                                                    = 21
	EMARCH_ENC_I17_IMM41a_INST_WORD_POS_X                                          = 14
	EMARCH_ENC_I17_IMM41a_INST_WORD_X                                              = 1
	EMARCH_ENC_I17_IMM41a_SIZE_X                                                   = 10
	EMARCH_ENC_I17_IMM41a_VAL_POS_X                                                = 22
	EMARCH_ENC_I17_IMM41b_INST_WORD_POS_X                                          = 24
	EMARCH_ENC_I17_IMM41b_INST_WORD_X                                              = 1
	EMARCH_ENC_I17_IMM41b_SIZE_X                                                   = 8
	EMARCH_ENC_I17_IMM41b_VAL_POS_X                                                = 32
	EMARCH_ENC_I17_IMM41c_INST_WORD_POS_X                                          = 0
	EMARCH_ENC_I17_IMM41c_INST_WORD_X                                              = 2
	EMARCH_ENC_I17_IMM41c_SIZE_X                                                   = 23
	EMARCH_ENC_I17_IMM41c_VAL_POS_X                                                = 40
	EMARCH_ENC_I17_IMM5C_INST_WORD_POS_X                                           = 13
	EMARCH_ENC_I17_IMM5C_INST_WORD_X                                               = 3
	EMARCH_ENC_I17_IMM5C_SIZE_X                                                    = 5
	EMARCH_ENC_I17_IMM5C_VAL_POS_X                                                 = 16
	EMARCH_ENC_I17_IMM7B_INST_WORD_POS_X                                           = 4
	EMARCH_ENC_I17_IMM7B_INST_WORD_X                                               = 3
	EMARCH_ENC_I17_IMM7B_SIZE_X                                                    = 7
	EMARCH_ENC_I17_IMM7B_VAL_POS_X                                                 = 0
	EMARCH_ENC_I17_IMM9D_INST_WORD_POS_X                                           = 18
	EMARCH_ENC_I17_IMM9D_INST_WORD_X                                               = 3
	EMARCH_ENC_I17_IMM9D_SIZE_X                                                    = 9
	EMARCH_ENC_I17_IMM9D_VAL_POS_X                                                 = 7
	EMARCH_ENC_I17_SIGN_INST_WORD_POS_X                                            = 27
	EMARCH_ENC_I17_SIGN_INST_WORD_X                                                = 3
	EMARCH_ENC_I17_SIGN_SIZE_X                                                     = 1
	EMARCH_ENC_I17_SIGN_VAL_POS_X                                                  = 63
	EMFILE                                                                         = 24
	EMLINK                                                                         = 31
	EMR_ABORTPATH                                                                  = 68
	EMR_ALPHABLEND                                                                 = 114
	EMR_ANGLEARC                                                                   = 41
	EMR_ARC                                                                        = 45
	EMR_ARCTO                                                                      = 55
	EMR_BEGINPATH                                                                  = 59
	EMR_BITBLT                                                                     = 76
	EMR_CHORD                                                                      = 46
	EMR_CLOSEFIGURE                                                                = 61
	EMR_COLORCORRECTPALETTE                                                        = 111
	EMR_COLORMATCHTOTARGETW                                                        = 121
	EMR_CREATEBRUSHINDIRECT                                                        = 39
	EMR_CREATECOLORSPACE                                                           = 99
	EMR_CREATECOLORSPACEW                                                          = 122
	EMR_CREATEDIBPATTERNBRUSHPT                                                    = 94
	EMR_CREATEMONOBRUSH                                                            = 93
	EMR_CREATEPALETTE                                                              = 49
	EMR_CREATEPEN                                                                  = 38
	EMR_DELETECOLORSPACE                                                           = 101
	EMR_DELETEOBJECT                                                               = 40
	EMR_ELLIPSE                                                                    = 42
	EMR_ENDPATH                                                                    = 60
	EMR_EOF                                                                        = 14
	EMR_EXCLUDECLIPRECT                                                            = 29
	EMR_EXTCREATEFONTINDIRECTW                                                     = 82
	EMR_EXTCREATEPEN                                                               = 95
	EMR_EXTFLOODFILL                                                               = 53
	EMR_EXTSELECTCLIPRGN                                                           = 75
	EMR_EXTTEXTOUTA                                                                = 83
	EMR_EXTTEXTOUTW                                                                = 84
	EMR_FILLPATH                                                                   = 62
	EMR_FILLRGN                                                                    = 71
	EMR_FLATTENPATH                                                                = 65
	EMR_FRAMERGN                                                                   = 72
	EMR_GDICOMMENT                                                                 = 70
	EMR_GLSBOUNDEDRECORD                                                           = 103
	EMR_GLSRECORD                                                                  = 102
	EMR_GRADIENTFILL                                                               = 118
	EMR_HEADER                                                                     = 1
	EMR_INTERSECTCLIPRECT                                                          = 30
	EMR_INVERTRGN                                                                  = 73
	EMR_LINETO                                                                     = 54
	EMR_MASKBLT                                                                    = 78
	EMR_MAX                                                                        = 122
	EMR_MIN                                                                        = 1
	EMR_MODIFYWORLDTRANSFORM                                                       = 36
	EMR_MOVETOEX                                                                   = 27
	EMR_OFFSETCLIPRGN                                                              = 26
	EMR_PAINTRGN                                                                   = 74
	EMR_PIE                                                                        = 47
	EMR_PIXELFORMAT                                                                = 104
	EMR_PLGBLT                                                                     = 79
	EMR_POLYBEZIER                                                                 = 2
	EMR_POLYBEZIER16                                                               = 85
	EMR_POLYBEZIERTO                                                               = 5
	EMR_POLYBEZIERTO16                                                             = 88
	EMR_POLYDRAW                                                                   = 56
	EMR_POLYDRAW16                                                                 = 92
	EMR_POLYGON                                                                    = 3
	EMR_POLYGON16                                                                  = 86
	EMR_POLYLINE                                                                   = 4
	EMR_POLYLINE16                                                                 = 87
	EMR_POLYLINETO                                                                 = 6
	EMR_POLYLINETO16                                                               = 89
	EMR_POLYPOLYGON                                                                = 8
	EMR_POLYPOLYGON16                                                              = 91
	EMR_POLYPOLYLINE                                                               = 7
	EMR_POLYPOLYLINE16                                                             = 90
	EMR_POLYTEXTOUTA                                                               = 96
	EMR_POLYTEXTOUTW                                                               = 97
	EMR_REALIZEPALETTE                                                             = 52
	EMR_RECTANGLE                                                                  = 43
	EMR_RESERVED_105                                                               = 105
	EMR_RESERVED_106                                                               = 106
	EMR_RESERVED_107                                                               = 107
	EMR_RESERVED_108                                                               = 108
	EMR_RESERVED_109                                                               = 109
	EMR_RESERVED_110                                                               = 110
	EMR_RESERVED_117                                                               = 117
	EMR_RESERVED_119                                                               = 119
	EMR_RESERVED_120                                                               = 120
	EMR_RESIZEPALETTE                                                              = 51
	EMR_RESTOREDC                                                                  = 34
	EMR_ROUNDRECT                                                                  = 44
	EMR_SAVEDC                                                                     = 33
	EMR_SCALEVIEWPORTEXTEX                                                         = 31
	EMR_SCALEWINDOWEXTEX                                                           = 32
	EMR_SELECTCLIPPATH                                                             = 67
	EMR_SELECTOBJECT                                                               = 37
	EMR_SELECTPALETTE                                                              = 48
	EMR_SETARCDIRECTION                                                            = 57
	EMR_SETBKCOLOR                                                                 = 25
	EMR_SETBKMODE                                                                  = 18
	EMR_SETBRUSHORGEX                                                              = 13
	EMR_SETCOLORADJUSTMENT                                                         = 23
	EMR_SETCOLORSPACE                                                              = 100
	EMR_SETDIBITSTODEVICE                                                          = 80
	EMR_SETICMMODE                                                                 = 98
	EMR_SETICMPROFILEA                                                             = 112
	EMR_SETICMPROFILEW                                                             = 113
	EMR_SETLAYOUT                                                                  = 115
	EMR_SETMAPMODE                                                                 = 17
	EMR_SETMAPPERFLAGS                                                             = 16
	EMR_SETMETARGN                                                                 = 28
	EMR_SETMITERLIMIT                                                              = 58
	EMR_SETPALETTEENTRIES                                                          = 50
	EMR_SETPIXELV                                                                  = 15
	EMR_SETPOLYFILLMODE                                                            = 19
	EMR_SETROP2                                                                    = 20
	EMR_SETSTRETCHBLTMODE                                                          = 21
	EMR_SETTEXTALIGN                                                               = 22
	EMR_SETTEXTCOLOR                                                               = 24
	EMR_SETVIEWPORTEXTEX                                                           = 11
	EMR_SETVIEWPORTORGEX                                                           = 12
	EMR_SETWINDOWEXTEX                                                             = 9
	EMR_SETWINDOWORGEX                                                             = 10
	EMR_SETWORLDTRANSFORM                                                          = 35
	EMR_STRETCHBLT                                                                 = 77
	EMR_STRETCHDIBITS                                                              = 81
	EMR_STROKEANDFILLPATH                                                          = 63
	EMR_STROKEPATH                                                                 = 64
	EMR_TRANSPARENTBLT                                                             = 116
	EMR_WIDENPATH                                                                  = 66
	EMSGSIZE                                                                       = 115
	EMSIS_COMPOSITIONSTRING                                                        = 0x0001
	EM_CANUNDO                                                                     = 0x00C6
	EM_CHARFROMPOS                                                                 = 0x00D7
	EM_EMPTYUNDOBUFFER                                                             = 0x00CD
	EM_FMTLINES                                                                    = 0x00C8
	EM_GETFIRSTVISIBLELINE                                                         = 0x00CE
	EM_GETHANDLE                                                                   = 0x00BD
	EM_GETIMESTATUS                                                                = 0x00D9
	EM_GETLIMITTEXT                                                                = 0x00D5
	EM_GETLINE                                                                     = 0x00C4
	EM_GETLINECOUNT                                                                = 0x00BA
	EM_GETMARGINS                                                                  = 0x00D4
	EM_GETMODIFY                                                                   = 0x00B8
	EM_GETPASSWORDCHAR                                                             = 0x00D2
	EM_GETRECT                                                                     = 0x00B2
	EM_GETSEL                                                                      = 0x00B0
	EM_GETTHUMB                                                                    = 0x00BE
	EM_GETWORDBREAKPROC                                                            = 0x00D1
	EM_LIMITTEXT                                                                   = 0x00C5
	EM_LINEFROMCHAR                                                                = 0x00C9
	EM_LINEINDEX                                                                   = 0x00BB
	EM_LINELENGTH                                                                  = 0x00C1
	EM_LINESCROLL                                                                  = 0x00B6
	EM_POSFROMCHAR                                                                 = 0x00D6
	EM_REPLACESEL                                                                  = 0x00C2
	EM_SCROLL                                                                      = 0x00B5
	EM_SCROLLCARET                                                                 = 0x00B7
	EM_SETHANDLE                                                                   = 0x00BC
	EM_SETIMESTATUS                                                                = 0x00D8
	EM_SETLIMITTEXT                                                                = 197
	EM_SETMARGINS                                                                  = 0x00D3
	EM_SETMODIFY                                                                   = 0x00B9
	EM_SETPASSWORDCHAR                                                             = 0x00CC
	EM_SETREADONLY                                                                 = 0x00CF
	EM_SETRECT                                                                     = 0x00B3
	EM_SETRECTNP                                                                   = 0x00B4
	EM_SETSEL                                                                      = 0x00B1
	EM_SETTABSTOPS                                                                 = 0x00CB
	EM_SETWORDBREAKPROC                                                            = 0x00D0
	EM_UNDO                                                                        = 0x00C7
	ENABLEDUPLEX                                                                   = 28
	ENABLEPAIRKERNING                                                              = 769
	ENABLERELATIVEWIDTHS                                                           = 768
	ENABLE_AUTO_POSITION                                                           = 0x100
	ENABLE_ECHO_INPUT                                                              = 0x4
	ENABLE_EXTENDED_FLAGS                                                          = 0x80
	ENABLE_INSERT_MODE                                                             = 0x20
	ENABLE_LINE_INPUT                                                              = 0x2
	ENABLE_LVB_GRID_WORLDWIDE                                                      = 0x10
	ENABLE_MOUSE_INPUT                                                             = 0x10
	ENABLE_PROCESSED_INPUT                                                         = 0x1
	ENABLE_PROCESSED_OUTPUT                                                        = 0x1
	ENABLE_QUICK_EDIT_MODE                                                         = 0x40
	ENABLE_VIRTUAL_TERMINAL_INPUT                                                  = 0x200
	ENABLE_VIRTUAL_TERMINAL_PROCESSING                                             = 0x4
	ENABLE_WINDOW_INPUT                                                            = 0x8
	ENABLE_WRAP_AT_EOL_OUTPUT                                                      = 0x2
	ENAMETOOLONG                                                                   = 38
	ENCAPSULATED_POSTSCRIPT                                                        = 4116
	ENDDOC                                                                         = 11
	ENDSESSION_CLOSEAPP                                                            = 0x00000001
	ENDSESSION_CRITICAL                                                            = 0x40000000
	ENDSESSION_LOGOFF                                                              = 0x80000000
	END_PATH                                                                       = 4098
	ENETDOWN                                                                       = 116
	ENETRESET                                                                      = 117
	ENETUNREACH                                                                    = 118
	ENFILE                                                                         = 23
	ENHANCED_KEY                                                                   = 0x100
	ENHMETA_SIGNATURE                                                              = 0x464D4520
	ENHMETA_STOCK_OBJECT                                                           = 0x80000000
	ENLISTMENT_ALL_ACCESS                                                          = 983071
	ENLISTMENT_GENERIC_EXECUTE                                                     = 131100
	ENLISTMENT_GENERIC_READ                                                        = 131073
	ENLISTMENT_GENERIC_WRITE                                                       = 131102
	ENLISTMENT_MAXIMUM_OPTION                                                      = 0x00000001
	ENLISTMENT_QUERY_INFORMATION                                                   = 1
	ENLISTMENT_RECOVER                                                             = 4
	ENLISTMENT_SET_INFORMATION                                                     = 2
	ENLISTMENT_SUBORDINATE_RIGHTS                                                  = 8
	ENLISTMENT_SUPERIOR                                                            = 0x00000001
	ENLISTMENT_SUPERIOR_RIGHTS                                                     = 0x10
	ENOBUFS                                                                        = 119
	ENODATA                                                                        = 120
	ENODEV                                                                         = 19
	ENOENT                                                                         = 2
	ENOEXEC                                                                        = 8
	ENOFILE                                                                        = 2
	ENOLCK                                                                         = 39
	ENOLINK                                                                        = 121
	ENOMEM                                                                         = 12
	ENOMSG                                                                         = 122
	ENOPROTOOPT                                                                    = 123
	ENOSPC                                                                         = 28
	ENOSR                                                                          = 124
	ENOSTR                                                                         = 125
	ENOSYS                                                                         = 40
	ENOTCONN                                                                       = 126
	ENOTDIR                                                                        = 20
	ENOTEMPTY                                                                      = 41
	ENOTRECOVERABLE                                                                = 127
	ENOTSOCK                                                                       = 128
	ENOTSUP                                                                        = 129
	ENOTTY                                                                         = 25
	ENSEMBLE_COMPILE                                                               = 0x4
	ENSEMBLE_DEAD                                                                  = 0x1
	ENUMPAPERBINS                                                                  = 31
	ENUMPAPERMETRICS                                                               = 34
	ENUM_ALL_CALENDARS                                                             = 0xffffffff
	ENUM_E_FIRST                                                                   = 2147746224
	ENUM_E_LAST                                                                    = 2147746239
	ENUM_S_FIRST                                                                   = 262576
	ENUM_S_LAST                                                                    = 262591
	ENXIO                                                                          = 6
	EN_ALIGN_LTR_EC                                                                = 0x0700
	EN_ALIGN_RTL_EC                                                                = 0x0701
	EN_CHANGE                                                                      = 0x0300
	EN_ERRSPACE                                                                    = 0x0500
	EN_HSCROLL                                                                     = 0x0601
	EN_KILLFOCUS                                                                   = 0x0200
	EN_MAXTEXT                                                                     = 0x0501
	EN_SETFOCUS                                                                    = 0x0100
	EN_UPDATE                                                                      = 0x0400
	EN_VSCROLL                                                                     = 0x0602
	EOF                                                                            = -1
	EOPNOTSUPP                                                                     = 130
	EOTHER                                                                         = 131
	EOVERFLOW                                                                      = 132
	EOWNERDEAD                                                                     = 133
	EPERM                                                                          = 1
	EPFNOSUPPORT                                                                   = 96
	EPIPE                                                                          = 32
	EPROTO                                                                         = 134
	EPROTONOSUPPORT                                                                = 135
	EPROTOTYPE                                                                     = 136
	EPSPRINTING                                                                    = 33
	EPS_SIGNATURE                                                                  = 0x46535045
	EPT_S_CANT_CREATE                                                              = 1899
	EPT_S_CANT_PERFORM_OP                                                          = 1752
	EPT_S_INVALID_ENTRY                                                            = 1751
	EPT_S_NOT_REGISTERED                                                           = 1753
	ERANGE                                                                         = 34
	EREMOTE                                                                        = 66
	EROFS                                                                          = 30
	ERROR                                                                          = 0
	ERROR_ABANDONED_WAIT_0                                                         = 735
	ERROR_ABANDONED_WAIT_63                                                        = 736
	ERROR_ACCESS_DENIED                                                            = 5
	ERROR_ACCESS_DISABLED_BY_POLICY                                                = 1260
	ERROR_ACCESS_DISABLED_WEBBLADE                                                 = 1277
	ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER                                          = 1278
	ERROR_ACCOUNT_DISABLED                                                         = 1331
	ERROR_ACCOUNT_EXPIRED                                                          = 1793
	ERROR_ACCOUNT_LOCKED_OUT                                                       = 1909
	ERROR_ACCOUNT_RESTRICTION                                                      = 1327
	ERROR_ACTIVATION_COUNT_EXCEEDED                                                = 7059
	ERROR_ACTIVE_CONNECTIONS                                                       = 2402
	ERROR_ADAP_HDW_ERR                                                             = 57
	ERROR_ADDRESS_ALREADY_ASSOCIATED                                               = 1227
	ERROR_ADDRESS_NOT_ASSOCIATED                                                   = 1228
	ERROR_ADVANCED_INSTALLER_FAILED                                                = 14099
	ERROR_ALERTED                                                                  = 739
	ERROR_ALIAS_EXISTS                                                             = 1379
	ERROR_ALLOTTED_SPACE_EXCEEDED                                                  = 1344
	ERROR_ALL_NODES_NOT_AVAILABLE                                                  = 5037
	ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED                                            = 1933
	ERROR_ALREADY_ASSIGNED                                                         = 85
	ERROR_ALREADY_EXISTS                                                           = 183
	ERROR_ALREADY_FIBER                                                            = 1280
	ERROR_ALREADY_INITIALIZED                                                      = 1247
	ERROR_ALREADY_REGISTERED                                                       = 1242
	ERROR_ALREADY_RUNNING_LKG                                                      = 1074
	ERROR_ALREADY_THREAD                                                           = 1281
	ERROR_ALREADY_WAITING                                                          = 1904
	ERROR_AMBIGUOUS_SYSTEM_DEVICE                                                  = 15250
	ERROR_API_UNAVAILABLE                                                          = 15841
	ERROR_APPHELP_BLOCK                                                            = 1259
	ERROR_APPX_INTEGRITY_FAILURE_CLR_NGEN                                          = 15624
	ERROR_APP_WRONG_OS                                                             = 1151
	ERROR_ARENA_TRASHED                                                            = 7
	ERROR_ARITHMETIC_OVERFLOW                                                      = 534
	ERROR_ATOMIC_LOCKS_NOT_SUPPORTED                                               = 174
	ERROR_AUTHENTICATION_FIREWALL_FAILED                                           = 1935
	ERROR_AUTHIP_FAILURE                                                           = 1469
	ERROR_AUTODATASEG_EXCEEDS_64k                                                  = 199
	ERROR_BADDB                                                                    = 1009
	ERROR_BADKEY                                                                   = 1010
	ERROR_BAD_ARGUMENTS                                                            = 160
	ERROR_BAD_COMMAND                                                              = 22
	ERROR_BAD_CONFIGURATION                                                        = 1610
	ERROR_BAD_DESCRIPTOR_FORMAT                                                    = 1361
	ERROR_BAD_DEVICE                                                               = 1200
	ERROR_BAD_DEV_TYPE                                                             = 66
	ERROR_BAD_DRIVER                                                               = 2001
	ERROR_BAD_DRIVER_LEVEL                                                         = 119
	ERROR_BAD_ENVIRONMENT                                                          = 10
	ERROR_BAD_EXE_FORMAT                                                           = 193
	ERROR_BAD_FILE_TYPE                                                            = 222
	ERROR_BAD_FORMAT                                                               = 11
	ERROR_BAD_IMPERSONATION_LEVEL                                                  = 1346
	ERROR_BAD_INHERITANCE_ACL                                                      = 1340
	ERROR_BAD_LENGTH                                                               = 24
	ERROR_BAD_LOGON_SESSION_STATE                                                  = 1365
	ERROR_BAD_NETPATH                                                              = 53
	ERROR_BAD_NET_NAME                                                             = 67
	ERROR_BAD_NET_RESP                                                             = 58
	ERROR_BAD_PATHNAME                                                             = 161
	ERROR_BAD_PIPE                                                                 = 230
	ERROR_BAD_PROFILE                                                              = 1206
	ERROR_BAD_PROVIDER                                                             = 1204
	ERROR_BAD_QUERY_SYNTAX                                                         = 1615
	ERROR_BAD_RECOVERY_POLICY                                                      = 6012
	ERROR_BAD_REM_ADAP                                                             = 60
	ERROR_BAD_THREADID_ADDR                                                        = 159
	ERROR_BAD_TOKEN_TYPE                                                           = 1349
	ERROR_BAD_UNIT                                                                 = 20
	ERROR_BAD_USERNAME                                                             = 2202
	ERROR_BAD_USER_PROFILE                                                         = 1253
	ERROR_BAD_VALIDATION_CLASS                                                     = 1348
	ERROR_BEGINNING_OF_MEDIA                                                       = 1102
	ERROR_BOOT_ALREADY_ACCEPTED                                                    = 1076
	ERROR_BROKEN_PIPE                                                              = 109
	ERROR_BUFFER_OVERFLOW                                                          = 111
	ERROR_BUSY                                                                     = 170
	ERROR_BUSY_DRIVE                                                               = 142
	ERROR_BUS_RESET                                                                = 1111
	ERROR_CALLBACK_SUPPLIED_INVALID_DATA                                           = 1273
	ERROR_CALL_NOT_IMPLEMENTED                                                     = 120
	ERROR_CANCELLED                                                                = 1223
	ERROR_CANCEL_VIOLATION                                                         = 173
	ERROR_CANNOT_COPY                                                              = 266
	ERROR_CANNOT_DETECT_DRIVER_FAILURE                                             = 1080
	ERROR_CANNOT_DETECT_PROCESS_ABORT                                              = 1081
	ERROR_CANNOT_FIND_WND_CLASS                                                    = 1407
	ERROR_CANNOT_IMPERSONATE                                                       = 1368
	ERROR_CANNOT_MAKE                                                              = 82
	ERROR_CANNOT_OPEN_PROFILE                                                      = 1205
	ERROR_CANNOT_SWITCH_RUNLEVEL                                                   = 15400
	ERROR_CANTOPEN                                                                 = 1011
	ERROR_CANTREAD                                                                 = 1012
	ERROR_CANTWRITE                                                                = 1013
	ERROR_CANT_ACCESS_DOMAIN_INFO                                                  = 1351
	ERROR_CANT_ACCESS_FILE                                                         = 1920
	ERROR_CANT_DELETE_LAST_ITEM                                                    = 4335
	ERROR_CANT_DISABLE_MANDATORY                                                   = 1310
	ERROR_CANT_EVICT_ACTIVE_NODE                                                   = 5009
	ERROR_CANT_OPEN_ANONYMOUS                                                      = 1347
	ERROR_CANT_RESOLVE_FILENAME                                                    = 1921
	ERROR_CAN_NOT_COMPLETE                                                         = 1003
	ERROR_CAN_NOT_DEL_LOCAL_WINS                                                   = 4001
	ERROR_CHECKOUT_REQUIRED                                                        = 221
	ERROR_CHILD_MUST_BE_VOLATILE                                                   = 1021
	ERROR_CHILD_NOT_COMPLETE                                                       = 129
	ERROR_CHILD_WINDOW_MENU                                                        = 1436
	ERROR_CIRCULAR_DEPENDENCY                                                      = 1059
	ERROR_CLASS_ALREADY_EXISTS                                                     = 1410
	ERROR_CLASS_DOES_NOT_EXIST                                                     = 1411
	ERROR_CLASS_HAS_WINDOWS                                                        = 1412
	ERROR_CLEANER_CARTRIDGE_INSTALLED                                              = 4340
	ERROR_CLEANER_CARTRIDGE_SPENT                                                  = 4333
	ERROR_CLEANER_SLOT_NOT_SET                                                     = 4332
	ERROR_CLEANER_SLOT_SET                                                         = 4331
	ERROR_CLIPBOARD_NOT_OPEN                                                       = 1418
	ERROR_CLIPPING_NOT_SUPPORTED                                                   = 2005
	ERROR_CLUSCFG_ALREADY_COMMITTED                                                = 5901
	ERROR_CLUSCFG_ROLLBACK_FAILED                                                  = 5902
	ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT                                = 5903
	ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND                                            = 5032
	ERROR_CLUSTERLOG_CORRUPT                                                       = 5029
	ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE                                               = 5031
	ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE                                              = 5033
	ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE                                        = 5030
	ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME                                     = 5900
	ERROR_CLUSTER_DATABASE_SEQMISMATCH                                             = 5083
	ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP                                            = 5896
	ERROR_CLUSTER_GUM_NOT_LOCKER                                                   = 5085
	ERROR_CLUSTER_INCOMPATIBLE_VERSIONS                                            = 5075
	ERROR_CLUSTER_INSTANCE_ID_MISMATCH                                             = 5893
	ERROR_CLUSTER_INVALID_NETWORK                                                  = 5054
	ERROR_CLUSTER_INVALID_NETWORK_PROVIDER                                         = 5049
	ERROR_CLUSTER_INVALID_NODE                                                     = 5039
	ERROR_CLUSTER_INVALID_REQUEST                                                  = 5048
	ERROR_CLUSTER_IPADDR_IN_USE                                                    = 5057
	ERROR_CLUSTER_JOIN_ABORTED                                                     = 5074
	ERROR_CLUSTER_JOIN_IN_PROGRESS                                                 = 5041
	ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS                                             = 5053
	ERROR_CLUSTER_LAST_INTERNAL_NETWORK                                            = 5066
	ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND                                             = 5043
	ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED                                     = 5076
	ERROR_CLUSTER_MEMBERSHIP_HALT                                                  = 5892
	ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE                                         = 5890
	ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME                                    = 5905
	ERROR_CLUSTER_NETINTERFACE_EXISTS                                              = 5046
	ERROR_CLUSTER_NETINTERFACE_NOT_FOUND                                           = 5047
	ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE                                          = 5064
	ERROR_CLUSTER_NETWORK_ALREADY_ONLINE                                           = 5063
	ERROR_CLUSTER_NETWORK_EXISTS                                                   = 5044
	ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS                                           = 5067
	ERROR_CLUSTER_NETWORK_NOT_FOUND                                                = 5045
	ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP                                         = 5894
	ERROR_CLUSTER_NETWORK_NOT_INTERNAL                                             = 5060
	ERROR_CLUSTER_NODE_ALREADY_DOWN                                                = 5062
	ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT                                        = 5088
	ERROR_CLUSTER_NODE_ALREADY_MEMBER                                              = 5065
	ERROR_CLUSTER_NODE_ALREADY_UP                                                  = 5061
	ERROR_CLUSTER_NODE_DOWN                                                        = 5050
	ERROR_CLUSTER_NODE_EXISTS                                                      = 5040
	ERROR_CLUSTER_NODE_NOT_FOUND                                                   = 5042
	ERROR_CLUSTER_NODE_NOT_MEMBER                                                  = 5052
	ERROR_CLUSTER_NODE_NOT_PAUSED                                                  = 5058
	ERROR_CLUSTER_NODE_NOT_READY                                                   = 5072
	ERROR_CLUSTER_NODE_PAUSED                                                      = 5070
	ERROR_CLUSTER_NODE_SHUTTING_DOWN                                               = 5073
	ERROR_CLUSTER_NODE_UNREACHABLE                                                 = 5051
	ERROR_CLUSTER_NODE_UP                                                          = 5056
	ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED                                       = 5081
	ERROR_CLUSTER_NO_SECURITY_CONTEXT                                              = 5059
	ERROR_CLUSTER_OLD_VERSION                                                      = 5904
	ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST                                            = 5082
	ERROR_CLUSTER_PARAMETER_MISMATCH                                               = 5897
	ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH                                      = 5895
	ERROR_CLUSTER_QUORUMLOG_NOT_FOUND                                              = 5891
	ERROR_CLUSTER_RESNAME_NOT_FOUND                                                = 5080
	ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND                                          = 5078
	ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED                                            = 5079
	ERROR_CLUSTER_SHUTTING_DOWN                                                    = 5022
	ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED                                            = 5077
	ERROR_CLUSTER_WRONG_OS_VERSION                                                 = 5899
	ERROR_COLORSPACE_MISMATCH                                                      = 2021
	ERROR_COMMITMENT_LIMIT                                                         = 1455
	ERROR_COM_TASK_STOP_PENDING                                                    = 15501
	ERROR_CONNECTED_OTHER_PASSWORD                                                 = 2108
	ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT                                         = 2109
	ERROR_CONNECTION_ABORTED                                                       = 1236
	ERROR_CONNECTION_ACTIVE                                                        = 1230
	ERROR_CONNECTION_COUNT_LIMIT                                                   = 1238
	ERROR_CONNECTION_INVALID                                                       = 1229
	ERROR_CONNECTION_REFUSED                                                       = 1225
	ERROR_CONNECTION_UNAVAIL                                                       = 1201
	ERROR_CONTEXT_EXPIRED                                                          = 1931
	ERROR_CONTINUE                                                                 = 1246
	ERROR_CONTROLLING_IEPORT                                                       = 4329
	ERROR_CONTROL_ID_NOT_FOUND                                                     = 1421
	ERROR_CORE_RESOURCE                                                            = 5026
	ERROR_COUNTER_TIMEOUT                                                          = 1121
	ERROR_CRC                                                                      = 23
	ERROR_CREATE_FAILED                                                            = 1631
	ERROR_CSCSHARE_OFFLINE                                                         = 1262
	ERROR_CTX_BAD_VIDEO_MODE                                                       = 7025
	ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY                                           = 7005
	ERROR_CTX_CLIENT_LICENSE_IN_USE                                                = 7052
	ERROR_CTX_CLIENT_LICENSE_NOT_SET                                               = 7053
	ERROR_CTX_CLIENT_QUERY_TIMEOUT                                                 = 7040
	ERROR_CTX_CLOSE_PENDING                                                        = 7007
	ERROR_CTX_CONSOLE_CONNECT                                                      = 7042
	ERROR_CTX_CONSOLE_DISCONNECT                                                   = 7041
	ERROR_CTX_GRAPHICS_INVALID                                                     = 7035
	ERROR_CTX_INVALID_MODEMNAME                                                    = 7010
	ERROR_CTX_INVALID_PD                                                           = 7002
	ERROR_CTX_INVALID_WD                                                           = 7049
	ERROR_CTX_LICENSE_CLIENT_INVALID                                               = 7055
	ERROR_CTX_LICENSE_EXPIRED                                                      = 7056
	ERROR_CTX_LICENSE_NOT_AVAILABLE                                                = 7054
	ERROR_CTX_LOGON_DISABLED                                                       = 7037
	ERROR_CTX_MODEM_INF_NOT_FOUND                                                  = 7009
	ERROR_CTX_MODEM_RESPONSE_BUSY                                                  = 7015
	ERROR_CTX_MODEM_RESPONSE_ERROR                                                 = 7011
	ERROR_CTX_MODEM_RESPONSE_NO_CARRIER                                            = 7013
	ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE                                           = 7014
	ERROR_CTX_MODEM_RESPONSE_TIMEOUT                                               = 7012
	ERROR_CTX_MODEM_RESPONSE_VOICE                                                 = 7016
	ERROR_CTX_NOT_CONSOLE                                                          = 7038
	ERROR_CTX_NO_OUTBUF                                                            = 7008
	ERROR_CTX_PD_NOT_FOUND                                                         = 7003
	ERROR_CTX_SERVICE_NAME_COLLISION                                               = 7006
	ERROR_CTX_SHADOW_DENIED                                                        = 7044
	ERROR_CTX_SHADOW_DISABLED                                                      = 7051
	ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE                                          = 7058
	ERROR_CTX_SHADOW_INVALID                                                       = 7050
	ERROR_CTX_SHADOW_NOT_RUNNING                                                   = 7057
	ERROR_CTX_TD_ERROR                                                             = 7017
	ERROR_CTX_WD_NOT_FOUND                                                         = 7004
	ERROR_CTX_WINSTATION_ACCESS_DENIED                                             = 7045
	ERROR_CTX_WINSTATION_ALREADY_EXISTS                                            = 7023
	ERROR_CTX_WINSTATION_BUSY                                                      = 7024
	ERROR_CTX_WINSTATION_NAME_INVALID                                              = 7001
	ERROR_CTX_WINSTATION_NOT_FOUND                                                 = 7022
	ERROR_CURRENT_DIRECTORY                                                        = 16
	ERROR_CURRENT_DOMAIN_NOT_ALLOWED                                               = 1399
	ERROR_DATABASE_BACKUP_CORRUPT                                                  = 5087
	ERROR_DATABASE_DOES_NOT_EXIST                                                  = 1065
	ERROR_DATABASE_FAILURE                                                         = 4313
	ERROR_DATABASE_FULL                                                            = 4314
	ERROR_DATATYPE_MISMATCH                                                        = 1629
	ERROR_DC_NOT_FOUND                                                             = 1425
	ERROR_DDE_FAIL                                                                 = 1156
	ERROR_DEBUGGER_INACTIVE                                                        = 1284
	ERROR_DECRYPTION_FAILED                                                        = 6001
	ERROR_DELAY_LOAD_FAILED                                                        = 1285
	ERROR_DELETE_PENDING                                                           = 303
	ERROR_DELETING_EXISTING_APPLICATIONDATA_STORE_FAILED                           = 15621
	ERROR_DELETING_ICM_XFORM                                                       = 2019
	ERROR_DEPENDENCY_ALREADY_EXISTS                                                = 5003
	ERROR_DEPENDENCY_NOT_ALLOWED                                                   = 5069
	ERROR_DEPENDENCY_NOT_FOUND                                                     = 5002
	ERROR_DEPENDENT_RESOURCE_EXISTS                                                = 5001
	ERROR_DEPENDENT_SERVICES_RUNNING                                               = 1051
	ERROR_DEPLOYMENT_BLOCKED_BY_POLICY                                             = 15617
	ERROR_DESTINATION_ELEMENT_FULL                                                 = 1161
	ERROR_DESTROY_OBJECT_OF_OTHER_THREAD                                           = 1435
	ERROR_DEVICE_ALREADY_REMEMBERED                                                = 1202
	ERROR_DEVICE_DOOR_OPEN                                                         = 1166
	ERROR_DEVICE_IN_USE                                                            = 2404
	ERROR_DEVICE_NOT_AVAILABLE                                                     = 4319
	ERROR_DEVICE_NOT_CONNECTED                                                     = 1167
	ERROR_DEVICE_NOT_PARTITIONED                                                   = 1107
	ERROR_DEVICE_REINITIALIZATION_NEEDED                                           = 1164
	ERROR_DEVICE_REMOVED                                                           = 1617
	ERROR_DEVICE_REQUIRES_CLEANING                                                 = 1165
	ERROR_DEV_NOT_EXIST                                                            = 55
	ERROR_DHCP_ADDRESS_CONFLICT                                                    = 4100
	ERROR_DIFFERENT_SERVICE_ACCOUNT                                                = 1079
	ERROR_DIRECTORY                                                                = 267
	ERROR_DIRECT_ACCESS_HANDLE                                                     = 130
	ERROR_DIR_EFS_DISALLOWED                                                       = 6010
	ERROR_DIR_NOT_EMPTY                                                            = 145
	ERROR_DIR_NOT_ROOT                                                             = 144
	ERROR_DISCARDED                                                                = 157
	ERROR_DISK_CHANGE                                                              = 107
	ERROR_DISK_CORRUPT                                                             = 1393
	ERROR_DISK_FULL                                                                = 112
	ERROR_DISK_OPERATION_FAILED                                                    = 1127
	ERROR_DISK_RECALIBRATE_FAILED                                                  = 1126
	ERROR_DISK_RESET_FAILED                                                        = 1128
	ERROR_DISK_TOO_FRAGMENTED                                                      = 302
	ERROR_DLL_INIT_FAILED                                                          = 1114
	ERROR_DLL_NOT_FOUND                                                            = 1157
	ERROR_DOMAIN_CONTROLLER_EXISTS                                                 = 1250
	ERROR_DOMAIN_CONTROLLER_NOT_FOUND                                              = 1908
	ERROR_DOMAIN_EXISTS                                                            = 1356
	ERROR_DOMAIN_LIMIT_EXCEEDED                                                    = 1357
	ERROR_DOMAIN_TRUST_INCONSISTENT                                                = 1810
	ERROR_DOWNGRADE_DETECTED                                                       = 1265
	ERROR_DRIVER_BLOCKED                                                           = 1275
	ERROR_DRIVE_LOCKED                                                             = 108
	ERROR_DRIVE_MEDIA_MISMATCH                                                     = 4303
	ERROR_DS_ADD_REPLICA_INHIBITED                                                 = 8302
	ERROR_DS_ADMIN_LIMIT_EXCEEDED                                                  = 8228
	ERROR_DS_AFFECTS_MULTIPLE_DSAS                                                 = 8249
	ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER                                         = 8578
	ERROR_DS_ALIASED_OBJ_MISSING                                                   = 8334
	ERROR_DS_ALIAS_DEREF_PROBLEM                                                   = 8244
	ERROR_DS_ALIAS_POINTS_TO_ALIAS                                                 = 8336
	ERROR_DS_ALIAS_PROBLEM                                                         = 8241
	ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS                                             = 8205
	ERROR_DS_ATTRIBUTE_OWNED_BY_SAM                                                = 8346
	ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED                                              = 8204
	ERROR_DS_ATT_ALREADY_EXISTS                                                    = 8318
	ERROR_DS_ATT_IS_NOT_ON_OBJ                                                     = 8310
	ERROR_DS_ATT_NOT_DEF_FOR_CLASS                                                 = 8317
	ERROR_DS_ATT_NOT_DEF_IN_SCHEMA                                                 = 8303
	ERROR_DS_ATT_SCHEMA_REQ_ID                                                     = 8399
	ERROR_DS_ATT_SCHEMA_REQ_SYNTAX                                                 = 8416
	ERROR_DS_ATT_VAL_ALREADY_EXISTS                                                = 8323
	ERROR_DS_AUTHORIZATION_FAILED                                                  = 8599
	ERROR_DS_AUTH_METHOD_NOT_SUPPORTED                                             = 8231
	ERROR_DS_AUTH_UNKNOWN                                                          = 8234
	ERROR_DS_AUX_CLS_TEST_FAIL                                                     = 8389
	ERROR_DS_BACKLINK_WITHOUT_LINK                                                 = 8482
	ERROR_DS_BAD_ATT_SCHEMA_SYNTAX                                                 = 8400
	ERROR_DS_BAD_HIERARCHY_FILE                                                    = 8425
	ERROR_DS_BAD_INSTANCE_TYPE                                                     = 8313
	ERROR_DS_BAD_NAME_SYNTAX                                                       = 8335
	ERROR_DS_BAD_RDN_ATT_ID_SYNTAX                                                 = 8392
	ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED                                          = 8426
	ERROR_DS_BUSY                                                                  = 8206
	ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD                                         = 8585
	ERROR_DS_CANT_ADD_ATT_VALUES                                                   = 8320
	ERROR_DS_CANT_ADD_SYSTEM_ONLY                                                  = 8358
	ERROR_DS_CANT_ADD_TO_GC                                                        = 8550
	ERROR_DS_CANT_CACHE_ATT                                                        = 8401
	ERROR_DS_CANT_CACHE_CLASS                                                      = 8402
	ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC                                           = 8553
	ERROR_DS_CANT_CREATE_UNDER_SCHEMA                                              = 8510
	ERROR_DS_CANT_DELETE                                                           = 8398
	ERROR_DS_CANT_DELETE_DSA_OBJ                                                   = 8340
	ERROR_DS_CANT_DEL_MASTER_CROSSREF                                              = 8375
	ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC                                         = 8604
	ERROR_DS_CANT_DEREF_ALIAS                                                      = 8337
	ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN                                    = 8603
	ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF                                    = 8589
	ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN                                           = 8537
	ERROR_DS_CANT_FIND_DSA_OBJ                                                     = 8419
	ERROR_DS_CANT_FIND_EXPECTED_NC                                                 = 8420
	ERROR_DS_CANT_FIND_NC_IN_CACHE                                                 = 8421
	ERROR_DS_CANT_MIX_MASTER_AND_REPS                                              = 8331
	ERROR_DS_CANT_MOD_OBJ_CLASS                                                    = 8215
	ERROR_DS_CANT_MOD_PRIMARYGROUPID                                               = 8506
	ERROR_DS_CANT_MOD_SYSTEM_ONLY                                                  = 8369
	ERROR_DS_CANT_MOVE_ACCOUNT_GROUP                                               = 8498
	ERROR_DS_CANT_MOVE_APP_BASIC_GROUP                                             = 8608
	ERROR_DS_CANT_MOVE_APP_QUERY_GROUP                                             = 8609
	ERROR_DS_CANT_MOVE_DELETED_OBJECT                                              = 8489
	ERROR_DS_CANT_MOVE_RESOURCE_GROUP                                              = 8499
	ERROR_DS_CANT_ON_NON_LEAF                                                      = 8213
	ERROR_DS_CANT_ON_RDN                                                           = 8214
	ERROR_DS_CANT_REMOVE_ATT_CACHE                                                 = 8403
	ERROR_DS_CANT_REMOVE_CLASS_CACHE                                               = 8404
	ERROR_DS_CANT_REM_MISSING_ATT                                                  = 8324
	ERROR_DS_CANT_REM_MISSING_ATT_VAL                                              = 8325
	ERROR_DS_CANT_REPLACE_HIDDEN_REC                                               = 8424
	ERROR_DS_CANT_RETRIEVE_ATTS                                                    = 8481
	ERROR_DS_CANT_RETRIEVE_CHILD                                                   = 8422
	ERROR_DS_CANT_RETRIEVE_DN                                                      = 8405
	ERROR_DS_CANT_RETRIEVE_INSTANCE                                                = 8407
	ERROR_DS_CANT_RETRIEVE_SD                                                      = 8526
	ERROR_DS_CANT_START                                                            = 8531
	ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ                                         = 8560
	ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS                                       = 8493
	ERROR_DS_CHILDREN_EXIST                                                        = 8332
	ERROR_DS_CLASS_MUST_BE_CONCRETE                                                = 8359
	ERROR_DS_CLASS_NOT_DSA                                                         = 8343
	ERROR_DS_CLIENT_LOOP                                                           = 8259
	ERROR_DS_CODE_INCONSISTENCY                                                    = 8408
	ERROR_DS_COMPARE_FALSE                                                         = 8229
	ERROR_DS_COMPARE_TRUE                                                          = 8230
	ERROR_DS_CONFIDENTIALITY_REQUIRED                                              = 8237
	ERROR_DS_CONFIG_PARAM_MISSING                                                  = 8427
	ERROR_DS_CONSTRAINT_VIOLATION                                                  = 8239
	ERROR_DS_CONSTRUCTED_ATT_MOD                                                   = 8475
	ERROR_DS_CONTROL_NOT_FOUND                                                     = 8258
	ERROR_DS_COULDNT_CONTACT_FSMO                                                  = 8367
	ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE                              = 8503
	ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE                                          = 8502
	ERROR_DS_COULDNT_UPDATE_SPNS                                                   = 8525
	ERROR_DS_COUNTING_AB_INDICES_FAILED                                            = 8428
	ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD                                             = 8491
	ERROR_DS_CROSS_DOM_MOVE_ERROR                                                  = 8216
	ERROR_DS_CROSS_NC_DN_RENAME                                                    = 8368
	ERROR_DS_CROSS_REF_BUSY                                                        = 8602
	ERROR_DS_CROSS_REF_EXISTS                                                      = 8374
	ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE                                             = 8495
	ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2                                          = 8586
	ERROR_DS_DATABASE_ERROR                                                        = 8409
	ERROR_DS_DECODING_ERROR                                                        = 8253
	ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED                                      = 8536
	ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST                                      = 8535
	ERROR_DS_DIFFERENT_REPL_EPOCHS                                                 = 8593
	ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER                                        = 8615
	ERROR_DS_DNS_LOOKUP_FAILURE                                                    = 8524
	ERROR_DS_DOMAIN_RENAME_IN_PROGRESS                                             = 8612
	ERROR_DS_DOMAIN_VERSION_TOO_HIGH                                               = 8564
	ERROR_DS_DOMAIN_VERSION_TOO_LOW                                                = 8566
	ERROR_DS_DRA_ABANDON_SYNC                                                      = 8462
	ERROR_DS_DRA_ACCESS_DENIED                                                     = 8453
	ERROR_DS_DRA_BAD_DN                                                            = 8439
	ERROR_DS_DRA_BAD_INSTANCE_TYPE                                                 = 8445
	ERROR_DS_DRA_BAD_NC                                                            = 8440
	ERROR_DS_DRA_BUSY                                                              = 8438
	ERROR_DS_DRA_CONNECTION_FAILED                                                 = 8444
	ERROR_DS_DRA_DB_ERROR                                                          = 8451
	ERROR_DS_DRA_DN_EXISTS                                                         = 8441
	ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT                                           = 8544
	ERROR_DS_DRA_EXTN_CONNECTION_FAILED                                            = 8466
	ERROR_DS_DRA_GENERIC                                                           = 8436
	ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET                                          = 8464
	ERROR_DS_DRA_INCONSISTENT_DIT                                                  = 8443
	ERROR_DS_DRA_INTERNAL_ERROR                                                    = 8442
	ERROR_DS_DRA_INVALID_PARAMETER                                                 = 8437
	ERROR_DS_DRA_MAIL_PROBLEM                                                      = 8447
	ERROR_DS_DRA_MISSING_PARENT                                                    = 8460
	ERROR_DS_DRA_NAME_COLLISION                                                    = 8458
	ERROR_DS_DRA_NOT_SUPPORTED                                                     = 8454
	ERROR_DS_DRA_NO_REPLICA                                                        = 8452
	ERROR_DS_DRA_OBJ_IS_REP_SOURCE                                                 = 8450
	ERROR_DS_DRA_OBJ_NC_MISMATCH                                                   = 8545
	ERROR_DS_DRA_OUT_OF_MEM                                                        = 8446
	ERROR_DS_DRA_OUT_SCHEDULE_WINDOW                                               = 8617
	ERROR_DS_DRA_PREEMPTED                                                         = 8461
	ERROR_DS_DRA_REF_ALREADY_EXISTS                                                = 8448
	ERROR_DS_DRA_REF_NOT_FOUND                                                     = 8449
	ERROR_DS_DRA_REPL_PENDING                                                      = 8477
	ERROR_DS_DRA_RPC_CANCELLED                                                     = 8455
	ERROR_DS_DRA_SCHEMA_CONFLICT                                                   = 8543
	ERROR_DS_DRA_SCHEMA_INFO_SHIP                                                  = 8542
	ERROR_DS_DRA_SCHEMA_MISMATCH                                                   = 8418
	ERROR_DS_DRA_SHUTDOWN                                                          = 8463
	ERROR_DS_DRA_SINK_DISABLED                                                     = 8457
	ERROR_DS_DRA_SOURCE_DISABLED                                                   = 8456
	ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA                                         = 8465
	ERROR_DS_DRA_SOURCE_REINSTALLED                                                = 8459
	ERROR_DS_DRS_EXTENSIONS_CHANGED                                                = 8594
	ERROR_DS_DSA_MUST_BE_INT_MASTER                                                = 8342
	ERROR_DS_DST_DOMAIN_NOT_NATIVE                                                 = 8496
	ERROR_DS_DST_NC_MISMATCH                                                       = 8486
	ERROR_DS_DS_REQUIRED                                                           = 8478
	ERROR_DS_DUPLICATE_ID_FOUND                                                    = 8605
	ERROR_DS_DUP_LDAP_DISPLAY_NAME                                                 = 8382
	ERROR_DS_DUP_LINK_ID                                                           = 8468
	ERROR_DS_DUP_MAPI_ID                                                           = 8380
	ERROR_DS_DUP_MSDS_INTID                                                        = 8597
	ERROR_DS_DUP_OID                                                               = 8379
	ERROR_DS_DUP_RDN                                                               = 8378
	ERROR_DS_DUP_SCHEMA_ID_GUID                                                    = 8381
	ERROR_DS_ENCODING_ERROR                                                        = 8252
	ERROR_DS_EPOCH_MISMATCH                                                        = 8483
	ERROR_DS_EXISTING_AD_CHILD_NC                                                  = 8613
	ERROR_DS_EXISTS_IN_AUX_CLS                                                     = 8393
	ERROR_DS_EXISTS_IN_MAY_HAVE                                                    = 8386
	ERROR_DS_EXISTS_IN_MUST_HAVE                                                   = 8385
	ERROR_DS_EXISTS_IN_POSS_SUP                                                    = 8395
	ERROR_DS_EXISTS_IN_RDNATTID                                                    = 8598
	ERROR_DS_EXISTS_IN_SUB_CLS                                                     = 8394
	ERROR_DS_FILTER_UNKNOWN                                                        = 8254
	ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS                                          = 8555
	ERROR_DS_FOREST_VERSION_TOO_HIGH                                               = 8563
	ERROR_DS_FOREST_VERSION_TOO_LOW                                                = 8565
	ERROR_DS_GCVERIFY_ERROR                                                        = 8417
	ERROR_DS_GC_NOT_AVAILABLE                                                      = 8217
	ERROR_DS_GC_REQUIRED                                                           = 8547
	ERROR_DS_GENERIC_ERROR                                                         = 8341
	ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER                                   = 8519
	ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER                                         = 8516
	ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER                                     = 8517
	ERROR_DS_GOVERNSID_MISSING                                                     = 8410
	ERROR_DS_GROUP_CONVERSION_ERROR                                                = 8607
	ERROR_DS_HAVE_PRIMARY_MEMBERS                                                  = 8521
	ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED                                         = 8429
	ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD                                               = 8507
	ERROR_DS_ILLEGAL_MOD_OPERATION                                                 = 8311
	ERROR_DS_ILLEGAL_SUPERIOR                                                      = 8345
	ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION                                           = 8492
	ERROR_DS_INAPPROPRIATE_AUTH                                                    = 8233
	ERROR_DS_INAPPROPRIATE_MATCHING                                                = 8238
	ERROR_DS_INCOMPATIBLE_CONTROLS_USED                                            = 8574
	ERROR_DS_INCOMPATIBLE_VERSION                                                  = 8567
	ERROR_DS_INCORRECT_ROLE_OWNER                                                  = 8210
	ERROR_DS_INIT_FAILURE                                                          = 8532
	ERROR_DS_INIT_FAILURE_CONSOLE                                                  = 8561
	ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE                                     = 8512
	ERROR_DS_INSTALL_NO_SRC_SCH_VERSION                                            = 8511
	ERROR_DS_INSTALL_SCHEMA_MISMATCH                                               = 8467
	ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT                                    = 8606
	ERROR_DS_INSUFF_ACCESS_RIGHTS                                                  = 8344
	ERROR_DS_INTERNAL_FAILURE                                                      = 8430
	ERROR_DS_INVALID_ATTRIBUTE_SYNTAX                                              = 8203
	ERROR_DS_INVALID_DMD                                                           = 8360
	ERROR_DS_INVALID_DN_SYNTAX                                                     = 8242
	ERROR_DS_INVALID_GROUP_TYPE                                                    = 8513
	ERROR_DS_INVALID_LDAP_DISPLAY_NAME                                             = 8479
	ERROR_DS_INVALID_NAME_FOR_SPN                                                  = 8554
	ERROR_DS_INVALID_ROLE_OWNER                                                    = 8366
	ERROR_DS_INVALID_SCRIPT                                                        = 8600
	ERROR_DS_INVALID_SEARCH_FLAG                                                   = 8500
	ERROR_DS_IS_LEAF                                                               = 8243
	ERROR_DS_KEY_NOT_UNIQUE                                                        = 8527
	ERROR_DS_LDAP_SEND_QUEUE_FULL                                                  = 8616
	ERROR_DS_LINK_ID_NOT_AVAILABLE                                                 = 8577
	ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER                              = 8520
	ERROR_DS_LOCAL_ERROR                                                           = 8251
	ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY                                            = 8548
	ERROR_DS_LOOP_DETECT                                                           = 8246
	ERROR_DS_LOW_DSA_VERSION                                                       = 8568
	ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4                                        = 8572
	ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED                                        = 8557
	ERROR_DS_MASTERDSA_REQUIRED                                                    = 8314
	ERROR_DS_MAX_OBJ_SIZE_EXCEEDED                                                 = 8304
	ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY                                          = 8201
	ERROR_DS_MISSING_EXPECTED_ATT                                                  = 8411
	ERROR_DS_MISSING_FSMO_SETTINGS                                                 = 8434
	ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER                                      = 8497
	ERROR_DS_MISSING_REQUIRED_ATT                                                  = 8316
	ERROR_DS_MISSING_SUPREF                                                        = 8406
	ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG                                           = 8581
	ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE                                  = 8579
	ERROR_DS_MODIFYDN_WRONG_GRANDPARENT                                            = 8582
	ERROR_DS_MUST_BE_RUN_ON_DST_DC                                                 = 8558
	ERROR_DS_NAME_ERROR_DOMAIN_ONLY                                                = 8473
	ERROR_DS_NAME_ERROR_NOT_FOUND                                                  = 8470
	ERROR_DS_NAME_ERROR_NOT_UNIQUE                                                 = 8471
	ERROR_DS_NAME_ERROR_NO_MAPPING                                                 = 8472
	ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING                                     = 8474
	ERROR_DS_NAME_ERROR_RESOLVING                                                  = 8469
	ERROR_DS_NAME_ERROR_TRUST_REFERRAL                                             = 8583
	ERROR_DS_NAME_NOT_UNIQUE                                                       = 8571
	ERROR_DS_NAME_REFERENCE_INVALID                                                = 8373
	ERROR_DS_NAME_TOO_LONG                                                         = 8348
	ERROR_DS_NAME_TOO_MANY_PARTS                                                   = 8347
	ERROR_DS_NAME_TYPE_UNKNOWN                                                     = 8351
	ERROR_DS_NAME_UNPARSEABLE                                                      = 8350
	ERROR_DS_NAME_VALUE_TOO_LONG                                                   = 8349
	ERROR_DS_NAMING_MASTER_GC                                                      = 8523
	ERROR_DS_NAMING_VIOLATION                                                      = 8247
	ERROR_DS_NCNAME_MISSING_CR_REF                                                 = 8412
	ERROR_DS_NCNAME_MUST_BE_NC                                                     = 8357
	ERROR_DS_NC_MUST_HAVE_NC_PARENT                                                = 8494
	ERROR_DS_NC_STILL_HAS_DSAS                                                     = 8546
	ERROR_DS_NONEXISTENT_MAY_HAVE                                                  = 8387
	ERROR_DS_NONEXISTENT_MUST_HAVE                                                 = 8388
	ERROR_DS_NONEXISTENT_POSS_SUP                                                  = 8390
	ERROR_DS_NONSAFE_SCHEMA_CHANGE                                                 = 8508
	ERROR_DS_NON_BASE_SEARCH                                                       = 8480
	ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX                                             = 8377
	ERROR_DS_NOT_AN_OBJECT                                                         = 8352
	ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC                                            = 8487
	ERROR_DS_NOT_CLOSEST                                                           = 8588
	ERROR_DS_NOT_INSTALLED                                                         = 8200
	ERROR_DS_NOT_ON_BACKLINK                                                       = 8362
	ERROR_DS_NOT_SUPPORTED                                                         = 8256
	ERROR_DS_NOT_SUPPORTED_SORT_ORDER                                              = 8570
	ERROR_DS_NO_ATTRIBUTE_OR_VALUE                                                 = 8202
	ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN                                    = 8569
	ERROR_DS_NO_CHAINED_EVAL                                                       = 8328
	ERROR_DS_NO_CHAINING                                                           = 8327
	ERROR_DS_NO_CHECKPOINT_WITH_PDC                                                = 8551
	ERROR_DS_NO_CROSSREF_FOR_NC                                                    = 8363
	ERROR_DS_NO_DELETED_NAME                                                       = 8355
	ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS                                            = 8549
	ERROR_DS_NO_MORE_RIDS                                                          = 8209
	ERROR_DS_NO_MSDS_INTID                                                         = 8596
	ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN                                    = 8514
	ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN                                     = 8515
	ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC                                           = 8580
	ERROR_DS_NO_PARENT_OBJECT                                                      = 8329
	ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION                                          = 8533
	ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA                                              = 8306
	ERROR_DS_NO_REF_DOMAIN                                                         = 8575
	ERROR_DS_NO_REQUESTED_ATTS_FOUND                                               = 8308
	ERROR_DS_NO_RESULTS_RETURNED                                                   = 8257
	ERROR_DS_NO_RIDS_ALLOCATED                                                     = 8208
	ERROR_DS_NO_SUCH_OBJECT                                                        = 8240
	ERROR_DS_NO_TREE_DELETE_ABOVE_NC                                               = 8501
	ERROR_DS_NTDSCRIPT_PROCESS_ERROR                                               = 8592
	ERROR_DS_NTDSCRIPT_SYNTAX_ERROR                                                = 8591
	ERROR_DS_OBJECT_BEING_REMOVED                                                  = 8339
	ERROR_DS_OBJECT_CLASS_REQUIRED                                                 = 8315
	ERROR_DS_OBJECT_RESULTS_TOO_LARGE                                              = 8248
	ERROR_DS_OBJ_CLASS_NOT_DEFINED                                                 = 8371
	ERROR_DS_OBJ_CLASS_NOT_SUBCLASS                                                = 8372
	ERROR_DS_OBJ_CLASS_VIOLATION                                                   = 8212
	ERROR_DS_OBJ_GUID_EXISTS                                                       = 8361
	ERROR_DS_OBJ_NOT_FOUND                                                         = 8333
	ERROR_DS_OBJ_STRING_NAME_EXISTS                                                = 8305
	ERROR_DS_OBJ_TOO_LARGE                                                         = 8312
	ERROR_DS_OFFSET_RANGE_ERROR                                                    = 8262
	ERROR_DS_OPERATIONS_ERROR                                                      = 8224
	ERROR_DS_OUT_OF_SCOPE                                                          = 8338
	ERROR_DS_OUT_OF_VERSION_STORE                                                  = 8573
	ERROR_DS_PARAM_ERROR                                                           = 8255
	ERROR_DS_PARENT_IS_AN_ALIAS                                                    = 8330
	ERROR_DS_PDC_OPERATION_IN_PROGRESS                                             = 8490
	ERROR_DS_PROTOCOL_ERROR                                                        = 8225
	ERROR_DS_RANGE_CONSTRAINT                                                      = 8322
	ERROR_DS_RDN_DOESNT_MATCH_SCHEMA                                               = 8307
	ERROR_DS_RECALCSCHEMA_FAILED                                                   = 8396
	ERROR_DS_REFERRAL                                                              = 8235
	ERROR_DS_REFERRAL_LIMIT_EXCEEDED                                               = 8260
	ERROR_DS_REFUSING_FSMO_ROLES                                                   = 8433
	ERROR_DS_REMOTE_CROSSREF_OP_FAILED                                             = 8601
	ERROR_DS_REPLICATOR_ONLY                                                       = 8370
	ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR                         = 8595
	ERROR_DS_REPL_LIFETIME_EXCEEDED                                                = 8614
	ERROR_DS_RESERVED_LINK_ID                                                      = 8576
	ERROR_DS_RIDMGR_INIT_ERROR                                                     = 8211
	ERROR_DS_ROLE_NOT_VERIFIED                                                     = 8610
	ERROR_DS_ROOT_CANT_BE_SUBREF                                                   = 8326
	ERROR_DS_ROOT_MUST_BE_NC                                                       = 8301
	ERROR_DS_ROOT_REQUIRES_CLASS_TOP                                               = 8432
	ERROR_DS_SAM_INIT_FAILURE                                                      = 8504
	ERROR_DS_SAM_INIT_FAILURE_CONSOLE                                              = 8562
	ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY                                               = 8530
	ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD                                             = 8529
	ERROR_DS_SCHEMA_ALLOC_FAILED                                                   = 8415
	ERROR_DS_SCHEMA_NOT_LOADED                                                     = 8414
	ERROR_DS_SCHEMA_UPDATE_DISALLOWED                                              = 8509
	ERROR_DS_SECURITY_CHECKING_ERROR                                               = 8413
	ERROR_DS_SECURITY_ILLEGAL_MODIFY                                               = 8423
	ERROR_DS_SEC_DESC_INVALID                                                      = 8354
	ERROR_DS_SEC_DESC_TOO_SHORT                                                    = 8353
	ERROR_DS_SEMANTIC_ATT_TEST                                                     = 8383
	ERROR_DS_SENSITIVE_GROUP_VIOLATION                                             = 8505
	ERROR_DS_SERVER_DOWN                                                           = 8250
	ERROR_DS_SHUTTING_DOWN                                                         = 8364
	ERROR_DS_SINGLE_USER_MODE_FAILED                                               = 8590
	ERROR_DS_SINGLE_VALUE_CONSTRAINT                                               = 8321
	ERROR_DS_SIZELIMIT_EXCEEDED                                                    = 8227
	ERROR_DS_SORT_CONTROL_MISSING                                                  = 8261
	ERROR_DS_SOURCE_AUDITING_NOT_ENABLED                                           = 8552
	ERROR_DS_SOURCE_DOMAIN_IN_FOREST                                               = 8534
	ERROR_DS_SRC_AND_DST_NC_IDENTICAL                                              = 8485
	ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH                                     = 8540
	ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER                                         = 8559
	ERROR_DS_SRC_GUID_MISMATCH                                                     = 8488
	ERROR_DS_SRC_NAME_MISMATCH                                                     = 8484
	ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER                                             = 8538
	ERROR_DS_SRC_SID_EXISTS_IN_FOREST                                              = 8539
	ERROR_DS_STRING_SD_CONVERSION_FAILED                                           = 8522
	ERROR_DS_STRONG_AUTH_REQUIRED                                                  = 8232
	ERROR_DS_SUBREF_MUST_HAVE_PARENT                                               = 8356
	ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD                                            = 8376
	ERROR_DS_SUB_CLS_TEST_FAIL                                                     = 8391
	ERROR_DS_SYNTAX_MISMATCH                                                       = 8384
	ERROR_DS_THREAD_LIMIT_EXCEEDED                                                 = 8587
	ERROR_DS_TIMELIMIT_EXCEEDED                                                    = 8226
	ERROR_DS_TREE_DELETE_NOT_FINISHED                                              = 8397
	ERROR_DS_UNABLE_TO_SURRENDER_ROLES                                             = 8435
	ERROR_DS_UNAVAILABLE                                                           = 8207
	ERROR_DS_UNAVAILABLE_CRIT_EXTENSION                                            = 8236
	ERROR_DS_UNICODEPWD_NOT_IN_QUOTES                                              = 8556
	ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER                                      = 8518
	ERROR_DS_UNKNOWN_ERROR                                                         = 8431
	ERROR_DS_UNKNOWN_OPERATION                                                     = 8365
	ERROR_DS_UNWILLING_TO_PERFORM                                                  = 8245
	ERROR_DS_USER_BUFFER_TO_SMALL                                                  = 8309
	ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL                                       = 8611
	ERROR_DS_WRONG_LINKED_ATT_SYNTAX                                               = 8528
	ERROR_DS_WRONG_OM_OBJ_CLASS                                                    = 8476
	ERROR_DUPLICATE_SERVICE_NAME                                                   = 1078
	ERROR_DUPLICATE_TAG                                                            = 2014
	ERROR_DUP_DOMAINNAME                                                           = 1221
	ERROR_DUP_NAME                                                                 = 52
	ERROR_DYNLINK_FROM_INVALID_RING                                                = 196
	ERROR_EAS_DIDNT_FIT                                                            = 275
	ERROR_EAS_NOT_SUPPORTED                                                        = 282
	ERROR_EA_ACCESS_DENIED                                                         = 994
	ERROR_EA_FILE_CORRUPT                                                          = 276
	ERROR_EA_LIST_INCONSISTENT                                                     = 255
	ERROR_EA_TABLE_FULL                                                            = 277
	ERROR_EC_CIRCULAR_FORWARDING                                                   = 15082
	ERROR_EC_CREDSTORE_FULL                                                        = 15083
	ERROR_EC_CRED_NOT_FOUND                                                        = 15084
	ERROR_EC_LOG_DISABLED                                                          = 15081
	ERROR_EC_NO_ACTIVE_CHANNEL                                                     = 15085
	ERROR_EC_SUBSCRIPTION_CANNOT_ACTIVATE                                          = 15080
	ERROR_EFS_ALG_BLOB_TOO_BIG                                                     = 6013
	ERROR_EFS_DISABLED                                                             = 6015
	ERROR_EFS_SERVER_NOT_TRUSTED                                                   = 6011
	ERROR_EFS_VERSION_NOT_SUPPORT                                                  = 6016
	ERROR_EMPTY                                                                    = 4306
	ERROR_ENCRYPTION_FAILED                                                        = 6000
	ERROR_END_OF_MEDIA                                                             = 1100
	ERROR_ENVVAR_NOT_FOUND                                                         = 203
	ERROR_EOM_OVERFLOW                                                             = 1129
	ERROR_EVENTLOG_CANT_START                                                      = 1501
	ERROR_EVENTLOG_FILE_CHANGED                                                    = 1503
	ERROR_EVENTLOG_FILE_CORRUPT                                                    = 1500
	ERROR_EVT_CANNOT_OPEN_CHANNEL_OF_QUERY                                         = 15036
	ERROR_EVT_CHANNEL_CANNOT_ACTIVATE                                              = 15025
	ERROR_EVT_CHANNEL_NOT_FOUND                                                    = 15007
	ERROR_EVT_CONFIGURATION_ERROR                                                  = 15010
	ERROR_EVT_EVENT_DEFINITION_NOT_FOUND                                           = 15032
	ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND                                             = 15003
	ERROR_EVT_FILTER_ALREADYSCOPED                                                 = 15014
	ERROR_EVT_FILTER_INVARG                                                        = 15016
	ERROR_EVT_FILTER_INVTEST                                                       = 15017
	ERROR_EVT_FILTER_INVTYPE                                                       = 15018
	ERROR_EVT_FILTER_NOTELTSET                                                     = 15015
	ERROR_EVT_FILTER_OUT_OF_RANGE                                                  = 15038
	ERROR_EVT_FILTER_PARSEERR                                                      = 15019
	ERROR_EVT_FILTER_TOO_COMPLEX                                                   = 15026
	ERROR_EVT_FILTER_UNEXPECTEDTOKEN                                               = 15021
	ERROR_EVT_FILTER_UNSUPPORTEDOP                                                 = 15020
	ERROR_EVT_INVALID_CHANNEL_PATH                                                 = 15000
	ERROR_EVT_INVALID_CHANNEL_PROPERTY_VALUE                                       = 15023
	ERROR_EVT_INVALID_EVENT_DATA                                                   = 15005
	ERROR_EVT_INVALID_OPERATION_OVER_ENABLED_DIRECT_CHANNEL                        = 15022
	ERROR_EVT_INVALID_PUBLISHER_NAME                                               = 15004
	ERROR_EVT_INVALID_PUBLISHER_PROPERTY_VALUE                                     = 15024
	ERROR_EVT_INVALID_QUERY                                                        = 15001
	ERROR_EVT_MALFORMED_XML_TEXT                                                   = 15008
	ERROR_EVT_MAX_INSERTS_REACHED                                                  = 15031
	ERROR_EVT_MESSAGE_ID_NOT_FOUND                                                 = 15028
	ERROR_EVT_MESSAGE_LOCALE_NOT_FOUND                                             = 15033
	ERROR_EVT_MESSAGE_NOT_FOUND                                                    = 15027
	ERROR_EVT_NON_VALIDATING_MSXML                                                 = 15013
	ERROR_EVT_PUBLISHER_DISABLED                                                   = 15037
	ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND                                         = 15002
	ERROR_EVT_QUERY_RESULT_INVALID_POSITION                                        = 15012
	ERROR_EVT_QUERY_RESULT_STALE                                                   = 15011
	ERROR_EVT_SUBSCRIPTION_TO_DIRECT_CHANNEL                                       = 15009
	ERROR_EVT_UNRESOLVED_PARAMETER_INSERT                                          = 15030
	ERROR_EVT_UNRESOLVED_VALUE_INSERT                                              = 15029
	ERROR_EVT_VERSION_TOO_NEW                                                      = 15035
	ERROR_EVT_VERSION_TOO_OLD                                                      = 15034
	ERROR_EXCEPTION_IN_SERVICE                                                     = 1064
	ERROR_EXCL_SEM_ALREADY_OWNED                                                   = 101
	ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY                                          = 217
	ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY                                   = 218
	ERROR_EXE_MACHINE_TYPE_MISMATCH                                                = 216
	ERROR_EXE_MARKED_INVALID                                                       = 192
	ERROR_EXTENDED_ERROR                                                           = 1208
	ERROR_FAILED_SERVICE_CONTROLLER_CONNECT                                        = 1063
	ERROR_FAIL_I24                                                                 = 83
	ERROR_FILEMARK_DETECTED                                                        = 1101
	ERROR_FILENAME_EXCED_RANGE                                                     = 206
	ERROR_FILE_CHECKED_OUT                                                         = 220
	ERROR_FILE_CORRUPT                                                             = 1392
	ERROR_FILE_ENCRYPTED                                                           = 6002
	ERROR_FILE_EXISTS                                                              = 80
	ERROR_FILE_INVALID                                                             = 1006
	ERROR_FILE_NOT_ENCRYPTED                                                       = 6007
	ERROR_FILE_NOT_FOUND                                                           = 2
	ERROR_FILE_OFFLINE                                                             = 4350
	ERROR_FILE_READ_ONLY                                                           = 6009
	ERROR_FILE_TOO_LARGE                                                           = 223
	ERROR_FLOPPY_BAD_REGISTERS                                                     = 1125
	ERROR_FLOPPY_ID_MARK_NOT_FOUND                                                 = 1122
	ERROR_FLOPPY_UNKNOWN_ERROR                                                     = 1124
	ERROR_FLOPPY_WRONG_CYLINDER                                                    = 1123
	ERROR_FORMS_AUTH_REQUIRED                                                      = 224
	ERROR_FULLSCREEN_MODE                                                          = 1007
	ERROR_FULL_BACKUP                                                              = 4004
	ERROR_FUNCTION_FAILED                                                          = 1627
	ERROR_FUNCTION_NOT_CALLED                                                      = 1626
	ERROR_GENERIC_COMMAND_FAILED                                                   = 14109
	ERROR_GENERIC_NOT_MAPPED                                                       = 1360
	ERROR_GEN_FAILURE                                                              = 31
	ERROR_GLOBAL_ONLY_HOOK                                                         = 1429
	ERROR_GPIO_CLIENT_INFORMATION_INVALID                                          = 15322
	ERROR_GPIO_INCOMPATIBLE_CONNECT_MODE                                           = 15326
	ERROR_GPIO_INTERRUPT_ALREADY_UNMASKED                                          = 15327
	ERROR_GPIO_INVALID_REGISTRATION_PACKET                                         = 15324
	ERROR_GPIO_OPERATION_DENIED                                                    = 15325
	ERROR_GPIO_VERSION_NOT_SUPPORTED                                               = 15323
	ERROR_GRACEFUL_DISCONNECT                                                      = 1226
	ERROR_GROUP_EXISTS                                                             = 1318
	ERROR_GROUP_NOT_AVAILABLE                                                      = 5012
	ERROR_GROUP_NOT_FOUND                                                          = 5013
	ERROR_GROUP_NOT_ONLINE                                                         = 5014
	ERROR_HANDLE_DISK_FULL                                                         = 39
	ERROR_HANDLE_EOF                                                               = 38
	ERROR_HASH_NOT_PRESENT                                                         = 15301
	ERROR_HASH_NOT_SUPPORTED                                                       = 15300
	ERROR_HOOK_NEEDS_HMOD                                                          = 1428
	ERROR_HOOK_NOT_INSTALLED                                                       = 1431
	ERROR_HOOK_TYPE_NOT_ALLOWED                                                    = 1458
	ERROR_HOST_DOWN                                                                = 1256
	ERROR_HOST_NODE_NOT_AVAILABLE                                                  = 5005
	ERROR_HOST_NODE_NOT_GROUP_OWNER                                                = 5016
	ERROR_HOST_NODE_NOT_RESOURCE_OWNER                                             = 5015
	ERROR_HOST_UNREACHABLE                                                         = 1232
	ERROR_HOTKEY_ALREADY_REGISTERED                                                = 1409
	ERROR_HOTKEY_NOT_REGISTERED                                                    = 1419
	ERROR_HWNDS_HAVE_DIFF_PARENT                                                   = 1441
	ERROR_ICM_NOT_ENABLED                                                          = 2018
	ERROR_IEPORT_FULL                                                              = 4341
	ERROR_ILLEGAL_ELEMENT_ADDRESS                                                  = 1162
	ERROR_ILL_FORMED_PASSWORD                                                      = 1324
	ERROR_INCORRECT_ADDRESS                                                        = 1241
	ERROR_INCORRECT_SIZE                                                           = 1462
	ERROR_INC_BACKUP                                                               = 4003
	ERROR_INDEX_ABSENT                                                             = 1611
	ERROR_INDIGENOUS_TYPE                                                          = 4338
	ERROR_INFLOOP_IN_RELOC_CHAIN                                                   = 202
	ERROR_INSTALL_ALREADY_RUNNING                                                  = 1618
	ERROR_INSTALL_CANCEL                                                           = 15608
	ERROR_INSTALL_DEREGISTRATION_FAILURE                                           = 15607
	ERROR_INSTALL_FAILED                                                           = 15609
	ERROR_INSTALL_FAILURE                                                          = 1603
	ERROR_INSTALL_FIREWALL_SERVICE_NOT_RUNNING                                     = 15626
	ERROR_INSTALL_INVALID_PACKAGE                                                  = 15602
	ERROR_INSTALL_LANGUAGE_UNSUPPORTED                                             = 1623
	ERROR_INSTALL_LOG_FAILURE                                                      = 1622
	ERROR_INSTALL_NETWORK_FAILURE                                                  = 15605
	ERROR_INSTALL_NOTUSED                                                          = 1634
	ERROR_INSTALL_OPEN_PACKAGE_FAILED                                              = 15600
	ERROR_INSTALL_OUT_OF_DISK_SPACE                                                = 15604
	ERROR_INSTALL_PACKAGE_DOWNGRADE                                                = 15622
	ERROR_INSTALL_PACKAGE_INVALID                                                  = 1620
	ERROR_INSTALL_PACKAGE_NOT_FOUND                                                = 15601
	ERROR_INSTALL_PACKAGE_OPEN_FAILED                                              = 1619
	ERROR_INSTALL_PACKAGE_REJECTED                                                 = 1625
	ERROR_INSTALL_PACKAGE_VERSION                                                  = 1613
	ERROR_INSTALL_PLATFORM_UNSUPPORTED                                             = 1633
	ERROR_INSTALL_POLICY_FAILURE                                                   = 15615
	ERROR_INSTALL_PREREQUISITE_FAILED                                              = 15613
	ERROR_INSTALL_REGISTRATION_FAILURE                                             = 15606
	ERROR_INSTALL_REMOTE_DISALLOWED                                                = 1640
	ERROR_INSTALL_REMOTE_PROHIBITED                                                = 1645
	ERROR_INSTALL_RESOLVE_DEPENDENCY_FAILED                                        = 15603
	ERROR_INSTALL_SERVICE_FAILURE                                                  = 1601
	ERROR_INSTALL_SOURCE_ABSENT                                                    = 1612
	ERROR_INSTALL_SUSPEND                                                          = 1604
	ERROR_INSTALL_TEMP_UNWRITABLE                                                  = 1632
	ERROR_INSTALL_TRANSFORM_FAILURE                                                = 1624
	ERROR_INSTALL_TRANSFORM_REJECTED                                               = 1644
	ERROR_INSTALL_UI_FAILURE                                                       = 1621
	ERROR_INSTALL_USEREXIT                                                         = 1602
	ERROR_INSUFFICIENT_BUFFER                                                      = 122
	ERROR_INTERNAL_DB_CORRUPTION                                                   = 1358
	ERROR_INTERNAL_DB_ERROR                                                        = 1383
	ERROR_INTERNAL_ERROR                                                           = 1359
	ERROR_INVALID_ACCEL_HANDLE                                                     = 1403
	ERROR_INVALID_ACCESS                                                           = 12
	ERROR_INVALID_ACCOUNT_NAME                                                     = 1315
	ERROR_INVALID_ACL                                                              = 1336
	ERROR_INVALID_ADDRESS                                                          = 487
	ERROR_INVALID_AT_INTERRUPT_TIME                                                = 104
	ERROR_INVALID_BLOCK                                                            = 9
	ERROR_INVALID_BLOCK_LENGTH                                                     = 1106
	ERROR_INVALID_CATEGORY                                                         = 117
	ERROR_INVALID_CLEANER                                                          = 4310
	ERROR_INVALID_CMM                                                              = 2010
	ERROR_INVALID_COLORINDEX                                                       = 2022
	ERROR_INVALID_COLORSPACE                                                       = 2017
	ERROR_INVALID_COMBOBOX_MESSAGE                                                 = 1422
	ERROR_INVALID_COMMAND_LINE                                                     = 1639
	ERROR_INVALID_COMPUTERNAME                                                     = 1210
	ERROR_INVALID_CURSOR_HANDLE                                                    = 1402
	ERROR_INVALID_DATA                                                             = 13
	ERROR_INVALID_DATATYPE                                                         = 1804
	ERROR_INVALID_DLL                                                              = 1154
	ERROR_INVALID_DOMAINNAME                                                       = 1212
	ERROR_INVALID_DOMAIN_ROLE                                                      = 1354
	ERROR_INVALID_DOMAIN_STATE                                                     = 1353
	ERROR_INVALID_DRIVE                                                            = 15
	ERROR_INVALID_DRIVE_OBJECT                                                     = 4321
	ERROR_INVALID_DWP_HANDLE                                                       = 1405
	ERROR_INVALID_EA_HANDLE                                                        = 278
	ERROR_INVALID_EA_NAME                                                          = 254
	ERROR_INVALID_EDIT_HEIGHT                                                      = 1424
	ERROR_INVALID_ENVIRONMENT                                                      = 1805
	ERROR_INVALID_EVENTNAME                                                        = 1211
	ERROR_INVALID_EVENT_COUNT                                                      = 151
	ERROR_INVALID_EXE_SIGNATURE                                                    = 191
	ERROR_INVALID_FIELD                                                            = 1616
	ERROR_INVALID_FILTER_PROC                                                      = 1427
	ERROR_INVALID_FLAGS                                                            = 1004
	ERROR_INVALID_FLAG_NUMBER                                                      = 186
	ERROR_INVALID_FORM_NAME                                                        = 1902
	ERROR_INVALID_FORM_SIZE                                                        = 1903
	ERROR_INVALID_FUNCTION                                                         = 1
	ERROR_INVALID_GROUPNAME                                                        = 1209
	ERROR_INVALID_GROUP_ATTRIBUTES                                                 = 1345
	ERROR_INVALID_GW_COMMAND                                                       = 1443
	ERROR_INVALID_HANDLE                                                           = 6
	ERROR_INVALID_HANDLE_STATE                                                     = 1609
	ERROR_INVALID_HOOK_FILTER                                                      = 1426
	ERROR_INVALID_HOOK_HANDLE                                                      = 1404
	ERROR_INVALID_ICON_HANDLE                                                      = 1414
	ERROR_INVALID_ID_AUTHORITY                                                     = 1343
	ERROR_INVALID_IMPORT_OF_NON_DLL                                                = 1276
	ERROR_INVALID_INDEX                                                            = 1413
	ERROR_INVALID_KEYBOARD_HANDLE                                                  = 1457
	ERROR_INVALID_LB_MESSAGE                                                       = 1432
	ERROR_INVALID_LEVEL                                                            = 124
	ERROR_INVALID_LIBRARY                                                          = 4301
	ERROR_INVALID_LIST_FORMAT                                                      = 153
	ERROR_INVALID_LOGON_HOURS                                                      = 1328
	ERROR_INVALID_LOGON_TYPE                                                       = 1367
	ERROR_INVALID_MEDIA                                                            = 4300
	ERROR_INVALID_MEDIA_POOL                                                       = 4302
	ERROR_INVALID_MEMBER                                                           = 1388
	ERROR_INVALID_MENU_HANDLE                                                      = 1401
	ERROR_INVALID_MESSAGE                                                          = 1002
	ERROR_INVALID_MESSAGEDEST                                                      = 1218
	ERROR_INVALID_MESSAGENAME                                                      = 1217
	ERROR_INVALID_MINALLOCSIZE                                                     = 195
	ERROR_INVALID_MODULETYPE                                                       = 190
	ERROR_INVALID_MONITOR_HANDLE                                                   = 1461
	ERROR_INVALID_MSGBOX_STYLE                                                     = 1438
	ERROR_INVALID_NAME                                                             = 123
	ERROR_INVALID_NETNAME                                                          = 1214
	ERROR_INVALID_OPERATION                                                        = 4317
	ERROR_INVALID_OPERATION_ON_QUORUM                                              = 5068
	ERROR_INVALID_OPLOCK_PROTOCOL                                                  = 301
	ERROR_INVALID_ORDINAL                                                          = 182
	ERROR_INVALID_OWNER                                                            = 1307
	ERROR_INVALID_PARAMETER                                                        = 87
	ERROR_INVALID_PASSWORD                                                         = 86
	ERROR_INVALID_PASSWORDNAME                                                     = 1216
	ERROR_INVALID_PIXEL_FORMAT                                                     = 2000
	ERROR_INVALID_PRIMARY_GROUP                                                    = 1308
	ERROR_INVALID_PRINTER_COMMAND                                                  = 1803
	ERROR_INVALID_PRINTER_NAME                                                     = 1801
	ERROR_INVALID_PRINTER_STATE                                                    = 1906
	ERROR_INVALID_PRINT_MONITOR                                                    = 3007
	ERROR_INVALID_PRIORITY                                                         = 1800
	ERROR_INVALID_PROFILE                                                          = 2011
	ERROR_INVALID_REPARSE_DATA                                                     = 4392
	ERROR_INVALID_RUNLEVEL_SETTING                                                 = 15401
	ERROR_INVALID_SCROLLBAR_RANGE                                                  = 1448
	ERROR_INVALID_SECURITY_DESCR                                                   = 1338
	ERROR_INVALID_SEGDPL                                                           = 198
	ERROR_INVALID_SEGMENT_NUMBER                                                   = 180
	ERROR_INVALID_SEPARATOR_FILE                                                   = 1799
	ERROR_INVALID_SERVER_STATE                                                     = 1352
	ERROR_INVALID_SERVICENAME                                                      = 1213
	ERROR_INVALID_SERVICE_ACCOUNT                                                  = 1057
	ERROR_INVALID_SERVICE_CONTROL                                                  = 1052
	ERROR_INVALID_SERVICE_LOCK                                                     = 1071
	ERROR_INVALID_SHARENAME                                                        = 1215
	ERROR_INVALID_SHOWWIN_COMMAND                                                  = 1449
	ERROR_INVALID_SID                                                              = 1337
	ERROR_INVALID_SIGNAL_NUMBER                                                    = 209
	ERROR_INVALID_SPI_VALUE                                                        = 1439
	ERROR_INVALID_STACKSEG                                                         = 189
	ERROR_INVALID_STAGED_SIGNATURE                                                 = 15620
	ERROR_INVALID_STARTING_CODESEG                                                 = 188
	ERROR_INVALID_STATE                                                            = 5023
	ERROR_INVALID_SUB_AUTHORITY                                                    = 1335
	ERROR_INVALID_TABLE                                                            = 1628
	ERROR_INVALID_TARGET_HANDLE                                                    = 114
	ERROR_INVALID_THREAD_ID                                                        = 1444
	ERROR_INVALID_TIME                                                             = 1901
	ERROR_INVALID_TOKEN                                                            = 315
	ERROR_INVALID_TRANSFORM                                                        = 2020
	ERROR_INVALID_USER_BUFFER                                                      = 1784
	ERROR_INVALID_VERIFY_SWITCH                                                    = 118
	ERROR_INVALID_WINDOW_HANDLE                                                    = 1400
	ERROR_INVALID_WINDOW_STYLE                                                     = 2002
	ERROR_INVALID_WORKSTATION                                                      = 1329
	ERROR_IOPL_NOT_ENABLED                                                         = 197
	ERROR_IO_DEVICE                                                                = 1117
	ERROR_IO_INCOMPLETE                                                            = 996
	ERROR_IO_PENDING                                                               = 997
	ERROR_IPSEC_AUTH_FIREWALL_DROP                                                 = 13917
	ERROR_IPSEC_BAD_SPI                                                            = 13910
	ERROR_IPSEC_CLEAR_TEXT_DROP                                                    = 13916
	ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND                                          = 13014
	ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND                                        = 13013
	ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND                                        = 13015
	ERROR_IPSEC_DOSP_BLOCK                                                         = 13925
	ERROR_IPSEC_DOSP_INVALID_PACKET                                                = 13927
	ERROR_IPSEC_DOSP_KEYMOD_NOT_ALLOWED                                            = 13930
	ERROR_IPSEC_DOSP_MAX_ENTRIES                                                   = 13929
	ERROR_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES                                   = 13932
	ERROR_IPSEC_DOSP_NOT_INSTALLED                                                 = 13931
	ERROR_IPSEC_DOSP_RECEIVED_MULTICAST                                            = 13926
	ERROR_IPSEC_DOSP_STATE_LOOKUP_FAILED                                           = 13928
	ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED                                          = 13860
	ERROR_IPSEC_IKE_ATTRIB_FAIL                                                    = 13802
	ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE                                          = 13905
	ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE_WITH_OPTIONAL_RETRY                      = 13907
	ERROR_IPSEC_IKE_AUTH_FAIL                                                      = 13801
	ERROR_IPSEC_IKE_BENIGN_REINIT                                                  = 13878
	ERROR_IPSEC_IKE_CERT_CHAIN_POLICY_MISMATCH                                     = 13887
	ERROR_IPSEC_IKE_CGA_AUTH_FAILED                                                = 13892
	ERROR_IPSEC_IKE_COEXISTENCE_SUPPRESS                                           = 13902
	ERROR_IPSEC_IKE_CRL_FAILED                                                     = 13817
	ERROR_IPSEC_IKE_DECRYPT                                                        = 13867
	ERROR_IPSEC_IKE_DH_FAIL                                                        = 13822
	ERROR_IPSEC_IKE_DH_FAILURE                                                     = 13864
	ERROR_IPSEC_IKE_DOS_COOKIE_SENT                                                = 13890
	ERROR_IPSEC_IKE_DROP_NO_RESPONSE                                               = 13813
	ERROR_IPSEC_IKE_ENCRYPT                                                        = 13866
	ERROR_IPSEC_IKE_ERROR                                                          = 13816
	ERROR_IPSEC_IKE_FAILQUERYSSP                                                   = 13854
	ERROR_IPSEC_IKE_FAILSSPINIT                                                    = 13853
	ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR                                       = 13804
	ERROR_IPSEC_IKE_GETSPIFAIL                                                     = 13857
	ERROR_IPSEC_IKE_INNER_IP_ASSIGNMENT_FAILURE                                    = 13899
	ERROR_IPSEC_IKE_INVALID_AUTH_ALG                                               = 13874
	ERROR_IPSEC_IKE_INVALID_AUTH_PAYLOAD                                           = 13889
	ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN                                            = 13881
	ERROR_IPSEC_IKE_INVALID_CERT_TYPE                                              = 13819
	ERROR_IPSEC_IKE_INVALID_COOKIE                                                 = 13846
	ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG                                            = 13873
	ERROR_IPSEC_IKE_INVALID_FILTER                                                 = 13858
	ERROR_IPSEC_IKE_INVALID_GROUP                                                  = 13865
	ERROR_IPSEC_IKE_INVALID_HASH                                                   = 13870
	ERROR_IPSEC_IKE_INVALID_HASH_ALG                                               = 13871
	ERROR_IPSEC_IKE_INVALID_HASH_SIZE                                              = 13872
	ERROR_IPSEC_IKE_INVALID_HEADER                                                 = 13824
	ERROR_IPSEC_IKE_INVALID_KEY_USAGE                                              = 13818
	ERROR_IPSEC_IKE_INVALID_MM_FOR_QM                                              = 13894
	ERROR_IPSEC_IKE_INVALID_PAYLOAD                                                = 13843
	ERROR_IPSEC_IKE_INVALID_POLICY                                                 = 13861
	ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY                              = 13879
	ERROR_IPSEC_IKE_INVALID_SIG                                                    = 13875
	ERROR_IPSEC_IKE_INVALID_SIGNATURE                                              = 13826
	ERROR_IPSEC_IKE_INVALID_SITUATION                                              = 13863
	ERROR_IPSEC_IKE_KERBEROS_ERROR                                                 = 13827
	ERROR_IPSEC_IKE_KILL_DUMMY_NAP_TUNNEL                                          = 13898
	ERROR_IPSEC_IKE_LOAD_FAILED                                                    = 13876
	ERROR_IPSEC_IKE_LOAD_SOFT_SA                                                   = 13844
	ERROR_IPSEC_IKE_MM_ACQUIRE_DROP                                                = 13809
	ERROR_IPSEC_IKE_MM_DELAY_DROP                                                  = 13814
	ERROR_IPSEC_IKE_MM_EXPIRED                                                     = 13885
	ERROR_IPSEC_IKE_MM_LIMIT                                                       = 13882
	ERROR_IPSEC_IKE_NEGOTIATION_DISABLED                                           = 13883
	ERROR_IPSEC_IKE_NEGOTIATION_PENDING                                            = 13803
	ERROR_IPSEC_IKE_NEG_STATUS_BEGIN                                               = 13800
	ERROR_IPSEC_IKE_NEG_STATUS_END                                                 = 13897
	ERROR_IPSEC_IKE_NEG_STATUS_EXTENDED_END                                        = 13909
	ERROR_IPSEC_IKE_NOTCBPRIV                                                      = 13851
	ERROR_IPSEC_IKE_NO_CERT                                                        = 13806
	ERROR_IPSEC_IKE_NO_MM_POLICY                                                   = 13850
	ERROR_IPSEC_IKE_NO_PEER_CERT                                                   = 13847
	ERROR_IPSEC_IKE_NO_POLICY                                                      = 13825
	ERROR_IPSEC_IKE_NO_PRIVATE_KEY                                                 = 13820
	ERROR_IPSEC_IKE_NO_PUBLIC_KEY                                                  = 13828
	ERROR_IPSEC_IKE_OUT_OF_MEMORY                                                  = 13859
	ERROR_IPSEC_IKE_PEER_CRL_FAILED                                                = 13848
	ERROR_IPSEC_IKE_PEER_DOESNT_SUPPORT_MOBIKE                                     = 13904
	ERROR_IPSEC_IKE_PEER_MM_ASSUMED_INVALID                                        = 13886
	ERROR_IPSEC_IKE_POLICY_CHANGE                                                  = 13849
	ERROR_IPSEC_IKE_POLICY_MATCH                                                   = 13868
	ERROR_IPSEC_IKE_PROCESS_ERR                                                    = 13829
	ERROR_IPSEC_IKE_PROCESS_ERR_CERT                                               = 13835
	ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ                                           = 13836
	ERROR_IPSEC_IKE_PROCESS_ERR_DELETE                                             = 13841
	ERROR_IPSEC_IKE_PROCESS_ERR_HASH                                               = 13837
	ERROR_IPSEC_IKE_PROCESS_ERR_ID                                                 = 13834
	ERROR_IPSEC_IKE_PROCESS_ERR_KE                                                 = 13833
	ERROR_IPSEC_IKE_PROCESS_ERR_NATOA                                              = 13893
	ERROR_IPSEC_IKE_PROCESS_ERR_NONCE                                              = 13839
	ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY                                             = 13840
	ERROR_IPSEC_IKE_PROCESS_ERR_PROP                                               = 13831
	ERROR_IPSEC_IKE_PROCESS_ERR_SA                                                 = 13830
	ERROR_IPSEC_IKE_PROCESS_ERR_SIG                                                = 13838
	ERROR_IPSEC_IKE_PROCESS_ERR_TRANS                                              = 13832
	ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR                                             = 13842
	ERROR_IPSEC_IKE_QM_ACQUIRE_DROP                                                = 13810
	ERROR_IPSEC_IKE_QM_DELAY_DROP                                                  = 13815
	ERROR_IPSEC_IKE_QM_EXPIRED                                                     = 13895
	ERROR_IPSEC_IKE_QM_LIMIT                                                       = 13884
	ERROR_IPSEC_IKE_QUEUE_DROP_MM                                                  = 13811
	ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM                                               = 13812
	ERROR_IPSEC_IKE_RATELIMIT_DROP                                                 = 13903
	ERROR_IPSEC_IKE_REQUIRE_CP_PAYLOAD_MISSING                                     = 13900
	ERROR_IPSEC_IKE_RPC_DELETE                                                     = 13877
	ERROR_IPSEC_IKE_SA_DELETED                                                     = 13807
	ERROR_IPSEC_IKE_SA_REAPED                                                      = 13808
	ERROR_IPSEC_IKE_SECLOADFAIL                                                    = 13852
	ERROR_IPSEC_IKE_SHUTTING_DOWN                                                  = 13891
	ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN                                              = 13845
	ERROR_IPSEC_IKE_SRVACQFAIL                                                     = 13855
	ERROR_IPSEC_IKE_SRVQUERYCRED                                                   = 13856
	ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_AND_CERTMAP_FAILURE                  = 13908
	ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_FAILURE                              = 13906
	ERROR_IPSEC_IKE_TIMED_OUT                                                      = 13805
	ERROR_IPSEC_IKE_TOO_MANY_FILTERS                                               = 13896
	ERROR_IPSEC_IKE_UNEXPECTED_MESSAGE_ID                                          = 13888
	ERROR_IPSEC_IKE_UNKNOWN_DOI                                                    = 13862
	ERROR_IPSEC_IKE_UNSUPPORTED_ID                                                 = 13869
	ERROR_IPSEC_INTEGRITY_CHECK_FAILED                                             = 13915
	ERROR_IPSEC_INVALID_PACKET                                                     = 13914
	ERROR_IPSEC_KEY_MODULE_IMPERSONATION_NEGOTIATION_PENDING                       = 13901
	ERROR_IPSEC_MM_AUTH_EXISTS                                                     = 13010
	ERROR_IPSEC_MM_AUTH_IN_USE                                                     = 13012
	ERROR_IPSEC_MM_AUTH_NOT_FOUND                                                  = 13011
	ERROR_IPSEC_MM_AUTH_PENDING_DELETION                                           = 13022
	ERROR_IPSEC_MM_FILTER_EXISTS                                                   = 13006
	ERROR_IPSEC_MM_FILTER_NOT_FOUND                                                = 13007
	ERROR_IPSEC_MM_FILTER_PENDING_DELETION                                         = 13018
	ERROR_IPSEC_MM_POLICY_EXISTS                                                   = 13003
	ERROR_IPSEC_MM_POLICY_IN_USE                                                   = 13005
	ERROR_IPSEC_MM_POLICY_NOT_FOUND                                                = 13004
	ERROR_IPSEC_MM_POLICY_PENDING_DELETION                                         = 13021
	ERROR_IPSEC_QM_POLICY_EXISTS                                                   = 13000
	ERROR_IPSEC_QM_POLICY_IN_USE                                                   = 13002
	ERROR_IPSEC_QM_POLICY_NOT_FOUND                                                = 13001
	ERROR_IPSEC_QM_POLICY_PENDING_DELETION                                         = 13023
	ERROR_IPSEC_REPLAY_CHECK_FAILED                                                = 13913
	ERROR_IPSEC_SA_LIFETIME_EXPIRED                                                = 13911
	ERROR_IPSEC_THROTTLE_DROP                                                      = 13918
	ERROR_IPSEC_TRANSPORT_FILTER_EXISTS                                            = 13008
	ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND                                         = 13009
	ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION                                  = 13019
	ERROR_IPSEC_TUNNEL_FILTER_EXISTS                                               = 13016
	ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND                                            = 13017
	ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION                                     = 13020
	ERROR_IPSEC_WRONG_SA                                                           = 13912
	ERROR_IRQ_BUSY                                                                 = 1119
	ERROR_IS_JOINED                                                                = 134
	ERROR_IS_JOIN_PATH                                                             = 147
	ERROR_IS_JOIN_TARGET                                                           = 133
	ERROR_IS_SUBSTED                                                               = 135
	ERROR_IS_SUBST_PATH                                                            = 146
	ERROR_IS_SUBST_TARGET                                                          = 149
	ERROR_ITERATED_DATA_EXCEEDS_64k                                                = 194
	ERROR_JOIN_TO_JOIN                                                             = 138
	ERROR_JOIN_TO_SUBST                                                            = 140
	ERROR_JOURNAL_DELETE_IN_PROGRESS                                               = 1178
	ERROR_JOURNAL_ENTRY_DELETED                                                    = 1181
	ERROR_JOURNAL_HOOK_SET                                                         = 1430
	ERROR_JOURNAL_NOT_ACTIVE                                                       = 1179
	ERROR_KERNEL_APC                                                               = 738
	ERROR_KEY_DELETED                                                              = 1018
	ERROR_KEY_HAS_CHILDREN                                                         = 1020
	ERROR_KM_DRIVER_BLOCKED                                                        = 1930
	ERROR_LABEL_TOO_LONG                                                           = 154
	ERROR_LAST_ADMIN                                                               = 1322
	ERROR_LB_WITHOUT_TABSTOPS                                                      = 1434
	ERROR_LIBRARY_FULL                                                             = 4322
	ERROR_LIBRARY_OFFLINE                                                          = 4305
	ERROR_LICENSE_QUOTA_EXCEEDED                                                   = 1395
	ERROR_LISTBOX_ID_NOT_FOUND                                                     = 1416
	ERROR_LM_CROSS_ENCRYPTION_REQUIRED                                             = 1390
	ERROR_LOCAL_USER_SESSION_KEY                                                   = 1303
	ERROR_LOCKED                                                                   = 212
	ERROR_LOCK_FAILED                                                              = 167
	ERROR_LOCK_VIOLATION                                                           = 33
	ERROR_LOGIN_TIME_RESTRICTION                                                   = 1239
	ERROR_LOGIN_WKSTA_RESTRICTION                                                  = 1240
	ERROR_LOGON_FAILURE                                                            = 1326
	ERROR_LOGON_NOT_GRANTED                                                        = 1380
	ERROR_LOGON_SESSION_COLLISION                                                  = 1366
	ERROR_LOGON_SESSION_EXISTS                                                     = 1363
	ERROR_LOGON_TYPE_NOT_GRANTED                                                   = 1385
	ERROR_LOG_FILE_FULL                                                            = 1502
	ERROR_LUIDS_EXHAUSTED                                                          = 1334
	ERROR_MACHINE_LOCKED                                                           = 1271
	ERROR_MAGAZINE_NOT_PRESENT                                                     = 1163
	ERROR_MALFORMED_SUBSTITUTION_STRING                                            = 14094
	ERROR_MAPPED_ALIGNMENT                                                         = 1132
	ERROR_MAX_THRDS_REACHED                                                        = 164
	ERROR_MCA_INTERNAL_ERROR                                                       = 15205
	ERROR_MCA_INVALID_CAPABILITIES_STRING                                          = 15200
	ERROR_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED                                     = 15206
	ERROR_MCA_INVALID_VCP_VERSION                                                  = 15201
	ERROR_MCA_MCCS_VERSION_MISMATCH                                                = 15203
	ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION                                  = 15202
	ERROR_MCA_UNSUPPORTED_COLOR_TEMPERATURE                                        = 15207
	ERROR_MCA_UNSUPPORTED_MCCS_VERSION                                             = 15204
	ERROR_MEDIA_CHANGED                                                            = 1110
	ERROR_MEDIA_INCOMPATIBLE                                                       = 4315
	ERROR_MEDIA_NOT_AVAILABLE                                                      = 4318
	ERROR_MEDIA_OFFLINE                                                            = 4304
	ERROR_MEDIA_UNAVAILABLE                                                        = 4308
	ERROR_MEDIUM_NOT_ACCESSIBLE                                                    = 4323
	ERROR_MEMBERS_PRIMARY_GROUP                                                    = 1374
	ERROR_MEMBER_IN_ALIAS                                                          = 1378
	ERROR_MEMBER_IN_GROUP                                                          = 1320
	ERROR_MEMBER_NOT_IN_ALIAS                                                      = 1377
	ERROR_MEMBER_NOT_IN_GROUP                                                      = 1321
	ERROR_MENU_ITEM_NOT_FOUND                                                      = 1456
	ERROR_MESSAGE_EXCEEDS_MAX_SIZE                                                 = 4336
	ERROR_MESSAGE_SYNC_ONLY                                                        = 1159
	ERROR_METAFILE_NOT_SUPPORTED                                                   = 2003
	ERROR_META_EXPANSION_TOO_LONG                                                  = 208
	ERROR_MOD_NOT_FOUND                                                            = 126
	ERROR_MORE_DATA                                                                = 234
	ERROR_MORE_WRITES                                                              = 1120
	ERROR_MRM_AUTOMERGE_ENABLED                                                    = 15139
	ERROR_MRM_DUPLICATE_ENTRY                                                      = 15119
	ERROR_MRM_DUPLICATE_MAP_NAME                                                   = 15118
	ERROR_MRM_FILEPATH_TOO_LONG                                                    = 15121
	ERROR_MRM_INDETERMINATE_QUALIFIER_VALUE                                        = 15138
	ERROR_MRM_INVALID_FILE_TYPE                                                    = 15112
	ERROR_MRM_INVALID_PRICONFIG                                                    = 15111
	ERROR_MRM_INVALID_PRI_FILE                                                     = 15126
	ERROR_MRM_INVALID_QUALIFIER_OPERATOR                                           = 15137
	ERROR_MRM_INVALID_QUALIFIER_VALUE                                              = 15114
	ERROR_MRM_INVALID_RESOURCE_IDENTIFIER                                          = 15120
	ERROR_MRM_MAP_NOT_FOUND                                                        = 15135
	ERROR_MRM_NAMED_RESOURCE_NOT_FOUND                                             = 15127
	ERROR_MRM_NO_CANDIDATE                                                         = 15115
	ERROR_MRM_NO_MATCH_OR_DEFAULT_CANDIDATE                                        = 15116
	ERROR_MRM_RESOURCE_TYPE_MISMATCH                                               = 15117
	ERROR_MRM_RUNTIME_NO_DEFAULT_OR_NEUTRAL_RESOURCE                               = 15110
	ERROR_MRM_TOO_MANY_RESOURCES                                                   = 15140
	ERROR_MRM_UNKNOWN_QUALIFIER                                                    = 15113
	ERROR_MRM_UNSUPPORTED_DIRECTORY_TYPE                                           = 15122
	ERROR_MRM_UNSUPPORTED_PROFILE_TYPE                                             = 15136
	ERROR_MR_MID_NOT_FOUND                                                         = 317
	ERROR_MUI_FILE_NOT_FOUND                                                       = 15100
	ERROR_MUI_FILE_NOT_LOADED                                                      = 15105
	ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME                                     = 15108
	ERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED                                    = 15107
	ERROR_MUI_INVALID_FILE                                                         = 15101
	ERROR_MUI_INVALID_LOCALE_NAME                                                  = 15103
	ERROR_MUI_INVALID_RC_CONFIG                                                    = 15102
	ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME                                        = 15104
	ERROR_MUTUAL_AUTH_FAILED                                                       = 1397
	ERROR_NEEDS_REMEDIATION                                                        = 15612
	ERROR_NEGATIVE_SEEK                                                            = 131
	ERROR_NESTING_NOT_ALLOWED                                                      = 215
	ERROR_NETLOGON_NOT_STARTED                                                     = 1792
	ERROR_NETNAME_DELETED                                                          = 64
	ERROR_NETWORK_ACCESS_DENIED                                                    = 65
	ERROR_NETWORK_BUSY                                                             = 54
	ERROR_NETWORK_NOT_AVAILABLE                                                    = 5035
	ERROR_NETWORK_UNREACHABLE                                                      = 1231
	ERROR_NET_WRITE_FAULT                                                          = 88
	ERROR_NOACCESS                                                                 = 998
	ERROR_NODE_CANNOT_BE_CLUSTERED                                                 = 5898
	ERROR_NODE_CANT_HOST_RESOURCE                                                  = 5071
	ERROR_NODE_NOT_AVAILABLE                                                       = 5036
	ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT                                        = 1807
	ERROR_NOLOGON_SERVER_TRUST_ACCOUNT                                             = 1809
	ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT                                        = 1808
	ERROR_NONE_MAPPED                                                              = 1332
	ERROR_NONPAGED_SYSTEM_RESOURCES                                                = 1451
	ERROR_NON_ACCOUNT_SID                                                          = 1257
	ERROR_NON_DOMAIN_SID                                                           = 1258
	ERROR_NON_MDICHILD_WINDOW                                                      = 1445
	ERROR_NOTIFY_ENUM_DIR                                                          = 1022
	ERROR_NOT_ALL_ASSIGNED                                                         = 1300
	ERROR_NOT_AUTHENTICATED                                                        = 1244
	ERROR_NOT_A_REPARSE_POINT                                                      = 4390
	ERROR_NOT_CHILD_WINDOW                                                         = 1442
	ERROR_NOT_CONNECTED                                                            = 2250
	ERROR_NOT_CONTAINER                                                            = 1207
	ERROR_NOT_DOS_DISK                                                             = 26
	ERROR_NOT_EMPTY                                                                = 4307
	ERROR_NOT_ENOUGH_MEMORY                                                        = 8
	ERROR_NOT_ENOUGH_QUOTA                                                         = 1816
	ERROR_NOT_ENOUGH_SERVER_MEMORY                                                 = 1130
	ERROR_NOT_EXPORT_FORMAT                                                        = 6008
	ERROR_NOT_FOUND                                                                = 1168
	ERROR_NOT_GUI_PROCESS                                                          = 1471
	ERROR_NOT_JOINED                                                               = 136
	ERROR_NOT_LOCKED                                                               = 158
	ERROR_NOT_LOGGED_ON                                                            = 1245
	ERROR_NOT_LOGON_PROCESS                                                        = 1362
	ERROR_NOT_OWNER                                                                = 288
	ERROR_NOT_QUORUM_CAPABLE                                                       = 5021
	ERROR_NOT_QUORUM_CLASS                                                         = 5025
	ERROR_NOT_READY                                                                = 21
	ERROR_NOT_REGISTRY_FILE                                                        = 1017
	ERROR_NOT_SAFEBOOT_SERVICE                                                     = 1084
	ERROR_NOT_SAME_DEVICE                                                          = 17
	ERROR_NOT_SUBSTED                                                              = 137
	ERROR_NOT_SUPPORTED                                                            = 50
	ERROR_NOT_SUPPORTED_ON_SBS                                                     = 1254
	ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER                                         = 8584
	ERROR_NO_ASSOCIATION                                                           = 1155
	ERROR_NO_BROWSER_SERVERS_FOUND                                                 = 6118
	ERROR_NO_DATA                                                                  = 232
	ERROR_NO_DATA_DETECTED                                                         = 1104
	ERROR_NO_EFS                                                                   = 6004
	ERROR_NO_IMPERSONATION_TOKEN                                                   = 1309
	ERROR_NO_INHERITANCE                                                           = 1391
	ERROR_NO_LOGON_SERVERS                                                         = 1311
	ERROR_NO_LOG_SPACE                                                             = 1019
	ERROR_NO_MATCH                                                                 = 1169
	ERROR_NO_MEDIA_IN_DRIVE                                                        = 1112
	ERROR_NO_MORE_DEVICES                                                          = 1248
	ERROR_NO_MORE_FILES                                                            = 18
	ERROR_NO_MORE_ITEMS                                                            = 259
	ERROR_NO_MORE_SEARCH_HANDLES                                                   = 113
	ERROR_NO_MORE_USER_HANDLES                                                     = 1158
	ERROR_NO_NETWORK                                                               = 1222
	ERROR_NO_NET_OR_BAD_PATH                                                       = 1203
	ERROR_NO_NVRAM_RESOURCES                                                       = 1470
	ERROR_NO_PROC_SLOTS                                                            = 89
	ERROR_NO_PROMOTION_ACTIVE                                                      = 8222
	ERROR_NO_QUOTAS_FOR_ACCOUNT                                                    = 1302
	ERROR_NO_RECOVERY_POLICY                                                       = 6003
	ERROR_NO_RECOVERY_PROGRAM                                                      = 1082
	ERROR_NO_SCROLLBARS                                                            = 1447
	ERROR_NO_SECURITY_ON_OBJECT                                                    = 1350
	ERROR_NO_SHUTDOWN_IN_PROGRESS                                                  = 1116
	ERROR_NO_SIGNAL_SENT                                                           = 205
	ERROR_NO_SITENAME                                                              = 1919
	ERROR_NO_SPOOL_SPACE                                                           = 62
	ERROR_NO_SUCH_ALIAS                                                            = 1376
	ERROR_NO_SUCH_DOMAIN                                                           = 1355
	ERROR_NO_SUCH_GROUP                                                            = 1319
	ERROR_NO_SUCH_LOGON_SESSION                                                    = 1312
	ERROR_NO_SUCH_MEMBER                                                           = 1387
	ERROR_NO_SUCH_PACKAGE                                                          = 1364
	ERROR_NO_SUCH_PRIVILEGE                                                        = 1313
	ERROR_NO_SUCH_SITE                                                             = 1249
	ERROR_NO_SUCH_USER                                                             = 1317
	ERROR_NO_SUPPORTING_DRIVES                                                     = 4339
	ERROR_NO_SYSTEM_MENU                                                           = 1437
	ERROR_NO_SYSTEM_RESOURCES                                                      = 1450
	ERROR_NO_TOKEN                                                                 = 1008
	ERROR_NO_TRACKING_SERVICE                                                      = 1172
	ERROR_NO_TRUST_LSA_SECRET                                                      = 1786
	ERROR_NO_TRUST_SAM_ACCOUNT                                                     = 1787
	ERROR_NO_UNICODE_TRANSLATION                                                   = 1113
	ERROR_NO_USER_KEYS                                                             = 6006
	ERROR_NO_USER_SESSION_KEY                                                      = 1394
	ERROR_NO_VOLUME_ID                                                             = 1173
	ERROR_NO_VOLUME_LABEL                                                          = 125
	ERROR_NO_WILDCARD_CHARACTERS                                                   = 1417
	ERROR_NT_CROSS_ENCRYPTION_REQUIRED                                             = 1386
	ERROR_NULL_LM_PASSWORD                                                         = 1304
	ERROR_OBJECT_ALREADY_EXISTS                                                    = 5010
	ERROR_OBJECT_IN_LIST                                                           = 5011
	ERROR_OBJECT_NOT_FOUND                                                         = 4312
	ERROR_OLD_WIN_VERSION                                                          = 1150
	ERROR_ONLY_IF_CONNECTED                                                        = 1251
	ERROR_OPEN_FAILED                                                              = 110
	ERROR_OPEN_FILES                                                               = 2401
	ERROR_OPERATION_ABORTED                                                        = 995
	ERROR_OPLOCK_NOT_GRANTED                                                       = 300
	ERROR_OUTOFMEMORY                                                              = 14
	ERROR_OUT_OF_PAPER                                                             = 28
	ERROR_OUT_OF_STRUCTURES                                                        = 84
	ERROR_OVERRIDE_NOCHANGES                                                       = 1252
	ERROR_PACKAGES_IN_USE                                                          = 15618
	ERROR_PACKAGE_ALREADY_EXISTS                                                   = 15611
	ERROR_PACKAGE_REPOSITORY_CORRUPTED                                             = 15614
	ERROR_PACKAGE_UPDATING                                                         = 15616
	ERROR_PAGED_SYSTEM_RESOURCES                                                   = 1452
	ERROR_PAGEFILE_QUOTA                                                           = 1454
	ERROR_PARAMETER_QUOTA_EXCEEDED                                                 = 1283
	ERROR_PARTIAL_COPY                                                             = 299
	ERROR_PARTITION_FAILURE                                                        = 1105
	ERROR_PASSWORD_EXPIRED                                                         = 1330
	ERROR_PASSWORD_MUST_CHANGE                                                     = 1907
	ERROR_PASSWORD_RESTRICTION                                                     = 1325
	ERROR_PATCH_PACKAGE_INVALID                                                    = 1636
	ERROR_PATCH_PACKAGE_OPEN_FAILED                                                = 1635
	ERROR_PATCH_PACKAGE_REJECTED                                                   = 1643
	ERROR_PATCH_PACKAGE_UNSUPPORTED                                                = 1637
	ERROR_PATCH_TARGET_NOT_FOUND                                                   = 1642
	ERROR_PATH_BUSY                                                                = 148
	ERROR_PATH_NOT_FOUND                                                           = 3
	ERROR_PER_USER_TRUST_QUOTA_EXCEEDED                                            = 1932
	ERROR_PIPE_BUSY                                                                = 231
	ERROR_PIPE_CONNECTED                                                           = 535
	ERROR_PIPE_LISTENING                                                           = 536
	ERROR_PIPE_LOCAL                                                               = 229
	ERROR_PIPE_NOT_CONNECTED                                                       = 233
	ERROR_PKINIT_FAILURE                                                           = 1263
	ERROR_POINT_NOT_FOUND                                                          = 1171
	ERROR_POLICY_OBJECT_NOT_FOUND                                                  = 8219
	ERROR_POLICY_ONLY_IN_DS                                                        = 8220
	ERROR_POPUP_ALREADY_ACTIVE                                                     = 1446
	ERROR_PORT_UNREACHABLE                                                         = 1234
	ERROR_POSSIBLE_DEADLOCK                                                        = 1131
	ERROR_POTENTIAL_FILE_FOUND                                                     = 1180
	ERROR_PRINTER_ALREADY_EXISTS                                                   = 1802
	ERROR_PRINTER_DELETED                                                          = 1905
	ERROR_PRINTER_DRIVER_ALREADY_INSTALLED                                         = 1795
	ERROR_PRINTER_DRIVER_BLOCKED                                                   = 3014
	ERROR_PRINTER_DRIVER_IN_USE                                                    = 3001
	ERROR_PRINTER_DRIVER_WARNED                                                    = 3013
	ERROR_PRINTER_HAS_JOBS_QUEUED                                                  = 3009
	ERROR_PRINTER_NOT_FOUND                                                        = 3012
	ERROR_PRINTQ_FULL                                                              = 61
	ERROR_PRINT_CANCELLED                                                          = 63
	ERROR_PRINT_MONITOR_ALREADY_INSTALLED                                          = 3006
	ERROR_PRINT_MONITOR_IN_USE                                                     = 3008
	ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED                                        = 3005
	ERROR_PRIVATE_DIALOG_INDEX                                                     = 1415
	ERROR_PRIVILEGE_NOT_HELD                                                       = 1314
	ERROR_PROCESS_ABORTED                                                          = 1067
	ERROR_PROC_NOT_FOUND                                                           = 127
	ERROR_PRODUCT_UNINSTALLED                                                      = 1614
	ERROR_PRODUCT_VERSION                                                          = 1638
	ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE                                       = 2015
	ERROR_PROFILE_NOT_FOUND                                                        = 2016
	ERROR_PROMOTION_ACTIVE                                                         = 8221
	ERROR_PROTOCOL_UNREACHABLE                                                     = 1233
	ERROR_QUORUMLOG_OPEN_FAILED                                                    = 5028
	ERROR_QUORUM_DISK_NOT_FOUND                                                    = 5086
	ERROR_QUORUM_OWNER_ALIVE                                                       = 5034
	ERROR_QUORUM_RESOURCE                                                          = 5020
	ERROR_QUORUM_RESOURCE_ONLINE_FAILED                                            = 5027
	ERROR_READ_FAULT                                                               = 30
	ERROR_RECOVERY_FAILURE                                                         = 1279
	ERROR_RECOVERY_FILE_CORRUPT                                                    = 15619
	ERROR_REC_NON_EXISTENT                                                         = 4005
	ERROR_REDIRECTOR_HAS_OPEN_HANDLES                                              = 1794
	ERROR_REDIR_PAUSED                                                             = 72
	ERROR_REGISTRY_CORRUPT                                                         = 1015
	ERROR_REGISTRY_IO_FAILED                                                       = 1016
	ERROR_REGISTRY_RECOVERED                                                       = 1014
	ERROR_REG_NAT_CONSUMPTION                                                      = 1261
	ERROR_RELOC_CHAIN_XEEDS_SEGLIM                                                 = 201
	ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED                                         = 1936
	ERROR_REMOTE_SESSION_LIMIT_EXCEEDED                                            = 1220
	ERROR_REMOTE_STORAGE_MEDIA_ERROR                                               = 4352
	ERROR_REMOTE_STORAGE_NOT_ACTIVE                                                = 4351
	ERROR_REMOVE_FAILED                                                            = 15610
	ERROR_REM_NOT_LIST                                                             = 51
	ERROR_REPARSE_ATTRIBUTE_CONFLICT                                               = 4391
	ERROR_REPARSE_TAG_INVALID                                                      = 4393
	ERROR_REPARSE_TAG_MISMATCH                                                     = 4394
	ERROR_REQUEST_ABORTED                                                          = 1235
	ERROR_REQUEST_REFUSED                                                          = 4320
	ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION                                       = 1459
	ERROR_REQ_NOT_ACCEP                                                            = 71
	ERROR_RESILIENCY_FILE_CORRUPT                                                  = 15625
	ERROR_RESMON_CREATE_FAILED                                                     = 5017
	ERROR_RESMON_INVALID_STATE                                                     = 5084
	ERROR_RESMON_ONLINE_FAILED                                                     = 5018
	ERROR_RESOURCE_DATA_NOT_FOUND                                                  = 1812
	ERROR_RESOURCE_DISABLED                                                        = 4309
	ERROR_RESOURCE_ENUM_USER_STOP                                                  = 15106
	ERROR_RESOURCE_FAILED                                                          = 5038
	ERROR_RESOURCE_LANG_NOT_FOUND                                                  = 1815
	ERROR_RESOURCE_NAME_NOT_FOUND                                                  = 1814
	ERROR_RESOURCE_NOT_AVAILABLE                                                   = 5006
	ERROR_RESOURCE_NOT_FOUND                                                       = 5007
	ERROR_RESOURCE_NOT_ONLINE                                                      = 5004
	ERROR_RESOURCE_NOT_PRESENT                                                     = 4316
	ERROR_RESOURCE_ONLINE                                                          = 5019
	ERROR_RESOURCE_PROPERTIES_STORED                                               = 5024
	ERROR_RESOURCE_PROPERTY_UNCHANGEABLE                                           = 5089
	ERROR_RESOURCE_TYPE_NOT_FOUND                                                  = 1813
	ERROR_RESTART_APPLICATION                                                      = 1467
	ERROR_RETRY                                                                    = 1237
	ERROR_REVISION_MISMATCH                                                        = 1306
	ERROR_RING2SEG_MUST_BE_MOVABLE                                                 = 200
	ERROR_RING2_STACK_IN_USE                                                       = 207
	ERROR_RMODE_APP                                                                = 1153
	ERROR_RPL_NOT_ALLOWED                                                          = 4006
	ERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT                                            = 15403
	ERROR_RUNLEVEL_SWITCH_IN_PROGRESS                                              = 15404
	ERROR_RUNLEVEL_SWITCH_TIMEOUT                                                  = 15402
	ERROR_RXACT_COMMIT_FAILURE                                                     = 1370
	ERROR_RXACT_INVALID_STATE                                                      = 1369
	ERROR_SAME_DRIVE                                                               = 143
	ERROR_SAM_INIT_FAILURE                                                         = 8541
	ERROR_SCOPE_NOT_FOUND                                                          = 318
	ERROR_SCREEN_ALREADY_LOCKED                                                    = 1440
	ERROR_SECONDARY_IC_PROVIDER_NOT_REGISTERED                                     = 15321
	ERROR_SECRET_TOO_LONG                                                          = 1382
	ERROR_SECTOR_NOT_FOUND                                                         = 27
	ERROR_SEEK                                                                     = 25
	ERROR_SEEK_ON_DEVICE                                                           = 132
	ERROR_SEM_IS_SET                                                               = 102
	ERROR_SEM_NOT_FOUND                                                            = 187
	ERROR_SEM_OWNER_DIED                                                           = 105
	ERROR_SEM_TIMEOUT                                                              = 121
	ERROR_SEM_USER_LIMIT                                                           = 106
	ERROR_SERIAL_NO_DEVICE                                                         = 1118
	ERROR_SERVER_DISABLED                                                          = 1341
	ERROR_SERVER_HAS_OPEN_HANDLES                                                  = 1811
	ERROR_SERVER_NOT_DISABLED                                                      = 1342
	ERROR_SERVER_SHUTDOWN_IN_PROGRESS                                              = 1255
	ERROR_SERVICES_FAILED_AUTOSTART                                                = 15405
	ERROR_SERVICE_ALREADY_RUNNING                                                  = 1056
	ERROR_SERVICE_CANNOT_ACCEPT_CTRL                                               = 1061
	ERROR_SERVICE_DATABASE_LOCKED                                                  = 1055
	ERROR_SERVICE_DEPENDENCY_DELETED                                               = 1075
	ERROR_SERVICE_DEPENDENCY_FAIL                                                  = 1068
	ERROR_SERVICE_DISABLED                                                         = 1058
	ERROR_SERVICE_DOES_NOT_EXIST                                                   = 1060
	ERROR_SERVICE_EXISTS                                                           = 1073
	ERROR_SERVICE_LOGON_FAILED                                                     = 1069
	ERROR_SERVICE_MARKED_FOR_DELETE                                                = 1072
	ERROR_SERVICE_NEVER_STARTED                                                    = 1077
	ERROR_SERVICE_NOT_ACTIVE                                                       = 1062
	ERROR_SERVICE_NOT_FOUND                                                        = 1243
	ERROR_SERVICE_NOT_IN_EXE                                                       = 1083
	ERROR_SERVICE_NO_THREAD                                                        = 1054
	ERROR_SERVICE_REQUEST_TIMEOUT                                                  = 1053
	ERROR_SERVICE_SPECIFIC_ERROR                                                   = 1066
	ERROR_SERVICE_START_HANG                                                       = 1070
	ERROR_SESSION_CREDENTIAL_CONFLICT                                              = 1219
	ERROR_SETCOUNT_ON_BAD_LB                                                       = 1433
	ERROR_SETMARK_DETECTED                                                         = 1103
	ERROR_SET_NOT_FOUND                                                            = 1170
	ERROR_SET_POWER_STATE_FAILED                                                   = 1141
	ERROR_SET_POWER_STATE_VETOED                                                   = 1140
	ERROR_SEVERITY_ERROR                                                           = 0xC0000000
	ERROR_SEVERITY_INFORMATIONAL                                                   = 0x40000000
	ERROR_SEVERITY_SUCCESS                                                         = 0x00000000
	ERROR_SEVERITY_WARNING                                                         = 0x80000000
	ERROR_SHARED_POLICY                                                            = 8218
	ERROR_SHARING_BUFFER_EXCEEDED                                                  = 36
	ERROR_SHARING_PAUSED                                                           = 70
	ERROR_SHARING_VIOLATION                                                        = 32
	ERROR_SHUTDOWN_CLUSTER                                                         = 5008
	ERROR_SHUTDOWN_IN_PROGRESS                                                     = 1115
	ERROR_SIGNAL_PENDING                                                           = 162
	ERROR_SIGNAL_REFUSED                                                           = 156
	ERROR_SINGLE_INSTANCE_APP                                                      = 1152
	ERROR_SMARTCARD_SUBSYSTEM_FAILURE                                              = 1264
	ERROR_SMI_PRIMITIVE_INSTALLER_FAILED                                           = 14108
	ERROR_SOME_NOT_MAPPED                                                          = 1301
	ERROR_SOURCE_ELEMENT_EMPTY                                                     = 1160
	ERROR_SPECIAL_ACCOUNT                                                          = 1371
	ERROR_SPECIAL_GROUP                                                            = 1372
	ERROR_SPECIAL_USER                                                             = 1373
	ERROR_SPL_NO_ADDJOB                                                            = 3004
	ERROR_SPL_NO_STARTDOC                                                          = 3003
	ERROR_SPOOL_FILE_NOT_FOUND                                                     = 3002
	ERROR_STACK_BUFFER_OVERRUN                                                     = 1282
	ERROR_STACK_OVERFLOW                                                           = 1001
	ERROR_STATE_COMPOSITE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED                        = 15815
	ERROR_STATE_CONTAINER_NAME_SIZE_LIMIT_EXCEEDED                                 = 15818
	ERROR_STATE_CREATE_CONTAINER_FAILED                                            = 15805
	ERROR_STATE_DELETE_CONTAINER_FAILED                                            = 15806
	ERROR_STATE_DELETE_SETTING_FAILED                                              = 15809
	ERROR_STATE_ENUMERATE_CONTAINER_FAILED                                         = 15813
	ERROR_STATE_ENUMERATE_SETTINGS_FAILED                                          = 15814
	ERROR_STATE_GET_VERSION_FAILED                                                 = 15801
	ERROR_STATE_LOAD_STORE_FAILED                                                  = 15800
	ERROR_STATE_OPEN_CONTAINER_FAILED                                              = 15804
	ERROR_STATE_QUERY_SETTING_FAILED                                               = 15810
	ERROR_STATE_READ_COMPOSITE_SETTING_FAILED                                      = 15811
	ERROR_STATE_READ_SETTING_FAILED                                                = 15807
	ERROR_STATE_SETTING_NAME_SIZE_LIMIT_EXCEEDED                                   = 15817
	ERROR_STATE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED                                  = 15816
	ERROR_STATE_SET_VERSION_FAILED                                                 = 15802
	ERROR_STATE_STRUCTURED_RESET_FAILED                                            = 15803
	ERROR_STATE_WRITE_COMPOSITE_SETTING_FAILED                                     = 15812
	ERROR_STATE_WRITE_SETTING_FAILED                                               = 15808
	ERROR_STATIC_INIT                                                              = 4002
	ERROR_SUBST_TO_JOIN                                                            = 141
	ERROR_SUBST_TO_SUBST                                                           = 139
	ERROR_SUCCESS                                                                  = 0
	ERROR_SUCCESS_REBOOT_INITIATED                                                 = 1641
	ERROR_SUCCESS_REBOOT_REQUIRED                                                  = 3010
	ERROR_SUCCESS_RESTART_REQUIRED                                                 = 3011
	ERROR_SWAPERROR                                                                = 999
	ERROR_SXS_ACTIVATION_CONTEXT_DISABLED                                          = 14006
	ERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT                                         = 14103
	ERROR_SXS_ASSEMBLY_MISSING                                                     = 14081
	ERROR_SXS_ASSEMBLY_NOT_FOUND                                                   = 14003
	ERROR_SXS_ASSEMBLY_NOT_LOCKED                                                  = 14097
	ERROR_SXS_CANT_GEN_ACTCTX                                                      = 14001
	ERROR_SXS_COMPONENT_STORE_CORRUPT                                              = 14098
	ERROR_SXS_CORRUPTION                                                           = 14083
	ERROR_SXS_CORRUPT_ACTIVATION_STACK                                             = 14082
	ERROR_SXS_DUPLICATE_ASSEMBLY_NAME                                              = 14027
	ERROR_SXS_DUPLICATE_CLSID                                                      = 14023
	ERROR_SXS_DUPLICATE_DLL_NAME                                                   = 14021
	ERROR_SXS_DUPLICATE_IID                                                        = 14024
	ERROR_SXS_DUPLICATE_PROGID                                                     = 14026
	ERROR_SXS_DUPLICATE_TLBID                                                      = 14025
	ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME                                           = 14022
	ERROR_SXS_EARLY_DEACTIVATION                                                   = 14084
	ERROR_SXS_FILE_HASH_MISMATCH                                                   = 14028
	ERROR_SXS_FILE_HASH_MISSING                                                    = 14110
	ERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY                                            = 14104
	ERROR_SXS_IDENTITIES_DIFFERENT                                                 = 14102
	ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE                                         = 14092
	ERROR_SXS_IDENTITY_PARSE_ERROR                                                 = 14093
	ERROR_SXS_INCORRECT_PUBLIC_KEY_TOKEN                                           = 14095
	ERROR_SXS_INVALID_ACTCTXDATA_FORMAT                                            = 14002
	ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE                                  = 14017
	ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME                             = 14080
	ERROR_SXS_INVALID_DEACTIVATION                                                 = 14085
	ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME                                      = 14091
	ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE                                     = 14090
	ERROR_SXS_INVALID_XML_NAMESPACE_URI                                            = 14014
	ERROR_SXS_KEY_NOT_FOUND                                                        = 14007
	ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED                               = 14016
	ERROR_SXS_MANIFEST_FORMAT_ERROR                                                = 14004
	ERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT                        = 14101
	ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE                          = 14019
	ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE                          = 14018
	ERROR_SXS_MANIFEST_PARSE_ERROR                                                 = 14005
	ERROR_SXS_MANIFEST_TOO_BIG                                                     = 14105
	ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE                                  = 14079
	ERROR_SXS_MULTIPLE_DEACTIVATION                                                = 14086
	ERROR_SXS_POLICY_PARSE_ERROR                                                   = 14029
	ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT                       = 14020
	ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET                                          = 14011
	ERROR_SXS_PROCESS_TERMINATION_REQUESTED                                        = 14087
	ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING                                      = 14078
	ERROR_SXS_PROTECTION_CATALOG_NOT_VALID                                         = 14076
	ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT                                      = 14075
	ERROR_SXS_PROTECTION_RECOVERY_FAILED                                           = 14074
	ERROR_SXS_RELEASE_ACTIVATION_CONTEXT                                           = 14088
	ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED                               = 14015
	ERROR_SXS_SECTION_NOT_FOUND                                                    = 14000
	ERROR_SXS_SETTING_NOT_REGISTERED                                               = 14106
	ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY                              = 14089
	ERROR_SXS_THREAD_QUERIES_DISABLED                                              = 14010
	ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE                                       = 14107
	ERROR_SXS_UNKNOWN_ENCODING                                                     = 14013
	ERROR_SXS_UNKNOWN_ENCODING_GROUP                                               = 14012
	ERROR_SXS_UNTRANSLATABLE_HRESULT                                               = 14077
	ERROR_SXS_VERSION_CONFLICT                                                     = 14008
	ERROR_SXS_WRONG_SECTION_TYPE                                                   = 14009
	ERROR_SXS_XML_E_BADCHARDATA                                                    = 14036
	ERROR_SXS_XML_E_BADCHARINSTRING                                                = 14034
	ERROR_SXS_XML_E_BADNAMECHAR                                                    = 14033
	ERROR_SXS_XML_E_BADPEREFINSUBSET                                               = 14059
	ERROR_SXS_XML_E_BADSTARTNAMECHAR                                               = 14032
	ERROR_SXS_XML_E_BADXMLCASE                                                     = 14069
	ERROR_SXS_XML_E_BADXMLDECL                                                     = 14056
	ERROR_SXS_XML_E_COMMENTSYNTAX                                                  = 14031
	ERROR_SXS_XML_E_DUPLICATEATTRIBUTE                                             = 14053
	ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE                                            = 14045
	ERROR_SXS_XML_E_EXPECTINGTAGEND                                                = 14038
	ERROR_SXS_XML_E_INCOMPLETE_ENCODING                                            = 14043
	ERROR_SXS_XML_E_INTERNALERROR                                                  = 14041
	ERROR_SXS_XML_E_INVALIDATROOTLEVEL                                             = 14055
	ERROR_SXS_XML_E_INVALIDENCODING                                                = 14067
	ERROR_SXS_XML_E_INVALIDSWITCH                                                  = 14068
	ERROR_SXS_XML_E_INVALID_DECIMAL                                                = 14047
	ERROR_SXS_XML_E_INVALID_HEXIDECIMAL                                            = 14048
	ERROR_SXS_XML_E_INVALID_STANDALONE                                             = 14070
	ERROR_SXS_XML_E_INVALID_UNICODE                                                = 14049
	ERROR_SXS_XML_E_INVALID_VERSION                                                = 14072
	ERROR_SXS_XML_E_MISSINGEQUALS                                                  = 14073
	ERROR_SXS_XML_E_MISSINGQUOTE                                                   = 14030
	ERROR_SXS_XML_E_MISSINGROOT                                                    = 14057
	ERROR_SXS_XML_E_MISSINGSEMICOLON                                               = 14039
	ERROR_SXS_XML_E_MISSINGWHITESPACE                                              = 14037
	ERROR_SXS_XML_E_MISSING_PAREN                                                  = 14044
	ERROR_SXS_XML_E_MULTIPLEROOTS                                                  = 14054
	ERROR_SXS_XML_E_MULTIPLE_COLONS                                                = 14046
	ERROR_SXS_XML_E_RESERVEDNAMESPACE                                              = 14066
	ERROR_SXS_XML_E_UNBALANCEDPAREN                                                = 14040
	ERROR_SXS_XML_E_UNCLOSEDCDATA                                                  = 14065
	ERROR_SXS_XML_E_UNCLOSEDCOMMENT                                                = 14063
	ERROR_SXS_XML_E_UNCLOSEDDECL                                                   = 14064
	ERROR_SXS_XML_E_UNCLOSEDENDTAG                                                 = 14061
	ERROR_SXS_XML_E_UNCLOSEDSTARTTAG                                               = 14060
	ERROR_SXS_XML_E_UNCLOSEDSTRING                                                 = 14062
	ERROR_SXS_XML_E_UNCLOSEDTAG                                                    = 14052
	ERROR_SXS_XML_E_UNEXPECTEDENDTAG                                               = 14051
	ERROR_SXS_XML_E_UNEXPECTEDEOF                                                  = 14058
	ERROR_SXS_XML_E_UNEXPECTED_STANDALONE                                          = 14071
	ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE                                          = 14042
	ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK                                       = 14050
	ERROR_SXS_XML_E_XMLDECLSYNTAX                                                  = 14035
	ERROR_SYMLINK_CLASS_DISABLED                                                   = 1463
	ERROR_SYMLINK_NOT_SUPPORTED                                                    = 1464
	ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED                                         = 1274
	ERROR_SYSTEM_DEVICE_NOT_FOUND                                                  = 15299
	ERROR_SYSTEM_NEEDS_REMEDIATION                                                 = 15623
	ERROR_SYSTEM_TRACE                                                             = 150
	ERROR_TAG_NOT_FOUND                                                            = 2012
	ERROR_TAG_NOT_PRESENT                                                          = 2013
	ERROR_THREAD_1_INACTIVE                                                        = 210
	ERROR_TIMEOUT                                                                  = 1460
	ERROR_TIME_SKEW                                                                = 1398
	ERROR_TLW_WITH_WSCHILD                                                         = 1406
	ERROR_TOKEN_ALREADY_IN_USE                                                     = 1375
	ERROR_TOO_MANY_CMDS                                                            = 56
	ERROR_TOO_MANY_CONTEXT_IDS                                                     = 1384
	ERROR_TOO_MANY_LINKS                                                           = 1142
	ERROR_TOO_MANY_LUIDS_REQUESTED                                                 = 1333
	ERROR_TOO_MANY_MODULES                                                         = 214
	ERROR_TOO_MANY_MUXWAITERS                                                      = 152
	ERROR_TOO_MANY_NAMES                                                           = 68
	ERROR_TOO_MANY_OPEN_FILES                                                      = 4
	ERROR_TOO_MANY_POSTS                                                           = 298
	ERROR_TOO_MANY_SECRETS                                                         = 1381
	ERROR_TOO_MANY_SEMAPHORES                                                      = 100
	ERROR_TOO_MANY_SEM_REQUESTS                                                    = 103
	ERROR_TOO_MANY_SESS                                                            = 69
	ERROR_TOO_MANY_SIDS                                                            = 1389
	ERROR_TOO_MANY_TCBS                                                            = 155
	ERROR_TRANSFORM_NOT_SUPPORTED                                                  = 2004
	ERROR_TRANSPORT_FULL                                                           = 4328
	ERROR_TRUSTED_DOMAIN_FAILURE                                                   = 1788
	ERROR_TRUSTED_RELATIONSHIP_FAILURE                                             = 1789
	ERROR_TRUST_FAILURE                                                            = 1790
	ERROR_UNABLE_TO_CLEAN                                                          = 4311
	ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA                                            = 4330
	ERROR_UNABLE_TO_INVENTORY_DRIVE                                                = 4325
	ERROR_UNABLE_TO_INVENTORY_SLOT                                                 = 4326
	ERROR_UNABLE_TO_INVENTORY_TRANSPORT                                            = 4327
	ERROR_UNABLE_TO_LOAD_MEDIUM                                                    = 4324
	ERROR_UNABLE_TO_LOCK_MEDIA                                                     = 1108
	ERROR_UNABLE_TO_MOVE_REPLACEMENT                                               = 1176
	ERROR_UNABLE_TO_MOVE_REPLACEMENT_2                                             = 1177
	ERROR_UNABLE_TO_REMOVE_REPLACED                                                = 1175
	ERROR_UNABLE_TO_UNLOAD_MEDIA                                                   = 1109
	ERROR_UNEXPECTED_OMID                                                          = 4334
	ERROR_UNEXP_NET_ERR                                                            = 59
	ERROR_UNIDENTIFIED_ERROR                                                       = 1287
	ERROR_UNKNOWN_COMPONENT                                                        = 1607
	ERROR_UNKNOWN_FEATURE                                                          = 1606
	ERROR_UNKNOWN_PORT                                                             = 1796
	ERROR_UNKNOWN_PRINTER_DRIVER                                                   = 1797
	ERROR_UNKNOWN_PRINTPROCESSOR                                                   = 1798
	ERROR_UNKNOWN_PRINT_MONITOR                                                    = 3000
	ERROR_UNKNOWN_PRODUCT                                                          = 1605
	ERROR_UNKNOWN_PROPERTY                                                         = 1608
	ERROR_UNKNOWN_REVISION                                                         = 1305
	ERROR_UNMAPPED_SUBSTITUTION_STRING                                             = 14096
	ERROR_UNRECOGNIZED_MEDIA                                                       = 1785
	ERROR_UNRECOGNIZED_VOLUME                                                      = 1005
	ERROR_UNSUPPORTED_TYPE                                                         = 1630
	ERROR_USER_APC                                                                 = 737
	ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED                                         = 1934
	ERROR_USER_EXISTS                                                              = 1316
	ERROR_USER_MAPPED_FILE                                                         = 1224
	ERROR_VC_DISCONNECTED                                                          = 240
	ERROR_VDM_DISALLOWED                                                           = 1286
	ERROR_VOLUME_CONTAINS_SYS_FILES                                                = 4337
	ERROR_VOLUME_NOT_SIS_ENABLED                                                   = 4500
	ERROR_VOLUME_NOT_SUPPORT_EFS                                                   = 6014
	ERROR_WAIT_1                                                                   = 731
	ERROR_WAIT_2                                                                   = 732
	ERROR_WAIT_3                                                                   = 733
	ERROR_WAIT_63                                                                  = 734
	ERROR_WAIT_NO_CHILDREN                                                         = 128
	ERROR_WAKE_SYSTEM                                                              = 730
	ERROR_WINDOW_NOT_COMBOBOX                                                      = 1423
	ERROR_WINDOW_NOT_DIALOG                                                        = 1420
	ERROR_WINDOW_OF_OTHER_THREAD                                                   = 1408
	ERROR_WINS_INTERNAL                                                            = 4000
	ERROR_WMI_ALREADY_DISABLED                                                     = 4212
	ERROR_WMI_ALREADY_ENABLED                                                      = 4206
	ERROR_WMI_DP_FAILED                                                            = 4209
	ERROR_WMI_DP_NOT_FOUND                                                         = 4204
	ERROR_WMI_GUID_DISCONNECTED                                                    = 4207
	ERROR_WMI_GUID_NOT_FOUND                                                       = 4200
	ERROR_WMI_INSTANCE_NOT_FOUND                                                   = 4201
	ERROR_WMI_INVALID_MOF                                                          = 4210
	ERROR_WMI_INVALID_REGINFO                                                      = 4211
	ERROR_WMI_ITEMID_NOT_FOUND                                                     = 4202
	ERROR_WMI_READ_ONLY                                                            = 4213
	ERROR_WMI_SERVER_UNAVAILABLE                                                   = 4208
	ERROR_WMI_SET_FAILURE                                                          = 4214
	ERROR_WMI_TRY_AGAIN                                                            = 4203
	ERROR_WMI_UNRESOLVED_INSTANCE_REF                                              = 4205
	ERROR_WORKING_SET_QUOTA                                                        = 1453
	ERROR_WRITE_FAULT                                                              = 29
	ERROR_WRITE_PROTECT                                                            = 19
	ERROR_WRONG_COMPARTMENT                                                        = 1468
	ERROR_WRONG_DISK                                                               = 34
	ERROR_WRONG_EFS                                                                = 6005
	ERROR_WRONG_PASSWORD                                                           = 1323
	ERROR_WRONG_TARGET_NAME                                                        = 1396
	ERROR_XMLDSIG_ERROR                                                            = 1466
	ERROR_XML_ENCODING_MISMATCH                                                    = 14100
	ERROR_XML_PARSE_ERROR                                                          = 1465
	ERR_ALREADY_LOGGED                                                             = 4
	ERR_LEGACY_COPY                                                                = 0x800
	ESB_DISABLE_BOTH                                                               = 0x0003
	ESB_DISABLE_DOWN                                                               = 0x0002
	ESB_DISABLE_LEFT                                                               = 0x0001
	ESB_DISABLE_LTUP                                                               = 1
	ESB_DISABLE_RIGHT                                                              = 0x0002
	ESB_DISABLE_RTDN                                                               = 2
	ESB_DISABLE_UP                                                                 = 0x0001
	ESB_ENABLE_BOTH                                                                = 0x0000
	ESHUTDOWN                                                                      = 241
	ESOCKTNOSUPPORT                                                                = 240
	ESPIPE                                                                         = 29
	ESRCH                                                                          = 3
	ESTALE                                                                         = 246
	ES_AUTOHSCROLL                                                                 = 128
	ES_AUTOVSCROLL                                                                 = 64
	ES_CENTER                                                                      = 1
	ES_LEFT                                                                        = 0
	ES_LOWERCASE                                                                   = 16
	ES_MULTILINE                                                                   = 4
	ES_NOHIDESEL                                                                   = 256
	ES_NUMBER                                                                      = 8192
	ES_OEMCONVERT                                                                  = 1024
	ES_PASSWORD                                                                    = 32
	ES_READONLY                                                                    = 2048
	ES_RIGHT                                                                       = 2
	ES_UPPERCASE                                                                   = 8
	ES_WANTRETURN                                                                  = 4096
	ETIME                                                                          = 137
	ETIMEDOUT                                                                      = 138
	ETOOMANYREFS                                                                   = 242
	ETO_CLIPPED                                                                    = 0x0004
	ETO_GLYPH_INDEX                                                                = 0x0010
	ETO_IGNORELANGUAGE                                                             = 0x1000
	ETO_NUMERICSLATIN                                                              = 0x0800
	ETO_NUMERICSLOCAL                                                              = 0x0400
	ETO_OPAQUE                                                                     = 0x0002
	ETO_PDY                                                                        = 0x2000
	ETO_RTLREADING                                                                 = 0x0080
	ETXTBSY                                                                        = 139
	EUSERS                                                                         = 244
	EVENPARITY                                                                     = 2
	EVENTLOG_AUDIT_FAILURE                                                         = 0x0010
	EVENTLOG_AUDIT_SUCCESS                                                         = 0x0008
	EVENTLOG_BACKWARDS_READ                                                        = 0x0008
	EVENTLOG_END_ALL_PAIRED_EVENTS                                                 = 0x0004
	EVENTLOG_END_PAIRED_EVENT                                                      = 0x0002
	EVENTLOG_ERROR_TYPE                                                            = 0x0001
	EVENTLOG_FORWARDS_READ                                                         = 0x0004
	EVENTLOG_FULL_INFO                                                             = 0
	EVENTLOG_INFORMATION_TYPE                                                      = 0x0004
	EVENTLOG_PAIRED_EVENT_ACTIVE                                                   = 0x0008
	EVENTLOG_PAIRED_EVENT_INACTIVE                                                 = 0x0010
	EVENTLOG_SEEK_READ                                                             = 0x0002
	EVENTLOG_SEQUENTIAL_READ                                                       = 0x0001
	EVENTLOG_START_PAIRED_EVENT                                                    = 0x0001
	EVENTLOG_SUCCESS                                                               = 0x0000
	EVENTLOG_WARNING_TYPE                                                          = 0x0002
	EVENT_ALL_ACCESS                                                               = 2031619
	EVENT_CONSOLE_CARET                                                            = 0x4001
	EVENT_CONSOLE_END_APPLICATION                                                  = 0x4007
	EVENT_CONSOLE_LAYOUT                                                           = 0x4005
	EVENT_CONSOLE_START_APPLICATION                                                = 0x4006
	EVENT_CONSOLE_UPDATE_REGION                                                    = 0x4002
	EVENT_CONSOLE_UPDATE_SCROLL                                                    = 0x4004
	EVENT_CONSOLE_UPDATE_SIMPLE                                                    = 0x4003
	EVENT_E_FIRST                                                                  = 2147746304
	EVENT_E_LAST                                                                   = 2147746335
	EVENT_MAX                                                                      = 0x7FFFFFFF
	EVENT_MIN                                                                      = 0x00000001
	EVENT_MODIFY_STATE                                                             = 0x0002
	EVENT_OBJECT_ACCELERATORCHANGE                                                 = 0x8012
	EVENT_OBJECT_CREATE                                                            = 0x8000
	EVENT_OBJECT_DEFACTIONCHANGE                                                   = 0x8011
	EVENT_OBJECT_DESCRIPTIONCHANGE                                                 = 0x800D
	EVENT_OBJECT_DESTROY                                                           = 0x8001
	EVENT_OBJECT_FOCUS                                                             = 0x8005
	EVENT_OBJECT_HELPCHANGE                                                        = 0x8010
	EVENT_OBJECT_HIDE                                                              = 0x8003
	EVENT_OBJECT_LOCATIONCHANGE                                                    = 0x800B
	EVENT_OBJECT_NAMECHANGE                                                        = 0x800C
	EVENT_OBJECT_PARENTCHANGE                                                      = 0x800F
	EVENT_OBJECT_REORDER                                                           = 0x8004
	EVENT_OBJECT_SELECTION                                                         = 0x8006
	EVENT_OBJECT_SELECTIONADD                                                      = 0x8007
	EVENT_OBJECT_SELECTIONREMOVE                                                   = 0x8008
	EVENT_OBJECT_SELECTIONWITHIN                                                   = 0x8009
	EVENT_OBJECT_SHOW                                                              = 0x8002
	EVENT_OBJECT_STATECHANGE                                                       = 0x800A
	EVENT_OBJECT_VALUECHANGE                                                       = 0x800E
	EVENT_SYSTEM_ALERT                                                             = 0x0002
	EVENT_SYSTEM_CAPTUREEND                                                        = 0x0009
	EVENT_SYSTEM_CAPTURESTART                                                      = 0x0008
	EVENT_SYSTEM_CONTEXTHELPEND                                                    = 0x000D
	EVENT_SYSTEM_CONTEXTHELPSTART                                                  = 0x000C
	EVENT_SYSTEM_DIALOGEND                                                         = 0x0011
	EVENT_SYSTEM_DIALOGSTART                                                       = 0x0010
	EVENT_SYSTEM_DRAGDROPEND                                                       = 0x000F
	EVENT_SYSTEM_DRAGDROPSTART                                                     = 0x000E
	EVENT_SYSTEM_FOREGROUND                                                        = 0x0003
	EVENT_SYSTEM_MENUEND                                                           = 0x0005
	EVENT_SYSTEM_MENUPOPUPEND                                                      = 0x0007
	EVENT_SYSTEM_MENUPOPUPSTART                                                    = 0x0006
	EVENT_SYSTEM_MENUSTART                                                         = 0x0004
	EVENT_SYSTEM_MINIMIZEEND                                                       = 0x0017
	EVENT_SYSTEM_MINIMIZESTART                                                     = 0x0016
	EVENT_SYSTEM_MOVESIZEEND                                                       = 0x000B
	EVENT_SYSTEM_MOVESIZESTART                                                     = 0x000A
	EVENT_SYSTEM_SCROLLINGEND                                                      = 0x0013
	EVENT_SYSTEM_SCROLLINGSTART                                                    = 0x0012
	EVENT_SYSTEM_SOUND                                                             = 0x0001
	EVENT_SYSTEM_SWITCHEND                                                         = 0x0015
	EVENT_SYSTEM_SWITCHSTART                                                       = 0x0014
	EVENT_S_FIRST                                                                  = 262656
	EVENT_S_LAST                                                                   = 262687
	EV_BREAK                                                                       = 0x40
	EV_CTS                                                                         = 0x8
	EV_DSR                                                                         = 0x10
	EV_ERR                                                                         = 0x80
	EV_EVENT1                                                                      = 0x800
	EV_EVENT2                                                                      = 0x1000
	EV_PERR                                                                        = 0x200
	EV_RING                                                                        = 0x100
	EV_RLSD                                                                        = 0x20
	EV_RX80FULL                                                                    = 0x400
	EV_RXCHAR                                                                      = 0x1
	EV_RXFLAG                                                                      = 0x2
	EV_TXEMPTY                                                                     = 0x4
	EWOULDBLOCK                                                                    = 140
	EWX_ARSO                                                                       = 0x04000000
	EWX_BOOTOPTIONS                                                                = 0x01000000
	EWX_CHECK_SAFE_FOR_SERVER                                                      = 0x08000000
	EWX_FORCE                                                                      = 0x00000004
	EWX_FORCEIFHUNG                                                                = 0x00000010
	EWX_HYBRID_SHUTDOWN                                                            = 0x00400000
	EWX_LOGOFF                                                                     = 0x00000000
	EWX_POWEROFF                                                                   = 0x00000008
	EWX_QUICKRESOLVE                                                               = 0x00000020
	EWX_REBOOT                                                                     = 0x00000002
	EWX_SHUTDOWN                                                                   = 0x00000001
	EXCEPTION_COLLIDED_UNWIND                                                      = 0x40
	EXCEPTION_CONTINUE_EXECUTION                                                   = -1
	EXCEPTION_CONTINUE_SEARCH                                                      = 0
	EXCEPTION_DEBUG_EVENT                                                          = 1
	EXCEPTION_EXECUTE_FAULT                                                        = 8
	EXCEPTION_EXECUTE_HANDLER                                                      = 1
	EXCEPTION_EXIT_UNWIND                                                          = 0x4
	EXCEPTION_MAXIMUM_PARAMETERS                                                   = 15
	EXCEPTION_NESTED_CALL                                                          = 0x10
	EXCEPTION_NONCONTINUABLE                                                       = 0x1
	EXCEPTION_READ_FAULT                                                           = 0
	EXCEPTION_STACK_INVALID                                                        = 0x8
	EXCEPTION_TARGET_UNWIND                                                        = 0x20
	EXCEPTION_UNWIND                                                               = 0x66
	EXCEPTION_UNWINDING                                                            = 0x2
	EXCEPTION_WRITE_FAULT                                                          = 1
	EXDEV                                                                          = 18
	EXIT_PROCESS_DEBUG_EVENT                                                       = 5
	EXIT_THREAD_DEBUG_EVENT                                                        = 4
	EXPAND_LOCAL_DRIVES                                                            = 0
	EXTENDED_STARTUPINFO_PRESENT                                                   = 0x80000
	EXTTEXTOUT                                                                     = 512
	EXT_DEVICE_CAPS                                                                = 4099
	ExceptionCollidedUnwind                                                        = 3
	ExceptionContinueExecution                                                     = 0
	ExceptionContinueSearch                                                        = 1
	ExceptionExecuteHandler                                                        = 4
	ExceptionNestedException                                                       = 2
	FACILITY_AAF                                                                   = 18
	FACILITY_ACS                                                                   = 20
	FACILITY_AUDCLNT                                                               = 2185
	FACILITY_BACKGROUNDCOPY                                                        = 32
	FACILITY_CERT                                                                  = 11
	FACILITY_COMPLUS                                                               = 17
	FACILITY_CONFIGURATION                                                         = 33
	FACILITY_CONTROL                                                               = 10
	FACILITY_DIRECTORYSERVICE                                                      = 37
	FACILITY_DISPATCH                                                              = 2
	FACILITY_DPLAY                                                                 = 21
	FACILITY_HTTP                                                                  = 25
	FACILITY_INTERNET                                                              = 12
	FACILITY_ITF                                                                   = 4
	FACILITY_MEDIASERVER                                                           = 13
	FACILITY_METADIRECTORY                                                         = 35
	FACILITY_MSMQ                                                                  = 14
	FACILITY_NT_BIT                                                                = 0x10000000
	FACILITY_NULL                                                                  = 0
	FACILITY_RPC                                                                   = 1
	FACILITY_SCARD                                                                 = 16
	FACILITY_SECURITY                                                              = 9
	FACILITY_SETUPAPI                                                              = 15
	FACILITY_SSPI                                                                  = 9
	FACILITY_STATE_MANAGEMENT                                                      = 34
	FACILITY_STORAGE                                                               = 3
	FACILITY_SXS                                                                   = 23
	FACILITY_UMI                                                                   = 22
	FACILITY_URT                                                                   = 19
	FACILITY_USERMODE_FILTER_MANAGER                                               = 0x1f
	FACILITY_WIN32                                                                 = 7
	FACILITY_WINDOWS                                                               = 8
	FACILITY_WINDOWSUPDATE                                                         = 36
	FACILITY_WINDOWS_CE                                                            = 24
	FAILED_ACCESS_ACE_FLAG                                                         = 128
	FAIL_FAST_GENERATE_EXCEPTION_ADDRESS                                           = 0x1
	FAIL_FAST_NO_HARD_ERROR_DLG                                                    = 0x2
	FALSE                                                                          = 0
	FALT                                                                           = 0x10
	FAPPCOMMAND_KEY                                                                = 0
	FAPPCOMMAND_MASK                                                               = 0xF000
	FAPPCOMMAND_MOUSE                                                              = 0x8000
	FAPPCOMMAND_OEM                                                                = 0x1000
	FASTCALL                                                                       = 0
	FAST_FAIL_CORRUPT_LIST_ENTRY                                                   = 3
	FAST_FAIL_FATAL_APP_EXIT                                                       = 7
	FAST_FAIL_GS_COOKIE_INIT                                                       = 6
	FAST_FAIL_INCORRECT_STACK                                                      = 4
	FAST_FAIL_INVALID_ARG                                                          = 5
	FAST_FAIL_INVALID_FAST_FAIL_CODE                                               = 0xffffffff
	FAST_FAIL_LEGACY_GS_VIOLATION                                                  = 0
	FAST_FAIL_RANGE_CHECK_FAILURE                                                  = 8
	FAST_FAIL_STACK_COOKIE_CHECK_FAILURE                                           = 2
	FAST_FAIL_UNSAFE_REGISTRY_ACCESS                                               = 9
	FAST_FAIL_VTGUARD_CHECK_FAILURE                                                = 1
	FCONTROL                                                                       = 0x08
	FD_ACCEPT                                                                      = 8
	FD_ACCEPT_BIT                                                                  = 3
	FD_ADDRESS_LIST_CHANGE                                                         = 512
	FD_ADDRESS_LIST_CHANGE_BIT                                                     = 9
	FD_ALL_EVENTS                                                                  = 1023
	FD_CLOSE                                                                       = 32
	FD_CLOSE_BIT                                                                   = 5
	FD_CONNECT                                                                     = 16
	FD_CONNECT_BIT                                                                 = 4
	FD_GROUP_QOS                                                                   = 128
	FD_GROUP_QOS_BIT                                                               = 7
	FD_MAX_EVENTS                                                                  = 10
	FD_OOB                                                                         = 4
	FD_OOB_BIT                                                                     = 2
	FD_QOS                                                                         = 64
	FD_QOS_BIT                                                                     = 6
	FD_READ                                                                        = 1
	FD_READ_BIT                                                                    = 0
	FD_ROUTING_INTERFACE_CHANGE                                                    = 256
	FD_ROUTING_INTERFACE_CHANGE_BIT                                                = 8
	FD_SETSIZE                                                                     = 64
	FD_WRITE                                                                       = 2
	FD_WRITE_BIT                                                                   = 1
	FEATURESETTING_CUSTPAPER                                                       = 3
	FEATURESETTING_MIRROR                                                          = 4
	FEATURESETTING_NEGATIVE                                                        = 5
	FEATURESETTING_NUP                                                             = 0
	FEATURESETTING_OUTPUT                                                          = 1
	FEATURESETTING_PRIVATE_BEGIN                                                   = 0x1000
	FEATURESETTING_PRIVATE_END                                                     = 0x1FFF
	FEATURESETTING_PROTOCOL                                                        = 6
	FEATURESETTING_PSLEVEL                                                         = 2
	FE_FONTSMOOTHINGCLEARTYPE                                                      = 0x0002
	FE_FONTSMOOTHINGDOCKING                                                        = 0x8000
	FE_FONTSMOOTHINGORIENTATIONBGR                                                 = 0x0000
	FE_FONTSMOOTHINGORIENTATIONRGB                                                 = 0x0001
	FE_FONTSMOOTHINGSTANDARD                                                       = 0x0001
	FF_DECORATIVE                                                                  = 80
	FF_DONTCARE                                                                    = 0
	FF_MODERN                                                                      = 48
	FF_ROMAN                                                                       = 16
	FF_SCRIPT                                                                      = 64
	FF_SWISS                                                                       = 32
	FIBER_FLAG_FLOAT_SWITCH                                                        = 0x1
	FILENAME_MAX                                                                   = 260
	FILE_ACTION_ADDED                                                              = 0x00000001
	FILE_ACTION_MODIFIED                                                           = 0x00000003
	FILE_ACTION_REMOVED                                                            = 0x00000002
	FILE_ACTION_RENAMED_NEW_NAME                                                   = 0x00000005
	FILE_ACTION_RENAMED_OLD_NAME                                                   = 0x00000004
	FILE_ADD_FILE                                                                  = 2
	FILE_ADD_SUBDIRECTORY                                                          = 4
	FILE_ALL_ACCESS                                                                = 2032127
	FILE_APPEND_DATA                                                               = 4
	FILE_ATTRIBUTE_ARCHIVE                                                         = 0x00000020
	FILE_ATTRIBUTE_COMPRESSED                                                      = 0x00000800
	FILE_ATTRIBUTE_DEVICE                                                          = 0x00000040
	FILE_ATTRIBUTE_DIRECTORY                                                       = 0x00000010
	FILE_ATTRIBUTE_ENCRYPTED                                                       = 0x00004000
	FILE_ATTRIBUTE_HIDDEN                                                          = 0x00000002
	FILE_ATTRIBUTE_NORMAL                                                          = 0x00000080
	FILE_ATTRIBUTE_NOT_CONTENT_INDEXED                                             = 0x00002000
	FILE_ATTRIBUTE_OFFLINE                                                         = 0x00001000
	FILE_ATTRIBUTE_READONLY                                                        = 0x00000001
	FILE_ATTRIBUTE_REPARSE_POINT                                                   = 0x00000400
	FILE_ATTRIBUTE_SPARSE_FILE                                                     = 0x00000200
	FILE_ATTRIBUTE_SYSTEM                                                          = 0x00000004
	FILE_ATTRIBUTE_TEMPORARY                                                       = 0x00000100
	FILE_ATTRIBUTE_VIRTUAL                                                         = 0x00010000
	FILE_BEGIN                                                                     = 0
	FILE_CACHE_FLAGS_DEFINED                                                       = 0
	FILE_CACHE_MAX_HARD_DISABLE                                                    = 0x00000002
	FILE_CACHE_MAX_HARD_ENABLE                                                     = 0x00000001
	FILE_CACHE_MIN_HARD_DISABLE                                                    = 0x00000008
	FILE_CACHE_MIN_HARD_ENABLE                                                     = 0x00000004
	FILE_CASE_PRESERVED_NAMES                                                      = 0x00000002
	FILE_CASE_SENSITIVE_SEARCH                                                     = 0x00000001
	FILE_COMPLETE_IF_OPLOCKED                                                      = 0x00000100
	FILE_CREATE                                                                    = 0x00000002
	FILE_CREATE_PIPE_INSTANCE                                                      = 4
	FILE_CREATE_TREE_CONNECTION                                                    = 0x00000080
	FILE_CURRENT                                                                   = 1
	FILE_DELETE_CHILD                                                              = 64
	FILE_DELETE_ON_CLOSE                                                           = 0x00001000
	FILE_DIRECTORY_FILE                                                            = 0x00000001
	FILE_DIR_DISALLOWED                                                            = 9
	FILE_ENCRYPTABLE                                                               = 0
	FILE_END                                                                       = 2
	FILE_EXECUTE                                                                   = 32
	FILE_FILE_COMPRESSION                                                          = 0x00000010
	FILE_FLAG_BACKUP_SEMANTICS                                                     = 0x2000000
	FILE_FLAG_DELETE_ON_CLOSE                                                      = 0x4000000
	FILE_FLAG_FIRST_PIPE_INSTANCE                                                  = 0x80000
	FILE_FLAG_NO_BUFFERING                                                         = 0x20000000
	FILE_FLAG_OPEN_NO_RECALL                                                       = 0x100000
	FILE_FLAG_OPEN_REPARSE_POINT                                                   = 0x200000
	FILE_FLAG_OVERLAPPED                                                           = 0x40000000
	FILE_FLAG_POSIX_SEMANTICS                                                      = 0x1000000
	FILE_FLAG_RANDOM_ACCESS                                                        = 0x10000000
	FILE_FLAG_SEQUENTIAL_SCAN                                                      = 0x8000000
	FILE_FLAG_SESSION_AWARE                                                        = 0x800000
	FILE_FLAG_WRITE_THROUGH                                                        = 0x80000000
	FILE_GENERIC_EXECUTE                                                           = 1179808
	FILE_GENERIC_READ                                                              = 1179785
	FILE_GENERIC_WRITE                                                             = 1179926
	FILE_IS_ENCRYPTED                                                              = 1
	FILE_LIST_DIRECTORY                                                            = 1
	FILE_MAP_ALL_ACCESS                                                            = 983071
	FILE_MAP_COPY                                                                  = 0x1
	FILE_MAP_EXECUTE                                                               = 32
	FILE_MAP_LARGE_PAGES                                                           = 0x20000000
	FILE_MAP_READ                                                                  = 4
	FILE_MAP_RESERVE                                                               = 0x80000000
	FILE_MAP_TARGETS_INVALID                                                       = 0x40000000
	FILE_MAP_WRITE                                                                 = 2
	FILE_MAXIMUM_DISPOSITION                                                       = 0x00000005
	FILE_NAMED_STREAMS                                                             = 0x00040000
	FILE_NAME_NORMALIZED                                                           = 0x0
	FILE_NAME_OPENED                                                               = 0x8
	FILE_NON_DIRECTORY_FILE                                                        = 0x00000040
	FILE_NOTIFY_CHANGE_ATTRIBUTES                                                  = 0x00000004
	FILE_NOTIFY_CHANGE_CREATION                                                    = 0x00000040
	FILE_NOTIFY_CHANGE_DIR_NAME                                                    = 0x00000002
	FILE_NOTIFY_CHANGE_FILE_NAME                                                   = 0x00000001
	FILE_NOTIFY_CHANGE_LAST_ACCESS                                                 = 0x00000020
	FILE_NOTIFY_CHANGE_LAST_WRITE                                                  = 0x00000010
	FILE_NOTIFY_CHANGE_SECURITY                                                    = 0x00000100
	FILE_NOTIFY_CHANGE_SIZE                                                        = 0x00000008
	FILE_NO_COMPRESSION                                                            = 0x00008000
	FILE_NO_EA_KNOWLEDGE                                                           = 0x00000200
	FILE_NO_INTERMEDIATE_BUFFERING                                                 = 0x00000008
	FILE_OPEN                                                                      = 0x00000001
	FILE_OPEN_BY_FILE_ID                                                           = 0x00002000
	FILE_OPEN_FOR_BACKUP_INTENT                                                    = 0x00004000
	FILE_OPEN_FOR_FREE_SPACE_QUERY                                                 = 0x00800000
	FILE_OPEN_IF                                                                   = 0x00000003
	FILE_OPEN_NO_RECALL                                                            = 0x00400000
	FILE_OPEN_REMOTE_INSTANCE                                                      = 0x00000400
	FILE_OPEN_REPARSE_POINT                                                        = 0x00200000
	FILE_OVERWRITE                                                                 = 0x00000004
	FILE_OVERWRITE_IF                                                              = 0x00000005
	FILE_PERSISTENT_ACLS                                                           = 0x00000008
	FILE_RANDOM_ACCESS                                                             = 0x00000800
	FILE_READ_ATTRIBUTES                                                           = 128
	FILE_READ_DATA                                                                 = 1
	FILE_READ_EA                                                                   = 8
	FILE_READ_ONLY                                                                 = 8
	FILE_READ_ONLY_VOLUME                                                          = 0x00080000
	FILE_RESERVE_OPFILTER                                                          = 0x00100000
	FILE_ROOT_DIR                                                                  = 3
	FILE_SEQUENTIAL_ONLY                                                           = 0x00000004
	FILE_SEQUENTIAL_WRITE_ONCE                                                     = 0x00100000
	FILE_SHARE_DELETE                                                              = 0x00000004
	FILE_SHARE_READ                                                                = 0x00000001
	FILE_SHARE_VALID_FLAGS                                                         = 0x00000007
	FILE_SHARE_WRITE                                                               = 0x00000002
	FILE_SUPERSEDE                                                                 = 0x00000000
	FILE_SUPPORTS_ENCRYPTION                                                       = 0x00020000
	FILE_SUPPORTS_EXTENDED_ATTRIBUTES                                              = 0x00800000
	FILE_SUPPORTS_HARD_LINKS                                                       = 0x00400000
	FILE_SUPPORTS_INTEGRITY_STREAMS                                                = 0x04000000
	FILE_SUPPORTS_OBJECT_IDS                                                       = 0x00010000
	FILE_SUPPORTS_OPEN_BY_FILE_ID                                                  = 0x01000000
	FILE_SUPPORTS_REMOTE_STORAGE                                                   = 0x00000100
	FILE_SUPPORTS_REPARSE_POINTS                                                   = 0x00000080
	FILE_SUPPORTS_SPARSE_FILES                                                     = 0x00000040
	FILE_SUPPORTS_TRANSACTIONS                                                     = 0x00200000
	FILE_SUPPORTS_USN_JOURNAL                                                      = 0x02000000
	FILE_SYNCHRONOUS_IO_ALERT                                                      = 0x00000010
	FILE_SYNCHRONOUS_IO_NONALERT                                                   = 0x00000020
	FILE_SYSTEM_ATTR                                                               = 2
	FILE_SYSTEM_DIR                                                                = 4
	FILE_SYSTEM_NOT_SUPPORT                                                        = 6
	FILE_TRAVERSE                                                                  = 32
	FILE_TYPE_CHAR                                                                 = 0x2
	FILE_TYPE_DISK                                                                 = 0x1
	FILE_TYPE_PIPE                                                                 = 0x3
	FILE_TYPE_REMOTE                                                               = 0x8000
	FILE_TYPE_UNKNOWN                                                              = 0x0
	FILE_UNICODE_ON_DISK                                                           = 0x00000004
	FILE_UNKNOWN                                                                   = 5
	FILE_USER_DISALLOWED                                                           = 7
	FILE_VER_GET_LOCALISED                                                         = 0x01
	FILE_VER_GET_NEUTRAL                                                           = 0x02
	FILE_VER_GET_PREFETCHED                                                        = 0x04
	FILE_VOLUME_IS_COMPRESSED                                                      = 0x00008000
	FILE_VOLUME_QUOTAS                                                             = 0x00000020
	FILE_WRITE_ATTRIBUTES                                                          = 256
	FILE_WRITE_DATA                                                                = 2
	FILE_WRITE_EA                                                                  = 16
	FILE_WRITE_THROUGH                                                             = 0x00000002
	FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA                               = 4
	FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS                                           = 2
	FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX                                         = 1
	FIND_ENDSWITH                                                                  = 0x00200000
	FIND_FIRST_EX_CASE_SENSITIVE                                                   = 0x00000001
	FIND_FIRST_EX_LARGE_FETCH                                                      = 0x00000002
	FIND_FROMEND                                                                   = 0x00800000
	FIND_FROMSTART                                                                 = 0x00400000
	FIND_RESOURCE_DIRECTORY_LANGUAGES                                              = 1024
	FIND_RESOURCE_DIRECTORY_NAMES                                                  = 512
	FIND_RESOURCE_DIRECTORY_TYPES                                                  = 256
	FIND_STARTSWITH                                                                = 0x00100000
	FIRMWARE_PTR                                                                   = 0
	FIXED_PITCH                                                                    = 1
	FKF_AVAILABLE                                                                  = 0x00000002
	FKF_CLICKON                                                                    = 0x00000040
	FKF_CONFIRMHOTKEY                                                              = 0x00000008
	FKF_FILTERKEYSON                                                               = 0x00000001
	FKF_HOTKEYACTIVE                                                               = 0x00000004
	FKF_HOTKEYSOUND                                                                = 0x00000010
	FKF_INDICATOR                                                                  = 0x00000020
	FLASHW_ALL                                                                     = 3
	FLASHW_CAPTION                                                                 = 0x00000001
	FLASHW_STOP                                                                    = 0
	FLASHW_TIMER                                                                   = 0x00000004
	FLASHW_TIMERNOFG                                                               = 0x0000000c
	FLASHW_TRAY                                                                    = 0x00000002
	FLI_GLYPHS                                                                     = 262144
	FLI_MASK                                                                       = 0x103B
	FLOODFILLBORDER                                                                = 0
	FLOODFILLSURFACE                                                               = 1
	FLS_MAXIMUM_AVAILABLE                                                          = 128
	FLT_DECIMAL_DIG                                                                = 9
	FLT_DIG                                                                        = 6
	FLT_EVAL_METHOD                                                                = 0
	FLT_HAS_SUBNORM                                                                = 1
	FLT_MANT_DIG                                                                   = 24
	FLT_MAX_10_EXP                                                                 = 38
	FLT_MAX_EXP                                                                    = 128
	FLT_MIN_10_EXP                                                                 = -37
	FLT_MIN_EXP                                                                    = -125
	FLT_RADIX                                                                      = 2
	FLT_ROUNDS                                                                     = 1
	FLUSHOUTPUT                                                                    = 6
	FNOINVERT                                                                      = 0x02
	FOCUS_EVENT                                                                    = 0x10
	FONTMAPPER_MAX                                                                 = 10
	FOPEN_MAX                                                                      = 20
	FOREGROUND_BLUE                                                                = 0x1
	FOREGROUND_GREEN                                                               = 0x2
	FOREGROUND_INTENSITY                                                           = 0x8
	FOREGROUND_RED                                                                 = 0x4
	FOREST_USER_RID_MAX                                                            = 499
	FORMAT_MESSAGE_ALLOCATE_BUFFER                                                 = 0x00000100
	FORMAT_MESSAGE_ARGUMENT_ARRAY                                                  = 0x00002000
	FORMAT_MESSAGE_FROM_HMODULE                                                    = 0x00000800
	FORMAT_MESSAGE_FROM_STRING                                                     = 0x00000400
	FORMAT_MESSAGE_FROM_SYSTEM                                                     = 0x00001000
	FORMAT_MESSAGE_IGNORE_INSERTS                                                  = 0x00000200
	FORMAT_MESSAGE_MAX_WIDTH_MASK                                                  = 0x000000ff
	FRAME_FPO                                                                      = 0
	FRAME_IS_LAMBDA                                                                = 0x2
	FRAME_IS_METHOD                                                                = 0x4
	FRAME_IS_OO_DEFINE                                                             = 0x8
	FRAME_IS_PROC                                                                  = 0x1
	FRAME_NONFPO                                                                   = 3
	FRAME_TRAP                                                                     = 1
	FRAME_TSS                                                                      = 2
	FROM_LEFT_1ST_BUTTON_PRESSED                                                   = 0x1
	FROM_LEFT_2ND_BUTTON_PRESSED                                                   = 0x4
	FROM_LEFT_3RD_BUTTON_PRESSED                                                   = 0x8
	FROM_LEFT_4TH_BUTTON_PRESSED                                                   = 0x10
	FROM_PROTOCOL_INFO                                                             = -1
	FRS_ERR_AUTHENTICATION                                                         = 8008
	FRS_ERR_CHILD_TO_PARENT_COMM                                                   = 8011
	FRS_ERR_INSUFFICIENT_PRIV                                                      = 8007
	FRS_ERR_INTERNAL                                                               = 8005
	FRS_ERR_INTERNAL_API                                                           = 8004
	FRS_ERR_INVALID_API_SEQUENCE                                                   = 8001
	FRS_ERR_INVALID_SERVICE_PARAMETER                                              = 8017
	FRS_ERR_PARENT_AUTHENTICATION                                                  = 8010
	FRS_ERR_PARENT_INSUFFICIENT_PRIV                                               = 8009
	FRS_ERR_PARENT_TO_CHILD_COMM                                                   = 8012
	FRS_ERR_SERVICE_COMM                                                           = 8006
	FRS_ERR_STARTING_SERVICE                                                       = 8002
	FRS_ERR_STOPPING_SERVICE                                                       = 8003
	FRS_ERR_SYSVOL_DEMOTE                                                          = 8016
	FRS_ERR_SYSVOL_IS_BUSY                                                         = 8015
	FRS_ERR_SYSVOL_POPULATE                                                        = 8013
	FRS_ERR_SYSVOL_POPULATE_TIMEOUT                                                = 8014
	FR_NOT_ENUM                                                                    = 0x20
	FR_PRIVATE                                                                     = 0x10
	FSHIFT                                                                         = 0x04
	FS_ARABIC                                                                      = 64
	FS_BALTIC                                                                      = 128
	FS_CASE_IS_PRESERVED                                                           = 2
	FS_CASE_SENSITIVE                                                              = 1
	FS_CHINESESIMP                                                                 = 262144
	FS_CHINESETRAD                                                                 = 1048576
	FS_CYRILLIC                                                                    = 4
	FS_FILE_COMPRESSION                                                            = 16
	FS_FILE_ENCRYPTION                                                             = 131072
	FS_GREEK                                                                       = 8
	FS_HEBREW                                                                      = 32
	FS_JISJAPAN                                                                    = 131072
	FS_JOHAB                                                                       = 2097152
	FS_LATIN1                                                                      = 1
	FS_LATIN2                                                                      = 2
	FS_PERSISTENT_ACLS                                                             = 8
	FS_SYMBOL                                                                      = 2147483648
	FS_THAI                                                                        = 65536
	FS_TURKISH                                                                     = 16
	FS_UNICODE_STORED_ON_DISK                                                      = 4
	FS_VIETNAMESE                                                                  = 256
	FS_VOL_IS_COMPRESSED                                                           = 32768
	FS_WANSUNG                                                                     = 524288
	FVIRTKEY                                                                       = 1
	FW_BLACK                                                                       = 900
	FW_BOLD                                                                        = 700
	FW_DEMIBOLD                                                                    = 600
	FW_DONTCARE                                                                    = 0
	FW_EXTRABOLD                                                                   = 800
	FW_EXTRALIGHT                                                                  = 200
	FW_HEAVY                                                                       = 900
	FW_LIGHT                                                                       = 300
	FW_MEDIUM                                                                      = 500
	FW_NORMAL                                                                      = 400
	FW_REGULAR                                                                     = 400
	FW_SEMIBOLD                                                                    = 600
	FW_THIN                                                                        = 100
	FW_ULTRABOLD                                                                   = 800
	FW_ULTRALIGHT                                                                  = 200
	GAI_STRERROR_BUFFER_SIZE                                                       = 1024
	GA_PARENT                                                                      = 1
	GA_ROOT                                                                        = 2
	GA_ROOTOWNER                                                                   = 3
	GB2312_CHARSET                                                                 = 134
	GCLP_HBRBACKGROUND                                                             = -10
	GCLP_HCURSOR                                                                   = -12
	GCLP_HICON                                                                     = -14
	GCLP_HICONSM                                                                   = -34
	GCLP_HMODULE                                                                   = -16
	GCLP_MENUNAME                                                                  = -8
	GCLP_WNDPROC                                                                   = -24
	GCL_CBCLSEXTRA                                                                 = -20
	GCL_CBWNDEXTRA                                                                 = -18
	GCL_CONVERSION                                                                 = 0x0001
	GCL_REVERSECONVERSION                                                          = 0x0002
	GCL_REVERSE_LENGTH                                                             = 0x0003
	GCL_STYLE                                                                      = -26
	GCPCLASS_ARABIC                                                                = 2
	GCPCLASS_HEBREW                                                                = 2
	GCPCLASS_LATIN                                                                 = 1
	GCPCLASS_LATINNUMBER                                                           = 5
	GCPCLASS_LATINNUMERICSEPARATOR                                                 = 7
	GCPCLASS_LATINNUMERICTERMINATOR                                                = 6
	GCPCLASS_LOCALNUMBER                                                           = 4
	GCPCLASS_NEUTRAL                                                               = 3
	GCPCLASS_NUMERICSEPARATOR                                                      = 8
	GCPCLASS_POSTBOUNDLTR                                                          = 0x20
	GCPCLASS_POSTBOUNDRTL                                                          = 0x10
	GCPCLASS_PREBOUNDLTR                                                           = 0x80
	GCPCLASS_PREBOUNDRTL                                                           = 0x40
	GCPGLYPH_LINKAFTER                                                             = 0x4000
	GCPGLYPH_LINKBEFORE                                                            = 0x8000
	GCP_CLASSIN                                                                    = 524288
	GCP_DBCS                                                                       = 0x0001
	GCP_DIACRITIC                                                                  = 0x0100
	GCP_DISPLAYZWG                                                                 = 4194304
	GCP_ERROR                                                                      = 0x8000
	GCP_GLYPHSHAPE                                                                 = 0x0010
	GCP_JUSTIFY                                                                    = 65536
	GCP_JUSTIFYIN                                                                  = 2097152
	GCP_KASHIDA                                                                    = 0x0400
	GCP_LIGATE                                                                     = 0x0020
	GCP_MAXEXTENT                                                                  = 1048576
	GCP_NEUTRALOVERRIDE                                                            = 33554432
	GCP_NUMERICOVERRIDE                                                            = 16777216
	GCP_NUMERICSLATIN                                                              = 67108864
	GCP_NUMERICSLOCAL                                                              = 134217728
	GCP_REORDER                                                                    = 0x0002
	GCP_SYMSWAPOFF                                                                 = 8388608
	GCP_USEKERNING                                                                 = 0x0008
	GCS_COMPATTR                                                                   = 0x0010
	GCS_COMPCLAUSE                                                                 = 0x0020
	GCS_COMPREADATTR                                                               = 0x0002
	GCS_COMPREADCLAUSE                                                             = 0x0004
	GCS_COMPREADSTR                                                                = 0x0001
	GCS_COMPSTR                                                                    = 0x0008
	GCS_CURSORPOS                                                                  = 0x0080
	GCS_DELTASTART                                                                 = 0x0100
	GCS_RESULTCLAUSE                                                               = 0x1000
	GCS_RESULTREADCLAUSE                                                           = 0x0400
	GCS_RESULTREADSTR                                                              = 0x0200
	GCS_RESULTSTR                                                                  = 0x0800
	GCW_ATOM                                                                       = -32
	GDICOMMENT_BEGINGROUP                                                          = 0x00000002
	GDICOMMENT_ENDGROUP                                                            = 0x00000003
	GDICOMMENT_IDENTIFIER                                                          = 0x43494447
	GDICOMMENT_MULTIFORMATS                                                        = 0x40000004
	GDICOMMENT_UNICODE_END                                                         = 0x00000080
	GDICOMMENT_UNICODE_STRING                                                      = 0x00000040
	GDICOMMENT_WINDOWS_METAFILE                                                    = 0x80000001
	GDIPLUS_TS_QUERYVER                                                            = 4122
	GDIPLUS_TS_RECORD                                                              = 4123
	GDI_ERROR                                                                      = 4294967295
	GDI_OBJ_LAST                                                                   = 14
	GENERIC_ALL                                                                    = 268435456
	GENERIC_EXECUTE                                                                = 536870912
	GENERIC_READ                                                                   = 2147483648
	GENERIC_WRITE                                                                  = 1073741824
	GEOID_NOT_AVAILABLE                                                            = -1
	GETCOLORTABLE                                                                  = 5
	GETDEVICEUNITS                                                                 = 42
	GETEXTENDEDTEXTMETRICS                                                         = 256
	GETEXTENTTABLE                                                                 = 257
	GETFACENAME                                                                    = 513
	GETPAIRKERNTABLE                                                               = 258
	GETPENWIDTH                                                                    = 16
	GETPHYSPAGESIZE                                                                = 12
	GETPRINTINGOFFSET                                                              = 13
	GETSCALINGFACTOR                                                               = 14
	GETSETPAPERBINS                                                                = 29
	GETSETPAPERMETRICS                                                             = 35
	GETSETPRINTORIENT                                                              = 30
	GETSETSCREENPARAMS                                                             = 3072
	GETTECHNOLGY                                                                   = 20
	GETTECHNOLOGY                                                                  = 20
	GETTRACKKERNTABLE                                                              = 259
	GETVECTORBRUSHSIZE                                                             = 27
	GETVECTORPENSIZE                                                               = 26
	GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS                                         = 4
	GET_MODULE_HANDLE_EX_FLAG_PIN                                                  = 1
	GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT                                   = 2
	GET_PS_FEATURESETTING                                                          = 4121
	GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A                                            = "GetSystemWow64DirectoryA"
	GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A                                            = "GetSystemWow64DirectoryW"
	GET_TAPE_DRIVE_INFORMATION                                                     = 1
	GET_TAPE_MEDIA_INFORMATION                                                     = 0
	GGI_MARK_NONEXISTING_GLYPHS                                                    = 0x0001
	GGL_INDEX                                                                      = 0x00000002
	GGL_LEVEL                                                                      = 0x00000001
	GGL_PRIVATE                                                                    = 0x00000004
	GGL_STRING                                                                     = 0x00000003
	GGO_BEZIER                                                                     = 3
	GGO_BITMAP                                                                     = 1
	GGO_GLYPH_INDEX                                                                = 0x0080
	GGO_GRAY2_BITMAP                                                               = 4
	GGO_GRAY4_BITMAP                                                               = 5
	GGO_GRAY8_BITMAP                                                               = 6
	GGO_METRICS                                                                    = 0
	GGO_NATIVE                                                                     = 2
	GGO_UNHINTED                                                                   = 0x0100
	GHND                                                                           = 66
	GIDC_ARRIVAL                                                                   = 1
	GIDC_REMOVAL                                                                   = 2
	GL_ID_CANNOTSAVE                                                               = 0x00000011
	GL_ID_CHOOSECANDIDATE                                                          = 0x00000028
	GL_ID_INPUTCODE                                                                = 0x00000026
	GL_ID_INPUTRADICAL                                                             = 0x00000025
	GL_ID_INPUTREADING                                                             = 0x00000024
	GL_ID_INPUTSYMBOL                                                              = 0x00000027
	GL_ID_NOCONVERT                                                                = 0x00000020
	GL_ID_NODICTIONARY                                                             = 0x00000010
	GL_ID_NOMODULE                                                                 = 0x00000001
	GL_ID_PRIVATE_FIRST                                                            = 0x00008000
	GL_ID_PRIVATE_LAST                                                             = 0x0000FFFF
	GL_ID_READINGCONFLICT                                                          = 0x00000023
	GL_ID_REVERSECONVERSION                                                        = 0x00000029
	GL_ID_TOOMANYSTROKE                                                            = 0x00000022
	GL_ID_TYPINGERROR                                                              = 0x00000021
	GL_ID_UNKNOWN                                                                  = 0x00000000
	GL_LEVEL_ERROR                                                                 = 0x00000002
	GL_LEVEL_FATAL                                                                 = 0x00000001
	GL_LEVEL_INFORMATION                                                           = 0x00000004
	GL_LEVEL_NOGUIDELINE                                                           = 0x00000000
	GL_LEVEL_WARNING                                                               = 0x00000003
	GMDI_GOINTOPOPUPS                                                              = 2
	GMDI_USEDISABLED                                                               = 1
	GMEM_DDESHARE                                                                  = 0x2000
	GMEM_DISCARDABLE                                                               = 0x100
	GMEM_DISCARDED                                                                 = 0x4000
	GMEM_FIXED                                                                     = 0x0
	GMEM_INVALID_HANDLE                                                            = 0x8000
	GMEM_LOCKCOUNT                                                                 = 0x00ff
	GMEM_LOWER                                                                     = 4096
	GMEM_MODIFY                                                                    = 0x80
	GMEM_MOVEABLE                                                                  = 0x2
	GMEM_NOCOMPACT                                                                 = 0x10
	GMEM_NODISCARD                                                                 = 0x20
	GMEM_NOTIFY                                                                    = 0x4000
	GMEM_NOT_BANKED                                                                = 0x1000
	GMEM_SHARE                                                                     = 0x2000
	GMEM_VALID_FLAGS                                                               = 0x7f72
	GMEM_ZEROINIT                                                                  = 0x40
	GMMP_USE_DISPLAY_POINTS                                                        = 1
	GMMP_USE_HIGH_RESOLUTION_POINTS                                                = 2
	GM_ADVANCED                                                                    = 2
	GM_COMPATIBLE                                                                  = 1
	GM_LAST                                                                        = 2
	GPTR                                                                           = 64
	GRADIENT_FILL_OP_FLAG                                                          = 0x000000ff
	GRADIENT_FILL_RECT_H                                                           = 0x00000000
	GRADIENT_FILL_RECT_V                                                           = 0x00000001
	GRADIENT_FILL_TRIANGLE                                                         = 0x00000002
	GRAY_BRUSH                                                                     = 2
	GREEK_CHARSET                                                                  = 161
	GROUP_SECURITY_INFORMATION                                                     = 2
	GR_GDIOBJECTS                                                                  = 0
	GR_USEROBJECTS                                                                 = 1
	GS_8BIT_INDICES                                                                = 0x00000001
	GUID_DEFINED                                                                   = 0
	GUI_16BITTASK                                                                  = 0x00000000
	GUI_CARETBLINKING                                                              = 0x00000001
	GUI_INMENUMODE                                                                 = 0x00000004
	GUI_INMOVESIZE                                                                 = 0x00000002
	GUI_POPUPMENUMODE                                                              = 0x00000010
	GUI_SYSTEMMENUMODE                                                             = 0x00000008
	GWLP_HINSTANCE                                                                 = -6
	GWLP_HWNDPARENT                                                                = -8
	GWLP_ID                                                                        = -12
	GWLP_USERDATA                                                                  = -21
	GWLP_WNDPROC                                                                   = -4
	GWL_EXSTYLE                                                                    = -20
	GWL_ID                                                                         = -12
	GWL_STYLE                                                                      = -16
	GW_CHILD                                                                       = 5
	GW_ENABLEDPOPUP                                                                = 6
	GW_HWNDFIRST                                                                   = 0
	GW_HWNDLAST                                                                    = 1
	GW_HWNDNEXT                                                                    = 2
	GW_HWNDPREV                                                                    = 3
	GW_MAX                                                                         = 6
	GW_OWNER                                                                       = 4
	HALFTONE                                                                       = 4
	HANDLE_FLAG_INHERIT                                                            = 0x1
	HANDLE_FLAG_PROTECT_FROM_CLOSE                                                 = 0x2
	HANGEUL_CHARSET                                                                = 129
	HANGUL_CHARSET                                                                 = 129
	HAVE_DECLSPEC                                                                  = 1
	HAVE_PUTENV_THAT_COPIES                                                        = 1
	HCBT_ACTIVATE                                                                  = 5
	HCBT_CLICKSKIPPED                                                              = 6
	HCBT_CREATEWND                                                                 = 3
	HCBT_DESTROYWND                                                                = 4
	HCBT_KEYSKIPPED                                                                = 7
	HCBT_MINMAX                                                                    = 1
	HCBT_MOVESIZE                                                                  = 0
	HCBT_QS                                                                        = 2
	HCBT_SETFOCUS                                                                  = 9
	HCBT_SYSCOMMAND                                                                = 8
	HCF_AVAILABLE                                                                  = 0x00000002
	HCF_CONFIRMHOTKEY                                                              = 0x00000008
	HCF_DEFAULTDESKTOP                                                             = 0x00000200
	HCF_HIGHCONTRASTON                                                             = 0x00000001
	HCF_HOTKEYACTIVE                                                               = 0x00000004
	HCF_HOTKEYAVAILABLE                                                            = 0x00000040
	HCF_HOTKEYSOUND                                                                = 0x00000010
	HCF_INDICATOR                                                                  = 0x00000020
	HCF_LOGONDESKTOP                                                               = 0x00000100
	HCF_OPTION_NOTHEMECHANGE                                                       = 0x00001000
	HC_ACTION                                                                      = 0
	HC_GETNEXT                                                                     = 1
	HC_NOREM                                                                       = 3
	HC_NOREMOVE                                                                    = 3
	HC_SKIP                                                                        = 2
	HC_SYSMODALOFF                                                                 = 5
	HC_SYSMODALON                                                                  = 4
	HEAP_CREATE_ALIGN_16                                                           = 0x00010000
	HEAP_CREATE_ENABLE_EXECUTE                                                     = 0x00040000
	HEAP_CREATE_ENABLE_TRACING                                                     = 0x00020000
	HEAP_DISABLE_COALESCE_ON_FREE                                                  = 0x00000080
	HEAP_FREE_CHECKING_ENABLED                                                     = 0x00000040
	HEAP_GENERATE_EXCEPTIONS                                                       = 0x00000004
	HEAP_GROWABLE                                                                  = 0x00000002
	HEAP_MAXIMUM_TAG                                                               = 0x0FFF
	HEAP_NO_SERIALIZE                                                              = 0x00000001
	HEAP_PSEUDO_TAG_FLAG                                                           = 0x8000
	HEAP_REALLOC_IN_PLACE_ONLY                                                     = 0x00000010
	HEAP_TAG_SHIFT                                                                 = 18
	HEAP_TAIL_CHECKING_ENABLED                                                     = 0x00000020
	HEAP_ZERO_MEMORY                                                               = 0x00000008
	HEBREW_CHARSET                                                                 = 177
	HELPINFO_MENUITEM                                                              = 0x0002
	HELPINFO_WINDOW                                                                = 0x0001
	HELP_COMMAND                                                                   = 0x0102
	HELP_CONTENTS                                                                  = 0x0003
	HELP_CONTEXT                                                                   = 0x0001
	HELP_CONTEXTMENU                                                               = 0x000a
	HELP_CONTEXTPOPUP                                                              = 0x0008
	HELP_FINDER                                                                    = 0x000b
	HELP_FORCEFILE                                                                 = 0x0009
	HELP_HELPONHELP                                                                = 0x0004
	HELP_INDEX                                                                     = 0x0003
	HELP_KEY                                                                       = 0x0101
	HELP_MULTIKEY                                                                  = 0x0201
	HELP_PARTIALKEY                                                                = 0x0105
	HELP_QUIT                                                                      = 0x0002
	HELP_SETCONTENTS                                                               = 0x0005
	HELP_SETINDEX                                                                  = 0x0005
	HELP_SETPOPUP_POS                                                              = 0x000d
	HELP_SETWINPOS                                                                 = 0x0203
	HELP_TCARD                                                                     = 0x8000
	HELP_TCARD_DATA                                                                = 0x0010
	HELP_TCARD_OTHER_CALLER                                                        = 0x0011
	HELP_WM_HELP                                                                   = 0x000c
	HIDE_WINDOW                                                                    = 0
	HIGH_PRIORITY_CLASS                                                            = 0x80
	HIGH_SURROGATE_END                                                             = 0xdbff
	HIGH_SURROGATE_START                                                           = 0xd800
	HINSTANCE_ERROR                                                                = 32
	HISTORY_NO_DUP_FLAG                                                            = 0x1
	HKL_NEXT                                                                       = 1
	HKL_PREV                                                                       = 0
	HMONITOR_DECLARED                                                              = 1
	HOLLOW_BRUSH                                                                   = 5
	HORZRES                                                                        = 8
	HORZSIZE                                                                       = 4
	HOST_NOT_FOUND                                                                 = 11001
	HOVER_DEFAULT                                                                  = 0xFFFFFFFF
	HSHELL_ACCESSIBILITYSTATE                                                      = 11
	HSHELL_ACTIVATESHELLWINDOW                                                     = 3
	HSHELL_APPCOMMAND                                                              = 12
	HSHELL_ENDTASK                                                                 = 10
	HSHELL_FLASH                                                                   = 32774
	HSHELL_GETMINRECT                                                              = 5
	HSHELL_HIGHBIT                                                                 = 0x8000
	HSHELL_LANGUAGE                                                                = 8
	HSHELL_REDRAW                                                                  = 6
	HSHELL_RUDEAPPACTIVATED                                                        = 32772
	HSHELL_SYSMENU                                                                 = 9
	HSHELL_TASKMAN                                                                 = 7
	HSHELL_WINDOWACTIVATED                                                         = 4
	HSHELL_WINDOWCREATED                                                           = 1
	HSHELL_WINDOWDESTROYED                                                         = 2
	HSHELL_WINDOWREPLACED                                                          = 13
	HSHELL_WINDOWREPLACING                                                         = 14
	HS_API_MAX                                                                     = 12
	HS_BDIAGONAL                                                                   = 3
	HS_CROSS                                                                       = 4
	HS_DIAGCROSS                                                                   = 5
	HS_FDIAGONAL                                                                   = 2
	HS_HORIZONTAL                                                                  = 0
	HS_VERTICAL                                                                    = 1
	HTBORDER                                                                       = 18
	HTBOTTOM                                                                       = 15
	HTBOTTOMLEFT                                                                   = 16
	HTBOTTOMRIGHT                                                                  = 17
	HTCAPTION                                                                      = 2
	HTCLIENT                                                                       = 1
	HTCLOSE                                                                        = 20
	HTERROR                                                                        = -2
	HTGROWBOX                                                                      = 4
	HTHELP                                                                         = 21
	HTHSCROLL                                                                      = 6
	HTLEFT                                                                         = 10
	HTMAXBUTTON                                                                    = 9
	HTMENU                                                                         = 5
	HTMINBUTTON                                                                    = 8
	HTNOWHERE                                                                      = 0
	HTOBJECT                                                                       = 19
	HTREDUCE                                                                       = 8
	HTRIGHT                                                                        = 11
	HTSIZE                                                                         = 4
	HTSIZEFIRST                                                                    = 10
	HTSIZELAST                                                                     = 17
	HTSYSMENU                                                                      = 3
	HTTOP                                                                          = 12
	HTTOPLEFT                                                                      = 13
	HTTOPRIGHT                                                                     = 14
	HTTRANSPARENT                                                                  = -1
	HTVSCROLL                                                                      = 7
	HTZOOM                                                                         = 9
	HW_PROFILE_GUIDLEN                                                             = 39
	IACE_CHILDREN                                                                  = 0x0001
	IACE_DEFAULT                                                                   = 0x0010
	IACE_IGNORENOCONTEXT                                                           = 0x0020
	ICM_ADDPROFILE                                                                 = 1
	ICM_DELETEPROFILE                                                              = 2
	ICM_DONE_OUTSIDEDC                                                             = 4
	ICM_OFF                                                                        = 1
	ICM_ON                                                                         = 2
	ICM_QUERY                                                                      = 3
	ICM_QUERYMATCH                                                                 = 7
	ICM_QUERYPROFILE                                                               = 3
	ICM_REGISTERICMATCHER                                                          = 5
	ICM_SETDEFAULTPROFILE                                                          = 4
	ICM_UNREGISTERICMATCHER                                                        = 6
	ICON_BIG                                                                       = 1
	ICON_SMALL                                                                     = 0
	ICON_SMALL2                                                                    = 2
	IDABORT                                                                        = 3
	IDANI_CAPTION                                                                  = 3
	IDANI_OPEN                                                                     = 1
	IDCANCEL                                                                       = 2
	IDCLOSE                                                                        = 8
	IDCONTINUE                                                                     = 11
	IDHELP                                                                         = 9
	IDHOT_SNAPDESKTOP                                                              = -2
	IDHOT_SNAPWINDOW                                                               = -1
	IDH_CANCEL                                                                     = 28444
	IDH_GENERIC_HELP_BUTTON                                                        = 28442
	IDH_HELP                                                                       = 28445
	IDH_MISSING_CONTEXT                                                            = 28441
	IDH_NO_HELP                                                                    = 28440
	IDH_OK                                                                         = 28443
	IDIGNORE                                                                       = 5
	IDLE_PRIORITY_CLASS                                                            = 0x40
	IDNO                                                                           = 7
	IDOK                                                                           = 1
	IDRETRY                                                                        = 4
	IDTIMEOUT                                                                      = 32000
	IDTRYAGAIN                                                                     = 10
	IDYES                                                                          = 6
	IE_BADID                                                                       = -1
	IE_BAUDRATE                                                                    = -12
	IE_BYTESIZE                                                                    = -11
	IE_DEFAULT                                                                     = -5
	IE_HARDWARE                                                                    = -10
	IE_MEMORY                                                                      = -4
	IE_NOPEN                                                                       = -3
	IE_OPEN                                                                        = -2
	IFF_BROADCAST                                                                  = 0x00000002
	IFF_LOOPBACK                                                                   = 0x00000004
	IFF_MULTICAST                                                                  = 0x00000010
	IFF_POINTTOPOINT                                                               = 0x00000008
	IFF_UP                                                                         = 0x00000001
	IGIMIF_RIGHTMENU                                                               = 0x0001
	IGIMII_CMODE                                                                   = 0x0001
	IGIMII_CONFIGURE                                                               = 0x0004
	IGIMII_HELP                                                                    = 0x0010
	IGIMII_INPUTTOOLS                                                              = 0x0040
	IGIMII_OTHER                                                                   = 0x0020
	IGIMII_SMODE                                                                   = 0x0002
	IGIMII_TOOLS                                                                   = 0x0008
	IGNORE                                                                         = 0
	IGP_CONVERSION                                                                 = 0x00000008
	IGP_PROPERTY                                                                   = 0x00000004
	IGP_SELECT                                                                     = 0x00000018
	IGP_SENTENCE                                                                   = 0x0000000c
	IGP_SETCOMPSTR                                                                 = 0x00000014
	IGP_UI                                                                         = 0x00000010
	ILLUMINANT_A                                                                   = 1
	ILLUMINANT_B                                                                   = 2
	ILLUMINANT_C                                                                   = 3
	ILLUMINANT_D50                                                                 = 4
	ILLUMINANT_D55                                                                 = 5
	ILLUMINANT_D65                                                                 = 6
	ILLUMINANT_D75                                                                 = 7
	ILLUMINANT_DAYLIGHT                                                            = 3
	ILLUMINANT_DEVICE_DEFAULT                                                      = 0
	ILLUMINANT_F2                                                                  = 8
	ILLUMINANT_FLUORESCENT                                                         = 8
	ILLUMINANT_MAX_INDEX                                                           = 8
	ILLUMINANT_NTSC                                                                = 3
	ILLUMINANT_TUNGSTEN                                                            = 1
	IMAGE_ARCHIVE_END                                                              = "`\n"
	IMAGE_ARCHIVE_LINKER_MEMBER                                                    = "/               "
	IMAGE_ARCHIVE_LONGNAMES_MEMBER                                                 = "//              "
	IMAGE_ARCHIVE_PAD                                                              = "\n"
	IMAGE_ARCHIVE_START                                                            = "!<arch>\n"
	IMAGE_ARCHIVE_START_SIZE                                                       = 8
	IMAGE_BITMAP                                                                   = 0
	IMAGE_COMDAT_SELECT_ANY                                                        = 2
	IMAGE_COMDAT_SELECT_ASSOCIATIVE                                                = 5
	IMAGE_COMDAT_SELECT_EXACT_MATCH                                                = 4
	IMAGE_COMDAT_SELECT_LARGEST                                                    = 6
	IMAGE_COMDAT_SELECT_NEWEST                                                     = 7
	IMAGE_COMDAT_SELECT_NODUPLICATES                                               = 1
	IMAGE_COMDAT_SELECT_SAME_SIZE                                                  = 3
	IMAGE_CURSOR                                                                   = 2
	IMAGE_DEBUG_MISC_EXENAME                                                       = 1
	IMAGE_DEBUG_TYPE_BORLAND                                                       = 9
	IMAGE_DEBUG_TYPE_CLSID                                                         = 11
	IMAGE_DEBUG_TYPE_CODEVIEW                                                      = 2
	IMAGE_DEBUG_TYPE_COFF                                                          = 1
	IMAGE_DEBUG_TYPE_EXCEPTION                                                     = 5
	IMAGE_DEBUG_TYPE_FIXUP                                                         = 6
	IMAGE_DEBUG_TYPE_FPO                                                           = 3
	IMAGE_DEBUG_TYPE_MISC                                                          = 4
	IMAGE_DEBUG_TYPE_OMAP_FROM_SRC                                                 = 8
	IMAGE_DEBUG_TYPE_OMAP_TO_SRC                                                   = 7
	IMAGE_DEBUG_TYPE_RESERVED10                                                    = 10
	IMAGE_DEBUG_TYPE_UNKNOWN                                                       = 0
	IMAGE_DIRECTORY_ENTRY_ARCHITECTURE                                             = 7
	IMAGE_DIRECTORY_ENTRY_BASERELOC                                                = 5
	IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT                                             = 11
	IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR                                           = 14
	IMAGE_DIRECTORY_ENTRY_DEBUG                                                    = 6
	IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT                                             = 13
	IMAGE_DIRECTORY_ENTRY_EXCEPTION                                                = 3
	IMAGE_DIRECTORY_ENTRY_EXPORT                                                   = 0
	IMAGE_DIRECTORY_ENTRY_GLOBALPTR                                                = 8
	IMAGE_DIRECTORY_ENTRY_IAT                                                      = 12
	IMAGE_DIRECTORY_ENTRY_IMPORT                                                   = 1
	IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG                                              = 10
	IMAGE_DIRECTORY_ENTRY_RESOURCE                                                 = 2
	IMAGE_DIRECTORY_ENTRY_SECURITY                                                 = 4
	IMAGE_DIRECTORY_ENTRY_TLS                                                      = 9
	IMAGE_DLLCHARACTERISTICS_APPCONTAINER                                          = 0x1000
	IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE                                          = 0x0040
	IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY                                       = 0x0080
	IMAGE_DLLCHARACTERISTICS_GUARD_CF                                              = 0x4000
	IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA                                       = 0x0020
	IMAGE_DLLCHARACTERISTICS_NO_BIND                                               = 0x0800
	IMAGE_DLLCHARACTERISTICS_NO_ISOLATION                                          = 0x0200
	IMAGE_DLLCHARACTERISTICS_NO_SEH                                                = 0x0400
	IMAGE_DLLCHARACTERISTICS_NX_COMPAT                                             = 0x0100
	IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE                                 = 0x8000
	IMAGE_DLLCHARACTERISTICS_WDM_DRIVER                                            = 0x2000
	IMAGE_DOS_SIGNATURE                                                            = 0x5A4D
	IMAGE_ENHMETAFILE                                                              = 3
	IMAGE_FILE_32BIT_MACHINE                                                       = 0x0100
	IMAGE_FILE_AGGRESIVE_WS_TRIM                                                   = 0x0010
	IMAGE_FILE_BYTES_REVERSED_HI                                                   = 0x8000
	IMAGE_FILE_BYTES_REVERSED_LO                                                   = 0x0080
	IMAGE_FILE_DEBUG_STRIPPED                                                      = 0x0200
	IMAGE_FILE_DLL                                                                 = 0x2000
	IMAGE_FILE_EXECUTABLE_IMAGE                                                    = 0x0002
	IMAGE_FILE_LARGE_ADDRESS_AWARE                                                 = 0x0020
	IMAGE_FILE_LINE_NUMS_STRIPPED                                                  = 0x0004
	IMAGE_FILE_LOCAL_SYMS_STRIPPED                                                 = 0x0008
	IMAGE_FILE_MACHINE_ALPHA                                                       = 0x0184
	IMAGE_FILE_MACHINE_ALPHA64                                                     = 0x0284
	IMAGE_FILE_MACHINE_AM33                                                        = 0x01d3
	IMAGE_FILE_MACHINE_AMD64                                                       = 0x8664
	IMAGE_FILE_MACHINE_ARM                                                         = 0x01c0
	IMAGE_FILE_MACHINE_ARM64                                                       = 0xaa64
	IMAGE_FILE_MACHINE_ARMNT                                                       = 0x01c4
	IMAGE_FILE_MACHINE_ARMV7                                                       = 0x01c4
	IMAGE_FILE_MACHINE_AXP64                                                       = 644
	IMAGE_FILE_MACHINE_CEE                                                         = 0xc0ee
	IMAGE_FILE_MACHINE_CEF                                                         = 0x0CEF
	IMAGE_FILE_MACHINE_EBC                                                         = 0x0EBC
	IMAGE_FILE_MACHINE_I386                                                        = 0x014c
	IMAGE_FILE_MACHINE_IA64                                                        = 0x0200
	IMAGE_FILE_MACHINE_M32R                                                        = 0x9041
	IMAGE_FILE_MACHINE_MIPS16                                                      = 0x0266
	IMAGE_FILE_MACHINE_MIPSFPU                                                     = 0x0366
	IMAGE_FILE_MACHINE_MIPSFPU16                                                   = 0x0466
	IMAGE_FILE_MACHINE_POWERPC                                                     = 0x01F0
	IMAGE_FILE_MACHINE_POWERPCFP                                                   = 0x01f1
	IMAGE_FILE_MACHINE_R10000                                                      = 0x0168
	IMAGE_FILE_MACHINE_R3000                                                       = 0x0162
	IMAGE_FILE_MACHINE_R4000                                                       = 0x0166
	IMAGE_FILE_MACHINE_SH3                                                         = 0x01a2
	IMAGE_FILE_MACHINE_SH3DSP                                                      = 0x01a3
	IMAGE_FILE_MACHINE_SH3E                                                        = 0x01a4
	IMAGE_FILE_MACHINE_SH4                                                         = 0x01a6
	IMAGE_FILE_MACHINE_SH5                                                         = 0x01a8
	IMAGE_FILE_MACHINE_THUMB                                                       = 0x01c2
	IMAGE_FILE_MACHINE_TRICORE                                                     = 0x0520
	IMAGE_FILE_MACHINE_UNKNOWN                                                     = 0
	IMAGE_FILE_MACHINE_WCEMIPSV2                                                   = 0x0169
	IMAGE_FILE_NET_RUN_FROM_SWAP                                                   = 0x0800
	IMAGE_FILE_RELOCS_STRIPPED                                                     = 0x0001
	IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP                                             = 0x0400
	IMAGE_FILE_SYSTEM                                                              = 0x1000
	IMAGE_FILE_UP_SYSTEM_ONLY                                                      = 0x4000
	IMAGE_ICON                                                                     = 1
	IMAGE_NT_OPTIONAL_HDR32_MAGIC                                                  = 0x10b
	IMAGE_NT_OPTIONAL_HDR64_MAGIC                                                  = 0x20b
	IMAGE_NT_OPTIONAL_HDR_MAGIC                                                    = 523
	IMAGE_NT_SIGNATURE                                                             = 0x00004550
	IMAGE_NUMBEROF_DIRECTORY_ENTRIES                                               = 16
	IMAGE_ORDINAL_FLAG                                                             = 9223372036854775808
	IMAGE_ORDINAL_FLAG32                                                           = 0x80000000
	IMAGE_ORDINAL_FLAG64                                                           = 0x8000000000000000
	IMAGE_OS2_SIGNATURE                                                            = 0x454E
	IMAGE_OS2_SIGNATURE_LE                                                         = 0x454C
	IMAGE_REL_ALPHA_ABSOLUTE                                                       = 0x0000
	IMAGE_REL_ALPHA_BRADDR                                                         = 0x0007
	IMAGE_REL_ALPHA_GPDISP                                                         = 0x0006
	IMAGE_REL_ALPHA_GPREL32                                                        = 0x0003
	IMAGE_REL_ALPHA_GPRELHI                                                        = 0x0017
	IMAGE_REL_ALPHA_GPRELLO                                                        = 0x0016
	IMAGE_REL_ALPHA_HINT                                                           = 0x0008
	IMAGE_REL_ALPHA_INLINE_REFLONG                                                 = 0x0009
	IMAGE_REL_ALPHA_LITERAL                                                        = 0x0004
	IMAGE_REL_ALPHA_LITUSE                                                         = 0x0005
	IMAGE_REL_ALPHA_MATCH                                                          = 0x000D
	IMAGE_REL_ALPHA_PAIR                                                           = 0x000C
	IMAGE_REL_ALPHA_REFHI                                                          = 0x000A
	IMAGE_REL_ALPHA_REFLO                                                          = 0x000B
	IMAGE_REL_ALPHA_REFLONG                                                        = 0x0001
	IMAGE_REL_ALPHA_REFLONGNB                                                      = 0x0010
	IMAGE_REL_ALPHA_REFQ1                                                          = 0x0015
	IMAGE_REL_ALPHA_REFQ2                                                          = 0x0014
	IMAGE_REL_ALPHA_REFQ3                                                          = 0x0013
	IMAGE_REL_ALPHA_REFQUAD                                                        = 0x0002
	IMAGE_REL_ALPHA_SECREL                                                         = 0x000F
	IMAGE_REL_ALPHA_SECRELHI                                                       = 0x0012
	IMAGE_REL_ALPHA_SECRELLO                                                       = 0x0011
	IMAGE_REL_ALPHA_SECTION                                                        = 0x000E
	IMAGE_REL_AMD64_ABSOLUTE                                                       = 0x0000
	IMAGE_REL_AMD64_ADDR32                                                         = 0x0002
	IMAGE_REL_AMD64_ADDR32NB                                                       = 0x0003
	IMAGE_REL_AMD64_ADDR64                                                         = 0x0001
	IMAGE_REL_AMD64_PAIR                                                           = 0x000F
	IMAGE_REL_AMD64_REL32                                                          = 0x0004
	IMAGE_REL_AMD64_REL32_1                                                        = 0x0005
	IMAGE_REL_AMD64_REL32_2                                                        = 0x0006
	IMAGE_REL_AMD64_REL32_3                                                        = 0x0007
	IMAGE_REL_AMD64_REL32_4                                                        = 0x0008
	IMAGE_REL_AMD64_REL32_5                                                        = 0x0009
	IMAGE_REL_AMD64_SECREL                                                         = 0x000B
	IMAGE_REL_AMD64_SECREL7                                                        = 0x000C
	IMAGE_REL_AMD64_SECTION                                                        = 0x000A
	IMAGE_REL_AMD64_SREL32                                                         = 0x000E
	IMAGE_REL_AMD64_SSPAN32                                                        = 0x0010
	IMAGE_REL_AMD64_TOKEN                                                          = 0x000D
	IMAGE_REL_AM_ABSOLUTE                                                          = 0x0000
	IMAGE_REL_AM_ADDR32                                                            = 0x0001
	IMAGE_REL_AM_ADDR32NB                                                          = 0x0002
	IMAGE_REL_AM_CALL32                                                            = 0x0003
	IMAGE_REL_AM_FUNCINFO                                                          = 0x0004
	IMAGE_REL_AM_REL32_1                                                           = 0x0005
	IMAGE_REL_AM_REL32_2                                                           = 0x0006
	IMAGE_REL_AM_SECREL                                                            = 0x0007
	IMAGE_REL_AM_SECTION                                                           = 0x0008
	IMAGE_REL_AM_TOKEN                                                             = 0x0009
	IMAGE_REL_ARM_ABSOLUTE                                                         = 0x0000
	IMAGE_REL_ARM_ADDR32                                                           = 0x0001
	IMAGE_REL_ARM_ADDR32NB                                                         = 0x0002
	IMAGE_REL_ARM_BLX11                                                            = 0x0009
	IMAGE_REL_ARM_BLX23T                                                           = 0x0015
	IMAGE_REL_ARM_BLX24                                                            = 0x0008
	IMAGE_REL_ARM_BRANCH11                                                         = 0x0004
	IMAGE_REL_ARM_BRANCH20T                                                        = 0x0012
	IMAGE_REL_ARM_BRANCH24                                                         = 0x0003
	IMAGE_REL_ARM_BRANCH24T                                                        = 0x0014
	IMAGE_REL_ARM_GPREL12                                                          = 0x0006
	IMAGE_REL_ARM_GPREL7                                                           = 0x0007
	IMAGE_REL_ARM_MOV32                                                            = 0x0010
	IMAGE_REL_ARM_MOV32A                                                           = 0x0010
	IMAGE_REL_ARM_MOV32T                                                           = 0x0011
	IMAGE_REL_ARM_SECREL                                                           = 0x000F
	IMAGE_REL_ARM_SECTION                                                          = 0x000E
	IMAGE_REL_ARM_TOKEN                                                            = 0x0005
	IMAGE_REL_BASED_ABSOLUTE                                                       = 0
	IMAGE_REL_BASED_ARM_MOV32                                                      = 5
	IMAGE_REL_BASED_DIR64                                                          = 10
	IMAGE_REL_BASED_HIGH                                                           = 1
	IMAGE_REL_BASED_HIGHADJ                                                        = 4
	IMAGE_REL_BASED_HIGHLOW                                                        = 3
	IMAGE_REL_BASED_IA64_IMM64                                                     = 9
	IMAGE_REL_BASED_LOW                                                            = 2
	IMAGE_REL_BASED_MIPS_JMPADDR                                                   = 5
	IMAGE_REL_BASED_MIPS_JMPADDR16                                                 = 9
	IMAGE_REL_BASED_THUMB_MOV32                                                    = 7
	IMAGE_REL_CEE_ABSOLUTE                                                         = 0x0000
	IMAGE_REL_CEE_ADDR32                                                           = 0x0001
	IMAGE_REL_CEE_ADDR32NB                                                         = 0x0003
	IMAGE_REL_CEE_ADDR64                                                           = 0x0002
	IMAGE_REL_CEE_SECREL                                                           = 0x0005
	IMAGE_REL_CEE_SECTION                                                          = 0x0004
	IMAGE_REL_CEE_TOKEN                                                            = 0x0006
	IMAGE_REL_CEF_ABSOLUTE                                                         = 0x0000
	IMAGE_REL_CEF_ADDR32                                                           = 0x0001
	IMAGE_REL_CEF_ADDR32NB                                                         = 0x0003
	IMAGE_REL_CEF_ADDR64                                                           = 0x0002
	IMAGE_REL_CEF_SECREL                                                           = 0x0005
	IMAGE_REL_CEF_SECTION                                                          = 0x0004
	IMAGE_REL_CEF_TOKEN                                                            = 0x0006
	IMAGE_REL_EBC_ABSOLUTE                                                         = 0x0000
	IMAGE_REL_EBC_ADDR32NB                                                         = 0x0001
	IMAGE_REL_EBC_REL32                                                            = 0x0002
	IMAGE_REL_EBC_SECREL                                                           = 0x0004
	IMAGE_REL_EBC_SECTION                                                          = 0x0003
	IMAGE_REL_I386_ABSOLUTE                                                        = 0x0000
	IMAGE_REL_I386_DIR16                                                           = 0x0001
	IMAGE_REL_I386_DIR32                                                           = 0x0006
	IMAGE_REL_I386_DIR32NB                                                         = 0x0007
	IMAGE_REL_I386_REL16                                                           = 0x0002
	IMAGE_REL_I386_REL32                                                           = 0x0014
	IMAGE_REL_I386_SECREL                                                          = 0x000B
	IMAGE_REL_I386_SECREL7                                                         = 0x000D
	IMAGE_REL_I386_SECTION                                                         = 0x000A
	IMAGE_REL_I386_SEG12                                                           = 0x0009
	IMAGE_REL_I386_TOKEN                                                           = 0x000C
	IMAGE_REL_IA64_ABSOLUTE                                                        = 0x0000
	IMAGE_REL_IA64_ADDEND                                                          = 0x001F
	IMAGE_REL_IA64_DIR32                                                           = 0x0004
	IMAGE_REL_IA64_DIR32NB                                                         = 0x0010
	IMAGE_REL_IA64_DIR64                                                           = 0x0005
	IMAGE_REL_IA64_GPREL22                                                         = 0x0009
	IMAGE_REL_IA64_GPREL32                                                         = 0x001C
	IMAGE_REL_IA64_IMM14                                                           = 0x0001
	IMAGE_REL_IA64_IMM22                                                           = 0x0002
	IMAGE_REL_IA64_IMM64                                                           = 0x0003
	IMAGE_REL_IA64_IMMGPREL64                                                      = 0x001A
	IMAGE_REL_IA64_LTOFF22                                                         = 0x000A
	IMAGE_REL_IA64_PCREL21B                                                        = 0x0006
	IMAGE_REL_IA64_PCREL21F                                                        = 0x0008
	IMAGE_REL_IA64_PCREL21M                                                        = 0x0007
	IMAGE_REL_IA64_PCREL60B                                                        = 0x0016
	IMAGE_REL_IA64_PCREL60F                                                        = 0x0017
	IMAGE_REL_IA64_PCREL60I                                                        = 0x0018
	IMAGE_REL_IA64_PCREL60M                                                        = 0x0019
	IMAGE_REL_IA64_PCREL60X                                                        = 0x0015
	IMAGE_REL_IA64_SECREL22                                                        = 0x000C
	IMAGE_REL_IA64_SECREL32                                                        = 0x000E
	IMAGE_REL_IA64_SECREL64I                                                       = 0x000D
	IMAGE_REL_IA64_SECTION                                                         = 0x000B
	IMAGE_REL_IA64_SREL14                                                          = 0x0011
	IMAGE_REL_IA64_SREL22                                                          = 0x0012
	IMAGE_REL_IA64_SREL32                                                          = 0x0013
	IMAGE_REL_IA64_TOKEN                                                           = 0x001B
	IMAGE_REL_IA64_UREL32                                                          = 0x0014
	IMAGE_REL_M32R_ABSOLUTE                                                        = 0x0000
	IMAGE_REL_M32R_ADDR24                                                          = 0x0003
	IMAGE_REL_M32R_ADDR32                                                          = 0x0001
	IMAGE_REL_M32R_ADDR32NB                                                        = 0x0002
	IMAGE_REL_M32R_GPREL16                                                         = 0x0004
	IMAGE_REL_M32R_PAIR                                                            = 0x000B
	IMAGE_REL_M32R_PCREL16                                                         = 0x0006
	IMAGE_REL_M32R_PCREL24                                                         = 0x0005
	IMAGE_REL_M32R_PCREL8                                                          = 0x0007
	IMAGE_REL_M32R_REFHALF                                                         = 0x0008
	IMAGE_REL_M32R_REFHI                                                           = 0x0009
	IMAGE_REL_M32R_REFLO                                                           = 0x000A
	IMAGE_REL_M32R_SECREL32                                                        = 0x000D
	IMAGE_REL_M32R_SECTION                                                         = 0x000C
	IMAGE_REL_M32R_TOKEN                                                           = 0x000E
	IMAGE_REL_MIPS_ABSOLUTE                                                        = 0x0000
	IMAGE_REL_MIPS_GPREL                                                           = 0x0006
	IMAGE_REL_MIPS_JMPADDR                                                         = 0x0003
	IMAGE_REL_MIPS_JMPADDR16                                                       = 0x0010
	IMAGE_REL_MIPS_LITERAL                                                         = 0x0007
	IMAGE_REL_MIPS_PAIR                                                            = 0x0025
	IMAGE_REL_MIPS_REFHALF                                                         = 0x0001
	IMAGE_REL_MIPS_REFHI                                                           = 0x0004
	IMAGE_REL_MIPS_REFLO                                                           = 0x0005
	IMAGE_REL_MIPS_REFWORD                                                         = 0x0002
	IMAGE_REL_MIPS_REFWORDNB                                                       = 0x0022
	IMAGE_REL_MIPS_SECREL                                                          = 0x000B
	IMAGE_REL_MIPS_SECRELHI                                                        = 0x000D
	IMAGE_REL_MIPS_SECRELLO                                                        = 0x000C
	IMAGE_REL_MIPS_SECTION                                                         = 0x000A
	IMAGE_REL_MIPS_TOKEN                                                           = 0x000E
	IMAGE_REL_PPC_ABSOLUTE                                                         = 0x0000
	IMAGE_REL_PPC_ADDR14                                                           = 0x0005
	IMAGE_REL_PPC_ADDR16                                                           = 0x0004
	IMAGE_REL_PPC_ADDR24                                                           = 0x0003
	IMAGE_REL_PPC_ADDR32                                                           = 0x0002
	IMAGE_REL_PPC_ADDR32NB                                                         = 0x000A
	IMAGE_REL_PPC_ADDR64                                                           = 0x0001
	IMAGE_REL_PPC_BRNTAKEN                                                         = 0x0400
	IMAGE_REL_PPC_BRTAKEN                                                          = 0x0200
	IMAGE_REL_PPC_GPREL                                                            = 0x0015
	IMAGE_REL_PPC_IFGLUE                                                           = 0x000D
	IMAGE_REL_PPC_IMGLUE                                                           = 0x000E
	IMAGE_REL_PPC_NEG                                                              = 0x0100
	IMAGE_REL_PPC_PAIR                                                             = 0x0012
	IMAGE_REL_PPC_REFHI                                                            = 0x0010
	IMAGE_REL_PPC_REFLO                                                            = 0x0011
	IMAGE_REL_PPC_REL14                                                            = 0x0007
	IMAGE_REL_PPC_REL24                                                            = 0x0006
	IMAGE_REL_PPC_SECREL                                                           = 0x000B
	IMAGE_REL_PPC_SECREL16                                                         = 0x000F
	IMAGE_REL_PPC_SECRELHI                                                         = 0x0014
	IMAGE_REL_PPC_SECRELLO                                                         = 0x0013
	IMAGE_REL_PPC_SECTION                                                          = 0x000C
	IMAGE_REL_PPC_TOCDEFN                                                          = 0x0800
	IMAGE_REL_PPC_TOCREL14                                                         = 0x0009
	IMAGE_REL_PPC_TOCREL16                                                         = 0x0008
	IMAGE_REL_PPC_TOKEN                                                            = 0x0016
	IMAGE_REL_PPC_TYPEMASK                                                         = 0x00FF
	IMAGE_REL_SH3_ABSOLUTE                                                         = 0x0000
	IMAGE_REL_SH3_DIRECT16                                                         = 0x0001
	IMAGE_REL_SH3_DIRECT32                                                         = 0x0002
	IMAGE_REL_SH3_DIRECT32_NB                                                      = 0x0010
	IMAGE_REL_SH3_DIRECT4                                                          = 0x0006
	IMAGE_REL_SH3_DIRECT4_LONG                                                     = 0x0008
	IMAGE_REL_SH3_DIRECT4_WORD                                                     = 0x0007
	IMAGE_REL_SH3_DIRECT8                                                          = 0x0003
	IMAGE_REL_SH3_DIRECT8_LONG                                                     = 0x0005
	IMAGE_REL_SH3_DIRECT8_WORD                                                     = 0x0004
	IMAGE_REL_SH3_GPREL4_LONG                                                      = 0x0011
	IMAGE_REL_SH3_PCREL12_WORD                                                     = 0x000B
	IMAGE_REL_SH3_PCREL8_LONG                                                      = 0x000A
	IMAGE_REL_SH3_PCREL8_WORD                                                      = 0x0009
	IMAGE_REL_SH3_SECREL                                                           = 0x000F
	IMAGE_REL_SH3_SECTION                                                          = 0x000E
	IMAGE_REL_SH3_SIZEOF_SECTION                                                   = 0x000D
	IMAGE_REL_SH3_STARTOF_SECTION                                                  = 0x000C
	IMAGE_REL_SH3_TOKEN                                                            = 0x0012
	IMAGE_REL_SHM_PAIR                                                             = 0x0018
	IMAGE_REL_SHM_PCRELPT                                                          = 0x0013
	IMAGE_REL_SHM_REFHALF                                                          = 0x0015
	IMAGE_REL_SHM_REFLO                                                            = 0x0014
	IMAGE_REL_SHM_RELHALF                                                          = 0x0017
	IMAGE_REL_SHM_RELLO                                                            = 0x0016
	IMAGE_REL_SH_NOMODE                                                            = 0x8000
	IMAGE_REL_THUMB_BLX23                                                          = 0x0015
	IMAGE_REL_THUMB_BRANCH20                                                       = 0x0012
	IMAGE_REL_THUMB_BRANCH24                                                       = 0x0014
	IMAGE_REL_THUMB_MOV32                                                          = 0x0011
	IMAGE_RESOURCE_DATA_IS_DIRECTORY                                               = 0x80000000
	IMAGE_RESOURCE_NAME_IS_STRING                                                  = 0x80000000
	IMAGE_ROM_OPTIONAL_HDR_MAGIC                                                   = 0x107
	IMAGE_SCN_ALIGN_1024BYTES                                                      = 0x00B00000
	IMAGE_SCN_ALIGN_128BYTES                                                       = 0x00800000
	IMAGE_SCN_ALIGN_16BYTES                                                        = 0x00500000
	IMAGE_SCN_ALIGN_1BYTES                                                         = 0x00100000
	IMAGE_SCN_ALIGN_2048BYTES                                                      = 0x00C00000
	IMAGE_SCN_ALIGN_256BYTES                                                       = 0x00900000
	IMAGE_SCN_ALIGN_2BYTES                                                         = 0x00200000
	IMAGE_SCN_ALIGN_32BYTES                                                        = 0x00600000
	IMAGE_SCN_ALIGN_4096BYTES                                                      = 0x00D00000
	IMAGE_SCN_ALIGN_4BYTES                                                         = 0x00300000
	IMAGE_SCN_ALIGN_512BYTES                                                       = 0x00A00000
	IMAGE_SCN_ALIGN_64BYTES                                                        = 0x00700000
	IMAGE_SCN_ALIGN_8192BYTES                                                      = 0x00E00000
	IMAGE_SCN_ALIGN_8BYTES                                                         = 0x00400000
	IMAGE_SCN_ALIGN_MASK                                                           = 0x00F00000
	IMAGE_SCN_CNT_CODE                                                             = 0x00000020
	IMAGE_SCN_CNT_INITIALIZED_DATA                                                 = 0x00000040
	IMAGE_SCN_CNT_UNINITIALIZED_DATA                                               = 0x00000080
	IMAGE_SCN_GPREL                                                                = 0x00008000
	IMAGE_SCN_LNK_COMDAT                                                           = 0x00001000
	IMAGE_SCN_LNK_INFO                                                             = 0x00000200
	IMAGE_SCN_LNK_NRELOC_OVFL                                                      = 0x01000000
	IMAGE_SCN_LNK_OTHER                                                            = 0x00000100
	IMAGE_SCN_LNK_REMOVE                                                           = 0x00000800
	IMAGE_SCN_MEM_16BIT                                                            = 0x00020000
	IMAGE_SCN_MEM_DISCARDABLE                                                      = 0x02000000
	IMAGE_SCN_MEM_EXECUTE                                                          = 0x20000000
	IMAGE_SCN_MEM_FARDATA                                                          = 0x00008000
	IMAGE_SCN_MEM_LOCKED                                                           = 0x00040000
	IMAGE_SCN_MEM_NOT_CACHED                                                       = 0x04000000
	IMAGE_SCN_MEM_NOT_PAGED                                                        = 0x08000000
	IMAGE_SCN_MEM_PRELOAD                                                          = 0x00080000
	IMAGE_SCN_MEM_PURGEABLE                                                        = 0x00020000
	IMAGE_SCN_MEM_READ                                                             = 0x40000000
	IMAGE_SCN_MEM_SHARED                                                           = 0x10000000
	IMAGE_SCN_MEM_WRITE                                                            = 0x80000000
	IMAGE_SCN_NO_DEFER_SPEC_EXC                                                    = 0x00004000
	IMAGE_SCN_SCALE_INDEX                                                          = 0x00000001
	IMAGE_SCN_TYPE_NO_PAD                                                          = 0x00000008
	IMAGE_SEPARATE_DEBUG_FLAGS_MASK                                                = 0x8000
	IMAGE_SEPARATE_DEBUG_MISMATCH                                                  = 0x8000
	IMAGE_SEPARATE_DEBUG_SIGNATURE                                                 = 0x4944
	IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR                                                = 60
	IMAGE_SIZEOF_AUX_SYMBOL                                                        = 18
	IMAGE_SIZEOF_BASE_RELOCATION                                                   = 8
	IMAGE_SIZEOF_FILE_HEADER                                                       = 20
	IMAGE_SIZEOF_LINENUMBER                                                        = 6
	IMAGE_SIZEOF_NT_OPTIONAL32_HEADER                                              = 224
	IMAGE_SIZEOF_NT_OPTIONAL64_HEADER                                              = 240
	IMAGE_SIZEOF_NT_OPTIONAL_HEADER                                                = 240
	IMAGE_SIZEOF_RELOCATION                                                        = 10
	IMAGE_SIZEOF_ROM_OPTIONAL_HEADER                                               = 56
	IMAGE_SIZEOF_SECTION_HEADER                                                    = 40
	IMAGE_SIZEOF_SHORT_NAME                                                        = 8
	IMAGE_SIZEOF_STD_OPTIONAL_HEADER                                               = 28
	IMAGE_SIZEOF_SYMBOL                                                            = 18
	IMAGE_SUBSYSTEM_EFI_APPLICATION                                                = 10
	IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER                                        = 11
	IMAGE_SUBSYSTEM_EFI_ROM                                                        = 13
	IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER                                             = 12
	IMAGE_SUBSYSTEM_NATIVE                                                         = 1
	IMAGE_SUBSYSTEM_NATIVE_WINDOWS                                                 = 8
	IMAGE_SUBSYSTEM_OS2_CUI                                                        = 5
	IMAGE_SUBSYSTEM_POSIX_CUI                                                      = 7
	IMAGE_SUBSYSTEM_UNKNOWN                                                        = 0
	IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION                                       = 16
	IMAGE_SUBSYSTEM_WINDOWS_CE_GUI                                                 = 9
	IMAGE_SUBSYSTEM_WINDOWS_CUI                                                    = 3
	IMAGE_SUBSYSTEM_WINDOWS_GUI                                                    = 2
	IMAGE_SUBSYSTEM_XBOX                                                           = 14
	IMAGE_SYM_CLASS_ARGUMENT                                                       = 0x0009
	IMAGE_SYM_CLASS_AUTOMATIC                                                      = 0x0001
	IMAGE_SYM_CLASS_BIT_FIELD                                                      = 0x0012
	IMAGE_SYM_CLASS_BLOCK                                                          = 0x0064
	IMAGE_SYM_CLASS_CLR_TOKEN                                                      = 0x006B
	IMAGE_SYM_CLASS_END_OF_STRUCT                                                  = 0x0066
	IMAGE_SYM_CLASS_ENUM_TAG                                                       = 0x000F
	IMAGE_SYM_CLASS_EXTERNAL                                                       = 0x0002
	IMAGE_SYM_CLASS_EXTERNAL_DEF                                                   = 0x0005
	IMAGE_SYM_CLASS_FAR_EXTERNAL                                                   = 0x0044
	IMAGE_SYM_CLASS_FILE                                                           = 0x0067
	IMAGE_SYM_CLASS_FUNCTION                                                       = 0x0065
	IMAGE_SYM_CLASS_LABEL                                                          = 0x0006
	IMAGE_SYM_CLASS_MEMBER_OF_ENUM                                                 = 0x0010
	IMAGE_SYM_CLASS_MEMBER_OF_STRUCT                                               = 0x0008
	IMAGE_SYM_CLASS_MEMBER_OF_UNION                                                = 0x000B
	IMAGE_SYM_CLASS_NULL                                                           = 0x0000
	IMAGE_SYM_CLASS_REGISTER                                                       = 0x0004
	IMAGE_SYM_CLASS_REGISTER_PARAM                                                 = 0x0011
	IMAGE_SYM_CLASS_SECTION                                                        = 0x0068
	IMAGE_SYM_CLASS_STATIC                                                         = 0x0003
	IMAGE_SYM_CLASS_STRUCT_TAG                                                     = 0x000A
	IMAGE_SYM_CLASS_TYPE_DEFINITION                                                = 0x000D
	IMAGE_SYM_CLASS_UNDEFINED_LABEL                                                = 0x0007
	IMAGE_SYM_CLASS_UNDEFINED_STATIC                                               = 0x000E
	IMAGE_SYM_CLASS_UNION_TAG                                                      = 0x000C
	IMAGE_SYM_CLASS_WEAK_EXTERNAL                                                  = 0x0069
	IMAGE_SYM_DTYPE_ARRAY                                                          = 3
	IMAGE_SYM_DTYPE_FUNCTION                                                       = 2
	IMAGE_SYM_DTYPE_NULL                                                           = 0
	IMAGE_SYM_DTYPE_POINTER                                                        = 1
	IMAGE_SYM_SECTION_MAX                                                          = 0xFEFF
	IMAGE_SYM_SECTION_MAX_EX                                                       = 2147483647
	IMAGE_SYM_TYPE_BYTE                                                            = 0x000C
	IMAGE_SYM_TYPE_CHAR                                                            = 0x0002
	IMAGE_SYM_TYPE_DOUBLE                                                          = 0x0007
	IMAGE_SYM_TYPE_DWORD                                                           = 0x000F
	IMAGE_SYM_TYPE_ENUM                                                            = 0x000A
	IMAGE_SYM_TYPE_FLOAT                                                           = 0x0006
	IMAGE_SYM_TYPE_INT                                                             = 0x0004
	IMAGE_SYM_TYPE_LONG                                                            = 0x0005
	IMAGE_SYM_TYPE_MOE                                                             = 0x000B
	IMAGE_SYM_TYPE_NULL                                                            = 0x0000
	IMAGE_SYM_TYPE_PCODE                                                           = 0x8000
	IMAGE_SYM_TYPE_SHORT                                                           = 0x0003
	IMAGE_SYM_TYPE_STRUCT                                                          = 0x0008
	IMAGE_SYM_TYPE_UINT                                                            = 0x000E
	IMAGE_SYM_TYPE_UNION                                                           = 0x0009
	IMAGE_SYM_TYPE_VOID                                                            = 0x0001
	IMAGE_SYM_TYPE_WORD                                                            = 0x000D
	IMAGE_VXD_SIGNATURE                                                            = 0x454C
	IMAGE_WEAK_EXTERN_SEARCH_ALIAS                                                 = 3
	IMAGE_WEAK_EXTERN_SEARCH_LIBRARY                                               = 2
	IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY                                             = 1
	IMC_CLOSESTATUSWINDOW                                                          = 0x0021
	IMC_GETCANDIDATEPOS                                                            = 0x0007
	IMC_GETCOMPOSITIONFONT                                                         = 0x0009
	IMC_GETCOMPOSITIONWINDOW                                                       = 0x000B
	IMC_GETSTATUSWINDOWPOS                                                         = 0x000F
	IMC_OPENSTATUSWINDOW                                                           = 0x0022
	IMC_SETCANDIDATEPOS                                                            = 0x0008
	IMC_SETCOMPOSITIONFONT                                                         = 0x000A
	IMC_SETCOMPOSITIONWINDOW                                                       = 0x000C
	IMC_SETSTATUSWINDOWPOS                                                         = 0x0010
	IMEMENUITEM_STRING_SIZE                                                        = 80
	IMEVER_0310                                                                    = 0x0003000A
	IMEVER_0400                                                                    = 0x00040000
	IME_CAND_CODE                                                                  = 0x0002
	IME_CAND_MEANING                                                               = 0x0003
	IME_CAND_RADICAL                                                               = 0x0004
	IME_CAND_READ                                                                  = 0x0001
	IME_CAND_STROKE                                                                = 0x0005
	IME_CAND_UNKNOWN                                                               = 0x0000
	IME_CHOTKEY_IME_NONIME_TOGGLE                                                  = 0x10
	IME_CHOTKEY_SHAPE_TOGGLE                                                       = 0x11
	IME_CHOTKEY_SYMBOL_TOGGLE                                                      = 0x12
	IME_CMODE_ALPHANUMERIC                                                         = 0x0000
	IME_CMODE_CHARCODE                                                             = 0x0020
	IME_CMODE_CHINESE                                                              = 1
	IME_CMODE_EUDC                                                                 = 0x0200
	IME_CMODE_FIXED                                                                = 0x0800
	IME_CMODE_FULLSHAPE                                                            = 0x0008
	IME_CMODE_HANGEUL                                                              = 1
	IME_CMODE_HANGUL                                                               = 1
	IME_CMODE_HANJACONVERT                                                         = 0x0040
	IME_CMODE_JAPANESE                                                             = 1
	IME_CMODE_KATAKANA                                                             = 0x0002
	IME_CMODE_LANGUAGE                                                             = 0x0003
	IME_CMODE_NATIVE                                                               = 0x0001
	IME_CMODE_NOCONVERSION                                                         = 0x0100
	IME_CMODE_RESERVED                                                             = 0xF0000000
	IME_CMODE_ROMAN                                                                = 0x0010
	IME_CMODE_SOFTKBD                                                              = 0x0080
	IME_CMODE_SYMBOL                                                               = 0x0400
	IME_CONFIG_GENERAL                                                             = 1
	IME_CONFIG_REGISTERWORD                                                        = 2
	IME_CONFIG_SELECTDICTIONARY                                                    = 3
	IME_ESC_AUTOMATA                                                               = 0x1009
	IME_ESC_GETHELPFILENAME                                                        = 0x100b
	IME_ESC_GET_EUDC_DICTIONARY                                                    = 0x1003
	IME_ESC_HANJA_MODE                                                             = 0x1008
	IME_ESC_IME_NAME                                                               = 0x1006
	IME_ESC_MAX_KEY                                                                = 0x1005
	IME_ESC_PRIVATE_FIRST                                                          = 0x0800
	IME_ESC_PRIVATE_HOTKEY                                                         = 0x100a
	IME_ESC_PRIVATE_LAST                                                           = 0x0FFF
	IME_ESC_QUERY_SUPPORT                                                          = 0x0003
	IME_ESC_RESERVED_FIRST                                                         = 0x0004
	IME_ESC_RESERVED_LAST                                                          = 0x07FF
	IME_ESC_SEQUENCE_TO_INTERNAL                                                   = 0x1001
	IME_ESC_SET_EUDC_DICTIONARY                                                    = 0x1004
	IME_ESC_SYNC_HOTKEY                                                            = 0x1007
	IME_HOTKEY_DSWITCH_FIRST                                                       = 0x100
	IME_HOTKEY_DSWITCH_LAST                                                        = 0x11F
	IME_HOTKEY_PRIVATE_FIRST                                                       = 0x200
	IME_HOTKEY_PRIVATE_LAST                                                        = 0x21F
	IME_ITHOTKEY_PREVIOUS_COMPOSITION                                              = 0x201
	IME_ITHOTKEY_RECONVERTSTRING                                                   = 0x203
	IME_ITHOTKEY_RESEND_RESULTSTR                                                  = 0x200
	IME_ITHOTKEY_UISTYLE_TOGGLE                                                    = 0x202
	IME_JHOTKEY_CLOSE_OPEN                                                         = 0x30
	IME_KHOTKEY_ENGLISH                                                            = 0x52
	IME_KHOTKEY_HANJACONVERT                                                       = 0x51
	IME_KHOTKEY_SHAPE_TOGGLE                                                       = 0x50
	IME_PROP_AT_CARET                                                              = 0x00010000
	IME_PROP_CANDLIST_START_FROM_1                                                 = 0x00040000
	IME_PROP_COMPLETE_ON_UNSELECT                                                  = 0x00100000
	IME_PROP_SPECIAL_UI                                                            = 0x00020000
	IME_PROP_UNICODE                                                               = 0x00080000
	IME_REGWORD_STYLE_EUDC                                                         = 0x00000001
	IME_REGWORD_STYLE_USER_FIRST                                                   = 0x80000000
	IME_REGWORD_STYLE_USER_LAST                                                    = 0xFFFFFFFF
	IME_SMODE_AUTOMATIC                                                            = 0x0004
	IME_SMODE_CONVERSATION                                                         = 0x0010
	IME_SMODE_NONE                                                                 = 0x0000
	IME_SMODE_PHRASEPREDICT                                                        = 0x0008
	IME_SMODE_PLAURALCLAUSE                                                        = 0x0001
	IME_SMODE_RESERVED                                                             = 0x0000F000
	IME_SMODE_SINGLECONVERT                                                        = 0x0002
	IME_THOTKEY_IME_NONIME_TOGGLE                                                  = 0x70
	IME_THOTKEY_SHAPE_TOGGLE                                                       = 0x71
	IME_THOTKEY_SYMBOL_TOGGLE                                                      = 0x72
	IMFS_CHECKED                                                                   = 8
	IMFS_DEFAULT                                                                   = 4096
	IMFS_DISABLED                                                                  = 3
	IMFS_ENABLED                                                                   = 0
	IMFS_GRAYED                                                                    = 3
	IMFS_HILITE                                                                    = 128
	IMFS_UNCHECKED                                                                 = 0
	IMFS_UNHILITE                                                                  = 0
	IMFT_RADIOCHECK                                                                = 0x00001
	IMFT_SEPARATOR                                                                 = 0x00002
	IMFT_SUBMENU                                                                   = 0x00004
	IMM_ERROR_GENERAL                                                              = -2
	IMM_ERROR_NODATA                                                               = -1
	IMN_CHANGECANDIDATE                                                            = 0x0003
	IMN_CLOSECANDIDATE                                                             = 0x0004
	IMN_CLOSESTATUSWINDOW                                                          = 0x0001
	IMN_GUIDELINE                                                                  = 0x000D
	IMN_OPENCANDIDATE                                                              = 0x0005
	IMN_OPENSTATUSWINDOW                                                           = 0x0002
	IMN_PRIVATE                                                                    = 0x000E
	IMN_SETCANDIDATEPOS                                                            = 0x0009
	IMN_SETCOMPOSITIONFONT                                                         = 0x000A
	IMN_SETCOMPOSITIONWINDOW                                                       = 0x000B
	IMN_SETCONVERSIONMODE                                                          = 0x0006
	IMN_SETOPENSTATUS                                                              = 0x0008
	IMN_SETSENTENCEMODE                                                            = 0x0007
	IMN_SETSTATUSWINDOWPOS                                                         = 0x000C
	IMPLINK_HIGHEXPER                                                              = 158
	IMPLINK_IP                                                                     = 155
	IMPLINK_LOWEXPER                                                               = 156
	IMPORT_OBJECT_HDR_SIG2                                                         = 0xffff
	IMR_CANDIDATEWINDOW                                                            = 0x0002
	IMR_COMPOSITIONFONT                                                            = 0x0003
	IMR_COMPOSITIONWINDOW                                                          = 0x0001
	IMR_CONFIRMRECONVERTSTRING                                                     = 0x0005
	IMR_DOCUMENTFEED                                                               = 0x0007
	IMR_QUERYCHARPOSITION                                                          = 0x0006
	IMR_RECONVERTSTRING                                                            = 0x0004
	IN                                                                             = 0
	INADDR_LOOPBACK                                                                = 0x7f000001
	INADDR_NONE                                                                    = 0xffffffff
	INCL_WINSOCK_API_TYPEDEFS                                                      = 1
	INDEXID_CONTAINER                                                              = 0
	INDEXID_OBJECT                                                                 = 0
	INET6_ADDRSTRLEN                                                               = 65
	INET_ADDRSTRLEN                                                                = 22
	INFINITE                                                                       = 0xffffffff
	INHERITED_ACE                                                                  = 16
	INHERIT_CALLER_PRIORITY                                                        = 0x20000
	INHERIT_ONLY_ACE                                                               = 8
	INHERIT_PARENT_AFFINITY                                                        = 0x10000
	INITIAL_FPCSR                                                                  = 0x027f
	INITIAL_MXCSR                                                                  = 0x1f80
	INIT_ONCE_ASYNC                                                                = 2
	INIT_ONCE_CHECK_ONLY                                                           = 1
	INIT_ONCE_CTX_RESERVED_BITS                                                    = 2
	INIT_ONCE_INIT_FAILED                                                          = 4
	INLINE                                                                         = 0
	INPLACE_E_FIRST                                                                = 2147746208
	INPLACE_E_LAST                                                                 = 2147746223
	INPLACE_S_FIRST                                                                = 262560
	INPLACE_S_LAST                                                                 = 262575
	INPUTLANGCHANGE_BACKWARD                                                       = 0x0004
	INPUTLANGCHANGE_FORWARD                                                        = 0x0002
	INPUTLANGCHANGE_SYSCHARSET                                                     = 0x0001
	INPUT_HARDWARE                                                                 = 2
	INPUT_KEYBOARD                                                                 = 1
	INPUT_MOUSE                                                                    = 0
	INT16_MAX                                                                      = 32767
	INT16_MIN                                                                      = -32768
	INT32_MAX                                                                      = 2147483647
	INT32_MIN                                                                      = -2147483648
	INT64_MAX                                                                      = 9223372036854775807
	INT64_MIN                                                                      = -9223372036854775808
	INT8_MAX                                                                       = 127
	INT8_MIN                                                                       = -128
	INTERP_ALTERNATE_WRONG_ARGS                                                    = 0x400
	INTERP_DEBUG_FRAME                                                             = 0x10
	INTERP_TRACE_IN_PROGRESS                                                       = 0x200
	INTMAX_MAX                                                                     = 9223372036854775807
	INTMAX_MIN                                                                     = -9223372036854775808
	INTPTR_MAX                                                                     = 9223372036854775807
	INTPTR_MIN                                                                     = -9223372036854775808
	INT_FAST16_MAX                                                                 = 32767
	INT_FAST16_MIN                                                                 = -32768
	INT_FAST32_MAX                                                                 = 2147483647
	INT_FAST32_MIN                                                                 = -2147483648
	INT_FAST64_MAX                                                                 = 9223372036854775807
	INT_FAST64_MIN                                                                 = -9223372036854775808
	INT_FAST8_MAX                                                                  = 127
	INT_FAST8_MIN                                                                  = -128
	INT_LEAST16_MAX                                                                = 32767
	INT_LEAST16_MIN                                                                = -32768
	INT_LEAST32_MAX                                                                = 2147483647
	INT_LEAST32_MIN                                                                = -2147483648
	INT_LEAST64_MAX                                                                = 9223372036854775807
	INT_LEAST64_MIN                                                                = -9223372036854775808
	INT_LEAST8_MAX                                                                 = 127
	INT_LEAST8_MIN                                                                 = -128
	INVALID_OS_COUNT                                                               = 65535
	IN_CLASSA_HOST                                                                 = 0x00ffffff
	IN_CLASSA_MAX                                                                  = 128
	IN_CLASSA_NET                                                                  = 0xff000000
	IN_CLASSA_NSHIFT                                                               = 24
	IN_CLASSB_HOST                                                                 = 0x0000ffff
	IN_CLASSB_MAX                                                                  = 65536
	IN_CLASSB_NET                                                                  = 0xffff0000
	IN_CLASSB_NSHIFT                                                               = 16
	IN_CLASSC_HOST                                                                 = 0x000000ff
	IN_CLASSC_NET                                                                  = 0xffffff00
	IN_CLASSC_NSHIFT                                                               = 8
	IN_CLASSD_HOST                                                                 = 0x0fffffff
	IN_CLASSD_NET                                                                  = 0xf0000000
	IN_CLASSD_NSHIFT                                                               = 28
	IOCPARM_MASK                                                                   = 0x7f
	IOC_IN                                                                         = 0x80000000
	IOC_INOUT                                                                      = 3221225472
	IOC_OUT                                                                        = 0x40000000
	IOC_PROTOCOL                                                                   = 0x10000000
	IOC_UNIX                                                                       = 0x00000000
	IOC_VENDOR                                                                     = 0x18000000
	IOC_VOID                                                                       = 0x20000000
	IOC_WS2                                                                        = 0x08000000
	IO_COMPLETION_ALL_ACCESS                                                       = 2031619
	IO_COMPLETION_MODIFY_STATE                                                     = 0x0002
	IO_REPARSE_TAG_AF_UNIX                                                         = 2147483683
	IO_REPARSE_TAG_APPEXECLINK                                                     = 2147483675
	IO_REPARSE_TAG_CLOUD                                                           = 2415919130
	IO_REPARSE_TAG_CLOUD_1                                                         = 2415923226
	IO_REPARSE_TAG_CLOUD_2                                                         = 2415927322
	IO_REPARSE_TAG_CLOUD_3                                                         = 2415931418
	IO_REPARSE_TAG_CLOUD_4                                                         = 2415935514
	IO_REPARSE_TAG_CLOUD_5                                                         = 2415939610
	IO_REPARSE_TAG_CLOUD_6                                                         = 2415943706
	IO_REPARSE_TAG_CLOUD_7                                                         = 2415947802
	IO_REPARSE_TAG_CLOUD_8                                                         = 2415951898
	IO_REPARSE_TAG_CLOUD_9                                                         = 2415955994
	IO_REPARSE_TAG_CLOUD_A                                                         = 2415960090
	IO_REPARSE_TAG_CLOUD_B                                                         = 2415964186
	IO_REPARSE_TAG_CLOUD_C                                                         = 2415968282
	IO_REPARSE_TAG_CLOUD_D                                                         = 2415972378
	IO_REPARSE_TAG_CLOUD_E                                                         = 2415976474
	IO_REPARSE_TAG_CLOUD_F                                                         = 2415980570
	IO_REPARSE_TAG_CLOUD_MASK                                                      = 61440
	IO_REPARSE_TAG_CSV                                                             = 2147483657
	IO_REPARSE_TAG_DEDUP                                                           = 2147483667
	IO_REPARSE_TAG_DFS                                                             = 2147483658
	IO_REPARSE_TAG_DFSR                                                            = 2147483666
	IO_REPARSE_TAG_DRIVE_EXTENDER                                                  = 2147483653
	IO_REPARSE_TAG_FILE_PLACEHOLDER                                                = 2147483669
	IO_REPARSE_TAG_FILTER_MANAGER                                                  = 2147483659
	IO_REPARSE_TAG_GLOBAL_REPARSE                                                  = 2684354585
	IO_REPARSE_TAG_HSM                                                             = 3221225476
	IO_REPARSE_TAG_HSM2                                                            = 2147483654
	IO_REPARSE_TAG_IIS_CACHE                                                       = 2684354576
	IO_REPARSE_TAG_MOUNT_POINT                                                     = 2684354563
	IO_REPARSE_TAG_NFS                                                             = 2147483668
	IO_REPARSE_TAG_ONEDRIVE                                                        = 2147483681
	IO_REPARSE_TAG_PROJFS                                                          = 2415919132
	IO_REPARSE_TAG_PROJFS_TOMBSTONE                                                = 2684354594
	IO_REPARSE_TAG_RESERVED_ONE                                                    = 1
	IO_REPARSE_TAG_RESERVED_RANGE                                                  = 1
	IO_REPARSE_TAG_RESERVED_ZERO                                                   = 0
	IO_REPARSE_TAG_SIS                                                             = 2147483655
	IO_REPARSE_TAG_STORAGE_SYNC                                                    = 2147483678
	IO_REPARSE_TAG_SYMLINK                                                         = 2684354572
	IO_REPARSE_TAG_UNHANDLED                                                       = 2147483680
	IO_REPARSE_TAG_WCI                                                             = 2147483672
	IO_REPARSE_TAG_WCI_1                                                           = 2415923224
	IO_REPARSE_TAG_WCI_TOMBSTONE                                                   = 2684354591
	IO_REPARSE_TAG_WIM                                                             = 2147483656
	IO_REPARSE_TAG_WOF                                                             = 2147483671
	IPPORT_BIFFUDP                                                                 = 512
	IPPORT_CMDSERVER                                                               = 514
	IPPORT_DAYTIME                                                                 = 13
	IPPORT_DISCARD                                                                 = 9
	IPPORT_ECHO                                                                    = 7
	IPPORT_EFSSERVER                                                               = 520
	IPPORT_EXECSERVER                                                              = 512
	IPPORT_FINGER                                                                  = 79
	IPPORT_FTP                                                                     = 21
	IPPORT_LOGINSERVER                                                             = 513
	IPPORT_MTP                                                                     = 57
	IPPORT_NAMESERVER                                                              = 42
	IPPORT_NETSTAT                                                                 = 15
	IPPORT_RESERVED                                                                = 1024
	IPPORT_RJE                                                                     = 77
	IPPORT_ROUTESERVER                                                             = 520
	IPPORT_SMTP                                                                    = 25
	IPPORT_SUPDUP                                                                  = 95
	IPPORT_SYSTAT                                                                  = 11
	IPPORT_TELNET                                                                  = 23
	IPPORT_TFTP                                                                    = 69
	IPPORT_TIMESERVER                                                              = 37
	IPPORT_TTYLINK                                                                 = 87
	IPPORT_WHOIS                                                                   = 43
	IPPORT_WHOSERVER                                                               = 513
	IPPROTO_AH                                                                     = 51
	IPPROTO_CBT                                                                    = 7
	IPPROTO_DSTOPTS                                                                = 60
	IPPROTO_EGP                                                                    = 8
	IPPROTO_ESP                                                                    = 50
	IPPROTO_FRAGMENT                                                               = 44
	IPPROTO_GGP                                                                    = 3
	IPPROTO_HOPOPTS                                                                = 0
	IPPROTO_ICLFXBM                                                                = 78
	IPPROTO_ICMP                                                                   = 1
	IPPROTO_ICMPV6                                                                 = 58
	IPPROTO_IDP                                                                    = 22
	IPPROTO_IGMP                                                                   = 2
	IPPROTO_IGP                                                                    = 9
	IPPROTO_IP                                                                     = 0
	IPPROTO_IPV4                                                                   = 4
	IPPROTO_IPV6                                                                   = 41
	IPPROTO_L2TP                                                                   = 115
	IPPROTO_MAX                                                                    = 256
	IPPROTO_ND                                                                     = 77
	IPPROTO_NONE                                                                   = 59
	IPPROTO_PGM                                                                    = 113
	IPPROTO_PIM                                                                    = 103
	IPPROTO_PUP                                                                    = 12
	IPPROTO_RAW                                                                    = 255
	IPPROTO_RDP                                                                    = 27
	IPPROTO_ROUTING                                                                = 43
	IPPROTO_SCTP                                                                   = 132
	IPPROTO_ST                                                                     = 5
	IPPROTO_TCP                                                                    = 6
	IPPROTO_UDP                                                                    = 17
	IPV6_ADD_IFLIST                                                                = 29
	IPV6_ADD_MEMBERSHIP                                                            = 12
	IPV6_CHECKSUM                                                                  = 26
	IPV6_DEL_IFLIST                                                                = 30
	IPV6_DONTFRAG                                                                  = 14
	IPV6_DROP_MEMBERSHIP                                                           = 13
	IPV6_HDRINCL                                                                   = 2
	IPV6_HOPLIMIT                                                                  = 21
	IPV6_HOPOPTS                                                                   = 1
	IPV6_IFLIST                                                                    = 28
	IPV6_JOIN_GROUP                                                                = 12
	IPV6_LEAVE_GROUP                                                               = 13
	IPV6_MULTICAST_HOPS                                                            = 10
	IPV6_MULTICAST_IF                                                              = 9
	IPV6_MULTICAST_LOOP                                                            = 11
	IPV6_PKTINFO                                                                   = 19
	IPV6_PROTECTION_LEVEL                                                          = 23
	IPV6_RECVDSTADDR                                                               = 25
	IPV6_RECVIF                                                                    = 24
	IPV6_RECVRTHDR                                                                 = 38
	IPV6_RECVTCLASS                                                                = 40
	IPV6_RTHDR                                                                     = 32
	IPV6_TCLASS                                                                    = 39
	IPV6_UNICAST_HOPS                                                              = 4
	IPV6_UNICAST_IF                                                                = 31
	IPV6_V6ONLY                                                                    = 27
	IP_ADD_MEMBERSHIP                                                              = 12
	IP_ADD_SOURCE_MEMBERSHIP                                                       = 15
	IP_BLOCK_SOURCE                                                                = 17
	IP_DONTFRAGMENT                                                                = 14
	IP_DROP_MEMBERSHIP                                                             = 13
	IP_DROP_SOURCE_MEMBERSHIP                                                      = 16
	IP_HDRINCL                                                                     = 2
	IP_MULTICAST_IF                                                                = 9
	IP_MULTICAST_LOOP                                                              = 11
	IP_MULTICAST_TTL                                                               = 10
	IP_OPTIONS                                                                     = 1
	IP_PKTINFO                                                                     = 19
	IP_RECEIVE_BROADCAST                                                           = 22
	IP_TOS                                                                         = 3
	IP_TTL                                                                         = 4
	IP_UNBLOCK_SOURCE                                                              = 18
	ISC_SHOWUIALL                                                                  = 0xC000000F
	ISC_SHOWUIALLCANDIDATEWINDOW                                                   = 0x0000000F
	ISC_SHOWUICANDIDATEWINDOW                                                      = 0x00000001
	ISC_SHOWUICOMPOSITIONWINDOW                                                    = 0x80000000
	ISC_SHOWUIGUIDELINE                                                            = 0x40000000
	ISMEX_CALLBACK                                                                 = 0x00000004
	ISMEX_NOSEND                                                                   = 0x00000000
	ISMEX_NOTIFY                                                                   = 0x00000002
	ISMEX_REPLIED                                                                  = 0x00000008
	ISMEX_SEND                                                                     = 0x00000001
	IS_TEXT_UNICODE_ASCII16                                                        = 0x0001
	IS_TEXT_UNICODE_CONTROLS                                                       = 0x0004
	IS_TEXT_UNICODE_DBCS_LEADBYTE                                                  = 0x0400
	IS_TEXT_UNICODE_ILLEGAL_CHARS                                                  = 0x0100
	IS_TEXT_UNICODE_NOT_ASCII_MASK                                                 = 0xF000
	IS_TEXT_UNICODE_NOT_UNICODE_MASK                                               = 0x0F00
	IS_TEXT_UNICODE_NULL_BYTES                                                     = 0x1000
	IS_TEXT_UNICODE_ODD_LENGTH                                                     = 0x0200
	IS_TEXT_UNICODE_REVERSE_ASCII16                                                = 0x0010
	IS_TEXT_UNICODE_REVERSE_CONTROLS                                               = 0x0040
	IS_TEXT_UNICODE_REVERSE_MASK                                                   = 0x00F0
	IS_TEXT_UNICODE_REVERSE_SIGNATURE                                              = 0x0080
	IS_TEXT_UNICODE_REVERSE_STATISTICS                                             = 0x0020
	IS_TEXT_UNICODE_SIGNATURE                                                      = 0x0008
	IS_TEXT_UNICODE_STATISTICS                                                     = 0x0002
	IS_TEXT_UNICODE_UNICODE_MASK                                                   = 0x000F
	JL_BOTH                                                                        = 0x04
	JL_RECEIVER_ONLY                                                               = 0x02
	JL_SENDER_ONLY                                                                 = 0x01
	JOB_OBJECT_ALL_ACCESS                                                          = 2031647
	JOB_OBJECT_ASSIGN_PROCESS                                                      = 1
	JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS                                             = 0x000000ff
	JOB_OBJECT_CPU_RATE_CONTROL_ENABLE                                             = 0x1
	JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP                                           = 0x4
	JOB_OBJECT_CPU_RATE_CONTROL_NOTIFY                                             = 0x8
	JOB_OBJECT_CPU_RATE_CONTROL_VALID_FLAGS                                        = 0xf
	JOB_OBJECT_CPU_RATE_CONTROL_WEIGHT_BASED                                       = 0x2
	JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS                                          = 0x00007fff
	JOB_OBJECT_LIMIT_ACTIVE_PROCESS                                                = 0x00000008
	JOB_OBJECT_LIMIT_AFFINITY                                                      = 0x00000010
	JOB_OBJECT_LIMIT_BREAKAWAY_OK                                                  = 0x00000800
	JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION                                    = 0x00000400
	JOB_OBJECT_LIMIT_JOB_MEMORY                                                    = 0x00000200
	JOB_OBJECT_LIMIT_JOB_READ_BYTES                                                = 0x00010000
	JOB_OBJECT_LIMIT_JOB_TIME                                                      = 0x00000004
	JOB_OBJECT_LIMIT_JOB_WRITE_BYTES                                               = 0x00020000
	JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE                                             = 0x00002000
	JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME                                             = 0x00000040
	JOB_OBJECT_LIMIT_PRIORITY_CLASS                                                = 0x00000020
	JOB_OBJECT_LIMIT_PROCESS_MEMORY                                                = 0x00000100
	JOB_OBJECT_LIMIT_PROCESS_TIME                                                  = 0x00000002
	JOB_OBJECT_LIMIT_RATE_CONTROL                                                  = 0x00040000
	JOB_OBJECT_LIMIT_RESERVED3                                                     = 0x00008000
	JOB_OBJECT_LIMIT_RESERVED4                                                     = 0x00010000
	JOB_OBJECT_LIMIT_RESERVED5                                                     = 0x00020000
	JOB_OBJECT_LIMIT_RESERVED6                                                     = 0x00040000
	JOB_OBJECT_LIMIT_SCHEDULING_CLASS                                              = 0x00000080
	JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK                                           = 0x00001000
	JOB_OBJECT_LIMIT_SUBSET_AFFINITY                                               = 0x00004000
	JOB_OBJECT_LIMIT_VALID_FLAGS                                                   = 0x0007ffff
	JOB_OBJECT_LIMIT_WORKINGSET                                                    = 0x00000001
	JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS                                           = 8
	JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT                                            = 3
	JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO                                             = 4
	JOB_OBJECT_MSG_END_OF_JOB_TIME                                                 = 1
	JOB_OBJECT_MSG_END_OF_PROCESS_TIME                                             = 2
	JOB_OBJECT_MSG_EXIT_PROCESS                                                    = 7
	JOB_OBJECT_MSG_JOB_CYCLE_TIME_LIMIT                                            = 12
	JOB_OBJECT_MSG_JOB_MEMORY_LIMIT                                                = 10
	JOB_OBJECT_MSG_MAXIMUM                                                         = 12
	JOB_OBJECT_MSG_MINIMUM                                                         = 1
	JOB_OBJECT_MSG_NEW_PROCESS                                                     = 6
	JOB_OBJECT_MSG_NOTIFICATION_LIMIT                                              = 11
	JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT                                            = 9
	JOB_OBJECT_NOTIFICATION_LIMIT_VALID_FLAGS                                      = 0x00070204
	JOB_OBJECT_POST_AT_END_OF_JOB                                                  = 1
	JOB_OBJECT_QUERY                                                               = 4
	JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS                                          = 0x0007ffff
	JOB_OBJECT_SECURITY_FILTER_TOKENS                                              = 0x00000008
	JOB_OBJECT_SECURITY_NO_ADMIN                                                   = 0x00000001
	JOB_OBJECT_SECURITY_ONLY_TOKEN                                                 = 0x00000004
	JOB_OBJECT_SECURITY_RESTRICTED_TOKEN                                           = 0x00000002
	JOB_OBJECT_SECURITY_VALID_FLAGS                                                = 0x0000000f
	JOB_OBJECT_SET_ATTRIBUTES                                                      = 2
	JOB_OBJECT_SET_SECURITY_ATTRIBUTES                                             = 16
	JOB_OBJECT_TERMINATE                                                           = 8
	JOB_OBJECT_TERMINATE_AT_END_OF_JOB                                             = 0
	JOB_OBJECT_UILIMIT_ALL                                                         = 0x000000FF
	JOB_OBJECT_UILIMIT_DESKTOP                                                     = 0x00000040
	JOB_OBJECT_UILIMIT_DISPLAYSETTINGS                                             = 0x00000010
	JOB_OBJECT_UILIMIT_EXITWINDOWS                                                 = 0x00000080
	JOB_OBJECT_UILIMIT_GLOBALATOMS                                                 = 0x00000020
	JOB_OBJECT_UILIMIT_HANDLES                                                     = 0x00000001
	JOB_OBJECT_UILIMIT_NONE                                                        = 0x00000000
	JOB_OBJECT_UILIMIT_READCLIPBOARD                                               = 0x00000002
	JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS                                            = 0x00000008
	JOB_OBJECT_UILIMIT_WRITECLIPBOARD                                              = 0x00000004
	JOB_OBJECT_UI_VALID_FLAGS                                                      = 0x000000FF
	JOHAB_CHARSET                                                                  = 130
	KEYBOARD_OVERRUN_MAKE_CODE                                                     = 0xFF
	KEYEVENTF_EXTENDEDKEY                                                          = 0x0001
	KEYEVENTF_KEYUP                                                                = 0x0002
	KEYEVENTF_SCANCODE                                                             = 0x0008
	KEYEVENTF_UNICODE                                                              = 0x0004
	KEY_ALL_ACCESS                                                                 = 983103
	KEY_CREATE_LINK                                                                = 32
	KEY_CREATE_SUB_KEY                                                             = 4
	KEY_ENUMERATE_SUB_KEYS                                                         = 8
	KEY_EVENT                                                                      = 0x1
	KEY_EXECUTE                                                                    = 131097
	KEY_NOTIFY                                                                     = 16
	KEY_QUERY_VALUE                                                                = 1
	KEY_READ                                                                       = 131097
	KEY_SET_VALUE                                                                  = 2
	KEY_WOW64_32KEY                                                                = 512
	KEY_WOW64_64KEY                                                                = 256
	KEY_WOW64_RES                                                                  = 768
	KEY_WRITE                                                                      = 131078
	KF_ALTDOWN                                                                     = 0x2000
	KF_DLGMODE                                                                     = 0x0800
	KF_EXTENDED                                                                    = 0x0100
	KF_MENUMODE                                                                    = 0x1000
	KF_REPEAT                                                                      = 0x4000
	KF_UP                                                                          = 0x8000
	KLF_ACTIVATE                                                                   = 0x00000001
	KLF_NOTELLSHELL                                                                = 0x00000080
	KLF_REORDER                                                                    = 0x00000008
	KLF_REPLACELANG                                                                = 0x00000010
	KLF_RESET                                                                      = 0x40000000
	KLF_SETFORPROCESS                                                              = 0x00000100
	KLF_SHIFTLOCK                                                                  = 0x00010000
	KLF_SUBSTITUTE_OK                                                              = 0x00000002
	KL_NAMELENGTH                                                                  = 9
	KTM_MARSHAL_BLOB_VERSION_MAJOR                                                 = 1
	KTM_MARSHAL_BLOB_VERSION_MINOR                                                 = 1
	LABEL_SECURITY_INFORMATION                                                     = 16
	LANG_AFRIKAANS                                                                 = 0x36
	LANG_ALBANIAN                                                                  = 0x1c
	LANG_ALSATIAN                                                                  = 0x84
	LANG_AMHARIC                                                                   = 0x5e
	LANG_ARABIC                                                                    = 0x01
	LANG_ARMENIAN                                                                  = 0x2b
	LANG_ASSAMESE                                                                  = 0x4d
	LANG_AZERBAIJANI                                                               = 0x2c
	LANG_AZERI                                                                     = 0x2c
	LANG_BANGLA                                                                    = 0x45
	LANG_BASHKIR                                                                   = 0x6d
	LANG_BASQUE                                                                    = 0x2d
	LANG_BELARUSIAN                                                                = 0x23
	LANG_BENGALI                                                                   = 0x45
	LANG_BOSNIAN                                                                   = 0x1a
	LANG_BOSNIAN_NEUTRAL                                                           = 0x781a
	LANG_BRETON                                                                    = 0x7e
	LANG_BULGARIAN                                                                 = 0x02
	LANG_CATALAN                                                                   = 0x03
	LANG_CENTRAL_KURDISH                                                           = 0x92
	LANG_CHEROKEE                                                                  = 0x5c
	LANG_CHINESE                                                                   = 0x04
	LANG_CHINESE_SIMPLIFIED                                                        = 0x04
	LANG_CHINESE_TRADITIONAL                                                       = 0x7c04
	LANG_CORSICAN                                                                  = 0x83
	LANG_CROATIAN                                                                  = 0x1a
	LANG_CZECH                                                                     = 0x05
	LANG_DANISH                                                                    = 0x06
	LANG_DARI                                                                      = 0x8c
	LANG_DIVEHI                                                                    = 0x65
	LANG_DUTCH                                                                     = 0x13
	LANG_ENGLISH                                                                   = 0x09
	LANG_ESTONIAN                                                                  = 0x25
	LANG_FAEROESE                                                                  = 0x38
	LANG_FARSI                                                                     = 0x29
	LANG_FILIPINO                                                                  = 0x64
	LANG_FINNISH                                                                   = 0x0b
	LANG_FRENCH                                                                    = 0x0c
	LANG_FRISIAN                                                                   = 0x62
	LANG_FULAH                                                                     = 0x67
	LANG_GALICIAN                                                                  = 0x56
	LANG_GEORGIAN                                                                  = 0x37
	LANG_GERMAN                                                                    = 0x07
	LANG_GREEK                                                                     = 0x08
	LANG_GREENLANDIC                                                               = 0x6f
	LANG_GUJARATI                                                                  = 0x47
	LANG_HAUSA                                                                     = 0x68
	LANG_HEBREW                                                                    = 0x0d
	LANG_HINDI                                                                     = 0x39
	LANG_HUNGARIAN                                                                 = 0x0e
	LANG_ICELANDIC                                                                 = 0x0f
	LANG_IGBO                                                                      = 0x70
	LANG_INDONESIAN                                                                = 0x21
	LANG_INUKTITUT                                                                 = 0x5d
	LANG_INVARIANT                                                                 = 0x7f
	LANG_IRISH                                                                     = 0x3c
	LANG_ITALIAN                                                                   = 0x10
	LANG_JAPANESE                                                                  = 0x11
	LANG_KANNADA                                                                   = 0x4b
	LANG_KASHMIRI                                                                  = 0x60
	LANG_KAZAK                                                                     = 0x3f
	LANG_KHMER                                                                     = 0x53
	LANG_KICHE                                                                     = 0x86
	LANG_KINYARWANDA                                                               = 0x87
	LANG_KONKANI                                                                   = 0x57
	LANG_KOREAN                                                                    = 0x12
	LANG_KYRGYZ                                                                    = 0x40
	LANG_LAO                                                                       = 0x54
	LANG_LATVIAN                                                                   = 0x26
	LANG_LITHUANIAN                                                                = 0x27
	LANG_LOWER_SORBIAN                                                             = 0x2e
	LANG_LUXEMBOURGISH                                                             = 0x6e
	LANG_MACEDONIAN                                                                = 0x2f
	LANG_MALAY                                                                     = 0x3e
	LANG_MALAYALAM                                                                 = 0x4c
	LANG_MALTESE                                                                   = 0x3a
	LANG_MANIPURI                                                                  = 0x58
	LANG_MAORI                                                                     = 0x81
	LANG_MAPUDUNGUN                                                                = 0x7a
	LANG_MARATHI                                                                   = 0x4e
	LANG_MOHAWK                                                                    = 0x7c
	LANG_MONGOLIAN                                                                 = 0x50
	LANG_NEPALI                                                                    = 0x61
	LANG_NEUTRAL                                                                   = 0x00
	LANG_NORWEGIAN                                                                 = 0x14
	LANG_OCCITAN                                                                   = 0x82
	LANG_ODIA                                                                      = 0x48
	LANG_ORIYA                                                                     = 0x48
	LANG_PASHTO                                                                    = 0x63
	LANG_PERSIAN                                                                   = 0x29
	LANG_POLISH                                                                    = 0x15
	LANG_PORTUGUESE                                                                = 0x16
	LANG_PULAR                                                                     = 0x67
	LANG_PUNJABI                                                                   = 0x46
	LANG_QUECHUA                                                                   = 0x6b
	LANG_ROMANIAN                                                                  = 0x18
	LANG_ROMANSH                                                                   = 0x17
	LANG_RUSSIAN                                                                   = 0x19
	LANG_SAKHA                                                                     = 0x85
	LANG_SAMI                                                                      = 0x3b
	LANG_SANSKRIT                                                                  = 0x4f
	LANG_SCOTTISH_GAELIC                                                           = 0x91
	LANG_SERBIAN                                                                   = 0x1a
	LANG_SERBIAN_NEUTRAL                                                           = 0x7c1a
	LANG_SINDHI                                                                    = 0x59
	LANG_SINHALESE                                                                 = 0x5b
	LANG_SLOVAK                                                                    = 0x1b
	LANG_SLOVENIAN                                                                 = 0x24
	LANG_SOTHO                                                                     = 0x6c
	LANG_SPANISH                                                                   = 0x0a
	LANG_SWAHILI                                                                   = 0x41
	LANG_SWEDISH                                                                   = 0x1d
	LANG_SYRIAC                                                                    = 0x5a
	LANG_TAJIK                                                                     = 0x28
	LANG_TAMAZIGHT                                                                 = 0x5f
	LANG_TAMIL                                                                     = 0x49
	LANG_TATAR                                                                     = 0x44
	LANG_TELUGU                                                                    = 0x4a
	LANG_THAI                                                                      = 0x1e
	LANG_TIBETAN                                                                   = 0x51
	LANG_TIGRIGNA                                                                  = 0x73
	LANG_TIGRINYA                                                                  = 0x73
	LANG_TSWANA                                                                    = 0x32
	LANG_TURKISH                                                                   = 0x1f
	LANG_TURKMEN                                                                   = 0x42
	LANG_UIGHUR                                                                    = 0x80
	LANG_UKRAINIAN                                                                 = 0x22
	LANG_UPPER_SORBIAN                                                             = 0x2e
	LANG_URDU                                                                      = 0x20
	LANG_UZBEK                                                                     = 0x43
	LANG_VALENCIAN                                                                 = 0x03
	LANG_VIETNAMESE                                                                = 0x2a
	LANG_WELSH                                                                     = 0x52
	LANG_WOLOF                                                                     = 0x88
	LANG_XHOSA                                                                     = 0x34
	LANG_YAKUT                                                                     = 0x85
	LANG_YI                                                                        = 0x78
	LANG_YORUBA                                                                    = 0x6a
	LANG_ZULU                                                                      = 0x35
	LAYERED_PROTOCOL                                                               = 0
	LAYOUT_BITMAPORIENTATIONPRESERVED                                              = 0x00000008
	LAYOUT_BTT                                                                     = 0x00000002
	LAYOUT_ORIENTATIONMASK                                                         = 7
	LAYOUT_RTL                                                                     = 0x00000001
	LAYOUT_VBH                                                                     = 0x00000004
	LBN_DBLCLK                                                                     = 2
	LBN_ERRSPACE                                                                   = -2
	LBN_KILLFOCUS                                                                  = 5
	LBN_SELCANCEL                                                                  = 3
	LBN_SELCHANGE                                                                  = 1
	LBN_SETFOCUS                                                                   = 4
	LBS_COMBOBOX                                                                   = 32768
	LBS_DISABLENOSCROLL                                                            = 4096
	LBS_EXTENDEDSEL                                                                = 2048
	LBS_HASSTRINGS                                                                 = 64
	LBS_MULTICOLUMN                                                                = 512
	LBS_MULTIPLESEL                                                                = 8
	LBS_NODATA                                                                     = 8192
	LBS_NOINTEGRALHEIGHT                                                           = 256
	LBS_NOREDRAW                                                                   = 4
	LBS_NOSEL                                                                      = 16384
	LBS_NOTIFY                                                                     = 1
	LBS_OWNERDRAWFIXED                                                             = 16
	LBS_OWNERDRAWVARIABLE                                                          = 32
	LBS_SORT                                                                       = 2
	LBS_STANDARD                                                                   = 10485763
	LBS_USETABSTOPS                                                                = 128
	LBS_WANTKEYBOARDINPUT                                                          = 1024
	LB_ADDFILE                                                                     = 0x0196
	LB_ADDSTRING                                                                   = 0x0180
	LB_CTLCODE                                                                     = 0
	LB_DELETESTRING                                                                = 0x0182
	LB_DIR                                                                         = 0x018D
	LB_ERR                                                                         = -1
	LB_ERRSPACE                                                                    = -2
	LB_FINDSTRING                                                                  = 0x018F
	LB_FINDSTRINGEXACT                                                             = 0x01A2
	LB_GETANCHORINDEX                                                              = 0x019D
	LB_GETCARETINDEX                                                               = 0x019F
	LB_GETCOUNT                                                                    = 0x018B
	LB_GETCURSEL                                                                   = 0x0188
	LB_GETHORIZONTALEXTENT                                                         = 0x0193
	LB_GETITEMDATA                                                                 = 0x0199
	LB_GETITEMHEIGHT                                                               = 0x01A1
	LB_GETITEMRECT                                                                 = 0x0198
	LB_GETLISTBOXINFO                                                              = 0x01B2
	LB_GETLOCALE                                                                   = 0x01A6
	LB_GETSEL                                                                      = 0x0187
	LB_GETSELCOUNT                                                                 = 0x0190
	LB_GETSELITEMS                                                                 = 0x0191
	LB_GETTEXT                                                                     = 0x0189
	LB_GETTEXTLEN                                                                  = 0x018A
	LB_GETTOPINDEX                                                                 = 0x018E
	LB_INITSTORAGE                                                                 = 0x01A8
	LB_INSERTSTRING                                                                = 0x0181
	LB_ITEMFROMPOINT                                                               = 0x01A9
	LB_MSGMAX                                                                      = 0x01B3
	LB_OKAY                                                                        = 0
	LB_RESETCONTENT                                                                = 0x0184
	LB_SELECTSTRING                                                                = 0x018C
	LB_SELITEMRANGE                                                                = 0x019B
	LB_SELITEMRANGEEX                                                              = 0x0183
	LB_SETANCHORINDEX                                                              = 0x019C
	LB_SETCARETINDEX                                                               = 0x019E
	LB_SETCOLUMNWIDTH                                                              = 0x0195
	LB_SETCOUNT                                                                    = 0x01A7
	LB_SETCURSEL                                                                   = 0x0186
	LB_SETHORIZONTALEXTENT                                                         = 0x0194
	LB_SETITEMDATA                                                                 = 0x019A
	LB_SETITEMHEIGHT                                                               = 0x01A0
	LB_SETLOCALE                                                                   = 0x01A5
	LB_SETSEL                                                                      = 0x0185
	LB_SETTABSTOPS                                                                 = 0x0192
	LB_SETTOPINDEX                                                                 = 0x0197
	LCID_ALTERNATE_SORTS                                                           = 0x00000004
	LCID_INSTALLED                                                                 = 0x00000001
	LCID_SUPPORTED                                                                 = 0x00000002
	LCMAP_BYTEREV                                                                  = 0x00000800
	LCMAP_FULLWIDTH                                                                = 0x00800000
	LCMAP_HALFWIDTH                                                                = 0x00400000
	LCMAP_HIRAGANA                                                                 = 0x00100000
	LCMAP_KATAKANA                                                                 = 0x00200000
	LCMAP_LINGUISTIC_CASING                                                        = 0x01000000
	LCMAP_LOWERCASE                                                                = 0x00000100
	LCMAP_SIMPLIFIED_CHINESE                                                       = 0x02000000
	LCMAP_SORTKEY                                                                  = 0x00000400
	LCMAP_TRADITIONAL_CHINESE                                                      = 0x04000000
	LCMAP_UPPERCASE                                                                = 0x00000200
	LCS_CALIBRATED_RGB                                                             = 0
	LCS_GM_ABS_COLORIMETRIC                                                        = 8
	LCS_GM_BUSINESS                                                                = 1
	LCS_GM_GRAPHICS                                                                = 2
	LCS_GM_IMAGES                                                                  = 4
	LC_INTERIORS                                                                   = 128
	LC_MARKER                                                                      = 4
	LC_NONE                                                                        = 0
	LC_POLYLINE                                                                    = 2
	LC_POLYMARKER                                                                  = 8
	LC_STYLED                                                                      = 32
	LC_WIDE                                                                        = 16
	LC_WIDESTYLED                                                                  = 64
	LDBL_DECIMAL_DIG                                                               = 21
	LDBL_DIG                                                                       = 18
	LDBL_HAS_SUBNORM                                                               = 1
	LDBL_MANT_DIG                                                                  = 64
	LDBL_MAX_10_EXP                                                                = 4932
	LDBL_MAX_EXP                                                                   = 16384
	LDBL_MIN_10_EXP                                                                = -4931
	LDBL_MIN_EXP                                                                   = -16381
	LEFT_ALT_PRESSED                                                               = 0x2
	LEFT_CTRL_PRESSED                                                              = 0x8
	LF_FACESIZE                                                                    = 32
	LF_FULLFACESIZE                                                                = 64
	LGRPID_ARABIC                                                                  = 0x000d
	LGRPID_ARMENIAN                                                                = 0x0011
	LGRPID_BALTIC                                                                  = 0x0003
	LGRPID_CENTRAL_EUROPE                                                          = 0x0002
	LGRPID_CYRILLIC                                                                = 0x0005
	LGRPID_GEORGIAN                                                                = 0x0010
	LGRPID_GREEK                                                                   = 0x0004
	LGRPID_HEBREW                                                                  = 0x000c
	LGRPID_INDIC                                                                   = 0x000f
	LGRPID_INSTALLED                                                               = 0x00000001
	LGRPID_JAPANESE                                                                = 0x0007
	LGRPID_KOREAN                                                                  = 0x0008
	LGRPID_SIMPLIFIED_CHINESE                                                      = 0x000a
	LGRPID_SUPPORTED                                                               = 0x00000002
	LGRPID_THAI                                                                    = 0x000b
	LGRPID_TRADITIONAL_CHINESE                                                     = 0x0009
	LGRPID_TURKIC                                                                  = 0x0006
	LGRPID_TURKISH                                                                 = 0x0006
	LGRPID_VIETNAMESE                                                              = 0x000e
	LGRPID_WESTERN_EUROPE                                                          = 0x0001
	LHND                                                                           = 66
	LINECAPS                                                                       = 30
	LINGUISTIC_IGNORECASE                                                          = 0x00000010
	LINGUISTIC_IGNOREDIACRITIC                                                     = 0x00000020
	LITTLEENDIAN                                                                   = 0x0001
	LLKHF_ALTDOWN                                                                  = 32
	LLKHF_EXTENDED                                                                 = 1
	LLKHF_INJECTED                                                                 = 0x00000010
	LLKHF_LOWER_IL_INJECTED                                                        = 0x00000002
	LLKHF_UP                                                                       = 128
	LLMHF_INJECTED                                                                 = 0x00000001
	LLMHF_LOWER_IL_INJECTED                                                        = 0x00000002
	LMEM_DISCARDABLE                                                               = 0xf00
	LMEM_DISCARDED                                                                 = 0x4000
	LMEM_FIXED                                                                     = 0x0
	LMEM_INVALID_HANDLE                                                            = 0x8000
	LMEM_LOCKCOUNT                                                                 = 0xff
	LMEM_MODIFY                                                                    = 0x80
	LMEM_MOVEABLE                                                                  = 0x2
	LMEM_NOCOMPACT                                                                 = 0x10
	LMEM_NODISCARD                                                                 = 0x20
	LMEM_VALID_FLAGS                                                               = 0xf72
	LMEM_ZEROINIT                                                                  = 0x40
	LOAD_DLL_DEBUG_EVENT                                                           = 6
	LOAD_IGNORE_CODE_AUTHZ_LEVEL                                                   = 0x10
	LOAD_LIBRARY_AS_DATAFILE                                                       = 0x2
	LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE                                             = 0x40
	LOAD_LIBRARY_AS_IMAGE_RESOURCE                                                 = 0x20
	LOAD_LIBRARY_REQUIRE_SIGNED_TARGET                                             = 0x80
	LOAD_LIBRARY_SEARCH_APPLICATION_DIR                                            = 0x200
	LOAD_LIBRARY_SEARCH_DEFAULT_DIRS                                               = 0x1000
	LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR                                               = 0x100
	LOAD_LIBRARY_SEARCH_SYSTEM32                                                   = 0x800
	LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER                                      = 2048
	LOAD_LIBRARY_SEARCH_USER_DIRS                                                  = 0x400
	LOAD_WITH_ALTERED_SEARCH_PATH                                                  = 0x8
	LOCALE_FONTSIGNATURE                                                           = 0x00000058
	LOCALE_ICALENDARTYPE                                                           = 0x00001009
	LOCALE_ICENTURY                                                                = 0x00000024
	LOCALE_ICOUNTRY                                                                = 0x00000005
	LOCALE_ICURRDIGITS                                                             = 0x00000019
	LOCALE_ICURRENCY                                                               = 0x0000001b
	LOCALE_IDATE                                                                   = 0x00000021
	LOCALE_IDAYLZERO                                                               = 0x00000026
	LOCALE_IDEFAULTANSICODEPAGE                                                    = 0x00001004
	LOCALE_IDEFAULTCODEPAGE                                                        = 0x0000000b
	LOCALE_IDEFAULTCOUNTRY                                                         = 0x0000000a
	LOCALE_IDEFAULTEBCDICCODEPAGE                                                  = 0x00001012
	LOCALE_IDEFAULTLANGUAGE                                                        = 0x00000009
	LOCALE_IDEFAULTMACCODEPAGE                                                     = 0x00001011
	LOCALE_IDIGITS                                                                 = 0x00000011
	LOCALE_IDIGITSUBSTITUTION                                                      = 0x00001014
	LOCALE_IFIRSTDAYOFWEEK                                                         = 0x0000100c
	LOCALE_IFIRSTWEEKOFYEAR                                                        = 0x0000100d
	LOCALE_IGEOID                                                                  = 0x0000005b
	LOCALE_IINTLCURRDIGITS                                                         = 0x0000001a
	LOCALE_ILANGUAGE                                                               = 0x00000001
	LOCALE_ILDATE                                                                  = 0x00000022
	LOCALE_ILZERO                                                                  = 0x00000012
	LOCALE_IMEASURE                                                                = 0x0000000d
	LOCALE_IMONLZERO                                                               = 0x00000027
	LOCALE_INEGCURR                                                                = 0x0000001c
	LOCALE_INEGNUMBER                                                              = 0x00001010
	LOCALE_INEGSEPBYSPACE                                                          = 0x00000057
	LOCALE_INEGSIGNPOSN                                                            = 0x00000053
	LOCALE_INEGSYMPRECEDES                                                         = 0x00000056
	LOCALE_IOPTIONALCALENDAR                                                       = 0x0000100b
	LOCALE_IPAPERSIZE                                                              = 0x0000100a
	LOCALE_IPOSSEPBYSPACE                                                          = 0x00000055
	LOCALE_IPOSSIGNPOSN                                                            = 0x00000052
	LOCALE_IPOSSYMPRECEDES                                                         = 0x00000054
	LOCALE_ITIME                                                                   = 0x00000023
	LOCALE_ITIMEMARKPOSN                                                           = 0x00001005
	LOCALE_ITLZERO                                                                 = 0x00000025
	LOCALE_NAME_MAX_LENGTH                                                         = 85
	LOCALE_NOUSEROVERRIDE                                                          = 0x80000000
	LOCALE_RETURN_NUMBER                                                           = 0x20000000
	LOCALE_S1159                                                                   = 0x00000028
	LOCALE_S2359                                                                   = 0x00000029
	LOCALE_SABBREVCTRYNAME                                                         = 0x00000007
	LOCALE_SABBREVDAYNAME1                                                         = 0x00000031
	LOCALE_SABBREVDAYNAME2                                                         = 0x00000032
	LOCALE_SABBREVDAYNAME3                                                         = 0x00000033
	LOCALE_SABBREVDAYNAME4                                                         = 0x00000034
	LOCALE_SABBREVDAYNAME5                                                         = 0x00000035
	LOCALE_SABBREVDAYNAME6                                                         = 0x00000036
	LOCALE_SABBREVDAYNAME7                                                         = 0x00000037
	LOCALE_SABBREVLANGNAME                                                         = 0x00000003
	LOCALE_SABBREVMONTHNAME1                                                       = 0x00000044
	LOCALE_SABBREVMONTHNAME10                                                      = 0x0000004d
	LOCALE_SABBREVMONTHNAME11                                                      = 0x0000004e
	LOCALE_SABBREVMONTHNAME12                                                      = 0x0000004f
	LOCALE_SABBREVMONTHNAME13                                                      = 0x0000100f
	LOCALE_SABBREVMONTHNAME2                                                       = 0x00000045
	LOCALE_SABBREVMONTHNAME3                                                       = 0x00000046
	LOCALE_SABBREVMONTHNAME4                                                       = 0x00000047
	LOCALE_SABBREVMONTHNAME5                                                       = 0x00000048
	LOCALE_SABBREVMONTHNAME6                                                       = 0x00000049
	LOCALE_SABBREVMONTHNAME7                                                       = 0x0000004a
	LOCALE_SABBREVMONTHNAME8                                                       = 0x0000004b
	LOCALE_SABBREVMONTHNAME9                                                       = 0x0000004c
	LOCALE_SCOUNTRY                                                                = 0x00000006
	LOCALE_SCURRENCY                                                               = 0x00000014
	LOCALE_SDATE                                                                   = 0x0000001d
	LOCALE_SDAYNAME1                                                               = 0x0000002a
	LOCALE_SDAYNAME2                                                               = 0x0000002b
	LOCALE_SDAYNAME3                                                               = 0x0000002c
	LOCALE_SDAYNAME4                                                               = 0x0000002d
	LOCALE_SDAYNAME5                                                               = 0x0000002e
	LOCALE_SDAYNAME6                                                               = 0x0000002f
	LOCALE_SDAYNAME7                                                               = 0x00000030
	LOCALE_SDECIMAL                                                                = 0x0000000e
	LOCALE_SENGCOUNTRY                                                             = 0x00001002
	LOCALE_SENGCURRNAME                                                            = 0x00001007
	LOCALE_SENGLANGUAGE                                                            = 0x00001001
	LOCALE_SENGLISHCOUNTRYNAME                                                     = 0x00001002
	LOCALE_SENGLISHLANGUAGENAME                                                    = 0x00001001
	LOCALE_SGROUPING                                                               = 0x00000010
	LOCALE_SINTLSYMBOL                                                             = 0x00000015
	LOCALE_SISO3166CTRYNAME                                                        = 0x0000005a
	LOCALE_SISO639LANGNAME                                                         = 0x00000059
	LOCALE_SLANGUAGE                                                               = 0x00000002
	LOCALE_SLIST                                                                   = 0x0000000c
	LOCALE_SLOCALIZEDCOUNTRYNAME                                                   = 0x00000006
	LOCALE_SLOCALIZEDDISPLAYNAME                                                   = 0x00000002
	LOCALE_SLONGDATE                                                               = 0x00000020
	LOCALE_SMONDECIMALSEP                                                          = 0x00000016
	LOCALE_SMONGROUPING                                                            = 0x00000018
	LOCALE_SMONTHNAME1                                                             = 0x00000038
	LOCALE_SMONTHNAME10                                                            = 0x00000041
	LOCALE_SMONTHNAME11                                                            = 0x00000042
	LOCALE_SMONTHNAME12                                                            = 0x00000043
	LOCALE_SMONTHNAME13                                                            = 0x0000100e
	LOCALE_SMONTHNAME2                                                             = 0x00000039
	LOCALE_SMONTHNAME3                                                             = 0x0000003a
	LOCALE_SMONTHNAME4                                                             = 0x0000003b
	LOCALE_SMONTHNAME5                                                             = 0x0000003c
	LOCALE_SMONTHNAME6                                                             = 0x0000003d
	LOCALE_SMONTHNAME7                                                             = 0x0000003e
	LOCALE_SMONTHNAME8                                                             = 0x0000003f
	LOCALE_SMONTHNAME9                                                             = 0x00000040
	LOCALE_SMONTHOUSANDSEP                                                         = 0x00000017
	LOCALE_SNATIVECOUNTRYNAME                                                      = 0x00000008
	LOCALE_SNATIVECTRYNAME                                                         = 0x00000008
	LOCALE_SNATIVECURRNAME                                                         = 0x00001008
	LOCALE_SNATIVEDIGITS                                                           = 0x00000013
	LOCALE_SNATIVELANGNAME                                                         = 0x00000004
	LOCALE_SNATIVELANGUAGENAME                                                     = 0x00000004
	LOCALE_SNEGATIVESIGN                                                           = 0x00000051
	LOCALE_SPOSITIVESIGN                                                           = 0x00000050
	LOCALE_SSHORTDATE                                                              = 0x0000001f
	LOCALE_SSORTNAME                                                               = 0x00001013
	LOCALE_STHOUSAND                                                               = 0x0000000f
	LOCALE_STIME                                                                   = 0x0000001e
	LOCALE_STIMEFORMAT                                                             = 0x00001003
	LOCALE_SYEARMONTH                                                              = 0x00001006
	LOCALE_USE_CP_ACP                                                              = 0x40000000
	LOCKFILE_EXCLUSIVE_LOCK                                                        = 0x2
	LOCKFILE_FAIL_IMMEDIATELY                                                      = 0x1
	LOGON32_LOGON_BATCH                                                            = 4
	LOGON32_LOGON_INTERACTIVE                                                      = 2
	LOGON32_LOGON_NETWORK                                                          = 3
	LOGON32_LOGON_NETWORK_CLEARTEXT                                                = 8
	LOGON32_LOGON_NEW_CREDENTIALS                                                  = 9
	LOGON32_LOGON_SERVICE                                                          = 5
	LOGON32_LOGON_UNLOCK                                                           = 7
	LOGON32_PROVIDER_DEFAULT                                                       = 0
	LOGON32_PROVIDER_WINNT35                                                       = 1
	LOGON32_PROVIDER_WINNT40                                                       = 2
	LOGON32_PROVIDER_WINNT50                                                       = 3
	LOGON_NETCREDENTIALS_ONLY                                                      = 0x00000002
	LOGON_WITH_PROFILE                                                             = 0x00000001
	LOGON_ZERO_PASSWORD_BUFFER                                                     = 0x80000000
	LOGPIXELSX                                                                     = 88
	LOGPIXELSY                                                                     = 90
	LOW_SURROGATE_END                                                              = 0xdfff
	LOW_SURROGATE_START                                                            = 0xdc00
	LPD_DOUBLEBUFFER                                                               = 0x00000001
	LPD_SHARE_ACCUM                                                                = 0x00000100
	LPD_SHARE_DEPTH                                                                = 0x00000040
	LPD_SHARE_STENCIL                                                              = 0x00000080
	LPD_STEREO                                                                     = 0x00000002
	LPD_SUPPORT_GDI                                                                = 0x00000010
	LPD_SUPPORT_OPENGL                                                             = 0x00000020
	LPD_SWAP_COPY                                                                  = 0x00000400
	LPD_SWAP_EXCHANGE                                                              = 0x00000200
	LPD_TRANSPARENT                                                                = 0x00001000
	LPD_TYPE_COLORINDEX                                                            = 1
	LPD_TYPE_RGBA                                                                  = 0
	LPTR                                                                           = 64
	LPTx                                                                           = 0x80
	LR_COLOR                                                                       = 0x0002
	LR_COPYDELETEORG                                                               = 0x0008
	LR_COPYFROMRESOURCE                                                            = 0x4000
	LR_COPYRETURNORG                                                               = 0x0004
	LR_CREATEDIBSECTION                                                            = 0x2000
	LR_DEFAULTCOLOR                                                                = 0x0000
	LR_DEFAULTSIZE                                                                 = 0x0040
	LR_LOADFROMFILE                                                                = 0x0010
	LR_LOADMAP3DCOLORS                                                             = 0x1000
	LR_LOADTRANSPARENT                                                             = 0x0020
	LR_MONOCHROME                                                                  = 0x0001
	LR_SHARED                                                                      = 0x8000
	LR_VGACOLOR                                                                    = 0x0080
	LSFW_LOCK                                                                      = 1
	LSFW_UNLOCK                                                                    = 2
	LTGRAY_BRUSH                                                                   = 1
	LTM1                                                                           = 0
	LTM2                                                                           = 0
	LTM3                                                                           = 0
	LTM_ALL                                                                        = 0
	LTM_LAST                                                                       = 0
	LTP_PC_SMT                                                                     = 0x1
	LUA_TOKEN                                                                      = 0x4
	LUP_ADDRCONFIG                                                                 = 0x100000
	LUP_API_ANSI                                                                   = 0x01000000
	LUP_CONTAINERS                                                                 = 0x0002
	LUP_DEEP                                                                       = 0x0001
	LUP_DISABLE_IDN_ENCODING                                                       = 0x00800000
	LUP_DNS_ONLY                                                                   = 0x20000
	LUP_DUAL_ADDR                                                                  = 0x200000
	LUP_FILESERVER                                                                 = 0x400000
	LUP_FLUSHCACHE                                                                 = 0x1000
	LUP_FLUSHPREVIOUS                                                              = 0x2000
	LUP_NEAREST                                                                    = 0x0008
	LUP_NOCONTAINERS                                                               = 0x0004
	LUP_NON_AUTHORITATIVE                                                          = 0x4000
	LUP_RESOLUTION_HANDLE                                                          = 0x80000000
	LUP_RES_RESERVICE                                                              = 0x8000
	LUP_RES_SERVICE                                                                = 0x8000
	LUP_RETURN_ADDR                                                                = 0x0100
	LUP_RETURN_ALIASES                                                             = 0x0400
	LUP_RETURN_ALL                                                                 = 0x0FF0
	LUP_RETURN_BLOB                                                                = 0x0200
	LUP_RETURN_COMMENT                                                             = 0x0080
	LUP_RETURN_NAME                                                                = 0x0010
	LUP_RETURN_PREFERRED_NAMES                                                     = 0x10000
	LUP_RETURN_QUERY_STRING                                                        = 0x0800
	LUP_RETURN_TYPE                                                                = 0x0020
	LUP_RETURN_VERSION                                                             = 0x0040
	LUP_SECURE                                                                     = 0x8000
	LWA_ALPHA                                                                      = 0x00000002
	LWA_COLORKEY                                                                   = 0x00000001
	MAC_CHARSET                                                                    = 77
	MAPVK_VK_TO_CHAR                                                               = 2
	MAPVK_VK_TO_VSC                                                                = 0
	MAPVK_VSC_TO_VK                                                                = 1
	MAPVK_VSC_TO_VK_EX                                                             = 3
	MAP_COMPOSITE                                                                  = 0x00000040
	MAP_EXPAND_LIGATURES                                                           = 0x00002000
	MAP_FOLDCZONE                                                                  = 0x00000010
	MAP_FOLDDIGITS                                                                 = 0x00000080
	MAP_PRECOMPOSED                                                                = 0x00000020
	MARKPARITY                                                                     = 3
	MARSHAL_E_FIRST                                                                = 2147746080
	MARSHAL_E_LAST                                                                 = 2147746095
	MARSHAL_S_FIRST                                                                = 262432
	MARSHAL_S_LAST                                                                 = 262447
	MAXBYTE                                                                        = 0xff
	MAXCHAR                                                                        = 0x7f
	MAXDWORD                                                                       = 0xffffffff
	MAXGETHOSTSTRUCT                                                               = 1024
	MAXIMUM_ALLOWED                                                                = 33554432
	MAXIMUM_PROCESSORS                                                             = 64
	MAXIMUM_PROC_PER_GROUP                                                         = 64
	MAXIMUM_REPARSE_DATA_BUFFER_SIZE                                               = 16384
	MAXIMUM_SUSPEND_COUNT                                                          = 127
	MAXIMUM_WAIT_OBJECTS                                                           = 64
	MAXIMUM_XSTATE_FEATURES                                                        = 64
	MAXINTATOM                                                                     = 0xc000
	MAXLOGICALLOGNAMESIZE                                                          = 256
	MAXLONG                                                                        = 0x7fffffff
	MAXLONGLONG                                                                    = 9223372036854775807
	MAXPATH                                                                        = 260
	MAXPATHLEN                                                                     = 260
	MAXSHORT                                                                       = 0x7fff
	MAXSTRETCHBLTMODE                                                              = 4
	MAXWORD                                                                        = 0xffff
	MAX_ACL_REVISION                                                               = 4
	MAX_COMPUTERNAME_LENGTH                                                        = 15
	MAX_DEFAULTCHAR                                                                = 2
	MAX_HW_COUNTERS                                                                = 16
	MAX_LEADBYTES                                                                  = 12
	MAX_NESTING_DEPTH                                                              = 1000
	MAX_NUM_REASONS                                                                = 256
	MAX_PATH                                                                       = 260
	MAX_PROFILE_LEN                                                                = 80
	MAX_PROTOCOL_CHAIN                                                             = 7
	MAX_REASON_BUGID_LEN                                                           = 32
	MAX_REASON_COMMENT_LEN                                                         = 512
	MAX_REASON_DESC_LEN                                                            = 256
	MAX_REASON_NAME_LEN                                                            = 64
	MAX_RESOURCEMANAGER_DESCRIPTION_LENGTH                                         = 64
	MAX_SHUTDOWN_TIMEOUT                                                           = 315360000
	MAX_STR_BLOCKREASON                                                            = 256
	MAX_SUPPORTED_OS_NUM                                                           = 4
	MAX_TRANSACTION_DESCRIPTION_LENGTH                                             = 64
	MA_ACTIVATE                                                                    = 1
	MA_ACTIVATEANDEAT                                                              = 2
	MA_NOACTIVATE                                                                  = 3
	MA_NOACTIVATEANDEAT                                                            = 4
	MB_ABORTRETRYIGNORE                                                            = 2
	MB_APPLMODAL                                                                   = 0
	MB_CANCELTRYCONTINUE                                                           = 6
	MB_COMPOSITE                                                                   = 0x00000002
	MB_DEFAULT_DESKTOP_ONLY                                                        = 131072
	MB_DEFBUTTON1                                                                  = 0
	MB_DEFBUTTON2                                                                  = 256
	MB_DEFBUTTON3                                                                  = 512
	MB_DEFBUTTON4                                                                  = 768
	MB_DEFMASK                                                                     = 3840
	MB_ERR_INVALID_CHARS                                                           = 0x00000008
	MB_HELP                                                                        = 16384
	MB_ICONASTERISK                                                                = 64
	MB_ICONERROR                                                                   = 16
	MB_ICONEXCLAMATION                                                             = 48
	MB_ICONHAND                                                                    = 16
	MB_ICONINFORMATION                                                             = 64
	MB_ICONMASK                                                                    = 240
	MB_ICONQUESTION                                                                = 32
	MB_ICONSTOP                                                                    = 16
	MB_ICONWARNING                                                                 = 48
	MB_MISCMASK                                                                    = 49152
	MB_MODEMASK                                                                    = 12288
	MB_NOFOCUS                                                                     = 32768
	MB_OK                                                                          = 0
	MB_OKCANCEL                                                                    = 1
	MB_PRECOMPOSED                                                                 = 0x00000001
	MB_RETRYCANCEL                                                                 = 5
	MB_RIGHT                                                                       = 524288
	MB_RTLREADING                                                                  = 1048576
	MB_SERVICE_NOTIFICATION                                                        = 2097152
	MB_SERVICE_NOTIFICATION_NT3X                                                   = 262144
	MB_SETFOREGROUND                                                               = 65536
	MB_SYSTEMMODAL                                                                 = 4096
	MB_TASKMODAL                                                                   = 8192
	MB_TOPMOST                                                                     = 262144
	MB_TYPEMASK                                                                    = 15
	MB_USEGLYPHCHARS                                                               = 0x00000004
	MB_USERICON                                                                    = 128
	MB_YESNO                                                                       = 4
	MB_YESNOCANCEL                                                                 = 3
	MCW_PC                                                                         = 196608
	MDIS_ALLCHILDSTYLES                                                            = 0x0001
	MDITILE_HORIZONTAL                                                             = 0x0001
	MDITILE_SKIPDISABLED                                                           = 0x0002
	MDITILE_VERTICAL                                                               = 0x0000
	MDITILE_ZORDER                                                                 = 0x0004
	MDMSPKRFLAG_CALLSETUP                                                          = 0x00000008
	MDMSPKRFLAG_DIAL                                                               = 0x00000002
	MDMSPKRFLAG_OFF                                                                = 0x00000001
	MDMSPKRFLAG_ON                                                                 = 0x00000004
	MDMSPKR_CALLSETUP                                                              = 0x00000003
	MDMSPKR_DIAL                                                                   = 0x00000001
	MDMSPKR_OFF                                                                    = 0x00000000
	MDMSPKR_ON                                                                     = 0x00000002
	MDMVOLFLAG_HIGH                                                                = 0x00000004
	MDMVOLFLAG_LOW                                                                 = 0x00000001
	MDMVOLFLAG_MEDIUM                                                              = 0x00000002
	MDMVOL_HIGH                                                                    = 0x00000002
	MDMVOL_LOW                                                                     = 0x00000000
	MDMVOL_MEDIUM                                                                  = 0x00000001
	MDM_ANALOG_RLP_OFF                                                             = 0x1
	MDM_ANALOG_RLP_ON                                                              = 0x0
	MDM_ANALOG_V34                                                                 = 0x2
	MDM_AUTO_ML_2                                                                  = 0x2
	MDM_AUTO_ML_DEFAULT                                                            = 0x0
	MDM_AUTO_ML_NONE                                                               = 0x1
	MDM_AUTO_SPEED_DEFAULT                                                         = 0x0
	MDM_BEARERMODE_ANALOG                                                          = 0x0
	MDM_BEARERMODE_GSM                                                             = 0x2
	MDM_BEARERMODE_ISDN                                                            = 0x1
	MDM_BLIND_DIAL                                                                 = 0x00000200
	MDM_CCITT_OVERRIDE                                                             = 0x00000040
	MDM_CELLULAR                                                                   = 0x00000008
	MDM_COMPRESSION                                                                = 0x00000001
	MDM_DIAGNOSTICS                                                                = 0x00000800
	MDM_ERROR_CONTROL                                                              = 0x00000002
	MDM_FLOWCONTROL_HARD                                                           = 0x00000010
	MDM_FLOWCONTROL_SOFT                                                           = 0x00000020
	MDM_FORCED_EC                                                                  = 0x00000004
	MDM_HDLCPPP_AUTH_CHAP                                                          = 0x3
	MDM_HDLCPPP_AUTH_DEFAULT                                                       = 0x0
	MDM_HDLCPPP_AUTH_MSCHAP                                                        = 0x4
	MDM_HDLCPPP_AUTH_NONE                                                          = 0x1
	MDM_HDLCPPP_AUTH_PAP                                                           = 0x2
	MDM_HDLCPPP_ML_2                                                               = 0x2
	MDM_HDLCPPP_ML_DEFAULT                                                         = 0x0
	MDM_HDLCPPP_ML_NONE                                                            = 0x1
	MDM_HDLCPPP_SPEED_56K                                                          = 0x2
	MDM_HDLCPPP_SPEED_64K                                                          = 0x1
	MDM_HDLCPPP_SPEED_DEFAULT                                                      = 0x0
	MDM_MASK_AUTO_ML                                                               = 192
	MDM_MASK_AUTO_SPEED                                                            = 0x7
	MDM_MASK_BEARERMODE                                                            = 0x0000f000
	MDM_MASK_EXTENDEDINFO                                                          = 268431360
	MDM_MASK_HDLCPPP_AUTH                                                          = 56
	MDM_MASK_HDLCPPP_ML                                                            = 192
	MDM_MASK_HDLCPPP_SPEED                                                         = 0x7
	MDM_MASK_PROTOCOLDATA                                                          = 0x0ff00000
	MDM_MASK_PROTOCOLID                                                            = 0x000f0000
	MDM_MASK_PROTOCOLINFO                                                          = 268369920
	MDM_MASK_V110_SPEED                                                            = 0xf
	MDM_MASK_V120_ML                                                               = 192
	MDM_MASK_V120_SPEED                                                            = 0x7
	MDM_MASK_X75_DATA                                                              = 0x7
	MDM_PIAFS_INCOMING                                                             = 0
	MDM_PIAFS_OUTGOING                                                             = 1
	MDM_PROTOCOLID_ANALOG                                                          = 0x7
	MDM_PROTOCOLID_AUTO                                                            = 0x6
	MDM_PROTOCOLID_DEFAULT                                                         = 0x0
	MDM_PROTOCOLID_GPRS                                                            = 0x8
	MDM_PROTOCOLID_HDLCPPP                                                         = 0x1
	MDM_PROTOCOLID_PIAFS                                                           = 0x9
	MDM_PROTOCOLID_V110                                                            = 0x4
	MDM_PROTOCOLID_V120                                                            = 0x5
	MDM_PROTOCOLID_V128                                                            = 0x2
	MDM_PROTOCOLID_X75                                                             = 0x3
	MDM_PROTOCOL_ANALOG_NRLP                                                       = 1507328
	MDM_PROTOCOL_ANALOG_RLP                                                        = 458752
	MDM_PROTOCOL_ANALOG_V34                                                        = 2555904
	MDM_PROTOCOL_AUTO_1CH                                                          = 67502080
	MDM_PROTOCOL_AUTO_2CH                                                          = 134610944
	MDM_PROTOCOL_GPRS                                                              = 524288
	MDM_PROTOCOL_HDLCPPP_112K                                                      = 136380416
	MDM_PROTOCOL_HDLCPPP_112K_CHAP                                                 = 161546240
	MDM_PROTOCOL_HDLCPPP_112K_MSCHAP                                               = 169934848
	MDM_PROTOCOL_HDLCPPP_112K_PAP                                                  = 153157632
	MDM_PROTOCOL_HDLCPPP_128K                                                      = 135331840
	MDM_PROTOCOL_HDLCPPP_128K_CHAP                                                 = 160497664
	MDM_PROTOCOL_HDLCPPP_128K_MSCHAP                                               = 168886272
	MDM_PROTOCOL_HDLCPPP_128K_PAP                                                  = 152109056
	MDM_PROTOCOL_HDLCPPP_56K                                                       = 2162688
	MDM_PROTOCOL_HDLCPPP_64K                                                       = 1114112
	MDM_PROTOCOL_PIAFS_INCOMING                                                    = 589824
	MDM_PROTOCOL_PIAFS_OUTGOING                                                    = 1638400
	MDM_PROTOCOL_V110_12DOT0K                                                      = 5505024
	MDM_PROTOCOL_V110_14DOT4K                                                      = 6553600
	MDM_PROTOCOL_V110_19DOT2K                                                      = 7602176
	MDM_PROTOCOL_V110_1DOT2K                                                       = 1310720
	MDM_PROTOCOL_V110_28DOT8K                                                      = 8650752
	MDM_PROTOCOL_V110_2DOT4K                                                       = 2359296
	MDM_PROTOCOL_V110_38DOT4K                                                      = 9699328
	MDM_PROTOCOL_V110_4DOT8K                                                       = 3407872
	MDM_PROTOCOL_V110_57DOT6K                                                      = 10747904
	MDM_PROTOCOL_V110_9DOT6K                                                       = 4456448
	MDM_PROTOCOL_V120_112K                                                         = 136642560
	MDM_PROTOCOL_V120_128K                                                         = 135593984
	MDM_PROTOCOL_V120_56K                                                          = 69533696
	MDM_PROTOCOL_V120_64K                                                          = 68485120
	MDM_PROTOCOL_X75_128K                                                          = 2293760
	MDM_PROTOCOL_X75_64K                                                           = 1245184
	MDM_PROTOCOL_X75_BTX                                                           = 4390912
	MDM_PROTOCOL_X75_T_70                                                          = 3342336
	MDM_SHIFT_AUTO_ML                                                              = 0x6
	MDM_SHIFT_AUTO_SPEED                                                           = 0x0
	MDM_SHIFT_BEARERMODE                                                           = 12
	MDM_SHIFT_EXTENDEDINFO                                                         = 12
	MDM_SHIFT_HDLCPPP_AUTH                                                         = 0x3
	MDM_SHIFT_HDLCPPP_ML                                                           = 0x6
	MDM_SHIFT_HDLCPPP_SPEED                                                        = 0x0
	MDM_SHIFT_PROTOCOLDATA                                                         = 20
	MDM_SHIFT_PROTOCOLID                                                           = 16
	MDM_SHIFT_PROTOCOLINFO                                                         = 16
	MDM_SHIFT_V110_SPEED                                                           = 0x0
	MDM_SHIFT_V120_ML                                                              = 0x6
	MDM_SHIFT_V120_SPEED                                                           = 0x0
	MDM_SHIFT_X75_DATA                                                             = 0x0
	MDM_SPEED_ADJUST                                                               = 0x00000080
	MDM_TONE_DIAL                                                                  = 0x00000100
	MDM_V110_SPEED_12DOT0K                                                         = 0x5
	MDM_V110_SPEED_14DOT4K                                                         = 0x6
	MDM_V110_SPEED_19DOT2K                                                         = 0x7
	MDM_V110_SPEED_1DOT2K                                                          = 0x1
	MDM_V110_SPEED_28DOT8K                                                         = 0x8
	MDM_V110_SPEED_2DOT4K                                                          = 0x2
	MDM_V110_SPEED_38DOT4K                                                         = 0x9
	MDM_V110_SPEED_4DOT8K                                                          = 0x3
	MDM_V110_SPEED_57DOT6K                                                         = 0xA
	MDM_V110_SPEED_9DOT6K                                                          = 0x4
	MDM_V110_SPEED_DEFAULT                                                         = 0x0
	MDM_V120_ML_2                                                                  = 0x2
	MDM_V120_ML_DEFAULT                                                            = 0x0
	MDM_V120_ML_NONE                                                               = 0x1
	MDM_V120_SPEED_56K                                                             = 0x2
	MDM_V120_SPEED_64K                                                             = 0x1
	MDM_V120_SPEED_DEFAULT                                                         = 0x0
	MDM_V23_OVERRIDE                                                               = 0x00000400
	MDM_X75_DATA_128K                                                              = 0x2
	MDM_X75_DATA_64K                                                               = 0x1
	MDM_X75_DATA_BTX                                                               = 0x4
	MDM_X75_DATA_DEFAULT                                                           = 0x0
	MDM_X75_DATA_T_70                                                              = 0x3
	MEMORY_ALLOCATION_ALIGNMENT                                                    = 16
	MEMORY_PRIORITY_BELOW_NORMAL                                                   = 4
	MEMORY_PRIORITY_LOW                                                            = 2
	MEMORY_PRIORITY_MEDIUM                                                         = 3
	MEMORY_PRIORITY_NORMAL                                                         = 5
	MEMORY_PRIORITY_VERY_LOW                                                       = 1
	MEM_4MB_PAGES                                                                  = 0x80000000
	MEM_64K_PAGES                                                                  = 541065216
	MEM_COMMIT                                                                     = 0x1000
	MEM_DECOMMIT                                                                   = 0x4000
	MEM_DIFFERENT_IMAGE_BASE_OK                                                    = 0x800000
	MEM_EXTENDED_PARAMETER_GRAPHICS                                                = 0x01
	MEM_EXTENDED_PARAMETER_NONPAGED                                                = 0x02
	MEM_EXTENDED_PARAMETER_NONPAGED_HUGE                                           = 0x10
	MEM_EXTENDED_PARAMETER_NONPAGED_LARGE                                          = 0x08
	MEM_EXTENDED_PARAMETER_TYPE_BITS                                               = 8
	MEM_EXTENDED_PARAMETER_ZERO_PAGES_OPTIONAL                                     = 0x04
	MEM_FREE                                                                       = 0x10000
	MEM_IMAGE                                                                      = 16777216
	MEM_LARGE_PAGES                                                                = 0x20000000
	MEM_MAPPED                                                                     = 0x40000
	MEM_PHYSICAL                                                                   = 0x400000
	MEM_PRIVATE                                                                    = 0x20000
	MEM_RELEASE                                                                    = 0x8000
	MEM_RESERVE                                                                    = 0x2000
	MEM_RESET                                                                      = 0x80000
	MEM_RESET_UNDO                                                                 = 0x1000000
	MEM_ROTATE                                                                     = 0x800000
	MEM_TOP_DOWN                                                                   = 0x100000
	MEM_UNMAP_WITH_TRANSIENT_BOOST                                                 = 0x01
	MEM_WRITE_WATCH                                                                = 0x200000
	MENU_EVENT                                                                     = 0x8
	MESSAGE_RESOURCE_UNICODE                                                       = 0x0001
	METAFILE_DRIVER                                                                = 2049
	META_ANIMATEPALETTE                                                            = 0x0436
	META_ARC                                                                       = 0x0817
	META_BITBLT                                                                    = 0x0922
	META_CHORD                                                                     = 0x0830
	META_CREATEBRUSHINDIRECT                                                       = 0x02FC
	META_CREATEFONTINDIRECT                                                        = 0x02FB
	META_CREATEPALETTE                                                             = 0x00f7
	META_CREATEPATTERNBRUSH                                                        = 0x01F9
	META_CREATEPENINDIRECT                                                         = 0x02FA
	META_CREATEREGION                                                              = 0x06FF
	META_DELETEOBJECT                                                              = 0x01f0
	META_DIBBITBLT                                                                 = 0x0940
	META_DIBCREATEPATTERNBRUSH                                                     = 0x0142
	META_DIBSTRETCHBLT                                                             = 0x0b41
	META_ELLIPSE                                                                   = 0x0418
	META_ESCAPE                                                                    = 0x0626
	META_EXCLUDECLIPRECT                                                           = 0x0415
	META_EXTFLOODFILL                                                              = 0x0548
	META_EXTTEXTOUT                                                                = 0x0a32
	META_FILLREGION                                                                = 0x0228
	META_FLOODFILL                                                                 = 0x0419
	META_FRAMEREGION                                                               = 0x0429
	META_INTERSECTCLIPRECT                                                         = 0x0416
	META_INVERTREGION                                                              = 0x012A
	META_LINETO                                                                    = 0x0213
	META_MOVETO                                                                    = 0x0214
	META_OFFSETCLIPRGN                                                             = 0x0220
	META_OFFSETVIEWPORTORG                                                         = 0x0211
	META_OFFSETWINDOWORG                                                           = 0x020F
	META_PAINTREGION                                                               = 0x012B
	META_PATBLT                                                                    = 0x061D
	META_PIE                                                                       = 0x081A
	META_POLYGON                                                                   = 0x0324
	META_POLYLINE                                                                  = 0x0325
	META_POLYPOLYGON                                                               = 0x0538
	META_REALIZEPALETTE                                                            = 0x0035
	META_RECTANGLE                                                                 = 0x041B
	META_RESIZEPALETTE                                                             = 0x0139
	META_RESTOREDC                                                                 = 0x0127
	META_ROUNDRECT                                                                 = 0x061C
	META_SAVEDC                                                                    = 0x001E
	META_SCALEVIEWPORTEXT                                                          = 0x0412
	META_SCALEWINDOWEXT                                                            = 0x0410
	META_SELECTCLIPREGION                                                          = 0x012C
	META_SELECTOBJECT                                                              = 0x012D
	META_SELECTPALETTE                                                             = 0x0234
	META_SETBKCOLOR                                                                = 0x0201
	META_SETBKMODE                                                                 = 0x0102
	META_SETDIBTODEV                                                               = 0x0d33
	META_SETLAYOUT                                                                 = 0x0149
	META_SETMAPMODE                                                                = 0x0103
	META_SETMAPPERFLAGS                                                            = 0x0231
	META_SETPALENTRIES                                                             = 0x0037
	META_SETPIXEL                                                                  = 0x041F
	META_SETPOLYFILLMODE                                                           = 0x0106
	META_SETRELABS                                                                 = 0x0105
	META_SETROP2                                                                   = 0x0104
	META_SETSTRETCHBLTMODE                                                         = 0x0107
	META_SETTEXTALIGN                                                              = 0x012E
	META_SETTEXTCHAREXTRA                                                          = 0x0108
	META_SETTEXTCOLOR                                                              = 0x0209
	META_SETTEXTJUSTIFICATION                                                      = 0x020A
	META_SETVIEWPORTEXT                                                            = 0x020E
	META_SETVIEWPORTORG                                                            = 0x020D
	META_SETWINDOWEXT                                                              = 0x020C
	META_SETWINDOWORG                                                              = 0x020B
	META_STRETCHBLT                                                                = 0x0B23
	META_STRETCHDIB                                                                = 0x0f43
	META_TEXTOUT                                                                   = 0x0521
	METRICS_USEDEFAULT                                                             = -1
	MFCOMMENT                                                                      = 15
	MFS_CHECKED                                                                    = 8
	MFS_DEFAULT                                                                    = 4096
	MFS_DISABLED                                                                   = 3
	MFS_ENABLED                                                                    = 0
	MFS_GRAYED                                                                     = 3
	MFS_HILITE                                                                     = 128
	MFS_UNCHECKED                                                                  = 0
	MFS_UNHILITE                                                                   = 0
	MFT_BITMAP                                                                     = 4
	MFT_MENUBARBREAK                                                               = 32
	MFT_MENUBREAK                                                                  = 64
	MFT_OWNERDRAW                                                                  = 256
	MFT_RADIOCHECK                                                                 = 512
	MFT_RIGHTJUSTIFY                                                               = 16384
	MFT_RIGHTORDER                                                                 = 8192
	MFT_SEPARATOR                                                                  = 2048
	MFT_STRING                                                                     = 0
	MF_APPEND                                                                      = 256
	MF_BITMAP                                                                      = 4
	MF_BYCOMMAND                                                                   = 0
	MF_BYPOSITION                                                                  = 1024
	MF_CHANGE                                                                      = 128
	MF_CHECKED                                                                     = 8
	MF_DEFAULT                                                                     = 4096
	MF_DELETE                                                                      = 512
	MF_DISABLED                                                                    = 2
	MF_ENABLED                                                                     = 0
	MF_END                                                                         = 128
	MF_GRAYED                                                                      = 1
	MF_HELP                                                                        = 16384
	MF_HILITE                                                                      = 128
	MF_INSERT                                                                      = 0
	MF_MENUBARBREAK                                                                = 32
	MF_MENUBREAK                                                                   = 64
	MF_MOUSESELECT                                                                 = 32768
	MF_OWNERDRAW                                                                   = 256
	MF_POPUP                                                                       = 16
	MF_REMOVE                                                                      = 4096
	MF_RIGHTJUSTIFY                                                                = 16384
	MF_SEPARATOR                                                                   = 2048
	MF_STRING                                                                      = 0
	MF_SYSMENU                                                                     = 8192
	MF_UNCHECKED                                                                   = 0
	MF_UNHILITE                                                                    = 0
	MF_USECHECKBITMAPS                                                             = 512
	MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS                     = 0
	MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS             = 0
	MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED                     = 0
	MIIM_BITMAP                                                                    = 0x00000080
	MIIM_CHECKMARKS                                                                = 0x00000008
	MIIM_DATA                                                                      = 0x00000020
	MIIM_FTYPE                                                                     = 0x00000100
	MIIM_ID                                                                        = 0x00000002
	MIIM_STATE                                                                     = 0x00000001
	MIIM_STRING                                                                    = 0x00000040
	MIIM_SUBMENU                                                                   = 0x00000004
	MIIM_TYPE                                                                      = 0x00000010
	MIM_APPLYTOSUBMENUS                                                            = 0x80000000
	MIM_BACKGROUND                                                                 = 0x00000002
	MIM_HELPID                                                                     = 0x00000004
	MIM_MAXHEIGHT                                                                  = 0x00000001
	MIM_MENUDATA                                                                   = 0x00000008
	MIM_STYLE                                                                      = 0x00000010
	MINCHAR                                                                        = 0x80
	MINLONG                                                                        = 0x80000000
	MINSHORT                                                                       = 0x8000
	MIN_ACL_REVISION                                                               = 2
	MKF_AVAILABLE                                                                  = 0x00000002
	MKF_CONFIRMHOTKEY                                                              = 0x00000008
	MKF_HOTKEYACTIVE                                                               = 0x00000004
	MKF_HOTKEYSOUND                                                                = 0x00000010
	MKF_INDICATOR                                                                  = 0x00000020
	MKF_LEFTBUTTONDOWN                                                             = 0x01000000
	MKF_LEFTBUTTONSEL                                                              = 0x10000000
	MKF_MODIFIERS                                                                  = 0x00000040
	MKF_MOUSEKEYSON                                                                = 0x00000001
	MKF_MOUSEMODE                                                                  = 0x80000000
	MKF_REPLACENUMBERS                                                             = 0x00000080
	MKF_RIGHTBUTTONDOWN                                                            = 0x02000000
	MKF_RIGHTBUTTONSEL                                                             = 0x20000000
	MK_CONTROL                                                                     = 0x0008
	MK_E_FIRST                                                                     = 2147746272
	MK_E_LAST                                                                      = 2147746287
	MK_LBUTTON                                                                     = 0x0001
	MK_MBUTTON                                                                     = 0x0010
	MK_RBUTTON                                                                     = 0x0002
	MK_SHIFT                                                                       = 0x0004
	MK_S_FIRST                                                                     = 262624
	MK_S_LAST                                                                      = 262639
	MK_XBUTTON1                                                                    = 0x0020
	MK_XBUTTON2                                                                    = 0x0040
	MM_ANISOTROPIC                                                                 = 8
	MM_HIENGLISH                                                                   = 5
	MM_HIMETRIC                                                                    = 3
	MM_ISOTROPIC                                                                   = 7
	MM_LOENGLISH                                                                   = 4
	MM_LOMETRIC                                                                    = 2
	MM_MAX                                                                         = 8
	MM_MAX_AXES_NAMELEN                                                            = 16
	MM_MAX_FIXEDSCALE                                                              = 6
	MM_MAX_NUMAXES                                                                 = 16
	MM_MIN                                                                         = 1
	MM_TEXT                                                                        = 1
	MM_TWIPS                                                                       = 6
	MNC_CLOSE                                                                      = 1
	MNC_EXECUTE                                                                    = 2
	MNC_IGNORE                                                                     = 0
	MNC_SELECT                                                                     = 3
	MND_CONTINUE                                                                   = 0
	MND_ENDMENU                                                                    = 1
	MNGOF_BOTTOMGAP                                                                = 0x00000002
	MNGOF_TOPGAP                                                                   = 0x00000001
	MNGO_NOERROR                                                                   = 0x00000001
	MNGO_NOINTERFACE                                                               = 0x00000000
	MNS_AUTODISMISS                                                                = 0x10000000
	MNS_CHECKORBMP                                                                 = 0x04000000
	MNS_DRAGDROP                                                                   = 0x20000000
	MNS_MODELESS                                                                   = 0x40000000
	MNS_NOCHECK                                                                    = 0x80000000
	MNS_NOTIFYBYPOS                                                                = 0x08000000
	MN_GETHMENU                                                                    = 0x01E1
	MOD_ALT                                                                        = 0x0001
	MOD_CONTROL                                                                    = 0x0002
	MOD_IGNORE_ALL_MODIFIER                                                        = 0x0400
	MOD_LEFT                                                                       = 0x8000
	MOD_ON_KEYUP                                                                   = 0x0800
	MOD_RIGHT                                                                      = 0x4000
	MOD_SHIFT                                                                      = 0x0004
	MOD_WIN                                                                        = 0x0008
	MONITORINFOF_PRIMARY                                                           = 0x00000001
	MONITOR_DEFAULTTONEAREST                                                       = 0x00000002
	MONITOR_DEFAULTTONULL                                                          = 0x00000000
	MONITOR_DEFAULTTOPRIMARY                                                       = 0x00000001
	MONO_FONT                                                                      = 8
	MOUSEEVENTF_ABSOLUTE                                                           = 0x8000
	MOUSEEVENTF_LEFTDOWN                                                           = 0x0002
	MOUSEEVENTF_LEFTUP                                                             = 0x0004
	MOUSEEVENTF_MIDDLEDOWN                                                         = 0x0020
	MOUSEEVENTF_MIDDLEUP                                                           = 0x0040
	MOUSEEVENTF_MOVE                                                               = 0x0001
	MOUSEEVENTF_RIGHTDOWN                                                          = 0x0008
	MOUSEEVENTF_RIGHTUP                                                            = 0x0010
	MOUSEEVENTF_VIRTUALDESK                                                        = 0x4000
	MOUSEEVENTF_WHEEL                                                              = 0x0800
	MOUSEEVENTF_XDOWN                                                              = 0x0080
	MOUSEEVENTF_XUP                                                                = 0x0100
	MOUSETRAILS                                                                    = 39
	MOUSE_ATTRIBUTES_CHANGED                                                       = 0x04
	MOUSE_EVENT                                                                    = 0x2
	MOUSE_MOVED                                                                    = 0x1
	MOUSE_MOVE_ABSOLUTE                                                            = 1
	MOUSE_MOVE_RELATIVE                                                            = 0
	MOUSE_VIRTUAL_DESKTOP                                                          = 0x02
	MOUSE_WHEELED                                                                  = 0x4
	MOVEFILE_COPY_ALLOWED                                                          = 0x00000002
	MOVEFILE_CREATE_HARDLINK                                                       = 0x00000010
	MOVEFILE_DELAY_UNTIL_REBOOT                                                    = 0x00000004
	MOVEFILE_FAIL_IF_NOT_TRACKABLE                                                 = 0x00000020
	MOVEFILE_REPLACE_EXISTING                                                      = 0x00000001
	MOVEFILE_WRITE_THROUGH                                                         = 0x00000008
	MP_28BIT                                                                       = 0
	MP_32BIT                                                                       = 0
	MP_BIG_ENDIAN                                                                  = 1
	MP_BUF                                                                         = -5
	MP_DEFAULT_KARATSUBA_MUL_CUTOFF                                                = 80
	MP_DEFAULT_KARATSUBA_SQR_CUTOFF                                                = 120
	MP_DEFAULT_TOOM_MUL_CUTOFF                                                     = 350
	MP_DEFAULT_TOOM_SQR_CUTOFF                                                     = 400
	MP_DIGIT_BIT                                                                   = 28
	MP_DIGIT_DECLARED                                                              = 0
	MP_EQ                                                                          = 0
	MP_ERR                                                                         = -1
	MP_GT                                                                          = 1
	MP_INT_DECLARED                                                                = 0
	MP_ITER                                                                        = -4
	MP_KARATSUBA_MUL_CUTOFF                                                        = 80
	MP_KARATSUBA_SQR_CUTOFF                                                        = 120
	MP_LITTLE_ENDIAN                                                               = -1
	MP_LSB_FIRST                                                                   = -1
	MP_LT                                                                          = -1
	MP_MEM                                                                         = -2
	MP_MSB_FIRST                                                                   = 1
	MP_NATIVE_ENDIAN                                                               = 0
	MP_NEG                                                                         = 1
	MP_NO                                                                          = 0
	MP_OKAY                                                                        = 0
	MP_PRIME_2MSB_ON                                                               = 0x0008
	MP_PRIME_BBS                                                                   = 0x0001
	MP_PRIME_SAFE                                                                  = 0x0002
	MP_PRIVATE                                                                     = 0
	MP_TOOM_MUL_CUTOFF                                                             = 350
	MP_TOOM_SQR_CUTOFF                                                             = 400
	MP_VAL                                                                         = -3
	MP_WORD_DECLARED                                                               = 0
	MP_YES                                                                         = 1
	MP_ZPOS                                                                        = 0
	MSGF_DIALOGBOX                                                                 = 0
	MSGF_MAX                                                                       = 8
	MSGF_MENU                                                                      = 2
	MSGF_MESSAGEBOX                                                                = 1
	MSGF_NEXTWINDOW                                                                = 6
	MSGF_SCROLLBAR                                                                 = 5
	MSGF_USER                                                                      = 4096
	MSG_DONTROUTE                                                                  = 0x4
	MSG_INTERRUPT                                                                  = 0x10
	MSG_MAXIOVLEN                                                                  = 16
	MSG_OOB                                                                        = 0x1
	MSG_PARTIAL                                                                    = 0x8000
	MSG_PEEK                                                                       = 0x2
	MS_PPM_SOFTWARE_ALL                                                            = 0x1
	MUTANT_ALL_ACCESS                                                              = 2031617
	MUTANT_QUERY_STATE                                                             = 0x0001
	MUTEX_ALL_ACCESS                                                               = 2031617
	MUTEX_MODIFY_STATE                                                             = 1
	MWMO_ALERTABLE                                                                 = 0x0002
	MWMO_INPUTAVAILABLE                                                            = 0x0004
	MWMO_WAITALL                                                                   = 0x0001
	MWT_IDENTITY                                                                   = 1
	MWT_LEFTMULTIPLY                                                               = 2
	MWT_MAX                                                                        = 3
	MWT_MIN                                                                        = 1
	MWT_RIGHTMULTIPLY                                                              = 3
	NEAR                                                                           = 0
	NETINFO_DISKRED                                                                = 0x00000004
	NETINFO_DLL16                                                                  = 0x00000001
	NETINFO_PRINTERRED                                                             = 0x00000008
	NETPROPERTY_PERSISTENT                                                         = 1
	NEWFRAME                                                                       = 1
	NEXTBAND                                                                       = 3
	NFR_ANSI                                                                       = 1
	NFR_UNICODE                                                                    = 2
	NF_QUERY                                                                       = 3
	NF_REQUERY                                                                     = 4
	NI_CHANGECANDIDATELIST                                                         = 0x0013
	NI_CLOSECANDIDATE                                                              = 0x0011
	NI_COMPOSITIONSTR                                                              = 0x0015
	NI_DGRAM                                                                       = 0x10
	NI_FINALIZECONVERSIONRESULT                                                    = 0x0014
	NI_IMEMENUSELECTED                                                             = 0x0018
	NI_MAXHOST                                                                     = 1025
	NI_MAXSERV                                                                     = 32
	NI_NAMEREQD                                                                    = 0x04
	NI_NOFQDN                                                                      = 0x01
	NI_NUMERICHOST                                                                 = 0x02
	NI_NUMERICSERV                                                                 = 0x08
	NI_OPENCANDIDATE                                                               = 0x0010
	NI_SELECTCANDIDATESTR                                                          = 0x0012
	NI_SETCANDIDATE_PAGESIZE                                                       = 0x0017
	NI_SETCANDIDATE_PAGESTART                                                      = 0x0016
	NLS_ALPHANUMERIC                                                               = 0x0
	NLS_DBCSCHAR                                                                   = 0x10000
	NLS_HIRAGANA                                                                   = 0x40000
	NLS_IME_CONVERSION                                                             = 0x800000
	NLS_IME_DISABLE                                                                = 0x20000000
	NLS_KATAKANA                                                                   = 0x20000
	NLS_ROMAN                                                                      = 0x400000
	NLS_VALID_LOCALE_MASK                                                          = 0x000fffff
	NMPWAIT_NOWAIT                                                                 = 0x1
	NMPWAIT_USE_DEFAULT_WAIT                                                       = 0x0
	NMPWAIT_WAIT_FOREVER                                                           = 0xffffffff
	NOERROR                                                                        = 0
	NONANTIALIASED_QUALITY                                                         = 3
	NONZEROLHND                                                                    = 2
	NONZEROLPTR                                                                    = 0
	NON_PAGED_DEBUG_SIGNATURE                                                      = 0x494E
	NOPARITY                                                                       = 0
	NORMAL_PRIORITY_CLASS                                                          = 0x20
	NORM_IGNORECASE                                                                = 0x00000001
	NORM_IGNOREKANATYPE                                                            = 0x00010000
	NORM_IGNORENONSPACE                                                            = 0x00000002
	NORM_IGNORESYMBOLS                                                             = 0x00000004
	NORM_IGNOREWIDTH                                                               = 0x00020000
	NORM_LINGUISTIC_CASING                                                         = 0x08000000
	NO_ADDRESS                                                                     = 11004
	NO_DATA                                                                        = 11004
	NO_ERROR                                                                       = 0
	NO_PROPAGATE_INHERIT_ACE                                                       = 4
	NO_RECOVERY                                                                    = 11003
	NRE_ENABLE_ASSERTS                                                             = 0
	NRE_USE_SMALL_ALLOC                                                            = 1
	NSIG                                                                           = 23
	NS_ALL                                                                         = 0
	NS_DEAD                                                                        = 0x02
	NS_DHCP                                                                        = 6
	NS_DNS                                                                         = 12
	NS_DYING                                                                       = 0x01
	NS_KILLED                                                                      = 0x04
	NS_MS                                                                          = 30
	NS_NBP                                                                         = 20
	NS_NDS                                                                         = 2
	NS_NETBT                                                                       = 13
	NS_NETDES                                                                      = 60
	NS_NIS                                                                         = 41
	NS_NISPLUS                                                                     = 42
	NS_NLA                                                                         = 15
	NS_NTDS                                                                        = 32
	NS_PEER_BROWSE                                                                 = 3
	NS_SAP                                                                         = 1
	NS_SLP                                                                         = 5
	NS_STDA                                                                        = 31
	NS_SUPPRESS_COMPILATION                                                        = 0x08
	NS_TCPIP_HOSTS                                                                 = 11
	NS_TCPIP_LOCAL                                                                 = 10
	NS_WINS                                                                        = 14
	NS_WRQ                                                                         = 50
	NS_X500                                                                        = 40
	NTAPI                                                                          = 0
	NTAPI_INLINE                                                                   = 0
	NTDDI_LONGHORN                                                                 = 100663296
	NTDDI_VERSION                                                                  = 83951616
	NTDDI_VISTA                                                                    = 100663296
	NTDDI_VISTASP1                                                                 = 100663552
	NTDDI_VISTASP2                                                                 = 100663808
	NTDDI_VISTASP3                                                                 = 100664064
	NTDDI_VISTASP4                                                                 = 100664320
	NTDDI_WIN10                                                                    = 0x0A000000
	NTDDI_WIN10_19H1                                                               = 0x0A000007
	NTDDI_WIN10_FE                                                                 = 0x0A00000A
	NTDDI_WIN10_MN                                                                 = 0x0A000009
	NTDDI_WIN10_RS1                                                                = 0x0A000002
	NTDDI_WIN10_RS2                                                                = 0x0A000003
	NTDDI_WIN10_RS3                                                                = 0x0A000004
	NTDDI_WIN10_RS4                                                                = 0x0A000005
	NTDDI_WIN10_RS5                                                                = 0x0A000006
	NTDDI_WIN10_TH2                                                                = 0x0A000001
	NTDDI_WIN10_VB                                                                 = 0x0A000008
	NTDDI_WIN2K                                                                    = 0x05000000
	NTDDI_WIN2KSP1                                                                 = 0x05000100
	NTDDI_WIN2KSP2                                                                 = 0x05000200
	NTDDI_WIN2KSP3                                                                 = 0x05000300
	NTDDI_WIN2KSP4                                                                 = 0x05000400
	NTDDI_WIN6                                                                     = 0x06000000
	NTDDI_WIN6SP1                                                                  = 0x06000100
	NTDDI_WIN6SP2                                                                  = 0x06000200
	NTDDI_WIN6SP3                                                                  = 0x06000300
	NTDDI_WIN6SP4                                                                  = 0x06000400
	NTDDI_WIN7                                                                     = 0x06010000
	NTDDI_WIN8                                                                     = 0x06020000
	NTDDI_WINBLUE                                                                  = 0x06030000
	NTDDI_WINTHRESHOLD                                                             = 0x0A000000
	NTDDI_WINXP                                                                    = 0x05010000
	NTDDI_WINXPSP1                                                                 = 0x05010100
	NTDDI_WINXPSP2                                                                 = 0x05010200
	NTDDI_WINXPSP3                                                                 = 0x05010300
	NTDDI_WINXPSP4                                                                 = 0x05010400
	NTDDI_WS03                                                                     = 0x05020000
	NTDDI_WS03SP1                                                                  = 0x05020100
	NTDDI_WS03SP2                                                                  = 0x05020200
	NTDDI_WS03SP3                                                                  = 0x05020300
	NTDDI_WS03SP4                                                                  = 0x05020400
	NTDDI_WS08                                                                     = 100663552
	NTDDI_WS08SP2                                                                  = 100663808
	NTDDI_WS08SP3                                                                  = 100664064
	NTDDI_WS08SP4                                                                  = 100664320
	NTE_OP_OK                                                                      = 0
	NTM_BOLD                                                                       = 32
	NTM_DSIG                                                                       = 0x00200000
	NTM_ITALIC                                                                     = 1
	NTM_MULTIPLEMASTER                                                             = 0x00080000
	NTM_NONNEGATIVE_AC                                                             = 0x00010000
	NTM_PS_OPENTYPE                                                                = 0x00020000
	NTM_REGULAR                                                                    = 64
	NTM_TT_OPENTYPE                                                                = 0x00040000
	NTM_TYPE1                                                                      = 0x00100000
	NULLREGION                                                                     = 1
	NULL_BRUSH                                                                     = 5
	NULL_PEN                                                                       = 8
	NUMBRUSHES                                                                     = 16
	NUMCOLORS                                                                      = 24
	NUMFONTS                                                                       = 22
	NUMLOCK_ON                                                                     = 0x20
	NUMMARKERS                                                                     = 20
	NUMPENS                                                                        = 18
	NUMRESERVED                                                                    = 106
	NUM_DISCHARGE_POLICIES                                                         = 4
	NUM_STATIC_TOKENS                                                              = 20
	N_BTMASK                                                                       = 0x000F
	N_BTSHFT                                                                       = 4
	N_TMASK                                                                        = 0x0030
	N_TMASK1                                                                       = 0x00C0
	N_TMASK2                                                                       = 0x00F0
	N_TSHIFT                                                                       = 2
	OBJECT_INHERIT_ACE                                                             = 1
	OBJ_BITMAP                                                                     = 7
	OBJ_BRUSH                                                                      = 2
	OBJ_COLORSPACE                                                                 = 14
	OBJ_DC                                                                         = 3
	OBJ_ENHMETADC                                                                  = 12
	OBJ_ENHMETAFILE                                                                = 13
	OBJ_EXTPEN                                                                     = 11
	OBJ_FONT                                                                       = 6
	OBJ_MEMDC                                                                      = 10
	OBJ_METADC                                                                     = 4
	OBJ_METAFILE                                                                   = 9
	OBJ_PAL                                                                        = 5
	OBJ_PEN                                                                        = 1
	OBJ_REGION                                                                     = 8
	ODA_DRAWENTIRE                                                                 = 0x0001
	ODA_FOCUS                                                                      = 0x0004
	ODA_SELECT                                                                     = 0x0002
	ODDPARITY                                                                      = 1
	ODS_CHECKED                                                                    = 0x0008
	ODS_COMBOBOXEDIT                                                               = 0x1000
	ODS_DEFAULT                                                                    = 0x0020
	ODS_DISABLED                                                                   = 0x0004
	ODS_FOCUS                                                                      = 0x0010
	ODS_GRAYED                                                                     = 0x0002
	ODS_HOTLIGHT                                                                   = 0x0040
	ODS_INACTIVE                                                                   = 0x0080
	ODS_NOACCEL                                                                    = 0x0100
	ODS_NOFOCUSRECT                                                                = 0x0200
	ODS_SELECTED                                                                   = 0x0001
	ODT_BUTTON                                                                     = 4
	ODT_COMBOBOX                                                                   = 3
	ODT_LISTBOX                                                                    = 2
	ODT_MENU                                                                       = 1
	ODT_STATIC                                                                     = 5
	OEM_CHARSET                                                                    = 255
	OEM_FIXED_FONT                                                                 = 10
	OFS_MAXPATHNAME                                                                = 128
	OF_CANCEL                                                                      = 0x800
	OF_CREATE                                                                      = 0x1000
	OF_DELETE                                                                      = 0x200
	OF_EXIST                                                                       = 0x4000
	OF_PARSE                                                                       = 0x100
	OF_PROMPT                                                                      = 0x2000
	OF_READ                                                                        = 0x0
	OF_READWRITE                                                                   = 0x2
	OF_REOPEN                                                                      = 0x8000
	OF_SHARE_COMPAT                                                                = 0x0
	OF_SHARE_DENY_NONE                                                             = 0x40
	OF_SHARE_DENY_READ                                                             = 0x30
	OF_SHARE_DENY_WRITE                                                            = 0x20
	OF_SHARE_EXCLUSIVE                                                             = 0x10
	OF_VERIFY                                                                      = 0x400
	OF_WRITE                                                                       = 0x1
	OLEOBJ_E_FIRST                                                                 = 2147746176
	OLEOBJ_E_LAST                                                                  = 2147746191
	OLEOBJ_S_FIRST                                                                 = 262528
	OLEOBJ_S_LAST                                                                  = 262543
	ONE5STOPBITS                                                                   = 1
	ONESTOPBIT                                                                     = 0
	OPAQUE                                                                         = 2
	OPENCHANNEL                                                                    = 4110
	OPEN_ALWAYS                                                                    = 4
	OPEN_EXISTING                                                                  = 3
	OPTIONAL                                                                       = 0
	ORD_LANGDRIVER                                                                 = 1
	OR_INVALID_OID                                                                 = 1911
	OR_INVALID_OXID                                                                = 1910
	OR_INVALID_SET                                                                 = 1912
	OSVERSION_MASK                                                                 = 0xFFFF0000
	OUT                                                                            = 0
	OUTPUT_DEBUG_STRING_EVENT                                                      = 8
	OUT_CHARACTER_PRECIS                                                           = 2
	OUT_DEFAULT_PRECIS                                                             = 0
	OUT_DEVICE_PRECIS                                                              = 5
	OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME                             = "OutOfProcessFunctionTableCallback"
	OUT_OUTLINE_PRECIS                                                             = 8
	OUT_PS_ONLY_PRECIS                                                             = 10
	OUT_RASTER_PRECIS                                                              = 6
	OUT_SCREEN_OUTLINE_PRECIS                                                      = 9
	OUT_STRING_PRECIS                                                              = 1
	OUT_STROKE_PRECIS                                                              = 3
	OUT_TT_ONLY_PRECIS                                                             = 7
	OUT_TT_PRECIS                                                                  = 4
	OVERWRITE_HIDDEN                                                               = 4
	OWNER_SECURITY_INFORMATION                                                     = 1
	O_ACCMODE                                                                      = 3
	O_APPEND                                                                       = 8
	O_BINARY                                                                       = 32768
	O_CREAT                                                                        = 256
	O_EXCL                                                                         = 1024
	O_NOINHERIT                                                                    = 128
	O_RANDOM                                                                       = 16
	O_RAW                                                                          = 32768
	O_RDONLY                                                                       = 0
	O_RDWR                                                                         = 2
	O_SEQUENTIAL                                                                   = 32
	O_TEMPORARY                                                                    = 64
	O_TEXT                                                                         = 16384
	O_TRUNC                                                                        = 512
	O_WRONLY                                                                       = 1
	PAGE_ENCLAVE_DECOMMIT                                                          = 0x10000000
	PAGE_ENCLAVE_THREAD_CONTROL                                                    = 0x80000000
	PAGE_ENCLAVE_UNVALIDATED                                                       = 0x20000000
	PAGE_EXECUTE                                                                   = 0x10
	PAGE_EXECUTE_READ                                                              = 0x20
	PAGE_EXECUTE_READWRITE                                                         = 0x40
	PAGE_EXECUTE_WRITECOPY                                                         = 0x80
	PAGE_GRAPHICS_COHERENT                                                         = 0x20000
	PAGE_GRAPHICS_EXECUTE                                                          = 0x4000
	PAGE_GRAPHICS_EXECUTE_READ                                                     = 0x8000
	PAGE_GRAPHICS_EXECUTE_READWRITE                                                = 0x10000
	PAGE_GRAPHICS_NOACCESS                                                         = 0x0800
	PAGE_GRAPHICS_READONLY                                                         = 0x1000
	PAGE_GRAPHICS_READWRITE                                                        = 0x2000
	PAGE_GUARD                                                                     = 0x100
	PAGE_NOACCESS                                                                  = 0x01
	PAGE_NOCACHE                                                                   = 0x200
	PAGE_READONLY                                                                  = 0x02
	PAGE_READWRITE                                                                 = 0x04
	PAGE_REVERT_TO_FILE_MAP                                                        = 0x80000000
	PAGE_TARGETS_INVALID                                                           = 0x40000000
	PAGE_TARGETS_NO_UPDATE                                                         = 0x40000000
	PAGE_WRITECOMBINE                                                              = 0x400
	PAGE_WRITECOPY                                                                 = 0x08
	PANOSE_COUNT                                                                   = 10
	PAN_ANY                                                                        = 0
	PAN_ARMSTYLE_INDEX                                                             = 6
	PAN_BENT_ARMS_DOUBLE_SERIF                                                     = 11
	PAN_BENT_ARMS_HORZ                                                             = 7
	PAN_BENT_ARMS_SINGLE_SERIF                                                     = 10
	PAN_BENT_ARMS_VERT                                                             = 9
	PAN_BENT_ARMS_WEDGE                                                            = 8
	PAN_CONTRAST_HIGH                                                              = 8
	PAN_CONTRAST_INDEX                                                             = 4
	PAN_CONTRAST_LOW                                                               = 4
	PAN_CONTRAST_MEDIUM                                                            = 6
	PAN_CONTRAST_MEDIUM_HIGH                                                       = 7
	PAN_CONTRAST_MEDIUM_LOW                                                        = 5
	PAN_CONTRAST_NONE                                                              = 2
	PAN_CONTRAST_VERY_HIGH                                                         = 9
	PAN_CONTRAST_VERY_LOW                                                          = 3
	PAN_CULTURE_LATIN                                                              = 0
	PAN_FAMILYTYPE_INDEX                                                           = 0
	PAN_FAMILY_DECORATIVE                                                          = 4
	PAN_FAMILY_PICTORIAL                                                           = 5
	PAN_FAMILY_SCRIPT                                                              = 3
	PAN_FAMILY_TEXT_DISPLAY                                                        = 2
	PAN_LETTERFORM_INDEX                                                           = 7
	PAN_LETT_NORMAL_BOXED                                                          = 4
	PAN_LETT_NORMAL_CONTACT                                                        = 2
	PAN_LETT_NORMAL_FLATTENED                                                      = 5
	PAN_LETT_NORMAL_OFF_CENTER                                                     = 7
	PAN_LETT_NORMAL_ROUNDED                                                        = 6
	PAN_LETT_NORMAL_SQUARE                                                         = 8
	PAN_LETT_NORMAL_WEIGHTED                                                       = 3
	PAN_LETT_OBLIQUE_BOXED                                                         = 11
	PAN_LETT_OBLIQUE_CONTACT                                                       = 9
	PAN_LETT_OBLIQUE_FLATTENED                                                     = 12
	PAN_LETT_OBLIQUE_OFF_CENTER                                                    = 14
	PAN_LETT_OBLIQUE_ROUNDED                                                       = 13
	PAN_LETT_OBLIQUE_SQUARE                                                        = 15
	PAN_LETT_OBLIQUE_WEIGHTED                                                      = 10
	PAN_MIDLINE_CONSTANT_POINTED                                                   = 9
	PAN_MIDLINE_CONSTANT_SERIFED                                                   = 10
	PAN_MIDLINE_CONSTANT_TRIMMED                                                   = 8
	PAN_MIDLINE_HIGH_POINTED                                                       = 6
	PAN_MIDLINE_HIGH_SERIFED                                                       = 7
	PAN_MIDLINE_HIGH_TRIMMED                                                       = 5
	PAN_MIDLINE_INDEX                                                              = 8
	PAN_MIDLINE_LOW_POINTED                                                        = 12
	PAN_MIDLINE_LOW_SERIFED                                                        = 13
	PAN_MIDLINE_LOW_TRIMMED                                                        = 11
	PAN_MIDLINE_STANDARD_POINTED                                                   = 3
	PAN_MIDLINE_STANDARD_SERIFED                                                   = 4
	PAN_MIDLINE_STANDARD_TRIMMED                                                   = 2
	PAN_NO_FIT                                                                     = 1
	PAN_PROPORTION_INDEX                                                           = 3
	PAN_PROP_CONDENSED                                                             = 6
	PAN_PROP_EVEN_WIDTH                                                            = 4
	PAN_PROP_EXPANDED                                                              = 5
	PAN_PROP_MODERN                                                                = 3
	PAN_PROP_MONOSPACED                                                            = 9
	PAN_PROP_OLD_STYLE                                                             = 2
	PAN_PROP_VERY_CONDENSED                                                        = 8
	PAN_PROP_VERY_EXPANDED                                                         = 7
	PAN_SERIFSTYLE_INDEX                                                           = 1
	PAN_SERIF_BONE                                                                 = 8
	PAN_SERIF_COVE                                                                 = 2
	PAN_SERIF_EXAGGERATED                                                          = 9
	PAN_SERIF_FLARED                                                               = 14
	PAN_SERIF_NORMAL_SANS                                                          = 11
	PAN_SERIF_OBTUSE_COVE                                                          = 3
	PAN_SERIF_OBTUSE_SANS                                                          = 12
	PAN_SERIF_OBTUSE_SQUARE_COVE                                                   = 5
	PAN_SERIF_PERP_SANS                                                            = 13
	PAN_SERIF_ROUNDED                                                              = 15
	PAN_SERIF_SQUARE                                                               = 6
	PAN_SERIF_SQUARE_COVE                                                          = 4
	PAN_SERIF_THIN                                                                 = 7
	PAN_SERIF_TRIANGLE                                                             = 10
	PAN_STRAIGHT_ARMS_DOUBLE_SERIF                                                 = 6
	PAN_STRAIGHT_ARMS_HORZ                                                         = 2
	PAN_STRAIGHT_ARMS_SINGLE_SERIF                                                 = 5
	PAN_STRAIGHT_ARMS_VERT                                                         = 4
	PAN_STRAIGHT_ARMS_WEDGE                                                        = 3
	PAN_STROKEVARIATION_INDEX                                                      = 5
	PAN_STROKE_GRADUAL_DIAG                                                        = 2
	PAN_STROKE_GRADUAL_HORZ                                                        = 5
	PAN_STROKE_GRADUAL_TRAN                                                        = 3
	PAN_STROKE_GRADUAL_VERT                                                        = 4
	PAN_STROKE_INSTANT_VERT                                                        = 8
	PAN_STROKE_RAPID_HORZ                                                          = 7
	PAN_STROKE_RAPID_VERT                                                          = 6
	PAN_WEIGHT_BLACK                                                               = 10
	PAN_WEIGHT_BOLD                                                                = 8
	PAN_WEIGHT_BOOK                                                                = 5
	PAN_WEIGHT_DEMI                                                                = 7
	PAN_WEIGHT_HEAVY                                                               = 9
	PAN_WEIGHT_INDEX                                                               = 2
	PAN_WEIGHT_LIGHT                                                               = 3
	PAN_WEIGHT_MEDIUM                                                              = 6
	PAN_WEIGHT_NORD                                                                = 11
	PAN_WEIGHT_THIN                                                                = 4
	PAN_WEIGHT_VERY_LIGHT                                                          = 2
	PAN_XHEIGHT_CONSTANT_LARGE                                                     = 4
	PAN_XHEIGHT_CONSTANT_SMALL                                                     = 2
	PAN_XHEIGHT_CONSTANT_STD                                                       = 3
	PAN_XHEIGHT_DUCKING_LARGE                                                      = 7
	PAN_XHEIGHT_DUCKING_SMALL                                                      = 5
	PAN_XHEIGHT_DUCKING_STD                                                        = 6
	PAN_XHEIGHT_INDEX                                                              = 9
	PASCAL                                                                         = 0
	PASSTHROUGH                                                                    = 19
	PBTF_APMRESUMEFROMFAILURE                                                      = 0x00000001
	PBT_APMBATTERYLOW                                                              = 0x0009
	PBT_APMOEMEVENT                                                                = 0x000B
	PBT_APMPOWERSTATUSCHANGE                                                       = 0x000A
	PBT_APMQUERYSTANDBY                                                            = 0x0001
	PBT_APMQUERYSTANDBYFAILED                                                      = 0x0003
	PBT_APMQUERYSUSPEND                                                            = 0x0000
	PBT_APMQUERYSUSPENDFAILED                                                      = 0x0002
	PBT_APMRESUMEAUTOMATIC                                                         = 0x0012
	PBT_APMRESUMECRITICAL                                                          = 0x0006
	PBT_APMRESUMESTANDBY                                                           = 0x0008
	PBT_APMRESUMESUSPEND                                                           = 0x0007
	PBT_APMSTANDBY                                                                 = 0x0005
	PBT_APMSUSPEND                                                                 = 0x0004
	PCLEANUI                                                                       = 2214592512
	PC_24                                                                          = 131072
	PC_53                                                                          = 65536
	PC_64                                                                          = 0
	PC_EXPLICIT                                                                    = 0x02
	PC_INTERIORS                                                                   = 128
	PC_NOCOLLAPSE                                                                  = 0x04
	PC_NONE                                                                        = 0
	PC_PATHS                                                                       = 512
	PC_POLYGON                                                                     = 1
	PC_POLYPOLYGON                                                                 = 256
	PC_RECTANGLE                                                                   = 2
	PC_RESERVED                                                                    = 0x01
	PC_SCANLINE                                                                    = 8
	PC_STYLED                                                                      = 32
	PC_TRAPEZOID                                                                   = 4
	PC_WIDE                                                                        = 16
	PC_WIDESTYLED                                                                  = 64
	PC_WINDPOLYGON                                                                 = 4
	PDCAP_D0_SUPPORTED                                                             = 0x00000001
	PDCAP_D1_SUPPORTED                                                             = 0x00000002
	PDCAP_D2_SUPPORTED                                                             = 0x00000004
	PDCAP_D3_SUPPORTED                                                             = 0x00000008
	PDCAP_WAKE_FROM_D0_SUPPORTED                                                   = 0x00000010
	PDCAP_WAKE_FROM_D1_SUPPORTED                                                   = 0x00000020
	PDCAP_WAKE_FROM_D2_SUPPORTED                                                   = 0x00000040
	PDCAP_WAKE_FROM_D3_SUPPORTED                                                   = 0x00000080
	PDCAP_WARM_EJECT_SUPPORTED                                                     = 0x00000100
	PDEVICESIZE                                                                    = 26
	PDIRTYUI                                                                       = 2281701376
	PERFORMANCE_DATA_VERSION                                                       = 1
	PERFSTATE_POLICY_CHANGE_IDEAL                                                  = 0
	PERFSTATE_POLICY_CHANGE_MAX                                                    = 2
	PERFSTATE_POLICY_CHANGE_ROCKET                                                 = 2
	PERFSTATE_POLICY_CHANGE_SINGLE                                                 = 1
	PFD_DEPTH_DONTCARE                                                             = 0x20000000
	PFD_DIRECT3D_ACCELERATED                                                       = 0x00004000
	PFD_DOUBLEBUFFER                                                               = 0x00000001
	PFD_DOUBLEBUFFER_DONTCARE                                                      = 0x40000000
	PFD_DRAW_TO_BITMAP                                                             = 0x00000008
	PFD_DRAW_TO_WINDOW                                                             = 0x00000004
	PFD_GENERIC_ACCELERATED                                                        = 0x00001000
	PFD_GENERIC_FORMAT                                                             = 0x00000040
	PFD_MAIN_PLANE                                                                 = 0
	PFD_NEED_PALETTE                                                               = 0x00000080
	PFD_NEED_SYSTEM_PALETTE                                                        = 0x00000100
	PFD_OVERLAY_PLANE                                                              = 1
	PFD_STEREO                                                                     = 0x00000002
	PFD_STEREO_DONTCARE                                                            = 0x80000000
	PFD_SUPPORT_COMPOSITION                                                        = 0x00008000
	PFD_SUPPORT_DIRECTDRAW                                                         = 0x00002000
	PFD_SUPPORT_GDI                                                                = 0x00000010
	PFD_SUPPORT_OPENGL                                                             = 0x00000020
	PFD_SWAP_COPY                                                                  = 0x00000400
	PFD_SWAP_EXCHANGE                                                              = 0x00000200
	PFD_SWAP_LAYER_BUFFERS                                                         = 0x00000800
	PFD_TYPE_COLORINDEX                                                            = 1
	PFD_TYPE_RGBA                                                                  = 0
	PFD_UNDERLAY_PLANE                                                             = -1
	PFL_HIDDEN                                                                     = 0x00000004
	PFL_MATCHES_PROTOCOL_ZERO                                                      = 0x00000008
	PFL_MULTIPLE_PROTO_ENTRIES                                                     = 0x00000001
	PFL_NETWORKDIRECT_PROVIDER                                                     = 0x00000010
	PFL_RECOMMENDED_PROTO_ENTRY                                                    = 0x00000002
	PF_3DNOW_INSTRUCTIONS_AVAILABLE                                                = 7
	PF_ALPHA_BYTE_INSTRUCTIONS                                                     = 5
	PF_APPLETALK                                                                   = 16
	PF_ARM_64BIT_LOADSTORE_ATOMIC                                                  = 25
	PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE                                            = 24
	PF_ARM_EXTERNAL_CACHE_AVAILABLE                                                = 26
	PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE                                             = 27
	PF_ARM_NEON_INSTRUCTIONS_AVAILABLE                                             = 19
	PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE                                         = 31
	PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE                                        = 30
	PF_ARM_V8_INSTRUCTIONS_AVAILABLE                                               = 29
	PF_ARM_VFP_32_REGISTERS_AVAILABLE                                              = 18
	PF_ATM                                                                         = 22
	PF_BAN                                                                         = 21
	PF_BTH                                                                         = 32
	PF_CCITT                                                                       = 10
	PF_CHANNELS_ENABLED                                                            = 16
	PF_CHAOS                                                                       = 5
	PF_COMPARE64_EXCHANGE128                                                       = 15
	PF_COMPARE_EXCHANGE128                                                         = 14
	PF_COMPARE_EXCHANGE_DOUBLE                                                     = 2
	PF_DATAKIT                                                                     = 9
	PF_DECnet                                                                      = 12
	PF_DLI                                                                         = 13
	PF_ECMA                                                                        = 8
	PF_FASTFAIL_AVAILABLE                                                          = 23
	PF_FIREFOX                                                                     = 19
	PF_FLOATING_POINT_EMULATED                                                     = 1
	PF_FLOATING_POINT_PRECISION_ERRATA                                             = 0
	PF_HYLINK                                                                      = 15
	PF_IMPLINK                                                                     = 3
	PF_INET                                                                        = 2
	PF_INET6                                                                       = 23
	PF_IPX                                                                         = 6
	PF_ISO                                                                         = 7
	PF_LAT                                                                         = 14
	PF_MAX                                                                         = 33
	PF_MMX_INSTRUCTIONS_AVAILABLE                                                  = 3
	PF_NS                                                                          = 6
	PF_NX_ENABLED                                                                  = 12
	PF_OSI                                                                         = 7
	PF_PAE_ENABLED                                                                 = 9
	PF_PPC_MOVEMEM_64BIT_OK                                                        = 4
	PF_PUP                                                                         = 4
	PF_RDPID_INSTRUCTION_AVAILABLE                                                 = 33
	PF_RDRAND_INSTRUCTION_AVAILABLE                                                = 28
	PF_RDTSCP_INSTRUCTION_AVAILABLE                                                = 32
	PF_RDTSC_INSTRUCTION_AVAILABLE                                                 = 8
	PF_RDWRFSGSBASE_AVAILABLE                                                      = 22
	PF_SECOND_LEVEL_ADDRESS_TRANSLATION                                            = 20
	PF_SNA                                                                         = 11
	PF_SSE3_INSTRUCTIONS_AVAILABLE                                                 = 13
	PF_SSE_DAZ_MODE_AVAILABLE                                                      = 11
	PF_UNIX                                                                        = 1
	PF_UNKNOWN1                                                                    = 20
	PF_UNSPEC                                                                      = 0
	PF_VIRT_FIRMWARE_ENABLED                                                       = 21
	PF_VOICEVIEW                                                                   = 18
	PF_XMMI64_INSTRUCTIONS_AVAILABLE                                               = 10
	PF_XMMI_INSTRUCTIONS_AVAILABLE                                                 = 6
	PF_XSAVE_ENABLED                                                               = 17
	PHYSICALHEIGHT                                                                 = 111
	PHYSICALOFFSETX                                                                = 112
	PHYSICALOFFSETY                                                                = 113
	PHYSICALWIDTH                                                                  = 110
	PIPE_ACCEPT_REMOTE_CLIENTS                                                     = 0x0
	PIPE_ACCESS_DUPLEX                                                             = 0x3
	PIPE_ACCESS_INBOUND                                                            = 0x1
	PIPE_ACCESS_OUTBOUND                                                           = 0x2
	PIPE_CLIENT_END                                                                = 0x0
	PIPE_NOWAIT                                                                    = 0x1
	PIPE_READMODE_BYTE                                                             = 0x0
	PIPE_READMODE_MESSAGE                                                          = 0x2
	PIPE_REJECT_REMOTE_CLIENTS                                                     = 0x8
	PIPE_SERVER_END                                                                = 0x1
	PIPE_TYPE_BYTE                                                                 = 0x0
	PIPE_TYPE_MESSAGE                                                              = 0x4
	PIPE_UNLIMITED_INSTANCES                                                       = 255
	PIPE_WAIT                                                                      = 0x0
	PLANES                                                                         = 14
	PMB_ACTIVE                                                                     = 0x00000001
	PM_NOREMOVE                                                                    = 0x0000
	PM_NOYIELD                                                                     = 0x0002
	PM_QS_INPUT                                                                    = 67567616
	PM_QS_PAINT                                                                    = 2097152
	PM_QS_POSTMESSAGE                                                              = 9961472
	PM_QS_SENDMESSAGE                                                              = 4194304
	PM_REMOVE                                                                      = 0x0001
	POINTER_32                                                                     = 0
	POINTER_64                                                                     = 0
	POINTER_SIGNED                                                                 = 0
	POINTER_UNSIGNED                                                               = 0
	POLICY_AUDIT_SUBCATEGORY_COUNT                                                 = 56
	POLICY_SHOWREASONUI_ALWAYS                                                     = 1
	POLICY_SHOWREASONUI_NEVER                                                      = 0
	POLICY_SHOWREASONUI_SERVERONLY                                                 = 3
	POLICY_SHOWREASONUI_WORKSTATIONONLY                                            = 2
	POLYFILL_LAST                                                                  = 2
	POLYGONALCAPS                                                                  = 32
	POSITIVE_INFINITY_RATE                                                         = 0xFFFFFFFE
	POSTSCRIPT_DATA                                                                = 37
	POSTSCRIPT_IDENTIFY                                                            = 4117
	POSTSCRIPT_IGNORE                                                              = 38
	POSTSCRIPT_INJECTION                                                           = 4118
	POSTSCRIPT_PASSTHROUGH                                                         = 4115
	POWERBUTTON_ACTION_INDEX_HIBERNATE                                             = 2
	POWERBUTTON_ACTION_INDEX_NOTHING                                               = 0
	POWERBUTTON_ACTION_INDEX_SHUTDOWN                                              = 3
	POWERBUTTON_ACTION_INDEX_SLEEP                                                 = 1
	POWERBUTTON_ACTION_VALUE_HIBERNATE                                             = 3
	POWERBUTTON_ACTION_VALUE_NOTHING                                               = 0
	POWERBUTTON_ACTION_VALUE_SHUTDOWN                                              = 6
	POWERBUTTON_ACTION_VALUE_SLEEP                                                 = 2
	POWER_ACTION_CRITICAL                                                          = 0x80000000
	POWER_ACTION_DISABLE_WAKES                                                     = 0x40000000
	POWER_ACTION_HIBERBOOT                                                         = 0x00000008
	POWER_ACTION_LIGHTEST_FIRST                                                    = 0x10000000
	POWER_ACTION_LOCK_CONSOLE                                                      = 0x20000000
	POWER_ACTION_OVERRIDE_APPS                                                     = 0x00000004
	POWER_ACTION_PSEUDO_TRANSITION                                                 = 0x08000000
	POWER_ACTION_QUERY_ALLOWED                                                     = 0x00000001
	POWER_ACTION_UI_ALLOWED                                                        = 0x00000002
	POWER_DEVICE_IDLE_POLICY_CONSERVATIVE                                          = 1
	POWER_DEVICE_IDLE_POLICY_PERFORMANCE                                           = 0
	POWER_FORCE_TRIGGER_RESET                                                      = 0x80000000
	POWER_LEVEL_USER_NOTIFY_EXEC                                                   = 0x00000004
	POWER_LEVEL_USER_NOTIFY_SOUND                                                  = 0x00000002
	POWER_LEVEL_USER_NOTIFY_TEXT                                                   = 0x00000001
	POWER_PLATFORM_ROLE_V1                                                         = 1
	POWER_PLATFORM_ROLE_V2                                                         = 2
	POWER_PLATFORM_ROLE_VERSION                                                    = 1
	POWER_REQUEST_CONTEXT_DETAILED_STRING                                          = 0x00000002
	POWER_REQUEST_CONTEXT_SIMPLE_STRING                                            = 0x00000001
	POWER_REQUEST_CONTEXT_VERSION                                                  = 0
	POWER_SETTING_VALUE_VERSION                                                    = 1
	POWER_SYSTEM_MAXIMUM                                                           = 7
	POWER_USER_NOTIFY_BUTTON                                                       = 0x00000008
	POWER_USER_NOTIFY_FORCED_SHUTDOWN                                              = 0x00000020
	POWER_USER_NOTIFY_SHUTDOWN                                                     = 0x00000010
	PO_THROTTLE_ADAPTIVE                                                           = 3
	PO_THROTTLE_CONSTANT                                                           = 1
	PO_THROTTLE_DEGRADE                                                            = 2
	PO_THROTTLE_MAXIMUM                                                            = 4
	PO_THROTTLE_NONE                                                               = 0
	PPM_FIRMWARE_ACPI1C2                                                           = 0x1
	PPM_FIRMWARE_ACPI1C3                                                           = 0x2
	PPM_FIRMWARE_ACPI1TSTATES                                                      = 0x4
	PPM_FIRMWARE_CPC                                                               = 0x40000
	PPM_FIRMWARE_CSD                                                               = 0x10
	PPM_FIRMWARE_CST                                                               = 0x8
	PPM_FIRMWARE_OSC                                                               = 0x10000
	PPM_FIRMWARE_PCCH                                                              = 0x4000
	PPM_FIRMWARE_PCCP                                                              = 0x8000
	PPM_FIRMWARE_PCT                                                               = 0x20
	PPM_FIRMWARE_PDC                                                               = 0x20000
	PPM_FIRMWARE_PPC                                                               = 0x100
	PPM_FIRMWARE_PSD                                                               = 0x200
	PPM_FIRMWARE_PSS                                                               = 0x40
	PPM_FIRMWARE_PTC                                                               = 0x400
	PPM_FIRMWARE_TPC                                                               = 0x1000
	PPM_FIRMWARE_TSD                                                               = 0x2000
	PPM_FIRMWARE_TSS                                                               = 0x800
	PPM_FIRMWARE_XPSS                                                              = 0x80
	PPM_IDLE_IMPLEMENTATION_CSTATES                                                = 0x1
	PPM_IDLE_IMPLEMENTATION_NONE                                                   = 0x0
	PPM_IDLE_IMPLEMENTATION_PEP                                                    = 0x2
	PPM_PERFORMANCE_IMPLEMENTATION_CPPC                                            = 3
	PPM_PERFORMANCE_IMPLEMENTATION_NONE                                            = 0
	PPM_PERFORMANCE_IMPLEMENTATION_PCCV1                                           = 2
	PPM_PERFORMANCE_IMPLEMENTATION_PEP                                             = 4
	PPM_PERFORMANCE_IMPLEMENTATION_PSTATES                                         = 1
	PP_DISPLAYERRORS                                                               = 0x01
	PRAGMA_DEPRECATED_DDK                                                          = 0
	PRF_CHECKVISIBLE                                                               = 1
	PRF_CHILDREN                                                                   = 16
	PRF_CLIENT                                                                     = 4
	PRF_ERASEBKGND                                                                 = 8
	PRF_NONCLIENT                                                                  = 2
	PRF_OWNED                                                                      = 32
	PRINTRATEUNIT_CPS                                                              = 2
	PRINTRATEUNIT_IPM                                                              = 4
	PRINTRATEUNIT_LPM                                                              = 3
	PRINTRATEUNIT_PPM                                                              = 1
	PRIVATE_MP_PRIME_TAB_SIZE                                                      = 256
	PRIVATE_NAMESPACE_FLAG_DESTROY                                                 = 0x1
	PRIVILEGE_SET_ALL_NECESSARY                                                    = 1
	PRIX16                                                                         = "X"
	PRIX32                                                                         = "X"
	PRIX64                                                                         = "I64X"
	PRIX8                                                                          = "X"
	PRIXFAST16                                                                     = "X"
	PRIXFAST32                                                                     = "X"
	PRIXFAST8                                                                      = "X"
	PRIXLEAST16                                                                    = "X"
	PRIXLEAST32                                                                    = "X"
	PRIXLEAST8                                                                     = "X"
	PRId16                                                                         = "d"
	PRId32                                                                         = "d"
	PRId64                                                                         = "I64d"
	PRId8                                                                          = "d"
	PRIdFAST16                                                                     = "d"
	PRIdFAST32                                                                     = "d"
	PRIdFAST8                                                                      = "d"
	PRIdLEAST16                                                                    = "d"
	PRIdLEAST32                                                                    = "d"
	PRIdLEAST8                                                                     = "d"
	PRIi16                                                                         = "i"
	PRIi32                                                                         = "i"
	PRIi64                                                                         = "I64i"
	PRIi8                                                                          = "i"
	PRIiFAST16                                                                     = "i"
	PRIiFAST32                                                                     = "i"
	PRIiFAST8                                                                      = "i"
	PRIiLEAST16                                                                    = "i"
	PRIiLEAST32                                                                    = "i"
	PRIiLEAST8                                                                     = "i"
	PRIo16                                                                         = "o"
	PRIo32                                                                         = "o"
	PRIo64                                                                         = "I64o"
	PRIo8                                                                          = "o"
	PRIoFAST16                                                                     = "o"
	PRIoFAST32                                                                     = "o"
	PRIoFAST8                                                                      = "o"
	PRIoLEAST16                                                                    = "o"
	PRIoLEAST32                                                                    = "o"
	PRIoLEAST8                                                                     = "o"
	PRIu16                                                                         = "u"
	PRIu32                                                                         = "u"
	PRIu64                                                                         = "I64u"
	PRIu8                                                                          = "u"
	PRIuFAST16                                                                     = "u"
	PRIuFAST32                                                                     = "u"
	PRIuFAST8                                                                      = "u"
	PRIuLEAST16                                                                    = "u"
	PRIuLEAST32                                                                    = "u"
	PRIuLEAST8                                                                     = "u"
	PRIx16                                                                         = "x"
	PRIx32                                                                         = "x"
	PRIx64                                                                         = "I64x"
	PRIx8                                                                          = "x"
	PRIxFAST16                                                                     = "x"
	PRIxFAST32                                                                     = "x"
	PRIxFAST8                                                                      = "x"
	PRIxLEAST16                                                                    = "x"
	PRIxLEAST32                                                                    = "x"
	PRIxLEAST8                                                                     = "x"
	PROCESSOR_ALPHA_21064                                                          = 21064
	PROCESSOR_AMD_X8664                                                            = 8664
	PROCESSOR_ARCHITECTURE_ALPHA                                                   = 2
	PROCESSOR_ARCHITECTURE_ALPHA64                                                 = 7
	PROCESSOR_ARCHITECTURE_AMD64                                                   = 9
	PROCESSOR_ARCHITECTURE_ARM                                                     = 5
	PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64                                          = 13
	PROCESSOR_ARCHITECTURE_ARM64                                                   = 12
	PROCESSOR_ARCHITECTURE_IA32_ON_ARM64                                           = 14
	PROCESSOR_ARCHITECTURE_IA32_ON_WIN64                                           = 10
	PROCESSOR_ARCHITECTURE_IA64                                                    = 6
	PROCESSOR_ARCHITECTURE_INTEL                                                   = 0
	PROCESSOR_ARCHITECTURE_MIPS                                                    = 1
	PROCESSOR_ARCHITECTURE_MSIL                                                    = 8
	PROCESSOR_ARCHITECTURE_NEUTRAL                                                 = 11
	PROCESSOR_ARCHITECTURE_PPC                                                     = 3
	PROCESSOR_ARCHITECTURE_SHX                                                     = 4
	PROCESSOR_ARCHITECTURE_UNKNOWN                                                 = 0xffff
	PROCESSOR_ARM720                                                               = 1824
	PROCESSOR_ARM820                                                               = 2080
	PROCESSOR_ARM920                                                               = 2336
	PROCESSOR_ARM_7TDMI                                                            = 70001
	PROCESSOR_HITACHI_SH3                                                          = 10003
	PROCESSOR_HITACHI_SH3E                                                         = 10004
	PROCESSOR_HITACHI_SH4                                                          = 10005
	PROCESSOR_IDLESTATE_POLICY_COUNT                                               = 0x3
	PROCESSOR_INTEL_386                                                            = 386
	PROCESSOR_INTEL_486                                                            = 486
	PROCESSOR_INTEL_IA64                                                           = 2200
	PROCESSOR_INTEL_PENTIUM                                                        = 586
	PROCESSOR_MIPS_R4000                                                           = 4000
	PROCESSOR_MOTOROLA_821                                                         = 821
	PROCESSOR_OPTIL                                                                = 0x494f
	PROCESSOR_PERF_BOOST_MODE_AGGRESSIVE                                           = 2
	PROCESSOR_PERF_BOOST_MODE_DISABLED                                             = 0
	PROCESSOR_PERF_BOOST_MODE_EFFICIENT_AGGRESSIVE                                 = 4
	PROCESSOR_PERF_BOOST_MODE_EFFICIENT_ENABLED                                    = 3
	PROCESSOR_PERF_BOOST_MODE_ENABLED                                              = 1
	PROCESSOR_PERF_BOOST_MODE_MAX                                                  = 4
	PROCESSOR_PERF_BOOST_POLICY_DISABLED                                           = 0
	PROCESSOR_PERF_BOOST_POLICY_MAX                                                = 100
	PROCESSOR_PPC_601                                                              = 601
	PROCESSOR_PPC_603                                                              = 603
	PROCESSOR_PPC_604                                                              = 604
	PROCESSOR_PPC_620                                                              = 620
	PROCESSOR_SHx_SH3                                                              = 103
	PROCESSOR_SHx_SH4                                                              = 104
	PROCESSOR_STRONGARM                                                            = 2577
	PROCESS_ALL_ACCESS                                                             = 2035711
	PROCESS_CREATE_PROCESS                                                         = 128
	PROCESS_CREATE_THREAD                                                          = 2
	PROCESS_DUP_HANDLE                                                             = 64
	PROCESS_HEAP_ENTRY_BUSY                                                        = 0x4
	PROCESS_HEAP_ENTRY_DDESHARE                                                    = 0x20
	PROCESS_HEAP_ENTRY_MOVEABLE                                                    = 0x10
	PROCESS_HEAP_REGION                                                            = 0x1
	PROCESS_HEAP_SEG_ALLOC                                                         = 0x8
	PROCESS_HEAP_UNCOMMITTED_RANGE                                                 = 0x2
	PROCESS_MODE_BACKGROUND_BEGIN                                                  = 0x100000
	PROCESS_MODE_BACKGROUND_END                                                    = 0x200000
	PROCESS_QUERY_INFORMATION                                                      = 1024
	PROCESS_QUERY_LIMITED_INFORMATION                                              = 4096
	PROCESS_SET_INFORMATION                                                        = 512
	PROCESS_SET_QUOTA                                                              = 256
	PROCESS_SET_SESSIONID                                                          = 4
	PROCESS_SUSPEND_RESUME                                                         = 2048
	PROCESS_TERMINATE                                                              = 1
	PROCESS_VM_OPERATION                                                           = 8
	PROCESS_VM_READ                                                                = 16
	PROCESS_VM_WRITE                                                               = 32
	PROC_IDLE_BUCKET_COUNT                                                         = 6
	PROC_IDLE_BUCKET_COUNT_EX                                                      = 16
	PRODUCT_ARM64_SERVER                                                           = 0x78
	PRODUCT_BUSINESS                                                               = 0x6
	PRODUCT_BUSINESS_N                                                             = 0x10
	PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER                                       = 0x7C
	PRODUCT_CLOUD_STORAGE_SERVER                                                   = 0x6E
	PRODUCT_CLUSTER_SERVER                                                         = 0x12
	PRODUCT_CLUSTER_SERVER_V                                                       = 0x40
	PRODUCT_CONNECTED_CAR                                                          = 0x75
	PRODUCT_CORE                                                                   = 0x65
	PRODUCT_CORE_ARM                                                               = 0x61
	PRODUCT_CORE_CONNECTED                                                         = 0x6F
	PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC                                         = 0x74
	PRODUCT_CORE_CONNECTED_N                                                       = 0x71
	PRODUCT_CORE_CONNECTED_SINGLELANGUAGE                                          = 0x73
	PRODUCT_CORE_COUNTRYSPECIFIC                                                   = 0x63
	PRODUCT_CORE_LANGUAGESPECIFIC                                                  = 0x64
	PRODUCT_CORE_N                                                                 = 0x62
	PRODUCT_CORE_SINGLELANGUAGE                                                    = 0x64
	PRODUCT_DATACENTER_EVALUATION_SERVER                                           = 0x50
	PRODUCT_DATACENTER_SERVER                                                      = 0x8
	PRODUCT_DATACENTER_SERVER_CORE                                                 = 0xc
	PRODUCT_DATACENTER_SERVER_CORE_V                                               = 0x27
	PRODUCT_DATACENTER_SERVER_V                                                    = 0x25
	PRODUCT_EDUCATION                                                              = 0x79
	PRODUCT_EDUCATION_N                                                            = 0x7a
	PRODUCT_EMBEDDED                                                               = 0x41
	PRODUCT_EMBEDDED_A                                                             = 0x58
	PRODUCT_EMBEDDED_AUTOMOTIVE                                                    = 0x55
	PRODUCT_EMBEDDED_E                                                             = 0x5A
	PRODUCT_EMBEDDED_EVAL                                                          = 0x6B
	PRODUCT_EMBEDDED_E_EVAL                                                        = 0x6C
	PRODUCT_EMBEDDED_INDUSTRY                                                      = 0x59
	PRODUCT_EMBEDDED_INDUSTRY_A                                                    = 0x56
	PRODUCT_EMBEDDED_INDUSTRY_A_E                                                  = 0x5C
	PRODUCT_EMBEDDED_INDUSTRY_E                                                    = 0x5B
	PRODUCT_EMBEDDED_INDUSTRY_EVAL                                                 = 0x69
	PRODUCT_EMBEDDED_INDUSTRY_E_EVAL                                               = 0x6A
	PRODUCT_ENTERPRISE                                                             = 0x4
	PRODUCT_ENTERPRISE_E                                                           = 0x46
	PRODUCT_ENTERPRISE_EVALUATION                                                  = 0x48
	PRODUCT_ENTERPRISE_N                                                           = 0x1b
	PRODUCT_ENTERPRISE_N_EVALUATION                                                = 0x54
	PRODUCT_ENTERPRISE_S                                                           = 0x7D
	PRODUCT_ENTERPRISE_SERVER                                                      = 0xa
	PRODUCT_ENTERPRISE_SERVER_CORE                                                 = 0xe
	PRODUCT_ENTERPRISE_SERVER_CORE_V                                               = 0x29
	PRODUCT_ENTERPRISE_SERVER_IA64                                                 = 0xf
	PRODUCT_ENTERPRISE_SERVER_V                                                    = 0x26
	PRODUCT_ENTERPRISE_S_EVALUATION                                                = 0x81
	PRODUCT_ENTERPRISE_S_N                                                         = 0x7E
	PRODUCT_ENTERPRISE_S_N_EVALUATION                                              = 0x82
	PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL                                          = 0x3C
	PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC                                       = 0x3E
	PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT                                          = 0x3B
	PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC                                       = 0x3D
	PRODUCT_HOME_BASIC                                                             = 0x2
	PRODUCT_HOME_BASIC_E                                                           = 0x43
	PRODUCT_HOME_BASIC_N                                                           = 0x5
	PRODUCT_HOME_PREMIUM                                                           = 0x3
	PRODUCT_HOME_PREMIUM_E                                                         = 0x44
	PRODUCT_HOME_PREMIUM_N                                                         = 0x1a
	PRODUCT_HOME_PREMIUM_SERVER                                                    = 0x22
	PRODUCT_HOME_SERVER                                                            = 0x13
	PRODUCT_HYPERV                                                                 = 0x2a
	PRODUCT_INDUSTRY_HANDHELD                                                      = 0x76
	PRODUCT_IOTUAP                                                                 = 0x7B
	PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT                                       = 0x1e
	PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING                                        = 0x20
	PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY                                         = 0x1f
	PRODUCT_MOBILE_CORE                                                            = 0x68
	PRODUCT_MOBILE_ENTERPRISE                                                      = 0x85
	PRODUCT_MULTIPOINT_PREMIUM_SERVER                                              = 0x4D
	PRODUCT_MULTIPOINT_STANDARD_SERVER                                             = 0x4C
	PRODUCT_NANO_SERVER                                                            = 0x6D
	PRODUCT_PPI_PRO                                                                = 0x77
	PRODUCT_PROFESSIONAL                                                           = 0x30
	PRODUCT_PROFESSIONAL_E                                                         = 0x45
	PRODUCT_PROFESSIONAL_EMBEDDED                                                  = 0x3A
	PRODUCT_PROFESSIONAL_N                                                         = 0x31
	PRODUCT_PROFESSIONAL_S                                                         = 0x7F
	PRODUCT_PROFESSIONAL_STUDENT                                                   = 0x70
	PRODUCT_PROFESSIONAL_STUDENT_N                                                 = 0x72
	PRODUCT_PROFESSIONAL_S_N                                                       = 0x80
	PRODUCT_PROFESSIONAL_WMC                                                       = 0x67
	PRODUCT_SB_SOLUTION_SERVER                                                     = 0x32
	PRODUCT_SB_SOLUTION_SERVER_EM                                                  = 0x36
	PRODUCT_SERVER_FOR_SB_SOLUTIONS                                                = 0x33
	PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM                                             = 0x37
	PRODUCT_SERVER_FOR_SMALLBUSINESS                                               = 0x18
	PRODUCT_SERVER_FOR_SMALLBUSINESS_V                                             = 0x23
	PRODUCT_SERVER_FOUNDATION                                                      = 0x21
	PRODUCT_SERVER_V                                                               = 0x25
	PRODUCT_SMALLBUSINESS_SERVER                                                   = 0x9
	PRODUCT_SMALLBUSINESS_SERVER_PREMIUM                                           = 0x19
	PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE                                      = 0x3f
	PRODUCT_SOLUTION_EMBEDDEDSERVER                                                = 0x38
	PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE                                           = 0x39
	PRODUCT_STANDARD_EVALUATION_SERVER                                             = 0x4F
	PRODUCT_STANDARD_SERVER                                                        = 0x7
	PRODUCT_STANDARD_SERVER_CORE                                                   = 0xd
	PRODUCT_STANDARD_SERVER_CORE_V                                                 = 0x28
	PRODUCT_STANDARD_SERVER_SOLUTIONS                                              = 0x34
	PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE                                         = 0x35
	PRODUCT_STANDARD_SERVER_V                                                      = 0x24
	PRODUCT_STARTER                                                                = 0xb
	PRODUCT_STARTER_E                                                              = 0x42
	PRODUCT_STARTER_N                                                              = 0x2f
	PRODUCT_STORAGE_ENTERPRISE_SERVER                                              = 0x17
	PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE                                         = 0x2e
	PRODUCT_STORAGE_EXPRESS_SERVER                                                 = 0x14
	PRODUCT_STORAGE_EXPRESS_SERVER_CORE                                            = 0x2b
	PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER                                     = 0x60
	PRODUCT_STORAGE_STANDARD_SERVER                                                = 0x15
	PRODUCT_STORAGE_STANDARD_SERVER_CORE                                           = 0x2c
	PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER                                    = 0x5F
	PRODUCT_STORAGE_WORKGROUP_SERVER                                               = 0x16
	PRODUCT_STORAGE_WORKGROUP_SERVER_CORE                                          = 0x2d
	PRODUCT_THINPC                                                                 = 0x57
	PRODUCT_ULTIMATE                                                               = 0x1
	PRODUCT_ULTIMATE_E                                                             = 0x47
	PRODUCT_ULTIMATE_N                                                             = 0x1c
	PRODUCT_UNDEFINED                                                              = 0x0
	PRODUCT_UNLICENSED                                                             = 0xabcdabcd
	PRODUCT_WEB_SERVER                                                             = 0x11
	PRODUCT_WEB_SERVER_CORE                                                        = 0x1d
	PROFILE_KERNEL                                                                 = 0x20000000
	PROFILE_SERVER                                                                 = 0x40000000
	PROFILE_USER                                                                   = 0x10000000
	PROGRESS_CANCEL                                                                = 1
	PROGRESS_CONTINUE                                                              = 0
	PROGRESS_QUIET                                                                 = 3
	PROGRESS_STOP                                                                  = 2
	PROOF_QUALITY                                                                  = 2
	PROTECTED_DACL_SECURITY_INFORMATION                                            = 2147483648
	PROTECTED_SACL_SECURITY_INFORMATION                                            = 1073741824
	PROTECTION_LEVEL_DEFAULT                                                       = 20
	PROTECTION_LEVEL_RESTRICTED                                                    = 30
	PROTECTION_LEVEL_UNRESTRICTED                                                  = 10
	PROVIDER_KEEPS_VALUE_LENGTH                                                    = 0x1
	PR_JOBSTATUS                                                                   = 0x0000
	PSIDENT_GDICENTRIC                                                             = 0
	PSIDENT_PSCENTRIC                                                              = 1
	PSINJECT_BEGINDEFAULTS                                                         = 12
	PSINJECT_BEGINPAGESETUP                                                        = 101
	PSINJECT_BEGINPROLOG                                                           = 14
	PSINJECT_BEGINSETUP                                                            = 16
	PSINJECT_BEGINSTREAM                                                           = 1
	PSINJECT_BOUNDINGBOX                                                           = 9
	PSINJECT_COMMENTS                                                              = 11
	PSINJECT_DLFONT                                                                = 0xdddddddd
	PSINJECT_DOCNEEDEDRES                                                          = 5
	PSINJECT_DOCSUPPLIEDRES                                                        = 6
	PSINJECT_DOCUMENTPROCESSCOLORS                                                 = 10
	PSINJECT_DOCUMENTPROCESSCOLORSATEND                                            = 21
	PSINJECT_ENDDEFAULTS                                                           = 13
	PSINJECT_ENDPAGECOMMENTS                                                       = 107
	PSINJECT_ENDPAGESETUP                                                          = 102
	PSINJECT_ENDPROLOG                                                             = 15
	PSINJECT_ENDSETUP                                                              = 17
	PSINJECT_ENDSTREAM                                                             = 20
	PSINJECT_EOF                                                                   = 19
	PSINJECT_ORIENTATION                                                           = 8
	PSINJECT_PAGEBBOX                                                              = 106
	PSINJECT_PAGENUMBER                                                            = 100
	PSINJECT_PAGEORDER                                                             = 7
	PSINJECT_PAGES                                                                 = 4
	PSINJECT_PAGESATEND                                                            = 3
	PSINJECT_PAGETRAILER                                                           = 103
	PSINJECT_PLATECOLOR                                                            = 104
	PSINJECT_PSADOBE                                                               = 2
	PSINJECT_SHOWPAGE                                                              = 105
	PSINJECT_TRAILER                                                               = 18
	PSINJECT_VMRESTORE                                                             = 201
	PSINJECT_VMSAVE                                                                = 200
	PSPROTOCOL_ASCII                                                               = 0
	PSPROTOCOL_BCP                                                                 = 1
	PSPROTOCOL_BINARY                                                              = 3
	PSPROTOCOL_TBCP                                                                = 2
	PS_ALTERNATE                                                                   = 8
	PS_COSMETIC                                                                    = 0x00000000
	PS_DASH                                                                        = 1
	PS_DASHDOT                                                                     = 3
	PS_DASHDOTDOT                                                                  = 4
	PS_DOT                                                                         = 2
	PS_ENDCAP_FLAT                                                                 = 0x00000200
	PS_ENDCAP_MASK                                                                 = 0x00000F00
	PS_ENDCAP_ROUND                                                                = 0x00000000
	PS_ENDCAP_SQUARE                                                               = 0x00000100
	PS_GEOMETRIC                                                                   = 0x00010000
	PS_INSIDEFRAME                                                                 = 6
	PS_JOIN_BEVEL                                                                  = 0x00001000
	PS_JOIN_MASK                                                                   = 0x0000F000
	PS_JOIN_MITER                                                                  = 0x00002000
	PS_JOIN_ROUND                                                                  = 0x00000000
	PS_NULL                                                                        = 5
	PS_SOLID                                                                       = 0
	PS_STYLE_MASK                                                                  = 0x0000000F
	PS_TYPE_MASK                                                                   = 0x000F0000
	PS_USERSTYLE                                                                   = 7
	PTRDIFF_MAX                                                                    = 9223372036854775807
	PTRDIFF_MIN                                                                    = -9223372036854775808
	PT_BEZIERTO                                                                    = 0x04
	PT_CLOSEFIGURE                                                                 = 0x01
	PT_LINETO                                                                      = 0x02
	PT_MOVETO                                                                      = 0x06
	PURGE_RXABORT                                                                  = 0x2
	PURGE_RXCLEAR                                                                  = 0x8
	PURGE_TXABORT                                                                  = 0x1
	PURGE_TXCLEAR                                                                  = 0x4
	PVD_CONFIG                                                                     = 0x3001
	PWR_CRITICALRESUME                                                             = 3
	PWR_FAIL                                                                       = -1
	PWR_OK                                                                         = 1
	PWR_SUSPENDREQUEST                                                             = 1
	PWR_SUSPENDRESUME                                                              = 2
	PW_CLIENTONLY                                                                  = 0x00000001
	QDI_DIBTOSCREEN                                                                = 4
	QDI_GETDIBITS                                                                  = 2
	QDI_SETDIBITS                                                                  = 1
	QDI_STRETCHDIB                                                                 = 8
	QOS_GENERAL_ID_BASE                                                            = 2000
	QOS_NOT_SPECIFIED                                                              = 0xFFFFFFFF
	QOS_OBJECT_DESTADDR                                                            = 2004
	QOS_OBJECT_END_OF_LIST                                                         = 2001
	QOS_OBJECT_SD_MODE                                                             = 2002
	QOS_OBJECT_SHAPING_RATE                                                        = 2003
	QS_ALLEVENTS                                                                   = 1215
	QS_ALLINPUT                                                                    = 1279
	QS_ALLPOSTMESSAGE                                                              = 0x0100
	QS_HOTKEY                                                                      = 0x0080
	QS_INPUT                                                                       = 1031
	QS_KEY                                                                         = 0x0001
	QS_MOUSE                                                                       = 6
	QS_MOUSEBUTTON                                                                 = 0x0004
	QS_MOUSEMOVE                                                                   = 0x0002
	QS_PAINT                                                                       = 0x0020
	QS_POSTMESSAGE                                                                 = 0x0008
	QS_RAWINPUT                                                                    = 0x0400
	QS_SENDMESSAGE                                                                 = 0x0040
	QS_TIMER                                                                       = 0x0010
	QUERYDIBSUPPORT                                                                = 3073
	QUERYESCSUPPORT                                                                = 8
	QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS                                            = 16
	QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE                                            = 8
	QUERY_ACTCTX_FLAG_NO_ADDREF                                                    = 2147483648
	QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX                                            = 4
	QUOTA_LIMITS_HARDWS_MAX_DISABLE                                                = 0x00000008
	QUOTA_LIMITS_HARDWS_MAX_ENABLE                                                 = 0x00000004
	QUOTA_LIMITS_HARDWS_MIN_DISABLE                                                = 0x00000002
	QUOTA_LIMITS_HARDWS_MIN_ENABLE                                                 = 0x00000001
	QUOTA_LIMITS_USE_DEFAULT_LIMITS                                                = 0x00000010
	R2_BLACK                                                                       = 1
	R2_COPYPEN                                                                     = 13
	R2_LAST                                                                        = 16
	R2_MASKNOTPEN                                                                  = 3
	R2_MASKPEN                                                                     = 9
	R2_MASKPENNOT                                                                  = 5
	R2_MERGENOTPEN                                                                 = 12
	R2_MERGEPEN                                                                    = 15
	R2_MERGEPENNOT                                                                 = 14
	R2_NOP                                                                         = 11
	R2_NOT                                                                         = 6
	R2_NOTCOPYPEN                                                                  = 4
	R2_NOTMASKPEN                                                                  = 8
	R2_NOTMERGEPEN                                                                 = 2
	R2_NOTXORPEN                                                                   = 10
	R2_WHITE                                                                       = 16
	R2_XORPEN                                                                      = 7
	RAND_SEED_INITIALIZED                                                          = 0x40
	RASTERCAPS                                                                     = 38
	RASTER_FONTTYPE                                                                = 0x0001
	RCVALL_IPLEVEL                                                                 = 3
	RCVALL_OFF                                                                     = 0
	RCVALL_ON                                                                      = 1
	RCVALL_SOCKETLEVELONLY                                                         = 2
	RC_BANDING                                                                     = 2
	RC_BIGFONT                                                                     = 0x0400
	RC_BITBLT                                                                      = 1
	RC_BITMAP64                                                                    = 8
	RC_DEVBITS                                                                     = 0x8000
	RC_DIBTODEV                                                                    = 0x0200
	RC_DI_BITMAP                                                                   = 0x0080
	RC_FLOODFILL                                                                   = 0x1000
	RC_GDI20_OUTPUT                                                                = 0x0010
	RC_GDI20_STATE                                                                 = 0x0020
	RC_NONE                                                                        = 0
	RC_OP_DX_OUTPUT                                                                = 0x4000
	RC_PALETTE                                                                     = 0x0100
	RC_SAVEBITMAP                                                                  = 0x0040
	RC_SCALING                                                                     = 4
	RC_STRETCHBLT                                                                  = 0x0800
	RC_STRETCHDIB                                                                  = 0x2000
	RDH_RECTANGLES                                                                 = 1
	RDW_ALLCHILDREN                                                                = 0x0080
	RDW_ERASE                                                                      = 0x0004
	RDW_ERASENOW                                                                   = 0x0200
	RDW_FRAME                                                                      = 0x0400
	RDW_INTERNALPAINT                                                              = 0x0002
	RDW_INVALIDATE                                                                 = 0x0001
	RDW_NOCHILDREN                                                                 = 0x0040
	RDW_NOERASE                                                                    = 0x0020
	RDW_NOFRAME                                                                    = 0x0800
	RDW_NOINTERNALPAINT                                                            = 0x0010
	RDW_UPDATENOW                                                                  = 0x0100
	RDW_VALIDATE                                                                   = 0x0008
	READ_CONTROL                                                                   = 131072
	READ_THREAD_PROFILING_FLAG_DISPATCHING                                         = 0x00000001
	READ_THREAD_PROFILING_FLAG_HARDWARE_COUNTERS                                   = 0x00000002
	REALTIME_PRIORITY_CLASS                                                        = 0x100
	REASON_HWINSTALL                                                               = 65538
	REASON_LEGACY_API                                                              = 2147942400
	REASON_OTHER                                                                   = 0
	REASON_PLANNED_FLAG                                                            = 2147483648
	REASON_SERVICEHANG                                                             = 196613
	REASON_SWHWRECONF                                                              = 196612
	REASON_SWINSTALL                                                               = 196610
	REASON_UNKNOWN                                                                 = 255
	REASON_UNSTABLE                                                                = 327686
	RECOVERY_DEFAULT_PING_INTERVAL                                                 = 5000
	RECOVERY_MAX_PING_INTERVAL                                                     = 300000
	REGDB_E_FIRST                                                                  = 2147746128
	REGDB_E_LAST                                                                   = 2147746143
	REGDB_S_FIRST                                                                  = 262480
	REGDB_S_LAST                                                                   = 262495
	REG_APP_HIVE                                                                   = 16
	REG_BINARY                                                                     = 3
	REG_BOOT_HIVE                                                                  = 1024
	REG_CREATED_NEW_KEY                                                            = 1
	REG_DWORD                                                                      = 4
	REG_DWORD_BIG_ENDIAN                                                           = 5
	REG_DWORD_LITTLE_ENDIAN                                                        = 4
	REG_EXPAND_SZ                                                                  = 2
	REG_FORCE_RESTORE                                                              = 8
	REG_FORCE_UNLOAD                                                               = 1
	REG_FULL_RESOURCE_DESCRIPTOR                                                   = 9
	REG_HIVE_EXACT_FILE_GROWTH                                                     = 128
	REG_HIVE_NO_RM                                                                 = 256
	REG_HIVE_SINGLE_LOG                                                            = 512
	REG_LATEST_FORMAT                                                              = 2
	REG_LEGAL_CHANGE_FILTER                                                        = 268435471
	REG_LEGAL_OPTION                                                               = 15
	REG_LINK                                                                       = 6
	REG_MUI_STRING_TRUNCATE                                                        = 0x00000001
	REG_MULTI_SZ                                                                   = 7
	REG_NONE                                                                       = 0
	REG_NOTIFY_CHANGE_ATTRIBUTES                                                   = 2
	REG_NOTIFY_CHANGE_LAST_SET                                                     = 4
	REG_NOTIFY_CHANGE_NAME                                                         = 1
	REG_NOTIFY_CHANGE_SECURITY                                                     = 8
	REG_NOTIFY_THREAD_AGNOSTIC                                                     = 268435456
	REG_NO_COMPRESSION                                                             = 4
	REG_NO_LAZY_FLUSH                                                              = 4
	REG_OPENED_EXISTING_KEY                                                        = 2
	REG_OPTION_BACKUP_RESTORE                                                      = 4
	REG_OPTION_CREATE_LINK                                                         = 2
	REG_OPTION_NON_VOLATILE                                                        = 0
	REG_OPTION_OPEN_LINK                                                           = 8
	REG_OPTION_RESERVED                                                            = 0
	REG_OPTION_VOLATILE                                                            = 1
	REG_PROCESS_APPKEY                                                             = 0x00000001
	REG_PROCESS_PRIVATE                                                            = 32
	REG_QWORD                                                                      = 11
	REG_QWORD_LITTLE_ENDIAN                                                        = 11
	REG_REFRESH_HIVE                                                               = 2
	REG_RESOURCE_LIST                                                              = 8
	REG_RESOURCE_REQUIREMENTS_LIST                                                 = 10
	REG_SECURE_CONNECTION                                                          = 1
	REG_STANDARD_FORMAT                                                            = 1
	REG_START_JOURNAL                                                              = 64
	REG_SZ                                                                         = 1
	REG_WHOLE_HIVE_VOLATILE                                                        = 1
	RELATIVE                                                                       = 2
	REMOTE_NAME_INFO_LEVEL                                                         = 0x00000002
	REPLACEFILE_IGNORE_MERGE_ERRORS                                                = 0x2
	REPLACEFILE_WRITE_THROUGH                                                      = 0x1
	RESETDEV                                                                       = 7
	RESOURCEDISPLAYTYPE_DIRECTORY                                                  = 0x00000009
	RESOURCEDISPLAYTYPE_DOMAIN                                                     = 0x00000001
	RESOURCEDISPLAYTYPE_FILE                                                       = 0x00000004
	RESOURCEDISPLAYTYPE_GENERIC                                                    = 0x00000000
	RESOURCEDISPLAYTYPE_GROUP                                                      = 0x00000005
	RESOURCEDISPLAYTYPE_NDSCONTAINER                                               = 0x0000000b
	RESOURCEDISPLAYTYPE_NETWORK                                                    = 0x00000006
	RESOURCEDISPLAYTYPE_ROOT                                                       = 0x00000007
	RESOURCEDISPLAYTYPE_SERVER                                                     = 0x00000002
	RESOURCEDISPLAYTYPE_SHARE                                                      = 0x00000003
	RESOURCEDISPLAYTYPE_SHAREADMIN                                                 = 0x00000008
	RESOURCEDISPLAYTYPE_TREE                                                       = 0x0000000a
	RESOURCEMANAGER_ALL_ACCESS                                                     = 2031743
	RESOURCEMANAGER_COMPLETE_PROPAGATION                                           = 64
	RESOURCEMANAGER_ENLIST                                                         = 8
	RESOURCEMANAGER_GENERIC_EXECUTE                                                = 1179740
	RESOURCEMANAGER_GENERIC_READ                                                   = 1179649
	RESOURCEMANAGER_GENERIC_WRITE                                                  = 1179774
	RESOURCEMANAGER_GET_NOTIFICATION                                               = 16
	RESOURCEMANAGER_QUERY_INFORMATION                                              = 1
	RESOURCEMANAGER_RECOVER                                                        = 4
	RESOURCEMANAGER_REGISTER_PROTOCOL                                              = 32
	RESOURCEMANAGER_SET_INFORMATION                                                = 2
	RESOURCETYPE_ANY                                                               = 0x00000000
	RESOURCETYPE_DISK                                                              = 0x00000001
	RESOURCETYPE_PRINT                                                             = 0x00000002
	RESOURCETYPE_RESERVED                                                          = 0x00000008
	RESOURCETYPE_UNKNOWN                                                           = 0xFFFFFFFF
	RESOURCEUSAGE_ALL                                                              = 19
	RESOURCEUSAGE_ATTACHED                                                         = 0x00000010
	RESOURCEUSAGE_CONNECTABLE                                                      = 0x00000001
	RESOURCEUSAGE_CONTAINER                                                        = 0x00000002
	RESOURCEUSAGE_NOLOCALDEVICE                                                    = 0x00000004
	RESOURCEUSAGE_RESERVED                                                         = 0x80000000
	RESOURCEUSAGE_SIBLING                                                          = 0x00000008
	RESOURCE_CONNECTED                                                             = 0x00000001
	RESOURCE_CONTEXT                                                               = 0x00000005
	RESOURCE_ENUM_LN                                                               = 1
	RESOURCE_ENUM_MODULE_EXACT                                                     = 16
	RESOURCE_ENUM_MUI                                                              = 2
	RESOURCE_ENUM_MUI_SYSTEM                                                       = 4
	RESOURCE_ENUM_VALIDATE                                                         = 8
	RESOURCE_GLOBALNET                                                             = 0x00000002
	RESOURCE_MANAGER_COMMUNICATION                                                 = 0x00000002
	RESOURCE_MANAGER_MAXIMUM_OPTION                                                = 0x00000003
	RESOURCE_MANAGER_VOLATILE                                                      = 0x00000001
	RESOURCE_RECENT                                                                = 0x00000004
	RESOURCE_REMEMBERED                                                            = 0x00000003
	RESTART_MAX_CMD_LINE                                                           = 1024
	RESTART_NO_CRASH                                                               = 1
	RESTART_NO_HANG                                                                = 2
	RESTART_NO_PATCH                                                               = 4
	RESTART_NO_REBOOT                                                              = 8
	RESTORE_CTM                                                                    = 4100
	RESTRICTED_POINTER                                                             = 0
	RESULT_IS_ADDED                                                                = 0x0010
	RESULT_IS_ALIAS                                                                = 0x0001
	RESULT_IS_CHANGED                                                              = 0x0020
	RESULT_IS_DELETED                                                              = 0x0040
	RES_CURSOR                                                                     = 2
	RES_FLUSH_CACHE                                                                = 2
	RES_ICON                                                                       = 1
	RES_SERVICE                                                                    = 4
	RES_UNUSED_1                                                                   = 1
	RGN_AND                                                                        = 1
	RGN_COPY                                                                       = 5
	RGN_DIFF                                                                       = 4
	RGN_ERROR                                                                      = 0
	RGN_MAX                                                                        = 5
	RGN_MIN                                                                        = 1
	RGN_OR                                                                         = 2
	RGN_XOR                                                                        = 3
	RIDEV_APPKEYS                                                                  = 0x00000400
	RIDEV_CAPTUREMOUSE                                                             = 0x00000200
	RIDEV_DEVNOTIFY                                                                = 0x00002000
	RIDEV_EXCLUDE                                                                  = 0x00000010
	RIDEV_EXINPUTSINK                                                              = 0x00001000
	RIDEV_EXMODEMASK                                                               = 0x000000F0
	RIDEV_INPUTSINK                                                                = 0x00000100
	RIDEV_NOHOTKEYS                                                                = 0x00000200
	RIDEV_NOLEGACY                                                                 = 0x00000030
	RIDEV_PAGEONLY                                                                 = 0x00000020
	RIDEV_REMOVE                                                                   = 0x00000001
	RIDI_DEVICEINFO                                                                = 0x2000000b
	RIDI_DEVICENAME                                                                = 0x20000007
	RIDI_PREPARSEDDATA                                                             = 0x20000005
	RID_HEADER                                                                     = 0x10000005
	RID_INPUT                                                                      = 0x10000003
	RIGHTMOST_BUTTON_PRESSED                                                       = 0x2
	RIGHT_ALT_PRESSED                                                              = 0x1
	RIGHT_CTRL_PRESSED                                                             = 0x4
	RIM_INPUT                                                                      = 0
	RIM_INPUTSINK                                                                  = 1
	RIM_TYPEHID                                                                    = 2
	RIM_TYPEKEYBOARD                                                               = 1
	RIM_TYPEMAX                                                                    = 2
	RIM_TYPEMOUSE                                                                  = 0
	RIP_EVENT                                                                      = 9
	RI_KEY_BREAK                                                                   = 1
	RI_KEY_E0                                                                      = 2
	RI_KEY_E1                                                                      = 4
	RI_KEY_MAKE                                                                    = 0
	RI_KEY_TERMSRV_SET_LED                                                         = 8
	RI_KEY_TERMSRV_SHADOW                                                          = 0x10
	RI_MOUSE_BUTTON_1_DOWN                                                         = 1
	RI_MOUSE_BUTTON_1_UP                                                           = 2
	RI_MOUSE_BUTTON_2_DOWN                                                         = 4
	RI_MOUSE_BUTTON_2_UP                                                           = 8
	RI_MOUSE_BUTTON_3_DOWN                                                         = 16
	RI_MOUSE_BUTTON_3_UP                                                           = 32
	RI_MOUSE_BUTTON_4_DOWN                                                         = 0x0040
	RI_MOUSE_BUTTON_4_UP                                                           = 0x0080
	RI_MOUSE_BUTTON_5_DOWN                                                         = 0x0100
	RI_MOUSE_BUTTON_5_UP                                                           = 0x0200
	RI_MOUSE_LEFT_BUTTON_DOWN                                                      = 0x0001
	RI_MOUSE_LEFT_BUTTON_UP                                                        = 0x0002
	RI_MOUSE_MIDDLE_BUTTON_DOWN                                                    = 0x0010
	RI_MOUSE_MIDDLE_BUTTON_UP                                                      = 0x0020
	RI_MOUSE_RIGHT_BUTTON_DOWN                                                     = 0x0004
	RI_MOUSE_RIGHT_BUTTON_UP                                                       = 0x0008
	RI_MOUSE_WHEEL                                                                 = 0x0400
	RPC_S_ADDRESS_ERROR                                                            = 1768
	RPC_S_ALREADY_LISTENING                                                        = 1713
	RPC_S_ALREADY_REGISTERED                                                       = 1711
	RPC_S_BINDING_HAS_NO_AUTH                                                      = 1746
	RPC_S_BINDING_INCOMPLETE                                                       = 1819
	RPC_S_CALL_CANCELLED                                                           = 1818
	RPC_S_CALL_FAILED                                                              = 1726
	RPC_S_CALL_FAILED_DNE                                                          = 1727
	RPC_S_CALL_IN_PROGRESS                                                         = 1791
	RPC_S_CANNOT_SUPPORT                                                           = 1764
	RPC_S_CANT_CREATE_ENDPOINT                                                     = 1720
	RPC_S_COMM_FAILURE                                                             = 1820
	RPC_S_DUPLICATE_ENDPOINT                                                       = 1740
	RPC_S_ENTRY_ALREADY_EXISTS                                                     = 1760
	RPC_S_ENTRY_NOT_FOUND                                                          = 1761
	RPC_S_ENTRY_TYPE_MISMATCH                                                      = 1922
	RPC_S_FP_DIV_ZERO                                                              = 1769
	RPC_S_FP_OVERFLOW                                                              = 1771
	RPC_S_FP_UNDERFLOW                                                             = 1770
	RPC_S_GROUP_MEMBER_NOT_FOUND                                                   = 1898
	RPC_S_GRP_ELT_NOT_ADDED                                                        = 1928
	RPC_S_GRP_ELT_NOT_REMOVED                                                      = 1929
	RPC_S_INCOMPLETE_NAME                                                          = 1755
	RPC_S_INTERFACE_NOT_EXPORTED                                                   = 1924
	RPC_S_INTERFACE_NOT_FOUND                                                      = 1759
	RPC_S_INTERNAL_ERROR                                                           = 1766
	RPC_S_INVALID_ASYNC_CALL                                                       = 1915
	RPC_S_INVALID_ASYNC_HANDLE                                                     = 1914
	RPC_S_INVALID_AUTH_IDENTITY                                                    = 1749
	RPC_S_INVALID_BINDING                                                          = 1702
	RPC_S_INVALID_BOUND                                                            = 1734
	RPC_S_INVALID_ENDPOINT_FORMAT                                                  = 1706
	RPC_S_INVALID_NAF_ID                                                           = 1763
	RPC_S_INVALID_NAME_SYNTAX                                                      = 1736
	RPC_S_INVALID_NETWORK_OPTIONS                                                  = 1724
	RPC_S_INVALID_NET_ADDR                                                         = 1707
	RPC_S_INVALID_OBJECT                                                           = 1900
	RPC_S_INVALID_RPC_PROTSEQ                                                      = 1704
	RPC_S_INVALID_STRING_BINDING                                                   = 1700
	RPC_S_INVALID_STRING_UUID                                                      = 1705
	RPC_S_INVALID_TAG                                                              = 1733
	RPC_S_INVALID_TIMEOUT                                                          = 1709
	RPC_S_INVALID_VERS_OPTION                                                      = 1756
	RPC_S_MAX_CALLS_TOO_SMALL                                                      = 1742
	RPC_S_NAME_SERVICE_UNAVAILABLE                                                 = 1762
	RPC_S_NOTHING_TO_EXPORT                                                        = 1754
	RPC_S_NOT_ALL_OBJS_EXPORTED                                                    = 1923
	RPC_S_NOT_ALL_OBJS_UNEXPORTED                                                  = 1758
	RPC_S_NOT_CANCELLED                                                            = 1826
	RPC_S_NOT_LISTENING                                                            = 1715
	RPC_S_NOT_RPC_ERROR                                                            = 1823
	RPC_S_NO_BINDINGS                                                              = 1718
	RPC_S_NO_CALL_ACTIVE                                                           = 1725
	RPC_S_NO_CONTEXT_AVAILABLE                                                     = 1765
	RPC_S_NO_ENDPOINT_FOUND                                                        = 1708
	RPC_S_NO_ENTRY_NAME                                                            = 1735
	RPC_S_NO_INTERFACES                                                            = 1817
	RPC_S_NO_MORE_BINDINGS                                                         = 1806
	RPC_S_NO_MORE_MEMBERS                                                          = 1757
	RPC_S_NO_PRINC_NAME                                                            = 1822
	RPC_S_NO_PROTSEQS                                                              = 1719
	RPC_S_NO_PROTSEQS_REGISTERED                                                   = 1714
	RPC_S_OBJECT_NOT_FOUND                                                         = 1710
	RPC_S_OUT_OF_RESOURCES                                                         = 1721
	RPC_S_PRF_ELT_NOT_ADDED                                                        = 1926
	RPC_S_PRF_ELT_NOT_REMOVED                                                      = 1927
	RPC_S_PROCNUM_OUT_OF_RANGE                                                     = 1745
	RPC_S_PROFILE_NOT_ADDED                                                        = 1925
	RPC_S_PROTOCOL_ERROR                                                           = 1728
	RPC_S_PROTSEQ_NOT_FOUND                                                        = 1744
	RPC_S_PROTSEQ_NOT_SUPPORTED                                                    = 1703
	RPC_S_SEC_PKG_ERROR                                                            = 1825
	RPC_S_SEND_INCOMPLETE                                                          = 1913
	RPC_S_SERVER_TOO_BUSY                                                          = 1723
	RPC_S_SERVER_UNAVAILABLE                                                       = 1722
	RPC_S_STRING_TOO_LONG                                                          = 1743
	RPC_S_TYPE_ALREADY_REGISTERED                                                  = 1712
	RPC_S_UNKNOWN_AUTHN_LEVEL                                                      = 1748
	RPC_S_UNKNOWN_AUTHN_SERVICE                                                    = 1747
	RPC_S_UNKNOWN_AUTHN_TYPE                                                       = 1741
	RPC_S_UNKNOWN_AUTHZ_SERVICE                                                    = 1750
	RPC_S_UNKNOWN_IF                                                               = 1717
	RPC_S_UNKNOWN_MGR_TYPE                                                         = 1716
	RPC_S_UNSUPPORTED_AUTHN_LEVEL                                                  = 1821
	RPC_S_UNSUPPORTED_NAME_SYNTAX                                                  = 1737
	RPC_S_UNSUPPORTED_TRANS_SYN                                                    = 1730
	RPC_S_UNSUPPORTED_TYPE                                                         = 1732
	RPC_S_UUID_LOCAL_ONLY                                                          = 1824
	RPC_S_UUID_NO_ADDRESS                                                          = 1739
	RPC_S_WRONG_KIND_OF_BINDING                                                    = 1701
	RPC_S_ZERO_DIVIDE                                                              = 1767
	RPC_X_BAD_STUB_DATA                                                            = 1783
	RPC_X_BYTE_COUNT_TOO_SMALL                                                     = 1782
	RPC_X_ENUM_VALUE_OUT_OF_RANGE                                                  = 1781
	RPC_X_INVALID_ES_ACTION                                                        = 1827
	RPC_X_INVALID_PIPE_OBJECT                                                      = 1830
	RPC_X_NO_MORE_ENTRIES                                                          = 1772
	RPC_X_NULL_REF_POINTER                                                         = 1780
	RPC_X_PIPE_CLOSED                                                              = 1916
	RPC_X_PIPE_DISCIPLINE_ERROR                                                    = 1917
	RPC_X_PIPE_EMPTY                                                               = 1918
	RPC_X_SS_CANNOT_GET_CALL_HANDLE                                                = 1779
	RPC_X_SS_CHAR_TRANS_OPEN_FAIL                                                  = 1773
	RPC_X_SS_CHAR_TRANS_SHORT_FILE                                                 = 1774
	RPC_X_SS_CONTEXT_DAMAGED                                                       = 1777
	RPC_X_SS_HANDLES_MISMATCH                                                      = 1778
	RPC_X_SS_IN_NULL_CONTEXT                                                       = 1775
	RPC_X_WRONG_ES_VERSION                                                         = 1828
	RPC_X_WRONG_PIPE_ORDER                                                         = 1831
	RPC_X_WRONG_PIPE_VERSION                                                       = 1832
	RPC_X_WRONG_STUB_VERSION                                                       = 1829
	RP_INIFILE                                                                     = 0x02
	RP_LOGON                                                                       = 0x01
	RRF_NOEXPAND                                                                   = 0x10000000
	RRF_RT_ANY                                                                     = 0x0000ffff
	RRF_RT_DWORD                                                                   = 24
	RRF_RT_QWORD                                                                   = 72
	RRF_RT_REG_BINARY                                                              = 0x00000008
	RRF_RT_REG_DWORD                                                               = 0x00000010
	RRF_RT_REG_EXPAND_SZ                                                           = 0x00000004
	RRF_RT_REG_MULTI_SZ                                                            = 0x00000020
	RRF_RT_REG_NONE                                                                = 0x00000001
	RRF_RT_REG_QWORD                                                               = 0x00000040
	RRF_RT_REG_SZ                                                                  = 0x00000002
	RRF_ZEROONFAILURE                                                              = 0x20000000
	RTL_CONDITION_VARIABLE_LOCKMODE_SHARED                                         = 0x1
	RTL_CRITICAL_SECTION_ALL_FLAG_BITS                                             = 0xff000000
	RTL_CRITICAL_SECTION_DEBUG_FLAG_STATIC_INIT                                    = 0x00000001
	RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN                                         = 0x02000000
	RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO                                     = 0x10000000
	RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO                                        = 0x01000000
	RTL_CRITICAL_SECTION_FLAG_RESERVED                                             = 3758096384
	RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE                                        = 0x08000000
	RTL_CRITICAL_SECTION_FLAG_STATIC_INIT                                          = 0x04000000
	RTL_CRITSECT_TYPE                                                              = 0
	RTL_RESOURCE_TYPE                                                              = 1
	RTL_RUN_ONCE_ASYNC                                                             = 2
	RTL_RUN_ONCE_CHECK_ONLY                                                        = 1
	RTL_RUN_ONCE_CTX_RESERVED_BITS                                                 = 2
	RTL_RUN_ONCE_INIT_FAILED                                                       = 4
	RTL_UMS_VERSION                                                                = 256
	RTL_VRF_FLG_APPCOMPAT_CHECKS                                                   = 0x00000010
	RTL_VRF_FLG_COM_CHECKS                                                         = 0x00000100
	RTL_VRF_FLG_DANGEROUS_APIS                                                     = 0x00000200
	RTL_VRF_FLG_DEADLOCK_CHECKS                                                    = 0x00000800
	RTL_VRF_FLG_DIRTY_STACKS                                                       = 0x00000040
	RTL_VRF_FLG_ENABLED_SYSTEM_WIDE                                                = 0x00020000
	RTL_VRF_FLG_ENABLE_LOGGING                                                     = 0x00004000
	RTL_VRF_FLG_FAST_FILL_HEAP                                                     = 0x00008000
	RTL_VRF_FLG_FIRST_CHANCE_EXCEPTION_CHECKS                                      = 0x00001000
	RTL_VRF_FLG_FULL_PAGE_HEAP                                                     = 0x00000001
	RTL_VRF_FLG_HANDLE_CHECKS                                                      = 0x00000004
	RTL_VRF_FLG_LOCK_CHECKS                                                        = 0x00040000
	RTL_VRF_FLG_MISCELLANEOUS_CHECKS                                               = 0x00020000
	RTL_VRF_FLG_RACE_CHECKS                                                        = 0x00000400
	RTL_VRF_FLG_RESERVED_DONOTUSE                                                  = 0x00000002
	RTL_VRF_FLG_RPC_CHECKS                                                         = 0x00000080
	RTL_VRF_FLG_STACK_CHECKS                                                       = 0x00000008
	RTL_VRF_FLG_TLS_CHECKS                                                         = 0x00000020
	RTL_VRF_FLG_VIRTUAL_MEM_CHECKS                                                 = 0x00002000
	RTL_VRF_FLG_VIRTUAL_SPACE_TRACKING                                             = 0x00010000
	RTS_CONTROL_DISABLE                                                            = 0x0
	RTS_CONTROL_ENABLE                                                             = 0x1
	RTS_CONTROL_HANDSHAKE                                                          = 0x2
	RTS_CONTROL_TOGGLE                                                             = 0x3
	RUNTIME_FUNCTION_INDIRECT                                                      = 0x1
	RUSSIAN_CHARSET                                                                = 204
	SACL_SECURITY_INFORMATION                                                      = 8
	SAFE_INTERP                                                                    = 0x80
	SAL_HXX                                                                        = 0
	SAL__callback                                                                  = 0
	SAL__checkReturn                                                               = 0
	SAL__deref                                                                     = 0
	SAL__deref_in                                                                  = 0
	SAL__deref_in_opt                                                              = 0
	SAL__deref_inout                                                               = 0
	SAL__deref_inout_nz                                                            = 0
	SAL__deref_inout_nz_opt                                                        = 0
	SAL__deref_inout_opt                                                           = 0
	SAL__deref_inout_z                                                             = 0
	SAL__deref_inout_z_opt                                                         = 0
	SAL__deref_opt_in                                                              = 0
	SAL__deref_opt_in_opt                                                          = 0
	SAL__deref_opt_inout                                                           = 0
	SAL__deref_opt_inout_nz                                                        = 0
	SAL__deref_opt_inout_nz_opt                                                    = 0
	SAL__deref_opt_inout_opt                                                       = 0
	SAL__deref_opt_inout_z                                                         = 0
	SAL__deref_opt_inout_z_opt                                                     = 0
	SAL__deref_opt_out                                                             = 0
	SAL__deref_opt_out_nz_opt                                                      = 0
	SAL__deref_opt_out_opt                                                         = 0
	SAL__deref_opt_out_z                                                           = 0
	SAL__deref_opt_out_z_opt                                                       = 0
	SAL__deref_out                                                                 = 0
	SAL__deref_out_nz                                                              = 0
	SAL__deref_out_nz_opt                                                          = 0
	SAL__deref_out_opt                                                             = 0
	SAL__deref_out_z                                                               = 0
	SAL__deref_out_z_opt                                                           = 0
	SAL__exceptthat                                                                = 0
	SAL__execeptthat                                                               = 0
	SAL__format_string                                                             = 0
	SAL__in                                                                        = 0
	SAL__in_nz                                                                     = 0
	SAL__in_nz_opt                                                                 = 0
	SAL__in_opt                                                                    = 0
	SAL__in_z                                                                      = 0
	SAL__in_z_opt                                                                  = 0
	SAL__inner_callback                                                            = 0
	SAL__inner_checkReturn                                                         = 0
	SAL__inner_fallthrough                                                         = 0
	SAL__inner_fallthrough_dec                                                     = 0
	SAL__inner_override                                                            = 0
	SAL__inout                                                                     = 0
	SAL__inout_nz                                                                  = 0
	SAL__inout_nz_opt                                                              = 0
	SAL__inout_opt                                                                 = 0
	SAL__inout_z                                                                   = 0
	SAL__inout_z_opt                                                               = 0
	SAL__maybenull                                                                 = 0
	SAL__maybereadonly                                                             = 0
	SAL__maybevalid                                                                = 0
	SAL__notnull                                                                   = 0
	SAL__notreadonly                                                               = 0
	SAL__notvalid                                                                  = 0
	SAL__null                                                                      = 0
	SAL__nullnullterminated                                                        = 0
	SAL__nullterminated                                                            = 0
	SAL__out                                                                       = 0
	SAL__out_nz                                                                    = 0
	SAL__out_nz_opt                                                                = 0
	SAL__out_opt                                                                   = 0
	SAL__out_z                                                                     = 0
	SAL__out_z_opt                                                                 = 0
	SAL__override                                                                  = 0
	SAL__post                                                                      = 0
	SAL__pre                                                                       = 0
	SAL__readonly                                                                  = 0
	SAL__reserved                                                                  = 0
	SAL__valid                                                                     = 0
	SANDBOX_INERT                                                                  = 0x2
	SAVE_CTM                                                                       = 4101
	SBM_ENABLE_ARROWS                                                              = 0x00E4
	SBM_GETPOS                                                                     = 0x00E1
	SBM_GETRANGE                                                                   = 0x00E3
	SBM_GETSCROLLBARINFO                                                           = 0x00EB
	SBM_GETSCROLLINFO                                                              = 0x00EA
	SBM_SETPOS                                                                     = 0x00E0
	SBM_SETRANGE                                                                   = 0x00E2
	SBM_SETRANGEREDRAW                                                             = 0x00E6
	SBM_SETSCROLLINFO                                                              = 0x00E9
	SBS_BOTTOMALIGN                                                                = 4
	SBS_HORZ                                                                       = 0
	SBS_LEFTALIGN                                                                  = 2
	SBS_RIGHTALIGN                                                                 = 4
	SBS_SIZEBOX                                                                    = 8
	SBS_SIZEBOXBOTTOMRIGHTALIGN                                                    = 4
	SBS_SIZEBOXTOPLEFTALIGN                                                        = 2
	SBS_SIZEGRIP                                                                   = 16
	SBS_TOPALIGN                                                                   = 2
	SBS_VERT                                                                       = 1
	SB_BOTH                                                                        = 3
	SB_BOTTOM                                                                      = 7
	SB_CONST_ALPHA                                                                 = 0x00000001
	SB_CTL                                                                         = 2
	SB_ENDSCROLL                                                                   = 8
	SB_GRAD_RECT                                                                   = 0x00000010
	SB_GRAD_TRI                                                                    = 0x00000020
	SB_HORZ                                                                        = 0
	SB_LEFT                                                                        = 6
	SB_LINEDOWN                                                                    = 1
	SB_LINELEFT                                                                    = 0
	SB_LINERIGHT                                                                   = 1
	SB_LINEUP                                                                      = 0
	SB_NONE                                                                        = 0x00000000
	SB_PAGEDOWN                                                                    = 3
	SB_PAGELEFT                                                                    = 2
	SB_PAGERIGHT                                                                   = 3
	SB_PAGEUP                                                                      = 2
	SB_PIXEL_ALPHA                                                                 = 0x00000002
	SB_PREMULT_ALPHA                                                               = 0x00000004
	SB_RIGHT                                                                       = 7
	SB_THUMBPOSITION                                                               = 4
	SB_THUMBTRACK                                                                  = 5
	SB_TOP                                                                         = 6
	SB_VERT                                                                        = 1
	SCALINGFACTORX                                                                 = 114
	SCALINGFACTORY                                                                 = 115
	SCARD_S_SUCCESS                                                                = 0
	SCHED_E_SERVICE_NOT_LOCALSYSTEM                                                = 6200
	SCNd16                                                                         = "hd"
	SCNd32                                                                         = "d"
	SCNd8                                                                          = "hhd"
	SCNdFAST16                                                                     = "hd"
	SCNdFAST32                                                                     = "d"
	SCNdFAST8                                                                      = "hhd"
	SCNdLEAST16                                                                    = "hd"
	SCNdLEAST32                                                                    = "d"
	SCNdLEAST8                                                                     = "hhd"
	SCNi16                                                                         = "hi"
	SCNi32                                                                         = "i"
	SCNi8                                                                          = "hhi"
	SCNiFAST16                                                                     = "hi"
	SCNiFAST32                                                                     = "i"
	SCNiFAST8                                                                      = "hhi"
	SCNiLEAST16                                                                    = "hi"
	SCNiLEAST32                                                                    = "i"
	SCNiLEAST8                                                                     = "hhi"
	SCNo16                                                                         = "ho"
	SCNo32                                                                         = "o"
	SCNo8                                                                          = "hho"
	SCNoFAST16                                                                     = "ho"
	SCNoFAST32                                                                     = "o"
	SCNoFAST8                                                                      = "hho"
	SCNoLEAST16                                                                    = "ho"
	SCNoLEAST32                                                                    = "o"
	SCNoLEAST8                                                                     = "hho"
	SCNu16                                                                         = "hu"
	SCNu32                                                                         = "u"
	SCNu8                                                                          = "hhu"
	SCNuFAST16                                                                     = "hu"
	SCNuFAST32                                                                     = "u"
	SCNuFAST8                                                                      = "hhu"
	SCNuLEAST16                                                                    = "hu"
	SCNuLEAST32                                                                    = "u"
	SCNuLEAST8                                                                     = "hhu"
	SCNx16                                                                         = "hx"
	SCNx32                                                                         = "x"
	SCNx8                                                                          = "hhx"
	SCNxFAST16                                                                     = "hx"
	SCNxFAST32                                                                     = "x"
	SCNxFAST8                                                                      = "hhx"
	SCNxLEAST16                                                                    = "hx"
	SCNxLEAST32                                                                    = "x"
	SCNxLEAST8                                                                     = "hhx"
	SCOPE_SECURITY_INFORMATION                                                     = 64
	SCROLLLOCK_ON                                                                  = 0x40
	SCS_32BIT_BINARY                                                               = 0
	SCS_64BIT_BINARY                                                               = 6
	SCS_CAP_COMPSTR                                                                = 0x00000001
	SCS_CAP_MAKEREAD                                                               = 0x00000002
	SCS_CAP_SETRECONVERTSTRING                                                     = 0x00000004
	SCS_CHANGEATTR                                                                 = 18
	SCS_CHANGECLAUSE                                                               = 36
	SCS_DOS_BINARY                                                                 = 1
	SCS_OS216_BINARY                                                               = 5
	SCS_PIF_BINARY                                                                 = 3
	SCS_POSIX_BINARY                                                               = 4
	SCS_QUERYRECONVERTSTRING                                                       = 0x00020000
	SCS_SETRECONVERTSTRING                                                         = 0x00010000
	SCS_SETSTR                                                                     = 9
	SCS_THIS_PLATFORM_BINARY                                                       = 6
	SCS_WOW_BINARY                                                                 = 2
	SC_ARRANGE                                                                     = 0xF110
	SC_CLOSE                                                                       = 0xF060
	SC_CONTEXTHELP                                                                 = 0xF180
	SC_DEFAULT                                                                     = 0xF160
	SC_GROUP_IDENTIFIER                                                            = 43
	SC_GROUP_IDENTIFIERA                                                           = 43
	SC_GROUP_IDENTIFIERW                                                           = 43
	SC_HOTKEY                                                                      = 0xF150
	SC_HSCROLL                                                                     = 0xF080
	SC_ICON                                                                        = 61472
	SC_KEYMENU                                                                     = 0xF100
	SC_MANAGER_ALL_ACCESS                                                          = 983103
	SC_MANAGER_CONNECT                                                             = 0x0001
	SC_MANAGER_CREATE_SERVICE                                                      = 0x0002
	SC_MANAGER_ENUMERATE_SERVICE                                                   = 0x0004
	SC_MANAGER_LOCK                                                                = 0x0008
	SC_MANAGER_MODIFY_BOOT_CONFIG                                                  = 0x0020
	SC_MANAGER_QUERY_LOCK_STATUS                                                   = 0x0010
	SC_MAXIMIZE                                                                    = 0xF030
	SC_MINIMIZE                                                                    = 0xF020
	SC_MONITORPOWER                                                                = 0xF170
	SC_MOUSEMENU                                                                   = 0xF090
	SC_MOVE                                                                        = 0xF010
	SC_NEXTWINDOW                                                                  = 0xF040
	SC_PREVWINDOW                                                                  = 0xF050
	SC_RESTORE                                                                     = 0xF120
	SC_SCREENSAVE                                                                  = 0xF140
	SC_SEPARATOR                                                                   = 0xF00F
	SC_SIZE                                                                        = 0xF000
	SC_TASKLIST                                                                    = 0xF130
	SC_VSCROLL                                                                     = 0xF070
	SC_ZOOM                                                                        = 61488
	SD_BOTH                                                                        = 0x02
	SD_RECEIVE                                                                     = 0x00
	SD_SEND                                                                        = 0x01
	SECTION_ALL_ACCESS                                                             = 983071
	SECTION_EXTEND_SIZE                                                            = 0x0010
	SECTION_MAP_EXECUTE                                                            = 0x0008
	SECTION_MAP_EXECUTE_EXPLICIT                                                   = 0x0020
	SECTION_MAP_READ                                                               = 0x0004
	SECTION_MAP_WRITE                                                              = 0x0002
	SECTION_QUERY                                                                  = 0x0001
	SECURITY_ANONYMOUS_LOGON_RID                                                   = 7
	SECURITY_APPPOOL_ID_BASE_RID                                                   = 82
	SECURITY_APPPOOL_ID_RID_COUNT                                                  = 6
	SECURITY_APP_PACKAGE_BASE_RID                                                  = 2
	SECURITY_APP_PACKAGE_RID_COUNT                                                 = 8
	SECURITY_AUTHENTICATED_USER_RID                                                = 11
	SECURITY_AUTHENTICATION_AUTHORITY_ASSERTED_RID                                 = 1
	SECURITY_AUTHENTICATION_AUTHORITY_RID_COUNT                                    = 1
	SECURITY_AUTHENTICATION_SERVICE_ASSERTED_RID                                   = 2
	SECURITY_BATCH_RID                                                             = 3
	SECURITY_BUILTIN_APP_PACKAGE_RID_COUNT                                         = 2
	SECURITY_BUILTIN_CAPABILITY_RID_COUNT                                          = 2
	SECURITY_BUILTIN_DOMAIN_RID                                                    = 32
	SECURITY_BUILTIN_PACKAGE_ANY_PACKAGE                                           = 1
	SECURITY_BUILTIN_PACKAGE_ANY_RESTRICTED_PACKAGE                                = 2
	SECURITY_CAPABILITY_APPOINTMENTS                                               = 11
	SECURITY_CAPABILITY_BASE_RID                                                   = 3
	SECURITY_CAPABILITY_CONTACTS                                                   = 12
	SECURITY_CAPABILITY_DOCUMENTS_LIBRARY                                          = 7
	SECURITY_CAPABILITY_ENTERPRISE_AUTHENTICATION                                  = 8
	SECURITY_CAPABILITY_INTERNET_CLIENT                                            = 1
	SECURITY_CAPABILITY_INTERNET_CLIENT_SERVER                                     = 2
	SECURITY_CAPABILITY_INTERNET_EXPLORER                                          = 4096
	SECURITY_CAPABILITY_MUSIC_LIBRARY                                              = 6
	SECURITY_CAPABILITY_PICTURES_LIBRARY                                           = 4
	SECURITY_CAPABILITY_PRIVATE_NETWORK_CLIENT_SERVER                              = 3
	SECURITY_CAPABILITY_REMOVABLE_STORAGE                                          = 10
	SECURITY_CAPABILITY_RID_COUNT                                                  = 5
	SECURITY_CAPABILITY_SHARED_USER_CERTIFICATES                                   = 9
	SECURITY_CAPABILITY_VIDEOS_LIBRARY                                             = 5
	SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_BASE_RID                             = 85
	SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_RID_COUNT                            = 6
	SECURITY_COM_ID_BASE_RID                                                       = 89
	SECURITY_CONTEXT_TRACKING                                                      = 0x40000
	SECURITY_CREATOR_GROUP_RID                                                     = 1
	SECURITY_CREATOR_GROUP_SERVER_RID                                              = 3
	SECURITY_CREATOR_OWNER_RID                                                     = 0
	SECURITY_CREATOR_OWNER_RIGHTS_RID                                              = 4
	SECURITY_CREATOR_OWNER_SERVER_RID                                              = 2
	SECURITY_CRED_TYPE_BASE_RID                                                    = 65
	SECURITY_CRED_TYPE_RID_COUNT                                                   = 2
	SECURITY_CRED_TYPE_THIS_ORG_CERT_RID                                           = 1
	SECURITY_DASHOST_ID_BASE_RID                                                   = 92
	SECURITY_DASHOST_ID_RID_COUNT                                                  = 6
	SECURITY_DESCRIPTOR_REVISION                                                   = 1
	SECURITY_DESCRIPTOR_REVISION1                                                  = 1
	SECURITY_DIALUP_RID                                                            = 1
	SECURITY_DYNAMIC_TRACKING                                                      = 1
	SECURITY_EFFECTIVE_ONLY                                                        = 0x80000
	SECURITY_ENTERPRISE_CONTROLLERS_RID                                            = 9
	SECURITY_ENTERPRISE_READONLY_CONTROLLERS_RID                                   = 22
	SECURITY_INTERACTIVE_RID                                                       = 4
	SECURITY_IUSER_RID                                                             = 17
	SECURITY_LOCAL_LOGON_RID                                                       = 1
	SECURITY_LOCAL_RID                                                             = 0
	SECURITY_LOCAL_SERVICE_RID                                                     = 19
	SECURITY_LOCAL_SYSTEM_RID                                                      = 18
	SECURITY_LOGON_IDS_RID                                                         = 5
	SECURITY_LOGON_IDS_RID_COUNT                                                   = 3
	SECURITY_MANDATORY_HIGH_RID                                                    = 12288
	SECURITY_MANDATORY_LOW_RID                                                     = 4096
	SECURITY_MANDATORY_MAXIMUM_USER_RID                                            = 16384
	SECURITY_MANDATORY_MEDIUM_RID                                                  = 8192
	SECURITY_MANDATORY_PROTECTED_PROCESS_RID                                       = 20480
	SECURITY_MANDATORY_SYSTEM_RID                                                  = 16384
	SECURITY_MANDATORY_UNTRUSTED_RID                                               = 0
	SECURITY_MAX_ALWAYS_FILTERED                                                   = 999
	SECURITY_MAX_BASE_RID                                                          = 111
	SECURITY_MIN_BASE_RID                                                          = 80
	SECURITY_MIN_NEVER_FILTERED                                                    = 1000
	SECURITY_NETWORK_RID                                                           = 2
	SECURITY_NETWORK_SERVICE_RID                                                   = 20
	SECURITY_NFS_ID_BASE_RID                                                       = 88
	SECURITY_NT_NON_UNIQUE                                                         = 21
	SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT                                          = 3
	SECURITY_NULL_RID                                                              = 0
	SECURITY_OTHER_ORGANIZATION_RID                                                = 1000
	SECURITY_PACKAGE_BASE_RID                                                      = 64
	SECURITY_PACKAGE_DIGEST_RID                                                    = 21
	SECURITY_PACKAGE_NTLM_RID                                                      = 10
	SECURITY_PACKAGE_RID_COUNT                                                     = 2
	SECURITY_PACKAGE_SCHANNEL_RID                                                  = 14
	SECURITY_PRINCIPAL_SELF_RID                                                    = 10
	SECURITY_PROTOCOL_NONE                                                         = 0x0000
	SECURITY_PROXY_RID                                                             = 8
	SECURITY_RDV_GFX_BASE_RID                                                      = 91
	SECURITY_REMOTE_LOGON_RID                                                      = 14
	SECURITY_RESERVED_ID_BASE_RID                                                  = 81
	SECURITY_RESTRICTED_CODE_RID                                                   = 12
	SECURITY_SERVER_LOGON_RID                                                      = 9
	SECURITY_SERVICE_ID_BASE_RID                                                   = 80
	SECURITY_SERVICE_ID_RID_COUNT                                                  = 6
	SECURITY_SERVICE_RID                                                           = 6
	SECURITY_SQOS_PRESENT                                                          = 0x100000
	SECURITY_STATIC_TRACKING                                                       = 0
	SECURITY_TASK_ID_BASE_RID                                                      = 87
	SECURITY_TERMINAL_SERVER_RID                                                   = 13
	SECURITY_THIS_ORGANIZATION_RID                                                 = 15
	SECURITY_TRUSTED_INSTALLER_RID1                                                = 956008885
	SECURITY_TRUSTED_INSTALLER_RID2                                                = 3418522649
	SECURITY_TRUSTED_INSTALLER_RID3                                                = 1831038044
	SECURITY_TRUSTED_INSTALLER_RID4                                                = 1853292631
	SECURITY_TRUSTED_INSTALLER_RID5                                                = 2271478464
	SECURITY_USERMODEDRIVERHOST_ID_BASE_RID                                        = 84
	SECURITY_USERMODEDRIVERHOST_ID_RID_COUNT                                       = 6
	SECURITY_VALID_SQOS_FLAGS                                                      = 0x1f0000
	SECURITY_VIRTUALACCOUNT_ID_RID_COUNT                                           = 6
	SECURITY_VIRTUALSERVER_ID_BASE_RID                                             = 83
	SECURITY_VIRTUALSERVER_ID_RID_COUNT                                            = 6
	SECURITY_WINDOWSMOBILE_ID_BASE_RID                                             = 112
	SECURITY_WINDOW_MANAGER_BASE_RID                                               = 90
	SECURITY_WMIHOST_ID_BASE_RID                                                   = 86
	SECURITY_WMIHOST_ID_RID_COUNT                                                  = 6
	SECURITY_WORLD_RID                                                             = 0
	SECURITY_WRITE_RESTRICTED_CODE_RID                                             = 33
	SEC_64K_PAGES                                                                  = 0x80000
	SEC_COMMIT                                                                     = 0x8000000
	SEC_FILE                                                                       = 0x800000
	SEC_IMAGE                                                                      = 0x1000000
	SEC_IMAGE_NO_EXECUTE                                                           = 285212672
	SEC_LARGE_PAGES                                                                = 0x80000000
	SEC_NOCACHE                                                                    = 0x10000000
	SEC_PARTITION_OWNER_HANDLE                                                     = 0x40000
	SEC_PROTECTED_IMAGE                                                            = 0x2000000
	SEC_RESERVE                                                                    = 0x4000000
	SEC_WRITECOMBINE                                                               = 0x40000000
	SEF_AVOID_OWNER_CHECK                                                          = 0x10
	SEF_AVOID_OWNER_RESTRICTION                                                    = 0x1000
	SEF_AVOID_PRIVILEGE_CHECK                                                      = 0x08
	SEF_DACL_AUTO_INHERIT                                                          = 0x01
	SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT                                              = 0x04
	SEF_DEFAULT_GROUP_FROM_PARENT                                                  = 0x40
	SEF_DEFAULT_OWNER_FROM_PARENT                                                  = 0x20
	SEF_MACL_NO_EXECUTE_UP                                                         = 0x400
	SEF_MACL_NO_READ_UP                                                            = 0x200
	SEF_MACL_NO_WRITE_UP                                                           = 0x100
	SEF_MACL_VALID_FLAGS                                                           = 1792
	SEF_SACL_AUTO_INHERIT                                                          = 0x02
	SELECTPAPERSOURCE                                                              = 18
	SELECT_CAP_CONVERSION                                                          = 0x00000001
	SELECT_CAP_SENTENCE                                                            = 0x00000002
	SEMAPHORE_ALL_ACCESS                                                           = 2031619
	SEMAPHORE_MODIFY_STATE                                                         = 0x0002
	SEM_FAILCRITICALERRORS                                                         = 0x0001
	SEM_NOALIGNMENTFAULTEXCEPT                                                     = 0x0004
	SEM_NOGPFAULTERRORBOX                                                          = 0x0002
	SEM_NOOPENFILEERRORBOX                                                         = 0x8000
	SENTINEL_Reason                                                                = 0
	SERKF_AVAILABLE                                                                = 0x00000002
	SERKF_INDICATOR                                                                = 0x00000004
	SERKF_SERIALKEYSON                                                             = 0x00000001
	SERVICES_ACTIVE_DATABASEA                                                      = "ServicesActive"
	SERVICES_FAILED_DATABASEA                                                      = "ServicesFailed"
	SERVICETYPE_BESTEFFORT                                                         = 0x00000001
	SERVICETYPE_CONTROLLEDLOAD                                                     = 0x00000002
	SERVICETYPE_GENERAL_INFORMATION                                                = 0x00000005
	SERVICETYPE_GUARANTEED                                                         = 0x00000003
	SERVICETYPE_NETWORK_CONTROL                                                    = 0x0000000A
	SERVICETYPE_NETWORK_UNAVAILABLE                                                = 0x00000004
	SERVICETYPE_NOCHANGE                                                           = 0x00000006
	SERVICETYPE_NONCONFORMING                                                      = 0x00000009
	SERVICETYPE_NOTRAFFIC                                                          = 0x00000000
	SERVICETYPE_QUALITATIVE                                                        = 0x0000000D
	SERVICE_ACCEPT_HARDWAREPROFILECHANGE                                           = 0x00000020
	SERVICE_ACCEPT_NETBINDCHANGE                                                   = 0x00000010
	SERVICE_ACCEPT_PARAMCHANGE                                                     = 0x00000008
	SERVICE_ACCEPT_PAUSE_CONTINUE                                                  = 0x00000002
	SERVICE_ACCEPT_POWEREVENT                                                      = 0x00000040
	SERVICE_ACCEPT_SESSIONCHANGE                                                   = 0x00000080
	SERVICE_ACCEPT_SHUTDOWN                                                        = 0x00000004
	SERVICE_ACCEPT_STOP                                                            = 0x00000001
	SERVICE_ACTIVE                                                                 = 0x00000001
	SERVICE_ADAPTER                                                                = 0x00000004
	SERVICE_ALL_ACCESS                                                             = 983551
	SERVICE_AUTO_START                                                             = 0x00000002
	SERVICE_BESTEFFORT                                                             = 0x80010000
	SERVICE_BOOT_START                                                             = 0x00000000
	SERVICE_CHANGE_CONFIG                                                          = 0x0002
	SERVICE_CONFIG_DESCRIPTION                                                     = 1
	SERVICE_CONFIG_FAILURE_ACTIONS                                                 = 2
	SERVICE_CONTINUE_PENDING                                                       = 0x00000005
	SERVICE_CONTROLLEDLOAD                                                         = 0x80020000
	SERVICE_CONTROL_CONTINUE                                                       = 0x00000003
	SERVICE_CONTROL_DEVICEEVENT                                                    = 0x0000000B
	SERVICE_CONTROL_HARDWAREPROFILECHANGE                                          = 0x0000000C
	SERVICE_CONTROL_INTERROGATE                                                    = 0x00000004
	SERVICE_CONTROL_NETBINDADD                                                     = 0x00000007
	SERVICE_CONTROL_NETBINDDISABLE                                                 = 0x0000000A
	SERVICE_CONTROL_NETBINDENABLE                                                  = 0x00000009
	SERVICE_CONTROL_NETBINDREMOVE                                                  = 0x00000008
	SERVICE_CONTROL_PARAMCHANGE                                                    = 0x00000006
	SERVICE_CONTROL_PAUSE                                                          = 0x00000002
	SERVICE_CONTROL_POWEREVENT                                                     = 0x0000000D
	SERVICE_CONTROL_SESSIONCHANGE                                                  = 0x0000000E
	SERVICE_CONTROL_SHUTDOWN                                                       = 0x00000005
	SERVICE_CONTROL_STOP                                                           = 0x00000001
	SERVICE_DEMAND_START                                                           = 0x00000003
	SERVICE_DISABLED                                                               = 0x00000004
	SERVICE_DRIVER                                                                 = 11
	SERVICE_ENUMERATE_DEPENDENTS                                                   = 0x0008
	SERVICE_ERROR_CRITICAL                                                         = 0x00000003
	SERVICE_ERROR_IGNORE                                                           = 0x00000000
	SERVICE_ERROR_NORMAL                                                           = 0x00000001
	SERVICE_ERROR_SEVERE                                                           = 0x00000002
	SERVICE_FILE_SYSTEM_DRIVER                                                     = 0x00000002
	SERVICE_GUARANTEED                                                             = 0x80040000
	SERVICE_INACTIVE                                                               = 0x00000002
	SERVICE_INTERACTIVE_PROCESS                                                    = 0x00000100
	SERVICE_INTERROGATE                                                            = 0x0080
	SERVICE_KERNEL_DRIVER                                                          = 0x00000001
	SERVICE_MULTIPLE                                                               = 1
	SERVICE_NO_CHANGE                                                              = 0xffffffff
	SERVICE_NO_QOS_SIGNALING                                                       = 0x40000000
	SERVICE_NO_TRAFFIC_CONTROL                                                     = 0x81000000
	SERVICE_PAUSED                                                                 = 0x00000007
	SERVICE_PAUSE_CONTINUE                                                         = 0x0040
	SERVICE_PAUSE_PENDING                                                          = 0x00000006
	SERVICE_QUALITATIVE                                                            = 0x80200000
	SERVICE_QUERY_CONFIG                                                           = 0x0001
	SERVICE_QUERY_STATUS                                                           = 0x0004
	SERVICE_RECOGNIZER_DRIVER                                                      = 0x00000008
	SERVICE_RUNNING                                                                = 0x00000004
	SERVICE_RUNS_IN_SYSTEM_PROCESS                                                 = 0x00000001
	SERVICE_START                                                                  = 0x0010
	SERVICE_START_PENDING                                                          = 0x00000002
	SERVICE_STATE_ALL                                                              = 3
	SERVICE_STOP                                                                   = 0x0020
	SERVICE_STOPPED                                                                = 0x00000001
	SERVICE_STOP_PENDING                                                           = 0x00000003
	SERVICE_SYSTEM_START                                                           = 0x00000001
	SERVICE_TYPE_ALL                                                               = 319
	SERVICE_TYPE_VALUE_IPXPORTA                                                    = "IpxSocket"
	SERVICE_TYPE_VALUE_OBJECTIDA                                                   = "ObjectId"
	SERVICE_TYPE_VALUE_SAPIDA                                                      = "SapId"
	SERVICE_TYPE_VALUE_TCPPORTA                                                    = "TcpPort"
	SERVICE_TYPE_VALUE_UDPPORTA                                                    = "UdpPort"
	SERVICE_USER_DEFINED_CONTROL                                                   = 0x0100
	SERVICE_WIN32                                                                  = 48
	SERVICE_WIN32_OWN_PROCESS                                                      = 0x00000010
	SERVICE_WIN32_SHARE_PROCESS                                                    = 0x00000020
	SESSION_ALL_ACCESS                                                             = 983043
	SESSION_MODIFY_ACCESS                                                          = 0x2
	SESSION_QUERY_ACCESS                                                           = 0x1
	SETABORTPROC                                                                   = 9
	SETALLJUSTVALUES                                                               = 771
	SETBREAK                                                                       = 8
	SETCHARSET                                                                     = 772
	SETCOLORTABLE                                                                  = 4
	SETCOPYCOUNT                                                                   = 17
	SETDIBSCALING                                                                  = 32
	SETDTR                                                                         = 5
	SETICMPROFILE_EMBEDED                                                          = 0x00000001
	SETKERNTRACK                                                                   = 770
	SETLINECAP                                                                     = 21
	SETLINEJOIN                                                                    = 22
	SETMITERLIMIT                                                                  = 23
	SETRTS                                                                         = 3
	SETXOFF                                                                        = 1
	SETXON                                                                         = 2
	SET_ARC_DIRECTION                                                              = 4102
	SET_BACKGROUND_COLOR                                                           = 4103
	SET_BOUNDS                                                                     = 4109
	SET_CLIP_BOX                                                                   = 4108
	SET_MIRROR_MODE                                                                = 4110
	SET_POLY_MODE                                                                  = 4104
	SET_SCREEN_ANGLE                                                               = 4105
	SET_SPREAD                                                                     = 4106
	SET_TAPE_DRIVE_INFORMATION                                                     = 1
	SET_TAPE_MEDIA_INFORMATION                                                     = 0
	SEVERITY_ERROR                                                                 = 1
	SEVERITY_SUCCESS                                                               = 0
	SE_DACL_AUTO_INHERITED                                                         = 1024
	SE_DACL_AUTO_INHERIT_REQ                                                       = 256
	SE_DACL_DEFAULTED                                                              = 8
	SE_DACL_PRESENT                                                                = 4
	SE_DACL_PROTECTED                                                              = 4096
	SE_GROUP_DEFAULTED                                                             = 2
	SE_GROUP_ENABLED                                                               = 4
	SE_GROUP_ENABLED_BY_DEFAULT                                                    = 2
	SE_GROUP_INTEGRITY                                                             = 32
	SE_GROUP_INTEGRITY_ENABLED                                                     = 64
	SE_GROUP_LOGON_ID                                                              = 3221225472
	SE_GROUP_MANDATORY                                                             = 1
	SE_GROUP_OWNER                                                                 = 8
	SE_GROUP_RESOURCE                                                              = 536870912
	SE_GROUP_USE_FOR_DENY_ONLY                                                     = 16
	SE_GROUP_VALID_ATTRIBUTES                                                      = 3758096511
	SE_LEARNING_MODE_FLAG_PERMISSIVE                                               = 0x00000001
	SE_OWNER_DEFAULTED                                                             = 1
	SE_PRIVILEGE_ENABLED                                                           = 2
	SE_PRIVILEGE_ENABLED_BY_DEFAULT                                                = 1
	SE_PRIVILEGE_REMOVED                                                           = 4
	SE_PRIVILEGE_USED_FOR_ACCESS                                                   = 2147483648
	SE_PRIVILEGE_VALID_ATTRIBUTES                                                  = 2147483655
	SE_RM_CONTROL_VALID                                                            = 16384
	SE_SACL_AUTO_INHERITED                                                         = 2048
	SE_SACL_AUTO_INHERIT_REQ                                                       = 512
	SE_SACL_DEFAULTED                                                              = 32
	SE_SACL_PRESENT                                                                = 16
	SE_SACL_PROTECTED                                                              = 8192
	SE_SECURITY_DESCRIPTOR_FLAG_NO_LABEL_ACE                                       = 0x00000002
	SE_SECURITY_DESCRIPTOR_FLAG_NO_OWNER_ACE                                       = 0x00000001
	SE_SECURITY_DESCRIPTOR_VALID_FLAGS                                             = 0x00000003
	SE_SELF_RELATIVE                                                               = 32768
	SG_CONSTRAINED_GROUP                                                           = 0x02
	SG_UNCONSTRAINED_GROUP                                                         = 0x01
	SHADEBLENDCAPS                                                                 = 120
	SHIFTJIS_CHARSET                                                               = 128
	SHIFT_PRESSED                                                                  = 0x10
	SHOW_FULLSCREEN                                                                = 3
	SHOW_ICONWINDOW                                                                = 2
	SHOW_OPENNOACTIVATE                                                            = 4
	SHOW_OPENWINDOW                                                                = 1
	SHTDN_REASON_FLAG_CLEAN_UI                                                     = 0x04000000
	SHTDN_REASON_FLAG_COMMENT_REQUIRED                                             = 0x01000000
	SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED                                    = 0x02000000
	SHTDN_REASON_FLAG_DIRTY_UI                                                     = 0x08000000
	SHTDN_REASON_FLAG_PLANNED                                                      = 0x80000000
	SHTDN_REASON_FLAG_USER_DEFINED                                                 = 0x40000000
	SHTDN_REASON_LEGACY_API                                                        = 2147942400
	SHTDN_REASON_MAJOR_APPLICATION                                                 = 0x00040000
	SHTDN_REASON_MAJOR_HARDWARE                                                    = 0x00010000
	SHTDN_REASON_MAJOR_LEGACY_API                                                  = 0x00070000
	SHTDN_REASON_MAJOR_NONE                                                        = 0x00000000
	SHTDN_REASON_MAJOR_OPERATINGSYSTEM                                             = 0x00020000
	SHTDN_REASON_MAJOR_OTHER                                                       = 0x00000000
	SHTDN_REASON_MAJOR_POWER                                                       = 0x00060000
	SHTDN_REASON_MAJOR_SOFTWARE                                                    = 0x00030000
	SHTDN_REASON_MAJOR_SYSTEM                                                      = 0x00050000
	SHTDN_REASON_MINOR_BLUESCREEN                                                  = 0x0000000F
	SHTDN_REASON_MINOR_CORDUNPLUGGED                                               = 0x0000000b
	SHTDN_REASON_MINOR_DC_DEMOTION                                                 = 0x00000022
	SHTDN_REASON_MINOR_DC_PROMOTION                                                = 0x00000021
	SHTDN_REASON_MINOR_DISK                                                        = 0x00000007
	SHTDN_REASON_MINOR_ENVIRONMENT                                                 = 0x0000000c
	SHTDN_REASON_MINOR_HARDWARE_DRIVER                                             = 0x0000000d
	SHTDN_REASON_MINOR_HOTFIX                                                      = 0x00000011
	SHTDN_REASON_MINOR_HOTFIX_UNINSTALL                                            = 0x00000017
	SHTDN_REASON_MINOR_HUNG                                                        = 0x00000005
	SHTDN_REASON_MINOR_INSTALLATION                                                = 0x00000002
	SHTDN_REASON_MINOR_MAINTENANCE                                                 = 0x00000001
	SHTDN_REASON_MINOR_MMC                                                         = 0x00000019
	SHTDN_REASON_MINOR_NETWORKCARD                                                 = 0x00000009
	SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY                                        = 0x00000014
	SHTDN_REASON_MINOR_NONE                                                        = 0x000000ff
	SHTDN_REASON_MINOR_OTHER                                                       = 0x00000000
	SHTDN_REASON_MINOR_OTHERDRIVER                                                 = 0x0000000e
	SHTDN_REASON_MINOR_POWER_SUPPLY                                                = 0x0000000a
	SHTDN_REASON_MINOR_PROCESSOR                                                   = 0x00000008
	SHTDN_REASON_MINOR_RECONFIG                                                    = 0x00000004
	SHTDN_REASON_MINOR_SECURITY                                                    = 0x00000013
	SHTDN_REASON_MINOR_SECURITYFIX                                                 = 0x00000012
	SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL                                       = 0x00000018
	SHTDN_REASON_MINOR_SERVICEPACK                                                 = 0x00000010
	SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL                                       = 0x00000016
	SHTDN_REASON_MINOR_SYSTEMRESTORE                                               = 0x0000001a
	SHTDN_REASON_MINOR_TERMSRV                                                     = 0x00000020
	SHTDN_REASON_MINOR_UNSTABLE                                                    = 0x00000006
	SHTDN_REASON_MINOR_UPGRADE                                                     = 0x00000003
	SHTDN_REASON_MINOR_WMI                                                         = 0x00000015
	SHTDN_REASON_UNKNOWN                                                           = 255
	SHTDN_REASON_VALID_BIT_MASK                                                    = 0xc0ffffff
	SHUTDOWN_NORETRY                                                               = 0x1
	SHUTDOWN_TYPE_LEN                                                              = 32
	SID_DEFINED                                                                    = 0
	SID_HASH_SIZE                                                                  = 32
	SID_IDENTIFIER_AUTHORITY_DEFINED                                               = 0
	SID_MAX_SUB_AUTHORITIES                                                        = 15
	SID_RECOMMENDED_SUB_AUTHORITIES                                                = 1
	SID_REVISION                                                                   = 1
	SIF_ALL                                                                        = 23
	SIF_DISABLENOSCROLL                                                            = 0x0008
	SIF_PAGE                                                                       = 0x0002
	SIF_POS                                                                        = 0x0004
	SIF_RANGE                                                                      = 0x0001
	SIF_TRACKPOS                                                                   = 0x0010
	SIGABRT                                                                        = 22
	SIGABRT2                                                                       = 22
	SIGABRT_COMPAT                                                                 = 6
	SIGBREAK                                                                       = 21
	SIGBUS                                                                         = 10
	SIGFPE                                                                         = 8
	SIGILL                                                                         = 4
	SIGINT                                                                         = 2
	SIGSEGV                                                                        = 11
	SIGTERM                                                                        = 15
	SIGTRAP                                                                        = 5
	SIG_ATOMIC_MAX                                                                 = 2147483647
	SIG_ATOMIC_MIN                                                                 = -2147483648
	SIMPLEREGION                                                                   = 2
	SIO_ABSORB_RTRALERT                                                            = 2550136837
	SIO_ADDRESS_LIST_CHANGE                                                        = 671088663
	SIO_ADDRESS_LIST_QUERY                                                         = 1207959574
	SIO_ADDRESS_LIST_SORT                                                          = 3355443225
	SIO_ASSOCIATE_HANDLE                                                           = 2281701377
	SIO_ENABLE_CIRCULAR_QUEUEING                                                   = 671088642
	SIO_FIND_ROUTE                                                                 = 1207959555
	SIO_FLUSH                                                                      = 671088644
	SIO_GET_BROADCAST_ADDRESS                                                      = 1207959557
	SIO_GET_EXTENSION_FUNCTION_POINTER                                             = 3355443206
	SIO_GET_GROUP_QOS                                                              = 3355443208
	SIO_GET_QOS                                                                    = 3355443207
	SIO_INDEX_ADD_MCAST                                                            = 2550136842
	SIO_INDEX_BIND                                                                 = 2550136840
	SIO_INDEX_DEL_MCAST                                                            = 2550136843
	SIO_INDEX_MCASTIF                                                              = 2550136841
	SIO_KEEPALIVE_VALS                                                             = 2550136836
	SIO_LIMIT_BROADCASTS                                                           = 2550136839
	SIO_MULTICAST_SCOPE                                                            = 2281701386
	SIO_MULTIPOINT_LOOPBACK                                                        = 2281701385
	SIO_NSP_NOTIFY_CHANGE                                                          = 2281701401
	SIO_QUERY_TARGET_PNP_HANDLE                                                    = 1207959576
	SIO_RCVALL                                                                     = 2550136833
	SIO_RCVALL_IGMPMCAST                                                           = 2550136835
	SIO_RCVALL_MCAST                                                               = 2550136834
	SIO_ROUTING_INTERFACE_CHANGE                                                   = 2281701397
	SIO_ROUTING_INTERFACE_QUERY                                                    = 3355443220
	SIO_SET_GROUP_QOS                                                              = 2281701388
	SIO_SET_QOS                                                                    = 2281701387
	SIO_TRANSLATE_HANDLE                                                           = 3355443213
	SIO_UCAST_IF                                                                   = 2550136838
	SIZEFULLSCREEN                                                                 = 2
	SIZEICONIC                                                                     = 1
	SIZENORMAL                                                                     = 0
	SIZEOF_RFPO_DATA                                                               = 16
	SIZEPALETTE                                                                    = 104
	SIZEZOOMHIDE                                                                   = 4
	SIZEZOOMSHOW                                                                   = 3
	SIZE_MAXHIDE                                                                   = 4
	SIZE_MAXIMIZED                                                                 = 2
	SIZE_MAXSHOW                                                                   = 3
	SIZE_MINIMIZED                                                                 = 1
	SIZE_RESTORED                                                                  = 0
	SKF_AUDIBLEFEEDBACK                                                            = 0x00000040
	SKF_AVAILABLE                                                                  = 0x00000002
	SKF_CONFIRMHOTKEY                                                              = 0x00000008
	SKF_HOTKEYACTIVE                                                               = 0x00000004
	SKF_HOTKEYSOUND                                                                = 0x00000010
	SKF_INDICATOR                                                                  = 0x00000020
	SKF_LALTLATCHED                                                                = 0x10000000
	SKF_LALTLOCKED                                                                 = 0x00100000
	SKF_LCTLLATCHED                                                                = 0x04000000
	SKF_LCTLLOCKED                                                                 = 0x00040000
	SKF_LSHIFTLATCHED                                                              = 0x01000000
	SKF_LSHIFTLOCKED                                                               = 0x00010000
	SKF_LWINLATCHED                                                                = 0x40000000
	SKF_LWINLOCKED                                                                 = 0x00400000
	SKF_RALTLATCHED                                                                = 0x20000000
	SKF_RALTLOCKED                                                                 = 0x00200000
	SKF_RCTLLATCHED                                                                = 0x08000000
	SKF_RCTLLOCKED                                                                 = 0x00080000
	SKF_RSHIFTLATCHED                                                              = 0x02000000
	SKF_RSHIFTLOCKED                                                               = 0x00020000
	SKF_RWINLATCHED                                                                = 0x80000000
	SKF_RWINLOCKED                                                                 = 0x00800000
	SKF_STICKYKEYSON                                                               = 0x00000001
	SKF_TRISTATE                                                                   = 0x00000080
	SKF_TWOKEYSOFF                                                                 = 0x00000100
	SLE_ERROR                                                                      = 0x00000001
	SLE_MINORERROR                                                                 = 0x00000002
	SLE_WARNING                                                                    = 0x00000003
	SMTO_ABORTIFHUNG                                                               = 0x0002
	SMTO_BLOCK                                                                     = 0x0001
	SMTO_NORMAL                                                                    = 0x0000
	SMTO_NOTIMEOUTIFNOTHUNG                                                        = 0x0008
	SM_ARRANGE                                                                     = 56
	SM_CARETBLINKINGENABLED                                                        = 0x2002
	SM_CLEANBOOT                                                                   = 67
	SM_CMETRICS                                                                    = 91
	SM_CMONITORS                                                                   = 80
	SM_CMOUSEBUTTONS                                                               = 43
	SM_CXBORDER                                                                    = 5
	SM_CXCURSOR                                                                    = 13
	SM_CXDLGFRAME                                                                  = 7
	SM_CXDOUBLECLK                                                                 = 36
	SM_CXDRAG                                                                      = 68
	SM_CXEDGE                                                                      = 45
	SM_CXFIXEDFRAME                                                                = 7
	SM_CXFOCUSBORDER                                                               = 83
	SM_CXFRAME                                                                     = 32
	SM_CXFULLSCREEN                                                                = 16
	SM_CXHSCROLL                                                                   = 21
	SM_CXHTHUMB                                                                    = 10
	SM_CXICON                                                                      = 11
	SM_CXICONSPACING                                                               = 38
	SM_CXMAXIMIZED                                                                 = 61
	SM_CXMAXTRACK                                                                  = 59
	SM_CXMENUCHECK                                                                 = 71
	SM_CXMENUSIZE                                                                  = 54
	SM_CXMIN                                                                       = 28
	SM_CXMINIMIZED                                                                 = 57
	SM_CXMINSPACING                                                                = 47
	SM_CXMINTRACK                                                                  = 34
	SM_CXSCREEN                                                                    = 0
	SM_CXSIZE                                                                      = 30
	SM_CXSIZEFRAME                                                                 = 32
	SM_CXSMICON                                                                    = 49
	SM_CXSMSIZE                                                                    = 52
	SM_CXVIRTUALSCREEN                                                             = 78
	SM_CXVSCROLL                                                                   = 2
	SM_CYBORDER                                                                    = 6
	SM_CYCAPTION                                                                   = 4
	SM_CYCURSOR                                                                    = 14
	SM_CYDLGFRAME                                                                  = 8
	SM_CYDOUBLECLK                                                                 = 37
	SM_CYDRAG                                                                      = 69
	SM_CYEDGE                                                                      = 46
	SM_CYFIXEDFRAME                                                                = 8
	SM_CYFOCUSBORDER                                                               = 84
	SM_CYFRAME                                                                     = 33
	SM_CYFULLSCREEN                                                                = 17
	SM_CYHSCROLL                                                                   = 3
	SM_CYICON                                                                      = 12
	SM_CYICONSPACING                                                               = 39
	SM_CYKANJIWINDOW                                                               = 18
	SM_CYMAXIMIZED                                                                 = 62
	SM_CYMAXTRACK                                                                  = 60
	SM_CYMENU                                                                      = 15
	SM_CYMENUCHECK                                                                 = 72
	SM_CYMENUSIZE                                                                  = 55
	SM_CYMIN                                                                       = 29
	SM_CYMINIMIZED                                                                 = 58
	SM_CYMINSPACING                                                                = 48
	SM_CYMINTRACK                                                                  = 35
	SM_CYSCREEN                                                                    = 1
	SM_CYSIZE                                                                      = 31
	SM_CYSIZEFRAME                                                                 = 33
	SM_CYSMCAPTION                                                                 = 51
	SM_CYSMICON                                                                    = 50
	SM_CYSMSIZE                                                                    = 53
	SM_CYVIRTUALSCREEN                                                             = 79
	SM_CYVSCROLL                                                                   = 20
	SM_CYVTHUMB                                                                    = 9
	SM_DBCSENABLED                                                                 = 42
	SM_DEBUG                                                                       = 22
	SM_IMMENABLED                                                                  = 82
	SM_MEDIACENTER                                                                 = 87
	SM_MENUDROPALIGNMENT                                                           = 40
	SM_MIDEASTENABLED                                                              = 74
	SM_MOUSEPRESENT                                                                = 19
	SM_MOUSEWHEELPRESENT                                                           = 75
	SM_NETWORK                                                                     = 63
	SM_PENWINDOWS                                                                  = 41
	SM_REMOTECONTROL                                                               = 0x2001
	SM_REMOTESESSION                                                               = 0x1000
	SM_RESERVED1                                                                   = 24
	SM_RESERVED2                                                                   = 25
	SM_RESERVED3                                                                   = 26
	SM_RESERVED4                                                                   = 27
	SM_SAMEDISPLAYFORMAT                                                           = 81
	SM_SECURE                                                                      = 44
	SM_SERVERR2                                                                    = 89
	SM_SHOWSOUNDS                                                                  = 70
	SM_SHUTTINGDOWN                                                                = 0x2000
	SM_SLOWMACHINE                                                                 = 73
	SM_STARTER                                                                     = 88
	SM_SWAPBUTTON                                                                  = 23
	SM_TABLETPC                                                                    = 86
	SM_XVIRTUALSCREEN                                                              = 76
	SM_YVIRTUALSCREEN                                                              = 77
	SNAPSHOT_POLICY_ALWAYS                                                         = 1
	SNAPSHOT_POLICY_NEVER                                                          = 0
	SNAPSHOT_POLICY_UNPLANNED                                                      = 2
	SOCKET_ERROR                                                                   = -1
	SOCK_DGRAM                                                                     = 2
	SOCK_RAW                                                                       = 3
	SOCK_RDM                                                                       = 4
	SOCK_SEQPACKET                                                                 = 5
	SOCK_STREAM                                                                    = 1
	SOFTKEYBOARD_TYPE_C1                                                           = 0x0002
	SOFTKEYBOARD_TYPE_T1                                                           = 0x0001
	SOL_SOCKET                                                                     = 0xffff
	SOMAXCONN                                                                      = 0x7fffffff
	SORT_CHINESE_BIG5                                                              = 0x0
	SORT_CHINESE_BOPOMOFO                                                          = 0x3
	SORT_CHINESE_PRC                                                               = 0x2
	SORT_CHINESE_PRCP                                                              = 0x0
	SORT_CHINESE_RADICALSTROKE                                                     = 0x4
	SORT_CHINESE_UNICODE                                                           = 0x1
	SORT_DEFAULT                                                                   = 0x0
	SORT_GEORGIAN_MODERN                                                           = 0x1
	SORT_GEORGIAN_TRADITIONAL                                                      = 0x0
	SORT_GERMAN_PHONE_BOOK                                                         = 0x1
	SORT_HUNGARIAN_DEFAULT                                                         = 0x0
	SORT_HUNGARIAN_TECHNICAL                                                       = 0x1
	SORT_INVARIANT_MATH                                                            = 0x1
	SORT_JAPANESE_RADICALSTROKE                                                    = 0x4
	SORT_JAPANESE_UNICODE                                                          = 0x1
	SORT_JAPANESE_XJIS                                                             = 0x0
	SORT_KOREAN_KSC                                                                = 0x0
	SORT_KOREAN_UNICODE                                                            = 0x1
	SORT_STRINGSORT                                                                = 0x00001000
	SOUND_SYSTEM_APPEND                                                            = 14
	SOUND_SYSTEM_APPSTART                                                          = 12
	SOUND_SYSTEM_BEEP                                                              = 3
	SOUND_SYSTEM_ERROR                                                             = 4
	SOUND_SYSTEM_FAULT                                                             = 13
	SOUND_SYSTEM_INFORMATION                                                       = 7
	SOUND_SYSTEM_MAXIMIZE                                                          = 8
	SOUND_SYSTEM_MENUCOMMAND                                                       = 15
	SOUND_SYSTEM_MENUPOPUP                                                         = 16
	SOUND_SYSTEM_MINIMIZE                                                          = 9
	SOUND_SYSTEM_QUESTION                                                          = 5
	SOUND_SYSTEM_RESTOREDOWN                                                       = 11
	SOUND_SYSTEM_RESTOREUP                                                         = 10
	SOUND_SYSTEM_SHUTDOWN                                                          = 2
	SOUND_SYSTEM_STARTUP                                                           = 1
	SOUND_SYSTEM_WARNING                                                           = 6
	SO_ACCEPTCONN                                                                  = 0x0002
	SO_BROADCAST                                                                   = 0x0020
	SO_CONDITIONAL_ACCEPT                                                          = 0x3002
	SO_DEBUG                                                                       = 0x0001
	SO_DONTROUTE                                                                   = 0x0010
	SO_ERROR                                                                       = 0x1007
	SO_GROUP_ID                                                                    = 0x2001
	SO_GROUP_PRIORITY                                                              = 0x2002
	SO_KEEPALIVE                                                                   = 0x0008
	SO_LINGER                                                                      = 0x0080
	SO_MAX_MSG_SIZE                                                                = 0x2003
	SO_OOBINLINE                                                                   = 0x0100
	SO_PROTOCOL_INFO                                                               = 8196
	SO_PROTOCOL_INFOA                                                              = 0x2004
	SO_PROTOCOL_INFOW                                                              = 0x2005
	SO_RCVBUF                                                                      = 0x1002
	SO_RCVLOWAT                                                                    = 0x1004
	SO_RCVTIMEO                                                                    = 0x1006
	SO_REUSEADDR                                                                   = 0x0004
	SO_SNDBUF                                                                      = 0x1001
	SO_SNDLOWAT                                                                    = 0x1003
	SO_SNDTIMEO                                                                    = 0x1005
	SO_TYPE                                                                        = 0x1008
	SO_USELOOPBACK                                                                 = 0x0040
	SPACEPARITY                                                                    = 4
	SPCLPASSTHROUGH2                                                               = 4568
	SPECIFIC_RIGHTS_ALL                                                            = 65535
	SPECSTRINGS_H                                                                  = 0
	SPIF_SENDCHANGE                                                                = 2
	SPIF_SENDWININICHANGE                                                          = 0x0002
	SPIF_UPDATEINIFILE                                                             = 0x0001
	SPI_GETACCESSTIMEOUT                                                           = 0x003C
	SPI_GETACTIVEWINDOWTRACKING                                                    = 0x1000
	SPI_GETACTIVEWNDTRKTIMEOUT                                                     = 0x2002
	SPI_GETACTIVEWNDTRKZORDER                                                      = 0x100C
	SPI_GETANIMATION                                                               = 0x0048
	SPI_GETBEEP                                                                    = 0x0001
	SPI_GETBLOCKSENDINPUTRESETS                                                    = 0x1026
	SPI_GETBORDER                                                                  = 0x0005
	SPI_GETCARETWIDTH                                                              = 0x2006
	SPI_GETCOMBOBOXANIMATION                                                       = 0x1004
	SPI_GETCURSORSHADOW                                                            = 0x101A
	SPI_GETDEFAULTINPUTLANG                                                        = 0x0059
	SPI_GETDESKWALLPAPER                                                           = 0x0073
	SPI_GETDRAGFULLWINDOWS                                                         = 0x0026
	SPI_GETDROPSHADOW                                                              = 0x1024
	SPI_GETFASTTASKSWITCH                                                          = 0x0023
	SPI_GETFILTERKEYS                                                              = 0x0032
	SPI_GETFLATMENU                                                                = 0x1022
	SPI_GETFOCUSBORDERHEIGHT                                                       = 0x2010
	SPI_GETFOCUSBORDERWIDTH                                                        = 0x200E
	SPI_GETFONTSMOOTHING                                                           = 0x004A
	SPI_GETFONTSMOOTHINGCONTRAST                                                   = 0x200C
	SPI_GETFONTSMOOTHINGORIENTATION                                                = 0x2012
	SPI_GETFONTSMOOTHINGTYPE                                                       = 0x200A
	SPI_GETFOREGROUNDFLASHCOUNT                                                    = 0x2004
	SPI_GETFOREGROUNDLOCKTIMEOUT                                                   = 0x2000
	SPI_GETGRADIENTCAPTIONS                                                        = 0x1008
	SPI_GETGRIDGRANULARITY                                                         = 0x0012
	SPI_GETHIGHCONTRAST                                                            = 0x0042
	SPI_GETHOTTRACKING                                                             = 0x100E
	SPI_GETICONMETRICS                                                             = 0x002D
	SPI_GETICONTITLELOGFONT                                                        = 0x001F
	SPI_GETICONTITLEWRAP                                                           = 0x0019
	SPI_GETKEYBOARDCUES                                                            = 0x100A
	SPI_GETKEYBOARDDELAY                                                           = 0x0016
	SPI_GETKEYBOARDPREF                                                            = 0x0044
	SPI_GETKEYBOARDSPEED                                                           = 0x000A
	SPI_GETLISTBOXSMOOTHSCROLLING                                                  = 0x1006
	SPI_GETLOWPOWERACTIVE                                                          = 0x0053
	SPI_GETLOWPOWERTIMEOUT                                                         = 0x004F
	SPI_GETMENUANIMATION                                                           = 0x1002
	SPI_GETMENUDROPALIGNMENT                                                       = 0x001B
	SPI_GETMENUFADE                                                                = 0x1012
	SPI_GETMENUSHOWDELAY                                                           = 0x006A
	SPI_GETMENUUNDERLINES                                                          = 4106
	SPI_GETMINIMIZEDMETRICS                                                        = 0x002B
	SPI_GETMOUSE                                                                   = 0x0003
	SPI_GETMOUSECLICKLOCK                                                          = 0x101E
	SPI_GETMOUSECLICKLOCKTIME                                                      = 0x2008
	SPI_GETMOUSEHOVERHEIGHT                                                        = 0x0064
	SPI_GETMOUSEHOVERTIME                                                          = 0x0066
	SPI_GETMOUSEHOVERWIDTH                                                         = 0x0062
	SPI_GETMOUSEKEYS                                                               = 0x0036
	SPI_GETMOUSESONAR                                                              = 0x101C
	SPI_GETMOUSESPEED                                                              = 0x0070
	SPI_GETMOUSETRAILS                                                             = 0x005E
	SPI_GETMOUSEVANISH                                                             = 0x1020
	SPI_GETNONCLIENTMETRICS                                                        = 0x0029
	SPI_GETPOWEROFFACTIVE                                                          = 0x0054
	SPI_GETPOWEROFFTIMEOUT                                                         = 0x0050
	SPI_GETSCREENREADER                                                            = 0x0046
	SPI_GETSCREENSAVEACTIVE                                                        = 0x0010
	SPI_GETSCREENSAVERRUNNING                                                      = 0x0072
	SPI_GETSCREENSAVETIMEOUT                                                       = 0x000E
	SPI_GETSELECTIONFADE                                                           = 0x1014
	SPI_GETSERIALKEYS                                                              = 0x003E
	SPI_GETSHOWIMEUI                                                               = 0x006E
	SPI_GETSHOWSOUNDS                                                              = 0x0038
	SPI_GETSNAPTODEFBUTTON                                                         = 0x005F
	SPI_GETSOUNDSENTRY                                                             = 0x0040
	SPI_GETSTICKYKEYS                                                              = 0x003A
	SPI_GETTOGGLEKEYS                                                              = 0x0034
	SPI_GETTOOLTIPANIMATION                                                        = 0x1016
	SPI_GETTOOLTIPFADE                                                             = 0x1018
	SPI_GETUIEFFECTS                                                               = 0x103E
	SPI_GETWHEELSCROLLLINES                                                        = 0x0068
	SPI_GETWINDOWSEXTENSION                                                        = 0x005C
	SPI_GETWORKAREA                                                                = 0x0030
	SPI_ICONHORIZONTALSPACING                                                      = 0x000D
	SPI_ICONVERTICALSPACING                                                        = 0x0018
	SPI_LANGDRIVER                                                                 = 0x000C
	SPI_SCREENSAVERRUNNING                                                         = 97
	SPI_SETACCESSTIMEOUT                                                           = 0x003D
	SPI_SETACTIVEWINDOWTRACKING                                                    = 0x1001
	SPI_SETACTIVEWNDTRKTIMEOUT                                                     = 0x2003
	SPI_SETACTIVEWNDTRKZORDER                                                      = 0x100D
	SPI_SETANIMATION                                                               = 0x0049
	SPI_SETBEEP                                                                    = 0x0002
	SPI_SETBLOCKSENDINPUTRESETS                                                    = 0x1027
	SPI_SETBORDER                                                                  = 0x0006
	SPI_SETCARETWIDTH                                                              = 0x2007
	SPI_SETCOMBOBOXANIMATION                                                       = 0x1005
	SPI_SETCURSORS                                                                 = 0x0057
	SPI_SETCURSORSHADOW                                                            = 0x101B
	SPI_SETDEFAULTINPUTLANG                                                        = 0x005A
	SPI_SETDESKPATTERN                                                             = 0x0015
	SPI_SETDESKWALLPAPER                                                           = 0x0014
	SPI_SETDOUBLECLICKTIME                                                         = 0x0020
	SPI_SETDOUBLECLKHEIGHT                                                         = 0x001E
	SPI_SETDOUBLECLKWIDTH                                                          = 0x001D
	SPI_SETDRAGFULLWINDOWS                                                         = 0x0025
	SPI_SETDRAGHEIGHT                                                              = 0x004D
	SPI_SETDRAGWIDTH                                                               = 0x004C
	SPI_SETDROPSHADOW                                                              = 0x1025
	SPI_SETFASTTASKSWITCH                                                          = 0x0024
	SPI_SETFILTERKEYS                                                              = 0x0033
	SPI_SETFLATMENU                                                                = 0x1023
	SPI_SETFOCUSBORDERHEIGHT                                                       = 0x2011
	SPI_SETFOCUSBORDERWIDTH                                                        = 0x200F
	SPI_SETFONTSMOOTHING                                                           = 0x004B
	SPI_SETFONTSMOOTHINGCONTRAST                                                   = 0x200D
	SPI_SETFONTSMOOTHINGORIENTATION                                                = 0x2013
	SPI_SETFONTSMOOTHINGTYPE                                                       = 0x200B
	SPI_SETFOREGROUNDFLASHCOUNT                                                    = 0x2005
	SPI_SETFOREGROUNDLOCKTIMEOUT                                                   = 0x2001
	SPI_SETGRADIENTCAPTIONS                                                        = 0x1009
	SPI_SETGRIDGRANULARITY                                                         = 0x0013
	SPI_SETHANDHELD                                                                = 0x004E
	SPI_SETHIGHCONTRAST                                                            = 0x0043
	SPI_SETHOTTRACKING                                                             = 0x100F
	SPI_SETICONMETRICS                                                             = 0x002E
	SPI_SETICONS                                                                   = 0x0058
	SPI_SETICONTITLELOGFONT                                                        = 0x0022
	SPI_SETICONTITLEWRAP                                                           = 0x001A
	SPI_SETKEYBOARDCUES                                                            = 0x100B
	SPI_SETKEYBOARDDELAY                                                           = 0x0017
	SPI_SETKEYBOARDPREF                                                            = 0x0045
	SPI_SETKEYBOARDSPEED                                                           = 0x000B
	SPI_SETLANGTOGGLE                                                              = 0x005B
	SPI_SETLISTBOXSMOOTHSCROLLING                                                  = 0x1007
	SPI_SETLOWPOWERACTIVE                                                          = 0x0055
	SPI_SETLOWPOWERTIMEOUT                                                         = 0x0051
	SPI_SETMENUANIMATION                                                           = 0x1003
	SPI_SETMENUDROPALIGNMENT                                                       = 0x001C
	SPI_SETMENUFADE                                                                = 0x1013
	SPI_SETMENUSHOWDELAY                                                           = 0x006B
	SPI_SETMENUUNDERLINES                                                          = 4107
	SPI_SETMINIMIZEDMETRICS                                                        = 0x002C
	SPI_SETMOUSE                                                                   = 0x0004
	SPI_SETMOUSEBUTTONSWAP                                                         = 0x0021
	SPI_SETMOUSECLICKLOCK                                                          = 0x101F
	SPI_SETMOUSECLICKLOCKTIME                                                      = 0x2009
	SPI_SETMOUSEHOVERHEIGHT                                                        = 0x0065
	SPI_SETMOUSEHOVERTIME                                                          = 0x0067
	SPI_SETMOUSEHOVERWIDTH                                                         = 0x0063
	SPI_SETMOUSEKEYS                                                               = 0x0037
	SPI_SETMOUSESONAR                                                              = 0x101D
	SPI_SETMOUSESPEED                                                              = 0x0071
	SPI_SETMOUSETRAILS                                                             = 0x005D
	SPI_SETMOUSEVANISH                                                             = 0x1021
	SPI_SETNONCLIENTMETRICS                                                        = 0x002A
	SPI_SETPENWINDOWS                                                              = 0x0031
	SPI_SETPOWEROFFACTIVE                                                          = 0x0056
	SPI_SETPOWEROFFTIMEOUT                                                         = 0x0052
	SPI_SETSCREENREADER                                                            = 0x0047
	SPI_SETSCREENSAVEACTIVE                                                        = 0x0011
	SPI_SETSCREENSAVERRUNNING                                                      = 0x0061
	SPI_SETSCREENSAVETIMEOUT                                                       = 0x000F
	SPI_SETSELECTIONFADE                                                           = 0x1015
	SPI_SETSERIALKEYS                                                              = 0x003F
	SPI_SETSHOWIMEUI                                                               = 0x006F
	SPI_SETSHOWSOUNDS                                                              = 0x0039
	SPI_SETSNAPTODEFBUTTON                                                         = 0x0060
	SPI_SETSOUNDSENTRY                                                             = 0x0041
	SPI_SETSTICKYKEYS                                                              = 0x003B
	SPI_SETTOGGLEKEYS                                                              = 0x0035
	SPI_SETTOOLTIPANIMATION                                                        = 0x1017
	SPI_SETTOOLTIPFADE                                                             = 0x1019
	SPI_SETUIEFFECTS                                                               = 0x103F
	SPI_SETWHEELSCROLLLINES                                                        = 0x0069
	SPI_SETWORKAREA                                                                = 0x002F
	SPOINTER_32                                                                    = 0
	SPVERSION_MASK                                                                 = 0x0000FF00
	SP_APPABORT                                                                    = -2
	SP_ERROR                                                                       = -1
	SP_NOTREPORTED                                                                 = 0x4000
	SP_OUTOFDISK                                                                   = -4
	SP_OUTOFMEMORY                                                                 = -5
	SP_USERABORT                                                                   = -3
	SSF_AVAILABLE                                                                  = 0x00000002
	SSF_INDICATOR                                                                  = 0x00000004
	SSF_SOUNDSENTRYON                                                              = 0x00000001
	SSGF_DISPLAY                                                                   = 3
	SSGF_NONE                                                                      = 0
	SSTF_BORDER                                                                    = 2
	SSTF_CHARS                                                                     = 1
	SSTF_DISPLAY                                                                   = 3
	SSTF_NONE                                                                      = 0
	SSWF_CUSTOM                                                                    = 4
	SSWF_DISPLAY                                                                   = 3
	SSWF_NONE                                                                      = 0
	SSWF_TITLE                                                                     = 1
	SSWF_WINDOW                                                                    = 2
	SS_BITMAP                                                                      = 14
	SS_BLACKFRAME                                                                  = 7
	SS_BLACKRECT                                                                   = 4
	SS_CENTER                                                                      = 1
	SS_CENTERIMAGE                                                                 = 512
	SS_EDITCONTROL                                                                 = 8192
	SS_ELLIPSISMASK                                                                = 49152
	SS_ENDELLIPSIS                                                                 = 16384
	SS_ENHMETAFILE                                                                 = 15
	SS_ETCHEDFRAME                                                                 = 18
	SS_ETCHEDHORZ                                                                  = 16
	SS_ETCHEDVERT                                                                  = 17
	SS_GRAYFRAME                                                                   = 8
	SS_GRAYRECT                                                                    = 5
	SS_ICON                                                                        = 3
	SS_LEFT                                                                        = 0
	SS_LEFTNOWORDWRAP                                                              = 12
	SS_NOPREFIX                                                                    = 128
	SS_NOTIFY                                                                      = 256
	SS_OWNERDRAW                                                                   = 13
	SS_PATHELLIPSIS                                                                = 32768
	SS_REALSIZECONTROL                                                             = 64
	SS_REALSIZEIMAGE                                                               = 2048
	SS_RIGHT                                                                       = 2
	SS_RIGHTJUST                                                                   = 1024
	SS_SIMPLE                                                                      = 11
	SS_SUNKEN                                                                      = 4096
	SS_TYPEMASK                                                                    = 31
	SS_USERITEM                                                                    = 10
	SS_WHITEFRAME                                                                  = 9
	SS_WHITERECT                                                                   = 6
	SS_WORDELLIPSIS                                                                = 49152
	STACK_SIZE_PARAM_IS_A_RESERVATION                                              = 0x10000
	STAMP_AXESLIST                                                                 = 134245473
	STAMP_CFF2                                                                     = 134248035
	STAMP_DESIGNVECTOR                                                             = 134248036
	STAMP_TRUETYPE_VARIATION                                                       = 134248052
	STANDARD_RIGHTS_ALL                                                            = 2031616
	STANDARD_RIGHTS_EXECUTE                                                        = 131072
	STANDARD_RIGHTS_READ                                                           = 131072
	STANDARD_RIGHTS_REQUIRED                                                       = 983040
	STANDARD_RIGHTS_WRITE                                                          = 131072
	STARTDOC                                                                       = 10
	STARTF_FORCEOFFFEEDBACK                                                        = 0x00000080
	STARTF_FORCEONFEEDBACK                                                         = 0x00000040
	STARTF_PREVENTPINNING                                                          = 0x00002000
	STARTF_RUNFULLSCREEN                                                           = 0x00000020
	STARTF_TITLEISAPPID                                                            = 0x00001000
	STARTF_TITLEISLINKNAME                                                         = 0x00000800
	STARTF_USECOUNTCHARS                                                           = 0x00000008
	STARTF_USEFILLATTRIBUTE                                                        = 0x00000010
	STARTF_USEHOTKEY                                                               = 0x00000200
	STARTF_USEPOSITION                                                             = 0x00000004
	STARTF_USESHOWWINDOW                                                           = 0x00000001
	STARTF_USESIZE                                                                 = 0x00000002
	STARTF_USESTDHANDLES                                                           = 0x00000100
	STATE_SYSTEM_ALERT_HIGH                                                        = 0x10000000
	STATE_SYSTEM_ALERT_LOW                                                         = 0x04000000
	STATE_SYSTEM_ALERT_MEDIUM                                                      = 0x08000000
	STATE_SYSTEM_ANIMATED                                                          = 0x00004000
	STATE_SYSTEM_BUSY                                                              = 0x00000800
	STATE_SYSTEM_CHECKED                                                           = 0x00000010
	STATE_SYSTEM_COLLAPSED                                                         = 0x00000400
	STATE_SYSTEM_DEFAULT                                                           = 0x00000100
	STATE_SYSTEM_EXPANDED                                                          = 0x00000200
	STATE_SYSTEM_EXTSELECTABLE                                                     = 0x02000000
	STATE_SYSTEM_FLOATING                                                          = 0x00001000
	STATE_SYSTEM_FOCUSABLE                                                         = 0x00100000
	STATE_SYSTEM_FOCUSED                                                           = 0x00000004
	STATE_SYSTEM_HOTTRACKED                                                        = 0x00000080
	STATE_SYSTEM_INDETERMINATE                                                     = 32
	STATE_SYSTEM_INVISIBLE                                                         = 0x00008000
	STATE_SYSTEM_LINKED                                                            = 0x00400000
	STATE_SYSTEM_MARQUEED                                                          = 0x00002000
	STATE_SYSTEM_MIXED                                                             = 0x00000020
	STATE_SYSTEM_MOVEABLE                                                          = 0x00040000
	STATE_SYSTEM_MULTISELECTABLE                                                   = 0x01000000
	STATE_SYSTEM_OFFSCREEN                                                         = 0x00010000
	STATE_SYSTEM_PRESSED                                                           = 0x00000008
	STATE_SYSTEM_PROTECTED                                                         = 0x20000000
	STATE_SYSTEM_READONLY                                                          = 0x00000040
	STATE_SYSTEM_SELECTABLE                                                        = 0x00200000
	STATE_SYSTEM_SELECTED                                                          = 0x00000002
	STATE_SYSTEM_SELFVOICING                                                       = 0x00080000
	STATE_SYSTEM_SIZEABLE                                                          = 0x00020000
	STATE_SYSTEM_TRAVERSED                                                         = 0x00800000
	STATE_SYSTEM_UNAVAILABLE                                                       = 0x00000001
	STATE_SYSTEM_VALID                                                             = 0x3FFFFFFF
	STDAPICALLTYPE                                                                 = 0
	STDMETHODCALLTYPE                                                              = 0
	STM_GETICON                                                                    = 0x0171
	STM_GETIMAGE                                                                   = 0x0173
	STM_MSGMAX                                                                     = 0x0174
	STM_SETICON                                                                    = 0x0170
	STM_SETIMAGE                                                                   = 0x0172
	STN_CLICKED                                                                    = 0
	STN_DBLCLK                                                                     = 1
	STN_DISABLE                                                                    = 3
	STN_ENABLE                                                                     = 2
	STOCK_LAST                                                                     = 19
	STREAM_CONTAINS_PROPERTIES                                                     = 0x00000004
	STREAM_CONTAINS_SECURITY                                                       = 0x00000002
	STREAM_MODIFIED_WHEN_READ                                                      = 0x00000001
	STREAM_NORMAL_ATTRIBUTE                                                        = 0x00000000
	STREAM_SPARSE_ATTRIBUTE                                                        = 0x00000008
	STRETCHBLT                                                                     = 2048
	STRETCH_ANDSCANS                                                               = 1
	STRETCH_DELETESCANS                                                            = 3
	STRETCH_HALFTONE                                                               = 4
	STRETCH_ORSCANS                                                                = 2
	STRICT                                                                         = 1
	STRUNCATE                                                                      = 80
	STYLE_DESCRIPTION_SIZE                                                         = 32
	SUBLANG_AFRIKAANS_SOUTH_AFRICA                                                 = 0x01
	SUBLANG_ALBANIAN_ALBANIA                                                       = 0x01
	SUBLANG_ALSATIAN_FRANCE                                                        = 0x01
	SUBLANG_AMHARIC_ETHIOPIA                                                       = 0x01
	SUBLANG_ARABIC_ALGERIA                                                         = 0x05
	SUBLANG_ARABIC_BAHRAIN                                                         = 0x0f
	SUBLANG_ARABIC_EGYPT                                                           = 0x03
	SUBLANG_ARABIC_IRAQ                                                            = 0x02
	SUBLANG_ARABIC_JORDAN                                                          = 0x0b
	SUBLANG_ARABIC_KUWAIT                                                          = 0x0d
	SUBLANG_ARABIC_LEBANON                                                         = 0x0c
	SUBLANG_ARABIC_LIBYA                                                           = 0x04
	SUBLANG_ARABIC_MOROCCO                                                         = 0x06
	SUBLANG_ARABIC_OMAN                                                            = 0x08
	SUBLANG_ARABIC_QATAR                                                           = 0x10
	SUBLANG_ARABIC_SAUDI_ARABIA                                                    = 0x01
	SUBLANG_ARABIC_SYRIA                                                           = 0x0a
	SUBLANG_ARABIC_TUNISIA                                                         = 0x07
	SUBLANG_ARABIC_UAE                                                             = 0x0e
	SUBLANG_ARABIC_YEMEN                                                           = 0x09
	SUBLANG_ARMENIAN_ARMENIA                                                       = 0x01
	SUBLANG_ASSAMESE_INDIA                                                         = 0x01
	SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC                                        = 0x02
	SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN                                           = 0x01
	SUBLANG_AZERI_CYRILLIC                                                         = 0x02
	SUBLANG_AZERI_LATIN                                                            = 0x01
	SUBLANG_BANGLA_BANGLADESH                                                      = 0x02
	SUBLANG_BANGLA_INDIA                                                           = 0x01
	SUBLANG_BASHKIR_RUSSIA                                                         = 0x01
	SUBLANG_BASQUE_BASQUE                                                          = 0x01
	SUBLANG_BELARUSIAN_BELARUS                                                     = 0x01
	SUBLANG_BENGALI_BANGLADESH                                                     = 0x02
	SUBLANG_BENGALI_INDIA                                                          = 0x01
	SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC                                    = 0x08
	SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN                                       = 0x05
	SUBLANG_BRETON_FRANCE                                                          = 0x01
	SUBLANG_BULGARIAN_BULGARIA                                                     = 0x01
	SUBLANG_CATALAN_CATALAN                                                        = 0x01
	SUBLANG_CENTRAL_KURDISH_IRAQ                                                   = 0x01
	SUBLANG_CHEROKEE_CHEROKEE                                                      = 0x01
	SUBLANG_CHINESE_HONGKONG                                                       = 0x03
	SUBLANG_CHINESE_MACAU                                                          = 0x05
	SUBLANG_CHINESE_SIMPLIFIED                                                     = 0x02
	SUBLANG_CHINESE_SINGAPORE                                                      = 0x04
	SUBLANG_CHINESE_TRADITIONAL                                                    = 0x01
	SUBLANG_CORSICAN_FRANCE                                                        = 0x01
	SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN                                      = 0x04
	SUBLANG_CROATIAN_CROATIA                                                       = 0x01
	SUBLANG_CUSTOM_DEFAULT                                                         = 0x03
	SUBLANG_CUSTOM_UNSPECIFIED                                                     = 0x04
	SUBLANG_CZECH_CZECH_REPUBLIC                                                   = 0x01
	SUBLANG_DANISH_DENMARK                                                         = 0x01
	SUBLANG_DARI_AFGHANISTAN                                                       = 0x01
	SUBLANG_DEFAULT                                                                = 0x01
	SUBLANG_DIVEHI_MALDIVES                                                        = 0x01
	SUBLANG_DUTCH                                                                  = 0x01
	SUBLANG_DUTCH_BELGIAN                                                          = 0x02
	SUBLANG_ENGLISH_AUS                                                            = 0x03
	SUBLANG_ENGLISH_BELIZE                                                         = 0x0a
	SUBLANG_ENGLISH_CAN                                                            = 0x04
	SUBLANG_ENGLISH_CARIBBEAN                                                      = 0x09
	SUBLANG_ENGLISH_EIRE                                                           = 0x06
	SUBLANG_ENGLISH_INDIA                                                          = 0x10
	SUBLANG_ENGLISH_IRELAND                                                        = 0x06
	SUBLANG_ENGLISH_JAMAICA                                                        = 0x08
	SUBLANG_ENGLISH_MALAYSIA                                                       = 0x11
	SUBLANG_ENGLISH_NZ                                                             = 0x05
	SUBLANG_ENGLISH_PHILIPPINES                                                    = 0x0d
	SUBLANG_ENGLISH_SINGAPORE                                                      = 0x12
	SUBLANG_ENGLISH_SOUTH_AFRICA                                                   = 0x07
	SUBLANG_ENGLISH_TRINIDAD                                                       = 0x0b
	SUBLANG_ENGLISH_UK                                                             = 0x02
	SUBLANG_ENGLISH_US                                                             = 0x01
	SUBLANG_ENGLISH_ZIMBABWE                                                       = 0x0c
	SUBLANG_ESTONIAN_ESTONIA                                                       = 0x01
	SUBLANG_FAEROESE_FAROE_ISLANDS                                                 = 0x01
	SUBLANG_FILIPINO_PHILIPPINES                                                   = 0x01
	SUBLANG_FINNISH_FINLAND                                                        = 0x01
	SUBLANG_FRENCH                                                                 = 0x01
	SUBLANG_FRENCH_BELGIAN                                                         = 0x02
	SUBLANG_FRENCH_CANADIAN                                                        = 0x03
	SUBLANG_FRENCH_LUXEMBOURG                                                      = 0x05
	SUBLANG_FRENCH_MONACO                                                          = 0x06
	SUBLANG_FRENCH_SWISS                                                           = 0x04
	SUBLANG_FRISIAN_NETHERLANDS                                                    = 0x01
	SUBLANG_FULAH_SENEGAL                                                          = 0x02
	SUBLANG_GALICIAN_GALICIAN                                                      = 0x01
	SUBLANG_GEORGIAN_GEORGIA                                                       = 0x01
	SUBLANG_GERMAN                                                                 = 0x01
	SUBLANG_GERMAN_AUSTRIAN                                                        = 0x03
	SUBLANG_GERMAN_LIECHTENSTEIN                                                   = 0x05
	SUBLANG_GERMAN_LUXEMBOURG                                                      = 0x04
	SUBLANG_GERMAN_SWISS                                                           = 0x02
	SUBLANG_GREEK_GREECE                                                           = 0x01
	SUBLANG_GREENLANDIC_GREENLAND                                                  = 0x01
	SUBLANG_GUJARATI_INDIA                                                         = 0x01
	SUBLANG_HAUSA_NIGERIA                                                          = 1
	SUBLANG_HAUSA_NIGERIA_LATIN                                                    = 0x01
	SUBLANG_HAWAIIAN_US                                                            = 0x01
	SUBLANG_HEBREW_ISRAEL                                                          = 0x01
	SUBLANG_HINDI_INDIA                                                            = 0x01
	SUBLANG_HUNGARIAN_HUNGARY                                                      = 0x01
	SUBLANG_ICELANDIC_ICELAND                                                      = 0x01
	SUBLANG_IGBO_NIGERIA                                                           = 0x01
	SUBLANG_INDONESIAN_INDONESIA                                                   = 0x01
	SUBLANG_INUKTITUT_CANADA                                                       = 0x01
	SUBLANG_INUKTITUT_CANADA_LATIN                                                 = 0x02
	SUBLANG_IRISH_IRELAND                                                          = 0x02
	SUBLANG_ITALIAN                                                                = 0x01
	SUBLANG_ITALIAN_SWISS                                                          = 0x02
	SUBLANG_JAPANESE_JAPAN                                                         = 0x01
	SUBLANG_KANNADA_INDIA                                                          = 0x01
	SUBLANG_KASHMIRI_INDIA                                                         = 0x02
	SUBLANG_KASHMIRI_SASIA                                                         = 0x02
	SUBLANG_KAZAK_KAZAKHSTAN                                                       = 0x01
	SUBLANG_KHMER_CAMBODIA                                                         = 0x01
	SUBLANG_KICHE_GUATEMALA                                                        = 0x01
	SUBLANG_KINYARWANDA_RWANDA                                                     = 0x01
	SUBLANG_KONKANI_INDIA                                                          = 0x01
	SUBLANG_KOREAN                                                                 = 0x01
	SUBLANG_KYRGYZ_KYRGYZSTAN                                                      = 0x01
	SUBLANG_LAO_LAO                                                                = 0x01
	SUBLANG_LAO_LAO_PDR                                                            = 1
	SUBLANG_LATVIAN_LATVIA                                                         = 0x01
	SUBLANG_LITHUANIAN                                                             = 0x01
	SUBLANG_LOWER_SORBIAN_GERMANY                                                  = 0x02
	SUBLANG_LUXEMBOURGISH_LUXEMBOURG                                               = 0x01
	SUBLANG_MACEDONIAN_MACEDONIA                                                   = 0x01
	SUBLANG_MALAYALAM_INDIA                                                        = 0x01
	SUBLANG_MALAY_BRUNEI_DARUSSALAM                                                = 0x02
	SUBLANG_MALAY_MALAYSIA                                                         = 0x01
	SUBLANG_MALTESE_MALTA                                                          = 0x01
	SUBLANG_MAORI_NEW_ZEALAND                                                      = 0x01
	SUBLANG_MAPUDUNGUN_CHILE                                                       = 0x01
	SUBLANG_MARATHI_INDIA                                                          = 0x01
	SUBLANG_MOHAWK_MOHAWK                                                          = 0x01
	SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA                                            = 0x01
	SUBLANG_MONGOLIAN_PRC                                                          = 0x02
	SUBLANG_NEPALI_INDIA                                                           = 0x02
	SUBLANG_NEPALI_NEPAL                                                           = 0x01
	SUBLANG_NEUTRAL                                                                = 0x00
	SUBLANG_NORWEGIAN_BOKMAL                                                       = 0x01
	SUBLANG_NORWEGIAN_NYNORSK                                                      = 0x02
	SUBLANG_OCCITAN_FRANCE                                                         = 0x01
	SUBLANG_ORIYA_INDIA                                                            = 0x01
	SUBLANG_PASHTO_AFGHANISTAN                                                     = 0x01
	SUBLANG_PERSIAN_IRAN                                                           = 0x01
	SUBLANG_POLISH_POLAND                                                          = 0x01
	SUBLANG_PORTUGUESE                                                             = 0x02
	SUBLANG_PORTUGUESE_BRAZILIAN                                                   = 0x01
	SUBLANG_PULAR_SENEGAL                                                          = 0x02
	SUBLANG_PUNJABI_INDIA                                                          = 0x01
	SUBLANG_PUNJABI_PAKISTAN                                                       = 0x02
	SUBLANG_QUECHUA_BOLIVIA                                                        = 0x01
	SUBLANG_QUECHUA_ECUADOR                                                        = 0x02
	SUBLANG_QUECHUA_PERU                                                           = 0x03
	SUBLANG_ROMANIAN_ROMANIA                                                       = 0x01
	SUBLANG_ROMANSH_SWITZERLAND                                                    = 0x01
	SUBLANG_RUSSIAN_RUSSIA                                                         = 0x01
	SUBLANG_SAKHA_RUSSIA                                                           = 0x01
	SUBLANG_SAMI_INARI_FINLAND                                                     = 0x09
	SUBLANG_SAMI_LULE_NORWAY                                                       = 0x04
	SUBLANG_SAMI_LULE_SWEDEN                                                       = 0x05
	SUBLANG_SAMI_NORTHERN_FINLAND                                                  = 0x03
	SUBLANG_SAMI_NORTHERN_NORWAY                                                   = 0x01
	SUBLANG_SAMI_NORTHERN_SWEDEN                                                   = 0x02
	SUBLANG_SAMI_SKOLT_FINLAND                                                     = 0x08
	SUBLANG_SAMI_SOUTHERN_NORWAY                                                   = 0x06
	SUBLANG_SAMI_SOUTHERN_SWEDEN                                                   = 0x07
	SUBLANG_SANSKRIT_INDIA                                                         = 0x01
	SUBLANG_SCOTTISH_GAELIC                                                        = 0x01
	SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC                                    = 0x07
	SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN                                       = 0x06
	SUBLANG_SERBIAN_CYRILLIC                                                       = 0x03
	SUBLANG_SERBIAN_LATIN                                                          = 0x02
	SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC                                            = 0x0c
	SUBLANG_SERBIAN_MONTENEGRO_LATIN                                               = 0x0b
	SUBLANG_SERBIAN_SERBIA_CYRILLIC                                                = 0x0a
	SUBLANG_SERBIAN_SERBIA_LATIN                                                   = 0x09
	SUBLANG_SINDHI_AFGHANISTAN                                                     = 0x02
	SUBLANG_SINDHI_INDIA                                                           = 0x01
	SUBLANG_SINDHI_PAKISTAN                                                        = 0x02
	SUBLANG_SINHALESE_SRI_LANKA                                                    = 0x01
	SUBLANG_SLOVAK_SLOVAKIA                                                        = 0x01
	SUBLANG_SLOVENIAN_SLOVENIA                                                     = 0x01
	SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA                                            = 0x01
	SUBLANG_SPANISH                                                                = 0x01
	SUBLANG_SPANISH_ARGENTINA                                                      = 0x0b
	SUBLANG_SPANISH_BOLIVIA                                                        = 0x10
	SUBLANG_SPANISH_CHILE                                                          = 0x0d
	SUBLANG_SPANISH_COLOMBIA                                                       = 0x09
	SUBLANG_SPANISH_COSTA_RICA                                                     = 0x05
	SUBLANG_SPANISH_DOMINICAN_REPUBLIC                                             = 0x07
	SUBLANG_SPANISH_ECUADOR                                                        = 0x0c
	SUBLANG_SPANISH_EL_SALVADOR                                                    = 0x11
	SUBLANG_SPANISH_GUATEMALA                                                      = 0x04
	SUBLANG_SPANISH_HONDURAS                                                       = 0x12
	SUBLANG_SPANISH_MEXICAN                                                        = 0x02
	SUBLANG_SPANISH_MODERN                                                         = 0x03
	SUBLANG_SPANISH_NICARAGUA                                                      = 0x13
	SUBLANG_SPANISH_PANAMA                                                         = 0x06
	SUBLANG_SPANISH_PARAGUAY                                                       = 0x0f
	SUBLANG_SPANISH_PERU                                                           = 0x0a
	SUBLANG_SPANISH_PUERTO_RICO                                                    = 0x14
	SUBLANG_SPANISH_URUGUAY                                                        = 0x0e
	SUBLANG_SPANISH_US                                                             = 0x15
	SUBLANG_SPANISH_VENEZUELA                                                      = 0x08
	SUBLANG_SWAHILI_KENYA                                                          = 0x01
	SUBLANG_SWEDISH                                                                = 0x01
	SUBLANG_SWEDISH_FINLAND                                                        = 0x02
	SUBLANG_SYRIAC                                                                 = 0x01
	SUBLANG_SYRIAC_SYRIA                                                           = 1
	SUBLANG_SYS_DEFAULT                                                            = 0x02
	SUBLANG_TAJIK_TAJIKISTAN                                                       = 0x01
	SUBLANG_TAMAZIGHT_ALGERIA_LATIN                                                = 0x02
	SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH                                             = 0x04
	SUBLANG_TAMIL_INDIA                                                            = 0x01
	SUBLANG_TAMIL_SRI_LANKA                                                        = 0x02
	SUBLANG_TATAR_RUSSIA                                                           = 0x01
	SUBLANG_TELUGU_INDIA                                                           = 0x01
	SUBLANG_THAI_THAILAND                                                          = 0x01
	SUBLANG_TIBETAN_BHUTAN                                                         = 0x02
	SUBLANG_TIBETAN_PRC                                                            = 0x01
	SUBLANG_TIGRIGNA_ERITREA                                                       = 0x02
	SUBLANG_TIGRINYA_ERITREA                                                       = 0x02
	SUBLANG_TIGRINYA_ETHIOPIA                                                      = 0x01
	SUBLANG_TSWANA_BOTSWANA                                                        = 0x02
	SUBLANG_TSWANA_SOUTH_AFRICA                                                    = 0x01
	SUBLANG_TURKISH_TURKEY                                                         = 0x01
	SUBLANG_TURKMEN_TURKMENISTAN                                                   = 0x01
	SUBLANG_UIGHUR_PRC                                                             = 0x01
	SUBLANG_UI_CUSTOM_DEFAULT                                                      = 0x05
	SUBLANG_UKRAINIAN_UKRAINE                                                      = 0x01
	SUBLANG_UPPER_SORBIAN_GERMANY                                                  = 0x01
	SUBLANG_URDU_INDIA                                                             = 0x02
	SUBLANG_URDU_PAKISTAN                                                          = 0x01
	SUBLANG_UZBEK_CYRILLIC                                                         = 0x02
	SUBLANG_UZBEK_LATIN                                                            = 0x01
	SUBLANG_VALENCIAN_VALENCIA                                                     = 0x02
	SUBLANG_VIETNAMESE_VIETNAM                                                     = 0x01
	SUBLANG_WELSH_UNITED_KINGDOM                                                   = 0x01
	SUBLANG_WOLOF_SENEGAL                                                          = 0x01
	SUBLANG_XHOSA_SOUTH_AFRICA                                                     = 0x01
	SUBLANG_YAKUT_RUSSIA                                                           = 0x01
	SUBLANG_YI_PRC                                                                 = 0x01
	SUBLANG_YORUBA_NIGERIA                                                         = 0x01
	SUBLANG_ZULU_SOUTH_AFRICA                                                      = 0x01
	SUBVERSION_MASK                                                                = 0x000000FF
	SUCCESSFUL_ACCESS_ACE_FLAG                                                     = 64
	SUPPORT_LANG_NUMBER                                                            = 32
	SWP_ASYNCWINDOWPOS                                                             = 0x4000
	SWP_DEFERERASE                                                                 = 0x2000
	SWP_DRAWFRAME                                                                  = 32
	SWP_FRAMECHANGED                                                               = 0x0020
	SWP_HIDEWINDOW                                                                 = 0x0080
	SWP_NOACTIVATE                                                                 = 0x0010
	SWP_NOCOPYBITS                                                                 = 0x0100
	SWP_NOMOVE                                                                     = 0x0002
	SWP_NOOWNERZORDER                                                              = 0x0200
	SWP_NOREDRAW                                                                   = 0x0008
	SWP_NOREPOSITION                                                               = 512
	SWP_NOSENDCHANGING                                                             = 0x0400
	SWP_NOSIZE                                                                     = 0x0001
	SWP_NOZORDER                                                                   = 0x0004
	SWP_SHOWWINDOW                                                                 = 0x0040
	SW_ERASE                                                                       = 0x0004
	SW_FORCEMINIMIZE                                                               = 11
	SW_HIDE                                                                        = 0
	SW_INVALIDATE                                                                  = 0x0002
	SW_MAX                                                                         = 11
	SW_MAXIMIZE                                                                    = 3
	SW_MINIMIZE                                                                    = 6
	SW_NORMAL                                                                      = 1
	SW_OTHERUNZOOM                                                                 = 4
	SW_OTHERZOOM                                                                   = 2
	SW_PARENTCLOSING                                                               = 1
	SW_PARENTOPENING                                                               = 3
	SW_RESTORE                                                                     = 9
	SW_SCROLLCHILDREN                                                              = 0x0001
	SW_SHOW                                                                        = 5
	SW_SHOWDEFAULT                                                                 = 10
	SW_SHOWMAXIMIZED                                                               = 3
	SW_SHOWMINIMIZED                                                               = 2
	SW_SHOWMINNOACTIVE                                                             = 7
	SW_SHOWNA                                                                      = 8
	SW_SHOWNOACTIVATE                                                              = 4
	SW_SHOWNORMAL                                                                  = 1
	SW_SMOOTHSCROLL                                                                = 0x0010
	SYMBOL_CHARSET                                                                 = 2
	SYMLINK_FLAG_RELATIVE                                                          = 1
	SYNCHRONIZATION_BARRIER_FLAGS_BLOCK_ONLY                                       = 0x02
	SYNCHRONIZATION_BARRIER_FLAGS_NO_DELETE                                        = 0x04
	SYNCHRONIZATION_BARRIER_FLAGS_SPIN_ONLY                                        = 0x01
	SYNCHRONIZE                                                                    = 1048576
	SYSPAL_ERROR                                                                   = 0
	SYSPAL_NOSTATIC                                                                = 2
	SYSPAL_NOSTATIC256                                                             = 3
	SYSPAL_STATIC                                                                  = 1
	SYSRGN                                                                         = 4
	SYSTEM_ALARM_ACE_TYPE                                                          = 3
	SYSTEM_ALARM_CALLBACK_ACE_TYPE                                                 = 14
	SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE                                          = 16
	SYSTEM_ALARM_OBJECT_ACE_TYPE                                                   = 8
	SYSTEM_AUDIT_ACE_TYPE                                                          = 2
	SYSTEM_AUDIT_CALLBACK_ACE_TYPE                                                 = 13
	SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE                                          = 15
	SYSTEM_AUDIT_OBJECT_ACE_TYPE                                                   = 7
	SYSTEM_CACHE_ALIGNMENT_SIZE                                                    = 64
	SYSTEM_FIXED_FONT                                                              = 16
	SYSTEM_FONT                                                                    = 13
	SYSTEM_MANDATORY_LABEL_ACE_TYPE                                                = 17
	SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP                                           = 0x4
	SYSTEM_MANDATORY_LABEL_NO_READ_UP                                              = 0x2
	SYSTEM_MANDATORY_LABEL_NO_WRITE_UP                                             = 0x1
	SYSTEM_MANDATORY_LABEL_VALID_MASK                                              = 7
	SYSTEM_RESOURCE_ATTRIBUTE_ACE_TYPE                                             = 18
	SYSTEM_SCOPED_POLICY_ID_ACE_TYPE                                               = 19
	SYS_OPEN                                                                       = 20
	S_ALLTHRESHOLD                                                                 = 2
	S_IEXEC                                                                        = 64
	S_IFBLK                                                                        = 12288
	S_IFCHR                                                                        = 8192
	S_IFDIR                                                                        = 16384
	S_IFIFO                                                                        = 4096
	S_IFLNK                                                                        = 0120000
	S_IFMT                                                                         = 61440
	S_IFREG                                                                        = 32768
	S_IREAD                                                                        = 256
	S_IRGRP                                                                        = 32
	S_IROTH                                                                        = 4
	S_IRUSR                                                                        = 256
	S_IRWXG                                                                        = 56
	S_IRWXO                                                                        = 7
	S_IRWXU                                                                        = 448
	S_IWGRP                                                                        = 16
	S_IWOTH                                                                        = 2
	S_IWRITE                                                                       = 128
	S_IWUSR                                                                        = 128
	S_IXGRP                                                                        = 8
	S_IXOTH                                                                        = 1
	S_IXUSR                                                                        = 64
	S_LEGATO                                                                       = 1
	S_NORMAL                                                                       = 0
	S_PERIOD1024                                                                   = 1
	S_PERIOD2048                                                                   = 2
	S_PERIOD512                                                                    = 0
	S_PERIODVOICE                                                                  = 3
	S_QUEUEEMPTY                                                                   = 0
	S_SERBDNT                                                                      = -5
	S_SERDCC                                                                       = -7
	S_SERDDR                                                                       = -14
	S_SERDFQ                                                                       = -13
	S_SERDLN                                                                       = -6
	S_SERDMD                                                                       = -10
	S_SERDPT                                                                       = -12
	S_SERDSH                                                                       = -11
	S_SERDSR                                                                       = -15
	S_SERDST                                                                       = -16
	S_SERDTP                                                                       = -8
	S_SERDVL                                                                       = -9
	S_SERDVNA                                                                      = -1
	S_SERMACT                                                                      = -3
	S_SEROFM                                                                       = -2
	S_SERQFUL                                                                      = -4
	S_STACCATO                                                                     = 2
	S_THRESHOLD                                                                    = 1
	S_WHITE1024                                                                    = 5
	S_WHITE2048                                                                    = 6
	S_WHITE512                                                                     = 4
	S_WHITEVOICE                                                                   = 7
	TAPE_ABSOLUTE_BLOCK                                                            = 1
	TAPE_ABSOLUTE_POSITION                                                         = 0
	TAPE_CHECK_FOR_DRIVE_PROBLEM                                                   = 2
	TAPE_DRIVE_ABSOLUTE_BLK                                                        = 0x80001000
	TAPE_DRIVE_ABS_BLK_IMMED                                                       = 0x80002000
	TAPE_DRIVE_CLEAN_REQUESTS                                                      = 0x02000000
	TAPE_DRIVE_COMPRESSION                                                         = 0x00020000
	TAPE_DRIVE_ECC                                                                 = 0x00010000
	TAPE_DRIVE_EJECT_MEDIA                                                         = 0x01000000
	TAPE_DRIVE_END_OF_DATA                                                         = 0x80010000
	TAPE_DRIVE_EOT_WZ_SIZE                                                         = 0x00002000
	TAPE_DRIVE_ERASE_BOP_ONLY                                                      = 0x00000040
	TAPE_DRIVE_ERASE_IMMEDIATE                                                     = 0x00000080
	TAPE_DRIVE_ERASE_LONG                                                          = 0x00000020
	TAPE_DRIVE_ERASE_SHORT                                                         = 0x00000010
	TAPE_DRIVE_FILEMARKS                                                           = 0x80040000
	TAPE_DRIVE_FIXED                                                               = 0x00000001
	TAPE_DRIVE_FIXED_BLOCK                                                         = 0x00000400
	TAPE_DRIVE_FORMAT                                                              = 0xA0000000
	TAPE_DRIVE_FORMAT_IMMEDIATE                                                    = 0xC0000000
	TAPE_DRIVE_GET_ABSOLUTE_BLK                                                    = 0x00100000
	TAPE_DRIVE_GET_LOGICAL_BLK                                                     = 0x00200000
	TAPE_DRIVE_HIGH_FEATURES                                                       = 0x80000000
	TAPE_DRIVE_INITIATOR                                                           = 0x00000004
	TAPE_DRIVE_LOAD_UNLD_IMMED                                                     = 0x80000020
	TAPE_DRIVE_LOAD_UNLOAD                                                         = 0x80000001
	TAPE_DRIVE_LOCK_UNLK_IMMED                                                     = 0x80000080
	TAPE_DRIVE_LOCK_UNLOCK                                                         = 0x80000004
	TAPE_DRIVE_LOGICAL_BLK                                                         = 0x80004000
	TAPE_DRIVE_LOG_BLK_IMMED                                                       = 0x80008000
	TAPE_DRIVE_PADDING                                                             = 0x00040000
	TAPE_DRIVE_RELATIVE_BLKS                                                       = 0x80020000
	TAPE_DRIVE_REPORT_SMKS                                                         = 0x00080000
	TAPE_DRIVE_RESERVED_BIT                                                        = 0x80000000
	TAPE_DRIVE_REVERSE_POSITION                                                    = 0x80400000
	TAPE_DRIVE_REWIND_IMMEDIATE                                                    = 0x80000008
	TAPE_DRIVE_SELECT                                                              = 0x00000002
	TAPE_DRIVE_SEQUENTIAL_FMKS                                                     = 0x80080000
	TAPE_DRIVE_SEQUENTIAL_SMKS                                                     = 0x80200000
	TAPE_DRIVE_SETMARKS                                                            = 0x80100000
	TAPE_DRIVE_SET_BLOCK_SIZE                                                      = 0x80000010
	TAPE_DRIVE_SET_CMP_BOP_ONLY                                                    = 0x04000000
	TAPE_DRIVE_SET_COMPRESSION                                                     = 0x80000200
	TAPE_DRIVE_SET_ECC                                                             = 0x80000100
	TAPE_DRIVE_SET_EOT_WZ_SIZE                                                     = 0x00400000
	TAPE_DRIVE_SET_PADDING                                                         = 0x80000400
	TAPE_DRIVE_SET_REPORT_SMKS                                                     = 0x80000800
	TAPE_DRIVE_SPACE_IMMEDIATE                                                     = 0x80800000
	TAPE_DRIVE_TAPE_CAPACITY                                                       = 0x00000100
	TAPE_DRIVE_TAPE_REMAINING                                                      = 0x00000200
	TAPE_DRIVE_TENSION                                                             = 0x80000002
	TAPE_DRIVE_TENSION_IMMED                                                       = 0x80000040
	TAPE_DRIVE_VARIABLE_BLOCK                                                      = 0x00000800
	TAPE_DRIVE_WRITE_FILEMARKS                                                     = 0x82000000
	TAPE_DRIVE_WRITE_LONG_FMKS                                                     = 0x88000000
	TAPE_DRIVE_WRITE_MARK_IMMED                                                    = 0x90000000
	TAPE_DRIVE_WRITE_PROTECT                                                       = 0x00001000
	TAPE_DRIVE_WRITE_SETMARKS                                                      = 0x81000000
	TAPE_DRIVE_WRITE_SHORT_FMKS                                                    = 0x84000000
	TAPE_ERASE_LONG                                                                = 1
	TAPE_ERASE_SHORT                                                               = 0
	TAPE_FILEMARKS                                                                 = 1
	TAPE_FIXED_PARTITIONS                                                          = 0
	TAPE_FORMAT                                                                    = 5
	TAPE_INITIATOR_PARTITIONS                                                      = 2
	TAPE_LOAD                                                                      = 0
	TAPE_LOCK                                                                      = 3
	TAPE_LOGICAL_BLOCK                                                             = 2
	TAPE_LOGICAL_POSITION                                                          = 1
	TAPE_LONG_FILEMARKS                                                            = 3
	TAPE_PSEUDO_LOGICAL_BLOCK                                                      = 3
	TAPE_PSEUDO_LOGICAL_POSITION                                                   = 2
	TAPE_QUERY_DEVICE_ERROR_DATA                                                   = 4
	TAPE_QUERY_DRIVE_PARAMETERS                                                    = 0
	TAPE_QUERY_IO_ERROR_DATA                                                       = 3
	TAPE_QUERY_MEDIA_CAPACITY                                                      = 1
	TAPE_REWIND                                                                    = 0
	TAPE_SELECT_PARTITIONS                                                         = 1
	TAPE_SETMARKS                                                                  = 0
	TAPE_SHORT_FILEMARKS                                                           = 2
	TAPE_SPACE_END_OF_DATA                                                         = 4
	TAPE_SPACE_FILEMARKS                                                           = 6
	TAPE_SPACE_RELATIVE_BLOCKS                                                     = 5
	TAPE_SPACE_SEQUENTIAL_FMKS                                                     = 7
	TAPE_SPACE_SEQUENTIAL_SMKS                                                     = 9
	TAPE_SPACE_SETMARKS                                                            = 8
	TAPE_TENSION                                                                   = 2
	TAPE_UNLOAD                                                                    = 1
	TAPE_UNLOCK                                                                    = 4
	TA_BASELINE                                                                    = 24
	TA_BOTTOM                                                                      = 8
	TA_CENTER                                                                      = 6
	TA_LEFT                                                                        = 0
	TA_MASK                                                                        = 287
	TA_NOUPDATECP                                                                  = 0
	TA_RIGHT                                                                       = 2
	TA_RTLREADING                                                                  = 256
	TA_TOP                                                                         = 0
	TA_UPDATECP                                                                    = 1
	TCI_SRCCHARSET                                                                 = 1
	TCI_SRCCODEPAGE                                                                = 2
	TCI_SRCFONTSIG                                                                 = 3
	TCI_SRCLOCALE                                                                  = 0x1000
	TCLFLEXARRAY                                                                   = 0
	TCLTOMMATH_EPOCH                                                               = 0
	TCLTOMMATH_REVISION                                                            = 0
	TCL_ALLOW_EXCEPTIONS                                                           = 0x04
	TCL_ALLOW_INLINE_COMPILATION                                                   = 0x20000
	TCL_ALL_EVENTS                                                                 = -3
	TCL_ALPHA_RELEASE                                                              = 0
	TCL_APPEND_VALUE                                                               = 4
	TCL_ARGV_CONSTANT                                                              = 15
	TCL_ARGV_END                                                                   = 23
	TCL_ARGV_FLOAT                                                                 = 19
	TCL_ARGV_FUNC                                                                  = 20
	TCL_ARGV_GENFUNC                                                               = 21
	TCL_ARGV_HELP                                                                  = 22
	TCL_ARGV_INT                                                                   = 16
	TCL_ARGV_REST                                                                  = 18
	TCL_ARGV_STRING                                                                = 17
	TCL_AVOID_RESOLVERS                                                            = 0x40000
	TCL_BETA_RELEASE                                                               = 1
	TCL_BREAK                                                                      = 3
	TCL_CANCEL_UNWIND                                                              = 0x100000
	TCL_CHANNEL_THREAD_INSERT                                                      = 0
	TCL_CHANNEL_THREAD_REMOVE                                                      = 1
	TCL_CLOSE_READ                                                                 = 2
	TCL_CLOSE_WRITE                                                                = 4
	TCL_CONTINUE                                                                   = 4
	TCL_CONVERT_MULTIBYTE                                                          = -1
	TCL_CONVERT_NOSPACE                                                            = -4
	TCL_CONVERT_SYNTAX                                                             = -2
	TCL_CONVERT_UNKNOWN                                                            = -3
	TCL_CREATE_HARD_LINK                                                           = 0x02
	TCL_CREATE_NS_IF_UNKNOWN                                                       = 0x800
	TCL_CREATE_SYMBOLIC_LINK                                                       = 0x01
	TCL_CUSTOM_PTR_KEYS                                                            = -1
	TCL_CUSTOM_TYPE_KEYS                                                           = -2
	TCL_DD_CONVERSION_TYPE_MASK                                                    = 0x3
	TCL_DD_E_FORMAT                                                                = 0x2
	TCL_DD_F_FORMAT                                                                = 0x3
	TCL_DD_NO_QUICK                                                                = 0x8
	TCL_DD_SHORTEN_FLAG                                                            = 0x4
	TCL_DD_SHORTEST                                                                = 0x4
	TCL_DD_SHORTEST0                                                               = 0x0
	TCL_DD_STEELE                                                                  = 0x5
	TCL_DD_STEELE0                                                                 = 0x1
	TCL_DONT_QUOTE_HASH                                                            = 8
	TCL_DONT_USE_BRACES                                                            = 1
	TCL_DONT_WAIT                                                                  = 2
	TCL_DOUBLE_SPACE                                                               = 27
	TCL_DSTRING_STATIC_SIZE                                                        = 200
	TCL_EACH_COLLECT                                                               = 1
	TCL_EACH_KEEP_NONE                                                             = 0
	TCL_ENCODING_CHAR_LIMIT                                                        = 0x10
	TCL_ENCODING_END                                                               = 0x02
	TCL_ENCODING_NO_TERMINATE                                                      = 0x08
	TCL_ENCODING_START                                                             = 0x01
	TCL_ENCODING_STOPONERROR                                                       = 0x04
	TCL_ENFORCE_MODE                                                               = 16
	TCL_ENSEMBLE_PREFIX                                                            = 0x02
	TCL_ERROR                                                                      = 1
	TCL_EVAL_DIRECT                                                                = 0x040000
	TCL_EVAL_DISCARD_RESULT                                                        = 0x40
	TCL_EVAL_FILE                                                                  = 0x02
	TCL_EVAL_GLOBAL                                                                = 0x020000
	TCL_EVAL_INVOKE                                                                = 0x080000
	TCL_EVAL_NOERR                                                                 = 0x200000
	TCL_EVAL_NORESOLVE                                                             = 0x20
	TCL_EVAL_SOURCE_IN_FRAME                                                       = 0x10
	TCL_EXACT                                                                      = 1
	TCL_EXCEPTION                                                                  = 8
	TCL_FILE_EVENTS                                                                = 8
	TCL_FINAL_RELEASE                                                              = 2
	TCL_FIND_ONLY_NS                                                               = 0x1000
	TCL_GLOBAL_ONLY                                                                = 1
	TCL_GLOBMODE_DIR                                                               = 4
	TCL_GLOBMODE_JOIN                                                              = 2
	TCL_GLOBMODE_NO_COMPLAIN                                                       = 1
	TCL_GLOBMODE_TAILS                                                             = 8
	TCL_GLOB_PERM_HIDDEN                                                           = 2
	TCL_GLOB_PERM_R                                                                = 4
	TCL_GLOB_PERM_RONLY                                                            = 1
	TCL_GLOB_PERM_W                                                                = 8
	TCL_GLOB_PERM_X                                                                = 16
	TCL_GLOB_TYPE_BLOCK                                                            = 1
	TCL_GLOB_TYPE_CHAR                                                             = 2
	TCL_GLOB_TYPE_DIR                                                              = 4
	TCL_GLOB_TYPE_FILE                                                             = 16
	TCL_GLOB_TYPE_LINK                                                             = 32
	TCL_GLOB_TYPE_MOUNT                                                            = 128
	TCL_GLOB_TYPE_PIPE                                                             = 8
	TCL_GLOB_TYPE_SOCK                                                             = 64
	TCL_HASH_KEY_RANDOMIZE_HASH                                                    = 0x1
	TCL_HASH_KEY_STORE_HASH                                                        = 1
	TCL_HASH_KEY_SYSTEM_HASH                                                       = 0x2
	TCL_HASH_KEY_TYPE_VERSION                                                      = 1
	TCL_IDLE_EVENTS                                                                = 32
	TCL_INDEX_AFTER                                                                = 2147483647
	TCL_INDEX_BEFORE                                                               = -1
	TCL_INDEX_END                                                                  = -2
	TCL_INDEX_START                                                                = 0
	TCL_INTEGER_SPACE                                                              = 24
	TCL_INTERP_DESTROYED                                                           = 0x100
	TCL_INVOKE_HIDDEN                                                              = 1
	TCL_INVOKE_NO_TRACEBACK                                                        = 4
	TCL_INVOKE_NO_UNKNOWN                                                          = 2
	TCL_LEAVE_ERR_MSG                                                              = 0x200
	TCL_LIMIT_COMMANDS                                                             = 0x01
	TCL_LIMIT_TIME                                                                 = 0x02
	TCL_LINK_BOOLEAN                                                               = 3
	TCL_LINK_CHAR                                                                  = 6
	TCL_LINK_DOUBLE                                                                = 2
	TCL_LINK_FLOAT                                                                 = 13
	TCL_LINK_INT                                                                   = 1
	TCL_LINK_LONG                                                                  = 11
	TCL_LINK_READ_ONLY                                                             = 0x80
	TCL_LINK_SHORT                                                                 = 8
	TCL_LINK_STRING                                                                = 4
	TCL_LINK_UCHAR                                                                 = 7
	TCL_LINK_UINT                                                                  = 10
	TCL_LINK_ULONG                                                                 = 12
	TCL_LINK_USHORT                                                                = 9
	TCL_LINK_WIDE_INT                                                              = 5
	TCL_LINK_WIDE_UINT                                                             = 14
	TCL_LIST_ELEMENT                                                               = 8
	TCL_LL_MODIFIER                                                                = "I64"
	TCL_LOAD_GLOBAL                                                                = 1
	TCL_LOAD_LAZY                                                                  = 2
	TCL_LOCATION_BC                                                                = 2
	TCL_LOCATION_EVAL                                                              = 0
	TCL_LOCATION_LAST                                                              = 6
	TCL_LOCATION_PREBC                                                             = 3
	TCL_LOCATION_PROC                                                              = 5
	TCL_LOCATION_SOURCE                                                            = 4
	TCL_MAJOR_VERSION                                                              = 8
	TCL_MATCH_NOCASE                                                               = 1
	TCL_MAX_PREC                                                                   = 17
	TCL_MINOR_VERSION                                                              = 6
	TCL_MIN_GROWTH                                                                 = 1024
	TCL_MODE_BLOCKING                                                              = 0
	TCL_MODE_NONBLOCKING                                                           = 1
	TCL_NAMESPACE_ONLY                                                             = 2
	TCL_NO_EVAL                                                                    = 0x010000
	TCL_NUMBER_BIG                                                                 = 3
	TCL_NUMBER_DOUBLE                                                              = 4
	TCL_NUMBER_LONG                                                                = 1
	TCL_NUMBER_NAN                                                                 = 5
	TCL_NUMBER_WIDE                                                                = 2
	TCL_OK                                                                         = 0
	TCL_ONE_WORD_KEYS                                                              = 1
	TCL_OUT_LINE_COMPILE                                                           = 1
	TCL_PARSE_BAD_NUMBER                                                           = 9
	TCL_PARSE_BINARY_ONLY                                                          = 64
	TCL_PARSE_BRACE_EXTRA                                                          = 2
	TCL_PARSE_DECIMAL_ONLY                                                         = 1
	TCL_PARSE_HEXADECIMAL_ONLY                                                     = 4
	TCL_PARSE_INTEGER_ONLY                                                         = 8
	TCL_PARSE_MISSING_BRACE                                                        = 3
	TCL_PARSE_MISSING_BRACKET                                                      = 4
	TCL_PARSE_MISSING_PAREN                                                        = 5
	TCL_PARSE_MISSING_QUOTE                                                        = 6
	TCL_PARSE_MISSING_VAR_BRACE                                                    = 7
	TCL_PARSE_NO_WHITESPACE                                                        = 32
	TCL_PARSE_OCTAL_ONLY                                                           = 2
	TCL_PARSE_PART1                                                                = 0x400
	TCL_PARSE_QUOTE_EXTRA                                                          = 1
	TCL_PARSE_SCAN_PREFIXES                                                        = 16
	TCL_PARSE_SUCCESS                                                              = 0
	TCL_PARSE_SYNTAX                                                               = 8
	TCL_PATCH_LEVEL                                                                = "8.6.12"
	TCL_READABLE                                                                   = 2
	TCL_REG_ADVANCED                                                               = 000003
	TCL_REG_ADVF                                                                   = 000002
	TCL_REG_BASIC                                                                  = 000000
	TCL_REG_BOSONLY                                                                = 002000
	TCL_REG_CANMATCH                                                               = 001000
	TCL_REG_EXPANDED                                                               = 000040
	TCL_REG_EXTENDED                                                               = 000001
	TCL_REG_NEWLINE                                                                = 000300
	TCL_REG_NLANCH                                                                 = 000200
	TCL_REG_NLSTOP                                                                 = 000100
	TCL_REG_NOCASE                                                                 = 000010
	TCL_REG_NOSUB                                                                  = 000020
	TCL_REG_NOTBOL                                                                 = 0001
	TCL_REG_NOTEOL                                                                 = 0002
	TCL_REG_QUOTE                                                                  = 000004
	TCL_RELEASE_LEVEL                                                              = 2
	TCL_RELEASE_SERIAL                                                             = 12
	TCL_RESULT_SIZE                                                                = 200
	TCL_RETURN                                                                     = 2
	TCL_SERVICE_ALL                                                                = 1
	TCL_SERVICE_NONE                                                               = 0
	TCL_SHLIB_EXT                                                                  = ".dll"
	TCL_SMALL_HASH_TABLE                                                           = 4
	TCL_STDERR                                                                     = 8
	TCL_STDIN                                                                      = 2
	TCL_STDOUT                                                                     = 4
	TCL_STORAGE_CLASS                                                              = 0
	TCL_STRING_KEYS                                                                = 0
	TCL_SUBST_ALL                                                                  = 007
	TCL_SUBST_BACKSLASHES                                                          = 004
	TCL_SUBST_COMMANDS                                                             = 001
	TCL_SUBST_VARIABLES                                                            = 002
	TCL_THREAD_JOINABLE                                                            = 1
	TCL_THREAD_NOFLAGS                                                             = 0
	TCL_THREAD_STACK_DEFAULT                                                       = 0
	TCL_TIMER_EVENTS                                                               = 16
	TCL_TOKEN_BS                                                                   = 8
	TCL_TOKEN_COMMAND                                                              = 16
	TCL_TOKEN_EXPAND_WORD                                                          = 256
	TCL_TOKEN_OPERATOR                                                             = 128
	TCL_TOKEN_SIMPLE_WORD                                                          = 2
	TCL_TOKEN_SUB_EXPR                                                             = 64
	TCL_TOKEN_TEXT                                                                 = 4
	TCL_TOKEN_VARIABLE                                                             = 32
	TCL_TOKEN_WORD                                                                 = 1
	TCL_TRACE_ARRAY                                                                = 0x800
	TCL_TRACE_DELETE                                                               = 0x4000
	TCL_TRACE_DESTROYED                                                            = 0x80
	TCL_TRACE_ENTER_EXEC                                                           = 1
	TCL_TRACE_LEAVE_EXEC                                                           = 2
	TCL_TRACE_OLD_STYLE                                                            = 0x1000
	TCL_TRACE_READS                                                                = 0x10
	TCL_TRACE_RENAME                                                               = 0x2000
	TCL_TRACE_RESULT_DYNAMIC                                                       = 0x8000
	TCL_TRACE_RESULT_OBJECT                                                        = 0x10000
	TCL_TRACE_UNSETS                                                               = 0x40
	TCL_TRACE_WRITES                                                               = 0x20
	TCL_UNLOAD_DETACH_FROM_INTERPRETER                                             = 1
	TCL_UNLOAD_DETACH_FROM_PROCESS                                                 = 2
	TCL_UTF_MAX                                                                    = 3
	TCL_VERSION                                                                    = "8.6"
	TCL_WIDE_CLICKS                                                                = 1
	TCL_WINDOW_EVENTS                                                              = 4
	TCL_WRITABLE                                                                   = 4
	TCL_ZLIB_COMPRESS_BEST                                                         = 9
	TCL_ZLIB_COMPRESS_DEFAULT                                                      = -1
	TCL_ZLIB_COMPRESS_FAST                                                         = 1
	TCL_ZLIB_COMPRESS_NONE                                                         = 0
	TCL_ZLIB_FINALIZE                                                              = 4
	TCL_ZLIB_FLUSH                                                                 = 2
	TCL_ZLIB_FORMAT_AUTO                                                           = 8
	TCL_ZLIB_FORMAT_GZIP                                                           = 4
	TCL_ZLIB_FORMAT_RAW                                                            = 1
	TCL_ZLIB_FORMAT_ZLIB                                                           = 2
	TCL_ZLIB_FULLFLUSH                                                             = 3
	TCL_ZLIB_NO_FLUSH                                                              = 0
	TCL_ZLIB_STREAM_DEFLATE                                                        = 16
	TCL_ZLIB_STREAM_INFLATE                                                        = 32
	TCP_EXPEDITED_1122                                                             = 0x0002
	TCP_NODELAY                                                                    = 0x0001
	TC_CP_STROKE                                                                   = 0x00000004
	TC_CR_90                                                                       = 0x00000008
	TC_CR_ANY                                                                      = 0x00000010
	TC_EA_DOUBLE                                                                   = 0x00000200
	TC_GP_TRAP                                                                     = 2
	TC_HARDERR                                                                     = 1
	TC_IA_ABLE                                                                     = 0x00000400
	TC_NONCONF_BORROW                                                              = 0
	TC_NONCONF_BORROW_PLUS                                                         = 3
	TC_NONCONF_DISCARD                                                             = 2
	TC_NONCONF_SHAPE                                                               = 1
	TC_NORMAL                                                                      = 0
	TC_OP_CHARACTER                                                                = 0x00000001
	TC_OP_STROKE                                                                   = 0x00000002
	TC_RA_ABLE                                                                     = 0x00002000
	TC_RESERVED                                                                    = 0x00008000
	TC_SA_CONTIN                                                                   = 0x00000100
	TC_SA_DOUBLE                                                                   = 0x00000040
	TC_SA_INTEGER                                                                  = 0x00000080
	TC_SCROLLBLT                                                                   = 0x00010000
	TC_SF_X_YINDEP                                                                 = 0x00000020
	TC_SIGNAL                                                                      = 3
	TC_SO_ABLE                                                                     = 0x00001000
	TC_UA_ABLE                                                                     = 0x00000800
	TC_VA_ABLE                                                                     = 0x00004000
	TECHNOLOGY                                                                     = 2
	TEXTCAPS                                                                       = 34
	THAI_CHARSET                                                                   = 222
	THREAD_ALL_ACCESS                                                              = 2032639
	THREAD_BASE_PRIORITY_IDLE                                                      = -15
	THREAD_BASE_PRIORITY_LOWRT                                                     = 15
	THREAD_BASE_PRIORITY_MAX                                                       = 2
	THREAD_BASE_PRIORITY_MIN                                                       = -2
	THREAD_DIRECT_IMPERSONATION                                                    = 512
	THREAD_GET_CONTEXT                                                             = 8
	THREAD_IMPERSONATE                                                             = 256
	THREAD_MODE_BACKGROUND_BEGIN                                                   = 0x00010000
	THREAD_MODE_BACKGROUND_END                                                     = 0x00020000
	THREAD_PRIORITY_ABOVE_NORMAL                                                   = 1
	THREAD_PRIORITY_BELOW_NORMAL                                                   = -1
	THREAD_PRIORITY_ERROR_RETURN                                                   = 2147483647
	THREAD_PRIORITY_HIGHEST                                                        = 2
	THREAD_PRIORITY_IDLE                                                           = -15
	THREAD_PRIORITY_LOWEST                                                         = -2
	THREAD_PRIORITY_NORMAL                                                         = 0
	THREAD_PRIORITY_TIME_CRITICAL                                                  = 15
	THREAD_PROFILING_FLAG_DISPATCH                                                 = 0x1
	THREAD_QUERY_INFORMATION                                                       = 64
	THREAD_QUERY_LIMITED_INFORMATION                                               = 2048
	THREAD_SET_CONTEXT                                                             = 16
	THREAD_SET_INFORMATION                                                         = 32
	THREAD_SET_LIMITED_INFORMATION                                                 = 1024
	THREAD_SET_THREAD_TOKEN                                                        = 128
	THREAD_SUSPEND_RESUME                                                          = 2
	THREAD_TERMINATE                                                               = 1
	TH_NETDEV                                                                      = 0x00000001
	TH_TAPI                                                                        = 0x00000002
	TIMER_ABSTIME                                                                  = 1
	TIMER_ALL_ACCESS                                                               = 2031619
	TIMER_MODIFY_STATE                                                             = 0x0002
	TIMER_QUERY_STATE                                                              = 0x0001
	TIME_FORCE24HOURFORMAT                                                         = 0x00000008
	TIME_NOMINUTESORSECONDS                                                        = 0x00000001
	TIME_NOSECONDS                                                                 = 0x00000002
	TIME_NOTIMEMARKER                                                              = 0x00000004
	TIME_ZONE_ID_DAYLIGHT                                                          = 2
	TIME_ZONE_ID_STANDARD                                                          = 1
	TIME_ZONE_ID_UNKNOWN                                                           = 0
	TKF_AVAILABLE                                                                  = 0x00000002
	TKF_CONFIRMHOTKEY                                                              = 0x00000008
	TKF_HOTKEYACTIVE                                                               = 0x00000004
	TKF_HOTKEYSOUND                                                                = 0x00000010
	TKF_INDICATOR                                                                  = 0x00000020
	TKF_TOGGLEKEYSON                                                               = 0x00000001
	TLS_MINIMUM_AVAILABLE                                                          = 64
	TME_CANCEL                                                                     = 0x80000000
	TME_HOVER                                                                      = 0x00000001
	TME_LEAVE                                                                      = 0x00000002
	TME_NONCLIENT                                                                  = 0x00000010
	TME_QUERY                                                                      = 0x40000000
	TMPF_DEVICE                                                                    = 0x08
	TMPF_FIXED_PITCH                                                               = 0x01
	TMPF_TRUETYPE                                                                  = 0x04
	TMPF_VECTOR                                                                    = 0x02
	TMP_MAX                                                                        = 32767
	TMP_MAX_S                                                                      = 32767
	TOKEN_ADJUST_DEFAULT                                                           = 128
	TOKEN_ADJUST_GROUPS                                                            = 64
	TOKEN_ADJUST_PRIVILEGES                                                        = 32
	TOKEN_ADJUST_SESSIONID                                                         = 256
	TOKEN_ALL_ACCESS                                                               = 983551
	TOKEN_ALL_ACCESS_P                                                             = 983295
	TOKEN_ASSIGN_PRIMARY                                                           = 1
	TOKEN_DUPLICATE                                                                = 2
	TOKEN_EXECUTE                                                                  = 131072
	TOKEN_IMPERSONATE                                                              = 4
	TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN                                         = 0x2
	TOKEN_MANDATORY_POLICY_NO_WRITE_UP                                             = 0x1
	TOKEN_MANDATORY_POLICY_OFF                                                     = 0x0
	TOKEN_MANDATORY_POLICY_VALID_MASK                                              = 3
	TOKEN_QUERY                                                                    = 8
	TOKEN_QUERY_SOURCE                                                             = 16
	TOKEN_READ                                                                     = 131080
	TOKEN_SOURCE_LENGTH                                                            = 8
	TOKEN_WRITE                                                                    = 131296
	TOMMATH_PRIV_H_                                                                = 0
	TPM_BOTTOMALIGN                                                                = 32
	TPM_CENTERALIGN                                                                = 4
	TPM_HORIZONTAL                                                                 = 0
	TPM_HORNEGANIMATION                                                            = 2048
	TPM_HORPOSANIMATION                                                            = 1024
	TPM_LAYOUTRTL                                                                  = 32768
	TPM_LEFTALIGN                                                                  = 0
	TPM_LEFTBUTTON                                                                 = 0
	TPM_NOANIMATION                                                                = 16384
	TPM_NONOTIFY                                                                   = 128
	TPM_RECURSE                                                                    = 1
	TPM_RETURNCMD                                                                  = 256
	TPM_RIGHTALIGN                                                                 = 8
	TPM_RIGHTBUTTON                                                                = 2
	TPM_TOPALIGN                                                                   = 0
	TPM_VCENTERALIGN                                                               = 16
	TPM_VERNEGANIMATION                                                            = 8192
	TPM_VERPOSANIMATION                                                            = 4096
	TPM_VERTICAL                                                                   = 64
	TRANSACTIONMANAGER_ALL_ACCESS                                                  = 983103
	TRANSACTIONMANAGER_BIND_TRANSACTION                                            = 0x00020
	TRANSACTIONMANAGER_CREATE_RM                                                   = 0x00010
	TRANSACTIONMANAGER_GENERIC_EXECUTE                                             = 131072
	TRANSACTIONMANAGER_GENERIC_READ                                                = 131073
	TRANSACTIONMANAGER_GENERIC_WRITE                                               = 131102
	TRANSACTIONMANAGER_QUERY_INFORMATION                                           = 0x00001
	TRANSACTIONMANAGER_RECOVER                                                     = 0x00004
	TRANSACTIONMANAGER_RENAME                                                      = 0x00008
	TRANSACTIONMANAGER_SET_INFORMATION                                             = 0x00002
	TRANSACTION_ALL_ACCESS                                                         = 2031679
	TRANSACTION_COMMIT                                                             = 8
	TRANSACTION_DO_NOT_PROMOTE                                                     = 0x00000001
	TRANSACTION_ENLIST                                                             = 4
	TRANSACTION_GENERIC_EXECUTE                                                    = 1179672
	TRANSACTION_GENERIC_READ                                                       = 1179649
	TRANSACTION_GENERIC_WRITE                                                      = 1179710
	TRANSACTION_MANAGER_COMMIT_DEFAULT                                             = 0x00000000
	TRANSACTION_MANAGER_COMMIT_LOWEST                                              = 0x00000008
	TRANSACTION_MANAGER_COMMIT_SYSTEM_HIVES                                        = 0x00000004
	TRANSACTION_MANAGER_COMMIT_SYSTEM_VOLUME                                       = 0x00000002
	TRANSACTION_MANAGER_CORRUPT_FOR_PROGRESS                                       = 0x00000020
	TRANSACTION_MANAGER_CORRUPT_FOR_RECOVERY                                       = 0x00000010
	TRANSACTION_MANAGER_MAXIMUM_OPTION                                             = 0x0000003f
	TRANSACTION_MANAGER_VOLATILE                                                   = 0x00000001
	TRANSACTION_MAXIMUM_OPTION                                                     = 0x00000001
	TRANSACTION_NOTIFICATION_TM_ONLINE_FLAG_IS_CLUSTERED                           = 0x1
	TRANSACTION_NOTIFY_COMMIT                                                      = 0x00000004
	TRANSACTION_NOTIFY_COMMIT_COMPLETE                                             = 0x00000040
	TRANSACTION_NOTIFY_COMMIT_FINALIZE                                             = 0x40000000
	TRANSACTION_NOTIFY_COMMIT_REQUEST                                              = 0x04000000
	TRANSACTION_NOTIFY_DELEGATE_COMMIT                                             = 0x00000400
	TRANSACTION_NOTIFY_ENLIST_MASK                                                 = 0x00040000
	TRANSACTION_NOTIFY_ENLIST_PREPREPARE                                           = 0x00001000
	TRANSACTION_NOTIFY_INDOUBT                                                     = 0x00004000
	TRANSACTION_NOTIFY_LAST_RECOVER                                                = 0x00002000
	TRANSACTION_NOTIFY_MARSHAL                                                     = 0x00020000
	TRANSACTION_NOTIFY_MASK                                                        = 0x3fffffff
	TRANSACTION_NOTIFY_PREPARE                                                     = 0x00000002
	TRANSACTION_NOTIFY_PREPARE_COMPLETE                                            = 0x00000020
	TRANSACTION_NOTIFY_PREPREPARE                                                  = 0x00000001
	TRANSACTION_NOTIFY_PREPREPARE_COMPLETE                                         = 0x00000010
	TRANSACTION_NOTIFY_PROMOTE                                                     = 0x08000000
	TRANSACTION_NOTIFY_PROMOTE_NEW                                                 = 0x10000000
	TRANSACTION_NOTIFY_PROPAGATE_PULL                                              = 0x00008000
	TRANSACTION_NOTIFY_PROPAGATE_PUSH                                              = 0x00010000
	TRANSACTION_NOTIFY_RECOVER                                                     = 0x00000100
	TRANSACTION_NOTIFY_RECOVER_QUERY                                               = 0x00000800
	TRANSACTION_NOTIFY_REQUEST_OUTCOME                                             = 0x20000000
	TRANSACTION_NOTIFY_RM_DISCONNECTED                                             = 0x01000000
	TRANSACTION_NOTIFY_ROLLBACK                                                    = 0x00000008
	TRANSACTION_NOTIFY_ROLLBACK_COMPLETE                                           = 0x00000080
	TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT                                         = 0x00000200
	TRANSACTION_NOTIFY_TM_ONLINE                                                   = 0x02000000
	TRANSACTION_PROPAGATE                                                          = 32
	TRANSACTION_QUERY_INFORMATION                                                  = 1
	TRANSACTION_RESOURCE_MANAGER_RIGHTS                                            = 1179703
	TRANSACTION_RIGHT_RESERVED1                                                    = 64
	TRANSACTION_ROLLBACK                                                           = 16
	TRANSACTION_SET_INFORMATION                                                    = 2
	TRANSFORM_CTM                                                                  = 4107
	TRANSPARENT                                                                    = 1
	TRUE                                                                           = 1
	TRUETYPE_FONTTYPE                                                              = 0x004
	TRUNCATE_EXISTING                                                              = 5
	TRY_AGAIN                                                                      = 11002
	TT_AVAILABLE                                                                   = 0x0001
	TT_ENABLED                                                                     = 0x0002
	TT_POLYGON_TYPE                                                                = 24
	TT_PRIM_CSPLINE                                                                = 3
	TT_PRIM_LINE                                                                   = 1
	TT_PRIM_QSPLINE                                                                = 2
	TURKISH_CHARSET                                                                = 162
	TWOSTOPBITS                                                                    = 2
	UCLEANUI                                                                       = 67108864
	UDIRTYUI                                                                       = 134217728
	UDP_CHECKSUM_COVERAGE                                                          = 20
	UDP_NOCHECKSUM                                                                 = 1
	UINT16_MAX                                                                     = 65535
	UINT32_MAX                                                                     = 0xffffffff
	UINT64_MAX                                                                     = 0xffffffffffffffff
	UINT8_MAX                                                                      = 255
	UINTMAX_MAX                                                                    = 18446744073709551615
	UINTPTR_MAX                                                                    = 18446744073709551615
	UINT_FAST16_MAX                                                                = 65535
	UINT_FAST32_MAX                                                                = 4294967295
	UINT_FAST64_MAX                                                                = 18446744073709551615
	UINT_FAST8_MAX                                                                 = 255
	UINT_LEAST16_MAX                                                               = 65535
	UINT_LEAST32_MAX                                                               = 4294967295
	UINT_LEAST64_MAX                                                               = 18446744073709551615
	UINT_LEAST8_MAX                                                                = 255
	UISF_ACTIVE                                                                    = 0x4
	UISF_HIDEACCEL                                                                 = 0x2
	UISF_HIDEFOCUS                                                                 = 0x1
	UIS_CLEAR                                                                      = 2
	UIS_INITIALIZE                                                                 = 3
	UIS_SET                                                                        = 1
	UI_CAP_2700                                                                    = 0x00000001
	UI_CAP_ROT90                                                                   = 0x00000002
	UI_CAP_ROTANY                                                                  = 0x00000004
	ULW_ALPHA                                                                      = 0x00000002
	ULW_COLORKEY                                                                   = 0x00000001
	ULW_EX_NORESIZE                                                                = 0x00000008
	ULW_OPAQUE                                                                     = 0x00000004
	UNALIGNED64                                                                    = 0
	UNICODE_NOCHAR                                                                 = 0xFFFF
	UNICODE_STRING_MAX_CHARS                                                       = 32767
	UNIVERSAL_NAME_INFO_LEVEL                                                      = 0x00000001
	UNLOAD_DLL_DEBUG_EVENT                                                         = 7
	UNPROTECTED_DACL_SECURITY_INFORMATION                                          = 536870912
	UNPROTECTED_SACL_SECURITY_INFORMATION                                          = 268435456
	UNWIND_HISTORY_TABLE_GLOBAL                                                    = 1
	UNWIND_HISTORY_TABLE_LOCAL                                                     = 2
	UNWIND_HISTORY_TABLE_NONE                                                      = 0
	UNWIND_HISTORY_TABLE_SIZE                                                      = 12
	UNW_FLAG_CHAININFO                                                             = 0x4
	UNW_FLAG_EHANDLER                                                              = 0x1
	UNW_FLAG_NHANDLER                                                              = 0x0
	UNW_FLAG_UHANDLER                                                              = 0x2
	UOI_FLAGS                                                                      = 1
	UOI_NAME                                                                       = 2
	UOI_TIMERPROC_EXCEPTION_SUPPRESSION                                            = 7
	UOI_TYPE                                                                       = 3
	UOI_USER_SID                                                                   = 4
	UPOINTER_32                                                                    = 0
	USER_TIMER_MAXIMUM                                                             = 0x7FFFFFFF
	USER_TIMER_MINIMUM                                                             = 0x0000000A
	USE_PUTENV                                                                     = 1
	USE_PUTENV_FOR_UNSET                                                           = 1
	USE_TCLALLOC                                                                   = 0
	VALID_INHERIT_FLAGS                                                            = 31
	VARIABLE_PITCH                                                                 = 2
	VAR_ALL_HASH                                                                   = 4236
	VAR_ALL_TRACES                                                                 = 2160
	VAR_ARGUMENT                                                                   = 0x100
	VAR_ARRAY                                                                      = 0x1
	VAR_ARRAY_ELEMENT                                                              = 0x1000
	VAR_DEAD_HASH                                                                  = 0x8
	VAR_IN_HASHTABLE                                                               = 0x4
	VAR_IS_ARGS                                                                    = 0x400
	VAR_LINK                                                                       = 0x2
	VAR_NAMESPACE_VAR                                                              = 0x80
	VAR_RESOLVED                                                                   = 0x8000
	VAR_SEARCH_ACTIVE                                                              = 0x4000
	VAR_TEMPORARY                                                                  = 0x200
	VAR_TRACED_ARRAY                                                               = 0x800
	VAR_TRACED_READ                                                                = 0x10
	VAR_TRACED_UNSET                                                               = 0x40
	VAR_TRACED_WRITE                                                               = 0x20
	VAR_TRACE_ACTIVE                                                               = 0x2000
	VERTRES                                                                        = 10
	VERTSIZE                                                                       = 6
	VER_AND                                                                        = 6
	VER_BUILDNUMBER                                                                = 0x0000004
	VER_CONDITION_MASK                                                             = 7
	VER_EQUAL                                                                      = 1
	VER_GREATER                                                                    = 2
	VER_GREATER_EQUAL                                                              = 3
	VER_H                                                                          = 0
	VER_LESS                                                                       = 4
	VER_LESS_EQUAL                                                                 = 5
	VER_MAJORVERSION                                                               = 0x0000002
	VER_MINORVERSION                                                               = 0x0000001
	VER_NT_DOMAIN_CONTROLLER                                                       = 0x0000002
	VER_NT_SERVER                                                                  = 0x0000003
	VER_NT_WORKSTATION                                                             = 0x0000001
	VER_NUM_BITS_PER_CONDITION_MASK                                                = 3
	VER_OR                                                                         = 7
	VER_PLATFORMID                                                                 = 0x0000008
	VER_PLATFORM_WIN32_NT                                                          = 2
	VER_PLATFORM_WIN32_WINDOWS                                                     = 1
	VER_PLATFORM_WIN32s                                                            = 0
	VER_PRODUCT_TYPE                                                               = 0x0000080
	VER_SERVER_NT                                                                  = 0x80000000
	VER_SERVICEPACKMAJOR                                                           = 0x0000020
	VER_SERVICEPACKMINOR                                                           = 0x0000010
	VER_SUITENAME                                                                  = 0x0000040
	VER_SUITE_BACKOFFICE                                                           = 0x00000004
	VER_SUITE_BLADE                                                                = 0x00000400
	VER_SUITE_COMMUNICATIONS                                                       = 0x00000008
	VER_SUITE_COMPUTE_SERVER                                                       = 0x00004000
	VER_SUITE_DATACENTER                                                           = 0x00000080
	VER_SUITE_EMBEDDEDNT                                                           = 0x00000040
	VER_SUITE_EMBEDDED_RESTRICTED                                                  = 0x00000800
	VER_SUITE_ENTERPRISE                                                           = 0x00000002
	VER_SUITE_PERSONAL                                                             = 0x00000200
	VER_SUITE_SECURITY_APPLIANCE                                                   = 0x00001000
	VER_SUITE_SINGLEUSERTS                                                         = 0x00000100
	VER_SUITE_SMALLBUSINESS                                                        = 0x00000001
	VER_SUITE_SMALLBUSINESS_RESTRICTED                                             = 0x00000020
	VER_SUITE_STORAGE_SERVER                                                       = 0x00002000
	VER_SUITE_TERMINAL                                                             = 0x00000010
	VER_SUITE_WH_SERVER                                                            = 0x00008000
	VER_WORKSTATION_NT                                                             = 0x40000000
	VFFF_ISSHAREDFILE                                                              = 0x0001
	VFF_BUFFTOOSMALL                                                               = 0x0004
	VFF_CURNEDEST                                                                  = 0x0001
	VFF_FILEINUSE                                                                  = 0x0002
	VFT2_DRV_COMM                                                                  = 10
	VFT2_DRV_DISPLAY                                                               = 4
	VFT2_DRV_INPUTMETHOD                                                           = 11
	VFT2_DRV_INSTALLABLE                                                           = 8
	VFT2_DRV_KEYBOARD                                                              = 2
	VFT2_DRV_LANGUAGE                                                              = 3
	VFT2_DRV_MOUSE                                                                 = 5
	VFT2_DRV_NETWORK                                                               = 6
	VFT2_DRV_PRINTER                                                               = 1
	VFT2_DRV_SOUND                                                                 = 9
	VFT2_DRV_SYSTEM                                                                = 7
	VFT2_DRV_VERSIONED_PRINTER                                                     = 12
	VFT2_FONT_RASTER                                                               = 1
	VFT2_FONT_TRUETYPE                                                             = 3
	VFT2_FONT_VECTOR                                                               = 2
	VFT2_UNKNOWN                                                                   = 0
	VFT_APP                                                                        = 1
	VFT_DLL                                                                        = 2
	VFT_DRV                                                                        = 3
	VFT_FONT                                                                       = 4
	VFT_STATIC_LIB                                                                 = 7
	VFT_UNKNOWN                                                                    = 0
	VFT_VXD                                                                        = 5
	VIETNAMESE_CHARSET                                                             = 163
	VIEW_E_FIRST                                                                   = 2147746112
	VIEW_E_LAST                                                                    = 2147746127
	VIEW_S_FIRST                                                                   = 262464
	VIEW_S_LAST                                                                    = 262479
	VIFF_DONTDELETEOLD                                                             = 0x0002
	VIFF_FORCEINSTALL                                                              = 0x0001
	VIF_ACCESSVIOLATION                                                            = 512
	VIF_BUFFTOOSMALL                                                               = 262144
	VIF_CANNOTCREATE                                                               = 2048
	VIF_CANNOTDELETE                                                               = 4096
	VIF_CANNOTDELETECUR                                                            = 16384
	VIF_CANNOTLOADCABINET                                                          = 1048576
	VIF_CANNOTLOADLZ32                                                             = 524288
	VIF_CANNOTREADDST                                                              = 131072
	VIF_CANNOTREADSRC                                                              = 65536
	VIF_CANNOTRENAME                                                               = 8192
	VIF_DIFFCODEPG                                                                 = 16
	VIF_DIFFLANG                                                                   = 8
	VIF_DIFFTYPE                                                                   = 32
	VIF_FILEINUSE                                                                  = 128
	VIF_MISMATCH                                                                   = 2
	VIF_OUTOFMEMORY                                                                = 32768
	VIF_OUTOFSPACE                                                                 = 256
	VIF_SHARINGVIOLATION                                                           = 1024
	VIF_SRCOLD                                                                     = 4
	VIF_TEMPFILE                                                                   = 1
	VIF_WRITEPROT                                                                  = 64
	VK_ACCEPT                                                                      = 0x1E
	VK_ADD                                                                         = 0x6B
	VK_APPS                                                                        = 0x5D
	VK_ATTN                                                                        = 0xF6
	VK_BACK                                                                        = 0x08
	VK_BROWSER_BACK                                                                = 0xA6
	VK_BROWSER_FAVORITES                                                           = 0xAB
	VK_BROWSER_FORWARD                                                             = 0xA7
	VK_BROWSER_HOME                                                                = 0xAC
	VK_BROWSER_REFRESH                                                             = 0xA8
	VK_BROWSER_SEARCH                                                              = 0xAA
	VK_BROWSER_STOP                                                                = 0xA9
	VK_CANCEL                                                                      = 0x03
	VK_CAPITAL                                                                     = 0x14
	VK_CLEAR                                                                       = 0x0C
	VK_CONTROL                                                                     = 0x11
	VK_CONVERT                                                                     = 0x1C
	VK_CRSEL                                                                       = 0xF7
	VK_DECIMAL                                                                     = 0x6E
	VK_DELETE                                                                      = 0x2E
	VK_DIVIDE                                                                      = 0x6F
	VK_DOWN                                                                        = 0x28
	VK_END                                                                         = 0x23
	VK_EREOF                                                                       = 0xF9
	VK_ESCAPE                                                                      = 0x1B
	VK_EXECUTE                                                                     = 0x2B
	VK_EXSEL                                                                       = 0xF8
	VK_F1                                                                          = 0x70
	VK_F10                                                                         = 0x79
	VK_F11                                                                         = 0x7A
	VK_F12                                                                         = 0x7B
	VK_F13                                                                         = 0x7C
	VK_F14                                                                         = 0x7D
	VK_F15                                                                         = 0x7E
	VK_F16                                                                         = 0x7F
	VK_F17                                                                         = 0x80
	VK_F18                                                                         = 0x81
	VK_F19                                                                         = 0x82
	VK_F2                                                                          = 0x71
	VK_F20                                                                         = 0x83
	VK_F21                                                                         = 0x84
	VK_F22                                                                         = 0x85
	VK_F23                                                                         = 0x86
	VK_F24                                                                         = 0x87
	VK_F3                                                                          = 0x72
	VK_F4                                                                          = 0x73
	VK_F5                                                                          = 0x74
	VK_F6                                                                          = 0x75
	VK_F7                                                                          = 0x76
	VK_F8                                                                          = 0x77
	VK_F9                                                                          = 0x78
	VK_FINAL                                                                       = 0x18
	VK_HANGEUL                                                                     = 0x15
	VK_HANGUL                                                                      = 0x15
	VK_HANJA                                                                       = 0x19
	VK_HELP                                                                        = 0x2F
	VK_HOME                                                                        = 0x24
	VK_ICO_00                                                                      = 0xE4
	VK_ICO_CLEAR                                                                   = 0xE6
	VK_ICO_HELP                                                                    = 0xE3
	VK_IME_OFF                                                                     = 0x1A
	VK_IME_ON                                                                      = 0x16
	VK_INSERT                                                                      = 0x2D
	VK_JUNJA                                                                       = 0x17
	VK_KANA                                                                        = 0x15
	VK_KANJI                                                                       = 0x19
	VK_LAUNCH_APP1                                                                 = 0xB6
	VK_LAUNCH_APP2                                                                 = 0xB7
	VK_LAUNCH_MAIL                                                                 = 0xB4
	VK_LAUNCH_MEDIA_SELECT                                                         = 0xB5
	VK_LBUTTON                                                                     = 0x01
	VK_LCONTROL                                                                    = 0xA2
	VK_LEFT                                                                        = 0x25
	VK_LMENU                                                                       = 0xA4
	VK_LSHIFT                                                                      = 0xA0
	VK_LWIN                                                                        = 0x5B
	VK_MBUTTON                                                                     = 0x04
	VK_MEDIA_NEXT_TRACK                                                            = 0xB0
	VK_MEDIA_PLAY_PAUSE                                                            = 0xB3
	VK_MEDIA_PREV_TRACK                                                            = 0xB1
	VK_MEDIA_STOP                                                                  = 0xB2
	VK_MENU                                                                        = 0x12
	VK_MODECHANGE                                                                  = 0x1F
	VK_MULTIPLY                                                                    = 0x6A
	VK_NEXT                                                                        = 0x22
	VK_NONAME                                                                      = 0xFC
	VK_NONCONVERT                                                                  = 0x1D
	VK_NUMLOCK                                                                     = 0x90
	VK_NUMPAD0                                                                     = 0x60
	VK_NUMPAD1                                                                     = 0x61
	VK_NUMPAD2                                                                     = 0x62
	VK_NUMPAD3                                                                     = 0x63
	VK_NUMPAD4                                                                     = 0x64
	VK_NUMPAD5                                                                     = 0x65
	VK_NUMPAD6                                                                     = 0x66
	VK_NUMPAD7                                                                     = 0x67
	VK_NUMPAD8                                                                     = 0x68
	VK_NUMPAD9                                                                     = 0x69
	VK_OEM_1                                                                       = 0xBA
	VK_OEM_102                                                                     = 0xE2
	VK_OEM_2                                                                       = 0xBF
	VK_OEM_3                                                                       = 0xC0
	VK_OEM_4                                                                       = 0xDB
	VK_OEM_5                                                                       = 0xDC
	VK_OEM_6                                                                       = 0xDD
	VK_OEM_7                                                                       = 0xDE
	VK_OEM_8                                                                       = 0xDF
	VK_OEM_ATTN                                                                    = 0xF0
	VK_OEM_AUTO                                                                    = 0xF3
	VK_OEM_AX                                                                      = 0xE1
	VK_OEM_BACKTAB                                                                 = 0xF5
	VK_OEM_CLEAR                                                                   = 0xFE
	VK_OEM_COMMA                                                                   = 0xBC
	VK_OEM_COPY                                                                    = 0xF2
	VK_OEM_CUSEL                                                                   = 0xEF
	VK_OEM_ENLW                                                                    = 0xF4
	VK_OEM_FINISH                                                                  = 0xF1
	VK_OEM_FJ_JISHO                                                                = 0x92
	VK_OEM_FJ_LOYA                                                                 = 0x95
	VK_OEM_FJ_MASSHOU                                                              = 0x93
	VK_OEM_FJ_ROYA                                                                 = 0x96
	VK_OEM_FJ_TOUROKU                                                              = 0x94
	VK_OEM_JUMP                                                                    = 0xEA
	VK_OEM_MINUS                                                                   = 0xBD
	VK_OEM_NEC_EQUAL                                                               = 0x92
	VK_OEM_PA1                                                                     = 0xEB
	VK_OEM_PA2                                                                     = 0xEC
	VK_OEM_PA3                                                                     = 0xED
	VK_OEM_PERIOD                                                                  = 0xBE
	VK_OEM_PLUS                                                                    = 0xBB
	VK_OEM_RESET                                                                   = 0xE9
	VK_OEM_WSCTRL                                                                  = 0xEE
	VK_PA1                                                                         = 0xFD
	VK_PACKET                                                                      = 0xE7
	VK_PAUSE                                                                       = 0x13
	VK_PLAY                                                                        = 0xFA
	VK_PRINT                                                                       = 0x2A
	VK_PRIOR                                                                       = 0x21
	VK_PROCESSKEY                                                                  = 0xE5
	VK_RBUTTON                                                                     = 0x02
	VK_RCONTROL                                                                    = 0xA3
	VK_RETURN                                                                      = 0x0D
	VK_RIGHT                                                                       = 0x27
	VK_RMENU                                                                       = 0xA5
	VK_RSHIFT                                                                      = 0xA1
	VK_RWIN                                                                        = 0x5C
	VK_SCROLL                                                                      = 0x91
	VK_SELECT                                                                      = 0x29
	VK_SEPARATOR                                                                   = 0x6C
	VK_SHIFT                                                                       = 0x10
	VK_SLEEP                                                                       = 0x5F
	VK_SNAPSHOT                                                                    = 0x2C
	VK_SPACE                                                                       = 0x20
	VK_SUBTRACT                                                                    = 0x6D
	VK_TAB                                                                         = 0x09
	VK_UP                                                                          = 0x26
	VK_VOLUME_DOWN                                                                 = 0xAE
	VK_VOLUME_MUTE                                                                 = 0xAD
	VK_VOLUME_UP                                                                   = 0xAF
	VK_XBUTTON1                                                                    = 0x05
	VK_XBUTTON2                                                                    = 0x06
	VK_ZOOM                                                                        = 0xFB
	VOLUME_NAME_DOS                                                                = 0x0
	VOLUME_NAME_GUID                                                               = 0x1
	VOLUME_NAME_NONE                                                               = 0x4
	VOLUME_NAME_NT                                                                 = 0x2
	VOS_DOS                                                                        = 65536
	VOS_DOS_WINDOWS16                                                              = 65537
	VOS_DOS_WINDOWS32                                                              = 65540
	VOS_NT                                                                         = 262144
	VOS_NT_WINDOWS32                                                               = 262148
	VOS_OS216                                                                      = 131072
	VOS_OS216_PM16                                                                 = 131074
	VOS_OS232                                                                      = 196608
	VOS_OS232_PM32                                                                 = 196611
	VOS_UNKNOWN                                                                    = 0
	VOS_WINCE                                                                      = 327680
	VOS__BASE                                                                      = 0
	VOS__PM16                                                                      = 2
	VOS__PM32                                                                      = 3
	VOS__WINDOWS16                                                                 = 1
	VOS__WINDOWS32                                                                 = 4
	VP_COMMAND_GET                                                                 = 0x0001
	VP_COMMAND_SET                                                                 = 0x0002
	VP_CP_CMD_ACTIVATE                                                             = 0x0001
	VP_CP_CMD_CHANGE                                                               = 0x0004
	VP_CP_CMD_DEACTIVATE                                                           = 0x0002
	VP_CP_TYPE_APS_TRIGGER                                                         = 0x0001
	VP_CP_TYPE_MACROVISION                                                         = 0x0002
	VP_FLAGS_BRIGHTNESS                                                            = 0x0040
	VP_FLAGS_CONTRAST                                                              = 0x0080
	VP_FLAGS_COPYPROTECT                                                           = 0x0100
	VP_FLAGS_FLICKER                                                               = 0x0004
	VP_FLAGS_MAX_UNSCALED                                                          = 0x0010
	VP_FLAGS_OVERSCAN                                                              = 0x0008
	VP_FLAGS_POSITION                                                              = 0x0020
	VP_FLAGS_TV_MODE                                                               = 0x0001
	VP_FLAGS_TV_STANDARD                                                           = 0x0002
	VP_MODE_TV_PLAYBACK                                                            = 0x0002
	VP_MODE_WIN_GRAPHICS                                                           = 0x0001
	VP_TV_STANDARD_NTSC_433                                                        = 0x00010000
	VP_TV_STANDARD_NTSC_M                                                          = 0x0001
	VP_TV_STANDARD_NTSC_M_J                                                        = 0x0002
	VP_TV_STANDARD_PAL_60                                                          = 0x00040000
	VP_TV_STANDARD_PAL_B                                                           = 0x0004
	VP_TV_STANDARD_PAL_D                                                           = 0x0008
	VP_TV_STANDARD_PAL_G                                                           = 0x00020000
	VP_TV_STANDARD_PAL_H                                                           = 0x0010
	VP_TV_STANDARD_PAL_I                                                           = 0x0020
	VP_TV_STANDARD_PAL_M                                                           = 0x0040
	VP_TV_STANDARD_PAL_N                                                           = 0x0080
	VP_TV_STANDARD_SECAM_B                                                         = 0x0100
	VP_TV_STANDARD_SECAM_D                                                         = 0x0200
	VP_TV_STANDARD_SECAM_G                                                         = 0x0400
	VP_TV_STANDARD_SECAM_H                                                         = 0x0800
	VP_TV_STANDARD_SECAM_K                                                         = 0x1000
	VP_TV_STANDARD_SECAM_K1                                                        = 0x2000
	VP_TV_STANDARD_SECAM_L                                                         = 0x4000
	VP_TV_STANDARD_SECAM_L1                                                        = 0x00080000
	VP_TV_STANDARD_WIN_VGA                                                         = 0x8000
	VREFRESH                                                                       = 116
	VS_FFI_FILEFLAGSMASK                                                           = 63
	VS_FFI_SIGNATURE                                                               = 4277077181
	VS_FFI_STRUCVERSION                                                            = 65536
	VS_FF_DEBUG                                                                    = 1
	VS_FF_INFOINFERRED                                                             = 16
	VS_FF_PATCHED                                                                  = 4
	VS_FF_PRERELEASE                                                               = 2
	VS_FF_PRIVATEBUILD                                                             = 8
	VS_FF_SPECIALBUILD                                                             = 32
	VS_USER_DEFINED                                                                = 100
	VS_VERSION_INFO                                                                = 1
	VTA_BASELINE                                                                   = 24
	VTA_BOTTOM                                                                     = 2
	VTA_CENTER                                                                     = 6
	VTA_LEFT                                                                       = 8
	VTA_RIGHT                                                                      = 0
	VTA_TOP                                                                        = 0
	WAIT_TIMEOUT                                                                   = 258
	WARNING_IPSEC_MM_POLICY_PRUNED                                                 = 13024
	WARNING_IPSEC_QM_POLICY_PRUNED                                                 = 13025
	WA_ACTIVE                                                                      = 1
	WA_CLICKACTIVE                                                                 = 2
	WA_INACTIVE                                                                    = 0
	WB_ISDELIMITER                                                                 = 2
	WB_LEFT                                                                        = 0
	WB_RIGHT                                                                       = 1
	WCHAR_MAX                                                                      = 0xffff
	WCHAR_MIN                                                                      = 0
	WC_COMPOSITECHECK                                                              = 0x00000200
	WC_DEFAULTCHAR                                                                 = 0x00000040
	WC_DISCARDNS                                                                   = 0x00000010
	WC_NO_BEST_FIT_CHARS                                                           = 0x00000400
	WC_SEPCHARS                                                                    = 0x00000020
	WDK_NTDDI_VERSION                                                              = 167772170
	WGL_FONT_LINES                                                                 = 0
	WGL_FONT_POLYGONS                                                              = 1
	WGL_SWAPMULTIPLE_MAX                                                           = 16
	WGL_SWAP_MAIN_PLANE                                                            = 0x00000001
	WGL_SWAP_OVERLAY1                                                              = 0x00000002
	WGL_SWAP_OVERLAY10                                                             = 0x00000400
	WGL_SWAP_OVERLAY11                                                             = 0x00000800
	WGL_SWAP_OVERLAY12                                                             = 0x00001000
	WGL_SWAP_OVERLAY13                                                             = 0x00002000
	WGL_SWAP_OVERLAY14                                                             = 0x00004000
	WGL_SWAP_OVERLAY15                                                             = 0x00008000
	WGL_SWAP_OVERLAY2                                                              = 0x00000004
	WGL_SWAP_OVERLAY3                                                              = 0x00000008
	WGL_SWAP_OVERLAY4                                                              = 0x00000010
	WGL_SWAP_OVERLAY5                                                              = 0x00000020
	WGL_SWAP_OVERLAY6                                                              = 0x00000040
	WGL_SWAP_OVERLAY7                                                              = 0x00000080
	WGL_SWAP_OVERLAY8                                                              = 0x00000100
	WGL_SWAP_OVERLAY9                                                              = 0x00000200
	WGL_SWAP_UNDERLAY1                                                             = 0x00010000
	WGL_SWAP_UNDERLAY10                                                            = 0x02000000
	WGL_SWAP_UNDERLAY11                                                            = 0x04000000
	WGL_SWAP_UNDERLAY12                                                            = 0x08000000
	WGL_SWAP_UNDERLAY13                                                            = 0x10000000
	WGL_SWAP_UNDERLAY14                                                            = 0x20000000
	WGL_SWAP_UNDERLAY15                                                            = 0x40000000
	WGL_SWAP_UNDERLAY2                                                             = 0x00020000
	WGL_SWAP_UNDERLAY3                                                             = 0x00040000
	WGL_SWAP_UNDERLAY4                                                             = 0x00080000
	WGL_SWAP_UNDERLAY5                                                             = 0x00100000
	WGL_SWAP_UNDERLAY6                                                             = 0x00200000
	WGL_SWAP_UNDERLAY7                                                             = 0x00400000
	WGL_SWAP_UNDERLAY8                                                             = 0x00800000
	WGL_SWAP_UNDERLAY9                                                             = 0x01000000
	WHEEL_DELTA                                                                    = 120
	WHEEL_PAGESCROLL                                                               = 4294967295
	WHITEONBLACK                                                                   = 2
	WHITE_BRUSH                                                                    = 0
	WHITE_PEN                                                                      = 6
	WH_CALLWNDPROC                                                                 = 4
	WH_CALLWNDPROCRET                                                              = 12
	WH_CBT                                                                         = 5
	WH_DEBUG                                                                       = 9
	WH_FOREGROUNDIDLE                                                              = 11
	WH_GETMESSAGE                                                                  = 3
	WH_HARDWARE                                                                    = 8
	WH_JOURNALPLAYBACK                                                             = 1
	WH_JOURNALRECORD                                                               = 0
	WH_KEYBOARD                                                                    = 2
	WH_KEYBOARD_LL                                                                 = 13
	WH_MAX                                                                         = 14
	WH_MAXHOOK                                                                     = 14
	WH_MIN                                                                         = -1
	WH_MINHOOK                                                                     = -1
	WH_MOUSE                                                                       = 7
	WH_MOUSE_LL                                                                    = 14
	WH_MSGFILTER                                                                   = -1
	WH_SHELL                                                                       = 10
	WH_SYSMSGFILTER                                                                = 6
	WINAPI                                                                         = 0
	WINAPI_FAMILY                                                                  = 3
	WINAPI_FAMILY_APP                                                              = 2
	WINAPI_FAMILY_DESKTOP_APP                                                      = 3
	WINAPI_INLINE                                                                  = 0
	WINAPI_PARTITION_APP                                                           = 0x2
	WINAPI_PARTITION_DESKTOP                                                       = 0x1
	WINDING                                                                        = 2
	WINDOW_BUFFER_SIZE_EVENT                                                       = 0x4
	WINEVENT_INCONTEXT                                                             = 0x0004
	WINEVENT_OUTOFCONTEXT                                                          = 0x0000
	WINEVENT_SKIPOWNPROCESS                                                        = 0x0002
	WINEVENT_SKIPOWNTHREAD                                                         = 0x0001
	WINPTHREAD_API                                                                 = 0
	WINSTA_ACCESSCLIPBOARD                                                         = 4
	WINSTA_ACCESSGLOBALATOMS                                                       = 32
	WINSTA_ALL_ACCESS                                                              = 895
	WINSTA_CREATEDESKTOP                                                           = 8
	WINSTA_ENUMDESKTOPS                                                            = 1
	WINSTA_ENUMERATE                                                               = 256
	WINSTA_EXITWINDOWS                                                             = 64
	WINSTA_READATTRIBUTES                                                          = 2
	WINSTA_READSCREEN                                                              = 512
	WINSTA_WRITEATTRIBUTES                                                         = 16
	WINT_MAX                                                                       = 0xffff
	WINT_MIN                                                                       = 0
	WINVER                                                                         = 0x0501
	WIN_PTHREADS_SIGNAL_H                                                          = 0
	WIN_PTHREADS_TIME_H                                                            = 0
	WMSZ_BOTTOM                                                                    = 6
	WMSZ_BOTTOMLEFT                                                                = 7
	WMSZ_BOTTOMRIGHT                                                               = 8
	WMSZ_LEFT                                                                      = 1
	WMSZ_RIGHT                                                                     = 2
	WMSZ_TOP                                                                       = 3
	WMSZ_TOPLEFT                                                                   = 4
	WMSZ_TOPRIGHT                                                                  = 5
	WM_ACTIVATE                                                                    = 0x0006
	WM_ACTIVATEAPP                                                                 = 0x001C
	WM_AFXFIRST                                                                    = 0x0360
	WM_AFXLAST                                                                     = 0x037F
	WM_APP                                                                         = 0x8000
	WM_APPCOMMAND                                                                  = 0x0319
	WM_ASKCBFORMATNAME                                                             = 0x030C
	WM_CANCELJOURNAL                                                               = 0x004B
	WM_CANCELMODE                                                                  = 0x001F
	WM_CAPTURECHANGED                                                              = 0x0215
	WM_CHANGECBCHAIN                                                               = 0x030D
	WM_CHANGEUISTATE                                                               = 0x0127
	WM_CHAR                                                                        = 0x0102
	WM_CHARTOITEM                                                                  = 0x002F
	WM_CHILDACTIVATE                                                               = 0x0022
	WM_CLEAR                                                                       = 0x0303
	WM_CLIPBOARDUPDATE                                                             = 0x031d
	WM_CLOSE                                                                       = 0x0010
	WM_COMMAND                                                                     = 0x0111
	WM_COMMNOTIFY                                                                  = 0x0044
	WM_COMPACTING                                                                  = 0x0041
	WM_COMPAREITEM                                                                 = 0x0039
	WM_CONTEXTMENU                                                                 = 0x007B
	WM_COPY                                                                        = 0x0301
	WM_COPYDATA                                                                    = 0x004A
	WM_CREATE                                                                      = 0x0001
	WM_CTLCOLORBTN                                                                 = 0x0135
	WM_CTLCOLORDLG                                                                 = 0x0136
	WM_CTLCOLOREDIT                                                                = 0x0133
	WM_CTLCOLORLISTBOX                                                             = 0x0134
	WM_CTLCOLORMSGBOX                                                              = 0x0132
	WM_CTLCOLORSCROLLBAR                                                           = 0x0137
	WM_CTLCOLORSTATIC                                                              = 0x0138
	WM_CUT                                                                         = 0x0300
	WM_DEADCHAR                                                                    = 0x0103
	WM_DELETEITEM                                                                  = 0x002D
	WM_DESTROY                                                                     = 0x0002
	WM_DESTROYCLIPBOARD                                                            = 0x0307
	WM_DEVICECHANGE                                                                = 0x0219
	WM_DEVMODECHANGE                                                               = 0x001B
	WM_DISPLAYCHANGE                                                               = 0x007E
	WM_DRAWCLIPBOARD                                                               = 0x0308
	WM_DRAWITEM                                                                    = 0x002B
	WM_DROPFILES                                                                   = 0x0233
	WM_ENABLE                                                                      = 0x000A
	WM_ENDSESSION                                                                  = 0x0016
	WM_ENTERIDLE                                                                   = 0x0121
	WM_ENTERMENULOOP                                                               = 0x0211
	WM_ENTERSIZEMOVE                                                               = 0x0231
	WM_ERASEBKGND                                                                  = 0x0014
	WM_EXITMENULOOP                                                                = 0x0212
	WM_EXITSIZEMOVE                                                                = 0x0232
	WM_FONTCHANGE                                                                  = 0x001D
	WM_GETDLGCODE                                                                  = 0x0087
	WM_GETFONT                                                                     = 0x0031
	WM_GETHOTKEY                                                                   = 0x0033
	WM_GETICON                                                                     = 0x007F
	WM_GETMINMAXINFO                                                               = 0x0024
	WM_GETOBJECT                                                                   = 0x003D
	WM_GETTEXT                                                                     = 0x000D
	WM_GETTEXTLENGTH                                                               = 0x000E
	WM_HANDHELDFIRST                                                               = 0x0358
	WM_HANDHELDLAST                                                                = 0x035F
	WM_HELP                                                                        = 0x0053
	WM_HOTKEY                                                                      = 0x0312
	WM_HSCROLL                                                                     = 0x0114
	WM_HSCROLLCLIPBOARD                                                            = 0x030E
	WM_ICONERASEBKGND                                                              = 0x0027
	WM_IME_CHAR                                                                    = 0x0286
	WM_IME_COMPOSITION                                                             = 0x010F
	WM_IME_COMPOSITIONFULL                                                         = 0x0284
	WM_IME_CONTROL                                                                 = 0x0283
	WM_IME_ENDCOMPOSITION                                                          = 0x010E
	WM_IME_KEYDOWN                                                                 = 0x0290
	WM_IME_KEYLAST                                                                 = 0x010F
	WM_IME_KEYUP                                                                   = 0x0291
	WM_IME_NOTIFY                                                                  = 0x0282
	WM_IME_REQUEST                                                                 = 0x0288
	WM_IME_SELECT                                                                  = 0x0285
	WM_IME_SETCONTEXT                                                              = 0x0281
	WM_IME_STARTCOMPOSITION                                                        = 0x010D
	WM_INITDIALOG                                                                  = 0x0110
	WM_INITMENU                                                                    = 0x0116
	WM_INITMENUPOPUP                                                               = 0x0117
	WM_INPUT                                                                       = 0x00FF
	WM_INPUTLANGCHANGE                                                             = 0x0051
	WM_INPUTLANGCHANGEREQUEST                                                      = 0x0050
	WM_INPUT_DEVICE_CHANGE                                                         = 0x00fe
	WM_KEYDOWN                                                                     = 0x0100
	WM_KEYFIRST                                                                    = 0x0100
	WM_KEYLAST                                                                     = 0x0109
	WM_KEYUP                                                                       = 0x0101
	WM_KILLFOCUS                                                                   = 0x0008
	WM_LBUTTONDBLCLK                                                               = 0x0203
	WM_LBUTTONDOWN                                                                 = 0x0201
	WM_LBUTTONUP                                                                   = 0x0202
	WM_MBUTTONDBLCLK                                                               = 0x0209
	WM_MBUTTONDOWN                                                                 = 0x0207
	WM_MBUTTONUP                                                                   = 0x0208
	WM_MDIACTIVATE                                                                 = 0x0222
	WM_MDICASCADE                                                                  = 0x0227
	WM_MDICREATE                                                                   = 0x0220
	WM_MDIDESTROY                                                                  = 0x0221
	WM_MDIGETACTIVE                                                                = 0x0229
	WM_MDIICONARRANGE                                                              = 0x0228
	WM_MDIMAXIMIZE                                                                 = 0x0225
	WM_MDINEXT                                                                     = 0x0224
	WM_MDIREFRESHMENU                                                              = 0x0234
	WM_MDIRESTORE                                                                  = 0x0223
	WM_MDISETMENU                                                                  = 0x0230
	WM_MDITILE                                                                     = 0x0226
	WM_MEASUREITEM                                                                 = 0x002C
	WM_MENUCHAR                                                                    = 0x0120
	WM_MENUCOMMAND                                                                 = 0x0126
	WM_MENUDRAG                                                                    = 0x0123
	WM_MENUGETOBJECT                                                               = 0x0124
	WM_MENURBUTTONUP                                                               = 0x0122
	WM_MENUSELECT                                                                  = 0x011F
	WM_MOUSEACTIVATE                                                               = 0x0021
	WM_MOUSEFIRST                                                                  = 0x0200
	WM_MOUSEHOVER                                                                  = 0x02A1
	WM_MOUSELAST                                                                   = 0x020d
	WM_MOUSELEAVE                                                                  = 0x02A3
	WM_MOUSEMOVE                                                                   = 0x0200
	WM_MOUSEWHEEL                                                                  = 0x020A
	WM_MOVE                                                                        = 0x0003
	WM_MOVING                                                                      = 0x0216
	WM_NCACTIVATE                                                                  = 0x0086
	WM_NCCALCSIZE                                                                  = 0x0083
	WM_NCCREATE                                                                    = 0x0081
	WM_NCDESTROY                                                                   = 0x0082
	WM_NCHITTEST                                                                   = 0x0084
	WM_NCLBUTTONDBLCLK                                                             = 0x00A3
	WM_NCLBUTTONDOWN                                                               = 0x00A1
	WM_NCLBUTTONUP                                                                 = 0x00A2
	WM_NCMBUTTONDBLCLK                                                             = 0x00A9
	WM_NCMBUTTONDOWN                                                               = 0x00A7
	WM_NCMBUTTONUP                                                                 = 0x00A8
	WM_NCMOUSEHOVER                                                                = 0x02A0
	WM_NCMOUSELEAVE                                                                = 0x02A2
	WM_NCMOUSEMOVE                                                                 = 0x00A0
	WM_NCPAINT                                                                     = 0x0085
	WM_NCRBUTTONDBLCLK                                                             = 0x00A6
	WM_NCRBUTTONDOWN                                                               = 0x00A4
	WM_NCRBUTTONUP                                                                 = 0x00A5
	WM_NCXBUTTONDBLCLK                                                             = 0x00AD
	WM_NCXBUTTONDOWN                                                               = 0x00AB
	WM_NCXBUTTONUP                                                                 = 0x00AC
	WM_NEXTDLGCTL                                                                  = 0x0028
	WM_NEXTMENU                                                                    = 0x0213
	WM_NOTIFY                                                                      = 0x004E
	WM_NOTIFYFORMAT                                                                = 0x0055
	WM_NULL                                                                        = 0x0000
	WM_PAINT                                                                       = 0x000F
	WM_PAINTCLIPBOARD                                                              = 0x0309
	WM_PAINTICON                                                                   = 0x0026
	WM_PALETTECHANGED                                                              = 0x0311
	WM_PALETTEISCHANGING                                                           = 0x0310
	WM_PARENTNOTIFY                                                                = 0x0210
	WM_PASTE                                                                       = 0x0302
	WM_PENWINFIRST                                                                 = 0x0380
	WM_PENWINLAST                                                                  = 0x038F
	WM_POWER                                                                       = 0x0048
	WM_POWERBROADCAST                                                              = 0x0218
	WM_PRINT                                                                       = 0x0317
	WM_PRINTCLIENT                                                                 = 0x0318
	WM_QUERYDRAGICON                                                               = 0x0037
	WM_QUERYENDSESSION                                                             = 0x0011
	WM_QUERYNEWPALETTE                                                             = 0x030F
	WM_QUERYOPEN                                                                   = 0x0013
	WM_QUERYUISTATE                                                                = 0x0129
	WM_QUEUESYNC                                                                   = 0x0023
	WM_QUIT                                                                        = 0x0012
	WM_RBUTTONDBLCLK                                                               = 0x0206
	WM_RBUTTONDOWN                                                                 = 0x0204
	WM_RBUTTONUP                                                                   = 0x0205
	WM_RENDERALLFORMATS                                                            = 0x0306
	WM_RENDERFORMAT                                                                = 0x0305
	WM_SETCURSOR                                                                   = 0x0020
	WM_SETFOCUS                                                                    = 0x0007
	WM_SETFONT                                                                     = 0x0030
	WM_SETHOTKEY                                                                   = 0x0032
	WM_SETICON                                                                     = 0x0080
	WM_SETREDRAW                                                                   = 0x000B
	WM_SETTEXT                                                                     = 0x000C
	WM_SETTINGCHANGE                                                               = 26
	WM_SHOWWINDOW                                                                  = 0x0018
	WM_SIZE                                                                        = 0x0005
	WM_SIZECLIPBOARD                                                               = 0x030B
	WM_SIZING                                                                      = 0x0214
	WM_SPOOLERSTATUS                                                               = 0x002A
	WM_STYLECHANGED                                                                = 0x007D
	WM_STYLECHANGING                                                               = 0x007C
	WM_SYNCPAINT                                                                   = 0x0088
	WM_SYSCHAR                                                                     = 0x0106
	WM_SYSCOLORCHANGE                                                              = 0x0015
	WM_SYSCOMMAND                                                                  = 0x0112
	WM_SYSDEADCHAR                                                                 = 0x0107
	WM_SYSKEYDOWN                                                                  = 0x0104
	WM_SYSKEYUP                                                                    = 0x0105
	WM_TABLET_FIRST                                                                = 0x02c0
	WM_TABLET_LAST                                                                 = 0x02df
	WM_TCARD                                                                       = 0x0052
	WM_THEMECHANGED                                                                = 0x031A
	WM_TIMECHANGE                                                                  = 0x001E
	WM_TIMER                                                                       = 0x0113
	WM_UNDO                                                                        = 0x0304
	WM_UNICHAR                                                                     = 0x0109
	WM_UNINITMENUPOPUP                                                             = 0x0125
	WM_UPDATEUISTATE                                                               = 0x0128
	WM_USER                                                                        = 0x0400
	WM_USERCHANGED                                                                 = 0x0054
	WM_VKEYTOITEM                                                                  = 0x002E
	WM_VSCROLL                                                                     = 0x0115
	WM_VSCROLLCLIPBOARD                                                            = 0x030A
	WM_WINDOWPOSCHANGED                                                            = 0x0047
	WM_WINDOWPOSCHANGING                                                           = 0x0046
	WM_WININICHANGE                                                                = 0x001A
	WM_WTSSESSION_CHANGE                                                           = 0x02B1
	WM_XBUTTONDBLCLK                                                               = 0x020D
	WM_XBUTTONDOWN                                                                 = 0x020B
	WM_XBUTTONUP                                                                   = 0x020C
	WNCON_DYNAMIC                                                                  = 0x00000008
	WNCON_FORNETCARD                                                               = 0x00000001
	WNCON_NOTROUTED                                                                = 0x00000002
	WNCON_SLOWLINK                                                                 = 0x00000004
	WNFMT_ABBREVIATED                                                              = 0x02
	WNFMT_CONNECTION                                                               = 0x20
	WNFMT_INENUM                                                                   = 0x10
	WNFMT_MULTILINE                                                                = 0x01
	WNNC_CRED_MANAGER                                                              = 0xffff0000
	WNNC_NET_10NET                                                                 = 0x00050000
	WNNC_NET_3IN1                                                                  = 0x00270000
	WNNC_NET_9TILES                                                                = 0x00090000
	WNNC_NET_APPLETALK                                                             = 0x00130000
	WNNC_NET_AS400                                                                 = 0x000b0000
	WNNC_NET_AVID                                                                  = 0x001a0000
	WNNC_NET_AVID1                                                                 = 0x003a0000
	WNNC_NET_BMC                                                                   = 0x00180000
	WNNC_NET_BWNFS                                                                 = 0x00100000
	WNNC_NET_CLEARCASE                                                             = 0x00160000
	WNNC_NET_COGENT                                                                = 0x00110000
	WNNC_NET_CSC                                                                   = 0x00260000
	WNNC_NET_DAV                                                                   = 0x002e0000
	WNNC_NET_DCE                                                                   = 0x00190000
	WNNC_NET_DECORB                                                                = 0x00200000
	WNNC_NET_DFS                                                                   = 0x003b0000
	WNNC_NET_DISTINCT                                                              = 0x00230000
	WNNC_NET_DOCUSPACE                                                             = 0x001b0000
	WNNC_NET_DRIVEONWEB                                                            = 0x003e0000
	WNNC_NET_EXIFS                                                                 = 0x002d0000
	WNNC_NET_EXTENDNET                                                             = 0x00290000
	WNNC_NET_FARALLON                                                              = 0x00120000
	WNNC_NET_FJ_REDIR                                                              = 0x00220000
	WNNC_NET_FOXBAT                                                                = 0x002b0000
	WNNC_NET_FRONTIER                                                              = 0x00170000
	WNNC_NET_FTP_NFS                                                               = 0x000c0000
	WNNC_NET_GOOGLE                                                                = 0x00430000
	WNNC_NET_HOB_NFS                                                               = 0x00320000
	WNNC_NET_IBMAL                                                                 = 0x00340000
	WNNC_NET_INTERGRAPH                                                            = 0x00140000
	WNNC_NET_KNOWARE                                                               = 0x002f0000
	WNNC_NET_KWNP                                                                  = 0x003c0000
	WNNC_NET_LANMAN                                                                = 131072
	WNNC_NET_LANSTEP                                                               = 0x00080000
	WNNC_NET_LANTASTIC                                                             = 0x000a0000
	WNNC_NET_LIFENET                                                               = 0x000e0000
	WNNC_NET_LOCK                                                                  = 0x00350000
	WNNC_NET_LOCUS                                                                 = 0x00060000
	WNNC_NET_MANGOSOFT                                                             = 0x001c0000
	WNNC_NET_MASFAX                                                                = 0x00310000
	WNNC_NET_MFILES                                                                = 0x00410000
	WNNC_NET_MSNET                                                                 = 0x00010000
	WNNC_NET_MS_NFS                                                                = 0x00420000
	WNNC_NET_NDFS                                                                  = 0x00440000
	WNNC_NET_NETWARE                                                               = 0x00030000
	WNNC_NET_OBJECT_DIRE                                                           = 0x00300000
	WNNC_NET_OPENAFS                                                               = 0x00390000
	WNNC_NET_PATHWORKS                                                             = 0x000d0000
	WNNC_NET_POWERLAN                                                              = 0x000f0000
	WNNC_NET_PROTSTOR                                                              = 0x00210000
	WNNC_NET_QUINCY                                                                = 0x00380000
	WNNC_NET_RDR2SAMPLE                                                            = 0x00250000
	WNNC_NET_RIVERFRONT1                                                           = 0x001e0000
	WNNC_NET_RIVERFRONT2                                                           = 0x001f0000
	WNNC_NET_RSFX                                                                  = 0x00400000
	WNNC_NET_SERNET                                                                = 0x001d0000
	WNNC_NET_SHIVA                                                                 = 0x00330000
	WNNC_NET_SMB                                                                   = 0x00020000
	WNNC_NET_SRT                                                                   = 0x00370000
	WNNC_NET_STAC                                                                  = 0x002a0000
	WNNC_NET_SUN_PC_NFS                                                            = 0x00070000
	WNNC_NET_SYMFONET                                                              = 0x00150000
	WNNC_NET_TERMSRV                                                               = 0x00360000
	WNNC_NET_TWINS                                                                 = 0x00240000
	WNNC_NET_VINES                                                                 = 0x00040000
	WNNC_NET_VMWARE                                                                = 0x003f0000
	WNNC_NET_YAHOO                                                                 = 0x002c0000
	WNNC_NET_ZENWORKS                                                              = 0x003d0000
	WNOHANG                                                                        = 1
	WN_ACCESS_DENIED                                                               = 5
	WN_ALREADY_CONNECTED                                                           = 85
	WN_BAD_DEV_TYPE                                                                = 66
	WN_BAD_HANDLE                                                                  = 6
	WN_BAD_LEVEL                                                                   = 124
	WN_BAD_LOCALNAME                                                               = 1200
	WN_BAD_NETNAME                                                                 = 67
	WN_BAD_PASSWORD                                                                = 86
	WN_BAD_POINTER                                                                 = 487
	WN_BAD_PROFILE                                                                 = 1206
	WN_BAD_PROVIDER                                                                = 1204
	WN_BAD_USER                                                                    = 2202
	WN_BAD_VALUE                                                                   = 87
	WN_CANCEL                                                                      = 1223
	WN_CANNOT_OPEN_PROFILE                                                         = 1205
	WN_CONNECTED_OTHER_PASSWORD                                                    = 2108
	WN_CONNECTED_OTHER_PASSWORD_DEFAULT                                            = 2109
	WN_CONNECTION_CLOSED                                                           = 1201
	WN_DEVICE_ALREADY_REMEMBERED                                                   = 1202
	WN_DEVICE_ERROR                                                                = 31
	WN_DEVICE_IN_USE                                                               = 2404
	WN_EXTENDED_ERROR                                                              = 1208
	WN_FUNCTION_BUSY                                                               = 170
	WN_MORE_DATA                                                                   = 234
	WN_NET_ERROR                                                                   = 59
	WN_NOT_AUTHENTICATED                                                           = 1244
	WN_NOT_CONNECTED                                                               = 2250
	WN_NOT_CONTAINER                                                               = 1207
	WN_NOT_INITIALIZING                                                            = 1247
	WN_NOT_LOGGED_ON                                                               = 1245
	WN_NOT_SUPPORTED                                                               = 50
	WN_NOT_VALIDATED                                                               = 1311
	WN_NO_ERROR                                                                    = 0
	WN_NO_MORE_DEVICES                                                             = 1248
	WN_NO_MORE_ENTRIES                                                             = 259
	WN_NO_NETWORK                                                                  = 1222
	WN_NO_NET_OR_BAD_PATH                                                          = 1203
	WN_OPEN_FILES                                                                  = 2401
	WN_OUT_OF_MEMORY                                                               = 8
	WN_RETRY                                                                       = 1237
	WN_SUCCESS                                                                     = 0
	WN_WINDOWS_ERROR                                                               = 59
	WOW64_CONTEXT_ALL                                                              = 65599
	WOW64_CONTEXT_CONTROL                                                          = 65537
	WOW64_CONTEXT_DEBUG_REGISTERS                                                  = 65552
	WOW64_CONTEXT_EXCEPTION_ACTIVE                                                 = 0x08000000
	WOW64_CONTEXT_EXCEPTION_REPORTING                                              = 0x80000000
	WOW64_CONTEXT_EXCEPTION_REQUEST                                                = 0x40000000
	WOW64_CONTEXT_EXTENDED_REGISTERS                                               = 65568
	WOW64_CONTEXT_FLOATING_POINT                                                   = 65544
	WOW64_CONTEXT_FULL                                                             = 65543
	WOW64_CONTEXT_INTEGER                                                          = 65538
	WOW64_CONTEXT_SEGMENTS                                                         = 65540
	WOW64_CONTEXT_SERVICE_ACTIVE                                                   = 0x10000000
	WOW64_CONTEXT_XSTATE                                                           = 65600
	WOW64_CONTEXT_i386                                                             = 0x00010000
	WOW64_CONTEXT_i486                                                             = 0x00010000
	WOW64_MAXIMUM_SUPPORTED_EXTENSION                                              = 512
	WOW64_SIZE_OF_80387_REGISTERS                                                  = 80
	WPF_ASYNCWINDOWPLACEMENT                                                       = 0x0004
	WPF_RESTORETOMAXIMIZED                                                         = 0x0002
	WPF_SETMINPOSITION                                                             = 0x0001
	WRITE_DAC                                                                      = 262144
	WRITE_OWNER                                                                    = 524288
	WRITE_RESTRICTED                                                               = 0x8
	WRITE_WATCH_FLAG_RESET                                                         = 0x01
	WSAAPI                                                                         = 0
	WSABASEERR                                                                     = 10000
	WSADESCRIPTION_LEN                                                             = 256
	WSAEACCES                                                                      = 10013
	WSAEADDRINUSE                                                                  = 10048
	WSAEADDRNOTAVAIL                                                               = 10049
	WSAEAFNOSUPPORT                                                                = 10047
	WSAEALREADY                                                                    = 10037
	WSAEBADF                                                                       = 10009
	WSAECANCELLED                                                                  = 10103
	WSAECONNABORTED                                                                = 10053
	WSAECONNREFUSED                                                                = 10061
	WSAECONNRESET                                                                  = 10054
	WSAEDESTADDRREQ                                                                = 10039
	WSAEDISCON                                                                     = 10101
	WSAEDQUOT                                                                      = 10069
	WSAEFAULT                                                                      = 10014
	WSAEHOSTDOWN                                                                   = 10064
	WSAEHOSTUNREACH                                                                = 10065
	WSAEINPROGRESS                                                                 = 10036
	WSAEINTR                                                                       = 10004
	WSAEINVAL                                                                      = 10022
	WSAEINVALIDPROCTABLE                                                           = 10104
	WSAEINVALIDPROVIDER                                                            = 10105
	WSAEISCONN                                                                     = 10056
	WSAELOOP                                                                       = 10062
	WSAEMFILE                                                                      = 10024
	WSAEMSGSIZE                                                                    = 10040
	WSAENAMETOOLONG                                                                = 10063
	WSAENETDOWN                                                                    = 10050
	WSAENETRESET                                                                   = 10052
	WSAENETUNREACH                                                                 = 10051
	WSAENOBUFS                                                                     = 10055
	WSAENOMORE                                                                     = 10102
	WSAENOPROTOOPT                                                                 = 10042
	WSAENOTCONN                                                                    = 10057
	WSAENOTEMPTY                                                                   = 10066
	WSAENOTSOCK                                                                    = 10038
	WSAEOPNOTSUPP                                                                  = 10045
	WSAEPFNOSUPPORT                                                                = 10046
	WSAEPROCLIM                                                                    = 10067
	WSAEPROTONOSUPPORT                                                             = 10043
	WSAEPROTOTYPE                                                                  = 10041
	WSAEPROVIDERFAILEDINIT                                                         = 10106
	WSAEREFUSED                                                                    = 10112
	WSAEREMOTE                                                                     = 10071
	WSAESHUTDOWN                                                                   = 10058
	WSAESOCKTNOSUPPORT                                                             = 10044
	WSAESTALE                                                                      = 10070
	WSAETIMEDOUT                                                                   = 10060
	WSAETOOMANYREFS                                                                = 10059
	WSAEUSERS                                                                      = 10068
	WSAEWOULDBLOCK                                                                 = 10035
	WSAHOST_NOT_FOUND                                                              = 11001
	WSANOTINITIALISED                                                              = 10093
	WSANO_ADDRESS                                                                  = 11004
	WSANO_DATA                                                                     = 11004
	WSANO_RECOVERY                                                                 = 11003
	WSAPROTOCOL_LEN                                                                = 255
	WSASERVICE_NOT_FOUND                                                           = 10108
	WSASYSCALLFAILURE                                                              = 10107
	WSASYSNOTREADY                                                                 = 10091
	WSASYS_STATUS_LEN                                                              = 128
	WSATRY_AGAIN                                                                   = 11002
	WSATYPE_NOT_FOUND                                                              = 10109
	WSAVERNOTSUPPORTED                                                             = 10092
	WSA_E_CANCELLED                                                                = 10111
	WSA_E_NO_MORE                                                                  = 10110
	WSA_FLAG_ACCESS_SYSTEM_SECURITY                                                = 0x40
	WSA_FLAG_MULTIPOINT_C_LEAF                                                     = 0x04
	WSA_FLAG_MULTIPOINT_C_ROOT                                                     = 0x02
	WSA_FLAG_MULTIPOINT_D_LEAF                                                     = 0x10
	WSA_FLAG_MULTIPOINT_D_ROOT                                                     = 0x08
	WSA_FLAG_NO_HANDLE_INHERIT                                                     = 0x80
	WSA_FLAG_OVERLAPPED                                                            = 0x01
	WSA_FLAG_REGISTERED_IO                                                         = 0x100
	WSA_INFINITE                                                                   = 4294967295
	WSA_INVALID_HANDLE                                                             = 6
	WSA_INVALID_PARAMETER                                                          = 87
	WSA_IO_INCOMPLETE                                                              = 996
	WSA_IO_PENDING                                                                 = 997
	WSA_MAXIMUM_WAIT_EVENTS                                                        = 64
	WSA_NOT_ENOUGH_MEMORY                                                          = 8
	WSA_OPERATION_ABORTED                                                          = 995
	WSA_QOS_ADMISSION_FAILURE                                                      = 11010
	WSA_QOS_BAD_OBJECT                                                             = 11013
	WSA_QOS_BAD_STYLE                                                              = 11012
	WSA_QOS_EFILTERCOUNT                                                           = 11021
	WSA_QOS_EFILTERSTYLE                                                           = 11019
	WSA_QOS_EFILTERTYPE                                                            = 11020
	WSA_QOS_EFLOWCOUNT                                                             = 11023
	WSA_QOS_EFLOWDESC                                                              = 11026
	WSA_QOS_EFLOWSPEC                                                              = 11017
	WSA_QOS_EOBJLENGTH                                                             = 11022
	WSA_QOS_EPOLICYOBJ                                                             = 11025
	WSA_QOS_EPROVSPECBUF                                                           = 11018
	WSA_QOS_EPSFILTERSPEC                                                          = 11028
	WSA_QOS_EPSFLOWSPEC                                                            = 11027
	WSA_QOS_ESDMODEOBJ                                                             = 11029
	WSA_QOS_ESERVICETYPE                                                           = 11016
	WSA_QOS_ESHAPERATEOBJ                                                          = 11030
	WSA_QOS_EUNKNOWNPSOBJ                                                          = 11024
	WSA_QOS_EUNKOWNPSOBJ                                                           = 11024
	WSA_QOS_GENERIC_ERROR                                                          = 11015
	WSA_QOS_NO_RECEIVERS                                                           = 11008
	WSA_QOS_NO_SENDERS                                                             = 11007
	WSA_QOS_POLICY_FAILURE                                                         = 11011
	WSA_QOS_RECEIVERS                                                              = 11005
	WSA_QOS_REQUEST_CONFIRMED                                                      = 11009
	WSA_QOS_RESERVED_PETYPE                                                        = 11031
	WSA_QOS_SENDERS                                                                = 11006
	WSA_QOS_TRAFFIC_CTRL_ERROR                                                     = 11014
	WSA_WAIT_TIMEOUT                                                               = 258
	WSF_VISIBLE                                                                    = 1
	WS_ACTIVECAPTION                                                               = 0x0001
	WS_BORDER                                                                      = 8388608
	WS_CAPTION                                                                     = 12582912
	WS_CHILD                                                                       = 1073741824
	WS_CHILDWINDOW                                                                 = 1073741824
	WS_CLIPCHILDREN                                                                = 33554432
	WS_CLIPSIBLINGS                                                                = 67108864
	WS_DISABLED                                                                    = 134217728
	WS_DLGFRAME                                                                    = 4194304
	WS_EX_ACCEPTFILES                                                              = 16
	WS_EX_APPWINDOW                                                                = 262144
	WS_EX_CLIENTEDGE                                                               = 512
	WS_EX_COMPOSITED                                                               = 33554432
	WS_EX_CONTEXTHELP                                                              = 1024
	WS_EX_CONTROLPARENT                                                            = 65536
	WS_EX_DLGMODALFRAME                                                            = 1
	WS_EX_LAYERED                                                                  = 0x00080000
	WS_EX_LAYOUTRTL                                                                = 4194304
	WS_EX_LEFT                                                                     = 0
	WS_EX_LEFTSCROLLBAR                                                            = 16384
	WS_EX_LTRREADING                                                               = 0
	WS_EX_MDICHILD                                                                 = 64
	WS_EX_NOACTIVATE                                                               = 134217728
	WS_EX_NOINHERITLAYOUT                                                          = 1048576
	WS_EX_NOPARENTNOTIFY                                                           = 4
	WS_EX_OVERLAPPEDWINDOW                                                         = 768
	WS_EX_PALETTEWINDOW                                                            = 392
	WS_EX_RIGHT                                                                    = 4096
	WS_EX_RIGHTSCROLLBAR                                                           = 0
	WS_EX_RTLREADING                                                               = 8192
	WS_EX_STATICEDGE                                                               = 131072
	WS_EX_TOOLWINDOW                                                               = 128
	WS_EX_TOPMOST                                                                  = 8
	WS_EX_TRANSPARENT                                                              = 32
	WS_EX_WINDOWEDGE                                                               = 256
	WS_GROUP                                                                       = 131072
	WS_HSCROLL                                                                     = 1048576
	WS_ICONIC                                                                      = 536870912
	WS_MAXIMIZE                                                                    = 16777216
	WS_MAXIMIZEBOX                                                                 = 65536
	WS_MINIMIZE                                                                    = 536870912
	WS_MINIMIZEBOX                                                                 = 131072
	WS_OVERLAPPED                                                                  = 0
	WS_OVERLAPPEDWINDOW                                                            = 13565952
	WS_POPUP                                                                       = 2147483648
	WS_POPUPWINDOW                                                                 = 2156396544
	WS_SIZEBOX                                                                     = 262144
	WS_SYSMENU                                                                     = 524288
	WS_TABSTOP                                                                     = 65536
	WS_THICKFRAME                                                                  = 262144
	WS_TILED                                                                       = 0
	WS_TILEDWINDOW                                                                 = 13565952
	WS_VISIBLE                                                                     = 268435456
	WS_VSCROLL                                                                     = 2097152
	WTS_CONSOLE_CONNECT                                                            = 0x1
	WTS_CONSOLE_DISCONNECT                                                         = 0x2
	WTS_REMOTE_CONNECT                                                             = 0x3
	WTS_REMOTE_DISCONNECT                                                          = 0x4
	WTS_SESSION_CREATE                                                             = 0xa
	WTS_SESSION_LOCK                                                               = 0x7
	WTS_SESSION_LOGOFF                                                             = 0x6
	WTS_SESSION_LOGON                                                              = 0x5
	WTS_SESSION_REMOTE_CONTROL                                                     = 0x9
	WTS_SESSION_TERMINATE                                                          = 0xb
	WTS_SESSION_UNLOCK                                                             = 0x8
	WT_EXECUTEDEFAULT                                                              = 0x00000000
	WT_EXECUTEDELETEWAIT                                                           = 0x00000008
	WT_EXECUTEINIOTHREAD                                                           = 0x00000001
	WT_EXECUTEINLONGTHREAD                                                         = 0x00000010
	WT_EXECUTEINPERSISTENTIOTHREAD                                                 = 0x00000040
	WT_EXECUTEINPERSISTENTTHREAD                                                   = 0x00000080
	WT_EXECUTEINTIMERTHREAD                                                        = 0x00000020
	WT_EXECUTEINUITHREAD                                                           = 0x00000002
	WT_EXECUTEINWAITTHREAD                                                         = 0x00000004
	WT_EXECUTELONGFUNCTION                                                         = 0x00000010
	WT_EXECUTEONLYONCE                                                             = 0x00000008
	WT_TRANSFER_IMPERSONATION                                                      = 0x00000100
	WUNTRACED                                                                      = 2
	WVR_ALIGNBOTTOM                                                                = 0x0040
	WVR_ALIGNLEFT                                                                  = 0x0020
	WVR_ALIGNRIGHT                                                                 = 0x0080
	WVR_ALIGNTOP                                                                   = 0x0010
	WVR_HREDRAW                                                                    = 0x0100
	WVR_REDRAW                                                                     = 768
	WVR_VALIDRECTS                                                                 = 0x0400
	WVR_VREDRAW                                                                    = 0x0200
	X3_BTYPE_QP_INST_VAL_POS_X                                                     = 0
	X3_BTYPE_QP_INST_WORD_POS_X                                                    = 23
	X3_BTYPE_QP_INST_WORD_X                                                        = 2
	X3_BTYPE_QP_SIZE_X                                                             = 9
	X3_D_WH_INST_WORD_POS_X                                                        = 24
	X3_D_WH_INST_WORD_X                                                            = 3
	X3_D_WH_SIGN_VAL_POS_X                                                         = 0
	X3_D_WH_SIZE_X                                                                 = 3
	X3_EMPTY_INST_VAL_POS_X                                                        = 0
	X3_EMPTY_INST_WORD_POS_X                                                       = 14
	X3_EMPTY_INST_WORD_X                                                           = 1
	X3_EMPTY_SIZE_X                                                                = 2
	X3_IMM20_INST_WORD_POS_X                                                       = 4
	X3_IMM20_INST_WORD_X                                                           = 3
	X3_IMM20_SIGN_VAL_POS_X                                                        = 0
	X3_IMM20_SIZE_X                                                                = 20
	X3_IMM39_1_INST_WORD_POS_X                                                     = 0
	X3_IMM39_1_INST_WORD_X                                                         = 2
	X3_IMM39_1_SIGN_VAL_POS_X                                                      = 36
	X3_IMM39_1_SIZE_X                                                              = 23
	X3_IMM39_2_INST_WORD_POS_X                                                     = 16
	X3_IMM39_2_INST_WORD_X                                                         = 1
	X3_IMM39_2_SIGN_VAL_POS_X                                                      = 20
	X3_IMM39_2_SIZE_X                                                              = 16
	X3_I_INST_WORD_POS_X                                                           = 27
	X3_I_INST_WORD_X                                                               = 3
	X3_I_SIGN_VAL_POS_X                                                            = 59
	X3_I_SIZE_X                                                                    = 1
	X3_OPCODE_INST_WORD_POS_X                                                      = 28
	X3_OPCODE_INST_WORD_X                                                          = 3
	X3_OPCODE_SIGN_VAL_POS_X                                                       = 0
	X3_OPCODE_SIZE_X                                                               = 4
	X3_P_INST_WORD_POS_X                                                           = 0
	X3_P_INST_WORD_X                                                               = 3
	X3_P_SIGN_VAL_POS_X                                                            = 0
	X3_P_SIZE_X                                                                    = 4
	X3_TMPLT_INST_WORD_POS_X                                                       = 0
	X3_TMPLT_INST_WORD_X                                                           = 0
	X3_TMPLT_SIGN_VAL_POS_X                                                        = 0
	X3_TMPLT_SIZE_X                                                                = 4
	XACT_E_FIRST                                                                   = 0x8004D000
	XACT_E_LAST                                                                    = 0x8004D029
	XACT_S_FIRST                                                                   = 0x0004D000
	XACT_S_LAST                                                                    = 0x0004D010
	XBUTTON1                                                                       = 0x0001
	XBUTTON2                                                                       = 0x0002
	XP1_CONNECTIONLESS                                                             = 0x00000001
	XP1_CONNECT_DATA                                                               = 0x00000080
	XP1_DISCONNECT_DATA                                                            = 0x00000100
	XP1_EXPEDITED_DATA                                                             = 0x00000040
	XP1_GRACEFUL_CLOSE                                                             = 0x00000020
	XP1_GUARANTEED_DELIVERY                                                        = 0x00000002
	XP1_GUARANTEED_ORDER                                                           = 0x00000004
	XP1_IFS_HANDLES                                                                = 0x00020000
	XP1_INTERRUPT                                                                  = 0x00004000
	XP1_MESSAGE_ORIENTED                                                           = 0x00000008
	XP1_MULTIPOINT_CONTROL_PLANE                                                   = 0x00000800
	XP1_MULTIPOINT_DATA_PLANE                                                      = 0x00001000
	XP1_PARTIAL_MESSAGE                                                            = 0x00040000
	XP1_PSEUDO_STREAM                                                              = 0x00000010
	XP1_QOS_SUPPORTED                                                              = 0x00002000
	XP1_SAN_SUPPORT_SDP                                                            = 0x00080000
	XP1_SUPPORT_BROADCAST                                                          = 0x00000200
	XP1_SUPPORT_MULTIPOINT                                                         = 0x00000400
	XP1_UNI_RECV                                                                   = 0x00010000
	XP1_UNI_SEND                                                                   = 0x00008000
	XSTATE_AVX                                                                     = 2
	XSTATE_GSSE                                                                    = 2
	XSTATE_LEGACY_FLOATING_POINT                                                   = 0
	XSTATE_LEGACY_SSE                                                              = 1
	XSTATE_MASK_AVX                                                                = 4
	XSTATE_MASK_GSSE                                                               = 4
	XSTATE_MASK_LEGACY                                                             = 3
	XSTATE_MASK_LEGACY_FLOATING_POINT                                              = 1
	XSTATE_MASK_LEGACY_SSE                                                         = 2
	X_ADXINTRIN_H_INCLUDED                                                         = 0
	X_ALPHA                                                                        = 259
	X_AMD64_                                                                       = 0
	X_AMMINTRIN_H_INCLUDED                                                         = 0
	X_APIAPPCONTAINER_                                                             = 0
	X_APISECUREBASE_                                                               = 0
	X_APISETCCONV_                                                                 = 0
	X_APISETDEBUG_                                                                 = 0
	X_APISETFILE_                                                                  = 0
	X_APISETHANDLE_                                                                = 0
	X_APISETLIBLOADER_                                                             = 0
	X_APISETNAMESPACE_                                                             = 0
	X_APISETREALTIME_                                                              = 0
	X_APISETSTRING_                                                                = 0
	X_APISETUTIL_                                                                  = 0
	X_API_SET_H_                                                                   = 0
	X_AVX2INTRIN_H_INCLUDED                                                        = 0
	X_AVX5124FMAPSINTRIN_H_INCLUDED                                                = 0
	X_AVX5124VNNIWINTRIN_H_INCLUDED                                                = 0
	X_AVX512BF16INTRIN_H_INCLUDED                                                  = 0
	X_AVX512BF16VLINTRIN_H_INCLUDED                                                = 0
	X_AVX512BITALGINTRIN_H_INCLUDED                                                = 0
	X_AVX512BWINTRIN_H_INCLUDED                                                    = 0
	X_AVX512CDINTRIN_H_INCLUDED                                                    = 0
	X_AVX512DQINTRIN_H_INCLUDED                                                    = 0
	X_AVX512ERINTRIN_H_INCLUDED                                                    = 0
	X_AVX512FINTRIN_H_INCLUDED                                                     = 0
	X_AVX512IFMAINTRIN_H_INCLUDED                                                  = 0
	X_AVX512IFMAVLINTRIN_H_INCLUDED                                                = 0
	X_AVX512PFINTRIN_H_INCLUDED                                                    = 0
	X_AVX512VBMI2VLINTRIN_H_INCLUDED                                               = 0
	X_AVX512VBMIINTRIN_H_INCLUDED                                                  = 0
	X_AVX512VBMIVLINTRIN_H_INCLUDED                                                = 0
	X_AVX512VLBWINTRIN_H_INCLUDED                                                  = 0
	X_AVX512VLDQINTRIN_H_INCLUDED                                                  = 0
	X_AVX512VLINTRIN_H_INCLUDED                                                    = 0
	X_AVX512VNNIVLINTRIN_H_INCLUDED                                                = 0
	X_AVX512VP2INTERSECTINTRIN_H_INCLUDED                                          = 0
	X_AVX512VP2INTERSECTVLINTRIN_H_INCLUDED                                        = 0
	X_AVX512VPOPCNTDQINTRIN_H_INCLUDED                                             = 0
	X_AVX512VPOPCNTDQVLINTRIN_H_INCLUDED                                           = 0
	X_AVXINTRIN_H_INCLUDED                                                         = 0
	X_BASETSD_H_                                                                   = 0
	X_BEM_H_                                                                       = 0
	X_BLANK                                                                        = 0x40
	X_BLOB_DEFINED                                                                 = 0
	X_BMI2INTRIN_H_INCLUDED                                                        = 0
	X_BMIINTRIN_H_INCLUDED                                                         = 0
	X_BOOLEAN_                                                                     = 0
	X_BSDTYPES_DEFINED                                                             = 0
	X_Benign_race_begin_                                                           = 0
	X_Benign_race_end_                                                             = 0
	X_CETINTRIN_H_INCLUDED                                                         = 0
	X_CLDEMOTE_H_INCLUDED                                                          = 0
	X_CLFLUSHOPTINTRIN_H_INCLUDED                                                  = 0
	X_CLIENTDATA                                                                   = 0
	X_CLOCK_T_DEFINED                                                              = 0
	X_CLWBINTRIN_H_INCLUDED                                                        = 0
	X_CLZEROINTRIN_H_INCLUDED                                                      = 0
	X_CMP_EQ_OQ                                                                    = 0x00
	X_CMP_EQ_OS                                                                    = 0x10
	X_CMP_EQ_UQ                                                                    = 0x08
	X_CMP_EQ_US                                                                    = 0x18
	X_CMP_FALSE_OQ                                                                 = 0x0b
	X_CMP_FALSE_OS                                                                 = 0x1b
	X_CMP_GE_OQ                                                                    = 0x1d
	X_CMP_GE_OS                                                                    = 0x0d
	X_CMP_GT_OQ                                                                    = 0x1e
	X_CMP_GT_OS                                                                    = 0x0e
	X_CMP_LE_OQ                                                                    = 0x12
	X_CMP_LE_OS                                                                    = 0x02
	X_CMP_LT_OQ                                                                    = 0x11
	X_CMP_LT_OS                                                                    = 0x01
	X_CMP_NEQ_OQ                                                                   = 0x0c
	X_CMP_NEQ_OS                                                                   = 0x1c
	X_CMP_NEQ_UQ                                                                   = 0x04
	X_CMP_NEQ_US                                                                   = 0x14
	X_CMP_NGE_UQ                                                                   = 0x19
	X_CMP_NGE_US                                                                   = 0x09
	X_CMP_NGT_UQ                                                                   = 0x1a
	X_CMP_NGT_US                                                                   = 0x0a
	X_CMP_NLE_UQ                                                                   = 0x16
	X_CMP_NLE_US                                                                   = 0x06
	X_CMP_NLT_UQ                                                                   = 0x15
	X_CMP_NLT_US                                                                   = 0x05
	X_CMP_ORD_Q                                                                    = 0x07
	X_CMP_ORD_S                                                                    = 0x17
	X_CMP_TRUE_UQ                                                                  = 0x0f
	X_CMP_TRUE_US                                                                  = 0x1f
	X_CMP_UNORD_Q                                                                  = 0x03
	X_CMP_UNORD_S                                                                  = 0x13
	X_COM_Outptr_                                                                  = 0
	X_COM_Outptr_opt_                                                              = 0
	X_COM_Outptr_opt_result_maybenull_                                             = 0
	X_COM_Outptr_result_maybenull_                                                 = 0
	X_CONTROL                                                                      = 0x20
	X_CRT_CTYPEDATA_DEFINED                                                        = 0
	X_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS                                            = 4
	X_CRT_INTERNAL_LOCAL_SCANF_OPTIONS                                             = 2
	X_CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY                              = 0x0008
	X_CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS                             = 0x0010
	X_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION                         = 0x0001
	X_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS                                   = 0x0004
	X_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR                               = 0x0002
	X_CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY                               = 0x0004
	X_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS                                    = 0x0002
	X_CRT_INTERNAL_SCANF_SECURECRT                                                 = 0x0001
	X_CRT_SECURE_NO_DEPRECATE                                                      = 0
	X_CRT_WCTYPEDATA_DEFINED                                                       = 0
	X_CTYPE_DEFINED                                                                = 0
	X_CW_DEFAULT                                                                   = 524319
	X_Const_                                                                       = 0
	X_DATETIMEAPI_H_                                                               = 0
	X_DEF_WINBOOL_                                                                 = 0
	X_DIGIT                                                                        = 0x4
	X_DN_FLUSH                                                                     = 0x01000000
	X_DN_SAVE                                                                      = 0x00000000
	X_DPI_AWARENESS_CONTEXTS_                                                      = 0
	X_DWORDLONG_                                                                   = 0
	X_EMMINTRIN_H_INCLUDED                                                         = 0
	X_EM_DENORMAL                                                                  = 0x00080000
	X_EM_INEXACT                                                                   = 0x00000001
	X_EM_INVALID                                                                   = 0x00000010
	X_EM_OVERFLOW                                                                  = 0x00000004
	X_EM_UNDERFLOW                                                                 = 0x00000002
	X_EM_ZERODIVIDE                                                                = 0x00000008
	X_ENQCMDINTRIN_H_INCLUDED                                                      = 0
	X_ERRHANDLING_H_                                                               = 0
	X_F16CINTRIN_H_INCLUDED                                                        = 0
	X_FIBERS_H_                                                                    = 0
	X_FILETIME_                                                                    = 0
	X_FILE_DEFINED                                                                 = 0
	X_FILE_OFFSET_BITS_SET_FSEEKO                                                  = 0
	X_FILE_OFFSET_BITS_SET_FTELLO                                                  = 0
	X_FLOAT_H___                                                                   = 0
	X_FLT_WINERROR_                                                                = 0
	X_FMA4INTRIN_H_INCLUDED                                                        = 0
	X_FMAINTRIN_H_INCLUDED                                                         = 0
	X_FPCLASS_ND                                                                   = 0x0010
	X_FPCLASS_NINF                                                                 = 0x0004
	X_FPCLASS_NN                                                                   = 0x0008
	X_FPCLASS_NZ                                                                   = 0x0020
	X_FPCLASS_PD                                                                   = 0x0080
	X_FPCLASS_PINF                                                                 = 0x0200
	X_FPCLASS_PN                                                                   = 0x0100
	X_FPCLASS_PZ                                                                   = 0x0040
	X_FPCLASS_QNAN                                                                 = 0x0002
	X_FPCLASS_SNAN                                                                 = 0x0001
	X_FPE_DENORMAL                                                                 = 0x82
	X_FPE_EXPLICITGEN                                                              = 0x8c
	X_FPE_INEXACT                                                                  = 0x86
	X_FPE_INVALID                                                                  = 0x81
	X_FPE_OVERFLOW                                                                 = 0x84
	X_FPE_SQRTNEG                                                                  = 0x88
	X_FPE_STACKOVERFLOW                                                            = 0x8a
	X_FPE_STACKUNDERFLOW                                                           = 0x8b
	X_FPE_UNDERFLOW                                                                = 0x85
	X_FPE_UNEMULATED                                                               = 0x87
	X_FPE_ZERODIVIDE                                                               = 0x83
	X_FPOS_T_DEFINED                                                               = 0
	X_FXSRINTRIN_H_INCLUDED                                                        = 0
	X_Field_z_                                                                     = 0
	X_GCC_WRAP_STDINT_H                                                            = 0
	X_GFNIINTRIN_H_INCLUDED                                                        = 0
	X_GUIDDEF_H_                                                                   = 0
	X_HEAPAPI_H_                                                                   = 0
	X_HEX                                                                          = 0x80
	X_HRESULT_DEFINED                                                              = 0
	X_IC_AFFINE                                                                    = 0x00040000
	X_IC_PROJECTIVE                                                                = 0x00000000
	X_IMMINTRIN_H_INCLUDED                                                         = 0
	X_IMM_                                                                         = 0
	X_IMM_SDK_DEFINED_                                                             = 0
	X_INC_CRT_UNICODE_MACROS                                                       = 2
	X_INC_CTYPE                                                                    = 0
	X_INC_ERRNO                                                                    = 0
	X_INC_EXCPT                                                                    = 0
	X_INC_FCNTL                                                                    = 0
	X_INC_SDKDDKVER                                                                = 0
	X_INC_SIGNAL                                                                   = 0
	X_INC_STAT                                                                     = 0
	X_INC_STDIO                                                                    = 0
	X_INC_STDIO_S                                                                  = 0
	X_INC_SWPRINTF_INL                                                             = 0
	X_INC_TCHAR                                                                    = 0
	X_INC_TCHAR_S                                                                  = 0
	X_INC_UTIME                                                                    = 0
	X_INC_VIRTDISK                                                                 = 0
	X_INC_WCHAR                                                                    = 0
	X_INC_WCHAR_S                                                                  = 0
	X_INC_WINAPIFAMILY                                                             = 0
	X_INC_WINDOWS                                                                  = 0
	X_INC_WTIME_INL                                                                = 0
	X_INC_WTIME_S_INL                                                              = 0
	X_INTERLOCKAPI_H_                                                              = 0
	X_INTRIN_MAC_                                                                  = 0
	X_INTTYPES_H_                                                                  = 0
	X_IOB_ENTRIES                                                                  = 20
	X_IOEOF                                                                        = 0x0010
	X_IOERR                                                                        = 0x0020
	X_IOFBF                                                                        = 0x0000
	X_IOLBF                                                                        = 0x0040
	X_IOMYBUF                                                                      = 0x0008
	X_IONBF                                                                        = 0x0004
	X_IOREAD                                                                       = 0x0001
	X_IORW                                                                         = 0x0080
	X_IOSTRG                                                                       = 0x0040
	X_IOWRT                                                                        = 0x0002
	X_IO_APISET_H_                                                                 = 0
	X_IRQL_requires_same_                                                          = 0
	X_IRQL_restores_                                                               = 0
	X_IRQL_saves_                                                                  = 0
	X_In_                                                                          = 0
	X_In_opt_                                                                      = 0
	X_In_opt_z_                                                                    = 0
	X_In_z_                                                                        = 0
	X_Inout_                                                                       = 0
	X_Inout_opt_                                                                   = 0
	X_Inout_opt_z_                                                                 = 0
	X_Inout_z_                                                                     = 0
	X_Interlocked_                                                                 = 0
	X_JOBAPISET_H_                                                                 = 0
	X_KTMTYPES_                                                                    = 0
	X_LANGID_DEFINED                                                               = 0
	X_LARGE_INTEGER_DEFINED                                                        = 0
	X_LCID_DEFINED                                                                 = 0
	X_LDT_ENTRY_DEFINED                                                            = 0
	X_LEADBYTE                                                                     = 0x8000
	X_LIST_ENTRY_DEFINED                                                           = 0
	X_LOGPALETTE_DEFINED                                                           = 0
	X_LOWER                                                                        = 0x2
	X_LPBLOB_DEFINED                                                               = 0
	X_LPCVOID_DEFINED                                                              = 0
	X_LWPINTRIN_H_INCLUDED                                                         = 0
	X_LZCNTINTRIN_H_INCLUDED                                                       = 0
	X_Literal_                                                                     = 0
	X_MCW_DN                                                                       = 0x03000000
	X_MCW_EM                                                                       = 0x0008001F
	X_MCW_IC                                                                       = 0x00040000
	X_MCW_PC                                                                       = 0x00030000
	X_MCW_RC                                                                       = 0x00000300
	X_MCX_H_                                                                       = 0
	X_MEMORYAPI_H_                                                                 = 0
	X_MINGW_FLOAT_H_                                                               = 0
	X_MINGW_IP_MREQ1_H                                                             = 0
	X_MINGW_IP_TYPES_H                                                             = 0
	X_MINWINBASE_                                                                  = 0
	X_MINWINDEF_                                                                   = 0
	X_MM3DNOW_H_INCLUDED                                                           = 0
	X_MMINTRIN_H_INCLUDED                                                          = 0
	X_MM_CMPINT_EQ                                                                 = 0x0
	X_MM_CMPINT_GE                                                                 = 0x5
	X_MM_CMPINT_GT                                                                 = 0x6
	X_MM_CMPINT_LE                                                                 = 0x2
	X_MM_CMPINT_LT                                                                 = 0x1
	X_MM_CMPINT_NE                                                                 = 0x4
	X_MM_CMPINT_NLE                                                                = 0x6
	X_MM_CMPINT_NLT                                                                = 0x5
	X_MM_CMPINT_UNUSED                                                             = 0x3
	X_MM_DENORMALS_ZERO_MASK                                                       = 0x0040
	X_MM_DENORMALS_ZERO_OFF                                                        = 0x0000
	X_MM_DENORMALS_ZERO_ON                                                         = 0x0040
	X_MM_EXCEPT_DENORM                                                             = 0x0002
	X_MM_EXCEPT_DIV_ZERO                                                           = 0x0004
	X_MM_EXCEPT_INEXACT                                                            = 0x0020
	X_MM_EXCEPT_INVALID                                                            = 0x0001
	X_MM_EXCEPT_MASK                                                               = 0x003f
	X_MM_EXCEPT_OVERFLOW                                                           = 0x0008
	X_MM_EXCEPT_UNDERFLOW                                                          = 0x0010
	X_MM_FLUSH_ZERO_MASK                                                           = 0x8000
	X_MM_FLUSH_ZERO_OFF                                                            = 0x0000
	X_MM_FLUSH_ZERO_ON                                                             = 0x8000
	X_MM_FROUND_CEIL                                                               = 2
	X_MM_FROUND_CUR_DIRECTION                                                      = 0x04
	X_MM_FROUND_FLOOR                                                              = 1
	X_MM_FROUND_NEARBYINT                                                          = 12
	X_MM_FROUND_NINT                                                               = 0
	X_MM_FROUND_NO_EXC                                                             = 0x08
	X_MM_FROUND_RAISE_EXC                                                          = 0x00
	X_MM_FROUND_RINT                                                               = 4
	X_MM_FROUND_TO_NEAREST_INT                                                     = 0x00
	X_MM_FROUND_TO_NEG_INF                                                         = 0x01
	X_MM_FROUND_TO_POS_INF                                                         = 0x02
	X_MM_FROUND_TO_ZERO                                                            = 0x03
	X_MM_FROUND_TRUNC                                                              = 3
	X_MM_MASK_DENORM                                                               = 0x0100
	X_MM_MASK_DIV_ZERO                                                             = 0x0200
	X_MM_MASK_INEXACT                                                              = 0x1000
	X_MM_MASK_INVALID                                                              = 0x0080
	X_MM_MASK_MASK                                                                 = 0x1f80
	X_MM_MASK_OVERFLOW                                                             = 0x0400
	X_MM_MASK_UNDERFLOW                                                            = 0x0800
	X_MM_ROUND_DOWN                                                                = 0x2000
	X_MM_ROUND_MASK                                                                = 0x6000
	X_MM_ROUND_NEAREST                                                             = 0x0000
	X_MM_ROUND_TOWARD_ZERO                                                         = 0x6000
	X_MM_ROUND_UP                                                                  = 0x4000
	X_MOVDIRINTRIN_H_INCLUDED                                                      = 0
	X_MSTCPIP_                                                                     = 0
	X_MWAITXINTRIN_H_INCLUDED                                                      = 0
	X_Maybe_raises_SEH_exception_                                                  = 0
	X_Must_inspect_result_                                                         = 0
	X_NAMEDPIPE_H_                                                                 = 0
	X_NFILE                                                                        = 512
	X_NSTREAM_                                                                     = 512
	X_NTDDTAPE_WINNT_                                                              = 0
	X_NTTMAPI_                                                                     = 0
	X_NT_TIB_DEFINED                                                               = 0
	X_No_competing_thread_                                                         = 0
	X_No_competing_thread_begin_                                                   = 0
	X_No_competing_thread_end_                                                     = 0
	X_Notliteral_                                                                  = 0
	X_NullNull_terminated_                                                         = 0
	X_Null_terminated_                                                             = 0
	X_O_ACCMODE                                                                    = 3
	X_O_APPEND                                                                     = 0x0008
	X_O_BINARY                                                                     = 0x8000
	X_O_CREAT                                                                      = 0x0100
	X_O_EXCL                                                                       = 0x0400
	X_O_NOINHERIT                                                                  = 0x0080
	X_O_RANDOM                                                                     = 0x0010
	X_O_RAW                                                                        = 32768
	X_O_RDONLY                                                                     = 0x0000
	X_O_RDWR                                                                       = 0x0002
	X_O_SEQUENTIAL                                                                 = 0x0020
	X_O_SHORT_LIVED                                                                = 0x1000
	X_O_TEMPORARY                                                                  = 0x0040
	X_O_TEXT                                                                       = 0x4000
	X_O_TRUNC                                                                      = 0x0200
	X_O_U16TEXT                                                                    = 0x20000
	X_O_U8TEXT                                                                     = 0x40000
	X_O_WRONLY                                                                     = 0x0001
	X_O_WTEXT                                                                      = 0x10000
	X_Out_                                                                         = 0
	X_Out_opt_                                                                     = 0
	X_Outptr_                                                                      = 0
	X_Outptr_opt_                                                                  = 0
	X_Outptr_opt_result_maybenull_                                                 = 0
	X_Outptr_opt_result_maybenull_z_                                               = 0
	X_Outptr_opt_result_nullonfailure_                                             = 0
	X_Outptr_opt_result_z_                                                         = 0
	X_Outptr_result_maybenull_                                                     = 0
	X_Outptr_result_maybenull_z_                                                   = 0
	X_Outptr_result_nullonfailure_                                                 = 0
	X_Outptr_result_z_                                                             = 0
	X_Outref_                                                                      = 0
	X_Outref_result_maybenull_                                                     = 0
	X_Outref_result_nullonfailure_                                                 = 0
	X_PALETTEENTRY_DEFINED                                                         = 0
	X_PCONFIGINTRIN_H_INCLUDED                                                     = 0
	X_PC_24                                                                        = 0x00020000
	X_PC_53                                                                        = 0x00010000
	X_PC_64                                                                        = 0x00000000
	X_PKUINTRIN_H_INCLUDED                                                         = 0
	X_PMMINTRIN_H_INCLUDED                                                         = 0
	X_POPCNTINTRIN_H_INCLUDED                                                      = 0
	X_POSIX_CPUTIME                                                                = 200809
	X_POSIX_MONOTONIC_CLOCK                                                        = 200809
	X_POSIX_THREAD_CPUTIME                                                         = 200809
	X_POSIX_TIMERS                                                                 = 200809
	X_PRFCHWINTRIN_H_INCLUDED                                                      = 0
	X_PROCESSENV_                                                                  = 0
	X_PROCESSTHREADSAPI_H_                                                         = 0
	X_PROCESSTOPOLOGYAPI_H_                                                        = 0
	X_PROFILEAPI_H_                                                                = 0
	X_PROVIDER_STRUCTS_DEFINED                                                     = 0
	X_PUNCT                                                                        = 0x10
	X_P_tmpdir                                                                     = "\\"
	X_Points_to_data_                                                              = 0
	X_Post_                                                                        = 0
	X_Post_equals_last_error_                                                      = 0
	X_Pre_notnull_                                                                 = 0
	X_Printf_format_string_                                                        = 0
	X_RC_CHOP                                                                      = 0x00000300
	X_RC_DOWN                                                                      = 0x00000100
	X_RC_NEAR                                                                      = 0x00000000
	X_RC_UP                                                                        = 0x00000200
	X_RDSEEDINTRIN_H_INCLUDED                                                      = 0
	X_REFCLSID_DEFINED                                                             = 0
	X_REFFMTID_DEFINED                                                             = 0
	X_REFGUID_DEFINED                                                              = 0
	X_REFIID_DEFINED                                                               = 0
	X_RTL_RUN_ONCE_DEF                                                             = 1
	X_RTMINTRIN_H_INCLUDED                                                         = 0
	X_Raises_SEH_exception_                                                        = 0
	X_Requires_no_locks_held_                                                      = 0
	X_Reserved_                                                                    = 0
	X_Result_nullonfailure_                                                        = 0
	X_Result_zeroonfailure_                                                        = 0
	X_Ret_maybenull_                                                               = 0
	X_Ret_maybenull_z_                                                             = 0
	X_Ret_notnull_                                                                 = 0
	X_Ret_null_                                                                    = 0
	X_Ret_valid_                                                                   = 0
	X_Ret_z_                                                                       = 0
	X_SECURECRT_ERRCODE_VALUES_DEFINED                                             = 0
	X_SGXINTRIN_H_INCLUDED                                                         = 0
	X_SHAINTRIN_H_INCLUDED                                                         = 0
	X_SIDD_BIT_MASK                                                                = 0x00
	X_SIDD_CMP_EQUAL_ANY                                                           = 0x00
	X_SIDD_CMP_EQUAL_EACH                                                          = 0x08
	X_SIDD_CMP_EQUAL_ORDERED                                                       = 0x0c
	X_SIDD_CMP_RANGES                                                              = 0x04
	X_SIDD_LEAST_SIGNIFICANT                                                       = 0x00
	X_SIDD_MASKED_NEGATIVE_POLARITY                                                = 0x30
	X_SIDD_MASKED_POSITIVE_POLARITY                                                = 0x20
	X_SIDD_MOST_SIGNIFICANT                                                        = 0x40
	X_SIDD_NEGATIVE_POLARITY                                                       = 0x10
	X_SIDD_POSITIVE_POLARITY                                                       = 0x00
	X_SIDD_SBYTE_OPS                                                               = 0x02
	X_SIDD_SWORD_OPS                                                               = 0x03
	X_SIDD_UBYTE_OPS                                                               = 0x00
	X_SIDD_UNIT_MASK                                                               = 0x40
	X_SIDD_UWORD_OPS                                                               = 0x01
	X_SIGN_DEFINED                                                                 = 0
	X_SIG_ATOMIC_T_DEFINED                                                         = 0
	X_SLIST_HEADER_                                                                = 0
	X_SMMINTRIN_H_INCLUDED                                                         = 0
	X_SPACE                                                                        = 0x8
	X_SS_ALIGNSIZE                                                                 = 8
	X_SS_MAXSIZE                                                                   = 128
	X_STAT_DEFINED                                                                 = 0
	X_STDINT_H                                                                     = 0
	X_STDIO_CONFIG_DEFINED                                                         = 0
	X_STDIO_DEFINED                                                                = 0
	X_STDIO_S_DEFINED                                                              = 0
	X_STDSTREAM_DEFINED                                                            = 0
	X_STRALIGN_USE_SECURE_CRT                                                      = 0
	X_SW_SQRTNEG                                                                   = 0x0080
	X_SW_STACKOVERFLOW                                                             = 0x0200
	X_SW_STACKUNDERFLOW                                                            = 0x0400
	X_SW_UNEMULATED                                                                = 0x0040
	X_SYNCHAPI_H_                                                                  = 0
	X_SYSINFOAPI_H_                                                                = 0
	X_SYSTEMTIME_                                                                  = 0
	X_SYSTEMTOPOLOGY_H_                                                            = 0
	X_SYS_GUID_OPERATORS_                                                          = 0
	X_SYS_GUID_OPERATOR_EQ_                                                        = 0
	X_SYS_OPEN                                                                     = 20
	X_S_IEXEC                                                                      = 0x0040
	X_S_IFBLK                                                                      = 0x3000
	X_S_IFCHR                                                                      = 0x2000
	X_S_IFDIR                                                                      = 0x4000
	X_S_IFIFO                                                                      = 0x1000
	X_S_IFMT                                                                       = 0xF000
	X_S_IFREG                                                                      = 0x8000
	X_S_IREAD                                                                      = 0x0100
	X_S_IRUSR                                                                      = 256
	X_S_IRWXU                                                                      = 448
	X_S_IWRITE                                                                     = 0x0080
	X_S_IWUSR                                                                      = 128
	X_S_IXUSR                                                                      = 64
	X_Scanf_format_string_                                                         = 0
	X_Scanf_s_format_string_                                                       = 0
	X_Strict_type_match_                                                           = 0
	X_TBMINTRIN_H_INCLUDED                                                         = 0
	X_TCHAR_DEFINED                                                                = 0
	X_TCL                                                                          = 0
	X_TCLDECLS                                                                     = 0
	X_TCLINT                                                                       = 0
	X_TCLINTDECLS                                                                  = 0
	X_TCLINTPLATDECLS                                                              = 0
	X_TCLPLATDECLS                                                                 = 0
	X_TCLPORT                                                                      = 0
	X_TCLTOMMATHDECLS                                                              = 0
	X_TCLWINPORT                                                                   = 0
	X_TEOF                                                                         = -1
	X_TEXTMETRIC_DEFINED                                                           = 0
	X_THREADPOOLAPISET_H_                                                          = 0
	X_THREADPOOLLEGACYAPISET_H_                                                    = 0
	X_TIMEB_DEFINED                                                                = 0
	X_TIMEB_H_                                                                     = 0
	X_TIMEB_H_S                                                                    = 0
	X_TIMEVAL_DEFINED                                                              = 0
	X_TIMEZONEAPI_H_                                                               = 0
	X_TIMEZONE_DEFINED                                                             = 0
	X_TIME_H_                                                                      = 0
	X_TMMINTRIN_H_INCLUDED                                                         = 0
	X_TM_DEFINED                                                                   = 0
	X_TWO_DIGIT_EXPONENT                                                           = 0x1
	X_ULONGLONG_                                                                   = 0
	X_UPPER                                                                        = 0x1
	X_UTIMBUF_DEFINED                                                              = 0
	X_Use_decl_annotations_                                                        = 0
	X_VPCLMULQDQINTRIN_H_INCLUDED                                                  = 0
	X_WAITPKG_H_INCLUDED                                                           = 0
	X_WBNOINVDINTRIN_H_INCLUDED                                                    = 0
	X_WCONIO_DEFINED                                                               = 0
	X_WCONIO_S_DEFINED                                                             = 0
	X_WCTYPE_DEFINED                                                               = 0
	X_WCTYPE_INLINE_DEFINED                                                        = 0
	X_WDIRECT_DEFINED                                                              = 0
	X_WIN32_IE                                                                     = 1536
	X_WIN32_IE_IE100                                                               = 0x0a00
	X_WIN32_IE_IE110                                                               = 0x0A00
	X_WIN32_IE_IE20                                                                = 0x0200
	X_WIN32_IE_IE30                                                                = 0x0300
	X_WIN32_IE_IE302                                                               = 0x0302
	X_WIN32_IE_IE40                                                                = 0x0400
	X_WIN32_IE_IE401                                                               = 0x0401
	X_WIN32_IE_IE50                                                                = 0x0500
	X_WIN32_IE_IE501                                                               = 0x0501
	X_WIN32_IE_IE55                                                                = 0x0550
	X_WIN32_IE_IE60                                                                = 0x0600
	X_WIN32_IE_IE60SP1                                                             = 0x0601
	X_WIN32_IE_IE60SP2                                                             = 0x0603
	X_WIN32_IE_IE70                                                                = 0x0700
	X_WIN32_IE_IE80                                                                = 0x0800
	X_WIN32_IE_IE90                                                                = 0x0900
	X_WIN32_IE_LONGHORN                                                            = 1792
	X_WIN32_IE_NT4                                                                 = 512
	X_WIN32_IE_NT4SP1                                                              = 512
	X_WIN32_IE_NT4SP2                                                              = 512
	X_WIN32_IE_NT4SP3                                                              = 770
	X_WIN32_IE_NT4SP4                                                              = 1025
	X_WIN32_IE_NT4SP5                                                              = 1025
	X_WIN32_IE_NT4SP6                                                              = 1280
	X_WIN32_IE_WIN10                                                               = 2560
	X_WIN32_IE_WIN2K                                                               = 1281
	X_WIN32_IE_WIN2KSP1                                                            = 1281
	X_WIN32_IE_WIN2KSP2                                                            = 1281
	X_WIN32_IE_WIN2KSP3                                                            = 1281
	X_WIN32_IE_WIN2KSP4                                                            = 1281
	X_WIN32_IE_WIN6                                                                = 1792
	X_WIN32_IE_WIN7                                                                = 2048
	X_WIN32_IE_WIN8                                                                = 2560
	X_WIN32_IE_WIN98                                                               = 1025
	X_WIN32_IE_WIN98SE                                                             = 1280
	X_WIN32_IE_WINBLUE                                                             = 2560
	X_WIN32_IE_WINME                                                               = 1360
	X_WIN32_IE_WINTHRESHOLD                                                        = 2560
	X_WIN32_IE_WS03                                                                = 0x0602
	X_WIN32_IE_WS03SP1                                                             = 1539
	X_WIN32_IE_XP                                                                  = 1536
	X_WIN32_IE_XPSP1                                                               = 1537
	X_WIN32_IE_XPSP2                                                               = 1539
	X_WIN32_WINNT_LONGHORN                                                         = 0x0600
	X_WIN32_WINNT_NT4                                                              = 0x0400
	X_WIN32_WINNT_VISTA                                                            = 0x0600
	X_WIN32_WINNT_WIN10                                                            = 0x0A00
	X_WIN32_WINNT_WIN2K                                                            = 0x0500
	X_WIN32_WINNT_WIN6                                                             = 0x0600
	X_WIN32_WINNT_WIN7                                                             = 0x0601
	X_WIN32_WINNT_WIN8                                                             = 0x0602
	X_WIN32_WINNT_WINBLUE                                                          = 0x0603
	X_WIN32_WINNT_WINTHRESHOLD                                                     = 0x0A00
	X_WIN32_WINNT_WINXP                                                            = 0x0501
	X_WIN32_WINNT_WS03                                                             = 0x0502
	X_WIN32_WINNT_WS08                                                             = 0x0600
	X_WINBASE_                                                                     = 0
	X_WINCON_                                                                      = 0
	X_WINDEF_                                                                      = 0
	X_WINDOWS_                                                                     = 0
	X_WINERROR_                                                                    = 0
	X_WINGDI_                                                                      = 0
	X_WINNETWK_                                                                    = 0
	X_WINNLS_                                                                      = 0
	X_WINNT_                                                                       = 0
	X_WINREG_                                                                      = 0
	X_WINSOCK2API_                                                                 = 0
	X_WINSOCKAPI_                                                                  = 0
	X_WINSVC_                                                                      = 0
	X_WINUSER_                                                                     = 0
	X_WIO_S_DEFINED                                                                = 0
	X_WLOCALE_DEFINED                                                              = 0
	X_WMMINTRIN_H_INCLUDED                                                         = 0
	X_WNNC_                                                                        = 0
	X_WOW64APISET_H_                                                               = 0
	X_WS2DEF_                                                                      = 0
	X_WS2IPDEF_                                                                    = 0
	X_WS2TCPIP_H_                                                                  = 0
	X_WSPIAPI_H_                                                                   = 0
	X_WSTAT_DEFINED                                                                = 0
	X_WSTDIO_DEFINED                                                               = 0
	X_WSTDIO_S_DEFINED                                                             = 0
	X_WTIME_DEFINED                                                                = 0
	X_WTIME_S_DEFINED                                                              = 0
	X_X86INTRIN_H_INCLUDED                                                         = 0
	X_XABORT_CAPACITY                                                              = 8
	X_XABORT_CONFLICT                                                              = 4
	X_XABORT_DEBUG                                                                 = 16
	X_XABORT_EXPLICIT                                                              = 1
	X_XABORT_NESTED                                                                = 32
	X_XABORT_RETRY                                                                 = 2
	X_XBEGIN_STARTED                                                               = 18446744073709551615
	X_XFORM_                                                                       = 0
	X_XMMINTRIN_H_INCLUDED                                                         = 0
	X_XOPMMINTRIN_H_INCLUDED                                                       = 0
	X_XSAVECINTRIN_H_INCLUDED                                                      = 0
	X_XSAVEINTRIN_H_INCLUDED                                                       = 0
	X_XSAVEOPTINTRIN_H_INCLUDED                                                    = 0
	X_XSAVESINTRIN_H_INCLUDED                                                      = 0
	X_XTESTINTRIN_H_INCLUDED                                                       = 0
	X_tagBLOB_DEFINED                                                              = 0
	Cdecl                                                                          = 0
	Far                                                                            = 0
	Near                                                                           = 0
	Pascal                                                                         = 0
	DOMAIN                                                                         = 1
	FP_INFINITE                                                                    = 1280
	FP_NAN                                                                         = 0x0100
	FP_NDENORM                                                                     = 16
	FP_NINF                                                                        = 4
	FP_NNORM                                                                       = 8
	FP_NORMAL                                                                      = 0x0400
	FP_NZERO                                                                       = 32
	FP_PDENORM                                                                     = 128
	FP_PINF                                                                        = 512
	FP_PNORM                                                                       = 256
	FP_PZERO                                                                       = 64
	FP_QNAN                                                                        = 2
	FP_SNAN                                                                        = 1
	FP_SUBNORMAL                                                                   = 17408
	FP_ZERO                                                                        = 0x4000
	M_1_PI                                                                         = 0.31830988618379067154
	M_2_PI                                                                         = 0.63661977236758134308
	M_2_SQRTPI                                                                     = 1.12837916709551257390
	M_E                                                                            = 2.7182818284590452354
	M_LN10                                                                         = 2.30258509299404568402
	M_LN2                                                                          = 0.69314718055994530942
	M_LOG10E                                                                       = 0.43429448190325182765
	M_LOG2E                                                                        = 1.4426950408889634074
	M_PI                                                                           = 3.14159265358979323846
	M_PI_2                                                                         = 1.57079632679489661923
	M_PI_4                                                                         = 0.78539816339744830962
	M_SQRT1_2                                                                      = 0.70710678118654752440
	M_SQRT2                                                                        = 1.41421356237309504880
	OVERFLOW                                                                       = 3
	PLOSS                                                                          = 6
	SING                                                                           = 2
	TLOSS                                                                          = 5
	UNDERFLOW                                                                      = 4
	X_COMPLEX_DEFINED                                                              = 0
	X_CRT_MATHERR_DEFINED                                                          = 0
	X_DOMAIN                                                                       = 1
	X_EXCEPTION_DEFINED                                                            = 0
	X_MATH_H_                                                                      = 0
	X_OVERFLOW                                                                     = 3
	X_PLOSS                                                                        = 6
	X_SING                                                                         = 2
	X_TLOSS                                                                        = 5
	X_UNDERFLOW                                                                    = 4
	BYFOUR                                                                         = 0
	GF2_DIM                                                                        = 32
	TBLS                                                                           = 8
	BL_CODES                                                                       = 19
	BUSY_STATE                                                                     = 113
	Buf_size                                                                       = 16
	COMMENT_STATE                                                                  = 91
	DEFLATE_H                                                                      = 0
	D_CODES                                                                        = 30
	EXTRA_STATE                                                                    = 69
	FINISH_STATE                                                                   = 666
	GZIP                                                                           = 0
	GZIP_STATE                                                                     = 57
	HCRC_STATE                                                                     = 103
	HEAP_SIZE                                                                      = 573
	INIT_STATE                                                                     = 42
	LENGTH_CODES                                                                   = 29
	LITERALS                                                                       = 256
	L_CODES                                                                        = 286
	MAX_BITS                                                                       = 15
	MAX_STORED                                                                     = 65535
	MIN_LOOKAHEAD                                                                  = 262
	NAME_STATE                                                                     = 73
	NIL                                                                            = 0
	TOO_FAR                                                                        = 4096
	WIN_INIT                                                                       = 258
	ENOUGH                                                                         = 1444
	ENOUGH_DISTS                                                                   = 592
	ENOUGH_LENS                                                                    = 852
	GUNZIP                                                                         = 0
	MAXBITS                                                                        = 15
	ABSIZE                                                                         = 10
	AHEAD                                                                          = 97
	BACKR                                                                          = 020
	BACKREF                                                                        = 98
	BEHIND                                                                         = 114
	BYTBITS                                                                        = 8
	BYTMASK                                                                        = 255
	BYTTAB                                                                         = 256
	CAP                                                                            = 010
	CCLASS                                                                         = 67
	CH                                                                             = -1
	CHRBITS                                                                        = 16
	CHR_MAX                                                                        = 0xFFFF
	CHR_MIN                                                                        = 0x0000
	CMMAGIC                                                                        = 0x876
	CNFA_NOPROGRESS                                                                = 01
	COLLEL                                                                         = 73
	COLORLESS                                                                      = -1
	COMPATIBLE                                                                     = 3
	DIGIT                                                                          = 100
	DUPINF                                                                         = 256
	DUPMAX                                                                         = 255
	DUPTRAVERSE_MAX_DEPTH                                                          = 15000
	ECLASS                                                                         = 69
	EMPTY                                                                          = 110
	END                                                                            = 88
	EOS                                                                            = 101
	FREECOL                                                                        = 01
	FREESTATE                                                                      = -1
	GUTSMAGIC                                                                      = 0xFED9
	HASLACONS                                                                      = 01
	INCOMPATIBLE                                                                   = 1
	INF                                                                            = 3
	INUSE                                                                          = 0100
	LACON                                                                          = 76
	LONGER                                                                         = 01
	L_BBND                                                                         = 5
	L_BRACK                                                                        = 6
	L_BRE                                                                          = 2
	L_CCL                                                                          = 9
	L_CEL                                                                          = 7
	L_EBND                                                                         = 4
	L_ECL                                                                          = 8
	L_ERE                                                                          = 1
	L_Q                                                                            = 3
	MAX_COLOR                                                                      = 32767
	MIXED                                                                          = 04
	NBYTS                                                                          = 2
	NOCELT                                                                         = -1
	NOPROP                                                                         = 03
	NOSUB                                                                          = -1
	NOTREACHED                                                                     = 0
	NWBDRY                                                                         = 87
	PLAIN                                                                          = 112
	PREFER                                                                         = 80
	PSEUDO                                                                         = 02
	RANGE                                                                          = 82
	REG_ADVANCED                                                                   = 000003
	REG_ADVF                                                                       = 000002
	REG_ASSERT                                                                     = 15
	REG_ATOI                                                                       = 101
	REG_BADBR                                                                      = 10
	REG_BADOPT                                                                     = 18
	REG_BADPAT                                                                     = 2
	REG_BADRPT                                                                     = 13
	REG_BASIC                                                                      = 000000
	REG_BOSONLY                                                                    = 002000
	REG_CANCEL                                                                     = 777
	REG_DUMP                                                                       = 004000
	REG_EBRACE                                                                     = 9
	REG_EBRACK                                                                     = 7
	REG_ECOLLATE                                                                   = 3
	REG_ECOLORS                                                                    = 20
	REG_ECTYPE                                                                     = 4
	REG_EESCAPE                                                                    = 5
	REG_EPAREN                                                                     = 8
	REG_ERANGE                                                                     = 11
	REG_ESPACE                                                                     = 12
	REG_ESUBREG                                                                    = 6
	REG_ETOOBIG                                                                    = 19
	REG_EXPANDED                                                                   = 000040
	REG_EXPECT                                                                     = 001000
	REG_EXTENDED                                                                   = 000001
	REG_FAKE                                                                       = 010000
	REG_FTRACE                                                                     = 0010
	REG_ICASE                                                                      = 000010
	REG_INVARG                                                                     = 16
	REG_ITOA                                                                       = 102
	REG_MIXED                                                                      = 17
	REG_MTRACE                                                                     = 0020
	REG_NEWLINE                                                                    = 000300
	REG_NLANCH                                                                     = 000200
	REG_NLSTOP                                                                     = 000100
	REG_NOMATCH                                                                    = 1
	REG_NOSPEC                                                                     = 4
	REG_NOSUB                                                                      = 000020
	REG_NOTBOL                                                                     = 0001
	REG_NOTEOL                                                                     = 0002
	REG_OKAY                                                                       = 0
	REG_PEND                                                                       = 000400
	REG_PROGRESS                                                                   = 020000
	REG_QUOTE                                                                      = 000004
	REG_SMALL                                                                      = 0040
	REG_STARTEND                                                                   = 0004
	REG_UBACKREF                                                                   = 000001
	REG_UBBS                                                                       = 000100
	REG_UBOUNDS                                                                    = 000004
	REG_UBRACES                                                                    = 000010
	REG_UBSALNUM                                                                   = 000020
	REG_UEMPTYMATCH                                                                = 004000
	REG_UIMPOSSIBLE                                                                = 010000
	REG_ULOCALE                                                                    = 002000
	REG_ULOOKAHEAD                                                                 = 000002
	REG_UNONPOSIX                                                                  = 000200
	REG_UPBOTCH                                                                    = 000040
	REG_USHORTEST                                                                  = 020000
	REG_UUNPORT                                                                    = 001000
	REG_UUNSPEC                                                                    = 000400
	REMAGIC                                                                        = 0xFED7
	SATISFIED                                                                      = 2
	SBEGIN                                                                         = 65
	SEND                                                                           = 90
	SHORTER                                                                        = 02
	SOME                                                                           = 2
	WBDRY                                                                          = 119
	WHITE                                                                          = 0
	X_POSIX2_RE_DUP_MAX                                                            = 255
	X_REGEX_H_                                                                     = 0
	Xxx                                                                            = 1
	FEWCOLORS                                                                      = 15
	FEWSTATES                                                                      = 20
	LOCALDFAS                                                                      = 40
	LOCALMAT                                                                       = 20
	LOCKED                                                                         = 04
	NOPROGRESS                                                                     = 010
	POSTSTATE                                                                      = 02
	STARTER                                                                        = 01
	WORK                                                                           = 1
	CALL_CHAIN_STATIC_SIZE                                                         = 4
	COMPILEENV_INIT_AUX_DATA_SIZE                                                  = 5
	COMPILEENV_INIT_CMD_MAP_SIZE                                                   = 40
	COMPILEENV_INIT_CODE_BYTES                                                     = 250
	COMPILEENV_INIT_EXCEPT_RANGES                                                  = 5
	COMPILEENV_INIT_NUM_OBJECTS                                                    = 60
	CONSTRUCTOR                                                                    = 0x08
	DESTRUCTOR                                                                     = 0x10
	DESTRUCTOR_CALLED                                                              = 2
	DONT_DELETE                                                                    = 0x20000
	FILTER_HANDLING                                                                = 0x2000
	FORCE_UNKNOWN                                                                  = 0x10000
	INST_ADD                                                                       = 53
	INST_APPEND_ARRAY1                                                             = 84
	INST_APPEND_ARRAY4                                                             = 85
	INST_APPEND_ARRAY_STK                                                          = 86
	INST_APPEND_SCALAR1                                                            = 82
	INST_APPEND_SCALAR4                                                            = 83
	INST_APPEND_STK                                                                = 87
	INST_ARRAY_EXISTS_IMM                                                          = 160
	INST_ARRAY_EXISTS_STK                                                          = 159
	INST_ARRAY_MAKE_IMM                                                            = 162
	INST_ARRAY_MAKE_STK                                                            = 161
	INST_BEGIN_CATCH4                                                              = 69
	INST_BITAND                                                                    = 44
	INST_BITNOT                                                                    = 60
	INST_BITOR                                                                     = 42
	INST_BITXOR                                                                    = 43
	INST_BREAK                                                                     = 65
	INST_CALL_BUILTIN_FUNC1                                                        = 62
	INST_CALL_FUNC1                                                                = 63
	INST_CLOCK_READ                                                                = 189
	INST_CONCAT_STK                                                                = 173
	INST_CONTINUE                                                                  = 66
	INST_COROUTINE_NAME                                                            = 149
	INST_DICT_APPEND                                                               = 114
	INST_DICT_DONE                                                                 = 118
	INST_DICT_EXISTS                                                               = 141
	INST_DICT_EXPAND                                                               = 138
	INST_DICT_FIRST                                                                = 116
	INST_DICT_GET                                                                  = 110
	INST_DICT_INCR_IMM                                                             = 113
	INST_DICT_LAPPEND                                                              = 115
	INST_DICT_NEXT                                                                 = 117
	INST_DICT_RECOMBINE_IMM                                                        = 140
	INST_DICT_RECOMBINE_STK                                                        = 139
	INST_DICT_SET                                                                  = 111
	INST_DICT_UNSET                                                                = 112
	INST_DICT_UPDATE_END                                                           = 120
	INST_DICT_UPDATE_START                                                         = 119
	INST_DICT_VERIFY                                                               = 142
	INST_DIV                                                                       = 56
	INST_DONE                                                                      = 0
	INST_DUP                                                                       = 4
	INST_END_CATCH                                                                 = 70
	INST_EQ                                                                        = 45
	INST_EVAL_STK                                                                  = 8
	INST_EXIST_ARRAY                                                               = 129
	INST_EXIST_ARRAY_STK                                                           = 130
	INST_EXIST_SCALAR                                                              = 128
	INST_EXIST_STK                                                                 = 131
	INST_EXPAND_DROP                                                               = 165
	INST_EXPAND_START                                                              = 100
	INST_EXPAND_STKTOP                                                             = 101
	INST_EXPON                                                                     = 99
	INST_EXPR_STK                                                                  = 9
	INST_FOREACH_END                                                               = 168
	INST_FOREACH_START                                                             = 166
	INST_FOREACH_START4                                                            = 67
	INST_FOREACH_STEP                                                              = 167
	INST_FOREACH_STEP4                                                             = 68
	INST_GE                                                                        = 50
	INST_GT                                                                        = 48
	INST_INCR_ARRAY1                                                               = 26
	INST_INCR_ARRAY1_IMM                                                           = 31
	INST_INCR_ARRAY_STK                                                            = 27
	INST_INCR_ARRAY_STK_IMM                                                        = 32
	INST_INCR_SCALAR1                                                              = 24
	INST_INCR_SCALAR1_IMM                                                          = 29
	INST_INCR_SCALAR_STK                                                           = 25
	INST_INCR_SCALAR_STK_IMM                                                       = 30
	INST_INCR_STK                                                                  = 28
	INST_INCR_STK_IMM                                                              = 33
	INST_INFO_LEVEL_ARGS                                                           = 153
	INST_INFO_LEVEL_NUM                                                            = 152
	INST_INVOKE_EXPANDED                                                           = 102
	INST_INVOKE_REPLACE                                                            = 163
	INST_INVOKE_STK1                                                               = 6
	INST_INVOKE_STK4                                                               = 7
	INST_JUMP1                                                                     = 34
	INST_JUMP4                                                                     = 35
	INST_JUMP_FALSE1                                                               = 38
	INST_JUMP_FALSE4                                                               = 39
	INST_JUMP_TABLE                                                                = 121
	INST_JUMP_TRUE1                                                                = 36
	INST_JUMP_TRUE4                                                                = 37
	INST_LAND                                                                      = 41
	INST_LAPPEND_ARRAY1                                                            = 90
	INST_LAPPEND_ARRAY4                                                            = 91
	INST_LAPPEND_ARRAY_STK                                                         = 92
	INST_LAPPEND_LIST                                                              = 185
	INST_LAPPEND_LIST_ARRAY                                                        = 186
	INST_LAPPEND_LIST_ARRAY_STK                                                    = 187
	INST_LAPPEND_LIST_STK                                                          = 188
	INST_LAPPEND_SCALAR1                                                           = 88
	INST_LAPPEND_SCALAR4                                                           = 89
	INST_LAPPEND_STK                                                               = 93
	INST_LE                                                                        = 49
	INST_LIST                                                                      = 79
	INST_LIST_CONCAT                                                               = 164
	INST_LIST_IN                                                                   = 106
	INST_LIST_INDEX                                                                = 80
	INST_LIST_INDEX_IMM                                                            = 103
	INST_LIST_INDEX_MULTI                                                          = 94
	INST_LIST_LENGTH                                                               = 81
	INST_LIST_NOT_IN                                                               = 107
	INST_LIST_RANGE_IMM                                                            = 104
	INST_LMAP_COLLECT                                                              = 169
	INST_LNOT                                                                      = 61
	INST_LOAD_ARRAY1                                                               = 13
	INST_LOAD_ARRAY4                                                               = 14
	INST_LOAD_ARRAY_STK                                                            = 15
	INST_LOAD_SCALAR1                                                              = 10
	INST_LOAD_SCALAR4                                                              = 11
	INST_LOAD_SCALAR_STK                                                           = 12
	INST_LOAD_STK                                                                  = 16
	INST_LOR                                                                       = 40
	INST_LSET_FLAT                                                                 = 97
	INST_LSET_LIST                                                                 = 96
	INST_LSHIFT                                                                    = 51
	INST_LT                                                                        = 47
	INST_MOD                                                                       = 57
	INST_MULT                                                                      = 55
	INST_NEQ                                                                       = 46
	INST_NOP                                                                       = 132
	INST_NSUPVAR                                                                   = 123
	INST_NS_CURRENT                                                                = 151
	INST_NUM_TYPE                                                                  = 182
	INST_ORIGIN_COMMAND                                                            = 178
	INST_OVER                                                                      = 95
	INST_POP                                                                       = 3
	INST_PUSH1                                                                     = 1
	INST_PUSH4                                                                     = 2
	INST_PUSH_RESULT                                                               = 71
	INST_PUSH_RETURN_CODE                                                          = 72
	INST_PUSH_RETURN_OPTIONS                                                       = 108
	INST_REGEXP                                                                    = 127
	INST_RESOLVE_COMMAND                                                           = 154
	INST_RETURN_CODE_BRANCH                                                        = 133
	INST_RETURN_IMM                                                                = 98
	INST_RETURN_STK                                                                = 109
	INST_REVERSE                                                                   = 126
	INST_RSHIFT                                                                    = 52
	INST_START_CMD                                                                 = 105
	INST_STORE_ARRAY1                                                              = 20
	INST_STORE_ARRAY4                                                              = 21
	INST_STORE_ARRAY_STK                                                           = 22
	INST_STORE_SCALAR1                                                             = 17
	INST_STORE_SCALAR4                                                             = 18
	INST_STORE_SCALAR_STK                                                          = 19
	INST_STORE_STK                                                                 = 23
	INST_STR_CLASS                                                                 = 184
	INST_STR_CMP                                                                   = 75
	INST_STR_CONCAT1                                                               = 5
	INST_STR_EQ                                                                    = 73
	INST_STR_FIND                                                                  = 144
	INST_STR_FIND_LAST                                                             = 145
	INST_STR_INDEX                                                                 = 77
	INST_STR_LEN                                                                   = 76
	INST_STR_LOWER                                                                 = 175
	INST_STR_MAP                                                                   = 143
	INST_STR_MATCH                                                                 = 78
	INST_STR_NEQ                                                                   = 74
	INST_STR_RANGE                                                                 = 147
	INST_STR_RANGE_IMM                                                             = 146
	INST_STR_REPLACE                                                               = 177
	INST_STR_TITLE                                                                 = 176
	INST_STR_TRIM                                                                  = 170
	INST_STR_TRIM_LEFT                                                             = 171
	INST_STR_TRIM_RIGHT                                                            = 172
	INST_STR_UPPER                                                                 = 174
	INST_SUB                                                                       = 54
	INST_SYNTAX                                                                    = 125
	INST_TAILCALL                                                                  = 150
	INST_TCLOO_CLASS                                                               = 156
	INST_TCLOO_IS_OBJECT                                                           = 158
	INST_TCLOO_NEXT                                                                = 179
	INST_TCLOO_NEXT_CLASS                                                          = 180
	INST_TCLOO_NS                                                                  = 157
	INST_TCLOO_SELF                                                                = 155
	INST_TRY_CVT_TO_BOOLEAN                                                        = 183
	INST_TRY_CVT_TO_NUMERIC                                                        = 64
	INST_UMINUS                                                                    = 59
	INST_UNSET_ARRAY                                                               = 135
	INST_UNSET_ARRAY_STK                                                           = 136
	INST_UNSET_SCALAR                                                              = 134
	INST_UNSET_STK                                                                 = 137
	INST_UPLUS                                                                     = 58
	INST_UPVAR                                                                     = 122
	INST_VARIABLE                                                                  = 124
	INST_YIELD                                                                     = 148
	INST_YIELD_TO_INVOKE                                                           = 181
	JUMPFIXUP_INIT_ENTRIES                                                         = 10
	LAST_INST_OPCODE                                                               = 189
	LITERAL_CMD_NAME                                                               = 0x02
	LITERAL_ON_HEAP                                                                = 0x01
	LITERAL_UNSHARED                                                               = 0x04
	MAX_INSTRUCTION_OPERANDS                                                       = 2
	OBJECT_DESTRUCTING                                                             = 1
	OO_UNKNOWN_METHOD                                                              = 0x04
	OO_UNUSED_4                                                                    = 4
	PRIVATE_METHOD                                                                 = 0x02
	PUBLIC_METHOD                                                                  = 0x01
	ROOT_CLASS                                                                     = 0x8000
	ROOT_OBJECT                                                                    = 0x1000
	TCLOO_H_INCLUDED                                                               = 0
	TCLOO_PROCEDURE_METHOD_VERSION                                                 = 0
	TCLOO_VERSION                                                                  = "1.1.0"
	TCL_BYTECODE_PRECOMPILED                                                       = 0x0001
	TCL_BYTECODE_RECOMPILE                                                         = 0x0004
	TCL_BYTECODE_RESOLVE_VARS                                                      = 0x0002
	TCL_NO_ELEMENT                                                                 = 2
	TCL_NO_LARGE_INDEX                                                             = 1
	TCL_OO_INTERNAL_H                                                              = 1
	TCL_OO_METADATA_VERSION_CURRENT                                                = 1
	TCL_OO_METHOD_VERSION_CURRENT                                                  = 1
	USE_CLASS_CACHE                                                                = 0x4000
	USE_DECLARER_NS                                                                = 0x80
	X_TCLCOMPILATION                                                               = 1
	X_TCLOODECLS                                                                   = 0
	X_TCLOOINTDECLS                                                                = 0
	CMD_IS_SAFE                                                                    = 1
	COROUTINE_ARGUMENTS_ARBITRARY                                                  = -2
	COROUTINE_ARGUMENTS_SINGLE_OPTIONAL                                            = -1
	CORO_STACK_INITIAL_SIZE                                                        = 200
	IEEE_FLOATING_POINT                                                            = 0
	INTERP_STACK_INITIAL_SIZE                                                      = 2000
	MATH_FUNC_PREFIX_LEN                                                           = 17
	MATH_OP_PREFIX_LEN                                                             = 15
	MAX_EXACT                                                                      = 9007199254740991.0
	RAND_IA                                                                        = 16807
	RAND_IM                                                                        = 2147483647
	RAND_IQ                                                                        = 127773
	RAND_IR                                                                        = 2836
	RAND_MASK                                                                      = 123459876
	BINARY_ALL                                                                     = -1
	BINARY_NOCOUNT                                                                 = -2
	BINARY_SCAN_MAX_CACHE                                                          = 260
	BINARY_SIGNED                                                                  = 0
	BINARY_UNSIGNED                                                                = 1
	FOUR_CENTURIES                                                                 = 146097
	FOUR_YEARS                                                                     = 1461
	HAVE_MKTIME                                                                    = 1
	JDAY_1_JAN_1_CE_GREGORIAN                                                      = 1721426
	JDAY_1_JAN_1_CE_JULIAN                                                         = 1721424
	JULIAN_DAY_POSIX_EPOCH                                                         = 2440588
	ONE_CENTURY_GREGORIAN                                                          = 36524
	ONE_YEAR                                                                       = 365
	SECONDS_PER_DAY                                                                = 86400
	TCL_CLOCK_PREFIX_LEN                                                           = 14
	LC_ALL                                                                         = 0
	LC_COLLATE                                                                     = 1
	LC_CTYPE                                                                       = 2
	LC_MAX                                                                         = 5
	LC_MIN                                                                         = 0
	LC_MONETARY                                                                    = 3
	LC_NUMERIC                                                                     = 4
	LC_TIME                                                                        = 5
	PTI_STATE_DOWN                                                                 = 8
	PTI_STATE_END                                                                  = 4
	PTI_STATE_IDLE                                                                 = 0
	PTI_STATE_STOP                                                                 = 2
	PTI_STATE_WORK                                                                 = 1
	TCL_Z_MODIFIER                                                                 = "I"
	VER_PLATFORM_WIN32_CE                                                          = 3
	X_CONFIG_LOCALE_SWT                                                            = 0
	X_DISABLE_PER_THREAD_LOCALE                                                    = 0x2
	X_DISABLE_PER_THREAD_LOCALE_GLOBAL                                             = 0x20
	X_DISABLE_PER_THREAD_LOCALE_NEW                                                = 0x200
	X_ENABLE_PER_THREAD_LOCALE                                                     = 0x1
	X_ENABLE_PER_THREAD_LOCALE_GLOBAL                                              = 0x10
	X_ENABLE_PER_THREAD_LOCALE_NEW                                                 = 0x100
	X_INC_LOCALE                                                                   = 0
	X_LCONV_DEFINED                                                                = 0
	X_TCLWININT                                                                    = 0
	MAXCALLOC                                                                      = 1024000
	NUM_LISTS                                                                      = 30
	SORTMODE_ASCII                                                                 = 0
	SORTMODE_ASCII_NC                                                              = 8
	SORTMODE_COMMAND                                                               = 3
	SORTMODE_DICTIONARY                                                            = 4
	SORTMODE_INTEGER                                                               = 1
	SORTMODE_REAL                                                                  = 2
	X_TCLREGEXP                                                                    = 0
	CONCAT_TRIM_SET                                                                = " \f\v\r\t\n"
	TCL_STRING_TRIM_H                                                              = 0
	AND                                                                            = 84
	BAREWORD                                                                       = 3
	BINARY                                                                         = 0x40
	BINARY_MINUS                                                                   = 66
	BINARY_PLUS                                                                    = 65
	BIT_AND                                                                        = 73
	BIT_NOT                                                                        = 135
	BIT_OR                                                                         = 75
	BIT_XOR                                                                        = 74
	BOOLEAN1                                                                       = 195
	BRACED                                                                         = 196
	CLOSE_PAREN                                                                    = 91
	COLON                                                                          = 77
	COMMA                                                                          = 67
	DIVIDE                                                                         = 69
	EQUAL                                                                          = 82
	EXPON                                                                          = 88
	FUNCTION                                                                       = 131
	GEQ                                                                            = 81
	GREATER                                                                        = 72
	INCOMPLETE                                                                     = 4
	INVALID                                                                        = 5
	IN_LIST                                                                        = 89
	LEAF                                                                           = 0xC0
	LEFT_SHIFT                                                                     = 78
	LEQ                                                                            = 80
	LESS                                                                           = 71
	MINUS                                                                          = 2
	MOD                                                                            = 70
	MULT                                                                           = 68
	NEQ                                                                            = 83
	NODE_TYPE                                                                      = 0xC0
	NOT                                                                            = 134
	NOT_IN_LIST                                                                    = 90
	NUMBER                                                                         = 193
	OPEN_PAREN                                                                     = 133
	OR                                                                             = 85
	PLUS                                                                           = 1
	QUESTION                                                                       = 76
	QUOTED                                                                         = 198
	RIGHT_SHIFT                                                                    = 79
	SCRIPT                                                                         = 194
	START                                                                          = 132
	STREQ                                                                          = 86
	STRNEQ                                                                         = 87
	UNARY                                                                          = 0x80
	UNARY_MINUS                                                                    = 130
	UNARY_PLUS                                                                     = 129
	VARIABLE                                                                       = 197
	NUM_STATIC_POS                                                                 = 20
	ASSOC_KEY                                                                      = "tclPackageAboutDict"
	END_OF_TIME                                                                    = 2037
	EPOCH                                                                          = 1970
	SECSPERDAY                                                                     = 86400
	START_OF_TIME                                                                  = 1902
	TM_YEAR_BASE                                                                   = 1900
	YYBISON                                                                        = 1
	YYBISON_VERSION                                                                = "3.1"
	YYCOPY_NEEDED                                                                  = 1
	YYDEBUG                                                                        = 0
	YYEMPTY                                                                        = -2
	YYEOF                                                                          = 0
	YYERRCODE                                                                      = 256
	YYERROR_VERBOSE                                                                = 0
	YYFINAL                                                                        = 2
	YYINITDEPTH                                                                    = 200
	YYLAST                                                                         = 81
	YYLTYPE_IS_DECLARED                                                            = 1
	YYLTYPE_IS_TRIVIAL                                                             = 1
	YYMAXDEPTH                                                                     = 10000
	YYMAXUTOK                                                                      = 274
	YYNNTS                                                                         = 16
	YYNRULES                                                                       = 56
	YYNSTATES                                                                      = 85
	YYNTOKENS                                                                      = 26
	YYPACT_NINF                                                                    = -18
	YYPULL                                                                         = 1
	YYPURE                                                                         = 1
	YYPUSH                                                                         = 0
	YYSKELETON_NAME                                                                = "yacc.c"
	YYSTYPE_IS_DECLARED                                                            = 1
	YYSTYPE_IS_TRIVIAL                                                             = 1
	YYTABLE_NINF                                                                   = -1
	YYTERROR                                                                       = 1
	YYTOKENTYPE                                                                    = 0
	YYUNDEFTOK                                                                     = 2
	YY_NULLPTR                                                                     = 0
	LOCAL_SIZE                                                                     = 64
	ENCODING_DOUBLEBYTE                                                            = 1
	ENCODING_ESCAPE                                                                = 3
	ENCODING_MULTIBYTE                                                             = 2
	ENCODING_SINGLEBYTE                                                            = 0
	ASYNC_CHECK_COUNT_MASK                                                         = 63
	LAST_BUILTIN_FUNC                                                              = 25
	TCL_SUPPORT_84_BYTECODE                                                        = 1
	X_TCLFILESYSTEM                                                                = 0
	GUESSED_BLOCK_SIZE                                                             = 1024
	NUM_COUNTERS                                                                   = 10
	REBUILD_MULTIPLIER                                                             = 3
	HISTORY_OBJS_KEY                                                               = "::tcl::HistoryObjs"
	BG_FLUSH_SCHEDULED                                                             = 128
	BUFFER_PADDING                                                                 = 16
	CHANNELBUFFER_DEFAULT_SIZE                                                     = 4096
	CHANNEL_BLOCKED                                                                = 2048
	CHANNEL_CLOSED                                                                 = 256
	CHANNEL_CLOSEDWRITE                                                            = 2097152
	CHANNEL_DEAD                                                                   = 8192
	CHANNEL_EOF                                                                    = 512
	CHANNEL_INCLOSE                                                                = 524288
	CHANNEL_LINEBUFFERED                                                           = 16
	CHANNEL_NEED_MORE_DATA                                                         = 16384
	CHANNEL_NONBLOCKING                                                            = 8
	CHANNEL_RAW_MODE                                                               = 65536
	CHANNEL_STICKY_EOF                                                             = 1024
	CHANNEL_UNBUFFERED                                                             = 32
	ENCODING_LINESIZE                                                              = 20
	INPUT_SAW_CR                                                                   = 4096
	MAX_CHANNEL_BUFFER_SIZE                                                        = 1048576
	SYNTHETIC_EVENT_TIME                                                           = 0
	UTF_EXPANSION_FACTOR                                                           = 1024
	CHANNEL_ASYNC                                                                  = 1
	FLUSH_DELAY                                                                    = 5
	INCREMENT                                                                      = 512
	P_NO_PRESERVE                                                                  = 0
	P_PRESERVE                                                                     = 1
	TRANSMIT_DONT                                                                  = 0
	TRANSMIT_DOWN                                                                  = 1
	TRANSMIT_IBUF                                                                  = 3
	TRANSMIT_NUM                                                                   = 4
	TRANSMIT_SELF                                                                  = 2
	EOK                                                                            = 0
	RANDW                                                                          = 6
	RCMKEY                                                                         = "ReflectedChannelMap"
	FLUSH_DISCARD                                                                  = 0
	FLUSH_WRITE                                                                    = 1
	RB_INCREMENT                                                                   = 512
	RTMKEY                                                                         = "ReflectedTransformMap"
	RW_MODES                                                                       = 3
	NUM_SPACES                                                                     = 20
	LIMIT_HANDLER_ACTIVE                                                           = 0x01
	LIMIT_HANDLER_DELETED                                                          = 0x02
	LINK_BEING_UPDATED                                                             = 2
	LINK_READ_ONLY                                                                 = 1
	DEFAULT_PRIMARY_PROMPT                                                         = "% "
	UNICODE                                                                        = 1
	X_UNICODE                                                                      = 1
	ALLOC_CHUNK                                                                    = 8
	BUILDING_MIXINS                                                                = 0x400000
	DEFINITE_PROTECTED                                                             = 0x100000
	DEFINITE_PUBLIC                                                                = 0x200000
	KNOWN_STATE                                                                    = 3145728
	NO_IMPLEMENTATION                                                              = 2
	OBJECT_MIXIN                                                                   = 0x1000000
	SPECIAL                                                                        = 65560
	TRAVERSED_MIXIN                                                                = 0x800000
	OBJNAME_LENGTH_IN_ERRORINFO_LIMIT                                              = 30
	PUBLIC_PATTERN                                                                 = "[a-z]*"
	LIMIT                                                                          = 60
	TclOOUnusedStubEntry                                                           = 0
	TYPE_BRACE                                                                     = 0x40
	TYPE_CLOSE_BRACK                                                               = 0x20
	TYPE_CLOSE_PAREN                                                               = 0x10
	TYPE_COMMAND_END                                                               = 0x2
	TYPE_NORMAL                                                                    = 0
	TYPE_QUOTE                                                                     = 0x8
	TYPE_SPACE                                                                     = 0x1
	TYPE_SUBS                                                                      = 0x4
	TCLPATH_APPENDED                                                               = 1
	TCLPATH_NEEDNORM                                                               = 4
	CFG_64                                                                         = "1"
	CFG_COMPILE_DEBUG                                                              = "0"
	CFG_COMPILE_STATS                                                              = "0"
	CFG_DEBUG                                                                      = "0"
	CFG_INSTALL_BINDIR                                                             = ""
	CFG_INSTALL_DOCDIR                                                             = "/usr/local/man"
	CFG_INSTALL_INCDIR                                                             = "/usr/local/include"
	CFG_INSTALL_LIBDIR                                                             = ""
	CFG_INSTALL_SCRDIR                                                             = "/usr/local/lib/tcl8.6"
	CFG_MEMDEBUG                                                                   = "0"
	CFG_OPTIMIZED                                                                  = "1"
	CFG_PROFILED                                                                   = "0"
	CFG_RUNTIME_BINDIR                                                             = "/usr/local/bin"
	CFG_RUNTIME_DOCDIR                                                             = "/usr/local/man"
	CFG_RUNTIME_INCDIR                                                             = "/usr/local/include"
	CFG_RUNTIME_LIBDIR                                                             = "/usr/local/lib"
	CFG_RUNTIME_SCRDIR                                                             = "/usr/local/lib/tcl8.6"
	CFG_THREADED                                                                   = "0"
	INITIAL_SIZE                                                                   = 2
	JOE_EXTENSION                                                                  = 0
	NUM_REGEXPS                                                                    = 30
	TCL_REG_GLOBOK_FLAGS                                                           = 27
	SCAN_BIG                                                                       = 0x800
	SCAN_LONGER                                                                    = 0x400
	SCAN_NOSKIP                                                                    = 0x1
	SCAN_SUPPRESS                                                                  = 0x2
	SCAN_UNSIGNED                                                                  = 0x4
	SCAN_WIDTH                                                                     = 0x8
	BLETCH                                                                         = 0x10
	DIGIT_GROUP                                                                    = 8
	EXPONENT_BIAS                                                                  = 0x3FF
	EXP_MASK                                                                       = 0x7FF00000
	EXP_SHIFT                                                                      = 20
	FP_PRECISION                                                                   = 53
	HI_ORDER_SIG_MASK                                                              = 0x000FFFFF
	LOG10_2                                                                        = 0.3010299956639812
	LOG10_3HALVES_PLUS_FUDGE                                                       = 0.1760912590558
	MAXPOW                                                                         = 22
	NAN_START                                                                      = 0x7FF8
	N_BIGTENS                                                                      = 5
	N_LOG2POW5                                                                     = 27
	QUICK_MAX                                                                      = 14
	SIGN_BIT                                                                       = 0x80000000
	TEN_PMAX                                                                       = 22
	TWO_OVER_3LOG10                                                                = 0.28952965460216784
	COMPAT                                                                         = 0
	MAX_FLOAT_SIZE                                                                 = 320
	TclSockMinimumBuffersOld                                                       = 0
	TclUnixCopyFile                                                                = 0
	TclUnixOpenTemporaryFile                                                       = 0
	TclUnixWaitForFile                                                             = 0
	TclUnixWaitForFile_                                                            = 0
	TclUnusedStubEntry                                                             = 0
	TclpIsAtty                                                                     = 0
	TclpReaddir                                                                    = 0
	SLEEP_OFFLOAD_GETTIMEOFDAY                                                     = 20
	TCL_TIME_MAXIMUM_SLICE                                                         = 500
	TCL_TRACE_ANY_EXEC                                                             = 15
	TCL_TRACE_ENTER_DURING_EXEC                                                    = 4
	TCL_TRACE_EXEC_DIRECT                                                          = 0x20
	TCL_TRACE_EXEC_IN_PROGRESS                                                     = 0x10
	TCL_TRACE_LEAVE_DURING_EXEC                                                    = 8
	LINE_LENGTH                                                                    = 128
	OFFSET_BITS                                                                    = 5
	UNICODE_SELF                                                                   = 0x80
	CONVERT_ANY                                                                    = 16
	CONVERT_BRACE                                                                  = 2
	CONVERT_ESCAPE                                                                 = 4
	CONVERT_MASK                                                                   = 6
	CONVERT_NONE                                                                   = 0
	X_INC_SETJMP                                                                   = 0
	X_JBLEN                                                                        = 16
	X_JMP_BUF_DEFINED                                                              = 0
	FILE_APPEND                                                                    = 4
	FILE_ASYNC                                                                     = 2
	FILE_PENDING                                                                   = 1
	FILE_TYPE_CONSOLE                                                              = 5
	FILE_TYPE_SERIAL                                                               = 4
	CONSOLE_ASYNC                                                                  = 2
	CONSOLE_BUFFERED                                                               = 8
	CONSOLE_BUFFER_SIZE                                                            = 8192
	CONSOLE_EOF                                                                    = 4
	CONSOLE_PENDING                                                                = 1
	APPCLASS_MASK                                                                  = 15
	APPCLASS_MONITOR                                                               = 1
	APPCLASS_STANDARD                                                              = 0
	APPCMD_CLIENTONLY                                                              = 16
	APPCMD_FILTERINITS                                                             = 32
	APPCMD_MASK                                                                    = 4080
	CADV_LATEACK                                                                   = 0xFFFF
	CBF_FAIL_ADVISES                                                               = 0x00004000
	CBF_FAIL_ALLSVRXACTIONS                                                        = 0x0003f000
	CBF_FAIL_CONNECTIONS                                                           = 0x00002000
	CBF_FAIL_EXECUTES                                                              = 0x00008000
	CBF_FAIL_POKES                                                                 = 0x00010000
	CBF_FAIL_REQUESTS                                                              = 0x00020000
	CBF_FAIL_SELFCONNECTIONS                                                       = 0x00001000
	CBF_SKIP_ALLNOTIFICATIONS                                                      = 0x003c0000
	CBF_SKIP_CONNECT_CONFIRMS                                                      = 0x00040000
	CBF_SKIP_DISCONNECTS                                                           = 0x00200000
	CBF_SKIP_REGISTRATIONS                                                         = 0x00080000
	CBF_SKIP_UNREGISTRATIONS                                                       = 0x00100000
	CP_WINANSI                                                                     = 1004
	CP_WINNEUTRAL                                                                  = 1004
	CP_WINUNICODE                                                                  = 1200
	DDE_FACK                                                                       = 0x8000
	DDE_FACKREQ                                                                    = 0x8000
	DDE_FACKRESERVED                                                               = -49408
	DDE_FADVRESERVED                                                               = -49153
	DDE_FAPPSTATUS                                                                 = 0x00ff
	DDE_FBUSY                                                                      = 0x4000
	DDE_FDATRESERVED                                                               = -45057
	DDE_FDEFERUPD                                                                  = 0x4000
	DDE_FLAG_ASYNC                                                                 = 1
	DDE_FLAG_BINARY                                                                = 2
	DDE_FLAG_FORCE                                                                 = 4
	DDE_FNOTPROCESSED                                                              = 0x0000
	DDE_FPOKRESERVED                                                               = -8193
	DDE_FRELEASE                                                                   = 0x2000
	DDE_FREQUESTED                                                                 = 0x1000
	DMLERR_ADVACKTIMEOUT                                                           = 0x4000
	DMLERR_BUSY                                                                    = 0x4001
	DMLERR_DATAACKTIMEOUT                                                          = 0x4002
	DMLERR_DLL_NOT_INITIALIZED                                                     = 0x4003
	DMLERR_DLL_USAGE                                                               = 0x4004
	DMLERR_EXECACKTIMEOUT                                                          = 0x4005
	DMLERR_FIRST                                                                   = 0x4000
	DMLERR_INVALIDPARAMETER                                                        = 0x4006
	DMLERR_LAST                                                                    = 0x4011
	DMLERR_LOW_MEMORY                                                              = 0x4007
	DMLERR_MEMORY_ERROR                                                            = 0x4008
	DMLERR_NOTPROCESSED                                                            = 0x4009
	DMLERR_NO_CONV_ESTABLISHED                                                     = 0x400a
	DMLERR_NO_ERROR                                                                = 0
	DMLERR_POKEACKTIMEOUT                                                          = 0x400b
	DMLERR_POSTMSG_FAILED                                                          = 0x400c
	DMLERR_REENTRANCY                                                              = 0x400d
	DMLERR_SERVER_DIED                                                             = 0x400e
	DMLERR_SYS_ERROR                                                               = 0x400f
	DMLERR_UNADVACKTIMEOUT                                                         = 0x4010
	DMLERR_UNFOUND_QUEUE_ID                                                        = 0x4011
	DNS_FILTEROFF                                                                  = 0x0008
	DNS_FILTERON                                                                   = 0x0004
	DNS_REGISTER                                                                   = 0x0001
	DNS_UNREGISTER                                                                 = 0x0002
	EC_DISABLE                                                                     = 8
	EC_ENABLEALL                                                                   = 0
	EC_ENABLEONE                                                                   = 128
	EC_QUERYWAITING                                                                = 2
	EXPENTRY                                                                       = 0
	HDATA_APPOWNED                                                                 = 0x0001
	MAX_MONITORS                                                                   = 4
	MF_CALLBACKS                                                                   = 0x08000000
	MF_CONV                                                                        = 0x40000000
	MF_ERRORS                                                                      = 0x10000000
	MF_HSZ_INFO                                                                    = 0x01000000
	MF_LINKS                                                                       = 0x20000000
	MF_MASK                                                                        = 0xFF000000
	MF_POSTMSGS                                                                    = 0x04000000
	MF_SENDMSGS                                                                    = 0x02000000
	MH_CLEANUP                                                                     = 4
	MH_CREATE                                                                      = 1
	MH_DELETE                                                                      = 3
	MH_KEEP                                                                        = 2
	MSGF_DDEMGR                                                                    = 0x8001
	QID_SYNC                                                                       = 0xFFFFFFFF
	ST_ADVISE                                                                      = 0x0002
	ST_BLOCKED                                                                     = 0x0008
	ST_BLOCKNEXT                                                                   = 0x0080
	ST_CLIENT                                                                      = 0x0010
	ST_CONNECTED                                                                   = 0x0001
	ST_INLIST                                                                      = 0x0040
	ST_ISLOCAL                                                                     = 0x0004
	ST_ISSELF                                                                      = 0x0100
	ST_TERMINATED                                                                  = 0x0020
	TCL_DDE_PACKAGE_NAME                                                           = "dde"
	TCL_DDE_VERSION                                                                = "1.4.4"
	TIMEOUT_ASYNC                                                                  = 0xFFFFFFFF
	USE_TCL_STUBS                                                                  = 0
	WM_DDE_ACK                                                                     = 996
	WM_DDE_ADVISE                                                                  = 994
	WM_DDE_DATA                                                                    = 997
	WM_DDE_EXECUTE                                                                 = 1000
	WM_DDE_FIRST                                                                   = 0x03E0
	WM_DDE_INITIATE                                                                = 992
	WM_DDE_LAST                                                                    = 1000
	WM_DDE_POKE                                                                    = 999
	WM_DDE_REQUEST                                                                 = 998
	WM_DDE_TERMINATE                                                               = 993
	WM_DDE_UNADVISE                                                                = 995
	XCLASS_BOOL                                                                    = 0x1000
	XCLASS_DATA                                                                    = 0x2000
	XCLASS_FLAGS                                                                   = 0x4000
	XCLASS_MASK                                                                    = 0xFC00
	XCLASS_NOTIFICATION                                                            = 0x8000
	XST_ADVACKRCVD                                                                 = 13
	XST_ADVDATAACKRCVD                                                             = 16
	XST_ADVDATASENT                                                                = 15
	XST_ADVSENT                                                                    = 11
	XST_CONNECTED                                                                  = 2
	XST_DATARCVD                                                                   = 6
	XST_EXECACKRCVD                                                                = 10
	XST_EXECSENT                                                                   = 9
	XST_INCOMPLETE                                                                 = 1
	XST_INIT1                                                                      = 3
	XST_INIT2                                                                      = 4
	XST_NULL                                                                       = 0
	XST_POKEACKRCVD                                                                = 8
	XST_POKESENT                                                                   = 7
	XST_REQSENT                                                                    = 5
	XST_UNADVACKRCVD                                                               = 14
	XST_UNADVSENT                                                                  = 12
	XTYPF_ACKREQ                                                                   = 0x0008
	XTYPF_NOBLOCK                                                                  = 0x0002
	XTYPF_NODATA                                                                   = 0x0004
	XTYP_ADVDATA                                                                   = 16400
	XTYP_ADVREQ                                                                    = 8226
	XTYP_ADVSTART                                                                  = 4144
	XTYP_ADVSTOP                                                                   = 32832
	XTYP_CONNECT                                                                   = 4194
	XTYP_CONNECT_CONFIRM                                                           = 32882
	XTYP_DISCONNECT                                                                = 32962
	XTYP_ERROR                                                                     = 32770
	XTYP_EXECUTE                                                                   = 16464
	XTYP_MASK                                                                      = 0x00F0
	XTYP_MONITOR                                                                   = 33010
	XTYP_POKE                                                                      = 16528
	XTYP_REGISTER                                                                  = 32930
	XTYP_REQUEST                                                                   = 8368
	XTYP_SHIFT                                                                     = 4
	XTYP_UNREGISTER                                                                = 32978
	XTYP_WILDCONNECT                                                               = 8418
	XTYP_XACT_COMPLETE                                                             = 32896
	X_DDEHEADER_INCLUDED_                                                          = 0
	X_INC_DDEMLH                                                                   = 0
	DOTREE_F                                                                       = 3
	DOTREE_LINK                                                                    = 4
	DOTREE_POSTD                                                                   = 2
	DOTREE_PRED                                                                    = 1
	AA_AUDIT_ALL                                                                   = 0x0001
	AA_A_ACL                                                                       = 0x8000
	AA_A_ALL                                                                       = 3840
	AA_A_CREATE                                                                    = 0x2000
	AA_A_DELETE                                                                    = 0x4000
	AA_A_OPEN                                                                      = 0x1000
	AA_A_OWNER                                                                     = 0x0004
	AA_A_WRITE                                                                     = 0x2000
	AA_CLOSE                                                                       = 0x0008
	AA_F_ACL                                                                       = 0x0800
	AA_F_ALL                                                                       = 3840
	AA_F_CREATE                                                                    = 0x0200
	AA_F_DELETE                                                                    = 0x0400
	AA_F_OPEN                                                                      = 0x0100
	AA_F_WRITE                                                                     = 0x0200
	AA_S_ACL                                                                       = 0x0080
	AA_S_ALL                                                                       = 240
	AA_S_CREATE                                                                    = 0x0020
	AA_S_DELETE                                                                    = 0x0040
	AA_S_OPEN                                                                      = 0x0010
	AA_S_WRITE                                                                     = 0x0020
	ACCCTRL_DEFAULT_PROVIDERA                                                      = "Windows NT Access Provider"
	ACCESS_ACCESS_LIST_INFOLEVEL                                                   = 1004
	ACCESS_ACCESS_LIST_PARMNUM                                                     = 4
	ACCESS_ALL                                                                     = 127
	ACCESS_ATRIB                                                                   = 0x20
	ACCESS_ATTR_INFOLEVEL                                                          = 1002
	ACCESS_ATTR_PARMNUM                                                            = 2
	ACCESS_AUDIT                                                                   = 0x1
	ACCESS_COUNT_INFOLEVEL                                                         = 1003
	ACCESS_COUNT_PARMNUM                                                           = 3
	ACCESS_CREATE                                                                  = 0x04
	ACCESS_DELETE                                                                  = 0x10
	ACCESS_EXEC                                                                    = 0x08
	ACCESS_FAIL_ACL                                                                = 0x800
	ACCESS_FAIL_DELETE                                                             = 0x400
	ACCESS_FAIL_MASK                                                               = 0xF00
	ACCESS_FAIL_OPEN                                                               = 0x100
	ACCESS_FAIL_SHIFT                                                              = 4
	ACCESS_FAIL_WRITE                                                              = 0x200
	ACCESS_GROUP                                                                   = 0x8000
	ACCESS_LETTERS                                                                 = "RWCXDAP         "
	ACCESS_NONE                                                                    = 0
	ACCESS_PERM                                                                    = 0x40
	ACCESS_READ                                                                    = 0x01
	ACCESS_RESOURCE_NAME_INFOLEVEL                                                 = 1001
	ACCESS_RESOURCE_NAME_PARMNUM                                                   = 1
	ACCESS_SUCCESS_ACL                                                             = 0x80
	ACCESS_SUCCESS_DELETE                                                          = 0x40
	ACCESS_SUCCESS_MASK                                                            = 0xF0
	ACCESS_SUCCESS_OPEN                                                            = 0x10
	ACCESS_SUCCESS_WRITE                                                           = 0x20
	ACCESS_WRITE                                                                   = 0x02
	ACDD_VISIBLE                                                                   = 0x1
	ACM_ISPLAYING                                                                  = 1128
	ACM_OPEN                                                                       = 1124
	ACM_OPENA                                                                      = 1124
	ACM_OPENW                                                                      = 1127
	ACM_PLAY                                                                       = 1125
	ACM_STOP                                                                       = 1126
	ACN_START                                                                      = 1
	ACN_STOP                                                                       = 2
	ACS_AUTOPLAY                                                                   = 0x4
	ACS_CENTER                                                                     = 0x1
	ACS_TIMER                                                                      = 0x8
	ACS_TRANSPARENT                                                                = 0x2
	ACTION_ADMINUNLOCK                                                             = 01
	ACTION_LOCKOUT                                                                 = 00
	ACTIVEOBJECT_STRONG                                                            = 0x0
	ACTIVEOBJECT_WEAK                                                              = 0x1
	ACTRL_ACCESS_ALLOWED                                                           = 0x00000001
	ACTRL_ACCESS_DENIED                                                            = 0x00000002
	ACTRL_ACCESS_NO_OPTIONS                                                        = 0x0
	ACTRL_ACCESS_PROTECTED                                                         = 0x00000001
	ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES                                           = 0x1
	ACTRL_AUDIT_FAILURE                                                            = 0x00000008
	ACTRL_AUDIT_SUCCESS                                                            = 0x00000004
	ACTRL_CHANGE_ACCESS                                                            = 0x20000000
	ACTRL_CHANGE_OWNER                                                             = 0x40000000
	ACTRL_DELETE                                                                   = 0x08000000
	ACTRL_DIR_CREATE_CHILD                                                         = 4
	ACTRL_DIR_CREATE_OBJECT                                                        = 2
	ACTRL_DIR_DELETE_CHILD                                                         = 64
	ACTRL_DIR_LIST                                                                 = 1
	ACTRL_DIR_TRAVERSE                                                             = 32
	ACTRL_DS_CONTROL_ACCESS                                                        = 256
	ACTRL_DS_CREATE_CHILD                                                          = 1
	ACTRL_DS_DELETE_CHILD                                                          = 2
	ACTRL_DS_DELETE_TREE                                                           = 64
	ACTRL_DS_LIST                                                                  = 4
	ACTRL_DS_LIST_OBJECT                                                           = 128
	ACTRL_DS_OPEN                                                                  = 0
	ACTRL_DS_READ_PROP                                                             = 16
	ACTRL_DS_SELF                                                                  = 8
	ACTRL_DS_WRITE_PROP                                                            = 32
	ACTRL_FILE_APPEND                                                              = 4
	ACTRL_FILE_CREATE_PIPE                                                         = 512
	ACTRL_FILE_EXECUTE                                                             = 32
	ACTRL_FILE_READ                                                                = 1
	ACTRL_FILE_READ_ATTRIB                                                         = 128
	ACTRL_FILE_READ_PROP                                                           = 8
	ACTRL_FILE_WRITE                                                               = 2
	ACTRL_FILE_WRITE_ATTRIB                                                        = 256
	ACTRL_FILE_WRITE_PROP                                                          = 16
	ACTRL_KERNEL_ALERT                                                             = 1024
	ACTRL_KERNEL_CONTROL                                                           = 512
	ACTRL_KERNEL_DIMPERSONATE                                                      = 32768
	ACTRL_KERNEL_DUP_HANDLE                                                        = 32
	ACTRL_KERNEL_GET_CONTEXT                                                       = 2048
	ACTRL_KERNEL_GET_INFO                                                          = 256
	ACTRL_KERNEL_IMPERSONATE                                                       = 16384
	ACTRL_KERNEL_PROCESS                                                           = 64
	ACTRL_KERNEL_SET_CONTEXT                                                       = 4096
	ACTRL_KERNEL_SET_INFO                                                          = 128
	ACTRL_KERNEL_TERMINATE                                                         = 1
	ACTRL_KERNEL_THREAD                                                            = 2
	ACTRL_KERNEL_TOKEN                                                             = 8192
	ACTRL_KERNEL_VM                                                                = 4
	ACTRL_KERNEL_VM_READ                                                           = 8
	ACTRL_KERNEL_VM_WRITE                                                          = 16
	ACTRL_PERM_1                                                                   = 0x00000001
	ACTRL_PERM_10                                                                  = 0x00000200
	ACTRL_PERM_11                                                                  = 0x00000400
	ACTRL_PERM_12                                                                  = 0x00000800
	ACTRL_PERM_13                                                                  = 0x00001000
	ACTRL_PERM_14                                                                  = 0x00002000
	ACTRL_PERM_15                                                                  = 0x00004000
	ACTRL_PERM_16                                                                  = 0x00008000
	ACTRL_PERM_17                                                                  = 0x00010000
	ACTRL_PERM_18                                                                  = 0x00020000
	ACTRL_PERM_19                                                                  = 0x00040000
	ACTRL_PERM_2                                                                   = 0x00000002
	ACTRL_PERM_20                                                                  = 0x00080000
	ACTRL_PERM_3                                                                   = 0x00000004
	ACTRL_PERM_4                                                                   = 0x00000008
	ACTRL_PERM_5                                                                   = 0x00000010
	ACTRL_PERM_6                                                                   = 0x00000020
	ACTRL_PERM_7                                                                   = 0x00000040
	ACTRL_PERM_8                                                                   = 0x00000080
	ACTRL_PERM_9                                                                   = 0x00000100
	ACTRL_PRINT_JADMIN                                                             = 16
	ACTRL_PRINT_PADMIN                                                             = 4
	ACTRL_PRINT_PUSE                                                               = 8
	ACTRL_PRINT_SADMIN                                                             = 1
	ACTRL_PRINT_SLIST                                                              = 2
	ACTRL_READ_CONTROL                                                             = 0x10000000
	ACTRL_REG_CREATE_CHILD                                                         = 4
	ACTRL_REG_LINK                                                                 = 32
	ACTRL_REG_LIST                                                                 = 8
	ACTRL_REG_NOTIFY                                                               = 16
	ACTRL_REG_QUERY                                                                = 1
	ACTRL_REG_SET                                                                  = 2
	ACTRL_RESERVED                                                                 = 0x00000000
	ACTRL_STD_RIGHTS_ALL                                                           = 0xf8000000
	ACTRL_STD_RIGHT_REQUIRED                                                       = 2013265920
	ACTRL_SVC_GET_INFO                                                             = 1
	ACTRL_SVC_INTERROGATE                                                          = 128
	ACTRL_SVC_LIST                                                                 = 8
	ACTRL_SVC_PAUSE                                                                = 64
	ACTRL_SVC_SET_INFO                                                             = 2
	ACTRL_SVC_START                                                                = 16
	ACTRL_SVC_STATUS                                                               = 4
	ACTRL_SVC_STOP                                                                 = 32
	ACTRL_SVC_UCONTROL                                                             = 256
	ACTRL_SYNCHRONIZE                                                              = 0x80000000
	ACTRL_SYSTEM_ACCESS                                                            = 0x04000000
	ACTRL_WIN_CLIPBRD                                                              = 1
	ACTRL_WIN_CREATE                                                               = 4
	ACTRL_WIN_EXIT                                                                 = 256
	ACTRL_WIN_GLOBAL_ATOMS                                                         = 2
	ACTRL_WIN_LIST                                                                 = 16
	ACTRL_WIN_LIST_DESK                                                            = 8
	ACTRL_WIN_READ_ATTRIBS                                                         = 32
	ACTRL_WIN_SCREEN                                                               = 128
	ACTRL_WIN_WRITE_ATTRIBS                                                        = 64
	AE_ACCLIMITEXCD                                                                = 17
	AE_ACCRESTRICT                                                                 = 4
	AE_ACLMOD1                                                                     = 12
	AE_ACLMODFAIL                                                                  = 19
	AE_ADD                                                                         = 2
	AE_ADMIN                                                                       = 2
	AE_ADMINDIS                                                                    = 3
	AE_ADMINPRIVREQD                                                               = 2
	AE_ADMIN_CLOSE                                                                 = 2
	AE_AUTODIS                                                                     = 2
	AE_BADPW                                                                       = 1
	AE_CLOSEFILE1                                                                  = 9
	AE_CONNREJ1                                                                    = 6
	AE_CONNSTART1                                                                  = 4
	AE_CONNSTOP1                                                                   = 5
	AE_DELETE                                                                      = 1
	AE_ERROR                                                                       = 1
	AE_GENERAL                                                                     = 0
	AE_GENERIC_TYPE                                                                = 21
	AE_GUEST                                                                       = 0
	AE_LIM_DELETED                                                                 = 5
	AE_LIM_DISABLED                                                                = 4
	AE_LIM_EXPIRED                                                                 = 2
	AE_LIM_INVAL_WKSTA                                                             = 3
	AE_LIM_LOGONHOURS                                                              = 1
	AE_LIM_UNKNOWN                                                                 = 0
	AE_LOCKOUT1                                                                    = 20
	AE_MOD                                                                         = 0
	AE_NETLOGDENIED                                                                = 16
	AE_NETLOGOFF1                                                                  = 15
	AE_NETLOGON1                                                                   = 14
	AE_NOACCESSPERM                                                                = 3
	AE_NORMAL                                                                      = 0
	AE_NORMAL_CLOSE                                                                = 0
	AE_RESACCESS1                                                                  = 7
	AE_RESACCESS2                                                                  = 18
	AE_RESACCESSREJ1                                                               = 8
	AE_SERVICESTAT1                                                                = 11
	AE_SESSDIS                                                                     = 1
	AE_SESSLOGOFF1                                                                 = 2
	AE_SESSLOGON1                                                                  = 1
	AE_SESSPWERR1                                                                  = 3
	AE_SES_CLOSE                                                                   = 1
	AE_SRVCONT                                                                     = 2
	AE_SRVPAUSED                                                                   = 1
	AE_SRVSTART                                                                    = 0
	AE_SRVSTATUS1                                                                  = 0
	AE_SRVSTOP                                                                     = 3
	AE_UASMOD1                                                                     = 13
	AE_UAS_GROUP                                                                   = 1
	AE_UAS_MODALS                                                                  = 2
	AE_UAS_USER                                                                    = 0
	AE_UNSHARE                                                                     = 2
	AE_USER                                                                        = 1
	AE_USERLIMIT                                                                   = 0
	AF_OP_ACCOUNTS                                                                 = 0x8
	AF_OP_COMM                                                                     = 0x2
	AF_OP_PRINT                                                                    = 0x1
	AF_OP_SERVER                                                                   = 0x4
	AF_SETTABLE_BITS                                                               = 15
	ALERTSZ                                                                        = 128
	ALGIDDEF                                                                       = 0
	ALG_CLASS_ALL                                                                  = 57344
	ALG_CLASS_ANY                                                                  = 0
	ALG_CLASS_DATA_ENCRYPT                                                         = 24576
	ALG_CLASS_HASH                                                                 = 32768
	ALG_CLASS_KEY_EXCHANGE                                                         = 40960
	ALG_CLASS_MSG_ENCRYPT                                                          = 16384
	ALG_CLASS_SIGNATURE                                                            = 8192
	ALG_SID_3DES                                                                   = 3
	ALG_SID_3DES_112                                                               = 9
	ALG_SID_AES                                                                    = 17
	ALG_SID_AES_128                                                                = 14
	ALG_SID_AES_192                                                                = 15
	ALG_SID_AES_256                                                                = 16
	ALG_SID_AGREED_KEY_ANY                                                         = 3
	ALG_SID_ANY                                                                    = 0
	ALG_SID_CAST                                                                   = 6
	ALG_SID_CYLINK_MEK                                                             = 12
	ALG_SID_DES                                                                    = 1
	ALG_SID_DESX                                                                   = 4
	ALG_SID_DH_EPHEM                                                               = 2
	ALG_SID_DH_SANDF                                                               = 1
	ALG_SID_DSS_ANY                                                                = 0
	ALG_SID_DSS_DMS                                                                = 2
	ALG_SID_DSS_PKCS                                                               = 1
	ALG_SID_EXAMPLE                                                                = 80
	ALG_SID_HASH_REPLACE_OWF                                                       = 11
	ALG_SID_HMAC                                                                   = 9
	ALG_SID_IDEA                                                                   = 5
	ALG_SID_KEA                                                                    = 4
	ALG_SID_MAC                                                                    = 5
	ALG_SID_MD2                                                                    = 1
	ALG_SID_MD4                                                                    = 2
	ALG_SID_MD5                                                                    = 3
	ALG_SID_PCT1_MASTER                                                            = 4
	ALG_SID_RC2                                                                    = 2
	ALG_SID_RC4                                                                    = 1
	ALG_SID_RC5                                                                    = 13
	ALG_SID_RIPEMD                                                                 = 6
	ALG_SID_RIPEMD160                                                              = 7
	ALG_SID_RSA_ANY                                                                = 0
	ALG_SID_RSA_ENTRUST                                                            = 3
	ALG_SID_RSA_MSATWORK                                                           = 2
	ALG_SID_RSA_PGP                                                                = 4
	ALG_SID_RSA_PKCS                                                               = 1
	ALG_SID_SAFERSK128                                                             = 8
	ALG_SID_SAFERSK64                                                              = 7
	ALG_SID_SCHANNEL_ENC_KEY                                                       = 7
	ALG_SID_SCHANNEL_MAC_KEY                                                       = 3
	ALG_SID_SCHANNEL_MASTER_HASH                                                   = 2
	ALG_SID_SEAL                                                                   = 2
	ALG_SID_SHA                                                                    = 4
	ALG_SID_SHA1                                                                   = 4
	ALG_SID_SKIPJACK                                                               = 10
	ALG_SID_SSL2_MASTER                                                            = 5
	ALG_SID_SSL3SHAMD5                                                             = 8
	ALG_SID_SSL3_MASTER                                                            = 1
	ALG_SID_TEK                                                                    = 11
	ALG_SID_TLS1PRF                                                                = 10
	ALG_SID_TLS1_MASTER                                                            = 6
	ALG_TYPE_ANY                                                                   = 0
	ALG_TYPE_BLOCK                                                                 = 1536
	ALG_TYPE_DH                                                                    = 2560
	ALG_TYPE_DSS                                                                   = 512
	ALG_TYPE_RSA                                                                   = 1024
	ALG_TYPE_SECURECHANNEL                                                         = 3072
	ALG_TYPE_STREAM                                                                = 2048
	ALLOCATE_RESPONSE                                                              = 0x00000002
	ANIMATE_CLASSA                                                                 = "SysAnimate32"
	APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP                                      = 0x1
	APPIDREGFLAGS_ISSUE_ACTIVATION_RPC_AT_IDENTIFY                                 = 0x4
	APPIDREGFLAGS_IUSERVER_ACTIVATE_IN_CLIENT_SESSION_ONLY                         = 0x20
	APPIDREGFLAGS_IUSERVER_SELF_SID_IN_LAUNCH_PERMISSION                           = 0x10
	APPIDREGFLAGS_IUSERVER_UNMODIFIED_LOGON_TOKEN                                  = 0x8
	APPIDREGFLAGS_RESERVED1                                                        = 0x40
	APPIDREGFLAGS_SECURE_SERVER_PROCESS_SD_AND_BIND                                = 0x2
	ARCONTENT_AUDIOCD                                                              = 0x00000004
	ARCONTENT_AUTOPLAYMUSIC                                                        = 0x00000100
	ARCONTENT_AUTOPLAYPIX                                                          = 0x00000080
	ARCONTENT_AUTOPLAYVIDEO                                                        = 0x00000200
	ARCONTENT_AUTORUNINF                                                           = 0x00000002
	ARCONTENT_BLANKCD                                                              = 0x00000010
	ARCONTENT_BLANKDVD                                                             = 0x00000020
	ARCONTENT_DVDMOVIE                                                             = 0x00000008
	ARCONTENT_UNKNOWNCONTENT                                                       = 0x00000040
	ASSERT_ALTERNATE                                                               = 0x9
	ASSERT_PRIMARY                                                                 = 0x8
	ASYNC_MODE_COMPATIBILITY                                                       = 1
	ASYNC_MODE_DEFAULT                                                             = 0
	ATAPI_ID_CMD                                                                   = 0xA1
	AT_KEYEXCHANGE                                                                 = 1
	AT_SIGNATURE                                                                   = 2
	AUTHTYPE_CLIENT                                                                = 1
	AUTHTYPE_SERVER                                                                = 2
	BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG                                    = 0x80000000
	BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG                            = 0x40000000
	BCM_FIRST                                                                      = 0x1600
	BCM_GETIDEALSIZE                                                               = 5633
	BCM_GETIMAGELIST                                                               = 5635
	BCM_GETTEXTMARGIN                                                              = 5637
	BCM_SETIMAGELIST                                                               = 5634
	BCM_SETTEXTMARGIN                                                              = 5636
	BCN_FIRST                                                                      = 18446744073709550366
	BCN_HOTITEMCHANGE                                                              = 18446744073709550367
	BCN_LAST                                                                       = 18446744073709550266
	BCRYPTBUFFER_VERSION                                                           = 0
	BCRYPT_ALG_HANDLE_HMAC_FLAG                                                    = 0x00000008
	BCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE                                         = 0x00000003
	BCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION                                         = 0x00000004
	BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION                                  = 1
	BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG                                              = 0x00000001
	BCRYPT_AUTH_MODE_IN_PROGRESS_FLAG                                              = 0x00000002
	BCRYPT_BLOCK_PADDING                                                           = 0x00000001
	BCRYPT_BUFFERS_LOCKED_FLAG                                                     = 0x00000040
	BCRYPT_CAPI_AES_FLAG                                                           = 0x00000010
	BCRYPT_CIPHER_INTERFACE                                                        = 0x00000001
	BCRYPT_CIPHER_OPERATION                                                        = 0x00000001
	BCRYPT_DH_PARAMETERS_MAGIC                                                     = 0x4d504844
	BCRYPT_DH_PRIVATE_MAGIC                                                        = 0x56504844
	BCRYPT_DH_PUBLIC_MAGIC                                                         = 0x42504844
	BCRYPT_DSA_PARAMETERS_MAGIC                                                    = 0x4d505344
	BCRYPT_DSA_PARAMETERS_MAGIC_V2                                                 = 0x324d5044
	BCRYPT_DSA_PRIVATE_MAGIC                                                       = 0x56505344
	BCRYPT_DSA_PRIVATE_MAGIC_V2                                                    = 0x32565044
	BCRYPT_DSA_PUBLIC_MAGIC                                                        = 0x42505344
	BCRYPT_DSA_PUBLIC_MAGIC_V2                                                     = 0x32425044
	BCRYPT_ECDH_PRIVATE_P256_MAGIC                                                 = 0x324b4345
	BCRYPT_ECDH_PRIVATE_P384_MAGIC                                                 = 0x344b4345
	BCRYPT_ECDH_PRIVATE_P521_MAGIC                                                 = 0x364b4345
	BCRYPT_ECDH_PUBLIC_P256_MAGIC                                                  = 0x314b4345
	BCRYPT_ECDH_PUBLIC_P384_MAGIC                                                  = 0x334b4345
	BCRYPT_ECDH_PUBLIC_P521_MAGIC                                                  = 0x354b4345
	BCRYPT_ECDSA_PRIVATE_P256_MAGIC                                                = 0x32534345
	BCRYPT_ECDSA_PRIVATE_P384_MAGIC                                                = 0x34534345
	BCRYPT_ECDSA_PRIVATE_P521_MAGIC                                                = 0x36534345
	BCRYPT_ECDSA_PUBLIC_P256_MAGIC                                                 = 0x31534345
	BCRYPT_ECDSA_PUBLIC_P384_MAGIC                                                 = 0x33534345
	BCRYPT_ECDSA_PUBLIC_P521_MAGIC                                                 = 0x35534345
	BCRYPT_HASH_INTERFACE                                                          = 0x00000002
	BCRYPT_HASH_OPERATION                                                          = 0x00000002
	BCRYPT_HASH_REUSABLE_FLAG                                                      = 0x00000020
	BCRYPT_KEY_DATA_BLOB_MAGIC                                                     = 0x4d42444b
	BCRYPT_KEY_DATA_BLOB_VERSION1                                                  = 0x1
	BCRYPT_KEY_DERIVATION_INTERFACE                                                = 0x00000007
	BCRYPT_KEY_DERIVATION_OPERATION                                                = 0x00000040
	BCRYPT_NO_KEY_VALIDATION                                                       = 0x00000008
	BCRYPT_OBJECT_ALIGNMENT                                                        = 16
	BCRYPT_PAD_NONE                                                                = 0x00000001
	BCRYPT_PAD_OAEP                                                                = 0x00000004
	BCRYPT_PAD_PKCS1                                                               = 0x00000002
	BCRYPT_PAD_PSS                                                                 = 0x00000008
	BCRYPT_PRIVATE_KEY_FLAG                                                        = 0x00000002
	BCRYPT_PROV_DISPATCH                                                           = 0x00000001
	BCRYPT_PUBLIC_KEY_FLAG                                                         = 0x00000001
	BCRYPT_RNG_INTERFACE                                                           = 0x00000006
	BCRYPT_RNG_OPERATION                                                           = 0x00000020
	BCRYPT_RNG_USE_ENTROPY_IN_BUFFER                                               = 0x00000001
	BCRYPT_RSAFULLPRIVATE_MAGIC                                                    = 0x33415352
	BCRYPT_RSAPRIVATE_MAGIC                                                        = 0x32415352
	BCRYPT_RSAPUBLIC_MAGIC                                                         = 0x31415352
	BCRYPT_SECRET_AGREEMENT_INTERFACE                                              = 0x00000004
	BCRYPT_SECRET_AGREEMENT_OPERATION                                              = 0x00000008
	BCRYPT_SIGNATURE_INTERFACE                                                     = 0x00000005
	BCRYPT_SIGNATURE_OPERATION                                                     = 0x00000010
	BCRYPT_STRUCT_ALIGNMENT                                                        = 0
	BCRYPT_SUPPORTED_PAD_OAEP                                                      = 0x00000008
	BCRYPT_SUPPORTED_PAD_PKCS1_ENC                                                 = 0x00000002
	BCRYPT_SUPPORTED_PAD_PKCS1_SIG                                                 = 0x00000004
	BCRYPT_SUPPORTED_PAD_PSS                                                       = 0x00000010
	BCRYPT_SUPPORTED_PAD_ROUTER                                                    = 0x00000001
	BCRYPT_USE_SYSTEM_PREFERRED_RNG                                                = 0x00000002
	BEGIN_INTERFACE                                                                = 0
	BFFM_ENABLEOK                                                                  = 1125
	BFFM_INITIALIZED                                                               = 1
	BFFM_IUNKNOWN                                                                  = 5
	BFFM_SELCHANGED                                                                = 2
	BFFM_SETEXPANDED                                                               = 1130
	BFFM_SETOKTEXT                                                                 = 1129
	BFFM_SETSELECTION                                                              = 1126
	BFFM_SETSELECTIONA                                                             = 1126
	BFFM_SETSELECTIONW                                                             = 1127
	BFFM_SETSTATUSTEXT                                                             = 1124
	BFFM_SETSTATUSTEXTA                                                            = 1124
	BFFM_SETSTATUSTEXTW                                                            = 1128
	BFFM_VALIDATEFAILED                                                            = 3
	BFFM_VALIDATEFAILEDA                                                           = 3
	BFFM_VALIDATEFAILEDW                                                           = 4
	BIF_BROWSEFILEJUNCTIONS                                                        = 0x00010000
	BIF_BROWSEFORCOMPUTER                                                          = 0x00001000
	BIF_BROWSEFORPRINTER                                                           = 0x00002000
	BIF_BROWSEINCLUDEFILES                                                         = 0x00004000
	BIF_BROWSEINCLUDEURLS                                                          = 0x00000080
	BIF_DONTGOBELOWDOMAIN                                                          = 0x00000002
	BIF_EDITBOX                                                                    = 0x00000010
	BIF_NEWDIALOGSTYLE                                                             = 0x00000040
	BIF_NONEWFOLDERBUTTON                                                          = 0x00000200
	BIF_NOTRANSLATETARGETS                                                         = 0x00000400
	BIF_RETURNFSANCESTORS                                                          = 0x00000008
	BIF_RETURNONLYFSDIRS                                                           = 0x00000001
	BIF_SHAREABLE                                                                  = 0x00008000
	BIF_STATUSTEXT                                                                 = 0x00000004
	BIF_UAHINT                                                                     = 0x00000100
	BIF_USENEWUI                                                                   = 80
	BIF_VALIDATE                                                                   = 0x00000020
	BSIM_STATE                                                                     = 0x00000001
	BSIM_STYLE                                                                     = 0x00000002
	BSIS_ALWAYSGRIPPER                                                             = 0x00000002
	BSIS_AUTOGRIPPER                                                               = 0x00000000
	BSIS_LEFTALIGN                                                                 = 0x00000004
	BSIS_LOCKED                                                                    = 0x00000100
	BSIS_NOCAPTION                                                                 = 0x00000040
	BSIS_NOCONTEXTMENU                                                             = 0x00000010
	BSIS_NODROPTARGET                                                              = 0x00000020
	BSIS_NOGRIPPER                                                                 = 0x00000001
	BSIS_PREFERNOLINEBREAK                                                         = 0x00000080
	BSIS_SINGLECLICK                                                               = 0x00000008
	BSSF_NOTITLE                                                                   = 0x00000002
	BSSF_UNDELETEABLE                                                              = 0x00001000
	BSSF_VISIBLE                                                                   = 0x00000001
	BST_HOT                                                                        = 0x0200
	BTNS_AUTOSIZE                                                                  = 16
	BTNS_BUTTON                                                                    = 0
	BTNS_CHECK                                                                     = 2
	BTNS_CHECKGROUP                                                                = 6
	BTNS_DROPDOWN                                                                  = 8
	BTNS_GROUP                                                                     = 4
	BTNS_NOPREFIX                                                                  = 32
	BTNS_SEP                                                                       = 1
	BTNS_SHOWTEXT                                                                  = 0x40
	BTNS_WHOLEDROPDOWN                                                             = 0x80
	BUTTON_IMAGELIST_ALIGN_BOTTOM                                                  = 3
	BUTTON_IMAGELIST_ALIGN_CENTER                                                  = 4
	BUTTON_IMAGELIST_ALIGN_LEFT                                                    = 0
	BUTTON_IMAGELIST_ALIGN_RIGHT                                                   = 1
	BUTTON_IMAGELIST_ALIGN_TOP                                                     = 2
	CABINETSTATE_VERSION                                                           = 2
	CALG_3DES                                                                      = 26115
	CALG_3DES_112                                                                  = 26121
	CALG_AES                                                                       = 26129
	CALG_AES_128                                                                   = 26126
	CALG_AES_192                                                                   = 26127
	CALG_AES_256                                                                   = 26128
	CALG_AGREEDKEY_ANY                                                             = 43523
	CALG_CYLINK_MEK                                                                = 26124
	CALG_DES                                                                       = 26113
	CALG_DESX                                                                      = 26116
	CALG_DH_EPHEM                                                                  = 43522
	CALG_DH_SF                                                                     = 43521
	CALG_DSS_SIGN                                                                  = 8704
	CALG_HASH_REPLACE_OWF                                                          = 32779
	CALG_HMAC                                                                      = 32777
	CALG_HUGHES_MD5                                                                = 40963
	CALG_KEA_KEYX                                                                  = 43524
	CALG_MAC                                                                       = 32773
	CALG_MD2                                                                       = 32769
	CALG_MD4                                                                       = 32770
	CALG_MD5                                                                       = 32771
	CALG_NO_SIGN                                                                   = 8192
	CALG_OID_INFO_CNG_ONLY                                                         = 0xffffffff
	CALG_OID_INFO_PARAMETERS                                                       = 0xfffffffe
	CALG_PCT1_MASTER                                                               = 19460
	CALG_RC2                                                                       = 26114
	CALG_RC4                                                                       = 26625
	CALG_RC5                                                                       = 26125
	CALG_RSA_KEYX                                                                  = 41984
	CALG_RSA_SIGN                                                                  = 9216
	CALG_SCHANNEL_ENC_KEY                                                          = 19463
	CALG_SCHANNEL_MAC_KEY                                                          = 19459
	CALG_SCHANNEL_MASTER_HASH                                                      = 19458
	CALG_SEAL                                                                      = 26626
	CALG_SHA                                                                       = 32772
	CALG_SHA1                                                                      = 32772
	CALG_SKIPJACK                                                                  = 26122
	CALG_SSL2_MASTER                                                               = 19461
	CALG_SSL3_MASTER                                                               = 19457
	CALG_SSL3_SHAMD5                                                               = 32776
	CALG_TEK                                                                       = 26123
	CALG_TLS1PRF                                                                   = 32778
	CALG_TLS1_MASTER                                                               = 19462
	CAP_ATAPI_ID_CMD                                                               = 2
	CAP_ATA_ID_CMD                                                                 = 1
	CAP_SMART_CMD                                                                  = 4
	CBEIF_DI_SETITEM                                                               = 0x10000000
	CBEIF_IMAGE                                                                    = 0x2
	CBEIF_INDENT                                                                   = 0x10
	CBEIF_LPARAM                                                                   = 0x20
	CBEIF_OVERLAY                                                                  = 0x8
	CBEIF_SELECTEDIMAGE                                                            = 0x4
	CBEIF_TEXT                                                                     = 0x1
	CBEMAXSTRLEN                                                                   = 260
	CBEM_DELETEITEM                                                                = 324
	CBEM_GETCOMBOCONTROL                                                           = 1030
	CBEM_GETEDITCONTROL                                                            = 1031
	CBEM_GETEXSTYLE                                                                = 1033
	CBEM_GETEXTENDEDSTYLE                                                          = 1033
	CBEM_GETIMAGELIST                                                              = 1027
	CBEM_GETITEM                                                                   = 1028
	CBEM_GETITEMA                                                                  = 1028
	CBEM_GETITEMW                                                                  = 1037
	CBEM_GETUNICODEFORMAT                                                          = 8198
	CBEM_HASEDITCHANGED                                                            = 1034
	CBEM_INSERTITEM                                                                = 1025
	CBEM_INSERTITEMA                                                               = 1025
	CBEM_INSERTITEMW                                                               = 1035
	CBEM_SETEXSTYLE                                                                = 1032
	CBEM_SETEXTENDEDSTYLE                                                          = 1038
	CBEM_SETIMAGELIST                                                              = 1026
	CBEM_SETITEM                                                                   = 1029
	CBEM_SETITEMA                                                                  = 1029
	CBEM_SETITEMW                                                                  = 1036
	CBEM_SETUNICODEFORMAT                                                          = 8197
	CBEM_SETWINDOWTHEME                                                            = 8203
	CBENF_DROPDOWN                                                                 = 4
	CBENF_ESCAPE                                                                   = 3
	CBENF_KILLFOCUS                                                                = 1
	CBENF_RETURN                                                                   = 2
	CBEN_BEGINEDIT                                                                 = 18446744073709550812
	CBEN_DELETEITEM                                                                = 18446744073709550814
	CBEN_DRAGBEGIN                                                                 = 18446744073709550808
	CBEN_DRAGBEGINA                                                                = 18446744073709550808
	CBEN_DRAGBEGINW                                                                = 18446744073709550807
	CBEN_ENDEDIT                                                                   = 18446744073709550811
	CBEN_ENDEDITA                                                                  = 18446744073709550811
	CBEN_ENDEDITW                                                                  = 18446744073709550810
	CBEN_FIRST                                                                     = 18446744073709550816
	CBEN_GETDISPINFO                                                               = 18446744073709550816
	CBEN_GETDISPINFOA                                                              = 18446744073709550816
	CBEN_GETDISPINFOW                                                              = 18446744073709550809
	CBEN_INSERTITEM                                                                = 18446744073709550815
	CBEN_LAST                                                                      = 18446744073709550786
	CBES_EX_CASESENSITIVE                                                          = 0x10
	CBES_EX_NOEDITIMAGE                                                            = 0x1
	CBES_EX_NOEDITIMAGEINDENT                                                      = 0x2
	CBES_EX_NOSIZELIMIT                                                            = 0x8
	CBES_EX_PATHWORDBREAKPROC                                                      = 0x4
	CBM_FIRST                                                                      = 0x1700
	CB_GETCUEBANNER                                                                = 5892
	CB_GETMINVISIBLE                                                               = 5890
	CB_SETCUEBANNER                                                                = 5891
	CB_SETMINVISIBLE                                                               = 5889
	CCH_MAX_PROPSTG_NAME                                                           = 31
	CCM_DPISCALE                                                                   = 8204
	CCM_FIRST                                                                      = 0x2000
	CCM_GETCOLORSCHEME                                                             = 8195
	CCM_GETDROPTARGET                                                              = 8196
	CCM_GETUNICODEFORMAT                                                           = 8198
	CCM_GETVERSION                                                                 = 8200
	CCM_LAST                                                                       = 8704
	CCM_SETBKCOLOR                                                                 = 8193
	CCM_SETCOLORSCHEME                                                             = 8194
	CCM_SETNOTIFYWINDOW                                                            = 8201
	CCM_SETUNICODEFORMAT                                                           = 8197
	CCM_SETVERSION                                                                 = 8199
	CCM_SETWINDOWTHEME                                                             = 8203
	CCS_ADJUSTABLE                                                                 = 32
	CCS_BOTTOM                                                                     = 3
	CCS_LEFT                                                                       = 129
	CCS_NODIVIDER                                                                  = 64
	CCS_NOMOVEX                                                                    = 130
	CCS_NOMOVEY                                                                    = 2
	CCS_NOPARENTALIGN                                                              = 8
	CCS_NORESIZE                                                                   = 4
	CCS_RIGHT                                                                      = 131
	CCS_TOP                                                                        = 1
	CCS_VERT                                                                       = 128
	CDB2GVF_SHOWALLFILES                                                           = 0x1
	CDB2N_CONTEXTMENU_DONE                                                         = 0x00000001
	CDB2N_CONTEXTMENU_START                                                        = 0x00000002
	CDBOSC_KILLFOCUS                                                               = 0x00000001
	CDBOSC_RENAME                                                                  = 0x00000003
	CDBOSC_SELCHANGE                                                               = 0x00000002
	CDBOSC_SETFOCUS                                                                = 0x00000000
	CDBOSC_STATECHANGE                                                             = 0x00000004
	CDDS_ITEM                                                                      = 0x10000
	CDDS_ITEMPOSTERASE                                                             = 65540
	CDDS_ITEMPOSTPAINT                                                             = 65538
	CDDS_ITEMPREERASE                                                              = 65539
	CDDS_ITEMPREPAINT                                                              = 65537
	CDDS_POSTERASE                                                                 = 0x4
	CDDS_POSTPAINT                                                                 = 0x2
	CDDS_PREERASE                                                                  = 0x3
	CDDS_PREPAINT                                                                  = 0x1
	CDDS_SUBITEM                                                                   = 0x20000
	CDIS_CHECKED                                                                   = 0x8
	CDIS_DEFAULT                                                                   = 0x20
	CDIS_DISABLED                                                                  = 0x4
	CDIS_FOCUS                                                                     = 0x10
	CDIS_GRAYED                                                                    = 0x2
	CDIS_HOT                                                                       = 0x40
	CDIS_INDETERMINATE                                                             = 0x100
	CDIS_MARKED                                                                    = 0x80
	CDIS_SELECTED                                                                  = 0x1
	CDIS_SHOWKEYBOARDCUES                                                          = 0x200
	CDN_FIRST                                                                      = 18446744073709551015
	CDN_LAST                                                                       = 18446744073709550917
	CDRF_DODEFAULT                                                                 = 0x0
	CDRF_DOERASE                                                                   = 0x8
	CDRF_NEWFONT                                                                   = 0x2
	CDRF_NOTIFYITEMDRAW                                                            = 0x20
	CDRF_NOTIFYPOSTERASE                                                           = 0x40
	CDRF_NOTIFYPOSTPAINT                                                           = 0x10
	CDRF_NOTIFYSUBITEMDRAW                                                         = 0x20
	CDRF_SKIPDEFAULT                                                               = 0x4
	CDRF_SKIPPOSTPAINT                                                             = 0x100
	CERT_ACCESS_STATE_GP_SYSTEM_STORE_FLAG                                         = 0x8
	CERT_ACCESS_STATE_LM_SYSTEM_STORE_FLAG                                         = 0x4
	CERT_ACCESS_STATE_PROP_ID                                                      = 14
	CERT_ACCESS_STATE_SHARED_USER_FLAG                                             = 0x10
	CERT_ACCESS_STATE_SYSTEM_STORE_FLAG                                            = 0x2
	CERT_ACCESS_STATE_WRITE_PERSIST_FLAG                                           = 0x1
	CERT_AIA_URL_RETRIEVED_PROP_ID                                                 = 67
	CERT_ALT_NAME_DIRECTORY_NAME                                                   = 5
	CERT_ALT_NAME_DNS_NAME                                                         = 3
	CERT_ALT_NAME_EDI_PARTY_NAME                                                   = 6
	CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK                                             = 0xff
	CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT                                            = 16
	CERT_ALT_NAME_IP_ADDRESS                                                       = 8
	CERT_ALT_NAME_OTHER_NAME                                                       = 1
	CERT_ALT_NAME_REGISTERED_ID                                                    = 9
	CERT_ALT_NAME_RFC822_NAME                                                      = 2
	CERT_ALT_NAME_URL                                                              = 7
	CERT_ALT_NAME_VALUE_ERR_INDEX_MASK                                             = 0x0000ffff
	CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT                                            = 0
	CERT_ALT_NAME_X400_ADDRESS                                                     = 4
	CERT_ARCHIVED_KEY_HASH_PROP_ID                                                 = 65
	CERT_ARCHIVED_PROP_ID                                                          = 19
	CERT_AUTHORITY_INFO_ACCESS_PROP_ID                                             = 68
	CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_PARTIAL_CHAIN_LOGGING_FLAG                  = 0x2
	CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_UNTRUSTED_ROOT_LOGGING_FLAG                 = 0x1
	CERT_AUTH_ROOT_CTL_FILENAME_A                                                  = "authroot.stl"
	CERT_AUTH_ROOT_SHA256_HASH_PROP_ID                                             = 98
	CERT_AUTO_ENROLL_PROP_ID                                                       = 21
	CERT_AUTO_ENROLL_RETRY_PROP_ID                                                 = 66
	CERT_AUTO_UPDATE_DISABLE_RANDOM_QUERY_STRING_FLAG                              = 0x4
	CERT_BACKED_UP_PROP_ID                                                         = 69
	CERT_BIOMETRIC_OID_DATA_CHOICE                                                 = 2
	CERT_BIOMETRIC_PICTURE_TYPE                                                    = 0
	CERT_BIOMETRIC_PREDEFINED_DATA_CHOICE                                          = 1
	CERT_BIOMETRIC_SIGNATURE_TYPE                                                  = 1
	CERT_BUNDLE_CERTIFICATE                                                        = 0
	CERT_BUNDLE_CRL                                                                = 1
	CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG                                        = 0x2
	CERT_CA_DISABLE_CRL_PROP_ID                                                    = 82
	CERT_CA_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID                                     = 81
	CERT_CA_SUBJECT_FLAG                                                           = 0x80
	CERT_CEP_PROP_ID                                                               = 87
	CERT_CHAIN_AUTO_CURRENT_USER                                                   = 1
	CERT_CHAIN_AUTO_FLUSH_DISABLE_FLAG                                             = 0x00000001
	CERT_CHAIN_AUTO_FLUSH_FIRST_DELTA_SECONDS_DEFAULT                              = 300
	CERT_CHAIN_AUTO_FLUSH_NEXT_DELTA_SECONDS_DEFAULT                               = 1800
	CERT_CHAIN_AUTO_HPKP_RULE_INFO                                                 = 8
	CERT_CHAIN_AUTO_IMPERSONATED                                                   = 3
	CERT_CHAIN_AUTO_LOCAL_MACHINE                                                  = 2
	CERT_CHAIN_AUTO_LOG_CREATE_FLAG                                                = 0x00000002
	CERT_CHAIN_AUTO_LOG_FLAGS                                                      = 14
	CERT_CHAIN_AUTO_LOG_FLUSH_FLAG                                                 = 0x00000008
	CERT_CHAIN_AUTO_LOG_FREE_FLAG                                                  = 0x00000004
	CERT_CHAIN_AUTO_NETWORK_INFO                                                   = 6
	CERT_CHAIN_AUTO_PINRULE_INFO                                                   = 5
	CERT_CHAIN_AUTO_PROCESS_INFO                                                   = 4
	CERT_CHAIN_AUTO_SERIAL_LOCAL_MACHINE                                           = 7
	CERT_CHAIN_CACHE_END_CERT                                                      = 0x1
	CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL                                            = 0x4
	CERT_CHAIN_CRL_VALIDITY_EXT_PERIOD_HOURS_DEFAULT                               = 12
	CERT_CHAIN_CROSS_CERT_DOWNLOAD_INTERVAL_HOURS_DEFAULT                          = 168
	CERT_CHAIN_DISABLE_AIA                                                         = 0x2000
	CERT_CHAIN_DISABLE_ALL_EKU_WEAK_FLAG                                           = 0x00010000
	CERT_CHAIN_DISABLE_AUTH_ROOT_AUTO_UPDATE                                       = 0x100
	CERT_CHAIN_DISABLE_CODE_SIGNING_WEAK_FLAG                                      = 0x00400000
	CERT_CHAIN_DISABLE_FILE_HASH_WEAK_FLAG                                         = 0x00001000
	CERT_CHAIN_DISABLE_FILE_HASH_WEAK_FLAGS                                        = 12288
	CERT_CHAIN_DISABLE_MD2_MD4                                                     = 0x1000
	CERT_CHAIN_DISABLE_MOTW_CODE_SIGNING_WEAK_FLAG                                 = 0x00800000
	CERT_CHAIN_DISABLE_MOTW_FILE_HASH_WEAK_FLAG                                    = 0x00002000
	CERT_CHAIN_DISABLE_MOTW_TIMESTAMP_HASH_WEAK_FLAG                               = 0x00008000
	CERT_CHAIN_DISABLE_MOTW_TIMESTAMP_WEAK_FLAG                                    = 0x08000000
	CERT_CHAIN_DISABLE_MY_PEER_TRUST                                               = 0x800
	CERT_CHAIN_DISABLE_OPT_IN_SERVER_AUTH_WEAK_FLAG                                = 0x00040000
	CERT_CHAIN_DISABLE_PASS1_QUALITY_FILTERING                                     = 0x40
	CERT_CHAIN_DISABLE_SERVER_AUTH_WEAK_FLAG                                       = 0x00100000
	CERT_CHAIN_DISABLE_TIMESTAMP_HASH_WEAK_FLAG                                    = 0x00004000
	CERT_CHAIN_DISABLE_TIMESTAMP_HASH_WEAK_FLAGS                                   = 49152
	CERT_CHAIN_DISABLE_TIMESTAMP_WEAK_FLAG                                         = 0x04000000
	CERT_CHAIN_DISABLE_WEAK_FLAGS                                                  = 215285760
	CERT_CHAIN_ENABLE_ALL_EKU_HYGIENE_FLAG                                         = 0x00020000
	CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE                                            = 0x10
	CERT_CHAIN_ENABLE_CODE_SIGNING_HYGIENE_FLAG                                    = 0x01000000
	CERT_CHAIN_ENABLE_HYGIENE_FLAGS                                                = 857866240
	CERT_CHAIN_ENABLE_MD2_MD4_FLAG                                                 = 0x1
	CERT_CHAIN_ENABLE_MOTW_CODE_SIGNING_HYGIENE_FLAG                               = 0x02000000
	CERT_CHAIN_ENABLE_MOTW_TIMESTAMP_HYGIENE_FLAG                                  = 0x20000000
	CERT_CHAIN_ENABLE_ONLY_WEAK_LOGGING_FLAG                                       = 0x8
	CERT_CHAIN_ENABLE_PEER_TRUST                                                   = 0x400
	CERT_CHAIN_ENABLE_SERVER_AUTH_HYGIENE_FLAG                                     = 0x00200000
	CERT_CHAIN_ENABLE_SHARE_STORE                                                  = 0x20
	CERT_CHAIN_ENABLE_TIMESTAMP_HYGIENE_FLAG                                       = 0x10000000
	CERT_CHAIN_ENABLE_WEAK_LOGGING_FLAG                                            = 0x4
	CERT_CHAIN_ENABLE_WEAK_RSA_ROOT_FLAG                                           = 0x2
	CERT_CHAIN_ENABLE_WEAK_SETTINGS_FLAG                                           = 0x80000000
	CERT_CHAIN_FIND_BY_ISSUER                                                      = 1
	CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG                                      = 0x8000
	CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG                                  = 0x4
	CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG                                     = 0x1
	CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG                                   = 0x2
	CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG                                   = 0x8
	CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG                                          = 0x4000
	CERT_CHAIN_HAS_MOTW                                                            = 0x4000
	CERT_CHAIN_MAX_AIA_URL_COUNT_IN_CERT_DEFAULT                                   = 5
	CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_BYTE_COUNT_DEFAULT                            = 100000
	CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_CERT_COUNT_DEFAULT                            = 10
	CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_COUNT_PER_CHAIN_DEFAULT                       = 3
	CERT_CHAIN_MAX_SSL_TIME_UPDATED_EVENT_COUNT_DEFAULT                            = 5
	CERT_CHAIN_MAX_SSL_TIME_UPDATED_EVENT_COUNT_DISABLE                            = 0xFFFFFFFF
	CERT_CHAIN_MAX_URL_RETRIEVAL_BYTE_COUNT_DEFAULT                                = 104857600
	CERT_CHAIN_MIN_PUB_KEY_BIT_LENGTH_DISABLE                                      = 0xFFFFFFFF
	CERT_CHAIN_MIN_RSA_PUB_KEY_BIT_LENGTH_DEFAULT                                  = 1023
	CERT_CHAIN_MIN_RSA_PUB_KEY_BIT_LENGTH_DISABLE                                  = 0xffffffff
	CERT_CHAIN_MOTW_IGNORE_AFTER_TIME_WEAK_FLAG                                    = 0x40000000
	CERT_CHAIN_MOTW_WEAK_FLAGS                                                     = 1786773504
	CERT_CHAIN_OCSP_VALIDITY_SECONDS_DEFAULT                                       = 43200
	CERT_CHAIN_ONLY_ADDITIONAL_AND_AUTH_ROOT                                       = 0x8000
	CERT_CHAIN_OPTION_DISABLE_AIA_URL_RETRIEVAL                                    = 0x2
	CERT_CHAIN_OPTION_ENABLE_SIA_URL_RETRIEVAL                                     = 0x4
	CERT_CHAIN_OPT_IN_WEAK_FLAGS                                                   = 262144
	CERT_CHAIN_OPT_IN_WEAK_SIGNATURE                                               = 0x10000
	CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG                                          = 0x8000
	CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG                                        = 0x10
	CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS                              = 7
	CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS                                 = 3840
	CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG                                   = 0x400
	CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG                               = 0x2
	CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG                           = 0x200
	CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG                                  = 0x100
	CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG                        = 0x8
	CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG                                     = 0x40
	CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG                                   = 0x80
	CERT_CHAIN_POLICY_IGNORE_NOT_SUPPORTED_CRITICAL_EXT_FLAG                       = 0x2000
	CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG                                  = 0x4
	CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG                                   = 0x1
	CERT_CHAIN_POLICY_IGNORE_PEER_TRUST_FLAG                                       = 0x1000
	CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG                                 = 0x800
	CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG                                      = 0x20
	CERT_CHAIN_POLICY_SSL_F12_ERROR_LEVEL                                          = 2
	CERT_CHAIN_POLICY_SSL_F12_NONE_CATEGORY                                        = 0
	CERT_CHAIN_POLICY_SSL_F12_ROOT_PROGRAM_CATEGORY                                = 2
	CERT_CHAIN_POLICY_SSL_F12_SUCCESS_LEVEL                                        = 0
	CERT_CHAIN_POLICY_SSL_F12_WARNING_LEVEL                                        = 1
	CERT_CHAIN_POLICY_SSL_F12_WEAK_CRYPTO_CATEGORY                                 = 1
	CERT_CHAIN_POLICY_SSL_KEY_PIN_MISMATCH_ERROR                                   = -2
	CERT_CHAIN_POLICY_SSL_KEY_PIN_MISMATCH_WARNING                                 = 2
	CERT_CHAIN_POLICY_SSL_KEY_PIN_MITM_ERROR                                       = -1
	CERT_CHAIN_POLICY_SSL_KEY_PIN_MITM_WARNING                                     = 1
	CERT_CHAIN_POLICY_SSL_KEY_PIN_SUCCESS                                          = 0
	CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG                                          = 0x4000
	CERT_CHAIN_RETURN_LOWER_QUALITY_CONTEXTS                                       = 0x80
	CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT                                     = 0x8000000
	CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY                                         = 0x80000000
	CERT_CHAIN_REVOCATION_CHECK_CHAIN                                              = 0x20000000
	CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT                                 = 0x40000000
	CERT_CHAIN_REVOCATION_CHECK_END_CERT                                           = 0x10000000
	CERT_CHAIN_REVOCATION_CHECK_OCSP_CERT                                          = 0x4000000
	CERT_CHAIN_REV_ACCUMULATIVE_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT         = 20000
	CERT_CHAIN_STRONG_SIGN_DISABLE_END_CHECK_FLAG                                  = 0x1
	CERT_CHAIN_THREAD_STORE_SYNC                                                   = 0x2
	CERT_CHAIN_TIMESTAMP_TIME                                                      = 0x200
	CERT_CHAIN_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT                          = 15000
	CERT_CHAIN_USE_LOCAL_MACHINE_STORE                                             = 0x8
	CERT_CHAIN_WEAK_RSA_PUB_KEY_TIME_DEFAULT                                       = 0x01ca8a755c6e0000
	CERT_CLOSE_STORE_CHECK_FLAG                                                    = 0x2
	CERT_CLOSE_STORE_FORCE_FLAG                                                    = 0x1
	CERT_CLR_DELETE_KEY_PROP_ID                                                    = 125
	CERT_COMPARE_ANY                                                               = 0
	CERT_COMPARE_ATTR                                                              = 3
	CERT_COMPARE_CERT_ID                                                           = 16
	CERT_COMPARE_CROSS_CERT_DIST_POINTS                                            = 17
	CERT_COMPARE_CTL_USAGE                                                         = 10
	CERT_COMPARE_ENHKEY_USAGE                                                      = 10
	CERT_COMPARE_EXISTING                                                          = 13
	CERT_COMPARE_HASH                                                              = 1
	CERT_COMPARE_HASH_STR                                                          = 20
	CERT_COMPARE_HAS_PRIVATE_KEY                                                   = 21
	CERT_COMPARE_ISSUER_OF                                                         = 12
	CERT_COMPARE_KEY_IDENTIFIER                                                    = 15
	CERT_COMPARE_KEY_SPEC                                                          = 9
	CERT_COMPARE_MASK                                                              = 0xffff
	CERT_COMPARE_MD5_HASH                                                          = 4
	CERT_COMPARE_NAME                                                              = 2
	CERT_COMPARE_NAME_STR_A                                                        = 7
	CERT_COMPARE_NAME_STR_W                                                        = 8
	CERT_COMPARE_PROPERTY                                                          = 5
	CERT_COMPARE_PUBKEY_MD5_HASH                                                   = 18
	CERT_COMPARE_PUBLIC_KEY                                                        = 6
	CERT_COMPARE_SHA1_HASH                                                         = 1
	CERT_COMPARE_SHIFT                                                             = 16
	CERT_COMPARE_SIGNATURE_HASH                                                    = 14
	CERT_COMPARE_SUBJECT_CERT                                                      = 11
	CERT_COMPARE_SUBJECT_INFO_ACCESS                                               = 19
	CERT_CONTEXT_REVOCATION_TYPE                                                   = 1
	CERT_CREATE_CONTEXT_NOCOPY_FLAG                                                = 0x1
	CERT_CREATE_CONTEXT_NO_ENTRY_FLAG                                              = 0x8
	CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG                                          = 0x4
	CERT_CREATE_CONTEXT_SORTED_FLAG                                                = 0x2
	CERT_CREATE_SELFSIGN_NO_KEY_INFO                                               = 2
	CERT_CREATE_SELFSIGN_NO_SIGN                                                   = 1
	CERT_CRL_SIGN_KEY_USAGE                                                        = 0x02
	CERT_CROSS_CERT_DIST_POINTS_PROP_ID                                            = 23
	CERT_CTL_USAGE_PROP_ID                                                         = 9
	CERT_DATA_ENCIPHERMENT_KEY_USAGE                                               = 0x10
	CERT_DATE_STAMP_PROP_ID                                                        = 27
	CERT_DECIPHER_ONLY_KEY_USAGE                                                   = 0x80
	CERT_DESCRIPTION_PROP_ID                                                       = 13
	CERT_DIGITAL_SIGNATURE_KEY_USAGE                                               = 0x80
	CERT_DISALLOWED_CERT_CTL_FILENAME_A                                            = "disallowedcert.stl"
	CERT_DISALLOWED_ENHKEY_USAGE_PROP_ID                                           = 122
	CERT_DISALLOWED_FILETIME_PROP_ID                                               = 104
	CERT_DSS_R_LEN                                                                 = 20
	CERT_DSS_SIGNATURE_LEN                                                         = 40
	CERT_DSS_S_LEN                                                                 = 20
	CERT_EFS_PROP_ID                                                               = 17
	CERT_ENCIPHER_ONLY_KEY_USAGE                                                   = 0x01
	CERT_ENCODING_TYPE_MASK                                                        = 0x0000ffff
	CERT_END_ENTITY_SUBJECT_FLAG                                                   = 0x40
	CERT_ENHKEY_USAGE_PROP_ID                                                      = 9
	CERT_ENROLLMENT_PROP_ID                                                        = 26
	CERT_EXCLUDED_SUBTREE_BIT                                                      = 2147483648
	CERT_EXTENDED_ERROR_INFO_PROP_ID                                               = 30
	CERT_FILE_STORE_COMMIT_ENABLE_FLAG                                             = 0x10000
	CERT_FIND_ANY                                                                  = 0
	CERT_FIND_CERT_ID                                                              = 1048576
	CERT_FIND_CROSS_CERT_DIST_POINTS                                               = 1114112
	CERT_FIND_CTL_USAGE                                                            = 655360
	CERT_FIND_ENHKEY_USAGE                                                         = 655360
	CERT_FIND_EXISTING                                                             = 851968
	CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG                                              = 2
	CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG                                           = 0x2
	CERT_FIND_HASH                                                                 = 65536
	CERT_FIND_HASH_STR                                                             = 1310720
	CERT_FIND_HAS_PRIVATE_KEY                                                      = 1376256
	CERT_FIND_ISSUER_ATTR                                                          = 196612
	CERT_FIND_ISSUER_NAME                                                          = 131076
	CERT_FIND_ISSUER_OF                                                            = 786432
	CERT_FIND_ISSUER_STR                                                           = 524292
	CERT_FIND_ISSUER_STR_A                                                         = 458756
	CERT_FIND_ISSUER_STR_W                                                         = 524292
	CERT_FIND_KEY_IDENTIFIER                                                       = 983040
	CERT_FIND_KEY_SPEC                                                             = 589824
	CERT_FIND_MD5_HASH                                                             = 262144
	CERT_FIND_NO_CTL_USAGE_FLAG                                                    = 8
	CERT_FIND_NO_ENHKEY_USAGE_FLAG                                                 = 0x8
	CERT_FIND_OPTIONAL_CTL_USAGE_FLAG                                              = 1
	CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG                                           = 0x1
	CERT_FIND_OR_CTL_USAGE_FLAG                                                    = 16
	CERT_FIND_OR_ENHKEY_USAGE_FLAG                                                 = 0x10
	CERT_FIND_PROPERTY                                                             = 327680
	CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG                                             = 4
	CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG                                          = 0x4
	CERT_FIND_PUBKEY_MD5_HASH                                                      = 1179648
	CERT_FIND_PUBLIC_KEY                                                           = 393216
	CERT_FIND_SHA1_HASH                                                            = 65536
	CERT_FIND_SIGNATURE_HASH                                                       = 917504
	CERT_FIND_SUBJECT_ATTR                                                         = 196615
	CERT_FIND_SUBJECT_CERT                                                         = 720896
	CERT_FIND_SUBJECT_INFO_ACCESS                                                  = 1245184
	CERT_FIND_SUBJECT_NAME                                                         = 131079
	CERT_FIND_SUBJECT_STR                                                          = 524295
	CERT_FIND_SUBJECT_STR_A                                                        = 458759
	CERT_FIND_SUBJECT_STR_W                                                        = 524295
	CERT_FIND_VALID_CTL_USAGE_FLAG                                                 = 32
	CERT_FIND_VALID_ENHKEY_USAGE_FLAG                                              = 0x20
	CERT_FIRST_RESERVED_PROP_ID                                                    = 107
	CERT_FIRST_USER_PROP_ID                                                        = 0x8000
	CERT_FORTEZZA_DATA_PROP_ID                                                     = 18
	CERT_FRIENDLY_NAME_PROP_ID                                                     = 11
	CERT_HASH_PROP_ID                                                              = 3
	CERT_HCRYPTPROV_OR_NCRYPT_KEY_HANDLE_PROP_ID                                   = 79
	CERT_HCRYPTPROV_TRANSFER_PROP_ID                                               = 100
	CERT_ID_ISSUER_SERIAL_NUMBER                                                   = 1
	CERT_ID_KEY_IDENTIFIER                                                         = 2
	CERT_ID_SHA1_HASH                                                              = 3
	CERT_IE30_RESERVED_PROP_ID                                                     = 7
	CERT_INFO_EXTENSION_FLAG                                                       = 11
	CERT_INFO_ISSUER_FLAG                                                          = 4
	CERT_INFO_ISSUER_UNIQUE_ID_FLAG                                                = 9
	CERT_INFO_NOT_AFTER_FLAG                                                       = 6
	CERT_INFO_NOT_BEFORE_FLAG                                                      = 5
	CERT_INFO_SERIAL_NUMBER_FLAG                                                   = 2
	CERT_INFO_SIGNATURE_ALGORITHM_FLAG                                             = 3
	CERT_INFO_SUBJECT_FLAG                                                         = 7
	CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG                                         = 8
	CERT_INFO_SUBJECT_UNIQUE_ID_FLAG                                               = 10
	CERT_INFO_VERSION_FLAG                                                         = 1
	CERT_ISOLATED_KEY_PROP_ID                                                      = 118
	CERT_ISSUER_CHAIN_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID                           = 96
	CERT_ISSUER_CHAIN_SIGN_HASH_CNG_ALG_PROP_ID                                    = 95
	CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID                                        = 24
	CERT_ISSUER_PUB_KEY_BIT_LENGTH_PROP_ID                                         = 94
	CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID                                     = 28
	CERT_KEYGEN_REQUEST_V1                                                         = 0
	CERT_KEY_AGREEMENT_KEY_USAGE                                                   = 0x08
	CERT_KEY_CERT_SIGN_KEY_USAGE                                                   = 0x04
	CERT_KEY_CLASSIFICATION_PROP_ID                                                = 120
	CERT_KEY_CONTEXT_PROP_ID                                                       = 5
	CERT_KEY_ENCIPHERMENT_KEY_USAGE                                                = 0x20
	CERT_KEY_IDENTIFIER_PROP_ID                                                    = 20
	CERT_KEY_PROV_HANDLE_PROP_ID                                                   = 1
	CERT_KEY_PROV_INFO_PROP_ID                                                     = 2
	CERT_KEY_REPAIR_ATTEMPTED_PROP_ID                                              = 103
	CERT_KEY_SPEC_PROP_ID                                                          = 6
	CERT_LAST_RESERVED_PROP_ID                                                     = 0x00007fff
	CERT_LAST_USER_PROP_ID                                                         = 0x0000ffff
	CERT_LDAP_STORE_AREC_EXCLUSIVE_FLAG                                            = 0x20000
	CERT_LDAP_STORE_OPENED_FLAG                                                    = 0x40000
	CERT_LDAP_STORE_SIGN_FLAG                                                      = 0x10000
	CERT_LDAP_STORE_UNBIND_FLAG                                                    = 0x80000
	CERT_LOGOTYPE_BITS_IMAGE_RESOLUTION_CHOICE                                     = 1
	CERT_LOGOTYPE_COLOR_IMAGE_INFO_CHOICE                                          = 2
	CERT_LOGOTYPE_DIRECT_INFO_CHOICE                                               = 1
	CERT_LOGOTYPE_GRAY_SCALE_IMAGE_INFO_CHOICE                                     = 1
	CERT_LOGOTYPE_INDIRECT_INFO_CHOICE                                             = 2
	CERT_LOGOTYPE_NO_IMAGE_RESOLUTION_CHOICE                                       = 0
	CERT_LOGOTYPE_TABLE_SIZE_IMAGE_RESOLUTION_CHOICE                               = 2
	CERT_MAX_ASN_ENCODED_DSS_SIGNATURE_LEN                                         = 48
	CERT_MD5_HASH_PROP_ID                                                          = 4
	CERT_NAME_ATTR_TYPE                                                            = 3
	CERT_NAME_DISABLE_IE4_UTF8_FLAG                                                = 0x10000
	CERT_NAME_DNS_TYPE                                                             = 6
	CERT_NAME_EMAIL_TYPE                                                           = 1
	CERT_NAME_FRIENDLY_DISPLAY_TYPE                                                = 5
	CERT_NAME_ISSUER_FLAG                                                          = 0x1
	CERT_NAME_RDN_TYPE                                                             = 2
	CERT_NAME_SEARCH_ALL_NAMES_FLAG                                                = 0x2
	CERT_NAME_SIMPLE_DISPLAY_TYPE                                                  = 4
	CERT_NAME_STR_COMMA_FLAG                                                       = 0x4000000
	CERT_NAME_STR_CRLF_FLAG                                                        = 0x8000000
	CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG                                            = 0x10000
	CERT_NAME_STR_DISABLE_UTF8_DIR_STR_FLAG                                        = 0x100000
	CERT_NAME_STR_ENABLE_PUNYCODE_FLAG                                             = 0x200000
	CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG                                          = 0x20000
	CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG                                         = 0x40000
	CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG                                          = 0x80000
	CERT_NAME_STR_FORWARD_FLAG                                                     = 0x1000000
	CERT_NAME_STR_NO_PLUS_FLAG                                                     = 0x20000000
	CERT_NAME_STR_NO_QUOTING_FLAG                                                  = 0x10000000
	CERT_NAME_STR_REVERSE_FLAG                                                     = 0x2000000
	CERT_NAME_STR_SEMICOLON_FLAG                                                   = 0x40000000
	CERT_NAME_UPN_TYPE                                                             = 8
	CERT_NAME_URL_TYPE                                                             = 7
	CERT_NCRYPT_KEY_HANDLE_PROP_ID                                                 = 78
	CERT_NCRYPT_KEY_HANDLE_TRANSFER_PROP_ID                                        = 99
	CERT_NCRYPT_KEY_SPEC                                                           = 0xffffffff
	CERT_NEW_KEY_PROP_ID                                                           = 74
	CERT_NEXT_UPDATE_LOCATION_PROP_ID                                              = 10
	CERT_NONCOMPLIANT_ROOT_URL_PROP_ID                                             = 123
	CERT_NON_REPUDIATION_KEY_USAGE                                                 = 0x40
	CERT_NOT_BEFORE_ENHKEY_USAGE_PROP_ID                                           = 127
	CERT_NOT_BEFORE_FILETIME_PROP_ID                                               = 126
	CERT_NO_AUTO_EXPIRE_CHECK_PROP_ID                                              = 77
	CERT_NO_EXPIRE_NOTIFICATION_PROP_ID                                            = 97
	CERT_OCSP_CACHE_PREFIX_PROP_ID                                                 = 75
	CERT_OCSP_MUST_STAPLE_PROP_ID                                                  = 121
	CERT_OCSP_RESPONSE_PROP_ID                                                     = 70
	CERT_OFFLINE_CRL_SIGN_KEY_USAGE                                                = 0x02
	CERT_OID_NAME_STR                                                              = 2
	CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG                                            = 0x1
	CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG                           = 0x8
	CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG                                          = 0x2
	CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG                                       = 0x1
	CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG                                   = 0x4
	CERT_PIN_RULES_CTL_FILENAME_A                                                  = "pinrules.stl"
	CERT_PIN_SHA256_HASH_PROP_ID                                                   = 124
	CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG                                       = 0x1
	CERT_PROT_ROOT_DISABLE_LM_AUTH_FLAG                                            = 0x8
	CERT_PROT_ROOT_DISABLE_NOT_DEFINED_NAME_CONSTRAINT_FLAG                        = 0x20
	CERT_PROT_ROOT_DISABLE_NT_AUTH_REQUIRED_FLAG                                   = 0x10
	CERT_PROT_ROOT_DISABLE_PEER_TRUST                                              = 0x10000
	CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG                                        = 0x2
	CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG                                           = 0x4
	CERT_PROT_ROOT_ONLY_LM_GPT_FLAG                                                = 0x8
	CERT_PROT_ROOT_PEER_USAGES_VALUE_NAME_A                                        = "PeerUsages"
	CERT_PUBKEY_ALG_PARA_PROP_ID                                                   = 22
	CERT_PUBKEY_HASH_RESERVED_PROP_ID                                              = 8
	CERT_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID                                        = 93
	CERT_PVK_FILE_PROP_ID                                                          = 12
	CERT_QUERY_CONTENT_CERT                                                        = 1
	CERT_QUERY_CONTENT_CERT_PAIR                                                   = 13
	CERT_QUERY_CONTENT_CRL                                                         = 3
	CERT_QUERY_CONTENT_CTL                                                         = 2
	CERT_QUERY_CONTENT_FLAG_ALL                                                    = 16382
	CERT_QUERY_CONTENT_FLAG_ALL_ISSUER_CERT                                        = 818
	CERT_QUERY_CONTENT_FLAG_CERT                                                   = 2
	CERT_QUERY_CONTENT_FLAG_CERT_PAIR                                              = 8192
	CERT_QUERY_CONTENT_FLAG_CRL                                                    = 8
	CERT_QUERY_CONTENT_FLAG_CTL                                                    = 4
	CERT_QUERY_CONTENT_FLAG_PFX                                                    = 4096
	CERT_QUERY_CONTENT_FLAG_PFX_AND_LOAD                                           = 16384
	CERT_QUERY_CONTENT_FLAG_PKCS10                                                 = 2048
	CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED                                           = 256
	CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED                                     = 1024
	CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED                                         = 512
	CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT                                        = 32
	CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL                                         = 128
	CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL                                         = 64
	CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE                                       = 16
	CERT_QUERY_CONTENT_PFX                                                         = 12
	CERT_QUERY_CONTENT_PFX_AND_LOAD                                                = 14
	CERT_QUERY_CONTENT_PKCS10                                                      = 11
	CERT_QUERY_CONTENT_PKCS7_SIGNED                                                = 8
	CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED                                          = 10
	CERT_QUERY_CONTENT_PKCS7_UNSIGNED                                              = 9
	CERT_QUERY_CONTENT_SERIALIZED_CERT                                             = 5
	CERT_QUERY_CONTENT_SERIALIZED_CRL                                              = 7
	CERT_QUERY_CONTENT_SERIALIZED_CTL                                              = 6
	CERT_QUERY_CONTENT_SERIALIZED_STORE                                            = 4
	CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED                                        = 3
	CERT_QUERY_FORMAT_BASE64_ENCODED                                               = 2
	CERT_QUERY_FORMAT_BINARY                                                       = 1
	CERT_QUERY_FORMAT_FLAG_ALL                                                     = 14
	CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED                                   = 8
	CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED                                          = 4
	CERT_QUERY_FORMAT_FLAG_BINARY                                                  = 2
	CERT_QUERY_OBJECT_BLOB                                                         = 0x2
	CERT_QUERY_OBJECT_FILE                                                         = 0x1
	CERT_RDN_ANY_TYPE                                                              = 0
	CERT_RDN_BMP_STRING                                                            = 12
	CERT_RDN_DISABLE_CHECK_TYPE_FLAG                                               = 0x40000000
	CERT_RDN_DISABLE_IE4_UTF8_FLAG                                                 = 0x1000000
	CERT_RDN_ENABLE_PUNYCODE_FLAG                                                  = 0x2000000
	CERT_RDN_ENABLE_T61_UNICODE_FLAG                                               = 0x80000000
	CERT_RDN_ENABLE_UTF8_UNICODE_FLAG                                              = 0x20000000
	CERT_RDN_ENCODED_BLOB                                                          = 1
	CERT_RDN_FLAGS_MASK                                                            = 0xff000000
	CERT_RDN_FORCE_UTF8_UNICODE_FLAG                                               = 0x10000000
	CERT_RDN_GENERAL_STRING                                                        = 10
	CERT_RDN_GRAPHIC_STRING                                                        = 8
	CERT_RDN_IA5_STRING                                                            = 7
	CERT_RDN_INT4_STRING                                                           = 11
	CERT_RDN_ISO646_STRING                                                         = 9
	CERT_RDN_NUMERIC_STRING                                                        = 3
	CERT_RDN_OCTET_STRING                                                          = 2
	CERT_RDN_PRINTABLE_STRING                                                      = 4
	CERT_RDN_T61_STRING                                                            = 5
	CERT_RDN_TELETEX_STRING                                                        = 5
	CERT_RDN_TYPE_MASK                                                             = 0x000000ff
	CERT_RDN_UNICODE_STRING                                                        = 12
	CERT_RDN_UNIVERSAL_STRING                                                      = 11
	CERT_RDN_UTF8_STRING                                                           = 13
	CERT_RDN_VIDEOTEX_STRING                                                       = 6
	CERT_RDN_VISIBLE_STRING                                                        = 9
	CERT_REGISTRY_STORE_CLIENT_GPT_FLAG                                            = 0x80000000
	CERT_REGISTRY_STORE_EXTERNAL_FLAG                                              = 0x100000
	CERT_REGISTRY_STORE_LM_GPT_FLAG                                                = 0x1000000
	CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG                                           = 0x80000
	CERT_REGISTRY_STORE_REMOTE_FLAG                                                = 0x10000
	CERT_REGISTRY_STORE_ROAMING_FLAG                                               = 0x40000
	CERT_REGISTRY_STORE_SERIALIZED_FLAG                                            = 0x20000
	CERT_RENEWAL_PROP_ID                                                           = 64
	CERT_REQUEST_ORIGINATOR_PROP_ID                                                = 71
	CERT_REQUEST_V1                                                                = 0
	CERT_ROOT_PROGRAM_CERT_POLICIES_PROP_ID                                        = 83
	CERT_ROOT_PROGRAM_CHAIN_POLICIES_PROP_ID                                       = 105
	CERT_ROOT_PROGRAM_FLAG_ADDRESS                                                 = 0x08
	CERT_ROOT_PROGRAM_FLAG_LSC                                                     = 0x40
	CERT_ROOT_PROGRAM_FLAG_ORG                                                     = 0x80
	CERT_ROOT_PROGRAM_FLAG_OU                                                      = 0x10
	CERT_ROOT_PROGRAM_FLAG_SUBJECT_LOGO                                            = 0x20
	CERT_ROOT_PROGRAM_NAME_CONSTRAINTS_PROP_ID                                     = 84
	CERT_SCARD_PIN_ID_PROP_ID                                                      = 90
	CERT_SCARD_PIN_INFO_PROP_ID                                                    = 91
	CERT_SCEP_CA_CERT_PROP_ID                                                      = 111
	CERT_SCEP_ENCRYPT_HASH_CNG_ALG_PROP_ID                                         = 114
	CERT_SCEP_FLAGS_PROP_ID                                                        = 115
	CERT_SCEP_GUID_PROP_ID                                                         = 116
	CERT_SCEP_NONCE_PROP_ID                                                        = 113
	CERT_SCEP_RA_ENCRYPTION_CERT_PROP_ID                                           = 110
	CERT_SCEP_RA_SIGNATURE_CERT_PROP_ID                                            = 109
	CERT_SCEP_SERVER_CERTS_PROP_ID                                                 = 108
	CERT_SCEP_SIGNER_CERT_PROP_ID                                                  = 112
	CERT_SEND_AS_TRUSTED_ISSUER_PROP_ID                                            = 102
	CERT_SERIALIZABLE_KEY_CONTEXT_PROP_ID                                          = 117
	CERT_SERIAL_CHAIN_PROP_ID                                                      = 119
	CERT_SET_KEY_CONTEXT_PROP_ID                                                   = 0x1
	CERT_SET_KEY_PROV_HANDLE_PROP_ID                                               = 0x1
	CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG                                    = 0x80000000
	CERT_SET_PROPERTY_INHIBIT_PERSIST_FLAG                                         = 0x40000000
	CERT_SHA1_HASH_PROP_ID                                                         = 3
	CERT_SHA256_HASH_PROP_ID                                                       = 107
	CERT_SIGNATURE_HASH_PROP_ID                                                    = 15
	CERT_SIGN_HASH_CNG_ALG_PROP_ID                                                 = 89
	CERT_SIMPLE_NAME_STR                                                           = 1
	CERT_SMART_CARD_DATA_PROP_ID                                                   = 16
	CERT_SMART_CARD_READER_NON_REMOVABLE_PROP_ID                                   = 106
	CERT_SMART_CARD_READER_PROP_ID                                                 = 101
	CERT_SMART_CARD_ROOT_INFO_PROP_ID                                              = 76
	CERT_SOURCE_LOCATION_PROP_ID                                                   = 72
	CERT_SOURCE_URL_PROP_ID                                                        = 73
	CERT_SRV_OCSP_RESP_MAX_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT                      = 14400
	CERT_SRV_OCSP_RESP_MAX_SYNC_CERT_FILE_SECONDS_DEFAULT                          = 3600
	CERT_SRV_OCSP_RESP_MIN_AFTER_NEXT_UPDATE_SECONDS_DEFAULT                       = 60
	CERT_SRV_OCSP_RESP_MIN_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT                      = 120
	CERT_SRV_OCSP_RESP_MIN_SYNC_CERT_FILE_SECONDS_DEFAULT                          = 5
	CERT_SRV_OCSP_RESP_MIN_VALIDITY_SECONDS_DEFAULT                                = 600
	CERT_SRV_OCSP_RESP_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT                  = 15000
	CERT_STORE_ADD_ALWAYS                                                          = 4
	CERT_STORE_ADD_NEW                                                             = 1
	CERT_STORE_ADD_NEWER                                                           = 6
	CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES                                        = 7
	CERT_STORE_ADD_REPLACE_EXISTING                                                = 3
	CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES                             = 5
	CERT_STORE_ADD_USE_EXISTING                                                    = 2
	CERT_STORE_ALL_CONTEXT_FLAG                                                    = 18446744073709551615
	CERT_STORE_BACKUP_RESTORE_FLAG                                                 = 0x800
	CERT_STORE_BASE_CRL_FLAG                                                       = 0x100
	CERT_STORE_CERTIFICATE_CONTEXT                                                 = 1
	CERT_STORE_CERTIFICATE_CONTEXT_FLAG                                            = 2
	CERT_STORE_CREATE_NEW_FLAG                                                     = 0x2000
	CERT_STORE_CRL_CONTEXT                                                         = 2
	CERT_STORE_CRL_CONTEXT_FLAG                                                    = 4
	CERT_STORE_CTL_CONTEXT                                                         = 3
	CERT_STORE_CTL_CONTEXT_FLAG                                                    = 8
	CERT_STORE_CTRL_AUTO_RESYNC                                                    = 4
	CERT_STORE_CTRL_CANCEL_NOTIFY                                                  = 5
	CERT_STORE_CTRL_COMMIT                                                         = 3
	CERT_STORE_CTRL_COMMIT_CLEAR_FLAG                                              = 0x2
	CERT_STORE_CTRL_COMMIT_FORCE_FLAG                                              = 0x1
	CERT_STORE_CTRL_INHIBIT_DUPLICATE_HANDLE_FLAG                                  = 0x1
	CERT_STORE_CTRL_NOTIFY_CHANGE                                                  = 2
	CERT_STORE_CTRL_RESYNC                                                         = 1
	CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG                                    = 0x4
	CERT_STORE_DELETE_FLAG                                                         = 0x10
	CERT_STORE_DELTA_CRL_FLAG                                                      = 0x200
	CERT_STORE_ENUM_ARCHIVED_FLAG                                                  = 0x200
	CERT_STORE_LOCALIZED_NAME_PROP_ID                                              = 0x1000
	CERT_STORE_MANIFOLD_FLAG                                                       = 0x100
	CERT_STORE_MAXIMUM_ALLOWED_FLAG                                                = 0x1000
	CERT_STORE_NO_CRL_FLAG                                                         = 0x10000
	CERT_STORE_NO_CRYPT_RELEASE_FLAG                                               = 0x1
	CERT_STORE_NO_ISSUER_FLAG                                                      = 0x20000
	CERT_STORE_OPEN_EXISTING_FLAG                                                  = 0x4000
	CERT_STORE_PROV_CLOSE_FUNC                                                     = 0
	CERT_STORE_PROV_CONTROL_FUNC                                                   = 13
	CERT_STORE_PROV_DELETED_FLAG                                                   = 0x2
	CERT_STORE_PROV_DELETE_CERT_FUNC                                               = 3
	CERT_STORE_PROV_DELETE_CRL_FUNC                                                = 7
	CERT_STORE_PROV_DELETE_CTL_FUNC                                                = 11
	CERT_STORE_PROV_EXTERNAL_FLAG                                                  = 0x1
	CERT_STORE_PROV_FIND_CERT_FUNC                                                 = 14
	CERT_STORE_PROV_FIND_CRL_FUNC                                                  = 17
	CERT_STORE_PROV_FIND_CTL_FUNC                                                  = 20
	CERT_STORE_PROV_FREE_FIND_CERT_FUNC                                            = 15
	CERT_STORE_PROV_FREE_FIND_CRL_FUNC                                             = 18
	CERT_STORE_PROV_FREE_FIND_CTL_FUNC                                             = 21
	CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC                                         = 16
	CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC                                          = 19
	CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC                                          = 22
	CERT_STORE_PROV_GP_SYSTEM_STORE_FLAG                                           = 0x20
	CERT_STORE_PROV_LM_SYSTEM_STORE_FLAG                                           = 0x10
	CERT_STORE_PROV_NO_PERSIST_FLAG                                                = 0x4
	CERT_STORE_PROV_READ_CERT_FUNC                                                 = 1
	CERT_STORE_PROV_READ_CRL_FUNC                                                  = 5
	CERT_STORE_PROV_READ_CTL_FUNC                                                  = 9
	CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC                                         = 4
	CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC                                          = 8
	CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC                                          = 12
	CERT_STORE_PROV_SHARED_USER_FLAG                                               = 0x40
	CERT_STORE_PROV_SYSTEM_STORE_FLAG                                              = 0x8
	CERT_STORE_PROV_WRITE_ADD_FLAG                                                 = 0x1
	CERT_STORE_PROV_WRITE_CERT_FUNC                                                = 2
	CERT_STORE_PROV_WRITE_CRL_FUNC                                                 = 6
	CERT_STORE_PROV_WRITE_CTL_FUNC                                                 = 10
	CERT_STORE_READONLY_FLAG                                                       = 0x8000
	CERT_STORE_REVOCATION_FLAG                                                     = 0x4
	CERT_STORE_SAVE_AS_PKCS12                                                      = 3
	CERT_STORE_SAVE_AS_PKCS7                                                       = 2
	CERT_STORE_SAVE_AS_STORE                                                       = 1
	CERT_STORE_SAVE_TO_FILE                                                        = 1
	CERT_STORE_SAVE_TO_FILENAME                                                    = 4
	CERT_STORE_SAVE_TO_FILENAME_A                                                  = 3
	CERT_STORE_SAVE_TO_FILENAME_W                                                  = 4
	CERT_STORE_SAVE_TO_MEMORY                                                      = 2
	CERT_STORE_SET_LOCALIZED_NAME_FLAG                                             = 0x2
	CERT_STORE_SHARE_CONTEXT_FLAG                                                  = 0x80
	CERT_STORE_SHARE_STORE_FLAG                                                    = 0x40
	CERT_STORE_SIGNATURE_FLAG                                                      = 0x1
	CERT_STORE_TIME_VALIDITY_FLAG                                                  = 0x2
	CERT_STORE_UNSAFE_PHYSICAL_FLAG                                                = 0x20
	CERT_STORE_UPDATE_KEYID_FLAG                                                   = 0x400
	CERT_STRONG_SIGN_ENABLE_CRL_CHECK                                              = 0x1
	CERT_STRONG_SIGN_ENABLE_OCSP_CHECK                                             = 0x2
	CERT_STRONG_SIGN_OID_INFO_CHOICE                                               = 2
	CERT_STRONG_SIGN_SERIALIZED_INFO_CHOICE                                        = 1
	CERT_SUBJECT_DISABLE_CRL_PROP_ID                                               = 86
	CERT_SUBJECT_INFO_ACCESS_PROP_ID                                               = 80
	CERT_SUBJECT_NAME_MD5_HASH_PROP_ID                                             = 29
	CERT_SUBJECT_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID                                = 85
	CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID                                       = 25
	CERT_SUBJECT_PUB_KEY_BIT_LENGTH_PROP_ID                                        = 92
	CERT_SYSTEM_STORE_CURRENT_SERVICE                                              = 262144
	CERT_SYSTEM_STORE_CURRENT_SERVICE_ID                                           = 4
	CERT_SYSTEM_STORE_CURRENT_USER                                                 = 65536
	CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY                                    = 458752
	CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID                                 = 7
	CERT_SYSTEM_STORE_CURRENT_USER_ID                                              = 1
	CERT_SYSTEM_STORE_DEFER_READ_FLAG                                              = 0x20000000
	CERT_SYSTEM_STORE_LOCAL_MACHINE                                                = 131072
	CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE                                     = 589824
	CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID                                  = 9
	CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY                                   = 524288
	CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID                                = 8
	CERT_SYSTEM_STORE_LOCAL_MACHINE_ID                                             = 2
	CERT_SYSTEM_STORE_LOCAL_MACHINE_WCOS                                           = 655360
	CERT_SYSTEM_STORE_LOCAL_MACHINE_WCOS_ID                                        = 10
	CERT_SYSTEM_STORE_LOCATION_MASK                                                = 0x00ff0000
	CERT_SYSTEM_STORE_LOCATION_SHIFT                                               = 16
	CERT_SYSTEM_STORE_MASK                                                         = 0xffff0000
	CERT_SYSTEM_STORE_RELOCATE_FLAG                                                = 0x80000000
	CERT_SYSTEM_STORE_SERVICES                                                     = 327680
	CERT_SYSTEM_STORE_SERVICES_ID                                                  = 5
	CERT_SYSTEM_STORE_UNPROTECTED_FLAG                                             = 0x40000000
	CERT_SYSTEM_STORE_USERS                                                        = 393216
	CERT_SYSTEM_STORE_USERS_ID                                                     = 6
	CERT_TRUST_AUTO_UPDATE_CA_REVOCATION                                           = 0x10
	CERT_TRUST_AUTO_UPDATE_END_REVOCATION                                          = 0x20
	CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID                                          = 0x40000
	CERT_TRUST_CTL_IS_NOT_TIME_VALID                                               = 0x20000
	CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE                                          = 0x80000
	CERT_TRUST_HAS_CRL_VALIDITY_EXTENDED                                           = 0x1000
	CERT_TRUST_HAS_EXACT_MATCH_ISSUER                                              = 0x1
	CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT                                        = 0x8000
	CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY                                           = 0x200
	CERT_TRUST_HAS_KEY_MATCH_ISSUER                                                = 0x2
	CERT_TRUST_HAS_NAME_MATCH_ISSUER                                               = 0x4
	CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT                                     = 0x2000
	CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT                                   = 0x4000
	CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT                                      = 0x8000000
	CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT                                   = 0x1000
	CERT_TRUST_HAS_PREFERRED_ISSUER                                                = 0x100
	CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS                                          = 0x400
	CERT_TRUST_HAS_WEAK_SIGNATURE                                                  = 0x100000
	CERT_TRUST_INVALID_BASIC_CONSTRAINTS                                           = 0x400
	CERT_TRUST_INVALID_EXTENSION                                                   = 0x100
	CERT_TRUST_INVALID_NAME_CONSTRAINTS                                            = 0x800
	CERT_TRUST_INVALID_POLICY_CONSTRAINTS                                          = 0x200
	CERT_TRUST_IS_COMPLEX_CHAIN                                                    = 0x00010000
	CERT_TRUST_IS_CYCLIC                                                           = 0x80
	CERT_TRUST_IS_EXPLICIT_DISTRUST                                                = 0x4000000
	CERT_TRUST_IS_FROM_EXCLUSIVE_TRUST_STORE                                       = 0x2000
	CERT_TRUST_IS_KEY_ROLLOVER                                                     = 0x00000080
	CERT_TRUST_IS_NOT_SIGNATURE_VALID                                              = 0x8
	CERT_TRUST_IS_NOT_TIME_NESTED                                                  = 0x2
	CERT_TRUST_IS_NOT_TIME_VALID                                                   = 0x1
	CERT_TRUST_IS_NOT_VALID_FOR_USAGE                                              = 0x10
	CERT_TRUST_IS_OFFLINE_REVOCATION                                               = 0x1000000
	CERT_TRUST_IS_PARTIAL_CHAIN                                                    = 0x10000
	CERT_TRUST_IS_PEER_TRUSTED                                                     = 0x800
	CERT_TRUST_IS_REVOKED                                                          = 0x4
	CERT_TRUST_IS_SELF_SIGNED                                                      = 0x8
	CERT_TRUST_IS_UNTRUSTED_ROOT                                                   = 0x20
	CERT_TRUST_NO_ERROR                                                            = 0x0
	CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY                                            = 0x2000000
	CERT_TRUST_NO_OCSP_FAILOVER_TO_CRL                                             = 0x40
	CERT_TRUST_NO_TIME_CHECK                                                       = 0x02000000
	CERT_TRUST_PUB_ALLOW_END_USER_TRUST                                            = 0x0
	CERT_TRUST_PUB_ALLOW_ENTERPRISE_ADMIN_TRUST                                    = 0x2
	CERT_TRUST_PUB_ALLOW_MACHINE_ADMIN_TRUST                                       = 0x1
	CERT_TRUST_PUB_ALLOW_TRUST_MASK                                                = 0x3
	CERT_TRUST_PUB_CHECK_PUBLISHER_REV_FLAG                                        = 0x100
	CERT_TRUST_PUB_CHECK_TIMESTAMP_REV_FLAG                                        = 0x200
	CERT_TRUST_REVOCATION_STATUS_UNKNOWN                                           = 0x40
	CERT_TRUST_SSL_HANDSHAKE_OCSP                                                  = 0x00040000
	CERT_TRUST_SSL_RECONNECT_OCSP                                                  = 0x00100000
	CERT_TRUST_SSL_TIME_VALID                                                      = 0x01000000
	CERT_TRUST_SSL_TIME_VALID_OCSP                                                 = 0x00080000
	CERT_UNICODE_ATTR_ERR_INDEX_MASK                                               = 0x3f
	CERT_UNICODE_ATTR_ERR_INDEX_SHIFT                                              = 16
	CERT_UNICODE_IS_RDN_ATTRS_FLAG                                                 = 0x1
	CERT_UNICODE_RDN_ERR_INDEX_MASK                                                = 0x3ff
	CERT_UNICODE_RDN_ERR_INDEX_SHIFT                                               = 22
	CERT_UNICODE_VALUE_ERR_INDEX_MASK                                              = 0xffff
	CERT_UNICODE_VALUE_ERR_INDEX_SHIFT                                             = 0
	CERT_V1                                                                        = 0
	CERT_V2                                                                        = 1
	CERT_V3                                                                        = 2
	CERT_VERIFY_ALLOW_MORE_USAGE_FLAG                                              = 0x8
	CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION                                        = 0x2
	CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG                                            = 0x1
	CERT_VERIFY_NO_TIME_CHECK_FLAG                                                 = 0x4
	CERT_VERIFY_REV_ACCUMULATIVE_TIMEOUT_FLAG                                      = 0x4
	CERT_VERIFY_REV_CHAIN_FLAG                                                     = 0x1
	CERT_VERIFY_REV_NO_OCSP_FAILOVER_TO_CRL_FLAG                                   = 0x10
	CERT_VERIFY_REV_SERVER_OCSP_FLAG                                               = 0x8
	CERT_VERIFY_TRUSTED_SIGNERS_FLAG                                               = 0x2
	CERT_VERIFY_UPDATED_CTL_FLAG                                                   = 0x1
	CERT_X500_NAME_STR                                                             = 3
	CERT_XML_NAME_STR                                                              = 4
	CF_NULL                                                                        = 0
	CHANGER_BAR_CODE_SCANNER_INSTALLED                                             = 0x00000001
	CHANGER_CARTRIDGE_MAGAZINE                                                     = 0x00000100
	CHANGER_CLEANER_ACCESS_NOT_VALID                                               = 0x00040000
	CHANGER_CLEANER_AUTODISMOUNT                                                   = 0x80000004
	CHANGER_CLEANER_OPS_NOT_SUPPORTED                                              = 0x80000040
	CHANGER_CLEANER_SLOT                                                           = 0x00000040
	CHANGER_CLOSE_IEPORT                                                           = 0x00000004
	CHANGER_DEVICE_REINITIALIZE_CAPABLE                                            = 0x08000000
	CHANGER_DRIVE_CLEANING_REQUIRED                                                = 0x00010000
	CHANGER_DRIVE_EMPTY_ON_DOOR_ACCESS                                             = 0x20000000
	CHANGER_EXCHANGE_MEDIA                                                         = 0x00000020
	CHANGER_IEPORT_USER_CONTROL_CLOSE                                              = 0x80000100
	CHANGER_IEPORT_USER_CONTROL_OPEN                                               = 0x80000080
	CHANGER_INIT_ELEM_STAT_WITH_RANGE                                              = 0x00000002
	CHANGER_KEYPAD_ENABLE_DISABLE                                                  = 0x10000000
	CHANGER_LOCK_UNLOCK                                                            = 0x00000080
	CHANGER_MEDIUM_FLIP                                                            = 0x00000200
	CHANGER_MOVE_EXTENDS_IEPORT                                                    = 0x80000200
	CHANGER_MOVE_RETRACTS_IEPORT                                                   = 0x80000400
	CHANGER_OPEN_IEPORT                                                            = 0x00000008
	CHANGER_POSITION_TO_ELEMENT                                                    = 0x00000400
	CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE                                             = 0x80000002
	CHANGER_PREDISMOUNT_ALIGN_TO_SLOT                                              = 0x80000001
	CHANGER_PREDISMOUNT_EJECT_REQUIRED                                             = 0x00020000
	CHANGER_PREMOUNT_EJECT_REQUIRED                                                = 0x00080000
	CHANGER_REPORT_IEPORT_STATE                                                    = 0x00000800
	CHANGER_RESERVED_BIT                                                           = 0x80000000
	CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR                                             = 0x80000020
	CHANGER_SERIAL_NUMBER_VALID                                                    = 0x04000000
	CHANGER_SLOTS_USE_TRAYS                                                        = 0x80000010
	CHANGER_STATUS_NON_VOLATILE                                                    = 0x00000010
	CHANGER_STORAGE_DRIVE                                                          = 0x00001000
	CHANGER_STORAGE_IEPORT                                                         = 0x00002000
	CHANGER_STORAGE_SLOT                                                           = 0x00004000
	CHANGER_STORAGE_TRANSPORT                                                      = 0x00008000
	CHANGER_TO_DRIVE                                                               = 0x08
	CHANGER_TO_IEPORT                                                              = 0x04
	CHANGER_TO_SLOT                                                                = 0x02
	CHANGER_TO_TRANSPORT                                                           = 0x01
	CHANGER_TRUE_EXCHANGE_CAPABLE                                                  = 0x80000008
	CHANGER_VOLUME_ASSERT                                                          = 0x00400000
	CHANGER_VOLUME_IDENTIFICATION                                                  = 0x00100000
	CHANGER_VOLUME_REPLACE                                                         = 0x00800000
	CHANGER_VOLUME_SEARCH                                                          = 0x00200000
	CHANGER_VOLUME_UNDEFINE                                                        = 0x01000000
	CLOSEPROPS_DISCARD                                                             = 0x0001
	CLOSEPROPS_NONE                                                                = 0x0000
	CLR_DEFAULT                                                                    = 4278190080
	CLR_HILIGHT                                                                    = 4278190080
	CLR_NONE                                                                       = 4294967295
	CLTYPE_LEN                                                                     = 12
	CMB_MASKED                                                                     = 0x2
	CMC_FAIL_BAD_ALG                                                               = 0
	CMC_FAIL_BAD_CERT_ID                                                           = 4
	CMC_FAIL_BAD_IDENTITY                                                          = 7
	CMC_FAIL_BAD_MESSAGE_CHECK                                                     = 1
	CMC_FAIL_BAD_REQUEST                                                           = 2
	CMC_FAIL_BAD_TIME                                                              = 3
	CMC_FAIL_INTERNAL_CA_ERROR                                                     = 11
	CMC_FAIL_MUST_ARCHIVE_KEYS                                                     = 6
	CMC_FAIL_NO_KEY_REUSE                                                          = 10
	CMC_FAIL_POP_FAILED                                                            = 9
	CMC_FAIL_POP_REQUIRED                                                          = 8
	CMC_FAIL_TRY_LATER                                                             = 12
	CMC_FAIL_UNSUPORTED_EXT                                                        = 5
	CMC_OTHER_INFO_FAIL_CHOICE                                                     = 1
	CMC_OTHER_INFO_NO_CHOICE                                                       = 0
	CMC_OTHER_INFO_PEND_CHOICE                                                     = 2
	CMC_STATUS_CONFIRM_REQUIRED                                                    = 5
	CMC_STATUS_FAILED                                                              = 2
	CMC_STATUS_NO_SUPPORT                                                          = 4
	CMC_STATUS_PENDING                                                             = 3
	CMC_STATUS_SUCCESS                                                             = 0
	CMC_TAGGED_CERT_REQUEST_CHOICE                                                 = 1
	CMDSTR_NEWFOLDERA                                                              = "NewFolder"
	CMDSTR_VIEWDETAILSA                                                            = "ViewDetails"
	CMDSTR_VIEWLISTA                                                               = "ViewList"
	CMF_ASYNCVERBSTATE                                                             = 0x400
	CMF_CANRENAME                                                                  = 0x10
	CMF_DEFAULTONLY                                                                = 0x1
	CMF_DONOTPICKDEFAULT                                                           = 0x2000
	CMF_EXPLORE                                                                    = 0x4
	CMF_EXTENDEDVERBS                                                              = 0x100
	CMF_INCLUDESTATIC                                                              = 0x40
	CMF_NODEFAULT                                                                  = 0x20
	CMF_NORMAL                                                                     = 0x0
	CMF_NOVERBS                                                                    = 0x8
	CMF_OPTIMIZEFORINVOKE                                                          = 0x800
	CMF_RESERVED                                                                   = 0xffff0000
	CMF_SYNCCASCADEMENU                                                            = 0x1000
	CMF_VERBSONLY                                                                  = 0x2
	CMIC_MASK_CONTROL_DOWN                                                         = 0x40000000
	CMIC_MASK_PTINVOKE                                                             = 0x20000000
	CMIC_MASK_SHIFT_DOWN                                                           = 0x10000000
	CMSG_ALL_FLAGS                                                                 = 18446744073709551615
	CMSG_ATTR_CERT_COUNT_PARAM                                                     = 31
	CMSG_ATTR_CERT_PARAM                                                           = 32
	CMSG_AUTHENTICATED_ATTRIBUTES_FLAG                                             = 0x8
	CMSG_BARE_CONTENT_FLAG                                                         = 0x1
	CMSG_BARE_CONTENT_PARAM                                                        = 3
	CMSG_CERT_COUNT_PARAM                                                          = 11
	CMSG_CERT_PARAM                                                                = 12
	CMSG_CMS_ENCAPSULATED_CONTENT_FLAG                                             = 0x40
	CMSG_CMS_ENCAPSULATED_CTL_FLAG                                                 = 0x8000
	CMSG_CMS_RECIPIENT_COUNT_PARAM                                                 = 33
	CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM                                   = 35
	CMSG_CMS_RECIPIENT_INDEX_PARAM                                                 = 34
	CMSG_CMS_RECIPIENT_INFO_PARAM                                                  = 36
	CMSG_CMS_SIGNER_INFO_PARAM                                                     = 39
	CMSG_COMPUTED_HASH_PARAM                                                       = 22
	CMSG_CONTENTS_OCTETS_FLAG                                                      = 0x10
	CMSG_CONTENT_ENCRYPT_FREE_OBJID_FLAG                                           = 0x2
	CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG                                            = 0x1
	CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG                                      = 0x1
	CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG                                      = 0x8000
	CMSG_CONTENT_PARAM                                                             = 2
	CMSG_CRL_COUNT_PARAM                                                           = 13
	CMSG_CRL_PARAM                                                                 = 14
	CMSG_CRYPT_RELEASE_CONTEXT_FLAG                                                = 0x8000
	CMSG_CTRL_ADD_ATTR_CERT                                                        = 14
	CMSG_CTRL_ADD_CERT                                                             = 10
	CMSG_CTRL_ADD_CMS_SIGNER_INFO                                                  = 20
	CMSG_CTRL_ADD_CRL                                                              = 12
	CMSG_CTRL_ADD_SIGNER                                                           = 6
	CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR                                               = 8
	CMSG_CTRL_DECRYPT                                                              = 2
	CMSG_CTRL_DEL_ATTR_CERT                                                        = 15
	CMSG_CTRL_DEL_CERT                                                             = 11
	CMSG_CTRL_DEL_CRL                                                              = 13
	CMSG_CTRL_DEL_SIGNER                                                           = 7
	CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR                                               = 9
	CMSG_CTRL_ENABLE_STRONG_SIGNATURE                                              = 21
	CMSG_CTRL_KEY_AGREE_DECRYPT                                                    = 17
	CMSG_CTRL_KEY_TRANS_DECRYPT                                                    = 16
	CMSG_CTRL_MAIL_LIST_DECRYPT                                                    = 18
	CMSG_CTRL_VERIFY_HASH                                                          = 5
	CMSG_CTRL_VERIFY_SIGNATURE                                                     = 1
	CMSG_CTRL_VERIFY_SIGNATURE_EX                                                  = 19
	CMSG_DATA                                                                      = 1
	CMSG_DATA_FLAG                                                                 = 2
	CMSG_DETACHED_FLAG                                                             = 0x4
	CMSG_ENCODED_MESSAGE                                                           = 29
	CMSG_ENCODED_SIGNER                                                            = 28
	CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG                                     = 0x2
	CMSG_ENCODE_SORTED_CTL_FLAG                                                    = 0x1
	CMSG_ENCODING_TYPE_MASK                                                        = 0xffff0000
	CMSG_ENCRYPTED                                                                 = 6
	CMSG_ENCRYPTED_DIGEST                                                          = 27
	CMSG_ENCRYPTED_FLAG                                                            = 64
	CMSG_ENCRYPT_PARAM                                                             = 26
	CMSG_ENVELOPED                                                                 = 3
	CMSG_ENVELOPED_DATA_CMS_VERSION                                                = 2
	CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION                                           = 0
	CMSG_ENVELOPED_DATA_V0                                                         = 0
	CMSG_ENVELOPED_DATA_V2                                                         = 2
	CMSG_ENVELOPED_FLAG                                                            = 8
	CMSG_ENVELOPED_RECIPIENT_V0                                                    = 0
	CMSG_ENVELOPED_RECIPIENT_V2                                                    = 2
	CMSG_ENVELOPED_RECIPIENT_V3                                                    = 3
	CMSG_ENVELOPED_RECIPIENT_V4                                                    = 4
	CMSG_ENVELOPE_ALGORITHM_PARAM                                                  = 15
	CMSG_HASHED                                                                    = 5
	CMSG_HASHED_DATA_CMS_VERSION                                                   = 2
	CMSG_HASHED_DATA_PKCS_1_5_VERSION                                              = 0
	CMSG_HASHED_DATA_V0                                                            = 0
	CMSG_HASHED_DATA_V2                                                            = 2
	CMSG_HASHED_FLAG                                                               = 32
	CMSG_HASH_ALGORITHM_PARAM                                                      = 20
	CMSG_HASH_DATA_PARAM                                                           = 21
	CMSG_INDEFINITE_LENGTH                                                         = 4294967295
	CMSG_INNER_CONTENT_TYPE_PARAM                                                  = 4
	CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG                                      = 0x2
	CMSG_KEY_AGREE_ENCRYPT_FREE_OBJID_FLAG                                         = 0x20
	CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG                                          = 0x1
	CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG                                    = 0x4
	CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG                                   = 0x10
	CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG                                   = 0x8
	CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE                                            = 1
	CMSG_KEY_AGREE_ORIGINATOR_CERT                                                 = 1
	CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY                                           = 2
	CMSG_KEY_AGREE_RECIPIENT                                                       = 2
	CMSG_KEY_AGREE_STATIC_KEY_CHOICE                                               = 2
	CMSG_KEY_AGREE_VERSION                                                         = 3
	CMSG_KEY_TRANS_CMS_VERSION                                                     = 2
	CMSG_KEY_TRANS_ENCRYPT_FREE_OBJID_FLAG                                         = 0x2
	CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG                                          = 0x1
	CMSG_KEY_TRANS_PKCS_1_5_VERSION                                                = 0
	CMSG_KEY_TRANS_RECIPIENT                                                       = 1
	CMSG_LENGTH_ONLY_FLAG                                                          = 0x2
	CMSG_MAIL_LIST_ENCRYPT_FREE_OBJID_FLAG                                         = 0x2
	CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG                                          = 0x1
	CMSG_MAIL_LIST_HANDLE_KEY_CHOICE                                               = 1
	CMSG_MAIL_LIST_RECIPIENT                                                       = 3
	CMSG_MAIL_LIST_VERSION                                                         = 4
	CMSG_MAX_LENGTH_FLAG                                                           = 0x20
	CMSG_OID_CNG_EXPORT_KEY_AGREE_FUNC                                             = "CryptMsgDllCNGExportKeyAgree"
	CMSG_OID_CNG_EXPORT_KEY_TRANS_FUNC                                             = "CryptMsgDllCNGExportKeyTrans"
	CMSG_OID_CNG_GEN_CONTENT_ENCRYPT_KEY_FUNC                                      = "CryptMsgDllCNGGenContentEncryptKey"
	CMSG_OID_CNG_IMPORT_CONTENT_ENCRYPT_KEY_FUNC                                   = "CryptMsgDllCNGImportContentEncryptKey"
	CMSG_OID_CNG_IMPORT_KEY_AGREE_FUNC                                             = "CryptMsgDllCNGImportKeyAgree"
	CMSG_OID_CNG_IMPORT_KEY_TRANS_FUNC                                             = "CryptMsgDllCNGImportKeyTrans"
	CMSG_OID_EXPORT_ENCRYPT_KEY_FUNC                                               = "CryptMsgDllExportEncryptKey"
	CMSG_OID_EXPORT_KEY_AGREE_FUNC                                                 = "CryptMsgDllExportKeyAgree"
	CMSG_OID_EXPORT_KEY_TRANS_FUNC                                                 = "CryptMsgDllExportKeyTrans"
	CMSG_OID_EXPORT_MAIL_LIST_FUNC                                                 = "CryptMsgDllExportMailList"
	CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC                                          = "CryptMsgDllGenContentEncryptKey"
	CMSG_OID_GEN_ENCRYPT_KEY_FUNC                                                  = "CryptMsgDllGenEncryptKey"
	CMSG_OID_IMPORT_ENCRYPT_KEY_FUNC                                               = "CryptMsgDllImportEncryptKey"
	CMSG_OID_IMPORT_KEY_AGREE_FUNC                                                 = "CryptMsgDllImportKeyAgree"
	CMSG_OID_IMPORT_KEY_TRANS_FUNC                                                 = "CryptMsgDllImportKeyTrans"
	CMSG_OID_IMPORT_MAIL_LIST_FUNC                                                 = "CryptMsgDllImportMailList"
	CMSG_RC4_NO_SALT_FLAG                                                          = 0x40000000
	CMSG_RECIPIENT_COUNT_PARAM                                                     = 17
	CMSG_RECIPIENT_INDEX_PARAM                                                     = 18
	CMSG_RECIPIENT_INFO_PARAM                                                      = 19
	CMSG_SIGNED                                                                    = 2
	CMSG_SIGNED_AND_ENVELOPED                                                      = 4
	CMSG_SIGNED_AND_ENVELOPED_FLAG                                                 = 16
	CMSG_SIGNED_DATA_CMS_VERSION                                                   = 3
	CMSG_SIGNED_DATA_NO_SIGN_FLAG                                                  = 0x80
	CMSG_SIGNED_DATA_PKCS_1_5_VERSION                                              = 1
	CMSG_SIGNED_DATA_V1                                                            = 1
	CMSG_SIGNED_DATA_V3                                                            = 3
	CMSG_SIGNED_FLAG                                                               = 4
	CMSG_SIGNER_AUTH_ATTR_PARAM                                                    = 9
	CMSG_SIGNER_CERT_ID_PARAM                                                      = 38
	CMSG_SIGNER_CERT_INFO_PARAM                                                    = 7
	CMSG_SIGNER_COUNT_PARAM                                                        = 5
	CMSG_SIGNER_HASH_ALGORITHM_PARAM                                               = 8
	CMSG_SIGNER_INFO_CMS_VERSION                                                   = 3
	CMSG_SIGNER_INFO_PARAM                                                         = 6
	CMSG_SIGNER_INFO_PKCS_1_5_VERSION                                              = 1
	CMSG_SIGNER_INFO_V1                                                            = 1
	CMSG_SIGNER_INFO_V3                                                            = 3
	CMSG_SIGNER_ONLY_FLAG                                                          = 0x2
	CMSG_SIGNER_UNAUTH_ATTR_PARAM                                                  = 10
	CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG                                               = 0x80000000
	CMSG_TRUSTED_SIGNER_FLAG                                                       = 0x1
	CMSG_TYPE_PARAM                                                                = 1
	CMSG_UNPROTECTED_ATTR_PARAM                                                    = 37
	CMSG_USE_SIGNER_INDEX_FLAG                                                     = 0x4
	CMSG_VERIFY_COUNTER_SIGN_ENABLE_STRONG_FLAG                                    = 0x1
	CMSG_VERIFY_SIGNER_CERT                                                        = 2
	CMSG_VERIFY_SIGNER_CHAIN                                                       = 3
	CMSG_VERIFY_SIGNER_NULL                                                        = 4
	CMSG_VERIFY_SIGNER_PUBKEY                                                      = 1
	CMSG_VERSION_PARAM                                                             = 30
	CNLEN                                                                          = 15
	COMCTL32_VERSION                                                               = 6
	COMPRESSION_FORMAT_SPARSE                                                      = 16384
	COM_RIGHTS_ACTIVATE_LOCAL                                                      = 8
	COM_RIGHTS_ACTIVATE_REMOTE                                                     = 16
	COM_RIGHTS_EXECUTE                                                             = 1
	COM_RIGHTS_EXECUTE_LOCAL                                                       = 2
	COM_RIGHTS_EXECUTE_REMOTE                                                      = 4
	CONFIRMSAFETYACTION_LOADOBJECT                                                 = 0x1
	CONST_VTBL                                                                     = 0
	CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC                                         = "ContextDllCreateObjectContext"
	COPYFILE_SIS_FLAGS                                                             = 0x0003
	COPYFILE_SIS_LINK                                                              = 0x0001
	COPYFILE_SIS_REPLACE                                                           = 0x0002
	CREATE_BYPASS_CSC                                                              = 0x2
	CREATE_NO_CONNECT                                                              = 0x1
	CRL_DIST_POINT_ERR_CRL_ISSUER_BIT                                              = 2147483648
	CRL_DIST_POINT_ERR_INDEX_MASK                                                  = 0x7f
	CRL_DIST_POINT_ERR_INDEX_SHIFT                                                 = 24
	CRL_DIST_POINT_FULL_NAME                                                       = 1
	CRL_DIST_POINT_ISSUER_RDN_NAME                                                 = 2
	CRL_DIST_POINT_NO_NAME                                                         = 0
	CRL_FIND_ANY                                                                   = 0
	CRL_FIND_EXISTING                                                              = 2
	CRL_FIND_ISSUED_BY                                                             = 1
	CRL_FIND_ISSUED_BY_AKI_FLAG                                                    = 0x1
	CRL_FIND_ISSUED_BY_BASE_FLAG                                                   = 0x8
	CRL_FIND_ISSUED_BY_DELTA_FLAG                                                  = 0x4
	CRL_FIND_ISSUED_BY_SIGNATURE_FLAG                                              = 0x2
	CRL_FIND_ISSUED_FOR                                                            = 3
	CRL_FIND_ISSUED_FOR_SET_STRONG_PROPERTIES_FLAG                                 = 0x10
	CRL_REASON_AA_COMPROMISE                                                       = 10
	CRL_REASON_AA_COMPROMISE_FLAG                                                  = 0x80
	CRL_REASON_AFFILIATION_CHANGED                                                 = 3
	CRL_REASON_AFFILIATION_CHANGED_FLAG                                            = 0x10
	CRL_REASON_CA_COMPROMISE                                                       = 2
	CRL_REASON_CA_COMPROMISE_FLAG                                                  = 0x20
	CRL_REASON_CERTIFICATE_HOLD                                                    = 6
	CRL_REASON_CERTIFICATE_HOLD_FLAG                                               = 0x02
	CRL_REASON_CESSATION_OF_OPERATION                                              = 5
	CRL_REASON_CESSATION_OF_OPERATION_FLAG                                         = 0x04
	CRL_REASON_KEY_COMPROMISE                                                      = 1
	CRL_REASON_KEY_COMPROMISE_FLAG                                                 = 0x40
	CRL_REASON_PRIVILEGE_WITHDRAWN                                                 = 9
	CRL_REASON_PRIVILEGE_WITHDRAWN_FLAG                                            = 0x01
	CRL_REASON_REMOVE_FROM_CRL                                                     = 8
	CRL_REASON_SUPERSEDED                                                          = 4
	CRL_REASON_SUPERSEDED_FLAG                                                     = 0x08
	CRL_REASON_UNSPECIFIED                                                         = 0
	CRL_REASON_UNUSED_FLAG                                                         = 0x80
	CRL_V1                                                                         = 0
	CRL_V2                                                                         = 1
	CROSS_CERT_DIST_POINT_ERR_INDEX_MASK                                           = 0xff
	CROSS_CERT_DIST_POINT_ERR_INDEX_SHIFT                                          = 24
	CRYPTNET_CACHED_OCSP_SWITCH_TO_CRL_COUNT_DEFAULT                               = 50
	CRYPTNET_CRL_BEFORE_OCSP_ENABLE                                                = 0xffffffff
	CRYPTNET_CRL_PRE_FETCH_MAX_AGE_SECONDS_DEFAULT                                 = 7200
	CRYPTNET_CRL_PRE_FETCH_MAX_AGE_SECONDS_MIN                                     = 300
	CRYPTNET_CRL_PRE_FETCH_MIN_AFTER_NEXT_UPDATE_SECONDS_DEFAULT                   = 300
	CRYPTNET_CRL_PRE_FETCH_MIN_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT                  = 300
	CRYPTNET_CRL_PRE_FETCH_PUBLISH_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT              = 3600
	CRYPTNET_CRL_PRE_FETCH_PUBLISH_RANDOM_INTERVAL_SECONDS_DEFAULT                 = 300
	CRYPTNET_CRL_PRE_FETCH_TIMEOUT_SECONDS_DEFAULT                                 = 300
	CRYPTNET_MAX_CACHED_OCSP_PER_CRL_COUNT_DEFAULT                                 = 500
	CRYPTNET_OCSP_AFTER_CRL_DISABLE                                                = 0xffffffff
	CRYPTNET_PRE_FETCH_AFTER_CURRENT_TIME_PRE_FETCH_PERIOD_SECONDS_DEFAULT         = 1800
	CRYPTNET_PRE_FETCH_AFTER_PUBLISH_PRE_FETCH_DIVISOR_DEFAULT                     = 10
	CRYPTNET_PRE_FETCH_BEFORE_NEXT_UPDATE_PRE_FETCH_DIVISOR_DEFAULT                = 20
	CRYPTNET_PRE_FETCH_MAX_AFTER_NEXT_UPDATE_PRE_FETCH_PERIOD_SECONDS_DEFAULT      = 14400
	CRYPTNET_PRE_FETCH_MAX_MAX_AGE_SECONDS_DEFAULT                                 = 1209600
	CRYPTNET_PRE_FETCH_MIN_AFTER_NEXT_UPDATE_PRE_FETCH_PERIOD_SECONDS_DEFAULT      = 1800
	CRYPTNET_PRE_FETCH_MIN_BEFORE_NEXT_UPDATE_PRE_FETCH_PERIOD_SECONDS_DEFAULT     = 3600
	CRYPTNET_PRE_FETCH_MIN_MAX_AGE_SECONDS_DEFAULT                                 = 3600
	CRYPTNET_PRE_FETCH_MIN_OCSP_VALIDITY_PERIOD_SECONDS_DEFAULT                    = 1209600
	CRYPTNET_PRE_FETCH_RETRIEVAL_TIMEOUT_SECONDS_DEFAULT                           = 300
	CRYPTNET_PRE_FETCH_SCAN_AFTER_TRIGGER_DELAY_SECONDS_DEFAULT                    = 30
	CRYPTNET_PRE_FETCH_TRIGGER_DISABLE                                             = 0xffffffff
	CRYPTNET_PRE_FETCH_TRIGGER_PERIOD_SECONDS_DEFAULT                              = 600
	CRYPTNET_PRE_FETCH_VALIDITY_PERIOD_AFTER_NEXT_UPDATE_PRE_FETCH_DIVISOR_DEFAULT = 10
	CRYPTNET_URL_CACHE_DEFAULT_FLUSH                                               = 0
	CRYPTNET_URL_CACHE_DEFAULT_FLUSH_EXEMPT_SECONDS_DEFAULT                        = 2419200
	CRYPTNET_URL_CACHE_DISABLE_FLUSH                                               = 0xffffffff
	CRYPTNET_URL_CACHE_PRE_FETCH_AUTOROOT_CAB                                      = 5
	CRYPTNET_URL_CACHE_PRE_FETCH_BLOB                                              = 1
	CRYPTNET_URL_CACHE_PRE_FETCH_CRL                                               = 2
	CRYPTNET_URL_CACHE_PRE_FETCH_DISALLOWED_CERT_CAB                               = 6
	CRYPTNET_URL_CACHE_PRE_FETCH_NONE                                              = 0
	CRYPTNET_URL_CACHE_PRE_FETCH_OCSP                                              = 3
	CRYPTNET_URL_CACHE_PRE_FETCH_PIN_RULES_CAB                                     = 7
	CRYPTNET_URL_CACHE_RESPONSE_HTTP                                               = 1
	CRYPTNET_URL_CACHE_RESPONSE_NONE                                               = 0
	CRYPTNET_URL_CACHE_RESPONSE_VALIDATED                                          = 0x8000
	CRYPTO_BLOBS_DEFINED                                                           = 0
	CRYPTPROTECTMEMORY_BLOCK_SIZE                                                  = 16
	CRYPTPROTECTMEMORY_CROSS_PROCESS                                               = 0x1
	CRYPTPROTECTMEMORY_SAME_LOGON                                                  = 0x2
	CRYPTPROTECTMEMORY_SAME_PROCESS                                                = 0x0
	CRYPTPROTECT_AUDIT                                                             = 0x10
	CRYPTPROTECT_CRED_REGENERATE                                                   = 0x80
	CRYPTPROTECT_CRED_SYNC                                                         = 0x8
	CRYPTPROTECT_FIRST_RESERVED_FLAGVAL                                            = 0x0fffffff
	CRYPTPROTECT_LAST_RESERVED_FLAGVAL                                             = 0xffffffff
	CRYPTPROTECT_LOCAL_MACHINE                                                     = 0x4
	CRYPTPROTECT_NO_RECOVERY                                                       = 0x20
	CRYPTPROTECT_PROMPT_ON_PROTECT                                                 = 0x2
	CRYPTPROTECT_PROMPT_ON_UNPROTECT                                               = 0x1
	CRYPTPROTECT_PROMPT_REQUIRE_STRONG                                             = 0x10
	CRYPTPROTECT_PROMPT_RESERVED                                                   = 0x04
	CRYPTPROTECT_PROMPT_STRONG                                                     = 0x08
	CRYPTPROTECT_UI_FORBIDDEN                                                      = 0x1
	CRYPTPROTECT_VERIFY_PROTECTION                                                 = 0x40
	CRYPT_ACCUMULATIVE_TIMEOUT                                                     = 0x800
	CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG                                            = 0x10000
	CRYPT_ACQUIRE_CACHE_FLAG                                                       = 0x1
	CRYPT_ACQUIRE_COMPARE_KEY_FLAG                                                 = 0x4
	CRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK                                            = 0x70000
	CRYPT_ACQUIRE_NO_HEALING                                                       = 0x8
	CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG                                             = 0x40000
	CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG                                           = 0x20000
	CRYPT_ACQUIRE_SILENT_FLAG                                                      = 0x40
	CRYPT_ACQUIRE_USE_PROV_INFO_FLAG                                               = 0x2
	CRYPT_ACQUIRE_WINDOW_HANDLE_FLAG                                               = 0x80
	CRYPT_AIA_RETRIEVAL                                                            = 0x80000
	CRYPT_ALL_FUNCTIONS                                                            = 1
	CRYPT_ALL_PROVIDERS                                                            = 2
	CRYPT_ANY                                                                      = 4
	CRYPT_ARCHIVABLE                                                               = 0x4000
	CRYPT_ARCHIVE                                                                  = 0x100
	CRYPT_ASN_ENCODING                                                             = 0x1
	CRYPT_ASYNC_RETRIEVAL                                                          = 0x10
	CRYPT_BLOB_VER3                                                                = 0x80
	CRYPT_CACHE_ONLY_RETRIEVAL                                                     = 0x2
	CRYPT_CHECK_FRESHNESS_TIME_VALIDITY                                            = 0x400
	CRYPT_CREATE_IV                                                                = 0x200
	CRYPT_CREATE_NEW_FLUSH_ENTRY                                                   = 0x10000000
	CRYPT_CREATE_SALT                                                              = 0x4
	CRYPT_DATA_KEY                                                                 = 0x800
	CRYPT_DECODE_ALLOC_FLAG                                                        = 0x8000
	CRYPT_DECODE_ENABLE_IA5CONVERSION_FLAG                                         = 100663296
	CRYPT_DECODE_ENABLE_PUNYCODE_FLAG                                              = 0x2000000
	CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG                                           = 0x4000000
	CRYPT_DECODE_NOCOPY_FLAG                                                       = 0x1
	CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG                                   = 0x8
	CRYPT_DECODE_SHARE_OID_STRING_FLAG                                             = 0x4
	CRYPT_DECODE_TO_BE_SIGNED_FLAG                                                 = 0x2
	CRYPT_DECRYPT                                                                  = 0x2
	CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG                                        = 0x1
	CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID                                            = 1
	CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID                                      = 2
	CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG                                             = 0x2
	CRYPT_DEFAULT_OID                                                              = "DEFAULT"
	CRYPT_DELETEKEYSET                                                             = 0x10
	CRYPT_DELETE_DEFAULT                                                           = 0x4
	CRYPT_DELETE_KEYSET                                                            = 16
	CRYPT_DESTROYKEY                                                               = 0x4
	CRYPT_DOMAIN                                                                   = 2
	CRYPT_DONT_CACHE_RESULT                                                        = 0x8
	CRYPT_DONT_CHECK_TIME_VALIDITY                                                 = 0x200
	CRYPT_DONT_VERIFY_SIGNATURE                                                    = 0x100
	CRYPT_ECC_CMS_SHARED_INFO_SUPPPUBINFO_BYTE_LENGTH                              = 4
	CRYPT_ECC_PRIVATE_KEY_INFO_v1                                                  = 1
	CRYPT_ENABLE_FILE_RETRIEVAL                                                    = 0x08000000
	CRYPT_ENABLE_SSL_REVOCATION_RETRIEVAL                                          = 0x800000
	CRYPT_ENCODE_ALLOC_FLAG                                                        = 0x8000
	CRYPT_ENCODE_DECODE_NONE                                                       = 0
	CRYPT_ENCODE_ENABLE_IA5CONVERSION_FLAG                                         = 393216
	CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG                                              = 0x20000
	CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG                                           = 0x40000
	CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG                                   = 0x8
	CRYPT_ENCRYPT                                                                  = 0x1
	CRYPT_ENCRYPT_ALG_OID_GROUP_ID                                                 = 2
	CRYPT_ENHKEY_USAGE_OID_GROUP_ID                                                = 7
	CRYPT_EXCLUSIVE                                                                = 1
	CRYPT_EXPORT                                                                   = 0x4
	CRYPT_EXPORTABLE                                                               = 0x1
	CRYPT_EXPORT_KEY                                                               = 0x40
	CRYPT_EXT_OR_ATTR_OID_GROUP_ID                                                 = 6
	CRYPT_FAILED                                                                   = 0
	CRYPT_FASTSGC                                                                  = 0x2
	CRYPT_FIND_MACHINE_KEYSET_FLAG                                                 = 0x2
	CRYPT_FIND_SILENT_KEYSET_FLAG                                                  = 0x40
	CRYPT_FIND_USER_KEYSET_FLAG                                                    = 0x1
	CRYPT_FIRST                                                                    = 1
	CRYPT_FIRST_ALG_OID_GROUP_ID                                                   = 1
	CRYPT_FLAG_IPSEC                                                               = 0x10
	CRYPT_FLAG_PCT1                                                                = 0x1
	CRYPT_FLAG_SIGNING                                                             = 0x20
	CRYPT_FLAG_SSL2                                                                = 0x2
	CRYPT_FLAG_SSL3                                                                = 0x4
	CRYPT_FLAG_TLS1                                                                = 0x8
	CRYPT_FORMAT_COMMA                                                             = 0x1000
	CRYPT_FORMAT_CRLF                                                              = 512
	CRYPT_FORMAT_OID                                                               = 0x4
	CRYPT_FORMAT_RDN_CRLF                                                          = 0x200
	CRYPT_FORMAT_RDN_REVERSE                                                       = 0x800
	CRYPT_FORMAT_RDN_SEMICOLON                                                     = 0x100
	CRYPT_FORMAT_RDN_UNQUOTE                                                       = 0x400
	CRYPT_FORMAT_SEMICOLON                                                         = 256
	CRYPT_FORMAT_SIMPLE                                                            = 0x1
	CRYPT_FORMAT_STR_MULTI_LINE                                                    = 0x1
	CRYPT_FORMAT_STR_NO_HEX                                                        = 0x10
	CRYPT_FORMAT_X509                                                              = 0x2
	CRYPT_GET_INSTALLED_OID_FUNC_FLAG                                              = 0x1
	CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE                                              = 0x8
	CRYPT_GET_URL_FROM_EXTENSION                                                   = 0x2
	CRYPT_GET_URL_FROM_PROPERTY                                                    = 0x1
	CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE                                            = 0x4
	CRYPT_HASH_ALG_OID_GROUP_ID                                                    = 1
	CRYPT_HTTP_POST_RETRIEVAL                                                      = 0x100000
	CRYPT_IMPL_HARDWARE                                                            = 1
	CRYPT_IMPL_MIXED                                                               = 3
	CRYPT_IMPL_REMOVABLE                                                           = 8
	CRYPT_IMPL_SOFTWARE                                                            = 2
	CRYPT_IMPL_UNKNOWN                                                             = 4
	CRYPT_IMPORT_KEY                                                               = 0x80
	CRYPT_INITIATOR                                                                = 0x40
	CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG                                             = 1
	CRYPT_INSTALL_OID_INFO_BEFORE_FLAG                                             = 1
	CRYPT_IPSEC_HMAC_KEY                                                           = 0x100
	CRYPT_KDF_OID_GROUP_ID                                                         = 10
	CRYPT_KEEP_TIME_VALID                                                          = 0x80
	CRYPT_KEK                                                                      = 0x400
	CRYPT_KEYID_ALLOC_FLAG                                                         = 0x8000
	CRYPT_KEYID_DELETE_FLAG                                                        = 0x10
	CRYPT_KEYID_MACHINE_FLAG                                                       = 0x20
	CRYPT_KEYID_SET_NEW_FLAG                                                       = 0x2000
	CRYPT_KEY_LEN                                                                  = 7
	CRYPT_KM                                                                       = 2
	CRYPT_LAST_ALG_OID_GROUP_ID                                                    = 4
	CRYPT_LAST_OID_GROUP_ID                                                        = 10
	CRYPT_LDAP_AREC_EXCLUSIVE_RETRIEVAL                                            = 0x40000
	CRYPT_LDAP_INSERT_ENTRY_ATTRIBUTE                                              = 0x8000
	CRYPT_LDAP_SCOPE_BASE_ONLY_RETRIEVAL                                           = 0x2000
	CRYPT_LDAP_SIGN_RETRIEVAL                                                      = 0x10000
	CRYPT_LITTLE_ENDIAN                                                            = 0x1
	CRYPT_LOCAL                                                                    = 1
	CRYPT_LOCALIZED_NAME_ENCODING_TYPE                                             = 0
	CRYPT_LOCALIZED_NAME_OID                                                       = "LocalizedNames"
	CRYPT_MAC                                                                      = 0x20
	CRYPT_MACHINE_DEFAULT                                                          = 0x1
	CRYPT_MACHINE_KEYSET                                                           = 0x20
	CRYPT_MATCH_ANY_ENCODING_TYPE                                                  = 0xffffffff
	CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG                                            = 0x1
	CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG                                    = 0x2
	CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG                                             = 0x4
	CRYPT_MESSAGE_KEYID_SIGNER_FLAG                                                = 0x4
	CRYPT_MESSAGE_SILENT_KEYSET_FLAG                                               = 0x40
	CRYPT_MIN_DEPENDENCIES                                                         = 1
	CRYPT_MM                                                                       = 3
	CRYPT_MODE_CBC                                                                 = 1
	CRYPT_MODE_CBCI                                                                = 6
	CRYPT_MODE_CBCOFM                                                              = 9
	CRYPT_MODE_CBCOFMI                                                             = 10
	CRYPT_MODE_CFB                                                                 = 4
	CRYPT_MODE_CFBP                                                                = 7
	CRYPT_MODE_CTS                                                                 = 5
	CRYPT_MODE_ECB                                                                 = 2
	CRYPT_MODE_OFB                                                                 = 3
	CRYPT_MODE_OFBP                                                                = 8
	CRYPT_NDR_ENCODING                                                             = 0x2
	CRYPT_NEWKEYSET                                                                = 0x8
	CRYPT_NEXT                                                                     = 2
	CRYPT_NOHASHOID                                                                = 0x1
	CRYPT_NOT_MODIFIED_RETRIEVAL                                                   = 0x400000
	CRYPT_NO_AUTH_RETRIEVAL                                                        = 0x20000
	CRYPT_NO_OCSP_FAILOVER_TO_CRL_RETRIEVAL                                        = 0x2000000
	CRYPT_NO_SALT                                                                  = 0x10
	CRYPT_OAEP                                                                     = 0x40
	CRYPT_OCSP_ONLY_RETRIEVAL                                                      = 0x1000000
	CRYPT_OFFLINE_CHECK_RETRIEVAL                                                  = 0x4000
	CRYPT_OID_CREATE_COM_OBJECT_FUNC                                               = "CryptDllCreateCOMObject"
	CRYPT_OID_DECODE_OBJECT_EX_FUNC                                                = "CryptDllDecodeObjectEx"
	CRYPT_OID_DECODE_OBJECT_FUNC                                                   = "CryptDllDecodeObject"
	CRYPT_OID_DISABLE_SEARCH_DS_FLAG                                               = 0x80000000
	CRYPT_OID_ENCODE_OBJECT_EX_FUNC                                                = "CryptDllEncodeObjectEx"
	CRYPT_OID_ENCODE_OBJECT_FUNC                                                   = "CryptDllEncodeObject"
	CRYPT_OID_ENUM_PHYSICAL_STORE_FUNC                                             = "CertDllEnumPhysicalStore"
	CRYPT_OID_ENUM_SYSTEM_STORE_FUNC                                               = "CertDllEnumSystemStore"
	CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC                                         = "CryptDllExportPrivateKeyInfoEx"
	CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_EX2_FUNC                                      = "CryptDllExportPublicKeyInfoEx2"
	CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC                                          = "CryptDllExportPublicKeyInfoEx"
	CRYPT_OID_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC                            = "CryptDllExtractEncodedSignatureParameters"
	CRYPT_OID_FIND_LOCALIZED_NAME_FUNC                                             = "CryptDllFindLocalizedName"
	CRYPT_OID_FIND_OID_INFO_FUNC                                                   = "CryptDllFindOIDInfo"
	CRYPT_OID_FORMAT_OBJECT_FUNC                                                   = "CryptDllFormatObject"
	CRYPT_OID_IMPORT_PRIVATE_KEY_INFO_FUNC                                         = "CryptDllImportPrivateKeyInfoEx"
	CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC                                          = "CryptDllImportPublicKeyInfoEx"
	CRYPT_OID_INFO_ALGID_KEY                                                       = 3
	CRYPT_OID_INFO_CNG_ALGID_KEY                                                   = 5
	CRYPT_OID_INFO_CNG_SIGN_KEY                                                    = 6
	CRYPT_OID_INFO_NAME_KEY                                                        = 2
	CRYPT_OID_INFO_OID_GROUP_BIT_LEN_MASK                                          = 0x0fff0000
	CRYPT_OID_INFO_OID_GROUP_BIT_LEN_SHIFT                                         = 16
	CRYPT_OID_INFO_OID_KEY                                                         = 1
	CRYPT_OID_INFO_OID_KEY_FLAGS_MASK                                              = 0xffff0000
	CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG                                         = 0x40000000
	CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG                                            = 0x80000000
	CRYPT_OID_INFO_SIGN_KEY                                                        = 4
	CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG                                        = 0x1
	CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG                                          = 0x4
	CRYPT_OID_OPEN_STORE_PROV_FUNC                                                 = "CertDllOpenStoreProv"
	CRYPT_OID_OPEN_SYSTEM_STORE_PROV_FUNC                                          = "CertDllOpenSystemStoreProv"
	CRYPT_OID_PUBKEY_ENCRYPT_ONLY_FLAG                                             = 0x40000000
	CRYPT_OID_PUBKEY_SIGN_ONLY_FLAG                                                = 0x80000000
	CRYPT_OID_REGISTER_PHYSICAL_STORE_FUNC                                         = "CertDllRegisterPhysicalStore"
	CRYPT_OID_REGISTER_SYSTEM_STORE_FUNC                                           = "CertDllRegisterSystemStore"
	CRYPT_OID_REGPATH                                                              = "Software\\Microsoft\\Cryptography\\OID"
	CRYPT_OID_REG_ENCODING_TYPE_PREFIX                                             = "EncodingType "
	CRYPT_OID_REG_FUNC_NAME_VALUE_NAME_A                                           = "FuncName"
	CRYPT_OID_SIGN_AND_ENCODE_HASH_FUNC                                            = "CryptDllSignAndEncodeHash"
	CRYPT_OID_UNREGISTER_PHYSICAL_STORE_FUNC                                       = "CertDllUnregisterPhysicalStore"
	CRYPT_OID_UNREGISTER_SYSTEM_STORE_FUNC                                         = "CertDllUnregisterSystemStore"
	CRYPT_OID_USE_CURVE_NAME_FOR_ENCODE_FLAG                                       = 0x20000000
	CRYPT_OID_USE_CURVE_PARAMETERS_FOR_ENCODE_FLAG                                 = 0x10000000
	CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG                                       = 0x2
	CRYPT_OID_VERIFY_CERTIFICATE_CHAIN_POLICY_FUNC                                 = "CertDllVerifyCertificateChainPolicy"
	CRYPT_OID_VERIFY_CTL_USAGE_FUNC                                                = "CertDllVerifyCTLUsage"
	CRYPT_OID_VERIFY_ENCODED_SIGNATURE_FUNC                                        = "CryptDllVerifyEncodedSignature"
	CRYPT_OID_VERIFY_REVOCATION_FUNC                                               = "CertDllVerifyRevocation"
	CRYPT_ONLINE                                                                   = 0x80
	CRYPT_OVERRIDE                                                                 = 65536
	CRYPT_OVERWRITE                                                                = 1
	CRYPT_OWF_REPL_LM_HASH                                                         = 0x1
	CRYPT_POLICY_OID_GROUP_ID                                                      = 8
	CRYPT_PREGEN                                                                   = 0x40
	CRYPT_PRIORITY_BOTTOM                                                          = 4294967295
	CRYPT_PRIORITY_TOP                                                             = 0
	CRYPT_PROCESS_ISOLATE                                                          = 65536
	CRYPT_PROXY_CACHE_RETRIEVAL                                                    = 0x200000
	CRYPT_PSTORE                                                                   = 0x2
	CRYPT_PUBKEY_ALG_OID_GROUP_ID                                                  = 3
	CRYPT_RANDOM_QUERY_STRING_RETRIEVAL                                            = 0x4000000
	CRYPT_RC2_128BIT_VERSION                                                       = 58
	CRYPT_RC2_40BIT_VERSION                                                        = 160
	CRYPT_RC2_56BIT_VERSION                                                        = 52
	CRYPT_RC2_64BIT_VERSION                                                        = 120
	CRYPT_RDN_ATTR_OID_GROUP_ID                                                    = 5
	CRYPT_READ                                                                     = 0x8
	CRYPT_RECIPIENT                                                                = 0x10
	CRYPT_REGISTER_FIRST_INDEX                                                     = 0
	CRYPT_REGISTER_LAST_INDEX                                                      = 0xffffffff
	CRYPT_RETRIEVE_MAX_ERROR_CONTENT_LENGTH                                        = 0x1000
	CRYPT_RETRIEVE_MULTIPLE_OBJECTS                                                = 0x1
	CRYPT_SECRETDIGEST                                                             = 0x1
	CRYPT_SEC_DESCR                                                                = 0x1
	CRYPT_SERVER                                                                   = 0x400
	CRYPT_SF                                                                       = 0x100
	CRYPT_SGC                                                                      = 0x1
	CRYPT_SGCKEY                                                                   = 0x2000
	CRYPT_SGC_ENUM                                                                 = 4
	CRYPT_SIGN_ALG_OID_GROUP_ID                                                    = 4
	CRYPT_SILENT                                                                   = 0x40
	CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG                         = 0x10000
	CRYPT_SSL2_FALLBACK                                                            = 0x2
	CRYPT_STICKY_CACHE_RETRIEVAL                                                   = 0x1000
	CRYPT_STRING_ANY                                                               = 0x00000007
	CRYPT_STRING_BASE64                                                            = 0x1
	CRYPT_STRING_BASE64HEADER                                                      = 0x0
	CRYPT_STRING_BASE64REQUESTHEADER                                               = 0x00000003
	CRYPT_STRING_BASE64URI                                                         = 0x0000000d
	CRYPT_STRING_BASE64X509CRLHEADER                                               = 0x00000009
	CRYPT_STRING_BASE64_ANY                                                        = 0x00000006
	CRYPT_STRING_BINARY                                                            = 0x2
	CRYPT_STRING_ENCODEMASK                                                        = 0x000000ff
	CRYPT_STRING_HASHDATA                                                          = 0x10000000
	CRYPT_STRING_HEX                                                               = 0x4
	CRYPT_STRING_HEXADDR                                                           = 0x0000000a
	CRYPT_STRING_HEXASCII                                                          = 0x00000005
	CRYPT_STRING_HEXASCIIADDR                                                      = 0x0000000b
	CRYPT_STRING_HEXRAW                                                            = 0x0000000c
	CRYPT_STRING_HEX_ANY                                                           = 0x8
	CRYPT_STRING_NOCR                                                              = 0x80000000
	CRYPT_STRING_NOCRLF                                                            = 0x40000000
	CRYPT_STRING_PERCENTESCAPE                                                     = 0x08000000
	CRYPT_STRING_RESERVED100                                                       = 0x00000100
	CRYPT_STRING_RESERVED200                                                       = 0x00000200
	CRYPT_STRING_STRICT                                                            = 0x20000000
	CRYPT_SUCCEED                                                                  = 1
	CRYPT_TEMPLATE_OID_GROUP_ID                                                    = 9
	CRYPT_TXT_LEN                                                                  = 8
	CRYPT_TYPE2_FORMAT                                                             = 0x2
	CRYPT_UI_PROMPT                                                                = 0x4
	CRYPT_UM                                                                       = 1
	CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG                                = 16777216
	CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG                              = 1073741824
	CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG                              = 2147483648
	CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG                             = 536870912
	CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG                              = 268435456
	CRYPT_UPDATE_KEY                                                               = 0x8
	CRYPT_USERDATA                                                                 = 1
	CRYPT_USER_DEFAULT                                                             = 0x2
	CRYPT_USER_KEYSET                                                              = 0x1000
	CRYPT_USER_PROTECTED                                                           = 0x2
	CRYPT_USER_PROTECTED_STRONG                                                    = 0x100000
	CRYPT_VERIFYCONTEXT                                                            = 0xf0000000
	CRYPT_VERIFY_CERT_SIGN_DISABLE_MD2_MD4_FLAG                                    = 0x1
	CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT                                             = 2
	CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN                                            = 3
	CRYPT_VERIFY_CERT_SIGN_ISSUER_NULL                                             = 4
	CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY                                           = 1
	CRYPT_VERIFY_CERT_SIGN_RETURN_STRONG_PROPERTIES_FLAG                           = 0x4
	CRYPT_VERIFY_CERT_SIGN_SET_STRONG_PROPERTIES_FLAG                              = 0x2
	CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB                                            = 1
	CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT                                            = 2
	CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL                                             = 3
	CRYPT_VERIFY_CERT_SIGN_SUBJECT_OCSP_BASIC_SIGNED_RESPONSE                      = 4
	CRYPT_VERIFY_CONTEXT_SIGNATURE                                                 = 0x20
	CRYPT_VERIFY_DATA_HASH                                                         = 0x40
	CRYPT_VOLATILE                                                                 = 0x1000
	CRYPT_WIRE_ONLY_RETRIEVAL                                                      = 0x4
	CRYPT_WRITE                                                                    = 0x10
	CRYPT_X931_FORMAT                                                              = 0x4
	CRYPT_X942_COUNTER_BYTE_LENGTH                                                 = 4
	CRYPT_X942_KEY_LENGTH_BYTE_LENGTH                                              = 4
	CRYPT_X942_PUB_INFO_BYTE_LENGTH                                                = 64
	CRYPT_Y_ONLY                                                                   = 0x1
	CSC_CACHE_AUTO_REINT                                                           = 0x10
	CSC_CACHE_MANUAL_REINT                                                         = 0x00
	CSC_CACHE_NONE                                                                 = 0x30
	CSC_CACHE_VDO                                                                  = 0x20
	CSC_MASK                                                                       = 0x30
	CSIDL_ADMINTOOLS                                                               = 0x0030
	CSIDL_ALTSTARTUP                                                               = 0x001d
	CSIDL_APPDATA                                                                  = 0x001a
	CSIDL_BITBUCKET                                                                = 0x000a
	CSIDL_CDBURN_AREA                                                              = 0x003b
	CSIDL_COMMON_ADMINTOOLS                                                        = 0x002f
	CSIDL_COMMON_ALTSTARTUP                                                        = 0x001e
	CSIDL_COMMON_APPDATA                                                           = 0x0023
	CSIDL_COMMON_DESKTOPDIRECTORY                                                  = 0x0019
	CSIDL_COMMON_DOCUMENTS                                                         = 0x002e
	CSIDL_COMMON_FAVORITES                                                         = 0x001f
	CSIDL_COMMON_MUSIC                                                             = 0x0035
	CSIDL_COMMON_OEM_LINKS                                                         = 0x003a
	CSIDL_COMMON_PICTURES                                                          = 0x0036
	CSIDL_COMMON_PROGRAMS                                                          = 0x0017
	CSIDL_COMMON_STARTMENU                                                         = 0x0016
	CSIDL_COMMON_STARTUP                                                           = 0x0018
	CSIDL_COMMON_TEMPLATES                                                         = 0x002d
	CSIDL_COMMON_VIDEO                                                             = 0x0037
	CSIDL_COMPUTERSNEARME                                                          = 0x003d
	CSIDL_CONNECTIONS                                                              = 0x0031
	CSIDL_CONTROLS                                                                 = 0x0003
	CSIDL_COOKIES                                                                  = 0x0021
	CSIDL_DESKTOP                                                                  = 0x0000
	CSIDL_DESKTOPDIRECTORY                                                         = 0x0010
	CSIDL_DRIVES                                                                   = 0x0011
	CSIDL_FAVORITES                                                                = 0x0006
	CSIDL_FLAG_CREATE                                                              = 0x8000
	CSIDL_FLAG_DONT_UNEXPAND                                                       = 0x2000
	CSIDL_FLAG_DONT_VERIFY                                                         = 0x4000
	CSIDL_FLAG_MASK                                                                = 0xff00
	CSIDL_FLAG_NO_ALIAS                                                            = 0x1000
	CSIDL_FLAG_PER_USER_INIT                                                       = 0x0800
	CSIDL_FLAG_PFTI_TRACKTARGET                                                    = 16384
	CSIDL_FONTS                                                                    = 0x0014
	CSIDL_HISTORY                                                                  = 0x0022
	CSIDL_INTERNET                                                                 = 0x0001
	CSIDL_INTERNET_CACHE                                                           = 0x0020
	CSIDL_LOCAL_APPDATA                                                            = 0x001c
	CSIDL_MYDOCUMENTS                                                              = 5
	CSIDL_MYMUSIC                                                                  = 0x000d
	CSIDL_MYPICTURES                                                               = 0x0027
	CSIDL_MYVIDEO                                                                  = 0x000e
	CSIDL_NETHOOD                                                                  = 0x0013
	CSIDL_NETWORK                                                                  = 0x0012
	CSIDL_PERSONAL                                                                 = 0x0005
	CSIDL_PRINTERS                                                                 = 0x0004
	CSIDL_PRINTHOOD                                                                = 0x001b
	CSIDL_PROFILE                                                                  = 0x0028
	CSIDL_PROGRAMS                                                                 = 0x0002
	CSIDL_PROGRAM_FILES                                                            = 0x0026
	CSIDL_PROGRAM_FILESX86                                                         = 0x002a
	CSIDL_PROGRAM_FILES_COMMON                                                     = 0x002b
	CSIDL_PROGRAM_FILES_COMMONX86                                                  = 0x002c
	CSIDL_RECENT                                                                   = 0x0008
	CSIDL_RESOURCES                                                                = 0x0038
	CSIDL_RESOURCES_LOCALIZED                                                      = 0x0039
	CSIDL_SENDTO                                                                   = 0x0009
	CSIDL_STARTMENU                                                                = 0x000b
	CSIDL_STARTUP                                                                  = 0x0007
	CSIDL_SYSTEM                                                                   = 0x0025
	CSIDL_SYSTEMX86                                                                = 0x0029
	CSIDL_TEMPLATES                                                                = 0x0015
	CSIDL_WINDOWS                                                                  = 0x0024
	CTL_ANY_SUBJECT_TYPE                                                           = 1
	CTL_CERT_SUBJECT_TYPE                                                          = 2
	CTL_ENTRY_FROM_PROP_CHAIN_FLAG                                                 = 0x1
	CTL_FIND_ANY                                                                   = 0
	CTL_FIND_EXISTING                                                              = 5
	CTL_FIND_MD5_HASH                                                              = 2
	CTL_FIND_NO_LIST_ID_CBDATA                                                     = 0xffffffff
	CTL_FIND_SAME_USAGE_FLAG                                                       = 0x1
	CTL_FIND_SHA1_HASH                                                             = 1
	CTL_FIND_SUBJECT                                                               = 4
	CTL_FIND_USAGE                                                                 = 3
	CTL_V1                                                                         = 0
	CUR_BLOB_VERSION                                                               = 2
	CWCSTORAGENAME                                                                 = 32
	CWMO_MAX_HANDLES                                                               = 56
	DATETIMEPICK_CLASSA                                                            = "SysDateTimePick32"
	DA_ERR                                                                         = -1
	DA_LAST                                                                        = 2147483647
	DBC_GS_IDEAL                                                                   = 0
	DBC_GS_SIZEDOWN                                                                = 1
	DBC_HIDE                                                                       = 0
	DBC_SHOW                                                                       = 1
	DBC_SHOWOBSCURE                                                                = 2
	DBIF_VIEWMODE_FLOATING                                                         = 0x0002
	DBIF_VIEWMODE_NORMAL                                                           = 0x0000
	DBIF_VIEWMODE_TRANSPARENT                                                      = 0x0004
	DBIF_VIEWMODE_VERTICAL                                                         = 0x0001
	DBIMF_ADDTOFRONT                                                               = 0x0200
	DBIMF_BKCOLOR                                                                  = 0x0040
	DBIMF_BREAK                                                                    = 0x0100
	DBIMF_DEBOSSED                                                                 = 0x0020
	DBIMF_FIXED                                                                    = 0x0001
	DBIMF_FIXEDBMP                                                                 = 0x0004
	DBIMF_NORMAL                                                                   = 0x0000
	DBIMF_TOPALIGN                                                                 = 0x0400
	DBIMF_UNDELETEABLE                                                             = 0x0010
	DBIMF_USECHEVRON                                                               = 0x0080
	DBIMF_VARIABLEHEIGHT                                                           = 0x0008
	DBIM_ACTUAL                                                                    = 0x0008
	DBIM_BKCOLOR                                                                   = 0x0040
	DBIM_INTEGRAL                                                                  = 0x0004
	DBIM_MAXSIZE                                                                   = 0x0002
	DBIM_MINSIZE                                                                   = 0x0001
	DBIM_MODEFLAGS                                                                 = 0x0020
	DBIM_TITLE                                                                     = 0x0010
	DCE_C_ERROR_STRING_LEN                                                         = 256
	DCOMSCM_ACTIVATION_DISALLOW_UNSECURE_CALL                                      = 0x2
	DCOMSCM_ACTIVATION_USE_ALL_AUTHNSERVICES                                       = 0x1
	DCOMSCM_PING_DISALLOW_UNSECURE_CALL                                            = 0x20
	DCOMSCM_PING_USE_MID_AUTHNSERVICE                                              = 0x10
	DCOMSCM_RESOLVE_DISALLOW_UNSECURE_CALL                                         = 0x8
	DCOMSCM_RESOLVE_USE_ALL_AUTHNSERVICES                                          = 0x4
	DD_DEFDRAGDELAY                                                                = 200
	DD_DEFDRAGMINDIST                                                              = 2
	DD_DEFSCROLLDELAY                                                              = 50
	DD_DEFSCROLLINSET                                                              = 11
	DD_DEFSCROLLINTERVAL                                                           = 50
	DEFINDE_LPTYPEINFO                                                             = 0
	DEFINED_DISPID_MEMBERID                                                        = 0
	DEFINED_LPCREATETYPELIB                                                        = 0
	DEFINED_LPDISPATCH                                                             = 0
	DEFINED_LPTYPECOMP                                                             = 0
	DEFINED_LPTYPELIB                                                              = 0
	DEFINE_LPCREATETYPEINFO                                                        = 0
	DEF_MAX_BADPW                                                                  = 0
	DEF_MAX_PWHIST                                                                 = 8
	DEF_MIN_PWLEN                                                                  = 6
	DEF_PWUNIQUENESS                                                               = 5
	DEVLEN                                                                         = 80
	DFM_GETDEFSTATICID                                                             = 14
	DFM_GETHELPTEXT                                                                = 5
	DFM_GETHELPTEXTW                                                               = 11
	DFM_GETVERBA                                                                   = 16
	DFM_GETVERBW                                                                   = 15
	DFM_INVOKECOMMAND                                                              = 2
	DFM_INVOKECOMMANDEX                                                            = 12
	DFM_MAPCOMMANDNAME                                                             = 13
	DFM_MERGECONTEXTMENU                                                           = 1
	DFM_MERGECONTEXTMENU_BOTTOM                                                    = 17
	DFM_MERGECONTEXTMENU_TOP                                                       = 10
	DFM_MODIFYQCMFLAGS                                                             = 18
	DFM_VALIDATECMD                                                                = 9
	DFM_WM_DRAWITEM                                                                = 7
	DFM_WM_INITMENUPOPUP                                                           = 8
	DFM_WM_MEASUREITEM                                                             = 6
	DISABLE_SMART                                                                  = 0xD9
	DISK_BINNING                                                                   = 3
	DISK_LOGGING_DUMP                                                              = 2
	DISK_LOGGING_START                                                             = 0
	DISK_LOGGING_STOP                                                              = 1
	DISPATCH_METHOD                                                                = 0x1
	DISPATCH_PROPERTYGET                                                           = 0x2
	DISPATCH_PROPERTYPUT                                                           = 0x4
	DISPATCH_PROPERTYPUTREF                                                        = 0x8
	DISPID_COLLECT                                                                 = -8
	DISPID_CONSTRUCTOR                                                             = -6
	DISPID_DESTRUCTOR                                                              = -7
	DISPID_EVALUATE                                                                = -5
	DISPID_NEWENUM                                                                 = -4
	DISPID_PROPERTYPUT                                                             = -3
	DISPID_UNKNOWN                                                                 = -1
	DISPID_VALUE                                                                   = 0
	DL_BEGINDRAG                                                                   = 1157
	DL_CANCELDRAG                                                                  = 1160
	DL_COPYCURSOR                                                                  = 2
	DL_CURSORSET                                                                   = 0
	DL_DRAGGING                                                                    = 1158
	DL_DROPPED                                                                     = 1159
	DL_MOVECURSOR                                                                  = 3
	DL_STOPCURSOR                                                                  = 1
	DNLEN                                                                          = 15
	DPAMM_DELETE                                                                   = 2
	DPAMM_INSERT                                                                   = 3
	DPAMM_MERGE                                                                    = 1
	DPAM_INTERSECT                                                                 = 0x8
	DPAM_NORMAL                                                                    = 0x2
	DPAM_SORTED                                                                    = 0x1
	DPAM_UNION                                                                     = 0x4
	DPAS_INSERTAFTER                                                               = 0x4
	DPAS_INSERTBEFORE                                                              = 0x2
	DPAS_SORTED                                                                    = 0x1
	DPA_APPEND                                                                     = 2147483647
	DPA_ERR                                                                        = -1
	DROPEFFECT_COPY                                                                = 1
	DROPEFFECT_LINK                                                                = 4
	DROPEFFECT_MOVE                                                                = 2
	DROPEFFECT_NONE                                                                = 0
	DROPEFFECT_SCROLL                                                              = 2147483648
	DSA_APPEND                                                                     = 2147483647
	DSA_ERR                                                                        = -1
	DTM_FIRST                                                                      = 0x1000
	DTM_GETMCCOLOR                                                                 = 4103
	DTM_GETMCFONT                                                                  = 4106
	DTM_GETMONTHCAL                                                                = 4104
	DTM_GETRANGE                                                                   = 4099
	DTM_GETSYSTEMTIME                                                              = 4097
	DTM_SETFORMAT                                                                  = 4101
	DTM_SETFORMATA                                                                 = 4101
	DTM_SETFORMATW                                                                 = 4146
	DTM_SETMCCOLOR                                                                 = 4102
	DTM_SETMCFONT                                                                  = 4105
	DTM_SETRANGE                                                                   = 4100
	DTM_SETSYSTEMTIME                                                              = 4098
	DTN_CLOSEUP                                                                    = 18446744073709550863
	DTN_DATETIMECHANGE                                                             = 18446744073709550857
	DTN_DROPDOWN                                                                   = 18446744073709550862
	DTN_FIRST                                                                      = 18446744073709550876
	DTN_FIRST2                                                                     = 18446744073709550863
	DTN_FORMAT                                                                     = 18446744073709550860
	DTN_FORMATA                                                                    = 18446744073709550860
	DTN_FORMATQUERY                                                                = 18446744073709550861
	DTN_FORMATQUERYA                                                               = 18446744073709550861
	DTN_FORMATQUERYW                                                               = 18446744073709550874
	DTN_FORMATW                                                                    = 18446744073709550873
	DTN_LAST                                                                       = 18446744073709550871
	DTN_LAST2                                                                      = 18446744073709550817
	DTN_USERSTRING                                                                 = 18446744073709550858
	DTN_USERSTRINGA                                                                = 18446744073709550858
	DTN_USERSTRINGW                                                                = 18446744073709550871
	DTN_WMKEYDOWN                                                                  = 18446744073709550859
	DTN_WMKEYDOWNA                                                                 = 18446744073709550859
	DTN_WMKEYDOWNW                                                                 = 18446744073709550872
	DTS_APPCANPARSE                                                                = 0x10
	DTS_LONGDATEFORMAT                                                             = 0x4
	DTS_RIGHTALIGN                                                                 = 0x20
	DTS_SHORTDATECENTURYFORMAT                                                     = 0xc
	DTS_SHORTDATEFORMAT                                                            = 0x0
	DTS_SHOWNONE                                                                   = 0x2
	DTS_TIMEFORMAT                                                                 = 0x9
	DTS_UPDOWN                                                                     = 0x1
	DVASPECT_COPY                                                                  = 3
	DVASPECT_LINK                                                                  = 4
	DVASPECT_SHORTNAME                                                             = 2
	DWFAF_AUTOHIDE                                                                 = 0x10
	DWFAF_GROUP1                                                                   = 0x2
	DWFAF_GROUP2                                                                   = 0x4
	DWFAF_HIDDEN                                                                   = 0x1
	DWFRF_DELETECONFIGDATA                                                         = 0x0001
	DWFRF_NORMAL                                                                   = 0x0000
	ECM_FIRST                                                                      = 0x1500
	EEInfoGCCOM                                                                    = 11
	EEInfoGCFRS                                                                    = 12
	EEInfoNextRecordsMissing                                                       = 2
	EEInfoPreviousRecordsMissing                                                   = 1
	EEInfoUseFileTime                                                              = 4
	ELEMENT_STATUS_ACCESS                                                          = 0x00000008
	ELEMENT_STATUS_AVOLTAG                                                         = 0x20000000
	ELEMENT_STATUS_EXCEPT                                                          = 0x00000004
	ELEMENT_STATUS_EXENAB                                                          = 0x00000010
	ELEMENT_STATUS_FULL                                                            = 0x00000001
	ELEMENT_STATUS_ID_VALID                                                        = 0x00002000
	ELEMENT_STATUS_IMPEXP                                                          = 0x00000002
	ELEMENT_STATUS_INENAB                                                          = 0x00000020
	ELEMENT_STATUS_INVERT                                                          = 0x00400000
	ELEMENT_STATUS_LUN_VALID                                                       = 0x00001000
	ELEMENT_STATUS_NOT_BUS                                                         = 0x00008000
	ELEMENT_STATUS_PRODUCT_DATA                                                    = 0x00000040
	ELEMENT_STATUS_PVOLTAG                                                         = 0x10000000
	ELEMENT_STATUS_SVALID                                                          = 0x00800000
	EMBDHLP_CREATENOW                                                              = 0
	EMBDHLP_DELAYCREATE                                                            = 65536
	EMBDHLP_INPROC_HANDLER                                                         = 0
	EMBDHLP_INPROC_SERVER                                                          = 1
	EM_GETCUEBANNER                                                                = 5378
	EM_HIDEBALLOONTIP                                                              = 5380
	EM_NOSETFOCUS                                                                  = 5383
	EM_SETCUEBANNER                                                                = 5377
	EM_SHOWBALLOONTIP                                                              = 5379
	EM_TAKEFOCUS                                                                   = 5384
	ENABLE_DISABLE_AUTOSAVE                                                        = 0xD2
	ENABLE_DISABLE_AUTO_OFFLINE                                                    = 0xDB
	ENABLE_SMART                                                                   = 0xD8
	ENCRYPTED_PWLEN                                                                = 16
	ENCRYPTION_FORMAT_DEFAULT                                                      = 1
	END_INTERFACE                                                                  = 0
	ERRLOG2_BASE                                                                   = 5700
	ERRLOG_BASE                                                                    = 3100
	ERROR_DRIVE_NOT_INSTALLED                                                      = 0x00000008
	ERROR_INIT_STATUS_NEEDED                                                       = 0x00000011
	ERROR_LABEL_QUESTIONABLE                                                       = 0x00000002
	ERROR_LABEL_UNREADABLE                                                         = 0x00000001
	ERROR_SLOT_NOT_PRESENT                                                         = 0x00000004
	ERROR_TRAY_MALFUNCTION                                                         = 0x00000010
	ERROR_UNHANDLED_ERROR                                                          = 0xFFFFFFFF
	EVLEN                                                                          = 16
	EXECUTE_OFFLINE_DIAGS                                                          = 0xD4
	EXPORT_PRIVATE_KEYS                                                            = 0x4
	EXPO_OFFLOAD_FUNC_NAME                                                         = "OffloadModExpo"
	EXPO_OFFLOAD_REG_VALUE                                                         = "ExpoOffload"
	EXP_DARWIN_ID_SIG                                                              = 0xa0000006
	EXP_SPECIAL_FOLDER_SIG                                                         = 0xa0000005
	EXP_SZ_ICON_SIG                                                                = 0xa0000007
	EXP_SZ_LINK_SIG                                                                = 0xa0000001
	EXTEND_IEPORT                                                                  = 2
	FADF_AUTO                                                                      = 1
	FADF_BSTR                                                                      = 256
	FADF_DISPATCH                                                                  = 1024
	FADF_EMBEDDED                                                                  = 4
	FADF_FIXEDSIZE                                                                 = 16
	FADF_HAVEIID                                                                   = 64
	FADF_HAVEVARTYPE                                                               = 128
	FADF_RECORD                                                                    = 32
	FADF_RESERVED                                                                  = 61448
	FADF_STATIC                                                                    = 2
	FADF_UNKNOWN                                                                   = 512
	FADF_VARIANT                                                                   = 2048
	FARSTRUCT                                                                      = 0
	FCIDM_BROWSERFIRST                                                             = 0xa000
	FCIDM_BROWSERLAST                                                              = 0xbf00
	FCIDM_GLOBALFIRST                                                              = 0x8000
	FCIDM_GLOBALLAST                                                               = 0x9fff
	FCIDM_MENU_EDIT                                                                = 32832
	FCIDM_MENU_EXPLORE                                                             = 33104
	FCIDM_MENU_FAVORITES                                                           = 33136
	FCIDM_MENU_FILE                                                                = 32768
	FCIDM_MENU_FIND                                                                = 33088
	FCIDM_MENU_HELP                                                                = 33024
	FCIDM_MENU_TOOLS                                                               = 32960
	FCIDM_MENU_TOOLS_SEP_GOTO                                                      = 32961
	FCIDM_MENU_VIEW                                                                = 32896
	FCIDM_MENU_VIEW_SEP_OPTIONS                                                    = 32897
	FCIDM_SHVIEWFIRST                                                              = 0x0000
	FCIDM_SHVIEWLAST                                                               = 0x7fff
	FCIDM_STATUS                                                                   = 40961
	FCIDM_TOOLBAR                                                                  = 40960
	FCSM_CLSID                                                                     = 0x00000008
	FCSM_FLAGS                                                                     = 0x00000040
	FCSM_ICONFILE                                                                  = 0x00000010
	FCSM_INFOTIP                                                                   = 0x00000004
	FCSM_LOGO                                                                      = 0x00000020
	FCSM_VIEWID                                                                    = 0x00000001
	FCSM_WEBVIEWTEMPLATE                                                           = 0x00000002
	FCS_FLAG_DRAGDROP                                                              = 2
	FCS_FORCEWRITE                                                                 = 0x00000002
	FCS_READ                                                                       = 0x00000001
	FCS_WRITE                                                                      = 3
	FCT_ADDTOEND                                                                   = 0x0004
	FCT_CONFIGABLE                                                                 = 0x0002
	FCT_MERGE                                                                      = 0x0001
	FCW_INTERNETBAR                                                                = 0x0006
	FCW_PROGRESS                                                                   = 0x0008
	FCW_STATUS                                                                     = 0x0001
	FCW_TOOLBAR                                                                    = 0x0002
	FCW_TREE                                                                       = 0x0003
	FIEF_FLAG_FORCE_JITUI                                                          = 0x1
	FIEF_FLAG_PEEK                                                                 = 0x2
	FIEF_FLAG_SKIP_INSTALLED_VERSION_CHECK                                         = 0x4
	FILESYSTEM_STATISTICS_TYPE_FAT                                                 = 2
	FILESYSTEM_STATISTICS_TYPE_NTFS                                                = 1
	FILE_ANY_ACCESS                                                                = 0
	FILE_CLEAR_ENCRYPTION                                                          = 0x00000002
	FILE_DEVICE_8042_PORT                                                          = 0x00000027
	FILE_DEVICE_ACPI                                                               = 0x00000032
	FILE_DEVICE_BATTERY                                                            = 0x00000029
	FILE_DEVICE_BEEP                                                               = 0x00000001
	FILE_DEVICE_BIOMETRIC                                                          = 0x00000044
	FILE_DEVICE_BLUETOOTH                                                          = 0x00000041
	FILE_DEVICE_BUS_EXTENDER                                                       = 0x0000002a
	FILE_DEVICE_CD_ROM                                                             = 0x00000002
	FILE_DEVICE_CD_ROM_FILE_SYSTEM                                                 = 0x00000003
	FILE_DEVICE_CHANGER                                                            = 0x00000030
	FILE_DEVICE_CONSOLE                                                            = 0x00000050
	FILE_DEVICE_CONTROLLER                                                         = 0x00000004
	FILE_DEVICE_CRYPT_PROVIDER                                                     = 0x0000003F
	FILE_DEVICE_DATALINK                                                           = 0x00000005
	FILE_DEVICE_DEVAPI                                                             = 0x00000047
	FILE_DEVICE_DFS                                                                = 0x00000006
	FILE_DEVICE_DFS_FILE_SYSTEM                                                    = 0x00000035
	FILE_DEVICE_DFS_VOLUME                                                         = 0x00000036
	FILE_DEVICE_DISK                                                               = 0x00000007
	FILE_DEVICE_DISK_FILE_SYSTEM                                                   = 0x00000008
	FILE_DEVICE_DVD                                                                = 0x00000033
	FILE_DEVICE_EHSTOR                                                             = 0x00000046
	FILE_DEVICE_FILE_SYSTEM                                                        = 0x00000009
	FILE_DEVICE_FIPS                                                               = 0x0000003A
	FILE_DEVICE_FULLSCREEN_VIDEO                                                   = 0x00000034
	FILE_DEVICE_GPIO                                                               = 0x00000048
	FILE_DEVICE_HOLOGRAPHIC                                                        = 0x0000005b
	FILE_DEVICE_INFINIBAND                                                         = 0x0000003B
	FILE_DEVICE_INPORT_PORT                                                        = 0x0000000a
	FILE_DEVICE_KEYBOARD                                                           = 0x0000000b
	FILE_DEVICE_KS                                                                 = 0x0000002f
	FILE_DEVICE_KSEC                                                               = 0x00000039
	FILE_DEVICE_MAILSLOT                                                           = 0x0000000c
	FILE_DEVICE_MASS_STORAGE                                                       = 0x0000002d
	FILE_DEVICE_MIDI_IN                                                            = 0x0000000d
	FILE_DEVICE_MIDI_OUT                                                           = 0x0000000e
	FILE_DEVICE_MODEM                                                              = 0x0000002b
	FILE_DEVICE_MOUSE                                                              = 0x0000000f
	FILE_DEVICE_MT_COMPOSITE                                                       = 0x00000042
	FILE_DEVICE_MT_TRANSPORT                                                       = 0x00000043
	FILE_DEVICE_MULTI_UNC_PROVIDER                                                 = 0x00000010
	FILE_DEVICE_NAMED_PIPE                                                         = 0x00000011
	FILE_DEVICE_NETWORK                                                            = 0x00000012
	FILE_DEVICE_NETWORK_BROWSER                                                    = 0x00000013
	FILE_DEVICE_NETWORK_FILE_SYSTEM                                                = 0x00000014
	FILE_DEVICE_NETWORK_REDIRECTOR                                                 = 0x00000028
	FILE_DEVICE_NFP                                                                = 0x00000051
	FILE_DEVICE_NULL                                                               = 0x00000015
	FILE_DEVICE_NVDIMM                                                             = 0x0000005a
	FILE_DEVICE_PARALLEL_PORT                                                      = 0x00000016
	FILE_DEVICE_PERSISTENT_MEMORY                                                  = 0x00000059
	FILE_DEVICE_PHYSICAL_NETCARD                                                   = 0x00000017
	FILE_DEVICE_PMI                                                                = 0x00000045
	FILE_DEVICE_POINT_OF_SERVICE                                                   = 0x00000054
	FILE_DEVICE_PRINTER                                                            = 0x00000018
	FILE_DEVICE_SCANNER                                                            = 0x00000019
	FILE_DEVICE_SCREEN                                                             = 0x0000001c
	FILE_DEVICE_SDFXHCI                                                            = 0x0000005c
	FILE_DEVICE_SERENUM                                                            = 0x00000037
	FILE_DEVICE_SERIAL_MOUSE_PORT                                                  = 0x0000001a
	FILE_DEVICE_SERIAL_PORT                                                        = 0x0000001b
	FILE_DEVICE_SMARTCARD                                                          = 0x00000031
	FILE_DEVICE_SMB                                                                = 0x0000002e
	FILE_DEVICE_SOUND                                                              = 0x0000001d
	FILE_DEVICE_STORAGE_REPLICATION                                                = 0x00000055
	FILE_DEVICE_STREAMS                                                            = 0x0000001e
	FILE_DEVICE_SYSENV                                                             = 0x00000052
	FILE_DEVICE_TAPE                                                               = 0x0000001f
	FILE_DEVICE_TAPE_FILE_SYSTEM                                                   = 0x00000020
	FILE_DEVICE_TERMSRV                                                            = 0x00000038
	FILE_DEVICE_TRANSPORT                                                          = 0x00000021
	FILE_DEVICE_TRUST_ENV                                                          = 0x00000056
	FILE_DEVICE_UCM                                                                = 0x00000057
	FILE_DEVICE_UCMTCPCI                                                           = 0x00000058
	FILE_DEVICE_UCMUCSI                                                            = 0x0000005d
	FILE_DEVICE_UNKNOWN                                                            = 0x00000022
	FILE_DEVICE_USBEX                                                              = 0x00000049
	FILE_DEVICE_VDM                                                                = 0x0000002c
	FILE_DEVICE_VIDEO                                                              = 0x00000023
	FILE_DEVICE_VIRTUAL_BLOCK                                                      = 0x00000053
	FILE_DEVICE_VIRTUAL_DISK                                                       = 0x00000024
	FILE_DEVICE_VMBUS                                                              = 0x0000003E
	FILE_DEVICE_WAVE_IN                                                            = 0x00000025
	FILE_DEVICE_WAVE_OUT                                                           = 0x00000026
	FILE_DEVICE_WPD                                                                = 0x00000040
	FILE_PREFETCH_TYPE_FOR_CREATE                                                  = 0x1
	FILE_READ_ACCESS                                                               = 1
	FILE_SET_ENCRYPTION                                                            = 0x00000001
	FILE_SPECIAL_ACCESS                                                            = 0
	FILE_WRITE_ACCESS                                                              = 2
	FILTER_INTERDOMAIN_TRUST_ACCOUNT                                               = 8
	FILTER_NORMAL_ACCOUNT                                                          = 2
	FILTER_SERVER_TRUST_ACCOUNT                                                    = 32
	FILTER_TEMP_DUPLICATE_ACCOUNT                                                  = 1
	FILTER_WORKSTATION_TRUST_ACCOUNT                                               = 16
	FLAG_ASSUME_COMP_WQLFILTER_TRUE                                                = 0x02000000
	FLAG_ASSUME_SLOW_LINK                                                          = 0x20000000
	FLAG_ASSUME_USER_WQLFILTER_TRUE                                                = 0x04000000
	FLAG_FORCE_CREATENAMESPACE                                                     = 0x00000004
	FLAG_LOOPBACK_MERGE                                                            = 0x10000000
	FLAG_LOOPBACK_REPLACE                                                          = 0x08000000
	FLAG_NO_COMPUTER                                                               = 0x00000002
	FLAG_NO_CSE_INVOKE                                                             = 0x40000000
	FLAG_NO_GPO_FILTER                                                             = 0x80000000
	FLAG_NO_USER                                                                   = 0x00000001
	FLAG_PLANNING_MODE                                                             = 0x01000000
	FMFD_DEFAULT                                                                   = 0x0
	FMFD_RESPECTTEXTPLAIN                                                          = 0x10
	FMFD_RETURNUPDATEDIMGMIMES                                                     = 0x20
	FMFD_SERVERMIME                                                                = 0x8
	FMFD_URLASFILENAME                                                             = 0x1
	FSB_ENCARTA_MODE                                                               = 1
	FSB_FLAT_MODE                                                                  = 2
	FSB_REGULAR_MODE                                                               = 0
	FSCTL_ALLOW_EXTENDED_DASD_IO                                                   = 589955
	FSCTL_CREATE_OR_GET_OBJECT_ID                                                  = 590016
	FSCTL_CREATE_USN_JOURNAL                                                       = 590055
	FSCTL_DELETE_OBJECT_ID                                                         = 589984
	FSCTL_DELETE_REPARSE_POINT                                                     = 589996
	FSCTL_DELETE_USN_JOURNAL                                                       = 590072
	FSCTL_DISMOUNT_VOLUME                                                          = 589856
	FSCTL_ENCRYPTION_FSCTL_IO                                                      = 590043
	FSCTL_ENUM_USN_DATA                                                            = 590003
	FSCTL_EXTEND_VOLUME                                                            = 590064
	FSCTL_FILESYSTEM_GET_STATISTICS                                                = 589920
	FSCTL_FILE_PREFETCH                                                            = 590112
	FSCTL_FIND_FILES_BY_SID                                                        = 589967
	FSCTL_GET_COMPRESSION                                                          = 589884
	FSCTL_GET_NTFS_FILE_RECORD                                                     = 589928
	FSCTL_GET_NTFS_VOLUME_DATA                                                     = 589924
	FSCTL_GET_OBJECT_ID                                                            = 589980
	FSCTL_GET_REPARSE_POINT                                                        = 589992
	FSCTL_GET_RETRIEVAL_POINTERS                                                   = 589939
	FSCTL_GET_VOLUME_BITMAP                                                        = 589935
	FSCTL_HSM_DATA                                                                 = 639251
	FSCTL_HSM_MSG                                                                  = 639240
	FSCTL_INVALIDATE_VOLUMES                                                       = 589908
	FSCTL_IS_PATHNAME_VALID                                                        = 589868
	FSCTL_IS_VOLUME_DIRTY                                                          = 589944
	FSCTL_IS_VOLUME_MOUNTED                                                        = 589864
	FSCTL_LOCK_VOLUME                                                              = 589848
	FSCTL_MARK_AS_SYSTEM_HIVE                                                      = 589903
	FSCTL_MARK_HANDLE                                                              = 590076
	FSCTL_MARK_VOLUME_DIRTY                                                        = 589872
	FSCTL_MOVE_FILE                                                                = 589940
	FSCTL_OPBATCH_ACK_CLOSE_PENDING                                                = 589840
	FSCTL_OPLOCK_BREAK_ACKNOWLEDGE                                                 = 589836
	FSCTL_OPLOCK_BREAK_ACK_NO_2                                                    = 589904
	FSCTL_OPLOCK_BREAK_NOTIFY                                                      = 589844
	FSCTL_QUERY_ALLOCATED_RANGES                                                   = 606415
	FSCTL_QUERY_FAT_BPB                                                            = 589912
	FSCTL_QUERY_RETRIEVAL_POINTERS                                                 = 589883
	FSCTL_QUERY_USN_JOURNAL                                                        = 590068
	FSCTL_READ_FILE_USN_DATA                                                       = 590059
	FSCTL_READ_FROM_PLEX                                                           = 606494
	FSCTL_READ_RAW_ENCRYPTED                                                       = 590051
	FSCTL_READ_USN_JOURNAL                                                         = 590011
	FSCTL_RECALL_FILE                                                              = 590103
	FSCTL_REQUEST_BATCH_OPLOCK                                                     = 589832
	FSCTL_REQUEST_FILTER_OPLOCK                                                    = 589916
	FSCTL_REQUEST_OPLOCK_LEVEL_1                                                   = 589824
	FSCTL_REQUEST_OPLOCK_LEVEL_2                                                   = 589828
	FSCTL_SECURITY_ID_CHECK                                                        = 606391
	FSCTL_SET_COMPRESSION                                                          = 639040
	FSCTL_SET_ENCRYPTION                                                           = 590039
	FSCTL_SET_OBJECT_ID                                                            = 589976
	FSCTL_SET_OBJECT_ID_EXTENDED                                                   = 590012
	FSCTL_SET_REPARSE_POINT                                                        = 589988
	FSCTL_SET_SPARSE                                                               = 590020
	FSCTL_SET_ZERO_DATA                                                            = 622792
	FSCTL_SIS_COPYFILE                                                             = 590080
	FSCTL_SIS_LINK_FILES                                                           = 639236
	FSCTL_UNLOCK_VOLUME                                                            = 589852
	FSCTL_WRITE_RAW_ENCRYPTED                                                      = 590047
	FSCTL_WRITE_USN_CLOSE_RECORD                                                   = 590063
	GCS_HELPTEXT                                                                   = 1
	GCS_HELPTEXTA                                                                  = 0x1
	GCS_HELPTEXTW                                                                  = 0x5
	GCS_UNICODE                                                                    = 0x4
	GCS_VALIDATE                                                                   = 2
	GCS_VALIDATEA                                                                  = 0x2
	GCS_VALIDATEW                                                                  = 0x6
	GCS_VERB                                                                       = 0
	GCS_VERBA                                                                      = 0x0
	GCS_VERBICONW                                                                  = 0x14
	GCS_VERBW                                                                      = 0x4
	GDTR_MAX                                                                       = 0x2
	GDTR_MIN                                                                       = 0x1
	GDT_ERROR                                                                      = -1
	GDT_NONE                                                                       = 1
	GDT_VALID                                                                      = 0
	GETPROPS_NONE                                                                  = 0x0000
	GIL_ASYNC                                                                      = 0x20
	GIL_CHECKSHIELD                                                                = 0x200
	GIL_DEFAULTICON                                                                = 0x40
	GIL_DONTCACHE                                                                  = 0x10
	GIL_FORCENOSHIELD                                                              = 0x400
	GIL_FORSHELL                                                                   = 0x2
	GIL_FORSHORTCUT                                                                = 0x80
	GIL_NOTFILENAME                                                                = 0x8
	GIL_OPENICON                                                                   = 0x1
	GIL_PERCLASS                                                                   = 0x4
	GIL_PERINSTANCE                                                                = 0x2
	GIL_SHIELD                                                                     = 0x200
	GIL_SIMULATEDOC                                                                = 0x1
	GMR_DAYSTATE                                                                   = 1
	GMR_VISIBLE                                                                    = 0
	GNLEN                                                                          = 256
	GPC_BLOCK_POLICY                                                               = 0x00000001
	GPO_FLAG_DISABLE                                                               = 0x00000001
	GPO_FLAG_FORCE                                                                 = 0x00000002
	GPO_INFO_FLAG_ASYNC_FOREGROUND                                                 = 0x00001000
	GPO_INFO_FLAG_BACKGROUND                                                       = 0x00000010
	GPO_INFO_FLAG_FORCED_REFRESH                                                   = 0x00000400
	GPO_INFO_FLAG_LINKTRANSITION                                                   = 0x00000100
	GPO_INFO_FLAG_LOGRSOP_TRANSITION                                               = 0x00000200
	GPO_INFO_FLAG_MACHINE                                                          = 0x00000001
	GPO_INFO_FLAG_NOCHANGES                                                        = 0x00000080
	GPO_INFO_FLAG_SAFEMODE_BOOT                                                    = 0x00000800
	GPO_INFO_FLAG_SLOWLINK                                                         = 0x00000020
	GPO_INFO_FLAG_VERBOSE                                                          = 0x00000040
	GPO_LIST_FLAG_MACHINE                                                          = 0x00000001
	GPO_LIST_FLAG_NO_SECURITYFILTERS                                               = 0x00000008
	GPO_LIST_FLAG_NO_WMIFILTERS                                                    = 0x00000004
	GPO_LIST_FLAG_SITEONLY                                                         = 0x00000002
	GPT_ATTRIBUTE_PLATFORM_REQUIRED                                                = 1
	GPT_BASIC_DATA_ATTRIBUTE_HIDDEN                                                = 4611686018427387904
	GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER                                       = 9223372036854775808
	GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY                                             = 1152921504606846976
	GPT_BASIC_DATA_ATTRIBUTE_SHADOW_COPY                                           = 2305843009213693952
	GROUPIDMASK                                                                    = 0x8000
	GROUP_ALL_INFOLEVEL                                                            = 1000
	GROUP_ALL_PARMNUM                                                              = 0
	GROUP_ATTRIBUTES_INFOLEVEL                                                     = 1003
	GROUP_ATTRIBUTES_PARMNUM                                                       = 3
	GROUP_COMMENT_INFOLEVEL                                                        = 1002
	GROUP_COMMENT_PARMNUM                                                          = 2
	GROUP_NAME_INFOLEVEL                                                           = 1001
	GROUP_NAME_PARMNUM                                                             = 1
	GUIDSTRING_MAX                                                                 = 39
	HCRYPTPROV_DEFINED                                                             = 0
	HDFT_HASNOVALUE                                                                = 0x8000
	HDFT_ISDATE                                                                    = 0x2
	HDFT_ISNUMBER                                                                  = 0x1
	HDFT_ISSTRING                                                                  = 0x0
	HDF_BITMAP                                                                     = 0x2000
	HDF_BITMAP_ON_RIGHT                                                            = 0x1000
	HDF_CENTER                                                                     = 0x2
	HDF_IMAGE                                                                      = 0x800
	HDF_JUSTIFYMASK                                                                = 0x3
	HDF_LEFT                                                                       = 0x0
	HDF_OWNERDRAW                                                                  = 0x8000
	HDF_RIGHT                                                                      = 0x1
	HDF_RTLREADING                                                                 = 0x4
	HDF_SORTDOWN                                                                   = 0x200
	HDF_SORTUP                                                                     = 0x400
	HDF_STRING                                                                     = 0x4000
	HDI_BITMAP                                                                     = 0x10
	HDI_DI_SETITEM                                                                 = 0x40
	HDI_FILTER                                                                     = 0x100
	HDI_FORMAT                                                                     = 0x4
	HDI_HEIGHT                                                                     = 1
	HDI_IMAGE                                                                      = 0x20
	HDI_LPARAM                                                                     = 0x8
	HDI_ORDER                                                                      = 0x80
	HDI_TEXT                                                                       = 0x2
	HDI_WIDTH                                                                      = 0x1
	HDM_CLEARFILTER                                                                = 4632
	HDM_CREATEDRAGIMAGE                                                            = 4624
	HDM_DELETEITEM                                                                 = 4610
	HDM_EDITFILTER                                                                 = 4631
	HDM_FIRST                                                                      = 0x1200
	HDM_GETBITMAPMARGIN                                                            = 4629
	HDM_GETIMAGELIST                                                               = 4617
	HDM_GETITEM                                                                    = 4611
	HDM_GETITEMA                                                                   = 4611
	HDM_GETITEMCOUNT                                                               = 4608
	HDM_GETITEMRECT                                                                = 4615
	HDM_GETITEMW                                                                   = 4619
	HDM_GETORDERARRAY                                                              = 4625
	HDM_GETUNICODEFORMAT                                                           = 8198
	HDM_HITTEST                                                                    = 4614
	HDM_INSERTITEM                                                                 = 4609
	HDM_INSERTITEMA                                                                = 4609
	HDM_INSERTITEMW                                                                = 4618
	HDM_LAYOUT                                                                     = 4613
	HDM_ORDERTOINDEX                                                               = 4623
	HDM_SETBITMAPMARGIN                                                            = 4628
	HDM_SETFILTERCHANGETIMEOUT                                                     = 4630
	HDM_SETHOTDIVIDER                                                              = 4627
	HDM_SETIMAGELIST                                                               = 4616
	HDM_SETITEM                                                                    = 4612
	HDM_SETITEMA                                                                   = 4612
	HDM_SETITEMW                                                                   = 4620
	HDM_SETORDERARRAY                                                              = 4626
	HDM_SETUNICODEFORMAT                                                           = 8197
	HDN_BEGINDRAG                                                                  = 18446744073709551306
	HDN_BEGINFILTEREDIT                                                            = 18446744073709551302
	HDN_BEGINTRACK                                                                 = 18446744073709551310
	HDN_BEGINTRACKA                                                                = 18446744073709551310
	HDN_BEGINTRACKW                                                                = 18446744073709551290
	HDN_DIVIDERDBLCLICK                                                            = 18446744073709551311
	HDN_DIVIDERDBLCLICKA                                                           = 18446744073709551311
	HDN_DIVIDERDBLCLICKW                                                           = 18446744073709551291
	HDN_ENDDRAG                                                                    = 18446744073709551305
	HDN_ENDFILTEREDIT                                                              = 18446744073709551301
	HDN_ENDTRACK                                                                   = 18446744073709551309
	HDN_ENDTRACKA                                                                  = 18446744073709551309
	HDN_ENDTRACKW                                                                  = 18446744073709551289
	HDN_FILTERBTNCLICK                                                             = 18446744073709551303
	HDN_FILTERCHANGE                                                               = 18446744073709551304
	HDN_FIRST                                                                      = 18446744073709551316
	HDN_GETDISPINFO                                                                = 18446744073709551307
	HDN_GETDISPINFOA                                                               = 18446744073709551307
	HDN_GETDISPINFOW                                                               = 18446744073709551287
	HDN_ITEMCHANGED                                                                = 18446744073709551315
	HDN_ITEMCHANGEDA                                                               = 18446744073709551315
	HDN_ITEMCHANGEDW                                                               = 18446744073709551295
	HDN_ITEMCHANGING                                                               = 18446744073709551316
	HDN_ITEMCHANGINGA                                                              = 18446744073709551316
	HDN_ITEMCHANGINGW                                                              = 18446744073709551296
	HDN_ITEMCLICK                                                                  = 18446744073709551314
	HDN_ITEMCLICKA                                                                 = 18446744073709551314
	HDN_ITEMCLICKW                                                                 = 18446744073709551294
	HDN_ITEMDBLCLICK                                                               = 18446744073709551313
	HDN_ITEMDBLCLICKA                                                              = 18446744073709551313
	HDN_ITEMDBLCLICKW                                                              = 18446744073709551293
	HDN_LAST                                                                       = 18446744073709551217
	HDN_TRACK                                                                      = 18446744073709551308
	HDN_TRACKA                                                                     = 18446744073709551308
	HDN_TRACKW                                                                     = 18446744073709551288
	HDSIL_NORMAL                                                                   = 0
	HDSIL_STATE                                                                    = 1
	HDS_BUTTONS                                                                    = 0x2
	HDS_DRAGDROP                                                                   = 0x40
	HDS_FILTERBAR                                                                  = 0x100
	HDS_FLAT                                                                       = 0x200
	HDS_FULLDRAG                                                                   = 0x80
	HDS_HIDDEN                                                                     = 0x8
	HDS_HORZ                                                                       = 0x0
	HDS_HOTTRACK                                                                   = 0x4
	HHT_ABOVE                                                                      = 0x100
	HHT_BELOW                                                                      = 0x200
	HHT_NOWHERE                                                                    = 0x1
	HHT_ONDIVIDER                                                                  = 0x4
	HHT_ONDIVOPEN                                                                  = 0x8
	HHT_ONFILTER                                                                   = 0x10
	HHT_ONFILTERBUTTON                                                             = 0x20
	HHT_ONHEADER                                                                   = 0x2
	HHT_TOLEFT                                                                     = 0x800
	HHT_TORIGHT                                                                    = 0x400
	HICF_ACCELERATOR                                                               = 0x4
	HICF_ARROWKEYS                                                                 = 0x2
	HICF_DUPACCEL                                                                  = 0x8
	HICF_ENTERING                                                                  = 0x10
	HICF_LEAVING                                                                   = 0x20
	HICF_LMOUSE                                                                    = 0x80
	HICF_MOUSE                                                                     = 0x1
	HICF_OTHER                                                                     = 0x0
	HICF_RESELECT                                                                  = 0x40
	HICF_TOGGLEDROPDOWN                                                            = 0x100
	HIST_ADDTOFAVORITES                                                            = 3
	HIST_BACK                                                                      = 0
	HIST_FAVORITES                                                                 = 2
	HIST_FORWARD                                                                   = 1
	HIST_NO_OF_BUCKETS                                                             = 24
	HIST_VIEWTREE                                                                  = 4
	HKCOMB_A                                                                       = 0x8
	HKCOMB_C                                                                       = 0x4
	HKCOMB_CA                                                                      = 0x40
	HKCOMB_NONE                                                                    = 0x1
	HKCOMB_S                                                                       = 0x2
	HKCOMB_SA                                                                      = 0x20
	HKCOMB_SC                                                                      = 0x10
	HKCOMB_SCA                                                                     = 0x80
	HKM_GETHOTKEY                                                                  = 1026
	HKM_SETHOTKEY                                                                  = 1025
	HKM_SETRULES                                                                   = 1027
	HOTKEYF_ALT                                                                    = 0x4
	HOTKEYF_CONTROL                                                                = 0x2
	HOTKEYF_EXT                                                                    = 0x8
	HOTKEYF_SHIFT                                                                  = 0x1
	HOTKEY_CLASSA                                                                  = "msctls_hotkey32"
	HPSXA_DEFINED                                                                  = 0
	HP_ALGID                                                                       = 0x1
	HP_HASHSIZE                                                                    = 0x4
	HP_HASHVAL                                                                     = 0x2
	HP_HMAC_INFO                                                                   = 0x5
	HP_TLS1PRF_LABEL                                                               = 0x6
	HP_TLS1PRF_SEED                                                                = 0x7
	HUGEP                                                                          = 0
	ICC_ANIMATE_CLASS                                                              = 0x80
	ICC_BAR_CLASSES                                                                = 0x4
	ICC_COOL_CLASSES                                                               = 0x400
	ICC_DATE_CLASSES                                                               = 0x100
	ICC_HOTKEY_CLASS                                                               = 0x40
	ICC_INTERNET_CLASSES                                                           = 0x800
	ICC_LINK_CLASS                                                                 = 0x8000
	ICC_LISTVIEW_CLASSES                                                           = 0x1
	ICC_NATIVEFNTCTL_CLASS                                                         = 0x2000
	ICC_PAGESCROLLER_CLASS                                                         = 0x1000
	ICC_PROGRESS_CLASS                                                             = 0x20
	ICC_STANDARD_CLASSES                                                           = 0x4000
	ICC_TAB_CLASSES                                                                = 0x8
	ICC_TREEVIEW_CLASSES                                                           = 0x2
	ICC_UPDOWN_CLASS                                                               = 0x10
	ICC_USEREX_CLASSES                                                             = 0x200
	ICC_WIN95_CLASSES                                                              = 0xff
	IDB_HIST_LARGE_COLOR                                                           = 9
	IDB_HIST_SMALL_COLOR                                                           = 8
	IDB_STD_LARGE_COLOR                                                            = 1
	IDB_STD_SMALL_COLOR                                                            = 0
	IDB_VIEW_LARGE_COLOR                                                           = 5
	IDB_VIEW_SMALL_COLOR                                                           = 4
	IDC_OFFLINE_HAND                                                               = 103
	IDD_WIZEXTN_FIRST                                                              = 0x5000
	IDD_WIZEXTN_LAST                                                               = 0x5100
	IDENTIFY_BUFFER_SIZE                                                           = 512
	IDLFLAG_FIN                                                                    = 1
	IDLFLAG_FLCID                                                                  = 4
	IDLFLAG_FOUT                                                                   = 2
	IDLFLAG_FRETVAL                                                                = 8
	IDLFLAG_NONE                                                                   = 0
	IDO_SHGIOI_DEFAULT                                                             = 0x0fffffffc
	IDO_SHGIOI_LINK                                                                = 0x0ffffffe
	IDO_SHGIOI_SHARE                                                               = 0x0fffffff
	IDO_SHGIOI_SLOWFILE                                                            = 0x0fffffffd
	ID_CMD                                                                         = 0xEC
	ID_DEFAULTINST                                                                 = -2
	ID_PSREBOOTSYSTEM                                                              = 3
	ID_PSRESTARTWINDOWS                                                            = 0x2
	IEIFLAG_ASPECT                                                                 = 0x0004
	IEIFLAG_ASYNC                                                                  = 0x0001
	IEIFLAG_CACHE                                                                  = 0x0002
	IEIFLAG_GLEAM                                                                  = 0x0010
	IEIFLAG_NOBORDER                                                               = 0x0100
	IEIFLAG_NOSTAMP                                                                = 0x0080
	IEIFLAG_OFFLINE                                                                = 0x0008
	IEIFLAG_ORIGSIZE                                                               = 0x0040
	IEIFLAG_QUALITY                                                                = 0x0200
	IEIFLAG_REFRESH                                                                = 0x0400
	IEIFLAG_SCREEN                                                                 = 0x0020
	IEIT_PRIORITY_NORMAL                                                           = 268435456
	IEI_PRIORITY_MAX                                                               = 2147483647
	IEI_PRIORITY_MIN                                                               = 0
	IFID_DEFINED                                                                   = 0
	ILCF_MOVE                                                                      = 0x0
	ILCF_SWAP                                                                      = 0x1
	ILC_COLOR                                                                      = 0x0
	ILC_COLOR16                                                                    = 0x10
	ILC_COLOR24                                                                    = 0x18
	ILC_COLOR32                                                                    = 0x20
	ILC_COLOR4                                                                     = 0x4
	ILC_COLOR8                                                                     = 0x8
	ILC_COLORDDB                                                                   = 0xfe
	ILC_MASK                                                                       = 0x1
	ILC_MIRROR                                                                     = 0x2000
	ILC_PALETTE                                                                    = 0x800
	ILC_PERITEMMIRROR                                                              = 0x8000
	ILD_BLEND                                                                      = 4
	ILD_BLEND25                                                                    = 0x2
	ILD_BLEND50                                                                    = 0x4
	ILD_DPISCALE                                                                   = 0x4000
	ILD_FOCUS                                                                      = 2
	ILD_IMAGE                                                                      = 0x20
	ILD_MASK                                                                       = 0x10
	ILD_NORMAL                                                                     = 0x0
	ILD_OVERLAYMASK                                                                = 0xf00
	ILD_PRESERVEALPHA                                                              = 0x1000
	ILD_ROP                                                                        = 0x40
	ILD_SCALE                                                                      = 0x2000
	ILD_SELECTED                                                                   = 4
	ILD_TRANSPARENT                                                                = 0x1
	ILP_DOWNLEVEL                                                                  = 1
	ILP_NORMAL                                                                     = 0
	ILS_ALPHA                                                                      = 0x8
	ILS_GLOW                                                                       = 0x1
	ILS_NORMAL                                                                     = 0x0
	ILS_SATURATE                                                                   = 0x4
	ILS_SHADOW                                                                     = 0x2
	IMPLTYPEFLAG_FDEFAULT                                                          = 1
	IMPLTYPEFLAG_FDEFAULTVTABLE                                                    = 8
	IMPLTYPEFLAG_FRESTRICTED                                                       = 4
	IMPLTYPEFLAG_FSOURCE                                                           = 2
	INFOTIPSIZE                                                                    = 1024
	INHERITED_ACCESS_ENTRY                                                         = 0x10
	INHERITED_GRANDPARENT                                                          = 0x20000000
	INHERITED_PARENT                                                               = 0x10000000
	INHERIT_NO_PROPAGATE                                                           = 0x4
	INHERIT_ONLY                                                                   = 0x8
	INTERNATIONAL_USAGE                                                            = 0x1
	INVALID_LINK_INDEX                                                             = -1
	IOCTL_CHANGER_BASE                                                             = 48
	IOCTL_CHANGER_EXCHANGE_MEDIUM                                                  = 3162144
	IOCTL_CHANGER_GET_ELEMENT_STATUS                                               = 3194900
	IOCTL_CHANGER_GET_PARAMETERS                                                   = 3162112
	IOCTL_CHANGER_GET_PRODUCT_DATA                                                 = 3162120
	IOCTL_CHANGER_GET_STATUS                                                       = 3162116
	IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS                                        = 3162136
	IOCTL_CHANGER_MOVE_MEDIUM                                                      = 3162148
	IOCTL_CHANGER_QUERY_VOLUME_TAGS                                                = 3194924
	IOCTL_CHANGER_REINITIALIZE_TRANSPORT                                           = 3162152
	IOCTL_CHANGER_SET_ACCESS                                                       = 3194896
	IOCTL_CHANGER_SET_POSITION                                                     = 3162140
	IOCTL_DISK_BASE                                                                = 7
	IOCTL_DISK_CHECK_VERIFY                                                        = 477184
	IOCTL_DISK_CONTROLLER_NUMBER                                                   = 458820
	IOCTL_DISK_CREATE_DISK                                                         = 507992
	IOCTL_DISK_DELETE_DRIVE_LAYOUT                                                 = 508160
	IOCTL_DISK_EJECT_MEDIA                                                         = 477192
	IOCTL_DISK_FIND_NEW_DEVICES                                                    = 477208
	IOCTL_DISK_FORMAT_DRIVE                                                        = 508876
	IOCTL_DISK_FORMAT_TRACKS                                                       = 507928
	IOCTL_DISK_FORMAT_TRACKS_EX                                                    = 507948
	IOCTL_DISK_GET_CACHE_INFORMATION                                               = 475348
	IOCTL_DISK_GET_DRIVE_GEOMETRY                                                  = 458752
	IOCTL_DISK_GET_DRIVE_GEOMETRY_EX                                               = 458912
	IOCTL_DISK_GET_DRIVE_LAYOUT                                                    = 475148
	IOCTL_DISK_GET_DRIVE_LAYOUT_EX                                                 = 458832
	IOCTL_DISK_GET_LENGTH_INFO                                                     = 475228
	IOCTL_DISK_GET_MEDIA_TYPES                                                     = 461824
	IOCTL_DISK_GET_PARTITION_INFO                                                  = 475140
	IOCTL_DISK_GET_PARTITION_INFO_EX                                               = 458824
	IOCTL_DISK_GROW_PARTITION                                                      = 508112
	IOCTL_DISK_HISTOGRAM_DATA                                                      = 458804
	IOCTL_DISK_HISTOGRAM_RESET                                                     = 458808
	IOCTL_DISK_HISTOGRAM_STRUCTURE                                                 = 458800
	IOCTL_DISK_IS_WRITABLE                                                         = 458788
	IOCTL_DISK_LOAD_MEDIA                                                          = 477196
	IOCTL_DISK_LOGGING                                                             = 458792
	IOCTL_DISK_MEDIA_REMOVAL                                                       = 477188
	IOCTL_DISK_PERFORMANCE                                                         = 458784
	IOCTL_DISK_PERFORMANCE_OFF                                                     = 458848
	IOCTL_DISK_REASSIGN_BLOCKS                                                     = 507932
	IOCTL_DISK_REASSIGN_BLOCKS_EX                                                  = 508068
	IOCTL_DISK_RELEASE                                                             = 477204
	IOCTL_DISK_REQUEST_DATA                                                        = 458816
	IOCTL_DISK_REQUEST_STRUCTURE                                                   = 458812
	IOCTL_DISK_RESERVE                                                             = 477200
	IOCTL_DISK_RESET_SNAPSHOT_INFO                                                 = 508432
	IOCTL_DISK_SENSE_DEVICE                                                        = 459744
	IOCTL_DISK_SET_CACHE_INFORMATION                                               = 508120
	IOCTL_DISK_SET_DRIVE_LAYOUT                                                    = 507920
	IOCTL_DISK_SET_DRIVE_LAYOUT_EX                                                 = 507988
	IOCTL_DISK_SET_PARTITION_INFO                                                  = 507912
	IOCTL_DISK_SET_PARTITION_INFO_EX                                               = 507980
	IOCTL_DISK_UPDATE_DRIVE_SIZE                                                   = 508104
	IOCTL_DISK_UPDATE_PROPERTIES                                                   = 459072
	IOCTL_DISK_VERIFY                                                              = 458772
	IOCTL_SERENUM_EXPOSE_HARDWARE                                                  = 3604992
	IOCTL_SERENUM_GET_PORT_NAME                                                    = 3605004
	IOCTL_SERENUM_PORT_DESC                                                        = 3605000
	IOCTL_SERENUM_REMOVE_HARDWARE                                                  = 3604996
	IOCTL_SERIAL_LSRMST_INSERT                                                     = 1769596
	IOCTL_STORAGE_BASE                                                             = 45
	IOCTL_STORAGE_BREAK_RESERVATION                                                = 2969620
	IOCTL_STORAGE_CHECK_VERIFY                                                     = 2967552
	IOCTL_STORAGE_CHECK_VERIFY2                                                    = 2951168
	IOCTL_STORAGE_EJECTION_CONTROL                                                 = 2951488
	IOCTL_STORAGE_EJECT_MEDIA                                                      = 2967560
	IOCTL_STORAGE_FIND_NEW_DEVICES                                                 = 2967576
	IOCTL_STORAGE_GET_DEVICE_NUMBER                                                = 2953344
	IOCTL_STORAGE_GET_HOTPLUG_INFO                                                 = 2952212
	IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER                                          = 2952208
	IOCTL_STORAGE_GET_MEDIA_TYPES                                                  = 2952192
	IOCTL_STORAGE_GET_MEDIA_TYPES_EX                                               = 2952196
	IOCTL_STORAGE_LOAD_MEDIA                                                       = 2967564
	IOCTL_STORAGE_LOAD_MEDIA2                                                      = 2951180
	IOCTL_STORAGE_MCN_CONTROL                                                      = 2951492
	IOCTL_STORAGE_MEDIA_REMOVAL                                                    = 2967556
	IOCTL_STORAGE_PREDICT_FAILURE                                                  = 2953472
	IOCTL_STORAGE_QUERY_PROPERTY                                                   = 2954240
	IOCTL_STORAGE_READ_CAPACITY                                                    = 2969920
	IOCTL_STORAGE_RELEASE                                                          = 2967572
	IOCTL_STORAGE_RESERVE                                                          = 2967568
	IOCTL_STORAGE_RESET_BUS                                                        = 2969600
	IOCTL_STORAGE_RESET_DEVICE                                                     = 2969604
	IOCTL_STORAGE_SET_HOTPLUG_INFO                                                 = 3001368
	IO_REPARSE_TAG_NSS                                                             = 0x080000005
	IO_REPARSE_TAG_NSSRECOVER                                                      = 0x080000006
	IO_REPARSE_TAG_SYMBOLIC_LINK                                                   = 0
	IO_REPARSE_TAG_VALID_VALUES                                                    = 0x0E000FFFF
	IPM_CLEARADDRESS                                                               = 1124
	IPM_GETADDRESS                                                                 = 1126
	IPM_ISBLANK                                                                    = 1129
	IPM_SETADDRESS                                                                 = 1125
	IPM_SETFOCUS                                                                   = 1128
	IPM_SETRANGE                                                                   = 1127
	IPN_FIELDCHANGED                                                               = 18446744073709550756
	IPN_FIRST                                                                      = 18446744073709550756
	IPN_LAST                                                                       = 18446744073709550737
	IRTIR_TASK_FINISHED                                                            = 4
	IRTIR_TASK_NOT_RUNNING                                                         = 0
	IRTIR_TASK_PENDING                                                             = 3
	IRTIR_TASK_RUNNING                                                             = 1
	IRTIR_TASK_SUSPENDED                                                           = 2
	ISFBVIEWMODE_LARGEICONS                                                        = 0x0002
	ISFBVIEWMODE_LOGOS                                                             = 0x0003
	ISFBVIEWMODE_SMALLICONS                                                        = 0x0001
	ISFB_MASK_BKCOLOR                                                              = 0x00000002
	ISFB_MASK_COLORS                                                               = 0x00000020
	ISFB_MASK_IDLIST                                                               = 0x00000010
	ISFB_MASK_SHELLFOLDER                                                          = 0x00000008
	ISFB_MASK_STATE                                                                = 0x00000001
	ISFB_MASK_VIEWMODE                                                             = 0x00000004
	ISFB_STATE_ALLOWRENAME                                                         = 0x00000002
	ISFB_STATE_BTNMINSIZE                                                          = 0x00000100
	ISFB_STATE_CHANNELBAR                                                          = 0x00000010
	ISFB_STATE_DEBOSSED                                                            = 0x00000001
	ISFB_STATE_DEFAULT                                                             = 0x00000000
	ISFB_STATE_FULLOPEN                                                            = 0x00000040
	ISFB_STATE_NONAMESORT                                                          = 0x00000080
	ISFB_STATE_NOSHOWTEXT                                                          = 0x00000004
	ISFB_STATE_QLINKSMODE                                                          = 0x00000020
	ISIOI_ICONFILE                                                                 = 0x1
	ISIOI_ICONINDEX                                                                = 0x2
	ITSAT_DEFAULT_PRIORITY                                                         = 0x10000000
	ITSAT_MAX_PRIORITY                                                             = 0x7fffffff
	ITSAT_MIN_PRIORITY                                                             = 0x00000000
	ITSSFLAG_COMPLETE_ON_DESTROY                                                   = 0x0
	ITSSFLAG_FLAGS_MASK                                                            = 0x3
	ITSSFLAG_KILL_ON_DESTROY                                                       = 0x1
	ITSS_THREAD_DESTROY_DEFAULT_TIMEOUT                                            = 10000
	ITSS_THREAD_TERMINATE_TIMEOUT                                                  = 4294967295
	ITSS_THREAD_TIMEOUT_NO_CHANGE                                                  = 4294967294
	I_CHILDRENAUTO                                                                 = -2
	I_CHILDRENCALLBACK                                                             = -1
	I_GROUPIDCALLBACK                                                              = -1
	I_GROUPIDNONE                                                                  = -2
	I_IMAGECALLBACK                                                                = -1
	I_IMAGENONE                                                                    = -2
	I_INDENTCALLBACK                                                               = -1
	KDF_ALGORITHMID                                                                = 0x8
	KDF_CONTEXT                                                                    = 0xe
	KDF_GENERIC_PARAMETER                                                          = 0x11
	KDF_HASH_ALGORITHM                                                             = 0x0
	KDF_HMAC_KEY                                                                   = 0x3
	KDF_ITERATION_COUNT                                                            = 0x10
	KDF_KEYBITLENGTH                                                               = 0x12
	KDF_LABEL                                                                      = 0xd
	KDF_PARTYUINFO                                                                 = 0x9
	KDF_PARTYVINFO                                                                 = 0xa
	KDF_SALT                                                                       = 0xf
	KDF_SECRET_APPEND                                                              = 0x2
	KDF_SECRET_HANDLE                                                              = 0x6
	KDF_SECRET_PREPEND                                                             = 0x1
	KDF_SUPPPRIVINFO                                                               = 0xc
	KDF_SUPPPUBINFO                                                                = 0xb
	KDF_TLS_PRF_LABEL                                                              = 0x4
	KDF_TLS_PRF_PROTOCOL                                                           = 0x7
	KDF_TLS_PRF_SEED                                                               = 0x5
	KDF_USE_SECRET_AS_HMAC_KEY_FLAG                                                = 1
	KEY_LENGTH_MASK                                                                = 0xffff0000
	KP_ADMIN_PIN                                                                   = 31
	KP_ALGID                                                                       = 7
	KP_BLOCKLEN                                                                    = 8
	KP_CERTIFICATE                                                                 = 26
	KP_CLEAR_KEY                                                                   = 27
	KP_CLIENT_RANDOM                                                               = 21
	KP_CMS_DH_KEY_INFO                                                             = 38
	KP_CMS_KEY_INFO                                                                = 37
	KP_EFFECTIVE_KEYLEN                                                            = 19
	KP_G                                                                           = 12
	KP_HIGHEST_VERSION                                                             = 41
	KP_INFO                                                                        = 18
	KP_IV                                                                          = 1
	KP_KEYEXCHANGE_PIN                                                             = 32
	KP_KEYLEN                                                                      = 9
	KP_KEYVAL                                                                      = 30
	KP_MODE                                                                        = 4
	KP_MODE_BITS                                                                   = 5
	KP_OAEP_PARAMS                                                                 = 36
	KP_P                                                                           = 11
	KP_PADDING                                                                     = 3
	KP_PERMISSIONS                                                                 = 6
	KP_PIN_ID                                                                      = 43
	KP_PIN_INFO                                                                    = 44
	KP_PRECOMP_MD5                                                                 = 24
	KP_PRECOMP_SHA                                                                 = 25
	KP_PREHASH                                                                     = 34
	KP_PUB_EX_LEN                                                                  = 28
	KP_PUB_EX_VAL                                                                  = 29
	KP_PUB_PARAMS                                                                  = 39
	KP_Q                                                                           = 13
	KP_RA                                                                          = 16
	KP_RB                                                                          = 17
	KP_RP                                                                          = 23
	KP_SALT                                                                        = 2
	KP_SALT_EX                                                                     = 10
	KP_SCHANNEL_ALG                                                                = 20
	KP_SERVER_RANDOM                                                               = 22
	KP_SIGNATURE_PIN                                                               = 33
	KP_VERIFY_PARAMS                                                               = 40
	KP_X                                                                           = 14
	KP_Y                                                                           = 15
	LG_INCLUDE_INDIRECT                                                            = 1
	LIF_ITEMID                                                                     = 0x4
	LIF_ITEMINDEX                                                                  = 0x1
	LIF_STATE                                                                      = 0x2
	LIF_URL                                                                        = 0x8
	LIS_ENABLED                                                                    = 0x2
	LIS_FOCUSED                                                                    = 0x1
	LIS_VISITED                                                                    = 0x4
	LM20_CNLEN                                                                     = 15
	LM20_DEVLEN                                                                    = 8
	LM20_DNLEN                                                                     = 15
	LM20_GNLEN                                                                     = 20
	LM20_MAXCOMMENTSZ                                                              = 48
	LM20_NNLEN                                                                     = 12
	LM20_PATHLEN                                                                   = 256
	LM20_PWLEN                                                                     = 14
	LM20_QNLEN                                                                     = 12
	LM20_RMLEN                                                                     = 30
	LM20_SERVICE_ACTIVE                                                            = 0x00
	LM20_SERVICE_CONTINUE_PENDING                                                  = 0x04
	LM20_SERVICE_PAUSED                                                            = 0x0C
	LM20_SERVICE_PAUSE_PENDING                                                     = 0x08
	LM20_SNLEN                                                                     = 15
	LM20_STXTLEN                                                                   = 63
	LM20_UNCLEN                                                                    = 17
	LM20_UNLEN                                                                     = 20
	LM_GETIDEALHEIGHT                                                              = 1793
	LM_GETITEM                                                                     = 1795
	LM_HITTEST                                                                     = 1792
	LM_SETITEM                                                                     = 1794
	LOAD_TLB_AS_32BIT                                                              = 0x20
	LOAD_TLB_AS_64BIT                                                              = 0x40
	LOCALE_USE_NLS                                                                 = 0x10000000
	LOCALGROUP_COMMENT_PARMNUM                                                     = 2
	LOCALGROUP_NAME_PARMNUM                                                        = 1
	LOCK_ELEMENT                                                                   = 0
	LOCK_UNLOCK_DOOR                                                               = 0x02
	LOCK_UNLOCK_IEPORT                                                             = 0x01
	LOCK_UNLOCK_KEYPAD                                                             = 0x04
	LOGFLAGS_BACKWARD                                                              = 0x1
	LOGFLAGS_FORWARD                                                               = 0
	LOGFLAGS_SEEK                                                                  = 0x2
	LOWER_GET_HINT_MASK                                                            = 0x0000FF00
	LOWER_HINT_MASK                                                                = 0x000000FF
	LVA_ALIGNLEFT                                                                  = 0x1
	LVA_ALIGNTOP                                                                   = 0x2
	LVA_DEFAULT                                                                    = 0x0
	LVA_SNAPTOGRID                                                                 = 0x5
	LVBKIF_FLAG_ALPHABLEND                                                         = 0x20000000
	LVBKIF_FLAG_TILEOFFSET                                                         = 0x100
	LVBKIF_SOURCE_HBITMAP                                                          = 0x1
	LVBKIF_SOURCE_MASK                                                             = 0x3
	LVBKIF_SOURCE_NONE                                                             = 0x0
	LVBKIF_SOURCE_URL                                                              = 0x2
	LVBKIF_STYLE_MASK                                                              = 0x10
	LVBKIF_STYLE_NORMAL                                                            = 0x0
	LVBKIF_STYLE_TILE                                                              = 0x10
	LVBKIF_TYPE_WATERMARK                                                          = 0x10000000
	LVCDI_GROUP                                                                    = 0x1
	LVCDI_ITEM                                                                     = 0x0
	LVCDI_ITEMSLIST                                                                = 0x2
	LVCDRF_NOGROUPFRAME                                                            = 0x20000
	LVCDRF_NOSELECT                                                                = 0x10000
	LVCFMT_BITMAP_ON_RIGHT                                                         = 0x1000
	LVCFMT_CENTER                                                                  = 0x2
	LVCFMT_COL_HAS_IMAGES                                                          = 0x8000
	LVCFMT_IMAGE                                                                   = 0x800
	LVCFMT_JUSTIFYMASK                                                             = 0x3
	LVCFMT_LEFT                                                                    = 0x0
	LVCFMT_RIGHT                                                                   = 0x1
	LVCF_FMT                                                                       = 0x1
	LVCF_IMAGE                                                                     = 0x10
	LVCF_ORDER                                                                     = 0x20
	LVCF_SUBITEM                                                                   = 0x8
	LVCF_TEXT                                                                      = 0x4
	LVCF_WIDTH                                                                     = 0x2
	LVFI_NEARESTXY                                                                 = 0x40
	LVFI_PARAM                                                                     = 0x1
	LVFI_PARTIAL                                                                   = 0x8
	LVFI_STRING                                                                    = 0x2
	LVFI_WRAP                                                                      = 0x20
	LVGA_FOOTER_CENTER                                                             = 0x10
	LVGA_FOOTER_LEFT                                                               = 0x8
	LVGA_FOOTER_RIGHT                                                              = 0x20
	LVGA_HEADER_CENTER                                                             = 0x2
	LVGA_HEADER_LEFT                                                               = 0x1
	LVGA_HEADER_RIGHT                                                              = 0x4
	LVGF_ALIGN                                                                     = 0x8
	LVGF_FOOTER                                                                    = 0x2
	LVGF_GROUPID                                                                   = 0x10
	LVGF_HEADER                                                                    = 0x1
	LVGF_NONE                                                                      = 0x0
	LVGF_STATE                                                                     = 0x4
	LVGGR_GROUP                                                                    = 0
	LVGGR_HEADER                                                                   = 1
	LVGGR_LABEL                                                                    = 2
	LVGGR_SUBSETLINK                                                               = 3
	LVGIT_UNFOLDED                                                                 = 0x1
	LVGMF_BORDERCOLOR                                                              = 0x2
	LVGMF_BORDERSIZE                                                               = 0x1
	LVGMF_NONE                                                                     = 0x0
	LVGMF_TEXTCOLOR                                                                = 0x4
	LVGS_COLLAPSED                                                                 = 0x1
	LVGS_COLLAPSIBLE                                                               = 0x8
	LVGS_FOCUSED                                                                   = 0x10
	LVGS_HIDDEN                                                                    = 0x2
	LVGS_NOHEADER                                                                  = 0x4
	LVGS_NORMAL                                                                    = 0x0
	LVGS_SELECTED                                                                  = 0x20
	LVGS_SUBSETED                                                                  = 0x40
	LVGS_SUBSETLINKFOCUSED                                                         = 0x80
	LVHT_ABOVE                                                                     = 0x8
	LVHT_BELOW                                                                     = 0x10
	LVHT_EX_GROUP                                                                  = 4076863488
	LVHT_EX_GROUP_BACKGROUND                                                       = 0x80000000
	LVHT_EX_GROUP_COLLAPSE                                                         = 0x40000000
	LVHT_EX_GROUP_FOOTER                                                           = 0x20000000
	LVHT_EX_GROUP_HEADER                                                           = 0x10000000
	LVHT_EX_GROUP_STATEICON                                                        = 0x01000000
	LVHT_EX_GROUP_SUBSETLINK                                                       = 0x02000000
	LVHT_EX_ONCONTENTS                                                             = 0x04000000
	LVHT_NOWHERE                                                                   = 0x1
	LVHT_ONITEM                                                                    = 14
	LVHT_ONITEMICON                                                                = 0x2
	LVHT_ONITEMLABEL                                                               = 0x4
	LVHT_ONITEMSTATEICON                                                           = 0x8
	LVHT_TOLEFT                                                                    = 0x40
	LVHT_TORIGHT                                                                   = 0x20
	LVIF_COLUMNS                                                                   = 0x200
	LVIF_DI_SETITEM                                                                = 0x1000
	LVIF_GROUPID                                                                   = 0x100
	LVIF_IMAGE                                                                     = 0x2
	LVIF_INDENT                                                                    = 0x10
	LVIF_NORECOMPUTE                                                               = 0x800
	LVIF_PARAM                                                                     = 0x4
	LVIF_STATE                                                                     = 0x8
	LVIF_TEXT                                                                      = 0x1
	LVIM_AFTER                                                                     = 0x1
	LVIR_BOUNDS                                                                    = 0
	LVIR_ICON                                                                      = 1
	LVIR_LABEL                                                                     = 2
	LVIR_SELECTBOUNDS                                                              = 3
	LVIS_ACTIVATING                                                                = 0x20
	LVIS_CUT                                                                       = 0x4
	LVIS_DROPHILITED                                                               = 0x8
	LVIS_FOCUSED                                                                   = 0x1
	LVIS_GLOW                                                                      = 0x10
	LVIS_OVERLAYMASK                                                               = 0xf00
	LVIS_SELECTED                                                                  = 0x2
	LVIS_STATEIMAGEMASK                                                            = 0xF000
	LVKF_ALT                                                                       = 0x1
	LVKF_CONTROL                                                                   = 0x2
	LVKF_SHIFT                                                                     = 0x4
	LVM_APPROXIMATEVIEWRECT                                                        = 4160
	LVM_ARRANGE                                                                    = 4118
	LVM_CANCELEDITLABEL                                                            = 4275
	LVM_CREATEDRAGIMAGE                                                            = 4129
	LVM_DELETEALLITEMS                                                             = 4105
	LVM_DELETECOLUMN                                                               = 4124
	LVM_DELETEITEM                                                                 = 4104
	LVM_EDITLABEL                                                                  = 4119
	LVM_EDITLABELA                                                                 = 4119
	LVM_EDITLABELW                                                                 = 4214
	LVM_ENABLEGROUPVIEW                                                            = 4253
	LVM_ENSUREVISIBLE                                                              = 4115
	LVM_FINDITEM                                                                   = 4109
	LVM_FINDITEMA                                                                  = 4109
	LVM_FINDITEMW                                                                  = 4179
	LVM_FIRST                                                                      = 0x1000
	LVM_GETBKCOLOR                                                                 = 4096
	LVM_GETBKIMAGE                                                                 = 4165
	LVM_GETBKIMAGEA                                                                = 4165
	LVM_GETBKIMAGEW                                                                = 4235
	LVM_GETCALLBACKMASK                                                            = 4106
	LVM_GETCOLUMN                                                                  = 4121
	LVM_GETCOLUMNA                                                                 = 4121
	LVM_GETCOLUMNORDERARRAY                                                        = 4155
	LVM_GETCOLUMNW                                                                 = 4191
	LVM_GETCOLUMNWIDTH                                                             = 4125
	LVM_GETCOUNTPERPAGE                                                            = 4136
	LVM_GETEDITCONTROL                                                             = 4120
	LVM_GETEXTENDEDLISTVIEWSTYLE                                                   = 4151
	LVM_GETFOCUSEDGROUP                                                            = 4189
	LVM_GETGROUPCOUNT                                                              = 4248
	LVM_GETGROUPINFO                                                               = 4245
	LVM_GETGROUPINFOBYINDEX                                                        = 4249
	LVM_GETGROUPMETRICS                                                            = 4252
	LVM_GETGROUPRECT                                                               = 4194
	LVM_GETGROUPSTATE                                                              = 4188
	LVM_GETHEADER                                                                  = 4127
	LVM_GETHOTCURSOR                                                               = 4159
	LVM_GETHOTITEM                                                                 = 4157
	LVM_GETHOVERTIME                                                               = 4168
	LVM_GETIMAGELIST                                                               = 4098
	LVM_GETINSERTMARK                                                              = 4263
	LVM_GETINSERTMARKCOLOR                                                         = 4267
	LVM_GETINSERTMARKRECT                                                          = 4265
	LVM_GETISEARCHSTRING                                                           = 4148
	LVM_GETISEARCHSTRINGA                                                          = 4148
	LVM_GETISEARCHSTRINGW                                                          = 4213
	LVM_GETITEM                                                                    = 4101
	LVM_GETITEMA                                                                   = 4101
	LVM_GETITEMCOUNT                                                               = 4100
	LVM_GETITEMPOSITION                                                            = 4112
	LVM_GETITEMRECT                                                                = 4110
	LVM_GETITEMSPACING                                                             = 4147
	LVM_GETITEMSTATE                                                               = 4140
	LVM_GETITEMTEXT                                                                = 4141
	LVM_GETITEMTEXTA                                                               = 4141
	LVM_GETITEMTEXTW                                                               = 4211
	LVM_GETITEMW                                                                   = 4171
	LVM_GETNEXTITEM                                                                = 4108
	LVM_GETNUMBEROFWORKAREAS                                                       = 4169
	LVM_GETORIGIN                                                                  = 4137
	LVM_GETOUTLINECOLOR                                                            = 4272
	LVM_GETSELECTEDCOLUMN                                                          = 4270
	LVM_GETSELECTEDCOUNT                                                           = 4146
	LVM_GETSELECTIONMARK                                                           = 4162
	LVM_GETSTRINGWIDTH                                                             = 4113
	LVM_GETSTRINGWIDTHA                                                            = 4113
	LVM_GETSTRINGWIDTHW                                                            = 4183
	LVM_GETSUBITEMRECT                                                             = 4152
	LVM_GETTEXTBKCOLOR                                                             = 4133
	LVM_GETTEXTCOLOR                                                               = 4131
	LVM_GETTILEINFO                                                                = 4261
	LVM_GETTILEVIEWINFO                                                            = 4259
	LVM_GETTOOLTIPS                                                                = 4174
	LVM_GETTOPINDEX                                                                = 4135
	LVM_GETUNICODEFORMAT                                                           = 8198
	LVM_GETVIEW                                                                    = 4239
	LVM_GETVIEWRECT                                                                = 4130
	LVM_GETWORKAREAS                                                               = 4166
	LVM_HASGROUP                                                                   = 4257
	LVM_HITTEST                                                                    = 4114
	LVM_INSERTCOLUMN                                                               = 4123
	LVM_INSERTCOLUMNA                                                              = 4123
	LVM_INSERTCOLUMNW                                                              = 4193
	LVM_INSERTGROUP                                                                = 4241
	LVM_INSERTGROUPSORTED                                                          = 4255
	LVM_INSERTITEM                                                                 = 4103
	LVM_INSERTITEMA                                                                = 4103
	LVM_INSERTITEMW                                                                = 4173
	LVM_INSERTMARKHITTEST                                                          = 4264
	LVM_ISGROUPVIEWENABLED                                                         = 4271
	LVM_ISITEMVISIBLE                                                              = 4278
	LVM_MAPIDTOINDEX                                                               = 4277
	LVM_MAPINDEXTOID                                                               = 4276
	LVM_MOVEGROUP                                                                  = 4247
	LVM_MOVEITEMTOGROUP                                                            = 4250
	LVM_REDRAWITEMS                                                                = 4117
	LVM_REMOVEALLGROUPS                                                            = 4256
	LVM_REMOVEGROUP                                                                = 4246
	LVM_SCROLL                                                                     = 4116
	LVM_SETBKCOLOR                                                                 = 4097
	LVM_SETBKIMAGE                                                                 = 4164
	LVM_SETBKIMAGEA                                                                = 4164
	LVM_SETBKIMAGEW                                                                = 4234
	LVM_SETCALLBACKMASK                                                            = 4107
	LVM_SETCOLUMN                                                                  = 4122
	LVM_SETCOLUMNA                                                                 = 4122
	LVM_SETCOLUMNORDERARRAY                                                        = 4154
	LVM_SETCOLUMNW                                                                 = 4192
	LVM_SETCOLUMNWIDTH                                                             = 4126
	LVM_SETEXTENDEDLISTVIEWSTYLE                                                   = 4150
	LVM_SETGROUPINFO                                                               = 4243
	LVM_SETGROUPMETRICS                                                            = 4251
	LVM_SETHOTCURSOR                                                               = 4158
	LVM_SETHOTITEM                                                                 = 4156
	LVM_SETHOVERTIME                                                               = 4167
	LVM_SETICONSPACING                                                             = 4149
	LVM_SETIMAGELIST                                                               = 4099
	LVM_SETINFOTIP                                                                 = 4269
	LVM_SETINSERTMARK                                                              = 4262
	LVM_SETINSERTMARKCOLOR                                                         = 4266
	LVM_SETITEM                                                                    = 4102
	LVM_SETITEMA                                                                   = 4102
	LVM_SETITEMCOUNT                                                               = 4143
	LVM_SETITEMPOSITION                                                            = 4111
	LVM_SETITEMPOSITION32                                                          = 4145
	LVM_SETITEMSTATE                                                               = 4139
	LVM_SETITEMTEXT                                                                = 4142
	LVM_SETITEMTEXTA                                                               = 4142
	LVM_SETITEMTEXTW                                                               = 4212
	LVM_SETITEMW                                                                   = 4172
	LVM_SETOUTLINECOLOR                                                            = 4273
	LVM_SETSELECTEDCOLUMN                                                          = 4236
	LVM_SETSELECTIONMARK                                                           = 4163
	LVM_SETTEXTBKCOLOR                                                             = 4134
	LVM_SETTEXTCOLOR                                                               = 4132
	LVM_SETTILEINFO                                                                = 4260
	LVM_SETTILEVIEWINFO                                                            = 4258
	LVM_SETTILEWIDTH                                                               = 4237
	LVM_SETTOOLTIPS                                                                = 4170
	LVM_SETUNICODEFORMAT                                                           = 8197
	LVM_SETVIEW                                                                    = 4238
	LVM_SETWORKAREAS                                                               = 4161
	LVM_SORTGROUPS                                                                 = 4254
	LVM_SORTITEMS                                                                  = 4144
	LVM_SORTITEMSEX                                                                = 4177
	LVM_SUBITEMHITTEST                                                             = 4153
	LVM_UPDATE                                                                     = 4138
	LVNI_ABOVE                                                                     = 0x100
	LVNI_ALL                                                                       = 0x0
	LVNI_BELOW                                                                     = 0x200
	LVNI_CUT                                                                       = 0x4
	LVNI_DIRECTIONMASK                                                             = 3840
	LVNI_DROPHILITED                                                               = 0x8
	LVNI_FOCUSED                                                                   = 0x1
	LVNI_PREVIOUS                                                                  = 0x20
	LVNI_SAMEGROUPONLY                                                             = 0x80
	LVNI_SELECTED                                                                  = 0x2
	LVNI_STATEMASK                                                                 = 15
	LVNI_TOLEFT                                                                    = 0x400
	LVNI_TORIGHT                                                                   = 0x800
	LVNI_VISIBLEONLY                                                               = 0x40
	LVNI_VISIBLEORDER                                                              = 0x10
	LVNSCH_DEFAULT                                                                 = -1
	LVNSCH_ERROR                                                                   = -2
	LVNSCH_IGNORE                                                                  = -3
	LVN_BEGINDRAG                                                                  = 18446744073709551507
	LVN_BEGINLABELEDIT                                                             = 18446744073709551511
	LVN_BEGINLABELEDITA                                                            = 18446744073709551511
	LVN_BEGINLABELEDITW                                                            = 18446744073709551441
	LVN_BEGINRDRAG                                                                 = 18446744073709551505
	LVN_BEGINSCROLL                                                                = 18446744073709551436
	LVN_COLUMNCLICK                                                                = 18446744073709551508
	LVN_DELETEALLITEMS                                                             = 18446744073709551512
	LVN_DELETEITEM                                                                 = 18446744073709551513
	LVN_ENDLABELEDIT                                                               = 18446744073709551510
	LVN_ENDLABELEDITA                                                              = 18446744073709551510
	LVN_ENDLABELEDITW                                                              = 18446744073709551440
	LVN_ENDSCROLL                                                                  = 18446744073709551435
	LVN_FIRST                                                                      = 18446744073709551516
	LVN_GETDISPINFO                                                                = 18446744073709551466
	LVN_GETDISPINFOA                                                               = 18446744073709551466
	LVN_GETDISPINFOW                                                               = 18446744073709551439
	LVN_GETINFOTIP                                                                 = 18446744073709551459
	LVN_GETINFOTIPA                                                                = 18446744073709551459
	LVN_GETINFOTIPW                                                                = 18446744073709551458
	LVN_HOTTRACK                                                                   = 18446744073709551495
	LVN_INCREMENTALSEARCH                                                          = 18446744073709551454
	LVN_INCREMENTALSEARCHA                                                         = 18446744073709551454
	LVN_INCREMENTALSEARCHW                                                         = 18446744073709551453
	LVN_INSERTITEM                                                                 = 18446744073709551514
	LVN_ITEMACTIVATE                                                               = 18446744073709551502
	LVN_ITEMCHANGED                                                                = 18446744073709551515
	LVN_ITEMCHANGING                                                               = 18446744073709551516
	LVN_KEYDOWN                                                                    = 18446744073709551461
	LVN_LAST                                                                       = 18446744073709551417
	LVN_MARQUEEBEGIN                                                               = 18446744073709551460
	LVN_ODCACHEHINT                                                                = 18446744073709551503
	LVN_ODFINDITEM                                                                 = 18446744073709551464
	LVN_ODFINDITEMA                                                                = 18446744073709551464
	LVN_ODFINDITEMW                                                                = 18446744073709551437
	LVN_ODSTATECHANGED                                                             = 18446744073709551501
	LVN_SETDISPINFO                                                                = 18446744073709551465
	LVN_SETDISPINFOA                                                               = 18446744073709551465
	LVN_SETDISPINFOW                                                               = 18446744073709551438
	LVSCW_AUTOSIZE                                                                 = -1
	LVSCW_AUTOSIZE_USEHEADER                                                       = -2
	LVSICF_NOINVALIDATEALL                                                         = 0x1
	LVSICF_NOSCROLL                                                                = 0x2
	LVSIL_GROUPHEADER                                                              = 3
	LVSIL_NORMAL                                                                   = 0
	LVSIL_SMALL                                                                    = 1
	LVSIL_STATE                                                                    = 2
	LVS_ALIGNLEFT                                                                  = 0x800
	LVS_ALIGNMASK                                                                  = 0xc00
	LVS_ALIGNTOP                                                                   = 0x0
	LVS_AUTOARRANGE                                                                = 0x100
	LVS_EDITLABELS                                                                 = 0x200
	LVS_EX_BORDERSELECT                                                            = 0x8000
	LVS_EX_CHECKBOXES                                                              = 0x4
	LVS_EX_DOUBLEBUFFER                                                            = 0x10000
	LVS_EX_FLATSB                                                                  = 0x100
	LVS_EX_FULLROWSELECT                                                           = 0x20
	LVS_EX_GRIDLINES                                                               = 0x1
	LVS_EX_HEADERDRAGDROP                                                          = 0x10
	LVS_EX_HIDELABELS                                                              = 0x20000
	LVS_EX_INFOTIP                                                                 = 0x400
	LVS_EX_LABELTIP                                                                = 0x4000
	LVS_EX_MULTIWORKAREAS                                                          = 0x2000
	LVS_EX_ONECLICKACTIVATE                                                        = 0x40
	LVS_EX_REGIONAL                                                                = 0x200
	LVS_EX_SIMPLESELECT                                                            = 0x100000
	LVS_EX_SINGLEROW                                                               = 0x40000
	LVS_EX_SNAPTOGRID                                                              = 0x80000
	LVS_EX_SUBITEMIMAGES                                                           = 0x2
	LVS_EX_TRACKSELECT                                                             = 0x8
	LVS_EX_TWOCLICKACTIVATE                                                        = 0x80
	LVS_EX_UNDERLINECOLD                                                           = 0x1000
	LVS_EX_UNDERLINEHOT                                                            = 0x800
	LVS_ICON                                                                       = 0x0
	LVS_LIST                                                                       = 0x3
	LVS_NOCOLUMNHEADER                                                             = 0x4000
	LVS_NOLABELWRAP                                                                = 0x80
	LVS_NOSCROLL                                                                   = 0x2000
	LVS_NOSORTHEADER                                                               = 0x8000
	LVS_OWNERDATA                                                                  = 0x1000
	LVS_OWNERDRAWFIXED                                                             = 0x400
	LVS_REPORT                                                                     = 0x1
	LVS_SHAREIMAGELISTS                                                            = 0x40
	LVS_SHOWSELALWAYS                                                              = 0x8
	LVS_SINGLESEL                                                                  = 0x4
	LVS_SMALLICON                                                                  = 0x2
	LVS_SORTASCENDING                                                              = 0x10
	LVS_SORTDESCENDING                                                             = 0x20
	LVS_TYPEMASK                                                                   = 0x3
	LVS_TYPESTYLEMASK                                                              = 0xfc00
	LVTVIF_AUTOSIZE                                                                = 0x0
	LVTVIF_FIXEDHEIGHT                                                             = 0x2
	LVTVIF_FIXEDSIZE                                                               = 0x3
	LVTVIF_FIXEDWIDTH                                                              = 0x1
	LVTVIM_COLUMNS                                                                 = 0x2
	LVTVIM_LABELMARGIN                                                             = 0x4
	LVTVIM_TILESIZE                                                                = 0x1
	LV_MAX_WORKAREAS                                                               = 16
	LV_VIEW_DETAILS                                                                = 0x1
	LV_VIEW_ICON                                                                   = 0x0
	LV_VIEW_LIST                                                                   = 0x3
	LV_VIEW_MAX                                                                    = 0x4
	LV_VIEW_SMALLICON                                                              = 0x2
	LV_VIEW_TILE                                                                   = 0x4
	LWS_IGNORERETURN                                                               = 0x2
	LWS_TRANSPARENT                                                                = 0x1
	MAJOR_VERSION_MASK                                                             = 0x0F
	MARK_HANDLE_NOT_REALTIME                                                       = 64
	MARK_HANDLE_NOT_TXF_SYSTEM_LOG                                                 = 8
	MARK_HANDLE_PROTECT_CLUSTERS                                                   = 1
	MARK_HANDLE_REALTIME                                                           = 32
	MARK_HANDLE_TXF_SYSTEM_LOG                                                     = 4
	MARSHALINTERFACE_MIN                                                           = 500
	MASK_TO_RESET_TLB_BITS                                                         = -97
	MAXCOMMENTSZ                                                                   = 256
	MAXIMUM_ENCRYPTION_VALUE                                                       = 0x00000004
	MAXPERMENTRIES                                                                 = 64
	MAXPROPPAGES                                                                   = 100
	MAXUIDLEN                                                                      = 64
	MAX_COLUMN_DESC_LEN                                                            = 128
	MAX_COLUMN_NAME_LEN                                                            = 80
	MAX_LANMAN_MESSAGE_ID                                                          = 5899
	MAX_LINKID_TEXT                                                                = 48
	MAX_NERR                                                                       = 2999
	MAX_PASSWD_LEN                                                                 = 256
	MAX_REPARSE_SIZE                                                               = 17000
	MAX_SIZE_SECURITY_ID                                                           = 512
	MAX_VOLUME_ID_SIZE                                                             = 36
	MAX_VOLUME_TEMPLATE_SIZE                                                       = 40
	MCHT_CALENDAR                                                                  = 0x20000
	MCHT_CALENDARBK                                                                = 131072
	MCHT_CALENDARDATE                                                              = 131073
	MCHT_CALENDARDATEMAX                                                           = 131077
	MCHT_CALENDARDATEMIN                                                           = 131076
	MCHT_CALENDARDATENEXT                                                          = 16908289
	MCHT_CALENDARDATEPREV                                                          = 33685505
	MCHT_CALENDARDAY                                                               = 131074
	MCHT_CALENDARWEEKNUM                                                           = 131075
	MCHT_NEXT                                                                      = 0x1000000
	MCHT_NOWHERE                                                                   = 0x0
	MCHT_PREV                                                                      = 0x2000000
	MCHT_TITLE                                                                     = 0x10000
	MCHT_TITLEBK                                                                   = 65536
	MCHT_TITLEBTNNEXT                                                              = 16842755
	MCHT_TITLEBTNPREV                                                              = 33619971
	MCHT_TITLEMONTH                                                                = 65537
	MCHT_TITLEYEAR                                                                 = 65538
	MCHT_TODAYLINK                                                                 = 0x30000
	MCM_FIRST                                                                      = 0x1000
	MCM_GETCOLOR                                                                   = 4107
	MCM_GETCURSEL                                                                  = 4097
	MCM_GETFIRSTDAYOFWEEK                                                          = 4112
	MCM_GETMAXSELCOUNT                                                             = 4099
	MCM_GETMAXTODAYWIDTH                                                           = 4117
	MCM_GETMINREQRECT                                                              = 4105
	MCM_GETMONTHDELTA                                                              = 4115
	MCM_GETMONTHRANGE                                                              = 4103
	MCM_GETRANGE                                                                   = 4113
	MCM_GETSELRANGE                                                                = 4101
	MCM_GETTODAY                                                                   = 4109
	MCM_GETUNICODEFORMAT                                                           = 8198
	MCM_HITTEST                                                                    = 4110
	MCM_SETCOLOR                                                                   = 4106
	MCM_SETCURSEL                                                                  = 4098
	MCM_SETDAYSTATE                                                                = 4104
	MCM_SETFIRSTDAYOFWEEK                                                          = 4111
	MCM_SETMAXSELCOUNT                                                             = 4100
	MCM_SETMONTHDELTA                                                              = 4116
	MCM_SETRANGE                                                                   = 4114
	MCM_SETSELRANGE                                                                = 4102
	MCM_SETTODAY                                                                   = 4108
	MCM_SETUNICODEFORMAT                                                           = 8197
	MCN_FIRST                                                                      = 18446744073709550870
	MCN_GETDAYSTATE                                                                = 18446744073709550873
	MCN_LAST                                                                       = 18446744073709550864
	MCN_SELCHANGE                                                                  = 18446744073709550867
	MCN_SELECT                                                                     = 18446744073709550870
	MCN_VIEWCHANGE                                                                 = 18446744073709550866
	MCSC_BACKGROUND                                                                = 0
	MCSC_MONTHBK                                                                   = 4
	MCSC_TEXT                                                                      = 1
	MCSC_TITLEBK                                                                   = 2
	MCSC_TITLETEXT                                                                 = 3
	MCSC_TRAILINGTEXT                                                              = 5
	MCS_DAYSTATE                                                                   = 0x1
	MCS_MULTISELECT                                                                = 0x2
	MCS_NOTODAY                                                                    = 0x10
	MCS_NOTODAYCIRCLE                                                              = 0x8
	MCS_WEEKNUMBERS                                                                = 0x4
	MEDIA_CURRENTLY_MOUNTED                                                        = 0x80000000
	MEDIA_ERASEABLE                                                                = 0x00000001
	MEDIA_READ_ONLY                                                                = 0x00000004
	MEDIA_READ_WRITE                                                               = 0x00000008
	MEDIA_WRITE_ONCE                                                               = 0x00000002
	MEDIA_WRITE_PROTECTED                                                          = 0x00000100
	MEMBERID_NIL                                                                   = -1
	METHOD_BUFFERED                                                                = 0
	METHOD_DIRECT_FROM_HARDWARE                                                    = 2
	METHOD_DIRECT_TO_HARDWARE                                                      = 1
	METHOD_IN_DIRECT                                                               = 1
	METHOD_NEITHER                                                                 = 3
	METHOD_OUT_DIRECT                                                              = 2
	MICROSOFT_ROOT_CERT_CHAIN_POLICY_CHECK_APPLICATION_ROOT_FLAG                   = 0x00020000
	MICROSOFT_ROOT_CERT_CHAIN_POLICY_DISABLE_FLIGHT_ROOT_FLAG                      = 0x00040000
	MICROSOFT_ROOT_CERT_CHAIN_POLICY_ENABLE_TEST_ROOT_FLAG                         = 0x00010000
	MIDL_STRING                                                                    = 0
	MINSYSCOMMAND                                                                  = 61440
	MIN_LANMAN_MESSAGE_ID                                                          = 2100
	MKSYS_URLMONIKER                                                               = 6
	MK_ALT                                                                         = 32
	MM_ADDSEPARATOR                                                                = 1
	MM_DONTREMOVESEPS                                                              = 4
	MM_SUBMENUSHAVEIDS                                                             = 2
	MODALS_DOMAIN_ID_INFOLEVEL                                                     = 1009
	MODALS_DOMAIN_ID_PARMNUM                                                       = 9
	MODALS_DOMAIN_NAME_INFOLEVEL                                                   = 1008
	MODALS_DOMAIN_NAME_PARMNUM                                                     = 8
	MODALS_FORCE_LOGOFF_INFOLEVEL                                                  = 1004
	MODALS_FORCE_LOGOFF_PARMNUM                                                    = 4
	MODALS_LOCKOUT_DURATION_PARMNUM                                                = 10
	MODALS_LOCKOUT_OBSERVATION_WINDOW_PARMNUM                                      = 11
	MODALS_LOCKOUT_THRESHOLD_PARMNUM                                               = 12
	MODALS_MAX_PASSWD_AGE_INFOLEVEL                                                = 1002
	MODALS_MAX_PASSWD_AGE_PARMNUM                                                  = 2
	MODALS_MIN_PASSWD_AGE_INFOLEVEL                                                = 1003
	MODALS_MIN_PASSWD_AGE_PARMNUM                                                  = 3
	MODALS_MIN_PASSWD_LEN_INFOLEVEL                                                = 1001
	MODALS_MIN_PASSWD_LEN_PARMNUM                                                  = 1
	MODALS_PASSWD_HIST_LEN_INFOLEVEL                                               = 1005
	MODALS_PASSWD_HIST_LEN_PARMNUM                                                 = 5
	MODALS_PRIMARY_INFOLEVEL                                                       = 1007
	MODALS_PRIMARY_PARMNUM                                                         = 7
	MODALS_ROLE_INFOLEVEL                                                          = 1006
	MODALS_ROLE_PARMNUM                                                            = 6
	MONTHCAL_CLASSA                                                                = "SysMonthCal32"
	MSGF_COMMCTRL_BEGINDRAG                                                        = 0x4200
	MSGF_COMMCTRL_DRAGSELECT                                                       = 0x4202
	MSGF_COMMCTRL_SIZEHEADER                                                       = 0x4201
	MSGF_COMMCTRL_TOOLBARCUST                                                      = 0x4203
	MSGNAME_FORWARDED_FROM                                                         = 0x10
	MSGNAME_FORWARDED_TO                                                           = 0x04
	MSGNAME_NOT_FORWARDED                                                          = 0
	MS_DEF_DH_SCHANNEL_PROV_A                                                      = "Microsoft DH SChannel Cryptographic Provider"
	MS_DEF_DSS_DH_PROV_A                                                           = "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider"
	MS_DEF_DSS_PROV_A                                                              = "Microsoft Base DSS Cryptographic Provider"
	MS_DEF_PROV_A                                                                  = "Microsoft Base Cryptographic Provider v1.0"
	MS_DEF_RSA_SCHANNEL_PROV_A                                                     = "Microsoft RSA SChannel Cryptographic Provider"
	MS_DEF_RSA_SIG_PROV_A                                                          = "Microsoft RSA Signature Cryptographic Provider"
	MS_ENHANCED_PROV_A                                                             = "Microsoft Enhanced Cryptographic Provider v1.0"
	MS_ENH_DSS_DH_PROV_A                                                           = "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider"
	MS_ENH_RSA_AES_PROV_A                                                          = "Microsoft Enhanced RSA and AES Cryptographic Provider"
	MS_ENH_RSA_AES_PROV_XP_A                                                       = "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)"
	MS_SCARD_PROV_A                                                                = "Microsoft Base Smart Card Crypto Provider"
	MS_STRONG_PROV_A                                                               = "Microsoft Strong Cryptographic Provider"
	MULTICLASSINFO_GETIIDPRIMARY                                                   = 0x4
	MULTICLASSINFO_GETIIDSOURCE                                                    = 0x8
	MULTICLASSINFO_GETNUMRESERVEDDISPIDS                                           = 0x2
	MULTICLASSINFO_GETTYPEINFO                                                     = 0x1
	MUTZ_ACCEPT_WILDCARD_SCHEME                                                    = 0x80
	MUTZ_DONT_UNESCAPE                                                             = 0x800
	MUTZ_DONT_USE_CACHE                                                            = 0x1000
	MUTZ_ENFORCERESTRICTED                                                         = 0x100
	MUTZ_FORCE_INTRANET_FLAGS                                                      = 0x2000
	MUTZ_IGNORE_ZONE_MAPPINGS                                                      = 0x4000
	MUTZ_ISFILE                                                                    = 0x2
	MUTZ_NOSAVEDFILECHECK                                                          = 0x1
	MUTZ_REQUIRESAVEDFILECHECK                                                     = 0x400
	MUTZ_RESERVED                                                                  = 0x200
	MaxNumberOfEEInfoParams                                                        = 4
	NCRYPTBUFFER_CERT_BLOB                                                         = 47
	NCRYPTBUFFER_DATA                                                              = 1
	NCRYPTBUFFER_EMPTY                                                             = 0
	NCRYPTBUFFER_PKCS_ALG_ID                                                       = 43
	NCRYPTBUFFER_PKCS_ALG_OID                                                      = 41
	NCRYPTBUFFER_PKCS_ALG_PARAM                                                    = 42
	NCRYPTBUFFER_PKCS_ATTRS                                                        = 44
	NCRYPTBUFFER_PKCS_KEY_NAME                                                     = 45
	NCRYPTBUFFER_PKCS_OID                                                          = 40
	NCRYPTBUFFER_PKCS_SECRET                                                       = 46
	NCRYPTBUFFER_PROTECTION_DESCRIPTOR_STRING                                      = 3
	NCRYPTBUFFER_PROTECTION_FLAGS                                                  = 4
	NCRYPTBUFFER_SSL_CLEAR_KEY                                                     = 23
	NCRYPTBUFFER_SSL_CLIENT_RANDOM                                                 = 20
	NCRYPTBUFFER_SSL_HIGHEST_VERSION                                               = 22
	NCRYPTBUFFER_SSL_KEY_ARG_DATA                                                  = 24
	NCRYPTBUFFER_SSL_SERVER_RANDOM                                                 = 21
	NCRYPTBUFFER_VERSION                                                           = 0
	NCRYPT_ALLOW_ALL_USAGES                                                        = 0x00ffffff
	NCRYPT_ALLOW_ARCHIVING_FLAG                                                    = 0x00000004
	NCRYPT_ALLOW_DECRYPT_FLAG                                                      = 0x1
	NCRYPT_ALLOW_EXPORT_FLAG                                                       = 0x1
	NCRYPT_ALLOW_KEY_AGREEMENT_FLAG                                                = 0x00000004
	NCRYPT_ALLOW_PLAINTEXT_ARCHIVING_FLAG                                          = 0x00000008
	NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG                                             = 0x2
	NCRYPT_ALLOW_SIGNING_FLAG                                                      = 0x2
	NCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE                                         = 3
	NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION                                         = 4
	NCRYPT_CIPHER_INTERFACE                                                        = 1
	NCRYPT_CIPHER_OPERATION                                                        = 1
	NCRYPT_DO_NOT_FINALIZE_FLAG                                                    = 0x400
	NCRYPT_EXPORT_LEGACY_FLAG                                                      = 0x00000800
	NCRYPT_HASH_INTERFACE                                                          = 2
	NCRYPT_HASH_OPERATION                                                          = 2
	NCRYPT_IMPL_HARDWARE_FLAG                                                      = 0x1
	NCRYPT_IMPL_HARDWARE_RNG_FLAG                                                  = 0x00000010
	NCRYPT_IMPL_REMOVABLE_FLAG                                                     = 0x00000008
	NCRYPT_IMPL_SOFTWARE_FLAG                                                      = 0x2
	NCRYPT_KEY_STORAGE_INTERFACE                                                   = 0x00010001
	NCRYPT_MACHINE_KEY_FLAG                                                        = 0x20
	NCRYPT_MAX_ALG_ID_LENGTH                                                       = 512
	NCRYPT_MAX_KEY_NAME_LENGTH                                                     = 512
	NCRYPT_MAX_PROPERTY_DATA                                                       = 0x100000
	NCRYPT_MAX_PROPERTY_NAME                                                       = 64
	NCRYPT_NO_KEY_VALIDATION                                                       = 8
	NCRYPT_NO_PADDING_FLAG                                                         = 0x1
	NCRYPT_OVERWRITE_KEY_FLAG                                                      = 0x80
	NCRYPT_PAD_OAEP_FLAG                                                           = 0x4
	NCRYPT_PAD_PKCS1_FLAG                                                          = 0x2
	NCRYPT_PAD_PSS_FLAG                                                            = 0x8
	NCRYPT_PERSIST_FLAG                                                            = 0x80000000
	NCRYPT_PERSIST_ONLY_FLAG                                                       = 0x40000000
	NCRYPT_REGISTER_NOTIFY_FLAG                                                    = 0x1
	NCRYPT_RNG_OPERATION                                                           = 32
	NCRYPT_SCHANNEL_INTERFACE                                                      = 0x00010002
	NCRYPT_SCHANNEL_SIGNATURE_INTERFACE                                            = 0x00010003
	NCRYPT_SECRET_AGREEMENT_INTERFACE                                              = 4
	NCRYPT_SECRET_AGREEMENT_OPERATION                                              = 8
	NCRYPT_SIGNATURE_INTERFACE                                                     = 5
	NCRYPT_SIGNATURE_OPERATION                                                     = 16
	NCRYPT_SILENT_FLAG                                                             = 0x40
	NCRYPT_UI_FORCE_HIGH_PROTECTION_FLAG                                           = 0x2
	NCRYPT_UI_PROTECT_KEY_FLAG                                                     = 0x1
	NCRYPT_UNREGISTER_NOTIFY_FLAG                                                  = 0x2
	NCRYPT_WRITE_KEY_TO_LEGACY_STORE_FLAG                                          = 0x200
	NDR_ASCII_CHAR                                                                 = 0
	NDR_BIG_ENDIAN                                                                 = 0
	NDR_CHAR_REP_MASK                                                              = 15
	NDR_EBCDIC_CHAR                                                                = 1
	NDR_FLOAT_REP_MASK                                                             = 65280
	NDR_IBM_FLOAT                                                                  = 768
	NDR_IEEE_FLOAT                                                                 = 0
	NDR_INT_REP_MASK                                                               = 240
	NDR_LITTLE_ENDIAN                                                              = 16
	NDR_LOCAL_DATA_REPRESENTATION                                                  = 16
	NDR_LOCAL_ENDIAN                                                               = 16
	NDR_VAX_FLOAT                                                                  = 256
	NELOG_AT_Exec_Err                                                              = 3178
	NELOG_AT_cannot_read                                                           = 3174
	NELOG_AT_cannot_write                                                          = 3129
	NELOG_AT_sched_err                                                             = 3175
	NELOG_AT_schedule_file_created                                                 = 3176
	NELOG_Access_File_Bad                                                          = 3122
	NELOG_Build_Name                                                               = 3170
	NELOG_Cant_Make_Msg_File                                                       = 3130
	NELOG_DiskFT                                                                   = 3221
	NELOG_DriverNotLoaded                                                          = 5727
	NELOG_Entries_Lost                                                             = 3114
	NELOG_Error_in_DLL                                                             = 3256
	NELOG_Exec_Netservr_NoMem                                                      = 3131
	NELOG_FT_ErrLog_Too_Large                                                      = 3258
	NELOG_FT_Update_In_Progress                                                    = 3259
	NELOG_FailedToGetComputerName                                                  = 5726
	NELOG_FailedToRegisterSC                                                       = 5724
	NELOG_FailedToSetServiceStatus                                                 = 5725
	NELOG_File_Changed                                                             = 3253
	NELOG_Files_Dont_Fit                                                           = 3254
	NELOG_HardErr_From_Server                                                      = 3182
	NELOG_HotFix                                                                   = 3181
	NELOG_Init_Chardev_Err                                                         = 3124
	NELOG_Init_Exec_Fail                                                           = 3105
	NELOG_Init_OpenCreate_Err                                                      = 3110
	NELOG_Init_Seg_Overflow                                                        = 3120
	NELOG_Internal_Error                                                           = 3100
	NELOG_Invalid_Config_File                                                      = 3252
	NELOG_Invalid_Config_Line                                                      = 3251
	NELOG_Ioctl_Error                                                              = 3108
	NELOG_Joined_Domain                                                            = 3260
	NELOG_Joined_Workgroup                                                         = 3261
	NELOG_Lazy_Write_Err                                                           = 3180
	NELOG_LocalSecFail1                                                            = 3183
	NELOG_LocalSecFail2                                                            = 3184
	NELOG_LocalSecFail3                                                            = 3185
	NELOG_LocalSecGeneralFail                                                      = 3186
	NELOG_Mail_Slt_Err                                                             = 3173
	NELOG_Mailslot_err                                                             = 3127
	NELOG_Message_Send                                                             = 3172
	NELOG_Missing_Parameter                                                        = 3250
	NELOG_Msg_Log_Err                                                              = 3150
	NELOG_Msg_Sem_Shutdown                                                         = 3141
	NELOG_Msg_Shutdown                                                             = 3140
	NELOG_Msg_Unexpected_SMB_Type                                                  = 3152
	NELOG_Name_Expansion                                                           = 3171
	NELOG_Ncb_Error                                                                = 3106
	NELOG_Ncb_TooManyErr                                                           = 3126
	NELOG_NetBios                                                                  = 3111
	NELOG_NetWkSta_Internal_Error                                                  = 3190
	NELOG_NetWkSta_NCB_Err                                                         = 3195
	NELOG_NetWkSta_No_Resource                                                     = 3191
	NELOG_NetWkSta_Reset_Err                                                       = 3197
	NELOG_NetWkSta_SMB_Err                                                         = 3192
	NELOG_NetWkSta_Stuck_VC_Err                                                    = 3194
	NELOG_NetWkSta_Too_Many                                                        = 3198
	NELOG_NetWkSta_VC_Err                                                          = 3193
	NELOG_NetWkSta_Write_Behind_Err                                                = 3196
	NELOG_Net_Not_Started                                                          = 3107
	NELOG_NetlogonAddNameFailure                                                   = 5741
	NELOG_NetlogonAuthDCFail                                                       = 3210
	NELOG_NetlogonAuthDomainDowngraded                                             = 5791
	NELOG_NetlogonAuthNoDomainController                                           = 5719
	NELOG_NetlogonAuthNoTrustLsaSecret                                             = 5720
	NELOG_NetlogonAuthNoTrustSamAccount                                            = 5721
	NELOG_NetlogonAuthNoUplevelDomainController                                    = 5790
	NELOG_NetlogonBadSiteName                                                      = 5779
	NELOG_NetlogonBadSubnetName                                                    = 5780
	NELOG_NetlogonBrowserDriver                                                    = 5740
	NELOG_NetlogonChangeLogCorrupt                                                 = 5705
	NELOG_NetlogonDcOldSiteCovered                                                 = 5794
	NELOG_NetlogonDcSiteCovered                                                    = 5784
	NELOG_NetlogonDcSiteNotCovered                                                 = 5785
	NELOG_NetlogonDcSiteNotCoveredAuto                                             = 5795
	NELOG_NetlogonDnsDeregAborted                                                  = 5808
	NELOG_NetlogonDownLevelLogoffFailed                                            = 5708
	NELOG_NetlogonDownLevelLogonFailed                                             = 5707
	NELOG_NetlogonDuplicateMachineAccounts                                         = 5738
	NELOG_NetlogonDynamicDnsDeregisterFailure                                      = 5775
	NELOG_NetlogonDynamicDnsFailure                                                = 5782
	NELOG_NetlogonDynamicDnsRegisterFailure                                        = 5774
	NELOG_NetlogonDynamicDnsServerFailure                                          = 5781
	NELOG_NetlogonFailedAccountDelta                                               = 5735
	NELOG_NetlogonFailedDnsHostNameUpdate                                          = 5789
	NELOG_NetlogonFailedDomainDelta                                                = 5729
	NELOG_NetlogonFailedFileCreate                                                 = 5776
	NELOG_NetlogonFailedGlobalGroupDelta                                           = 5730
	NELOG_NetlogonFailedLocalGroupDelta                                            = 5731
	NELOG_NetlogonFailedPolicyDelta                                                = 5733
	NELOG_NetlogonFailedPrimary                                                    = 3223
	NELOG_NetlogonFailedSecretDelta                                                = 5736
	NELOG_NetlogonFailedSpnUpdate                                                  = 5788
	NELOG_NetlogonFailedToAddRpcInterface                                          = 5702
	NELOG_NetlogonFailedToCreateShare                                              = 5706
	NELOG_NetlogonFailedToReadMailslot                                             = 5703
	NELOG_NetlogonFailedToRegisterSC                                               = 5704
	NELOG_NetlogonFailedToUpdateTrustList                                          = 5701
	NELOG_NetlogonFailedTrustedDomainDelta                                         = 5734
	NELOG_NetlogonFailedUserDelta                                                  = 5732
	NELOG_NetlogonFullSyncCallFailed                                               = 5714
	NELOG_NetlogonFullSyncCallSuccess                                              = 5713
	NELOG_NetlogonFullSyncFailed                                                   = 5718
	NELOG_NetlogonFullSyncSuccess                                                  = 5717
	NELOG_NetlogonGcOldSiteCovered                                                 = 5796
	NELOG_NetlogonGcSiteCovered                                                    = 5786
	NELOG_NetlogonGcSiteNotCovered                                                 = 5787
	NELOG_NetlogonGcSiteNotCoveredAuto                                             = 5797
	NELOG_NetlogonGetSubnetToSite                                                  = 5777
	NELOG_NetlogonInvalidDwordParameterValue                                       = 5804
	NELOG_NetlogonInvalidGenericParameterValue                                     = 5803
	NELOG_NetlogonLanmanBdcsNotAllowed                                             = 5772
	NELOG_NetlogonNTLogoffFailed                                                   = 5710
	NELOG_NetlogonNTLogonFailed                                                    = 5709
	NELOG_NetlogonNdncOldSiteCovered                                               = 5798
	NELOG_NetlogonNdncSiteCovered                                                  = 5792
	NELOG_NetlogonNdncSiteNotCovered                                               = 5793
	NELOG_NetlogonNdncSiteNotCoveredAuto                                           = 5799
	NELOG_NetlogonNoAddressToSiteMapping                                           = 5802
	NELOG_NetlogonNoDynamicDns                                                     = 5773
	NELOG_NetlogonNoDynamicDnsManual                                               = 5806
	NELOG_NetlogonNoSiteForClient                                                  = 5778
	NELOG_NetlogonNoSiteForClients                                                 = 5807
	NELOG_NetlogonPartialSyncCallFailed                                            = 5712
	NELOG_NetlogonPartialSyncCallSuccess                                           = 5711
	NELOG_NetlogonPartialSyncFailed                                                = 5716
	NELOG_NetlogonPartialSyncSuccess                                               = 5715
	NELOG_NetlogonPasswdSetFailed                                                  = 3224
	NELOG_NetlogonRequireSignOrSealError                                           = 3227
	NELOG_NetlogonRpcCallCancelled                                                 = 5783
	NELOG_NetlogonRpcPortRequestFailure                                            = 5809
	NELOG_NetlogonSSIInitError                                                     = 5700
	NELOG_NetlogonServerAuthFailed                                                 = 5722
	NELOG_NetlogonServerAuthFailedNoAccount                                        = 5805
	NELOG_NetlogonServerAuthNoTrustSamAccount                                      = 5723
	NELOG_NetlogonSessionTypeWrong                                                 = 5770
	NELOG_NetlogonSpnCrackNamesFailure                                             = 5801
	NELOG_NetlogonSpnMultipleSamAccountNames                                       = 5800
	NELOG_NetlogonSyncError                                                        = 3226
	NELOG_NetlogonSystemError                                                      = 5737
	NELOG_NetlogonTooManyGlobalGroups                                              = 5739
	NELOG_NetlogonTrackingError                                                    = 3225
	NELOG_NoTranportLoaded                                                         = 5728
	NELOG_OEM_Code                                                                 = 3299
	NELOG_ReleaseMem_Alert                                                         = 3128
	NELOG_Remote_API                                                               = 3125
	NELOG_ReplAccessDenied                                                         = 3222
	NELOG_ReplBadExport                                                            = 3219
	NELOG_ReplBadImport                                                            = 3218
	NELOG_ReplBadMsg                                                               = 3215
	NELOG_ReplCannotMasterDir                                                      = 3207
	NELOG_ReplLogonFailed                                                          = 3211
	NELOG_ReplLostMaster                                                           = 3209
	NELOG_ReplMaxFiles                                                             = 3213
	NELOG_ReplMaxTreeDepth                                                         = 3214
	NELOG_ReplNetErr                                                               = 3212
	NELOG_ReplSignalFileErr                                                        = 3220
	NELOG_ReplSysErr                                                               = 3216
	NELOG_ReplUpdateError                                                          = 3208
	NELOG_ReplUserCurDir                                                           = 3206
	NELOG_ReplUserLoged                                                            = 3217
	NELOG_Resource_Shortage                                                        = 3101
	NELOG_RplAdapterResource                                                       = 5756
	NELOG_RplBackupDatabase                                                        = 5765
	NELOG_RplCheckConfigs                                                          = 5760
	NELOG_RplCheckSecurity                                                         = 5764
	NELOG_RplCreateProfiles                                                        = 5761
	NELOG_RplFileCopy                                                              = 5757
	NELOG_RplFileDelete                                                            = 5758
	NELOG_RplFilePerms                                                             = 5759
	NELOG_RplInitDatabase                                                          = 5766
	NELOG_RplInitRestoredDatabase                                                  = 5769
	NELOG_RplMessages                                                              = 5742
	NELOG_RplRegistry                                                              = 5762
	NELOG_RplReplaceRPLDISK                                                        = 5763
	NELOG_RplRestoreDatabaseFailure                                                = 5767
	NELOG_RplRestoreDatabaseSuccess                                                = 5768
	NELOG_RplSystem                                                                = 5744
	NELOG_RplUpgradeDBTo40                                                         = 5771
	NELOG_RplWkstaBbcFile                                                          = 5751
	NELOG_RplWkstaFileChecksum                                                     = 5749
	NELOG_RplWkstaFileLineCount                                                    = 5750
	NELOG_RplWkstaFileOpen                                                         = 5746
	NELOG_RplWkstaFileRead                                                         = 5747
	NELOG_RplWkstaFileSize                                                         = 5752
	NELOG_RplWkstaInternal                                                         = 5753
	NELOG_RplWkstaMemory                                                           = 5748
	NELOG_RplWkstaNetwork                                                          = 5755
	NELOG_RplWkstaTimeout                                                          = 5745
	NELOG_RplWkstaWrongVersion                                                     = 5754
	NELOG_RplXnsBoot                                                               = 5743
	NELOG_SMB_Illegal                                                              = 3112
	NELOG_Server_Lock_Failure                                                      = 3132
	NELOG_Service_Fail                                                             = 3113
	NELOG_Srv_Close_Failure                                                        = 3205
	NELOG_Srv_No_Mem_Grow                                                          = 3121
	NELOG_Srv_Thread_Failure                                                       = 3204
	NELOG_Srvnet_NB_Open                                                           = 3177
	NELOG_Srvnet_Not_Started                                                       = 3123
	NELOG_System_Error                                                             = 3257
	NELOG_System_Semaphore                                                         = 3109
	NELOG_UPS_CannotOpenDriver                                                     = 3233
	NELOG_UPS_CmdFileConfig                                                        = 3235
	NELOG_UPS_CmdFileError                                                         = 3232
	NELOG_UPS_CmdFileExec                                                          = 3236
	NELOG_UPS_PowerBack                                                            = 3234
	NELOG_UPS_PowerOut                                                             = 3230
	NELOG_UPS_Shutdown                                                             = 3231
	NELOG_Unable_To_Lock_Segment                                                   = 3102
	NELOG_Unable_To_Unlock_Segment                                                 = 3103
	NELOG_Uninstall_Service                                                        = 3104
	NELOG_VIO_POPUP_ERR                                                            = 3151
	NELOG_Wksta_Bad_Mailslot_SMB                                                   = 3165
	NELOG_Wksta_BiosThreadFailure                                                  = 3162
	NELOG_Wksta_Compname                                                           = 3161
	NELOG_Wksta_HostTab_Full                                                       = 3164
	NELOG_Wksta_Infoseg                                                            = 3160
	NELOG_Wksta_IniSeg                                                             = 3163
	NELOG_Wksta_SSIRelogon                                                         = 3167
	NELOG_Wksta_UASInit                                                            = 3166
	NELOG_Wrong_DLL_Version                                                        = 3255
	NERR_ACFFileIOFail                                                             = 2229
	NERR_ACFNoParent                                                               = 2232
	NERR_ACFNoRoom                                                                 = 2228
	NERR_ACFNotFound                                                               = 2219
	NERR_ACFNotLoaded                                                              = 2227
	NERR_ACFTooManyLists                                                           = 2230
	NERR_AccountExpired                                                            = 2239
	NERR_AccountLockedOut                                                          = 2702
	NERR_AccountUndefined                                                          = 2238
	NERR_AcctLimitExceeded                                                         = 2434
	NERR_ActiveConns                                                               = 2402
	NERR_AddForwarded                                                              = 2275
	NERR_AlertExists                                                               = 2430
	NERR_AlreadyExists                                                             = 2276
	NERR_AlreadyForwarded                                                          = 2274
	NERR_AlreadyLoggedOn                                                           = 2200
	NERR_BASE                                                                      = 2100
	NERR_BadAsgType                                                                = 2251
	NERR_BadComponent                                                              = 2356
	NERR_BadControlRecv                                                            = 2193
	NERR_BadDest                                                                   = 2382
	NERR_BadDev                                                                    = 2341
	NERR_BadDevString                                                              = 2340
	NERR_BadDosFunction                                                            = 2502
	NERR_BadDosRetCode                                                             = 2500
	NERR_BadEventName                                                              = 2143
	NERR_BadFileCheckSum                                                           = 2504
	NERR_BadPassword                                                               = 2203
	NERR_BadPasswordCore                                                           = 2403
	NERR_BadQueueDevString                                                         = 2334
	NERR_BadQueuePriority                                                          = 2335
	NERR_BadReceive                                                                = 2282
	NERR_BadRecipient                                                              = 2433
	NERR_BadServiceName                                                            = 2185
	NERR_BadServiceProgName                                                        = 2188
	NERR_BadSource                                                                 = 2381
	NERR_BadTransactConfig                                                         = 2141
	NERR_BadUasConfig                                                              = 2450
	NERR_BadUsername                                                               = 2202
	NERR_BrowserConfiguredToNotRun                                                 = 2550
	NERR_BrowserNotStarted                                                         = 2139
	NERR_BrowserTableIncomplete                                                    = 2319
	NERR_BufTooSmall                                                               = 2123
	NERR_CallingRplSrvr                                                            = 2515
	NERR_CanNotGrowSegment                                                         = 2233
	NERR_CanNotGrowUASFile                                                         = 2456
	NERR_CantConnectRplSrvr                                                        = 2513
	NERR_CantOpenImageFile                                                         = 2514
	NERR_CantType                                                                  = 2357
	NERR_CfgCompNotFound                                                           = 2146
	NERR_CfgParamNotFound                                                          = 2147
	NERR_ClientNameNotFound                                                        = 2312
	NERR_CommDevInUse                                                              = 2343
	NERR_ComputerAccountNotFound                                                   = 2697
	NERR_DCNotFound                                                                = 2453
	NERR_DataTypeInvalid                                                           = 2167
	NERR_DatabaseUpToDate                                                          = 2248
	NERR_DefaultJoinRequired                                                       = 2694
	NERR_DelComputerName                                                           = 2278
	NERR_DeleteLater                                                               = 2298
	NERR_DestExists                                                                = 2153
	NERR_DestIdle                                                                  = 2158
	NERR_DestInvalidOp                                                             = 2159
	NERR_DestInvalidState                                                          = 2162
	NERR_DestNoRoom                                                                = 2157
	NERR_DestNotFound                                                              = 2152
	NERR_DevInUse                                                                  = 2404
	NERR_DevInvalidOpCode                                                          = 2331
	NERR_DevNotFound                                                               = 2332
	NERR_DevNotOpen                                                                = 2333
	NERR_DevNotRedirected                                                          = 2107
	NERR_DeviceIsShared                                                            = 2252
	NERR_DeviceNotShared                                                           = 2311
	NERR_DeviceShareConflict                                                       = 2318
	NERR_DfsAlreadyShared                                                          = 2664
	NERR_DfsBadRenamePath                                                          = 2671
	NERR_DfsCantCreateJunctionPoint                                                = 2669
	NERR_DfsCantRemoveDfsRoot                                                      = 2682
	NERR_DfsCantRemoveLastServerShare                                              = 2677
	NERR_DfsChildOrParentInDfs                                                     = 2683
	NERR_DfsCyclicalName                                                           = 2674
	NERR_DfsDataIsIdentical                                                        = 2681
	NERR_DfsDuplicateService                                                       = 2676
	NERR_DfsInconsistent                                                           = 2679
	NERR_DfsInternalCorruption                                                     = 2660
	NERR_DfsInternalError                                                          = 2690
	NERR_DfsLeafVolume                                                             = 2667
	NERR_DfsNoSuchServer                                                           = 2673
	NERR_DfsNoSuchShare                                                            = 2665
	NERR_DfsNoSuchVolume                                                           = 2662
	NERR_DfsNotALeafVolume                                                         = 2666
	NERR_DfsNotSupportedInServerDfs                                                = 2675
	NERR_DfsServerNotDfsAware                                                      = 2670
	NERR_DfsServerUpgraded                                                         = 2680
	NERR_DfsVolumeAlreadyExists                                                    = 2663
	NERR_DfsVolumeDataCorrupt                                                      = 2661
	NERR_DfsVolumeHasMultipleServers                                               = 2668
	NERR_DfsVolumeIsInterDfs                                                       = 2678
	NERR_DfsVolumeIsOffline                                                        = 2672
	NERR_DifferentServers                                                          = 2383
	NERR_DriverNotFound                                                            = 2166
	NERR_DupNameReboot                                                             = 2144
	NERR_DuplicateName                                                             = 2297
	NERR_DuplicateShare                                                            = 2118
	NERR_ErrCommRunSrv                                                             = 2389
	NERR_ErrorExecingGhost                                                         = 2391
	NERR_ExecFailure                                                               = 2315
	NERR_FileIdNotFound                                                            = 2314
	NERR_GroupExists                                                               = 2223
	NERR_GroupNotFound                                                             = 2220
	NERR_GrpMsgProcessor                                                           = 2280
	NERR_ImageParamErr                                                             = 2508
	NERR_InUseBySpooler                                                            = 2342
	NERR_IncompleteDel                                                             = 2299
	NERR_InternalError                                                             = 2140
	NERR_InvalidAPI                                                                = 2142
	NERR_InvalidComputer                                                           = 2351
	NERR_InvalidDatabase                                                           = 2247
	NERR_InvalidDevice                                                             = 2294
	NERR_InvalidLana                                                               = 2400
	NERR_InvalidLogSeek                                                            = 2440
	NERR_InvalidLogonHours                                                         = 2241
	NERR_InvalidMaxUsers                                                           = 2122
	NERR_InvalidUASOp                                                              = 2451
	NERR_InvalidWorkgroupName                                                      = 2695
	NERR_InvalidWorkstation                                                        = 2240
	NERR_IsDfsShare                                                                = 2321
	NERR_ItemNotFound                                                              = 2115
	NERR_JobInvalidState                                                           = 2164
	NERR_JobNoRoom                                                                 = 2156
	NERR_JobNotFound                                                               = 2151
	NERR_LanmanIniError                                                            = 2131
	NERR_LastAdmin                                                                 = 2452
	NERR_LineTooLong                                                               = 2149
	NERR_LocalDrive                                                                = 2405
	NERR_LocalForward                                                              = 2279
	NERR_LogFileChanged                                                            = 2378
	NERR_LogFileCorrupt                                                            = 2379
	NERR_LogOverflow                                                               = 2377
	NERR_LogonDomainExists                                                         = 2216
	NERR_LogonNoUserPath                                                           = 2211
	NERR_LogonScriptError                                                          = 2212
	NERR_LogonServerConflict                                                       = 2210
	NERR_LogonServerNotFound                                                       = 2215
	NERR_LogonTrackingError                                                        = 2454
	NERR_LogonsPaused                                                              = 2209
	NERR_MaxLenExceeded                                                            = 2354
	NERR_MsgAlreadyStarted                                                         = 2271
	NERR_MsgInitFailed                                                             = 2272
	NERR_MsgNotStarted                                                             = 2284
	NERR_MultipleNets                                                              = 2300
	NERR_NameInUse                                                                 = 2283
	NERR_NameNotForwarded                                                          = 2288
	NERR_NameNotFound                                                              = 2273
	NERR_NameUsesIncompatibleCodePage                                              = 2696
	NERR_NetNameNotFound                                                           = 2310
	NERR_NetNotStarted                                                             = 2102
	NERR_NetlogonNotStarted                                                        = 2455
	NERR_NetworkError                                                              = 2136
	NERR_NoAlternateServers                                                        = 2467
	NERR_NoCommDevs                                                                = 2337
	NERR_NoComputerName                                                            = 2270
	NERR_NoForwardName                                                             = 2286
	NERR_NoNetworkResource                                                         = 2105
	NERR_NoRoom                                                                    = 2119
	NERR_NoRplBootSystem                                                           = 2505
	NERR_NoSuchAlert                                                               = 2432
	NERR_NoSuchConnection                                                          = 2462
	NERR_NoSuchServer                                                              = 2460
	NERR_NoSuchSession                                                             = 2461
	NERR_NonDosFloppyUsed                                                          = 2510
	NERR_NonValidatedLogon                                                         = 2217
	NERR_NotInCache                                                                = 2235
	NERR_NotInDispatchTbl                                                          = 2192
	NERR_NotLocalDomain                                                            = 2320
	NERR_NotLocalName                                                              = 2285
	NERR_NotLoggedOn                                                               = 2201
	NERR_NotPrimary                                                                = 2226
	NERR_OpenFiles                                                                 = 2401
	NERR_PasswordCantChange                                                        = 2243
	NERR_PasswordExpired                                                           = 2242
	NERR_PasswordFilterError                                                       = 2705
	NERR_PasswordHistConflict                                                      = 2244
	NERR_PasswordMismatch                                                          = 2458
	NERR_PasswordMustChange                                                        = 2701
	NERR_PasswordNotComplexEnough                                                  = 2704
	NERR_PasswordTooLong                                                           = 2703
	NERR_PasswordTooRecent                                                         = 2246
	NERR_PasswordTooShort                                                          = 2245
	NERR_PausedRemote                                                              = 2281
	NERR_PersonalSku                                                               = 2698
	NERR_ProcNoRespond                                                             = 2160
	NERR_ProcNotFound                                                              = 2168
	NERR_ProfileCleanup                                                            = 2372
	NERR_ProfileFileTooBig                                                         = 2370
	NERR_ProfileLoadErr                                                            = 2374
	NERR_ProfileOffset                                                             = 2371
	NERR_ProfileSaveErr                                                            = 2375
	NERR_ProfileUnknownCmd                                                         = 2373
	NERR_ProgNeedsExtraMem                                                         = 2501
	NERR_QExists                                                                   = 2154
	NERR_QInvalidState                                                             = 2163
	NERR_QNoRoom                                                                   = 2155
	NERR_QNotFound                                                                 = 2150
	NERR_QueueNotFound                                                             = 2338
	NERR_RPL_CONNECTED                                                             = 2519
	NERR_RedirectedPath                                                            = 2117
	NERR_RemoteBootFailed                                                          = 2503
	NERR_RemoteErr                                                                 = 2127
	NERR_RemoteFull                                                                = 2287
	NERR_RemoteOnly                                                                = 2106
	NERR_ResourceExists                                                            = 2225
	NERR_ResourceNotFound                                                          = 2222
	NERR_RplAdapterInfoCorrupted                                                   = 2625
	NERR_RplAdapterNameUnavailable                                                 = 2633
	NERR_RplAdapterNotFound                                                        = 2637
	NERR_RplBackupDatabase                                                         = 2636
	NERR_RplBadDatabase                                                            = 2612
	NERR_RplBadRegistry                                                            = 2611
	NERR_RplBootInUse                                                              = 2635
	NERR_RplBootInfoCorrupted                                                      = 2628
	NERR_RplBootNameUnavailable                                                    = 2640
	NERR_RplBootNotFound                                                           = 2631
	NERR_RplBootRestart                                                            = 2511
	NERR_RplBootServiceTerm                                                        = 2517
	NERR_RplBootStartFailed                                                        = 2518
	NERR_RplCannotEnum                                                             = 2615
	NERR_RplConfigInfoCorrupted                                                    = 2623
	NERR_RplConfigNameUnavailable                                                  = 2641
	NERR_RplConfigNotEmpty                                                         = 2634
	NERR_RplConfigNotFound                                                         = 2624
	NERR_RplIncompatibleProfile                                                    = 2632
	NERR_RplInternal                                                               = 2626
	NERR_RplLoadrDiskErr                                                           = 2507
	NERR_RplLoadrNetBiosErr                                                        = 2506
	NERR_RplNeedsRPLUSERAcct                                                       = 2630
	NERR_RplNoAdaptersStarted                                                      = 2610
	NERR_RplNotRplServer                                                           = 2614
	NERR_RplProfileInfoCorrupted                                                   = 2619
	NERR_RplProfileNameUnavailable                                                 = 2621
	NERR_RplProfileNotEmpty                                                        = 2622
	NERR_RplProfileNotFound                                                        = 2620
	NERR_RplRplfilesShare                                                          = 2613
	NERR_RplSrvrCallFailed                                                         = 2512
	NERR_RplVendorInfoCorrupted                                                    = 2627
	NERR_RplVendorNameUnavailable                                                  = 2639
	NERR_RplVendorNotFound                                                         = 2638
	NERR_RplWkstaInfoCorrupted                                                     = 2616
	NERR_RplWkstaNameUnavailable                                                   = 2618
	NERR_RplWkstaNeedsUserAcct                                                     = 2629
	NERR_RplWkstaNotFound                                                          = 2617
	NERR_RunSrvPaused                                                              = 2385
	NERR_ServerNotStarted                                                          = 2114
	NERR_ServiceCtlBusy                                                            = 2187
	NERR_ServiceCtlNotValid                                                        = 2191
	NERR_ServiceCtlTimeout                                                         = 2186
	NERR_ServiceEntryLocked                                                        = 2183
	NERR_ServiceInstalled                                                          = 2182
	NERR_ServiceKillProc                                                           = 2190
	NERR_ServiceNotCtrl                                                            = 2189
	NERR_ServiceNotInstalled                                                       = 2184
	NERR_ServiceNotStarting                                                        = 2194
	NERR_ServiceTableFull                                                          = 2181
	NERR_ServiceTableLocked                                                        = 2180
	NERR_SetupAlreadyJoined                                                        = 2691
	NERR_SetupDomainController                                                     = 2693
	NERR_SetupNotJoined                                                            = 2692
	NERR_ShareMem                                                                  = 2104
	NERR_ShareNotFound                                                             = 2392
	NERR_SourceIsDir                                                               = 2380
	NERR_SpeGroupOp                                                                = 2234
	NERR_SpoolNoMemory                                                             = 2165
	NERR_SpoolerNotLoaded                                                          = 2161
	NERR_StandaloneLogon                                                           = 2214
	NERR_StartingRplBoot                                                           = 2516
	NERR_Success                                                                   = 0
	NERR_SyncRequired                                                              = 2249
	NERR_TimeDiffAtDC                                                              = 2457
	NERR_TmpFile                                                                   = 2316
	NERR_TooManyAlerts                                                             = 2431
	NERR_TooManyConnections                                                        = 2465
	NERR_TooManyEntries                                                            = 2362
	NERR_TooManyFiles                                                              = 2466
	NERR_TooManyImageParams                                                        = 2509
	NERR_TooManyItems                                                              = 2121
	NERR_TooManyNames                                                              = 2277
	NERR_TooManyServers                                                            = 2463
	NERR_TooManySessions                                                           = 2464
	NERR_TooMuchData                                                               = 2317
	NERR_TruncatedBroadcast                                                        = 2289
	NERR_TryDownLevel                                                              = 2470
	NERR_UPSDriverNotStarted                                                       = 2480
	NERR_UPSInvalidCommPort                                                        = 2482
	NERR_UPSInvalidConfig                                                          = 2481
	NERR_UPSShutdownFailed                                                         = 2484
	NERR_UPSSignalAsserted                                                         = 2483
	NERR_UnableToAddName_F                                                         = 2205
	NERR_UnableToAddName_W                                                         = 2204
	NERR_UnableToDelName_F                                                         = 2207
	NERR_UnableToDelName_W                                                         = 2206
	NERR_UnknownDevDir                                                             = 2116
	NERR_UnknownServer                                                             = 2103
	NERR_UseNotFound                                                               = 2250
	NERR_UserExists                                                                = 2224
	NERR_UserInGroup                                                               = 2236
	NERR_UserLogon                                                                 = 2231
	NERR_UserNotFound                                                              = 2221
	NERR_UserNotInGroup                                                            = 2237
	NERR_WkstaInconsistentState                                                    = 2137
	NERR_WkstaNotStarted                                                           = 2138
	NERR_WriteFault                                                                = 2295
	NETBIOS_NAME_LEN                                                               = 16
	NETCONS_INCLUDED                                                               = 0
	NETERR_INCLUDED                                                                = 0
	NETLOGON_CONTROL_BACKUP_CHANGE_LOG                                             = 0xFFFC
	NETLOGON_CONTROL_BREAKPOINT                                                    = 0xFFFF
	NETLOGON_CONTROL_CHANGE_PASSWORD                                               = 9
	NETLOGON_CONTROL_FIND_USER                                                     = 8
	NETLOGON_CONTROL_FORCE_DNS_REG                                                 = 11
	NETLOGON_CONTROL_PDC_REPLICATE                                                 = 4
	NETLOGON_CONTROL_QUERY                                                         = 1
	NETLOGON_CONTROL_QUERY_DNS_REG                                                 = 12
	NETLOGON_CONTROL_REDISCOVER                                                    = 5
	NETLOGON_CONTROL_REPLICATE                                                     = 2
	NETLOGON_CONTROL_SET_DBFLAG                                                    = 0xFFFE
	NETLOGON_CONTROL_SYNCHRONIZE                                                   = 3
	NETLOGON_CONTROL_TC_QUERY                                                      = 6
	NETLOGON_CONTROL_TC_VERIFY                                                     = 10
	NETLOGON_CONTROL_TRANSPORT_NOTIFY                                              = 7
	NETLOGON_CONTROL_TRUNCATE_LOG                                                  = 0xFFFD
	NETLOGON_CONTROL_UNLOAD_NETLOGON_DLL                                           = 0xFFFB
	NETLOGON_DNS_UPDATE_FAILURE                                                    = 0x40
	NETLOGON_FULL_SYNC_REPLICATION                                                 = 0x04
	NETLOGON_HAS_IP                                                                = 0x10
	NETLOGON_HAS_TIMESERV                                                          = 0x20
	NETLOGON_REDO_NEEDED                                                           = 0x08
	NETLOGON_REPLICATION_IN_PROGRESS                                               = 0x02
	NETLOGON_REPLICATION_NEEDED                                                    = 0x01
	NETLOGON_VERIFY_STATUS_RETURNED                                                = 0x80
	NETSCAPE_SIGN_CA_CERT_TYPE                                                     = 0x01
	NETSCAPE_SIGN_CERT_TYPE                                                        = 0x10
	NETSCAPE_SMIME_CA_CERT_TYPE                                                    = 0x02
	NETSCAPE_SMIME_CERT_TYPE                                                       = 0x20
	NETSCAPE_SSL_CA_CERT_TYPE                                                      = 0x04
	NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE                                             = 0x80
	NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE                                             = 0x40
	NETSETUP_ACCT_CREATE                                                           = 0x00000002
	NETSETUP_ACCT_DELETE                                                           = 0x00000004
	NETSETUP_DEFER_SPN_SET                                                         = 0x00000100
	NETSETUP_DOMAIN_JOIN_IF_JOINED                                                 = 0x00000020
	NETSETUP_IGNORE_UNSUPPORTED_FLAGS                                              = 0x10000000
	NETSETUP_INSTALL_INVOCATION                                                    = 0x00040000
	NETSETUP_JOIN_DOMAIN                                                           = 0x00000001
	NETSETUP_JOIN_UNSECURE                                                         = 0x00000040
	NETSETUP_MACHINE_PWD_PASSED                                                    = 0x00000080
	NETSETUP_VALID_UNJOIN_FLAGS                                                    = 268435460
	NETSETUP_WIN9X_UPGRADE                                                         = 0x00000010
	NET_API_FUNCTION                                                               = 0
	NET_IGNORE_UNSUPPORTED_FLAGS                                                   = 0x01
	NET_VALIDATE_BAD_PASSWORD_COUNT                                                = 0x00000008
	NET_VALIDATE_BAD_PASSWORD_TIME                                                 = 0x00000002
	NET_VALIDATE_LOCKOUT_TIME                                                      = 0x00000004
	NET_VALIDATE_PASSWORD_HISTORY                                                  = 0x00000020
	NET_VALIDATE_PASSWORD_HISTORY_LENGTH                                           = 0x00000010
	NET_VALIDATE_PASSWORD_LAST_SET                                                 = 0x00000001
	NFS_ALL                                                                        = 0x10
	NFS_BUTTON                                                                     = 0x8
	NFS_EDIT                                                                       = 0x1
	NFS_LISTCOMBO                                                                  = 0x4
	NFS_STATIC                                                                     = 0x2
	NFS_USEFONTASSOC                                                               = 0x20
	NM_CHAR                                                                        = 18446744073709551598
	NM_CLICK                                                                       = 18446744073709551614
	NM_CUSTOMDRAW                                                                  = 18446744073709551604
	NM_DBLCLK                                                                      = 18446744073709551613
	NM_FIRST                                                                       = 0
	NM_GETCUSTOMSPLITRECT                                                          = 18446744073709550369
	NM_HOVER                                                                       = 18446744073709551603
	NM_KEYDOWN                                                                     = 18446744073709551601
	NM_KILLFOCUS                                                                   = 18446744073709551608
	NM_LAST                                                                        = 18446744073709551517
	NM_LDOWN                                                                       = 18446744073709551596
	NM_NCHITTEST                                                                   = 18446744073709551602
	NM_OUTOFMEMORY                                                                 = 18446744073709551615
	NM_RCLICK                                                                      = 18446744073709551611
	NM_RDBLCLK                                                                     = 18446744073709551610
	NM_RDOWN                                                                       = 18446744073709551595
	NM_RELEASEDCAPTURE                                                             = 18446744073709551600
	NM_RETURN                                                                      = 18446744073709551612
	NM_SETCURSOR                                                                   = 18446744073709551599
	NM_SETFOCUS                                                                    = 18446744073709551609
	NM_THEMECHANGED                                                                = 18446744073709551594
	NM_TOOLTIPSCREATED                                                             = 18446744073709551597
	NNLEN                                                                          = 80
	NON_VALIDATED_LOGON                                                            = 3
	NO_INHERITANCE                                                                 = 0x0
	NO_PERMISSION_REQUIRED                                                         = 0x00000001
	NSTCDHPOS_ONTOP                                                                = -1
	NSWF_ENUMERATE_BEST_EFFORT                                                     = 0x00010000
	NSWF_TRAVERSE_ONLY_STORAGE                                                     = 0x00020000
	NT351_INTERFACE_SIZE                                                           = 0x40
	NT_CONSOLE_PROPS_SIG                                                           = 0xa0000002
	NT_FE_CONSOLE_PROPS_SIG                                                        = 0xa0000004
	NULL_USERSETINFO_PASSWD                                                        = "              "
	NUMPRS_CURRENCY                                                                = 0x0400
	NUMPRS_DECIMAL                                                                 = 0x0100
	NUMPRS_EXPONENT                                                                = 0x0800
	NUMPRS_HEX_OCT                                                                 = 0x0040
	NUMPRS_INEXACT                                                                 = 0x20000
	NUMPRS_LEADING_MINUS                                                           = 0x0010
	NUMPRS_LEADING_PLUS                                                            = 0x0004
	NUMPRS_LEADING_WHITE                                                           = 0x0001
	NUMPRS_NEG                                                                     = 0x10000
	NUMPRS_PARENS                                                                  = 0x0080
	NUMPRS_STD                                                                     = 0x1FFF
	NUMPRS_THOUSANDS                                                               = 0x0200
	NUMPRS_TRAILING_MINUS                                                          = 0x0020
	NUMPRS_TRAILING_PLUS                                                           = 0x0008
	NUMPRS_TRAILING_WHITE                                                          = 0x0002
	NUMPRS_USE_ALL                                                                 = 0x1000
	NUM_POINTS                                                                     = 3
	OBSOLETE_DISK_GET_WRITE_CACHE_STATE                                            = 475356
	OBSOLETE_IOCTL_STORAGE_RESET_BUS                                               = 3002368
	OBSOLETE_IOCTL_STORAGE_RESET_DEVICE                                            = 3002372
	OCSP_BASIC_BY_KEY_RESPONDER_ID                                                 = 2
	OCSP_BASIC_BY_NAME_RESPONDER_ID                                                = 1
	OCSP_BASIC_GOOD_CERT_STATUS                                                    = 0
	OCSP_BASIC_RESPONSE_V1                                                         = 0
	OCSP_BASIC_REVOKED_CERT_STATUS                                                 = 1
	OCSP_BASIC_UNKNOWN_CERT_STATUS                                                 = 2
	OCSP_INTERNAL_ERROR_RESPONSE                                                   = 2
	OCSP_MALFORMED_REQUEST_RESPONSE                                                = 1
	OCSP_REQUEST_V1                                                                = 0
	OCSP_SIG_REQUIRED_RESPONSE                                                     = 5
	OCSP_SUCCESSFUL_RESPONSE                                                       = 0
	OCSP_TRY_LATER_RESPONSE                                                        = 3
	OCSP_UNAUTHORIZED_RESPONSE                                                     = 6
	ODT_HEADER                                                                     = 100
	ODT_LISTVIEW                                                                   = 102
	ODT_TAB                                                                        = 101
	OI_ASYNC                                                                       = 0xffffeeee
	OI_DEFAULT                                                                     = 0x0
	OLECMD_TASKDLGID_ONBEFOREUNLOAD                                                = 1
	OLECREATE_LEAVERUNNING                                                         = 0x1
	OLEIVERB_DISCARDUNDOSTATE                                                      = -6
	OLEIVERB_HIDE                                                                  = -3
	OLEIVERB_INPLACEACTIVATE                                                       = -5
	OLEIVERB_OPEN                                                                  = -2
	OLEIVERB_PRIMARY                                                               = 0
	OLEIVERB_SHOW                                                                  = -1
	OLEIVERB_UIACTIVATE                                                            = -4
	OPAQUEKEYBLOB                                                                  = 0x9
	OPENPROPS_INHIBITPIF                                                           = 0x8000
	OPENPROPS_NONE                                                                 = 0x0000
	PANE_NAVIGATION                                                                = 5
	PANE_OFFLINE                                                                   = 2
	PANE_PRINTER                                                                   = 3
	PANE_PRIVACY                                                                   = 7
	PANE_PROGRESS                                                                  = 6
	PANE_SSL                                                                       = 4
	PANE_ZONE                                                                      = 1
	PARAMFLAG_FHASCUSTDATA                                                         = 64
	PARAMFLAG_FHASDEFAULT                                                          = 32
	PARAMFLAG_FIN                                                                  = 1
	PARAMFLAG_FLCID                                                                = 4
	PARAMFLAG_FOPT                                                                 = 16
	PARAMFLAG_FOUT                                                                 = 2
	PARAMFLAG_FRETVAL                                                              = 8
	PARAMFLAG_NONE                                                                 = 0
	PARMNUM_ALL                                                                    = 0
	PARMNUM_BASE_INFOLEVEL                                                         = 1000
	PARM_ERROR_NONE                                                                = 0
	PARTITION_ENTRY_UNUSED                                                         = 0x00
	PARTITION_EXTENDED                                                             = 0x05
	PARTITION_FAT32                                                                = 0x0B
	PARTITION_FAT32_XINT13                                                         = 0x0C
	PARTITION_FAT_12                                                               = 0x01
	PARTITION_FAT_16                                                               = 0x04
	PARTITION_HUGE                                                                 = 0x06
	PARTITION_IFS                                                                  = 0x07
	PARTITION_LDM                                                                  = 0x42
	PARTITION_NTFT                                                                 = 0x80
	PARTITION_OS2BOOTMGR                                                           = 0x0A
	PARTITION_PREP                                                                 = 0x41
	PARTITION_UNIX                                                                 = 0x63
	PARTITION_XENIX_1                                                              = 0x02
	PARTITION_XENIX_2                                                              = 0x03
	PARTITION_XINT13                                                               = 0x0E
	PARTITION_XINT13_EXTENDED                                                      = 0x0F
	PASSWORD_EXPIRED                                                               = 2
	PATHLEN                                                                        = 256
	PBM_DELTAPOS                                                                   = 1027
	PBM_GETPOS                                                                     = 1032
	PBM_GETRANGE                                                                   = 1031
	PBM_SETBARCOLOR                                                                = 1033
	PBM_SETBKCOLOR                                                                 = 8193
	PBM_SETMARQUEE                                                                 = 1034
	PBM_SETPOS                                                                     = 1026
	PBM_SETRANGE                                                                   = 1025
	PBM_SETRANGE32                                                                 = 1030
	PBM_SETSTEP                                                                    = 1028
	PBM_STEPIT                                                                     = 1029
	PBS_MARQUEE                                                                    = 0x8
	PBS_SMOOTH                                                                     = 0x1
	PBS_VERTICAL                                                                   = 0x4
	PCS_FATAL                                                                      = 0x80000000
	PCS_PATHTOOLONG                                                                = 0x00000008
	PCS_REMOVEDCHAR                                                                = 0x00000002
	PCS_REPLACEDCHAR                                                               = 0x00000001
	PCS_TRUNCATED                                                                  = 0x00000004
	PDTIMER_RESET                                                                  = 0x00000001
	PERM_FILE_CREATE                                                               = 0x4
	PERM_FILE_READ                                                                 = 0x1
	PERM_FILE_WRITE                                                                = 0x2
	PGB_BOTTOMORRIGHT                                                              = 1
	PGB_TOPORLEFT                                                                  = 0
	PGF_CALCHEIGHT                                                                 = 2
	PGF_CALCWIDTH                                                                  = 1
	PGF_DEPRESSED                                                                  = 4
	PGF_GRAYED                                                                     = 2
	PGF_HOT                                                                        = 8
	PGF_INVISIBLE                                                                  = 0
	PGF_NORMAL                                                                     = 1
	PGF_SCROLLDOWN                                                                 = 2
	PGF_SCROLLLEFT                                                                 = 4
	PGF_SCROLLRIGHT                                                                = 8
	PGF_SCROLLUP                                                                   = 1
	PGK_CONTROL                                                                    = 2
	PGK_MENU                                                                       = 4
	PGK_SHIFT                                                                      = 1
	PGM_FIRST                                                                      = 0x1400
	PGM_FORWARDMOUSE                                                               = 5123
	PGM_GETBKCOLOR                                                                 = 5125
	PGM_GETBORDER                                                                  = 5127
	PGM_GETBUTTONSIZE                                                              = 5131
	PGM_GETBUTTONSTATE                                                             = 5132
	PGM_GETDROPTARGET                                                              = 8196
	PGM_GETPOS                                                                     = 5129
	PGM_RECALCSIZE                                                                 = 5122
	PGM_SETBKCOLOR                                                                 = 5124
	PGM_SETBORDER                                                                  = 5126
	PGM_SETBUTTONSIZE                                                              = 5130
	PGM_SETCHILD                                                                   = 5121
	PGM_SETPOS                                                                     = 5128
	PGM_SETSCROLLINFO                                                              = 5133
	PGN_CALCSIZE                                                                   = 18446744073709550714
	PGN_FIRST                                                                      = 18446744073709550716
	PGN_HOTITEMCHANGE                                                              = 18446744073709550713
	PGN_LAST                                                                       = 18446744073709550666
	PGN_SCROLL                                                                     = 18446744073709550715
	PGS_AUTOSCROLL                                                                 = 0x2
	PGS_DRAGNDROP                                                                  = 0x4
	PGS_HORZ                                                                       = 0x1
	PGS_VERT                                                                       = 0x0
	PIDASI_AVG_DATA_RATE                                                           = 0x00000004
	PIDASI_CHANNEL_COUNT                                                           = 0x00000007
	PIDASI_COMPRESSION                                                             = 0x0000000a
	PIDASI_FORMAT                                                                  = 0x00000002
	PIDASI_SAMPLE_RATE                                                             = 0x00000005
	PIDASI_SAMPLE_SIZE                                                             = 0x00000006
	PIDASI_STREAM_NAME                                                             = 0x00000009
	PIDASI_STREAM_NUMBER                                                           = 0x00000008
	PIDASI_TIMELENGTH                                                              = 0x00000003
	PIDDI_THUMBNAIL                                                                = 2
	PIDDRSI_DESCRIPTION                                                            = 3
	PIDDRSI_PLAYCOUNT                                                              = 4
	PIDDRSI_PLAYEXPIRES                                                            = 6
	PIDDRSI_PLAYSTARTS                                                             = 5
	PIDDRSI_PROTECTED                                                              = 2
	PIDDSI_BYTECOUNT                                                               = 0x00000004
	PIDDSI_CATEGORY                                                                = 0x00000002
	PIDDSI_COMPANY                                                                 = 0x0000000F
	PIDDSI_DOCPARTS                                                                = 0x0000000D
	PIDDSI_HEADINGPAIR                                                             = 0x0000000C
	PIDDSI_HIDDENCOUNT                                                             = 0x00000009
	PIDDSI_LINECOUNT                                                               = 0x00000005
	PIDDSI_LINKSDIRTY                                                              = 0x00000010
	PIDDSI_MANAGER                                                                 = 0x0000000E
	PIDDSI_MMCLIPCOUNT                                                             = 0x0000000A
	PIDDSI_NOTECOUNT                                                               = 0x00000008
	PIDDSI_PARCOUNT                                                                = 0x00000006
	PIDDSI_PRESFORMAT                                                              = 0x00000003
	PIDDSI_SCALE                                                                   = 0x0000000B
	PIDDSI_SLIDECOUNT                                                              = 0x00000007
	PIDISF_CACHEDSTICKY                                                            = 0x00000002
	PIDISF_CACHEIMAGES                                                             = 0x00000010
	PIDISF_FOLLOWALLLINKS                                                          = 0x00000020
	PIDISF_RECENTLYCHANGED                                                         = 0x00000001
	PIDISM_DONTWATCH                                                               = 2
	PIDISM_GLOBAL                                                                  = 0
	PIDISM_WATCH                                                                   = 1
	PIDISR_NEEDS_ADD                                                               = 1
	PIDISR_NEEDS_DELETE                                                            = 3
	PIDISR_NEEDS_UPDATE                                                            = 2
	PIDISR_UP_TO_DATE                                                              = 0
	PIDMSI_COPYRIGHT                                                               = 11
	PIDMSI_EDITOR                                                                  = 2
	PIDMSI_OWNER                                                                   = 8
	PIDMSI_PRODUCTION                                                              = 10
	PIDMSI_PROJECT                                                                 = 6
	PIDMSI_RATING                                                                  = 9
	PIDMSI_SEQUENCE_NO                                                             = 5
	PIDMSI_SOURCE                                                                  = 4
	PIDMSI_STATUS                                                                  = 7
	PIDMSI_SUPPLIER                                                                = 3
	PIDSI_ALBUM                                                                    = 4
	PIDSI_APPNAME                                                                  = 18
	PIDSI_ARTIST                                                                   = 2
	PIDSI_AUTHOR                                                                   = 4
	PIDSI_CHARCOUNT                                                                = 16
	PIDSI_COMMENT                                                                  = 6
	PIDSI_COMMENTS                                                                 = 6
	PIDSI_CREATE_DTM                                                               = 12
	PIDSI_DOC_SECURITY                                                             = 19
	PIDSI_EDITTIME                                                                 = 10
	PIDSI_GENRE                                                                    = 11
	PIDSI_KEYWORDS                                                                 = 5
	PIDSI_LASTAUTHOR                                                               = 8
	PIDSI_LASTPRINTED                                                              = 11
	PIDSI_LASTSAVE_DTM                                                             = 13
	PIDSI_LYRICS                                                                   = 12
	PIDSI_PAGECOUNT                                                                = 14
	PIDSI_REVNUMBER                                                                = 9
	PIDSI_SONGTITLE                                                                = 3
	PIDSI_SUBJECT                                                                  = 3
	PIDSI_TEMPLATE                                                                 = 7
	PIDSI_THUMBNAIL                                                                = 17
	PIDSI_TITLE                                                                    = 2
	PIDSI_TRACK                                                                    = 7
	PIDSI_WORDCOUNT                                                                = 15
	PIDSI_YEAR                                                                     = 5
	PIDVSI_COMPRESSION                                                             = 0x0000000a
	PIDVSI_DATA_RATE                                                               = 0x00000008
	PIDVSI_FRAME_COUNT                                                             = 0x00000005
	PIDVSI_FRAME_HEIGHT                                                            = 0x00000004
	PIDVSI_FRAME_RATE                                                              = 0x00000006
	PIDVSI_FRAME_WIDTH                                                             = 0x00000003
	PIDVSI_SAMPLE_SIZE                                                             = 0x00000009
	PIDVSI_STREAM_NAME                                                             = 0x00000002
	PIDVSI_STREAM_NUMBER                                                           = 0x0000000b
	PIDVSI_TIMELENGTH                                                              = 0x00000007
	PID_BEHAVIOR                                                                   = 2147483651
	PID_CODEPAGE                                                                   = 1
	PID_COMPUTERNAME                                                               = 5
	PID_CONTROLPANEL_CATEGORY                                                      = 2
	PID_DESCRIPTIONID                                                              = 2
	PID_DICTIONARY                                                                 = 0
	PID_DISPLACED_DATE                                                             = 3
	PID_DISPLACED_FROM                                                             = 2
	PID_DISPLAY_PROPERTIES                                                         = 0
	PID_FINDDATA                                                                   = 0
	PID_FIRST_NAME_DEFAULT                                                         = 4095
	PID_FIRST_USABLE                                                               = 2
	PID_HTMLINFOTIPFILE                                                            = 5
	PID_ILLEGAL                                                                    = 4294967295
	PID_INTROTEXT                                                                  = 1
	PID_INTSITE_AUTHOR                                                             = 3
	PID_INTSITE_CODEPAGE                                                           = 18
	PID_INTSITE_COMMENT                                                            = 8
	PID_INTSITE_CONTENTCODE                                                        = 11
	PID_INTSITE_CONTENTLEN                                                         = 10
	PID_INTSITE_DESCRIPTION                                                        = 7
	PID_INTSITE_FLAGS                                                              = 9
	PID_INTSITE_ICONFILE                                                           = 21
	PID_INTSITE_ICONINDEX                                                          = 20
	PID_INTSITE_LASTMOD                                                            = 5
	PID_INTSITE_LASTVISIT                                                          = 4
	PID_INTSITE_RECURSE                                                            = 12
	PID_INTSITE_ROAMED                                                             = 34
	PID_INTSITE_SUBSCRIPTION                                                       = 14
	PID_INTSITE_TITLE                                                              = 16
	PID_INTSITE_TRACKING                                                           = 19
	PID_INTSITE_URL                                                                = 15
	PID_INTSITE_VISITCOUNT                                                         = 6
	PID_INTSITE_WATCH                                                              = 13
	PID_INTSITE_WHATSNEW                                                           = 2
	PID_IS_AUTHOR                                                                  = 11
	PID_IS_COMMENT                                                                 = 13
	PID_IS_DESCRIPTION                                                             = 12
	PID_IS_HOTKEY                                                                  = 6
	PID_IS_ICONFILE                                                                = 9
	PID_IS_ICONINDEX                                                               = 8
	PID_IS_NAME                                                                    = 4
	PID_IS_ROAMED                                                                  = 15
	PID_IS_SHOWCMD                                                                 = 7
	PID_IS_URL                                                                     = 2
	PID_IS_WHATSNEW                                                                = 10
	PID_IS_WORKINGDIR                                                              = 5
	PID_LINK_TARGET                                                                = 2
	PID_LINK_TARGET_TYPE                                                           = 3
	PID_LOCALE                                                                     = 2147483648
	PID_MAX_READONLY                                                               = 3221225471
	PID_MIN_READONLY                                                               = 2147483648
	PID_MISC_ACCESSCOUNT                                                           = 3
	PID_MISC_OWNER                                                                 = 4
	PID_MISC_PICS                                                                  = 6
	PID_MISC_STATUS                                                                = 2
	PID_MODIFY_TIME                                                                = 2147483649
	PID_NETRESOURCE                                                                = 1
	PID_NETWORKLOCATION                                                            = 4
	PID_QUERY_RANK                                                                 = 2
	PID_SECURITY                                                                   = 2147483650
	PID_SHARE_CSC_STATUS                                                           = 2
	PID_SYNC_COPY_IN                                                               = 2
	PID_VOLUME_CAPACITY                                                            = 3
	PID_VOLUME_FILESYSTEM                                                          = 4
	PID_VOLUME_FREE                                                                = 2
	PID_WHICHFOLDER                                                                = 3
	PIFDEFFILESIZE                                                                 = 80
	PIFDEFPATHSIZE                                                                 = 64
	PIFMAXFILEPATH                                                                 = 260
	PIFNAMESIZE                                                                    = 30
	PIFPARAMSSIZE                                                                  = 64
	PIFSHDATASIZE                                                                  = 64
	PIFSHPROGSIZE                                                                  = 64
	PIFSTARTLOCSIZE                                                                = 63
	PI_APPLYPOLICY                                                                 = 0x00000002
	PI_NOUI                                                                        = 0x00000001
	PKCS12_ALLOW_OVERWRITE_KEY                                                     = 0x4000
	PKCS12_ALWAYS_CNG_KSP                                                          = 0x200
	PKCS12_DISABLE_ENCRYPT_CERTIFICATES                                            = 0x0100
	PKCS12_ENCRYPT_CERTIFICATES                                                    = 0x0200
	PKCS12_EXPORT_ECC_CURVE_OID                                                    = 0x2000
	PKCS12_EXPORT_ECC_CURVE_PARAMETERS                                             = 0x1000
	PKCS12_EXPORT_PBES2_PARAMS                                                     = 0x0080
	PKCS12_EXPORT_RESERVED_MASK                                                    = 0xffff0000
	PKCS12_EXPORT_SILENT                                                           = 0x40
	PKCS12_IMPORT_RESERVED_MASK                                                    = 0xffff0000
	PKCS12_IMPORT_SILENT                                                           = 0x40
	PKCS12_INCLUDE_EXTENDED_PROPERTIES                                             = 0x10
	PKCS12_NO_PERSIST_KEY                                                          = 0x8000
	PKCS12_OBJECT_LOCATOR_ALL_IMPORT_FLAGS                                         = 33360
	PKCS12_ONLY_CERTIFICATES                                                       = 0x00000400
	PKCS12_ONLY_CERTIFICATES_PROVIDER_TYPE                                         = 0
	PKCS12_ONLY_NOT_ENCRYPTED_CERTIFICATES                                         = 0x00000800
	PKCS12_PBKDF2_ID_HMAC_SHA1                                                     = "1.2.840.113549.2.7"
	PKCS12_PBKDF2_ID_HMAC_SHA256                                                   = "1.2.840.113549.2.9"
	PKCS12_PBKDF2_ID_HMAC_SHA384                                                   = "1.2.840.113549.2.10"
	PKCS12_PBKDF2_ID_HMAC_SHA512                                                   = "1.2.840.113549.2.11"
	PKCS12_PREFER_CNG_KSP                                                          = 0x100
	PKCS12_PROTECT_TO_DOMAIN_SIDS                                                  = 0x20
	PKCS12_VIRTUAL_ISOLATION_KEY                                                   = 0x00010000
	PKCS5_PADDING                                                                  = 1
	PKCS_7_ASN_ENCODING                                                            = 0x10000
	PKCS_7_NDR_ENCODING                                                            = 0x20000
	PKCS_RSA_SSA_PSS_TRAILER_FIELD_BC                                              = 1
	PKEYSTR_MAX                                                                    = 50
	PKEY_PIDSTR_MAX                                                                = 10
	PLAINTEXTKEYBLOB                                                               = 0x8
	PLATFORM_ID_DOS                                                                = 300
	PLATFORM_ID_NT                                                                 = 500
	PLATFORM_ID_OS2                                                                = 400
	PLATFORM_ID_OSF                                                                = 600
	PLATFORM_ID_VMS                                                                = 700
	PPCF_ADDARGUMENTS                                                              = 0x00000003
	PPCF_ADDQUOTES                                                                 = 0x00000001
	PPCF_FORCEQUALIFY                                                              = 0x00000040
	PPCF_LONGESTPOSSIBLE                                                           = 0x00000080
	PPCF_NODIRECTORIES                                                             = 0x00000010
	PP_ADMIN_PIN                                                                   = 31
	PP_APPLI_CERT                                                                  = 18
	PP_CERTCHAIN                                                                   = 9
	PP_CHANGE_PASSWORD                                                             = 7
	PP_CLIENT_HWND                                                                 = 1
	PP_CONTAINER                                                                   = 6
	PP_CONTEXT_INFO                                                                = 11
	PP_DELETEKEY                                                                   = 24
	PP_ENUMALGS                                                                    = 1
	PP_ENUMALGS_EX                                                                 = 22
	PP_ENUMCONTAINERS                                                              = 2
	PP_ENUMELECTROOTS                                                              = 26
	PP_ENUMEX_SIGNING_PROT                                                         = 40
	PP_ENUMMANDROOTS                                                               = 25
	PP_IMPTYPE                                                                     = 3
	PP_KEYEXCHANGE_ALG                                                             = 14
	PP_KEYEXCHANGE_KEYSIZE                                                         = 12
	PP_KEYEXCHANGE_PIN                                                             = 32
	PP_KEYSET_SEC_DESCR                                                            = 8
	PP_KEYSET_TYPE                                                                 = 27
	PP_KEYSPEC                                                                     = 39
	PP_KEYSTORAGE                                                                  = 17
	PP_KEYX_KEYSIZE_INC                                                            = 35
	PP_KEY_TYPE_SUBTYPE                                                            = 10
	PP_NAME                                                                        = 4
	PP_PROVTYPE                                                                    = 16
	PP_SESSION_KEYSIZE                                                             = 20
	PP_SGC_INFO                                                                    = 37
	PP_SIGNATURE_ALG                                                               = 15
	PP_SIGNATURE_KEYSIZE                                                           = 13
	PP_SIGNATURE_PIN                                                               = 33
	PP_SIG_KEYSIZE_INC                                                             = 34
	PP_SYM_KEYSIZE                                                                 = 19
	PP_UI_PROMPT                                                                   = 21
	PP_UNIQUE_CONTAINER                                                            = 36
	PP_USE_HARDWARE_RNG                                                            = 38
	PP_VERSION                                                                     = 5
	PRF_DONTFINDLNK                                                                = 0x8
	PRF_FIRSTDIRDEF                                                                = 0x4
	PRF_REQUIREABSOLUTE                                                            = 0x10
	PRF_TRYPROGRAMEXTENSIONS                                                       = 3
	PRF_VERIFYEXISTS                                                               = 0x1
	PRIVATEKEYBLOB                                                                 = 0x7
	PRJOB_COMPLETE                                                                 = 0x4
	PRJOB_DELETED                                                                  = 0x8000
	PRJOB_DESTNOPAPER                                                              = 0x100
	PRJOB_DESTOFFLINE                                                              = 0x20
	PRJOB_DESTPAUSED                                                               = 0x40
	PRJOB_DEVSTATUS                                                                = 0x1fc
	PRJOB_ERROR                                                                    = 0x10
	PRJOB_INTERV                                                                   = 0x8
	PRJOB_NOTIFY                                                                   = 0x80
	PRJOB_QSTATUS                                                                  = 0x3
	PRJOB_QS_PAUSED                                                                = 1
	PRJOB_QS_PRINTING                                                              = 3
	PRJOB_QS_QUEUED                                                                = 0
	PRJOB_QS_SPOOLING                                                              = 2
	PRODUCT_ID_LENGTH                                                              = 16
	PROGDLG_AUTOTIME                                                               = 0x00000002
	PROGDLG_MODAL                                                                  = 0x00000001
	PROGDLG_NOMINIMIZE                                                             = 0x00000008
	PROGDLG_NOPROGRESSBAR                                                          = 0x00000010
	PROGDLG_NORMAL                                                                 = 0x00000000
	PROGDLG_NOTIME                                                                 = 0x00000004
	PROGRESS_CLASSA                                                                = "msctls_progress32"
	PROPERTYKEY_DEFINED                                                            = 0
	PROPSETFLAG_ANSI                                                               = 2
	PROPSETFLAG_CASE_SENSITIVE                                                     = 8
	PROPSETFLAG_DEFAULT                                                            = 0
	PROPSETFLAG_NONSIMPLE                                                          = 1
	PROPSETFLAG_UNBUFFERED                                                         = 4
	PROPSETHDR_OSVERSION_UNKNOWN                                                   = 0xffffffff
	PROPSET_BEHAVIOR_CASE_SENSITIVE                                                = 1
	PROP_LG_CXDLG                                                                  = 252
	PROP_LG_CYDLG                                                                  = 218
	PROP_MED_CXDLG                                                                 = 227
	PROP_MED_CYDLG                                                                 = 215
	PROP_SM_CXDLG                                                                  = 212
	PROP_SM_CYDLG                                                                  = 188
	PROTOCOLFLAG_NO_PICS_CHECK                                                     = 0x1
	PROV_DH_SCHANNEL                                                               = 18
	PROV_DSS                                                                       = 3
	PROV_DSS_DH                                                                    = 13
	PROV_EC_ECDSA_FULL                                                             = 16
	PROV_EC_ECDSA_SIG                                                              = 14
	PROV_EC_ECNRA_FULL                                                             = 17
	PROV_EC_ECNRA_SIG                                                              = 15
	PROV_FORTEZZA                                                                  = 4
	PROV_INTEL_SEC                                                                 = 22
	PROV_MS_EXCHANGE                                                               = 5
	PROV_REPLACE_OWF                                                               = 23
	PROV_RNG                                                                       = 21
	PROV_RSA_AES                                                                   = 24
	PROV_RSA_FULL                                                                  = 1
	PROV_RSA_SCHANNEL                                                              = 12
	PROV_RSA_SIG                                                                   = 2
	PROV_SPYRUS_LYNKS                                                              = 20
	PROV_SSL                                                                       = 6
	PROV_STT_ACQ                                                                   = 8
	PROV_STT_BRND                                                                  = 9
	PROV_STT_ISS                                                                   = 11
	PROV_STT_MER                                                                   = 7
	PROV_STT_ROOT                                                                  = 10
	PRSPEC_INVALID                                                                 = 4294967295
	PRSPEC_LPWSTR                                                                  = 0
	PRSPEC_PROPID                                                                  = 1
	PSBTN_APPLYNOW                                                                 = 4
	PSBTN_BACK                                                                     = 0
	PSBTN_CANCEL                                                                   = 5
	PSBTN_FINISH                                                                   = 2
	PSBTN_HELP                                                                     = 6
	PSBTN_MAX                                                                      = 6
	PSBTN_NEXT                                                                     = 1
	PSBTN_OK                                                                       = 3
	PSCB_BUTTONPRESSED                                                             = 3
	PSCB_INITIALIZED                                                               = 1
	PSCB_PRECREATE                                                                 = 2
	PSH_DEFAULT                                                                    = 0x00000000
	PSH_HASHELP                                                                    = 0x00000200
	PSH_HEADER                                                                     = 0x00080000
	PSH_MODELESS                                                                   = 0x00000400
	PSH_NOAPPLYNOW                                                                 = 0x00000080
	PSH_NOCONTEXTHELP                                                              = 0x02000000
	PSH_PROPSHEETPAGE                                                              = 0x00000008
	PSH_PROPTITLE                                                                  = 0x00000001
	PSH_RTLREADING                                                                 = 0x00000800
	PSH_STRETCHWATERMARK                                                           = 0x00040000
	PSH_USECALLBACK                                                                = 0x00000100
	PSH_USEHBMHEADER                                                               = 0x00100000
	PSH_USEHBMWATERMARK                                                            = 0x00010000
	PSH_USEHICON                                                                   = 0x00000002
	PSH_USEHPLWATERMARK                                                            = 0x00020000
	PSH_USEICONID                                                                  = 0x00000004
	PSH_USEPAGELANG                                                                = 0x00200000
	PSH_USEPSTARTPAGE                                                              = 0x00000040
	PSH_WATERMARK                                                                  = 0x00008000
	PSH_WIZARD                                                                     = 0x00000020
	PSH_WIZARD97                                                                   = 0x01000000
	PSH_WIZARDCONTEXTHELP                                                          = 0x00001000
	PSH_WIZARDHASFINISH                                                            = 0x00000010
	PSH_WIZARD_LITE                                                                = 0x00400000
	PSM_ADDPAGE                                                                    = 1127
	PSM_APPLY                                                                      = 1134
	PSM_CANCELTOCLOSE                                                              = 1131
	PSM_CHANGED                                                                    = 1128
	PSM_GETCURRENTPAGEHWND                                                         = 1142
	PSM_GETRESULT                                                                  = 1159
	PSM_GETTABCONTROL                                                              = 1140
	PSM_HWNDTOINDEX                                                                = 1153
	PSM_IDTOINDEX                                                                  = 1157
	PSM_INDEXTOHWND                                                                = 1154
	PSM_INDEXTOID                                                                  = 1158
	PSM_INDEXTOPAGE                                                                = 1156
	PSM_INSERTPAGE                                                                 = 1143
	PSM_ISDIALOGMESSAGE                                                            = 1141
	PSM_PAGETOINDEX                                                                = 1155
	PSM_PRESSBUTTON                                                                = 1137
	PSM_QUERYSIBLINGS                                                              = 1132
	PSM_REBOOTSYSTEM                                                               = 1130
	PSM_RECALCPAGESIZES                                                            = 1160
	PSM_REMOVEPAGE                                                                 = 1126
	PSM_RESTARTWINDOWS                                                             = 1129
	PSM_SETCURSEL                                                                  = 1125
	PSM_SETCURSELID                                                                = 1138
	PSM_SETFINISHTEXT                                                              = 1139
	PSM_SETFINISHTEXTA                                                             = 1139
	PSM_SETFINISHTEXTW                                                             = 1145
	PSM_SETHEADERSUBTITLE                                                          = 1151
	PSM_SETHEADERSUBTITLEA                                                         = 1151
	PSM_SETHEADERSUBTITLEW                                                         = 1152
	PSM_SETHEADERTITLE                                                             = 1149
	PSM_SETHEADERTITLEA                                                            = 1149
	PSM_SETHEADERTITLEW                                                            = 1150
	PSM_SETTITLE                                                                   = 1135
	PSM_SETTITLEA                                                                  = 1135
	PSM_SETTITLEW                                                                  = 1144
	PSM_SETWIZBUTTONS                                                              = 1136
	PSM_UNCHANGED                                                                  = 1133
	PSNRET_INVALID                                                                 = 1
	PSNRET_INVALID_NOCHANGEPAGE                                                    = 2
	PSNRET_MESSAGEHANDLED                                                          = 3
	PSNRET_NOERROR                                                                 = 0
	PSN_APPLY                                                                      = 18446744073709551414
	PSN_FIRST                                                                      = 18446744073709551416
	PSN_GETOBJECT                                                                  = 18446744073709551406
	PSN_HELP                                                                       = 18446744073709551411
	PSN_KILLACTIVE                                                                 = 18446744073709551415
	PSN_LAST                                                                       = 18446744073709551317
	PSN_QUERYCANCEL                                                                = 18446744073709551407
	PSN_QUERYINITIALFOCUS                                                          = 18446744073709551403
	PSN_RESET                                                                      = 18446744073709551413
	PSN_SETACTIVE                                                                  = 18446744073709551416
	PSN_TRANSLATEACCELERATOR                                                       = 18446744073709551404
	PSN_WIZBACK                                                                    = 18446744073709551410
	PSN_WIZFINISH                                                                  = 18446744073709551408
	PSN_WIZNEXT                                                                    = 18446744073709551409
	PSPCB_ADDREF                                                                   = 0
	PSPCB_CREATE                                                                   = 2
	PSPCB_RELEASE                                                                  = 1
	PSP_DEFAULT                                                                    = 0x00000000
	PSP_DLGINDIRECT                                                                = 0x00000001
	PSP_HASHELP                                                                    = 0x00000020
	PSP_HIDEHEADER                                                                 = 0x00000800
	PSP_PREMATURE                                                                  = 0x00000400
	PSP_RTLREADING                                                                 = 0x00000010
	PSP_USECALLBACK                                                                = 0x00000080
	PSP_USEFUSIONCONTEXT                                                           = 0x00004000
	PSP_USEHEADERSUBTITLE                                                          = 0x00002000
	PSP_USEHEADERTITLE                                                             = 0x00001000
	PSP_USEHICON                                                                   = 0x00000002
	PSP_USEICONID                                                                  = 0x00000004
	PSP_USEREFPARENT                                                               = 0x00000040
	PSP_USETITLE                                                                   = 0x00000008
	PSWIZB_BACK                                                                    = 0x00000001
	PSWIZB_DISABLEDFINISH                                                          = 0x00000008
	PSWIZB_FINISH                                                                  = 0x00000004
	PSWIZB_NEXT                                                                    = 0x00000002
	PT_MANDATORY                                                                   = 0x00000004
	PT_ROAMING                                                                     = 0x00000002
	PT_TEMPORARY                                                                   = 0x00000001
	PUBLICKEYBLOB                                                                  = 0x6
	PUBLICKEYBLOBEX                                                                = 0xa
	PURE                                                                           = 0
	PWLEN                                                                          = 256
	QCMINFO_PLACE_AFTER                                                            = 1
	QCMINFO_PLACE_BEFORE                                                           = 0
	QIF_CACHED                                                                     = 0x00000001
	QIF_DONTEXPANDFOLDER                                                           = 0x00000002
	QITIPF_DEFAULT                                                                 = 0x00000000
	QITIPF_LINKNOTARGET                                                            = 0x00000002
	QITIPF_LINKUSETARGET                                                           = 0x00000004
	QITIPF_USENAME                                                                 = 0x00000001
	QITIPF_USESLOWTIP                                                              = 0x00000008
	QNLEN                                                                          = 80
	RANDOM_PADDING                                                                 = 2
	RBAB_ADDBAND                                                                   = 0x2
	RBAB_AUTOSIZE                                                                  = 0x1
	RBBIM_BACKGROUND                                                               = 0x80
	RBBIM_CHILD                                                                    = 0x10
	RBBIM_CHILDSIZE                                                                = 0x20
	RBBIM_COLORS                                                                   = 0x2
	RBBIM_HEADERSIZE                                                               = 0x800
	RBBIM_ID                                                                       = 0x100
	RBBIM_IDEALSIZE                                                                = 0x200
	RBBIM_IMAGE                                                                    = 0x8
	RBBIM_LPARAM                                                                   = 0x400
	RBBIM_SIZE                                                                     = 0x40
	RBBIM_STYLE                                                                    = 0x1
	RBBIM_TEXT                                                                     = 0x4
	RBBS_BREAK                                                                     = 0x1
	RBBS_CHILDEDGE                                                                 = 0x4
	RBBS_FIXEDBMP                                                                  = 0x20
	RBBS_FIXEDSIZE                                                                 = 0x2
	RBBS_GRIPPERALWAYS                                                             = 0x80
	RBBS_HIDDEN                                                                    = 0x8
	RBBS_HIDETITLE                                                                 = 0x400
	RBBS_NOGRIPPER                                                                 = 0x100
	RBBS_NOVERT                                                                    = 0x10
	RBBS_TOPALIGN                                                                  = 0x800
	RBBS_USECHEVRON                                                                = 0x200
	RBBS_VARIABLEHEIGHT                                                            = 0x40
	RBHT_CAPTION                                                                   = 0x2
	RBHT_CHEVRON                                                                   = 0x8
	RBHT_CLIENT                                                                    = 0x3
	RBHT_GRABBER                                                                   = 0x4
	RBHT_NOWHERE                                                                   = 0x1
	RBHT_SPLITTER                                                                  = 0x10
	RBIM_IMAGELIST                                                                 = 0x1
	RBNM_ID                                                                        = 0x1
	RBNM_LPARAM                                                                    = 0x4
	RBNM_STYLE                                                                     = 0x2
	RBN_AUTOBREAK                                                                  = 18446744073709550763
	RBN_AUTOSIZE                                                                   = 18446744073709550782
	RBN_BEGINDRAG                                                                  = 18446744073709550781
	RBN_CHEVRONPUSHED                                                              = 18446744073709550775
	RBN_CHILDSIZE                                                                  = 18446744073709550777
	RBN_DELETEDBAND                                                                = 18446744073709550778
	RBN_DELETINGBAND                                                               = 18446744073709550779
	RBN_ENDDRAG                                                                    = 18446744073709550780
	RBN_FIRST                                                                      = 18446744073709550785
	RBN_GETOBJECT                                                                  = 18446744073709550784
	RBN_HEIGHTCHANGE                                                               = 18446744073709550785
	RBN_LAST                                                                       = 18446744073709550757
	RBN_LAYOUTCHANGED                                                              = 18446744073709550783
	RBN_MINMAX                                                                     = 18446744073709550764
	RBN_SPLITTERDRAG                                                               = 18446744073709550774
	RBSTR_CHANGERECT                                                               = 0x1
	RBS_AUTOSIZE                                                                   = 0x2000
	RBS_BANDBORDERS                                                                = 0x400
	RBS_DBLCLKTOGGLE                                                               = 0x8000
	RBS_FIXEDORDER                                                                 = 0x800
	RBS_REGISTERDROP                                                               = 0x1000
	RBS_TOOLTIPS                                                                   = 0x100
	RBS_VARHEIGHT                                                                  = 0x200
	RBS_VERTICALGRIPPER                                                            = 0x4000
	RB_BEGINDRAG                                                                   = 1048
	RB_DELETEBAND                                                                  = 1026
	RB_DRAGMOVE                                                                    = 1050
	RB_ENDDRAG                                                                     = 1049
	RB_GETBANDBORDERS                                                              = 1058
	RB_GETBANDCOUNT                                                                = 1036
	RB_GETBANDINFO                                                                 = 1053
	RB_GETBANDINFOA                                                                = 1053
	RB_GETBANDINFOW                                                                = 1052
	RB_GETBANDMARGINS                                                              = 1064
	RB_GETBARHEIGHT                                                                = 1051
	RB_GETBARINFO                                                                  = 1027
	RB_GETBKCOLOR                                                                  = 1044
	RB_GETCOLORSCHEME                                                              = 8195
	RB_GETDROPTARGET                                                               = 8196
	RB_GETEXTENDEDSTYLE                                                            = 1066
	RB_GETPALETTE                                                                  = 1062
	RB_GETRECT                                                                     = 1033
	RB_GETROWCOUNT                                                                 = 1037
	RB_GETROWHEIGHT                                                                = 1038
	RB_GETTEXTCOLOR                                                                = 1046
	RB_GETTOOLTIPS                                                                 = 1041
	RB_GETUNICODEFORMAT                                                            = 8198
	RB_HITTEST                                                                     = 1032
	RB_IDTOINDEX                                                                   = 1040
	RB_INSERTBAND                                                                  = 1025
	RB_INSERTBANDA                                                                 = 1025
	RB_INSERTBANDW                                                                 = 1034
	RB_MAXIMIZEBAND                                                                = 1055
	RB_MINIMIZEBAND                                                                = 1054
	RB_MOVEBAND                                                                    = 1063
	RB_PUSHCHEVRON                                                                 = 1067
	RB_SETBANDINFO                                                                 = 1030
	RB_SETBANDINFOA                                                                = 1030
	RB_SETBANDINFOW                                                                = 1035
	RB_SETBARINFO                                                                  = 1028
	RB_SETBKCOLOR                                                                  = 1043
	RB_SETCOLORSCHEME                                                              = 8194
	RB_SETEXTENDEDSTYLE                                                            = 1065
	RB_SETPALETTE                                                                  = 1061
	RB_SETPARENT                                                                   = 1031
	RB_SETTEXTCOLOR                                                                = 1045
	RB_SETTOOLTIPS                                                                 = 1042
	RB_SETUNICODEFORMAT                                                            = 8197
	RB_SETWINDOWTHEME                                                              = 8203
	RB_SHOWBAND                                                                    = 1059
	RB_SIZETORECT                                                                  = 1047
	READ_ATTRIBUTES                                                                = 0xD0
	READ_ATTRIBUTE_BUFFER_SIZE                                                     = 512
	READ_COMPRESSION_INFO_VALID                                                    = 0x00000020
	READ_THRESHOLDS                                                                = 0xD1
	READ_THRESHOLD_BUFFER_SIZE                                                     = 512
	REBARCLASSNAMEA                                                                = "ReBarWindow32"
	RECOVERED_READS_VALID                                                          = 0x00000004
	RECOVERED_WRITES_VALID                                                         = 0x00000001
	REPARSE_MOUNTPOINT_HEADER_SIZE                                                 = 8
	REPLACE_ALTERNATE                                                              = 0xB
	REPLACE_PRIMARY                                                                = 0xA
	REPL_EXPORT_EXTENT_INFOLEVEL                                                   = 1001
	REPL_EXPORT_INTEGRITY_INFOLEVEL                                                = 1000
	REPL_EXTENT_FILE                                                               = 1
	REPL_EXTENT_TREE                                                               = 2
	REPL_GUARDTIME_INFOLEVEL                                                       = 1002
	REPL_INTEGRITY_FILE                                                            = 1
	REPL_INTEGRITY_TREE                                                            = 2
	REPL_INTERVAL_INFOLEVEL                                                        = 1000
	REPL_PULSE_INFOLEVEL                                                           = 1001
	REPL_RANDOM_INFOLEVEL                                                          = 1003
	REPL_ROLE_BOTH                                                                 = 3
	REPL_ROLE_EXPORT                                                               = 1
	REPL_ROLE_IMPORT                                                               = 2
	REPL_STATE_NEVER_REPLICATED                                                    = 3
	REPL_STATE_NO_MASTER                                                           = 1
	REPL_STATE_NO_SYNC                                                             = 2
	REPL_STATE_OK                                                                  = 0
	REPL_UNLOCK_FORCE                                                              = 1
	REPL_UNLOCK_NOFORCE                                                            = 0
	REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY                                          = 0x2
	REPORT_NO_PRIVATE_KEY                                                          = 0x1
	RETRACT_IEPORT                                                                 = 3
	RETURN_SMART_STATUS                                                            = 0xDA
	REVISED_AUDIT_ENTRY_STRUCT                                                     = 0
	REVISED_CONFIG_APIS                                                            = 0
	REVISED_ERROR_LOG_STRUCT                                                       = 0
	REVISION_LENGTH                                                                = 4
	RMLEN                                                                          = 98
	ROTFLAGS_ALLOWANYCLIENT                                                        = 0x2
	ROTFLAGS_REGISTRATIONKEEPSALIVE                                                = 0x1
	ROTREGFLAGS_ALLOWANYCLIENT                                                     = 0x1
	ROT_COMPARE_MAX                                                                = 2048
	RPCFLG_ASYNCHRONOUS                                                            = 1073741824
	RPCFLG_AUTO_COMPLETE                                                           = 134217728
	RPCFLG_HAS_CALLBACK                                                            = 67108864
	RPCFLG_HAS_MULTI_SYNTAXES                                                      = 33554432
	RPCFLG_INPUT_SYNCHRONOUS                                                       = 536870912
	RPCFLG_LOCAL_CALL                                                              = 268435456
	RPCFLG_MESSAGE                                                                 = 16777216
	RPCFLG_NON_NDR                                                                 = 2147483648
	RPC_BUFFER_ASYNC                                                               = 0x00008000
	RPC_BUFFER_COMPLETE                                                            = 0x00001000
	RPC_BUFFER_EXTRA                                                               = 0x00004000
	RPC_BUFFER_NONOTIFY                                                            = 0x00010000
	RPC_BUFFER_PARTIAL                                                             = 0x00002000
	RPC_CALL_ATTRIBUTES_VERSION                                                    = 1
	RPC_CONTEXT_HANDLE_DEFAULT_FLAGS                                               = 0
	RPC_CONTEXT_HANDLE_DONT_SERIALIZE                                              = 536870912
	RPC_CONTEXT_HANDLE_FLAGS                                                       = 805306368
	RPC_CONTEXT_HANDLE_SERIALIZE                                                   = 268435456
	RPC_C_AUTHN_DCE_PRIVATE                                                        = 1
	RPC_C_AUTHN_DCE_PUBLIC                                                         = 2
	RPC_C_AUTHN_DEC_PUBLIC                                                         = 4
	RPC_C_AUTHN_DEFAULT                                                            = 4294967295
	RPC_C_AUTHN_DIGEST                                                             = 21
	RPC_C_AUTHN_DPA                                                                = 17
	RPC_C_AUTHN_GSS_KERBEROS                                                       = 16
	RPC_C_AUTHN_GSS_NEGOTIATE                                                      = 9
	RPC_C_AUTHN_GSS_SCHANNEL                                                       = 14
	RPC_C_AUTHN_INFO_TYPE_HTTP                                                     = 1
	RPC_C_AUTHN_LEVEL_CALL                                                         = 3
	RPC_C_AUTHN_LEVEL_CONNECT                                                      = 2
	RPC_C_AUTHN_LEVEL_DEFAULT                                                      = 0
	RPC_C_AUTHN_LEVEL_NONE                                                         = 1
	RPC_C_AUTHN_LEVEL_PKT                                                          = 4
	RPC_C_AUTHN_LEVEL_PKT_INTEGRITY                                                = 5
	RPC_C_AUTHN_LEVEL_PKT_PRIVACY                                                  = 6
	RPC_C_AUTHN_MQ                                                                 = 100
	RPC_C_AUTHN_MSN                                                                = 18
	RPC_C_AUTHN_NONE                                                               = 0
	RPC_C_AUTHN_WINNT                                                              = 10
	RPC_C_AUTHZ_DCE                                                                = 2
	RPC_C_AUTHZ_DEFAULT                                                            = 0xffffffff
	RPC_C_AUTHZ_NAME                                                               = 1
	RPC_C_AUTHZ_NONE                                                               = 0
	RPC_C_BINDING_DEFAULT_TIMEOUT                                                  = 5
	RPC_C_BINDING_INFINITE_TIMEOUT                                                 = 10
	RPC_C_BINDING_MAX_TIMEOUT                                                      = 9
	RPC_C_BINDING_MIN_TIMEOUT                                                      = 0
	RPC_C_BIND_TO_ALL_NICS                                                         = 1
	RPC_C_CANCEL_INFINITE_TIMEOUT                                                  = -1
	RPC_C_DONT_FAIL                                                                = 0x4
	RPC_C_EP_ALL_ELTS                                                              = 0
	RPC_C_EP_MATCH_BY_BOTH                                                         = 3
	RPC_C_EP_MATCH_BY_IF                                                           = 1
	RPC_C_EP_MATCH_BY_OBJ                                                          = 2
	RPC_C_FULL_CERT_CHAIN                                                          = 0x0001
	RPC_C_HTTP_AUTHN_SCHEME_BASIC                                                  = 0x00000001
	RPC_C_HTTP_AUTHN_SCHEME_CERT                                                   = 0x00010000
	RPC_C_HTTP_AUTHN_SCHEME_DIGEST                                                 = 0x00000008
	RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE                                              = 0x00000010
	RPC_C_HTTP_AUTHN_SCHEME_NTLM                                                   = 0x00000002
	RPC_C_HTTP_AUTHN_SCHEME_PASSPORT                                               = 0x00000004
	RPC_C_HTTP_AUTHN_TARGET_PROXY                                                  = 2
	RPC_C_HTTP_AUTHN_TARGET_SERVER                                                 = 1
	RPC_C_HTTP_FLAG_IGNORE_CERT_CN_INVALID                                         = 8
	RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME                                          = 2
	RPC_C_HTTP_FLAG_USE_SSL                                                        = 1
	RPC_C_IMP_LEVEL_ANONYMOUS                                                      = 1
	RPC_C_IMP_LEVEL_DEFAULT                                                        = 0
	RPC_C_IMP_LEVEL_DELEGATE                                                       = 4
	RPC_C_IMP_LEVEL_IDENTIFY                                                       = 2
	RPC_C_IMP_LEVEL_IMPERSONATE                                                    = 3
	RPC_C_INFINITE_TIMEOUT                                                         = 4294967295
	RPC_C_LISTEN_MAX_CALLS_DEFAULT                                                 = 1234
	RPC_C_MGMT_INQ_IF_IDS                                                          = 0
	RPC_C_MGMT_INQ_PRINC_NAME                                                      = 1
	RPC_C_MGMT_INQ_STATS                                                           = 2
	RPC_C_MGMT_IS_SERVER_LISTEN                                                    = 3
	RPC_C_MGMT_STOP_SERVER_LISTEN                                                  = 4
	RPC_C_MQ_AUTHN_LEVEL_NONE                                                      = 0x0000
	RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY                                             = 0x0008
	RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY                                               = 0x0010
	RPC_C_MQ_CLEAR_ON_OPEN                                                         = 0x0002
	RPC_C_MQ_EXPRESS                                                               = 0
	RPC_C_MQ_JOURNAL_ALWAYS                                                        = 2
	RPC_C_MQ_JOURNAL_DEADLETTER                                                    = 1
	RPC_C_MQ_JOURNAL_NONE                                                          = 0
	RPC_C_MQ_PERMANENT                                                             = 0x0001
	RPC_C_MQ_RECOVERABLE                                                           = 1
	RPC_C_MQ_TEMPORARY                                                             = 0x0000
	RPC_C_MQ_USE_EXISTING_SECURITY                                                 = 0x0004
	RPC_C_NOTIFY_ON_SEND_COMPLETE                                                  = 0x1
	RPC_C_NS_DEFAULT_EXP_AGE                                                       = -1
	RPC_C_NS_SYNTAX_DCE                                                            = 3
	RPC_C_NS_SYNTAX_DEFAULT                                                        = 0
	RPC_C_OPT_BINDING_NONCAUSAL                                                    = 9
	RPC_C_OPT_CALL_TIMEOUT                                                         = 12
	RPC_C_OPT_DONT_LINGER                                                          = 13
	RPC_C_OPT_MAX_OPTIONS                                                          = 14
	RPC_C_OPT_MQ_ACKNOWLEDGE                                                       = 4
	RPC_C_OPT_MQ_AUTHN_LEVEL                                                       = 6
	RPC_C_OPT_MQ_AUTHN_SERVICE                                                     = 5
	RPC_C_OPT_MQ_DELIVERY                                                          = 1
	RPC_C_OPT_MQ_JOURNAL                                                           = 3
	RPC_C_OPT_MQ_PRIORITY                                                          = 2
	RPC_C_OPT_MQ_TIME_TO_BE_RECEIVED                                               = 8
	RPC_C_OPT_MQ_TIME_TO_REACH_QUEUE                                               = 7
	RPC_C_OPT_SECURITY_CALLBACK                                                    = 10
	RPC_C_OPT_UNIQUE_BINDING                                                       = 11
	RPC_C_PARM_BUFFER_LENGTH                                                       = 2
	RPC_C_PARM_MAX_PACKET_LENGTH                                                   = 1
	RPC_C_PROFILE_ALL_ELT                                                          = 1
	RPC_C_PROFILE_ALL_ELTS                                                         = 1
	RPC_C_PROFILE_DEFAULT_ELT                                                      = 0
	RPC_C_PROFILE_MATCH_BY_BOTH                                                    = 4
	RPC_C_PROFILE_MATCH_BY_IF                                                      = 2
	RPC_C_PROFILE_MATCH_BY_MBR                                                     = 3
	RPC_C_PROTECT_LEVEL_CALL                                                       = 3
	RPC_C_PROTECT_LEVEL_CONNECT                                                    = 2
	RPC_C_PROTECT_LEVEL_DEFAULT                                                    = 0
	RPC_C_PROTECT_LEVEL_NONE                                                       = 1
	RPC_C_PROTECT_LEVEL_PKT                                                        = 4
	RPC_C_PROTECT_LEVEL_PKT_INTEGRITY                                              = 5
	RPC_C_PROTECT_LEVEL_PKT_PRIVACY                                                = 6
	RPC_C_PROTSEQ_MAX_REQS_DEFAULT                                                 = 10
	RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY                                           = 0x4
	RPC_C_QOS_CAPABILITIES_DEFAULT                                                 = 0x0
	RPC_C_QOS_CAPABILITIES_IGNORE_DELEGATE_FAILURE                                 = 0x8
	RPC_C_QOS_CAPABILITIES_LOCAL_MA_HINT                                           = 0x10
	RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC                                            = 0x2
	RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH                                             = 0x1
	RPC_C_QOS_IDENTITY_DYNAMIC                                                     = 1
	RPC_C_QOS_IDENTITY_STATIC                                                      = 0
	RPC_C_SECURITY_QOS_VERSION                                                     = 1
	RPC_C_SECURITY_QOS_VERSION_1                                                   = 1
	RPC_C_SECURITY_QOS_VERSION_2                                                   = 2
	RPC_C_SECURITY_QOS_VERSION_3                                                   = 3
	RPC_C_STATS_CALLS_IN                                                           = 0
	RPC_C_STATS_CALLS_OUT                                                          = 1
	RPC_C_STATS_PKTS_IN                                                            = 2
	RPC_C_STATS_PKTS_OUT                                                           = 3
	RPC_C_USE_INTERNET_PORT                                                        = 0x1
	RPC_C_USE_INTRANET_PORT                                                        = 0x2
	RPC_C_VERS_ALL                                                                 = 1
	RPC_C_VERS_COMPATIBLE                                                          = 2
	RPC_C_VERS_EXACT                                                               = 3
	RPC_C_VERS_MAJOR_ONLY                                                          = 4
	RPC_C_VERS_UPTO                                                                = 5
	RPC_EEINFO_VERSION                                                             = 1
	RPC_ENTRY                                                                      = 0
	RPC_FLAGS_VALID_BIT                                                            = 0x00008000
	RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH                                            = 0x0010
	RPC_IF_ALLOW_LOCAL_ONLY                                                        = 0x0020
	RPC_IF_ALLOW_SECURE_ONLY                                                       = 0x0008
	RPC_IF_ALLOW_UNKNOWN_AUTHORITY                                                 = 0x0004
	RPC_IF_AUTOLISTEN                                                              = 0x0001
	RPC_IF_OLE                                                                     = 0x0002
	RPC_IF_SEC_NO_CACHE                                                            = 0x0040
	RPC_INTERFACE_HAS_PIPES                                                        = 0x0001
	RPC_NCA_FLAGS_BROADCAST                                                        = 0x00000002
	RPC_NCA_FLAGS_DEFAULT                                                          = 0x00000000
	RPC_NCA_FLAGS_IDEMPOTENT                                                       = 0x00000001
	RPC_NCA_FLAGS_MAYBE                                                            = 0x00000004
	RPC_PROXY_CONNECTION_TYPE_IN_PROXY                                             = 0
	RPC_PROXY_CONNECTION_TYPE_OUT_PROXY                                            = 1
	RPC_P_ADDR_FORMAT_TCP_IPV4                                                     = 1
	RPC_P_ADDR_FORMAT_TCP_IPV6                                                     = 2
	RPC_QUERY_CLIENT_PRINCIPAL_NAME                                                = 4
	RPC_QUERY_SERVER_PRINCIPAL_NAME                                                = 2
	RPC_S_ACCESS_DENIED                                                            = 5
	RPC_S_ASYNC_CALL_PENDING                                                       = 997
	RPC_S_BUFFER_TOO_SMALL                                                         = 122
	RPC_S_INVALID_ARG                                                              = 87
	RPC_S_INVALID_LEVEL                                                            = 87
	RPC_S_INVALID_SECURITY_DESC                                                    = 1338
	RPC_S_OK                                                                       = 0
	RPC_S_OUT_OF_MEMORY                                                            = 14
	RPC_S_OUT_OF_THREADS                                                           = 164
	RPC_S_SERVER_OUT_OF_MEMORY                                                     = 1130
	RPC_S_TIMEOUT                                                                  = 1460
	RPC_S_UNKNOWN_PRINCIPAL                                                        = 1332
	RPC_UNICODE_SUPPORTED                                                          = 0
	RPC_X_ENUM_VALUE_TOO_LARGE                                                     = 1781
	RPC_X_INVALID_BOUND                                                            = 1734
	RPC_X_INVALID_BUFFER                                                           = 1784
	RPC_X_INVALID_PIPE_OPERATION                                                   = 1831
	RPC_X_INVALID_TAG                                                              = 1733
	RPC_X_NO_MEMORY                                                                = 14
	RPC_X_PIPE_APP_MEMORY                                                          = 14
	RPC_X_SS_CONTEXT_MISMATCH                                                      = 6
	RP_FORCE                                                                       = 1
	RP_SYNC                                                                        = 2
	RSA1024BIT_KEY                                                                 = 0x4000000
	RSOP_COMPUTER_ACCESS_DENIED                                                    = 0x00000002
	RSOP_TEMPNAMESPACE_EXISTS                                                      = 0x00000004
	RSOP_USER_ACCESS_DENIED                                                        = 0x00000001
	SAVE_ATTRIBUTE_VALUES                                                          = 0xD3
	SBARS_SIZEGRIP                                                                 = 0x100
	SBARS_TOOLTIPS                                                                 = 0x800
	SBN_FIRST                                                                      = 18446744073709550736
	SBN_LAST                                                                       = 18446744073709550717
	SBN_SIMPLEMODECHANGE                                                           = 18446744073709550736
	SBSP_ABSOLUTE                                                                  = 0x0000
	SBSP_ALLOW_AUTONAVIGATE                                                        = 0x00010000
	SBSP_DEFBROWSER                                                                = 0x0000
	SBSP_DEFMODE                                                                   = 0x0000
	SBSP_EXPLOREMODE                                                               = 0x0020
	SBSP_HELPMODE                                                                  = 0x0040
	SBSP_INITIATEDBYHLINKFRAME                                                     = 0x80000000
	SBSP_NAVIGATEBACK                                                              = 0x4000
	SBSP_NAVIGATEFORWARD                                                           = 0x8000
	SBSP_NEWBROWSER                                                                = 0x0002
	SBSP_NOAUTOSELECT                                                              = 0x04000000
	SBSP_NOTRANSFERHIST                                                            = 0x0080
	SBSP_OPENMODE                                                                  = 0x0010
	SBSP_PARENT                                                                    = 0x2000
	SBSP_REDIRECT                                                                  = 0x40000000
	SBSP_RELATIVE                                                                  = 0x1000
	SBSP_SAMEBROWSER                                                               = 0x0001
	SBSP_WRITENOHISTORY                                                            = 0x08000000
	SBT_NOBORDERS                                                                  = 0x100
	SBT_NOTABPARSING                                                               = 0x800
	SBT_OWNERDRAW                                                                  = 0x1000
	SBT_POPOUT                                                                     = 0x200
	SBT_RTLREADING                                                                 = 0x400
	SBT_TOOLTIPS                                                                   = 0x800
	SB_GETBORDERS                                                                  = 1031
	SB_GETICON                                                                     = 1044
	SB_GETPARTS                                                                    = 1030
	SB_GETRECT                                                                     = 1034
	SB_GETTEXT                                                                     = 1026
	SB_GETTEXTA                                                                    = 1026
	SB_GETTEXTLENGTH                                                               = 1027
	SB_GETTEXTLENGTHA                                                              = 1027
	SB_GETTEXTLENGTHW                                                              = 1036
	SB_GETTEXTW                                                                    = 1037
	SB_GETTIPTEXT                                                                  = 1042
	SB_GETTIPTEXTA                                                                 = 1042
	SB_GETTIPTEXTW                                                                 = 1043
	SB_GETUNICODEFORMAT                                                            = 8198
	SB_ISSIMPLE                                                                    = 1038
	SB_SETBKCOLOR                                                                  = 8193
	SB_SETICON                                                                     = 1039
	SB_SETMINHEIGHT                                                                = 1032
	SB_SETPARTS                                                                    = 1028
	SB_SETTEXT                                                                     = 1025
	SB_SETTEXTA                                                                    = 1025
	SB_SETTEXTW                                                                    = 1035
	SB_SETTIPTEXT                                                                  = 1040
	SB_SETTIPTEXTA                                                                 = 1040
	SB_SETTIPTEXTW                                                                 = 1041
	SB_SETUNICODEFORMAT                                                            = 8197
	SB_SIMPLE                                                                      = 1033
	SB_SIMPLEID                                                                    = 0xff
	SCHANNEL_ENC_KEY                                                               = 0x1
	SCHANNEL_MAC_KEY                                                               = 0x0
	SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC                                       = "SchemeDllRetrieveEncodedObjectW"
	SCHEME_OID_RETRIEVE_ENCODED_OBJECT_FUNC                                        = "SchemeDllRetrieveEncodedObject"
	SEARCH_ALL                                                                     = 0x0
	SEARCH_ALL_NO_SEQ                                                              = 0x4
	SEARCH_ALTERNATE                                                               = 0x2
	SEARCH_ALT_NO_SEQ                                                              = 0x6
	SEARCH_PRIMARY                                                                 = 0x1
	SEARCH_PRI_NO_SEQ                                                              = 0x5
	SEC_WINNT_AUTH_IDENTITY_ANSI                                                   = 0x1
	SEC_WINNT_AUTH_IDENTITY_UNICODE                                                = 0x2
	SERIAL_NUMBER_LENGTH                                                           = 32
	SERVICE2_BASE                                                                  = 5600
	SERVICE_BASE                                                                   = 3050
	SERVICE_CCP_CHKPT_NUM                                                          = 0x0FF
	SERVICE_CCP_NO_HINT                                                            = 0x0
	SERVICE_CCP_QUERY_HINT                                                         = 0x10000
	SERVICE_CCP_WAIT_TIME                                                          = 0x0FF00
	SERVICE_CTRL_CONTINUE                                                          = 2
	SERVICE_CTRL_INTERROGATE                                                       = 0
	SERVICE_CTRL_PAUSE                                                             = 1
	SERVICE_CTRL_REDIR_COMM                                                        = 0x4
	SERVICE_CTRL_REDIR_DISK                                                        = 0x1
	SERVICE_CTRL_REDIR_PRINT                                                       = 0x2
	SERVICE_CTRL_UNINSTALL                                                         = 3
	SERVICE_INSTALLED                                                              = 0x03
	SERVICE_INSTALL_PENDING                                                        = 0x01
	SERVICE_INSTALL_STATE                                                          = 0x03
	SERVICE_IP_CHKPT_NUM                                                           = 0x0FF
	SERVICE_IP_NO_HINT                                                             = 0x0
	SERVICE_IP_QUERY_HINT                                                          = 0x10000
	SERVICE_IP_WAITTIME_SHIFT                                                      = 8
	SERVICE_IP_WAIT_TIME                                                           = 0x0FF00
	SERVICE_MAXTIME                                                                = 0x000000FF
	SERVICE_NOT_PAUSABLE                                                           = 0x00
	SERVICE_NOT_UNINSTALLABLE                                                      = 0x00
	SERVICE_NTIP_WAITTIME_SHIFT                                                    = 12
	SERVICE_NT_MAXTIME                                                             = 0x0000FFFF
	SERVICE_PAUSABLE                                                               = 0x20
	SERVICE_PAUSE_STATE                                                            = 0x0C
	SERVICE_REDIR_COMM_PAUSED                                                      = 0x400
	SERVICE_REDIR_DISK_PAUSED                                                      = 0x100
	SERVICE_REDIR_PAUSED                                                           = 0x700
	SERVICE_REDIR_PRINT_PAUSED                                                     = 0x200
	SERVICE_RESRV_MASK                                                             = 0x0001FFFF
	SERVICE_UIC_AMBIGPARM                                                          = 3058
	SERVICE_UIC_BADPARMVAL                                                         = 3051
	SERVICE_UIC_CONFIG                                                             = 3055
	SERVICE_UIC_CONFLPARM                                                          = 3063
	SERVICE_UIC_DUPPARM                                                            = 3059
	SERVICE_UIC_EXEC                                                               = 3061
	SERVICE_UIC_FILE                                                               = 3064
	SERVICE_UIC_INTERNAL                                                           = 3057
	SERVICE_UIC_KILL                                                               = 3060
	SERVICE_UIC_MISSPARM                                                           = 3052
	SERVICE_UIC_M_ADDPAK                                                           = 3090
	SERVICE_UIC_M_ANNOUNCE                                                         = 3083
	SERVICE_UIC_M_DATABASE_ERROR                                                   = 5602
	SERVICE_UIC_M_DISK                                                             = 3071
	SERVICE_UIC_M_ERRLOG                                                           = 3088
	SERVICE_UIC_M_FILES                                                            = 3079
	SERVICE_UIC_M_FILE_UW                                                          = 3089
	SERVICE_UIC_M_LANGROUP                                                         = 3081
	SERVICE_UIC_M_LANROOT                                                          = 3075
	SERVICE_UIC_M_LAZY                                                             = 3091
	SERVICE_UIC_M_LOGS                                                             = 3080
	SERVICE_UIC_M_LSA_MACHINE_ACCT                                                 = 5601
	SERVICE_UIC_M_MEMORY                                                           = 3070
	SERVICE_UIC_M_MSGNAME                                                          = 3082
	SERVICE_UIC_M_NETLOGON_AUTH                                                    = 3098
	SERVICE_UIC_M_NETLOGON_DC_CFLCT                                                = 3097
	SERVICE_UIC_M_NETLOGON_MPATH                                                   = 5600
	SERVICE_UIC_M_NETLOGON_NO_DC                                                   = 3096
	SERVICE_UIC_M_NULL                                                             = 0
	SERVICE_UIC_M_PROCESSES                                                        = 3073
	SERVICE_UIC_M_REDIR                                                            = 3076
	SERVICE_UIC_M_SECURITY                                                         = 3074
	SERVICE_UIC_M_SEC_FILE_ERR                                                     = 3078
	SERVICE_UIC_M_SERVER                                                           = 3077
	SERVICE_UIC_M_SERVER_SEC_ERR                                                   = 3085
	SERVICE_UIC_M_THREADS                                                          = 3072
	SERVICE_UIC_M_UAS                                                              = 3084
	SERVICE_UIC_M_UAS_INVALID_ROLE                                                 = 3095
	SERVICE_UIC_M_UAS_MACHINE_ACCT                                                 = 3092
	SERVICE_UIC_M_UAS_PROLOG                                                       = 3099
	SERVICE_UIC_M_UAS_SERVERS_NMEMB                                                = 3093
	SERVICE_UIC_M_UAS_SERVERS_NOGRP                                                = 3094
	SERVICE_UIC_M_WKSTA                                                            = 3087
	SERVICE_UIC_NORMAL                                                             = 0
	SERVICE_UIC_RESOURCE                                                           = 3054
	SERVICE_UIC_SUBSERV                                                            = 3062
	SERVICE_UIC_SYSTEM                                                             = 3056
	SERVICE_UIC_UNKPARM                                                            = 3053
	SERVICE_UNINSTALLABLE                                                          = 0x10
	SERVICE_UNINSTALLED                                                            = 0x00
	SERVICE_UNINSTALL_PENDING                                                      = 0x02
	SESI1_NUM_ELEMENTS                                                             = 8
	SESI2_NUM_ELEMENTS                                                             = 9
	SESSION_CRYPT_KLEN                                                             = 21
	SESSION_PWLEN                                                                  = 24
	SESS_GUEST                                                                     = 0x00000001
	SESS_NOENCRYPTION                                                              = 0x00000002
	SETPROPS_NONE                                                                  = 0x0000
	SFGAO_BROWSABLE                                                                = 134217728
	SFGAO_CANCOPY                                                                  = 1
	SFGAO_CANDELETE                                                                = 32
	SFGAO_CANLINK                                                                  = 4
	SFGAO_CANMONIKER                                                               = 4194304
	SFGAO_CANMOVE                                                                  = 2
	SFGAO_CANRENAME                                                                = 16
	SFGAO_CAPABILITYMASK                                                           = 375
	SFGAO_COMPRESSED                                                               = 67108864
	SFGAO_CONTENTSMASK                                                             = 2147483648
	SFGAO_DISPLAYATTRMASK                                                          = 1032192
	SFGAO_DROPTARGET                                                               = 256
	SFGAO_ENCRYPTED                                                                = 8192
	SFGAO_FILESYSANCESTOR                                                          = 268435456
	SFGAO_FILESYSTEM                                                               = 1073741824
	SFGAO_FOLDER                                                                   = 536870912
	SFGAO_GHOSTED                                                                  = 32768
	SFGAO_HASPROPSHEET                                                             = 64
	SFGAO_HASSTORAGE                                                               = 4194304
	SFGAO_HASSUBFOLDER                                                             = 2147483648
	SFGAO_HIDDEN                                                                   = 524288
	SFGAO_ISSLOW                                                                   = 16384
	SFGAO_LINK                                                                     = 65536
	SFGAO_NEWCONTENT                                                               = 2097152
	SFGAO_NONENUMERATED                                                            = 1048576
	SFGAO_PKEYSFGAOMASK                                                            = 2164539392
	SFGAO_READONLY                                                                 = 262144
	SFGAO_REMOVABLE                                                                = 33554432
	SFGAO_SHARE                                                                    = 131072
	SFGAO_STORAGE                                                                  = 8
	SFGAO_STORAGEANCESTOR                                                          = 8388608
	SFGAO_STORAGECAPMASK                                                           = 1891958792
	SFGAO_STREAM                                                                   = 4194304
	SFGAO_SYSTEM                                                                   = 4096
	SFGAO_VALIDATE                                                                 = 16777216
	SFVM_ADDOBJECT                                                                 = 0x00000003
	SFVM_ADDPROPERTYPAGES                                                          = 47
	SFVM_BACKGROUNDENUM                                                            = 32
	SFVM_BACKGROUNDENUMDONE                                                        = 48
	SFVM_COLUMNCLICK                                                               = 24
	SFVM_DEFITEMCOUNT                                                              = 26
	SFVM_DEFVIEWMODE                                                               = 27
	SFVM_DIDDRAGDROP                                                               = 36
	SFVM_FSNOTIFY                                                                  = 14
	SFVM_GETANIMATION                                                              = 68
	SFVM_GETBUTTONINFO                                                             = 5
	SFVM_GETBUTTONS                                                                = 6
	SFVM_GETDETAILSOF                                                              = 23
	SFVM_GETHELPTEXT                                                               = 3
	SFVM_GETHELPTOPIC                                                              = 63
	SFVM_GETNOTIFY                                                                 = 49
	SFVM_GETPANE                                                                   = 59
	SFVM_GETSELECTEDOBJECTS                                                        = 0x00000009
	SFVM_GETSORTDEFAULTS                                                           = 53
	SFVM_GETTOOLTIPTEXT                                                            = 4
	SFVM_GETZONE                                                                   = 58
	SFVM_INITMENUPOPUP                                                             = 7
	SFVM_INVOKECOMMAND                                                             = 2
	SFVM_MERGEMENU                                                                 = 1
	SFVM_QUERYFSNOTIFY                                                             = 25
	SFVM_REARRANGE                                                                 = 0x00000001
	SFVM_REMOVEOBJECT                                                              = 0x00000006
	SFVM_SETCLIPBOARD                                                              = 0x00000010
	SFVM_SETISFV                                                                   = 39
	SFVM_SETITEMPOS                                                                = 0x0000000e
	SFVM_SETPOINTS                                                                 = 0x00000017
	SFVM_SIZE                                                                      = 57
	SFVM_THISIDLIST                                                                = 41
	SFVM_UNMERGEMENU                                                               = 28
	SFVM_UPDATEOBJECT                                                              = 0x00000007
	SFVM_UPDATESTATUSBAR                                                           = 31
	SFVM_WINDOWCREATED                                                             = 15
	SFVSOC_INVALIDATE_ALL                                                          = 0x00000001
	SFVSOC_NOSCROLL                                                                = 2
	SFVS_SELECT_ALLITEMS                                                           = 0x1
	SFVS_SELECT_INVERT                                                             = 0x2
	SFVS_SELECT_NONE                                                               = 0x0
	SHARE_CURRENT_USES_PARMNUM                                                     = 7
	SHARE_FILE_SD_INFOLEVEL                                                        = 1501
	SHARE_FILE_SD_PARMNUM                                                          = 501
	SHARE_MAX_USES_INFOLEVEL                                                       = 1006
	SHARE_MAX_USES_PARMNUM                                                         = 6
	SHARE_NETNAME_PARMNUM                                                          = 1
	SHARE_PASSWD_PARMNUM                                                           = 9
	SHARE_PATH_PARMNUM                                                             = 8
	SHARE_PERMISSIONS_PARMNUM                                                      = 5
	SHARE_REMARK_INFOLEVEL                                                         = 1004
	SHARE_REMARK_PARMNUM                                                           = 4
	SHARE_TYPE_PARMNUM                                                             = 3
	SHCDF_UPDATEITEM                                                               = 0x00000001
	SHCIDS_ALLFIELDS                                                               = 2147483648
	SHCIDS_BITMASK                                                                 = 4294901760
	SHCIDS_CANONICALONLY                                                           = 268435456
	SHCIDS_COLUMNMASK                                                              = 65535
	SHCNEE_MSI_CHANGE                                                              = 4
	SHCNEE_MSI_UNINSTALL                                                           = 5
	SHCNEE_ORDERCHANGED                                                            = 2
	SHCNE_ALLEVENTS                                                                = 2147483647
	SHCNE_ASSOCCHANGED                                                             = 134217728
	SHCNE_ATTRIBUTES                                                               = 2048
	SHCNE_CREATE                                                                   = 2
	SHCNE_DELETE                                                                   = 4
	SHCNE_DISKEVENTS                                                               = 145439
	SHCNE_DRIVEADD                                                                 = 256
	SHCNE_DRIVEADDGUI                                                              = 65536
	SHCNE_DRIVEREMOVED                                                             = 128
	SHCNE_EXTENDED_EVENT                                                           = 67108864
	SHCNE_FREESPACE                                                                = 262144
	SHCNE_GLOBALEVENTS                                                             = 201687520
	SHCNE_INTERRUPT                                                                = 2147483648
	SHCNE_MEDIAINSERTED                                                            = 32
	SHCNE_MEDIAREMOVED                                                             = 64
	SHCNE_MKDIR                                                                    = 8
	SHCNE_NETSHARE                                                                 = 512
	SHCNE_NETUNSHARE                                                               = 1024
	SHCNE_RENAMEFOLDER                                                             = 131072
	SHCNE_RENAMEITEM                                                               = 1
	SHCNE_RMDIR                                                                    = 16
	SHCNE_SERVERDISCONNECT                                                         = 16384
	SHCNE_UPDATEDIR                                                                = 4096
	SHCNE_UPDATEIMAGE                                                              = 32768
	SHCNE_UPDATEITEM                                                               = 8192
	SHCNF_DWORD                                                                    = 0x0003
	SHCNF_FLUSH                                                                    = 0x1000
	SHCNF_FLUSHNOWAIT                                                              = 0x3000
	SHCNF_IDLIST                                                                   = 0x0000
	SHCNF_NOTIFYRECURSIVE                                                          = 0x10000
	SHCNF_PATH                                                                     = 1
	SHCNF_PATHA                                                                    = 0x0001
	SHCNF_PATHW                                                                    = 0x0005
	SHCNF_PRINTER                                                                  = 2
	SHCNF_PRINTERA                                                                 = 0x0002
	SHCNF_PRINTERW                                                                 = 0x0006
	SHCNF_TYPE                                                                     = 0x00ff
	SHCNRF_InterruptLevel                                                          = 0x0001
	SHCNRF_NewDelivery                                                             = 0x8000
	SHCNRF_RecursiveInterrupt                                                      = 0x1000
	SHCNRF_ShellLevel                                                              = 0x0002
	SHDID_COMPUTER_AUDIO                                                           = 19
	SHDID_COMPUTER_CDROM                                                           = 10
	SHDID_COMPUTER_DRIVE35                                                         = 5
	SHDID_COMPUTER_DRIVE525                                                        = 6
	SHDID_COMPUTER_FIXED                                                           = 8
	SHDID_COMPUTER_IMAGING                                                         = 18
	SHDID_COMPUTER_NETDRIVE                                                        = 9
	SHDID_COMPUTER_OTHER                                                           = 12
	SHDID_COMPUTER_RAMDISK                                                         = 11
	SHDID_COMPUTER_REMOVABLE                                                       = 7
	SHDID_COMPUTER_SHAREDDOCS                                                      = 20
	SHDID_FS_DIRECTORY                                                             = 3
	SHDID_FS_FILE                                                                  = 2
	SHDID_FS_OTHER                                                                 = 4
	SHDID_NET_DOMAIN                                                               = 13
	SHDID_NET_OTHER                                                                = 17
	SHDID_NET_RESTOFNET                                                            = 16
	SHDID_NET_SERVER                                                               = 14
	SHDID_NET_SHARE                                                                = 15
	SHDID_ROOT_REGITEM                                                             = 1
	SHELLSTATEVERSION_IE4                                                          = 9
	SHELLSTATEVERSION_WIN2K                                                        = 10
	SHFMT_CANCEL                                                                   = 4294967294
	SHFMT_ERROR                                                                    = 4294967295
	SHFMT_ID_DEFAULT                                                               = 0xffff
	SHFMT_NOFORMAT                                                                 = 4294967293
	SHFMT_OPT_FULL                                                                 = 0x0001
	SHFMT_OPT_SYSONLY                                                              = 0x0002
	SHGDFIL_DESCRIPTIONID                                                          = 3
	SHGDFIL_FINDDATA                                                               = 1
	SHGDFIL_NETRESOURCE                                                            = 2
	SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM                                      = 0x0800
	SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING                                          = 0x0400
	SHI1005_FLAGS_DFS                                                              = 0x01
	SHI1005_FLAGS_DFS_ROOT                                                         = 0x02
	SHI1005_FLAGS_FORCE_SHARED_DELETE                                              = 0x0200
	SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS                                         = 0x0100
	SHI1005_VALID_FLAGS_SET                                                        = 3888
	SHI1_NUM_ELEMENTS                                                              = 4
	SHI2_NUM_ELEMENTS                                                              = 10
	SHIMSTCAPFLAG_LOCKABLE                                                         = 0x0001
	SHIMSTCAPFLAG_PURGEABLE                                                        = 0x0002
	SHOP_FILEPATH                                                                  = 0x00000002
	SHOP_PRINTERNAME                                                               = 0x00000001
	SHOP_VOLUMEGUID                                                                = 0x00000004
	SHPPFW_ASKDIRCREATE                                                            = 0x00000002
	SHPPFW_DEFAULT                                                                 = 1
	SHPPFW_DIRCREATE                                                               = 0x00000001
	SHPPFW_IGNOREFILENAME                                                          = 0x00000004
	SHPPFW_MEDIACHECKONLY                                                          = 0x00000010
	SHPPFW_NONE                                                                    = 0x00000000
	SHPPFW_NOWRITECHECK                                                            = 0x00000008
	SHPWHF_NOFILESELECTOR                                                          = 0x00000004
	SHPWHF_NONETPLACECREATE                                                        = 0x00000002
	SHPWHF_NORECOMPRESS                                                            = 0x00000001
	SHPWHF_USEMRU                                                                  = 0x00000008
	SHPWHF_VALIDATEVIAWEBFOLDERS                                                   = 0x00010000
	SHPWLEN                                                                        = 8
	SIMPLEBLOB                                                                     = 0x1
	SIOM_ICONINDEX                                                                 = 2
	SIOM_OVERLAYINDEX                                                              = 1
	SIOM_RESERVED_DEFAULT                                                          = 3
	SIOM_RESERVED_LINK                                                             = 1
	SIOM_RESERVED_SHARED                                                           = 0
	SIOM_RESERVED_SLOWFILE                                                         = 2
	SITE_PIN_RULES_ALL_SUBDOMAINS_FLAG                                             = 0x1
	SMART_ABORT_OFFLINE_SELFTEST                                                   = 127
	SMART_CMD                                                                      = 0xB0
	SMART_CYL_HI                                                                   = 0xC2
	SMART_CYL_LOW                                                                  = 0x4F
	SMART_ERROR_NO_MEM                                                             = 7
	SMART_EXTENDED_SELFTEST_CAPTIVE                                                = 130
	SMART_EXTENDED_SELFTEST_OFFLINE                                                = 2
	SMART_GET_VERSION                                                              = 475264
	SMART_IDE_ERROR                                                                = 1
	SMART_INVALID_BUFFER                                                           = 4
	SMART_INVALID_COMMAND                                                          = 3
	SMART_INVALID_DRIVE                                                            = 5
	SMART_INVALID_FLAG                                                             = 2
	SMART_INVALID_IOCTL                                                            = 6
	SMART_INVALID_REGISTER                                                         = 8
	SMART_LOG_SECTOR_SIZE                                                          = 512
	SMART_NOT_SUPPORTED                                                            = 9
	SMART_NO_ERROR                                                                 = 0
	SMART_NO_IDE_DEVICE                                                            = 10
	SMART_OFFLINE_ROUTINE_OFFLINE                                                  = 0
	SMART_RCV_DRIVE_DATA                                                           = 508040
	SMART_READ_LOG                                                                 = 0xD5
	SMART_SEND_DRIVE_COMMAND                                                       = 508036
	SMART_SHORT_SELFTEST_CAPTIVE                                                   = 129
	SMART_SHORT_SELFTEST_OFFLINE                                                   = 1
	SMART_WRITE_LOG                                                                = 0xd6
	SMC_CHEVRONEXPAND                                                              = 0x00000019
	SMC_CHEVRONGETTIP                                                              = 0x0000002F
	SMC_CREATE                                                                     = 0x00000002
	SMC_DEFAULTICON                                                                = 0x00000016
	SMC_DEMOTE                                                                     = 0x00000011
	SMC_DISPLAYCHEVRONTIP                                                          = 0x0000002A
	SMC_EXITMENU                                                                   = 0x00000003
	SMC_GETINFO                                                                    = 0x00000005
	SMC_GETOBJECT                                                                  = 0x00000007
	SMC_GETSFINFO                                                                  = 0x00000006
	SMC_GETSFOBJECT                                                                = 0x00000008
	SMC_INITMENU                                                                   = 0x00000001
	SMC_NEWITEM                                                                    = 0x00000017
	SMC_PROMOTE                                                                    = 0x00000012
	SMC_REFRESH                                                                    = 0x00000010
	SMC_SETSFOBJECT                                                                = 0x0000002D
	SMC_SFDDRESTRICTED                                                             = 0x00000030
	SMC_SFEXEC                                                                     = 0x00000009
	SMC_SFSELECTITEM                                                               = 0x0000000A
	SMC_SHCHANGENOTIFY                                                             = 0x0000002E
	SMDM_HMENU                                                                     = 0x00000002
	SMDM_SHELLFOLDER                                                               = 0x00000001
	SMDM_TOOLBAR                                                                   = 0x00000004
	SMINIT_CACHED                                                                  = 0x00000010
	SMINIT_DEFAULT                                                                 = 0x00000000
	SMINIT_HORIZONTAL                                                              = 0x20000000
	SMINIT_RESTRICT_DRAGDROP                                                       = 0x00000002
	SMINIT_TOPLEVEL                                                                = 0x00000004
	SMINIT_VERTICAL                                                                = 0x10000000
	SMINV_ID                                                                       = 0x00000008
	SMINV_REFRESH                                                                  = 0x00000001
	SMSET_BOTTOM                                                                   = 0x20000000
	SMSET_DONTOWN                                                                  = 0x00000001
	SMSET_TOP                                                                      = 0x10000000
	SNLEN                                                                          = 80
	SOFTDIST_ADSTATE_AVAILABLE                                                     = 0x1
	SOFTDIST_ADSTATE_DOWNLOADED                                                    = 0x2
	SOFTDIST_ADSTATE_INSTALLED                                                     = 0x3
	SOFTDIST_ADSTATE_NONE                                                          = 0x0
	SOFTDIST_FLAG_DELETE_SUBSCRIPTION                                              = 0x8
	SOFTDIST_FLAG_USAGE_AUTOINSTALL                                                = 0x4
	SOFTDIST_FLAG_USAGE_EMAIL                                                      = 0x1
	SOFTDIST_FLAG_USAGE_PRECACHE                                                   = 0x2
	SORTED_CTL_EXT_COUNT_OFFSET                                                    = 4
	SORTED_CTL_EXT_FLAGS_OFFSET                                                    = 0
	SORTED_CTL_EXT_HASHED_SUBJECT_IDENTIFIER_FLAG                                  = 0x1
	SORTED_CTL_EXT_HASH_BUCKET_OFFSET                                              = 12
	SORTED_CTL_EXT_MAX_COLLISION_OFFSET                                            = 8
	SSF_DESKTOPHTML                                                                = 0x00000200
	SSF_DONTPRETTYPATH                                                             = 0x00000800
	SSF_DOUBLECLICKINWEBVIEW                                                       = 0x00000080
	SSF_FILTER                                                                     = 0x00010000
	SSF_HIDDENFILEEXTS                                                             = 0x00000004
	SSF_HIDEICONS                                                                  = 0x00004000
	SSF_MAPNETDRVBUTTON                                                            = 0x00001000
	SSF_NOCONFIRMRECYCLE                                                           = 0x00008000
	SSF_NONETCRAWLING                                                              = 0x00100000
	SSF_SEPPROCESS                                                                 = 0x00080000
	SSF_SERVERADMINUI                                                              = 0x00000004
	SSF_SHOWALLOBJECTS                                                             = 0x00000001
	SSF_SHOWATTRIBCOL                                                              = 0x00000100
	SSF_SHOWCOMPCOLOR                                                              = 0x00000008
	SSF_SHOWEXTENSIONS                                                             = 0x00000002
	SSF_SHOWINFOTIP                                                                = 0x00002000
	SSF_SHOWSTARTPAGE                                                              = 0x00400000
	SSF_SHOWSUPERHIDDEN                                                            = 0x00040000
	SSF_SHOWSYSFILES                                                               = 0x00000020
	SSF_SORTCOLUMNS                                                                = 0x00000010
	SSF_STARTPANELON                                                               = 0x00200000
	SSF_WEBVIEW                                                                    = 0x00020000
	SSF_WIN95CLASSIC                                                               = 0x00000400
	SSL_F12_ERROR_TEXT_LENGTH                                                      = 256
	SSL_HPKP_HEADER_COUNT                                                          = 2
	SSL_HPKP_PKP_HEADER_INDEX                                                      = 0
	SSL_HPKP_PKP_RO_HEADER_INDEX                                                   = 1
	SSL_KEY_PIN_ERROR_TEXT_LENGTH                                                  = 512
	STATSOPT_CLR                                                                   = 1
	STATUSCLASSNAMEA                                                               = "msctls_statusbar32"
	STDOLE2_LCID                                                                   = 0x0000
	STDOLE2_MAJORVERNUM                                                            = 0x2
	STDOLE2_MINORVERNUM                                                            = 0x0
	STDOLE_LCID                                                                    = 0x0000
	STDOLE_MAJORVERNUM                                                             = 0x1
	STDOLE_MINORVERNUM                                                             = 0x0
	STD_COPY                                                                       = 1
	STD_CUT                                                                        = 0
	STD_DELETE                                                                     = 5
	STD_FILENEW                                                                    = 6
	STD_FILEOPEN                                                                   = 7
	STD_FILESAVE                                                                   = 8
	STD_FIND                                                                       = 12
	STD_HELP                                                                       = 11
	STD_PASTE                                                                      = 2
	STD_PRINT                                                                      = 14
	STD_PRINTPRE                                                                   = 9
	STD_PROPERTIES                                                                 = 10
	STD_REDOW                                                                      = 4
	STD_REPLACE                                                                    = 13
	STD_UNDO                                                                       = 3
	STGFMT_ANY                                                                     = 4
	STGFMT_DOCFILE                                                                 = 5
	STGFMT_DOCUMENT                                                                = 0
	STGFMT_FILE                                                                    = 3
	STGFMT_NATIVE                                                                  = 1
	STGFMT_STORAGE                                                                 = 0
	STGM_CONVERT                                                                   = 131072
	STGM_CREATE                                                                    = 4096
	STGM_DELETEONRELEASE                                                           = 67108864
	STGM_DIRECT                                                                    = 0
	STGM_DIRECT_SWMR                                                               = 4194304
	STGM_FAILIFTHERE                                                               = 0
	STGM_NOSCRATCH                                                                 = 1048576
	STGM_NOSNAPSHOT                                                                = 2097152
	STGM_PRIORITY                                                                  = 262144
	STGM_READ                                                                      = 0
	STGM_READWRITE                                                                 = 2
	STGM_SHARE_DENY_NONE                                                           = 64
	STGM_SHARE_DENY_READ                                                           = 48
	STGM_SHARE_DENY_WRITE                                                          = 32
	STGM_SHARE_EXCLUSIVE                                                           = 16
	STGM_SIMPLE                                                                    = 134217728
	STGM_TRANSACTED                                                                = 65536
	STGM_WRITE                                                                     = 1
	STGOPTIONS_VERSION                                                             = 2
	STGTY_REPEAT                                                                   = 256
	STG_LAYOUT_INTERLEAVED                                                         = 1
	STG_LAYOUT_SEQUENTIAL                                                          = 0
	STG_TOEND                                                                      = 4294967295
	STREAM_CLEAR_ENCRYPTION                                                        = 0x00000004
	STREAM_SET_ENCRYPTION                                                          = 0x00000003
	STR_MYDOCS_CLSID                                                               = "{450D8FBA-AD25-11D0-98A8-0800361B1103}"
	STXTLEN                                                                        = 256
	STYPE_DEVICE                                                                   = 2
	STYPE_DISKTREE                                                                 = 0
	STYPE_IPC                                                                      = 3
	STYPE_PRINTQ                                                                   = 1
	STYPE_SPECIAL                                                                  = 0x80000000
	STYPE_TEMPORARY                                                                = 0x40000000
	SUB_CONTAINERS_AND_OBJECTS_INHERIT                                             = 0x3
	SUB_CONTAINERS_ONLY_INHERIT                                                    = 0x2
	SUB_OBJECTS_ONLY_INHERIT                                                       = 0x1
	SUPPORTS_ANY                                                                   = 4294967295
	SUPPORTS_LOCAL                                                                 = 32
	SUPPORTS_REMOTE_ADMIN_PROTOCOL                                                 = 2
	SUPPORTS_RPC                                                                   = 4
	SUPPORTS_SAM_PROTOCOL                                                          = 8
	SUPPORTS_UNICODE                                                               = 16
	SVAUD_BADNETLOGON                                                              = 0x180
	SVAUD_BADSESSLOGON                                                             = 0x18
	SVAUD_BADUSE                                                                   = 0x1800
	SVAUD_GOODNETLOGON                                                             = 0x60
	SVAUD_GOODSESSLOGON                                                            = 0x6
	SVAUD_GOODUSE                                                                  = 0x600
	SVAUD_LOGON                                                                    = 510
	SVAUD_LOGONLIM                                                                 = 0x00010000
	SVAUD_NETLOGON                                                                 = 480
	SVAUD_PERMISSIONS                                                              = 0x4000
	SVAUD_RESOURCE                                                                 = 0x8000
	SVAUD_SERVICE                                                                  = 0x1
	SVAUD_SESSLOGON                                                                = 30
	SVAUD_USE                                                                      = 7680
	SVAUD_USERLIST                                                                 = 0x2000
	SVI1_NUM_ELEMENTS                                                              = 5
	SVI2_NUM_ELEMENTS                                                              = 40
	SVI3_NUM_ELEMENTS                                                              = 44
	SVTI2_REMAP_PIPE_NAMES                                                         = 0x2
	SV_ACCEPTDOWNLEVELAPIS_PARMNUM                                                 = 517
	SV_ACCESSALERT_PARMNUM                                                         = 40
	SV_ACTIVELOCKS_PARMNUM                                                         = 419
	SV_ALERTSCHEDULE_INFOLEVEL                                                     = 1547
	SV_ALERTSCHEDULE_PARMNUM                                                       = 547
	SV_ALERTSCHED_PARMNUM                                                          = 37
	SV_ALERTS_PARMNUM                                                              = 11
	SV_ALIST_MTIME_PARMNUM                                                         = 403
	SV_ANNDELTA_INFOLEVEL                                                          = 1018
	SV_ANNDELTA_PARMNUM                                                            = 18
	SV_ANNOUNCE_INFOLEVEL                                                          = 1017
	SV_ANNOUNCE_PARMNUM                                                            = 17
	SV_AUTOSHARESERVER_INFOLEVEL                                                   = 1592
	SV_AUTOSHARESERVER_PARMNUM                                                     = 592
	SV_AUTOSHAREWKS_INFOLEVEL                                                      = 1591
	SV_AUTOSHAREWKS_PARMNUM                                                        = 591
	SV_BALANCECOUNT_INFOLEVEL                                                      = 1577
	SV_BALANCECOUNT_PARMNUM                                                        = 577
	SV_CACHEDDIRECTORYLIMIT_INFOLEVEL                                              = 1587
	SV_CACHEDDIRECTORYLIMIT_PARMNUM                                                = 587
	SV_CACHEDOPENLIMIT_INFOLOEVEL                                                  = 1571
	SV_CACHEDOPENLIMIT_PARMNUM                                                     = 571
	SV_CHDEVJOBS_PARMNUM                                                           = 411
	SV_CHDEVQ_PARMNUM                                                              = 410
	SV_COMMENT_INFOLEVEL                                                           = 1005
	SV_COMMENT_PARMNUM                                                             = 5
	SV_CONNECTIONLESSAUTODISC_INFOLOEVEL                                           = 1562
	SV_CONNECTIONLESSAUTODISC_PARMNUM                                              = 562
	SV_CONNECTIONNOSESSIONSTIMEOUT_INFOLEVEL                                       = 1596
	SV_CONNECTIONNOSESSIONSTIMEOUT_PARMNUM                                         = 596
	SV_CONNECTIONS_PARMNUM                                                         = 412
	SV_CRITICALTHREADS_INFOLOEVEL                                                  = 1572
	SV_CRITICALTHREADS_PARMNUM                                                     = 572
	SV_DISABLEDOS_INFOLEVEL                                                        = 1600
	SV_DISABLEDOS_PARMNUM                                                          = 600
	SV_DISABLESTRICTNAMECHECKING_INFOLEVEL                                         = 1602
	SV_DISABLESTRICTNAMECHECKING_PARMNUM                                           = 602
	SV_DISC_INFOLEVEL                                                              = 1010
	SV_DISC_PARMNUM                                                                = 10
	SV_DISKALERT_PARMNUM                                                           = 41
	SV_DISKSPACETHRESHOLD_INFOLEVEL                                                = 1550
	SV_DISKSPACETHRESHOLD_PARMNUM                                                  = 550
	SV_DOMAIN_PARMNUM                                                              = 519
	SV_ENABLECOMPRESSION_INFOLEVEL                                                 = 1590
	SV_ENABLECOMPRESSION_PARMNUM                                                   = 590
	SV_ENABLEFCBOPENS_INFOLEVEL                                                    = 1538
	SV_ENABLEFCBOPENS_PARMNUM                                                      = 538
	SV_ENABLEFORCEDLOGOFF_INFOLEVEL                                                = 1515
	SV_ENABLEFORCEDLOGOFF_PARMNUM                                                  = 515
	SV_ENABLEOPLOCKFORCECLOSE_INFOLEVEL                                            = 1537
	SV_ENABLEOPLOCKFORCECLOSE_PARMNUM                                              = 537
	SV_ENABLEOPLOCKS_INFOLEVEL                                                     = 1536
	SV_ENABLEOPLOCKS_PARMNUM                                                       = 536
	SV_ENABLERAW_INFOLEVEL                                                         = 1539
	SV_ENABLERAW_PARMNUM                                                           = 539
	SV_ENABLESECURITYSIGNATURE_INFOLEVEL                                           = 1593
	SV_ENABLESECURITYSIGNATURE_PARMNUM                                             = 593
	SV_ENABLESHAREDNETDRIVES_INFOLEVEL                                             = 1540
	SV_ENABLESHAREDNETDRIVES_PARMNUM                                               = 540
	SV_ENABLESOFTCOMPAT_INFOLEVEL                                                  = 1514
	SV_ENABLESOFTCOMPAT_PARMNUM                                                    = 514
	SV_ENABLEW9XSECURITYSIGNATURE_INFOLEVEL                                        = 1598
	SV_ENABLEW9XSECURITYSIGNATURE_PARMNUM                                          = 598
	SV_ENABLEWFW311DIRECTIPX_INFOLOEVEL                                            = 1574
	SV_ENABLEWFW311DIRECTIPX_PARMNUM                                               = 574
	SV_ENFORCEKERBEROSREAUTHENTICATION_INFOLEVEL                                   = 1599
	SV_ENFORCEKERBEROSREAUTHENTICATION_PARMNUM                                     = 599
	SV_ERRORALERT_PARMNUM                                                          = 38
	SV_ERRORTHRESHOLD_INFOLEVEL                                                    = 1548
	SV_ERRORTHRESHOLD_PARMNUM                                                      = 548
	SV_GLIST_MTIME_PARMNUM                                                         = 402
	SV_GUESTACC_PARMNUM                                                            = 408
	SV_HIDDEN                                                                      = 1
	SV_HIDDEN_INFOLEVEL                                                            = 1016
	SV_HIDDEN_PARMNUM                                                              = 16
	SV_IDLETHREADTIMEOUT_INFOLEVEL                                                 = 1597
	SV_IDLETHREADTIMEOUT_PARMNUM                                                   = 597
	SV_INITCONNTABLE_INFOLEVEL                                                     = 1544
	SV_INITCONNTABLE_PARMNUM                                                       = 544
	SV_INITFILETABLE_INFOLEVEL                                                     = 1545
	SV_INITFILETABLE_PARMNUM                                                       = 545
	SV_INITSEARCHTABLE_INFOLEVEL                                                   = 1546
	SV_INITSEARCHTABLE_PARMNUM                                                     = 546
	SV_INITSESSTABLE_INFOLEVEL                                                     = 1543
	SV_INITSESSTABLE_PARMNUM                                                       = 543
	SV_INITWORKITEMS_PARMNUM                                                       = 505
	SV_IRPSTACKSIZE_PARMNUM                                                        = 508
	SV_LANMASK_PARMNUM                                                             = 407
	SV_LINKINFOVALIDTIME_INFOLEVEL                                                 = 1554
	SV_LINKINFOVALIDTIME_PARMNUM                                                   = 554
	SV_LMANNOUNCE_INFOLEVEL                                                        = 1518
	SV_LMANNOUNCE_PARMNUM                                                          = 518
	SV_LOCKVIOLATIONDELAY_INFOLOEVEL                                               = 1569
	SV_LOCKVIOLATIONDELAY_PARMNUM                                                  = 569
	SV_LOCKVIOLATIONOFFSET_INFOLOEVEL                                              = 1568
	SV_LOCKVIOLATIONOFFSET_PARMNUM                                                 = 568
	SV_LOCKVIOLATIONRETRIES_INFOLOEVEL                                             = 1567
	SV_LOCKVIOLATIONRETRIES_PARMNUM                                                = 567
	SV_LOGONALERT_PARMNUM                                                          = 39
	SV_LOWDISKSPACEMINIMUM_INFOLEVEL                                               = 1601
	SV_LOWDISKSPACEMINIMUM_PARMNUM                                                 = 601
	SV_MAXAUDITSZ_PARMNUM                                                          = 43
	SV_MAXCOPYLENGTH_INFOLEVEL                                                     = 1588
	SV_MAXCOPYLENGTH_PARMNUM                                                       = 588
	SV_MAXCOPYREADLEN_INFOLEVEL                                                    = 1520
	SV_MAXCOPYREADLEN_PARMNUM                                                      = 520
	SV_MAXCOPYWRITELEN_INFOLEVEL                                                   = 1521
	SV_MAXCOPYWRITELEN_PARMNUM                                                     = 521
	SV_MAXFREECONNECTIONS_INFOLEVEL                                                = 1542
	SV_MAXFREECONNECTIONS_PARMNUM                                                  = 542
	SV_MAXFREELFCBS_INFOLEVEL                                                      = 1581
	SV_MAXFREELFCBS_PARMNUM                                                        = 581
	SV_MAXFREEMFCBS_INFOLEVEL                                                      = 1580
	SV_MAXFREEMFCBS_PARMNUM                                                        = 580
	SV_MAXFREEPAGEDPOOLCHUNKS_INFOLEVEL                                            = 1582
	SV_MAXFREEPAGEDPOOLCHUNKS_PARMNUM                                              = 582
	SV_MAXFREERFCBS_INFOLEVEL                                                      = 1579
	SV_MAXFREERFCBS_PARMNUM                                                        = 579
	SV_MAXGLOBALOPENSEARCH_INFOLOEVEL                                              = 1565
	SV_MAXGLOBALOPENSEARCH_PARMNUM                                                 = 565
	SV_MAXKEEPCOMPLSEARCH_INFOLEVEL                                                = 1525
	SV_MAXKEEPCOMPLSEARCH_PARMNUM                                                  = 525
	SV_MAXKEEPSEARCH_INFOLEVEL                                                     = 1523
	SV_MAXKEEPSEARCH_PARMNUM                                                       = 523
	SV_MAXLINKDELAY_INFOLEVEL                                                      = 1552
	SV_MAXLINKDELAY_PARMNUM                                                        = 552
	SV_MAXMPXCT_INFOLEVEL                                                          = 1533
	SV_MAXMPXCT_PARMNUM                                                            = 533
	SV_MAXNONPAGEDMEMORYUSAGE_INFOLEVEL                                            = 1512
	SV_MAXNONPAGEDMEMORYUSAGE_PARMNUM                                              = 512
	SV_MAXPAGEDMEMORYUSAGE_INFOLEVEL                                               = 1513
	SV_MAXPAGEDMEMORYUSAGE_PARMNUM                                                 = 513
	SV_MAXPAGEDPOOLCHUNKSIZE_INFOLEVEL                                             = 1584
	SV_MAXPAGEDPOOLCHUNKSIZE_PARMNUM                                               = 584
	SV_MAXRAWBUFLEN_INFOLEVEL                                                      = 1509
	SV_MAXRAWBUFLEN_PARMNUM                                                        = 509
	SV_MAXRAWWORKITEMS_INFOLOEVEL                                                  = 1557
	SV_MAXRAWWORKITEMS_PARMNUM                                                     = 557
	SV_MAXTHREADSPERQUEUE_INFOLEVEL                                                = 1586
	SV_MAXTHREADSPERQUEUE_PARMNUM                                                  = 586
	SV_MAXWORKITEMIDLETIME_INFOLEVEL                                               = 1556
	SV_MAXWORKITEMIDLETIME_PARMNUM                                                 = 556
	SV_MAXWORKITEMS_INFOLEVEL                                                      = 1506
	SV_MAXWORKITEMS_PARMNUM                                                        = 506
	SV_MAX_CMD_LEN                                                                 = 256
	SV_MAX_SRV_HEUR_LEN                                                            = 32
	SV_MDLREADSWITCHOVER_INFOLOEVEL                                                = 1570
	SV_MDLREADSWITCHOVER_PARMNUM                                                   = 570
	SV_MINCLIENTBUFFERSIZE_INFOLEVEL                                               = 1595
	SV_MINCLIENTBUFFERSIZE_PARMNUM                                                 = 595
	SV_MINFREECONNECTIONS_INFOLEVEL                                                = 1541
	SV_MINFREECONNECTIONS_PARMNUM                                                  = 541
	SV_MINFREEWORKITEMS_INFOLEVEL                                                  = 1530
	SV_MINFREEWORKITEMS_PARMNUM                                                    = 530
	SV_MINKEEPCOMPLSEARCH_INFOLEVEL                                                = 1524
	SV_MINKEEPCOMPLSEARCH_PARMNUM                                                  = 524
	SV_MINKEEPSEARCH_INFOLEVEL                                                     = 1522
	SV_MINKEEPSEARCH_PARMNUM                                                       = 522
	SV_MINLINKTHROUGHPUT_INFOLEVEL                                                 = 1553
	SV_MINLINKTHROUGHPUT_PARMNUM                                                   = 553
	SV_MINPAGEDPOOLCHUNKSIZE_INFOLEVEL                                             = 1583
	SV_MINPAGEDPOOLCHUNKSIZE_PARMNUM                                               = 583
	SV_MINRCVQUEUE_INFOLEVEL                                                       = 1529
	SV_MINRCVQUEUE_PARMNUM                                                         = 529
	SV_NAME_PARMNUM                                                                = 102
	SV_NETIOALERT_PARMNUM                                                          = 42
	SV_NETWORKERRORTHRESHOLD_INFOLEVEL                                             = 1549
	SV_NETWORKERRORTHRESHOLD_PARMNUM                                               = 549
	SV_NODISC                                                                      = -1
	SV_NUMADMIN_PARMNUM                                                            = 406
	SV_NUMBIGBUF_PARMNUM                                                           = 422
	SV_NUMBLOCKTHREADS_PARMNUM                                                     = 527
	SV_NUMFILETASKS_PARMNUM                                                        = 423
	SV_NUMREQBUF_PARMNUM                                                           = 420
	SV_OPENFILES_PARMNUM                                                           = 414
	SV_OPENSEARCH_INFOLEVEL                                                        = 1503
	SV_OPENSEARCH_PARMNUM                                                          = 503
	SV_OPLOCKBREAKRESPONSEWAIT_INFOLEVEL                                           = 1535
	SV_OPLOCKBREAKRESPONSEWAIT_PARMNUM                                             = 535
	SV_OPLOCKBREAKWAIT_INFOLEVEL                                                   = 1534
	SV_OPLOCKBREAKWAIT_PARMNUM                                                     = 534
	SV_OTHERQUEUEAFFINITY_INFOLEVEL                                                = 1575
	SV_OTHERQUEUEAFFINITY_PARMNUM                                                  = 575
	SV_PLATFORM_ID_NT                                                              = 500
	SV_PLATFORM_ID_OS2                                                             = 400
	SV_PLATFORM_ID_PARMNUM                                                         = 101
	SV_PREFERREDAFFINITY_INFOLEVEL                                                 = 1578
	SV_PREFERREDAFFINITY_PARMNUM                                                   = 578
	SV_PRODUCTTYPE_INFOLOEVEL                                                      = 1560
	SV_PRODUCTTYPE_PARMNUM                                                         = 560
	SV_QUEUESAMPLESECS_INFOLEVEL                                                   = 1576
	SV_QUEUESAMPLESECS_PARMNUM                                                     = 576
	SV_RAWWORKITEMS_PARMNUM                                                        = 507
	SV_REMOVEDUPLICATESEARCHES_INFOLOEVEL                                          = 1566
	SV_REMOVEDUPLICATESEARCHES_PARMNUM                                             = 566
	SV_REQUIRESECURITYSIGNATURE_INFOLEVEL                                          = 1594
	SV_REQUIRESECURITYSIGNATURE_PARMNUM                                            = 594
	SV_RESTRICTNULLSESSACCESS_INFOLOEVEL                                           = 1573
	SV_RESTRICTNULLSESSACCESS_PARMNUM                                              = 573
	SV_SCAVQOSINFOUPDATETIME_INFOLEVEL                                             = 1555
	SV_SCAVQOSINFOUPDATETIME_PARMNUM                                               = 555
	SV_SCAVTIMEOUT_INFOLEVEL                                                       = 1528
	SV_SCAVTIMEOUT_PARMNUM                                                         = 528
	SV_SECURITY_PARMNUM                                                            = 405
	SV_SENDSFROMPREFERREDPROCESSOR_INFOLEVEL                                       = 1585
	SV_SENDSFROMPREFERREDPROCESSOR_PARMNUM                                         = 585
	SV_SERVERSIZE_INFOLOEVEL                                                       = 1561
	SV_SERVERSIZE_PARMNUM                                                          = 561
	SV_SESSCONNS_INFOLEVEL                                                         = 1511
	SV_SESSCONNS_PARMNUM                                                           = 511
	SV_SESSOPENS_INFOLEVEL                                                         = 1501
	SV_SESSOPENS_PARMNUM                                                           = 501
	SV_SESSREQS_PARMNUM                                                            = 417
	SV_SESSUSERS_INFOLEVEL                                                         = 1510
	SV_SESSUSERS_PARMNUM                                                           = 510
	SV_SESSVCS_INFOLEVEL                                                           = 1502
	SV_SESSVCS_PARMNUM                                                             = 502
	SV_SHARESECURITY                                                               = 0
	SV_SHARES_PARMNUM                                                              = 413
	SV_SHARINGVIOLATIONDELAY_INFOLOEVEL                                            = 1564
	SV_SHARINGVIOLATIONDELAY_PARMNUM                                               = 564
	SV_SHARINGVIOLATIONRETRIES_INFOLOEVEL                                          = 1563
	SV_SHARINGVIOLATIONRETRIES_PARMNUM                                             = 563
	SV_SIZREQBUF_PARMNUM                                                           = 504
	SV_SRVHEURISTICS_PARMNUM                                                       = 431
	SV_THREADCOUNTADD_PARMNUM                                                      = 526
	SV_THREADPRIORITY_PARMNUM                                                      = 532
	SV_TIMESOURCE_INFOLEVEL                                                        = 1516
	SV_TIMESOURCE_PARMNUM                                                          = 516
	SV_TYPE_AFP                                                                    = 0x00000040
	SV_TYPE_ALL                                                                    = 0xFFFFFFFF
	SV_TYPE_ALTERNATE_XPORT                                                        = 0x20000000
	SV_TYPE_BACKUP_BROWSER                                                         = 0x00020000
	SV_TYPE_CLUSTER_NT                                                             = 0x01000000
	SV_TYPE_CLUSTER_VS_NT                                                          = 0x04000000
	SV_TYPE_DCE                                                                    = 0x10000000
	SV_TYPE_DFS                                                                    = 0x00800000
	SV_TYPE_DIALIN_SERVER                                                          = 0x00000400
	SV_TYPE_DOMAIN_BAKCTRL                                                         = 0x00000010
	SV_TYPE_DOMAIN_CTRL                                                            = 0x00000008
	SV_TYPE_DOMAIN_ENUM                                                            = 0x80000000
	SV_TYPE_DOMAIN_MASTER                                                          = 0x00080000
	SV_TYPE_DOMAIN_MEMBER                                                          = 0x00000100
	SV_TYPE_LOCAL_LIST_ONLY                                                        = 0x40000000
	SV_TYPE_MASTER_BROWSER                                                         = 0x00040000
	SV_TYPE_NOVELL                                                                 = 0x00000080
	SV_TYPE_NT                                                                     = 0x00001000
	SV_TYPE_PARMNUM                                                                = 105
	SV_TYPE_POTENTIAL_BROWSER                                                      = 0x00010000
	SV_TYPE_PRINTQ_SERVER                                                          = 0x00000200
	SV_TYPE_SERVER                                                                 = 0x00000002
	SV_TYPE_SERVER_MFPN                                                            = 0x00004000
	SV_TYPE_SERVER_NT                                                              = 0x00008000
	SV_TYPE_SERVER_OSF                                                             = 0x00100000
	SV_TYPE_SERVER_UNIX                                                            = 2048
	SV_TYPE_SERVER_VMS                                                             = 0x00200000
	SV_TYPE_SQLSERVER                                                              = 0x00000004
	SV_TYPE_TERMINALSERVER                                                         = 0x02000000
	SV_TYPE_TIME_SOURCE                                                            = 0x00000020
	SV_TYPE_WFW                                                                    = 0x00002000
	SV_TYPE_WINDOWS                                                                = 0x00400000
	SV_TYPE_WORKSTATION                                                            = 0x00000001
	SV_TYPE_XENIX_SERVER                                                           = 0x00000800
	SV_ULIST_MTIME_PARMNUM                                                         = 401
	SV_USERPATH_PARMNUM                                                            = 112
	SV_USERSECURITY                                                                = 1
	SV_USERS_INFOLEVEL                                                             = 1107
	SV_USERS_PARMNUM                                                               = 107
	SV_USERS_PER_LICENSE                                                           = 5
	SV_VERSION_MAJOR_PARMNUM                                                       = 103
	SV_VERSION_MINOR_PARMNUM                                                       = 104
	SV_VISIBLE                                                                     = 0
	SV_XACTMEMSIZE_PARMNUM                                                         = 531
	SW_AUTOPROF_LOAD_MASK                                                          = 0x1
	SW_AUTOPROF_SAVE_MASK                                                          = 0x2
	SYMMETRICWRAPKEYBLOB                                                           = 0xb
	TAPE_RESET_STATISTICS                                                          = 2
	TAPE_RETURN_ENV_INFO                                                           = 1
	TAPE_RETURN_STATISTICS                                                         = 0
	TARGET_IS_NT351_OR_WIN95_OR_LATER                                              = 1
	TARGET_IS_NT40_OR_LATER                                                        = 1
	TARGET_IS_NT50_OR_LATER                                                        = 1
	TARGET_IS_NT51_OR_LATER                                                        = 1
	TARGET_IS_NT60_OR_LATER                                                        = 0
	TARGET_IS_NT61_OR_LATER                                                        = 0
	TBBF_LARGE                                                                     = 0x1
	TBCDRF_BLENDICON                                                               = 0x200000
	TBCDRF_HILITEHOTTRACK                                                          = 0x20000
	TBCDRF_NOBACKGROUND                                                            = 0x400000
	TBCDRF_NOEDGES                                                                 = 0x10000
	TBCDRF_NOETCHEDEFFECT                                                          = 0x100000
	TBCDRF_NOMARK                                                                  = 0x80000
	TBCDRF_NOOFFSET                                                                = 0x40000
	TBCD_CHANNEL                                                                   = 0x3
	TBCD_THUMB                                                                     = 0x2
	TBCD_TICS                                                                      = 0x1
	TBDDRET_DEFAULT                                                                = 0
	TBDDRET_NODEFAULT                                                              = 1
	TBDDRET_TREATPRESSED                                                           = 2
	TBIF_APPEND                                                                    = 0
	TBIF_BYINDEX                                                                   = 0x80000000
	TBIF_COMMAND                                                                   = 0x20
	TBIF_DEFAULT                                                                   = 0x00000000
	TBIF_IMAGE                                                                     = 0x1
	TBIF_INTERNETBAR                                                               = 0x00010000
	TBIF_LPARAM                                                                    = 0x10
	TBIF_NOTOOLBAR                                                                 = 0x00030000
	TBIF_PREPEND                                                                   = 1
	TBIF_REPLACE                                                                   = 2
	TBIF_SIZE                                                                      = 0x40
	TBIF_STANDARDTOOLBAR                                                           = 0x00020000
	TBIF_STATE                                                                     = 0x4
	TBIF_STYLE                                                                     = 0x8
	TBIF_TEXT                                                                      = 0x2
	TBIMHT_AFTER                                                                   = 0x1
	TBIMHT_BACKGROUND                                                              = 0x2
	TBMF_BARPAD                                                                    = 0x2
	TBMF_BUTTONSPACING                                                             = 0x4
	TBMF_PAD                                                                       = 0x1
	TBM_CLEARSEL                                                                   = 1043
	TBM_CLEARTICS                                                                  = 1033
	TBM_GETBUDDY                                                                   = 1057
	TBM_GETCHANNELRECT                                                             = 1050
	TBM_GETLINESIZE                                                                = 1048
	TBM_GETNUMTICS                                                                 = 1040
	TBM_GETPAGESIZE                                                                = 1046
	TBM_GETPOS                                                                     = 1024
	TBM_GETPTICS                                                                   = 1038
	TBM_GETRANGEMAX                                                                = 1026
	TBM_GETRANGEMIN                                                                = 1025
	TBM_GETSELEND                                                                  = 1042
	TBM_GETSELSTART                                                                = 1041
	TBM_GETTHUMBLENGTH                                                             = 1052
	TBM_GETTHUMBRECT                                                               = 1049
	TBM_GETTIC                                                                     = 1027
	TBM_GETTICPOS                                                                  = 1039
	TBM_GETTOOLTIPS                                                                = 1054
	TBM_GETUNICODEFORMAT                                                           = 8198
	TBM_SETBUDDY                                                                   = 1056
	TBM_SETLINESIZE                                                                = 1047
	TBM_SETPAGESIZE                                                                = 1045
	TBM_SETPOS                                                                     = 1029
	TBM_SETRANGE                                                                   = 1030
	TBM_SETRANGEMAX                                                                = 1032
	TBM_SETRANGEMIN                                                                = 1031
	TBM_SETSEL                                                                     = 1034
	TBM_SETSELEND                                                                  = 1036
	TBM_SETSELSTART                                                                = 1035
	TBM_SETTHUMBLENGTH                                                             = 1051
	TBM_SETTIC                                                                     = 1028
	TBM_SETTICFREQ                                                                 = 1044
	TBM_SETTIPSIDE                                                                 = 1055
	TBM_SETTOOLTIPS                                                                = 1053
	TBM_SETUNICODEFORMAT                                                           = 8197
	TBNF_DI_SETITEM                                                                = 0x10000000
	TBNF_IMAGE                                                                     = 0x1
	TBNF_TEXT                                                                      = 0x2
	TBNRF_ENDCUSTOMIZE                                                             = 0x2
	TBNRF_HIDEHELP                                                                 = 0x1
	TBN_BEGINADJUST                                                                = 18446744073709550913
	TBN_BEGINDRAG                                                                  = 18446744073709550915
	TBN_CUSTHELP                                                                   = 18446744073709550907
	TBN_DELETINGBUTTON                                                             = 18446744073709550901
	TBN_DRAGOUT                                                                    = 18446744073709550902
	TBN_DRAGOVER                                                                   = 18446744073709550889
	TBN_DROPDOWN                                                                   = 18446744073709550906
	TBN_DUPACCELERATOR                                                             = 18446744073709550891
	TBN_ENDADJUST                                                                  = 18446744073709550912
	TBN_ENDDRAG                                                                    = 18446744073709550914
	TBN_FIRST                                                                      = 18446744073709550916
	TBN_GETBUTTONINFO                                                              = 18446744073709550916
	TBN_GETBUTTONINFOA                                                             = 18446744073709550916
	TBN_GETBUTTONINFOW                                                             = 18446744073709550896
	TBN_GETDISPINFO                                                                = 18446744073709550900
	TBN_GETDISPINFOA                                                               = 18446744073709550900
	TBN_GETDISPINFOW                                                               = 18446744073709550899
	TBN_GETINFOTIP                                                                 = 18446744073709550898
	TBN_GETINFOTIPA                                                                = 18446744073709550898
	TBN_GETINFOTIPW                                                                = 18446744073709550897
	TBN_GETOBJECT                                                                  = 18446744073709550904
	TBN_HOTITEMCHANGE                                                              = 18446744073709550903
	TBN_INITCUSTOMIZE                                                              = 18446744073709550893
	TBN_LAST                                                                       = 18446744073709550896
	TBN_MAPACCELERATOR                                                             = 18446744073709550888
	TBN_QUERYDELETE                                                                = 18446744073709550909
	TBN_QUERYINSERT                                                                = 18446744073709550910
	TBN_RESET                                                                      = 18446744073709550911
	TBN_RESTORE                                                                    = 18446744073709550895
	TBN_SAVE                                                                       = 18446744073709550894
	TBN_TOOLBARCHANGE                                                              = 18446744073709550908
	TBN_WRAPACCELERATOR                                                            = 18446744073709550890
	TBN_WRAPHOTITEM                                                                = 18446744073709550892
	TBSTATE_CHECKED                                                                = 0x1
	TBSTATE_ELLIPSES                                                               = 0x40
	TBSTATE_ENABLED                                                                = 0x4
	TBSTATE_HIDDEN                                                                 = 0x8
	TBSTATE_INDETERMINATE                                                          = 0x10
	TBSTATE_MARKED                                                                 = 0x80
	TBSTATE_PRESSED                                                                = 0x2
	TBSTATE_WRAP                                                                   = 0x20
	TBSTYLE_ALTDRAG                                                                = 0x400
	TBSTYLE_AUTOSIZE                                                               = 0x10
	TBSTYLE_BUTTON                                                                 = 0x0
	TBSTYLE_CHECK                                                                  = 0x2
	TBSTYLE_CHECKGROUP                                                             = 6
	TBSTYLE_CUSTOMERASE                                                            = 0x2000
	TBSTYLE_DROPDOWN                                                               = 0x8
	TBSTYLE_EX_DOUBLEBUFFER                                                        = 0x80
	TBSTYLE_EX_DRAWDDARROWS                                                        = 0x1
	TBSTYLE_EX_HIDECLIPPEDBUTTONS                                                  = 0x10
	TBSTYLE_EX_MIXEDBUTTONS                                                        = 0x8
	TBSTYLE_EX_MULTICOLUMN                                                         = 0x2
	TBSTYLE_EX_VERTICAL                                                            = 0x4
	TBSTYLE_FLAT                                                                   = 0x800
	TBSTYLE_GROUP                                                                  = 0x4
	TBSTYLE_LIST                                                                   = 0x1000
	TBSTYLE_NOPREFIX                                                               = 0x20
	TBSTYLE_REGISTERDROP                                                           = 0x4000
	TBSTYLE_SEP                                                                    = 0x1
	TBSTYLE_TOOLTIPS                                                               = 0x100
	TBSTYLE_TRANSPARENT                                                            = 0x8000
	TBSTYLE_WRAPABLE                                                               = 0x200
	TBS_AUTOTICKS                                                                  = 0x1
	TBS_BOTH                                                                       = 0x8
	TBS_BOTTOM                                                                     = 0x0
	TBS_DOWNISLEFT                                                                 = 0x400
	TBS_ENABLESELRANGE                                                             = 0x20
	TBS_FIXEDLENGTH                                                                = 0x40
	TBS_HORZ                                                                       = 0x0
	TBS_LEFT                                                                       = 0x4
	TBS_NOTHUMB                                                                    = 0x80
	TBS_NOTICKS                                                                    = 0x10
	TBS_NOTIFYBEFOREMOVE                                                           = 0x800
	TBS_REVERSED                                                                   = 0x200
	TBS_RIGHT                                                                      = 0x0
	TBS_TOOLTIPS                                                                   = 0x100
	TBS_TOP                                                                        = 0x4
	TBS_VERT                                                                       = 0x2
	TBTS_BOTTOM                                                                    = 2
	TBTS_LEFT                                                                      = 1
	TBTS_RIGHT                                                                     = 3
	TBTS_TOP                                                                       = 0
	TB_ADDBITMAP                                                                   = 1043
	TB_ADDBUTTONS                                                                  = 1044
	TB_ADDBUTTONSA                                                                 = 1044
	TB_ADDBUTTONSW                                                                 = 1092
	TB_ADDSTRING                                                                   = 1052
	TB_ADDSTRINGA                                                                  = 1052
	TB_ADDSTRINGW                                                                  = 1101
	TB_AUTOSIZE                                                                    = 1057
	TB_BOTTOM                                                                      = 7
	TB_BUTTONCOUNT                                                                 = 1048
	TB_BUTTONSTRUCTSIZE                                                            = 1054
	TB_CHANGEBITMAP                                                                = 1067
	TB_CHECKBUTTON                                                                 = 1026
	TB_COMMANDTOINDEX                                                              = 1049
	TB_CUSTOMIZE                                                                   = 1051
	TB_DELETEBUTTON                                                                = 1046
	TB_ENABLEBUTTON                                                                = 1025
	TB_ENDTRACK                                                                    = 8
	TB_GETANCHORHIGHLIGHT                                                          = 1098
	TB_GETBITMAP                                                                   = 1068
	TB_GETBITMAPFLAGS                                                              = 1065
	TB_GETBUTTON                                                                   = 1047
	TB_GETBUTTONINFO                                                               = 1089
	TB_GETBUTTONINFOA                                                              = 1089
	TB_GETBUTTONINFOW                                                              = 1087
	TB_GETBUTTONSIZE                                                               = 1082
	TB_GETBUTTONTEXT                                                               = 1069
	TB_GETBUTTONTEXTA                                                              = 1069
	TB_GETBUTTONTEXTW                                                              = 1099
	TB_GETCOLORSCHEME                                                              = 8195
	TB_GETDISABLEDIMAGELIST                                                        = 1079
	TB_GETEXTENDEDSTYLE                                                            = 1109
	TB_GETHOTIMAGELIST                                                             = 1077
	TB_GETHOTITEM                                                                  = 1095
	TB_GETIDEALSIZE                                                                = 1123
	TB_GETIMAGELIST                                                                = 1073
	TB_GETIMAGELISTCOUNT                                                           = 1122
	TB_GETINSERTMARK                                                               = 1103
	TB_GETINSERTMARKCOLOR                                                          = 1113
	TB_GETITEMDROPDOWNRECT                                                         = 1127
	TB_GETITEMRECT                                                                 = 1053
	TB_GETMAXSIZE                                                                  = 1107
	TB_GETMETRICS                                                                  = 1125
	TB_GETOBJECT                                                                   = 1086
	TB_GETPADDING                                                                  = 1110
	TB_GETPRESSEDIMAGELIST                                                         = 1129
	TB_GETRECT                                                                     = 1075
	TB_GETROWS                                                                     = 1064
	TB_GETSTATE                                                                    = 1042
	TB_GETSTRING                                                                   = 1116
	TB_GETSTRINGA                                                                  = 1116
	TB_GETSTRINGW                                                                  = 1115
	TB_GETSTYLE                                                                    = 1081
	TB_GETTEXTROWS                                                                 = 1085
	TB_GETTOOLTIPS                                                                 = 1059
	TB_GETUNICODEFORMAT                                                            = 8198
	TB_HASACCELERATOR                                                              = 1119
	TB_HIDEBUTTON                                                                  = 1028
	TB_HITTEST                                                                     = 1093
	TB_INDETERMINATE                                                               = 1029
	TB_INSERTBUTTON                                                                = 1045
	TB_INSERTBUTTONA                                                               = 1045
	TB_INSERTBUTTONW                                                               = 1091
	TB_INSERTMARKHITTEST                                                           = 1105
	TB_ISBUTTONCHECKED                                                             = 1034
	TB_ISBUTTONENABLED                                                             = 1033
	TB_ISBUTTONHIDDEN                                                              = 1036
	TB_ISBUTTONHIGHLIGHTED                                                         = 1038
	TB_ISBUTTONINDETERMINATE                                                       = 1037
	TB_ISBUTTONPRESSED                                                             = 1035
	TB_LINEDOWN                                                                    = 1
	TB_LINEUP                                                                      = 0
	TB_LOADIMAGES                                                                  = 1074
	TB_MAPACCELERATOR                                                              = 1102
	TB_MAPACCELERATORA                                                             = 1102
	TB_MAPACCELERATORW                                                             = 1114
	TB_MARKBUTTON                                                                  = 1030
	TB_MOVEBUTTON                                                                  = 1106
	TB_PAGEDOWN                                                                    = 3
	TB_PAGEUP                                                                      = 2
	TB_PRESSBUTTON                                                                 = 1027
	TB_REPLACEBITMAP                                                               = 1070
	TB_SAVERESTORE                                                                 = 1050
	TB_SAVERESTOREA                                                                = 1050
	TB_SAVERESTOREW                                                                = 1100
	TB_SETANCHORHIGHLIGHT                                                          = 1097
	TB_SETBITMAPSIZE                                                               = 1056
	TB_SETBOUNDINGSIZE                                                             = 1117
	TB_SETBUTTONINFO                                                               = 1090
	TB_SETBUTTONINFOA                                                              = 1090
	TB_SETBUTTONINFOW                                                              = 1088
	TB_SETBUTTONSIZE                                                               = 1055
	TB_SETBUTTONWIDTH                                                              = 1083
	TB_SETCMDID                                                                    = 1066
	TB_SETCOLORSCHEME                                                              = 8194
	TB_SETDISABLEDIMAGELIST                                                        = 1078
	TB_SETDRAWTEXTFLAGS                                                            = 1094
	TB_SETEXTENDEDSTYLE                                                            = 1108
	TB_SETHOTIMAGELIST                                                             = 1076
	TB_SETHOTITEM                                                                  = 1096
	TB_SETHOTITEM2                                                                 = 1118
	TB_SETIMAGELIST                                                                = 1072
	TB_SETINDENT                                                                   = 1071
	TB_SETINSERTMARK                                                               = 1104
	TB_SETINSERTMARKCOLOR                                                          = 1112
	TB_SETLISTGAP                                                                  = 1120
	TB_SETMAXTEXTROWS                                                              = 1084
	TB_SETMETRICS                                                                  = 1126
	TB_SETPADDING                                                                  = 1111
	TB_SETPARENT                                                                   = 1061
	TB_SETPRESSEDIMAGELIST                                                         = 1128
	TB_SETROWS                                                                     = 1063
	TB_SETSTATE                                                                    = 1041
	TB_SETSTYLE                                                                    = 1080
	TB_SETTOOLTIPS                                                                 = 1060
	TB_SETUNICODEFORMAT                                                            = 8197
	TB_SETWINDOWTHEME                                                              = 8203
	TB_THUMBPOSITION                                                               = 4
	TB_THUMBTRACK                                                                  = 5
	TB_TOP                                                                         = 6
	TCHT_NOWHERE                                                                   = 0x1
	TCHT_ONITEM                                                                    = 6
	TCHT_ONITEMICON                                                                = 0x2
	TCHT_ONITEMLABEL                                                               = 0x4
	TCIF_IMAGE                                                                     = 0x2
	TCIF_PARAM                                                                     = 0x8
	TCIF_RTLREADING                                                                = 0x4
	TCIF_STATE                                                                     = 0x10
	TCIF_TEXT                                                                      = 0x1
	TCIS_BUTTONPRESSED                                                             = 0x1
	TCIS_HIGHLIGHTED                                                               = 0x2
	TCL_MAX_WARN_LEN                                                               = 1024
	TCM_ADJUSTRECT                                                                 = 4904
	TCM_DELETEALLITEMS                                                             = 4873
	TCM_DELETEITEM                                                                 = 4872
	TCM_DESELECTALL                                                                = 4914
	TCM_FIRST                                                                      = 0x1300
	TCM_GETCURFOCUS                                                                = 4911
	TCM_GETCURSEL                                                                  = 4875
	TCM_GETEXTENDEDSTYLE                                                           = 4917
	TCM_GETIMAGELIST                                                               = 4866
	TCM_GETITEM                                                                    = 4869
	TCM_GETITEMA                                                                   = 4869
	TCM_GETITEMCOUNT                                                               = 4868
	TCM_GETITEMRECT                                                                = 4874
	TCM_GETITEMW                                                                   = 4924
	TCM_GETROWCOUNT                                                                = 4908
	TCM_GETTOOLTIPS                                                                = 4909
	TCM_GETUNICODEFORMAT                                                           = 8198
	TCM_HIGHLIGHTITEM                                                              = 4915
	TCM_HITTEST                                                                    = 4877
	TCM_INSERTITEM                                                                 = 4871
	TCM_INSERTITEMA                                                                = 4871
	TCM_INSERTITEMW                                                                = 4926
	TCM_REMOVEIMAGE                                                                = 4906
	TCM_SETCURFOCUS                                                                = 4912
	TCM_SETCURSEL                                                                  = 4876
	TCM_SETEXTENDEDSTYLE                                                           = 4916
	TCM_SETIMAGELIST                                                               = 4867
	TCM_SETITEM                                                                    = 4870
	TCM_SETITEMA                                                                   = 4870
	TCM_SETITEMEXTRA                                                               = 4878
	TCM_SETITEMSIZE                                                                = 4905
	TCM_SETITEMW                                                                   = 4925
	TCM_SETMINTABWIDTH                                                             = 4913
	TCM_SETPADDING                                                                 = 4907
	TCM_SETTOOLTIPS                                                                = 4910
	TCM_SETUNICODEFORMAT                                                           = 8197
	TCN_FIRST                                                                      = 18446744073709551066
	TCN_FOCUSCHANGE                                                                = 18446744073709551062
	TCN_GETOBJECT                                                                  = 18446744073709551063
	TCN_KEYDOWN                                                                    = 18446744073709551066
	TCN_LAST                                                                       = 18446744073709551036
	TCN_SELCHANGE                                                                  = 18446744073709551065
	TCN_SELCHANGING                                                                = 18446744073709551064
	TCS_BOTTOM                                                                     = 0x2
	TCS_BUTTONS                                                                    = 0x100
	TCS_EX_FLATSEPARATORS                                                          = 0x1
	TCS_EX_REGISTERDROP                                                            = 0x2
	TCS_FIXEDWIDTH                                                                 = 0x400
	TCS_FLATBUTTONS                                                                = 0x8
	TCS_FOCUSNEVER                                                                 = 0x8000
	TCS_FOCUSONBUTTONDOWN                                                          = 0x1000
	TCS_FORCEICONLEFT                                                              = 0x10
	TCS_FORCELABELLEFT                                                             = 0x20
	TCS_HOTTRACK                                                                   = 0x40
	TCS_MULTILINE                                                                  = 0x200
	TCS_MULTISELECT                                                                = 0x4
	TCS_OWNERDRAWFIXED                                                             = 0x2000
	TCS_RAGGEDRIGHT                                                                = 0x800
	TCS_RIGHT                                                                      = 0x2
	TCS_RIGHTJUSTIFY                                                               = 0x0
	TCS_SCROLLOPPOSITE                                                             = 0x1
	TCS_SINGLELINE                                                                 = 0x0
	TCS_TABS                                                                       = 0x0
	TCS_TOOLTIPS                                                                   = 0x4000
	TCS_VERTICAL                                                                   = 0x80
	THBN_CLICKED                                                                   = 0x1800
	TIFLAGS_EXTENDDISPATCHONLY                                                     = 0x1
	TIME_VALID_OID_FLUSH_OBJECT_FUNC                                               = "TimeValidDllFlushObject"
	TIME_VALID_OID_GET_OBJECT_FUNC                                                 = "TimeValidDllGetObject"
	TOOLBARCLASSNAMEA                                                              = "ToolbarWindow32"
	TOOLTIPS_CLASSA                                                                = "tooltips_class32"
	TRACKBAR_CLASSA                                                                = "msctls_trackbar32"
	TRANSPORT_NAME_PARMNUM                                                         = 202
	TRANSPORT_QUALITYOFSERVICE_PARMNUM                                             = 201
	TRANSPORT_TYPE_CN                                                              = 0x01
	TRANSPORT_TYPE_DG                                                              = 0x02
	TRANSPORT_TYPE_LPC                                                             = 0x04
	TRANSPORT_TYPE_WMSG                                                            = 0x08
	TRUSTEE_ACCESS_ALL                                                             = 4294967295
	TRUSTEE_ACCESS_ALLOWED                                                         = 1
	TRUSTEE_ACCESS_EXPLICIT                                                        = 1
	TRUSTEE_ACCESS_READ                                                            = 2
	TRUSTEE_ACCESS_READ_WRITE                                                      = 6
	TRUSTEE_ACCESS_WRITE                                                           = 4
	TTDT_AUTOMATIC                                                                 = 0
	TTDT_AUTOPOP                                                                   = 2
	TTDT_INITIAL                                                                   = 3
	TTDT_RESHOW                                                                    = 1
	TTF_ABSOLUTE                                                                   = 0x80
	TTF_CENTERTIP                                                                  = 0x2
	TTF_DI_SETITEM                                                                 = 0x8000
	TTF_IDISHWND                                                                   = 0x1
	TTF_PARSELINKS                                                                 = 0x1000
	TTF_RTLREADING                                                                 = 0x4
	TTF_SUBCLASS                                                                   = 0x10
	TTF_TRACK                                                                      = 0x20
	TTF_TRANSPARENT                                                                = 0x100
	TTI_ERROR                                                                      = 3
	TTI_INFO                                                                       = 1
	TTI_NONE                                                                       = 0
	TTI_WARNING                                                                    = 2
	TTM_ACTIVATE                                                                   = 1025
	TTM_ADDTOOL                                                                    = 1028
	TTM_ADDTOOLA                                                                   = 1028
	TTM_ADDTOOLW                                                                   = 1074
	TTM_ADJUSTRECT                                                                 = 1055
	TTM_DELTOOL                                                                    = 1029
	TTM_DELTOOLA                                                                   = 1029
	TTM_DELTOOLW                                                                   = 1075
	TTM_ENUMTOOLS                                                                  = 1038
	TTM_ENUMTOOLSA                                                                 = 1038
	TTM_ENUMTOOLSW                                                                 = 1082
	TTM_GETBUBBLESIZE                                                              = 1054
	TTM_GETCURRENTTOOL                                                             = 1039
	TTM_GETCURRENTTOOLA                                                            = 1039
	TTM_GETCURRENTTOOLW                                                            = 1083
	TTM_GETDELAYTIME                                                               = 1045
	TTM_GETMARGIN                                                                  = 1051
	TTM_GETMAXTIPWIDTH                                                             = 1049
	TTM_GETTEXT                                                                    = 1035
	TTM_GETTEXTA                                                                   = 1035
	TTM_GETTEXTW                                                                   = 1080
	TTM_GETTIPBKCOLOR                                                              = 1046
	TTM_GETTIPTEXTCOLOR                                                            = 1047
	TTM_GETTITLE                                                                   = 1059
	TTM_GETTOOLCOUNT                                                               = 1037
	TTM_GETTOOLINFO                                                                = 1032
	TTM_GETTOOLINFOA                                                               = 1032
	TTM_GETTOOLINFOW                                                               = 1077
	TTM_HITTEST                                                                    = 1034
	TTM_HITTESTA                                                                   = 1034
	TTM_HITTESTW                                                                   = 1079
	TTM_NEWTOOLRECT                                                                = 1030
	TTM_NEWTOOLRECTA                                                               = 1030
	TTM_NEWTOOLRECTW                                                               = 1076
	TTM_POP                                                                        = 1052
	TTM_POPUP                                                                      = 1058
	TTM_RELAYEVENT                                                                 = 1031
	TTM_SETDELAYTIME                                                               = 1027
	TTM_SETMARGIN                                                                  = 1050
	TTM_SETMAXTIPWIDTH                                                             = 1048
	TTM_SETTIPBKCOLOR                                                              = 1043
	TTM_SETTIPTEXTCOLOR                                                            = 1044
	TTM_SETTITLE                                                                   = 1056
	TTM_SETTITLEA                                                                  = 1056
	TTM_SETTITLEW                                                                  = 1057
	TTM_SETTOOLINFO                                                                = 1033
	TTM_SETTOOLINFOA                                                               = 1033
	TTM_SETTOOLINFOW                                                               = 1078
	TTM_SETWINDOWTHEME                                                             = 8203
	TTM_TRACKACTIVATE                                                              = 1041
	TTM_TRACKPOSITION                                                              = 1042
	TTM_UPDATE                                                                     = 1053
	TTM_UPDATETIPTEXT                                                              = 1036
	TTM_UPDATETIPTEXTA                                                             = 1036
	TTM_UPDATETIPTEXTW                                                             = 1081
	TTM_WINDOWFROMPOINT                                                            = 1040
	TTN_FIRST                                                                      = 18446744073709551096
	TTN_GETDISPINFO                                                                = 18446744073709551096
	TTN_GETDISPINFOA                                                               = 18446744073709551096
	TTN_GETDISPINFOW                                                               = 18446744073709551086
	TTN_LAST                                                                       = 18446744073709551067
	TTN_LINKCLICK                                                                  = 18446744073709551093
	TTN_NEEDTEXT                                                                   = 18446744073709551096
	TTN_NEEDTEXTA                                                                  = 18446744073709551096
	TTN_NEEDTEXTW                                                                  = 18446744073709551086
	TTN_POP                                                                        = 18446744073709551094
	TTN_SHOW                                                                       = 18446744073709551095
	TTS_ALWAYSTIP                                                                  = 0x1
	TTS_BALLOON                                                                    = 0x40
	TTS_CLOSE                                                                      = 0x80
	TTS_NOANIMATE                                                                  = 0x10
	TTS_NOFADE                                                                     = 0x20
	TTS_NOPREFIX                                                                   = 0x2
	TVCDRF_NOIMAGES                                                                = 0x10000
	TVC_BYKEYBOARD                                                                 = 0x2
	TVC_BYMOUSE                                                                    = 0x1
	TVC_UNKNOWN                                                                    = 0x0
	TVE_COLLAPSE                                                                   = 0x1
	TVE_COLLAPSERESET                                                              = 0x8000
	TVE_EXPAND                                                                     = 0x2
	TVE_EXPANDPARTIAL                                                              = 0x4000
	TVE_TOGGLE                                                                     = 0x3
	TVGN_CARET                                                                     = 0x9
	TVGN_CHILD                                                                     = 0x4
	TVGN_DROPHILITE                                                                = 0x8
	TVGN_FIRSTVISIBLE                                                              = 0x5
	TVGN_LASTVISIBLE                                                               = 0xa
	TVGN_NEXT                                                                      = 0x1
	TVGN_NEXTSELECTED                                                              = 0xb
	TVGN_NEXTVISIBLE                                                               = 0x6
	TVGN_PARENT                                                                    = 0x3
	TVGN_PREVIOUS                                                                  = 0x2
	TVGN_PREVIOUSVISIBLE                                                           = 0x7
	TVGN_ROOT                                                                      = 0x0
	TVHT_ABOVE                                                                     = 0x100
	TVHT_BELOW                                                                     = 0x200
	TVHT_NOWHERE                                                                   = 0x1
	TVHT_ONITEM                                                                    = 70
	TVHT_ONITEMBUTTON                                                              = 0x10
	TVHT_ONITEMICON                                                                = 0x2
	TVHT_ONITEMINDENT                                                              = 0x8
	TVHT_ONITEMLABEL                                                               = 0x4
	TVHT_ONITEMRIGHT                                                               = 0x20
	TVHT_ONITEMSTATEICON                                                           = 0x40
	TVHT_TOLEFT                                                                    = 0x800
	TVHT_TORIGHT                                                                   = 0x400
	TVIF_CHILDREN                                                                  = 0x40
	TVIF_DI_SETITEM                                                                = 0x1000
	TVIF_EXPANDEDIMAGE                                                             = 0x200
	TVIF_HANDLE                                                                    = 0x10
	TVIF_IMAGE                                                                     = 0x2
	TVIF_INTEGRAL                                                                  = 0x80
	TVIF_PARAM                                                                     = 0x4
	TVIF_SELECTEDIMAGE                                                             = 0x20
	TVIF_STATE                                                                     = 0x8
	TVIF_STATEEX                                                                   = 0x100
	TVIF_TEXT                                                                      = 0x1
	TVIS_BOLD                                                                      = 0x10
	TVIS_CUT                                                                       = 0x4
	TVIS_DROPHILITED                                                               = 0x8
	TVIS_EXPANDED                                                                  = 0x20
	TVIS_EXPANDEDONCE                                                              = 0x40
	TVIS_EXPANDPARTIAL                                                             = 0x80
	TVIS_EX_ALL                                                                    = 0x0002
	TVIS_EX_FLAT                                                                   = 0x1
	TVIS_OVERLAYMASK                                                               = 0xf00
	TVIS_SELECTED                                                                  = 0x2
	TVIS_STATEIMAGEMASK                                                            = 0xF000
	TVIS_USERMASK                                                                  = 0xF000
	TVM_CREATEDRAGIMAGE                                                            = 4370
	TVM_DELETEITEM                                                                 = 4353
	TVM_EDITLABEL                                                                  = 4366
	TVM_EDITLABELA                                                                 = 4366
	TVM_EDITLABELW                                                                 = 4417
	TVM_ENDEDITLABELNOW                                                            = 4374
	TVM_ENSUREVISIBLE                                                              = 4372
	TVM_EXPAND                                                                     = 4354
	TVM_GETBKCOLOR                                                                 = 4383
	TVM_GETCOUNT                                                                   = 4357
	TVM_GETEDITCONTROL                                                             = 4367
	TVM_GETEXTENDEDSTYLE                                                           = 4397
	TVM_GETIMAGELIST                                                               = 4360
	TVM_GETINDENT                                                                  = 4358
	TVM_GETINSERTMARKCOLOR                                                         = 4390
	TVM_GETISEARCHSTRING                                                           = 4375
	TVM_GETISEARCHSTRINGA                                                          = 4375
	TVM_GETISEARCHSTRINGW                                                          = 4416
	TVM_GETITEM                                                                    = 4364
	TVM_GETITEMA                                                                   = 4364
	TVM_GETITEMHEIGHT                                                              = 4380
	TVM_GETITEMRECT                                                                = 4356
	TVM_GETITEMSTATE                                                               = 4391
	TVM_GETITEMW                                                                   = 4414
	TVM_GETLINECOLOR                                                               = 4393
	TVM_GETNEXTITEM                                                                = 4362
	TVM_GETSCROLLTIME                                                              = 4386
	TVM_GETTEXTCOLOR                                                               = 4384
	TVM_GETTOOLTIPS                                                                = 4377
	TVM_GETUNICODEFORMAT                                                           = 8198
	TVM_GETVISIBLECOUNT                                                            = 4368
	TVM_HITTEST                                                                    = 4369
	TVM_INSERTITEM                                                                 = 4352
	TVM_INSERTITEMA                                                                = 4352
	TVM_INSERTITEMW                                                                = 4402
	TVM_MAPACCIDTOHTREEITEM                                                        = 4394
	TVM_MAPHTREEITEMTOACCID                                                        = 4395
	TVM_SELECTITEM                                                                 = 4363
	TVM_SETAUTOSCROLLINFO                                                          = 4411
	TVM_SETBKCOLOR                                                                 = 4381
	TVM_SETBORDER                                                                  = 4387
	TVM_SETEXTENDEDSTYLE                                                           = 4396
	TVM_SETHOT                                                                     = 4410
	TVM_SETIMAGELIST                                                               = 4361
	TVM_SETINDENT                                                                  = 4359
	TVM_SETINSERTMARK                                                              = 4378
	TVM_SETINSERTMARKCOLOR                                                         = 4389
	TVM_SETITEM                                                                    = 4365
	TVM_SETITEMA                                                                   = 4365
	TVM_SETITEMHEIGHT                                                              = 4379
	TVM_SETITEMW                                                                   = 4415
	TVM_SETLINECOLOR                                                               = 4392
	TVM_SETSCROLLTIME                                                              = 4385
	TVM_SETTEXTCOLOR                                                               = 4382
	TVM_SETTOOLTIPS                                                                = 4376
	TVM_SETUNICODEFORMAT                                                           = 8197
	TVM_SORTCHILDREN                                                               = 4371
	TVM_SORTCHILDRENCB                                                             = 4373
	TVNRET_DEFAULT                                                                 = 0
	TVNRET_SKIPNEW                                                                 = 2
	TVNRET_SKIPOLD                                                                 = 1
	TVN_ASYNCDRAW                                                                  = 18446744073709551196
	TVN_BEGINDRAG                                                                  = 18446744073709551209
	TVN_BEGINDRAGA                                                                 = 18446744073709551209
	TVN_BEGINDRAGW                                                                 = 18446744073709551160
	TVN_BEGINLABELEDIT                                                             = 18446744073709551206
	TVN_BEGINLABELEDITA                                                            = 18446744073709551206
	TVN_BEGINLABELEDITW                                                            = 18446744073709551157
	TVN_BEGINRDRAG                                                                 = 18446744073709551208
	TVN_BEGINRDRAGA                                                                = 18446744073709551208
	TVN_BEGINRDRAGW                                                                = 18446744073709551159
	TVN_DELETEITEM                                                                 = 18446744073709551207
	TVN_DELETEITEMA                                                                = 18446744073709551207
	TVN_DELETEITEMW                                                                = 18446744073709551158
	TVN_ENDLABELEDIT                                                               = 18446744073709551205
	TVN_ENDLABELEDITA                                                              = 18446744073709551205
	TVN_ENDLABELEDITW                                                              = 18446744073709551156
	TVN_FIRST                                                                      = 18446744073709551216
	TVN_GETDISPINFO                                                                = 18446744073709551213
	TVN_GETDISPINFOA                                                               = 18446744073709551213
	TVN_GETDISPINFOW                                                               = 18446744073709551164
	TVN_GETINFOTIP                                                                 = 18446744073709551203
	TVN_GETINFOTIPA                                                                = 18446744073709551203
	TVN_GETINFOTIPW                                                                = 18446744073709551202
	TVN_ITEMCHANGEDA                                                               = 18446744073709551198
	TVN_ITEMCHANGEDW                                                               = 18446744073709551197
	TVN_ITEMCHANGINGA                                                              = 18446744073709551200
	TVN_ITEMCHANGINGW                                                              = 18446744073709551199
	TVN_ITEMEXPANDED                                                               = 18446744073709551210
	TVN_ITEMEXPANDEDA                                                              = 18446744073709551210
	TVN_ITEMEXPANDEDW                                                              = 18446744073709551161
	TVN_ITEMEXPANDING                                                              = 18446744073709551211
	TVN_ITEMEXPANDINGA                                                             = 18446744073709551211
	TVN_ITEMEXPANDINGW                                                             = 18446744073709551162
	TVN_KEYDOWN                                                                    = 18446744073709551204
	TVN_LAST                                                                       = 18446744073709551117
	TVN_SELCHANGED                                                                 = 18446744073709551214
	TVN_SELCHANGEDA                                                                = 18446744073709551214
	TVN_SELCHANGEDW                                                                = 18446744073709551165
	TVN_SELCHANGING                                                                = 18446744073709551215
	TVN_SELCHANGINGA                                                               = 18446744073709551215
	TVN_SELCHANGINGW                                                               = 18446744073709551166
	TVN_SETDISPINFO                                                                = 18446744073709551212
	TVN_SETDISPINFOA                                                               = 18446744073709551212
	TVN_SETDISPINFOW                                                               = 18446744073709551163
	TVN_SINGLEEXPAND                                                               = 18446744073709551201
	TVSBF_XBORDER                                                                  = 0x1
	TVSBF_YBORDER                                                                  = 0x2
	TVSIL_NORMAL                                                                   = 0
	TVSIL_STATE                                                                    = 2
	TVSI_NOSINGLEEXPAND                                                            = 0x8000
	TVS_CHECKBOXES                                                                 = 0x100
	TVS_DISABLEDRAGDROP                                                            = 0x10
	TVS_EDITLABELS                                                                 = 0x8
	TVS_EX_NOSINGLECOLLAPSE                                                        = 0x1
	TVS_FULLROWSELECT                                                              = 0x1000
	TVS_HASBUTTONS                                                                 = 0x1
	TVS_HASLINES                                                                   = 0x2
	TVS_INFOTIP                                                                    = 0x800
	TVS_LINESATROOT                                                                = 0x4
	TVS_NOHSCROLL                                                                  = 0x8000
	TVS_NONEVENHEIGHT                                                              = 0x4000
	TVS_NOSCROLL                                                                   = 0x2000
	TVS_NOTOOLTIPS                                                                 = 0x80
	TVS_RTLREADING                                                                 = 0x40
	TVS_SHOWSELALWAYS                                                              = 0x20
	TVS_SINGLEEXPAND                                                               = 0x400
	TVS_TRACKSELECT                                                                = 0x200
	TV_FIRST                                                                       = 0x1100
	UAS_EXACTLEGACY                                                                = 0x1000
	UAS_ROLE_BACKUP                                                                = 2
	UAS_ROLE_MEMBER                                                                = 1
	UAS_ROLE_PRIMARY                                                               = 3
	UAS_ROLE_STANDALONE                                                            = 0
	UDM_GETACCEL                                                                   = 1132
	UDM_GETBASE                                                                    = 1134
	UDM_GETBUDDY                                                                   = 1130
	UDM_GETPOS                                                                     = 1128
	UDM_GETPOS32                                                                   = 1138
	UDM_GETRANGE                                                                   = 1126
	UDM_GETRANGE32                                                                 = 1136
	UDM_GETUNICODEFORMAT                                                           = 8198
	UDM_SETACCEL                                                                   = 1131
	UDM_SETBASE                                                                    = 1133
	UDM_SETBUDDY                                                                   = 1129
	UDM_SETPOS                                                                     = 1127
	UDM_SETPOS32                                                                   = 1137
	UDM_SETRANGE                                                                   = 1125
	UDM_SETRANGE32                                                                 = 1135
	UDM_SETUNICODEFORMAT                                                           = 8197
	UDN_DELTAPOS                                                                   = 18446744073709550894
	UDN_FIRST                                                                      = 18446744073709550895
	UDN_LAST                                                                       = 18446744073709550887
	UDS_ALIGNLEFT                                                                  = 0x8
	UDS_ALIGNRIGHT                                                                 = 0x4
	UDS_ARROWKEYS                                                                  = 0x20
	UDS_AUTOBUDDY                                                                  = 0x10
	UDS_HORZ                                                                       = 0x40
	UDS_HOTTRACK                                                                   = 0x100
	UDS_NOTHOUSANDS                                                                = 0x80
	UDS_SETBUDDYINT                                                                = 0x2
	UDS_WRAP                                                                       = 0x1
	UD_MAXVAL                                                                      = 0x7fff
	UD_MINVAL                                                                      = -32767
	UF_ACCOUNTDISABLE                                                              = 0x0002
	UF_ACCOUNT_TYPE_MASK                                                           = 15104
	UF_DONT_EXPIRE_PASSWD                                                          = 0x10000
	UF_DONT_REQUIRE_PREAUTH                                                        = 0x400000
	UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED                                             = 0x0080
	UF_HOMEDIR_REQUIRED                                                            = 0x0008
	UF_INTERDOMAIN_TRUST_ACCOUNT                                                   = 0x0800
	UF_LOCKOUT                                                                     = 0x0010
	UF_MACHINE_ACCOUNT_MASK                                                        = 14336
	UF_MNS_LOGON_ACCOUNT                                                           = 0x20000
	UF_NORMAL_ACCOUNT                                                              = 0x0200
	UF_NOT_DELEGATED                                                               = 0x100000
	UF_NO_AUTH_DATA_REQUIRED                                                       = 0x2000000
	UF_PASSWD_CANT_CHANGE                                                          = 0x0040
	UF_PASSWD_NOTREQD                                                              = 0x0020
	UF_PASSWORD_EXPIRED                                                            = 0x800000
	UF_SCRIPT                                                                      = 0x0001
	UF_SERVER_TRUST_ACCOUNT                                                        = 0x2000
	UF_SETTABLE_BITS                                                               = 67058683
	UF_SMARTCARD_REQUIRED                                                          = 0x40000
	UF_TEMP_DUPLICATE_ACCOUNT                                                      = 0x0100
	UF_TRUSTED_FOR_DELEGATION                                                      = 0x80000
	UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION                                      = 0x1000000
	UF_USE_DES_KEY_ONLY                                                            = 0x200000
	UF_WORKSTATION_TRUST_ACCOUNT                                                   = 0x1000
	UNCLEN                                                                         = 17
	UNDEFINE_ALTERNATE                                                             = 0xD
	UNDEFINE_PRIMARY                                                               = 0xC
	UNITS_PER_DAY                                                                  = 24
	UNITS_PER_WEEK                                                                 = 168
	UNLEN                                                                          = 256
	UNLOCK_ELEMENT                                                                 = 1
	UNRECOVERED_READS_VALID                                                        = 0x00000008
	UNRECOVERED_WRITES_VALID                                                       = 0x00000002
	UPDFCACHE_IFBLANK                                                              = 16
	UPDFCACHE_IFBLANKORONSAVECACHE                                                 = 18
	UPDFCACHE_NODATACACHE                                                          = 1
	UPDFCACHE_NORMALCACHE                                                          = 8
	UPDFCACHE_ONLYIFBLANK                                                          = 2147483648
	UPDFCACHE_ONSAVECACHE                                                          = 2
	UPDFCACHE_ONSTOPCACHE                                                          = 4
	UPDOWN_CLASSA                                                                  = "msctls_updown32"
	UPPER_GET_HINT_MASK                                                            = 0x0FF00000
	UPPER_HINT_MASK                                                                = 0x0000FF00
	URLACTION_ACTIVEX_CONFIRM_NOOBJECTSAFETY                                       = 0x1204
	URLACTION_ACTIVEX_CURR_MAX                                                     = 0x120B
	URLACTION_ACTIVEX_DYNSRC_VIDEO_AND_ANIMATION                                   = 0x120A
	URLACTION_ACTIVEX_MAX                                                          = 0x13ff
	URLACTION_ACTIVEX_MIN                                                          = 0x1200
	URLACTION_ACTIVEX_NO_WEBOC_SCRIPT                                              = 0x1206
	URLACTION_ACTIVEX_OVERRIDE_DATA_SAFETY                                         = 0x1202
	URLACTION_ACTIVEX_OVERRIDE_DOMAINLIST                                          = 0x120B
	URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY                                       = 0x1201
	URLACTION_ACTIVEX_OVERRIDE_OPTIN                                               = 0x1208
	URLACTION_ACTIVEX_OVERRIDE_REPURPOSEDETECTION                                  = 0x1207
	URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY                                       = 0x1203
	URLACTION_ACTIVEX_RUN                                                          = 0x1200
	URLACTION_ACTIVEX_SCRIPTLET_RUN                                                = 0x1209
	URLACTION_ACTIVEX_TREATASUNTRUSTED                                             = 0x1205
	URLACTION_ALLOW_ACTIVEX_FILTERING                                              = 0x2702
	URLACTION_ALLOW_AUDIO_VIDEO                                                    = 0x2701
	URLACTION_ALLOW_AUDIO_VIDEO_PLUGINS                                            = 0x2704
	URLACTION_ALLOW_CROSSDOMAIN_APPCACHE_MANIFEST                                  = 0x270A
	URLACTION_ALLOW_CROSSDOMAIN_DROP_ACROSS_WINDOWS                                = 0x2709
	URLACTION_ALLOW_CROSSDOMAIN_DROP_WITHIN_WINDOW                                 = 0x2708
	URLACTION_ALLOW_RENDER_LEGACY_DXTFILTERS                                       = 0x270B
	URLACTION_ALLOW_STRUCTURED_STORAGE_SNIFFING                                    = 0x2703
	URLACTION_ALLOW_XDOMAIN_SUBFRAME_RESIZE                                        = 0x1408
	URLACTION_ALLOW_ZONE_ELEVATION_OPT_OUT_ADDITION                                = 0x2706
	URLACTION_ALLOW_ZONE_ELEVATION_VIA_OPT_OUT                                     = 0x2705
	URLACTION_AUTHENTICATE_CLIENT                                                  = 0x1A01
	URLACTION_CHANNEL_SOFTDIST_MAX                                                 = 0x1Eff
	URLACTION_CHANNEL_SOFTDIST_MIN                                                 = 0x1E00
	URLACTION_CHANNEL_SOFTDIST_PERMISSIONS                                         = 0x1E05
	URLACTION_CLIENT_CERT_PROMPT                                                   = 0x1A04
	URLACTION_COOKIES                                                              = 0x1A02
	URLACTION_COOKIES_ENABLED                                                      = 0x1A10
	URLACTION_COOKIES_SESSION                                                      = 0x1A03
	URLACTION_COOKIES_SESSION_THIRD_PARTY                                          = 0x1A06
	URLACTION_COOKIES_THIRD_PARTY                                                  = 0x1A05
	URLACTION_CREDENTIALS_USE                                                      = 0x1A00
	URLACTION_CROSS_DOMAIN_DATA                                                    = 0x1406
	URLACTION_DOWNLOAD_CURR_MAX                                                    = 0x1004
	URLACTION_DOWNLOAD_MAX                                                         = 0x11FF
	URLACTION_DOWNLOAD_MIN                                                         = 0x1000
	URLACTION_DOWNLOAD_SIGNED_ACTIVEX                                              = 0x1001
	URLACTION_DOWNLOAD_UNSIGNED_ACTIVEX                                            = 0x1004
	URLACTION_HTML_ALLOW_CROSS_DOMAIN_CANVAS                                       = 0x160D
	URLACTION_HTML_ALLOW_CROSS_DOMAIN_TEXTTRACK                                    = 0x1610
	URLACTION_HTML_ALLOW_CROSS_DOMAIN_WEBWORKER                                    = 0x160F
	URLACTION_HTML_ALLOW_INDEXEDDB                                                 = 0x1611
	URLACTION_HTML_ALLOW_INJECTED_DYNAMIC_HTML                                     = 0x160B
	URLACTION_HTML_ALLOW_WINDOW_CLOSE                                              = 0x160E
	URLACTION_HTML_FONT_DOWNLOAD                                                   = 0x1604
	URLACTION_HTML_INCLUDE_FILE_PATH                                               = 0x160A
	URLACTION_HTML_JAVA_RUN                                                        = 0x1605
	URLACTION_HTML_MAX                                                             = 0x17ff
	URLACTION_HTML_META_REFRESH                                                    = 0x1608
	URLACTION_HTML_MIN                                                             = 0x1600
	URLACTION_HTML_MIXED_CONTENT                                                   = 0x1609
	URLACTION_HTML_REQUIRE_UTF8_DOCUMENT_CODEPAGE                                  = 0x160C
	URLACTION_HTML_SUBFRAME_NAVIGATE                                               = 0x1607
	URLACTION_HTML_SUBMIT_FORMS                                                    = 0x1601
	URLACTION_HTML_SUBMIT_FORMS_FROM                                               = 0x1602
	URLACTION_HTML_SUBMIT_FORMS_TO                                                 = 0x1603
	URLACTION_HTML_USERDATA_SAVE                                                   = 0x1606
	URLACTION_INFODELIVERY_CURR_MAX                                                = 0x1D06
	URLACTION_INFODELIVERY_MAX                                                     = 0x1Dff
	URLACTION_INFODELIVERY_MIN                                                     = 0x1D00
	URLACTION_INFODELIVERY_NO_ADDING_CHANNELS                                      = 0x1D00
	URLACTION_INFODELIVERY_NO_ADDING_SUBSCRIPTIONS                                 = 0x1D03
	URLACTION_INFODELIVERY_NO_CHANNEL_LOGGING                                      = 0x1D06
	URLACTION_INFODELIVERY_NO_EDITING_CHANNELS                                     = 0x1D01
	URLACTION_INFODELIVERY_NO_EDITING_SUBSCRIPTIONS                                = 0x1D04
	URLACTION_INFODELIVERY_NO_REMOVING_CHANNELS                                    = 0x1D02
	URLACTION_INFODELIVERY_NO_REMOVING_SUBSCRIPTIONS                               = 0x1D05
	URLACTION_JAVA_CURR_MAX                                                        = 0x1C00
	URLACTION_JAVA_MAX                                                             = 0x1Cff
	URLACTION_JAVA_MIN                                                             = 0x1C00
	URLACTION_JAVA_PERMISSIONS                                                     = 0x1C00
	URLACTION_MIN                                                                  = 0x1000
	URLACTION_NETWORK_CURR_MAX                                                     = 0x1A10
	URLACTION_NETWORK_MAX                                                          = 0x1Bff
	URLACTION_NETWORK_MIN                                                          = 0x1A00
	URLACTION_PLUGGABLE_PROTOCOL_XHR                                               = 0x140B
	URLACTION_SCRIPT_CURR_MAX                                                      = 0x140B
	URLACTION_SCRIPT_JAVA_USE                                                      = 0x1402
	URLACTION_SCRIPT_MAX                                                           = 0x15ff
	URLACTION_SCRIPT_MIN                                                           = 0x1400
	URLACTION_SCRIPT_NAVIGATE                                                      = 0x140A
	URLACTION_SCRIPT_OVERRIDE_SAFETY                                               = 0x1401
	URLACTION_SCRIPT_PASTE                                                         = 0x1407
	URLACTION_SCRIPT_RUN                                                           = 0x1400
	URLACTION_SCRIPT_SAFE_ACTIVEX                                                  = 0x1405
	URLACTION_SCRIPT_XSSFILTER                                                     = 0x1409
	URLACTION_SHELL_CURR_MAX                                                       = 0x1811
	URLACTION_SHELL_FILE_DOWNLOAD                                                  = 0x1803
	URLACTION_SHELL_INSTALL_DTITEMS                                                = 0x1800
	URLACTION_SHELL_MAX                                                            = 0x19ff
	URLACTION_SHELL_MIN                                                            = 0x1800
	URLACTION_SHELL_MOVE_OR_COPY                                                   = 0x1802
	URLACTION_SHELL_SHELLEXECUTE                                                   = 0x1806
	URLACTION_SHELL_VERB                                                           = 0x1804
	URLACTION_SHELL_WEBVIEW_VERB                                                   = 0x1805
	URLMON_OPTION_URL_ENCODING                                                     = 0x10000004
	URLMON_OPTION_USERAGENT                                                        = 0x10000001
	URLMON_OPTION_USERAGENT_REFRESH                                                = 0x10000002
	URLOSTRM_GETNEWESTVERSION                                                      = 0x3
	URLOSTRM_USECACHEDCOPY                                                         = 0x2
	URLOSTRM_USECACHEDCOPY_ONLY                                                    = 0x1
	URLPOLICY_ACTIVEX_CHECK_LIST                                                   = 0x10000
	URLPOLICY_ALLOW                                                                = 0x0
	URLPOLICY_AUTHENTICATE_CHALLENGE_RESPONSE                                      = 0x10000
	URLPOLICY_AUTHENTICATE_CLEARTEXT_OK                                            = 0x0
	URLPOLICY_AUTHENTICATE_MUTUAL_ONLY                                             = 0x30000
	URLPOLICY_CHANNEL_SOFTDIST_AUTOINSTALL                                         = 0x30000
	URLPOLICY_CHANNEL_SOFTDIST_PRECACHE                                            = 0x20000
	URLPOLICY_CHANNEL_SOFTDIST_PROHIBIT                                            = 0x10000
	URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY                                           = 0x30000
	URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT                                       = 0x20000
	URLPOLICY_CREDENTIALS_MUST_PROMPT_USER                                         = 0x10000
	URLPOLICY_CREDENTIALS_SILENT_LOGON_OK                                          = 0x0
	URLPOLICY_DISALLOW                                                             = 0x3
	URLPOLICY_DONTCHECKDLGBOX                                                      = 0x100
	URLPOLICY_JAVA_CUSTOM                                                          = 0x800000
	URLPOLICY_JAVA_HIGH                                                            = 0x10000
	URLPOLICY_JAVA_LOW                                                             = 0x30000
	URLPOLICY_JAVA_MEDIUM                                                          = 0x20000
	URLPOLICY_JAVA_PROHIBIT                                                        = 0x0
	URLPOLICY_LOG_ON_ALLOW                                                         = 0x40
	URLPOLICY_LOG_ON_DISALLOW                                                      = 0x80
	URLPOLICY_MASK_PERMISSIONS                                                     = 0x0f
	URLPOLICY_NOTIFY_ON_ALLOW                                                      = 0x10
	URLPOLICY_NOTIFY_ON_DISALLOW                                                   = 0x20
	URLPOLICY_QUERY                                                                = 0x1
	URLZONE_ESC_FLAG                                                               = 0x100
	URL_MK_LEGACY                                                                  = 0
	URL_MK_NO_CANONICALIZE                                                         = 2
	URL_MK_UNIFORM                                                                 = 1
	URL_OID_GET_OBJECT_URL_FUNC                                                    = "UrlDllGetObjectUrl"
	USAGE_MATCH_TYPE_AND                                                           = 0x0
	USAGE_MATCH_TYPE_OR                                                            = 0x1
	USER_ACCT_EXPIRES_INFOLEVEL                                                    = 1017
	USER_ACCT_EXPIRES_PARMNUM                                                      = 17
	USER_AUTH_FLAGS_INFOLEVEL                                                      = 1010
	USER_AUTH_FLAGS_PARMNUM                                                        = 10
	USER_CALL_IS_ASYNC                                                             = 0x0100
	USER_CALL_NEW_CORRELATION_DESC                                                 = 0x0200
	USER_CODE_PAGE_INFOLEVEL                                                       = 1025
	USER_CODE_PAGE_PARMNUM                                                         = 25
	USER_COMMENT_INFOLEVEL                                                         = 1007
	USER_COMMENT_PARMNUM                                                           = 7
	USER_COUNTRY_CODE_INFOLEVEL                                                    = 1024
	USER_COUNTRY_CODE_PARMNUM                                                      = 24
	USER_FLAGS_INFOLEVEL                                                           = 1008
	USER_FLAGS_PARMNUM                                                             = 8
	USER_FULL_NAME_INFOLEVEL                                                       = 1011
	USER_FULL_NAME_PARMNUM                                                         = 11
	USER_HOME_DIR_DRIVE_INFOLEVEL                                                  = 1053
	USER_HOME_DIR_DRIVE_PARMNUM                                                    = 53
	USER_HOME_DIR_INFOLEVEL                                                        = 1006
	USER_HOME_DIR_PARMNUM                                                          = 6
	USER_LAST_LOGOFF_INFOLEVEL                                                     = 1016
	USER_LAST_LOGOFF_PARMNUM                                                       = 16
	USER_LAST_LOGON_INFOLEVEL                                                      = 1015
	USER_LAST_LOGON_PARMNUM                                                        = 15
	USER_LOGON_HOURS_INFOLEVEL                                                     = 1020
	USER_LOGON_HOURS_PARMNUM                                                       = 20
	USER_LOGON_SERVER_INFOLEVEL                                                    = 1023
	USER_LOGON_SERVER_PARMNUM                                                      = 23
	USER_MARSHAL_CB_SIGNATURE                                                      = 85
	USER_MARSHAL_FC_BYTE                                                           = 1
	USER_MARSHAL_FC_CHAR                                                           = 2
	USER_MARSHAL_FC_DOUBLE                                                         = 12
	USER_MARSHAL_FC_FLOAT                                                          = 10
	USER_MARSHAL_FC_HYPER                                                          = 11
	USER_MARSHAL_FC_LONG                                                           = 8
	USER_MARSHAL_FC_SHORT                                                          = 6
	USER_MARSHAL_FC_SMALL                                                          = 3
	USER_MARSHAL_FC_ULONG                                                          = 9
	USER_MARSHAL_FC_USHORT                                                         = 7
	USER_MARSHAL_FC_USMALL                                                         = 4
	USER_MARSHAL_FC_WCHAR                                                          = 5
	USER_MAX_STORAGE_INFOLEVEL                                                     = 1018
	USER_MAX_STORAGE_PARMNUM                                                       = 18
	USER_NAME_INFOLEVEL                                                            = 1001
	USER_NAME_PARMNUM                                                              = 1
	USER_NUM_LOGONS_INFOLEVEL                                                      = 1022
	USER_NUM_LOGONS_PARMNUM                                                        = 22
	USER_PAD_PW_COUNT_INFOLEVEL                                                    = 1021
	USER_PAD_PW_COUNT_PARMNUM                                                      = 21
	USER_PARMS_INFOLEVEL                                                           = 1013
	USER_PARMS_PARMNUM                                                             = 13
	USER_PASSWORD_AGE_INFOLEVEL                                                    = 1004
	USER_PASSWORD_AGE_PARMNUM                                                      = 4
	USER_PASSWORD_INFOLEVEL                                                        = 1003
	USER_PASSWORD_PARMNUM                                                          = 3
	USER_PRIMARY_GROUP_INFOLEVEL                                                   = 1051
	USER_PRIMARY_GROUP_PARMNUM                                                     = 51
	USER_PRIV_ADMIN                                                                = 2
	USER_PRIV_GUEST                                                                = 0
	USER_PRIV_INFOLEVEL                                                            = 1005
	USER_PRIV_MASK                                                                 = 0x3
	USER_PRIV_PARMNUM                                                              = 5
	USER_PRIV_USER                                                                 = 1
	USER_PROFILE                                                                   = 52
	USER_PROFILE_PARMNUM                                                           = 52
	USER_SCRIPT_PATH_INFOLEVEL                                                     = 1009
	USER_SCRIPT_PATH_PARMNUM                                                       = 9
	USER_UNITS_PER_WEEK_INFOLEVEL                                                  = 1019
	USER_UNITS_PER_WEEK_PARMNUM                                                    = 19
	USER_USR_COMMENT_INFOLEVEL                                                     = 1012
	USER_USR_COMMENT_PARMNUM                                                       = 12
	USER_WORKSTATIONS_INFOLEVEL                                                    = 1014
	USER_WORKSTATIONS_PARMNUM                                                      = 14
	USE_ASGTYPE_PARMNUM                                                            = 4
	USE_CHARDEV                                                                    = 2
	USE_CONN                                                                       = 4
	USE_DEFAULT_CREDENTIALS                                                        = 0x4
	USE_DISCONN                                                                    = 2
	USE_DISKDEV                                                                    = 0
	USE_DOMAINNAME_PARMNUM                                                         = 6
	USE_FORCE                                                                      = 1
	USE_IPC                                                                        = 3
	USE_LOCAL_PARMNUM                                                              = 1
	USE_LOTS_OF_FORCE                                                              = 2
	USE_NETERR                                                                     = 3
	USE_NOFORCE                                                                    = 0
	USE_OK                                                                         = 0
	USE_PASSWORD_PARMNUM                                                           = 3
	USE_PAUSED                                                                     = 1
	USE_RECONN                                                                     = 5
	USE_REMOTE_PARMNUM                                                             = 2
	USE_SESSLOST                                                                   = 2
	USE_SPECIFIC_TRANSPORT                                                         = 0x80000000
	USE_SPOOLDEV                                                                   = 1
	USE_USERNAME_PARMNUM                                                           = 5
	USN_DELETE_FLAG_DELETE                                                         = 1
	USN_DELETE_FLAG_NOTIFY                                                         = 2
	USN_DELETE_VALID_FLAGS                                                         = 3
	USN_PAGE_SIZE                                                                  = 4096
	USN_REASON_BASIC_INFO_CHANGE                                                   = 32768
	USN_REASON_CLOSE                                                               = 2147483648
	USN_REASON_COMPRESSION_CHANGE                                                  = 131072
	USN_REASON_DATA_EXTEND                                                         = 2
	USN_REASON_DATA_OVERWRITE                                                      = 1
	USN_REASON_DATA_TRUNCATION                                                     = 4
	USN_REASON_EA_CHANGE                                                           = 1024
	USN_REASON_ENCRYPTION_CHANGE                                                   = 262144
	USN_REASON_FILE_CREATE                                                         = 256
	USN_REASON_FILE_DELETE                                                         = 512
	USN_REASON_HARD_LINK_CHANGE                                                    = 65536
	USN_REASON_INDEXABLE_CHANGE                                                    = 16384
	USN_REASON_NAMED_DATA_EXTEND                                                   = 32
	USN_REASON_NAMED_DATA_OVERWRITE                                                = 16
	USN_REASON_NAMED_DATA_TRUNCATION                                               = 64
	USN_REASON_OBJECT_ID_CHANGE                                                    = 524288
	USN_REASON_RENAME_NEW_NAME                                                     = 8192
	USN_REASON_RENAME_OLD_NAME                                                     = 4096
	USN_REASON_REPARSE_POINT_CHANGE                                                = 1048576
	USN_REASON_SECURITY_CHANGE                                                     = 2048
	USN_REASON_STREAM_CHANGE                                                       = 2097152
	USN_SOURCE_AUXILIARY_DATA                                                      = 2
	USN_SOURCE_DATA_MANAGEMENT                                                     = 1
	USN_SOURCE_REPLICATION_MANAGEMENT                                              = 4
	UUID_DEFINED                                                                   = 0
	VALIDATED_LOGON                                                                = 0
	VALIDATEUNC_CONNECT                                                            = 0x0001
	VALIDATEUNC_NOUI                                                               = 0x0002
	VALIDATEUNC_PRINT                                                              = 0x0004
	VALIDATEUNC_VALID                                                              = 0x0007
	VALID_LOGOFF                                                                   = 1
	VALID_NTFT                                                                     = 0xC0
	VARCMP_EQ                                                                      = 1
	VARCMP_GT                                                                      = 2
	VARCMP_LT                                                                      = 0
	VARCMP_NULL                                                                    = 3
	VARIANT_ALPHABOOL                                                              = 0x02
	VARIANT_CALENDAR_GREGORIAN                                                     = 0x40
	VARIANT_CALENDAR_HIJRI                                                         = 0x08
	VARIANT_CALENDAR_THAI                                                          = 0x20
	VARIANT_LOCALBOOL                                                              = 0x10
	VARIANT_NOUSEROVERRIDE                                                         = 0x04
	VARIANT_NOVALUEPROP                                                            = 0x01
	VARIANT_USE_NLS                                                                = 0x80
	VENDOR_ID_LENGTH                                                               = 8
	VIEW_DETAILS                                                                   = 3
	VIEW_LARGEICONS                                                                = 0
	VIEW_LIST                                                                      = 2
	VIEW_NETCONNECT                                                                = 9
	VIEW_NETDISCONNECT                                                             = 10
	VIEW_NEWFOLDER                                                                 = 11
	VIEW_PARENTFOLDER                                                              = 8
	VIEW_SMALLICONS                                                                = 1
	VIEW_SORTDATE                                                                  = 6
	VIEW_SORTNAME                                                                  = 4
	VIEW_SORTSIZE                                                                  = 5
	VIEW_SORTTYPE                                                                  = 7
	VIEW_VIEWMENU                                                                  = 12
	VOLUME_IS_DIRTY                                                                = 1
	VOLUME_UPGRADE_SCHEDULED                                                       = 2
	VTDATEGRE_MAX                                                                  = 2958465
	VTDATEGRE_MIN                                                                  = -657434
	WC_BUTTONA                                                                     = "Button"
	WC_COMBOBOXA                                                                   = "ComboBox"
	WC_COMBOBOXEXA                                                                 = "ComboBoxEx32"
	WC_EDITA                                                                       = "Edit"
	WC_HEADERA                                                                     = "SysHeader32"
	WC_IPADDRESSA                                                                  = "SysIPAddress32"
	WC_LISTBOXA                                                                    = "ListBox"
	WC_LISTVIEWA                                                                   = "SysListView32"
	WC_NATIVEFONTCTLA                                                              = "NativeFontCtl"
	WC_PAGESCROLLERA                                                               = "SysPager"
	WC_SCROLLBARA                                                                  = "ScrollBar"
	WC_STATICA                                                                     = "Static"
	WC_TABCONTROLA                                                                 = "SysTabControl32"
	WC_TREEVIEWA                                                                   = "SysTreeView32"
	WDT_INPROC64_CALL                                                              = 1349805143
	WDT_INPROC_CALL                                                                = 1215587415
	WDT_REMOTE_CALL                                                                = 1383359575
	WINCRYPT_DWORD_CPP_ONLY                                                        = 0
	WININETINFO_OPTION_LOCK_HANDLE                                                 = 65534
	WIZ_BODYCX                                                                     = 184
	WIZ_BODYX                                                                      = 92
	WIZ_CXBMP                                                                      = 80
	WIZ_CXDLG                                                                      = 276
	WIZ_CYDLG                                                                      = 140
	WKSTA_BUFFERNAMEDPIPES_PARMNUM                                                 = 51
	WKSTA_BUFFERREADONLYFILES_PARMNUM                                              = 59
	WKSTA_BUFFILESWITHDENYWRITE_PARMNUM                                            = 58
	WKSTA_CACHEFILETIMEOUT_PARMNUM                                                 = 47
	WKSTA_CHARCOUNT_PARMNUM                                                        = 12
	WKSTA_CHARTIME_PARMNUM                                                         = 11
	WKSTA_CHARWAIT_PARMNUM                                                         = 10
	WKSTA_COMPUTERNAME_PARMNUM                                                     = 1
	WKSTA_DORMANTFILELIMIT_PARMNUM                                                 = 46
	WKSTA_ERRLOGSZ_PARMNUM                                                         = 27
	WKSTA_FORCECORECREATEMODE_PARMNUM                                              = 60
	WKSTA_KEEPCONN_PARMNUM                                                         = 13
	WKSTA_KEEPSEARCH_PARMNUM                                                       = 14
	WKSTA_LANGROUP_PARMNUM                                                         = 2
	WKSTA_LANROOT_PARMNUM                                                          = 7
	WKSTA_LOCKINCREMENT_PARMNUM                                                    = 42
	WKSTA_LOCKMAXIMUM_PARMNUM                                                      = 43
	WKSTA_LOCKQUOTA_PARMNUM                                                        = 41
	WKSTA_LOGGED_ON_USERS_PARMNUM                                                  = 6
	WKSTA_LOGON_DOMAIN_PARMNUM                                                     = 8
	WKSTA_LOGON_SERVER_PARMNUM                                                     = 9
	WKSTA_MAILSLOTS_PARMNUM                                                        = 30
	WKSTA_MAXCMDS_PARMNUM                                                          = 15
	WKSTA_MAXTHREADS_PARMNUM                                                       = 33
	WKSTA_MAXWRKCACHE_PARMNUM                                                      = 17
	WKSTA_NUMALERTS_PARMNUM                                                        = 20
	WKSTA_NUMCHARBUF_PARMNUM                                                       = 22
	WKSTA_NUMDGRAMBUF_PARMNUM                                                      = 31
	WKSTA_NUMSERVICES_PARMNUM                                                      = 21
	WKSTA_NUMWORKBUF_PARMNUM                                                       = 16
	WKSTA_OTH_DOMAINS_PARMNUM                                                      = 101
	WKSTA_PIPEINCREMENT_PARMNUM                                                    = 44
	WKSTA_PIPEMAXIMUM_PARMNUM                                                      = 45
	WKSTA_PLATFORM_ID_PARMNUM                                                      = 100
	WKSTA_PRINTBUFTIME_PARMNUM                                                     = 28
	WKSTA_READAHEADTHRUPUT_PARMNUM                                                 = 62
	WKSTA_SESSTIMEOUT_PARMNUM                                                      = 18
	WKSTA_SIZCHARBUF_PARMNUM                                                       = 23
	WKSTA_SIZERROR_PARMNUM                                                         = 19
	WKSTA_SIZWORKBUF_PARMNUM                                                       = 29
	WKSTA_USE512BYTESMAXTRANSFER_PARMNUM                                           = 61
	WKSTA_USECLOSEBEHIND_PARMNUM                                                   = 50
	WKSTA_USEENCRYPTION_PARMNUM                                                    = 57
	WKSTA_USELOCKANDREADANDUNLOCK_PARMNUM                                          = 52
	WKSTA_USEOPPORTUNISTICLOCKING_PARMNUM                                          = 48
	WKSTA_USERAWREAD_PARMNUM                                                       = 54
	WKSTA_USERAWWRITE_PARMNUM                                                      = 55
	WKSTA_USEUNLOCKBEHIND_PARMNUM                                                  = 49
	WKSTA_USEWRITERAWWITHDATA_PARMNUM                                              = 56
	WKSTA_UTILIZENTCACHING_PARMNUM                                                 = 53
	WKSTA_VER_MAJOR_PARMNUM                                                        = 4
	WKSTA_VER_MINOR_PARMNUM                                                        = 5
	WKSTA_WRKHEURISTICS_PARMNUM                                                    = 32
	WMN_FIRST                                                                      = 18446744073709550616
	WMN_LAST                                                                       = 18446744073709550416
	WRITE_COMPRESSION_INFO_VALID                                                   = 0x00000010
	WSB_PROP_CXHSCROLL                                                             = 2
	WSB_PROP_CXHTHUMB                                                              = 16
	WSB_PROP_CXVSCROLL                                                             = 8
	WSB_PROP_CYHSCROLL                                                             = 4
	WSB_PROP_CYVSCROLL                                                             = 1
	WSB_PROP_CYVTHUMB                                                              = 32
	WSB_PROP_HBKGCOLOR                                                             = 128
	WSB_PROP_HSTYLE                                                                = 512
	WSB_PROP_MASK                                                                  = 4095
	WSB_PROP_PALETTE                                                               = 2048
	WSB_PROP_VBKGCOLOR                                                             = 64
	WSB_PROP_VSTYLE                                                                = 256
	WSB_PROP_WINSTYLE                                                              = 1024
	X509_ASN_ENCODING                                                              = 0x1
	X509_NDR_ENCODING                                                              = 0x2
	ZERO_PADDING                                                                   = 3
	X_ALERT_                                                                       = 0
	X_APPIDREGFLAGS_DEFINED                                                        = 0
	X_AUTH_IDENTITY_DEFINED                                                        = 0
	X_COMBASEAPI_H_                                                                = 0
	X_CY_DEFINED                                                                   = 0
	X_DCOMSCM_REMOTECALL_FLAGS_DEFINED                                             = 0
	X_DEVIOCTL_                                                                    = 0
	X_DS_CONTROL_BITS_DEFINED_                                                     = 0
	X_ERROR_STATUS_T_DEFINED                                                       = 0
	X_FILESYSTEMFSCTL_                                                             = 0
	X_FORCENAMELESSUNION                                                           = 1
	X_HITLOGGING_DEFINED                                                           = 0
	X_HYPER_DEFINED                                                                = 0
	X_INC_COMMCTRL                                                                 = 0
	X_INC_PROFINFO                                                                 = 0
	X_INC_USERENV                                                                  = 0
	X_ISGUIDS_H_                                                                   = 0
	X_LMACCESS_                                                                    = 0
	X_LMAPIBUF_                                                                    = 0
	X_LMAUDIT_                                                                     = 0
	X_LMCONFIG_                                                                    = 0
	X_LMCONNECTION_                                                                = 0
	X_LMDOMAIN_                                                                    = 0
	X_LMERRLOG_                                                                    = 0
	X_LMFILE_                                                                      = 0
	X_LMGROUP_                                                                     = 0
	X_LMHLOGDEFINED_                                                               = 0
	X_LMLOCALGROUP_                                                                = 0
	X_LMMSG_                                                                       = 0
	X_LMREMUTL_                                                                    = 0
	X_LMREPL_                                                                      = 0
	X_LMSERVER_                                                                    = 0
	X_LMSESSION_                                                                   = 0
	X_LMSHARE_                                                                     = 0
	X_LMSNAME_                                                                     = 0
	X_LMSTATS_                                                                     = 0
	X_LMSVC_                                                                       = 0
	X_LMUSEFLG_                                                                    = 0
	X_LMUSER_                                                                      = 0
	X_LMUSE_                                                                       = 0
	X_LMWKSTA_                                                                     = 0
	X_LM_                                                                          = 0
	X_LPAUTHENTICATIONEX_DEFINED                                                   = 0
	X_LPAUTHENTICATION_DEFINED                                                     = 0
	X_LPBINDCALLBACKREDIRECT_DEFINED                                               = 0
	X_LPBINDHOST_DEFINED                                                           = 0
	X_LPBINDING_DEFINED                                                            = 0
	X_LPBINDPROTOCOL_DEFINED                                                       = 0
	X_LPBINDSTATUSCALLBACKEX_DEFINED                                               = 0
	X_LPBINDSTATUSCALLBACK_DEFINED                                                 = 0
	X_LPCATALOGFILEINFO_DEFINED                                                    = 0
	X_LPCATINFORMATION_DEFINED                                                     = 0
	X_LPCATREGISTER_DEFINED                                                        = 0
	X_LPCODEINSTALL_DEFINED                                                        = 0
	X_LPCONTINUECALLBACK_DEFINED                                                   = 0
	X_LPDATAFILTER_DEFINED                                                         = 0
	X_LPENCODINGFILTERFACTORY_DEFINED                                              = 0
	X_LPENUMCATEGORYINFO_DEFINED                                                   = 0
	X_LPENUMGUID_DEFINED                                                           = 0
	X_LPENUMOLEDOCUMENTVIEWS_DEFINED                                               = 0
	X_LPGETBINDHANDLE_DEFINED                                                      = 0
	X_LPHTTPNEGOTIATE2_DEFINED                                                     = 0
	X_LPHTTPNEGOTIATE3_DEFINED                                                     = 0
	X_LPHTTPNEGOTIATE_DEFINED                                                      = 0
	X_LPHTTPSECURITY_DEFINED                                                       = 0
	X_LPIINTERNET                                                                  = 0
	X_LPIINTERNETBINDINFO                                                          = 0
	X_LPIINTERNETBINDINFOEX                                                        = 0
	X_LPIINTERNETPRIORITY_DEFINED                                                  = 0
	X_LPIINTERNETPROTOCOLINFO_DEFINED                                              = 0
	X_LPIINTERNETPROTOCOLROOT_DEFINED                                              = 0
	X_LPIINTERNETPROTOCOLSINKSTACKABLE_DEFINED                                     = 0
	X_LPIINTERNETPROTOCOLSINK_DEFINED                                              = 0
	X_LPIINTERNETPROTOCOL_DEFINED                                                  = 0
	X_LPIINTERNETSESSION_DEFINED                                                   = 0
	X_LPIINTERNETTHREADSWITCH_DEFINED                                              = 0
	X_LPINTERNETHOSTSECURITYMANANGER_DEFINED                                       = 0
	X_LPINTERNETSECURITYMANANGER_DEFINED                                           = 0
	X_LPINTERNETSECURITYMGRSITE_DEFINED                                            = 0
	X_LPINTERNETZONEMANAGER_DEFINED                                                = 0
	X_LPIWRAPPEDPROTOCOL_DEFINED                                                   = 0
	X_LPMONIKERPROP_DEFINED                                                        = 0
	X_LPOLECOMMANDTARGET_DEFINED                                                   = 0
	X_LPOLEDOCUMENTSITE_DEFINED                                                    = 0
	X_LPOLEDOCUMENTVIEW_DEFINED                                                    = 0
	X_LPOLEDOCUMENT_DEFINED                                                        = 0
	X_LPPERSISTMONIKER_DEFINED                                                     = 0
	X_LPPRINT_DEFINED                                                              = 0
	X_LPPROTECTEDMODEMENUSERVICES_DEFINED                                          = 0
	X_LPSOFTDISTEXT_DEFINED                                                        = 0
	X_LPWINDOWFORBINDINGUI_DEFINED                                                 = 0
	X_LPWININETFILESTREAM_DEFINED                                                  = 0
	X_LPWININETHTTPINFO_DEFINED                                                    = 0
	X_LPWININETHTTPTIMEOUTS_DEFINED                                                = 0
	X_LPWININETINFO_DEFINED                                                        = 0
	X_NTDDDISK_H_                                                                  = 0
	X_NTDDSTOR_H_                                                                  = 0
	X_NTSTATUS_PSDK                                                                = 0
	X_OBJBASE_H_                                                                   = 0
	X_OBJIDLBASE_                                                                  = 0
	X_OLE2_H_                                                                      = 0
	X_OLEAUTO_H_                                                                   = 0
	X_PROPERTYKEY_EQUALITY_OPERATORS_                                              = 0
	X_PROPVARIANTINIT_DEFINED_                                                     = 0
	X_PRSHT_H_                                                                     = 0
	X_REFPROPVARIANT_DEFINED                                                       = 0
	X_REFVARIANT_DEFINED                                                           = 0
	X_ROTFLAGS_DEFINED                                                             = 0
	X_ROTREGFLAGS_DEFINED                                                          = 0
	X_ROT_COMPARE_MAX_DEFINED                                                      = 0
	X_SERIALIZEDPROPERTYVALUE_DEFINED_                                             = 0
	X_SHERROR_                                                                     = 0
	X_SHLOBJ_H_                                                                    = 0
	X_WINIOCTL_                                                                    = 0
	X_XHRPLUGGABLEPROTOCOL_DEFINED                                                 = 0
	X_tagBSTRBLOB_DEFINED                                                          = 0
	X_tagCY_DEFINED                                                                = 0
	CPRIV_KEY_CACHE_MAX_ITEMS_DEFAULT                                              = 20
	CPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS_DEFAULT                                 = 86400
	CbNDRContext                                                                   = 20
	DwFORCE_KEY_PROTECTION_DISABLED                                                = 0x0
	DwFORCE_KEY_PROTECTION_HIGH                                                    = 0x2
	DwFORCE_KEY_PROTECTION_USER_SELECT                                             = 0x1
	SzFORCE_KEY_PROTECTION                                                         = "ForceKeyProtection"
	SzKEY_CACHE_ENABLED                                                            = "CachePrivateKeys"
	SzKEY_CACHE_SECONDS                                                            = "PrivateKeyLifetimeSeconds"
	SzKEY_CRYPTOAPI_PRIVATE_KEY_OPTIONS                                            = "Software\\Policies\\Microsoft\\Cryptography"
	SzOIDVerisign_FailInfo                                                         = "2.16.840.1.113733.1.9.4"
	SzOIDVerisign_MessageType                                                      = "2.16.840.1.113733.1.9.2"
	SzOIDVerisign_PkiStatus                                                        = "2.16.840.1.113733.1.9.3"
	SzOIDVerisign_RecipientNonce                                                   = "2.16.840.1.113733.1.9.6"
	SzOIDVerisign_SenderNonce                                                      = "2.16.840.1.113733.1.9.5"
	SzOIDVerisign_TransactionID                                                    = "2.16.840.1.113733.1.9.7"
	SzOID_ANSI_X942                                                                = "1.2.840.10046"
	SzOID_ANSI_X942_DH                                                             = "1.2.840.10046.2.1"
	SzOID_ANY_APPLICATION_POLICY                                                   = "1.3.6.1.4.1.311.10.12.1"
	SzOID_ANY_CERT_POLICY                                                          = "2.5.29.32.0"
	SzOID_ANY_ENHANCED_KEY_USAGE                                                   = "2.5.29.37.0"
	SzOID_APPLICATION_CERT_POLICIES                                                = "1.3.6.1.4.1.311.21.10"
	SzOID_APPLICATION_POLICY_CONSTRAINTS                                           = "1.3.6.1.4.1.311.21.12"
	SzOID_APPLICATION_POLICY_MAPPINGS                                              = "1.3.6.1.4.1.311.21.11"
	SzOID_ARCHIVED_KEY_ATTR                                                        = "1.3.6.1.4.1.311.21.13"
	SzOID_ARCHIVED_KEY_CERT_HASH                                                   = "1.3.6.1.4.1.311.21.16"
	SzOID_ATTEST_WHQL_CRYPTO                                                       = "1.3.6.1.4.1.311.10.3.5.1"
	SzOID_ATTR_PLATFORM_SPECIFICATION                                              = "2.23.133.2.17"
	SzOID_ATTR_SUPPORTED_ALGORITHMS                                                = "2.5.4.52"
	SzOID_ATTR_TPM_SECURITY_ASSERTIONS                                             = "2.23.133.2.18"
	SzOID_ATTR_TPM_SPECIFICATION                                                   = "2.23.133.2.16"
	SzOID_AUTHORITY_INFO_ACCESS                                                    = "1.3.6.1.5.5.7.1.1"
	SzOID_AUTHORITY_KEY_IDENTIFIER                                                 = "2.5.29.1"
	SzOID_AUTHORITY_KEY_IDENTIFIER2                                                = "2.5.29.35"
	SzOID_AUTHORITY_REVOCATION_LIST                                                = "2.5.4.38"
	SzOID_AUTO_ENROLL_CTL_USAGE                                                    = "1.3.6.1.4.1.311.20.1"
	SzOID_BACKGROUND_OTHER_LOGOTYPE                                                = "1.3.6.1.5.5.7.20.2"
	SzOID_BASIC_CONSTRAINTS                                                        = "2.5.29.10"
	SzOID_BASIC_CONSTRAINTS2                                                       = "2.5.29.19"
	SzOID_BIOMETRIC_EXT                                                            = "1.3.6.1.5.5.7.1.2"
	SzOID_BIOMETRIC_SIGNING                                                        = "1.3.6.1.4.1.311.10.3.41"
	SzOID_BUSINESS_CATEGORY                                                        = "2.5.4.15"
	SzOID_CA_CERTIFICATE                                                           = "2.5.4.37"
	SzOID_CERTIFICATE_REVOCATION_LIST                                              = "2.5.4.39"
	SzOID_CERTIFICATE_TEMPLATE                                                     = "1.3.6.1.4.1.311.21.7"
	SzOID_CERTSRV_CA_VERSION                                                       = "1.3.6.1.4.1.311.21.1"
	SzOID_CERTSRV_CROSSCA_VERSION                                                  = "1.3.6.1.4.1.311.21.22"
	SzOID_CERTSRV_PREVIOUS_CERT_HASH                                               = "1.3.6.1.4.1.311.21.2"
	SzOID_CERT_DISALLOWED_FILETIME_PROP_ID                                         = "1.3.6.1.4.1.311.10.11.104"
	SzOID_CERT_EXTENSIONS                                                          = "1.3.6.1.4.1.311.2.1.14"
	SzOID_CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID                               = "1.3.6.1.4.1.311.10.11.28"
	SzOID_CERT_KEY_IDENTIFIER_PROP_ID                                              = "1.3.6.1.4.1.311.10.11.20"
	SzOID_CERT_MANIFOLD                                                            = "1.3.6.1.4.1.311.20.3"
	SzOID_CERT_MD5_HASH_PROP_ID                                                    = "1.3.6.1.4.1.311.10.11.4"
	SzOID_CERT_POLICIES                                                            = "2.5.29.32"
	SzOID_CERT_POLICIES_95                                                         = "2.5.29.3"
	SzOID_CERT_POLICIES_95_QUALIFIER1                                              = "2.16.840.1.113733.1.7.1.1"
	SzOID_CERT_PROP_ID_PREFIX                                                      = "1.3.6.1.4.1.311.10.11."
	SzOID_CERT_SIGNATURE_HASH_PROP_ID                                              = "1.3.6.1.4.1.311.10.11.15"
	SzOID_CERT_STRONG_KEY_OS_1                                                     = "1.3.6.1.4.1.311.72.2.1"
	SzOID_CERT_STRONG_KEY_OS_PREFIX                                                = "1.3.6.1.4.1.311.72.2."
	SzOID_CERT_STRONG_SIGN_OS_1                                                    = "1.3.6.1.4.1.311.72.1.1"
	SzOID_CERT_STRONG_SIGN_OS_PREFIX                                               = "1.3.6.1.4.1.311.72.1."
	SzOID_CERT_SUBJECT_NAME_MD5_HASH_PROP_ID                                       = "1.3.6.1.4.1.311.10.11.29"
	SzOID_CMC                                                                      = "1.3.6.1.5.5.7.7"
	SzOID_CMC_ADD_ATTRIBUTES                                                       = "1.3.6.1.4.1.311.10.10.1"
	SzOID_CMC_ADD_EXTENSIONS                                                       = "1.3.6.1.5.5.7.7.8"
	SzOID_CMC_DATA_RETURN                                                          = "1.3.6.1.5.5.7.7.4"
	SzOID_CMC_DECRYPTED_POP                                                        = "1.3.6.1.5.5.7.7.10"
	SzOID_CMC_ENCRYPTED_POP                                                        = "1.3.6.1.5.5.7.7.9"
	SzOID_CMC_GET_CERT                                                             = "1.3.6.1.5.5.7.7.15"
	SzOID_CMC_GET_CRL                                                              = "1.3.6.1.5.5.7.7.16"
	SzOID_CMC_IDENTIFICATION                                                       = "1.3.6.1.5.5.7.7.2"
	SzOID_CMC_IDENTITY_PROOF                                                       = "1.3.6.1.5.5.7.7.3"
	SzOID_CMC_ID_CONFIRM_CERT_ACCEPTANCE                                           = "1.3.6.1.5.5.7.7.24"
	SzOID_CMC_ID_POP_LINK_RANDOM                                                   = "1.3.6.1.5.5.7.7.22"
	SzOID_CMC_ID_POP_LINK_WITNESS                                                  = "1.3.6.1.5.5.7.7.23"
	SzOID_CMC_LRA_POP_WITNESS                                                      = "1.3.6.1.5.5.7.7.11"
	SzOID_CMC_QUERY_PENDING                                                        = "1.3.6.1.5.5.7.7.21"
	SzOID_CMC_RECIPIENT_NONCE                                                      = "1.3.6.1.5.5.7.7.7"
	SzOID_CMC_REG_INFO                                                             = "1.3.6.1.5.5.7.7.18"
	SzOID_CMC_RESPONSE_INFO                                                        = "1.3.6.1.5.5.7.7.19"
	SzOID_CMC_REVOKE_REQUEST                                                       = "1.3.6.1.5.5.7.7.17"
	SzOID_CMC_SENDER_NONCE                                                         = "1.3.6.1.5.5.7.7.6"
	SzOID_CMC_STATUS_INFO                                                          = "1.3.6.1.5.5.7.7.1"
	SzOID_CMC_TRANSACTION_ID                                                       = "1.3.6.1.5.5.7.7.5"
	SzOID_CN_ECDSA_SHA256                                                          = "1.2.156.11235.1.1.1"
	SzOID_COMMON_NAME                                                              = "2.5.4.3"
	SzOID_COUNTRY_NAME                                                             = "2.5.4.6"
	SzOID_CRL_DIST_POINTS                                                          = "2.5.29.31"
	SzOID_CRL_NEXT_PUBLISH                                                         = "1.3.6.1.4.1.311.21.4"
	SzOID_CRL_NUMBER                                                               = "2.5.29.20"
	SzOID_CRL_REASON_CODE                                                          = "2.5.29.21"
	SzOID_CRL_SELF_CDP                                                             = "1.3.6.1.4.1.311.21.14"
	SzOID_CRL_VIRTUAL_BASE                                                         = "1.3.6.1.4.1.311.21.3"
	SzOID_CROSS_CERTIFICATE_PAIR                                                   = "2.5.4.40"
	SzOID_CROSS_CERT_DIST_POINTS                                                   = "1.3.6.1.4.1.311.10.9.1"
	SzOID_CTL                                                                      = "1.3.6.1.4.1.311.10.1"
	SzOID_CT_CERT_SCTLIST                                                          = "1.3.6.1.4.1.11129.2.4.2"
	SzOID_CT_PKI_DATA                                                              = "1.3.6.1.5.5.7.12.2"
	SzOID_CT_PKI_RESPONSE                                                          = "1.3.6.1.5.5.7.12.3"
	SzOID_DELTA_CRL_INDICATOR                                                      = "2.5.29.27"
	SzOID_DESCRIPTION                                                              = "2.5.4.13"
	SzOID_DESTINATION_INDICATOR                                                    = "2.5.4.27"
	SzOID_DEVICE_SERIAL_NUMBER                                                     = "2.5.4.5"
	SzOID_DH_SINGLE_PASS_STDDH_SHA1_KDF                                            = "1.3.133.16.840.63.0.2"
	SzOID_DH_SINGLE_PASS_STDDH_SHA256_KDF                                          = "1.3.132.1.11.1"
	SzOID_DH_SINGLE_PASS_STDDH_SHA384_KDF                                          = "1.3.132.1.11.2"
	SzOID_DISALLOWED_LIST                                                          = "1.3.6.1.4.1.311.10.3.30"
	SzOID_DN_QUALIFIER                                                             = "2.5.4.46"
	SzOID_DOMAIN_COMPONENT                                                         = "0.9.2342.19200300.100.1.25"
	SzOID_DRM                                                                      = "1.3.6.1.4.1.311.10.5.1"
	SzOID_DRM_INDIVIDUALIZATION                                                    = "1.3.6.1.4.1.311.10.5.2"
	SzOID_DS                                                                       = "2.5"
	SzOID_DSALG                                                                    = "2.5.8"
	SzOID_DSALG_CRPT                                                               = "2.5.8.1"
	SzOID_DSALG_HASH                                                               = "2.5.8.2"
	SzOID_DSALG_RSA                                                                = "2.5.8.1.1"
	SzOID_DSALG_SIGN                                                               = "2.5.8.3"
	SzOID_DS_EMAIL_REPLICATION                                                     = "1.3.6.1.4.1.311.21.19"
	SzOID_DYNAMIC_CODE_GEN_SIGNER                                                  = "1.3.6.1.4.1.311.76.5.1"
	SzOID_ECC_CURVE_BRAINPOOLP160R1                                                = "1.3.36.3.3.2.8.1.1.1"
	SzOID_ECC_CURVE_BRAINPOOLP160T1                                                = "1.3.36.3.3.2.8.1.1.2"
	SzOID_ECC_CURVE_BRAINPOOLP192R1                                                = "1.3.36.3.3.2.8.1.1.3"
	SzOID_ECC_CURVE_BRAINPOOLP192T1                                                = "1.3.36.3.3.2.8.1.1.4"
	SzOID_ECC_CURVE_BRAINPOOLP224R1                                                = "1.3.36.3.3.2.8.1.1.5"
	SzOID_ECC_CURVE_BRAINPOOLP224T1                                                = "1.3.36.3.3.2.8.1.1.6"
	SzOID_ECC_CURVE_BRAINPOOLP256R1                                                = "1.3.36.3.3.2.8.1.1.7"
	SzOID_ECC_CURVE_BRAINPOOLP256T1                                                = "1.3.36.3.3.2.8.1.1.8"
	SzOID_ECC_CURVE_BRAINPOOLP320R1                                                = "1.3.36.3.3.2.8.1.1.9"
	SzOID_ECC_CURVE_BRAINPOOLP320T1                                                = "1.3.36.3.3.2.8.1.1.10"
	SzOID_ECC_CURVE_BRAINPOOLP384R1                                                = "1.3.36.3.3.2.8.1.1.11"
	SzOID_ECC_CURVE_BRAINPOOLP384T1                                                = "1.3.36.3.3.2.8.1.1.12"
	SzOID_ECC_CURVE_BRAINPOOLP512R1                                                = "1.3.36.3.3.2.8.1.1.13"
	SzOID_ECC_CURVE_BRAINPOOLP512T1                                                = "1.3.36.3.3.2.8.1.1.14"
	SzOID_ECC_CURVE_EC192WAPI                                                      = "1.2.156.11235.1.1.2.1"
	SzOID_ECC_CURVE_NISTP192                                                       = "1.2.840.10045.3.1.1"
	SzOID_ECC_CURVE_NISTP224                                                       = "1.3.132.0.33"
	SzOID_ECC_CURVE_P256                                                           = "1.2.840.10045.3.1.7"
	SzOID_ECC_CURVE_P384                                                           = "1.3.132.0.34"
	SzOID_ECC_CURVE_P521                                                           = "1.3.132.0.35"
	SzOID_ECC_CURVE_SECP160K1                                                      = "1.3.132.0.9"
	SzOID_ECC_CURVE_SECP160R1                                                      = "1.3.132.0.8"
	SzOID_ECC_CURVE_SECP160R2                                                      = "1.3.132.0.30"
	SzOID_ECC_CURVE_SECP192K1                                                      = "1.3.132.0.31"
	SzOID_ECC_CURVE_SECP224K1                                                      = "1.3.132.0.32"
	SzOID_ECC_CURVE_SECP256K1                                                      = "1.3.132.0.10"
	SzOID_ECC_CURVE_WTLS9                                                          = "2.23.43.1.4.9"
	SzOID_ECC_CURVE_X962P192V1                                                     = "1.2.840.10045.3.1.1"
	SzOID_ECC_CURVE_X962P192V2                                                     = "1.2.840.10045.3.1.2"
	SzOID_ECC_CURVE_X962P192V3                                                     = "1.2.840.10045.3.1.3"
	SzOID_ECC_CURVE_X962P239V1                                                     = "1.2.840.10045.3.1.4"
	SzOID_ECC_CURVE_X962P239V2                                                     = "1.2.840.10045.3.1.5"
	SzOID_ECC_CURVE_X962P239V3                                                     = "1.2.840.10045.3.1.6"
	SzOID_ECC_PUBLIC_KEY                                                           = "1.2.840.10045.2.1"
	SzOID_ECDSA_SHA1                                                               = "1.2.840.10045.4.1"
	SzOID_ECDSA_SHA256                                                             = "1.2.840.10045.4.3.2"
	SzOID_ECDSA_SHA384                                                             = "1.2.840.10045.4.3.3"
	SzOID_ECDSA_SHA512                                                             = "1.2.840.10045.4.3.4"
	SzOID_ECDSA_SPECIFIED                                                          = "1.2.840.10045.4.3"
	SzOID_EFS_RECOVERY                                                             = "1.3.6.1.4.1.311.10.3.4.1"
	SzOID_EMBEDDED_NT_CRYPTO                                                       = "1.3.6.1.4.1.311.10.3.8"
	SzOID_ENCLAVE_SIGNING                                                          = "1.3.6.1.4.1.311.10.3.42"
	SzOID_ENCRYPTED_KEY_HASH                                                       = "1.3.6.1.4.1.311.21.21"
	SzOID_ENHANCED_KEY_USAGE                                                       = "2.5.29.37"
	SzOID_ENROLLMENT_AGENT                                                         = "1.3.6.1.4.1.311.20.2.1"
	SzOID_ENROLLMENT_CSP_PROVIDER                                                  = "1.3.6.1.4.1.311.13.2.2"
	SzOID_ENROLLMENT_NAME_VALUE_PAIR                                               = "1.3.6.1.4.1.311.13.2.1"
	SzOID_ENROLL_AIK_INFO                                                          = "1.3.6.1.4.1.311.21.39"
	SzOID_ENROLL_ATTESTATION_CHALLENGE                                             = "1.3.6.1.4.1.311.21.28"
	SzOID_ENROLL_ATTESTATION_STATEMENT                                             = "1.3.6.1.4.1.311.21.24"
	SzOID_ENROLL_CAXCHGCERT_HASH                                                   = "1.3.6.1.4.1.311.21.27"
	SzOID_ENROLL_CERTTYPE_EXTENSION                                                = "1.3.6.1.4.1.311.20.2"
	SzOID_ENROLL_EKPUB_CHALLENGE                                                   = "1.3.6.1.4.1.311.21.26"
	SzOID_ENROLL_EKVERIFYCERT                                                      = "1.3.6.1.4.1.311.21.31"
	SzOID_ENROLL_EKVERIFYCREDS                                                     = "1.3.6.1.4.1.311.21.32"
	SzOID_ENROLL_EKVERIFYKEY                                                       = "1.3.6.1.4.1.311.21.30"
	SzOID_ENROLL_EK_CA_KEYID                                                       = "1.3.6.1.4.1.311.21.43"
	SzOID_ENROLL_EK_INFO                                                           = "1.3.6.1.4.1.311.21.23"
	SzOID_ENROLL_ENCRYPTION_ALGORITHM                                              = "1.3.6.1.4.1.311.21.29"
	SzOID_ENROLL_KEY_AFFINITY                                                      = "1.3.6.1.4.1.311.21.41"
	SzOID_ENROLL_KSP_NAME                                                          = "1.3.6.1.4.1.311.21.25"
	SzOID_ENROLL_SCEP_CHALLENGE_ANSWER                                             = "1.3.6.1.4.1.311.21.35"
	SzOID_ENROLL_SCEP_CLIENT_REQUEST                                               = "1.3.6.1.4.1.311.21.37"
	SzOID_ENROLL_SCEP_ERROR                                                        = "1.3.6.1.4.1.311.21.33"
	SzOID_ENROLL_SCEP_SERVER_MESSAGE                                               = "1.3.6.1.4.1.311.21.38"
	SzOID_ENROLL_SCEP_SERVER_SECRET                                                = "1.3.6.1.4.1.311.21.40"
	SzOID_ENROLL_SCEP_SERVER_STATE                                                 = "1.3.6.1.4.1.311.21.34"
	SzOID_ENROLL_SCEP_SIGNER_HASH                                                  = "1.3.6.1.4.1.311.21.42"
	SzOID_ENTERPRISE_OID_ROOT                                                      = "1.3.6.1.4.1.311.21.8"
	SzOID_EV_RDN_COUNTRY                                                           = "1.3.6.1.4.1.311.60.2.1.3"
	SzOID_EV_RDN_LOCALE                                                            = "1.3.6.1.4.1.311.60.2.1.1"
	SzOID_EV_RDN_STATE_OR_PROVINCE                                                 = "1.3.6.1.4.1.311.60.2.1.2"
	SzOID_EV_WHQL_CRYPTO                                                           = "1.3.6.1.4.1.311.10.3.39"
	SzOID_FACSIMILE_TELEPHONE_NUMBER                                               = "2.5.4.23"
	SzOID_FRESHEST_CRL                                                             = "2.5.29.46"
	SzOID_GIVEN_NAME                                                               = "2.5.4.42"
	SzOID_HPKP_DOMAIN_NAME_CTL                                                     = "1.3.6.1.4.1.311.10.3.60"
	SzOID_HPKP_HEADER_VALUE_CTL                                                    = "1.3.6.1.4.1.311.10.3.61"
	SzOID_INFOSEC                                                                  = "2.16.840.1.101.2.1"
	SzOID_INFOSEC_SuiteAConfidentiality                                            = "2.16.840.1.101.2.1.1.14"
	SzOID_INFOSEC_SuiteAIntegrity                                                  = "2.16.840.1.101.2.1.1.15"
	SzOID_INFOSEC_SuiteAKMandSig                                                   = "2.16.840.1.101.2.1.1.18"
	SzOID_INFOSEC_SuiteAKeyManagement                                              = "2.16.840.1.101.2.1.1.17"
	SzOID_INFOSEC_SuiteASignature                                                  = "2.16.840.1.101.2.1.1.13"
	SzOID_INFOSEC_SuiteATokenProtection                                            = "2.16.840.1.101.2.1.1.16"
	SzOID_INFOSEC_mosaicConfidentiality                                            = "2.16.840.1.101.2.1.1.4"
	SzOID_INFOSEC_mosaicIntegrity                                                  = "2.16.840.1.101.2.1.1.6"
	SzOID_INFOSEC_mosaicKMandSig                                                   = "2.16.840.1.101.2.1.1.12"
	SzOID_INFOSEC_mosaicKMandUpdSig                                                = "2.16.840.1.101.2.1.1.20"
	SzOID_INFOSEC_mosaicKeyManagement                                              = "2.16.840.1.101.2.1.1.10"
	SzOID_INFOSEC_mosaicSignature                                                  = "2.16.840.1.101.2.1.1.2"
	SzOID_INFOSEC_mosaicTokenProtection                                            = "2.16.840.1.101.2.1.1.8"
	SzOID_INFOSEC_mosaicUpdatedInteg                                               = "2.16.840.1.101.2.1.1.21"
	SzOID_INFOSEC_mosaicUpdatedSig                                                 = "2.16.840.1.101.2.1.1.19"
	SzOID_INFOSEC_sdnsConfidentiality                                              = "2.16.840.1.101.2.1.1.3"
	SzOID_INFOSEC_sdnsIntegrity                                                    = "2.16.840.1.101.2.1.1.5"
	SzOID_INFOSEC_sdnsKMandSig                                                     = "2.16.840.1.101.2.1.1.11"
	SzOID_INFOSEC_sdnsKeyManagement                                                = "2.16.840.1.101.2.1.1.9"
	SzOID_INFOSEC_sdnsSignature                                                    = "2.16.840.1.101.2.1.1.1"
	SzOID_INFOSEC_sdnsTokenProtection                                              = "2.16.840.1.101.2.1.1.7"
	SzOID_INHIBIT_ANY_POLICY                                                       = "2.5.29.54"
	SzOID_INITIALS                                                                 = "2.5.4.43"
	SzOID_INTERNATIONALIZED_EMAIL_ADDRESS                                          = "1.3.6.1.4.1.311.20.2.4"
	SzOID_INTERNATIONAL_ISDN_NUMBER                                                = "2.5.4.25"
	SzOID_IPSEC_KP_IKE_INTERMEDIATE                                                = "1.3.6.1.5.5.8.2.2"
	SzOID_ISSUED_CERT_HASH                                                         = "1.3.6.1.4.1.311.21.17"
	SzOID_ISSUER_ALT_NAME                                                          = "2.5.29.8"
	SzOID_ISSUER_ALT_NAME2                                                         = "2.5.29.18"
	SzOID_ISSUING_DIST_POINT                                                       = "2.5.29.28"
	SzOID_IUM_SIGNING                                                              = "1.3.6.1.4.1.311.10.3.37"
	SzOID_KEYID_RDN                                                                = "1.3.6.1.4.1.311.10.7.1"
	SzOID_KEY_ATTRIBUTES                                                           = "2.5.29.2"
	SzOID_KEY_USAGE                                                                = "2.5.29.15"
	SzOID_KEY_USAGE_RESTRICTION                                                    = "2.5.29.4"
	SzOID_KP_CA_EXCHANGE                                                           = "1.3.6.1.4.1.311.21.5"
	SzOID_KP_CSP_SIGNATURE                                                         = "1.3.6.1.4.1.311.10.3.16"
	SzOID_KP_CTL_USAGE_SIGNING                                                     = "1.3.6.1.4.1.311.10.3.1"
	SzOID_KP_DOCUMENT_SIGNING                                                      = "1.3.6.1.4.1.311.10.3.12"
	SzOID_KP_EFS                                                                   = "1.3.6.1.4.1.311.10.3.4"
	SzOID_KP_FLIGHT_SIGNING                                                        = "1.3.6.1.4.1.311.10.3.27"
	SzOID_KP_KERNEL_MODE_CODE_SIGNING                                              = "1.3.6.1.4.1.311.61.1.1"
	SzOID_KP_KERNEL_MODE_HAL_EXTENSION_SIGNING                                     = "1.3.6.1.4.1.311.61.5.1"
	SzOID_KP_KERNEL_MODE_TRUSTED_BOOT_SIGNING                                      = "1.3.6.1.4.1.311.61.4.1"
	SzOID_KP_KEY_RECOVERY                                                          = "1.3.6.1.4.1.311.10.3.11"
	SzOID_KP_KEY_RECOVERY_AGENT                                                    = "1.3.6.1.4.1.311.21.6"
	SzOID_KP_LIFETIME_SIGNING                                                      = "1.3.6.1.4.1.311.10.3.13"
	SzOID_KP_MOBILE_DEVICE_SOFTWARE                                                = "1.3.6.1.4.1.311.10.3.14"
	SzOID_KP_QUALIFIED_SUBORDINATION                                               = "1.3.6.1.4.1.311.10.3.10"
	SzOID_KP_SMARTCARD_LOGON                                                       = "1.3.6.1.4.1.311.20.2.2"
	SzOID_KP_SMART_DISPLAY                                                         = "1.3.6.1.4.1.311.10.3.15"
	SzOID_KP_TIME_STAMP_SIGNING                                                    = "1.3.6.1.4.1.311.10.3.2"
	SzOID_KP_TPM_AIK_CERTIFICATE                                                   = "2.23.133.8.3"
	SzOID_KP_TPM_EK_CERTIFICATE                                                    = "2.23.133.8.1"
	SzOID_KP_TPM_PLATFORM_CERTIFICATE                                              = "2.23.133.8.2"
	SzOID_LEGACY_POLICY_MAPPINGS                                                   = "2.5.29.5"
	SzOID_LICENSES                                                                 = "1.3.6.1.4.1.311.10.6.1"
	SzOID_LICENSE_SERVER                                                           = "1.3.6.1.4.1.311.10.6.2"
	SzOID_LOCALITY_NAME                                                            = "2.5.4.7"
	SzOID_LOCAL_MACHINE_KEYSET                                                     = "1.3.6.1.4.1.311.17.2"
	SzOID_LOGOTYPE_EXT                                                             = "1.3.6.1.5.5.7.1.12"
	SzOID_LOYALTY_OTHER_LOGOTYPE                                                   = "1.3.6.1.5.5.7.20.1"
	SzOID_MEMBER                                                                   = "2.5.4.31"
	SzOID_MICROSOFT_PUBLISHER_SIGNER                                               = "1.3.6.1.4.1.311.76.8.1"
	SzOID_NAME_CONSTRAINTS                                                         = "2.5.29.30"
	SzOID_NETSCAPE                                                                 = "2.16.840.1.113730"
	SzOID_NETSCAPE_BASE_URL                                                        = "2.16.840.1.113730.1.2"
	SzOID_NETSCAPE_CA_POLICY_URL                                                   = "2.16.840.1.113730.1.8"
	SzOID_NETSCAPE_CA_REVOCATION_URL                                               = "2.16.840.1.113730.1.4"
	SzOID_NETSCAPE_CERT_EXTENSION                                                  = "2.16.840.1.113730.1"
	SzOID_NETSCAPE_CERT_RENEWAL_URL                                                = "2.16.840.1.113730.1.7"
	SzOID_NETSCAPE_CERT_SEQUENCE                                                   = "2.16.840.1.113730.2.5"
	SzOID_NETSCAPE_CERT_TYPE                                                       = "2.16.840.1.113730.1.1"
	SzOID_NETSCAPE_COMMENT                                                         = "2.16.840.1.113730.1.13"
	SzOID_NETSCAPE_DATA_TYPE                                                       = "2.16.840.1.113730.2"
	SzOID_NETSCAPE_REVOCATION_URL                                                  = "2.16.840.1.113730.1.3"
	SzOID_NETSCAPE_SSL_SERVER_NAME                                                 = "2.16.840.1.113730.1.12"
	SzOID_NEXT_UPDATE_LOCATION                                                     = "1.3.6.1.4.1.311.10.2"
	SzOID_NIST_AES128_CBC                                                          = "2.16.840.1.101.3.4.1.2"
	SzOID_NIST_AES128_WRAP                                                         = "2.16.840.1.101.3.4.1.5"
	SzOID_NIST_AES192_CBC                                                          = "2.16.840.1.101.3.4.1.22"
	SzOID_NIST_AES192_WRAP                                                         = "2.16.840.1.101.3.4.1.25"
	SzOID_NIST_AES256_CBC                                                          = "2.16.840.1.101.3.4.1.42"
	SzOID_NIST_AES256_WRAP                                                         = "2.16.840.1.101.3.4.1.45"
	SzOID_NIST_sha256                                                              = "2.16.840.1.101.3.4.2.1"
	SzOID_NIST_sha384                                                              = "2.16.840.1.101.3.4.2.2"
	SzOID_NIST_sha512                                                              = "2.16.840.1.101.3.4.2.3"
	SzOID_NT5_CRYPTO                                                               = "1.3.6.1.4.1.311.10.3.6"
	SzOID_NTDS_REPLICATION                                                         = "1.3.6.1.4.1.311.25.1"
	SzOID_NT_PRINCIPAL_NAME                                                        = "1.3.6.1.4.1.311.20.2.3"
	SzOID_OEM_WHQL_CRYPTO                                                          = "1.3.6.1.4.1.311.10.3.7"
	SzOID_OIW                                                                      = "1.3.14"
	SzOID_OIWDIR                                                                   = "1.3.14.7.2"
	SzOID_OIWDIR_CRPT                                                              = "1.3.14.7.2.1"
	SzOID_OIWDIR_HASH                                                              = "1.3.14.7.2.2"
	SzOID_OIWDIR_SIGN                                                              = "1.3.14.7.2.3"
	SzOID_OIWDIR_md2                                                               = "1.3.14.7.2.2.1"
	SzOID_OIWDIR_md2RSA                                                            = "1.3.14.7.2.3.1"
	SzOID_OIWSEC                                                                   = "1.3.14.3.2"
	SzOID_OIWSEC_desCBC                                                            = "1.3.14.3.2.7"
	SzOID_OIWSEC_desCFB                                                            = "1.3.14.3.2.9"
	SzOID_OIWSEC_desECB                                                            = "1.3.14.3.2.6"
	SzOID_OIWSEC_desEDE                                                            = "1.3.14.3.2.17"
	SzOID_OIWSEC_desMAC                                                            = "1.3.14.3.2.10"
	SzOID_OIWSEC_desOFB                                                            = "1.3.14.3.2.8"
	SzOID_OIWSEC_dhCommMod                                                         = "1.3.14.3.2.16"
	SzOID_OIWSEC_dsa                                                               = "1.3.14.3.2.12"
	SzOID_OIWSEC_dsaComm                                                           = "1.3.14.3.2.20"
	SzOID_OIWSEC_dsaCommSHA                                                        = "1.3.14.3.2.21"
	SzOID_OIWSEC_dsaCommSHA1                                                       = "1.3.14.3.2.28"
	SzOID_OIWSEC_dsaSHA1                                                           = "1.3.14.3.2.27"
	SzOID_OIWSEC_keyHashSeal                                                       = "1.3.14.3.2.23"
	SzOID_OIWSEC_md2RSASign                                                        = "1.3.14.3.2.24"
	SzOID_OIWSEC_md4RSA                                                            = "1.3.14.3.2.2"
	SzOID_OIWSEC_md4RSA2                                                           = "1.3.14.3.2.4"
	SzOID_OIWSEC_md5RSA                                                            = "1.3.14.3.2.3"
	SzOID_OIWSEC_md5RSASign                                                        = "1.3.14.3.2.25"
	SzOID_OIWSEC_mdc2                                                              = "1.3.14.3.2.19"
	SzOID_OIWSEC_mdc2RSA                                                           = "1.3.14.3.2.14"
	SzOID_OIWSEC_rsaSign                                                           = "1.3.14.3.2.11"
	SzOID_OIWSEC_rsaXchg                                                           = "1.3.14.3.2.22"
	SzOID_OIWSEC_sha                                                               = "1.3.14.3.2.18"
	SzOID_OIWSEC_sha1                                                              = "1.3.14.3.2.26"
	SzOID_OIWSEC_sha1RSASign                                                       = "1.3.14.3.2.29"
	SzOID_OIWSEC_shaDSA                                                            = "1.3.14.3.2.13"
	SzOID_OIWSEC_shaRSA                                                            = "1.3.14.3.2.15"
	SzOID_ORGANIZATIONAL_UNIT_NAME                                                 = "2.5.4.11"
	SzOID_ORGANIZATION_NAME                                                        = "2.5.4.10"
	SzOID_OS_VERSION                                                               = "1.3.6.1.4.1.311.13.2.3"
	SzOID_OWNER                                                                    = "2.5.4.32"
	SzOID_PHYSICAL_DELIVERY_OFFICE_NAME                                            = "2.5.4.19"
	SzOID_PIN_RULES_CTL                                                            = "1.3.6.1.4.1.311.10.3.32"
	SzOID_PIN_RULES_DOMAIN_NAME                                                    = "1.3.6.1.4.1.311.10.3.34"
	SzOID_PIN_RULES_EXT                                                            = "1.3.6.1.4.1.311.10.3.33"
	SzOID_PIN_RULES_LOG_END_DATE_EXT                                               = "1.3.6.1.4.1.311.10.3.35"
	SzOID_PIN_RULES_SIGNER                                                         = "1.3.6.1.4.1.311.10.3.31"
	SzOID_PKCS                                                                     = "1.2.840.113549.1"
	SzOID_PKCS_1                                                                   = "1.2.840.113549.1.1"
	SzOID_PKCS_10                                                                  = "1.2.840.113549.1.10"
	SzOID_PKCS_12                                                                  = "1.2.840.113549.1.12"
	SzOID_PKCS_12_EXTENDED_ATTRIBUTES                                              = "1.3.6.1.4.1.311.17.3"
	SzOID_PKCS_12_FRIENDLY_NAME_ATTR                                               = "1.2.840.113549.1.9.20"
	SzOID_PKCS_12_KEY_PROVIDER_NAME_ATTR                                           = "1.3.6.1.4.1.311.17.1"
	SzOID_PKCS_12_LOCAL_KEY_ID                                                     = "1.2.840.113549.1.9.21"
	SzOID_PKCS_12_PROTECTED_PASSWORD_SECRET_BAG_TYPE_ID                            = "1.3.6.1.4.1.311.17.4"
	SzOID_PKCS_12_PbeIds                                                           = "1.2.840.113549.1.12.1"
	SzOID_PKCS_12_pbeWithSHA1And128BitRC2                                          = "1.2.840.113549.1.12.1.5"
	SzOID_PKCS_12_pbeWithSHA1And128BitRC4                                          = "1.2.840.113549.1.12.1.1"
	SzOID_PKCS_12_pbeWithSHA1And2KeyTripleDES                                      = "1.2.840.113549.1.12.1.4"
	SzOID_PKCS_12_pbeWithSHA1And3KeyTripleDES                                      = "1.2.840.113549.1.12.1.3"
	SzOID_PKCS_12_pbeWithSHA1And40BitRC2                                           = "1.2.840.113549.1.12.1.6"
	SzOID_PKCS_12_pbeWithSHA1And40BitRC4                                           = "1.2.840.113549.1.12.1.2"
	SzOID_PKCS_2                                                                   = "1.2.840.113549.1.2"
	SzOID_PKCS_3                                                                   = "1.2.840.113549.1.3"
	SzOID_PKCS_4                                                                   = "1.2.840.113549.1.4"
	SzOID_PKCS_5                                                                   = "1.2.840.113549.1.5"
	SzOID_PKCS_5_PBES2                                                             = "1.2.840.113549.1.5.13"
	SzOID_PKCS_5_PBKDF2                                                            = "1.2.840.113549.1.5.12"
	SzOID_PKCS_6                                                                   = "1.2.840.113549.1.6"
	SzOID_PKCS_7                                                                   = "1.2.840.113549.1.7"
	SzOID_PKCS_7_DATA                                                              = "1.2.840.113549.1.7.1"
	SzOID_PKCS_7_DIGESTED                                                          = "1.2.840.113549.1.7.5"
	SzOID_PKCS_7_ENCRYPTED                                                         = "1.2.840.113549.1.7.6"
	SzOID_PKCS_7_ENVELOPED                                                         = "1.2.840.113549.1.7.3"
	SzOID_PKCS_7_SIGNED                                                            = "1.2.840.113549.1.7.2"
	SzOID_PKCS_7_SIGNEDANDENVELOPED                                                = "1.2.840.113549.1.7.4"
	SzOID_PKCS_8                                                                   = "1.2.840.113549.1.8"
	SzOID_PKCS_9                                                                   = "1.2.840.113549.1.9"
	SzOID_PKCS_9_CONTENT_TYPE                                                      = "1.2.840.113549.1.9.3"
	SzOID_PKCS_9_MESSAGE_DIGEST                                                    = "1.2.840.113549.1.9.4"
	SzOID_PKINIT_KP_KDC                                                            = "1.3.6.1.5.2.3.5"
	SzOID_PKIX                                                                     = "1.3.6.1.5.5.7"
	SzOID_PKIX_ACC_DESCR                                                           = "1.3.6.1.5.5.7.48"
	SzOID_PKIX_CA_ISSUERS                                                          = "1.3.6.1.5.5.7.48.2"
	SzOID_PKIX_CA_REPOSITORY                                                       = "1.3.6.1.5.5.7.48.5"
	SzOID_PKIX_KP                                                                  = "1.3.6.1.5.5.7.3"
	SzOID_PKIX_KP_CLIENT_AUTH                                                      = "1.3.6.1.5.5.7.3.2"
	SzOID_PKIX_KP_CODE_SIGNING                                                     = "1.3.6.1.5.5.7.3.3"
	SzOID_PKIX_KP_EMAIL_PROTECTION                                                 = "1.3.6.1.5.5.7.3.4"
	SzOID_PKIX_KP_IPSEC_END_SYSTEM                                                 = "1.3.6.1.5.5.7.3.5"
	SzOID_PKIX_KP_IPSEC_TUNNEL                                                     = "1.3.6.1.5.5.7.3.6"
	SzOID_PKIX_KP_IPSEC_USER                                                       = "1.3.6.1.5.5.7.3.7"
	SzOID_PKIX_KP_OCSP_SIGNING                                                     = "1.3.6.1.5.5.7.3.9"
	SzOID_PKIX_KP_SERVER_AUTH                                                      = "1.3.6.1.5.5.7.3.1"
	SzOID_PKIX_KP_TIMESTAMP_SIGNING                                                = "1.3.6.1.5.5.7.3.8"
	SzOID_PKIX_NO_SIGNATURE                                                        = "1.3.6.1.5.5.7.6.2"
	SzOID_PKIX_OCSP                                                                = "1.3.6.1.5.5.7.48.1"
	SzOID_PKIX_OCSP_BASIC_SIGNED_RESPONSE                                          = "1.3.6.1.5.5.7.48.1.1"
	SzOID_PKIX_OCSP_NOCHECK                                                        = "1.3.6.1.5.5.7.48.1.5"
	SzOID_PKIX_OCSP_NONCE                                                          = "1.3.6.1.5.5.7.48.1.2"
	SzOID_PKIX_PE                                                                  = "1.3.6.1.5.5.7.1"
	SzOID_PKIX_POLICY_QUALIFIER_CPS                                                = "1.3.6.1.5.5.7.2.1"
	SzOID_PKIX_POLICY_QUALIFIER_USERNOTICE                                         = "1.3.6.1.5.5.7.2.2"
	SzOID_PKIX_TIME_STAMPING                                                       = "1.3.6.1.5.5.7.48.3"
	SzOID_PLATFORM_MANIFEST_BINARY_ID                                              = "1.3.6.1.4.1.311.10.3.28"
	SzOID_POLICY_CONSTRAINTS                                                       = "2.5.29.36"
	SzOID_POLICY_MAPPINGS                                                          = "2.5.29.33"
	SzOID_POSTAL_ADDRESS                                                           = "2.5.4.16"
	SzOID_POSTAL_CODE                                                              = "2.5.4.17"
	SzOID_POST_OFFICE_BOX                                                          = "2.5.4.18"
	SzOID_PREFERRED_DELIVERY_METHOD                                                = "2.5.4.28"
	SzOID_PRESENTATION_ADDRESS                                                     = "2.5.4.29"
	SzOID_PRIVATEKEY_USAGE_PERIOD                                                  = "2.5.29.16"
	SzOID_PRODUCT_UPDATE                                                           = "1.3.6.1.4.1.311.31.1"
	SzOID_PROTECTED_PROCESS_LIGHT_SIGNER                                           = "1.3.6.1.4.1.311.10.3.22"
	SzOID_PROTECTED_PROCESS_SIGNER                                                 = "1.3.6.1.4.1.311.10.3.24"
	SzOID_QC_EU_COMPLIANCE                                                         = "0.4.0.1862.1.1"
	SzOID_QC_SSCD                                                                  = "0.4.0.1862.1.4"
	SzOID_QC_STATEMENTS_EXT                                                        = "1.3.6.1.5.5.7.1.3"
	SzOID_RDN_DUMMY_SIGNER                                                         = "1.3.6.1.4.1.311.21.9"
	SzOID_RDN_TCG_PLATFORM_MANUFACTURER                                            = "2.23.133.2.4"
	SzOID_RDN_TCG_PLATFORM_MODEL                                                   = "2.23.133.2.5"
	SzOID_RDN_TCG_PLATFORM_VERSION                                                 = "2.23.133.2.6"
	SzOID_RDN_TPM_MANUFACTURER                                                     = "2.23.133.2.1"
	SzOID_RDN_TPM_MODEL                                                            = "2.23.133.2.2"
	SzOID_RDN_TPM_VERSION                                                          = "2.23.133.2.3"
	SzOID_REASON_CODE_HOLD                                                         = "2.5.29.23"
	SzOID_REGISTERED_ADDRESS                                                       = "2.5.4.26"
	SzOID_REMOVE_CERTIFICATE                                                       = "1.3.6.1.4.1.311.10.8.1"
	SzOID_RENEWAL_CERTIFICATE                                                      = "1.3.6.1.4.1.311.13.1"
	SzOID_REQUEST_CLIENT_INFO                                                      = "1.3.6.1.4.1.311.21.20"
	SzOID_REQUIRE_CERT_CHAIN_POLICY                                                = "1.3.6.1.4.1.311.21.15"
	SzOID_REVOKED_LIST_SIGNER                                                      = "1.3.6.1.4.1.311.10.3.19"
	SzOID_RFC3161_counterSign                                                      = "1.3.6.1.4.1.311.3.3.1"
	SzOID_ROLE_OCCUPANT                                                            = "2.5.4.33"
	SzOID_ROOT_LIST_SIGNER                                                         = "1.3.6.1.4.1.311.10.3.9"
	SzOID_ROOT_PROGRAM_AUTO_UPDATE_CA_REVOCATION                                   = "1.3.6.1.4.1.311.60.3.1"
	SzOID_ROOT_PROGRAM_AUTO_UPDATE_END_REVOCATION                                  = "1.3.6.1.4.1.311.60.3.2"
	SzOID_ROOT_PROGRAM_FLAGS                                                       = "1.3.6.1.4.1.311.60.1.1"
	SzOID_ROOT_PROGRAM_NO_OCSP_FAILOVER_TO_CRL                                     = "1.3.6.1.4.1.311.60.3.3"
	SzOID_RSA                                                                      = "1.2.840.113549"
	SzOID_RSAES_OAEP                                                               = "1.2.840.113549.1.1.7"
	SzOID_RSA_DES_EDE3_CBC                                                         = "1.2.840.113549.3.7"
	SzOID_RSA_DH                                                                   = "1.2.840.113549.1.3.1"
	SzOID_RSA_ENCRYPT                                                              = "1.2.840.113549.3"
	SzOID_RSA_HASH                                                                 = "1.2.840.113549.2"
	SzOID_RSA_MD2                                                                  = "1.2.840.113549.2.2"
	SzOID_RSA_MD2RSA                                                               = "1.2.840.113549.1.1.2"
	SzOID_RSA_MD4                                                                  = "1.2.840.113549.2.4"
	SzOID_RSA_MD4RSA                                                               = "1.2.840.113549.1.1.3"
	SzOID_RSA_MD5                                                                  = "1.2.840.113549.2.5"
	SzOID_RSA_MD5RSA                                                               = "1.2.840.113549.1.1.4"
	SzOID_RSA_MGF1                                                                 = "1.2.840.113549.1.1.8"
	SzOID_RSA_PSPECIFIED                                                           = "1.2.840.113549.1.1.9"
	SzOID_RSA_RC2CBC                                                               = "1.2.840.113549.3.2"
	SzOID_RSA_RC4                                                                  = "1.2.840.113549.3.4"
	SzOID_RSA_RC5_CBCPad                                                           = "1.2.840.113549.3.9"
	SzOID_RSA_RSA                                                                  = "1.2.840.113549.1.1.1"
	SzOID_RSA_SETOAEP_RSA                                                          = "1.2.840.113549.1.1.6"
	SzOID_RSA_SHA1RSA                                                              = "1.2.840.113549.1.1.5"
	SzOID_RSA_SHA256RSA                                                            = "1.2.840.113549.1.1.11"
	SzOID_RSA_SHA384RSA                                                            = "1.2.840.113549.1.1.12"
	SzOID_RSA_SHA512RSA                                                            = "1.2.840.113549.1.1.13"
	SzOID_RSA_SMIMECapabilities                                                    = "1.2.840.113549.1.9.15"
	SzOID_RSA_SMIMEalg                                                             = "1.2.840.113549.1.9.16.3"
	SzOID_RSA_SMIMEalgCMS3DESwrap                                                  = "1.2.840.113549.1.9.16.3.6"
	SzOID_RSA_SMIMEalgCMSRC2wrap                                                   = "1.2.840.113549.1.9.16.3.7"
	SzOID_RSA_SMIMEalgESDH                                                         = "1.2.840.113549.1.9.16.3.5"
	SzOID_RSA_SSA_PSS                                                              = "1.2.840.113549.1.1.10"
	SzOID_RSA_certExtensions                                                       = "1.2.840.113549.1.9.14"
	SzOID_RSA_challengePwd                                                         = "1.2.840.113549.1.9.7"
	SzOID_RSA_contentType                                                          = "1.2.840.113549.1.9.3"
	SzOID_RSA_counterSign                                                          = "1.2.840.113549.1.9.6"
	SzOID_RSA_data                                                                 = "1.2.840.113549.1.7.1"
	SzOID_RSA_digestedData                                                         = "1.2.840.113549.1.7.5"
	SzOID_RSA_emailAddr                                                            = "1.2.840.113549.1.9.1"
	SzOID_RSA_encryptedData                                                        = "1.2.840.113549.1.7.6"
	SzOID_RSA_envelopedData                                                        = "1.2.840.113549.1.7.3"
	SzOID_RSA_extCertAttrs                                                         = "1.2.840.113549.1.9.9"
	SzOID_RSA_hashedData                                                           = "1.2.840.113549.1.7.5"
	SzOID_RSA_messageDigest                                                        = "1.2.840.113549.1.9.4"
	SzOID_RSA_preferSignedData                                                     = "1.2.840.113549.1.9.15.1"
	SzOID_RSA_signEnvData                                                          = "1.2.840.113549.1.7.4"
	SzOID_RSA_signedData                                                           = "1.2.840.113549.1.7.2"
	SzOID_RSA_signingTime                                                          = "1.2.840.113549.1.9.5"
	SzOID_RSA_unstructAddr                                                         = "1.2.840.113549.1.9.8"
	SzOID_RSA_unstructName                                                         = "1.2.840.113549.1.9.2"
	SzOID_SEARCH_GUIDE                                                             = "2.5.4.14"
	SzOID_SEE_ALSO                                                                 = "2.5.4.34"
	SzOID_SERIALIZED                                                               = "1.3.6.1.4.1.311.10.3.3.1"
	SzOID_SERVER_GATED_CRYPTO                                                      = "1.3.6.1.4.1.311.10.3.3"
	SzOID_SGC_NETSCAPE                                                             = "2.16.840.1.113730.4.1"
	SzOID_SITE_PIN_RULES_FLAGS_ATTR                                                = "1.3.6.1.4.1.311.10.4.3"
	SzOID_SITE_PIN_RULES_INDEX_ATTR                                                = "1.3.6.1.4.1.311.10.4.2"
	SzOID_SORTED_CTL                                                               = "1.3.6.1.4.1.311.10.1.1"
	SzOID_STATE_OR_PROVINCE_NAME                                                   = "2.5.4.8"
	SzOID_STREET_ADDRESS                                                           = "2.5.4.9"
	SzOID_SUBJECT_ALT_NAME                                                         = "2.5.29.7"
	SzOID_SUBJECT_ALT_NAME2                                                        = "2.5.29.17"
	SzOID_SUBJECT_DIR_ATTRS                                                        = "2.5.29.9"
	SzOID_SUBJECT_INFO_ACCESS                                                      = "1.3.6.1.5.5.7.1.11"
	SzOID_SUBJECT_KEY_IDENTIFIER                                                   = "2.5.29.14"
	SzOID_SUPPORTED_APPLICATION_CONTEXT                                            = "2.5.4.30"
	SzOID_SUR_NAME                                                                 = "2.5.4.4"
	SzOID_SYNC_ROOT_CTL_EXT                                                        = "1.3.6.1.4.1.311.10.3.50"
	SzOID_TELEPHONE_NUMBER                                                         = "2.5.4.20"
	SzOID_TELETEXT_TERMINAL_IDENTIFIER                                             = "2.5.4.22"
	SzOID_TELEX_NUMBER                                                             = "2.5.4.21"
	SzOID_TIMESTAMP_TOKEN                                                          = "1.2.840.113549.1.9.16.1.4"
	SzOID_TITLE                                                                    = "2.5.4.12"
	SzOID_TLS_FEATURES_EXT                                                         = "1.3.6.1.5.5.7.1.24"
	SzOID_USER_CERTIFICATE                                                         = "2.5.4.36"
	SzOID_USER_PASSWORD                                                            = "2.5.4.35"
	SzOID_VERISIGN_BITSTRING_6_13                                                  = "2.16.840.1.113733.1.6.13"
	SzOID_VERISIGN_ISS_STRONG_CRYPTO                                               = "2.16.840.1.113733.1.8.1"
	SzOID_VERISIGN_ONSITE_JURISDICTION_HASH                                        = "2.16.840.1.113733.1.6.11"
	SzOID_VERISIGN_PRIVATE_6_9                                                     = "2.16.840.1.113733.1.6.9"
	SzOID_WHQL_CRYPTO                                                              = "1.3.6.1.4.1.311.10.3.5"
	SzOID_WINDOWS_KITS_SIGNER                                                      = "1.3.6.1.4.1.311.10.3.20"
	SzOID_WINDOWS_RT_SIGNER                                                        = "1.3.6.1.4.1.311.10.3.21"
	SzOID_WINDOWS_SOFTWARE_EXTENSION_SIGNER                                        = "1.3.6.1.4.1.311.10.3.26"
	SzOID_WINDOWS_STORE_SIGNER                                                     = "1.3.6.1.4.1.311.76.3.1"
	SzOID_WINDOWS_TCB_SIGNER                                                       = "1.3.6.1.4.1.311.10.3.23"
	SzOID_WINDOWS_THIRD_PARTY_COMPONENT_SIGNER                                     = "1.3.6.1.4.1.311.10.3.25"
	SzOID_X21_ADDRESS                                                              = "2.5.4.24"
	SzOID_X957                                                                     = "1.2.840.10040"
	SzOID_X957_DSA                                                                 = "1.2.840.10040.4.1"
	SzOID_X957_SHA1DSA                                                             = "1.2.840.10040.4.3"
	SzOID_YESNO_TRUST_ATTR                                                         = "1.3.6.1.4.1.311.10.4.1"
	SzPRIV_KEY_CACHE_MAX_ITEMS                                                     = "PrivKeyCacheMaxItems"
	SzPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS                                        = "PrivKeyCachePurgeIntervalSeconds"
	Sz_CERT_STORE_PROV_COLLECTION                                                  = "Collection"
	Sz_CERT_STORE_PROV_FILENAME_W                                                  = "File"
	Sz_CERT_STORE_PROV_LDAP_W                                                      = "Ldap"
	Sz_CERT_STORE_PROV_MEMORY                                                      = "Memory"
	Sz_CERT_STORE_PROV_PHYSICAL_W                                                  = "Physical"
	Sz_CERT_STORE_PROV_PKCS12                                                      = "PKCS12"
	Sz_CERT_STORE_PROV_PKCS7                                                       = "PKCS7"
	Sz_CERT_STORE_PROV_SERIALIZED                                                  = "Serialized"
	Sz_CERT_STORE_PROV_SMART_CARD_W                                                = "SmartCard"
	Sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W                                           = "SystemRegistry"
	Sz_CERT_STORE_PROV_SYSTEM_W                                                    = "System"
	Tag_inner_PROPVARIANT                                                          = 0
	LIBRARY_SIZE                                                                   = 64
	NUMPROCESSORS                                                                  = 15
	INTERVAL_TIMER                                                                 = 1
	WM_WAKEUP                                                                      = 1024
	APPL_DOS                                                                       = 1
	APPL_NONE                                                                      = 0
	APPL_WIN32                                                                     = 3
	APPL_WIN3X                                                                     = 2
	PIPE_ASYNC                                                                     = 2
	PIPE_EOF                                                                       = 4
	PIPE_EXTRABYTE                                                                 = 8
	PIPE_PENDING                                                                   = 1
	WIN_FILE                                                                       = 3
	MAX_KEY_LENGTH                                                                 = 256
	REG_CREATE                                                                     = 1
	SERIAL_ASYNC                                                                   = 2
	SERIAL_DEFAULT_BLOCKTIME                                                       = 10
	SERIAL_EOF                                                                     = 4
	SERIAL_ERROR                                                                   = 16
	SERIAL_PENDING                                                                 = 1
	SERIAL_READ_ERRORS                                                             = 31
	SERIAL_WRITE_ERRORS                                                            = 768
	SELECT                                                                         = 1
	SOCKET_EOF                                                                     = 4
	SOCKET_MESSAGE                                                                 = 1025
	SOCKET_PENDING                                                                 = 8
	SOCKET_SELECT                                                                  = 1026
	SOCKET_TERMINATE                                                               = 1027
	SOCK_TEMPLATE                                                                  = "sock%p"
	SUPPRESS_RDNS_VAR                                                              = "::tcl::unsupported::noReverseDNS"
	TCP_ASYNC_CONNECT                                                              = 2
	TCP_ASYNC_FAILED                                                               = 32
	TCP_ASYNC_PENDING                                                              = 16
	TCP_BUFFER_SIZE                                                                = 4096
	TCP_NONBLOCKING                                                                = 1
	UNSELECT                                                                       = 0
	WIN_THREAD_BLOCKED                                                             = 0x2
	WIN_THREAD_RUNNING                                                             = 0x1
	WIN_THREAD_UNINIT                                                              = 0x0
	LOCALTIME_VALIDITY_BOUNDARY                                                    = 0
	SAMPLES                                                                        = 64
	SECSPER4YEAR                                                                   = 126230400
	SECSPERYEAR                                                                    = 31536000
	ASYNC                                                                          = 0x01
	BUFFER_SIZE_LIMIT                                                              = 0xFFFF
	DEFAULT_BUFFER_SIZE                                                            = 4096
	DICT_TO_SET                                                                    = 0x1
	IN_HEADER                                                                      = 0x02
	MAX_BUFFER_SIZE                                                                = 65536
	MAX_COMMENT_LEN                                                                = 256
	MIN_NONSTREAM_BUFFER_SIZE                                                      = 16
	OUT_HEADER                                                                     = 0x04
	STREAM_DECOMPRESS                                                              = 0x08
	STREAM_DONE                                                                    = 0x10
	TCL_ZLIB_VERSION                                                               = "2.0.1"
	WBITS_AUTODETECT                                                               = 47
	WBITS_GZIP                                                                     = 31
	WBITS_RAW                                                                      = -15
	WBITS_ZLIB                                                                     = 15
	DIST_CODE_LEN                                                                  = 512
	END_BLOCK                                                                      = 256
	MAX_BL_BITS                                                                    = 7
	REPZ_11_138                                                                    = 18
	REPZ_3_10                                                                      = 17
	REP_3_6                                                                        = 16
	SMALLEST                                                                       = 1
	COPY1                                                                          = 1
	EDEADLOCK                                                                      = 36
	GZBUFSIZE                                                                      = 8192
	GZ_APPEND                                                                      = 1
	GZ_NONE                                                                        = 0
	GZ_READ                                                                        = 7247
	GZ_WRITE                                                                       = 31153
	HAVE_VSNPRINTF                                                                 = 0
	LOOK                                                                           = 0
	WIDECHAR                                                                       = 0
	X_POSIX_SOURCE                                                                 = 0
)

//
//   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.
//

// ===========================================================================
//  Function prototypes.
const ( /* deflate.c:66:1: */
	Need_more      = 0 // block not completed, need more input or more output
	Block_done     = 1 // block flush performed
	Finish_started = 2 // finish started, need only more output at next deflate
	Finish_done    = 3
)

// inflate.h -- internal inflate state definition
// Copyright (C) 1995-2016 Mark Adler
// For conditions of distribution and use, see copyright notice in zlib.h

// WARNING: this file should *not* be used by applications. It is
//    part of the implementation of the compression library and is
//    subject to change. Applications should only use zlib.h.
//

// define NO_GZIP when compiling if you want to disable gzip header and
//    trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
//    the crc code when it is not needed.  For shared libraries, gzip decoding
//    should be left enabled.

// Possible inflate modes between inflate() calls
const ( /* inflate.h:20:1: */
	HEAD     = 16180 // i: waiting for magic header
	FLAGS    = 16181 // i: waiting for method and flags (gzip)
	TIME     = 16182 // i: waiting for modification time (gzip)
	OS       = 16183 // i: waiting for extra flags and operating system (gzip)
	EXLEN    = 16184 // i: waiting for extra length (gzip)
	EXTRA    = 16185 // i: waiting for extra bytes (gzip)
	NAME     = 16186 // i: waiting for end of file name (gzip)
	COMMENT  = 16187 // i: waiting for end of comment (gzip)
	HCRC     = 16188 // i: waiting for header crc (gzip)
	DICTID   = 16189 // i: waiting for dictionary check value
	DICT     = 16190 // waiting for inflateSetDictionary() call
	TYPE     = 16191 // i: waiting for type bits, including last-flag bit
	TYPEDO   = 16192 // i: same, but skip check to exit inflate on new block
	STORED   = 16193 // i: waiting for stored size (length and complement)
	COPY_    = 16194 // i/o: same as COPY below, but only first time in
	COPY     = 16195 // i/o: waiting for input or output to copy stored block
	TABLE1   = 16196 // i: waiting for dynamic block table lengths
	LENLENS  = 16197 // i: waiting for code length code lengths
	CODELENS = 16198 // i: waiting for length/lit and distance code lengths
	LEN_     = 16199 // i: same as LEN below, but only first time in
	LEN      = 16200 // i: waiting for length/lit/eob code
	LENEXT   = 16201 // i: waiting for length extra bits
	DIST     = 16202 // i: waiting for distance code
	DISTEXT  = 16203 // i: waiting for distance extra bits
	MATCH    = 16204 // o: waiting for output space to copy string
	LIT      = 16205 // o: waiting for output space to write literal
	CHECK    = 16206 // i: waiting for 32-bit check value
	LENGTH   = 16207 // i: waiting for 32-bit length (gzip)
	DONE     = 16208 // finished check, done -- remain here until reset
	BAD      = 16209 // got a data error -- remain here until reset
	MEM      = 16210 // got an inflate() memory error -- remain here until reset
	SYNC     = 16211
)

// op values as set by inflate_table():
//     00000000 - literal
//     0000tttt - table link, tttt != 0 is the number of table index bits
//     0001eeee - length or distance, eeee is the number of extra bits
//     01100000 - end of block
//     01000000 - invalid code
//

// Maximum size of the dynamic table.  The maximum number of code structures is
//    1444, which is the sum of 852 for literal/length codes and 592 for distance
//    codes.  These values were found by exhaustive searches using the program
//    examples/enough.c found in the zlib distribtution.  The arguments to that
//    program are the number of symbols, the initial root table size, and the
//    maximum bit length of a code.  "enough 286 9 15" for literal/length codes
//    returns returns 852, and "enough 30 6 15" for distance codes returns 592.
//    The initial root table size (9 or 6) is found in the fifth argument of the
//    inflate_table() calls in inflate.c and infback.c.  If the root table size is
//    changed, then these maximum sizes would be need to be recalculated and
//    updated.

// Type of code to build for inflate_table()
const ( /* inftrees.h:54:1: */
	CODES = 0
	LENS  = 1
	DISTS = 2
)

// Positions to pass to Tcl_QueueEvent:

const ( /* tcl.h:1402:1: */
	TCL_QUEUE_TAIL = 0
	TCL_QUEUE_HEAD = 1
	TCL_QUEUE_MARK = 2
)

// The following flags determine whether the blockModeProc above should set
// the channel into blocking or nonblocking mode. They are passed as arguments
// to the blockModeProc function in the above structure.

//----------------------------------------------------------------------------
// Enum for different types of file paths.

const ( /* tcl.h:1624:1: */
	TCL_PATH_ABSOLUTE        = 0
	TCL_PATH_RELATIVE        = 1
	TCL_PATH_VOLUME_RELATIVE = 2
)

//----------------------------------------------------------------------------
// When a TCL command returns, the interpreter contains a result from the
// command. Programmers are strongly encouraged to use one of the functions
// Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's
// result. See the SetResult man page for details. Besides this result, the
// command function returns an integer code, which is one of the following:
//
// TCL_OK		Command completed normally; the interpreter's result
//			contains the command's result.
// TCL_ERROR		The command couldn't be completed successfully; the
//			interpreter's result describes what went wrong.
// TCL_RETURN		The command requests that the current function return;
//			the interpreter's result contains the function's
//			return value.
// TCL_BREAK		The command requests that the innermost loop be
//			exited; the interpreter's result is meaningless.
// TCL_CONTINUE		Go on to the next iteration of the current loop; the
//			interpreter's result is meaningless.

//----------------------------------------------------------------------------
// Flags to control what substitutions are performed by Tcl_SubstObj():

// Argument descriptors for math function callbacks in expressions:

const ( /* tcl.h:705:1: */
	TCL_INT      = 0
	TCL_DOUBLE   = 1
	TCL_EITHER   = 2
	TCL_WIDE_INT = 3
)

// Flags that pertain to a basic block.

const ( /* tclAssembly.c:112:1: */
	BB_VISITED = 1 // Block has been visited in the current
	// traversal
	BB_FALLTHRU = 2 // Control may pass from this block to a
	// successor
	BB_JUMP1 = 4 // Basic block ends with a 1-byte-offset jump
	// and may need expansion
	BB_JUMPTABLE  = 8  // Basic block ends with a jump table
	BB_BEGINCATCH = 16 // Block ends with a 'beginCatch' instruction,
	// marking it as the start of a 'catch'
	// sequence. The 'jumpTarget' is the exception
	// exit from the catch block.
	BB_ENDCATCH = 32
)

// Source instruction type recognized by the assembler.

const ( /* tclAssembly.c:133:1: */
	ASSEM_1BYTE       = 0 // Fixed arity, 1-byte instruction
	ASSEM_BEGIN_CATCH = 1 // Begin catch: one 4-byte jump offset to be
	// converted to appropriate exception
	// ranges
	ASSEM_BOOL       = 2 // One Boolean operand
	ASSEM_BOOL_LVT4  = 3 // One Boolean, one 4-byte LVT ref.
	ASSEM_CLOCK_READ = 4 // 1-byte unsigned-integer case number, in the
	// range 0-3
	ASSEM_CONCAT1 = 5 // 1-byte unsigned-integer operand count, must
	// be strictly positive, consumes N, produces
	// 1
	ASSEM_DICT_GET = 6 // 'dict get' and related - consumes N+1
	// operands, produces 1, N > 0
	ASSEM_DICT_SET = 7 // specifies key count and LVT index, consumes
	// N+1 operands, produces 1, N > 0
	ASSEM_DICT_UNSET = 8 // specifies key count and LVT index, consumes
	// N operands, produces 1, N > 0
	ASSEM_END_CATCH = 9 // End catch. No args. Exception range popped
	// from stack and stack pointer restored.
	ASSEM_EVAL = 10 // 'eval' - evaluate a constant script (by
	// compiling it in line with the assembly
	// code! I love Tcl!)
	ASSEM_INDEX  = 11 // 4 byte operand, integer or end-integer
	ASSEM_INVOKE = 12 // 1- or 4-byte operand count, must be
	// strictly positive, consumes N, produces
	// 1.
	ASSEM_JUMP      = 13 // Jump instructions
	ASSEM_JUMP4     = 14 // Jump instructions forcing a 4-byte offset
	ASSEM_JUMPTABLE = 15 // Jumptable (switch -exact)
	ASSEM_LABEL     = 16 // The assembly directive that defines a
	// label
	ASSEM_LINDEX_MULTI = 17 // 4-byte operand count, must be strictly
	// positive, consumes N, produces 1
	ASSEM_LIST = 18 // 4-byte operand count, must be nonnegative,
	// consumses N, produces 1
	ASSEM_LSET_FLAT = 19 // 4-byte operand count, must be >= 3,
	// consumes N, produces 1
	ASSEM_LVT = 20 // One operand that references a local
	// variable
	ASSEM_LVT1 = 21 // One 1-byte operand that references a local
	// variable
	ASSEM_LVT1_SINT1 = 22 // One 1-byte operand that references a local
	// variable, one signed-integer 1-byte
	// operand
	ASSEM_LVT4 = 23 // One 4-byte operand that references a local
	// variable
	ASSEM_OVER = 24 // OVER: 4-byte operand count, consumes N+1,
	// produces N+2
	ASSEM_PUSH   = 25 // one literal operand
	ASSEM_REGEXP = 26 // One Boolean operand, but weird mapping to
	// call flags
	ASSEM_REVERSE = 27 // REVERSE: 4-byte operand count, consumes N,
	// produces N
	ASSEM_SINT1 = 28 // One 1-byte signed-integer operand
	// (INCR_STK_IMM)
	ASSEM_SINT4_LVT4 = 29
)

// State identified for a basic block's catch context.

const ( /* tclAssembly.c:49:1: */
	BBCS_UNKNOWN = 0 // Catch context has not yet been identified
	BBCS_NONE    = 1 // Block is outside of any catch
	BBCS_INCATCH = 2 // Block is within a catch context
	BBCS_CAUGHT  = 3
)

// Enumeration of the string literals used in [clock]

const ( /* tclClock.c:58:1: */
	LIT__NIL                        = 0
	LIT__DEFAULT_FORMAT             = 1
	LIT_BCE                         = 2
	LIT_C                           = 3
	LIT_CANNOT_USE_GMT_AND_TIMEZONE = 4
	LIT_CE                          = 5
	LIT_DAYOFMONTH                  = 6
	LIT_DAYOFWEEK                   = 7
	LIT_DAYOFYEAR                   = 8
	LIT_ERA                         = 9
	LIT_GMT                         = 10
	LIT_GREGORIAN                   = 11
	LIT_INTEGER_VALUE_TOO_LARGE     = 12
	LIT_ISO8601WEEK                 = 13
	LIT_ISO8601YEAR                 = 14
	LIT_JULIANDAY                   = 15
	LIT_LOCALSECONDS                = 16
	LIT_MONTH                       = 17
	LIT_SECONDS                     = 18
	LIT_TZNAME                      = 19
	LIT_TZOFFSET                    = 20
	LIT_YEAR                        = 21
	LIT__END                        = 22
)

// Readable macros to test whether a "pointer" value points to an operator.
// They operate on the "non-negative integer -> operator; negative integer ->
// a non-operator OperandType" distinction.

// Note that it is sufficient to store in the tree just the type of leaf
// operand, without any explicit pointer to which leaf. This is true because
// the traversals of the completed tree we perform are known to visit the
// leaves in the same order as the original parse.
//
// In a completed parse tree, those OpNodes that are themselves (roots of
// subexpression trees that are) operands of some operator store in their
// p.parent field a "pointer" to the OpNode of that operator. The p.parent
// field permits a traversal of the tree within a non-recursive routine
// (ConvertTreeToTokens() and CompileExprTree()). This means that even
// expression trees of great depth pose no risk of blowing the C stack.
//
// While the parse tree is being constructed, the same memory space is used to
// hold the p.prev field which chains together a stack of incomplete trees
// awaiting their right operands.
//
// The lexeme field is filled in with the lexeme of the operator that is
// returned by the ParseLexeme() routine. Only lexemes for unary and binary
// operators get stored in an OpNode. Other lexmes get different treatement.
//
// The precedence field provides a place to store the precedence of the
// operator, so it need not be looked up again and again.
//
// The mark field is use to control the traversal of the tree, so that it can
// be done non-recursively. The mark values are:

const ( /* tclCompExpr.c:108:1: */
	MARK_LEFT   = 0 // Next step of traversal is to visit left subtree
	MARK_RIGHT  = 1 // Next step of traversal is to visit right subtree
	MARK_PARENT = 2
)

// The constant field is a boolean flag marking which subexpressions are
// completely known at compile time, and are eligible for computing then
// rather than waiting until run time.

// Each lexeme belongs to one of four categories, which determine its place in
// the parse tree. We use the two high bits of the (unsigned char) value to
// store a NODE_TYPE code.

// The four category values are LEAF, UNARY, and BINARY, explained below, and
// "uncategorized", which is used either temporarily, until context determines
// which of the other three categories is correct, or for lexemes like
// INVALID, which aren't really lexemes at all, but indicators of a parsing
// error. Note that the codes must be distinct to distinguish categories, but
// need not take the form of a bit array.

// Uncategorized lexemes

// Leaf lexemes

// For literal numbers
// Script substitution; [foo]
// For literal booleans
// Braced string; {foo bar}
// Variable substitution; $x
// Quoted string; "foo $bar [soom]"
// Used only for an empty argument list to a
// function. Represents the empty string
// within parens in the expression: rand()

// Unary operator lexemes

// This is a bit of "creative interpretation"
// on the part of the parser. A function call
// is parsed into the parse tree according to
// the perspective that the function name is a
// unary operator and its argument list,
// enclosed in parens, is its operand. The
// additional requirements not implied
// generally by treatment as a unary operator
// -- for example, the requirement that the
// operand be enclosed in parens -- are hard
// coded in the relevant portions of
// ParseExpr(). We trade off the need to
// include such exceptional handling in the
// code against the need we would otherwise
// have for more lexeme categories.
// This lexeme isn't parsed from the
// expression text at all. It represents the
// start of the expression and sits at the
// root of the parse tree where it serves as
// the start/end point of traversals.
// Another bit of creative interpretation,
// where we treat "(" as a unary operator with
// the sub-expression between it and its
// matching ")" as its operand. See
// CLOSE_PAREN below.

// Binary operator lexemes

// The "," operator is a low precedence binary
// operator that separates the arguments in a
// function call. The additional constraint
// that this operator can only legally appear
// at the right places within a function call
// argument list are hard coded within
// ParseExpr().
// These two lexemes make up the
// ternary conditional operator, $x ? $y : $z.
// We treat them as two binary operators to
// avoid another lexeme category, and code the
// additional constraints directly in
// ParseExpr(). For instance, the right
// operand of a "?" operator must be a ":"
// operator.
// Unlike the other binary operators, EXPON is
// right associative and this distinction is
// coded directly in ParseExpr().
// By categorizing the CLOSE_PAREN lexeme as a
// BINARY operator, the normal parsing rules
// for binary operators assure that a close
// paren will not directly follow another
// operator, and the machinery already in
// place to connect operands to operators
// according to precedence performs most of
// the work of matching open and close parens
// for us. In the end though, a close paren is
// not really a binary operator, and some
// special coding in ParseExpr() make sure we
// never put an actual CLOSE_PAREN node in the
// parse tree. The sub-expression between
// parens becomes the single argument of the
// matching OPEN_PAREN unary operator.
// This lexeme represents the end of the
// string being parsed. Treating it as a
// binary operator follows the same logic as
// the CLOSE_PAREN lexeme and END pairs with
// START, in the same way that CLOSE_PAREN
// pairs with OPEN_PAREN.

// When ParseExpr() builds the parse tree it must choose which operands to
// connect to which operators.  This is done according to operator precedence.
// The greater an operator's precedence the greater claim it has to link to an
// available operand.  The Precedence enumeration lists the precedence values
// used by Tcl expression operators, from lowest to highest claim.  Each
// precedence level is commented with the operators that hold that precedence.

const ( /* tclCompExpr.c:301:1: */
	PREC_END         = 1  // END
	PREC_START       = 2  // START
	PREC_CLOSE_PAREN = 3  // ")"
	PREC_OPEN_PAREN  = 4  // "("
	PREC_COMMA       = 5  // ","
	PREC_CONDITIONAL = 6  // "?", ":"
	PREC_OR          = 7  // "||"
	PREC_AND         = 8  // "&&"
	PREC_BIT_OR      = 9  // "|"
	PREC_BIT_XOR     = 10 // "^"
	PREC_BIT_AND     = 11 // "&"
	PREC_EQUAL       = 12 // "==", "!=", "eq", "ne", "in", "ni"
	PREC_COMPARE     = 13 // "<", ">", "<=", ">="
	PREC_SHIFT       = 14 // "<<", ">>"
	PREC_ADD         = 15 // "+", "-"
	PREC_MULT        = 16 // "*", "/", "%"
	PREC_EXPON       = 17 // "**"
	PREC_UNARY       = 18
)

// The storage for the tree is dynamically allocated array of OpNodes. The
// array is grown as parsing needs dictate according to a scheme similar to
// Tcl's string growth algorithm, so that the resizing costs are O(N) and so
// that we use at least half the memory allocated as expressions get large.
//
// Each OpNode in the tree represents an operator in the expression, either
// unary or binary. When parsing is completed successfully, a binary operator
// OpNode will have its left and right fields filled with "pointers" to its
// left and right operands. A unary operator OpNode will have its right field
// filled with a pointer to its single operand. When an operand is a
// subexpression the "pointer" takes the form of the index -- a non-negative
// integer -- into the OpNode storage array where the root of that
// subexpression parse tree is found.
//
// Non-operator elements of the expression do not get stored in the OpNode
// tree. They are stored in the other structures according to their type.
// Literal values get appended to the literal list. Elements that denote forms
// of quoting or substitution known to the Tcl parser get stored as
// Tcl_Tokens. These non-operator elements of the expression are the leaves of
// the completed parse tree. When an operand of an OpNode is one of these leaf
// elements, the following negative integer codes are used to indicate which
// kind of elements it is.

const ( /* tclCompExpr.c:63:1: */
	OT_LITERAL = -3 // Operand is a literal in the literal list
	OT_TOKENS  = -2 // Operand is sequence of Tcl_Tokens
	OT_EMPTY   = -1
)

//------------------------------------------------------------------------
// Data structures related to compilation.
//------------------------------------------------------------------------

// The structure used to implement Tcl "exceptions" (exceptional returns): for
// example, those generated in loops by the break and continue commands, and
// those generated by scripts and caught by the catch command. This
// ExceptionRange structure describes a range of code (e.g., a loop body), the
// kind of exceptions (e.g., a break or continue) that might occur, and the PC
// offsets to jump to if a matching exception does occur. Exception ranges can
// nest so this structure includes a nesting level that is used at runtime to
// find the closest exception range surrounding a PC. For example, when a
// break command is executed, the ExceptionRange structure for the most deeply
// nested loop, if any, is found and used. These structures are also generated
// for the "next" subcommands of for loops since a break there terminates the
// for command. This means a for command actually generates two LoopInfo
// structures.

const ( /* tclCompile.h:81:1: */
	LOOP_EXCEPTION_RANGE = 0 // Exception's range is part of a loop. Break
	// and continue "exceptions" cause jumps to
	// appropriate PC offsets.
	CATCH_EXCEPTION_RANGE = 1
)

// Opcodes for the Tcl bytecode instructions. These must correspond to the
// entries in the table of instruction descriptions, tclInstructionTable, in
// tclCompile.c. Also, the order and number of the expression opcodes (e.g.,
// INST_LOR) must match the entries in the array operatorStrings in
// tclExecute.c.

// Opcodes 0 to 9

// Opcodes 10 to 23

// Opcodes 24 to 33

// Opcodes 34 to 39

// Opcodes 40 to 64

// Opcodes 65 to 66

// Opcodes 67 to 68

// Opcodes 69 to 72

// Opcodes 73 to 78

// Opcodes 78 to 81

// Opcodes 82 to 87

// Opcodes 88 to 93

// TIP #22 - LINDEX operator with flat arg list

// TIP #33 - 'lset' command. Code gen also required a Forth-like
//	     OVER operation.

// TIP#90 - 'return' command.

// TIP#123 - exponentiation operator.

// TIP #157 - {*}... (word expansion) language syntax support.

// TIP #57 - 'lassign' command. Code generation requires immediate
//	     LINDEX and LRANGE operators.

// Dictionary (TIP#111) related commands.

// Instruction to support jumps defined by tables (instead of the classic
// [switch] technique of chained comparisons).

// Instructions to support compilation of global, variable, upvar and
// [namespace upvar].

// Instruction to support compiling syntax error to bytecode

// Instruction to reverse N items on top of stack

// regexp instruction

// For [info exists] compilation

// For [subst] compilation

// For [unset] compilation

// For [dict with], [dict exists], [dict create] and [dict merge]

// For [string map] and [regsub] compilation

// For operations to do with coroutines and other NRE-manipulators

// For compilation of basic information operations

// For compilation relating to TclOO

// For compilation of [array] subcommands

// New foreach implementation

// For compilation of [string trim] and related

// The last opcode

// Table describing the Tcl bytecode instructions: their name (for displaying
// code), total number of code bytes required (including operand bytes), and a
// description of the type of each operand. These operand types include signed
// and unsigned integers of length one and four bytes. The unsigned integers
// are used for indexes or for, e.g., the count of objects to push in a "push"
// instruction.

const ( /* tclCompile.h:840:1: */
	OPERAND_NONE  = 0
	OPERAND_INT1  = 1 // One byte signed integer.
	OPERAND_INT4  = 2 // Four byte signed integer.
	OPERAND_UINT1 = 3 // One byte unsigned integer.
	OPERAND_UINT4 = 4 // Four byte unsigned integer.
	OPERAND_IDX4  = 5 // Four byte signed index (actually an
	// integer, but displayed differently.)
	OPERAND_LVT1 = 6 // One byte unsigned index into the local
	// variable table.
	OPERAND_LVT4 = 7 // Four byte unsigned index into the local
	// variable table.
	OPERAND_AUX4 = 8 // Four byte unsigned index into the aux data
	// table.
	OPERAND_OFFSET1 = 9  // One byte signed jump offset.
	OPERAND_OFFSET4 = 10 // Four byte signed jump offset.
	OPERAND_LIT1    = 11 // One byte unsigned index into table of
	// literals.
	OPERAND_LIT4 = 12 // Four byte unsigned index into table of
	// literals.
	OPERAND_SCLS1 = 13
)

// Constants used by INST_STRING_CLASS to indicate character classes. These
// correspond closely by name with what [string is] can support, but there is
// no requirement to keep the values the same.

const ( /* tclCompile.h:884:1: */
	STR_CLASS_ALNUM   = 0 // Unicode alphabet or digit characters.
	STR_CLASS_ALPHA   = 1 // Unicode alphabet characters.
	STR_CLASS_ASCII   = 2 // Characters in range U+000000..U+00007F.
	STR_CLASS_CONTROL = 3 // Unicode control characters.
	STR_CLASS_DIGIT   = 4 // Unicode digit characters.
	STR_CLASS_GRAPH   = 5 // Unicode printing characters, excluding
	// space.
	STR_CLASS_LOWER = 6 // Unicode lower-case alphabet characters.
	STR_CLASS_PRINT = 7 // Unicode printing characters, including
	// spaces.
	STR_CLASS_PUNCT = 8  // Unicode punctuation characters.
	STR_CLASS_SPACE = 9  // Unicode space characters.
	STR_CLASS_UPPER = 10 // Unicode upper-case alphabet characters.
	STR_CLASS_WORD  = 11 // Unicode word (alphabetic, digit, connector
	// punctuation) characters.
	STR_CLASS_XDIGIT = 12
)

// Compilation of some Tcl constructs such as if commands and the logical or
// (||) and logical and (&&) operators in expressions requires the generation
// of forward jumps. Since the PC target of these jumps isn't known when the
// jumps are emitted, we record the offset of each jump in an array of
// JumpFixup structures. There is one array for each sequence of jumps to one
// target PC. When we learn the target PC, we update the jumps with the
// correct distance. Also, if the distance is too great (> 127 bytes), we
// replace the single-byte jump with a four byte jump instruction, move the
// instructions after the jump down, and update the code offsets for any
// commands between the jump and the target.

const ( /* tclCompile.h:925:1: */
	TCL_UNCONDITIONAL_JUMP = 0
	TCL_TRUE_JUMP          = 1
	TCL_FALSE_JUMP         = 2
) // Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Bison generates several labels that happen to be unused. MS Visual C++
// doesn't like that, and complains. Tell it to shut up.

// Meridian: am, pm, or 24-hour style.

const ( /* tclDate.c:101:1: */
	MERam = 0
	MERpm = 1
	MER24 = 2
)

// Daylight-savings mode: on, off, or not yet known.

const ( /* tclDate.c:206:1: */
	DSTon    = 0
	DSToff   = 1
	DSTmaybe = 2
)

// Enabling verbose error messages.

// Debug traces.

// Token type.
const ( /* tclDate.c:241:3: */
	TAGO        = 258
	TDAY        = 259
	TDAYZONE    = 260
	TID         = 261
	TMERIDIAN   = 262
	TMONTH      = 263
	TMONTH_UNIT = 264
	TSTARDATE   = 265
	TSEC_UNIT   = 266
	TSNUMBER    = 267
	TUNUMBER    = 268
	TZONE       = 269
	TEPOCH      = 270
	TDST        = 271
	TISOBASE    = 272
	TDAY_UNIT   = 273
	TNEXT       = 274
)
const ( /* tclEnsemble.c:53:1: */
	ENS_CONFIG = 0
	ENS_CREATE = 1
	ENS_EXISTS = 2
)
const ( /* tclEnsemble.c:61:1: */
	CRT_CMD     = 0
	CRT_MAP     = 1
	CRT_PARAM   = 2
	CRT_PREFIX  = 3
	CRT_SUBCMDS = 4
	CRT_UNKNOWN = 5
)
const ( /* tclEnsemble.c:69:1: */
	CONF_MAP       = 0
	CONF_NAMESPACE = 1
	CONF_PARAM     = 2
	CONF_PREFIX    = 3
	CONF_SUBCMDS   = 4
	CONF_UNKNOWN   = 5
)
const ( /* tclIORChan.c:157:1: */
	EVENT_READ  = 0
	EVENT_WRITE = 1
)
const ( /* tclIORChan.c:178:1: */
	METH_BLOCKING  = 0
	METH_CGET      = 1
	METH_CGETALL   = 2
	METH_CONFIGURE = 3
	METH_READ      = 6
	METH_SEEK      = 7
	METH_WATCH     = 8
)
const ( /* tclIORTrans.c:200:1: */
	METH_CLEAR = 0
	METH_DRAIN = 1
	METH_FLUSH = 3
	METH_LIMIT = 5
)

// TIP #268.
// Values for the selection mode, i.e the package require preferences.

const ( /* tclInt.h:1736:1: */
	PKG_PREFER_LATEST = 0
	PKG_PREFER_STABLE = 1
)

// Macros that use the TSD-ekeko.

// Macros for script cancellation support (TIP #285).

// Macros for splicing into and out of doubly linked lists. They assume
// existence of struct items 'prevPtr' and 'nextPtr'.
//
// a = element to add or remove.
// b = list head.
//
// TclSpliceIn adds to the head of the list.

// EvalFlag bits for Interp structures:
//
// TCL_ALLOW_EXCEPTIONS	1 means it's OK for the script to terminate with a
//			code other than TCL_OK or TCL_ERROR; 0 means codes
//			other than these should be turned into errors.

// Flag bits for Interp structures:
//
// DELETED:		Non-zero means the interpreter has been deleted:
//			don't process any more commands for it, and destroy
//			the structure as soon as all nested invocations of
//			Tcl_Eval are done.
// ERR_ALREADY_LOGGED:	Non-zero means information has already been logged in
//			iPtr->errorInfo for the current Tcl_Eval instance, so
//			Tcl_Eval needn't log it (used to implement the "error
//			message log" command).
// DONT_COMPILE_CMDS_INLINE: Non-zero means that the bytecode compiler should
//			not compile any commands into an inline sequence of
//			instructions. This is set 1, for example, when command
//			traces are requested.
// RAND_SEED_INITIALIZED: Non-zero means that the randSeed value of the interp
//			has not be initialized. This is set 1 when we first
//			use the rand() or srand() functions.
// SAFE_INTERP:		Non zero means that the current interp is a safe
//			interp (i.e. it has only the safe commands installed,
//			less privilege than a regular interp).
// INTERP_DEBUG_FRAME:	Used for switching on various extra interpreter
//			debug/info mechanisms (e.g. info frame eval/uplevel
//			tracing) which are performance intensive.
// INTERP_TRACE_IN_PROGRESS: Non-zero means that an interp trace is currently
//			active; so no further trace callbacks should be
//			invoked.
// INTERP_ALTERNATE_WRONG_ARGS: Used for listing second and subsequent forms
//			of the wrong-num-args string in Tcl_WrongNumArgs.
//			Makes it append instead of replacing and uses
//			different intermediate text.
// CANCELED:		Non-zero means that the script in progress should be
//			canceled as soon as possible. This can be checked by
//			extensions (and the core itself) by calling
//			Tcl_Canceled and checking if TCL_ERROR is returned.
//			This is a one-shot flag that is reset immediately upon
//			being detected; however, if the TCL_CANCEL_UNWIND flag
//			is set Tcl_Canceled will continue to report that the
//			script in progress has been canceled thereby allowing
//			the evaluation stack for the interp to be fully
//			unwound.
//
// WARNING: For the sake of some extensions that have made use of former
// internal values, do not re-use the flag values 2 (formerly ERR_IN_PROGRESS)
// or 8 (formerly ERROR_CODE_SET).

// Maximum number of levels of nesting permitted in Tcl commands (used to
// catch infinite recursion).

// The macro below is used to modify a "char" value (e.g. by casting it to an
// unsigned character) so that it can be used safely with macros such as
// isspace.

// This macro is used to properly align the memory allocated by Tcl, giving
// the same alignment as the native malloc.

// This macro is used to determine the offset needed to safely allocate any
// data structure in memory. Given a starting offset or size, it "rounds up"
// or "aligns" the offset to the next 8-byte boundary so that any data
// structure can be placed at the resulting offset without fear of an
// alignment error.
//
// WARNING!! DO NOT USE THIS MACRO TO ALIGN POINTERS: it will produce the
// wrong result on platforms that allocate addresses that are divisible by 4
// or 2. Only use it for offsets or sizes.
//
// This macro is only used by tclCompile.c in the core (Bug 926445). It
// however not be made file static, as extensions that touch bytecodes
// (notably tbcload) require it.

// The following enum values are used to specify the runtime platform setting
// of the tclPlatform variable.

const ( /* tclInt.h:2325:1: */
	TCL_PLATFORM_UNIX    = 0 // Any Unix-like OS.
	TCL_PLATFORM_WINDOWS = 2
)

// The following enum values are used to indicate the translation of a Tcl
// channel. Declared here so that each platform can define
// TCL_PLATFORM_TRANSLATION to the native translation on that platform.

const ( /* tclInt.h:2336:1: */
	TCL_TRANSLATE_AUTO = 0 // Eol == \r, \n and \r\n.
	TCL_TRANSLATE_CR   = 1 // Eol == \r.
	TCL_TRANSLATE_LF   = 2 // Eol == \n.
	TCL_TRANSLATE_CRLF = 3
)

// The "globParameters" argument of the function TclGlob is an or'ed
// combination of the following values:

const ( /* tclInt.h:2572:1: */
	TCL_PATH_DIRNAME   = 0
	TCL_PATH_TAIL      = 1
	TCL_PATH_EXTENSION = 2
	TCL_PATH_ROOT      = 3
)

const ( /* tclInt.h:2746:1: */
	TCL_EMPTYSTRING_UNKNOWN = -1
	TCL_EMPTYSTRING_NO      = 0
	TCL_EMPTYSTRING_YES     = 1
)

// Structure definition for information used to keep the state of an
// interactive command processor that reads lines from standard input and
// writes prompts and results to standard output.

const ( /* tclMain.c:92:1: */
	PROMPT_NONE     = 0 // Print no prompt
	PROMPT_START    = 1 // Print prompt for command start
	PROMPT_CONTINUE = 2
) // Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Indices of the standard return options dictionary keys.

const ( /* tclResult.c:18:1: */
	KEY_CODE       = 0
	KEY_ERRORCODE  = 1
	KEY_ERRORINFO  = 2
	KEY_ERRORLINE  = 3
	KEY_LEVEL      = 4
	KEY_OPTIONS    = 5
	KEY_ERRORSTACK = 6
	KEY_LAST       = 7
)

// The following constants are used to determine the category of a
// Unicode character.

const ( /* tclUniData.c:1685:1: */
	UNASSIGNED                = 0
	UPPERCASE_LETTER          = 1
	LOWERCASE_LETTER          = 2
	TITLECASE_LETTER          = 3
	MODIFIER_LETTER           = 4
	OTHER_LETTER              = 5
	NON_SPACING_MARK          = 6
	ENCLOSING_MARK            = 7
	COMBINING_SPACING_MARK    = 8
	DECIMAL_DIGIT_NUMBER      = 9
	LETTER_NUMBER             = 10
	OTHER_NUMBER              = 11
	SPACE_SEPARATOR           = 12
	LINE_SEPARATOR            = 13
	PARAGRAPH_SEPARATOR       = 14
	CONTROL                   = 15
	FORMAT                    = 16
	PRIVATE_USE               = 17
	SURROGATE                 = 18
	CONNECTOR_PUNCTUATION     = 19
	DASH_PUNCTUATION          = 20
	OPEN_PUNCTUATION          = 21
	CLOSE_PUNCTUATION         = 22
	INITIAL_QUOTE_PUNCTUATION = 23
	FINAL_QUOTE_PUNCTUATION   = 24
	OTHER_PUNCTUATION         = 25
	MATH_SYMBOL               = 26
	CURRENCY_SYMBOL           = 27
	MODIFIER_SYMBOL           = 28
	OTHER_SYMBOL              = 29
)

const ( /* avx512fintrin.h:4271:1: */
	X_MM_PERM_AAAA = 0
	X_MM_PERM_AAAB = 1
	X_MM_PERM_AAAC = 2
	X_MM_PERM_AAAD = 3
	X_MM_PERM_AABA = 4
	X_MM_PERM_AABB = 5
	X_MM_PERM_AABC = 6
	X_MM_PERM_AABD = 7
	X_MM_PERM_AACA = 8
	X_MM_PERM_AACB = 9
	X_MM_PERM_AACC = 10
	X_MM_PERM_AACD = 11
	X_MM_PERM_AADA = 12
	X_MM_PERM_AADB = 13
	X_MM_PERM_AADC = 14
	X_MM_PERM_AADD = 15
	X_MM_PERM_ABAA = 16
	X_MM_PERM_ABAB = 17
	X_MM_PERM_ABAC = 18
	X_MM_PERM_ABAD = 19
	X_MM_PERM_ABBA = 20
	X_MM_PERM_ABBB = 21
	X_MM_PERM_ABBC = 22
	X_MM_PERM_ABBD = 23
	X_MM_PERM_ABCA = 24
	X_MM_PERM_ABCB = 25
	X_MM_PERM_ABCC = 26
	X_MM_PERM_ABCD = 27
	X_MM_PERM_ABDA = 28
	X_MM_PERM_ABDB = 29
	X_MM_PERM_ABDC = 30
	X_MM_PERM_ABDD = 31
	X_MM_PERM_ACAA = 32
	X_MM_PERM_ACAB = 33
	X_MM_PERM_ACAC = 34
	X_MM_PERM_ACAD = 35
	X_MM_PERM_ACBA = 36
	X_MM_PERM_ACBB = 37
	X_MM_PERM_ACBC = 38
	X_MM_PERM_ACBD = 39
	X_MM_PERM_ACCA = 40
	X_MM_PERM_ACCB = 41
	X_MM_PERM_ACCC = 42
	X_MM_PERM_ACCD = 43
	X_MM_PERM_ACDA = 44
	X_MM_PERM_ACDB = 45
	X_MM_PERM_ACDC = 46
	X_MM_PERM_ACDD = 47
	X_MM_PERM_ADAA = 48
	X_MM_PERM_ADAB = 49
	X_MM_PERM_ADAC = 50
	X_MM_PERM_ADAD = 51
	X_MM_PERM_ADBA = 52
	X_MM_PERM_ADBB = 53
	X_MM_PERM_ADBC = 54
	X_MM_PERM_ADBD = 55
	X_MM_PERM_ADCA = 56
	X_MM_PERM_ADCB = 57
	X_MM_PERM_ADCC = 58
	X_MM_PERM_ADCD = 59
	X_MM_PERM_ADDA = 60
	X_MM_PERM_ADDB = 61
	X_MM_PERM_ADDC = 62
	X_MM_PERM_ADDD = 63
	X_MM_PERM_BAAA = 64
	X_MM_PERM_BAAB = 65
	X_MM_PERM_BAAC = 66
	X_MM_PERM_BAAD = 67
	X_MM_PERM_BABA = 68
	X_MM_PERM_BABB = 69
	X_MM_PERM_BABC = 70
	X_MM_PERM_BABD = 71
	X_MM_PERM_BACA = 72
	X_MM_PERM_BACB = 73
	X_MM_PERM_BACC = 74
	X_MM_PERM_BACD = 75
	X_MM_PERM_BADA = 76
	X_MM_PERM_BADB = 77
	X_MM_PERM_BADC = 78
	X_MM_PERM_BADD = 79
	X_MM_PERM_BBAA = 80
	X_MM_PERM_BBAB = 81
	X_MM_PERM_BBAC = 82
	X_MM_PERM_BBAD = 83
	X_MM_PERM_BBBA = 84
	X_MM_PERM_BBBB = 85
	X_MM_PERM_BBBC = 86
	X_MM_PERM_BBBD = 87
	X_MM_PERM_BBCA = 88
	X_MM_PERM_BBCB = 89
	X_MM_PERM_BBCC = 90
	X_MM_PERM_BBCD = 91
	X_MM_PERM_BBDA = 92
	X_MM_PERM_BBDB = 93
	X_MM_PERM_BBDC = 94
	X_MM_PERM_BBDD = 95
	X_MM_PERM_BCAA = 96
	X_MM_PERM_BCAB = 97
	X_MM_PERM_BCAC = 98
	X_MM_PERM_BCAD = 99
	X_MM_PERM_BCBA = 100
	X_MM_PERM_BCBB = 101
	X_MM_PERM_BCBC = 102
	X_MM_PERM_BCBD = 103
	X_MM_PERM_BCCA = 104
	X_MM_PERM_BCCB = 105
	X_MM_PERM_BCCC = 106
	X_MM_PERM_BCCD = 107
	X_MM_PERM_BCDA = 108
	X_MM_PERM_BCDB = 109
	X_MM_PERM_BCDC = 110
	X_MM_PERM_BCDD = 111
	X_MM_PERM_BDAA = 112
	X_MM_PERM_BDAB = 113
	X_MM_PERM_BDAC = 114
	X_MM_PERM_BDAD = 115
	X_MM_PERM_BDBA = 116
	X_MM_PERM_BDBB = 117
	X_MM_PERM_BDBC = 118
	X_MM_PERM_BDBD = 119
	X_MM_PERM_BDCA = 120
	X_MM_PERM_BDCB = 121
	X_MM_PERM_BDCC = 122
	X_MM_PERM_BDCD = 123
	X_MM_PERM_BDDA = 124
	X_MM_PERM_BDDB = 125
	X_MM_PERM_BDDC = 126
	X_MM_PERM_BDDD = 127
	X_MM_PERM_CAAA = 128
	X_MM_PERM_CAAB = 129
	X_MM_PERM_CAAC = 130
	X_MM_PERM_CAAD = 131
	X_MM_PERM_CABA = 132
	X_MM_PERM_CABB = 133
	X_MM_PERM_CABC = 134
	X_MM_PERM_CABD = 135
	X_MM_PERM_CACA = 136
	X_MM_PERM_CACB = 137
	X_MM_PERM_CACC = 138
	X_MM_PERM_CACD = 139
	X_MM_PERM_CADA = 140
	X_MM_PERM_CADB = 141
	X_MM_PERM_CADC = 142
	X_MM_PERM_CADD = 143
	X_MM_PERM_CBAA = 144
	X_MM_PERM_CBAB = 145
	X_MM_PERM_CBAC = 146
	X_MM_PERM_CBAD = 147
	X_MM_PERM_CBBA = 148
	X_MM_PERM_CBBB = 149
	X_MM_PERM_CBBC = 150
	X_MM_PERM_CBBD = 151
	X_MM_PERM_CBCA = 152
	X_MM_PERM_CBCB = 153
	X_MM_PERM_CBCC = 154
	X_MM_PERM_CBCD = 155
	X_MM_PERM_CBDA = 156
	X_MM_PERM_CBDB = 157
	X_MM_PERM_CBDC = 158
	X_MM_PERM_CBDD = 159
	X_MM_PERM_CCAA = 160
	X_MM_PERM_CCAB = 161
	X_MM_PERM_CCAC = 162
	X_MM_PERM_CCAD = 163
	X_MM_PERM_CCBA = 164
	X_MM_PERM_CCBB = 165
	X_MM_PERM_CCBC = 166
	X_MM_PERM_CCBD = 167
	X_MM_PERM_CCCA = 168
	X_MM_PERM_CCCB = 169
	X_MM_PERM_CCCC = 170
	X_MM_PERM_CCCD = 171
	X_MM_PERM_CCDA = 172
	X_MM_PERM_CCDB = 173
	X_MM_PERM_CCDC = 174
	X_MM_PERM_CCDD = 175
	X_MM_PERM_CDAA = 176
	X_MM_PERM_CDAB = 177
	X_MM_PERM_CDAC = 178
	X_MM_PERM_CDAD = 179
	X_MM_PERM_CDBA = 180
	X_MM_PERM_CDBB = 181
	X_MM_PERM_CDBC = 182
	X_MM_PERM_CDBD = 183
	X_MM_PERM_CDCA = 184
	X_MM_PERM_CDCB = 185
	X_MM_PERM_CDCC = 186
	X_MM_PERM_CDCD = 187
	X_MM_PERM_CDDA = 188
	X_MM_PERM_CDDB = 189
	X_MM_PERM_CDDC = 190
	X_MM_PERM_CDDD = 191
	X_MM_PERM_DAAA = 192
	X_MM_PERM_DAAB = 193
	X_MM_PERM_DAAC = 194
	X_MM_PERM_DAAD = 195
	X_MM_PERM_DABA = 196
	X_MM_PERM_DABB = 197
	X_MM_PERM_DABC = 198
	X_MM_PERM_DABD = 199
	X_MM_PERM_DACA = 200
	X_MM_PERM_DACB = 201
	X_MM_PERM_DACC = 202
	X_MM_PERM_DACD = 203
	X_MM_PERM_DADA = 204
	X_MM_PERM_DADB = 205
	X_MM_PERM_DADC = 206
	X_MM_PERM_DADD = 207
	X_MM_PERM_DBAA = 208
	X_MM_PERM_DBAB = 209
	X_MM_PERM_DBAC = 210
	X_MM_PERM_DBAD = 211
	X_MM_PERM_DBBA = 212
	X_MM_PERM_DBBB = 213
	X_MM_PERM_DBBC = 214
	X_MM_PERM_DBBD = 215
	X_MM_PERM_DBCA = 216
	X_MM_PERM_DBCB = 217
	X_MM_PERM_DBCC = 218
	X_MM_PERM_DBCD = 219
	X_MM_PERM_DBDA = 220
	X_MM_PERM_DBDB = 221
	X_MM_PERM_DBDC = 222
	X_MM_PERM_DBDD = 223
	X_MM_PERM_DCAA = 224
	X_MM_PERM_DCAB = 225
	X_MM_PERM_DCAC = 226
	X_MM_PERM_DCAD = 227
	X_MM_PERM_DCBA = 228
	X_MM_PERM_DCBB = 229
	X_MM_PERM_DCBC = 230
	X_MM_PERM_DCBD = 231
	X_MM_PERM_DCCA = 232
	X_MM_PERM_DCCB = 233
	X_MM_PERM_DCCC = 234
	X_MM_PERM_DCCD = 235
	X_MM_PERM_DCDA = 236
	X_MM_PERM_DCDB = 237
	X_MM_PERM_DCDC = 238
	X_MM_PERM_DCDD = 239
	X_MM_PERM_DDAA = 240
	X_MM_PERM_DDAB = 241
	X_MM_PERM_DDAC = 242
	X_MM_PERM_DDAD = 243
	X_MM_PERM_DDBA = 244
	X_MM_PERM_DDBB = 245
	X_MM_PERM_DDBC = 246
	X_MM_PERM_DDBD = 247
	X_MM_PERM_DDCA = 248
	X_MM_PERM_DDCB = 249
	X_MM_PERM_DDCC = 250
	X_MM_PERM_DDCD = 251
	X_MM_PERM_DDDA = 252
	X_MM_PERM_DDDB = 253
	X_MM_PERM_DDDC = 254
	X_MM_PERM_DDDD = 255
)

// Constants for mantissa extraction
const ( /* avx512fintrin.h:8686:1: */
	X_MM_MANT_NORM_1_2     = 0 // interval [1, 2)
	X_MM_MANT_NORM_p5_2    = 1 // interval [0.5, 2)
	X_MM_MANT_NORM_p5_1    = 2 // interval [0.5, 1)
	X_MM_MANT_NORM_p75_1p5 = 3
)

const ( /* avx512fintrin.h:8694:1: */
	X_MM_MANT_SIGN_src  = 0 // sign = sign(SRC)
	X_MM_MANT_SIGN_zero = 1 // sign = 0
	X_MM_MANT_SIGN_nan  = 2
)

// Constants for use with _mm_prefetch.
const ( /* xmmintrin.h:37:1: */
	// _MM_HINT_ET is _MM_HINT_T with set 3rd bit.
	X_MM_HINT_ET0 = 7
	X_MM_HINT_ET1 = 6
	X_MM_HINT_T0  = 3
	X_MM_HINT_T1  = 2
	X_MM_HINT_T2  = 1
	X_MM_HINT_NTA = 0
)

const ( /* accctrl.h:127:3: */
	NOT_USED_ACCESS   = 0
	GRANT_ACCESS      = 1
	SET_ACCESS        = 2
	DENY_ACCESS       = 3
	REVOKE_ACCESS     = 4
	SET_AUDIT_SUCCESS = 5
	SET_AUDIT_FAILURE = 6
)

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

//** Autogenerated by WIDL 4.12.1 from include/wtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

const ( /* accctrl.h:22:3: */
	SE_UNKNOWN_OBJECT_TYPE     = 0
	SE_FILE_OBJECT             = 1
	SE_SERVICE                 = 2
	SE_PRINTER                 = 3
	SE_REGISTRY_KEY            = 4
	SE_LMSHARE                 = 5
	SE_KERNEL_OBJECT           = 6
	SE_WINDOW_OBJECT           = 7
	SE_DS_OBJECT               = 8
	SE_DS_OBJECT_ALL           = 9
	SE_PROVIDER_DEFINED_OBJECT = 10
	SE_WMIGUID_OBJECT          = 11
	SE_REGISTRY_WOW64_32KEY    = 12
)

const ( /* accctrl.h:38:3: */
	TRUSTEE_IS_UNKNOWN          = 0
	TRUSTEE_IS_USER             = 1
	TRUSTEE_IS_GROUP            = 2
	TRUSTEE_IS_DOMAIN           = 3
	TRUSTEE_IS_ALIAS            = 4
	TRUSTEE_IS_WELL_KNOWN_GROUP = 5
	TRUSTEE_IS_DELETED          = 6
	TRUSTEE_IS_INVALID          = 7
	TRUSTEE_IS_COMPUTER         = 8
)

const ( /* accctrl.h:433:3: */
	ProgressInvokeNever       = 1
	ProgressInvokeEveryObject = 2
	ProgressInvokeOnError     = 3
	ProgressCancelOperation   = 4
	ProgressRetryOperation    = 5
)
const ( /* accctrl.h:49:3: */
	TRUSTEE_IS_SID              = 0
	TRUSTEE_IS_NAME             = 1
	TRUSTEE_BAD_FORM            = 2
	TRUSTEE_IS_OBJECTS_AND_SID  = 3
	TRUSTEE_IS_OBJECTS_AND_NAME = 4
)

const ( /* accctrl.h:57:3: */
	NO_MULTIPLE_TRUSTEE    = 0
	TRUSTEE_IS_IMPERSONATE = 1
)

const ( /* bcrypt.h:417:3: */
	DSA_HASH_ALGORITHM_SHA1   = 0
	DSA_HASH_ALGORITHM_SHA256 = 1
	DSA_HASH_ALGORITHM_SHA512 = 2
)

const ( /* bcrypt.h:423:3: */
	DSA_FIPS186_2 = 0
	DSA_FIPS186_3 = 1
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

const ( /* combaseapi.h:138:1: */
	REGCLS_SINGLEUSE      = 0
	REGCLS_MULTIPLEUSE    = 1
	REGCLS_MULTI_SEPARATE = 2
	REGCLS_SUSPENDED      = 4
	REGCLS_SURROGATE      = 8
)

const ( /* combaseapi.h:149:1: */
	COINITBASE_MULTITHREADED = 0
)

const ( /* combaseapi.h:216:1: */
	SMEXF_SERVER  = 1
	SMEXF_HANDLER = 2
)

const ( /* combaseapi.h:320:1: */
	COWAIT_DEFAULT                  = 0
	COWAIT_WAITALL                  = 1
	COWAIT_ALERTABLE                = 2
	COWAIT_INPUTAVAILABLE           = 4
	COWAIT_DISPATCH_CALLS           = 8
	COWAIT_DISPATCH_WINDOW_MESSAGES = 16
)

const ( /* docobj.h:1040:1: */
	OLECMDF_SUPPORTED         = 1
	OLECMDF_ENABLED           = 2
	OLECMDF_LATCHED           = 4
	OLECMDF_NINCHED           = 8
	OLECMDF_INVISIBLE         = 16
	OLECMDF_DEFHIDEONCTXTMENU = 32
)

const ( /* docobj.h:1061:1: */
	OLECMDTEXTF_NONE   = 0
	OLECMDTEXTF_NAME   = 1
	OLECMDTEXTF_STATUS = 2
)

const ( /* docobj.h:1067:1: */
	OLECMDEXECOPT_DODEFAULT      = 0
	OLECMDEXECOPT_PROMPTUSER     = 1
	OLECMDEXECOPT_DONTPROMPTUSER = 2
	OLECMDEXECOPT_SHOWHELP       = 3
)

const ( /* docobj.h:1074:1: */
	OLECMDID_OPEN                           = 1
	OLECMDID_NEW                            = 2
	OLECMDID_SAVE                           = 3
	OLECMDID_SAVEAS                         = 4
	OLECMDID_SAVECOPYAS                     = 5
	OLECMDID_PRINT                          = 6
	OLECMDID_PRINTPREVIEW                   = 7
	OLECMDID_PAGESETUP                      = 8
	OLECMDID_SPELL                          = 9
	OLECMDID_PROPERTIES                     = 10
	OLECMDID_CUT                            = 11
	OLECMDID_COPY                           = 12
	OLECMDID_PASTE                          = 13
	OLECMDID_PASTESPECIAL                   = 14
	OLECMDID_UNDO                           = 15
	OLECMDID_REDO                           = 16
	OLECMDID_SELECTALL                      = 17
	OLECMDID_CLEARSELECTION                 = 18
	OLECMDID_ZOOM                           = 19
	OLECMDID_GETZOOMRANGE                   = 20
	OLECMDID_UPDATECOMMANDS                 = 21
	OLECMDID_REFRESH                        = 22
	OLECMDID_STOP                           = 23
	OLECMDID_HIDETOOLBARS                   = 24
	OLECMDID_SETPROGRESSMAX                 = 25
	OLECMDID_SETPROGRESSPOS                 = 26
	OLECMDID_SETPROGRESSTEXT                = 27
	OLECMDID_SETTITLE                       = 28
	OLECMDID_SETDOWNLOADSTATE               = 29
	OLECMDID_STOPDOWNLOAD                   = 30
	OLECMDID_ONTOOLBARACTIVATED             = 31
	OLECMDID_FIND                           = 32
	OLECMDID_DELETE                         = 33
	OLECMDID_HTTPEQUIV                      = 34
	OLECMDID_HTTPEQUIV_DONE                 = 35
	OLECMDID_ENABLE_INTERACTION             = 36
	OLECMDID_ONUNLOAD                       = 37
	OLECMDID_PROPERTYBAG2                   = 38
	OLECMDID_PREREFRESH                     = 39
	OLECMDID_SHOWSCRIPTERROR                = 40
	OLECMDID_SHOWMESSAGE                    = 41
	OLECMDID_SHOWFIND                       = 42
	OLECMDID_SHOWPAGESETUP                  = 43
	OLECMDID_SHOWPRINT                      = 44
	OLECMDID_CLOSE                          = 45
	OLECMDID_ALLOWUILESSSAVEAS              = 46
	OLECMDID_DONTDOWNLOADCSS                = 47
	OLECMDID_UPDATEPAGESTATUS               = 48
	OLECMDID_PRINT2                         = 49
	OLECMDID_PRINTPREVIEW2                  = 50
	OLECMDID_SETPRINTTEMPLATE               = 51
	OLECMDID_GETPRINTTEMPLATE               = 52
	OLECMDID_PAGEACTIONBLOCKED              = 55
	OLECMDID_PAGEACTIONUIQUERY              = 56
	OLECMDID_FOCUSVIEWCONTROLS              = 57
	OLECMDID_FOCUSVIEWCONTROLSQUERY         = 58
	OLECMDID_SHOWPAGEACTIONMENU             = 59
	OLECMDID_ADDTRAVELENTRY                 = 60
	OLECMDID_UPDATETRAVELENTRY              = 61
	OLECMDID_UPDATEBACKFORWARDSTATE         = 62
	OLECMDID_OPTICAL_ZOOM                   = 63
	OLECMDID_OPTICAL_GETZOOMRANGE           = 64
	OLECMDID_WINDOWSTATECHANGED             = 65
	OLECMDID_ACTIVEXINSTALLSCOPE            = 66
	OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67
	OLECMDID_SHOWTASKDLG                    = 68
	OLECMDID_POPSTATEEVENT                  = 69
	OLECMDID_VIEWPORT_MODE                  = 70
	OLECMDID_LAYOUT_VIEWPORT_WIDTH          = 71
	OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72
	OLECMDID_USER_OPTICAL_ZOOM              = 73
	OLECMDID_PAGEAVAILABLE                  = 74
	OLECMDID_GETUSERSCALABLE                = 75
	OLECMDID_UPDATE_CARET                   = 76
	OLECMDID_ENABLE_VISIBILITY              = 77
	OLECMDID_MEDIA_PLAYBACK                 = 78
)

const ( /* docobj.h:1153:1: */
	MEDIAPLAYBACK_RESUME = 0
	MEDIAPLAYBACK_PAUSE  = 1
)

const ( /* docobj.h:1296:1: */
	OLECMDIDF_REFRESH_NORMAL                  = 0
	OLECMDIDF_REFRESH_IFEXPIRED               = 1
	OLECMDIDF_REFRESH_CONTINUE                = 2
	OLECMDIDF_REFRESH_COMPLETELY              = 3
	OLECMDIDF_REFRESH_NO_CACHE                = 4
	OLECMDIDF_REFRESH_RELOAD                  = 5
	OLECMDIDF_REFRESH_LEVELMASK               = 255
	OLECMDIDF_REFRESH_CLEARUSERINPUT          = 4096
	OLECMDIDF_REFRESH_PROMPTIFOFFLINE         = 8192
	OLECMDIDF_REFRESH_THROUGHSCRIPT           = 16384
	OLECMDIDF_REFRESH_PAGEACTION_MIXEDCONTENT = 33554432
	OLECMDIDF_REFRESH_PAGEACTION_INVALID_CERT = 67108864
)

const ( /* docobj.h:1326:1: */
	OLECMDIDF_PAGEACTION_FILEDOWNLOAD                       = 1
	OLECMDIDF_PAGEACTION_ACTIVEXINSTALL                     = 2
	OLECMDIDF_PAGEACTION_ACTIVEXTRUSTFAIL                   = 4
	OLECMDIDF_PAGEACTION_ACTIVEXUSERDISABLE                 = 8
	OLECMDIDF_PAGEACTION_ACTIVEXDISALLOW                    = 16
	OLECMDIDF_PAGEACTION_ACTIVEXUNSAFE                      = 32
	OLECMDIDF_PAGEACTION_POPUPWINDOW                        = 64
	OLECMDIDF_PAGEACTION_LOCALMACHINE                       = 128
	OLECMDIDF_PAGEACTION_MIMETEXTPLAIN                      = 256
	OLECMDIDF_PAGEACTION_SCRIPTNAVIGATE                     = 512
	OLECMDIDF_PAGEACTION_SCRIPTNAVIGATE_ACTIVEXINSTALL      = 512
	OLECMDIDF_PAGEACTION_PROTLOCKDOWNLOCALMACHINE           = 1024
	OLECMDIDF_PAGEACTION_PROTLOCKDOWNTRUSTED                = 2048
	OLECMDIDF_PAGEACTION_PROTLOCKDOWNINTRANET               = 4096
	OLECMDIDF_PAGEACTION_PROTLOCKDOWNINTERNET               = 8192
	OLECMDIDF_PAGEACTION_PROTLOCKDOWNRESTRICTED             = 16384
	OLECMDIDF_PAGEACTION_PROTLOCKDOWNDENY                   = 32768
	OLECMDIDF_PAGEACTION_POPUPALLOWED                       = 65536
	OLECMDIDF_PAGEACTION_SCRIPTPROMPT                       = 131072
	OLECMDIDF_PAGEACTION_ACTIVEXUSERAPPROVAL                = 262144
	OLECMDIDF_PAGEACTION_MIXEDCONTENT                       = 524288
	OLECMDIDF_PAGEACTION_INVALID_CERT                       = 1048576
	OLECMDIDF_PAGEACTION_INTRANETZONEREQUEST                = 2097152
	OLECMDIDF_PAGEACTION_XSSFILTERED                        = 4194304
	OLECMDIDF_PAGEACTION_SPOOFABLEIDNHOST                   = 8388608
	OLECMDIDF_PAGEACTION_ACTIVEX_EPM_INCOMPATIBLE           = 16777216
	OLECMDIDF_PAGEACTION_SCRIPTNAVIGATE_ACTIVEXUSERAPPROVAL = 33554432
	OLECMDIDF_PAGEACTION_WPCBLOCKED                         = 67108864
	OLECMDIDF_PAGEACTION_WPCBLOCKED_ACTIVEX                 = 134217728
	OLECMDIDF_PAGEACTION_EXTENSION_COMPAT_BLOCKED           = 268435456
	OLECMDIDF_PAGEACTION_NORESETACTIVEX                     = 536870912
	OLECMDIDF_PAGEACTION_GENERIC_STATE                      = 1073741824
	OLECMDIDF_PAGEACTION_RESET                              = -2147483648
)

const ( /* docobj.h:1362:1: */
	OLECMDIDF_BROWSERSTATE_EXTENSIONSOFF     = 1
	OLECMDIDF_BROWSERSTATE_IESECURITY        = 2
	OLECMDIDF_BROWSERSTATE_PROTECTEDMODE_OFF = 4
	OLECMDIDF_BROWSERSTATE_RESET             = 8
	OLECMDIDF_BROWSERSTATE_REQUIRESACTIVEX   = 16
)

const ( /* docobj.h:1370:1: */
	OLECMDIDF_OPTICAL_ZOOM_NOPERSIST = 1
	OLECMDIDF_OPTICAL_ZOOM_NOLAYOUT  = 16
)

const ( /* docobj.h:1375:1: */
	PAGEACTION_UI_DEFAULT  = 0
	PAGEACTION_UI_MODAL    = 1
	PAGEACTION_UI_MODELESS = 2
	PAGEACTION_UI_SILENT   = 3
)

const ( /* docobj.h:1382:1: */
	OLECMDIDF_WINDOWSTATE_USERVISIBLE       = 1
	OLECMDIDF_WINDOWSTATE_ENABLED           = 2
	OLECMDIDF_WINDOWSTATE_USERVISIBLE_VALID = 65536
	OLECMDIDF_WINDOWSTATE_ENABLED_VALID     = 131072
)

const ( /* docobj.h:1389:1: */
	OLECMDIDF_VIEWPORTMODE_FIXED_LAYOUT_WIDTH          = 1
	OLECMDIDF_VIEWPORTMODE_EXCLUDE_VISUAL_BOTTOM       = 2
	OLECMDIDF_VIEWPORTMODE_FIXED_LAYOUT_WIDTH_VALID    = 65536
	OLECMDIDF_VIEWPORTMODE_EXCLUDE_VISUAL_BOTTOM_VALID = 131072
)

const ( /* docobj.h:198:1: */
	DOCMISC_CANCREATEMULTIPLEVIEWS   = 1
	DOCMISC_SUPPORTCOMPLEXRECTANGLES = 2
	DOCMISC_CANTOPENEDIT             = 4
	DOCMISC_NOFILESUPPORT            = 8
)

const ( /* docobj.h:859:1: */
	PRINTFLAG_MAYBOTHERUSER        = 1
	PRINTFLAG_PROMPTUSER           = 2
	PRINTFLAG_USERMAYCHANGEPRINTER = 4
	PRINTFLAG_RECOMPOSETODEVICE    = 8
	PRINTFLAG_DONTACTUALLYPRINT    = 16
	PRINTFLAG_FORCEPROPERTIES      = 32
	PRINTFLAG_PRINTTOFILE          = 64
)

const ( /* exdisp.h:2078:1: */
	SecureLockIconUnsecure          = 0
	SecureLockIconMixed             = 1
	SecureLockIconSecureUnknownBits = 2
	SecureLockIconSecure40Bit       = 3
	SecureLockIconSecure56Bit       = 4
	SecureLockIconSecureFortezza    = 5
	SecureLockIconSecure128Bit      = 6
)

const ( /* exdisp.h:2249:1: */
	SWC_EXPLORER = 0
	SWC_BROWSER  = 1
	SWC_3RDPARTY = 2
	SWC_CALLBACK = 4
	SWC_DESKTOP  = 8
)
const ( /* exdisp.h:2256:1: */
	SWFO_NEEDDISPATCH   = 1
	SWFO_INCLUDEPENDING = 2
	SWFO_COOKIEPASSED   = 4
)

// ****************************************************************************
//
// IWebBrowser interface

const ( /* exdisp.h:293:1: */
	NavOpenInNewWindow       = 1
	NavNoHistory             = 2
	NavNoReadFromCache       = 4
	NavNoWriteToCache        = 8
	NavAllowAutosearch       = 16
	NavBrowserBar            = 32
	NavHyperlink             = 64
	NavEnforceRestricted     = 128
	NavNewWindowsManaged     = 256
	NavUntrustedForDownload  = 512
	NavTrustedForActiveX     = 1024
	NavOpenInNewTab          = 2048
	NavOpenInBackgroundTab   = 4096
	NavKeepWordWheelText     = 8192
	NavVirtualTab            = 16384
	NavBlockRedirectsXDomain = 32768
	NavOpenNewForegroundTab  = 65536
	NavTravelLogScreenshot   = 131072
	NavDeferUnload           = 262144
	NavSpeculative           = 524288
	NavSuggestNewWindow      = 1048576
	NavSuggestNewTab         = 2097152
	NavReserved1             = 4194304
	NavHomepageNavigate      = 8388608
	NavRefresh               = 16777216
	NavHostNavigation        = 33554432
	NavReserved2             = 67108864
	NavReserved3             = 134217728
	NavReserved4             = 268435456
)
const ( /* exdisp.h:324:1: */
	REFRESH_NORMAL     = 0
	REFRESH_IFEXPIRED  = 1
	REFRESH_COMPLETELY = 3
)

const ( /* exdisp.h:824:1: */
	CSC_UPDATECOMMANDS  = -1
	CSC_NAVIGATEFORWARD = 1
	CSC_NAVIGATEBACK    = 2
)

const ( /* lmaccess.h:743:3: */
	NetValidateAuthentication = 1
	NetValidatePasswordChange = 2
	NetValidatePasswordReset  = 3
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

const ( /* lmjoin.h:13:3: */
	NetSetupUnknown           = 0
	NetSetupMachine           = 1
	NetSetupWorkgroup         = 2
	NetSetupDomain            = 3
	NetSetupNonExistentDomain = 4
	NetSetupDnsMachine        = 5
)

const ( /* lmjoin.h:18:3: */
	NetSetupUnknownStatus = 0
	NetSetupUnjoined      = 1
	NetSetupWorkgroupName = 2
	NetSetupDomainName    = 3
)

const ( /* lmjoin.h:49:3: */
	NetPrimaryComputerName    = 0
	NetAlternateComputerNames = 1
	NetAllComputerNames       = 2
	NetComputerNameTypeMax    = 3
)

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

const ( /* memoryapi.h:18:3: */
	LowMemoryResourceNotification  = 0
	HighMemoryResourceNotification = 1
)

const ( /* minwinbase.h:102:3: */
	FindExInfoStandard     = 0
	FindExInfoBasic        = 1
	FindExInfoMaxInfoLevel = 2
)

const ( /* minwinbase.h:114:3: */
	FindExSearchNameMatch          = 0
	FindExSearchLimitToDirectories = 1
	FindExSearchLimitToDevices     = 2
	FindExSearchMaxSearchOp        = 3
)

const ( /* minwinbase.h:131:3: */
	GetFileExInfoStandard = 0
	GetFileExMaxInfoLevel = 1
)

const ( /* msxml.h:242:3: */
	NODE_INVALID                = 0
	NODE_ELEMENT                = 1
	NODE_ATTRIBUTE              = 2
	NODE_TEXT                   = 3
	NODE_CDATA_SECTION          = 4
	NODE_ENTITY_REFERENCE       = 5
	NODE_ENTITY                 = 6
	NODE_PROCESSING_INSTRUCTION = 7
	NODE_COMMENT                = 8
	NODE_DOCUMENT               = 9
	NODE_DOCUMENT_TYPE          = 10
	NODE_DOCUMENT_FRAGMENT      = 11
	NODE_NOTATION               = 12
)

const ( /* msxml.h:248:3: */
	XMLELEMTYPE_ELEMENT  = 0
	XMLELEMTYPE_TEXT     = 1
	XMLELEMTYPE_COMMENT  = 2
	XMLELEMTYPE_DOCUMENT = 3
	XMLELEMTYPE_DTD      = 4
	XMLELEMTYPE_PI       = 5
	XMLELEMTYPE_OTHER    = 6
)

const ( /* oaidl.h:2472:1: */
	DESCKIND_NONE           = 0
	DESCKIND_FUNCDESC       = 1
	DESCKIND_VARDESC        = 2
	DESCKIND_TYPECOMP       = 3
	DESCKIND_IMPLICITAPPOBJ = 4
	DESCKIND_MAX            = 5
)

// ****************************************************************************
//
// ITypeLib interface

const ( /* oaidl.h:3732:1: */
	SYS_WIN16 = 0
	SYS_WIN32 = 1
	SYS_MAC   = 2
	SYS_WIN64 = 3
)

const ( /* oaidl.h:3739:1: */
	LIBFLAG_FRESTRICTED   = 1
	LIBFLAG_FCONTROL      = 2
	LIBFLAG_FHIDDEN       = 4
	LIBFLAG_FHASDISKIMAGE = 8
)

const ( /* oaidl.h:399:1: */
	SF_ERROR    = 10
	SF_I1       = 16
	SF_I2       = 2
	SF_I4       = 3
	SF_I8       = 20
	SF_BSTR     = 8
	SF_UNKNOWN  = 13
	SF_DISPATCH = 9
	SF_VARIANT  = 12
	SF_RECORD   = 36
	SF_HAVEIID  = 32781
)

const ( /* oaidl.h:4348:1: */
	CHANGEKIND_ADDMEMBER        = 0
	CHANGEKIND_DELETEMEMBER     = 1
	CHANGEKIND_SETNAMES         = 2
	CHANGEKIND_SETDOCUMENTATION = 3
	CHANGEKIND_GENERAL          = 4
	CHANGEKIND_INVALIDATE       = 5
	CHANGEKIND_CHANGEFAILED     = 6
	CHANGEKIND_MAX              = 7
)
const ( /* oaidl.h:640:1: */
	TKIND_ENUM      = 0
	TKIND_RECORD    = 1
	TKIND_MODULE    = 2
	TKIND_INTERFACE = 3
	TKIND_DISPATCH  = 4
	TKIND_COCLASS   = 5
	TKIND_ALIAS     = 6
	TKIND_UNION     = 7
	TKIND_MAX       = 8
)

const ( /* oaidl.h:784:1: */
	CC_FASTCALL   = 0
	CC_CDECL      = 1
	CC_MSCPASCAL  = 2
	CC_PASCAL     = 2
	CC_MACPASCAL  = 3
	CC_STDCALL    = 4
	CC_FPFASTCALL = 5
	CC_SYSCALL    = 6
	CC_MPWCDECL   = 7
	CC_MPWPASCAL  = 8
	CC_MAX        = 9
)

const ( /* oaidl.h:798:1: */
	FUNC_VIRTUAL     = 0
	FUNC_PUREVIRTUAL = 1
	FUNC_NONVIRTUAL  = 2
	FUNC_STATIC      = 3
	FUNC_DISPATCH    = 4
)

const ( /* oaidl.h:806:1: */
	INVOKE_FUNC           = 1
	INVOKE_PROPERTYGET    = 2
	INVOKE_PROPERTYPUT    = 4
	INVOKE_PROPERTYPUTREF = 8
)

const ( /* oaidl.h:829:1: */
	VAR_PERINSTANCE = 0
	VAR_STATIC      = 1
	VAR_CONST       = 2
	VAR_DISPATCH    = 3
)

const ( /* oaidl.h:858:1: */
	TYPEFLAG_FAPPOBJECT     = 1
	TYPEFLAG_FCANCREATE     = 2
	TYPEFLAG_FLICENSED      = 4
	TYPEFLAG_FPREDECLID     = 8
	TYPEFLAG_FHIDDEN        = 16
	TYPEFLAG_FCONTROL       = 32
	TYPEFLAG_FDUAL          = 64
	TYPEFLAG_FNONEXTENSIBLE = 128
	TYPEFLAG_FOLEAUTOMATION = 256
	TYPEFLAG_FRESTRICTED    = 512
	TYPEFLAG_FAGGREGATABLE  = 1024
	TYPEFLAG_FREPLACEABLE   = 2048
	TYPEFLAG_FDISPATCHABLE  = 4096
	TYPEFLAG_FREVERSEBIND   = 8192
	TYPEFLAG_FPROXY         = 16384
)

const ( /* oaidl.h:876:1: */
	FUNCFLAG_FRESTRICTED       = 1
	FUNCFLAG_FSOURCE           = 2
	FUNCFLAG_FBINDABLE         = 4
	FUNCFLAG_FREQUESTEDIT      = 8
	FUNCFLAG_FDISPLAYBIND      = 16
	FUNCFLAG_FDEFAULTBIND      = 32
	FUNCFLAG_FHIDDEN           = 64
	FUNCFLAG_FUSESGETLASTERROR = 128
	FUNCFLAG_FDEFAULTCOLLELEM  = 256
	FUNCFLAG_FUIDEFAULT        = 512
	FUNCFLAG_FNONBROWSABLE     = 1024
	FUNCFLAG_FREPLACEABLE      = 2048
	FUNCFLAG_FIMMEDIATEBIND    = 4096
)

const ( /* oaidl.h:892:1: */
	VARFLAG_FREADONLY        = 1
	VARFLAG_FSOURCE          = 2
	VARFLAG_FBINDABLE        = 4
	VARFLAG_FREQUESTEDIT     = 8
	VARFLAG_FDISPLAYBIND     = 16
	VARFLAG_FDEFAULTBIND     = 32
	VARFLAG_FHIDDEN          = 64
	VARFLAG_FRESTRICTED      = 128
	VARFLAG_FDEFAULTCOLLELEM = 256
	VARFLAG_FUIDEFAULT       = 512
	VARFLAG_FNONBROWSABLE    = 1024
	VARFLAG_FREPLACEABLE     = 2048
	VARFLAG_FIMMEDIATEBIND   = 4096
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

const ( /* objbase.h:16:1: */
	COINIT_APARTMENTTHREADED = 2
	COINIT_MULTITHREADED     = 0
	COINIT_DISABLE_OLE1DDE   = 4
	COINIT_SPEED_OVER_MEMORY = 8
)

const ( /* objbase.h:87:1: */
	SD_LAUNCHPERMISSIONS  = 0
	SD_ACCESSPERMISSIONS  = 1
	SD_LAUNCHRESTRICTIONS = 2
	SD_ACCESSRESTRICTIONS = 3
)
const ( /* objidl.h:11100:1: */
	ADVF_NODATA            = 1
	ADVF_PRIMEFIRST        = 2
	ADVF_ONLYONCE          = 4
	ADVF_DATAONSTOP        = 64
	ADVFCACHE_NOHANDLER    = 8
	ADVFCACHE_FORCEBUILTIN = 16
	ADVFCACHE_ONSAVE       = 32
)
const ( /* objidl.h:11357:1: */
	TYMED_HGLOBAL  = 1
	TYMED_FILE     = 2
	TYMED_ISTREAM  = 4
	TYMED_ISTORAGE = 8
	TYMED_GDI      = 16
	TYMED_MFPICT   = 32
	TYMED_ENHMF    = 64
	TYMED_NULL     = 0
)
const ( /* objidl.h:12272:1: */
	DATADIR_GET = 1
	DATADIR_SET = 2
)
const ( /* objidl.h:12728:1: */
	CALLTYPE_TOPLEVEL             = 1
	CALLTYPE_NESTED               = 2
	CALLTYPE_ASYNC                = 3
	CALLTYPE_TOPLEVEL_CALLPENDING = 4
	CALLTYPE_ASYNC_CALLPENDING    = 5
)
const ( /* objidl.h:12735:1: */
	SERVERCALL_ISHANDLED  = 0
	SERVERCALL_REJECTED   = 1
	SERVERCALL_RETRYLATER = 2
)
const ( /* objidl.h:12740:1: */
	PENDINGTYPE_TOPLEVEL = 1
	PENDINGTYPE_NESTED   = 2
)
const ( /* objidl.h:12744:1: */
	PENDINGMSG_CANCELCALL     = 0
	PENDINGMSG_WAITNOPROCESS  = 1
	PENDINGMSG_WAITDEFPROCESS = 2
)

const ( /* objidl.h:14295:1: */
	ServerApplication  = 0
	LibraryApplication = 1
)
const ( /* objidl.h:14299:1: */
	IdleShutdown   = 0
	ForcedShutdown = 1
)
const ( /* objidl.h:7990:1: */
	BIND_MAYBOTHERUSER     = 1
	BIND_JUSTTESTEXISTENCE = 2
)
const ( /* objidl.h:9048:1: */
	MKSYS_NONE             = 0
	MKSYS_GENERICCOMPOSITE = 1
	MKSYS_FILEMONIKER      = 2
	MKSYS_ANTIMONIKER      = 3
	MKSYS_ITEMMONIKER      = 4
	MKSYS_POINTERMONIKER   = 5
	MKSYS_CLASSMONIKER     = 7
	MKSYS_OBJREFMONIKER    = 8
	MKSYS_SESSIONMONIKER   = 9
	MKSYS_LUAMONIKER       = 10
)
const ( /* objidl.h:9060:1: */
	MKRREDUCE_ONE         = 196608
	MKRREDUCE_TOUSER      = 131072
	MKRREDUCE_THROUGHUSER = 65536
	MKRREDUCE_ALL         = 0
)

const ( /* objidlbase.h:1267:1: */
	EXTCONN_STRONG   = 1
	EXTCONN_WEAK     = 2
	EXTCONN_CALLABLE = 4
)

const ( /* objidlbase.h:2057:1: */
	STGTY_STORAGE   = 1
	STGTY_STREAM    = 2
	STGTY_LOCKBYTES = 3
	STGTY_PROPERTY  = 4
)

const ( /* objidlbase.h:2064:1: */
	STREAM_SEEK_SET = 0
	STREAM_SEEK_CUR = 1
	STREAM_SEEK_END = 2
)

const ( /* objidlbase.h:2070:1: */
	LOCK_WRITE     = 1
	LOCK_EXCLUSIVE = 2
	LOCK_ONLYONCE  = 4
)

const ( /* objidlbase.h:3588:1: */
	EOAC_NONE              = 0
	EOAC_MUTUAL_AUTH       = 1
	EOAC_STATIC_CLOAKING   = 32
	EOAC_DYNAMIC_CLOAKING  = 64
	EOAC_ANY_AUTHORITY     = 128
	EOAC_MAKE_FULLSIC      = 256
	EOAC_DEFAULT           = 2048
	EOAC_SECURE_REFS       = 2
	EOAC_ACCESS_CONTROL    = 4
	EOAC_APPID             = 8
	EOAC_DYNAMIC           = 16
	EOAC_REQUIRE_FULLSIC   = 512
	EOAC_AUTO_IMPERSONATE  = 1024
	EOAC_NO_CUSTOM_MARSHAL = 8192
	EOAC_DISABLE_AAA       = 4096
)

const ( /* objidlbase.h:3870:1: */
	COMBND_RPCTIMEOUT      = 1
	COMBND_SERVER_LOCALITY = 2
	COMBND_RESERVED1       = 4
)

const ( /* objidlbase.h:3876:1: */
	SERVER_LOCALITY_PROCESS_LOCAL = 0
	SERVER_LOCALITY_MACHINE_LOCAL = 1
	SERVER_LOCALITY_REMOTE        = 2
)

const ( /* objidlbase.h:3981:1: */
	COMGLB_EXCEPTION_HANDLING     = 1
	COMGLB_APPID                  = 2
	COMGLB_RPC_THREADPOOL_SETTING = 3
	COMGLB_RO_SETTINGS            = 4
	COMGLB_UNMARSHALING_POLICY    = 5
)

const ( /* objidlbase.h:3989:1: */
	COMGLB_EXCEPTION_HANDLE             = 0
	COMGLB_EXCEPTION_DONOT_HANDLE_FATAL = 1
	COMGLB_EXCEPTION_DONOT_HANDLE       = 1
	COMGLB_EXCEPTION_DONOT_HANDLE_ANY   = 2
)

const ( /* objidlbase.h:3996:1: */
	COMGLB_RPC_THREADPOOL_SETTING_DEFAULT_POOL = 0
	COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL = 1
)

const ( /* objidlbase.h:4001:1: */
	COMGLB_STA_MODALLOOP_REMOVE_TOUCH_MESSAGES                    = 1
	COMGLB_STA_MODALLOOP_SHARED_QUEUE_REMOVE_INPUT_MESSAGES       = 2
	COMGLB_STA_MODALLOOP_SHARED_QUEUE_DONOT_REMOVE_INPUT_MESSAGES = 4
	COMGLB_FAST_RUNDOWN                                           = 8
	COMGLB_RESERVED1                                              = 16
	COMGLB_RESERVED2                                              = 32
	COMGLB_RESERVED3                                              = 64
	COMGLB_STA_MODALLOOP_SHARED_QUEUE_REORDER_POINTER_MESSAGES    = 128
)

const ( /* objidlbase.h:4012:1: */
	COMGLB_UNMARSHALING_POLICY_NORMAL = 0
	COMGLB_UNMARSHALING_POLICY_STRONG = 1
	COMGLB_UNMARSHALING_POLICY_HYBRID = 2
)

// ****************************************************************************
//
// IAsyncManager interface

const ( /* objidlbase.h:4875:1: */
	DCOM_NONE          = 0
	DCOM_CALL_COMPLETE = 1
	DCOM_CALL_CANCELED = 2
)

const ( /* objidlbase.h:6049:1: */
	APTTYPEQUALIFIER_NONE               = 0
	APTTYPEQUALIFIER_IMPLICIT_MTA       = 1
	APTTYPEQUALIFIER_NA_ON_MTA          = 2
	APTTYPEQUALIFIER_NA_ON_STA          = 3
	APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA = 4
	APTTYPEQUALIFIER_NA_ON_MAINSTA      = 5
	APTTYPEQUALIFIER_APPLICATION_STA    = 6
)

const ( /* objidlbase.h:6059:1: */
	APTTYPE_CURRENT = -1
	APTTYPE_STA     = 0
	APTTYPE_MTA     = 1
	APTTYPE_NA      = 2
	APTTYPE_MAINSTA = 3
)

const ( /* objidlbase.h:6069:1: */
	THDTYPE_BLOCKMESSAGES   = 0
	THDTYPE_PROCESSMESSAGES = 1
)

const ( /* objidlbase.h:6329:1: */
	CO_MARSHALING_SOURCE_IS_APP_CONTAINER = 0
)

const ( /* ocidl.h:1519:1: */
	GUIDKIND_DEFAULT_SOURCE_DISP_IID = 1
)

const ( /* ocidl.h:1758:1: */
	CTRLINFO_EATS_RETURN = 1
	CTRLINFO_EATS_ESCAPE = 2
)

const ( /* ocidl.h:1883:1: */
	XFORMCOORDS_POSITION            = 1
	XFORMCOORDS_SIZE                = 2
	XFORMCOORDS_HIMETRICTOCONTAINER = 4
	XFORMCOORDS_CONTAINERTOHIMETRIC = 8
	XFORMCOORDS_EVENTCOMPAT         = 16
)

const ( /* ocidl.h:2416:1: */
	PROPPAGESTATUS_DIRTY    = 1
	PROPPAGESTATUS_VALIDATE = 2
	PROPPAGESTATUS_CLEAN    = 4
)

const ( /* ocidl.h:3596:1: */
	PICTURE_SCALABLE    = 1
	PICTURE_TRANSPARENT = 2
)

const ( /* ocidl.h:4592:1: */
	ACTIVATE_WINDOWLESS = 1
)

const ( /* ocidl.h:4799:1: */
	OLEDC_NODRAW     = 1
	OLEDC_PAINTBKGND = 2
	OLEDC_OFFSCREEN  = 4
)

const ( /* ocidl.h:5150:1: */
	VIEWSTATUS_OPAQUE              = 1
	VIEWSTATUS_SOLIDBKGND          = 2
	VIEWSTATUS_DVASPECTOPAQUE      = 4
	VIEWSTATUS_DVASPECTTRANSPARENT = 8
	VIEWSTATUS_SURFACE             = 16
	VIEWSTATUS_3DSURFACE           = 32
)

const ( /* ocidl.h:5159:1: */
	HITRESULT_OUTSIDE     = 0
	HITRESULT_TRANSPARENT = 1
	HITRESULT_CLOSE       = 2
	HITRESULT_HIT         = 3
)

const ( /* ocidl.h:5166:1: */
	DVASPECT_OPAQUE      = 16
	DVASPECT_TRANSPARENT = 32
)

const ( /* ocidl.h:5177:1: */
	DVEXTENT_CONTENT  = 0
	DVEXTENT_INTEGRAL = 1
)

const ( /* ocidl.h:5182:1: */
	DVASPECTINFOFLAG_CANOPTIMIZE = 1
)

const ( /* ocidl.h:6045:1: */
	POINTERINACTIVE_ACTIVATEONENTRY   = 1
	POINTERINACTIVE_DEACTIVATEONLEAVE = 2
	POINTERINACTIVE_ACTIVATEONDRAG    = 4
)

const ( /* ocidl.h:6403:1: */
	PROPBAG2_TYPE_UNDEFINED = 0
	PROPBAG2_TYPE_DATA      = 1
	PROPBAG2_TYPE_URL       = 2
	PROPBAG2_TYPE_OBJECT    = 3
	PROPBAG2_TYPE_STREAM    = 4
	PROPBAG2_TYPE_STORAGE   = 5
	PROPBAG2_TYPE_MONIKER   = 6
)

const ( /* ocidl.h:6841:1: */
	QACONTAINER_SHOWHATCHING      = 1
	QACONTAINER_SHOWGRABHANDLES   = 2
	QACONTAINER_USERMODE          = 4
	QACONTAINER_DISPLAYASDEFAULT  = 8
	QACONTAINER_UIDEAD            = 16
	QACONTAINER_AUTOCLIP          = 32
	QACONTAINER_MESSAGEREFLECT    = 64
	QACONTAINER_SUPPORTSMNEMONICS = 128
)
const ( /* ocidl.h:744:1: */
	UAS_NORMAL         = 0
	UAS_BLOCKED        = 1
	UAS_NOPARENTENABLE = 2
	UAS_MASK           = 3
)

const ( /* ocidl.h:751:1: */
	READYSTATE_UNINITIALIZED = 0
	READYSTATE_LOADING       = 1
	READYSTATE_LOADED        = 2
	READYSTATE_INTERACTIVE   = 3
	READYSTATE_COMPLETE      = 4
)

const ( /* oleauto.h:590:1: */
	REGKIND_DEFAULT  = 0
	REGKIND_REGISTER = 1
	REGKIND_NONE     = 2
)

const ( /* oleidl.h:1123:1: */
	OLEGETMONIKER_ONLYIFTHERE = 1
	OLEGETMONIKER_FORCEASSIGN = 2
	OLEGETMONIKER_UNASSIGN    = 3
	OLEGETMONIKER_TEMPFORUSER = 4
)

const ( /* oleidl.h:1130:1: */
	OLEWHICHMK_CONTAINER = 1
	OLEWHICHMK_OBJREL    = 2
	OLEWHICHMK_OBJFULL   = 3
)

const ( /* oleidl.h:1136:1: */
	USERCLASSTYPE_FULL    = 1
	USERCLASSTYPE_SHORT   = 2
	USERCLASSTYPE_APPNAME = 3
)

const ( /* oleidl.h:1142:1: */
	OLEMISC_RECOMPOSEONRESIZE            = 1
	OLEMISC_ONLYICONIC                   = 2
	OLEMISC_INSERTNOTREPLACE             = 4
	OLEMISC_STATIC                       = 8
	OLEMISC_CANTLINKINSIDE               = 16
	OLEMISC_CANLINKBYOLE1                = 32
	OLEMISC_ISLINKOBJECT                 = 64
	OLEMISC_INSIDEOUT                    = 128
	OLEMISC_ACTIVATEWHENVISIBLE          = 256
	OLEMISC_RENDERINGISDEVICEINDEPENDENT = 512
	OLEMISC_INVISIBLEATRUNTIME           = 1024
	OLEMISC_ALWAYSRUN                    = 2048
	OLEMISC_ACTSLIKEBUTTON               = 4096
	OLEMISC_ACTSLIKELABEL                = 8192
	OLEMISC_NOUIACTIVATE                 = 16384
	OLEMISC_ALIGNABLE                    = 32768
	OLEMISC_SIMPLEFRAME                  = 65536
	OLEMISC_SETCLIENTSITEFIRST           = 131072
	OLEMISC_IMEMODE                      = 262144
	OLEMISC_IGNOREACTIVATEWHENVISIBLE    = 524288
	OLEMISC_WANTSTOMENUMERGE             = 1048576
	OLEMISC_SUPPORTSMULTILEVELUNDO       = 2097152
)
const ( /* oleidl.h:1166:1: */
	OLECLOSE_SAVEIFDIRTY = 0
	OLECLOSE_NOSAVE      = 1
	OLECLOSE_PROMPTSAVE  = 2
)
const ( /* oleidl.h:1504:1: */
	OLERENDER_NONE   = 0
	OLERENDER_DRAW   = 1
	OLERENDER_FORMAT = 2
	OLERENDER_ASIS   = 3
)

const ( /* oleidl.h:1631:1: */
	OLEUPDATE_ALWAYS = 1
	OLEUPDATE_ONCALL = 3
)

const ( /* oleidl.h:1639:1: */
	OLELINKBIND_EVENIFCLASSDIFF = 1
)

const ( /* oleidl.h:1835:1: */
	BINDSPEED_INDEFINITE = 1
	BINDSPEED_MODERATE   = 2
	BINDSPEED_IMMEDIATE  = 3
)

const ( /* oleidl.h:1841:1: */
	OLECONTF_EMBEDDINGS    = 1
	OLECONTF_LINKS         = 2
	OLECONTF_OTHERS        = 4
	OLECONTF_ONLYUSER      = 8
	OLECONTF_ONLYIFRUNNING = 16
)

const ( /* oleidl.h:3732:1: */
	OLEVERBATTRIB_NEVERDIRTIES    = 1
	OLEVERBATTRIB_ONCONTAINERMENU = 2
)

const ( /* oleidl.h:535:1: */
	DISCARDCACHE_SAVEIFDIRTY = 0
	DISCARDCACHE_NOSAVE      = 1
)

const ( /* propidl.h:402:1: */
	PIDMSI_STATUS_NORMAL     = 0
	PIDMSI_STATUS_NEW        = 1
	PIDMSI_STATUS_PRELIM     = 2
	PIDMSI_STATUS_DRAFT      = 3
	PIDMSI_STATUS_INPROGRESS = 4
	PIDMSI_STATUS_EDIT       = 5
	PIDMSI_STATUS_REVIEW     = 6
	PIDMSI_STATUS_PROOF      = 7
	PIDMSI_STATUS_FINAL      = 8
	PIDMSI_STATUS_OTHER      = 32767
)

// ****************************************************************************
//
// IPropertyStoreCache interface

const ( /* propsys.h:1146:1: */
	PSC_NORMAL      = 0
	PSC_NOTINSOURCE = 1
	PSC_DIRTY       = 2
	PSC_READONLY    = 3
)

// ****************************************************************************
//
// IPropertyEnumType interface

const ( /* propsys.h:1321:1: */
	PET_DISCRETEVALUE = 0
	PET_RANGEDVALUE   = 1
	PET_DEFAULTVALUE  = 2
	PET_ENDRANGE      = 3
)

// ****************************************************************************
//
// IPropertyDescription interface

const ( /* propsys.h:1692:1: */
	PDTF_DEFAULT                = 0
	PDTF_MULTIPLEVALUES         = 1
	PDTF_ISINNATE               = 2
	PDTF_ISGROUP                = 4
	PDTF_CANGROUPBY             = 8
	PDTF_CANSTACKBY             = 16
	PDTF_ISTREEPROPERTY         = 32
	PDTF_INCLUDEINFULLTEXTQUERY = 64
	PDTF_ISVIEWABLE             = 128
	PDTF_ISQUERYABLE            = 256
	PDTF_CANBEPURGED            = 512
	PDTF_SEARCHRAWVALUE         = 1024
	PDTF_ISSYSTEMPROPERTY       = 2147483648
	PDTF_MASK_ALL               = 2147485695
)

const ( /* propsys.h:1711:1: */
	PDVF_DEFAULT             = 0
	PDVF_CENTERALIGN         = 1
	PDVF_RIGHTALIGN          = 2
	PDVF_BEGINNEWGROUP       = 4
	PDVF_FILLAREA            = 8
	PDVF_SORTDESCENDING      = 16
	PDVF_SHOWONLYIFPRESENT   = 32
	PDVF_SHOWBYDEFAULT       = 64
	PDVF_SHOWINPRIMARYLIST   = 128
	PDVF_SHOWINSECONDARYLIST = 256
	PDVF_HIDELABEL           = 512
	PDVF_HIDDEN              = 2048
	PDVF_CANWRAP             = 4096
	PDVF_MASK_ALL            = 7167
)

const ( /* propsys.h:1730:1: */
	PDDT_STRING     = 0
	PDDT_NUMBER     = 1
	PDDT_BOOLEAN    = 2
	PDDT_DATETIME   = 3
	PDDT_ENUMERATED = 4
)

const ( /* propsys.h:1738:1: */
	PDGR_DISCRETE     = 0
	PDGR_ALPHANUMERIC = 1
	PDGR_SIZE         = 2
	PDGR_DYNAMIC      = 3
	PDGR_DATE         = 4
	PDGR_PERCENT      = 5
	PDGR_ENUMERATED   = 6
)

const ( /* propsys.h:1748:1: */
	PDFF_DEFAULT              = 0
	PDFF_PREFIXNAME           = 1
	PDFF_FILENAME             = 2
	PDFF_ALWAYSKB             = 4
	PDFF_RESERVED_RIGHTTOLEFT = 8
	PDFF_SHORTTIME            = 16
	PDFF_LONGTIME             = 32
	PDFF_HIDETIME             = 64
	PDFF_SHORTDATE            = 128
	PDFF_LONGDATE             = 256
	PDFF_HIDEDATE             = 512
	PDFF_RELATIVEDATE         = 1024
	PDFF_USEEDITINVITATION    = 2048
	PDFF_READONLY             = 4096
	PDFF_NOAUTOREADINGORDER   = 8192
)

const ( /* propsys.h:1768:1: */
	PDSD_GENERAL          = 0
	PDSD_A_Z              = 1
	PDSD_LOWEST_HIGHEST   = 2
	PDSD_SMALLEST_BIGGEST = 3
	PDSD_OLDEST_NEWEST    = 4
)

const ( /* propsys.h:1776:1: */
	PDRDT_GENERAL  = 0
	PDRDT_DATE     = 1
	PDRDT_SIZE     = 2
	PDRDT_COUNT    = 3
	PDRDT_REVISION = 4
	PDRDT_LENGTH   = 5
	PDRDT_DURATION = 6
	PDRDT_SPEED    = 7
	PDRDT_RATE     = 8
	PDRDT_RATING   = 9
	PDRDT_PRIORITY = 10
)

const ( /* propsys.h:1790:1: */
	PDAT_DEFAULT   = 0
	PDAT_FIRST     = 1
	PDAT_SUM       = 2
	PDAT_AVERAGE   = 3
	PDAT_DATERANGE = 4
	PDAT_UNION     = 5
	PDAT_MAX       = 6
	PDAT_MIN       = 7
)

const ( /* propsys.h:1801:1: */
	PDCOT_NONE     = 0
	PDCOT_STRING   = 1
	PDCOT_SIZE     = 2
	PDCOT_DATETIME = 3
	PDCOT_BOOLEAN  = 4
	PDCOT_NUMBER   = 5
)

// ****************************************************************************
//
// IPropertyDescriptionSearchInfo interface

const ( /* propsys.h:2675:1: */
	PDSIF_DEFAULT         = 0
	PDSIF_ININVERTEDINDEX = 1
	PDSIF_ISCOLUMN        = 2
	PDSIF_ISCOLUMNSPARSE  = 4
	PDSIF_ALWAYSINCLUDE   = 8
	PDSIF_USEFORTYPEAHEAD = 16
)

const ( /* propsys.h:2686:1: */
	PDCIT_NONE         = 0
	PDCIT_ONDISK       = 1
	PDCIT_INMEMORY     = 2
	PDCIT_ONDEMAND     = 3
	PDCIT_ONDISKALL    = 4
	PDCIT_ONDISKVECTOR = 5
)

const ( /* propsys.h:3242:1: */
	PDEF_ALL             = 0
	PDEF_SYSTEM          = 1
	PDEF_NONSYSTEM       = 2
	PDEF_VIEWABLE        = 3
	PDEF_QUERYABLE       = 4
	PDEF_INFULLTEXTQUERY = 5
	PDEF_COLUMN          = 6
)

const ( /* propsys.h:3753:1: */
	FPSPS_DEFAULT                   = 0
	FPSPS_READONLY                  = 1
	FPSPS_TREAT_NEW_VALUES_AS_DIRTY = 2
)

const ( /* propsys.h:702:1: */
	GPS_DEFAULT               = 0
	GPS_HANDLERPROPERTIESONLY = 1
	GPS_READWRITE             = 2
	GPS_TEMPORARY             = 4
	GPS_FASTPROPERTIESONLY    = 8
	GPS_OPENSLOWITEM          = 16
	GPS_DELAYCREATION         = 32
	GPS_BESTEFFORT            = 64
	GPS_NO_OPLOCK             = 128
	GPS_PREFERQUERYPROPERTIES = 256
	GPS_MASK_VALID            = 511
)

const ( /* propsys.h:807:1: */
	PKA_SET    = 0
	PKA_APPEND = 1
	PKA_DELETE = 2
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// TODO:  This isn't actual working on gcc.  Either we need to implement
//    their __try/__except/__finally feature, or we need to do at least for x64
//    emulation-code via inline-assembler ...

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

const ( /* rpcasync.h:20:3: */
	RpcNotificationTypeNone     = 0
	RpcNotificationTypeEvent    = 1
	RpcNotificationTypeApc      = 2
	RpcNotificationTypeIoc      = 3
	RpcNotificationTypeHwnd     = 4
	RpcNotificationTypeCallback = 5
)

const ( /* rpcasync.h:214:1: */
	RctInvalid    = 0
	RctNormal     = 1
	RctTraining   = 2
	RctGuaranteed = 3
)

const ( /* rpcasync.h:221:1: */
	RlafInvalid = 0
	RlafIPv4    = 1
	RlafIPv6    = 2
)

const ( /* rpcasync.h:227:1: */
	RpcNotificationCallNone         = 0
	RpcNotificationClientDisconnect = 1
	RpcNotificationCallCancel       = 2
)

const ( /* rpcasync.h:233:1: */
	RcclInvalid               = 0
	RcclLocal                 = 1
	RcclRemote                = 2
	RcclClientUnknownLocality = 3
)

const ( /* rpcasync.h:25:3: */
	RpcCallComplete    = 0
	RpcSendComplete    = 1
	RpcReceiveComplete = 2
)

const ( /* rpcasync.h:78:3: */
	EeptAnsiString    = 1
	EeptUnicodeString = 2
	EeptLongVal       = 3
	EeptShortVal      = 4
	EeptPointerVal    = 5
	EeptNone          = 6
	EeptBinary        = 7
)

const ( /* rpcdce.h:443:3: */
	RPCHTTP_RS_REDIRECT  = 1
	RPCHTTP_RS_ACCESS_1  = 2
	RPCHTTP_RS_SESSION   = 3
	RPCHTTP_RS_ACCESS_2  = 4
	RPCHTTP_RS_INTERFACE = 5
)

const ( /* rpcdcep.h:41:3: */
	PROTOCOL_NOT_LOADED     = 1
	PROTOCOL_LOADED         = 2
	PROTOCOL_ADDRESS_CHANGE = 3
)

const ( /* rpcndr.h:360:3: */
	USER_MARSHAL_CB_BUFFER_SIZE = 0
	USER_MARSHAL_CB_MARSHALL    = 1
	USER_MARSHAL_CB_UNMARSHALL  = 2
	USER_MARSHAL_CB_FREE        = 3
)

const ( /* rpcndr.h:391:3: */
	IDL_CS_NO_CONVERT         = 0
	IDL_CS_IN_PLACE_CONVERT   = 1
	IDL_CS_NEW_BUFFER_CONVERT = 2
)

const ( /* rpcndr.h:495:3: */
	XLAT_SERVER = 1
	XLAT_CLIENT = 2
)

const ( /* rpcndr.h:672:3: */
	STUB_UNMARSHAL              = 0
	STUB_CALL_SERVER            = 1
	STUB_MARSHAL                = 2
	STUB_CALL_SERVER_NO_HRESULT = 3
)

const ( /* rpcndr.h:676:3: */
	PROXY_CALCSIZE    = 0
	PROXY_GETBUFFER   = 1
	PROXY_MARSHAL     = 2
	PROXY_SENDRECEIVE = 3
	PROXY_UNMARSHAL   = 4
)

const ( /* shldisp.h:1270:1: */
	OFS_INACTIVE   = -1
	OFS_ONLINE     = 0
	OFS_OFFLINE    = 1
	OFS_SERVERBACK = 2
	OFS_DIRTYCACHE = 3
)

const ( /* shldisp.h:4345:1: */
	SFVVO_SHOWALLOBJECTS       = 1
	SFVVO_SHOWEXTENSIONS       = 2
	SFVVO_SHOWCOMPCOLOR        = 8
	SFVVO_SHOWSYSFILES         = 32
	SFVVO_WIN95CLASSIC         = 64
	SFVVO_DOUBLECLICKINWEBVIEW = 128
	SFVVO_DESKTOPHTML          = 512
)

const ( /* shldisp.h:6895:1: */
	SsfDESKTOP          = 0
	SsfPROGRAMS         = 2
	SsfCONTROLS         = 3
	SsfPRINTERS         = 4
	SsfPERSONAL         = 5
	SsfFAVORITES        = 6
	SsfSTARTUP          = 7
	SsfRECENT           = 8
	SsfSENDTO           = 9
	SsfBITBUCKET        = 10
	SsfSTARTMENU        = 11
	SsfDESKTOPDIRECTORY = 16
	SsfDRIVES           = 17
	SsfNETWORK          = 18
	SsfNETHOOD          = 19
	SsfFONTS            = 20
	SsfTEMPLATES        = 21
	SsfCOMMONSTARTMENU  = 22
	SsfCOMMONPROGRAMS   = 23
	SsfCOMMONSTARTUP    = 24
	SsfCOMMONDESKTOPDIR = 25
	SsfAPPDATA          = 26
	SsfPRINTHOOD        = 27
	SsfLOCALAPPDATA     = 28
	SsfALTSTARTUP       = 29
	SsfCOMMONALTSTARTUP = 30
	SsfCOMMONFAVORITES  = 31
	SsfINTERNETCACHE    = 32
	SsfCOOKIES          = 33
	SsfHISTORY          = 34
	SsfCOMMONAPPDATA    = 35
	SsfWINDOWS          = 36
	SsfSYSTEM           = 37
	SsfPROGRAMFILES     = 38
	SsfMYPICTURES       = 39
	SsfPROFILE          = 40
	SsfSYSTEMx86        = 41
	SsfPROGRAMFILESx86  = 48
)
const ( /* shldisp.h:7648:1: */
	ACO_NONE               = 0
	ACO_AUTOSUGGEST        = 1
	ACO_AUTOAPPEND         = 2
	ACO_SEARCH             = 4
	ACO_FILTERPREFIXES     = 8
	ACO_USETAB             = 16
	ACO_UPDOWNKEYDROPSLIST = 32
	ACO_RTLREADING         = 64
	ACO_WORD_FILTER        = 128
	ACO_NOPREFIXFILTERING  = 256
)
const ( /* shldisp.h:7773:1: */
	ACEO_NONE            = 0
	ACEO_MOSTRECENTFIRST = 1
	ACEO_FIRSTUNUSED     = 65536
)
const ( /* shlobj.h:1099:3: */
	SFBID_PIDLCHANGED = 0
)

const ( /* shlobj.h:1119:3: */
	DBCID_EMPTY      = 0
	DBCID_ONDRAG     = 1
	DBCID_CLSIDOFBAR = 2
	DBCID_RESIZE     = 3
	DBCID_GETBAR     = 4
)

const ( /* shlobj.h:1458:3: */
	FD_CLSID      = 1
	FD_SIZEPOINT  = 2
	FD_ATTRIBUTES = 4
	FD_CREATETIME = 8
	FD_ACCESSTIME = 16
	FD_WRITESTIME = 32
	FD_FILESIZE   = 64
	FD_PROGRESSUI = 16384
	FD_LINKUI     = 32768
)

const ( /* shlobj.h:1637:3: */
	SHARD_PIDL  = 1
	SHARD_PATHA = 2
	SHARD_PATHW = 3
)

const ( /* shlobj.h:1705:3: */
	SCNRT_ENABLE  = 0
	SCNRT_DISABLE = 1
)

const ( /* shlobj.h:1875:3: */
	REST_NONE                        = 0
	REST_NORUN                       = 1
	REST_NOCLOSE                     = 2
	REST_NOSAVESET                   = 4
	REST_NOFILEMENU                  = 8
	REST_NOSETFOLDERS                = 16
	REST_NOSETTASKBAR                = 32
	REST_NODESKTOP                   = 64
	REST_NOFIND                      = 128
	REST_NODRIVES                    = 256
	REST_NODRIVEAUTORUN              = 512
	REST_NODRIVETYPEAUTORUN          = 1024
	REST_NONETHOOD                   = 2048
	REST_STARTBANNER                 = 4096
	REST_RESTRICTRUN                 = 8192
	REST_NOPRINTERTABS               = 16384
	REST_NOPRINTERDELETE             = 32768
	REST_NOPRINTERADD                = 65536
	REST_NOSTARTMENUSUBFOLDERS       = 131072
	REST_MYDOCSONNET                 = 262144
	REST_NOEXITTODOS                 = 524288
	REST_ENFORCESHELLEXTSECURITY     = 1048576
	REST_LINKRESOLVEIGNORELINKINFO   = 2097152
	REST_NOCOMMONGROUPS              = 4194304
	REST_SEPARATEDESKTOPPROCESS      = 8388608
	REST_NOWEB                       = 16777216
	REST_NOTRAYCONTEXTMENU           = 33554432
	REST_NOVIEWCONTEXTMENU           = 67108864
	REST_NONETCONNECTDISCONNECT      = 134217728
	REST_STARTMENULOGOFF             = 268435456
	REST_NOSETTINGSASSIST            = 536870912
	REST_NOINTERNETICON              = 1073741825
	REST_NORECENTDOCSHISTORY         = 1073741826
	REST_NORECENTDOCSMENU            = 1073741827
	REST_NOACTIVEDESKTOP             = 1073741828
	REST_NOACTIVEDESKTOPCHANGES      = 1073741829
	REST_NOFAVORITESMENU             = 1073741830
	REST_CLEARRECENTDOCSONEXIT       = 1073741831
	REST_CLASSICSHELL                = 1073741832
	REST_NOCUSTOMIZEWEBVIEW          = 1073741833
	REST_NOHTMLWALLPAPER             = 1073741840
	REST_NOCHANGINGWALLPAPER         = 1073741841
	REST_NODESKCOMP                  = 1073741842
	REST_NOADDDESKCOMP               = 1073741843
	REST_NODELDESKCOMP               = 1073741844
	REST_NOCLOSEDESKCOMP             = 1073741845
	REST_NOCLOSE_DRAGDROPBAND        = 1073741846
	REST_NOMOVINGBAND                = 1073741847
	REST_NOEDITDESKCOMP              = 1073741848
	REST_NORESOLVESEARCH             = 1073741849
	REST_NORESOLVETRACK              = 1073741850
	REST_FORCECOPYACLWITHFILE        = 1073741851
	REST_NOLOGO3CHANNELNOTIFY        = 1073741852
	REST_NOFORGETSOFTWAREUPDATE      = 1073741853
	REST_NOSETACTIVEDESKTOP          = 1073741854
	REST_NOUPDATEWINDOWS             = 1073741855
	REST_NOCHANGESTARMENU            = 1073741856
	REST_NOFOLDEROPTIONS             = 1073741857
	REST_HASFINDCOMPUTERS            = 1073741858
	REST_INTELLIMENUS                = 1073741859
	REST_RUNDLGMEMCHECKBOX           = 1073741860
	REST_ARP_ShowPostSetup           = 1073741861
	REST_NOCSC                       = 1073741862
	REST_NOCONTROLPANEL              = 1073741863
	REST_ENUMWORKGROUP               = 1073741864
	REST_ARP_NOARP                   = 1073741865
	REST_ARP_NOREMOVEPAGE            = 1073741866
	REST_ARP_NOADDPAGE               = 1073741867
	REST_ARP_NOWINSETUPPAGE          = 1073741868
	REST_GREYMSIADS                  = 1073741869
	REST_NOCHANGEMAPPEDDRIVELABEL    = 1073741870
	REST_NOCHANGEMAPPEDDRIVECOMMENT  = 1073741871
	REST_MaxRecentDocs               = 1073741872
	REST_NONETWORKCONNECTIONS        = 1073741873
	REST_FORCESTARTMENULOGOFF        = 1073741874
	REST_NOWEBVIEW                   = 1073741875
	REST_NOCUSTOMIZETHISFOLDER       = 1073741876
	REST_NOENCRYPTION                = 1073741877
	REST_DONTSHOWSUPERHIDDEN         = 1073741879
	REST_NOSHELLSEARCHBUTTON         = 1073741880
	REST_NOHARDWARETAB               = 1073741881
	REST_NORUNASINSTALLPROMPT        = 1073741882
	REST_PROMPTRUNASINSTALLNETPATH   = 1073741883
	REST_NOMANAGEMYCOMPUTERVERB      = 1073741884
	REST_DISALLOWRUN                 = 1073741886
	REST_NOWELCOMESCREEN             = 1073741887
	REST_RESTRICTCPL                 = 1073741888
	REST_DISALLOWCPL                 = 1073741889
	REST_NOSMBALLOONTIP              = 1073741890
	REST_NOSMHELP                    = 1073741891
	REST_NOWINKEYS                   = 1073741892
	REST_NOENCRYPTONMOVE             = 1073741893
	REST_NOLOCALMACHINERUN           = 1073741894
	REST_NOCURRENTUSERRUN            = 1073741895
	REST_NOLOCALMACHINERUNONCE       = 1073741896
	REST_NOCURRENTUSERRUNONCE        = 1073741897
	REST_FORCEACTIVEDESKTOPON        = 1073741898
	REST_NOVIEWONDRIVE               = 1073741900
	REST_NONETCRAWL                  = 1073741901
	REST_NOSHAREDDOCUMENTS           = 1073741902
	REST_NOSMMYDOCS                  = 1073741903
	REST_NOSMMYPICS                  = 1073741904
	REST_ALLOWBITBUCKDRIVES          = 1073741905
	REST_NONLEGACYSHELLMODE          = 1073741906
	REST_NOCONTROLPANELBARRICADE     = 1073741907
	REST_NOSTARTPAGE                 = 1073741908
	REST_NOAUTOTRAYNOTIFY            = 1073741909
	REST_NOTASKGROUPING              = 1073741910
	REST_NOCDBURNING                 = 1073741911
	REST_MYCOMPNOPROP                = 1073741912
	REST_MYDOCSNOPROP                = 1073741913
	REST_NOSTARTPANEL                = 1073741914
	REST_NODISPLAYAPPEARANCEPAGE     = 1073741915
	REST_NOTHEMESTAB                 = 1073741916
	REST_NOVISUALSTYLECHOICE         = 1073741917
	REST_NOSIZECHOICE                = 1073741918
	REST_NOCOLORCHOICE               = 1073741919
	REST_SETVISUALSTYLE              = 1073741920
	REST_STARTRUNNOHOMEPATH          = 1073741921
	REST_NOUSERNAMEINSTARTPANEL      = 1073741922
	REST_NOMYCOMPUTERICON            = 1073741923
	REST_NOSMNETWORKPLACES           = 1073741924
	REST_NOSMPINNEDLIST              = 1073741925
	REST_NOSMMYMUSIC                 = 1073741926
	REST_NOSMEJECTPC                 = 1073741927
	REST_NOSMMOREPROGRAMS            = 1073741928
	REST_NOSMMFUPROGRAMS             = 1073741929
	REST_NOTRAYITEMSDISPLAY          = 1073741930
	REST_NOTOOLBARSONTASKBAR         = 1073741931
	REST_NOSMCONFIGUREPROGRAMS       = 1073741935
	REST_HIDECLOCK                   = 1073741936
	REST_NOLOWDISKSPACECHECKS        = 1073741937
	REST_NOENTIRENETWORK             = 1073741938
	REST_NODESKTOPCLEANUP            = 1073741939
	REST_BITBUCKNUKEONDELETE         = 1073741940
	REST_BITBUCKCONFIRMDELETE        = 1073741941
	REST_BITBUCKNOPROP               = 1073741942
	REST_NODISPBACKGROUND            = 1073741943
	REST_NODISPSCREENSAVEPG          = 1073741944
	REST_NODISPSETTINGSPG            = 1073741945
	REST_NODISPSCREENSAVEPREVIEW     = 1073741946
	REST_NODISPLAYCPL                = 1073741947
	REST_HIDERUNASVERB               = 1073741948
	REST_NOTHUMBNAILCACHE            = 1073741949
	REST_NOSTRCMPLOGICAL             = 1073741950
	REST_NOPUBLISHWIZARD             = 1073741951
	REST_NOONLINEPRINTSWIZARD        = 1073741952
	REST_NOWEBSERVICES               = 1073741953
	REST_ALLOWUNHASHEDWEBVIEW        = 1073741954
	REST_ALLOWLEGACYWEBVIEW          = 1073741955
	REST_REVERTWEBVIEWSECURITY       = 1073741956
	REST_INHERITCONSOLEHANDLES       = 1073741958
	REST_SORTMAXITEMCOUNT            = 1073741959
	REST_NOREMOTERECURSIVEEVENTS     = 1073741961
	REST_NOREMOTECHANGENOTIFY        = 1073741969
	REST_NOSIMPLENETIDLIST           = 1073741970
	REST_NOENUMENTIRENETWORK         = 1073741971
	REST_NODETAILSTHUMBNAILONNETWORK = 1073741972
	REST_NOINTERNETOPENWITH          = 1073741973
	REST_DONTRETRYBADNETNAME         = 1073741979
	REST_ALLOWFILECLSIDJUNCTIONS     = 1073741980
	REST_NOUPNPINSTALL               = 1073741981
	REST_ARP_DONTGROUPPATCHES        = 1073741996
	REST_ARP_NOCHOOSEPROGRAMSPAGE    = 1073741997
	REST_NODISCONNECT                = 1090519041
	REST_NOSECURITY                  = 1090519042
	REST_NOFILEASSOCIATE             = 1090519043
	REST_ALLOWCOMMENTTOGGLE          = 1090519044
	REST_USEDESKTOPINICACHE          = 1090519045
)

const ( /* shlobj.h:2089:3: */
	OAIF_ALLOW_REGISTRATION = 1
	OAIF_REGISTER_EXT       = 2
	OAIF_EXEC               = 4
	OAIF_FORCE_REGISTRATION = 8
)

const ( /* shlobj.h:2191:3: */
	BMICON_LARGE = 0
	BMICON_SMALL = 1
)

const ( /* shlobj.h:219:3: */
	SLDF_DEFAULT            = 0
	SLDF_HAS_ID_LIST        = 1
	SLDF_HAS_LINK_INFO      = 2
	SLDF_HAS_NAME           = 4
	SLDF_HAS_RELPATH        = 8
	SLDF_HAS_WORKINGDIR     = 16
	SLDF_HAS_ARGS           = 32
	SLDF_HAS_ICONLOCATION   = 64
	SLDF_UNICODE            = 128
	SLDF_FORCE_NO_LINKINFO  = 256
	SLDF_HAS_EXP_SZ         = 512
	SLDF_RUN_IN_SEPARATE    = 1024
	SLDF_HAS_LOGO3ID        = 2048
	SLDF_HAS_DARWINID       = 4096
	SLDF_RUNAS_USER         = 8192
	SLDF_HAS_EXP_ICON_SZ    = 16384
	SLDF_NO_PIDL_ALIAS      = 32768
	SLDF_FORCE_UNCNAME      = 65536
	SLDF_RUN_WITH_SHIMLAYER = 131072
	SLDF_RESERVED           = -2147483648
)

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

const ( /* shlobj.h:34:1: */
	SHGFP_TYPE_CURRENT = 0
	SHGFP_TYPE_DEFAULT = 1
)

const ( /* shlobj.h:878:3: */
	ISHCUTCMDID_DOWNLOADICON      = 0
	ISHCUTCMDID_INTSHORTCUTCREATE = 1
)

const ( /* shlobj.h:923:3: */
	ACLO_NONE        = 0
	ACLO_CURRENTDIR  = 1
	ACLO_MYCOMPUTER  = 2
	ACLO_DESKTOP     = 4
	ACLO_FAVORITES   = 8
	ACLO_FILESYSONLY = 16
	ACLO_FILESYSDIRS = 32
)

// ****************************************************************************
//
// IShellItemArray interface

const ( /* shobjidl.h:11310:1: */
	SIATTRIBFLAGS_AND       = 1
	SIATTRIBFLAGS_OR        = 2
	SIATTRIBFLAGS_APPCOMPAT = 3
	SIATTRIBFLAGS_MASK      = 3
	SIATTRIBFLAGS_ALLITEMS  = 16384
)

const ( /* shobjidl.h:11733:1: */
	PUIFNF_DEFAULT  = 0
	PUIFNF_MNEMONIC = 1
)

const ( /* shobjidl.h:11740:1: */
	PUIF_DEFAULT          = 0
	PUIF_RIGHTALIGN       = 1
	PUIF_NOLABELININFOTIP = 2
)

const ( /* shobjidl.h:11748:1: */
	PUIFFDF_DEFAULT      = 0
	PUIFFDF_RIGHTTOLEFT  = 1
	PUIFFDF_SHORTFORMAT  = 2
	PUIFFDF_NOTIME       = 4
	PUIFFDF_FRIENDLYDATE = 8
)

const ( /* shobjidl.h:12117:1: */
	CATINFO_NORMAL         = 0
	CATINFO_COLLAPSED      = 1
	CATINFO_HIDDEN         = 2
	CATINFO_EXPANDED       = 4
	CATINFO_NOHEADER       = 8
	CATINFO_NOTCOLLAPSIBLE = 16
	CATINFO_NOHEADERCOUNT  = 32
	CATINFO_SUBSETTED      = 64
)

const ( /* shobjidl.h:12130:1: */
	CATSORT_DEFAULT = 0
	CATSORT_NAME    = 1
)

const ( /* shobjidl.h:12615:1: */
	SLR_NO_UI                     = 1
	SLR_ANY_MATCH                 = 2
	SLR_UPDATE                    = 4
	SLR_NOUPDATE                  = 8
	SLR_NOSEARCH                  = 16
	SLR_NOTRACK                   = 32
	SLR_NOLINKINFO                = 64
	SLR_INVOKE_MSI                = 128
	SLR_NO_UI_WITH_MSG_PUMP       = 257
	SLR_OFFER_DELETE_WITHOUT_FILE = 512
	SLR_KNOWNFOLDER               = 1024
	SLR_MACHINE_IN_LOCAL_TARGET   = 2048
	SLR_UPDATE_MACHINE_AND_SID    = 4096
)

const ( /* shobjidl.h:12633:1: */
	SLGP_SHORTPATH        = 1
	SLGP_UNCPRIORITY      = 2
	SLGP_RAWPATH          = 4
	SLGP_RELATIVEPRIORITY = 8
)

// ****************************************************************************
//
// IActionProgressDialog interface

const ( /* shobjidl.h:13428:1: */
	SPINITF_NORMAL     = 0
	SPINITF_MODAL      = 1
	SPINITF_NOMINIMIZE = 8
)

// ****************************************************************************
//
// IActionProgress interface

const ( /* shobjidl.h:13953:1: */
	SPBEGINF_NORMAL          = 0
	SPBEGINF_AUTOTIME        = 2
	SPBEGINF_NOPROGRESSBAR   = 16
	SPBEGINF_MARQUEEPROGRESS = 32
	SPBEGINF_NOCANCELBUTTON  = 64
)

const ( /* shobjidl.h:13963:1: */
	SPACTION_NONE               = 0
	SPACTION_MOVING             = 1
	SPACTION_COPYING            = 2
	SPACTION_RECYCLING          = 3
	SPACTION_APPLYINGATTRIBS    = 4
	SPACTION_DOWNLOADING        = 5
	SPACTION_SEARCHING_INTERNET = 6
	SPACTION_CALCULATING        = 7
	SPACTION_UPLOADING          = 8
	SPACTION_SEARCHING_FILES    = 9
	SPACTION_DELETING           = 10
	SPACTION_RENAMING           = 11
	SPACTION_FORMATTING         = 12
	SPACTION_COPY_MOVING        = 13
)

const ( /* shobjidl.h:13980:1: */
	SPTEXT_ACTIONDESCRIPTION = 1
	SPTEXT_ACTIONDETAIL      = 2
)

// ****************************************************************************
//
// IShellPropSheetExt interface

const ( /* shobjidl.h:14207:1: */
	EXPPS_FILETYPES = 1
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

const ( /* shobjidl.h:15805:1: */
	DBID_BANDINFOCHANGED = 0
	DBID_SHOWONLY        = 1
	DBID_MAXIMIZEBAND    = 2
	DBID_PUSHCHEVRON     = 3
	DBID_DELAYINIT       = 4
	DBID_FINISHINIT      = 5
	DBID_SETWINDOWTHEME  = 6
	DBID_PERMITAUTOHIDE  = 7
)

const ( /* shobjidl.h:16443:1: */
	THBF_ENABLED        = 0
	THBF_DISABLED       = 1
	THBF_DISMISSONCLICK = 2
	THBF_NOBACKGROUND   = 4
	THBF_HIDDEN         = 8
	THBF_NONINTERACTIVE = 16
)

const ( /* shobjidl.h:16455:1: */
	THB_BITMAP  = 1
	THB_ICON    = 2
	THB_TOOLTIP = 4
	THB_FLAGS   = 8
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// ****************************************************************************
//
// ITaskbarList3 interface

const ( /* shobjidl.h:16484:1: */
	TBPF_NOPROGRESS    = 0
	TBPF_INDETERMINATE = 1
	TBPF_NORMAL        = 2
	TBPF_ERROR         = 4
	TBPF_PAUSED        = 8
)

// ****************************************************************************
//
// ITaskbarList4 interface

const ( /* shobjidl.h:16779:1: */
	STPF_NONE                      = 0
	STPF_USEAPPTHUMBNAILALWAYS     = 1
	STPF_USEAPPTHUMBNAILWHENACTIVE = 2
	STPF_USEAPPPEEKALWAYS          = 4
	STPF_USEAPPPEEKWHENACTIVE      = 8
)

// ****************************************************************************
//
// INamespaceWalk interface

const ( /* shobjidl.h:19493:1: */
	NSWF_DEFAULT                        = 0
	NSWF_NONE_IMPLIES_ALL               = 1
	NSWF_ONE_IMPLIES_ALL                = 2
	NSWF_DONT_TRAVERSE_LINKS            = 4
	NSWF_DONT_ACCUMULATE_RESULT         = 8
	NSWF_TRAVERSE_STREAM_JUNCTIONS      = 16
	NSWF_FILESYSTEM_ONLY                = 32
	NSWF_SHOW_PROGRESS                  = 64
	NSWF_FLAG_VIEWORDER                 = 128
	NSWF_IGNORE_AUTOPLAY_HIDA           = 256
	NSWF_ASYNC                          = 512
	NSWF_DONT_RESOLVE_LINKS             = 1024
	NSWF_ACCUMULATE_FOLDERS             = 2048
	NSWF_DONT_SORT                      = 4096
	NSWF_USE_TRANSFER_MEDIUM            = 8192
	NSWF_DONT_TRAVERSE_STREAM_JUNCTIONS = 16384
	NSWF_ANY_IMPLIES_ALL                = 32768
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
const ( /* shobjidl.h:19733:1: */
	BSID_BANDADDED   = 0
	BSID_BANDREMOVED = 1
)

const ( /* shobjidl.h:20056:1: */
	CDBE_RET_DEFAULT          = 0
	CDBE_RET_DONTRUNOTHEREXTS = 1
	CDBE_RET_STOPWIZARD       = 2
)

const ( /* shobjidl.h:20064:1: */
	CDBE_TYPE_MUSIC = 1
	CDBE_TYPE_DATA  = 2
	CDBE_TYPE_ALL   = -1
)

// ****************************************************************************
//
// IMenuBand interface

const ( /* shobjidl.h:20488:1: */
	MBHANDCID_PIDLSELECT = 0
)

// ****************************************************************************
//
// IMenuPopup interface

const ( /* shobjidl.h:20991:1: */
	MPOS_EXECUTE       = 0
	MPOS_FULLCANCEL    = 1
	MPOS_CANCELLEVEL   = 2
	MPOS_SELECTLEFT    = 3
	MPOS_SELECTRIGHT   = 4
	MPOS_CHILDTRACKING = 5
)

const ( /* shobjidl.h:21000:1: */
	MPPF_SETFOCUS      = 1
	MPPF_INITIALSELECT = 2
	MPPF_NOANIMATE     = 4
	MPPF_KEYBOARD      = 16
	MPPF_REPOSITION    = 32
	MPPF_FORCEZORDER   = 64
	MPPF_FINALSELECT   = 128
	MPPF_TOP           = 536870912
	MPPF_LEFT          = 1073741824
	MPPF_RIGHT         = 1610612736
	MPPF_BOTTOM        = -2147483648
	MPPF_POS_MASK      = -536870912
	MPPF_ALIGN_LEFT    = 33554432
	MPPF_ALIGN_RIGHT   = 67108864
)

const ( /* shobjidl.h:23649:1: */
	BFO_NONE                             = 0
	BFO_BROWSER_PERSIST_SETTINGS         = 1
	BFO_RENAME_FOLDER_OPTIONS_TOINTERNET = 2
	BFO_BOTH_OPTIONS                     = 4
	BIF_PREFER_INTERNET_SHORTCUT         = 8
	BFO_BROWSE_NO_IN_NEW_PROCESS         = 16
	BFO_ENABLE_HYPERLINK_TRACKING        = 32
	BFO_USE_IE_OFFLINE_SUPPORT           = 64
	BFO_SUBSTITUE_INTERNET_START_PAGE    = 128
	BFO_USE_IE_LOGOBANDING               = 256
	BFO_ADD_IE_TOCAPTIONBAR              = 512
	BFO_USE_DIALUP_REF                   = 1024
	BFO_USE_IE_TOOLBAR                   = 2048
	BFO_NO_PARENT_FOLDER_SUPPORT         = 4096
	BFO_NO_REOPEN_NEXT_RESTART           = 8192
	BFO_GO_HOME_PAGE                     = 16384
	BFO_PREFER_IEPROCESS                 = 32768
	BFO_SHOW_NAVIGATION_CANCELLED        = 65536
	BFO_USE_IE_STATUSBAR                 = 131072
	BFO_QUERY_ALL                        = -1
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

const ( /* shobjidl.h:24118:1: */
	SMIM_TYPE  = 1
	SMIM_FLAGS = 2
	SMIM_ICON  = 4
)

const ( /* shobjidl.h:24124:1: */
	SMIT_SEPARATOR = 1
	SMIT_STRING    = 2
)

const ( /* shobjidl.h:24129:1: */
	SMIF_ICON        = 1
	SMIF_ACCELERATOR = 2
	SMIF_DROPTARGET  = 4
	SMIF_SUBMENU     = 8
	SMIF_CHECKED     = 32
	SMIF_DROPCASCADE = 64
	SMIF_HIDDEN      = 128
	SMIF_DISABLED    = 256
	SMIF_TRACKPOPUP  = 512
	SMIF_DEMOTED     = 1024
	SMIF_ALTSTATE    = 2048
	SMIF_DRAGNDROP   = 4096
	SMIF_NEW         = 8192
)

const ( /* shobjidl.h:26136:1: */
	NMCII_NONE    = 0
	NMCII_ITEMS   = 1
	NMCII_FOLDERS = 2
)

const ( /* shobjidl.h:26144:1: */
	NMCSAEI_SELECT = 0
	NMCSAEI_EDIT   = 1
)

// ****************************************************************************
//
// INameSpaceTreeControl interface

const ( /* shobjidl.h:26423:1: */
	NSTCS_HASEXPANDOS         = 1
	NSTCS_HASLINES            = 2
	NSTCS_SINGLECLICKEXPAND   = 4
	NSTCS_FULLROWSELECT       = 8
	NSTCS_SPRINGEXPAND        = 16
	NSTCS_HORIZONTALSCROLL    = 32
	NSTCS_ROOTHASEXPANDO      = 64
	NSTCS_SHOWSELECTIONALWAYS = 128
	NSTCS_NOINFOTIP           = 512
	NSTCS_EVENHEIGHT          = 1024
	NSTCS_NOREPLACEOPEN       = 2048
	NSTCS_DISABLEDRAGDROP     = 4096
	NSTCS_NOORDERSTREAM       = 8192
	NSTCS_RICHTOOLTIP         = 16384
	NSTCS_BORDER              = 32768
	NSTCS_NOEDITLABELS        = 65536
	NSTCS_TABSTOP             = 131072
	NSTCS_FAVORITESMODE       = 524288
	NSTCS_AUTOHSCROLL         = 1048576
	NSTCS_FADEINOUTEXPANDOS   = 2097152
	NSTCS_EMPTYTEXT           = 4194304
	NSTCS_CHECKBOXES          = 8388608
	NSTCS_PARTIALCHECKBOXES   = 16777216
	NSTCS_EXCLUSIONCHECKBOXES = 33554432
	NSTCS_DIMMEDCHECKBOXES    = 67108864
	NSTCS_NOINDENTCHECKS      = 134217728
	NSTCS_ALLOWJUNCTIONS      = 268435456
	NSTCS_SHOWTABSBUTTON      = 536870912
	NSTCS_SHOWDELETEBUTTON    = 1073741824
	NSTCS_SHOWREFRESHBUTTON   = -2147483648
)

const ( /* shobjidl.h:26458:1: */
	NSTCRS_VISIBLE  = 0
	NSTCRS_HIDDEN   = 1
	NSTCRS_EXPANDED = 2
)

const ( /* shobjidl.h:26466:1: */
	NSTCIS_NONE             = 0
	NSTCIS_SELECTED         = 1
	NSTCIS_EXPANDED         = 2
	NSTCIS_BOLD             = 4
	NSTCIS_DISABLED         = 8
	NSTCIS_SELECTEDNOEXPAND = 16
)

const ( /* shobjidl.h:26477:1: */
	NSTCGNI_NEXT         = 0
	NSTCGNI_NEXTVISIBLE  = 1
	NSTCGNI_PREV         = 2
	NSTCGNI_PREVVISIBLE  = 3
	NSTCGNI_PARENT       = 4
	NSTCGNI_CHILD        = 5
	NSTCGNI_FIRSTVISIBLE = 6
	NSTCGNI_LASTVISIBLE  = 7
)

// ****************************************************************************
//
// INameSpaceTreeControl2 interface

const ( /* shobjidl.h:26802:1: */
	NSTCS2_DEFAULT                  = 0
	NSTCS2_INTERRUPTNOTIFICATIONS   = 1
	NSTCS2_SHOWNULLSPACEMENU        = 2
	NSTCS2_DISPLAYPADDING           = 4
	NSTCS2_DISPLAYPINNEDONLY        = 8
	NTSCS2_NOSINGLETONAUTOEXPAND    = 16
	NTSCS2_NEVERINSERTNONENUMERATED = 32
)

// ****************************************************************************
//
// INameSpaceTreeControlEvents interface

const ( /* shobjidl.h:27114:1: */
	NSTCEHT_NOWHERE         = 1
	NSTCEHT_ONITEMICON      = 2
	NSTCEHT_ONITEMLABEL     = 4
	NSTCEHT_ONITEMINDENT    = 8
	NSTCEHT_ONITEMBUTTON    = 16
	NSTCEHT_ONITEMRIGHT     = 32
	NSTCEHT_ONITEMSTATEICON = 64
	NSTCEHT_ONITEM          = 70
	NSTCEHT_ONITEMTABBUTTON = 4096
)

const ( /* shobjidl.h:27128:1: */
	NSTCECT_LBUTTON  = 1
	NSTCECT_MBUTTON  = 2
	NSTCECT_RBUTTON  = 3
	NSTCECT_BUTTON   = 3
	NSTCECT_DBLCLICK = 4
)

// ****************************************************************************
//
// IExplorerCommand interface

const ( /* shobjidl.h:28757:1: */
	ECS_ENABLED    = 0
	ECS_DISABLED   = 1
	ECS_HIDDEN     = 2
	ECS_CHECKBOX   = 4
	ECS_CHECKED    = 8
	ECS_RADIOCHECK = 16
)

const ( /* shobjidl.h:28768:1: */
	ECF_DEFAULT         = 0
	ECF_HASSUBCOMMANDS  = 1
	ECF_HASSPLITBUTTON  = 2
	ECF_HIDELABEL       = 4
	ECF_ISSEPARATOR     = 8
	ECF_HASLUASHIELD    = 16
	ECF_SEPARATORBEFORE = 32
	ECF_SEPARATORAFTER  = 64
	ECF_ISDROPDOWN      = 128
	ECF_TOGGLEABLE      = 256
	ECF_AUTOMENUICONS   = 512
)

const ( /* shobjidl.h:29426:1: */
	CPVIEW_CLASSIC  = 0
	CPVIEW_ALLITEMS = 0
	CPVIEW_CATEGORY = 1
	CPVIEW_HOME     = 1
)

// ****************************************************************************
//
// IHomeGroup interface

const ( /* shobjidl.h:30854:1: */
	HGSC_NONE             = 0
	HGSC_MUSICLIBRARY     = 1
	HGSC_PICTURESLIBRARY  = 2
	HGSC_VIDEOSLIBRARY    = 4
	HGSC_DOCUMENTSLIBRARY = 8
	HGSC_PRINTERS         = 16
)

// ****************************************************************************
//
// IShellLibrary interface

const ( /* shobjidl.h:31122:1: */
	LFF_FORCEFILESYSTEM = 1
	LFF_STORAGEITEMS    = 2
	LFF_ALLITEMS        = 3
)

const ( /* shobjidl.h:31128:1: */
	LOF_DEFAULT         = 0
	LOF_PINNEDTONAVPANE = 1
	LOF_MASK_ALL        = 1
)

const ( /* shobjidl.h:31136:1: */
	DSFT_DETECT  = 1
	DSFT_PRIVATE = 2
	DSFT_PUBLIC  = 3
)

const ( /* shobjidl.h:31142:1: */
	LSF_FAILIFTHERE      = 0
	LSF_OVERRIDEEXISTING = 1
	LSF_MAKEUNIQUENAME   = 2
)

const ( /* shobjidl.h:31431:1: */
	PE_DUCKSESSION   = 1
	PE_UNDUCKSESSION = 2
)

const ( /* shobjidl.h:31516:1: */
	ST_COMMUNICATION = 1
	ST_MEDIA         = 2
)

const ( /* shobjidl.h:31521:1: */
	PS_PLAYING = 1
	PS_PAUSED  = 2
	PS_STOPPED = 3
)

const ( /* shobjidl.h:31527:1: */
	MS_MUTED   = 1
	MS_UNMUTED = 2
)

const ( /* shobjidl.h:31640:1: */
	DFMR_DEFAULT                        = 0
	DFMR_NO_STATIC_VERBS                = 8
	DFMR_STATIC_VERBS_ONLY              = 16
	DFMR_NO_RESOURCE_VERBS              = 32
	DFMR_OPTIN_HANDLERS_ONLY            = 64
	DFMR_RESOURCE_AND_FOLDER_VERBS_ONLY = 128
	DFMR_USE_SPECIFIED_HANDLERS         = 256
	DFMR_USE_SPECIFIED_VERBS            = 512
	DFMR_NO_ASYNC_VERBS                 = 1024
)

const ( /* shobjidl.h:4121:1: */
	SHGDN_NORMAL        = 0
	SHGDN_INFOLDER      = 1
	SHGDN_FOREDITING    = 4096
	SHGDN_FORADDRESSBAR = 16384
	SHGDN_FORPARSING    = 32768
)

const ( /* shobjidl.h:4131:1: */
	SHCONTF_CHECKING_FOR_CHILDREN = 16
	SHCONTF_FOLDERS               = 32
	SHCONTF_NONFOLDERS            = 64
	SHCONTF_INCLUDEHIDDEN         = 128
	SHCONTF_INIT_ON_FIRST_NEXT    = 256
	SHCONTF_NETPRINTERSRCH        = 512
	SHCONTF_SHAREABLE             = 1024
	SHCONTF_STORAGE               = 2048
	SHCONTF_NAVIGATION_ENUM       = 4096
	SHCONTF_FASTITEMS             = 8192
	SHCONTF_FLATLIST              = 16384
	SHCONTF_ENABLE_ASYNC          = 32768
	SHCONTF_INCLUDESUPERHIDDEN    = 65536
)

const ( /* shobjidl.h:5102:1: */
	FWF_NONE                = 0
	FWF_AUTOARRANGE         = 1
	FWF_ABBREVIATEDNAMES    = 2
	FWF_SNAPTOGRID          = 4
	FWF_OWNERDATA           = 8
	FWF_BESTFITWINDOW       = 16
	FWF_DESKTOP             = 32
	FWF_SINGLESEL           = 64
	FWF_NOSUBFOLDERS        = 128
	FWF_TRANSPARENT         = 256
	FWF_NOCLIENTEDGE        = 512
	FWF_NOSCROLL            = 1024
	FWF_ALIGNLEFT           = 2048
	FWF_NOICONS             = 4096
	FWF_SHOWSELALWAYS       = 8192
	FWF_NOVISIBLE           = 16384
	FWF_SINGLECLICKACTIVATE = 32768
	FWF_NOWEBVIEW           = 65536
	FWF_HIDEFILENAMES       = 131072
	FWF_CHECKSELECT         = 262144
	FWF_NOENUMREFRESH       = 524288
	FWF_NOGROUPING          = 1048576
	FWF_FULLROWSELECT       = 2097152
	FWF_NOFILTERS           = 4194304
	FWF_NOCOLUMNHEADER      = 8388608
	FWF_NOHEADERINALLVIEWS  = 16777216
	FWF_EXTENDEDTILES       = 33554432
	FWF_TRICHECKSELECT      = 67108864
	FWF_AUTOCHECKSELECT     = 134217728
	FWF_NOBROWSERVIEWSTATE  = 268435456
	FWF_SUBSETGROUPS        = 536870912
	FWF_USESEARCHFOLDER     = 1073741824
	FWF_ALLOWRTLREADING     = 2147483648
)

const ( /* shobjidl.h:5140:1: */
	FVM_AUTO       = -1
	FVM_FIRST      = 1
	FVM_ICON       = 1
	FVM_SMALLICON  = 2
	FVM_LIST       = 3
	FVM_DETAILS    = 4
	FVM_THUMBNAIL  = 5
	FVM_TILE       = 6
	FVM_THUMBSTRIP = 7
	FVM_CONTENT    = 8
	FVM_LAST       = 8
)

// ****************************************************************************
//
// IFolderViewOptions interface

const ( /* shobjidl.h:5181:1: */
	FVO_DEFAULT           = 0
	FVO_VISTALAYOUT       = 1
	FVO_CUSTOMPOSITION    = 2
	FVO_CUSTOMORDERING    = 4
	FVO_SUPPORTHYPERLINKS = 8
	FVO_NOANIMATIONS      = 16
	FVO_NOSCROLLTIPS      = 32
)

const ( /* shobjidl.h:5277:1: */
	SVSI_DESELECT       = 0
	SVSI_SELECT         = 1
	SVSI_EDIT           = 3
	SVSI_DESELECTOTHERS = 4
	SVSI_ENSUREVISIBLE  = 8
	SVSI_FOCUSED        = 16
	SVSI_TRANSLATEPT    = 32
	SVSI_SELECTIONMARK  = 64
	SVSI_POSITIONITEM   = 128
	SVSI_CHECK          = 256
	SVSI_CHECK2         = 512
	SVSI_KEYBOARDSELECT = 1025
	SVSI_NOTAKEFOCUS    = 1073741824
)

const ( /* shobjidl.h:5297:1: */
	SVGIO_BACKGROUND     = 0
	SVGIO_SELECTION      = 1
	SVGIO_ALLVIEW        = 2
	SVGIO_CHECKED        = 3
	SVGIO_TYPE_MASK      = 15
	SVGIO_FLAG_VIEWORDER = 2147483648
)

const ( /* shobjidl.h:5310:1: */
	SVUIA_DEACTIVATE       = 0
	SVUIA_ACTIVATE_NOFOCUS = 1
	SVUIA_ACTIVATE_FOCUS   = 2
	SVUIA_INPLACEACTIVATE  = 3
)

// ****************************************************************************
//
// IShellItem interface

const ( /* shobjidl.h:8969:1: */
	SIGDN_NORMALDISPLAY               = 0
	SIGDN_PARENTRELATIVEPARSING       = -2147385343
	SIGDN_DESKTOPABSOLUTEPARSING      = -2147319808
	SIGDN_PARENTRELATIVEEDITING       = -2147282943
	SIGDN_DESKTOPABSOLUTEEDITING      = -2147172352
	SIGDN_FILESYSPATH                 = -2147123200
	SIGDN_URL                         = -2147057664
	SIGDN_PARENTRELATIVEFORADDRESSBAR = -2146975743
	SIGDN_PARENTRELATIVE              = -2146959359
	SIGDN_PARENTRELATIVEFORUI         = -2146877439
)

const ( /* shobjidl.h:8982:1: */
	SICHINT_DISPLAY                       = 0
	SICHINT_ALLFIELDS                     = -2147483648
	SICHINT_CANONICAL                     = 268435456
	SICHINT_TEST_FILESYSPATH_IF_NOT_EQUAL = 536870912
)

const ( /* shobjidl.h:9456:1: */
	SIIGBF_RESIZETOFIT    = 0
	SIIGBF_BIGGERSIZEOK   = 1
	SIIGBF_MEMORYONLY     = 2
	SIIGBF_ICONONLY       = 4
	SIIGBF_THUMBNAILONLY  = 8
	SIIGBF_INCACHEONLY    = 16
	SIIGBF_CROPTOSQUARE   = 32
	SIIGBF_WIDETHUMBNAILS = 64
	SIIGBF_ICONBACKGROUND = 128
	SIIGBF_SCALEUP        = 256
)

const ( /* shobjidl.h:9768:1: */
	STGOP_MOVE            = 1
	STGOP_COPY            = 2
	STGOP_SYNC            = 3
	STGOP_REMOVE          = 5
	STGOP_RENAME          = 6
	STGOP_APPLYPROPERTIES = 8
	STGOP_NEW             = 10
)

const ( /* shobjidl.h:9778:1: */
	TSF_NORMAL                     = 0
	TSF_FAIL_EXIST                 = 0
	TSF_RENAME_EXIST               = 1
	TSF_OVERWRITE_EXIST            = 2
	TSF_ALLOW_DECRYPTION           = 4
	TSF_NO_SECURITY                = 8
	TSF_COPY_CREATION_TIME         = 16
	TSF_COPY_WRITE_TIME            = 32
	TSF_USE_FULL_ACCESS            = 64
	TSF_DELETE_RECYCLE_IF_POSSIBLE = 128
	TSF_COPY_HARD_LINK             = 256
	TSF_COPY_LOCALIZED_NAME        = 512
	TSF_MOVE_AS_COPY_DELETE        = 1024
	TSF_SUSPEND_SHELLEVENTS        = 2048
)

const ( /* shtypes.h:152:1: */
	STRRET_WSTR   = 0
	STRRET_OFFSET = 1
	STRRET_CSTR   = 2
)

const ( /* shtypes.h:304:1: */
	SHCOLSTATE_DEFAULT            = 0
	SHCOLSTATE_TYPE_STR           = 1
	SHCOLSTATE_TYPE_INT           = 2
	SHCOLSTATE_TYPE_DATE          = 3
	SHCOLSTATE_TYPEMASK           = 15
	SHCOLSTATE_ONBYDEFAULT        = 16
	SHCOLSTATE_SLOW               = 32
	SHCOLSTATE_EXTENDED           = 64
	SHCOLSTATE_SECONDARYUI        = 128
	SHCOLSTATE_HIDDEN             = 256
	SHCOLSTATE_PREFER_VARCMP      = 512
	SHCOLSTATE_PREFER_FMTCMP      = 1024
	SHCOLSTATE_NOSORTBYFOLDERNESS = 2048
	SHCOLSTATE_VIEWONLY           = 65536
	SHCOLSTATE_BATCHREAD          = 131072
	SHCOLSTATE_NO_GROUPBY         = 262144
	SHCOLSTATE_FIXED_WIDTH        = 4096
	SHCOLSTATE_NODPISCALE         = 8192
	SHCOLSTATE_FIXED_RATIO        = 16384
	SHCOLSTATE_DISPLAYMASK        = 61440
)

const ( /* shtypes.h:331:1: */
	DEVICE_SCALE_FACTOR_INVALID = 0
	SCALE_100_PERCENT           = 100
	SCALE_120_PERCENT           = 120
	SCALE_125_PERCENT           = 125
	SCALE_140_PERCENT           = 140
	SCALE_150_PERCENT           = 150
	SCALE_160_PERCENT           = 160
	SCALE_175_PERCENT           = 175
	SCALE_180_PERCENT           = 180
	SCALE_200_PERCENT           = 200
	SCALE_225_PERCENT           = 225
	SCALE_250_PERCENT           = 250
	SCALE_300_PERCENT           = 300
	SCALE_350_PERCENT           = 350
	SCALE_400_PERCENT           = 400
	SCALE_450_PERCENT           = 450
	SCALE_500_PERCENT           = 500
)

// Headers for imported files

//** Autogenerated by WIDL 4.12.1 from include/oaidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/ocidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/propidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

const ( /* structuredquerycondition.h:63:1: */
	CT_AND_CONDITION  = 0
	CT_OR_CONDITION   = 1
	CT_NOT_CONDITION  = 2
	CT_LEAF_CONDITION = 3
)

const ( /* structuredquerycondition.h:70:1: */
	COP_IMPLICIT             = 0
	COP_EQUAL                = 1
	COP_NOTEQUAL             = 2
	COP_LESSTHAN             = 3
	COP_GREATERTHAN          = 4
	COP_LESSTHANOREQUAL      = 5
	COP_GREATERTHANOREQUAL   = 6
	COP_VALUE_STARTSWITH     = 7
	COP_VALUE_ENDSWITH       = 8
	COP_VALUE_CONTAINS       = 9
	COP_VALUE_NOTCONTAINS    = 10
	COP_DOSWILDCARDS         = 11
	COP_WORD_EQUAL           = 12
	COP_WORD_STARTSWITH      = 13
	COP_APPLICATION_SPECIFIC = 14
)

const ( /* sysinfoapi.h:70:3: */
	ComputerNameNetBIOS                   = 0
	ComputerNameDnsHostname               = 1
	ComputerNameDnsDomain                 = 2
	ComputerNameDnsFullyQualified         = 3
	ComputerNamePhysicalNetBIOS           = 4
	ComputerNamePhysicalDnsHostname       = 5
	ComputerNamePhysicalDnsDomain         = 6
	ComputerNamePhysicalDnsFullyQualified = 7
	ComputerNameMax                       = 8
)

const ( /* urlmon.h:1295:1: */
	BINDVERB_GET       = 0
	BINDVERB_POST      = 1
	BINDVERB_PUT       = 2
	BINDVERB_CUSTOM    = 3
	BINDVERB_RESERVED1 = 4
)

const ( /* urlmon.h:1303:1: */
	BINDINFOF_URLENCODESTGMEDDATA = 1
	BINDINFOF_URLENCODEDEXTRAINFO = 2
)

const ( /* urlmon.h:1308:1: */
	BINDF_ASYNCHRONOUS             = 1
	BINDF_ASYNCSTORAGE             = 2
	BINDF_NOPROGRESSIVERENDERING   = 4
	BINDF_OFFLINEOPERATION         = 8
	BINDF_GETNEWESTVERSION         = 16
	BINDF_NOWRITECACHE             = 32
	BINDF_NEEDFILE                 = 64
	BINDF_PULLDATA                 = 128
	BINDF_IGNORESECURITYPROBLEM    = 256
	BINDF_RESYNCHRONIZE            = 512
	BINDF_HYPERLINK                = 1024
	BINDF_NO_UI                    = 2048
	BINDF_SILENTOPERATION          = 4096
	BINDF_PRAGMA_NO_CACHE          = 8192
	BINDF_GETCLASSOBJECT           = 16384
	BINDF_RESERVED_1               = 32768
	BINDF_FREE_THREADED            = 65536
	BINDF_DIRECT_READ              = 131072
	BINDF_FORMS_SUBMIT             = 262144
	BINDF_GETFROMCACHE_IF_NET_FAIL = 524288
	BINDF_FROMURLMON               = 1048576
	BINDF_FWD_BACK                 = 2097152
	BINDF_PREFERDEFAULTHANDLER     = 4194304
	BINDF_ENFORCERESTRICTED        = 8388608
	BINDF_RESERVED_2               = 2147483648
	BINDF_RESERVED_3               = 16777216
	BINDF_RESERVED_4               = 33554432
	BINDF_RESERVED_5               = 67108864
	BINDF_RESERVED_6               = 134217728
	BINDF_RESERVED_7               = 1073741824
	BINDF_RESERVED_8               = 536870912
)

const ( /* urlmon.h:1342:1: */
	URL_ENCODING_NONE         = 0
	URL_ENCODING_ENABLE_UTF8  = 268435456
	URL_ENCODING_DISABLE_UTF8 = 536870912
)

const ( /* urlmon.h:1398:1: */
	BINDINFO_OPTIONS_WININETFLAG              = 65536
	BINDINFO_OPTIONS_ENABLE_UTF8              = 131072
	BINDINFO_OPTIONS_DISABLE_UTF8             = 262144
	BINDINFO_OPTIONS_USE_IE_ENCODING          = 524288
	BINDINFO_OPTIONS_BINDTOOBJECT             = 1048576
	BINDINFO_OPTIONS_SECURITYOPTOUT           = 2097152
	BINDINFO_OPTIONS_IGNOREMIMETEXTPLAIN      = 4194304
	BINDINFO_OPTIONS_USEBINDSTRINGCREDS       = 8388608
	BINDINFO_OPTIONS_IGNOREHTTPHTTPSREDIRECTS = 16777216
	BINDINFO_OPTIONS_IGNORE_SSLERRORS_ONCE    = 33554432
	BINDINFO_WPC_DOWNLOADBLOCKED              = 134217728
	BINDINFO_WPC_LOGGING_ENABLED              = 268435456
	BINDINFO_OPTIONS_ALLOWCONNECTDATA         = 536870912
	BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS     = 1073741824
	BINDINFO_OPTIONS_SHDOCVW_NAVIGATE         = -2147483648
)

const ( /* urlmon.h:1416:1: */
	BSCF_FIRSTDATANOTIFICATION        = 1
	BSCF_INTERMEDIATEDATANOTIFICATION = 2
	BSCF_LASTDATANOTIFICATION         = 4
	BSCF_DATAFULLYAVAILABLE           = 8
	BSCF_AVAILABLEDATASIZEUNKNOWN     = 16
	BSCF_SKIPDRAINDATAFORFILEURLS     = 32
	BSCF_64BITLENGTHDOWNLOAD          = 64
)

const ( /* urlmon.h:1426:1: */
	BINDSTATUS_FINDINGRESOURCE            = 1
	BINDSTATUS_CONNECTING                 = 2
	BINDSTATUS_REDIRECTING                = 3
	BINDSTATUS_BEGINDOWNLOADDATA          = 4
	BINDSTATUS_DOWNLOADINGDATA            = 5
	BINDSTATUS_ENDDOWNLOADDATA            = 6
	BINDSTATUS_BEGINDOWNLOADCOMPONENTS    = 7
	BINDSTATUS_INSTALLINGCOMPONENTS       = 8
	BINDSTATUS_ENDDOWNLOADCOMPONENTS      = 9
	BINDSTATUS_USINGCACHEDCOPY            = 10
	BINDSTATUS_SENDINGREQUEST             = 11
	BINDSTATUS_CLASSIDAVAILABLE           = 12
	BINDSTATUS_MIMETYPEAVAILABLE          = 13
	BINDSTATUS_CACHEFILENAMEAVAILABLE     = 14
	BINDSTATUS_BEGINSYNCOPERATION         = 15
	BINDSTATUS_ENDSYNCOPERATION           = 16
	BINDSTATUS_BEGINUPLOADDATA            = 17
	BINDSTATUS_UPLOADINGDATA              = 18
	BINDSTATUS_ENDUPLOADDATA              = 19
	BINDSTATUS_PROTOCOLCLASSID            = 20
	BINDSTATUS_ENCODING                   = 21
	BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE  = 22
	BINDSTATUS_CLASSINSTALLLOCATION       = 23
	BINDSTATUS_DECODING                   = 24
	BINDSTATUS_LOADINGMIMEHANDLER         = 25
	BINDSTATUS_CONTENTDISPOSITIONATTACH   = 26
	BINDSTATUS_FILTERREPORTMIMETYPE       = 27
	BINDSTATUS_CLSIDCANINSTANTIATE        = 28
	BINDSTATUS_IUNKNOWNAVAILABLE          = 29
	BINDSTATUS_DIRECTBIND                 = 30
	BINDSTATUS_RAWMIMETYPE                = 31
	BINDSTATUS_PROXYDETECTING             = 32
	BINDSTATUS_ACCEPTRANGES               = 33
	BINDSTATUS_COOKIE_SENT                = 34
	BINDSTATUS_COMPACT_POLICY_RECEIVED    = 35
	BINDSTATUS_COOKIE_SUPPRESSED          = 36
	BINDSTATUS_COOKIE_STATE_UNKNOWN       = 37
	BINDSTATUS_COOKIE_STATE_ACCEPT        = 38
	BINDSTATUS_COOKIE_STATE_REJECT        = 39
	BINDSTATUS_COOKIE_STATE_PROMPT        = 40
	BINDSTATUS_COOKIE_STATE_LEASH         = 41
	BINDSTATUS_COOKIE_STATE_DOWNGRADE     = 42
	BINDSTATUS_POLICY_HREF                = 43
	BINDSTATUS_P3P_HEADER                 = 44
	BINDSTATUS_SESSION_COOKIE_RECEIVED    = 45
	BINDSTATUS_PERSISTENT_COOKIE_RECEIVED = 46
	BINDSTATUS_SESSION_COOKIES_ALLOWED    = 47
	BINDSTATUS_CACHECONTROL               = 48
	BINDSTATUS_CONTENTDISPOSITIONFILENAME = 49
	BINDSTATUS_MIMETEXTPLAINMISMATCH      = 50
	BINDSTATUS_PUBLISHERAVAILABLE         = 51
	BINDSTATUS_DISPLAYNAMEAVAILABLE       = 52
	BINDSTATUS_SSLUX_NAVBLOCKED           = 53
	BINDSTATUS_SERVER_MIMETYPEAVAILABLE   = 54
	BINDSTATUS_SNIFFED_CLASSIDAVAILABLE   = 55
	BINDSTATUS_64BIT_PROGRESS             = 56
	BINDSTATUS_LAST                       = 56
	BINDSTATUS_RESERVED_0                 = 57
	BINDSTATUS_RESERVED_1                 = 58
	BINDSTATUS_RESERVED_2                 = 59
	BINDSTATUS_RESERVED_3                 = 60
	BINDSTATUS_RESERVED_4                 = 61
	BINDSTATUS_RESERVED_5                 = 62
	BINDSTATUS_RESERVED_6                 = 63
	BINDSTATUS_RESERVED_7                 = 64
	BINDSTATUS_RESERVED_8                 = 65
	BINDSTATUS_RESERVED_9                 = 66
	BINDSTATUS_LAST_PRIVATE               = 66
)

const ( /* urlmon.h:1722:1: */
	BINDF2_DISABLEBASICOVERHTTP              = 1
	BINDF2_DISABLEAUTOCOOKIEHANDLING         = 2
	BINDF2_READ_DATA_GREATER_THAN_4GB        = 4
	BINDF2_DISABLE_HTTP_REDIRECT_XSECURITYID = 8
	BINDF2_SETDOWNLOADMODE                   = 32
	BINDF2_DISABLE_HTTP_REDIRECT_CACHING     = 64
	BINDF2_KEEP_CALLBACK_MODULE_LOADED       = 128
	BINDF2_ALLOW_PROXY_CRED_PROMPT           = 256
	BINDF2_RESERVED_F                        = 131072
	BINDF2_RESERVED_E                        = 262144
	BINDF2_RESERVED_D                        = 524288
	BINDF2_RESERVED_C                        = 1048576
	BINDF2_RESERVED_B                        = 2097152
	BINDF2_RESERVED_A                        = 4194304
	BINDF2_RESERVED_9                        = 8388608
	BINDF2_RESERVED_8                        = 16777216
	BINDF2_RESERVED_7                        = 33554432
	BINDF2_RESERVED_6                        = 67108864
	BINDF2_RESERVED_5                        = 134217728
	BINDF2_RESERVED_4                        = 268435456
	BINDF2_RESERVED_3                        = 536870912
	BINDF2_RESERVED_2                        = 1073741824
	BINDF2_RESERVED_1                        = 2147483648
)

const ( /* urlmon.h:2028:1: */
	AUTHENTICATEF_PROXY = 1
	AUTHENTICATEF_BASIC = 2
	AUTHENTICATEF_HTTP  = 4
)

const ( /* urlmon.h:2669:1: */
	CIP_DISK_FULL                            = 0
	CIP_ACCESS_DENIED                        = 1
	CIP_NEWER_VERSION_EXISTS                 = 2
	CIP_OLDER_VERSION_EXISTS                 = 3
	CIP_NAME_CONFLICT                        = 4
	CIP_TRUST_VERIFICATION_COMPONENT_MISSING = 5
	CIP_EXE_SELF_REGISTERATION_TIMEOUT       = 6
	CIP_UNSAFE_TO_ABORT                      = 7
	CIP_NEED_REBOOT                          = 8
	CIP_NEED_REBOOT_UI_PERMISSION            = 9
)

const ( /* urlmon.h:4774:1: */
	BINDSTRING_HEADERS             = 1
	BINDSTRING_ACCEPT_MIMES        = 2
	BINDSTRING_EXTRA_URL           = 3
	BINDSTRING_LANGUAGE            = 4
	BINDSTRING_USERNAME            = 5
	BINDSTRING_PASSWORD            = 6
	BINDSTRING_UA_PIXELS           = 7
	BINDSTRING_UA_COLOR            = 8
	BINDSTRING_OS                  = 9
	BINDSTRING_USER_AGENT          = 10
	BINDSTRING_ACCEPT_ENCODINGS    = 11
	BINDSTRING_POST_COOKIE         = 12
	BINDSTRING_POST_DATA_MIME      = 13
	BINDSTRING_URL                 = 14
	BINDSTRING_IID                 = 15
	BINDSTRING_FLAG_BIND_TO_OBJECT = 16
	BINDSTRING_PTR_BIND_CONTEXT    = 17
	BINDSTRING_XDR_ORIGIN          = 18
	BINDSTRING_DOWNLOADPATH        = 19
	BINDSTRING_ROOTDOC_URL         = 20
	BINDSTRING_INITIAL_FILENAME    = 21
	BINDSTRING_PROXY_USERNAME      = 22
	BINDSTRING_PROXY_PASSWORD      = 23
)

const ( /* urlmon.h:5016:1: */
	PI_PARSE_URL            = 1
	PI_FILTER_MODE          = 2
	PI_FORCE_ASYNC          = 4
	PI_USE_WORKERTHREAD     = 8
	PI_MIMEVERIFICATION     = 16
	PI_CLSIDLOOKUP          = 32
	PI_DATAPROGRESS         = 64
	PI_SYNCHRONOUS          = 128
	PI_APARTMENTTHREADED    = 256
	PI_CLASSINSTALL         = 512
	PI_PASSONBINDCTX        = 8192
	PI_NOMIMEHANDLER        = 32768
	PI_LOADAPPDIRECT        = 16384
	PD_FORCE_SWITCH         = 65536
	PI_PREFERDEFAULTHANDLER = 131072
)

const ( /* urlmon.h:5785:1: */
	OIBDG_APARTMENTTHREADED = 256
	OIBDG_DATAONLY          = 4096
)

const ( /* urlmon.h:6168:1: */
	PARSE_CANONICALIZE       = 1
	PARSE_FRIENDLY           = 2
	PARSE_SECURITY_URL       = 3
	PARSE_ROOTDOCUMENT       = 4
	PARSE_DOCUMENT           = 5
	PARSE_ANCHOR             = 6
	PARSE_ENCODE_IS_UNESCAPE = 7
	PARSE_DECODE_IS_ESCAPE   = 8
	PARSE_PATH_FROM_URL      = 9
	PARSE_URL_FROM_PATH      = 10
	PARSE_MIME               = 11
	PARSE_SERVER             = 12
	PARSE_SCHEMA             = 13
	PARSE_SITE               = 14
	PARSE_DOMAIN             = 15
	PARSE_LOCATION           = 16
	PARSE_SECURITY_DOMAIN    = 17
	PARSE_ESCAPE             = 18
	PARSE_UNESCAPE           = 19
)

const ( /* urlmon.h:6190:1: */
	PSU_DEFAULT           = 1
	PSU_SECURITY_URL_ONLY = 2
)

const ( /* urlmon.h:6195:1: */
	QUERY_EXPIRATION_DATE              = 1
	QUERY_TIME_OF_LAST_CHANGE          = 2
	QUERY_CONTENT_ENCODING             = 3
	QUERY_CONTENT_TYPE                 = 4
	QUERY_REFRESH                      = 5
	QUERY_RECOMBINE                    = 6
	QUERY_CAN_NAVIGATE                 = 7
	QUERY_USES_NETWORK                 = 8
	QUERY_IS_CACHED                    = 9
	QUERY_IS_INSTALLEDENTRY            = 10
	QUERY_IS_CACHED_OR_MAPPED          = 11
	QUERY_USES_CACHE                   = 12
	QUERY_IS_SECURE                    = 13
	QUERY_IS_SAFE                      = 14
	QUERY_USES_HISTORYFOLDER           = 15
	QUERY_IS_CACHED_AND_USABLE_OFFLINE = 16
)

// ****************************************************************************
//
// IInternetSecurityManager interface

const ( /* urlmon.h:6653:1: */
	PUAF_DEFAULT                      = 0
	PUAF_NOUI                         = 1
	PUAF_ISFILE                       = 2
	PUAF_WARN_IF_DENIED               = 4
	PUAF_FORCEUI_FOREGROUND           = 8
	PUAF_CHECK_TIFS                   = 16
	PUAF_DONTCHECKBOXINDIALOG         = 32
	PUAF_TRUSTED                      = 64
	PUAF_ACCEPT_WILDCARD_SCHEME       = 128
	PUAF_ENFORCERESTRICTED            = 256
	PUAF_NOSAVEDFILECHECK             = 512
	PUAF_REQUIRESAVEDFILECHECK        = 1024
	PUAF_DONT_USE_CACHE               = 4096
	PUAF_RESERVED1                    = 8192
	PUAF_RESERVED2                    = 16384
	PUAF_LMZ_UNLOCKED                 = 65536
	PUAF_LMZ_LOCKED                   = 131072
	PUAF_DEFAULTZONEPOL               = 262144
	PUAF_NPL_USE_LOCKED_IF_RESTRICTED = 524288
	PUAF_NOUIIFLOCKED                 = 1048576
	PUAF_DRAGPROTOCOLCHECK            = 2097152
)
const ( /* urlmon.h:6676:1: */
	PUAFOUT_DEFAULT          = 0
	PUAFOUT_ISLOCKZONEPOLICY = 1
)

const ( /* urlmon.h:6682:1: */
	SZM_CREATE = 0
	SZM_DELETE = 1
)

const ( /* urlmon.h:7782:1: */
	URLZONE_INVALID        = -1
	URLZONE_PREDEFINED_MIN = 0
	URLZONE_LOCAL_MACHINE  = 0
	URLZONE_INTRANET       = 1
	URLZONE_TRUSTED        = 2
	URLZONE_INTERNET       = 3
	URLZONE_UNTRUSTED      = 4
	URLZONE_PREDEFINED_MAX = 999
	URLZONE_USER_MIN       = 1000
	URLZONE_USER_MAX       = 10000
)

const ( /* urlmon.h:7797:1: */
	URLTEMPLATE_CUSTOM         = 0
	URLTEMPLATE_PREDEFINED_MIN = 65536
	URLTEMPLATE_LOW            = 65536
	URLTEMPLATE_MEDLOW         = 66816
	URLTEMPLATE_MEDIUM         = 69632
	URLTEMPLATE_MEDHIGH        = 70912
	URLTEMPLATE_HIGH           = 73728
	URLTEMPLATE_PREDEFINED_MAX = 131072
)

const ( /* urlmon.h:7808:1: */
	MAX_ZONE_PATH        = 260
	MAX_ZONE_DESCRIPTION = 200
)

const ( /* urlmon.h:7813:1: */
	ZAFLAGS_CUSTOM_EDIT              = 1
	ZAFLAGS_ADD_SITES                = 2
	ZAFLAGS_REQUIRE_VERIFICATION     = 4
	ZAFLAGS_INCLUDE_PROXY_OVERRIDE   = 8
	ZAFLAGS_INCLUDE_INTRANET_SITES   = 16
	ZAFLAGS_NO_UI                    = 32
	ZAFLAGS_SUPPORTS_VERIFICATION    = 64
	ZAFLAGS_UNC_AS_INTRANET          = 128
	ZAFLAGS_DETECT_INTRANET          = 256
	ZAFLAGS_USE_LOCKED_ZONES         = 65536
	ZAFLAGS_VERIFY_TEMPLATE_SETTINGS = 131072
	ZAFLAGS_NO_CACHE                 = 262144
)

const ( /* urlmon.h:7841:1: */
	URLZONEREG_DEFAULT = 0
	URLZONEREG_HKLM    = 1
	URLZONEREG_HKCU    = 2
)

const ( /* urlmon.h:9292:1: */
	BINDHANDLETYPES_APPCACHE   = 0
	BINDHANDLETYPES_DEPENDENCY = 1
	BINDHANDLETYPES_COUNT      = 2
)

const ( /* urlmon.h:946:1: */
	MIMETYPEPROP        = 0
	USE_SRC_URL         = 1
	CLASSIDPROP         = 2
	TRUSTEDDOWNLOADPROP = 3
	POPUPLEVELPROP      = 4
)

const ( /* userenv.h:192:3: */
	RSOPUnspecified      = 0
	RSOPApplied          = 1
	RSOPIgnored          = 2
	RSOPFailed           = 3
	RSOPSubsettingFailed = 4
)

const ( /* userenv.h:79:3: */
	GPLinkUnknown            = 0
	GPLinkMachine            = 1
	GPLinkSite               = 2
	GPLinkDomain             = 3
	GPLinkOrganizationalUnit = 4
)

const ( /* wbemcli.h:452:1: */
	WBEM_GENUS_CLASS    = 1
	WBEM_GENUS_INSTANCE = 2
)
const ( /* wbemcli.h:456:1: */
	WBEM_FLAG_CREATE_OR_UPDATE  = 0
	WBEM_FLAG_UPDATE_ONLY       = 1
	WBEM_FLAG_CREATE_ONLY       = 2
	WBEM_FLAG_UPDATE_COMPATIBLE = 0
	WBEM_FLAG_UPDATE_SAFE_MODE  = 32
	WBEM_FLAG_UPDATE_FORCE_MODE = 64
	WBEM_MASK_UPDATE_MODE       = 96
	WBEM_FLAG_ADVISORY          = 65536
)
const ( /* wbemcli.h:466:1: */
	WBEM_FLAG_RETURN_IMMEDIATELY     = 16
	WBEM_FLAG_RETURN_WBEM_COMPLETE   = 0
	WBEM_FLAG_BIDIRECTIONAL          = 0
	WBEM_FLAG_FORWARD_ONLY           = 32
	WBEM_FLAG_NO_ERROR_OBJECT        = 64
	WBEM_FLAG_RETURN_ERROR_OBJECT    = 0
	WBEM_FLAG_SEND_STATUS            = 128
	WBEM_FLAG_DONT_SEND_STATUS       = 0
	WBEM_FLAG_ENSURE_LOCATABLE       = 256
	WBEM_FLAG_DIRECT_READ            = 512
	WBEM_FLAG_SEND_ONLY_SELECTED     = 0
	WBEM_RETURN_WHEN_COMPLETE        = 0
	WBEM_RETURN_IMMEDIATELY          = 16
	WBEM_MASK_RESERVED_FLAGS         = 126976
	WBEM_FLAG_USE_AMENDED_QUALIFIERS = 131072
	WBEM_FLAG_STRONG_VALIDATION      = 1048576
)
const ( /* wbemcli.h:484:1: */
	WBEM_STATUS_COMPLETE                       = 0
	WBEM_STATUS_REQUIREMENTS                   = 1
	WBEM_STATUS_PROGRESS                       = 2
	WBEM_STATUS_LOGGING_INFORMATION            = 256
	WBEM_STATUS_LOGGING_INFORMATION_PROVIDER   = 512
	WBEM_STATUS_LOGGING_INFORMATION_HOST       = 1024
	WBEM_STATUS_LOGGING_INFORMATION_REPOSITORY = 2048
	WBEM_STATUS_LOGGING_INFORMATION_ESS        = 4096
)
const ( /* wbemcli.h:494:1: */
	WBEM_NO_WAIT  = 0
	WBEM_INFINITE = 4294967295
)
const ( /* wbemcli.h:498:1: */
	WBEM_FLAG_ALWAYS                    = 0
	WBEM_FLAG_ONLY_IF_TRUE              = 1
	WBEM_FLAG_ONLY_IF_FALSE             = 2
	WBEM_FLAG_ONLY_IF_IDENTICAL         = 3
	WBEM_MASK_PRIMARY_CONDITION         = 3
	WBEM_FLAG_KEYS_ONLY                 = 4
	WBEM_FLAG_REFS_ONLY                 = 8
	WBEM_FLAG_LOCAL_ONLY                = 16
	WBEM_FLAG_PROPAGATED_ONLY           = 32
	WBEM_FLAG_SYSTEM_ONLY               = 48
	WBEM_FLAG_NONSYSTEM_ONLY            = 64
	WBEM_MASK_CONDITION_ORIGIN          = 112
	WBEM_FLAG_CLASS_OVERRIDES_ONLY      = 256
	WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES = 512
	WBEM_MASK_CLASS_CONDITION           = 768
)
const ( /* wbemcli.h:515:1: */
	WBEM_FLAVOR_DONT_PROPAGATE                  = 0
	WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE      = 1
	WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS = 2
	WBEM_FLAVOR_MASK_PROPAGATION                = 15
	WBEM_FLAVOR_OVERRIDABLE                     = 0
	WBEM_FLAVOR_NOT_OVERRIDABLE                 = 16
	WBEM_FLAVOR_MASK_PERMISSIONS                = 16
	WBEM_FLAVOR_ORIGIN_LOCAL                    = 0
	WBEM_FLAVOR_ORIGIN_PROPAGATED               = 32
	WBEM_FLAVOR_ORIGIN_SYSTEM                   = 64
	WBEM_FLAVOR_MASK_ORIGIN                     = 96
	WBEM_FLAVOR_NOT_AMENDED                     = 0
	WBEM_FLAVOR_AMENDED                         = 128
	WBEM_FLAVOR_MASK_AMENDED                    = 128
)
const ( /* wbemcli.h:531:1: */
	WBEM_FLAG_DEEP      = 0
	WBEM_FLAG_SHALLOW   = 1
	WBEM_FLAG_PROTOTYPE = 2
)
const ( /* wbemcli.h:536:1: */
	WBEM_ENABLE            = 1
	WBEM_METHOD_EXECUTE    = 2
	WBEM_FULL_WRITE_REP    = 4
	WBEM_PARTIAL_WRITE_REP = 8
	WBEM_WRITE_PROVIDER    = 16
	WBEM_REMOTE_ACCESS     = 32
	WBEM_RIGHT_SUBSCRIBE   = 64
	WBEM_RIGHT_PUBLISH     = 128
)
const ( /* wbemcli.h:546:1: */
	WBEM_FLAG_EXCLUDE_OBJECT_QUALIFIERS   = 16
	WBEM_FLAG_EXCLUDE_PROPERTY_QUALIFIERS = 32
)
const ( /* wbemcli.h:550:1: */
	WBEM_FLAG_NO_FLAVORS = 1
)
const ( /* wbemcli.h:553:1: */
	WBEM_COMPARISON_INCLUDE_ALL     = 0
	WBEM_FLAG_IGNORE_QUALIFIERS     = 1
	WBEM_FLAG_IGNORE_OBJECT_SOURCE  = 2
	WBEM_FLAG_IGNORE_DEFAULT_VALUES = 4
	WBEM_FLAG_IGNORE_CLASS          = 8
	WBEM_FLAG_IGNORE_CASE           = 16
	WBEM_FLAG_IGNORE_FLAVOR         = 32
)
const ( /* wbemcli.h:562:1: */
	WBEM_FLAG_ALLOW_READ = 1
)
const ( /* wbemcli.h:565:1: */
	CIM_ILLEGAL    = 4095
	CIM_EMPTY      = 0
	CIM_SINT8      = 16
	CIM_UINT8      = 17
	CIM_SINT16     = 2
	CIM_UINT16     = 18
	CIM_SINT32     = 3
	CIM_UINT32     = 19
	CIM_SINT64     = 20
	CIM_UINT64     = 21
	CIM_REAL32     = 4
	CIM_REAL64     = 5
	CIM_BOOLEAN    = 11
	CIM_STRING     = 8
	CIM_DATETIME   = 101
	CIM_REFERENCE  = 102
	CIM_CHAR16     = 103
	CIM_OBJECT     = 13
	CIM_FLAG_ARRAY = 8192
)
const ( /* wbemcli.h:586:1: */
	WBEM_FLAG_BACKUP_RESTORE_DEFAULT        = 0
	WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN = 1
)
const ( /* wbemcli.h:590:1: */
	WBEM_FLAG_REFRESH_AUTO_RECONNECT    = 0
	WBEM_FLAG_REFRESH_NO_AUTO_RECONNECT = 1
)
const ( /* wbemcli.h:594:1: */
	WBEM_SHUTDOWN_UNLOAD_COMPONENT = 1
	WBEM_SHUTDOWN_WMI              = 2
	WBEM_SHUTDOWN_OS               = 3
)
const ( /* wbemcli.h:599:1: */
	WBEMSTATUS_FORMAT_NEWLINE    = 0
	WBEMSTATUS_FORMAT_NO_NEWLINE = 1
)
const ( /* wbemcli.h:603:1: */
	WBEM_MAX_IDENTIFIER      = 4096
	WBEM_MAX_QUERY           = 16384
	WBEM_MAX_PATH            = 8192
	WBEM_MAX_OBJECT_NESTING  = 64
	WBEM_MAX_USER_PROPERTIES = 1024
)
const ( /* wbemcli.h:610:1: */
	WBEM_NO_ERROR                             = 0
	WBEM_S_NO_ERROR                           = 0
	WBEM_S_SAME                               = 0
	WBEM_S_FALSE                              = 1
	WBEM_S_ALREADY_EXISTS                     = 262145
	WBEM_S_RESET_TO_DEFAULT                   = 262146
	WBEM_S_DIFFERENT                          = 262147
	WBEM_S_TIMEDOUT                           = 262148
	WBEM_S_NO_MORE_DATA                       = 262149
	WBEM_S_OPERATION_CANCELLED                = 262150
	WBEM_S_PENDING                            = 262151
	WBEM_S_DUPLICATE_OBJECTS                  = 262152
	WBEM_S_ACCESS_DENIED                      = 262153
	WBEM_S_PARTIAL_RESULTS                    = 262160
	WBEM_S_SOURCE_NOT_AVAILABLE               = 262167
	WBEM_E_FAILED                             = 2147749889
	WBEM_E_NOT_FOUND                          = 2147749890
	WBEM_E_ACCESS_DENIED                      = 2147749891
	WBEM_E_PROVIDER_FAILURE                   = 2147749892
	WBEM_E_TYPE_MISMATCH                      = 2147749893
	WBEM_E_OUT_OF_MEMORY                      = 2147749894
	WBEM_E_INVALID_CONTEXT                    = 2147749895
	WBEM_E_INVALID_PARAMETER                  = 2147749896
	WBEM_E_NOT_AVAILABLE                      = 2147749897
	WBEM_E_CRITICAL_ERROR                     = 2147749898
	WBEM_E_INVALID_STREAM                     = 2147749899
	WBEM_E_NOT_SUPPORTED                      = 2147749900
	WBEM_E_INVALID_SUPERCLASS                 = 2147749901
	WBEM_E_INVALID_NAMESPACE                  = 2147749902
	WBEM_E_INVALID_OBJECT                     = 2147749903
	WBEM_E_INVALID_CLASS                      = 2147749904
	WBEM_E_PROVIDER_NOT_FOUND                 = 2147749905
	WBEM_E_INVALID_PROVIDER_REGISTRATION      = 2147749906
	WBEM_E_PROVIDER_LOAD_FAILURE              = 2147749907
	WBEM_E_INITIALIZATION_FAILURE             = 2147749908
	WBEM_E_TRANSPORT_FAILURE                  = 2147749909
	WBEM_E_INVALID_OPERATION                  = 2147749910
	WBEM_E_INVALID_QUERY                      = 2147749911
	WBEM_E_INVALID_QUERY_TYPE                 = 2147749912
	WBEM_E_ALREADY_EXISTS                     = 2147749913
	WBEM_E_OVERRIDE_NOT_ALLOWED               = 2147749914
	WBEM_E_PROPAGATED_QUALIFIER               = 2147749915
	WBEM_E_PROPAGATED_PROPERTY                = 2147749916
	WBEM_E_UNEXPECTED                         = 2147749917
	WBEM_E_ILLEGAL_OPERATION                  = 2147749918
	WBEM_E_CANNOT_BE_KEY                      = 2147749919
	WBEM_E_INCOMPLETE_CLASS                   = 2147749920
	WBEM_E_INVALID_SYNTAX                     = 2147749921
	WBEM_E_NONDECORATED_OBJECT                = 2147749922
	WBEM_E_READ_ONLY                          = 2147749923
	WBEM_E_PROVIDER_NOT_CAPABLE               = 2147749924
	WBEM_E_CLASS_HAS_CHILDREN                 = 2147749925
	WBEM_E_CLASS_HAS_INSTANCES                = 2147749926
	WBEM_E_QUERY_NOT_IMPLEMENTED              = 2147749927
	WBEM_E_ILLEGAL_NULL                       = 2147749928
	WBEM_E_INVALID_QUALIFIER_TYPE             = 2147749929
	WBEM_E_INVALID_PROPERTY_TYPE              = 2147749930
	WBEM_E_VALUE_OUT_OF_RANGE                 = 2147749931
	WBEM_E_CANNOT_BE_SINGLETON                = 2147749932
	WBEM_E_INVALID_CIM_TYPE                   = 2147749933
	WBEM_E_INVALID_METHOD                     = 2147749934
	WBEM_E_INVALID_METHOD_PARAMETERS          = 2147749935
	WBEM_E_SYSTEM_PROPERTY                    = 2147749936
	WBEM_E_INVALID_PROPERTY                   = 2147749937
	WBEM_E_CALL_CANCELLED                     = 2147749938
	WBEM_E_SHUTTING_DOWN                      = 2147749939
	WBEM_E_PROPAGATED_METHOD                  = 2147749940
	WBEM_E_UNSUPPORTED_PARAMETER              = 2147749941
	WBEM_E_MISSING_PARAMETER_ID               = 2147749942
	WBEM_E_INVALID_PARAMETER_ID               = 2147749943
	WBEM_E_NONCONSECUTIVE_PARAMETER_IDS       = 2147749944
	WBEM_E_PARAMETER_ID_ON_RETVAL             = 2147749945
	WBEM_E_INVALID_OBJECT_PATH                = 2147749946
	WBEM_E_OUT_OF_DISK_SPACE                  = 2147749947
	WBEM_E_BUFFER_TOO_SMALL                   = 2147749948
	WBEM_E_UNSUPPORTED_PUT_EXTENSION          = 2147749949
	WBEM_E_UNKNOWN_OBJECT_TYPE                = 2147749950
	WBEM_E_UNKNOWN_PACKET_TYPE                = 2147749951
	WBEM_E_MARSHAL_VERSION_MISMATCH           = 2147749952
	WBEM_E_MARSHAL_INVALID_SIGNATURE          = 2147749953
	WBEM_E_INVALID_QUALIFIER                  = 2147749954
	WBEM_E_INVALID_DUPLICATE_PARAMETER        = 2147749955
	WBEM_E_TOO_MUCH_DATA                      = 2147749956
	WBEM_E_SERVER_TOO_BUSY                    = 2147749957
	WBEM_E_INVALID_FLAVOR                     = 2147749958
	WBEM_E_CIRCULAR_REFERENCE                 = 2147749959
	WBEM_E_UNSUPPORTED_CLASS_UPDATE           = 2147749960
	WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE      = 2147749961
	WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE    = 2147749968
	WBEM_E_TOO_MANY_PROPERTIES                = 2147749969
	WBEM_E_UPDATE_TYPE_MISMATCH               = 2147749970
	WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED        = 2147749971
	WBEM_E_UPDATE_PROPAGATED_METHOD           = 2147749972
	WBEM_E_METHOD_NOT_IMPLEMENTED             = 2147749973
	WBEM_E_METHOD_DISABLED                    = 2147749974
	WBEM_E_REFRESHER_BUSY                     = 2147749975
	WBEM_E_UNPARSABLE_QUERY                   = 2147749976
	WBEM_E_NOT_EVENT_CLASS                    = 2147749977
	WBEM_E_MISSING_GROUP_WITHIN               = 2147749978
	WBEM_E_MISSING_AGGREGATION_LIST           = 2147749979
	WBEM_E_PROPERTY_NOT_AN_OBJECT             = 2147749980
	WBEM_E_AGGREGATING_BY_OBJECT              = 2147749981
	WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY     = 2147749983
	WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING     = 2147749984
	WBEM_E_QUEUE_OVERFLOW                     = 2147749985
	WBEM_E_PRIVILEGE_NOT_HELD                 = 2147749986
	WBEM_E_INVALID_OPERATOR                   = 2147749987
	WBEM_E_LOCAL_CREDENTIALS                  = 2147749988
	WBEM_E_CANNOT_BE_ABSTRACT                 = 2147749989
	WBEM_E_AMENDED_OBJECT                     = 2147749990
	WBEM_E_CLIENT_TOO_SLOW                    = 2147749991
	WBEM_E_NULL_SECURITY_DESCRIPTOR           = 2147749992
	WBEM_E_TIMED_OUT                          = 2147749993
	WBEM_E_INVALID_ASSOCIATION                = 2147749994
	WBEM_E_AMBIGUOUS_OPERATION                = 2147749995
	WBEM_E_QUOTA_VIOLATION                    = 2147749996
	WBEM_E_RESERVED_001                       = 2147749997
	WBEM_E_RESERVED_002                       = 2147749998
	WBEM_E_UNSUPPORTED_LOCALE                 = 2147749999
	WBEM_E_HANDLE_OUT_OF_DATE                 = 2147750000
	WBEM_E_CONNECTION_FAILED                  = 2147750001
	WBEM_E_INVALID_HANDLE_REQUEST             = 2147750002
	WBEM_E_PROPERTY_NAME_TOO_WIDE             = 2147750003
	WBEM_E_CLASS_NAME_TOO_WIDE                = 2147750004
	WBEM_E_METHOD_NAME_TOO_WIDE               = 2147750005
	WBEM_E_QUALIFIER_NAME_TOO_WIDE            = 2147750006
	WBEM_E_RERUN_COMMAND                      = 2147750007
	WBEM_E_DATABASE_VER_MISMATCH              = 2147750008
	WBEM_E_VETO_DELETE                        = 2147750009
	WBEM_E_VETO_PUT                           = 2147750010
	WBEM_E_INVALID_LOCALE                     = 2147750016
	WBEM_E_PROVIDER_SUSPENDED                 = 2147750017
	WBEM_E_SYNCHRONIZATION_REQUIRED           = 2147750018
	WBEM_E_NO_SCHEMA                          = 2147750019
	WBEM_E_PROVIDER_ALREADY_REGISTERED        = 2147750020
	WBEM_E_PROVIDER_NOT_REGISTERED            = 2147750021
	WBEM_E_FATAL_TRANSPORT_ERROR              = 2147750022
	WBEM_E_ENCRYPTED_CONNECTION_REQUIRED      = 2147750023
	WBEM_E_PROVIDER_TIMED_OUT                 = 2147750024
	WBEM_E_NO_KEY                             = 2147750025
	WBEM_E_PROVIDER_DISABLED                  = 2147750026
	WBEMESS_E_REGISTRATION_TOO_BROAD          = 2147753985
	WBEMESS_E_REGISTRATION_TOO_PRECISE        = 2147753986
	WBEMESS_E_AUTHZ_NOT_PRIVILEGED            = 2147753987
	WBEMMOF_E_EXPECTED_QUALIFIER_NAME         = 2147762177
	WBEMMOF_E_EXPECTED_SEMI                   = 2147762178
	WBEMMOF_E_EXPECTED_OPEN_BRACE             = 2147762179
	WBEMMOF_E_EXPECTED_CLOSE_BRACE            = 2147762180
	WBEMMOF_E_EXPECTED_CLOSE_BRACKET          = 2147762181
	WBEMMOF_E_EXPECTED_CLOSE_PAREN            = 2147762182
	WBEMMOF_E_ILLEGAL_CONSTANT_VALUE          = 2147762183
	WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER        = 2147762184
	WBEMMOF_E_EXPECTED_OPEN_PAREN             = 2147762185
	WBEMMOF_E_UNRECOGNIZED_TOKEN              = 2147762186
	WBEMMOF_E_UNRECOGNIZED_TYPE               = 2147762187
	WBEMMOF_E_EXPECTED_PROPERTY_NAME          = 2147762188
	WBEMMOF_E_TYPEDEF_NOT_SUPPORTED           = 2147762189
	WBEMMOF_E_UNEXPECTED_ALIAS                = 2147762190
	WBEMMOF_E_UNEXPECTED_ARRAY_INIT           = 2147762191
	WBEMMOF_E_INVALID_AMENDMENT_SYNTAX        = 2147762192
	WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT     = 2147762193
	WBEMMOF_E_INVALID_PRAGMA                  = 2147762194
	WBEMMOF_E_INVALID_NAMESPACE_SYNTAX        = 2147762195
	WBEMMOF_E_EXPECTED_CLASS_NAME             = 2147762196
	WBEMMOF_E_TYPE_MISMATCH                   = 2147762197
	WBEMMOF_E_EXPECTED_ALIAS_NAME             = 2147762198
	WBEMMOF_E_INVALID_CLASS_DECLARATION       = 2147762199
	WBEMMOF_E_INVALID_INSTANCE_DECLARATION    = 2147762200
	WBEMMOF_E_EXPECTED_DOLLAR                 = 2147762201
	WBEMMOF_E_CIMTYPE_QUALIFIER               = 2147762202
	WBEMMOF_E_DUPLICATE_PROPERTY              = 2147762203
	WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION = 2147762204
	WBEMMOF_E_OUT_OF_RANGE                    = 2147762205
	WBEMMOF_E_INVALID_FILE                    = 2147762206
	WBEMMOF_E_ALIASES_IN_EMBEDDED             = 2147762207
	WBEMMOF_E_NULL_ARRAY_ELEM                 = 2147762208
	WBEMMOF_E_DUPLICATE_QUALIFIER             = 2147762209
	WBEMMOF_E_EXPECTED_FLAVOR_TYPE            = 2147762210
	WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES       = 2147762211
	WBEMMOF_E_MULTIPLE_ALIASES                = 2147762212
	WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2      = 2147762213
	WBEMMOF_E_NO_ARRAYS_RETURNED              = 2147762214
	WBEMMOF_E_MUST_BE_IN_OR_OUT               = 2147762215
	WBEMMOF_E_INVALID_FLAGS_SYNTAX            = 2147762216
	WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE      = 2147762217
	WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE   = 2147762218
	WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE    = 2147762219
	WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX   = 2147762220
	WBEMMOF_E_INVALID_QUALIFIER_SYNTAX        = 2147762221
	WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE    = 2147762222
	WBEMMOF_E_ERROR_CREATING_TEMP_FILE        = 2147762223
	WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE      = 2147762224
	WBEMMOF_E_INVALID_DELETECLASS_SYNTAX      = 2147762225
)
const ( /* wbemcli.h:805:1: */
	WMI_OBJ_TEXT_CIM_DTD_2_0 = 1
	WMI_OBJ_TEXT_WMI_DTD_2_0 = 2
	WMI_OBJ_TEXT_WMI_EXT1    = 3
	WMI_OBJ_TEXT_WMI_EXT2    = 4
	WMI_OBJ_TEXT_WMI_EXT3    = 5
	WMI_OBJ_TEXT_WMI_EXT4    = 6
	WMI_OBJ_TEXT_WMI_EXT5    = 7
	WMI_OBJ_TEXT_WMI_EXT6    = 8
	WMI_OBJ_TEXT_WMI_EXT7    = 9
	WMI_OBJ_TEXT_WMI_EXT8    = 10
	WMI_OBJ_TEXT_WMI_EXT9    = 11
	WMI_OBJ_TEXT_WMI_EXT10   = 12
	WMI_OBJ_TEXT_LAST        = 13
)
const ( /* wbemcli.h:820:1: */
	WBEM_FLAG_CHECK_ONLY       = 1
	WBEM_FLAG_AUTORECOVER      = 2
	WBEM_FLAG_WMI_CHECK        = 4
	WBEM_FLAG_CONSOLE_PRINT    = 8
	WBEM_FLAG_DONT_ADD_TO_LIST = 16
	WBEM_FLAG_SPLIT_FILES      = 32
	WBEM_FLAG_STORE_FILE       = 256
)
const ( /* wbemcli.h:829:1: */
	WBEM_FLAG_CONNECT_REPOSITORY_ONLY = 64
	WBEM_FLAG_CONNECT_USE_MAX_WAIT    = 128
	WBEM_FLAG_CONNECT_PROVIDERS       = 256
)
const ( /* wbemcli.h:834:1: */
	WBEM_FLAG_UNSECAPP_DEFAULT_CHECK_ACCESS = 0
	WBEM_FLAG_UNSECAPP_CHECK_ACCESS         = 1
	WBEM_FLAG_UNSECAPP_DONT_CHECK_ACCESS    = 2
)
const ( /* wbemcli.h:839:1: */
	WBEM_FLAG_SHORT_NAME = 1
	WBEM_FLAG_LONG_NAME  = 2
)

const ( /* winbase.h:1184:3: */
	ThreadMemoryPriority      = 0
	ThreadAbsoluteCpuPriority = 1
	ThreadInformationClassMax = 2
)

const ( /* winbase.h:1279:3: */
	DEPPolicyAlwaysOff  = 0
	DEPPolicyAlwaysOn   = 1
	DEPPolicyOptIn      = 2
	DEPPolicyOptOut     = 3
	DEPTotalPolicyCount = 4
)

const ( /* winbase.h:1570:3: */
	ProcessMemoryPriority      = 0
	ProcessInformationClassMax = 1
)

const ( /* winbase.h:2216:3: */
	FindStreamInfoStandard     = 0
	FindStreamInfoMaxInfoLevel = 1
)

const ( /* wincrypt.h:3656:3: */
	KeyTypeOther             = 0
	KeyTypeVirtualSmartCard  = 1
	KeyTypePhysicalSmartCard = 2
	KeyTypePassport          = 3
	KeyTypePassportRemote    = 4
	KeyTypePassportSmartCard = 5
	KeyTypeHardware          = 6
	KeyTypeSoftware          = 7
	KeyTypeSelfSigned        = 8
)

const ( /* windef.h:157:1: */
	DPI_AWARENESS_INVALID           = -1
	DPI_AWARENESS_UNAWARE           = 0
	DPI_AWARENESS_SYSTEM_AWARE      = 1
	DPI_AWARENESS_PER_MONITOR_AWARE = 2
)

const ( /* windef.h:170:1: */
	DPI_HOSTING_BEHAVIOR_INVALID = -1
	DPI_HOSTING_BEHAVIOR_DEFAULT = 0
	DPI_HOSTING_BEHAVIOR_MIXED   = 1
)

const ( /* winioctl.h:1231:1: */
	DeviceProblemNone                 = 0
	DeviceProblemHardware             = 1
	DeviceProblemCHMError             = 2
	DeviceProblemDoorOpen             = 3
	DeviceProblemCalibrationError     = 4
	DeviceProblemTargetFailure        = 5
	DeviceProblemCHMMoveError         = 6
	DeviceProblemCHMZeroError         = 7
	DeviceProblemCartridgeInsertError = 8
	DeviceProblemPositionError        = 9
	DeviceProblemSensorError          = 10
	DeviceProblemCartridgeEjectError  = 11
	DeviceProblemGripperError         = 12
	DeviceProblemDriveError           = 13
)

const ( /* winioctl.h:1762:1: */
	StorageDeviceProperty            = 0
	StorageAdapterProperty           = 1
	StorageDeviceIdProperty          = 2
	StorageDeviceUniqueIdProperty    = 3
	StorageDeviceWriteCacheProperty  = 4
	StorageMiniportProperty          = 5
	StorageAccessAlignmentProperty   = 6
	StorageDeviceSeekPenaltyProperty = 7
	StorageDeviceTrimProperty        = 8
)

const ( /* winioctl.h:1774:1: */
	PropertyStandardQuery   = 0
	PropertyExistsQuery     = 1
	PropertyMaskQuery       = 2
	PropertyQueryMaxDefined = 3
)

const ( /* winioctl.h:292:3: */
	DDS_4mm            = 32
	MiniQic            = 33
	Travan             = 34
	QIC                = 35
	MP_8mm             = 36
	AME_8mm            = 37
	AIT1_8mm           = 38
	DLT                = 39
	NCTP               = 40
	IBM_3480           = 41
	IBM_3490E          = 42
	IBM_Magstar_3590   = 43
	IBM_Magstar_MP     = 44
	STK_DATA_D3        = 45
	SONY_DTF           = 46
	DV_6mm             = 47
	DMI                = 48
	SONY_D2            = 49
	CLEANER_CARTRIDGE  = 50
	CD_ROM             = 51
	CD_R               = 52
	CD_RW              = 53
	DVD_ROM            = 54
	DVD_R              = 55
	DVD_RW             = 56
	MO_3_RW            = 57
	MO_5_WO            = 58
	MO_5_RW            = 59
	MO_5_LIMDOW        = 60
	PC_5_WO            = 61
	PC_5_RW            = 62
	PD_5_RW            = 63
	ABL_5_WO           = 64
	PINNACLE_APEX_5_RW = 65
	SONY_12_WO         = 66
	PHILIPS_12_WO      = 67
	HITACHI_12_WO      = 68
	CYGNET_12_WO       = 69
	KODAK_14_WO        = 70
	MO_NFR_525         = 71
	NIKON_12_RW        = 72
	IOMEGA_ZIP         = 73
	IOMEGA_JAZ         = 74
	SYQUEST_EZ135      = 75
	SYQUEST_EZFLYER    = 76
	SYQUEST_SYJET      = 77
	AVATAR_F2          = 78
	MP2_8mm            = 79
	DST_S              = 80
	DST_M              = 81
	DST_L              = 82
	VXATape_1          = 83
	VXATape_2          = 84
	STK_9840           = 85
	LTO_Ultrium        = 86
	LTO_Accelis        = 87
	DVD_RAM            = 88
	AIT_8mm            = 89
	ADR_1              = 90
	ADR_2              = 91
	STK_9940           = 92
	SAIT               = 93
	VXATape            = 94
)

const ( /* winioctl.h:366:3: */
	BusTypeUnknown     = 0
	BusTypeScsi        = 1
	BusTypeAtapi       = 2
	BusTypeAta         = 3
	BusType1394        = 4
	BusTypeSsa         = 5
	BusTypeFibre       = 6
	BusTypeUsb         = 7
	BusTypeRAID        = 8
	BusTypeMax         = 9
	BusTypeMaxReserved = 127
)

const ( /* winioctl.h:525:1: */
	Unknown        = 0
	F5_1Pt2_512    = 1
	F3_1Pt44_512   = 2
	F3_2Pt88_512   = 3
	F3_20Pt8_512   = 4
	F3_720_512     = 5
	F5_360_512     = 6
	F5_320_512     = 7
	F5_320_1024    = 8
	F5_180_512     = 9
	F5_160_512     = 10
	RemovableMedia = 11
	FixedMedia     = 12
	F3_120M_512    = 13
	F3_640_512     = 14
	F5_640_512     = 15
	F5_720_512     = 16
	F3_1Pt2_512    = 17
	F3_1Pt23_1024  = 18
	F5_1Pt23_1024  = 19
	F3_128Mb_512   = 20
	F3_230Mb_512   = 21
	F8_256_128     = 22
	F3_200Mb_512   = 23
	F3_240M_512    = 24
	F3_32M_512     = 25
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

const ( /* winioctl.h:603:1: */
	PARTITION_STYLE_MBR = 0
	PARTITION_STYLE_GPT = 1
	PARTITION_STYLE_RAW = 2
)

const ( /* winioctl.h:693:1: */
	DetectNone    = 0
	DetectInt13   = 1
	DetectExInt13 = 2
)

const ( /* winioctl.h:755:1: */
	EqualPriority      = 0
	KeepPrefetchedData = 1
	KeepReadData       = 2
)

const ( /* winioctl.h:846:1: */
	RequestSize     = 0
	RequestLocation = 1
)

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

const ( /* winioctl.h:994:1: */
	AllElements       = 0
	ChangerTransport  = 1
	ChangerSlot       = 2
	ChangerIEPort     = 3
	ChangerDrive      = 4
	ChangerDoor       = 5
	ChangerKeypad     = 6
	ChangerMaxElement = 7
)

const ( /* winnls.h:720:3: */
	COMPARE_STRING = 1
)

const ( /* winnls.h:756:3: */
	GEO_NATION            = 1
	GEO_LATITUDE          = 2
	GEO_LONGITUDE         = 3
	GEO_ISO2              = 4
	GEO_ISO3              = 5
	GEO_RFC1766           = 6
	GEO_LCID              = 7
	GEO_FRIENDLYNAME      = 8
	GEO_OFFICIALNAME      = 9
	GEO_TIMEZONES         = 10
	GEO_OFFICIALLANGUAGES = 11
	GEO_ISO_UN_NUMBER     = 12
	GEO_PARENT            = 13
)

const ( /* winnls.h:772:3: */
	GEOCLASS_NATION = 16
	GEOCLASS_REGION = 14
	GEOCLASS_ALL    = 0
)

const ( /* winnt.h:2946:5: */
	SidTypeUser           = 1
	SidTypeGroup          = 2
	SidTypeDomain         = 3
	SidTypeAlias          = 4
	SidTypeWellKnownGroup = 5
	SidTypeDeletedAccount = 6
	SidTypeInvalid        = 7
	SidTypeUnknown        = 8
	SidTypeComputer       = 9
	SidTypeLabel          = 10
	SidTypeLogonSession   = 11
)

const ( /* winnt.h:3189:5: */
	WinNullSid                                    = 0
	WinWorldSid                                   = 1
	WinLocalSid                                   = 2
	WinCreatorOwnerSid                            = 3
	WinCreatorGroupSid                            = 4
	WinCreatorOwnerServerSid                      = 5
	WinCreatorGroupServerSid                      = 6
	WinNtAuthoritySid                             = 7
	WinDialupSid                                  = 8
	WinNetworkSid                                 = 9
	WinBatchSid                                   = 10
	WinInteractiveSid                             = 11
	WinServiceSid                                 = 12
	WinAnonymousSid                               = 13
	WinProxySid                                   = 14
	WinEnterpriseControllersSid                   = 15
	WinSelfSid                                    = 16
	WinAuthenticatedUserSid                       = 17
	WinRestrictedCodeSid                          = 18
	WinTerminalServerSid                          = 19
	WinRemoteLogonIdSid                           = 20
	WinLogonIdsSid                                = 21
	WinLocalSystemSid                             = 22
	WinLocalServiceSid                            = 23
	WinNetworkServiceSid                          = 24
	WinBuiltinDomainSid                           = 25
	WinBuiltinAdministratorsSid                   = 26
	WinBuiltinUsersSid                            = 27
	WinBuiltinGuestsSid                           = 28
	WinBuiltinPowerUsersSid                       = 29
	WinBuiltinAccountOperatorsSid                 = 30
	WinBuiltinSystemOperatorsSid                  = 31
	WinBuiltinPrintOperatorsSid                   = 32
	WinBuiltinBackupOperatorsSid                  = 33
	WinBuiltinReplicatorSid                       = 34
	WinBuiltinPreWindows2000CompatibleAccessSid   = 35
	WinBuiltinRemoteDesktopUsersSid               = 36
	WinBuiltinNetworkConfigurationOperatorsSid    = 37
	WinAccountAdministratorSid                    = 38
	WinAccountGuestSid                            = 39
	WinAccountKrbtgtSid                           = 40
	WinAccountDomainAdminsSid                     = 41
	WinAccountDomainUsersSid                      = 42
	WinAccountDomainGuestsSid                     = 43
	WinAccountComputersSid                        = 44
	WinAccountControllersSid                      = 45
	WinAccountCertAdminsSid                       = 46
	WinAccountSchemaAdminsSid                     = 47
	WinAccountEnterpriseAdminsSid                 = 48
	WinAccountPolicyAdminsSid                     = 49
	WinAccountRasAndIasServersSid                 = 50
	WinNTLMAuthenticationSid                      = 51
	WinDigestAuthenticationSid                    = 52
	WinSChannelAuthenticationSid                  = 53
	WinThisOrganizationSid                        = 54
	WinOtherOrganizationSid                       = 55
	WinBuiltinIncomingForestTrustBuildersSid      = 56
	WinBuiltinPerfMonitoringUsersSid              = 57
	WinBuiltinPerfLoggingUsersSid                 = 58
	WinBuiltinAuthorizationAccessSid              = 59
	WinBuiltinTerminalServerLicenseServersSid     = 60
	WinBuiltinDCOMUsersSid                        = 61
	WinBuiltinIUsersSid                           = 62
	WinIUserSid                                   = 63
	WinBuiltinCryptoOperatorsSid                  = 64
	WinUntrustedLabelSid                          = 65
	WinLowLabelSid                                = 66
	WinMediumLabelSid                             = 67
	WinHighLabelSid                               = 68
	WinSystemLabelSid                             = 69
	WinWriteRestrictedCodeSid                     = 70
	WinCreatorOwnerRightsSid                      = 71
	WinCacheablePrincipalsGroupSid                = 72
	WinNonCacheablePrincipalsGroupSid             = 73
	WinEnterpriseReadonlyControllersSid           = 74
	WinAccountReadonlyControllersSid              = 75
	WinBuiltinEventLogReadersGroup                = 76
	WinNewEnterpriseReadonlyControllersSid        = 77
	WinBuiltinCertSvcDComAccessGroup              = 78
	WinMediumPlusLabelSid                         = 79
	WinLocalLogonSid                              = 80
	WinConsoleLogonSid                            = 81
	WinThisOrganizationCertificateSid             = 82
	WinApplicationPackageAuthoritySid             = 83
	WinBuiltinAnyPackageSid                       = 84
	WinCapabilityInternetClientSid                = 85
	WinCapabilityInternetClientServerSid          = 86
	WinCapabilityPrivateNetworkClientServerSid    = 87
	WinCapabilityPicturesLibrarySid               = 88
	WinCapabilityVideosLibrarySid                 = 89
	WinCapabilityMusicLibrarySid                  = 90
	WinCapabilityDocumentsLibrarySid              = 91
	WinCapabilitySharedUserCertificatesSid        = 92
	WinCapabilityEnterpriseAuthenticationSid      = 93
	WinCapabilityRemovableStorageSid              = 94
	WinBuiltinRDSRemoteAccessServersSid           = 95
	WinBuiltinRDSEndpointServersSid               = 96
	WinBuiltinRDSManagementServersSid             = 97
	WinUserModeDriversSid                         = 98
	WinBuiltinHyperVAdminsSid                     = 99
	WinAccountCloneableControllersSid             = 100
	WinBuiltinAccessControlAssistanceOperatorsSid = 101
	WinBuiltinRemoteManagementUsersSid            = 102
	WinAuthenticationAuthorityAssertedSid         = 103
	WinAuthenticationServiceAssertedSid           = 104
	WinLocalAccountSid                            = 105
	WinLocalAccountAndAdministratorSid            = 106
	WinAccountProtectedUsersSid                   = 107
	WinCapabilityAppointmentsSid                  = 108
	WinCapabilityContactsSid                      = 109
	WinAccountDefaultSystemManagedSid             = 110
	WinBuiltinDefaultSystemManagedGroupSid        = 111
	WinBuiltinStorageReplicaAdminsSid             = 112
	WinAccountKeyAdminsSid                        = 113
	WinAccountEnterpriseKeyAdminsSid              = 114
	WinAuthenticationKeyTrustSid                  = 115
	WinAuthenticationKeyPropertyMFASid            = 116
	WinAuthenticationKeyPropertyAttestationSid    = 117
)

const ( /* winnt.h:3500:5: */
	AclRevisionInformation = 1
	AclSizeInformation     = 2
)

const ( /* winnt.h:3570:5: */
	AuditEventObjectAccess           = 0
	AuditEventDirectoryServiceAccess = 1
)

const ( /* winnt.h:3602:5: */
	AccessReasonNone                     = 0
	AccessReasonAllowedAce               = 65536
	AccessReasonDeniedAce                = 131072
	AccessReasonAllowedParentAce         = 196608
	AccessReasonDeniedParentAce          = 262144
	AccessReasonNotGrantedByCape         = 327680
	AccessReasonNotGrantedByParentCape   = 393216
	AccessReasonNotGrantedToAppContainer = 458752
	AccessReasonMissingPrivilege         = 1048576
	AccessReasonFromPrivilege            = 2097152
	AccessReasonIntegrityLevel           = 3145728
	AccessReasonOwnership                = 4194304
	AccessReasonNullDacl                 = 5242880
	AccessReasonEmptyDacl                = 6291456
	AccessReasonNoSD                     = 7340032
	AccessReasonNoGrant                  = 8388608
)

const ( /* winnt.h:3692:5: */
	SecurityAnonymous      = 0
	SecurityIdentification = 1
	SecurityImpersonation  = 2
	SecurityDelegation     = 3
)

const ( /* winnt.h:3719:5: */
	TokenPrimary       = 1
	TokenImpersonation = 2
)

const ( /* winnt.h:3724:5: */
	TokenElevationTypeDefault = 1
	TokenElevationTypeFull    = 2
	TokenElevationTypeLimited = 3
)

const ( /* winnt.h:3730:5: */
	TokenUser                            = 1
	TokenGroups                          = 2
	TokenPrivileges                      = 3
	TokenOwner                           = 4
	TokenPrimaryGroup                    = 5
	TokenDefaultDacl                     = 6
	TokenSource                          = 7
	TokenType                            = 8
	TokenImpersonationLevel              = 9
	TokenStatistics                      = 10
	TokenRestrictedSids                  = 11
	TokenSessionId                       = 12
	TokenGroupsAndPrivileges             = 13
	TokenSessionReference                = 14
	TokenSandBoxInert                    = 15
	TokenAuditPolicy                     = 16
	TokenOrigin                          = 17
	TokenElevationType                   = 18
	TokenLinkedToken                     = 19
	TokenElevation                       = 20
	TokenHasRestrictions                 = 21
	TokenAccessInformation               = 22
	TokenVirtualizationAllowed           = 23
	TokenVirtualizationEnabled           = 24
	TokenIntegrityLevel                  = 25
	TokenUIAccess                        = 26
	TokenMandatoryPolicy                 = 27
	TokenLogonSid                        = 28
	TokenIsAppContainer                  = 29
	TokenCapabilities                    = 30
	TokenAppContainerSid                 = 31
	TokenAppContainerNumber              = 32
	TokenUserClaimAttributes             = 33
	TokenDeviceClaimAttributes           = 34
	TokenRestrictedUserClaimAttributes   = 35
	TokenRestrictedDeviceClaimAttributes = 36
	TokenDeviceGroups                    = 37
	TokenRestrictedDeviceGroups          = 38
	TokenSecurityAttributes              = 39
	TokenIsRestricted                    = 40
	MaxTokenInfoClass                    = 41
)

const ( /* winnt.h:3898:5: */
	MandatoryLevelUntrusted     = 0
	MandatoryLevelLow           = 1
	MandatoryLevelMedium        = 2
	MandatoryLevelHigh          = 3
	MandatoryLevelSystem        = 4
	MandatoryLevelSecureProcess = 5
	MandatoryLevelCount         = 6
)

const ( /* winnt.h:4024:5: */
	SeLearningModeInvalidType = 0
	SeLearningModeSettings    = 1
	SeLearningModeMax         = 2
)

const ( /* winnt.h:4228:5: */
	PMCCounter             = 0
	MaxHardwareCounterType = 1
)

const ( /* winnt.h:4233:5: */
	ProcessDEPPolicy                   = 0
	ProcessASLRPolicy                  = 1
	ProcessDynamicCodePolicy           = 2
	ProcessStrictHandleCheckPolicy     = 3
	ProcessSystemCallDisablePolicy     = 4
	ProcessMitigationOptionsMask       = 5
	ProcessExtensionPointDisablePolicy = 6
	ProcessControlFlowGuardPolicy      = 7
	ProcessSignaturePolicy             = 8
	ProcessFontDisablePolicy           = 9
	ProcessImageLoadPolicy             = 10
	MaxProcessMitigationPolicy         = 11
)

const ( /* winnt.h:4431:5: */
	ToleranceLow    = 1
	ToleranceMedium = 2
	ToleranceHigh   = 3
)

const ( /* winnt.h:4437:5: */
	ToleranceIntervalShort  = 1
	ToleranceIntervalMedium = 2
	ToleranceIntervalLong   = 3
)

const ( /* winnt.h:4556:5: */
	JobObjectBasicAccountingInformation         = 1
	JobObjectBasicLimitInformation              = 2
	JobObjectBasicProcessIdList                 = 3
	JobObjectBasicUIRestrictions                = 4
	JobObjectSecurityLimitInformation           = 5
	JobObjectEndOfJobTimeInformation            = 6
	JobObjectAssociateCompletionPortInformation = 7
	JobObjectBasicAndIoAccountingInformation    = 8
	JobObjectExtendedLimitInformation           = 9
	JobObjectJobSetInformation                  = 10
	JobObjectGroupInformation                   = 11
	JobObjectNotificationLimitInformation       = 12
	JobObjectLimitViolationInformation          = 13
	JobObjectGroupInformationEx                 = 14
	JobObjectCpuRateControlInformation          = 15
	JobObjectCompletionFilter                   = 16
	JobObjectCompletionCounter                  = 17
	JobObjectReserved1Information               = 18
	JobObjectReserved2Information               = 19
	JobObjectReserved3Information               = 20
	JobObjectReserved4Information               = 21
	JobObjectReserved5Information               = 22
	JobObjectReserved6Information               = 23
	JobObjectReserved7Information               = 24
	JobObjectReserved8Information               = 25
	MaxJobObjectInfoClass                       = 26
)

const ( /* winnt.h:4580:5: */
	FirmwareTypeUnknown = 0
	FirmwareTypeBios    = 1
	FirmwareTypeUefi    = 2
	FirmwareTypeMax     = 3
)

const ( /* winnt.h:4605:5: */
	RelationProcessorCore    = 0
	RelationNumaNode         = 1
	RelationCache            = 2
	RelationProcessorPackage = 3
	RelationGroup            = 4
	RelationAll              = 65535
)

const ( /* winnt.h:4612:5: */
	CacheUnified     = 0
	CacheInstruction = 1
	CacheData        = 2
	CacheTrace       = 3
)

const ( /* winnt.h:467:1: */
	UNSPECIFIED_COMPARTMENT_ID = 0
	DEFAULT_COMPARTMENT_ID     = 1
)

const ( /* winnt.h:4908:3: */
	MemExtendedParameterInvalidType         = 0
	MemExtendedParameterAddressRequirements = 1
	MemExtendedParameterNumaNode            = 2
	MemExtendedParameterPartitionHandle     = 3
	MemExtendedParameterUserPhysicalHandle  = 4
	MemExtendedParameterAttributeFlags      = 5
	MemExtendedParameterMax                 = 6
)

const ( /* winnt.h:4946:3: */
	MemSectionExtendedParameterInvalidType       = 0
	MemSectionExtendedParameterUserPhysicalFlags = 1
	MemSectionExtendedParameterNumaNode          = 2
	MemSectionExtendedParameterMax               = 3
)

const ( /* winnt.h:5346:3: */
	PowerSystemUnspecified = 0
	PowerSystemWorking     = 1
	PowerSystemSleeping1   = 2
	PowerSystemSleeping2   = 3
	PowerSystemSleeping3   = 4
	PowerSystemHibernate   = 5
	PowerSystemShutdown    = 6
	PowerSystemMaximum     = 7
)

const ( /* winnt.h:5352:3: */
	PowerActionNone          = 0
	PowerActionReserved      = 1
	PowerActionSleep         = 2
	PowerActionHibernate     = 3
	PowerActionShutdown      = 4
	PowerActionShutdownReset = 5
	PowerActionShutdownOff   = 6
	PowerActionWarmEject     = 7
)

const ( /* winnt.h:5358:3: */
	PowerDeviceUnspecified = 0
	PowerDeviceD0          = 1
	PowerDeviceD1          = 2
	PowerDeviceD2          = 3
	PowerDeviceD3          = 4
	PowerDeviceMaximum     = 5
)

const ( /* winnt.h:5363:3: */
	PowerMonitorOff = 0
	PowerMonitorOn  = 1
	PowerMonitorDim = 2
)

const ( /* winnt.h:5367:3: */
	PowerUserPresent    = 0
	PowerUserNotPresent = 1
	PowerUserInactive   = 2
	PowerUserMaximum    = 3
	PowerUserInvalid    = 3
)

const ( /* winnt.h:5383:3: */
	LT_DONT_CARE      = 0
	LT_LOWEST_LATENCY = 1
)

const ( /* winnt.h:5398:3: */
	PowerRequestDisplayRequired   = 0
	PowerRequestSystemRequired    = 1
	PowerRequestAwayModeRequired  = 2
	PowerRequestExecutionRequired = 3
)

const ( /* winnt.h:5426:5: */
	SystemPowerPolicyAc                = 0
	SystemPowerPolicyDc                = 1
	VerifySystemPolicyAc               = 2
	VerifySystemPolicyDc               = 3
	SystemPowerCapabilities            = 4
	SystemBatteryState                 = 5
	SystemPowerStateHandler            = 6
	ProcessorStateHandler              = 7
	SystemPowerPolicyCurrent           = 8
	AdministratorPowerPolicy           = 9
	SystemReserveHiberFile             = 10
	ProcessorInformation               = 11
	SystemPowerInformation             = 12
	ProcessorStateHandler2             = 13
	LastWakeTime                       = 14
	LastSleepTime                      = 15
	SystemExecutionState               = 16
	SystemPowerStateNotifyHandler      = 17
	ProcessorPowerPolicyAc             = 18
	ProcessorPowerPolicyDc             = 19
	VerifyProcessorPowerPolicyAc       = 20
	VerifyProcessorPowerPolicyDc       = 21
	ProcessorPowerPolicyCurrent        = 22
	SystemPowerStateLogging            = 23
	SystemPowerLoggingEntry            = 24
	SetPowerSettingValue               = 25
	NotifyUserPowerSetting             = 26
	PowerInformationLevelUnused0       = 27
	SystemMonitorHiberBootPowerOff     = 28
	SystemVideoState                   = 29
	TraceApplicationPowerMessage       = 30
	TraceApplicationPowerMessageEnd    = 31
	ProcessorPerfStates                = 32
	ProcessorIdleStates                = 33
	ProcessorCap                       = 34
	SystemWakeSource                   = 35
	SystemHiberFileInformation         = 36
	TraceServicePowerMessage           = 37
	ProcessorLoad                      = 38
	PowerShutdownNotification          = 39
	MonitorCapabilities                = 40
	SessionPowerInit                   = 41
	SessionDisplayState                = 42
	PowerRequestCreate                 = 43
	PowerRequestAction                 = 44
	GetPowerRequestList                = 45
	ProcessorInformationEx             = 46
	NotifyUserModeLegacyPowerEvent     = 47
	GroupPark                          = 48
	ProcessorIdleDomains               = 49
	WakeTimerList                      = 50
	SystemHiberFileSize                = 51
	ProcessorIdleStatesHv              = 52
	ProcessorPerfStatesHv              = 53
	ProcessorPerfCapHv                 = 54
	ProcessorSetIdle                   = 55
	LogicalProcessorIdling             = 56
	UserPresence                       = 57
	PowerSettingNotificationName       = 58
	GetPowerSettingValue               = 59
	IdleResiliency                     = 60
	SessionRITState                    = 61
	SessionConnectNotification         = 62
	SessionPowerCleanup                = 63
	SessionLockState                   = 64
	SystemHiberbootState               = 65
	PlatformInformation                = 66
	PdcInvocation                      = 67
	MonitorInvocation                  = 68
	FirmwareTableInformationRegistered = 69
	SetShutdownSelectedTime            = 70
	SuspendResumeInvocation            = 71
	PlmPowerRequestCreate              = 72
	ScreenOff                          = 73
	CsDeviceNotification               = 74
	PlatformRole                       = 75
	LastResumePerformance              = 76
	DisplayBurst                       = 77
	ExitLatencySamplingPercentage      = 78
	ApplyLowPowerScenarioSettings      = 79
	PowerInformationLevelMaximum       = 80
)

const ( /* winnt.h:5510:5: */
	UserNotPresent = 0
	UserPresent    = 1
	UserUnknown    = 255
)

const ( /* winnt.h:5546:5: */
	MonitorRequestReasonUnknown                 = 0
	MonitorRequestReasonPowerButton             = 1
	MonitorRequestReasonRemoteConnection        = 2
	MonitorRequestReasonScMonitorpower          = 3
	MonitorRequestReasonUserInput               = 4
	MonitorRequestReasonAcDcDisplayBurst        = 5
	MonitorRequestReasonUserDisplayBurst        = 6
	MonitorRequestReasonPoSetSystemState        = 7
	MonitorRequestReasonSetThreadExecutionState = 8
	MonitorRequestReasonFullWake                = 9
	MonitorRequestReasonSessionUnlock           = 10
	MonitorRequestReasonScreenOffRequest        = 11
	MonitorRequestReasonIdleTimeout             = 12
	MonitorRequestReasonPolicyChange            = 13
	MonitorRequestReasonMax                     = 14
)

const ( /* winnt.h:5576:5: */
	PoAc               = 0
	PoDc               = 1
	PoHot              = 2
	PoConditionMaximum = 3
)

const ( /* winnt.h:5603:5: */
	PlatformRoleUnspecified       = 0
	PlatformRoleDesktop           = 1
	PlatformRoleMobile            = 2
	PlatformRoleWorkstation       = 3
	PlatformRoleEnterpriseServer  = 4
	PlatformRoleSOHOServer        = 5
	PlatformRoleAppliancePC       = 6
	PlatformRolePerformanceServer = 7
	PlatformRoleSlate             = 8
	PlatformRoleMaximum           = 9
)

const ( /* winnt.h:6740:5: */
	IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1
)

const ( /* winnt.h:7611:5: */
	IMPORT_OBJECT_CODE  = 0
	IMPORT_OBJECT_DATA  = 1
	IMPORT_OBJECT_CONST = 2
)

const ( /* winnt.h:7615:5: */
	IMPORT_OBJECT_ORDINAL         = 0
	IMPORT_OBJECT_NAME            = 1
	IMPORT_OBJECT_NAME_NO_PREFIX  = 2
	IMPORT_OBJECT_NAME_UNDECORATE = 3
)

const ( /* winnt.h:7621:5: */
	COMIMAGE_FLAGS_ILONLY                = 1
	COMIMAGE_FLAGS_32BITREQUIRED         = 2
	COMIMAGE_FLAGS_IL_LIBRARY            = 4
	COMIMAGE_FLAGS_STRONGNAMESIGNED      = 8
	COMIMAGE_FLAGS_TRACKDEBUGDATA        = 65536
	COR_VERSION_MAJOR_V2                 = 2
	COR_VERSION_MAJOR                    = 2
	COR_VERSION_MINOR                    = 0
	COR_DELETED_NAME_LENGTH              = 8
	COR_VTABLEGAP_NAME_LENGTH            = 8
	NATIVE_TYPE_MAX_CB                   = 1
	COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE = 255
	IMAGE_COR_MIH_METHODRVA              = 1
	IMAGE_COR_MIH_EHRVA                  = 2
	IMAGE_COR_MIH_BASICBLOCK             = 8
	COR_VTABLE_32BIT                     = 1
	COR_VTABLE_64BIT                     = 2
	COR_VTABLE_FROM_UNMANAGED            = 4
	COR_VTABLE_CALL_MOST_DERIVED         = 16
	IMAGE_COR_EATJ_THUNK_SIZE            = 32
	MAX_CLASS_NAME                       = 1024
	MAX_PACKAGE_NAME                     = 1024
)

const ( /* winnt.h:8028:5: */
	UmsThreadInvalidInfoClass = 0
	UmsThreadUserContext      = 1
	UmsThreadPriority         = 2
	UmsThreadAffinity         = 3
	UmsThreadTeb              = 4
	UmsThreadIsSuspended      = 5
	UmsThreadIsTerminated     = 6
	UmsThreadMaxInfoClass     = 7
)

const ( /* winnt.h:8039:5: */
	UmsSchedulerStartup       = 0
	UmsSchedulerThreadBlocked = 1
	UmsSchedulerThreadYield   = 2
)

const ( /* winnt.h:8114:5: */
	HeapCompatibilityInformation      = 0
	HeapEnableTerminationOnCorruption = 1
)

const ( /* winnt.h:8142:5: */
	ActivationContextBasicInformation                      = 1
	ActivationContextDetailedInformation                   = 2
	AssemblyDetailedInformationInActivationContext         = 3
	FileInformationInAssemblyOfAssemblyInActivationContext = 4
	RunlevelInformationInActivationContext                 = 5
	CompatibilityInformationInActivationContext            = 6
	ActivationContextManifestResourceName                  = 7
	MaxActivationContextInfoClass                          = 8
	AssemblyDetailedInformationInActivationContxt          = 3
	FileInformationInAssemblyOfAssemblyInActivationContxt  = 4
)

const ( /* winnt.h:8155:5: */
	ACTCTX_RUN_LEVEL_UNSPECIFIED       = 0
	ACTCTX_RUN_LEVEL_AS_INVOKER        = 1
	ACTCTX_RUN_LEVEL_HIGHEST_AVAILABLE = 2
	ACTCTX_RUN_LEVEL_REQUIRE_ADMIN     = 3
	ACTCTX_RUN_LEVEL_NUMBERS           = 4
)

const ( /* winnt.h:8163:5: */
	ACTCTX_COMPATIBILITY_ELEMENT_TYPE_UNKNOWN    = 0
	ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS         = 1
	ACTCTX_COMPATIBILITY_ELEMENT_TYPE_MITIGATION = 2
)

const ( /* winnt.h:8584:5: */
	DriverType               = 1
	FileSystemType           = 2
	Win32ServiceOwnProcess   = 16
	Win32ServiceShareProcess = 32
	AdapterType              = 4
	RecognizerType           = 8
)

const ( /* winnt.h:8589:5: */
	BootLoad    = 0
	SystemLoad  = 1
	AutoLoad    = 2
	DemandLoad  = 3
	DisableLoad = 4
)

const ( /* winnt.h:8594:5: */
	IgnoreError   = 0
	NormalError   = 1
	SevereError   = 2
	CriticalError = 3
)

const ( /* winnt.h:8794:5: */
	TapeDriveProblemNone         = 0
	TapeDriveReadWriteWarning    = 1
	TapeDriveReadWriteError      = 2
	TapeDriveReadWarning         = 3
	TapeDriveWriteWarning        = 4
	TapeDriveReadError           = 5
	TapeDriveWriteError          = 6
	TapeDriveHardwareError       = 7
	TapeDriveUnsupportedMedia    = 8
	TapeDriveScsiConnectionError = 9
	TapeDriveTimetoClean         = 10
	TapeDriveCleanDriveNow       = 11
	TapeDriveMediaLifeExpired    = 12
	TapeDriveSnappedTape         = 13
)

const ( /* winnt.h:8804:3: */
	TP_CALLBACK_PRIORITY_HIGH    = 0
	TP_CALLBACK_PRIORITY_NORMAL  = 1
	TP_CALLBACK_PRIORITY_LOW     = 2
	TP_CALLBACK_PRIORITY_INVALID = 3
	TP_CALLBACK_PRIORITY_COUNT   = 3
)

const ( /* winnt.h:8997:7: */
	TransactionOutcomeUndetermined = 1
	TransactionOutcomeCommitted    = 2
	TransactionOutcomeAborted      = 3
)

const ( /* winnt.h:9003:7: */
	TransactionStateNormal          = 1
	TransactionStateIndoubt         = 2
	TransactionStateCommittedNotify = 3
)

const ( /* winnt.h:9075:7: */
	TransactionBasicInformation              = 0
	TransactionPropertiesInformation         = 1
	TransactionEnlistmentInformation         = 2
	TransactionSuperiorEnlistmentInformation = 3
	TransactionBindInformation               = 4
	TransactionDTCPrivateInformation         = 5
)

const ( /* winnt.h:9084:7: */
	TransactionManagerBasicInformation             = 0
	TransactionManagerLogInformation               = 1
	TransactionManagerLogPathInformation           = 2
	TransactionManagerOnlineProbeInformation       = 3
	TransactionManagerRecoveryInformation          = 4
	TransactionManagerOldestTransactionInformation = 5
)

const ( /* winnt.h:9093:7: */
	ResourceManagerBasicInformation      = 0
	ResourceManagerCompletionInformation = 1
)

const ( /* winnt.h:9110:7: */
	EnlistmentBasicInformation    = 0
	EnlistmentRecoveryInformation = 1
	EnlistmentCrmInformation      = 2
)

const ( /* winnt.h:9125:7: */
	KTMOBJECT_TRANSACTION         = 0
	KTMOBJECT_TRANSACTION_MANAGER = 1
	KTMOBJECT_RESOURCE_MANAGER    = 2
	KTMOBJECT_ENLISTMENT          = 3
	KTMOBJECT_INVALID             = 4
)

const ( /* winsock2.h:567:3: */
	NSP_NOTIFY_IMMEDIATELY = 0
	NSP_NOTIFY_HWND        = 1
	NSP_NOTIFY_EVENT       = 2
	NSP_NOTIFY_PORT        = 3
	NSP_NOTIFY_APC         = 4
)

const ( /* winsock2.h:709:3: */
	COMP_EQUAL   = 0
	COMP_NOTLESS = 1
)

const ( /* winsock2.h:799:3: */
	RNRSERVICE_REGISTER   = 0
	RNRSERVICE_DEREGISTER = 1
	RNRSERVICE_DELETE     = 2
)

const ( /* winsvc.h:106:3: */
	SC_ACTION_NONE        = 0
	SC_ACTION_RESTART     = 1
	SC_ACTION_REBOOT      = 2
	SC_ACTION_RUN_COMMAND = 3
)

const ( /* winsvc.h:139:3: */
	SC_STATUS_PROCESS_INFO = 0
)

const ( /* winsvc.h:143:3: */
	SC_ENUM_PROCESS_INFO = 0
)

const ( /* winuser.h:2440:3: */
	DCDC_DEFAULT             = 0
	DCDC_DISABLE_FONT_UPDATE = 1
	DCDC_DISABLE_RELAYOUT    = 2
)

const ( /* winuser.h:2449:3: */
	DDC_DEFAULT                  = 0
	DDC_DISABLE_ALL              = 1
	DDC_DISABLE_RESIZE           = 2
	DDC_DISABLE_CONTROL_RELAYOUT = 4
)

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// FIXME FIXME FIXME FIXME FIXME: Much more data need moving here.
// This holds only SCOPE_LEVEL and SCOPE_ID so that compilations
// do not fail.

const ( /* ws2def.h:17:1: */
	ScopeLevelInterface    = 1
	ScopeLevelLink         = 2
	ScopeLevelSubnet       = 3
	ScopeLevelAdmin        = 4
	ScopeLevelSite         = 5
	ScopeLevelOrganization = 8
	ScopeLevelGlobal       = 14
	ScopeLevelCount        = 16
)

const ( /* ws2ipdef.h:63:1: */
	MCAST_INCLUDE = 0
	MCAST_EXCLUDE = 1
)

const ( /* wtypes.h:182:1: */
	DVASPECT_CONTENT   = 1
	DVASPECT_THUMBNAIL = 2
	DVASPECT_ICON      = 4
	DVASPECT_DOCPRINT  = 8
)

const ( /* wtypes.h:189:1: */
	STGC_DEFAULT                            = 0
	STGC_OVERWRITE                          = 1
	STGC_ONLYIFCURRENT                      = 2
	STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4
	STGC_CONSOLIDATE                        = 8
)

const ( /* wtypes.h:197:1: */
	STGMOVE_MOVE        = 0
	STGMOVE_COPY        = 1
	STGMOVE_SHALLOWCOPY = 2
)

const ( /* wtypes.h:203:1: */
	STATFLAG_DEFAULT = 0
	STATFLAG_NONAME  = 1
	STATFLAG_NOOPEN  = 2
)

const ( /* wtypes.h:513:1: */
	VT_EMPTY            = 0
	VT_NULL             = 1
	VT_I2               = 2
	VT_I4               = 3
	VT_R4               = 4
	VT_R8               = 5
	VT_CY               = 6
	VT_DATE             = 7
	VT_BSTR             = 8
	VT_DISPATCH         = 9
	VT_ERROR            = 10
	VT_BOOL             = 11
	VT_VARIANT          = 12
	VT_UNKNOWN          = 13
	VT_DECIMAL          = 14
	VT_I1               = 16
	VT_UI1              = 17
	VT_UI2              = 18
	VT_UI4              = 19
	VT_I8               = 20
	VT_UI8              = 21
	VT_INT              = 22
	VT_UINT             = 23
	VT_VOID             = 24
	VT_HRESULT          = 25
	VT_PTR              = 26
	VT_SAFEARRAY        = 27
	VT_CARRAY           = 28
	VT_USERDEFINED      = 29
	VT_LPSTR            = 30
	VT_LPWSTR           = 31
	VT_RECORD           = 36
	VT_INT_PTR          = 37
	VT_UINT_PTR         = 38
	VT_FILETIME         = 64
	VT_BLOB             = 65
	VT_STREAM           = 66
	VT_STORAGE          = 67
	VT_STREAMED_OBJECT  = 68
	VT_STORED_OBJECT    = 69
	VT_BLOB_OBJECT      = 70
	VT_CF               = 71
	VT_CLSID            = 72
	VT_VERSIONED_STREAM = 73
	VT_BSTR_BLOB        = 4095
	VT_VECTOR           = 4096
	VT_ARRAY            = 8192
	VT_BYREF            = 16384
	VT_RESERVED         = 32768
	VT_ILLEGAL          = 65535
	VT_ILLEGALMASKED    = 4095
	VT_TYPEMASK         = 4095
)

const ( /* wtypes.h:594:1: */
	TYSPEC_CLSID       = 0
	TYSPEC_FILEEXT     = 1
	TYSPEC_MIMETYPE    = 2
	TYSPEC_FILENAME    = 3
	TYSPEC_PROGID      = 4
	TYSPEC_PACKAGENAME = 5
	TYSPEC_OBJECTID    = 6
)

const ( /* wtypesbase.h:233:1: */
	MEMCTX_TASK      = 1
	MEMCTX_SHARED    = 2
	MEMCTX_MACSYSTEM = 3
	MEMCTX_UNKNOWN   = -1
	MEMCTX_SAME      = -2
)

const ( /* wtypesbase.h:269:1: */
	CLSCTX_INPROC_SERVER          = 1
	CLSCTX_INPROC_HANDLER         = 2
	CLSCTX_LOCAL_SERVER           = 4
	CLSCTX_INPROC_SERVER16        = 8
	CLSCTX_REMOTE_SERVER          = 16
	CLSCTX_INPROC_HANDLER16       = 32
	CLSCTX_RESERVED1              = 64
	CLSCTX_RESERVED2              = 128
	CLSCTX_RESERVED3              = 256
	CLSCTX_RESERVED4              = 512
	CLSCTX_NO_CODE_DOWNLOAD       = 1024
	CLSCTX_RESERVED5              = 2048
	CLSCTX_NO_CUSTOM_MARSHAL      = 4096
	CLSCTX_ENABLE_CODE_DOWNLOAD   = 8192
	CLSCTX_NO_FAILURE_LOG         = 16384
	CLSCTX_DISABLE_AAA            = 32768
	CLSCTX_ENABLE_AAA             = 65536
	CLSCTX_FROM_DEFAULT_CONTEXT   = 131072
	CLSCTX_ACTIVATE_32_BIT_SERVER = 262144
	CLSCTX_ACTIVATE_64_BIT_SERVER = 524288
	CLSCTX_ENABLE_CLOAKING        = 1048576
	CLSCTX_APPCONTAINER           = 4194304
	CLSCTX_ACTIVATE_AAA_AS_IU     = 8388608
	CLSCTX_PS_DLL                 = -2147483648
)

const ( /* wtypesbase.h:298:1: */
	MSHLFLAGS_NORMAL      = 0
	MSHLFLAGS_TABLESTRONG = 1
	MSHLFLAGS_TABLEWEAK   = 2
	MSHLFLAGS_NOPING      = 4
	MSHLFLAGS_RESERVED1   = 8
	MSHLFLAGS_RESERVED2   = 16
	MSHLFLAGS_RESERVED3   = 32
	MSHLFLAGS_RESERVED4   = 64
)

const ( /* wtypesbase.h:309:1: */
	MSHCTX_LOCAL            = 0
	MSHCTX_NOSHAREDMEM      = 1
	MSHCTX_DIFFERENTMACHINE = 2
	MSHCTX_INPROC           = 3
	MSHCTX_CROSSCTX         = 4
)

// Constants and variables necessary for file attributes subcommand.

const ( /* tclWinFCmd.c:44:1: */
	WIN_ARCHIVE_ATTRIBUTE   = 0
	WIN_HIDDEN_ATTRIBUTE    = 1
	WIN_LONGNAME_ATTRIBUTE  = 2
	WIN_READONLY_ATTRIBUTE  = 3
	WIN_SHORTNAME_ATTRIBUTE = 4
	WIN_SYSTEM_ATTRIBUTE    = 5
)

type Ptrdiff_t = int64 /* <builtin>:3:26 */

type Size_t = uint64 /* <builtin>:9:23 */

type Wchar_t = uint16 /* <builtin>:15:24 */

type X__int128_t = struct {
	Flo int64
	Fhi int64
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
type X__uint128_t = struct {
	Flo uint64
	Fhi uint64
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128

type X__builtin_va_list = uintptr /* <builtin>:46:14 */
type X__float128 = float64        /* <builtin>:47:21 */

type Va_list = X__builtin_va_list /* <builtin>:50:27 */

// adler32.c -- compute the Adler-32 checksum of a data stream
// Copyright (C) 1995-2011, 2016 Mark Adler
// For conditions of distribution and use, see copyright notice in zlib.h

// @(#) $Id$

// zutil.h -- internal interface and configuration of the compression library
// Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
// For conditions of distribution and use, see copyright notice in zlib.h

// WARNING: this file should *not* be used by applications. It is
//    part of the implementation of the compression library and is
//    subject to change. Applications should only use zlib.h.
//

// @(#) $Id$

// zlib.h -- interface of the 'zlib' general purpose compression library
//   version 1.2.11, January 15th, 2017
//
//   Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
//
//   This software is provided 'as-is', without any express or implied
//   warranty.  In no event will the authors be held liable for any damages
//   arising from the use of this software.
//
//   Permission is granted to anyone to use this software for any purpose,
//   including commercial applications, and to alter it and redistribute it
//   freely, subject to the following restrictions:
//
//   1. The origin of this software must not be misrepresented; you must not
//      claim that you wrote the original software. If you use this software
//      in a product, an acknowledgment in the product documentation would be
//      appreciated but is not required.
//   2. Altered source versions must be plainly marked as such, and must not be
//      misrepresented as being the original software.
//   3. This notice may not be removed or altered from any source distribution.
//
//   Jean-loup Gailly        Mark Adler
//   jloup@gzip.org          madler@alumni.caltech.edu
//
//
//   The data format used by the zlib library is described by RFCs (Request for
//   Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
//   (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).

// zconf.h -- configuration of the zlib compression library
// Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
// For conditions of distribution and use, see copyright notice in zlib.h

// @(#) $Id$

// If you *really* need a unique prefix for all types and library functions,
// compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
// Even better than compiling with -DZ_PREFIX would be to use configure to set
// this permanently in zconf.h using "./configure --zprefix".

// Compile with -DMAXSEG_64K if the alloc function cannot allocate more
// than 64k bytes at a time (needed on systems with 16-bit int).

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// This macro holds an monotonic increasing value, which indicates
//    a specific fix/patch is present on trunk.  This value isn't related to
//    minor/major version-macros.  It is increased on demand, if a big
//    fix was applied to trunk.  This macro gets just increased on trunk.  For
//    other branches its value won't be modified.

// mingw.org's version macros: these make gcc to define
//    MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
//    and the __mingwthr_key_dtor() function from the MinGW
//    CRT in its private gthr-win32.h header.

// Set VC specific compiler target macros.

// MS does not prefix symbols by underscores for 64-bit.
// As we have to support older gcc version, which are using underscores
//       as symbol prefix for x64, we have to check here for the user label
//       prefix defined by gcc.

// Special case nameless struct/union.

// MinGW-w64 has some additional C99 printf/scanf feature support.
//    So we add some helper macros to ease recognition of them.

// If _FORTIFY_SOURCE is enabled, some inline functions may use
//    __builtin_va_arg_pack().  GCC may report an error if the address
//    of such a function is used.  Set _FORTIFY_VA_ARG=0 in this case.

// Enable workaround for ABI incompatibility on affected platforms

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
// Templates won't work in C, will break if secure API is not enabled, disabled

// https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
// fallback on default implementation if we can't know the size of the destination

// Include _cygwin.h if we're building a Cygwin application.

// Target specific macro replacement for type "long".  In the Windows API,
//    the type long is always 32 bit, even if the target is 64 bit (LLP64).
//    On 64 bit Cygwin, the type long is 64 bit (LP64).  So, to get the right
//    sized definitions and declarations, all usage of type long in the Windows
//    headers have to be replaced by the below defined macro __LONG32.

// C/C++ specific language defines.

// Note the extern. This is needed to work around GCC's
// limitations in handling dllimport attribute.

// Attribute `nonnull' was valid as of gcc 3.3.  We don't use GCC's
//    variadiac macro facility, because variadic macros cause syntax
//    errors with  --traditional-cpp.

//  High byte is the major version, low byte is the minor.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// for backward compatibility

type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */

type Ssize_t = int64 /* corecrt.h:50:35 */

type Rsize_t = Size_t /* corecrt.h:57:16 */

type Intptr_t = int64 /* corecrt.h:67:35 */

type Uintptr_t = uint64 /* corecrt.h:80:44 */

type Wint_t = uint16   /* corecrt.h:111:24 */
type Wctype_t = uint16 /* corecrt.h:112:24 */

type Errno_t = int32 /* corecrt.h:118:13 */

type X__time32_t = int32 /* corecrt.h:123:14 */

type X__time64_t = int64 /* corecrt.h:128:35 */

type Time_t = X__time64_t /* corecrt.h:143:20 */

type Threadlocaleinfostruct = struct {
	Frefcount      int32
	Flc_codepage   uint32
	Flc_collate_cp uint32
	Flc_handle     [6]uint32
	Flc_id         [6]LC_ID
	Flc_category   [6]struct {
		Flocale    uintptr
		Fwlocale   uintptr
		Frefcount  uintptr
		Fwrefcount uintptr
	}
	Flc_clike            int32
	Fmb_cur_max          int32
	Flconv_intl_refcount uintptr
	Flconv_num_refcount  uintptr
	Flconv_mon_refcount  uintptr
	Flconv               uintptr
	Fctype1_refcount     uintptr
	Fctype1              uintptr
	Fpctype              uintptr
	Fpclmap              uintptr
	Fpcumap              uintptr
	Flc_time_curr        uintptr
} /* corecrt.h:435:1 */

type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */
type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */

type Localeinfo_struct = struct {
	Flocinfo Pthreadlocinfo
	Fmbcinfo Pthreadmbcinfo
} /* corecrt.h:441:9 */

type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */
type X_locale_t = uintptr                 /* corecrt.h:444:19 */

type TagLC_ID = struct {
	FwLanguage uint16
	FwCountry  uint16
	FwCodePage uint16
} /* corecrt.h:435:1 */

type LC_ID = TagLC_ID  /* corecrt.h:452:3 */
type LPLC_ID = uintptr /* corecrt.h:452:9 */

type Lconv = struct {
	Fdecimal_point     uintptr
	Fthousands_sep     uintptr
	Fgrouping          uintptr
	Fint_curr_symbol   uintptr
	Fcurrency_symbol   uintptr
	Fmon_decimal_point uintptr
	Fmon_thousands_sep uintptr
	Fmon_grouping      uintptr
	Fpositive_sign     uintptr
	Fnegative_sign     uintptr
	Fint_frac_digits   int8
	Ffrac_digits       int8
	Fp_cs_precedes     int8
	Fp_sep_by_space    int8
	Fn_cs_precedes     int8
	Fn_sep_by_space    int8
	Fp_sign_posn       int8
	Fn_sign_posn       int8
} /* corecrt.h:479:3 */

type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */

// ISO C Standard:  7.17  Common definitions  <stddef.h>

// Any one of these symbols __need_* means that GNU libc
//    wants us just to define one data type.  So don't define
//    the symbols that indicate this file's entire job has been done.
// snaroff@next.com says the NeXT needs this.
// Irix 5.1 needs this.

// In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
//    defined if the corresponding type is *not* defined.
//    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_

// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
//    Just ignore it.

// On VxWorks, <type/vxTypesBase.h> may have defined macros like
//    _TYPE_size_t which will typedef size_t.  fixincludes patched the
//    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
//    not defined, and so that defining this macro defines _GCC_SIZE_T.
//    If we find that the macros are still defined at this point, we must
//    invoke them so that the type is defined as expected.

// In case nobody has defined these types, but we aren't running under
//    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
//    __WCHAR_TYPE__ have reasonable values.  This can happen if the
//    parts of GCC is compiled by an older compiler, that actually
//    include gstddef.h, such as collect2.

// Signed type of difference of two pointers.

// Define this type if we are doing the whole job,
//    or if we want this type in particular.

// If this symbol has done its job, get rid of it.

// Unsigned type of `sizeof' something.

// Define this type if we are doing the whole job,
//    or if we want this type in particular.

// Wide character type.
//    Locale-writers should change this as necessary to
//    be big enough to hold unique values not between 0 and 127,
//    and not (wchar_t) -1, for each defined multibyte character.

// Define this type if we are doing the whole job,
//    or if we want this type in particular.

//  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
//     are already defined.
//  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.

// A null pointer constant.

// Offset of member MEMBER in a struct of type TYPE.

// Type whose alignment is supported in every context and is at least
//    as great as that of any standard type not using alignment
//    specifiers.
type Max_align_t = struct {
	F__max_align_ll int64
	F__max_align_ld float64
} /* stddef.h:427:3 */

// Copyright (C) 1989-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  7.17  Common definitions  <stddef.h>
type Z_size_t = Size_t /* zconf.h:248:21 */

// Maximum value for memLevel in deflateInit2

// Maximum value for windowBits in deflateInit2 and inflateInit2.
// WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
// created by gzip. (Files created by minigzip can still be extracted by
// gzip.)

// The memory requirements for deflate are (in bytes):
//             (1 << (windowBits+2)) +  (1 << (memLevel+9))
//  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
//  plus a few kilobytes for small objects. For example, if you want to reduce
//  the default memory requirements from 256K to 128K, compile with
//      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
//  Of course this will generally degrade compression (there's no free lunch).
//
//    The memory requirements for inflate are (in bytes) 1 << windowBits
//  that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
//  for small objects.

// Type declarations

// The following definitions for FAR are needed only for MSDOS mixed
// model programming (small or medium model with some far allocations).
// This was tested only with MSC; for other MSDOS compilers you may have
// to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
// just define FAR to be empty.

// If building or using zlib as a DLL, define ZLIB_DLL.
// This is not mandatory, but it offers a little performance increase.
// If building or using zlib with the WINAPI/WINAPIV calling convention,
// define ZLIB_WINAPI.
// Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.

type Byte = uint8   /* zconf.h:391:24 */ // 8 bits
type UInt = uint32  /* zconf.h:393:24 */ // 16 bits or more
type ULong = uint32 /* zconf.h:394:24 */ // 32 bits or more

type Bytef = Byte   /* zconf.h:400:22 */
type Charf = int8   /* zconf.h:402:19 */
type Intf = int32   /* zconf.h:403:19 */
type UIntf = UInt   /* zconf.h:404:19 */
type ULongf = ULong /* zconf.h:405:19 */

type Voidpc = uintptr /* zconf.h:408:23 */
type Voidpf = uintptr /* zconf.h:409:23 */
type Voidp = uintptr  /* zconf.h:410:23 */

// Copyright (C) 1992-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 3, or (at your option) any later
// version.
//
// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// This administrivia gets added to the beginning of limits.h
//    if the system has its own version of limits.h.

// We use _GCC_LIMITS_H_ because we want this not to match
//    any macros that the system's limits.h uses for its own purposes.

// Use "..." so that we find syslimits.h only in this same directory.
// syslimits.h stands for the system's own limits.h file.
//    If we can use it ok unmodified, then we install this text.
//    If fixincludes fixes it, then the fixed version is installed
//    instead of this text.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// File system limits
//
// NOTE: Apparently the actual size of PATH_MAX is 260, but a space is
//       required for the NUL. TODO: Test?
// NOTE: PATH_MAX is the POSIX equivalent for Microsoft's MAX_PATH; the two
//       are semantically identical, with a limit of 259 characters for the
//       path name, plus one for a terminating NUL, for a total of 260.

// Copyright (C) 1991-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 3, or (at your option) any later
// version.
//
// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// Number of bits in a `char'.

// Maximum length of a multibyte character.

// Minimum and maximum values a `signed char' can hold.

// Maximum value an `unsigned char' can hold.  (Minimum is 0).

// Minimum and maximum values a `char' can hold.

// Minimum and maximum values a `signed short int' can hold.

// Maximum value an `unsigned short int' can hold.  (Minimum is 0).

// Minimum and maximum values a `signed int' can hold.

// Maximum value an `unsigned int' can hold.  (Minimum is 0).

// Minimum and maximum values a `signed long int' can hold.
//    (Same as `int').

// Maximum value an `unsigned long int' can hold.  (Minimum is 0).

// Minimum and maximum values a `signed long long int' can hold.

// Maximum value an `unsigned long long int' can hold.  (Minimum is 0).

// Minimum and maximum values a `signed long long int' can hold.

// Maximum value an `unsigned long long int' can hold.  (Minimum is 0).

// This administrivia gets added to the end of limits.h
//    if the system has its own version of limits.h.

type Z_crc_t = uint32 /* zconf.h:429:17 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_ino_t = uint16 /* types.h:43:24 */
type Ino_t = uint16   /* types.h:45:24 */

type X_dev_t = uint32 /* types.h:51:22 */
type Dev_t = uint32   /* types.h:53:22 */

type X_pid_t = int64 /* types.h:63:17 */

type Pid_t = X_pid_t /* types.h:68:16 */

type X_mode_t = uint16 /* types.h:74:24 */

type Mode_t = X_mode_t /* types.h:77:17 */

type X_off_t = int32 /* _mingw_off_t.h:5:16 */
type Off32_t = int32 /* _mingw_off_t.h:7:16 */

type X_off64_t = int64 /* _mingw_off_t.h:13:39 */
type Off64_t = int64   /* _mingw_off_t.h:15:39 */

type Off_t = Off64_t /* _mingw_off_t.h:24:17 */

type Useconds_t = uint32 /* types.h:84:22 */

type Timespec = struct {
	Ftv_sec      Time_t
	Ftv_nsec     int32
	F__ccgo_pad1 [4]byte
} /* types.h:89:1 */

type Itimerspec = struct {
	Fit_interval struct {
		Ftv_sec      Time_t
		Ftv_nsec     int32
		F__ccgo_pad1 [4]byte
	}
	Fit_value struct {
		Ftv_sec      Time_t
		Ftv_nsec     int32
		F__ccgo_pad1 [4]byte
	}
} /* types.h:94:1 */

type X_sigset_t = uint64 /* types.h:104:28 */
type X_fsize_t = uint32  /* io.h:29:25 */

type X_finddata32_t = struct {
	Fattrib      uint32
	Ftime_create X__time32_t
	Ftime_access X__time32_t
	Ftime_write  X__time32_t
	Fsize        X_fsize_t
	Fname        [260]int8
} /* io.h:35:3 */

type X_finddata32i64_t = struct {
	Fattrib      uint32
	Ftime_create X__time32_t
	Ftime_access X__time32_t
	Ftime_write  X__time32_t
	Fsize        int64
	Fname        [260]int8
	F__ccgo_pad1 [4]byte
} /* io.h:44:3 */

type X_finddata64i32_t = struct {
	Fattrib      uint32
	F__ccgo_pad1 [4]byte
	Ftime_create X__time64_t
	Ftime_access X__time64_t
	Ftime_write  X__time64_t
	Fsize        X_fsize_t
	Fname        [260]int8
} /* io.h:53:3 */

type X__finddata64_t = struct {
	Fattrib      uint32
	F__ccgo_pad1 [4]byte
	Ftime_create X__time64_t
	Ftime_access X__time64_t
	Ftime_write  X__time64_t
	Fsize        int64
	Fname        [260]int8
	F__ccgo_pad2 [4]byte
} /* io.h:62:3 */

type X_wfinddata32_t = struct {
	Fattrib      uint32
	Ftime_create X__time32_t
	Ftime_access X__time32_t
	Ftime_write  X__time32_t
	Fsize        X_fsize_t
	Fname        [260]Wchar_t
} /* io.h:94:3 */

type X_wfinddata32i64_t = struct {
	Fattrib      uint32
	Ftime_create X__time32_t
	Ftime_access X__time32_t
	Ftime_write  X__time32_t
	Fsize        int64
	Fname        [260]Wchar_t
} /* io.h:103:3 */

type X_wfinddata64i32_t = struct {
	Fattrib      uint32
	F__ccgo_pad1 [4]byte
	Ftime_create X__time64_t
	Ftime_access X__time64_t
	Ftime_write  X__time64_t
	Fsize        X_fsize_t
	Fname        [260]Wchar_t
	F__ccgo_pad2 [4]byte
} /* io.h:112:3 */

type X_wfinddata64_t = struct {
	Fattrib      uint32
	F__ccgo_pad1 [4]byte
	Ftime_create X__time64_t
	Ftime_access X__time64_t
	Ftime_write  X__time64_t
	Fsize        int64
	Fname        [260]Wchar_t
} /* io.h:121:3 */

type X_PVFV = uintptr /* corecrt_startup.h:20:14 */
type X_PIFV = uintptr /* corecrt_startup.h:21:13 */
type X_PVFI = uintptr /* corecrt_startup.h:22:14 */

type X_onexit_table_t1 = struct {
	F_first uintptr
	F_last  uintptr
	F_end   uintptr
} /* corecrt_startup.h:24:9 */

type X_onexit_table_t = X_onexit_table_t1 /* corecrt_startup.h:28:3 */

type X_onexit_t = uintptr /* corecrt_startup.h:30:13 */

// Includes a definition of _pid_t and pid_t
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_beginthread_proc_type = uintptr   /* process.h:32:16 */
type X_beginthreadex_proc_type = uintptr /* process.h:33:20 */

type X_tls_callback_type = uintptr /* process.h:61:16 */

//
//    Copyright (c) 2011-2016  mingw-w64 project
//
//    Permission is hereby granted, free of charge, to any person obtaining a
//    copy of this software and associated documentation files (the "Software"),
//    to deal in the Software without restriction, including without limitation
//    the rights to use, copy, modify, merge, publish, distribute, sublicense,
//    and/or sell copies of the Software, and to permit persons to whom the
//    Software is furnished to do so, subject to the following conditions:
//
//    The above copyright notice and this permission notice shall be included in
//    all copies or substantial portions of the Software.
//
//    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
//    DEALINGS IN THE SOFTWARE.

// Set defines described by the POSIX Threads Extension (1003.1c-1995)
// _SC_THREADS
//   Basic support for POSIX threads is available. The functions
//
//   pthread_atfork(),
//   pthread_attr_destroy(),
//   pthread_attr_getdetachstate(),
//   pthread_attr_getschedparam(),
//   pthread_attr_init(),
//   pthread_attr_setdetachstate(),
//   pthread_attr_setschedparam(),
//   pthread_cancel(),
//   pthread_cleanup_push(),
//   pthread_cleanup_pop(),
//   pthread_cond_broadcast(),
//   pthread_cond_destroy(),
//   pthread_cond_init(),
//   pthread_cond_signal(),
//   pthread_cond_timedwait(),
//   pthread_cond_wait(),
//   pthread_condattr_destroy(),
//   pthread_condattr_init(),
//   pthread_create(),
//   pthread_detach(),
//   pthread_equal(),
//   pthread_exit(),
//   pthread_getspecific(),
//   pthread_join(,
//   pthread_key_create(),
//   pthread_key_delete(),
//   pthread_mutex_destroy(),
//   pthread_mutex_init(),
//   pthread_mutex_lock(),
//   pthread_mutex_trylock(),
//   pthread_mutex_unlock(),
//   pthread_mutexattr_destroy(),
//   pthread_mutexattr_init(),
//   pthread_once(),
//   pthread_rwlock_destroy(),
//   pthread_rwlock_init(),
//   pthread_rwlock_rdlock(),
//   pthread_rwlock_tryrdlock(),
//   pthread_rwlock_trywrlock(),
//   pthread_rwlock_unlock(),
//   pthread_rwlock_wrlock(),
//   pthread_rwlockattr_destroy(),
//   pthread_rwlockattr_init(),
//   pthread_self(),
//   pthread_setcancelstate(),
//   pthread_setcanceltype(),
//   pthread_setspecific(),
//   pthread_testcancel()
//
//   are present.

// _SC_READER_WRITER_LOCKS
//   This option implies the _POSIX_THREADS option. Conversely, under
//   POSIX 1003.1-2001 the _POSIX_THREADS option implies this option.
//
//   The functions
//   pthread_rwlock_destroy(),
//   pthread_rwlock_init(),
//   pthread_rwlock_rdlock(),
//   pthread_rwlock_tryrdlock(),
//   pthread_rwlock_trywrlock(),
//   pthread_rwlock_unlock(),
//   pthread_rwlock_wrlock(),
//   pthread_rwlockattr_destroy(),
//   pthread_rwlockattr_init()
//
//   are present.

// _SC_SPIN_LOCKS
//   This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
//   options. The functions
//
//   pthread_spin_destroy(),
//   pthread_spin_init(),
//   pthread_spin_lock(),
//   pthread_spin_trylock(),
//   pthread_spin_unlock()
//
//   are present.

// _SC_BARRIERS
//   This option implies the _POSIX_THREADS and _POSIX_THREAD_SAFE_FUNCTIONS
//   options. The functions
//
//   pthread_barrier_destroy(),
//   pthread_barrier_init(),
//   pthread_barrier_wait(),
//   pthread_barrierattr_destroy(),
//   pthread_barrierattr_init()
//
//   are present.

// _SC_TIMEOUTS
//   The functions
//
//   mq_timedreceive(), - not supported
//   mq_timedsend(), - not supported
//   posix_trace_timedgetnext_event(), - not supported
//   pthread_mutex_timedlock(),
//   pthread_rwlock_timedrdlock(),
//   pthread_rwlock_timedwrlock(),
//   sem_timedwait(),
//
//   are present.

// _SC_TIMERS - not supported
//   The functions
//
//   clock_getres(),
//   clock_gettime(),
//   clock_settime(),
//   nanosleep(),
//   timer_create(),
//   timer_delete(),
//   timer_gettime(),
//   timer_getoverrun(),
//   timer_settime()
//
//   are present.
// #undef _POSIX_TIMERS

// _SC_CLOCK_SELECTION
//    This option implies the _POSIX_TIMERS option. The functions
//
//    pthread_condattr_getclock(),
//    pthread_condattr_setclock(),
//    clock_nanosleep()
//
//    are present.

// _SC_SEMAPHORES
//   The include file <semaphore.h> is present. The functions
//
//   sem_close(),
//   sem_destroy(),
//   sem_getvalue(),
//   sem_init(),
//   sem_open(),
//   sem_post(),
//   sem_trywait(),
//   sem_unlink(),
//   sem_wait()
//
//   are present.

// MVS linker does not support external names larger than 8 bytes

//
//     The 'zlib' compression library provides in-memory compression and
//   decompression functions, including integrity checks of the uncompressed data.
//   This version of the library supports only one compression method (deflation)
//   but other algorithms will be added later and will have the same stream
//   interface.
//
//     Compression can be done in a single step if the buffers are large enough,
//   or can be done by repeated calls of the compression function.  In the latter
//   case, the application must provide more input and/or consume the output
//   (providing more output space) before each call.
//
//     The compressed data format used by default by the in-memory functions is
//   the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
//   around a deflate stream, which is itself documented in RFC 1951.
//
//     The library also supports reading and writing files in gzip (.gz) format
//   with an interface similar to that of stdio using the functions that start
//   with "gz".  The gzip format is different from the zlib format.  gzip is a
//   gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
//
//     This library can optionally read and write gzip and raw deflate streams in
//   memory as well.
//
//     The zlib format was designed to be compact and fast for use in memory
//   and on communications channels.  The gzip format was designed for single-
//   file compression on file systems, has a larger header than zlib to maintain
//   directory information, and uses a different, slower check method than zlib.
//
//     The library does not install any signal handler.  The decoder checks
//   the consistency of the compressed data, so the library should never crash
//   even in the case of corrupted input.

type Alloc_func = uintptr /* zlib.h:81:16 */
type Free_func = uintptr  /* zlib.h:82:16 */

type Internal_state = struct {
	Fstrm             Z_streamp
	Fstatus           int32
	F__ccgo_pad1      [4]byte
	Fpending_buf      uintptr
	Fpending_buf_size Ulg
	F__ccgo_pad2      [4]byte
	Fpending_out      uintptr
	Fpending          Ulg
	Fwrap             int32
	Fgzhead           Gz_headerp
	Fgzindex          Ulg
	Fmethod           Byte
	F__ccgo_pad3      [3]byte
	Flast_flush       int32
	Fw_size           UInt
	Fw_bits           UInt
	Fw_mask           UInt
	Fwindow           uintptr
	Fwindow_size      Ulg
	F__ccgo_pad4      [4]byte
	Fprev             uintptr
	Fhead             uintptr
	Fins_h            UInt
	Fhash_size        UInt
	Fhash_bits        UInt
	Fhash_mask        UInt
	Fhash_shift       UInt
	Fblock_start      int32
	Fmatch_length     UInt
	Fprev_match       IPos
	Fmatch_available  int32
	Fstrstart         UInt
	Fmatch_start      UInt
	Flookahead        UInt
	Fprev_length      UInt
	Fmax_chain_length UInt
	Fmax_lazy_match   UInt
	Flevel            int32
	Fstrategy         int32
	Fgood_match       UInt
	Fnice_match       int32
	Fdyn_ltree        [573]struct {
		Ffc struct{ Ffreq Ush }
		Fdl struct{ Fdad Ush }
	}
	Fdyn_dtree [61]struct {
		Ffc struct{ Ffreq Ush }
		Fdl struct{ Fdad Ush }
	}
	Fbl_tree [39]struct {
		Ffc struct{ Ffreq Ush }
		Fdl struct{ Fdad Ush }
	}
	Fl_desc struct {
		Fdyn_tree    uintptr
		Fmax_code    int32
		F__ccgo_pad1 [4]byte
		Fstat_desc   uintptr
	}
	Fd_desc struct {
		Fdyn_tree    uintptr
		Fmax_code    int32
		F__ccgo_pad1 [4]byte
		Fstat_desc   uintptr
	}
	Fbl_desc struct {
		Fdyn_tree    uintptr
		Fmax_code    int32
		F__ccgo_pad1 [4]byte
		Fstat_desc   uintptr
	}
	Fbl_count    [16]Ush
	Fheap        [573]int32
	Fheap_len    int32
	Fheap_max    int32
	Fdepth       [573]Uch
	F__ccgo_pad5 [7]byte
	Fl_buf       uintptr
	Flit_bufsize UInt
	Flast_lit    UInt
	Fd_buf       uintptr
	Fopt_len     Ulg
	Fstatic_len  Ulg
	Fmatches     UInt
	Finsert      UInt
	Fbi_buf      Ush
	F__ccgo_pad6 [2]byte
	Fbi_valid    int32
	Fhigh_water  Ulg
	F__ccgo_pad7 [4]byte
} /* zlib.h:84:1 */

type Z_stream_s = struct {
	Fnext_in     uintptr
	Favail_in    UInt
	Ftotal_in    ULong
	Fnext_out    uintptr
	Favail_out   UInt
	Ftotal_out   ULong
	Fmsg         uintptr
	Fstate       uintptr
	Fzalloc      Alloc_func
	Fzfree       Free_func
	Fopaque      Voidpf
	Fdata_type   int32
	Fadler       ULong
	Freserved    ULong
	F__ccgo_pad1 [4]byte
} /* zlib.h:86:9 */

type Z_stream = Z_stream_s /* zlib.h:106:3 */

type Z_streamp = uintptr /* zlib.h:108:22 */

//
//      gzip header information passed to and from zlib routines.  See RFC 1952
//   for more details on the meanings of these fields.
type Gz_header_s = struct {
	Ftext        int32
	Ftime        ULong
	Fxflags      int32
	Fos          int32
	Fextra       uintptr
	Fextra_len   UInt
	Fextra_max   UInt
	Fname        uintptr
	Fname_max    UInt
	F__ccgo_pad1 [4]byte
	Fcomment     uintptr
	Fcomm_max    UInt
	Fhcrc        int32
	Fdone        int32
	F__ccgo_pad2 [4]byte
} /* zlib.h:114:9 */

//
//      gzip header information passed to and from zlib routines.  See RFC 1952
//   for more details on the meanings of these fields.
type Gz_header = Gz_header_s /* zlib.h:129:3 */

type Gz_headerp = uintptr /* zlib.h:131:23 */
//
//      inflateGetHeader() requests that gzip header information be stored in the
//    provided gz_header structure.  inflateGetHeader() may be called after
//    inflateInit2() or inflateReset(), and before the first call of inflate().
//    As inflate() processes the gzip stream, head->done is zero until the header
//    is completed, at which time head->done is set to one.  If a zlib stream is
//    being decoded, then head->done is set to -1 to indicate that there will be
//    no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
//    used to force inflate() to return immediately after header processing is
//    complete and before any actual data is decompressed.
//
//      The text, time, xflags, and os fields are filled in with the gzip header
//    contents.  hcrc is set to true if there is a header CRC.  (The header CRC
//    was valid if done is set to one.) If extra is not Z_NULL, then extra_max
//    contains the maximum number of bytes to write to extra.  Once done is true,
//    extra_len contains the actual extra field length, and extra contains the
//    extra field, or that field truncated if extra_max is less than extra_len.
//    If name is not Z_NULL, then up to name_max characters are written there,
//    terminated with a zero unless the length is greater than name_max.  If
//    comment is not Z_NULL, then up to comm_max characters are written there,
//    terminated with a zero unless the length is greater than comm_max.  When any
//    of extra, name, or comment are not Z_NULL and the respective field is not
//    present in the header, then that field is set to Z_NULL to signal its
//    absence.  This allows the use of deflateSetHeader() with the returned
//    structure to duplicate the header.  However if those fields are set to
//    allocated memory, then the application will need to save those pointers
//    elsewhere so that they can be eventually freed.
//
//      If inflateGetHeader is not used, then the header information is simply
//    discarded.  The header is always checked for validity, including the header
//    CRC if present.  inflateReset() will reset the process to discard the header
//    information.  The application would need to call inflateGetHeader() again to
//    retrieve the header from the next gzip stream.
//
//      inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
//    stream state was inconsistent.

//
// ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
//                                         unsigned char FAR *window));
//
//      Initialize the internal stream state for decompression using inflateBack()
//    calls.  The fields zalloc, zfree and opaque in strm must be initialized
//    before the call.  If zalloc and zfree are Z_NULL, then the default library-
//    derived memory allocation routines are used.  windowBits is the base two
//    logarithm of the window size, in the range 8..15.  window is a caller
//    supplied buffer of that size.  Except for special applications where it is
//    assured that deflate was used with small window sizes, windowBits must be 15
//    and a 32K byte window must be supplied to be able to decompress general
//    deflate streams.
//
//      See inflateBack() for the usage of these routines.
//
//      inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
//    the parameters are invalid, Z_MEM_ERROR if the internal state could not be
//    allocated, or Z_VERSION_ERROR if the version of the library does not match
//    the version of the header file.

type In_func = uintptr  /* zlib.h:1092:18 */
type Out_func = uintptr /* zlib.h:1094:13 */
//
//      Same as uncompress, except that sourceLen is a pointer, where the
//    length of the source is *sourceLen.  On return, *sourceLen is the number of
//    source bytes consumed.

// gzip file access functions

//
//      This library supports reading and writing files in gzip (.gz) format with
//    an interface similar to that of stdio, using the functions that start with
//    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
//    wrapper, documented in RFC 1952, wrapped around a deflate stream.

type GzFile_s = struct {
	Fhave        uint32
	F__ccgo_pad1 [4]byte
	Fnext        uintptr
	Fpos         Off_t
} /* zlib.h:1300:9 */

//
//      Same as uncompress, except that sourceLen is a pointer, where the
//    length of the source is *sourceLen.  On return, *sourceLen is the number of
//    source bytes consumed.

// gzip file access functions

//
//      This library supports reading and writing files in gzip (.gz) format with
//    an interface similar to that of stdio, using the functions that start with
//    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
//    wrapper, documented in RFC 1952, wrapped around a deflate stream.

type GzFile = uintptr /* zlib.h:1300:25 */

type X_div_t = struct {
	Fquot int32
	Frem  int32
} /* stdlib.h:60:11 */

type Div_t = X_div_t /* stdlib.h:63:5 */

type X_ldiv_t = struct {
	Fquot int32
	Frem  int32
} /* stdlib.h:65:11 */

type Ldiv_t = X_ldiv_t /* stdlib.h:68:5 */

type X_LDOUBLE = struct{ Fld [10]uint8 } /* stdlib.h:77:5 */

type X_CRT_DOUBLE = struct{ Fx float64 } /* stdlib.h:84:5 */

type X_CRT_FLOAT = struct{ Ff float32 } /* stdlib.h:88:5 */

type X_LONGDOUBLE = struct{ Fx float64 } /* stdlib.h:95:5 */

type X_LDBL12 = struct{ Fld12 [12]uint8 } /* stdlib.h:102:5 */

type X_purecall_handler = uintptr /* stdlib.h:143:16 */

type X_invalid_parameter_handler = uintptr /* stdlib.h:148:16 */

type Lldiv_t = struct {
	Fquot int64
	Frem  int64
} /* stdlib.h:727:61 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Return codes for _heapwalk()

// Values for _heapinfo.useflag

// The structure used to walk through the heap with _heapwalk.
type X_heapinfo = struct {
	F_pentry     uintptr
	F_size       Size_t
	F_useflag    int32
	F__ccgo_pad1 [4]byte
} /* malloc.h:46:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Return codes for _heapwalk()

// Values for _heapinfo.useflag

// The structure used to walk through the heap with _heapwalk.
type X_HEAPINFO = X_heapinfo /* malloc.h:50:5 */

// since "static" is used to mean two completely different things in C, we
//    define "local" for the non-static meaning of "static", for readability
//    (compile with -Dlocal if your debugger can't find static symbols)

type Uch = uint8  /* zutil.h:43:24 */
type Uchf = Uch   /* zutil.h:44:17 */
type Ush = uint16 /* zutil.h:45:24 */
type Ushf = Ush   /* zutil.h:46:17 */
type Ulg = uint32 /* zutil.h:47:24 */

// 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

// =========================================================================
func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */
	var sum2 uint32
	var n uint32

	// split Adler-32 into component sums
	sum2 = adler >> 16 & ULong(0xffff)
	adler = adler & ULong(0xffff)

	// in case user likes doing a byte at a time, keep it fast
	if len == uint64(1) {
		adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf)))
		if adler >= BASE {
			adler = adler - BASE
		}
		sum2 = sum2 + adler
		if sum2 >= BASE {
			sum2 = sum2 - BASE
		}
		return adler | sum2<<16
	}

	// initial Adler-32 value (deferred check for len == 1 speed)
	if buf == uintptr(Z_NULL) {
		return ULong(1)
	}

	// in case short lengths are provided, keep it somewhat fast
	if len < uint64(16) {
		for libc.PostDecUint64(&len, 1) != 0 {
			adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))
			sum2 = sum2 + adler
		}
		if adler >= BASE {
			adler = adler - BASE
		}
		sum2 = sum2 % BASE // only added so many BASE's
		return adler | sum2<<16
	}

	// do length NMAX blocks -- requires just one modulo operation
	for len >= uint64(NMAX) {
		len = len - uint64(NMAX)
		n = uint32(NMAX / 16) // NMAX is divisible by 16
		for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15)))
				sum2 = sum2 + adler
			}

			// 16 sums unrolled
			buf += uintptr(16)
		}
		adler = adler % BASE
		sum2 = sum2 % BASE
	}

	// do remaining bytes (less than NMAX, still just one modulo)
	if len != 0 { // avoid modulos if none remaining
		for len >= uint64(16) {
			len = len - uint64(16)
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13)))
				sum2 = sum2 + adler
			}

			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14)))
				sum2 = sum2 + adler
			}
			{
				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15)))
				sum2 = sum2 + adler
			}

			buf += uintptr(16)
		}
		for libc.PostDecUint64(&len, 1) != 0 {
			adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))
			sum2 = sum2 + adler
		}
		adler = adler % BASE
		sum2 = sum2 % BASE
	}

	// return recombined sums
	return adler | sum2<<16
}

// =========================================================================
func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */
	return z.Xadler32_z(tls, adler, buf, uint64(len))
}

// =========================================================================
func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:143:13: */
	var sum1 uint32
	var sum2 uint32
	var rem uint32

	// for negative len, return invalid adler32 as a clue for debugging
	if len2 < int64(0) {
		return 0xffffffff
	}

	// the derivation of this formula is left as an exercise for the reader
	len2 = len2 % int64(BASE) // assumes len2 >= 0
	rem = uint32(len2)
	sum1 = adler1 & ULong(0xffff)
	sum2 = uint32(rem) * sum1
	sum2 = sum2 % BASE
	sum1 = sum1 + (adler2&ULong(0xffff) + BASE - ULong(1))
	sum2 = sum2 + (adler1>>16&ULong(0xffff) + adler2>>16&ULong(0xffff) + BASE - ULong(rem))
	if sum1 >= BASE {
		sum1 = sum1 - BASE
	}
	if sum1 >= BASE {
		sum1 = sum1 - BASE
	}
	if sum2 >= uint32(BASE)<<1 {
		sum2 = sum2 - uint32(BASE)<<1
	}
	if sum2 >= BASE {
		sum2 = sum2 - BASE
	}
	return sum1 | sum2<<16
}

// =========================================================================
func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:172:15: */
	return adler32_combine_(tls, adler1, adler2, len2)
}

func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:180:15: */
	return adler32_combine_(tls, adler1, adler2, len2)
}

type X_EXCEPTION_POINTERS = struct {
	FExceptionRecord PEXCEPTION_RECORD
	FContextRecord   PCONTEXT
} /* excpt.h:17:3 */

type X_EXCEPTION_RECORD = struct {
	FExceptionCode        DWORD
	FExceptionFlags       DWORD
	FExceptionRecord      uintptr
	FExceptionAddress     PVOID
	FNumberParameters     DWORD
	F__ccgo_pad1          [4]byte
	FExceptionInformation [15]ULONG_PTR
} /* excpt.h:17:3 */

type X_CONTEXT = struct {
	FP1Home               DWORD64
	FP2Home               DWORD64
	FP3Home               DWORD64
	FP4Home               DWORD64
	FP5Home               DWORD64
	FP6Home               DWORD64
	FContextFlags         DWORD
	FMxCsr                DWORD
	FSegCs                WORD
	FSegDs                WORD
	FSegEs                WORD
	FSegFs                WORD
	FSegGs                WORD
	FSegSs                WORD
	FEFlags               DWORD
	FDr0                  DWORD64
	FDr1                  DWORD64
	FDr2                  DWORD64
	FDr3                  DWORD64
	FDr6                  DWORD64
	FDr7                  DWORD64
	FRax                  DWORD64
	FRcx                  DWORD64
	FRdx                  DWORD64
	FRbx                  DWORD64
	FRsp                  DWORD64
	FRbp                  DWORD64
	FRsi                  DWORD64
	FRdi                  DWORD64
	FR8                   DWORD64
	FR9                   DWORD64
	FR10                  DWORD64
	FR11                  DWORD64
	FR12                  DWORD64
	FR13                  DWORD64
	FR14                  DWORD64
	FR15                  DWORD64
	FRip                  DWORD64
	F__256                struct{ FFltSave XMM_SAVE_AREA32 }
	FVectorRegister       [26]M128A
	FVectorControl        DWORD64
	FDebugControl         DWORD64
	FLastBranchToRip      DWORD64
	FLastBranchFromRip    DWORD64
	FLastExceptionToRip   DWORD64
	FLastExceptionFromRip DWORD64
} /* excpt.h:17:3 */

type X_DISPATCHER_CONTEXT = struct {
	FControlPc        ULONG64
	FImageBase        ULONG64
	FFunctionEntry    PRUNTIME_FUNCTION
	FEstablisherFrame ULONG64
	FTargetIp         ULONG64
	FContextRecord    PCONTEXT
	FLanguageHandler  PEXCEPTION_ROUTINE
	FHandlerData      PVOID
	FHistoryTable     PUNWIND_HISTORY_TABLE
	FScopeIndex       ULONG
	FFill0            ULONG
} /* excpt.h:45:3 */

// CRT stuff
type X_PHNDLR = uintptr /* excpt.h:66:16 */

type X_XCPT_ACTION = struct {
	FXcptNum    uint32
	FSigNum     int32
	FXcptAction X_PHNDLR
} /* excpt.h:68:3 */

// The type of function that is expected as an exception handler to be
// installed with __try1.
type PEXCEPTION_HANDLER = uintptr /* excpt.h:87:33 */

// Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with GCC; see the file COPYING.  If not, write to
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.

// As a special exception, if you include this header file into source
//    files compiled by GCC, this header file does not by itself cause
//    the resulting executable to be covered by the GNU General Public
//    License.  This exception does not however invalidate any other
//    reasons why the executable file might be covered by the GNU General
//    Public License.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

// Define __gnuc_va_list.

// Define the standard macros for the user,
//    if this invocation was from the user program.

// Define va_list, if desired, from __gnuc_va_list.
// We deliberately do not define va_list when called from
//    stdio.h, because ANSI C says that stdio.h is not supposed to define
//    va_list.  stdio.h needs to have access to that data type,
//    but must not use that name.  It should use the name __gnuc_va_list,
//    which is safe because it is reserved for the implementation.

// The macro _VA_LIST_ is the same thing used by this file in Ultrix.
//    But on BSD NET2 we must not test or define or undef it.
//    (Note that the comments in NET 2's ansi.h
//    are incorrect for _VA_LIST_--see stdio.h!)
// The macro _VA_LIST_DEFINED is used in Windows NT 3.5

// include mingw stuff
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Copyright (C) 1989-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// WINAPI_FAMILY can be either desktop + App, or App.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Input parameters

// Output parameters

// Inout parameters

// Pointer to pointer parameters

// Output reference parameters

// Return values

// Optional pointer parameters

// Other common annotations

// Function annotations

// Success/failure annotations

// Buffer properties

// Field properties

// Structural annotations

// printf/scanf annotations

// Analysis

// FIXME: __in macro conflicts with argument names in libstdc++. For this reason,
// we disable it for C++. This should be fixed in libstdc++ so we can uncomment
// it in fixed version here.

// Renamed __null to SAL__null for avoiding private keyword conflicts between
//    gcc and MS world.

// PROJECT:         ReactOS DDK
// COPYRIGHT:       This file is in the Public Domain.
// FILE:            driverspecs.h
// ABSTRACT:        This header stubs out Driver Verifier annotations to
//                  allow drivers using them to compile with our header set.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type ULONG = uint32    /* minwindef.h:24:29 */
type PULONG = uintptr  /* minwindef.h:25:17 */
type USHORT = uint16   /* minwindef.h:26:26 */
type PUSHORT = uintptr /* minwindef.h:27:18 */
type UCHAR = uint8     /* minwindef.h:28:25 */
type PUCHAR = uintptr  /* minwindef.h:29:17 */
type PSZ = uintptr     /* minwindef.h:30:16 */

type WINBOOL = int32  /* minwindef.h:127:13 */
type BOOL = int32     /* minwindef.h:131:15 */
type PBOOL = uintptr  /* minwindef.h:134:14 */
type LPBOOL = uintptr /* minwindef.h:135:14 */

type BYTE = uint8      /* minwindef.h:139:25 */
type WORD = uint16     /* minwindef.h:140:26 */
type DWORD = uint32    /* minwindef.h:141:29 */
type FLOAT = float32   /* minwindef.h:142:17 */
type PFLOAT = uintptr  /* minwindef.h:143:17 */
type PBYTE = uintptr   /* minwindef.h:144:16 */
type LPBYTE = uintptr  /* minwindef.h:145:16 */
type PINT = uintptr    /* minwindef.h:146:15 */
type LPINT = uintptr   /* minwindef.h:147:15 */
type PWORD = uintptr   /* minwindef.h:148:16 */
type LPWORD = uintptr  /* minwindef.h:149:16 */
type LPLONG = uintptr  /* minwindef.h:150:20 */
type PDWORD = uintptr  /* minwindef.h:151:17 */
type LPDWORD = uintptr /* minwindef.h:152:17 */
type LPVOID = uintptr  /* minwindef.h:153:16 */
type LPCVOID = uintptr /* minwindef.h:156:22 */
type INT = int32       /* minwindef.h:158:15 */
type UINT = uint32     /* minwindef.h:159:24 */
type PUINT = uintptr   /* minwindef.h:160:24 */

// GCC 8 has already defined _xgetbv, Clang 9 has _xgetbv defined as a macro
// redirecting to the __builtin_ia32_xgetbv builtin.

// *****************************************************

// *
// sdkddkver.h: Version definitions for SDK and DDK. Originally
// from ReactOS PSDK/DDK, this file is in the public domain:
//
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type POINTER_64_INT = uint64 /* basetsd.h:11:44 */

type INT8 = int8        /* basetsd.h:29:23 */
type PINT8 = uintptr    /* basetsd.h:29:28 */
type INT16 = int16      /* basetsd.h:30:24 */
type PINT16 = uintptr   /* basetsd.h:30:30 */
type INT32 = int32      /* basetsd.h:31:22 */
type PINT32 = uintptr   /* basetsd.h:31:28 */
type INT64 = int64      /* basetsd.h:32:44 */
type PINT64 = uintptr   /* basetsd.h:32:50 */
type UINT8 = uint8      /* basetsd.h:33:25 */
type PUINT8 = uintptr   /* basetsd.h:33:31 */
type UINT16 = uint16    /* basetsd.h:34:26 */
type PUINT16 = uintptr  /* basetsd.h:34:33 */
type UINT32 = uint32    /* basetsd.h:35:24 */
type PUINT32 = uintptr  /* basetsd.h:35:31 */
type UINT64 = uint64    /* basetsd.h:36:46 */
type PUINT64 = uintptr  /* basetsd.h:36:53 */
type LONG32 = int32     /* basetsd.h:37:22 */
type PLONG32 = uintptr  /* basetsd.h:37:29 */
type ULONG32 = uint32   /* basetsd.h:38:24 */
type PULONG32 = uintptr /* basetsd.h:38:32 */
type DWORD32 = uint32   /* basetsd.h:39:24 */
type PDWORD32 = uintptr /* basetsd.h:39:32 */

type INT_PTR = int64      /* basetsd.h:46:37 */
type PINT_PTR = uintptr   /* basetsd.h:46:45 */
type UINT_PTR = uint64    /* basetsd.h:47:46 */
type PUINT_PTR = uintptr  /* basetsd.h:47:55 */
type LONG_PTR = int64     /* basetsd.h:48:37 */
type PLONG_PTR = uintptr  /* basetsd.h:48:46 */
type ULONG_PTR = uint64   /* basetsd.h:49:46 */
type PULONG_PTR = uintptr /* basetsd.h:49:56 */

type SHANDLE_PTR = int64  /* basetsd.h:62:37 */
type HANDLE_PTR = uint64  /* basetsd.h:63:46 */
type UHALF_PTR = uint32   /* basetsd.h:64:24 */
type PUHALF_PTR = uintptr /* basetsd.h:64:34 */
type HALF_PTR = int32     /* basetsd.h:65:15 */
type PHALF_PTR = uintptr  /* basetsd.h:65:24 */

type SIZE_T = ULONG_PTR /* basetsd.h:147:39 */
type PSIZE_T = uintptr  /* basetsd.h:147:46 */
type SSIZE_T = LONG_PTR /* basetsd.h:148:38 */
type PSSIZE_T = uintptr /* basetsd.h:148:46 */

type DWORD_PTR = ULONG_PTR /* basetsd.h:191:39 */
type PDWORD_PTR = uintptr  /* basetsd.h:191:49 */
type LONG64 = int64        /* basetsd.h:192:37 */
type PLONG64 = uintptr     /* basetsd.h:192:44 */
type ULONG64 = uint64      /* basetsd.h:193:46 */
type PULONG64 = uintptr    /* basetsd.h:193:54 */
type DWORD64 = uint64      /* basetsd.h:194:46 */
type PDWORD64 = uintptr    /* basetsd.h:194:54 */
type KAFFINITY = ULONG_PTR /* basetsd.h:195:39 */
type PKAFFINITY = uintptr  /* basetsd.h:196:39 */

type PVOID = uintptr   /* winnt.h:257:16 */
type PVOID64 = uintptr /* winnt.h:258:16 */

type CHAR = int8   /* winnt.h:285:16 */
type SHORT = int16 /* winnt.h:286:17 */
type LONG = int32  /* winnt.h:287:20 */

type WCHAR = Wchar_t     /* winnt.h:295:19 */
type PWCHAR = uintptr    /* winnt.h:297:17 */
type LPWCH = uintptr     /* winnt.h:297:25 */
type PWCH = uintptr      /* winnt.h:297:32 */
type LPCWCH = uintptr    /* winnt.h:298:23 */
type PCWCH = uintptr     /* winnt.h:298:31 */
type NWPSTR = uintptr    /* winnt.h:299:17 */
type LPWSTR = uintptr    /* winnt.h:299:25 */
type PWSTR = uintptr     /* winnt.h:299:33 */
type PZPWSTR = uintptr   /* winnt.h:300:17 */
type PCZPWSTR = uintptr  /* winnt.h:301:23 */
type LPUWSTR = uintptr   /* winnt.h:302:27 */
type PUWSTR = uintptr    /* winnt.h:302:36 */
type LPCWSTR = uintptr   /* winnt.h:303:23 */
type PCWSTR = uintptr    /* winnt.h:303:32 */
type PZPCWSTR = uintptr  /* winnt.h:304:18 */
type LPCUWSTR = uintptr  /* winnt.h:305:33 */
type PCUWSTR = uintptr   /* winnt.h:305:43 */
type PZZWSTR = uintptr   /* winnt.h:306:17 */
type PCZZWSTR = uintptr  /* winnt.h:307:23 */
type PUZZWSTR = uintptr  /* winnt.h:308:27 */
type PCUZZWSTR = uintptr /* winnt.h:309:33 */
type PNZWCH = uintptr    /* winnt.h:310:17 */
type PCNZWCH = uintptr   /* winnt.h:311:23 */
type PUNZWCH = uintptr   /* winnt.h:312:27 */
type PCUNZWCH = uintptr  /* winnt.h:313:33 */

type PCHAR = uintptr   /* winnt.h:334:16 */
type LPCH = uintptr    /* winnt.h:334:23 */
type PCH = uintptr     /* winnt.h:334:29 */
type LPCCH = uintptr   /* winnt.h:335:22 */
type PCCH = uintptr    /* winnt.h:335:29 */
type NPSTR = uintptr   /* winnt.h:336:16 */
type LPSTR = uintptr   /* winnt.h:336:23 */
type PSTR = uintptr    /* winnt.h:336:30 */
type PZPSTR = uintptr  /* winnt.h:337:16 */
type PCZPSTR = uintptr /* winnt.h:338:22 */
type LPCSTR = uintptr  /* winnt.h:339:22 */
type PCSTR = uintptr   /* winnt.h:339:30 */
type PZPCSTR = uintptr /* winnt.h:340:17 */
type PZZSTR = uintptr  /* winnt.h:341:16 */
type PCZZSTR = uintptr /* winnt.h:342:22 */
type PNZCH = uintptr   /* winnt.h:343:16 */
type PCNZCH = uintptr  /* winnt.h:344:22 */

type TCHAR = int8     /* winnt.h:373:16 */
type PTCHAR = uintptr /* winnt.h:373:23 */
type TBYTE = uint8    /* winnt.h:374:25 */
type PTBYTE = uintptr /* winnt.h:374:32 */

type LPTCH = LPSTR       /* winnt.h:377:17 */
type PTCH = LPSTR        /* winnt.h:377:23 */
type LPCTCH = LPCCH      /* winnt.h:378:17 */
type PCTCH = LPCCH       /* winnt.h:378:24 */
type PTSTR = LPSTR       /* winnt.h:379:17 */
type LPTSTR = LPSTR      /* winnt.h:379:23 */
type PUTSTR = LPSTR      /* winnt.h:379:30 */
type LPUTSTR = LPSTR     /* winnt.h:379:37 */
type PCTSTR = LPCSTR     /* winnt.h:380:18 */
type LPCTSTR = LPCSTR    /* winnt.h:380:25 */
type PCUTSTR = LPCSTR    /* winnt.h:380:33 */
type LPCUTSTR = LPCSTR   /* winnt.h:380:41 */
type PZZTSTR = PZZSTR    /* winnt.h:381:18 */
type PUZZTSTR = PZZSTR   /* winnt.h:381:27 */
type PCZZTSTR = PCZZSTR  /* winnt.h:382:19 */
type PCUZZTSTR = PCZZSTR /* winnt.h:382:29 */
type PZPTSTR = PZPSTR    /* winnt.h:383:18 */
type PNZTCH = PNZCH      /* winnt.h:384:17 */
type PUNZTCH = PNZCH     /* winnt.h:384:25 */
type PCNZTCH = PCNZCH    /* winnt.h:385:18 */
type PCUNZTCH = PCNZCH   /* winnt.h:385:27 */

type PSHORT = uintptr /* winnt.h:392:17 */
type PLONG = uintptr  /* winnt.h:393:16 */

type X_GROUP_AFFINITY = struct {
	FMask     KAFFINITY
	FGroup    WORD
	FReserved [3]WORD
} /* winnt.h:397:9 */

type GROUP_AFFINITY = X_GROUP_AFFINITY /* winnt.h:401:3 */
type PGROUP_AFFINITY = uintptr         /* winnt.h:401:19 */

type HANDLE = uintptr /* winnt.h:405:16 */

type PHANDLE = uintptr /* winnt.h:412:18 */
type FCHAR = BYTE      /* winnt.h:413:16 */
type FSHORT = WORD     /* winnt.h:414:16 */
type FLONG = DWORD     /* winnt.h:415:17 */

type HRESULT = LONG /* winnt.h:419:16 */

// Keep in sync with basetyps.h header.

type CCHAR = int8   /* winnt.h:453:16 */
type LCID = DWORD   /* winnt.h:456:15 */
type PLCID = PDWORD /* winnt.h:458:18 */
type LANGID = WORD  /* winnt.h:461:16 */

type COMPARTMENT_ID = uint32   /* winnt.h:470:3 */
type PCOMPARTMENT_ID = uintptr /* winnt.h:470:18 */

type X_FLOAT128 = struct {
	FLowPart  int64
	FHighPart int64
} /* winnt.h:482:13 */

type FLOAT128 = X_FLOAT128 /* winnt.h:485:5 */

type PFLOAT128 = uintptr /* winnt.h:487:20 */

type LONGLONG = int64   /* winnt.h:490:37 */
type ULONGLONG = uint64 /* winnt.h:491:46 */

type PLONGLONG = uintptr  /* winnt.h:495:20 */
type PULONGLONG = uintptr /* winnt.h:496:21 */
type USN = LONGLONG       /* winnt.h:497:20 */

type X_LARGE_INTEGER = struct {
	F__ccgo_pad1 [0]uint64
	F__0         struct {
		FLowPart  DWORD
		FHighPart LONG
	}
} /* winnt.h:505:11 */

type LARGE_INTEGER = X_LARGE_INTEGER /* winnt.h:516:5 */

type PLARGE_INTEGER = uintptr /* winnt.h:518:25 */

type X_ULARGE_INTEGER = struct {
	F__ccgo_pad1 [0]uint64
	F__0         struct {
		FLowPart  DWORD
		FHighPart DWORD
	}
} /* winnt.h:523:11 */

type ULARGE_INTEGER = X_ULARGE_INTEGER /* winnt.h:534:5 */

type PULARGE_INTEGER = uintptr /* winnt.h:536:26 */

type X_LUID = struct {
	FLowPart  DWORD
	FHighPart LONG
} /* winnt.h:538:11 */

type LUID = X_LUID   /* winnt.h:541:5 */
type PLUID = uintptr /* winnt.h:541:10 */

type DWORDLONG = ULONGLONG /* winnt.h:546:21 */
type PDWORDLONG = uintptr  /* winnt.h:547:21 */

type BOOLEAN = BYTE     /* winnt.h:605:16 */
type PBOOLEAN = uintptr /* winnt.h:607:19 */

type X_LIST_ENTRY = struct {
	FFlink uintptr
	FBlink uintptr
} /* winnt.h:612:11 */

type LIST_ENTRY = X_LIST_ENTRY /* winnt.h:615:5 */
type PLIST_ENTRY = uintptr     /* winnt.h:615:16 */
type PRLIST_ENTRY = uintptr    /* winnt.h:615:29 */

type X_SINGLE_LIST_ENTRY = struct{ FNext uintptr } /* winnt.h:617:11 */

type SINGLE_LIST_ENTRY = X_SINGLE_LIST_ENTRY /* winnt.h:619:5 */
type PSINGLE_LIST_ENTRY = uintptr            /* winnt.h:619:23 */

type LIST_ENTRY321 = struct {
	FFlink DWORD
	FBlink DWORD
} /* winnt.h:621:11 */

type LIST_ENTRY32 = LIST_ENTRY321 /* winnt.h:624:5 */
type PLIST_ENTRY32 = uintptr      /* winnt.h:625:24 */

type LIST_ENTRY641 = struct {
	FFlink ULONGLONG
	FBlink ULONGLONG
} /* winnt.h:627:11 */

type LIST_ENTRY64 = LIST_ENTRY641 /* winnt.h:630:5 */
type PLIST_ENTRY64 = uintptr      /* winnt.h:631:24 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Make sure __LONG32 is defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_GUID = struct {
	FData1 uint32
	FData2 uint16
	FData3 uint16
	FData4 [8]uint8
} /* guiddef.h:19:9 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Make sure __LONG32 is defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type GUID = X_GUID /* guiddef.h:24:3 */

// __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here.

type LPGUID = uintptr /* guiddef.h:77:14 */

type LPCGUID = uintptr /* guiddef.h:82:20 */

type IID = GUID      /* guiddef.h:88:14 */
type LPIID = uintptr /* guiddef.h:89:13 */

type CLSID = GUID /* guiddef.h:96:14 */

type LPCLSID = uintptr /* guiddef.h:99:15 */

type FMTID = GUID      /* guiddef.h:103:14 */
type LPFMTID = uintptr /* guiddef.h:104:15 */

type X_OBJECTID = struct {
	FLineage    GUID
	FUniquifier DWORD
} /* winnt.h:639:11 */

type OBJECTID = X_OBJECTID        /* winnt.h:642:5 */
type PEXCEPTION_ROUTINE = uintptr /* winnt.h:709:31 */

// ??? #define SUBLANG_ROMANIAN_MOLDOVA                  0x01 ???

type KSPIN_LOCK = ULONG_PTR /* winnt.h:1384:21 */
type PKSPIN_LOCK = uintptr  /* winnt.h:1385:22 */

type X_M128A = struct {
	FLow  ULONGLONG
	FHigh LONGLONG
} /* excpt.h:17:3 */

type M128A = X_M128A  /* winnt.h:1390:7 */
type PM128A = uintptr /* winnt.h:1390:13 */

type X_XSAVE_FORMAT = struct {
	FControlWord    WORD
	FStatusWord     WORD
	FTagWord        BYTE
	FReserved1      BYTE
	FErrorOpcode    WORD
	FErrorOffset    DWORD
	FErrorSelector  WORD
	FReserved2      WORD
	FDataOffset     DWORD
	FDataSelector   WORD
	FReserved3      WORD
	FMxCsr          DWORD
	FMxCsr_Mask     DWORD
	FFloatRegisters [8]M128A
	FXmmRegisters   [16]M128A
	FReserved4      [96]BYTE
} /* winnt.h:1392:13 */

type XSAVE_FORMAT = X_XSAVE_FORMAT /* winnt.h:1415:7 */
type PXSAVE_FORMAT = uintptr       /* winnt.h:1415:20 */

type X_XSAVE_AREA_HEADER = struct {
	FMask     DWORD64
	FReserved [7]DWORD64
} /* winnt.h:1417:13 */

type XSAVE_AREA_HEADER = X_XSAVE_AREA_HEADER /* winnt.h:1420:7 */
type PXSAVE_AREA_HEADER = uintptr            /* winnt.h:1420:25 */

type X_XSAVE_AREA = struct {
	FLegacyState XSAVE_FORMAT
	FHeader      XSAVE_AREA_HEADER
} /* winnt.h:1422:13 */

type XSAVE_AREA = X_XSAVE_AREA /* winnt.h:1425:7 */
type PXSAVE_AREA = uintptr     /* winnt.h:1425:18 */

type X_XSTATE_CONTEXT = struct {
	FMask      DWORD64
	FLength    DWORD
	FReserved1 DWORD
	FArea      PXSAVE_AREA
	FBuffer    PVOID
} /* winnt.h:1427:13 */

type XSTATE_CONTEXT = X_XSTATE_CONTEXT /* winnt.h:1439:7 */
type PXSTATE_CONTEXT = uintptr         /* winnt.h:1439:22 */

type X_SCOPE_TABLE_AMD64 = struct {
	FCount       DWORD
	FScopeRecord [1]struct {
		FBeginAddress   DWORD
		FEndAddress     DWORD
		FHandlerAddress DWORD
		FJumpTarget     DWORD
	}
} /* winnt.h:1441:13 */

type SCOPE_TABLE_AMD64 = X_SCOPE_TABLE_AMD64 /* winnt.h:1449:7 */
type PSCOPE_TABLE_AMD64 = uintptr            /* winnt.h:1449:25 */

// On LP64 systems, longs are 64-bit.  Use the appropriate rotate
// function.

// For including AVX instructions
// Copyright (C) 2008-2020 Free Software Foundation, Inc.
//
//    This file is part of GCC.
//
//    GCC is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 3, or (at your option)
//    any later version.
//
//    GCC is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    Under Section 7 of GPL version 3, you are granted additional
//    permissions described in the GCC Runtime Library Exception, version
//    3.1, as published by the Free Software Foundation.
//
//    You should have received a copy of the GNU General Public License and
//    a copy of the GCC Runtime Library Exception along with this program;
//    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
//    <http://www.gnu.org/licenses/>.

// Copyright (C) 2002-2020 Free Software Foundation, Inc.
//
//    This file is part of GCC.
//
//    GCC is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 3, or (at your option)
//    any later version.
//
//    GCC is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    Under Section 7 of GPL version 3, you are granted additional
//    permissions described in the GCC Runtime Library Exception, version
//    3.1, as published by the Free Software Foundation.
//
//    You should have received a copy of the GNU General Public License and
//    a copy of the GCC Runtime Library Exception along with this program;
//    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
//    <http://www.gnu.org/licenses/>.

// Implemented from the specification included in the Intel C++ Compiler
//    User Guide and Reference, version 9.0.

// The Intel API is flexible enough that we must allow aliasing with other
//    vector types, and their scalar components.
type X__m64 = [2]int32 /* mmintrin.h:44:13 */

// Unaligned version of the same type
type X__m64_u = [2]int32 /* mmintrin.h:47:13 */

// Internal data types for implementing the intrinsics.
type X__v2si = [2]int32   /* mmintrin.h:50:13 */
type X__v4hi = [4]int16   /* mmintrin.h:51:15 */
type X__v8qi = [8]int8    /* mmintrin.h:52:14 */
type X__v1di = [1]int64   /* mmintrin.h:53:19 */
type X__v2sf = [2]float32 /* mmintrin.h:54:15 */

// Loads one cache line from address P to a location "closer" to the
//    processor.  The selector I specifies the type of prefetch operation.

// The Intel API is flexible enough that we must allow aliasing with other
//    vector types, and their scalar components.
type X__m128 = [4]float32 /* xmmintrin.h:69:15 */

// Unaligned version of the same type.
type X__m128_u = [4]float32 /* xmmintrin.h:72:15 */

// Internal data types for implementing the intrinsics.
type X__v4sf = [4]float32 /* xmmintrin.h:75:15 */

// Transpose the 4x4 matrix composed of row[0-3].

// For backward source compatibility.
// Copyright (C) 2003-2020 Free Software Foundation, Inc.
//
//    This file is part of GCC.
//
//    GCC is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 3, or (at your option)
//    any later version.
//
//    GCC is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    Under Section 7 of GPL version 3, you are granted additional
//    permissions described in the GCC Runtime Library Exception, version
//    3.1, as published by the Free Software Foundation.
//
//    You should have received a copy of the GNU General Public License and
//    a copy of the GCC Runtime Library Exception along with this program;
//    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
//    <http://www.gnu.org/licenses/>.

// Implemented from the specification included in the Intel C++ Compiler
//    User Guide and Reference, version 9.0.

// We need definitions from the SSE header files
// Copyright (C) 2002-2020 Free Software Foundation, Inc.
//
//    This file is part of GCC.
//
//    GCC is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 3, or (at your option)
//    any later version.
//
//    GCC is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    Under Section 7 of GPL version 3, you are granted additional
//    permissions described in the GCC Runtime Library Exception, version
//    3.1, as published by the Free Software Foundation.
//
//    You should have received a copy of the GNU General Public License and
//    a copy of the GCC Runtime Library Exception along with this program;
//    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
//    <http://www.gnu.org/licenses/>.

// Implemented from the specification included in the Intel C++ Compiler
//    User Guide and Reference, version 9.0.

// SSE2
type X__v2df = [2]float64 /* emmintrin.h:40:16 */
type X__v2di = [2]int64   /* emmintrin.h:41:19 */
type X__v2du = [2]uint64  /* emmintrin.h:42:28 */
type X__v4si = [4]int32   /* emmintrin.h:43:13 */
type X__v4su = [4]uint32  /* emmintrin.h:44:22 */
type X__v8hi = [8]int16   /* emmintrin.h:45:15 */
type X__v8hu = [8]uint16  /* emmintrin.h:46:24 */
type X__v16qi = [16]int8  /* emmintrin.h:47:14 */
type X__v16qs = [16]int8  /* emmintrin.h:48:21 */
type X__v16qu = [16]uint8 /* emmintrin.h:49:23 */

// The Intel API is flexible enough that we must allow aliasing with other
//    vector types, and their scalar components.
type X__m128i = [2]int64   /* emmintrin.h:53:19 */
type X__m128d = [2]float64 /* emmintrin.h:54:16 */

// Unaligned version of the same types.
type X__m128i_u = [2]int64   /* emmintrin.h:57:19 */
type X__m128d_u = [2]float64 /* emmintrin.h:58:16 */

// Copyright (C) 2008-2020 Free Software Foundation, Inc.
//
//    This file is part of GCC.
//
//    GCC is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 3, or (at your option)
//    any later version.
//
//    GCC is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    Under Section 7 of GPL version 3, you are granted additional
//    permissions described in the GCC Runtime Library Exception, version
//    3.1, as published by the Free Software Foundation.
//
//    You should have received a copy of the GNU General Public License and
//    a copy of the GCC Runtime Library Exception along with this program;
//    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
//    <http://www.gnu.org/licenses/>.

// Implemented from the specification included in the Intel C++ Compiler
//    User Guide and Reference, version 11.0.

// Internal data types for implementing the intrinsics.
type X__v4df = [4]float64  /* avxintrin.h:41:16 */
type X__v8sf = [8]float32  /* avxintrin.h:42:15 */
type X__v4di = [4]int64    /* avxintrin.h:43:19 */
type X__v4du = [4]uint64   /* avxintrin.h:44:28 */
type X__v8si = [8]int32    /* avxintrin.h:45:13 */
type X__v8su = [8]uint32   /* avxintrin.h:46:22 */
type X__v16hi = [16]int16  /* avxintrin.h:47:15 */
type X__v16hu = [16]uint16 /* avxintrin.h:48:24 */
type X__v32qi = [32]int8   /* avxintrin.h:49:14 */
type X__v32qs = [32]int8   /* avxintrin.h:50:21 */
type X__v32qu = [32]uint8  /* avxintrin.h:51:23 */

// The Intel API is flexible enough that we must allow aliasing with other
//    vector types, and their scalar components.
type X__m256 = [8]float32  /* avxintrin.h:55:15 */
type X__m256i = [4]int64   /* avxintrin.h:57:19 */
type X__m256d = [4]float64 /* avxintrin.h:59:16 */

// Unaligned version of the same types.
type X__m256_u = [8]float32  /* avxintrin.h:63:15 */
type X__m256i_u = [4]int64   /* avxintrin.h:66:19 */
type X__m256d_u = [4]float64 /* avxintrin.h:69:16 */

// Copyright (C) 2013-2020 Free Software Foundation, Inc.
//
//    This file is part of GCC.
//
//    GCC is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 3, or (at your option)
//    any later version.
//
//    GCC is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    Under Section 7 of GPL version 3, you are granted additional
//    permissions described in the GCC Runtime Library Exception, version
//    3.1, as published by the Free Software Foundation.
//
//    You should have received a copy of the GNU General Public License and
//    a copy of the GCC Runtime Library Exception along with this program;
//    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
//    <http://www.gnu.org/licenses/>.

// Internal data types for implementing the intrinsics.
type X__v8df = [8]float64   /* avx512fintrin.h:38:16 */
type X__v16sf = [16]float32 /* avx512fintrin.h:39:15 */
type X__v8di = [8]int64     /* avx512fintrin.h:40:19 */
type X__v8du = [8]uint64    /* avx512fintrin.h:41:28 */
type X__v16si = [16]int32   /* avx512fintrin.h:42:13 */
type X__v16su = [16]uint32  /* avx512fintrin.h:43:22 */
type X__v32hi = [32]int16   /* avx512fintrin.h:44:15 */
type X__v32hu = [32]uint16  /* avx512fintrin.h:45:24 */
type X__v64qi = [64]int8    /* avx512fintrin.h:46:14 */
type X__v64qu = [64]uint8   /* avx512fintrin.h:47:23 */

// The Intel API is flexible enough that we must allow aliasing with other
//    vector types, and their scalar components.
type X__m512 = [16]float32 /* avx512fintrin.h:51:15 */
type X__m512i = [8]int64   /* avx512fintrin.h:52:19 */
type X__m512d = [8]float64 /* avx512fintrin.h:53:16 */

// Unaligned version of the same type.
type X__m512_u = [16]float32 /* avx512fintrin.h:56:15 */
type X__m512i_u = [8]int64   /* avx512fintrin.h:57:19 */
type X__m512d_u = [8]float64 /* avx512fintrin.h:58:16 */

type X__mmask8 = uint8   /* avx512fintrin.h:60:24 */
type X__mmask16 = uint16 /* avx512fintrin.h:61:24 */

type X_MM_PERM_ENUM = uint32 /* avx512fintrin.h:4359:3 */

// Constants for mantissa extraction
type X_MM_MANTISSA_NORM_ENUM = uint32 /* avx512fintrin.h:8692:3 */

type X_MM_MANTISSA_SIGN_ENUM = uint32 /* avx512fintrin.h:8699:3 */

// Copyright (C) 2014-2020 Free Software Foundation, Inc.
//
//    This file is part of GCC.
//
//    GCC is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 3, or (at your option)
//    any later version.
//
//    GCC is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    Under Section 7 of GPL version 3, you are granted additional
//    permissions described in the GCC Runtime Library Exception, version
//    3.1, as published by the Free Software Foundation.
//
//    You should have received a copy of the GNU General Public License and
//    a copy of the GCC Runtime Library Exception along with this program;
//    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
//    <http://www.gnu.org/licenses/>.

// Internal data types for implementing the intrinsics.
type X__mmask32 = uint32 /* avx512vlintrin.h:38:22 */

type X__mmask64 = uint64 /* avx512bwintrin.h:41:28 */

// Copyright (C) 2019-2020 Free Software Foundation, Inc.
//
//    This file is part of GCC.
//
//    GCC is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 3, or (at your option)
//    any later version.
//
//    GCC is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    Under Section 7 of GPL version 3, you are granted additional
//    permissions described in the GCC Runtime Library Exception, version
//    3.1, as published by the Free Software Foundation.
//
//    You should have received a copy of the GNU General Public License and
//    a copy of the GCC Runtime Library Exception along with this program;
//    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
//    <http://www.gnu.org/licenses/>.

// Internal data types for implementing the intrinsics.
type X__v16bh = [16]int16 /* avx512bf16vlintrin.h:38:15 */
type X__v8bh = [8]int16   /* avx512bf16vlintrin.h:39:15 */

// The Intel API is flexible enough that we must allow aliasing with other
//    vector types, and their scalar components.
type X__m256bh = [16]int16 /* avx512bf16vlintrin.h:43:15 */
type X__m128bh = [8]int16  /* avx512bf16vlintrin.h:44:15 */

// Copyright (C) 2019-2020 Free Software Foundation, Inc.
//
//    This file is part of GCC.
//
//    GCC is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 3, or (at your option)
//    any later version.
//
//    GCC is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    Under Section 7 of GPL version 3, you are granted additional
//    permissions described in the GCC Runtime Library Exception, version
//    3.1, as published by the Free Software Foundation.
//
//    You should have received a copy of the GNU General Public License and
//    a copy of the GCC Runtime Library Exception along with this program;
//    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
//    <http://www.gnu.org/licenses/>.

// Internal data types for implementing the intrinsics.
type X__v32bh = [32]int16 /* avx512bf16intrin.h:38:15 */

// The Intel API is flexible enough that we must allow aliasing with other
//    vector types, and their scalar components.
type X__m512bh = [32]int16 /* avx512bf16intrin.h:42:15 */

// unsigned char __readgsbyte(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h
// unsigned short __readgsword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h
// unsigned __LONG32 __readgsdword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h
// __MINGW_EXTENSION unsigned __int64 __readgsqword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h

// void __writegsbyte(unsigned __LONG32 Offset,unsigned char Data); moved to psdk_inc/intrin-impl.h
// void __writegsword(unsigned __LONG32 Offset,unsigned short Data); moved to psdk_inc/intrin-impl.h
// void __writegsdword(unsigned __LONG32 Offset,unsigned __LONG32 Data); moved to psdk_inc/intrin-impl.h

type X_XMM_SAVE_AREA32 = struct {
	FControlWord    WORD
	FStatusWord     WORD
	FTagWord        BYTE
	FReserved1      BYTE
	FErrorOpcode    WORD
	FErrorOffset    DWORD
	FErrorSelector  WORD
	FReserved2      WORD
	FDataOffset     DWORD
	FDataSelector   WORD
	FReserved3      WORD
	FMxCsr          DWORD
	FMxCsr_Mask     DWORD
	FFloatRegisters [8]M128A
	FXmmRegisters   [16]M128A
	FReserved4      [96]BYTE
} /* winnt.h:1679:11 */

// unsigned char __readgsbyte(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h
// unsigned short __readgsword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h
// unsigned __LONG32 __readgsdword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h
// __MINGW_EXTENSION unsigned __int64 __readgsqword(unsigned __LONG32 Offset); moved to psdk_inc/intrin-impl.h

// void __writegsbyte(unsigned __LONG32 Offset,unsigned char Data); moved to psdk_inc/intrin-impl.h
// void __writegsword(unsigned __LONG32 Offset,unsigned short Data); moved to psdk_inc/intrin-impl.h
// void __writegsdword(unsigned __LONG32 Offset,unsigned __LONG32 Data); moved to psdk_inc/intrin-impl.h

type XMM_SAVE_AREA32 = X_XMM_SAVE_AREA32 /* winnt.h:1696:5 */
type PXMM_SAVE_AREA32 = uintptr          /* winnt.h:1696:21 */

type CONTEXT = X_CONTEXT /* winnt.h:1770:5 */
type PCONTEXT = uintptr  /* winnt.h:1770:13 */

type X_RUNTIME_FUNCTION = struct {
	FBeginAddress DWORD
	FEndAddress   DWORD
	FUnwindData   DWORD
} /* excpt.h:45:3 */

type RUNTIME_FUNCTION = X_RUNTIME_FUNCTION /* winnt.h:1778:5 */
type PRUNTIME_FUNCTION = uintptr           /* winnt.h:1778:22 */

type PGET_RUNTIME_FUNCTION_CALLBACK = uintptr          /* winnt.h:1780:29 */
type POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK = uintptr /* winnt.h:1781:17 */

// LONG WINAPI InterlockedIncrement(LONG volatile *); moved to psdk_inc/intrin-impl.h
// LONG WINAPI InterlockedDecrement(LONG volatile *); moved to psdk_inc/intrin-impl.h
// LONG WINAPI InterlockedExchange(LONG volatile *, LONG); moved to psdk_inc/intrin-impl.h

type X_LDT_ENTRY = struct {
	FLimitLow WORD
	FBaseLow  WORD
	FHighWord struct {
		F__ccgo_pad1 [0]uint32
		FBytes       struct {
			FBaseMid BYTE
			FFlags1  BYTE
			FFlags2  BYTE
			FBaseHi  BYTE
		}
	}
} /* winnt.h:2416:13 */

// LONG WINAPI InterlockedIncrement(LONG volatile *); moved to psdk_inc/intrin-impl.h
// LONG WINAPI InterlockedDecrement(LONG volatile *); moved to psdk_inc/intrin-impl.h
// LONG WINAPI InterlockedExchange(LONG volatile *, LONG); moved to psdk_inc/intrin-impl.h

type LDT_ENTRY = X_LDT_ENTRY /* winnt.h:2439:7 */
type PLDT_ENTRY = uintptr    /* winnt.h:2439:17 */

// http://www.nynaeve.net/?p=99

type EXCEPTION_RECORD = X_EXCEPTION_RECORD /* winnt.h:2784:7 */

type PEXCEPTION_RECORD = uintptr /* winnt.h:2786:30 */

type X_EXCEPTION_RECORD32 = struct {
	FExceptionCode        DWORD
	FExceptionFlags       DWORD
	FExceptionRecord      DWORD
	FExceptionAddress     DWORD
	FNumberParameters     DWORD
	FExceptionInformation [15]DWORD
} /* winnt.h:2788:13 */

type EXCEPTION_RECORD32 = X_EXCEPTION_RECORD32 /* winnt.h:2795:7 */
type PEXCEPTION_RECORD32 = uintptr             /* winnt.h:2795:26 */

type X_EXCEPTION_RECORD64 = struct {
	FExceptionCode        DWORD
	FExceptionFlags       DWORD
	FExceptionRecord      DWORD64
	FExceptionAddress     DWORD64
	FNumberParameters     DWORD
	F__unusedAlignment    DWORD
	FExceptionInformation [15]DWORD64
} /* winnt.h:2797:13 */

type EXCEPTION_RECORD64 = X_EXCEPTION_RECORD64 /* winnt.h:2805:7 */
type PEXCEPTION_RECORD64 = uintptr             /* winnt.h:2805:26 */

type EXCEPTION_POINTERS = X_EXCEPTION_POINTERS /* winnt.h:2810:7 */
type PEXCEPTION_POINTERS = uintptr             /* winnt.h:2810:26 */

// http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx

type X_UNWIND_HISTORY_TABLE_ENTRY = struct {
	FImageBase     ULONG64
	FFunctionEntry PRUNTIME_FUNCTION
} /* excpt.h:45:3 */

// http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx

type UNWIND_HISTORY_TABLE_ENTRY = X_UNWIND_HISTORY_TABLE_ENTRY /* winnt.h:2825:5 */
type PUNWIND_HISTORY_TABLE_ENTRY = uintptr                     /* winnt.h:2825:33 */

type X_UNWIND_HISTORY_TABLE = struct {
	FCount       ULONG
	FLocalHint   BYTE
	FGlobalHint  BYTE
	FSearch      BYTE
	FOnce        BYTE
	FLowAddress  ULONG64
	FHighAddress ULONG64
	FEntry       [12]UNWIND_HISTORY_TABLE_ENTRY
} /* excpt.h:45:3 */

type UNWIND_HISTORY_TABLE = X_UNWIND_HISTORY_TABLE /* winnt.h:2840:5 */
type PUNWIND_HISTORY_TABLE = uintptr               /* winnt.h:2840:27 */
type DISPATCHER_CONTEXT = X_DISPATCHER_CONTEXT     /* winnt.h:2845:38 */
type PDISPATCHER_CONTEXT = uintptr                 /* winnt.h:2846:38 */

// http://msdn.microsoft.com/en-us/library/ms680617(VS.85).aspx

type X_KNONVOLATILE_CONTEXT_POINTERS = struct {
	FFloatingContext [16]PM128A
	FIntegerContext  [16]PULONG64
} /* winnt.h:2865:11 */

// http://msdn.microsoft.com/en-us/library/ms680617(VS.85).aspx

type KNONVOLATILE_CONTEXT_POINTERS = X_KNONVOLATILE_CONTEXT_POINTERS /* winnt.h:2869:5 */
type PKNONVOLATILE_CONTEXT_POINTERS = uintptr                        /* winnt.h:2869:36 */

type PACCESS_TOKEN = PVOID        /* winnt.h:2872:19 */
type PSECURITY_DESCRIPTOR = PVOID /* winnt.h:2873:19 */
type PSID = PVOID                 /* winnt.h:2874:19 */
type PCLAIMS_BLOB = PVOID         /* winnt.h:2875:19 */
type ACCESS_MASK = DWORD          /* winnt.h:2876:19 */
type PACCESS_MASK = uintptr       /* winnt.h:2877:25 */

type X_GENERIC_MAPPING = struct {
	FGenericRead    ACCESS_MASK
	FGenericWrite   ACCESS_MASK
	FGenericExecute ACCESS_MASK
	FGenericAll     ACCESS_MASK
} /* winnt.h:2903:13 */

type GENERIC_MAPPING = X_GENERIC_MAPPING /* winnt.h:2908:7 */
type PGENERIC_MAPPING = uintptr          /* winnt.h:2909:29 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_LUID_AND_ATTRIBUTES = struct {
	FLuid       LUID
	FAttributes DWORD
} /* winnt.h:2912:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type LUID_AND_ATTRIBUTES = X_LUID_AND_ATTRIBUTES        /* winnt.h:2915:7 */
type PLUID_AND_ATTRIBUTES = uintptr                     /* winnt.h:2915:27 */
type LUID_AND_ATTRIBUTES_ARRAY = [1]LUID_AND_ATTRIBUTES /* winnt.h:2916:33 */
type PLUID_AND_ATTRIBUTES_ARRAY = uintptr               /* winnt.h:2917:39 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_SID_IDENTIFIER_AUTHORITY = struct{ FValue [6]BYTE } /* winnt.h:2922:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type SID_IDENTIFIER_AUTHORITY = X_SID_IDENTIFIER_AUTHORITY /* winnt.h:2924:7 */
type PSID_IDENTIFIER_AUTHORITY = uintptr                   /* winnt.h:2924:32 */

type X_SID = struct {
	FRevision            BYTE
	FSubAuthorityCount   BYTE
	FIdentifierAuthority SID_IDENTIFIER_AUTHORITY
	FSubAuthority        [1]DWORD
} /* winnt.h:2929:13 */

type SID = X_SID     /* winnt.h:2934:7 */
type PISID = uintptr /* winnt.h:2934:11 */

type SID_NAME_USE = uint32   /* winnt.h:2948:7 */
type PSID_NAME_USE = uintptr /* winnt.h:2948:20 */

type X_SID_AND_ATTRIBUTES = struct {
	FSid         PSID
	FAttributes  DWORD
	F__ccgo_pad1 [4]byte
} /* winnt.h:2950:13 */

type SID_AND_ATTRIBUTES = X_SID_AND_ATTRIBUTES /* winnt.h:2957:7 */
type PSID_AND_ATTRIBUTES = uintptr             /* winnt.h:2957:26 */

type SID_AND_ATTRIBUTES_ARRAY = [1]SID_AND_ATTRIBUTES /* winnt.h:2959:32 */
type PSID_AND_ATTRIBUTES_ARRAY = uintptr              /* winnt.h:2960:38 */

type SID_HASH_ENTRY = ULONG_PTR /* winnt.h:2962:23 */
type PSID_HASH_ENTRY = uintptr  /* winnt.h:2962:39 */

type X_SID_AND_ATTRIBUTES_HASH = struct {
	FSidCount    DWORD
	F__ccgo_pad1 [4]byte
	FSidAttr     PSID_AND_ATTRIBUTES
	FHash        [32]SID_HASH_ENTRY
} /* winnt.h:2964:13 */

type SID_AND_ATTRIBUTES_HASH = X_SID_AND_ATTRIBUTES_HASH /* winnt.h:2968:7 */
type PSID_AND_ATTRIBUTES_HASH = uintptr                  /* winnt.h:2968:32 */

type WELL_KNOWN_SID_TYPE = uint32 /* winnt.h:3256:3 */

type X_ACL = struct {
	FAclRevision BYTE
	FSbz1        BYTE
	FAclSize     WORD
	FAceCount    WORD
	FSbz2        WORD
} /* winnt.h:3286:13 */

type ACL = X_ACL    /* winnt.h:3292:7 */
type PACL = uintptr /* winnt.h:3293:17 */

type X_ACE_HEADER = struct {
	FAceType  BYTE
	FAceFlags BYTE
	FAceSize  WORD
} /* winnt.h:3295:13 */

type ACE_HEADER = X_ACE_HEADER /* winnt.h:3299:7 */
type PACE_HEADER = uintptr     /* winnt.h:3300:24 */

type X_ACCESS_ALLOWED_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3346:13 */

type ACCESS_ALLOWED_ACE = X_ACCESS_ALLOWED_ACE /* winnt.h:3350:7 */

type PACCESS_ALLOWED_ACE = uintptr /* winnt.h:3352:32 */

type X_ACCESS_DENIED_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3354:13 */

type ACCESS_DENIED_ACE = X_ACCESS_DENIED_ACE /* winnt.h:3358:7 */
type PACCESS_DENIED_ACE = uintptr            /* winnt.h:3359:31 */

type X_SYSTEM_AUDIT_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3361:13 */

type SYSTEM_AUDIT_ACE = X_SYSTEM_AUDIT_ACE /* winnt.h:3365:7 */
type PSYSTEM_AUDIT_ACE = uintptr           /* winnt.h:3366:30 */

type X_SYSTEM_ALARM_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3368:13 */

type SYSTEM_ALARM_ACE = X_SYSTEM_ALARM_ACE /* winnt.h:3372:7 */
type PSYSTEM_ALARM_ACE = uintptr           /* winnt.h:3373:30 */

type X_SYSTEM_RESOURCE_ATTRIBUTE_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3375:13 */

type SYSTEM_RESOURCE_ATTRIBUTE_ACE = X_SYSTEM_RESOURCE_ATTRIBUTE_ACE /* winnt.h:3379:7 */
type PSYSTEM_RESOURCE_ATTRIBUTE_ACE = uintptr                        /* winnt.h:3379:37 */

type X_SYSTEM_SCOPED_POLICY_ID_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3381:13 */

type SYSTEM_SCOPED_POLICY_ID_ACE = X_SYSTEM_SCOPED_POLICY_ID_ACE /* winnt.h:3385:7 */
type PSYSTEM_SCOPED_POLICY_ID_ACE = uintptr                      /* winnt.h:3385:35 */

type X_SYSTEM_MANDATORY_LABEL_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3387:13 */

type SYSTEM_MANDATORY_LABEL_ACE = X_SYSTEM_MANDATORY_LABEL_ACE /* winnt.h:3391:7 */
type PSYSTEM_MANDATORY_LABEL_ACE = uintptr                     /* winnt.h:3391:35 */

type X_ACCESS_ALLOWED_OBJECT_ACE = struct {
	FHeader              ACE_HEADER
	FMask                ACCESS_MASK
	FFlags               DWORD
	FObjectType          GUID
	FInheritedObjectType GUID
	FSidStart            DWORD
} /* winnt.h:3399:13 */

type ACCESS_ALLOWED_OBJECT_ACE = X_ACCESS_ALLOWED_OBJECT_ACE /* winnt.h:3406:7 */
type PACCESS_ALLOWED_OBJECT_ACE = uintptr                    /* winnt.h:3406:33 */

type X_ACCESS_DENIED_OBJECT_ACE = struct {
	FHeader              ACE_HEADER
	FMask                ACCESS_MASK
	FFlags               DWORD
	FObjectType          GUID
	FInheritedObjectType GUID
	FSidStart            DWORD
} /* winnt.h:3408:13 */

type ACCESS_DENIED_OBJECT_ACE = X_ACCESS_DENIED_OBJECT_ACE /* winnt.h:3415:7 */
type PACCESS_DENIED_OBJECT_ACE = uintptr                   /* winnt.h:3415:32 */

type X_SYSTEM_AUDIT_OBJECT_ACE = struct {
	FHeader              ACE_HEADER
	FMask                ACCESS_MASK
	FFlags               DWORD
	FObjectType          GUID
	FInheritedObjectType GUID
	FSidStart            DWORD
} /* winnt.h:3417:13 */

type SYSTEM_AUDIT_OBJECT_ACE = X_SYSTEM_AUDIT_OBJECT_ACE /* winnt.h:3424:7 */
type PSYSTEM_AUDIT_OBJECT_ACE = uintptr                  /* winnt.h:3424:31 */

type X_SYSTEM_ALARM_OBJECT_ACE = struct {
	FHeader              ACE_HEADER
	FMask                ACCESS_MASK
	FFlags               DWORD
	FObjectType          GUID
	FInheritedObjectType GUID
	FSidStart            DWORD
} /* winnt.h:3426:13 */

type SYSTEM_ALARM_OBJECT_ACE = X_SYSTEM_ALARM_OBJECT_ACE /* winnt.h:3433:7 */
type PSYSTEM_ALARM_OBJECT_ACE = uintptr                  /* winnt.h:3433:31 */

type X_ACCESS_ALLOWED_CALLBACK_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3435:13 */

type ACCESS_ALLOWED_CALLBACK_ACE = X_ACCESS_ALLOWED_CALLBACK_ACE /* winnt.h:3439:7 */
type PACCESS_ALLOWED_CALLBACK_ACE = uintptr                      /* winnt.h:3439:35 */

type X_ACCESS_DENIED_CALLBACK_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3441:13 */

type ACCESS_DENIED_CALLBACK_ACE = X_ACCESS_DENIED_CALLBACK_ACE /* winnt.h:3445:7 */
type PACCESS_DENIED_CALLBACK_ACE = uintptr                     /* winnt.h:3445:34 */

type X_SYSTEM_AUDIT_CALLBACK_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3447:13 */

type SYSTEM_AUDIT_CALLBACK_ACE = X_SYSTEM_AUDIT_CALLBACK_ACE /* winnt.h:3451:7 */
type PSYSTEM_AUDIT_CALLBACK_ACE = uintptr                    /* winnt.h:3451:33 */

type X_SYSTEM_ALARM_CALLBACK_ACE = struct {
	FHeader   ACE_HEADER
	FMask     ACCESS_MASK
	FSidStart DWORD
} /* winnt.h:3453:13 */

type SYSTEM_ALARM_CALLBACK_ACE = X_SYSTEM_ALARM_CALLBACK_ACE /* winnt.h:3457:7 */
type PSYSTEM_ALARM_CALLBACK_ACE = uintptr                    /* winnt.h:3457:33 */

type X_ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = struct {
	FHeader              ACE_HEADER
	FMask                ACCESS_MASK
	FFlags               DWORD
	FObjectType          GUID
	FInheritedObjectType GUID
	FSidStart            DWORD
} /* winnt.h:3459:13 */

type ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = X_ACCESS_ALLOWED_CALLBACK_OBJECT_ACE /* winnt.h:3467:7 */
type PACCESS_ALLOWED_CALLBACK_OBJECT_ACE = uintptr                             /* winnt.h:3467:42 */

type X_ACCESS_DENIED_CALLBACK_OBJECT_ACE = struct {
	FHeader              ACE_HEADER
	FMask                ACCESS_MASK
	FFlags               DWORD
	FObjectType          GUID
	FInheritedObjectType GUID
	FSidStart            DWORD
} /* winnt.h:3469:13 */

type ACCESS_DENIED_CALLBACK_OBJECT_ACE = X_ACCESS_DENIED_CALLBACK_OBJECT_ACE /* winnt.h:3476:7 */
type PACCESS_DENIED_CALLBACK_OBJECT_ACE = uintptr                            /* winnt.h:3476:41 */

type X_SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = struct {
	FHeader              ACE_HEADER
	FMask                ACCESS_MASK
	FFlags               DWORD
	FObjectType          GUID
	FInheritedObjectType GUID
	FSidStart            DWORD
} /* winnt.h:3478:13 */

type SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = X_SYSTEM_AUDIT_CALLBACK_OBJECT_ACE /* winnt.h:3485:7 */
type PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE = uintptr                           /* winnt.h:3485:40 */

type X_SYSTEM_ALARM_CALLBACK_OBJECT_ACE = struct {
	FHeader              ACE_HEADER
	FMask                ACCESS_MASK
	FFlags               DWORD
	FObjectType          GUID
	FInheritedObjectType GUID
	FSidStart            DWORD
} /* winnt.h:3487:13 */

type SYSTEM_ALARM_CALLBACK_OBJECT_ACE = X_SYSTEM_ALARM_CALLBACK_OBJECT_ACE /* winnt.h:3495:7 */
type PSYSTEM_ALARM_CALLBACK_OBJECT_ACE = uintptr                           /* winnt.h:3495:40 */

type ACL_INFORMATION_CLASS = uint32 /* winnt.h:3502:7 */

type X_ACL_REVISION_INFORMATION = struct{ FAclRevision DWORD } /* winnt.h:3504:13 */

type ACL_REVISION_INFORMATION = X_ACL_REVISION_INFORMATION /* winnt.h:3506:7 */
type PACL_REVISION_INFORMATION = uintptr                   /* winnt.h:3507:38 */

type X_ACL_SIZE_INFORMATION = struct {
	FAceCount      DWORD
	FAclBytesInUse DWORD
	FAclBytesFree  DWORD
} /* winnt.h:3509:13 */

type ACL_SIZE_INFORMATION = X_ACL_SIZE_INFORMATION /* winnt.h:3513:7 */
type PACL_SIZE_INFORMATION = uintptr               /* winnt.h:3514:34 */

type SECURITY_DESCRIPTOR_CONTROL = WORD     /* winnt.h:3521:18 */
type PSECURITY_DESCRIPTOR_CONTROL = uintptr /* winnt.h:3521:46 */

type X_SECURITY_DESCRIPTOR_RELATIVE = struct {
	FRevision BYTE
	FSbz1     BYTE
	FControl  SECURITY_DESCRIPTOR_CONTROL
	FOwner    DWORD
	FGroup    DWORD
	FSacl     DWORD
	FDacl     DWORD
} /* winnt.h:3538:13 */

type SECURITY_DESCRIPTOR_RELATIVE = X_SECURITY_DESCRIPTOR_RELATIVE /* winnt.h:3546:7 */
type PISECURITY_DESCRIPTOR_RELATIVE = uintptr                      /* winnt.h:3546:36 */

type X_SECURITY_DESCRIPTOR = struct {
	FRevision    BYTE
	FSbz1        BYTE
	FControl     SECURITY_DESCRIPTOR_CONTROL
	F__ccgo_pad1 [4]byte
	FOwner       PSID
	FGroup       PSID
	FSacl        PACL
	FDacl        PACL
} /* winnt.h:3548:13 */

type SECURITY_DESCRIPTOR = X_SECURITY_DESCRIPTOR /* winnt.h:3556:7 */
type PISECURITY_DESCRIPTOR = uintptr             /* winnt.h:3556:27 */

type X_OBJECT_TYPE_LIST = struct {
	FLevel       WORD
	FSbz         WORD
	F__ccgo_pad1 [4]byte
	FObjectType  uintptr
} /* winnt.h:3558:13 */

type OBJECT_TYPE_LIST = X_OBJECT_TYPE_LIST /* winnt.h:3562:7 */
type POBJECT_TYPE_LIST = uintptr           /* winnt.h:3562:24 */

type AUDIT_EVENT_TYPE = uint32   /* winnt.h:3572:7 */
type PAUDIT_EVENT_TYPE = uintptr /* winnt.h:3572:24 */

type X_PRIVILEGE_SET = struct {
	FPrivilegeCount DWORD
	FControl        DWORD
	FPrivilege      [1]LUID_AND_ATTRIBUTES
} /* winnt.h:3590:13 */

type PRIVILEGE_SET = X_PRIVILEGE_SET /* winnt.h:3594:7 */
type PPRIVILEGE_SET = uintptr        /* winnt.h:3594:21 */

type ACCESS_REASON_TYPE = uint32 /* winnt.h:3619:7 */
type ACCESS_REASON = DWORD       /* winnt.h:3620:19 */

type X_ACCESS_REASONS = struct{ FData [32]ACCESS_REASON } /* winnt.h:3622:13 */

type ACCESS_REASONS = X_ACCESS_REASONS /* winnt.h:3624:7 */
type PACCESS_REASONS = uintptr         /* winnt.h:3624:22 */

type X_SE_SECURITY_DESCRIPTOR = struct {
	FSize               DWORD
	FFlags              DWORD
	FSecurityDescriptor PSECURITY_DESCRIPTOR
} /* winnt.h:3630:13 */

type SE_SECURITY_DESCRIPTOR = X_SE_SECURITY_DESCRIPTOR /* winnt.h:3634:7 */
type PSE_SECURITY_DESCRIPTOR = uintptr                 /* winnt.h:3634:30 */

type X_SE_ACCESS_REQUEST = struct {
	FSize                    DWORD
	F__ccgo_pad1             [4]byte
	FSeSecurityDescriptor    PSE_SECURITY_DESCRIPTOR
	FDesiredAccess           ACCESS_MASK
	FPreviouslyGrantedAccess ACCESS_MASK
	FPrincipalSelfSid        PSID
	FGenericMapping          PGENERIC_MAPPING
	FObjectTypeListCount     DWORD
	F__ccgo_pad2             [4]byte
	FObjectTypeList          POBJECT_TYPE_LIST
} /* winnt.h:3636:13 */

type SE_ACCESS_REQUEST = X_SE_ACCESS_REQUEST /* winnt.h:3645:7 */
type PSE_ACCESS_REQUEST = uintptr            /* winnt.h:3645:25 */

type X_SE_ACCESS_REPLY = struct {
	FSize            DWORD
	FResultListCount DWORD
	FGrantedAccess   PACCESS_MASK
	FAccessStatus    PDWORD
	FAccessReason    PACCESS_REASONS
	FPrivileges      uintptr
} /* winnt.h:3647:13 */

type SE_ACCESS_REPLY = X_SE_ACCESS_REPLY /* winnt.h:3654:7 */
type PSE_ACCESS_REPLY = uintptr          /* winnt.h:3654:23 */

type SECURITY_IMPERSONATION_LEVEL = uint32   /* winnt.h:3694:7 */
type PSECURITY_IMPERSONATION_LEVEL = uintptr /* winnt.h:3694:36 */

type TOKEN_TYPE = uint32   /* winnt.h:3721:7 */
type PTOKEN_TYPE = uintptr /* winnt.h:3722:24 */

type TOKEN_ELEVATION_TYPE = uint32   /* winnt.h:3728:7 */
type PTOKEN_ELEVATION_TYPE = uintptr /* winnt.h:3728:29 */

type TOKEN_INFORMATION_CLASS = uint32   /* winnt.h:3772:7 */
type PTOKEN_INFORMATION_CLASS = uintptr /* winnt.h:3772:31 */

type X_TOKEN_USER = struct{ FUser SID_AND_ATTRIBUTES } /* winnt.h:3774:13 */

type TOKEN_USER = X_TOKEN_USER /* winnt.h:3776:7 */
type PTOKEN_USER = uintptr     /* winnt.h:3776:18 */

type X_TOKEN_GROUPS = struct {
	FGroupCount  DWORD
	F__ccgo_pad1 [4]byte
	FGroups      [1]SID_AND_ATTRIBUTES
} /* winnt.h:3778:13 */

type TOKEN_GROUPS = X_TOKEN_GROUPS /* winnt.h:3785:7 */
type PTOKEN_GROUPS = uintptr       /* winnt.h:3785:20 */

type X_TOKEN_PRIVILEGES = struct {
	FPrivilegeCount DWORD
	FPrivileges     [1]LUID_AND_ATTRIBUTES
} /* winnt.h:3787:13 */

type TOKEN_PRIVILEGES = X_TOKEN_PRIVILEGES /* winnt.h:3790:7 */
type PTOKEN_PRIVILEGES = uintptr           /* winnt.h:3790:24 */

type X_TOKEN_OWNER = struct{ FOwner PSID } /* winnt.h:3792:13 */

type TOKEN_OWNER = X_TOKEN_OWNER /* winnt.h:3794:7 */
type PTOKEN_OWNER = uintptr      /* winnt.h:3794:19 */

type X_TOKEN_PRIMARY_GROUP = struct{ FPrimaryGroup PSID } /* winnt.h:3796:13 */

type TOKEN_PRIMARY_GROUP = X_TOKEN_PRIMARY_GROUP /* winnt.h:3798:7 */
type PTOKEN_PRIMARY_GROUP = uintptr              /* winnt.h:3798:27 */

type X_TOKEN_DEFAULT_DACL = struct{ FDefaultDacl PACL } /* winnt.h:3800:13 */

type TOKEN_DEFAULT_DACL = X_TOKEN_DEFAULT_DACL /* winnt.h:3802:7 */
type PTOKEN_DEFAULT_DACL = uintptr             /* winnt.h:3802:26 */

type X_TOKEN_USER_CLAIMS = struct{ FUserClaims PCLAIMS_BLOB } /* winnt.h:3804:13 */

type TOKEN_USER_CLAIMS = X_TOKEN_USER_CLAIMS /* winnt.h:3806:7 */
type PTOKEN_USER_CLAIMS = uintptr            /* winnt.h:3806:25 */

type X_TOKEN_DEVICE_CLAIMS = struct{ FDeviceClaims PCLAIMS_BLOB } /* winnt.h:3808:13 */

type TOKEN_DEVICE_CLAIMS = X_TOKEN_DEVICE_CLAIMS /* winnt.h:3810:7 */
type PTOKEN_DEVICE_CLAIMS = uintptr              /* winnt.h:3810:27 */

type X_TOKEN_GROUPS_AND_PRIVILEGES = struct {
	FSidCount            DWORD
	FSidLength           DWORD
	FSids                PSID_AND_ATTRIBUTES
	FRestrictedSidCount  DWORD
	FRestrictedSidLength DWORD
	FRestrictedSids      PSID_AND_ATTRIBUTES
	FPrivilegeCount      DWORD
	FPrivilegeLength     DWORD
	FPrivileges          PLUID_AND_ATTRIBUTES
	FAuthenticationId    LUID
} /* winnt.h:3812:13 */

type TOKEN_GROUPS_AND_PRIVILEGES = X_TOKEN_GROUPS_AND_PRIVILEGES /* winnt.h:3823:7 */
type PTOKEN_GROUPS_AND_PRIVILEGES = uintptr                      /* winnt.h:3823:35 */

type X_TOKEN_LINKED_TOKEN = struct{ FLinkedToken HANDLE } /* winnt.h:3825:13 */

type TOKEN_LINKED_TOKEN = X_TOKEN_LINKED_TOKEN /* winnt.h:3827:7 */
type PTOKEN_LINKED_TOKEN = uintptr             /* winnt.h:3827:26 */

type X_TOKEN_ELEVATION = struct{ FTokenIsElevated DWORD } /* winnt.h:3829:13 */

type TOKEN_ELEVATION = X_TOKEN_ELEVATION /* winnt.h:3831:7 */
type PTOKEN_ELEVATION = uintptr          /* winnt.h:3831:23 */

type X_TOKEN_MANDATORY_LABEL = struct{ FLabel SID_AND_ATTRIBUTES } /* winnt.h:3833:13 */

type TOKEN_MANDATORY_LABEL = X_TOKEN_MANDATORY_LABEL /* winnt.h:3835:7 */
type PTOKEN_MANDATORY_LABEL = uintptr                /* winnt.h:3835:29 */

type X_TOKEN_MANDATORY_POLICY = struct{ FPolicy DWORD } /* winnt.h:3843:13 */

type TOKEN_MANDATORY_POLICY = X_TOKEN_MANDATORY_POLICY /* winnt.h:3845:7 */
type PTOKEN_MANDATORY_POLICY = uintptr                 /* winnt.h:3845:30 */

type X_TOKEN_ACCESS_INFORMATION = struct {
	FSidHash            PSID_AND_ATTRIBUTES_HASH
	FRestrictedSidHash  PSID_AND_ATTRIBUTES_HASH
	FPrivileges         PTOKEN_PRIVILEGES
	FAuthenticationId   LUID
	FTokenType          TOKEN_TYPE
	FImpersonationLevel SECURITY_IMPERSONATION_LEVEL
	FMandatoryPolicy    TOKEN_MANDATORY_POLICY
	FFlags              DWORD
	FAppContainerNumber DWORD
	F__ccgo_pad1        [4]byte
	FPackageSid         PSID
	FCapabilitiesHash   PSID_AND_ATTRIBUTES_HASH
} /* winnt.h:3847:13 */

type TOKEN_ACCESS_INFORMATION = X_TOKEN_ACCESS_INFORMATION /* winnt.h:3859:7 */
type PTOKEN_ACCESS_INFORMATION = uintptr                   /* winnt.h:3859:32 */

type X_TOKEN_AUDIT_POLICY = struct{ FPerUserPolicy [29]UCHAR } /* winnt.h:3863:13 */

type TOKEN_AUDIT_POLICY = X_TOKEN_AUDIT_POLICY /* winnt.h:3865:7 */
type PTOKEN_AUDIT_POLICY = uintptr             /* winnt.h:3865:27 */

type X_TOKEN_SOURCE = struct {
	FSourceName       [8]CHAR
	FSourceIdentifier LUID
} /* winnt.h:3869:13 */

type TOKEN_SOURCE = X_TOKEN_SOURCE /* winnt.h:3872:7 */
type PTOKEN_SOURCE = uintptr       /* winnt.h:3872:20 */

type X_TOKEN_STATISTICS = struct {
	FTokenId            LUID
	FAuthenticationId   LUID
	FExpirationTime     LARGE_INTEGER
	FTokenType          TOKEN_TYPE
	FImpersonationLevel SECURITY_IMPERSONATION_LEVEL
	FDynamicCharged     DWORD
	FDynamicAvailable   DWORD
	FGroupCount         DWORD
	FPrivilegeCount     DWORD
	FModifiedId         LUID
} /* winnt.h:3874:13 */

type TOKEN_STATISTICS = X_TOKEN_STATISTICS /* winnt.h:3885:7 */
type PTOKEN_STATISTICS = uintptr           /* winnt.h:3885:24 */

type X_TOKEN_CONTROL = struct {
	FTokenId          LUID
	FAuthenticationId LUID
	FModifiedId       LUID
	FTokenSource      TOKEN_SOURCE
} /* winnt.h:3887:13 */

type TOKEN_CONTROL = X_TOKEN_CONTROL /* winnt.h:3892:7 */
type PTOKEN_CONTROL = uintptr        /* winnt.h:3892:21 */

type X_TOKEN_ORIGIN = struct{ FOriginatingLogonSession LUID } /* winnt.h:3894:13 */

type TOKEN_ORIGIN = X_TOKEN_ORIGIN /* winnt.h:3896:7 */
type PTOKEN_ORIGIN = uintptr       /* winnt.h:3896:20 */

type MANDATORY_LEVEL = uint32   /* winnt.h:3906:7 */
type PMANDATORY_LEVEL = uintptr /* winnt.h:3906:23 */

type X_TOKEN_APPCONTAINER_INFORMATION = struct{ FTokenAppContainer PSID } /* winnt.h:3908:13 */

type TOKEN_APPCONTAINER_INFORMATION = X_TOKEN_APPCONTAINER_INFORMATION /* winnt.h:3910:7 */
type PTOKEN_APPCONTAINER_INFORMATION = uintptr                         /* winnt.h:3910:38 */

type X_CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = struct {
	FVersion DWORD64
	FName    PWSTR
} /* winnt.h:3920:13 */

type CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = X_CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE /* winnt.h:3923:7 */
type PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = uintptr                              /* winnt.h:3923:43 */

type X_CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = struct {
	FpValue      PVOID
	FValueLength DWORD
	F__ccgo_pad1 [4]byte
} /* winnt.h:3925:13 */

type CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = X_CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE /* winnt.h:3928:7 */
type PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = uintptr                                      /* winnt.h:3928:52 */

type X_CLAIM_SECURITY_ATTRIBUTE_V1 = struct {
	FName        PWSTR
	FValueType   WORD
	FReserved    WORD
	FFlags       DWORD
	FValueCount  DWORD
	F__ccgo_pad1 [4]byte
	FValues      struct{ FpInt64 PLONG64 }
} /* winnt.h:3941:13 */

type CLAIM_SECURITY_ATTRIBUTE_V1 = X_CLAIM_SECURITY_ATTRIBUTE_V1 /* winnt.h:3954:7 */
type PCLAIM_SECURITY_ATTRIBUTE_V1 = uintptr                      /* winnt.h:3954:35 */

type X_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = struct {
	FName       DWORD
	FValueType  WORD
	FReserved   WORD
	FFlags      DWORD
	FValueCount DWORD
	FValues     struct{ FpInt64 [1]DWORD }
} /* winnt.h:3956:13 */

type CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = X_CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 /* winnt.h:3969:7 */
type PCLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = uintptr                               /* winnt.h:3969:44 */

type X_CLAIM_SECURITY_ATTRIBUTES_INFORMATION = struct {
	FVersion        WORD
	FReserved       WORD
	FAttributeCount DWORD
	FAttribute      struct{ FpAttributeV1 PCLAIM_SECURITY_ATTRIBUTE_V1 }
} /* winnt.h:3975:13 */

type CLAIM_SECURITY_ATTRIBUTES_INFORMATION = X_CLAIM_SECURITY_ATTRIBUTES_INFORMATION /* winnt.h:3982:7 */
type PCLAIM_SECURITY_ATTRIBUTES_INFORMATION = uintptr                                /* winnt.h:3982:45 */

type SECURITY_CONTEXT_TRACKING_MODE = BOOLEAN  /* winnt.h:3987:21 */
type PSECURITY_CONTEXT_TRACKING_MODE = uintptr /* winnt.h:3987:52 */

type X_SECURITY_QUALITY_OF_SERVICE = struct {
	FLength              DWORD
	FImpersonationLevel  SECURITY_IMPERSONATION_LEVEL
	FContextTrackingMode SECURITY_CONTEXT_TRACKING_MODE
	FEffectiveOnly       BOOLEAN
	F__ccgo_pad1         [2]byte
} /* winnt.h:3989:13 */

type SECURITY_QUALITY_OF_SERVICE = X_SECURITY_QUALITY_OF_SERVICE /* winnt.h:3994:7 */
type PSECURITY_QUALITY_OF_SERVICE = uintptr                      /* winnt.h:3994:35 */

type X_SE_IMPERSONATION_STATE = struct {
	FToken         PACCESS_TOKEN
	FCopyOnOpen    BOOLEAN
	FEffectiveOnly BOOLEAN
	F__ccgo_pad1   [2]byte
	FLevel         SECURITY_IMPERSONATION_LEVEL
} /* winnt.h:3996:13 */

type SE_IMPERSONATION_STATE = X_SE_IMPERSONATION_STATE /* winnt.h:4001:7 */
type PSE_IMPERSONATION_STATE = uintptr                 /* winnt.h:4001:30 */

type SECURITY_INFORMATION = DWORD    /* winnt.h:4008:19 */
type PSECURITY_INFORMATION = uintptr /* winnt.h:4008:40 */

type SE_LEARNING_MODE_DATA_TYPE = uint32 /* winnt.h:4028:7 */

type X_SECURITY_CAPABILITIES = struct {
	FAppContainerSid PSID
	FCapabilities    PSID_AND_ATTRIBUTES
	FCapabilityCount DWORD
	FReserved        DWORD
} /* winnt.h:4032:13 */

type SECURITY_CAPABILITIES = X_SECURITY_CAPABILITIES /* winnt.h:4037:7 */
type PSECURITY_CAPABILITIES = uintptr                /* winnt.h:4037:29 */
type LPSECURITY_CAPABILITIES = uintptr               /* winnt.h:4037:53 */

type X_JOB_SET_ARRAY = struct {
	FJobHandle   HANDLE
	FMemberLevel DWORD
	FFlags       DWORD
} /* winnt.h:4092:13 */

type JOB_SET_ARRAY = X_JOB_SET_ARRAY /* winnt.h:4096:7 */
type PJOB_SET_ARRAY = uintptr        /* winnt.h:4096:21 */

type X_EXCEPTION_REGISTRATION_RECORD = struct {
	F__0 struct{ FNext uintptr }
	F__8 struct{ FHandler PEXCEPTION_ROUTINE }
} /* winnt.h:4102:13 */

type EXCEPTION_REGISTRATION_RECORD = X_EXCEPTION_REGISTRATION_RECORD /* winnt.h:4111:7 */

type PEXCEPTION_REGISTRATION_RECORD = uintptr /* winnt.h:4113:43 */

type EXCEPTION_REGISTRATION = EXCEPTION_REGISTRATION_RECORD   /* winnt.h:4115:43 */
type PEXCEPTION_REGISTRATION = PEXCEPTION_REGISTRATION_RECORD /* winnt.h:4116:44 */

type X_NT_TIB = struct {
	FExceptionList        uintptr
	FStackBase            PVOID
	FStackLimit           PVOID
	FSubSystemTib         PVOID
	F__32                 struct{ FFiberData PVOID }
	FArbitraryUserPointer PVOID
	FSelf                 uintptr
} /* winnt.h:4121:28 */

type NT_TIB = X_NT_TIB /* winnt.h:4132:7 */
type PNT_TIB = uintptr /* winnt.h:4133:20 */

type X_NT_TIB32 = struct {
	FExceptionList        DWORD
	FStackBase            DWORD
	FStackLimit           DWORD
	FSubSystemTib         DWORD
	F__16                 struct{ FFiberData DWORD }
	FArbitraryUserPointer DWORD
	FSelf                 DWORD
} /* winnt.h:4136:28 */

type NT_TIB32 = X_NT_TIB32 /* winnt.h:4147:7 */
type PNT_TIB32 = uintptr   /* winnt.h:4147:16 */

type X_NT_TIB64 = struct {
	FExceptionList        DWORD64
	FStackBase            DWORD64
	FStackLimit           DWORD64
	FSubSystemTib         DWORD64
	F__32                 struct{ FFiberData DWORD64 }
	FArbitraryUserPointer DWORD64
	FSelf                 DWORD64
} /* winnt.h:4149:28 */

type NT_TIB64 = X_NT_TIB64 /* winnt.h:4160:7 */
type PNT_TIB64 = uintptr   /* winnt.h:4160:16 */

type X_UMS_CREATE_THREAD_ATTRIBUTES = struct {
	FUmsVersion        DWORD
	F__ccgo_pad1       [4]byte
	FUmsContext        PVOID
	FUmsCompletionList PVOID
} /* winnt.h:4171:13 */

type UMS_CREATE_THREAD_ATTRIBUTES = X_UMS_CREATE_THREAD_ATTRIBUTES /* winnt.h:4175:7 */
type PUMS_CREATE_THREAD_ATTRIBUTES = uintptr                       /* winnt.h:4175:36 */

type X_QUOTA_LIMITS = struct {
	FPagedPoolLimit        SIZE_T
	FNonPagedPoolLimit     SIZE_T
	FMinimumWorkingSetSize SIZE_T
	FMaximumWorkingSetSize SIZE_T
	FPagefileLimit         SIZE_T
	FTimeLimit             LARGE_INTEGER
} /* winnt.h:4177:13 */

type QUOTA_LIMITS = X_QUOTA_LIMITS /* winnt.h:4184:7 */
type PQUOTA_LIMITS = uintptr       /* winnt.h:4184:20 */

type X_RATE_QUOTA_LIMIT = struct{ FRateData DWORD } /* winnt.h:4192:13 */

type RATE_QUOTA_LIMIT = X_RATE_QUOTA_LIMIT /* winnt.h:4198:7 */
type PRATE_QUOTA_LIMIT = uintptr           /* winnt.h:4198:25 */

type X_QUOTA_LIMITS_EX = struct {
	FPagedPoolLimit        SIZE_T
	FNonPagedPoolLimit     SIZE_T
	FMinimumWorkingSetSize SIZE_T
	FMaximumWorkingSetSize SIZE_T
	FPagefileLimit         SIZE_T
	FTimeLimit             LARGE_INTEGER
	FWorkingSetLimit       SIZE_T
	FReserved2             SIZE_T
	FReserved3             SIZE_T
	FReserved4             SIZE_T
	FFlags                 DWORD
	FCpuRateLimit          RATE_QUOTA_LIMIT
} /* winnt.h:4200:13 */

type QUOTA_LIMITS_EX = X_QUOTA_LIMITS_EX /* winnt.h:4213:7 */
type PQUOTA_LIMITS_EX = uintptr          /* winnt.h:4213:23 */

type X_IO_COUNTERS = struct {
	FReadOperationCount  ULONGLONG
	FWriteOperationCount ULONGLONG
	FOtherOperationCount ULONGLONG
	FReadTransferCount   ULONGLONG
	FWriteTransferCount  ULONGLONG
	FOtherTransferCount  ULONGLONG
} /* winnt.h:4215:13 */

type IO_COUNTERS = X_IO_COUNTERS /* winnt.h:4222:7 */
type PIO_COUNTERS = uintptr      /* winnt.h:4223:25 */

type HARDWARE_COUNTER_TYPE = uint32   /* winnt.h:4231:7 */
type PHARDWARE_COUNTER_TYPE = uintptr /* winnt.h:4231:30 */

type PROCESS_MITIGATION_POLICY = uint32   /* winnt.h:4246:7 */
type PPROCESS_MITIGATION_POLICY = uintptr /* winnt.h:4246:33 */

type X_PROCESS_MITIGATION_ASLR_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4248:13 */

type PROCESS_MITIGATION_ASLR_POLICY = X_PROCESS_MITIGATION_ASLR_POLICY /* winnt.h:4259:7 */
type PPROCESS_MITIGATION_ASLR_POLICY = uintptr                         /* winnt.h:4259:38 */

type X_PROCESS_MITIGATION_DEP_POLICY = struct {
	F__0         struct{ FFlags DWORD }
	FPermanent   BOOLEAN
	F__ccgo_pad1 [3]byte
} /* winnt.h:4261:13 */

type PROCESS_MITIGATION_DEP_POLICY = X_PROCESS_MITIGATION_DEP_POLICY /* winnt.h:4271:7 */
type PPROCESS_MITIGATION_DEP_POLICY = uintptr                        /* winnt.h:4271:37 */

type X_PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4273:13 */

type PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = X_PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY /* winnt.h:4282:7 */
type PPROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = uintptr                                        /* winnt.h:4282:53 */

type X_PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4284:13 */

type PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = X_PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY /* winnt.h:4292:7 */
type PPROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = uintptr                                        /* winnt.h:4292:53 */

type X_PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4294:13 */

type PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = X_PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY /* winnt.h:4302:7 */
type PPROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = uintptr                                            /* winnt.h:4302:57 */

type X_PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4304:13 */

type PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = X_PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY /* winnt.h:4314:7 */
type PPROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = uintptr                                       /* winnt.h:4314:53 */

type X_PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4316:13 */

type PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = X_PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY /* winnt.h:4326:7 */
type PPROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = uintptr                                     /* winnt.h:4326:51 */

type X_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY = struct {
	F__0 struct {
		FFlags       DWORD
		F__ccgo_pad1 [4]byte
	}
} /* winnt.h:4328:13 */

type PROCESS_MITIGATION_DYNAMIC_CODE_POLICY = X_PROCESS_MITIGATION_DYNAMIC_CODE_POLICY /* winnt.h:4338:7 */
type PPROCESS_MITIGATION_DYNAMIC_CODE_POLICY = uintptr                                 /* winnt.h:4338:47 */

type X_PROCESS_MITIGATION_FONT_DISABLE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4340:13 */

type PROCESS_MITIGATION_FONT_DISABLE_POLICY = X_PROCESS_MITIGATION_FONT_DISABLE_POLICY /* winnt.h:4349:7 */
type PPROCESS_MITIGATION_FONT_DISABLE_POLICY = uintptr                                 /* winnt.h:4349:47 */

type X_PROCESS_MITIGATION_IMAGE_LOAD_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* winnt.h:4351:13 */

type PROCESS_MITIGATION_IMAGE_LOAD_POLICY = X_PROCESS_MITIGATION_IMAGE_LOAD_POLICY /* winnt.h:4361:7 */
type PPROCESS_MITIGATION_IMAGE_LOAD_POLICY = uintptr                               /* winnt.h:4361:45 */

type X_JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = struct {
	FTotalUserTime             LARGE_INTEGER
	FTotalKernelTime           LARGE_INTEGER
	FThisPeriodTotalUserTime   LARGE_INTEGER
	FThisPeriodTotalKernelTime LARGE_INTEGER
	FTotalPageFaultCount       DWORD
	FTotalProcesses            DWORD
	FActiveProcesses           DWORD
	FTotalTerminatedProcesses  DWORD
} /* winnt.h:4363:13 */

type JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = X_JOBOBJECT_BASIC_ACCOUNTING_INFORMATION /* winnt.h:4372:7 */
type PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION = uintptr                                 /* winnt.h:4372:46 */

type X_JOBOBJECT_BASIC_LIMIT_INFORMATION = struct {
	FPerProcessUserTimeLimit LARGE_INTEGER
	FPerJobUserTimeLimit     LARGE_INTEGER
	FLimitFlags              DWORD
	F__ccgo_pad1             [4]byte
	FMinimumWorkingSetSize   SIZE_T
	FMaximumWorkingSetSize   SIZE_T
	FActiveProcessLimit      DWORD
	F__ccgo_pad2             [4]byte
	FAffinity                ULONG_PTR
	FPriorityClass           DWORD
	FSchedulingClass         DWORD
} /* winnt.h:4374:13 */

type JOBOBJECT_BASIC_LIMIT_INFORMATION = X_JOBOBJECT_BASIC_LIMIT_INFORMATION /* winnt.h:4384:7 */
type PJOBOBJECT_BASIC_LIMIT_INFORMATION = uintptr                            /* winnt.h:4384:41 */

type X_JOBOBJECT_EXTENDED_LIMIT_INFORMATION = struct {
	FBasicLimitInformation JOBOBJECT_BASIC_LIMIT_INFORMATION
	FIoInfo                IO_COUNTERS
	FProcessMemoryLimit    SIZE_T
	FJobMemoryLimit        SIZE_T
	FPeakProcessMemoryUsed SIZE_T
	FPeakJobMemoryUsed     SIZE_T
} /* winnt.h:4386:13 */

type JOBOBJECT_EXTENDED_LIMIT_INFORMATION = X_JOBOBJECT_EXTENDED_LIMIT_INFORMATION /* winnt.h:4393:7 */
type PJOBOBJECT_EXTENDED_LIMIT_INFORMATION = uintptr                               /* winnt.h:4393:44 */

type X_JOBOBJECT_BASIC_PROCESS_ID_LIST = struct {
	FNumberOfAssignedProcesses DWORD
	FNumberOfProcessIdsInList  DWORD
	FProcessIdList             [1]ULONG_PTR
} /* winnt.h:4395:13 */

type JOBOBJECT_BASIC_PROCESS_ID_LIST = X_JOBOBJECT_BASIC_PROCESS_ID_LIST /* winnt.h:4399:7 */
type PJOBOBJECT_BASIC_PROCESS_ID_LIST = uintptr                          /* winnt.h:4399:39 */

type X_JOBOBJECT_BASIC_UI_RESTRICTIONS = struct{ FUIRestrictionsClass DWORD } /* winnt.h:4401:13 */

type JOBOBJECT_BASIC_UI_RESTRICTIONS = X_JOBOBJECT_BASIC_UI_RESTRICTIONS /* winnt.h:4403:7 */
type PJOBOBJECT_BASIC_UI_RESTRICTIONS = uintptr                          /* winnt.h:4403:39 */

type X_JOBOBJECT_SECURITY_LIMIT_INFORMATION = struct {
	FSecurityLimitFlags DWORD
	F__ccgo_pad1        [4]byte
	FJobToken           HANDLE
	FSidsToDisable      PTOKEN_GROUPS
	FPrivilegesToDelete PTOKEN_PRIVILEGES
	FRestrictedSids     PTOKEN_GROUPS
} /* winnt.h:4405:13 */

type JOBOBJECT_SECURITY_LIMIT_INFORMATION = X_JOBOBJECT_SECURITY_LIMIT_INFORMATION /* winnt.h:4411:7 */
type PJOBOBJECT_SECURITY_LIMIT_INFORMATION = uintptr                               /* winnt.h:4411:44 */

type X_JOBOBJECT_END_OF_JOB_TIME_INFORMATION = struct{ FEndOfJobTimeAction DWORD } /* winnt.h:4413:13 */

type JOBOBJECT_END_OF_JOB_TIME_INFORMATION = X_JOBOBJECT_END_OF_JOB_TIME_INFORMATION /* winnt.h:4415:7 */
type PJOBOBJECT_END_OF_JOB_TIME_INFORMATION = uintptr                                /* winnt.h:4415:45 */

type X_JOBOBJECT_ASSOCIATE_COMPLETION_PORT = struct {
	FCompletionKey  PVOID
	FCompletionPort HANDLE
} /* winnt.h:4417:13 */

type JOBOBJECT_ASSOCIATE_COMPLETION_PORT = X_JOBOBJECT_ASSOCIATE_COMPLETION_PORT /* winnt.h:4420:7 */
type PJOBOBJECT_ASSOCIATE_COMPLETION_PORT = uintptr                              /* winnt.h:4420:43 */

type X_JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = struct {
	FBasicInfo JOBOBJECT_BASIC_ACCOUNTING_INFORMATION
	FIoInfo    IO_COUNTERS
} /* winnt.h:4422:13 */

type JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = X_JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION /* winnt.h:4425:7 */
type PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = uintptr                                        /* winnt.h:4425:53 */

type X_JOBOBJECT_JOBSET_INFORMATION = struct{ FMemberLevel DWORD } /* winnt.h:4427:13 */

type JOBOBJECT_JOBSET_INFORMATION = X_JOBOBJECT_JOBSET_INFORMATION /* winnt.h:4429:7 */
type PJOBOBJECT_JOBSET_INFORMATION = uintptr                       /* winnt.h:4429:36 */

type JOBOBJECT_RATE_CONTROL_TOLERANCE = uint32 /* winnt.h:4435:7 */

type JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL = uint32 /* winnt.h:4441:7 */

type X_JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION = struct {
	FIoReadBytesLimit             DWORD64
	FIoWriteBytesLimit            DWORD64
	FPerJobUserTimeLimit          LARGE_INTEGER
	FJobMemoryLimit               DWORD64
	FRateControlTolerance         JOBOBJECT_RATE_CONTROL_TOLERANCE
	FRateControlToleranceInterval JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL
	FLimitFlags                   DWORD
	F__ccgo_pad1                  [4]byte
} /* winnt.h:4443:13 */

type JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION = X_JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION /* winnt.h:4451:7 */
type PJOBOBJECT_NOTIFICATION_LIMIT_INFORMATION = uintptr                                   /* winnt.h:4451:48 */

type X_JOBOBJECT_LIMIT_VIOLATION_INFORMATION = struct {
	FLimitFlags                DWORD
	FViolationLimitFlags       DWORD
	FIoReadBytes               DWORD64
	FIoReadBytesLimit          DWORD64
	FIoWriteBytes              DWORD64
	FIoWriteBytesLimit         DWORD64
	FPerJobUserTime            LARGE_INTEGER
	FPerJobUserTimeLimit       LARGE_INTEGER
	FJobMemory                 DWORD64
	FJobMemoryLimit            DWORD64
	FRateControlTolerance      JOBOBJECT_RATE_CONTROL_TOLERANCE
	FRateControlToleranceLimit JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL
} /* winnt.h:4453:13 */

type JOBOBJECT_LIMIT_VIOLATION_INFORMATION = X_JOBOBJECT_LIMIT_VIOLATION_INFORMATION /* winnt.h:4466:7 */
type PJOBOBJECT_LIMIT_VIOLATION_INFORMATION = uintptr                                /* winnt.h:4466:45 */

type X_JOBOBJECT_CPU_RATE_CONTROL_INFORMATION = struct {
	FControlFlags DWORD
	F__4          struct{ FCpuRate DWORD }
} /* winnt.h:4468:13 */

type JOBOBJECT_CPU_RATE_CONTROL_INFORMATION = X_JOBOBJECT_CPU_RATE_CONTROL_INFORMATION /* winnt.h:4474:7 */
type PJOBOBJECT_CPU_RATE_CONTROL_INFORMATION = uintptr                                 /* winnt.h:4474:46 */

type JOBOBJECTINFOCLASS = uint32 /* winnt.h:4578:7 */

type FIRMWARE_TYPE = uint32   /* winnt.h:4585:7 */
type PFIRMWARE_TYPE = uintptr /* winnt.h:4585:21 */

type LOGICAL_PROCESSOR_RELATIONSHIP = uint32 /* winnt.h:4608:7 */

type PROCESSOR_CACHE_TYPE = uint32 /* winnt.h:4614:7 */

type X_CACHE_DESCRIPTOR = struct {
	FLevel         BYTE
	FAssociativity BYTE
	FLineSize      WORD
	FSize          DWORD
	FType          PROCESSOR_CACHE_TYPE
} /* winnt.h:4618:13 */

type CACHE_DESCRIPTOR = X_CACHE_DESCRIPTOR /* winnt.h:4624:7 */
type PCACHE_DESCRIPTOR = uintptr           /* winnt.h:4624:24 */

type X_SYSTEM_LOGICAL_PROCESSOR_INFORMATION = struct {
	FProcessorMask ULONG_PTR
	FRelationship  LOGICAL_PROCESSOR_RELATIONSHIP
	F__ccgo_pad1   [4]byte
	F__16          struct {
		F__ccgo_pad1   [0]uint64
		FProcessorCore struct{ FFlags BYTE }
		F__ccgo_pad2   [15]byte
	}
} /* winnt.h:4626:13 */

type SYSTEM_LOGICAL_PROCESSOR_INFORMATION = X_SYSTEM_LOGICAL_PROCESSOR_INFORMATION /* winnt.h:4639:7 */
type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = uintptr                               /* winnt.h:4639:44 */

type X_PROCESSOR_RELATIONSHIP = struct {
	FFlags      BYTE
	FReserved   [21]BYTE
	FGroupCount WORD
	FGroupMask  [1]GROUP_AFFINITY
} /* winnt.h:4641:13 */

type PROCESSOR_RELATIONSHIP = X_PROCESSOR_RELATIONSHIP /* winnt.h:4646:7 */
type PPROCESSOR_RELATIONSHIP = uintptr                 /* winnt.h:4646:30 */

type X_NUMA_NODE_RELATIONSHIP = struct {
	FNodeNumber DWORD
	FReserved   [20]BYTE
	FGroupMask  GROUP_AFFINITY
} /* winnt.h:4648:13 */

type NUMA_NODE_RELATIONSHIP = X_NUMA_NODE_RELATIONSHIP /* winnt.h:4652:7 */
type PNUMA_NODE_RELATIONSHIP = uintptr                 /* winnt.h:4652:30 */

type X_CACHE_RELATIONSHIP = struct {
	FLevel         BYTE
	FAssociativity BYTE
	FLineSize      WORD
	FCacheSize     DWORD
	FType          PROCESSOR_CACHE_TYPE
	FReserved      [20]BYTE
	FGroupMask     GROUP_AFFINITY
} /* winnt.h:4654:13 */

type CACHE_RELATIONSHIP = X_CACHE_RELATIONSHIP /* winnt.h:4662:7 */
type PCACHE_RELATIONSHIP = uintptr             /* winnt.h:4662:26 */

type X_PROCESSOR_GROUP_INFO = struct {
	FMaximumProcessorCount BYTE
	FActiveProcessorCount  BYTE
	FReserved              [38]BYTE
	FActiveProcessorMask   KAFFINITY
} /* winnt.h:4664:13 */

type PROCESSOR_GROUP_INFO = X_PROCESSOR_GROUP_INFO /* winnt.h:4669:7 */
type PPROCESSOR_GROUP_INFO = uintptr               /* winnt.h:4669:28 */

type X_GROUP_RELATIONSHIP = struct {
	FMaximumGroupCount WORD
	FActiveGroupCount  WORD
	FReserved          [20]BYTE
	FGroupInfo         [1]PROCESSOR_GROUP_INFO
} /* winnt.h:4671:13 */

type GROUP_RELATIONSHIP = X_GROUP_RELATIONSHIP /* winnt.h:4676:7 */
type PGROUP_RELATIONSHIP = uintptr             /* winnt.h:4676:26 */

type X_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = struct {
	FRelationship LOGICAL_PROCESSOR_RELATIONSHIP
	FSize         DWORD
	F__8          struct {
		FProcessor   PROCESSOR_RELATIONSHIP
		F__ccgo_pad1 [32]byte
	}
} /* winnt.h:4678:5 */

type SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = X_SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX /* winnt.h:4689:61 */
type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = uintptr                                  /* winnt.h:4689:101 */

type X_SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = struct{ FCycleTime DWORD64 } /* winnt.h:4691:13 */

type SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = X_SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION /* winnt.h:4693:7 */
type PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = uintptr                                  /* winnt.h:4693:47 */

type X_XSTATE_FEATURE = struct {
	FOffset DWORD
	FSize   DWORD
} /* winnt.h:4785:13 */

type XSTATE_FEATURE = X_XSTATE_FEATURE /* winnt.h:4788:7 */
type PXSTATE_FEATURE = uintptr         /* winnt.h:4788:22 */

type X_XSTATE_CONFIGURATION = struct {
	FEnabledFeatures         DWORD64
	FEnabledVolatileFeatures DWORD64
	FSize                    DWORD
	FOptimizedSave           uint8 /* DWORD OptimizedSave: 1 */
	F__ccgo_pad1             [3]byte
	FFeatures                [64]XSTATE_FEATURE
} /* winnt.h:4790:13 */

type XSTATE_CONFIGURATION = X_XSTATE_CONFIGURATION /* winnt.h:4796:7 */
type PXSTATE_CONFIGURATION = uintptr               /* winnt.h:4796:28 */

type X_MEMORY_BASIC_INFORMATION = struct {
	FBaseAddress       PVOID
	FAllocationBase    PVOID
	FAllocationProtect DWORD
	F__ccgo_pad1       [4]byte
	FRegionSize        SIZE_T
	FState             DWORD
	FProtect           DWORD
	FType              DWORD
	F__ccgo_pad2       [4]byte
} /* winnt.h:4798:13 */

type MEMORY_BASIC_INFORMATION = X_MEMORY_BASIC_INFORMATION /* winnt.h:4806:7 */
type PMEMORY_BASIC_INFORMATION = uintptr                   /* winnt.h:4806:32 */

type X_MEMORY_BASIC_INFORMATION32 = struct {
	FBaseAddress       DWORD
	FAllocationBase    DWORD
	FAllocationProtect DWORD
	FRegionSize        DWORD
	FState             DWORD
	FProtect           DWORD
	FType              DWORD
} /* winnt.h:4808:13 */

type MEMORY_BASIC_INFORMATION32 = X_MEMORY_BASIC_INFORMATION32 /* winnt.h:4816:7 */
type PMEMORY_BASIC_INFORMATION32 = uintptr                     /* winnt.h:4816:34 */

type X_MEMORY_BASIC_INFORMATION64 = struct {
	FBaseAddress       ULONGLONG
	FAllocationBase    ULONGLONG
	FAllocationProtect DWORD
	F__alignment1      DWORD
	FRegionSize        ULONGLONG
	FState             DWORD
	FProtect           DWORD
	FType              DWORD
	F__alignment2      DWORD
} /* winnt.h:4818:13 */

type MEMORY_BASIC_INFORMATION64 = X_MEMORY_BASIC_INFORMATION64 /* winnt.h:4828:7 */
type PMEMORY_BASIC_INFORMATION64 = uintptr                     /* winnt.h:4828:34 */

type X_CFG_CALL_TARGET_INFO = struct {
	FOffset ULONG_PTR
	FFlags  ULONG_PTR
} /* winnt.h:4834:11 */

type CFG_CALL_TARGET_INFO = X_CFG_CALL_TARGET_INFO /* winnt.h:4837:5 */
type PCFG_CALL_TARGET_INFO = uintptr               /* winnt.h:4837:27 */

type X_MEM_ADDRESS_REQUIREMENTS = struct {
	FLowestStartingAddress PVOID
	FHighestEndingAddress  PVOID
	FAlignment             SIZE_T
} /* winnt.h:4896:11 */

type MEM_ADDRESS_REQUIREMENTS = X_MEM_ADDRESS_REQUIREMENTS /* winnt.h:4900:5 */
type PMEM_ADDRESS_REQUIREMENTS = uintptr                   /* winnt.h:4900:31 */

type MEM_EXTENDED_PARAMETER_TYPE = uint32   /* winnt.h:4916:5 */
type PMEM_EXTENDED_PARAMETER_TYPE = uintptr /* winnt.h:4916:34 */

type MEM_EXTENDED_PARAMETER1 = struct {
	F__0 struct {
		F__ccgo_pad1 [0]uint64
		FType        uint64 /* DWORD64 Type: 8, DWORD64 Reserved: 56 */
	}
	F__8 struct{ FULong64 DWORD64 }
} /* winnt.h:4920:11 */

type MEM_EXTENDED_PARAMETER = MEM_EXTENDED_PARAMETER1 /* winnt.h:4932:5 */
type PMEM_EXTENDED_PARAMETER = uintptr                /* winnt.h:4932:29 */

type MEM_SECTION_EXTENDED_PARAMETER_TYPE = uint32   /* winnt.h:4951:5 */
type PMEM_SECTION_EXTENDED_PARAMETER_TYPE = uintptr /* winnt.h:4951:42 */

type FILE_ID_1281 = struct{ FIdentifier [16]BYTE } /* winnt.h:5069:13 */

type FILE_ID_128 = FILE_ID_1281 /* winnt.h:5071:7 */
type PFILE_ID_128 = uintptr     /* winnt.h:5071:20 */

type X_FILE_NOTIFY_INFORMATION = struct {
	FNextEntryOffset DWORD
	FAction          DWORD
	FFileNameLength  DWORD
	FFileName        [1]WCHAR
	F__ccgo_pad1     [2]byte
} /* winnt.h:5073:13 */

type FILE_NOTIFY_INFORMATION = X_FILE_NOTIFY_INFORMATION /* winnt.h:5078:7 */
type PFILE_NOTIFY_INFORMATION = uintptr                  /* winnt.h:5078:31 */

type X_FILE_SEGMENT_ELEMENT = struct{ FBuffer PVOID64 } /* winnt.h:5080:13 */

type FILE_SEGMENT_ELEMENT = X_FILE_SEGMENT_ELEMENT /* winnt.h:5083:7 */
type PFILE_SEGMENT_ELEMENT = uintptr               /* winnt.h:5083:28 */

type X_REPARSE_GUID_DATA_BUFFER = struct {
	FReparseTag           DWORD
	FReparseDataLength    WORD
	FReserved             WORD
	FReparseGuid          GUID
	FGenericReparseBuffer struct{ FDataBuffer [1]BYTE }
	F__ccgo_pad1          [3]byte
} /* winnt.h:5085:13 */

type REPARSE_GUID_DATA_BUFFER = X_REPARSE_GUID_DATA_BUFFER /* winnt.h:5093:7 */
type PREPARSE_GUID_DATA_BUFFER = uintptr                   /* winnt.h:5093:32 */

type SYSTEM_POWER_STATE = uint32   /* winnt.h:5348:5 */
type PSYSTEM_POWER_STATE = uintptr /* winnt.h:5348:24 */

type POWER_ACTION = uint32   /* winnt.h:5356:5 */
type PPOWER_ACTION = uintptr /* winnt.h:5356:18 */

type DEVICE_POWER_STATE = uint32   /* winnt.h:5361:5 */
type PDEVICE_POWER_STATE = uintptr /* winnt.h:5361:24 */

type MONITOR_DISPLAY_STATE = uint32   /* winnt.h:5365:5 */
type PMONITOR_DISPLAY_STATE = uintptr /* winnt.h:5365:28 */

type USER_ACTIVITY_PRESENCE = uint32   /* winnt.h:5373:5 */
type PUSER_ACTIVITY_PRESENCE = uintptr /* winnt.h:5373:28 */

type EXECUTION_STATE = DWORD    /* winnt.h:5381:17 */
type PEXECUTION_STATE = uintptr /* winnt.h:5381:34 */

type LATENCY_TIME = uint32 /* winnt.h:5385:5 */

type POWER_REQUEST_TYPE = uint32   /* winnt.h:5403:5 */
type PPOWER_REQUEST_TYPE = uintptr /* winnt.h:5403:24 */

type CM_Power_Data_s = struct {
	FPD_Size                 DWORD
	FPD_MostRecentPowerState DEVICE_POWER_STATE
	FPD_Capabilities         DWORD
	FPD_D1Latency            DWORD
	FPD_D2Latency            DWORD
	FPD_D3Latency            DWORD
	FPD_PowerStateMapping    [7]DEVICE_POWER_STATE
	FPD_DeepestSystemWake    SYSTEM_POWER_STATE
} /* winnt.h:5415:13 */

type CM_POWER_DATA = CM_Power_Data_s /* winnt.h:5424:7 */
type PCM_POWER_DATA = uintptr        /* winnt.h:5424:21 */

type POWER_INFORMATION_LEVEL = uint32 /* winnt.h:5508:7 */

type POWER_USER_PRESENCE_TYPE = uint32   /* winnt.h:5514:7 */
type PPOWER_USER_PRESENCE_TYPE = uintptr /* winnt.h:5514:32 */

type X_POWER_USER_PRESENCE = struct{ FUserPresence POWER_USER_PRESENCE_TYPE } /* winnt.h:5516:13 */

type POWER_USER_PRESENCE = X_POWER_USER_PRESENCE /* winnt.h:5518:7 */
type PPOWER_USER_PRESENCE = uintptr              /* winnt.h:5518:27 */

type X_POWER_SESSION_CONNECT = struct {
	FConnected BOOLEAN
	FConsole   BOOLEAN
} /* winnt.h:5520:13 */

type POWER_SESSION_CONNECT = X_POWER_SESSION_CONNECT /* winnt.h:5523:7 */
type PPOWER_SESSION_CONNECT = uintptr                /* winnt.h:5523:29 */

type X_POWER_SESSION_TIMEOUTS = struct {
	FInputTimeout   DWORD
	FDisplayTimeout DWORD
} /* winnt.h:5525:13 */

type POWER_SESSION_TIMEOUTS = X_POWER_SESSION_TIMEOUTS /* winnt.h:5528:7 */
type PPOWER_SESSION_TIMEOUTS = uintptr                 /* winnt.h:5528:30 */

type X_POWER_SESSION_RIT_STATE = struct {
	FActive        BOOLEAN
	F__ccgo_pad1   [3]byte
	FLastInputTime DWORD
} /* winnt.h:5530:13 */

type POWER_SESSION_RIT_STATE = X_POWER_SESSION_RIT_STATE /* winnt.h:5533:7 */
type PPOWER_SESSION_RIT_STATE = uintptr                  /* winnt.h:5533:31 */

type X_POWER_SESSION_WINLOGON = struct {
	FSessionId   DWORD
	FConsole     BOOLEAN
	FLocked      BOOLEAN
	F__ccgo_pad1 [2]byte
} /* winnt.h:5535:13 */

type POWER_SESSION_WINLOGON = X_POWER_SESSION_WINLOGON /* winnt.h:5539:7 */
type PPOWER_SESSION_WINLOGON = uintptr                 /* winnt.h:5539:30 */

type X_POWER_IDLE_RESILIENCY = struct {
	FCoalescingTimeout    DWORD
	FIdleResiliencyPeriod DWORD
} /* winnt.h:5541:13 */

type POWER_IDLE_RESILIENCY = X_POWER_IDLE_RESILIENCY /* winnt.h:5544:7 */
type PPOWER_IDLE_RESILIENCY = uintptr                /* winnt.h:5544:29 */

type POWER_MONITOR_REQUEST_REASON = uint32 /* winnt.h:5562:7 */

type X_POWER_MONITOR_INVOCATION = struct {
	FOn            BOOLEAN
	FConsole       BOOLEAN
	F__ccgo_pad1   [2]byte
	FRequestReason POWER_MONITOR_REQUEST_REASON
} /* winnt.h:5564:13 */

type POWER_MONITOR_INVOCATION = X_POWER_MONITOR_INVOCATION /* winnt.h:5568:7 */
type PPOWER_MONITOR_INVOCATION = uintptr                   /* winnt.h:5568:32 */

type X_RESUME_PERFORMANCE = struct {
	FPostTimeMs              DWORD
	F__ccgo_pad1             [4]byte
	FTotalResumeTimeMs       ULONGLONG
	FResumeCompleteTimestamp ULONGLONG
} /* winnt.h:5570:13 */

type RESUME_PERFORMANCE = X_RESUME_PERFORMANCE /* winnt.h:5574:7 */
type PRESUME_PERFORMANCE = uintptr             /* winnt.h:5574:26 */

type SYSTEM_POWER_CONDITION = uint32 /* winnt.h:5581:7 */

type SET_POWER_SETTING_VALUE = struct {
	FVersion        DWORD
	FGuid           GUID
	FPowerCondition SYSTEM_POWER_CONDITION
	FDataLength     DWORD
	FData           [1]BYTE
	F__ccgo_pad1    [3]byte
}                                       /* winnt.h:5589:7 */
type PSET_POWER_SETTING_VALUE = uintptr /* winnt.h:5589:31 */

type NOTIFY_USER_POWER_SETTING = struct{ FGuid GUID } /* winnt.h:5595:7 */
type PNOTIFY_USER_POWER_SETTING = uintptr             /* winnt.h:5595:33 */

type X_APPLICATIONLAUNCH_SETTING_VALUE = struct {
	FActivationTime   LARGE_INTEGER
	FFlags            DWORD
	FButtonInstanceID DWORD
} /* winnt.h:5597:13 */

type APPLICATIONLAUNCH_SETTING_VALUE = X_APPLICATIONLAUNCH_SETTING_VALUE /* winnt.h:5601:7 */
type PAPPLICATIONLAUNCH_SETTING_VALUE = uintptr                          /* winnt.h:5601:39 */

type POWER_PLATFORM_ROLE = uint32   /* winnt.h:5614:7 */
type PPOWER_PLATFORM_ROLE = uintptr /* winnt.h:5614:27 */

type X_POWER_PLATFORM_INFORMATION = struct{ FAoAc BOOLEAN } /* winnt.h:5616:13 */

type POWER_PLATFORM_INFORMATION = X_POWER_PLATFORM_INFORMATION /* winnt.h:5618:7 */
type PPOWER_PLATFORM_INFORMATION = uintptr                     /* winnt.h:5618:34 */

type BATTERY_REPORTING_SCALE = struct {
	FGranularity DWORD
	FCapacity    DWORD
}                                       /* winnt.h:5637:7 */
type PBATTERY_REPORTING_SCALE = uintptr /* winnt.h:5637:31 */

type PPM_WMI_LEGACY_PERFSTATE = struct {
	FFrequency        DWORD
	FFlags            DWORD
	FPercentFrequency DWORD
}                                        /* winnt.h:5643:7 */
type PPPM_WMI_LEGACY_PERFSTATE = uintptr /* winnt.h:5643:32 */

type PPM_WMI_IDLE_STATE = struct {
	FLatency        DWORD
	FPower          DWORD
	FTimeCheck      DWORD
	FPromotePercent BYTE
	FDemotePercent  BYTE
	FStateType      BYTE
	FReserved       BYTE
	FStateFlags     DWORD
	FContext        DWORD
	FIdleHandler    DWORD
	FReserved1      DWORD
}                                  /* winnt.h:5657:7 */
type PPPM_WMI_IDLE_STATE = uintptr /* winnt.h:5657:26 */

type PPM_WMI_IDLE_STATES = struct {
	FType             DWORD
	FCount            DWORD
	FTargetState      DWORD
	FOldState         DWORD
	FTargetProcessors DWORD64
	FState            [1]PPM_WMI_IDLE_STATE
}                                   /* winnt.h:5666:7 */
type PPPM_WMI_IDLE_STATES = uintptr /* winnt.h:5666:27 */

type PPM_WMI_IDLE_STATES_EX = struct {
	FType             DWORD
	FCount            DWORD
	FTargetState      DWORD
	FOldState         DWORD
	FTargetProcessors PVOID
	FState            [1]PPM_WMI_IDLE_STATE
}                                      /* winnt.h:5675:7 */
type PPPM_WMI_IDLE_STATES_EX = uintptr /* winnt.h:5675:30 */

type PPM_WMI_PERF_STATE = struct {
	FFrequency        DWORD
	FPower            DWORD
	FPercentFrequency BYTE
	FIncreaseLevel    BYTE
	FDecreaseLevel    BYTE
	FType             BYTE
	FIncreaseTime     DWORD
	FDecreaseTime     DWORD
	F__ccgo_pad1      [4]byte
	FControl          DWORD64
	FStatus           DWORD64
	FHitCount         DWORD
	FReserved1        DWORD
	FReserved2        DWORD64
	FReserved3        DWORD64
}                                  /* winnt.h:5692:7 */
type PPPM_WMI_PERF_STATE = uintptr /* winnt.h:5692:26 */

type PPM_WMI_PERF_STATES = struct {
	FCount             DWORD
	FMaxFrequency      DWORD
	FCurrentState      DWORD
	FMaxPerfState      DWORD
	FMinPerfState      DWORD
	FLowestPerfState   DWORD
	FThermalConstraint DWORD
	FBusyAdjThreshold  BYTE
	FPolicyType        BYTE
	FType              BYTE
	FReserved          BYTE
	FTimerInterval     DWORD
	F__ccgo_pad1       [4]byte
	FTargetProcessors  DWORD64
	FPStateHandler     DWORD
	FPStateContext     DWORD
	FTStateHandler     DWORD
	FTStateContext     DWORD
	FFeedbackHandler   DWORD
	FReserved1         DWORD
	FReserved2         DWORD64
	FState             [1]PPM_WMI_PERF_STATE
}                                   /* winnt.h:5716:7 */
type PPPM_WMI_PERF_STATES = uintptr /* winnt.h:5716:27 */

type PPM_WMI_PERF_STATES_EX = struct {
	FCount             DWORD
	FMaxFrequency      DWORD
	FCurrentState      DWORD
	FMaxPerfState      DWORD
	FMinPerfState      DWORD
	FLowestPerfState   DWORD
	FThermalConstraint DWORD
	FBusyAdjThreshold  BYTE
	FPolicyType        BYTE
	FType              BYTE
	FReserved          BYTE
	FTimerInterval     DWORD
	F__ccgo_pad1       [4]byte
	FTargetProcessors  PVOID
	FPStateHandler     DWORD
	FPStateContext     DWORD
	FTStateHandler     DWORD
	FTStateContext     DWORD
	FFeedbackHandler   DWORD
	FReserved1         DWORD
	FReserved2         DWORD64
	FState             [1]PPM_WMI_PERF_STATE
}                                      /* winnt.h:5740:7 */
type PPPM_WMI_PERF_STATES_EX = uintptr /* winnt.h:5740:30 */

type PPM_IDLE_STATE_ACCOUNTING = struct {
	FIdleTransitions    DWORD
	FFailedTransitions  DWORD
	FInvalidBucketIndex DWORD
	F__ccgo_pad1        [4]byte
	FTotalTime          DWORD64
	FIdleTimeBuckets    [6]DWORD
}                                         /* winnt.h:5751:7 */
type PPPM_IDLE_STATE_ACCOUNTING = uintptr /* winnt.h:5751:33 */

type PPM_IDLE_ACCOUNTING = struct {
	FStateCount       DWORD
	FTotalTransitions DWORD
	FResetCount       DWORD
	F__ccgo_pad1      [4]byte
	FStartTime        DWORD64
	FState            [1]PPM_IDLE_STATE_ACCOUNTING
}                                   /* winnt.h:5759:7 */
type PPPM_IDLE_ACCOUNTING = uintptr /* winnt.h:5759:27 */

type PPM_IDLE_STATE_BUCKET_EX = struct {
	FTotalTimeUs DWORD64
	FMinTimeUs   DWORD
	FMaxTimeUs   DWORD
	FCount       DWORD
	F__ccgo_pad1 [4]byte
}                                        /* winnt.h:5766:7 */
type PPPM_IDLE_STATE_BUCKET_EX = uintptr /* winnt.h:5766:32 */

type PPM_IDLE_STATE_ACCOUNTING_EX = struct {
	FTotalTime            DWORD64
	FIdleTransitions      DWORD
	FFailedTransitions    DWORD
	FInvalidBucketIndex   DWORD
	FMinTimeUs            DWORD
	FMaxTimeUs            DWORD
	FCancelledTransitions DWORD
	FIdleTimeBuckets      [16]PPM_IDLE_STATE_BUCKET_EX
}                                            /* winnt.h:5777:7 */
type PPPM_IDLE_STATE_ACCOUNTING_EX = uintptr /* winnt.h:5777:36 */

type PPM_IDLE_ACCOUNTING_EX = struct {
	FStateCount       DWORD
	FTotalTransitions DWORD
	FResetCount       DWORD
	FAbortCount       DWORD
	FStartTime        DWORD64
	FState            [1]PPM_IDLE_STATE_ACCOUNTING_EX
}                                      /* winnt.h:5786:7 */
type PPPM_IDLE_ACCOUNTING_EX = uintptr /* winnt.h:5786:30 */

type PPM_PERFSTATE_EVENT = struct {
	FState     DWORD
	FStatus    DWORD
	FLatency   DWORD
	FSpeed     DWORD
	FProcessor DWORD
}                                   /* winnt.h:5830:7 */
type PPPM_PERFSTATE_EVENT = uintptr /* winnt.h:5830:27 */

type PPM_PERFSTATE_DOMAIN_EVENT = struct {
	FState       DWORD
	FLatency     DWORD
	FSpeed       DWORD
	F__ccgo_pad1 [4]byte
	FProcessors  DWORD64
}                                          /* winnt.h:5837:7 */
type PPPM_PERFSTATE_DOMAIN_EVENT = uintptr /* winnt.h:5837:34 */

type PPM_IDLESTATE_EVENT = struct {
	FNewState   DWORD
	FOldState   DWORD
	FProcessors DWORD64
}                                   /* winnt.h:5843:7 */
type PPPM_IDLESTATE_EVENT = uintptr /* winnt.h:5843:27 */

type PPM_THERMALCHANGE_EVENT = struct {
	FThermalConstraint DWORD
	F__ccgo_pad1       [4]byte
	FProcessors        DWORD64
}                                       /* winnt.h:5848:7 */
type PPPM_THERMALCHANGE_EVENT = uintptr /* winnt.h:5848:31 */
type PPM_THERMAL_POLICY_EVENT = struct {
	FMode        BYTE
	F__ccgo_pad1 [7]byte
	FProcessors  DWORD64
}                                        /* winnt.h:5852:7 */
type PPPM_THERMAL_POLICY_EVENT = uintptr /* winnt.h:5852:32 */

type POWER_ACTION_POLICY = struct {
	FAction    POWER_ACTION
	FFlags     DWORD
	FEventCode DWORD
}                                   /* winnt.h:5869:7 */
type PPOWER_ACTION_POLICY = uintptr /* winnt.h:5869:27 */

type PROCESSOR_IDLESTATE_INFO = struct {
	FTimeCheck      DWORD
	FDemotePercent  BYTE
	FPromotePercent BYTE
	FSpare          [2]BYTE
}                                        /* winnt.h:5904:7 */
type PPROCESSOR_IDLESTATE_INFO = uintptr /* winnt.h:5904:32 */

type SYSTEM_POWER_LEVEL = struct {
	FEnable         BOOLEAN
	FSpare          [3]BYTE
	FBatteryLevel   DWORD
	FPowerPolicy    POWER_ACTION_POLICY
	FMinSystemState SYSTEM_POWER_STATE
}                                  /* winnt.h:5912:7 */
type PSYSTEM_POWER_LEVEL = uintptr /* winnt.h:5912:26 */

type X_SYSTEM_POWER_POLICY = struct {
	FRevision                    DWORD
	FPowerButton                 POWER_ACTION_POLICY
	FSleepButton                 POWER_ACTION_POLICY
	FLidClose                    POWER_ACTION_POLICY
	FLidOpenWake                 SYSTEM_POWER_STATE
	FReserved                    DWORD
	FIdle                        POWER_ACTION_POLICY
	FIdleTimeout                 DWORD
	FIdleSensitivity             BYTE
	FDynamicThrottle             BYTE
	FSpare2                      [2]BYTE
	FMinSleep                    SYSTEM_POWER_STATE
	FMaxSleep                    SYSTEM_POWER_STATE
	FReducedLatencySleep         SYSTEM_POWER_STATE
	FWinLogonFlags               DWORD
	FSpare3                      DWORD
	FDozeS4Timeout               DWORD
	FBroadcastCapacityResolution DWORD
	FDischargePolicy             [4]SYSTEM_POWER_LEVEL
	FVideoTimeout                DWORD
	FVideoDimDisplay             BOOLEAN
	F__ccgo_pad1                 [3]byte
	FVideoReserved               [3]DWORD
	FSpindownTimeout             DWORD
	FOptimizeForPower            BOOLEAN
	FFanThrottleTolerance        BYTE
	FForcedThrottle              BYTE
	FMinThrottle                 BYTE
	FOverThrottled               POWER_ACTION_POLICY
} /* winnt.h:5914:13 */

type SYSTEM_POWER_POLICY = X_SYSTEM_POWER_POLICY /* winnt.h:5943:7 */
type PSYSTEM_POWER_POLICY = uintptr              /* winnt.h:5943:27 */

type PROCESSOR_IDLESTATE_POLICY = struct {
	FRevision    WORD
	FFlags       struct{ FAsWORD WORD }
	FPolicyCount DWORD
	FPolicy      [3]PROCESSOR_IDLESTATE_INFO
}                                          /* winnt.h:5963:7 */
type PPROCESSOR_IDLESTATE_POLICY = uintptr /* winnt.h:5963:34 */

type X_PROCESSOR_POWER_POLICY_INFO = struct {
	FTimeCheck      DWORD
	FDemoteLimit    DWORD
	FPromoteLimit   DWORD
	FDemotePercent  BYTE
	FPromotePercent BYTE
	FSpare          [2]BYTE
	FAllowDemotion  uint32 /* DWORD AllowDemotion: 1, DWORD AllowPromotion: 1, DWORD Reserved: 30 */
} /* winnt.h:5965:13 */

type PROCESSOR_POWER_POLICY_INFO = X_PROCESSOR_POWER_POLICY_INFO /* winnt.h:5975:7 */
type PPROCESSOR_POWER_POLICY_INFO = uintptr                      /* winnt.h:5975:35 */

type X_PROCESSOR_POWER_POLICY = struct {
	FRevision        DWORD
	FDynamicThrottle BYTE
	FSpare           [3]BYTE
	FDisableCStates  uint32 /* DWORD DisableCStates: 1, DWORD Reserved: 31 */
	F__ccgo_pad1     [4]byte
	FPolicyCount     DWORD
	FPolicy          [3]PROCESSOR_POWER_POLICY_INFO
} /* winnt.h:5977:13 */

type PROCESSOR_POWER_POLICY = X_PROCESSOR_POWER_POLICY /* winnt.h:5985:7 */
type PPROCESSOR_POWER_POLICY = uintptr                 /* winnt.h:5985:30 */

type PROCESSOR_PERFSTATE_POLICY = struct {
	FRevision         DWORD
	FMaxThrottle      BYTE
	FMinThrottle      BYTE
	FBusyAdjThreshold BYTE
	F__7              struct{ FSpare BYTE }
	FTimeCheck        DWORD
	FIncreaseTime     DWORD
	FDecreaseTime     DWORD
	FIncreasePercent  DWORD
	FDecreasePercent  DWORD
}                                          /* winnt.h:6009:7 */
type PPROCESSOR_PERFSTATE_POLICY = uintptr /* winnt.h:6009:34 */

type X_ADMINISTRATOR_POWER_POLICY = struct {
	FMinSleep           SYSTEM_POWER_STATE
	FMaxSleep           SYSTEM_POWER_STATE
	FMinVideoTimeout    DWORD
	FMaxVideoTimeout    DWORD
	FMinSpindownTimeout DWORD
	FMaxSpindownTimeout DWORD
} /* winnt.h:6011:13 */

type ADMINISTRATOR_POWER_POLICY = X_ADMINISTRATOR_POWER_POLICY /* winnt.h:6018:7 */
type PADMINISTRATOR_POWER_POLICY = uintptr                     /* winnt.h:6018:34 */

type SYSTEM_POWER_CAPABILITIES = struct {
	FPowerButtonPresent     BOOLEAN
	FSleepButtonPresent     BOOLEAN
	FLidPresent             BOOLEAN
	FSystemS1               BOOLEAN
	FSystemS2               BOOLEAN
	FSystemS3               BOOLEAN
	FSystemS4               BOOLEAN
	FSystemS5               BOOLEAN
	FHiberFilePresent       BOOLEAN
	FFullWake               BOOLEAN
	FVideoDimPresent        BOOLEAN
	FApmPresent             BOOLEAN
	FUpsPresent             BOOLEAN
	FThermalControl         BOOLEAN
	FProcessorThrottle      BOOLEAN
	FProcessorMinThrottle   BYTE
	FProcessorMaxThrottle   BYTE
	FFastSystemS4           BOOLEAN
	Fspare2                 [3]BYTE
	FDiskSpinDown           BOOLEAN
	Fspare3                 [8]BYTE
	FSystemBatteriesPresent BOOLEAN
	FBatteriesAreShortTerm  BOOLEAN
	FBatteryScale           [3]BATTERY_REPORTING_SCALE
	FAcOnLineWake           SYSTEM_POWER_STATE
	FSoftLidWake            SYSTEM_POWER_STATE
	FRtcWake                SYSTEM_POWER_STATE
	FMinDeviceWakeState     SYSTEM_POWER_STATE
	FDefaultLowLatencyWake  SYSTEM_POWER_STATE
}                                         /* winnt.h:6050:7 */
type PSYSTEM_POWER_CAPABILITIES = uintptr /* winnt.h:6050:33 */

type SYSTEM_BATTERY_STATE = struct {
	FAcOnLine          BOOLEAN
	FBatteryPresent    BOOLEAN
	FCharging          BOOLEAN
	FDischarging       BOOLEAN
	FSpare1            [4]BOOLEAN
	FMaxCapacity       DWORD
	FRemainingCapacity DWORD
	FRate              DWORD
	FEstimatedTime     DWORD
	FDefaultAlert1     DWORD
	FDefaultAlert2     DWORD
}                                    /* winnt.h:6064:7 */
type PSYSTEM_BATTERY_STATE = uintptr /* winnt.h:6064:28 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_IMAGE_DOS_HEADER = struct {
	Fe_magic    WORD
	Fe_cblp     WORD
	Fe_cp       WORD
	Fe_crlc     WORD
	Fe_cparhdr  WORD
	Fe_minalloc WORD
	Fe_maxalloc WORD
	Fe_ss       WORD
	Fe_sp       WORD
	Fe_csum     WORD
	Fe_ip       WORD
	Fe_cs       WORD
	Fe_lfarlc   WORD
	Fe_ovno     WORD
	Fe_res      [4]WORD
	Fe_oemid    WORD
	Fe_oeminfo  WORD
	Fe_res2     [10]WORD
	Fe_lfanew   LONG
} /* winnt.h:6076:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IMAGE_DOS_HEADER = X_IMAGE_DOS_HEADER /* winnt.h:6096:7 */
type PIMAGE_DOS_HEADER = uintptr           /* winnt.h:6096:24 */

type X_IMAGE_OS2_HEADER = struct {
	Fne_magic        WORD
	Fne_ver          CHAR
	Fne_rev          CHAR
	Fne_enttab       WORD
	Fne_cbenttab     WORD
	Fne_crc          LONG
	Fne_flags        WORD
	Fne_autodata     WORD
	Fne_heap         WORD
	Fne_stack        WORD
	Fne_csip         LONG
	Fne_sssp         LONG
	Fne_cseg         WORD
	Fne_cmod         WORD
	Fne_cbnrestab    WORD
	Fne_segtab       WORD
	Fne_rsrctab      WORD
	Fne_restab       WORD
	Fne_modtab       WORD
	Fne_imptab       WORD
	Fne_nrestab      LONG
	Fne_cmovent      WORD
	Fne_align        WORD
	Fne_cres         WORD
	Fne_exetyp       BYTE
	Fne_flagsothers  BYTE
	Fne_pretthunks   WORD
	Fne_psegrefbytes WORD
	Fne_swaparea     WORD
	Fne_expver       WORD
} /* winnt.h:6098:13 */

type IMAGE_OS2_HEADER = X_IMAGE_OS2_HEADER /* winnt.h:6129:7 */
type PIMAGE_OS2_HEADER = uintptr           /* winnt.h:6129:24 */

type X_IMAGE_VXD_HEADER = struct {
	Fe32_magic        WORD
	Fe32_border       BYTE
	Fe32_worder       BYTE
	Fe32_level        DWORD
	Fe32_cpu          WORD
	Fe32_os           WORD
	Fe32_ver          DWORD
	Fe32_mflags       DWORD
	Fe32_mpages       DWORD
	Fe32_startobj     DWORD
	Fe32_eip          DWORD
	Fe32_stackobj     DWORD
	Fe32_esp          DWORD
	Fe32_pagesize     DWORD
	Fe32_lastpagesize DWORD
	Fe32_fixupsize    DWORD
	Fe32_fixupsum     DWORD
	Fe32_ldrsize      DWORD
	Fe32_ldrsum       DWORD
	Fe32_objtab       DWORD
	Fe32_objcnt       DWORD
	Fe32_objmap       DWORD
	Fe32_itermap      DWORD
	Fe32_rsrctab      DWORD
	Fe32_rsrccnt      DWORD
	Fe32_restab       DWORD
	Fe32_enttab       DWORD
	Fe32_dirtab       DWORD
	Fe32_dircnt       DWORD
	Fe32_fpagetab     DWORD
	Fe32_frectab      DWORD
	Fe32_impmod       DWORD
	Fe32_impmodcnt    DWORD
	Fe32_impproc      DWORD
	Fe32_pagesum      DWORD
	Fe32_datapage     DWORD
	Fe32_preload      DWORD
	Fe32_nrestab      DWORD
	Fe32_cbnrestab    DWORD
	Fe32_nressum      DWORD
	Fe32_autodata     DWORD
	Fe32_debuginfo    DWORD
	Fe32_debuglen     DWORD
	Fe32_instpreload  DWORD
	Fe32_instdemand   DWORD
	Fe32_heapsize     DWORD
	Fe32_res3         [12]BYTE
	Fe32_winresoff    DWORD
	Fe32_winreslen    DWORD
	Fe32_devid        WORD
	Fe32_ddkver       WORD
} /* winnt.h:6131:13 */

type IMAGE_VXD_HEADER = X_IMAGE_VXD_HEADER /* winnt.h:6183:7 */
type PIMAGE_VXD_HEADER = uintptr           /* winnt.h:6183:24 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_IMAGE_FILE_HEADER = struct {
	FMachine              WORD
	FNumberOfSections     WORD
	FTimeDateStamp        DWORD
	FPointerToSymbolTable DWORD
	FNumberOfSymbols      DWORD
	FSizeOfOptionalHeader WORD
	FCharacteristics      WORD
} /* winnt.h:6187:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IMAGE_FILE_HEADER = X_IMAGE_FILE_HEADER /* winnt.h:6195:7 */
type PIMAGE_FILE_HEADER = uintptr            /* winnt.h:6195:25 */

type X_IMAGE_DATA_DIRECTORY = struct {
	FVirtualAddress DWORD
	FSize           DWORD
} /* winnt.h:6248:13 */

type IMAGE_DATA_DIRECTORY = X_IMAGE_DATA_DIRECTORY /* winnt.h:6251:7 */
type PIMAGE_DATA_DIRECTORY = uintptr               /* winnt.h:6251:28 */

type X_IMAGE_OPTIONAL_HEADER = struct {
	FMagic                       WORD
	FMajorLinkerVersion          BYTE
	FMinorLinkerVersion          BYTE
	FSizeOfCode                  DWORD
	FSizeOfInitializedData       DWORD
	FSizeOfUninitializedData     DWORD
	FAddressOfEntryPoint         DWORD
	FBaseOfCode                  DWORD
	FBaseOfData                  DWORD
	FImageBase                   DWORD
	FSectionAlignment            DWORD
	FFileAlignment               DWORD
	FMajorOperatingSystemVersion WORD
	FMinorOperatingSystemVersion WORD
	FMajorImageVersion           WORD
	FMinorImageVersion           WORD
	FMajorSubsystemVersion       WORD
	FMinorSubsystemVersion       WORD
	FWin32VersionValue           DWORD
	FSizeOfImage                 DWORD
	FSizeOfHeaders               DWORD
	FCheckSum                    DWORD
	FSubsystem                   WORD
	FDllCharacteristics          WORD
	FSizeOfStackReserve          DWORD
	FSizeOfStackCommit           DWORD
	FSizeOfHeapReserve           DWORD
	FSizeOfHeapCommit            DWORD
	FLoaderFlags                 DWORD
	FNumberOfRvaAndSizes         DWORD
	FDataDirectory               [16]IMAGE_DATA_DIRECTORY
} /* winnt.h:6255:13 */

type IMAGE_OPTIONAL_HEADER32 = X_IMAGE_OPTIONAL_HEADER /* winnt.h:6288:7 */
type PIMAGE_OPTIONAL_HEADER32 = uintptr                /* winnt.h:6288:31 */

type X_IMAGE_ROM_OPTIONAL_HEADER = struct {
	FMagic                   WORD
	FMajorLinkerVersion      BYTE
	FMinorLinkerVersion      BYTE
	FSizeOfCode              DWORD
	FSizeOfInitializedData   DWORD
	FSizeOfUninitializedData DWORD
	FAddressOfEntryPoint     DWORD
	FBaseOfCode              DWORD
	FBaseOfData              DWORD
	FBaseOfBss               DWORD
	FGprMask                 DWORD
	FCprMask                 [4]DWORD
	FGpValue                 DWORD
} /* winnt.h:6290:13 */

type IMAGE_ROM_OPTIONAL_HEADER = X_IMAGE_ROM_OPTIONAL_HEADER /* winnt.h:6304:7 */
type PIMAGE_ROM_OPTIONAL_HEADER = uintptr                    /* winnt.h:6304:33 */

type X_IMAGE_OPTIONAL_HEADER64 = struct {
	FMagic                       WORD
	FMajorLinkerVersion          BYTE
	FMinorLinkerVersion          BYTE
	FSizeOfCode                  DWORD
	FSizeOfInitializedData       DWORD
	FSizeOfUninitializedData     DWORD
	FAddressOfEntryPoint         DWORD
	FBaseOfCode                  DWORD
	FImageBase                   ULONGLONG
	FSectionAlignment            DWORD
	FFileAlignment               DWORD
	FMajorOperatingSystemVersion WORD
	FMinorOperatingSystemVersion WORD
	FMajorImageVersion           WORD
	FMinorImageVersion           WORD
	FMajorSubsystemVersion       WORD
	FMinorSubsystemVersion       WORD
	FWin32VersionValue           DWORD
	FSizeOfImage                 DWORD
	FSizeOfHeaders               DWORD
	FCheckSum                    DWORD
	FSubsystem                   WORD
	FDllCharacteristics          WORD
	FSizeOfStackReserve          ULONGLONG
	FSizeOfStackCommit           ULONGLONG
	FSizeOfHeapReserve           ULONGLONG
	FSizeOfHeapCommit            ULONGLONG
	FLoaderFlags                 DWORD
	FNumberOfRvaAndSizes         DWORD
	FDataDirectory               [16]IMAGE_DATA_DIRECTORY
} /* winnt.h:6306:13 */

type IMAGE_OPTIONAL_HEADER64 = X_IMAGE_OPTIONAL_HEADER64 /* winnt.h:6337:7 */
type PIMAGE_OPTIONAL_HEADER64 = uintptr                  /* winnt.h:6337:31 */

type IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER64   /* winnt.h:6349:37 */
type PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER64 /* winnt.h:6350:38 */

type X_IMAGE_NT_HEADERS64 = struct {
	FSignature      DWORD
	FFileHeader     IMAGE_FILE_HEADER
	FOptionalHeader IMAGE_OPTIONAL_HEADER64
} /* winnt.h:6360:13 */

type IMAGE_NT_HEADERS64 = X_IMAGE_NT_HEADERS64 /* winnt.h:6364:7 */
type PIMAGE_NT_HEADERS64 = uintptr             /* winnt.h:6364:26 */

type X_IMAGE_NT_HEADERS = struct {
	FSignature      DWORD
	FFileHeader     IMAGE_FILE_HEADER
	FOptionalHeader IMAGE_OPTIONAL_HEADER32
} /* winnt.h:6366:13 */

type IMAGE_NT_HEADERS32 = X_IMAGE_NT_HEADERS /* winnt.h:6370:7 */
type PIMAGE_NT_HEADERS32 = uintptr           /* winnt.h:6370:26 */

type X_IMAGE_ROM_HEADERS = struct {
	FFileHeader     IMAGE_FILE_HEADER
	FOptionalHeader IMAGE_ROM_OPTIONAL_HEADER
} /* winnt.h:6372:13 */

type IMAGE_ROM_HEADERS = X_IMAGE_ROM_HEADERS /* winnt.h:6375:7 */
type PIMAGE_ROM_HEADERS = uintptr            /* winnt.h:6375:25 */

type IMAGE_NT_HEADERS = IMAGE_NT_HEADERS64   /* winnt.h:6378:32 */
type PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS64 /* winnt.h:6379:33 */

type ANON_OBJECT_HEADER1 = struct {
	FSig1          WORD
	FSig2          WORD
	FVersion       WORD
	FMachine       WORD
	FTimeDateStamp DWORD
	FClassID       CLSID
	FSizeOfData    DWORD
} /* winnt.h:6430:13 */

type ANON_OBJECT_HEADER = ANON_OBJECT_HEADER1 /* winnt.h:6438:7 */

type ANON_OBJECT_HEADER_V21 = struct {
	FSig1           WORD
	FSig2           WORD
	FVersion        WORD
	FMachine        WORD
	FTimeDateStamp  DWORD
	FClassID        CLSID
	FSizeOfData     DWORD
	FFlags          DWORD
	FMetaDataSize   DWORD
	FMetaDataOffset DWORD
} /* winnt.h:6440:13 */

type ANON_OBJECT_HEADER_V2 = ANON_OBJECT_HEADER_V21 /* winnt.h:6451:7 */

type ANON_OBJECT_HEADER_BIGOBJ1 = struct {
	FSig1                 WORD
	FSig2                 WORD
	FVersion              WORD
	FMachine              WORD
	FTimeDateStamp        DWORD
	FClassID              CLSID
	FSizeOfData           DWORD
	FFlags                DWORD
	FMetaDataSize         DWORD
	FMetaDataOffset       DWORD
	FNumberOfSections     DWORD
	FPointerToSymbolTable DWORD
	FNumberOfSymbols      DWORD
} /* winnt.h:6453:13 */

type ANON_OBJECT_HEADER_BIGOBJ = ANON_OBJECT_HEADER_BIGOBJ1 /* winnt.h:6467:7 */

type X_IMAGE_SECTION_HEADER = struct {
	FName                 [8]BYTE
	FMisc                 struct{ FPhysicalAddress DWORD }
	FVirtualAddress       DWORD
	FSizeOfRawData        DWORD
	FPointerToRawData     DWORD
	FPointerToRelocations DWORD
	FPointerToLinenumbers DWORD
	FNumberOfRelocations  WORD
	FNumberOfLinenumbers  WORD
	FCharacteristics      DWORD
} /* winnt.h:6471:13 */

type IMAGE_SECTION_HEADER = X_IMAGE_SECTION_HEADER /* winnt.h:6485:7 */
type PIMAGE_SECTION_HEADER = uintptr               /* winnt.h:6485:28 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_IMAGE_SYMBOL = struct {
	FN struct {
		F__ccgo_pad1 [0]uint32
		FShortName   [8]BYTE
	}
	FValue              DWORD
	FSectionNumber      SHORT
	FType               WORD
	FStorageClass       BYTE
	FNumberOfAuxSymbols BYTE
	F__ccgo_pad1        [2]byte
} /* winnt.h:6535:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type IMAGE_SYMBOL = X_IMAGE_SYMBOL /* winnt.h:6549:7 */
type PIMAGE_SYMBOL = uintptr       /* winnt.h:6550:36 */

type X_IMAGE_SYMBOL_EX = struct {
	FN struct {
		F__ccgo_pad1 [0]uint32
		FShortName   [8]BYTE
	}
	FValue              DWORD
	FSectionNumber      LONG
	FType               WORD
	FStorageClass       BYTE
	FNumberOfAuxSymbols BYTE
} /* winnt.h:6554:13 */

type IMAGE_SYMBOL_EX = X_IMAGE_SYMBOL_EX /* winnt.h:6568:7 */
type PIMAGE_SYMBOL_EX = uintptr          /* winnt.h:6568:33 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type IMAGE_AUX_SYMBOL_TOKEN_DEF1 = struct {
	FbAuxType         BYTE
	FbReserved        BYTE
	F__ccgo_pad1      [2]byte
	FSymbolTableIndex DWORD
	FrgbReserved      [12]BYTE
} /* winnt.h:6661:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type IMAGE_AUX_SYMBOL_TOKEN_DEF = IMAGE_AUX_SYMBOL_TOKEN_DEF1 /* winnt.h:6666:7 */
type PIMAGE_AUX_SYMBOL_TOKEN_DEF = uintptr                    /* winnt.h:6666:44 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_IMAGE_AUX_SYMBOL = struct {
	FSym struct {
		FTagIndex DWORD
		FMisc     struct {
			F__ccgo_pad1 [0]uint32
			FLnSz        struct {
				FLinenumber WORD
				FSize       WORD
			}
		}
		FFcnAry struct {
			FFunction struct {
				FPointerToLinenumber   DWORD
				FPointerToNextFunction DWORD
			}
		}
		FTvIndex     WORD
		F__ccgo_pad1 [2]byte
	}
} /* winnt.h:6669:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IMAGE_AUX_SYMBOL = X_IMAGE_AUX_SYMBOL /* winnt.h:6706:7 */
type PIMAGE_AUX_SYMBOL = uintptr           /* winnt.h:6706:34 */

type X_IMAGE_AUX_SYMBOL_EX = struct {
	FSym struct {
		FWeakDefaultSymIndex DWORD
		FWeakSearchType      DWORD
		FrgbReserved         [12]BYTE
	}
	F__ccgo_pad1 [4]byte
} /* winnt.h:6708:13 */

type IMAGE_AUX_SYMBOL_EX = X_IMAGE_AUX_SYMBOL_EX /* winnt.h:6736:7 */
type PIMAGE_AUX_SYMBOL_EX = uintptr              /* winnt.h:6736:37 */

type IMAGE_AUX_SYMBOL_TYPE = uint32 /* winnt.h:6742:7 */

type X_IMAGE_RELOCATION = struct {
	F__0              struct{ FVirtualAddress DWORD }
	FSymbolTableIndex DWORD
	FType             WORD
	F__ccgo_pad1      [2]byte
} /* winnt.h:6756:13 */

type IMAGE_RELOCATION = X_IMAGE_RELOCATION /* winnt.h:6763:7 */
type PIMAGE_RELOCATION = uintptr           /* winnt.h:6764:40 */

type X_IMAGE_LINENUMBER = struct {
	FType        struct{ FSymbolTableIndex DWORD }
	FLinenumber  WORD
	F__ccgo_pad1 [2]byte
} /* winnt.h:7094:13 */

type IMAGE_LINENUMBER = X_IMAGE_LINENUMBER /* winnt.h:7100:7 */
type PIMAGE_LINENUMBER = uintptr           /* winnt.h:7101:40 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_IMAGE_BASE_RELOCATION = struct {
	FVirtualAddress DWORD
	FSizeOfBlock    DWORD
} /* winnt.h:7107:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IMAGE_BASE_RELOCATION = X_IMAGE_BASE_RELOCATION /* winnt.h:7110:7 */
type PIMAGE_BASE_RELOCATION = uintptr                /* winnt.h:7111:45 */

type X_IMAGE_ARCHIVE_MEMBER_HEADER = struct {
	FName      [16]BYTE
	FDate      [12]BYTE
	FUserID    [6]BYTE
	FGroupID   [6]BYTE
	FMode      [8]BYTE
	FSize      [10]BYTE
	FEndHeader [2]BYTE
} /* winnt.h:7134:13 */

type IMAGE_ARCHIVE_MEMBER_HEADER = X_IMAGE_ARCHIVE_MEMBER_HEADER /* winnt.h:7142:7 */
type PIMAGE_ARCHIVE_MEMBER_HEADER = uintptr                      /* winnt.h:7142:35 */

type X_IMAGE_EXPORT_DIRECTORY = struct {
	FCharacteristics       DWORD
	FTimeDateStamp         DWORD
	FMajorVersion          WORD
	FMinorVersion          WORD
	FName                  DWORD
	FBase                  DWORD
	FNumberOfFunctions     DWORD
	FNumberOfNames         DWORD
	FAddressOfFunctions    DWORD
	FAddressOfNames        DWORD
	FAddressOfNameOrdinals DWORD
} /* winnt.h:7146:13 */

type IMAGE_EXPORT_DIRECTORY = X_IMAGE_EXPORT_DIRECTORY /* winnt.h:7158:7 */
type PIMAGE_EXPORT_DIRECTORY = uintptr                 /* winnt.h:7158:30 */

type X_IMAGE_IMPORT_BY_NAME = struct {
	FHint        WORD
	FName        [1]CHAR
	F__ccgo_pad1 [1]byte
} /* winnt.h:7160:13 */

type IMAGE_IMPORT_BY_NAME = X_IMAGE_IMPORT_BY_NAME /* winnt.h:7163:7 */
type PIMAGE_IMPORT_BY_NAME = uintptr               /* winnt.h:7163:28 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_IMAGE_THUNK_DATA64 = struct {
	Fu1 struct{ FForwarderString ULONGLONG }
} /* winnt.h:7167:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IMAGE_THUNK_DATA64 = X_IMAGE_THUNK_DATA64 /* winnt.h:7174:7 */
type PIMAGE_THUNK_DATA64 = uintptr             /* winnt.h:7175:32 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_IMAGE_THUNK_DATA32 = struct {
	Fu1 struct{ FForwarderString DWORD }
} /* winnt.h:7179:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IMAGE_THUNK_DATA32 = X_IMAGE_THUNK_DATA32 /* winnt.h:7186:7 */
type PIMAGE_THUNK_DATA32 = uintptr             /* winnt.h:7187:32 */

type PIMAGE_TLS_CALLBACK = uintptr /* winnt.h:7196:18 */

type X_IMAGE_TLS_DIRECTORY64 = struct {
	FStartAddressOfRawData ULONGLONG
	FEndAddressOfRawData   ULONGLONG
	FAddressOfIndex        ULONGLONG
	FAddressOfCallBacks    ULONGLONG
	FSizeOfZeroFill        DWORD
	FCharacteristics       DWORD
} /* winnt.h:7198:13 */

type IMAGE_TLS_DIRECTORY64 = X_IMAGE_TLS_DIRECTORY64 /* winnt.h:7205:7 */
type PIMAGE_TLS_DIRECTORY64 = uintptr                /* winnt.h:7206:35 */

type X_IMAGE_TLS_DIRECTORY32 = struct {
	FStartAddressOfRawData DWORD
	FEndAddressOfRawData   DWORD
	FAddressOfIndex        DWORD
	FAddressOfCallBacks    DWORD
	FSizeOfZeroFill        DWORD
	FCharacteristics       DWORD
} /* winnt.h:7208:13 */

type IMAGE_TLS_DIRECTORY32 = X_IMAGE_TLS_DIRECTORY32 /* winnt.h:7215:7 */
type PIMAGE_TLS_DIRECTORY32 = uintptr                /* winnt.h:7216:35 */

type IMAGE_THUNK_DATA = IMAGE_THUNK_DATA64         /* winnt.h:7221:32 */
type PIMAGE_THUNK_DATA = PIMAGE_THUNK_DATA64       /* winnt.h:7222:33 */
type IMAGE_TLS_DIRECTORY = IMAGE_TLS_DIRECTORY64   /* winnt.h:7224:35 */
type PIMAGE_TLS_DIRECTORY = PIMAGE_TLS_DIRECTORY64 /* winnt.h:7225:36 */

type X_IMAGE_IMPORT_DESCRIPTOR = struct {
	F__0            struct{ FCharacteristics DWORD }
	FTimeDateStamp  DWORD
	FForwarderChain DWORD
	FName           DWORD
	FFirstThunk     DWORD
} /* winnt.h:7236:13 */

type IMAGE_IMPORT_DESCRIPTOR = X_IMAGE_IMPORT_DESCRIPTOR /* winnt.h:7246:7 */
type PIMAGE_IMPORT_DESCRIPTOR = uintptr                  /* winnt.h:7247:47 */

type X_IMAGE_BOUND_IMPORT_DESCRIPTOR = struct {
	FTimeDateStamp               DWORD
	FOffsetModuleName            WORD
	FNumberOfModuleForwarderRefs WORD
} /* winnt.h:7249:13 */

type IMAGE_BOUND_IMPORT_DESCRIPTOR = X_IMAGE_BOUND_IMPORT_DESCRIPTOR /* winnt.h:7253:7 */
type PIMAGE_BOUND_IMPORT_DESCRIPTOR = uintptr                        /* winnt.h:7253:37 */

type X_IMAGE_BOUND_FORWARDER_REF = struct {
	FTimeDateStamp    DWORD
	FOffsetModuleName WORD
	FReserved         WORD
} /* winnt.h:7255:13 */

type IMAGE_BOUND_FORWARDER_REF = X_IMAGE_BOUND_FORWARDER_REF /* winnt.h:7259:7 */
type PIMAGE_BOUND_FORWARDER_REF = uintptr                    /* winnt.h:7259:33 */

type X_IMAGE_DELAYLOAD_DESCRIPTOR = struct {
	FAttributes                 struct{ FAllAttributes DWORD }
	FDllNameRVA                 DWORD
	FModuleHandleRVA            DWORD
	FImportAddressTableRVA      DWORD
	FImportNameTableRVA         DWORD
	FBoundImportAddressTableRVA DWORD
	FUnloadInformationTableRVA  DWORD
	FTimeDateStamp              DWORD
} /* winnt.h:7261:13 */

type IMAGE_DELAYLOAD_DESCRIPTOR = X_IMAGE_DELAYLOAD_DESCRIPTOR /* winnt.h:7276:7 */
type PIMAGE_DELAYLOAD_DESCRIPTOR = uintptr                     /* winnt.h:7276:34 */
type PCIMAGE_DELAYLOAD_DESCRIPTOR = uintptr                    /* winnt.h:7277:46 */

type X_IMAGE_RESOURCE_DIRECTORY = struct {
	FCharacteristics      DWORD
	FTimeDateStamp        DWORD
	FMajorVersion         WORD
	FMinorVersion         WORD
	FNumberOfNamedEntries WORD
	FNumberOfIdEntries    WORD
} /* winnt.h:7279:13 */

type IMAGE_RESOURCE_DIRECTORY = X_IMAGE_RESOURCE_DIRECTORY /* winnt.h:7286:7 */
type PIMAGE_RESOURCE_DIRECTORY = uintptr                   /* winnt.h:7286:32 */

type X_IMAGE_RESOURCE_DIRECTORY_ENTRY = struct {
	F__0 struct {
		F__0 struct {
			F__ccgo_pad1 [0]uint32
			FNameOffset  uint32 /* DWORD NameOffset: 31, DWORD NameIsString: 1 */
		}
	}
	F__4 struct{ FOffsetToData DWORD }
} /* winnt.h:7291:13 */

type IMAGE_RESOURCE_DIRECTORY_ENTRY = X_IMAGE_RESOURCE_DIRECTORY_ENTRY /* winnt.h:7307:7 */
type PIMAGE_RESOURCE_DIRECTORY_ENTRY = uintptr                         /* winnt.h:7307:38 */

type X_IMAGE_RESOURCE_DIRECTORY_STRING = struct {
	FLength      WORD
	FNameString  [1]CHAR
	F__ccgo_pad1 [1]byte
} /* winnt.h:7309:13 */

type IMAGE_RESOURCE_DIRECTORY_STRING = X_IMAGE_RESOURCE_DIRECTORY_STRING /* winnt.h:7312:7 */
type PIMAGE_RESOURCE_DIRECTORY_STRING = uintptr                          /* winnt.h:7312:39 */

type X_IMAGE_RESOURCE_DIR_STRING_U = struct {
	FLength     WORD
	FNameString [1]WCHAR
} /* winnt.h:7314:13 */

type IMAGE_RESOURCE_DIR_STRING_U = X_IMAGE_RESOURCE_DIR_STRING_U /* winnt.h:7317:7 */
type PIMAGE_RESOURCE_DIR_STRING_U = uintptr                      /* winnt.h:7317:35 */

type X_IMAGE_RESOURCE_DATA_ENTRY = struct {
	FOffsetToData DWORD
	FSize         DWORD
	FCodePage     DWORD
	FReserved     DWORD
} /* winnt.h:7319:13 */

type IMAGE_RESOURCE_DATA_ENTRY = X_IMAGE_RESOURCE_DATA_ENTRY /* winnt.h:7324:7 */
type PIMAGE_RESOURCE_DATA_ENTRY = uintptr                    /* winnt.h:7324:33 */

type IMAGE_LOAD_CONFIG_DIRECTORY32 = struct {
	FSize                          DWORD
	FTimeDateStamp                 DWORD
	FMajorVersion                  WORD
	FMinorVersion                  WORD
	FGlobalFlagsClear              DWORD
	FGlobalFlagsSet                DWORD
	FCriticalSectionDefaultTimeout DWORD
	FDeCommitFreeBlockThreshold    DWORD
	FDeCommitTotalFreeThreshold    DWORD
	FLockPrefixTable               DWORD
	FMaximumAllocationSize         DWORD
	FVirtualMemoryThreshold        DWORD
	FProcessHeapFlags              DWORD
	FProcessAffinityMask           DWORD
	FCSDVersion                    WORD
	FReserved1                     WORD
	FEditList                      DWORD
	FSecurityCookie                DWORD
	FSEHandlerTable                DWORD
	FSEHandlerCount                DWORD
}                                             /* winnt.h:7347:7 */
type PIMAGE_LOAD_CONFIG_DIRECTORY32 = uintptr /* winnt.h:7347:37 */

type IMAGE_LOAD_CONFIG_DIRECTORY64 = struct {
	FSize                          DWORD
	FTimeDateStamp                 DWORD
	FMajorVersion                  WORD
	FMinorVersion                  WORD
	FGlobalFlagsClear              DWORD
	FGlobalFlagsSet                DWORD
	FCriticalSectionDefaultTimeout DWORD
	FDeCommitFreeBlockThreshold    ULONGLONG
	FDeCommitTotalFreeThreshold    ULONGLONG
	FLockPrefixTable               ULONGLONG
	FMaximumAllocationSize         ULONGLONG
	FVirtualMemoryThreshold        ULONGLONG
	FProcessAffinityMask           ULONGLONG
	FProcessHeapFlags              DWORD
	FCSDVersion                    WORD
	FReserved1                     WORD
	FEditList                      ULONGLONG
	FSecurityCookie                ULONGLONG
	FSEHandlerTable                ULONGLONG
	FSEHandlerCount                ULONGLONG
}                                             /* winnt.h:7370:7 */
type PIMAGE_LOAD_CONFIG_DIRECTORY64 = uintptr /* winnt.h:7370:37 */

type IMAGE_LOAD_CONFIG_DIRECTORY = IMAGE_LOAD_CONFIG_DIRECTORY64   /* winnt.h:7373:43 */
type PIMAGE_LOAD_CONFIG_DIRECTORY = PIMAGE_LOAD_CONFIG_DIRECTORY64 /* winnt.h:7374:44 */

type X_IMAGE_CE_RUNTIME_FUNCTION_ENTRY = struct {
	FFuncStart DWORD
	FPrologLen uint32 /* DWORD PrologLen: 8, DWORD FuncLen: 22, DWORD ThirtyTwoBit: 1, DWORD ExceptionFlag: 1 */
} /* winnt.h:7380:13 */

type IMAGE_CE_RUNTIME_FUNCTION_ENTRY = X_IMAGE_CE_RUNTIME_FUNCTION_ENTRY /* winnt.h:7386:7 */
type PIMAGE_CE_RUNTIME_FUNCTION_ENTRY = uintptr                          /* winnt.h:7386:39 */

type X_IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = struct {
	FBeginAddress     ULONGLONG
	FEndAddress       ULONGLONG
	FExceptionHandler ULONGLONG
	FHandlerData      ULONGLONG
	FPrologEndAddress ULONGLONG
} /* winnt.h:7388:13 */

type IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = X_IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY /* winnt.h:7394:7 */
type PIMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = uintptr                               /* winnt.h:7394:44 */

type X_IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = struct {
	FBeginAddress     DWORD
	FEndAddress       DWORD
	FExceptionHandler DWORD
	FHandlerData      DWORD
	FPrologEndAddress DWORD
} /* winnt.h:7396:13 */

type IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = X_IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY /* winnt.h:7402:7 */
type PIMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = uintptr                             /* winnt.h:7402:42 */

type X_IMAGE_ARM_RUNTIME_FUNCTION_ENTRY = struct {
	FBeginAddress DWORD
	F__4          struct{ FUnwindData DWORD }
} /* winnt.h:7404:13 */

type IMAGE_ARM_RUNTIME_FUNCTION_ENTRY = X_IMAGE_ARM_RUNTIME_FUNCTION_ENTRY /* winnt.h:7420:7 */
type PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY = uintptr                           /* winnt.h:7420:40 */

type X_IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY = struct {
	FBeginAddress DWORD
	F__4          struct{ FUnwindData DWORD }
} /* winnt.h:7422:13 */

type IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY = X_IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY /* winnt.h:7436:7 */
type PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY = uintptr                             /* winnt.h:7436:42 */

type X_IMAGE_RUNTIME_FUNCTION_ENTRY1 = struct {
	FBeginAddress DWORD
	FEndAddress   DWORD
	F__8          struct{ FUnwindInfoAddress DWORD }
} /* winnt.h:7438:13 */

type X_IMAGE_RUNTIME_FUNCTION_ENTRY = X_IMAGE_RUNTIME_FUNCTION_ENTRY1 /* winnt.h:7445:7 */
type X_PIMAGE_RUNTIME_FUNCTION_ENTRY = uintptr                        /* winnt.h:7445:37 */

type IMAGE_IA64_RUNTIME_FUNCTION_ENTRY = X_IMAGE_RUNTIME_FUNCTION_ENTRY   /* winnt.h:7447:43 */
type PIMAGE_IA64_RUNTIME_FUNCTION_ENTRY = X_PIMAGE_RUNTIME_FUNCTION_ENTRY /* winnt.h:7448:44 */

type IMAGE_RUNTIME_FUNCTION_ENTRY = X_IMAGE_RUNTIME_FUNCTION_ENTRY   /* winnt.h:7462:43 */
type PIMAGE_RUNTIME_FUNCTION_ENTRY = X_PIMAGE_RUNTIME_FUNCTION_ENTRY /* winnt.h:7463:44 */

type X_IMAGE_DEBUG_DIRECTORY = struct {
	FCharacteristics  DWORD
	FTimeDateStamp    DWORD
	FMajorVersion     WORD
	FMinorVersion     WORD
	FType             DWORD
	FSizeOfData       DWORD
	FAddressOfRawData DWORD
	FPointerToRawData DWORD
} /* winnt.h:7466:13 */

type IMAGE_DEBUG_DIRECTORY = X_IMAGE_DEBUG_DIRECTORY /* winnt.h:7475:7 */
type PIMAGE_DEBUG_DIRECTORY = uintptr                /* winnt.h:7475:29 */

type X_IMAGE_COFF_SYMBOLS_HEADER = struct {
	FNumberOfSymbols      DWORD
	FLvaToFirstSymbol     DWORD
	FNumberOfLinenumbers  DWORD
	FLvaToFirstLinenumber DWORD
	FRvaToFirstByteOfCode DWORD
	FRvaToLastByteOfCode  DWORD
	FRvaToFirstByteOfData DWORD
	FRvaToLastByteOfData  DWORD
} /* winnt.h:7490:13 */

type IMAGE_COFF_SYMBOLS_HEADER = X_IMAGE_COFF_SYMBOLS_HEADER /* winnt.h:7499:7 */
type PIMAGE_COFF_SYMBOLS_HEADER = uintptr                    /* winnt.h:7499:33 */

type X_FPO_DATA = struct {
	FulOffStart DWORD
	FcbProcSize DWORD
	FcdwLocals  DWORD
	FcdwParams  WORD
	FcbProlog   uint16 /* WORD cbProlog: 8, WORD cbRegs: 3, WORD fHasSEH: 1, WORD fUseBP: 1, WORD reserved: 1, WORD cbFrame: 2 */
} /* winnt.h:7506:13 */

type FPO_DATA = X_FPO_DATA /* winnt.h:7517:7 */
type PFPO_DATA = uintptr   /* winnt.h:7517:16 */

type X_IMAGE_DEBUG_MISC = struct {
	FDataType    DWORD
	FLength      DWORD
	FUnicode     BOOLEAN
	FReserved    [3]BYTE
	FData        [1]BYTE
	F__ccgo_pad1 [3]byte
} /* winnt.h:7522:13 */

type IMAGE_DEBUG_MISC = X_IMAGE_DEBUG_MISC /* winnt.h:7528:7 */
type PIMAGE_DEBUG_MISC = uintptr           /* winnt.h:7528:24 */

type X_IMAGE_FUNCTION_ENTRY = struct {
	FStartingAddress DWORD
	FEndingAddress   DWORD
	FEndOfPrologue   DWORD
} /* winnt.h:7530:13 */

type IMAGE_FUNCTION_ENTRY = X_IMAGE_FUNCTION_ENTRY /* winnt.h:7534:7 */
type PIMAGE_FUNCTION_ENTRY = uintptr               /* winnt.h:7534:28 */

type X_IMAGE_FUNCTION_ENTRY64 = struct {
	FStartingAddress ULONGLONG
	FEndingAddress   ULONGLONG
	F__16            struct{ FEndOfPrologue ULONGLONG }
} /* winnt.h:7536:13 */

type IMAGE_FUNCTION_ENTRY64 = X_IMAGE_FUNCTION_ENTRY64 /* winnt.h:7543:7 */
type PIMAGE_FUNCTION_ENTRY64 = uintptr                 /* winnt.h:7543:30 */

type X_IMAGE_SEPARATE_DEBUG_HEADER = struct {
	FSignature          WORD
	FFlags              WORD
	FMachine            WORD
	FCharacteristics    WORD
	FTimeDateStamp      DWORD
	FCheckSum           DWORD
	FImageBase          DWORD
	FSizeOfImage        DWORD
	FNumberOfSections   DWORD
	FExportedNamesSize  DWORD
	FDebugDirectorySize DWORD
	FSectionAlignment   DWORD
	FReserved           [2]DWORD
} /* winnt.h:7545:13 */

type IMAGE_SEPARATE_DEBUG_HEADER = X_IMAGE_SEPARATE_DEBUG_HEADER /* winnt.h:7559:7 */
type PIMAGE_SEPARATE_DEBUG_HEADER = uintptr                      /* winnt.h:7559:35 */

type X_NON_PAGED_DEBUG_INFO = struct {
	FSignature       WORD
	FFlags           WORD
	FSize            DWORD
	FMachine         WORD
	FCharacteristics WORD
	FTimeDateStamp   DWORD
	FCheckSum        DWORD
	FSizeOfImage     DWORD
	FImageBase       ULONGLONG
} /* winnt.h:7561:13 */

type NON_PAGED_DEBUG_INFO = X_NON_PAGED_DEBUG_INFO /* winnt.h:7571:7 */
type PNON_PAGED_DEBUG_INFO = uintptr               /* winnt.h:7571:28 */

type X_ImageArchitectureHeader = struct {
	FAmaskValue    uint32 /* unsigned AmaskValue: 1, int Adummy1: 7, unsigned AmaskShift: 8, int Adummy2: 16 */
	F__ccgo_pad1   [4]byte
	FFirstEntryRVA DWORD
} /* winnt.h:7579:13 */

type IMAGE_ARCHITECTURE_HEADER = X_ImageArchitectureHeader /* winnt.h:7585:7 */
type PIMAGE_ARCHITECTURE_HEADER = uintptr                  /* winnt.h:7585:33 */

type X_ImageArchitectureEntry = struct {
	FFixupInstRVA DWORD
	FNewInst      DWORD
} /* winnt.h:7587:13 */

type IMAGE_ARCHITECTURE_ENTRY = X_ImageArchitectureEntry /* winnt.h:7590:7 */
type PIMAGE_ARCHITECTURE_ENTRY = uintptr                 /* winnt.h:7590:32 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IMPORT_OBJECT_HEADER1 = struct {
	FSig1          WORD
	FSig2          WORD
	FVersion       WORD
	FMachine       WORD
	FTimeDateStamp DWORD
	FSizeOfData    DWORD
	F__16          struct{ FOrdinal WORD }
	FType          uint16 /* WORD Type: 2, WORD NameType: 3, WORD Reserved: 11 */
} /* winnt.h:7595:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IMPORT_OBJECT_HEADER = IMPORT_OBJECT_HEADER1 /* winnt.h:7609:7 */

type IMPORT_OBJECT_TYPE = uint32 /* winnt.h:7613:7 */

type IMPORT_OBJECT_NAME_TYPE = uint32 /* winnt.h:7617:7 */

type ReplacesCorHdrNumericDefines = uint32 /* winnt.h:7628:7 */

type IMAGE_COR20_HEADER1 = struct {
	Fcb                      DWORD
	FMajorRuntimeVersion     WORD
	FMinorRuntimeVersion     WORD
	FMetaData                IMAGE_DATA_DIRECTORY
	FFlags                   DWORD
	F__20                    struct{ FEntryPointToken DWORD }
	FResources               IMAGE_DATA_DIRECTORY
	FStrongNameSignature     IMAGE_DATA_DIRECTORY
	FCodeManagerTable        IMAGE_DATA_DIRECTORY
	FVTableFixups            IMAGE_DATA_DIRECTORY
	FExportAddressTableJumps IMAGE_DATA_DIRECTORY
	FManagedNativeHeader     IMAGE_DATA_DIRECTORY
} /* winnt.h:7630:13 */

type IMAGE_COR20_HEADER = IMAGE_COR20_HEADER1 /* winnt.h:7646:7 */
type PIMAGE_COR20_HEADER = uintptr            /* winnt.h:7646:26 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_SLIST_ENTRY = struct{ FNext uintptr } /* winnt.h:7726:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type SLIST_ENTRY = X_SLIST_ENTRY /* winnt.h:7728:7 */
type PSLIST_ENTRY = uintptr      /* winnt.h:7728:19 */

type X_SLIST_HEADER = struct {
	F__0 struct {
		FAlignment ULONGLONG
		FRegion    ULONGLONG
	}
} /* winnt.h:7730:13 */

type SLIST_HEADER = X_SLIST_HEADER /* winnt.h:7751:7 */
type PSLIST_HEADER = uintptr       /* winnt.h:7751:20 */

type X_RTL_RUN_ONCE = struct{ FPtr PVOID } /* winnt.h:7780:9 */

type RTL_RUN_ONCE = X_RTL_RUN_ONCE   /* winnt.h:7780:45 */
type PRTL_RUN_ONCE = uintptr         /* winnt.h:7780:59 */
type PRTL_RUN_ONCE_INIT_FN = uintptr /* winnt.h:7781:15 */

type X_RTL_BARRIER = struct {
	FReserved1 DWORD
	FReserved2 DWORD
	FReserved3 [2]ULONG_PTR
	FReserved4 DWORD
	FReserved5 DWORD
} /* winnt.h:7790:11 */

type RTL_BARRIER = X_RTL_BARRIER /* winnt.h:7796:5 */
type PRTL_BARRIER = uintptr      /* winnt.h:7796:17 */

type X_MESSAGE_RESOURCE_ENTRY = struct {
	FLength      WORD
	FFlags       WORD
	FText        [1]BYTE
	F__ccgo_pad1 [1]byte
} /* winnt.h:7899:13 */

type MESSAGE_RESOURCE_ENTRY = X_MESSAGE_RESOURCE_ENTRY /* winnt.h:7903:7 */
type PMESSAGE_RESOURCE_ENTRY = uintptr                 /* winnt.h:7903:30 */

type X_MESSAGE_RESOURCE_BLOCK = struct {
	FLowId           DWORD
	FHighId          DWORD
	FOffsetToEntries DWORD
} /* winnt.h:7921:13 */

type MESSAGE_RESOURCE_BLOCK = X_MESSAGE_RESOURCE_BLOCK /* winnt.h:7925:7 */
type PMESSAGE_RESOURCE_BLOCK = uintptr                 /* winnt.h:7925:30 */

type X_MESSAGE_RESOURCE_DATA = struct {
	FNumberOfBlocks DWORD
	FBlocks         [1]MESSAGE_RESOURCE_BLOCK
} /* winnt.h:7927:13 */

type MESSAGE_RESOURCE_DATA = X_MESSAGE_RESOURCE_DATA /* winnt.h:7930:7 */
type PMESSAGE_RESOURCE_DATA = uintptr                /* winnt.h:7930:29 */

type X_OSVERSIONINFOA = struct {
	FdwOSVersionInfoSize DWORD
	FdwMajorVersion      DWORD
	FdwMinorVersion      DWORD
	FdwBuildNumber       DWORD
	FdwPlatformId        DWORD
	FszCSDVersion        [128]CHAR
} /* winnt.h:7932:13 */

type OSVERSIONINFOA = X_OSVERSIONINFOA /* winnt.h:7939:7 */
type POSVERSIONINFOA = uintptr         /* winnt.h:7939:22 */
type LPOSVERSIONINFOA = uintptr        /* winnt.h:7939:39 */

type X_OSVERSIONINFOW = struct {
	FdwOSVersionInfoSize DWORD
	FdwMajorVersion      DWORD
	FdwMinorVersion      DWORD
	FdwBuildNumber       DWORD
	FdwPlatformId        DWORD
	FszCSDVersion        [128]WCHAR
} /* winnt.h:7941:13 */

type OSVERSIONINFOW = X_OSVERSIONINFOW     /* winnt.h:7948:7 */
type POSVERSIONINFOW = uintptr             /* winnt.h:7948:22 */
type LPOSVERSIONINFOW = uintptr            /* winnt.h:7948:39 */
type RTL_OSVERSIONINFOW = X_OSVERSIONINFOW /* winnt.h:7948:57 */
type PRTL_OSVERSIONINFOW = uintptr         /* winnt.h:7948:76 */

type OSVERSIONINFO = OSVERSIONINFOA     /* winnt.h:7950:5 */
type POSVERSIONINFO = POSVERSIONINFOA   /* winnt.h:7951:5 */
type LPOSVERSIONINFO = LPOSVERSIONINFOA /* winnt.h:7952:5 */

type X_OSVERSIONINFOEXA = struct {
	FdwOSVersionInfoSize DWORD
	FdwMajorVersion      DWORD
	FdwMinorVersion      DWORD
	FdwBuildNumber       DWORD
	FdwPlatformId        DWORD
	FszCSDVersion        [128]CHAR
	FwServicePackMajor   WORD
	FwServicePackMinor   WORD
	FwSuiteMask          WORD
	FwProductType        BYTE
	FwReserved           BYTE
} /* winnt.h:7954:13 */

type OSVERSIONINFOEXA = X_OSVERSIONINFOEXA /* winnt.h:7966:7 */
type POSVERSIONINFOEXA = uintptr           /* winnt.h:7966:24 */
type LPOSVERSIONINFOEXA = uintptr          /* winnt.h:7966:43 */

type X_OSVERSIONINFOEXW = struct {
	FdwOSVersionInfoSize DWORD
	FdwMajorVersion      DWORD
	FdwMinorVersion      DWORD
	FdwBuildNumber       DWORD
	FdwPlatformId        DWORD
	FszCSDVersion        [128]WCHAR
	FwServicePackMajor   WORD
	FwServicePackMinor   WORD
	FwSuiteMask          WORD
	FwProductType        BYTE
	FwReserved           BYTE
} /* winnt.h:7968:13 */

type OSVERSIONINFOEXW = X_OSVERSIONINFOEXW     /* winnt.h:7980:7 */
type POSVERSIONINFOEXW = uintptr               /* winnt.h:7980:24 */
type LPOSVERSIONINFOEXW = uintptr              /* winnt.h:7980:43 */
type RTL_OSVERSIONINFOEXW = X_OSVERSIONINFOEXW /* winnt.h:7980:63 */
type PRTL_OSVERSIONINFOEXW = uintptr           /* winnt.h:7980:84 */

type OSVERSIONINFOEX = OSVERSIONINFOEXA     /* winnt.h:7982:5 */
type POSVERSIONINFOEX = POSVERSIONINFOEXA   /* winnt.h:7983:5 */
type LPOSVERSIONINFOEX = LPOSVERSIONINFOEXA /* winnt.h:7984:5 */

type RTL_UMS_THREAD_INFO_CLASS = uint32   /* winnt.h:8037:7 */
type PRTL_UMS_THREAD_INFO_CLASS = uintptr /* winnt.h:8037:33 */

type RTL_UMS_SCHEDULER_REASON = uint32        /* winnt.h:8043:7 */
type PRTL_UMS_SCHEDULER_REASON = uintptr      /* winnt.h:8043:32 */
type PRTL_UMS_SCHEDULER_ENTRY_POINT = uintptr /* winnt.h:8046:43 */

type X_RTL_CRITICAL_SECTION_DEBUG = struct {
	FType                      WORD
	FCreatorBackTraceIndex     WORD
	F__ccgo_pad1               [4]byte
	FCriticalSection           uintptr
	FProcessLocksList          LIST_ENTRY
	FEntryCount                DWORD
	FContentionCount           DWORD
	FFlags                     DWORD
	FCreatorBackTraceIndexHigh WORD
	FSpareWORD                 WORD
} /* winnt.h:8066:13 */

type X_RTL_CRITICAL_SECTION = struct {
	FDebugInfo      PRTL_CRITICAL_SECTION_DEBUG
	FLockCount      LONG
	FRecursionCount LONG
	FOwningThread   HANDLE
	FLockSemaphore  HANDLE
	FSpinCount      ULONG_PTR
} /* winnt.h:8066:13 */

type RTL_CRITICAL_SECTION_DEBUG = X_RTL_CRITICAL_SECTION_DEBUG /* winnt.h:8076:7 */
type PRTL_CRITICAL_SECTION_DEBUG = uintptr                     /* winnt.h:8076:34 */
type RTL_RESOURCE_DEBUG = X_RTL_CRITICAL_SECTION_DEBUG         /* winnt.h:8076:63 */
type PRTL_RESOURCE_DEBUG = uintptr                             /* winnt.h:8076:82 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type RTL_CRITICAL_SECTION = X_RTL_CRITICAL_SECTION /* winnt.h:8100:7 */
type PRTL_CRITICAL_SECTION = uintptr               /* winnt.h:8100:28 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_RTL_SRWLOCK = struct{ FPtr PVOID } /* winnt.h:8103:13 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type RTL_SRWLOCK = X_RTL_SRWLOCK                     /* winnt.h:8103:48 */
type PRTL_SRWLOCK = uintptr                          /* winnt.h:8103:60 */
type X_RTL_CONDITION_VARIABLE = struct{ FPtr PVOID } /* winnt.h:8104:13 */

type RTL_CONDITION_VARIABLE = X_RTL_CONDITION_VARIABLE /* winnt.h:8104:59 */
type PRTL_CONDITION_VARIABLE = uintptr                 /* winnt.h:8104:82 */

type PAPCFUNC = uintptr                    /* winnt.h:8111:18 */
type PVECTORED_EXCEPTION_HANDLER = uintptr /* winnt.h:8112:18 */

type HEAP_INFORMATION_CLASS = uint32 /* winnt.h:8117:7 */

type WORKERCALLBACKFUNC = uintptr                  /* winnt.h:8119:18 */
type APC_CALLBACK_FUNCTION = uintptr               /* winnt.h:8120:18 */
type WAITORTIMERCALLBACKFUNC = uintptr             /* winnt.h:8121:18 */
type WAITORTIMERCALLBACK = WAITORTIMERCALLBACKFUNC /* winnt.h:8122:37 */
type PFLS_CALLBACK_FUNCTION = uintptr              /* winnt.h:8123:18 */
type PSECURE_MEMORY_CACHE_CALLBACK = uintptr       /* winnt.h:8124:21 */

type ACTIVATION_CONTEXT_INFO_CLASS = uint32 /* winnt.h:8153:7 */

type ACTCTX_REQUESTED_RUN_LEVEL = uint32 /* winnt.h:8161:7 */

type ACTCTX_COMPATIBILITY_ELEMENT_TYPE = uint32 /* winnt.h:8167:7 */

type X_ACTIVATION_CONTEXT_QUERY_INDEX = struct {
	FulAssemblyIndex       DWORD
	FulFileIndexInAssembly DWORD
} /* winnt.h:8169:13 */

type ACTIVATION_CONTEXT_QUERY_INDEX = X_ACTIVATION_CONTEXT_QUERY_INDEX /* winnt.h:8172:7 */
type PACTIVATION_CONTEXT_QUERY_INDEX = uintptr                         /* winnt.h:8172:38 */

type X_ASSEMBLY_FILE_DETAILED_INFORMATION = struct {
	FulFlags          DWORD
	FulFilenameLength DWORD
	FulPathLength     DWORD
	F__ccgo_pad1      [4]byte
	FlpFileName       PCWSTR
	FlpFilePath       PCWSTR
} /* winnt.h:8174:13 */

type ASSEMBLY_FILE_DETAILED_INFORMATION = X_ASSEMBLY_FILE_DETAILED_INFORMATION /* winnt.h:8180:7 */
type PASSEMBLY_FILE_DETAILED_INFORMATION = uintptr                             /* winnt.h:8180:42 */

type X_ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = struct {
	FulFlags                           DWORD
	FulEncodedAssemblyIdentityLength   DWORD
	FulManifestPathType                DWORD
	FulManifestPathLength              DWORD
	FliManifestLastWriteTime           LARGE_INTEGER
	FulPolicyPathType                  DWORD
	FulPolicyPathLength                DWORD
	FliPolicyLastWriteTime             LARGE_INTEGER
	FulMetadataSatelliteRosterIndex    DWORD
	FulManifestVersionMajor            DWORD
	FulManifestVersionMinor            DWORD
	FulPolicyVersionMajor              DWORD
	FulPolicyVersionMinor              DWORD
	FulAssemblyDirectoryNameLength     DWORD
	FlpAssemblyEncodedAssemblyIdentity PCWSTR
	FlpAssemblyManifestPath            PCWSTR
	FlpAssemblyPolicyPath              PCWSTR
	FlpAssemblyDirectoryName           PCWSTR
	FulFileCount                       DWORD
	F__ccgo_pad1                       [4]byte
} /* winnt.h:8182:13 */

type ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = X_ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION /* winnt.h:8202:7 */
type PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = uintptr                                           /* winnt.h:8202:56 */

type X_ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = struct {
	FulFlags  DWORD
	FRunLevel ACTCTX_REQUESTED_RUN_LEVEL
	FUiAccess DWORD
} /* winnt.h:8204:13 */

type ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = X_ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION /* winnt.h:8208:7 */
type PACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = uintptr                                   /* winnt.h:8208:48 */

type X_COMPATIBILITY_CONTEXT_ELEMENT = struct {
	FId   GUID
	FType ACTCTX_COMPATIBILITY_ELEMENT_TYPE
} /* winnt.h:8210:13 */

type COMPATIBILITY_CONTEXT_ELEMENT = X_COMPATIBILITY_CONTEXT_ELEMENT /* winnt.h:8213:7 */
type PCOMPATIBILITY_CONTEXT_ELEMENT = uintptr                        /* winnt.h:8213:37 */

//Vista: {e2011457-1546-43c5-a5fe-008deee3d3f0}
//Seven: {35138b9a-5d96-4fbd-8e2d-a2440225f93a}
type X_ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = struct {
	F__ccgo_pad1  [0]uint32
	FElementCount DWORD
} /* winnt.h:8217:13 */

//Vista: {e2011457-1546-43c5-a5fe-008deee3d3f0}
//Seven: {35138b9a-5d96-4fbd-8e2d-a2440225f93a}
type ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = X_ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION /* winnt.h:8220:7 */
type PACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = uintptr                                       /* winnt.h:8220:52 */

type X_SUPPORTED_OS_INFO = struct {
	FOsCount         WORD
	FMitigationExist WORD
	FOsList          [4]WORD
} /* winnt.h:8224:13 */

type SUPPORTED_OS_INFO = X_SUPPORTED_OS_INFO /* winnt.h:8228:7 */
type PSUPPORTED_OS_INFO = uintptr            /* winnt.h:8228:25 */

type X_ACTIVATION_CONTEXT_DETAILED_INFORMATION = struct {
	FdwFlags                      DWORD
	FulFormatVersion              DWORD
	FulAssemblyCount              DWORD
	FulRootManifestPathType       DWORD
	FulRootManifestPathChars      DWORD
	FulRootConfigurationPathType  DWORD
	FulRootConfigurationPathChars DWORD
	FulAppDirPathType             DWORD
	FulAppDirPathChars            DWORD
	F__ccgo_pad1                  [4]byte
	FlpRootManifestPath           PCWSTR
	FlpRootConfigurationPath      PCWSTR
	FlpAppDirPath                 PCWSTR
} /* winnt.h:8230:13 */

type ACTIVATION_CONTEXT_DETAILED_INFORMATION = X_ACTIVATION_CONTEXT_DETAILED_INFORMATION /* winnt.h:8243:7 */
type PACTIVATION_CONTEXT_DETAILED_INFORMATION = uintptr                                  /* winnt.h:8243:47 */

type PCACTIVATION_CONTEXT_QUERY_INDEX = uintptr                   /* winnt.h:8245:58 */
type PCASSEMBLY_FILE_DETAILED_INFORMATION = uintptr               /* winnt.h:8246:54 */
type PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = uintptr /* winnt.h:8247:76 */
type PCACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = uintptr         /* winnt.h:8248:68 */
type PCCOMPATIBILITY_CONTEXT_ELEMENT = uintptr                    /* winnt.h:8249:57 */
type PCACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = uintptr     /* winnt.h:8250:72 */
type PCACTIVATION_CONTEXT_DETAILED_INFORMATION = uintptr          /* winnt.h:8251:67 */

type RTL_VERIFIER_DLL_LOAD_CALLBACK = uintptr      /* winnt.h:8268:18 */
type RTL_VERIFIER_DLL_UNLOAD_CALLBACK = uintptr    /* winnt.h:8269:18 */
type RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK = uintptr /* winnt.h:8270:18 */

type X_RTL_VERIFIER_THUNK_DESCRIPTOR = struct {
	FThunkName       PCHAR
	FThunkOldAddress PVOID
	FThunkNewAddress PVOID
} /* winnt.h:8272:13 */

type RTL_VERIFIER_THUNK_DESCRIPTOR = X_RTL_VERIFIER_THUNK_DESCRIPTOR /* winnt.h:8276:7 */
type PRTL_VERIFIER_THUNK_DESCRIPTOR = uintptr                        /* winnt.h:8276:37 */

type X_RTL_VERIFIER_DLL_DESCRIPTOR = struct {
	FDllName     PWCHAR
	FDllFlags    DWORD
	F__ccgo_pad1 [4]byte
	FDllAddress  PVOID
	FDllThunks   PRTL_VERIFIER_THUNK_DESCRIPTOR
} /* winnt.h:8278:13 */

type RTL_VERIFIER_DLL_DESCRIPTOR = X_RTL_VERIFIER_DLL_DESCRIPTOR /* winnt.h:8283:7 */
type PRTL_VERIFIER_DLL_DESCRIPTOR = uintptr                      /* winnt.h:8283:35 */

type X_RTL_VERIFIER_PROVIDER_DESCRIPTOR = struct {
	FLength                        DWORD
	F__ccgo_pad1                   [4]byte
	FProviderDlls                  PRTL_VERIFIER_DLL_DESCRIPTOR
	FProviderDllLoadCallback       RTL_VERIFIER_DLL_LOAD_CALLBACK
	FProviderDllUnloadCallback     RTL_VERIFIER_DLL_UNLOAD_CALLBACK
	FVerifierImage                 PWSTR
	FVerifierFlags                 DWORD
	FVerifierDebug                 DWORD
	FRtlpGetStackTraceAddress      PVOID
	FRtlpDebugPageHeapCreate       PVOID
	FRtlpDebugPageHeapDestroy      PVOID
	FProviderNtdllHeapFreeCallback RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK
} /* winnt.h:8285:13 */

type RTL_VERIFIER_PROVIDER_DESCRIPTOR = X_RTL_VERIFIER_PROVIDER_DESCRIPTOR /* winnt.h:8297:7 */
type PRTL_VERIFIER_PROVIDER_DESCRIPTOR = uintptr                           /* winnt.h:8297:40 */

type X_HARDWARE_COUNTER_DATA = struct {
	FType     HARDWARE_COUNTER_TYPE
	FReserved DWORD
	FValue    DWORD64
} /* winnt.h:8410:13 */

type HARDWARE_COUNTER_DATA = X_HARDWARE_COUNTER_DATA /* winnt.h:8414:7 */
type PHARDWARE_COUNTER_DATA = uintptr                /* winnt.h:8414:29 */

type X_PERFORMANCE_DATA = struct {
	FSize               WORD
	FVersion            BYTE
	FHwCountersCount    BYTE
	FContextSwitchCount DWORD
	FWaitReasonBitMap   DWORD64
	FCycleTime          DWORD64
	FRetryCount         DWORD
	FReserved           DWORD
	FHwCounters         [16]HARDWARE_COUNTER_DATA
} /* winnt.h:8416:13 */

type PERFORMANCE_DATA = X_PERFORMANCE_DATA /* winnt.h:8426:7 */
type PPERFORMANCE_DATA = uintptr           /* winnt.h:8426:24 */

type X_EVENTLOGRECORD = struct {
	FLength              DWORD
	FReserved            DWORD
	FRecordNumber        DWORD
	FTimeGenerated       DWORD
	FTimeWritten         DWORD
	FEventID             DWORD
	FEventType           WORD
	FNumStrings          WORD
	FEventCategory       WORD
	FReservedFlags       WORD
	FClosingRecordNumber DWORD
	FStringOffset        DWORD
	FUserSidLength       DWORD
	FUserSidOffset       DWORD
	FDataLength          DWORD
	FDataOffset          DWORD
} /* winnt.h:8457:13 */

type EVENTLOGRECORD = X_EVENTLOGRECORD /* winnt.h:8474:7 */
type PEVENTLOGRECORD = uintptr         /* winnt.h:8474:22 */

type X_EVENTSFORLOGFILE = struct {
	F__ccgo_pad1      [0]uint32
	FulSize           DWORD
	FszLogicalLogFile [256]WCHAR
	FulNumRecords     DWORD
} /* winnt.h:8478:13 */

type EVENTSFORLOGFILE = X_EVENTSFORLOGFILE /* winnt.h:8483:7 */
type PEVENTSFORLOGFILE = uintptr           /* winnt.h:8483:24 */

type X_PACKEDEVENTINFO = struct {
	F__ccgo_pad1           [0]uint32
	FulSize                DWORD
	FulNumEventsForLogFile DWORD
} /* winnt.h:8485:13 */

type PACKEDEVENTINFO = X_PACKEDEVENTINFO /* winnt.h:8489:7 */
type PPACKEDEVENTINFO = uintptr          /* winnt.h:8489:23 */

type SERVICE_NODE_TYPE = uint32 /* winnt.h:8587:7 */

type SERVICE_LOAD_TYPE = uint32 /* winnt.h:8592:7 */

type SERVICE_ERROR_TYPE = uint32 /* winnt.h:8596:7 */

type X_TAPE_ERASE = struct {
	FType        DWORD
	FImmediate   BOOLEAN
	F__ccgo_pad1 [3]byte
} /* winnt.h:8615:13 */

type TAPE_ERASE = X_TAPE_ERASE /* winnt.h:8618:7 */
type PTAPE_ERASE = uintptr     /* winnt.h:8618:18 */

type X_TAPE_PREPARE = struct {
	FOperation   DWORD
	FImmediate   BOOLEAN
	F__ccgo_pad1 [3]byte
} /* winnt.h:8627:13 */

type TAPE_PREPARE = X_TAPE_PREPARE /* winnt.h:8630:7 */
type PTAPE_PREPARE = uintptr       /* winnt.h:8630:20 */

type X_TAPE_WRITE_MARKS = struct {
	FType        DWORD
	FCount       DWORD
	FImmediate   BOOLEAN
	F__ccgo_pad1 [3]byte
} /* winnt.h:8637:13 */

type TAPE_WRITE_MARKS = X_TAPE_WRITE_MARKS /* winnt.h:8641:7 */
type PTAPE_WRITE_MARKS = uintptr           /* winnt.h:8641:24 */

type X_TAPE_GET_POSITION = struct {
	FType      DWORD
	FPartition DWORD
	FOffset    LARGE_INTEGER
} /* winnt.h:8647:13 */

type TAPE_GET_POSITION = X_TAPE_GET_POSITION /* winnt.h:8651:7 */
type PTAPE_GET_POSITION = uintptr            /* winnt.h:8651:25 */

type X_TAPE_SET_POSITION = struct {
	FMethod      DWORD
	FPartition   DWORD
	FOffset      LARGE_INTEGER
	FImmediate   BOOLEAN
	F__ccgo_pad1 [7]byte
} /* winnt.h:8664:13 */

type TAPE_SET_POSITION = X_TAPE_SET_POSITION /* winnt.h:8669:7 */
type PTAPE_SET_POSITION = uintptr            /* winnt.h:8669:25 */

type X_TAPE_GET_DRIVE_PARAMETERS = struct {
	FECC                   BOOLEAN
	FCompression           BOOLEAN
	FDataPadding           BOOLEAN
	FReportSetmarks        BOOLEAN
	FDefaultBlockSize      DWORD
	FMaximumBlockSize      DWORD
	FMinimumBlockSize      DWORD
	FMaximumPartitionCount DWORD
	FFeaturesLow           DWORD
	FFeaturesHigh          DWORD
	FEOTWarningZoneSize    DWORD
} /* winnt.h:8738:13 */

type TAPE_GET_DRIVE_PARAMETERS = X_TAPE_GET_DRIVE_PARAMETERS /* winnt.h:8750:7 */
type PTAPE_GET_DRIVE_PARAMETERS = uintptr                    /* winnt.h:8750:33 */

type X_TAPE_SET_DRIVE_PARAMETERS = struct {
	FECC                BOOLEAN
	FCompression        BOOLEAN
	FDataPadding        BOOLEAN
	FReportSetmarks     BOOLEAN
	FEOTWarningZoneSize DWORD
} /* winnt.h:8752:13 */

type TAPE_SET_DRIVE_PARAMETERS = X_TAPE_SET_DRIVE_PARAMETERS /* winnt.h:8758:7 */
type PTAPE_SET_DRIVE_PARAMETERS = uintptr                    /* winnt.h:8758:33 */

type X_TAPE_GET_MEDIA_PARAMETERS = struct {
	FCapacity       LARGE_INTEGER
	FRemaining      LARGE_INTEGER
	FBlockSize      DWORD
	FPartitionCount DWORD
	FWriteProtected BOOLEAN
	F__ccgo_pad1    [7]byte
} /* winnt.h:8760:13 */

type TAPE_GET_MEDIA_PARAMETERS = X_TAPE_GET_MEDIA_PARAMETERS /* winnt.h:8766:7 */
type PTAPE_GET_MEDIA_PARAMETERS = uintptr                    /* winnt.h:8766:33 */

type X_TAPE_SET_MEDIA_PARAMETERS = struct{ FBlockSize DWORD } /* winnt.h:8768:13 */

type TAPE_SET_MEDIA_PARAMETERS = X_TAPE_SET_MEDIA_PARAMETERS /* winnt.h:8770:7 */
type PTAPE_SET_MEDIA_PARAMETERS = uintptr                    /* winnt.h:8770:33 */

type X_TAPE_CREATE_PARTITION = struct {
	FMethod DWORD
	FCount  DWORD
	FSize   DWORD
} /* winnt.h:8776:13 */

type TAPE_CREATE_PARTITION = X_TAPE_CREATE_PARTITION /* winnt.h:8780:7 */
type PTAPE_CREATE_PARTITION = uintptr                /* winnt.h:8780:29 */

type X_TAPE_WMI_OPERATIONS = struct {
	FMethod         DWORD
	FDataBufferSize DWORD
	FDataBuffer     PVOID
} /* winnt.h:8788:13 */

type TAPE_WMI_OPERATIONS = X_TAPE_WMI_OPERATIONS /* winnt.h:8792:7 */
type PTAPE_WMI_OPERATIONS = uintptr              /* winnt.h:8792:27 */

type TAPE_DRIVE_PROBLEM_TYPE = uint32 /* winnt.h:8796:7 */

type TP_VERSION = DWORD              /* winnt.h:8799:17 */
type PTP_VERSION = uintptr           /* winnt.h:8799:28 */
type PTP_CALLBACK_INSTANCE = uintptr /* winnt.h:8800:61 */
type PTP_SIMPLE_CALLBACK = uintptr   /* winnt.h:8801:16 */
type PTP_POOL = uintptr              /* winnt.h:8802:35 */

type TP_CALLBACK_PRIORITY = uint32 /* winnt.h:8810:5 */

type X_TP_POOL_STACK_INFORMATION = struct {
	FStackReserve SIZE_T
	FStackCommit  SIZE_T
} /* winnt.h:8812:11 */

type TP_POOL_STACK_INFORMATION = X_TP_POOL_STACK_INFORMATION /* winnt.h:8815:5 */
type PTP_POOL_STACK_INFORMATION = uintptr                    /* winnt.h:8815:32 */
type PTP_CLEANUP_GROUP = uintptr                             /* winnt.h:8817:53 */
type PTP_CLEANUP_GROUP_CANCEL_CALLBACK = uintptr             /* winnt.h:8818:16 */

type X_TP_CALLBACK_ENVIRON_V1 = struct {
	FVersion                    TP_VERSION
	F__ccgo_pad1                [4]byte
	FPool                       PTP_POOL
	FCleanupGroup               PTP_CLEANUP_GROUP
	FCleanupGroupCancelCallback PTP_CLEANUP_GROUP_CANCEL_CALLBACK
	FRaceDll                    PVOID
	FActivationContext          uintptr
	FFinalizationCallback       PTP_SIMPLE_CALLBACK
	Fu                          struct{ FFlags DWORD }
	F__ccgo_pad2                [4]byte
} /* winnt.h:8842:11 */

type TP_CALLBACK_ENVIRON_V1 = X_TP_CALLBACK_ENVIRON_V1 /* winnt.h:8858:5 */
type TP_CALLBACK_ENVIRON = TP_CALLBACK_ENVIRON_V1      /* winnt.h:8859:34 */
type PTP_CALLBACK_ENVIRON = uintptr                    /* winnt.h:8859:54 */
type PTP_WORK = uintptr                                /* winnt.h:8862:35 */
type PTP_WORK_CALLBACK = uintptr                       /* winnt.h:8863:16 */
type PTP_TIMER = uintptr                               /* winnt.h:8864:37 */
type PTP_TIMER_CALLBACK = uintptr                      /* winnt.h:8865:16 */
type TP_WAIT_RESULT = DWORD                            /* winnt.h:8866:17 */
type PTP_WAIT = uintptr                                /* winnt.h:8867:35 */
type PTP_WAIT_CALLBACK = uintptr                       /* winnt.h:8868:16 */
type PTP_IO = uintptr                                  /* winnt.h:8869:31 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type CRM_PROTOCOL_ID = GUID     /* ktmtypes.h:13:16 */
type PCRM_PROTOCOL_ID = uintptr /* ktmtypes.h:13:32 */

type NOTIFICATION_MASK = ULONG /* ktmtypes.h:38:17 */

type X_TRANSACTION_NOTIFICATION = struct {
	FTransactionKey          PVOID
	FTransactionNotification ULONG
	F__ccgo_pad1             [4]byte
	FTmVirtualClock          LARGE_INTEGER
	FArgumentLength          ULONG
	F__ccgo_pad2             [4]byte
} /* ktmtypes.h:78:11 */

type TRANSACTION_NOTIFICATION = X_TRANSACTION_NOTIFICATION /* ktmtypes.h:83:5 */
type PTRANSACTION_NOTIFICATION = uintptr                   /* ktmtypes.h:83:30 */

type X_TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = struct {
	FEnlistmentId GUID
	FUOW          GUID
} /* ktmtypes.h:85:11 */

type TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = X_TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT /* ktmtypes.h:88:5 */
type PTRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = uintptr                                     /* ktmtypes.h:88:48 */

type X_TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = struct {
	FTmIdentity GUID
	FFlags      ULONG
} /* ktmtypes.h:92:11 */

type TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = X_TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT /* ktmtypes.h:95:5 */
type PTRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = uintptr                                      /* ktmtypes.h:95:49 */

type SAVEPOINT_ID = ULONG    /* ktmtypes.h:97:17 */
type PSAVEPOINT_ID = uintptr /* ktmtypes.h:97:30 */

type X_TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = struct{ FSavepointId SAVEPOINT_ID } /* ktmtypes.h:99:11 */

type TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = X_TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT /* ktmtypes.h:101:5 */
type PTRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = uintptr                                      /* ktmtypes.h:101:49 */

type X_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = struct {
	FPropagationCookie ULONG
	FUOW               GUID
	FTmIdentity        GUID
	FBufferLength      ULONG
} /* ktmtypes.h:103:11 */

type TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = X_TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT /* ktmtypes.h:108:5 */
type PTRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = uintptr                                      /* ktmtypes.h:108:49 */

type X_TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = struct {
	FMarshalCookie ULONG
	FUOW           GUID
} /* ktmtypes.h:110:11 */

type TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = X_TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT /* ktmtypes.h:113:5 */
type PTRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = uintptr                                    /* ktmtypes.h:113:47 */

type TRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT /* ktmtypes.h:115:55 */
type PTRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = uintptr                                    /* ktmtypes.h:115:97 */

type X_KCRM_MARSHAL_HEADER = struct {
	FVersionMajor ULONG
	FVersionMinor ULONG
	FNumProtocols ULONG
	FUnused       ULONG
} /* ktmtypes.h:123:11 */

type KCRM_MARSHAL_HEADER = X_KCRM_MARSHAL_HEADER /* ktmtypes.h:128:5 */
type PKCRM_MARSHAL_HEADER = uintptr              /* ktmtypes.h:128:25 */
type PRKCRM_MARSHAL_HEADER = uintptr             /* ktmtypes.h:128:47 */

type X_KCRM_TRANSACTION_BLOB = struct {
	FUOW            GUID
	FTmIdentity     GUID
	FIsolationLevel ULONG
	FIsolationFlags ULONG
	FTimeout        ULONG
	FDescription    [64]WCHAR
} /* ktmtypes.h:130:11 */

type KCRM_TRANSACTION_BLOB = X_KCRM_TRANSACTION_BLOB /* ktmtypes.h:137:5 */
type PKCRM_TRANSACTION_BLOB = uintptr                /* ktmtypes.h:137:27 */
type PRKCRM_TRANSACTION_BLOB = uintptr               /* ktmtypes.h:137:51 */

type X_KCRM_PROTOCOL_BLOB = struct {
	FProtocolId              CRM_PROTOCOL_ID
	FStaticInfoLength        ULONG
	FTransactionIdInfoLength ULONG
	FUnused1                 ULONG
	FUnused2                 ULONG
} /* ktmtypes.h:139:11 */

type KCRM_PROTOCOL_BLOB = X_KCRM_PROTOCOL_BLOB /* ktmtypes.h:145:5 */
type PKCRM_PROTOCOL_BLOB = uintptr             /* ktmtypes.h:145:24 */
type PRKCRM_PROTOCOL_BLOB = uintptr            /* ktmtypes.h:145:45 */

type TRANSACTION_OUTCOME = uint32 /* winnt.h:9001:9 */

type TRANSACTION_STATE = uint32 /* winnt.h:9007:9 */

type X_TRANSACTION_BASIC_INFORMATION = struct {
	FTransactionId GUID
	FState         DWORD
	FOutcome       DWORD
} /* winnt.h:9009:15 */

type TRANSACTION_BASIC_INFORMATION = X_TRANSACTION_BASIC_INFORMATION /* winnt.h:9013:9 */
type PTRANSACTION_BASIC_INFORMATION = uintptr                        /* winnt.h:9013:39 */

type X_TRANSACTIONMANAGER_BASIC_INFORMATION = struct {
	FTmIdentity   GUID
	FVirtualClock LARGE_INTEGER
} /* winnt.h:9015:15 */

type TRANSACTIONMANAGER_BASIC_INFORMATION = X_TRANSACTIONMANAGER_BASIC_INFORMATION /* winnt.h:9018:9 */
type PTRANSACTIONMANAGER_BASIC_INFORMATION = uintptr                               /* winnt.h:9018:46 */

type X_TRANSACTIONMANAGER_LOG_INFORMATION = struct{ FLogIdentity GUID } /* winnt.h:9020:15 */

type TRANSACTIONMANAGER_LOG_INFORMATION = X_TRANSACTIONMANAGER_LOG_INFORMATION /* winnt.h:9022:9 */
type PTRANSACTIONMANAGER_LOG_INFORMATION = uintptr                             /* winnt.h:9022:44 */

type X_TRANSACTIONMANAGER_LOGPATH_INFORMATION = struct {
	FLogPathLength DWORD
	FLogPath       [1]WCHAR
	F__ccgo_pad1   [2]byte
} /* winnt.h:9024:15 */

type TRANSACTIONMANAGER_LOGPATH_INFORMATION = X_TRANSACTIONMANAGER_LOGPATH_INFORMATION /* winnt.h:9027:9 */
type PTRANSACTIONMANAGER_LOGPATH_INFORMATION = uintptr                                 /* winnt.h:9027:48 */

type X_TRANSACTIONMANAGER_RECOVERY_INFORMATION = struct{ FLastRecoveredLsn ULONGLONG } /* winnt.h:9029:15 */

type TRANSACTIONMANAGER_RECOVERY_INFORMATION = X_TRANSACTIONMANAGER_RECOVERY_INFORMATION /* winnt.h:9031:9 */
type PTRANSACTIONMANAGER_RECOVERY_INFORMATION = uintptr                                  /* winnt.h:9031:49 */

type X_TRANSACTIONMANAGER_OLDEST_INFORMATION = struct{ FOldestTransactionGuid GUID } /* winnt.h:9033:15 */

type TRANSACTIONMANAGER_OLDEST_INFORMATION = X_TRANSACTIONMANAGER_OLDEST_INFORMATION /* winnt.h:9035:9 */
type PTRANSACTIONMANAGER_OLDEST_INFORMATION = uintptr                                /* winnt.h:9035:47 */

type X_TRANSACTION_PROPERTIES_INFORMATION = struct {
	FIsolationLevel    DWORD
	FIsolationFlags    DWORD
	FTimeout           LARGE_INTEGER
	FOutcome           DWORD
	FDescriptionLength DWORD
	FDescription       [1]WCHAR
	F__ccgo_pad1       [6]byte
} /* winnt.h:9037:15 */

type TRANSACTION_PROPERTIES_INFORMATION = X_TRANSACTION_PROPERTIES_INFORMATION /* winnt.h:9044:9 */
type PTRANSACTION_PROPERTIES_INFORMATION = uintptr                             /* winnt.h:9044:44 */

type X_TRANSACTION_BIND_INFORMATION = struct{ FTmHandle HANDLE } /* winnt.h:9046:15 */

type TRANSACTION_BIND_INFORMATION = X_TRANSACTION_BIND_INFORMATION /* winnt.h:9048:9 */
type PTRANSACTION_BIND_INFORMATION = uintptr                       /* winnt.h:9048:38 */

type X_TRANSACTION_ENLISTMENT_PAIR = struct {
	FEnlistmentId      GUID
	FResourceManagerId GUID
} /* winnt.h:9050:15 */

type TRANSACTION_ENLISTMENT_PAIR = X_TRANSACTION_ENLISTMENT_PAIR /* winnt.h:9053:9 */
type PTRANSACTION_ENLISTMENT_PAIR = uintptr                      /* winnt.h:9053:37 */

type X_TRANSACTION_ENLISTMENTS_INFORMATION = struct {
	FNumberOfEnlistments DWORD
	FEnlistmentPair      [1]TRANSACTION_ENLISTMENT_PAIR
} /* winnt.h:9055:15 */

type TRANSACTION_ENLISTMENTS_INFORMATION = X_TRANSACTION_ENLISTMENTS_INFORMATION /* winnt.h:9058:9 */
type PTRANSACTION_ENLISTMENTS_INFORMATION = uintptr                              /* winnt.h:9058:45 */

type X_TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = struct{ FSuperiorEnlistmentPair TRANSACTION_ENLISTMENT_PAIR } /* winnt.h:9060:15 */

type TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = X_TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION /* winnt.h:9062:9 */
type PTRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = uintptr                                      /* winnt.h:9062:53 */

type X_RESOURCEMANAGER_BASIC_INFORMATION = struct {
	FResourceManagerId GUID
	FDescriptionLength DWORD
	FDescription       [1]WCHAR
	F__ccgo_pad1       [2]byte
} /* winnt.h:9064:15 */

type RESOURCEMANAGER_BASIC_INFORMATION = X_RESOURCEMANAGER_BASIC_INFORMATION /* winnt.h:9068:9 */
type PRESOURCEMANAGER_BASIC_INFORMATION = uintptr                            /* winnt.h:9068:43 */

type X_RESOURCEMANAGER_COMPLETION_INFORMATION = struct {
	FIoCompletionPortHandle HANDLE
	FCompletionKey          ULONG_PTR
} /* winnt.h:9070:15 */

type RESOURCEMANAGER_COMPLETION_INFORMATION = X_RESOURCEMANAGER_COMPLETION_INFORMATION /* winnt.h:9073:9 */
type PRESOURCEMANAGER_COMPLETION_INFORMATION = uintptr                                 /* winnt.h:9073:48 */

type TRANSACTION_INFORMATION_CLASS = uint32 /* winnt.h:9082:9 */

type TRANSACTIONMANAGER_INFORMATION_CLASS = uint32 /* winnt.h:9091:9 */

type RESOURCEMANAGER_INFORMATION_CLASS = uint32 /* winnt.h:9096:9 */

type X_ENLISTMENT_BASIC_INFORMATION = struct {
	FEnlistmentId      GUID
	FTransactionId     GUID
	FResourceManagerId GUID
} /* winnt.h:9098:15 */

type ENLISTMENT_BASIC_INFORMATION = X_ENLISTMENT_BASIC_INFORMATION /* winnt.h:9102:9 */
type PENLISTMENT_BASIC_INFORMATION = uintptr                       /* winnt.h:9102:38 */

type X_ENLISTMENT_CRM_INFORMATION = struct {
	FCrmTransactionManagerId GUID
	FCrmResourceManagerId    GUID
	FCrmEnlistmentId         GUID
} /* winnt.h:9104:15 */

type ENLISTMENT_CRM_INFORMATION = X_ENLISTMENT_CRM_INFORMATION /* winnt.h:9108:9 */
type PENLISTMENT_CRM_INFORMATION = uintptr                     /* winnt.h:9108:36 */

type ENLISTMENT_INFORMATION_CLASS = uint32 /* winnt.h:9114:9 */

type X_TRANSACTION_LIST_ENTRY = struct{ FUOW GUID } /* winnt.h:9116:15 */

type TRANSACTION_LIST_ENTRY = X_TRANSACTION_LIST_ENTRY /* winnt.h:9118:9 */
type PTRANSACTION_LIST_ENTRY = uintptr                 /* winnt.h:9118:32 */

type X_TRANSACTION_LIST_INFORMATION = struct {
	FNumberOfTransactions   DWORD
	FTransactionInformation [1]TRANSACTION_LIST_ENTRY
} /* winnt.h:9120:15 */

type TRANSACTION_LIST_INFORMATION = X_TRANSACTION_LIST_INFORMATION /* winnt.h:9123:9 */
type PTRANSACTION_LIST_INFORMATION = uintptr                       /* winnt.h:9123:38 */

type KTMOBJECT_TYPE = uint32   /* winnt.h:9131:9 */
type PKTMOBJECT_TYPE = uintptr /* winnt.h:9131:24 */

type X_KTMOBJECT_CURSOR = struct {
	FLastQuery     GUID
	FObjectIdCount DWORD
	FObjectIds     [1]GUID
} /* winnt.h:9133:15 */

type KTMOBJECT_CURSOR = X_KTMOBJECT_CURSOR /* winnt.h:9137:9 */
type PKTMOBJECT_CURSOR = uintptr           /* winnt.h:9137:26 */

// Field Names From (See _fields_ section)
// FIXME: Verify these against documentation
// -- These documentation describes Win32 Constants and Structures in Python --
// Constants - http://packages.python.org/winappdbg/winappdbg.win32.context_i386-pysrc.html
// WOW64_FLOATING_SAVE_AREA - http://packages.python.org/winappdbg/winappdbg.win32.context_amd64.WOW64_FLOATING_SAVE_AREA-class.html
// WOW64_CONTEXT - http://packages.python.org/winappdbg/winappdbg.win32.context_amd64.WOW64_CONTEXT-class.html

type X_WOW64_FLOATING_SAVE_AREA = struct {
	FControlWord   DWORD
	FStatusWord    DWORD
	FTagWord       DWORD
	FErrorOffset   DWORD
	FErrorSelector DWORD
	FDataOffset    DWORD
	FDataSelector  DWORD
	FRegisterArea  [80]BYTE
	FCr0NpxState   DWORD
} /* winnt.h:9174:9 */

// Field Names From (See _fields_ section)
// FIXME: Verify these against documentation
// -- These documentation describes Win32 Constants and Structures in Python --
// Constants - http://packages.python.org/winappdbg/winappdbg.win32.context_i386-pysrc.html
// WOW64_FLOATING_SAVE_AREA - http://packages.python.org/winappdbg/winappdbg.win32.context_amd64.WOW64_FLOATING_SAVE_AREA-class.html
// WOW64_CONTEXT - http://packages.python.org/winappdbg/winappdbg.win32.context_amd64.WOW64_CONTEXT-class.html

type WOW64_FLOATING_SAVE_AREA = X_WOW64_FLOATING_SAVE_AREA /* winnt.h:9184:3 */
type PWOW64_FLOATING_SAVE_AREA = uintptr                   /* winnt.h:9184:29 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_WOW64_CONTEXT = struct {
	FContextFlags      DWORD
	FDr0               DWORD
	FDr1               DWORD
	FDr2               DWORD
	FDr3               DWORD
	FDr6               DWORD
	FDr7               DWORD
	FFloatSave         WOW64_FLOATING_SAVE_AREA
	FSegGs             DWORD
	FSegFs             DWORD
	FSegEs             DWORD
	FSegDs             DWORD
	FEdi               DWORD
	FEsi               DWORD
	FEbx               DWORD
	FEdx               DWORD
	FEcx               DWORD
	FEax               DWORD
	FEbp               DWORD
	FEip               DWORD
	FSegCs             DWORD
	FEFlags            DWORD
	FEsp               DWORD
	FSegSs             DWORD
	FExtendedRegisters [512]BYTE
} /* winnt.h:9187:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type WOW64_CONTEXT = X_WOW64_CONTEXT /* winnt.h:9213:3 */
type PWOW64_CONTEXT = uintptr        /* winnt.h:9213:18 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_WOW64_LDT_ENTRY = struct {
	FLimitLow WORD
	FBaseLow  WORD
	FHighWord struct {
		F__ccgo_pad1 [0]uint32
		FBytes       struct {
			FBaseMid BYTE
			FFlags1  BYTE
			FFlags2  BYTE
			FBaseHi  BYTE
		}
	}
} /* winnt.h:9216:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type WOW64_LDT_ENTRY = X_WOW64_LDT_ENTRY /* winnt.h:9239:3 */
type PWOW64_LDT_ENTRY = uintptr          /* winnt.h:9239:20 */

type X_WOW64_DESCRIPTOR_TABLE_ENTRY = struct {
	FSelector   DWORD
	FDescriptor WOW64_LDT_ENTRY
} /* winnt.h:9241:13 */

type WOW64_DESCRIPTOR_TABLE_ENTRY = X_WOW64_DESCRIPTOR_TABLE_ENTRY /* winnt.h:9244:7 */
type PWOW64_DESCRIPTOR_TABLE_ENTRY = uintptr                       /* winnt.h:9244:36 */

type WPARAM = UINT_PTR  /* minwindef.h:166:20 */
type LPARAM = LONG_PTR  /* minwindef.h:167:20 */
type LRESULT = LONG_PTR /* minwindef.h:168:20 */

type SPHANDLE = uintptr    /* minwindef.h:189:18 */
type LPHANDLE = uintptr    /* minwindef.h:190:18 */
type HGLOBAL = HANDLE      /* minwindef.h:191:18 */
type HLOCAL = HANDLE       /* minwindef.h:192:18 */
type GLOBALHANDLE = HANDLE /* minwindef.h:193:18 */
type LOCALHANDLE = HANDLE  /* minwindef.h:194:18 */
type FARPROC = uintptr     /* minwindef.h:196:19 */
type NEARPROC = uintptr    /* minwindef.h:197:19 */
type PROC = uintptr        /* minwindef.h:198:19 */

type ATOM = WORD /* minwindef.h:205:16 */

type HFILE = int32                         /* minwindef.h:207:15 */
type HINSTANCE__ = struct{ Funused int32 } /* minwindef.h:208:3 */

type HINSTANCE = uintptr              /* minwindef.h:208:3 */
type HKEY__ = struct{ Funused int32 } /* minwindef.h:209:3 */

type HKEY = uintptr                  /* minwindef.h:209:3 */
type PHKEY = uintptr                 /* minwindef.h:210:16 */
type HKL__ = struct{ Funused int32 } /* minwindef.h:211:3 */

type HKL = uintptr                      /* minwindef.h:211:3 */
type HLSURF__ = struct{ Funused int32 } /* minwindef.h:212:3 */

type HLSURF = uintptr                      /* minwindef.h:212:3 */
type HMETAFILE__ = struct{ Funused int32 } /* minwindef.h:213:3 */

type HMETAFILE = uintptr              /* minwindef.h:213:3 */
type HMODULE = HINSTANCE              /* minwindef.h:214:21 */
type HRGN__ = struct{ Funused int32 } /* minwindef.h:215:3 */

type HRGN = uintptr                    /* minwindef.h:215:3 */
type HRSRC__ = struct{ Funused int32 } /* minwindef.h:216:3 */

type HRSRC = uintptr                     /* minwindef.h:216:3 */
type HSPRITE__ = struct{ Funused int32 } /* minwindef.h:217:3 */

type HSPRITE = uintptr                /* minwindef.h:217:3 */
type HSTR__ = struct{ Funused int32 } /* minwindef.h:218:3 */

type HSTR = uintptr                    /* minwindef.h:218:3 */
type HTASK__ = struct{ Funused int32 } /* minwindef.h:219:3 */

type HTASK = uintptr                     /* minwindef.h:219:3 */
type HWINSTA__ = struct{ Funused int32 } /* minwindef.h:220:3 */

type HWINSTA = uintptr /* minwindef.h:220:3 */

type X_FILETIME = struct {
	FdwLowDateTime  DWORD
	FdwHighDateTime DWORD
} /* minwindef.h:222:11 */

type FILETIME = X_FILETIME /* minwindef.h:225:5 */
type PFILETIME = uintptr   /* minwindef.h:225:14 */
type LPFILETIME = uintptr  /* minwindef.h:225:25 */

// Make sure winnt.h is included.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type HWND__ = struct{ Funused int32 } /* windef.h:26:1 */

type HWND = uintptr                    /* windef.h:26:1 */
type HHOOK__ = struct{ Funused int32 } /* windef.h:27:1 */

type HHOOK = uintptr /* windef.h:27:1 */

type HGDIOBJ = uintptr /* windef.h:38:16 */

type HACCEL__ = struct{ Funused int32 } /* windef.h:43:1 */

type HACCEL = uintptr                    /* windef.h:43:1 */
type HBITMAP__ = struct{ Funused int32 } /* windef.h:44:1 */

type HBITMAP = uintptr                  /* windef.h:44:1 */
type HBRUSH__ = struct{ Funused int32 } /* windef.h:45:1 */

type HBRUSH = uintptr                        /* windef.h:45:1 */
type HCOLORSPACE__ = struct{ Funused int32 } /* windef.h:46:1 */

type HCOLORSPACE = uintptr           /* windef.h:46:1 */
type HDC__ = struct{ Funused int32 } /* windef.h:47:1 */

type HDC = uintptr                     /* windef.h:47:1 */
type HGLRC__ = struct{ Funused int32 } /* windef.h:48:1 */

type HGLRC = uintptr                   /* windef.h:48:1 */
type HDESK__ = struct{ Funused int32 } /* windef.h:49:1 */

type HDESK = uintptr                          /* windef.h:49:1 */
type HENHMETAFILE__ = struct{ Funused int32 } /* windef.h:50:1 */

type HENHMETAFILE = uintptr            /* windef.h:50:1 */
type HFONT__ = struct{ Funused int32 } /* windef.h:51:1 */

type HFONT = uintptr                   /* windef.h:51:1 */
type HICON__ = struct{ Funused int32 } /* windef.h:52:1 */

type HICON = uintptr                   /* windef.h:52:1 */
type HMENU__ = struct{ Funused int32 } /* windef.h:53:1 */

type HMENU = uintptr                      /* windef.h:53:1 */
type HPALETTE__ = struct{ Funused int32 } /* windef.h:54:1 */

type HPALETTE = uintptr               /* windef.h:54:1 */
type HPEN__ = struct{ Funused int32 } /* windef.h:55:1 */

type HPEN = uintptr                       /* windef.h:55:1 */
type HMONITOR__ = struct{ Funused int32 } /* windef.h:56:1 */

type HMONITOR = uintptr                        /* windef.h:56:1 */
type HWINEVENTHOOK__ = struct{ Funused int32 } /* windef.h:58:1 */

type HWINEVENTHOOK = uintptr /* windef.h:58:1 */

type HCURSOR = HICON  /* windef.h:60:15 */
type COLORREF = DWORD /* windef.h:61:15 */

type HUMPD__ = struct{ Funused int32 } /* windef.h:65:1 */

type HUMPD = uintptr /* windef.h:65:1 */

type LPCOLORREF = uintptr /* windef.h:67:15 */

type TagRECT = struct {
	Fleft   LONG
	Ftop    LONG
	Fright  LONG
	Fbottom LONG
} /* windef.h:73:9 */

type RECT = TagRECT   /* windef.h:78:3 */
type PRECT = uintptr  /* windef.h:78:8 */
type NPRECT = uintptr /* windef.h:78:15 */
type LPRECT = uintptr /* windef.h:78:23 */

type LPCRECT = uintptr /* windef.h:80:20 */

type X_RECTL = struct {
	Fleft   LONG
	Ftop    LONG
	Fright  LONG
	Fbottom LONG
} /* windef.h:82:9 */

type RECTL = X_RECTL   /* windef.h:87:3 */
type PRECTL = uintptr  /* windef.h:87:9 */
type LPRECTL = uintptr /* windef.h:87:17 */

type LPCRECTL = uintptr /* windef.h:89:21 */

type TagPOINT = struct {
	Fx LONG
	Fy LONG
} /* windef.h:91:9 */

type POINT = TagPOINT  /* windef.h:94:3 */
type PPOINT = uintptr  /* windef.h:94:9 */
type NPPOINT = uintptr /* windef.h:94:17 */
type LPPOINT = uintptr /* windef.h:94:26 */

type X_POINTL = struct {
	Fx LONG
	Fy LONG
} /* windef.h:96:9 */

type POINTL = X_POINTL /* windef.h:99:3 */
type PPOINTL = uintptr /* windef.h:99:10 */

type TagSIZE = struct {
	Fcx LONG
	Fcy LONG
} /* windef.h:101:9 */

type SIZE = TagSIZE   /* windef.h:104:3 */
type PSIZE = uintptr  /* windef.h:104:8 */
type LPSIZE = uintptr /* windef.h:104:15 */

type SIZEL = SIZE      /* windef.h:106:14 */
type PSIZEL = uintptr  /* windef.h:107:14 */
type LPSIZEL = uintptr /* windef.h:107:22 */

type TagPOINTS = struct {
	Fx SHORT
	Fy SHORT
} /* windef.h:109:9 */

type POINTS = TagPOINTS /* windef.h:112:3 */
type PPOINTS = uintptr  /* windef.h:112:10 */
type LPPOINTS = uintptr /* windef.h:112:19 */

type APP_LOCAL_DEVICE_ID1 = struct{ Fvalue [32]BYTE } /* windef.h:116:9 */

type APP_LOCAL_DEVICE_ID = APP_LOCAL_DEVICE_ID1 /* windef.h:118:3 */

type DPI_AWARENESS_CONTEXT__ = struct{ Funused int32 } /* windef.h:155:1 */

type DPI_AWARENESS_CONTEXT = uintptr /* windef.h:155:1 */

type DPI_AWARENESS = int32 /* windef.h:162:3 */

type DPI_HOSTING_BEHAVIOR = int32 /* windef.h:174:3 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type X_SECURITY_ATTRIBUTES = struct {
	FnLength              DWORD
	F__ccgo_pad1          [4]byte
	FlpSecurityDescriptor LPVOID
	FbInheritHandle       WINBOOL
	F__ccgo_pad2          [4]byte
} /* minwinbase.h:13:11 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type SECURITY_ATTRIBUTES = X_SECURITY_ATTRIBUTES /* minwinbase.h:17:5 */
type PSECURITY_ATTRIBUTES = uintptr              /* minwinbase.h:17:26 */
type LPSECURITY_ATTRIBUTES = uintptr             /* minwinbase.h:17:49 */

type X_OVERLAPPED = struct {
	FInternal     ULONG_PTR
	FInternalHigh ULONG_PTR
	F__16         struct {
		F__ccgo_pad1 [0]uint64
		F__0         struct {
			FOffset     DWORD
			FOffsetHigh DWORD
		}
	}
	FhEvent HANDLE
} /* minwinbase.h:19:11 */

type OVERLAPPED = X_OVERLAPPED /* minwinbase.h:30:5 */
type LPOVERLAPPED = uintptr    /* minwinbase.h:30:17 */

type X_OVERLAPPED_ENTRY = struct {
	FlpCompletionKey            ULONG_PTR
	FlpOverlapped               LPOVERLAPPED
	FInternal                   ULONG_PTR
	FdwNumberOfBytesTransferred DWORD
	F__ccgo_pad1                [4]byte
} /* minwinbase.h:32:11 */

type OVERLAPPED_ENTRY = X_OVERLAPPED_ENTRY /* minwinbase.h:37:5 */
type LPOVERLAPPED_ENTRY = uintptr          /* minwinbase.h:37:23 */

type X_SYSTEMTIME = struct {
	FwYear         WORD
	FwMonth        WORD
	FwDayOfWeek    WORD
	FwDay          WORD
	FwHour         WORD
	FwMinute       WORD
	FwSecond       WORD
	FwMilliseconds WORD
} /* minwinbase.h:49:11 */

type SYSTEMTIME = X_SYSTEMTIME /* minwinbase.h:58:5 */
type PSYSTEMTIME = uintptr     /* minwinbase.h:58:17 */
type LPSYSTEMTIME = uintptr    /* minwinbase.h:58:31 */

type X_WIN32_FIND_DATAA = struct {
	FdwFileAttributes   DWORD
	FftCreationTime     FILETIME
	FftLastAccessTime   FILETIME
	FftLastWriteTime    FILETIME
	FnFileSizeHigh      DWORD
	FnFileSizeLow       DWORD
	FdwReserved0        DWORD
	FdwReserved1        DWORD
	FcFileName          [260]CHAR
	FcAlternateFileName [14]CHAR
	F__ccgo_pad1        [2]byte
} /* minwinbase.h:61:11 */

type WIN32_FIND_DATAA = X_WIN32_FIND_DATAA /* minwinbase.h:77:5 */
type PWIN32_FIND_DATAA = uintptr           /* minwinbase.h:77:23 */
type LPWIN32_FIND_DATAA = uintptr          /* minwinbase.h:77:43 */

type X_WIN32_FIND_DATAW = struct {
	FdwFileAttributes   DWORD
	FftCreationTime     FILETIME
	FftLastAccessTime   FILETIME
	FftLastWriteTime    FILETIME
	FnFileSizeHigh      DWORD
	FnFileSizeLow       DWORD
	FdwReserved0        DWORD
	FdwReserved1        DWORD
	FcFileName          [260]WCHAR
	FcAlternateFileName [14]WCHAR
} /* minwinbase.h:79:11 */

type WIN32_FIND_DATAW = X_WIN32_FIND_DATAW /* minwinbase.h:95:5 */
type PWIN32_FIND_DATAW = uintptr           /* minwinbase.h:95:23 */
type LPWIN32_FIND_DATAW = uintptr          /* minwinbase.h:95:43 */

type WIN32_FIND_DATA = WIN32_FIND_DATAA     /* minwinbase.h:97:3 */
type PWIN32_FIND_DATA = PWIN32_FIND_DATAA   /* minwinbase.h:98:3 */
type LPWIN32_FIND_DATA = LPWIN32_FIND_DATAA /* minwinbase.h:99:3 */

type FINDEX_INFO_LEVELS = uint32 /* minwinbase.h:106:5 */

type FINDEX_SEARCH_OPS = uint32 /* minwinbase.h:119:5 */

type GET_FILEEX_INFO_LEVELS = uint32 /* minwinbase.h:134:5 */

type CRITICAL_SECTION = RTL_CRITICAL_SECTION                /* minwinbase.h:171:32 */
type PCRITICAL_SECTION = PRTL_CRITICAL_SECTION              /* minwinbase.h:172:33 */
type LPCRITICAL_SECTION = PRTL_CRITICAL_SECTION             /* minwinbase.h:173:33 */
type CRITICAL_SECTION_DEBUG = RTL_CRITICAL_SECTION_DEBUG    /* minwinbase.h:174:38 */
type PCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG  /* minwinbase.h:175:39 */
type LPCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG /* minwinbase.h:176:39 */

type LPOVERLAPPED_COMPLETION_ROUTINE = uintptr /* minwinbase.h:178:16 */

type X_PROCESS_HEAP_ENTRY = struct {
	FlpData       PVOID
	FcbData       DWORD
	FcbOverhead   BYTE
	FiRegionIndex BYTE
	FwFlags       WORD
	F__16         struct {
		FBlock struct {
			FhMem        HANDLE
			FdwReserved  [3]DWORD
			F__ccgo_pad1 [4]byte
		}
	}
} /* minwinbase.h:183:11 */

type PROCESS_HEAP_ENTRY = X_PROCESS_HEAP_ENTRY /* minwinbase.h:201:5 */
type LPPROCESS_HEAP_ENTRY = uintptr            /* minwinbase.h:201:24 */
type PPROCESS_HEAP_ENTRY = uintptr             /* minwinbase.h:201:46 */

type X_REASON_CONTEXT = struct {
	FVersion ULONG
	FFlags   DWORD
	FReason  struct {
		FDetailed struct {
			FLocalizedReasonModule HMODULE
			FLocalizedReasonId     ULONG
			FReasonStringCount     ULONG
			FReasonStrings         uintptr
		}
	}
} /* minwinbase.h:210:11 */

type REASON_CONTEXT = X_REASON_CONTEXT /* minwinbase.h:222:5 */
type PREASON_CONTEXT = uintptr         /* minwinbase.h:222:21 */

type PTHREAD_START_ROUTINE = uintptr                /* minwinbase.h:234:17 */
type LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE /* minwinbase.h:235:33 */

type PENCLAVE_ROUTINE = uintptr           /* minwinbase.h:237:18 */
type LPENCLAVE_ROUTINE = PENCLAVE_ROUTINE /* minwinbase.h:238:28 */

type X_EXCEPTION_DEBUG_INFO = struct {
	FExceptionRecord EXCEPTION_RECORD
	FdwFirstChance   DWORD
	F__ccgo_pad1     [4]byte
} /* minwinbase.h:240:11 */

type EXCEPTION_DEBUG_INFO = X_EXCEPTION_DEBUG_INFO /* minwinbase.h:243:5 */
type LPEXCEPTION_DEBUG_INFO = uintptr              /* minwinbase.h:243:27 */

type X_CREATE_THREAD_DEBUG_INFO = struct {
	FhThread           HANDLE
	FlpThreadLocalBase LPVOID
	FlpStartAddress    LPTHREAD_START_ROUTINE
} /* minwinbase.h:245:11 */

type CREATE_THREAD_DEBUG_INFO = X_CREATE_THREAD_DEBUG_INFO /* minwinbase.h:249:5 */
type LPCREATE_THREAD_DEBUG_INFO = uintptr                  /* minwinbase.h:249:31 */

type X_CREATE_PROCESS_DEBUG_INFO = struct {
	FhFile                 HANDLE
	FhProcess              HANDLE
	FhThread               HANDLE
	FlpBaseOfImage         LPVOID
	FdwDebugInfoFileOffset DWORD
	FnDebugInfoSize        DWORD
	FlpThreadLocalBase     LPVOID
	FlpStartAddress        LPTHREAD_START_ROUTINE
	FlpImageName           LPVOID
	FfUnicode              WORD
	F__ccgo_pad1           [6]byte
} /* minwinbase.h:251:11 */

type CREATE_PROCESS_DEBUG_INFO = X_CREATE_PROCESS_DEBUG_INFO /* minwinbase.h:262:5 */
type LPCREATE_PROCESS_DEBUG_INFO = uintptr                   /* minwinbase.h:262:32 */

type X_EXIT_THREAD_DEBUG_INFO = struct{ FdwExitCode DWORD } /* minwinbase.h:264:11 */

type EXIT_THREAD_DEBUG_INFO = X_EXIT_THREAD_DEBUG_INFO /* minwinbase.h:266:5 */
type LPEXIT_THREAD_DEBUG_INFO = uintptr                /* minwinbase.h:266:29 */

type X_EXIT_PROCESS_DEBUG_INFO = struct{ FdwExitCode DWORD } /* minwinbase.h:268:11 */

type EXIT_PROCESS_DEBUG_INFO = X_EXIT_PROCESS_DEBUG_INFO /* minwinbase.h:270:5 */
type LPEXIT_PROCESS_DEBUG_INFO = uintptr                 /* minwinbase.h:270:30 */

type X_LOAD_DLL_DEBUG_INFO = struct {
	FhFile                 HANDLE
	FlpBaseOfDll           LPVOID
	FdwDebugInfoFileOffset DWORD
	FnDebugInfoSize        DWORD
	FlpImageName           LPVOID
	FfUnicode              WORD
	F__ccgo_pad1           [6]byte
} /* minwinbase.h:272:11 */

type LOAD_DLL_DEBUG_INFO = X_LOAD_DLL_DEBUG_INFO /* minwinbase.h:279:5 */
type LPLOAD_DLL_DEBUG_INFO = uintptr             /* minwinbase.h:279:26 */

type X_UNLOAD_DLL_DEBUG_INFO = struct{ FlpBaseOfDll LPVOID } /* minwinbase.h:281:11 */

type UNLOAD_DLL_DEBUG_INFO = X_UNLOAD_DLL_DEBUG_INFO /* minwinbase.h:283:5 */
type LPUNLOAD_DLL_DEBUG_INFO = uintptr               /* minwinbase.h:283:28 */

type X_OUTPUT_DEBUG_STRING_INFO = struct {
	FlpDebugStringData  LPSTR
	FfUnicode           WORD
	FnDebugStringLength WORD
	F__ccgo_pad1        [4]byte
} /* minwinbase.h:285:11 */

type OUTPUT_DEBUG_STRING_INFO = X_OUTPUT_DEBUG_STRING_INFO /* minwinbase.h:289:5 */
type LPOUTPUT_DEBUG_STRING_INFO = uintptr                  /* minwinbase.h:289:31 */

type X_RIP_INFO = struct {
	FdwError DWORD
	FdwType  DWORD
} /* minwinbase.h:291:11 */

type RIP_INFO = X_RIP_INFO /* minwinbase.h:294:5 */
type LPRIP_INFO = uintptr  /* minwinbase.h:294:15 */

type X_DEBUG_EVENT = struct {
	FdwDebugEventCode DWORD
	FdwProcessId      DWORD
	FdwThreadId       DWORD
	F__ccgo_pad1      [4]byte
	Fu                struct{ FException EXCEPTION_DEBUG_INFO }
} /* minwinbase.h:296:11 */

type DEBUG_EVENT = X_DEBUG_EVENT /* minwinbase.h:311:5 */
type LPDEBUG_EVENT = uintptr     /* minwinbase.h:311:18 */

type LPCONTEXT = PCONTEXT                  /* minwinbase.h:314:20 */
type BEM_FREE_INTERFACE_CALLBACK = uintptr /* bemapiset.h:21:16 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type PTOP_LEVEL_EXCEPTION_FILTER = uintptr                      /* errhandlingapi.h:17:14 */
type LPTOP_LEVEL_EXCEPTION_FILTER = PTOP_LEVEL_EXCEPTION_FILTER /* errhandlingapi.h:18:37 */
type X_BY_HANDLE_FILE_INFORMATION = struct {
	FdwFileAttributes     DWORD
	FftCreationTime       FILETIME
	FftLastAccessTime     FILETIME
	FftLastWriteTime      FILETIME
	FdwVolumeSerialNumber DWORD
	FnFileSizeHigh        DWORD
	FnFileSizeLow         DWORD
	FnNumberOfLinks       DWORD
	FnFileIndexHigh       DWORD
	FnFileIndexLow        DWORD
} /* fileapi.h:36:11 */

type BY_HANDLE_FILE_INFORMATION = X_BY_HANDLE_FILE_INFORMATION /* fileapi.h:47:5 */
type PBY_HANDLE_FILE_INFORMATION = uintptr                     /* fileapi.h:47:33 */
type LPBY_HANDLE_FILE_INFORMATION = uintptr                    /* fileapi.h:48:5 */

type X_WIN32_FILE_ATTRIBUTE_DATA = struct {
	FdwFileAttributes DWORD
	FftCreationTime   FILETIME
	FftLastAccessTime FILETIME
	FftLastWriteTime  FILETIME
	FnFileSizeHigh    DWORD
	FnFileSizeLow     DWORD
} /* fileapi.h:142:11 */

type WIN32_FILE_ATTRIBUTE_DATA = X_WIN32_FILE_ATTRIBUTE_DATA /* fileapi.h:149:5 */
type LPWIN32_FILE_ATTRIBUTE_DATA = uintptr                   /* fileapi.h:149:32 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type X_HEAP_SUMMARY = struct {
	Fcb           DWORD
	F__ccgo_pad1  [4]byte
	FcbAllocated  SIZE_T
	FcbCommitted  SIZE_T
	FcbReserved   SIZE_T
	FcbMaxReserve SIZE_T
} /* heapapi.h:18:11 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type HEAP_SUMMARY = X_HEAP_SUMMARY /* heapapi.h:24:5 */
type PHEAP_SUMMARY = uintptr       /* heapapi.h:24:18 */

type LPHEAP_SUMMARY = PHEAP_SUMMARY /* heapapi.h:26:25 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type TagENUMUILANG = struct {
	FNumOfEnumUILang    ULONG
	FSizeOfEnumUIBuffer ULONG
	FpEnumUIBuffer      uintptr
} /* libloaderapi.h:18:11 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type ENUMUILANG = TagENUMUILANG /* libloaderapi.h:22:5 */
type PENUMUILANG = uintptr      /* libloaderapi.h:22:17 */

type ENUMRESLANGPROCA = uintptr /* libloaderapi.h:25:19 */
type ENUMRESLANGPROCW = uintptr /* libloaderapi.h:26:19 */
type ENUMRESNAMEPROCA = uintptr /* libloaderapi.h:27:19 */
type ENUMRESNAMEPROCW = uintptr /* libloaderapi.h:28:19 */
type ENUMRESTYPEPROCA = uintptr /* libloaderapi.h:29:19 */
type ENUMRESTYPEPROCW = uintptr /* libloaderapi.h:30:19 */

type PGET_MODULE_HANDLE_EXA = uintptr /* libloaderapi.h:41:19 */
type PGET_MODULE_HANDLE_EXW = uintptr /* libloaderapi.h:42:19 */

type DLL_DIRECTORY_COOKIE = PVOID    /* libloaderapi.h:45:17 */
type PDLL_DIRECTORY_COOKIE = uintptr /* libloaderapi.h:45:39 */

type X_REDIRECTION_FUNCTION_DESCRIPTOR = struct {
	FDllName           PCSTR
	FFunctionName      PCSTR
	FRedirectionTarget PVOID
} /* libloaderapi.h:158:9 */

type REDIRECTION_FUNCTION_DESCRIPTOR = X_REDIRECTION_FUNCTION_DESCRIPTOR /* libloaderapi.h:162:3 */
type PREDIRECTION_FUNCTION_DESCRIPTOR = uintptr                          /* libloaderapi.h:162:36 */

type PCREDIRECTION_FUNCTION_DESCRIPTOR = uintptr /* libloaderapi.h:164:47 */

type X_REDIRECTION_DESCRIPTOR = struct {
	FVersion       ULONG
	FFunctionCount ULONG
	FRedirections  PCREDIRECTION_FUNCTION_DESCRIPTOR
} /* libloaderapi.h:166:9 */

type REDIRECTION_DESCRIPTOR = X_REDIRECTION_DESCRIPTOR /* libloaderapi.h:170:3 */
type PREDIRECTION_DESCRIPTOR = uintptr                 /* libloaderapi.h:170:27 */

type PCREDIRECTION_DESCRIPTOR = uintptr /* libloaderapi.h:172:38 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type MEMORY_RESOURCE_NOTIFICATION_TYPE = uint32 /* memoryapi.h:21:5 */

type X_STARTUPINFOA = struct {
	Fcb              DWORD
	F__ccgo_pad1     [4]byte
	FlpReserved      LPSTR
	FlpDesktop       LPSTR
	FlpTitle         LPSTR
	FdwX             DWORD
	FdwY             DWORD
	FdwXSize         DWORD
	FdwYSize         DWORD
	FdwXCountChars   DWORD
	FdwYCountChars   DWORD
	FdwFillAttribute DWORD
	FdwFlags         DWORD
	FwShowWindow     WORD
	FcbReserved2     WORD
	F__ccgo_pad2     [4]byte
	FlpReserved2     LPBYTE
	FhStdInput       HANDLE
	FhStdOutput      HANDLE
	FhStdError       HANDLE
} /* processthreadsapi.h:51:11 */

type STARTUPINFOA = X_STARTUPINFOA /* processthreadsapi.h:70:5 */
type LPSTARTUPINFOA = uintptr      /* processthreadsapi.h:70:19 */

type X_STARTUPINFOW = struct {
	Fcb              DWORD
	F__ccgo_pad1     [4]byte
	FlpReserved      LPWSTR
	FlpDesktop       LPWSTR
	FlpTitle         LPWSTR
	FdwX             DWORD
	FdwY             DWORD
	FdwXSize         DWORD
	FdwYSize         DWORD
	FdwXCountChars   DWORD
	FdwYCountChars   DWORD
	FdwFillAttribute DWORD
	FdwFlags         DWORD
	FwShowWindow     WORD
	FcbReserved2     WORD
	F__ccgo_pad2     [4]byte
	FlpReserved2     LPBYTE
	FhStdInput       HANDLE
	FhStdOutput      HANDLE
	FhStdError       HANDLE
} /* processthreadsapi.h:72:11 */

type STARTUPINFOW = X_STARTUPINFOW /* processthreadsapi.h:91:5 */
type LPSTARTUPINFOW = uintptr      /* processthreadsapi.h:91:19 */

type STARTUPINFO = STARTUPINFOA     /* processthreadsapi.h:93:3 */
type LPSTARTUPINFO = LPSTARTUPINFOA /* processthreadsapi.h:94:3 */

type X_PROCESS_INFORMATION = struct {
	FhProcess    HANDLE
	FhThread     HANDLE
	FdwProcessId DWORD
	FdwThreadId  DWORD
} /* processthreadsapi.h:96:11 */

type PROCESS_INFORMATION = X_PROCESS_INFORMATION /* processthreadsapi.h:101:5 */
type PPROCESS_INFORMATION = uintptr              /* processthreadsapi.h:101:26 */
type LPPROCESS_INFORMATION = uintptr             /* processthreadsapi.h:101:49 */

type PPROC_THREAD_ATTRIBUTE_LIST = uintptr  /* processthreadsapi.h:106:46 */
type LPPROC_THREAD_ATTRIBUTE_LIST = uintptr /* processthreadsapi.h:106:76 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type SRWLOCK = RTL_SRWLOCK /* synchapi.h:34:23 */
type PSRWLOCK = uintptr    /* synchapi.h:34:32 */

type INIT_ONCE = RTL_RUN_ONCE    /* synchapi.h:36:24 */
type PINIT_ONCE = PRTL_RUN_ONCE  /* synchapi.h:37:25 */
type LPINIT_ONCE = PRTL_RUN_ONCE /* synchapi.h:38:25 */

type PINIT_ONCE_FN = uintptr                     /* synchapi.h:40:19 */
type CONDITION_VARIABLE = RTL_CONDITION_VARIABLE /* synchapi.h:41:34 */
type PCONDITION_VARIABLE = uintptr               /* synchapi.h:41:54 */

type PTIMERAPCROUTINE = uintptr /* synchapi.h:102:16 */

type SYNCHRONIZATION_BARRIER = RTL_BARRIER    /* synchapi.h:104:23 */
type PSYNCHRONIZATION_BARRIER = PRTL_BARRIER  /* synchapi.h:105:24 */
type LPSYNCHRONIZATION_BARRIER = PRTL_BARRIER /* synchapi.h:106:24 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type X_SYSTEM_INFO = struct {
	F__0                         struct{ FdwOemId DWORD }
	FdwPageSize                  DWORD
	FlpMinimumApplicationAddress LPVOID
	FlpMaximumApplicationAddress LPVOID
	FdwActiveProcessorMask       DWORD_PTR
	FdwNumberOfProcessors        DWORD
	FdwProcessorType             DWORD
	FdwAllocationGranularity     DWORD
	FwProcessorLevel             WORD
	FwProcessorRevision          WORD
} /* sysinfoapi.h:18:11 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type SYSTEM_INFO = X_SYSTEM_INFO /* sysinfoapi.h:35:5 */
type LPSYSTEM_INFO = uintptr     /* sysinfoapi.h:35:18 */

type X_MEMORYSTATUSEX = struct {
	FdwLength                DWORD
	FdwMemoryLoad            DWORD
	FullTotalPhys            DWORDLONG
	FullAvailPhys            DWORDLONG
	FullTotalPageFile        DWORDLONG
	FullAvailPageFile        DWORDLONG
	FullTotalVirtual         DWORDLONG
	FullAvailVirtual         DWORDLONG
	FullAvailExtendedVirtual DWORDLONG
} /* sysinfoapi.h:48:11 */

type MEMORYSTATUSEX = X_MEMORYSTATUSEX /* sysinfoapi.h:58:5 */
type LPMEMORYSTATUSEX = uintptr        /* sysinfoapi.h:58:20 */

type COMPUTER_NAME_FORMAT = uint32 /* sysinfoapi.h:80:5 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type PTP_WIN32_IO_CALLBACK = uintptr /* threadpoolapiset.h:18:16 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// There are 3 separate ways this file is intended to be used:
//
//    1) Included from intrin.h.  In this case, all intrinsics in this file get declarations and
//       implementations.  No special #defines are needed for this case.
//
//    2) Included from the library versions of these functions (ie mingw-w64-crt\intrincs\*.c).  All
//       intrinsics in this file must also be included in the library.  In this case, only the
//       specific functions requested will get defined, and they will not be defined as inline.  If
//       you have followed the instructions (below) for adding functions to this file, then all you
//       need to have in the .c file is the following:
//
//       #define __INTRINSIC_ONLYSPECIAL
//       #define __INTRINSIC_SPECIAL___stosb // Causes code generation in intrin-impl.h
//
//       #include <intrin.h>
//
//    3) Included from various platform sdk headers.  Some platform sdk headers (such as winnt.h)
//       define a subset of intrinsics.  To avoid potential conflicts, this file is designed to
//       allow for specific subsets of functions to be defined.  This is done by defining the
//       appropriate variable before including this file:
//
//       #define __INTRINSIC_GROUP_WINNT
//       #include <psdk_inc/intrin-impl.h>
//
//    In all cases, it is acceptable to include this file multiple times in any order (ie include
//    winnt.h to get its subset, then include intrin.h to get everything, or vice versa).
//
//    See also the comments at the top of intrin.h.

// To add an implementation for a new intrinsic to this file, you should comment out the current prototype in intrin.h.
//    If the function you are adding is not in intrin.h, you should not be adding it to this file.  This file is only
//    for MSVC intrinsics.
//
//    Make sure you put your definition in the right section (x86 vs x64), and use this outline when adding definitions
//    to this file:
//
// #if __INTRINSIC_PROLOG(__int2c)
//
// <prototype goes here>
//
// __INTRINSICS_USEINLINE
// <code goes here>
//
// #define __INTRINSIC_DEFINED___int2c
// #endif

// Note that there is no file-wide #if to prevent intrin-impl.h from being
//    included multiple times.  This is because this file might be included multiple
//    times to define various subsets of the functions it contains.

// However we do check for __MINGW_INTRIN_INLINE.  In theory this means we
//    can work with other compilers.

// Clang has support for MSVC builtins, GCC doesn't

// These macros are used by the routines below.  While this file may be included
//    multiple times, these macros only need to be defined once.

// The Barrier functions can never be in the library.  Since gcc only
// supports ReadWriteBarrier, map all 3 to do the same.

// The logic for this macro is:
//    if the function is not yet defined AND
//    (
//        (if we are not just defining special OR
//            (we are defining special AND this is one of the ones we are defining)
//        )
//    )

// Normally __INTRINSIC_ONLYSPECIAL is used to indicate that we are
//    being included in the library version of the intrinsic (case 2).  However,
//    that really only affects the definition of __INTRINSICS_USEINLINE.
//    So here we are letting it serve an additional purpose of only defining
//    the intrinsics for a certain file (case 3).  For example, to create the
//    intrinsics for the functions in winnt.h, define __INTRINSIC_GROUP_WINNT.
//
//    Note that this file can be included multiple times, and as a result
//    there can be overlap (definitions that appear in more than one
//    file).  This is handled by __INTRINSIC_DEFINED_*
//
//    If no groups are defined (such as what happens when including intrin.h),
//    all intrinsics are defined.

// If __INTRINSIC_ONLYSPECIAL is defined at this point, we are processing case 2.  In
//    that case, don't go looking for groups

// Note that this gets undefined at the end of this file

// To add an additional group, put the #ifdef and definitions here.

// Before 4.9.2, ia32intrin.h had broken versions of these.

// *****************************************************

// *****************************************************

// GCC 8 has already defined _xgetbv, Clang 9 has _xgetbv defined as a macro
// redirecting to the __builtin_ia32_xgetbv builtin.

// *****************************************************

type PFIBER_START_ROUTINE = uintptr               /* winbase.h:160:16 */
type LPFIBER_START_ROUTINE = PFIBER_START_ROUTINE /* winbase.h:161:32 */

type LPLDT_ENTRY = LPVOID /* winbase.h:166:18 */

type X_COMMPROP = struct {
	FwPacketLength       WORD
	FwPacketVersion      WORD
	FdwServiceMask       DWORD
	FdwReserved1         DWORD
	FdwMaxTxQueue        DWORD
	FdwMaxRxQueue        DWORD
	FdwMaxBaud           DWORD
	FdwProvSubType       DWORD
	FdwProvCapabilities  DWORD
	FdwSettableParams    DWORD
	FdwSettableBaud      DWORD
	FwSettableData       WORD
	FwSettableStopParity WORD
	FdwCurrentTxQueue    DWORD
	FdwCurrentRxQueue    DWORD
	FdwProvSpec1         DWORD
	FdwProvSpec2         DWORD
	FwcProvChar          [1]WCHAR
	F__ccgo_pad1         [2]byte
} /* winbase.h:240:11 */

type COMMPROP = X_COMMPROP /* winbase.h:259:5 */
type LPCOMMPROP = uintptr  /* winbase.h:259:14 */

type X_COMSTAT = struct {
	FfCtsHold    uint32 /* DWORD fCtsHold: 1, DWORD fDsrHold: 1, DWORD fRlsdHold: 1, DWORD fXoffHold: 1, DWORD fXoffSent: 1, DWORD fEof: 1, DWORD fTxim: 1, DWORD fReserved: 25 */
	F__ccgo_pad1 [4]byte
	FcbInQue     DWORD
	FcbOutQue    DWORD
} /* winbase.h:263:11 */

type COMSTAT = X_COMSTAT /* winbase.h:274:5 */
type LPCOMSTAT = uintptr /* winbase.h:274:13 */

type X_DCB = struct {
	FDCBlength   DWORD
	FBaudRate    DWORD
	FfBinary     uint32 /* DWORD fBinary: 1, DWORD fParity: 1, DWORD fOutxCtsFlow: 1, DWORD fOutxDsrFlow: 1, DWORD fDtrControl: 2, DWORD fDsrSensitivity: 1, DWORD fTXContinueOnXoff: 1, DWORD fOutX: 1, DWORD fInX: 1, DWORD fErrorChar: 1, DWORD fNull: 1, DWORD fRtsControl: 2, DWORD fAbortOnError: 1, DWORD fDummy2: 17 */
	F__ccgo_pad1 [2]byte
	FwReserved   WORD
	FXonLim      WORD
	FXoffLim     WORD
	FByteSize    BYTE
	FParity      BYTE
	FStopBits    BYTE
	FXonChar     int8
	FXoffChar    int8
	FErrorChar   int8
	FEofChar     int8
	FEvtChar     int8
	FwReserved1  WORD
	F__ccgo_pad2 [2]byte
} /* winbase.h:285:11 */

type DCB = X_DCB     /* winbase.h:314:5 */
type LPDCB = uintptr /* winbase.h:314:9 */

type X_COMMTIMEOUTS = struct {
	FReadIntervalTimeout         DWORD
	FReadTotalTimeoutMultiplier  DWORD
	FReadTotalTimeoutConstant    DWORD
	FWriteTotalTimeoutMultiplier DWORD
	FWriteTotalTimeoutConstant   DWORD
} /* winbase.h:316:11 */

type COMMTIMEOUTS = X_COMMTIMEOUTS /* winbase.h:322:5 */
type LPCOMMTIMEOUTS = uintptr      /* winbase.h:322:18 */

type X_COMMCONFIG = struct {
	FdwSize            DWORD
	FwVersion          WORD
	FwReserved         WORD
	Fdcb               DCB
	FdwProviderSubType DWORD
	FdwProviderOffset  DWORD
	FdwProviderSize    DWORD
	FwcProviderData    [1]WCHAR
	F__ccgo_pad1       [2]byte
} /* winbase.h:324:11 */

type COMMCONFIG = X_COMMCONFIG /* winbase.h:333:5 */
type LPCOMMCONFIG = uintptr    /* winbase.h:333:16 */

type X_MEMORYSTATUS = struct {
	FdwLength        DWORD
	FdwMemoryLoad    DWORD
	FdwTotalPhys     SIZE_T
	FdwAvailPhys     SIZE_T
	FdwTotalPageFile SIZE_T
	FdwAvailPageFile SIZE_T
	FdwTotalVirtual  SIZE_T
	FdwAvailVirtual  SIZE_T
} /* winbase.h:364:11 */

type MEMORYSTATUS = X_MEMORYSTATUS /* winbase.h:373:5 */
type LPMEMORYSTATUS = uintptr      /* winbase.h:373:18 */

type X_JIT_DEBUG_INFO = struct {
	FdwSize                  DWORD
	FdwProcessorArchitecture DWORD
	FdwThreadID              DWORD
	FdwReserved0             DWORD
	FlpExceptionAddress      ULONG64
	FlpExceptionRecord       ULONG64
	FlpContextRecord         ULONG64
} /* winbase.h:431:11 */

type JIT_DEBUG_INFO = X_JIT_DEBUG_INFO /* winbase.h:439:5 */
type LPJIT_DEBUG_INFO = uintptr        /* winbase.h:439:20 */

type JIT_DEBUG_INFO32 = JIT_DEBUG_INFO /* winbase.h:441:26 */
type LPJIT_DEBUG_INFO32 = uintptr      /* winbase.h:441:44 */
type JIT_DEBUG_INFO64 = JIT_DEBUG_INFO /* winbase.h:442:26 */
type LPJIT_DEBUG_INFO64 = uintptr      /* winbase.h:442:44 */

type LPEXCEPTION_RECORD = PEXCEPTION_RECORD     /* winbase.h:445:29 */
type LPEXCEPTION_POINTERS = PEXCEPTION_POINTERS /* winbase.h:446:31 */

type X_OFSTRUCT = struct {
	FcBytes     BYTE
	FfFixedDisk BYTE
	FnErrCode   WORD
	FReserved1  WORD
	FReserved2  WORD
	FszPathName [128]CHAR
} /* winbase.h:620:11 */

type OFSTRUCT = X_OFSTRUCT /* winbase.h:627:5 */
type LPOFSTRUCT = uintptr  /* winbase.h:627:15 */
type POFSTRUCT = uintptr   /* winbase.h:627:27 */

type THREAD_INFORMATION_CLASS = uint32 /* winbase.h:1188:5 */

type DEP_SYSTEM_POLICY_TYPE = uint32 /* winbase.h:1285:5 */

type PFE_EXPORT_FUNC = uintptr /* winbase.h:1378:17 */
type PFE_IMPORT_FUNC = uintptr /* winbase.h:1379:17 */

type X_WIN32_STREAM_ID = struct {
	FdwStreamId         DWORD
	FdwStreamAttributes DWORD
	FSize               LARGE_INTEGER
	FdwStreamNameSize   DWORD
	FcStreamName        [1]WCHAR
	F__ccgo_pad1        [2]byte
} /* winbase.h:1456:11 */

type WIN32_STREAM_ID = X_WIN32_STREAM_ID /* winbase.h:1462:5 */
type LPWIN32_STREAM_ID = uintptr         /* winbase.h:1462:21 */

type PROCESS_INFORMATION_CLASS = uint32 /* winbase.h:1573:5 */

type PGET_SYSTEM_WOW64_DIRECTORY_A = uintptr /* winbase.h:1887:16 */
type PGET_SYSTEM_WOW64_DIRECTORY_W = uintptr /* winbase.h:1888:16 */

type LPPROGRESS_ROUTINE = uintptr /* winbase.h:2005:17 */

type STREAM_INFO_LEVELS = uint32 /* winbase.h:2219:5 */

type X_WIN32_FIND_STREAM_DATA = struct {
	FStreamSize  LARGE_INTEGER
	FcStreamName [296]WCHAR
} /* winbase.h:2221:11 */

type WIN32_FIND_STREAM_DATA = X_WIN32_FIND_STREAM_DATA /* winbase.h:2224:5 */
type PWIN32_FIND_STREAM_DATA = uintptr                 /* winbase.h:2224:28 */

type X_EVENTLOG_FULL_INFORMATION = struct{ FdwFull DWORD } /* winbase.h:2282:11 */

type EVENTLOG_FULL_INFORMATION = X_EVENTLOG_FULL_INFORMATION /* winbase.h:2284:5 */
type LPEVENTLOG_FULL_INFORMATION = uintptr                   /* winbase.h:2284:31 */

type TagHW_PROFILE_INFOA = struct {
	FdwDockInfo      DWORD
	FszHwProfileGuid [39]CHAR
	FszHwProfileName [80]CHAR
	F__ccgo_pad1     [1]byte
} /* winbase.h:2478:11 */

type HW_PROFILE_INFOA = TagHW_PROFILE_INFOA /* winbase.h:2482:5 */
type LPHW_PROFILE_INFOA = uintptr           /* winbase.h:2482:22 */

type TagHW_PROFILE_INFOW = struct {
	FdwDockInfo      DWORD
	FszHwProfileGuid [39]WCHAR
	FszHwProfileName [80]WCHAR
	F__ccgo_pad1     [2]byte
} /* winbase.h:2484:11 */

type HW_PROFILE_INFOW = TagHW_PROFILE_INFOW /* winbase.h:2488:5 */
type LPHW_PROFILE_INFOW = uintptr           /* winbase.h:2488:22 */

type HW_PROFILE_INFO = HW_PROFILE_INFOA     /* winbase.h:2490:3 */
type LPHW_PROFILE_INFO = LPHW_PROFILE_INFOA /* winbase.h:2491:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// ********************   WARNING   ********************
// This is inconsistent with MSDN!
// In MSDN:
//     ERROR_IPSEC_IKE_QM_LIMIT => 13884 (here not defined)
//     ERROR_IPSEC_IKE_NEG_STATUS_END => 13897 (here 13884)
// Source:
//     WinINet Reference -> WinINet Constants -> Error Messages
//     https://msdn.microsoft.com/en-us/library/windows/desktop/aa385465%28v=vs.85%29.aspx
// ******************** END WARNING ********************
//#define ERROR_IPSEC_IKE_NEG_STATUS_END __MSABI_LONG(13884)

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type X_TIME_ZONE_INFORMATION = struct {
	FBias         LONG
	FStandardName [32]WCHAR
	FStandardDate SYSTEMTIME
	FStandardBias LONG
	FDaylightName [32]WCHAR
	FDaylightDate SYSTEMTIME
	FDaylightBias LONG
} /* timezoneapi.h:21:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// ********************   WARNING   ********************
// This is inconsistent with MSDN!
// In MSDN:
//     ERROR_IPSEC_IKE_QM_LIMIT => 13884 (here not defined)
//     ERROR_IPSEC_IKE_NEG_STATUS_END => 13897 (here 13884)
// Source:
//     WinINet Reference -> WinINet Constants -> Error Messages
//     https://msdn.microsoft.com/en-us/library/windows/desktop/aa385465%28v=vs.85%29.aspx
// ******************** END WARNING ********************
//#define ERROR_IPSEC_IKE_NEG_STATUS_END __MSABI_LONG(13884)

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type TIME_ZONE_INFORMATION = X_TIME_ZONE_INFORMATION /* timezoneapi.h:29:5 */
type PTIME_ZONE_INFORMATION = uintptr                /* timezoneapi.h:29:27 */
type LPTIME_ZONE_INFORMATION = uintptr               /* timezoneapi.h:29:51 */

type X_TIME_DYNAMIC_ZONE_INFORMATION = struct {
	FBias                        LONG
	FStandardName                [32]WCHAR
	FStandardDate                SYSTEMTIME
	FStandardBias                LONG
	FDaylightName                [32]WCHAR
	FDaylightDate                SYSTEMTIME
	FDaylightBias                LONG
	FTimeZoneKeyName             [128]WCHAR
	FDynamicDaylightTimeDisabled BOOLEAN
	F__ccgo_pad1                 [3]byte
} /* timezoneapi.h:31:11 */

type DYNAMIC_TIME_ZONE_INFORMATION = X_TIME_DYNAMIC_ZONE_INFORMATION /* timezoneapi.h:41:5 */
type PDYNAMIC_TIME_ZONE_INFORMATION = uintptr                        /* timezoneapi.h:41:35 */

type X_SYSTEM_POWER_STATUS = struct {
	FACLineStatus        BYTE
	FBatteryFlag         BYTE
	FBatteryLifePercent  BYTE
	FReserved1           BYTE
	FBatteryLifeTime     DWORD
	FBatteryFullLifeTime DWORD
} /* winbase.h:2571:11 */

type SYSTEM_POWER_STATUS = X_SYSTEM_POWER_STATUS /* winbase.h:2578:5 */
type LPSYSTEM_POWER_STATUS = uintptr             /* winbase.h:2578:25 */

type TagACTCTXA = struct {
	FcbSize                 ULONG
	FdwFlags                DWORD
	FlpSource               LPCSTR
	FwProcessorArchitecture USHORT
	FwLangId                LANGID
	F__ccgo_pad1            [4]byte
	FlpAssemblyDirectory    LPCSTR
	FlpResourceName         LPCSTR
	FlpApplicationName      LPCSTR
	FhModule                HMODULE
} /* winbase.h:2649:11 */

type ACTCTXA = TagACTCTXA /* winbase.h:2659:5 */
type PACTCTXA = uintptr   /* winbase.h:2659:13 */

type TagACTCTXW = struct {
	FcbSize                 ULONG
	FdwFlags                DWORD
	FlpSource               LPCWSTR
	FwProcessorArchitecture USHORT
	FwLangId                LANGID
	F__ccgo_pad1            [4]byte
	FlpAssemblyDirectory    LPCWSTR
	FlpResourceName         LPCWSTR
	FlpApplicationName      LPCWSTR
	FhModule                HMODULE
} /* winbase.h:2661:11 */

type ACTCTXW = TagACTCTXW /* winbase.h:2671:5 */
type PACTCTXW = uintptr   /* winbase.h:2671:13 */

type ACTCTX = ACTCTXA   /* winbase.h:2673:3 */
type PACTCTX = PACTCTXA /* winbase.h:2674:3 */

type PCACTCTXA = uintptr /* winbase.h:2676:25 */
type PCACTCTXW = uintptr /* winbase.h:2677:25 */

type PCACTCTX = PCACTCTXA /* winbase.h:2679:3 */

type TagACTCTX_SECTION_KEYED_DATA_2600 = struct {
	FcbSize                    ULONG
	FulDataFormatVersion       ULONG
	FlpData                    PVOID
	FulLength                  ULONG
	F__ccgo_pad1               [4]byte
	FlpSectionGlobalData       PVOID
	FulSectionGlobalDataLength ULONG
	F__ccgo_pad2               [4]byte
	FlpSectionBase             PVOID
	FulSectionTotalLength      ULONG
	F__ccgo_pad3               [4]byte
	FhActCtx                   HANDLE
	FulAssemblyRosterIndex     ULONG
	F__ccgo_pad4               [4]byte
} /* winbase.h:2693:11 */

type ACTCTX_SECTION_KEYED_DATA_2600 = TagACTCTX_SECTION_KEYED_DATA_2600 /* winbase.h:2704:5 */
type PACTCTX_SECTION_KEYED_DATA_2600 = uintptr                          /* winbase.h:2704:36 */

type PCACTCTX_SECTION_KEYED_DATA_2600 = uintptr /* winbase.h:2706:48 */

type TagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = struct {
	FlpInformation             PVOID
	FlpSectionBase             PVOID
	FulSectionLength           ULONG
	F__ccgo_pad1               [4]byte
	FlpSectionGlobalDataBase   PVOID
	FulSectionGlobalDataLength ULONG
	F__ccgo_pad2               [4]byte
} /* winbase.h:2708:11 */

type ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = TagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA /* winbase.h:2714:5 */
type PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = uintptr                                       /* winbase.h:2714:49 */

type PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = uintptr /* winbase.h:2716:61 */

type TagACTCTX_SECTION_KEYED_DATA = struct {
	FcbSize                    ULONG
	FulDataFormatVersion       ULONG
	FlpData                    PVOID
	FulLength                  ULONG
	F__ccgo_pad1               [4]byte
	FlpSectionGlobalData       PVOID
	FulSectionGlobalDataLength ULONG
	F__ccgo_pad2               [4]byte
	FlpSectionBase             PVOID
	FulSectionTotalLength      ULONG
	F__ccgo_pad3               [4]byte
	FhActCtx                   HANDLE
	FulAssemblyRosterIndex     ULONG
	FulFlags                   ULONG
	FAssemblyMetadata          ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA
} /* winbase.h:2718:11 */

type ACTCTX_SECTION_KEYED_DATA = TagACTCTX_SECTION_KEYED_DATA /* winbase.h:2731:5 */
type PACTCTX_SECTION_KEYED_DATA = uintptr                     /* winbase.h:2731:31 */

type PCACTCTX_SECTION_KEYED_DATA = uintptr /* winbase.h:2733:43 */

type X_ACTIVATION_CONTEXT_BASIC_INFORMATION = struct {
	FhActCtx     HANDLE
	FdwFlags     DWORD
	F__ccgo_pad1 [4]byte
} /* winbase.h:2746:11 */

type ACTIVATION_CONTEXT_BASIC_INFORMATION = X_ACTIVATION_CONTEXT_BASIC_INFORMATION /* winbase.h:2749:5 */
type PACTIVATION_CONTEXT_BASIC_INFORMATION = uintptr                               /* winbase.h:2749:42 */

type PCACTIVATION_CONTEXT_BASIC_INFORMATION = uintptr /* winbase.h:2751:62 */

type PQUERYACTCTXW_FUNC = uintptr /* winbase.h:2763:19 */

type APPLICATION_RECOVERY_CALLBACK = uintptr /* winbase.h:2783:17 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_DRAWPATRECT = struct {
	FptPosition POINT
	FptSize     POINT
	FwStyle     WORD
	FwPattern   WORD
} /* wingdi.h:224:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type DRAWPATRECT = X_DRAWPATRECT /* wingdi.h:229:5 */
type PDRAWPATRECT = uintptr      /* wingdi.h:229:17 */

type X_PSINJECTDATA = struct {
	FDataBytes      DWORD
	FInjectionPoint WORD
	FPageNumber     WORD
} /* wingdi.h:335:11 */

type PSINJECTDATA = X_PSINJECTDATA /* wingdi.h:339:5 */
type PPSINJECTDATA = uintptr       /* wingdi.h:339:18 */

type X_PSFEATURE_OUTPUT = struct {
	FbPageIndependent WINBOOL
	FbSetPageDevice   WINBOOL
} /* wingdi.h:393:11 */

type PSFEATURE_OUTPUT = X_PSFEATURE_OUTPUT /* wingdi.h:396:5 */
type PPSFEATURE_OUTPUT = uintptr           /* wingdi.h:396:22 */

type X_PSFEATURE_CUSTPAPER = struct {
	FlOrientation  LONG
	FlWidth        LONG
	FlHeight       LONG
	FlWidthOffset  LONG
	FlHeightOffset LONG
} /* wingdi.h:398:11 */

type PSFEATURE_CUSTPAPER = X_PSFEATURE_CUSTPAPER /* wingdi.h:404:5 */
type PPSFEATURE_CUSTPAPER = uintptr              /* wingdi.h:404:25 */

type TagXFORM = struct {
	FeM11 FLOAT
	FeM12 FLOAT
	FeM21 FLOAT
	FeM22 FLOAT
	FeDx  FLOAT
	FeDy  FLOAT
} /* wingdi.h:452:11 */

type XFORM = TagXFORM  /* wingdi.h:459:5 */
type PXFORM = uintptr  /* wingdi.h:459:11 */
type LPXFORM = uintptr /* wingdi.h:459:19 */

type TagBITMAP = struct {
	FbmType       LONG
	FbmWidth      LONG
	FbmHeight     LONG
	FbmWidthBytes LONG
	FbmPlanes     WORD
	FbmBitsPixel  WORD
	F__ccgo_pad1  [4]byte
	FbmBits       LPVOID
} /* wingdi.h:461:11 */

type BITMAP = TagBITMAP /* wingdi.h:469:5 */
type PBITMAP = uintptr  /* wingdi.h:469:12 */
type NPBITMAP = uintptr /* wingdi.h:469:21 */
type LPBITMAP = uintptr /* wingdi.h:469:31 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type TagRGBTRIPLE = struct {
	FrgbtBlue  BYTE
	FrgbtGreen BYTE
	FrgbtRed   BYTE
} /* wingdi.h:472:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type RGBTRIPLE = TagRGBTRIPLE /* wingdi.h:476:5 */
type PRGBTRIPLE = uintptr     /* wingdi.h:476:15 */
type NPRGBTRIPLE = uintptr    /* wingdi.h:476:27 */
type LPRGBTRIPLE = uintptr    /* wingdi.h:476:40 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagRGBQUAD = struct {
	FrgbBlue     BYTE
	FrgbGreen    BYTE
	FrgbRed      BYTE
	FrgbReserved BYTE
} /* wingdi.h:479:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type RGBQUAD = TagRGBQUAD /* wingdi.h:484:5 */

type LPRGBQUAD = uintptr /* wingdi.h:488:19 */

type LCSCSTYPE = LONG /* wingdi.h:501:16 */

type LCSGAMUTMATCH = LONG /* wingdi.h:504:16 */

type FXPT16DOT16 = int32     /* wingdi.h:528:20 */
type LPFXPT16DOT16 = uintptr /* wingdi.h:528:32 */
type FXPT2DOT30 = int32      /* wingdi.h:529:20 */
type LPFXPT2DOT30 = uintptr  /* wingdi.h:529:31 */

type TagCIEXYZ = struct {
	FciexyzX FXPT2DOT30
	FciexyzY FXPT2DOT30
	FciexyzZ FXPT2DOT30
} /* wingdi.h:531:11 */

type CIEXYZ = TagCIEXYZ /* wingdi.h:535:5 */
type LPCIEXYZ = uintptr /* wingdi.h:538:18 */
type TagICEXYZTRIPLE = struct {
	FciexyzRed   CIEXYZ
	FciexyzGreen CIEXYZ
	FciexyzBlue  CIEXYZ
} /* wingdi.h:541:11 */

type CIEXYZTRIPLE = TagICEXYZTRIPLE /* wingdi.h:545:5 */
type LPCIEXYZTRIPLE = uintptr       /* wingdi.h:548:24 */

type TagLOGCOLORSPACEA = struct {
	FlcsSignature  DWORD
	FlcsVersion    DWORD
	FlcsSize       DWORD
	FlcsCSType     LCSCSTYPE
	FlcsIntent     LCSGAMUTMATCH
	FlcsEndpoints  CIEXYZTRIPLE
	FlcsGammaRed   DWORD
	FlcsGammaGreen DWORD
	FlcsGammaBlue  DWORD
	FlcsFilename   [260]CHAR
} /* wingdi.h:552:11 */

type LOGCOLORSPACEA = TagLOGCOLORSPACEA /* wingdi.h:563:5 */
type LPLOGCOLORSPACEA = uintptr         /* wingdi.h:563:20 */

type TagLOGCOLORSPACEW = struct {
	FlcsSignature  DWORD
	FlcsVersion    DWORD
	FlcsSize       DWORD
	FlcsCSType     LCSCSTYPE
	FlcsIntent     LCSGAMUTMATCH
	FlcsEndpoints  CIEXYZTRIPLE
	FlcsGammaRed   DWORD
	FlcsGammaGreen DWORD
	FlcsGammaBlue  DWORD
	FlcsFilename   [260]WCHAR
} /* wingdi.h:565:11 */

type LOGCOLORSPACEW = TagLOGCOLORSPACEW /* wingdi.h:576:5 */
type LPLOGCOLORSPACEW = uintptr         /* wingdi.h:576:20 */

type LOGCOLORSPACE = LOGCOLORSPACEA     /* wingdi.h:578:3 */
type LPLOGCOLORSPACE = LPLOGCOLORSPACEA /* wingdi.h:579:3 */

type TagBITMAPCOREHEADER = struct {
	FbcSize     DWORD
	FbcWidth    WORD
	FbcHeight   WORD
	FbcPlanes   WORD
	FbcBitCount WORD
} /* wingdi.h:583:11 */

type BITMAPCOREHEADER = TagBITMAPCOREHEADER /* wingdi.h:589:5 */
type LPBITMAPCOREHEADER = uintptr           /* wingdi.h:589:22 */
type PBITMAPCOREHEADER = uintptr            /* wingdi.h:589:42 */

type TagBITMAPINFOHEADER = struct {
	FbiSize          DWORD
	FbiWidth         LONG
	FbiHeight        LONG
	FbiPlanes        WORD
	FbiBitCount      WORD
	FbiCompression   DWORD
	FbiSizeImage     DWORD
	FbiXPelsPerMeter LONG
	FbiYPelsPerMeter LONG
	FbiClrUsed       DWORD
	FbiClrImportant  DWORD
} /* wingdi.h:593:11 */

type BITMAPINFOHEADER = TagBITMAPINFOHEADER /* wingdi.h:605:5 */
type LPBITMAPINFOHEADER = uintptr           /* wingdi.h:605:22 */
type PBITMAPINFOHEADER = uintptr            /* wingdi.h:605:42 */

type BITMAPV4HEADER = struct {
	FbV4Size          DWORD
	FbV4Width         LONG
	FbV4Height        LONG
	FbV4Planes        WORD
	FbV4BitCount      WORD
	FbV4V4Compression DWORD
	FbV4SizeImage     DWORD
	FbV4XPelsPerMeter LONG
	FbV4YPelsPerMeter LONG
	FbV4ClrUsed       DWORD
	FbV4ClrImportant  DWORD
	FbV4RedMask       DWORD
	FbV4GreenMask     DWORD
	FbV4BlueMask      DWORD
	FbV4AlphaMask     DWORD
	FbV4CSType        DWORD
	FbV4Endpoints     CIEXYZTRIPLE
	FbV4GammaRed      DWORD
	FbV4GammaGreen    DWORD
	FbV4GammaBlue     DWORD
}                               /* wingdi.h:630:5 */
type LPBITMAPV4HEADER = uintptr /* wingdi.h:630:20 */
type PBITMAPV4HEADER = uintptr  /* wingdi.h:630:38 */

type BITMAPV5HEADER = struct {
	FbV5Size          DWORD
	FbV5Width         LONG
	FbV5Height        LONG
	FbV5Planes        WORD
	FbV5BitCount      WORD
	FbV5Compression   DWORD
	FbV5SizeImage     DWORD
	FbV5XPelsPerMeter LONG
	FbV5YPelsPerMeter LONG
	FbV5ClrUsed       DWORD
	FbV5ClrImportant  DWORD
	FbV5RedMask       DWORD
	FbV5GreenMask     DWORD
	FbV5BlueMask      DWORD
	FbV5AlphaMask     DWORD
	FbV5CSType        DWORD
	FbV5Endpoints     CIEXYZTRIPLE
	FbV5GammaRed      DWORD
	FbV5GammaGreen    DWORD
	FbV5GammaBlue     DWORD
	FbV5Intent        DWORD
	FbV5ProfileData   DWORD
	FbV5ProfileSize   DWORD
	FbV5Reserved      DWORD
}                               /* wingdi.h:657:5 */
type LPBITMAPV5HEADER = uintptr /* wingdi.h:657:20 */
type PBITMAPV5HEADER = uintptr  /* wingdi.h:657:38 */

type TagBITMAPINFO = struct {
	FbmiHeader BITMAPINFOHEADER
	FbmiColors [1]RGBQUAD
} /* wingdi.h:671:11 */

type BITMAPINFO = TagBITMAPINFO /* wingdi.h:674:5 */
type LPBITMAPINFO = uintptr     /* wingdi.h:674:16 */
type PBITMAPINFO = uintptr      /* wingdi.h:674:30 */

type TagBITMAPCOREINFO = struct {
	FbmciHeader  BITMAPCOREHEADER
	FbmciColors  [1]RGBTRIPLE
	F__ccgo_pad1 [1]byte
} /* wingdi.h:678:11 */

type BITMAPCOREINFO = TagBITMAPCOREINFO /* wingdi.h:681:5 */
type LPBITMAPCOREINFO = uintptr         /* wingdi.h:681:20 */
type PBITMAPCOREINFO = uintptr          /* wingdi.h:681:38 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type TagBITMAPFILEHEADER = struct {
	FbfType      WORD
	F__ccgo_pad1 [2]byte
	FbfSize      DWORD
	FbfReserved1 WORD
	FbfReserved2 WORD
	FbfOffBits   DWORD
} /* wingdi.h:684:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type BITMAPFILEHEADER = TagBITMAPFILEHEADER /* wingdi.h:690:5 */
type LPBITMAPFILEHEADER = uintptr           /* wingdi.h:690:22 */
type PBITMAPFILEHEADER = uintptr            /* wingdi.h:690:42 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagFONTSIGNATURE = struct {
	FfsUsb [4]DWORD
	FfsCsb [2]DWORD
} /* wingdi.h:699:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type FONTSIGNATURE = TagFONTSIGNATURE /* wingdi.h:702:5 */
type PFONTSIGNATURE = uintptr         /* wingdi.h:702:19 */
type LPFONTSIGNATURE = uintptr        /* wingdi.h:702:35 */

type TagCHARSETINFO = struct {
	FciCharset UINT
	FciACP     UINT
	Ffs        FONTSIGNATURE
} /* wingdi.h:704:11 */

type CHARSETINFO = TagCHARSETINFO /* wingdi.h:708:5 */
type PCHARSETINFO = uintptr       /* wingdi.h:708:17 */
type NPCHARSETINFO = uintptr      /* wingdi.h:708:31 */
type LPCHARSETINFO = uintptr      /* wingdi.h:708:46 */

type TagLOCALESIGNATURE = struct {
	FlsUsb          [4]DWORD
	FlsCsbDefault   [2]DWORD
	FlsCsbSupported [2]DWORD
} /* wingdi.h:717:11 */

type LOCALESIGNATURE = TagLOCALESIGNATURE /* wingdi.h:721:5 */
type PLOCALESIGNATURE = uintptr           /* wingdi.h:721:21 */
type LPLOCALESIGNATURE = uintptr          /* wingdi.h:721:39 */

type TagHANDLETABLE = struct{ FobjectHandle [1]HGDIOBJ } /* wingdi.h:727:11 */

type HANDLETABLE = TagHANDLETABLE /* wingdi.h:729:5 */
type PHANDLETABLE = uintptr       /* wingdi.h:729:17 */
type LPHANDLETABLE = uintptr      /* wingdi.h:729:31 */

type TagMETARECORD = struct {
	FrdSize     DWORD
	FrdFunction WORD
	FrdParm     [1]WORD
} /* wingdi.h:731:11 */

type METARECORD = TagMETARECORD /* wingdi.h:735:5 */
type PMETARECORD = uintptr      /* wingdi.h:738:42 */
type LPMETARECORD = uintptr     /* wingdi.h:741:42 */

type TagMETAFILEPICT = struct {
	Fmm          LONG
	FxExt        LONG
	FyExt        LONG
	F__ccgo_pad1 [4]byte
	FhMF         HMETAFILE
} /* wingdi.h:743:11 */

type METAFILEPICT = TagMETAFILEPICT /* wingdi.h:748:5 */
type LPMETAFILEPICT = uintptr       /* wingdi.h:748:18 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type TagMETAHEADER = struct {
	FmtType         WORD
	FmtHeaderSize   WORD
	FmtVersion      WORD
	F__ccgo_pad1    [2]byte
	FmtSize         DWORD
	FmtNoObjects    WORD
	F__ccgo_pad2    [2]byte
	FmtMaxRecord    DWORD
	FmtNoParameters WORD
	F__ccgo_pad3    [2]byte
} /* wingdi.h:753:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type METAHEADER = TagMETAHEADER /* wingdi.h:761:5 */
type PMETAHEADER = uintptr      /* wingdi.h:762:42 */
type LPMETAHEADER = uintptr     /* wingdi.h:763:42 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagENHMETARECORD = struct {
	FiType DWORD
	FnSize DWORD
	FdParm [1]DWORD
} /* wingdi.h:769:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type ENHMETARECORD = TagENHMETARECORD /* wingdi.h:773:5 */
type PENHMETARECORD = uintptr         /* wingdi.h:773:19 */
type LPENHMETARECORD = uintptr        /* wingdi.h:773:35 */

type TagENHMETAHEADER = struct {
	FiType          DWORD
	FnSize          DWORD
	FrclBounds      RECTL
	FrclFrame       RECTL
	FdSignature     DWORD
	FnVersion       DWORD
	FnBytes         DWORD
	FnRecords       DWORD
	FnHandles       WORD
	FsReserved      WORD
	FnDescription   DWORD
	FoffDescription DWORD
	FnPalEntries    DWORD
	FszlDevice      SIZEL
	FszlMillimeters SIZEL
	FcbPixelFormat  DWORD
	FoffPixelFormat DWORD
	FbOpenGL        DWORD
	FszlMicrometers SIZEL
} /* wingdi.h:775:11 */

type ENHMETAHEADER = TagENHMETAHEADER /* wingdi.h:795:5 */
type PENHMETAHEADER = uintptr         /* wingdi.h:795:19 */
type LPENHMETAHEADER = uintptr        /* wingdi.h:795:35 */

type BCHAR = BYTE /* wingdi.h:809:16 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagTEXTMETRICA = struct {
	FtmHeight           LONG
	FtmAscent           LONG
	FtmDescent          LONG
	FtmInternalLeading  LONG
	FtmExternalLeading  LONG
	FtmAveCharWidth     LONG
	FtmMaxCharWidth     LONG
	FtmWeight           LONG
	FtmOverhang         LONG
	FtmDigitizedAspectX LONG
	FtmDigitizedAspectY LONG
	FtmFirstChar        BYTE
	FtmLastChar         BYTE
	FtmDefaultChar      BYTE
	FtmBreakChar        BYTE
	FtmItalic           BYTE
	FtmUnderlined       BYTE
	FtmStruckOut        BYTE
	FtmPitchAndFamily   BYTE
	FtmCharSet          BYTE
	F__ccgo_pad1        [3]byte
} /* wingdi.h:818:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TEXTMETRICA = TagTEXTMETRICA /* wingdi.h:839:5 */
type PTEXTMETRICA = uintptr       /* wingdi.h:839:17 */
type NPTEXTMETRICA = uintptr      /* wingdi.h:839:31 */
type LPTEXTMETRICA = uintptr      /* wingdi.h:839:46 */

type TagTEXTMETRICW = struct {
	FtmHeight           LONG
	FtmAscent           LONG
	FtmDescent          LONG
	FtmInternalLeading  LONG
	FtmExternalLeading  LONG
	FtmAveCharWidth     LONG
	FtmMaxCharWidth     LONG
	FtmWeight           LONG
	FtmOverhang         LONG
	FtmDigitizedAspectX LONG
	FtmDigitizedAspectY LONG
	FtmFirstChar        WCHAR
	FtmLastChar         WCHAR
	FtmDefaultChar      WCHAR
	FtmBreakChar        WCHAR
	FtmItalic           BYTE
	FtmUnderlined       BYTE
	FtmStruckOut        BYTE
	FtmPitchAndFamily   BYTE
	FtmCharSet          BYTE
	F__ccgo_pad1        [3]byte
} /* wingdi.h:841:11 */

type TEXTMETRICW = TagTEXTMETRICW /* wingdi.h:862:5 */
type PTEXTMETRICW = uintptr       /* wingdi.h:862:17 */
type NPTEXTMETRICW = uintptr      /* wingdi.h:862:31 */
type LPTEXTMETRICW = uintptr      /* wingdi.h:862:46 */

type TEXTMETRIC = TEXTMETRICA     /* wingdi.h:864:3 */
type PTEXTMETRIC = PTEXTMETRICA   /* wingdi.h:865:3 */
type NPTEXTMETRIC = NPTEXTMETRICA /* wingdi.h:866:3 */
type LPTEXTMETRIC = LPTEXTMETRICA /* wingdi.h:867:3 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type TagNEWTEXTMETRICA = struct {
	FtmHeight           LONG
	FtmAscent           LONG
	FtmDescent          LONG
	FtmInternalLeading  LONG
	FtmExternalLeading  LONG
	FtmAveCharWidth     LONG
	FtmMaxCharWidth     LONG
	FtmWeight           LONG
	FtmOverhang         LONG
	FtmDigitizedAspectX LONG
	FtmDigitizedAspectY LONG
	FtmFirstChar        BYTE
	FtmLastChar         BYTE
	FtmDefaultChar      BYTE
	FtmBreakChar        BYTE
	FtmItalic           BYTE
	FtmUnderlined       BYTE
	FtmStruckOut        BYTE
	FtmPitchAndFamily   BYTE
	FtmCharSet          BYTE
	F__ccgo_pad1        [3]byte
	FntmFlags           DWORD
	FntmSizeEM          UINT
	FntmCellHeight      UINT
	FntmAvgWidth        UINT
} /* wingdi.h:885:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type NEWTEXTMETRICA = TagNEWTEXTMETRICA /* wingdi.h:910:5 */
type PNEWTEXTMETRICA = uintptr          /* wingdi.h:910:20 */
type NPNEWTEXTMETRICA = uintptr         /* wingdi.h:910:37 */
type LPNEWTEXTMETRICA = uintptr         /* wingdi.h:910:55 */

type TagNEWTEXTMETRICW = struct {
	FtmHeight           LONG
	FtmAscent           LONG
	FtmDescent          LONG
	FtmInternalLeading  LONG
	FtmExternalLeading  LONG
	FtmAveCharWidth     LONG
	FtmMaxCharWidth     LONG
	FtmWeight           LONG
	FtmOverhang         LONG
	FtmDigitizedAspectX LONG
	FtmDigitizedAspectY LONG
	FtmFirstChar        WCHAR
	FtmLastChar         WCHAR
	FtmDefaultChar      WCHAR
	FtmBreakChar        WCHAR
	FtmItalic           BYTE
	FtmUnderlined       BYTE
	FtmStruckOut        BYTE
	FtmPitchAndFamily   BYTE
	FtmCharSet          BYTE
	F__ccgo_pad1        [3]byte
	FntmFlags           DWORD
	FntmSizeEM          UINT
	FntmCellHeight      UINT
	FntmAvgWidth        UINT
} /* wingdi.h:912:11 */

type NEWTEXTMETRICW = TagNEWTEXTMETRICW /* wingdi.h:937:5 */
type PNEWTEXTMETRICW = uintptr          /* wingdi.h:937:20 */
type NPNEWTEXTMETRICW = uintptr         /* wingdi.h:937:37 */
type LPNEWTEXTMETRICW = uintptr         /* wingdi.h:937:55 */

type NEWTEXTMETRIC = NEWTEXTMETRICA     /* wingdi.h:939:3 */
type PNEWTEXTMETRIC = PNEWTEXTMETRICA   /* wingdi.h:940:3 */
type NPNEWTEXTMETRIC = NPNEWTEXTMETRICA /* wingdi.h:941:3 */
type LPNEWTEXTMETRIC = LPNEWTEXTMETRICA /* wingdi.h:942:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagNEWTEXTMETRICEXA = struct {
	FntmTm      NEWTEXTMETRICA
	FntmFontSig FONTSIGNATURE
} /* wingdi.h:946:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type NEWTEXTMETRICEXA = TagNEWTEXTMETRICEXA /* wingdi.h:949:5 */

type TagNEWTEXTMETRICEXW = struct {
	FntmTm      NEWTEXTMETRICW
	FntmFontSig FONTSIGNATURE
} /* wingdi.h:951:11 */

type NEWTEXTMETRICEXW = TagNEWTEXTMETRICEXW /* wingdi.h:954:5 */

type NEWTEXTMETRICEX = NEWTEXTMETRICEXA /* wingdi.h:956:3 */

type TagPELARRAY = struct {
	FpaXCount    LONG
	FpaYCount    LONG
	FpaXExt      LONG
	FpaYExt      LONG
	FpaRGBs      BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:961:11 */

type PELARRAY = TagPELARRAY /* wingdi.h:967:5 */
type PPELARRAY = uintptr    /* wingdi.h:967:14 */
type NPPELARRAY = uintptr   /* wingdi.h:967:25 */
type LPPELARRAY = uintptr   /* wingdi.h:967:37 */
type TagLOGBRUSH = struct {
	FlbStyle UINT
	FlbColor COLORREF
	FlbHatch ULONG_PTR
} /* wingdi.h:970:11 */

type LOGBRUSH = TagLOGBRUSH /* wingdi.h:974:5 */
type PLOGBRUSH = uintptr    /* wingdi.h:974:14 */
type NPLOGBRUSH = uintptr   /* wingdi.h:974:25 */
type LPLOGBRUSH = uintptr   /* wingdi.h:974:37 */

type TagLOGBRUSH32 = struct {
	FlbStyle UINT
	FlbColor COLORREF
	FlbHatch ULONG
} /* wingdi.h:976:11 */

type LOGBRUSH32 = TagLOGBRUSH32 /* wingdi.h:980:5 */
type PLOGBRUSH32 = uintptr      /* wingdi.h:980:16 */
type NPLOGBRUSH32 = uintptr     /* wingdi.h:980:29 */
type LPLOGBRUSH32 = uintptr     /* wingdi.h:980:43 */
type PATTERN = LOGBRUSH         /* wingdi.h:983:20 */
type PPATTERN = uintptr         /* wingdi.h:984:19 */
type NPPATTERN = uintptr        /* wingdi.h:985:19 */
type LPPATTERN = uintptr        /* wingdi.h:986:19 */

type TagLOGPEN = struct {
	FlopnStyle UINT
	FlopnWidth POINT
	FlopnColor COLORREF
} /* wingdi.h:990:11 */

type LOGPEN = TagLOGPEN /* wingdi.h:994:5 */
type PLOGPEN = uintptr  /* wingdi.h:994:12 */
type NPLOGPEN = uintptr /* wingdi.h:994:21 */
type LPLOGPEN = uintptr /* wingdi.h:994:31 */

type TagEXTLOGPEN = struct {
	FelpPenStyle   DWORD
	FelpWidth      DWORD
	FelpBrushStyle UINT
	FelpColor      COLORREF
	FelpHatch      ULONG_PTR
	FelpNumEntries DWORD
	FelpStyleEntry [1]DWORD
} /* wingdi.h:998:11 */

type EXTLOGPEN = TagEXTLOGPEN /* wingdi.h:1006:5 */
type PEXTLOGPEN = uintptr     /* wingdi.h:1006:15 */
type NPEXTLOGPEN = uintptr    /* wingdi.h:1006:27 */
type LPEXTLOGPEN = uintptr    /* wingdi.h:1006:40 */

type TagEXTLOGPEN32 = struct {
	FelpPenStyle   DWORD
	FelpWidth      DWORD
	FelpBrushStyle UINT
	FelpColor      COLORREF
	FelpHatch      ULONG
	FelpNumEntries DWORD
	FelpStyleEntry [1]DWORD
} /* wingdi.h:1010:11 */

type EXTLOGPEN32 = TagEXTLOGPEN32 /* wingdi.h:1018:5 */
type PEXTLOGPEN32 = uintptr       /* wingdi.h:1018:18 */
type NPEXTLOGPEN32 = uintptr      /* wingdi.h:1018:33 */
type LPEXTLOGPEN32 = uintptr      /* wingdi.h:1018:49 */

type TagPALETTEENTRY = struct {
	FpeRed   BYTE
	FpeGreen BYTE
	FpeBlue  BYTE
	FpeFlags BYTE
} /* wingdi.h:1022:11 */

type PALETTEENTRY = TagPALETTEENTRY /* wingdi.h:1027:5 */
type PPALETTEENTRY = uintptr        /* wingdi.h:1027:18 */
type LPPALETTEENTRY = uintptr       /* wingdi.h:1027:33 */

type TagLOGPALETTE = struct {
	FpalVersion    WORD
	FpalNumEntries WORD
	FpalPalEntry   [1]PALETTEENTRY
} /* wingdi.h:1032:11 */

type LOGPALETTE = TagLOGPALETTE /* wingdi.h:1036:5 */
type PLOGPALETTE = uintptr      /* wingdi.h:1036:16 */
type NPLOGPALETTE = uintptr     /* wingdi.h:1036:29 */
type LPLOGPALETTE = uintptr     /* wingdi.h:1036:43 */

type TagLOGFONTA = struct {
	FlfHeight         LONG
	FlfWidth          LONG
	FlfEscapement     LONG
	FlfOrientation    LONG
	FlfWeight         LONG
	FlfItalic         BYTE
	FlfUnderline      BYTE
	FlfStrikeOut      BYTE
	FlfCharSet        BYTE
	FlfOutPrecision   BYTE
	FlfClipPrecision  BYTE
	FlfQuality        BYTE
	FlfPitchAndFamily BYTE
	FlfFaceName       [32]CHAR
} /* wingdi.h:1043:11 */

type LOGFONTA = TagLOGFONTA /* wingdi.h:1058:5 */
type PLOGFONTA = uintptr    /* wingdi.h:1058:14 */
type NPLOGFONTA = uintptr   /* wingdi.h:1058:25 */
type LPLOGFONTA = uintptr   /* wingdi.h:1058:37 */

type TagLOGFONTW = struct {
	FlfHeight         LONG
	FlfWidth          LONG
	FlfEscapement     LONG
	FlfOrientation    LONG
	FlfWeight         LONG
	FlfItalic         BYTE
	FlfUnderline      BYTE
	FlfStrikeOut      BYTE
	FlfCharSet        BYTE
	FlfOutPrecision   BYTE
	FlfClipPrecision  BYTE
	FlfQuality        BYTE
	FlfPitchAndFamily BYTE
	FlfFaceName       [32]WCHAR
} /* wingdi.h:1060:11 */

type LOGFONTW = TagLOGFONTW /* wingdi.h:1075:5 */
type PLOGFONTW = uintptr    /* wingdi.h:1075:14 */
type NPLOGFONTW = uintptr   /* wingdi.h:1075:25 */
type LPLOGFONTW = uintptr   /* wingdi.h:1075:37 */

type LOGFONT = LOGFONTA     /* wingdi.h:1077:3 */
type PLOGFONT = PLOGFONTA   /* wingdi.h:1078:3 */
type NPLOGFONT = NPLOGFONTA /* wingdi.h:1079:3 */
type LPLOGFONT = LPLOGFONTA /* wingdi.h:1080:3 */

type TagENUMLOGFONTA = struct {
	FelfLogFont  LOGFONTA
	FelfFullName [64]BYTE
	FelfStyle    [32]BYTE
} /* wingdi.h:1086:11 */

type ENUMLOGFONTA = TagENUMLOGFONTA /* wingdi.h:1090:5 */
type LPENUMLOGFONTA = uintptr       /* wingdi.h:1090:18 */

type TagENUMLOGFONTW = struct {
	FelfLogFont  LOGFONTW
	FelfFullName [64]WCHAR
	FelfStyle    [32]WCHAR
} /* wingdi.h:1092:11 */

type ENUMLOGFONTW = TagENUMLOGFONTW /* wingdi.h:1096:5 */
type LPENUMLOGFONTW = uintptr       /* wingdi.h:1096:18 */

type ENUMLOGFONT = ENUMLOGFONTA     /* wingdi.h:1098:3 */
type LPENUMLOGFONT = LPENUMLOGFONTA /* wingdi.h:1099:3 */

type TagENUMLOGFONTEXA = struct {
	FelfLogFont  LOGFONTA
	FelfFullName [64]BYTE
	FelfStyle    [32]BYTE
	FelfScript   [32]BYTE
} /* wingdi.h:1101:11 */

type ENUMLOGFONTEXA = TagENUMLOGFONTEXA /* wingdi.h:1106:5 */
type LPENUMLOGFONTEXA = uintptr         /* wingdi.h:1106:20 */

type TagENUMLOGFONTEXW = struct {
	FelfLogFont  LOGFONTW
	FelfFullName [64]WCHAR
	FelfStyle    [32]WCHAR
	FelfScript   [32]WCHAR
} /* wingdi.h:1108:11 */

type ENUMLOGFONTEXW = TagENUMLOGFONTEXW /* wingdi.h:1113:5 */
type LPENUMLOGFONTEXW = uintptr         /* wingdi.h:1113:20 */

type ENUMLOGFONTEX = ENUMLOGFONTEXA     /* wingdi.h:1115:3 */
type LPENUMLOGFONTEX = LPENUMLOGFONTEXA /* wingdi.h:1116:3 */

type TagPANOSE = struct {
	FbFamilyType      BYTE
	FbSerifStyle      BYTE
	FbWeight          BYTE
	FbProportion      BYTE
	FbContrast        BYTE
	FbStrokeVariation BYTE
	FbArmStyle        BYTE
	FbLetterform      BYTE
	FbMidline         BYTE
	FbXHeight         BYTE
} /* wingdi.h:1237:11 */

type PANOSE = TagPANOSE /* wingdi.h:1248:5 */
type LPPANOSE = uintptr /* wingdi.h:1248:12 */

type TagEXTLOGFONTA = struct {
	FelfLogFont   LOGFONTA
	FelfFullName  [64]BYTE
	FelfStyle     [32]BYTE
	FelfVersion   DWORD
	FelfStyleSize DWORD
	FelfMatch     DWORD
	FelfReserved  DWORD
	FelfVendorId  [4]BYTE
	FelfCulture   DWORD
	FelfPanose    PANOSE
	F__ccgo_pad1  [2]byte
} /* wingdi.h:1358:11 */

type EXTLOGFONTA = TagEXTLOGFONTA /* wingdi.h:1369:5 */
type PEXTLOGFONTA = uintptr       /* wingdi.h:1369:17 */
type NPEXTLOGFONTA = uintptr      /* wingdi.h:1369:31 */
type LPEXTLOGFONTA = uintptr      /* wingdi.h:1369:46 */

type TagEXTLOGFONTW = struct {
	FelfLogFont   LOGFONTW
	FelfFullName  [64]WCHAR
	FelfStyle     [32]WCHAR
	FelfVersion   DWORD
	FelfStyleSize DWORD
	FelfMatch     DWORD
	FelfReserved  DWORD
	FelfVendorId  [4]BYTE
	FelfCulture   DWORD
	FelfPanose    PANOSE
	F__ccgo_pad1  [2]byte
} /* wingdi.h:1371:11 */

type EXTLOGFONTW = TagEXTLOGFONTW /* wingdi.h:1382:5 */
type PEXTLOGFONTW = uintptr       /* wingdi.h:1382:17 */
type NPEXTLOGFONTW = uintptr      /* wingdi.h:1382:31 */
type LPEXTLOGFONTW = uintptr      /* wingdi.h:1382:46 */

type EXTLOGFONT = EXTLOGFONTA     /* wingdi.h:1384:3 */
type PEXTLOGFONT = PEXTLOGFONTA   /* wingdi.h:1385:3 */
type NPEXTLOGFONT = NPEXTLOGFONTA /* wingdi.h:1386:3 */
type LPEXTLOGFONT = LPEXTLOGFONTA /* wingdi.h:1387:3 */

type X_devicemodeA = struct {
	FdmDeviceName    [32]BYTE
	FdmSpecVersion   WORD
	FdmDriverVersion WORD
	FdmSize          WORD
	FdmDriverExtra   WORD
	FdmFields        DWORD
	F__44            struct {
		F__ccgo_pad1 [0]uint32
		F__0         struct {
			FdmOrientation   int16
			FdmPaperSize     int16
			FdmPaperLength   int16
			FdmPaperWidth    int16
			FdmScale         int16
			FdmCopies        int16
			FdmDefaultSource int16
			FdmPrintQuality  int16
		}
	}
	FdmColor            int16
	FdmDuplex           int16
	FdmYResolution      int16
	FdmTTOption         int16
	FdmCollate          int16
	FdmFormName         [32]BYTE
	FdmLogPixels        WORD
	FdmBitsPerPel       DWORD
	FdmPelsWidth        DWORD
	FdmPelsHeight       DWORD
	F__116              struct{ FdmDisplayFlags DWORD }
	FdmDisplayFrequency DWORD
	FdmICMMethod        DWORD
	FdmICMIntent        DWORD
	FdmMediaType        DWORD
	FdmDitherType       DWORD
	FdmReserved1        DWORD
	FdmReserved2        DWORD
	FdmPanningWidth     DWORD
	FdmPanningHeight    DWORD
} /* wingdi.h:1671:11 */

type DEVMODEA = X_devicemodeA /* wingdi.h:1718:5 */
type PDEVMODEA = uintptr      /* wingdi.h:1718:14 */
type NPDEVMODEA = uintptr     /* wingdi.h:1718:25 */
type LPDEVMODEA = uintptr     /* wingdi.h:1718:37 */

type X_devicemodeW = struct {
	FdmDeviceName    [32]WCHAR
	FdmSpecVersion   WORD
	FdmDriverVersion WORD
	FdmSize          WORD
	FdmDriverExtra   WORD
	FdmFields        DWORD
	F__76            struct {
		F__ccgo_pad1 [0]uint32
		F__0         struct {
			FdmOrientation   int16
			FdmPaperSize     int16
			FdmPaperLength   int16
			FdmPaperWidth    int16
			FdmScale         int16
			FdmCopies        int16
			FdmDefaultSource int16
			FdmPrintQuality  int16
		}
	}
	FdmColor            int16
	FdmDuplex           int16
	FdmYResolution      int16
	FdmTTOption         int16
	FdmCollate          int16
	FdmFormName         [32]WCHAR
	FdmLogPixels        WORD
	FdmBitsPerPel       DWORD
	FdmPelsWidth        DWORD
	FdmPelsHeight       DWORD
	F__180              struct{ FdmDisplayFlags DWORD }
	FdmDisplayFrequency DWORD
	FdmICMMethod        DWORD
	FdmICMIntent        DWORD
	FdmMediaType        DWORD
	FdmDitherType       DWORD
	FdmReserved1        DWORD
	FdmReserved2        DWORD
	FdmPanningWidth     DWORD
	FdmPanningHeight    DWORD
} /* wingdi.h:1720:11 */

type DEVMODEW = X_devicemodeW /* wingdi.h:1767:5 */
type PDEVMODEW = uintptr      /* wingdi.h:1767:14 */
type NPDEVMODEW = uintptr     /* wingdi.h:1767:25 */
type LPDEVMODEW = uintptr     /* wingdi.h:1767:37 */

type DEVMODE = DEVMODEA     /* wingdi.h:1769:3 */
type PDEVMODE = PDEVMODEA   /* wingdi.h:1770:3 */
type NPDEVMODE = NPDEVMODEA /* wingdi.h:1771:3 */
type LPDEVMODE = LPDEVMODEA /* wingdi.h:1772:3 */

type X_DISPLAY_DEVICEA = struct {
	Fcb           DWORD
	FDeviceName   [32]CHAR
	FDeviceString [128]CHAR
	FStateFlags   DWORD
	FDeviceID     [128]CHAR
	FDeviceKey    [128]CHAR
} /* wingdi.h:2023:11 */

type DISPLAY_DEVICEA = X_DISPLAY_DEVICEA /* wingdi.h:2030:5 */
type PDISPLAY_DEVICEA = uintptr          /* wingdi.h:2030:21 */
type LPDISPLAY_DEVICEA = uintptr         /* wingdi.h:2030:39 */

type X_DISPLAY_DEVICEW = struct {
	Fcb           DWORD
	FDeviceName   [32]WCHAR
	FDeviceString [128]WCHAR
	FStateFlags   DWORD
	FDeviceID     [128]WCHAR
	FDeviceKey    [128]WCHAR
} /* wingdi.h:2032:11 */

type DISPLAY_DEVICEW = X_DISPLAY_DEVICEW /* wingdi.h:2039:5 */
type PDISPLAY_DEVICEW = uintptr          /* wingdi.h:2039:21 */
type LPDISPLAY_DEVICEW = uintptr         /* wingdi.h:2039:39 */

type DISPLAY_DEVICE = DISPLAY_DEVICEA     /* wingdi.h:2041:3 */
type PDISPLAY_DEVICE = PDISPLAY_DEVICEA   /* wingdi.h:2042:3 */
type LPDISPLAY_DEVICE = LPDISPLAY_DEVICEA /* wingdi.h:2043:3 */

type X_RGNDATAHEADER = struct {
	FdwSize   DWORD
	FiType    DWORD
	FnCount   DWORD
	FnRgnSize DWORD
	FrcBound  RECT
} /* wingdi.h:2422:11 */

type RGNDATAHEADER = X_RGNDATAHEADER /* wingdi.h:2428:5 */
type PRGNDATAHEADER = uintptr        /* wingdi.h:2428:19 */

type X_RGNDATA = struct {
	Frdh         RGNDATAHEADER
	FBuffer      [1]int8
	F__ccgo_pad1 [3]byte
} /* wingdi.h:2430:11 */

type RGNDATA = X_RGNDATA /* wingdi.h:2433:5 */
type PRGNDATA = uintptr  /* wingdi.h:2433:13 */
type NPRGNDATA = uintptr /* wingdi.h:2433:23 */
type LPRGNDATA = uintptr /* wingdi.h:2433:34 */

type X_ABC = struct {
	FabcA int32
	FabcB UINT
	FabcC int32
} /* wingdi.h:2439:11 */

type ABC = X_ABC     /* wingdi.h:2443:5 */
type PABC = uintptr  /* wingdi.h:2443:9 */
type NPABC = uintptr /* wingdi.h:2443:15 */
type LPABC = uintptr /* wingdi.h:2443:22 */

type X_ABCFLOAT = struct {
	FabcfA FLOAT
	FabcfB FLOAT
	FabcfC FLOAT
} /* wingdi.h:2445:11 */

type ABCFLOAT = X_ABCFLOAT /* wingdi.h:2449:5 */
type PABCFLOAT = uintptr   /* wingdi.h:2449:14 */
type NPABCFLOAT = uintptr  /* wingdi.h:2449:25 */
type LPABCFLOAT = uintptr  /* wingdi.h:2449:37 */

type X_OUTLINETEXTMETRICA = struct {
	FotmSize                UINT
	FotmTextMetrics         TEXTMETRICA
	FotmFiller              BYTE
	FotmPanoseNumber        PANOSE
	F__ccgo_pad1            [1]byte
	FotmfsSelection         UINT
	FotmfsType              UINT
	FotmsCharSlopeRise      int32
	FotmsCharSlopeRun       int32
	FotmItalicAngle         int32
	FotmEMSquare            UINT
	FotmAscent              int32
	FotmDescent             int32
	FotmLineGap             UINT
	FotmsCapEmHeight        UINT
	FotmsXHeight            UINT
	FotmrcFontBox           RECT
	FotmMacAscent           int32
	FotmMacDescent          int32
	FotmMacLineGap          UINT
	FotmusMinimumPPEM       UINT
	FotmptSubscriptSize     POINT
	FotmptSubscriptOffset   POINT
	FotmptSuperscriptSize   POINT
	FotmptSuperscriptOffset POINT
	FotmsStrikeoutSize      UINT
	FotmsStrikeoutPosition  int32
	FotmsUnderscoreSize     int32
	FotmsUnderscorePosition int32
	F__ccgo_pad2            [4]byte
	FotmpFamilyName         PSTR
	FotmpFaceName           PSTR
	FotmpStyleName          PSTR
	FotmpFullName           PSTR
} /* wingdi.h:2455:11 */

type OUTLINETEXTMETRICA = X_OUTLINETEXTMETRICA /* wingdi.h:2488:5 */
type POUTLINETEXTMETRICA = uintptr             /* wingdi.h:2488:24 */
type NPOUTLINETEXTMETRICA = uintptr            /* wingdi.h:2488:45 */
type LPOUTLINETEXTMETRICA = uintptr            /* wingdi.h:2488:67 */

type X_OUTLINETEXTMETRICW = struct {
	FotmSize                UINT
	FotmTextMetrics         TEXTMETRICW
	FotmFiller              BYTE
	FotmPanoseNumber        PANOSE
	F__ccgo_pad1            [1]byte
	FotmfsSelection         UINT
	FotmfsType              UINT
	FotmsCharSlopeRise      int32
	FotmsCharSlopeRun       int32
	FotmItalicAngle         int32
	FotmEMSquare            UINT
	FotmAscent              int32
	FotmDescent             int32
	FotmLineGap             UINT
	FotmsCapEmHeight        UINT
	FotmsXHeight            UINT
	FotmrcFontBox           RECT
	FotmMacAscent           int32
	FotmMacDescent          int32
	FotmMacLineGap          UINT
	FotmusMinimumPPEM       UINT
	FotmptSubscriptSize     POINT
	FotmptSubscriptOffset   POINT
	FotmptSuperscriptSize   POINT
	FotmptSuperscriptOffset POINT
	FotmsStrikeoutSize      UINT
	FotmsStrikeoutPosition  int32
	FotmsUnderscoreSize     int32
	FotmsUnderscorePosition int32
	FotmpFamilyName         PSTR
	FotmpFaceName           PSTR
	FotmpStyleName          PSTR
	FotmpFullName           PSTR
} /* wingdi.h:2490:11 */

type OUTLINETEXTMETRICW = X_OUTLINETEXTMETRICW /* wingdi.h:2523:5 */
type POUTLINETEXTMETRICW = uintptr             /* wingdi.h:2523:24 */
type NPOUTLINETEXTMETRICW = uintptr            /* wingdi.h:2523:45 */
type LPOUTLINETEXTMETRICW = uintptr            /* wingdi.h:2523:67 */

type OUTLINETEXTMETRIC = OUTLINETEXTMETRICA     /* wingdi.h:2525:3 */
type POUTLINETEXTMETRIC = POUTLINETEXTMETRICA   /* wingdi.h:2526:3 */
type NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICA /* wingdi.h:2527:3 */
type LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICA /* wingdi.h:2528:3 */

type TagPOLYTEXTA = struct {
	Fx           int32
	Fy           int32
	Fn           UINT
	F__ccgo_pad1 [4]byte
	Flpstr       LPCSTR
	FuiFlags     UINT
	Frcl         RECT
	F__ccgo_pad2 [4]byte
	Fpdx         uintptr
} /* wingdi.h:2533:11 */

type POLYTEXTA = TagPOLYTEXTA /* wingdi.h:2541:5 */
type PPOLYTEXTA = uintptr     /* wingdi.h:2541:15 */
type NPPOLYTEXTA = uintptr    /* wingdi.h:2541:27 */
type LPPOLYTEXTA = uintptr    /* wingdi.h:2541:40 */

type TagPOLYTEXTW = struct {
	Fx           int32
	Fy           int32
	Fn           UINT
	F__ccgo_pad1 [4]byte
	Flpstr       LPCWSTR
	FuiFlags     UINT
	Frcl         RECT
	F__ccgo_pad2 [4]byte
	Fpdx         uintptr
} /* wingdi.h:2543:11 */

type POLYTEXTW = TagPOLYTEXTW /* wingdi.h:2551:5 */
type PPOLYTEXTW = uintptr     /* wingdi.h:2551:15 */
type NPPOLYTEXTW = uintptr    /* wingdi.h:2551:27 */
type LPPOLYTEXTW = uintptr    /* wingdi.h:2551:40 */

type POLYTEXT = POLYTEXTA     /* wingdi.h:2553:3 */
type PPOLYTEXT = PPOLYTEXTA   /* wingdi.h:2554:3 */
type NPPOLYTEXT = NPPOLYTEXTA /* wingdi.h:2555:3 */
type LPPOLYTEXT = LPPOLYTEXTA /* wingdi.h:2556:3 */

type X_FIXED = struct {
	Ffract WORD
	Fvalue int16
} /* wingdi.h:2560:11 */

type FIXED = X_FIXED /* wingdi.h:2563:5 */

type X_MAT2 = struct {
	FeM11 FIXED
	FeM12 FIXED
	FeM21 FIXED
	FeM22 FIXED
} /* wingdi.h:2565:11 */

type MAT2 = X_MAT2    /* wingdi.h:2570:5 */
type LPMAT2 = uintptr /* wingdi.h:2570:10 */

type X_GLYPHMETRICS = struct {
	FgmBlackBoxX     UINT
	FgmBlackBoxY     UINT
	FgmptGlyphOrigin POINT
	FgmCellIncX      int16
	FgmCellIncY      int16
} /* wingdi.h:2572:11 */

type GLYPHMETRICS = X_GLYPHMETRICS /* wingdi.h:2578:5 */
type LPGLYPHMETRICS = uintptr      /* wingdi.h:2578:18 */

type TagPOINTFX = struct {
	Fx FIXED
	Fy FIXED
} /* wingdi.h:2598:11 */

type POINTFX = TagPOINTFX /* wingdi.h:2601:5 */
type LPPOINTFX = uintptr  /* wingdi.h:2601:13 */

type TagTTPOLYCURVE = struct {
	FwType WORD
	Fcpfx  WORD
	Fapfx  [1]POINTFX
} /* wingdi.h:2603:11 */

type TTPOLYCURVE = TagTTPOLYCURVE /* wingdi.h:2607:5 */
type LPTTPOLYCURVE = uintptr      /* wingdi.h:2607:17 */

type TagTTPOLYGONHEADER = struct {
	Fcb       DWORD
	FdwType   DWORD
	FpfxStart POINTFX
} /* wingdi.h:2609:11 */

type TTPOLYGONHEADER = TagTTPOLYGONHEADER /* wingdi.h:2613:5 */
type LPTTPOLYGONHEADER = uintptr          /* wingdi.h:2613:21 */

type TagGCP_RESULTSA = struct {
	FlStructSize DWORD
	F__ccgo_pad1 [4]byte
	FlpOutString LPSTR
	FlpOrder     uintptr
	FlpDx        uintptr
	FlpCaretPos  uintptr
	FlpClass     LPSTR
	FlpGlyphs    LPWSTR
	FnGlyphs     UINT
	FnMaxFit     int32
} /* wingdi.h:2656:11 */

type GCP_RESULTSA = TagGCP_RESULTSA /* wingdi.h:2666:5 */
type LPGCP_RESULTSA = uintptr       /* wingdi.h:2666:18 */
type TagGCP_RESULTSW = struct {
	FlStructSize DWORD
	F__ccgo_pad1 [4]byte
	FlpOutString LPWSTR
	FlpOrder     uintptr
	FlpDx        uintptr
	FlpCaretPos  uintptr
	FlpClass     LPSTR
	FlpGlyphs    LPWSTR
	FnGlyphs     UINT
	FnMaxFit     int32
} /* wingdi.h:2667:11 */

type GCP_RESULTSW = TagGCP_RESULTSW /* wingdi.h:2677:5 */
type LPGCP_RESULTSW = uintptr       /* wingdi.h:2677:18 */

type GCP_RESULTS = GCP_RESULTSA     /* wingdi.h:2679:3 */
type LPGCP_RESULTS = LPGCP_RESULTSA /* wingdi.h:2680:3 */

type X_RASTERIZER_STATUS = struct {
	FnSize       int16
	FwFlags      int16
	FnLanguageID int16
} /* wingdi.h:2682:11 */

type RASTERIZER_STATUS = X_RASTERIZER_STATUS /* wingdi.h:2686:5 */
type LPRASTERIZER_STATUS = uintptr           /* wingdi.h:2686:23 */

type TagPIXELFORMATDESCRIPTOR = struct {
	FnSize           WORD
	FnVersion        WORD
	FdwFlags         DWORD
	FiPixelType      BYTE
	FcColorBits      BYTE
	FcRedBits        BYTE
	FcRedShift       BYTE
	FcGreenBits      BYTE
	FcGreenShift     BYTE
	FcBlueBits       BYTE
	FcBlueShift      BYTE
	FcAlphaBits      BYTE
	FcAlphaShift     BYTE
	FcAccumBits      BYTE
	FcAccumRedBits   BYTE
	FcAccumGreenBits BYTE
	FcAccumBlueBits  BYTE
	FcAccumAlphaBits BYTE
	FcDepthBits      BYTE
	FcStencilBits    BYTE
	FcAuxBuffers     BYTE
	FiLayerType      BYTE
	FbReserved       BYTE
	FdwLayerMask     DWORD
	FdwVisibleMask   DWORD
	FdwDamageMask    DWORD
} /* wingdi.h:2693:11 */

type PIXELFORMATDESCRIPTOR = TagPIXELFORMATDESCRIPTOR /* wingdi.h:2720:5 */
type PPIXELFORMATDESCRIPTOR = uintptr                 /* wingdi.h:2720:27 */
type LPPIXELFORMATDESCRIPTOR = uintptr                /* wingdi.h:2720:51 */

type OLDFONTENUMPROCA = uintptr /* wingdi.h:2753:15 */
type OLDFONTENUMPROCW = uintptr /* wingdi.h:2754:15 */

type FONTENUMPROCA = OLDFONTENUMPROCA /* wingdi.h:2764:28 */
type FONTENUMPROCW = OLDFONTENUMPROCW /* wingdi.h:2765:28 */

type FONTENUMPROC = FONTENUMPROCA /* wingdi.h:2767:3 */

type GOBJENUMPROC = uintptr /* wingdi.h:2769:15 */
type LINEDDAPROC = uintptr  /* wingdi.h:2770:16 */

type LPFNDEVMODE = uintptr /* wingdi.h:2832:16 */
type LPFNDEVCAPS = uintptr /* wingdi.h:2833:17 */

type TagWCRANGE = struct {
	FwcLow   WCHAR
	FcGlyphs USHORT
} /* wingdi.h:3013:11 */

type WCRANGE = TagWCRANGE /* wingdi.h:3016:5 */
type PWCRANGE = uintptr   /* wingdi.h:3016:13 */
type LPWCRANGE = uintptr  /* wingdi.h:3016:23 */

type TagGLYPHSET = struct {
	FcbThis           DWORD
	FflAccel          DWORD
	FcGlyphsSupported DWORD
	FcRanges          DWORD
	Franges           [1]WCRANGE
} /* wingdi.h:3018:11 */

type GLYPHSET = TagGLYPHSET /* wingdi.h:3024:5 */
type PGLYPHSET = uintptr    /* wingdi.h:3024:14 */
type LPGLYPHSET = uintptr   /* wingdi.h:3024:25 */

type TagDESIGNVECTOR = struct {
	FdvReserved DWORD
	FdvNumAxes  DWORD
	FdvValues   [16]LONG
} /* wingdi.h:3046:11 */

type DESIGNVECTOR = TagDESIGNVECTOR /* wingdi.h:3050:5 */
type PDESIGNVECTOR = uintptr        /* wingdi.h:3050:18 */
type LPDESIGNVECTOR = uintptr       /* wingdi.h:3050:33 */

type TagAXISINFOA = struct {
	FaxMinValue LONG
	FaxMaxValue LONG
	FaxAxisName [16]BYTE
} /* wingdi.h:3067:11 */

type AXISINFOA = TagAXISINFOA /* wingdi.h:3071:5 */
type PAXISINFOA = uintptr     /* wingdi.h:3071:15 */
type LPAXISINFOA = uintptr    /* wingdi.h:3071:27 */

type TagAXISINFOW = struct {
	FaxMinValue LONG
	FaxMaxValue LONG
	FaxAxisName [16]WCHAR
} /* wingdi.h:3073:11 */

type AXISINFOW = TagAXISINFOW /* wingdi.h:3077:5 */
type PAXISINFOW = uintptr     /* wingdi.h:3077:15 */
type LPAXISINFOW = uintptr    /* wingdi.h:3077:27 */

type AXISINFO = AXISINFOA     /* wingdi.h:3079:3 */
type PAXISINFO = PAXISINFOA   /* wingdi.h:3080:3 */
type LPAXISINFO = LPAXISINFOA /* wingdi.h:3081:3 */

type TagAXESLISTA = struct {
	FaxlReserved DWORD
	FaxlNumAxes  DWORD
	FaxlAxisInfo [16]AXISINFOA
} /* wingdi.h:3083:11 */

type AXESLISTA = TagAXESLISTA /* wingdi.h:3087:5 */
type PAXESLISTA = uintptr     /* wingdi.h:3087:15 */
type LPAXESLISTA = uintptr    /* wingdi.h:3087:27 */

type TagAXESLISTW = struct {
	FaxlReserved DWORD
	FaxlNumAxes  DWORD
	FaxlAxisInfo [16]AXISINFOW
} /* wingdi.h:3089:11 */

type AXESLISTW = TagAXESLISTW /* wingdi.h:3093:5 */
type PAXESLISTW = uintptr     /* wingdi.h:3093:15 */
type LPAXESLISTW = uintptr    /* wingdi.h:3093:27 */

type AXESLIST = AXESLISTA     /* wingdi.h:3095:3 */
type PAXESLIST = PAXESLISTA   /* wingdi.h:3096:3 */
type LPAXESLIST = LPAXESLISTA /* wingdi.h:3097:3 */

type TagENUMLOGFONTEXDVA = struct {
	FelfEnumLogfontEx ENUMLOGFONTEXA
	FelfDesignVector  DESIGNVECTOR
} /* wingdi.h:3099:11 */

type ENUMLOGFONTEXDVA = TagENUMLOGFONTEXDVA /* wingdi.h:3102:5 */
type PENUMLOGFONTEXDVA = uintptr            /* wingdi.h:3102:22 */
type LPENUMLOGFONTEXDVA = uintptr           /* wingdi.h:3102:41 */

type TagENUMLOGFONTEXDVW = struct {
	FelfEnumLogfontEx ENUMLOGFONTEXW
	FelfDesignVector  DESIGNVECTOR
} /* wingdi.h:3104:11 */

type ENUMLOGFONTEXDVW = TagENUMLOGFONTEXDVW /* wingdi.h:3107:5 */
type PENUMLOGFONTEXDVW = uintptr            /* wingdi.h:3107:22 */
type LPENUMLOGFONTEXDVW = uintptr           /* wingdi.h:3107:41 */

type ENUMLOGFONTEXDV = ENUMLOGFONTEXDVA     /* wingdi.h:3109:3 */
type PENUMLOGFONTEXDV = PENUMLOGFONTEXDVA   /* wingdi.h:3110:3 */
type LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVA /* wingdi.h:3111:3 */

type TagENUMTEXTMETRICA = struct {
	FetmNewTextMetricEx NEWTEXTMETRICEXA
	FetmAxesList        AXESLISTA
} /* wingdi.h:3119:11 */

type ENUMTEXTMETRICA = TagENUMTEXTMETRICA /* wingdi.h:3122:5 */
type PENUMTEXTMETRICA = uintptr           /* wingdi.h:3122:21 */
type LPENUMTEXTMETRICA = uintptr          /* wingdi.h:3122:39 */
type TagENUMTEXTMETRICW = struct {
	FetmNewTextMetricEx NEWTEXTMETRICEXW
	FetmAxesList        AXESLISTW
} /* wingdi.h:3123:11 */

type ENUMTEXTMETRICW = TagENUMTEXTMETRICW /* wingdi.h:3127:5 */
type PENUMTEXTMETRICW = uintptr           /* wingdi.h:3127:21 */
type LPENUMTEXTMETRICW = uintptr          /* wingdi.h:3127:39 */

type ENUMTEXTMETRIC = ENUMTEXTMETRICA     /* wingdi.h:3129:3 */
type PENUMTEXTMETRIC = PENUMTEXTMETRICA   /* wingdi.h:3130:3 */
type LPENUMTEXTMETRIC = LPENUMTEXTMETRICA /* wingdi.h:3131:3 */

type COLOR16 = USHORT /* wingdi.h:3233:18 */

type X_TRIVERTEX = struct {
	Fx     LONG
	Fy     LONG
	FRed   COLOR16
	FGreen COLOR16
	FBlue  COLOR16
	FAlpha COLOR16
} /* wingdi.h:3235:11 */

type TRIVERTEX = X_TRIVERTEX /* wingdi.h:3242:5 */
type PTRIVERTEX = uintptr    /* wingdi.h:3242:15 */
type LPTRIVERTEX = uintptr   /* wingdi.h:3242:27 */
type X_GRADIENT_TRIANGLE = struct {
	FVertex1 ULONG
	FVertex2 ULONG
	FVertex3 ULONG
} /* wingdi.h:3245:11 */

type GRADIENT_TRIANGLE = X_GRADIENT_TRIANGLE /* wingdi.h:3249:5 */
type PGRADIENT_TRIANGLE = uintptr            /* wingdi.h:3249:23 */
type LPGRADIENT_TRIANGLE = uintptr           /* wingdi.h:3249:43 */

type X_GRADIENT_RECT = struct {
	FUpperLeft  ULONG
	FLowerRight ULONG
} /* wingdi.h:3251:11 */

type GRADIENT_RECT = X_GRADIENT_RECT /* wingdi.h:3254:5 */
type PGRADIENT_RECT = uintptr        /* wingdi.h:3254:19 */
type LPGRADIENT_RECT = uintptr       /* wingdi.h:3254:35 */
type X_BLENDFUNCTION = struct {
	FBlendOp             BYTE
	FBlendFlags          BYTE
	FSourceConstantAlpha BYTE
	FAlphaFormat         BYTE
} /* wingdi.h:3257:11 */

type BLENDFUNCTION = X_BLENDFUNCTION /* wingdi.h:3262:5 */
type PBLENDFUNCTION = uintptr        /* wingdi.h:3262:19 */

type MFENUMPROC = uintptr /* wingdi.h:3290:15 */

type ENHMFENUMPROC = uintptr /* wingdi.h:3294:15 */

type TagDIBSECTION = struct {
	FdsBm        BITMAP
	FdsBmih      BITMAPINFOHEADER
	FdsBitfields [3]DWORD
	F__ccgo_pad1 [4]byte
	FdshSection  HANDLE
	FdsOffset    DWORD
	F__ccgo_pad2 [4]byte
} /* wingdi.h:3326:11 */

type DIBSECTION = TagDIBSECTION /* wingdi.h:3332:5 */
type LPDIBSECTION = uintptr     /* wingdi.h:3332:16 */
type PDIBSECTION = uintptr      /* wingdi.h:3332:30 */

type TagCOLORADJUSTMENT = struct {
	FcaSize            WORD
	FcaFlags           WORD
	FcaIlluminantIndex WORD
	FcaRedGamma        WORD
	FcaGreenGamma      WORD
	FcaBlueGamma       WORD
	FcaReferenceBlack  WORD
	FcaReferenceWhite  WORD
	FcaContrast        SHORT
	FcaBrightness      SHORT
	FcaColorfulness    SHORT
	FcaRedGreenTint    SHORT
} /* wingdi.h:3379:11 */

type COLORADJUSTMENT = TagCOLORADJUSTMENT /* wingdi.h:3392:5 */
type PCOLORADJUSTMENT = uintptr           /* wingdi.h:3392:21 */
type LPCOLORADJUSTMENT = uintptr          /* wingdi.h:3392:39 */

type ABORTPROC = uintptr /* wingdi.h:3398:19 */

type X_DOCINFOA = struct {
	FcbSize       int32
	F__ccgo_pad1  [4]byte
	FlpszDocName  LPCSTR
	FlpszOutput   LPCSTR
	FlpszDatatype LPCSTR
	FfwType       DWORD
	F__ccgo_pad2  [4]byte
} /* wingdi.h:3400:11 */

type DOCINFOA = X_DOCINFOA /* wingdi.h:3406:5 */
type LPDOCINFOA = uintptr  /* wingdi.h:3406:14 */

type X_DOCINFOW = struct {
	FcbSize       int32
	F__ccgo_pad1  [4]byte
	FlpszDocName  LPCWSTR
	FlpszOutput   LPCWSTR
	FlpszDatatype LPCWSTR
	FfwType       DWORD
	F__ccgo_pad2  [4]byte
} /* wingdi.h:3408:11 */

type DOCINFOW = X_DOCINFOW /* wingdi.h:3414:5 */
type LPDOCINFOW = uintptr  /* wingdi.h:3414:14 */

type DOCINFO = DOCINFOA     /* wingdi.h:3416:3 */
type LPDOCINFO = LPDOCINFOA /* wingdi.h:3417:3 */

type TagKERNINGPAIR = struct {
	FwFirst      WORD
	FwSecond     WORD
	FiKernAmount int32
} /* wingdi.h:3487:11 */

type KERNINGPAIR = TagKERNINGPAIR /* wingdi.h:3491:5 */
type LPKERNINGPAIR = uintptr      /* wingdi.h:3491:17 */

type ICMENUMPROCA = uintptr /* wingdi.h:3509:15 */
type ICMENUMPROCW = uintptr /* wingdi.h:3510:15 */

type TagEMR = struct {
	FiType DWORD
	FnSize DWORD
} /* wingdi.h:3675:11 */

type EMR = TagEMR   /* wingdi.h:3678:5 */
type PEMR = uintptr /* wingdi.h:3678:9 */

type TagEMRTEXT = struct {
	FptlReference POINTL
	FnChars       DWORD
	FoffString    DWORD
	FfOptions     DWORD
	Frcl          RECTL
	FoffDx        DWORD
} /* wingdi.h:3680:11 */

type EMRTEXT = TagEMRTEXT /* wingdi.h:3687:5 */
type PEMRTEXT = uintptr   /* wingdi.h:3687:13 */

type TagABORTPATH = struct{ Femr EMR } /* wingdi.h:3689:11 */

type EMRABORTPATH = TagABORTPATH      /* wingdi.h:3691:5 */
type PEMRABORTPATH = uintptr          /* wingdi.h:3691:18 */
type EMRBEGINPATH = TagABORTPATH      /* wingdi.h:3691:33 */
type PEMRBEGINPATH = uintptr          /* wingdi.h:3691:46 */
type EMRENDPATH = TagABORTPATH        /* wingdi.h:3691:61 */
type PEMRENDPATH = uintptr            /* wingdi.h:3691:72 */
type EMRCLOSEFIGURE = TagABORTPATH    /* wingdi.h:3691:85 */
type PEMRCLOSEFIGURE = uintptr        /* wingdi.h:3691:100 */
type EMRFLATTENPATH = TagABORTPATH    /* wingdi.h:3691:117 */
type PEMRFLATTENPATH = uintptr        /* wingdi.h:3691:132 */
type EMRWIDENPATH = TagABORTPATH      /* wingdi.h:3691:149 */
type PEMRWIDENPATH = uintptr          /* wingdi.h:3691:162 */
type EMRSETMETARGN = TagABORTPATH     /* wingdi.h:3691:177 */
type PEMRSETMETARGN = uintptr         /* wingdi.h:3691:191 */
type EMRSAVEDC = TagABORTPATH         /* wingdi.h:3691:207 */
type PEMRSAVEDC = uintptr             /* wingdi.h:3691:217 */
type EMRREALIZEPALETTE = TagABORTPATH /* wingdi.h:3691:229 */
type PEMRREALIZEPALETTE = uintptr     /* wingdi.h:3691:247 */

type TagEMRSELECTCLIPPATH = struct {
	Femr   EMR
	FiMode DWORD
} /* wingdi.h:3693:11 */

type EMRSELECTCLIPPATH = TagEMRSELECTCLIPPATH    /* wingdi.h:3696:5 */
type PEMRSELECTCLIPPATH = uintptr                /* wingdi.h:3696:23 */
type EMRSETBKMODE = TagEMRSELECTCLIPPATH         /* wingdi.h:3696:43 */
type PEMRSETBKMODE = uintptr                     /* wingdi.h:3696:56 */
type EMRSETMAPMODE = TagEMRSELECTCLIPPATH        /* wingdi.h:3696:71 */
type PEMRSETMAPMODE = uintptr                    /* wingdi.h:3696:85 */
type EMRSETLAYOUT = TagEMRSELECTCLIPPATH         /* wingdi.h:3696:101 */
type PEMRSETLAYOUT = uintptr                     /* wingdi.h:3696:114 */
type EMRSETPOLYFILLMODE = TagEMRSELECTCLIPPATH   /* wingdi.h:3697:5 */
type PEMRSETPOLYFILLMODE = uintptr               /* wingdi.h:3697:24 */
type EMRSETROP2 = TagEMRSELECTCLIPPATH           /* wingdi.h:3697:45 */
type PEMRSETROP2 = uintptr                       /* wingdi.h:3697:56 */
type EMRSETSTRETCHBLTMODE = TagEMRSELECTCLIPPATH /* wingdi.h:3697:69 */
type PEMRSETSTRETCHBLTMODE = uintptr             /* wingdi.h:3697:90 */
type EMRSETICMMODE = TagEMRSELECTCLIPPATH        /* wingdi.h:3697:113 */
type PEMRSETICMMODE = uintptr                    /* wingdi.h:3698:5 */
type EMRSETTEXTALIGN = TagEMRSELECTCLIPPATH      /* wingdi.h:3698:21 */
type PEMRSETTEXTALIGN = uintptr                  /* wingdi.h:3698:37 */

type TagEMRSETMITERLIMIT = struct {
	Femr         EMR
	FeMiterLimit FLOAT
} /* wingdi.h:3700:11 */

type EMRSETMITERLIMIT = TagEMRSETMITERLIMIT /* wingdi.h:3703:5 */
type PEMRSETMITERLIMIT = uintptr            /* wingdi.h:3703:22 */

type TagEMRRESTOREDC = struct {
	Femr       EMR
	FiRelative LONG
} /* wingdi.h:3705:11 */

type EMRRESTOREDC = TagEMRRESTOREDC /* wingdi.h:3708:5 */
type PEMRRESTOREDC = uintptr        /* wingdi.h:3708:18 */

type TagEMRSETARCDIRECTION = struct {
	Femr           EMR
	FiArcDirection DWORD
} /* wingdi.h:3710:11 */

type EMRSETARCDIRECTION = TagEMRSETARCDIRECTION /* wingdi.h:3714:5 */
type PEMRSETARCDIRECTION = uintptr              /* wingdi.h:3714:24 */

type TagEMRSETMAPPERFLAGS = struct {
	Femr     EMR
	FdwFlags DWORD
} /* wingdi.h:3716:11 */

type EMRSETMAPPERFLAGS = TagEMRSETMAPPERFLAGS /* wingdi.h:3719:5 */
type PEMRSETMAPPERFLAGS = uintptr             /* wingdi.h:3719:23 */

type TagEMRSETTEXTCOLOR = struct {
	Femr     EMR
	FcrColor COLORREF
} /* wingdi.h:3721:11 */

type EMRSETBKCOLOR = TagEMRSETTEXTCOLOR   /* wingdi.h:3724:5 */
type PEMRSETBKCOLOR = uintptr             /* wingdi.h:3724:19 */
type EMRSETTEXTCOLOR = TagEMRSETTEXTCOLOR /* wingdi.h:3724:35 */
type PEMRSETTEXTCOLOR = uintptr           /* wingdi.h:3724:51 */

type TagEMRSELECTOBJECT = struct {
	Femr      EMR
	FihObject DWORD
} /* wingdi.h:3726:11 */

type EMRSELECTOBJECT = TagEMRSELECTOBJECT /* wingdi.h:3729:5 */
type PEMRSELECTOBJECT = uintptr           /* wingdi.h:3729:21 */
type EMRDELETEOBJECT = TagEMRSELECTOBJECT /* wingdi.h:3729:39 */
type PEMRDELETEOBJECT = uintptr           /* wingdi.h:3729:55 */

type TagEMRSELECTPALETTE = struct {
	Femr   EMR
	FihPal DWORD
} /* wingdi.h:3731:11 */

type EMRSELECTPALETTE = TagEMRSELECTPALETTE /* wingdi.h:3734:5 */
type PEMRSELECTPALETTE = uintptr            /* wingdi.h:3734:22 */

type TagEMRRESIZEPALETTE = struct {
	Femr      EMR
	FihPal    DWORD
	FcEntries DWORD
} /* wingdi.h:3736:11 */

type EMRRESIZEPALETTE = TagEMRRESIZEPALETTE /* wingdi.h:3740:5 */
type PEMRRESIZEPALETTE = uintptr            /* wingdi.h:3740:22 */

type TagEMRSETPALETTEENTRIES = struct {
	Femr         EMR
	FihPal       DWORD
	FiStart      DWORD
	FcEntries    DWORD
	FaPalEntries [1]PALETTEENTRY
} /* wingdi.h:3742:11 */

type EMRSETPALETTEENTRIES = TagEMRSETPALETTEENTRIES /* wingdi.h:3748:5 */
type PEMRSETPALETTEENTRIES = uintptr                /* wingdi.h:3748:26 */

type TagEMRSETCOLORADJUSTMENT = struct {
	Femr             EMR
	FColorAdjustment COLORADJUSTMENT
} /* wingdi.h:3750:11 */

type EMRSETCOLORADJUSTMENT = TagEMRSETCOLORADJUSTMENT /* wingdi.h:3753:5 */
type PEMRSETCOLORADJUSTMENT = uintptr                 /* wingdi.h:3753:27 */

type TagEMRGDICOMMENT = struct {
	Femr         EMR
	FcbData      DWORD
	FData        [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:3755:11 */

type EMRGDICOMMENT = TagEMRGDICOMMENT /* wingdi.h:3759:5 */
type PEMRGDICOMMENT = uintptr         /* wingdi.h:3759:19 */

type TagEMREOF = struct {
	Femr           EMR
	FnPalEntries   DWORD
	FoffPalEntries DWORD
	FnSizeLast     DWORD
} /* wingdi.h:3761:11 */

type EMREOF = TagEMREOF /* wingdi.h:3766:5 */
type PEMREOF = uintptr  /* wingdi.h:3766:12 */

type TagEMRLINETO = struct {
	Femr EMR
	Fptl POINTL
} /* wingdi.h:3768:11 */

type EMRLINETO = TagEMRLINETO   /* wingdi.h:3771:5 */
type PEMRLINETO = uintptr       /* wingdi.h:3771:15 */
type EMRMOVETOEX = TagEMRLINETO /* wingdi.h:3771:27 */
type PEMRMOVETOEX = uintptr     /* wingdi.h:3771:39 */

type TagEMROFFSETCLIPRGN = struct {
	Femr       EMR
	FptlOffset POINTL
} /* wingdi.h:3773:11 */

type EMROFFSETCLIPRGN = TagEMROFFSETCLIPRGN /* wingdi.h:3776:5 */
type PEMROFFSETCLIPRGN = uintptr            /* wingdi.h:3776:22 */

type TagEMRFILLPATH = struct {
	Femr       EMR
	FrclBounds RECTL
} /* wingdi.h:3778:11 */

type EMRFILLPATH = TagEMRFILLPATH          /* wingdi.h:3781:5 */
type PEMRFILLPATH = uintptr                /* wingdi.h:3781:17 */
type EMRSTROKEANDFILLPATH = TagEMRFILLPATH /* wingdi.h:3781:31 */
type PEMRSTROKEANDFILLPATH = uintptr       /* wingdi.h:3781:52 */
type EMRSTROKEPATH = TagEMRFILLPATH        /* wingdi.h:3781:75 */
type PEMRSTROKEPATH = uintptr              /* wingdi.h:3781:89 */

type TagEMREXCLUDECLIPRECT = struct {
	Femr     EMR
	FrclClip RECTL
} /* wingdi.h:3783:11 */

type EMREXCLUDECLIPRECT = TagEMREXCLUDECLIPRECT   /* wingdi.h:3786:5 */
type PEMREXCLUDECLIPRECT = uintptr                /* wingdi.h:3786:24 */
type EMRINTERSECTCLIPRECT = TagEMREXCLUDECLIPRECT /* wingdi.h:3786:45 */
type PEMRINTERSECTCLIPRECT = uintptr              /* wingdi.h:3786:66 */

type TagEMRSETVIEWPORTORGEX = struct {
	Femr       EMR
	FptlOrigin POINTL
} /* wingdi.h:3788:11 */

type EMRSETVIEWPORTORGEX = TagEMRSETVIEWPORTORGEX /* wingdi.h:3791:5 */
type PEMRSETVIEWPORTORGEX = uintptr               /* wingdi.h:3791:25 */
type EMRSETWINDOWORGEX = TagEMRSETVIEWPORTORGEX   /* wingdi.h:3791:47 */
type PEMRSETWINDOWORGEX = uintptr                 /* wingdi.h:3791:65 */
type EMRSETBRUSHORGEX = TagEMRSETVIEWPORTORGEX    /* wingdi.h:3791:85 */
type PEMRSETBRUSHORGEX = uintptr                  /* wingdi.h:3791:102 */

type TagEMRSETVIEWPORTEXTEX = struct {
	Femr       EMR
	FszlExtent SIZEL
} /* wingdi.h:3793:11 */

type EMRSETVIEWPORTEXTEX = TagEMRSETVIEWPORTEXTEX /* wingdi.h:3796:5 */
type PEMRSETVIEWPORTEXTEX = uintptr               /* wingdi.h:3796:25 */
type EMRSETWINDOWEXTEX = TagEMRSETVIEWPORTEXTEX   /* wingdi.h:3796:47 */
type PEMRSETWINDOWEXTEX = uintptr                 /* wingdi.h:3796:65 */

type TagEMRSCALEVIEWPORTEXTEX = struct {
	Femr    EMR
	FxNum   LONG
	FxDenom LONG
	FyNum   LONG
	FyDenom LONG
} /* wingdi.h:3798:11 */

type EMRSCALEVIEWPORTEXTEX = TagEMRSCALEVIEWPORTEXTEX /* wingdi.h:3804:5 */
type PEMRSCALEVIEWPORTEXTEX = uintptr                 /* wingdi.h:3804:27 */
type EMRSCALEWINDOWEXTEX = TagEMRSCALEVIEWPORTEXTEX   /* wingdi.h:3804:51 */
type PEMRSCALEWINDOWEXTEX = uintptr                   /* wingdi.h:3804:71 */

type TagEMRSETWORLDTRANSFORM = struct {
	Femr   EMR
	Fxform XFORM
} /* wingdi.h:3806:11 */

type EMRSETWORLDTRANSFORM = TagEMRSETWORLDTRANSFORM /* wingdi.h:3809:5 */
type PEMRSETWORLDTRANSFORM = uintptr                /* wingdi.h:3809:26 */

type TagEMRMODIFYWORLDTRANSFORM = struct {
	Femr   EMR
	Fxform XFORM
	FiMode DWORD
} /* wingdi.h:3811:11 */

type EMRMODIFYWORLDTRANSFORM = TagEMRMODIFYWORLDTRANSFORM /* wingdi.h:3815:5 */
type PEMRMODIFYWORLDTRANSFORM = uintptr                   /* wingdi.h:3815:29 */

type TagEMRSETPIXELV = struct {
	Femr      EMR
	FptlPixel POINTL
	FcrColor  COLORREF
} /* wingdi.h:3817:11 */

type EMRSETPIXELV = TagEMRSETPIXELV /* wingdi.h:3821:5 */
type PEMRSETPIXELV = uintptr        /* wingdi.h:3821:18 */

type TagEMREXTFLOODFILL = struct {
	Femr      EMR
	FptlStart POINTL
	FcrColor  COLORREF
	FiMode    DWORD
} /* wingdi.h:3823:11 */

type EMREXTFLOODFILL = TagEMREXTFLOODFILL /* wingdi.h:3828:5 */
type PEMREXTFLOODFILL = uintptr           /* wingdi.h:3828:21 */

type TagEMRELLIPSE = struct {
	Femr    EMR
	FrclBox RECTL
} /* wingdi.h:3830:11 */

type EMRELLIPSE = TagEMRELLIPSE   /* wingdi.h:3833:5 */
type PEMRELLIPSE = uintptr        /* wingdi.h:3833:16 */
type EMRRECTANGLE = TagEMRELLIPSE /* wingdi.h:3833:29 */
type PEMRRECTANGLE = uintptr      /* wingdi.h:3833:42 */

type TagEMRROUNDRECT = struct {
	Femr       EMR
	FrclBox    RECTL
	FszlCorner SIZEL
} /* wingdi.h:3835:11 */

type EMRROUNDRECT = TagEMRROUNDRECT /* wingdi.h:3839:5 */
type PEMRROUNDRECT = uintptr        /* wingdi.h:3839:18 */

type TagEMRARC = struct {
	Femr      EMR
	FrclBox   RECTL
	FptlStart POINTL
	FptlEnd   POINTL
} /* wingdi.h:3841:11 */

type EMRARC = TagEMRARC   /* wingdi.h:3846:5 */
type PEMRARC = uintptr    /* wingdi.h:3846:12 */
type EMRARCTO = TagEMRARC /* wingdi.h:3846:21 */
type PEMRARCTO = uintptr  /* wingdi.h:3846:30 */
type EMRCHORD = TagEMRARC /* wingdi.h:3846:41 */
type PEMRCHORD = uintptr  /* wingdi.h:3846:50 */
type EMRPIE = TagEMRARC   /* wingdi.h:3846:61 */
type PEMRPIE = uintptr    /* wingdi.h:3846:68 */

type TagEMRANGLEARC = struct {
	Femr         EMR
	FptlCenter   POINTL
	FnRadius     DWORD
	FeStartAngle FLOAT
	FeSweepAngle FLOAT
} /* wingdi.h:3848:11 */

type EMRANGLEARC = TagEMRANGLEARC /* wingdi.h:3854:5 */
type PEMRANGLEARC = uintptr       /* wingdi.h:3854:17 */

type TagEMRPOLYLINE = struct {
	Femr       EMR
	FrclBounds RECTL
	Fcptl      DWORD
	Faptl      [1]POINTL
} /* wingdi.h:3856:11 */

type EMRPOLYLINE = TagEMRPOLYLINE     /* wingdi.h:3861:5 */
type PEMRPOLYLINE = uintptr           /* wingdi.h:3861:17 */
type EMRPOLYBEZIER = TagEMRPOLYLINE   /* wingdi.h:3861:31 */
type PEMRPOLYBEZIER = uintptr         /* wingdi.h:3861:45 */
type EMRPOLYGON = TagEMRPOLYLINE      /* wingdi.h:3861:61 */
type PEMRPOLYGON = uintptr            /* wingdi.h:3861:72 */
type EMRPOLYBEZIERTO = TagEMRPOLYLINE /* wingdi.h:3861:85 */
type PEMRPOLYBEZIERTO = uintptr       /* wingdi.h:3861:101 */
type EMRPOLYLINETO = TagEMRPOLYLINE   /* wingdi.h:3861:119 */
type PEMRPOLYLINETO = uintptr         /* wingdi.h:3861:133 */

type TagEMRPOLYLINE16 = struct {
	Femr       EMR
	FrclBounds RECTL
	Fcpts      DWORD
	Fapts      [1]POINTS
} /* wingdi.h:3863:11 */

type EMRPOLYLINE16 = TagEMRPOLYLINE16     /* wingdi.h:3868:5 */
type PEMRPOLYLINE16 = uintptr             /* wingdi.h:3868:19 */
type EMRPOLYBEZIER16 = TagEMRPOLYLINE16   /* wingdi.h:3868:35 */
type PEMRPOLYBEZIER16 = uintptr           /* wingdi.h:3868:51 */
type EMRPOLYGON16 = TagEMRPOLYLINE16      /* wingdi.h:3868:69 */
type PEMRPOLYGON16 = uintptr              /* wingdi.h:3868:82 */
type EMRPOLYBEZIERTO16 = TagEMRPOLYLINE16 /* wingdi.h:3868:97 */
type PEMRPOLYBEZIERTO16 = uintptr         /* wingdi.h:3868:115 */
type EMRPOLYLINETO16 = TagEMRPOLYLINE16   /* wingdi.h:3868:135 */
type PEMRPOLYLINETO16 = uintptr           /* wingdi.h:3868:151 */

type TagEMRPOLYDRAW = struct {
	Femr         EMR
	FrclBounds   RECTL
	Fcptl        DWORD
	Faptl        [1]POINTL
	FabTypes     [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:3870:11 */

type EMRPOLYDRAW = TagEMRPOLYDRAW /* wingdi.h:3876:5 */
type PEMRPOLYDRAW = uintptr       /* wingdi.h:3876:17 */

type TagEMRPOLYDRAW16 = struct {
	Femr         EMR
	FrclBounds   RECTL
	Fcpts        DWORD
	Fapts        [1]POINTS
	FabTypes     [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:3878:11 */

type EMRPOLYDRAW16 = TagEMRPOLYDRAW16 /* wingdi.h:3884:5 */
type PEMRPOLYDRAW16 = uintptr         /* wingdi.h:3884:19 */

type TagEMRPOLYPOLYLINE = struct {
	Femr         EMR
	FrclBounds   RECTL
	FnPolys      DWORD
	Fcptl        DWORD
	FaPolyCounts [1]DWORD
	Faptl        [1]POINTL
} /* wingdi.h:3886:11 */

type EMRPOLYPOLYLINE = TagEMRPOLYPOLYLINE /* wingdi.h:3893:5 */
type PEMRPOLYPOLYLINE = uintptr           /* wingdi.h:3893:21 */
type EMRPOLYPOLYGON = TagEMRPOLYPOLYLINE  /* wingdi.h:3893:39 */
type PEMRPOLYPOLYGON = uintptr            /* wingdi.h:3893:54 */

type TagEMRPOLYPOLYLINE16 = struct {
	Femr         EMR
	FrclBounds   RECTL
	FnPolys      DWORD
	Fcpts        DWORD
	FaPolyCounts [1]DWORD
	Fapts        [1]POINTS
} /* wingdi.h:3895:11 */

type EMRPOLYPOLYLINE16 = TagEMRPOLYPOLYLINE16 /* wingdi.h:3902:5 */
type PEMRPOLYPOLYLINE16 = uintptr             /* wingdi.h:3902:23 */
type EMRPOLYPOLYGON16 = TagEMRPOLYPOLYLINE16  /* wingdi.h:3902:43 */
type PEMRPOLYPOLYGON16 = uintptr              /* wingdi.h:3902:60 */

type TagEMRINVERTRGN = struct {
	Femr         EMR
	FrclBounds   RECTL
	FcbRgnData   DWORD
	FRgnData     [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:3904:11 */

type EMRINVERTRGN = TagEMRINVERTRGN /* wingdi.h:3909:5 */
type PEMRINVERTRGN = uintptr        /* wingdi.h:3909:18 */
type EMRPAINTRGN = TagEMRINVERTRGN  /* wingdi.h:3909:33 */
type PEMRPAINTRGN = uintptr         /* wingdi.h:3909:45 */

type TagEMRFILLRGN = struct {
	Femr         EMR
	FrclBounds   RECTL
	FcbRgnData   DWORD
	FihBrush     DWORD
	FRgnData     [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:3911:11 */

type EMRFILLRGN = TagEMRFILLRGN /* wingdi.h:3917:5 */
type PEMRFILLRGN = uintptr      /* wingdi.h:3917:16 */

type TagEMRFRAMERGN = struct {
	Femr         EMR
	FrclBounds   RECTL
	FcbRgnData   DWORD
	FihBrush     DWORD
	FszlStroke   SIZEL
	FRgnData     [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:3919:11 */

type EMRFRAMERGN = TagEMRFRAMERGN /* wingdi.h:3926:5 */
type PEMRFRAMERGN = uintptr       /* wingdi.h:3926:17 */

type TagEMREXTSELECTCLIPRGN = struct {
	Femr         EMR
	FcbRgnData   DWORD
	FiMode       DWORD
	FRgnData     [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:3928:11 */

type EMREXTSELECTCLIPRGN = TagEMREXTSELECTCLIPRGN /* wingdi.h:3933:5 */
type PEMREXTSELECTCLIPRGN = uintptr               /* wingdi.h:3933:25 */

type TagEMREXTTEXTOUTA = struct {
	Femr           EMR
	FrclBounds     RECTL
	FiGraphicsMode DWORD
	FexScale       FLOAT
	FeyScale       FLOAT
	Femrtext       EMRTEXT
} /* wingdi.h:3935:11 */

type EMREXTTEXTOUTA = TagEMREXTTEXTOUTA /* wingdi.h:3942:5 */
type PEMREXTTEXTOUTA = uintptr          /* wingdi.h:3942:20 */
type EMREXTTEXTOUTW = TagEMREXTTEXTOUTA /* wingdi.h:3942:37 */
type PEMREXTTEXTOUTW = uintptr          /* wingdi.h:3942:52 */

type TagEMRPOLYTEXTOUTA = struct {
	Femr           EMR
	FrclBounds     RECTL
	FiGraphicsMode DWORD
	FexScale       FLOAT
	FeyScale       FLOAT
	FcStrings      LONG
	Faemrtext      [1]EMRTEXT
} /* wingdi.h:3944:11 */

type EMRPOLYTEXTOUTA = TagEMRPOLYTEXTOUTA /* wingdi.h:3952:5 */
type PEMRPOLYTEXTOUTA = uintptr           /* wingdi.h:3952:21 */
type EMRPOLYTEXTOUTW = TagEMRPOLYTEXTOUTA /* wingdi.h:3952:39 */
type PEMRPOLYTEXTOUTW = uintptr           /* wingdi.h:3952:55 */

type TagEMRBITBLT = struct {
	Femr          EMR
	FrclBounds    RECTL
	FxDest        LONG
	FyDest        LONG
	FcxDest       LONG
	FcyDest       LONG
	FdwRop        DWORD
	FxSrc         LONG
	FySrc         LONG
	FxformSrc     XFORM
	FcrBkColorSrc COLORREF
	FiUsageSrc    DWORD
	FoffBmiSrc    DWORD
	FcbBmiSrc     DWORD
	FoffBitsSrc   DWORD
	FcbBitsSrc    DWORD
} /* wingdi.h:3954:11 */

type EMRBITBLT = TagEMRBITBLT /* wingdi.h:3971:5 */
type PEMRBITBLT = uintptr     /* wingdi.h:3971:15 */

type TagEMRSTRETCHBLT = struct {
	Femr          EMR
	FrclBounds    RECTL
	FxDest        LONG
	FyDest        LONG
	FcxDest       LONG
	FcyDest       LONG
	FdwRop        DWORD
	FxSrc         LONG
	FySrc         LONG
	FxformSrc     XFORM
	FcrBkColorSrc COLORREF
	FiUsageSrc    DWORD
	FoffBmiSrc    DWORD
	FcbBmiSrc     DWORD
	FoffBitsSrc   DWORD
	FcbBitsSrc    DWORD
	FcxSrc        LONG
	FcySrc        LONG
} /* wingdi.h:3973:11 */

type EMRSTRETCHBLT = TagEMRSTRETCHBLT /* wingdi.h:3992:5 */
type PEMRSTRETCHBLT = uintptr         /* wingdi.h:3992:19 */

type TagEMRMASKBLT = struct {
	Femr          EMR
	FrclBounds    RECTL
	FxDest        LONG
	FyDest        LONG
	FcxDest       LONG
	FcyDest       LONG
	FdwRop        DWORD
	FxSrc         LONG
	FySrc         LONG
	FxformSrc     XFORM
	FcrBkColorSrc COLORREF
	FiUsageSrc    DWORD
	FoffBmiSrc    DWORD
	FcbBmiSrc     DWORD
	FoffBitsSrc   DWORD
	FcbBitsSrc    DWORD
	FxMask        LONG
	FyMask        LONG
	FiUsageMask   DWORD
	FoffBmiMask   DWORD
	FcbBmiMask    DWORD
	FoffBitsMask  DWORD
	FcbBitsMask   DWORD
} /* wingdi.h:3994:11 */

type EMRMASKBLT = TagEMRMASKBLT /* wingdi.h:4018:5 */
type PEMRMASKBLT = uintptr      /* wingdi.h:4018:16 */

type TagEMRPLGBLT = struct {
	Femr          EMR
	FrclBounds    RECTL
	FaptlDest     [3]POINTL
	FxSrc         LONG
	FySrc         LONG
	FcxSrc        LONG
	FcySrc        LONG
	FxformSrc     XFORM
	FcrBkColorSrc COLORREF
	FiUsageSrc    DWORD
	FoffBmiSrc    DWORD
	FcbBmiSrc     DWORD
	FoffBitsSrc   DWORD
	FcbBitsSrc    DWORD
	FxMask        LONG
	FyMask        LONG
	FiUsageMask   DWORD
	FoffBmiMask   DWORD
	FcbBmiMask    DWORD
	FoffBitsMask  DWORD
	FcbBitsMask   DWORD
} /* wingdi.h:4020:11 */

type EMRPLGBLT = TagEMRPLGBLT /* wingdi.h:4042:5 */
type PEMRPLGBLT = uintptr     /* wingdi.h:4042:15 */

type TagEMRSETDIBITSTODEVICE = struct {
	Femr        EMR
	FrclBounds  RECTL
	FxDest      LONG
	FyDest      LONG
	FxSrc       LONG
	FySrc       LONG
	FcxSrc      LONG
	FcySrc      LONG
	FoffBmiSrc  DWORD
	FcbBmiSrc   DWORD
	FoffBitsSrc DWORD
	FcbBitsSrc  DWORD
	FiUsageSrc  DWORD
	FiStartScan DWORD
	FcScans     DWORD
} /* wingdi.h:4044:11 */

type EMRSETDIBITSTODEVICE = TagEMRSETDIBITSTODEVICE /* wingdi.h:4060:5 */
type PEMRSETDIBITSTODEVICE = uintptr                /* wingdi.h:4060:26 */

type TagEMRSTRETCHDIBITS = struct {
	Femr        EMR
	FrclBounds  RECTL
	FxDest      LONG
	FyDest      LONG
	FxSrc       LONG
	FySrc       LONG
	FcxSrc      LONG
	FcySrc      LONG
	FoffBmiSrc  DWORD
	FcbBmiSrc   DWORD
	FoffBitsSrc DWORD
	FcbBitsSrc  DWORD
	FiUsageSrc  DWORD
	FdwRop      DWORD
	FcxDest     LONG
	FcyDest     LONG
} /* wingdi.h:4062:11 */

type EMRSTRETCHDIBITS = TagEMRSTRETCHDIBITS /* wingdi.h:4079:5 */
type PEMRSTRETCHDIBITS = uintptr            /* wingdi.h:4079:22 */

type TagEMREXTCREATEFONTINDIRECTW = struct {
	Femr    EMR
	FihFont DWORD
	Felfw   EXTLOGFONTW
} /* wingdi.h:4081:11 */

type EMREXTCREATEFONTINDIRECTW = TagEMREXTCREATEFONTINDIRECTW /* wingdi.h:4085:5 */
type PEMREXTCREATEFONTINDIRECTW = uintptr                     /* wingdi.h:4085:31 */

type TagEMRCREATEPALETTE = struct {
	Femr   EMR
	FihPal DWORD
	Flgpl  LOGPALETTE
} /* wingdi.h:4087:11 */

type EMRCREATEPALETTE = TagEMRCREATEPALETTE /* wingdi.h:4091:5 */
type PEMRCREATEPALETTE = uintptr            /* wingdi.h:4091:22 */

type TagEMRCREATEPEN = struct {
	Femr   EMR
	FihPen DWORD
	Flopn  LOGPEN
} /* wingdi.h:4093:11 */

type EMRCREATEPEN = TagEMRCREATEPEN /* wingdi.h:4097:5 */
type PEMRCREATEPEN = uintptr        /* wingdi.h:4097:18 */

type TagEMREXTCREATEPEN = struct {
	Femr         EMR
	FihPen       DWORD
	FoffBmi      DWORD
	FcbBmi       DWORD
	FoffBits     DWORD
	FcbBits      DWORD
	F__ccgo_pad1 [4]byte
	Felp         EXTLOGPEN
} /* wingdi.h:4099:11 */

type EMREXTCREATEPEN = TagEMREXTCREATEPEN /* wingdi.h:4107:5 */
type PEMREXTCREATEPEN = uintptr           /* wingdi.h:4107:21 */

type TagEMRCREATEBRUSHINDIRECT = struct {
	Femr     EMR
	FihBrush DWORD
	Flb      LOGBRUSH32
} /* wingdi.h:4109:11 */

type EMRCREATEBRUSHINDIRECT = TagEMRCREATEBRUSHINDIRECT /* wingdi.h:4113:5 */
type PEMRCREATEBRUSHINDIRECT = uintptr                  /* wingdi.h:4113:28 */

type TagEMRCREATEMONOBRUSH = struct {
	Femr     EMR
	FihBrush DWORD
	FiUsage  DWORD
	FoffBmi  DWORD
	FcbBmi   DWORD
	FoffBits DWORD
	FcbBits  DWORD
} /* wingdi.h:4115:11 */

type EMRCREATEMONOBRUSH = TagEMRCREATEMONOBRUSH /* wingdi.h:4123:5 */
type PEMRCREATEMONOBRUSH = uintptr              /* wingdi.h:4123:24 */

type TagEMRCREATEDIBPATTERNBRUSHPT = struct {
	Femr     EMR
	FihBrush DWORD
	FiUsage  DWORD
	FoffBmi  DWORD
	FcbBmi   DWORD
	FoffBits DWORD
	FcbBits  DWORD
} /* wingdi.h:4125:11 */

type EMRCREATEDIBPATTERNBRUSHPT = TagEMRCREATEDIBPATTERNBRUSHPT /* wingdi.h:4133:5 */
type PEMRCREATEDIBPATTERNBRUSHPT = uintptr                      /* wingdi.h:4133:32 */

type TagEMRFORMAT = struct {
	FdSignature DWORD
	FnVersion   DWORD
	FcbData     DWORD
	FoffData    DWORD
} /* wingdi.h:4135:11 */

type EMRFORMAT = TagEMRFORMAT /* wingdi.h:4140:5 */
type PEMRFORMAT = uintptr     /* wingdi.h:4140:15 */

type TagEMRGLSRECORD = struct {
	Femr         EMR
	FcbData      DWORD
	FData        [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:4142:11 */

type EMRGLSRECORD = TagEMRGLSRECORD /* wingdi.h:4146:5 */
type PEMRGLSRECORD = uintptr        /* wingdi.h:4146:18 */

type TagEMRGLSBOUNDEDRECORD = struct {
	Femr         EMR
	FrclBounds   RECTL
	FcbData      DWORD
	FData        [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:4148:11 */

type EMRGLSBOUNDEDRECORD = TagEMRGLSBOUNDEDRECORD /* wingdi.h:4153:5 */
type PEMRGLSBOUNDEDRECORD = uintptr               /* wingdi.h:4153:25 */

type TagEMRPIXELFORMAT = struct {
	Femr EMR
	Fpfd PIXELFORMATDESCRIPTOR
} /* wingdi.h:4155:11 */

type EMRPIXELFORMAT = TagEMRPIXELFORMAT /* wingdi.h:4158:5 */
type PEMRPIXELFORMAT = uintptr          /* wingdi.h:4158:20 */

type TagEMRCREATECOLORSPACE = struct {
	Femr  EMR
	FihCS DWORD
	Flcs  LOGCOLORSPACEA
} /* wingdi.h:4160:11 */

type EMRCREATECOLORSPACE = TagEMRCREATECOLORSPACE /* wingdi.h:4164:5 */
type PEMRCREATECOLORSPACE = uintptr               /* wingdi.h:4164:25 */

type TagEMRSETCOLORSPACE = struct {
	Femr  EMR
	FihCS DWORD
} /* wingdi.h:4166:11 */

type EMRSETCOLORSPACE = TagEMRSETCOLORSPACE    /* wingdi.h:4169:5 */
type PEMRSETCOLORSPACE = uintptr               /* wingdi.h:4169:22 */
type EMRSELECTCOLORSPACE = TagEMRSETCOLORSPACE /* wingdi.h:4169:41 */
type PEMRSELECTCOLORSPACE = uintptr            /* wingdi.h:4169:61 */
type EMRDELETECOLORSPACE = TagEMRSETCOLORSPACE /* wingdi.h:4169:83 */
type PEMRDELETECOLORSPACE = uintptr            /* wingdi.h:4169:103 */

type TagEMREXTESCAPE = struct {
	Femr         EMR
	FiEscape     INT
	FcbEscData   INT
	FEscData     [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:4171:11 */

type EMREXTESCAPE = TagEMREXTESCAPE  /* wingdi.h:4176:5 */
type PEMREXTESCAPE = uintptr         /* wingdi.h:4176:18 */
type EMRDRAWESCAPE = TagEMREXTESCAPE /* wingdi.h:4176:33 */
type PEMRDRAWESCAPE = uintptr        /* wingdi.h:4176:47 */

type TagEMRNAMEDESCAPE = struct {
	Femr         EMR
	FiEscape     INT
	FcbDriver    INT
	FcbEscData   INT
	FEscData     [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:4178:11 */

type EMRNAMEDESCAPE = TagEMRNAMEDESCAPE /* wingdi.h:4184:5 */
type PEMRNAMEDESCAPE = uintptr          /* wingdi.h:4184:20 */

type TagEMRSETICMPROFILE = struct {
	Femr         EMR
	FdwFlags     DWORD
	FcbName      DWORD
	FcbData      DWORD
	FData        [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:4188:11 */

type EMRSETICMPROFILE = TagEMRSETICMPROFILE  /* wingdi.h:4194:5 */
type PEMRSETICMPROFILE = uintptr             /* wingdi.h:4194:22 */
type EMRSETICMPROFILEA = TagEMRSETICMPROFILE /* wingdi.h:4194:41 */
type PEMRSETICMPROFILEA = uintptr            /* wingdi.h:4194:59 */
type EMRSETICMPROFILEW = TagEMRSETICMPROFILE /* wingdi.h:4194:79 */
type PEMRSETICMPROFILEW = uintptr            /* wingdi.h:4194:97 */

type TagEMRCREATECOLORSPACEW = struct {
	Femr         EMR
	FihCS        DWORD
	Flcs         LOGCOLORSPACEW
	FdwFlags     DWORD
	FcbData      DWORD
	FData        [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:4198:11 */

type EMRCREATECOLORSPACEW = TagEMRCREATECOLORSPACEW /* wingdi.h:4205:5 */
type PEMRCREATECOLORSPACEW = uintptr                /* wingdi.h:4205:26 */

type TagCOLORMATCHTOTARGET = struct {
	Femr         EMR
	FdwAction    DWORD
	FdwFlags     DWORD
	FcbName      DWORD
	FcbData      DWORD
	FData        [1]BYTE
	F__ccgo_pad1 [3]byte
} /* wingdi.h:4209:11 */

type EMRCOLORMATCHTOTARGET = TagCOLORMATCHTOTARGET /* wingdi.h:4216:5 */
type PEMRCOLORMATCHTOTARGET = uintptr              /* wingdi.h:4216:27 */

type TagCOLORCORRECTPALETTE = struct {
	Femr         EMR
	FihPalette   DWORD
	FnFirstEntry DWORD
	FnPalEntries DWORD
	FnReserved   DWORD
} /* wingdi.h:4218:11 */

type EMRCOLORCORRECTPALETTE = TagCOLORCORRECTPALETTE /* wingdi.h:4224:5 */
type PEMRCOLORCORRECTPALETTE = uintptr               /* wingdi.h:4224:28 */

type TagEMRALPHABLEND = struct {
	Femr          EMR
	FrclBounds    RECTL
	FxDest        LONG
	FyDest        LONG
	FcxDest       LONG
	FcyDest       LONG
	FdwRop        DWORD
	FxSrc         LONG
	FySrc         LONG
	FxformSrc     XFORM
	FcrBkColorSrc COLORREF
	FiUsageSrc    DWORD
	FoffBmiSrc    DWORD
	FcbBmiSrc     DWORD
	FoffBitsSrc   DWORD
	FcbBitsSrc    DWORD
	FcxSrc        LONG
	FcySrc        LONG
} /* wingdi.h:4226:11 */

type EMRALPHABLEND = TagEMRALPHABLEND /* wingdi.h:4245:5 */
type PEMRALPHABLEND = uintptr         /* wingdi.h:4245:19 */

type TagEMRGRADIENTFILL = struct {
	Femr       EMR
	FrclBounds RECTL
	FnVer      DWORD
	FnTri      DWORD
	FulMode    ULONG
	FVer       [1]TRIVERTEX
} /* wingdi.h:4247:11 */

type EMRGRADIENTFILL = TagEMRGRADIENTFILL /* wingdi.h:4254:5 */
type PEMRGRADIENTFILL = uintptr           /* wingdi.h:4254:21 */

type TagEMRTRANSPARENTBLT = struct {
	Femr          EMR
	FrclBounds    RECTL
	FxDest        LONG
	FyDest        LONG
	FcxDest       LONG
	FcyDest       LONG
	FdwRop        DWORD
	FxSrc         LONG
	FySrc         LONG
	FxformSrc     XFORM
	FcrBkColorSrc COLORREF
	FiUsageSrc    DWORD
	FoffBmiSrc    DWORD
	FcbBmiSrc     DWORD
	FoffBitsSrc   DWORD
	FcbBitsSrc    DWORD
	FcxSrc        LONG
	FcySrc        LONG
} /* wingdi.h:4256:11 */

type EMRTRANSPARENTBLT = TagEMRTRANSPARENTBLT /* wingdi.h:4275:5 */
type PEMRTRANSPARENTBLT = uintptr             /* wingdi.h:4275:23 */

type X_POINTFLOAT = struct {
	Fx FLOAT
	Fy FLOAT
} /* wingdi.h:4302:11 */

type POINTFLOAT = X_POINTFLOAT /* wingdi.h:4305:5 */
type PPOINTFLOAT = uintptr     /* wingdi.h:4305:16 */

type X_GLYPHMETRICSFLOAT = struct {
	FgmfBlackBoxX     FLOAT
	FgmfBlackBoxY     FLOAT
	FgmfptGlyphOrigin POINTFLOAT
	FgmfCellIncX      FLOAT
	FgmfCellIncY      FLOAT
} /* wingdi.h:4307:11 */

type GLYPHMETRICSFLOAT = X_GLYPHMETRICSFLOAT /* wingdi.h:4313:5 */
type PGLYPHMETRICSFLOAT = uintptr            /* wingdi.h:4313:23 */
type LPGLYPHMETRICSFLOAT = uintptr           /* wingdi.h:4313:43 */

type TagLAYERPLANEDESCRIPTOR = struct {
	FnSize           WORD
	FnVersion        WORD
	FdwFlags         DWORD
	FiPixelType      BYTE
	FcColorBits      BYTE
	FcRedBits        BYTE
	FcRedShift       BYTE
	FcGreenBits      BYTE
	FcGreenShift     BYTE
	FcBlueBits       BYTE
	FcBlueShift      BYTE
	FcAlphaBits      BYTE
	FcAlphaShift     BYTE
	FcAccumBits      BYTE
	FcAccumRedBits   BYTE
	FcAccumGreenBits BYTE
	FcAccumBlueBits  BYTE
	FcAccumAlphaBits BYTE
	FcDepthBits      BYTE
	FcStencilBits    BYTE
	FcAuxBuffers     BYTE
	FiLayerPlane     BYTE
	FbReserved       BYTE
	FcrTransparent   COLORREF
} /* wingdi.h:4323:11 */

type LAYERPLANEDESCRIPTOR = TagLAYERPLANEDESCRIPTOR /* wingdi.h:4348:5 */
type PLAYERPLANEDESCRIPTOR = uintptr                /* wingdi.h:4348:26 */
type LPLAYERPLANEDESCRIPTOR = uintptr               /* wingdi.h:4348:49 */

type X_WGLSWAP = struct {
	Fhdc         HDC
	FuiFlags     UINT
	F__ccgo_pad1 [4]byte
} /* wingdi.h:4402:11 */

type WGLSWAP = X_WGLSWAP /* wingdi.h:4405:5 */
type PWGLSWAP = uintptr  /* wingdi.h:4405:13 */
type LPWGLSWAP = uintptr /* wingdi.h:4405:23 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with GCC; see the file COPYING.  If not, write to
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.

// As a special exception, if you include this header file into source
//    files compiled by GCC, this header file does not by itself cause
//    the resulting executable to be covered by the GNU General Public
//    License.  This exception does not however invalidate any other
//    reasons why the executable file might be covered by the GNU General
//    Public License.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

// include mingw stuff
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Copyright (C) 1989-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type HDWP = HANDLE                    /* winuser.h:32:18 */
type LPMENUTEMPLATEA = PVOID          /* winuser.h:35:17 */
type LPMENUTEMPLATEW = PVOID          /* winuser.h:36:17 */
type LPMENUTEMPLATE = LPMENUTEMPLATEA /* winuser.h:39:3 */

type WNDPROC = uintptr /* winuser.h:41:19 */

type DLGPROC = uintptr /* winuser.h:46:19 */

type TIMERPROC = uintptr      /* winuser.h:50:16 */
type GRAYSTRINGPROC = uintptr /* winuser.h:51:19 */
type WNDENUMPROC = uintptr    /* winuser.h:52:19 */
type HOOKPROC = uintptr       /* winuser.h:53:19 */
type SENDASYNCPROC = uintptr  /* winuser.h:54:16 */

type PROPENUMPROCA = uintptr /* winuser.h:56:19 */
type PROPENUMPROCW = uintptr /* winuser.h:57:19 */

type PROPENUMPROCEXA = uintptr /* winuser.h:59:19 */
type PROPENUMPROCEXW = uintptr /* winuser.h:60:19 */

type EDITWORDBREAKPROCA = uintptr /* winuser.h:62:15 */
type EDITWORDBREAKPROCW = uintptr /* winuser.h:63:15 */

type DRAWSTATEPROC = uintptr /* winuser.h:65:19 */

type PROPENUMPROC = PROPENUMPROCA           /* winuser.h:93:3 */
type PROPENUMPROCEX = PROPENUMPROCEXA       /* winuser.h:94:3 */
type EDITWORDBREAKPROC = EDITWORDBREAKPROCA /* winuser.h:95:3 */

type NAMEENUMPROCA = uintptr          /* winuser.h:98:19 */
type NAMEENUMPROCW = uintptr          /* winuser.h:99:19 */
type WINSTAENUMPROCA = NAMEENUMPROCA  /* winuser.h:100:25 */
type WINSTAENUMPROCW = NAMEENUMPROCW  /* winuser.h:101:25 */
type DESKTOPENUMPROCA = NAMEENUMPROCA /* winuser.h:102:25 */
type DESKTOPENUMPROCW = NAMEENUMPROCW /* winuser.h:103:25 */

type WINSTAENUMPROC = WINSTAENUMPROCA   /* winuser.h:113:3 */
type DESKTOPENUMPROC = DESKTOPENUMPROCA /* winuser.h:114:3 */

type TagCBT_CREATEWNDA = struct {
	Flpcs            uintptr
	FhwndInsertAfter HWND
} /* winuser.h:494:11 */

type TagCREATESTRUCTA = struct {
	FlpCreateParams LPVOID
	FhInstance      HINSTANCE
	FhMenu          HMENU
	FhwndParent     HWND
	Fcy             int32
	Fcx             int32
	Fy              int32
	Fx              int32
	Fstyle          LONG
	F__ccgo_pad1    [4]byte
	FlpszName       LPCSTR
	FlpszClass      LPCSTR
	FdwExStyle      DWORD
	F__ccgo_pad2    [4]byte
} /* winuser.h:494:11 */

type CBT_CREATEWNDA = TagCBT_CREATEWNDA /* winuser.h:497:5 */
type LPCBT_CREATEWNDA = uintptr         /* winuser.h:497:20 */

type TagCBT_CREATEWNDW = struct {
	Flpcs            uintptr
	FhwndInsertAfter HWND
} /* winuser.h:499:11 */

type TagCREATESTRUCTW = struct {
	FlpCreateParams LPVOID
	FhInstance      HINSTANCE
	FhMenu          HMENU
	FhwndParent     HWND
	Fcy             int32
	Fcx             int32
	Fy              int32
	Fx              int32
	Fstyle          LONG
	F__ccgo_pad1    [4]byte
	FlpszName       LPCWSTR
	FlpszClass      LPCWSTR
	FdwExStyle      DWORD
	F__ccgo_pad2    [4]byte
} /* winuser.h:499:11 */

type CBT_CREATEWNDW = TagCBT_CREATEWNDW /* winuser.h:502:5 */
type LPCBT_CREATEWNDW = uintptr         /* winuser.h:502:20 */

type CBT_CREATEWND = CBT_CREATEWNDA     /* winuser.h:504:3 */
type LPCBT_CREATEWND = LPCBT_CREATEWNDA /* winuser.h:505:3 */

type TagCBTACTIVATESTRUCT = struct {
	FfMouse      WINBOOL
	F__ccgo_pad1 [4]byte
	FhWndActive  HWND
} /* winuser.h:507:11 */

type CBTACTIVATESTRUCT = TagCBTACTIVATESTRUCT /* winuser.h:510:5 */
type LPCBTACTIVATESTRUCT = uintptr            /* winuser.h:510:23 */

type TagWTSSESSION_NOTIFICATION = struct {
	FcbSize      DWORD
	FdwSessionId DWORD
} /* winuser.h:514:11 */

type WTSSESSION_NOTIFICATION = TagWTSSESSION_NOTIFICATION /* winuser.h:517:5 */
type PWTSSESSION_NOTIFICATION = uintptr                   /* winuser.h:517:29 */

type SHELLHOOKINFO = struct {
	Fhwnd HWND
	Frc   RECT
}                              /* winuser.h:638:5 */
type LPSHELLHOOKINFO = uintptr /* winuser.h:638:19 */

type TagEVENTMSG = struct {
	Fmessage UINT
	FparamL  UINT
	FparamH  UINT
	Ftime    DWORD
	Fhwnd    HWND
} /* winuser.h:640:11 */

type EVENTMSG = TagEVENTMSG  /* winuser.h:646:5 */
type PEVENTMSGMSG = uintptr  /* winuser.h:646:14 */
type NPEVENTMSGMSG = uintptr /* winuser.h:646:28 */
type LPEVENTMSGMSG = uintptr /* winuser.h:646:43 */

type PEVENTMSG = uintptr  /* winuser.h:648:30 */
type NPEVENTMSG = uintptr /* winuser.h:648:41 */
type LPEVENTMSG = uintptr /* winuser.h:648:53 */

type TagCWPSTRUCT = struct {
	FlParam      LPARAM
	FwParam      WPARAM
	Fmessage     UINT
	F__ccgo_pad1 [4]byte
	Fhwnd        HWND
} /* winuser.h:650:11 */

type CWPSTRUCT = TagCWPSTRUCT /* winuser.h:655:5 */
type PCWPSTRUCT = uintptr     /* winuser.h:655:15 */
type NPCWPSTRUCT = uintptr    /* winuser.h:655:27 */
type LPCWPSTRUCT = uintptr    /* winuser.h:655:40 */

type TagCWPRETSTRUCT = struct {
	FlResult     LRESULT
	FlParam      LPARAM
	FwParam      WPARAM
	Fmessage     UINT
	F__ccgo_pad1 [4]byte
	Fhwnd        HWND
} /* winuser.h:657:11 */

type CWPRETSTRUCT = TagCWPRETSTRUCT /* winuser.h:663:5 */
type PCWPRETSTRUCT = uintptr        /* winuser.h:663:18 */
type NPCWPRETSTRUCT = uintptr       /* winuser.h:663:33 */
type LPCWPRETSTRUCT = uintptr       /* winuser.h:663:49 */

type TagKBDLLHOOKSTRUCT = struct {
	FvkCode      DWORD
	FscanCode    DWORD
	Fflags       DWORD
	Ftime        DWORD
	FdwExtraInfo ULONG_PTR
} /* winuser.h:676:11 */

type KBDLLHOOKSTRUCT = TagKBDLLHOOKSTRUCT /* winuser.h:682:5 */
type LPKBDLLHOOKSTRUCT = uintptr          /* winuser.h:682:21 */
type PKBDLLHOOKSTRUCT = uintptr           /* winuser.h:682:40 */

type TagMSLLHOOKSTRUCT = struct {
	Fpt          POINT
	FmouseData   DWORD
	Fflags       DWORD
	Ftime        DWORD
	F__ccgo_pad1 [4]byte
	FdwExtraInfo ULONG_PTR
} /* winuser.h:684:11 */

type MSLLHOOKSTRUCT = TagMSLLHOOKSTRUCT /* winuser.h:690:5 */
type LPMSLLHOOKSTRUCT = uintptr         /* winuser.h:690:20 */
type PMSLLHOOKSTRUCT = uintptr          /* winuser.h:690:38 */

type TagDEBUGHOOKINFO = struct {
	FidThread          DWORD
	FidThreadInstaller DWORD
	FlParam            LPARAM
	FwParam            WPARAM
	Fcode              int32
	F__ccgo_pad1       [4]byte
} /* winuser.h:692:11 */

type DEBUGHOOKINFO = TagDEBUGHOOKINFO /* winuser.h:698:5 */
type PDEBUGHOOKINFO = uintptr         /* winuser.h:698:19 */
type NPDEBUGHOOKINFO = uintptr        /* winuser.h:698:35 */
type LPDEBUGHOOKINFO = uintptr        /* winuser.h:698:52 */

type TagMOUSEHOOKSTRUCT = struct {
	Fpt           POINT
	Fhwnd         HWND
	FwHitTestCode UINT
	F__ccgo_pad1  [4]byte
	FdwExtraInfo  ULONG_PTR
} /* winuser.h:700:11 */

type MOUSEHOOKSTRUCT = TagMOUSEHOOKSTRUCT /* winuser.h:705:5 */
type LPMOUSEHOOKSTRUCT = uintptr          /* winuser.h:705:21 */
type PMOUSEHOOKSTRUCT = uintptr           /* winuser.h:705:40 */

type TagMOUSEHOOKSTRUCTEX = struct {
	F__unnamed   MOUSEHOOKSTRUCT
	FmouseData   DWORD
	F__ccgo_pad1 [4]byte
} /* winuser.h:712:11 */

type MOUSEHOOKSTRUCTEX = TagMOUSEHOOKSTRUCTEX /* winuser.h:715:5 */
type LPMOUSEHOOKSTRUCTEX = uintptr            /* winuser.h:715:23 */
type PMOUSEHOOKSTRUCTEX = uintptr             /* winuser.h:715:44 */

type TagHARDWAREHOOKSTRUCT = struct {
	Fhwnd        HWND
	Fmessage     UINT
	F__ccgo_pad1 [4]byte
	FwParam      WPARAM
	FlParam      LPARAM
} /* winuser.h:718:11 */

type HARDWAREHOOKSTRUCT = TagHARDWAREHOOKSTRUCT /* winuser.h:723:5 */
type LPHARDWAREHOOKSTRUCT = uintptr             /* winuser.h:723:24 */
type PHARDWAREHOOKSTRUCT = uintptr              /* winuser.h:723:46 */

type TagMOUSEMOVEPOINT = struct {
	Fx           int32
	Fy           int32
	Ftime        DWORD
	F__ccgo_pad1 [4]byte
	FdwExtraInfo ULONG_PTR
} /* winuser.h:759:11 */

type MOUSEMOVEPOINT = TagMOUSEMOVEPOINT /* winuser.h:764:5 */
type PMOUSEMOVEPOINT = uintptr          /* winuser.h:764:20 */
type LPMOUSEMOVEPOINT = uintptr         /* winuser.h:764:37 */

type TagUSEROBJECTFLAGS = struct {
	FfInherit  WINBOOL
	FfReserved WINBOOL
	FdwFlags   DWORD
} /* winuser.h:866:11 */

type USEROBJECTFLAGS = TagUSEROBJECTFLAGS /* winuser.h:870:5 */
type PUSEROBJECTFLAGS = uintptr           /* winuser.h:870:21 */

type TagWNDCLASSEXA = struct {
	FcbSize        UINT
	Fstyle         UINT
	FlpfnWndProc   WNDPROC
	FcbClsExtra    int32
	FcbWndExtra    int32
	FhInstance     HINSTANCE
	FhIcon         HICON
	FhCursor       HCURSOR
	FhbrBackground HBRUSH
	FlpszMenuName  LPCSTR
	FlpszClassName LPCSTR
	FhIconSm       HICON
} /* winuser.h:883:11 */

type WNDCLASSEXA = TagWNDCLASSEXA /* winuser.h:896:5 */
type PWNDCLASSEXA = uintptr       /* winuser.h:896:17 */
type NPWNDCLASSEXA = uintptr      /* winuser.h:896:31 */
type LPWNDCLASSEXA = uintptr      /* winuser.h:896:46 */

type TagWNDCLASSEXW = struct {
	FcbSize        UINT
	Fstyle         UINT
	FlpfnWndProc   WNDPROC
	FcbClsExtra    int32
	FcbWndExtra    int32
	FhInstance     HINSTANCE
	FhIcon         HICON
	FhCursor       HCURSOR
	FhbrBackground HBRUSH
	FlpszMenuName  LPCWSTR
	FlpszClassName LPCWSTR
	FhIconSm       HICON
} /* winuser.h:898:11 */

type WNDCLASSEXW = TagWNDCLASSEXW /* winuser.h:911:5 */
type PWNDCLASSEXW = uintptr       /* winuser.h:911:17 */
type NPWNDCLASSEXW = uintptr      /* winuser.h:911:31 */
type LPWNDCLASSEXW = uintptr      /* winuser.h:911:46 */

type WNDCLASSEX = WNDCLASSEXA     /* winuser.h:913:3 */
type PWNDCLASSEX = PWNDCLASSEXA   /* winuser.h:914:3 */
type NPWNDCLASSEX = NPWNDCLASSEXA /* winuser.h:915:3 */
type LPWNDCLASSEX = LPWNDCLASSEXA /* winuser.h:916:3 */

type TagWNDCLASSA = struct {
	Fstyle         UINT
	F__ccgo_pad1   [4]byte
	FlpfnWndProc   WNDPROC
	FcbClsExtra    int32
	FcbWndExtra    int32
	FhInstance     HINSTANCE
	FhIcon         HICON
	FhCursor       HCURSOR
	FhbrBackground HBRUSH
	FlpszMenuName  LPCSTR
	FlpszClassName LPCSTR
} /* winuser.h:918:11 */

type WNDCLASSA = TagWNDCLASSA /* winuser.h:929:5 */
type PWNDCLASSA = uintptr     /* winuser.h:929:15 */
type NPWNDCLASSA = uintptr    /* winuser.h:929:27 */
type LPWNDCLASSA = uintptr    /* winuser.h:929:40 */

type TagWNDCLASSW = struct {
	Fstyle         UINT
	F__ccgo_pad1   [4]byte
	FlpfnWndProc   WNDPROC
	FcbClsExtra    int32
	FcbWndExtra    int32
	FhInstance     HINSTANCE
	FhIcon         HICON
	FhCursor       HCURSOR
	FhbrBackground HBRUSH
	FlpszMenuName  LPCWSTR
	FlpszClassName LPCWSTR
} /* winuser.h:931:11 */

type WNDCLASSW = TagWNDCLASSW /* winuser.h:942:5 */
type PWNDCLASSW = uintptr     /* winuser.h:942:15 */
type NPWNDCLASSW = uintptr    /* winuser.h:942:27 */
type LPWNDCLASSW = uintptr    /* winuser.h:942:40 */

type WNDCLASS = WNDCLASSA     /* winuser.h:944:3 */
type PWNDCLASS = PWNDCLASSA   /* winuser.h:945:3 */
type NPWNDCLASS = NPWNDCLASSA /* winuser.h:946:3 */
type LPWNDCLASS = LPWNDCLASSA /* winuser.h:947:3 */

type TagMSG = struct {
	Fhwnd        HWND
	Fmessage     UINT
	F__ccgo_pad1 [4]byte
	FwParam      WPARAM
	FlParam      LPARAM
	Ftime        DWORD
	Fpt          POINT
	F__ccgo_pad2 [4]byte
} /* winuser.h:955:11 */

type MSG = TagMSG    /* winuser.h:962:5 */
type PMSG = uintptr  /* winuser.h:962:9 */
type NPMSG = uintptr /* winuser.h:962:15 */
type LPMSG = uintptr /* winuser.h:962:22 */

type TagMINMAXINFO = struct {
	FptReserved     POINT
	FptMaxSize      POINT
	FptMaxPosition  POINT
	FptMinTrackSize POINT
	FptMaxTrackSize POINT
} /* winuser.h:1072:11 */

type MINMAXINFO = TagMINMAXINFO /* winuser.h:1078:5 */
type PMINMAXINFO = uintptr      /* winuser.h:1078:16 */
type LPMINMAXINFO = uintptr     /* winuser.h:1078:29 */

type TagCOPYDATASTRUCT = struct {
	FdwData      ULONG_PTR
	FcbData      DWORD
	F__ccgo_pad1 [4]byte
	FlpData      PVOID
} /* winuser.h:1115:11 */

type COPYDATASTRUCT = TagCOPYDATASTRUCT /* winuser.h:1119:5 */
type PCOPYDATASTRUCT = uintptr          /* winuser.h:1119:20 */

type TagMDINEXTMENU = struct {
	FhmenuIn   HMENU
	FhmenuNext HMENU
	FhwndNext  HWND
} /* winuser.h:1121:11 */

type MDINEXTMENU = TagMDINEXTMENU /* winuser.h:1125:5 */
type PMDINEXTMENU = uintptr       /* winuser.h:1125:17 */
type LPMDINEXTMENU = uintptr      /* winuser.h:1125:31 */

type TagWINDOWPOS = struct {
	Fhwnd            HWND
	FhwndInsertAfter HWND
	Fx               int32
	Fy               int32
	Fcx              int32
	Fcy              int32
	Fflags           UINT
	F__ccgo_pad1     [4]byte
} /* winuser.h:1520:11 */

type WINDOWPOS = TagWINDOWPOS /* winuser.h:1528:5 */
type LPWINDOWPOS = uintptr    /* winuser.h:1528:15 */
type PWINDOWPOS = uintptr     /* winuser.h:1528:28 */

type TagNCCALCSIZE_PARAMS = struct {
	Frgrc  [3]RECT
	Flppos PWINDOWPOS
} /* winuser.h:1530:11 */

type NCCALCSIZE_PARAMS = TagNCCALCSIZE_PARAMS /* winuser.h:1533:5 */
type LPNCCALCSIZE_PARAMS = uintptr            /* winuser.h:1533:23 */

type TagTRACKMOUSEEVENT = struct {
	FcbSize      DWORD
	FdwFlags     DWORD
	FhwndTrack   HWND
	FdwHoverTime DWORD
	F__ccgo_pad1 [4]byte
} /* winuser.h:1567:11 */

type TRACKMOUSEEVENT = TagTRACKMOUSEEVENT /* winuser.h:1572:5 */
type LPTRACKMOUSEEVENT = uintptr          /* winuser.h:1572:21 */

type TagACCEL = struct {
	FfVirt       BYTE
	F__ccgo_pad1 [1]byte
	Fkey         WORD
	Fcmd         WORD
} /* winuser.h:1817:11 */

type ACCEL = TagACCEL  /* winuser.h:1821:5 */
type LPACCEL = uintptr /* winuser.h:1821:11 */

type TagPAINTSTRUCT = struct {
	Fhdc         HDC
	FfErase      WINBOOL
	FrcPaint     RECT
	FfRestore    WINBOOL
	FfIncUpdate  WINBOOL
	FrgbReserved [32]BYTE
	F__ccgo_pad1 [4]byte
} /* winuser.h:1823:11 */

type PAINTSTRUCT = TagPAINTSTRUCT /* winuser.h:1830:5 */
type PPAINTSTRUCT = uintptr       /* winuser.h:1830:17 */
type NPPAINTSTRUCT = uintptr      /* winuser.h:1830:31 */
type LPPAINTSTRUCT = uintptr      /* winuser.h:1830:46 */

type CREATESTRUCTA = TagCREATESTRUCTA /* winuser.h:1845:5 */
type LPCREATESTRUCTA = uintptr        /* winuser.h:1845:19 */

type CREATESTRUCTW = TagCREATESTRUCTW /* winuser.h:1860:5 */
type LPCREATESTRUCTW = uintptr        /* winuser.h:1860:19 */

type CREATESTRUCT = CREATESTRUCTA     /* winuser.h:1862:3 */
type LPCREATESTRUCT = LPCREATESTRUCTA /* winuser.h:1863:3 */

type TagWINDOWPLACEMENT = struct {
	Flength           UINT
	Fflags            UINT
	FshowCmd          UINT
	FptMinPosition    POINT
	FptMaxPosition    POINT
	FrcNormalPosition RECT
} /* winuser.h:1865:11 */

type WINDOWPLACEMENT = TagWINDOWPLACEMENT /* winuser.h:1872:5 */
type PWINDOWPLACEMENT = uintptr           /* winuser.h:1873:27 */
type LPWINDOWPLACEMENT = uintptr          /* winuser.h:1873:45 */

type TagNMHDR = struct {
	FhwndFrom    HWND
	FidFrom      UINT_PTR
	Fcode        UINT
	F__ccgo_pad1 [4]byte
} /* winuser.h:1881:11 */

type NMHDR = TagNMHDR /* winuser.h:1885:5 */

type LPNMHDR = uintptr /* winuser.h:1889:17 */

type TagSTYLESTRUCT = struct {
	FstyleOld DWORD
	FstyleNew DWORD
} /* winuser.h:1891:11 */

type STYLESTRUCT = TagSTYLESTRUCT /* winuser.h:1894:5 */
type LPSTYLESTRUCT = uintptr      /* winuser.h:1894:17 */

type TagMEASUREITEMSTRUCT = struct {
	FCtlType     UINT
	FCtlID       UINT
	FitemID      UINT
	FitemWidth   UINT
	FitemHeight  UINT
	F__ccgo_pad1 [4]byte
	FitemData    ULONG_PTR
} /* winuser.h:1920:11 */

type MEASUREITEMSTRUCT = TagMEASUREITEMSTRUCT /* winuser.h:1927:5 */
type PMEASUREITEMSTRUCT = uintptr             /* winuser.h:1927:23 */
type LPMEASUREITEMSTRUCT = uintptr            /* winuser.h:1927:43 */

type TagDRAWITEMSTRUCT = struct {
	FCtlType     UINT
	FCtlID       UINT
	FitemID      UINT
	FitemAction  UINT
	FitemState   UINT
	F__ccgo_pad1 [4]byte
	FhwndItem    HWND
	FhDC         HDC
	FrcItem      RECT
	FitemData    ULONG_PTR
} /* winuser.h:1929:11 */

type DRAWITEMSTRUCT = TagDRAWITEMSTRUCT /* winuser.h:1939:5 */
type PDRAWITEMSTRUCT = uintptr          /* winuser.h:1939:20 */
type LPDRAWITEMSTRUCT = uintptr         /* winuser.h:1939:37 */

type TagDELETEITEMSTRUCT = struct {
	FCtlType     UINT
	FCtlID       UINT
	FitemID      UINT
	F__ccgo_pad1 [4]byte
	FhwndItem    HWND
	FitemData    ULONG_PTR
} /* winuser.h:1941:11 */

type DELETEITEMSTRUCT = TagDELETEITEMSTRUCT /* winuser.h:1947:5 */
type PDELETEITEMSTRUCT = uintptr            /* winuser.h:1947:22 */
type LPDELETEITEMSTRUCT = uintptr           /* winuser.h:1947:41 */

type TagCOMPAREITEMSTRUCT = struct {
	FCtlType     UINT
	FCtlID       UINT
	FhwndItem    HWND
	FitemID1     UINT
	F__ccgo_pad1 [4]byte
	FitemData1   ULONG_PTR
	FitemID2     UINT
	F__ccgo_pad2 [4]byte
	FitemData2   ULONG_PTR
	FdwLocaleId  DWORD
	F__ccgo_pad3 [4]byte
} /* winuser.h:1949:11 */

type COMPAREITEMSTRUCT = TagCOMPAREITEMSTRUCT /* winuser.h:1958:5 */
type PCOMPAREITEMSTRUCT = uintptr             /* winuser.h:1958:23 */
type LPCOMPAREITEMSTRUCT = uintptr            /* winuser.h:1958:43 */

type BSMINFO = struct {
	FcbSize      UINT
	F__ccgo_pad1 [4]byte
	Fhdesk       HDESK
	Fhwnd        HWND
	Fluid        LUID
}                       /* winuser.h:2063:5 */
type PBSMINFO = uintptr /* winuser.h:2063:13 */

type HDEVNOTIFY = PVOID    /* winuser.h:2096:17 */
type PHDEVNOTIFY = uintptr /* winuser.h:2097:22 */

type PREGISTERCLASSNAMEW = uintptr /* winuser.h:2198:19 */

type TagUPDATELAYEREDWINDOWINFO = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FhdcDst      HDC
	FpptDst      uintptr
	Fpsize       uintptr
	FhdcSrc      HDC
	FpptSrc      uintptr
	FcrKey       COLORREF
	F__ccgo_pad2 [4]byte
	Fpblend      uintptr
	FdwFlags     DWORD
	F__ccgo_pad3 [4]byte
	FprcDirty    uintptr
} /* winuser.h:2221:11 */

type UPDATELAYEREDWINDOWINFO = TagUPDATELAYEREDWINDOWINFO /* winuser.h:2232:5 */
type PUPDATELAYEREDWINDOWINFO = uintptr                   /* winuser.h:2232:29 */

type FLASHWINFO = struct {
	FcbSize      UINT
	F__ccgo_pad1 [4]byte
	Fhwnd        HWND
	FdwFlags     DWORD
	FuCount      UINT
	FdwTimeout   DWORD
	F__ccgo_pad2 [4]byte
}                          /* winuser.h:2272:5 */
type PFLASHWINFO = uintptr /* winuser.h:2272:16 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type DLGTEMPLATE = struct {
	Fstyle           DWORD
	FdwExtendedStyle DWORD
	Fcdit            WORD
	Fx               int16
	Fy               int16
	Fcx              int16
	Fcy              int16
	F__ccgo_pad1     [2]byte
} /* winuser.h:2346:5 */

type LPDLGTEMPLATEA = uintptr /* winuser.h:2350:23 */
type LPDLGTEMPLATEW = uintptr /* winuser.h:2351:23 */

type LPDLGTEMPLATE = LPDLGTEMPLATEA /* winuser.h:2353:3 */

type LPCDLGTEMPLATEA = uintptr /* winuser.h:2357:29 */
type LPCDLGTEMPLATEW = uintptr /* winuser.h:2358:29 */

type LPCDLGTEMPLATE = LPCDLGTEMPLATEA /* winuser.h:2360:3 */

type DLGITEMTEMPLATE = struct {
	Fstyle           DWORD
	FdwExtendedStyle DWORD
	Fx               int16
	Fy               int16
	Fcx              int16
	Fcy              int16
	Fid              WORD
	F__ccgo_pad1     [2]byte
} /* winuser.h:2372:5 */

type PDLGITEMTEMPLATEA = uintptr /* winuser.h:2374:27 */
type PDLGITEMTEMPLATEW = uintptr /* winuser.h:2375:27 */

type PDLGITEMTEMPLATE = PDLGITEMTEMPLATEA /* winuser.h:2377:3 */

type LPDLGITEMTEMPLATEA = uintptr /* winuser.h:2379:27 */
type LPDLGITEMTEMPLATEW = uintptr /* winuser.h:2380:27 */

type LPDLGITEMTEMPLATE = LPDLGITEMTEMPLATEA /* winuser.h:2382:3 */

type DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = uint32 /* winuser.h:2444:5 */

type DIALOG_DPI_CHANGE_BEHAVIORS = uint32 /* winuser.h:2454:5 */

type TagMOUSEINPUT = struct {
	Fdx          LONG
	Fdy          LONG
	FmouseData   DWORD
	FdwFlags     DWORD
	Ftime        DWORD
	F__ccgo_pad1 [4]byte
	FdwExtraInfo ULONG_PTR
} /* winuser.h:2733:11 */

type MOUSEINPUT = TagMOUSEINPUT /* winuser.h:2740:5 */
type PMOUSEINPUT = uintptr      /* winuser.h:2740:16 */
type LPMOUSEINPUT = uintptr     /* winuser.h:2740:29 */

type TagKEYBDINPUT = struct {
	FwVk         WORD
	FwScan       WORD
	FdwFlags     DWORD
	Ftime        DWORD
	F__ccgo_pad1 [4]byte
	FdwExtraInfo ULONG_PTR
} /* winuser.h:2742:11 */

type KEYBDINPUT = TagKEYBDINPUT /* winuser.h:2748:5 */
type PKEYBDINPUT = uintptr      /* winuser.h:2748:16 */
type LPKEYBDINPUT = uintptr     /* winuser.h:2748:29 */

type TagHARDWAREINPUT = struct {
	FuMsg    DWORD
	FwParamL WORD
	FwParamH WORD
} /* winuser.h:2750:11 */

type HARDWAREINPUT = TagHARDWAREINPUT /* winuser.h:2754:5 */
type PHARDWAREINPUT = uintptr         /* winuser.h:2754:19 */
type LPHARDWAREINPUT = uintptr        /* winuser.h:2754:35 */

type TagINPUT = struct {
	Ftype        DWORD
	F__ccgo_pad1 [4]byte
	F__8         struct{ Fmi MOUSEINPUT }
} /* winuser.h:2756:11 */

type INPUT = TagINPUT  /* winuser.h:2763:5 */
type PINPUT = uintptr  /* winuser.h:2763:11 */
type LPINPUT = uintptr /* winuser.h:2763:19 */

type TagLASTINPUTINFO = struct {
	FcbSize UINT
	FdwTime DWORD
} /* winuser.h:2967:11 */

type LASTINPUTINFO = TagLASTINPUTINFO /* winuser.h:2970:5 */
type PLASTINPUTINFO = uintptr         /* winuser.h:2970:19 */

type TagTPMPARAMS = struct {
	FcbSize    UINT
	FrcExclude RECT
} /* winuser.h:3293:11 */

type TPMPARAMS = TagTPMPARAMS /* winuser.h:3296:5 */

type TagMENUINFO = struct {
	FcbSize          DWORD
	FfMask           DWORD
	FdwStyle         DWORD
	FcyMax           UINT
	FhbrBack         HBRUSH
	FdwContextHelpID DWORD
	F__ccgo_pad1     [4]byte
	FdwMenuData      ULONG_PTR
} /* winuser.h:3298:11 */

type MENUINFO = TagMENUINFO /* winuser.h:3306:5 */
type LPMENUINFO = uintptr   /* winuser.h:3306:14 */

type LPTPMPARAMS = uintptr /* winuser.h:3308:21 */
type LPCMENUINFO = uintptr /* winuser.h:3309:26 */

type TagMENUGETOBJECTINFO = struct {
	FdwFlags DWORD
	FuPos    UINT
	Fhmenu   HMENU
	Friid    PVOID
	FpvObj   PVOID
} /* winuser.h:3319:11 */

type MENUGETOBJECTINFO = TagMENUGETOBJECTINFO /* winuser.h:3325:5 */
type PMENUGETOBJECTINFO = uintptr             /* winuser.h:3325:23 */

type TagMENUITEMINFOA = struct {
	FcbSize        UINT
	FfMask         UINT
	FfType         UINT
	FfState        UINT
	FwID           UINT
	F__ccgo_pad1   [4]byte
	FhSubMenu      HMENU
	FhbmpChecked   HBITMAP
	FhbmpUnchecked HBITMAP
	FdwItemData    ULONG_PTR
	FdwTypeData    LPSTR
	Fcch           UINT
	F__ccgo_pad2   [4]byte
	FhbmpItem      HBITMAP
} /* winuser.h:3327:11 */

type MENUITEMINFOA = TagMENUITEMINFOA /* winuser.h:3340:5 */
type LPMENUITEMINFOA = uintptr        /* winuser.h:3340:19 */

type TagMENUITEMINFOW = struct {
	FcbSize        UINT
	FfMask         UINT
	FfType         UINT
	FfState        UINT
	FwID           UINT
	F__ccgo_pad1   [4]byte
	FhSubMenu      HMENU
	FhbmpChecked   HBITMAP
	FhbmpUnchecked HBITMAP
	FdwItemData    ULONG_PTR
	FdwTypeData    LPWSTR
	Fcch           UINT
	F__ccgo_pad2   [4]byte
	FhbmpItem      HBITMAP
} /* winuser.h:3342:11 */

type MENUITEMINFOW = TagMENUITEMINFOW /* winuser.h:3355:5 */
type LPMENUITEMINFOW = uintptr        /* winuser.h:3355:19 */

type MENUITEMINFO = MENUITEMINFOA     /* winuser.h:3357:3 */
type LPMENUITEMINFO = LPMENUITEMINFOA /* winuser.h:3358:3 */

type LPCMENUITEMINFOA = uintptr /* winuser.h:3360:31 */
type LPCMENUITEMINFOW = uintptr /* winuser.h:3361:31 */

type LPCMENUITEMINFO = LPCMENUITEMINFOA /* winuser.h:3363:3 */

type TagDROPSTRUCT = struct {
	FhwndSource    HWND
	FhwndSink      HWND
	FwFmt          DWORD
	F__ccgo_pad1   [4]byte
	FdwData        ULONG_PTR
	FptDrop        POINT
	FdwControlData DWORD
	F__ccgo_pad2   [4]byte
} /* winuser.h:3411:11 */

type DROPSTRUCT = TagDROPSTRUCT /* winuser.h:3418:5 */
type PDROPSTRUCT = uintptr      /* winuser.h:3418:16 */
type LPDROPSTRUCT = uintptr     /* winuser.h:3418:29 */

type TagDRAWTEXTPARAMS = struct {
	FcbSize        UINT
	FiTabLength    int32
	FiLeftMargin   int32
	FiRightMargin  int32
	FuiLengthDrawn UINT
} /* winuser.h:3465:11 */

type DRAWTEXTPARAMS = TagDRAWTEXTPARAMS /* winuser.h:3471:5 */
type LPDRAWTEXTPARAMS = uintptr         /* winuser.h:3471:20 */

type TagHELPINFO = struct {
	FcbSize       UINT
	FiContextType int32
	FiCtrlId      int32
	F__ccgo_pad1  [4]byte
	FhItemHandle  HANDLE
	FdwContextId  DWORD_PTR
	FMousePos     POINT
} /* winuser.h:3652:11 */

type HELPINFO = TagHELPINFO /* winuser.h:3659:5 */
type LPHELPINFO = uintptr   /* winuser.h:3659:14 */

type MSGBOXCALLBACK = uintptr /* winuser.h:3716:16 */

type TagMSGBOXPARAMSA = struct {
	FcbSize             UINT
	F__ccgo_pad1        [4]byte
	FhwndOwner          HWND
	FhInstance          HINSTANCE
	FlpszText           LPCSTR
	FlpszCaption        LPCSTR
	FdwStyle            DWORD
	F__ccgo_pad2        [4]byte
	FlpszIcon           LPCSTR
	FdwContextHelpId    DWORD_PTR
	FlpfnMsgBoxCallback MSGBOXCALLBACK
	FdwLanguageId       DWORD
	F__ccgo_pad3        [4]byte
} /* winuser.h:3718:11 */

type MSGBOXPARAMSA = TagMSGBOXPARAMSA /* winuser.h:3729:5 */
type PMSGBOXPARAMSA = uintptr         /* winuser.h:3729:19 */
type LPMSGBOXPARAMSA = uintptr        /* winuser.h:3729:35 */

type TagMSGBOXPARAMSW = struct {
	FcbSize             UINT
	F__ccgo_pad1        [4]byte
	FhwndOwner          HWND
	FhInstance          HINSTANCE
	FlpszText           LPCWSTR
	FlpszCaption        LPCWSTR
	FdwStyle            DWORD
	F__ccgo_pad2        [4]byte
	FlpszIcon           LPCWSTR
	FdwContextHelpId    DWORD_PTR
	FlpfnMsgBoxCallback MSGBOXCALLBACK
	FdwLanguageId       DWORD
	F__ccgo_pad3        [4]byte
} /* winuser.h:3731:11 */

type MSGBOXPARAMSW = TagMSGBOXPARAMSW /* winuser.h:3742:5 */
type PMSGBOXPARAMSW = uintptr         /* winuser.h:3742:19 */
type LPMSGBOXPARAMSW = uintptr        /* winuser.h:3742:35 */

type MSGBOXPARAMS = MSGBOXPARAMSA     /* winuser.h:3744:3 */
type PMSGBOXPARAMS = PMSGBOXPARAMSA   /* winuser.h:3745:3 */
type LPMSGBOXPARAMS = LPMSGBOXPARAMSA /* winuser.h:3746:3 */

type MENUITEMTEMPLATEHEADER = struct {
	FversionNumber WORD
	Foffset        WORD
}                                      /* winuser.h:4059:5 */
type PMENUITEMTEMPLATEHEADER = uintptr /* winuser.h:4059:28 */

type MENUITEMTEMPLATE = struct {
	FmtOption WORD
	FmtID     WORD
	FmtString [1]WCHAR
}                                /* winuser.h:4065:5 */
type PMENUITEMTEMPLATE = uintptr /* winuser.h:4065:22 */

type X_ICONINFO = struct {
	FfIcon       WINBOOL
	FxHotspot    DWORD
	FyHotspot    DWORD
	F__ccgo_pad1 [4]byte
	FhbmMask     HBITMAP
	FhbmColor    HBITMAP
} /* winuser.h:4142:11 */

type ICONINFO = X_ICONINFO /* winuser.h:4148:5 */
type PICONINFO = uintptr   /* winuser.h:4149:20 */

type TagCURSORSHAPE = struct {
	FxHotSpot    int32
	FyHotSpot    int32
	Fcx          int32
	Fcy          int32
	FcbWidth     int32
	FPlanes      BYTE
	FBitsPixel   BYTE
	F__ccgo_pad1 [2]byte
} /* winuser.h:4166:11 */

type CURSORSHAPE = TagCURSORSHAPE /* winuser.h:4174:5 */
type LPCURSORSHAPE = uintptr      /* winuser.h:4174:17 */

type TagSCROLLINFO = struct {
	FcbSize    UINT
	FfMask     UINT
	FnMin      int32
	FnMax      int32
	FnPage     UINT
	FnPos      int32
	FnTrackPos int32
} /* winuser.h:4882:11 */

type SCROLLINFO = TagSCROLLINFO /* winuser.h:4890:5 */
type LPSCROLLINFO = uintptr     /* winuser.h:4890:16 */
type LPCSCROLLINFO = uintptr    /* winuser.h:4891:28 */

type TagMDICREATESTRUCTA = struct {
	FszClass     LPCSTR
	FszTitle     LPCSTR
	FhOwner      HANDLE
	Fx           int32
	Fy           int32
	Fcx          int32
	Fcy          int32
	Fstyle       DWORD
	F__ccgo_pad1 [4]byte
	FlParam      LPARAM
} /* winuser.h:4909:11 */

type MDICREATESTRUCTA = TagMDICREATESTRUCTA /* winuser.h:4919:5 */
type LPMDICREATESTRUCTA = uintptr           /* winuser.h:4919:22 */

type TagMDICREATESTRUCTW = struct {
	FszClass     LPCWSTR
	FszTitle     LPCWSTR
	FhOwner      HANDLE
	Fx           int32
	Fy           int32
	Fcx          int32
	Fcy          int32
	Fstyle       DWORD
	F__ccgo_pad1 [4]byte
	FlParam      LPARAM
} /* winuser.h:4921:11 */

type MDICREATESTRUCTW = TagMDICREATESTRUCTW /* winuser.h:4931:5 */
type LPMDICREATESTRUCTW = uintptr           /* winuser.h:4931:22 */

type MDICREATESTRUCT = MDICREATESTRUCTA     /* winuser.h:4933:3 */
type LPMDICREATESTRUCT = LPMDICREATESTRUCTA /* winuser.h:4934:3 */

type TagCLIENTCREATESTRUCT = struct {
	FhWindowMenu  HANDLE
	FidFirstChild UINT
	F__ccgo_pad1  [4]byte
} /* winuser.h:4936:11 */

type CLIENTCREATESTRUCT = TagCLIENTCREATESTRUCT /* winuser.h:4939:5 */
type LPCLIENTCREATESTRUCT = uintptr             /* winuser.h:4939:24 */

type HELPPOLY = DWORD /* winuser.h:4965:17 */

type TagMULTIKEYHELPA = struct {
	FmkSize      DWORD
	FmkKeylist   CHAR
	FszKeyphrase [1]CHAR
	F__ccgo_pad1 [2]byte
} /* winuser.h:4967:11 */

type MULTIKEYHELPA = TagMULTIKEYHELPA /* winuser.h:4971:5 */
type PMULTIKEYHELPA = uintptr         /* winuser.h:4971:19 */
type LPMULTIKEYHELPA = uintptr        /* winuser.h:4971:35 */

type TagMULTIKEYHELPW = struct {
	FmkSize      DWORD
	FmkKeylist   WCHAR
	FszKeyphrase [1]WCHAR
} /* winuser.h:4973:11 */

type MULTIKEYHELPW = TagMULTIKEYHELPW /* winuser.h:4977:5 */
type PMULTIKEYHELPW = uintptr         /* winuser.h:4977:19 */
type LPMULTIKEYHELPW = uintptr        /* winuser.h:4977:35 */

type MULTIKEYHELP = MULTIKEYHELPA     /* winuser.h:4979:3 */
type PMULTIKEYHELP = PMULTIKEYHELPA   /* winuser.h:4980:3 */
type LPMULTIKEYHELP = LPMULTIKEYHELPA /* winuser.h:4981:3 */

type TagHELPWININFOA = struct {
	FwStructSize int32
	Fx           int32
	Fy           int32
	Fdx          int32
	Fdy          int32
	FwMax        int32
	FrgchMember  [2]CHAR
	F__ccgo_pad1 [2]byte
} /* winuser.h:4983:11 */

type HELPWININFOA = TagHELPWININFOA /* winuser.h:4991:5 */
type PHELPWININFOA = uintptr        /* winuser.h:4991:18 */
type LPHELPWININFOA = uintptr       /* winuser.h:4991:33 */

type TagHELPWININFOW = struct {
	FwStructSize int32
	Fx           int32
	Fy           int32
	Fdx          int32
	Fdy          int32
	FwMax        int32
	FrgchMember  [2]WCHAR
} /* winuser.h:4993:11 */

type HELPWININFOW = TagHELPWININFOW /* winuser.h:5001:5 */
type PHELPWININFOW = uintptr        /* winuser.h:5001:18 */
type LPHELPWININFOW = uintptr       /* winuser.h:5001:33 */

type HELPWININFO = HELPWININFOA     /* winuser.h:5003:3 */
type PHELPWININFO = PHELPWININFOA   /* winuser.h:5004:3 */
type LPHELPWININFO = LPHELPWININFOA /* winuser.h:5005:3 */

type TagNONCLIENTMETRICSA = struct {
	FcbSize           UINT
	FiBorderWidth     int32
	FiScrollWidth     int32
	FiScrollHeight    int32
	FiCaptionWidth    int32
	FiCaptionHeight   int32
	FlfCaptionFont    LOGFONTA
	FiSmCaptionWidth  int32
	FiSmCaptionHeight int32
	FlfSmCaptionFont  LOGFONTA
	FiMenuWidth       int32
	FiMenuHeight      int32
	FlfMenuFont       LOGFONTA
	FlfStatusFont     LOGFONTA
	FlfMessageFont    LOGFONTA
} /* winuser.h:5408:11 */

type NONCLIENTMETRICSA = TagNONCLIENTMETRICSA /* winuser.h:5427:5 */
type PNONCLIENTMETRICSA = uintptr             /* winuser.h:5427:23 */
type LPNONCLIENTMETRICSA = uintptr            /* winuser.h:5427:43 */

type TagNONCLIENTMETRICSW = struct {
	FcbSize           UINT
	FiBorderWidth     int32
	FiScrollWidth     int32
	FiScrollHeight    int32
	FiCaptionWidth    int32
	FiCaptionHeight   int32
	FlfCaptionFont    LOGFONTW
	FiSmCaptionWidth  int32
	FiSmCaptionHeight int32
	FlfSmCaptionFont  LOGFONTW
	FiMenuWidth       int32
	FiMenuHeight      int32
	FlfMenuFont       LOGFONTW
	FlfStatusFont     LOGFONTW
	FlfMessageFont    LOGFONTW
} /* winuser.h:5429:11 */

type NONCLIENTMETRICSW = TagNONCLIENTMETRICSW /* winuser.h:5448:5 */
type PNONCLIENTMETRICSW = uintptr             /* winuser.h:5448:23 */
type LPNONCLIENTMETRICSW = uintptr            /* winuser.h:5448:43 */

type NONCLIENTMETRICS = NONCLIENTMETRICSA     /* winuser.h:5450:3 */
type PNONCLIENTMETRICS = PNONCLIENTMETRICSA   /* winuser.h:5451:3 */
type LPNONCLIENTMETRICS = LPNONCLIENTMETRICSA /* winuser.h:5452:3 */

type TagMINIMIZEDMETRICS = struct {
	FcbSize   UINT
	FiWidth   int32
	FiHorzGap int32
	FiVertGap int32
	FiArrange int32
} /* winuser.h:5472:11 */

type MINIMIZEDMETRICS = TagMINIMIZEDMETRICS /* winuser.h:5478:5 */
type PMINIMIZEDMETRICS = uintptr            /* winuser.h:5478:22 */
type LPMINIMIZEDMETRICS = uintptr           /* winuser.h:5478:41 */

type TagICONMETRICSA = struct {
	FcbSize       UINT
	FiHorzSpacing int32
	FiVertSpacing int32
	FiTitleWrap   int32
	FlfFont       LOGFONTA
} /* winuser.h:5482:11 */

type ICONMETRICSA = TagICONMETRICSA /* winuser.h:5488:5 */
type PICONMETRICSA = uintptr        /* winuser.h:5488:18 */
type LPICONMETRICSA = uintptr       /* winuser.h:5488:33 */

type TagICONMETRICSW = struct {
	FcbSize       UINT
	FiHorzSpacing int32
	FiVertSpacing int32
	FiTitleWrap   int32
	FlfFont       LOGFONTW
} /* winuser.h:5490:11 */

type ICONMETRICSW = TagICONMETRICSW /* winuser.h:5496:5 */
type PICONMETRICSW = uintptr        /* winuser.h:5496:18 */
type LPICONMETRICSW = uintptr       /* winuser.h:5496:33 */

type ICONMETRICS = ICONMETRICSA     /* winuser.h:5498:3 */
type PICONMETRICS = PICONMETRICSA   /* winuser.h:5499:3 */
type LPICONMETRICS = LPICONMETRICSA /* winuser.h:5500:3 */

type TagANIMATIONINFO = struct {
	FcbSize      UINT
	FiMinAnimate int32
} /* winuser.h:5504:11 */

type ANIMATIONINFO = TagANIMATIONINFO /* winuser.h:5507:5 */
type LPANIMATIONINFO = uintptr        /* winuser.h:5507:19 */

type TagSERIALKEYSA = struct {
	FcbSize         UINT
	FdwFlags        DWORD
	FlpszActivePort LPSTR
	FlpszPort       LPSTR
	FiBaudRate      UINT
	FiPortState     UINT
	FiActive        UINT
	F__ccgo_pad1    [4]byte
} /* winuser.h:5509:11 */

type SERIALKEYSA = TagSERIALKEYSA /* winuser.h:5517:5 */
type LPSERIALKEYSA = uintptr      /* winuser.h:5517:17 */

type TagSERIALKEYSW = struct {
	FcbSize         UINT
	FdwFlags        DWORD
	FlpszActivePort LPWSTR
	FlpszPort       LPWSTR
	FiBaudRate      UINT
	FiPortState     UINT
	FiActive        UINT
	F__ccgo_pad1    [4]byte
} /* winuser.h:5519:11 */

type SERIALKEYSW = TagSERIALKEYSW /* winuser.h:5527:5 */
type LPSERIALKEYSW = uintptr      /* winuser.h:5527:17 */

type SERIALKEYS = SERIALKEYSA     /* winuser.h:5529:3 */
type LPSERIALKEYS = LPSERIALKEYSA /* winuser.h:5530:3 */

type TagHIGHCONTRASTA = struct {
	FcbSize            UINT
	FdwFlags           DWORD
	FlpszDefaultScheme LPSTR
} /* winuser.h:5532:11 */

type HIGHCONTRASTA = TagHIGHCONTRASTA /* winuser.h:5536:5 */
type LPHIGHCONTRASTA = uintptr        /* winuser.h:5536:19 */

type TagHIGHCONTRASTW = struct {
	FcbSize            UINT
	FdwFlags           DWORD
	FlpszDefaultScheme LPWSTR
} /* winuser.h:5538:11 */

type HIGHCONTRASTW = TagHIGHCONTRASTW /* winuser.h:5542:5 */
type LPHIGHCONTRASTW = uintptr        /* winuser.h:5542:19 */

type HIGHCONTRAST = HIGHCONTRASTA     /* winuser.h:5544:3 */
type LPHIGHCONTRAST = LPHIGHCONTRASTA /* winuser.h:5545:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here.

type X_VIDEOPARAMETERS = struct {
	FGuid                  GUID
	FdwOffset              ULONG
	FdwCommand             ULONG
	FdwFlags               ULONG
	FdwMode                ULONG
	FdwTVStandard          ULONG
	FdwAvailableModes      ULONG
	FdwAvailableTVStandard ULONG
	FdwFlickerFilter       ULONG
	FdwOverScanX           ULONG
	FdwOverScanY           ULONG
	FdwMaxUnscaledX        ULONG
	FdwMaxUnscaledY        ULONG
	FdwPositionX           ULONG
	FdwPositionY           ULONG
	FdwBrightness          ULONG
	FdwContrast            ULONG
	FdwCPType              ULONG
	FdwCPCommand           ULONG
	FdwCPStandard          ULONG
	FdwCPKey               ULONG
	FbCP_APSTriggerBits    ULONG
	FbOEMCopyProtection    [256]UCHAR
} /* tvout.h:11:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here.

type VIDEOPARAMETERS = X_VIDEOPARAMETERS /* tvout.h:35:3 */
type PVIDEOPARAMETERS = uintptr          /* tvout.h:35:19 */
type LPVIDEOPARAMETERS = uintptr         /* tvout.h:35:37 */

type TagFILTERKEYS = struct {
	FcbSize      UINT
	FdwFlags     DWORD
	FiWaitMSec   DWORD
	FiDelayMSec  DWORD
	FiRepeatMSec DWORD
	FiBounceMSec DWORD
} /* winuser.h:5641:11 */

type FILTERKEYS = TagFILTERKEYS /* winuser.h:5648:5 */
type LPFILTERKEYS = uintptr     /* winuser.h:5648:16 */

type TagSTICKYKEYS = struct {
	FcbSize  UINT
	FdwFlags DWORD
} /* winuser.h:5660:11 */

type STICKYKEYS = TagSTICKYKEYS /* winuser.h:5663:5 */
type LPSTICKYKEYS = uintptr     /* winuser.h:5663:16 */

type TagMOUSEKEYS = struct {
	FcbSize          UINT
	FdwFlags         DWORD
	FiMaxSpeed       DWORD
	FiTimeToMaxSpeed DWORD
	FiCtrlSpeed      DWORD
	FdwReserved1     DWORD
	FdwReserved2     DWORD
} /* winuser.h:5693:11 */

type MOUSEKEYS = TagMOUSEKEYS /* winuser.h:5701:5 */
type LPMOUSEKEYS = uintptr    /* winuser.h:5701:15 */

type TagACCESSTIMEOUT = struct {
	FcbSize       UINT
	FdwFlags      DWORD
	FiTimeOutMSec DWORD
} /* winuser.h:5719:11 */

type ACCESSTIMEOUT = TagACCESSTIMEOUT /* winuser.h:5723:5 */
type LPACCESSTIMEOUT = uintptr        /* winuser.h:5723:19 */

type TagSOUNDSENTRYA = struct {
	FcbSize                 UINT
	FdwFlags                DWORD
	FiFSTextEffect          DWORD
	FiFSTextEffectMSec      DWORD
	FiFSTextEffectColorBits DWORD
	FiFSGrafEffect          DWORD
	FiFSGrafEffectMSec      DWORD
	FiFSGrafEffectColor     DWORD
	FiWindowsEffect         DWORD
	FiWindowsEffectMSec     DWORD
	FlpszWindowsEffectDLL   LPSTR
	FiWindowsEffectOrdinal  DWORD
	F__ccgo_pad1            [4]byte
} /* winuser.h:5744:11 */

type SOUNDSENTRYA = TagSOUNDSENTRYA /* winuser.h:5757:5 */
type LPSOUNDSENTRYA = uintptr       /* winuser.h:5757:18 */

type TagSOUNDSENTRYW = struct {
	FcbSize                 UINT
	FdwFlags                DWORD
	FiFSTextEffect          DWORD
	FiFSTextEffectMSec      DWORD
	FiFSTextEffectColorBits DWORD
	FiFSGrafEffect          DWORD
	FiFSGrafEffectMSec      DWORD
	FiFSGrafEffectColor     DWORD
	FiWindowsEffect         DWORD
	FiWindowsEffectMSec     DWORD
	FlpszWindowsEffectDLL   LPWSTR
	FiWindowsEffectOrdinal  DWORD
	F__ccgo_pad1            [4]byte
} /* winuser.h:5759:11 */

type SOUNDSENTRYW = TagSOUNDSENTRYW /* winuser.h:5772:5 */
type LPSOUNDSENTRYW = uintptr       /* winuser.h:5772:18 */

type SOUNDSENTRY = SOUNDSENTRYA     /* winuser.h:5774:3 */
type LPSOUNDSENTRY = LPSOUNDSENTRYA /* winuser.h:5775:3 */

type TagTOGGLEKEYS = struct {
	FcbSize  UINT
	FdwFlags DWORD
} /* winuser.h:5787:11 */

type TOGGLEKEYS = TagTOGGLEKEYS /* winuser.h:5790:5 */
type LPTOGGLEKEYS = uintptr     /* winuser.h:5790:16 */

type TagMONITORINFO = struct {
	FcbSize    DWORD
	FrcMonitor RECT
	FrcWork    RECT
	FdwFlags   DWORD
} /* winuser.h:5792:11 */

type MONITORINFO = TagMONITORINFO /* winuser.h:5797:5 */
type LPMONITORINFO = uintptr      /* winuser.h:5797:17 */

type TagMONITORINFOEXA = struct {
	F__0 struct {
		FcbSize    DWORD
		FrcMonitor RECT
		FrcWork    RECT
		FdwFlags   DWORD
	}
	FszDevice [32]CHAR
} /* winuser.h:5819:11 */

type MONITORINFOEXA = TagMONITORINFOEXA /* winuser.h:5827:5 */
type LPMONITORINFOEXA = uintptr         /* winuser.h:5827:20 */

type TagMONITORINFOEXW = struct {
	F__0 struct {
		FcbSize    DWORD
		FrcMonitor RECT
		FrcWork    RECT
		FdwFlags   DWORD
	}
	FszDevice [32]WCHAR
} /* winuser.h:5829:11 */

type MONITORINFOEXW = TagMONITORINFOEXW /* winuser.h:5837:5 */
type LPMONITORINFOEXW = uintptr         /* winuser.h:5837:20 */

type MONITORINFOEX = MONITORINFOEXA     /* winuser.h:5839:3 */
type LPMONITORINFOEX = LPMONITORINFOEXA /* winuser.h:5840:3 */

type MONITORENUMPROC = uintptr /* winuser.h:5843:19 */

type WINEVENTPROC = uintptr /* winuser.h:5885:16 */

type TagGUITHREADINFO = struct {
	FcbSize        DWORD
	Fflags         DWORD
	FhwndActive    HWND
	FhwndFocus     HWND
	FhwndCapture   HWND
	FhwndMenuOwner HWND
	FhwndMoveSize  HWND
	FhwndCaret     HWND
	FrcCaret       RECT
} /* winuser.h:6062:11 */

type GUITHREADINFO = TagGUITHREADINFO /* winuser.h:6072:5 */
type PGUITHREADINFO = uintptr         /* winuser.h:6072:19 */
type LPGUITHREADINFO = uintptr        /* winuser.h:6072:35 */

type TagCURSORINFO = struct {
	FcbSize      DWORD
	Fflags       DWORD
	FhCursor     HCURSOR
	FptScreenPos POINT
} /* winuser.h:6167:11 */

type CURSORINFO = TagCURSORINFO /* winuser.h:6172:5 */
type PCURSORINFO = uintptr      /* winuser.h:6172:16 */
type LPCURSORINFO = uintptr     /* winuser.h:6172:29 */

type TagWINDOWINFO = struct {
	FcbSize          DWORD
	FrcWindow        RECT
	FrcClient        RECT
	FdwStyle         DWORD
	FdwExStyle       DWORD
	FdwWindowStatus  DWORD
	FcxWindowBorders UINT
	FcyWindowBorders UINT
	FatomWindowType  ATOM
	FwCreatorVersion WORD
} /* winuser.h:6181:11 */

type WINDOWINFO = TagWINDOWINFO /* winuser.h:6192:5 */
type PWINDOWINFO = uintptr      /* winuser.h:6192:16 */
type LPWINDOWINFO = uintptr     /* winuser.h:6192:29 */

type TagTITLEBARINFO = struct {
	FcbSize     DWORD
	FrcTitleBar RECT
	Frgstate    [6]DWORD
} /* winuser.h:6198:11 */

type TITLEBARINFO = TagTITLEBARINFO /* winuser.h:6202:5 */
type PTITLEBARINFO = uintptr        /* winuser.h:6202:18 */
type LPTITLEBARINFO = uintptr       /* winuser.h:6202:33 */

type TagMENUBARINFO = struct {
	FcbSize      DWORD
	FrcBar       RECT
	F__ccgo_pad1 [4]byte
	FhMenu       HMENU
	FhwndMenu    HWND
	FfBarFocused uint8 /* WINBOOL fBarFocused: 1, WINBOOL fFocused: 1 */
	F__ccgo_pad2 [7]byte
} /* winuser.h:6215:11 */

type MENUBARINFO = TagMENUBARINFO /* winuser.h:6222:5 */
type PMENUBARINFO = uintptr       /* winuser.h:6222:17 */
type LPMENUBARINFO = uintptr      /* winuser.h:6222:31 */

type TagSCROLLBARINFO = struct {
	FcbSize        DWORD
	FrcScrollBar   RECT
	FdxyLineButton int32
	FxyThumbTop    int32
	FxyThumbBottom int32
	Freserved      int32
	Frgstate       [6]DWORD
} /* winuser.h:6226:11 */

type SCROLLBARINFO = TagSCROLLBARINFO /* winuser.h:6234:5 */
type PSCROLLBARINFO = uintptr         /* winuser.h:6234:19 */
type LPSCROLLBARINFO = uintptr        /* winuser.h:6234:35 */

type TagCOMBOBOXINFO = struct {
	FcbSize      DWORD
	FrcItem      RECT
	FrcButton    RECT
	FstateButton DWORD
	FhwndCombo   HWND
	FhwndItem    HWND
	FhwndList    HWND
} /* winuser.h:6238:11 */

type COMBOBOXINFO = TagCOMBOBOXINFO /* winuser.h:6246:5 */
type PCOMBOBOXINFO = uintptr        /* winuser.h:6246:18 */
type LPCOMBOBOXINFO = uintptr       /* winuser.h:6246:33 */

type TagALTTABINFO = struct {
	FcbSize    DWORD
	FcItems    int32
	FcColumns  int32
	FcRows     int32
	FiColFocus int32
	FiRowFocus int32
	FcxItem    int32
	FcyItem    int32
	FptStart   POINT
} /* winuser.h:6263:11 */

type ALTTABINFO = TagALTTABINFO /* winuser.h:6273:5 */
type PALTTABINFO = uintptr      /* winuser.h:6273:16 */
type LPALTTABINFO = uintptr     /* winuser.h:6273:29 */

type HRAWINPUT__ = struct{ Funused int32 } /* winuser.h:6287:3 */

type HRAWINPUT = uintptr /* winuser.h:6287:3 */

type TagRAWINPUTHEADER = struct {
	FdwType  DWORD
	FdwSize  DWORD
	FhDevice HANDLE
	FwParam  WPARAM
} /* winuser.h:6296:11 */

type RAWINPUTHEADER = TagRAWINPUTHEADER /* winuser.h:6301:5 */
type PRAWINPUTHEADER = uintptr          /* winuser.h:6301:20 */
type LPRAWINPUTHEADER = uintptr         /* winuser.h:6301:37 */

type TagRAWMOUSE = struct {
	FusFlags            USHORT
	F__ccgo_pad1        [2]byte
	F__4                struct{ FulButtons ULONG }
	FulRawButtons       ULONG
	FlLastX             LONG
	FlLastY             LONG
	FulExtraInformation ULONG
} /* winuser.h:6310:11 */

type RAWMOUSE = TagRAWMOUSE /* winuser.h:6323:5 */
type PRAWMOUSE = uintptr    /* winuser.h:6323:14 */
type LPRAWMOUSE = uintptr   /* winuser.h:6323:25 */

type TagRAWKEYBOARD = struct {
	FMakeCode         USHORT
	FFlags            USHORT
	FReserved         USHORT
	FVKey             USHORT
	FMessage          UINT
	FExtraInformation ULONG
} /* winuser.h:6357:11 */

type RAWKEYBOARD = TagRAWKEYBOARD /* winuser.h:6364:5 */
type PRAWKEYBOARD = uintptr       /* winuser.h:6364:17 */
type LPRAWKEYBOARD = uintptr      /* winuser.h:6364:31 */

type TagRAWHID = struct {
	FdwSizeHid   DWORD
	FdwCount     DWORD
	FbRawData    [1]BYTE
	F__ccgo_pad1 [3]byte
} /* winuser.h:6377:11 */

type RAWHID = TagRAWHID /* winuser.h:6381:5 */
type PRAWHID = uintptr  /* winuser.h:6381:12 */
type LPRAWHID = uintptr /* winuser.h:6381:21 */

type TagRAWINPUT = struct {
	Fheader RAWINPUTHEADER
	Fdata   struct{ Fmouse RAWMOUSE }
} /* winuser.h:6383:11 */

type RAWINPUT = TagRAWINPUT /* winuser.h:6390:5 */
type PRAWINPUT = uintptr    /* winuser.h:6390:14 */
type LPRAWINPUT = uintptr   /* winuser.h:6390:25 */

type TagRID_DEVICE_INFO_MOUSE = struct {
	FdwId                DWORD
	FdwNumberOfButtons   DWORD
	FdwSampleRate        DWORD
	FfHasHorizontalWheel WINBOOL
} /* winuser.h:6413:11 */

type RID_DEVICE_INFO_MOUSE = TagRID_DEVICE_INFO_MOUSE /* winuser.h:6418:5 */
type PRID_DEVICE_INFO_MOUSE = uintptr                 /* winuser.h:6418:27 */

type TagRID_DEVICE_INFO_KEYBOARD = struct {
	FdwType                 DWORD
	FdwSubType              DWORD
	FdwKeyboardMode         DWORD
	FdwNumberOfFunctionKeys DWORD
	FdwNumberOfIndicators   DWORD
	FdwNumberOfKeysTotal    DWORD
} /* winuser.h:6420:11 */

type RID_DEVICE_INFO_KEYBOARD = TagRID_DEVICE_INFO_KEYBOARD /* winuser.h:6427:5 */
type PRID_DEVICE_INFO_KEYBOARD = uintptr                    /* winuser.h:6427:30 */

type TagRID_DEVICE_INFO_HID = struct {
	FdwVendorId      DWORD
	FdwProductId     DWORD
	FdwVersionNumber DWORD
	FusUsagePage     USHORT
	FusUsage         USHORT
} /* winuser.h:6429:11 */

type RID_DEVICE_INFO_HID = TagRID_DEVICE_INFO_HID /* winuser.h:6435:5 */
type PRID_DEVICE_INFO_HID = uintptr               /* winuser.h:6435:25 */

type TagRID_DEVICE_INFO = struct {
	FcbSize DWORD
	FdwType DWORD
	F__8    struct {
		Fmouse       RID_DEVICE_INFO_MOUSE
		F__ccgo_pad1 [8]byte
	}
} /* winuser.h:6437:11 */

type RID_DEVICE_INFO = TagRID_DEVICE_INFO /* winuser.h:6445:5 */
type PRID_DEVICE_INFO = uintptr           /* winuser.h:6445:21 */
type LPRID_DEVICE_INFO = uintptr          /* winuser.h:6445:39 */

type TagRAWINPUTDEVICE = struct {
	FusUsagePage USHORT
	FusUsage     USHORT
	FdwFlags     DWORD
	FhwndTarget  HWND
} /* winuser.h:6453:11 */

type RAWINPUTDEVICE = TagRAWINPUTDEVICE /* winuser.h:6458:5 */
type PRAWINPUTDEVICE = uintptr          /* winuser.h:6458:20 */
type LPRAWINPUTDEVICE = uintptr         /* winuser.h:6458:37 */

type PCRAWINPUTDEVICE = uintptr /* winuser.h:6460:32 */

type TagRAWINPUTDEVICELIST = struct {
	FhDevice     HANDLE
	FdwType      DWORD
	F__ccgo_pad1 [4]byte
} /* winuser.h:6487:11 */

type RAWINPUTDEVICELIST = TagRAWINPUTDEVICELIST /* winuser.h:6490:5 */
type PRAWINPUTDEVICELIST = uintptr              /* winuser.h:6490:24 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type LGRPID = DWORD  /* winnls.h:644:17 */
type LCTYPE = DWORD  /* winnls.h:645:17 */
type CALTYPE = DWORD /* winnls.h:646:17 */
type CALID = DWORD   /* winnls.h:647:17 */

type X_cpinfo = struct {
	FMaxCharSize UINT
	FDefaultChar [2]BYTE
	FLeadByte    [12]BYTE
	F__ccgo_pad1 [2]byte
} /* winnls.h:649:11 */

type CPINFO = X_cpinfo  /* winnls.h:653:5 */
type LPCPINFO = uintptr /* winnls.h:653:12 */
type X_cpinfoexA = struct {
	FMaxCharSize        UINT
	FDefaultChar        [2]BYTE
	FLeadByte           [12]BYTE
	FUnicodeDefaultChar WCHAR
	FCodePage           UINT
	FCodePageName       [260]CHAR
} /* winnls.h:654:11 */

type CPINFOEXA = X_cpinfoexA /* winnls.h:661:5 */
type LPCPINFOEXA = uintptr   /* winnls.h:661:15 */

type X_cpinfoexW = struct {
	FMaxCharSize        UINT
	FDefaultChar        [2]BYTE
	FLeadByte           [12]BYTE
	FUnicodeDefaultChar WCHAR
	FCodePage           UINT
	FCodePageName       [260]WCHAR
} /* winnls.h:663:11 */

type CPINFOEXW = X_cpinfoexW /* winnls.h:670:5 */
type LPCPINFOEXW = uintptr   /* winnls.h:670:15 */

type CPINFOEX = CPINFOEXA     /* winnls.h:672:3 */
type LPCPINFOEX = LPCPINFOEXA /* winnls.h:673:3 */

type X_numberfmtA = struct {
	FNumDigits     UINT
	FLeadingZero   UINT
	FGrouping      UINT
	F__ccgo_pad1   [4]byte
	FlpDecimalSep  LPSTR
	FlpThousandSep LPSTR
	FNegativeOrder UINT
	F__ccgo_pad2   [4]byte
} /* winnls.h:675:11 */

type NUMBERFMTA = X_numberfmtA /* winnls.h:682:5 */
type LPNUMBERFMTA = uintptr    /* winnls.h:682:16 */
type X_numberfmtW = struct {
	FNumDigits     UINT
	FLeadingZero   UINT
	FGrouping      UINT
	F__ccgo_pad1   [4]byte
	FlpDecimalSep  LPWSTR
	FlpThousandSep LPWSTR
	FNegativeOrder UINT
	F__ccgo_pad2   [4]byte
} /* winnls.h:683:11 */

type NUMBERFMTW = X_numberfmtW /* winnls.h:690:5 */
type LPNUMBERFMTW = uintptr    /* winnls.h:690:16 */

type NUMBERFMT = NUMBERFMTA     /* winnls.h:692:3 */
type LPNUMBERFMT = LPNUMBERFMTA /* winnls.h:693:3 */

type X_currencyfmtA = struct {
	FNumDigits        UINT
	FLeadingZero      UINT
	FGrouping         UINT
	F__ccgo_pad1      [4]byte
	FlpDecimalSep     LPSTR
	FlpThousandSep    LPSTR
	FNegativeOrder    UINT
	FPositiveOrder    UINT
	FlpCurrencySymbol LPSTR
} /* winnls.h:695:11 */

type CURRENCYFMTA = X_currencyfmtA /* winnls.h:704:5 */
type LPCURRENCYFMTA = uintptr      /* winnls.h:704:18 */

type X_currencyfmtW = struct {
	FNumDigits        UINT
	FLeadingZero      UINT
	FGrouping         UINT
	F__ccgo_pad1      [4]byte
	FlpDecimalSep     LPWSTR
	FlpThousandSep    LPWSTR
	FNegativeOrder    UINT
	FPositiveOrder    UINT
	FlpCurrencySymbol LPWSTR
} /* winnls.h:706:11 */

type CURRENCYFMTW = X_currencyfmtW /* winnls.h:715:5 */
type LPCURRENCYFMTW = uintptr      /* winnls.h:715:18 */

type CURRENCYFMT = CURRENCYFMTA     /* winnls.h:717:3 */
type LPCURRENCYFMT = LPCURRENCYFMTA /* winnls.h:718:3 */

type NLS_FUNCTION = DWORD /* winnls.h:724:17 */

type X_nlsversioninfo = struct {
	FdwNLSVersionInfoSize DWORD
	FdwNLSVersion         DWORD
	FdwDefinedVersion     DWORD
} /* winnls.h:735:11 */

type NLSVERSIONINFO = X_nlsversioninfo /* winnls.h:739:5 */
type LPNLSVERSIONINFO = uintptr        /* winnls.h:739:20 */

type X_nlsversioninfoex = struct {
	FdwNLSVersionInfoSize DWORD
	FdwNLSVersion         DWORD
	FdwDefinedVersion     DWORD
	FdwEffectiveId        DWORD
	FguidCustomVersion    GUID
} /* winnls.h:742:11 */

type NLSVERSIONINFOEX = X_nlsversioninfoex /* winnls.h:748:5 */
type LPNLSVERSIONINFOEX = uintptr          /* winnls.h:748:22 */

type GEOID = LONG     /* winnls.h:750:16 */
type GEOTYPE = DWORD  /* winnls.h:751:17 */
type GEOCLASS = DWORD /* winnls.h:752:17 */

type LANGUAGEGROUP_ENUMPROCA = uintptr   /* winnls.h:798:19 */
type LANGGROUPLOCALE_ENUMPROCA = uintptr /* winnls.h:799:19 */
type UILANGUAGE_ENUMPROCA = uintptr      /* winnls.h:800:19 */
type CODEPAGE_ENUMPROCA = uintptr        /* winnls.h:801:19 */
type DATEFMT_ENUMPROCA = uintptr         /* winnls.h:802:19 */
type DATEFMT_ENUMPROCEXA = uintptr       /* winnls.h:803:19 */
type TIMEFMT_ENUMPROCA = uintptr         /* winnls.h:804:19 */
type CALINFO_ENUMPROCA = uintptr         /* winnls.h:805:19 */
type CALINFO_ENUMPROCEXA = uintptr       /* winnls.h:806:19 */
type LOCALE_ENUMPROCA = uintptr          /* winnls.h:807:19 */
type LOCALE_ENUMPROCW = uintptr          /* winnls.h:808:19 */
type LANGUAGEGROUP_ENUMPROCW = uintptr   /* winnls.h:809:19 */
type LANGGROUPLOCALE_ENUMPROCW = uintptr /* winnls.h:810:19 */
type UILANGUAGE_ENUMPROCW = uintptr      /* winnls.h:811:19 */
type CODEPAGE_ENUMPROCW = uintptr        /* winnls.h:812:19 */
type DATEFMT_ENUMPROCW = uintptr         /* winnls.h:813:19 */
type DATEFMT_ENUMPROCEXW = uintptr       /* winnls.h:814:19 */
type TIMEFMT_ENUMPROCW = uintptr         /* winnls.h:815:19 */
type CALINFO_ENUMPROCW = uintptr         /* winnls.h:816:19 */
type CALINFO_ENUMPROCEXW = uintptr       /* winnls.h:817:19 */
type GEO_ENUMPROC = uintptr              /* winnls.h:818:19 */

type X_FILEMUIINFO = struct {
	FdwSize               DWORD
	FdwVersion            DWORD
	FdwFileType           DWORD
	FpChecksum            [16]BYTE
	FpServiceChecksum     [16]BYTE
	FdwLanguageNameOffset DWORD
	FdwTypeIDMainSize     DWORD
	FdwTypeIDMainOffset   DWORD
	FdwTypeNameMainOffset DWORD
	FdwTypeIDMUISize      DWORD
	FdwTypeIDMUIOffset    DWORD
	FdwTypeNameMUIOffset  DWORD
	FabBuffer             [8]BYTE
} /* winnls.h:869:11 */

type FILEMUIINFO = X_FILEMUIINFO /* winnls.h:883:5 */
type PFILEMUIINFO = uintptr      /* winnls.h:883:17 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type X_COORD = struct {
	FX SHORT
	FY SHORT
} /* wincon.h:20:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type COORD = X_COORD  /* wincon.h:23:5 */
type PCOORD = uintptr /* wincon.h:23:11 */

type X_SMALL_RECT = struct {
	FLeft   SHORT
	FTop    SHORT
	FRight  SHORT
	FBottom SHORT
} /* wincon.h:25:11 */

type SMALL_RECT = X_SMALL_RECT /* wincon.h:30:5 */
type PSMALL_RECT = uintptr     /* wincon.h:30:16 */

type X_KEY_EVENT_RECORD = struct {
	FbKeyDown          WINBOOL
	FwRepeatCount      WORD
	FwVirtualKeyCode   WORD
	FwVirtualScanCode  WORD
	FuChar             struct{ FUnicodeChar WCHAR }
	FdwControlKeyState DWORD
} /* wincon.h:32:11 */

type KEY_EVENT_RECORD = X_KEY_EVENT_RECORD /* wincon.h:42:5 */
type PKEY_EVENT_RECORD = uintptr           /* wincon.h:42:22 */

type X_MOUSE_EVENT_RECORD = struct {
	FdwMousePosition   COORD
	FdwButtonState     DWORD
	FdwControlKeyState DWORD
	FdwEventFlags      DWORD
} /* wincon.h:62:11 */

type MOUSE_EVENT_RECORD = X_MOUSE_EVENT_RECORD /* wincon.h:67:5 */
type PMOUSE_EVENT_RECORD = uintptr             /* wincon.h:67:24 */

type X_WINDOW_BUFFER_SIZE_RECORD = struct{ FdwSize COORD } /* wincon.h:82:11 */

type WINDOW_BUFFER_SIZE_RECORD = X_WINDOW_BUFFER_SIZE_RECORD /* wincon.h:84:5 */
type PWINDOW_BUFFER_SIZE_RECORD = uintptr                    /* wincon.h:84:31 */

type X_MENU_EVENT_RECORD = struct{ FdwCommandId UINT } /* wincon.h:86:11 */

type MENU_EVENT_RECORD = X_MENU_EVENT_RECORD /* wincon.h:88:5 */
type PMENU_EVENT_RECORD = uintptr            /* wincon.h:88:23 */

type X_FOCUS_EVENT_RECORD = struct{ FbSetFocus WINBOOL } /* wincon.h:90:11 */

type FOCUS_EVENT_RECORD = X_FOCUS_EVENT_RECORD /* wincon.h:92:5 */
type PFOCUS_EVENT_RECORD = uintptr             /* wincon.h:92:24 */

type X_INPUT_RECORD = struct {
	FEventType   WORD
	F__ccgo_pad1 [2]byte
	FEvent       struct{ FKeyEvent KEY_EVENT_RECORD }
} /* wincon.h:94:11 */

type INPUT_RECORD = X_INPUT_RECORD /* wincon.h:103:5 */
type PINPUT_RECORD = uintptr       /* wincon.h:103:18 */

type X_CHAR_INFO = struct {
	FChar       struct{ FUnicodeChar WCHAR }
	FAttributes WORD
} /* wincon.h:111:11 */

type CHAR_INFO = X_CHAR_INFO /* wincon.h:117:5 */
type PCHAR_INFO = uintptr    /* wincon.h:117:15 */

type X_CONSOLE_SCREEN_BUFFER_INFO = struct {
	FdwSize              COORD
	FdwCursorPosition    COORD
	FwAttributes         WORD
	FsrWindow            SMALL_RECT
	FdwMaximumWindowSize COORD
} /* wincon.h:137:11 */

type CONSOLE_SCREEN_BUFFER_INFO = X_CONSOLE_SCREEN_BUFFER_INFO /* wincon.h:143:5 */
type PCONSOLE_SCREEN_BUFFER_INFO = uintptr                     /* wincon.h:143:32 */

type X_CONSOLE_CURSOR_INFO = struct {
	FdwSize   DWORD
	FbVisible WINBOOL
} /* wincon.h:145:11 */

type CONSOLE_CURSOR_INFO = X_CONSOLE_CURSOR_INFO /* wincon.h:148:5 */
type PCONSOLE_CURSOR_INFO = uintptr              /* wincon.h:148:25 */

type X_CONSOLE_FONT_INFO = struct {
	FnFont      DWORD
	FdwFontSize COORD
} /* wincon.h:150:11 */

type CONSOLE_FONT_INFO = X_CONSOLE_FONT_INFO /* wincon.h:153:5 */
type PCONSOLE_FONT_INFO = uintptr            /* wincon.h:153:23 */

type X_CONSOLE_SELECTION_INFO = struct {
	FdwFlags           DWORD
	FdwSelectionAnchor COORD
	FsrSelection       SMALL_RECT
} /* wincon.h:155:11 */

type CONSOLE_SELECTION_INFO = X_CONSOLE_SELECTION_INFO /* wincon.h:159:5 */
type PCONSOLE_SELECTION_INFO = uintptr                 /* wincon.h:159:28 */

type PHANDLER_ROUTINE = uintptr /* wincon.h:167:19 */

type X_CONSOLE_FONT_INFOEX = struct {
	FcbSize     ULONG
	FnFont      DWORD
	FdwFontSize COORD
	FFontFamily UINT
	FFontWeight UINT
	FFaceName   [32]WCHAR
} /* wincon.h:321:9 */

type CONSOLE_FONT_INFOEX = X_CONSOLE_FONT_INFOEX /* wincon.h:328:3 */
type PCONSOLE_FONT_INFOEX = uintptr              /* wincon.h:328:24 */

type X_CONSOLE_HISTORY_INFO = struct {
	FcbSize                 UINT
	FHistoryBufferSize      UINT
	FNumberOfHistoryBuffers UINT
	FdwFlags                DWORD
} /* wincon.h:332:9 */

type CONSOLE_HISTORY_INFO = X_CONSOLE_HISTORY_INFO /* wincon.h:337:3 */
type PCONSOLE_HISTORY_INFO = uintptr               /* wincon.h:337:25 */

type X_CONSOLE_READCONSOLE_CONTROL = struct {
	FnLength           ULONG
	FnInitialChars     ULONG
	FdwCtrlWakeupMask  ULONG
	FdwControlKeyState ULONG
} /* wincon.h:339:9 */

type CONSOLE_READCONSOLE_CONTROL = X_CONSOLE_READCONSOLE_CONTROL /* wincon.h:344:3 */
type PCONSOLE_READCONSOLE_CONTROL = uintptr                      /* wincon.h:344:32 */

type X_CONSOLE_SCREEN_BUFFER_INFOEX = struct {
	FcbSize               ULONG
	FdwSize               COORD
	FdwCursorPosition     COORD
	FwAttributes          WORD
	FsrWindow             SMALL_RECT
	FdwMaximumWindowSize  COORD
	FwPopupAttributes     WORD
	FbFullscreenSupported WINBOOL
	FColorTable           [16]COLORREF
} /* wincon.h:346:9 */

type CONSOLE_SCREEN_BUFFER_INFOEX = X_CONSOLE_SCREEN_BUFFER_INFOEX /* wincon.h:356:3 */
type PCONSOLE_SCREEN_BUFFER_INFOEX = uintptr                       /* wincon.h:356:33 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// defines from verrsrc.h file

type TagVS_FIXEDFILEINFO = struct {
	FdwSignature        DWORD
	FdwStrucVersion     DWORD
	FdwFileVersionMS    DWORD
	FdwFileVersionLS    DWORD
	FdwProductVersionMS DWORD
	FdwProductVersionLS DWORD
	FdwFileFlagsMask    DWORD
	FdwFileFlags        DWORD
	FdwFileOS           DWORD
	FdwFileType         DWORD
	FdwFileSubtype      DWORD
	FdwFileDateMS       DWORD
	FdwFileDateLS       DWORD
} /* winver.h:118:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// defines from verrsrc.h file

type VS_FIXEDFILEINFO = TagVS_FIXEDFILEINFO /* winver.h:133:5 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type REGSAM = ACCESS_MASK /* winreg.h:43:23 */
type LSTATUS = LONG       /* winreg.h:44:16 */

type Val_context = struct {
	Fvaluelen      int32
	F__ccgo_pad1   [4]byte
	Fvalue_context LPVOID
	Fval_buff_ptr  LPVOID
} /* winreg.h:62:3 */

type PVALCONTEXT = uintptr /* winreg.h:68:30 */

type PvalueA = struct {
	Fpv_valuename     LPSTR
	Fpv_valuelen      int32
	F__ccgo_pad1      [4]byte
	Fpv_value_context LPVOID
	Fpv_type          DWORD
	F__ccgo_pad2      [4]byte
} /* winreg.h:70:11 */

type PVALUEA = PvalueA  /* winreg.h:75:4 */
type PPVALUEA = uintptr /* winreg.h:75:12 */

type PvalueW = struct {
	Fpv_valuename     LPWSTR
	Fpv_valuelen      int32
	F__ccgo_pad1      [4]byte
	Fpv_value_context LPVOID
	Fpv_type          DWORD
	F__ccgo_pad2      [4]byte
} /* winreg.h:77:11 */

type PVALUEW = PvalueW  /* winreg.h:82:4 */
type PPVALUEW = uintptr /* winreg.h:82:12 */

type PVALUE = PVALUEA   /* winreg.h:84:3 */
type PPVALUE = PPVALUEA /* winreg.h:85:3 */

type PQUERYHANDLER = uintptr /* winreg.h:89:24 */

type Provider_info = struct {
	Fpi_R0_1val     PQUERYHANDLER
	Fpi_R0_allvals  PQUERYHANDLER
	Fpi_R3_1val     PQUERYHANDLER
	Fpi_R3_allvals  PQUERYHANDLER
	Fpi_flags       DWORD
	F__ccgo_pad1    [4]byte
	Fpi_key_context LPVOID
} /* winreg.h:91:11 */

type REG_PROVIDER = Provider_info /* winreg.h:98:5 */

type PPROVIDER = uintptr /* winreg.h:100:32 */

type Value_entA = struct {
	Fve_valuename LPSTR
	Fve_valuelen  DWORD
	F__ccgo_pad1  [4]byte
	Fve_valueptr  DWORD_PTR
	Fve_type      DWORD
	F__ccgo_pad2  [4]byte
} /* winreg.h:102:11 */

type VALENTA = Value_entA /* winreg.h:107:5 */
type PVALENTA = uintptr   /* winreg.h:107:13 */

type Value_entW = struct {
	Fve_valuename LPWSTR
	Fve_valuelen  DWORD
	F__ccgo_pad1  [4]byte
	Fve_valueptr  DWORD_PTR
	Fve_type      DWORD
	F__ccgo_pad2  [4]byte
} /* winreg.h:109:11 */

type VALENTW = Value_entW /* winreg.h:114:5 */
type PVALENTW = uintptr   /* winreg.h:114:13 */

type VALENT = VALENTA   /* winreg.h:116:3 */
type PVALENT = PVALENTA /* winreg.h:117:3 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type X_NETRESOURCEA = struct {
	FdwScope       DWORD
	FdwType        DWORD
	FdwDisplayType DWORD
	FdwUsage       DWORD
	FlpLocalName   LPSTR
	FlpRemoteName  LPSTR
	FlpComment     LPSTR
	FlpProvider    LPSTR
} /* winnetwk.h:53:11 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type NETRESOURCEA = X_NETRESOURCEA /* winnetwk.h:62:5 */
type LPNETRESOURCEA = uintptr      /* winnetwk.h:62:18 */
type X_NETRESOURCEW = struct {
	FdwScope       DWORD
	FdwType        DWORD
	FdwDisplayType DWORD
	FdwUsage       DWORD
	FlpLocalName   LPWSTR
	FlpRemoteName  LPWSTR
	FlpComment     LPWSTR
	FlpProvider    LPWSTR
} /* winnetwk.h:63:11 */

type NETRESOURCEW = X_NETRESOURCEW /* winnetwk.h:72:5 */
type LPNETRESOURCEW = uintptr      /* winnetwk.h:72:18 */

type NETRESOURCE = NETRESOURCEA     /* winnetwk.h:74:3 */
type LPNETRESOURCE = LPNETRESOURCEA /* winnetwk.h:75:3 */

type X_CONNECTDLGSTRUCTA = struct {
	FcbStructure DWORD
	F__ccgo_pad1 [4]byte
	FhwndOwner   HWND
	FlpConnRes   LPNETRESOURCEA
	FdwFlags     DWORD
	FdwDevNum    DWORD
} /* winnetwk.h:129:11 */

type CONNECTDLGSTRUCTA = X_CONNECTDLGSTRUCTA /* winnetwk.h:135:5 */
type LPCONNECTDLGSTRUCTA = uintptr           /* winnetwk.h:135:23 */

type X_CONNECTDLGSTRUCTW = struct {
	FcbStructure DWORD
	F__ccgo_pad1 [4]byte
	FhwndOwner   HWND
	FlpConnRes   LPNETRESOURCEW
	FdwFlags     DWORD
	FdwDevNum    DWORD
} /* winnetwk.h:137:11 */

type CONNECTDLGSTRUCTW = X_CONNECTDLGSTRUCTW /* winnetwk.h:143:5 */
type LPCONNECTDLGSTRUCTW = uintptr           /* winnetwk.h:143:23 */

type CONNECTDLGSTRUCT = CONNECTDLGSTRUCTA     /* winnetwk.h:145:3 */
type LPCONNECTDLGSTRUCT = LPCONNECTDLGSTRUCTA /* winnetwk.h:146:3 */

type X_DISCDLGSTRUCTA = struct {
	FcbStructure  DWORD
	F__ccgo_pad1  [4]byte
	FhwndOwner    HWND
	FlpLocalName  LPSTR
	FlpRemoteName LPSTR
	FdwFlags      DWORD
	F__ccgo_pad2  [4]byte
} /* winnetwk.h:161:11 */

type DISCDLGSTRUCTA = X_DISCDLGSTRUCTA /* winnetwk.h:167:5 */
type LPDISCDLGSTRUCTA = uintptr        /* winnetwk.h:167:20 */

type X_DISCDLGSTRUCTW = struct {
	FcbStructure  DWORD
	F__ccgo_pad1  [4]byte
	FhwndOwner    HWND
	FlpLocalName  LPWSTR
	FlpRemoteName LPWSTR
	FdwFlags      DWORD
	F__ccgo_pad2  [4]byte
} /* winnetwk.h:169:11 */

type DISCDLGSTRUCTW = X_DISCDLGSTRUCTW /* winnetwk.h:175:5 */
type LPDISCDLGSTRUCTW = uintptr        /* winnetwk.h:175:20 */

type DISCDLGSTRUCT = DISCDLGSTRUCTA     /* winnetwk.h:177:3 */
type LPDISCDLGSTRUCT = LPDISCDLGSTRUCTA /* winnetwk.h:178:3 */

type X_UNIVERSAL_NAME_INFOA = struct{ FlpUniversalName LPSTR } /* winnetwk.h:204:11 */

type UNIVERSAL_NAME_INFOA = X_UNIVERSAL_NAME_INFOA /* winnetwk.h:206:5 */
type LPUNIVERSAL_NAME_INFOA = uintptr              /* winnetwk.h:206:26 */

type X_UNIVERSAL_NAME_INFOW = struct{ FlpUniversalName LPWSTR } /* winnetwk.h:208:11 */

type UNIVERSAL_NAME_INFOW = X_UNIVERSAL_NAME_INFOW /* winnetwk.h:210:5 */
type LPUNIVERSAL_NAME_INFOW = uintptr              /* winnetwk.h:210:26 */

type UNIVERSAL_NAME_INFO = UNIVERSAL_NAME_INFOA     /* winnetwk.h:212:3 */
type LPUNIVERSAL_NAME_INFO = LPUNIVERSAL_NAME_INFOA /* winnetwk.h:213:3 */

type X_REMOTE_NAME_INFOA = struct {
	FlpUniversalName  LPSTR
	FlpConnectionName LPSTR
	FlpRemainingPath  LPSTR
} /* winnetwk.h:215:11 */

type REMOTE_NAME_INFOA = X_REMOTE_NAME_INFOA /* winnetwk.h:219:5 */
type LPREMOTE_NAME_INFOA = uintptr           /* winnetwk.h:219:23 */

type X_REMOTE_NAME_INFOW = struct {
	FlpUniversalName  LPWSTR
	FlpConnectionName LPWSTR
	FlpRemainingPath  LPWSTR
} /* winnetwk.h:221:11 */

type REMOTE_NAME_INFOW = X_REMOTE_NAME_INFOW /* winnetwk.h:225:5 */
type LPREMOTE_NAME_INFOW = uintptr           /* winnetwk.h:225:23 */

type REMOTE_NAME_INFO = REMOTE_NAME_INFOA     /* winnetwk.h:227:3 */
type LPREMOTE_NAME_INFO = LPREMOTE_NAME_INFOA /* winnetwk.h:228:3 */

type X_NETINFOSTRUCT = struct {
	FcbStructure       DWORD
	FdwProviderVersion DWORD
	FdwStatus          DWORD
	FdwCharacteristics DWORD
	FdwHandle          ULONG_PTR
	FwNetType          WORD
	F__ccgo_pad1       [2]byte
	FdwPrinters        DWORD
	FdwDrives          DWORD
	F__ccgo_pad2       [4]byte
} /* winnetwk.h:247:11 */

type NETINFOSTRUCT = X_NETINFOSTRUCT /* winnetwk.h:256:5 */
type LPNETINFOSTRUCT = uintptr       /* winnetwk.h:256:19 */

type PFNGETPROFILEPATHA = uintptr /* winnetwk.h:267:16 */
type PFNGETPROFILEPATHW = uintptr /* winnetwk.h:268:16 */

type PFNRECONCILEPROFILEA = uintptr /* winnetwk.h:272:16 */
type PFNRECONCILEPROFILEW = uintptr /* winnetwk.h:273:16 */

type PFNPROCESSPOLICIESA = uintptr /* winnetwk.h:280:19 */
type PFNPROCESSPOLICIESW = uintptr /* winnetwk.h:281:19 */

type X_NETCONNECTINFOSTRUCT = struct {
	FcbStructure   DWORD
	FdwFlags       DWORD
	FdwSpeed       DWORD
	FdwDelay       DWORD
	FdwOptDataSize DWORD
} /* winnetwk.h:335:11 */

type NETCONNECTINFOSTRUCT = X_NETCONNECTINFOSTRUCT /* winnetwk.h:341:5 */
type LPNETCONNECTINFOSTRUCT = uintptr              /* winnetwk.h:341:26 */

type PUWSTR_C = uintptr /* stralign.h:105:42 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type X_SERVICE_DESCRIPTIONA = struct{ FlpDescription LPSTR } /* winsvc.h:95:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type SERVICE_DESCRIPTIONA = X_SERVICE_DESCRIPTIONA /* winsvc.h:97:5 */
type LPSERVICE_DESCRIPTIONA = uintptr              /* winsvc.h:97:26 */

type X_SERVICE_DESCRIPTIONW = struct{ FlpDescription LPWSTR } /* winsvc.h:99:11 */

type SERVICE_DESCRIPTIONW = X_SERVICE_DESCRIPTIONW /* winsvc.h:101:5 */
type LPSERVICE_DESCRIPTIONW = uintptr              /* winsvc.h:101:26 */

type SERVICE_DESCRIPTION = SERVICE_DESCRIPTIONA     /* winsvc.h:103:3 */
type LPSERVICE_DESCRIPTION = LPSERVICE_DESCRIPTIONA /* winsvc.h:104:3 */

type SC_ACTION_TYPE = uint32 /* winsvc.h:108:5 */

type X_SC_ACTION = struct {
	FType  SC_ACTION_TYPE
	FDelay DWORD
} /* winsvc.h:110:11 */

type SC_ACTION = X_SC_ACTION /* winsvc.h:113:5 */
type LPSC_ACTION = uintptr   /* winsvc.h:113:15 */

type X_SERVICE_FAILURE_ACTIONSA = struct {
	FdwResetPeriod DWORD
	F__ccgo_pad1   [4]byte
	FlpRebootMsg   LPSTR
	FlpCommand     LPSTR
	FcActions      DWORD
	F__ccgo_pad2   [4]byte
	FlpsaActions   uintptr
} /* winsvc.h:115:11 */

type SERVICE_FAILURE_ACTIONSA = X_SERVICE_FAILURE_ACTIONSA /* winsvc.h:121:5 */
type LPSERVICE_FAILURE_ACTIONSA = uintptr                  /* winsvc.h:121:30 */

type X_SERVICE_FAILURE_ACTIONSW = struct {
	FdwResetPeriod DWORD
	F__ccgo_pad1   [4]byte
	FlpRebootMsg   LPWSTR
	FlpCommand     LPWSTR
	FcActions      DWORD
	F__ccgo_pad2   [4]byte
	FlpsaActions   uintptr
} /* winsvc.h:123:11 */

type SERVICE_FAILURE_ACTIONSW = X_SERVICE_FAILURE_ACTIONSW /* winsvc.h:129:5 */
type LPSERVICE_FAILURE_ACTIONSW = uintptr                  /* winsvc.h:129:30 */

type SERVICE_FAILURE_ACTIONS = SERVICE_FAILURE_ACTIONSA     /* winsvc.h:131:3 */
type LPSERVICE_FAILURE_ACTIONS = LPSERVICE_FAILURE_ACTIONSA /* winsvc.h:132:3 */

type SC_HANDLE__ = struct{ Funused int32 } /* winsvc.h:134:3 */

type SC_HANDLE = uintptr   /* winsvc.h:134:3 */
type LPSC_HANDLE = uintptr /* winsvc.h:135:21 */

type SERVICE_STATUS_HANDLE__ = struct{ Funused int32 } /* winsvc.h:137:3 */

type SERVICE_STATUS_HANDLE = uintptr /* winsvc.h:137:3 */

type SC_STATUS_TYPE = uint32 /* winsvc.h:141:5 */

type SC_ENUM_TYPE = uint32 /* winsvc.h:145:5 */

type X_SERVICE_STATUS = struct {
	FdwServiceType             DWORD
	FdwCurrentState            DWORD
	FdwControlsAccepted        DWORD
	FdwWin32ExitCode           DWORD
	FdwServiceSpecificExitCode DWORD
	FdwCheckPoint              DWORD
	FdwWaitHint                DWORD
} /* winsvc.h:147:11 */

type SERVICE_STATUS = X_SERVICE_STATUS /* winsvc.h:155:5 */
type LPSERVICE_STATUS = uintptr        /* winsvc.h:155:20 */

type X_SERVICE_STATUS_PROCESS = struct {
	FdwServiceType             DWORD
	FdwCurrentState            DWORD
	FdwControlsAccepted        DWORD
	FdwWin32ExitCode           DWORD
	FdwServiceSpecificExitCode DWORD
	FdwCheckPoint              DWORD
	FdwWaitHint                DWORD
	FdwProcessId               DWORD
	FdwServiceFlags            DWORD
} /* winsvc.h:157:11 */

type SERVICE_STATUS_PROCESS = X_SERVICE_STATUS_PROCESS /* winsvc.h:167:5 */
type LPSERVICE_STATUS_PROCESS = uintptr                /* winsvc.h:167:28 */

type X_ENUM_SERVICE_STATUSA = struct {
	FlpServiceName LPSTR
	FlpDisplayName LPSTR
	FServiceStatus SERVICE_STATUS
	F__ccgo_pad1   [4]byte
} /* winsvc.h:169:11 */

type ENUM_SERVICE_STATUSA = X_ENUM_SERVICE_STATUSA /* winsvc.h:173:5 */
type LPENUM_SERVICE_STATUSA = uintptr              /* winsvc.h:173:26 */

type X_ENUM_SERVICE_STATUSW = struct {
	FlpServiceName LPWSTR
	FlpDisplayName LPWSTR
	FServiceStatus SERVICE_STATUS
	F__ccgo_pad1   [4]byte
} /* winsvc.h:175:11 */

type ENUM_SERVICE_STATUSW = X_ENUM_SERVICE_STATUSW /* winsvc.h:179:5 */
type LPENUM_SERVICE_STATUSW = uintptr              /* winsvc.h:179:26 */

type ENUM_SERVICE_STATUS = ENUM_SERVICE_STATUSA     /* winsvc.h:181:3 */
type LPENUM_SERVICE_STATUS = LPENUM_SERVICE_STATUSA /* winsvc.h:182:3 */

type X_ENUM_SERVICE_STATUS_PROCESSA = struct {
	FlpServiceName        LPSTR
	FlpDisplayName        LPSTR
	FServiceStatusProcess SERVICE_STATUS_PROCESS
	F__ccgo_pad1          [4]byte
} /* winsvc.h:184:11 */

type ENUM_SERVICE_STATUS_PROCESSA = X_ENUM_SERVICE_STATUS_PROCESSA /* winsvc.h:188:5 */
type LPENUM_SERVICE_STATUS_PROCESSA = uintptr                      /* winsvc.h:188:34 */

type X_ENUM_SERVICE_STATUS_PROCESSW = struct {
	FlpServiceName        LPWSTR
	FlpDisplayName        LPWSTR
	FServiceStatusProcess SERVICE_STATUS_PROCESS
	F__ccgo_pad1          [4]byte
} /* winsvc.h:190:11 */

type ENUM_SERVICE_STATUS_PROCESSW = X_ENUM_SERVICE_STATUS_PROCESSW /* winsvc.h:194:5 */
type LPENUM_SERVICE_STATUS_PROCESSW = uintptr                      /* winsvc.h:194:34 */

type ENUM_SERVICE_STATUS_PROCESS = ENUM_SERVICE_STATUS_PROCESSA     /* winsvc.h:196:3 */
type LPENUM_SERVICE_STATUS_PROCESS = LPENUM_SERVICE_STATUS_PROCESSA /* winsvc.h:197:3 */

type SC_LOCK = LPVOID /* winsvc.h:199:18 */

type X_QUERY_SERVICE_LOCK_STATUSA = struct {
	FfIsLocked      DWORD
	F__ccgo_pad1    [4]byte
	FlpLockOwner    LPSTR
	FdwLockDuration DWORD
	F__ccgo_pad2    [4]byte
} /* winsvc.h:201:11 */

type QUERY_SERVICE_LOCK_STATUSA = X_QUERY_SERVICE_LOCK_STATUSA /* winsvc.h:205:5 */
type LPQUERY_SERVICE_LOCK_STATUSA = uintptr                    /* winsvc.h:205:32 */

type X_QUERY_SERVICE_LOCK_STATUSW = struct {
	FfIsLocked      DWORD
	F__ccgo_pad1    [4]byte
	FlpLockOwner    LPWSTR
	FdwLockDuration DWORD
	F__ccgo_pad2    [4]byte
} /* winsvc.h:207:11 */

type QUERY_SERVICE_LOCK_STATUSW = X_QUERY_SERVICE_LOCK_STATUSW /* winsvc.h:211:5 */
type LPQUERY_SERVICE_LOCK_STATUSW = uintptr                    /* winsvc.h:211:32 */

type QUERY_SERVICE_LOCK_STATUS = QUERY_SERVICE_LOCK_STATUSA     /* winsvc.h:213:3 */
type LPQUERY_SERVICE_LOCK_STATUS = LPQUERY_SERVICE_LOCK_STATUSA /* winsvc.h:214:3 */

type X_QUERY_SERVICE_CONFIGA = struct {
	FdwServiceType      DWORD
	FdwStartType        DWORD
	FdwErrorControl     DWORD
	F__ccgo_pad1        [4]byte
	FlpBinaryPathName   LPSTR
	FlpLoadOrderGroup   LPSTR
	FdwTagId            DWORD
	F__ccgo_pad2        [4]byte
	FlpDependencies     LPSTR
	FlpServiceStartName LPSTR
	FlpDisplayName      LPSTR
} /* winsvc.h:216:11 */

type QUERY_SERVICE_CONFIGA = X_QUERY_SERVICE_CONFIGA /* winsvc.h:226:5 */
type LPQUERY_SERVICE_CONFIGA = uintptr               /* winsvc.h:226:27 */

type X_QUERY_SERVICE_CONFIGW = struct {
	FdwServiceType      DWORD
	FdwStartType        DWORD
	FdwErrorControl     DWORD
	F__ccgo_pad1        [4]byte
	FlpBinaryPathName   LPWSTR
	FlpLoadOrderGroup   LPWSTR
	FdwTagId            DWORD
	F__ccgo_pad2        [4]byte
	FlpDependencies     LPWSTR
	FlpServiceStartName LPWSTR
	FlpDisplayName      LPWSTR
} /* winsvc.h:228:11 */

type QUERY_SERVICE_CONFIGW = X_QUERY_SERVICE_CONFIGW /* winsvc.h:238:5 */
type LPQUERY_SERVICE_CONFIGW = uintptr               /* winsvc.h:238:27 */

type QUERY_SERVICE_CONFIG = QUERY_SERVICE_CONFIGA     /* winsvc.h:240:3 */
type LPQUERY_SERVICE_CONFIG = LPQUERY_SERVICE_CONFIGA /* winsvc.h:241:3 */

type LPSERVICE_MAIN_FUNCTIONW = uintptr /* winsvc.h:243:16 */
type LPSERVICE_MAIN_FUNCTIONA = uintptr /* winsvc.h:244:16 */

type X_SERVICE_TABLE_ENTRYA = struct {
	FlpServiceName LPSTR
	FlpServiceProc LPSERVICE_MAIN_FUNCTIONA
} /* winsvc.h:248:11 */

type SERVICE_TABLE_ENTRYA = X_SERVICE_TABLE_ENTRYA /* winsvc.h:251:5 */
type LPSERVICE_TABLE_ENTRYA = uintptr              /* winsvc.h:251:26 */

type X_SERVICE_TABLE_ENTRYW = struct {
	FlpServiceName LPWSTR
	FlpServiceProc LPSERVICE_MAIN_FUNCTIONW
} /* winsvc.h:253:11 */

type SERVICE_TABLE_ENTRYW = X_SERVICE_TABLE_ENTRYW /* winsvc.h:256:5 */
type LPSERVICE_TABLE_ENTRYW = uintptr              /* winsvc.h:256:26 */

type SERVICE_TABLE_ENTRY = SERVICE_TABLE_ENTRYA     /* winsvc.h:258:3 */
type LPSERVICE_TABLE_ENTRY = LPSERVICE_TABLE_ENTRYA /* winsvc.h:259:3 */

type LPHANDLER_FUNCTION = uintptr    /* winsvc.h:261:16 */
type LPHANDLER_FUNCTION_EX = uintptr /* winsvc.h:262:17 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_MODEMDEVCAPS = struct {
	FdwActualSize              DWORD
	FdwRequiredSize            DWORD
	FdwDevSpecificOffset       DWORD
	FdwDevSpecificSize         DWORD
	FdwModemProviderVersion    DWORD
	FdwModemManufacturerOffset DWORD
	FdwModemManufacturerSize   DWORD
	FdwModemModelOffset        DWORD
	FdwModemModelSize          DWORD
	FdwModemVersionOffset      DWORD
	FdwModemVersionSize        DWORD
	FdwDialOptions             DWORD
	FdwCallSetupFailTimer      DWORD
	FdwInactivityTimeout       DWORD
	FdwSpeakerVolume           DWORD
	FdwSpeakerMode             DWORD
	FdwModemOptions            DWORD
	FdwMaxDTERate              DWORD
	FdwMaxDCERate              DWORD
	FabVariablePortion         [1]BYTE
	F__ccgo_pad1               [3]byte
} /* mcx.h:9:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type MODEMDEVCAPS = X_MODEMDEVCAPS /* mcx.h:30:3 */
type PMODEMDEVCAPS = uintptr       /* mcx.h:30:16 */
type LPMODEMDEVCAPS = uintptr      /* mcx.h:30:31 */

type X_MODEMSETTINGS = struct {
	FdwActualSize             DWORD
	FdwRequiredSize           DWORD
	FdwDevSpecificOffset      DWORD
	FdwDevSpecificSize        DWORD
	FdwCallSetupFailTimer     DWORD
	FdwInactivityTimeout      DWORD
	FdwSpeakerVolume          DWORD
	FdwSpeakerMode            DWORD
	FdwPreferredModemOptions  DWORD
	FdwNegotiatedModemOptions DWORD
	FdwNegotiatedDCERate      DWORD
	FabVariablePortion        [1]BYTE
	F__ccgo_pad1              [3]byte
} /* mcx.h:32:9 */

type MODEMSETTINGS = X_MODEMSETTINGS /* mcx.h:45:3 */
type PMODEMSETTINGS = uintptr        /* mcx.h:45:17 */
type LPMODEMSETTINGS = uintptr       /* mcx.h:45:33 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type HIMC__ = struct{ Funused int32 } /* imm.h:18:3 */

type HIMC = uintptr                    /* imm.h:18:3 */
type HIMCC__ = struct{ Funused int32 } /* imm.h:19:3 */

type HIMCC = uintptr /* imm.h:19:3 */

type LPHKL = uintptr  /* imm.h:21:15 */
type LPUINT = uintptr /* imm.h:24:16 */

type TagCOMPOSITIONFORM = struct {
	FdwStyle      DWORD
	FptCurrentPos POINT
	FrcArea       RECT
} /* imm.h:27:11 */

type COMPOSITIONFORM = TagCOMPOSITIONFORM /* imm.h:31:5 */
type PCOMPOSITIONFORM = uintptr           /* imm.h:31:21 */
type NPCOMPOSITIONFORM = uintptr          /* imm.h:31:39 */
type LPCOMPOSITIONFORM = uintptr          /* imm.h:31:58 */

type TagCANDIDATEFORM = struct {
	FdwIndex      DWORD
	FdwStyle      DWORD
	FptCurrentPos POINT
	FrcArea       RECT
} /* imm.h:33:11 */

type CANDIDATEFORM = TagCANDIDATEFORM /* imm.h:38:5 */
type PCANDIDATEFORM = uintptr         /* imm.h:38:19 */
type NPCANDIDATEFORM = uintptr        /* imm.h:38:35 */
type LPCANDIDATEFORM = uintptr        /* imm.h:38:52 */

type TagCANDIDATELIST = struct {
	FdwSize      DWORD
	FdwStyle     DWORD
	FdwCount     DWORD
	FdwSelection DWORD
	FdwPageStart DWORD
	FdwPageSize  DWORD
	FdwOffset    [1]DWORD
} /* imm.h:40:11 */

type CANDIDATELIST = TagCANDIDATELIST /* imm.h:48:5 */
type PCANDIDATELIST = uintptr         /* imm.h:48:19 */
type NPCANDIDATELIST = uintptr        /* imm.h:48:35 */
type LPCANDIDATELIST = uintptr        /* imm.h:48:52 */

type TagREGISTERWORDA = struct {
	FlpReading LPSTR
	FlpWord    LPSTR
} /* imm.h:50:11 */

type REGISTERWORDA = TagREGISTERWORDA /* imm.h:53:5 */
type PREGISTERWORDA = uintptr         /* imm.h:53:19 */
type NPREGISTERWORDA = uintptr        /* imm.h:53:35 */
type LPREGISTERWORDA = uintptr        /* imm.h:53:52 */

type TagREGISTERWORDW = struct {
	FlpReading LPWSTR
	FlpWord    LPWSTR
} /* imm.h:55:11 */

type REGISTERWORDW = TagREGISTERWORDW /* imm.h:58:5 */
type PREGISTERWORDW = uintptr         /* imm.h:58:19 */
type NPREGISTERWORDW = uintptr        /* imm.h:58:35 */
type LPREGISTERWORDW = uintptr        /* imm.h:58:52 */

type REGISTERWORD = REGISTERWORDA     /* imm.h:60:3 */
type PREGISTERWORD = PREGISTERWORDA   /* imm.h:61:3 */
type NPREGISTERWORD = NPREGISTERWORDA /* imm.h:62:3 */
type LPREGISTERWORD = LPREGISTERWORDA /* imm.h:63:3 */

type TagRECONVERTSTRING = struct {
	FdwSize            DWORD
	FdwVersion         DWORD
	FdwStrLen          DWORD
	FdwStrOffset       DWORD
	FdwCompStrLen      DWORD
	FdwCompStrOffset   DWORD
	FdwTargetStrLen    DWORD
	FdwTargetStrOffset DWORD
} /* imm.h:65:11 */

type RECONVERTSTRING = TagRECONVERTSTRING /* imm.h:74:5 */
type PRECONVERTSTRING = uintptr           /* imm.h:74:21 */
type NPRECONVERTSTRING = uintptr          /* imm.h:74:39 */
type LPRECONVERTSTRING = uintptr          /* imm.h:74:58 */

type TagSTYLEBUFA = struct {
	FdwStyle       DWORD
	FszDescription [32]CHAR
} /* imm.h:78:11 */

type STYLEBUFA = TagSTYLEBUFA /* imm.h:81:5 */
type PSTYLEBUFA = uintptr     /* imm.h:81:15 */
type NPSTYLEBUFA = uintptr    /* imm.h:81:27 */
type LPSTYLEBUFA = uintptr    /* imm.h:81:40 */

type TagSTYLEBUFW = struct {
	FdwStyle       DWORD
	FszDescription [32]WCHAR
} /* imm.h:83:11 */

type STYLEBUFW = TagSTYLEBUFW /* imm.h:86:5 */
type PSTYLEBUFW = uintptr     /* imm.h:86:15 */
type NPSTYLEBUFW = uintptr    /* imm.h:86:27 */
type LPSTYLEBUFW = uintptr    /* imm.h:86:40 */

type STYLEBUF = STYLEBUFA     /* imm.h:88:3 */
type PSTYLEBUF = PSTYLEBUFA   /* imm.h:89:3 */
type NPSTYLEBUF = NPSTYLEBUFA /* imm.h:90:3 */
type LPSTYLEBUF = LPSTYLEBUFA /* imm.h:91:3 */

type TagIMEMENUITEMINFOA = struct {
	FcbSize        UINT
	FfType         UINT
	FfState        UINT
	FwID           UINT
	FhbmpChecked   HBITMAP
	FhbmpUnchecked HBITMAP
	FdwItemData    DWORD
	FszString      [80]CHAR
	F__ccgo_pad1   [4]byte
	FhbmpItem      HBITMAP
} /* imm.h:95:11 */

type IMEMENUITEMINFOA = TagIMEMENUITEMINFOA /* imm.h:105:5 */
type PIMEMENUITEMINFOA = uintptr            /* imm.h:105:22 */
type NPIMEMENUITEMINFOA = uintptr           /* imm.h:105:41 */
type LPIMEMENUITEMINFOA = uintptr           /* imm.h:105:61 */

type TagIMEMENUITEMINFOW = struct {
	FcbSize        UINT
	FfType         UINT
	FfState        UINT
	FwID           UINT
	FhbmpChecked   HBITMAP
	FhbmpUnchecked HBITMAP
	FdwItemData    DWORD
	FszString      [80]WCHAR
	F__ccgo_pad1   [4]byte
	FhbmpItem      HBITMAP
} /* imm.h:107:11 */

type IMEMENUITEMINFOW = TagIMEMENUITEMINFOW /* imm.h:117:5 */
type PIMEMENUITEMINFOW = uintptr            /* imm.h:117:22 */
type NPIMEMENUITEMINFOW = uintptr           /* imm.h:117:41 */
type LPIMEMENUITEMINFOW = uintptr           /* imm.h:117:61 */

type IMEMENUITEMINFO = IMEMENUITEMINFOA     /* imm.h:119:3 */
type PIMEMENUITEMINFO = PIMEMENUITEMINFOA   /* imm.h:120:3 */
type NPIMEMENUITEMINFO = NPIMEMENUITEMINFOA /* imm.h:121:3 */
type LPIMEMENUITEMINFO = LPIMEMENUITEMINFOA /* imm.h:122:3 */

type TagIMECHARPOSITION = struct {
	FdwSize      DWORD
	FdwCharPos   DWORD
	Fpt          POINT
	FcLineHeight UINT
	FrcDocument  RECT
} /* imm.h:124:11 */

type IMECHARPOSITION = TagIMECHARPOSITION /* imm.h:130:5 */
type PIMECHARPOSITION = uintptr           /* imm.h:130:21 */
type NPIMECHARPOSITION = uintptr          /* imm.h:130:39 */
type LPIMECHARPOSITION = uintptr          /* imm.h:130:58 */

type IMCENUMPROC = uintptr /* imm.h:132:19 */

type REGISTERWORDENUMPROCA = uintptr /* imm.h:185:15 */
type REGISTERWORDENUMPROCW = uintptr /* imm.h:186:15 */

// Restore old value of interface for Obj-C.  See above.

// Compatibility to older visual studio / windows platform SDK

// Ask for the winsock function typedefs, also.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// undefine macros from winsock.h
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type Timeval = struct {
	Ftv_sec  int32
	Ftv_usec int32
} /* _timeval.h:10:1 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure __LONG32 is defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type U_char = uint8   /* _bsd_types.h:13:23 */
type U_short = uint16 /* _bsd_types.h:14:24 */
type U_int = uint32   /* _bsd_types.h:15:22 */
type U_long = uint32  /* _bsd_types.h:18:23 */

type U_int64 = uint64 /* _bsd_types.h:25:28 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type In_addr = struct {
	FS_un struct {
		F__ccgo_pad1 [0]uint32
		FS_un_b      struct {
			Fs_b1 U_char
			Fs_b2 U_char
			Fs_b3 U_char
			Fs_b4 U_char
		}
	}
} /* inaddr.h:17:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IN_ADDR = In_addr   /* inaddr.h:23:3 */
type PIN_ADDR = uintptr  /* inaddr.h:23:12 */
type LPIN_ADDR = uintptr /* inaddr.h:23:23 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type SOCKET = UINT_PTR /* _socket_types.h:11:18 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// fd_set may have been defined by the newlib <sys/types.h>
// if  __USE_W32_SOCKETS not defined.

type Fd_set1 = struct {
	Ffd_count    U_int
	F__ccgo_pad1 [4]byte
	Ffd_array    [64]SOCKET
} /* _fd_types.h:21:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// fd_set may have been defined by the newlib <sys/types.h>
// if  __USE_W32_SOCKETS not defined.

type Fd_set = Fd_set1 /* _fd_types.h:25:3 */

// FD_SET is differently implement in winsock.h and winsock2.h.  If we
//    encounter that we are going to redefine it, and if the original definition
//    is from winsock.h, make sure to undef FD_SET so it can be redefined to
//    the winsock2.h version.

type FD_SET = Fd_set1   /* _fd_types.h:104:23 */
type PFD_SET = uintptr  /* _fd_types.h:105:23 */
type LPFD_SET = uintptr /* _fd_types.h:106:23 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type Hostent = struct {
	Fh_name      uintptr
	Fh_aliases   uintptr
	Fh_addrtype  int16
	Fh_length    int16
	F__ccgo_pad1 [4]byte
	Fh_addr_list uintptr
} /* _ip_types.h:25:1 */

type Netent = struct {
	Fn_name      uintptr
	Fn_aliases   uintptr
	Fn_addrtype  int16
	F__ccgo_pad1 [2]byte
	Fn_net       U_long
} /* _ip_types.h:33:1 */

type Servent = struct {
	Fs_name      uintptr
	Fs_aliases   uintptr
	Fs_proto     uintptr
	Fs_port      int16
	F__ccgo_pad1 [6]byte
} /* _ip_types.h:40:1 */

type Protoent = struct {
	Fp_name      uintptr
	Fp_aliases   uintptr
	Fp_proto     int16
	F__ccgo_pad1 [6]byte
} /* _ip_types.h:52:1 */

type Sockproto = struct {
	Fsp_family   U_short
	Fsp_protocol U_short
} /* _ip_types.h:58:1 */

type Linger = struct {
	Fl_onoff  U_short
	Fl_linger U_short
} /* _ip_types.h:63:1 */

type Sockaddr = struct {
	Fsa_family U_short
	Fsa_data   [14]int8
} /* _ip_types.h:70:1 */

type Sockaddr_in = struct {
	Fsin_family int16
	Fsin_port   U_short
	Fsin_addr   struct {
		FS_un struct {
			F__ccgo_pad1 [0]uint32
			FS_un_b      struct {
				Fs_b1 U_char
				Fs_b2 U_char
				Fs_b3 U_char
				Fs_b4 U_char
			}
		}
	}
	Fsin_zero [8]int8
} /* _ip_types.h:75:1 */

type HOSTENT = Hostent   /* _ip_types.h:82:25 */
type PHOSTENT = uintptr  /* _ip_types.h:83:25 */
type LPHOSTENT = uintptr /* _ip_types.h:84:25 */

type SERVENT = Servent   /* _ip_types.h:86:25 */
type PSERVENT = uintptr  /* _ip_types.h:87:25 */
type LPSERVENT = uintptr /* _ip_types.h:88:25 */

type PROTOENT = Protoent  /* _ip_types.h:90:26 */
type PPROTOENT = uintptr  /* _ip_types.h:91:26 */
type LPPROTOENT = uintptr /* _ip_types.h:92:26 */

type SOCKADDR = Sockaddr  /* _ip_types.h:94:26 */
type PSOCKADDR = uintptr  /* _ip_types.h:95:26 */
type LPSOCKADDR = uintptr /* _ip_types.h:96:26 */

type SOCKADDR_IN = Sockaddr_in /* _ip_types.h:98:28 */
type PSOCKADDR_IN = uintptr    /* _ip_types.h:99:28 */
type LPSOCKADDR_IN = uintptr   /* _ip_types.h:100:28 */

type LINGER = Linger    /* _ip_types.h:102:24 */
type PLINGER = uintptr  /* _ip_types.h:103:24 */
type LPLINGER = uintptr /* _ip_types.h:104:24 */

type TIMEVAL = Timeval   /* _ip_types.h:115:25 */
type PTIMEVAL = uintptr  /* _ip_types.h:116:25 */
type LPTIMEVAL = uintptr /* _ip_types.h:117:25 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type WSAData = struct {
	FwVersion       WORD
	FwHighVersion   WORD
	FiMaxSockets    uint16
	FiMaxUdpDg      uint16
	FlpVendorInfo   uintptr
	FszDescription  [257]int8
	FszSystemStatus [129]int8
	F__ccgo_pad1    [6]byte
} /* _wsadata.h:13:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type WSADATA = WSAData   /* _wsadata.h:29:3 */
type LPWSADATA = uintptr /* _wsadata.h:29:12 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// FIXME FIXME FIXME FIXME FIXME: Much more data need moving here.
// This holds only SCOPE_LEVEL and SCOPE_ID so that compilations
// do not fail.

type SCOPE_LEVEL = uint32 /* ws2def.h:26:3 */

type X_SCOPE_ID = struct {
	F__0 struct {
		F__0 struct {
			F__ccgo_pad1 [0]uint32
			FZone        uint32 /* ULONG Zone: 28, ULONG Level: 4 */
		}
	}
} /* ws2def.h:28:9 */

type SCOPE_ID = X_SCOPE_ID /* ws2def.h:36:3 */
type PSCOPE_ID = uintptr   /* ws2def.h:36:13 */

type Sockaddr_storage = struct {
	Fss_family  int16
	F__ss_pad1  [6]int8
	F__ss_align int64
	F__ss_pad2  [112]int8
} /* winsock2.h:269:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type LPWSAOVERLAPPED = uintptr /* winsock2.h:369:30 */

type X_WSABUF = struct {
	Flen         U_long
	F__ccgo_pad1 [4]byte
	Fbuf         uintptr
} /* winsock2.h:386:11 */

type WSABUF = X_WSABUF  /* winsock2.h:389:5 */
type LPWSABUF = uintptr /* winsock2.h:389:12 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type SERVICETYPE = ULONG /* qos.h:9:15 */

type X_flowspec = struct {
	FTokenRate          ULONG
	FTokenBucketSize    ULONG
	FPeakBandwidth      ULONG
	FLatency            ULONG
	FDelayVariation     ULONG
	FServiceType        SERVICETYPE
	FMaxSduSize         ULONG
	FMinimumPolicedSize ULONG
} /* qos.h:32:11 */

type FLOWSPEC = X_flowspec /* qos.h:41:5 */
type PFLOWSPEC = uintptr   /* qos.h:41:14 */
type LPFLOWSPEC = uintptr  /* qos.h:41:25 */

type X_QOS_OBJECT_HDR = struct {
	FObjectType   ULONG
	FObjectLength ULONG
} /* qos.h:46:11 */

type QOS_OBJECT_HDR = X_QOS_OBJECT_HDR /* qos.h:49:5 */
type LPQOS_OBJECT_HDR = uintptr        /* qos.h:49:21 */

type X_QOS_SD_MODE = struct {
	FObjectHdr        QOS_OBJECT_HDR
	FShapeDiscardMode ULONG
} /* qos.h:57:11 */

type QOS_SD_MODE = X_QOS_SD_MODE /* qos.h:60:5 */
type LPQOS_SD_MODE = uintptr     /* qos.h:60:18 */

type X_QOS_SHAPING_RATE = struct {
	FObjectHdr   QOS_OBJECT_HDR
	FShapingRate ULONG
} /* qos.h:67:11 */

type QOS_SHAPING_RATE = X_QOS_SHAPING_RATE /* qos.h:70:5 */
type LPQOS_SHAPING_RATE = uintptr          /* qos.h:70:23 */

type X_QualityOfService = struct {
	FSendingFlowspec   FLOWSPEC
	FReceivingFlowspec FLOWSPEC
	FProviderSpecific  WSABUF
} /* winsock2.h:393:11 */

type QOS = X_QualityOfService /* winsock2.h:397:5 */
type LPQOS = uintptr          /* winsock2.h:397:9 */

type GROUP = uint32 /* winsock2.h:407:22 */

type X_WSANETWORKEVENTS = struct {
	FlNetworkEvents int32
	FiErrorCode     [10]int32
} /* winsock2.h:412:11 */

type WSANETWORKEVENTS = X_WSANETWORKEVENTS /* winsock2.h:415:5 */
type LPWSANETWORKEVENTS = uintptr          /* winsock2.h:415:22 */

type X_WSAPROTOCOLCHAIN = struct {
	FChainLen     int32
	FChainEntries [7]DWORD
} /* winsock2.h:426:11 */

type WSAPROTOCOLCHAIN = X_WSAPROTOCOLCHAIN /* winsock2.h:430:5 */
type LPWSAPROTOCOLCHAIN = uintptr          /* winsock2.h:430:22 */

type X_WSAPROTOCOL_INFOA = struct {
	FdwServiceFlags1    DWORD
	FdwServiceFlags2    DWORD
	FdwServiceFlags3    DWORD
	FdwServiceFlags4    DWORD
	FdwProviderFlags    DWORD
	FProviderId         GUID
	FdwCatalogEntryId   DWORD
	FProtocolChain      WSAPROTOCOLCHAIN
	FiVersion           int32
	FiAddressFamily     int32
	FiMaxSockAddr       int32
	FiMinSockAddr       int32
	FiSocketType        int32
	FiProtocol          int32
	FiProtocolMaxOffset int32
	FiNetworkByteOrder  int32
	FiSecurityScheme    int32
	FdwMessageSize      DWORD
	FdwProviderReserved DWORD
	FszProtocol         [256]CHAR
} /* winsock2.h:434:11 */

type WSAPROTOCOL_INFOA = X_WSAPROTOCOL_INFOA /* winsock2.h:455:5 */
type LPWSAPROTOCOL_INFOA = uintptr           /* winsock2.h:455:23 */

type X_WSAPROTOCOL_INFOW = struct {
	FdwServiceFlags1    DWORD
	FdwServiceFlags2    DWORD
	FdwServiceFlags3    DWORD
	FdwServiceFlags4    DWORD
	FdwProviderFlags    DWORD
	FProviderId         GUID
	FdwCatalogEntryId   DWORD
	FProtocolChain      WSAPROTOCOLCHAIN
	FiVersion           int32
	FiAddressFamily     int32
	FiMaxSockAddr       int32
	FiMinSockAddr       int32
	FiSocketType        int32
	FiProtocol          int32
	FiProtocolMaxOffset int32
	FiNetworkByteOrder  int32
	FiSecurityScheme    int32
	FdwMessageSize      DWORD
	FdwProviderReserved DWORD
	FszProtocol         [256]WCHAR
} /* winsock2.h:457:11 */

type WSAPROTOCOL_INFOW = X_WSAPROTOCOL_INFOW /* winsock2.h:478:5 */
type LPWSAPROTOCOL_INFOW = uintptr           /* winsock2.h:478:23 */

type WSAPROTOCOL_INFO = WSAPROTOCOL_INFOA     /* winsock2.h:480:3 */
type LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOA /* winsock2.h:481:3 */

type LPCONDITIONPROC = uintptr                    /* winsock2.h:562:15 */
type LPWSAOVERLAPPED_COMPLETION_ROUTINE = uintptr /* winsock2.h:563:16 */

type WSACOMPLETIONTYPE = uint32    /* winsock2.h:573:5 */
type PWSACOMPLETIONTYPE = uintptr  /* winsock2.h:573:23 */
type LPWSACOMPLETIONTYPE = uintptr /* winsock2.h:573:43 */

type X_WSACOMPLETION = struct {
	FType        WSACOMPLETIONTYPE
	F__ccgo_pad1 [4]byte
	FParameters  struct {
		FWindowMessage struct {
			FhWnd        HWND
			FuMsg        UINT
			F__ccgo_pad1 [4]byte
			Fcontext     WPARAM
		}
	}
} /* winsock2.h:575:11 */

type WSACOMPLETION = X_WSACOMPLETION /* winsock2.h:596:5 */
type PWSACOMPLETION = uintptr        /* winsock2.h:596:19 */
type LPWSACOMPLETION = uintptr       /* winsock2.h:596:35 */

type SOCKADDR_STORAGE = Sockaddr_storage /* winsock2.h:601:35 */
type PSOCKADDR_STORAGE = uintptr         /* winsock2.h:602:35 */
type LPSOCKADDR_STORAGE = uintptr        /* winsock2.h:603:35 */
type ADDRESS_FAMILY = U_short            /* winsock2.h:604:19 */

type X_BLOB = struct {
	FcbSize      ULONG
	F__ccgo_pad1 [4]byte
	FpBlobData   uintptr
} /* winsock2.h:610:11 */

type BLOB = X_BLOB    /* winsock2.h:613:5 */
type LPBLOB = uintptr /* winsock2.h:613:10 */

type X_SOCKET_ADDRESS = struct {
	FlpSockaddr      LPSOCKADDR
	FiSockaddrLength INT
	F__ccgo_pad1     [4]byte
} /* winsock2.h:686:11 */

type SOCKET_ADDRESS = X_SOCKET_ADDRESS /* winsock2.h:689:5 */
type PSOCKET_ADDRESS = uintptr         /* winsock2.h:689:20 */
type LPSOCKET_ADDRESS = uintptr        /* winsock2.h:689:37 */

type X_CSADDR_INFO = struct {
	FLocalAddr   SOCKET_ADDRESS
	FRemoteAddr  SOCKET_ADDRESS
	FiSocketType INT
	FiProtocol   INT
} /* winsock2.h:691:11 */

type CSADDR_INFO = X_CSADDR_INFO /* winsock2.h:696:5 */
type PCSADDR_INFO = uintptr      /* winsock2.h:696:17 */
type LPCSADDR_INFO = uintptr     /* winsock2.h:696:31 */

type X_SOCKET_ADDRESS_LIST = struct {
	FiAddressCount INT
	F__ccgo_pad1   [4]byte
	FAddress       [1]SOCKET_ADDRESS
} /* winsock2.h:699:11 */

type SOCKET_ADDRESS_LIST = X_SOCKET_ADDRESS_LIST /* winsock2.h:702:5 */
type PSOCKET_ADDRESS_LIST = uintptr              /* winsock2.h:702:25 */
type LPSOCKET_ADDRESS_LIST = uintptr             /* winsock2.h:702:47 */

type X_AFPROTOCOLS = struct {
	FiAddressFamily INT
	FiProtocol      INT
} /* winsock2.h:704:11 */

type AFPROTOCOLS = X_AFPROTOCOLS /* winsock2.h:707:5 */
type PAFPROTOCOLS = uintptr      /* winsock2.h:707:17 */
type LPAFPROTOCOLS = uintptr     /* winsock2.h:707:31 */

type WSAECOMPARATOR = uint32    /* winsock2.h:712:5 */
type PWSAECOMPARATOR = uintptr  /* winsock2.h:712:20 */
type LPWSAECOMPARATOR = uintptr /* winsock2.h:712:37 */

type X_WSAVersion = struct {
	FdwVersion DWORD
	FecHow     WSAECOMPARATOR
} /* winsock2.h:714:11 */

type WSAVERSION = X_WSAVersion /* winsock2.h:717:5 */
type PWSAVERSION = uintptr     /* winsock2.h:717:16 */
type LPWSAVERSION = uintptr    /* winsock2.h:717:29 */

type X_WSAQuerySetA = struct {
	FdwSize                  DWORD
	F__ccgo_pad1             [4]byte
	FlpszServiceInstanceName LPSTR
	FlpServiceClassId        LPGUID
	FlpVersion               LPWSAVERSION
	FlpszComment             LPSTR
	FdwNameSpace             DWORD
	F__ccgo_pad2             [4]byte
	FlpNSProviderId          LPGUID
	FlpszContext             LPSTR
	FdwNumberOfProtocols     DWORD
	F__ccgo_pad3             [4]byte
	FlpafpProtocols          LPAFPROTOCOLS
	FlpszQueryString         LPSTR
	FdwNumberOfCsAddrs       DWORD
	F__ccgo_pad4             [4]byte
	FlpcsaBuffer             LPCSADDR_INFO
	FdwOutputFlags           DWORD
	F__ccgo_pad5             [4]byte
	FlpBlob                  LPBLOB
} /* winsock2.h:719:11 */

type WSAQUERYSETA = X_WSAQuerySetA /* winsock2.h:735:5 */
type PWSAQUERYSETA = uintptr       /* winsock2.h:735:18 */
type LPWSAQUERYSETA = uintptr      /* winsock2.h:735:33 */

type X_WSAQuerySetW = struct {
	FdwSize                  DWORD
	F__ccgo_pad1             [4]byte
	FlpszServiceInstanceName LPWSTR
	FlpServiceClassId        LPGUID
	FlpVersion               LPWSAVERSION
	FlpszComment             LPWSTR
	FdwNameSpace             DWORD
	F__ccgo_pad2             [4]byte
	FlpNSProviderId          LPGUID
	FlpszContext             LPWSTR
	FdwNumberOfProtocols     DWORD
	F__ccgo_pad3             [4]byte
	FlpafpProtocols          LPAFPROTOCOLS
	FlpszQueryString         LPWSTR
	FdwNumberOfCsAddrs       DWORD
	F__ccgo_pad4             [4]byte
	FlpcsaBuffer             LPCSADDR_INFO
	FdwOutputFlags           DWORD
	F__ccgo_pad5             [4]byte
	FlpBlob                  LPBLOB
} /* winsock2.h:737:11 */

type WSAQUERYSETW = X_WSAQuerySetW /* winsock2.h:753:5 */
type PWSAQUERYSETW = uintptr       /* winsock2.h:753:18 */
type LPWSAQUERYSETW = uintptr      /* winsock2.h:753:33 */

type WSAQUERYSET = WSAQUERYSETA     /* winsock2.h:755:3 */
type PWSAQUERYSET = PWSAQUERYSETA   /* winsock2.h:756:3 */
type LPWSAQUERYSET = LPWSAQUERYSETA /* winsock2.h:757:3 */

type WSAESETSERVICEOP = uint32    /* winsock2.h:803:5 */
type PWSAESETSERVICEOP = uintptr  /* winsock2.h:803:22 */
type LPWSAESETSERVICEOP = uintptr /* winsock2.h:803:41 */

type X_WSANSClassInfoA = struct {
	FlpszName    LPSTR
	FdwNameSpace DWORD
	FdwValueType DWORD
	FdwValueSize DWORD
	F__ccgo_pad1 [4]byte
	FlpValue     LPVOID
} /* winsock2.h:805:11 */

type WSANSCLASSINFOA = X_WSANSClassInfoA /* winsock2.h:811:5 */
type PWSANSCLASSINFOA = uintptr          /* winsock2.h:811:21 */
type LPWSANSCLASSINFOA = uintptr         /* winsock2.h:811:39 */

type X_WSANSClassInfoW = struct {
	FlpszName    LPWSTR
	FdwNameSpace DWORD
	FdwValueType DWORD
	FdwValueSize DWORD
	F__ccgo_pad1 [4]byte
	FlpValue     LPVOID
} /* winsock2.h:813:11 */

type WSANSCLASSINFOW = X_WSANSClassInfoW /* winsock2.h:819:5 */
type PWSANSCLASSINFOW = uintptr          /* winsock2.h:819:21 */
type LPWSANSCLASSINFOW = uintptr         /* winsock2.h:819:39 */

type WSANSCLASSINFO = WSANSCLASSINFOA     /* winsock2.h:821:3 */
type PWSANSCLASSINFO = PWSANSCLASSINFOA   /* winsock2.h:822:3 */
type LPWSANSCLASSINFO = LPWSANSCLASSINFOA /* winsock2.h:823:3 */

type X_WSAServiceClassInfoA = struct {
	FlpServiceClassId     LPGUID
	FlpszServiceClassName LPSTR
	FdwCount              DWORD
	F__ccgo_pad1          [4]byte
	FlpClassInfos         LPWSANSCLASSINFOA
} /* winsock2.h:825:11 */

type WSASERVICECLASSINFOA = X_WSAServiceClassInfoA /* winsock2.h:830:5 */
type PWSASERVICECLASSINFOA = uintptr               /* winsock2.h:830:26 */
type LPWSASERVICECLASSINFOA = uintptr              /* winsock2.h:830:49 */

type X_WSAServiceClassInfoW = struct {
	FlpServiceClassId     LPGUID
	FlpszServiceClassName LPWSTR
	FdwCount              DWORD
	F__ccgo_pad1          [4]byte
	FlpClassInfos         LPWSANSCLASSINFOW
} /* winsock2.h:832:11 */

type WSASERVICECLASSINFOW = X_WSAServiceClassInfoW /* winsock2.h:837:5 */
type PWSASERVICECLASSINFOW = uintptr               /* winsock2.h:837:26 */
type LPWSASERVICECLASSINFOW = uintptr              /* winsock2.h:837:49 */

type WSASERVICECLASSINFO = WSASERVICECLASSINFOA     /* winsock2.h:839:3 */
type PWSASERVICECLASSINFO = PWSASERVICECLASSINFOA   /* winsock2.h:840:3 */
type LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOA /* winsock2.h:841:3 */

type X_WSANAMESPACE_INFOA = struct {
	FNSProviderId   GUID
	FdwNameSpace    DWORD
	FfActive        WINBOOL
	FdwVersion      DWORD
	F__ccgo_pad1    [4]byte
	FlpszIdentifier LPSTR
} /* winsock2.h:843:11 */

type WSANAMESPACE_INFOA = X_WSANAMESPACE_INFOA /* winsock2.h:849:5 */
type PWSANAMESPACE_INFOA = uintptr             /* winsock2.h:849:24 */
type LPWSANAMESPACE_INFOA = uintptr            /* winsock2.h:849:45 */

type X_WSANAMESPACE_INFOW = struct {
	FNSProviderId   GUID
	FdwNameSpace    DWORD
	FfActive        WINBOOL
	FdwVersion      DWORD
	F__ccgo_pad1    [4]byte
	FlpszIdentifier LPWSTR
} /* winsock2.h:851:11 */

type WSANAMESPACE_INFOW = X_WSANAMESPACE_INFOW /* winsock2.h:857:5 */
type PWSANAMESPACE_INFOW = uintptr             /* winsock2.h:857:24 */
type LPWSANAMESPACE_INFOW = uintptr            /* winsock2.h:857:45 */

type WSANAMESPACE_INFO = WSANAMESPACE_INFOA     /* winsock2.h:859:3 */
type PWSANAMESPACE_INFO = PWSANAMESPACE_INFOA   /* winsock2.h:860:3 */
type LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOA /* winsock2.h:861:3 */

// FIXME: WSAMSG originally lived in mswsock.h,
// newer SDKs moved it into a new ws2def.h. for
// now we keep it here.
type X_WSAMSG = struct {
	Fname          LPSOCKADDR
	Fnamelen       INT
	F__ccgo_pad1   [4]byte
	FlpBuffers     LPWSABUF
	FdwBufferCount DWORD
	F__ccgo_pad2   [4]byte
	FControl       WSABUF
	FdwFlags       DWORD
	F__ccgo_pad3   [4]byte
} /* winsock2.h:866:11 */

// FIXME: WSAMSG originally lived in mswsock.h,
// newer SDKs moved it into a new ws2def.h. for
// now we keep it here.
type WSAMSG = X_WSAMSG  /* winsock2.h:873:5 */
type PWSAMSG = uintptr  /* winsock2.h:873:12 */
type LPWSAMSG = uintptr /* winsock2.h:873:21 */

type LPFN_ACCEPT = uintptr                           /* winsock2.h:889:18 */
type LPFN_BIND = uintptr                             /* winsock2.h:890:15 */
type LPFN_CLOSESOCKET = uintptr                      /* winsock2.h:891:15 */
type LPFN_CONNECT = uintptr                          /* winsock2.h:892:15 */
type LPFN_IOCTLSOCKET = uintptr                      /* winsock2.h:893:15 */
type LPFN_GETPEERNAME = uintptr                      /* winsock2.h:894:15 */
type LPFN_GETSOCKNAME = uintptr                      /* winsock2.h:895:15 */
type LPFN_GETSOCKOPT = uintptr                       /* winsock2.h:896:15 */
type LPFN_HTONL = uintptr                            /* winsock2.h:897:18 */
type LPFN_HTONS = uintptr                            /* winsock2.h:898:19 */
type LPFN_INET_ADDR = uintptr                        /* winsock2.h:899:29 */
type LPFN_INET_NTOA = uintptr                        /* winsock2.h:900:16 */
type LPFN_LISTEN = uintptr                           /* winsock2.h:901:15 */
type LPFN_NTOHL = uintptr                            /* winsock2.h:902:18 */
type LPFN_NTOHS = uintptr                            /* winsock2.h:903:19 */
type LPFN_RECV = uintptr                             /* winsock2.h:904:15 */
type LPFN_RECVFROM = uintptr                         /* winsock2.h:905:15 */
type LPFN_SELECT = uintptr                           /* winsock2.h:906:15 */
type LPFN_SEND = uintptr                             /* winsock2.h:907:15 */
type LPFN_SENDTO = uintptr                           /* winsock2.h:908:15 */
type LPFN_SETSOCKOPT = uintptr                       /* winsock2.h:909:15 */
type LPFN_SHUTDOWN = uintptr                         /* winsock2.h:910:15 */
type LPFN_SOCKET = uintptr                           /* winsock2.h:911:18 */
type LPFN_GETHOSTBYADDR = uintptr                    /* winsock2.h:912:26 */
type LPFN_GETHOSTBYNAME = uintptr                    /* winsock2.h:913:26 */
type LPFN_GETHOSTNAME = uintptr                      /* winsock2.h:914:15 */
type LPFN_GETSERVBYPORT = uintptr                    /* winsock2.h:915:26 */
type LPFN_GETSERVBYNAME = uintptr                    /* winsock2.h:916:26 */
type LPFN_GETPROTOBYNUMBER = uintptr                 /* winsock2.h:917:27 */
type LPFN_GETPROTOBYNAME = uintptr                   /* winsock2.h:918:27 */
type LPFN_WSASTARTUP = uintptr                       /* winsock2.h:919:15 */
type LPFN_WSACLEANUP = uintptr                       /* winsock2.h:920:15 */
type LPFN_WSASETLASTERROR = uintptr                  /* winsock2.h:921:16 */
type LPFN_WSAGETLASTERROR = uintptr                  /* winsock2.h:922:15 */
type LPFN_WSAISBLOCKING = uintptr                    /* winsock2.h:923:19 */
type LPFN_WSAUNHOOKBLOCKINGHOOK = uintptr            /* winsock2.h:924:15 */
type LPFN_WSASETBLOCKINGHOOK = uintptr               /* winsock2.h:925:19 */
type LPFN_WSACANCELBLOCKINGCALL = uintptr            /* winsock2.h:926:15 */
type LPFN_WSAASYNCGETSERVBYNAME = uintptr            /* winsock2.h:927:18 */
type LPFN_WSAASYNCGETSERVBYPORT = uintptr            /* winsock2.h:928:18 */
type LPFN_WSAASYNCGETPROTOBYNAME = uintptr           /* winsock2.h:929:18 */
type LPFN_WSAASYNCGETPROTOBYNUMBER = uintptr         /* winsock2.h:930:18 */
type LPFN_WSAASYNCGETHOSTBYNAME = uintptr            /* winsock2.h:931:18 */
type LPFN_WSAASYNCGETHOSTBYADDR = uintptr            /* winsock2.h:932:18 */
type LPFN_WSACANCELASYNCREQUEST = uintptr            /* winsock2.h:933:15 */
type LPFN_WSAASYNCSELECT = uintptr                   /* winsock2.h:934:15 */
type LPFN_WSAACCEPT = uintptr                        /* winsock2.h:935:18 */
type LPFN_WSACLOSEEVENT = uintptr                    /* winsock2.h:936:19 */
type LPFN_WSACONNECT = uintptr                       /* winsock2.h:937:15 */
type LPFN_WSACREATEEVENT = uintptr                   /* winsock2.h:938:20 */
type LPFN_WSADUPLICATESOCKETA = uintptr              /* winsock2.h:939:15 */
type LPFN_WSADUPLICATESOCKETW = uintptr              /* winsock2.h:940:15 */
type LPFN_WSAENUMNETWORKEVENTS = uintptr             /* winsock2.h:941:15 */
type LPFN_WSAENUMPROTOCOLSA = uintptr                /* winsock2.h:942:15 */
type LPFN_WSAENUMPROTOCOLSW = uintptr                /* winsock2.h:943:15 */
type LPFN_WSAEVENTSELECT = uintptr                   /* winsock2.h:944:15 */
type LPFN_WSAGETOVERLAPPEDRESULT = uintptr           /* winsock2.h:945:19 */
type LPFN_WSAGETQOSBYNAME = uintptr                  /* winsock2.h:946:19 */
type LPFN_WSAHTONL = uintptr                         /* winsock2.h:947:15 */
type LPFN_WSAHTONS = uintptr                         /* winsock2.h:948:15 */
type LPFN_WSAIOCTL = uintptr                         /* winsock2.h:949:15 */
type LPFN_WSAJOINLEAF = uintptr                      /* winsock2.h:950:18 */
type LPFN_WSANTOHL = uintptr                         /* winsock2.h:951:15 */
type LPFN_WSANTOHS = uintptr                         /* winsock2.h:952:15 */
type LPFN_WSARECV = uintptr                          /* winsock2.h:953:15 */
type LPFN_WSARECVDISCONNECT = uintptr                /* winsock2.h:954:15 */
type LPFN_WSARECVFROM = uintptr                      /* winsock2.h:955:15 */
type LPFN_WSARESETEVENT = uintptr                    /* winsock2.h:956:19 */
type LPFN_WSASEND = uintptr                          /* winsock2.h:957:15 */
type LPFN_WSASENDDISCONNECT = uintptr                /* winsock2.h:958:15 */
type LPFN_WSASENDTO = uintptr                        /* winsock2.h:959:15 */
type LPFN_WSASETEVENT = uintptr                      /* winsock2.h:960:19 */
type LPFN_WSASOCKETA = uintptr                       /* winsock2.h:961:18 */
type LPFN_WSASOCKETW = uintptr                       /* winsock2.h:962:18 */
type LPFN_WSAWAITFORMULTIPLEEVENTS = uintptr         /* winsock2.h:963:17 */
type LPFN_WSAADDRESSTOSTRINGA = uintptr              /* winsock2.h:964:15 */
type LPFN_WSAADDRESSTOSTRINGW = uintptr              /* winsock2.h:965:15 */
type LPFN_WSASTRINGTOADDRESSA = uintptr              /* winsock2.h:966:15 */
type LPFN_WSASTRINGTOADDRESSW = uintptr              /* winsock2.h:967:15 */
type LPFN_WSALOOKUPSERVICEBEGINA = uintptr           /* winsock2.h:968:15 */
type LPFN_WSALOOKUPSERVICEBEGINW = uintptr           /* winsock2.h:969:15 */
type LPFN_WSALOOKUPSERVICENEXTA = uintptr            /* winsock2.h:970:15 */
type LPFN_WSALOOKUPSERVICENEXTW = uintptr            /* winsock2.h:971:15 */
type LPFN_WSANSPIOCTL = uintptr                      /* winsock2.h:972:15 */
type LPFN_WSALOOKUPSERVICEEND = uintptr              /* winsock2.h:973:15 */
type LPFN_WSAINSTALLSERVICECLASSA = uintptr          /* winsock2.h:974:15 */
type LPFN_WSAINSTALLSERVICECLASSW = uintptr          /* winsock2.h:975:15 */
type LPFN_WSAREMOVESERVICECLASS = uintptr            /* winsock2.h:976:15 */
type LPFN_WSAGETSERVICECLASSINFOA = uintptr          /* winsock2.h:977:15 */
type LPFN_WSAGETSERVICECLASSINFOW = uintptr          /* winsock2.h:978:15 */
type LPFN_WSAENUMNAMESPACEPROVIDERSA = uintptr       /* winsock2.h:979:15 */
type LPFN_WSAENUMNAMESPACEPROVIDERSW = uintptr       /* winsock2.h:980:15 */
type LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA = uintptr /* winsock2.h:981:15 */
type LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW = uintptr /* winsock2.h:982:15 */
type LPFN_WSASETSERVICEA = uintptr                   /* winsock2.h:983:15 */
type LPFN_WSASETSERVICEW = uintptr                   /* winsock2.h:984:15 */
type LPFN_WSAPROVIDERCONFIGCHANGE = uintptr          /* winsock2.h:985:15 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type In6_addr = struct {
	Fu struct {
		F__ccgo_pad1 [0]uint16
		FByte        [16]U_char
	}
} /* in6addr.h:17:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IN6_ADDR = In6_addr  /* in6addr.h:25:3 */
type PIN6_ADDR = uintptr  /* in6addr.h:25:13 */
type LPIN6_ADDR = uintptr /* in6addr.h:25:25 */

type Ipv6_mreq = struct {
	Fipv6mr_multiaddr struct {
		Fu struct {
			F__ccgo_pad1 [0]uint16
			FByte        [16]U_char
		}
	}
	Fipv6mr_interface uint32
} /* ws2ipdef.h:23:9 */

type IPV6_MREQ = Ipv6_mreq /* ws2ipdef.h:26:3 */

type Sockaddr_in6_old = struct {
	Fsin6_family   int16
	Fsin6_port     U_short
	Fsin6_flowinfo U_long
	Fsin6_addr     struct {
		Fu struct {
			F__ccgo_pad1 [0]uint16
			FByte        [16]U_char
		}
	}
} /* ws2ipdef.h:28:1 */

type Sockaddr_gen1 = struct {
	F__ccgo_pad1 [0]uint32
	FAddress     struct {
		Fsa_family U_short
		Fsa_data   [14]int8
	}
	F__ccgo_pad2 [8]byte
} /* ws2ipdef.h:35:9 */

type Sockaddr_gen = Sockaddr_gen1 /* ws2ipdef.h:39:3 */

type Sockaddr_in6 = struct {
	Fsin6_family   int16
	Fsin6_port     U_short
	Fsin6_flowinfo U_long
	Fsin6_addr     struct {
		Fu struct {
			F__ccgo_pad1 [0]uint16
			FByte        [16]U_char
		}
	}
	F__24 struct{ Fsin6_scope_id U_long }
} /* ws2ipdef.h:41:1 */

type SOCKADDR_IN6 = Sockaddr_in6 /* ws2ipdef.h:52:29 */
type PSOCKADDR_IN6 = uintptr     /* ws2ipdef.h:53:29 */
type LPSOCKADDR_IN6 = uintptr    /* ws2ipdef.h:54:29 */

type X_INTERFACE_INFO = struct {
	FiiFlags            U_long
	FiiAddress          Sockaddr_gen
	FiiBroadcastAddress Sockaddr_gen
	FiiNetmask          Sockaddr_gen
} /* ws2ipdef.h:56:9 */

type INTERFACE_INFO = X_INTERFACE_INFO /* ws2ipdef.h:61:3 */
type LPINTERFACE_INFO = uintptr        /* ws2ipdef.h:61:18 */

type MULTICAST_MODE_TYPE = uint32 /* ws2ipdef.h:66:3 */

type X_sockaddr_in6_pair = struct {
	FSourceAddress      PSOCKADDR_IN6
	FDestinationAddress PSOCKADDR_IN6
} /* ws2ipdef.h:68:9 */

type SOCKADDR_IN6_PAIR = X_sockaddr_in6_pair /* ws2ipdef.h:71:3 */
type PSOCKADDR_IN6_PAIR = uintptr            /* ws2ipdef.h:71:22 */

type X_SOCKADDR_INET = struct {
	FIpv4        SOCKADDR_IN
	F__ccgo_pad1 [12]byte
} /* ws2ipdef.h:73:9 */

type SOCKADDR_INET = X_SOCKADDR_INET /* ws2ipdef.h:77:3 */
type PSOCKADDR_INET = uintptr        /* ws2ipdef.h:77:18 */

type Group_filter = struct {
	Fgf_interface ULONG
	F__ccgo_pad1  [4]byte
	Fgf_group     SOCKADDR_STORAGE
	Fgf_fmode     MULTICAST_MODE_TYPE
	Fgf_numsrc    ULONG
	Fgf_slist     [1]SOCKADDR_STORAGE
} /* ws2ipdef.h:79:9 */

type GROUP_FILTER = Group_filter /* ws2ipdef.h:85:3 */
type PGROUP_FILTER = uintptr     /* ws2ipdef.h:85:17 */

type Group_req = struct {
	Fgr_interface ULONG
	F__ccgo_pad1  [4]byte
	Fgr_group     SOCKADDR_STORAGE
} /* ws2ipdef.h:87:9 */

type GROUP_REQ = Group_req /* ws2ipdef.h:90:3 */
type PGROUP_REQ = uintptr  /* ws2ipdef.h:90:14 */

type Group_source_req = struct {
	Fgsr_interface ULONG
	F__ccgo_pad1   [4]byte
	Fgsr_group     SOCKADDR_STORAGE
	Fgsr_source    SOCKADDR_STORAGE
} /* ws2ipdef.h:92:9 */

type GROUP_SOURCE_REQ = Group_source_req /* ws2ipdef.h:96:3 */
type PGROUP_SOURCE_REQ = uintptr         /* ws2ipdef.h:96:21 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type Ip_mreq = struct {
	Fimr_multiaddr struct {
		FS_un struct {
			F__ccgo_pad1 [0]uint32
			FS_un_b      struct {
				Fs_b1 U_char
				Fs_b2 U_char
				Fs_b3 U_char
				Fs_b4 U_char
			}
		}
	}
	Fimr_interface struct {
		FS_un struct {
			F__ccgo_pad1 [0]uint32
			FS_un_b      struct {
				Fs_b1 U_char
				Fs_b2 U_char
				Fs_b3 U_char
				Fs_b4 U_char
			}
		}
	}
} /* _ip_mreq1.h:12:1 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type Ip_mreq_source = struct {
	Fimr_multiaddr struct {
		FS_un struct {
			F__ccgo_pad1 [0]uint32
			FS_un_b      struct {
				Fs_b1 U_char
				Fs_b2 U_char
				Fs_b3 U_char
				Fs_b4 U_char
			}
		}
	}
	Fimr_sourceaddr struct {
		FS_un struct {
			F__ccgo_pad1 [0]uint32
			FS_un_b      struct {
				Fs_b1 U_char
				Fs_b2 U_char
				Fs_b3 U_char
				Fs_b4 U_char
			}
		}
	}
	Fimr_interface struct {
		FS_un struct {
			F__ccgo_pad1 [0]uint32
			FS_un_b      struct {
				Fs_b1 U_char
				Fs_b2 U_char
				Fs_b3 U_char
				Fs_b4 U_char
			}
		}
	}
} /* ws2tcpip.h:22:1 */

type Ip_msfilter = struct {
	Fimsf_multiaddr struct {
		FS_un struct {
			F__ccgo_pad1 [0]uint32
			FS_un_b      struct {
				Fs_b1 U_char
				Fs_b2 U_char
				Fs_b3 U_char
				Fs_b4 U_char
			}
		}
	}
	Fimsf_interface struct {
		FS_un struct {
			F__ccgo_pad1 [0]uint32
			FS_un_b      struct {
				Fs_b1 U_char
				Fs_b2 U_char
				Fs_b3 U_char
				Fs_b4 U_char
			}
		}
	}
	Fimsf_fmode  U_long
	Fimsf_numsrc U_long
	Fimsf_slist  [1]struct {
		FS_un struct {
			F__ccgo_pad1 [0]uint32
			FS_un_b      struct {
				Fs_b1 U_char
				Fs_b2 U_char
				Fs_b3 U_char
				Fs_b4 U_char
			}
		}
	}
} /* ws2tcpip.h:28:1 */

// Those declarations are mandatory for Open Group Base spec

type X_INTERFACE_INFO_EX = struct {
	FiiFlags            U_long
	F__ccgo_pad1        [4]byte
	FiiAddress          SOCKET_ADDRESS
	FiiBroadcastAddress SOCKET_ADDRESS
	FiiNetmask          SOCKET_ADDRESS
} /* ws2tcpip.h:157:9 */

// Those declarations are mandatory for Open Group Base spec

type INTERFACE_INFO_EX = X_INTERFACE_INFO_EX /* ws2tcpip.h:162:3 */
type LPINTERFACE_INFO_EX = uintptr           /* ws2tcpip.h:162:21 */

type In_pktinfo = struct {
	Fipi_addr    IN_ADDR
	Fipi_ifindex UINT
} /* ws2tcpip.h:170:9 */

type IN_PKTINFO = In_pktinfo /* ws2tcpip.h:173:3 */

type In6_pktinfo = struct {
	Fipi6_addr    IN6_ADDR
	Fipi6_ifindex UINT
} /* ws2tcpip.h:177:9 */

type IN6_PKTINFO = In6_pktinfo /* ws2tcpip.h:180:3 */

type Addrinfo = struct {
	Fai_flags     int32
	Fai_family    int32
	Fai_socktype  int32
	Fai_protocol  int32
	Fai_addrlen   Size_t
	Fai_canonname uintptr
	Fai_addr      uintptr
	Fai_next      uintptr
} /* ws2tcpip.h:196:9 */

type ADDRINFOA = Addrinfo /* ws2tcpip.h:205:3 */
type PADDRINFOA = uintptr /* ws2tcpip.h:205:13 */

type AddrinfoW = struct {
	Fai_flags     int32
	Fai_family    int32
	Fai_socktype  int32
	Fai_protocol  int32
	Fai_addrlen   Size_t
	Fai_canonname PWSTR
	Fai_addr      uintptr
	Fai_next      uintptr
} /* ws2tcpip.h:207:9 */

type ADDRINFOW = AddrinfoW /* ws2tcpip.h:216:3 */
type PADDRINFOW = uintptr  /* ws2tcpip.h:216:13 */

type ADDRINFOT = ADDRINFOA /* ws2tcpip.h:218:35 */
type PADDRINFOT = uintptr  /* ws2tcpip.h:218:45 */

type ADDRINFO = ADDRINFOA /* ws2tcpip.h:220:19 */
type LPADDRINFO = uintptr /* ws2tcpip.h:220:28 */

type LPFN_GETADDRINFO = uintptr  /* ws2tcpip.h:254:15 */
type LPFN_GETADDRINFOW = uintptr /* ws2tcpip.h:255:15 */

type LPFN_FREEADDRINFO = uintptr  /* ws2tcpip.h:270:16 */
type LPFN_FREEADDRINFOW = uintptr /* ws2tcpip.h:271:16 */

type Socklen_t = int32 /* ws2tcpip.h:278:15 */

type LPFN_GETNAMEINFO = uintptr  /* ws2tcpip.h:288:15 */
type LPFN_GETNAMEINFOW = uintptr /* ws2tcpip.h:289:15 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type Tcp_keepalive = struct {
	Fonoff             U_long
	Fkeepalivetime     U_long
	Fkeepaliveinterval U_long
} /* mstcpip.h:18:1 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the Wine project.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_iobuf = struct {
	F_ptr        uintptr
	F_cnt        int32
	F__ccgo_pad1 [4]byte
	F_base       uintptr
	F_flag       int32
	F_file       int32
	F_charbuf    int32
	F_bufsiz     int32
	F_tmpfname   uintptr
} /* stdio.h:24:3 */

type FILE = X_iobuf /* stdio.h:34:25 */

type Fpos_t = int64 /* stdio.h:102:37 */

func vsnprintf(tls *libc.TLS, __stream uintptr, __n Size_t, __format uintptr, __local_argv Va_list) int32 { /* stdio.h:868:7: */
	return libc.X__ms_vsnprintf(tls, __stream, __n, __format, __local_argv)

}

func vsnwprintf(tls *libc.TLS, s uintptr, n Size_t, format uintptr, arg Va_list) int32 { /* stdio.h:1392:15: */
	return libc.X_vsnwprintf(tls, s, n, format, arg)

}

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

func vswprintf(tls *libc.TLS, __stream uintptr, __count Size_t, __format uintptr, __local_argv X__builtin_va_list) int32 { /* swprintf.inl:27:5: */
	return vsnwprintf(tls, __stream, __count, __format, __local_argv)
}

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type WSPIAPI_PGETADDRINFO = uintptr  /* wspiapi.h:36:13 */
type WSPIAPI_PGETNAMEINFO = uintptr  /* wspiapi.h:37:13 */
type WSPIAPI_PFREEADDRINFO = uintptr /* wspiapi.h:38:14 */

type WSPIAPI_FUNCTION = struct {
	FpszName   uintptr
	FpfAddress FARPROC
} /* wspiapi.h:46:5 */

//  Pull in the typedef of TCHAR for windows.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_TCHAR = int8   /* tchar.h:967:16 */
type X_TSCHAR = int8  /* tchar.h:968:23 */
type X_TUCHAR = uint8 /* tchar.h:969:25 */
type X_TXCHAR = int8  /* tchar.h:970:16 */
type X_TINT = int32   /* tchar.h:971:15 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

//---------------------------------------------------------------------------
// The following sets of #includes and #ifdefs are required to get Tcl to
// compile under the windows compilers.
//---------------------------------------------------------------------------

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type Clock_t = int32 /* time.h:60:16 */

type Tm = struct {
	Ftm_sec   int32
	Ftm_min   int32
	Ftm_hour  int32
	Ftm_mday  int32
	Ftm_mon   int32
	Ftm_year  int32
	Ftm_wday  int32
	Ftm_yday  int32
	Ftm_isdst int32
} /* time.h:97:3 */

func localtime(tls *libc.TLS, _Time uintptr) uintptr { /* time.h:232:27: */
	return libc.X_localtime64(tls, _Time)
}

func gmtime(tls *libc.TLS, _Time uintptr) uintptr { /* time.h:234:27: */
	return libc.X_gmtime64(tls, _Time)
}

func mktime(tls *libc.TLS, _Tm uintptr) Time_t { /* time.h:238:34: */
	return libc.X_mktime64(tls, _Tm)
}

var Xdaylight int32    /* time.h:256:22: */
var Xtimezone int32    /* time.h:257:23: */
var Xtzname [2]uintptr /* time.h:258:23: */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type Timezone = struct {
	Ftz_minuteswest int32
	Ftz_dsttime     int32
} /* time.h:266:1 */

// Adding timespec definition.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X__timeb32 = struct {
	Ftime        X__time32_t
	Fmillitm     uint16
	Ftimezone    int16
	Fdstflag     int16
	F__ccgo_pad1 [2]byte
} /* timeb.h:53:3 */

type Timeb = struct {
	Ftime        Time_t
	Fmillitm     uint16
	Ftimezone    int16
	Fdstflag     int16
	F__ccgo_pad1 [2]byte
} /* timeb.h:61:3 */

type X__timeb64 = struct {
	Ftime        X__time64_t
	Fmillitm     uint16
	Ftimezone    int16
	Fdstflag     int16
	F__ccgo_pad1 [2]byte
} /* timeb.h:69:3 */

// POSIX 2008 says clock_gettime and timespec are defined in time.h header,
//    but other systems - like Linux, Solaris, etc - tend to declare such
//    recent extensions only if the following guards are met.
//
//    Copyright (c) 2011-2016  mingw-w64 project
//
//    Permission is hereby granted, free of charge, to any person obtaining a
//    copy of this software and associated documentation files (the "Software"),
//    to deal in the Software without restriction, including without limitation
//    the rights to use, copy, modify, merge, publish, distribute, sublicense,
//    and/or sell copies of the Software, and to permit persons to whom the
//    Software is furnished to do so, subject to the following conditions:
//
//    The above copyright notice and this permission notice shall be included in
//    all copies or substantial portions of the Software.
//
//    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
//    DEALINGS IN THE SOFTWARE.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Posix timers are supported

// Monotonic clocks are available.

// CPU-time clocks are available.

// Clock support in threads are available.

type Clockid_t = int32 /* pthread_time.h:49:13 */

type X_stat32 = struct {
	Fst_dev      X_dev_t
	Fst_ino      X_ino_t
	Fst_mode     uint16
	Fst_nlink    int16
	Fst_uid      int16
	Fst_gid      int16
	F__ccgo_pad1 [2]byte
	Fst_rdev     X_dev_t
	Fst_size     X_off_t
	Fst_atime    X__time32_t
	Fst_mtime    X__time32_t
	Fst_ctime    X__time32_t
} /* _mingw_stat64.h:25:3 */

type Stat = struct {
	Fst_dev      X_dev_t
	Fst_ino      X_ino_t
	Fst_mode     uint16
	Fst_nlink    int16
	Fst_uid      int16
	Fst_gid      int16
	F__ccgo_pad1 [2]byte
	Fst_rdev     X_dev_t
	Fst_size     X_off_t
	Fst_atime    Time_t
	Fst_mtime    Time_t
	Fst_ctime    Time_t
} /* _mingw_stat64.h:40:3 */

type X_stat32i64 = struct {
	Fst_dev      X_dev_t
	Fst_ino      X_ino_t
	Fst_mode     uint16
	Fst_nlink    int16
	Fst_uid      int16
	Fst_gid      int16
	F__ccgo_pad1 [2]byte
	Fst_rdev     X_dev_t
	F__ccgo_pad2 [4]byte
	Fst_size     int64
	Fst_atime    X__time32_t
	Fst_mtime    X__time32_t
	Fst_ctime    X__time32_t
	F__ccgo_pad3 [4]byte
} /* _mingw_stat64.h:55:3 */

type X_stat64i32 = struct {
	Fst_dev      X_dev_t
	Fst_ino      X_ino_t
	Fst_mode     uint16
	Fst_nlink    int16
	Fst_uid      int16
	Fst_gid      int16
	F__ccgo_pad1 [2]byte
	Fst_rdev     X_dev_t
	Fst_size     X_off_t
	Fst_atime    X__time64_t
	Fst_mtime    X__time64_t
	Fst_ctime    X__time64_t
} /* _mingw_stat64.h:69:3 */

type X_stat64 = struct {
	Fst_dev      X_dev_t
	Fst_ino      X_ino_t
	Fst_mode     uint16
	Fst_nlink    int16
	Fst_uid      int16
	Fst_gid      int16
	F__ccgo_pad1 [2]byte
	Fst_rdev     X_dev_t
	F__ccgo_pad2 [4]byte
	Fst_size     int64
	Fst_atime    X__time64_t
	Fst_mtime    X__time64_t
	Fst_ctime    X__time64_t
} /* _mingw_stat64.h:83:3 */

type Mbstate_t = int32  /* wchar.h:1431:15 */
type X_Wint_t = Wchar_t /* wchar.h:1433:19 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

//
//    Copyright (c) 2013-2016  mingw-w64 project
//
//    Permission is hereby granted, free of charge, to any person obtaining a
//    copy of this software and associated documentation files (the "Software"),
//    to deal in the Software without restriction, including without limitation
//    the rights to use, copy, modify, merge, publish, distribute, sublicense,
//    and/or sell copies of the Software, and to permit persons to whom the
//    Software is furnished to do so, subject to the following conditions:
//
//    The above copyright notice and this permission notice shall be included in
//    all copies or substantial portions of the Software.
//
//    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
//    DEALINGS IN THE SOFTWARE.

// Windows has rudimentary signals support.

type Sig_atomic_t = int32 /* signal.h:18:15 */

type X__p_sig_fn_t = uintptr /* signal.h:48:16 */

// 7.18.1.1  Exact-width integer types
type Int8_t = int8     /* stdint.h:35:21 */
type Uint8_t = uint8   /* stdint.h:36:25 */
type Int16_t = int16   /* stdint.h:37:16 */
type Uint16_t = uint16 /* stdint.h:38:25 */
type Int32_t = int32   /* stdint.h:39:14 */
type Uint32_t = uint32 /* stdint.h:40:20 */
type Int64_t = int64   /* stdint.h:41:38 */
type Uint64_t = uint64 /* stdint.h:42:48 */

// 7.18.1.2  Minimum-width integer types
type Int_least8_t = int8     /* stdint.h:45:21 */
type Uint_least8_t = uint8   /* stdint.h:46:25 */
type Int_least16_t = int16   /* stdint.h:47:16 */
type Uint_least16_t = uint16 /* stdint.h:48:25 */
type Int_least32_t = int32   /* stdint.h:49:14 */
type Uint_least32_t = uint32 /* stdint.h:50:20 */
type Int_least64_t = int64   /* stdint.h:51:38 */
type Uint_least64_t = uint64 /* stdint.h:52:48 */

// 7.18.1.3  Fastest minimum-width integer types
//  Not actually guaranteed to be fastest for all purposes
//  Here we use the exact-width types for 8 and 16-bit ints.
type Int_fast8_t = int8     /* stdint.h:58:21 */
type Uint_fast8_t = uint8   /* stdint.h:59:23 */
type Int_fast16_t = int16   /* stdint.h:60:16 */
type Uint_fast16_t = uint16 /* stdint.h:61:25 */
type Int_fast32_t = int32   /* stdint.h:62:14 */
type Uint_fast32_t = uint32 /* stdint.h:63:24 */
type Int_fast64_t = int64   /* stdint.h:64:38 */
type Uint_fast64_t = uint64 /* stdint.h:65:48 */

// 7.18.1.5  Greatest-width integer types
type Intmax_t = int64   /* stdint.h:68:38 */
type Uintmax_t = uint64 /* stdint.h:69:48 */

// 7.18.2  Limits of specified-width integer types

// 7.18.2.1  Limits of exact-width integer types

// 7.18.2.2  Limits of minimum-width integer types

// 7.18.2.3  Limits of fastest minimum-width integer types

// 7.18.2.4  Limits of integer types capable of holding
//     object pointers

// 7.18.2.5  Limits of greatest-width integer types

// 7.18.3  Limits of other integer types

// wint_t is unsigned short for compatibility with MS runtime

// 7.18.4  Macros for integer constants

// 7.18.4.1  Macros for minimum-width integer constants
//
//     Accoding to Douglas Gwyn <gwyn@arl.mil>:
// 	"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
// 	9899:1999 as initially published, the expansion was required
// 	to be an integer constant of precisely matching type, which
// 	is impossible to accomplish for the shorter types on most
// 	platforms, because C99 provides no standard way to designate
// 	an integer constant with width less than that of type int.
// 	TC1 changed this to require just an integer constant
// 	*expression* with *promoted* type."
//
// 	The trick used here is from Clive D W Feather.

//  The 'trick' doesn't work in C89 for long long because, without
//     suffix, (val) will be evaluated as int, not intmax_t

// 7.18.4.2  Macros for greatest-width integer constants

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// ISO C Standard:  7.17  Common definitions  <stddef.h>

// Any one of these symbols __need_* means that GNU libc
//    wants us just to define one data type.  So don't define
//    the symbols that indicate this file's entire job has been done.

// In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
//    defined if the corresponding type is *not* defined.
//    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_

// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
//    Just ignore it.

// On VxWorks, <type/vxTypesBase.h> may have defined macros like
//    _TYPE_size_t which will typedef size_t.  fixincludes patched the
//    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
//    not defined, and so that defining this macro defines _GCC_SIZE_T.
//    If we find that the macros are still defined at this point, we must
//    invoke them so that the type is defined as expected.

// In case nobody has defined these types, but we aren't running under
//    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
//    __WCHAR_TYPE__ have reasonable values.  This can happen if the
//    parts of GCC is compiled by an older compiler, that actually
//    include gstddef.h, such as collect2.

// Signed type of difference of two pointers.

// Define this type if we are doing the whole job,
//    or if we want this type in particular.

// If this symbol has done its job, get rid of it.

// Unsigned type of `sizeof' something.

// Define this type if we are doing the whole job,
//    or if we want this type in particular.

// Wide character type.
//    Locale-writers should change this as necessary to
//    be big enough to hold unique values not between 0 and 127,
//    and not (wchar_t) -1, for each defined multibyte character.

// Define this type if we are doing the whole job,
//    or if we want this type in particular.

//  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
//     are already defined.
//  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.

// A null pointer constant.

// Offset of member MEMBER in a struct of type TYPE.

// Copyright (C) 1989-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  7.17  Common definitions  <stddef.h>

type Imaxdiv_t = struct {
	Fquot Intmax_t
	Frem  Intmax_t
} /* inttypes.h:23:4 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_utimbuf = struct {
	Factime  Time_t
	Fmodtime Time_t
} /* utime.h:58:3 */

type X__utimbuf32 = struct {
	Factime  X__time32_t
	Fmodtime X__time32_t
} /* utime.h:63:3 */

type X__utimbuf64 = struct {
	Factime  X__time64_t
	Fmodtime X__time64_t
} /* utime.h:68:3 */

type Utimbuf = struct {
	Factime  Time_t
	Fmodtime Time_t
} /* utime.h:74:3 */

type Utimbuf32 = struct {
	Factime  X__time32_t
	Fmodtime X__time32_t
} /* utime.h:79:3 */

// The following defines redefine the Windows Socket errors as
// BSD errors so Tcl_PosixError can do the right thing.

// Visual Studio doesn't have these, so just choose some high numbers

// Signals not known to the standard ANSI signal.h.  These are used
// by Tcl_WaitPid() and generic/tclPosixStr.c

// Supply definitions for macros to query wait status, if not already
// defined in header files above.

// Define constants for waitpid() system call if they aren't defined
// by a system header file.

// Define access mode constants if they aren't already defined.

// Define macros to query file type bits, if they're not already
// defined.

// Windows compilers do not define S_IFBLK. However, Tcl uses it in
// GetTypeFromMode to identify blockSpecial devices based on the
// value in the statsbuf st_mode field. We have no other way to pass this
// from NativeStat on Windows so are forced to define it here.
// The definition here is essentially what is seen on Linux and MingW.
// XXX - the root problem is Tcl using Unix definitions instead of
// abstracting the structure into a platform independent one. Sigh - perhaps
// Tcl 9

// Define MAXPATHLEN in terms of MAXPATH if available

// Define pid_t and uid_t if they're not already defined.

// Visual C++ has some odd names for common functions, so we need to
// define a few macros to handle them.  Also, it defines EDEADLOCK and
// EDEADLK as the same value, which confuses Tcl_ErrnoId().

// Borland's timezone and environ functions.

// MSVC 8.0 started to mark many standard C library functions depreciated
// including the *printf family and others. Tell it to shut up.
// (_MSC_VER is 1200 for VC6, 1300 or 1310 for vc7.net, 1400 for 8.0)
//---------------------------------------------------------------------------
// The following macros and declarations represent the interface between
// generic and windows-specific parts of Tcl.  Some of the macros may
// override functions declared in tclInt.h.
//---------------------------------------------------------------------------

// The default platform eol translation on Windows is TCL_TRANSLATE_CRLF:

// Declare dynamic loading extension macro.

// The following define ensures that we use the native putenv
// implementation to modify the environment array.  This keeps
// the C level environment in synch with the system level environment.

// Msvcrt's putenv() copies the string rather than takes ownership of it.

// Older version of Mingw are known to lack a MWMO_ALERTABLE define.

// The following defines wrap the system memory allocation routines for
// use by tclAlloc.c.

// This type is not defined in the Windows headers

// The following macros have trivial definitions, allowing generic code to
// address platform-specific issues.

// The following macros and declarations wrap the C runtime library
// functions.

// tcl.h --
//
//	This header file describes the externally-visible facilities of the
//	Tcl interpreter.
//
// Copyright (c) 1987-1994 The Regents of the University of California.
// Copyright (c) 1993-1996 Lucent Technologies.
// Copyright (c) 1994-1998 Sun Microsystems, Inc.
// Copyright (c) 1998-2000 by Scriptics Corporation.
// Copyright (c) 2002 by Kevin B. Kenny.  All rights reserved.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// For C++ compilers, use extern "C"

// The following defines are used to indicate the various release levels.

// When version numbers change here, must also go into the following files and
// update the version numbers:
//
// library/init.tcl	(1 LOC patch)
// unix/configure.in	(2 LOC Major, 2 LOC minor, 1 LOC patch)
// win/configure.in	(as above)
// win/tcl.m4		(not patchlevel)
// README		(sections 0 and 2, with and without separator)
// macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC
// win/README		(not patchlevel) (sections 0 and 2)
// unix/tcl.spec	(1 LOC patch)
// tools/tcl.hpj.in	(not patchlevel, for windows installer)

//----------------------------------------------------------------------------
// The following definitions set up the proper options for Windows compilers.
// We use this method because there is no autoconf equivalent.

// Utility macros: STRINGIFY takes an argument and wraps it in "" (double
// quotation marks), JOIN joins two arguments.

// A special definition used to allow this header file to be included from
// windows resource files so that they can obtain version information.
// RC_INVOKED is defined by default by the windows RC tool.
//
// Resource compilers don't like all the C stuff, like typedefs and function
// declarations, that occur below, so block them out.

// Special macro to define mutexes, that doesn't do anything if we are not
// using threads.

// Tcl's public routine Tcl_FSSeek() uses the values SEEK_SET, SEEK_CUR, and
// SEEK_END, all #define'd by stdio.h .
//
// Also, many extensions need stdio.h, and they've grown accustomed to tcl.h
// providing it for them rather than #include-ing it themselves as they
// should, so also for their sake, we keep the #include to be consistent with
// prior Tcl releases.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

//----------------------------------------------------------------------------
// Support for functions with a variable number of arguments.
//
// The following TCL_VARARGS* macros are to support old extensions
// written for older versions of Tcl where the macros permitted
// support for the varargs.h system as well as stdarg.h .
//
// New code should just directly be written to use stdarg.h conventions.

// Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with GCC; see the file COPYING.  If not, write to
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.

// As a special exception, if you include this header file into source
//    files compiled by GCC, this header file does not by itself cause
//    the resulting executable to be covered by the GNU General Public
//    License.  This exception does not however invalidate any other
//    reasons why the executable file might be covered by the GNU General
//    Public License.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

// include mingw stuff
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Copyright (C) 1989-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

// Allow a part of Tcl's API to be explicitly marked as deprecated.
//
// Used to make TIP 330/336 generate moans even if people use the
// compatibility macros. Change your code, guys! We won't support you forever.

//----------------------------------------------------------------------------
// Macros used to declare a function to be exported by a DLL. Used by Windows,
// maps to no-op declarations on non-Windows systems. The default build on
// windows is for a DLL, which causes the DLLIMPORT and DLLEXPORT macros to be
// nonempty. To build a static library, the macro STATIC_BUILD should be
// defined.
//
// Note: when building static but linking dynamically to MSVCRT we must still
//       correctly decorate the C library imported function.  Use CRTIMPORT
//       for this purpose.  _DLL is defined by the compiler when linking to
//       MSVCRT.

// These macros are used to control whether functions are being declared for
// import or export. If a function is being declared while it is being built
// to be included in a shared library, then it should have the DLLEXPORT
// storage class. If is being declared for use by a module that is going to
// link against the shared library, then it should have the DLLIMPORT storage
// class. If the symbol is being declared for a static build or for use from a
// stub library, then the storage class should be empty.
//
// The convention is that a macro called BUILD_xxxx, where xxxx is the name of
// a library we are building, is set on the compile line for sources that are
// to be placed in the library. When this macro is set, the storage class will
// be set to DLLEXPORT. At the end of the header file, the storage class will
// be reset to DLLIMPORT.

// The following _ANSI_ARGS_ macro is to support old extensions
// written for older versions of Tcl where it permitted support
// for compilers written in the pre-prototype era of C.
//
// New code should use prototypes.

// Definitions that allow this header file to be used either with or without
// ANSI C features.

// Make sure EXTERN isn't defined elsewhere.

//----------------------------------------------------------------------------
// The following code is copied from winnt.h. If we don't replicate it here,
// then <windows.h> can't be included after tcl.h, since tcl.h also defines
// VOID. This block is skipped under Cygwin and Mingw.

// Macro to use instead of "void" for arguments that must have type "void *"
// in ANSI C; maps them to type "char *" in non-ANSI systems.

// Miscellaneous declarations.

type ClientData = uintptr /* tcl.h:344:15 */

// Darwin specific configure overrides (to support fat compiles, where
// configure runs only once for multiple architectures):

// Cross-compiling 32-bit on a 64-bit platform? Then our
// configure script does the wrong thing. Correct that here.

// Define Tcl_WideInt to be a type that is (at least) 64-bits wide, and define
// Tcl_WideUInt to be the unsigned variant of that type (assuming that where
// we have one, we can have the other.)
//
// Also defines the following macros:
// TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on a
//	LP64 system such as modern Solaris or Linux ... not including Win64)
// Tcl_WideAsLong - forgetful converter from wideInt to long.
// Tcl_LongAsWide - sign-extending converter from long to wideInt.
// Tcl_WideAsDouble - converter from wideInt to double.
// Tcl_DoubleAsWide - converter from double to wideInt.
//
// The following invariant should hold for any long value 'longVal':
//	longVal == Tcl_WideAsLong(Tcl_LongAsWide(longVal))
//
// Note on converting between Tcl_WideInt and strings. This implementation (in
// tclObj.c) depends on the function
// sprintf(...,"%" TCL_LL_MODIFIER "d",...).

type Tcl_WideInt = int64   /* tcl.h:430:28 */
type Tcl_WideUInt = uint64 /* tcl.h:431:36 */

// The next short section of defines are only done when not running on Windows
// or some other strange platform.

type Tcl_StatBuf = X_stat64 /* tcl.h:459:26 */

//----------------------------------------------------------------------------
// Data structures defined opaquely in this module. The definitions below just
// provide dummy types. A few fields are made visible in Tcl_Interp
// structures, namely those used for returning a string result from commands.
// Direct access to the result field is discouraged in Tcl 8.0. The
// interpreter result is either an object or a string, and the two values are
// kept consistent unless some C code sets interp->result directly.
// Programmers should use either the function Tcl_GetObjResult() or
// Tcl_GetStringResult() to read the interpreter's result. See the SetResult
// man page for details.
//
// Note: any change to the Tcl_Interp definition below must be mirrored in the
// "real" definition in tclInt.h.
//
// Note: Tcl_ObjCmdProc functions do not directly set result and freeProc.
// Instead, they set a Tcl_Obj member in the "real" structure that can be
// accessed with Tcl_GetObjResult() and Tcl_SetObjResult().

type Tcl_Interp1 = struct {
	FresultDontUse    uintptr
	FfreeProcDontUse  uintptr
	FerrorLineDontUse int32
	F__ccgo_pad1      [4]byte
} /* tcl.h:508:9 */

//----------------------------------------------------------------------------
// Data structures defined opaquely in this module. The definitions below just
// provide dummy types. A few fields are made visible in Tcl_Interp
// structures, namely those used for returning a string result from commands.
// Direct access to the result field is discouraged in Tcl 8.0. The
// interpreter result is either an object or a string, and the two values are
// kept consistent unless some C code sets interp->result directly.
// Programmers should use either the function Tcl_GetObjResult() or
// Tcl_GetStringResult() to read the interpreter's result. See the SetResult
// man page for details.
//
// Note: any change to the Tcl_Interp definition below must be mirrored in the
// "real" definition in tclInt.h.
//
// Note: Tcl_ObjCmdProc functions do not directly set result and freeProc.
// Instead, they set a Tcl_Obj member in the "real" structure that can be
// accessed with Tcl_GetObjResult() and Tcl_SetObjResult().

type Tcl_Interp = Tcl_Interp1 /* tcl.h:540:1 */

type Tcl_AsyncHandler = uintptr       /* tcl.h:542:34 */
type Tcl_Channel = uintptr            /* tcl.h:543:29 */
type Tcl_ChannelTypeVersion = uintptr /* tcl.h:544:40 */
type Tcl_Command = uintptr            /* tcl.h:545:29 */
type Tcl_Condition = uintptr          /* tcl.h:546:31 */
type Tcl_Dict = uintptr               /* tcl.h:547:26 */
type Tcl_EncodingState = uintptr      /* tcl.h:548:35 */
type Tcl_Encoding = uintptr           /* tcl.h:549:30 */
type Tcl_Event1 = struct {
	Fproc    uintptr
	FnextPtr uintptr
} /* tcl.h:550:9 */

type Tcl_Event = Tcl_Event1    /* tcl.h:550:26 */
type Tcl_InterpState = uintptr /* tcl.h:551:33 */
type Tcl_LoadHandle_ = struct {
	FclientData        ClientData
	FfindSymbolProcPtr uintptr
	FunloadFileProcPtr uintptr
} /* tcl.h:552:9 */

type Tcl_LoadHandle = uintptr    /* tcl.h:552:32 */
type Tcl_Mutex = uintptr         /* tcl.h:553:27 */
type Tcl_Pid = uintptr           /* tcl.h:554:25 */
type Tcl_RegExp = uintptr        /* tcl.h:555:28 */
type Tcl_ThreadDataKey = uintptr /* tcl.h:556:35 */
type Tcl_ThreadId = uintptr      /* tcl.h:557:30 */
type Tcl_TimerToken = uintptr    /* tcl.h:558:32 */
type Tcl_Trace = uintptr         /* tcl.h:559:27 */
type Tcl_Var = uintptr           /* tcl.h:560:25 */
type Tcl_ZlibStream = uintptr    /* tcl.h:561:32 */

// Threading function return types used for abstracting away platform
// differences when writing a Tcl_ThreadCreateProc. See the NewThread function
// in generic/tclThreadTest.c for it's usage.

// Definition of values for default stacksize and the possible flags to be
// given to Tcl_CreateThread.

// Flag values passed to Tcl_StringCaseMatch.

// Flag values passed to Tcl_GetRegExpFromObj.

// Flags values passed to Tcl_RegExpExecObj.

// Structures filled in by Tcl_RegExpInfo. Note that all offset values are
// relative to the start of the match string, not the beginning of the entire
// string.

type Tcl_RegExpIndices1 = struct {
	Fstart int32
	Fend   int32
} /* tcl.h:638:9 */

// Threading function return types used for abstracting away platform
// differences when writing a Tcl_ThreadCreateProc. See the NewThread function
// in generic/tclThreadTest.c for it's usage.

// Definition of values for default stacksize and the possible flags to be
// given to Tcl_CreateThread.

// Flag values passed to Tcl_StringCaseMatch.

// Flag values passed to Tcl_GetRegExpFromObj.

// Flags values passed to Tcl_RegExpExecObj.

// Structures filled in by Tcl_RegExpInfo. Note that all offset values are
// relative to the start of the match string, not the beginning of the entire
// string.

type Tcl_RegExpIndices = Tcl_RegExpIndices1 /* tcl.h:643:3 */

type Tcl_RegExpInfo1 = struct {
	Fnsubs       int32
	F__ccgo_pad1 [4]byte
	Fmatches     uintptr
	FextendStart int32
	Freserved    int32
} /* tcl.h:645:9 */

type Tcl_RegExpInfo = Tcl_RegExpInfo1 /* tcl.h:652:3 */

// Picky compilers complain if this typdef doesn't appear before the struct's
// reference in tclDecls.h.

type Tcl_Stat_ = uintptr    /* tcl.h:659:21 */
type Tcl_OldStat_ = uintptr /* tcl.h:660:21 */

//----------------------------------------------------------------------------
// When a TCL command returns, the interpreter contains a result from the
// command. Programmers are strongly encouraged to use one of the functions
// Tcl_GetObjResult() or Tcl_GetStringResult() to read the interpreter's
// result. See the SetResult man page for details. Besides this result, the
// command function returns an integer code, which is one of the following:
//
// TCL_OK		Command completed normally; the interpreter's result
//			contains the command's result.
// TCL_ERROR		The command couldn't be completed successfully; the
//			interpreter's result describes what went wrong.
// TCL_RETURN		The command requests that the current function return;
//			the interpreter's result contains the function's
//			return value.
// TCL_BREAK		The command requests that the innermost loop be
//			exited; the interpreter's result is meaningless.
// TCL_CONTINUE		Go on to the next iteration of the current loop; the
//			interpreter's result is meaningless.

//----------------------------------------------------------------------------
// Flags to control what substitutions are performed by Tcl_SubstObj():

// Argument descriptors for math function callbacks in expressions:

type Tcl_ValueType = uint32 /* tcl.h:707:3 */

type Tcl_Value1 = struct {
	Ftype        Tcl_ValueType
	FintValue    int32
	FdoubleValue float64
	FwideValue   Tcl_WideInt
} /* tcl.h:709:9 */

type Tcl_Value = Tcl_Value1 /* tcl.h:715:3 */

// Forward declaration of Tcl_Obj to prevent an error when the forward
// reference to Tcl_Obj is encountered in the function types declared below.

type Tcl_Obj1 = struct {
	FrefCount    int32
	F__ccgo_pad1 [4]byte
	Fbytes       uintptr
	Flength      int32
	F__ccgo_pad2 [4]byte
	FtypePtr     uintptr
	FinternalRep struct {
		F__ccgo_pad1 [0]uint64
		FlongValue   int32
		F__ccgo_pad2 [12]byte
	}
} /* tcl.h:722:1 */

//----------------------------------------------------------------------------
// The following structure represents a type of object, which is a particular
// internal representation for an object plus a set of functions that provide
// standard operations on objects of that type.

type Tcl_ObjType1 = struct {
	Fname             uintptr
	FfreeIntRepProc   uintptr
	FdupIntRepProc    uintptr
	FupdateStringProc uintptr
	FsetFromAnyProc   uintptr
} /* tcl.h:722:1 */

//----------------------------------------------------------------------------
// The following structure represents a type of object, which is a particular
// internal representation for an object plus a set of functions that provide
// standard operations on objects of that type.

type Tcl_ObjType = Tcl_ObjType1 /* tcl.h:811:3 */

// One of the following structures exists for each object in the Tcl system.
// An object stores a value as either a string, some internal representation,
// or both.

type Tcl_Obj = Tcl_Obj1 /* tcl.h:858:3 */

//----------------------------------------------------------------------------
// The following structure contains the state needed by Tcl_SaveResult. No-one
// outside of Tcl should access any of these fields. This structure is
// typically allocated on the stack.

type Tcl_SavedResult1 = struct {
	Fresult       uintptr
	FfreeProc     uintptr
	FobjResultPtr uintptr
	FappendResult uintptr
	FappendAvl    int32
	FappendUsed   int32
	FresultSpace  [201]int8
	F__ccgo_pad1  [7]byte
} /* tcl.h:879:9 */

//----------------------------------------------------------------------------
// The following structure contains the state needed by Tcl_SaveResult. No-one
// outside of Tcl should access any of these fields. This structure is
// typically allocated on the stack.

type Tcl_SavedResult = Tcl_SavedResult1 /* tcl.h:887:3 */

//----------------------------------------------------------------------------
// The following definitions support Tcl's namespace facility. Note: the first
// five fields must match exactly the fields in a Namespace structure (see
// tclInt.h).

type Tcl_Namespace1 = struct {
	Fname       uintptr
	FfullName   uintptr
	FclientData ClientData
	FdeleteProc uintptr
	FparentPtr  uintptr
} /* tcl.h:896:9 */

//----------------------------------------------------------------------------
// The following definitions support Tcl's namespace facility. Note: the first
// five fields must match exactly the fields in a Namespace structure (see
// tclInt.h).

type Tcl_Namespace = Tcl_Namespace1 /* tcl.h:912:3 */

//----------------------------------------------------------------------------
// The following structure represents a call frame, or activation record. A
// call frame defines a naming context for a procedure call: its local scope
// (for local variables) and its namespace scope (used for non-local
// variables; often the global :: namespace). A call frame can also define the
// naming context for a namespace eval or namespace inscope command: the
// namespace in which the command's code should execute. The Tcl_CallFrame
// structures exist only while procedures or namespace eval/inscope's are
// being executed, and provide a Tcl call stack.
//
// A call frame is initialized and pushed using Tcl_PushCallFrame and popped
// using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be provided by the
// Tcl_PushCallFrame caller, and callers typically allocate them on the C call
// stack for efficiency. For this reason, Tcl_CallFrame is defined as a
// structure and not as an opaque token. However, most Tcl_CallFrame fields
// are hidden since applications should not access them directly; others are
// declared as "dummyX".
//
// WARNING!! The structure definition must be kept consistent with the
// CallFrame structure in tclInt.h. If you change one, change the other.

type Tcl_CallFrame1 = struct {
	FnsPtr       uintptr
	Fdummy1      int32
	Fdummy2      int32
	Fdummy3      uintptr
	Fdummy4      uintptr
	Fdummy5      uintptr
	Fdummy6      int32
	F__ccgo_pad1 [4]byte
	Fdummy7      uintptr
	Fdummy8      uintptr
	Fdummy9      int32
	F__ccgo_pad2 [4]byte
	Fdummy10     uintptr
	Fdummy11     uintptr
	Fdummy12     uintptr
	Fdummy13     uintptr
} /* tcl.h:937:9 */

//----------------------------------------------------------------------------
// The following structure represents a call frame, or activation record. A
// call frame defines a naming context for a procedure call: its local scope
// (for local variables) and its namespace scope (used for non-local
// variables; often the global :: namespace). A call frame can also define the
// naming context for a namespace eval or namespace inscope command: the
// namespace in which the command's code should execute. The Tcl_CallFrame
// structures exist only while procedures or namespace eval/inscope's are
// being executed, and provide a Tcl call stack.
//
// A call frame is initialized and pushed using Tcl_PushCallFrame and popped
// using Tcl_PopCallFrame. Storage for a Tcl_CallFrame must be provided by the
// Tcl_PushCallFrame caller, and callers typically allocate them on the C call
// stack for efficiency. For this reason, Tcl_CallFrame is defined as a
// structure and not as an opaque token. However, most Tcl_CallFrame fields
// are hidden since applications should not access them directly; others are
// declared as "dummyX".
//
// WARNING!! The structure definition must be kept consistent with the
// CallFrame structure in tclInt.h. If you change one, change the other.

type Tcl_CallFrame = Tcl_CallFrame1 /* tcl.h:952:3 */

//----------------------------------------------------------------------------
// Information about commands that is returned by Tcl_GetCommandInfo and
// passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command
// function while proc is a traditional Tcl argc/argv string-based function.
// Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and
// proc are non-NULL and can be called to execute the command. However, it may
// be faster to call one instead of the other. The member isNativeObjectProc
// is set to 1 if an object-based function was registered by
// Tcl_CreateObjCommand, and to 0 if a string-based function was registered by
// Tcl_CreateCommand. The other function is typically set to a compatibility
// wrapper that does string-to-object or object-to-string argument conversions
// then calls the other function.

type Tcl_CmdInfo1 = struct {
	FisNativeObjectProc int32
	F__ccgo_pad1        [4]byte
	FobjProc            uintptr
	FobjClientData      ClientData
	Fproc               uintptr
	FclientData         ClientData
	FdeleteProc         uintptr
	FdeleteData         ClientData
	FnamespacePtr       uintptr
} /* tcl.h:969:9 */

//----------------------------------------------------------------------------
// Information about commands that is returned by Tcl_GetCommandInfo and
// passed to Tcl_SetCommandInfo. objProc is an objc/objv object-based command
// function while proc is a traditional Tcl argc/argv string-based function.
// Tcl_CreateObjCommand and Tcl_CreateCommand ensure that both objProc and
// proc are non-NULL and can be called to execute the command. However, it may
// be faster to call one instead of the other. The member isNativeObjectProc
// is set to 1 if an object-based function was registered by
// Tcl_CreateObjCommand, and to 0 if a string-based function was registered by
// Tcl_CreateCommand. The other function is typically set to a compatibility
// wrapper that does string-to-object or object-to-string argument conversions
// then calls the other function.

type Tcl_CmdInfo = Tcl_CmdInfo1 /* tcl.h:988:3 */

//----------------------------------------------------------------------------
// The structure defined below is used to hold dynamic strings. The only
// fields that clients should use are string and length, accessible via the
// macros Tcl_DStringValue and Tcl_DStringLength.

type Tcl_DString1 = struct {
	Fstring      uintptr
	Flength      int32
	FspaceAvl    int32
	FstaticSpace [200]int8
} /* tcl.h:998:9 */

//----------------------------------------------------------------------------
// The structure defined below is used to hold dynamic strings. The only
// fields that clients should use are string and length, accessible via the
// macros Tcl_DStringValue and Tcl_DStringLength.

type Tcl_DString = Tcl_DString1 /* tcl.h:1008:3 */

// Definitions for the maximum number of digits of precision that may be
// specified in the "tcl_precision" variable, and the number of bytes of
// buffer space required by Tcl_PrintDouble.

// Definition for a number of bytes of buffer space sufficient to hold the
// string representation of an integer in base 10 (assuming the existence of
// 64-bit integers).

// Flag values passed to Tcl_ConvertElement.
// TCL_DONT_USE_BRACES forces it not to enclose the element in braces, but to
//	use backslash quoting instead.
// TCL_DONT_QUOTE_HASH disables the default quoting of the '#' character. It
//	is safe to leave the hash unquoted when the element is not the first
//	element of a list, and this flag can be used by the caller to indicate
//	that condition.

// Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
// abbreviated strings.

//----------------------------------------------------------------------------
// Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv.
// WARNING: these bit choices must not conflict with the bit choices for
// evalFlag bits in tclInt.h!
//
// Meanings:
//	TCL_NO_EVAL:		Just record this command
//	TCL_EVAL_GLOBAL:	Execute script in global namespace
//	TCL_EVAL_DIRECT:	Do not compile this script
//	TCL_EVAL_INVOKE:	Magical Tcl_EvalObjv mode for aliases/ensembles
//				o Run in iPtr->lookupNsPtr or global namespace
//				o Cut out of error traces
//				o Don't reset the flags controlling ensemble
//				  error message rewriting.
//	TCL_CANCEL_UNWIND:	Magical Tcl_CancelEval mode that causes the
//				stack for the script in progress to be
//				completely unwound.
//	TCL_EVAL_NOERR:	Do no exception reporting at all, just return
//				as the caller will report.

// Special freeProc values that may be passed to Tcl_SetResult (see the man
// page for details):

// Flag values passed to variable-related functions.
// WARNING: these bit choices must not conflict with the bit choice for
// TCL_CANCEL_UNWIND, above.

// Required to support old variable/vdelete/vinfo traces.
// Indicate the semantics of the result of a trace.

// Flag values for ensemble commands.

// Flag values passed to command-related functions.

// The TCL_PARSE_PART1 flag is deprecated and has no effect. The part1 is now
// always parsed whenever the part2 is NULL. (This is to avoid a common error
// when converting code to use the new object based APIs and forgetting to
// give the flag)

// Types for linked variables:

//----------------------------------------------------------------------------
// Forward declarations of Tcl_HashTable and related types.

type Tcl_HashKeyType1 = struct {
	Fversion         int32
	Fflags           int32
	FhashKeyProc     uintptr
	FcompareKeysProc uintptr
	FallocEntryProc  uintptr
	FfreeEntryProc   uintptr
} /* tcl.h:1167:9 */

// Definitions for the maximum number of digits of precision that may be
// specified in the "tcl_precision" variable, and the number of bytes of
// buffer space required by Tcl_PrintDouble.

// Definition for a number of bytes of buffer space sufficient to hold the
// string representation of an integer in base 10 (assuming the existence of
// 64-bit integers).

// Flag values passed to Tcl_ConvertElement.
// TCL_DONT_USE_BRACES forces it not to enclose the element in braces, but to
//	use backslash quoting instead.
// TCL_DONT_QUOTE_HASH disables the default quoting of the '#' character. It
//	is safe to leave the hash unquoted when the element is not the first
//	element of a list, and this flag can be used by the caller to indicate
//	that condition.

// Flag that may be passed to Tcl_GetIndexFromObj to force it to disallow
// abbreviated strings.

//----------------------------------------------------------------------------
// Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv.
// WARNING: these bit choices must not conflict with the bit choices for
// evalFlag bits in tclInt.h!
//
// Meanings:
//	TCL_NO_EVAL:		Just record this command
//	TCL_EVAL_GLOBAL:	Execute script in global namespace
//	TCL_EVAL_DIRECT:	Do not compile this script
//	TCL_EVAL_INVOKE:	Magical Tcl_EvalObjv mode for aliases/ensembles
//				o Run in iPtr->lookupNsPtr or global namespace
//				o Cut out of error traces
//				o Don't reset the flags controlling ensemble
//				  error message rewriting.
//	TCL_CANCEL_UNWIND:	Magical Tcl_CancelEval mode that causes the
//				stack for the script in progress to be
//				completely unwound.
//	TCL_EVAL_NOERR:	Do no exception reporting at all, just return
//				as the caller will report.

// Special freeProc values that may be passed to Tcl_SetResult (see the man
// page for details):

// Flag values passed to variable-related functions.
// WARNING: these bit choices must not conflict with the bit choice for
// TCL_CANCEL_UNWIND, above.

// Required to support old variable/vdelete/vinfo traces.
// Indicate the semantics of the result of a trace.

// Flag values for ensemble commands.

// Flag values passed to command-related functions.

// The TCL_PARSE_PART1 flag is deprecated and has no effect. The part1 is now
// always parsed whenever the part2 is NULL. (This is to avoid a common error
// when converting code to use the new object based APIs and forgetting to
// give the flag)

// Types for linked variables:

//----------------------------------------------------------------------------
// Forward declarations of Tcl_HashTable and related types.

type Tcl_HashKeyType = Tcl_HashKeyType1 /* tcl.h:1167:32 */
type Tcl_HashTable1 = struct {
	Fbuckets       uintptr
	FstaticBuckets [4]uintptr
	FnumBuckets    int32
	FnumEntries    int32
	FrebuildSize   int32
	FdownShift     int32
	Fmask          int32
	FkeyType       int32
	FfindProc      uintptr
	FcreateProc    uintptr
	FtypePtr       uintptr
} /* tcl.h:1168:9 */

type Tcl_HashTable = Tcl_HashTable1 /* tcl.h:1168:30 */
type Tcl_HashEntry1 = struct {
	FnextPtr    uintptr
	FtablePtr   uintptr
	Fhash       uintptr
	FclientData ClientData
	Fkey        struct{ FoneWordValue uintptr }
} /* tcl.h:1168:9 */

type Tcl_HashEntry = Tcl_HashEntry1 /* tcl.h:1169:30 */

// Structure definition for information used to keep track of searches through
// hash tables:

type Tcl_HashSearch1 = struct {
	FtablePtr     uintptr
	FnextIndex    int32
	F__ccgo_pad1  [4]byte
	FnextEntryPtr uintptr
} /* tcl.h:1323:9 */

// Structure definition for information used to keep track of searches through
// hash tables:

type Tcl_HashSearch = Tcl_HashSearch1 /* tcl.h:1329:3 */

// Acceptable key types for hash tables:
//
// TCL_STRING_KEYS:		The keys are strings, they are copied into the
//				entry.
// TCL_ONE_WORD_KEYS:		The keys are pointers, the pointer is stored
//				in the entry.
// TCL_CUSTOM_TYPE_KEYS:	The keys are arbitrary types which are copied
//				into the entry.
// TCL_CUSTOM_PTR_KEYS:		The keys are pointers to arbitrary types, the
//				pointer is stored in the entry.
//
// While maintaining binary compatibility the above have to be distinct values
// as they are used to differentiate between old versions of the hash table
// which don't have a typePtr and new ones which do. Once binary compatibility
// is discarded in favour of making more wide spread changes TCL_STRING_KEYS
// can be the same as TCL_CUSTOM_TYPE_KEYS, and TCL_ONE_WORD_KEYS can be the
// same as TCL_CUSTOM_PTR_KEYS because they simply determine how the key is
// accessed from the entry and not the behaviour.

// Structure definition for information used to keep track of searches through
// dictionaries. These fields should not be accessed by code outside
// tclDictObj.c

type Tcl_DictSearch = struct {
	Fnext          uintptr
	Fepoch         int32
	F__ccgo_pad1   [4]byte
	FdictionaryPtr Tcl_Dict
} /* tcl.h:1369:3 */

// Positions to pass to Tcl_QueueEvent:

type Tcl_QueuePosition = uint32 /* tcl.h:1404:3 */

// Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
// event routines.

// The following structure keeps is used to hold a time value, either as an
// absolute time (the number of seconds from the epoch) or as an elapsed time.
// On Unix systems the epoch is Midnight Jan 1, 1970 GMT.

type Tcl_Time1 = struct {
	Fsec  int32
	Fusec int32
} /* tcl.h:1420:9 */

// Values to pass to Tcl_SetServiceMode to specify the behavior of notifier
// event routines.

// The following structure keeps is used to hold a time value, either as an
// absolute time (the number of seconds from the epoch) or as an elapsed time.
// On Unix systems the epoch is Midnight Jan 1, 1970 GMT.

type Tcl_Time = Tcl_Time1 /* tcl.h:1423:3 */

// struct Tcl_ChannelType:
//
// One such structure exists for each type (kind) of channel. It collects
// together in one place all the functions that are part of the specific
// channel type.
//
// It is recommend that the Tcl_Channel* functions are used to access elements
// of this structure, instead of direct accessing.

type Tcl_ChannelType1 = struct {
	FtypeName         uintptr
	Fversion          Tcl_ChannelTypeVersion
	FcloseProc        uintptr
	FinputProc        uintptr
	FoutputProc       uintptr
	FseekProc         uintptr
	FsetOptionProc    uintptr
	FgetOptionProc    uintptr
	FwatchProc        uintptr
	FgetHandleProc    uintptr
	Fclose2Proc       uintptr
	FblockModeProc    uintptr
	FflushProc        uintptr
	FhandlerProc      uintptr
	FwideSeekProc     uintptr
	FthreadActionProc uintptr
	FtruncateProc     uintptr
} /* tcl.h:1539:9 */

// struct Tcl_ChannelType:
//
// One such structure exists for each type (kind) of channel. It collects
// together in one place all the functions that are part of the specific
// channel type.
//
// It is recommend that the Tcl_Channel* functions are used to access elements
// of this structure, instead of direct accessing.

type Tcl_ChannelType = Tcl_ChannelType1 /* tcl.h:1607:3 */

// The following flags determine whether the blockModeProc above should set
// the channel into blocking or nonblocking mode. They are passed as arguments
// to the blockModeProc function in the above structure.

//----------------------------------------------------------------------------
// Enum for different types of file paths.

type Tcl_PathType = uint32 /* tcl.h:1628:3 */

// The following structure is used to pass glob type data amongst the various
// glob routines and Tcl_FSMatchInDirectory.

type Tcl_GlobTypeData1 = struct {
	Ftype       int32
	Fperm       int32
	FmacType    uintptr
	FmacCreator uintptr
} /* tcl.h:1635:9 */

// The following structure is used to pass glob type data amongst the various
// glob routines and Tcl_FSMatchInDirectory.

type Tcl_GlobTypeData = Tcl_GlobTypeData1 /* tcl.h:1640:3 */

type Tcl_FSVersion = uintptr /* tcl.h:1715:31 */

//----------------------------------------------------------------------------
// Data structures related to hooking into the filesystem

// Filesystem version tag.  This was introduced in 8.4.

// struct Tcl_Filesystem:
//
// One such structure exists for each type (kind) of filesystem. It collects
// together the functions that form the interface for a particulr the
// filesystem. Tcl always accesses the filesystem through one of these
// structures.
//
// Not all entries need be non-NULL; any which are NULL are simply ignored.
// However, a complete filesystem should provide all of these functions. The
// explanations in the structure show the importance of each function.

type Tcl_Filesystem1 = struct {
	FtypeName                 uintptr
	FstructureLength          int32
	F__ccgo_pad1              [4]byte
	Fversion                  Tcl_FSVersion
	FpathInFilesystemProc     uintptr
	FdupInternalRepProc       uintptr
	FfreeInternalRepProc      uintptr
	FinternalToNormalizedProc uintptr
	FcreateInternalRepProc    uintptr
	FnormalizePathProc        uintptr
	FfilesystemPathTypeProc   uintptr
	FfilesystemSeparatorProc  uintptr
	FstatProc                 uintptr
	FaccessProc               uintptr
	FopenFileChannelProc      uintptr
	FmatchInDirectoryProc     uintptr
	FutimeProc                uintptr
	FlinkProc                 uintptr
	FlistVolumesProc          uintptr
	FfileAttrStringsProc      uintptr
	FfileAttrsGetProc         uintptr
	FfileAttrsSetProc         uintptr
	FcreateDirectoryProc      uintptr
	FremoveDirectoryProc      uintptr
	FdeleteFileProc           uintptr
	FcopyFileProc             uintptr
	FrenameFileProc           uintptr
	FcopyDirectoryProc        uintptr
	FlstatProc                uintptr
	FloadFileProc             uintptr
	FgetCwdProc               uintptr
	FchdirProc                uintptr
} /* tcl.h:1741:9 */

//----------------------------------------------------------------------------
// Data structures related to hooking into the filesystem

// Filesystem version tag.  This was introduced in 8.4.

// struct Tcl_Filesystem:
//
// One such structure exists for each type (kind) of filesystem. It collects
// together the functions that form the interface for a particulr the
// filesystem. Tcl always accesses the filesystem through one of these
// structures.
//
// Not all entries need be non-NULL; any which are NULL are simply ignored.
// However, a complete filesystem should provide all of these functions. The
// explanations in the structure show the importance of each function.

type Tcl_Filesystem = Tcl_Filesystem1 /* tcl.h:1860:3 */

// The following definitions are used as values for the 'linkAction' flag to
// Tcl_FSLink, or the linkProc of any filesystem. Any combination of flags can
// be given. For link creation, the linkProc should create a link which
// matches any of the types given.
//
// TCL_CREATE_SYMBOLIC_LINK -	Create a symbolic or soft link.
// TCL_CREATE_HARD_LINK -	Create a hard link.

//----------------------------------------------------------------------------
// The following structure represents the Notifier functions that you can
// override with the Tcl_SetNotifier call.

type Tcl_NotifierProcs1 = struct {
	FsetTimerProc          uintptr
	FwaitForEventProc      uintptr
	FcreateFileHandlerProc uintptr
	FdeleteFileHandlerProc uintptr
	FinitNotifierProc      uintptr
	FfinalizeNotifierProc  uintptr
	FalertNotifierProc     uintptr
	FserviceModeHookProc   uintptr
} /* tcl.h:1881:9 */

// The following definitions are used as values for the 'linkAction' flag to
// Tcl_FSLink, or the linkProc of any filesystem. Any combination of flags can
// be given. For link creation, the linkProc should create a link which
// matches any of the types given.
//
// TCL_CREATE_SYMBOLIC_LINK -	Create a symbolic or soft link.
// TCL_CREATE_HARD_LINK -	Create a hard link.

//----------------------------------------------------------------------------
// The following structure represents the Notifier functions that you can
// override with the Tcl_SetNotifier call.

type Tcl_NotifierProcs = Tcl_NotifierProcs1 /* tcl.h:1890:3 */

//----------------------------------------------------------------------------
// The following data structures and declarations are for the new Tcl parser.
//
// For each word of a command, and for each piece of a word such as a variable
// reference, one of the following structures is created to describe the
// token.

type Tcl_Token1 = struct {
	Ftype          int32
	F__ccgo_pad1   [4]byte
	Fstart         uintptr
	Fsize          int32
	FnumComponents int32
} /* tcl.h:1901:9 */

//----------------------------------------------------------------------------
// The following data structures and declarations are for the new Tcl parser.
//
// For each word of a command, and for each piece of a word such as a variable
// reference, one of the following structures is created to describe the
// token.

type Tcl_Token = Tcl_Token1 /* tcl.h:1911:3 */

// Type values defined for Tcl_Token structures. These values are defined as
// mask bits so that it's easy to check for collections of types.
//
// TCL_TOKEN_WORD -		The token describes one word of a command,
//				from the first non-blank character of the word
//				(which may be " or {) up to but not including
//				the space, semicolon, or bracket that
//				terminates the word. NumComponents counts the
//				total number of sub-tokens that make up the
//				word. This includes, for example, sub-tokens
//				of TCL_TOKEN_VARIABLE tokens.
// TCL_TOKEN_SIMPLE_WORD -	This token is just like TCL_TOKEN_WORD except
//				that the word is guaranteed to consist of a
//				single TCL_TOKEN_TEXT sub-token.
// TCL_TOKEN_TEXT -		The token describes a range of literal text
//				that is part of a word. NumComponents is
//				always 0.
// TCL_TOKEN_BS -		The token describes a backslash sequence that
//				must be collapsed. NumComponents is always 0.
// TCL_TOKEN_COMMAND -		The token describes a command whose result
//				must be substituted into the word. The token
//				includes the enclosing brackets. NumComponents
//				is always 0.
// TCL_TOKEN_VARIABLE -		The token describes a variable substitution,
//				including the dollar sign, variable name, and
//				array index (if there is one) up through the
//				right parentheses. NumComponents tells how
//				many additional tokens follow to represent the
//				variable name. The first token will be a
//				TCL_TOKEN_TEXT token that describes the
//				variable name. If the variable is an array
//				reference then there will be one or more
//				additional tokens, of type TCL_TOKEN_TEXT,
//				TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and
//				TCL_TOKEN_VARIABLE, that describe the array
//				index; numComponents counts the total number
//				of nested tokens that make up the variable
//				reference, including sub-tokens of
//				TCL_TOKEN_VARIABLE tokens.
// TCL_TOKEN_SUB_EXPR -		The token describes one subexpression of an
//				expression, from the first non-blank character
//				of the subexpression up to but not including
//				the space, brace, or bracket that terminates
//				the subexpression. NumComponents counts the
//				total number of following subtokens that make
//				up the subexpression; this includes all
//				subtokens for any nested TCL_TOKEN_SUB_EXPR
//				tokens. For example, a numeric value used as a
//				primitive operand is described by a
//				TCL_TOKEN_SUB_EXPR token followed by a
//				TCL_TOKEN_TEXT token. A binary subexpression
//				is described by a TCL_TOKEN_SUB_EXPR token
//				followed by the TCL_TOKEN_OPERATOR token for
//				the operator, then TCL_TOKEN_SUB_EXPR tokens
//				for the left then the right operands.
// TCL_TOKEN_OPERATOR -		The token describes one expression operator.
//				An operator might be the name of a math
//				function such as "abs". A TCL_TOKEN_OPERATOR
//				token is always preceded by one
//				TCL_TOKEN_SUB_EXPR token for the operator's
//				subexpression, and is followed by zero or more
//				TCL_TOKEN_SUB_EXPR tokens for the operator's
//				operands. NumComponents is always 0.
// TCL_TOKEN_EXPAND_WORD -	This token is just like TCL_TOKEN_WORD except
//				that it marks a word that began with the
//				literal character prefix "{*}". This word is
//				marked to be expanded - that is, broken into
//				words after substitution is complete.

// Parsing error types. On any parsing error, one of these values will be
// stored in the error field of the Tcl_Parse structure defined below.

// A structure of the following type is filled in by Tcl_ParseCommand. It
// describes a single command parsed from an input string.

type Tcl_Parse1 = struct {
	FcommentStart    uintptr
	FcommentSize     int32
	F__ccgo_pad1     [4]byte
	FcommandStart    uintptr
	FcommandSize     int32
	FnumWords        int32
	FtokenPtr        uintptr
	FnumTokens       int32
	FtokensAvailable int32
	FerrorType       int32
	F__ccgo_pad2     [4]byte
	Fstring          uintptr
	Fend             uintptr
	Finterp          uintptr
	Fterm            uintptr
	Fincomplete      int32
	F__ccgo_pad3     [4]byte
	FstaticTokens    [20]Tcl_Token
} /* tcl.h:2017:9 */

// Type values defined for Tcl_Token structures. These values are defined as
// mask bits so that it's easy to check for collections of types.
//
// TCL_TOKEN_WORD -		The token describes one word of a command,
//				from the first non-blank character of the word
//				(which may be " or {) up to but not including
//				the space, semicolon, or bracket that
//				terminates the word. NumComponents counts the
//				total number of sub-tokens that make up the
//				word. This includes, for example, sub-tokens
//				of TCL_TOKEN_VARIABLE tokens.
// TCL_TOKEN_SIMPLE_WORD -	This token is just like TCL_TOKEN_WORD except
//				that the word is guaranteed to consist of a
//				single TCL_TOKEN_TEXT sub-token.
// TCL_TOKEN_TEXT -		The token describes a range of literal text
//				that is part of a word. NumComponents is
//				always 0.
// TCL_TOKEN_BS -		The token describes a backslash sequence that
//				must be collapsed. NumComponents is always 0.
// TCL_TOKEN_COMMAND -		The token describes a command whose result
//				must be substituted into the word. The token
//				includes the enclosing brackets. NumComponents
//				is always 0.
// TCL_TOKEN_VARIABLE -		The token describes a variable substitution,
//				including the dollar sign, variable name, and
//				array index (if there is one) up through the
//				right parentheses. NumComponents tells how
//				many additional tokens follow to represent the
//				variable name. The first token will be a
//				TCL_TOKEN_TEXT token that describes the
//				variable name. If the variable is an array
//				reference then there will be one or more
//				additional tokens, of type TCL_TOKEN_TEXT,
//				TCL_TOKEN_BS, TCL_TOKEN_COMMAND, and
//				TCL_TOKEN_VARIABLE, that describe the array
//				index; numComponents counts the total number
//				of nested tokens that make up the variable
//				reference, including sub-tokens of
//				TCL_TOKEN_VARIABLE tokens.
// TCL_TOKEN_SUB_EXPR -		The token describes one subexpression of an
//				expression, from the first non-blank character
//				of the subexpression up to but not including
//				the space, brace, or bracket that terminates
//				the subexpression. NumComponents counts the
//				total number of following subtokens that make
//				up the subexpression; this includes all
//				subtokens for any nested TCL_TOKEN_SUB_EXPR
//				tokens. For example, a numeric value used as a
//				primitive operand is described by a
//				TCL_TOKEN_SUB_EXPR token followed by a
//				TCL_TOKEN_TEXT token. A binary subexpression
//				is described by a TCL_TOKEN_SUB_EXPR token
//				followed by the TCL_TOKEN_OPERATOR token for
//				the operator, then TCL_TOKEN_SUB_EXPR tokens
//				for the left then the right operands.
// TCL_TOKEN_OPERATOR -		The token describes one expression operator.
//				An operator might be the name of a math
//				function such as "abs". A TCL_TOKEN_OPERATOR
//				token is always preceded by one
//				TCL_TOKEN_SUB_EXPR token for the operator's
//				subexpression, and is followed by zero or more
//				TCL_TOKEN_SUB_EXPR tokens for the operator's
//				operands. NumComponents is always 0.
// TCL_TOKEN_EXPAND_WORD -	This token is just like TCL_TOKEN_WORD except
//				that it marks a word that began with the
//				literal character prefix "{*}". This word is
//				marked to be expanded - that is, broken into
//				words after substitution is complete.

// Parsing error types. On any parsing error, one of these values will be
// stored in the error field of the Tcl_Parse structure defined below.

// A structure of the following type is filled in by Tcl_ParseCommand. It
// describes a single command parsed from an input string.

type Tcl_Parse = Tcl_Parse1 /* tcl.h:2070:3 */

//----------------------------------------------------------------------------
// The following structure represents a user-defined encoding. It collects
// together all the functions that are used by the specific encoding.

type Tcl_EncodingType1 = struct {
	FencodingName uintptr
	FtoUtfProc    uintptr
	FfromUtfProc  uintptr
	FfreeProc     uintptr
	FclientData   ClientData
	FnullSize     int32
	F__ccgo_pad1  [4]byte
} /* tcl.h:2078:9 */

//----------------------------------------------------------------------------
// The following structure represents a user-defined encoding. It collects
// together all the functions that are used by the specific encoding.

type Tcl_EncodingType = Tcl_EncodingType1 /* tcl.h:2098:3 */

// The following definitions are used as values for the conversion control
// flags argument when converting text from one character set to another:
//
// TCL_ENCODING_START -		Signifies that the source buffer is the first
//				block in a (potentially multi-block) input
//				stream. Tells the conversion function to reset
//				to an initial state and perform any
//				initialization that needs to occur before the
//				first byte is converted. If the source buffer
//				contains the entire input stream to be
//				converted, this flag should be set.
// TCL_ENCODING_END -		Signifies that the source buffer is the last
//				block in a (potentially multi-block) input
//				stream. Tells the conversion routine to
//				perform any finalization that needs to occur
//				after the last byte is converted and then to
//				reset to an initial state. If the source
//				buffer contains the entire input stream to be
//				converted, this flag should be set.
// TCL_ENCODING_STOPONERROR -	If set, the converter returns immediately upon
//				encountering an invalid byte sequence or a
//				source character that has no mapping in the
//				target encoding. If clear, the converter
//				substitues the problematic character(s) with
//				one or more "close" characters in the
//				destination buffer and then continues to
//				convert the source.
// TCL_ENCODING_NO_TERMINATE - 	If set, Tcl_ExternalToUtf does not append a
//				terminating NUL byte.  Since it does not need
//				an extra byte for a terminating NUL, it fills
//				all dstLen bytes with encoded UTF-8 content if
//				needed.  If clear, a byte is reserved in the
//				dst space for NUL termination, and a
//				terminating NUL is appended.
// TCL_ENCODING_CHAR_LIMIT -	If set and dstCharsPtr is not NULL, then
//				Tcl_ExternalToUtf takes the initial value of
//				*dstCharsPtr as a limit of the maximum number
//				of chars to produce in the encoded UTF-8
//				content.  Otherwise, the number of chars
//				produced is controlled only by other limiting
//				factors.

// The following definitions are the error codes returned by the conversion
// routines:
//
// TCL_OK -			All characters were converted.
// TCL_CONVERT_NOSPACE -	The output buffer would not have been large
//				enough for all of the converted data; as many
//				characters as could fit were converted though.
// TCL_CONVERT_MULTIBYTE -	The last few bytes in the source string were
//				the beginning of a multibyte sequence, but
//				more bytes were needed to complete this
//				sequence. A subsequent call to the conversion
//				routine should pass the beginning of this
//				unconverted sequence plus additional bytes
//				from the source stream to properly convert the
//				formerly split-up multibyte sequence.
// TCL_CONVERT_SYNTAX -		The source stream contained an invalid
//				character sequence. This may occur if the
//				input stream has been damaged or if the input
//				encoding method was misidentified. This error
//				is reported only if TCL_ENCODING_STOPONERROR
//				was specified.
// TCL_CONVERT_UNKNOWN -	The source string contained a character that
//				could not be represented in the target
//				encoding. This error is reported only if
//				TCL_ENCODING_STOPONERROR was specified.

// The maximum number of bytes that are necessary to represent a single
// Unicode character in UTF-8. The valid values should be 3, 4 or 6
// (or perhaps 1 if we want to support a non-unicode enabled core). If 3 or
// 4, then Tcl_UniChar must be 2-bytes in size (UCS-2) (the default). If 6,
// then Tcl_UniChar must be 4-bytes in size (UCS-4). At this time UCS-2 mode
// is the default and recommended mode. UCS-4 is experimental and not
// recommended. It works for the core, but most extensions expect UCS-2.

// This represents a Unicode character. Any changes to this should also be
// reflected in regcustom.h.

type Tcl_UniChar = uint16 /* tcl.h:2212:24 */

//----------------------------------------------------------------------------
// TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to
// provide the system with the embedded configuration data.

type Tcl_Config1 = struct {
	Fkey   uintptr
	Fvalue uintptr
} /* tcl.h:2221:9 */

//----------------------------------------------------------------------------
// TIP #59: The following structure is used in calls 'Tcl_RegisterConfig' to
// provide the system with the embedded configuration data.

type Tcl_Config = Tcl_Config1 /* tcl.h:2226:3 */

//----------------------------------------------------------------------------
// Override definitions for libtommath.

type Mp_int1 = struct {
	Fused        int32
	Falloc       int32
	Fsign        Mp_sign
	F__ccgo_pad1 [4]byte
	Fdp          uintptr
} /* tcl.h:2250:9 */

//----------------------------------------------------------------------------
// Override definitions for libtommath.

type Mp_int = Mp_int1  /* tcl.h:2250:23 */
type Mp_digit = uint32 /* tcl.h:2252:22 */

//----------------------------------------------------------------------------
// Definitions needed for Tcl_ParseArgvObj routines.
// Based on tkArgv.c.
// Modifications from the original are copyright (c) Sam Bromley 2006

type Tcl_ArgvInfo = struct {
	Ftype        int32
	F__ccgo_pad1 [4]byte
	FkeyStr      uintptr
	FsrcPtr      uintptr
	FdstPtr      uintptr
	FhelpStr     uintptr
	FclientData  ClientData
} /* tcl.h:2273:3 */

type TclPlatStubs1 = struct {
	Fmagic             int32
	F__ccgo_pad1       [4]byte
	Fhooks             uintptr
	Ftcl_WinUtfToTChar uintptr
	Ftcl_WinTCharToUtf uintptr
} /* tclDecls.h:1851:11 */

type TclIntStubs1 = struct {
	Fmagic                        int32
	F__ccgo_pad1                  [4]byte
	Fhooks                        uintptr
	Freserved0                    uintptr
	Freserved1                    uintptr
	Freserved2                    uintptr
	FtclAllocateFreeObjects       uintptr
	Freserved4                    uintptr
	FtclCleanupChildren           uintptr
	FtclCleanupCommand            uintptr
	FtclCopyAndCollapse           uintptr
	FtclCopyChannelOld            uintptr
	FtclCreatePipeline            uintptr
	FtclCreateProc                uintptr
	FtclDeleteCompiledLocalVars   uintptr
	FtclDeleteVars                uintptr
	Freserved13                   uintptr
	FtclDumpMemoryInfo            uintptr
	Freserved15                   uintptr
	FtclExprFloatError            uintptr
	Freserved17                   uintptr
	Freserved18                   uintptr
	Freserved19                   uintptr
	Freserved20                   uintptr
	Freserved21                   uintptr
	FtclFindElement               uintptr
	FtclFindProc                  uintptr
	FtclFormatInt                 uintptr
	FtclFreePackageInfo           uintptr
	Freserved26                   uintptr
	Freserved27                   uintptr
	FtclpGetDefaultStdChannel     uintptr
	Freserved29                   uintptr
	Freserved30                   uintptr
	FtclGetExtension              uintptr
	FtclGetFrame                  uintptr
	Freserved33                   uintptr
	FtclGetIntForIndex            uintptr
	Freserved35                   uintptr
	Freserved36                   uintptr
	FtclGetLoadedPackages         uintptr
	FtclGetNamespaceForQualName   uintptr
	FtclGetObjInterpProc          uintptr
	FtclGetOpenMode               uintptr
	FtclGetOriginalCommand        uintptr
	FtclpGetUserHome              uintptr
	Freserved43                   uintptr
	FtclGuessPackageName          uintptr
	FtclHideUnsafeCommands        uintptr
	FtclInExit                    uintptr
	Freserved47                   uintptr
	Freserved48                   uintptr
	Freserved49                   uintptr
	FtclInitCompiledLocals        uintptr
	FtclInterpInit                uintptr
	Freserved52                   uintptr
	FtclInvokeObjectCommand       uintptr
	FtclInvokeStringCommand       uintptr
	FtclIsProc                    uintptr
	Freserved56                   uintptr
	Freserved57                   uintptr
	FtclLookupVar                 uintptr
	Freserved59                   uintptr
	FtclNeedSpace                 uintptr
	FtclNewProcBodyObj            uintptr
	FtclObjCommandComplete        uintptr
	FtclObjInterpProc             uintptr
	FtclObjInvoke                 uintptr
	Freserved65                   uintptr
	Freserved66                   uintptr
	Freserved67                   uintptr
	Freserved68                   uintptr
	FtclpAlloc                    uintptr
	Freserved70                   uintptr
	Freserved71                   uintptr
	Freserved72                   uintptr
	Freserved73                   uintptr
	FtclpFree                     uintptr
	FtclpGetClicks                uintptr
	FtclpGetSeconds               uintptr
	FtclpGetTime                  uintptr
	Freserved78                   uintptr
	Freserved79                   uintptr
	Freserved80                   uintptr
	FtclpRealloc                  uintptr
	Freserved82                   uintptr
	Freserved83                   uintptr
	Freserved84                   uintptr
	Freserved85                   uintptr
	Freserved86                   uintptr
	Freserved87                   uintptr
	FtclPrecTraceProc             uintptr
	FtclPreventAliasLoop          uintptr
	Freserved90                   uintptr
	FtclProcCleanupProc           uintptr
	FtclProcCompileProc           uintptr
	FtclProcDeleteProc            uintptr
	Freserved94                   uintptr
	Freserved95                   uintptr
	FtclRenameCommand             uintptr
	FtclResetShadowedCmdRefs      uintptr
	FtclServiceIdle               uintptr
	Freserved99                   uintptr
	Freserved100                  uintptr
	FtclSetPreInitScript          uintptr
	FtclSetupEnv                  uintptr
	FtclSockGetPort               uintptr
	FtclSockMinimumBuffersOld     uintptr
	Freserved105                  uintptr
	Freserved106                  uintptr
	Freserved107                  uintptr
	FtclTeardownNamespace         uintptr
	FtclUpdateReturnInfo          uintptr
	FtclSockMinimumBuffers        uintptr
	Ftcl_AddInterpResolvers       uintptr
	Ftcl_AppendExportList         uintptr
	Ftcl_CreateNamespace          uintptr
	Ftcl_DeleteNamespace          uintptr
	Ftcl_Export                   uintptr
	Ftcl_FindCommand              uintptr
	Ftcl_FindNamespace            uintptr
	Ftcl_GetInterpResolvers       uintptr
	Ftcl_GetNamespaceResolvers    uintptr
	Ftcl_FindNamespaceVar         uintptr
	Ftcl_ForgetImport             uintptr
	Ftcl_GetCommandFromObj        uintptr
	Ftcl_GetCommandFullName       uintptr
	Ftcl_GetCurrentNamespace      uintptr
	Ftcl_GetGlobalNamespace       uintptr
	Ftcl_GetVariableFullName      uintptr
	Ftcl_Import                   uintptr
	Ftcl_PopCallFrame             uintptr
	Ftcl_PushCallFrame            uintptr
	Ftcl_RemoveInterpResolvers    uintptr
	Ftcl_SetNamespaceResolvers    uintptr
	FtclpHasSockets               uintptr
	FtclpGetDate                  uintptr
	Freserved134                  uintptr
	Freserved135                  uintptr
	Freserved136                  uintptr
	Freserved137                  uintptr
	FtclGetEnv                    uintptr
	Freserved139                  uintptr
	Freserved140                  uintptr
	FtclpGetCwd                   uintptr
	FtclSetByteCodeFromAny        uintptr
	FtclAddLiteralObj             uintptr
	FtclHideLiteral               uintptr
	FtclGetAuxDataType            uintptr
	FtclHandleCreate              uintptr
	FtclHandleFree                uintptr
	FtclHandlePreserve            uintptr
	FtclHandleRelease             uintptr
	FtclRegAbout                  uintptr
	FtclRegExpRangeUniChar        uintptr
	FtclSetLibraryPath            uintptr
	FtclGetLibraryPath            uintptr
	Freserved154                  uintptr
	Freserved155                  uintptr
	FtclRegError                  uintptr
	FtclVarTraceExists            uintptr
	FtclSetStartupScriptFileName  uintptr
	FtclGetStartupScriptFileName  uintptr
	Freserved160                  uintptr
	FtclChannelTransform          uintptr
	FtclChannelEventScriptInvoker uintptr
	FtclGetInstructionTable       uintptr
	FtclExpandCodeArray           uintptr
	FtclpSetInitialEncodings      uintptr
	FtclListObjSetElement         uintptr
	FtclSetStartupScriptPath      uintptr
	FtclGetStartupScriptPath      uintptr
	FtclpUtfNcmp2                 uintptr
	FtclCheckInterpTraces         uintptr
	FtclCheckExecutionTraces      uintptr
	FtclInThreadExit              uintptr
	FtclUniCharMatch              uintptr
	Freserved174                  uintptr
	FtclCallVarTraces             uintptr
	FtclCleanupVar                uintptr
	FtclVarErrMsg                 uintptr
	Ftcl_SetStartupScript         uintptr
	Ftcl_GetStartupScript         uintptr
	Freserved180                  uintptr
	Freserved181                  uintptr
	FtclpLocaltime                uintptr
	FtclpGmtime                   uintptr
	Freserved184                  uintptr
	Freserved185                  uintptr
	Freserved186                  uintptr
	Freserved187                  uintptr
	Freserved188                  uintptr
	Freserved189                  uintptr
	Freserved190                  uintptr
	Freserved191                  uintptr
	Freserved192                  uintptr
	Freserved193                  uintptr
	Freserved194                  uintptr
	Freserved195                  uintptr
	Freserved196                  uintptr
	Freserved197                  uintptr
	FtclObjGetFrame               uintptr
	Freserved199                  uintptr
	FtclpObjRemoveDirectory       uintptr
	FtclpObjCopyDirectory         uintptr
	FtclpObjCreateDirectory       uintptr
	FtclpObjDeleteFile            uintptr
	FtclpObjCopyFile              uintptr
	FtclpObjRenameFile            uintptr
	FtclpObjStat                  uintptr
	FtclpObjAccess                uintptr
	FtclpOpenFileChannel          uintptr
	Freserved209                  uintptr
	Freserved210                  uintptr
	Freserved211                  uintptr
	FtclpFindExecutable           uintptr
	FtclGetObjNameOfExecutable    uintptr
	FtclSetObjNameOfExecutable    uintptr
	FtclStackAlloc                uintptr
	FtclStackFree                 uintptr
	FtclPushStackFrame            uintptr
	FtclPopStackFrame             uintptr
	Freserved219                  uintptr
	Freserved220                  uintptr
	Freserved221                  uintptr
	Freserved222                  uintptr
	Freserved223                  uintptr
	FtclGetPlatform               uintptr
	FtclTraceDictPath             uintptr
	FtclObjBeingDeleted           uintptr
	FtclSetNsPath                 uintptr
	Freserved228                  uintptr
	FtclPtrMakeUpvar              uintptr
	FtclObjLookupVar              uintptr
	FtclGetNamespaceFromObj       uintptr
	FtclEvalObjEx                 uintptr
	FtclGetSrcInfoForPc           uintptr
	FtclVarHashCreateVar          uintptr
	FtclInitVarHashTable          uintptr
	FtclBackgroundException       uintptr
	FtclResetCancellation         uintptr
	FtclNRInterpProc              uintptr
	FtclNRInterpProcCore          uintptr
	FtclNRRunCallbacks            uintptr
	FtclNREvalObjEx               uintptr
	FtclNREvalObjv                uintptr
	FtclDbDumpActiveObjects       uintptr
	FtclGetNamespaceChildTable    uintptr
	FtclGetNamespaceCommandTable  uintptr
	FtclInitRewriteEnsemble       uintptr
	FtclResetRewriteEnsemble      uintptr
	FtclCopyChannel               uintptr
	FtclDoubleDigits              uintptr
	FtclSetSlaveCancelFlags       uintptr
	FtclRegisterLiteral           uintptr
	FtclPtrGetVar                 uintptr
	FtclPtrSetVar                 uintptr
	FtclPtrIncrObjVar             uintptr
	FtclPtrObjMakeUpvar           uintptr
	FtclPtrUnsetVar               uintptr
	FtclStaticPackage             uintptr
	Freserved258                  uintptr
	Freserved259                  uintptr
	FtclUnusedStubEntry           uintptr
} /* tclDecls.h:1852:11 */

type TclIntPlatStubs1 = struct {
	Fmagic                    int32
	F__ccgo_pad1              [4]byte
	Fhooks                    uintptr
	FtclWinConvertError       uintptr
	FtclWinConvertWSAError    uintptr
	FtclWinGetServByName      uintptr
	FtclWinGetSockOpt         uintptr
	FtclWinGetTclInstance     uintptr
	FtclUnixWaitForFile       uintptr
	FtclWinNToHS              uintptr
	FtclWinSetSockOpt         uintptr
	FtclpGetPid               uintptr
	FtclWinGetPlatformId      uintptr
	FtclpReaddir              uintptr
	FtclGetAndDetachPids      uintptr
	FtclpCloseFile            uintptr
	FtclpCreateCommandChannel uintptr
	FtclpCreatePipe           uintptr
	FtclpCreateProcess        uintptr
	FtclpIsAtty               uintptr
	FtclUnixCopyFile          uintptr
	FtclpMakeFile             uintptr
	FtclpOpenFile             uintptr
	FtclWinAddProcess         uintptr
	FtclpInetNtoa             uintptr
	FtclpCreateTempFile       uintptr
	Freserved23               uintptr
	FtclWinNoBackslash        uintptr
	Freserved25               uintptr
	FtclWinSetInterfaces      uintptr
	FtclWinFlushDirtyChannels uintptr
	FtclWinResetInterfaces    uintptr
	FtclWinCPUID              uintptr
	FtclUnixOpenTemporaryFile uintptr
} /* tclDecls.h:1853:11 */

type TclStubHooks = struct {
	FtclPlatStubs    uintptr
	FtclIntStubs     uintptr
	FtclIntPlatStubs uintptr
} /* tclDecls.h:1854:3 */

type TclStubs1 = struct {
	Fmagic                                  int32
	F__ccgo_pad1                            [4]byte
	Fhooks                                  uintptr
	Ftcl_PkgProvideEx                       uintptr
	Ftcl_PkgRequireEx                       uintptr
	Ftcl_Panic                              uintptr
	Ftcl_Alloc                              uintptr
	Ftcl_Free                               uintptr
	Ftcl_Realloc                            uintptr
	Ftcl_DbCkalloc                          uintptr
	Ftcl_DbCkfree                           uintptr
	Ftcl_DbCkrealloc                        uintptr
	Freserved9                              uintptr
	Freserved10                             uintptr
	Ftcl_SetTimer                           uintptr
	Ftcl_Sleep                              uintptr
	Ftcl_WaitForEvent                       uintptr
	Ftcl_AppendAllObjTypes                  uintptr
	Ftcl_AppendStringsToObj                 uintptr
	Ftcl_AppendToObj                        uintptr
	Ftcl_ConcatObj                          uintptr
	Ftcl_ConvertToType                      uintptr
	Ftcl_DbDecrRefCount                     uintptr
	Ftcl_DbIncrRefCount                     uintptr
	Ftcl_DbIsShared                         uintptr
	Ftcl_DbNewBooleanObj                    uintptr
	Ftcl_DbNewByteArrayObj                  uintptr
	Ftcl_DbNewDoubleObj                     uintptr
	Ftcl_DbNewListObj                       uintptr
	Ftcl_DbNewLongObj                       uintptr
	Ftcl_DbNewObj                           uintptr
	Ftcl_DbNewStringObj                     uintptr
	Ftcl_DuplicateObj                       uintptr
	FtclFreeObj                             uintptr
	Ftcl_GetBoolean                         uintptr
	Ftcl_GetBooleanFromObj                  uintptr
	Ftcl_GetByteArrayFromObj                uintptr
	Ftcl_GetDouble                          uintptr
	Ftcl_GetDoubleFromObj                   uintptr
	Ftcl_GetIndexFromObj                    uintptr
	Ftcl_GetInt                             uintptr
	Ftcl_GetIntFromObj                      uintptr
	Ftcl_GetLongFromObj                     uintptr
	Ftcl_GetObjType                         uintptr
	Ftcl_GetStringFromObj                   uintptr
	Ftcl_InvalidateStringRep                uintptr
	Ftcl_ListObjAppendList                  uintptr
	Ftcl_ListObjAppendElement               uintptr
	Ftcl_ListObjGetElements                 uintptr
	Ftcl_ListObjIndex                       uintptr
	Ftcl_ListObjLength                      uintptr
	Ftcl_ListObjReplace                     uintptr
	Ftcl_NewBooleanObj                      uintptr
	Ftcl_NewByteArrayObj                    uintptr
	Ftcl_NewDoubleObj                       uintptr
	Ftcl_NewIntObj                          uintptr
	Ftcl_NewListObj                         uintptr
	Ftcl_NewLongObj                         uintptr
	Ftcl_NewObj                             uintptr
	Ftcl_NewStringObj                       uintptr
	Ftcl_SetBooleanObj                      uintptr
	Ftcl_SetByteArrayLength                 uintptr
	Ftcl_SetByteArrayObj                    uintptr
	Ftcl_SetDoubleObj                       uintptr
	Ftcl_SetIntObj                          uintptr
	Ftcl_SetListObj                         uintptr
	Ftcl_SetLongObj                         uintptr
	Ftcl_SetObjLength                       uintptr
	Ftcl_SetStringObj                       uintptr
	Ftcl_AddErrorInfo                       uintptr
	Ftcl_AddObjErrorInfo                    uintptr
	Ftcl_AllowExceptions                    uintptr
	Ftcl_AppendElement                      uintptr
	Ftcl_AppendResult                       uintptr
	Ftcl_AsyncCreate                        uintptr
	Ftcl_AsyncDelete                        uintptr
	Ftcl_AsyncInvoke                        uintptr
	Ftcl_AsyncMark                          uintptr
	Ftcl_AsyncReady                         uintptr
	Ftcl_BackgroundError                    uintptr
	Ftcl_Backslash                          uintptr
	Ftcl_BadChannelOption                   uintptr
	Ftcl_CallWhenDeleted                    uintptr
	Ftcl_CancelIdleCall                     uintptr
	Ftcl_Close                              uintptr
	Ftcl_CommandComplete                    uintptr
	Ftcl_Concat                             uintptr
	Ftcl_ConvertElement                     uintptr
	Ftcl_ConvertCountedElement              uintptr
	Ftcl_CreateAlias                        uintptr
	Ftcl_CreateAliasObj                     uintptr
	Ftcl_CreateChannel                      uintptr
	Ftcl_CreateChannelHandler               uintptr
	Ftcl_CreateCloseHandler                 uintptr
	Ftcl_CreateCommand                      uintptr
	Ftcl_CreateEventSource                  uintptr
	Ftcl_CreateExitHandler                  uintptr
	Ftcl_CreateInterp                       uintptr
	Ftcl_CreateMathFunc                     uintptr
	Ftcl_CreateObjCommand                   uintptr
	Ftcl_CreateSlave                        uintptr
	Ftcl_CreateTimerHandler                 uintptr
	Ftcl_CreateTrace                        uintptr
	Ftcl_DeleteAssocData                    uintptr
	Ftcl_DeleteChannelHandler               uintptr
	Ftcl_DeleteCloseHandler                 uintptr
	Ftcl_DeleteCommand                      uintptr
	Ftcl_DeleteCommandFromToken             uintptr
	Ftcl_DeleteEvents                       uintptr
	Ftcl_DeleteEventSource                  uintptr
	Ftcl_DeleteExitHandler                  uintptr
	Ftcl_DeleteHashEntry                    uintptr
	Ftcl_DeleteHashTable                    uintptr
	Ftcl_DeleteInterp                       uintptr
	Ftcl_DetachPids                         uintptr
	Ftcl_DeleteTimerHandler                 uintptr
	Ftcl_DeleteTrace                        uintptr
	Ftcl_DontCallWhenDeleted                uintptr
	Ftcl_DoOneEvent                         uintptr
	Ftcl_DoWhenIdle                         uintptr
	Ftcl_DStringAppend                      uintptr
	Ftcl_DStringAppendElement               uintptr
	Ftcl_DStringEndSublist                  uintptr
	Ftcl_DStringFree                        uintptr
	Ftcl_DStringGetResult                   uintptr
	Ftcl_DStringInit                        uintptr
	Ftcl_DStringResult                      uintptr
	Ftcl_DStringSetLength                   uintptr
	Ftcl_DStringStartSublist                uintptr
	Ftcl_Eof                                uintptr
	Ftcl_ErrnoId                            uintptr
	Ftcl_ErrnoMsg                           uintptr
	Ftcl_Eval                               uintptr
	Ftcl_EvalFile                           uintptr
	Ftcl_EvalObj                            uintptr
	Ftcl_EventuallyFree                     uintptr
	Ftcl_Exit                               uintptr
	Ftcl_ExposeCommand                      uintptr
	Ftcl_ExprBoolean                        uintptr
	Ftcl_ExprBooleanObj                     uintptr
	Ftcl_ExprDouble                         uintptr
	Ftcl_ExprDoubleObj                      uintptr
	Ftcl_ExprLong                           uintptr
	Ftcl_ExprLongObj                        uintptr
	Ftcl_ExprObj                            uintptr
	Ftcl_ExprString                         uintptr
	Ftcl_Finalize                           uintptr
	Ftcl_FindExecutable                     uintptr
	Ftcl_FirstHashEntry                     uintptr
	Ftcl_Flush                              uintptr
	Ftcl_FreeResult                         uintptr
	Ftcl_GetAlias                           uintptr
	Ftcl_GetAliasObj                        uintptr
	Ftcl_GetAssocData                       uintptr
	Ftcl_GetChannel                         uintptr
	Ftcl_GetChannelBufferSize               uintptr
	Ftcl_GetChannelHandle                   uintptr
	Ftcl_GetChannelInstanceData             uintptr
	Ftcl_GetChannelMode                     uintptr
	Ftcl_GetChannelName                     uintptr
	Ftcl_GetChannelOption                   uintptr
	Ftcl_GetChannelType                     uintptr
	Ftcl_GetCommandInfo                     uintptr
	Ftcl_GetCommandName                     uintptr
	Ftcl_GetErrno                           uintptr
	Ftcl_GetHostName                        uintptr
	Ftcl_GetInterpPath                      uintptr
	Ftcl_GetMaster                          uintptr
	Ftcl_GetNameOfExecutable                uintptr
	Ftcl_GetObjResult                       uintptr
	Freserved167                            uintptr
	Ftcl_GetPathType                        uintptr
	Ftcl_Gets                               uintptr
	Ftcl_GetsObj                            uintptr
	Ftcl_GetServiceMode                     uintptr
	Ftcl_GetSlave                           uintptr
	Ftcl_GetStdChannel                      uintptr
	Ftcl_GetStringResult                    uintptr
	Ftcl_GetVar                             uintptr
	Ftcl_GetVar2                            uintptr
	Ftcl_GlobalEval                         uintptr
	Ftcl_GlobalEvalObj                      uintptr
	Ftcl_HideCommand                        uintptr
	Ftcl_Init                               uintptr
	Ftcl_InitHashTable                      uintptr
	Ftcl_InputBlocked                       uintptr
	Ftcl_InputBuffered                      uintptr
	Ftcl_InterpDeleted                      uintptr
	Ftcl_IsSafe                             uintptr
	Ftcl_JoinPath                           uintptr
	Ftcl_LinkVar                            uintptr
	Freserved188                            uintptr
	Ftcl_MakeFileChannel                    uintptr
	Ftcl_MakeSafe                           uintptr
	Ftcl_MakeTcpClientChannel               uintptr
	Ftcl_Merge                              uintptr
	Ftcl_NextHashEntry                      uintptr
	Ftcl_NotifyChannel                      uintptr
	Ftcl_ObjGetVar2                         uintptr
	Ftcl_ObjSetVar2                         uintptr
	Ftcl_OpenCommandChannel                 uintptr
	Ftcl_OpenFileChannel                    uintptr
	Ftcl_OpenTcpClient                      uintptr
	Ftcl_OpenTcpServer                      uintptr
	Ftcl_Preserve                           uintptr
	Ftcl_PrintDouble                        uintptr
	Ftcl_PutEnv                             uintptr
	Ftcl_PosixError                         uintptr
	Ftcl_QueueEvent                         uintptr
	Ftcl_Read                               uintptr
	Ftcl_ReapDetachedProcs                  uintptr
	Ftcl_RecordAndEval                      uintptr
	Ftcl_RecordAndEvalObj                   uintptr
	Ftcl_RegisterChannel                    uintptr
	Ftcl_RegisterObjType                    uintptr
	Ftcl_RegExpCompile                      uintptr
	Ftcl_RegExpExec                         uintptr
	Ftcl_RegExpMatch                        uintptr
	Ftcl_RegExpRange                        uintptr
	Ftcl_Release                            uintptr
	Ftcl_ResetResult                        uintptr
	Ftcl_ScanElement                        uintptr
	Ftcl_ScanCountedElement                 uintptr
	Ftcl_SeekOld                            uintptr
	Ftcl_ServiceAll                         uintptr
	Ftcl_ServiceEvent                       uintptr
	Ftcl_SetAssocData                       uintptr
	Ftcl_SetChannelBufferSize               uintptr
	Ftcl_SetChannelOption                   uintptr
	Ftcl_SetCommandInfo                     uintptr
	Ftcl_SetErrno                           uintptr
	Ftcl_SetErrorCode                       uintptr
	Ftcl_SetMaxBlockTime                    uintptr
	Ftcl_SetPanicProc                       uintptr
	Ftcl_SetRecursionLimit                  uintptr
	Ftcl_SetResult                          uintptr
	Ftcl_SetServiceMode                     uintptr
	Ftcl_SetObjErrorCode                    uintptr
	Ftcl_SetObjResult                       uintptr
	Ftcl_SetStdChannel                      uintptr
	Ftcl_SetVar                             uintptr
	Ftcl_SetVar2                            uintptr
	Ftcl_SignalId                           uintptr
	Ftcl_SignalMsg                          uintptr
	Ftcl_SourceRCFile                       uintptr
	Ftcl_SplitList                          uintptr
	Ftcl_SplitPath                          uintptr
	Ftcl_StaticPackage                      uintptr
	Ftcl_StringMatch                        uintptr
	Ftcl_TellOld                            uintptr
	Ftcl_TraceVar                           uintptr
	Ftcl_TraceVar2                          uintptr
	Ftcl_TranslateFileName                  uintptr
	Ftcl_Ungets                             uintptr
	Ftcl_UnlinkVar                          uintptr
	Ftcl_UnregisterChannel                  uintptr
	Ftcl_UnsetVar                           uintptr
	Ftcl_UnsetVar2                          uintptr
	Ftcl_UntraceVar                         uintptr
	Ftcl_UntraceVar2                        uintptr
	Ftcl_UpdateLinkedVar                    uintptr
	Ftcl_UpVar                              uintptr
	Ftcl_UpVar2                             uintptr
	Ftcl_VarEval                            uintptr
	Ftcl_VarTraceInfo                       uintptr
	Ftcl_VarTraceInfo2                      uintptr
	Ftcl_Write                              uintptr
	Ftcl_WrongNumArgs                       uintptr
	Ftcl_DumpActiveMemory                   uintptr
	Ftcl_ValidateAllMemory                  uintptr
	Ftcl_AppendResultVA                     uintptr
	Ftcl_AppendStringsToObjVA               uintptr
	Ftcl_HashStats                          uintptr
	Ftcl_ParseVar                           uintptr
	Ftcl_PkgPresent                         uintptr
	Ftcl_PkgPresentEx                       uintptr
	Ftcl_PkgProvide                         uintptr
	Ftcl_PkgRequire                         uintptr
	Ftcl_SetErrorCodeVA                     uintptr
	Ftcl_VarEvalVA                          uintptr
	Ftcl_WaitPid                            uintptr
	Ftcl_PanicVA                            uintptr
	Ftcl_GetVersion                         uintptr
	Ftcl_InitMemory                         uintptr
	Ftcl_StackChannel                       uintptr
	Ftcl_UnstackChannel                     uintptr
	Ftcl_GetStackedChannel                  uintptr
	Ftcl_SetMainLoop                        uintptr
	Freserved285                            uintptr
	Ftcl_AppendObjToObj                     uintptr
	Ftcl_CreateEncoding                     uintptr
	Ftcl_CreateThreadExitHandler            uintptr
	Ftcl_DeleteThreadExitHandler            uintptr
	Ftcl_DiscardResult                      uintptr
	Ftcl_EvalEx                             uintptr
	Ftcl_EvalObjv                           uintptr
	Ftcl_EvalObjEx                          uintptr
	Ftcl_ExitThread                         uintptr
	Ftcl_ExternalToUtf                      uintptr
	Ftcl_ExternalToUtfDString               uintptr
	Ftcl_FinalizeThread                     uintptr
	Ftcl_FinalizeNotifier                   uintptr
	Ftcl_FreeEncoding                       uintptr
	Ftcl_GetCurrentThread                   uintptr
	Ftcl_GetEncoding                        uintptr
	Ftcl_GetEncodingName                    uintptr
	Ftcl_GetEncodingNames                   uintptr
	Ftcl_GetIndexFromObjStruct              uintptr
	Ftcl_GetThreadData                      uintptr
	Ftcl_GetVar2Ex                          uintptr
	Ftcl_InitNotifier                       uintptr
	Ftcl_MutexLock                          uintptr
	Ftcl_MutexUnlock                        uintptr
	Ftcl_ConditionNotify                    uintptr
	Ftcl_ConditionWait                      uintptr
	Ftcl_NumUtfChars                        uintptr
	Ftcl_ReadChars                          uintptr
	Ftcl_RestoreResult                      uintptr
	Ftcl_SaveResult                         uintptr
	Ftcl_SetSystemEncoding                  uintptr
	Ftcl_SetVar2Ex                          uintptr
	Ftcl_ThreadAlert                        uintptr
	Ftcl_ThreadQueueEvent                   uintptr
	Ftcl_UniCharAtIndex                     uintptr
	Ftcl_UniCharToLower                     uintptr
	Ftcl_UniCharToTitle                     uintptr
	Ftcl_UniCharToUpper                     uintptr
	Ftcl_UniCharToUtf                       uintptr
	Ftcl_UtfAtIndex                         uintptr
	Ftcl_UtfCharComplete                    uintptr
	Ftcl_UtfBackslash                       uintptr
	Ftcl_UtfFindFirst                       uintptr
	Ftcl_UtfFindLast                        uintptr
	Ftcl_UtfNext                            uintptr
	Ftcl_UtfPrev                            uintptr
	Ftcl_UtfToExternal                      uintptr
	Ftcl_UtfToExternalDString               uintptr
	Ftcl_UtfToLower                         uintptr
	Ftcl_UtfToTitle                         uintptr
	Ftcl_UtfToUniChar                       uintptr
	Ftcl_UtfToUpper                         uintptr
	Ftcl_WriteChars                         uintptr
	Ftcl_WriteObj                           uintptr
	Ftcl_GetString                          uintptr
	Ftcl_GetDefaultEncodingDir              uintptr
	Ftcl_SetDefaultEncodingDir              uintptr
	Ftcl_AlertNotifier                      uintptr
	Ftcl_ServiceModeHook                    uintptr
	Ftcl_UniCharIsAlnum                     uintptr
	Ftcl_UniCharIsAlpha                     uintptr
	Ftcl_UniCharIsDigit                     uintptr
	Ftcl_UniCharIsLower                     uintptr
	Ftcl_UniCharIsSpace                     uintptr
	Ftcl_UniCharIsUpper                     uintptr
	Ftcl_UniCharIsWordChar                  uintptr
	Ftcl_UniCharLen                         uintptr
	Ftcl_UniCharNcmp                        uintptr
	Ftcl_UniCharToUtfDString                uintptr
	Ftcl_UtfToUniCharDString                uintptr
	Ftcl_GetRegExpFromObj                   uintptr
	Ftcl_EvalTokens                         uintptr
	Ftcl_FreeParse                          uintptr
	Ftcl_LogCommandInfo                     uintptr
	Ftcl_ParseBraces                        uintptr
	Ftcl_ParseCommand                       uintptr
	Ftcl_ParseExpr                          uintptr
	Ftcl_ParseQuotedString                  uintptr
	Ftcl_ParseVarName                       uintptr
	Ftcl_GetCwd                             uintptr
	Ftcl_Chdir                              uintptr
	Ftcl_Access                             uintptr
	Ftcl_Stat                               uintptr
	Ftcl_UtfNcmp                            uintptr
	Ftcl_UtfNcasecmp                        uintptr
	Ftcl_StringCaseMatch                    uintptr
	Ftcl_UniCharIsControl                   uintptr
	Ftcl_UniCharIsGraph                     uintptr
	Ftcl_UniCharIsPrint                     uintptr
	Ftcl_UniCharIsPunct                     uintptr
	Ftcl_RegExpExecObj                      uintptr
	Ftcl_RegExpGetInfo                      uintptr
	Ftcl_NewUnicodeObj                      uintptr
	Ftcl_SetUnicodeObj                      uintptr
	Ftcl_GetCharLength                      uintptr
	Ftcl_GetUniChar                         uintptr
	Ftcl_GetUnicode                         uintptr
	Ftcl_GetRange                           uintptr
	Ftcl_AppendUnicodeToObj                 uintptr
	Ftcl_RegExpMatchObj                     uintptr
	Ftcl_SetNotifier                        uintptr
	Ftcl_GetAllocMutex                      uintptr
	Ftcl_GetChannelNames                    uintptr
	Ftcl_GetChannelNamesEx                  uintptr
	Ftcl_ProcObjCmd                         uintptr
	Ftcl_ConditionFinalize                  uintptr
	Ftcl_MutexFinalize                      uintptr
	Ftcl_CreateThread                       uintptr
	Ftcl_ReadRaw                            uintptr
	Ftcl_WriteRaw                           uintptr
	Ftcl_GetTopChannel                      uintptr
	Ftcl_ChannelBuffered                    uintptr
	Ftcl_ChannelName                        uintptr
	Ftcl_ChannelVersion                     uintptr
	Ftcl_ChannelBlockModeProc               uintptr
	Ftcl_ChannelCloseProc                   uintptr
	Ftcl_ChannelClose2Proc                  uintptr
	Ftcl_ChannelInputProc                   uintptr
	Ftcl_ChannelOutputProc                  uintptr
	Ftcl_ChannelSeekProc                    uintptr
	Ftcl_ChannelSetOptionProc               uintptr
	Ftcl_ChannelGetOptionProc               uintptr
	Ftcl_ChannelWatchProc                   uintptr
	Ftcl_ChannelGetHandleProc               uintptr
	Ftcl_ChannelFlushProc                   uintptr
	Ftcl_ChannelHandlerProc                 uintptr
	Ftcl_JoinThread                         uintptr
	Ftcl_IsChannelShared                    uintptr
	Ftcl_IsChannelRegistered                uintptr
	Ftcl_CutChannel                         uintptr
	Ftcl_SpliceChannel                      uintptr
	Ftcl_ClearChannelHandlers               uintptr
	Ftcl_IsChannelExisting                  uintptr
	Ftcl_UniCharNcasecmp                    uintptr
	Ftcl_UniCharCaseMatch                   uintptr
	Ftcl_FindHashEntry                      uintptr
	Ftcl_CreateHashEntry                    uintptr
	Ftcl_InitCustomHashTable                uintptr
	Ftcl_InitObjHashTable                   uintptr
	Ftcl_CommandTraceInfo                   uintptr
	Ftcl_TraceCommand                       uintptr
	Ftcl_UntraceCommand                     uintptr
	Ftcl_AttemptAlloc                       uintptr
	Ftcl_AttemptDbCkalloc                   uintptr
	Ftcl_AttemptRealloc                     uintptr
	Ftcl_AttemptDbCkrealloc                 uintptr
	Ftcl_AttemptSetObjLength                uintptr
	Ftcl_GetChannelThread                   uintptr
	Ftcl_GetUnicodeFromObj                  uintptr
	Ftcl_GetMathFuncInfo                    uintptr
	Ftcl_ListMathFuncs                      uintptr
	Ftcl_SubstObj                           uintptr
	Ftcl_DetachChannel                      uintptr
	Ftcl_IsStandardChannel                  uintptr
	Ftcl_FSCopyFile                         uintptr
	Ftcl_FSCopyDirectory                    uintptr
	Ftcl_FSCreateDirectory                  uintptr
	Ftcl_FSDeleteFile                       uintptr
	Ftcl_FSLoadFile                         uintptr
	Ftcl_FSMatchInDirectory                 uintptr
	Ftcl_FSLink                             uintptr
	Ftcl_FSRemoveDirectory                  uintptr
	Ftcl_FSRenameFile                       uintptr
	Ftcl_FSLstat                            uintptr
	Ftcl_FSUtime                            uintptr
	Ftcl_FSFileAttrsGet                     uintptr
	Ftcl_FSFileAttrsSet                     uintptr
	Ftcl_FSFileAttrStrings                  uintptr
	Ftcl_FSStat                             uintptr
	Ftcl_FSAccess                           uintptr
	Ftcl_FSOpenFileChannel                  uintptr
	Ftcl_FSGetCwd                           uintptr
	Ftcl_FSChdir                            uintptr
	Ftcl_FSConvertToPathType                uintptr
	Ftcl_FSJoinPath                         uintptr
	Ftcl_FSSplitPath                        uintptr
	Ftcl_FSEqualPaths                       uintptr
	Ftcl_FSGetNormalizedPath                uintptr
	Ftcl_FSJoinToPath                       uintptr
	Ftcl_FSGetInternalRep                   uintptr
	Ftcl_FSGetTranslatedPath                uintptr
	Ftcl_FSEvalFile                         uintptr
	Ftcl_FSNewNativePath                    uintptr
	Ftcl_FSGetNativePath                    uintptr
	Ftcl_FSFileSystemInfo                   uintptr
	Ftcl_FSPathSeparator                    uintptr
	Ftcl_FSListVolumes                      uintptr
	Ftcl_FSRegister                         uintptr
	Ftcl_FSUnregister                       uintptr
	Ftcl_FSData                             uintptr
	Ftcl_FSGetTranslatedStringPath          uintptr
	Ftcl_FSGetFileSystemForPath             uintptr
	Ftcl_FSGetPathType                      uintptr
	Ftcl_OutputBuffered                     uintptr
	Ftcl_FSMountsChanged                    uintptr
	Ftcl_EvalTokensStandard                 uintptr
	Ftcl_GetTime                            uintptr
	Ftcl_CreateObjTrace                     uintptr
	Ftcl_GetCommandInfoFromToken            uintptr
	Ftcl_SetCommandInfoFromToken            uintptr
	Ftcl_DbNewWideIntObj                    uintptr
	Ftcl_GetWideIntFromObj                  uintptr
	Ftcl_NewWideIntObj                      uintptr
	Ftcl_SetWideIntObj                      uintptr
	Ftcl_AllocStatBuf                       uintptr
	Ftcl_Seek                               uintptr
	Ftcl_Tell                               uintptr
	Ftcl_ChannelWideSeekProc                uintptr
	Ftcl_DictObjPut                         uintptr
	Ftcl_DictObjGet                         uintptr
	Ftcl_DictObjRemove                      uintptr
	Ftcl_DictObjSize                        uintptr
	Ftcl_DictObjFirst                       uintptr
	Ftcl_DictObjNext                        uintptr
	Ftcl_DictObjDone                        uintptr
	Ftcl_DictObjPutKeyList                  uintptr
	Ftcl_DictObjRemoveKeyList               uintptr
	Ftcl_NewDictObj                         uintptr
	Ftcl_DbNewDictObj                       uintptr
	Ftcl_RegisterConfig                     uintptr
	Ftcl_CreateNamespace                    uintptr
	Ftcl_DeleteNamespace                    uintptr
	Ftcl_AppendExportList                   uintptr
	Ftcl_Export                             uintptr
	Ftcl_Import                             uintptr
	Ftcl_ForgetImport                       uintptr
	Ftcl_GetCurrentNamespace                uintptr
	Ftcl_GetGlobalNamespace                 uintptr
	Ftcl_FindNamespace                      uintptr
	Ftcl_FindCommand                        uintptr
	Ftcl_GetCommandFromObj                  uintptr
	Ftcl_GetCommandFullName                 uintptr
	Ftcl_FSEvalFileEx                       uintptr
	Ftcl_SetExitProc                        uintptr
	Ftcl_LimitAddHandler                    uintptr
	Ftcl_LimitRemoveHandler                 uintptr
	Ftcl_LimitReady                         uintptr
	Ftcl_LimitCheck                         uintptr
	Ftcl_LimitExceeded                      uintptr
	Ftcl_LimitSetCommands                   uintptr
	Ftcl_LimitSetTime                       uintptr
	Ftcl_LimitSetGranularity                uintptr
	Ftcl_LimitTypeEnabled                   uintptr
	Ftcl_LimitTypeExceeded                  uintptr
	Ftcl_LimitTypeSet                       uintptr
	Ftcl_LimitTypeReset                     uintptr
	Ftcl_LimitGetCommands                   uintptr
	Ftcl_LimitGetTime                       uintptr
	Ftcl_LimitGetGranularity                uintptr
	Ftcl_SaveInterpState                    uintptr
	Ftcl_RestoreInterpState                 uintptr
	Ftcl_DiscardInterpState                 uintptr
	Ftcl_SetReturnOptions                   uintptr
	Ftcl_GetReturnOptions                   uintptr
	Ftcl_IsEnsemble                         uintptr
	Ftcl_CreateEnsemble                     uintptr
	Ftcl_FindEnsemble                       uintptr
	Ftcl_SetEnsembleSubcommandList          uintptr
	Ftcl_SetEnsembleMappingDict             uintptr
	Ftcl_SetEnsembleUnknownHandler          uintptr
	Ftcl_SetEnsembleFlags                   uintptr
	Ftcl_GetEnsembleSubcommandList          uintptr
	Ftcl_GetEnsembleMappingDict             uintptr
	Ftcl_GetEnsembleUnknownHandler          uintptr
	Ftcl_GetEnsembleFlags                   uintptr
	Ftcl_GetEnsembleNamespace               uintptr
	Ftcl_SetTimeProc                        uintptr
	Ftcl_QueryTimeProc                      uintptr
	Ftcl_ChannelThreadActionProc            uintptr
	Ftcl_NewBignumObj                       uintptr
	Ftcl_DbNewBignumObj                     uintptr
	Ftcl_SetBignumObj                       uintptr
	Ftcl_GetBignumFromObj                   uintptr
	Ftcl_TakeBignumFromObj                  uintptr
	Ftcl_TruncateChannel                    uintptr
	Ftcl_ChannelTruncateProc                uintptr
	Ftcl_SetChannelErrorInterp              uintptr
	Ftcl_GetChannelErrorInterp              uintptr
	Ftcl_SetChannelError                    uintptr
	Ftcl_GetChannelError                    uintptr
	Ftcl_InitBignumFromDouble               uintptr
	Ftcl_GetNamespaceUnknownHandler         uintptr
	Ftcl_SetNamespaceUnknownHandler         uintptr
	Ftcl_GetEncodingFromObj                 uintptr
	Ftcl_GetEncodingSearchPath              uintptr
	Ftcl_SetEncodingSearchPath              uintptr
	Ftcl_GetEncodingNameFromEnvironment     uintptr
	Ftcl_PkgRequireProc                     uintptr
	Ftcl_AppendObjToErrorInfo               uintptr
	Ftcl_AppendLimitedToObj                 uintptr
	Ftcl_Format                             uintptr
	Ftcl_AppendFormatToObj                  uintptr
	Ftcl_ObjPrintf                          uintptr
	Ftcl_AppendPrintfToObj                  uintptr
	Ftcl_CancelEval                         uintptr
	Ftcl_Canceled                           uintptr
	Ftcl_CreatePipe                         uintptr
	Ftcl_NRCreateCommand                    uintptr
	Ftcl_NREvalObj                          uintptr
	Ftcl_NREvalObjv                         uintptr
	Ftcl_NRCmdSwap                          uintptr
	Ftcl_NRAddCallback                      uintptr
	Ftcl_NRCallObjProc                      uintptr
	Ftcl_GetFSDeviceFromStat                uintptr
	Ftcl_GetFSInodeFromStat                 uintptr
	Ftcl_GetModeFromStat                    uintptr
	Ftcl_GetLinkCountFromStat               uintptr
	Ftcl_GetUserIdFromStat                  uintptr
	Ftcl_GetGroupIdFromStat                 uintptr
	Ftcl_GetDeviceTypeFromStat              uintptr
	Ftcl_GetAccessTimeFromStat              uintptr
	Ftcl_GetModificationTimeFromStat        uintptr
	Ftcl_GetChangeTimeFromStat              uintptr
	Ftcl_GetSizeFromStat                    uintptr
	Ftcl_GetBlocksFromStat                  uintptr
	Ftcl_GetBlockSizeFromStat               uintptr
	Ftcl_SetEnsembleParameterList           uintptr
	Ftcl_GetEnsembleParameterList           uintptr
	Ftcl_ParseArgsObjv                      uintptr
	Ftcl_GetErrorLine                       uintptr
	Ftcl_SetErrorLine                       uintptr
	Ftcl_TransferResult                     uintptr
	Ftcl_InterpActive                       uintptr
	Ftcl_BackgroundException                uintptr
	Ftcl_ZlibDeflate                        uintptr
	Ftcl_ZlibInflate                        uintptr
	Ftcl_ZlibCRC32                          uintptr
	Ftcl_ZlibAdler32                        uintptr
	Ftcl_ZlibStreamInit                     uintptr
	Ftcl_ZlibStreamGetCommandName           uintptr
	Ftcl_ZlibStreamEof                      uintptr
	Ftcl_ZlibStreamChecksum                 uintptr
	Ftcl_ZlibStreamPut                      uintptr
	Ftcl_ZlibStreamGet                      uintptr
	Ftcl_ZlibStreamClose                    uintptr
	Ftcl_ZlibStreamReset                    uintptr
	Ftcl_SetStartupScript                   uintptr
	Ftcl_GetStartupScript                   uintptr
	Ftcl_CloseEx                            uintptr
	Ftcl_NRExprObj                          uintptr
	Ftcl_NRSubstObj                         uintptr
	Ftcl_LoadFile                           uintptr
	Ftcl_FindSymbol                         uintptr
	Ftcl_FSUnloadFile                       uintptr
	Ftcl_ZlibStreamSetCompressionDictionary uintptr
	Freserved631                            uintptr
	Freserved632                            uintptr
	Freserved633                            uintptr
	Freserved634                            uintptr
	Freserved635                            uintptr
	Freserved636                            uintptr
	Freserved637                            uintptr
	Freserved638                            uintptr
	Freserved639                            uintptr
	Freserved640                            uintptr
	Freserved641                            uintptr
	Freserved642                            uintptr
	Freserved643                            uintptr
	Freserved644                            uintptr
	Freserved645                            uintptr
	Freserved646                            uintptr
	Freserved647                            uintptr
	Freserved648                            uintptr
	Freserved649                            uintptr
	Freserved650                            uintptr
	Freserved651                            uintptr
	Freserved652                            uintptr
	Freserved653                            uintptr
	Freserved654                            uintptr
	Freserved655                            uintptr
	Freserved656                            uintptr
	Freserved657                            uintptr
	Freserved658                            uintptr
	Freserved659                            uintptr
	FtclUnusedStubEntry                     uintptr
} /* tclDecls.h:1856:9 */

type TclStubs = TclStubs1 /* tclDecls.h:2545:3 */

type TclPlatStubs = TclPlatStubs1 /* tclPlatDecls.h:89:3 */

// end block for C++

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// ISO C Standard:  7.17  Common definitions  <stddef.h>

// Copyright (C) 1989-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  7.17  Common definitions  <stddef.h>

// Ensure WORDS_BIGENDIAN is defined correctly:
// Needs to happen here in addition to configure to work with fat compiles on
// Darwin (where configure runs only once for multiple architectures).

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Used to tag functions that are only to be visible within the module being
// built and not outside it (where this is supported by the linker).

// Macros used to cast between pointers and integers (e.g. when storing an int
// in ClientData), on 64-bit architectures they avoid gcc warning about "cast
// to/from pointer from/to integer of different size".

// The following procedures allow namespaces to be customized to support
// special name resolution rules for commands/variables.

type Tcl_ResolvedVarInfo1 = struct {
	FfetchProc  uintptr
	FdeleteProc uintptr
} /* tclInt.h:131:1 */

// The following structure encapsulates the routines needed to resolve a
// variable reference at runtime. Any variable specific state will typically
// be appended to this structure.

type Tcl_ResolvedVarInfo = Tcl_ResolvedVarInfo1 /* tclInt.h:147:3 */

type Tcl_ResolverInfo1 = struct {
	FcmdResProc         uintptr
	FvarResProc         uintptr
	FcompiledVarResProc uintptr
} /* tclInt.h:159:9 */

type Tcl_ResolverInfo = Tcl_ResolverInfo1 /* tclInt.h:170:3 */
type NamespacePathEntry1 = struct {
	FnsPtr        uintptr
	FcreatorNsPtr uintptr
	FprevPtr      uintptr
	FnextPtr      uintptr
} /* tclInt.h:194:9 */

type NamespacePathEntry = NamespacePathEntry1 /* tclInt.h:194:35 */

// Special hashtable for variables: this is just a Tcl_HashTable with an nsPtr
// field added at the end: in this way variables can find their namespace
// without having to copy a pointer in their struct: they can access it via
// their hPtr->tablePtr.

type TclVarHashTable1 = struct {
	Ftable Tcl_HashTable
	FnsPtr uintptr
} /* tclInt.h:194:9 */

// Special hashtable for variables: this is just a Tcl_HashTable with an nsPtr
// field added at the end: in this way variables can find their namespace
// without having to copy a pointer in their struct: they can access it via
// their hPtr->tablePtr.

type Namespace1 = struct {
	Fname                  uintptr
	FfullName              uintptr
	FclientData            ClientData
	FdeleteProc            uintptr
	FparentPtr             uintptr
	FchildTable            Tcl_HashTable
	FnsId                  int32
	F__ccgo_pad1           [4]byte
	Finterp                uintptr
	Fflags                 int32
	FactivationCount       int32
	FrefCount              int32
	F__ccgo_pad2           [4]byte
	FcmdTable              Tcl_HashTable
	FvarTable              TclVarHashTable
	FexportArrayPtr        uintptr
	FnumExportPatterns     int32
	FmaxExportPatterns     int32
	FcmdRefEpoch           int32
	FresolverEpoch         int32
	FcmdResProc            uintptr
	FvarResProc            uintptr
	FcompiledVarResProc    uintptr
	FexportLookupEpoch     int32
	F__ccgo_pad3           [4]byte
	Fensembles             uintptr
	FunknownHandlerPtr     uintptr
	FcommandPathLength     int32
	F__ccgo_pad4           [4]byte
	FcommandPathArray      uintptr
	FcommandPathSourceList uintptr
	FearlyDeleteProc       uintptr
} /* tclInt.h:194:9 */

// Special hashtable for variables: this is just a Tcl_HashTable with an nsPtr
// field added at the end: in this way variables can find their namespace
// without having to copy a pointer in their struct: they can access it via
// their hPtr->tablePtr.

type TclVarHashTable = TclVarHashTable1 /* tclInt.h:206:3 */

// This is for itcl - it likes to search our varTables directly :(

// Define this to reduce the amount of space that the average namespace
// consumes by only allocating the table of child namespaces when necessary.
// Defining it breaks compatibility for Tcl extensions (e.g., itcl) which
// reach directly into the Namespace structure.

// The structure below defines a namespace.
// Note: the first five fields must match exactly the fields in a
// Tcl_Namespace structure (see tcl.h). If you change one, be sure to change
// the other.

type Namespace = Namespace1 /* tclInt.h:345:3 */

// Flags used to represent the status of a namespace:
//
// NS_DYING -	1 means Tcl_DeleteNamespace has been called to delete the
//		namespace but there are still active call frames on the Tcl
//		stack that refer to the namespace. When the last call frame
//		referring to it has been popped, it's variables and command
//		will be destroyed and it will be marked "dead" (NS_DEAD). The
//		namespace can no longer be looked up by name.
// NS_DEAD -	1 means Tcl_DeleteNamespace has been called to delete the
//		namespace and no call frames still refer to it. Its variables
//		and command have already been destroyed. This bit allows the
//		namespace resolution code to recognize that the namespace is
//		"deleted". When the last namespaceName object in any byte code
//		unit that refers to the namespace has been freed (i.e., when
//		the namespace's refCount is 0), the namespace's storage will
//		be freed.
// NS_KILLED -	1 means that TclTeardownNamespace has already been called on
//		this namespace and it should not be called again [Bug 1355942]
// NS_SUPPRESS_COMPILATION -
//		Marks the commands in this namespace for not being compiled,
//		forcing them to be looked up every time.

// Flags passed to TclGetNamespaceForQualName:
//
// TCL_GLOBAL_ONLY		- (see tcl.h) Look only in the global ns.
// TCL_NAMESPACE_ONLY		- (see tcl.h) Look only in the context ns.
// TCL_CREATE_NS_IF_UNKNOWN	- Create unknown namespaces.
// TCL_FIND_ONLY_NS		- The name sought is a namespace name.

// The client data for an ensemble command. This consists of the table of
// commands that are actually exported by the namespace, and an epoch counter
// that, combined with the exportLookupEpoch field of the namespace structure,
// defines whether the table contains valid data or will need to be recomputed
// next time the ensemble command is called.

type EnsembleConfig1 = struct {
	FnsPtr              uintptr
	Ftoken              Tcl_Command
	Fepoch              int32
	F__ccgo_pad1        [4]byte
	FsubcommandArrayPtr uintptr
	FsubcommandTable    Tcl_HashTable
	Fnext               uintptr
	Fflags              int32
	F__ccgo_pad2        [4]byte
	FsubcommandDict     uintptr
	FsubcmdList         uintptr
	FunknownHandler     uintptr
	FparameterList      uintptr
	FnumParameters      int32
	F__ccgo_pad3        [4]byte
} /* tclInt.h:415:9 */

// Flags used to represent the status of a namespace:
//
// NS_DYING -	1 means Tcl_DeleteNamespace has been called to delete the
//		namespace but there are still active call frames on the Tcl
//		stack that refer to the namespace. When the last call frame
//		referring to it has been popped, it's variables and command
//		will be destroyed and it will be marked "dead" (NS_DEAD). The
//		namespace can no longer be looked up by name.
// NS_DEAD -	1 means Tcl_DeleteNamespace has been called to delete the
//		namespace and no call frames still refer to it. Its variables
//		and command have already been destroyed. This bit allows the
//		namespace resolution code to recognize that the namespace is
//		"deleted". When the last namespaceName object in any byte code
//		unit that refers to the namespace has been freed (i.e., when
//		the namespace's refCount is 0), the namespace's storage will
//		be freed.
// NS_KILLED -	1 means that TclTeardownNamespace has already been called on
//		this namespace and it should not be called again [Bug 1355942]
// NS_SUPPRESS_COMPILATION -
//		Marks the commands in this namespace for not being compiled,
//		forcing them to be looked up every time.

// Flags passed to TclGetNamespaceForQualName:
//
// TCL_GLOBAL_ONLY		- (see tcl.h) Look only in the global ns.
// TCL_NAMESPACE_ONLY		- (see tcl.h) Look only in the context ns.
// TCL_CREATE_NS_IF_UNKNOWN	- Create unknown namespaces.
// TCL_FIND_ONLY_NS		- The name sought is a namespace name.

// The client data for an ensemble command. This consists of the table of
// commands that are actually exported by the namespace, and an epoch counter
// that, combined with the exportLookupEpoch field of the namespace structure,
// defines whether the table contains valid data or will need to be recomputed
// next time the ensemble command is called.

type EnsembleConfig = EnsembleConfig1 /* tclInt.h:483:3 */

// Various bits for the EnsembleConfig.flags field.

//----------------------------------------------------------------
// Data structures related to variables. These are used primarily in tclVar.c
//----------------------------------------------------------------

// The following structure defines a variable trace, which is used to invoke a
// specific C procedure whenever certain operations are performed on a
// variable.

type VarTrace1 = struct {
	FtraceProc   uintptr
	FclientData  ClientData
	Fflags       int32
	F__ccgo_pad1 [4]byte
	FnextPtr     uintptr
} /* tclInt.h:506:9 */

// Various bits for the EnsembleConfig.flags field.

//----------------------------------------------------------------
// Data structures related to variables. These are used primarily in tclVar.c
//----------------------------------------------------------------

// The following structure defines a variable trace, which is used to invoke a
// specific C procedure whenever certain operations are performed on a
// variable.

type VarTrace = VarTrace1 /* tclInt.h:516:3 */

// The following structure defines a command trace, which is used to invoke a
// specific C procedure whenever certain operations are performed on a
// command.

type CommandTrace1 = struct {
	FtraceProc   uintptr
	FclientData  ClientData
	Fflags       int32
	F__ccgo_pad1 [4]byte
	FnextPtr     uintptr
	FrefCount    int32
	F__ccgo_pad2 [4]byte
} /* tclInt.h:524:9 */

// The following structure defines a command trace, which is used to invoke a
// specific C procedure whenever certain operations are performed on a
// command.

type CommandTrace = CommandTrace1 /* tclInt.h:539:3 */

// When a command trace is active (i.e. its associated procedure is executing)
// one of the following structures is linked into a list associated with the
// command's interpreter. The information in the structure is needed in order
// for Tcl to behave reasonably if traces are deleted while traces are active.

type ActiveCommandTrace1 = struct {
	FcmdPtr       uintptr
	FnextPtr      uintptr
	FnextTracePtr uintptr
	FreverseScan  int32
	F__ccgo_pad1  [4]byte
} /* tclInt.h:548:9 */

// When a command trace is active (i.e. its associated procedure is executing)
// one of the following structures is linked into a list associated with the
// command's interpreter. The information in the structure is needed in order
// for Tcl to behave reasonably if traces are deleted while traces are active.

type Command1 = struct {
	FhPtr          uintptr
	FnsPtr         uintptr
	FrefCount      int32
	FcmdEpoch      int32
	FcompileProc   uintptr
	FobjProc       uintptr
	FobjClientData ClientData
	Fproc          uintptr
	FclientData    ClientData
	FdeleteProc    uintptr
	FdeleteData    ClientData
	Fflags         int32
	F__ccgo_pad1   [4]byte
	FimportRefPtr  uintptr
	FtracePtr      uintptr
	FnreProc       uintptr
} /* tclInt.h:548:9 */

// When a command trace is active (i.e. its associated procedure is executing)
// one of the following structures is linked into a list associated with the
// command's interpreter. The information in the structure is needed in order
// for Tcl to behave reasonably if traces are deleted while traces are active.

type ActiveCommandTrace = ActiveCommandTrace1 /* tclInt.h:559:3 */

// When a variable trace is active (i.e. its associated procedure is
// executing) one of the following structures is linked into a list associated
// with the variable's interpreter. The information in the structure is needed
// in order for Tcl to behave reasonably if traces are deleted while traces
// are active.

type ActiveVarTrace1 = struct {
	FvarPtr       uintptr
	FnextPtr      uintptr
	FnextTracePtr uintptr
} /* tclInt.h:569:9 */

// When a variable trace is active (i.e. its associated procedure is
// executing) one of the following structures is linked into a list associated
// with the variable's interpreter. The information in the structure is needed
// in order for Tcl to behave reasonably if traces are deleted while traces
// are active.

type Var1 = struct {
	Fflags       int32
	F__ccgo_pad1 [4]byte
	Fvalue       struct{ FobjPtr uintptr }
} /* tclInt.h:569:9 */

// When a variable trace is active (i.e. its associated procedure is
// executing) one of the following structures is linked into a list associated
// with the variable's interpreter. The information in the structure is needed
// in order for Tcl to behave reasonably if traces are deleted while traces
// are active.

type ActiveVarTrace = ActiveVarTrace1 /* tclInt.h:578:3 */

// The structure below defines a variable, which associates a string name with
// a Tcl_Obj value. These structures are kept in procedure call frames (for
// local variables recognized by the compiler) or in the heap (for global
// variables and any variable not known to the compiler). For each Var
// structure in the heap, a hash table entry holds the variable name and a
// pointer to the Var structure.

type Var = Var1 /* tclInt.h:604:3 */

type VarInHash1 = struct {
	Fvar         Var
	FrefCount    int32
	F__ccgo_pad1 [4]byte
	Fentry       Tcl_HashEntry
} /* tclInt.h:606:9 */

type VarInHash = VarInHash1 /* tclInt.h:621:3 */

// The variable-length structure below describes a local variable of a
// procedure that was recognized by the compiler. These variables have a name,
// an element in the array of compiler-assigned local variables in the
// procedure's call frame, and various other items of information. If the
// local variable is a formal argument, it may also have a default value. The
// compiler can't recognize local variables whose names are expressions (these
// names are only known at runtime when the expressions are evaluated) or
// local variables that are created as a result of an "upvar" or "uplevel"
// command. These other local variables are kept separately in a hash table in
// the call frame.

type CompiledLocal1 = struct {
	F__ccgo_pad1 [0]uint64
	FnextPtr     uintptr
	FnameLength  int32
	FframeIndex  int32
	Fflags       int32
	F__ccgo_pad2 [4]byte
	FdefValuePtr uintptr
	FresolveInfo uintptr
} /* tclInt.h:906:9 */

// The variable-length structure below describes a local variable of a
// procedure that was recognized by the compiler. These variables have a name,
// an element in the array of compiler-assigned local variables in the
// procedure's call frame, and various other items of information. If the
// local variable is a formal argument, it may also have a default value. The
// compiler can't recognize local variables whose names are expressions (these
// names are only known at runtime when the expressions are evaluated) or
// local variables that are created as a result of an "upvar" or "uplevel"
// command. These other local variables are kept separately in a hash table in
// the call frame.

type CompiledLocal = CompiledLocal1 /* tclInt.h:934:3 */

// The structure below defines a command procedure, which consists of a
// collection of Tcl commands plus information about arguments and other local
// variables recognized at compile time.

type Proc1 = struct {
	FiPtr              uintptr
	FrefCount          int32
	F__ccgo_pad1       [4]byte
	FcmdPtr            uintptr
	FbodyPtr           uintptr
	FnumArgs           int32
	FnumCompiledLocals int32
	FfirstLocalPtr     uintptr
	FlastLocalPtr      uintptr
} /* tclInt.h:942:9 */

// The structure below defines a command procedure, which consists of a
// collection of Tcl commands plus information about arguments and other local
// variables recognized at compile time.

type Interp1 = struct {
	Fresult            uintptr
	FfreeProc          uintptr
	FerrorLine         int32
	F__ccgo_pad1       [4]byte
	FstubTable         uintptr
	Fhandle            TclHandle
	FglobalNsPtr       uintptr
	FhiddenCmdTablePtr uintptr
	FinterpInfo        ClientData
	Fextra             struct {
		Foptimizer   uintptr
		F__ccgo_pad1 [80]byte
	}
	FnumLevels              int32
	FmaxNestingDepth        int32
	FframePtr               uintptr
	FvarFramePtr            uintptr
	FactiveVarTracePtr      uintptr
	FreturnCode             int32
	F__ccgo_pad2            [4]byte
	FrootFramePtr           uintptr
	FlookupNsPtr            uintptr
	FappendResult           uintptr
	FappendAvl              int32
	FappendUsed             int32
	FpackageTable           Tcl_HashTable
	FpackageUnknown         uintptr
	FcmdCount               int32
	FevalFlags              int32
	Funused1                int32
	F__ccgo_pad3            [4]byte
	FliteralTable           LiteralTable
	FcompileEpoch           int32
	F__ccgo_pad4            [4]byte
	FcompiledProcPtr        uintptr
	FresolverPtr            uintptr
	FscriptFile             uintptr
	Fflags                  int32
	FrandSeed               int32
	FtracePtr               uintptr
	FassocData              uintptr
	FexecEnvPtr             uintptr
	FemptyObjPtr            uintptr
	FresultSpace            [201]int8
	F__ccgo_pad5            [7]byte
	FobjResultPtr           uintptr
	FthreadId               Tcl_ThreadId
	FactiveCmdTracePtr      uintptr
	FactiveInterpTracePtr   uintptr
	FtracesForbiddingInline int32
	F__ccgo_pad6            [4]byte
	FreturnOpts             uintptr
	FerrorInfo              uintptr
	FeiVar                  uintptr
	FerrorCode              uintptr
	FecVar                  uintptr
	FreturnLevel            int32
	F__ccgo_pad7            [4]byte
	Flimit                  struct {
		Factive            int32
		FgranularityTicker int32
		Fexceeded          int32
		FcmdCount          int32
		FcmdHandlers       uintptr
		FcmdGranularity    int32
		Ftime              Tcl_Time
		F__ccgo_pad1       [4]byte
		FtimeHandlers      uintptr
		FtimeGranularity   int32
		F__ccgo_pad2       [4]byte
		FtimeEvent         Tcl_TimerToken
		Fcallbacks         Tcl_HashTable
	}
	FensembleRewrite struct {
		FsourceObjs      uintptr
		FnumRemovedObjs  int32
		FnumInsertedObjs int32
	}
	FchanMsg           uintptr
	FcmdFramePtr       uintptr
	FinvokeCmdFramePtr uintptr
	FinvokeWord        int32
	F__ccgo_pad8       [4]byte
	FlinePBodyPtr      uintptr
	FlineBCPtr         uintptr
	FlineLABCPtr       uintptr
	FlineLAPtr         uintptr
	FscriptCLLocPtr    uintptr
	FpackagePrefer     int32
	F__ccgo_pad9       [4]byte
	FvarTraces         Tcl_HashTable
	FvarSearches       Tcl_HashTable
	FallocCache        uintptr
	FpendingObjDataPtr uintptr
	FasyncReadyPtr     uintptr
	FobjectFoundation  uintptr
	FdeferredCallbacks uintptr
	FasyncCancel       Tcl_AsyncHandler
	FasyncCancelMsg    uintptr
	FerrorStack        uintptr
	FupLiteral         uintptr
	FcallLiteral       uintptr
	FinnerLiteral      uintptr
	FinnerContext      uintptr
	FresetErrorStack   int32
	F__ccgo_pad10      [4]byte
} /* tclInt.h:942:9 */

// The structure below defines a command procedure, which consists of a
// collection of Tcl commands plus information about arguments and other local
// variables recognized at compile time.

type Proc = Proc1 /* tclInt.h:969:3 */

// The structure below defines a command trace. This is used to allow Tcl
// clients to find out whenever a command is about to be executed.

type Trace1 = struct {
	Flevel       int32
	F__ccgo_pad1 [4]byte
	Fproc        uintptr
	FclientData  ClientData
	FnextPtr     uintptr
	Fflags       int32
	F__ccgo_pad2 [4]byte
	FdelProc     uintptr
} /* tclInt.h:942:9 */

// The structure below defines a command trace. This is used to allow Tcl
// clients to find out whenever a command is about to be executed.

type Trace = Trace1 /* tclInt.h:993:3 */

// When an interpreter trace is active (i.e. its associated procedure is
// executing), one of the following structures is linked into a list
// associated with the interpreter. The information in the structure is needed
// in order for Tcl to behave reasonably if traces are deleted while traces
// are active.

type ActiveInterpTrace1 = struct {
	FnextPtr      uintptr
	FnextTracePtr uintptr
	FreverseScan  int32
	F__ccgo_pad1  [4]byte
} /* tclInt.h:942:9 */

// When an interpreter trace is active (i.e. its associated procedure is
// executing), one of the following structures is linked into a list
// associated with the interpreter. The information in the structure is needed
// in order for Tcl to behave reasonably if traces are deleted while traces
// are active.

type ActiveInterpTrace = ActiveInterpTrace1 /* tclInt.h:1013:3 */

// Flag values designating types of execution traces. See tclTrace.c for
// related flag values.
//
// TCL_TRACE_ENTER_EXEC		- triggers enter/enterstep traces.
// 				- passed to Tcl_CreateObjTrace to set up
//				  "enterstep" traces.
// TCL_TRACE_LEAVE_EXEC		- triggers leave/leavestep traces.
// 				- passed to Tcl_CreateObjTrace to set up
//				  "leavestep" traces.

// The structure below defines an entry in the assocData hash table which is
// associated with an interpreter. The entry contains a pointer to a function
// to call when the interpreter is deleted, and a pointer to a user-defined
// piece of data.

type AssocData1 = struct {
	Fproc       uintptr
	FclientData ClientData
} /* tclInt.h:1037:9 */

// Flag values designating types of execution traces. See tclTrace.c for
// related flag values.
//
// TCL_TRACE_ENTER_EXEC		- triggers enter/enterstep traces.
// 				- passed to Tcl_CreateObjTrace to set up
//				  "enterstep" traces.
// TCL_TRACE_LEAVE_EXEC		- triggers leave/leavestep traces.
// 				- passed to Tcl_CreateObjTrace to set up
//				  "leavestep" traces.

// The structure below defines an entry in the assocData hash table which is
// associated with an interpreter. The entry contains a pointer to a function
// to call when the interpreter is deleted, and a pointer to a user-defined
// piece of data.

type AssocData = AssocData1 /* tclInt.h:1040:3 */

// The structure below defines a call frame. A call frame defines a naming
// context for a procedure call: its local naming scope (for local variables)
// and its global naming scope (a namespace, perhaps the global :: namespace).
// A call frame can also define the naming context for a namespace eval or
// namespace inscope command: the namespace in which the command's code should
// execute. The Tcl_CallFrame structures exist only while procedures or
// namespace eval/inscope's are being executed, and provide a kind of Tcl call
// stack.
//
// WARNING!! The structure definition must be kept consistent with the
// Tcl_CallFrame structure in tcl.h. If you change one, change the other.

// Will be grown to contain: pointers to the varnames (allocated at the end),
// plus the init values for each variable (suitable to be memcopied on init)

type LocalCache1 = struct {
	FrefCount int32
	FnumVars  int32
	FvarName0 uintptr
} /* tclInt.h:942:9 */

// The structure below defines a call frame. A call frame defines a naming
// context for a procedure call: its local naming scope (for local variables)
// and its global naming scope (a namespace, perhaps the global :: namespace).
// A call frame can also define the naming context for a namespace eval or
// namespace inscope command: the namespace in which the command's code should
// execute. The Tcl_CallFrame structures exist only while procedures or
// namespace eval/inscope's are being executed, and provide a kind of Tcl call
// stack.
//
// WARNING!! The structure definition must be kept consistent with the
// Tcl_CallFrame structure in tcl.h. If you change one, change the other.

// Will be grown to contain: pointers to the varnames (allocated at the end),
// plus the init values for each variable (suitable to be memcopied on init)

type LocalCache = LocalCache1 /* tclInt.h:1065:3 */

type CallFrame1 = struct {
	FnsPtr             uintptr
	FisProcCallFrame   int32
	Fobjc              int32
	Fobjv              uintptr
	FcallerPtr         uintptr
	FcallerVarPtr      uintptr
	Flevel             int32
	F__ccgo_pad1       [4]byte
	FprocPtr           uintptr
	FvarTablePtr       uintptr
	FnumCompiledLocals int32
	F__ccgo_pad2       [4]byte
	FcompiledLocals    uintptr
	FclientData        ClientData
	FlocalCachePtr     uintptr
	FtailcallPtr       uintptr
} /* tclInt.h:942:9 */

type CallFrame = CallFrame1 /* tclInt.h:1129:3 */

// TIP #280
// The structure below defines a command frame. A command frame provides
// location information for all commands executing a tcl script (source, eval,
// uplevel, procedure bodies, ...). The runtime structure essentially contains
// the stack trace as it would be if the currently executing command were to
// throw an error.
//
// For commands where it makes sense it refers to the associated CallFrame as
// well.
//
// The structures are chained in a single list, with the top of the stack
// anchored in the Interp structure.
//
// Instances can be allocated on the C stack, or the heap, the former making
// cleanup a bit simpler.

type CmdFrame1 = struct {
	Ftype        int32
	Flevel       int32
	Fline        uintptr
	Fnline       int32
	F__ccgo_pad1 [4]byte
	FframePtr    uintptr
	FnextPtr     uintptr
	Fdata        struct {
		Feval        struct{ Fpath uintptr }
		F__ccgo_pad1 [8]byte
	}
	FcmdObj      uintptr
	Fcmd         uintptr
	Flen         int32
	F__ccgo_pad2 [4]byte
	Flitarg      uintptr
} /* tclInt.h:942:9 */

// TIP #280
// The structure below defines a command frame. A command frame provides
// location information for all commands executing a tcl script (source, eval,
// uplevel, procedure bodies, ...). The runtime structure essentially contains
// the stack trace as it would be if the currently executing command were to
// throw an error.
//
// For commands where it makes sense it refers to the associated CallFrame as
// well.
//
// The structures are chained in a single list, with the top of the stack
// anchored in the Interp structure.
//
// Instances can be allocated on the C stack, or the heap, the former making
// cleanup a bit simpler.

type CFWordBC1 = struct {
	FframePtr uintptr
	Fpc       int32
	Fword     int32
	FprevPtr  uintptr
	FnextPtr  uintptr
	Fobj      uintptr
} /* tclInt.h:942:9 */

// TIP #280
// The structure below defines a command frame. A command frame provides
// location information for all commands executing a tcl script (source, eval,
// uplevel, procedure bodies, ...). The runtime structure essentially contains
// the stack trace as it would be if the currently executing command were to
// throw an error.
//
// For commands where it makes sense it refers to the associated CallFrame as
// well.
//
// The structures are chained in a single list, with the top of the stack
// anchored in the Interp structure.
//
// Instances can be allocated on the C stack, or the heap, the former making
// cleanup a bit simpler.

type CmdFrame = CmdFrame1 /* tclInt.h:1219:3 */

type CFWord1 = struct {
	FframePtr uintptr
	Fword     int32
	FrefCount int32
} /* tclInt.h:1221:9 */

type CFWord = CFWord1 /* tclInt.h:1226:3 */

type CFWordBC = CFWordBC1 /* tclInt.h:1238:3 */

// Structure to record the locations of invisible continuation lines in
// literal scripts, as character offset from the beginning of the script. Both
// compiler and direct evaluator use this information to adjust their line
// counters when tracking through the script, because when it is invoked the
// continuation line marker as a whole has been removed already, meaning that
// the \n which was part of it is gone as well, breaking regular line
// tracking.
//
// These structures are allocated and filled by both the function
// TclSubstTokens() in the file "tclParse.c" and its caller TclEvalEx() in the
// file "tclBasic.c", and stored in the thread-global hashtable "lineCLPtr" in
// file "tclObj.c". They are used by the functions TclSetByteCodeFromAny() and
// TclCompileScript(), both found in the file "tclCompile.c". Their memory is
// released by the function TclFreeObj(), in the file "tclObj.c", and also by
// the function TclThreadFinalizeObjects(), in the same file.

type ContLineLoc1 = struct {
	F__ccgo_pad1 [0]uint32
	Fnum         int32
} /* tclInt.h:942:9 */

// Structure to record the locations of invisible continuation lines in
// literal scripts, as character offset from the beginning of the script. Both
// compiler and direct evaluator use this information to adjust their line
// counters when tracking through the script, because when it is invoked the
// continuation line marker as a whole has been removed already, meaning that
// the \n which was part of it is gone as well, breaking regular line
// tracking.
//
// These structures are allocated and filled by both the function
// TclSubstTokens() in the file "tclParse.c" and its caller TclEvalEx() in the
// file "tclBasic.c", and stored in the thread-global hashtable "lineCLPtr" in
// file "tclObj.c". They are used by the functions TclSetByteCodeFromAny() and
// TclCompileScript(), both found in the file "tclCompile.c". Their memory is
// released by the function TclFreeObj(), in the file "tclObj.c", and also by
// the function TclThreadFinalizeObjects(), in the same file.

type ContLineLoc = ContLineLoc1 /* tclInt.h:1269:3 */
type ExtraFrameInfoField = struct {
	Fname       uintptr
	Fproc       uintptr
	FclientData ClientData
} /* tclInt.h:1309:3 */
type ExtraFrameInfo = struct {
	Flength      int32
	F__ccgo_pad1 [4]byte
	Ffields      [2]ExtraFrameInfoField
} /* tclInt.h:1315:3 */

//----------------------------------------------------------------
// Data structures and procedures related to TclHandles, which are a very
// lightweight method of preserving enough information to determine if an
// arbitrary malloc'd block has been deleted.
//----------------------------------------------------------------

type TclHandle = uintptr /* tclInt.h:1325:14 */

// This is a convenience macro used to initialize a thread local storage ptr.

//----------------------------------------------------------------
// Data structures related to bytecode compilation and execution. These are
// used primarily in tclCompile.c, tclExecute.c, and tclBasic.c.
//----------------------------------------------------------------

// Forward declaration to prevent errors when the forward references to
// Tcl_Parse and CompileEnv are encountered in the procedure type CompileProc
// declared below.

type CompileEnv1 = struct {
	FiPtr                    uintptr
	Fsource                  uintptr
	FnumSrcBytes             int32
	F__ccgo_pad1             [4]byte
	FprocPtr                 uintptr
	FnumCommands             int32
	FexceptDepth             int32
	FmaxExceptDepth          int32
	FmaxStackDepth           int32
	FcurrStackDepth          int32
	F__ccgo_pad2             [4]byte
	FlocalLitTable           LiteralTable
	FcodeStart               uintptr
	FcodeNext                uintptr
	FcodeEnd                 uintptr
	FmallocedCodeArray       int32
	F__ccgo_pad3             [4]byte
	FliteralArrayPtr         uintptr
	FliteralArrayNext        int32
	FliteralArrayEnd         int32
	FmallocedLiteralArray    int32
	F__ccgo_pad4             [4]byte
	FexceptArrayPtr          uintptr
	FexceptArrayNext         int32
	FexceptArrayEnd          int32
	FmallocedExceptArray     int32
	F__ccgo_pad5             [4]byte
	FexceptAuxArrayPtr       uintptr
	FcmdMapPtr               uintptr
	FcmdMapEnd               int32
	FmallocedCmdMap          int32
	FauxDataArrayPtr         uintptr
	FauxDataArrayNext        int32
	FauxDataArrayEnd         int32
	FmallocedAuxDataArray    int32
	FstaticCodeSpace         [250]uint8
	F__ccgo_pad6             [2]byte
	FstaticLiteralSpace      [60]LiteralEntry
	FstaticExceptArraySpace  [5]ExceptionRange
	F__ccgo_pad7             [4]byte
	FstaticExAuxArraySpace   [5]ExceptionAux
	FstaticCmdMapSpace       [40]CmdLocation
	FstaticAuxDataArraySpace [5]AuxData
	FextCmdMapPtr            uintptr
	Fline                    int32
	FatCmdStart              int32
	FexpandCount             int32
	F__ccgo_pad8             [4]byte
	FclNext                  uintptr
} /* tclInt.h:1367:1 */

// The data structure for a (linked list of) execution stacks.

type ExecStack1 = struct {
	F__ccgo_pad1 [0]uint64
	FprevPtr     uintptr
	FnextPtr     uintptr
	FmarkerPtr   uintptr
	FendPtr      uintptr
	FtosPtr      uintptr
} /* tclInt.h:942:9 */

// The data structure for a (linked list of) execution stacks.

type ExecStack = ExecStack1 /* tclInt.h:1413:3 */

// The data structure defining the execution environment for ByteCode's.
// There is one ExecEnv structure per Tcl interpreter. It holds the evaluation
// stack that holds command operands and results. The stack grows towards
// increasing addresses. The member stackPtr points to the stackItems of the
// currently active execution stack.

type CorContext1 = struct {
	FframePtr    uintptr
	FvarFramePtr uintptr
	FcmdFramePtr uintptr
	FlineLABCPtr uintptr
} /* tclInt.h:942:9 */

// The data structure defining the execution environment for ByteCode's.
// There is one ExecEnv structure per Tcl interpreter. It holds the evaluation
// stack that holds command operands and results. The stack grows towards
// increasing addresses. The member stackPtr points to the stackItems of the
// currently active execution stack.

type CorContext = CorContext1 /* tclInt.h:1428:3 */

type CoroutineData1 = struct {
	FcmdPtr       uintptr
	FeePtr        uintptr
	FcallerEEPtr  uintptr
	Fcaller       CorContext
	Frunning      CorContext
	FlineLABCPtr  uintptr
	FstackLevel   uintptr
	FauxNumLevels int32
	Fnargs        int32
} /* tclInt.h:942:9 */

type ExecEnv1 = struct {
	FexecStackPtr uintptr
	Fconstants    [2]uintptr
	Finterp       uintptr
	FcallbackPtr  uintptr
	FcorPtr       uintptr
	Frewind       int32
	F__ccgo_pad1  [4]byte
} /* tclInt.h:942:9 */

type CoroutineData = CoroutineData1 /* tclInt.h:1449:3 */

type NRE_callback1 = struct {
	FprocPtr uintptr
	Fdata    [4]ClientData
	FnextPtr uintptr
} /* tclInt.h:942:9 */

type ExecEnv = ExecEnv1 /* tclInt.h:1460:3 */

// The definitions for the LiteralTable and LiteralEntry structures. Each
// interpreter contains a LiteralTable. It is used to reduce the storage
// needed for all the Tcl objects that hold the literals of scripts compiled
// by the interpreter. A literal's object is shared by all the ByteCodes that
// refer to the literal. Each distinct literal has one LiteralEntry entry in
// the LiteralTable. A literal table is a specialized hash table that is
// indexed by the literal's string representation, which may contain null
// characters.
//
// Note that we reduce the space needed for literals by sharing literal
// objects both within a ByteCode (each ByteCode contains a local
// LiteralTable) and across all an interpreter's ByteCodes (with the
// interpreter's global LiteralTable).

type LiteralEntry1 = struct {
	FnextPtr     uintptr
	FobjPtr      uintptr
	FrefCount    int32
	F__ccgo_pad1 [4]byte
	FnsPtr       uintptr
} /* tclInt.h:942:9 */

// The definitions for the LiteralTable and LiteralEntry structures. Each
// interpreter contains a LiteralTable. It is used to reduce the storage
// needed for all the Tcl objects that hold the literals of scripts compiled
// by the interpreter. A literal's object is shared by all the ByteCodes that
// refer to the literal. Each distinct literal has one LiteralEntry entry in
// the LiteralTable. A literal table is a specialized hash table that is
// indexed by the literal's string representation, which may contain null
// characters.
//
// Note that we reduce the space needed for literals by sharing literal
// objects both within a ByteCode (each ByteCode contains a local
// LiteralTable) and across all an interpreter's ByteCodes (with the
// interpreter's global LiteralTable).

type LiteralEntry = LiteralEntry1 /* tclInt.h:1496:3 */

type LiteralTable1 = struct {
	Fbuckets       uintptr
	FstaticBuckets [4]uintptr
	FnumBuckets    int32
	FnumEntries    int32
	FrebuildSize   int32
	Fmask          int32
} /* tclInt.h:942:9 */

type LiteralTable = LiteralTable1 /* tclInt.h:1512:3 */

// The following structure defines for each Tcl interpreter various
// statistics-related information about the bytecode compiler and
// interpreter's operation in that interpreter.

// Structure used in implementation of those core ensembles which are
// partially compiled. Used as an array of these, with a terminating field
// whose 'name' is NULL.

type EnsembleImplMap = struct {
	Fname        uintptr
	Fproc        uintptr
	FcompileProc uintptr
	FnreProc     uintptr
	FclientData  ClientData
	Funsafe      int32
	F__ccgo_pad1 [4]byte
} /* tclInt.h:1566:3 */

//----------------------------------------------------------------
// Data structures related to commands.
//----------------------------------------------------------------

// An imported command is created in an namespace when it imports a "real"
// command from another namespace. An imported command has a Command structure
// that points (via its ClientData value) to the "real" Command structure in
// the source namespace's command table. The real command records all the
// imported commands that refer to it in a list of ImportRef structures so
// that they can be deleted when the real command is deleted.

type ImportRef1 = struct {
	FimportedCmdPtr uintptr
	FnextPtr        uintptr
} /* tclInt.h:548:9 */

//----------------------------------------------------------------
// Data structures related to commands.
//----------------------------------------------------------------

// An imported command is created in an namespace when it imports a "real"
// command from another namespace. An imported command has a Command structure
// that points (via its ClientData value) to the "real" Command structure in
// the source namespace's command table. The real command records all the
// imported commands that refer to it in a list of ImportRef structures so
// that they can be deleted when the real command is deleted.

type ImportRef = ImportRef1 /* tclInt.h:1594:3 */

// Data structure used as the ClientData of imported commands: commands
// created in an namespace when it imports a "real" command from another
// namespace.

type ImportedCmdData1 = struct {
	FrealCmdPtr uintptr
	FselfPtr    uintptr
} /* tclInt.h:1602:9 */

// Data structure used as the ClientData of imported commands: commands
// created in an namespace when it imports a "real" command from another
// namespace.

type ImportedCmdData = ImportedCmdData1 /* tclInt.h:1609:3 */

// A Command structure exists for each command in a namespace. The Tcl_Command
// opaque type actually refers to these structures.

type Command = Command1 /* tclInt.h:1659:3 */

// Flag bits for commands.
//
// CMD_IS_DELETED -		Means that the command is in the process of
//				being deleted (its deleteProc is currently
//				executing). Other attempts to delete the
//				command should be ignored.
// CMD_TRACE_ACTIVE -		1 means that trace processing is currently
//				underway for a rename/delete change. See the
//				two flags below for which is currently being
//				processed.
// CMD_HAS_EXEC_TRACES -	1 means that this command has at least one
//				execution trace (as opposed to simple
//				delete/rename traces) in its tracePtr list.
// CMD_COMPILES_EXPANDED -	1 means that this command has a compiler that
//				can handle expansion (provided it is not the
//				first word).
// TCL_TRACE_RENAME -		A rename trace is in progress. Further
//				recursive renames will not be traced.
// TCL_TRACE_DELETE -		A delete trace is in progress. Further
//				recursive deletes will not be traced.
// (these last two flags are defined in tcl.h)

//----------------------------------------------------------------
// Data structures related to name resolution procedures.
//----------------------------------------------------------------

// The interpreter keeps a linked list of name resolution schemes. The scheme
// for a namespace is consulted first, followed by the list of schemes in an
// interpreter, followed by the default name resolution in Tcl. Schemes are
// added/removed from the interpreter's list by calling Tcl_AddInterpResolver
// and Tcl_RemoveInterpResolver.

type ResolverScheme1 = struct {
	Fname               uintptr
	FcmdResProc         uintptr
	FvarResProc         uintptr
	FcompiledVarResProc uintptr
	FnextPtr            uintptr
} /* tclInt.h:942:9 */

// Flag bits for commands.
//
// CMD_IS_DELETED -		Means that the command is in the process of
//				being deleted (its deleteProc is currently
//				executing). Other attempts to delete the
//				command should be ignored.
// CMD_TRACE_ACTIVE -		1 means that trace processing is currently
//				underway for a rename/delete change. See the
//				two flags below for which is currently being
//				processed.
// CMD_HAS_EXEC_TRACES -	1 means that this command has at least one
//				execution trace (as opposed to simple
//				delete/rename traces) in its tracePtr list.
// CMD_COMPILES_EXPANDED -	1 means that this command has a compiler that
//				can handle expansion (provided it is not the
//				first word).
// TCL_TRACE_RENAME -		A rename trace is in progress. Further
//				recursive renames will not be traced.
// TCL_TRACE_DELETE -		A delete trace is in progress. Further
//				recursive deletes will not be traced.
// (these last two flags are defined in tcl.h)

//----------------------------------------------------------------
// Data structures related to name resolution procedures.
//----------------------------------------------------------------

// The interpreter keeps a linked list of name resolution schemes. The scheme
// for a namespace is consulted first, followed by the list of schemes in an
// interpreter, followed by the default name resolution in Tcl. Schemes are
// added/removed from the interpreter's list by calling Tcl_AddInterpResolver
// and Tcl_RemoveInterpResolver.

type ResolverScheme = ResolverScheme1 /* tclInt.h:1723:3 */

// Forward declaration of the TIP#143 limit handler structure.

type LimitHandler1 = struct {
	Fflags       int32
	F__ccgo_pad1 [4]byte
	FhandlerProc uintptr
	FclientData  ClientData
	FdeleteProc  uintptr
	FprevPtr     uintptr
	FnextPtr     uintptr
} /* tclInt.h:1729:9 */

//----------------------------------------------------------------
// This structure shadows the first few fields of the memory cache for the
// allocator defined in tclThreadAlloc.c; it has to be kept in sync with the
// definition there.
// Some macros require knowledge of some fields in the struct in order to
// avoid hitting the TSD unnecessarily. In order to facilitate this, a pointer
// to the relevant fields is kept in the allocCache field in struct Interp.
//----------------------------------------------------------------

type AllocCache1 = struct {
	FnextPtr     uintptr
	Fowner       Tcl_ThreadId
	FfirstObjPtr uintptr
	FnumObjects  int32
	F__ccgo_pad1 [4]byte
} /* tclInt.h:942:9 */

//----------------------------------------------------------------
// This structure shadows the first few fields of the memory cache for the
// allocator defined in tclThreadAlloc.c; it has to be kept in sync with the
// definition there.
// Some macros require knowledge of some fields in the struct in order to
// avoid hitting the TSD unnecessarily. In order to facilitate this, a pointer
// to the relevant fields is kept in the allocCache field in struct Interp.
//----------------------------------------------------------------

type AllocCache = AllocCache1 /* tclInt.h:1756:3 */

//----------------------------------------------------------------
// This structure defines an interpreter, which is a collection of commands
// plus other state information related to interpreting commands, such as
// variable storage. Primary responsibility for this data structure is in
// tclBasic.c, but almost every Tcl source file uses something in here.
//----------------------------------------------------------------

type Interp = Interp1 /* tclInt.h:2152:3 */

// Macros that use the TSD-ekeko.

// Macros for script cancellation support (TIP #285).

// Macros for splicing into and out of doubly linked lists. They assume
// existence of struct items 'prevPtr' and 'nextPtr'.
//
// a = element to add or remove.
// b = list head.
//
// TclSpliceIn adds to the head of the list.

// EvalFlag bits for Interp structures:
//
// TCL_ALLOW_EXCEPTIONS	1 means it's OK for the script to terminate with a
//			code other than TCL_OK or TCL_ERROR; 0 means codes
//			other than these should be turned into errors.

// Flag bits for Interp structures:
//
// DELETED:		Non-zero means the interpreter has been deleted:
//			don't process any more commands for it, and destroy
//			the structure as soon as all nested invocations of
//			Tcl_Eval are done.
// ERR_ALREADY_LOGGED:	Non-zero means information has already been logged in
//			iPtr->errorInfo for the current Tcl_Eval instance, so
//			Tcl_Eval needn't log it (used to implement the "error
//			message log" command).
// DONT_COMPILE_CMDS_INLINE: Non-zero means that the bytecode compiler should
//			not compile any commands into an inline sequence of
//			instructions. This is set 1, for example, when command
//			traces are requested.
// RAND_SEED_INITIALIZED: Non-zero means that the randSeed value of the interp
//			has not be initialized. This is set 1 when we first
//			use the rand() or srand() functions.
// SAFE_INTERP:		Non zero means that the current interp is a safe
//			interp (i.e. it has only the safe commands installed,
//			less privilege than a regular interp).
// INTERP_DEBUG_FRAME:	Used for switching on various extra interpreter
//			debug/info mechanisms (e.g. info frame eval/uplevel
//			tracing) which are performance intensive.
// INTERP_TRACE_IN_PROGRESS: Non-zero means that an interp trace is currently
//			active; so no further trace callbacks should be
//			invoked.
// INTERP_ALTERNATE_WRONG_ARGS: Used for listing second and subsequent forms
//			of the wrong-num-args string in Tcl_WrongNumArgs.
//			Makes it append instead of replacing and uses
//			different intermediate text.
// CANCELED:		Non-zero means that the script in progress should be
//			canceled as soon as possible. This can be checked by
//			extensions (and the core itself) by calling
//			Tcl_Canceled and checking if TCL_ERROR is returned.
//			This is a one-shot flag that is reset immediately upon
//			being detected; however, if the TCL_CANCEL_UNWIND flag
//			is set Tcl_Canceled will continue to report that the
//			script in progress has been canceled thereby allowing
//			the evaluation stack for the interp to be fully
//			unwound.
//
// WARNING: For the sake of some extensions that have made use of former
// internal values, do not re-use the flag values 2 (formerly ERR_IN_PROGRESS)
// or 8 (formerly ERROR_CODE_SET).

// Maximum number of levels of nesting permitted in Tcl commands (used to
// catch infinite recursion).

// The macro below is used to modify a "char" value (e.g. by casting it to an
// unsigned character) so that it can be used safely with macros such as
// isspace.

// This macro is used to properly align the memory allocated by Tcl, giving
// the same alignment as the native malloc.

// This macro is used to determine the offset needed to safely allocate any
// data structure in memory. Given a starting offset or size, it "rounds up"
// or "aligns" the offset to the next 8-byte boundary so that any data
// structure can be placed at the resulting offset without fear of an
// alignment error.
//
// WARNING!! DO NOT USE THIS MACRO TO ALIGN POINTERS: it will produce the
// wrong result on platforms that allocate addresses that are divisible by 4
// or 2. Only use it for offsets or sizes.
//
// This macro is only used by tclCompile.c in the core (Bug 926445). It
// however not be made file static, as extensions that touch bytecodes
// (notably tbcload) require it.

// The following enum values are used to specify the runtime platform setting
// of the tclPlatform variable.

type TclPlatformType = uint32 /* tclInt.h:2328:3 */

// The following enum values are used to indicate the translation of a Tcl
// channel. Declared here so that each platform can define
// TCL_PLATFORM_TRANSLATION to the native translation on that platform.

type TclEolTranslation = uint32 /* tclInt.h:2341:3 */

// Flags for TclInvoke:
//
// TCL_INVOKE_HIDDEN		Invoke a hidden command; if not set, invokes
//				an exposed command.
// TCL_INVOKE_NO_UNKNOWN	If set, "unknown" is not invoked if the
//				command to be invoked is not found. Only has
//				an effect if invoking an exposed command,
//				i.e. if TCL_INVOKE_HIDDEN is not also set.
// TCL_INVOKE_NO_TRACEBACK	Does not record traceback information if the
//				invoked command returns an error. Used if the
//				caller plans on recording its own traceback
//				information.

// The structure used as the internal representation of Tcl list objects. This
// struct is grown (reallocated and copied) as necessary to hold all the
// list's element pointers. The struct might contain more slots than currently
// used to hold all element pointers. This is done to make append operations
// faster.

type List1 = struct {
	FrefCount      int32
	FmaxElemCount  int32
	FelemCount     int32
	FcanonicalFlag int32
	Felements      uintptr
} /* tclInt.h:2370:9 */

// Flags for TclInvoke:
//
// TCL_INVOKE_HIDDEN		Invoke a hidden command; if not set, invokes
//				an exposed command.
// TCL_INVOKE_NO_UNKNOWN	If set, "unknown" is not invoked if the
//				command to be invoked is not found. Only has
//				an effect if invoking an exposed command,
//				i.e. if TCL_INVOKE_HIDDEN is not also set.
// TCL_INVOKE_NO_TRACEBACK	Does not record traceback information if the
//				invoked command returns an error. Used if the
//				caller plans on recording its own traceback
//				information.

// The structure used as the internal representation of Tcl list objects. This
// struct is grown (reallocated and copied) as necessary to hold all the
// list's element pointers. The struct might contain more slots than currently
// used to hold all element pointers. This is done to make append operations
// faster.

type List = List1 /* tclInt.h:2380:3 */

type TclFileAttrProcs1 = struct {
	FgetProc uintptr
	FsetProc uintptr
} /* tclInt.h:2550:9 */

type TclFileAttrProcs = TclFileAttrProcs1 /* tclInt.h:2553:3 */

// Opaque handle used in pipeline routines to encapsulate platform-dependent
// state.

type TclFile = uintptr /* tclInt.h:2560:25 */

// The "globParameters" argument of the function TclGlob is an or'ed
// combination of the following values:

type Tcl_PathPart = uint32 /* tclInt.h:2577:3 */

//----------------------------------------------------------------
// Data structures related to procedures
//----------------------------------------------------------------

type TclCmdProcType = uintptr    /* tclInt.h:2596:21 */
type TclObjCmdProcType = uintptr /* tclInt.h:2597:24 */

// A ProcessGlobalValue struct exists for each internal value in Tcl that is
// to be shared among several threads. Each thread sees a (Tcl_Obj) copy of
// the value, and the gobal value is kept as a counted string, with epoch and
// mutex control. Each ProcessGlobalValue struct should be a static variable in
// some file.

type ProcessGlobalValue1 = struct {
	Fepoch    int32
	FnumBytes int32
	Fvalue    uintptr
	Fencoding Tcl_Encoding
	Fproc     uintptr
	Fmutex    Tcl_Mutex
	Fkey      Tcl_ThreadDataKey
} /* tclInt.h:2616:9 */

// A ProcessGlobalValue struct exists for each internal value in Tcl that is
// to be shared among several threads. Each thread sees a (Tcl_Obj) copy of
// the value, and the gobal value is kept as a counted string, with epoch and
// mutex control. Each ProcessGlobalValue struct should be a static variable in
// some file.

type ProcessGlobalValue = ProcessGlobalValue1 /* tclInt.h:2631:3 */

// This structure holds the data for the various iteration callbacks used to
// NRE the 'for' and 'while' commands. We need a separate structure because we
// have more than the 4 client data entries we can provide directly thorugh
// the callback API. It is the 'word' information which puts us over the
// limit. It is needed because the loop body is argument 4 of 'for' and
// argument 2 of 'while'. Not providing the correct index confuses the #280
// code. We TclSmallAlloc/Free this.

type ForIterData1 = struct {
	Fcond        uintptr
	Fbody        uintptr
	Fnext        uintptr
	Fmsg         uintptr
	Fword        int32
	F__ccgo_pad1 [4]byte
} /* tclInt.h:2801:9 */

// This structure holds the data for the various iteration callbacks used to
// NRE the 'for' and 'while' commands. We need a separate structure because we
// have more than the 4 client data entries we can provide directly thorugh
// the callback API. It is the 'word' information which puts us over the
// limit. It is needed because the loop body is argument 4 of 'for' and
// argument 2 of 'while'. Not providing the correct index confuses the #280
// code. We TclSmallAlloc/Free this.

type ForIterData = ForIterData1 /* tclInt.h:2807:3 */

type MemCmpFn_t = uintptr /* tclInt.h:3166:13 */

//----------------------------------------------------------------
// Macro used by the Tcl core to check whether a pattern has any characters
// special to [string match]. The ANSI C "prototype" for this macro is:
//
// MODULE_SCOPE int	TclMatchIsTrivial(const char *pattern);
//----------------------------------------------------------------

//----------------------------------------------------------------
// Macros used by the Tcl core to set a Tcl_Obj's numeric representation
// avoiding the corresponding function calls in time critical parts of the
// core. They should only be called on unshared objects. The ANSI C
// "prototypes" for these macros are:
//
// MODULE_SCOPE void	TclSetIntObj(Tcl_Obj *objPtr, int intValue);
// MODULE_SCOPE void	TclSetLongObj(Tcl_Obj *objPtr, long longValue);
// MODULE_SCOPE void	TclSetBooleanObj(Tcl_Obj *objPtr, long boolValue);
// MODULE_SCOPE void	TclSetWideIntObj(Tcl_Obj *objPtr, Tcl_WideInt w);
// MODULE_SCOPE void	TclSetDoubleObj(Tcl_Obj *objPtr, double d);
//----------------------------------------------------------------

// NOTE: There is to be no such thing as a "pure" boolean. Boolean values set
// programmatically go straight to being "int" Tcl_Obj's, with value 0 or 1.
// The only "boolean" Tcl_Obj's shall be those holding the cached boolean
// value of strings like: "yes", "no", "true", "false", "on", "off".

//----------------------------------------------------------------
// Macros used by the Tcl core to create and initialise objects of standard
// types, avoiding the corresponding function calls in time critical parts of
// the core. The ANSI C "prototypes" for these macros are:
//
// MODULE_SCOPE void	TclNewIntObj(Tcl_Obj *objPtr, int i);
// MODULE_SCOPE void	TclNewLongObj(Tcl_Obj *objPtr, long l);
// MODULE_SCOPE void	TclNewBooleanObj(Tcl_Obj *objPtr, int b);
// MODULE_SCOPE void	TclNewWideObj(Tcl_Obj *objPtr, Tcl_WideInt w);
// MODULE_SCOPE void	TclNewDoubleObj(Tcl_Obj *objPtr, double d);
// MODULE_SCOPE void	TclNewStringObj(Tcl_Obj *objPtr, char *s, int len);
// MODULE_SCOPE void	TclNewLiteralStringObj(Tcl_Obj*objPtr, char*sLiteral);
//
//----------------------------------------------------------------

// NOTE: There is to be no such thing as a "pure" boolean.
// See comment above TclSetBooleanObj macro above.

// The sLiteral argument *must* be a string literal; the incantation with
// sizeof(sLiteral "") will fail to compile otherwise.

//----------------------------------------------------------------
// Convenience macros for DStrings.
// The ANSI C "prototypes" for these macros are:
//
// MODULE_SCOPE char * TclDStringAppendLiteral(Tcl_DString *dsPtr,
//			const char *sLiteral);
// MODULE_SCOPE void   TclDStringClear(Tcl_DString *dsPtr);

//----------------------------------------------------------------
// Macros used by the Tcl core to test for some special double values.
// The ANSI C "prototypes" for these macros are:
//
// MODULE_SCOPE int	TclIsInfinite(double d);
// MODULE_SCOPE int	TclIsNaN(double d);

// ----------------------------------------------------------------------
// Macro to use to find the offset of a field in a structure. Computes number
// of bytes from beginning of structure to a given field.

//----------------------------------------------------------------
// Inline version of Tcl_GetCurrentNamespace and Tcl_GetGlobalNamespace.

//----------------------------------------------------------------
// Inline version of TclCleanupCommand; still need the function as it is in
// the internal stubs, but the core can use the macro instead.

//----------------------------------------------------------------
// Inline versions of Tcl_LimitReady() and Tcl_LimitExceeded to limit number
// of calls out of the critical path. Note that this code isn't particularly
// readable; the non-inline version (in tclInterp.c) is much easier to
// understand. Note also that these macros takes different args (iPtr->limit)
// to the non-inline version.

// Compile-time assertions: these produce a compile time error if the
// expression is not known to be true at compile time. If the assertion is
// known to be false, the compiler (or optimizer?) will error out with
// "division by zero". If the assertion cannot be evaluated at compile time,
// the compiler will error out with "non-static initializer".
//
// Adapted with permission from
// http://www.pixelbeat.org/programming/gcc/static_assert.html

//----------------------------------------------------------------
// Allocator for small structs (<=sizeof(Tcl_Obj)) using the Tcl_Obj pool.
// Only checked at compile time.
//
// ONLY USE FOR CONSTANT nBytes.
//
// DO NOT LET THEM CROSS THREAD BOUNDARIES
//----------------------------------------------------------------

// Support for Clang Static Analyzer <http://clang-analyzer.llvm.org>

//----------------------------------------------------------------
// Parameters, structs and macros for the non-recursive engine (NRE)
//----------------------------------------------------------------

// This is the main data struct for representing NR commands. It is designed
// to fit in sizeof(Tcl_Obj) in order to exploit the fastest memory allocator
// available.

type NRE_callback = NRE_callback1 /* tclInt.h:4934:3 */
// 145
type AuxDataType1 = struct {
	Fname            uintptr
	FdupProc         uintptr
	FfreeProc        uintptr
	FprintProc       uintptr
	FdisassembleProc uintptr
} /* tclInt.h:1367:1 */

type TclIntStubs = TclIntStubs1 /* tclIntDecls.h:916:3 */

type TclIntPlatStubs = TclIntPlatStubs1 /* tclIntPlatDecls.h:374:3 */

// !END!: Do not edit above this line.

//----------------------------------------------------------------------
//
// tclTomMathDecls.h --
//
//	This file contains the declarations for the 'libtommath'
//	functions that are exported by the Tcl library.
//
// Copyright (c) 2005 by Kevin B. Kenny.  All rights reserved.
//
// See the file "license.terms" for information on usage and redistribution
// of this file, and for a DISCLAIMER OF ALL WARRANTIES.

// tcl.h --
//
//	This header file describes the externally-visible facilities of the
//	Tcl interpreter.
//
// Copyright (c) 1987-1994 The Regents of the University of California.
// Copyright (c) 1993-1996 Lucent Technologies.
// Copyright (c) 1994-1998 Sun Microsystems, Inc.
// Copyright (c) 1998-2000 by Scriptics Corporation.
// Copyright (c) 2002 by Kevin B. Kenny.  All rights reserved.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// MS Visual C++ doesn't have a 128bit type for words, so fall back to 32bit MPI's (where words are 64bit)

// detect 64-bit mode if possible

// some default configurations.
//
// A "mp_digit" must be able to hold MP_DIGIT_BIT + 1 bits
// A "mp_word" must be able to hold 2*MP_DIGIT_BIT + 1 bits
//
// At the very least a mp_digit must be able to hold 7 bits
// [any size beyond that is ok provided it doesn't overflow the data type]

// this is the default case, 28-bit digits

// this is to make porting into LibTomCrypt easier :-)
type Private_mp_word = uint64 /* tclTomMath.h:92:28 */

// default case is 28-bit digits, defines MP_28BIT as a handy macro to test

// otherwise the bits per digit is calculated automatically from the size of a mp_digit

// Primality generation flags

type Mp_sign = int32   /* tclTomMath.h:163:13 */
type Mp_ord = int32    /* tclTomMath.h:166:13 */
type Mp_bool = int32   /* tclTomMath.h:170:13 */
type Mp_err = int32    /* tclTomMath.h:173:13 */
type Mp_order = int32  /* tclTomMath.h:181:13 */
type Mp_endian = int32 /* tclTomMath.h:184:13 */

type TclTomMathStubs1 = struct {
	Fmagic                       int32
	F__ccgo_pad1                 [4]byte
	Fhooks                       uintptr
	FtclBN_epoch                 uintptr
	FtclBN_revision              uintptr
	FtclBN_mp_add                uintptr
	FtclBN_mp_add_d              uintptr
	FtclBN_mp_and                uintptr
	FtclBN_mp_clamp              uintptr
	FtclBN_mp_clear              uintptr
	FtclBN_mp_clear_multi        uintptr
	FtclBN_mp_cmp                uintptr
	FtclBN_mp_cmp_d              uintptr
	FtclBN_mp_cmp_mag            uintptr
	FtclBN_mp_copy               uintptr
	FtclBN_mp_count_bits         uintptr
	FtclBN_mp_div                uintptr
	FtclBN_mp_div_d              uintptr
	FtclBN_mp_div_2              uintptr
	FtclBN_mp_div_2d             uintptr
	FtclBN_mp_div_3              uintptr
	FtclBN_mp_exch               uintptr
	FtclBN_mp_expt_d             uintptr
	FtclBN_mp_grow               uintptr
	FtclBN_mp_init               uintptr
	FtclBN_mp_init_copy          uintptr
	FtclBN_mp_init_multi         uintptr
	FtclBN_mp_init_set           uintptr
	FtclBN_mp_init_size          uintptr
	FtclBN_mp_lshd               uintptr
	FtclBN_mp_mod                uintptr
	FtclBN_mp_mod_2d             uintptr
	FtclBN_mp_mul                uintptr
	FtclBN_mp_mul_d              uintptr
	FtclBN_mp_mul_2              uintptr
	FtclBN_mp_mul_2d             uintptr
	FtclBN_mp_neg                uintptr
	FtclBN_mp_or                 uintptr
	FtclBN_mp_radix_size         uintptr
	FtclBN_mp_read_radix         uintptr
	FtclBN_mp_rshd               uintptr
	FtclBN_mp_shrink             uintptr
	FtclBN_mp_set                uintptr
	FtclBN_mp_sqr                uintptr
	FtclBN_mp_sqrt               uintptr
	FtclBN_mp_sub                uintptr
	FtclBN_mp_sub_d              uintptr
	FtclBN_mp_to_unsigned_bin    uintptr
	FtclBN_mp_to_unsigned_bin_n  uintptr
	FtclBN_mp_toradix_n          uintptr
	FtclBN_mp_unsigned_bin_size  uintptr
	FtclBN_mp_xor                uintptr
	FtclBN_mp_zero               uintptr
	FtclBN_reverse               uintptr
	FtclBN_fast_s_mp_mul_digs    uintptr
	FtclBN_fast_s_mp_sqr         uintptr
	FtclBN_mp_karatsuba_mul      uintptr
	FtclBN_mp_karatsuba_sqr      uintptr
	FtclBN_mp_toom_mul           uintptr
	FtclBN_mp_toom_sqr           uintptr
	FtclBN_s_mp_add              uintptr
	FtclBN_s_mp_mul_digs         uintptr
	FtclBN_s_mp_sqr              uintptr
	FtclBN_s_mp_sub              uintptr
	FtclBN_mp_init_set_int       uintptr
	FtclBN_mp_set_int            uintptr
	FtclBN_mp_cnt_lsb            uintptr
	FtclBNInitBignumFromLong     uintptr
	FtclBNInitBignumFromWideInt  uintptr
	FtclBNInitBignumFromWideUInt uintptr
	FtclBN_mp_expt_d_ex          uintptr
	FtclBN_mp_set_ull            uintptr
	FtclBN_mp_get_mag_ull        uintptr
	FtclBN_mp_set_ll             uintptr
	Freserved71                  uintptr
	Freserved72                  uintptr
	FtclBN_mp_tc_and             uintptr
	FtclBN_mp_tc_or              uintptr
	FtclBN_mp_tc_xor             uintptr
	FtclBN_mp_signed_rsh         uintptr
	Freserved77                  uintptr
	FtclBN_mp_to_ubin            uintptr
	FtclBN_mp_div_ld             uintptr
	FtclBN_mp_to_radix           uintptr
} /* tclTomMathDecls.h:357:9 */

type TclTomMathStubs = TclTomMathStubs1 /* tclTomMathDecls.h:442:3 */ // Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// Private symbols
// ---------------
//
// On Unix symbols can be marked as hidden if libtommath is compiled
// as a shared object. By default, symbols are visible.
// As of now, this feature is opt-in via the MP_PRIVATE_SYMBOLS define.
//
// On Win32 a .def file must be used to specify the exported symbols.

// Hardening libtommath
// --------------------
//
// By default memory is zeroed before calling
// MP_FREE to avoid leaking data. This is good
// practice in cryptographical applications.
//
// Note however that memory allocators used
// in cryptographical applications can often
// be configured by itself to clear memory,
// rendering the clearing in tommath unnecessary.
// See for example https://github.com/GrapheneOS/hardened_malloc
// and the option CONFIG_ZERO_ON_FREE.
//
// Furthermore there are applications which
// value performance more and want this
// feature to be disabled. For such applications
// define MP_NO_ZERO_ON_FREE during compilation.

// Tunable cutoffs
// ---------------
//
//  - In the default settings, a cutoff X can be modified at runtime
//    by adjusting the corresponding X_CUTOFF variable.
//
//  - Tunability of the library can be disabled at compile time
//    by defining the MP_FIXED_CUTOFFS macro.
//
//  - There is an additional file tommath_cutoffs.h, which defines
//    the default cutoffs. These can be adjusted manually or by the
//    autotuner.
//

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense
//
//    Current values evaluated on an AMD A8-6600K (64-bit).
//    Type "make tune" to optimize them for your machine but
//    be aware that it may take a long time. It took 2:30 minutes
//    on the aforementioned machine for example.
//

// define heap macros

// feature detection macro

// TODO: Remove private_mp_word as soon as deprecated mp_word is removed from tommath.
type Mp_word = Private_mp_word /* tommath_private.h:154:25 */

// Static assertion

// ---> Basic Manipulations <---

// TODO: Remove PRIVATE_MP_WARRAY as soon as deprecated MP_WARRAY is removed from tommath.h

// TODO: Remove PRIVATE_MP_PREC as soon as deprecated MP_PREC is removed from tommath.h

// Minimum number of available digits in mp_int, MP_PREC >= MP_MIN_PREC

type Mp_static_assert_prec_geq_min_prec = [1]int8 /* tommath_private.h:183:1 */

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// high level addition (handles signs)
func XTclBN_mp_add(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_mp_add.c:7:8: */
	var sa Mp_sign
	var sb Mp_sign
	var err Mp_err

	// get sign of both inputs
	sa = (*Mp_int)(unsafe.Pointer(a)).Fsign
	sb = (*Mp_int)(unsafe.Pointer(b)).Fsign

	// handle two cases, not four
	if sa == sb {
		// both positive or both negative
		// add their magnitudes, copy the sign
		(*Mp_int)(unsafe.Pointer(c)).Fsign = sa
		err = XTclBN_s_mp_add(tls, a, b, c)
	} else {
		// one positive, the other negative
		// subtract the one with the greater magnitude from
		// the one of the lesser magnitude.  The result gets
		// the sign of the one with the greater magnitude.
		if XTclBN_mp_cmp_mag(tls, a, b) == -1 {
			(*Mp_int)(unsafe.Pointer(c)).Fsign = sb
			err = XTclBN_s_mp_sub(tls, b, a, c)
		} else {
			(*Mp_int)(unsafe.Pointer(c)).Fsign = sa
			err = XTclBN_s_mp_sub(tls, a, b, c)
		}
	}
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// single digit addition
func XTclBN_mp_add_d(tls *libc.TLS, a uintptr, b Mp_digit, c uintptr) Mp_err { /* bn_mp_add_d.c:7:8: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var err Mp_err
	var ix int32
	var oldused int32
	var tmpa uintptr
	var tmpc uintptr

	// grow c as required
	if (*Mp_int)(unsafe.Pointer(c)).Falloc < (*Mp_int)(unsafe.Pointer(a)).Fused+1 {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, (*Mp_int)(unsafe.Pointer(a)).Fused+1)) != MP_OKAY {
			return err
		}
	}

	// if a is negative and |a| >= b, call c = |a| - b
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG && ((*Mp_int)(unsafe.Pointer(a)).Fused > 1 || *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp)) >= b) {
		*(*Mp_int)(unsafe.Pointer(bp /* a_ */)) = *(*Mp_int)(unsafe.Pointer(a))
		// temporarily fix sign of a
		(*Mp_int)(unsafe.Pointer(bp /* &a_ */)).Fsign = MP_ZPOS

		// c = |a| - b
		err = XTclBN_mp_sub_d(tls, bp, b, c)

		// fix sign
		(*Mp_int)(unsafe.Pointer(c)).Fsign = MP_NEG

		// clamp
		XTclBN_mp_clamp(tls, c)

		return err
	}

	// old number of used digits in c
	oldused = (*Mp_int)(unsafe.Pointer(c)).Fused

	// source alias
	tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp

	// destination alias
	tmpc = (*Mp_int)(unsafe.Pointer(c)).Fdp

	// if a is positive
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_ZPOS {
		// add digits, mu is carry
		var mu Mp_digit = b
		for ix = 0; ix < (*Mp_int)(unsafe.Pointer(a)).Fused; ix++ {
			*(*Mp_digit)(unsafe.Pointer(tmpc)) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4))) + mu
			mu = *(*Mp_digit)(unsafe.Pointer(tmpc)) >> MP_DIGIT_BIT
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) &= Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
		}
		// set final carry
		ix++
		*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = mu

		// setup size
		(*Mp_int)(unsafe.Pointer(c)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused + 1
	} else {
		// a was negative and |a| < b
		(*Mp_int)(unsafe.Pointer(c)).Fused = 1

		// the result is a single digit
		if (*Mp_int)(unsafe.Pointer(a)).Fused == 1 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = b - *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp))
		} else {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = b
		}

		// setup count so the clearing of oldused
		// can fall through correctly
		ix = 1
	}

	// sign always positive
	(*Mp_int)(unsafe.Pointer(c)).Fsign = MP_ZPOS

	// now zero to oldused
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = oldused - ix
		var zm_ uintptr = tmpc
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}
	XTclBN_mp_clamp(tls, c)

	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// two complement and
func XTclBN_mp_and(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_mp_and.c:7:8: */
	var used int32 = func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused > (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}() + 1
	var i int32
	var err Mp_err
	var ac Mp_digit = Mp_digit(1)
	var bc Mp_digit = Mp_digit(1)
	var cc Mp_digit = Mp_digit(1)
	var csign Mp_sign
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG && (*Mp_int)(unsafe.Pointer(b)).Fsign == MP_NEG {
		csign = MP_NEG
	} else {
		csign = MP_ZPOS
	}

	if (*Mp_int)(unsafe.Pointer(c)).Falloc < used {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, used)) != MP_OKAY {
			return err
		}
	}

	for i = 0; i < used; i++ {
		var x Mp_digit
		var y Mp_digit

		// convert to two complement if negative
		if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG {
			ac = ac + func() uint32 {
				if i >= (*Mp_int)(unsafe.Pointer(a)).Fused {
					return Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
				}
				return ^*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(i)*4)) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			}()
			x = ac & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			ac >>= MP_DIGIT_BIT
		} else {
			if i >= (*Mp_int)(unsafe.Pointer(a)).Fused {
				x = 0
			} else {
				x = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(i)*4))
			}
		}

		// convert to two complement if negative
		if (*Mp_int)(unsafe.Pointer(b)).Fsign == MP_NEG {
			bc = bc + func() uint32 {
				if i >= (*Mp_int)(unsafe.Pointer(b)).Fused {
					return Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
				}
				return ^*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(i)*4)) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			}()
			y = bc & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			bc >>= MP_DIGIT_BIT
		} else {
			if i >= (*Mp_int)(unsafe.Pointer(b)).Fused {
				y = 0
			} else {
				y = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(i)*4))
			}
		}

		*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(i)*4)) = x & y

		// convert to to sign-magnitude if negative
		if csign == MP_NEG {
			cc = cc + ^*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(i)*4))&(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1))
			*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(i)*4)) = cc & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			cc >>= MP_DIGIT_BIT
		}
	}

	(*Mp_int)(unsafe.Pointer(c)).Fused = used
	(*Mp_int)(unsafe.Pointer(c)).Fsign = csign
	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// trim unused digits
//
// This is used to ensure that leading zero digits are
// trimed and the leading "used" digit will be non-zero
// Typically very fast.  Also fixes the sign if there
// are no more leading digits
func XTclBN_mp_clamp(tls *libc.TLS, a uintptr) { /* bn_mp_clamp.c:13:6: */
	// decrease used while the most significant digit is
	// zero.
	for (*Mp_int)(unsafe.Pointer(a)).Fused > 0 && *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(a)).Fused-1)*4)) == 0 {
		(*Mp_int)(unsafe.Pointer(a)).Fused--
	}

	// reset the sign flag if used == 0
	if (*Mp_int)(unsafe.Pointer(a)).Fused == 0 {
		(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_ZPOS
	}
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// clear one (frees)
func XTclBN_mp_clear(tls *libc.TLS, a uintptr) { /* bn_mp_clear.c:7:6: */
	// only do anything if a hasn't been freed previously
	if (*Mp_int)(unsafe.Pointer(a)).Fdp != uintptr(0) {
		// free ram
		for ok := true; ok; ok = 0 != 0 {
			var fd_ int32 = (*Mp_int)(unsafe.Pointer(a)).Falloc
			var fm_ uintptr = (*Mp_int)(unsafe.Pointer(a)).Fdp
			if fm_ != uintptr(0) {
				var fs_ Size_t = uint64(unsafe.Sizeof(Mp_digit(0))) * Size_t(fd_)
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var zs_ Size_t = fs_
					var zm_ uintptr = fm_
					for libc.PostDecUint64(&zs_, 1) > uint64(0) {
						*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 1))) = int8(0)
					}
				}
				XTclpFree(tls, fm_)
			}
		}

		// reset members to make debugging easier
		(*Mp_int)(unsafe.Pointer(a)).Fdp = uintptr(0)
		(*Mp_int)(unsafe.Pointer(a)).Falloc = libc.AssignPtrInt32(a, 0)
		(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_ZPOS
	}
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with GCC; see the file COPYING.  If not, write to
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.

// As a special exception, if you include this header file into source
//    files compiled by GCC, this header file does not by itself cause
//    the resulting executable to be covered by the GNU General Public
//    License.  This exception does not however invalidate any other
//    reasons why the executable file might be covered by the GNU General
//    Public License.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

// include mingw stuff
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Copyright (C) 1989-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

func XTclBN_mp_clear_multi(tls *libc.TLS, mp uintptr, va uintptr) { /* bn_mp_clear_multi.c:8:6: */
	var next_mp uintptr = mp
	var args Va_list
	_ = args
	args = va
	for next_mp != uintptr(0) {
		XTclBN_mp_clear(tls, next_mp)
		next_mp = libc.VaUintptr(&args)
	}
	_ = args
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// compare two ints (signed)
func XTclBN_mp_cmp(tls *libc.TLS, a uintptr, b uintptr) Mp_ord { /* bn_mp_cmp.c:7:8: */
	// compare based on sign
	if (*Mp_int)(unsafe.Pointer(a)).Fsign != (*Mp_int)(unsafe.Pointer(b)).Fsign {
		if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG {
			return -1
		} else {
			return MP_GT
		}
	}

	// compare digits
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG {
		// if negative compare opposite direction
		return XTclBN_mp_cmp_mag(tls, b, a)
	} else {
		return XTclBN_mp_cmp_mag(tls, a, b)
	}
	return Mp_ord(0)
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// compare a digit
func XTclBN_mp_cmp_d(tls *libc.TLS, a uintptr, b Mp_digit) Mp_ord { /* bn_mp_cmp_d.c:7:8: */
	// compare based on sign
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG {
		return -1
	}

	// compare based on magnitude
	if (*Mp_int)(unsafe.Pointer(a)).Fused > 1 {
		return MP_GT
	}

	// compare the only digit of a to b
	if *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp)) > b {
		return MP_GT
	} else if *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp)) < b {
		return -1
	} else {
		return MP_EQ
	}
	return Mp_ord(0)
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// compare maginitude of two ints (unsigned)
func XTclBN_mp_cmp_mag(tls *libc.TLS, a uintptr, b uintptr) Mp_ord { /* bn_mp_cmp_mag.c:7:8: */
	var n int32
	var tmpa uintptr
	var tmpb uintptr

	// compare based on # of non-zero digits
	if (*Mp_int)(unsafe.Pointer(a)).Fused > (*Mp_int)(unsafe.Pointer(b)).Fused {
		return MP_GT
	}

	if (*Mp_int)(unsafe.Pointer(a)).Fused < (*Mp_int)(unsafe.Pointer(b)).Fused {
		return -1
	}

	// alias for a
	tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(a)).Fused-1)*4

	// alias for b
	tmpb = (*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(a)).Fused-1)*4

	// compare based on digits
	n = 0
__1:
	if !(n < (*Mp_int)(unsafe.Pointer(a)).Fused) {
		goto __3
	}
	{
		if *(*Mp_digit)(unsafe.Pointer(tmpa)) > *(*Mp_digit)(unsafe.Pointer(tmpb)) {
			return MP_GT
		}

		if *(*Mp_digit)(unsafe.Pointer(tmpa)) < *(*Mp_digit)(unsafe.Pointer(tmpb)) {
			return -1
		}

	}
	goto __2
__2:
	n++
	tmpa -= 4
	tmpb -= 4
	goto __1
	goto __3
__3:
	;
	return MP_EQ
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

var lnz = [16]int32{
	4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
} /* bn_mp_cnt_lsb.c:6:18 */

// Counts the number of lsbs which are zero before the first zero bit
func XTclBN_mp_cnt_lsb(tls *libc.TLS, a uintptr) int32 { /* bn_mp_cnt_lsb.c:11:5: */
	var x int32
	var q Mp_digit
	var qq Mp_digit

	// easy out
	if (*Mp_int)(unsafe.Pointer(a)).Fused == 0 {
		return 0
	}

	// scan lower digits until non-zero
	for x = 0; x < (*Mp_int)(unsafe.Pointer(a)).Fused && *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(x)*4)) == 0; x++ {
	}
	q = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(x)*4))
	x = x * MP_DIGIT_BIT

	// now scan this digit until a 1 is found
	if q&1 == 0 {
		for ok := true; ok; ok = qq == 0 {
			qq = q & 15
			x = x + lnz[qq]
			q >>= 4
		}
	}
	return x
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// copy, b = a
func XTclBN_mp_copy(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_mp_copy.c:7:8: */
	var n int32
	var tmpa uintptr
	var tmpb uintptr
	var err Mp_err

	// if dst == src do nothing
	if a == b {
		return MP_OKAY
	}

	// grow dest
	if (*Mp_int)(unsafe.Pointer(b)).Falloc < (*Mp_int)(unsafe.Pointer(a)).Fused {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, b, (*Mp_int)(unsafe.Pointer(a)).Fused)) != MP_OKAY {
			return err
		}
	}

	// zero b and copy the parameters over
	// pointer aliases

	// source
	tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp

	// destination
	tmpb = (*Mp_int)(unsafe.Pointer(b)).Fdp

	// copy all the digits
	for n = 0; n < (*Mp_int)(unsafe.Pointer(a)).Fused; n++ {
		*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpb, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4)))
	}

	// clear high digits
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = (*Mp_int)(unsafe.Pointer(b)).Fused - n
		var zm_ uintptr = tmpb
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}

	// copy used count and sign
	(*Mp_int)(unsafe.Pointer(b)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused
	(*Mp_int)(unsafe.Pointer(b)).Fsign = (*Mp_int)(unsafe.Pointer(a)).Fsign
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// returns the number of bits in an int
func XTclBN_mp_count_bits(tls *libc.TLS, a uintptr) int32 { /* bn_mp_count_bits.c:7:5: */
	var r int32
	var q Mp_digit

	// shortcut
	if (*Mp_int)(unsafe.Pointer(a)).Fused == 0 {
		return 0
	}

	// get number of digits and add that
	r = ((*Mp_int)(unsafe.Pointer(a)).Fused - 1) * MP_DIGIT_BIT

	// take the last digit and count the bits in it
	q = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(a)).Fused-1)*4))
	for q > 0 {
		r++
		q >>= 1
	}
	return r
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// integer signed division.
// c*b + d == a [e.g. a/b, c=quotient, d=remainder]
// HAC pp.598 Algorithm 14.20
//
// Note that the description in HAC is horribly
// incomplete.  For example, it doesn't consider
// the case where digits are removed from 'x' in
// the inner loop.  It also doesn't consider the
// case that y has fewer than three digits, etc..
//
// The overall algorithm is as described as
// 14.20 from HAC but fixed to treat these cases.
func XTclBN_mp_div(tls *libc.TLS, a uintptr, b uintptr, c uintptr, d uintptr) Mp_err { /* bn_mp_div.c:86:8: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	// var q Mp_int at bp, 24

	// var x Mp_int at bp+72, 24

	// var y Mp_int at bp+96, 24

	// var t1 Mp_int at bp+24, 24

	// var t2 Mp_int at bp+48, 24

	var n int32
	var t int32
	var i int32
	var norm int32
	var neg Mp_sign
	var err Mp_err
	var tmp Mp_word

	// is divisor zero ?
	if !((*Mp_int)(unsafe.Pointer(b)).Fused == 0) {
		goto __1
	}
	return -3
__1:
	;

	// if a < b then q=0, r = a
	if !(XTclBN_mp_cmp_mag(tls, a, b) == -1) {
		goto __2
	}
	if !(d != uintptr(0)) {
		goto __3
	}
	err = XTclBN_mp_copy(tls, a, d)
	goto __4
__3:
	err = MP_OKAY
__4:
	;
	if !(c != uintptr(0)) {
		goto __5
	}
	XTclBN_mp_zero(tls, c)
__5:
	;
	return err
__2:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp, (*Mp_int)(unsafe.Pointer(a)).Fused+2)) != MP_OKAY) {
		goto __6
	}
	return err
__6:
	;
	(*Mp_int)(unsafe.Pointer(bp /* &q */)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused + 2

	if !(libc.AssignInt32(&err, XTclBN_mp_init(tls, bp+24)) != MP_OKAY) {
		goto __7
	}
	goto LBL_Q
__7:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_init(tls, bp+48)) != MP_OKAY) {
		goto __8
	}
	goto LBL_T1
__8:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_init_copy(tls, bp+72, a)) != MP_OKAY) {
		goto __9
	}
	goto LBL_T2
__9:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_init_copy(tls, bp+96, b)) != MP_OKAY) {
		goto __10
	}
	goto LBL_X
__10:
	;

	// fix the sign
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == (*Mp_int)(unsafe.Pointer(b)).Fsign {
		neg = MP_ZPOS
	} else {
		neg = MP_NEG
	}
	(*Mp_int)(unsafe.Pointer(bp + 72 /* &x */)).Fsign = libc.AssignPtrInt32(bp+96+8, MP_ZPOS)

	// normalize both x and y, ensure that y >= b/2, [b == 2**MP_DIGIT_BIT]
	norm = XTclBN_mp_count_bits(tls, bp+96) % MP_DIGIT_BIT
	if !(norm < MP_DIGIT_BIT-1) {
		goto __11
	}
	norm = MP_DIGIT_BIT - 1 - norm
	if !(libc.AssignInt32(&err, XTclBN_mp_mul_2d(tls, bp+72, norm, bp+72)) != MP_OKAY) {
		goto __13
	}
	goto LBL_Y
__13:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul_2d(tls, bp+96, norm, bp+96)) != MP_OKAY) {
		goto __14
	}
	goto LBL_Y
__14:
	;
	goto __12
__11:
	norm = 0
__12:
	;

	// note hac does 0 based, so if used==5 then its 0,1,2,3,4, e.g. use 4
	n = (*Mp_int)(unsafe.Pointer(bp+72)).Fused - 1
	t = (*Mp_int)(unsafe.Pointer(bp+96)).Fused - 1

	// while (x >= y*b**n-t) do { q[n-t] += 1; x -= y*b**{n-t} }
	// y = y*b**{n-t}
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+96, n-t)) != MP_OKAY) {
		goto __15
	}
	goto LBL_Y
__15:
	;

__16:
	if !(XTclBN_mp_cmp(tls, bp+72, bp+96) != -1) {
		goto __17
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(n-t)*4))++
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+72, bp+96, bp+72)) != MP_OKAY) {
		goto __18
	}
	goto LBL_Y
__18:
	;
	goto __16
__17:
	;

	// reset y by shifting it back down
	XTclBN_mp_rshd(tls, bp+96, n-t)

	// step 3. for i from n down to (t + 1)
	i = n
__19:
	if !(i >= t+1) {
		goto __21
	}
	if !(i > (*Mp_int)(unsafe.Pointer(bp+72)).Fused) {
		goto __22
	}
	goto __20
__22:
	;

	// step 3.1 if xi == yt then set q{i-t-1} to b-1,
	// otherwise set q{i-t-1} to (xi*b + x{i-1})/yt
	if !(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+72)).Fdp + uintptr(i)*4)) == *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+96)).Fdp + uintptr(t)*4))) {
		goto __23
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &q */)).Fdp + uintptr(i-t-1)*4)) = Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
	goto __24
__23:
	tmp = Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+72)).Fdp + uintptr(i)*4))) << uint64(MP_DIGIT_BIT)
	tmp = tmp | Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+72)).Fdp + uintptr(i-1)*4)))
	tmp = tmp / Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+96)).Fdp + uintptr(t)*4)))
	if !(tmp > uint64(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1))) {
		goto __25
	}
	tmp = uint64(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
__25:
	;
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &q */)).Fdp + uintptr(i-t-1)*4)) = Mp_digit(tmp & uint64(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1)))
__24:
	;

	// while (q{i-t-1} * (yt * b + y{t-1})) >
	//                xi * b**2 + xi-1 * b + xi-2
	//
	//          do q{i-t-1} -= 1;
	//
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &q */)).Fdp + uintptr(i-t-1)*4)) = Mp_digit((uint32(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(i-t-1)*4))) + 1) & uint32(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1)))
__26:
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &q */)).Fdp + uintptr(i-t-1)*4)) = Mp_digit((uint32(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(i-t-1)*4))) - 1) & uint32(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1)))

	// find left hand
	XTclBN_mp_zero(tls, bp+24)
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp + 24 /* &t1 */)).Fdp)) = func() uint32 {
		if t-1 < 0 {
			return 0
		}
		return *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+96 /* &y */)).Fdp + uintptr(t-1)*4))
	}()
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+24 /* &t1 */)).Fdp + 1*4)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+96 /* &y */)).Fdp + uintptr(t)*4))
	(*Mp_int)(unsafe.Pointer(bp + 24 /* &t1 */)).Fused = 2
	if !(libc.AssignInt32(&err, XTclBN_mp_mul_d(tls, bp+24, *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(i-t-1)*4)), bp+24)) != MP_OKAY) {
		goto __29
	}
	goto LBL_Y
__29:
	;

	// find right hand
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp + 48 /* &t2 */)).Fdp)) = func() uint32 {
		if i-2 < 0 {
			return 0
		}
		return *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+72 /* &x */)).Fdp + uintptr(i-2)*4))
	}()
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+48 /* &t2 */)).Fdp + 1*4)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+72 /* &x */)).Fdp + uintptr(i-1)*4)) // i >= 1 always holds
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+48 /* &t2 */)).Fdp + 2*4)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+72 /* &x */)).Fdp + uintptr(i)*4))
	(*Mp_int)(unsafe.Pointer(bp + 48 /* &t2 */)).Fused = 3
	goto __27
__27:
	if XTclBN_mp_cmp_mag(tls, bp+24, bp+48) == MP_GT {
		goto __26
	}
	goto __28
__28:
	;

	// step 3.3 x = x - q{i-t-1} * y * b**{i-t-1}
	if !(libc.AssignInt32(&err, XTclBN_mp_mul_d(tls, bp+96, *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(i-t-1)*4)), bp+24)) != MP_OKAY) {
		goto __30
	}
	goto LBL_Y
__30:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+24, i-t-1)) != MP_OKAY) {
		goto __31
	}
	goto LBL_Y
__31:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+72, bp+24, bp+72)) != MP_OKAY) {
		goto __32
	}
	goto LBL_Y
__32:
	;

	// if x < 0 then { x = x + y*b**{i-t-1}; q{i-t-1} -= 1; }
	if !((*Mp_int)(unsafe.Pointer(bp+72)).Fsign == MP_NEG) {
		goto __33
	}
	if !(libc.AssignInt32(&err, XTclBN_mp_copy(tls, bp+96, bp+24)) != MP_OKAY) {
		goto __34
	}
	goto LBL_Y
__34:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+24, i-t-1)) != MP_OKAY) {
		goto __35
	}
	goto LBL_Y
__35:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+72, bp+24, bp+72)) != MP_OKAY) {
		goto __36
	}
	goto LBL_Y
__36:
	;

	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &q */)).Fdp + uintptr(i-t-1)*4)) = Mp_digit((uint32(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(i-t-1)*4))) - 1) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)))
__33:
	;
	goto __20
__20:
	i--
	goto __19
	goto __21
__21:
	;

	// now q is the quotient and x is the remainder
	// [which we have to normalize]

	// get sign before writing to c
	(*Mp_int)(unsafe.Pointer(bp + 72 /* &x */)).Fsign = func() int32 {
		if (*Mp_int)(unsafe.Pointer(bp+72)).Fused == 0 {
			return MP_ZPOS
		}
		return (*Mp_int)(unsafe.Pointer(a)).Fsign
	}()

	if !(c != uintptr(0)) {
		goto __37
	}
	XTclBN_mp_clamp(tls, bp)
	XTclBN_mp_exch(tls, bp, c)
	(*Mp_int)(unsafe.Pointer(c)).Fsign = neg
__37:
	;

	if !(d != uintptr(0)) {
		goto __38
	}
	if !(libc.AssignInt32(&err, XTclBN_mp_div_2d(tls, bp+72, norm, bp+72, uintptr(0))) != MP_OKAY) {
		goto __39
	}
	goto LBL_Y
__39:
	;
	XTclBN_mp_exch(tls, bp+72, d)
__38:
	;

	err = MP_OKAY

LBL_Y:
	XTclBN_mp_clear(tls, bp+96)
LBL_X:
	XTclBN_mp_clear(tls, bp+72)
LBL_T2:
	XTclBN_mp_clear(tls, bp+48)
LBL_T1:
	XTclBN_mp_clear(tls, bp+24)
LBL_Q:
	XTclBN_mp_clear(tls, bp)
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// b = a/2
func XTclBN_mp_div_2(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_mp_div_2.c:7:8: */
	var x int32
	var oldused int32
	var r Mp_digit
	var rr Mp_digit
	var tmpa uintptr
	var tmpb uintptr
	var err Mp_err

	// copy
	if (*Mp_int)(unsafe.Pointer(b)).Falloc < (*Mp_int)(unsafe.Pointer(a)).Fused {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, b, (*Mp_int)(unsafe.Pointer(a)).Fused)) != MP_OKAY {
			return err
		}
	}

	oldused = (*Mp_int)(unsafe.Pointer(b)).Fused
	(*Mp_int)(unsafe.Pointer(b)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused

	// source alias
	tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(b)).Fused)*4 - uintptr(1)*4

	// dest alias
	tmpb = (*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(b)).Fused)*4 - uintptr(1)*4

	// carry
	r = Mp_digit(0)
	for x = (*Mp_int)(unsafe.Pointer(b)).Fused - 1; x >= 0; x-- {
		// get the carry for the next iteration
		rr = *(*Mp_digit)(unsafe.Pointer(tmpa)) & 1

		// shift the current digit, add in carry and store
		*(*Mp_digit)(unsafe.Pointer(libc.PostDecUintptr(&tmpb, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostDecUintptr(&tmpa, 4)))>>1 | r<<(MP_DIGIT_BIT-1)

		// forward carry to next iteration
		r = rr
	}

	// zero excess digits
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = oldused - (*Mp_int)(unsafe.Pointer(b)).Fused
		var zm_ uintptr = (*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(b)).Fused)*4
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}

	(*Mp_int)(unsafe.Pointer(b)).Fsign = (*Mp_int)(unsafe.Pointer(a)).Fsign
	XTclBN_mp_clamp(tls, b)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// shift right by a certain bit count (store quotient in c, optional remainder in d)
func XTclBN_mp_div_2d(tls *libc.TLS, a uintptr, b int32, c uintptr, d uintptr) Mp_err { /* bn_mp_div_2d.c:7:8: */
	var D Mp_digit
	var r Mp_digit
	var rr Mp_digit
	var x int32
	var err Mp_err

	// if the shift count is <= 0 then we do no work
	if b <= 0 {
		err = XTclBN_mp_copy(tls, a, c)
		if d != uintptr(0) {
			XTclBN_mp_zero(tls, d)
		}
		return err
	}

	// copy
	if libc.AssignInt32(&err, XTclBN_mp_copy(tls, a, c)) != MP_OKAY {
		return err
	}
	// 'a' should not be used after here - it might be the same as d

	// get the remainder
	if d != uintptr(0) {
		if libc.AssignInt32(&err, XTclBN_mp_mod_2d(tls, a, b, d)) != MP_OKAY {
			return err
		}
	}

	// shift by as many digits in the bit count
	if b >= MP_DIGIT_BIT {
		XTclBN_mp_rshd(tls, c, b/MP_DIGIT_BIT)
	}

	// shift any bit count < MP_DIGIT_BIT
	D = Mp_digit(b % MP_DIGIT_BIT)
	if D != 0 {
		var tmpc uintptr
		var mask Mp_digit
		var shift Mp_digit

		// mask
		mask = Mp_digit(uint32(Mp_digit(Mp_digit(1))<<D) - 1)

		// shift for lsb
		shift = Mp_digit(MP_DIGIT_BIT) - D

		// alias
		tmpc = (*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(c)).Fused-1)*4

		// carry
		r = Mp_digit(0)
		for x = (*Mp_int)(unsafe.Pointer(c)).Fused - 1; x >= 0; x-- {
			// get the lower  bits of this word in a temp
			rr = *(*Mp_digit)(unsafe.Pointer(tmpc)) & mask

			// shift the current word and mix in the carry bits from the previous word
			*(*Mp_digit)(unsafe.Pointer(tmpc)) = *(*Mp_digit)(unsafe.Pointer(tmpc))>>D | r<<shift
			tmpc -= 4

			// set the carry to the carry bits of the current word found above
			r = rr
		}
	}
	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// divide by three (based on routine from MPI and the GMP manual)
func XTclBN_mp_div_3(tls *libc.TLS, a uintptr, c uintptr, d uintptr) Mp_err { /* bn_mp_div_3.c:7:8: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var q Mp_int at bp, 24

	var w Mp_word
	var t Mp_word
	var b Mp_digit
	var err Mp_err
	var ix int32

	// b = 2**MP_DIGIT_BIT / 3
	b = uint32(Mp_word(uint64(1)) << uint64(MP_DIGIT_BIT) / uint64(3))

	if libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp, (*Mp_int)(unsafe.Pointer(a)).Fused)) != MP_OKAY {
		return err
	}

	(*Mp_int)(unsafe.Pointer(bp /* &q */)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused
	(*Mp_int)(unsafe.Pointer(bp /* &q */)).Fsign = (*Mp_int)(unsafe.Pointer(a)).Fsign
	w = uint64(0)
	for ix = (*Mp_int)(unsafe.Pointer(a)).Fused - 1; ix >= 0; ix-- {
		w = w<<uint64(MP_DIGIT_BIT) | Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(ix)*4)))

		if w >= uint64(3) {
			// multiply w by [1/3]
			t = w * Mp_word(b) >> uint64(MP_DIGIT_BIT)

			// now subtract 3 * [w/3] from w, to get the remainder
			w = w - (t + t + t)

			// fixup the remainder as required since
			// the optimization is not exact.
			for w >= uint64(3) {
				t = t + uint64(1)
				w = w - uint64(3)
			}
		} else {
			t = uint64(0)
		}
		*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &q */)).Fdp + uintptr(ix)*4)) = Mp_digit(t)
	}

	// [optional] store the remainder
	if d != uintptr(0) {
		*(*Mp_digit)(unsafe.Pointer(d)) = Mp_digit(w)
	}

	// [optional] store the quotient
	if c != uintptr(0) {
		XTclBN_mp_clamp(tls, bp)
		XTclBN_mp_exch(tls, bp, c)
	}
	XTclBN_mp_clear(tls, bp)

	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// single digit division (based on routine from MPI)
func XTclBN_mp_div_d(tls *libc.TLS, a uintptr, b Mp_digit, c uintptr, d uintptr) Mp_err { /* bn_mp_div_d.c:7:8: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var q Mp_int at bp, 24

	var w Mp_word
	var t Mp_digit
	var err Mp_err
	var ix int32

	// cannot divide by zero
	if b == 0 {
		return -3
	}

	// quick outs
	if b == 1 || (*Mp_int)(unsafe.Pointer(a)).Fused == 0 {
		if d != uintptr(0) {
			*(*Mp_digit)(unsafe.Pointer(d)) = Mp_digit(0)
		}
		if c != uintptr(0) {
			return XTclBN_mp_copy(tls, a, c)
		}
		return MP_OKAY
	}

	// power of two ?
	if b&(b-1) == 0 {
		ix = 1
		for ix < MP_DIGIT_BIT && b != Mp_digit(Mp_digit(1))<<ix {
			ix++
		}
		if d != uintptr(0) {
			*(*Mp_digit)(unsafe.Pointer(d)) = Mp_digit(uint32(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp))) & (uint32(Mp_digit(Mp_digit(1))<<Mp_digit(ix)) - 1))
		}
		if c != uintptr(0) {
			return XTclBN_mp_div_2d(tls, a, ix, c, uintptr(0))
		}
		return MP_OKAY
	}

	// three?
	if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) && b == 3 {
		return XTclBN_mp_div_3(tls, a, c, d)
	}

	// no easy answer [c'est la vie].  Just division
	if libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp, (*Mp_int)(unsafe.Pointer(a)).Fused)) != MP_OKAY {
		return err
	}

	(*Mp_int)(unsafe.Pointer(bp /* &q */)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused
	(*Mp_int)(unsafe.Pointer(bp /* &q */)).Fsign = (*Mp_int)(unsafe.Pointer(a)).Fsign
	w = uint64(0)
	for ix = (*Mp_int)(unsafe.Pointer(a)).Fused - 1; ix >= 0; ix-- {
		w = w<<uint64(MP_DIGIT_BIT) | Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(ix)*4)))

		if w >= Mp_word(b) {
			t = Mp_digit(w / Mp_word(b))
			w = w - Mp_word(t)*Mp_word(b)
		} else {
			t = Mp_digit(0)
		}
		*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &q */)).Fdp + uintptr(ix)*4)) = t
	}

	if d != uintptr(0) {
		*(*Mp_digit)(unsafe.Pointer(d)) = Mp_digit(w)
	}

	if c != uintptr(0) {
		XTclBN_mp_clamp(tls, bp)
		XTclBN_mp_exch(tls, bp, c)
	}
	XTclBN_mp_clear(tls, bp)

	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// swap the elements of two integers, for cases where you can't simply swap the
// mp_int pointers around
func XTclBN_mp_exch(tls *libc.TLS, a uintptr, b uintptr) { /* bn_mp_exch.c:9:6: */
	var t Mp_int

	t = *(*Mp_int)(unsafe.Pointer(a))
	*(*Mp_int)(unsafe.Pointer(a)) = *(*Mp_int)(unsafe.Pointer(b))
	*(*Mp_int)(unsafe.Pointer(b)) = t
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// calculate c = a**b  using a square-multiply algorithm
func XTclBN_mp_expt_d(tls *libc.TLS, a uintptr, b uint32, c uintptr) Mp_err { /* bn_mp_expt_u32.c:7:8: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var err Mp_err
	// var g Mp_int at bp, 24

	if !(libc.AssignInt32(&err, XTclBN_mp_init_copy(tls, bp, a)) != MP_OKAY) {
		goto __1
	}
	return err
__1:
	;

	// set initial result
	XTclBN_mp_set(tls, c, 1)

__2:
	if !(b > 0) {
		goto __3
	}
	// if the bit is set multiply
	if !(b&1 != 0) {
		goto __4
	}
	if !(libc.AssignInt32(&err, XTclBN_mp_mul(tls, c, bp, c)) != MP_OKAY) {
		goto __5
	}
	goto LBL_ERR
__5:
	;
__4:
	;

	// square
	if !(b > 1) {
		goto __6
	}
	if !(libc.AssignInt32(&err, XTclBN_mp_sqr(tls, bp, bp)) != MP_OKAY) {
		goto __7
	}
	goto LBL_ERR
__7:
	;
__6:
	;

	// shift to next bit
	b >>= 1
	goto __2
__3:
	;

	err = MP_OKAY

LBL_ERR:
	XTclBN_mp_clear(tls, bp)
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// grow as required
func XTclBN_mp_grow(tls *libc.TLS, a uintptr, size int32) Mp_err { /* bn_mp_grow.c:7:8: */
	var i int32
	var tmp uintptr

	// if the alloc size is smaller alloc more ram
	if (*Mp_int)(unsafe.Pointer(a)).Falloc < size {
		// reallocate the array a->dp
		//
		// We store the return in a temporary variable
		// in case the operation failed we don't want
		// to overwrite the dp member of a.
		tmp = XTcl_Realloc(tls, (*Mp_int)(unsafe.Pointer(a)).Fdp, uint32(Size_t(size)*Size_t(unsafe.Sizeof(Mp_digit(0)))))
		if tmp == uintptr(0) {
			// reallocation failed but "a" is still valid [can be freed]
			return -2
		}

		// reallocation succeeded so set a->dp
		(*Mp_int)(unsafe.Pointer(a)).Fdp = tmp

		// zero excess digits
		i = (*Mp_int)(unsafe.Pointer(a)).Falloc
		(*Mp_int)(unsafe.Pointer(a)).Falloc = size
		for ok := true; ok; ok = 0 != 0 {
			var zd_ int32 = (*Mp_int)(unsafe.Pointer(a)).Falloc - i
			var zm_ uintptr = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(i)*4
			for libc.PostDecInt32(&zd_, 1) > 0 {
				*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
			}
		}
	}
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// init a new mp_int
func XTclBN_mp_init(tls *libc.TLS, a uintptr) Mp_err { /* bn_mp_init.c:7:8: */
	// allocate memory required and clear it
	(*Mp_int)(unsafe.Pointer(a)).Fdp = libc.Xmemset(tls, XTcl_Alloc(tls, uint32(uint64(MP_PREC)*Size_t(unsafe.Sizeof(Mp_digit(0))))), 0, uint64(MP_PREC)*Size_t(unsafe.Sizeof(Mp_digit(0))))
	if (*Mp_int)(unsafe.Pointer(a)).Fdp == uintptr(0) {
		return -2
	}

	// set the used to zero, allocated digits to the default precision
	// and sign to positive
	(*Mp_int)(unsafe.Pointer(a)).Fused = 0
	(*Mp_int)(unsafe.Pointer(a)).Falloc = MP_PREC
	(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_ZPOS

	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// creates "a" then copies b into it
func XTclBN_mp_init_copy(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_mp_init_copy.c:7:8: */
	var err Mp_err

	if libc.AssignInt32(&err, XTclBN_mp_init_size(tls, a, (*Mp_int)(unsafe.Pointer(b)).Fused)) != MP_OKAY {
		return err
	}

	if libc.AssignInt32(&err, XTclBN_mp_copy(tls, b, a)) != MP_OKAY {
		XTclBN_mp_clear(tls, a)
	}

	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with GCC; see the file COPYING.  If not, write to
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.

// As a special exception, if you include this header file into source
//    files compiled by GCC, this header file does not by itself cause
//    the resulting executable to be covered by the GNU General Public
//    License.  This exception does not however invalidate any other
//    reasons why the executable file might be covered by the GNU General
//    Public License.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

// include mingw stuff
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Copyright (C) 1989-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  7.15  Variable arguments  <stdarg.h>

func XTclBN_mp_init_multi(tls *libc.TLS, mp uintptr, va uintptr) Mp_err { /* bn_mp_init_multi.c:8:8: */
	var err Mp_err = MP_OKAY // Assume ok until proven otherwise
	var n int32 = 0          // Number of ok inits
	var cur_arg uintptr = mp
	var args Va_list
	_ = args

	args = va // init args to next argument from caller
	for cur_arg != uintptr(0) {
		if XTclBN_mp_init(tls, cur_arg) != MP_OKAY {
			// Oops - error! Back-track and mp_clear what we already
			//             succeeded in init-ing, then return error.
			//
			var clean_args Va_list
			_ = clean_args

			// now start cleaning up
			cur_arg = mp
			clean_args = va
			for libc.PostDecInt32(&n, 1) != 0 {
				XTclBN_mp_clear(tls, cur_arg)
				cur_arg = libc.VaUintptr(&clean_args)
			}
			_ = clean_args
			err = -2
			break
		}
		n++
		cur_arg = libc.VaUintptr(&args)
	}
	_ = args
	return err // Assumed ok, if error flagged above.
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// initialize and set a digit
func XTclBN_mp_init_set(tls *libc.TLS, a uintptr, b Mp_digit) Mp_err { /* bn_mp_init_set.c:7:8: */
	var err Mp_err
	if libc.AssignInt32(&err, XTclBN_mp_init(tls, a)) != MP_OKAY {
		return err
	}
	XTclBN_mp_set(tls, a, b)
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// init an mp_init for a given size
func XTclBN_mp_init_size(tls *libc.TLS, a uintptr, size int32) Mp_err { /* bn_mp_init_size.c:7:8: */
	size = func() int32 {
		if (int32(uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideInt(0))))+MP_DIGIT_BIT-1)/MP_DIGIT_BIT > size {
			return (int32(uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideInt(0)))) + MP_DIGIT_BIT - 1) / MP_DIGIT_BIT
		}
		return size
	}()

	// alloc mem
	(*Mp_int)(unsafe.Pointer(a)).Fdp = libc.Xmemset(tls, XTcl_Alloc(tls, uint32(Size_t(size)*Size_t(unsafe.Sizeof(Mp_digit(0))))), 0, Size_t(size)*Size_t(unsafe.Sizeof(Mp_digit(0))))
	if (*Mp_int)(unsafe.Pointer(a)).Fdp == uintptr(0) {
		return -2
	}

	// set the members
	(*Mp_int)(unsafe.Pointer(a)).Fused = 0
	(*Mp_int)(unsafe.Pointer(a)).Falloc = size
	(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_ZPOS

	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// shift left a certain amount of digits
func XTclBN_mp_lshd(tls *libc.TLS, a uintptr, b int32) Mp_err { /* bn_mp_lshd.c:7:8: */
	var x int32
	var err Mp_err
	var top uintptr
	var bottom uintptr

	// if its less than zero return
	if b <= 0 {
		return MP_OKAY
	}
	// no need to shift 0 around
	if (*Mp_int)(unsafe.Pointer(a)).Fused == 0 {
		return MP_OKAY
	}

	// grow to fit the new digits
	if (*Mp_int)(unsafe.Pointer(a)).Falloc < (*Mp_int)(unsafe.Pointer(a)).Fused+b {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, a, (*Mp_int)(unsafe.Pointer(a)).Fused+b)) != MP_OKAY {
			return err
		}
	}

	// increment the used by the shift amount then copy upwards
	*(*int32)(unsafe.Pointer(a)) += b

	// top
	top = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(a)).Fused)*4 - uintptr(1)*4

	// base
	bottom = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(a)).Fused)*4 - uintptr(1)*4 - uintptr(b)*4

	// much like mp_rshd this is implemented using a sliding window
	// except the window goes the otherway around.  Copying from
	// the bottom to the top.  see bn_mp_rshd.c for more info.
	for x = (*Mp_int)(unsafe.Pointer(a)).Fused - 1; x >= b; x-- {
		*(*Mp_digit)(unsafe.Pointer(libc.PostDecUintptr(&top, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostDecUintptr(&bottom, 4)))
	}

	// zero the lower digits
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = b
		var zm_ uintptr = (*Mp_int)(unsafe.Pointer(a)).Fdp
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}

	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// c = a mod b, 0 <= c < b if b > 0, b < c <= 0 if b < 0
func XTclBN_mp_mod(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_mp_mod.c:7:8: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var t Mp_int at bp, 24

	var err Mp_err

	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp, (*Mp_int)(unsafe.Pointer(b)).Fused)) != MP_OKAY) {
		goto __1
	}
	return err
__1:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_div(tls, a, b, uintptr(0), bp)) != MP_OKAY) {
		goto __2
	}
	goto LBL_ERR
__2:
	;

	if !((*Mp_int)(unsafe.Pointer(bp)).Fused == 0 || (*Mp_int)(unsafe.Pointer(bp)).Fsign == (*Mp_int)(unsafe.Pointer(b)).Fsign) {
		goto __3
	}
	err = MP_OKAY
	XTclBN_mp_exch(tls, bp, c)
	goto __4
__3:
	err = XTclBN_mp_add(tls, b, bp, c)
__4:
	;

LBL_ERR:
	XTclBN_mp_clear(tls, bp)
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// calc a value mod 2**b
func XTclBN_mp_mod_2d(tls *libc.TLS, a uintptr, b int32, c uintptr) Mp_err { /* bn_mp_mod_2d.c:7:8: */
	var x int32
	var err Mp_err

	// if b is <= 0 then zero the int
	if b <= 0 {
		XTclBN_mp_zero(tls, c)
		return MP_OKAY
	}

	// if the modulus is larger than the value than return
	if b >= (*Mp_int)(unsafe.Pointer(a)).Fused*MP_DIGIT_BIT {
		return XTclBN_mp_copy(tls, a, c)
	}

	// copy
	if libc.AssignInt32(&err, XTclBN_mp_copy(tls, a, c)) != MP_OKAY {
		return err
	}

	// zero digits above the last digit of the modulus
	x = b/MP_DIGIT_BIT + func() int32 {
		if b%MP_DIGIT_BIT == 0 {
			return 0
		}
		return 1
	}()
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = (*Mp_int)(unsafe.Pointer(c)).Fused - x
		var zm_ uintptr = (*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(x)*4
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}

	// clear the digit that is not completely outside/inside the modulus
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(b/MP_DIGIT_BIT)*4)) &= Mp_digit(Mp_digit(1))<<Mp_digit(b%MP_DIGIT_BIT) - Mp_digit(1)
	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// high level multiplication (handles sign)
func XTclBN_mp_mul(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_mp_mul.c:7:8: */
	var err Mp_err
	var min_len int32 = func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused < (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}()
	var max_len int32 = func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused > (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}()
	var digs int32 = (*Mp_int)(unsafe.Pointer(a)).Fused + (*Mp_int)(unsafe.Pointer(b)).Fused + 1
	var neg Mp_sign
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == (*Mp_int)(unsafe.Pointer(b)).Fsign {
		neg = MP_ZPOS
	} else {
		neg = MP_NEG
	}

	if a == b {
		return XTclBN_mp_sqr(tls, a, c)
	} else if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) && min_len >= MP_DEFAULT_KARATSUBA_MUL_CUTOFF && max_len/2 >= MP_DEFAULT_KARATSUBA_MUL_CUTOFF && max_len >= 2*min_len {
		err = XTclBN_mp_balance_mul(tls, a, b, c)
	} else if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) && min_len >= MP_DEFAULT_TOOM_MUL_CUTOFF {
		err = XTclBN_mp_toom_mul(tls, a, b, c)
	} else if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) && min_len >= MP_DEFAULT_KARATSUBA_MUL_CUTOFF {
		err = XTclBN_mp_karatsuba_mul(tls, a, b, c)
	} else if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) && digs < int32(1)<<(uint64(8)*uint64(unsafe.Sizeof(Private_mp_word(0)))-uint64(2*MP_DIGIT_BIT)+uint64(1)) && min_len <= int32(uint32(1)<<(uint64(8)*Size_t(unsafe.Sizeof(Mp_word(0)))-uint64(2)*uint64(MP_DIGIT_BIT))) {
		err = XTclBN_fast_s_mp_mul_digs(tls, a, b, c, digs)
	} else if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) {
		err = XTclBN_s_mp_mul_digs(tls, a, b, c, digs)
	} else {
		err = -3
	}
	(*Mp_int)(unsafe.Pointer(c)).Fsign = func() int32 {
		if (*Mp_int)(unsafe.Pointer(c)).Fused > 0 {
			return neg
		}
		return MP_ZPOS
	}()
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// b = a*2
func XTclBN_mp_mul_2(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_mp_mul_2.c:7:8: */
	var x int32
	var oldused int32
	var err Mp_err

	// grow to accomodate result
	if (*Mp_int)(unsafe.Pointer(b)).Falloc < (*Mp_int)(unsafe.Pointer(a)).Fused+1 {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, b, (*Mp_int)(unsafe.Pointer(a)).Fused+1)) != MP_OKAY {
			return err
		}
	}

	oldused = (*Mp_int)(unsafe.Pointer(b)).Fused
	(*Mp_int)(unsafe.Pointer(b)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused

	{
		var r Mp_digit
		var rr Mp_digit
		var tmpa uintptr
		var tmpb uintptr

		// alias for source
		tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp

		// alias for dest
		tmpb = (*Mp_int)(unsafe.Pointer(b)).Fdp

		// carry
		r = Mp_digit(0)
		for x = 0; x < (*Mp_int)(unsafe.Pointer(a)).Fused; x++ {

			// get what will be the *next* carry bit from the
			// MSB of the current digit
			rr = *(*Mp_digit)(unsafe.Pointer(tmpa)) >> Mp_digit(MP_DIGIT_BIT-1)

			// now shift up this digit, add in the carry [from the previous]
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpb, 4))) = (*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4)))<<1 | r) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))

			// copy the carry that would be from the source
			// digit into the next iteration
			r = rr
		}

		// new leading digit?
		if r != 0 {
			// add a MSB which is always 1 at this point
			*(*Mp_digit)(unsafe.Pointer(tmpb)) = Mp_digit(1)
			(*Mp_int)(unsafe.Pointer(b)).Fused++
		}

		// now zero any excess digits on the destination
		// that we didn't write to
		for ok := true; ok; ok = 0 != 0 {
			var zd_ int32 = oldused - (*Mp_int)(unsafe.Pointer(b)).Fused
			var zm_ uintptr = (*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(b)).Fused)*4
			for libc.PostDecInt32(&zd_, 1) > 0 {
				*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
			}
		}

	}
	(*Mp_int)(unsafe.Pointer(b)).Fsign = (*Mp_int)(unsafe.Pointer(a)).Fsign
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// shift left by a certain bit count
func XTclBN_mp_mul_2d(tls *libc.TLS, a uintptr, b int32, c uintptr) Mp_err { /* bn_mp_mul_2d.c:7:8: */
	var d Mp_digit
	var err Mp_err

	// copy
	if a != c {
		if libc.AssignInt32(&err, XTclBN_mp_copy(tls, a, c)) != MP_OKAY {
			return err
		}
	}

	if (*Mp_int)(unsafe.Pointer(c)).Falloc < (*Mp_int)(unsafe.Pointer(c)).Fused+b/MP_DIGIT_BIT+1 {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, (*Mp_int)(unsafe.Pointer(c)).Fused+b/MP_DIGIT_BIT+1)) != MP_OKAY {
			return err
		}
	}

	// shift by as many digits in the bit count
	if b >= MP_DIGIT_BIT {
		if libc.AssignInt32(&err, XTclBN_mp_lshd(tls, c, b/MP_DIGIT_BIT)) != MP_OKAY {
			return err
		}
	}

	// shift any bit count < MP_DIGIT_BIT
	d = Mp_digit(b % MP_DIGIT_BIT)
	if d != 0 {
		var tmpc uintptr
		var shift Mp_digit
		var mask Mp_digit
		var r Mp_digit
		var rr Mp_digit
		var x int32

		// bitmask for carries
		mask = Mp_digit(Mp_digit(1))<<d - Mp_digit(1)

		// shift for msbs
		shift = Mp_digit(MP_DIGIT_BIT) - d

		// alias
		tmpc = (*Mp_int)(unsafe.Pointer(c)).Fdp

		// carry
		r = Mp_digit(0)
		for x = 0; x < (*Mp_int)(unsafe.Pointer(c)).Fused; x++ {
			// get the higher bits of the current word
			rr = *(*Mp_digit)(unsafe.Pointer(tmpc)) >> shift & mask

			// shift the current word and OR in the carry
			*(*Mp_digit)(unsafe.Pointer(tmpc)) = (*(*Mp_digit)(unsafe.Pointer(tmpc))<<d | r) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			tmpc += 4

			// set the carry to the carry bits of the current word
			r = rr
		}

		// set final carry
		if r != 0 {
			*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(libc.PostIncInt32(&(*Mp_int)(unsafe.Pointer(c)).Fused, 1))*4)) = r
		}
	}
	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// multiply by a digit
func XTclBN_mp_mul_d(tls *libc.TLS, a uintptr, b Mp_digit, c uintptr) Mp_err { /* bn_mp_mul_d.c:7:8: */
	var u Mp_digit
	var tmpa uintptr
	var tmpc uintptr
	var r Mp_word
	var err Mp_err
	var ix int32
	var olduse int32

	// make sure c is big enough to hold a*b
	if (*Mp_int)(unsafe.Pointer(c)).Falloc < (*Mp_int)(unsafe.Pointer(a)).Fused+1 {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, (*Mp_int)(unsafe.Pointer(a)).Fused+1)) != MP_OKAY {
			return err
		}
	}

	// get the original destinations used count
	olduse = (*Mp_int)(unsafe.Pointer(c)).Fused

	// set the sign
	(*Mp_int)(unsafe.Pointer(c)).Fsign = (*Mp_int)(unsafe.Pointer(a)).Fsign

	// alias for a->dp [source]
	tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp

	// alias for c->dp [dest]
	tmpc = (*Mp_int)(unsafe.Pointer(c)).Fdp

	// zero carry
	u = Mp_digit(0)

	// compute columns
	for ix = 0; ix < (*Mp_int)(unsafe.Pointer(a)).Fused; ix++ {
		// compute product and carry sum for this term
		r = Mp_word(u) + Mp_word(*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4))))*Mp_word(b)

		// mask off higher bits to get a single digit
		*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = Mp_digit(r & uint64(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1)))

		// send carry into next iteration
		u = Mp_digit(r >> uint64(MP_DIGIT_BIT))
	}

	// store final carry [if any] and increment ix offset
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = u
	ix++

	// now zero digits above the top
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = olduse - ix
		var zm_ uintptr = tmpc
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}

	// set used count
	(*Mp_int)(unsafe.Pointer(c)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused + 1
	XTclBN_mp_clamp(tls, c)

	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// b = -a
func XTclBN_mp_neg(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_mp_neg.c:7:8: */
	var err Mp_err
	if a != b {
		if libc.AssignInt32(&err, XTclBN_mp_copy(tls, a, b)) != MP_OKAY {
			return err
		}
	}

	if !((*Mp_int)(unsafe.Pointer(b)).Fused == 0) {
		(*Mp_int)(unsafe.Pointer(b)).Fsign = func() int32 {
			if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_ZPOS {
				return MP_NEG
			}
			return MP_ZPOS
		}()
	} else {
		(*Mp_int)(unsafe.Pointer(b)).Fsign = MP_ZPOS
	}

	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// two complement or
func XTclBN_mp_or(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_mp_or.c:7:8: */
	var used int32 = func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused > (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}() + 1
	var i int32
	var err Mp_err
	var ac Mp_digit = Mp_digit(1)
	var bc Mp_digit = Mp_digit(1)
	var cc Mp_digit = Mp_digit(1)
	var csign Mp_sign
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG || (*Mp_int)(unsafe.Pointer(b)).Fsign == MP_NEG {
		csign = MP_NEG
	} else {
		csign = MP_ZPOS
	}

	if (*Mp_int)(unsafe.Pointer(c)).Falloc < used {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, used)) != MP_OKAY {
			return err
		}
	}

	for i = 0; i < used; i++ {
		var x Mp_digit
		var y Mp_digit

		// convert to two complement if negative
		if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG {
			ac = ac + func() uint32 {
				if i >= (*Mp_int)(unsafe.Pointer(a)).Fused {
					return Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
				}
				return ^*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(i)*4)) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			}()
			x = ac & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			ac >>= MP_DIGIT_BIT
		} else {
			if i >= (*Mp_int)(unsafe.Pointer(a)).Fused {
				x = 0
			} else {
				x = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(i)*4))
			}
		}

		// convert to two complement if negative
		if (*Mp_int)(unsafe.Pointer(b)).Fsign == MP_NEG {
			bc = bc + func() uint32 {
				if i >= (*Mp_int)(unsafe.Pointer(b)).Fused {
					return Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
				}
				return ^*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(i)*4)) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			}()
			y = bc & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			bc >>= MP_DIGIT_BIT
		} else {
			if i >= (*Mp_int)(unsafe.Pointer(b)).Fused {
				y = 0
			} else {
				y = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(i)*4))
			}
		}

		*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(i)*4)) = x | y

		// convert to to sign-magnitude if negative
		if csign == MP_NEG {
			cc = cc + ^*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(i)*4))&(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1))
			*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(i)*4)) = cc & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			cc >>= MP_DIGIT_BIT
		}
	}

	(*Mp_int)(unsafe.Pointer(c)).Fused = used
	(*Mp_int)(unsafe.Pointer(c)).Fsign = csign
	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// returns size of ASCII representation
func XTclBN_mp_radix_size(tls *libc.TLS, a uintptr, radix int32, size uintptr) Mp_err { /* bn_mp_radix_size.c:7:8: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var err Mp_err
	var digs int32
	// var t Mp_int at bp, 24

	// var d Mp_digit at bp+24, 4

	*(*int32)(unsafe.Pointer(size)) = 0

	// make sure the radix is in range
	if !(radix < 2 || radix > 64) {
		goto __1
	}
	return -3
__1:
	;

	if !((*Mp_int)(unsafe.Pointer(a)).Fused == 0) {
		goto __2
	}
	*(*int32)(unsafe.Pointer(size)) = 2
	return MP_OKAY
__2:
	;

	// special case for binary
	if !(radix == 2) {
		goto __3
	}
	*(*int32)(unsafe.Pointer(size)) = XTclBN_mp_count_bits(tls, a) + func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG {
			return 1
		}
		return 0
	}() + 1
	return MP_OKAY
__3:
	;

	// digs is the digit count
	digs = 0

	// if it's negative add one for the sign
	if !((*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG) {
		goto __4
	}
	digs++
__4:
	;

	// init a copy of the input
	if !(libc.AssignInt32(&err, XTclBN_mp_init_copy(tls, bp, a)) != MP_OKAY) {
		goto __5
	}
	return err
__5:
	;

	// force temp to positive
	(*Mp_int)(unsafe.Pointer(bp /* &t */)).Fsign = MP_ZPOS

	// fetch out all of the digits
__6:
	if !!((*Mp_int)(unsafe.Pointer(bp)).Fused == 0) {
		goto __7
	}
	if !(libc.AssignInt32(&err, XTclBN_mp_div_d(tls, bp, Mp_digit(radix), bp, bp+24)) != MP_OKAY) {
		goto __8
	}
	goto LBL_ERR
__8:
	;
	digs++
	goto __6
__7:
	;

	// return digs + 1, the 1 is for the NULL byte that would be required.
	*(*int32)(unsafe.Pointer(size)) = digs + 1
	err = MP_OKAY

LBL_ERR:
	XTclBN_mp_clear(tls, bp)
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// chars used in radix conversions
var Xmp_s_rmap uintptr = ts /* "0123456789ABCDEF..." */ /* bn_mp_radix_smap.c:7:12 */
var Xmp_s_rmap_reverse = [88]uint8{
	uint8(0xff), uint8(0xff), uint8(0xff), uint8(0x3e), uint8(0xff), uint8(0xff), uint8(0xff), uint8(0x3f), // ()*+,-./
	uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), // 01234567
	uint8(0x08), uint8(0x09), uint8(0xff), uint8(0xff), uint8(0xff), uint8(0xff), uint8(0xff), uint8(0xff), // 89:;<=>?
	uint8(0xff), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x10), // @ABCDEFG
	uint8(0x11), uint8(0x12), uint8(0x13), uint8(0x14), uint8(0x15), uint8(0x16), uint8(0x17), uint8(0x18), // HIJKLMNO
	uint8(0x19), uint8(0x1a), uint8(0x1b), uint8(0x1c), uint8(0x1d), uint8(0x1e), uint8(0x1f), uint8(0x20), // PQRSTUVW
	uint8(0x21), uint8(0x22), uint8(0x23), uint8(0xff), uint8(0xff), uint8(0xff), uint8(0xff), uint8(0xff), // XYZ[\]^_
	uint8(0xff), uint8(0x24), uint8(0x25), uint8(0x26), uint8(0x27), uint8(0x28), uint8(0x29), uint8(0x2a), // `abcdefg
	uint8(0x2b), uint8(0x2c), uint8(0x2d), uint8(0x2e), uint8(0x2f), uint8(0x30), uint8(0x31), uint8(0x32), // hijklmno
	uint8(0x33), uint8(0x34), uint8(0x35), uint8(0x36), uint8(0x37), uint8(0x38), uint8(0x39), uint8(0x3a), // pqrstuvw
	uint8(0x3b), uint8(0x3c), uint8(0x3d), uint8(0xff), uint8(0xff), uint8(0xff), uint8(0xff), uint8(0xff), // xyz{|}~.
}                                                                            /* bn_mp_radix_smap.c:8:21 */
var Xmp_s_rmap_reverse_sz Size_t = Size_t(unsafe.Sizeof(Xmp_s_rmap_reverse)) /* bn_mp_radix_smap.c:21:14 */

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// read a string [ASCII] in a given radix
func XTclBN_mp_read_radix(tls *libc.TLS, a uintptr, str uintptr, radix int32) Mp_err { /* bn_mp_read_radix.c:9:8: */
	var err Mp_err
	var y int32
	var neg Mp_sign
	var pos uint32
	var ch int8

	// zero the digit bignum
	XTclBN_mp_zero(tls, a)

	// make sure the radix is ok
	if radix < 2 || radix > 64 {
		return -3
	}

	// if the leading digit is a
	// minus set the sign to negative.
	if int32(*(*int8)(unsafe.Pointer(str))) == '-' {
		str++
		neg = MP_NEG
	} else {
		neg = MP_ZPOS
	}

	// set the integer to the default of zero
	XTclBN_mp_zero(tls, a)

	// process each digit of the string
	for int32(*(*int8)(unsafe.Pointer(str))) != 0 {
		// if the radix <= 36 the conversion is case insensitive
		// this allows numbers like 1AB and 1ab to represent the same  value
		// [e.g. in hex]
		if radix <= 36 {
			ch = func() int8 {
				if int32(*(*int8)(unsafe.Pointer(str))) >= 'a' && int32(*(*int8)(unsafe.Pointer(str))) <= 'z' {
					return int8(int32(*(*int8)(unsafe.Pointer(str))) + 'A' - 'a')
				}
				return int8(int32(*(*int8)(unsafe.Pointer(str))))
			}()
		} else {
			ch = *(*int8)(unsafe.Pointer(str))
		}
		pos = uint32(int32(ch) - '(')
		if Xmp_s_rmap_reverse_sz < Size_t(pos) {
			break
		}
		y = int32(Xmp_s_rmap_reverse[pos])

		// if the char was found in the map
		// and is less than the given radix add it
		// to the number, otherwise exit the loop.
		if y == 0xff || y >= radix {
			break
		}
		if libc.AssignInt32(&err, XTclBN_mp_mul_d(tls, a, Mp_digit(radix), a)) != MP_OKAY {
			return err
		}
		if libc.AssignInt32(&err, XTclBN_mp_add_d(tls, a, Mp_digit(y), a)) != MP_OKAY {
			return err
		}
		str++
	}

	// if an illegal character was found, fail.
	if !(int32(*(*int8)(unsafe.Pointer(str))) == 0 || int32(*(*int8)(unsafe.Pointer(str))) == '\r' || int32(*(*int8)(unsafe.Pointer(str))) == '\n') {
		XTclBN_mp_zero(tls, a)
		return -3
	}

	// set the sign only if a != 0
	if !((*Mp_int)(unsafe.Pointer(a)).Fused == 0) {
		(*Mp_int)(unsafe.Pointer(a)).Fsign = neg
	}
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// shift right a certain amount of digits
func XTclBN_mp_rshd(tls *libc.TLS, a uintptr, b int32) { /* bn_mp_rshd.c:7:6: */
	var x int32
	var bottom uintptr
	var top uintptr

	// if b <= 0 then ignore it
	if b <= 0 {
		return
	}

	// if b > used then simply zero it and return
	if (*Mp_int)(unsafe.Pointer(a)).Fused <= b {
		XTclBN_mp_zero(tls, a)
		return
	}

	// shift the digits down

	// bottom
	bottom = (*Mp_int)(unsafe.Pointer(a)).Fdp

	// top [offset into digits]
	top = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(b)*4

	// this is implemented as a sliding window where
	//  the window is b-digits long and digits from
	//  the top of the window are copied to the bottom
	//
	//  e.g.
	//
	//     b-2 | b-1 | b0 | b1 | b2 | ... | bb |   ---->
	//                 /\                   |      ---->
	//                  \-------------------/      ---->
	//
	for x = 0; x < (*Mp_int)(unsafe.Pointer(a)).Fused-b; x++ {
		*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&bottom, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&top, 4)))
	}

	// zero the top digits
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = (*Mp_int)(unsafe.Pointer(a)).Fused - x
		var zm_ uintptr = bottom
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}

	// remove excess digits
	*(*int32)(unsafe.Pointer(a)) -= b
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// set to a digit
func XTclBN_mp_set(tls *libc.TLS, a uintptr, b Mp_digit) { /* bn_mp_set.c:7:6: */
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp)) = b & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
	(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_ZPOS
	(*Mp_int)(unsafe.Pointer(a)).Fused = func() int32 {
		if *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp)) != 0 {
			return 1
		}
		return 0
	}()
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = (*Mp_int)(unsafe.Pointer(a)).Falloc - (*Mp_int)(unsafe.Pointer(a)).Fused
		var zm_ uintptr = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(a)).Fused)*4
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// shrink a bignum
func XTclBN_mp_shrink(tls *libc.TLS, a uintptr) Mp_err { /* bn_mp_shrink.c:7:8: */
	var tmp uintptr
	var alloc int32 = func() int32 {
		if (int32(uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideInt(0))))+MP_DIGIT_BIT-1)/MP_DIGIT_BIT > (*Mp_int)(unsafe.Pointer(a)).Fused {
			return (int32(uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideInt(0)))) + MP_DIGIT_BIT - 1) / MP_DIGIT_BIT
		}
		return (*Mp_int)(unsafe.Pointer(a)).Fused
	}()
	if (*Mp_int)(unsafe.Pointer(a)).Falloc != alloc {
		if libc.AssignUintptr(&tmp, XTcl_Realloc(tls, (*Mp_int)(unsafe.Pointer(a)).Fdp, uint32(Size_t(alloc)*Size_t(unsafe.Sizeof(Mp_digit(0)))))) == uintptr(0) {
			return -2
		}
		(*Mp_int)(unsafe.Pointer(a)).Fdp = tmp
		(*Mp_int)(unsafe.Pointer(a)).Falloc = alloc
	}
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// shift right by a certain bit count with sign extension
func XTclBN_mp_signed_rsh(tls *libc.TLS, a uintptr, b int32, c uintptr) Mp_err { /* bn_mp_signed_rsh.c:7:8: */
	var res Mp_err
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_ZPOS {
		return XTclBN_mp_div_2d(tls, a, b, c, uintptr(0))
	}

	res = XTclBN_mp_add_d(tls, a, 1, c)
	if res != MP_OKAY {
		return res
	}

	res = XTclBN_mp_div_2d(tls, c, b, c, uintptr(0))
	if res == MP_OKAY {
		return XTclBN_mp_sub_d(tls, c, 1, c)
	}
	return res
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// computes b = a*a
func XTclBN_mp_sqr(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_mp_sqr.c:7:8: */
	var err Mp_err
	if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) && (*Mp_int)(unsafe.Pointer(a)).Fused >= MP_DEFAULT_TOOM_SQR_CUTOFF {
		err = XTclBN_mp_toom_sqr(tls, a, b)
	} else if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) && (*Mp_int)(unsafe.Pointer(a)).Fused >= MP_DEFAULT_KARATSUBA_SQR_CUTOFF {
		err = XTclBN_mp_karatsuba_sqr(tls, a, b)
	} else if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) && (*Mp_int)(unsafe.Pointer(a)).Fused*2+1 < int32(1)<<(uint64(8)*uint64(unsafe.Sizeof(Private_mp_word(0)))-uint64(2*MP_DIGIT_BIT)+uint64(1)) && (*Mp_int)(unsafe.Pointer(a)).Fused < int32(uint32(1)<<(uint64(8)*Size_t(unsafe.Sizeof(Mp_word(0)))-uint64(2)*uint64(MP_DIGIT_BIT)))/2 {
		err = XTclBN_fast_s_mp_sqr(tls, a, b)
	} else if uint64(unsafe.Sizeof([1]int8{})) == uint64(1) {
		err = XTclBN_s_mp_sqr(tls, a, b)
	} else {
		err = -3
	}
	(*Mp_int)(unsafe.Pointer(b)).Fsign = MP_ZPOS
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// Copyright (C) 2002-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  5.2.4.2.2  Characteristics of floating types <float.h>

// float.h
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within the package.
//
// Constants related to floating point arithmetic.
//
// Also included here are some non-ANSI bits for accessing the floating
// point controller.
//

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_exception = struct {
	Ftype        int32
	F__ccgo_pad1 [4]byte
	Fname        uintptr
	Farg1        float64
	Farg2        float64
	Fretval      float64
} /* math.h:15:1 */

// See also float.h

// IEEE float/double type shapes.

type X__mingw_dbl_type_t1 = struct{ Fx float64 } /* math.h:119:11 */

// See also float.h

// IEEE float/double type shapes.

type X__mingw_dbl_type_t = X__mingw_dbl_type_t1 /* math.h:125:5 */

type X__mingw_flt_type_t1 = struct{ Fx float32 } /* math.h:127:11 */

type X__mingw_flt_type_t = X__mingw_flt_type_t1 /* math.h:130:5 */

type X__mingw_ldbl_type_t1 = struct {
	Fx           float64
	F__ccgo_pad1 [8]byte
} /* math.h:132:11 */

type X__mingw_ldbl_type_t = X__mingw_ldbl_type_t1 /* math.h:141:5 */

type X_complex = struct {
	Fx float64
	Fy float64
} /* math.h:260:3 */

// Use the compiler's builtin define for FLT_EVAL_METHOD to
//    set float_t and double_t.
type Float_t = float32  /* math.h:362:15 */
type Double_t = float64 /* math.h:363:16 */

// Documentation on decimal float math
//    http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=8cf166fedd1aa110VgnVCM100000a360ea10RCRD
//

// this function is less generic than mp_n_root, simpler and faster
func XTclBN_mp_sqrt(tls *libc.TLS, arg uintptr, ret uintptr) Mp_err { /* bn_mp_sqrt.c:15:8: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var err Mp_err
	// var t1 Mp_int at bp, 24

	// var t2 Mp_int at bp+24, 24

	var i int32
	var j int32
	var k int32
	var d float64
	var dig Mp_digit

	// must be positive
	if !((*Mp_int)(unsafe.Pointer(arg)).Fsign == MP_NEG) {
		goto __1
	}
	return -3
__1:
	;

	// easy out
	if !((*Mp_int)(unsafe.Pointer(arg)).Fused == 0) {
		goto __2
	}
	XTclBN_mp_zero(tls, ret)
	return MP_OKAY
__2:
	;

	i = (*Mp_int)(unsafe.Pointer(arg)).Fused/2 - 1
	j = 2 * i
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp, i+2)) != MP_OKAY) {
		goto __3
	}
	return err
__3:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_init(tls, bp+24)) != MP_OKAY) {
		goto __4
	}
	goto E2
__4:
	;

	k = 0
__5:
	if !(k < i) {
		goto __7
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &t1 */)).Fdp + uintptr(k)*4)) = Mp_digit(0)
	goto __6
__6:
	k++
	goto __5
	goto __7
__7:
	;

	// Estimate the square root using the hardware floating point unit.

	libc.AtomicStoreFloat64(&d, float64(0.0))
	k = (*Mp_int)(unsafe.Pointer(arg)).Fused - 1
__8:
	if !(k >= j) {
		goto __10
	}
	libc.AtomicStoreFloat64(&d, float64(libc.Xldexp(tls, d, MP_DIGIT_BIT)+float64(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(arg)).Fdp + uintptr(k)*4)))))
	goto __9
__9:
	k--
	goto __8
	goto __10
__10:
	;

	// At this point, d is the nearest floating point number to the most
	// significant 1 or 2 mp_digits of arg. Extract its square root.

	libc.AtomicStoreFloat64(&d, float64(libc.Xsqrt(tls, d)))

	// dig is the most significant mp_digit of the square root

	dig = libc.Uint32FromFloat64(libc.Xldexp(tls, d, -MP_DIGIT_BIT))

	// If the most significant digit is nonzero, find the next digit down
	// by subtracting MP_DIGIT_BIT times thie most significant digit.
	// Subtract one from the result so that our initial estimate is always
	// low.

	if !(dig != 0) {
		goto __11
	}
	(*Mp_int)(unsafe.Pointer(bp /* &t1 */)).Fused = i + 2
	libc.AtomicAddFloat64(&d, -float64(libc.Xldexp(tls, float64(dig), MP_DIGIT_BIT)))
	if !(d >= 1.0) {
		goto __13
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &t1 */)).Fdp + uintptr(i+1)*4)) = dig
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &t1 */)).Fdp + uintptr(i)*4)) = Mp_digit(d) - Mp_digit(1)
	goto __14
__13:
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &t1 */)).Fdp + uintptr(i+1)*4)) = dig - Mp_digit(1)
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &t1 */)).Fdp + uintptr(i)*4)) = Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
__14:
	;
	goto __12
__11:
	(*Mp_int)(unsafe.Pointer(bp /* &t1 */)).Fused = i + 1
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &t1 */)).Fdp + uintptr(i)*4)) = Mp_digit(d) - Mp_digit(1)
__12:
	;

	// t1 > 0
	if !(libc.AssignInt32(&err, XTclBN_mp_div(tls, arg, bp, bp+24, uintptr(0))) != MP_OKAY) {
		goto __15
	}
	goto E1
__15:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp, bp+24, bp)) != MP_OKAY) {
		goto __16
	}
	goto E1
__16:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_div_2(tls, bp, bp)) != MP_OKAY) {
		goto __17
	}
	goto E1
__17:
	;
	// And now t1 > sqrt(arg)
__18:
	if !(libc.AssignInt32(&err, XTclBN_mp_div(tls, arg, bp, bp+24, uintptr(0))) != MP_OKAY) {
		goto __21
	}
	goto E1
__21:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp, bp+24, bp)) != MP_OKAY) {
		goto __22
	}
	goto E1
__22:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_div_2(tls, bp, bp)) != MP_OKAY) {
		goto __23
	}
	goto E1
__23:
	;
	// t1 >= sqrt(arg) >= t2 at this point
	goto __19
__19:
	if XTclBN_mp_cmp_mag(tls, bp, bp+24) == MP_GT {
		goto __18
	}
	goto __20
__20:
	;

	XTclBN_mp_exch(tls, bp, ret)

E1:
	XTclBN_mp_clear(tls, bp+24)
E2:
	XTclBN_mp_clear(tls, bp)
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// high level subtraction (handles signs)
func XTclBN_mp_sub(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_mp_sub.c:7:8: */
	var sa Mp_sign = (*Mp_int)(unsafe.Pointer(a)).Fsign
	var sb Mp_sign = (*Mp_int)(unsafe.Pointer(b)).Fsign
	var err Mp_err

	if sa != sb {
		// subtract a negative from a positive, OR
		// subtract a positive from a negative.
		// In either case, ADD their magnitudes,
		// and use the sign of the first number.
		(*Mp_int)(unsafe.Pointer(c)).Fsign = sa
		err = XTclBN_s_mp_add(tls, a, b, c)
	} else {
		// subtract a positive from a positive, OR
		// subtract a negative from a negative.
		// First, take the difference between their
		// magnitudes, then...
		if XTclBN_mp_cmp_mag(tls, a, b) != -1 {
			// Copy the sign from the first
			(*Mp_int)(unsafe.Pointer(c)).Fsign = sa
			// The first has a larger or equal magnitude
			err = XTclBN_s_mp_sub(tls, a, b, c)
		} else {
			// The result has the *opposite* sign from
			// the first number.
			(*Mp_int)(unsafe.Pointer(c)).Fsign = func() int32 {
				if sa == MP_ZPOS {
					return MP_NEG
				}
				return MP_ZPOS
			}()
			// The second has a larger magnitude
			err = XTclBN_s_mp_sub(tls, b, a, c)
		}
	}
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// single digit subtraction
func XTclBN_mp_sub_d(tls *libc.TLS, a uintptr, b Mp_digit, c uintptr) Mp_err { /* bn_mp_sub_d.c:7:8: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var tmpa uintptr
	var tmpc uintptr
	var err Mp_err
	var ix int32
	var oldused int32

	// grow c as required
	if (*Mp_int)(unsafe.Pointer(c)).Falloc < (*Mp_int)(unsafe.Pointer(a)).Fused+1 {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, (*Mp_int)(unsafe.Pointer(a)).Fused+1)) != MP_OKAY {
			return err
		}
	}

	// if a is negative just do an unsigned
	// addition [with fudged signs]
	if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG {
		*(*Mp_int)(unsafe.Pointer(bp /* a_ */)) = *(*Mp_int)(unsafe.Pointer(a))
		(*Mp_int)(unsafe.Pointer(bp /* &a_ */)).Fsign = MP_ZPOS
		err = XTclBN_mp_add_d(tls, bp, b, c)
		(*Mp_int)(unsafe.Pointer(c)).Fsign = MP_NEG

		// clamp
		XTclBN_mp_clamp(tls, c)

		return err
	}

	// setup regs
	oldused = (*Mp_int)(unsafe.Pointer(c)).Fused
	tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp
	tmpc = (*Mp_int)(unsafe.Pointer(c)).Fdp

	// if a <= b simply fix the single digit
	if (*Mp_int)(unsafe.Pointer(a)).Fused == 1 && *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp)) <= b || (*Mp_int)(unsafe.Pointer(a)).Fused == 0 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused == 1 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = b - *(*Mp_digit)(unsafe.Pointer(tmpa))
		} else {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = b
		}
		ix = 1

		// negative/1digit
		(*Mp_int)(unsafe.Pointer(c)).Fsign = MP_NEG
		(*Mp_int)(unsafe.Pointer(c)).Fused = 1
	} else {
		var mu Mp_digit = b

		// positive/size
		(*Mp_int)(unsafe.Pointer(c)).Fsign = MP_ZPOS
		(*Mp_int)(unsafe.Pointer(c)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused

		// subtract digits, mu is carry
		for ix = 0; ix < (*Mp_int)(unsafe.Pointer(a)).Fused; ix++ {
			*(*Mp_digit)(unsafe.Pointer(tmpc)) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4))) - mu
			mu = *(*Mp_digit)(unsafe.Pointer(tmpc)) >> (uint64(8)*Size_t(unsafe.Sizeof(Mp_digit(0))) - uint64(1))
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) &= Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
		}
	}

	// zero excess digits
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = oldused - ix
		var zm_ uintptr = tmpc
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}

	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// stores a bignum as a ASCII string in a given radix (2..64)
//
// Stores upto "size - 1" chars and always a NULL byte, puts the number of characters
// written, including the '\0', in "written".
func XTclBN_mp_to_radix(tls *libc.TLS, a uintptr, str uintptr, maxlen Size_t, written uintptr, radix int32) Mp_err { /* bn_mp_to_radix.c:11:8: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var digs Size_t
	var err Mp_err
	// var t Mp_int at bp, 24

	// var d Mp_digit at bp+24, 4

	var _s uintptr
	_s = str

	// check range of radix and size
	if !(maxlen < uint64(2)) {
		goto __1
	}
	return -5
__1:
	;
	if !(radix < 2 || radix > 64) {
		goto __2
	}
	return -3
__2:
	;

	// quick out if its zero
	if !((*Mp_int)(unsafe.Pointer(a)).Fused == 0) {
		goto __3
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) = int8('0')
	*(*int8)(unsafe.Pointer(str)) = int8(0)
	if !(written != uintptr(0)) {
		goto __4
	}
	*(*Size_t)(unsafe.Pointer(written)) = uint64(2)
__4:
	;
	return MP_OKAY
__3:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_init_copy(tls, bp, a)) != MP_OKAY) {
		goto __5
	}
	return err
__5:
	;

	// if it is negative output a -
	if !((*Mp_int)(unsafe.Pointer(bp)).Fsign == MP_NEG) {
		goto __6
	}
	// we have to reverse our digits later... but not the - sign!!
	_s++

	// store the flag and mark the number as positive
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) = int8('-')
	(*Mp_int)(unsafe.Pointer(bp /* &t */)).Fsign = MP_ZPOS

	// subtract a char
	maxlen--
__6:
	;
	digs = uint64(0)
__7:
	if !!((*Mp_int)(unsafe.Pointer(bp)).Fused == 0) {
		goto __8
	}
	if !(libc.PreDecUint64(&maxlen, 1) < uint64(1)) {
		goto __9
	}
	// no more room
	err = -5
	goto LBL_ERR
__9:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_div_d(tls, bp, Mp_digit(radix), bp, bp+24)) != MP_OKAY) {
		goto __10
	}
	goto LBL_ERR
__10:
	;
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) = *(*int8)(unsafe.Pointer(Xmp_s_rmap + uintptr(*(*Mp_digit)(unsafe.Pointer(bp + 24 /* d */)))))
	digs++
	goto __7
__8:
	;
	// reverse the digits of the string.  In this case _s points
	// to the first digit [exluding the sign] of the number
	XTclBN_s_mp_reverse(tls, _s, digs)

	// append a NULL so the string is properly terminated
	*(*int8)(unsafe.Pointer(str)) = int8(0)
	digs++

	if !(written != uintptr(0)) {
		goto __11
	}
	*(*Size_t)(unsafe.Pointer(written)) = func() uint64 {
		if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG {
			return digs + uint64(1)
		}
		return digs
	}()
__11:
	;

LBL_ERR:
	XTclBN_mp_clear(tls, bp)
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// store in unsigned [big endian] format
func XTclBN_mp_to_ubin(tls *libc.TLS, a uintptr, buf uintptr, maxlen Size_t, written uintptr) Mp_err { /* bn_mp_to_ubin.c:7:8: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var x Size_t
	var count Size_t
	var err Mp_err
	// var t Mp_int at bp, 24

	var size Size_t
	size = Size_t(XTclBN_mp_count_bits(tls, a))
	count = size/uint64(8) + func() uint64 {
		if size&uint64(7) != uint64(0) {
			return uint64(1)
		}
		return uint64(0)
	}()
	if !(count > maxlen) {
		goto __1
	}
	return -5
__1:
	;

	if !(libc.AssignInt32(&err, XTclBN_mp_init_copy(tls, bp, a)) != MP_OKAY) {
		goto __2
	}
	return err
__2:
	;

	x = count
__3:
	if !(libc.PostDecUint64(&x, 1) > uint64(0)) {
		goto __5
	}
	*(*uint8)(unsafe.Pointer(buf + uintptr(x))) = uint8(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp)) & 255)
	if !(libc.AssignInt32(&err, XTclBN_mp_div_2d(tls, bp, 8, bp, uintptr(0))) != MP_OKAY) {
		goto __6
	}
	goto LBL_ERR
__6:
	;
	goto __4
__4:
	;
	goto __3
	goto __5
__5:
	;

	if !(written != uintptr(0)) {
		goto __7
	}
	*(*Size_t)(unsafe.Pointer(written)) = count
__7:
	;

LBL_ERR:
	XTclBN_mp_clear(tls, bp)
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// get the size for an unsigned equivalent
func XTclBN_mp_unsigned_bin_size(tls *libc.TLS, a uintptr) Size_t { /* bn_mp_ubin_size.c:7:8: */
	var size Size_t = Size_t(XTclBN_mp_count_bits(tls, a))
	return size/uint64(8) + func() uint64 {
		if size&uint64(7) != uint64(0) {
			return uint64(1)
		}
		return uint64(0)
	}()
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// two complement xor
func XTclBN_mp_xor(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_mp_xor.c:7:8: */
	var used int32 = func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused > (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}() + 1
	var i int32
	var err Mp_err
	var ac Mp_digit = Mp_digit(1)
	var bc Mp_digit = Mp_digit(1)
	var cc Mp_digit = Mp_digit(1)
	var csign Mp_sign
	if (*Mp_int)(unsafe.Pointer(a)).Fsign != (*Mp_int)(unsafe.Pointer(b)).Fsign {
		csign = MP_NEG
	} else {
		csign = MP_ZPOS
	}

	if (*Mp_int)(unsafe.Pointer(c)).Falloc < used {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, used)) != MP_OKAY {
			return err
		}
	}

	for i = 0; i < used; i++ {
		var x Mp_digit
		var y Mp_digit

		// convert to two complement if negative
		if (*Mp_int)(unsafe.Pointer(a)).Fsign == MP_NEG {
			ac = ac + func() uint32 {
				if i >= (*Mp_int)(unsafe.Pointer(a)).Fused {
					return Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
				}
				return ^*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(i)*4)) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			}()
			x = ac & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			ac >>= MP_DIGIT_BIT
		} else {
			if i >= (*Mp_int)(unsafe.Pointer(a)).Fused {
				x = 0
			} else {
				x = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(i)*4))
			}
		}

		// convert to two complement if negative
		if (*Mp_int)(unsafe.Pointer(b)).Fsign == MP_NEG {
			bc = bc + func() uint32 {
				if i >= (*Mp_int)(unsafe.Pointer(b)).Fused {
					return Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
				}
				return ^*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(i)*4)) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			}()
			y = bc & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			bc >>= MP_DIGIT_BIT
		} else {
			if i >= (*Mp_int)(unsafe.Pointer(b)).Fused {
				y = 0
			} else {
				y = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(i)*4))
			}
		}

		*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(i)*4)) = x ^ y

		// convert to to sign-magnitude if negative
		if csign == MP_NEG {
			cc = cc + ^*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(i)*4))&(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1))
			*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(c)).Fdp + uintptr(i)*4)) = cc & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
			cc >>= MP_DIGIT_BIT
		}
	}

	(*Mp_int)(unsafe.Pointer(c)).Fused = used
	(*Mp_int)(unsafe.Pointer(c)).Fsign = csign
	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// set to zero
func XTclBN_mp_zero(tls *libc.TLS, a uintptr) { /* bn_mp_zero.c:7:6: */
	(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_ZPOS
	(*Mp_int)(unsafe.Pointer(a)).Fused = 0
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = (*Mp_int)(unsafe.Pointer(a)).Falloc
		var zm_ uintptr = (*Mp_int)(unsafe.Pointer(a)).Fdp
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// low level addition, based on HAC pp.594, Algorithm 14.7
func XTclBN_s_mp_add(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_s_mp_add.c:7:8: */
	var x uintptr
	var err Mp_err
	var olduse int32
	var min int32
	var max int32

	// find sizes, we let |a| <= |b| which means we have to sort
	// them.  "x" will point to the input with the most digits
	if (*Mp_int)(unsafe.Pointer(a)).Fused > (*Mp_int)(unsafe.Pointer(b)).Fused {
		min = (*Mp_int)(unsafe.Pointer(b)).Fused
		max = (*Mp_int)(unsafe.Pointer(a)).Fused
		x = a
	} else {
		min = (*Mp_int)(unsafe.Pointer(a)).Fused
		max = (*Mp_int)(unsafe.Pointer(b)).Fused
		x = b
	}

	// init result
	if (*Mp_int)(unsafe.Pointer(c)).Falloc < max+1 {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, max+1)) != MP_OKAY {
			return err
		}
	}

	// get old used digit count and set new one
	olduse = (*Mp_int)(unsafe.Pointer(c)).Fused
	(*Mp_int)(unsafe.Pointer(c)).Fused = max + 1

	{
		var u Mp_digit
		var tmpa uintptr
		var tmpb uintptr
		var tmpc uintptr
		var i int32

		// alias for digit pointers

		// first input
		tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp

		// second input
		tmpb = (*Mp_int)(unsafe.Pointer(b)).Fdp

		// destination
		tmpc = (*Mp_int)(unsafe.Pointer(c)).Fdp

		// zero the carry
		u = Mp_digit(0)
		for i = 0; i < min; i++ {
			// Compute the sum at one digit, T[i] = A[i] + B[i] + U
			*(*Mp_digit)(unsafe.Pointer(tmpc)) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4))) + *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpb, 4))) + u

			// U = carry bit of T[i]
			u = *(*Mp_digit)(unsafe.Pointer(tmpc)) >> Mp_digit(MP_DIGIT_BIT)

			// take away carry bit from T[i]
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) &= Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
		}

		// now copy higher words if any, that is in A+B
		// if A or B has more digits add those in
		if min != max {
			for ; i < max; i++ {
				// T[i] = X[i] + U
				*(*Mp_digit)(unsafe.Pointer(tmpc)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(x)).Fdp + uintptr(i)*4)) + u

				// U = carry bit of T[i]
				u = *(*Mp_digit)(unsafe.Pointer(tmpc)) >> Mp_digit(MP_DIGIT_BIT)

				// take away carry bit from T[i]
				*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) &= Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
			}
		}

		// add carry
		*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = u

		// clear digits above oldused
		for ok := true; ok; ok = 0 != 0 {
			var zd_ int32 = olduse - (*Mp_int)(unsafe.Pointer(c)).Fused
			var zm_ uintptr = tmpc
			for libc.PostDecInt32(&zd_, 1) > 0 {
				*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
			}
		}

	}

	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// single-digit multiplication with the smaller number as the single-digit
func XTclBN_mp_balance_mul(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_s_mp_balance_mul.c:7:8: */
	bp := tls.Alloc(136)
	defer tls.Free(136)

	var count int32
	var len_a int32
	var len_b int32
	var nblocks int32
	var i int32
	var j int32
	var bsize int32
	// var a0 Mp_int at bp+40, 24

	// var tmp Mp_int at bp+64, 24

	var A Mp_int
	// var B Mp_int at bp+112, 24

	// var r Mp_int at bp+88, 24

	var err Mp_err

	len_a = (*Mp_int)(unsafe.Pointer(a)).Fused
	len_b = (*Mp_int)(unsafe.Pointer(b)).Fused

	nblocks = func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused > (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}() / func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused < (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}()
	bsize = func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused < (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}()

	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+40, bsize+2)) != MP_OKAY) {
		goto __1
	}
	return err
__1:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_init_multi(tls, bp+64, libc.VaList(bp, bp+88, uintptr(0)))) != MP_OKAY) {
		goto __2
	}
	XTclBN_mp_clear(tls, bp+40)
	return err
__2:
	;

	// Make sure that A is the larger one
	if !(len_a < len_b) {
		goto __3
	}
	*(*Mp_int)(unsafe.Pointer(bp + 112 /* B */)) = *(*Mp_int)(unsafe.Pointer(a))
	A = *(*Mp_int)(unsafe.Pointer(b))
	goto __4
__3:
	A = *(*Mp_int)(unsafe.Pointer(a))
	*(*Mp_int)(unsafe.Pointer(bp + 112 /* B */)) = *(*Mp_int)(unsafe.Pointer(b))
__4:
	;

	i = 0
	j = 0
__5:
	if !(i < nblocks) {
		goto __7
	}
	// Cut a slice off of a
	(*Mp_int)(unsafe.Pointer(bp + 40 /* &a0 */)).Fused = 0
	count = 0
__8:
	if !(count < bsize) {
		goto __10
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+40 /* &a0 */)).Fdp + uintptr(count)*4)) = *(*Mp_digit)(unsafe.Pointer(A.Fdp + uintptr(libc.PostIncInt32(&j, 1))*4))
	(*Mp_int)(unsafe.Pointer(bp+40 /* &a0 */)).Fused++
	goto __9
__9:
	count++
	goto __8
	goto __10
__10:
	;
	XTclBN_mp_clamp(tls, bp+40)
	// Multiply with b
	if !(libc.AssignInt32(&err, XTclBN_mp_mul(tls, bp+40, bp+112, bp+64)) != MP_OKAY) {
		goto __11
	}
	goto LBL_ERR
__11:
	;
	// Shift tmp to the correct position
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+64, bsize*i)) != MP_OKAY) {
		goto __12
	}
	goto LBL_ERR
__12:
	;
	// Add to output. No carry needed
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+88, bp+64, bp+88)) != MP_OKAY) {
		goto __13
	}
	goto LBL_ERR
__13:
	;
	goto __6
__6:
	i++
	goto __5
	goto __7
__7:
	;
	// The left-overs; there are always left-overs
	if !(j < A.Fused) {
		goto __14
	}
	(*Mp_int)(unsafe.Pointer(bp + 40 /* &a0 */)).Fused = 0
	count = 0
__15:
	if !(j < A.Fused) {
		goto __17
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+40 /* &a0 */)).Fdp + uintptr(count)*4)) = *(*Mp_digit)(unsafe.Pointer(A.Fdp + uintptr(libc.PostIncInt32(&j, 1))*4))
	(*Mp_int)(unsafe.Pointer(bp+40 /* &a0 */)).Fused++
	goto __16
__16:
	count++
	goto __15
	goto __17
__17:
	;
	XTclBN_mp_clamp(tls, bp+40)
	if !(libc.AssignInt32(&err, XTclBN_mp_mul(tls, bp+40, bp+112, bp+64)) != MP_OKAY) {
		goto __18
	}
	goto LBL_ERR
__18:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+64, bsize*i)) != MP_OKAY) {
		goto __19
	}
	goto LBL_ERR
__19:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+88, bp+64, bp+88)) != MP_OKAY) {
		goto __20
	}
	goto LBL_ERR
__20:
	;
__14:
	;

	XTclBN_mp_exch(tls, bp+88, c)
LBL_ERR:
	XTclBN_mp_clear_multi(tls, bp+40, libc.VaList(bp+16, bp+64, bp+88, uintptr(0)))
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// c = |a| * |b| using Karatsuba Multiplication using
//  three half size multiplications
//
//  Let B represent the radix [e.g. 2**MP_DIGIT_BIT] and
//  let n represent half of the number of digits in
//  the min(a,b)
//
//  a = a1 * B**n + a0
//  b = b1 * B**n + b0
//
//  Then, a * b =>
//    a1b1 * B**2n + ((a1 + a0)(b1 + b0) - (a0b0 + a1b1)) * B + a0b0
//  *
//  * Note that a1b1 and a0b0 are used twice and only need to be
//  * computed once.  So in total three half size (half # of
//  * digit) multiplications are performed, a0b0, a1b1 and
//  * (a1+b1)(a0+b0)
//  *
//  * Note that a multiplication of half the digits requires
//  * 1/4th the number of single precision multiplications so in
//  * total after one call 25% of the single precision multiplications
//  * are saved.  Note also that the call to mp_mul can end up back
//  * in this function if the a0, a1, b0, or b1 are above the threshold.
//  * This is known as divide-and-conquer and leads to the famous
//  * O(N**lg(3)) or O(N**1.584) work which is asymptopically lower than
//  * the standard O(N**2) that the baseline/comba methods use.
//  * Generally though the overhead of this method doesn't pay off
//  * until a certain size (N ~ 80) is reached.
//
func XTclBN_mp_karatsuba_mul(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_s_mp_karatsuba_mul.c:35:8: */
	bp := tls.Alloc(168)
	defer tls.Free(168)

	// var x0 Mp_int at bp, 24

	// var x1 Mp_int at bp+24, 24

	// var y0 Mp_int at bp+48, 24

	// var y1 Mp_int at bp+72, 24

	// var t1 Mp_int at bp+96, 24

	// var x0y0 Mp_int at bp+120, 24

	// var x1y1 Mp_int at bp+144, 24

	var B int32
	var err Mp_err
	var x int32
	var tmpa uintptr
	var tmpb uintptr
	var tmpx uintptr
	var tmpy uintptr
	err = -2 // default the return code to an error

	// min # of digits
	B = func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused < (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}()

	// now divide in two
	B = B >> 1

	// init copy all the temps
	if !(XTclBN_mp_init_size(tls, bp, B) != MP_OKAY) {
		goto __1
	}
	goto LBL_ERR
__1:
	;
	if !(XTclBN_mp_init_size(tls, bp+24, (*Mp_int)(unsafe.Pointer(a)).Fused-B) != MP_OKAY) {
		goto __2
	}
	goto X0
__2:
	;
	if !(XTclBN_mp_init_size(tls, bp+48, B) != MP_OKAY) {
		goto __3
	}
	goto X1
__3:
	;
	if !(XTclBN_mp_init_size(tls, bp+72, (*Mp_int)(unsafe.Pointer(b)).Fused-B) != MP_OKAY) {
		goto __4
	}
	goto Y0
__4:
	;

	// init temps
	if !(XTclBN_mp_init_size(tls, bp+96, B*2) != MP_OKAY) {
		goto __5
	}
	goto Y1
__5:
	;
	if !(XTclBN_mp_init_size(tls, bp+120, B*2) != MP_OKAY) {
		goto __6
	}
	goto T1
__6:
	;
	if !(XTclBN_mp_init_size(tls, bp+144, B*2) != MP_OKAY) {
		goto __7
	}
	goto X0Y0
__7:
	;

	// now shift the digits
	(*Mp_int)(unsafe.Pointer(bp /* &x0 */)).Fused = libc.AssignPtrInt32(bp+48, B)
	(*Mp_int)(unsafe.Pointer(bp + 24 /* &x1 */)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused - B
	(*Mp_int)(unsafe.Pointer(bp + 72 /* &y1 */)).Fused = (*Mp_int)(unsafe.Pointer(b)).Fused - B

	// we copy the digits directly instead of using higher level functions
	// since we also need to shift the digits
	tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp
	tmpb = (*Mp_int)(unsafe.Pointer(b)).Fdp

	tmpx = (*Mp_int)(unsafe.Pointer(bp /* &x0 */)).Fdp
	tmpy = (*Mp_int)(unsafe.Pointer(bp + 48 /* &y0 */)).Fdp
	x = 0
__8:
	if !(x < B) {
		goto __10
	}
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpx, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4)))
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpy, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpb, 4)))
	goto __9
__9:
	x++
	goto __8
	goto __10
__10:
	;

	tmpx = (*Mp_int)(unsafe.Pointer(bp + 24 /* &x1 */)).Fdp
	x = B
__11:
	if !(x < (*Mp_int)(unsafe.Pointer(a)).Fused) {
		goto __13
	}
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpx, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4)))
	goto __12
__12:
	x++
	goto __11
	goto __13
__13:
	;

	tmpy = (*Mp_int)(unsafe.Pointer(bp + 72 /* &y1 */)).Fdp
	x = B
__14:
	if !(x < (*Mp_int)(unsafe.Pointer(b)).Fused) {
		goto __16
	}
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpy, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpb, 4)))
	goto __15
__15:
	x++
	goto __14
	goto __16
__16:
	;

	// only need to clamp the lower words since by definition the
	// upper words x1/y1 must have a known number of digits
	XTclBN_mp_clamp(tls, bp)
	XTclBN_mp_clamp(tls, bp+48)

	// now calc the products x0y0 and x1y1
	// after this x0 is no longer required, free temp [x0==t2]!
	if !(XTclBN_mp_mul(tls, bp, bp+48, bp+120) != MP_OKAY) {
		goto __17
	}
	goto X1Y1 // x0y0 = x0*y0
__17:
	;
	if !(XTclBN_mp_mul(tls, bp+24, bp+72, bp+144) != MP_OKAY) {
		goto __18
	}
	goto X1Y1 // x1y1 = x1*y1
__18:
	;

	// now calc x1+x0 and y1+y0
	if !(XTclBN_s_mp_add(tls, bp+24, bp, bp+96) != MP_OKAY) {
		goto __19
	}
	goto X1Y1 // t1 = x1 - x0
__19:
	;
	if !(XTclBN_s_mp_add(tls, bp+72, bp+48, bp) != MP_OKAY) {
		goto __20
	}
	goto X1Y1 // t2 = y1 - y0
__20:
	;
	if !(XTclBN_mp_mul(tls, bp+96, bp, bp+96) != MP_OKAY) {
		goto __21
	}
	goto X1Y1 // t1 = (x1 + x0) * (y1 + y0)
__21:
	;

	// add x0y0
	if !(XTclBN_mp_add(tls, bp+120, bp+144, bp) != MP_OKAY) {
		goto __22
	}
	goto X1Y1 // t2 = x0y0 + x1y1
__22:
	;
	if !(XTclBN_s_mp_sub(tls, bp+96, bp, bp+96) != MP_OKAY) {
		goto __23
	}
	goto X1Y1 // t1 = (x1+x0)*(y1+y0) - (x1y1 + x0y0)
__23:
	;

	// shift by B
	if !(XTclBN_mp_lshd(tls, bp+96, B) != MP_OKAY) {
		goto __24
	}
	goto X1Y1 // t1 = (x0y0 + x1y1 - (x1-x0)*(y1-y0))<<B
__24:
	;
	if !(XTclBN_mp_lshd(tls, bp+144, B*2) != MP_OKAY) {
		goto __25
	}
	goto X1Y1 // x1y1 = x1y1 << 2*B
__25:
	;

	if !(XTclBN_mp_add(tls, bp+120, bp+96, bp+96) != MP_OKAY) {
		goto __26
	}
	goto X1Y1 // t1 = x0y0 + t1
__26:
	;
	if !(XTclBN_mp_add(tls, bp+96, bp+144, c) != MP_OKAY) {
		goto __27
	}
	goto X1Y1 // t1 = x0y0 + t1 + x1y1
__27:
	;

	// Algorithm succeeded set the return code to MP_OKAY
	err = MP_OKAY

X1Y1:
	XTclBN_mp_clear(tls, bp+144)
X0Y0:
	XTclBN_mp_clear(tls, bp+120)
T1:
	XTclBN_mp_clear(tls, bp+96)
Y1:
	XTclBN_mp_clear(tls, bp+72)
Y0:
	XTclBN_mp_clear(tls, bp+48)
X1:
	XTclBN_mp_clear(tls, bp+24)
X0:
	XTclBN_mp_clear(tls, bp)
LBL_ERR:
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// Karatsuba squaring, computes b = a*a using three
// half size squarings
//
// See comments of karatsuba_mul for details.  It
// is essentially the same algorithm but merely
// tuned to perform recursive squarings.
func XTclBN_mp_karatsuba_sqr(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_s_mp_karatsuba_sqr.c:13:8: */
	bp := tls.Alloc(144)
	defer tls.Free(144)

	// var x0 Mp_int at bp, 24

	// var x1 Mp_int at bp+24, 24

	// var t1 Mp_int at bp+48, 24

	// var t2 Mp_int at bp+72, 24

	// var x0x0 Mp_int at bp+96, 24

	// var x1x1 Mp_int at bp+120, 24

	var B int32
	var err Mp_err
	var x int32
	var dst uintptr
	var src uintptr
	err = -2

	// min # of digits
	B = (*Mp_int)(unsafe.Pointer(a)).Fused

	// now divide in two
	B = B >> 1

	// init copy all the temps
	if !(XTclBN_mp_init_size(tls, bp, B) != MP_OKAY) {
		goto __1
	}
	goto LBL_ERR
__1:
	;
	if !(XTclBN_mp_init_size(tls, bp+24, (*Mp_int)(unsafe.Pointer(a)).Fused-B) != MP_OKAY) {
		goto __2
	}
	goto X0
__2:
	;

	// init temps
	if !(XTclBN_mp_init_size(tls, bp+48, (*Mp_int)(unsafe.Pointer(a)).Fused*2) != MP_OKAY) {
		goto __3
	}
	goto X1
__3:
	;
	if !(XTclBN_mp_init_size(tls, bp+72, (*Mp_int)(unsafe.Pointer(a)).Fused*2) != MP_OKAY) {
		goto __4
	}
	goto T1
__4:
	;
	if !(XTclBN_mp_init_size(tls, bp+96, B*2) != MP_OKAY) {
		goto __5
	}
	goto T2
__5:
	;
	if !(XTclBN_mp_init_size(tls, bp+120, ((*Mp_int)(unsafe.Pointer(a)).Fused-B)*2) != MP_OKAY) {
		goto __6
	}
	goto X0X0
__6:
	;

	src = (*Mp_int)(unsafe.Pointer(a)).Fdp

	// now shift the digits
	dst = (*Mp_int)(unsafe.Pointer(bp /* &x0 */)).Fdp
	x = 0
__7:
	if !(x < B) {
		goto __9
	}
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&dst, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&src, 4)))
	goto __8
__8:
	x++
	goto __7
	goto __9
__9:
	;

	dst = (*Mp_int)(unsafe.Pointer(bp + 24 /* &x1 */)).Fdp
	x = B
__10:
	if !(x < (*Mp_int)(unsafe.Pointer(a)).Fused) {
		goto __12
	}
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&dst, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&src, 4)))
	goto __11
__11:
	x++
	goto __10
	goto __12
__12:
	;

	(*Mp_int)(unsafe.Pointer(bp /* &x0 */)).Fused = B
	(*Mp_int)(unsafe.Pointer(bp + 24 /* &x1 */)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused - B

	XTclBN_mp_clamp(tls, bp)

	// now calc the products x0*x0 and x1*x1
	if !(XTclBN_mp_sqr(tls, bp, bp+96) != MP_OKAY) {
		goto __13
	}
	goto X1X1
__13:
	; // x0x0 = x0*x0
	if !(XTclBN_mp_sqr(tls, bp+24, bp+120) != MP_OKAY) {
		goto __14
	}
	goto X1X1
__14:
	; // x1x1 = x1*x1

	// now calc (x1+x0)**2
	if !(XTclBN_s_mp_add(tls, bp+24, bp, bp+48) != MP_OKAY) {
		goto __15
	}
	goto X1X1
__15:
	; // t1 = x1 - x0
	if !(XTclBN_mp_sqr(tls, bp+48, bp+48) != MP_OKAY) {
		goto __16
	}
	goto X1X1
__16:
	; // t1 = (x1 - x0) * (x1 - x0)

	// add x0y0
	if !(XTclBN_s_mp_add(tls, bp+96, bp+120, bp+72) != MP_OKAY) {
		goto __17
	}
	goto X1X1
__17:
	; // t2 = x0x0 + x1x1
	if !(XTclBN_s_mp_sub(tls, bp+48, bp+72, bp+48) != MP_OKAY) {
		goto __18
	}
	goto X1X1
__18:
	; // t1 = (x1+x0)**2 - (x0x0 + x1x1)

	// shift by B
	if !(XTclBN_mp_lshd(tls, bp+48, B) != MP_OKAY) {
		goto __19
	}
	goto X1X1
__19:
	; // t1 = (x0x0 + x1x1 - (x1-x0)*(x1-x0))<<B
	if !(XTclBN_mp_lshd(tls, bp+120, B*2) != MP_OKAY) {
		goto __20
	}
	goto X1X1
__20:
	; // x1x1 = x1x1 << 2*B

	if !(XTclBN_mp_add(tls, bp+96, bp+48, bp+48) != MP_OKAY) {
		goto __21
	}
	goto X1X1
__21:
	; // t1 = x0x0 + t1
	if !(XTclBN_mp_add(tls, bp+48, bp+120, b) != MP_OKAY) {
		goto __22
	}
	goto X1X1
__22:
	; // t1 = x0x0 + t1 + x1x1

	err = MP_OKAY

X1X1:
	XTclBN_mp_clear(tls, bp+120)
X0X0:
	XTclBN_mp_clear(tls, bp+96)
T2:
	XTclBN_mp_clear(tls, bp+72)
T1:
	XTclBN_mp_clear(tls, bp+48)
X1:
	XTclBN_mp_clear(tls, bp+24)
X0:
	XTclBN_mp_clear(tls, bp)
LBL_ERR:
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// multiplies |a| * |b| and only computes upto digs digits of result
// HAC pp. 595, Algorithm 14.12  Modified so you can control how
// many digits of output are created.
func XTclBN_s_mp_mul_digs(tls *libc.TLS, a uintptr, b uintptr, c uintptr, digs int32) Mp_err { /* bn_s_mp_mul_digs.c:10:8: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var t Mp_int at bp, 24

	var err Mp_err
	var pa int32
	var pb int32
	var ix int32
	var iy int32
	var u Mp_digit
	var r Mp_word
	var tmpx Mp_digit
	var tmpt uintptr
	var tmpy uintptr

	// can we use the fast multiplier?
	if digs < int32(1)<<(uint64(8)*uint64(unsafe.Sizeof(Private_mp_word(0)))-uint64(2*MP_DIGIT_BIT)+uint64(1)) && func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused < (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}() < int32(uint32(1)<<(uint64(8)*Size_t(unsafe.Sizeof(Mp_word(0)))-uint64(2)*uint64(MP_DIGIT_BIT))) {
		return XTclBN_fast_s_mp_mul_digs(tls, a, b, c, digs)
	}

	if libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp, digs)) != MP_OKAY {
		return err
	}
	(*Mp_int)(unsafe.Pointer(bp /* &t */)).Fused = digs

	// compute the digits of the product directly
	pa = (*Mp_int)(unsafe.Pointer(a)).Fused
	for ix = 0; ix < pa; ix++ {
		// set the carry to zero
		u = Mp_digit(0)

		// limit ourselves to making digs digits of output
		pb = func() int32 {
			if (*Mp_int)(unsafe.Pointer(b)).Fused < digs-ix {
				return (*Mp_int)(unsafe.Pointer(b)).Fused
			}
			return digs - ix
		}()

		// setup some aliases
		// copy of the digit from a used within the nested loop
		tmpx = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(ix)*4))

		// an alias for the destination shifted ix places
		tmpt = (*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(ix)*4

		// an alias for the digits of b
		tmpy = (*Mp_int)(unsafe.Pointer(b)).Fdp

		// compute the columns of the output and propagate the carry
		for iy = 0; iy < pb; iy++ {
			// compute the column as a mp_word
			r = Mp_word(*(*Mp_digit)(unsafe.Pointer(tmpt))) + Mp_word(tmpx)*Mp_word(*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpy, 4)))) + Mp_word(u)

			// the new column is the lower part of the result
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpt, 4))) = Mp_digit(r & uint64(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1)))

			// get the carry word from the result
			u = Mp_digit(r >> uint64(MP_DIGIT_BIT))
		}
		// set carry if it is placed below digs
		if ix+iy < digs {
			*(*Mp_digit)(unsafe.Pointer(tmpt)) = u
		}
	}

	XTclBN_mp_clamp(tls, bp)
	XTclBN_mp_exch(tls, bp, c)

	XTclBN_mp_clear(tls, bp)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// Fast (comba) multiplier
//
// This is the fast column-array [comba] multiplier.  It is
// designed to compute the columns of the product first
// then handle the carries afterwards.  This has the effect
// of making the nested loops that compute the columns very
// simple and schedulable on super-scalar processors.
//
// This has been modified to produce a variable number of
// digits of output so if say only a half-product is required
// you don't have to compute the upper half (a feature
// required for fast Barrett reduction).
//
// Based on Algorithm 14.12 on pp.595 of HAC.
//
func XTclBN_fast_s_mp_mul_digs(tls *libc.TLS, a uintptr, b uintptr, c uintptr, digs int32) Mp_err { /* bn_s_mp_mul_digs_fast.c:22:8: */
	bp := tls.Alloc(2048)
	defer tls.Free(2048)

	var olduse int32
	var pa int32
	var ix int32
	var iz int32
	var err Mp_err
	// var W [512]Mp_digit at bp, 2048

	var _W Mp_word

	// grow the destination as required
	if (*Mp_int)(unsafe.Pointer(c)).Falloc < digs {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, digs)) != MP_OKAY {
			return err
		}
	}

	// number of output digits to produce
	pa = func() int32 {
		if digs < (*Mp_int)(unsafe.Pointer(a)).Fused+(*Mp_int)(unsafe.Pointer(b)).Fused {
			return digs
		}
		return (*Mp_int)(unsafe.Pointer(a)).Fused + (*Mp_int)(unsafe.Pointer(b)).Fused
	}()

	// clear the carry
	_W = uint64(0)
	for ix = 0; ix < pa; ix++ {
		var tx int32
		var ty int32
		var iy int32
		var tmpx uintptr
		var tmpy uintptr

		// get offsets into the two bignums
		ty = func() int32 {
			if (*Mp_int)(unsafe.Pointer(b)).Fused-1 < ix {
				return (*Mp_int)(unsafe.Pointer(b)).Fused - 1
			}
			return ix
		}()
		tx = ix - ty

		// setup temp aliases
		tmpx = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(tx)*4
		tmpy = (*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(ty)*4

		// this is the number of times the loop will iterrate, essentially
		//          while (tx++ < a->used && ty-- >= 0) { ... }
		//
		iy = func() int32 {
			if (*Mp_int)(unsafe.Pointer(a)).Fused-tx < ty+1 {
				return (*Mp_int)(unsafe.Pointer(a)).Fused - tx
			}
			return ty + 1
		}()

		// execute loop
		for iz = 0; iz < iy; iz++ {
			_W = _W + Mp_word(*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpx, 4))))*Mp_word(*(*Mp_digit)(unsafe.Pointer(libc.PostDecUintptr(&tmpy, 4))))

		}

		// store term
		*(*Mp_digit)(unsafe.Pointer(bp + uintptr(ix)*4)) = Mp_digit(_W) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))

		// make next carry
		_W = _W >> uint64(MP_DIGIT_BIT)
	}

	// setup dest
	olduse = (*Mp_int)(unsafe.Pointer(c)).Fused
	(*Mp_int)(unsafe.Pointer(c)).Fused = pa

	{
		var tmpc uintptr
		tmpc = (*Mp_int)(unsafe.Pointer(c)).Fdp
		for ix = 0; ix < pa; ix++ {
			// now extract the previous digit [below the carry]
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = *(*Mp_digit)(unsafe.Pointer(bp + uintptr(ix)*4))
		}

		// clear unused digits [that existed in the old copy of c]
		for ok := true; ok; ok = 0 != 0 {
			var zd_ int32 = olduse - ix
			var zm_ uintptr = tmpc
			for libc.PostDecInt32(&zd_, 1) > 0 {
				*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
			}
		}

	}
	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// reverse an array, used for radix code
func XTclBN_s_mp_reverse(tls *libc.TLS, s uintptr, len Size_t) { /* bn_s_mp_reverse.c:7:6: */
	var ix Size_t
	var iy Size_t
	var t uint8

	ix = uint64(0)
	iy = len - uint64(1)
	for ix < iy {
		t = *(*uint8)(unsafe.Pointer(s + uintptr(ix)))
		*(*uint8)(unsafe.Pointer(s + uintptr(ix))) = *(*uint8)(unsafe.Pointer(s + uintptr(iy)))
		*(*uint8)(unsafe.Pointer(s + uintptr(iy))) = t
		ix++
		iy--
	}
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// low level squaring, b = a*a, HAC pp.596-597, Algorithm 14.16
func XTclBN_s_mp_sqr(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_s_mp_sqr.c:7:8: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var t Mp_int at bp, 24

	var ix int32
	var iy int32
	var pa int32
	var err Mp_err
	var r Mp_word
	var u Mp_digit
	var tmpx Mp_digit
	var tmpt uintptr

	pa = (*Mp_int)(unsafe.Pointer(a)).Fused
	if libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp, 2*pa+1)) != MP_OKAY {
		return err
	}

	// default used is maximum possible size
	(*Mp_int)(unsafe.Pointer(bp /* &t */)).Fused = 2*pa + 1

	for ix = 0; ix < pa; ix++ {
		// first calculate the digit at 2*ix
		// calculate double precision result
		r = Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(2*ix)*4))) + Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(ix)*4)))*Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(ix)*4)))

		// store lower part in result
		*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp /* &t */)).Fdp + uintptr(ix+ix)*4)) = Mp_digit(r & uint64(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1)))

		// get the carry
		u = Mp_digit(r >> uint64(MP_DIGIT_BIT))

		// left hand side of A[ix] * A[iy]
		tmpx = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(ix)*4))

		// alias for where to store the results
		tmpt = (*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(2*ix+1)*4

		for iy = ix + 1; iy < pa; iy++ {
			// first calculate the product
			r = Mp_word(tmpx) * Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(iy)*4)))

			// now calculate the double precision result, note we use
			// addition instead of *2 since it's easier to optimize
			r = Mp_word(*(*Mp_digit)(unsafe.Pointer(tmpt))) + r + r + Mp_word(u)

			// store lower part
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpt, 4))) = Mp_digit(r & uint64(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1)))

			// get carry
			u = Mp_digit(r >> uint64(MP_DIGIT_BIT))
		}
		// propagate upwards
		for uint32(u) != 0 {
			r = Mp_word(*(*Mp_digit)(unsafe.Pointer(tmpt))) + Mp_word(u)
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpt, 4))) = Mp_digit(r & uint64(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1)))
			u = Mp_digit(r >> uint64(MP_DIGIT_BIT))
		}
	}

	XTclBN_mp_clamp(tls, bp)
	XTclBN_mp_exch(tls, bp, b)
	XTclBN_mp_clear(tls, bp)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// the jist of squaring...
//  you do like mult except the offset of the tmpx [one that
//  starts closer to zero] can't equal the offset of tmpy.
//  So basically you set up iy like before then you min it with
//  (ty-tx) so that it never happens.  You double all those
//  you add in the inner loop
//
// After that loop you do the squares and add them in.

func XTclBN_fast_s_mp_sqr(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_s_mp_sqr_fast.c:16:8: */
	bp := tls.Alloc(2048)
	defer tls.Free(2048)

	var olduse int32
	var pa int32
	var ix int32
	var iz int32
	// var W [512]Mp_digit at bp, 2048

	var tmpx uintptr
	var W1 Mp_word
	var err Mp_err

	// grow the destination as required
	pa = (*Mp_int)(unsafe.Pointer(a)).Fused + (*Mp_int)(unsafe.Pointer(a)).Fused
	if (*Mp_int)(unsafe.Pointer(b)).Falloc < pa {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, b, pa)) != MP_OKAY {
			return err
		}
	}

	// number of output digits to produce
	W1 = uint64(0)
	for ix = 0; ix < pa; ix++ {
		var tx int32
		var ty int32
		var iy int32
		var _W Mp_word
		var tmpy uintptr

		// clear counter
		_W = uint64(0)

		// get offsets into the two bignums
		ty = func() int32 {
			if (*Mp_int)(unsafe.Pointer(a)).Fused-1 < ix {
				return (*Mp_int)(unsafe.Pointer(a)).Fused - 1
			}
			return ix
		}()
		tx = ix - ty

		// setup temp aliases
		tmpx = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(tx)*4
		tmpy = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(ty)*4

		// this is the number of times the loop will iterrate, essentially
		//          while (tx++ < a->used && ty-- >= 0) { ... }
		//
		iy = func() int32 {
			if (*Mp_int)(unsafe.Pointer(a)).Fused-tx < ty+1 {
				return (*Mp_int)(unsafe.Pointer(a)).Fused - tx
			}
			return ty + 1
		}()

		// now for squaring tx can never equal ty
		// we halve the distance since they approach at a rate of 2x
		// and we have to round because odd cases need to be executed
		iy = func() int32 {
			if iy < (ty-tx+1)>>1 {
				return iy
			}
			return (ty - tx + 1) >> 1
		}()

		// execute loop
		for iz = 0; iz < iy; iz++ {
			_W = _W + Mp_word(*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpx, 4))))*Mp_word(*(*Mp_digit)(unsafe.Pointer(libc.PostDecUintptr(&tmpy, 4))))
		}

		// double the inner product and add carry
		_W = _W + _W + W1

		// even columns have the square term in them
		if uint32(ix)&1 == 0 {
			_W = _W + Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(ix>>1)*4)))*Mp_word(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(ix>>1)*4)))
		}

		// store it
		*(*Mp_digit)(unsafe.Pointer(bp + uintptr(ix)*4)) = Mp_digit(_W) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))

		// make next carry
		W1 = _W >> uint64(MP_DIGIT_BIT)
	}

	// setup dest
	olduse = (*Mp_int)(unsafe.Pointer(b)).Fused
	(*Mp_int)(unsafe.Pointer(b)).Fused = (*Mp_int)(unsafe.Pointer(a)).Fused + (*Mp_int)(unsafe.Pointer(a)).Fused

	{
		var tmpb uintptr
		tmpb = (*Mp_int)(unsafe.Pointer(b)).Fdp
		for ix = 0; ix < pa; ix++ {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpb, 4))) = *(*Mp_digit)(unsafe.Pointer(bp + uintptr(ix)*4)) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
		}

		// clear unused digits [that existed in the old copy of c]
		for ok := true; ok; ok = 0 != 0 {
			var zd_ int32 = olduse - ix
			var zm_ uintptr = tmpb
			for libc.PostDecInt32(&zd_, 1) > 0 {
				*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
			}
		}

	}
	XTclBN_mp_clamp(tls, b)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// low level subtraction (assumes |a| > |b|), HAC pp.595 Algorithm 14.9
func XTclBN_s_mp_sub(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_s_mp_sub.c:7:8: */
	var olduse int32
	var min int32
	var max int32
	var err Mp_err

	// find sizes
	min = (*Mp_int)(unsafe.Pointer(b)).Fused
	max = (*Mp_int)(unsafe.Pointer(a)).Fused

	// init result
	if (*Mp_int)(unsafe.Pointer(c)).Falloc < max {
		if libc.AssignInt32(&err, XTclBN_mp_grow(tls, c, max)) != MP_OKAY {
			return err
		}
	}
	olduse = (*Mp_int)(unsafe.Pointer(c)).Fused
	(*Mp_int)(unsafe.Pointer(c)).Fused = max

	{
		var u Mp_digit
		var tmpa uintptr
		var tmpb uintptr
		var tmpc uintptr
		var i int32

		// alias for digit pointers
		tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp
		tmpb = (*Mp_int)(unsafe.Pointer(b)).Fdp
		tmpc = (*Mp_int)(unsafe.Pointer(c)).Fdp

		// set carry to zero
		u = Mp_digit(0)
		for i = 0; i < min; i++ {
			// T[i] = A[i] - B[i] - U
			*(*Mp_digit)(unsafe.Pointer(tmpc)) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4))) - *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpb, 4))) - u

			// U = carry bit of T[i]
			// Note this saves performing an AND operation since
			// if a carry does occur it will propagate all the way to the
			// MSB.  As a result a single shift is enough to get the carry
			u = *(*Mp_digit)(unsafe.Pointer(tmpc)) >> (uint64(8)*Size_t(unsafe.Sizeof(Mp_digit(0))) - uint64(1))

			// Clear carry from T[i]
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) &= Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
		}

		// now copy higher words if any, e.g. if A has more digits than B
		for ; i < max; i++ {
			// T[i] = A[i] - U
			*(*Mp_digit)(unsafe.Pointer(tmpc)) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4))) - u

			// U = carry bit of T[i]
			u = *(*Mp_digit)(unsafe.Pointer(tmpc)) >> (uint64(8)*Size_t(unsafe.Sizeof(Mp_digit(0))) - uint64(1))

			// Clear carry from T[i]
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) &= Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)
		}

		// clear digits above used (since we may not have grown result above)
		for ok := true; ok; ok = 0 != 0 {
			var zd_ int32 = olduse - (*Mp_int)(unsafe.Pointer(c)).Fused
			var zm_ uintptr = tmpc
			for libc.PostDecInt32(&zd_, 1) > 0 {
				*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
			}
		}

	}

	XTclBN_mp_clamp(tls, c)
	return MP_OKAY
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// multiplication using the Toom-Cook 3-way algorithm
//
// Much more complicated than Karatsuba but has a lower
// asymptotic running time of O(N**1.464).  This algorithm is
// only particularly useful on VERY large inputs
// (we're talking 1000s of digits here...).

//
//    This file contains code from J. Arndt's book  "Matters Computational"
//    and the accompanying FXT-library with permission of the author.

//
//    Setup from
//
//      Chung, Jaewook, and M. Anwar Hasan. "Asymmetric squaring formulae."
//      18th IEEE Symposium on Computer Arithmetic (ARITH'07). IEEE, 2007.
//
//    The interpolation from above needed one temporary variable more
//    than the interpolation here:
//
//      Bodrato, Marco, and Alberto Zanoni. "What about Toom-Cook matrices optimality."
//      Centro Vito Volterra Universita di Roma Tor Vergata (2006)

func XTclBN_mp_toom_mul(tls *libc.TLS, a uintptr, b uintptr, c uintptr) Mp_err { /* bn_s_mp_toom_mul.c:32:8: */
	bp := tls.Alloc(264)
	defer tls.Free(264)

	// var S1 Mp_int at bp+48, 24

	// var S2 Mp_int at bp+72, 24

	// var T1 Mp_int at bp+96, 24

	// var a0 Mp_int at bp+120, 24

	// var a1 Mp_int at bp+144, 24

	// var a2 Mp_int at bp+168, 24

	// var b0 Mp_int at bp+192, 24

	// var b1 Mp_int at bp+216, 24

	// var b2 Mp_int at bp+240, 24

	var B int32
	var count int32
	var err Mp_err

	// init temps
	if !(libc.AssignInt32(&err, XTclBN_mp_init_multi(tls, bp+48, libc.VaList(bp, bp+72, bp+96, uintptr(0)))) != MP_OKAY) {
		goto __1
	}
	return err
__1:
	;

	// B
	B = func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fused < (*Mp_int)(unsafe.Pointer(b)).Fused {
			return (*Mp_int)(unsafe.Pointer(a)).Fused
		}
		return (*Mp_int)(unsafe.Pointer(b)).Fused
	}() / 3

	//* a = a2 * x^2 + a1 * x + a0;
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+120, B)) != MP_OKAY) {
		goto __2
	}
	goto LBL_ERRa0
__2:
	;

	count = 0
__3:
	if !(count < B) {
		goto __5
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+120 /* &a0 */)).Fdp + uintptr(count)*4)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(count)*4))
	(*Mp_int)(unsafe.Pointer(bp+120 /* &a0 */)).Fused++
	goto __4
__4:
	count++
	goto __3
	goto __5
__5:
	;
	XTclBN_mp_clamp(tls, bp+120)
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+144, B)) != MP_OKAY) {
		goto __6
	}
	goto LBL_ERRa1
__6:
	;
__7:
	if !(count < 2*B) {
		goto __9
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+144 /* &a1 */)).Fdp + uintptr(count-B)*4)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(count)*4))
	(*Mp_int)(unsafe.Pointer(bp+144 /* &a1 */)).Fused++
	goto __8
__8:
	count++
	goto __7
	goto __9
__9:
	;
	XTclBN_mp_clamp(tls, bp+144)
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+168, B+((*Mp_int)(unsafe.Pointer(a)).Fused-3*B))) != MP_OKAY) {
		goto __10
	}
	goto LBL_ERRa2
__10:
	;
__11:
	if !(count < (*Mp_int)(unsafe.Pointer(a)).Fused) {
		goto __13
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+168 /* &a2 */)).Fdp + uintptr(count-2*B)*4)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(count)*4))
	(*Mp_int)(unsafe.Pointer(bp+168 /* &a2 */)).Fused++
	goto __12
__12:
	count++
	goto __11
	goto __13
__13:
	;
	XTclBN_mp_clamp(tls, bp+168)

	//* b = b2 * x^2 + b1 * x + b0;
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+192, B)) != MP_OKAY) {
		goto __14
	}
	goto LBL_ERRb0
__14:
	;
	count = 0
__15:
	if !(count < B) {
		goto __17
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+192 /* &b0 */)).Fdp + uintptr(count)*4)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(count)*4))
	(*Mp_int)(unsafe.Pointer(bp+192 /* &b0 */)).Fused++
	goto __16
__16:
	count++
	goto __15
	goto __17
__17:
	;
	XTclBN_mp_clamp(tls, bp+192)
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+216, B)) != MP_OKAY) {
		goto __18
	}
	goto LBL_ERRb1
__18:
	;
__19:
	if !(count < 2*B) {
		goto __21
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+216 /* &b1 */)).Fdp + uintptr(count-B)*4)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(count)*4))
	(*Mp_int)(unsafe.Pointer(bp+216 /* &b1 */)).Fused++
	goto __20
__20:
	count++
	goto __19
	goto __21
__21:
	;
	XTclBN_mp_clamp(tls, bp+216)
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+240, B+((*Mp_int)(unsafe.Pointer(b)).Fused-3*B))) != MP_OKAY) {
		goto __22
	}
	goto LBL_ERRb2
__22:
	;
__23:
	if !(count < (*Mp_int)(unsafe.Pointer(b)).Fused) {
		goto __25
	}
	*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+240 /* &b2 */)).Fdp + uintptr(count-2*B)*4)) = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(count)*4))
	(*Mp_int)(unsafe.Pointer(bp+240 /* &b2 */)).Fused++
	goto __24
__24:
	count++
	goto __23
	goto __25
__25:
	;
	XTclBN_mp_clamp(tls, bp+240)

	//* \\ S1 = (a2+a1+a0) * (b2+b1+b0);
	//* T1 = a2 + a1;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+168, bp+144, bp+96)) != MP_OKAY) {
		goto __26
	}
	goto LBL_ERR
__26:
	;

	//* S2 = T1 + a0;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+96, bp+120, bp+72)) != MP_OKAY) {
		goto __27
	}
	goto LBL_ERR
__27:
	;

	//* c = b2 + b1;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+240, bp+216, c)) != MP_OKAY) {
		goto __28
	}
	goto LBL_ERR
__28:
	;

	//* S1 = c + b0;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, c, bp+192, bp+48)) != MP_OKAY) {
		goto __29
	}
	goto LBL_ERR
__29:
	;

	//* S1 = S1 * S2;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul(tls, bp+48, bp+72, bp+48)) != MP_OKAY) {
		goto __30
	}
	goto LBL_ERR
__30:
	;

	//* \\S2 = (4*a2+2*a1+a0) * (4*b2+2*b1+b0);
	//* T1 = T1 + a2;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+96, bp+168, bp+96)) != MP_OKAY) {
		goto __31
	}
	goto LBL_ERR
__31:
	;

	//* T1 = T1 << 1;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul_2(tls, bp+96, bp+96)) != MP_OKAY) {
		goto __32
	}
	goto LBL_ERR
__32:
	;

	//* T1 = T1 + a0;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+96, bp+120, bp+96)) != MP_OKAY) {
		goto __33
	}
	goto LBL_ERR
__33:
	;

	//* c = c + b2;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, c, bp+240, c)) != MP_OKAY) {
		goto __34
	}
	goto LBL_ERR
__34:
	;

	//* c = c << 1;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul_2(tls, c, c)) != MP_OKAY) {
		goto __35
	}
	goto LBL_ERR
__35:
	;

	//* c = c + b0;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, c, bp+192, c)) != MP_OKAY) {
		goto __36
	}
	goto LBL_ERR
__36:
	;

	//* S2 = T1 * c;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul(tls, bp+96, c, bp+72)) != MP_OKAY) {
		goto __37
	}
	goto LBL_ERR
__37:
	;

	//* \\S3 = (a2-a1+a0) * (b2-b1+b0);
	//* a1 = a2 - a1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+168, bp+144, bp+144)) != MP_OKAY) {
		goto __38
	}
	goto LBL_ERR
__38:
	;

	//* a1 = a1 + a0;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+144, bp+120, bp+144)) != MP_OKAY) {
		goto __39
	}
	goto LBL_ERR
__39:
	;

	//* b1 = b2 - b1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+240, bp+216, bp+216)) != MP_OKAY) {
		goto __40
	}
	goto LBL_ERR
__40:
	;

	//* b1 = b1 + b0;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+216, bp+192, bp+216)) != MP_OKAY) {
		goto __41
	}
	goto LBL_ERR
__41:
	;

	//* a1 = a1 * b1;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul(tls, bp+144, bp+216, bp+144)) != MP_OKAY) {
		goto __42
	}
	goto LBL_ERR
__42:
	;

	//* b1 = a2 * b2;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul(tls, bp+168, bp+240, bp+216)) != MP_OKAY) {
		goto __43
	}
	goto LBL_ERR
__43:
	;

	//* \\S2 = (S2 - S3)/3;
	//* S2 = S2 - a1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+72, bp+144, bp+72)) != MP_OKAY) {
		goto __44
	}
	goto LBL_ERR
__44:
	;

	//* S2 = S2 / 3; \\ this is an exact division
	if !(libc.AssignInt32(&err, XTclBN_mp_div_3(tls, bp+72, bp+72, uintptr(0))) != MP_OKAY) {
		goto __45
	}
	goto LBL_ERR
__45:
	;

	//* a1 = S1 - a1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+48, bp+144, bp+144)) != MP_OKAY) {
		goto __46
	}
	goto LBL_ERR
__46:
	;

	//* a1 = a1 >> 1;
	if !(libc.AssignInt32(&err, XTclBN_mp_div_2(tls, bp+144, bp+144)) != MP_OKAY) {
		goto __47
	}
	goto LBL_ERR
__47:
	;

	//* a0 = a0 * b0;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul(tls, bp+120, bp+192, bp+120)) != MP_OKAY) {
		goto __48
	}
	goto LBL_ERR
__48:
	;

	//* S1 = S1 - a0;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+48, bp+120, bp+48)) != MP_OKAY) {
		goto __49
	}
	goto LBL_ERR
__49:
	;

	//* S2 = S2 - S1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+72, bp+48, bp+72)) != MP_OKAY) {
		goto __50
	}
	goto LBL_ERR
__50:
	;

	//* S2 = S2 >> 1;
	if !(libc.AssignInt32(&err, XTclBN_mp_div_2(tls, bp+72, bp+72)) != MP_OKAY) {
		goto __51
	}
	goto LBL_ERR
__51:
	;

	//* S1 = S1 - a1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+48, bp+144, bp+48)) != MP_OKAY) {
		goto __52
	}
	goto LBL_ERR
__52:
	;

	//* S1 = S1 - b1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+48, bp+216, bp+48)) != MP_OKAY) {
		goto __53
	}
	goto LBL_ERR
__53:
	;

	//* T1 = b1 << 1;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul_2(tls, bp+216, bp+96)) != MP_OKAY) {
		goto __54
	}
	goto LBL_ERR
__54:
	;

	//* S2 = S2 - T1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+72, bp+96, bp+72)) != MP_OKAY) {
		goto __55
	}
	goto LBL_ERR
__55:
	;

	//* a1 = a1 - S2;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+144, bp+72, bp+144)) != MP_OKAY) {
		goto __56
	}
	goto LBL_ERR
__56:
	;

	//* P = b1*x^4+ S2*x^3+ S1*x^2+ a1*x + a0;
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+216, 4*B)) != MP_OKAY) {
		goto __57
	}
	goto LBL_ERR
__57:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+72, 3*B)) != MP_OKAY) {
		goto __58
	}
	goto LBL_ERR
__58:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+216, bp+72, bp+216)) != MP_OKAY) {
		goto __59
	}
	goto LBL_ERR
__59:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+48, 2*B)) != MP_OKAY) {
		goto __60
	}
	goto LBL_ERR
__60:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+216, bp+48, bp+216)) != MP_OKAY) {
		goto __61
	}
	goto LBL_ERR
__61:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+144, 1*B)) != MP_OKAY) {
		goto __62
	}
	goto LBL_ERR
__62:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+216, bp+144, bp+216)) != MP_OKAY) {
		goto __63
	}
	goto LBL_ERR
__63:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+216, bp+120, c)) != MP_OKAY) {
		goto __64
	}
	goto LBL_ERR
__64:
	;

	//* a * b - P

LBL_ERR:
	XTclBN_mp_clear(tls, bp+240)
LBL_ERRb2:
	XTclBN_mp_clear(tls, bp+216)
LBL_ERRb1:
	XTclBN_mp_clear(tls, bp+192)
LBL_ERRb0:
	XTclBN_mp_clear(tls, bp+168)
LBL_ERRa2:
	XTclBN_mp_clear(tls, bp+144)
LBL_ERRa1:
	XTclBN_mp_clear(tls, bp+120)
LBL_ERRa0:
	XTclBN_mp_clear_multi(tls, bp+48, libc.VaList(bp+24, bp+72, bp+96, uintptr(0)))
	return err
}

// deprecated functions

// code-generating macros

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// squaring using Toom-Cook 3-way algorithm

//
//    This file contains code from J. Arndt's book  "Matters Computational"
//    and the accompanying FXT-library with permission of the author.

// squaring using Toom-Cook 3-way algorithm
//
//    Setup and interpolation from algorithm SQR_3 in
//
//      Chung, Jaewook, and M. Anwar Hasan. "Asymmetric squaring formulae."
//      18th IEEE Symposium on Computer Arithmetic (ARITH'07). IEEE, 2007.
//
func XTclBN_mp_toom_sqr(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* bn_s_mp_toom_sqr.c:21:8: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	// var S0 Mp_int at bp, 24

	// var a0 Mp_int at bp+24, 24

	// var a1 Mp_int at bp+48, 24

	// var a2 Mp_int at bp+72, 24

	var tmpa uintptr
	var tmpc uintptr
	var B int32
	var count int32
	var err Mp_err

	// init temps
	if !(libc.AssignInt32(&err, XTclBN_mp_init(tls, bp)) != MP_OKAY) {
		goto __1
	}
	return err
__1:
	;

	// B
	B = (*Mp_int)(unsafe.Pointer(a)).Fused / 3

	//* a = a2 * x^2 + a1 * x + a0;
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+24, B)) != MP_OKAY) {
		goto __2
	}
	goto LBL_ERRa0
__2:
	;

	(*Mp_int)(unsafe.Pointer(bp + 24 /* &a0 */)).Fused = B
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+48, B)) != MP_OKAY) {
		goto __3
	}
	goto LBL_ERRa1
__3:
	;
	(*Mp_int)(unsafe.Pointer(bp + 48 /* &a1 */)).Fused = B
	if !(libc.AssignInt32(&err, XTclBN_mp_init_size(tls, bp+72, B+((*Mp_int)(unsafe.Pointer(a)).Fused-3*B))) != MP_OKAY) {
		goto __4
	}
	goto LBL_ERRa2
__4:
	;

	tmpa = (*Mp_int)(unsafe.Pointer(a)).Fdp
	tmpc = (*Mp_int)(unsafe.Pointer(bp + 24 /* &a0 */)).Fdp
	count = 0
__5:
	if !(count < B) {
		goto __7
	}
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4)))
	goto __6
__6:
	count++
	goto __5
	goto __7
__7:
	;
	tmpc = (*Mp_int)(unsafe.Pointer(bp + 48 /* &a1 */)).Fdp
__8:
	if !(count < 2*B) {
		goto __10
	}
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4)))
	goto __9
__9:
	count++
	goto __8
	goto __10
__10:
	;
	tmpc = (*Mp_int)(unsafe.Pointer(bp + 72 /* &a2 */)).Fdp
__11:
	if !(count < (*Mp_int)(unsafe.Pointer(a)).Fused) {
		goto __13
	}
	*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpc, 4))) = *(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&tmpa, 4)))
	(*Mp_int)(unsafe.Pointer(bp+72 /* &a2 */)).Fused++
	goto __12
__12:
	count++
	goto __11
	goto __13
__13:
	;
	XTclBN_mp_clamp(tls, bp+24)
	XTclBN_mp_clamp(tls, bp+48)
	XTclBN_mp_clamp(tls, bp+72)

	//* S0 = a0^2;
	if !(libc.AssignInt32(&err, XTclBN_mp_sqr(tls, bp+24, bp)) != MP_OKAY) {
		goto __14
	}
	goto LBL_ERR
__14:
	;

	//* \\S1 = (a2 + a1 + a0)^2
	//* \\S2 = (a2 - a1 + a0)^2
	//* \\S1 = a0 + a2;
	//* a0 = a0 + a2;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+24, bp+72, bp+24)) != MP_OKAY) {
		goto __15
	}
	goto LBL_ERR
__15:
	;
	//* \\S2 = S1 - a1;
	//* b = a0 - a1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+24, bp+48, b)) != MP_OKAY) {
		goto __16
	}
	goto LBL_ERR
__16:
	;
	//* \\S1 = S1 + a1;
	//* a0 = a0 + a1;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+24, bp+48, bp+24)) != MP_OKAY) {
		goto __17
	}
	goto LBL_ERR
__17:
	;
	//* \\S1 = S1^2;
	//* a0 = a0^2;
	if !(libc.AssignInt32(&err, XTclBN_mp_sqr(tls, bp+24, bp+24)) != MP_OKAY) {
		goto __18
	}
	goto LBL_ERR
__18:
	;
	//* \\S2 = S2^2;
	//* b = b^2;
	if !(libc.AssignInt32(&err, XTclBN_mp_sqr(tls, b, b)) != MP_OKAY) {
		goto __19
	}
	goto LBL_ERR
__19:
	;

	//* \\ S3 = 2 * a1 * a2
	//* \\S3 = a1 * a2;
	//* a1 = a1 * a2;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul(tls, bp+48, bp+72, bp+48)) != MP_OKAY) {
		goto __20
	}
	goto LBL_ERR
__20:
	;
	//* \\S3 = S3 << 1;
	//* a1 = a1 << 1;
	if !(libc.AssignInt32(&err, XTclBN_mp_mul_2(tls, bp+48, bp+48)) != MP_OKAY) {
		goto __21
	}
	goto LBL_ERR
__21:
	;

	//* \\S4 = a2^2;
	//* a2 = a2^2;
	if !(libc.AssignInt32(&err, XTclBN_mp_sqr(tls, bp+72, bp+72)) != MP_OKAY) {
		goto __22
	}
	goto LBL_ERR
__22:
	;

	//* \\ tmp = (S1 + S2)/2
	//* \\tmp = S1 + S2;
	//* b = a0 + b;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+24, b, b)) != MP_OKAY) {
		goto __23
	}
	goto LBL_ERR
__23:
	;
	//* \\tmp = tmp >> 1;
	//* b = b >> 1;
	if !(libc.AssignInt32(&err, XTclBN_mp_div_2(tls, b, b)) != MP_OKAY) {
		goto __24
	}
	goto LBL_ERR
__24:
	;

	//* \\ S1 = S1 - tmp - S3
	//* \\S1 = S1 - tmp;
	//* a0 = a0 - b;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+24, b, bp+24)) != MP_OKAY) {
		goto __25
	}
	goto LBL_ERR
__25:
	;
	//* \\S1 = S1 - S3;
	//* a0 = a0 - a1;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, bp+24, bp+48, bp+24)) != MP_OKAY) {
		goto __26
	}
	goto LBL_ERR
__26:
	;

	//* \\S2 = tmp - S4 -S0
	//* \\S2 = tmp - S4;
	//* b = b - a2;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, b, bp+72, b)) != MP_OKAY) {
		goto __27
	}
	goto LBL_ERR
__27:
	;
	//* \\S2 = S2 - S0;
	//* b = b - S0;
	if !(libc.AssignInt32(&err, XTclBN_mp_sub(tls, b, bp, b)) != MP_OKAY) {
		goto __28
	}
	goto LBL_ERR
__28:
	;

	//* \\P = S4*x^4 + S3*x^3 + S2*x^2 + S1*x + S0;
	//* P = a2*x^4 + a1*x^3 + b*x^2 + a0*x + S0;

	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+72, 4*B)) != MP_OKAY) {
		goto __29
	}
	goto LBL_ERR
__29:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+48, 3*B)) != MP_OKAY) {
		goto __30
	}
	goto LBL_ERR
__30:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, b, 2*B)) != MP_OKAY) {
		goto __31
	}
	goto LBL_ERR
__31:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_lshd(tls, bp+24, 1*B)) != MP_OKAY) {
		goto __32
	}
	goto LBL_ERR
__32:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+72, bp+48, bp+72)) != MP_OKAY) {
		goto __33
	}
	goto LBL_ERR
__33:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, bp+72, b, b)) != MP_OKAY) {
		goto __34
	}
	goto LBL_ERR
__34:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, b, bp+24, b)) != MP_OKAY) {
		goto __35
	}
	goto LBL_ERR
__35:
	;
	if !(libc.AssignInt32(&err, XTclBN_mp_add(tls, b, bp, b)) != MP_OKAY) {
		goto __36
	}
	goto LBL_ERR
__36:
	;
	//* a^2 - P

LBL_ERR:
	XTclBN_mp_clear(tls, bp+72)
LBL_ERRa2:
	XTclBN_mp_clear(tls, bp+48)
LBL_ERRa1:
	XTclBN_mp_clear(tls, bp+24)
LBL_ERRa0:
	XTclBN_mp_clear(tls, bp)

	return err
}

// ===========================================================================
//      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 ULong, level int32) int32 { /* compress.c:22:13: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	// var stream Z_stream at bp, 88

	var err int32
	var max UInt = libc.Uint32(libc.Uint32FromInt32(-1))
	var left ULong

	left = *(*ULongf)(unsafe.Pointer(destLen))
	*(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0)

	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0)
	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0)
	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0)

	err = z.XdeflateInit_(tls, bp, level, ts+65, int32(unsafe.Sizeof(Z_stream{})))
	if err != Z_OK {
		return err
	}

	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest
	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0)
	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source
	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0)

	for ok := true; ok; ok = err == Z_OK {
		if (*Z_stream)(unsafe.Pointer(bp)).Favail_out == UInt(0) {
			(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 {
				if left > ULong(max) {
					return max
				}
				return UInt(left)
			}()
			left = left - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_out)
		}
		if (*Z_stream)(unsafe.Pointer(bp)).Favail_in == UInt(0) {
			(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 {
				if sourceLen > ULong(max) {
					return max
				}
				return UInt(sourceLen)
			}()
			sourceLen = sourceLen - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_in)
		}
		err = z.Xdeflate(tls, bp, func() int32 {
			if sourceLen != 0 {
				return Z_NO_FLUSH
			}
			return Z_FINISH
		}())
	}

	*(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out
	z.XdeflateEnd(tls, bp)
	if err == Z_STREAM_END {
		return Z_OK
	}
	return err
}

// ===========================================================================
func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */
	return z.Xcompress2(tls, dest, destLen, source, sourceLen, -1)
}

// ===========================================================================
//      If the default memLevel or windowBits for deflateInit() is changed, then
//    this function needs to be updated.
//
func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */
	return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + ULong(13)
}

// ========================================================================
// Tables of CRC-32s of all single-byte values, made by make_crc_table().
// crc32.h -- tables for rapid CRC calculation
// Generated automatically by crc32.c

var crc_table = [8][256]Z_crc_t{
	{
		0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
		0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
		0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
		0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
		0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
		0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
		0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
		0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
		0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
		0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
		0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
		0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
		0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
		0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
		0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
		0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
		0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
		0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
		0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
		0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
		0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
		0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
		0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
		0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
		0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
		0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
		0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
		0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
		0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
		0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
		0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
		0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
		0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
		0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
		0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
		0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
		0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
		0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
		0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
		0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
		0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
		0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
		0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
		0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
		0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
		0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
		0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
		0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
		0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
		0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
		0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
		0x2d02ef8d,
	},
	{
		0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504,
		0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49,
		0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e,
		0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192,
		0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859,
		0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c,
		0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620,
		0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265,
		0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae,
		0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2,
		0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175,
		0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38,
		0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05,
		0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40,
		0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f,
		0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca,
		0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850,
		0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d,
		0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da,
		0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864,
		0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af,
		0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea,
		0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74,
		0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31,
		0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa,
		0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a,
		0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd,
		0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180,
		0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a,
		0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f,
		0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290,
		0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5,
		0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed,
		0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0,
		0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167,
		0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b,
		0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0,
		0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5,
		0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc,
		0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189,
		0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842,
		0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e,
		0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299,
		0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4,
		0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec,
		0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9,
		0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66,
		0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23,
		0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9,
		0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4,
		0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33,
		0x9324fd72,
	},
	{
		0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc,
		0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f,
		0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a,
		0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29,
		0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8,
		0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023,
		0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e,
		0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065,
		0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84,
		0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7,
		0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922,
		0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71,
		0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0,
		0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b,
		0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816,
		0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd,
		0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c,
		0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f,
		0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba,
		0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579,
		0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98,
		0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873,
		0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e,
		0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5,
		0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134,
		0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7,
		0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732,
		0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461,
		0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0,
		0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b,
		0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26,
		0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd,
		0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc,
		0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef,
		0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a,
		0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049,
		0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8,
		0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43,
		0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e,
		0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5,
		0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24,
		0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07,
		0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982,
		0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1,
		0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0,
		0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b,
		0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576,
		0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d,
		0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c,
		0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f,
		0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda,
		0xbe9834ed,
	},
	{
		0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757,
		0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a,
		0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733,
		0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871,
		0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70,
		0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42,
		0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5,
		0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787,
		0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086,
		0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4,
		0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d,
		0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0,
		0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d,
		0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f,
		0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859,
		0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b,
		0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5,
		0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028,
		0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891,
		0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed,
		0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec,
		0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde,
		0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817,
		0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825,
		0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24,
		0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e,
		0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7,
		0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a,
		0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4,
		0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196,
		0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0,
		0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2,
		0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52,
		0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f,
		0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36,
		0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174,
		0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675,
		0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647,
		0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d,
		0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf,
		0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be,
		0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc,
		0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645,
		0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98,
		0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138,
		0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a,
		0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c,
		0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e,
		0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0,
		0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d,
		0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194,
		0xde0506f1,
	},
	{
		0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07,
		0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79,
		0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7,
		0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84,
		0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13,
		0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663,
		0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5,
		0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5,
		0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832,
		0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51,
		0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf,
		0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1,
		0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76,
		0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606,
		0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996,
		0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6,
		0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c,
		0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712,
		0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c,
		0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4,
		0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943,
		0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333,
		0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe,
		0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce,
		0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359,
		0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a,
		0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04,
		0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a,
		0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0,
		0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580,
		0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10,
		0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060,
		0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1,
		0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf,
		0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31,
		0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852,
		0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5,
		0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5,
		0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75,
		0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005,
		0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292,
		0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1,
		0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f,
		0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111,
		0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0,
		0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0,
		0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40,
		0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530,
		0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba,
		0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4,
		0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a,
		0x8def022d,
	},
	{
		0x00000000, 0x41311b19, 0x82623632, 0xc3532d2b, 0x04c56c64,
		0x45f4777d, 0x86a75a56, 0xc796414f, 0x088ad9c8, 0x49bbc2d1,
		0x8ae8effa, 0xcbd9f4e3, 0x0c4fb5ac, 0x4d7eaeb5, 0x8e2d839e,
		0xcf1c9887, 0x5112c24a, 0x1023d953, 0xd370f478, 0x9241ef61,
		0x55d7ae2e, 0x14e6b537, 0xd7b5981c, 0x96848305, 0x59981b82,
		0x18a9009b, 0xdbfa2db0, 0x9acb36a9, 0x5d5d77e6, 0x1c6c6cff,
		0xdf3f41d4, 0x9e0e5acd, 0xa2248495, 0xe3159f8c, 0x2046b2a7,
		0x6177a9be, 0xa6e1e8f1, 0xe7d0f3e8, 0x2483dec3, 0x65b2c5da,
		0xaaae5d5d, 0xeb9f4644, 0x28cc6b6f, 0x69fd7076, 0xae6b3139,
		0xef5a2a20, 0x2c09070b, 0x6d381c12, 0xf33646df, 0xb2075dc6,
		0x715470ed, 0x30656bf4, 0xf7f32abb, 0xb6c231a2, 0x75911c89,
		0x34a00790, 0xfbbc9f17, 0xba8d840e, 0x79dea925, 0x38efb23c,
		0xff79f373, 0xbe48e86a, 0x7d1bc541, 0x3c2ade58, 0x054f79f0,
		0x447e62e9, 0x872d4fc2, 0xc61c54db, 0x018a1594, 0x40bb0e8d,
		0x83e823a6, 0xc2d938bf, 0x0dc5a038, 0x4cf4bb21, 0x8fa7960a,
		0xce968d13, 0x0900cc5c, 0x4831d745, 0x8b62fa6e, 0xca53e177,
		0x545dbbba, 0x156ca0a3, 0xd63f8d88, 0x970e9691, 0x5098d7de,
		0x11a9ccc7, 0xd2fae1ec, 0x93cbfaf5, 0x5cd76272, 0x1de6796b,
		0xdeb55440, 0x9f844f59, 0x58120e16, 0x1923150f, 0xda703824,
		0x9b41233d, 0xa76bfd65, 0xe65ae67c, 0x2509cb57, 0x6438d04e,
		0xa3ae9101, 0xe29f8a18, 0x21cca733, 0x60fdbc2a, 0xafe124ad,
		0xeed03fb4, 0x2d83129f, 0x6cb20986, 0xab2448c9, 0xea1553d0,
		0x29467efb, 0x687765e2, 0xf6793f2f, 0xb7482436, 0x741b091d,
		0x352a1204, 0xf2bc534b, 0xb38d4852, 0x70de6579, 0x31ef7e60,
		0xfef3e6e7, 0xbfc2fdfe, 0x7c91d0d5, 0x3da0cbcc, 0xfa368a83,
		0xbb07919a, 0x7854bcb1, 0x3965a7a8, 0x4b98833b, 0x0aa99822,
		0xc9fab509, 0x88cbae10, 0x4f5def5f, 0x0e6cf446, 0xcd3fd96d,
		0x8c0ec274, 0x43125af3, 0x022341ea, 0xc1706cc1, 0x804177d8,
		0x47d73697, 0x06e62d8e, 0xc5b500a5, 0x84841bbc, 0x1a8a4171,
		0x5bbb5a68, 0x98e87743, 0xd9d96c5a, 0x1e4f2d15, 0x5f7e360c,
		0x9c2d1b27, 0xdd1c003e, 0x120098b9, 0x533183a0, 0x9062ae8b,
		0xd153b592, 0x16c5f4dd, 0x57f4efc4, 0x94a7c2ef, 0xd596d9f6,
		0xe9bc07ae, 0xa88d1cb7, 0x6bde319c, 0x2aef2a85, 0xed796bca,
		0xac4870d3, 0x6f1b5df8, 0x2e2a46e1, 0xe136de66, 0xa007c57f,
		0x6354e854, 0x2265f34d, 0xe5f3b202, 0xa4c2a91b, 0x67918430,
		0x26a09f29, 0xb8aec5e4, 0xf99fdefd, 0x3accf3d6, 0x7bfde8cf,
		0xbc6ba980, 0xfd5ab299, 0x3e099fb2, 0x7f3884ab, 0xb0241c2c,
		0xf1150735, 0x32462a1e, 0x73773107, 0xb4e17048, 0xf5d06b51,
		0x3683467a, 0x77b25d63, 0x4ed7facb, 0x0fe6e1d2, 0xccb5ccf9,
		0x8d84d7e0, 0x4a1296af, 0x0b238db6, 0xc870a09d, 0x8941bb84,
		0x465d2303, 0x076c381a, 0xc43f1531, 0x850e0e28, 0x42984f67,
		0x03a9547e, 0xc0fa7955, 0x81cb624c, 0x1fc53881, 0x5ef42398,
		0x9da70eb3, 0xdc9615aa, 0x1b0054e5, 0x5a314ffc, 0x996262d7,
		0xd85379ce, 0x174fe149, 0x567efa50, 0x952dd77b, 0xd41ccc62,
		0x138a8d2d, 0x52bb9634, 0x91e8bb1f, 0xd0d9a006, 0xecf37e5e,
		0xadc26547, 0x6e91486c, 0x2fa05375, 0xe836123a, 0xa9070923,
		0x6a542408, 0x2b653f11, 0xe479a796, 0xa548bc8f, 0x661b91a4,
		0x272a8abd, 0xe0bccbf2, 0xa18dd0eb, 0x62defdc0, 0x23efe6d9,
		0xbde1bc14, 0xfcd0a70d, 0x3f838a26, 0x7eb2913f, 0xb924d070,
		0xf815cb69, 0x3b46e642, 0x7a77fd5b, 0xb56b65dc, 0xf45a7ec5,
		0x370953ee, 0x763848f7, 0xb1ae09b8, 0xf09f12a1, 0x33cc3f8a,
		0x72fd2493,
	},
	{
		0x00000000, 0x376ac201, 0x6ed48403, 0x59be4602, 0xdca80907,
		0xebc2cb06, 0xb27c8d04, 0x85164f05, 0xb851130e, 0x8f3bd10f,
		0xd685970d, 0xe1ef550c, 0x64f91a09, 0x5393d808, 0x0a2d9e0a,
		0x3d475c0b, 0x70a3261c, 0x47c9e41d, 0x1e77a21f, 0x291d601e,
		0xac0b2f1b, 0x9b61ed1a, 0xc2dfab18, 0xf5b56919, 0xc8f23512,
		0xff98f713, 0xa626b111, 0x914c7310, 0x145a3c15, 0x2330fe14,
		0x7a8eb816, 0x4de47a17, 0xe0464d38, 0xd72c8f39, 0x8e92c93b,
		0xb9f80b3a, 0x3cee443f, 0x0b84863e, 0x523ac03c, 0x6550023d,
		0x58175e36, 0x6f7d9c37, 0x36c3da35, 0x01a91834, 0x84bf5731,
		0xb3d59530, 0xea6bd332, 0xdd011133, 0x90e56b24, 0xa78fa925,
		0xfe31ef27, 0xc95b2d26, 0x4c4d6223, 0x7b27a022, 0x2299e620,
		0x15f32421, 0x28b4782a, 0x1fdeba2b, 0x4660fc29, 0x710a3e28,
		0xf41c712d, 0xc376b32c, 0x9ac8f52e, 0xada2372f, 0xc08d9a70,
		0xf7e75871, 0xae591e73, 0x9933dc72, 0x1c259377, 0x2b4f5176,
		0x72f11774, 0x459bd575, 0x78dc897e, 0x4fb64b7f, 0x16080d7d,
		0x2162cf7c, 0xa4748079, 0x931e4278, 0xcaa0047a, 0xfdcac67b,
		0xb02ebc6c, 0x87447e6d, 0xdefa386f, 0xe990fa6e, 0x6c86b56b,
		0x5bec776a, 0x02523168, 0x3538f369, 0x087faf62, 0x3f156d63,
		0x66ab2b61, 0x51c1e960, 0xd4d7a665, 0xe3bd6464, 0xba032266,
		0x8d69e067, 0x20cbd748, 0x17a11549, 0x4e1f534b, 0x7975914a,
		0xfc63de4f, 0xcb091c4e, 0x92b75a4c, 0xa5dd984d, 0x989ac446,
		0xaff00647, 0xf64e4045, 0xc1248244, 0x4432cd41, 0x73580f40,
		0x2ae64942, 0x1d8c8b43, 0x5068f154, 0x67023355, 0x3ebc7557,
		0x09d6b756, 0x8cc0f853, 0xbbaa3a52, 0xe2147c50, 0xd57ebe51,
		0xe839e25a, 0xdf53205b, 0x86ed6659, 0xb187a458, 0x3491eb5d,
		0x03fb295c, 0x5a456f5e, 0x6d2fad5f, 0x801b35e1, 0xb771f7e0,
		0xeecfb1e2, 0xd9a573e3, 0x5cb33ce6, 0x6bd9fee7, 0x3267b8e5,
		0x050d7ae4, 0x384a26ef, 0x0f20e4ee, 0x569ea2ec, 0x61f460ed,
		0xe4e22fe8, 0xd388ede9, 0x8a36abeb, 0xbd5c69ea, 0xf0b813fd,
		0xc7d2d1fc, 0x9e6c97fe, 0xa90655ff, 0x2c101afa, 0x1b7ad8fb,
		0x42c49ef9, 0x75ae5cf8, 0x48e900f3, 0x7f83c2f2, 0x263d84f0,
		0x115746f1, 0x944109f4, 0xa32bcbf5, 0xfa958df7, 0xcdff4ff6,
		0x605d78d9, 0x5737bad8, 0x0e89fcda, 0x39e33edb, 0xbcf571de,
		0x8b9fb3df, 0xd221f5dd, 0xe54b37dc, 0xd80c6bd7, 0xef66a9d6,
		0xb6d8efd4, 0x81b22dd5, 0x04a462d0, 0x33cea0d1, 0x6a70e6d3,
		0x5d1a24d2, 0x10fe5ec5, 0x27949cc4, 0x7e2adac6, 0x494018c7,
		0xcc5657c2, 0xfb3c95c3, 0xa282d3c1, 0x95e811c0, 0xa8af4dcb,
		0x9fc58fca, 0xc67bc9c8, 0xf1110bc9, 0x740744cc, 0x436d86cd,
		0x1ad3c0cf, 0x2db902ce, 0x4096af91, 0x77fc6d90, 0x2e422b92,
		0x1928e993, 0x9c3ea696, 0xab546497, 0xf2ea2295, 0xc580e094,
		0xf8c7bc9f, 0xcfad7e9e, 0x9613389c, 0xa179fa9d, 0x246fb598,
		0x13057799, 0x4abb319b, 0x7dd1f39a, 0x3035898d, 0x075f4b8c,
		0x5ee10d8e, 0x698bcf8f, 0xec9d808a, 0xdbf7428b, 0x82490489,
		0xb523c688, 0x88649a83, 0xbf0e5882, 0xe6b01e80, 0xd1dadc81,
		0x54cc9384, 0x63a65185, 0x3a181787, 0x0d72d586, 0xa0d0e2a9,
		0x97ba20a8, 0xce0466aa, 0xf96ea4ab, 0x7c78ebae, 0x4b1229af,
		0x12ac6fad, 0x25c6adac, 0x1881f1a7, 0x2feb33a6, 0x765575a4,
		0x413fb7a5, 0xc429f8a0, 0xf3433aa1, 0xaafd7ca3, 0x9d97bea2,
		0xd073c4b5, 0xe71906b4, 0xbea740b6, 0x89cd82b7, 0x0cdbcdb2,
		0x3bb10fb3, 0x620f49b1, 0x55658bb0, 0x6822d7bb, 0x5f4815ba,
		0x06f653b8, 0x319c91b9, 0xb48adebc, 0x83e01cbd, 0xda5e5abf,
		0xed3498be,
	},
	{
		0x00000000, 0x6567bcb8, 0x8bc809aa, 0xeeafb512, 0x5797628f,
		0x32f0de37, 0xdc5f6b25, 0xb938d79d, 0xef28b4c5, 0x8a4f087d,
		0x64e0bd6f, 0x018701d7, 0xb8bfd64a, 0xddd86af2, 0x3377dfe0,
		0x56106358, 0x9f571950, 0xfa30a5e8, 0x149f10fa, 0x71f8ac42,
		0xc8c07bdf, 0xada7c767, 0x43087275, 0x266fcecd, 0x707fad95,
		0x1518112d, 0xfbb7a43f, 0x9ed01887, 0x27e8cf1a, 0x428f73a2,
		0xac20c6b0, 0xc9477a08, 0x3eaf32a0, 0x5bc88e18, 0xb5673b0a,
		0xd00087b2, 0x6938502f, 0x0c5fec97, 0xe2f05985, 0x8797e53d,
		0xd1878665, 0xb4e03add, 0x5a4f8fcf, 0x3f283377, 0x8610e4ea,
		0xe3775852, 0x0dd8ed40, 0x68bf51f8, 0xa1f82bf0, 0xc49f9748,
		0x2a30225a, 0x4f579ee2, 0xf66f497f, 0x9308f5c7, 0x7da740d5,
		0x18c0fc6d, 0x4ed09f35, 0x2bb7238d, 0xc518969f, 0xa07f2a27,
		0x1947fdba, 0x7c204102, 0x928ff410, 0xf7e848a8, 0x3d58149b,
		0x583fa823, 0xb6901d31, 0xd3f7a189, 0x6acf7614, 0x0fa8caac,
		0xe1077fbe, 0x8460c306, 0xd270a05e, 0xb7171ce6, 0x59b8a9f4,
		0x3cdf154c, 0x85e7c2d1, 0xe0807e69, 0x0e2fcb7b, 0x6b4877c3,
		0xa20f0dcb, 0xc768b173, 0x29c70461, 0x4ca0b8d9, 0xf5986f44,
		0x90ffd3fc, 0x7e5066ee, 0x1b37da56, 0x4d27b90e, 0x284005b6,
		0xc6efb0a4, 0xa3880c1c, 0x1ab0db81, 0x7fd76739, 0x9178d22b,
		0xf41f6e93, 0x03f7263b, 0x66909a83, 0x883f2f91, 0xed589329,
		0x546044b4, 0x3107f80c, 0xdfa84d1e, 0xbacff1a6, 0xecdf92fe,
		0x89b82e46, 0x67179b54, 0x027027ec, 0xbb48f071, 0xde2f4cc9,
		0x3080f9db, 0x55e74563, 0x9ca03f6b, 0xf9c783d3, 0x176836c1,
		0x720f8a79, 0xcb375de4, 0xae50e15c, 0x40ff544e, 0x2598e8f6,
		0x73888bae, 0x16ef3716, 0xf8408204, 0x9d273ebc, 0x241fe921,
		0x41785599, 0xafd7e08b, 0xcab05c33, 0x3bb659ed, 0x5ed1e555,
		0xb07e5047, 0xd519ecff, 0x6c213b62, 0x094687da, 0xe7e932c8,
		0x828e8e70, 0xd49eed28, 0xb1f95190, 0x5f56e482, 0x3a31583a,
		0x83098fa7, 0xe66e331f, 0x08c1860d, 0x6da63ab5, 0xa4e140bd,
		0xc186fc05, 0x2f294917, 0x4a4ef5af, 0xf3762232, 0x96119e8a,
		0x78be2b98, 0x1dd99720, 0x4bc9f478, 0x2eae48c0, 0xc001fdd2,
		0xa566416a, 0x1c5e96f7, 0x79392a4f, 0x97969f5d, 0xf2f123e5,
		0x05196b4d, 0x607ed7f5, 0x8ed162e7, 0xebb6de5f, 0x528e09c2,
		0x37e9b57a, 0xd9460068, 0xbc21bcd0, 0xea31df88, 0x8f566330,
		0x61f9d622, 0x049e6a9a, 0xbda6bd07, 0xd8c101bf, 0x366eb4ad,
		0x53090815, 0x9a4e721d, 0xff29cea5, 0x11867bb7, 0x74e1c70f,
		0xcdd91092, 0xa8beac2a, 0x46111938, 0x2376a580, 0x7566c6d8,
		0x10017a60, 0xfeaecf72, 0x9bc973ca, 0x22f1a457, 0x479618ef,
		0xa939adfd, 0xcc5e1145, 0x06ee4d76, 0x6389f1ce, 0x8d2644dc,
		0xe841f864, 0x51792ff9, 0x341e9341, 0xdab12653, 0xbfd69aeb,
		0xe9c6f9b3, 0x8ca1450b, 0x620ef019, 0x07694ca1, 0xbe519b3c,
		0xdb362784, 0x35999296, 0x50fe2e2e, 0x99b95426, 0xfcdee89e,
		0x12715d8c, 0x7716e134, 0xce2e36a9, 0xab498a11, 0x45e63f03,
		0x208183bb, 0x7691e0e3, 0x13f65c5b, 0xfd59e949, 0x983e55f1,
		0x2106826c, 0x44613ed4, 0xaace8bc6, 0xcfa9377e, 0x38417fd6,
		0x5d26c36e, 0xb389767c, 0xd6eecac4, 0x6fd61d59, 0x0ab1a1e1,
		0xe41e14f3, 0x8179a84b, 0xd769cb13, 0xb20e77ab, 0x5ca1c2b9,
		0x39c67e01, 0x80fea99c, 0xe5991524, 0x0b36a036, 0x6e511c8e,
		0xa7166686, 0xc271da3e, 0x2cde6f2c, 0x49b9d394, 0xf0810409,
		0x95e6b8b1, 0x7b490da3, 0x1e2eb11b, 0x483ed243, 0x2d596efb,
		0xc3f6dbe9, 0xa6916751, 0x1fa9b0cc, 0x7ace0c74, 0x9461b966,
		0xf10605de,
	},
} /* crc32.h:5:25 */

// =========================================================================
// This function can be used by asm versions of crc32()
func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */
	return uintptr(uintptr(unsafe.Pointer(&crc_table)))
}

// =========================================================================

// =========================================================================
func Xcrc32_z(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:202:23: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	if buf == uintptr(Z_NULL) {
		return 0
	}

	if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(Ptrdiff_t(0))) {
		// var endian Z_crc_t at bp, 4

		*(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1)
		if *(*uint8)(unsafe.Pointer(bp)) != 0 {
			return crc32_little(tls, crc, buf, len)
		} else {
			return crc32_big(tls, crc, buf, len)
		}
	}
	crc = crc ^ 0xffffffff
	for len >= uint64(8) {
		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
		len = len - uint64(8)
	}
	if len != 0 {
		for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 {
			crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
		}
	}
	return crc ^ 0xffffffff
}

// =========================================================================
func Xcrc32(tls *libc.TLS, crc uint32, buf uintptr, len UInt) uint32 { /* crc32.c:237:23: */
	return z.Xcrc32_z(tls, crc, buf, uint64(len))
}

//
//    This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit
//    integer pointer type. This violates the strict aliasing rule, where a
//    compiler can assume, for optimization purposes, that two pointers to
//    fundamentally different types won't ever point to the same memory. This can
//    manifest as a problem only if one of the pointers is written to. This code
//    only reads from those pointers. So long as this code remains isolated in
//    this compilation unit, there won't be a problem. For this reason, this code
//    should not be copied and pasted into a compilation unit in which other code
//    writes to the buffer that is passed to these routines.
//

// =========================================================================

// =========================================================================
func crc32_little(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:266:21: */
	var c Z_crc_t
	var buf4 uintptr

	c = Z_crc_t(crc)
	c = ^c
	for len != 0 && Ptrdiff_t(buf)&int64(3) != 0 {
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((c^Z_crc_t(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&Z_crc_t(0xff))*4)) ^ c>>8
		len--
	}

	buf4 = buf
	for len >= uint64(32) {
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4))
		len = len - uint64(32)
	}
	for len >= uint64(4) {
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 3*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 2*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 1*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr(c>>24)*4))
		len = len - uint64(4)
	}
	buf = buf4

	if len != 0 {
		for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 {
			c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((c^Z_crc_t(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&Z_crc_t(0xff))*4)) ^ c>>8
		}
	}
	c = ^c
	return uint32(c)
}

// =========================================================================

// =========================================================================
func crc32_big(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:306:21: */
	var c Z_crc_t
	var buf4 uintptr

	c = Z_crc_t(crc)>>24&Z_crc_t(0xff) + Z_crc_t(crc)>>8&Z_crc_t(0xff00) + Z_crc_t(crc)&Z_crc_t(0xff00)<<8 + Z_crc_t(crc)&Z_crc_t(0xff)<<24
	c = ^c
	for len != 0 && Ptrdiff_t(buf)&int64(3) != 0 {
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c>>24^Z_crc_t(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))*4)) ^ c<<8
		len--
	}

	buf4 = buf
	for len >= uint64(32) {
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4))
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4))
		len = len - uint64(32)
	}
	for len >= uint64(4) {
		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
		c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 5*1024 + uintptr(c>>8&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 6*1024 + uintptr(c>>16&Z_crc_t(0xff))*4)) ^ *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 7*1024 + uintptr(c>>24)*4))
		len = len - uint64(4)
	}
	buf = buf4

	if len != 0 {
		for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 {
			c = *(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + 4*1024 + uintptr(c>>24^Z_crc_t(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))*4)) ^ c<<8
		}
	}
	c = ^c
	return uint32(c>>24&Z_crc_t(0xff) + c>>8&Z_crc_t(0xff00) + c&Z_crc_t(0xff00)<<8 + c&Z_crc_t(0xff)<<24)
}

// =========================================================================
func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint32) uint32 { /* crc32.c:344:21: */
	var sum uint32

	sum = uint32(0)
	for vec != 0 {
		if vec&uint32(1) != 0 {
			sum = sum ^ *(*uint32)(unsafe.Pointer(mat))
		}
		vec >>= 1
		mat += 4
	}
	return sum
}

// =========================================================================
func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */
	var n int32

	for n = 0; n < GF2_DIM; n++ {
		*(*uint32)(unsafe.Pointer(square + uintptr(n)*4)) = gf2_matrix_times(tls, mat, *(*uint32)(unsafe.Pointer(mat + uintptr(n)*4)))
	}
}

// =========================================================================
func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:372:13: */
	bp := tls.Alloc(256)
	defer tls.Free(256)

	var n int32
	var row uint32
	// var even [32]uint32 at bp+128, 128
	// even-power-of-two zeros operator
	// var odd [32]uint32 at bp, 128
	// odd-power-of-two zeros operator

	// degenerate case (also disallow negative lengths)
	if len2 <= int64(0) {
		return crc1
	}

	// put operator for one zero bit in odd
	*(*uint32)(unsafe.Pointer(bp)) = 0xedb88320 // CRC-32 polynomial
	row = uint32(1)
	for n = 1; n < GF2_DIM; n++ {
		*(*uint32)(unsafe.Pointer(bp + uintptr(n)*4)) = row
		row <<= 1
	}

	// put operator for two zero bits in even
	gf2_matrix_square(tls, bp+128, bp)

	// put operator for four zero bits in odd
	gf2_matrix_square(tls, bp, bp+128)

	// apply len2 zeros to crc1 (first square will put the operator for one
	//        zero byte, eight zero bits, in even)
	for ok := true; ok; ok = len2 != int64(0) {
		// apply zeros operator for this bit of len2
		gf2_matrix_square(tls, bp+128, bp)
		if len2&int64(1) != 0 {
			crc1 = gf2_matrix_times(tls, bp+128, crc1)
		}
		len2 >>= 1

		// if no more bits set, then done
		if len2 == int64(0) {
			break
		}

		// another iteration of the loop with odd and even swapped
		gf2_matrix_square(tls, bp, bp+128)
		if len2&int64(1) != 0 {
			crc1 = gf2_matrix_times(tls, bp, crc1)
		}
		len2 >>= 1

		// if no more bits set, then done
	}

	// return combined crc
	crc1 = crc1 ^ crc2
	return crc1
}

// =========================================================================
func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:428:15: */
	return crc32_combine_(tls, crc1, crc2, len2)
}

func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:436:15: */
	return crc32_combine_(tls, crc1, crc2, len2)
}

// Reverse the bytes in a 32-bit value

// define NO_GZIP when compiling if you want to disable gzip header and
//    trailer creation by deflate().  NO_GZIP would be used to avoid linking in
//    the crc code when it is not needed.  For shared libraries, gzip encoding
//    should be left enabled.

// ===========================================================================
// Internal compression state.

// number of length codes, not counting the special END_BLOCK code

// number of literal bytes 0..255

// number of Literal or Length codes, including the END_BLOCK code

// number of distance codes

// number of codes used to transfer the bit lengths

// maximum heap size

// All codes must not exceed MAX_BITS bits

// size of bit buffer in bi_buf

// Stream status

// Data structure describing a single value and its code string.
type Ct_data_s = struct {
	Ffc struct{ Ffreq Ush }
	Fdl struct{ Fdad Ush }
} /* zlib.h:84:1 */

// Reverse the bytes in a 32-bit value

// define NO_GZIP when compiling if you want to disable gzip header and
//    trailer creation by deflate().  NO_GZIP would be used to avoid linking in
//    the crc code when it is not needed.  For shared libraries, gzip encoding
//    should be left enabled.

// ===========================================================================
// Internal compression state.

// number of length codes, not counting the special END_BLOCK code

// number of literal bytes 0..255

// number of Literal or Length codes, including the END_BLOCK code

// number of distance codes

// number of codes used to transfer the bit lengths

// maximum heap size

// All codes must not exceed MAX_BITS bits

// size of bit buffer in bi_buf

// Stream status

// Data structure describing a single value and its code string.
type Ct_data = Ct_data_s /* deflate.h:77:7 */

type Static_tree_desc_s = struct {
	Fstatic_tree uintptr
	Fextra_bits  uintptr
	Fextra_base  int32
	Felems       int32
	Fmax_length  int32
	F__ccgo_pad1 [4]byte
} /* deflate.h:84:9 */

type Tree_desc_s = struct {
	Fdyn_tree    uintptr
	Fmax_code    int32
	F__ccgo_pad1 [4]byte
	Fstat_desc   uintptr
} /* zlib.h:84:1 */

type Tree_desc = Tree_desc_s /* deflate.h:90:7 */

type Pos = Ush     /* deflate.h:92:13 */
type Posf = Pos    /* deflate.h:93:17 */
type IPos = uint32 /* deflate.h:94:18 */

// A Pos is an index in the character window. We use short instead of int to
// save space in the various tables. IPos is used only for parameter passing.

type Deflate_state = Internal_state /* deflate.h:276:7 */

var Xdeflate_copyright = *(*[69]int8)(unsafe.Pointer(ts + 72)) /* deflate.c:54:12 */
//
//   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.
//

// ===========================================================================
//  Function prototypes.
type Block_state = uint32 /* deflate.c:71:3 */

type Compress_func = uintptr /* deflate.c:73:21 */

// ===========================================================================
// Local data

// Tail of hash chains

// Matches of length 3 are discarded if their distance exceeds TOO_FAR

// 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 Config_s = struct {
	Fgood_length Ush
	Fmax_lazy    Ush
	Fnice_length Ush
	Fmax_chain   Ush
	Ffunc        Compress_func
} /* deflate.c:120:9 */

// ===========================================================================
// Local data

// Tail of hash chains

// Matches of length 3 are discarded if their distance exceeds TOO_FAR

// 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 Config = Config_s /* deflate.c:126:3 */

var configuration_table = [10]Config{
	//      good lazy nice chain
	/* 0 */ {Ffunc: 0}, // store only
	/* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches
	/* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0},
	/* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0},

	/* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches
	/* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0},
	/* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0},
	/* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0},
	/* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0},
	/* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */

// 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.

// ===========================================================================
// 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) { /* deflate.c:201:12: */
	var n uint32
	var m uint32
	var p uintptr
	var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size

	n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size
	p = (*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2
	for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
		m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2))))
		*(*Posf)(unsafe.Pointer(p)) = func() uint16 {
			if m >= wsize {
				return uint16(m - wsize)
			}
			return uint16(NIL)
		}()
	}
	n = wsize
	p = (*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2
	for ok1 := true; ok1; ok1 = libc.PreDecUint32(&n, 1) != 0 {
		m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2))))
		*(*Posf)(unsafe.Pointer(p)) = func() uint16 {
			if m >= wsize {
				return uint16(m - wsize)
			}
			return uint16(NIL)
		}()
		// If n is not on any hash chain, prev[n] is garbage but
		// its value will never be used.
	}
}

// =========================================================================
func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */
	return z.XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
		Z_DEFAULT_STRATEGY, version, stream_size)
	// To do: ignore strm->next_in if we use it as window
}

// =========================================================================
func XdeflateInit2_(tls *libc.TLS, strm Z_streamp, level int32, method int32, windowBits int32, memLevel int32, strategy int32, version uintptr, stream_size int32) int32 { /* deflate.c:240:13: */
	var s uintptr
	var wrap int32 = 1
	var overlay uintptr
	// We overlay pending_buf and d_buf+l_buf. This works since the average
	// output size for (length,distance) codes is <= 24 bits.

	if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(my_version[0]) || uint64(stream_size) != uint64(unsafe.Sizeof(Z_stream{})) {
		return -6
	}
	if strm == uintptr(Z_NULL) {
		return -2
	}

	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
		}{z.Xzcalloc}))
		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
	}
	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, Voidpf, Voidpf)
		}{z.Xzcfree}))
	}

	if level == -1 {
		level = 6
	}

	if windowBits < 0 { // suppress zlib wrapper
		wrap = 0
		windowBits = -windowBits
	} else if windowBits > 15 {
		wrap = 2 // write gzip wrapper instead
		windowBits = windowBits - 16
	}
	if memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED || windowBits == 8 && wrap != 1 {
		return -2
	}
	if windowBits == 8 {
		windowBits = 9
	} // until 256-byte window bug fixed
	s = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Deflate_state{})))
	if s == uintptr(Z_NULL) {
		return -4
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fstate = s
	(*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm
	(*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset()

	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap
	(*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL)
	(*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits)
	(*Deflate_state)(unsafe.Pointer(s)).Fw_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits)
	(*Deflate_state)(unsafe.Pointer(s)).Fw_mask = (*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1)

	(*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = UInt(memLevel) + UInt(7)
	(*Deflate_state)(unsafe.Pointer(s)).Fhash_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits)
	(*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)
	(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH) - UInt(1)) / UInt(MIN_MATCH)

	(*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fw_size, uint32(uint64(2)*uint64(unsafe.Sizeof(Byte(0)))))
	(*Deflate_state)(unsafe.Pointer(s)).Fprev = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fw_size, uint32(unsafe.Sizeof(Pos(0))))
	(*Deflate_state)(unsafe.Pointer(s)).Fhead = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fhash_size, uint32(unsafe.Sizeof(Pos(0))))

	(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg(0) // nothing written to s->window yet

	(*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = UInt(int32(1) << (memLevel + 6)) // 16K elements by default

	overlay = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize, uint32(uint64(unsafe.Sizeof(Ush(0)))+uint64(2)))
	(*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay
	(*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = Ulg(uint64(Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)) * (uint64(unsafe.Sizeof(Ush(0))) + uint64(2)))

	if (*Deflate_state)(unsafe.Pointer(s)).Fwindow == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fprev == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fhead == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf == uintptr(Z_NULL) {
		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE
		(*Z_stream)(unsafe.Pointer(strm)).Fmsg = z.Xz_errmsg[Z_NEED_DICT - -4]
		z.XdeflateEnd(tls, strm)
		return -4
	}
	(*Deflate_state)(unsafe.Pointer(s)).Fd_buf = overlay + uintptr(uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0))))*2
	(*Deflate_state)(unsafe.Pointer(s)).Fl_buf = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((uint64(1)+uint64(unsafe.Sizeof(Ush(0))))*uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize))

	(*Deflate_state)(unsafe.Pointer(s)).Flevel = level
	(*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy
	(*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method)

	return z.XdeflateReset(tls, strm)
}

var my_version = *(*[7]int8)(unsafe.Pointer(ts + 65)) /* deflate.c:253:23 */

// =========================================================================
// Check for a valid deflate stream state. Return 0 if ok, 1 if not.
func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */
	var s uintptr
	if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
		return 1
	}
	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if s == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fstrm != strm || (*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != GZIP_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != EXTRA_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != NAME_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != COMMENT_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != HCRC_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != BUSY_STATE && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != FINISH_STATE {
		return 1
	}
	return 0
}

// =========================================================================
func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */
	var s uintptr
	var str UInt
	var n UInt
	var wrap int32
	var avail uint32
	var next uintptr

	if deflateStateCheck(tls, strm) != 0 || dictionary == uintptr(Z_NULL) {
		return -2
	}
	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap
	if wrap == 2 || wrap == 1 && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE || (*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0 {
		return -2
	}

	// when using zlib wrappers, compute Adler-32 for provided dictionary
	if wrap == 1 {
		(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength)
	}
	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf

	// if dictionary would fill window, just replace the history
	if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
		if wrap == 0 { // already empty otherwise
			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint64(unsafe.Sizeof(Posf(0))))

			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
			(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
		}
		dictionary += uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size) // use the tail
		dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
	}

	// insert dictionary into window and hash
	avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary
	fill_window(tls, s)
	for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
		str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
		n = (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH-1)
		for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
			(*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str+UInt(MIN_MATCH)-UInt(1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask
			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(str&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2))
			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str)
			str++
		}
		(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str
		(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(MIN_MATCH - 1)
		fill_window(tls, s)
	}
	*(*UInt)(unsafe.Pointer(s + 148)) += (*Deflate_state)(unsafe.Pointer(s)).Flookahead
	(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
	(*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead
	(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0)
	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+160, UInt(MIN_MATCH-1))
	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail
	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap
	return Z_OK
}

// =========================================================================
func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */
	var s uintptr
	var len UInt

	if deflateStateCheck(tls, strm) != 0 {
		return -2
	}
	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	len = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead
	if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
		len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
	}
	if dictionary != uintptr(Z_NULL) && len != 0 {
		libc.Xmemcpy(tls, dictionary, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)+uintptr((*Deflate_state)(unsafe.Pointer(s)).Flookahead)-uintptr(len), uint64(len))
	}
	if dictLength != uintptr(Z_NULL) {
		*(*UInt)(unsafe.Pointer(dictLength)) = len
	}
	return Z_OK
}

// =========================================================================
func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */
	var s uintptr

	if deflateStateCheck(tls, strm) != 0 {
		return -2
	}

	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+28, ULong(0))
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically
	(*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN

	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	(*Deflate_state)(unsafe.Pointer(s)).Fpending = Ulg(0)
	(*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf

	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 {
		(*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH);
	}
	(*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 {
		if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
			return GZIP_STATE
		}
		return func() int32 {
			if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 {
				return INIT_STATE
			}
			return BUSY_STATE
		}()
	}()
	(*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint32 {
		if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
			return z.Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
		}
		return z.Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
	}()
	(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH

	z.X_tr_init(tls, s)

	return Z_OK
}

// =========================================================================
func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */
	var ret int32

	ret = z.XdeflateResetKeep(tls, strm)
	if ret == Z_OK {
		lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
	}
	return ret
}

// =========================================================================
func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */
	if deflateStateCheck(tls, strm) != 0 || (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2 {
		return -2
	}
	(*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head
	return Z_OK
}

// =========================================================================
func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */
	if deflateStateCheck(tls, strm) != 0 {
		return -2
	}
	if pending != uintptr(Z_NULL) {
		*(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending)
	}
	if bits != uintptr(Z_NULL) {
		*(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid
	}
	return Z_OK
}

// =========================================================================
func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */
	var s uintptr
	var put int32

	if deflateStateCheck(tls, strm) != 0 {
		return -2
	}
	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if (*Deflate_state)(unsafe.Pointer(s)).Fd_buf < (*Deflate_state)(unsafe.Pointer(s)).Fpending_out+uintptr(int32(Buf_size+7)>>3) {
		return -5
	}
	for ok := true; ok; ok = bits != 0 {
		put = Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid
		if put > bits {
			put = bits
		}
		*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(value & (int32(1)<<put - 1) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
		*(*int32)(unsafe.Pointer(s + 5908)) += put
		z.X_tr_flush_bits(tls, s)
		value >>= put
		bits = bits - put
	}
	return Z_OK
}

// =========================================================================
func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */
	var s uintptr
	var func1 Compress_func

	if deflateStateCheck(tls, strm) != 0 {
		return -2
	}
	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate

	if level == -1 {
		level = 6
	}
	if level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED {
		return -2
	}
	func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc

	if (strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy || func1 != configuration_table[level].Ffunc) && (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0 {
		// Flush the last buffer:
		var err int32 = z.Xdeflate(tls, strm, Z_BLOCK)
		if err == -2 {
			return err
		}
		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
			return -5
		}
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level {
		if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 && (*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0) {
			if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) {
				slide_hash(tls, s)
			} else {
				*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
			}
			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint64(unsafe.Sizeof(Posf(0))))

			(*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0)
		}
		(*Deflate_state)(unsafe.Pointer(s)).Flevel = level
		(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy)
		(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length)
		(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length)
		(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain)
	}
	(*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy
	return Z_OK
}

// =========================================================================
func XdeflateTune(tls *libc.TLS, strm Z_streamp, good_length int32, max_lazy int32, nice_length int32, max_chain int32) int32 { /* deflate.c:617:13: */
	var s uintptr

	if deflateStateCheck(tls, strm) != 0 {
		return -2
	}
	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length)
	(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy)
	(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length
	(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain)
	return Z_OK
}

// =========================================================================
// 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.
// They are coded as constants here for a reason--if the #define's are
// changed, then this function needs to be changed as well.  The return
// value for 15 and 8 only works for those exact settings.
//
// For any setting other than those defaults for windowBits and memLevel,
// the value returned is a conservative worst case for the maximum expansion
// resulting from using fixed blocks instead of stored blocks, which deflate
// can emit on compressed data for some combinations of the parameters.
//
// This function could be more sophisticated to provide closer upper bounds for
// every combination of windowBits and memLevel.  But even the conservative
// upper bound of about 14% expansion does not seem onerous for output buffer
// allocation.
func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */
	var s uintptr
	var complen ULong
	var wraplen ULong

	// conservative upper bound for compressed data
	complen = sourceLen + (sourceLen+ULong(7))>>3 + (sourceLen+ULong(63))>>6 + ULong(5)

	// if can't get parameters, return conservative bound plus zlib wrapper
	if deflateStateCheck(tls, strm) != 0 {
		return complen + ULong(6)
	}

	// compute wrapper length
	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap {
	case 0: // raw deflate
		wraplen = ULong(0)
		break
	case 1: // zlib wrapper
		wraplen = ULong(6 + func() int32 {
			if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 {
				return 4
			}
			return 0
		}())
		break
	case 2: // gzip wrapper
		wraplen = ULong(18)
		if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header
			var str uintptr
			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
				wraplen = wraplen + ULong(UInt(2)+(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len)
			}
			str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname
			if str != uintptr(Z_NULL) {
				for ok := true; ok; ok = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 {
					wraplen++
				}
			}
			str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment
			if str != uintptr(Z_NULL) {
				for ok1 := true; ok1; ok1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 {
					wraplen++
				}
			}
			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
				wraplen = wraplen + ULong(2)
			}
		}
		break
	default: // for compiler happiness
		wraplen = ULong(6)
	}

	// if not default parameters, return conservative bound
	if (*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15) || (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != UInt(8+7) {
		return complen + wraplen
	}

	// default settings: return tight bound for that case
	return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + ULong(13) - ULong(6) + wraplen
}

// =========================================================================
// 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 UInt) { /* deflate.c:716:12: */
	{
		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b >> 8)
	}

	{
		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b & UInt(0xff))
	}

}

// =========================================================================
// 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 Z_streamp) { /* deflate.c:730:12: */
	var len uint32
	var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate

	z.X_tr_flush_bits(tls, s)
	len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)
	if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out {
		len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
	}
	if len == uint32(0) {
		return
	}

	libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, uint64(len))
	*(*uintptr)(unsafe.Pointer(strm + 16)) += uintptr(len)
	*(*uintptr)(unsafe.Pointer(s + 32)) += uintptr(len)
	*(*ULong)(unsafe.Pointer(strm + 28)) += ULong(len)
	*(*UInt)(unsafe.Pointer(strm + 24)) -= len
	*(*Ulg)(unsafe.Pointer(s + 40)) -= Ulg(len)
	if (*Deflate_state)(unsafe.Pointer(s)).Fpending == Ulg(0) {
		(*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf
	}
}

// ===========================================================================
// Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1].

// =========================================================================
func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */
	var old_flush int32 // value of flush param for previous deflate call
	var s uintptr

	if deflateStateCheck(tls, strm) != 0 || flush > Z_BLOCK || flush < 0 {
		return -2
	}
	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate

	if (*Z_stream)(unsafe.Pointer(strm)).Fnext_out == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0) && (*Z_stream)(unsafe.Pointer(strm)).Fnext_in == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE && flush != Z_FINISH {
		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = z.Xz_errmsg[Z_NEED_DICT - -2]; return -2 }()
	}
	if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = z.Xz_errmsg[Z_NEED_DICT - -5]; return -5 }()
	}

	old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush
	(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush

	// Flush as much pending output as possible
	if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
		flush_pending(tls, strm)
		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(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:
			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
			return 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 (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && flush*2-func() int32 {
		if flush > 4 {
			return 9
		}
		return 0
	}() <= old_flush*2-func() int32 {
		if old_flush > 4 {
			return 9
		}
		return 0
	}() && flush != Z_FINISH {
		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = z.Xz_errmsg[Z_NEED_DICT - -5]; return -5 }()
	}

	// User must not provide more input after the first FINISH:
	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE && (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0) {
		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = z.Xz_errmsg[Z_NEED_DICT - -5]; return -5 }()
	}

	// Write the header
	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE {
		// zlib header
		var header UInt = (UInt(Z_DEFLATED) + ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits-UInt(8))<<4) << 8
		var level_flags UInt

		if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 {
			level_flags = UInt(0)
		} else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 {
			level_flags = UInt(1)
		} else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 {
			level_flags = UInt(2)
		} else {
			level_flags = UInt(3)
		}
		header = header | level_flags<<6
		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) {
			header = header | UInt(PRESET_DICT)
		}
		header = header + (UInt(31) - header%UInt(31))

		putShortMSB(tls, s, header)

		// Save the adler32 of the preset dictionary:
		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) {
			putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16))
			putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&ULong(0xffff)))
		}
		(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE

		// Compression must start with an empty pending buffer
		flush_pending(tls, strm)
		if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
			return Z_OK
		}
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE {
		// gzip header
		(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31)
		}

		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139)
		}

		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8)
		}

		if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) {
			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 {
					if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 {
						return uint8(2)
					}
					return func() uint8 {
						if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 {
							return uint8(4)
						}
						return uint8(0)
					}()
				}()
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE)
			}

			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE

			// Compression must start with an empty pending buffer
			flush_pending(tls, strm)
			if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
				return Z_OK
			}
		} else {
			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(func() int32 {
					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 {
						return 1
					}
					return 0
				}() + func() int32 {
					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
						return 2
					}
					return 0
				}() + func() int32 {
					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) {
						return 0
					}
					return 4
				}() + func() int32 {
					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) {
						return 0
					}
					return 8
				}() + func() int32 {
					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) {
						return 0
					}
					return 16
				}())
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime & ULong(0xff))
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 8 & ULong(0xff))
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 16 & ULong(0xff))
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 24 & ULong(0xff))
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 {
					if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 {
						return uint8(2)
					}
					return func() uint8 {
						if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 {
							return uint8(4)
						}
						return uint8(0)
					}()
				}()
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fos & 0xff)
			}

			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len & UInt(0xff))
				}

				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len >> 8 & UInt(0xff))
				}

			}
			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
				(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf,
					uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending))
			}
			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0)
			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE
		}
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE {
		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
			var left UInt = UInt(Ulg((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len&UInt(0xffff)) - (*Deflate_state)(unsafe.Pointer(s)).Fgzindex)
			for (*Deflate_state)(unsafe.Pointer(s)).Fpending+Ulg(left) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
				var copy UInt = UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending)
				libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending),
					(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), uint64(copy))
				(*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size
				for ok := true; ok; ok = 0 != 0 {
					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
						(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg))
					}
				}
				*(*Ulg)(unsafe.Pointer(s + 56)) += Ulg(copy)
				flush_pending(tls, strm)
				if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
					(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
					return Z_OK
				}
				beg = Ulg(0)
				left = left - copy
			}
			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending),
				(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), uint64(left))
			*(*Ulg)(unsafe.Pointer(s + 40)) += Ulg(left)
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
					(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg))
				}
			}
			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0)
		}
		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE {
		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) {
			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
			var val int32
			for ok2 := true; ok2; ok2 = val != 0 {
				if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
					for ok3 := true; ok3; ok3 = 0 != 0 {
						if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
							(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg))
						}
					}
					flush_pending(tls, strm)
					if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
						(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
						return Z_OK
					}
					beg = Ulg(0)
				}
				val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1)))))
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val)
				}

			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
					(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg))
				}
			}
			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0)
		}
		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE {
		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) {
			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
			var val int32
			for ok5 := true; ok5; ok5 = val != 0 {
				if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
					for ok6 := true; ok6; ok6 = 0 != 0 {
						if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
							(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg))
						}
					}
					flush_pending(tls, strm)
					if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
						(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
						return Z_OK
					}
					beg = Ulg(0)
				}
				val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1)))))
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val)
				}

			}
			for ok7 := true; ok7; ok7 = 0 != 0 {
				if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
					(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending-beg))
				}
			}
		}
		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE {
		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
			if (*Deflate_state)(unsafe.Pointer(s)).Fpending+Ulg(2) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
				flush_pending(tls, strm)
				if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
					(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
					return Z_OK
				}
			}
			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xff))
			}

			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8 & ULong(0xff))
			}

			(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
		}
		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE

		// Compression must start with an empty pending buffer
		flush_pending(tls, strm)
		if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
			return Z_OK
		}
	}

	// Start a new block or continue the current one.
	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0) || (*Deflate_state)(unsafe.Pointer(s)).Flookahead != UInt(0) || flush != Z_NO_FLUSH && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != FINISH_STATE {
		var bstate Block_state

		if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 {
			bstate = deflate_stored(tls, s, flush)
		} else {
			if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY {
				bstate = deflate_huff(tls, s, flush)
			} else {
				if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE {
					bstate = deflate_rle(tls, s, flush)
				} else {
					bstate = (*struct {
						f func(*libc.TLS, uintptr, int32) Block_state
					})(unsafe.Pointer(&struct{ uintptr }{configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc})).f(tls, s, flush)
				}
			}
		}

		if bstate == Finish_started || bstate == Finish_done {
			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE
		}
		if bstate == Need_more || bstate == Finish_started {
			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above
			}
			return 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 == Block_done {
			if flush == Z_PARTIAL_FLUSH {
				z.X_tr_align(tls, s)
			} else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH
				z.X_tr_stored_block(tls, s, uintptr(0), uint32(0), 0)
				// For a full flush, this empty block will be recognized
				// as a special marker by inflate_sync().
				if flush == Z_FULL_FLUSH {
					*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
					libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint64(unsafe.Sizeof(Posf(0))))
					// forget history
					if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
						(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
						(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
						(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
					}
				}
			}
			flush_pending(tls, strm)
			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above
				return Z_OK
			}
		}
	}

	if flush != Z_FINISH {
		return Z_OK
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 {
		return Z_STREAM_END
	}

	// Write the trailer
	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xff))
		}

		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8 & ULong(0xff))
		}

		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16 & ULong(0xff))
		}

		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 24 & ULong(0xff))
		}

		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in & ULong(0xff))
		}

		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 8 & ULong(0xff))
		}

		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 16 & ULong(0xff))
		}

		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 24 & ULong(0xff))
		}

	} else {
		putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16))
		putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&ULong(0xffff)))
	}
	flush_pending(tls, strm)
	// If avail_out is zero, the application will call deflate again
	// to flush the rest.
	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 {
		(*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap
	} // write the trailer only once!
	if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
		return Z_OK
	}
	return Z_STREAM_END
}

// =========================================================================
func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */
	var status int32

	if deflateStateCheck(tls, strm) != 0 {
		return -2
	}

	status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus

	/* Deallocate in reverse order of allocations: */
	{
		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 {
			(*struct {
				f func(*libc.TLS, Voidpf, Voidpf)
			})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf)
		}
	}

	{
		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 {
			(*struct {
				f func(*libc.TLS, Voidpf, Voidpf)
			})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead)
		}
	}

	{
		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 {
			(*struct {
				f func(*libc.TLS, Voidpf, Voidpf)
			})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev)
		}
	}

	{
		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 {
			(*struct {
				f func(*libc.TLS, Voidpf, Voidpf)
			})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow)
		}
	}

	(*struct {
		f func(*libc.TLS, Voidpf, Voidpf)
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)

	if status == BUSY_STATE {
		return -3
	}
	return Z_OK
}

// =========================================================================
// 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 Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */
	var ds uintptr
	var ss uintptr
	var overlay uintptr

	if deflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) {
		return -2
	}

	ss = (*Z_stream)(unsafe.Pointer(source)).Fstate

	libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{})))

	ds = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Deflate_state{})))
	if ds == uintptr(Z_NULL) {
		return -4
	}
	(*Z_stream)(unsafe.Pointer(dest)).Fstate = ds
	libc.Xmemcpy(tls, ds, ss, uint64(unsafe.Sizeof(Deflate_state{})))
	(*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest

	(*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size, uint32(uint64(2)*uint64(unsafe.Sizeof(Byte(0)))))
	(*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size, uint32(unsafe.Sizeof(Pos(0))))
	(*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fhash_size, uint32(unsafe.Sizeof(Pos(0))))
	overlay = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize, uint32(uint64(unsafe.Sizeof(Ush(0)))+uint64(2)))
	(*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay

	if (*Deflate_state)(unsafe.Pointer(ds)).Fwindow == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(ds)).Fprev == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(ds)).Fhead == uintptr(Z_NULL) || (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf == uintptr(Z_NULL) {
		z.XdeflateEnd(tls, dest)
		return -4
	}
	// following zmemcpy do not work for 16-bit MSDOS
	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fwindow, (*Deflate_state)(unsafe.Pointer(ss)).Fwindow, uint64((*Deflate_state)(unsafe.Pointer(ds)).Fw_size*UInt(2))*uint64(unsafe.Sizeof(Byte(0))))
	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fprev, (*Deflate_state)(unsafe.Pointer(ss)).Fprev, uint64((*Deflate_state)(unsafe.Pointer(ds)).Fw_size)*uint64(unsafe.Sizeof(Pos(0))))
	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fhead, (*Deflate_state)(unsafe.Pointer(ss)).Fhead, uint64((*Deflate_state)(unsafe.Pointer(ds)).Fhash_size)*uint64(unsafe.Sizeof(Pos(0))))
	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf, (*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf, uint64(UInt((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf_size)))

	(*Deflate_state)(unsafe.Pointer(ds)).Fpending_out = (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr((int64((*Deflate_state)(unsafe.Pointer(ss)).Fpending_out)-int64((*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf))/1)
	(*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = overlay + uintptr(uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0))))*2
	(*Deflate_state)(unsafe.Pointer(ds)).Fl_buf = (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr((uint64(1)+uint64(unsafe.Sizeof(Ush(0))))*uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize))

	(*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 188   /* &.dyn_ltree */
	(*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2480  /* &.dyn_dtree */
	(*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2724 /* &.bl_tree */

	return Z_OK
}

// ===========================================================================
// 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 Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */
	var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in

	if len > size {
		len = size
	}
	if len == uint32(0) {
		return uint32(0)
	}

	*(*UInt)(unsafe.Pointer(strm + 8)) -= len

	libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(len))
	if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 {
		(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len)
	} else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 {
		(*Z_stream)(unsafe.Pointer(strm)).Fadler = z.Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len)
	}
	*(*uintptr)(unsafe.Pointer(strm)) += uintptr(len)
	*(*ULong)(unsafe.Pointer(strm + 12)) += ULong(len)

	return len
}

// ===========================================================================
// Initialize the "longest match" routines for a new zlib stream
func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */
	(*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = Ulg(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)

	*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
	libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint64(unsafe.Sizeof(Posf(0))))

	// Set the default configuration parameters:
	(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy)
	(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length)
	(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length)
	(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain)

	(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
	(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
	(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0)
	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+160, UInt(MIN_MATCH-1))
	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
	(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0)
}

// ===========================================================================
// 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.
// For 80x86 and 680x0, an optimized version will be provided in match.asm or
// match.S. The code will be functionally equivalent.
func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */
	var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length                                         // max hash chain length
	var scan uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) // current string
	var match uintptr                                                                                                       // matched string
	var len int32                                                                                                           // length of current match
	var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length)                                            // best match length so far
	var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match                                                  // stop if match long enough
	var limit IPos
	if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1) {
		limit = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(MAX_MATCH+MIN_MATCH+1))
	} else {
		limit = uint32(NIL)
	}
	// Stop when cur_match becomes <= limit. To simplify the code,
	// we prevent matches with the string of window index 0.
	var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev
	var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask

	var strend uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH)
	var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1)))
	var scan_end Byte = *(*Bytef)(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 (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match {
		chain_length >>= 2
	}
	// Do not look for matches beyond the end of the input. This is necessary
	// to make deflate deterministic.
	if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
		nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead)
	}

	for ok := true; ok; ok = libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr(cur_match&wmask)*2)))) > limit &&
		libc.PreDecUint32(&chain_length, 1) != uint32(0) {

		match = (*Deflate_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 int32(*(*Bytef)(unsafe.Pointer(match + uintptr(best_len)))) != int32(scan_end) || int32(*(*Bytef)(unsafe.Pointer(match + uintptr(best_len-1)))) != int32(scan_end1) || int32(*(*Bytef)(unsafe.Pointer(match))) != int32(*(*Bytef)(unsafe.Pointer(scan))) || int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) != int32(*(*Bytef)(unsafe.Pointer(scan + 1))) {
			continue
		}

		// 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)
		match++

		// We check for insufficient lookahead only every 8th comparison;
		// the 256th check will be made at strstart+258.
		for ok1 := true; ok1; ok1 = int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && scan < strend {
		}

		len = MAX_MATCH - int32((int64(strend)-int64(scan))/1)
		scan = strend - uintptr(MAX_MATCH)

		if len > best_len {
			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match
			best_len = len
			if len >= nice_match {
				break
			}
			scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1)))
			scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len)))
		}
	}

	if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
		return UInt(best_len)
	}
	return (*Deflate_state)(unsafe.Pointer(s)).Flookahead
}

// ===========================================================================
// 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) { /* deflate.c:1482:12: */
	var n uint32
	var more uint32 // Amount of free space at the end of the window.
	var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size

	for ok := true; ok; ok = (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in != UInt(0) {
		more = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))

		// Deal with !@#$% 64K limit:
		if uint64(unsafe.Sizeof(int32(0))) <= uint64(2) {
			if more == uint32(0) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0) && (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
				more = wsize

			} else if more == libc.Uint32(libc.Uint32FromInt32(-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 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= wsize+((*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1)) {

			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(wsize), uint64(wsize-more))
			*(*UInt)(unsafe.Pointer(s + 152)) -= wsize
			*(*UInt)(unsafe.Pointer(s + 148)) -= wsize // we now have strstart >= MAX_DIST
			*(*int32)(unsafe.Pointer(s + 132)) -= int32(wsize)
			slide_hash(tls, s)
			more = more + wsize
		}
		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(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, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)+uintptr((*Deflate_state)(unsafe.Pointer(s)).Flookahead), more)
		*(*UInt)(unsafe.Pointer(s + 156)) += n

		// Initialize the hash value now that we have some input:
		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert >= UInt(MIN_MATCH) {
			var str UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert
			(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str))))
			(*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str+UInt(1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask
			for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 {
				(*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str+UInt(MIN_MATCH)-UInt(1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask
				*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(str&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2))
				*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str)
				str++
				(*Deflate_state)(unsafe.Pointer(s)).Finsert--
				if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert < UInt(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 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size {
		var curr Ulg = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead)
		var init1 Ulg

		if (*Deflate_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 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr
			if init1 > Ulg(MAX_MATCH) {
				init1 = Ulg(MAX_MATCH)
			}
			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(curr), 0, uint64(uint32(init1)))
			(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = curr + init1
		} else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr+Ulg(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 + Ulg(MAX_MATCH) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water
			if init1 > (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water {
				init1 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water
			}
			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water), 0, uint64(uint32(init1)))
			*(*Ulg)(unsafe.Pointer(s + 5912)) += init1
		}
	}

}

// ===========================================================================
// 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.

// ===========================================================================
// 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 opportunites to have a single copy from next_in to next_out.
func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */
	// 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.
	var min_block uint32 = func() uint32 {
		if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-Ulg(5) > Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size) {
			return (*Deflate_state)(unsafe.Pointer(s)).Fw_size
		}
		return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(5))
	}()

	// Copy as many min_block or larger stored blocks directly to next_out as
	// possible. If flushing, copy the remaining available input to next_out as
	// stored blocks, if there is enough space.
	var len uint32
	var left uint32
	var have uint32
	var last uint32 = uint32(0)
	var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
	for ok := true; ok; ok = 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.
		len = uint32(MAX_STORED)                                                                      // maximum deflate stored block length
		have = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)                      // number of header bytes
		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header
			break
		}
		// maximum stored block length that will fit in avail_out:
		have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have
		left = uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) // bytes left in window
		if Ulg(len) > Ulg(left)+Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) {
			len = left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
		} // limit len to the input
		if len > have {
			len = 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 len < min_block && (len == uint32(0) && flush != Z_FINISH || flush == Z_NO_FLUSH || len != left+(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) {
			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 == Z_FINISH && len == left+(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in {
			last = uint32(1)
		} else {
			last = uint32(0)
		}
		z.X_tr_stored_block(tls, s, uintptr(0), uint32(0), int32(last))

		// Replace the lengths in the dummy stored block with len.
		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(4)))) = Bytef(len)
		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(3)))) = Bytef(len >> 8)
		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(2)))) = Bytef(^len)
		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(1)))) = Bytef(^len >> 8)

		// Write the stored block header bytes.
		flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)

		// Copy uncompressed bytes from the window to next_out.
		if left != 0 {
			if left > len {
				left = len
			}
			libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start), uint64(left))
			*(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16)) += uintptr(left)
			*(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24)) -= left
			*(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 28)) += ULong(left)
			*(*int32)(unsafe.Pointer(s + 132)) += int32(uint32(left))
			len = len - left
		}

		// Copy uncompressed bytes directly from next_in to next_out, updating
		// the check value.
		if len != 0 {
			read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len)
			*(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16)) += uintptr(len)
			*(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24)) -= len
			*(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 28)) += ULong(len)
		}
	}

	// 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 = used - (*Z_stream)(unsafe.Pointer((*Deflate_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 >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history
			(*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash
			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in-uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size), uint64((*Deflate_state)(unsafe.Pointer(s)).Fw_size))
			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
		} else {
			if (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) <= Ulg(used) {
				// Slide the window down.
				*(*UInt)(unsafe.Pointer(s + 148)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size
				libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size), uint64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))
				if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) {
					(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
				} // add a pending slide_hash()
			}
			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart), (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in-uintptr(used), uint64(used))
			*(*UInt)(unsafe.Pointer(s + 148)) += used
		}
		(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
		*(*UInt)(unsafe.Pointer(s + 5900)) += func() uint32 {
			if used > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-(*Deflate_state)(unsafe.Pointer(s)).Finsert {
				return (*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert
			}
			return used
		}()
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) {
		(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
	}

	// If the last block was written to next_out, then done.
	if last != 0 {
		return Finish_done
	}

	// If flushing and all input has been consumed, then done.
	if flush != Z_NO_FLUSH && flush != Z_FINISH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) == (*Deflate_state)(unsafe.Pointer(s)).Fblock_start {
		return Block_done
	}

	// Fill the window with any remaining input.
	have = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - Ulg(1))
	if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in > have && (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= int32((*Deflate_state)(unsafe.Pointer(s)).Fw_size) {
		// Slide the window down.
		*(*int32)(unsafe.Pointer(s + 132)) -= int32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fw_size))
		*(*UInt)(unsafe.Pointer(s + 148)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size
		libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size), uint64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))
		if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) {
			(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
		} // add a pending slide_hash()
		have = have + (*Deflate_state)(unsafe.Pointer(s)).Fw_size // more space now
	}
	if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in {
		have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
	}
	if have != 0 {
		read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart), have)
		*(*UInt)(unsafe.Pointer(s + 148)) += have
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) {
		(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_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 = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3) // number of header bytes
	// maximum stored block length that will fit in pending:
	have = func() uint32 {
		if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-Ulg(have) > Ulg(MAX_STORED) {
			return uint32(MAX_STORED)
		}
		return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have))
	}()
	min_block = func() uint32 {
		if have > (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
			return (*Deflate_state)(unsafe.Pointer(s)).Fw_size
		}
		return have
	}()
	left = uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
	if left >= min_block || (left != 0 || flush == Z_FINISH) && flush != Z_NO_FLUSH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && left <= have {
		len = func() uint32 {
			if left > have {
				return have
			}
			return left
		}()
		if flush == Z_FINISH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && len == left {
			last = uint32(1)
		} else {
			last = uint32(0)
		}
		z.X_tr_stored_block(tls, s, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start), uint32(len), int32(last))
		*(*int32)(unsafe.Pointer(s + 132)) += int32(uint32(len))
		flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
	}

	// We've done all we can with the available input and output.
	if last != 0 {
		return Finish_started
	}
	return Need_more
}

// ===========================================================================
// 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) Block_state { /* deflate.c:1824:19: */
	var hash_head IPos // head of the hash chain
	var bflush int32   // 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 (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) {
			fill_window(tls, s)
			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH {
				return Need_more
			}
			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(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 = IPos(NIL)
		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
			(*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(MIN_MATCH-1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask
			hash_head = IPos(libc.AssignPtrUint16((*Deflate_state)(unsafe.Pointer(s)).Fprev+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2, *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2))))
			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
		}

		// Find the longest match, discarding those <= prev_length.
		// At this point we have always match_length < MIN_MATCH
		if hash_head != IPos(NIL) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart-hash_head <= (*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1) {
			// 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).
			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head)
			// longest_match() sets match_start
		}
		if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) {

			{
				var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))
				var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start)
				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
				dist--
				*(*Ush)(unsafe.Pointer(s + 188 + uintptr(int32(z.X_length_code[len])+LITERALS+1)*4))++
				*(*Ush)(unsafe.Pointer(s + 2480 + uintptr(func() int32 {
					if int32(dist) < 256 {
						return int32(z.X_dist_code[dist])
					}
					return int32(z.X_dist_code[256+int32(dist)>>7])
				}())*4))++
				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
			}

			*(*UInt)(unsafe.Pointer(s + 156)) -= (*Deflate_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 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match && (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table
				for ok := true; ok; ok = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0) {
					(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
					(*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(MIN_MATCH-1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask
					hash_head = IPos(libc.AssignPtrUint16((*Deflate_state)(unsafe.Pointer(s)).Fprev+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2, *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2))))
					*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
					// strstart never exceeds WSIZE-MAX_MATCH, so there are
					// always MIN_MATCH bytes ahead.
				}
				(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
			} else {
				*(*UInt)(unsafe.Pointer(s + 148)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
				(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))))
				(*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask
				// 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

			{
				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
				*(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++
				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
			}

			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
		}
		if bflush != 0 {
			{
				z.X_tr_flush_block(tls, s, func() uintptr {
					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
					}
					return uintptr(Z_NULL)
				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
			}
			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
				if 0 != 0 {
					return Finish_started
				}
				return Need_more
			}
		}

	}
	(*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 {
		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) {
			return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
		}
		return uint32(MIN_MATCH - 1)
	}()
	if flush == Z_FINISH {
		{
			{
				z.X_tr_flush_block(tls, s, func() uintptr {
					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
					}
					return uintptr(Z_NULL)
				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
			}
			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
				if 1 != 0 {
					return Finish_started
				}
				return Need_more
			}
		}

		return Finish_done
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
		{
			z.X_tr_flush_block(tls, s, func() uintptr {
				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
				}
				return uintptr(Z_NULL)
			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
		}
		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
			if 0 != 0 {
				return Finish_started
			}
			return Need_more
		}
	}

	return Block_done
}

// ===========================================================================
// 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) Block_state { /* deflate.c:1926:19: */
	var hash_head IPos // head of hash chain
	var bflush int32   // 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 (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) {
			fill_window(tls, s)
			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH {
				return Need_more
			}
			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(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 = IPos(NIL)
		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
			(*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(MIN_MATCH-1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask
			hash_head = IPos(libc.AssignPtrUint16((*Deflate_state)(unsafe.Pointer(s)).Fprev+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2, *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2))))
			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
		}

		// Find the longest match, discarding those <= prev_length.
		(*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
		(*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start
		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1)

		if hash_head != IPos(NIL) && (*Deflate_state)(unsafe.Pointer(s)).Fprev_length < (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart-hash_head <= (*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1) {
			// 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).
			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head)
			// longest_match() sets match_start

			if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED ||
				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length == UInt(MIN_MATCH) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart-(*Deflate_state)(unsafe.Pointer(s)).Fmatch_start > UInt(TOO_FAR)) {

				// If prev_match is also MIN_MATCH, match_start is garbage
				// but we will ignore the current match anyway.
				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1)
			}
		}
		// If there was a match at the previous step and the current
		// match is not better, output the previous match:
		if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= UInt(MIN_MATCH) && (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= (*Deflate_state)(unsafe.Pointer(s)).Fprev_length {
			var max_insert UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH)
			// Do not insert strings in hash table beyond this.

			{
				var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH))
				var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match)
				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
				dist--
				*(*Ush)(unsafe.Pointer(s + 188 + uintptr(int32(z.X_length_code[len])+LITERALS+1)*4))++
				*(*Ush)(unsafe.Pointer(s + 2480 + uintptr(func() int32 {
					if int32(dist) < 256 {
						return int32(z.X_dist_code[dist])
					}
					return int32(z.X_dist_code[256+int32(dist)>>7])
				}())*4))++
				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
			}

			// 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.
			*(*UInt)(unsafe.Pointer(s + 156)) -= (*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1)
			*(*UInt)(unsafe.Pointer(s + 160)) -= UInt(2)
			for ok := true; ok; ok = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0) {
				if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert {
					(*Deflate_state)(unsafe.Pointer(s)).Fins_h = ((*Deflate_state)(unsafe.Pointer(s)).Fins_h<<(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift ^ UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart+UInt(MIN_MATCH-1)))))) & (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask
					hash_head = IPos(libc.AssignPtrUint16((*Deflate_state)(unsafe.Pointer(s)).Fprev+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart&(*Deflate_state)(unsafe.Pointer(s)).Fw_mask)*2, *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2))))
					*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
				}
			}
			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1)
			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++

			if bflush != 0 {
				{
					z.X_tr_flush_block(tls, s, func() uintptr {
						if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
							return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
						}
						return uintptr(Z_NULL)
					}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
					(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
					flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
				}
				if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
					if 0 != 0 {
						return Finish_started
					}
					return Need_more
				}
			}

		} else if (*Deflate_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.

			{
				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1))))
				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
				*(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++
				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
			}

			if bflush != 0 {
				{
					z.X_tr_flush_block(tls, s, func() uintptr {
						if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
							return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
						}
						return uintptr(Z_NULL)
					}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
					(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
					flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
				}

			}
			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
				return Need_more
			}
		} else {
			// There is no previous match to compare with, wait for
			// the next step to decide.
			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1
			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
		}
	}

	if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 {

		{
			var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1))))
			*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
			*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
			*(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++
			bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
		}

		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
	}
	(*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 {
		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) {
			return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
		}
		return uint32(MIN_MATCH - 1)
	}()
	if flush == Z_FINISH {
		{
			{
				z.X_tr_flush_block(tls, s, func() uintptr {
					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
					}
					return uintptr(Z_NULL)
				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
			}
			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
				if 1 != 0 {
					return Finish_started
				}
				return Need_more
			}
		}

		return Finish_done
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
		{
			z.X_tr_flush_block(tls, s, func() uintptr {
				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
				}
				return uintptr(Z_NULL)
			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
		}
		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
			if 0 != 0 {
				return Finish_started
			}
			return Need_more
		}
	}

	return Block_done
}

// ===========================================================================
// 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) Block_state { /* deflate.c:2057:19: */
	var bflush int32 // set if current block must be flushed
	var prev UInt    // byte at distance one to match
	var scan uintptr
	var strend uintptr // 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 (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) {
			fill_window(tls, s)
			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) && flush == Z_NO_FLUSH {
				return Need_more
			}
			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
				break
			} // flush the current block
		}

		// See how many times the previous byte repeats
		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0) {
			scan = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uintptr(1)
			prev = UInt(*(*Bytef)(unsafe.Pointer(scan)))
			if prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) {
				strend = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH)
				for ok := true; ok; ok = prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && scan < strend {
				}
				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MAX_MATCH) - UInt((int64(strend)-int64(scan))/1)
				if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
					(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead
				}
			}

		}

		// Emit match if have run of MIN_MATCH or longer, else emit literal
		if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) {

			{
				var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))
				var dist Ush = Ush(1)
				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
				dist--
				*(*Ush)(unsafe.Pointer(s + 188 + uintptr(int32(z.X_length_code[len])+LITERALS+1)*4))++
				*(*Ush)(unsafe.Pointer(s + 2480 + uintptr(func() int32 {
					if int32(dist) < 256 {
						return int32(z.X_dist_code[dist])
					}
					return int32(z.X_dist_code[256+int32(dist)>>7])
				}())*4))++
				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
			}

			*(*UInt)(unsafe.Pointer(s + 156)) -= (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
			*(*UInt)(unsafe.Pointer(s + 148)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
		} else {
			// No match, output a literal byte

			{
				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
				*(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++
				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
			}

			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
		}
		if bflush != 0 {
			{
				z.X_tr_flush_block(tls, s, func() uintptr {
					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
					}
					return uintptr(Z_NULL)
				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
			}
			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
				if 0 != 0 {
					return Finish_started
				}
				return Need_more
			}
		}

	}
	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
	if flush == Z_FINISH {
		{
			{
				z.X_tr_flush_block(tls, s, func() uintptr {
					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
					}
					return uintptr(Z_NULL)
				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
			}
			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
				if 1 != 0 {
					return Finish_started
				}
				return Need_more
			}
		}

		return Finish_done
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
		{
			z.X_tr_flush_block(tls, s, func() uintptr {
				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
				}
				return uintptr(Z_NULL)
			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
		}
		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
			if 0 != 0 {
				return Finish_started
			}
			return Need_more
		}
	}

	return Block_done
}

// ===========================================================================
// 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) Block_state { /* deflate.c:2130:19: */
	var bflush int32 // set if current block must be flushed

	for {
		// Make sure that we have a literal to write.
		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
			fill_window(tls, s)
			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
				if flush == Z_NO_FLUSH {
					return Need_more
				}
				break // flush the current block
			}
		}

		// Output a literal byte
		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)

		{
			var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
			*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
			*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
			*(*Ush)(unsafe.Pointer(s + 188 + uintptr(cc)*4))++
			bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
		}

		(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
		(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
		if bflush != 0 {
			{
				z.X_tr_flush_block(tls, s, func() uintptr {
					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
					}
					return uintptr(Z_NULL)
				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
			}
			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
				if 0 != 0 {
					return Finish_started
				}
				return Need_more
			}
		}

	}
	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
	if flush == Z_FINISH {
		{
			{
				z.X_tr_flush_block(tls, s, func() uintptr {
					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
					}
					return uintptr(Z_NULL)
				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
			}
			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
				if 1 != 0 {
					return Finish_started
				}
				return Need_more
			}
		}

		return Finish_done
	}
	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
		{
			z.X_tr_flush_block(tls, s, func() uintptr {
				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
				}
				return uintptr(Z_NULL)
			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
		}
		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
			if 0 != 0 {
				return Finish_started
			}
			return Need_more
		}
	}

	return Block_done
}

// Reverse the bytes in a 32-bit value

// inftrees.h -- header to use inftrees.c
// Copyright (C) 1995-2005, 2010 Mark Adler
// For conditions of distribution and use, see copyright notice in zlib.h

// WARNING: this file should *not* be used by applications. It is
//    part of the implementation of the compression library and is
//    subject to change. Applications should only use zlib.h.
//

// Structure for decoding tables.  Each entry provides either the
//    information needed to do the operation requested by the code that
//    indexed that table entry, or it provides a pointer to another
//    table that indexes more bits of the code.  op indicates whether
//    the entry is a pointer to another table, a literal, a length or
//    distance, an end-of-block, or an invalid code.  For a table
//    pointer, the low four bits of op is the number of index bits of
//    that table.  For a length or distance, the low four bits of op
//    is the number of extra bits to get after the code.  bits is
//    the number of bits in this code or part of the code to drop off
//    of the bit buffer.  val is the actual byte to output in the case
//    of a literal, the base length or distance, or the offset from
//    the current table to the next table.  Each entry is four bytes.
type Code = struct {
	Fop   uint8
	Fbits uint8
	Fval  uint16
} /* inftrees.h:28:3 */

// op values as set by inflate_table():
//     00000000 - literal
//     0000tttt - table link, tttt != 0 is the number of table index bits
//     0001eeee - length or distance, eeee is the number of extra bits
//     01100000 - end of block
//     01000000 - invalid code
//

// Maximum size of the dynamic table.  The maximum number of code structures is
//    1444, which is the sum of 852 for literal/length codes and 592 for distance
//    codes.  These values were found by exhaustive searches using the program
//    examples/enough.c found in the zlib distribtution.  The arguments to that
//    program are the number of symbols, the initial root table size, and the
//    maximum bit length of a code.  "enough 286 9 15" for literal/length codes
//    returns returns 852, and "enough 30 6 15" for distance codes returns 592.
//    The initial root table size (9 or 6) is found in the fifth argument of the
//    inflate_table() calls in inflate.c and infback.c.  If the root table size is
//    changed, then these maximum sizes would be need to be recalculated and
//    updated.

// Type of code to build for inflate_table()
type Codetype = uint32 /* inftrees.h:58:3 */
// inflate.h -- internal inflate state definition
// Copyright (C) 1995-2016 Mark Adler
// For conditions of distribution and use, see copyright notice in zlib.h

// WARNING: this file should *not* be used by applications. It is
//    part of the implementation of the compression library and is
//    subject to change. Applications should only use zlib.h.
//

// define NO_GZIP when compiling if you want to disable gzip header and
//    trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
//    the crc code when it is not needed.  For shared libraries, gzip decoding
//    should be left enabled.

// Possible inflate modes between inflate() calls
type Inflate_mode = uint32 /* inflate.h:53:3 */

//
//     State transitions between above modes -
//
//     (most modes can go to BAD or MEM on error -- not shown for clarity)
//
//     Process header:
//         HEAD -> (gzip) or (zlib) or (raw)
//         (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT ->
//                   HCRC -> TYPE
//         (zlib) -> DICTID or TYPE
//         DICTID -> DICT -> TYPE
//         (raw) -> TYPEDO
//     Read deflate blocks:
//             TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK
//             STORED -> COPY_ -> COPY -> TYPE
//             TABLE -> LENLENS -> CODELENS -> LEN_
//             LEN_ -> LEN
//     Read deflate codes in fixed or dynamic block:
//                 LEN -> LENEXT or LIT or TYPE
//                 LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
//                 LIT -> LEN
//     Process trailer:
//         CHECK -> LENGTH -> DONE
//

// State maintained between inflate() calls -- approximately 7K bytes, not
//    including the allocated sliding window, which is up to 32K bytes.
type Inflate_state = struct {
	Fstrm        Z_streamp
	Fmode        Inflate_mode
	Flast        int32
	Fwrap        int32
	Fhavedict    int32
	Fflags       int32
	Fdmax        uint32
	Fcheck       uint32
	Ftotal       uint32
	Fhead        Gz_headerp
	Fwbits       uint32
	Fwsize       uint32
	Fwhave       uint32
	Fwnext       uint32
	Fwindow      uintptr
	Fhold        uint32
	Fbits        uint32
	Flength      uint32
	Foffset      uint32
	Fextra       uint32
	F__ccgo_pad1 [4]byte
	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]Code
	Fsane        int32
	Fback        int32
	Fwas         uint32
	F__ccgo_pad2 [4]byte
} /* inflate.h:82:1 */

//
//    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 Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */
	var state uintptr

	if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts + 65))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) {
		return -6
	}
	if strm == uintptr(Z_NULL) || window == uintptr(Z_NULL) || windowBits < 8 || windowBits > 15 {
		return -2
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error
	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
		}{z.Xzcalloc}))
		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
	}
	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, Voidpf, Voidpf)
		}{z.Xzcfree}))
	}
	state = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Inflate_state{})))
	if state == uintptr(Z_NULL) {
		return -4
	}

	(*Z_stream)(unsafe.Pointer(strm)).Fstate = state
	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768
	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits)
	(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << windowBits
	(*Inflate_state)(unsafe.Pointer(state)).Fwindow = window
	(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
	return Z_OK
}

//
//    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) { /* infback.c:82:12: */
	(*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix))
	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix))
	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5)
}

var lenfix = [512]Code{
	{Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(80)}, {Fbits: uint8(8), Fval: uint16(16)}, {Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(112)}, {Fbits: uint8(8), Fval: uint16(48)},
	{Fbits: uint8(9), Fval: uint16(192)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(96)}, {Fbits: uint8(8), Fval: uint16(32)}, {Fbits: uint8(9), Fval: uint16(160)}, {Fbits: uint8(8)}, {Fbits: uint8(8), Fval: uint16(128)},
	{Fbits: uint8(8), Fval: uint16(64)}, {Fbits: uint8(9), Fval: uint16(224)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(88)}, {Fbits: uint8(8), Fval: uint16(24)}, {Fbits: uint8(9), Fval: uint16(144)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)},
	{Fbits: uint8(8), Fval: uint16(120)}, {Fbits: uint8(8), Fval: uint16(56)}, {Fbits: uint8(9), Fval: uint16(208)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(104)}, {Fbits: uint8(8), Fval: uint16(40)}, {Fbits: uint8(9), Fval: uint16(176)},
	{Fbits: uint8(8), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(136)}, {Fbits: uint8(8), Fval: uint16(72)}, {Fbits: uint8(9), Fval: uint16(240)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(84)}, {Fbits: uint8(8), Fval: uint16(20)},
	{Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(116)}, {Fbits: uint8(8), Fval: uint16(52)}, {Fbits: uint8(9), Fval: uint16(200)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(100)},
	{Fbits: uint8(8), Fval: uint16(36)}, {Fbits: uint8(9), Fval: uint16(168)}, {Fbits: uint8(8), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(132)}, {Fbits: uint8(8), Fval: uint16(68)}, {Fbits: uint8(9), Fval: uint16(232)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)},
	{Fbits: uint8(8), Fval: uint16(92)}, {Fbits: uint8(8), Fval: uint16(28)}, {Fbits: uint8(9), Fval: uint16(152)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(124)}, {Fbits: uint8(8), Fval: uint16(60)}, {Fbits: uint8(9), Fval: uint16(216)},
	{Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(108)}, {Fbits: uint8(8), Fval: uint16(44)}, {Fbits: uint8(9), Fval: uint16(184)}, {Fbits: uint8(8), Fval: uint16(12)}, {Fbits: uint8(8), Fval: uint16(140)}, {Fbits: uint8(8), Fval: uint16(76)},
	{Fbits: uint8(9), Fval: uint16(248)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(82)}, {Fbits: uint8(8), Fval: uint16(18)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(114)},
	{Fbits: uint8(8), Fval: uint16(50)}, {Fbits: uint8(9), Fval: uint16(196)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(98)}, {Fbits: uint8(8), Fval: uint16(34)}, {Fbits: uint8(9), Fval: uint16(164)}, {Fbits: uint8(8), Fval: uint16(2)},
	{Fbits: uint8(8), Fval: uint16(130)}, {Fbits: uint8(8), Fval: uint16(66)}, {Fbits: uint8(9), Fval: uint16(228)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(90)}, {Fbits: uint8(8), Fval: uint16(26)}, {Fbits: uint8(9), Fval: uint16(148)},
	{Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(122)}, {Fbits: uint8(8), Fval: uint16(58)}, {Fbits: uint8(9), Fval: uint16(212)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(106)}, {Fbits: uint8(8), Fval: uint16(42)},
	{Fbits: uint8(9), Fval: uint16(180)}, {Fbits: uint8(8), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(138)}, {Fbits: uint8(8), Fval: uint16(74)}, {Fbits: uint8(9), Fval: uint16(244)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(86)},
	{Fbits: uint8(8), Fval: uint16(22)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(118)}, {Fbits: uint8(8), Fval: uint16(54)}, {Fbits: uint8(9), Fval: uint16(204)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)},
	{Fbits: uint8(8), Fval: uint16(102)}, {Fbits: uint8(8), Fval: uint16(38)}, {Fbits: uint8(9), Fval: uint16(172)}, {Fbits: uint8(8), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(134)}, {Fbits: uint8(8), Fval: uint16(70)}, {Fbits: uint8(9), Fval: uint16(236)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(94)}, {Fbits: uint8(8), Fval: uint16(30)}, {Fbits: uint8(9), Fval: uint16(156)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(126)}, {Fbits: uint8(8), Fval: uint16(62)},
	{Fbits: uint8(9), Fval: uint16(220)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(110)}, {Fbits: uint8(8), Fval: uint16(46)}, {Fbits: uint8(9), Fval: uint16(188)}, {Fbits: uint8(8), Fval: uint16(14)}, {Fbits: uint8(8), Fval: uint16(142)},
	{Fbits: uint8(8), Fval: uint16(78)}, {Fbits: uint8(9), Fval: uint16(252)}, {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(81)}, {Fbits: uint8(8), Fval: uint16(17)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)},
	{Fbits: uint8(8), Fval: uint16(113)}, {Fbits: uint8(8), Fval: uint16(49)}, {Fbits: uint8(9), Fval: uint16(194)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(97)}, {Fbits: uint8(8), Fval: uint16(33)}, {Fbits: uint8(9), Fval: uint16(162)},
	{Fbits: uint8(8), Fval: uint16(1)}, {Fbits: uint8(8), Fval: uint16(129)}, {Fbits: uint8(8), Fval: uint16(65)}, {Fbits: uint8(9), Fval: uint16(226)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(89)}, {Fbits: uint8(8), Fval: uint16(25)},
	{Fbits: uint8(9), Fval: uint16(146)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(121)}, {Fbits: uint8(8), Fval: uint16(57)}, {Fbits: uint8(9), Fval: uint16(210)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(105)},
	{Fbits: uint8(8), Fval: uint16(41)}, {Fbits: uint8(9), Fval: uint16(178)}, {Fbits: uint8(8), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(137)}, {Fbits: uint8(8), Fval: uint16(73)}, {Fbits: uint8(9), Fval: uint16(242)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)},
	{Fbits: uint8(8), Fval: uint16(85)}, {Fbits: uint8(8), Fval: uint16(21)}, {Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(117)}, {Fbits: uint8(8), Fval: uint16(53)}, {Fbits: uint8(9), Fval: uint16(202)},
	{Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(101)}, {Fbits: uint8(8), Fval: uint16(37)}, {Fbits: uint8(9), Fval: uint16(170)}, {Fbits: uint8(8), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(133)}, {Fbits: uint8(8), Fval: uint16(69)},
	{Fbits: uint8(9), Fval: uint16(234)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(93)}, {Fbits: uint8(8), Fval: uint16(29)}, {Fbits: uint8(9), Fval: uint16(154)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(125)},
	{Fbits: uint8(8), Fval: uint16(61)}, {Fbits: uint8(9), Fval: uint16(218)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(109)}, {Fbits: uint8(8), Fval: uint16(45)}, {Fbits: uint8(9), Fval: uint16(186)}, {Fbits: uint8(8), Fval: uint16(13)},
	{Fbits: uint8(8), Fval: uint16(141)}, {Fbits: uint8(8), Fval: uint16(77)}, {Fbits: uint8(9), Fval: uint16(250)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(19)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195)},
	{Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(115)}, {Fbits: uint8(8), Fval: uint16(51)}, {Fbits: uint8(9), Fval: uint16(198)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(35)},
	{Fbits: uint8(9), Fval: uint16(166)}, {Fbits: uint8(8), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(131)}, {Fbits: uint8(8), Fval: uint16(67)}, {Fbits: uint8(9), Fval: uint16(230)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(91)},
	{Fbits: uint8(8), Fval: uint16(27)}, {Fbits: uint8(9), Fval: uint16(150)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(123)}, {Fbits: uint8(8), Fval: uint16(59)}, {Fbits: uint8(9), Fval: uint16(214)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)},
	{Fbits: uint8(8), Fval: uint16(107)}, {Fbits: uint8(8), Fval: uint16(43)}, {Fbits: uint8(9), Fval: uint16(182)}, {Fbits: uint8(8), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(139)}, {Fbits: uint8(8), Fval: uint16(75)}, {Fbits: uint8(9), Fval: uint16(246)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(87)}, {Fbits: uint8(8), Fval: uint16(23)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(119)}, {Fbits: uint8(8), Fval: uint16(55)},
	{Fbits: uint8(9), Fval: uint16(206)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(103)}, {Fbits: uint8(8), Fval: uint16(39)}, {Fbits: uint8(9), Fval: uint16(174)}, {Fbits: uint8(8), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(135)},
	{Fbits: uint8(8), Fval: uint16(71)}, {Fbits: uint8(9), Fval: uint16(238)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(95)}, {Fbits: uint8(8), Fval: uint16(31)}, {Fbits: uint8(9), Fval: uint16(158)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)},
	{Fbits: uint8(8), Fval: uint16(127)}, {Fbits: uint8(8), Fval: uint16(63)}, {Fbits: uint8(9), Fval: uint16(222)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(111)}, {Fbits: uint8(8), Fval: uint16(47)}, {Fbits: uint8(9), Fval: uint16(190)},
	{Fbits: uint8(8), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(143)}, {Fbits: uint8(8), Fval: uint16(79)}, {Fbits: uint8(9), Fval: uint16(254)}, {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(80)}, {Fbits: uint8(8), Fval: uint16(16)},
	{Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(112)}, {Fbits: uint8(8), Fval: uint16(48)}, {Fbits: uint8(9), Fval: uint16(193)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(96)},
	{Fbits: uint8(8), Fval: uint16(32)}, {Fbits: uint8(9), Fval: uint16(161)}, {Fbits: uint8(8)}, {Fbits: uint8(8), Fval: uint16(128)}, {Fbits: uint8(8), Fval: uint16(64)}, {Fbits: uint8(9), Fval: uint16(225)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)},
	{Fbits: uint8(8), Fval: uint16(88)}, {Fbits: uint8(8), Fval: uint16(24)}, {Fbits: uint8(9), Fval: uint16(145)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(120)}, {Fbits: uint8(8), Fval: uint16(56)}, {Fbits: uint8(9), Fval: uint16(209)},
	{Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(104)}, {Fbits: uint8(8), Fval: uint16(40)}, {Fbits: uint8(9), Fval: uint16(177)}, {Fbits: uint8(8), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(136)}, {Fbits: uint8(8), Fval: uint16(72)},
	{Fbits: uint8(9), Fval: uint16(241)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(84)}, {Fbits: uint8(8), Fval: uint16(20)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(116)},
	{Fbits: uint8(8), Fval: uint16(52)}, {Fbits: uint8(9), Fval: uint16(201)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(100)}, {Fbits: uint8(8), Fval: uint16(36)}, {Fbits: uint8(9), Fval: uint16(169)}, {Fbits: uint8(8), Fval: uint16(4)},
	{Fbits: uint8(8), Fval: uint16(132)}, {Fbits: uint8(8), Fval: uint16(68)}, {Fbits: uint8(9), Fval: uint16(233)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(92)}, {Fbits: uint8(8), Fval: uint16(28)}, {Fbits: uint8(9), Fval: uint16(153)},
	{Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(124)}, {Fbits: uint8(8), Fval: uint16(60)}, {Fbits: uint8(9), Fval: uint16(217)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(108)}, {Fbits: uint8(8), Fval: uint16(44)},
	{Fbits: uint8(9), Fval: uint16(185)}, {Fbits: uint8(8), Fval: uint16(12)}, {Fbits: uint8(8), Fval: uint16(140)}, {Fbits: uint8(8), Fval: uint16(76)}, {Fbits: uint8(9), Fval: uint16(249)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(82)},
	{Fbits: uint8(8), Fval: uint16(18)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(114)}, {Fbits: uint8(8), Fval: uint16(50)}, {Fbits: uint8(9), Fval: uint16(197)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)},
	{Fbits: uint8(8), Fval: uint16(98)}, {Fbits: uint8(8), Fval: uint16(34)}, {Fbits: uint8(9), Fval: uint16(165)}, {Fbits: uint8(8), Fval: uint16(2)}, {Fbits: uint8(8), Fval: uint16(130)}, {Fbits: uint8(8), Fval: uint16(66)}, {Fbits: uint8(9), Fval: uint16(229)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(90)}, {Fbits: uint8(8), Fval: uint16(26)}, {Fbits: uint8(9), Fval: uint16(149)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(122)}, {Fbits: uint8(8), Fval: uint16(58)},
	{Fbits: uint8(9), Fval: uint16(213)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(106)}, {Fbits: uint8(8), Fval: uint16(42)}, {Fbits: uint8(9), Fval: uint16(181)}, {Fbits: uint8(8), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(138)},
	{Fbits: uint8(8), Fval: uint16(74)}, {Fbits: uint8(9), Fval: uint16(245)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(86)}, {Fbits: uint8(8), Fval: uint16(22)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)},
	{Fbits: uint8(8), Fval: uint16(118)}, {Fbits: uint8(8), Fval: uint16(54)}, {Fbits: uint8(9), Fval: uint16(205)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(102)}, {Fbits: uint8(8), Fval: uint16(38)}, {Fbits: uint8(9), Fval: uint16(173)},
	{Fbits: uint8(8), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(134)}, {Fbits: uint8(8), Fval: uint16(70)}, {Fbits: uint8(9), Fval: uint16(237)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(94)}, {Fbits: uint8(8), Fval: uint16(30)},
	{Fbits: uint8(9), Fval: uint16(157)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(126)}, {Fbits: uint8(8), Fval: uint16(62)}, {Fbits: uint8(9), Fval: uint16(221)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(110)},
	{Fbits: uint8(8), Fval: uint16(46)}, {Fbits: uint8(9), Fval: uint16(189)}, {Fbits: uint8(8), Fval: uint16(14)}, {Fbits: uint8(8), Fval: uint16(142)}, {Fbits: uint8(8), Fval: uint16(78)}, {Fbits: uint8(9), Fval: uint16(253)}, {Fop: uint8(96), Fbits: uint8(7)},
	{Fbits: uint8(8), Fval: uint16(81)}, {Fbits: uint8(8), Fval: uint16(17)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(113)}, {Fbits: uint8(8), Fval: uint16(49)}, {Fbits: uint8(9), Fval: uint16(195)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(97)}, {Fbits: uint8(8), Fval: uint16(33)}, {Fbits: uint8(9), Fval: uint16(163)}, {Fbits: uint8(8), Fval: uint16(1)}, {Fbits: uint8(8), Fval: uint16(129)}, {Fbits: uint8(8), Fval: uint16(65)},
	{Fbits: uint8(9), Fval: uint16(227)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(89)}, {Fbits: uint8(8), Fval: uint16(25)}, {Fbits: uint8(9), Fval: uint16(147)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(121)},
	{Fbits: uint8(8), Fval: uint16(57)}, {Fbits: uint8(9), Fval: uint16(211)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(105)}, {Fbits: uint8(8), Fval: uint16(41)}, {Fbits: uint8(9), Fval: uint16(179)}, {Fbits: uint8(8), Fval: uint16(9)},
	{Fbits: uint8(8), Fval: uint16(137)}, {Fbits: uint8(8), Fval: uint16(73)}, {Fbits: uint8(9), Fval: uint16(243)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(85)}, {Fbits: uint8(8), Fval: uint16(21)}, {Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258)},
	{Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(117)}, {Fbits: uint8(8), Fval: uint16(53)}, {Fbits: uint8(9), Fval: uint16(203)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(101)}, {Fbits: uint8(8), Fval: uint16(37)},
	{Fbits: uint8(9), Fval: uint16(171)}, {Fbits: uint8(8), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(133)}, {Fbits: uint8(8), Fval: uint16(69)}, {Fbits: uint8(9), Fval: uint16(235)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(93)},
	{Fbits: uint8(8), Fval: uint16(29)}, {Fbits: uint8(9), Fval: uint16(155)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(125)}, {Fbits: uint8(8), Fval: uint16(61)}, {Fbits: uint8(9), Fval: uint16(219)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)},
	{Fbits: uint8(8), Fval: uint16(109)}, {Fbits: uint8(8), Fval: uint16(45)}, {Fbits: uint8(9), Fval: uint16(187)}, {Fbits: uint8(8), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(141)}, {Fbits: uint8(8), Fval: uint16(77)}, {Fbits: uint8(9), Fval: uint16(251)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(19)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(115)}, {Fbits: uint8(8), Fval: uint16(51)},
	{Fbits: uint8(9), Fval: uint16(199)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(35)}, {Fbits: uint8(9), Fval: uint16(167)}, {Fbits: uint8(8), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(131)},
	{Fbits: uint8(8), Fval: uint16(67)}, {Fbits: uint8(9), Fval: uint16(231)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(91)}, {Fbits: uint8(8), Fval: uint16(27)}, {Fbits: uint8(9), Fval: uint16(151)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)},
	{Fbits: uint8(8), Fval: uint16(123)}, {Fbits: uint8(8), Fval: uint16(59)}, {Fbits: uint8(9), Fval: uint16(215)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(107)}, {Fbits: uint8(8), Fval: uint16(43)}, {Fbits: uint8(9), Fval: uint16(183)},
	{Fbits: uint8(8), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(139)}, {Fbits: uint8(8), Fval: uint16(75)}, {Fbits: uint8(9), Fval: uint16(247)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(87)}, {Fbits: uint8(8), Fval: uint16(23)},
	{Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(119)}, {Fbits: uint8(8), Fval: uint16(55)}, {Fbits: uint8(9), Fval: uint16(207)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(103)},
	{Fbits: uint8(8), Fval: uint16(39)}, {Fbits: uint8(9), Fval: uint16(175)}, {Fbits: uint8(8), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(135)}, {Fbits: uint8(8), Fval: uint16(71)}, {Fbits: uint8(9), Fval: uint16(239)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)},
	{Fbits: uint8(8), Fval: uint16(95)}, {Fbits: uint8(8), Fval: uint16(31)}, {Fbits: uint8(9), Fval: uint16(159)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(127)}, {Fbits: uint8(8), Fval: uint16(63)}, {Fbits: uint8(9), Fval: uint16(223)},
	{Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(111)}, {Fbits: uint8(8), Fval: uint16(47)}, {Fbits: uint8(9), Fval: uint16(191)}, {Fbits: uint8(8), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(143)}, {Fbits: uint8(8), Fval: uint16(79)},
	{Fbits: uint8(9), Fval: uint16(255)},
} /* inffixed.h:10:23 */
var distfix = [32]Code{
	{Fop: uint8(16), Fbits: uint8(5), Fval: uint16(1)}, {Fop: uint8(23), Fbits: uint8(5), Fval: uint16(257)}, {Fop: uint8(19), Fbits: uint8(5), Fval: uint16(17)}, {Fop: uint8(27), Fbits: uint8(5), Fval: uint16(4097)}, {Fop: uint8(17), Fbits: uint8(5), Fval: uint16(5)}, {Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1025)},
	{Fop: uint8(21), Fbits: uint8(5), Fval: uint16(65)}, {Fop: uint8(29), Fbits: uint8(5), Fval: uint16(16385)}, {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(3)}, {Fop: uint8(24), Fbits: uint8(5), Fval: uint16(513)}, {Fop: uint8(20), Fbits: uint8(5), Fval: uint16(33)}, {Fop: uint8(28), Fbits: uint8(5), Fval: uint16(8193)},
	{Fop: uint8(18), Fbits: uint8(5), Fval: uint16(9)}, {Fop: uint8(26), Fbits: uint8(5), Fval: uint16(2049)}, {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(129)}, {Fop: uint8(64), Fbits: uint8(5)}, {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(2)}, {Fop: uint8(23), Fbits: uint8(5), Fval: uint16(385)},
	{Fop: uint8(19), Fbits: uint8(5), Fval: uint16(25)}, {Fop: uint8(27), Fbits: uint8(5), Fval: uint16(6145)}, {Fop: uint8(17), Fbits: uint8(5), Fval: uint16(7)}, {Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1537)}, {Fop: uint8(21), Fbits: uint8(5), Fval: uint16(97)}, {Fop: uint8(29), Fbits: uint8(5), Fval: uint16(24577)},
	{Fop: uint8(16), Fbits: uint8(5), Fval: uint16(4)}, {Fop: uint8(24), Fbits: uint8(5), Fval: uint16(769)}, {Fop: uint8(20), Fbits: uint8(5), Fval: uint16(49)}, {Fop: uint8(28), Fbits: uint8(5), Fval: uint16(12289)}, {Fop: uint8(18), Fbits: uint8(5), Fval: uint16(13)}, {Fop: uint8(26), Fbits: uint8(5), Fval: uint16(3073)},
	{Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)},
} /* inffixed.h:87:23 */

// 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.

//
//    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 Z_streamp, in In_func, in_desc uintptr, out Out_func, out_desc uintptr) int32 { /* infback.c:250:13: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var state uintptr
	// var next uintptr at bp, 8
	// next input
	var put uintptr // next output
	var have uint32
	var left uint32  // available input and output
	var hold uint32  // bit buffer
	var bits uint32  // bits in bit buffer
	var copy uint32  // number of stored or match bytes to copy
	var from uintptr // where to copy match bytes from
	var here Code    // current decoding table entry
	var last Code    // parent table entry
	var len uint32   // length to copy for repeats, bits to drop
	var ret int32

	// Check that the strm exists and that the state was initialized
	if !(strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL)) {
		goto __1
	}
	return -2
__1:
	;
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate

	// Reset the state
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
	(*Inflate_state)(unsafe.Pointer(state)).Flast = 0
	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
	if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(Z_NULL) {
		have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
	} else {
		have = uint32(0)
	}
	hold = uint32(0)
	bits = uint32(0)
	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize

	// Inflate until end of block marked as last
__2:
	switch (*Inflate_state)(unsafe.Pointer(state)).Fmode {
	case TYPE:
		goto __6

	case STORED:
		goto __7

	case TABLE1:
		goto __8

	case LEN:
		goto __9

	case DONE:
		goto __10

	case BAD:
		goto __11

	default:
		goto __12
	}
	goto __5
__6:
	// determine and dispatch block type
	if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) {
		goto __13
	}
__14:
	hold >>= bits & uint32(7)
	bits = bits - bits&uint32(7)
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE
	goto __5
__13:
	;
__17:
__20:
	if !(bits < uint32(3)) {
		goto __21
	}
__22:
__25:
	if !(have == uint32(0)) {
		goto __28
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __29
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__29:
	;
__28:
	;
	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __23
__23:
	if 0 != 0 {
		goto __22
	}
	goto __24
__24:
	;
	goto __20
__21:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1)))
__30:
	hold >>= 1
	bits = bits - uint32(1)
	goto __31
__31:
	if 0 != 0 {
		goto __30
	}
	goto __32
__32:
	;
	switch uint32(hold) & (uint32(1)<<2 - uint32(1)) {
	case uint32(0):
		goto __34
	case uint32(1):
		goto __35
	case uint32(2):
		goto __36
	case uint32(3):
		goto __37
	}
	goto __33
__34: // stored block
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED
	goto __33
__35: // fixed block
	fixedtables(tls, state)

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes
	goto __33
__36: // dynamic block
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE1
	goto __33
__37:
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 141 /* "invalid block ty..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
__33:
	;
__38:
	hold >>= 2
	bits = bits - uint32(2)
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	goto __5

__7:
	// get and verify stored block length
__41:
	hold >>= bits & uint32(7)
	bits = bits - bits&uint32(7)
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	; // go to byte boundary
__44:
__47:
	if !(bits < uint32(32)) {
		goto __48
	}
__49:
__52:
	if !(have == uint32(0)) {
		goto __55
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __56
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__56:
	;
__55:
	;
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
	goto __47
__48:
	;
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
	if !(hold&uint32(0xffff) != hold>>16^uint32(0xffff)) {
		goto __57
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 160 /* "invalid stored b..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __5
__57:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff)

__58:
	hold = uint32(0)
	bits = uint32(0)
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;

	// copy stored block from input to output
__61:
	if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) {
		goto __62
	}
	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
__63:
	if !(have == uint32(0)) {
		goto __66
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __67
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__67:
	;
__66:
	;
	goto __64
__64:
	if 0 != 0 {
		goto __63
	}
	goto __65
__65:
	;
__68:
	if !(left == uint32(0)) {
		goto __71
	}
	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uint32) int32
	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) {
		goto __72
	}
	ret = -5
	goto inf_leave
__72:
	;
__71:
	;
	goto __69
__69:
	if 0 != 0 {
		goto __68
	}
	goto __70
__70:
	;
	if !(copy > have) {
		goto __73
	}
	copy = have
__73:
	;
	if !(copy > left) {
		goto __74
	}
	copy = left
__74:
	;
	libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), uint64(copy))
	have = have - copy
	*(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy)
	left = left - copy
	put += uintptr(copy)
	*(*uint32)(unsafe.Pointer(state + 80)) -= copy
	goto __61
__62:
	;

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
	goto __5

__8:
	// get dynamic table entries descriptor
__75:
__78:
	if !(bits < uint32(14)) {
		goto __79
	}
__80:
__83:
	if !(have == uint32(0)) {
		goto __86
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __87
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__87:
	;
__86:
	;
	goto __84
__84:
	if 0 != 0 {
		goto __83
	}
	goto __85
__85:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __81
__81:
	if 0 != 0 {
		goto __80
	}
	goto __82
__82:
	;
	goto __78
__79:
	;
	goto __76
__76:
	if 0 != 0 {
		goto __75
	}
	goto __77
__77:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257)
__88:
	hold >>= 5
	bits = bits - uint32(5)
	goto __89
__89:
	if 0 != 0 {
		goto __88
	}
	goto __90
__90:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1)
__91:
	hold >>= 5
	bits = bits - uint32(5)
	goto __92
__92:
	if 0 != 0 {
		goto __91
	}
	goto __93
__93:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4)
__94:
	hold >>= 4
	bits = bits - uint32(4)
	goto __95
__95:
	if 0 != 0 {
		goto __94
	}
	goto __96
__96:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) {
		goto __97
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 189 /* "too many length ..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __5
__97:
	;

	// get code length code lengths (not a typo)
	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
__98:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) {
		goto __99
	}
__100:
__103:
	if !(bits < uint32(3)) {
		goto __104
	}
__105:
__108:
	if !(have == uint32(0)) {
		goto __111
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __112
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__112:
	;
__111:
	;
	goto __109
__109:
	if 0 != 0 {
		goto __108
	}
	goto __110
__110:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __106
__106:
	if 0 != 0 {
		goto __105
	}
	goto __107
__107:
	;
	goto __103
__104:
	;
	goto __101
__101:
	if 0 != 0 {
		goto __100
	}
	goto __102
__102:
	;
	*(*uint16)(unsafe.Pointer(state + 144 + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(uint32(hold) & (uint32(1)<<3 - uint32(1)))
__113:
	hold >>= 3
	bits = bits - uint32(3)
	goto __114
__114:
	if 0 != 0 {
		goto __113
	}
	goto __115
__115:
	;
	goto __98
__99:
	;
__116:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) {
		goto __117
	}
	*(*uint16)(unsafe.Pointer(state + 144 + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0)
	goto __116
__117:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1360 /* &.codes */
	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7)
	ret = z.Xinflate_table(tls, CODES, state+144, uint32(19), state+136,
		state+112, state+784)
	if !(ret != 0) {
		goto __118
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 225 /* "invalid code len..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __5
__118:
	;

	// get length and distance code code lengths
	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
__119:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
		goto __120
	}
__121:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
	if !(uint32(here.Fbits) <= bits) {
		goto __124
	}
	goto __123
__124:
	;
__125:
__128:
	if !(have == uint32(0)) {
		goto __131
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __132
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__132:
	;
__131:
	;
	goto __129
__129:
	if 0 != 0 {
		goto __128
	}
	goto __130
__130:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __126
__126:
	if 0 != 0 {
		goto __125
	}
	goto __127
__127:
	;
	goto __122
__122:
	goto __121
	goto __123
__123:
	;
	if !(int32(here.Fval) < 16) {
		goto __133
	}
__135:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __136
__136:
	if 0 != 0 {
		goto __135
	}
	goto __137
__137:
	;
	*(*uint16)(unsafe.Pointer(state + 144 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval
	goto __134
__133:
	if !(int32(here.Fval) == 16) {
		goto __138
	}
__140:
__143:
	if !(bits < uint32(int32(here.Fbits)+2)) {
		goto __144
	}
__145:
__148:
	if !(have == uint32(0)) {
		goto __151
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __152
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__152:
	;
__151:
	;
	goto __149
__149:
	if 0 != 0 {
		goto __148
	}
	goto __150
__150:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __146
__146:
	if 0 != 0 {
		goto __145
	}
	goto __147
__147:
	;
	goto __143
__144:
	;
	goto __141
__141:
	if 0 != 0 {
		goto __140
	}
	goto __142
__142:
	;
__153:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __154
__154:
	if 0 != 0 {
		goto __153
	}
	goto __155
__155:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) {
		goto __156
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 250 /* "invalid bit leng..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __120
__156:
	;
	len = uint32(*(*uint16)(unsafe.Pointer(state + 144 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2)))
	copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1))
__157:
	hold >>= 2
	bits = bits - uint32(2)
	goto __158
__158:
	if 0 != 0 {
		goto __157
	}
	goto __159
__159:
	;
	goto __139
__138:
	if !(int32(here.Fval) == 17) {
		goto __160
	}
__162:
__165:
	if !(bits < uint32(int32(here.Fbits)+3)) {
		goto __166
	}
__167:
__170:
	if !(have == uint32(0)) {
		goto __173
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __174
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__174:
	;
__173:
	;
	goto __171
__171:
	if 0 != 0 {
		goto __170
	}
	goto __172
__172:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __168
__168:
	if 0 != 0 {
		goto __167
	}
	goto __169
__169:
	;
	goto __165
__166:
	;
	goto __163
__163:
	if 0 != 0 {
		goto __162
	}
	goto __164
__164:
	;
__175:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __176
__176:
	if 0 != 0 {
		goto __175
	}
	goto __177
__177:
	;
	len = uint32(0)
	copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1))
__178:
	hold >>= 3
	bits = bits - uint32(3)
	goto __179
__179:
	if 0 != 0 {
		goto __178
	}
	goto __180
__180:
	;
	goto __161
__160:
__181:
__184:
	if !(bits < uint32(int32(here.Fbits)+7)) {
		goto __185
	}
__186:
__189:
	if !(have == uint32(0)) {
		goto __192
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __193
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__193:
	;
__192:
	;
	goto __190
__190:
	if 0 != 0 {
		goto __189
	}
	goto __191
__191:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __187
__187:
	if 0 != 0 {
		goto __186
	}
	goto __188
__188:
	;
	goto __184
__185:
	;
	goto __182
__182:
	if 0 != 0 {
		goto __181
	}
	goto __183
__183:
	;
__194:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __195
__195:
	if 0 != 0 {
		goto __194
	}
	goto __196
__196:
	;
	len = uint32(0)
	copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1))
__197:
	hold >>= 7
	bits = bits - uint32(7)
	goto __198
__198:
	if 0 != 0 {
		goto __197
	}
	goto __199
__199:
	;
__161:
	;
__139:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
		goto __200
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 250 /* "invalid bit leng..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __120
__200:
	;
__201:
	if !(libc.PostDecUint32(&copy, 1) != 0) {
		goto __202
	}
	*(*uint16)(unsafe.Pointer(state + 144 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len)
	goto __201
__202:
	;
__134:
	;
	goto __119
__120:
	;

	// handle error breaks in while
	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) {
		goto __203
	}
	goto __5
__203:
	;

	// check for end-of-block code (better have one)
	if !(int32(*(*uint16)(unsafe.Pointer(state + 144 + 256*2))) == 0) {
		goto __204
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 276 /* "invalid code -- ..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __5
__204:
	;

	// 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
	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1360 /* &.codes */
	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
	ret = z.Xinflate_table(tls, LENS, state+144, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+136,
		state+112, state+784)
	if !(ret != 0) {
		goto __205
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 313 /* "invalid literal/..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __5
__205:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6)
	ret = z.Xinflate_table(tls, DISTS, state+144+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist,
		state+136, state+116, state+784)
	if !(ret != 0) {
		goto __206
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 341 /* "invalid distance..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __5
__206:
	;

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN

__9:
	// use inflate_fast() if we have enough input and output
	if !(have >= uint32(6) && left >= uint32(258)) {
		goto __207
	}
__208:
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */))
	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
	goto __209
__209:
	if 0 != 0 {
		goto __208
	}
	goto __210
__210:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) {
		goto __211
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - left
__211:
	;
	z.Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize)
__212:
	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
	goto __213
__213:
	if 0 != 0 {
		goto __212
	}
	goto __214
__214:
	;
	goto __5
__207:
	;

	// get a literal, length, or end-of-block code
__215:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
	if !(uint32(here.Fbits) <= bits) {
		goto __218
	}
	goto __217
__218:
	;
__219:
__222:
	if !(have == uint32(0)) {
		goto __225
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __226
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__226:
	;
__225:
	;
	goto __223
__223:
	if 0 != 0 {
		goto __222
	}
	goto __224
__224:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __220
__220:
	if 0 != 0 {
		goto __219
	}
	goto __221
__221:
	;
	goto __216
__216:
	goto __215
	goto __217
__217:
	;
	if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) {
		goto __227
	}
	last = here
__228:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(int32(last.Fbits)+int32(last.Fop))-uint32(1))>>int32(last.Fbits))*4))
	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
		goto __231
	}
	goto __230
__231:
	;
__232:
__235:
	if !(have == uint32(0)) {
		goto __238
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __239
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__239:
	;
__238:
	;
	goto __236
__236:
	if 0 != 0 {
		goto __235
	}
	goto __237
__237:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __233
__233:
	if 0 != 0 {
		goto __232
	}
	goto __234
__234:
	;
	goto __229
__229:
	goto __228
	goto __230
__230:
	;
__240:
	hold >>= int32(last.Fbits)
	bits = bits - uint32(last.Fbits)
	goto __241
__241:
	if 0 != 0 {
		goto __240
	}
	goto __242
__242:
	;
__227:
	;
__243:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __244
__244:
	if 0 != 0 {
		goto __243
	}
	goto __245
__245:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval)

	// process literal
	if !(int32(here.Fop) == 0) {
		goto __246
	}

__247:
	if !(left == uint32(0)) {
		goto __250
	}
	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uint32) int32
	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) {
		goto __251
	}
	ret = -5
	goto inf_leave
__251:
	;
__250:
	;
	goto __248
__248:
	if 0 != 0 {
		goto __247
	}
	goto __249
__249:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength)
	left--
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
	goto __5
__246:
	;

	// process end of block
	if !(int32(here.Fop)&32 != 0) {
		goto __252
	}

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
	goto __5
__252:
	;

	// invalid code
	if !(int32(here.Fop)&64 != 0) {
		goto __253
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 363 /* "invalid literal/..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __5
__253:
	;

	// length code -- get extra bits, if any
	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) {
		goto __254
	}
__255:
__258:
	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
		goto __259
	}
__260:
__263:
	if !(have == uint32(0)) {
		goto __266
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __267
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__267:
	;
__266:
	;
	goto __264
__264:
	if 0 != 0 {
		goto __263
	}
	goto __265
__265:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __261
__261:
	if 0 != 0 {
		goto __260
	}
	goto __262
__262:
	;
	goto __258
__259:
	;
	goto __256
__256:
	if 0 != 0 {
		goto __255
	}
	goto __257
__257:
	;
	*(*uint32)(unsafe.Pointer(state + 80)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
__268:
	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
	goto __269
__269:
	if 0 != 0 {
		goto __268
	}
	goto __270
__270:
	;
__254:
	;

	// get distance code
__271:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4))
	if !(uint32(here.Fbits) <= bits) {
		goto __274
	}
	goto __273
__274:
	;
__275:
__278:
	if !(have == uint32(0)) {
		goto __281
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __282
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__282:
	;
__281:
	;
	goto __279
__279:
	if 0 != 0 {
		goto __278
	}
	goto __280
__280:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __276
__276:
	if 0 != 0 {
		goto __275
	}
	goto __277
__277:
	;
	goto __272
__272:
	goto __271
	goto __273
__273:
	;
	if !(int32(here.Fop)&0xf0 == 0) {
		goto __283
	}
	last = here
__284:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(int32(last.Fbits)+int32(last.Fop))-uint32(1))>>int32(last.Fbits))*4))
	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
		goto __287
	}
	goto __286
__287:
	;
__288:
__291:
	if !(have == uint32(0)) {
		goto __294
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __295
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__295:
	;
__294:
	;
	goto __292
__292:
	if 0 != 0 {
		goto __291
	}
	goto __293
__293:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __289
__289:
	if 0 != 0 {
		goto __288
	}
	goto __290
__290:
	;
	goto __285
__285:
	goto __284
	goto __286
__286:
	;
__296:
	hold >>= int32(last.Fbits)
	bits = bits - uint32(last.Fbits)
	goto __297
__297:
	if 0 != 0 {
		goto __296
	}
	goto __298
__298:
	;
__283:
	;
__299:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __300
__300:
	if 0 != 0 {
		goto __299
	}
	goto __301
__301:
	;
	if !(int32(here.Fop)&64 != 0) {
		goto __302
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 391 /* "invalid distance..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __5
__302:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval)

	// get distance extra bits, if any
	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) {
		goto __303
	}
__304:
__307:
	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
		goto __308
	}
__309:
__312:
	if !(have == uint32(0)) {
		goto __315
	}
	have = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uint32
	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
	if !(have == uint32(0)) {
		goto __316
	}
	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
	ret = -5
	goto inf_leave
__316:
	;
__315:
	;
	goto __313
__313:
	if 0 != 0 {
		goto __312
	}
	goto __314
__314:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
	bits = bits + uint32(8)
	goto __310
__310:
	if 0 != 0 {
		goto __309
	}
	goto __311
__311:
	;
	goto __307
__308:
	;
	goto __305
__305:
	if 0 != 0 {
		goto __304
	}
	goto __306
__306:
	;
	*(*uint32)(unsafe.Pointer(state + 84)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
__317:
	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
	goto __318
__318:
	if 0 != 0 {
		goto __317
	}
	goto __319
__319:
	;
__303:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > (*Inflate_state)(unsafe.Pointer(state)).Fwsize-func() uint32 {
		if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
			return left
		}
		return uint32(0)
	}()) {
		goto __320
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 413 /* "invalid distance..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __5
__320:
	;

	// copy match from window to output
__321:
__324:
	if !(left == uint32(0)) {
		goto __327
	}
	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uint32) int32
	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) {
		goto __328
	}
	ret = -5
	goto inf_leave
__328:
	;
__327:
	;
	goto __325
__325:
	if 0 != 0 {
		goto __324
	}
	goto __326
__326:
	;
	copy = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset
	if !(copy < left) {
		goto __329
	}
	from = put + uintptr(copy)
	copy = left - copy
	goto __330
__329:
	from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)
	copy = left
__330:
	;
	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) {
		goto __331
	}
	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
__331:
	;
	*(*uint32)(unsafe.Pointer(state + 80)) -= copy
	left = left - copy
__332:
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	goto __333
__333:
	if libc.PreDecUint32(&copy, 1) != 0 {
		goto __332
	}
	goto __334
__334:
	;
	goto __322
__322:
	if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) {
		goto __321
	}
	goto __323
__323:
	;
	goto __5

__10:
	// inflate stream terminated properly -- write leftover output
	ret = Z_STREAM_END
	if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) {
		goto __335
	}
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uint32) int32
	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (*Inflate_state)(unsafe.Pointer(state)).Fwsize-left) != 0) {
		goto __336
	}
	ret = -5
__336:
	;
__335:
	;
	goto inf_leave

__11:
	ret = -3
	goto inf_leave

__12: // can't happen, but makes compilers happy
	ret = -2
	goto inf_leave
__5:
	;
	goto __3
__3:
	goto __2
	goto __4
__4:
	;

	// Return unused input
inf_leave:
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */))
	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
	return ret
}

var order =                                                                                                                                                                                                                          // permutation of code lengths
[19]uint16{uint16(16), uint16(17), uint16(18), uint16(0), uint16(8), uint16(7), uint16(9), uint16(6), uint16(10), uint16(5), uint16(11), uint16(4), uint16(12), uint16(3), uint16(13), uint16(2), uint16(14), uint16(1), uint16(15)} /* infback.c:269:33 */

func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */
	if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
		return -2
	}
	(*struct {
		f func(*libc.TLS, Voidpf, Voidpf)
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)

	return Z_OK
}

//
//    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 Z_streamp, start uint32) { /* inffast.c:50:20: */
	var state uintptr
	var in uintptr     // local strm->next_in
	var last uintptr   // have enough input while in < last
	var out uintptr    // local strm->next_out
	var beg uintptr    // inflate()'s initial strm->next_out
	var end uintptr    // while out < end, enough space available
	var wsize uint32   // window size or zero if not using window
	var whave uint32   // valid bytes in the window
	var wnext uint32   // window write index
	var window uintptr // allocated sliding window, if wsize != 0
	var hold uint32    // local strm->hold
	var bits uint32    // local strm->bits
	var lcode uintptr  // local strm->lencode
	var dcode uintptr  // local strm->distcode
	var lmask uint32   // mask for first level of length codes
	var dmask uint32   // mask for first level of distance codes
	var here Code      // retrieved table entry
	var op uint32      // code bits, operation, extra bits, or
	//  window position, window bytes to copy
	var len uint32   // match length, unused bytes
	var dist uint32  // match distance
	var from uintptr // where to copy match from

	// copy state to local variables
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
	last = in + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in-UInt(5))
	out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
	beg = out - uintptr(start-(*Z_stream)(unsafe.Pointer(strm)).Favail_out)
	end = out + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_out-UInt(257))
	wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
	whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave
	wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext
	window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
	lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode
	dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode
	lmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits - uint32(1)
	dmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits - uint32(1)

	// decode literals and length/distances until end-of-block or not enough
	//        input data or output space
__1:
	if !(bits < uint32(15)) {
		goto __4
	}
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
	bits = bits + uint32(8)
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
	bits = bits + uint32(8)
__4:
	;
	here = *(*Code)(unsafe.Pointer(lcode + uintptr(hold&uint32(lmask))*4))
dolen:
	op = uint32(here.Fbits)
	hold >>= op
	bits = bits - op
	op = uint32(here.Fop)
	if !(op == uint32(0)) {
		goto __5
	} // literal

	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval)
	goto __6
__5:
	if !(op&uint32(16) != 0) {
		goto __7
	} // length base
	len = uint32(here.Fval)
	op = op & uint32(15) // number of extra bits
	if !(op != 0) {
		goto __9
	}
	if !(bits < op) {
		goto __10
	}
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
	bits = bits + uint32(8)
__10:
	;
	len = len + uint32(hold)&(uint32(1)<<op-uint32(1))
	hold >>= op
	bits = bits - op
__9:
	;

	if !(bits < uint32(15)) {
		goto __11
	}
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
	bits = bits + uint32(8)
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
	bits = bits + uint32(8)
__11:
	;
	here = *(*Code)(unsafe.Pointer(dcode + uintptr(hold&uint32(dmask))*4))
dodist:
	op = uint32(here.Fbits)
	hold >>= op
	bits = bits - op
	op = uint32(here.Fop)
	if !(op&uint32(16) != 0) {
		goto __12
	} // distance base
	dist = uint32(here.Fval)
	op = op & uint32(15) // number of extra bits
	if !(bits < op) {
		goto __14
	}
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
	bits = bits + uint32(8)
	if !(bits < op) {
		goto __15
	}
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
	bits = bits + uint32(8)
__15:
	;
__14:
	;
	dist = dist + uint32(hold)&(uint32(1)<<op-uint32(1))
	hold >>= op
	bits = bits - op

	op = uint32((int64(out) - int64(beg)) / 1) // max distance in output
	if !(dist > op) {
		goto __16
	} // see if copy from window
	op = dist - op // distance back in window
	if !(op > whave) {
		goto __18
	}
	if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) {
		goto __19
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 413 /* "invalid distance..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __3
__19:
	;
__18:
	;
	from = window
	if !(wnext == uint32(0)) {
		goto __20
	} // very common case
	from += uintptr(wsize - op)
	if !(op < len) {
		goto __22
	} // some from window
	len = len - op
__23:
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	goto __24
__24:
	if libc.PreDecUint32(&op, 1) != 0 {
		goto __23
	}
	goto __25
__25:
	;
	from = out - uintptr(dist) // rest from output
__22:
	;
	goto __21
__20:
	if !(wnext < op) {
		goto __26
	} // wrap around window
	from += uintptr(wsize + wnext - op)
	op = op - wnext
	if !(op < len) {
		goto __28
	} // some from end of window
	len = len - op
__29:
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	goto __30
__30:
	if libc.PreDecUint32(&op, 1) != 0 {
		goto __29
	}
	goto __31
__31:
	;
	from = window
	if !(wnext < len) {
		goto __32
	} // some from start of window
	op = wnext
	len = len - op
__33:
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	goto __34
__34:
	if libc.PreDecUint32(&op, 1) != 0 {
		goto __33
	}
	goto __35
__35:
	;
	from = out - uintptr(dist) // rest from output
__32:
	;
__28:
	;
	goto __27
__26: // contiguous in window
	from += uintptr(wnext - op)
	if !(op < len) {
		goto __36
	} // some from window
	len = len - op
__37:
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	goto __38
__38:
	if libc.PreDecUint32(&op, 1) != 0 {
		goto __37
	}
	goto __39
__39:
	;
	from = out - uintptr(dist) // rest from output
__36:
	;
__27:
	;
__21:
	;
__40:
	if !(len > uint32(2)) {
		goto __41
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	len = len - uint32(3)
	goto __40
__41:
	;
	if !(len != 0) {
		goto __42
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	if !(len > uint32(1)) {
		goto __43
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
__43:
	;
__42:
	;
	goto __17
__16:
	from = out - uintptr(dist) // copy direct from output
__44: // minimum length is three
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	len = len - uint32(3)
	goto __45
__45:
	if len > uint32(2) {
		goto __44
	}
	goto __46
__46:
	;
	if !(len != 0) {
		goto __47
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	if !(len > uint32(1)) {
		goto __48
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
__48:
	;
__47:
	;
__17:
	;
	goto __13
__12:
	if !(op&uint32(64) == uint32(0)) {
		goto __49
	} // 2nd level distance code
	here = *(*Code)(unsafe.Pointer(dcode + uintptr(uint32(here.Fval)+hold&uint32(uint32(1)<<op-uint32(1)))*4))
	goto dodist
	goto __50
__49:
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 391 /* "invalid distance..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __3
__50:
	;
__13:
	;
	goto __8
__7:
	if !(op&uint32(64) == uint32(0)) {
		goto __51
	} // 2nd level length code
	here = *(*Code)(unsafe.Pointer(lcode + uintptr(uint32(here.Fval)+hold&uint32(uint32(1)<<op-uint32(1)))*4))
	goto dolen
	goto __52
__51:
	if !(op&uint32(32) != 0) {
		goto __53
	} // end-of-block

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
	goto __3
	goto __54
__53:
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 363 /* "invalid literal/..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __3
__54:
	;
__52:
	;
__8:
	;
__6:
	;
	goto __2
__2:
	if in < last && out < end {
		goto __1
	}
	goto __3
__3:
	;

	// return unused bytes (on entry, bits < 8, so in won't go too far back)
	len = bits >> 3
	in -= uintptr(len)
	bits = bits - len<<3
	hold = hold & uint32(uint32(1)<<bits-uint32(1))

	// update state and return
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out
	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 {
		if in < last {
			return uint32(int64(5) + (int64(last)-int64(in))/1)
		}
		return uint32(int64(5) - (int64(in)-int64(last))/1)
	}()
	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 {
		if out < end {
			return uint32(int64(257) + (int64(end)-int64(out))/1)
		}
		return uint32(int64(257) - (int64(out)-int64(end))/1)
	}()
	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
	return
}

//
//    inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
//    - Using bit fields for code structure
//    - Different op definition to avoid & for extra bits (do & for table bits)
//    - Three separate decoding do-loops for direct, window, and wnext == 0
//    - Special case for distance > 1 copies to do overlapped load and store copy
//    - Explicit branch predictions (based on measured branch probabilities)
//    - Deferring match copy and interspersed it with decoding subsequent codes
//    - Swapping literal/length else
//    - Swapping window/direct else
//    - Larger unrolled copy loops (three is about right)
//    - Moving len -= 3 statement into middle of loop
//

func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */
	var state uintptr
	if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
		return 1
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if state == uintptr(Z_NULL) || (*Inflate_state)(unsafe.Pointer(state)).Fstrm != strm || (*Inflate_state)(unsafe.Pointer(state)).Fmode < HEAD || (*Inflate_state)(unsafe.Pointer(state)).Fmode > SYNC {
		return 1
	}
	return 0
}

func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */
	var state uintptr

	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+28, libc.AssignPtrUint32(state+36, uint32(0)))
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite
		(*Z_stream)(unsafe.Pointer(strm)).Fadler = ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1)
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD
	(*Inflate_state)(unsafe.Pointer(state)).Flast = 0
	(*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0
	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768
	(*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL)
	(*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0)
	(*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0)
	(*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+104, libc.AssignPtrUintptr(state+136, state+1360 /* &.codes */))
	(*Inflate_state)(unsafe.Pointer(state)).Fsane = 1
	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1

	return Z_OK
}

func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */
	var state uintptr

	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0)
	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
	(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
	return z.XinflateResetKeep(tls, strm)
}

func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */
	var wrap int32
	var state uintptr

	// get the state
	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate

	// extract wrap request from windowBits parameter
	if windowBits < 0 {
		wrap = 0
		windowBits = -windowBits
	} else {
		wrap = windowBits>>4 + 5
		if windowBits < 48 {
			windowBits = windowBits & 15
		}
	}

	// set number of window bits, free window if different
	if windowBits != 0 && (windowBits < 8 || windowBits > 15) {
		return -2
	}
	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) && (*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits) {
		(*struct {
			f func(*libc.TLS, Voidpf, Voidpf)
		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow)
		(*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL)
	}

	// update state and reset the rest of it
	(*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap
	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits)
	return z.XinflateReset(tls, strm)
}

func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */
	var ret int32
	var state uintptr

	if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts + 65))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) {
		return -6
	}
	if strm == uintptr(Z_NULL) {
		return -2
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error
	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
		}{z.Xzcalloc}))
		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
	}
	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, Voidpf, Voidpf)
		}{z.Xzcfree}))
	}
	state = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Inflate_state{})))
	if state == uintptr(Z_NULL) {
		return -4
	}

	(*Z_stream)(unsafe.Pointer(strm)).Fstate = state
	(*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm
	(*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL)
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2()
	ret = z.XinflateReset2(tls, strm, windowBits)
	if ret != Z_OK {
		(*struct {
			f func(*libc.TLS, Voidpf, Voidpf)
		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state)
		(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
	}
	return ret
}

func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */
	return z.XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size)
}

func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */
	var state uintptr

	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if bits < 0 {
		(*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0)
		(*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0)
		return Z_OK
	}
	if bits > 16 || (*Inflate_state)(unsafe.Pointer(state)).Fbits+UInt(bits) > uint32(32) {
		return -2
	}
	value = int32(int32(value) & (int32(1)<<bits - 1))
	*(*uint32)(unsafe.Pointer(state + 72)) += uint32(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits)
	*(*uint32)(unsafe.Pointer(state + 76)) += UInt(bits)
	return Z_OK
}

//
//    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 fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */
	(*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1))
	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1))
	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5)
}

var lenfix1 = [512]Code{
	{Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(80)}, {Fbits: uint8(8), Fval: uint16(16)}, {Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(112)}, {Fbits: uint8(8), Fval: uint16(48)},
	{Fbits: uint8(9), Fval: uint16(192)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(96)}, {Fbits: uint8(8), Fval: uint16(32)}, {Fbits: uint8(9), Fval: uint16(160)}, {Fbits: uint8(8)}, {Fbits: uint8(8), Fval: uint16(128)},
	{Fbits: uint8(8), Fval: uint16(64)}, {Fbits: uint8(9), Fval: uint16(224)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(88)}, {Fbits: uint8(8), Fval: uint16(24)}, {Fbits: uint8(9), Fval: uint16(144)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)},
	{Fbits: uint8(8), Fval: uint16(120)}, {Fbits: uint8(8), Fval: uint16(56)}, {Fbits: uint8(9), Fval: uint16(208)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(104)}, {Fbits: uint8(8), Fval: uint16(40)}, {Fbits: uint8(9), Fval: uint16(176)},
	{Fbits: uint8(8), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(136)}, {Fbits: uint8(8), Fval: uint16(72)}, {Fbits: uint8(9), Fval: uint16(240)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(84)}, {Fbits: uint8(8), Fval: uint16(20)},
	{Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(116)}, {Fbits: uint8(8), Fval: uint16(52)}, {Fbits: uint8(9), Fval: uint16(200)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(100)},
	{Fbits: uint8(8), Fval: uint16(36)}, {Fbits: uint8(9), Fval: uint16(168)}, {Fbits: uint8(8), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(132)}, {Fbits: uint8(8), Fval: uint16(68)}, {Fbits: uint8(9), Fval: uint16(232)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)},
	{Fbits: uint8(8), Fval: uint16(92)}, {Fbits: uint8(8), Fval: uint16(28)}, {Fbits: uint8(9), Fval: uint16(152)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(124)}, {Fbits: uint8(8), Fval: uint16(60)}, {Fbits: uint8(9), Fval: uint16(216)},
	{Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(108)}, {Fbits: uint8(8), Fval: uint16(44)}, {Fbits: uint8(9), Fval: uint16(184)}, {Fbits: uint8(8), Fval: uint16(12)}, {Fbits: uint8(8), Fval: uint16(140)}, {Fbits: uint8(8), Fval: uint16(76)},
	{Fbits: uint8(9), Fval: uint16(248)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(82)}, {Fbits: uint8(8), Fval: uint16(18)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(114)},
	{Fbits: uint8(8), Fval: uint16(50)}, {Fbits: uint8(9), Fval: uint16(196)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(98)}, {Fbits: uint8(8), Fval: uint16(34)}, {Fbits: uint8(9), Fval: uint16(164)}, {Fbits: uint8(8), Fval: uint16(2)},
	{Fbits: uint8(8), Fval: uint16(130)}, {Fbits: uint8(8), Fval: uint16(66)}, {Fbits: uint8(9), Fval: uint16(228)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(90)}, {Fbits: uint8(8), Fval: uint16(26)}, {Fbits: uint8(9), Fval: uint16(148)},
	{Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(122)}, {Fbits: uint8(8), Fval: uint16(58)}, {Fbits: uint8(9), Fval: uint16(212)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(106)}, {Fbits: uint8(8), Fval: uint16(42)},
	{Fbits: uint8(9), Fval: uint16(180)}, {Fbits: uint8(8), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(138)}, {Fbits: uint8(8), Fval: uint16(74)}, {Fbits: uint8(9), Fval: uint16(244)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(86)},
	{Fbits: uint8(8), Fval: uint16(22)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(118)}, {Fbits: uint8(8), Fval: uint16(54)}, {Fbits: uint8(9), Fval: uint16(204)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)},
	{Fbits: uint8(8), Fval: uint16(102)}, {Fbits: uint8(8), Fval: uint16(38)}, {Fbits: uint8(9), Fval: uint16(172)}, {Fbits: uint8(8), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(134)}, {Fbits: uint8(8), Fval: uint16(70)}, {Fbits: uint8(9), Fval: uint16(236)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(94)}, {Fbits: uint8(8), Fval: uint16(30)}, {Fbits: uint8(9), Fval: uint16(156)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(126)}, {Fbits: uint8(8), Fval: uint16(62)},
	{Fbits: uint8(9), Fval: uint16(220)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(110)}, {Fbits: uint8(8), Fval: uint16(46)}, {Fbits: uint8(9), Fval: uint16(188)}, {Fbits: uint8(8), Fval: uint16(14)}, {Fbits: uint8(8), Fval: uint16(142)},
	{Fbits: uint8(8), Fval: uint16(78)}, {Fbits: uint8(9), Fval: uint16(252)}, {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(81)}, {Fbits: uint8(8), Fval: uint16(17)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)},
	{Fbits: uint8(8), Fval: uint16(113)}, {Fbits: uint8(8), Fval: uint16(49)}, {Fbits: uint8(9), Fval: uint16(194)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(97)}, {Fbits: uint8(8), Fval: uint16(33)}, {Fbits: uint8(9), Fval: uint16(162)},
	{Fbits: uint8(8), Fval: uint16(1)}, {Fbits: uint8(8), Fval: uint16(129)}, {Fbits: uint8(8), Fval: uint16(65)}, {Fbits: uint8(9), Fval: uint16(226)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(89)}, {Fbits: uint8(8), Fval: uint16(25)},
	{Fbits: uint8(9), Fval: uint16(146)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(121)}, {Fbits: uint8(8), Fval: uint16(57)}, {Fbits: uint8(9), Fval: uint16(210)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(105)},
	{Fbits: uint8(8), Fval: uint16(41)}, {Fbits: uint8(9), Fval: uint16(178)}, {Fbits: uint8(8), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(137)}, {Fbits: uint8(8), Fval: uint16(73)}, {Fbits: uint8(9), Fval: uint16(242)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)},
	{Fbits: uint8(8), Fval: uint16(85)}, {Fbits: uint8(8), Fval: uint16(21)}, {Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(117)}, {Fbits: uint8(8), Fval: uint16(53)}, {Fbits: uint8(9), Fval: uint16(202)},
	{Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(101)}, {Fbits: uint8(8), Fval: uint16(37)}, {Fbits: uint8(9), Fval: uint16(170)}, {Fbits: uint8(8), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(133)}, {Fbits: uint8(8), Fval: uint16(69)},
	{Fbits: uint8(9), Fval: uint16(234)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(93)}, {Fbits: uint8(8), Fval: uint16(29)}, {Fbits: uint8(9), Fval: uint16(154)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(125)},
	{Fbits: uint8(8), Fval: uint16(61)}, {Fbits: uint8(9), Fval: uint16(218)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(109)}, {Fbits: uint8(8), Fval: uint16(45)}, {Fbits: uint8(9), Fval: uint16(186)}, {Fbits: uint8(8), Fval: uint16(13)},
	{Fbits: uint8(8), Fval: uint16(141)}, {Fbits: uint8(8), Fval: uint16(77)}, {Fbits: uint8(9), Fval: uint16(250)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(19)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195)},
	{Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(115)}, {Fbits: uint8(8), Fval: uint16(51)}, {Fbits: uint8(9), Fval: uint16(198)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(35)},
	{Fbits: uint8(9), Fval: uint16(166)}, {Fbits: uint8(8), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(131)}, {Fbits: uint8(8), Fval: uint16(67)}, {Fbits: uint8(9), Fval: uint16(230)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(91)},
	{Fbits: uint8(8), Fval: uint16(27)}, {Fbits: uint8(9), Fval: uint16(150)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(123)}, {Fbits: uint8(8), Fval: uint16(59)}, {Fbits: uint8(9), Fval: uint16(214)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)},
	{Fbits: uint8(8), Fval: uint16(107)}, {Fbits: uint8(8), Fval: uint16(43)}, {Fbits: uint8(9), Fval: uint16(182)}, {Fbits: uint8(8), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(139)}, {Fbits: uint8(8), Fval: uint16(75)}, {Fbits: uint8(9), Fval: uint16(246)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(87)}, {Fbits: uint8(8), Fval: uint16(23)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(119)}, {Fbits: uint8(8), Fval: uint16(55)},
	{Fbits: uint8(9), Fval: uint16(206)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(103)}, {Fbits: uint8(8), Fval: uint16(39)}, {Fbits: uint8(9), Fval: uint16(174)}, {Fbits: uint8(8), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(135)},
	{Fbits: uint8(8), Fval: uint16(71)}, {Fbits: uint8(9), Fval: uint16(238)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(95)}, {Fbits: uint8(8), Fval: uint16(31)}, {Fbits: uint8(9), Fval: uint16(158)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)},
	{Fbits: uint8(8), Fval: uint16(127)}, {Fbits: uint8(8), Fval: uint16(63)}, {Fbits: uint8(9), Fval: uint16(222)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(111)}, {Fbits: uint8(8), Fval: uint16(47)}, {Fbits: uint8(9), Fval: uint16(190)},
	{Fbits: uint8(8), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(143)}, {Fbits: uint8(8), Fval: uint16(79)}, {Fbits: uint8(9), Fval: uint16(254)}, {Fop: uint8(96), Fbits: uint8(7)}, {Fbits: uint8(8), Fval: uint16(80)}, {Fbits: uint8(8), Fval: uint16(16)},
	{Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(112)}, {Fbits: uint8(8), Fval: uint16(48)}, {Fbits: uint8(9), Fval: uint16(193)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(96)},
	{Fbits: uint8(8), Fval: uint16(32)}, {Fbits: uint8(9), Fval: uint16(161)}, {Fbits: uint8(8)}, {Fbits: uint8(8), Fval: uint16(128)}, {Fbits: uint8(8), Fval: uint16(64)}, {Fbits: uint8(9), Fval: uint16(225)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)},
	{Fbits: uint8(8), Fval: uint16(88)}, {Fbits: uint8(8), Fval: uint16(24)}, {Fbits: uint8(9), Fval: uint16(145)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(120)}, {Fbits: uint8(8), Fval: uint16(56)}, {Fbits: uint8(9), Fval: uint16(209)},
	{Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(104)}, {Fbits: uint8(8), Fval: uint16(40)}, {Fbits: uint8(9), Fval: uint16(177)}, {Fbits: uint8(8), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(136)}, {Fbits: uint8(8), Fval: uint16(72)},
	{Fbits: uint8(9), Fval: uint16(241)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(84)}, {Fbits: uint8(8), Fval: uint16(20)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(116)},
	{Fbits: uint8(8), Fval: uint16(52)}, {Fbits: uint8(9), Fval: uint16(201)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(100)}, {Fbits: uint8(8), Fval: uint16(36)}, {Fbits: uint8(9), Fval: uint16(169)}, {Fbits: uint8(8), Fval: uint16(4)},
	{Fbits: uint8(8), Fval: uint16(132)}, {Fbits: uint8(8), Fval: uint16(68)}, {Fbits: uint8(9), Fval: uint16(233)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(92)}, {Fbits: uint8(8), Fval: uint16(28)}, {Fbits: uint8(9), Fval: uint16(153)},
	{Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(124)}, {Fbits: uint8(8), Fval: uint16(60)}, {Fbits: uint8(9), Fval: uint16(217)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)}, {Fbits: uint8(8), Fval: uint16(108)}, {Fbits: uint8(8), Fval: uint16(44)},
	{Fbits: uint8(9), Fval: uint16(185)}, {Fbits: uint8(8), Fval: uint16(12)}, {Fbits: uint8(8), Fval: uint16(140)}, {Fbits: uint8(8), Fval: uint16(76)}, {Fbits: uint8(9), Fval: uint16(249)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(82)},
	{Fbits: uint8(8), Fval: uint16(18)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(114)}, {Fbits: uint8(8), Fval: uint16(50)}, {Fbits: uint8(9), Fval: uint16(197)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)},
	{Fbits: uint8(8), Fval: uint16(98)}, {Fbits: uint8(8), Fval: uint16(34)}, {Fbits: uint8(9), Fval: uint16(165)}, {Fbits: uint8(8), Fval: uint16(2)}, {Fbits: uint8(8), Fval: uint16(130)}, {Fbits: uint8(8), Fval: uint16(66)}, {Fbits: uint8(9), Fval: uint16(229)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(90)}, {Fbits: uint8(8), Fval: uint16(26)}, {Fbits: uint8(9), Fval: uint16(149)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)}, {Fbits: uint8(8), Fval: uint16(122)}, {Fbits: uint8(8), Fval: uint16(58)},
	{Fbits: uint8(9), Fval: uint16(213)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(106)}, {Fbits: uint8(8), Fval: uint16(42)}, {Fbits: uint8(9), Fval: uint16(181)}, {Fbits: uint8(8), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(138)},
	{Fbits: uint8(8), Fval: uint16(74)}, {Fbits: uint8(9), Fval: uint16(245)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(86)}, {Fbits: uint8(8), Fval: uint16(22)}, {Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)},
	{Fbits: uint8(8), Fval: uint16(118)}, {Fbits: uint8(8), Fval: uint16(54)}, {Fbits: uint8(9), Fval: uint16(205)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(102)}, {Fbits: uint8(8), Fval: uint16(38)}, {Fbits: uint8(9), Fval: uint16(173)},
	{Fbits: uint8(8), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(134)}, {Fbits: uint8(8), Fval: uint16(70)}, {Fbits: uint8(9), Fval: uint16(237)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)}, {Fbits: uint8(8), Fval: uint16(94)}, {Fbits: uint8(8), Fval: uint16(30)},
	{Fbits: uint8(9), Fval: uint16(157)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(126)}, {Fbits: uint8(8), Fval: uint16(62)}, {Fbits: uint8(9), Fval: uint16(221)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(110)},
	{Fbits: uint8(8), Fval: uint16(46)}, {Fbits: uint8(9), Fval: uint16(189)}, {Fbits: uint8(8), Fval: uint16(14)}, {Fbits: uint8(8), Fval: uint16(142)}, {Fbits: uint8(8), Fval: uint16(78)}, {Fbits: uint8(9), Fval: uint16(253)}, {Fop: uint8(96), Fbits: uint8(7)},
	{Fbits: uint8(8), Fval: uint16(81)}, {Fbits: uint8(8), Fval: uint16(17)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31)}, {Fbits: uint8(8), Fval: uint16(113)}, {Fbits: uint8(8), Fval: uint16(49)}, {Fbits: uint8(9), Fval: uint16(195)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10)}, {Fbits: uint8(8), Fval: uint16(97)}, {Fbits: uint8(8), Fval: uint16(33)}, {Fbits: uint8(9), Fval: uint16(163)}, {Fbits: uint8(8), Fval: uint16(1)}, {Fbits: uint8(8), Fval: uint16(129)}, {Fbits: uint8(8), Fval: uint16(65)},
	{Fbits: uint8(9), Fval: uint16(227)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6)}, {Fbits: uint8(8), Fval: uint16(89)}, {Fbits: uint8(8), Fval: uint16(25)}, {Fbits: uint8(9), Fval: uint16(147)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59)}, {Fbits: uint8(8), Fval: uint16(121)},
	{Fbits: uint8(8), Fval: uint16(57)}, {Fbits: uint8(9), Fval: uint16(211)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17)}, {Fbits: uint8(8), Fval: uint16(105)}, {Fbits: uint8(8), Fval: uint16(41)}, {Fbits: uint8(9), Fval: uint16(179)}, {Fbits: uint8(8), Fval: uint16(9)},
	{Fbits: uint8(8), Fval: uint16(137)}, {Fbits: uint8(8), Fval: uint16(73)}, {Fbits: uint8(9), Fval: uint16(243)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4)}, {Fbits: uint8(8), Fval: uint16(85)}, {Fbits: uint8(8), Fval: uint16(21)}, {Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258)},
	{Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43)}, {Fbits: uint8(8), Fval: uint16(117)}, {Fbits: uint8(8), Fval: uint16(53)}, {Fbits: uint8(9), Fval: uint16(203)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(101)}, {Fbits: uint8(8), Fval: uint16(37)},
	{Fbits: uint8(9), Fval: uint16(171)}, {Fbits: uint8(8), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(133)}, {Fbits: uint8(8), Fval: uint16(69)}, {Fbits: uint8(9), Fval: uint16(235)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8)}, {Fbits: uint8(8), Fval: uint16(93)},
	{Fbits: uint8(8), Fval: uint16(29)}, {Fbits: uint8(9), Fval: uint16(155)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(125)}, {Fbits: uint8(8), Fval: uint16(61)}, {Fbits: uint8(9), Fval: uint16(219)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23)},
	{Fbits: uint8(8), Fval: uint16(109)}, {Fbits: uint8(8), Fval: uint16(45)}, {Fbits: uint8(9), Fval: uint16(187)}, {Fbits: uint8(8), Fval: uint16(13)}, {Fbits: uint8(8), Fval: uint16(141)}, {Fbits: uint8(8), Fval: uint16(77)}, {Fbits: uint8(9), Fval: uint16(251)},
	{Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(83)}, {Fbits: uint8(8), Fval: uint16(19)}, {Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35)}, {Fbits: uint8(8), Fval: uint16(115)}, {Fbits: uint8(8), Fval: uint16(51)},
	{Fbits: uint8(9), Fval: uint16(199)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(35)}, {Fbits: uint8(9), Fval: uint16(167)}, {Fbits: uint8(8), Fval: uint16(3)}, {Fbits: uint8(8), Fval: uint16(131)},
	{Fbits: uint8(8), Fval: uint16(67)}, {Fbits: uint8(9), Fval: uint16(231)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(91)}, {Fbits: uint8(8), Fval: uint16(27)}, {Fbits: uint8(9), Fval: uint16(151)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67)},
	{Fbits: uint8(8), Fval: uint16(123)}, {Fbits: uint8(8), Fval: uint16(59)}, {Fbits: uint8(9), Fval: uint16(215)}, {Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19)}, {Fbits: uint8(8), Fval: uint16(107)}, {Fbits: uint8(8), Fval: uint16(43)}, {Fbits: uint8(9), Fval: uint16(183)},
	{Fbits: uint8(8), Fval: uint16(11)}, {Fbits: uint8(8), Fval: uint16(139)}, {Fbits: uint8(8), Fval: uint16(75)}, {Fbits: uint8(9), Fval: uint16(247)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5)}, {Fbits: uint8(8), Fval: uint16(87)}, {Fbits: uint8(8), Fval: uint16(23)},
	{Fop: uint8(64), Fbits: uint8(8)}, {Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51)}, {Fbits: uint8(8), Fval: uint16(119)}, {Fbits: uint8(8), Fval: uint16(55)}, {Fbits: uint8(9), Fval: uint16(207)}, {Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(103)},
	{Fbits: uint8(8), Fval: uint16(39)}, {Fbits: uint8(9), Fval: uint16(175)}, {Fbits: uint8(8), Fval: uint16(7)}, {Fbits: uint8(8), Fval: uint16(135)}, {Fbits: uint8(8), Fval: uint16(71)}, {Fbits: uint8(9), Fval: uint16(239)}, {Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9)},
	{Fbits: uint8(8), Fval: uint16(95)}, {Fbits: uint8(8), Fval: uint16(31)}, {Fbits: uint8(9), Fval: uint16(159)}, {Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99)}, {Fbits: uint8(8), Fval: uint16(127)}, {Fbits: uint8(8), Fval: uint16(63)}, {Fbits: uint8(9), Fval: uint16(223)},
	{Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27)}, {Fbits: uint8(8), Fval: uint16(111)}, {Fbits: uint8(8), Fval: uint16(47)}, {Fbits: uint8(9), Fval: uint16(191)}, {Fbits: uint8(8), Fval: uint16(15)}, {Fbits: uint8(8), Fval: uint16(143)}, {Fbits: uint8(8), Fval: uint16(79)},
	{Fbits: uint8(9), Fval: uint16(255)},
} /* inffixed.h:10:23 */
var distfix1 = [32]Code{
	{Fop: uint8(16), Fbits: uint8(5), Fval: uint16(1)}, {Fop: uint8(23), Fbits: uint8(5), Fval: uint16(257)}, {Fop: uint8(19), Fbits: uint8(5), Fval: uint16(17)}, {Fop: uint8(27), Fbits: uint8(5), Fval: uint16(4097)}, {Fop: uint8(17), Fbits: uint8(5), Fval: uint16(5)}, {Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1025)},
	{Fop: uint8(21), Fbits: uint8(5), Fval: uint16(65)}, {Fop: uint8(29), Fbits: uint8(5), Fval: uint16(16385)}, {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(3)}, {Fop: uint8(24), Fbits: uint8(5), Fval: uint16(513)}, {Fop: uint8(20), Fbits: uint8(5), Fval: uint16(33)}, {Fop: uint8(28), Fbits: uint8(5), Fval: uint16(8193)},
	{Fop: uint8(18), Fbits: uint8(5), Fval: uint16(9)}, {Fop: uint8(26), Fbits: uint8(5), Fval: uint16(2049)}, {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(129)}, {Fop: uint8(64), Fbits: uint8(5)}, {Fop: uint8(16), Fbits: uint8(5), Fval: uint16(2)}, {Fop: uint8(23), Fbits: uint8(5), Fval: uint16(385)},
	{Fop: uint8(19), Fbits: uint8(5), Fval: uint16(25)}, {Fop: uint8(27), Fbits: uint8(5), Fval: uint16(6145)}, {Fop: uint8(17), Fbits: uint8(5), Fval: uint16(7)}, {Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1537)}, {Fop: uint8(21), Fbits: uint8(5), Fval: uint16(97)}, {Fop: uint8(29), Fbits: uint8(5), Fval: uint16(24577)},
	{Fop: uint8(16), Fbits: uint8(5), Fval: uint16(4)}, {Fop: uint8(24), Fbits: uint8(5), Fval: uint16(769)}, {Fop: uint8(20), Fbits: uint8(5), Fval: uint16(49)}, {Fop: uint8(28), Fbits: uint8(5), Fval: uint16(12289)}, {Fop: uint8(18), Fbits: uint8(5), Fval: uint16(13)}, {Fop: uint8(26), Fbits: uint8(5), Fval: uint16(3073)},
	{Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)},
} /* inffixed.h:87:23 */

//
//    Update the window with the last wsize (normally 32K) bytes written before
//    returning.  If window does not exist yet, create it.  This is only called
//    when a window is already in use, or when output has been written during this
//    inflate call, but the end of the deflate stream has not been reached yet.
//    It is also called to create a window for dictionary data when a dictionary
//    is loaded.
//
//    Providing output buffers larger than 32K to inflate() should provide a speed
//    advantage, since only the last 32K of output is copied to the sliding window
//    upon return from inflate(), and since all distances after the first 32K of
//    output will fall in the output data, making match copies simpler and faster.
//    The advantage may be dependent on the size of the processor's data caches.
//
func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */
	var state uintptr
	var dist uint32

	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate

	// if it hasn't been done already, allocate space for the window
	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) {
		(*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*struct {
			f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fwbits, uint32(unsafe.Sizeof(uint8(0))))
		if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) {
			return 1
		}
	}

	// if window not in use yet, initialize
	if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) {
		(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits
		(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
		(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
	}

	// copy state->wsize or less output bytes into the circular window
	if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
		libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize), uint64((*Inflate_state)(unsafe.Pointer(state)).Fwsize))
		(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
		(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
	} else {
		dist = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext
		if dist > copy {
			dist = copy
		}
		libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext), end-uintptr(copy), uint64(dist))
		copy = copy - dist
		if copy != 0 {
			libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr(copy), uint64(copy))
			(*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy
			(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
		} else {
			*(*uint32)(unsafe.Pointer(state + 60)) += dist
			if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
				(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
			}
			if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
				*(*uint32)(unsafe.Pointer(state + 56)) += 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 Z_streamp, flush int32) int32 { /* inflate.c:622:13: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var state uintptr
	var next uintptr // next input
	var put uintptr  // next output
	var have uint32
	var left uint32 // available input and output
	var hold uint32 // bit buffer
	var bits uint32 // bits in bit buffer
	var in uint32
	var out uint32   // save starting available input and output
	var copy uint32  // number of stored or match bytes to copy
	var from uintptr // where to copy match bytes from
	var here Code    // current decoding table entry
	var last Code    // parent table entry
	var len uint32   // length to copy for repeats, bits to drop
	var ret int32    // return code
	// var hbuf [4]uint8 at bp, 4

	if !(inflateStateCheck(tls, strm) != 0 || (*Z_stream)(unsafe.Pointer(strm)).Fnext_out == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fnext_in == uintptr(Z_NULL) && (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0)) {
		goto __1
	}
	return -2
__1:
	;

	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) {
		goto __2
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO
__2:
	; // skip check
__3:
	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
	goto __4
__4:
	if 0 != 0 {
		goto __3
	}
	goto __5
__5:
	;
	in = have
	out = left
	ret = Z_OK
__6:
	switch (*Inflate_state)(unsafe.Pointer(state)).Fmode {
	case HEAD:
		goto __10
	case FLAGS:
		goto __11
	case TIME:
		goto __12
	case OS:
		goto __13
	case EXLEN:
		goto __14
	case EXTRA:
		goto __15
	case NAME:
		goto __16
	case COMMENT:
		goto __17
	case HCRC:
		goto __18
	case DICTID:
		goto __19
	case DICT:
		goto __20
	case TYPE:
		goto __21
	case TYPEDO:
		goto __22
	case STORED:
		goto __23
	case COPY_:
		goto __24
	case COPY:
		goto __25
	case TABLE1:
		goto __26
	case LENLENS:
		goto __27
	case CODELENS:
		goto __28
	case LEN_:
		goto __29
	case LEN:
		goto __30
	case LENEXT:
		goto __31
	case DIST:
		goto __32
	case DISTEXT:
		goto __33
	case MATCH:
		goto __34
	case LIT:
		goto __35
	case CHECK:
		goto __36
	case LENGTH:
		goto __37
	case DONE:
		goto __38
	case BAD:
		goto __39
	case MEM:
		goto __40
	case SYNC:
		goto __41
	default:
		goto __42
	}
	goto __9
__10:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) {
		goto __43
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO
	goto __9
__43:
	;
__44:
__47:
	if !(bits < uint32(16)) {
		goto __48
	}
__49:
	if !(have == uint32(0)) {
		goto __52
	}
	goto inf_leave
__52:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
	goto __47
__48:
	;
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 != 0 && hold == uint32(0x8b1f)) {
		goto __53
	} // gzip header
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) {
		goto __54
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15)
__54:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = z.Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
__55:
	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
	goto __56
__56:
	if 0 != 0 {
		goto __55
	}
	goto __57
__57:
	;
__58:
	hold = uint32(0)
	bits = uint32(0)
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS
	goto __9
__53:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
		goto __61
	}
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1
__61:
	;
	if !(!((*Inflate_state)(unsafe.Pointer(state)).Fwrap&1 != 0) || (uint32(uint32(hold)&(uint32(1)<<8-uint32(1))<<8)+hold>>8)%uint32(31) != 0) {
		goto __62
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 443 /* "incorrect header..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__62:
	;
	if !(uint32(hold)&(uint32(1)<<4-uint32(1)) != uint32(Z_DEFLATED)) {
		goto __63
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 466 /* "unknown compress..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__63:
	;
__64:
	hold >>= 4
	bits = bits - uint32(4)
	goto __65
__65:
	if 0 != 0 {
		goto __64
	}
	goto __66
__66:
	;
	len = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(8)
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) {
		goto __67
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = len
__67:
	;
	if !(len > uint32(15) || len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits) {
		goto __68
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 493 /* "invalid window s..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__68:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = uint32(1) << len

	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, z.Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)))
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 {
		if hold&uint32(0x200) != 0 {
			return DICTID
		}
		return TYPE
	}()
__69:
	hold = uint32(0)
	bits = uint32(0)
	goto __70
__70:
	if 0 != 0 {
		goto __69
	}
	goto __71
__71:
	;
	goto __9
__11:
__72:
__75:
	if !(bits < uint32(16)) {
		goto __76
	}
__77:
	if !(have == uint32(0)) {
		goto __80
	}
	goto inf_leave
__80:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __78
__78:
	if 0 != 0 {
		goto __77
	}
	goto __79
__79:
	;
	goto __75
__76:
	;
	goto __73
__73:
	if 0 != 0 {
		goto __72
	}
	goto __74
__74:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold)
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xff != Z_DEFLATED) {
		goto __81
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 466 /* "unknown compress..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__81:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xe000 != 0) {
		goto __82
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 513 /* "unknown header f..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__82:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
		goto __83
	}
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = int32(hold >> 8 & uint32(1))
__83:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
		goto __84
	}
__85:
	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
	goto __86
__86:
	if 0 != 0 {
		goto __85
	}
	goto __87
__87:
	;
__84:
	;
__88:
	hold = uint32(0)
	bits = uint32(0)
	goto __89
__89:
	if 0 != 0 {
		goto __88
	}
	goto __90
__90:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME
__12:
__91:
__94:
	if !(bits < uint32(32)) {
		goto __95
	}
__96:
	if !(have == uint32(0)) {
		goto __99
	}
	goto inf_leave
__99:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __97
__97:
	if 0 != 0 {
		goto __96
	}
	goto __98
__98:
	;
	goto __94
__95:
	;
	goto __92
__92:
	if 0 != 0 {
		goto __91
	}
	goto __93
__93:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
		goto __100
	}
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold
__100:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
		goto __101
	}
__102:
	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
	*(*uint8)(unsafe.Pointer(bp + 2)) = uint8(hold >> 16)
	*(*uint8)(unsafe.Pointer(bp + 3)) = uint8(hold >> 24)
	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(4))
	goto __103
__103:
	if 0 != 0 {
		goto __102
	}
	goto __104
__104:
	;
__101:
	;
__105:
	hold = uint32(0)
	bits = uint32(0)
	goto __106
__106:
	if 0 != 0 {
		goto __105
	}
	goto __107
__107:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = OS
__13:
__108:
__111:
	if !(bits < uint32(16)) {
		goto __112
	}
__113:
	if !(have == uint32(0)) {
		goto __116
	}
	goto inf_leave
__116:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __114
__114:
	if 0 != 0 {
		goto __113
	}
	goto __115
__115:
	;
	goto __111
__112:
	;
	goto __109
__109:
	if 0 != 0 {
		goto __108
	}
	goto __110
__110:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
		goto __117
	}
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = int32(hold & uint32(0xff))
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = int32(hold >> 8)
__117:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
		goto __118
	}
__119:
	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
	goto __120
__120:
	if 0 != 0 {
		goto __119
	}
	goto __121
__121:
	;
__118:
	;
__122:
	hold = uint32(0)
	bits = uint32(0)
	goto __123
__123:
	if 0 != 0 {
		goto __122
	}
	goto __124
__124:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN
__14:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) {
		goto __125
	}
__127:
__130:
	if !(bits < uint32(16)) {
		goto __131
	}
__132:
	if !(have == uint32(0)) {
		goto __135
	}
	goto inf_leave
__135:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __133
__133:
	if 0 != 0 {
		goto __132
	}
	goto __134
__134:
	;
	goto __130
__131:
	;
	goto __128
__128:
	if 0 != 0 {
		goto __127
	}
	goto __129
__129:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold)
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
		goto __136
	}
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold)
__136:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
		goto __137
	}
__138:
	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
	goto __139
__139:
	if 0 != 0 {
		goto __138
	}
	goto __140
__140:
	;
__137:
	;
__141:
	hold = uint32(0)
	bits = uint32(0)
	goto __142
__142:
	if 0 != 0 {
		goto __141
	}
	goto __143
__143:
	;
	goto __126
__125:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
		goto __144
	}
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL)
__144:
	;
__126:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA
__15:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) {
		goto __145
	}
	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
	if !(copy > have) {
		goto __146
	}
	copy = have
__146:
	;
	if !(copy != 0) {
		goto __147
	}
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL) && (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL)) {
		goto __148
	}
	len = (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength
	libc.Xmemcpy(tls, (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra+uintptr(len), next,
		func() uint64 {
			if len+copy > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max {
				return uint64((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len)
			}
			return uint64(copy)
		}())
__148:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
		goto __149
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
__149:
	;
	have = have - copy
	next += uintptr(copy)
	*(*uint32)(unsafe.Pointer(state + 80)) -= copy
__147:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) {
		goto __150
	}
	goto inf_leave
__150:
	;
__145:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0)
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME
__16:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0800 != 0) {
		goto __151
	}
	if !(have == uint32(0)) {
		goto __153
	}
	goto inf_leave
__153:
	;
	copy = uint32(0)
__154:
	len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(&copy, 1)))))
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL) && (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname != uintptr(Z_NULL) && (*Inflate_state)(unsafe.Pointer(state)).Flength < (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname_max) {
		goto __157
	}
	*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Flength, 1)))) = Bytef(len)
__157:
	;
	goto __155
__155:
	if len != 0 && copy < have {
		goto __154
	}
	goto __156
__156:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
		goto __158
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
__158:
	;
	have = have - copy
	next += uintptr(copy)
	if !(len != 0) {
		goto __159
	}
	goto inf_leave
__159:
	;
	goto __152
__151:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
		goto __160
	}
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL)
__160:
	;
__152:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0)
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT
__17:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x1000 != 0) {
		goto __161
	}
	if !(have == uint32(0)) {
		goto __163
	}
	goto inf_leave
__163:
	;
	copy = uint32(0)
__164:
	len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(&copy, 1)))))
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL) && (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment != uintptr(Z_NULL) && (*Inflate_state)(unsafe.Pointer(state)).Flength < (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomm_max) {
		goto __167
	}
	*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Flength, 1)))) = Bytef(len)
__167:
	;
	goto __165
__165:
	if len != 0 && copy < have {
		goto __164
	}
	goto __166
__166:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
		goto __168
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
__168:
	;
	have = have - copy
	next += uintptr(copy)
	if !(len != 0) {
		goto __169
	}
	goto inf_leave
__169:
	;
	goto __162
__161:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
		goto __170
	}
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL)
__170:
	;
__162:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC
__18:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0) {
		goto __171
	}
__172:
__175:
	if !(bits < uint32(16)) {
		goto __176
	}
__177:
	if !(have == uint32(0)) {
		goto __180
	}
	goto inf_leave
__180:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __178
__178:
	if 0 != 0 {
		goto __177
	}
	goto __179
__179:
	;
	goto __175
__176:
	;
	goto __173
__173:
	if 0 != 0 {
		goto __172
	}
	goto __174
__174:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && hold != (*Inflate_state)(unsafe.Pointer(state)).Fcheck&uint32(0xffff)) {
		goto __181
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 538 /* "header crc misma..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__181:
	;
__182:
	hold = uint32(0)
	bits = uint32(0)
	goto __183
__183:
	if 0 != 0 {
		goto __182
	}
	goto __184
__184:
	;
__171:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
		goto __185
	}
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9 & 1
	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1
__185:
	;
	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, z.Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)))
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
	goto __9
__19:
__186:
__189:
	if !(bits < uint32(32)) {
		goto __190
	}
__191:
	if !(have == uint32(0)) {
		goto __194
	}
	goto inf_leave
__194:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __192
__192:
	if 0 != 0 {
		goto __191
	}
	goto __193
__193:
	;
	goto __189
__190:
	;
	goto __187
__187:
	if 0 != 0 {
		goto __186
	}
	goto __188
__188:
	;
	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, hold>>24&uint32(0xff)+hold>>8&uint32(0xff00)+hold&uint32(0xff00)<<8+hold&uint32(0xff)<<24)
__195:
	hold = uint32(0)
	bits = uint32(0)
	goto __196
__196:
	if 0 != 0 {
		goto __195
	}
	goto __197
__197:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT
__20:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) {
		goto __198
	}
__199:
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
	goto __200
__200:
	if 0 != 0 {
		goto __199
	}
	goto __201
__201:
	;
	return Z_NEED_DICT
__198:
	;
	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, z.Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)))
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
__21:
	if !(flush == Z_BLOCK || flush == Z_TREES) {
		goto __202
	}
	goto inf_leave
__202:
	;
__22:
	if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) {
		goto __203
	}
__204:
	hold >>= bits & uint32(7)
	bits = bits - bits&uint32(7)
	goto __205
__205:
	if 0 != 0 {
		goto __204
	}
	goto __206
__206:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK
	goto __9
__203:
	;
__207:
__210:
	if !(bits < uint32(3)) {
		goto __211
	}
__212:
	if !(have == uint32(0)) {
		goto __215
	}
	goto inf_leave
__215:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __213
__213:
	if 0 != 0 {
		goto __212
	}
	goto __214
__214:
	;
	goto __210
__211:
	;
	goto __208
__208:
	if 0 != 0 {
		goto __207
	}
	goto __209
__209:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1)))
__216:
	hold >>= 1
	bits = bits - uint32(1)
	goto __217
__217:
	if 0 != 0 {
		goto __216
	}
	goto __218
__218:
	;
	switch uint32(hold) & (uint32(1)<<2 - uint32(1)) {
	case uint32(0):
		goto __220
	case uint32(1):
		goto __221
	case uint32(2):
		goto __222
	case uint32(3):
		goto __223
	}
	goto __219
__220: // stored block
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED
	goto __219
__221: // fixed block
	fixedtables1(tls, state)

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes
	if !(flush == Z_TREES) {
		goto __224
	}
__225:
	hold >>= 2
	bits = bits - uint32(2)
	goto __226
__226:
	if 0 != 0 {
		goto __225
	}
	goto __227
__227:
	;
	goto inf_leave
__224:
	;
	goto __219
__222: // dynamic block
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE1
	goto __219
__223:
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 141 /* "invalid block ty..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
__219:
	;
__228:
	hold >>= 2
	bits = bits - uint32(2)
	goto __229
__229:
	if 0 != 0 {
		goto __228
	}
	goto __230
__230:
	;
	goto __9
__23:
__231:
	hold >>= bits & uint32(7)
	bits = bits - bits&uint32(7)
	goto __232
__232:
	if 0 != 0 {
		goto __231
	}
	goto __233
__233:
	; // go to byte boundary
__234:
__237:
	if !(bits < uint32(32)) {
		goto __238
	}
__239:
	if !(have == uint32(0)) {
		goto __242
	}
	goto inf_leave
__242:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __240
__240:
	if 0 != 0 {
		goto __239
	}
	goto __241
__241:
	;
	goto __237
__238:
	;
	goto __235
__235:
	if 0 != 0 {
		goto __234
	}
	goto __236
__236:
	;
	if !(hold&uint32(0xffff) != hold>>16^uint32(0xffff)) {
		goto __243
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 160 /* "invalid stored b..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__243:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff)

__244:
	hold = uint32(0)
	bits = uint32(0)
	goto __245
__245:
	if 0 != 0 {
		goto __244
	}
	goto __246
__246:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_
	if !(flush == Z_TREES) {
		goto __247
	}
	goto inf_leave
__247:
	;
__24:
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY
__25:
	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
	if !(copy != 0) {
		goto __248
	}
	if !(copy > have) {
		goto __249
	}
	copy = have
__249:
	;
	if !(copy > left) {
		goto __250
	}
	copy = left
__250:
	;
	if !(copy == uint32(0)) {
		goto __251
	}
	goto inf_leave
__251:
	;
	libc.Xmemcpy(tls, put, next, uint64(copy))
	have = have - copy
	next += uintptr(copy)
	left = left - copy
	put += uintptr(copy)
	*(*uint32)(unsafe.Pointer(state + 80)) -= copy
	goto __9
__248:
	;

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
	goto __9
__26:
__252:
__255:
	if !(bits < uint32(14)) {
		goto __256
	}
__257:
	if !(have == uint32(0)) {
		goto __260
	}
	goto inf_leave
__260:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __258
__258:
	if 0 != 0 {
		goto __257
	}
	goto __259
__259:
	;
	goto __255
__256:
	;
	goto __253
__253:
	if 0 != 0 {
		goto __252
	}
	goto __254
__254:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257)
__261:
	hold >>= 5
	bits = bits - uint32(5)
	goto __262
__262:
	if 0 != 0 {
		goto __261
	}
	goto __263
__263:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1)
__264:
	hold >>= 5
	bits = bits - uint32(5)
	goto __265
__265:
	if 0 != 0 {
		goto __264
	}
	goto __266
__266:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4)
__267:
	hold >>= 4
	bits = bits - uint32(4)
	goto __268
__268:
	if 0 != 0 {
		goto __267
	}
	goto __269
__269:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) {
		goto __270
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 189 /* "too many length ..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__270:
	;

	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS
__27:
__271:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) {
		goto __272
	}
__273:
__276:
	if !(bits < uint32(3)) {
		goto __277
	}
__278:
	if !(have == uint32(0)) {
		goto __281
	}
	goto inf_leave
__281:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __279
__279:
	if 0 != 0 {
		goto __278
	}
	goto __280
__280:
	;
	goto __276
__277:
	;
	goto __274
__274:
	if 0 != 0 {
		goto __273
	}
	goto __275
__275:
	;
	*(*uint16)(unsafe.Pointer(state + 144 + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(uint32(hold) & (uint32(1)<<3 - uint32(1)))
__282:
	hold >>= 3
	bits = bits - uint32(3)
	goto __283
__283:
	if 0 != 0 {
		goto __282
	}
	goto __284
__284:
	;
	goto __271
__272:
	;
__285:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) {
		goto __286
	}
	*(*uint16)(unsafe.Pointer(state + 144 + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0)
	goto __285
__286:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1360 /* &.codes */
	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7)
	ret = z.Xinflate_table(tls, CODES, state+144, uint32(19), state+136,
		state+112, state+784)
	if !(ret != 0) {
		goto __287
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 225 /* "invalid code len..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__287:
	;

	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS
__28:
__288:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
		goto __289
	}
__290:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
	if !(uint32(here.Fbits) <= bits) {
		goto __293
	}
	goto __292
__293:
	;
__294:
	if !(have == uint32(0)) {
		goto __297
	}
	goto inf_leave
__297:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __295
__295:
	if 0 != 0 {
		goto __294
	}
	goto __296
__296:
	;
	goto __291
__291:
	goto __290
	goto __292
__292:
	;
	if !(int32(here.Fval) < 16) {
		goto __298
	}
__300:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __301
__301:
	if 0 != 0 {
		goto __300
	}
	goto __302
__302:
	;
	*(*uint16)(unsafe.Pointer(state + 144 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval
	goto __299
__298:
	if !(int32(here.Fval) == 16) {
		goto __303
	}
__305:
__308:
	if !(bits < uint32(int32(here.Fbits)+2)) {
		goto __309
	}
__310:
	if !(have == uint32(0)) {
		goto __313
	}
	goto inf_leave
__313:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __311
__311:
	if 0 != 0 {
		goto __310
	}
	goto __312
__312:
	;
	goto __308
__309:
	;
	goto __306
__306:
	if 0 != 0 {
		goto __305
	}
	goto __307
__307:
	;
__314:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __315
__315:
	if 0 != 0 {
		goto __314
	}
	goto __316
__316:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) {
		goto __317
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 250 /* "invalid bit leng..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __289
__317:
	;
	len = uint32(*(*uint16)(unsafe.Pointer(state + 144 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2)))
	copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1))
__318:
	hold >>= 2
	bits = bits - uint32(2)
	goto __319
__319:
	if 0 != 0 {
		goto __318
	}
	goto __320
__320:
	;
	goto __304
__303:
	if !(int32(here.Fval) == 17) {
		goto __321
	}
__323:
__326:
	if !(bits < uint32(int32(here.Fbits)+3)) {
		goto __327
	}
__328:
	if !(have == uint32(0)) {
		goto __331
	}
	goto inf_leave
__331:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __329
__329:
	if 0 != 0 {
		goto __328
	}
	goto __330
__330:
	;
	goto __326
__327:
	;
	goto __324
__324:
	if 0 != 0 {
		goto __323
	}
	goto __325
__325:
	;
__332:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __333
__333:
	if 0 != 0 {
		goto __332
	}
	goto __334
__334:
	;
	len = uint32(0)
	copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1))
__335:
	hold >>= 3
	bits = bits - uint32(3)
	goto __336
__336:
	if 0 != 0 {
		goto __335
	}
	goto __337
__337:
	;
	goto __322
__321:
__338:
__341:
	if !(bits < uint32(int32(here.Fbits)+7)) {
		goto __342
	}
__343:
	if !(have == uint32(0)) {
		goto __346
	}
	goto inf_leave
__346:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __344
__344:
	if 0 != 0 {
		goto __343
	}
	goto __345
__345:
	;
	goto __341
__342:
	;
	goto __339
__339:
	if 0 != 0 {
		goto __338
	}
	goto __340
__340:
	;
__347:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __348
__348:
	if 0 != 0 {
		goto __347
	}
	goto __349
__349:
	;
	len = uint32(0)
	copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1))
__350:
	hold >>= 7
	bits = bits - uint32(7)
	goto __351
__351:
	if 0 != 0 {
		goto __350
	}
	goto __352
__352:
	;
__322:
	;
__304:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
		goto __353
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 250 /* "invalid bit leng..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __289
__353:
	;
__354:
	if !(libc.PostDecUint32(&copy, 1) != 0) {
		goto __355
	}
	*(*uint16)(unsafe.Pointer(state + 144 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len)
	goto __354
__355:
	;
__299:
	;
	goto __288
__289:
	;

	// handle error breaks in while
	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) {
		goto __356
	}
	goto __9
__356:
	;

	// check for end-of-block code (better have one)
	if !(int32(*(*uint16)(unsafe.Pointer(state + 144 + 256*2))) == 0) {
		goto __357
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 276 /* "invalid code -- ..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__357:
	;

	// 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
	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1360 /* &.codes */
	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
	ret = z.Xinflate_table(tls, LENS, state+144, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+136,
		state+112, state+784)
	if !(ret != 0) {
		goto __358
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 313 /* "invalid literal/..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__358:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6)
	ret = z.Xinflate_table(tls, DISTS, state+144+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist,
		state+136, state+116, state+784)
	if !(ret != 0) {
		goto __359
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 341 /* "invalid distance..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__359:
	;

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_
	if !(flush == Z_TREES) {
		goto __360
	}
	goto inf_leave
__360:
	;
__29:
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
__30:
	if !(have >= uint32(6) && left >= uint32(258)) {
		goto __361
	}
__362:
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
	goto __363
__363:
	if 0 != 0 {
		goto __362
	}
	goto __364
__364:
	;
	z.Xinflate_fast(tls, strm, out)
__365:
	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
	goto __366
__366:
	if 0 != 0 {
		goto __365
	}
	goto __367
__367:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) {
		goto __368
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
__368:
	;
	goto __9
__361:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fback = 0
__369:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
	if !(uint32(here.Fbits) <= bits) {
		goto __372
	}
	goto __371
__372:
	;
__373:
	if !(have == uint32(0)) {
		goto __376
	}
	goto inf_leave
__376:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __374
__374:
	if 0 != 0 {
		goto __373
	}
	goto __375
__375:
	;
	goto __370
__370:
	goto __369
	goto __371
__371:
	;
	if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) {
		goto __377
	}
	last = here
__378:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(int32(last.Fbits)+int32(last.Fop))-uint32(1))>>int32(last.Fbits))*4))
	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
		goto __381
	}
	goto __380
__381:
	;
__382:
	if !(have == uint32(0)) {
		goto __385
	}
	goto inf_leave
__385:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __383
__383:
	if 0 != 0 {
		goto __382
	}
	goto __384
__384:
	;
	goto __379
__379:
	goto __378
	goto __380
__380:
	;
__386:
	hold >>= int32(last.Fbits)
	bits = bits - uint32(last.Fbits)
	goto __387
__387:
	if 0 != 0 {
		goto __386
	}
	goto __388
__388:
	;
	*(*int32)(unsafe.Pointer(state + 7140)) += int32(last.Fbits)
__377:
	;
__389:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __390
__390:
	if 0 != 0 {
		goto __389
	}
	goto __391
__391:
	;
	*(*int32)(unsafe.Pointer(state + 7140)) += int32(here.Fbits)
	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval)
	if !(int32(here.Fop) == 0) {
		goto __392
	}

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT
	goto __9
__392:
	;
	if !(int32(here.Fop)&32 != 0) {
		goto __393
	}

	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
	goto __9
__393:
	;
	if !(int32(here.Fop)&64 != 0) {
		goto __394
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 363 /* "invalid literal/..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__394:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT
__31:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) {
		goto __395
	}
__396:
__399:
	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
		goto __400
	}
__401:
	if !(have == uint32(0)) {
		goto __404
	}
	goto inf_leave
__404:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __402
__402:
	if 0 != 0 {
		goto __401
	}
	goto __403
__403:
	;
	goto __399
__400:
	;
	goto __397
__397:
	if 0 != 0 {
		goto __396
	}
	goto __398
__398:
	;
	*(*uint32)(unsafe.Pointer(state + 80)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
__405:
	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
	goto __406
__406:
	if 0 != 0 {
		goto __405
	}
	goto __407
__407:
	;
	*(*int32)(unsafe.Pointer(state + 7140)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra)
__395:
	;

	(*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST
__32:
__408:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4))
	if !(uint32(here.Fbits) <= bits) {
		goto __411
	}
	goto __410
__411:
	;
__412:
	if !(have == uint32(0)) {
		goto __415
	}
	goto inf_leave
__415:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __413
__413:
	if 0 != 0 {
		goto __412
	}
	goto __414
__414:
	;
	goto __409
__409:
	goto __408
	goto __410
__410:
	;
	if !(int32(here.Fop)&0xf0 == 0) {
		goto __416
	}
	last = here
__417:
	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(int32(last.Fbits)+int32(last.Fop))-uint32(1))>>int32(last.Fbits))*4))
	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
		goto __420
	}
	goto __419
__420:
	;
__421:
	if !(have == uint32(0)) {
		goto __424
	}
	goto inf_leave
__424:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __422
__422:
	if 0 != 0 {
		goto __421
	}
	goto __423
__423:
	;
	goto __418
__418:
	goto __417
	goto __419
__419:
	;
__425:
	hold >>= int32(last.Fbits)
	bits = bits - uint32(last.Fbits)
	goto __426
__426:
	if 0 != 0 {
		goto __425
	}
	goto __427
__427:
	;
	*(*int32)(unsafe.Pointer(state + 7140)) += int32(last.Fbits)
__416:
	;
__428:
	hold >>= int32(here.Fbits)
	bits = bits - uint32(here.Fbits)
	goto __429
__429:
	if 0 != 0 {
		goto __428
	}
	goto __430
__430:
	;
	*(*int32)(unsafe.Pointer(state + 7140)) += int32(here.Fbits)
	if !(int32(here.Fop)&64 != 0) {
		goto __431
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 391 /* "invalid distance..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__431:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval)
	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT
__33:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) {
		goto __432
	}
__433:
__436:
	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
		goto __437
	}
__438:
	if !(have == uint32(0)) {
		goto __441
	}
	goto inf_leave
__441:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __439
__439:
	if 0 != 0 {
		goto __438
	}
	goto __440
__440:
	;
	goto __436
__437:
	;
	goto __434
__434:
	if 0 != 0 {
		goto __433
	}
	goto __435
__435:
	;
	*(*uint32)(unsafe.Pointer(state + 84)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
__442:
	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
	goto __443
__443:
	if 0 != 0 {
		goto __442
	}
	goto __444
__444:
	;
	*(*int32)(unsafe.Pointer(state + 7140)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra)
__432:
	;

	(*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH
__34:
	if !(left == uint32(0)) {
		goto __445
	}
	goto inf_leave
__445:
	;
	copy = out - left
	if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) {
		goto __446
	} // copy from window
	copy = (*Inflate_state)(unsafe.Pointer(state)).Foffset - copy
	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) {
		goto __448
	}
	if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) {
		goto __449
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 413 /* "invalid distance..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__449:
	;
__448:
	;
	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) {
		goto __450
	}
	copy = copy - (*Inflate_state)(unsafe.Pointer(state)).Fwnext
	from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize-copy)
	goto __451
__450:
	from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext-copy)
__451:
	;
	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) {
		goto __452
	}
	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
__452:
	;
	goto __447
__446: // copy from output
	from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)
	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
__447:
	;
	if !(copy > left) {
		goto __453
	}
	copy = left
__453:
	;
	left = left - copy
	*(*uint32)(unsafe.Pointer(state + 80)) -= copy
__454:
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
	goto __455
__455:
	if libc.PreDecUint32(&copy, 1) != 0 {
		goto __454
	}
	goto __456
__456:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) {
		goto __457
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
__457:
	;
	goto __9
__35:
	if !(left == uint32(0)) {
		goto __458
	}
	goto inf_leave
__458:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength)
	left--
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
	goto __9
__36:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) {
		goto __459
	}
__460:
__463:
	if !(bits < uint32(32)) {
		goto __464
	}
__465:
	if !(have == uint32(0)) {
		goto __468
	}
	goto inf_leave
__468:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __466
__466:
	if 0 != 0 {
		goto __465
	}
	goto __467
__467:
	;
	goto __463
__464:
	;
	goto __461
__461:
	if 0 != 0 {
		goto __460
	}
	goto __462
__462:
	;
	out = out - left
	*(*ULong)(unsafe.Pointer(strm + 28)) += ULong(out)
	*(*uint32)(unsafe.Pointer(state + 36)) += uint32(out)
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) {
		goto __469
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, func() uint32 {
		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
			return z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out)
		}
		return z.Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out)
	}())
__469:
	;
	out = left
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && func() uint32 {
		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
			return hold
		}
		return hold>>24&uint32(0xff) + hold>>8&uint32(0xff00) + hold&uint32(0xff00)<<8 + hold&uint32(0xff)<<24
	}() != (*Inflate_state)(unsafe.Pointer(state)).Fcheck) {
		goto __470
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 558 /* "incorrect data c..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__470:
	;
__471:
	hold = uint32(0)
	bits = uint32(0)
	goto __472
__472:
	if 0 != 0 {
		goto __471
	}
	goto __473
__473:
	;

__459:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH
__37:
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0) {
		goto __474
	}
__475:
__478:
	if !(bits < uint32(32)) {
		goto __479
	}
__480:
	if !(have == uint32(0)) {
		goto __483
	}
	goto inf_leave
__483:
	;
	have--
	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
	bits = bits + uint32(8)
	goto __481
__481:
	if 0 != 0 {
		goto __480
	}
	goto __482
__482:
	;
	goto __478
__479:
	;
	goto __476
__476:
	if 0 != 0 {
		goto __475
	}
	goto __477
__477:
	;
	if !(hold != (*Inflate_state)(unsafe.Pointer(state)).Ftotal&0xffffffff) {
		goto __484
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 579 /* "incorrect length..." */
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
	goto __9
__484:
	;
__485:
	hold = uint32(0)
	bits = uint32(0)
	goto __486
__486:
	if 0 != 0 {
		goto __485
	}
	goto __487
__487:
	;

__474:
	;
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE
__38:
	ret = Z_STREAM_END
	goto inf_leave
__39:
	ret = -3
	goto inf_leave
__40:
	return -4
__41:
__42:
	return -2
__9:
	;
	goto __7
__7:
	goto __6
	goto __8
__8:
	;

	//
	//        Return from inflate(), updating the total counts and the check value.
	//        If there was no progress during the inflate() call, return a buffer
	//        error.  Call updatewindow() to create and/or update the window state.
	//        Note: a memory error from inflate() is non-recoverable.
	//
inf_leave:
__488:
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
	goto __489
__489:
	if 0 != 0 {
		goto __488
	}
	goto __490
__490:
	;
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwsize != 0 || out != (*Z_stream)(unsafe.Pointer(strm)).Favail_out && (*Inflate_state)(unsafe.Pointer(state)).Fmode < BAD && ((*Inflate_state)(unsafe.Pointer(state)).Fmode < CHECK || flush != Z_FINISH)) {
		goto __491
	}
	if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out) != 0) {
		goto __492
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM
	return -4
__492:
	;
__491:
	;
	in = in - (*Z_stream)(unsafe.Pointer(strm)).Favail_in
	out = out - (*Z_stream)(unsafe.Pointer(strm)).Favail_out
	*(*ULong)(unsafe.Pointer(strm + 12)) += ULong(in)
	*(*ULong)(unsafe.Pointer(strm + 28)) += ULong(out)
	*(*uint32)(unsafe.Pointer(state + 36)) += uint32(out)
	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) {
		goto __493
	}
	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+32, func() uint32 {
		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
			return z.Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out)
		}
		return z.Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out)
	}())
__493:
	;
	(*Z_stream)(unsafe.Pointer(strm)).Fdata_type = int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + func() int32 {
		if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 {
			return 64
		}
		return 0
	}() + func() int32 {
		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE {
			return 128
		}
		return 0
	}() + func() int32 {
		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_ || (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_ {
			return 256
		}
		return 0
	}()
	if !((in == uint32(0) && out == uint32(0) || flush == Z_FINISH) && ret == Z_OK) {
		goto __494
	}
	ret = -5
__494:
	;
	return ret
}

var order1 =                                                                                                                                                                                                                         // permutation of code lengths
[19]uint16{uint16(16), uint16(17), uint16(18), uint16(0), uint16(8), uint16(7), uint16(9), uint16(6), uint16(10), uint16(5), uint16(11), uint16(4), uint16(12), uint16(3), uint16(13), uint16(2), uint16(14), uint16(1), uint16(15)} /* inflate.c:642:33 */

func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */
	var state uintptr
	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) {
		(*struct {
			f func(*libc.TLS, Voidpf, Voidpf)
		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow)
	}
	(*struct {
		f func(*libc.TLS, Voidpf, Voidpf)
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)

	return Z_OK
}

func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */
	var state uintptr

	// check state
	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate

	// copy dictionary
	if (*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0 && dictionary != uintptr(Z_NULL) {
		libc.Xmemcpy(tls, dictionary, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext),
			uint64((*Inflate_state)(unsafe.Pointer(state)).Fwhave-(*Inflate_state)(unsafe.Pointer(state)).Fwnext))
		libc.Xmemcpy(tls, dictionary+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext),
			(*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64((*Inflate_state)(unsafe.Pointer(state)).Fwnext))
	}
	if dictLength != uintptr(Z_NULL) {
		*(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave
	}
	return Z_OK
}

func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */
	var state uintptr
	var dictid uint32
	var ret int32

	// check state
	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT {
		return -2
	}

	// check for correct dictionary identifier
	if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT {
		dictid = z.Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
		dictid = z.Xadler32(tls, dictid, dictionary, dictLength)
		if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck {
			return -3
		}
	}

	// copy dictionary to window using updatewindow(), which will amend the
	//        existing dictionary if appropriate
	ret = updatewindow(tls, strm, dictionary+uintptr(dictLength), dictLength)
	if ret != 0 {
		(*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM
		return -4
	}
	(*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1

	return Z_OK
}

func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */
	var state uintptr

	// check state
	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 == 0 {
		return -2
	}

	// save header structure
	(*Inflate_state)(unsafe.Pointer(state)).Fhead = head
	(*Gz_header)(unsafe.Pointer(head)).Fdone = 0
	return Z_OK
}

//
//    Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff.  Return when found
//    or when out of input.  When called, *have is the number of pattern bytes
//    found in order so far, in 0..3.  On return *have is updated to the new
//    state.  If on return *have equals four, then the pattern was found and the
//    return value is how many bytes were read including the last byte of the
//    pattern.  If *have is less than four, then the pattern has not been found
//    yet and the return value is len.  In the latter case, syncsearch() can be
//    called again with more data and the *have state.  *have is initialized to
//    zero for the first call.
//
func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */
	var got uint32
	var next uint32

	got = *(*uint32)(unsafe.Pointer(have))
	next = uint32(0)
	for next < len && got < uint32(4) {
		if int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next)))) == func() int32 {
			if got < uint32(2) {
				return 0
			}
			return 0xff
		}() {
			got++
		} else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 {
			got = uint32(0)
		} else {
			got = uint32(4) - got
		}
		next++
	}
	*(*uint32)(unsafe.Pointer(have)) = got
	return next
}

func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var len uint32 // number of bytes to look at or looked at
	var in uint32
	var out uint32 // temporary to save total_in and total_out
	// var buf [4]uint8 at bp, 4
	// to restore bit buffer to byte string
	var state uintptr

	// check parameters
	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && (*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8) {
		return -5
	}

	// if first time, start search in bit buffer
	if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC {
		(*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC
		libc.AssignShlPtrUint32(state+72, int((*Inflate_state)(unsafe.Pointer(state)).Fbits&uint32(7)))
		*(*uint32)(unsafe.Pointer(state + 76)) -= (*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)
		len = uint32(0)
		for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) {
			*(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold)
			libc.AssignShrPtrUint32(state+72, int(8))
			*(*uint32)(unsafe.Pointer(state + 76)) -= uint32(8)
		}
		(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
		syncsearch(tls, state+132, bp, len)
	}

	// search available input
	len = syncsearch(tls, state+132, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in)
	*(*UInt)(unsafe.Pointer(strm + 8)) -= len
	*(*uintptr)(unsafe.Pointer(strm)) += uintptr(len)
	*(*ULong)(unsafe.Pointer(strm + 12)) += ULong(len)

	// return no joy or set up to restart inflate() on a new block
	if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) {
		return -3
	}
	in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in
	out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out
	z.XinflateReset(tls, strm)
	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in
	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out
	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
	return Z_OK
}

//
//    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 Z_streamp) int32 { /* inflate.c:1451:13: */
	var state uintptr

	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	return libc.Bool32((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED && (*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0))
}

func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */
	var state uintptr
	var copy uintptr
	var window uintptr
	var wsize uint32

	// check input
	if inflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(source)).Fstate

	// allocate space
	copy = (*struct {
		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(source)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Inflate_state{})))
	if copy == uintptr(Z_NULL) {
		return -4
	}
	window = uintptr(Z_NULL)
	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) {
		window = (*struct {
			f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(source)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fwbits, uint32(unsafe.Sizeof(uint8(0))))
		if window == uintptr(Z_NULL) {
			(*struct {
				f func(*libc.TLS, Voidpf, Voidpf)
			})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(source)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy)
			return -4
		}
	}

	// copy state
	libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{})))
	libc.Xmemcpy(tls, copy, state, uint64(unsafe.Sizeof(Inflate_state{})))
	(*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest
	if (*Inflate_state)(unsafe.Pointer(state)).Flencode >= state+1360 && (*Inflate_state)(unsafe.Pointer(state)).Flencode <= state+1360+uintptr(ENOUGH_LENS+ENOUGH_DISTS)*4-uintptr(1)*4 {
		(*Inflate_state)(unsafe.Pointer(copy)).Flencode = copy + 1360 + uintptr(int64(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1360))/4))*4
		(*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = copy + 1360 + uintptr(int64(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1360))/4))*4
	}
	(*Inflate_state)(unsafe.Pointer(copy)).Fnext = copy + 1360 + uintptr(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1360))/4))*4
	if window != uintptr(Z_NULL) {
		wsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits
		libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64(wsize))
	}
	(*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window
	(*Z_stream)(unsafe.Pointer(dest)).Fstate = copy
	return Z_OK
}

func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */
	var state uintptr

	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	_ = subvert
	(*Inflate_state)(unsafe.Pointer(state)).Fsane = 1
	return -3
}

func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */
	var state uintptr

	if inflateStateCheck(tls, strm) != 0 {
		return -2
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	if check != 0 {
		*(*int32)(unsafe.Pointer(state + 16)) |= 4
	} else {
		*(*int32)(unsafe.Pointer(state + 16)) &= libc.CplInt32(4)
	}
	return Z_OK
}

func XinflateMark(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1541:14: */
	var state uintptr

	if inflateStateCheck(tls, strm) != 0 {
		return -(int32(1) << 16)
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	return int32(uint32(int32(uint32(int32((*Inflate_state)(unsafe.Pointer(state)).Fback))<<16)) + func() uint32 {
		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY {
			return uint32((*Inflate_state)(unsafe.Pointer(state)).Flength)
		}
		return func() uint32 {
			if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH {
				return uint32((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength)
			}
			return uint32(0)
		}()
	}())
}

func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint32 { /* inflate.c:1554:23: */
	var state uintptr
	if inflateStateCheck(tls, strm) != 0 {
		return libc.Uint32(libc.Uint32FromInt32(-1))
	}
	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
	return uint32(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1360)) / 4))
}

var Xinflate_copyright = *(*[48]int8)(unsafe.Pointer(ts + 602)) /* inftrees.c:11:12 */

//
//   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.
//

//
//    Build a set of tables to decode the provided canonical Huffman code.
//    The code lengths are lens[0..codes-1].  The result starts at *table,
//    whose indices are 0..2^bits-1.  work is a writable array of at least
//    lens shorts, which is used as a work area.  type is the type of code
//    to be generated, CODES, LENS, or DISTS.  On return, zero is success,
//    -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
//    on return points to the next available entry's address.  bits is the
//    requested root table index bits, and on return it is the actual root
//    table index bits.  It will differ if the request is greater than the
//    longest code or if it is less than the shortest code.
//
func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	var len uint32 // a code's length in bits
	var sym uint32 // index of code symbols
	var min uint32
	var max uint32    // minimum and maximum code lengths
	var root uint32   // number of index bits for root table
	var curr uint32   // number of index bits for current table
	var drop uint32   // code bits to drop for sub-table
	var left int32    // number of prefix codes available
	var used uint32   // code entries in table used
	var huff uint32   // Huffman code
	var incr uint32   // for incrementing code, index
	var fill uint32   // index for replicating entries
	var low uint32    // low bits for current root entry
	var mask uint32   // mask for low root bits
	var here Code     // table entry for duplication
	var next uintptr  // next available space in table
	var base uintptr  // base value table to use
	var extra uintptr // extra bits table to use
	var match uint32  // use base and extra for symbol >= match
	// var count [16]uint16 at bp, 32
	// number of codes of each length
	// var offs [16]uint16 at bp+32, 32

	//
	//        Process a set of code lengths to create a canonical Huffman code.  The
	//        code lengths are lens[0..codes-1].  Each length corresponds to the
	//        symbols 0..codes-1.  The Huffman code is generated by first sorting the
	//        symbols by length from short to long, and retaining the symbol order
	//        for codes with equal lengths.  Then the code starts with all zero bits
	//        for the first code of the shortest length, and the codes are integer
	//        increments for the same length, and zeros are appended as the length
	//        increases.  For the deflate format, these bits are stored backwards
	//        from their more natural integer increment ordering, and so when the
	//        decoding tables are built in the large loop below, the integer codes
	//        are incremented backwards.
	//
	//        This routine assumes, but does not check, that all of the entries in
	//        lens[] are in the range 0..MAXBITS.  The caller must assure this.
	//        1..MAXBITS is interpreted as that code length.  zero means that that
	//        symbol does not occur in this code.
	//
	//        The codes are sorted by computing a count of codes for each length,
	//        creating from that a table of starting indices for each length in the
	//        sorted table, and then entering the symbols in order in the sorted
	//        table.  The sorted table is work[], with that space being provided by
	//        the caller.
	//
	//        The length counts are used for other purposes as well, i.e. finding
	//        the minimum and maximum length codes, determining if there are any
	//        codes at all, checking for a valid set of lengths, and looking ahead
	//        at length counts to determine sub-table sizes when building the
	//        decoding tables.
	//

	// accumulate lengths for codes (assumes lens[] all in 0..MAXBITS)
	for len = uint32(0); len <= uint32(MAXBITS); len++ {
		*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)) = uint16(0)
	}
	for sym = uint32(0); sym < codes; sym++ {
		*(*uint16)(unsafe.Pointer(bp + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++
	}

	// bound code lengths, force root to be within code lengths
	root = *(*uint32)(unsafe.Pointer(bits))
	for max = uint32(MAXBITS); max >= uint32(1); max-- {
		if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(max)*2))) != 0 {
			break
		}
	}
	if root > max {
		root = max
	}
	if max == uint32(0) { // no symbols to code at all
		here.Fop = uint8(64) // invalid code marker
		here.Fbits = uint8(1)
		here.Fval = uint16(0)
		*(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here // make a table to force an error
		*(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here
		*(*uint32)(unsafe.Pointer(bits)) = uint32(1)
		return 0 // no symbols, but wait for decoding to report error
	}
	for min = uint32(1); min < max; min++ {
		if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(min)*2))) != 0 {
			break
		}
	}
	if root < min {
		root = min
	}

	// check for an over-subscribed or incomplete set of lengths
	left = 1
	for len = uint32(1); len <= uint32(MAXBITS); len++ {
		left <<= 1
		left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)))
		if left < 0 {
			return -1
		} // over-subscribed
	}
	if left > 0 && (type1 == CODES || max != uint32(1)) {
		return -1
	} // incomplete set

	// generate offsets into symbol table for each length for sorting
	*(*uint16)(unsafe.Pointer(bp + 32 + 1*2)) = uint16(0)
	for len = uint32(1); len < uint32(MAXBITS); len++ {
		*(*uint16)(unsafe.Pointer(bp + 32 + uintptr(len+uint32(1))*2)) = uint16(int32(*(*uint16)(unsafe.Pointer(bp + 32 + uintptr(len)*2))) + int32(*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2))))
	}

	// sort symbols by length, by symbol order within each length
	for sym = uint32(0); sym < codes; sym++ {
		if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 {
			*(*uint16)(unsafe.Pointer(work + uintptr(libc.PostIncUint16(&*(*uint16)(unsafe.Pointer(bp + 32 + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2)), 1))*2)) = uint16(sym)
		}
	}

	//
	//        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 CODES:
		base = libc.AssignUintptr(&extra, work) // dummy value--not used
		match = uint32(20)
		break
	case LENS:
		base = uintptr(unsafe.Pointer(&lbase))
		extra = uintptr(unsafe.Pointer(&lext))
		match = uint32(257)
		break
	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
	len = 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.Uint32(libc.Uint32FromInt32(-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 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) {
		return 1
	}

	// process all codes and make table entries
	for {
		// create table entry
		here.Fbits = uint8(len - drop)
		if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))+1 < match {
			here.Fop = uint8(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 = uint8(32 + 64) // end of block
			here.Fval = uint16(0)
		}

		// replicate for those indices with low len bits equal to huff
		incr = uint32(1) << (len - drop)
		fill = uint32(1) << curr
		min = fill // save offset to next table
		for ok := true; ok; ok = fill != uint32(0) {
			fill = fill - incr
			*(*Code)(unsafe.Pointer(next + uintptr(huff>>drop+fill)*4)) = here
		}

		// backwards increment the len-bit code huff
		incr = uint32(1) << (len - uint32(1))
		for huff&incr != 0 {
			incr >>= 1
		}
		if incr != uint32(0) {
			huff = huff & (incr - uint32(1))
			huff = huff + incr
		} else {
			huff = uint32(0)
		}

		// go to next symbol, update count, len
		sym++
		if int32(libc.PreDecUint16(&*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)), 1)) == 0 {
			if len == max {
				break
			}
			len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2)))
		}

		// create new sub-table if needed
		if len > root && huff&mask != low {
			// if first time, transition to sub-tables
			if drop == uint32(0) {
				drop = root
			}

			// increment past last table
			next += 4 * uintptr(min) // here min is 1 << curr

			// determine length of next table
			curr = len - drop
			left = int32(1) << curr
			for curr+drop < max {
				left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(curr+drop)*2)))
				if left <= 0 {
					break
				}
				curr++
				left <<= 1
			}

			// check for enough space
			used = used + uint32(1)<<curr
			if type1 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) {
				return 1
			}

			// point entry in root table to sub-table
			low = huff & mask
			(*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fop = uint8(curr)
			(*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fbits = uint8(root)
			(*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fval = uint16((int64(next) - int64(*(*uintptr)(unsafe.Pointer(table)))) / 4)
		}
	}

	// 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 = uint8(64) // invalid code marker
		here.Fbits = uint8(len - drop)
		here.Fval = uint16(0)
		*(*Code)(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{ // Length codes 257..285 base
	uint16(3), uint16(4), uint16(5), uint16(6), uint16(7), uint16(8), uint16(9), uint16(10), uint16(11), uint16(13), uint16(15), uint16(17), uint16(19), uint16(23), uint16(27), uint16(31),
			uint16(35), uint16(43), uint16(51), uint16(59), uint16(67), uint16(83), uint16(99), uint16(115), uint16(131), uint16(163), uint16(195), uint16(227), uint16(258), uint16(0), uint16(0)} /* inftrees.c:60:33 */
var lext = [31]uint16{ // Length codes 257..285 extra
	uint16(16), uint16(16), uint16(16), uint16(16), uint16(16), uint16(16), uint16(16), uint16(16), uint16(17), uint16(17), uint16(17), uint16(17), uint16(18), uint16(18), uint16(18), uint16(18),
			uint16(19), uint16(19), uint16(19), uint16(19), uint16(20), uint16(20), uint16(20), uint16(20), uint16(21), uint16(21), uint16(21), uint16(21), uint16(16), uint16(77), uint16(202)} /* inftrees.c:63:33 */
var dbase = [32]uint16{ // Distance codes 0..29 base
	uint16(1), uint16(2), uint16(3), uint16(4), uint16(5), uint16(7), uint16(9), uint16(13), uint16(17), uint16(25), uint16(33), uint16(49), uint16(65), uint16(97), uint16(129), uint16(193),
	uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145),
			uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */
var dext = [32]uint16{ // Distance codes 0..29 extra
	uint16(16), uint16(16), uint16(16), uint16(16), uint16(17), uint16(17), uint16(18), uint16(18), uint16(19), uint16(19), uint16(20), uint16(20), uint16(21), uint16(21), uint16(22), uint16(22),
	uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27),
	uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// regular expressions
//
// Copyright (c) 1998, 1999 Henry Spencer.  All rights reserved.
//
// Development of this software was funded, in part, by Cray Research Inc.,
// UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
// Corporation, none of whom are responsible for the results. The author
// thanks all of them.
//
// Redistribution and use in source and binary forms -- with or without
// modification -- are permitted for any purpose, provided that
// redistributions in source form retain this entire copyright notice and
// indicate the origin and nature of any modifications.
//
// I'd appreciate being given credit for this package in the documentation of
// software which uses it, but that is not a requirement.
//
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
// HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Prototypes etc. marked with "^" within comments get gathered up (and
// possibly edited) by the regfwd program and inserted near the bottom of this
// file.
//
// We offer the option of declaring one wide-character version of the RE
// functions as well as the char versions. To do that, define __REG_WIDE_T to
// the type of wide characters (unfortunately, there is no consensus that
// wchar_t is suitable) and __REG_WIDE_COMPILE and __REG_WIDE_EXEC to the
// names to be used for the compile and execute functions (suggestion:
// re_Xcomp and re_Xexec, where X is a letter suggestive of the wide type,
// e.g. re_ucomp and re_uexec for Unicode). For cranky old compilers, it may
// be necessary to do something like:
// #define	__REG_WIDE_COMPILE(a,b,c,d)	re_Xcomp(a,b,c,d)
// #define	__REG_WIDE_EXEC(a,b,c,d,e,f,g)	re_Xexec(a,b,c,d,e,f,g)
// rather than just #defining the names as parameterless macros.
//
// For some specialized purposes, it may be desirable to suppress the
// declarations of the "front end" functions, regcomp() and regexec(), or of
// the char versions of the compile and execute functions. To suppress the
// front-end functions, define __REG_NOFRONT. To suppress the char versions,
// define __REG_NOCHAR.
//
// The right place to do those defines (and some others you may want, see
// below) would be <sys/types.h>. If you don't have control of that file, the
// right place to add your own defines to this file is marked below. This is
// normally done automatically, by the makefile and regmkhdr, based on the
// contents of regcustom.h.

// voodoo for C++

// Add your own defines, if needed, here.

// Location where a chunk of regcustom.h is automatically spliced into this
// file (working from its prototype, regproto.h).

// --- begin ---
// ensure certain things don't sneak in from system headers
// interface types
// names and declarations
// --- end ---

// interface types etc.

// regoff_t has to be large enough to hold either off_t or ssize_t, and must
// be signed; it's only a guess that long is suitable, so we offer
// <sys/types.h> an override.
type Regoff_t = int32 /* regex.h:123:24 */

// other interface types

// the biggie, a compiled RE (or rather, a front end to same)
type Regex_t = struct {
	Fre_magic    int32
	F__ccgo_pad1 [4]byte
	Fre_nsub     Size_t
	Fre_info     int32
	Fre_csize    int32
	Fre_endp     uintptr
	Fre_guts     uintptr
	Fre_fns      uintptr
} /* regex.h:156:3 */

// result reporting (may acquire more fields later)
type Regmatch_t = struct {
	Frm_so Regoff_t
	Frm_eo Regoff_t
} /* regex.h:162:3 */

// supplementary control and reporting
type Rm_detail_t = struct{ Frm_extend Regmatch_t } /* regex.h:167:3 */
// automatically gathered by fwd; do not hand-edit
// =====^!^===== end forwards =====^!^=====

// more C++ voodoo

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Overrides for regguts.h definitions, if any.

// Do not insert extras between the "begin" and "end" lines - this chunk is
// automatically extracted to be fitted into regex.h.

// --- begin ---
// Ensure certain things don't sneak in from system headers.
// Interface types
// Names and declarations
// --- end ---

// Internal character type and related.

type Chr = Tcl_UniChar /* regcustom.h:85:21 */ // The type itself.
type Pchr = int32      /* regcustom.h:86:13 */ // What it promotes to.
type Uchr = uint32     /* regcustom.h:87:18 */ // Unsigned type that will hold a chr.
type Celt = int32      /* regcustom.h:88:13 */

// Static assertion.  Requires support in the compiler.

// voids

// function-pointer declarator

// memory allocation

// want size of a char in bits, and max value in bounded quantifiers

// misc

// debugging facilities

// bitmap manipulation

// We dissect a chr into byts for colormap table indexing. Here we define a
// byt, which will be the same as a byte on most machines... The exact size of
// a byt is not critical, but about 8 bits is good, and extraction of 8-bit
// chunks is sometimes especially fast.

// the definition of GETCOLOR(), below, assumes NBYTS <= 4

// As soon as possible, we map chrs into equivalence classes -- "colors" --
// which are of much more manageable number.

type Color = int16  /* regguts.h:146:15 */ // colors of characters
type Pcolor = int32 /* regguts.h:147:13 */ // what color promotes to

// A colormap is a tree -- more precisely, a DAG -- indexed at each level by a
// byt of the chr, to map the chr to a color efficiently. Because lower
// sections of the tree can be shared, it can exploit the usual sparseness of
// such a mapping table. The tree is always NBYTS levels deep (in the past it
// was shallower during construction but was "filled" to full depth at the end
// of that); areas that are unaltered as yet point to "fill blocks" which are
// entirely WHITE in color.

// the tree itself
type Colors = struct{ Fccolor [256]Color } /* regguts.h:163:1 */

type Ptrs = struct{ Fpptr [256]uintptr } /* regguts.h:166:1 */

type Tree = struct {
	F__ccgo_pad1 [0]uint64
	Fcolors      struct{ Fccolor [256]Color }
	F__ccgo_pad2 [1536]byte
} /* regguts.h:166:1 */

// Internal per-color descriptor structure for the color machinery
type Colordesc = struct {
	Fnchrs       Uchr
	Fsub         Color
	F__ccgo_pad1 [2]byte
	Farcs        uintptr
	Fflags       int32
	F__ccgo_pad2 [4]byte
	Fblock       uintptr
} /* regguts.h:177:1 */

// Internal per-color descriptor structure for the color machinery
type Arc = struct {
	Ftype          int32
	Fco            Color
	F__ccgo_pad1   [2]byte
	Ffrom          uintptr
	Fto            uintptr
	Foutchain      uintptr
	FoutchainRev   uintptr
	Finchain       uintptr
	FinchainRev    uintptr
	Fcolorchain    uintptr
	FcolorchainRev uintptr
} /* regguts.h:177:1 */

// The color map itself
//
// Much of the data in the colormap struct is only used at compile time.
// However, the bulk of the space usage is in the "tree" structure, so it's
// not clear that there's much point in converting the rest to a more compact
// form when compilation is finished.
type Colormap = struct {
	Fmagic       int32
	F__ccgo_pad1 [4]byte
	Fv           uintptr
	Fncds        Size_t
	Fmax         Size_t
	Ffree        Color
	F__ccgo_pad2 [6]byte
	Fcd          uintptr
	Fcdspace     [10]struct {
		Fnchrs       Uchr
		Fsub         Color
		F__ccgo_pad1 [2]byte
		Farcs        uintptr
		Fflags       int32
		F__ccgo_pad2 [4]byte
		Fblock       uintptr
	}
	Ftree [2]struct {
		F__ccgo_pad1 [0]uint64
		Fcolors      struct{ Fccolor [256]Color }
		F__ccgo_pad2 [1536]byte
	}
} /* regguts.h:197:1 */

// optimization magic to do fast chr->color mapping
// beware, for NBYTS>1, GETCOLOR() is unsafe -- 2nd arg used repeatedly

// Interface definitions for locale-interface functions in locale.c.

// Representation of a set of characters.
type Cvec = struct {
	Fnchrs      int32
	Fchrspace   int32
	Fchrs       uintptr
	Fnranges    int32
	Frangespace int32
	Franges     uintptr
} /* regguts.h:197:1 */

// definitions for non-deterministic finite autmaton (NFA) internal
// representation
//
// Having a "from" pointer within each arc may seem redundant, but it saves a
// lot of hassle.

type State = struct {
	Fno          int32
	Fflag        int8
	F__ccgo_pad1 [3]byte
	Fnins        int32
	F__ccgo_pad2 [4]byte
	Fins         uintptr
	Fnouts       int32
	F__ccgo_pad3 [4]byte
	Fouts        uintptr
	Ffree        uintptr
	Ftmp         uintptr
	Fnext        uintptr
	Fprev        uintptr
	Foas         struct {
		Fnext uintptr
		Fa    [10]struct {
			Ftype          int32
			Fco            Color
			F__ccgo_pad1   [2]byte
			Ffrom          uintptr
			Fto            uintptr
			Foutchain      uintptr
			FoutchainRev   uintptr
			Finchain       uintptr
			FinchainRev    uintptr
			Fcolorchain    uintptr
			FcolorchainRev uintptr
		}
	}
	Fnoas        int32
	F__ccgo_pad4 [4]byte
} /* regguts.h:177:1 */

type Arcbatch = struct {
	Fnext uintptr
	Fa    [10]struct {
		Ftype          int32
		Fco            Color
		F__ccgo_pad1   [2]byte
		Ffrom          uintptr
		Fto            uintptr
		Foutchain      uintptr
		FoutchainRev   uintptr
		Finchain       uintptr
		FinchainRev    uintptr
		Fcolorchain    uintptr
		FcolorchainRev uintptr
	}
} /* regguts.h:177:1 */

type Nfa = struct {
	Fpre         uintptr
	Finit        uintptr
	Ffinal       uintptr
	Fpost        uintptr
	Fnstates     int32
	F__ccgo_pad1 [4]byte
	Fstates      uintptr
	Fslast       uintptr
	Ffree        uintptr
	Fcm          uintptr
	Fbos         [2]Color
	Feos         [2]Color
	Fv           uintptr
	Fparent      uintptr
} /* regguts.h:197:1 */

// definitions for compacted NFA
//
// The main space savings in a compacted NFA is from making the arcs as small
// as possible.  We store only the transition color and next-state number for
// each arc.  The list of out arcs for each state is an array beginning at
// cnfa.states[statenumber], and terminated by a dummy carc struct with
// co == COLORLESS.
//
// The non-dummy carc structs are of two types: plain arcs and LACON arcs.
// Plain arcs just store the transition color number as "co".  LACON arcs
// store the lookahead constraint number plus cnfa.ncolors as "co".  LACON
// arcs can be distinguished from plain by testing for co >= cnfa.ncolors.

type Carc = struct {
	Fco          Color
	F__ccgo_pad1 [2]byte
	Fto          int32
} /* regguts.h:197:1 */

type Cnfa = struct {
	Fnstates     int32
	Fncolors     int32
	Fflags       int32
	Fpre         int32
	Fpost        int32
	Fbos         [2]Color
	Feos         [2]Color
	F__ccgo_pad1 [4]byte
	Fstflags     uintptr
	Fstates      uintptr
	Farcs        uintptr
} /* regguts.h:197:1 */

// This symbol limits the transient heap space used by the regex compiler,
// and thereby also the maximum complexity of NFAs that we'll deal with.
// Currently we only count NFA states and arcs against this; the other
// transient data is generally not large enough to notice compared to those.
// Note that we do not charge anything for the final output data structures
// (the compacted NFA and the colormap).

// subexpression tree
//
// "op" is one of:
//	'='  plain regex without interesting substructure (implemented as DFA)
//	'b'  back-reference (has no substructure either)
//	'('  capture node: captures the match of its single child
//	'.'  concatenation: matches a match for left, then a match for right
//	'|'  alternation: matches a match for left or a match for right
//	'*'  iteration: matches some number of matches of its single child
//
// Note: the right child of an alternation must be another alternation or
// NULL; hence, an N-way branch requires N alternation nodes, not N-1 as you
// might expect.  This could stand to be changed.  Actually I'd rather see
// a single alternation node with N children, but that will take revising
// the representation of struct subre.
//
// Note: when a backref is directly quantified, we stick the min/max counts
// into the backref rather than plastering an iteration node on top.  This is
// for efficiency: there is no need to search for possible division points.

type Subre = struct {
	Fop          int8
	Fflags       int8
	Fid          int16
	Fsubno       int32
	Fmin         int16
	Fmax         int16
	F__ccgo_pad1 [4]byte
	Fleft        uintptr
	Fright       uintptr
	Fbegin       uintptr
	Fend         uintptr
	Fcnfa        struct {
		Fnstates     int32
		Fncolors     int32
		Fflags       int32
		Fpre         int32
		Fpost        int32
		Fbos         [2]Color
		Feos         [2]Color
		F__ccgo_pad1 [4]byte
		Fstflags     uintptr
		Fstates      uintptr
		Farcs        uintptr
	}
	Fchain uintptr
} /* regguts.h:197:1 */

// table of function pointers for generic manipulation functions. A regex_t's
// re_fns points to one of these.

type Fns = struct{ Ffree uintptr } /* regguts.h:410:1 */

// the insides of a regex_t, hidden behind a void *

type Guts = struct {
	Fmagic       int32
	Fcflags      int32
	Finfo        int32
	F__ccgo_pad1 [4]byte
	Fnsub        Size_t
	Ftree        uintptr
	Fsearch      struct {
		Fnstates     int32
		Fncolors     int32
		Fflags       int32
		Fpre         int32
		Fpost        int32
		Fbos         [2]Color
		Feos         [2]Color
		F__ccgo_pad1 [4]byte
		Fstflags     uintptr
		Fstates      uintptr
		Farcs        uintptr
	}
	Fntree       int32
	F__ccgo_pad2 [4]byte
	Fcmap        struct {
		Fmagic       int32
		F__ccgo_pad1 [4]byte
		Fv           uintptr
		Fncds        Size_t
		Fmax         Size_t
		Ffree        Color
		F__ccgo_pad2 [6]byte
		Fcd          uintptr
		Fcdspace     [10]struct {
			Fnchrs       Uchr
			Fsub         Color
			F__ccgo_pad1 [2]byte
			Farcs        uintptr
			Fflags       int32
			F__ccgo_pad2 [4]byte
			Fblock       uintptr
		}
		Ftree [2]struct {
			F__ccgo_pad1 [0]uint64
			Fcolors      struct{ Fccolor [256]Color }
			F__ccgo_pad2 [1536]byte
		}
	}
	Fcompare     uintptr
	Flacons      uintptr
	Fnlacons     int32
	F__ccgo_pad3 [4]byte
} /* regguts.h:418:1 */

// parsing macros; most know that `v' is the struct vars pointer

// token type codes, some also used as NFA arc types

// is an arc colored, and hence on a color chain?

// static function list
var functions = Fns{
	Ffree: 0, // regfree insides
} /* regcomp.c:271:25 */

//
//  - compile - compile regular expression
//  * Note: on failure, no resources remain allocated, so regfree()
//  * need not be applied to re.
//  ^ int compile(regex_t *, const chr *, size_t, int);
//
func XTclReComp(tls *libc.TLS, re uintptr, string uintptr, len Size_t, flags int32) int32 { /* regcomp.c:282:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)
	var v uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&varsKey)), int32(unsafe.Sizeof(struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	}{})))
	var g uintptr
	var i int32
	var j Size_t
	var debug uintptr
	if flags&REG_PROGRESS != 0 {
		debug = libc.X__acrt_iob_func(tls, uint32(1))
	} else {
		debug = uintptr(0)
	}

	// Sanity checks.

	if re == uintptr(0) || string == uintptr(0) {

		return REG_INVARG
	}
	if flags&REG_QUOTE != 0 && flags&(REG_ADVANCED|REG_EXPANDED|REG_NEWLINE) != 0 {

		return REG_INVARG
	}
	if !(flags&REG_EXTENDED != 0) && flags&REG_ADVF != 0 {

		return REG_INVARG
	}

	// Initial setup (after which freev() is callable).

	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fre = re
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow = string
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow + uintptr(len)*2
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fsavenow = libc.AssignPtrUintptr(v+32, uintptr(0))
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr = 0
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags = flags
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnsubexp = 0
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fsubs = v + 88 /* &.sub10 */
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnsubs = uint64(10)
	for j = uint64(0); j < (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnsubs; j++ {
		*(*uintptr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fsubs + uintptr(j)*8)) = uintptr(0)
	}
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcm = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnlcolor = int16(-1)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fwordchrs = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftree = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftreechain = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftreefree = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv2 = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Flacons = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnlacons = 0
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fspaceused = uint64(0)
	(*Regex_t)(unsafe.Pointer(re)).Fre_magic = REMAGIC
	(*Regex_t)(unsafe.Pointer(re)).Fre_info = 0 // bits get set during parse
	(*Regex_t)(unsafe.Pointer(re)).Fre_csize = int32(unsafe.Sizeof(Chr(0)))
	(*Regex_t)(unsafe.Pointer(re)).Fre_guts = uintptr(0)
	(*Regex_t)(unsafe.Pointer(re)).Fre_fns = uintptr(unsafe.Pointer(&functions))

	// More complex setup, malloced things.

	(*Regex_t)(unsafe.Pointer(re)).Fre_guts = XTclpAlloc(tls, uint32(unsafe.Sizeof(Guts{})))
	if (*Regex_t)(unsafe.Pointer(re)).Fre_guts == uintptr(0) {
		return freev(tls, v, REG_ESPACE)
	}
	g = (*Regex_t)(unsafe.Pointer(re)).Fre_guts
	(*Guts)(unsafe.Pointer(g)).Ftree = uintptr(0)
	initcm(tls, v, g+96)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcm = g + 96
	(*Guts)(unsafe.Pointer(g)).Flacons = uintptr(0)
	(*Guts)(unsafe.Pointer(g)).Fnlacons = 0
	(*Guts)(unsafe.Pointer(g)).Fsearch.Fnstates = 0
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa = newnfa(tls, v, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcm, uintptr(0))
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return freev(tls, v, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr)
		}
	}

	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv = newcvec(tls, 100, 20)
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv == uintptr(0) {
		return freev(tls, v, REG_ESPACE)
	}

	// Parsing.

	lexstart(tls, v) // also handles prefixes
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_NLSTOP != 0 || (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_NLANCH != 0 {
		// Assign newline a unique color.

		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnlcolor = subcolor(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcm, int32(newline(tls)))
		okcolors(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcm)
	}
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return freev(tls, v, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr)
		}
	}

	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftree = parse(tls, v, 'e', 'p', (*Nfa)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)).Finit, (*Nfa)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)).Ffinal)
	/* even if error; ISERR() => SEE(EOS) */
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return freev(tls, v, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr)
		}
	}

	// Finish setup of nfa and its subre tree.

	specialcolors(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return freev(tls, v, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr)
		}
	}

	if debug != uintptr(0) {
		libc.Xfprintf(tls, debug, ts+650, 0)
		dumpnfa(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, debug)
		dumpst(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ftree, debug, 1)
	}
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fntree = numst(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftree, 1)
	markst(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftree)
	cleanst(tls, v)
	if debug != uintptr(0) {
		libc.Xfprintf(tls, debug, ts+679, 0)
		dumpst(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ftree, debug, 1)
	}

	// Build compacted NFAs for tree and lacons.

	*(*int32)(unsafe.Pointer(re + 16)) |= nfatree(tls, v, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftree, debug)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return freev(tls, v, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr)
		}
	}

	for i = 1; i < (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnlacons; i++ {
		if debug != uintptr(0) {
			libc.Xfprintf(tls, debug, ts+715, libc.VaList(bp, i))
		}
		nfanode(tls, v, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flacons+uintptr(i)*112, debug)
	}
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return freev(tls, v, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr)
		}
	}

	if int32((*Subre)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftree)).Fflags)&SHORTER != 0 {
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_USHORTEST
	}

	// Build compacted NFAs for tree, lacons, fast search.

	if debug != uintptr(0) {
		libc.Xfprintf(tls, debug, ts+745, 0)
	}

	// Can sacrifice main NFA now, so use it as work area.

	optimize(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, debug)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return freev(tls, v, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr)
		}
	}

	makesearch(tls, v, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return freev(tls, v, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr)
		}
	}

	compact(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, g+32)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return freev(tls, v, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr)
		}
	}

	// Looks okay, package it up.

	(*Regex_t)(unsafe.Pointer(re)).Fre_nsub = Size_t((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnsubexp)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fre = uintptr(0) // freev no longer frees re
	(*Guts)(unsafe.Pointer(g)).Fmagic = GUTSMAGIC
	(*Guts)(unsafe.Pointer(g)).Fcflags = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags
	(*Guts)(unsafe.Pointer(g)).Finfo = (*Regex_t)(unsafe.Pointer(re)).Fre_info
	(*Guts)(unsafe.Pointer(g)).Fnsub = (*Regex_t)(unsafe.Pointer(re)).Fre_nsub
	(*Guts)(unsafe.Pointer(g)).Ftree = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftree
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftree = uintptr(0)
	(*Guts)(unsafe.Pointer(g)).Fntree = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fntree
	(*Guts)(unsafe.Pointer(g)).Fcompare = func() uintptr {
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_ICASE != 0 {
			return *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, Size_t) int32
			}{casecmp}))
		}
		return *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, Size_t) int32
		}{cmp}))
	}()
	(*Guts)(unsafe.Pointer(g)).Flacons = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Flacons
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Flacons = uintptr(0)
	(*Guts)(unsafe.Pointer(g)).Fnlacons = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnlacons

	if flags&REG_DUMP != 0 {
		dump(tls, re, libc.X__acrt_iob_func(tls, uint32(1)))
	}

	return freev(tls, v, 0)
}

var varsKey Tcl_ThreadDataKey /* regcomp.c:288:5: */

//
//  - moresubs - enlarge subRE vector
//  ^ static void moresubs(struct vars *, int);
//
func moresubs(tls *libc.TLS, v uintptr, wanted int32) { /* regcomp.c:474:1: */
	var p uintptr
	var n Size_t

	n = Size_t(wanted)*uint64(3)/uint64(2) + uint64(1)
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fsubs == v+88 {
		p = XTclpAlloc(tls, uint32(n*Size_t(unsafe.Sizeof(uintptr(0)))))
		if p != uintptr(0) {
			libc.Xmemcpy(tls, p, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fsubs, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnsubs*Size_t(unsafe.Sizeof(uintptr(0))))
		}
	} else {
		p = XTclpRealloc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fsubs, uint32(n*Size_t(unsafe.Sizeof(uintptr(0)))))
	}
	if p == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ESPACE
		}()
		return
	}

	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fsubs = p
	p = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fsubs + uintptr((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnsubs)*8
__1:
	if !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnsubs < n) {
		goto __3
	}
	{
		*(*uintptr)(unsafe.Pointer(p)) = uintptr(0)

	}
	goto __2
__2:
	p += 8
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnsubs++
	goto __1
	goto __3
__3:
}

//
//  - freev - free vars struct's substructures where necessary
//  * Optionally does error-number setting, and always returns error code (if
//  * any), to make error-handling code terser.
//  ^ static int freev(struct vars *, int);
//
func freev(tls *libc.TLS, v uintptr, err int32) int32 { /* regcomp.c:511:1: */
	var ret int32

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fre != uintptr(0) {
		rfree(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre)
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fsubs != v+88 {
		XTclpFree(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fsubs)
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa != uintptr(0) {
		freenfa(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftree != uintptr(0) {
		freesubre(tls, v, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ftree)
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftreechain != uintptr(0) {
		cleanst(tls, v)
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv != uintptr(0) {
		freecvec(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcv)
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv2 != uintptr(0) {
		freecvec(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcv2)
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Flacons != uintptr(0) {
		freelacons(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flacons, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnlacons)
	}
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype = 'e'
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr = func() int32 {
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr
		}
		return err
	}() // nop if err==0

	ret = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr

	return ret
}

//
//  - makesearch - turn an NFA into a search NFA (implicit prepend of .*?)
//  * NFA must have been optimize()d already.
//  ^ static void makesearch(struct vars *, struct nfa *);
//
func makesearch(tls *libc.TLS, v uintptr, nfa uintptr) { /* regcomp.c:554:1: */
	var a uintptr
	var b uintptr
	var pre uintptr = (*Nfa)(unsafe.Pointer(nfa)).Fpre
	var s uintptr
	var s2 uintptr
	var slist uintptr

	// No loops are needed if it's anchored.

	for a = (*State)(unsafe.Pointer(pre)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {

		if int32((*Arc)(unsafe.Pointer(a)).Fco) != int32(*(*Color)(unsafe.Pointer(nfa + 72))) && int32((*Arc)(unsafe.Pointer(a)).Fco) != int32(*(*Color)(unsafe.Pointer(nfa + 72 + 1*2))) {
			break
		}
	}
	if a != uintptr(0) {
		// Add implicit .* in front.

		rainbow(tls, nfa, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcm, 'p', -1, pre, pre)

		// And ^* and \A* too -- not always necessary, but harmless.

		newarc(tls, nfa, 'p', int32(*(*Color)(unsafe.Pointer(nfa + 72))), pre, pre)
		newarc(tls, nfa, 'p', int32(*(*Color)(unsafe.Pointer(nfa + 72 + 1*2))), pre, pre)
	}

	// Now here's the subtle part. Because many REs have no lookback
	// constraints, often knowing when you were in the pre state tells you
	// little; it's the next state(s) that are informative. But some of them
	// may have other inarcs, i.e. it may be possible to make actual progress
	// and then return to one of them. We must de-optimize such cases,
	// splitting each such state into progress and no-progress states.

	// First, make a list of the states.

	slist = uintptr(0)
	for a = (*State)(unsafe.Pointer(pre)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		s = (*Arc)(unsafe.Pointer(a)).Fto
		for b = (*State)(unsafe.Pointer(s)).Fins; b != uintptr(0); b = (*Arc)(unsafe.Pointer(b)).Finchain {
			if (*Arc)(unsafe.Pointer(b)).Ffrom != pre {
				break
			}
		}

		// We want to mark states as being in the list already by having non
		// NULL tmp fields, but we can't just store the old slist value in tmp
		// because that doesn't work for the first such state.  Instead, the
		// first list entry gets its own address in tmp.
		if b != uintptr(0) && (*State)(unsafe.Pointer(s)).Ftmp == uintptr(0) {
			(*State)(unsafe.Pointer(s)).Ftmp = func() uintptr {
				if slist != uintptr(0) {
					return slist
				}
				return s
			}()
			slist = s
		}
	}

	// Do the splits.

	for s = slist; s != uintptr(0); s = s2 {
		s2 = newstate(tls, nfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		copyouts(tls, nfa, s, s2)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		for a = (*State)(unsafe.Pointer(s)).Fins; a != uintptr(0); a = b {
			b = (*Arc)(unsafe.Pointer(a)).Finchain

			if (*Arc)(unsafe.Pointer(a)).Ffrom != pre {
				cparc(tls, nfa, a, (*Arc)(unsafe.Pointer(a)).Ffrom, s2)
				freearc(tls, nfa, a)
			}
		}
		if (*State)(unsafe.Pointer(s)).Ftmp != s {
			s2 = (*State)(unsafe.Pointer(s)).Ftmp
		} else {
			s2 = uintptr(0)
		}
		(*State)(unsafe.Pointer(s)).Ftmp = uintptr(0) // clean up while we're at it
	}
}

//
//  - parse - parse an RE
//  * This is actually just the top level, which parses a bunch of branches tied
//  * together with '|'. They appear in the tree as the left children of a chain
//  * of '|' subres.
//  ^ static struct subre *parse(struct vars *, int, int, struct state *,
//  ^ 	struct state *);
//
func parse(tls *libc.TLS, v uintptr, stopper int32, type1 int32, init1 uintptr, final uintptr) uintptr { /* regcomp.c:651:21: */
	var left uintptr
	var right uintptr     // scaffolding for branch
	var branches uintptr  // top level
	var branch uintptr    // current branch
	var t uintptr         // temporary
	var firstbranch int32 // is this the first branch?

	branches = subre(tls, v, '|', LONGER, init1, final)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return uintptr(0)
		}
	}

	branch = branches
	firstbranch = 1
	for ok := true; ok; ok = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == '|' && next(tls, v) != 0 { // a branch
		if !(firstbranch != 0) {
			// Need a place to hang the branch.

			(*Subre)(unsafe.Pointer(branch)).Fright = subre(tls, v, '|', LONGER, init1, final)
			{
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return uintptr(0)
				}
			}

			branch = (*Subre)(unsafe.Pointer(branch)).Fright
		}
		firstbranch = 0
		left = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		right = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return uintptr(0)
			}
		}

		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, init1, left)
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, right, final)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return uintptr(0)
			}
		}

		(*Subre)(unsafe.Pointer(branch)).Fleft = parsebranch(tls, v, stopper, type1, left, right, 0)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return uintptr(0)
			}
		}

		*(*int8)(unsafe.Pointer(branch + 1)) |= int8((int32((*Subre)(unsafe.Pointer(branch)).Fflags)|int32((*Subre)(unsafe.Pointer((*Subre)(unsafe.Pointer(branch)).Fleft)).Fflags))&libc.CplInt32(NOPROP) | (int32((*Subre)(unsafe.Pointer(branch)).Fflags)|int32((*Subre)(unsafe.Pointer((*Subre)(unsafe.Pointer(branch)).Fleft)).Fflags))<<2&((int32((*Subre)(unsafe.Pointer(branch)).Fflags)|int32((*Subre)(unsafe.Pointer((*Subre)(unsafe.Pointer(branch)).Fleft)).Fflags))<<1)&MIXED)
		if int32((*Subre)(unsafe.Pointer(branch)).Fflags) & ^int32((*Subre)(unsafe.Pointer(branches)).Fflags) != 0 { // new flags
			for t = branches; t != branch; t = (*Subre)(unsafe.Pointer(t)).Fright {
				*(*int8)(unsafe.Pointer(t + 1)) |= int8(int32((*Subre)(unsafe.Pointer(branch)).Fflags))
			}
		}
	}

	if !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == stopper) {

		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_EPAREN
		}()
	}

	// Optimize out simple cases.

	if branch == branches { // only one branch

		t = (*Subre)(unsafe.Pointer(branch)).Fleft
		(*Subre)(unsafe.Pointer(branch)).Fleft = uintptr(0)
		freesubre(tls, v, branches)
		branches = t
	} else if !(int32((*Subre)(unsafe.Pointer(branches)).Fflags)&(MIXED|CAP|BACKR) != 0) { // no interesting innards
		freesubre(tls, v, (*Subre)(unsafe.Pointer(branches)).Fleft)
		(*Subre)(unsafe.Pointer(branches)).Fleft = uintptr(0)
		freesubre(tls, v, (*Subre)(unsafe.Pointer(branches)).Fright)
		(*Subre)(unsafe.Pointer(branches)).Fright = uintptr(0)
		(*Subre)(unsafe.Pointer(branches)).Fop = int8('=')
	}

	return branches
}

//
//  - parsebranch - parse one branch of an RE
//  * This mostly manages concatenation, working closely with parseqatom().
//  * Concatenated things are bundled up as much as possible, with separate
//  * ',' nodes introduced only when necessary due to substructure.
//  ^ static struct subre *parsebranch(struct vars *, int, int, struct state *,
//  ^ 	struct state *, int);
//
func parsebranch(tls *libc.TLS, v uintptr, stopper int32, type1 int32, left uintptr, right uintptr, partial int32) uintptr { /* regcomp.c:733:21: */
	var lp uintptr        // left end of current construct
	var seencontent int32 // is there anything in this branch yet?
	var t uintptr

	lp = left
	seencontent = 0
	t = subre(tls, v, '=', 0, left, right) /* op '=' is tentative */
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return uintptr(0)
		}
	}

	for !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == '|') && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == stopper) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == 'e') {
		if seencontent != 0 { // implicit concat operator
			lp = newstate(tls, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnfa)
			{
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return uintptr(0)
				}
			}

			moveins(tls, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnfa, right, lp)
		}
		seencontent = 1

		// NB, recursion in parseqatom() may swallow rest of branch
		parseqatom(tls, v, stopper, type1, lp, right, t)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return uintptr(0)
			}
		}

	}

	if !(seencontent != 0) { // empty branch
		if !(partial != 0) {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNSPEC
		}

		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, left, right)
	}

	return t
}

//
//  - parseqatom - parse one quantified atom or constraint of an RE
//  * The bookkeeping near the end cooperates very closely with parsebranch(); in
//  * particular, it contains a recursion that can involve parsing the rest of
//  * the branch, making this function's name somewhat inaccurate.
//  ^ static void parseqatom(struct vars *, int, int, struct state *,
//  ^ 	struct state *, struct subre *);
//
func parseqatom(tls *libc.TLS, v uintptr, stopper int32, type1 int32, lp uintptr, rp uintptr, top uintptr) { /* regcomp.c:783:1: */
	var s uintptr // temporaries for new states
	var s2 uintptr
	var m int32
	var n int32
	var atom uintptr // atom's subtree
	var t uintptr
	var cap int32   // capturing parens?
	var pos int32   // positive lookahead?
	var subno int32 // capturing-parens or backref number
	var atomtype int32
	var qprefer int32 // quantifier short/long preference
	var f int32
	var atomp uintptr // where the pointer to atom is

	// Initial bookkeeping.

	atom = uintptr(0)
	// must string new code
	// between lp and rp
	subno = 0 // just to shut lint up

	// An atom or constraint...

	atomtype = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype
	switch atomtype {
	// first, constraints, which end by returning
	case '^':
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, '^', 1, lp, rp)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_NLANCH != 0 {
			newarc(tls, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnfa, 'r', int32((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnlcolor), lp, rp)
		}
		next(tls, v)
		return
	case '$':
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, '$', 1, lp, rp)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_NLANCH != 0 {
			newarc(tls, (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnfa, 'a', int32((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnlcolor), lp, rp)
		}
		next(tls, v)
		return
	case 'A':
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, '^', 1, lp, rp) // BOL
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, '^', 0, lp, rp) // or BOS
		next(tls, v)
		return
	case 'Z':
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, '$', 1, lp, rp) // EOL
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, '$', 0, lp, rp) // or EOS
		next(tls, v)
		return
	case '<':
		wordchrs(tls, v) // does NEXT()
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		nonword(tls, v, 'r', lp, s)
		word(tls, v, 'a', s, rp)
		return
	case '>':
		wordchrs(tls, v) // does NEXT()
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		word(tls, v, 'r', lp, s)
		nonword(tls, v, 'a', s, rp)
		return
	case 'w':
		wordchrs(tls, v) // does NEXT()
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		nonword(tls, v, 'r', lp, s)
		word(tls, v, 'a', s, rp)
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		word(tls, v, 'r', lp, s)
		nonword(tls, v, 'a', s, rp)
		return
	case 'W':
		wordchrs(tls, v) // does NEXT()
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		word(tls, v, 'r', lp, s)
		word(tls, v, 'a', s, rp)
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		nonword(tls, v, 'r', lp, s)
		nonword(tls, v, 'a', s, rp)
		return
	case 'L': // lookahead constraint
		pos = int32((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue)
		next(tls, v)
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		s2 = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		t = parse(tls, v, ')', 'L', s, s2)
		freesubre(tls, v, t) // internal structure irrelevant

		next(tls, v)
		n = newlacon(tls, v, s, s2, pos)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'L', n, lp, rp)
		return

		// Then errors, to get them out of the way.

	case '*':
		fallthrough
	case '+':
		fallthrough
	case '?':
		fallthrough
	case '{':
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_BADRPT
		}()
		return
	default:
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ASSERT
		}()
		return

		// Then plain characters, and minor variants on that theme.

	case ')': // unbalanced paren
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_ADVANCED != REG_EXTENDED {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_EPAREN
			}()
			return
		}

		// Legal in EREs due to specification botch.

		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UPBOTCH
		fallthrough
		// FALLTHRU
	case 'p':
		onechr(tls, v, int32((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue), lp, rp)
		okcolors(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcm)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		next(tls, v)
		break
	case '[':
		if int32((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue) == 1 {
			bracket(tls, v, lp, rp)
		} else {
			cbracket(tls, v, lp, rp)
		}

		next(tls, v)
		break
	case '.':
		rainbow(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcm, 'p',
			func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fcflags&REG_NLSTOP != 0 {
					return int32((*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnlcolor)
				}
				return -1
			}(), lp, rp)
		next(tls, v)
		break

		// And finally the ugly stuff.

	case '(': // value flags as capturing or non
		if type1 == 'L' {
			cap = 0
		} else {
			cap = int32((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue)
		}
		if cap != 0 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnsubexp++
			subno = (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnsubexp
			if Size_t(subno) >= (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnsubs {
				moresubs(tls, v, subno)
			}

		} else {
			atomtype = 'p' // something that's not '('
		}
		next(tls, v)

		// Need new endpoints because tree will contain pointers.

		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		s2 = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, s)
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, s2, rp)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		atom = parse(tls, v, ')', 'p', s, s2)

		next(tls, v)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		if cap != 0 {
			*(*uintptr)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fsubs + uintptr(subno)*8)) = atom
			t = subre(tls, v, '(', int32((*Subre)(unsafe.Pointer(atom)).Fflags)|CAP, lp, rp)
			{
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return
				}
			}

			(*Subre)(unsafe.Pointer(t)).Fsubno = subno
			(*Subre)(unsafe.Pointer(t)).Fleft = atom
			atom = t
		}

		// Postpone everything else pending possible {0}.

		break
	case 'b': // the Feature From The Black Lagoon
		for ok := true; ok; ok = 0 != 0 {
			if !(type1 != 'L') {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_ESUBREG
				}()
			}
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if !(Size_t((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue) < (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnsubs) {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_ESUBREG
				}()
			}
		}
		for ok2 := true; ok2; ok2 = 0 != 0 {
			if !(*(*uintptr)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fsubs + uintptr((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue)*8)) != uintptr(0)) {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_ESUBREG
				}()
			}
		}
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		atom = subre(tls, v, 'b', BACKR, lp, rp)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		subno = int32((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue)
		(*Subre)(unsafe.Pointer(atom)).Fsubno = subno
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, rp) // temporarily, so there's something
		next(tls, v)
		break
	}

	// ...and an atom may be followed by a quantifier.

	switch (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype {
	case '*':
		m = 0
		n = X_POSIX2_RE_DUP_MAX + 1
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue != 0 {
			qprefer = LONGER
		} else {
			qprefer = SHORTER
		}
		next(tls, v)
		break
	case '+':
		m = 1
		n = X_POSIX2_RE_DUP_MAX + 1
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue != 0 {
			qprefer = LONGER
		} else {
			qprefer = SHORTER
		}
		next(tls, v)
		break
	case '?':
		m = 0
		n = 1
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue != 0 {
			qprefer = LONGER
		} else {
			qprefer = SHORTER
		}
		next(tls, v)
		break
	case '{':
		next(tls, v)
		m = scannum(tls, v)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype == ',' && next(tls, v) != 0 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype == 'd' {
				n = scannum(tls, v)
			} else {
				n = X_POSIX2_RE_DUP_MAX + 1
			}
			if m > n {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_BADBR
				}()
				return
			}

			// {m,n} exercises preference, even if it's {m,m}

			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue != 0 {
				qprefer = LONGER
			} else {
				qprefer = SHORTER
			}
		} else {
			n = m
			// {m} passes operand's preference through.

			qprefer = 0
		}
		if !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype == '}') { // catches errors too
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_BADBR
			}()
			return
		}
		next(tls, v)
		break
	default: // no quantifier
		m = libc.AssignInt32(&n, 1)
		qprefer = 0
		break
	}

	// Annoying special case: {0} or {0,0} cancels everything.

	if m == 0 && n == 0 {
		if atom != uintptr(0) {
			freesubre(tls, v, atom)
		}
		if atomtype == '(' {
			*(*uintptr)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fsubs + uintptr(subno)*8)) = uintptr(0)
		}
		delsub(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, lp, rp)
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, rp)
		return
	}

	// If not a messy case, avoid hard part.

	f = int32((*Subre)(unsafe.Pointer(top)).Fflags) | qprefer | func() int32 {
		if atom != uintptr(0) {
			return int32((*Subre)(unsafe.Pointer(atom)).Fflags)
		}
		return 0
	}()
	if atomtype != '(' && atomtype != 'b' && !((f&libc.CplInt32(NOPROP)|f<<2&(f<<1)&MIXED)&(MIXED|CAP|BACKR) != 0) {
		if !(m == 1 && n == 1) {
			repeat(tls, v, lp, rp, m, n)
		}
		if atom != uintptr(0) {
			freesubre(tls, v, atom)
		}
		(*Subre)(unsafe.Pointer(top)).Fflags = int8(f)
		return
	}

	// hard part: something messy
	// That is, capturing parens, back reference, short/long clash, or an atom
	// with substructure containing one of those.

	// Now we'll need a subre for the contents even if they're boring.

	if atom == uintptr(0) {
		atom = subre(tls, v, '=', 0, lp, rp)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

	}

	// Prepare a general-purpose state skeleton.
	//
	// In the no-backrefs case, we want this:
	//
	// [lp] ---> [s] ---prefix---> [begin] ---atom---> [end] ---rest---> [rp]
	//
	// where prefix is some repetitions of atom.  In the general case we need
	//
	// [lp] ---> [s] ---iterator---> [s2] ---rest---> [rp]
	//
	// where the iterator wraps around [begin] ---atom---> [end]
	//
	// We make the s state here for both cases; s2 is made below if needed

	s = newstate(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa) // first, new endpoints for the atom
	s2 = newstate(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	moveouts(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, lp, s)
	moveins(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, rp, s2)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	(*Subre)(unsafe.Pointer(atom)).Fbegin = s
	(*Subre)(unsafe.Pointer(atom)).Fend = s2
	s = newstate(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa) /* set up starting state */
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	newarc(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, s)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	// Break remaining subRE into x{...} and what follows.

	t = subre(tls, v, '.', (qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))&libc.CplInt32(NOPROP)|(qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))<<2&((qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))<<1)&MIXED|func() int32 {
		if qprefer&NOPROP != 0 {
			return qprefer & NOPROP
		}
		return int32((*Subre)(unsafe.Pointer(atom)).Fflags) & NOPROP
	}(), lp, rp)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	(*Subre)(unsafe.Pointer(t)).Fleft = atom
	atomp = t + 16

	// Here we should recurse... but we must postpone that to the end.

	// Split top into prefix and remaining.

	(*Subre)(unsafe.Pointer(top)).Fleft = subre(tls, v, '=', int32((*Subre)(unsafe.Pointer(top)).Fflags), (*Subre)(unsafe.Pointer(top)).Fbegin, lp)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	(*Subre)(unsafe.Pointer(top)).Fop = int8('.')
	(*Subre)(unsafe.Pointer(top)).Fright = t

	// If it's a backref, now is the time to replicate the subNFA.

	if atomtype == 'b' {
		// just the EMPTY
		delsub(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, (*Subre)(unsafe.Pointer(atom)).Fbegin, (*Subre)(unsafe.Pointer(atom)).Fend)

		// And here's why the recursion got postponed: it must wait until the
		// skeleton is filled in, because it may hit a backref that wants to
		// copy the filled-in skeleton.

		dupnfa(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, (*Subre)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fsubs + uintptr(subno)*8)))).Fbegin, (*Subre)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fsubs + uintptr(subno)*8)))).Fend,
			(*Subre)(unsafe.Pointer(atom)).Fbegin, (*Subre)(unsafe.Pointer(atom)).Fend)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

	}

	// It's quantifier time.  If the atom is just a backref, we'll let it deal
	// with quantifiers internally.

	if atomtype == 'b' {
		// Special case: backrefs have internal quantifiers.

		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, s, (*Subre)(unsafe.Pointer(atom)).Fbegin) // empty prefix

		// Just stuff everything into atom.

		repeat(tls, v, (*Subre)(unsafe.Pointer(atom)).Fbegin, (*Subre)(unsafe.Pointer(atom)).Fend, m, n)
		(*Subre)(unsafe.Pointer(atom)).Fmin = int16(m)
		(*Subre)(unsafe.Pointer(atom)).Fmax = int16(n)
		*(*int8)(unsafe.Pointer(atom + 1)) |= int8((qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))&libc.CplInt32(NOPROP) | (qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))<<2&((qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))<<1)&MIXED | func() int32 {
			if qprefer&NOPROP != 0 {
				return qprefer & NOPROP
			}
			return int32((*Subre)(unsafe.Pointer(atom)).Fflags) & NOPROP
		}())
		// rest of branch can be strung starting from atom->end
		s2 = (*Subre)(unsafe.Pointer(atom)).Fend
	} else if m == 1 && n == 1 {
		// No/vacuous quantifier: done.

		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, s, (*Subre)(unsafe.Pointer(atom)).Fbegin) // empty prefix
		// rest of branch can be strung starting from atom->end
		s2 = (*Subre)(unsafe.Pointer(atom)).Fend
	} else if m > 0 && !(int32((*Subre)(unsafe.Pointer(atom)).Fflags)&BACKR != 0) {
		// If there's no backrefs involved, we can turn x{m,n} into
		// x{m-1,n-1}x, with capturing parens in only the second x.  This
		// is valid because we only care about capturing matches from the
		// final iteration of the quantifier.  It's a win because we can
		// implement the backref-free left side as a plain DFA node, since
		// we don't really care where its submatches are.

		dupnfa(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, (*Subre)(unsafe.Pointer(atom)).Fbegin, (*Subre)(unsafe.Pointer(atom)).Fend, s, (*Subre)(unsafe.Pointer(atom)).Fbegin)

		repeat(tls, v, s, (*Subre)(unsafe.Pointer(atom)).Fbegin, m-1, func() int32 {
			if n == X_POSIX2_RE_DUP_MAX+1 {
				return n
			}
			return n - 1
		}())
		f = (qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))&libc.CplInt32(NOPROP) | (qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))<<2&((qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))<<1)&MIXED | func() int32 {
			if qprefer&NOPROP != 0 {
				return qprefer & NOPROP
			}
			return int32((*Subre)(unsafe.Pointer(atom)).Fflags) & NOPROP
		}()
		t = subre(tls, v, '.', f, s, (*Subre)(unsafe.Pointer(atom)).Fend) /* prefix and atom */
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		(*Subre)(unsafe.Pointer(t)).Fleft = subre(tls, v, '=', f&NOPROP, s, (*Subre)(unsafe.Pointer(atom)).Fbegin)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		(*Subre)(unsafe.Pointer(t)).Fright = atom
		*(*uintptr)(unsafe.Pointer(atomp)) = t
		// rest of branch can be strung starting from atom->end
		s2 = (*Subre)(unsafe.Pointer(atom)).Fend
	} else {
		// general case: need an iteration node
		s2 = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		moveouts(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, (*Subre)(unsafe.Pointer(atom)).Fend, s2)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		dupnfa(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, (*Subre)(unsafe.Pointer(atom)).Fbegin, (*Subre)(unsafe.Pointer(atom)).Fend, s, s2)
		repeat(tls, v, s, s2, m, n)
		f = (qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))&libc.CplInt32(NOPROP) | (qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))<<2&((qprefer|int32((*Subre)(unsafe.Pointer(atom)).Fflags))<<1)&MIXED | func() int32 {
			if qprefer&NOPROP != 0 {
				return qprefer & NOPROP
			}
			return int32((*Subre)(unsafe.Pointer(atom)).Fflags) & NOPROP
		}()
		t = subre(tls, v, '*', f, s, s2)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		(*Subre)(unsafe.Pointer(t)).Fmin = int16(m)
		(*Subre)(unsafe.Pointer(t)).Fmax = int16(n)
		(*Subre)(unsafe.Pointer(t)).Fleft = atom
		*(*uintptr)(unsafe.Pointer(atomp)) = t
		// rest of branch is to be strung from iteration's end state
	}

	// And finally, look after that postponed recursion.

	t = (*Subre)(unsafe.Pointer(top)).Fright
	if !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == '|' || (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == stopper || (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == 'e') {
		(*Subre)(unsafe.Pointer(t)).Fright = parsebranch(tls, v, stopper, type1, s2, rp, 1)
	} else {
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, s2, rp)
		(*Subre)(unsafe.Pointer(t)).Fright = subre(tls, v, '=', 0, s2, rp)
	}
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	*(*int8)(unsafe.Pointer(t + 1)) |= int8((int32((*Subre)(unsafe.Pointer(t)).Fflags)|int32((*Subre)(unsafe.Pointer((*Subre)(unsafe.Pointer(t)).Fright)).Fflags))&libc.CplInt32(NOPROP) | (int32((*Subre)(unsafe.Pointer(t)).Fflags)|int32((*Subre)(unsafe.Pointer((*Subre)(unsafe.Pointer(t)).Fright)).Fflags))<<2&((int32((*Subre)(unsafe.Pointer(t)).Fflags)|int32((*Subre)(unsafe.Pointer((*Subre)(unsafe.Pointer(t)).Fright)).Fflags))<<1)&MIXED | func() int32 {
		if int32((*Subre)(unsafe.Pointer(t)).Fflags)&NOPROP != 0 {
			return int32((*Subre)(unsafe.Pointer(t)).Fflags) & NOPROP
		}
		return int32((*Subre)(unsafe.Pointer((*Subre)(unsafe.Pointer(t)).Fright)).Fflags) & NOPROP
	}())
	*(*int8)(unsafe.Pointer(top + 1)) |= int8((int32((*Subre)(unsafe.Pointer(top)).Fflags)|int32((*Subre)(unsafe.Pointer(t)).Fflags))&libc.CplInt32(NOPROP) | (int32((*Subre)(unsafe.Pointer(top)).Fflags)|int32((*Subre)(unsafe.Pointer(t)).Fflags))<<2&((int32((*Subre)(unsafe.Pointer(top)).Fflags)|int32((*Subre)(unsafe.Pointer(t)).Fflags))<<1)&MIXED | func() int32 {
		if int32((*Subre)(unsafe.Pointer(top)).Fflags)&NOPROP != 0 {
			return int32((*Subre)(unsafe.Pointer(top)).Fflags) & NOPROP
		}
		return int32((*Subre)(unsafe.Pointer(t)).Fflags) & NOPROP
	}())
}

//
//  - nonword - generate arcs for non-word-character ahead or behind
//  ^ static void nonword(struct vars *, int, struct state *, struct state *);
//
func nonword(tls *libc.TLS, v uintptr, dir int32, lp uintptr, rp uintptr) { /* regcomp.c:1282:1: */
	var anchor int32
	if dir == 'a' {
		anchor = '$'
	} else {
		anchor = '^'
	}

	newarc(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, anchor, 1, lp, rp)
	newarc(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, anchor, 0, lp, rp)
	colorcomplement(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcm, dir, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fwordchrs, lp, rp)
	// (no need for special attention to \n)
}

//
//  - word - generate arcs for word character ahead or behind
//  ^ static void word(struct vars *, int, struct state *, struct state *);
//
func word(tls *libc.TLS, v uintptr, dir int32, lp uintptr, rp uintptr) { /* regcomp.c:1302:1: */

	cloneouts(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fwordchrs, lp, rp, dir)
	// (no need for special attention to \n)
}

//
//  - scannum - scan a number
//  ^ static int scannum(struct vars *);
//
func scannum(tls *libc.TLS, v uintptr) int32 { /* regcomp.c:1318:1: */
	var n int32 = 0

	for (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == 'd' && n < X_POSIX2_RE_DUP_MAX {
		n = n*10 + int32((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue)
		next(tls, v)
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == 'd' || n > X_POSIX2_RE_DUP_MAX {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_BADBR
		}()
		return 0
	}
	return n
}

//
//  - repeat - replicate subNFA for quantifiers
//  * The sub-NFA strung from lp to rp is modified to represent m to n
//  * repetitions of its initial contents.
//  * The duplication sequences used here are chosen carefully so that any
//  * pointers starting out pointing into the subexpression end up pointing into
//  * the last occurrence. (Note that it may not be strung between the same left
//  * and right end states, however!) This used to be important for the subRE
//  * tree, although the important bits are now handled by the in-line code in
//  * parse(), and when this is called, it doesn't matter any more.
//  ^ static void repeat(struct vars *, struct state *, struct state *, int, int);
//
func repeat(tls *libc.TLS, v uintptr, lp uintptr, rp uintptr, m int32, n int32) { /* regcomp.c:1347:1: */
	var rm int32 = func() int32 {
		if m == X_POSIX2_RE_DUP_MAX+1 {
			return INF
		}
		return func() int32 {
			if m > 1 {
				return SOME
			}
			return m
		}()
	}()
	var rn int32 = func() int32 {
		if n == X_POSIX2_RE_DUP_MAX+1 {
			return INF
		}
		return func() int32 {
			if n > 1 {
				return SOME
			}
			return n
		}()
	}()
	var s uintptr
	var s2 uintptr

	switch rm*4 + rn {
	case 0*4 + 0:
		delsub(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, lp, rp)
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, rp)
		break
	case 0*4 + 1:
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, rp)
		break
	case 0*4 + SOME:
		repeat(tls, v, lp, rp, 1, n)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, rp)
		break
	case 0*4 + INF:
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		moveouts(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, lp, s)
		moveins(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, rp, s)
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, s)
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, s, rp)
		break
	case 1*4 + 1:
		break
	case 1*4 + SOME:
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		moveouts(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, lp, s)
		dupnfa(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, s, rp, lp, s)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		repeat(tls, v, lp, s, 1, n-1)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, s)
		break
	case 1*4 + INF:
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		s2 = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		moveouts(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, lp, s)
		moveins(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, rp, s2)
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, lp, s)
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, s2, rp)
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'n', 0, s2, s)
		break
	case SOME*4 + SOME:
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		moveouts(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, lp, s)
		dupnfa(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, s, rp, lp, s)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		repeat(tls, v, lp, s, m-1, n-1)
		break
	case SOME*4 + INF:
		s = newstate(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		moveouts(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, lp, s)
		dupnfa(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, s, rp, lp, s)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		repeat(tls, v, lp, s, m-1, n)
		break
	default:
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ASSERT
		}()
		break
	}
}

//
//  - bracket - handle non-complemented bracket expression
//  * Also called from cbracket for complemented bracket expressions.
//  ^ static void bracket(struct vars *, struct state *, struct state *);
//
func bracket(tls *libc.TLS, v uintptr, lp uintptr, rp uintptr) { /* regcomp.c:1433:1: */

	next(tls, v)
	for !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == ']') && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == 'e') {
		brackpart(tls, v, lp, rp)
	}

	okcolors(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcm)
}

//
//  - cbracket - handle complemented bracket expression
//  * We do it by calling bracket() with dummy endpoints, and then complementing
//  * the result. The alternative would be to invoke rainbow(), and then delete
//  * arcs as the b.e. is seen... but that gets messy.
//  ^ static void cbracket(struct vars *, struct state *, struct state *);
//
func cbracket(tls *libc.TLS, v uintptr, lp uintptr, rp uintptr) { /* regcomp.c:1455:1: */
	var left uintptr = newstate(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)
	var right uintptr = newstate(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)

	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	bracket(tls, v, left, right)
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_NLSTOP != 0 {
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'p', int32((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnlcolor), left, right)
	}
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	// all outarcs will be ours

	// Easy part of complementing, and all there is to do since the MCCE code
	// was removed.

	colorcomplement(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcm, 'p', left, lp, rp)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	dropstate(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, left)

	freestate(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa, right)
	return
}

//
//  - brackpart - handle one item (or range) within a bracket expression
//  ^ static void brackpart(struct vars *, struct state *, struct state *);
//
func brackpart(tls *libc.TLS, v uintptr, lp uintptr, rp uintptr) { /* regcomp.c:1490:1: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	var startc Celt
	var endc Celt
	var cv uintptr
	var startp uintptr
	var endp uintptr
	// var c Chr at bp, 2

	// Parse something, get rid of special cases, take shortcuts.

	switch (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype {
	case 'R': // a-b-c or other botch
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ERANGE
		}()
		return
		break
	case 'p':
		*(*Chr)(unsafe.Pointer(bp /* c */)) = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue
		next(tls, v)

		// Shortcut for ordinary chr (not range).

		if !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype == 'R') {
			onechr(tls, v, int32(*(*Chr)(unsafe.Pointer(bp /* c */))), lp, rp)
			return
		}
		startc = element(tls, v, bp, bp+uintptr(1)*2)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		break
	case 'I':
		startp = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow
		endp = scanplain(tls, v)
		for ok := true; ok; ok = 0 != 0 {
			if !(startp < endp) {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_ECOLLATE
				}()
			}
		}
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		startc = element(tls, v, startp, endp)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		break
	case 'E':
		startp = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow
		endp = scanplain(tls, v)
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if !(startp < endp) {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_ECOLLATE
				}()
			}
		}
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		startc = element(tls, v, startp, endp)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		cv = eclass(tls, v, startc, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_ICASE)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		dovec(tls, v, cv, lp, rp)
		return
		break
	case 'C':
		startp = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow
		endp = scanplain(tls, v)
		for ok2 := true; ok2; ok2 = 0 != 0 {
			if !(startp < endp) {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_ECTYPE
				}()
			}
		}
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		cv = cclass(tls, v, startp, endp, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_ICASE)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return
			}
		}

		dovec(tls, v, cv, lp, rp)
		return
		break
	default:
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ASSERT
		}()
		return
		break
	}

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == 'R' {
		next(tls, v)
		switch (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype {
		case 'p':
			fallthrough
		case 'R':
			*(*Chr)(unsafe.Pointer(bp /* c */)) = (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue
			next(tls, v)
			endc = element(tls, v, bp, bp+uintptr(1)*2)
			{
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return
				}
			}

			break
			fallthrough
		case 'I':
			startp = (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow
			endp = scanplain(tls, v)
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if !(startp < endp) {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'e'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr = func() int32 {
						if (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr != 0 {
							return (*struct {
								Fre          uintptr
								Fnow         uintptr
								Fstop        uintptr
								Fsavenow     uintptr
								Fsavestop    uintptr
								Ferr         int32
								Fcflags      int32
								Flasttype    int32
								Fnexttype    int32
								Fnextvalue   Chr
								F__ccgo_pad1 [2]byte
								Flexcon      int32
								Fnsubexp     int32
								F__ccgo_pad2 [4]byte
								Fsubs        uintptr
								Fnsubs       Size_t
								Fsub10       [10]uintptr
								Fnfa         uintptr
								Fcm          uintptr
								Fnlcolor     Color
								F__ccgo_pad3 [6]byte
								Fwordchrs    uintptr
								Ftree        uintptr
								Ftreechain   uintptr
								Ftreefree    uintptr
								Fntree       int32
								F__ccgo_pad4 [4]byte
								Fcv          uintptr
								Fcv2         uintptr
								Flacons      uintptr
								Fnlacons     int32
								F__ccgo_pad5 [4]byte
								Fspaceused   Size_t
							})(unsafe.Pointer(v)).Ferr
						}
						return REG_ECOLLATE
					}()
				}
			}
			{
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return
				}
			}

			endc = element(tls, v, startp, endp)
			{
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return
				}
			}

			break
			fallthrough
		default:
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_ERANGE
			}()
			return
			break
		}
	} else {
		endc = startc
	}

	// Ranges are unportable. Actually, standard C does guarantee that digits
	// are contiguous, but making that an exception is just too complicated.

	if startc != endc {
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNPORT
	}
	cv = range1(tls, v, startc, endc, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_ICASE)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	dovec(tls, v, cv, lp, rp)
}

//
//  - scanplain - scan PLAIN contents of [. etc.
//  * Certain bits of trickery in lex.c know that this code does not try to look
//  * past the final bracket of the [. etc.
//  ^ static const chr *scanplain(struct vars *);
//
func scanplain(tls *libc.TLS, v uintptr) uintptr { /* regcomp.c:1606:18: */
	var endp uintptr

	next(tls, v)

	endp = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow
	for (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == 'p' {
		endp = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow
		next(tls, v)
	}

	next(tls, v)

	return endp
}

//
//  - onechr - fill in arcs for a plain character, and possible case complements
//  * This is mostly a shortcut for efficient handling of the common case.
//  ^ static void onechr(struct vars *, pchr, struct state *, struct state *);
//
func onechr(tls *libc.TLS, v uintptr, c Pchr, lp uintptr, rp uintptr) { /* regcomp.c:1633:1: */
	if !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_ICASE != 0) {
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'p', int32(subcolor(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcm, c)), lp, rp)
		return
	}

	// Rats, need general case anyway...

	dovec(tls, v, allcases(tls, v, c), lp, rp)
}

//
//  - dovec - fill in arcs for each element of a cvec
//  ^ static void dovec(struct vars *, struct cvec *, struct state *,
//  ^ 	struct state *);
//
func dovec(tls *libc.TLS, v uintptr, cv uintptr, lp uintptr, rp uintptr) { /* regcomp.c:1657:1: */
	var ch Chr
	var from Chr
	var to Chr
	var p uintptr
	var i int32

	p = (*Cvec)(unsafe.Pointer(cv)).Fchrs
	i = (*Cvec)(unsafe.Pointer(cv)).Fnchrs
__1:
	if !(i > 0) {
		goto __3
	}
	{
		ch = *(*Chr)(unsafe.Pointer(p))
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'p', int32(subcolor(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcm, int32(ch))), lp, rp)

	}
	goto __2
__2:
	p += 2
	i--
	goto __1
	goto __3
__3:
	;

	p = (*Cvec)(unsafe.Pointer(cv)).Franges
	i = (*Cvec)(unsafe.Pointer(cv)).Fnranges
__4:
	if !(i > 0) {
		goto __6
	}
	{
		from = *(*Chr)(unsafe.Pointer(p))
		to = *(*Chr)(unsafe.Pointer(p + uintptr(1)*2))
		if int32(from) <= int32(to) {
			subrange(tls, v, int32(from), int32(to), lp, rp)
		}

	}
	goto __5
__5:
	p += 2 * uintptr(2)
	i--
	goto __4
	goto __6
__6:
}

//
//  - wordchrs - set up word-chr list for word-boundary stuff, if needed
//  * The list is kept as a bunch of arcs between two dummy states; it's disposed
//  * of by the unreachable-states sweep in NFA optimization. Does NEXT(). Must
//  * not be called from any unusual lexical context. This should be reconciled
//  * with the \w etc. handling in lex.c, and should be cleaned up to reduce
//  * dependencies on input scanning.
//  ^ static void wordchrs(struct vars *);
//
func wordchrs(tls *libc.TLS, v uintptr) { /* regcomp.c:1692:1: */
	var left uintptr
	var right uintptr

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fwordchrs != uintptr(0) {
		next(tls, v) // for consistency
		return
	}

	left = newstate(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)
	right = newstate(tls, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	// Fine point: implemented with [::], and lexer will set REG_ULOCALE.

	lexword(tls, v)
	next(tls, v)

	bracket(tls, v, left, right)

	next(tls, v)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fwordchrs = left
}

//
//  - subre - allocate a subre
//  ^ static struct subre *subre(struct vars *, int, int, struct state *,
//  ^	struct state *);
//
func subre(tls *libc.TLS, v uintptr, op int32, flags int32, begin uintptr, end uintptr) uintptr { /* regcomp.c:1725:21: */
	var ret uintptr = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftreefree

	if ret != uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ftreefree = (*Subre)(unsafe.Pointer(ret)).Fleft
	} else {
		ret = XTclpAlloc(tls, uint32(unsafe.Sizeof(Subre{})))
		if ret == uintptr(0) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_ESPACE
			}()
			return uintptr(0)
		}
		(*Subre)(unsafe.Pointer(ret)).Fchain = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ftreechain
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ftreechain = ret
	}

	(*Subre)(unsafe.Pointer(ret)).Fop = int8(op)
	(*Subre)(unsafe.Pointer(ret)).Fflags = int8(flags)
	(*Subre)(unsafe.Pointer(ret)).Fid = int16(0) // will be assigned later
	(*Subre)(unsafe.Pointer(ret)).Fsubno = 0
	(*Subre)(unsafe.Pointer(ret)).Fmin = libc.AssignPtrInt16(ret+10, int16(1))
	(*Subre)(unsafe.Pointer(ret)).Fleft = uintptr(0)
	(*Subre)(unsafe.Pointer(ret)).Fright = uintptr(0)
	(*Subre)(unsafe.Pointer(ret)).Fbegin = begin
	(*Subre)(unsafe.Pointer(ret)).Fend = end
	(*Subre)(unsafe.Pointer(ret)).Fcnfa.Fnstates = 0

	return ret
}

//
//  - freesubre - free a subRE subtree
//  ^ static void freesubre(struct vars *, struct subre *);
//
func freesubre(tls *libc.TLS, v uintptr, sr uintptr) { /* regcomp.c:1768:1: */
	if sr == uintptr(0) {
		return
	}

	if (*Subre)(unsafe.Pointer(sr)).Fleft != uintptr(0) {
		freesubre(tls, v, (*Subre)(unsafe.Pointer(sr)).Fleft)
	}
	if (*Subre)(unsafe.Pointer(sr)).Fright != uintptr(0) {
		freesubre(tls, v, (*Subre)(unsafe.Pointer(sr)).Fright)
	}

	freesrnode(tls, v, sr)
}

//
//  - freesrnode - free one node in a subRE subtree
//  ^ static void freesrnode(struct vars *, struct subre *);
//
func freesrnode(tls *libc.TLS, v uintptr, sr uintptr) { /* regcomp.c:1791:1: */
	if sr == uintptr(0) {
		return
	}

	if !((*Subre)(unsafe.Pointer(sr)).Fcnfa.Fnstates == 0) {
		freecnfa(tls, sr+48)
	}
	(*Subre)(unsafe.Pointer(sr)).Fflags = int8(0)

	if v != uintptr(0) && (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftreechain != uintptr(0) {
		// we're still parsing, maybe we can reuse the subre
		(*Subre)(unsafe.Pointer(sr)).Fleft = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ftreefree
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ftreefree = sr
	} else {
		XTclpFree(tls, sr)
	}
}

//
//  - numst - number tree nodes (assigning "id" indexes)
//  ^ static int numst(struct subre *, int);
//
func numst(tls *libc.TLS, t uintptr, start int32) int32 { /* regcomp.c:1818:1: */
	var i int32

	i = start
	(*Subre)(unsafe.Pointer(t)).Fid = int16(libc.PostIncInt32(&i, 1))
	if (*Subre)(unsafe.Pointer(t)).Fleft != uintptr(0) {
		i = numst(tls, (*Subre)(unsafe.Pointer(t)).Fleft, i)
	}
	if (*Subre)(unsafe.Pointer(t)).Fright != uintptr(0) {
		i = numst(tls, (*Subre)(unsafe.Pointer(t)).Fright, i)
	}
	return i
}

//
//  - markst - mark tree nodes as INUSE
//  * Note: this is a great deal more subtle than it looks.  During initial
//  * parsing of a regex, all subres are linked into the treechain list;
//  * discarded ones are also linked into the treefree list for possible reuse.
//  * After we are done creating all subres required for a regex, we run markst()
//  * then cleanst(), which results in discarding all subres not reachable from
//  * v->tree.  We then clear v->treechain, indicating that subres must be found
//  * by descending from v->tree.  This changes the behavior of freesubre(): it
//  * will henceforth FREE() unwanted subres rather than sticking them into the
//  * treefree list.  (Doing that any earlier would result in dangling links in
//  * the treechain list.)  This all means that freev() will clean up correctly
//  * if invoked before or after markst()+cleanst(); but it would not work if
//  * called partway through this state conversion, so we mustn't error out
//  * in or between these two functions.
//  ^ static void markst(struct subre *);
//
func markst(tls *libc.TLS, t uintptr) { /* regcomp.c:1855:1: */

	*(*int8)(unsafe.Pointer(t + 1)) |= int8(INUSE)
	if (*Subre)(unsafe.Pointer(t)).Fleft != uintptr(0) {
		markst(tls, (*Subre)(unsafe.Pointer(t)).Fleft)
	}
	if (*Subre)(unsafe.Pointer(t)).Fright != uintptr(0) {
		markst(tls, (*Subre)(unsafe.Pointer(t)).Fright)
	}
}

//
//  - cleanst - free any tree nodes not marked INUSE
//  ^ static void cleanst(struct vars *);
//
func cleanst(tls *libc.TLS, v uintptr) { /* regcomp.c:1874:1: */
	var t uintptr
	var next uintptr

	for t = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftreechain; t != uintptr(0); t = next {
		next = (*Subre)(unsafe.Pointer(t)).Fchain
		if !(int32((*Subre)(unsafe.Pointer(t)).Fflags)&INUSE != 0) {
			XTclpFree(tls, t)
		}
	}
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftreechain = uintptr(0)
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ftreefree = uintptr(0) // just on general principles
}

//
//  - nfatree - turn a subRE subtree into a tree of compacted NFAs
//  ^ static long nfatree(struct vars *, struct subre *, FILE *);
//
func nfatree(tls *libc.TLS, v uintptr, t uintptr, f uintptr) int32 { /* regcomp.c:1895:1: */

	if (*Subre)(unsafe.Pointer(t)).Fleft != uintptr(0) {
		nfatree(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft, f)
	}
	if (*Subre)(unsafe.Pointer(t)).Fright != uintptr(0) {
		nfatree(tls, v, (*Subre)(unsafe.Pointer(t)).Fright, f)
	}

	return nfanode(tls, v, t, f)
}

//
//  - nfanode - do one NFA for nfatree
//  ^ static long nfanode(struct vars *, struct subre *, FILE *);
//
func nfanode(tls *libc.TLS, v uintptr, t uintptr, f uintptr) int32 { /* regcomp.c:1917:1: */
	bp := tls.Alloc(58)
	defer tls.Free(58)

	var nfa uintptr
	var ret int32 = 0
	// var idbuf [50]int8 at bp+8, 50

	if f != uintptr(0) {
		libc.Xfprintf(tls, f, ts+777,
			libc.VaList(bp, stid(tls, t, bp+8, uint64(unsafe.Sizeof([50]int8{})))))
	}
	nfa = newnfa(tls, v, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcm, (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnfa)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return 0
		}
	}

	dupnfa(tls, nfa, (*Subre)(unsafe.Pointer(t)).Fbegin, (*Subre)(unsafe.Pointer(t)).Fend, (*Nfa)(unsafe.Pointer(nfa)).Finit, (*Nfa)(unsafe.Pointer(nfa)).Ffinal)
	if !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr != 0) {
		specialcolors(tls, nfa)
		ret = optimize(tls, nfa, f)
	}
	if !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr != 0) {
		compact(tls, nfa, t+48)
	}

	freenfa(tls, nfa)
	return ret
}

//
//  - newlacon - allocate a lookahead-constraint subRE
//  ^ static int newlacon(struct vars *, struct state *, struct state *, int);
//
func newlacon(tls *libc.TLS, v uintptr, begin uintptr, end uintptr, pos int32) int32 { /* regcomp.c:1952:1: */
	var n int32
	var newlacons uintptr
	var sub uintptr

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnlacons == 0 {
		n = 1 // skip 0th
		newlacons = XTclpAlloc(tls, uint32(uint64(2)*uint64(unsafe.Sizeof(Subre{}))))
	} else {
		n = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnlacons
		newlacons = XTclpRealloc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flacons, uint32(uint64(n+1)*uint64(unsafe.Sizeof(Subre{}))))
	}

	if newlacons == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ESPACE
		}()
		return 0
	}

	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Flacons = newlacons
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnlacons = n + 1
	sub = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Flacons + uintptr(n)*112
	(*Subre)(unsafe.Pointer(sub)).Fbegin = begin
	(*Subre)(unsafe.Pointer(sub)).Fend = end
	(*Subre)(unsafe.Pointer(sub)).Fsubno = pos
	(*Subre)(unsafe.Pointer(sub)).Fcnfa.Fnstates = 0
	return n
}

//
//  - freelacons - free lookahead-constraint subRE vector
//  ^ static void freelacons(struct subre *, int);
//
func freelacons(tls *libc.TLS, subs uintptr, n int32) { /* regcomp.c:1991:1: */
	var sub uintptr
	var i int32

	sub = subs + uintptr(1)*112
	i = n - 1
__1:
	if !(i > 0) {
		goto __3
	}
	{ // no 0th
		if !((*Subre)(unsafe.Pointer(sub)).Fcnfa.Fnstates == 0) {
			freecnfa(tls, sub+48)
		}

	}
	goto __2
__2:
	sub += 112
	i--
	goto __1
	goto __3
__3:
	;
	XTclpFree(tls, subs)
}

//
//  - rfree - free a whole RE (insides of regfree)
//  ^ static void rfree(regex_t *);
//
func rfree(tls *libc.TLS, re uintptr) { /* regcomp.c:2012:1: */
	var g uintptr

	if re == uintptr(0) || (*Regex_t)(unsafe.Pointer(re)).Fre_magic != REMAGIC {
		return
	}

	(*Regex_t)(unsafe.Pointer(re)).Fre_magic = 0 // invalidate RE
	g = (*Regex_t)(unsafe.Pointer(re)).Fre_guts
	(*Regex_t)(unsafe.Pointer(re)).Fre_guts = uintptr(0)
	(*Regex_t)(unsafe.Pointer(re)).Fre_fns = uintptr(0)
	if g != uintptr(0) {
		(*Guts)(unsafe.Pointer(g)).Fmagic = 0
		freecm(tls, g+96)
		if (*Guts)(unsafe.Pointer(g)).Ftree != uintptr(0) {
			freesubre(tls, uintptr(0), (*Guts)(unsafe.Pointer(g)).Ftree)
		}
		if (*Guts)(unsafe.Pointer(g)).Flacons != uintptr(0) {
			freelacons(tls, (*Guts)(unsafe.Pointer(g)).Flacons, (*Guts)(unsafe.Pointer(g)).Fnlacons)
		}
		if !((*Guts)(unsafe.Pointer(g)).Fsearch.Fnstates == 0) {
			freecnfa(tls, g+32)
		}
		XTclpFree(tls, g)
	}
}

//
//  - dump - dump an RE in human-readable form
//  ^ static void dump(regex_t *, FILE *);
//
func dump(tls *libc.TLS, re uintptr, f uintptr) { /* regcomp.c:2046:1: */
	_ = re
	_ = f
}

//
//  - dumpst - dump a subRE tree
//  ^ static void dumpst(struct subre *, FILE *, int);
//
func dumpst(tls *libc.TLS, t uintptr, f uintptr, nfapresent int32) { /* regcomp.c:2095:1: */
	if t == uintptr(0) {
		libc.Xfprintf(tls, f, ts+815, 0)
	} else {
		stdump(tls, t, f, nfapresent)
	}
	libc.Xfflush(tls, f)
}

//
//  - stdump - recursive guts of dumpst
//  ^ static void stdump(struct subre *, FILE *, int);
//
func stdump(tls *libc.TLS, t uintptr, f uintptr, nfapresent int32) { /* regcomp.c:2113:1: */
	bp := tls.Alloc(122)
	defer tls.Free(122)

	// var idbuf [50]int8 at bp+72, 50

	libc.Xfprintf(tls, f, ts+826, libc.VaList(bp, stid(tls, t, bp+72, uint64(unsafe.Sizeof([50]int8{}))), int32((*Subre)(unsafe.Pointer(t)).Fop)))
	if int32((*Subre)(unsafe.Pointer(t)).Fflags)&LONGER != 0 {
		libc.Xfprintf(tls, f, ts+835, 0)
	}
	if int32((*Subre)(unsafe.Pointer(t)).Fflags)&SHORTER != 0 {
		libc.Xfprintf(tls, f, ts+844, 0)
	}
	if int32((*Subre)(unsafe.Pointer(t)).Fflags)&MIXED != 0 {
		libc.Xfprintf(tls, f, ts+854, 0)
	}
	if int32((*Subre)(unsafe.Pointer(t)).Fflags)&CAP != 0 {
		libc.Xfprintf(tls, f, ts+864, 0)
	}
	if int32((*Subre)(unsafe.Pointer(t)).Fflags)&BACKR != 0 {
		libc.Xfprintf(tls, f, ts+876, 0)
	}
	if !(int32((*Subre)(unsafe.Pointer(t)).Fflags)&INUSE != 0) {
		libc.Xfprintf(tls, f, ts+888, 0)
	}
	if (*Subre)(unsafe.Pointer(t)).Fsubno != 0 {
		libc.Xfprintf(tls, f, ts+896, libc.VaList(bp+16, (*Subre)(unsafe.Pointer(t)).Fsubno))
	}
	if int32((*Subre)(unsafe.Pointer(t)).Fmin) != 1 || int32((*Subre)(unsafe.Pointer(t)).Fmax) != 1 {
		libc.Xfprintf(tls, f, ts+903, libc.VaList(bp+24, int32((*Subre)(unsafe.Pointer(t)).Fmin)))
		if int32((*Subre)(unsafe.Pointer(t)).Fmax) != X_POSIX2_RE_DUP_MAX+1 {
			libc.Xfprintf(tls, f, ts+909, libc.VaList(bp+32, int32((*Subre)(unsafe.Pointer(t)).Fmax)))
		}
		libc.Xfprintf(tls, f, ts+912, 0)
	}
	if nfapresent != 0 {
		libc.Xfprintf(tls, f, ts+914, libc.VaList(bp+40, int32((*State)(unsafe.Pointer((*Subre)(unsafe.Pointer(t)).Fbegin)).Fno), int32((*State)(unsafe.Pointer((*Subre)(unsafe.Pointer(t)).Fend)).Fno)))
	}
	if (*Subre)(unsafe.Pointer(t)).Fleft != uintptr(0) {
		libc.Xfprintf(tls, f, ts+923, libc.VaList(bp+56, stid(tls, (*Subre)(unsafe.Pointer(t)).Fleft, bp+72, uint64(unsafe.Sizeof([50]int8{})))))
	}
	if (*Subre)(unsafe.Pointer(t)).Fright != uintptr(0) {
		libc.Xfprintf(tls, f, ts+929, libc.VaList(bp+64, stid(tls, (*Subre)(unsafe.Pointer(t)).Fright, bp+72, uint64(unsafe.Sizeof([50]int8{})))))
	}
	if !((*Subre)(unsafe.Pointer(t)).Fcnfa.Fnstates == 0) {
		libc.Xfprintf(tls, f, ts+935, 0)
		dumpcnfa(tls, t+48, f)
	}
	libc.Xfprintf(tls, f, ts+935, 0)
	if (*Subre)(unsafe.Pointer(t)).Fleft != uintptr(0) {
		stdump(tls, (*Subre)(unsafe.Pointer(t)).Fleft, f, nfapresent)
	}
	if (*Subre)(unsafe.Pointer(t)).Fright != uintptr(0) {
		stdump(tls, (*Subre)(unsafe.Pointer(t)).Fright, f, nfapresent)
	}
}

//
//  - stid - identify a subtree node for dumping
//  ^ static const char *stid(struct subre *, char *, size_t);
//
func stid(tls *libc.TLS, t uintptr, buf uintptr, bufsize Size_t) uintptr { /* regcomp.c:2175:19: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// Big enough for hex int or decimal t->id?

	if bufsize < uint64(unsafe.Sizeof(uintptr(0)))*uint64(2)+uint64(3) || bufsize < uint64(unsafe.Sizeof(int16(0)))*uint64(3)+uint64(1) {
		return ts + 937 /* "unable" */
	}
	if int32((*Subre)(unsafe.Pointer(t)).Fid) != 0 {
		libc.Xsprintf(tls, buf, ts+909, libc.VaList(bp, int32((*Subre)(unsafe.Pointer(t)).Fid)))
	} else {
		libc.Xsprintf(tls, buf, ts+944, libc.VaList(bp+8, t))
	}
	return buf
}

// lexical analyzer
// This file is #included by regcomp.c.
//
// Copyright (c) 1998, 1999 Henry Spencer.  All rights reserved.
//
// Development of this software was funded, in part, by Cray Research Inc.,
// UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
// Corporation, none of whom are responsible for the results.  The author
// thanks all of them.
//
// Redistribution and use in source and binary forms -- with or without
// modification -- are permitted for any purpose, provided that
// redistributions in source form retain this entire copyright notice and
// indicate the origin and nature of any modifications.
//
// I'd appreciate being given credit for this package in the documentation of
// software which uses it, but that is not a requirement.
//
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
// HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

// scanning macros (know about v)

// lexical contexts

// construct pointer past end of chr array

//
//  - lexstart - set up lexical stuff, scan leading options
//  ^ static void lexstart(struct vars *);
//
func lexstart(tls *libc.TLS, v uintptr) { /* regc_lex.c:69:1: */
	prefixes(tls, v) /* may turn on new type bits etc. */
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return
		}
	}

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_QUOTE != 0 {

		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flexcon = L_Q
	} else if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_EXTENDED != 0 {

		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flexcon = L_ERE
	} else {

		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flexcon = L_BRE
	}

	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype = 'n' // remember we were at the start
	next(tls, v) // set up the first token
}

//
//  - prefixes - implement various special prefixes
//  ^ static void prefixes(struct vars *);
//
func prefixes(tls *libc.TLS, v uintptr) { /* regc_lex.c:95:1: */
	// Literal string doesn't get any of this stuff.

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_QUOTE != 0 {
		return
	}

	// Initial "***" gets special things.

	if (int64((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop)-int64((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow))/2 >= int64(4) && ((int64((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop)-int64((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow))/2 >= int64(3) && int32(*(*Chr)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow))) == int32(uint8('*')) && int32(*(*Chr)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow + uintptr(1)*2))) == int32(uint8('*')) && int32(*(*Chr)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow + uintptr(2)*2))) == int32(uint8('*'))) {
		switch int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(3)*2))) {
		case int32(uint8('?')):
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_BADPAT
			}()
			return // proceed no further
			break
			fallthrough
		case int32(uint8('=')):
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
			*(*int32)(unsafe.Pointer(v + 44)) |= REG_QUOTE
			*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_ADVANCED | REG_EXPANDED | REG_NEWLINE)
			*(*uintptr)(unsafe.Pointer(v + 8)) += uintptr(4) * 2
			return // and there can be no more prefixes
			break
			fallthrough
		case int32(uint8(':')):
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
			*(*int32)(unsafe.Pointer(v + 44)) |= REG_ADVANCED
			*(*uintptr)(unsafe.Pointer(v + 8)) += uintptr(4) * 2
			break
			fallthrough
		default: // otherwise *** is just an error
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_BADRPT
			}()
			return
			break
		}
	}

	// BREs and EREs don't get embedded options.

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_ADVANCED != REG_ADVANCED {
		return
	}

	// Embedded options (AREs only).

	if (int64((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop)-int64((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow))/2 >= int64(3) && ((int64((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop)-int64((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow))/2 >= int64(2) && int32(*(*Chr)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow))) == int32(uint8('(')) && int32(*(*Chr)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow + uintptr(1)*2))) == int32(uint8('?'))) && XTcl_UniCharIsAlpha(tls, int32(*(*Chr)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow + uintptr(2)*2)))) != 0 {
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
		*(*uintptr)(unsafe.Pointer(v + 8)) += uintptr(2) * 2
		for ; !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && XTcl_UniCharIsAlpha(tls, int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow)))) != 0; (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow += 2 {
			switch int32(*(*Chr)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow))) {
			case int32(uint8('b')):
				*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_ADVANCED | REG_QUOTE)
				break
				fallthrough
			case int32(uint8('c')):
				*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_ICASE)
				break
				fallthrough
			case int32(uint8('e')):
				*(*int32)(unsafe.Pointer(v + 44)) |= REG_EXTENDED
				*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_ADVF | REG_QUOTE)
				break
				fallthrough
			case int32(uint8('i')):
				*(*int32)(unsafe.Pointer(v + 44)) |= REG_ICASE
				break
				fallthrough
			case int32(uint8('m')):
				fallthrough // Perloid synonym for n
			case int32(uint8('n')):
				*(*int32)(unsafe.Pointer(v + 44)) |= REG_NEWLINE
				break
				fallthrough
			case int32(uint8('p')):
				*(*int32)(unsafe.Pointer(v + 44)) |= REG_NLSTOP
				*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_NLANCH)
				break
				fallthrough
			case int32(uint8('q')):
				*(*int32)(unsafe.Pointer(v + 44)) |= REG_QUOTE
				*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_ADVANCED)
				break
				fallthrough
			case int32(uint8('s')):
				*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_NEWLINE)
				break
				fallthrough
			case int32(uint8('t')):
				*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_EXPANDED)
				break
				fallthrough
			case int32(uint8('w')):
				*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_NLSTOP)
				*(*int32)(unsafe.Pointer(v + 44)) |= REG_NLANCH
				break
				fallthrough
			case int32(uint8('x')):
				*(*int32)(unsafe.Pointer(v + 44)) |= REG_EXPANDED
				break
				fallthrough
			default:
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_BADOPT
				}()
				return
			}
		}
		if !(!((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8(')'))) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_BADOPT
			}()
			return
		}
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow += 2
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_QUOTE != 0 {
			*(*int32)(unsafe.Pointer(v + 44)) &= libc.CplInt32(REG_EXPANDED | REG_NEWLINE)
		}
	}
}

//
//  - lexnest - "call a subroutine", interpolating string at the lexical level
//  * Note, this is not a very general facility.  There are a number of
//  * implicit assumptions about what sorts of strings can be subroutines.
//  ^ static void lexnest(struct vars *, const chr *, const chr *);
//
func lexnest(tls *libc.TLS, v uintptr, beginp uintptr, endp uintptr) { /* regc_lex.c:213:1: */
	// only one level of nesting
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fsavenow = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fsavestop = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow = beginp
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop = endp
}

// string constants to interpolate as expansions of things like \d

var backd = [11]Chr{ // \d
	Chr(uint8('[')), Chr(uint8('[')), Chr(uint8(':')),
	Chr(uint8('d')), Chr(uint8('i')), Chr(uint8('g')), Chr(uint8('i')), Chr(uint8('t')),
	Chr(uint8(':')), Chr(uint8(']')), Chr(uint8(']')),
}                    /* regc_lex.c:229:18 */
var backD = [12]Chr{ // \D
	Chr(uint8('[')), Chr(uint8('^')), Chr(uint8('[')), Chr(uint8(':')),
	Chr(uint8('d')), Chr(uint8('i')), Chr(uint8('g')), Chr(uint8('i')), Chr(uint8('t')),
	Chr(uint8(':')), Chr(uint8(']')), Chr(uint8(']')),
}                     /* regc_lex.c:234:18 */
var brbackd = [9]Chr{ // \d within brackets
	Chr(uint8('[')), Chr(uint8(':')),
	Chr(uint8('d')), Chr(uint8('i')), Chr(uint8('g')), Chr(uint8('i')), Chr(uint8('t')),
	Chr(uint8(':')), Chr(uint8(']')),
}                    /* regc_lex.c:239:18 */
var backs = [11]Chr{ // \s
	Chr(uint8('[')), Chr(uint8('[')), Chr(uint8(':')),
	Chr(uint8('s')), Chr(uint8('p')), Chr(uint8('a')), Chr(uint8('c')), Chr(uint8('e')),
	Chr(uint8(':')), Chr(uint8(']')), Chr(uint8(']')),
}                    /* regc_lex.c:244:18 */
var backS = [12]Chr{ // \S
	Chr(uint8('[')), Chr(uint8('^')), Chr(uint8('[')), Chr(uint8(':')),
	Chr(uint8('s')), Chr(uint8('p')), Chr(uint8('a')), Chr(uint8('c')), Chr(uint8('e')),
	Chr(uint8(':')), Chr(uint8(']')), Chr(uint8(']')),
}                     /* regc_lex.c:249:18 */
var brbacks = [9]Chr{ // \s within brackets
	Chr(uint8('[')), Chr(uint8(':')),
	Chr(uint8('s')), Chr(uint8('p')), Chr(uint8('a')), Chr(uint8('c')), Chr(uint8('e')),
	Chr(uint8(':')), Chr(uint8(']')),
} /* regc_lex.c:254:18 */

var backw = [21]Chr{ // \w
	Chr(uint8('[')), Chr(uint8('[')), Chr(uint8(':')),
	Chr(uint8('a')), Chr(uint8('l')), Chr(uint8('n')), Chr(uint8('u')), Chr(uint8('m')),
	Chr(uint8(':')), Chr(uint8(']')), Chr(uint8('_')), Chr(0x203F) /* UNDERTIE */, Chr(0x2040) /* CHARACTER TIE */, Chr(0x2054) /* INVERTED UNDERTIE */, Chr(0xFE33) /* PRESENTATION FORM FOR VERTICAL LOW LINE */, Chr(0xFE34) /* PRESENTATION FORM FOR VERTICAL WAVY LOW LINE */, Chr(0xFE4D) /* DASHED LOW LINE */, Chr(0xFE4E) /* CENTRELINE LOW LINE */, Chr(0xFE4F) /* WAVY LOW LINE */, Chr(0xFF3F), Chr(uint8(']')),
}                    /* regc_lex.c:272:18 */
var backW = [22]Chr{ // \W
	Chr(uint8('[')), Chr(uint8('^')), Chr(uint8('[')), Chr(uint8(':')),
	Chr(uint8('a')), Chr(uint8('l')), Chr(uint8('n')), Chr(uint8('u')), Chr(uint8('m')),
	Chr(uint8(':')), Chr(uint8(']')), Chr(uint8('_')), Chr(0x203F) /* UNDERTIE */, Chr(0x2040) /* CHARACTER TIE */, Chr(0x2054) /* INVERTED UNDERTIE */, Chr(0xFE33) /* PRESENTATION FORM FOR VERTICAL LOW LINE */, Chr(0xFE34) /* PRESENTATION FORM FOR VERTICAL WAVY LOW LINE */, Chr(0xFE4D) /* DASHED LOW LINE */, Chr(0xFE4E) /* CENTRELINE LOW LINE */, Chr(0xFE4F) /* WAVY LOW LINE */, Chr(0xFF3F), Chr(uint8(']')),
}                      /* regc_lex.c:277:18 */
var brbackw = [19]Chr{ // \w within brackets
	Chr(uint8('[')), Chr(uint8(':')),
	Chr(uint8('a')), Chr(uint8('l')), Chr(uint8('n')), Chr(uint8('u')), Chr(uint8('m')),
	Chr(uint8(':')), Chr(uint8(']')), Chr(uint8('_')), Chr(0x203F) /* UNDERTIE */, Chr(0x2040) /* CHARACTER TIE */, Chr(0x2054) /* INVERTED UNDERTIE */, Chr(0xFE33) /* PRESENTATION FORM FOR VERTICAL LOW LINE */, Chr(0xFE34) /* PRESENTATION FORM FOR VERTICAL WAVY LOW LINE */, Chr(0xFE4D) /* DASHED LOW LINE */, Chr(0xFE4E) /* CENTRELINE LOW LINE */, Chr(0xFE4F) /* WAVY LOW LINE */, Chr(0xFF3F),
} /* regc_lex.c:282:18 */

//
//  - lexword - interpolate a bracket expression for word characters
//  * Possibly ought to inquire whether there is a "word" character class.
//  ^ static void lexword(struct vars *);
//
func lexword(tls *libc.TLS, v uintptr) { /* regc_lex.c:294:1: */
	lexnest(tls, v, uintptr(unsafe.Pointer(&backw)), uintptr(unsafe.Pointer(&backw))+uintptr(uint64(unsafe.Sizeof(backw))/uint64(unsafe.Sizeof(Chr(0))))*2)
}

//
//  - next - get next token
//  ^ static int next(struct vars *);
//
func next(tls *libc.TLS, v uintptr) int32 { /* regc_lex.c:305:1: */
	var c Chr

	// Errors yield an infinite sequence of failures.

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr != 0 {
		return 0 // the error has set nexttype to EOS
	}

	// Remember flavor of last token.

	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Flasttype = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype

	// REG_BOSONLY

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == 'n' && (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_BOSONLY != 0 {
		// at start of a REG_BOSONLY RE
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'A'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
			return 1
		}() // same as \A
	}

	// If we're nested and we've hit end, return to outer level.

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fsavenow != uintptr(0) && (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow >= (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fsavenow
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fsavestop
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fsavenow = libc.AssignPtrUintptr(v+32, uintptr(0))
	}

	// Skip white space etc. if appropriate (not in literal or [])

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_EXPANDED != 0 {
		switch (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flexcon {
		case L_ERE:
			fallthrough
		case L_BRE:
			fallthrough
		case L_EBND:
			fallthrough
		case L_BBND:
			skip(tls, v)
			break
		}
	}

	// Handle EOS, depending on context.

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow >= (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop {
		switch (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flexcon {
		case L_ERE:
			fallthrough
		case L_BRE:
			fallthrough
		case L_Q:
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				return 1
			}()
			break
			fallthrough
		case L_EBND:
			fallthrough
		case L_BBND:
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EBRACE
				}()
				return 0
			}()
			break
			fallthrough
		case L_BRACK:
			fallthrough
		case L_CEL:
			fallthrough
		case L_ECL:
			fallthrough
		case L_CCL:
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EBRACK
				}()
				return 0
			}()
			break
		}

	}

	// Okay, time to actually get a character.

	c = *(*Chr)(unsafe.Pointer(libc.PostIncUintptr(&(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow, 2)))

	// Deal with the easy contexts, punt EREs to code below.

	switch (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Flexcon {
	case L_BRE: // punt BREs to separate function
		return brenext(tls, v, int32(c))
		break
	case L_ERE: // see below
		break
	case L_Q: // literal strings are easy
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	case L_BBND:
		fallthrough // bounds are fairly simple
	case L_EBND:
		switch int32(c) {
		case int32(uint8('0')):
			fallthrough
		case int32(uint8('1')):
			fallthrough
		case int32(uint8('2')):
			fallthrough
		case int32(uint8('3')):
			fallthrough
		case int32(uint8('4')):
			fallthrough
		case int32(uint8('5')):
			fallthrough
		case int32(uint8('6')):
			fallthrough
		case int32(uint8('7')):
			fallthrough
		case int32(uint8('8')):
			fallthrough
		case int32(uint8('9')):
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'd'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr(int32(c) - '0')
				return 1
			}()
			break
		case int32(uint8(',')):
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = ','
				return 1
			}()
			break
		case int32(uint8('}')):
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Flexcon == L_EBND {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Flexcon = L_ERE
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fcflags&REG_ADVF != 0 && (!((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnow >= (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnow))) == int32(uint8('?'))) {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnow += 2
					*(*int32)(unsafe.Pointer((*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
					return func() int32 {
						(*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Fnexttype = '}'
						(*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
						return 1
					}()
				}
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = '}'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
					return 1
				}()
			} else {
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'e'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr = func() int32 {
						if (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr != 0 {
							return (*struct {
								Fre          uintptr
								Fnow         uintptr
								Fstop        uintptr
								Fsavenow     uintptr
								Fsavestop    uintptr
								Ferr         int32
								Fcflags      int32
								Flasttype    int32
								Fnexttype    int32
								Fnextvalue   Chr
								F__ccgo_pad1 [2]byte
								Flexcon      int32
								Fnsubexp     int32
								F__ccgo_pad2 [4]byte
								Fsubs        uintptr
								Fnsubs       Size_t
								Fsub10       [10]uintptr
								Fnfa         uintptr
								Fcm          uintptr
								Fnlcolor     Color
								F__ccgo_pad3 [6]byte
								Fwordchrs    uintptr
								Ftree        uintptr
								Ftreechain   uintptr
								Ftreefree    uintptr
								Fntree       int32
								F__ccgo_pad4 [4]byte
								Fcv          uintptr
								Fcv2         uintptr
								Flacons      uintptr
								Fnlacons     int32
								F__ccgo_pad5 [4]byte
								Fspaceused   Size_t
							})(unsafe.Pointer(v)).Ferr
						}
						return REG_BADBR
					}()
					return 0
				}()
			}
			break
		case int32(uint8('\\')):
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Flexcon == L_BBND && (!((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow >= (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow))) == int32(uint8('}'))) {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnow += 2
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Flexcon = L_BRE
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = '}'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
					return 1
				}()
			} else {
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'e'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr = func() int32 {
						if (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr != 0 {
							return (*struct {
								Fre          uintptr
								Fnow         uintptr
								Fstop        uintptr
								Fsavenow     uintptr
								Fsavestop    uintptr
								Ferr         int32
								Fcflags      int32
								Flasttype    int32
								Fnexttype    int32
								Fnextvalue   Chr
								F__ccgo_pad1 [2]byte
								Flexcon      int32
								Fnsubexp     int32
								F__ccgo_pad2 [4]byte
								Fsubs        uintptr
								Fnsubs       Size_t
								Fsub10       [10]uintptr
								Fnfa         uintptr
								Fcm          uintptr
								Fnlcolor     Color
								F__ccgo_pad3 [6]byte
								Fwordchrs    uintptr
								Ftree        uintptr
								Ftreechain   uintptr
								Ftreefree    uintptr
								Fntree       int32
								F__ccgo_pad4 [4]byte
								Fcv          uintptr
								Fcv2         uintptr
								Flacons      uintptr
								Fnlacons     int32
								F__ccgo_pad5 [4]byte
								Fspaceused   Size_t
							})(unsafe.Pointer(v)).Ferr
						}
						return REG_BADBR
					}()
					return 0
				}()
			}
			break
		default:
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_BADBR
				}()
				return 0
			}()
			break
		}

		break
	case L_BRACK: // brackets are not too hard
		switch int32(c) {
		case int32(uint8(']')):
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Flasttype == '[' {
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'p'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = c
					return 1
				}()
			} else {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Flexcon = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fcflags&REG_EXTENDED != 0 {
						return L_ERE
					}
					return L_BRE
				}()
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = ']'
					return 1
				}()
			}
			break
		case int32(uint8('\\')):
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UBBS
			if !((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fcflags&REG_ADVF != 0) {
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'p'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = c
					return 1
				}()
			}
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow >= (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fstop {
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'e'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr = func() int32 {
						if (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr != 0 {
							return (*struct {
								Fre          uintptr
								Fnow         uintptr
								Fstop        uintptr
								Fsavenow     uintptr
								Fsavestop    uintptr
								Ferr         int32
								Fcflags      int32
								Flasttype    int32
								Fnexttype    int32
								Fnextvalue   Chr
								F__ccgo_pad1 [2]byte
								Flexcon      int32
								Fnsubexp     int32
								F__ccgo_pad2 [4]byte
								Fsubs        uintptr
								Fnsubs       Size_t
								Fsub10       [10]uintptr
								Fnfa         uintptr
								Fcm          uintptr
								Fnlcolor     Color
								F__ccgo_pad3 [6]byte
								Fwordchrs    uintptr
								Ftree        uintptr
								Ftreechain   uintptr
								Ftreefree    uintptr
								Fntree       int32
								F__ccgo_pad4 [4]byte
								Fcv          uintptr
								Fcv2         uintptr
								Flacons      uintptr
								Fnlacons     int32
								F__ccgo_pad5 [4]byte
								Fspaceused   Size_t
							})(unsafe.Pointer(v)).Ferr
						}
						return REG_EESCAPE
					}()
					return 0
				}()
			}
			lexescape(tls, v)
			switch (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype { // not all escapes okay here
			case 'p':
				return 1
				break
			case 'C':
				switch int32((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue) {
				case 'd':
					lexnest(tls, v, uintptr(unsafe.Pointer(&brbackd)), uintptr(unsafe.Pointer(&brbackd))+uintptr(uint64(unsafe.Sizeof(brbackd))/uint64(unsafe.Sizeof(Chr(0))))*2)
					break
				case 's':
					lexnest(tls, v, uintptr(unsafe.Pointer(&brbacks)), uintptr(unsafe.Pointer(&brbacks))+uintptr(uint64(unsafe.Sizeof(brbacks))/uint64(unsafe.Sizeof(Chr(0))))*2)
					break
				case 'w':
					lexnest(tls, v, uintptr(unsafe.Pointer(&brbackw)), uintptr(unsafe.Pointer(&brbackw))+uintptr(uint64(unsafe.Sizeof(brbackw))/uint64(unsafe.Sizeof(Chr(0))))*2)
					break
				default:
					return func() int32 {
						(*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Fnexttype = 'e'
						(*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr = func() int32 {
							if (*struct {
								Fre          uintptr
								Fnow         uintptr
								Fstop        uintptr
								Fsavenow     uintptr
								Fsavestop    uintptr
								Ferr         int32
								Fcflags      int32
								Flasttype    int32
								Fnexttype    int32
								Fnextvalue   Chr
								F__ccgo_pad1 [2]byte
								Flexcon      int32
								Fnsubexp     int32
								F__ccgo_pad2 [4]byte
								Fsubs        uintptr
								Fnsubs       Size_t
								Fsub10       [10]uintptr
								Fnfa         uintptr
								Fcm          uintptr
								Fnlcolor     Color
								F__ccgo_pad3 [6]byte
								Fwordchrs    uintptr
								Ftree        uintptr
								Ftreechain   uintptr
								Ftreefree    uintptr
								Fntree       int32
								F__ccgo_pad4 [4]byte
								Fcv          uintptr
								Fcv2         uintptr
								Flacons      uintptr
								Fnlacons     int32
								F__ccgo_pad5 [4]byte
								Fspaceused   Size_t
							})(unsafe.Pointer(v)).Ferr != 0 {
								return (*struct {
									Fre          uintptr
									Fnow         uintptr
									Fstop        uintptr
									Fsavenow     uintptr
									Fsavestop    uintptr
									Ferr         int32
									Fcflags      int32
									Flasttype    int32
									Fnexttype    int32
									Fnextvalue   Chr
									F__ccgo_pad1 [2]byte
									Flexcon      int32
									Fnsubexp     int32
									F__ccgo_pad2 [4]byte
									Fsubs        uintptr
									Fnsubs       Size_t
									Fsub10       [10]uintptr
									Fnfa         uintptr
									Fcm          uintptr
									Fnlcolor     Color
									F__ccgo_pad3 [6]byte
									Fwordchrs    uintptr
									Ftree        uintptr
									Ftreechain   uintptr
									Ftreefree    uintptr
									Fntree       int32
									F__ccgo_pad4 [4]byte
									Fcv          uintptr
									Fcv2         uintptr
									Flacons      uintptr
									Fnlacons     int32
									F__ccgo_pad5 [4]byte
									Fspaceused   Size_t
								})(unsafe.Pointer(v)).Ferr
							}
							return REG_EESCAPE
						}()
						return 0
					}()
					break
				}

				// lexnest() done, back up and try again.

				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Flasttype
				return next(tls, v)
				break
			}

			// Not one of the acceptable escapes.

			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EESCAPE
				}()
				return 0
			}()
			break
		case int32(uint8('-')):
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Flasttype == '[' || !((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow >= (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow))) == int32(uint8(']')) {
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'p'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = c
					return 1
				}()
			} else {
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'R'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = c
					return 1
				}()
			}
			break
		case int32(uint8('[')):
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow >= (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fstop {
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'e'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr = func() int32 {
						if (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr != 0 {
							return (*struct {
								Fre          uintptr
								Fnow         uintptr
								Fstop        uintptr
								Fsavenow     uintptr
								Fsavestop    uintptr
								Ferr         int32
								Fcflags      int32
								Flasttype    int32
								Fnexttype    int32
								Fnextvalue   Chr
								F__ccgo_pad1 [2]byte
								Flexcon      int32
								Fnsubexp     int32
								F__ccgo_pad2 [4]byte
								Fsubs        uintptr
								Fnsubs       Size_t
								Fsub10       [10]uintptr
								Fnfa         uintptr
								Fcm          uintptr
								Fnlcolor     Color
								F__ccgo_pad3 [6]byte
								Fwordchrs    uintptr
								Ftree        uintptr
								Ftreechain   uintptr
								Ftreefree    uintptr
								Fntree       int32
								F__ccgo_pad4 [4]byte
								Fcv          uintptr
								Fcv2         uintptr
								Flacons      uintptr
								Fnlacons     int32
								F__ccgo_pad5 [4]byte
								Fspaceused   Size_t
							})(unsafe.Pointer(v)).Ferr
						}
						return REG_EBRACK
					}()
					return 0
				}()
			}
			switch int32(*(*Chr)(unsafe.Pointer(libc.PostIncUintptr(&(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow, 2)))) {
			case int32(uint8('.')):
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Flexcon = L_CEL

				// Might or might not be locale-specific.

				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'I'
					return 1
				}()
				break
			case int32(uint8('=')):
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Flexcon = L_ECL
				*(*int32)(unsafe.Pointer((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'E'
					return 1
				}()
				break
			case int32(uint8(':')):
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Flexcon = L_CCL
				*(*int32)(unsafe.Pointer((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'C'
					return 1
				}()
				break
			default: // oops
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnow -= 2
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'p'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = c
					return 1
				}()
				break
			}

			break
		default:
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'p'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = c
				return 1
			}()
			break
		}

		break
	case L_CEL: // collating elements are easy
		if int32(c) == int32(uint8('.')) && (!((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8(']'))) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Flexcon = L_BRACK
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'X'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr('.')
				return 1
			}()
		} else {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'p'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = c
				return 1
			}()
		}
		break
	case L_ECL: // ditto equivalence classes
		if int32(c) == int32(uint8('=')) && (!((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8(']'))) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Flexcon = L_BRACK
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'X'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr('=')
				return 1
			}()
		} else {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'p'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = c
				return 1
			}()
		}
		break
	case L_CCL: // ditto character classes
		if int32(c) == int32(uint8(':')) && (!((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8(']'))) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Flexcon = L_BRACK
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'X'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr(':')
				return 1
			}()
		} else {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'p'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = c
				return 1
			}()
		}
		break
	default:

		break
	}

	// That got rid of everything except EREs and AREs.

	// Deal with EREs and AREs, except for backslashes.

	switch int32(c) {
	case int32(uint8('|')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '|'
			return 1
		}()
		break
	case int32(uint8('*')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_ADVF != 0 && (!((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8('?'))) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '*'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
				return 1
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '*'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
			return 1
		}()
		break
	case int32(uint8('+')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_ADVF != 0 && (!((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8('?'))) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '+'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
				return 1
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '+'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
			return 1
		}()
		break
	case int32(uint8('?')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_ADVF != 0 && (!((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8('?'))) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '?'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
				return 1
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '?'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
			return 1
		}()
		break
	case int32(uint8('{')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_EXPANDED != 0 {
			skip(tls, v)
		}
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop || !(XTcl_UniCharIsDigit(tls, int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow)))) != 0) {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UBRACES
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNSPEC
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'p'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = c
				return 1
			}()
		} else {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UBOUNDS
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Flexcon = L_EBND
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '{'
				return 1
			}()
		}

		break
	case int32(uint8('(')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_ADVF != 0 && (!((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8('?'))) {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
			switch int32(*(*Chr)(unsafe.Pointer(libc.PostIncUintptr(&(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow, 2)))) {
			case int32(uint8(':')):
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = '('
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
					return 1
				}()
				break
				fallthrough
			case int32(uint8('#')):
				for !((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnow >= (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnow))) != int32(uint8(')')) {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnow += 2
				}
				if !((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnow >= (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fstop) {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnow += 2
				}

				return next(tls, v)
				break
				fallthrough
			case int32(uint8('=')):
				*(*int32)(unsafe.Pointer((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOOKAHEAD
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'L'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
					return 1
				}()
				break
				fallthrough
			case int32(uint8('!')):
				*(*int32)(unsafe.Pointer((*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOOKAHEAD
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'L'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
					return 1
				}()
				break
				fallthrough
			default:
				return func() int32 {
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Fnexttype = 'e'
					(*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr = func() int32 {
						if (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr != 0 {
							return (*struct {
								Fre          uintptr
								Fnow         uintptr
								Fstop        uintptr
								Fsavenow     uintptr
								Fsavestop    uintptr
								Ferr         int32
								Fcflags      int32
								Flasttype    int32
								Fnexttype    int32
								Fnextvalue   Chr
								F__ccgo_pad1 [2]byte
								Flexcon      int32
								Fnsubexp     int32
								F__ccgo_pad2 [4]byte
								Fsubs        uintptr
								Fnsubs       Size_t
								Fsub10       [10]uintptr
								Fnfa         uintptr
								Fcm          uintptr
								Fnlcolor     Color
								F__ccgo_pad3 [6]byte
								Fwordchrs    uintptr
								Ftree        uintptr
								Ftreechain   uintptr
								Ftreefree    uintptr
								Fntree       int32
								F__ccgo_pad4 [4]byte
								Fcv          uintptr
								Fcv2         uintptr
								Flacons      uintptr
								Fnlacons     int32
								F__ccgo_pad5 [4]byte
								Fspaceused   Size_t
							})(unsafe.Pointer(v)).Ferr
						}
						return REG_BADRPT
					}()
					return 0
				}()
				break
			}

		}
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_NOSUB != 0 {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '('
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
				return 1
			}() // all parens non-capturing
		} else {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '('
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
				return 1
			}()
		}
		break
	case int32(uint8(')')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flasttype == '(' {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNSPEC
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = ')'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	case int32(uint8('[')):
		if (int64((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop)-int64((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))/2 >= int64(6) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(0)*2))) == int32(uint8('[')) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(1)*2))) == int32(uint8(':')) && (int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(2)*2))) == int32(uint8('<')) || int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(2)*2))) == int32(uint8('>'))) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(3)*2))) == int32(uint8(':')) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(4)*2))) == int32(uint8(']')) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(5)*2))) == int32(uint8(']')) {
			c = *(*Chr)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow + uintptr(2)*2))
			*(*uintptr)(unsafe.Pointer(v + 8)) += uintptr(6) * 2
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = func() int32 {
					if int32(c) == int32(uint8('<')) {
						return '<'
					}
					return '>'
				}()
				return 1
			}()
		}
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flexcon = L_BRACK
		if !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8('^')) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '['
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
				return 1
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '['
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
			return 1
		}()
		break
	case int32(uint8('.')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '.'
			return 1
		}()
		break
	case int32(uint8('^')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '^'
			return 1
		}()
		break
	case int32(uint8('$')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '$'
			return 1
		}()
		break
	case int32(uint8('\\')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EESCAPE
				}()
				return 0
			}()
		}
		break
	default: // ordinary character
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	}

	// ERE/ARE backslash handling; backslash already eaten.

	if !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_ADVF != 0) { // only AREs have non-trivial escapes
		if XTcl_UniCharIsAlnum(tls, int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow)))) != 0 {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UBSALNUM
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNSPEC
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = *(*Chr)(unsafe.Pointer(libc.PostIncUintptr(&(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow, 2)))
			return 1
		}()
	}
	lexescape(tls, v)
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr != 0 {
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_EESCAPE
			}()
			return 0
		}()
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype == 'C' { // fudge at lexical level
		switch int32((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnextvalue) {
		case 'd':
			lexnest(tls, v, uintptr(unsafe.Pointer(&backd)), uintptr(unsafe.Pointer(&backd))+uintptr(uint64(unsafe.Sizeof(backd))/uint64(unsafe.Sizeof(Chr(0))))*2)
			break
			fallthrough
		case 'D':
			lexnest(tls, v, uintptr(unsafe.Pointer(&backD)), uintptr(unsafe.Pointer(&backD))+uintptr(uint64(unsafe.Sizeof(backD))/uint64(unsafe.Sizeof(Chr(0))))*2)
			break
			fallthrough
		case 's':
			lexnest(tls, v, uintptr(unsafe.Pointer(&backs)), uintptr(unsafe.Pointer(&backs))+uintptr(uint64(unsafe.Sizeof(backs))/uint64(unsafe.Sizeof(Chr(0))))*2)
			break
			fallthrough
		case 'S':
			lexnest(tls, v, uintptr(unsafe.Pointer(&backS)), uintptr(unsafe.Pointer(&backS))+uintptr(uint64(unsafe.Sizeof(backS))/uint64(unsafe.Sizeof(Chr(0))))*2)
			break
			fallthrough
		case 'w':
			lexnest(tls, v, uintptr(unsafe.Pointer(&backw)), uintptr(unsafe.Pointer(&backw))+uintptr(uint64(unsafe.Sizeof(backw))/uint64(unsafe.Sizeof(Chr(0))))*2)
			break
			fallthrough
		case 'W':
			lexnest(tls, v, uintptr(unsafe.Pointer(&backW)), uintptr(unsafe.Pointer(&backW))+uintptr(uint64(unsafe.Sizeof(backW))/uint64(unsafe.Sizeof(Chr(0))))*2)
			break
			fallthrough
		default:

			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_ASSERT
				}()
				return 0
			}()
			break
		}
		// lexnest done, back up and try again
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flasttype
		return next(tls, v)
	}

	// Otherwise, lexescape has already done the work.

	return libc.BoolInt32(!((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr != 0))
}

//
//  - lexescape - parse an ARE backslash escape (backslash already eaten)
//  * Note slightly nonstandard use of the CCLASS type code.
//  ^ static int lexescape(struct vars *);
//
func lexescape(tls *libc.TLS, v uintptr) int32 { /* regc_lex.c:754:1: */
	var c Chr
	var i int32
	var save uintptr

	c = *(*Chr)(unsafe.Pointer(libc.PostIncUintptr(&(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow, 2)))
	if !(XTcl_UniCharIsAlnum(tls, int32(c)) != 0) {
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
	}

	*(*int32)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
	switch int32(c) {
	case int32(uint8('a')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = chrnamed(tls, v, uintptr(unsafe.Pointer(&alert)), uintptr(unsafe.Pointer(&alert))+uintptr(uint64(unsafe.Sizeof(alert))/uint64(unsafe.Sizeof(Chr(0))))*2, int32(uint8('\007')))
			return 1
		}()
		break
	case int32(uint8('A')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'A'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
			return 1
		}()
		break
	case int32(uint8('b')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(uint8('\b'))
			return 1
		}()
		break
	case int32(uint8('B')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(uint8('\\'))
			return 1
		}()
		break
	case int32(uint8('c')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNPORT
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EESCAPE
				}()
				return 0
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(int32(*(*Chr)(unsafe.Pointer(libc.PostIncUintptr(&(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow, 2)))) & 037)
			return 1
		}()
		break
	case int32(uint8('d')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'C'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr('d')
			return 1
		}()
		break
	case int32(uint8('D')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'C'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr('D')
			return 1
		}()
		break
	case int32(uint8('e')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNPORT
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = chrnamed(tls, v, uintptr(unsafe.Pointer(&esc)), uintptr(unsafe.Pointer(&esc))+uintptr(uint64(unsafe.Sizeof(esc))/uint64(unsafe.Sizeof(Chr(0))))*2, int32(uint8('\033')))
			return 1
		}()
		break
	case int32(uint8('f')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(uint8('\f'))
			return 1
		}()
		break
	case int32(uint8('m')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '<'
			return 1
		}()
		break
	case int32(uint8('M')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '>'
			return 1
		}()
		break
	case int32(uint8('n')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(uint8('\n'))
			return 1
		}()
		break
	case int32(uint8('r')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(uint8('\r'))
			return 1
		}()
		break
	case int32(uint8('s')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'C'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr('s')
			return 1
		}()
		break
	case int32(uint8('S')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'C'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr('S')
			return 1
		}()
		break
	case int32(uint8('t')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(uint8('\t'))
			return 1
		}()
		break
	case int32(uint8('u')):
		c = Chr(Uchr(lexdigits(tls, v, 16, 1, 4)))
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EESCAPE
				}()
				return 0
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	case int32(uint8('U')):
		i = lexdigits(tls, v, 16, 1, 8)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EESCAPE
				}()
				return 0
			}()
		}
		if i > 0xFFFF {
			// TODO: output a Surrogate pair
			i = 0xFFFD
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(Uchr(i))
			return 1
		}()
		break
	case int32(uint8('v')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(uint8('\v'))
			return 1
		}()
		break
	case int32(uint8('w')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'C'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr('w')
			return 1
		}()
		break
	case int32(uint8('W')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'C'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr('W')
			return 1
		}()
		break
	case int32(uint8('x')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNPORT
		c = Chr(Uchr(lexdigits(tls, v, 16, 1, 2)))
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EESCAPE
				}()
				return 0
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	case int32(uint8('y')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'w'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
			return 1
		}()
		break
	case int32(uint8('Y')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'W'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
			return 1
		}()
		break
	case int32(uint8('Z')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'Z'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
			return 1
		}()
		break
	case int32(uint8('1')):
		fallthrough
	case int32(uint8('2')):
		fallthrough
	case int32(uint8('3')):
		fallthrough
	case int32(uint8('4')):
		fallthrough
	case int32(uint8('5')):
		fallthrough
	case int32(uint8('6')):
		fallthrough
	case int32(uint8('7')):
		fallthrough
	case int32(uint8('8')):
		fallthrough
	case int32(uint8('9')):
		save = (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow -= 2 // put first digit back
		c = Chr(Uchr(lexdigits(tls, v, 10, 1, 255))) // REs >255 long outside spec
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EESCAPE
				}()
				return 0
			}()
		}

		// Ugly heuristic (first test is "exactly 1 digit?")

		if (int64((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow)-int64(save))/2 == int64(0) || int32(c) > 0 && int32(c) <= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnsubexp {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UBACKREF
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'b'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = c
				return 1
			}()
		}

		// Oops, doesn't look like it's a backref after all...

		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow = save
		fallthrough

		// FALLTHRU

	case int32(uint8('0')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNPORT
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow -= 2 // put first digit back
		c = Chr(Uchr(lexdigits(tls, v, 8, 1, 3)))
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_EESCAPE
				}()
				return 0
			}()
		}
		if int32(c) > 0xFF {
			// out of range, so we handled one digit too much
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow -= 2
			c >>= 3
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	default:

		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_EESCAPE
			}()
			return 0
		}() // unknown alphabetic escape
		break
	}

	return int32(0)
}

var alert = [5]Chr{
	Chr(uint8('a')), Chr(uint8('l')), Chr(uint8('e')), Chr(uint8('r')), Chr(uint8('t')),
} /* regc_lex.c:759:22 */
var esc = [3]Chr{
	Chr(uint8('E')), Chr(uint8('S')), Chr(uint8('C')),
} /* regc_lex.c:762:22 */

//
//  - lexdigits - slurp up digits and return chr value
//  ^ static int lexdigits(struct vars *, int, int, int);
//
func lexdigits(tls *libc.TLS, v uintptr, base int32, minlen int32, maxlen int32) int32 { /* regc_lex.c:937:1: */
	var n int32
	var len int32
	var c Chr
	var d int32
	var ub Uchr = Uchr(base)

	n = 0
	for len = 0; len < maxlen && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow >= (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop); len++ {
		if n > 0x10FFF {
			// Stop when continuing would otherwise overflow
			break
		}
		c = *(*Chr)(unsafe.Pointer(libc.PostIncUintptr(&(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow, 2)))
		switch int32(c) {
		case int32(uint8('0')):
			fallthrough
		case int32(uint8('1')):
			fallthrough
		case int32(uint8('2')):
			fallthrough
		case int32(uint8('3')):
			fallthrough
		case int32(uint8('4')):
			fallthrough
		case int32(uint8('5')):
			fallthrough
		case int32(uint8('6')):
			fallthrough
		case int32(uint8('7')):
			fallthrough
		case int32(uint8('8')):
			fallthrough
		case int32(uint8('9')):
			d = int32(c) - '0'
			break
		case int32(uint8('a')):
			fallthrough
		case int32(uint8('A')):
			d = 10
			break
		case int32(uint8('b')):
			fallthrough
		case int32(uint8('B')):
			d = 11
			break
		case int32(uint8('c')):
			fallthrough
		case int32(uint8('C')):
			d = 12
			break
		case int32(uint8('d')):
			fallthrough
		case int32(uint8('D')):
			d = 13
			break
		case int32(uint8('e')):
			fallthrough
		case int32(uint8('E')):
			d = 14
			break
		case int32(uint8('f')):
			fallthrough
		case int32(uint8('F')):
			d = 15
			break
		default:
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow -= 2 // oops, not a digit at all
			d = -1
			break
		}

		if d >= base { // not a plausible digit
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow -= 2
			d = -1
		}
		if d < 0 {
			break // NOTE BREAK OUT
		}
		n = int32(Uchr(n)*ub + Uchr(d))
	}
	if len < minlen {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_EESCAPE
		}()
	}

	return n
}

//
//  - brenext - get next BRE token
//  * This is much like EREs except for all the stupid backslashes and the
//  * context-dependency of some things.
//  ^ static int brenext(struct vars *, pchr);
//
func brenext(tls *libc.TLS, v uintptr, pc Pchr) int32 { /* regc_lex.c:997:1: */
	var c Chr = Chr(pc)

	switch int32(c) {
	case int32(uint8('*')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flasttype == 'n' || (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flasttype == '(' || (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flasttype == '^' {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = 'p'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = c
				return 1
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '*'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
			return 1
		}()
		break
	case int32(uint8('[')):
		if (int64((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop)-int64((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))/2 >= int64(6) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(0)*2))) == int32(uint8('[')) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(1)*2))) == int32(uint8(':')) && (int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(2)*2))) == int32(uint8('<')) || int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(2)*2))) == int32(uint8('>'))) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(3)*2))) == int32(uint8(':')) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(4)*2))) == int32(uint8(']')) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(5)*2))) == int32(uint8(']')) {
			c = *(*Chr)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow + uintptr(2)*2))
			*(*uintptr)(unsafe.Pointer(v + 8)) += uintptr(6) * 2
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = func() int32 {
					if int32(c) == int32(uint8('<')) {
						return '<'
					}
					return '>'
				}()
				return 1
			}()
		}
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flexcon = L_BRACK
		if !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8('^')) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '['
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnextvalue = Chr(0)
				return 1
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '['
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
			return 1
		}()
		break
	case int32(uint8('.')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '.'
			return 1
		}()
		break
	case int32(uint8('^')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flasttype == 'n' {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '^'
				return 1
			}()
		}
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flasttype == '(' {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNSPEC
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '^'
				return 1
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	case int32(uint8('$')):
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcflags&REG_EXPANDED != 0 {
			skip(tls, v)
		}
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop {
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '$'
				return 1
			}()
		}
		if (int64((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop)-int64((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))/2 >= int64(2) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) == int32(uint8('\\')) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow + uintptr(1)*2))) == int32(uint8(')')) {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNSPEC
			return func() int32 {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Fnexttype = '$'
				return 1
			}()
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	case int32(uint8('\\')):
		break // see below
	default:
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	}

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow >= (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fstop {
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_EESCAPE
			}()
			return 0
		}()
	}

	c = *(*Chr)(unsafe.Pointer(libc.PostIncUintptr(&(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow, 2)))
	switch int32(c) {
	case int32(uint8('{')):
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Flexcon = L_BBND
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UBOUNDS
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '{'
			return 1
		}()
		break
	case int32(uint8('(')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '('
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(1)
			return 1
		}()
		break
	case int32(uint8(')')):
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = ')'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	case int32(uint8('<')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '<'
			return 1
		}()
		break
	case int32(uint8('>')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = '>'
			return 1
		}()
		break
	case int32(uint8('1')):
		fallthrough
	case int32(uint8('2')):
		fallthrough
	case int32(uint8('3')):
		fallthrough
	case int32(uint8('4')):
		fallthrough
	case int32(uint8('5')):
		fallthrough
	case int32(uint8('6')):
		fallthrough
	case int32(uint8('7')):
		fallthrough
	case int32(uint8('8')):
		fallthrough
	case int32(uint8('9')):
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UBACKREF
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'b'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = Chr(int32(c) - '0')
			return 1
		}()
		break
	default:
		if XTcl_UniCharIsAlnum(tls, int32(c)) != 0 {
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UBSALNUM
			*(*int32)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fre + 16)) |= REG_UUNSPEC
		}
		return func() int32 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnexttype = 'p'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnextvalue = c
			return 1
		}()
		break
	}

	return int32(0)
}

//
//  - skip - skip white space and comments in expanded form
//  ^ static void skip(struct vars *);
//
func skip(tls *libc.TLS, v uintptr) { /* regc_lex.c:1112:1: */
	var start uintptr = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow

	for {
		for !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && XTcl_UniCharIsSpace(tls, int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow)))) != 0 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
		}
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop || int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) != int32(uint8('#')) {
			break // NOTE BREAK OUT
		}

		for !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow >= (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fstop) && int32(*(*Chr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnow))) != int32(uint8('\n')) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Fnow += 2
		}

		// Leave the newline to be picked up by the iscspace loop.
	}

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnow != start {
		*(*int32)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fre + 16)) |= REG_UNONPOSIX
	}
}

//
//  - newline - return the chr for a newline
//  * This helps confine use of CHR to this source file.
//  ^ static chr newline(NOPARMS);
//
func newline(tls *libc.TLS) Chr { /* regc_lex.c:1147:1: */
	return Chr(uint8('\n'))
}

//
//  - chrnamed - return the chr known by a given (chr string) name
//  * The code is a bit clumsy, but this routine gets only such specialized
//  * use that it hardly matters.
//  ^ static chr chrnamed(struct vars *, const chr *, const chr *, pchr);
//
func chrnamed(tls *libc.TLS, v uintptr, startp uintptr, endp uintptr, lastresort Pchr) Chr { /* regc_lex.c:1159:1: */
	var c Celt
	var errsave int32
	var e int32
	var cv uintptr

	errsave = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr = 0
	c = element(tls, v, startp, endp)
	e = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr = errsave

	if e != 0 {
		return Chr(lastresort)
	}

	cv = range1(tls, v, c, c, 0)
	if (*Cvec)(unsafe.Pointer(cv)).Fnchrs == 0 {
		return Chr(lastresort)
	}
	return *(*Chr)(unsafe.Pointer((*Cvec)(unsafe.Pointer(cv)).Fchrs))
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// colorings of characters
// This file is #included by regcomp.c.
//
// Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
//
// Development of this software was funded, in part, by Cray Research Inc.,
// UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
// Corporation, none of whom are responsible for the results. The author
// thanks all of them.
//
// Redistribution and use in source and binary forms -- with or without
// modification -- are permitted for any purpose, provided that
// redistributions in source form retain this entire copyright notice and
// indicate the origin and nature of any modifications.
//
// I'd appreciate being given credit for this package in the documentation of
// software which uses it, but that is not a requirement.
//
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Note that there are some incestuous relationships between this code and NFA
// arc maintenance, which perhaps ought to be cleaned up sometime.

//
//  - initcm - set up new colormap
//  ^ static void initcm(struct vars *, struct colormap *);
//
func initcm(tls *libc.TLS, v uintptr, cm uintptr) { /* regc_color.c:43:1: */
	var i int32
	var j int32
	var t uintptr
	var nextt uintptr
	var cd uintptr

	(*Colormap)(unsafe.Pointer(cm)).Fmagic = CMMAGIC
	(*Colormap)(unsafe.Pointer(cm)).Fv = v

	(*Colormap)(unsafe.Pointer(cm)).Fncds = uint64(10)
	(*Colormap)(unsafe.Pointer(cm)).Fcd = cm + 48 /* &.cdspace */
	(*Colormap)(unsafe.Pointer(cm)).Fmax = uint64(0)
	(*Colormap)(unsafe.Pointer(cm)).Ffree = int16(0)

	cd = (*Colormap)(unsafe.Pointer(cm)).Fcd // cm->cd[WHITE]
	(*Colordesc)(unsafe.Pointer(cd)).Fsub = int16(-1)
	(*Colordesc)(unsafe.Pointer(cd)).Farcs = uintptr(0)
	(*Colordesc)(unsafe.Pointer(cd)).Fflags = 0
	(*Colordesc)(unsafe.Pointer(cd)).Fnchrs = Uchr(CHR_MAX - CHR_MIN + 1)

	// Upper levels of tree.

	t = cm + 368
	j = (CHRBITS+BYTBITS-1)/BYTBITS - 1
__1:
	if !(j > 0) {
		goto __3
	}
	{
		nextt = t + uintptr(1)*2048
		for i = int32(1)<<BYTBITS - 1; i >= 0; i-- {
			*(*uintptr)(unsafe.Pointer(t + uintptr(i)*8)) = nextt
		}

	}
	goto __2
__2:
	t = nextt
	j--
	goto __1
	goto __3
__3:
	;

	// Bottom level is solid white.

	t = cm + 368 + 1*2048
	for i = int32(1)<<BYTBITS - 1; i >= 0; i-- {
		*(*Color)(unsafe.Pointer(t + uintptr(i)*2)) = int16(WHITE)
	}
	(*Colordesc)(unsafe.Pointer(cd)).Fblock = t
}

//
//  - freecm - free dynamically-allocated things in a colormap
//  ^ static void freecm(struct colormap *);
//
func freecm(tls *libc.TLS, cm uintptr) { /* regc_color.c:94:1: */
	var i Size_t
	var cb uintptr

	(*Colormap)(unsafe.Pointer(cm)).Fmagic = 0
	if (CHRBITS+BYTBITS-1)/BYTBITS > 1 {
		cmtreefree(tls, cm, cm+368, 0)
	}
	for i = uint64(1); i <= (*Colormap)(unsafe.Pointer(cm)).Fmax; i++ { // skip WHITE
		if !((*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd+uintptr(i)*32)).Fflags&FREECOL != 0) {
			cb = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(i)*32)).Fblock
			if cb != uintptr(0) {
				XTclpFree(tls, cb)
			}
		}
	}
	if (*Colormap)(unsafe.Pointer(cm)).Fcd != cm+48 {
		XTclpFree(tls, (*Colormap)(unsafe.Pointer(cm)).Fcd)
	}
}

//
//  - cmtreefree - free a non-terminal part of a colormap tree
//  ^ static void cmtreefree(struct colormap *, union tree *, int);
//
func cmtreefree(tls *libc.TLS, cm uintptr, tree uintptr, level int32) { /* regc_color.c:122:1: */
	var i int32
	var t uintptr
	var fillt uintptr = cm + 368 + uintptr(level+1)*2048
	var cb uintptr

	// this level has pointers
	for i = int32(1)<<BYTBITS - 1; i >= 0; i-- {
		t = *(*uintptr)(unsafe.Pointer(tree + uintptr(i)*8))

		if t != fillt {
			if level < (CHRBITS+BYTBITS-1)/BYTBITS-2 { // more pointer blocks below
				cmtreefree(tls, cm, t, level+1)
				XTclpFree(tls, t)
			} else { // color block below
				cb = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(*(*Color)(unsafe.Pointer(t)))*32)).Fblock
				if t != cb { // not a solid block
					XTclpFree(tls, t)
				}
			}
		}
	}
}

//
//  - setcolor - set the color of a character in a colormap
//  ^ static color setcolor(struct colormap *, pchr, pcolor);
//
func setcolor(tls *libc.TLS, cm uintptr, c Pchr, co Pcolor) Color { /* regc_color.c:155:1: */
	var uc Uchr = Uchr(c)
	var shift int32
	var level int32
	var b int32
	var bottom int32
	var t uintptr
	var newt uintptr
	var fillt uintptr
	var lastt uintptr
	var cb uintptr
	var prev Color

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 || co == -1 {
		return int16(-1)
	}

	t = cm + 368 /* &.tree */
	level = 0
	shift = BYTBITS * ((CHRBITS+BYTBITS-1)/BYTBITS - 1)
__1:
	if !(shift > 0) {
		goto __3
	}
	{
		b = int32(uc >> shift & Uchr(int32(1)<<BYTBITS-1))
		lastt = t
		t = *(*uintptr)(unsafe.Pointer(lastt + uintptr(b)*8))

		fillt = cm + 368 + uintptr(level+1)*2048
		if shift <= BYTBITS {
			bottom = 1
		} else {
			bottom = 0
		}
		if bottom != 0 {
			cb = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(*(*Color)(unsafe.Pointer(t)))*32)).Fblock
		} else {
			cb = fillt
		}
		if t == fillt || t == cb { // must allocate a new block
			newt = XTclpAlloc(tls, func() uint32 {
				if bottom != 0 {
					return uint32(unsafe.Sizeof(Colors{}))
				}
				return uint32(unsafe.Sizeof(Ptrs{}))
			}())
			if newt == uintptr(0) {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr
					}
					return REG_ESPACE
				}()
				return int16(-1)
			}
			if bottom != 0 {
				libc.Xmemcpy(tls, newt, t, uint64(int32(1)<<BYTBITS)*uint64(unsafe.Sizeof(Color(0))))
			} else {
				libc.Xmemcpy(tls, newt, t, uint64(int32(1)<<BYTBITS)*uint64(unsafe.Sizeof(uintptr(0))))
			}
			t = newt
			*(*uintptr)(unsafe.Pointer(lastt + uintptr(b)*8)) = t
		}

	}
	goto __2
__2:
	level++
	shift = shift - BYTBITS
	goto __1
	goto __3
__3:
	;

	b = int32(uc & Uchr(int32(1)<<BYTBITS-1))
	prev = *(*Color)(unsafe.Pointer(t + uintptr(b)*2))
	*(*Color)(unsafe.Pointer(t + uintptr(b)*2)) = Color(co)
	return prev
}

//
//  - maxcolor - report largest color number in use
//  ^ static color maxcolor(struct colormap *);
//
func maxcolor(tls *libc.TLS, cm uintptr) Color { /* regc_color.c:214:1: */
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 {
		return int16(-1)
	}

	return Color((*Colormap)(unsafe.Pointer(cm)).Fmax)
}

//
//  - newcolor - find a new color (must be subject of setcolor at once)
//  * Beware: may relocate the colordescs.
//  ^ static color newcolor(struct colormap *);
//
func newcolor(tls *libc.TLS, cm uintptr) Color { /* regc_color.c:230:1: */
	var cd uintptr
	var n Size_t

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 {
		return int16(-1)
	}

	if int32((*Colormap)(unsafe.Pointer(cm)).Ffree) != 0 {

		cd = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr((*Colormap)(unsafe.Pointer(cm)).Ffree)*32

		(*Colormap)(unsafe.Pointer(cm)).Ffree = (*Colordesc)(unsafe.Pointer(cd)).Fsub
	} else if (*Colormap)(unsafe.Pointer(cm)).Fmax < (*Colormap)(unsafe.Pointer(cm)).Fncds-uint64(1) {
		(*Colormap)(unsafe.Pointer(cm)).Fmax++
		cd = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr((*Colormap)(unsafe.Pointer(cm)).Fmax)*32
	} else {
		var newCd uintptr

		// Oops, must allocate more.

		if (*Colormap)(unsafe.Pointer(cm)).Fmax == uint64(0x7fff) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr
				}
				return REG_ECOLORS
			}()
			return int16(-1) // too many colors
		}
		n = (*Colormap)(unsafe.Pointer(cm)).Fncds * uint64(2)
		if n > uint64(0x7fff+1) {
			n = uint64(0x7fff + 1)
		}
		if (*Colormap)(unsafe.Pointer(cm)).Fcd == cm+48 {
			newCd = XTclpAlloc(tls, uint32(n*Size_t(unsafe.Sizeof(Colordesc{}))))
			if newCd != uintptr(0) {
				libc.Xmemcpy(tls, newCd, cm+48,
					(*Colormap)(unsafe.Pointer(cm)).Fncds*Size_t(unsafe.Sizeof(Colordesc{})))
			}
		} else {
			newCd = XTclpRealloc(tls, (*Colormap)(unsafe.Pointer(cm)).Fcd, uint32(n*Size_t(unsafe.Sizeof(Colordesc{}))))
		}
		if newCd == uintptr(0) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr
				}
				return REG_ESPACE
			}()
			return int16(-1)
		}
		(*Colormap)(unsafe.Pointer(cm)).Fcd = newCd
		(*Colormap)(unsafe.Pointer(cm)).Fncds = n

		(*Colormap)(unsafe.Pointer(cm)).Fmax++
		cd = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr((*Colormap)(unsafe.Pointer(cm)).Fmax)*32
	}

	(*Colordesc)(unsafe.Pointer(cd)).Fnchrs = Uchr(0)
	(*Colordesc)(unsafe.Pointer(cd)).Fsub = int16(-1)
	(*Colordesc)(unsafe.Pointer(cd)).Farcs = uintptr(0)
	(*Colordesc)(unsafe.Pointer(cd)).Fflags = 0
	(*Colordesc)(unsafe.Pointer(cd)).Fblock = uintptr(0)

	return Color((int64(cd) - int64((*Colormap)(unsafe.Pointer(cm)).Fcd)) / 32)
}

//
//  - freecolor - free a color (must have no arcs or subcolor)
//  ^ static void freecolor(struct colormap *, pcolor);
//
func freecolor(tls *libc.TLS, cm uintptr, co Pcolor) { /* regc_color.c:300:1: */
	var cd uintptr = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(co)*32
	var pco Color
	var nco Color // for freelist scan

	if co == WHITE {
		return
	}

	(*Colordesc)(unsafe.Pointer(cd)).Fflags = FREECOL
	if (*Colordesc)(unsafe.Pointer(cd)).Fblock != uintptr(0) {
		XTclpFree(tls, (*Colordesc)(unsafe.Pointer(cd)).Fblock)
		(*Colordesc)(unsafe.Pointer(cd)).Fblock = uintptr(0) // just paranoia
	}

	if Size_t(co) == (*Colormap)(unsafe.Pointer(cm)).Fmax {
		for (*Colormap)(unsafe.Pointer(cm)).Fmax > uint64(WHITE) && (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd+uintptr((*Colormap)(unsafe.Pointer(cm)).Fmax)*32)).Fflags&FREECOL != 0 {
			(*Colormap)(unsafe.Pointer(cm)).Fmax--
		}

		for Size_t((*Colormap)(unsafe.Pointer(cm)).Ffree) > (*Colormap)(unsafe.Pointer(cm)).Fmax {
			(*Colormap)(unsafe.Pointer(cm)).Ffree = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr((*Colormap)(unsafe.Pointer(cm)).Ffree)*32)).Fsub
		}
		if int32((*Colormap)(unsafe.Pointer(cm)).Ffree) > 0 {

			pco = (*Colormap)(unsafe.Pointer(cm)).Ffree
			nco = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(pco)*32)).Fsub
			for int32(nco) > 0 {
				if Size_t(nco) > (*Colormap)(unsafe.Pointer(cm)).Fmax {
					// Take this one out of freelist.

					nco = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(nco)*32)).Fsub
					(*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(pco)*32)).Fsub = nco
				} else {

					pco = nco
					nco = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(pco)*32)).Fsub
				}
			}
		}
	} else {
		(*Colordesc)(unsafe.Pointer(cd)).Fsub = (*Colormap)(unsafe.Pointer(cm)).Ffree
		(*Colormap)(unsafe.Pointer(cm)).Ffree = Color((int64(cd) - int64((*Colormap)(unsafe.Pointer(cm)).Fcd)) / 32)
	}
}

//
//  - pseudocolor - allocate a false color, to be managed by other means
//  ^ static color pseudocolor(struct colormap *);
//
func pseudocolor(tls *libc.TLS, cm uintptr) Color { /* regc_color.c:359:1: */
	var co Color

	co = newcolor(tls, cm)
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 {
		return int16(-1)
	}
	(*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(co)*32)).Fnchrs = Uchr(1)
	(*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(co)*32)).Fflags = PSEUDO
	return co
}

//
//  - subcolor - allocate a new subcolor (if necessary) to this chr
//  ^ static color subcolor(struct colormap *, pchr c);
//
func subcolor(tls *libc.TLS, cm uintptr, c Pchr) Color { /* regc_color.c:378:1: */
	var co Color  // current color of c
	var sco Color // new subcolor

	co = *(*Color)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cm + 368 + uintptr(c>>BYTBITS&(int32(1)<<BYTBITS-1))*8)) + uintptr(c&(int32(1)<<BYTBITS-1))*2))
	sco = newsub(tls, cm, int32(co))
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 {
		return int16(-1)
	}

	if int32(co) == int32(sco) { // already in an open subcolor
		return co // rest is redundant
	}
	(*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd+uintptr(co)*32)).Fnchrs--
	(*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd+uintptr(sco)*32)).Fnchrs++
	setcolor(tls, cm, c, int32(sco))
	return sco
}

//
//  - newsub - allocate a new subcolor (if necessary) for a color
//  ^ static color newsub(struct colormap *, pcolor);
//
func newsub(tls *libc.TLS, cm uintptr, co Pcolor) Color { /* regc_color.c:406:1: */
	var sco Color // new subcolor

	sco = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(co)*32)).Fsub
	if int32(sco) == -1 { // color has no open subcolor
		if (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd+uintptr(co)*32)).Fnchrs == Uchr(1) { // optimization
			return Color(co)
		}
		sco = newcolor(tls, cm) // must create subcolor
		if int32(sco) == -1 {

			return int16(-1)
		}
		(*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(co)*32)).Fsub = sco
		(*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(sco)*32)).Fsub = sco // open subcolor points to self
	}

	return sco
}

//
//  - subrange - allocate new subcolors to this range of chrs, fill in arcs
//  ^ static void subrange(struct vars *, pchr, pchr, struct state *,
//  ^ 	struct state *);
//
func subrange(tls *libc.TLS, v uintptr, from Pchr, to Pchr, lp uintptr, rp uintptr) { /* regc_color.c:436:1: */
	var uf Uchr
	var i int32

	// First, align "from" on a tree-block boundary

	uf = Uchr(from)
	i = int32((uf+Uchr(int32(1)<<BYTBITS)-Uchr(1))&libc.Uint32(libc.Uint32FromInt32(libc.CplInt32(int32(1)<<BYTBITS-1))) - uf)
__1:
	if !(from <= to && i > 0) {
		goto __3
	}
	{
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'p', int32(subcolor(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcm, from)), lp, rp)

	}
	goto __2
__2:
	i--
	from++
	goto __1
	goto __3
__3:
	;
	if from > to { // didn't reach a boundary
		return
	}

	// Deal with whole blocks.

	for ; to-from >= int32(1)<<BYTBITS; from = from + int32(1)<<BYTBITS {
		subblock(tls, v, from, lp, rp)
	}

	// Clean up any remaining partial table.

	for ; from <= to; from++ {
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'p', int32(subcolor(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcm, from)), lp, rp)
	}
}

//
//  - subblock - allocate new subcolors for one tree block of chrs, fill in arcs
//  ^ static void subblock(struct vars *, pchr, struct state *, struct state *);
//
func subblock(tls *libc.TLS, v uintptr, start Pchr, lp uintptr, rp uintptr) { /* regc_color.c:483:1: */
	var uc Uchr = Uchr(start)
	var cm uintptr = (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcm
	var shift int32
	var level int32
	var i int32
	var b int32
	var t uintptr
	var cb uintptr
	var fillt uintptr
	var lastt uintptr
	var previ int32
	var ndone int32
	var co Color
	var sco Color

	// Find its color block, making new pointer blocks as needed.

	t = cm + 368 /* &.tree */
	fillt = uintptr(0)
	level = 0
	shift = BYTBITS * ((CHRBITS+BYTBITS-1)/BYTBITS - 1)
__1:
	if !(shift > 0) {
		goto __3
	}
	{
		b = int32(uc >> shift & Uchr(int32(1)<<BYTBITS-1))
		lastt = t
		t = *(*uintptr)(unsafe.Pointer(lastt + uintptr(b)*8))

		fillt = cm + 368 + uintptr(level+1)*2048
		if t == fillt && shift > BYTBITS { // need new ptr block
			t = XTclpAlloc(tls, uint32(unsafe.Sizeof(Ptrs{})))
			if t == uintptr(0) {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr
					}
					return REG_ESPACE
				}()
				return
			}
			libc.Xmemcpy(tls, t, fillt, uint64(int32(1)<<BYTBITS)*uint64(unsafe.Sizeof(uintptr(0))))
			*(*uintptr)(unsafe.Pointer(lastt + uintptr(b)*8)) = t
		}

	}
	goto __2
__2:
	level++
	shift = shift - BYTBITS
	goto __1
	goto __3
__3:
	;

	// Special cases: fill block or solid block.
	co = *(*Color)(unsafe.Pointer(t))
	cb = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(co)*32)).Fblock
	if t == fillt || t == cb {
		// Either way, we want a subcolor solid block.

		sco = newsub(tls, cm, int32(co))
		t = (*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(sco)*32)).Fblock
		if t == uintptr(0) { // must set it up
			t = XTclpAlloc(tls, uint32(unsafe.Sizeof(Colors{})))
			if t == uintptr(0) {
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr
					}
					return REG_ESPACE
				}()
				return
			}
			for i = 0; i < int32(1)<<BYTBITS; i++ {
				*(*Color)(unsafe.Pointer(t + uintptr(i)*2)) = sco
			}
			(*Colordesc)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(sco)*32)).Fblock = t
		}

		// Find loop must have run at least once.

		*(*uintptr)(unsafe.Pointer(lastt + uintptr(b)*8)) = t
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'p', int32(sco), lp, rp)
		*(*Uchr)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(co)*32)) -= Uchr(int32(1) << BYTBITS)
		*(*Uchr)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(sco)*32)) += Uchr(int32(1) << BYTBITS)
		return
	}

	// General case, a mixed block to be altered.

	i = 0
	for i < int32(1)<<BYTBITS {
		co = *(*Color)(unsafe.Pointer(t + uintptr(i)*2))
		sco = newsub(tls, cm, int32(co))
		newarc(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnfa, 'p', int32(sco), lp, rp)
		previ = i
		for ok := true; ok; ok = i < int32(1)<<BYTBITS && int32(*(*Color)(unsafe.Pointer(t + uintptr(i)*2))) == int32(co) {
			*(*Color)(unsafe.Pointer(t + uintptr(libc.PostIncInt32(&i, 1))*2)) = sco
		}
		ndone = i - previ
		*(*Uchr)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(co)*32)) -= Uchr(ndone)
		*(*Uchr)(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(sco)*32)) += Uchr(ndone)
	}
}

//
//  - okcolors - promote subcolors to full colors
//  ^ static void okcolors(struct nfa *, struct colormap *);
//
func okcolors(tls *libc.TLS, nfa uintptr, cm uintptr) { /* regc_color.c:588:1: */
	var cd uintptr
	var end uintptr = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr((*Colormap)(unsafe.Pointer(cm)).Fmax+uint64(1))*32
	var scd uintptr
	var a uintptr
	var co Color
	var sco Color

	cd = (*Colormap)(unsafe.Pointer(cm)).Fcd
	co = int16(0)
__1:
	if !(cd < end) {
		goto __3
	}
	{
		sco = (*Colordesc)(unsafe.Pointer(cd)).Fsub
		if (*Colordesc)(unsafe.Pointer(cd)).Fflags&FREECOL != 0 || int32(sco) == -1 {
			// Has no subcolor, no further action.
		} else if int32(sco) == int32(co) {
			// Is subcolor, let parent deal with it.
		} else if (*Colordesc)(unsafe.Pointer(cd)).Fnchrs == Uchr(0) {
			// Parent empty, its arcs change color to subcolor.

			(*Colordesc)(unsafe.Pointer(cd)).Fsub = int16(-1)
			scd = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(sco)*32

			(*Colordesc)(unsafe.Pointer(scd)).Fsub = int16(-1)
			for libc.AssignUintptr(&a, (*Colordesc)(unsafe.Pointer(cd)).Farcs) != uintptr(0) {

				uncolorchain(tls, cm, a)
				(*Arc)(unsafe.Pointer(a)).Fco = sco
				colorchain(tls, cm, a)
			}
			freecolor(tls, cm, int32(co))
		} else {
			// Parent's arcs must gain parallel subcolor arcs.

			(*Colordesc)(unsafe.Pointer(cd)).Fsub = int16(-1)
			scd = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr(sco)*32

			(*Colordesc)(unsafe.Pointer(scd)).Fsub = int16(-1)
			for a = (*Colordesc)(unsafe.Pointer(cd)).Farcs; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Fcolorchain {

				newarc(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ftype, int32(sco), (*Arc)(unsafe.Pointer(a)).Ffrom, (*Arc)(unsafe.Pointer(a)).Fto)
			}
		}

	}
	goto __2
__2:
	cd += 32
	co++
	goto __1
	goto __3
__3:
}

//
//  - colorchain - add this arc to the color chain of its color
//  ^ static void colorchain(struct colormap *, struct arc *);
//
func colorchain(tls *libc.TLS, cm uintptr, a uintptr) { /* regc_color.c:649:1: */
	var cd uintptr = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr((*Arc)(unsafe.Pointer(a)).Fco)*32

	if (*Colordesc)(unsafe.Pointer(cd)).Farcs != uintptr(0) {
		(*Arc)(unsafe.Pointer((*Colordesc)(unsafe.Pointer(cd)).Farcs)).FcolorchainRev = a
	}
	(*Arc)(unsafe.Pointer(a)).Fcolorchain = (*Colordesc)(unsafe.Pointer(cd)).Farcs
	(*Arc)(unsafe.Pointer(a)).FcolorchainRev = uintptr(0)
	(*Colordesc)(unsafe.Pointer(cd)).Farcs = a
}

//
//  - uncolorchain - delete this arc from the color chain of its color
//  ^ static void uncolorchain(struct colormap *, struct arc *);
//
func uncolorchain(tls *libc.TLS, cm uintptr, a uintptr) { /* regc_color.c:668:1: */
	var cd uintptr = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr((*Arc)(unsafe.Pointer(a)).Fco)*32
	var aa uintptr = (*Arc)(unsafe.Pointer(a)).FcolorchainRev

	if aa == uintptr(0) {

		(*Colordesc)(unsafe.Pointer(cd)).Farcs = (*Arc)(unsafe.Pointer(a)).Fcolorchain
	} else {

		(*Arc)(unsafe.Pointer(aa)).Fcolorchain = (*Arc)(unsafe.Pointer(a)).Fcolorchain
	}
	if (*Arc)(unsafe.Pointer(a)).Fcolorchain != uintptr(0) {
		(*Arc)(unsafe.Pointer((*Arc)(unsafe.Pointer(a)).Fcolorchain)).FcolorchainRev = aa
	}
	(*Arc)(unsafe.Pointer(a)).Fcolorchain = uintptr(0) // paranoia
	(*Arc)(unsafe.Pointer(a)).FcolorchainRev = uintptr(0)
}

//
//  - rainbow - add arcs of all full colors (but one) between specified states
//  ^ static void rainbow(struct nfa *, struct colormap *, int, pcolor,
//  ^ 	struct state *, struct state *);
//
func rainbow(tls *libc.TLS, nfa uintptr, cm uintptr, type1 int32, but Pcolor, from uintptr, to uintptr) { /* regc_color.c:695:1: */
	var cd uintptr
	var end uintptr = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr((*Colormap)(unsafe.Pointer(cm)).Fmax+uint64(1))*32
	var co Color

	cd = (*Colormap)(unsafe.Pointer(cm)).Fcd
	co = int16(0)
__1:
	if !(cd < end && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0)) {
		goto __3
	}
	{
		if !((*Colordesc)(unsafe.Pointer(cd)).Fflags&FREECOL != 0) && int32((*Colordesc)(unsafe.Pointer(cd)).Fsub) != int32(co) && int32(co) != but &&
			!((*Colordesc)(unsafe.Pointer(cd)).Fflags&PSEUDO != 0) {
			newarc(tls, nfa, type1, int32(co), from, to)
		}

	}
	goto __2
__2:
	cd += 32
	co++
	goto __1
	goto __3
__3:
}

//
//  - colorcomplement - add arcs of complementary colors
//  * The calling sequence ought to be reconciled with cloneouts().
//  ^ static void colorcomplement(struct nfa *, struct colormap *, int,
//  ^ 	struct state *, struct state *, struct state *);
//
func colorcomplement(tls *libc.TLS, nfa uintptr, cm uintptr, type1 int32, of uintptr, from uintptr, to uintptr) { /* regc_color.c:722:1: */
	var cd uintptr
	var end uintptr = (*Colormap)(unsafe.Pointer(cm)).Fcd + uintptr((*Colormap)(unsafe.Pointer(cm)).Fmax+uint64(1))*32
	var co Color

	cd = (*Colormap)(unsafe.Pointer(cm)).Fcd
	co = int16(0)
__1:
	if !(cd < end && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Colormap)(unsafe.Pointer(cm)).Fv)).Ferr != 0)) {
		goto __3
	}
	{
		if !((*Colordesc)(unsafe.Pointer(cd)).Fflags&FREECOL != 0) && !((*Colordesc)(unsafe.Pointer(cd)).Fflags&PSEUDO != 0) {
			if findarc(tls, of, 'p', int32(co)) == uintptr(0) {
				newarc(tls, nfa, type1, int32(co), from, to)
			}
		}

	}
	goto __2
__2:
	cd += 32
	co++
	goto __1
	goto __3
__3:
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// NFA utilities.
// This file is #included by regcomp.c.
//
// Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
//
// Development of this software was funded, in part, by Cray Research Inc.,
// UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
// Corporation, none of whom are responsible for the results. The author
// thanks all of them.
//
// Redistribution and use in source and binary forms -- with or without
// modification -- are permitted for any purpose, provided that
// redistributions in source form retain this entire copyright notice and
// indicate the origin and nature of any modifications.
//
// I'd appreciate being given credit for this package in the documentation of
// software which uses it, but that is not a requirement.
//
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// One or two things that technically ought to be in here are actually in
// color.c, thanks to some incestuous relationships in the color chains.

//
//  - newnfa - set up an NFA
//  ^ static struct nfa *newnfa(struct vars *, struct colormap *, struct nfa *);
//
func newnfa(tls *libc.TLS, v uintptr, cm uintptr, parent uintptr) uintptr { /* regc_nfa.c:45:19: */
	var nfa uintptr

	nfa = XTclpAlloc(tls, uint32(unsafe.Sizeof(Nfa{})))
	if nfa == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ESPACE
		}()
		return uintptr(0)
	}

	(*Nfa)(unsafe.Pointer(nfa)).Fstates = uintptr(0)
	(*Nfa)(unsafe.Pointer(nfa)).Fslast = uintptr(0)
	(*Nfa)(unsafe.Pointer(nfa)).Ffree = uintptr(0)
	(*Nfa)(unsafe.Pointer(nfa)).Fnstates = 0
	(*Nfa)(unsafe.Pointer(nfa)).Fcm = cm
	(*Nfa)(unsafe.Pointer(nfa)).Fv = v
	*(*Color)(unsafe.Pointer(nfa + 72)) = libc.AssignPtrInt16(nfa+72+1*2, int16(-1))
	*(*Color)(unsafe.Pointer(nfa + 76)) = libc.AssignPtrInt16(nfa+76+1*2, int16(-1))
	(*Nfa)(unsafe.Pointer(nfa)).Fparent = parent                 // Precedes newfstate so parent is valid.
	(*Nfa)(unsafe.Pointer(nfa)).Fpost = newfstate(tls, nfa, '@') // number 0
	(*Nfa)(unsafe.Pointer(nfa)).Fpre = newfstate(tls, nfa, '>')  // number 1

	(*Nfa)(unsafe.Pointer(nfa)).Finit = newstate(tls, nfa) // May become invalid later.
	(*Nfa)(unsafe.Pointer(nfa)).Ffinal = newstate(tls, nfa)
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr != 0 {
		freenfa(tls, nfa)
		return uintptr(0)
	}
	rainbow(tls, nfa, (*Nfa)(unsafe.Pointer(nfa)).Fcm, 'p', -1, (*Nfa)(unsafe.Pointer(nfa)).Fpre, (*Nfa)(unsafe.Pointer(nfa)).Finit)
	newarc(tls, nfa, '^', 1, (*Nfa)(unsafe.Pointer(nfa)).Fpre, (*Nfa)(unsafe.Pointer(nfa)).Finit)
	newarc(tls, nfa, '^', 0, (*Nfa)(unsafe.Pointer(nfa)).Fpre, (*Nfa)(unsafe.Pointer(nfa)).Finit)
	rainbow(tls, nfa, (*Nfa)(unsafe.Pointer(nfa)).Fcm, 'p', -1, (*Nfa)(unsafe.Pointer(nfa)).Ffinal, (*Nfa)(unsafe.Pointer(nfa)).Fpost)
	newarc(tls, nfa, '$', 1, (*Nfa)(unsafe.Pointer(nfa)).Ffinal, (*Nfa)(unsafe.Pointer(nfa)).Fpost)
	newarc(tls, nfa, '$', 0, (*Nfa)(unsafe.Pointer(nfa)).Ffinal, (*Nfa)(unsafe.Pointer(nfa)).Fpost)

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr != 0 {
		freenfa(tls, nfa)
		return uintptr(0)
	}
	return nfa
}

//
//  - freenfa - free an entire NFA
//  ^ static void freenfa(struct nfa *);
//
func freenfa(tls *libc.TLS, nfa uintptr) { /* regc_nfa.c:96:1: */
	var s uintptr

	for libc.AssignUintptr(&s, (*Nfa)(unsafe.Pointer(nfa)).Fstates) != uintptr(0) {
		(*State)(unsafe.Pointer(s)).Fnins = libc.AssignPtrInt32(s+24, 0) // don't worry about arcs
		freestate(tls, nfa, s)
	}
	for libc.AssignUintptr(&s, (*Nfa)(unsafe.Pointer(nfa)).Ffree) != uintptr(0) {
		(*Nfa)(unsafe.Pointer(nfa)).Ffree = (*State)(unsafe.Pointer(s)).Fnext
		destroystate(tls, nfa, s)
	}

	(*Nfa)(unsafe.Pointer(nfa)).Fslast = uintptr(0)
	(*Nfa)(unsafe.Pointer(nfa)).Fnstates = -1
	(*Nfa)(unsafe.Pointer(nfa)).Fpre = uintptr(0)
	(*Nfa)(unsafe.Pointer(nfa)).Fpost = uintptr(0)
	XTclpFree(tls, nfa)
}

//
//  - newstate - allocate an NFA state, with zero flag value
//  ^ static struct state *newstate(struct nfa *);
//
func newstate(tls *libc.TLS, nfa uintptr) uintptr { /* regc_nfa.c:121:21: */
	var s uintptr

	if (*Nfa)(unsafe.Pointer(nfa)).Ffree != uintptr(0) {
		s = (*Nfa)(unsafe.Pointer(nfa)).Ffree
		(*Nfa)(unsafe.Pointer(nfa)).Ffree = (*State)(unsafe.Pointer(s)).Fnext
	} else {
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fspaceused >= uint64(100000)*uint64(unsafe.Sizeof(State{}))+uint64(100000)*uint64(unsafe.Sizeof(Arcbatch{})) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
				}
				return REG_ETOOBIG
			}()
			return uintptr(0)
		}
		s = XTclpAlloc(tls, uint32(unsafe.Sizeof(State{})))
		if s == uintptr(0) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
				}
				return REG_ESPACE
			}()
			return uintptr(0)
		}
		*(*Size_t)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv + 264)) += Size_t(unsafe.Sizeof(State{}))
		(*State)(unsafe.Pointer(s)).Foas.Fnext = uintptr(0)
		(*State)(unsafe.Pointer(s)).Ffree = uintptr(0)
		(*State)(unsafe.Pointer(s)).Fnoas = 0
	}

	(*State)(unsafe.Pointer(s)).Fno = libc.PostIncInt32(&(*Nfa)(unsafe.Pointer(nfa)).Fnstates, 1)
	(*State)(unsafe.Pointer(s)).Fflag = int8(0)
	if (*Nfa)(unsafe.Pointer(nfa)).Fstates == uintptr(0) {
		(*Nfa)(unsafe.Pointer(nfa)).Fstates = s
	}
	(*State)(unsafe.Pointer(s)).Fnins = 0
	(*State)(unsafe.Pointer(s)).Fins = uintptr(0)
	(*State)(unsafe.Pointer(s)).Fnouts = 0
	(*State)(unsafe.Pointer(s)).Fouts = uintptr(0)
	(*State)(unsafe.Pointer(s)).Ftmp = uintptr(0)
	(*State)(unsafe.Pointer(s)).Fnext = uintptr(0)
	if (*Nfa)(unsafe.Pointer(nfa)).Fslast != uintptr(0) {

		(*State)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fslast)).Fnext = s
	}
	(*State)(unsafe.Pointer(s)).Fprev = (*Nfa)(unsafe.Pointer(nfa)).Fslast
	(*Nfa)(unsafe.Pointer(nfa)).Fslast = s
	return s
}

//
//  - newfstate - allocate an NFA state with a specified flag value
//  ^ static struct state *newfstate(struct nfa *, int flag);
//
func newfstate(tls *libc.TLS, nfa uintptr, flag int32) uintptr { /* regc_nfa.c:171:21: */
	var s uintptr

	s = newstate(tls, nfa)
	if s != uintptr(0) {
		(*State)(unsafe.Pointer(s)).Fflag = int8(flag)
	}
	return s
}

//
//  - dropstate - delete a state's inarcs and outarcs and free it
//  ^ static void dropstate(struct nfa *, struct state *);
//
func dropstate(tls *libc.TLS, nfa uintptr, s uintptr) { /* regc_nfa.c:190:1: */
	var a uintptr

	for libc.AssignUintptr(&a, (*State)(unsafe.Pointer(s)).Fins) != uintptr(0) {
		freearc(tls, nfa, a)
	}
	for libc.AssignUintptr(&a, (*State)(unsafe.Pointer(s)).Fouts) != uintptr(0) {
		freearc(tls, nfa, a)
	}
	freestate(tls, nfa, s)
}

//
//  - freestate - free a state, which has no in-arcs or out-arcs
//  ^ static void freestate(struct nfa *, struct state *);
//
func freestate(tls *libc.TLS, nfa uintptr, s uintptr) { /* regc_nfa.c:210:1: */

	(*State)(unsafe.Pointer(s)).Fno = -1
	(*State)(unsafe.Pointer(s)).Fflag = int8(0)
	if (*State)(unsafe.Pointer(s)).Fnext != uintptr(0) {
		(*State)(unsafe.Pointer((*State)(unsafe.Pointer(s)).Fnext)).Fprev = (*State)(unsafe.Pointer(s)).Fprev
	} else {

		(*Nfa)(unsafe.Pointer(nfa)).Fslast = (*State)(unsafe.Pointer(s)).Fprev
	}
	if (*State)(unsafe.Pointer(s)).Fprev != uintptr(0) {
		(*State)(unsafe.Pointer((*State)(unsafe.Pointer(s)).Fprev)).Fnext = (*State)(unsafe.Pointer(s)).Fnext
	} else {

		(*Nfa)(unsafe.Pointer(nfa)).Fstates = (*State)(unsafe.Pointer(s)).Fnext
	}
	(*State)(unsafe.Pointer(s)).Fprev = uintptr(0)
	(*State)(unsafe.Pointer(s)).Fnext = (*Nfa)(unsafe.Pointer(nfa)).Ffree // don't delete it, put it on the free list
	(*Nfa)(unsafe.Pointer(nfa)).Ffree = s
}

//
//  - destroystate - really get rid of an already-freed state
//  ^ static void destroystate(struct nfa *, struct state *);
//
func destroystate(tls *libc.TLS, nfa uintptr, s uintptr) { /* regc_nfa.c:241:1: */
	var ab uintptr
	var abnext uintptr

	for ab = (*State)(unsafe.Pointer(s)).Foas.Fnext; ab != uintptr(0); ab = abnext {
		abnext = (*Arcbatch)(unsafe.Pointer(ab)).Fnext
		XTclpFree(tls, ab)
		*(*Size_t)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv + 264)) -= Size_t(unsafe.Sizeof(Arcbatch{}))
	}
	(*State)(unsafe.Pointer(s)).Fins = uintptr(0)
	(*State)(unsafe.Pointer(s)).Fouts = uintptr(0)
	(*State)(unsafe.Pointer(s)).Fnext = uintptr(0)
	XTclpFree(tls, s)
	*(*Size_t)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv + 264)) -= Size_t(unsafe.Sizeof(State{}))
}

//
//  - newarc - set up a new arc within an NFA
//  ^ static void newarc(struct nfa *, int, pcolor, struct state *,
//  ^	struct state *);
//
// This function checks to make sure that no duplicate arcs are created.
// In general we never want duplicates.
func newarc(tls *libc.TLS, nfa uintptr, t int32, co Pcolor, from uintptr, to uintptr) { /* regc_nfa.c:271:1: */
	var a uintptr

	// check for duplicate arc, using whichever chain is shorter
	if (*State)(unsafe.Pointer(from)).Fnouts <= (*State)(unsafe.Pointer(to)).Fnins {
		for a = (*State)(unsafe.Pointer(from)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
			if (*Arc)(unsafe.Pointer(a)).Fto == to && int32((*Arc)(unsafe.Pointer(a)).Fco) == co && (*Arc)(unsafe.Pointer(a)).Ftype == t {
				return
			}
		}
	} else {
		for a = (*State)(unsafe.Pointer(to)).Fins; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Finchain {
			if (*Arc)(unsafe.Pointer(a)).Ffrom == from && int32((*Arc)(unsafe.Pointer(a)).Fco) == co && (*Arc)(unsafe.Pointer(a)).Ftype == t {
				return
			}
		}
	}

	// no dup, so create the arc
	createarc(tls, nfa, t, co, from, to)
}

// createarc - create a new arc within an NFA
//
// This function must *only* be used after verifying that there is no existing
// identical arc (same type/color/from/to).
func createarc(tls *libc.TLS, nfa uintptr, t int32, co Pcolor, from uintptr, to uintptr) { /* regc_nfa.c:308:1: */
	var a uintptr

	// the arc is physically allocated within its from-state
	a = allocarc(tls, nfa, from)
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
		return
	}

	(*Arc)(unsafe.Pointer(a)).Ftype = t
	(*Arc)(unsafe.Pointer(a)).Fco = Color(co)
	(*Arc)(unsafe.Pointer(a)).Fto = to
	(*Arc)(unsafe.Pointer(a)).Ffrom = from

	// Put the new arc on the beginning, not the end, of the chains; it's
	// simpler here, and freearc() is the same cost either way.  See also the
	// logic in moveins() and its cohorts, as well as fixempties().
	(*Arc)(unsafe.Pointer(a)).Finchain = (*State)(unsafe.Pointer(to)).Fins
	(*Arc)(unsafe.Pointer(a)).FinchainRev = uintptr(0)
	if (*State)(unsafe.Pointer(to)).Fins != 0 {
		(*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(to)).Fins)).FinchainRev = a
	}
	(*State)(unsafe.Pointer(to)).Fins = a
	(*Arc)(unsafe.Pointer(a)).Foutchain = (*State)(unsafe.Pointer(from)).Fouts
	(*Arc)(unsafe.Pointer(a)).FoutchainRev = uintptr(0)
	if (*State)(unsafe.Pointer(from)).Fouts != 0 {
		(*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(from)).Fouts)).FoutchainRev = a
	}
	(*State)(unsafe.Pointer(from)).Fouts = a

	(*State)(unsafe.Pointer(from)).Fnouts++
	(*State)(unsafe.Pointer(to)).Fnins++

	if ((*Arc)(unsafe.Pointer(a)).Ftype == 'p' || (*Arc)(unsafe.Pointer(a)).Ftype == 'a' || (*Arc)(unsafe.Pointer(a)).Ftype == 'r') && (*Nfa)(unsafe.Pointer(nfa)).Fparent == uintptr(0) {
		colorchain(tls, (*Nfa)(unsafe.Pointer(nfa)).Fcm, a)
	}
}

//
//  - allocarc - allocate a new out-arc within a state
//  ^ static struct arc *allocarc(struct nfa *, struct state *);
//
func allocarc(tls *libc.TLS, nfa uintptr, s uintptr) uintptr { /* regc_nfa.c:359:19: */
	var a uintptr

	// Shortcut

	if (*State)(unsafe.Pointer(s)).Ffree == uintptr(0) && (*State)(unsafe.Pointer(s)).Fnoas < ABSIZE {
		a = s + 72 + 8 + uintptr((*State)(unsafe.Pointer(s)).Fnoas)*72
		(*State)(unsafe.Pointer(s)).Fnoas++
		return a
	}

	// if none at hand, get more

	if (*State)(unsafe.Pointer(s)).Ffree == uintptr(0) {
		var newAb uintptr
		var i int32

		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fspaceused >= uint64(100000)*uint64(unsafe.Sizeof(State{}))+uint64(100000)*uint64(unsafe.Sizeof(Arcbatch{})) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
				}
				return REG_ETOOBIG
			}()
			return uintptr(0)
		}
		newAb = XTclpAlloc(tls, uint32(unsafe.Sizeof(Arcbatch{})))
		if newAb == uintptr(0) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
				}
				return REG_ESPACE
			}()
			return uintptr(0)
		}
		*(*Size_t)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv + 264)) += Size_t(unsafe.Sizeof(Arcbatch{}))
		(*Arcbatch)(unsafe.Pointer(newAb)).Fnext = (*State)(unsafe.Pointer(s)).Foas.Fnext
		(*State)(unsafe.Pointer(s)).Foas.Fnext = newAb

		for i = 0; i < ABSIZE; i++ {
			(*Arc)(unsafe.Pointer(newAb + 8 + uintptr(i)*72)).Ftype = 0
			(*Arc)(unsafe.Pointer(newAb + 8 + uintptr(i)*72)).Foutchain = newAb + 8 + uintptr(i+1)*72
		}
		(*Arc)(unsafe.Pointer(newAb + 8 + 9*72)).Foutchain = uintptr(0)
		(*State)(unsafe.Pointer(s)).Ffree = newAb + 8
	}

	a = (*State)(unsafe.Pointer(s)).Ffree
	(*State)(unsafe.Pointer(s)).Ffree = (*Arc)(unsafe.Pointer(a)).Foutchain
	return a
}

//
//  - freearc - free an arc
//  ^ static void freearc(struct nfa *, struct arc *);
//
func freearc(tls *libc.TLS, nfa uintptr, victim uintptr) { /* regc_nfa.c:416:1: */
	var from uintptr = (*Arc)(unsafe.Pointer(victim)).Ffrom
	var to uintptr = (*Arc)(unsafe.Pointer(victim)).Fto
	var predecessor uintptr

	// Take it off color chain if necessary.

	if ((*Arc)(unsafe.Pointer(victim)).Ftype == 'p' || (*Arc)(unsafe.Pointer(victim)).Ftype == 'a' || (*Arc)(unsafe.Pointer(victim)).Ftype == 'r') && (*Nfa)(unsafe.Pointer(nfa)).Fparent == uintptr(0) {
		uncolorchain(tls, (*Nfa)(unsafe.Pointer(nfa)).Fcm, victim)
	}

	// Take it off source's out-chain.

	predecessor = (*Arc)(unsafe.Pointer(victim)).FoutchainRev
	if predecessor == uintptr(0) {

		(*State)(unsafe.Pointer(from)).Fouts = (*Arc)(unsafe.Pointer(victim)).Foutchain
	} else {

		(*Arc)(unsafe.Pointer(predecessor)).Foutchain = (*Arc)(unsafe.Pointer(victim)).Foutchain
	}
	if (*Arc)(unsafe.Pointer(victim)).Foutchain != uintptr(0) {

		(*Arc)(unsafe.Pointer((*Arc)(unsafe.Pointer(victim)).Foutchain)).FoutchainRev = predecessor
	}
	(*State)(unsafe.Pointer(from)).Fnouts--

	// Take it off target's in-chain.

	predecessor = (*Arc)(unsafe.Pointer(victim)).FinchainRev
	if predecessor == uintptr(0) {

		(*State)(unsafe.Pointer(to)).Fins = (*Arc)(unsafe.Pointer(victim)).Finchain
	} else {

		(*Arc)(unsafe.Pointer(predecessor)).Finchain = (*Arc)(unsafe.Pointer(victim)).Finchain
	}
	if (*Arc)(unsafe.Pointer(victim)).Finchain != uintptr(0) {

		(*Arc)(unsafe.Pointer((*Arc)(unsafe.Pointer(victim)).Finchain)).FinchainRev = predecessor
	}
	(*State)(unsafe.Pointer(to)).Fnins--

	// Clean up and place on from-state's free list.

	(*Arc)(unsafe.Pointer(victim)).Ftype = 0
	(*Arc)(unsafe.Pointer(victim)).Ffrom = uintptr(0) // precautions...
	(*Arc)(unsafe.Pointer(victim)).Fto = uintptr(0)
	(*Arc)(unsafe.Pointer(victim)).Finchain = uintptr(0)
	(*Arc)(unsafe.Pointer(victim)).FinchainRev = uintptr(0)
	(*Arc)(unsafe.Pointer(victim)).Foutchain = uintptr(0)
	(*Arc)(unsafe.Pointer(victim)).FoutchainRev = uintptr(0)
	(*Arc)(unsafe.Pointer(victim)).Foutchain = (*State)(unsafe.Pointer(from)).Ffree
	(*State)(unsafe.Pointer(from)).Ffree = victim
}

// changearctarget - flip an arc to have a different to state
//
// Caller must have verified that there is no pre-existing duplicate arc.
//
// Note that because we store arcs in their from state, we can't easily have
// a similar changearcsource function.
func changearctarget(tls *libc.TLS, a uintptr, newto uintptr) { /* regc_nfa.c:496:1: */
	var oldto uintptr = (*Arc)(unsafe.Pointer(a)).Fto
	var predecessor uintptr

	// take it off old target's in-chain

	predecessor = (*Arc)(unsafe.Pointer(a)).FinchainRev
	if predecessor == uintptr(0) {

		(*State)(unsafe.Pointer(oldto)).Fins = (*Arc)(unsafe.Pointer(a)).Finchain
	} else {

		(*Arc)(unsafe.Pointer(predecessor)).Finchain = (*Arc)(unsafe.Pointer(a)).Finchain
	}
	if (*Arc)(unsafe.Pointer(a)).Finchain != uintptr(0) {

		(*Arc)(unsafe.Pointer((*Arc)(unsafe.Pointer(a)).Finchain)).FinchainRev = predecessor
	}
	(*State)(unsafe.Pointer(oldto)).Fnins--

	(*Arc)(unsafe.Pointer(a)).Fto = newto

	// prepend it to new target's in-chain
	(*Arc)(unsafe.Pointer(a)).Finchain = (*State)(unsafe.Pointer(newto)).Fins
	(*Arc)(unsafe.Pointer(a)).FinchainRev = uintptr(0)
	if (*State)(unsafe.Pointer(newto)).Fins != 0 {
		(*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(newto)).Fins)).FinchainRev = a
	}
	(*State)(unsafe.Pointer(newto)).Fins = a
	(*State)(unsafe.Pointer(newto)).Fnins++
}

//
//  - hasnonemptyout - Does state have a non-EMPTY out arc?
//  ^ static int hasnonemptyout(struct state *);
//
func hasnonemptyout(tls *libc.TLS, s uintptr) int32 { /* regc_nfa.c:536:1: */
	var a uintptr

	for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		if (*Arc)(unsafe.Pointer(a)).Ftype != 'n' {
			return 1
		}
	}
	return 0
}

//
//  - findarc - find arc, if any, from given source with given type and color
//  * If there is more than one such arc, the result is random.
//  ^ static struct arc *findarc(struct state *, int, pcolor);
//
func findarc(tls *libc.TLS, s uintptr, type1 int32, co Pcolor) uintptr { /* regc_nfa.c:554:19: */
	var a uintptr

	for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		if (*Arc)(unsafe.Pointer(a)).Ftype == type1 && int32((*Arc)(unsafe.Pointer(a)).Fco) == co {
			return a
		}
	}
	return uintptr(0)
}

//
//  - cparc - allocate a new arc within an NFA, copying details from old one
//  ^ static void cparc(struct nfa *, struct arc *, struct state *,
//  ^ 	struct state *);
//
func cparc(tls *libc.TLS, nfa uintptr, oa uintptr, from uintptr, to uintptr) { /* regc_nfa.c:576:1: */
	newarc(tls, nfa, (*Arc)(unsafe.Pointer(oa)).Ftype, int32((*Arc)(unsafe.Pointer(oa)).Fco), from, to)
}

// sortins - sort the in arcs of a state by from/color/type
func sortins(tls *libc.TLS, nfa uintptr, s uintptr) { /* regc_nfa.c:589:1: */
	var sortarray uintptr
	var a uintptr
	var n int32 = (*State)(unsafe.Pointer(s)).Fnins
	var i int32

	if n <= 1 {
		return // nothing to do
	}
	// make an array of arc pointers ...
	sortarray = XTclpAlloc(tls, uint32(uint64(n)*uint64(unsafe.Sizeof(uintptr(0)))))
	if sortarray == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
			}
			return REG_ESPACE
		}()
		return
	}
	i = 0
	for a = (*State)(unsafe.Pointer(s)).Fins; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Finchain {
		*(*uintptr)(unsafe.Pointer(sortarray + uintptr(libc.PostIncInt32(&i, 1))*8)) = a
	}

	// ... sort the array
	libc.Xqsort(tls, sortarray, uint64(n), uint64(unsafe.Sizeof(uintptr(0))), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{sortins_cmp})))
	// ... and rebuild arc list in order
	// it seems worth special-casing first and last items to simplify loop
	a = *(*uintptr)(unsafe.Pointer(sortarray))
	(*State)(unsafe.Pointer(s)).Fins = a
	(*Arc)(unsafe.Pointer(a)).Finchain = *(*uintptr)(unsafe.Pointer(sortarray + 1*8))
	(*Arc)(unsafe.Pointer(a)).FinchainRev = uintptr(0)
	for i = 1; i < n-1; i++ {
		a = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i)*8))
		(*Arc)(unsafe.Pointer(a)).Finchain = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i+1)*8))
		(*Arc)(unsafe.Pointer(a)).FinchainRev = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i-1)*8))
	}
	a = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i)*8))
	(*Arc)(unsafe.Pointer(a)).Finchain = uintptr(0)
	(*Arc)(unsafe.Pointer(a)).FinchainRev = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i-1)*8))
	XTclpFree(tls, sortarray)
}

func sortins_cmp(tls *libc.TLS, a uintptr, b uintptr) int32 { /* regc_nfa.c:632:1: */
	var aa uintptr = *(*uintptr)(unsafe.Pointer(a))
	var bb uintptr = *(*uintptr)(unsafe.Pointer(b))

	// we check the fields in the order they are most likely to be different
	if (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(aa)).Ffrom)).Fno < (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(bb)).Ffrom)).Fno {
		return -1
	}
	if (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(aa)).Ffrom)).Fno > (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(bb)).Ffrom)).Fno {
		return 1
	}
	if int32((*Arc)(unsafe.Pointer(aa)).Fco) < int32((*Arc)(unsafe.Pointer(bb)).Fco) {
		return -1
	}
	if int32((*Arc)(unsafe.Pointer(aa)).Fco) > int32((*Arc)(unsafe.Pointer(bb)).Fco) {
		return 1
	}
	if (*Arc)(unsafe.Pointer(aa)).Ftype < (*Arc)(unsafe.Pointer(bb)).Ftype {
		return -1
	}
	if (*Arc)(unsafe.Pointer(aa)).Ftype > (*Arc)(unsafe.Pointer(bb)).Ftype {
		return 1
	}
	return 0
}

// sortouts - sort the out arcs of a state by to/color/type
func sortouts(tls *libc.TLS, nfa uintptr, s uintptr) { /* regc_nfa.c:665:1: */
	var sortarray uintptr
	var a uintptr
	var n int32 = (*State)(unsafe.Pointer(s)).Fnouts
	var i int32

	if n <= 1 {
		return // nothing to do
	}
	// make an array of arc pointers ...
	sortarray = XTclpAlloc(tls, uint32(uint64(n)*uint64(unsafe.Sizeof(uintptr(0)))))
	if sortarray == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
			}
			return REG_ESPACE
		}()
		return
	}
	i = 0
	for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		*(*uintptr)(unsafe.Pointer(sortarray + uintptr(libc.PostIncInt32(&i, 1))*8)) = a
	}

	// ... sort the array
	libc.Xqsort(tls, sortarray, uint64(n), uint64(unsafe.Sizeof(uintptr(0))), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{sortouts_cmp})))
	// ... and rebuild arc list in order
	// it seems worth special-casing first and last items to simplify loop
	a = *(*uintptr)(unsafe.Pointer(sortarray))
	(*State)(unsafe.Pointer(s)).Fouts = a
	(*Arc)(unsafe.Pointer(a)).Foutchain = *(*uintptr)(unsafe.Pointer(sortarray + 1*8))
	(*Arc)(unsafe.Pointer(a)).FoutchainRev = uintptr(0)
	for i = 1; i < n-1; i++ {
		a = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i)*8))
		(*Arc)(unsafe.Pointer(a)).Foutchain = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i+1)*8))
		(*Arc)(unsafe.Pointer(a)).FoutchainRev = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i-1)*8))
	}
	a = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i)*8))
	(*Arc)(unsafe.Pointer(a)).Foutchain = uintptr(0)
	(*Arc)(unsafe.Pointer(a)).FoutchainRev = *(*uintptr)(unsafe.Pointer(sortarray + uintptr(i-1)*8))
	XTclpFree(tls, sortarray)
}

func sortouts_cmp(tls *libc.TLS, a uintptr, b uintptr) int32 { /* regc_nfa.c:708:1: */
	var aa uintptr = *(*uintptr)(unsafe.Pointer(a))
	var bb uintptr = *(*uintptr)(unsafe.Pointer(b))

	// we check the fields in the order they are most likely to be different
	if (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(aa)).Fto)).Fno < (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(bb)).Fto)).Fno {
		return -1
	}
	if (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(aa)).Fto)).Fno > (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(bb)).Fto)).Fno {
		return 1
	}
	if int32((*Arc)(unsafe.Pointer(aa)).Fco) < int32((*Arc)(unsafe.Pointer(bb)).Fco) {
		return -1
	}
	if int32((*Arc)(unsafe.Pointer(aa)).Fco) > int32((*Arc)(unsafe.Pointer(bb)).Fco) {
		return 1
	}
	if (*Arc)(unsafe.Pointer(aa)).Ftype < (*Arc)(unsafe.Pointer(bb)).Ftype {
		return -1
	}
	if (*Arc)(unsafe.Pointer(aa)).Ftype > (*Arc)(unsafe.Pointer(bb)).Ftype {
		return 1
	}
	return 0
}

// Common decision logic about whether to use arc-by-arc operations or
// sort/merge.  If there's just a few source arcs we cannot recoup the
// cost of sorting the destination arc list, no matter how large it is.
// Otherwise, limit the number of arc-by-arc comparisons to about 1000
// (a somewhat arbitrary choice, but the breakeven point would probably
// be machine dependent anyway).

//
//  - moveins - move all in arcs of a state to another state
//  * You might think this could be done better by just updating the
//  * existing arcs, and you would be right if it weren't for the need
//  * for duplicate suppression, which makes it easier to just make new
//  * ones to exploit the suppression built into newarc.
//  *
//  * However, if we have a whole lot of arcs to deal with, retail duplicate
//  * checks become too slow.  In that case we proceed by sorting and merging
//  * the arc lists, and then we can indeed just update the arcs in-place.
//  *
//  ^ static void moveins(struct nfa *, struct state *, struct state *);
//
func moveins(tls *libc.TLS, nfa uintptr, oldState uintptr, newState uintptr) { /* regc_nfa.c:762:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	if !(func() int32 {
		if (*State)(unsafe.Pointer(oldState)).Fnins < 4 {
			return 0
		}
		return libc.Bool32((*State)(unsafe.Pointer(oldState)).Fnins > 32 || (*State)(unsafe.Pointer(newState)).Fnins > 32)
	}() != 0) {
		// With not too many arcs, just do them one at a time
		var a uintptr

		for libc.AssignUintptr(&a, (*State)(unsafe.Pointer(oldState)).Fins) != uintptr(0) {
			cparc(tls, nfa, a, (*Arc)(unsafe.Pointer(a)).Ffrom, newState)
			freearc(tls, nfa, a)
		}
	} else {
		// With many arcs, use a sort-merge approach.  Note changearctarget()
		// will put the arc onto the front of newState's chain, so it does not
		// break our walk through the sorted part of the chain.
		// var oa uintptr at bp, 8

		// var na uintptr at bp+8, 8

		// Because we bypass newarc() in this code path, we'd better include a
		// cancel check.
		if 0 != 0 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
				}
				return REG_CANCEL
			}()
			return
		}

		sortins(tls, nfa, oldState)
		sortins(tls, nfa, newState)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
			return // might have failed to sort
		}
		*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*State)(unsafe.Pointer(oldState)).Fins
		*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*State)(unsafe.Pointer(newState)).Fins
		for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0) {
			var a uintptr = *(*uintptr)(unsafe.Pointer(bp /* oa */))

			switch sortins_cmp(tls, bp, bp+8) {
			case -1:
				// newState does not have anything matching oa
				*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Finchain

				// Rather than doing createarc+freearc, we can just unlink
				// and relink the existing arc struct.
				changearctarget(tls, a, newState)
				break
				fallthrough
			case 0:
				// match, advance in both lists
				*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Finchain
				*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Finchain
				// ... and drop duplicate arc from oldState
				freearc(tls, nfa, a)
				break
				fallthrough
			case +1:
				// advance only na; oa might have a match later
				*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Finchain
				break
				fallthrough
			default:

			}
		}
		for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
			// newState does not have anything matching oa
			var a uintptr = *(*uintptr)(unsafe.Pointer(bp /* oa */))

			*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Finchain
			changearctarget(tls, a, newState)
		}
	}

}

//
//  - copyins - copy in arcs of a state to another state
//  ^ static VOID copyins(struct nfa *, struct state *, struct state *, int);
//
func copyins(tls *libc.TLS, nfa uintptr, oldState uintptr, newState uintptr) { /* regc_nfa.c:849:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	if !(func() int32 {
		if (*State)(unsafe.Pointer(oldState)).Fnins < 4 {
			return 0
		}
		return libc.Bool32((*State)(unsafe.Pointer(oldState)).Fnins > 32 || (*State)(unsafe.Pointer(newState)).Fnins > 32)
	}() != 0) {
		// With not too many arcs, just do them one at a time
		var a uintptr

		for a = (*State)(unsafe.Pointer(oldState)).Fins; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Finchain {
			cparc(tls, nfa, a, (*Arc)(unsafe.Pointer(a)).Ffrom, newState)
		}
	} else {
		// With many arcs, use a sort-merge approach.  Note that createarc()
		// will put new arcs onto the front of newState's chain, so it does
		// not break our walk through the sorted part of the chain.
		// var oa uintptr at bp, 8

		// var na uintptr at bp+8, 8

		// Because we bypass newarc() in this code path, we'd better include a
		// cancel check.
		if 0 != 0 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
				}
				return REG_CANCEL
			}()
			return
		}

		sortins(tls, nfa, oldState)
		sortins(tls, nfa, newState)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
			return // might have failed to sort
		}
		*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*State)(unsafe.Pointer(oldState)).Fins
		*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*State)(unsafe.Pointer(newState)).Fins
		for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0) {
			var a uintptr = *(*uintptr)(unsafe.Pointer(bp /* oa */))

			switch sortins_cmp(tls, bp, bp+8) {
			case -1:
				// newState does not have anything matching oa
				*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Finchain
				createarc(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ftype, int32((*Arc)(unsafe.Pointer(a)).Fco), (*Arc)(unsafe.Pointer(a)).Ffrom, newState)
				break
				fallthrough
			case 0:
				// match, advance in both lists
				*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Finchain
				*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Finchain
				break
				fallthrough
			case +1:
				// advance only na; oa might have a match later
				*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Finchain
				break
				fallthrough
			default:

			}
		}
		for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
			// newState does not have anything matching oa
			var a uintptr = *(*uintptr)(unsafe.Pointer(bp /* oa */))

			*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Finchain
			createarc(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ftype, int32((*Arc)(unsafe.Pointer(a)).Fco), (*Arc)(unsafe.Pointer(a)).Ffrom, newState)
		}
	}
}

// mergeins - merge a list of inarcs into a state
//
// This is much like copyins, but the source arcs are listed in an array,
// and are not guaranteed unique.  It's okay to clobber the array contents.
func mergeins(tls *libc.TLS, nfa uintptr, s uintptr, arcarray uintptr, arccount int32) { /* regc_nfa.c:927:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var na uintptr at bp+8, 8

	var i int32
	var j int32

	if arccount <= 0 {
		return
	}

	// Because we bypass newarc() in this code path, we'd better include a
	// cancel check.
	if 0 != 0 {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
			}
			return REG_CANCEL
		}()
		return
	}

	// Sort existing inarcs as well as proposed new ones
	sortins(tls, nfa, s)
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
		return // might have failed to sort
	}

	libc.Xqsort(tls, arcarray, uint64(arccount), uint64(unsafe.Sizeof(uintptr(0))), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{sortins_cmp})))

	// arcarray very likely includes dups, so we must eliminate them.  (This
	// could be folded into the next loop, but it's not worth the trouble.)
	j = 0
	for i = 1; i < arccount; i++ {
		switch sortins_cmp(tls, arcarray+uintptr(j)*8, arcarray+uintptr(i)*8) {
		case -1:
			// non-dup
			*(*uintptr)(unsafe.Pointer(arcarray + uintptr(libc.PreIncInt32(&j, 1))*8)) = *(*uintptr)(unsafe.Pointer(arcarray + uintptr(i)*8))
			break
		case 0:
			// dup
			break
		default:
			// trouble

		}
	}
	arccount = j + 1

	// Now merge into s' inchain.  Note that createarc() will put new arcs
	// onto the front of s's chain, so it does not break our walk through the
	// sorted part of the chain.
	i = 0
	*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*State)(unsafe.Pointer(s)).Fins
	for i < arccount && *(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(bp /* a */)) = *(*uintptr)(unsafe.Pointer(arcarray + uintptr(i)*8))

		switch sortins_cmp(tls, bp, bp+8) {
		case -1:
			// s does not have anything matching a
			createarc(tls, nfa, (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* a */)))).Ftype, int32((*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* a */)))).Fco), (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* a */)))).Ffrom, s)
			i++
			break
		case 0:
			// match, advance in both lists
			i++
			*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Finchain
			break
		case +1:
			// advance only na; array might have a match later
			*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Finchain
			break
		default:

		}
	}
	for i < arccount {
		// s does not have anything matching a
		var a uintptr = *(*uintptr)(unsafe.Pointer(arcarray + uintptr(i)*8))

		createarc(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ftype, int32((*Arc)(unsafe.Pointer(a)).Fco), (*Arc)(unsafe.Pointer(a)).Ffrom, s)
		i++
	}
}

//
//  - moveouts - move all out arcs of a state to another state
//  ^ static void moveouts(struct nfa *, struct state *, struct state *);
//
func moveouts(tls *libc.TLS, nfa uintptr, oldState uintptr, newState uintptr) { /* regc_nfa.c:1022:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	if !(func() int32 {
		if (*State)(unsafe.Pointer(oldState)).Fnouts < 4 {
			return 0
		}
		return libc.Bool32((*State)(unsafe.Pointer(oldState)).Fnouts > 32 || (*State)(unsafe.Pointer(newState)).Fnouts > 32)
	}() != 0) {
		// With not too many arcs, just do them one at a time
		var a uintptr

		for libc.AssignUintptr(&a, (*State)(unsafe.Pointer(oldState)).Fouts) != uintptr(0) {
			cparc(tls, nfa, a, newState, (*Arc)(unsafe.Pointer(a)).Fto)
			freearc(tls, nfa, a)
		}
	} else {
		// With many arcs, use a sort-merge approach.  Note that createarc()
		// will put new arcs onto the front of newState's chain, so it does
		// not break our walk through the sorted part of the chain.
		// var oa uintptr at bp, 8

		// var na uintptr at bp+8, 8

		// Because we bypass newarc() in this code path, we'd better include a
		// cancel check.
		if 0 != 0 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
				}
				return REG_CANCEL
			}()
			return
		}

		sortouts(tls, nfa, oldState)
		sortouts(tls, nfa, newState)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
			return // might have failed to sort
		}
		*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*State)(unsafe.Pointer(oldState)).Fouts
		*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*State)(unsafe.Pointer(newState)).Fouts
		for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0) {
			var a uintptr = *(*uintptr)(unsafe.Pointer(bp /* oa */))

			switch sortouts_cmp(tls, bp, bp+8) {
			case -1:
				// newState does not have anything matching oa
				*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Foutchain
				createarc(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ftype, int32((*Arc)(unsafe.Pointer(a)).Fco), newState, (*Arc)(unsafe.Pointer(a)).Fto)
				freearc(tls, nfa, a)
				break
				fallthrough
			case 0:
				// match, advance in both lists
				*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Foutchain
				*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Foutchain
				// ... and drop duplicate arc from oldState
				freearc(tls, nfa, a)
				break
				fallthrough
			case +1:
				// advance only na; oa might have a match later
				*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Foutchain
				break
				fallthrough
			default:

			}
		}
		for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
			// newState does not have anything matching oa
			var a uintptr = *(*uintptr)(unsafe.Pointer(bp /* oa */))

			*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Foutchain
			createarc(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ftype, int32((*Arc)(unsafe.Pointer(a)).Fco), newState, (*Arc)(unsafe.Pointer(a)).Fto)
			freearc(tls, nfa, a)
		}
	}

}

//
//  - copyouts - copy out arcs of a state to another state
//  ^ static VOID copyouts(struct nfa *, struct state *, struct state *, int);
//
func copyouts(tls *libc.TLS, nfa uintptr, oldState uintptr, newState uintptr) { /* regc_nfa.c:1106:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	if !(func() int32 {
		if (*State)(unsafe.Pointer(oldState)).Fnouts < 4 {
			return 0
		}
		return libc.Bool32((*State)(unsafe.Pointer(oldState)).Fnouts > 32 || (*State)(unsafe.Pointer(newState)).Fnouts > 32)
	}() != 0) {
		// With not too many arcs, just do them one at a time
		var a uintptr

		for a = (*State)(unsafe.Pointer(oldState)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
			cparc(tls, nfa, a, newState, (*Arc)(unsafe.Pointer(a)).Fto)
		}
	} else {
		// With many arcs, use a sort-merge approach.  Note that createarc()
		// will put new arcs onto the front of newState's chain, so it does
		// not break our walk through the sorted part of the chain.
		// var oa uintptr at bp, 8

		// var na uintptr at bp+8, 8

		// Because we bypass newarc() in this code path, we'd better include a
		// cancel check.
		if 0 != 0 {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
				}
				return REG_CANCEL
			}()
			return
		}

		sortouts(tls, nfa, oldState)
		sortouts(tls, nfa, newState)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
			return // might have failed to sort
		}
		*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*State)(unsafe.Pointer(oldState)).Fouts
		*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*State)(unsafe.Pointer(newState)).Fouts
		for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0) {
			var a uintptr = *(*uintptr)(unsafe.Pointer(bp /* oa */))

			switch sortouts_cmp(tls, bp, bp+8) {
			case -1:
				// newState does not have anything matching oa
				*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Foutchain
				createarc(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ftype, int32((*Arc)(unsafe.Pointer(a)).Fco), newState, (*Arc)(unsafe.Pointer(a)).Fto)
				break
				fallthrough
			case 0:
				// match, advance in both lists
				*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Foutchain
				*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Foutchain
				break
				fallthrough
			case +1:
				// advance only na; oa might have a match later
				*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* na */)))).Foutchain
				break
				fallthrough
			default:

			}
		}
		for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
			// newState does not have anything matching oa
			var a uintptr = *(*uintptr)(unsafe.Pointer(bp /* oa */))

			*(*uintptr)(unsafe.Pointer(bp /* oa */)) = (*Arc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* oa */)))).Foutchain
			createarc(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ftype, int32((*Arc)(unsafe.Pointer(a)).Fco), newState, (*Arc)(unsafe.Pointer(a)).Fto)
		}
	}
}

//
//  - cloneouts - copy out arcs of a state to another state pair, modifying type
//  ^ static void cloneouts(struct nfa *, struct state *, struct state *,
//  ^ 	struct state *, int);
//
func cloneouts(tls *libc.TLS, nfa uintptr, old uintptr, from uintptr, to uintptr, type1 int32) { /* regc_nfa.c:1183:1: */
	var a uintptr

	for a = (*State)(unsafe.Pointer(old)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		newarc(tls, nfa, type1, int32((*Arc)(unsafe.Pointer(a)).Fco), from, to)
	}
}

//
//  - delsub - delete a sub-NFA, updating subre pointers if necessary
//  * This uses a recursive traversal of the sub-NFA, marking already-seen
//  * states using their tmp pointer.
//  ^ static void delsub(struct nfa *, struct state *, struct state *);
//
func delsub(tls *libc.TLS, nfa uintptr, lp uintptr, rp uintptr) { /* regc_nfa.c:1206:1: */

	(*State)(unsafe.Pointer(rp)).Ftmp = rp // mark end

	deltraverse(tls, nfa, lp, lp)
	// did the job
	// no more

	(*State)(unsafe.Pointer(rp)).Ftmp = uintptr(0) // unmark end
	(*State)(unsafe.Pointer(lp)).Ftmp = uintptr(0) // and begin, marked by deltraverse
}

//
//  - deltraverse - the recursive heart of delsub
//  * This routine's basic job is to destroy all out-arcs of the state.
//  ^ static void deltraverse(struct nfa *, struct state *, struct state *);
//
func deltraverse(tls *libc.TLS, nfa uintptr, leftend uintptr, s uintptr) { /* regc_nfa.c:1229:1: */
	var a uintptr
	var to uintptr

	if (*State)(unsafe.Pointer(s)).Fnouts == 0 {
		return // nothing to do
	}
	if (*State)(unsafe.Pointer(s)).Ftmp != uintptr(0) {
		return // already in progress
	}

	(*State)(unsafe.Pointer(s)).Ftmp = s // mark as in progress

	for libc.AssignUintptr(&a, (*State)(unsafe.Pointer(s)).Fouts) != uintptr(0) {
		to = (*Arc)(unsafe.Pointer(a)).Fto
		deltraverse(tls, nfa, leftend, to)

		freearc(tls, nfa, a)
		if (*State)(unsafe.Pointer(to)).Fnins == 0 && (*State)(unsafe.Pointer(to)).Ftmp == uintptr(0) {

			freestate(tls, nfa, to)
		}
	}

	// we're still here
	// and still reachable
	// but have no outarcs

	(*State)(unsafe.Pointer(s)).Ftmp = uintptr(0) // we're done here
}

//
//  - dupnfa - duplicate sub-NFA
//  * Another recursive traversal, this time using tmp to point to duplicates as
//  * well as mark already-seen states. (You knew there was a reason why it's a
//  * state pointer, didn't you? :-))
//  ^ static void dupnfa(struct nfa *, struct state *, struct state *,
//  ^ 	struct state *, struct state *);
//
func dupnfa(tls *libc.TLS, nfa uintptr, start uintptr, stop uintptr, from uintptr, to uintptr) { /* regc_nfa.c:1273:1: */
	if start == stop {
		newarc(tls, nfa, 'n', 0, from, to)
		return
	}

	(*State)(unsafe.Pointer(stop)).Ftmp = to
	duptraverse(tls, nfa, start, from, 0)
	// done, except for clearing out the tmp pointers

	(*State)(unsafe.Pointer(stop)).Ftmp = uintptr(0)
	cleartraverse(tls, nfa, start)
}

//
//  - duptraverse - recursive heart of dupnfa
//  ^ static void duptraverse(struct nfa *, struct state *, struct state *);
//
func duptraverse(tls *libc.TLS, nfa uintptr, s uintptr, stmp uintptr, depth int32) { /* regc_nfa.c:1298:1: */
	var a uintptr

	if (*State)(unsafe.Pointer(s)).Ftmp != uintptr(0) {
		return // already done
	}

	(*State)(unsafe.Pointer(s)).Ftmp = func() uintptr {
		if stmp == uintptr(0) {
			return newstate(tls, nfa)
		}
		return stmp
	}()
	if (*State)(unsafe.Pointer(s)).Ftmp == uintptr(0) {

		return
	}

	// Arbitrary depth limit. Needs tuning, but this value is sufficient to
	// make all normal tests (not reg-33.14) pass.

	if libc.PostIncInt32(&depth, 1) > DUPTRAVERSE_MAX_DEPTH {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
			}
			return REG_ESPACE
		}()
	}

	for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		duptraverse(tls, nfa, (*Arc)(unsafe.Pointer(a)).Fto, uintptr(0), depth)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
			break
		}

		cparc(tls, nfa, a, (*State)(unsafe.Pointer(s)).Ftmp, (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(a)).Fto)).Ftmp)
	}
}

//
//  - cleartraverse - recursive cleanup for algorithms that leave tmp ptrs set
//  ^ static void cleartraverse(struct nfa *, struct state *);
//
func cleartraverse(tls *libc.TLS, nfa uintptr, s uintptr) { /* regc_nfa.c:1343:1: */
	var a uintptr

	if (*State)(unsafe.Pointer(s)).Ftmp == uintptr(0) {
		return
	}
	(*State)(unsafe.Pointer(s)).Ftmp = uintptr(0)

	for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		cleartraverse(tls, nfa, (*Arc)(unsafe.Pointer(a)).Fto)
	}
}

//
//  - specialcolors - fill in special colors for an NFA
//  ^ static void specialcolors(struct nfa *);
//
func specialcolors(tls *libc.TLS, nfa uintptr) { /* regc_nfa.c:1364:1: */
	// False colors for BOS, BOL, EOS, EOL

	if (*Nfa)(unsafe.Pointer(nfa)).Fparent == uintptr(0) {
		*(*Color)(unsafe.Pointer(nfa + 72)) = pseudocolor(tls, (*Nfa)(unsafe.Pointer(nfa)).Fcm)
		*(*Color)(unsafe.Pointer(nfa + 72 + 1*2)) = pseudocolor(tls, (*Nfa)(unsafe.Pointer(nfa)).Fcm)
		*(*Color)(unsafe.Pointer(nfa + 76)) = pseudocolor(tls, (*Nfa)(unsafe.Pointer(nfa)).Fcm)
		*(*Color)(unsafe.Pointer(nfa + 76 + 1*2)) = pseudocolor(tls, (*Nfa)(unsafe.Pointer(nfa)).Fcm)
	} else {

		*(*Color)(unsafe.Pointer(nfa + 72)) = *(*Color)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fparent + 72))

		*(*Color)(unsafe.Pointer(nfa + 72 + 1*2)) = *(*Color)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fparent + 72 + 1*2))

		*(*Color)(unsafe.Pointer(nfa + 76)) = *(*Color)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fparent + 76))

		*(*Color)(unsafe.Pointer(nfa + 76 + 1*2)) = *(*Color)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fparent + 76 + 1*2))
	}
}

//
//  - optimize - optimize an NFA
//  ^ static long optimize(struct nfa *, FILE *);
//

// The main goal of this function is not so much "optimization" (though it
// does try to get rid of useless NFA states) as reducing the NFA to a form
// the regex executor can handle.  The executor, and indeed the cNFA format
// that is its input, can only handle PLAIN and LACON arcs.  The output of
// the regex parser also includes EMPTY (do-nothing) arcs, as well as
// ^, $, AHEAD, and BEHIND constraint arcs, which we must get rid of here.
// We first get rid of EMPTY arcs and then deal with the constraint arcs.
// The hardest part of either job is to get rid of circular loops of the
// target arc type.  We would have to do that in any case, though, as such a
// loop would otherwise allow the executor to cycle through the loop endlessly
// without making any progress in the input string.
func optimize(tls *libc.TLS, nfa uintptr, f uintptr) int32 { /* regc_nfa.c:1407:1: */
	var verbose int32
	if f != uintptr(0) {
		verbose = 1
	} else {
		verbose = 0
	}

	if verbose != 0 {
		libc.Xfprintf(tls, f, ts+947, 0)
	}
	cleanup(tls, nfa) // may simplify situation
	if verbose != 0 {
		dumpnfa(tls, nfa, f)
	}
	if verbose != 0 {
		libc.Xfprintf(tls, f, ts+966, 0)
	}
	fixempties(tls, nfa, f) // get rid of EMPTY arcs
	if verbose != 0 {
		libc.Xfprintf(tls, f, ts+977, 0)
	}
	fixconstraintloops(tls, nfa, f) // get rid of constraint loops
	pullback(tls, nfa, f)           // pull back constraints backward
	pushfwd(tls, nfa, f)            // push fwd constraints forward
	if verbose != 0 {
		libc.Xfprintf(tls, f, ts+992, 0)
	}
	cleanup(tls, nfa)        // final tidying
	return analyze(tls, nfa) // and analysis
}

//
//  - pullback - pull back constraints backward to eliminate them
//  ^ static void pullback(struct nfa *, FILE *);
//
func pullback(tls *libc.TLS, nfa uintptr, f uintptr) { /* regc_nfa.c:1447:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var s uintptr
	var nexts uintptr
	var a uintptr
	var nexta uintptr
	// var intermediates uintptr at bp, 8

	var progress int32

	// Find and pull until there are no more.

	for ok := true; ok; ok = progress != 0 && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0) {
		progress = 0
		for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0) && !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); s = nexts {
			nexts = (*State)(unsafe.Pointer(s)).Fnext
			*(*uintptr)(unsafe.Pointer(bp /* intermediates */)) = uintptr(0)
			for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0) && !((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); a = nexta {
				nexta = (*Arc)(unsafe.Pointer(a)).Foutchain
				if (*Arc)(unsafe.Pointer(a)).Ftype == '^' || (*Arc)(unsafe.Pointer(a)).Ftype == 'r' {
					if pull(tls, nfa, a, bp) != 0 {
						progress = 1
					}
				}

			}
			// clear tmp fields of intermediate states created here
			for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
				var ns uintptr = (*State)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* intermediates */)))).Ftmp

				(*State)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* intermediates */)))).Ftmp = uintptr(0)
				*(*uintptr)(unsafe.Pointer(bp /* intermediates */)) = ns
			}
			// if s is now useless, get rid of it
			if ((*State)(unsafe.Pointer(s)).Fnins == 0 || (*State)(unsafe.Pointer(s)).Fnouts == 0) && !(int32((*State)(unsafe.Pointer(s)).Fflag) != 0) {
				dropstate(tls, nfa, s)
			}
		}
		if progress != 0 && f != uintptr(0) {
			dumpnfa(tls, nfa, f)
		}
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
		return
	}

	// Any ^ constraints we were able to pull to the start state can now be
	// replaced by PLAIN arcs referencing the BOS or BOL colors.  There should
	// be no other ^ or BEHIND arcs left in the NFA, though we do not check
	// that here (compact() will fail if so).
	for a = (*State)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fpre)).Fouts; a != uintptr(0); a = nexta {
		nexta = (*Arc)(unsafe.Pointer(a)).Foutchain
		if (*Arc)(unsafe.Pointer(a)).Ftype == '^' {

			newarc(tls, nfa, 'p', int32(*(*Color)(unsafe.Pointer(nfa + 72 + uintptr((*Arc)(unsafe.Pointer(a)).Fco)*2))), (*Arc)(unsafe.Pointer(a)).Ffrom, (*Arc)(unsafe.Pointer(a)).Fto)
			freearc(tls, nfa, a)
		}
	}
}

//
//  - pull - pull a back constraint backward past its source state
//  *
//  * Returns 1 if successful (which it always is unless the source is the
//  * start state or we have an internal error), 0 if nothing happened.
//  *
//  * A significant property of this function is that it deletes no pre-existing
//  * states, and no outarcs of the constraint's from state other than the given
//  * constraint arc.  This makes the loops in pullback() safe, at the cost that
//  * we may leave useless states behind.  Therefore, we leave it to pullback()
//  * to delete such states.
//  *
//  * If the from state has multiple back-constraint outarcs, and/or multiple
//  * compatible constraint inarcs, we only need to create one new intermediate
//  * state per combination of predecessor and successor states.  *intermediates
//  * points to a list of such intermediate states for this from state (chained
//  * through their tmp fields).
//  ^ static int pull(struct nfa *, struct arc *);
//
func pull(tls *libc.TLS, nfa uintptr, con uintptr, intermediates uintptr) int32 { /* regc_nfa.c:1532:1: */
	var from uintptr = (*Arc)(unsafe.Pointer(con)).Ffrom
	var to uintptr = (*Arc)(unsafe.Pointer(con)).Fto
	var a uintptr
	var nexta uintptr
	var s uintptr

	// should have gotten rid of this earlier
	if (*State)(unsafe.Pointer(from)).Fflag != 0 { // can't pull back beyond start
		return 0
	}
	if (*State)(unsafe.Pointer(from)).Fnins == 0 { // unreachable
		freearc(tls, nfa, con)
		return 1
	}

	// First, clone from state if necessary to avoid other outarcs.  This may
	// seem wasteful, but it simplifies the logic, and we'll get rid of the
	// clone state again at the bottom.

	if (*State)(unsafe.Pointer(from)).Fnouts > 1 {
		s = newstate(tls, nfa)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
			return 0
		}
		copyins(tls, nfa, from, s)  // duplicate inarcs
		cparc(tls, nfa, con, s, to) // move constraint arc
		freearc(tls, nfa, con)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
			return 0
		}
		from = s
		con = (*State)(unsafe.Pointer(from)).Fouts
	}

	// Propagate the constraint into the from state's inarcs.

	for a = (*State)(unsafe.Pointer(from)).Fins; a != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); a = nexta {
		nexta = (*Arc)(unsafe.Pointer(a)).Finchain
		switch combine(tls, con, a) {
		case INCOMPATIBLE: // destroy the arc
			freearc(tls, nfa, a)
			break
		case SATISFIED: // no action needed
			break
		case COMPATIBLE: // swap the two arcs, more or less
			// need an intermediate state, but might have one already
			for s = *(*uintptr)(unsafe.Pointer(intermediates)); s != uintptr(0); s = (*State)(unsafe.Pointer(s)).Ftmp {

				if (*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(s)).Fins)).Ffrom == (*Arc)(unsafe.Pointer(a)).Ffrom && (*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(s)).Fouts)).Fto == to {
					break
				}
			}
			if s == uintptr(0) {
				s = newstate(tls, nfa)
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return 0
				}
				(*State)(unsafe.Pointer(s)).Ftmp = *(*uintptr)(unsafe.Pointer(intermediates))
				*(*uintptr)(unsafe.Pointer(intermediates)) = s
			}
			cparc(tls, nfa, con, (*Arc)(unsafe.Pointer(a)).Ffrom, s)
			cparc(tls, nfa, a, s, to)
			freearc(tls, nfa, a)
			break
		default:

			break
		}
	}

	// Remaining inarcs, if any, incorporate the constraint.

	moveins(tls, nfa, from, to)
	freearc(tls, nfa, con)
	// from state is now useless, but we leave it to pullback() to clean up
	return 1
}

//
//  - pushfwd - push forward constraints forward to eliminate them
//  ^ static void pushfwd(struct nfa *, FILE *);
//
func pushfwd(tls *libc.TLS, nfa uintptr, f uintptr) { /* regc_nfa.c:1627:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var s uintptr
	var nexts uintptr
	var a uintptr
	var nexta uintptr
	// var intermediates uintptr at bp, 8

	var progress int32

	// Find and push until there are no more.

	for ok := true; ok; ok = progress != 0 && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0) {
		progress = 0
		for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0) && !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); s = nexts {
			nexts = (*State)(unsafe.Pointer(s)).Fnext
			*(*uintptr)(unsafe.Pointer(bp /* intermediates */)) = uintptr(0)
			for a = (*State)(unsafe.Pointer(s)).Fins; a != uintptr(0) && !((*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); a = nexta {
				nexta = (*Arc)(unsafe.Pointer(a)).Finchain
				if (*Arc)(unsafe.Pointer(a)).Ftype == '$' || (*Arc)(unsafe.Pointer(a)).Ftype == 'a' {
					if push(tls, nfa, a, bp) != 0 {
						progress = 1
					}
				}
			}
			// clear tmp fields of intermediate states created here
			for *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
				var ns uintptr = (*State)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* intermediates */)))).Ftmp

				(*State)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* intermediates */)))).Ftmp = uintptr(0)
				*(*uintptr)(unsafe.Pointer(bp /* intermediates */)) = ns
			}
			// if s is now useless, get rid of it
			if ((*State)(unsafe.Pointer(s)).Fnins == 0 || (*State)(unsafe.Pointer(s)).Fnouts == 0) && !(int32((*State)(unsafe.Pointer(s)).Fflag) != 0) {
				dropstate(tls, nfa, s)
			}
		}
		if progress != 0 && f != uintptr(0) {
			dumpnfa(tls, nfa, f)
		}
	}
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
		return
	}

	// Any $ constraints we were able to push to the post state can now be
	// replaced by PLAIN arcs referencing the EOS or EOL colors.  There should
	// be no other $ or AHEAD arcs left in the NFA, though we do not check
	// that here (compact() will fail if so).
	for a = (*State)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fpost)).Fins; a != uintptr(0); a = nexta {
		nexta = (*Arc)(unsafe.Pointer(a)).Finchain
		if (*Arc)(unsafe.Pointer(a)).Ftype == '$' {

			newarc(tls, nfa, 'p', int32(*(*Color)(unsafe.Pointer(nfa + 76 + uintptr((*Arc)(unsafe.Pointer(a)).Fco)*2))), (*Arc)(unsafe.Pointer(a)).Ffrom, (*Arc)(unsafe.Pointer(a)).Fto)
			freearc(tls, nfa, a)
		}
	}
}

//
//  - push - push a forward constraint forward past its destination state
//  *
//  * Returns 1 if successful (which it always is unless the destination is the
//  * post state or we have an internal error), 0 if nothing happened.
//  *
//  * A significant property of this function is that it deletes no pre-existing
//  * states, and no inarcs of the constraint's to state other than the given
//  * constraint arc.  This makes the loops in pushfwd() safe, at the cost that
//  * we may leave useless states behind.  Therefore, we leave it to pushfwd()
//  * to delete such states.
//  *
//  * If the to state has multiple forward-constraint inarcs, and/or multiple
//  * compatible constraint outarcs, we only need to create one new intermediate
//  * state per combination of predecessor and successor states.  *intermediates
//  * points to a list of such intermediate states for this to state (chained
//  * through their tmp fields).
//  ^ static int push(struct nfa *, struct arc *);
//
func push(tls *libc.TLS, nfa uintptr, con uintptr, intermediates uintptr) int32 { /* regc_nfa.c:1711:1: */
	var from uintptr = (*Arc)(unsafe.Pointer(con)).Ffrom
	var to uintptr = (*Arc)(unsafe.Pointer(con)).Fto
	var a uintptr
	var nexta uintptr
	var s uintptr

	// should have gotten rid of this earlier
	if (*State)(unsafe.Pointer(to)).Fflag != 0 { // can't push forward beyond end
		return 0
	}
	if (*State)(unsafe.Pointer(to)).Fnouts == 0 { // dead end
		freearc(tls, nfa, con)
		return 1
	}

	// First, clone to state if necessary to avoid other inarcs.  This may
	// seem wasteful, but it simplifies the logic, and we'll get rid of the
	// clone state again at the bottom.

	if (*State)(unsafe.Pointer(to)).Fnins > 1 {
		s = newstate(tls, nfa)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
			return 0
		}
		copyouts(tls, nfa, to, s)     // duplicate outarcs
		cparc(tls, nfa, con, from, s) // move constraint arc
		freearc(tls, nfa, con)
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
			return 0
		}
		to = s
		con = (*State)(unsafe.Pointer(to)).Fins
	}

	// Propagate the constraint into the to state's outarcs.

	for a = (*State)(unsafe.Pointer(to)).Fouts; a != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); a = nexta {
		nexta = (*Arc)(unsafe.Pointer(a)).Foutchain
		switch combine(tls, con, a) {
		case INCOMPATIBLE: // destroy the arc
			freearc(tls, nfa, a)
			break
		case SATISFIED: // no action needed
			break
		case COMPATIBLE: // swap the two arcs, more or less
			// need an intermediate state, but might have one already
			for s = *(*uintptr)(unsafe.Pointer(intermediates)); s != uintptr(0); s = (*State)(unsafe.Pointer(s)).Ftmp {

				if (*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(s)).Fins)).Ffrom == from && (*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(s)).Fouts)).Fto == (*Arc)(unsafe.Pointer(a)).Fto {
					break
				}
			}
			if s == uintptr(0) {
				s = newstate(tls, nfa)
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return 0
				}
				(*State)(unsafe.Pointer(s)).Ftmp = *(*uintptr)(unsafe.Pointer(intermediates))
				*(*uintptr)(unsafe.Pointer(intermediates)) = s
			}
			cparc(tls, nfa, con, s, (*Arc)(unsafe.Pointer(a)).Fto)
			cparc(tls, nfa, a, from, s)
			freearc(tls, nfa, a)
			break
		default:

			break
		}
	}

	// Remaining outarcs, if any, incorporate the constraint.

	moveouts(tls, nfa, to, from)
	freearc(tls, nfa, con)
	// to state is now useless, but we leave it to pushfwd() to clean up
	return 1
}

//
//  - combine - constraint lands on an arc, what happens?
//  ^ #def	INCOMPATIBLE	1	// destroys arc
//  ^ #def	SATISFIED	2	// constraint satisfied
//  ^ #def	COMPATIBLE	3	// compatible but not satisfied yet
//  ^ static int combine(struct arc *, struct arc *);
//
func combine(tls *libc.TLS, con uintptr, a uintptr) int32 { /* regc_nfa.c:1809:1: */

	switch (*Arc)(unsafe.Pointer(con)).Ftype<<8 | (*Arc)(unsafe.Pointer(a)).Ftype {
	case int32('^')<<8 | 'p':
		fallthrough // newlines are handled separately
	case int32('$')<<8 | 'p':
		return INCOMPATIBLE
		break
	case int32('a')<<8 | 'p':
		fallthrough // color constraints meet colors
	case int32('r')<<8 | 'p':
		if int32((*Arc)(unsafe.Pointer(con)).Fco) == int32((*Arc)(unsafe.Pointer(a)).Fco) {
			return SATISFIED
		}
		return INCOMPATIBLE
		break
	case int32('^')<<8 | '^':
		fallthrough // collision, similar constraints
	case int32('$')<<8 | '$':
		fallthrough
	case int32('a')<<8 | 'a':
		fallthrough
	case int32('r')<<8 | 'r':
		if int32((*Arc)(unsafe.Pointer(con)).Fco) == int32((*Arc)(unsafe.Pointer(a)).Fco) { // true duplication
			return SATISFIED
		}
		return INCOMPATIBLE
		break
	case int32('^')<<8 | 'r':
		fallthrough // collision, dissimilar constraints
	case int32('r')<<8 | '^':
		fallthrough
	case int32('$')<<8 | 'a':
		fallthrough
	case int32('a')<<8 | '$':
		return INCOMPATIBLE
		break
	case int32('^')<<8 | '$':
		fallthrough // constraints passing each other
	case int32('^')<<8 | 'a':
		fallthrough
	case int32('r')<<8 | '$':
		fallthrough
	case int32('r')<<8 | 'a':
		fallthrough
	case int32('$')<<8 | '^':
		fallthrough
	case int32('$')<<8 | 'r':
		fallthrough
	case int32('a')<<8 | '^':
		fallthrough
	case int32('a')<<8 | 'r':
		fallthrough
	case int32('^')<<8 | 'L':
		fallthrough
	case int32('r')<<8 | 'L':
		fallthrough
	case int32('$')<<8 | 'L':
		fallthrough
	case int32('a')<<8 | 'L':
		return COMPATIBLE
		break
	}

	return INCOMPATIBLE // for benefit of blind compilers
}

//
//  - fixempties - get rid of EMPTY arcs
//  ^ static void fixempties(struct nfa *, FILE *);
//
func fixempties(tls *libc.TLS, nfa uintptr, f uintptr) { /* regc_nfa.c:1866:1: */
	var s uintptr
	var s2 uintptr
	var nexts uintptr
	var a uintptr
	var nexta uintptr
	var totalinarcs int32
	var inarcsorig uintptr
	var arcarray uintptr
	var arccount int32
	var prevnins int32
	var nskip int32

	// First, get rid of any states whose sole out-arc is an EMPTY,
	// since they're basically just aliases for their successor.  The
	// parsing algorithm creates enough of these that it's worth
	// special-casing this.
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); s = nexts {
		nexts = (*State)(unsafe.Pointer(s)).Fnext
		if (*State)(unsafe.Pointer(s)).Fflag != 0 || (*State)(unsafe.Pointer(s)).Fnouts != 1 {
			continue
		}
		a = (*State)(unsafe.Pointer(s)).Fouts

		if (*Arc)(unsafe.Pointer(a)).Ftype != 'n' {
			continue
		}
		if s != (*Arc)(unsafe.Pointer(a)).Fto {
			moveins(tls, nfa, s, (*Arc)(unsafe.Pointer(a)).Fto)
		}
		dropstate(tls, nfa, s)
	}

	// Similarly, get rid of any state with a single EMPTY in-arc, by
	// folding it into its predecessor.
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); s = nexts {
		nexts = (*State)(unsafe.Pointer(s)).Fnext
		// Ensure tmp fields are clear for next step

		if (*State)(unsafe.Pointer(s)).Fflag != 0 || (*State)(unsafe.Pointer(s)).Fnins != 1 {
			continue
		}
		a = (*State)(unsafe.Pointer(s)).Fins

		if (*Arc)(unsafe.Pointer(a)).Ftype != 'n' {
			continue
		}
		if s != (*Arc)(unsafe.Pointer(a)).Ffrom {
			moveouts(tls, nfa, s, (*Arc)(unsafe.Pointer(a)).Ffrom)
		}
		dropstate(tls, nfa, s)
	}

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
		return
	}

	// For each remaining NFA state, find all other states from which it is
	// reachable by a chain of one or more EMPTY arcs.  Then generate new arcs
	// that eliminate the need for each such chain.
	//
	// We could replace a chain of EMPTY arcs that leads from a "from" state
	// to a "to" state either by pushing non-EMPTY arcs forward (linking
	// directly from "from"'s predecessors to "to") or by pulling them back
	// (linking directly from "from" to "to"'s successors).  We choose to
	// always do the former; this choice is somewhat arbitrary, but the
	// approach below requires that we uniformly do one or the other.
	//
	// Suppose we have a chain of N successive EMPTY arcs (where N can easily
	// approach the size of the NFA).  All of the intermediate states must
	// have additional inarcs and outarcs, else they'd have been removed by
	// the steps above.  Assuming their inarcs are mostly not empties, we will
	// add O(N^2) arcs to the NFA, since a non-EMPTY inarc leading to any one
	// state in the chain must be duplicated to lead to all its successor
	// states as well.  So there is no hope of doing less than O(N^2) work;
	// however, we should endeavor to keep the big-O cost from being even
	// worse than that, which it can easily become without care.  In
	// particular, suppose we were to copy all S1's inarcs forward to S2, and
	// then also to S3, and then later we consider pushing S2's inarcs forward
	// to S3.  If we include the arcs already copied from S1 in that, we'd be
	// doing O(N^3) work.  (The duplicate-arc elimination built into newarc()
	// and its cohorts would get rid of the extra arcs, but not without cost.)
	//
	// We can avoid this cost by treating only arcs that existed at the start
	// of this phase as candidates to be pushed forward.  To identify those,
	// we remember the first inarc each state had to start with.  We rely on
	// the fact that newarc() and friends put new arcs on the front of their
	// to-states' inchains, and that this phase never deletes arcs, so that
	// the original arcs must be the last arcs in their to-states' inchains.
	//
	// So the process here is that, for each state in the NFA, we gather up
	// all non-EMPTY inarcs of states that can reach the target state via
	// EMPTY arcs.  We then sort, de-duplicate, and merge these arcs into the
	// target state's inchain.  (We can safely use sort-merge for this as long
	// as we update each state's original-arcs pointer after we add arcs to
	// it; the sort step of mergeins probably changed the order of the old
	// arcs.)
	//
	// Another refinement worth making is that, because we only add non-EMPTY
	// arcs during this phase, and all added arcs have the same from-state as
	// the non-EMPTY arc they were cloned from, we know ahead of time that any
	// states having only EMPTY outarcs will be useless for lack of outarcs
	// after we drop the EMPTY arcs.  (They cannot gain non-EMPTY outarcs if
	// they had none to start with.)  So we need not bother to update the
	// inchains of such states at all.

	// Remember the states' first original inarcs
	// ... and while at it, count how many old inarcs there are altogether
	inarcsorig = XTclpAlloc(tls, uint32(uint64((*Nfa)(unsafe.Pointer(nfa)).Fnstates)*uint64(unsafe.Sizeof(uintptr(0)))))
	if inarcsorig == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
			}
			return REG_ESPACE
		}()
		return
	}
	totalinarcs = 0
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0); s = (*State)(unsafe.Pointer(s)).Fnext {
		*(*uintptr)(unsafe.Pointer(inarcsorig + uintptr((*State)(unsafe.Pointer(s)).Fno)*8)) = (*State)(unsafe.Pointer(s)).Fins
		totalinarcs = totalinarcs + (*State)(unsafe.Pointer(s)).Fnins
	}

	// Create a workspace for accumulating the inarcs to be added to the
	// current target state.  totalinarcs is probably a considerable
	// overestimate of the space needed, but the NFA is unlikely to be large
	// enough at this point to make it worth being smarter.
	arcarray = XTclpAlloc(tls, uint32(uint64(totalinarcs)*uint64(unsafe.Sizeof(uintptr(0)))))
	if arcarray == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
			}
			return REG_ESPACE
		}()
		XTclpFree(tls, inarcsorig)
		return
	}

	// And iterate over the target states
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); s = (*State)(unsafe.Pointer(s)).Fnext {
		// Ignore target states without non-EMPTY outarcs, per note above
		if !(int32((*State)(unsafe.Pointer(s)).Fflag) != 0) && !(hasnonemptyout(tls, s) != 0) {
			continue
		}

		// Find predecessor states and accumulate their original inarcs
		arccount = 0
		for s2 = emptyreachable(tls, nfa, s, s, inarcsorig); s2 != s; s2 = nexts {
			// Add s2's original inarcs to arcarray[], but ignore empties
			for a = *(*uintptr)(unsafe.Pointer(inarcsorig + uintptr((*State)(unsafe.Pointer(s2)).Fno)*8)); a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Finchain {
				if (*Arc)(unsafe.Pointer(a)).Ftype != 'n' {
					*(*uintptr)(unsafe.Pointer(arcarray + uintptr(libc.PostIncInt32(&arccount, 1))*8)) = a
				}
			}

			// Reset the tmp fields as we walk back
			nexts = (*State)(unsafe.Pointer(s2)).Ftmp
			(*State)(unsafe.Pointer(s2)).Ftmp = uintptr(0)
		}
		(*State)(unsafe.Pointer(s)).Ftmp = uintptr(0)

		// Remember how many original inarcs this state has
		prevnins = (*State)(unsafe.Pointer(s)).Fnins

		// Add non-duplicate inarcs to target state
		mergeins(tls, nfa, s, arcarray, arccount)

		// Now we must update the state's inarcsorig pointer
		nskip = (*State)(unsafe.Pointer(s)).Fnins - prevnins
		a = (*State)(unsafe.Pointer(s)).Fins
		for libc.PostDecInt32(&nskip, 1) > 0 {
			a = (*Arc)(unsafe.Pointer(a)).Finchain
		}
		*(*uintptr)(unsafe.Pointer(inarcsorig + uintptr((*State)(unsafe.Pointer(s)).Fno)*8)) = a
	}

	XTclpFree(tls, arcarray)
	XTclpFree(tls, inarcsorig)

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
		return
	}

	// Remove all the EMPTY arcs, since we don't need them anymore.
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0); s = (*State)(unsafe.Pointer(s)).Fnext {
		for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = nexta {
			nexta = (*Arc)(unsafe.Pointer(a)).Foutchain
			if (*Arc)(unsafe.Pointer(a)).Ftype == 'n' {
				freearc(tls, nfa, a)
			}
		}
	}

	// And remove any states that have become useless.  (This cleanup is
	// not very thorough, and would be even less so if we tried to
	// combine it with the previous step; but cleanup() will take care
	// of anything we miss.)
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0); s = nexts {
		nexts = (*State)(unsafe.Pointer(s)).Fnext
		if ((*State)(unsafe.Pointer(s)).Fnins == 0 || (*State)(unsafe.Pointer(s)).Fnouts == 0) && !(int32((*State)(unsafe.Pointer(s)).Fflag) != 0) {
			dropstate(tls, nfa, s)
		}
	}

	if f != uintptr(0) {
		dumpnfa(tls, nfa, f)
	}
}

//
//  - emptyreachable - recursively find all states that can reach s by EMPTY arcs
//  * The return value is the last such state found.  Its tmp field links back
//  * to the next-to-last such state, and so on back to s, so that all these
//  * states can be located without searching the whole NFA.
//  *
//  * Since this is only used in fixempties(), we pass in the inarcsorig[] array
//  * maintained by that function.  This lets us skip over all new inarcs, which
//  * are certainly not EMPTY arcs.
//  *
//  * The maximum recursion depth here is equal to the length of the longest
//  * loop-free chain of EMPTY arcs, which is surely no more than the size of
//  * the NFA, and in practice will be less than that.
//  ^ static struct state *emptyreachable(struct state *, struct state *);
//
func emptyreachable(tls *libc.TLS, nfa uintptr, s uintptr, lastfound uintptr, inarcsorig uintptr) uintptr { /* regc_nfa.c:2098:21: */
	var a uintptr

	(*State)(unsafe.Pointer(s)).Ftmp = lastfound
	lastfound = s
	for a = *(*uintptr)(unsafe.Pointer(inarcsorig + uintptr((*State)(unsafe.Pointer(s)).Fno)*8)); a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Finchain {
		if (*Arc)(unsafe.Pointer(a)).Ftype == 'n' && (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(a)).Ffrom)).Ftmp == uintptr(0) {
			lastfound = emptyreachable(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ffrom, lastfound, inarcsorig)
		}
	}
	return lastfound
}

// isconstraintarc - detect whether an arc is of a constraint type
func isconstraintarc(tls *libc.TLS, a uintptr) int32 { /* regc_nfa.c:2121:1: */
	switch (*Arc)(unsafe.Pointer(a)).Ftype {
	case '^':
		fallthrough
	case '$':
		fallthrough
	case 'r':
		fallthrough
	case 'a':
		fallthrough
	case 'L':
		return 1
	}
	return 0
}

// hasconstraintout - does state have a constraint out arc?
func hasconstraintout(tls *libc.TLS, s uintptr) int32 { /* regc_nfa.c:2139:1: */
	var a uintptr

	for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		if isconstraintarc(tls, a) != 0 {
			return 1
		}
	}
	return 0
}

// fixconstraintloops - get rid of loops containing only constraint arcs
//
// A loop of states that contains only constraint arcs is useless, since
// passing around the loop represents no forward progress.  Moreover, it
// would cause infinite looping in pullback/pushfwd, so we need to get rid
// of such loops before doing that.
func fixconstraintloops(tls *libc.TLS, nfa uintptr, f uintptr) { /* regc_nfa.c:2160:1: */
	var s uintptr
	var nexts uintptr
	var a uintptr
	var nexta uintptr
	var hasconstraints int32

	// In the trivial case of a state that loops to itself, we can just drop
	// the constraint arc altogether.  This is worth special-casing because
	// such loops are far more common than loops containing multiple states.
	// While we're at it, note whether any constraint arcs survive.
	hasconstraints = 0
	s = (*Nfa)(unsafe.Pointer(nfa)).Fstates
__1:
	if !(s != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0)) {
		goto __3
	}
	nexts = (*State)(unsafe.Pointer(s)).Fnext
	// while we're at it, ensure tmp fields are clear for next step

	a = (*State)(unsafe.Pointer(s)).Fouts
__4:
	if !(a != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0)) {
		goto __6
	}
	nexta = (*Arc)(unsafe.Pointer(a)).Foutchain
	if !(isconstraintarc(tls, a) != 0) {
		goto __7
	}
	if !((*Arc)(unsafe.Pointer(a)).Fto == s) {
		goto __8
	}
	freearc(tls, nfa, a)
	goto __9
__8:
	hasconstraints = 1
__9:
	;
__7:
	;
	goto __5
__5:
	a = nexta
	goto __4
	goto __6
__6:
	;
	// If we removed all the outarcs, the state is useless.
	if !((*State)(unsafe.Pointer(s)).Fnouts == 0 && !(int32((*State)(unsafe.Pointer(s)).Fflag) != 0)) {
		goto __10
	}
	dropstate(tls, nfa, s)
__10:
	;
	goto __2
__2:
	s = nexts
	goto __1
	goto __3
__3:
	;

	// Nothing to do if no remaining constraint arcs
	if !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 || !(hasconstraints != 0)) {
		goto __11
	}
	return
__11:
	;

	// Starting from each remaining NFA state, search outwards for a
	// constraint loop.  If we find a loop, break the loop, then start the
	// search over.  (We could possibly retain some state from the first scan,
	// but it would complicate things greatly, and multi-state constraint
	// loops are rare enough that it's not worth optimizing the case.)
restart:
	s = (*Nfa)(unsafe.Pointer(nfa)).Fstates
__12:
	if !(s != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0)) {
		goto __14
	}
	if !(findconstraintloop(tls, nfa, s) != 0) {
		goto __15
	}
	goto restart
__15:
	;
	goto __13
__13:
	s = (*State)(unsafe.Pointer(s)).Fnext
	goto __12
	goto __14
__14:
	;

	if !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0) {
		goto __16
	}
	return
__16:
	;

	// Now remove any states that have become useless.  (This cleanup is not
	// very thorough, and would be even less so if we tried to combine it with
	// the previous step; but cleanup() will take care of anything we miss.)
	//
	// Because findconstraintloop intentionally doesn't reset all tmp fields,
	// we have to clear them after it's done.  This is a convenient place to
	// do that, too.
	s = (*Nfa)(unsafe.Pointer(nfa)).Fstates
__17:
	if !(s != uintptr(0)) {
		goto __19
	}
	nexts = (*State)(unsafe.Pointer(s)).Fnext
	(*State)(unsafe.Pointer(s)).Ftmp = uintptr(0)
	if !(((*State)(unsafe.Pointer(s)).Fnins == 0 || (*State)(unsafe.Pointer(s)).Fnouts == 0) && !(int32((*State)(unsafe.Pointer(s)).Fflag) != 0)) {
		goto __20
	}
	dropstate(tls, nfa, s)
__20:
	;
	goto __18
__18:
	s = nexts
	goto __17
	goto __19
__19:
	;

	if !(f != uintptr(0)) {
		goto __21
	}
	dumpnfa(tls, nfa, f)
__21:
}

// findconstraintloop - recursively find a loop of constraint arcs
//
// If we find a loop, break it by calling breakconstraintloop(), then
// return 1; otherwise return 0.
//
// State tmp fields are guaranteed all NULL on a success return, because
// breakconstraintloop does that.  After a failure return, any state that
// is known not to be part of a loop is marked with s->tmp == s; this allows
// us not to have to re-prove that fact on later calls.  (This convention is
// workable because we already eliminated single-state loops.)
//
// Note that the found loop doesn't necessarily include the first state we
// are called on.  Any loop reachable from that state will do.
//
// The maximum recursion depth here is one more than the length of the longest
// loop-free chain of constraint arcs, which is surely no more than the size
// of the NFA, and in practice will be a lot less than that.
func findconstraintloop(tls *libc.TLS, nfa uintptr, s uintptr) int32 { /* regc_nfa.c:2262:1: */
	var a uintptr

	// Since this is recursive, it could be driven to stack overflow
	if 0 != 0 {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
			}
			return REG_ETOOBIG
		}()
		return 1 // to exit as quickly as possible
	}

	if (*State)(unsafe.Pointer(s)).Ftmp != uintptr(0) {
		// Already proven uninteresting?
		if (*State)(unsafe.Pointer(s)).Ftmp == s {
			return 0
		}
		// Found a loop involving s
		breakconstraintloop(tls, nfa, s)
		// The tmp fields have been cleaned up by breakconstraintloop
		return 1
	}
	for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		if isconstraintarc(tls, a) != 0 {
			var sto uintptr = (*Arc)(unsafe.Pointer(a)).Fto

			(*State)(unsafe.Pointer(s)).Ftmp = sto
			if findconstraintloop(tls, nfa, sto) != 0 {
				return 1
			}
		}
	}

	// If we get here, no constraint loop exists leading out from s.  Mark it
	// with s->tmp == s so we need not rediscover that fact again later.
	(*State)(unsafe.Pointer(s)).Ftmp = s
	return 0
}

// breakconstraintloop - break a loop of constraint arcs
//
// sinitial is any one member state of the loop.  Each loop member's tmp
// field links to its successor within the loop.  (Note that this function
// will reset all the tmp fields to NULL.)
//
// We can break the loop by, for any one state S1 in the loop, cloning its
// loop successor state S2 (and possibly following states), and then moving
// all S1->S2 constraint arcs to point to the cloned S2.  The cloned S2 should
// copy any non-constraint outarcs of S2.  Constraint outarcs should be
// dropped if they point back to S1, else they need to be copied as arcs to
// similarly cloned states S3, S4, etc.  In general, each cloned state copies
// non-constraint outarcs, drops constraint outarcs that would lead to itself
// or any earlier cloned state, and sends other constraint outarcs to newly
// cloned states.  No cloned state will have any inarcs that aren't constraint
// arcs or do not lead from S1 or earlier-cloned states.  It's okay to drop
// constraint back-arcs since they would not take us to any state we've not
// already been in; therefore, no new constraint loop is created.  In this way
// we generate a modified NFA that can still represent every useful state
// sequence, but not sequences that represent state loops with no consumption
// of input data.  Note that the set of cloned states will certainly include
// all of the loop member states other than S1, and it may also include
// non-loop states that are reachable from S2 via constraint arcs.  This is
// important because there is no guarantee that findconstraintloop found a
// maximal loop (and searching for one would be NP-hard, so don't try).
// Frequently the "non-loop states" are actually part of a larger loop that
// we didn't notice, and indeed there may be several overlapping loops.
// This technique ensures convergence in such cases, while considering only
// the originally-found loop does not.
//
// If there is only one S1->S2 constraint arc, then that constraint is
// certainly satisfied when we enter any of the clone states.  This means that
// in the common case where many of the constraint arcs are identically
// labeled, we can merge together clone states linked by a similarly-labeled
// constraint: if we can get to the first one we can certainly get to the
// second, so there's no need to distinguish.  This greatly reduces the number
// of new states needed, so we preferentially break the given loop at a state
// pair where this is true.
//
// Furthermore, it's fairly common to find that a cloned successor state has
// no outarcs, especially if we're a bit aggressive about removing unnecessary
// outarcs.  If that happens, then there is simply not any interesting state
// that can be reached through the predecessor's loop arcs, which means we can
// break the loop just by removing those loop arcs, with no new states added.
func breakconstraintloop(tls *libc.TLS, nfa uintptr, sinitial uintptr) { /* regc_nfa.c:2349:1: */
	var s uintptr
	var shead uintptr
	var stail uintptr
	var sclone uintptr
	var nexts uintptr
	var refarc uintptr
	var a uintptr
	var nexta uintptr

	// Start by identifying which loop step we want to break at.
	// Preferentially this is one with only one constraint arc.  (XXX are
	// there any other secondary heuristics we want to use here?)  Set refarc
	// to point to the selected lone constraint arc, if there is one.
	refarc = uintptr(0)
	s = sinitial
	for ok := true; ok; ok = s != sinitial {
		nexts = (*State)(unsafe.Pointer(s)).Ftmp
		// should not see any one-element loops
		if refarc == uintptr(0) {
			var narcs int32 = 0

			for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
				if (*Arc)(unsafe.Pointer(a)).Fto == nexts && isconstraintarc(tls, a) != 0 {
					refarc = a
					narcs++
				}
			}

			if narcs > 1 {
				refarc = uintptr(0) // multiple constraint arcs here, no good
			}
		}
		s = nexts
	}

	if refarc != 0 {
		// break at the refarc
		shead = (*Arc)(unsafe.Pointer(refarc)).Ffrom
		stail = (*Arc)(unsafe.Pointer(refarc)).Fto

	} else {
		// for lack of a better idea, break after sinitial
		shead = sinitial
		stail = (*State)(unsafe.Pointer(sinitial)).Ftmp
	}

	// Reset the tmp fields so that we can use them for local storage in
	// clonesuccessorstates.  (findconstraintloop won't mind, since it's just
	// going to abandon its search anyway.)
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0); s = (*State)(unsafe.Pointer(s)).Fnext {
		(*State)(unsafe.Pointer(s)).Ftmp = uintptr(0)
	}

	// Recursively build clone state(s) as needed.
	sclone = newstate(tls, nfa)
	if sclone == uintptr(0) {

		return
	}

	clonesuccessorstates(tls, nfa, stail, sclone, shead, refarc,
		uintptr(0), uintptr(0), (*Nfa)(unsafe.Pointer(nfa)).Fnstates)

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
		return
	}

	// It's possible that sclone has no outarcs at all, in which case it's
	// useless.  (We don't try extremely hard to get rid of useless states
	// here, but this is an easy and fairly common case.)
	if (*State)(unsafe.Pointer(sclone)).Fnouts == 0 {
		freestate(tls, nfa, sclone)
		sclone = uintptr(0)
	}

	// Move shead's constraint-loop arcs to point to sclone, or just drop them
	// if we discovered we don't need sclone.
	for a = (*State)(unsafe.Pointer(shead)).Fouts; a != uintptr(0); a = nexta {
		nexta = (*Arc)(unsafe.Pointer(a)).Foutchain
		if (*Arc)(unsafe.Pointer(a)).Fto == stail && isconstraintarc(tls, a) != 0 {
			if sclone != 0 {
				cparc(tls, nfa, a, shead, sclone)
			}
			freearc(tls, nfa, a)
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				break
			}
		}
	}
}

// clonesuccessorstates - create a tree of constraint-arc successor states
//
// ssource is the state to be cloned, and sclone is the state to copy its
// outarcs into.  sclone's inarcs, if any, should already be set up.
//
// spredecessor is the original predecessor state that we are trying to build
// successors for (it may not be the immediate predecessor of ssource).
// refarc, if not NULL, is the original constraint arc that is known to have
// been traversed out of spredecessor to reach the successor(s).
//
// For each cloned successor state, we transiently create a "donemap" that is
// a boolean array showing which source states we've already visited for this
// clone state.  This prevents infinite recursion as well as useless repeat
// visits to the same state subtree (which can add up fast, since typical NFAs
// have multiple redundant arc pathways).  Each donemap is a char array
// indexed by state number.  The donemaps are all of the same size "nstates",
// which is nfa->nstates as of the start of the recursion.  This is enough to
// have entries for all pre-existing states, but *not* entries for clone
// states created during the recursion.  That's okay since we have no need to
// mark those.
//
// curdonemap is NULL when recursing to a new sclone state, or sclone's
// donemap when we are recursing without having created a new state (which we
// do when we decide we can merge a successor state into the current clone
// state).  outerdonemap is NULL at the top level and otherwise the parent
// clone state's donemap.
//
// The successor states we create and fill here form a strict tree structure,
// with each state having exactly one predecessor, except that the toplevel
// state has no inarcs as yet (breakconstraintloop will add its inarcs from
// spredecessor after we're done).  Thus, we can examine sclone's inarcs back
// to the root, plus refarc if any, to identify the set of constraints already
// known valid at the current point.  This allows us to avoid generating extra
// successor states.
func clonesuccessorstates(tls *libc.TLS, nfa uintptr, ssource uintptr, sclone uintptr, spredecessor uintptr, refarc uintptr, curdonemap uintptr, outerdonemap uintptr, nstates int32) { /* regc_nfa.c:2489:1: */
	var donemap uintptr
	var a uintptr

	// Since this is recursive, it could be driven to stack overflow
	if 0 != 0 {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
			}
			return REG_ETOOBIG
		}()
		return
	}

	// If this state hasn't already got a donemap, create one
	donemap = curdonemap
	if donemap == uintptr(0) {
		donemap = XTclpAlloc(tls, uint32(uint64(nstates)*uint64(unsafe.Sizeof(int8(0)))))
		if donemap == uintptr(0) {
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
			(*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
				}
				return REG_ESPACE
			}()
			return
		}

		if outerdonemap != uintptr(0) {
			// Not at outermost recursion level, so copy the outer level's
			// donemap; this ensures that we see states in process of being
			// visited at outer levels, or already merged into predecessor
			// states, as ones we shouldn't traverse back to.
			libc.Xmemcpy(tls, donemap, outerdonemap, uint64(nstates)*uint64(unsafe.Sizeof(int8(0))))
		} else {
			// At outermost level, only spredecessor is off-limits
			libc.Xmemset(tls, donemap, 0, uint64(nstates)*uint64(unsafe.Sizeof(int8(0))))

			*(*int8)(unsafe.Pointer(donemap + uintptr((*State)(unsafe.Pointer(spredecessor)).Fno))) = int8(1)
		}
	}

	// Mark ssource as visited in the donemap

	*(*int8)(unsafe.Pointer(donemap + uintptr((*State)(unsafe.Pointer(ssource)).Fno))) = int8(1)

	// We proceed by first cloning all of ssource's outarcs, creating new
	// clone states as needed but not doing more with them than that.  Then in
	// a second pass, recurse to process the child clone states.  This allows
	// us to have only one child clone state per reachable source state, even
	// when there are multiple outarcs leading to the same state.  Also, when
	// we do visit a child state, its set of inarcs is known exactly, which
	// makes it safe to apply the constraint-is-already-checked optimization.
	// Also, this ensures that we've merged all the states we can into the
	// current clone before we recurse to any children, thus possibly saving
	// them from making extra images of those states.
	//
	// While this function runs, child clone states of the current state are
	// marked by setting their tmp fields to point to the original state they
	// were cloned from.  This makes it possible to detect multiple outarcs
	// leading to the same state, and also makes it easy to distinguish clone
	// states from original states (which will have tmp == NULL).
	for a = (*State)(unsafe.Pointer(ssource)).Fouts; a != uintptr(0) && !((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		var sto uintptr = (*Arc)(unsafe.Pointer(a)).Fto

		// We do not consider cloning successor states that have no constraint
		// outarcs; just link to them as-is.  They cannot be part of a
		// constraint loop so there is no need to make copies.  In particular,
		// this rule keeps us from trying to clone the post state, which would
		// be a bad idea.
		if isconstraintarc(tls, a) != 0 && hasconstraintout(tls, sto) != 0 {
			var prevclone uintptr
			var canmerge int32
			var a2 uintptr

			// Back-link constraint arcs must not be followed.  Nor is there a
			// need to revisit states previously merged into this clone.

			if int32(*(*int8)(unsafe.Pointer(donemap + uintptr((*State)(unsafe.Pointer(sto)).Fno)))) != 0 {
				continue
			}

			// Check whether we already have a child clone state for this
			// source state.
			prevclone = uintptr(0)
			for a2 = (*State)(unsafe.Pointer(sclone)).Fouts; a2 != uintptr(0); a2 = (*Arc)(unsafe.Pointer(a2)).Foutchain {
				if (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(a2)).Fto)).Ftmp == sto {
					prevclone = (*Arc)(unsafe.Pointer(a2)).Fto
					break
				}
			}

			// If this arc is labeled the same as refarc, or the same as any
			// arc we must have traversed to get to sclone, then no additional
			// constraints need to be met to get to sto, so we should just
			// merge its outarcs into sclone.
			if refarc != 0 && (*Arc)(unsafe.Pointer(a)).Ftype == (*Arc)(unsafe.Pointer(refarc)).Ftype && int32((*Arc)(unsafe.Pointer(a)).Fco) == int32((*Arc)(unsafe.Pointer(refarc)).Fco) {
				canmerge = 1
			} else {
				var s uintptr

				canmerge = 0
				for s = sclone; (*State)(unsafe.Pointer(s)).Fins != 0; s = (*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(s)).Fins)).Ffrom {
					if (*State)(unsafe.Pointer(s)).Fnins == 1 && (*Arc)(unsafe.Pointer(a)).Ftype == (*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(s)).Fins)).Ftype && int32((*Arc)(unsafe.Pointer(a)).Fco) == int32((*Arc)(unsafe.Pointer((*State)(unsafe.Pointer(s)).Fins)).Fco) {
						canmerge = 1
						break
					}
				}
			}

			if canmerge != 0 {
				// We can merge into sclone.  If we previously made a child
				// clone state, drop it; there's no need to visit it.  (This
				// can happen if ssource has multiple pathways to sto, and we
				// only just now found one that is provably a no-op.)
				if prevclone != 0 {
					dropstate(tls, nfa, prevclone) // kills our outarc, too
				}

				// Recurse to merge sto's outarcs into sclone
				clonesuccessorstates(tls, nfa, sto, sclone, spredecessor, refarc,
					donemap, outerdonemap, nstates)
				// sto should now be marked as previously visited

			} else if prevclone != 0 {
				// We already have a clone state for this successor, so just
				// make another arc to it.
				cparc(tls, nfa, a, sclone, prevclone)
			} else {
				// We need to create a new successor clone state.
				var stoclone uintptr

				stoclone = newstate(tls, nfa)
				if stoclone == uintptr(0) {

					break
				}
				// Mark it as to what it's a clone of
				(*State)(unsafe.Pointer(stoclone)).Ftmp = sto
				// ... and add the outarc leading to it
				cparc(tls, nfa, a, sclone, stoclone)
			}
		} else {
			// Non-constraint outarcs just get copied to sclone, as do outarcs
			// leading to states with no constraint outarc.
			cparc(tls, nfa, a, sclone, sto)
		}
	}

	// If we are at outer level for this clone state, recurse to all its child
	// clone states, clearing their tmp fields as we go.  (If we're not
	// outermost for sclone, leave this to be done by the outer call level.)
	// Note that if we have multiple outarcs leading to the same clone state,
	// it will only be recursed-to once.
	if curdonemap == uintptr(0) {
		for a = (*State)(unsafe.Pointer(sclone)).Fouts; a != uintptr(0) && !((*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
			var stoclone uintptr = (*Arc)(unsafe.Pointer(a)).Fto
			var sto uintptr = (*State)(unsafe.Pointer(stoclone)).Ftmp

			if sto != uintptr(0) {
				(*State)(unsafe.Pointer(stoclone)).Ftmp = uintptr(0)
				clonesuccessorstates(tls, nfa, sto, stoclone, spredecessor, refarc,
					uintptr(0), donemap, nstates)
			}
		}

		// Don't forget to free sclone's donemap when done with it
		XTclpFree(tls, donemap)
	}
}

//
//  - cleanup - clean up NFA after optimizations
//  ^ static void cleanup(struct nfa *);
//
func cleanup(tls *libc.TLS, nfa uintptr) { /* regc_nfa.c:2689:1: */
	var s uintptr
	var nexts uintptr
	var n int32

	// Clear out unreachable or dead-end states. Use pre to mark reachable,
	// then post to mark can-reach-post.

	markreachable(tls, nfa, (*Nfa)(unsafe.Pointer(nfa)).Fpre, uintptr(0), (*Nfa)(unsafe.Pointer(nfa)).Fpre)
	markcanreach(tls, nfa, (*Nfa)(unsafe.Pointer(nfa)).Fpost, (*Nfa)(unsafe.Pointer(nfa)).Fpre, (*Nfa)(unsafe.Pointer(nfa)).Fpost)
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0); s = nexts {
		nexts = (*State)(unsafe.Pointer(s)).Fnext
		if (*State)(unsafe.Pointer(s)).Ftmp != (*Nfa)(unsafe.Pointer(nfa)).Fpost && !(int32((*State)(unsafe.Pointer(s)).Fflag) != 0) {
			dropstate(tls, nfa, s)
		}
	}

	cleartraverse(tls, nfa, (*Nfa)(unsafe.Pointer(nfa)).Fpre)

	// the nins==0 (final unreachable) case will be caught later

	// Renumber surviving states.

	n = 0
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0); s = (*State)(unsafe.Pointer(s)).Fnext {
		(*State)(unsafe.Pointer(s)).Fno = libc.PostIncInt32(&n, 1)
	}
	(*Nfa)(unsafe.Pointer(nfa)).Fnstates = n
}

//
//  - markreachable - recursive marking of reachable states
//  ^ static void markreachable(struct nfa *, struct state *, struct state *,
//  ^ 	struct state *);
//
func markreachable(tls *libc.TLS, nfa uintptr, s uintptr, okay uintptr, mark uintptr) { /* regc_nfa.c:2731:1: */
	var a uintptr

	if (*State)(unsafe.Pointer(s)).Ftmp != okay {
		return
	}
	(*State)(unsafe.Pointer(s)).Ftmp = mark

	for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		markreachable(tls, nfa, (*Arc)(unsafe.Pointer(a)).Fto, okay, mark)
	}
}

//
//  - markcanreach - recursive marking of states which can reach here
//  ^ static void markcanreach(struct nfa *, struct state *, struct state *,
//  ^ 	struct state *);
//
func markcanreach(tls *libc.TLS, nfa uintptr, s uintptr, okay uintptr, mark uintptr) { /* regc_nfa.c:2755:1: */
	var a uintptr

	if (*State)(unsafe.Pointer(s)).Ftmp != okay {
		return
	}
	(*State)(unsafe.Pointer(s)).Ftmp = mark

	for a = (*State)(unsafe.Pointer(s)).Fins; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Finchain {
		markcanreach(tls, nfa, (*Arc)(unsafe.Pointer(a)).Ffrom, okay, mark)
	}
}

//
//  - analyze - ascertain potentially-useful facts about an optimized NFA
//  ^ static long analyze(struct nfa *);
//
func analyze(tls *libc.TLS, nfa uintptr) int32 { /* regc_nfa.c:2778:1: */
	var a uintptr
	var aa uintptr

	if (*State)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fpre)).Fouts == uintptr(0) {
		return REG_UIMPOSSIBLE
	}
	for a = (*State)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fpre)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		for aa = (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(a)).Fto)).Fouts; aa != uintptr(0); aa = (*Arc)(unsafe.Pointer(aa)).Foutchain {
			if (*Arc)(unsafe.Pointer(aa)).Fto == (*Nfa)(unsafe.Pointer(nfa)).Fpost {
				return REG_UEMPTYMATCH
			}
		}
	}
	return 0
}

//
//  - compact - construct the compact representation of an NFA
//  ^ static void compact(struct nfa *, struct cnfa *);
//
func compact(tls *libc.TLS, nfa uintptr, cnfa uintptr) { /* regc_nfa.c:2802:1: */
	var s uintptr
	var a uintptr
	var nstates Size_t
	var narcs Size_t
	var ca uintptr
	var first uintptr

	nstates = uint64(0)
	narcs = uint64(0)
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0); s = (*State)(unsafe.Pointer(s)).Fnext {
		nstates++
		narcs = narcs + Size_t((*State)(unsafe.Pointer(s)).Fnouts+1) // need one extra for endmarker
	}

	(*Cnfa)(unsafe.Pointer(cnfa)).Fstflags = XTclpAlloc(tls, uint32(nstates*Size_t(unsafe.Sizeof(int8(0)))))
	(*Cnfa)(unsafe.Pointer(cnfa)).Fstates = XTclpAlloc(tls, uint32(nstates*Size_t(unsafe.Sizeof(uintptr(0)))))
	(*Cnfa)(unsafe.Pointer(cnfa)).Farcs = XTclpAlloc(tls, uint32(narcs*Size_t(unsafe.Sizeof(Carc{}))))
	if (*Cnfa)(unsafe.Pointer(cnfa)).Fstflags == uintptr(0) || (*Cnfa)(unsafe.Pointer(cnfa)).Fstates == uintptr(0) || (*Cnfa)(unsafe.Pointer(cnfa)).Farcs == uintptr(0) {
		if (*Cnfa)(unsafe.Pointer(cnfa)).Fstflags != uintptr(0) {
			XTclpFree(tls, (*Cnfa)(unsafe.Pointer(cnfa)).Fstflags)
		}
		if (*Cnfa)(unsafe.Pointer(cnfa)).Fstates != uintptr(0) {
			XTclpFree(tls, (*Cnfa)(unsafe.Pointer(cnfa)).Fstates)
		}
		if (*Cnfa)(unsafe.Pointer(cnfa)).Farcs != uintptr(0) {
			XTclpFree(tls, (*Cnfa)(unsafe.Pointer(cnfa)).Farcs)
		}
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
			}
			return REG_ESPACE
		}()
		return
	}
	(*Cnfa)(unsafe.Pointer(cnfa)).Fnstates = int32(nstates)
	(*Cnfa)(unsafe.Pointer(cnfa)).Fpre = (*State)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fpre)).Fno
	(*Cnfa)(unsafe.Pointer(cnfa)).Fpost = (*State)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fpost)).Fno
	*(*Color)(unsafe.Pointer(cnfa + 20)) = *(*Color)(unsafe.Pointer(nfa + 72))
	*(*Color)(unsafe.Pointer(cnfa + 20 + 1*2)) = *(*Color)(unsafe.Pointer(nfa + 72 + 1*2))
	*(*Color)(unsafe.Pointer(cnfa + 24)) = *(*Color)(unsafe.Pointer(nfa + 76))
	*(*Color)(unsafe.Pointer(cnfa + 24 + 1*2)) = *(*Color)(unsafe.Pointer(nfa + 76 + 1*2))
	(*Cnfa)(unsafe.Pointer(cnfa)).Fncolors = int32(maxcolor(tls, (*Nfa)(unsafe.Pointer(nfa)).Fcm)) + 1
	(*Cnfa)(unsafe.Pointer(cnfa)).Fflags = 0

	ca = (*Cnfa)(unsafe.Pointer(cnfa)).Farcs
	for s = (*Nfa)(unsafe.Pointer(nfa)).Fstates; s != uintptr(0); s = (*State)(unsafe.Pointer(s)).Fnext {

		*(*int8)(unsafe.Pointer((*Cnfa)(unsafe.Pointer(cnfa)).Fstflags + uintptr((*State)(unsafe.Pointer(s)).Fno))) = int8(0)
		*(*uintptr)(unsafe.Pointer((*Cnfa)(unsafe.Pointer(cnfa)).Fstates + uintptr((*State)(unsafe.Pointer(s)).Fno)*8)) = ca
		first = ca
		for a = (*State)(unsafe.Pointer(s)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
			switch (*Arc)(unsafe.Pointer(a)).Ftype {
			case 'p':
				(*Carc)(unsafe.Pointer(ca)).Fco = (*Arc)(unsafe.Pointer(a)).Fco
				(*Carc)(unsafe.Pointer(ca)).Fto = (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(a)).Fto)).Fno
				ca += 8
				break
			case 'L':

				(*Carc)(unsafe.Pointer(ca)).Fco = Color((*Cnfa)(unsafe.Pointer(cnfa)).Fncolors + int32((*Arc)(unsafe.Pointer(a)).Fco))
				(*Carc)(unsafe.Pointer(ca)).Fto = (*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(a)).Fto)).Fno
				ca += 8
				*(*int32)(unsafe.Pointer(cnfa + 8)) |= HASLACONS
				break
			default:
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Fnexttype = 'e'
				(*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fnow         uintptr
						Fstop        uintptr
						Fsavenow     uintptr
						Fsavestop    uintptr
						Ferr         int32
						Fcflags      int32
						Flasttype    int32
						Fnexttype    int32
						Fnextvalue   Chr
						F__ccgo_pad1 [2]byte
						Flexcon      int32
						Fnsubexp     int32
						F__ccgo_pad2 [4]byte
						Fsubs        uintptr
						Fnsubs       Size_t
						Fsub10       [10]uintptr
						Fnfa         uintptr
						Fcm          uintptr
						Fnlcolor     Color
						F__ccgo_pad3 [6]byte
						Fwordchrs    uintptr
						Ftree        uintptr
						Ftreechain   uintptr
						Ftreefree    uintptr
						Fntree       int32
						F__ccgo_pad4 [4]byte
						Fcv          uintptr
						Fcv2         uintptr
						Flacons      uintptr
						Fnlacons     int32
						F__ccgo_pad5 [4]byte
						Fspaceused   Size_t
					})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fnow         uintptr
							Fstop        uintptr
							Fsavenow     uintptr
							Fsavestop    uintptr
							Ferr         int32
							Fcflags      int32
							Flasttype    int32
							Fnexttype    int32
							Fnextvalue   Chr
							F__ccgo_pad1 [2]byte
							Flexcon      int32
							Fnsubexp     int32
							F__ccgo_pad2 [4]byte
							Fsubs        uintptr
							Fnsubs       Size_t
							Fsub10       [10]uintptr
							Fnfa         uintptr
							Fcm          uintptr
							Fnlcolor     Color
							F__ccgo_pad3 [6]byte
							Fwordchrs    uintptr
							Ftree        uintptr
							Ftreechain   uintptr
							Ftreefree    uintptr
							Fntree       int32
							F__ccgo_pad4 [4]byte
							Fcv          uintptr
							Fcv2         uintptr
							Flacons      uintptr
							Fnlacons     int32
							F__ccgo_pad5 [4]byte
							Fspaceused   Size_t
						})(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fv)).Ferr
					}
					return REG_ASSERT
				}()
				break
			}
		}
		carcsort(tls, first, uint64((int64(ca)-int64(first))/8))
		(*Carc)(unsafe.Pointer(ca)).Fco = int16(-1)
		(*Carc)(unsafe.Pointer(ca)).Fto = 0
		ca += 8
	}

	// Mark no-progress states.

	for a = (*State)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fpre)).Fouts; a != uintptr(0); a = (*Arc)(unsafe.Pointer(a)).Foutchain {
		*(*int8)(unsafe.Pointer((*Cnfa)(unsafe.Pointer(cnfa)).Fstflags + uintptr((*State)(unsafe.Pointer((*Arc)(unsafe.Pointer(a)).Fto)).Fno))) = int8(CNFA_NOPROGRESS)
	}
	*(*int8)(unsafe.Pointer((*Cnfa)(unsafe.Pointer(cnfa)).Fstflags + uintptr((*State)(unsafe.Pointer((*Nfa)(unsafe.Pointer(nfa)).Fpre)).Fno))) = int8(CNFA_NOPROGRESS)
}

//
//  - carcsort - sort compacted-NFA arcs by color
//  ^ static void carcsort(struct carc *, struct carc *);
//
func carcsort(tls *libc.TLS, first uintptr, n Size_t) { /* regc_nfa.c:2896:1: */
	if n > uint64(1) {
		libc.Xqsort(tls, first, n, uint64(unsafe.Sizeof(Carc{})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		}{carc_cmp})))
	}
}

func carc_cmp(tls *libc.TLS, a uintptr, b uintptr) int32 { /* regc_nfa.c:2906:1: */
	var aa uintptr = a
	var bb uintptr = b

	if int32((*Carc)(unsafe.Pointer(aa)).Fco) < int32((*Carc)(unsafe.Pointer(bb)).Fco) {
		return -1
	}
	if int32((*Carc)(unsafe.Pointer(aa)).Fco) > int32((*Carc)(unsafe.Pointer(bb)).Fco) {
		return +1
	}
	if (*Carc)(unsafe.Pointer(aa)).Fto < (*Carc)(unsafe.Pointer(bb)).Fto {
		return -1
	}
	if (*Carc)(unsafe.Pointer(aa)).Fto > (*Carc)(unsafe.Pointer(bb)).Fto {
		return +1
	}
	return 0
}

//
//  - freecnfa - free a compacted NFA
//  ^ static void freecnfa(struct cnfa *);
//
func freecnfa(tls *libc.TLS, cnfa uintptr) { /* regc_nfa.c:2933:1: */
	// not empty already
	(*Cnfa)(unsafe.Pointer(cnfa)).Fnstates = 0
	XTclpFree(tls, (*Cnfa)(unsafe.Pointer(cnfa)).Fstflags)
	XTclpFree(tls, (*Cnfa)(unsafe.Pointer(cnfa)).Fstates)
	XTclpFree(tls, (*Cnfa)(unsafe.Pointer(cnfa)).Farcs)
}

//
//  - dumpnfa - dump an NFA in human-readable form
//  ^ static void dumpnfa(struct nfa *, FILE *);
//
func dumpnfa(tls *libc.TLS, nfa uintptr, f uintptr) { /* regc_nfa.c:2948:1: */
	_ = nfa
	_ = f
}

//
//  - dumpcnfa - dump a compacted NFA in human-readable form
//  ^ static void dumpcnfa(struct cnfa *, FILE *);
//
func dumpcnfa(tls *libc.TLS, cnfa uintptr, f uintptr) { /* regc_nfa.c:3135:1: */
	_ = cnfa
	_ = f
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Utility functions for handling cvecs
// This file is #included by regcomp.c.
//
// Copyright (c) 1998, 1999 Henry Spencer.  All rights reserved.
//
// Development of this software was funded, in part, by Cray Research Inc.,
// UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
// Corporation, none of whom are responsible for the results. The author
// thanks all of them.
//
// Redistribution and use in source and binary forms -- with or without
// modification -- are permitted for any purpose, provided that
// redistributions in source form retain this entire copyright notice and
// indicate the origin and nature of any modifications.
//
// I'd appreciate being given credit for this package in the documentation of
// software which uses it, but that is not a requirement.
//
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
// HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

// Notes:
// Only (selected) functions in _this_ file should treat chr* as non-constant.

//
//  - newcvec - allocate a new cvec
//  ^ static struct cvec *newcvec(int, int);
//
func newcvec(tls *libc.TLS, nchrs int32, nranges int32) uintptr { /* regc_cvec.c:41:20: */
	var nc Size_t = Size_t(nchrs) + Size_t(nranges)*uint64(2)
	var n Size_t = uint64(unsafe.Sizeof(Cvec{})) + nc*Size_t(unsafe.Sizeof(Chr(0)))
	var cv uintptr = XTclpAlloc(tls, uint32(n))

	if cv == uintptr(0) {
		return uintptr(0)
	}
	(*Cvec)(unsafe.Pointer(cv)).Fchrspace = nchrs
	(*Cvec)(unsafe.Pointer(cv)).Fchrs = cv + uintptr(uint64(unsafe.Sizeof(Cvec{})))
	(*Cvec)(unsafe.Pointer(cv)).Franges = (*Cvec)(unsafe.Pointer(cv)).Fchrs + uintptr(nchrs)*2
	(*Cvec)(unsafe.Pointer(cv)).Frangespace = nranges
	return clearcvec(tls, cv)
}

//
//  - clearcvec - clear a possibly-new cvec
//  * Returns pointer as convenience.
//  ^ static struct cvec *clearcvec(struct cvec *);
//
func clearcvec(tls *libc.TLS, cv uintptr) uintptr { /* regc_cvec.c:65:20: */

	(*Cvec)(unsafe.Pointer(cv)).Fnchrs = 0
	(*Cvec)(unsafe.Pointer(cv)).Fnranges = 0
	return cv
}

//
//  - addchr - add a chr to a cvec
//  ^ static void addchr(struct cvec *, pchr);
//
func addchr(tls *libc.TLS, cv uintptr, c Pchr) { /* regc_cvec.c:80:1: */

	*(*Chr)(unsafe.Pointer((*Cvec)(unsafe.Pointer(cv)).Fchrs + uintptr(libc.PostIncInt32(&(*Cvec)(unsafe.Pointer(cv)).Fnchrs, 1))*2)) = Chr(c)
}

//
//  - addrange - add a range to a cvec
//  ^ static void addrange(struct cvec *, pchr, pchr);
//
func addrange(tls *libc.TLS, cv uintptr, from Pchr, to Pchr) { /* regc_cvec.c:93:1: */

	*(*Chr)(unsafe.Pointer((*Cvec)(unsafe.Pointer(cv)).Franges + uintptr((*Cvec)(unsafe.Pointer(cv)).Fnranges*2)*2)) = Chr(from)
	*(*Chr)(unsafe.Pointer((*Cvec)(unsafe.Pointer(cv)).Franges + uintptr((*Cvec)(unsafe.Pointer(cv)).Fnranges*2+1)*2)) = Chr(to)
	(*Cvec)(unsafe.Pointer(cv)).Fnranges++
}

//
//  - getcvec - get a cvec, remembering it as v->cv
//  ^ static struct cvec *getcvec(struct vars *, int, int);
//
func getcvec(tls *libc.TLS, v uintptr, nchrs int32, nranges int32) uintptr { /* regc_cvec.c:108:20: */
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv != uintptr(0) && nchrs <= (*Cvec)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv)).Fchrspace && nranges <= (*Cvec)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv)).Frangespace {
		return clearcvec(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcv)
	}

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv != uintptr(0) {
		freecvec(tls, (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fcv)
	}
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv = newcvec(tls, nchrs, nranges)
	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ESPACE
		}()
	}

	return (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcv
}

//
//  - freecvec - free a cvec
//  ^ static void freecvec(struct cvec *);
//
func freecvec(tls *libc.TLS, cv uintptr) { /* regc_cvec.c:135:1: */
	XTclpFree(tls, cv)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// regc_locale.c --
//
//	This file contains the Unicode locale specific regexp routines.
//	This file is #included by regcomp.c.
//
// Copyright (c) 1998 by Scriptics Corporation.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// ASCII character-name table

type Cname = struct {
	Fname        uintptr
	Fcode        int8
	F__ccgo_pad1 [7]byte
} /* regc_locale.c:15:14 */

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// regc_locale.c --
//
//	This file contains the Unicode locale specific regexp routines.
//	This file is #included by regcomp.c.
//
// Copyright (c) 1998 by Scriptics Corporation.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// ASCII character-name table

var cnames = [96]Cname{
	{Fname: ts + 1009},
	{Fname: ts + 1013, Fcode: int8('\001')},
	{Fname: ts + 1017, Fcode: int8('\002')},
	{Fname: ts + 1021, Fcode: int8('\003')},
	{Fname: ts + 1025, Fcode: int8('\004')},
	{Fname: ts + 1029, Fcode: int8('\005')},
	{Fname: ts + 1033, Fcode: int8('\006')},
	{Fname: ts + 1037, Fcode: int8('\007')},
	{Fname: ts + 1041, Fcode: int8('\007')},
	{Fname: ts + 1047, Fcode: int8('\010')},
	{Fname: ts + 1050, Fcode: int8('\b')},
	{Fname: ts + 1060, Fcode: int8('\011')},
	{Fname: ts + 1063, Fcode: int8('\t')},
	{Fname: ts + 1067, Fcode: int8('\012')},
	{Fname: ts + 1070, Fcode: int8('\n')},
	{Fname: ts + 1078, Fcode: int8('\013')},
	{Fname: ts + 1081, Fcode: int8('\v')},
	{Fname: ts + 1094, Fcode: int8('\014')},
	{Fname: ts + 1097, Fcode: int8('\f')},
	{Fname: ts + 1107, Fcode: int8('\015')},
	{Fname: ts + 1110, Fcode: int8('\r')},
	{Fname: ts + 1126, Fcode: int8('\016')},
	{Fname: ts + 1129, Fcode: int8('\017')},
	{Fname: ts + 1132, Fcode: int8('\020')},
	{Fname: ts + 1136, Fcode: int8('\021')},
	{Fname: ts + 1140, Fcode: int8('\022')},
	{Fname: ts + 1144, Fcode: int8('\023')},
	{Fname: ts + 1148, Fcode: int8('\024')},
	{Fname: ts + 1152, Fcode: int8('\025')},
	{Fname: ts + 1156, Fcode: int8('\026')},
	{Fname: ts + 1160, Fcode: int8('\027')},
	{Fname: ts + 1164, Fcode: int8('\030')},
	{Fname: ts + 1168, Fcode: int8('\031')},
	{Fname: ts + 1171, Fcode: int8('\032')},
	{Fname: ts + 1175, Fcode: int8('\033')},
	{Fname: ts + 1179, Fcode: int8('\034')},
	{Fname: ts + 1183, Fcode: int8('\034')},
	{Fname: ts + 1186, Fcode: int8('\035')},
	{Fname: ts + 1190, Fcode: int8('\035')},
	{Fname: ts + 1193, Fcode: int8('\036')},
	{Fname: ts + 1197, Fcode: int8('\036')},
	{Fname: ts + 1200, Fcode: int8('\037')},
	{Fname: ts + 1204, Fcode: int8('\037')},
	{Fname: ts + 1207, Fcode: int8(' ')},
	{Fname: ts + 1213, Fcode: int8('!')},
	{Fname: ts + 1230, Fcode: int8('"')},
	{Fname: ts + 1245, Fcode: int8('#')},
	{Fname: ts + 1257, Fcode: int8('$')},
	{Fname: ts + 1269, Fcode: int8('%')},
	{Fname: ts + 1282, Fcode: int8('&')},
	{Fname: ts + 1292, Fcode: int8('\'')},
	{Fname: ts + 1303, Fcode: int8('(')},
	{Fname: ts + 1320, Fcode: int8(')')},
	{Fname: ts + 1338, Fcode: int8('*')},
	{Fname: ts + 1347, Fcode: int8('+')},
	{Fname: ts + 1357, Fcode: int8(',')},
	{Fname: ts + 1363, Fcode: int8('-')},
	{Fname: ts + 1370, Fcode: int8('-')},
	{Fname: ts + 1383, Fcode: int8('.')},
	{Fname: ts + 1390, Fcode: int8('.')},
	{Fname: ts + 1400, Fcode: int8('/')},
	{Fname: ts + 1406, Fcode: int8('/')},
	{Fname: ts + 1414, Fcode: int8('0')},
	{Fname: ts + 1419, Fcode: int8('1')},
	{Fname: ts + 1423, Fcode: int8('2')},
	{Fname: ts + 1427, Fcode: int8('3')},
	{Fname: ts + 1433, Fcode: int8('4')},
	{Fname: ts + 1438, Fcode: int8('5')},
	{Fname: ts + 1443, Fcode: int8('6')},
	{Fname: ts + 1447, Fcode: int8('7')},
	{Fname: ts + 1453, Fcode: int8('8')},
	{Fname: ts + 1459, Fcode: int8('9')},
	{Fname: ts + 1464, Fcode: int8(':')},
	{Fname: ts + 1470, Fcode: int8(';')},
	{Fname: ts + 1480, Fcode: int8('<')},
	{Fname: ts + 1495, Fcode: int8('=')},
	{Fname: ts + 1507, Fcode: int8('>')},
	{Fname: ts + 1525, Fcode: int8('?')},
	{Fname: ts + 1539, Fcode: int8('@')},
	{Fname: ts + 1553, Fcode: int8('[')},
	{Fname: ts + 1573, Fcode: int8('\\')},
	{Fname: ts + 1583, Fcode: int8('\\')},
	{Fname: ts + 1599, Fcode: int8(']')},
	{Fname: ts + 1620, Fcode: int8('^')},
	{Fname: ts + 1631, Fcode: int8('^')},
	{Fname: ts + 1649, Fcode: int8('_')},
	{Fname: ts + 1660, Fcode: int8('_')},
	{Fname: ts + 1669, Fcode: int8('`')},
	{Fname: ts + 1682, Fcode: int8('{')},
	{Fname: ts + 1693, Fcode: int8('{')},
	{Fname: ts + 1712, Fcode: int8('|')},
	{Fname: ts + 1726, Fcode: int8('}')},
	{Fname: ts + 1738, Fcode: int8('}')},
	{Fname: ts + 1758, Fcode: int8('~')},
	{Fname: ts + 1764, Fcode: int8('\177')},
	{},
} /* regc_locale.c:18:3 */

// Unicode character-class tables.

type Crange = struct {
	Fstart Chr
	Fend   Chr
} /* regc_locale.c:124:3 */

//	Declarations of Unicode character ranges.  This code
//	is automatically generated by the tools/uniClass.tcl script
//	and used in generic/regc_locale.c.  Do not modify by hand.

// Unicode: alphabetic characters.

var alphaRangeTable = [258]Crange{
	{Fstart: Chr(0x41), Fend: Chr(0x5A)}, {Fstart: Chr(0x61), Fend: Chr(0x7A)}, {Fstart: Chr(0xC0), Fend: Chr(0xD6)}, {Fstart: Chr(0xD8), Fend: Chr(0xF6)},
	{Fstart: Chr(0xF8), Fend: Chr(0x2C1)}, {Fstart: Chr(0x2C6), Fend: Chr(0x2D1)}, {Fstart: Chr(0x2E0), Fend: Chr(0x2E4)}, {Fstart: Chr(0x370), Fend: Chr(0x374)},
	{Fstart: Chr(0x37A), Fend: Chr(0x37D)}, {Fstart: Chr(0x388), Fend: Chr(0x38A)}, {Fstart: Chr(0x38E), Fend: Chr(0x3A1)}, {Fstart: Chr(0x3A3), Fend: Chr(0x3F5)},
	{Fstart: Chr(0x3F7), Fend: Chr(0x481)}, {Fstart: Chr(0x48A), Fend: Chr(0x52F)}, {Fstart: Chr(0x531), Fend: Chr(0x556)}, {Fstart: Chr(0x560), Fend: Chr(0x588)},
	{Fstart: Chr(0x5D0), Fend: Chr(0x5EA)}, {Fstart: Chr(0x5EF), Fend: Chr(0x5F2)}, {Fstart: Chr(0x620), Fend: Chr(0x64A)}, {Fstart: Chr(0x671), Fend: Chr(0x6D3)},
	{Fstart: Chr(0x6FA), Fend: Chr(0x6FC)}, {Fstart: Chr(0x712), Fend: Chr(0x72F)}, {Fstart: Chr(0x74D), Fend: Chr(0x7A5)}, {Fstart: Chr(0x7CA), Fend: Chr(0x7EA)},
	{Fstart: Chr(0x800), Fend: Chr(0x815)}, {Fstart: Chr(0x840), Fend: Chr(0x858)}, {Fstart: Chr(0x860), Fend: Chr(0x86A)}, {Fstart: Chr(0x870), Fend: Chr(0x887)},
	{Fstart: Chr(0x889), Fend: Chr(0x88E)}, {Fstart: Chr(0x8A0), Fend: Chr(0x8C9)}, {Fstart: Chr(0x904), Fend: Chr(0x939)}, {Fstart: Chr(0x958), Fend: Chr(0x961)},
	{Fstart: Chr(0x971), Fend: Chr(0x980)}, {Fstart: Chr(0x985), Fend: Chr(0x98C)}, {Fstart: Chr(0x993), Fend: Chr(0x9A8)}, {Fstart: Chr(0x9AA), Fend: Chr(0x9B0)},
	{Fstart: Chr(0x9B6), Fend: Chr(0x9B9)}, {Fstart: Chr(0x9DF), Fend: Chr(0x9E1)}, {Fstart: Chr(0xA05), Fend: Chr(0xA0A)}, {Fstart: Chr(0xA13), Fend: Chr(0xA28)},
	{Fstart: Chr(0xA2A), Fend: Chr(0xA30)}, {Fstart: Chr(0xA59), Fend: Chr(0xA5C)}, {Fstart: Chr(0xA72), Fend: Chr(0xA74)}, {Fstart: Chr(0xA85), Fend: Chr(0xA8D)},
	{Fstart: Chr(0xA8F), Fend: Chr(0xA91)}, {Fstart: Chr(0xA93), Fend: Chr(0xAA8)}, {Fstart: Chr(0xAAA), Fend: Chr(0xAB0)}, {Fstart: Chr(0xAB5), Fend: Chr(0xAB9)},
	{Fstart: Chr(0xB05), Fend: Chr(0xB0C)}, {Fstart: Chr(0xB13), Fend: Chr(0xB28)}, {Fstart: Chr(0xB2A), Fend: Chr(0xB30)}, {Fstart: Chr(0xB35), Fend: Chr(0xB39)},
	{Fstart: Chr(0xB5F), Fend: Chr(0xB61)}, {Fstart: Chr(0xB85), Fend: Chr(0xB8A)}, {Fstart: Chr(0xB8E), Fend: Chr(0xB90)}, {Fstart: Chr(0xB92), Fend: Chr(0xB95)},
	{Fstart: Chr(0xBA8), Fend: Chr(0xBAA)}, {Fstart: Chr(0xBAE), Fend: Chr(0xBB9)}, {Fstart: Chr(0xC05), Fend: Chr(0xC0C)}, {Fstart: Chr(0xC0E), Fend: Chr(0xC10)},
	{Fstart: Chr(0xC12), Fend: Chr(0xC28)}, {Fstart: Chr(0xC2A), Fend: Chr(0xC39)}, {Fstart: Chr(0xC58), Fend: Chr(0xC5A)}, {Fstart: Chr(0xC85), Fend: Chr(0xC8C)},
	{Fstart: Chr(0xC8E), Fend: Chr(0xC90)}, {Fstart: Chr(0xC92), Fend: Chr(0xCA8)}, {Fstart: Chr(0xCAA), Fend: Chr(0xCB3)}, {Fstart: Chr(0xCB5), Fend: Chr(0xCB9)},
	{Fstart: Chr(0xD04), Fend: Chr(0xD0C)}, {Fstart: Chr(0xD0E), Fend: Chr(0xD10)}, {Fstart: Chr(0xD12), Fend: Chr(0xD3A)}, {Fstart: Chr(0xD54), Fend: Chr(0xD56)},
	{Fstart: Chr(0xD5F), Fend: Chr(0xD61)}, {Fstart: Chr(0xD7A), Fend: Chr(0xD7F)}, {Fstart: Chr(0xD85), Fend: Chr(0xD96)}, {Fstart: Chr(0xD9A), Fend: Chr(0xDB1)},
	{Fstart: Chr(0xDB3), Fend: Chr(0xDBB)}, {Fstart: Chr(0xDC0), Fend: Chr(0xDC6)}, {Fstart: Chr(0xE01), Fend: Chr(0xE30)}, {Fstart: Chr(0xE40), Fend: Chr(0xE46)},
	{Fstart: Chr(0xE86), Fend: Chr(0xE8A)}, {Fstart: Chr(0xE8C), Fend: Chr(0xEA3)}, {Fstart: Chr(0xEA7), Fend: Chr(0xEB0)}, {Fstart: Chr(0xEC0), Fend: Chr(0xEC4)},
	{Fstart: Chr(0xEDC), Fend: Chr(0xEDF)}, {Fstart: Chr(0xF40), Fend: Chr(0xF47)}, {Fstart: Chr(0xF49), Fend: Chr(0xF6C)}, {Fstart: Chr(0xF88), Fend: Chr(0xF8C)},
	{Fstart: Chr(0x1000), Fend: Chr(0x102A)}, {Fstart: Chr(0x1050), Fend: Chr(0x1055)}, {Fstart: Chr(0x105A), Fend: Chr(0x105D)}, {Fstart: Chr(0x106E), Fend: Chr(0x1070)},
	{Fstart: Chr(0x1075), Fend: Chr(0x1081)}, {Fstart: Chr(0x10A0), Fend: Chr(0x10C5)}, {Fstart: Chr(0x10D0), Fend: Chr(0x10FA)}, {Fstart: Chr(0x10FC), Fend: Chr(0x1248)},
	{Fstart: Chr(0x124A), Fend: Chr(0x124D)}, {Fstart: Chr(0x1250), Fend: Chr(0x1256)}, {Fstart: Chr(0x125A), Fend: Chr(0x125D)}, {Fstart: Chr(0x1260), Fend: Chr(0x1288)},
	{Fstart: Chr(0x128A), Fend: Chr(0x128D)}, {Fstart: Chr(0x1290), Fend: Chr(0x12B0)}, {Fstart: Chr(0x12B2), Fend: Chr(0x12B5)}, {Fstart: Chr(0x12B8), Fend: Chr(0x12BE)},
	{Fstart: Chr(0x12C2), Fend: Chr(0x12C5)}, {Fstart: Chr(0x12C8), Fend: Chr(0x12D6)}, {Fstart: Chr(0x12D8), Fend: Chr(0x1310)}, {Fstart: Chr(0x1312), Fend: Chr(0x1315)},
	{Fstart: Chr(0x1318), Fend: Chr(0x135A)}, {Fstart: Chr(0x1380), Fend: Chr(0x138F)}, {Fstart: Chr(0x13A0), Fend: Chr(0x13F5)}, {Fstart: Chr(0x13F8), Fend: Chr(0x13FD)},
	{Fstart: Chr(0x1401), Fend: Chr(0x166C)}, {Fstart: Chr(0x166F), Fend: Chr(0x167F)}, {Fstart: Chr(0x1681), Fend: Chr(0x169A)}, {Fstart: Chr(0x16A0), Fend: Chr(0x16EA)},
	{Fstart: Chr(0x16F1), Fend: Chr(0x16F8)}, {Fstart: Chr(0x1700), Fend: Chr(0x1711)}, {Fstart: Chr(0x171F), Fend: Chr(0x1731)}, {Fstart: Chr(0x1740), Fend: Chr(0x1751)},
	{Fstart: Chr(0x1760), Fend: Chr(0x176C)}, {Fstart: Chr(0x176E), Fend: Chr(0x1770)}, {Fstart: Chr(0x1780), Fend: Chr(0x17B3)}, {Fstart: Chr(0x1820), Fend: Chr(0x1878)},
	{Fstart: Chr(0x1880), Fend: Chr(0x1884)}, {Fstart: Chr(0x1887), Fend: Chr(0x18A8)}, {Fstart: Chr(0x18B0), Fend: Chr(0x18F5)}, {Fstart: Chr(0x1900), Fend: Chr(0x191E)},
	{Fstart: Chr(0x1950), Fend: Chr(0x196D)}, {Fstart: Chr(0x1970), Fend: Chr(0x1974)}, {Fstart: Chr(0x1980), Fend: Chr(0x19AB)}, {Fstart: Chr(0x19B0), Fend: Chr(0x19C9)},
	{Fstart: Chr(0x1A00), Fend: Chr(0x1A16)}, {Fstart: Chr(0x1A20), Fend: Chr(0x1A54)}, {Fstart: Chr(0x1B05), Fend: Chr(0x1B33)}, {Fstart: Chr(0x1B45), Fend: Chr(0x1B4C)},
	{Fstart: Chr(0x1B83), Fend: Chr(0x1BA0)}, {Fstart: Chr(0x1BBA), Fend: Chr(0x1BE5)}, {Fstart: Chr(0x1C00), Fend: Chr(0x1C23)}, {Fstart: Chr(0x1C4D), Fend: Chr(0x1C4F)},
	{Fstart: Chr(0x1C5A), Fend: Chr(0x1C7D)}, {Fstart: Chr(0x1C80), Fend: Chr(0x1C88)}, {Fstart: Chr(0x1C90), Fend: Chr(0x1CBA)}, {Fstart: Chr(0x1CBD), Fend: Chr(0x1CBF)},
	{Fstart: Chr(0x1CE9), Fend: Chr(0x1CEC)}, {Fstart: Chr(0x1CEE), Fend: Chr(0x1CF3)}, {Fstart: Chr(0x1D00), Fend: Chr(0x1DBF)}, {Fstart: Chr(0x1E00), Fend: Chr(0x1F15)},
	{Fstart: Chr(0x1F18), Fend: Chr(0x1F1D)}, {Fstart: Chr(0x1F20), Fend: Chr(0x1F45)}, {Fstart: Chr(0x1F48), Fend: Chr(0x1F4D)}, {Fstart: Chr(0x1F50), Fend: Chr(0x1F57)},
	{Fstart: Chr(0x1F5F), Fend: Chr(0x1F7D)}, {Fstart: Chr(0x1F80), Fend: Chr(0x1FB4)}, {Fstart: Chr(0x1FB6), Fend: Chr(0x1FBC)}, {Fstart: Chr(0x1FC2), Fend: Chr(0x1FC4)},
	{Fstart: Chr(0x1FC6), Fend: Chr(0x1FCC)}, {Fstart: Chr(0x1FD0), Fend: Chr(0x1FD3)}, {Fstart: Chr(0x1FD6), Fend: Chr(0x1FDB)}, {Fstart: Chr(0x1FE0), Fend: Chr(0x1FEC)},
	{Fstart: Chr(0x1FF2), Fend: Chr(0x1FF4)}, {Fstart: Chr(0x1FF6), Fend: Chr(0x1FFC)}, {Fstart: Chr(0x2090), Fend: Chr(0x209C)}, {Fstart: Chr(0x210A), Fend: Chr(0x2113)},
	{Fstart: Chr(0x2119), Fend: Chr(0x211D)}, {Fstart: Chr(0x212A), Fend: Chr(0x212D)}, {Fstart: Chr(0x212F), Fend: Chr(0x2139)}, {Fstart: Chr(0x213C), Fend: Chr(0x213F)},
	{Fstart: Chr(0x2145), Fend: Chr(0x2149)}, {Fstart: Chr(0x2C00), Fend: Chr(0x2CE4)}, {Fstart: Chr(0x2CEB), Fend: Chr(0x2CEE)}, {Fstart: Chr(0x2D00), Fend: Chr(0x2D25)},
	{Fstart: Chr(0x2D30), Fend: Chr(0x2D67)}, {Fstart: Chr(0x2D80), Fend: Chr(0x2D96)}, {Fstart: Chr(0x2DA0), Fend: Chr(0x2DA6)}, {Fstart: Chr(0x2DA8), Fend: Chr(0x2DAE)},
	{Fstart: Chr(0x2DB0), Fend: Chr(0x2DB6)}, {Fstart: Chr(0x2DB8), Fend: Chr(0x2DBE)}, {Fstart: Chr(0x2DC0), Fend: Chr(0x2DC6)}, {Fstart: Chr(0x2DC8), Fend: Chr(0x2DCE)},
	{Fstart: Chr(0x2DD0), Fend: Chr(0x2DD6)}, {Fstart: Chr(0x2DD8), Fend: Chr(0x2DDE)}, {Fstart: Chr(0x3031), Fend: Chr(0x3035)}, {Fstart: Chr(0x3041), Fend: Chr(0x3096)},
	{Fstart: Chr(0x309D), Fend: Chr(0x309F)}, {Fstart: Chr(0x30A1), Fend: Chr(0x30FA)}, {Fstart: Chr(0x30FC), Fend: Chr(0x30FF)}, {Fstart: Chr(0x3105), Fend: Chr(0x312F)},
	{Fstart: Chr(0x3131), Fend: Chr(0x318E)}, {Fstart: Chr(0x31A0), Fend: Chr(0x31BF)}, {Fstart: Chr(0x31F0), Fend: Chr(0x31FF)}, {Fstart: Chr(0x3400), Fend: Chr(0x4DBF)},
	{Fstart: Chr(0x4E00), Fend: Chr(0xA48C)}, {Fstart: Chr(0xA4D0), Fend: Chr(0xA4FD)}, {Fstart: Chr(0xA500), Fend: Chr(0xA60C)}, {Fstart: Chr(0xA610), Fend: Chr(0xA61F)},
	{Fstart: Chr(0xA640), Fend: Chr(0xA66E)}, {Fstart: Chr(0xA67F), Fend: Chr(0xA69D)}, {Fstart: Chr(0xA6A0), Fend: Chr(0xA6E5)}, {Fstart: Chr(0xA717), Fend: Chr(0xA71F)},
	{Fstart: Chr(0xA722), Fend: Chr(0xA788)}, {Fstart: Chr(0xA78B), Fend: Chr(0xA7CA)}, {Fstart: Chr(0xA7D5), Fend: Chr(0xA7D9)}, {Fstart: Chr(0xA7F2), Fend: Chr(0xA801)},
	{Fstart: Chr(0xA803), Fend: Chr(0xA805)}, {Fstart: Chr(0xA807), Fend: Chr(0xA80A)}, {Fstart: Chr(0xA80C), Fend: Chr(0xA822)}, {Fstart: Chr(0xA840), Fend: Chr(0xA873)},
	{Fstart: Chr(0xA882), Fend: Chr(0xA8B3)}, {Fstart: Chr(0xA8F2), Fend: Chr(0xA8F7)}, {Fstart: Chr(0xA90A), Fend: Chr(0xA925)}, {Fstart: Chr(0xA930), Fend: Chr(0xA946)},
	{Fstart: Chr(0xA960), Fend: Chr(0xA97C)}, {Fstart: Chr(0xA984), Fend: Chr(0xA9B2)}, {Fstart: Chr(0xA9E0), Fend: Chr(0xA9E4)}, {Fstart: Chr(0xA9E6), Fend: Chr(0xA9EF)},
	{Fstart: Chr(0xA9FA), Fend: Chr(0xA9FE)}, {Fstart: Chr(0xAA00), Fend: Chr(0xAA28)}, {Fstart: Chr(0xAA40), Fend: Chr(0xAA42)}, {Fstart: Chr(0xAA44), Fend: Chr(0xAA4B)},
	{Fstart: Chr(0xAA60), Fend: Chr(0xAA76)}, {Fstart: Chr(0xAA7E), Fend: Chr(0xAAAF)}, {Fstart: Chr(0xAAB9), Fend: Chr(0xAABD)}, {Fstart: Chr(0xAADB), Fend: Chr(0xAADD)},
	{Fstart: Chr(0xAAE0), Fend: Chr(0xAAEA)}, {Fstart: Chr(0xAAF2), Fend: Chr(0xAAF4)}, {Fstart: Chr(0xAB01), Fend: Chr(0xAB06)}, {Fstart: Chr(0xAB09), Fend: Chr(0xAB0E)},
	{Fstart: Chr(0xAB11), Fend: Chr(0xAB16)}, {Fstart: Chr(0xAB20), Fend: Chr(0xAB26)}, {Fstart: Chr(0xAB28), Fend: Chr(0xAB2E)}, {Fstart: Chr(0xAB30), Fend: Chr(0xAB5A)},
	{Fstart: Chr(0xAB5C), Fend: Chr(0xAB69)}, {Fstart: Chr(0xAB70), Fend: Chr(0xABE2)}, {Fstart: Chr(0xAC00), Fend: Chr(0xD7A3)}, {Fstart: Chr(0xD7B0), Fend: Chr(0xD7C6)},
	{Fstart: Chr(0xD7CB), Fend: Chr(0xD7FB)}, {Fstart: Chr(0xF900), Fend: Chr(0xFA6D)}, {Fstart: Chr(0xFA70), Fend: Chr(0xFAD9)}, {Fstart: Chr(0xFB00), Fend: Chr(0xFB06)},
	{Fstart: Chr(0xFB13), Fend: Chr(0xFB17)}, {Fstart: Chr(0xFB1F), Fend: Chr(0xFB28)}, {Fstart: Chr(0xFB2A), Fend: Chr(0xFB36)}, {Fstart: Chr(0xFB38), Fend: Chr(0xFB3C)},
	{Fstart: Chr(0xFB46), Fend: Chr(0xFBB1)}, {Fstart: Chr(0xFBD3), Fend: Chr(0xFD3D)}, {Fstart: Chr(0xFD50), Fend: Chr(0xFD8F)}, {Fstart: Chr(0xFD92), Fend: Chr(0xFDC7)},
	{Fstart: Chr(0xFDF0), Fend: Chr(0xFDFB)}, {Fstart: Chr(0xFE70), Fend: Chr(0xFE74)}, {Fstart: Chr(0xFE76), Fend: Chr(0xFEFC)}, {Fstart: Chr(0xFF21), Fend: Chr(0xFF3A)},
	{Fstart: Chr(0xFF41), Fend: Chr(0xFF5A)}, {Fstart: Chr(0xFF66), Fend: Chr(0xFFBE)}, {Fstart: Chr(0xFFC2), Fend: Chr(0xFFC7)}, {Fstart: Chr(0xFFCA), Fend: Chr(0xFFCF)},
	{Fstart: Chr(0xFFD2), Fend: Chr(0xFFD7)}, {Fstart: Chr(0xFFDA), Fend: Chr(0xFFDC)},
} /* regc_locale.c:136:21 */

var alphaCharTable = [162]Chr{
	Chr(0xAA), Chr(0xB5), Chr(0xBA), Chr(0x2EC), Chr(0x2EE), Chr(0x376), Chr(0x377), Chr(0x37F), Chr(0x386),
	Chr(0x38C), Chr(0x559), Chr(0x66E), Chr(0x66F), Chr(0x6D5), Chr(0x6E5), Chr(0x6E6), Chr(0x6EE), Chr(0x6EF),
	Chr(0x6FF), Chr(0x710), Chr(0x7B1), Chr(0x7F4), Chr(0x7F5), Chr(0x7FA), Chr(0x81A), Chr(0x824), Chr(0x828),
	Chr(0x93D), Chr(0x950), Chr(0x98F), Chr(0x990), Chr(0x9B2), Chr(0x9BD), Chr(0x9CE), Chr(0x9DC), Chr(0x9DD),
	Chr(0x9F0), Chr(0x9F1), Chr(0x9FC), Chr(0xA0F), Chr(0xA10), Chr(0xA32), Chr(0xA33), Chr(0xA35), Chr(0xA36),
	Chr(0xA38), Chr(0xA39), Chr(0xA5E), Chr(0xAB2), Chr(0xAB3), Chr(0xABD), Chr(0xAD0), Chr(0xAE0), Chr(0xAE1),
	Chr(0xAF9), Chr(0xB0F), Chr(0xB10), Chr(0xB32), Chr(0xB33), Chr(0xB3D), Chr(0xB5C), Chr(0xB5D), Chr(0xB71),
	Chr(0xB83), Chr(0xB99), Chr(0xB9A), Chr(0xB9C), Chr(0xB9E), Chr(0xB9F), Chr(0xBA3), Chr(0xBA4), Chr(0xBD0),
	Chr(0xC3D), Chr(0xC5D), Chr(0xC60), Chr(0xC61), Chr(0xC80), Chr(0xCBD), Chr(0xCDD), Chr(0xCDE), Chr(0xCE0),
	Chr(0xCE1), Chr(0xCF1), Chr(0xCF2), Chr(0xD3D), Chr(0xD4E), Chr(0xDBD), Chr(0xE32), Chr(0xE33), Chr(0xE81),
	Chr(0xE82), Chr(0xE84), Chr(0xEA5), Chr(0xEB2), Chr(0xEB3), Chr(0xEBD), Chr(0xEC6), Chr(0xF00), Chr(0x103F),
	Chr(0x1061), Chr(0x1065), Chr(0x1066), Chr(0x108E), Chr(0x10C7), Chr(0x10CD), Chr(0x1258), Chr(0x12C0), Chr(0x17D7),
	Chr(0x17DC), Chr(0x18AA), Chr(0x1AA7), Chr(0x1BAE), Chr(0x1BAF), Chr(0x1CF5), Chr(0x1CF6), Chr(0x1CFA), Chr(0x1F59),
	Chr(0x1F5B), Chr(0x1F5D), Chr(0x1FBE), Chr(0x2071), Chr(0x207F), Chr(0x2102), Chr(0x2107), Chr(0x2115), Chr(0x2124),
	Chr(0x2126), Chr(0x2128), Chr(0x214E), Chr(0x2183), Chr(0x2184), Chr(0x2CF2), Chr(0x2CF3), Chr(0x2D27), Chr(0x2D2D),
	Chr(0x2D6F), Chr(0x2E2F), Chr(0x3005), Chr(0x3006), Chr(0x303B), Chr(0x303C), Chr(0xA62A), Chr(0xA62B), Chr(0xA7D0),
	Chr(0xA7D1), Chr(0xA7D3), Chr(0xA8FB), Chr(0xA8FD), Chr(0xA8FE), Chr(0xA9CF), Chr(0xAA7A), Chr(0xAAB1), Chr(0xAAB5),
	Chr(0xAAB6), Chr(0xAAC0), Chr(0xAAC2), Chr(0xFB1D), Chr(0xFB3E), Chr(0xFB40), Chr(0xFB41), Chr(0xFB43), Chr(0xFB44),
} /* regc_locale.c:257:18 */

// Unicode: control characters.

var controlRangeTable = [9]Crange{
	{Fend: Chr(0x1F)}, {Fstart: Chr(0x7F), Fend: Chr(0x9F)}, {Fstart: Chr(0x600), Fend: Chr(0x605)}, {Fstart: Chr(0x200B), Fend: Chr(0x200F)},
	{Fstart: Chr(0x202A), Fend: Chr(0x202E)}, {Fstart: Chr(0x2060), Fend: Chr(0x2064)}, {Fstart: Chr(0x2066), Fend: Chr(0x206F)}, {Fstart: Chr(0xE000), Fend: Chr(0xF8FF)},
	{Fstart: Chr(0xFFF9), Fend: Chr(0xFFFB)},
} /* regc_locale.c:297:21 */

var controlCharTable = [9]Chr{
	Chr(0xAD), Chr(0x61C), Chr(0x6DD), Chr(0x70F), Chr(0x890), Chr(0x891), Chr(0x8E2), Chr(0x180E), Chr(0xFEFF),
} /* regc_locale.c:309:18 */

// Unicode: decimal digit characters.

var digitRangeTable = [37]Crange{
	{Fstart: Chr(0x30), Fend: Chr(0x39)}, {Fstart: Chr(0x660), Fend: Chr(0x669)}, {Fstart: Chr(0x6F0), Fend: Chr(0x6F9)}, {Fstart: Chr(0x7C0), Fend: Chr(0x7C9)},
	{Fstart: Chr(0x966), Fend: Chr(0x96F)}, {Fstart: Chr(0x9E6), Fend: Chr(0x9EF)}, {Fstart: Chr(0xA66), Fend: Chr(0xA6F)}, {Fstart: Chr(0xAE6), Fend: Chr(0xAEF)},
	{Fstart: Chr(0xB66), Fend: Chr(0xB6F)}, {Fstart: Chr(0xBE6), Fend: Chr(0xBEF)}, {Fstart: Chr(0xC66), Fend: Chr(0xC6F)}, {Fstart: Chr(0xCE6), Fend: Chr(0xCEF)},
	{Fstart: Chr(0xD66), Fend: Chr(0xD6F)}, {Fstart: Chr(0xDE6), Fend: Chr(0xDEF)}, {Fstart: Chr(0xE50), Fend: Chr(0xE59)}, {Fstart: Chr(0xED0), Fend: Chr(0xED9)},
	{Fstart: Chr(0xF20), Fend: Chr(0xF29)}, {Fstart: Chr(0x1040), Fend: Chr(0x1049)}, {Fstart: Chr(0x1090), Fend: Chr(0x1099)}, {Fstart: Chr(0x17E0), Fend: Chr(0x17E9)},
	{Fstart: Chr(0x1810), Fend: Chr(0x1819)}, {Fstart: Chr(0x1946), Fend: Chr(0x194F)}, {Fstart: Chr(0x19D0), Fend: Chr(0x19D9)}, {Fstart: Chr(0x1A80), Fend: Chr(0x1A89)},
	{Fstart: Chr(0x1A90), Fend: Chr(0x1A99)}, {Fstart: Chr(0x1B50), Fend: Chr(0x1B59)}, {Fstart: Chr(0x1BB0), Fend: Chr(0x1BB9)}, {Fstart: Chr(0x1C40), Fend: Chr(0x1C49)},
	{Fstart: Chr(0x1C50), Fend: Chr(0x1C59)}, {Fstart: Chr(0xA620), Fend: Chr(0xA629)}, {Fstart: Chr(0xA8D0), Fend: Chr(0xA8D9)}, {Fstart: Chr(0xA900), Fend: Chr(0xA909)},
	{Fstart: Chr(0xA9D0), Fend: Chr(0xA9D9)}, {Fstart: Chr(0xA9F0), Fend: Chr(0xA9F9)}, {Fstart: Chr(0xAA50), Fend: Chr(0xAA59)}, {Fstart: Chr(0xABF0), Fend: Chr(0xABF9)},
	{Fstart: Chr(0xFF10), Fend: Chr(0xFF19)},
} /* regc_locale.c:322:21 */

// no singletons of digit characters.

// Unicode: punctuation characters.

var punctRangeTable = [55]Crange{
	{Fstart: Chr(0x21), Fend: Chr(0x23)}, {Fstart: Chr(0x25), Fend: Chr(0x2A)}, {Fstart: Chr(0x2C), Fend: Chr(0x2F)}, {Fstart: Chr(0x5B), Fend: Chr(0x5D)},
	{Fstart: Chr(0x55A), Fend: Chr(0x55F)}, {Fstart: Chr(0x61D), Fend: Chr(0x61F)}, {Fstart: Chr(0x66A), Fend: Chr(0x66D)}, {Fstart: Chr(0x700), Fend: Chr(0x70D)},
	{Fstart: Chr(0x7F7), Fend: Chr(0x7F9)}, {Fstart: Chr(0x830), Fend: Chr(0x83E)}, {Fstart: Chr(0xF04), Fend: Chr(0xF12)}, {Fstart: Chr(0xF3A), Fend: Chr(0xF3D)},
	{Fstart: Chr(0xFD0), Fend: Chr(0xFD4)}, {Fstart: Chr(0x104A), Fend: Chr(0x104F)}, {Fstart: Chr(0x1360), Fend: Chr(0x1368)}, {Fstart: Chr(0x16EB), Fend: Chr(0x16ED)},
	{Fstart: Chr(0x17D4), Fend: Chr(0x17D6)}, {Fstart: Chr(0x17D8), Fend: Chr(0x17DA)}, {Fstart: Chr(0x1800), Fend: Chr(0x180A)}, {Fstart: Chr(0x1AA0), Fend: Chr(0x1AA6)},
	{Fstart: Chr(0x1AA8), Fend: Chr(0x1AAD)}, {Fstart: Chr(0x1B5A), Fend: Chr(0x1B60)}, {Fstart: Chr(0x1BFC), Fend: Chr(0x1BFF)}, {Fstart: Chr(0x1C3B), Fend: Chr(0x1C3F)},
	{Fstart: Chr(0x1CC0), Fend: Chr(0x1CC7)}, {Fstart: Chr(0x2010), Fend: Chr(0x2027)}, {Fstart: Chr(0x2030), Fend: Chr(0x2043)}, {Fstart: Chr(0x2045), Fend: Chr(0x2051)},
	{Fstart: Chr(0x2053), Fend: Chr(0x205E)}, {Fstart: Chr(0x2308), Fend: Chr(0x230B)}, {Fstart: Chr(0x2768), Fend: Chr(0x2775)}, {Fstart: Chr(0x27E6), Fend: Chr(0x27EF)},
	{Fstart: Chr(0x2983), Fend: Chr(0x2998)}, {Fstart: Chr(0x29D8), Fend: Chr(0x29DB)}, {Fstart: Chr(0x2CF9), Fend: Chr(0x2CFC)}, {Fstart: Chr(0x2E00), Fend: Chr(0x2E2E)},
	{Fstart: Chr(0x2E30), Fend: Chr(0x2E4F)}, {Fstart: Chr(0x2E52), Fend: Chr(0x2E5D)}, {Fstart: Chr(0x3001), Fend: Chr(0x3003)}, {Fstart: Chr(0x3008), Fend: Chr(0x3011)},
	{Fstart: Chr(0x3014), Fend: Chr(0x301F)}, {Fstart: Chr(0xA60D), Fend: Chr(0xA60F)}, {Fstart: Chr(0xA6F2), Fend: Chr(0xA6F7)}, {Fstart: Chr(0xA874), Fend: Chr(0xA877)},
	{Fstart: Chr(0xA8F8), Fend: Chr(0xA8FA)}, {Fstart: Chr(0xA9C1), Fend: Chr(0xA9CD)}, {Fstart: Chr(0xAA5C), Fend: Chr(0xAA5F)}, {Fstart: Chr(0xFE10), Fend: Chr(0xFE19)},
	{Fstart: Chr(0xFE30), Fend: Chr(0xFE52)}, {Fstart: Chr(0xFE54), Fend: Chr(0xFE61)}, {Fstart: Chr(0xFF01), Fend: Chr(0xFF03)}, {Fstart: Chr(0xFF05), Fend: Chr(0xFF0A)},
	{Fstart: Chr(0xFF0C), Fend: Chr(0xFF0F)}, {Fstart: Chr(0xFF3B), Fend: Chr(0xFF3D)}, {Fstart: Chr(0xFF5F), Fend: Chr(0xFF65)},
} /* regc_locale.c:354:21 */

var punctCharTable = [110]Chr{
	Chr(0x3A), Chr(0x3B), Chr(0x3F), Chr(0x40), Chr(0x5F), Chr(0x7B), Chr(0x7D), Chr(0xA1), Chr(0xA7),
	Chr(0xAB), Chr(0xB6), Chr(0xB7), Chr(0xBB), Chr(0xBF), Chr(0x37E), Chr(0x387), Chr(0x589), Chr(0x58A),
	Chr(0x5BE), Chr(0x5C0), Chr(0x5C3), Chr(0x5C6), Chr(0x5F3), Chr(0x5F4), Chr(0x609), Chr(0x60A), Chr(0x60C),
	Chr(0x60D), Chr(0x61B), Chr(0x6D4), Chr(0x85E), Chr(0x964), Chr(0x965), Chr(0x970), Chr(0x9FD), Chr(0xA76),
	Chr(0xAF0), Chr(0xC77), Chr(0xC84), Chr(0xDF4), Chr(0xE4F), Chr(0xE5A), Chr(0xE5B), Chr(0xF14), Chr(0xF85),
	Chr(0xFD9), Chr(0xFDA), Chr(0x10FB), Chr(0x1400), Chr(0x166E), Chr(0x169B), Chr(0x169C), Chr(0x1735), Chr(0x1736),
	Chr(0x1944), Chr(0x1945), Chr(0x1A1E), Chr(0x1A1F), Chr(0x1B7D), Chr(0x1B7E), Chr(0x1C7E), Chr(0x1C7F), Chr(0x1CD3),
	Chr(0x207D), Chr(0x207E), Chr(0x208D), Chr(0x208E), Chr(0x2329), Chr(0x232A), Chr(0x27C5), Chr(0x27C6), Chr(0x29FC),
	Chr(0x29FD), Chr(0x2CFE), Chr(0x2CFF), Chr(0x2D70), Chr(0x3030), Chr(0x303D), Chr(0x30A0), Chr(0x30FB), Chr(0xA4FE),
	Chr(0xA4FF), Chr(0xA673), Chr(0xA67E), Chr(0xA8CE), Chr(0xA8CF), Chr(0xA8FC), Chr(0xA92E), Chr(0xA92F), Chr(0xA95F),
	Chr(0xA9DE), Chr(0xA9DF), Chr(0xAADE), Chr(0xAADF), Chr(0xAAF0), Chr(0xAAF1), Chr(0xABEB), Chr(0xFD3E), Chr(0xFD3F),
	Chr(0xFE63), Chr(0xFE68), Chr(0xFE6A), Chr(0xFE6B), Chr(0xFF1A), Chr(0xFF1B), Chr(0xFF1F), Chr(0xFF20), Chr(0xFF3F),
	Chr(0xFF5B), Chr(0xFF5D),
} /* regc_locale.c:382:18 */

// Unicode: white space characters.

var spaceRangeTable = [2]Crange{
	{Fstart: Chr(0x9), Fend: Chr(0xD)}, {Fstart: Chr(0x2000), Fend: Chr(0x200B)},
} /* regc_locale.c:411:21 */

var spaceCharTable = [12]Chr{
	Chr(0x20), Chr(0x85), Chr(0xA0), Chr(0x1680), Chr(0x180E), Chr(0x2028), Chr(0x2029), Chr(0x202F), Chr(0x205F),
	Chr(0x2060), Chr(0x3000), Chr(0xFEFF),
} /* regc_locale.c:417:18 */

// Unicode: lowercase characters.

var lowerRangeTable = [52]Crange{
	{Fstart: Chr(0x61), Fend: Chr(0x7A)}, {Fstart: Chr(0xDF), Fend: Chr(0xF6)}, {Fstart: Chr(0xF8), Fend: Chr(0xFF)}, {Fstart: Chr(0x17E), Fend: Chr(0x180)},
	{Fstart: Chr(0x199), Fend: Chr(0x19B)}, {Fstart: Chr(0x1BD), Fend: Chr(0x1BF)}, {Fstart: Chr(0x233), Fend: Chr(0x239)}, {Fstart: Chr(0x24F), Fend: Chr(0x293)},
	{Fstart: Chr(0x295), Fend: Chr(0x2AF)}, {Fstart: Chr(0x37B), Fend: Chr(0x37D)}, {Fstart: Chr(0x3AC), Fend: Chr(0x3CE)}, {Fstart: Chr(0x3D5), Fend: Chr(0x3D7)},
	{Fstart: Chr(0x3EF), Fend: Chr(0x3F3)}, {Fstart: Chr(0x430), Fend: Chr(0x45F)}, {Fstart: Chr(0x560), Fend: Chr(0x588)}, {Fstart: Chr(0x10D0), Fend: Chr(0x10FA)},
	{Fstart: Chr(0x10FD), Fend: Chr(0x10FF)}, {Fstart: Chr(0x13F8), Fend: Chr(0x13FD)}, {Fstart: Chr(0x1C80), Fend: Chr(0x1C88)}, {Fstart: Chr(0x1D00), Fend: Chr(0x1D2B)},
	{Fstart: Chr(0x1D6B), Fend: Chr(0x1D77)}, {Fstart: Chr(0x1D79), Fend: Chr(0x1D9A)}, {Fstart: Chr(0x1E95), Fend: Chr(0x1E9D)}, {Fstart: Chr(0x1EFF), Fend: Chr(0x1F07)},
	{Fstart: Chr(0x1F10), Fend: Chr(0x1F15)}, {Fstart: Chr(0x1F20), Fend: Chr(0x1F27)}, {Fstart: Chr(0x1F30), Fend: Chr(0x1F37)}, {Fstart: Chr(0x1F40), Fend: Chr(0x1F45)},
	{Fstart: Chr(0x1F50), Fend: Chr(0x1F57)}, {Fstart: Chr(0x1F60), Fend: Chr(0x1F67)}, {Fstart: Chr(0x1F70), Fend: Chr(0x1F7D)}, {Fstart: Chr(0x1F80), Fend: Chr(0x1F87)},
	{Fstart: Chr(0x1F90), Fend: Chr(0x1F97)}, {Fstart: Chr(0x1FA0), Fend: Chr(0x1FA7)}, {Fstart: Chr(0x1FB0), Fend: Chr(0x1FB4)}, {Fstart: Chr(0x1FC2), Fend: Chr(0x1FC4)},
	{Fstart: Chr(0x1FD0), Fend: Chr(0x1FD3)}, {Fstart: Chr(0x1FE0), Fend: Chr(0x1FE7)}, {Fstart: Chr(0x1FF2), Fend: Chr(0x1FF4)}, {Fstart: Chr(0x2146), Fend: Chr(0x2149)},
	{Fstart: Chr(0x2C30), Fend: Chr(0x2C5F)}, {Fstart: Chr(0x2C76), Fend: Chr(0x2C7B)}, {Fstart: Chr(0x2D00), Fend: Chr(0x2D25)}, {Fstart: Chr(0xA72F), Fend: Chr(0xA731)},
	{Fstart: Chr(0xA771), Fend: Chr(0xA778)}, {Fstart: Chr(0xA793), Fend: Chr(0xA795)}, {Fstart: Chr(0xAB30), Fend: Chr(0xAB5A)}, {Fstart: Chr(0xAB60), Fend: Chr(0xAB68)},
	{Fstart: Chr(0xAB70), Fend: Chr(0xABBF)}, {Fstart: Chr(0xFB00), Fend: Chr(0xFB06)}, {Fstart: Chr(0xFB13), Fend: Chr(0xFB17)}, {Fstart: Chr(0xFF41), Fend: Chr(0xFF5A)},
} /* regc_locale.c:428:21 */

var lowerCharTable = [585]Chr{
	Chr(0xB5), Chr(0x101), Chr(0x103), Chr(0x105), Chr(0x107), Chr(0x109), Chr(0x10B), Chr(0x10D), Chr(0x10F),
	Chr(0x111), Chr(0x113), Chr(0x115), Chr(0x117), Chr(0x119), Chr(0x11B), Chr(0x11D), Chr(0x11F), Chr(0x121),
	Chr(0x123), Chr(0x125), Chr(0x127), Chr(0x129), Chr(0x12B), Chr(0x12D), Chr(0x12F), Chr(0x131), Chr(0x133),
	Chr(0x135), Chr(0x137), Chr(0x138), Chr(0x13A), Chr(0x13C), Chr(0x13E), Chr(0x140), Chr(0x142), Chr(0x144),
	Chr(0x146), Chr(0x148), Chr(0x149), Chr(0x14B), Chr(0x14D), Chr(0x14F), Chr(0x151), Chr(0x153), Chr(0x155),
	Chr(0x157), Chr(0x159), Chr(0x15B), Chr(0x15D), Chr(0x15F), Chr(0x161), Chr(0x163), Chr(0x165), Chr(0x167),
	Chr(0x169), Chr(0x16B), Chr(0x16D), Chr(0x16F), Chr(0x171), Chr(0x173), Chr(0x175), Chr(0x177), Chr(0x17A),
	Chr(0x17C), Chr(0x183), Chr(0x185), Chr(0x188), Chr(0x18C), Chr(0x18D), Chr(0x192), Chr(0x195), Chr(0x19E),
	Chr(0x1A1), Chr(0x1A3), Chr(0x1A5), Chr(0x1A8), Chr(0x1AA), Chr(0x1AB), Chr(0x1AD), Chr(0x1B0), Chr(0x1B4),
	Chr(0x1B6), Chr(0x1B9), Chr(0x1BA), Chr(0x1C6), Chr(0x1C9), Chr(0x1CC), Chr(0x1CE), Chr(0x1D0), Chr(0x1D2),
	Chr(0x1D4), Chr(0x1D6), Chr(0x1D8), Chr(0x1DA), Chr(0x1DC), Chr(0x1DD), Chr(0x1DF), Chr(0x1E1), Chr(0x1E3),
	Chr(0x1E5), Chr(0x1E7), Chr(0x1E9), Chr(0x1EB), Chr(0x1ED), Chr(0x1EF), Chr(0x1F0), Chr(0x1F3), Chr(0x1F5),
	Chr(0x1F9), Chr(0x1FB), Chr(0x1FD), Chr(0x1FF), Chr(0x201), Chr(0x203), Chr(0x205), Chr(0x207), Chr(0x209),
	Chr(0x20B), Chr(0x20D), Chr(0x20F), Chr(0x211), Chr(0x213), Chr(0x215), Chr(0x217), Chr(0x219), Chr(0x21B),
	Chr(0x21D), Chr(0x21F), Chr(0x221), Chr(0x223), Chr(0x225), Chr(0x227), Chr(0x229), Chr(0x22B), Chr(0x22D),
	Chr(0x22F), Chr(0x231), Chr(0x23C), Chr(0x23F), Chr(0x240), Chr(0x242), Chr(0x247), Chr(0x249), Chr(0x24B),
	Chr(0x24D), Chr(0x371), Chr(0x373), Chr(0x377), Chr(0x390), Chr(0x3D0), Chr(0x3D1), Chr(0x3D9), Chr(0x3DB),
	Chr(0x3DD), Chr(0x3DF), Chr(0x3E1), Chr(0x3E3), Chr(0x3E5), Chr(0x3E7), Chr(0x3E9), Chr(0x3EB), Chr(0x3ED),
	Chr(0x3F5), Chr(0x3F8), Chr(0x3FB), Chr(0x3FC), Chr(0x461), Chr(0x463), Chr(0x465), Chr(0x467), Chr(0x469),
	Chr(0x46B), Chr(0x46D), Chr(0x46F), Chr(0x471), Chr(0x473), Chr(0x475), Chr(0x477), Chr(0x479), Chr(0x47B),
	Chr(0x47D), Chr(0x47F), Chr(0x481), Chr(0x48B), Chr(0x48D), Chr(0x48F), Chr(0x491), Chr(0x493), Chr(0x495),
	Chr(0x497), Chr(0x499), Chr(0x49B), Chr(0x49D), Chr(0x49F), Chr(0x4A1), Chr(0x4A3), Chr(0x4A5), Chr(0x4A7),
	Chr(0x4A9), Chr(0x4AB), Chr(0x4AD), Chr(0x4AF), Chr(0x4B1), Chr(0x4B3), Chr(0x4B5), Chr(0x4B7), Chr(0x4B9),
	Chr(0x4BB), Chr(0x4BD), Chr(0x4BF), Chr(0x4C2), Chr(0x4C4), Chr(0x4C6), Chr(0x4C8), Chr(0x4CA), Chr(0x4CC),
	Chr(0x4CE), Chr(0x4CF), Chr(0x4D1), Chr(0x4D3), Chr(0x4D5), Chr(0x4D7), Chr(0x4D9), Chr(0x4DB), Chr(0x4DD),
	Chr(0x4DF), Chr(0x4E1), Chr(0x4E3), Chr(0x4E5), Chr(0x4E7), Chr(0x4E9), Chr(0x4EB), Chr(0x4ED), Chr(0x4EF),
	Chr(0x4F1), Chr(0x4F3), Chr(0x4F5), Chr(0x4F7), Chr(0x4F9), Chr(0x4FB), Chr(0x4FD), Chr(0x4FF), Chr(0x501),
	Chr(0x503), Chr(0x505), Chr(0x507), Chr(0x509), Chr(0x50B), Chr(0x50D), Chr(0x50F), Chr(0x511), Chr(0x513),
	Chr(0x515), Chr(0x517), Chr(0x519), Chr(0x51B), Chr(0x51D), Chr(0x51F), Chr(0x521), Chr(0x523), Chr(0x525),
	Chr(0x527), Chr(0x529), Chr(0x52B), Chr(0x52D), Chr(0x52F), Chr(0x1E01), Chr(0x1E03), Chr(0x1E05), Chr(0x1E07),
	Chr(0x1E09), Chr(0x1E0B), Chr(0x1E0D), Chr(0x1E0F), Chr(0x1E11), Chr(0x1E13), Chr(0x1E15), Chr(0x1E17), Chr(0x1E19),
	Chr(0x1E1B), Chr(0x1E1D), Chr(0x1E1F), Chr(0x1E21), Chr(0x1E23), Chr(0x1E25), Chr(0x1E27), Chr(0x1E29), Chr(0x1E2B),
	Chr(0x1E2D), Chr(0x1E2F), Chr(0x1E31), Chr(0x1E33), Chr(0x1E35), Chr(0x1E37), Chr(0x1E39), Chr(0x1E3B), Chr(0x1E3D),
	Chr(0x1E3F), Chr(0x1E41), Chr(0x1E43), Chr(0x1E45), Chr(0x1E47), Chr(0x1E49), Chr(0x1E4B), Chr(0x1E4D), Chr(0x1E4F),
	Chr(0x1E51), Chr(0x1E53), Chr(0x1E55), Chr(0x1E57), Chr(0x1E59), Chr(0x1E5B), Chr(0x1E5D), Chr(0x1E5F), Chr(0x1E61),
	Chr(0x1E63), Chr(0x1E65), Chr(0x1E67), Chr(0x1E69), Chr(0x1E6B), Chr(0x1E6D), Chr(0x1E6F), Chr(0x1E71), Chr(0x1E73),
	Chr(0x1E75), Chr(0x1E77), Chr(0x1E79), Chr(0x1E7B), Chr(0x1E7D), Chr(0x1E7F), Chr(0x1E81), Chr(0x1E83), Chr(0x1E85),
	Chr(0x1E87), Chr(0x1E89), Chr(0x1E8B), Chr(0x1E8D), Chr(0x1E8F), Chr(0x1E91), Chr(0x1E93), Chr(0x1E9F), Chr(0x1EA1),
	Chr(0x1EA3), Chr(0x1EA5), Chr(0x1EA7), Chr(0x1EA9), Chr(0x1EAB), Chr(0x1EAD), Chr(0x1EAF), Chr(0x1EB1), Chr(0x1EB3),
	Chr(0x1EB5), Chr(0x1EB7), Chr(0x1EB9), Chr(0x1EBB), Chr(0x1EBD), Chr(0x1EBF), Chr(0x1EC1), Chr(0x1EC3), Chr(0x1EC5),
	Chr(0x1EC7), Chr(0x1EC9), Chr(0x1ECB), Chr(0x1ECD), Chr(0x1ECF), Chr(0x1ED1), Chr(0x1ED3), Chr(0x1ED5), Chr(0x1ED7),
	Chr(0x1ED9), Chr(0x1EDB), Chr(0x1EDD), Chr(0x1EDF), Chr(0x1EE1), Chr(0x1EE3), Chr(0x1EE5), Chr(0x1EE7), Chr(0x1EE9),
	Chr(0x1EEB), Chr(0x1EED), Chr(0x1EEF), Chr(0x1EF1), Chr(0x1EF3), Chr(0x1EF5), Chr(0x1EF7), Chr(0x1EF9), Chr(0x1EFB),
	Chr(0x1EFD), Chr(0x1FB6), Chr(0x1FB7), Chr(0x1FBE), Chr(0x1FC6), Chr(0x1FC7), Chr(0x1FD6), Chr(0x1FD7), Chr(0x1FF6),
	Chr(0x1FF7), Chr(0x210A), Chr(0x210E), Chr(0x210F), Chr(0x2113), Chr(0x212F), Chr(0x2134), Chr(0x2139), Chr(0x213C),
	Chr(0x213D), Chr(0x214E), Chr(0x2184), Chr(0x2C61), Chr(0x2C65), Chr(0x2C66), Chr(0x2C68), Chr(0x2C6A), Chr(0x2C6C),
	Chr(0x2C71), Chr(0x2C73), Chr(0x2C74), Chr(0x2C81), Chr(0x2C83), Chr(0x2C85), Chr(0x2C87), Chr(0x2C89), Chr(0x2C8B),
	Chr(0x2C8D), Chr(0x2C8F), Chr(0x2C91), Chr(0x2C93), Chr(0x2C95), Chr(0x2C97), Chr(0x2C99), Chr(0x2C9B), Chr(0x2C9D),
	Chr(0x2C9F), Chr(0x2CA1), Chr(0x2CA3), Chr(0x2CA5), Chr(0x2CA7), Chr(0x2CA9), Chr(0x2CAB), Chr(0x2CAD), Chr(0x2CAF),
	Chr(0x2CB1), Chr(0x2CB3), Chr(0x2CB5), Chr(0x2CB7), Chr(0x2CB9), Chr(0x2CBB), Chr(0x2CBD), Chr(0x2CBF), Chr(0x2CC1),
	Chr(0x2CC3), Chr(0x2CC5), Chr(0x2CC7), Chr(0x2CC9), Chr(0x2CCB), Chr(0x2CCD), Chr(0x2CCF), Chr(0x2CD1), Chr(0x2CD3),
	Chr(0x2CD5), Chr(0x2CD7), Chr(0x2CD9), Chr(0x2CDB), Chr(0x2CDD), Chr(0x2CDF), Chr(0x2CE1), Chr(0x2CE3), Chr(0x2CE4),
	Chr(0x2CEC), Chr(0x2CEE), Chr(0x2CF3), Chr(0x2D27), Chr(0x2D2D), Chr(0xA641), Chr(0xA643), Chr(0xA645), Chr(0xA647),
	Chr(0xA649), Chr(0xA64B), Chr(0xA64D), Chr(0xA64F), Chr(0xA651), Chr(0xA653), Chr(0xA655), Chr(0xA657), Chr(0xA659),
	Chr(0xA65B), Chr(0xA65D), Chr(0xA65F), Chr(0xA661), Chr(0xA663), Chr(0xA665), Chr(0xA667), Chr(0xA669), Chr(0xA66B),
	Chr(0xA66D), Chr(0xA681), Chr(0xA683), Chr(0xA685), Chr(0xA687), Chr(0xA689), Chr(0xA68B), Chr(0xA68D), Chr(0xA68F),
	Chr(0xA691), Chr(0xA693), Chr(0xA695), Chr(0xA697), Chr(0xA699), Chr(0xA69B), Chr(0xA723), Chr(0xA725), Chr(0xA727),
	Chr(0xA729), Chr(0xA72B), Chr(0xA72D), Chr(0xA733), Chr(0xA735), Chr(0xA737), Chr(0xA739), Chr(0xA73B), Chr(0xA73D),
	Chr(0xA73F), Chr(0xA741), Chr(0xA743), Chr(0xA745), Chr(0xA747), Chr(0xA749), Chr(0xA74B), Chr(0xA74D), Chr(0xA74F),
	Chr(0xA751), Chr(0xA753), Chr(0xA755), Chr(0xA757), Chr(0xA759), Chr(0xA75B), Chr(0xA75D), Chr(0xA75F), Chr(0xA761),
	Chr(0xA763), Chr(0xA765), Chr(0xA767), Chr(0xA769), Chr(0xA76B), Chr(0xA76D), Chr(0xA76F), Chr(0xA77A), Chr(0xA77C),
	Chr(0xA77F), Chr(0xA781), Chr(0xA783), Chr(0xA785), Chr(0xA787), Chr(0xA78C), Chr(0xA78E), Chr(0xA791), Chr(0xA797),
	Chr(0xA799), Chr(0xA79B), Chr(0xA79D), Chr(0xA79F), Chr(0xA7A1), Chr(0xA7A3), Chr(0xA7A5), Chr(0xA7A7), Chr(0xA7A9),
	Chr(0xA7AF), Chr(0xA7B5), Chr(0xA7B7), Chr(0xA7B9), Chr(0xA7BB), Chr(0xA7BD), Chr(0xA7BF), Chr(0xA7C1), Chr(0xA7C3),
	Chr(0xA7C8), Chr(0xA7CA), Chr(0xA7D1), Chr(0xA7D3), Chr(0xA7D5), Chr(0xA7D7), Chr(0xA7D9), Chr(0xA7F6), Chr(0xA7FA),
} /* regc_locale.c:458:18 */

// Unicode: uppercase characters.

var upperRangeTable = [43]Crange{
	{Fstart: Chr(0x41), Fend: Chr(0x5A)}, {Fstart: Chr(0xC0), Fend: Chr(0xD6)}, {Fstart: Chr(0xD8), Fend: Chr(0xDE)}, {Fstart: Chr(0x189), Fend: Chr(0x18B)},
	{Fstart: Chr(0x18E), Fend: Chr(0x191)}, {Fstart: Chr(0x196), Fend: Chr(0x198)}, {Fstart: Chr(0x1B1), Fend: Chr(0x1B3)}, {Fstart: Chr(0x1F6), Fend: Chr(0x1F8)},
	{Fstart: Chr(0x243), Fend: Chr(0x246)}, {Fstart: Chr(0x388), Fend: Chr(0x38A)}, {Fstart: Chr(0x391), Fend: Chr(0x3A1)}, {Fstart: Chr(0x3A3), Fend: Chr(0x3AB)},
	{Fstart: Chr(0x3D2), Fend: Chr(0x3D4)}, {Fstart: Chr(0x3FD), Fend: Chr(0x42F)}, {Fstart: Chr(0x531), Fend: Chr(0x556)}, {Fstart: Chr(0x10A0), Fend: Chr(0x10C5)},
	{Fstart: Chr(0x13A0), Fend: Chr(0x13F5)}, {Fstart: Chr(0x1C90), Fend: Chr(0x1CBA)}, {Fstart: Chr(0x1CBD), Fend: Chr(0x1CBF)}, {Fstart: Chr(0x1F08), Fend: Chr(0x1F0F)},
	{Fstart: Chr(0x1F18), Fend: Chr(0x1F1D)}, {Fstart: Chr(0x1F28), Fend: Chr(0x1F2F)}, {Fstart: Chr(0x1F38), Fend: Chr(0x1F3F)}, {Fstart: Chr(0x1F48), Fend: Chr(0x1F4D)},
	{Fstart: Chr(0x1F68), Fend: Chr(0x1F6F)}, {Fstart: Chr(0x1FB8), Fend: Chr(0x1FBB)}, {Fstart: Chr(0x1FC8), Fend: Chr(0x1FCB)}, {Fstart: Chr(0x1FD8), Fend: Chr(0x1FDB)},
	{Fstart: Chr(0x1FE8), Fend: Chr(0x1FEC)}, {Fstart: Chr(0x1FF8), Fend: Chr(0x1FFB)}, {Fstart: Chr(0x210B), Fend: Chr(0x210D)}, {Fstart: Chr(0x2110), Fend: Chr(0x2112)},
	{Fstart: Chr(0x2119), Fend: Chr(0x211D)}, {Fstart: Chr(0x212A), Fend: Chr(0x212D)}, {Fstart: Chr(0x2130), Fend: Chr(0x2133)}, {Fstart: Chr(0x2C00), Fend: Chr(0x2C2F)},
	{Fstart: Chr(0x2C62), Fend: Chr(0x2C64)}, {Fstart: Chr(0x2C6D), Fend: Chr(0x2C70)}, {Fstart: Chr(0x2C7E), Fend: Chr(0x2C80)}, {Fstart: Chr(0xA7AA), Fend: Chr(0xA7AE)},
	{Fstart: Chr(0xA7B0), Fend: Chr(0xA7B4)}, {Fstart: Chr(0xA7C4), Fend: Chr(0xA7C7)}, {Fstart: Chr(0xFF21), Fend: Chr(0xFF3A)},
} /* regc_locale.c:535:21 */

var upperCharTable = [578]Chr{
	Chr(0x100), Chr(0x102), Chr(0x104), Chr(0x106), Chr(0x108), Chr(0x10A), Chr(0x10C), Chr(0x10E), Chr(0x110),
	Chr(0x112), Chr(0x114), Chr(0x116), Chr(0x118), Chr(0x11A), Chr(0x11C), Chr(0x11E), Chr(0x120), Chr(0x122),
	Chr(0x124), Chr(0x126), Chr(0x128), Chr(0x12A), Chr(0x12C), Chr(0x12E), Chr(0x130), Chr(0x132), Chr(0x134),
	Chr(0x136), Chr(0x139), Chr(0x13B), Chr(0x13D), Chr(0x13F), Chr(0x141), Chr(0x143), Chr(0x145), Chr(0x147),
	Chr(0x14A), Chr(0x14C), Chr(0x14E), Chr(0x150), Chr(0x152), Chr(0x154), Chr(0x156), Chr(0x158), Chr(0x15A),
	Chr(0x15C), Chr(0x15E), Chr(0x160), Chr(0x162), Chr(0x164), Chr(0x166), Chr(0x168), Chr(0x16A), Chr(0x16C),
	Chr(0x16E), Chr(0x170), Chr(0x172), Chr(0x174), Chr(0x176), Chr(0x178), Chr(0x179), Chr(0x17B), Chr(0x17D),
	Chr(0x181), Chr(0x182), Chr(0x184), Chr(0x186), Chr(0x187), Chr(0x193), Chr(0x194), Chr(0x19C), Chr(0x19D),
	Chr(0x19F), Chr(0x1A0), Chr(0x1A2), Chr(0x1A4), Chr(0x1A6), Chr(0x1A7), Chr(0x1A9), Chr(0x1AC), Chr(0x1AE),
	Chr(0x1AF), Chr(0x1B5), Chr(0x1B7), Chr(0x1B8), Chr(0x1BC), Chr(0x1C4), Chr(0x1C7), Chr(0x1CA), Chr(0x1CD),
	Chr(0x1CF), Chr(0x1D1), Chr(0x1D3), Chr(0x1D5), Chr(0x1D7), Chr(0x1D9), Chr(0x1DB), Chr(0x1DE), Chr(0x1E0),
	Chr(0x1E2), Chr(0x1E4), Chr(0x1E6), Chr(0x1E8), Chr(0x1EA), Chr(0x1EC), Chr(0x1EE), Chr(0x1F1), Chr(0x1F4),
	Chr(0x1FA), Chr(0x1FC), Chr(0x1FE), Chr(0x200), Chr(0x202), Chr(0x204), Chr(0x206), Chr(0x208), Chr(0x20A),
	Chr(0x20C), Chr(0x20E), Chr(0x210), Chr(0x212), Chr(0x214), Chr(0x216), Chr(0x218), Chr(0x21A), Chr(0x21C),
	Chr(0x21E), Chr(0x220), Chr(0x222), Chr(0x224), Chr(0x226), Chr(0x228), Chr(0x22A), Chr(0x22C), Chr(0x22E),
	Chr(0x230), Chr(0x232), Chr(0x23A), Chr(0x23B), Chr(0x23D), Chr(0x23E), Chr(0x241), Chr(0x248), Chr(0x24A),
	Chr(0x24C), Chr(0x24E), Chr(0x370), Chr(0x372), Chr(0x376), Chr(0x37F), Chr(0x386), Chr(0x38C), Chr(0x38E),
	Chr(0x38F), Chr(0x3CF), Chr(0x3D8), Chr(0x3DA), Chr(0x3DC), Chr(0x3DE), Chr(0x3E0), Chr(0x3E2), Chr(0x3E4),
	Chr(0x3E6), Chr(0x3E8), Chr(0x3EA), Chr(0x3EC), Chr(0x3EE), Chr(0x3F4), Chr(0x3F7), Chr(0x3F9), Chr(0x3FA),
	Chr(0x460), Chr(0x462), Chr(0x464), Chr(0x466), Chr(0x468), Chr(0x46A), Chr(0x46C), Chr(0x46E), Chr(0x470),
	Chr(0x472), Chr(0x474), Chr(0x476), Chr(0x478), Chr(0x47A), Chr(0x47C), Chr(0x47E), Chr(0x480), Chr(0x48A),
	Chr(0x48C), Chr(0x48E), Chr(0x490), Chr(0x492), Chr(0x494), Chr(0x496), Chr(0x498), Chr(0x49A), Chr(0x49C),
	Chr(0x49E), Chr(0x4A0), Chr(0x4A2), Chr(0x4A4), Chr(0x4A6), Chr(0x4A8), Chr(0x4AA), Chr(0x4AC), Chr(0x4AE),
	Chr(0x4B0), Chr(0x4B2), Chr(0x4B4), Chr(0x4B6), Chr(0x4B8), Chr(0x4BA), Chr(0x4BC), Chr(0x4BE), Chr(0x4C0),
	Chr(0x4C1), Chr(0x4C3), Chr(0x4C5), Chr(0x4C7), Chr(0x4C9), Chr(0x4CB), Chr(0x4CD), Chr(0x4D0), Chr(0x4D2),
	Chr(0x4D4), Chr(0x4D6), Chr(0x4D8), Chr(0x4DA), Chr(0x4DC), Chr(0x4DE), Chr(0x4E0), Chr(0x4E2), Chr(0x4E4),
	Chr(0x4E6), Chr(0x4E8), Chr(0x4EA), Chr(0x4EC), Chr(0x4EE), Chr(0x4F0), Chr(0x4F2), Chr(0x4F4), Chr(0x4F6),
	Chr(0x4F8), Chr(0x4FA), Chr(0x4FC), Chr(0x4FE), Chr(0x500), Chr(0x502), Chr(0x504), Chr(0x506), Chr(0x508),
	Chr(0x50A), Chr(0x50C), Chr(0x50E), Chr(0x510), Chr(0x512), Chr(0x514), Chr(0x516), Chr(0x518), Chr(0x51A),
	Chr(0x51C), Chr(0x51E), Chr(0x520), Chr(0x522), Chr(0x524), Chr(0x526), Chr(0x528), Chr(0x52A), Chr(0x52C),
	Chr(0x52E), Chr(0x10C7), Chr(0x10CD), Chr(0x1E00), Chr(0x1E02), Chr(0x1E04), Chr(0x1E06), Chr(0x1E08), Chr(0x1E0A),
	Chr(0x1E0C), Chr(0x1E0E), Chr(0x1E10), Chr(0x1E12), Chr(0x1E14), Chr(0x1E16), Chr(0x1E18), Chr(0x1E1A), Chr(0x1E1C),
	Chr(0x1E1E), Chr(0x1E20), Chr(0x1E22), Chr(0x1E24), Chr(0x1E26), Chr(0x1E28), Chr(0x1E2A), Chr(0x1E2C), Chr(0x1E2E),
	Chr(0x1E30), Chr(0x1E32), Chr(0x1E34), Chr(0x1E36), Chr(0x1E38), Chr(0x1E3A), Chr(0x1E3C), Chr(0x1E3E), Chr(0x1E40),
	Chr(0x1E42), Chr(0x1E44), Chr(0x1E46), Chr(0x1E48), Chr(0x1E4A), Chr(0x1E4C), Chr(0x1E4E), Chr(0x1E50), Chr(0x1E52),
	Chr(0x1E54), Chr(0x1E56), Chr(0x1E58), Chr(0x1E5A), Chr(0x1E5C), Chr(0x1E5E), Chr(0x1E60), Chr(0x1E62), Chr(0x1E64),
	Chr(0x1E66), Chr(0x1E68), Chr(0x1E6A), Chr(0x1E6C), Chr(0x1E6E), Chr(0x1E70), Chr(0x1E72), Chr(0x1E74), Chr(0x1E76),
	Chr(0x1E78), Chr(0x1E7A), Chr(0x1E7C), Chr(0x1E7E), Chr(0x1E80), Chr(0x1E82), Chr(0x1E84), Chr(0x1E86), Chr(0x1E88),
	Chr(0x1E8A), Chr(0x1E8C), Chr(0x1E8E), Chr(0x1E90), Chr(0x1E92), Chr(0x1E94), Chr(0x1E9E), Chr(0x1EA0), Chr(0x1EA2),
	Chr(0x1EA4), Chr(0x1EA6), Chr(0x1EA8), Chr(0x1EAA), Chr(0x1EAC), Chr(0x1EAE), Chr(0x1EB0), Chr(0x1EB2), Chr(0x1EB4),
	Chr(0x1EB6), Chr(0x1EB8), Chr(0x1EBA), Chr(0x1EBC), Chr(0x1EBE), Chr(0x1EC0), Chr(0x1EC2), Chr(0x1EC4), Chr(0x1EC6),
	Chr(0x1EC8), Chr(0x1ECA), Chr(0x1ECC), Chr(0x1ECE), Chr(0x1ED0), Chr(0x1ED2), Chr(0x1ED4), Chr(0x1ED6), Chr(0x1ED8),
	Chr(0x1EDA), Chr(0x1EDC), Chr(0x1EDE), Chr(0x1EE0), Chr(0x1EE2), Chr(0x1EE4), Chr(0x1EE6), Chr(0x1EE8), Chr(0x1EEA),
	Chr(0x1EEC), Chr(0x1EEE), Chr(0x1EF0), Chr(0x1EF2), Chr(0x1EF4), Chr(0x1EF6), Chr(0x1EF8), Chr(0x1EFA), Chr(0x1EFC),
	Chr(0x1EFE), Chr(0x1F59), Chr(0x1F5B), Chr(0x1F5D), Chr(0x1F5F), Chr(0x2102), Chr(0x2107), Chr(0x2115), Chr(0x2124),
	Chr(0x2126), Chr(0x2128), Chr(0x213E), Chr(0x213F), Chr(0x2145), Chr(0x2183), Chr(0x2C60), Chr(0x2C67), Chr(0x2C69),
	Chr(0x2C6B), Chr(0x2C72), Chr(0x2C75), Chr(0x2C82), Chr(0x2C84), Chr(0x2C86), Chr(0x2C88), Chr(0x2C8A), Chr(0x2C8C),
	Chr(0x2C8E), Chr(0x2C90), Chr(0x2C92), Chr(0x2C94), Chr(0x2C96), Chr(0x2C98), Chr(0x2C9A), Chr(0x2C9C), Chr(0x2C9E),
	Chr(0x2CA0), Chr(0x2CA2), Chr(0x2CA4), Chr(0x2CA6), Chr(0x2CA8), Chr(0x2CAA), Chr(0x2CAC), Chr(0x2CAE), Chr(0x2CB0),
	Chr(0x2CB2), Chr(0x2CB4), Chr(0x2CB6), Chr(0x2CB8), Chr(0x2CBA), Chr(0x2CBC), Chr(0x2CBE), Chr(0x2CC0), Chr(0x2CC2),
	Chr(0x2CC4), Chr(0x2CC6), Chr(0x2CC8), Chr(0x2CCA), Chr(0x2CCC), Chr(0x2CCE), Chr(0x2CD0), Chr(0x2CD2), Chr(0x2CD4),
	Chr(0x2CD6), Chr(0x2CD8), Chr(0x2CDA), Chr(0x2CDC), Chr(0x2CDE), Chr(0x2CE0), Chr(0x2CE2), Chr(0x2CEB), Chr(0x2CED),
	Chr(0x2CF2), Chr(0xA640), Chr(0xA642), Chr(0xA644), Chr(0xA646), Chr(0xA648), Chr(0xA64A), Chr(0xA64C), Chr(0xA64E),
	Chr(0xA650), Chr(0xA652), Chr(0xA654), Chr(0xA656), Chr(0xA658), Chr(0xA65A), Chr(0xA65C), Chr(0xA65E), Chr(0xA660),
	Chr(0xA662), Chr(0xA664), Chr(0xA666), Chr(0xA668), Chr(0xA66A), Chr(0xA66C), Chr(0xA680), Chr(0xA682), Chr(0xA684),
	Chr(0xA686), Chr(0xA688), Chr(0xA68A), Chr(0xA68C), Chr(0xA68E), Chr(0xA690), Chr(0xA692), Chr(0xA694), Chr(0xA696),
	Chr(0xA698), Chr(0xA69A), Chr(0xA722), Chr(0xA724), Chr(0xA726), Chr(0xA728), Chr(0xA72A), Chr(0xA72C), Chr(0xA72E),
	Chr(0xA732), Chr(0xA734), Chr(0xA736), Chr(0xA738), Chr(0xA73A), Chr(0xA73C), Chr(0xA73E), Chr(0xA740), Chr(0xA742),
	Chr(0xA744), Chr(0xA746), Chr(0xA748), Chr(0xA74A), Chr(0xA74C), Chr(0xA74E), Chr(0xA750), Chr(0xA752), Chr(0xA754),
	Chr(0xA756), Chr(0xA758), Chr(0xA75A), Chr(0xA75C), Chr(0xA75E), Chr(0xA760), Chr(0xA762), Chr(0xA764), Chr(0xA766),
	Chr(0xA768), Chr(0xA76A), Chr(0xA76C), Chr(0xA76E), Chr(0xA779), Chr(0xA77B), Chr(0xA77D), Chr(0xA77E), Chr(0xA780),
	Chr(0xA782), Chr(0xA784), Chr(0xA786), Chr(0xA78B), Chr(0xA78D), Chr(0xA790), Chr(0xA792), Chr(0xA796), Chr(0xA798),
	Chr(0xA79A), Chr(0xA79C), Chr(0xA79E), Chr(0xA7A0), Chr(0xA7A2), Chr(0xA7A4), Chr(0xA7A6), Chr(0xA7A8), Chr(0xA7B6),
	Chr(0xA7B8), Chr(0xA7BA), Chr(0xA7BC), Chr(0xA7BE), Chr(0xA7C0), Chr(0xA7C2), Chr(0xA7C9), Chr(0xA7D0), Chr(0xA7D6),
	Chr(0xA7D8), Chr(0xA7F5),
} /* regc_locale.c:561:18 */

// Unicode: unicode print characters excluding space.

var graphRangeTable = [285]Crange{
	{Fstart: Chr(0x21), Fend: Chr(0x7E)}, {Fstart: Chr(0xA1), Fend: Chr(0xAC)}, {Fstart: Chr(0xAE), Fend: Chr(0x377)}, {Fstart: Chr(0x37A), Fend: Chr(0x37F)},
	{Fstart: Chr(0x384), Fend: Chr(0x38A)}, {Fstart: Chr(0x38E), Fend: Chr(0x3A1)}, {Fstart: Chr(0x3A3), Fend: Chr(0x52F)}, {Fstart: Chr(0x531), Fend: Chr(0x556)},
	{Fstart: Chr(0x559), Fend: Chr(0x58A)}, {Fstart: Chr(0x58D), Fend: Chr(0x58F)}, {Fstart: Chr(0x591), Fend: Chr(0x5C7)}, {Fstart: Chr(0x5D0), Fend: Chr(0x5EA)},
	{Fstart: Chr(0x5EF), Fend: Chr(0x5F4)}, {Fstart: Chr(0x606), Fend: Chr(0x61B)}, {Fstart: Chr(0x61D), Fend: Chr(0x6DC)}, {Fstart: Chr(0x6DE), Fend: Chr(0x70D)},
	{Fstart: Chr(0x710), Fend: Chr(0x74A)}, {Fstart: Chr(0x74D), Fend: Chr(0x7B1)}, {Fstart: Chr(0x7C0), Fend: Chr(0x7FA)}, {Fstart: Chr(0x7FD), Fend: Chr(0x82D)},
	{Fstart: Chr(0x830), Fend: Chr(0x83E)}, {Fstart: Chr(0x840), Fend: Chr(0x85B)}, {Fstart: Chr(0x860), Fend: Chr(0x86A)}, {Fstart: Chr(0x870), Fend: Chr(0x88E)},
	{Fstart: Chr(0x898), Fend: Chr(0x8E1)}, {Fstart: Chr(0x8E3), Fend: Chr(0x983)}, {Fstart: Chr(0x985), Fend: Chr(0x98C)}, {Fstart: Chr(0x993), Fend: Chr(0x9A8)},
	{Fstart: Chr(0x9AA), Fend: Chr(0x9B0)}, {Fstart: Chr(0x9B6), Fend: Chr(0x9B9)}, {Fstart: Chr(0x9BC), Fend: Chr(0x9C4)}, {Fstart: Chr(0x9CB), Fend: Chr(0x9CE)},
	{Fstart: Chr(0x9DF), Fend: Chr(0x9E3)}, {Fstart: Chr(0x9E6), Fend: Chr(0x9FE)}, {Fstart: Chr(0xA01), Fend: Chr(0xA03)}, {Fstart: Chr(0xA05), Fend: Chr(0xA0A)},
	{Fstart: Chr(0xA13), Fend: Chr(0xA28)}, {Fstart: Chr(0xA2A), Fend: Chr(0xA30)}, {Fstart: Chr(0xA3E), Fend: Chr(0xA42)}, {Fstart: Chr(0xA4B), Fend: Chr(0xA4D)},
	{Fstart: Chr(0xA59), Fend: Chr(0xA5C)}, {Fstart: Chr(0xA66), Fend: Chr(0xA76)}, {Fstart: Chr(0xA81), Fend: Chr(0xA83)}, {Fstart: Chr(0xA85), Fend: Chr(0xA8D)},
	{Fstart: Chr(0xA8F), Fend: Chr(0xA91)}, {Fstart: Chr(0xA93), Fend: Chr(0xAA8)}, {Fstart: Chr(0xAAA), Fend: Chr(0xAB0)}, {Fstart: Chr(0xAB5), Fend: Chr(0xAB9)},
	{Fstart: Chr(0xABC), Fend: Chr(0xAC5)}, {Fstart: Chr(0xAC7), Fend: Chr(0xAC9)}, {Fstart: Chr(0xACB), Fend: Chr(0xACD)}, {Fstart: Chr(0xAE0), Fend: Chr(0xAE3)},
	{Fstart: Chr(0xAE6), Fend: Chr(0xAF1)}, {Fstart: Chr(0xAF9), Fend: Chr(0xAFF)}, {Fstart: Chr(0xB01), Fend: Chr(0xB03)}, {Fstart: Chr(0xB05), Fend: Chr(0xB0C)},
	{Fstart: Chr(0xB13), Fend: Chr(0xB28)}, {Fstart: Chr(0xB2A), Fend: Chr(0xB30)}, {Fstart: Chr(0xB35), Fend: Chr(0xB39)}, {Fstart: Chr(0xB3C), Fend: Chr(0xB44)},
	{Fstart: Chr(0xB4B), Fend: Chr(0xB4D)}, {Fstart: Chr(0xB55), Fend: Chr(0xB57)}, {Fstart: Chr(0xB5F), Fend: Chr(0xB63)}, {Fstart: Chr(0xB66), Fend: Chr(0xB77)},
	{Fstart: Chr(0xB85), Fend: Chr(0xB8A)}, {Fstart: Chr(0xB8E), Fend: Chr(0xB90)}, {Fstart: Chr(0xB92), Fend: Chr(0xB95)}, {Fstart: Chr(0xBA8), Fend: Chr(0xBAA)},
	{Fstart: Chr(0xBAE), Fend: Chr(0xBB9)}, {Fstart: Chr(0xBBE), Fend: Chr(0xBC2)}, {Fstart: Chr(0xBC6), Fend: Chr(0xBC8)}, {Fstart: Chr(0xBCA), Fend: Chr(0xBCD)},
	{Fstart: Chr(0xBE6), Fend: Chr(0xBFA)}, {Fstart: Chr(0xC00), Fend: Chr(0xC0C)}, {Fstart: Chr(0xC0E), Fend: Chr(0xC10)}, {Fstart: Chr(0xC12), Fend: Chr(0xC28)},
	{Fstart: Chr(0xC2A), Fend: Chr(0xC39)}, {Fstart: Chr(0xC3C), Fend: Chr(0xC44)}, {Fstart: Chr(0xC46), Fend: Chr(0xC48)}, {Fstart: Chr(0xC4A), Fend: Chr(0xC4D)},
	{Fstart: Chr(0xC58), Fend: Chr(0xC5A)}, {Fstart: Chr(0xC60), Fend: Chr(0xC63)}, {Fstart: Chr(0xC66), Fend: Chr(0xC6F)}, {Fstart: Chr(0xC77), Fend: Chr(0xC8C)},
	{Fstart: Chr(0xC8E), Fend: Chr(0xC90)}, {Fstart: Chr(0xC92), Fend: Chr(0xCA8)}, {Fstart: Chr(0xCAA), Fend: Chr(0xCB3)}, {Fstart: Chr(0xCB5), Fend: Chr(0xCB9)},
	{Fstart: Chr(0xCBC), Fend: Chr(0xCC4)}, {Fstart: Chr(0xCC6), Fend: Chr(0xCC8)}, {Fstart: Chr(0xCCA), Fend: Chr(0xCCD)}, {Fstart: Chr(0xCE0), Fend: Chr(0xCE3)},
	{Fstart: Chr(0xCE6), Fend: Chr(0xCEF)}, {Fstart: Chr(0xD00), Fend: Chr(0xD0C)}, {Fstart: Chr(0xD0E), Fend: Chr(0xD10)}, {Fstart: Chr(0xD12), Fend: Chr(0xD44)},
	{Fstart: Chr(0xD46), Fend: Chr(0xD48)}, {Fstart: Chr(0xD4A), Fend: Chr(0xD4F)}, {Fstart: Chr(0xD54), Fend: Chr(0xD63)}, {Fstart: Chr(0xD66), Fend: Chr(0xD7F)},
	{Fstart: Chr(0xD81), Fend: Chr(0xD83)}, {Fstart: Chr(0xD85), Fend: Chr(0xD96)}, {Fstart: Chr(0xD9A), Fend: Chr(0xDB1)}, {Fstart: Chr(0xDB3), Fend: Chr(0xDBB)},
	{Fstart: Chr(0xDC0), Fend: Chr(0xDC6)}, {Fstart: Chr(0xDCF), Fend: Chr(0xDD4)}, {Fstart: Chr(0xDD8), Fend: Chr(0xDDF)}, {Fstart: Chr(0xDE6), Fend: Chr(0xDEF)},
	{Fstart: Chr(0xDF2), Fend: Chr(0xDF4)}, {Fstart: Chr(0xE01), Fend: Chr(0xE3A)}, {Fstart: Chr(0xE3F), Fend: Chr(0xE5B)}, {Fstart: Chr(0xE86), Fend: Chr(0xE8A)},
	{Fstart: Chr(0xE8C), Fend: Chr(0xEA3)}, {Fstart: Chr(0xEA7), Fend: Chr(0xEBD)}, {Fstart: Chr(0xEC0), Fend: Chr(0xEC4)}, {Fstart: Chr(0xEC8), Fend: Chr(0xECD)},
	{Fstart: Chr(0xED0), Fend: Chr(0xED9)}, {Fstart: Chr(0xEDC), Fend: Chr(0xEDF)}, {Fstart: Chr(0xF00), Fend: Chr(0xF47)}, {Fstart: Chr(0xF49), Fend: Chr(0xF6C)},
	{Fstart: Chr(0xF71), Fend: Chr(0xF97)}, {Fstart: Chr(0xF99), Fend: Chr(0xFBC)}, {Fstart: Chr(0xFBE), Fend: Chr(0xFCC)}, {Fstart: Chr(0xFCE), Fend: Chr(0xFDA)},
	{Fstart: Chr(0x1000), Fend: Chr(0x10C5)}, {Fstart: Chr(0x10D0), Fend: Chr(0x1248)}, {Fstart: Chr(0x124A), Fend: Chr(0x124D)}, {Fstart: Chr(0x1250), Fend: Chr(0x1256)},
	{Fstart: Chr(0x125A), Fend: Chr(0x125D)}, {Fstart: Chr(0x1260), Fend: Chr(0x1288)}, {Fstart: Chr(0x128A), Fend: Chr(0x128D)}, {Fstart: Chr(0x1290), Fend: Chr(0x12B0)},
	{Fstart: Chr(0x12B2), Fend: Chr(0x12B5)}, {Fstart: Chr(0x12B8), Fend: Chr(0x12BE)}, {Fstart: Chr(0x12C2), Fend: Chr(0x12C5)}, {Fstart: Chr(0x12C8), Fend: Chr(0x12D6)},
	{Fstart: Chr(0x12D8), Fend: Chr(0x1310)}, {Fstart: Chr(0x1312), Fend: Chr(0x1315)}, {Fstart: Chr(0x1318), Fend: Chr(0x135A)}, {Fstart: Chr(0x135D), Fend: Chr(0x137C)},
	{Fstart: Chr(0x1380), Fend: Chr(0x1399)}, {Fstart: Chr(0x13A0), Fend: Chr(0x13F5)}, {Fstart: Chr(0x13F8), Fend: Chr(0x13FD)}, {Fstart: Chr(0x1400), Fend: Chr(0x167F)},
	{Fstart: Chr(0x1681), Fend: Chr(0x169C)}, {Fstart: Chr(0x16A0), Fend: Chr(0x16F8)}, {Fstart: Chr(0x1700), Fend: Chr(0x1715)}, {Fstart: Chr(0x171F), Fend: Chr(0x1736)},
	{Fstart: Chr(0x1740), Fend: Chr(0x1753)}, {Fstart: Chr(0x1760), Fend: Chr(0x176C)}, {Fstart: Chr(0x176E), Fend: Chr(0x1770)}, {Fstart: Chr(0x1780), Fend: Chr(0x17DD)},
	{Fstart: Chr(0x17E0), Fend: Chr(0x17E9)}, {Fstart: Chr(0x17F0), Fend: Chr(0x17F9)}, {Fstart: Chr(0x1800), Fend: Chr(0x180D)}, {Fstart: Chr(0x180F), Fend: Chr(0x1819)},
	{Fstart: Chr(0x1820), Fend: Chr(0x1878)}, {Fstart: Chr(0x1880), Fend: Chr(0x18AA)}, {Fstart: Chr(0x18B0), Fend: Chr(0x18F5)}, {Fstart: Chr(0x1900), Fend: Chr(0x191E)},
	{Fstart: Chr(0x1920), Fend: Chr(0x192B)}, {Fstart: Chr(0x1930), Fend: Chr(0x193B)}, {Fstart: Chr(0x1944), Fend: Chr(0x196D)}, {Fstart: Chr(0x1970), Fend: Chr(0x1974)},
	{Fstart: Chr(0x1980), Fend: Chr(0x19AB)}, {Fstart: Chr(0x19B0), Fend: Chr(0x19C9)}, {Fstart: Chr(0x19D0), Fend: Chr(0x19DA)}, {Fstart: Chr(0x19DE), Fend: Chr(0x1A1B)},
	{Fstart: Chr(0x1A1E), Fend: Chr(0x1A5E)}, {Fstart: Chr(0x1A60), Fend: Chr(0x1A7C)}, {Fstart: Chr(0x1A7F), Fend: Chr(0x1A89)}, {Fstart: Chr(0x1A90), Fend: Chr(0x1A99)},
	{Fstart: Chr(0x1AA0), Fend: Chr(0x1AAD)}, {Fstart: Chr(0x1AB0), Fend: Chr(0x1ACE)}, {Fstart: Chr(0x1B00), Fend: Chr(0x1B4C)}, {Fstart: Chr(0x1B50), Fend: Chr(0x1B7E)},
	{Fstart: Chr(0x1B80), Fend: Chr(0x1BF3)}, {Fstart: Chr(0x1BFC), Fend: Chr(0x1C37)}, {Fstart: Chr(0x1C3B), Fend: Chr(0x1C49)}, {Fstart: Chr(0x1C4D), Fend: Chr(0x1C88)},
	{Fstart: Chr(0x1C90), Fend: Chr(0x1CBA)}, {Fstart: Chr(0x1CBD), Fend: Chr(0x1CC7)}, {Fstart: Chr(0x1CD0), Fend: Chr(0x1CFA)}, {Fstart: Chr(0x1D00), Fend: Chr(0x1F15)},
	{Fstart: Chr(0x1F18), Fend: Chr(0x1F1D)}, {Fstart: Chr(0x1F20), Fend: Chr(0x1F45)}, {Fstart: Chr(0x1F48), Fend: Chr(0x1F4D)}, {Fstart: Chr(0x1F50), Fend: Chr(0x1F57)},
	{Fstart: Chr(0x1F5F), Fend: Chr(0x1F7D)}, {Fstart: Chr(0x1F80), Fend: Chr(0x1FB4)}, {Fstart: Chr(0x1FB6), Fend: Chr(0x1FC4)}, {Fstart: Chr(0x1FC6), Fend: Chr(0x1FD3)},
	{Fstart: Chr(0x1FD6), Fend: Chr(0x1FDB)}, {Fstart: Chr(0x1FDD), Fend: Chr(0x1FEF)}, {Fstart: Chr(0x1FF2), Fend: Chr(0x1FF4)}, {Fstart: Chr(0x1FF6), Fend: Chr(0x1FFE)},
	{Fstart: Chr(0x2010), Fend: Chr(0x2027)}, {Fstart: Chr(0x2030), Fend: Chr(0x205E)}, {Fstart: Chr(0x2074), Fend: Chr(0x208E)}, {Fstart: Chr(0x2090), Fend: Chr(0x209C)},
	{Fstart: Chr(0x20A0), Fend: Chr(0x20C0)}, {Fstart: Chr(0x20D0), Fend: Chr(0x20F0)}, {Fstart: Chr(0x2100), Fend: Chr(0x218B)}, {Fstart: Chr(0x2190), Fend: Chr(0x2426)},
	{Fstart: Chr(0x2440), Fend: Chr(0x244A)}, {Fstart: Chr(0x2460), Fend: Chr(0x2B73)}, {Fstart: Chr(0x2B76), Fend: Chr(0x2B95)}, {Fstart: Chr(0x2B97), Fend: Chr(0x2CF3)},
	{Fstart: Chr(0x2CF9), Fend: Chr(0x2D25)}, {Fstart: Chr(0x2D30), Fend: Chr(0x2D67)}, {Fstart: Chr(0x2D7F), Fend: Chr(0x2D96)}, {Fstart: Chr(0x2DA0), Fend: Chr(0x2DA6)},
	{Fstart: Chr(0x2DA8), Fend: Chr(0x2DAE)}, {Fstart: Chr(0x2DB0), Fend: Chr(0x2DB6)}, {Fstart: Chr(0x2DB8), Fend: Chr(0x2DBE)}, {Fstart: Chr(0x2DC0), Fend: Chr(0x2DC6)},
	{Fstart: Chr(0x2DC8), Fend: Chr(0x2DCE)}, {Fstart: Chr(0x2DD0), Fend: Chr(0x2DD6)}, {Fstart: Chr(0x2DD8), Fend: Chr(0x2DDE)}, {Fstart: Chr(0x2DE0), Fend: Chr(0x2E5D)},
	{Fstart: Chr(0x2E80), Fend: Chr(0x2E99)}, {Fstart: Chr(0x2E9B), Fend: Chr(0x2EF3)}, {Fstart: Chr(0x2F00), Fend: Chr(0x2FD5)}, {Fstart: Chr(0x2FF0), Fend: Chr(0x2FFB)},
	{Fstart: Chr(0x3001), Fend: Chr(0x303F)}, {Fstart: Chr(0x3041), Fend: Chr(0x3096)}, {Fstart: Chr(0x3099), Fend: Chr(0x30FF)}, {Fstart: Chr(0x3105), Fend: Chr(0x312F)},
	{Fstart: Chr(0x3131), Fend: Chr(0x318E)}, {Fstart: Chr(0x3190), Fend: Chr(0x31E3)}, {Fstart: Chr(0x31F0), Fend: Chr(0x321E)}, {Fstart: Chr(0x3220), Fend: Chr(0xA48C)},
	{Fstart: Chr(0xA490), Fend: Chr(0xA4C6)}, {Fstart: Chr(0xA4D0), Fend: Chr(0xA62B)}, {Fstart: Chr(0xA640), Fend: Chr(0xA6F7)}, {Fstart: Chr(0xA700), Fend: Chr(0xA7CA)},
	{Fstart: Chr(0xA7D5), Fend: Chr(0xA7D9)}, {Fstart: Chr(0xA7F2), Fend: Chr(0xA82C)}, {Fstart: Chr(0xA830), Fend: Chr(0xA839)}, {Fstart: Chr(0xA840), Fend: Chr(0xA877)},
	{Fstart: Chr(0xA880), Fend: Chr(0xA8C5)}, {Fstart: Chr(0xA8CE), Fend: Chr(0xA8D9)}, {Fstart: Chr(0xA8E0), Fend: Chr(0xA953)}, {Fstart: Chr(0xA95F), Fend: Chr(0xA97C)},
	{Fstart: Chr(0xA980), Fend: Chr(0xA9CD)}, {Fstart: Chr(0xA9CF), Fend: Chr(0xA9D9)}, {Fstart: Chr(0xA9DE), Fend: Chr(0xA9FE)}, {Fstart: Chr(0xAA00), Fend: Chr(0xAA36)},
	{Fstart: Chr(0xAA40), Fend: Chr(0xAA4D)}, {Fstart: Chr(0xAA50), Fend: Chr(0xAA59)}, {Fstart: Chr(0xAA5C), Fend: Chr(0xAAC2)}, {Fstart: Chr(0xAADB), Fend: Chr(0xAAF6)},
	{Fstart: Chr(0xAB01), Fend: Chr(0xAB06)}, {Fstart: Chr(0xAB09), Fend: Chr(0xAB0E)}, {Fstart: Chr(0xAB11), Fend: Chr(0xAB16)}, {Fstart: Chr(0xAB20), Fend: Chr(0xAB26)},
	{Fstart: Chr(0xAB28), Fend: Chr(0xAB2E)}, {Fstart: Chr(0xAB30), Fend: Chr(0xAB6B)}, {Fstart: Chr(0xAB70), Fend: Chr(0xABED)}, {Fstart: Chr(0xABF0), Fend: Chr(0xABF9)},
	{Fstart: Chr(0xAC00), Fend: Chr(0xD7A3)}, {Fstart: Chr(0xD7B0), Fend: Chr(0xD7C6)}, {Fstart: Chr(0xD7CB), Fend: Chr(0xD7FB)}, {Fstart: Chr(0xF900), Fend: Chr(0xFA6D)},
	{Fstart: Chr(0xFA70), Fend: Chr(0xFAD9)}, {Fstart: Chr(0xFB00), Fend: Chr(0xFB06)}, {Fstart: Chr(0xFB13), Fend: Chr(0xFB17)}, {Fstart: Chr(0xFB1D), Fend: Chr(0xFB36)},
	{Fstart: Chr(0xFB38), Fend: Chr(0xFB3C)}, {Fstart: Chr(0xFB46), Fend: Chr(0xFBC2)}, {Fstart: Chr(0xFBD3), Fend: Chr(0xFD8F)}, {Fstart: Chr(0xFD92), Fend: Chr(0xFDC7)},
	{Fstart: Chr(0xFDF0), Fend: Chr(0xFE19)}, {Fstart: Chr(0xFE20), Fend: Chr(0xFE52)}, {Fstart: Chr(0xFE54), Fend: Chr(0xFE66)}, {Fstart: Chr(0xFE68), Fend: Chr(0xFE6B)},
	{Fstart: Chr(0xFE70), Fend: Chr(0xFE74)}, {Fstart: Chr(0xFE76), Fend: Chr(0xFEFC)}, {Fstart: Chr(0xFF01), Fend: Chr(0xFFBE)}, {Fstart: Chr(0xFFC2), Fend: Chr(0xFFC7)},
	{Fstart: Chr(0xFFCA), Fend: Chr(0xFFCF)}, {Fstart: Chr(0xFFD2), Fend: Chr(0xFFD7)}, {Fstart: Chr(0xFFDA), Fend: Chr(0xFFDC)}, {Fstart: Chr(0xFFE0), Fend: Chr(0xFFE6)},
	{Fstart: Chr(0xFFE8), Fend: Chr(0xFFEE)},
} /* regc_locale.c:639:21 */

var graphCharTable = [89]Chr{
	Chr(0x38C), Chr(0x85E), Chr(0x98F), Chr(0x990), Chr(0x9B2), Chr(0x9C7), Chr(0x9C8), Chr(0x9D7), Chr(0x9DC),
	Chr(0x9DD), Chr(0xA0F), Chr(0xA10), Chr(0xA32), Chr(0xA33), Chr(0xA35), Chr(0xA36), Chr(0xA38), Chr(0xA39),
	Chr(0xA3C), Chr(0xA47), Chr(0xA48), Chr(0xA51), Chr(0xA5E), Chr(0xAB2), Chr(0xAB3), Chr(0xAD0), Chr(0xB0F),
	Chr(0xB10), Chr(0xB32), Chr(0xB33), Chr(0xB47), Chr(0xB48), Chr(0xB5C), Chr(0xB5D), Chr(0xB82), Chr(0xB83),
	Chr(0xB99), Chr(0xB9A), Chr(0xB9C), Chr(0xB9E), Chr(0xB9F), Chr(0xBA3), Chr(0xBA4), Chr(0xBD0), Chr(0xBD7),
	Chr(0xC55), Chr(0xC56), Chr(0xC5D), Chr(0xCD5), Chr(0xCD6), Chr(0xCDD), Chr(0xCDE), Chr(0xCF1), Chr(0xCF2),
	Chr(0xDBD), Chr(0xDCA), Chr(0xDD6), Chr(0xE81), Chr(0xE82), Chr(0xE84), Chr(0xEA5), Chr(0xEC6), Chr(0x10C7),
	Chr(0x10CD), Chr(0x1258), Chr(0x12C0), Chr(0x1772), Chr(0x1773), Chr(0x1940), Chr(0x1F59), Chr(0x1F5B), Chr(0x1F5D),
	Chr(0x2070), Chr(0x2071), Chr(0x2D27), Chr(0x2D2D), Chr(0x2D6F), Chr(0x2D70), Chr(0xA7D0), Chr(0xA7D1), Chr(0xA7D3),
	Chr(0xFB3E), Chr(0xFB40), Chr(0xFB41), Chr(0xFB43), Chr(0xFB44), Chr(0xFDCF), Chr(0xFFFC), Chr(0xFFFD),
} /* regc_locale.c:792:18 */

//	End of auto-generated Unicode character ranges declarations.

//
//  - element - map collating-element name to celt
//  ^ static celt element(struct vars *, const chr *, const chr *);
//
func element(tls *libc.TLS, v uintptr, startp uintptr, endp uintptr) Celt { /* regc_locale.c:831:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var cn uintptr
	var len Size_t
	// var ds Tcl_DString at bp, 216

	var np uintptr

	// Generic: one-chr names stand for themselves.

	len = Size_t((int64(endp) - int64(startp)) / 2)
	if len == uint64(1) {
		return Celt(*(*Chr)(unsafe.Pointer(startp)))
	}

	*(*int32)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fre + 16)) |= REG_ULOCALE

	// Search table.

	XTcl_DStringInit(tls, bp)
	np = XTcl_UniCharToUtfDString(tls, startp, int32(len), bp)
	for cn = uintptr(unsafe.Pointer(&cnames)); (*Cname)(unsafe.Pointer(cn)).Fname != uintptr(0); cn += 16 {
		if libc.Xstrlen(tls, (*Cname)(unsafe.Pointer(cn)).Fname) == len && libc.Xstrncmp(tls, (*Cname)(unsafe.Pointer(cn)).Fname, np, len) == 0 {
			break // NOTE BREAK OUT
		}
	}
	XTcl_DStringFree(tls, bp)
	if (*Cname)(unsafe.Pointer(cn)).Fname != uintptr(0) {
		return Celt(uint8((*Cname)(unsafe.Pointer(cn)).Fcode))
	}

	// Couldn't find it.

	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fnexttype = 'e'
	(*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Ferr = func() int32 {
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr
		}
		return REG_ECOLLATE
	}()
	return 0
}

//
//  - range - supply cvec for a range, including legality check
//  ^ static struct cvec *range(struct vars *, celt, celt, int);
//
func range1(tls *libc.TLS, v uintptr, a Celt, b Celt, cases int32) uintptr { /* regc_locale.c:881:20: */
	var nchrs int32
	var cv uintptr
	var c Celt
	var lc Celt
	var uc Celt
	var tc Celt

	if a != b && !(before(tls, a, b) != 0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ERANGE
		}()
		return uintptr(0)
	}

	if !(cases != 0) { // easy version
		cv = getcvec(tls, v, 0, 1)
		{
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return uintptr(0)
			}
		}

		addrange(tls, cv, a, b)
		return cv
	}

	// When case-independent, it's hard to decide when cvec ranges are usable,
	// so for now at least, we won't try. We allocate enough space for two
	// case variants plus a little extra for the two title case variants.

	nchrs = (b-a+1)*2 + 4

	cv = getcvec(tls, v, nchrs, 0)
	{
		if (*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr != 0 {
			return uintptr(0)
		}
	}

	for c = a; c <= b; c++ {
		addchr(tls, cv, c)
		lc = Celt(XTcl_UniCharToLower(tls, int32(Chr(c))))
		uc = Celt(XTcl_UniCharToUpper(tls, int32(Chr(c))))
		tc = Celt(XTcl_UniCharToTitle(tls, int32(Chr(c))))
		if c != lc {
			addchr(tls, cv, lc)
		}
		if c != uc {
			addchr(tls, cv, uc)
		}
		if c != tc && tc != uc {
			addchr(tls, cv, tc)
		}
	}

	return cv
}

//
//  - before - is celt x before celt y, for purposes of range legality?
//  ^ static int before(celt, celt);
//
func before(tls *libc.TLS, x Celt, y Celt) int32 { /* regc_locale.c:939:1: */
	if x < y {
		return 1
	}
	return 0
}

//
//  - eclass - supply cvec for an equivalence class
//  * Must include case counterparts on request.
//  ^ static struct cvec *eclass(struct vars *, celt, int);
//
func eclass(tls *libc.TLS, v uintptr, c Celt, cases int32) uintptr { /* regc_locale.c:953:20: */
	var cv uintptr

	// Crude fake equivalence class for testing.

	if (*struct {
		Fre          uintptr
		Fnow         uintptr
		Fstop        uintptr
		Fsavenow     uintptr
		Fsavestop    uintptr
		Ferr         int32
		Fcflags      int32
		Flasttype    int32
		Fnexttype    int32
		Fnextvalue   Chr
		F__ccgo_pad1 [2]byte
		Flexcon      int32
		Fnsubexp     int32
		F__ccgo_pad2 [4]byte
		Fsubs        uintptr
		Fnsubs       Size_t
		Fsub10       [10]uintptr
		Fnfa         uintptr
		Fcm          uintptr
		Fnlcolor     Color
		F__ccgo_pad3 [6]byte
		Fwordchrs    uintptr
		Ftree        uintptr
		Ftreechain   uintptr
		Ftreefree    uintptr
		Fntree       int32
		F__ccgo_pad4 [4]byte
		Fcv          uintptr
		Fcv2         uintptr
		Flacons      uintptr
		Fnlacons     int32
		F__ccgo_pad5 [4]byte
		Fspaceused   Size_t
	})(unsafe.Pointer(v)).Fcflags&REG_FAKE != 0 && c == 'x' {
		cv = getcvec(tls, v, 4, 0)
		addchr(tls, cv, int32(Chr('x')))
		addchr(tls, cv, int32(Chr('y')))
		if cases != 0 {
			addchr(tls, cv, int32(Chr('X')))
			addchr(tls, cv, int32(Chr('Y')))
		}
		return cv
	}

	// Otherwise, none.

	if cases != 0 {
		return allcases(tls, v, c)
	}
	cv = getcvec(tls, v, 1, 0)

	addchr(tls, cv, int32(Chr(c)))
	return cv
}

//
//  - cclass - supply cvec for a character class
//  * Must include case counterparts on request.
//  ^ static struct cvec *cclass(struct vars *, const chr *, const chr *, int);
//
func cclass(tls *libc.TLS, v uintptr, startp uintptr, endp uintptr, cases int32) uintptr { /* regc_locale.c:995:20: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var len Size_t
	var cv uintptr = uintptr(0)
	// var ds Tcl_DString at bp, 216

	var np uintptr
	var namePtr uintptr
	var i int32
	var index int32

	// Extract the class name

	len = Size_t((int64(endp) - int64(startp)) / 2)
	XTcl_DStringInit(tls, bp)
	np = XTcl_UniCharToUtfDString(tls, startp, int32(len), bp)

	// Map the name to the corresponding enumerated value.

	index = -1
	namePtr = uintptr(unsafe.Pointer(&classNames))
	i = 0
__1:
	if !(*(*uintptr)(unsafe.Pointer(namePtr)) != uintptr(0)) {
		goto __3
	}
	{
		if libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(namePtr))) == len && libc.Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(namePtr)), np, len) == 0 {
			index = i
			goto __3
		}

	}
	goto __2
__2:
	namePtr += 8
	i++
	goto __1
	goto __3
__3:
	;
	XTcl_DStringFree(tls, bp)
	if index == -1 {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ECTYPE
		}()
		return uintptr(0)
	}

	// Remap lower and upper to alpha if the match is case insensitive.

	if cases != 0 && (index == 7 || index == 11) {
		index = 0 /* CC_ALNUM */
	}

	// Now compute the character class contents.

	switch uint32(index) {
	case uint32(0) /* CC_ALNUM */ :
		cv = getcvec(tls, v, int32(uint64(unsafe.Sizeof(alphaCharTable))/uint64(unsafe.Sizeof(Chr(0)))), int32(uint64(unsafe.Sizeof(digitRangeTable))/uint64(unsafe.Sizeof(Crange{}))+uint64(unsafe.Sizeof(alphaRangeTable))/uint64(unsafe.Sizeof(Crange{}))))
		if cv != 0 {
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(alphaCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(alphaCharTable[i]))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(alphaRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(alphaRangeTable[i].Fstart),
					int32(alphaRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(digitRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(digitRangeTable[i].Fstart),
					int32(digitRangeTable[i].Fend))
			}
		}
		break
	case uint32(1) /* CC_ALPHA */ :
		cv = getcvec(tls, v, int32(uint64(unsafe.Sizeof(alphaCharTable))/uint64(unsafe.Sizeof(Chr(0)))), int32(uint64(unsafe.Sizeof(alphaRangeTable))/uint64(unsafe.Sizeof(Crange{}))))
		if cv != 0 {
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(alphaRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(alphaRangeTable[i].Fstart),
					int32(alphaRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(alphaCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(alphaCharTable[i]))
			}
		}
		break
	case uint32(2) /* CC_ASCII */ :
		cv = getcvec(tls, v, 0, 1)
		if cv != 0 {
			addrange(tls, cv, 0, 0x7F)
		}
		break
	case uint32(3) /* CC_BLANK */ :
		cv = getcvec(tls, v, 2, 0)
		addchr(tls, cv, '\t')
		addchr(tls, cv, ' ')
		break
	case uint32(4) /* CC_CNTRL */ :
		cv = getcvec(tls, v, int32(uint64(unsafe.Sizeof(controlCharTable))/uint64(unsafe.Sizeof(Chr(0)))), int32(uint64(unsafe.Sizeof(controlRangeTable))/uint64(unsafe.Sizeof(Crange{}))))
		if cv != 0 {
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(controlRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(controlRangeTable[i].Fstart),
					int32(controlRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(controlCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(controlCharTable[i]))
			}
		}
		break
	case uint32(5) /* CC_DIGIT */ :
		cv = getcvec(tls, v, 0, int32(uint64(unsafe.Sizeof(digitRangeTable))/uint64(unsafe.Sizeof(Crange{}))))
		if cv != 0 {
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(digitRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(digitRangeTable[i].Fstart),
					int32(digitRangeTable[i].Fend))
			}
		}
		break
	case uint32(9) /* CC_PUNCT */ :
		cv = getcvec(tls, v, int32(uint64(unsafe.Sizeof(punctCharTable))/uint64(unsafe.Sizeof(Chr(0)))), int32(uint64(unsafe.Sizeof(punctRangeTable))/uint64(unsafe.Sizeof(Crange{}))))
		if cv != 0 {
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(punctRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(punctRangeTable[i].Fstart),
					int32(punctRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(punctCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(punctCharTable[i]))
			}
		}
		break
	case uint32(12) /* CC_XDIGIT */ :
		// This is a 3 instead of (NUM_DIGIT_RANGE+2) because I've no idea how
		// to define the digits 'a' through 'f' in non-western locales. The
		// concept is quite possibly non portable, or only used in contextx
		// where the characters used would be the western ones anyway!
		// Whatever is actually the case, the number of ranges is fixed (until
		// someone comes up with a better arrangement!)

		cv = getcvec(tls, v, 0, 3)
		if cv != 0 {
			addrange(tls, cv, '0', '9')
			addrange(tls, cv, 'a', 'f')
			addrange(tls, cv, 'A', 'F')
		}
		break
	case uint32(10) /* CC_SPACE */ :
		cv = getcvec(tls, v, int32(uint64(unsafe.Sizeof(spaceCharTable))/uint64(unsafe.Sizeof(Chr(0)))), int32(uint64(unsafe.Sizeof(spaceRangeTable))/uint64(unsafe.Sizeof(Crange{}))))
		if cv != 0 {
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(spaceRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(spaceRangeTable[i].Fstart),
					int32(spaceRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(spaceCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(spaceCharTable[i]))
			}
		}
		break
	case uint32(7) /* CC_LOWER */ :
		cv = getcvec(tls, v, int32(uint64(unsafe.Sizeof(lowerCharTable))/uint64(unsafe.Sizeof(Chr(0)))), int32(uint64(unsafe.Sizeof(lowerRangeTable))/uint64(unsafe.Sizeof(Crange{}))))
		if cv != 0 {
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(lowerRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(lowerRangeTable[i].Fstart),
					int32(lowerRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(lowerCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(lowerCharTable[i]))
			}
		}
		break
	case uint32(11) /* CC_UPPER */ :
		cv = getcvec(tls, v, int32(uint64(unsafe.Sizeof(upperCharTable))/uint64(unsafe.Sizeof(Chr(0)))), int32(uint64(unsafe.Sizeof(upperRangeTable))/uint64(unsafe.Sizeof(Crange{}))))
		if cv != 0 {
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(upperRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(upperRangeTable[i].Fstart),
					int32(upperRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(upperCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(upperCharTable[i]))
			}
		}
		break
	case uint32(8) /* CC_PRINT */ :
		cv = getcvec(tls, v, int32(uint64(unsafe.Sizeof(spaceCharTable))/uint64(unsafe.Sizeof(Chr(0)))+uint64(unsafe.Sizeof(graphCharTable))/uint64(unsafe.Sizeof(Chr(0)))), int32(uint64(unsafe.Sizeof(spaceRangeTable))/uint64(unsafe.Sizeof(Crange{}))+uint64(unsafe.Sizeof(graphRangeTable))/uint64(unsafe.Sizeof(Crange{}))-uint64(1)))
		if cv != 0 {
			for i = 1; Size_t(i) < uint64(unsafe.Sizeof(spaceRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(spaceRangeTable[i].Fstart),
					int32(spaceRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(spaceCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(spaceCharTable[i]))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(graphRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(graphRangeTable[i].Fstart),
					int32(graphRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(graphCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(graphCharTable[i]))
			}
		}
		break
	case uint32(6) /* CC_GRAPH */ :
		cv = getcvec(tls, v, int32(uint64(unsafe.Sizeof(graphCharTable))/uint64(unsafe.Sizeof(Chr(0)))), int32(uint64(unsafe.Sizeof(graphRangeTable))/uint64(unsafe.Sizeof(Crange{}))))
		if cv != 0 {
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(graphRangeTable))/uint64(unsafe.Sizeof(Crange{})); i++ {
				addrange(tls, cv, int32(graphRangeTable[i].Fstart),
					int32(graphRangeTable[i].Fend))
			}
			for i = 0; Size_t(i) < uint64(unsafe.Sizeof(graphCharTable))/uint64(unsafe.Sizeof(Chr(0))); i++ {
				addchr(tls, cv, int32(graphCharTable[i]))
			}
		}
		break
	}
	if cv == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Fnexttype = 'e'
		(*struct {
			Fre          uintptr
			Fnow         uintptr
			Fstop        uintptr
			Fsavenow     uintptr
			Fsavestop    uintptr
			Ferr         int32
			Fcflags      int32
			Flasttype    int32
			Fnexttype    int32
			Fnextvalue   Chr
			F__ccgo_pad1 [2]byte
			Flexcon      int32
			Fnsubexp     int32
			F__ccgo_pad2 [4]byte
			Fsubs        uintptr
			Fnsubs       Size_t
			Fsub10       [10]uintptr
			Fnfa         uintptr
			Fcm          uintptr
			Fnlcolor     Color
			F__ccgo_pad3 [6]byte
			Fwordchrs    uintptr
			Ftree        uintptr
			Ftreechain   uintptr
			Ftreefree    uintptr
			Fntree       int32
			F__ccgo_pad4 [4]byte
			Fcv          uintptr
			Fcv2         uintptr
			Flacons      uintptr
			Fnlacons     int32
			F__ccgo_pad5 [4]byte
			Fspaceused   Size_t
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fnow         uintptr
				Fstop        uintptr
				Fsavenow     uintptr
				Fsavestop    uintptr
				Ferr         int32
				Fcflags      int32
				Flasttype    int32
				Fnexttype    int32
				Fnextvalue   Chr
				F__ccgo_pad1 [2]byte
				Flexcon      int32
				Fnsubexp     int32
				F__ccgo_pad2 [4]byte
				Fsubs        uintptr
				Fnsubs       Size_t
				Fsub10       [10]uintptr
				Fnfa         uintptr
				Fcm          uintptr
				Fnlcolor     Color
				F__ccgo_pad3 [6]byte
				Fwordchrs    uintptr
				Ftree        uintptr
				Ftreechain   uintptr
				Ftreefree    uintptr
				Fntree       int32
				F__ccgo_pad4 [4]byte
				Fcv          uintptr
				Fcv2         uintptr
				Flacons      uintptr
				Fnlacons     int32
				F__ccgo_pad5 [4]byte
				Fspaceused   Size_t
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fnow         uintptr
					Fstop        uintptr
					Fsavenow     uintptr
					Fsavestop    uintptr
					Ferr         int32
					Fcflags      int32
					Flasttype    int32
					Fnexttype    int32
					Fnextvalue   Chr
					F__ccgo_pad1 [2]byte
					Flexcon      int32
					Fnsubexp     int32
					F__ccgo_pad2 [4]byte
					Fsubs        uintptr
					Fnsubs       Size_t
					Fsub10       [10]uintptr
					Fnfa         uintptr
					Fcm          uintptr
					Fnlcolor     Color
					F__ccgo_pad3 [6]byte
					Fwordchrs    uintptr
					Ftree        uintptr
					Ftreechain   uintptr
					Ftreefree    uintptr
					Fntree       int32
					F__ccgo_pad4 [4]byte
					Fcv          uintptr
					Fcv2         uintptr
					Flacons      uintptr
					Fnlacons     int32
					F__ccgo_pad5 [4]byte
					Fspaceused   Size_t
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ESPACE
		}()
	}
	return cv
}

var classNames = [14]uintptr{
	ts + 1768, ts + 1774, ts + 1780, ts + 1786, ts + 1792, ts + 1798, ts + 1804,
	ts + 1810, ts + 1816, ts + 1822, ts + 1207, ts + 1828, ts + 1834, uintptr(0),
} /* regc_locale.c:1013:23 */

//
//  - allcases - supply cvec for all case counterparts of a chr (including itself)
//  * This is a shortcut, preferably an efficient one, for simple characters;
//  * messy cases are done via range().
//  ^ static struct cvec *allcases(struct vars *, pchr);
//
func allcases(tls *libc.TLS, v uintptr, pc Pchr) uintptr { /* regc_locale.c:1231:20: */
	var cv uintptr
	var c Chr = Chr(pc)
	var lc Chr
	var uc Chr
	var tc Chr

	lc = XTcl_UniCharToLower(tls, int32(c))
	uc = XTcl_UniCharToUpper(tls, int32(c))
	tc = XTcl_UniCharToTitle(tls, int32(c))

	if int32(tc) != int32(uc) {
		cv = getcvec(tls, v, 3, 0)
		addchr(tls, cv, int32(tc))
	} else {
		cv = getcvec(tls, v, 2, 0)
	}
	addchr(tls, cv, int32(lc))
	if int32(lc) != int32(uc) {
		addchr(tls, cv, int32(uc))
	}
	return cv
}

//
//  - cmp - chr-substring compare
//  * Backrefs need this.  It should preferably be efficient.
//  * Note that it does not need to report anything except equal/unequal.
//  * Note also that the length is exact, and the comparison should not
//  * stop at embedded NULs!
//  ^ static int cmp(const chr *, const chr *, size_t);
//
func cmp(tls *libc.TLS, x uintptr, y uintptr, len Size_t) int32 { /* regc_locale.c:1266:1: */
	return libc.Xmemcmp(tls, x, y, len*Size_t(unsafe.Sizeof(Chr(0))))
}

//
//  - casecmp - case-independent chr-substring compare
//  * REG_ICASE backrefs need this.  It should preferably be efficient.
//  * Note that it does not need to report anything except equal/unequal.
//  * Note also that the length is exact, and the comparison should not
//  * stop at embedded NULs!
//  ^ static int casecmp(const chr *, const chr *, size_t);
//
func casecmp(tls *libc.TLS, x uintptr, y uintptr, len Size_t) int32 { /* regc_locale.c:1282:1: */
__1:
	if !(len > uint64(0)) {
		goto __3
	}
	{
		if int32(*(*Chr)(unsafe.Pointer(x))) != int32(*(*Chr)(unsafe.Pointer(y))) && int32(XTcl_UniCharToLower(tls, int32(*(*Chr)(unsafe.Pointer(x))))) != int32(XTcl_UniCharToLower(tls, int32(*(*Chr)(unsafe.Pointer(y))))) {
			return 1
		}

	}
	goto __2
__2:
	len--
	x += 2
	y += 2
	goto __1
	goto __3
__3:
	;
	return 0
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Magic for allocating a variable workspace. This default version is
// stack-hungry.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Unknown-error explanation.

var unk = *(*[38]int8)(unsafe.Pointer(ts + 1841)) /* regerror.c:38:19 */

// Struct to map among codes, code names, and explanations.

type Rerr = struct {
	Fcode        int32
	F__ccgo_pad1 [4]byte
	Fname        uintptr
	Fexplain     uintptr
} /* regerror.c:44:14 */

// Struct to map among codes, code names, and explanations.

var rerrs = [21]Rerr{
	// The actual table is built from regex.h
	{Fname: ts + 1879, Fexplain: ts + 1888},
	{Fcode: REG_NOMATCH, Fname: ts + 1907, Fexplain: ts + 1919},
	{Fcode: REG_BADPAT, Fname: ts + 1935, Fexplain: ts + 1946},
	{Fcode: REG_ECOLLATE, Fname: ts + 1979, Fexplain: ts + 1992},
	{Fcode: REG_ECTYPE, Fname: ts + 2018, Fexplain: ts + 2029},
	{Fcode: REG_EESCAPE, Fname: ts + 2053, Fexplain: ts + 2065},
	{Fcode: REG_ESUBREG, Fname: ts + 2091, Fexplain: ts + 2103},
	{Fcode: REG_EBRACK, Fname: ts + 2132, Fexplain: ts + 2143},
	{Fcode: REG_EPAREN, Fname: ts + 2168, Fexplain: ts + 2179},
	{Fcode: REG_EBRACE, Fname: ts + 2207, Fexplain: ts + 2218},
	{Fcode: REG_BADBR, Fname: ts + 2241, Fexplain: ts + 2251},
	{Fcode: REG_ERANGE, Fname: ts + 2279, Fexplain: ts + 2290},
	{Fcode: REG_ESPACE, Fname: ts + 2314, Fexplain: ts + 2325},
	{Fcode: REG_BADRPT, Fname: ts + 2339, Fexplain: ts + 2350},
	{Fcode: REG_ASSERT, Fname: ts + 2377, Fexplain: ts + 2388},
	{Fcode: REG_INVARG, Fname: ts + 2422, Fexplain: ts + 2433},
	{Fcode: REG_MIXED, Fname: ts + 2468, Fexplain: ts + 2478},
	{Fcode: REG_BADOPT, Fname: ts + 2522, Fexplain: ts + 2533},
	{Fcode: REG_ETOOBIG, Fname: ts + 2557, Fexplain: ts + 2569},
	{Fcode: REG_ECOLORS, Fname: ts + 2603, Fexplain: ts + 2615},
	{Fcode: -1, Fname: ts + 2631, Fexplain: ts + 2632},
} /* regerror.c:48:3 */

//
//  - regerror - the interface to error numbers
//
// ARGSUSED
func XTclReError(tls *libc.TLS, code int32, errbuf uintptr, errbuf_size Size_t) Size_t { /* regerror.c:59:1: */
	bp := tls.Alloc(112)
	defer tls.Free(112)

	var r uintptr
	var msg uintptr
	// var convbuf [88]int8 at bp+24, 88
	// 50 = plenty for int
	var len Size_t
	var icode int32

	switch code {
	case REG_ATOI: // Convert name to number
		for r = uintptr(unsafe.Pointer(&rerrs)); (*Rerr)(unsafe.Pointer(r)).Fcode >= 0; r += 24 {
			if libc.Xstrcmp(tls, (*Rerr)(unsafe.Pointer(r)).Fname, errbuf) == 0 {
				break
			}
		}
		libc.Xsprintf(tls, bp+24, ts+909, libc.VaList(bp, (*Rerr)(unsafe.Pointer(r)).Fcode)) // -1 for unknown
		msg = bp + 24                                                                        /* &convbuf[0] */
		break
	case REG_ITOA: // Convert number to name
		icode = libc.Xatoi(tls, errbuf) // Not our problem if this fails
		for r = uintptr(unsafe.Pointer(&rerrs)); (*Rerr)(unsafe.Pointer(r)).Fcode >= 0; r += 24 {
			if (*Rerr)(unsafe.Pointer(r)).Fcode == icode {
				break
			}
		}
		if (*Rerr)(unsafe.Pointer(r)).Fcode >= 0 {
			msg = (*Rerr)(unsafe.Pointer(r)).Fname
		} else { // Unknown; tell him the number
			libc.Xsprintf(tls, bp+24, ts+2637, libc.VaList(bp+8, uint32(icode)))
			msg = bp + 24 /* &convbuf[0] */
		}
		break
	default: // A real, normal error code
		for r = uintptr(unsafe.Pointer(&rerrs)); (*Rerr)(unsafe.Pointer(r)).Fcode >= 0; r += 24 {
			if (*Rerr)(unsafe.Pointer(r)).Fcode == code {
				break
			}
		}
		if (*Rerr)(unsafe.Pointer(r)).Fcode >= 0 {
			msg = (*Rerr)(unsafe.Pointer(r)).Fexplain
		} else { // Unknown; say so
			libc.Xsprintf(tls, bp+24, uintptr(unsafe.Pointer(&unk)), libc.VaList(bp+16, code))
			msg = bp + 24 /* &convbuf[0] */
		}
		break
	}

	len = libc.Xstrlen(tls, msg) + uint64(1) // Space needed, including NUL
	if errbuf_size > uint64(0) {
		if errbuf_size > len {
			libc.Xstrcpy(tls, errbuf, msg)
		} else { // Truncate to fit
			libc.Xstrncpy(tls, errbuf, msg, errbuf_size-uint64(1))
			*(*int8)(unsafe.Pointer(errbuf + uintptr(errbuf_size-uint64(1)))) = int8(0)
		}
	}

	return len
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Magic for allocating a variable workspace. This default version is
// stack-hungry.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Lazy-DFA representation.

type Arcp = struct {
	Fss          uintptr
	Fco          Color
	F__ccgo_pad1 [6]byte
} /* regexec.c:37:1 */

// Magic for allocating a variable workspace. This default version is
// stack-hungry.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Lazy-DFA representation.

type Sset = struct {
	Fstates uintptr
	Fhash   uint32
	Fflags  int32
	Fins    struct {
		Fss          uintptr
		Fco          Color
		F__ccgo_pad1 [6]byte
	}
	Flastseen uintptr
	Fouts     uintptr
	Finchain  uintptr
} /* regexec.c:37:1 */

type Dfa = struct {
	Fnssets       int32
	Fnssused      int32
	Fnstates      int32
	Fncolors      int32
	Fwordsper     int32
	F__ccgo_pad1  [4]byte
	Fssets        uintptr
	Fstatesarea   uintptr
	Fwork         uintptr
	Foutsarea     uintptr
	Fincarea      uintptr
	Fcnfa         uintptr
	Fcm           uintptr
	Flastpost     uintptr
	Flastnopr     uintptr
	Fsearch       uintptr
	Fcptsmalloced int32
	F__ccgo_pad2  [4]byte
	Fmallocarea   uintptr
} /* regexec.c:59:1 */

// Setup for non-malloc allocation for small cases.

type Smalldfa = struct {
	Fdfa struct {
		Fnssets       int32
		Fnssused      int32
		Fnstates      int32
		Fncolors      int32
		Fwordsper     int32
		F__ccgo_pad1  [4]byte
		Fssets        uintptr
		Fstatesarea   uintptr
		Fwork         uintptr
		Foutsarea     uintptr
		Fincarea      uintptr
		Fcnfa         uintptr
		Fcm           uintptr
		Flastpost     uintptr
		Flastnopr     uintptr
		Fsearch       uintptr
		Fcptsmalloced int32
		F__ccgo_pad2  [4]byte
		Fmallocarea   uintptr
	}
	Fssets [40]struct {
		Fstates uintptr
		Fhash   uint32
		Fflags  int32
		Fins    struct {
			Fss          uintptr
			Fco          Color
			F__ccgo_pad1 [6]byte
		}
		Flastseen uintptr
		Fouts     uintptr
		Finchain  uintptr
	}
	Fstatesarea  [41]uint32
	F__ccgo_pad1 [4]byte
	Foutsarea    [600]uintptr
	Fincarea     [600]struct {
		Fss          uintptr
		Fco          Color
		F__ccgo_pad1 [6]byte
	}
} /* regexec.c:87:1 */

// automatically gathered by fwd; do not hand-edit
// =====^!^===== end forwards =====^!^=====

//
//  - exec - match regular expression
//  ^ int exec(regex_t *, const chr *, size_t, rm_detail_t *,
//  ^					size_t, regmatch_t [], int);
//
func XTclReExec(tls *libc.TLS, re uintptr, string uintptr, len Size_t, details uintptr, nmatch Size_t, pmatch uintptr, flags int32) int32 { /* regexec.c:164:1: */
	bp := tls.Alloc(480)
	defer tls.Free(480)
	var v uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&varsKey1)), int32(unsafe.Sizeof(struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	}{})))
	var st int32
	var backref int32
	var n Size_t
	var i Size_t
	// var mat [20]Regmatch_t at bp, 160

	// var subdfas [40]uintptr at bp+160, 320

	// Sanity checks.

	if re == uintptr(0) || string == uintptr(0) || (*Regex_t)(unsafe.Pointer(re)).Fre_magic != REMAGIC {

		return REG_INVARG
	}
	if uint64((*Regex_t)(unsafe.Pointer(re)).Fre_csize) != uint64(unsafe.Sizeof(Chr(0))) {

		return REG_MIXED
	}

	// Setup.

	(*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fre = re
	(*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg = (*Regex_t)(unsafe.Pointer(re)).Fre_guts
	if (*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Fcflags&REG_EXPECT != 0 && details == uintptr(0) {

		return REG_INVARG
	}
	if (*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Finfo&REG_UIMPOSSIBLE != 0 {

		return REG_NOMATCH
	}
	if (*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Finfo&REG_UBACKREF != 0 {
		backref = 1
	} else {
		backref = 0
	}
	(*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Feflags = flags
	if (*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Fcflags&REG_NOSUB != 0 {
		nmatch = uint64(0) // override client
	}
	(*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fnmatch = nmatch
	if backref != 0 {
		// Need work area.

		if (*Guts)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fg)).Fnsub+uint64(1) <= uint64(LOCALMAT) {
			(*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fpmatch = bp /* &mat[0] */
		} else {
			(*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fpmatch = XTclpAlloc(tls, uint32(((*Guts)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fg)).Fnsub+uint64(1))*Size_t(unsafe.Sizeof(Regmatch_t{}))))
		}
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fpmatch == uintptr(0) {

			return REG_ESPACE
		}
		(*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fnmatch = (*Guts)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fg)).Fnsub + uint64(1)
	} else {
		(*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fpmatch = pmatch
	}
	(*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fdetails = details
	(*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart = string
	(*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop = string + uintptr(len)*2
	(*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Ferr = 0

	n = Size_t((*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Fntree)
	if n <= uint64(LOCALDFAS) {
		(*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fsubdfas = bp + 160 /* &subdfas[0] */
	} else {
		(*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fsubdfas = XTclpAlloc(tls, uint32(n*Size_t(unsafe.Sizeof(uintptr(0)))))
	}
	if (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fsubdfas == uintptr(0) {
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fpmatch != pmatch && (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fpmatch != bp {
			XTclpFree(tls, (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fpmatch)
		}

		return REG_ESPACE
	}
	for i = uint64(0); i < n; i++ {
		*(*uintptr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fsubdfas + uintptr(i)*8)) = uintptr(0)
	}

	// Do it.

	if backref != 0 {
		st = complicatedFind(tls, v, (*Guts)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fg)).Ftree+48, (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fg+96)
	} else {
		st = simpleFind(tls, v, (*Guts)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fg)).Ftree+48, (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fg+96)
	}

	// Copy (portion of) match vector over if necessary.

	if st == REG_OKAY && (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch != pmatch && nmatch > uint64(0) {
		zapallsubs(tls, pmatch, nmatch)
		if nmatch < (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fnmatch {
			n = nmatch
		} else {
			n = (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fnmatch
		}
		libc.Xmemcpy(tls, pmatch, (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fpmatch, n*Size_t(unsafe.Sizeof(Regmatch_t{})))
	}

	// Clean up.

	if (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch != pmatch && (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch != bp {
		XTclpFree(tls, (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fpmatch)
	}
	n = Size_t((*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Fntree)
	for i = uint64(0); i < n; i++ {
		if *(*uintptr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fsubdfas + uintptr(i)*8)) != uintptr(0) {
			freeDFA(tls, *(*uintptr)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fsubdfas + uintptr(i)*8)))
		}
	}
	if (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fsubdfas != bp+160 {
		XTclpFree(tls, (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fsubdfas)
	}

	return st
}

var varsKey1 Tcl_ThreadDataKey /* regexec.c:173:5: */

//
//  - getsubdfa - create or re-fetch the DFA for a subre node
//  * We only need to create the DFA once per overall regex execution.
//  * The DFA will be freed by the cleanup step in exec().
//
func getsubdfa(tls *libc.TLS, v uintptr, t uintptr) uintptr { /* regexec.c:297:19: */
	if *(*uintptr)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fsubdfas + uintptr((*Subre)(unsafe.Pointer(t)).Fid)*8)) == uintptr(0) {
		*(*uintptr)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fsubdfas + uintptr((*Subre)(unsafe.Pointer(t)).Fid)*8)) = newDFA(tls, v, t+48, (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fg+96, uintptr(0))
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return uintptr(0)
		}
	}
	return *(*uintptr)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fsubdfas + uintptr((*Subre)(unsafe.Pointer(t)).Fid)*8))
}

//
//  - simpleFind - find a match for the main NFA (no-complications case)
//  ^ static int simpleFind(struct vars *, struct cnfa *, struct colormap *);
//
func simpleFind(tls *libc.TLS, v uintptr, cnfa uintptr, cm uintptr) int32 { /* regexec.c:314:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var s uintptr
	var d uintptr
	var begin uintptr
	var end uintptr = uintptr(0)
	// var cold uintptr at bp, 8

	var open uintptr
	var close uintptr // Open and close of range of possible
	// starts
	// var hitend int32 at bp+8, 4

	var shorter int32
	if int32((*Subre)(unsafe.Pointer((*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Ftree)).Fflags)&SHORTER != 0 {
		shorter = 1
	} else {
		shorter = 0
	}

	// First, a shot with the search RE.

	s = newDFA(tls, v, (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg+32, cm, v+80)

	{
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
	}

	{
	}

	*(*uintptr)(unsafe.Pointer(bp /* cold */)) = uintptr(0)
	close = shortest(tls, v, s, (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart, (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart, (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop, bp, uintptr(0))
	freeDFA(tls, s)
	{
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
	}

	if (*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Fcflags&REG_EXPECT != 0 {

		if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
			(*Rm_detail_t)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fdetails)).Frm_extend.Frm_so = Regoff_t((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstart)) / 2)
		} else {
			(*Rm_detail_t)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fdetails)).Frm_extend.Frm_so = Regoff_t((int64((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstop) - int64((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstart)) / 2)
		}
		(*Rm_detail_t)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fdetails)).Frm_extend.Frm_eo = Regoff_t((int64((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fstop) - int64((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fstart)) / 2) // unknown
	}
	if close == uintptr(0) { // not found
		return REG_NOMATCH
	}
	if (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fnmatch == uint64(0) { // found, don't need exact location
		return REG_OKAY
	}

	// Find starting point and match.

	open = *(*uintptr)(unsafe.Pointer(bp /* cold */))
	*(*uintptr)(unsafe.Pointer(bp /* cold */)) = uintptr(0)
	{
	}

	d = newDFA(tls, v, cnfa, cm, v+80)

	{
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
	}

	for begin = open; begin <= close; begin += 2 {
		{
		}

		if shorter != 0 {
			end = shortest(tls, v, d, begin, begin, (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstop, uintptr(0), bp+8)
		} else {
			end = longest(tls, v, d, begin, (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstop, bp+8)
		}
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			freeDFA(tls, d)
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
		if *(*int32)(unsafe.Pointer(bp + 8)) != 0 && *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
			*(*uintptr)(unsafe.Pointer(bp /* cold */)) = begin
		}
		if end != uintptr(0) {
			break // NOTE BREAK OUT
		}
	}
	// search RE succeeded so loop should
	freeDFA(tls, d)

	// And pin down details.

	(*Regmatch_t)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch)).Frm_so = Regoff_t((int64(begin) - int64((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart)) / 2)
	(*Regmatch_t)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch)).Frm_eo = Regoff_t((int64(end) - int64((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart)) / 2)
	if (*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Fcflags&REG_EXPECT != 0 {
		if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
			(*Rm_detail_t)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fdetails)).Frm_extend.Frm_so = Regoff_t((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstart)) / 2)
		} else {
			(*Rm_detail_t)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fdetails)).Frm_extend.Frm_so = Regoff_t((int64((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstop) - int64((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstart)) / 2)
		}
		(*Rm_detail_t)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fdetails)).Frm_extend.Frm_eo = Regoff_t((int64((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fstop) - int64((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fstart)) / 2) // unknown
	}
	if (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fnmatch == uint64(1) { // no need for submatches
		return REG_OKAY
	}

	// Find submatches.

	zapallsubs(tls, (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch, (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fnmatch)
	return cdissect(tls, v, (*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Ftree, begin, end)
}

//
//  - complicatedFind - find a match for the main NFA (with complications)
//  ^ static int complicatedFind(struct vars *, struct cnfa *, struct colormap *);
//
func complicatedFind(tls *libc.TLS, v uintptr, cnfa uintptr, cm uintptr) int32 { /* regexec.c:419:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var s uintptr
	var d uintptr
	*(*uintptr)(unsafe.Pointer(bp /* cold */)) = uintptr(0) // silence gcc 4 warning
	var ret int32

	s = newDFA(tls, v, (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg+32, cm, v+80)
	{
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
	}

	d = newDFA(tls, v, cnfa, cm, v+17008)
	if (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Ferr != 0 {

		freeDFA(tls, s)
		return (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr
	}

	ret = complicatedFindLoop(tls, v, d, s, bp)

	freeDFA(tls, d)
	freeDFA(tls, s)
	{
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
	}

	if (*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Fcflags&REG_EXPECT != 0 {

		if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
			(*Rm_detail_t)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fdetails)).Frm_extend.Frm_so = Regoff_t((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstart)) / 2)
		} else {
			(*Rm_detail_t)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fdetails)).Frm_extend.Frm_so = Regoff_t((int64((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstop) - int64((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstart)) / 2)
		}
		(*Rm_detail_t)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fdetails)).Frm_extend.Frm_eo = Regoff_t((int64((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fstop) - int64((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fstart)) / 2) // unknown
	}
	return ret
}

//
//  - complicatedFindLoop - the heart of complicatedFind
//  ^ static int complicatedFindLoop(struct vars *,
//  ^	struct dfa *, struct dfa *, chr **);
//
func complicatedFindLoop(tls *libc.TLS, v uintptr, d uintptr, s uintptr, coldp uintptr) int32 { /* regexec.c:460:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var begin uintptr
	var end uintptr
	// var cold uintptr at bp, 8

	var open uintptr
	var close uintptr // Open and close of range of possible
	// starts
	var estart uintptr
	var estop uintptr
	var er int32
	// var hitend int32 at bp+8, 4

	var shorter int32 = int32((*Subre)(unsafe.Pointer((*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Ftree)).Fflags) & SHORTER

	*(*uintptr)(unsafe.Pointer(bp /* cold */)) = uintptr(0)
	close = (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart
	for ok := true; ok; ok = close < (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop {
		{
		}

		close = shortest(tls, v, s, close, close, (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fstop, bp, uintptr(0))
		if close == uintptr(0) {
			break // NOTE BREAK
		}

		open = *(*uintptr)(unsafe.Pointer(bp /* cold */))
		*(*uintptr)(unsafe.Pointer(bp /* cold */)) = uintptr(0)
		{
		}

		for begin = open; begin <= close; begin += 2 {
			{
			}

			estart = begin
			estop = (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fstop
			for {
				if shorter != 0 {
					end = shortest(tls, v, d, begin, estart, estop, uintptr(0), bp+8)
				} else {
					end = longest(tls, v, d, begin, estop, bp+8)
				}
				if *(*int32)(unsafe.Pointer(bp + 8)) != 0 && *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
					*(*uintptr)(unsafe.Pointer(bp /* cold */)) = begin
				}
				if end == uintptr(0) {
					break // NOTE BREAK OUT
				}

				{
				}

				zapallsubs(tls, (*struct {
					Fre          uintptr
					Fg           uintptr
					Feflags      int32
					F__ccgo_pad1 [4]byte
					Fnmatch      Size_t
					Fpmatch      uintptr
					Fdetails     uintptr
					Fstart       uintptr
					Fstop        uintptr
					Ferr         int32
					F__ccgo_pad2 [4]byte
					Fsubdfas     uintptr
					Fdfa1        Smalldfa
					Fdfa2        Smalldfa
				})(unsafe.Pointer(v)).Fpmatch, (*struct {
					Fre          uintptr
					Fg           uintptr
					Feflags      int32
					F__ccgo_pad1 [4]byte
					Fnmatch      Size_t
					Fpmatch      uintptr
					Fdetails     uintptr
					Fstart       uintptr
					Fstop        uintptr
					Ferr         int32
					F__ccgo_pad2 [4]byte
					Fsubdfas     uintptr
					Fdfa1        Smalldfa
					Fdfa2        Smalldfa
				})(unsafe.Pointer(v)).Fnmatch)
				er = cdissect(tls, v, (*Guts)(unsafe.Pointer((*struct {
					Fre          uintptr
					Fg           uintptr
					Feflags      int32
					F__ccgo_pad1 [4]byte
					Fnmatch      Size_t
					Fpmatch      uintptr
					Fdetails     uintptr
					Fstart       uintptr
					Fstop        uintptr
					Ferr         int32
					F__ccgo_pad2 [4]byte
					Fsubdfas     uintptr
					Fdfa1        Smalldfa
					Fdfa2        Smalldfa
				})(unsafe.Pointer(v)).Fg)).Ftree, begin, end)
				if er == REG_OKAY {
					if (*struct {
						Fre          uintptr
						Fg           uintptr
						Feflags      int32
						F__ccgo_pad1 [4]byte
						Fnmatch      Size_t
						Fpmatch      uintptr
						Fdetails     uintptr
						Fstart       uintptr
						Fstop        uintptr
						Ferr         int32
						F__ccgo_pad2 [4]byte
						Fsubdfas     uintptr
						Fdfa1        Smalldfa
						Fdfa2        Smalldfa
					})(unsafe.Pointer(v)).Fnmatch > uint64(0) {
						(*Regmatch_t)(unsafe.Pointer((*struct {
							Fre          uintptr
							Fg           uintptr
							Feflags      int32
							F__ccgo_pad1 [4]byte
							Fnmatch      Size_t
							Fpmatch      uintptr
							Fdetails     uintptr
							Fstart       uintptr
							Fstop        uintptr
							Ferr         int32
							F__ccgo_pad2 [4]byte
							Fsubdfas     uintptr
							Fdfa1        Smalldfa
							Fdfa2        Smalldfa
						})(unsafe.Pointer(v)).Fpmatch)).Frm_so = Regoff_t((int64(begin) - int64((*struct {
							Fre          uintptr
							Fg           uintptr
							Feflags      int32
							F__ccgo_pad1 [4]byte
							Fnmatch      Size_t
							Fpmatch      uintptr
							Fdetails     uintptr
							Fstart       uintptr
							Fstop        uintptr
							Ferr         int32
							F__ccgo_pad2 [4]byte
							Fsubdfas     uintptr
							Fdfa1        Smalldfa
							Fdfa2        Smalldfa
						})(unsafe.Pointer(v)).Fstart)) / 2)
						(*Regmatch_t)(unsafe.Pointer((*struct {
							Fre          uintptr
							Fg           uintptr
							Feflags      int32
							F__ccgo_pad1 [4]byte
							Fnmatch      Size_t
							Fpmatch      uintptr
							Fdetails     uintptr
							Fstart       uintptr
							Fstop        uintptr
							Ferr         int32
							F__ccgo_pad2 [4]byte
							Fsubdfas     uintptr
							Fdfa1        Smalldfa
							Fdfa2        Smalldfa
						})(unsafe.Pointer(v)).Fpmatch)).Frm_eo = Regoff_t((int64(end) - int64((*struct {
							Fre          uintptr
							Fg           uintptr
							Feflags      int32
							F__ccgo_pad1 [4]byte
							Fnmatch      Size_t
							Fpmatch      uintptr
							Fdetails     uintptr
							Fstart       uintptr
							Fstop        uintptr
							Ferr         int32
							F__ccgo_pad2 [4]byte
							Fsubdfas     uintptr
							Fdfa1        Smalldfa
							Fdfa2        Smalldfa
						})(unsafe.Pointer(v)).Fstart)) / 2)
					}
					*(*uintptr)(unsafe.Pointer(coldp)) = *(*uintptr)(unsafe.Pointer(bp /* cold */))
					return REG_OKAY
				}
				if er != REG_NOMATCH {
					(*struct {
						Fre          uintptr
						Fg           uintptr
						Feflags      int32
						F__ccgo_pad1 [4]byte
						Fnmatch      Size_t
						Fpmatch      uintptr
						Fdetails     uintptr
						Fstart       uintptr
						Fstop        uintptr
						Ferr         int32
						F__ccgo_pad2 [4]byte
						Fsubdfas     uintptr
						Fdfa1        Smalldfa
						Fdfa2        Smalldfa
					})(unsafe.Pointer(v)).Ferr = func() int32 {
						if (*struct {
							Fre          uintptr
							Fg           uintptr
							Feflags      int32
							F__ccgo_pad1 [4]byte
							Fnmatch      Size_t
							Fpmatch      uintptr
							Fdetails     uintptr
							Fstart       uintptr
							Fstop        uintptr
							Ferr         int32
							F__ccgo_pad2 [4]byte
							Fsubdfas     uintptr
							Fdfa1        Smalldfa
							Fdfa2        Smalldfa
						})(unsafe.Pointer(v)).Ferr != 0 {
							return (*struct {
								Fre          uintptr
								Fg           uintptr
								Feflags      int32
								F__ccgo_pad1 [4]byte
								Fnmatch      Size_t
								Fpmatch      uintptr
								Fdetails     uintptr
								Fstart       uintptr
								Fstop        uintptr
								Ferr         int32
								F__ccgo_pad2 [4]byte
								Fsubdfas     uintptr
								Fdfa1        Smalldfa
								Fdfa2        Smalldfa
							})(unsafe.Pointer(v)).Ferr
						}
						return er
					}()
					*(*uintptr)(unsafe.Pointer(coldp)) = *(*uintptr)(unsafe.Pointer(bp /* cold */))
					return er
				}
				if func() int32 {
					if shorter != 0 {
						return libc.Bool32(end == estop)
					}
					return libc.Bool32(end == begin)
				}() != 0 {
					break
				}

				// Go around and try again

				if shorter != 0 {
					estart = end + uintptr(1)*2
				} else {
					estop = end - uintptr(1)*2
				}
			}
		}
	}

	*(*uintptr)(unsafe.Pointer(coldp)) = *(*uintptr)(unsafe.Pointer(bp /* cold */))
	return REG_NOMATCH
}

//
//  - zapallsubs - initialize all subexpression matches to "no match"
//  ^ static void zapallsubs(regmatch_t *, size_t);
//
func zapallsubs(tls *libc.TLS, p uintptr, n Size_t) { /* regexec.c:546:1: */
	var i Size_t

	for i = n - uint64(1); i > uint64(0); i-- {
		(*Regmatch_t)(unsafe.Pointer(p + uintptr(i)*8)).Frm_so = -1
		(*Regmatch_t)(unsafe.Pointer(p + uintptr(i)*8)).Frm_eo = -1
	}
}

//
//  - zaptreesubs - initialize subexpressions within subtree to "no match"
//  ^ static void zaptreesubs(struct vars *, struct subre *);
//
func zaptreesubs(tls *libc.TLS, v uintptr, t uintptr) { /* regexec.c:563:1: */
	if int32((*Subre)(unsafe.Pointer(t)).Fop) == '(' {
		var n int32 = (*Subre)(unsafe.Pointer(t)).Fsubno

		if Size_t(n) < (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fnmatch {
			(*Regmatch_t)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fpmatch + uintptr(n)*8)).Frm_so = -1
			(*Regmatch_t)(unsafe.Pointer((*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Fpmatch + uintptr(n)*8)).Frm_eo = -1
		}
	}

	if (*Subre)(unsafe.Pointer(t)).Fleft != uintptr(0) {
		zaptreesubs(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
	}
	if (*Subre)(unsafe.Pointer(t)).Fright != uintptr(0) {
		zaptreesubs(tls, v, (*Subre)(unsafe.Pointer(t)).Fright)
	}
}

//
//  - subset - set subexpression match data for a successful subre
//  ^ static void subset(struct vars *, struct subre *, chr *, chr *);
//
func subset(tls *libc.TLS, v uintptr, sub uintptr, begin uintptr, end uintptr) { /* regexec.c:589:1: */
	var n int32 = (*Subre)(unsafe.Pointer(sub)).Fsubno

	if Size_t(n) >= (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fnmatch {
		return
	}

	{
	}

	(*Regmatch_t)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch + uintptr(n)*8)).Frm_so = Regoff_t((int64(begin) - int64((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart)) / 2)
	(*Regmatch_t)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch + uintptr(n)*8)).Frm_eo = Regoff_t((int64(end) - int64((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart)) / 2)
}

//
//  - cdissect - check backrefs and determine subexpression matches
//  * cdissect recursively processes a subre tree to check matching of backrefs
//  * and/or identify submatch boundaries for capture nodes.  The proposed match
//  * runs from "begin" to "end" (not including "end"), and we are basically
//  * "dissecting" it to see where the submatches are.
//  * Before calling any level of cdissect, the caller must have run the node's
//  * DFA and found that the proposed substring satisfies the DFA.  (We make
//  * the caller do that because in concatenation and iteration nodes, it's
//  * much faster to check all the substrings against the child DFAs before we
//  * recurse.)  Also, caller must have cleared subexpression match data via
//  * zaptreesubs (or zapallsubs at the top level).
//  ^ static int cdissect(struct vars *, struct subre *, chr *, chr *);
//
func cdissect(tls *libc.TLS, v uintptr, t uintptr, begin uintptr, end uintptr) int32 { /* regexec.c:622:1: */
	var er int32

	{
	}

	switch int32((*Subre)(unsafe.Pointer(t)).Fop) {
	case '=': // terminal node

		er = REG_OKAY // no action, parent did the work
		break
	case 'b': // back reference

		er = cbrdissect(tls, v, t, begin, end)
		break
	case '.': // concatenation

		if int32((*Subre)(unsafe.Pointer((*Subre)(unsafe.Pointer(t)).Fleft)).Fflags)&SHORTER != 0 { // reverse scan
			er = crevcondissect(tls, v, t, begin, end)
		} else {
			er = ccondissect(tls, v, t, begin, end)
		}
		break
	case '|': // alternation

		er = caltdissect(tls, v, t, begin, end)
		break
	case '*': // iteration

		if int32((*Subre)(unsafe.Pointer((*Subre)(unsafe.Pointer(t)).Fleft)).Fflags)&SHORTER != 0 { // reverse scan
			er = creviterdissect(tls, v, t, begin, end)
		} else {
			er = citerdissect(tls, v, t, begin, end)
		}
		break
	case '(': // capturing

		er = cdissect(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft, begin, end)
		if er == REG_OKAY {
			subset(tls, v, t, begin, end)
		}
		break
	default:
		er = REG_ASSERT
		break
	}

	// We should never have a match failure unless backrefs lurk below;
	// otherwise, either caller failed to check the DFA, or there's some
	// inconsistency between the DFA and the node's innards.

	return er
}

//
//  - ccondissect - dissect match for concatenation node
//  ^ static int ccondissect(struct vars *, struct subre *, chr *, chr *);
//
func ccondissect(tls *libc.TLS, v uintptr, t uintptr, begin uintptr, end uintptr) int32 { /* regexec.c:688:1: */
	var d uintptr
	var d2 uintptr
	var mid uintptr

	d = getsubdfa(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
	{
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
	}

	d2 = getsubdfa(tls, v, (*Subre)(unsafe.Pointer(t)).Fright)
	{
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
	}

	{
	}

	// Pick a tentative midpoint.
	mid = longest(tls, v, d, begin, end, uintptr(0))
	if mid == uintptr(0) {
		return REG_NOMATCH
	}
	{
	}

	// Iterate until satisfaction or failure.

	for {
		// Try this midpoint on for size.

		if longest(tls, v, d2, mid, end, uintptr(0)) == end {
			var er int32 = cdissect(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft, begin, mid)

			if er == REG_OKAY {
				er = cdissect(tls, v, (*Subre)(unsafe.Pointer(t)).Fright, mid, end)
				if er == REG_OKAY {
					/*
					 * Satisfaction.
					 */

					{
					}

					return REG_OKAY
				}
			}
			if er != REG_NOMATCH {
				return er
			}
		}

		// That midpoint didn't work, find a new one.

		if mid == begin {
			/*
			 * All possibilities exhausted.
			 */

			{
			}

			return REG_NOMATCH
		}
		mid = longest(tls, v, d, begin, mid-uintptr(1)*2, uintptr(0))
		if mid == uintptr(0) {
			/*
			 * Failed to find a new one.
			 */

			{
			}

			return REG_NOMATCH
		}
		{
		}

		zaptreesubs(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
		zaptreesubs(tls, v, (*Subre)(unsafe.Pointer(t)).Fright)
	}
	return int32(0)
}

//
//  - crevcondissect - dissect match for concatenation node, shortest-first
//  ^ static int crevcondissect(struct vars *, struct subre *, chr *, chr *);
//
func crevcondissect(tls *libc.TLS, v uintptr, t uintptr, begin uintptr, end uintptr) int32 { /* regexec.c:778:1: */
	var d uintptr
	var d2 uintptr
	var mid uintptr

	d = getsubdfa(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
	{
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
	}

	d2 = getsubdfa(tls, v, (*Subre)(unsafe.Pointer(t)).Fright)
	{
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
	}

	{
	}

	// Pick a tentative midpoint.

	mid = shortest(tls, v, d, begin, begin, end, uintptr(0), uintptr(0))
	if mid == uintptr(0) {
		return REG_NOMATCH
	}
	{
	}

	// Iterate until satisfaction or failure.

	for {
		// Try this midpoint on for size.

		if longest(tls, v, d2, mid, end, uintptr(0)) == end {
			var er int32 = cdissect(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft, begin, mid)

			if er == REG_OKAY {
				er = cdissect(tls, v, (*Subre)(unsafe.Pointer(t)).Fright, mid, end)
				if er == REG_OKAY {
					/*
					 * Satisfaction.
					 */

					{
					}

					return REG_OKAY
				}
			}
			if er != REG_NOMATCH {
				return er
			}
		}

		// That midpoint didn't work, find a new one.

		if mid == end {
			/*
			 * All possibilities exhausted.
			 */

			{
			}

			return REG_NOMATCH
		}
		mid = shortest(tls, v, d, begin, mid+uintptr(1)*2, end, uintptr(0), uintptr(0))
		if mid == uintptr(0) {
			/*
			 * Failed to find a new one.
			 */

			{
			}

			return REG_NOMATCH
		}
		{
		}

		zaptreesubs(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
		zaptreesubs(tls, v, (*Subre)(unsafe.Pointer(t)).Fright)
	}
	return int32(0)
}

//
//  - cbrdissect - dissect match for backref node
//  ^ static int cbrdissect(struct vars *, struct subre *, chr *, chr *);
//
func cbrdissect(tls *libc.TLS, v uintptr, t uintptr, begin uintptr, end uintptr) int32 { /* regexec.c:869:1: */
	var n int32 = (*Subre)(unsafe.Pointer(t)).Fsubno
	var min int32 = int32((*Subre)(unsafe.Pointer(t)).Fmin)
	var max int32 = int32((*Subre)(unsafe.Pointer(t)).Fmax)
	var numreps Size_t
	var tlen Size_t
	var brlen Size_t
	var brstring uintptr
	var p uintptr

	{
	}

	// get the backreferenced string
	if (*Regmatch_t)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch+uintptr(n)*8)).Frm_so == -1 {
		return REG_NOMATCH
	}
	brstring = (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart + uintptr((*Regmatch_t)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch+uintptr(n)*8)).Frm_so)*2
	brlen = Size_t((*Regmatch_t)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch+uintptr(n)*8)).Frm_eo - (*Regmatch_t)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fpmatch+uintptr(n)*8)).Frm_so)

	// special cases for zero-length strings
	if brlen == uint64(0) {
		// matches only if target is zero length, but any number of
		// repetitions can be considered to be present
		if begin == end && min <= max {
			{
			}

			return REG_OKAY
		}
		return REG_NOMATCH
	}
	if begin == end {
		// matches only if zero repetitions are okay
		if min == 0 {
			{
			}

			return REG_OKAY
		}
		return REG_NOMATCH
	}

	// check target length to see if it could possibly be an allowed number of
	// repetitions of brstring

	tlen = Size_t((int64(end) - int64(begin)) / 2)
	if tlen%brlen != uint64(0) {
		return REG_NOMATCH
	}
	numreps = tlen / brlen
	if numreps < Size_t(min) || numreps > Size_t(max) && max != X_POSIX2_RE_DUP_MAX+1 {
		return REG_NOMATCH
	}

	// okay, compare the actual string contents
	p = begin
	for libc.PostDecUint64(&numreps, 1) > uint64(0) {
		if (*struct {
			f func(*libc.TLS, uintptr, uintptr, Size_t) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Guts)(unsafe.Pointer((*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fg)).Fcompare})).f(tls, brstring, p, brlen) != 0 {
			return REG_NOMATCH
		}
		p += 2 * uintptr(brlen)
	}

	{
	}

	return REG_OKAY
}

//
//  - caltdissect - dissect match for alternation node
//  ^ static int caltdissect(struct vars *, struct subre *, chr *, chr *);
//
func caltdissect(tls *libc.TLS, v uintptr, t uintptr, begin uintptr, end uintptr) int32 { /* regexec.c:947:1: */
	var d uintptr
	var er int32

	// We loop, rather than tail-recurse, to handle a chain of alternatives
	for t != uintptr(0) {

		{
		}

		d = getsubdfa(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
		{
			if (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fg           uintptr
					Feflags      int32
					F__ccgo_pad1 [4]byte
					Fnmatch      Size_t
					Fpmatch      uintptr
					Fdetails     uintptr
					Fstart       uintptr
					Fstop        uintptr
					Ferr         int32
					F__ccgo_pad2 [4]byte
					Fsubdfas     uintptr
					Fdfa1        Smalldfa
					Fdfa2        Smalldfa
				})(unsafe.Pointer(v)).Ferr
			}
		}

		if longest(tls, v, d, begin, end, uintptr(0)) == end {
			{
			}

			er = cdissect(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft, begin, end)
			if er != REG_NOMATCH {
				return er
			}
		}

		t = (*Subre)(unsafe.Pointer(t)).Fright
	}

	return REG_NOMATCH
}

//
//  - citerdissect - dissect match for iteration node
//  ^ static int citerdissect(struct vars *, struct subre *, chr *, chr *);
//
func citerdissect(tls *libc.TLS, v uintptr, t uintptr, begin uintptr, end uintptr) int32 { /* regexec.c:984:1: */
	var d uintptr
	var endpts uintptr
	var limit uintptr
	var min_matches int32
	var max_matches Size_t
	var nverified int32
	var k int32
	var i int32
	var er int32
	var prev_end uintptr

	// If zero matches are allowed, and target string is empty, just declare
	// victory.  OTOH, if target string isn't empty, zero matches can't work
	// so we pretend the min is 1.
	min_matches = int32((*Subre)(unsafe.Pointer(t)).Fmin)
	if !(min_matches <= 0) {
		goto __1
	}
	if !(begin == end) {
		goto __2
	}
	return REG_OKAY
__2:
	;
	min_matches = 1
__1:
	;

	// We need workspace to track the endpoints of each sub-match.  Normally
	// we consider only nonzero-length sub-matches, so there can be at most
	// end-begin of them.  However, if min is larger than that, we will also
	// consider zero-length sub-matches in order to find enough matches.
	//
	// For convenience, endpts[0] contains the "begin" pointer and we store
	// sub-match endpoints in endpts[1..max_matches].
	max_matches = Size_t((int64(end) - int64(begin)) / 2)
	if !(max_matches > Size_t((*Subre)(unsafe.Pointer(t)).Fmax) && int32((*Subre)(unsafe.Pointer(t)).Fmax) != X_POSIX2_RE_DUP_MAX+1) {
		goto __3
	}
	max_matches = Size_t((*Subre)(unsafe.Pointer(t)).Fmax)
__3:
	;
	if !(max_matches < Size_t(min_matches)) {
		goto __4
	}
	max_matches = Size_t(min_matches)
__4:
	;
	endpts = XTclpAlloc(tls, uint32((max_matches+uint64(1))*Size_t(unsafe.Sizeof(uintptr(0)))))
	if !(endpts == uintptr(0)) {
		goto __5
	}
	return REG_ESPACE
__5:
	;
	*(*uintptr)(unsafe.Pointer(endpts)) = begin

	d = getsubdfa(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
	if !((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Ferr != 0) {
		goto __6
	}
	XTclpFree(tls, endpts)
	return (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Ferr
__6:
	;

	// Our strategy is to first find a set of sub-match endpoints that are
	// valid according to the child node's DFA, and then recursively dissect
	// each sub-match to confirm validity.  If any validity check fails,
	// backtrack the last sub-match and try again.  And, when we next try for
	// a validity check, we need not recheck any successfully verified
	// sub-matches that we didn't move the endpoints of.  nverified remembers
	// how many sub-matches are currently known okay.

	// initialize to consider first sub-match
	nverified = 0
	k = 1
	limit = end

	// iterate until satisfaction or failure
__7:
	if !(k > 0) {
		goto __8
	}
	// try to find an endpoint for the k'th sub-match
	*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) = longest(tls, v, d, *(*uintptr)(unsafe.Pointer(endpts + uintptr(k-1)*8)), limit, uintptr(0))
	if !(*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) == uintptr(0)) {
		goto __9
	}
	// no match possible, so see if we can shorten previous one
	k--
	goto backtrack
__9:
	;

	// k'th sub-match can no longer be considered verified
	if !(nverified >= k) {
		goto __10
	}
	nverified = k - 1
__10:
	;

	if !(*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) != end) {
		goto __11
	}
	// haven't reached end yet, try another iteration if allowed
	if !(Size_t(k) >= max_matches) {
		goto __12
	}
	// must try to shorten some previous match
	k--
	goto backtrack
__12:
	;

	// reject zero-length match unless necessary to achieve min
	if !(*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) == *(*uintptr)(unsafe.Pointer(endpts + uintptr(k-1)*8)) && (k >= min_matches || int64(min_matches-k) < (int64(end)-int64(*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8))))/2)) {
		goto __13
	}
	goto backtrack
__13:
	;

	k++
	limit = end
	goto __7
__11:
	;

	// We've identified a way to divide the string into k sub-matches
	// that works so far as the child DFA can tell.  If k is an allowed
	// number of matches, start the slow part: recurse to verify each
	// sub-match.  We always have k <= max_matches, needn't check that.
	if !(k < min_matches) {
		goto __14
	}
	goto backtrack
__14:
	;

	i = nverified + 1
__15:
	if !(i <= k) {
		goto __17
	}
	zaptreesubs(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
	er = cdissect(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft, *(*uintptr)(unsafe.Pointer(endpts + uintptr(i-1)*8)), *(*uintptr)(unsafe.Pointer(endpts + uintptr(i)*8)))
	if !(er == REG_OKAY) {
		goto __18
	}
	nverified = i
	goto __16
__18:
	;
	if !(er == REG_NOMATCH) {
		goto __19
	}
	goto __17
__19:
	;
	// oops, something failed
	XTclpFree(tls, endpts)
	return er
	goto __16
__16:
	i++
	goto __15
	goto __17
__17:
	;

	if !(i > k) {
		goto __20
	}
	/* satisfaction */

	XTclpFree(tls, endpts)
	return REG_OKAY
__20:
	;

	// match failed to verify, so backtrack

backtrack:
	// Must consider shorter versions of the current sub-match.  However,
	// we'll only ask for a zero-length match if necessary.
__21:
	if !(k > 0) {
		goto __22
	}
	prev_end = *(*uintptr)(unsafe.Pointer(endpts + uintptr(k-1)*8))

	if !(*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) > prev_end) {
		goto __23
	}
	limit = *(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) - uintptr(1)*2
	if !(limit > prev_end || k < min_matches && int64(min_matches-k) >= (int64(end)-int64(prev_end))/2) {
		goto __24
	}
	// break out of backtrack loop, continue the outer one
	goto __22
__24:
	;
__23:
	;
	// can't shorten k'th sub-match any more, consider previous one
	k--
	goto __21
__22:
	;
	goto __7
__8:
	;

	/* all possibilities exhausted */

	XTclpFree(tls, endpts)
	return REG_NOMATCH
}

//
//  - creviterdissect - dissect match for iteration node, shortest-first
//  ^ static int creviterdissect(struct vars *, struct subre *, chr *, chr *);
//
func creviterdissect(tls *libc.TLS, v uintptr, t uintptr, begin uintptr, end uintptr) int32 { /* regexec.c:1157:1: */
	var d uintptr
	var endpts uintptr
	var limit uintptr
	var min_matches int32
	var max_matches Size_t
	var nverified int32
	var k int32
	var i int32
	var er int32

	// If zero matches are allowed, and target string is empty, just declare
	// victory.  OTOH, if target string isn't empty, zero matches can't work
	// so we pretend the min is 1.
	min_matches = int32((*Subre)(unsafe.Pointer(t)).Fmin)
	if !(min_matches <= 0) {
		goto __1
	}
	if !(begin == end) {
		goto __2
	}
	return REG_OKAY
__2:
	;
	min_matches = 1
__1:
	;

	// We need workspace to track the endpoints of each sub-match.  Normally
	// we consider only nonzero-length sub-matches, so there can be at most
	// end-begin of them.  However, if min is larger than that, we will also
	// consider zero-length sub-matches in order to find enough matches.
	//
	// For convenience, endpts[0] contains the "begin" pointer and we store
	// sub-match endpoints in endpts[1..max_matches].
	max_matches = Size_t((int64(end) - int64(begin)) / 2)
	if !(max_matches > Size_t((*Subre)(unsafe.Pointer(t)).Fmax) && int32((*Subre)(unsafe.Pointer(t)).Fmax) != X_POSIX2_RE_DUP_MAX+1) {
		goto __3
	}
	max_matches = Size_t((*Subre)(unsafe.Pointer(t)).Fmax)
__3:
	;
	if !(max_matches < Size_t(min_matches)) {
		goto __4
	}
	max_matches = Size_t(min_matches)
__4:
	;
	endpts = XTclpAlloc(tls, uint32((max_matches+uint64(1))*Size_t(unsafe.Sizeof(uintptr(0)))))
	if !(endpts == uintptr(0)) {
		goto __5
	}
	return REG_ESPACE
__5:
	;
	*(*uintptr)(unsafe.Pointer(endpts)) = begin

	d = getsubdfa(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
	if !((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Ferr != 0) {
		goto __6
	}
	XTclpFree(tls, endpts)
	return (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Ferr
__6:
	;

	// Our strategy is to first find a set of sub-match endpoints that are
	// valid according to the child node's DFA, and then recursively dissect
	// each sub-match to confirm validity.  If any validity check fails,
	// backtrack the last sub-match and try again.  And, when we next try for
	// a validity check, we need not recheck any successfully verified
	// sub-matches that we didn't move the endpoints of.  nverified remembers
	// how many sub-matches are currently known okay.

	// initialize to consider first sub-match
	nverified = 0
	k = 1
	limit = begin

	// iterate until satisfaction or failure
__7:
	if !(k > 0) {
		goto __8
	}
	// disallow zero-length match unless necessary to achieve min
	if !(limit == *(*uintptr)(unsafe.Pointer(endpts + uintptr(k-1)*8)) && limit != end && (k >= min_matches || int64(min_matches-k) < (int64(end)-int64(limit))/2)) {
		goto __9
	}
	limit += 2
__9:
	;

	// if this is the last allowed sub-match, it must reach to the end
	if !(Size_t(k) >= max_matches) {
		goto __10
	}
	limit = end
__10:
	;

	// try to find an endpoint for the k'th sub-match
	*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) = shortest(tls, v, d, *(*uintptr)(unsafe.Pointer(endpts + uintptr(k-1)*8)), limit, end,
		uintptr(0), uintptr(0))
	if !(*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) == uintptr(0)) {
		goto __11
	}
	// no match possible, so see if we can lengthen previous one
	k--
	goto backtrack
__11:
	;

	// k'th sub-match can no longer be considered verified
	if !(nverified >= k) {
		goto __12
	}
	nverified = k - 1
__12:
	;

	if !(*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) != end) {
		goto __13
	}
	// haven't reached end yet, try another iteration if allowed
	if !(Size_t(k) >= max_matches) {
		goto __14
	}
	// must try to lengthen some previous match
	k--
	goto backtrack
__14:
	;

	k++
	limit = *(*uintptr)(unsafe.Pointer(endpts + uintptr(k-1)*8))
	goto __7
__13:
	;

	// We've identified a way to divide the string into k sub-matches
	// that works so far as the child DFA can tell.  If k is an allowed
	// number of matches, start the slow part: recurse to verify each
	// sub-match.  We always have k <= max_matches, needn't check that.
	if !(k < min_matches) {
		goto __15
	}
	goto backtrack
__15:
	;

	i = nverified + 1
__16:
	if !(i <= k) {
		goto __18
	}
	zaptreesubs(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft)
	er = cdissect(tls, v, (*Subre)(unsafe.Pointer(t)).Fleft, *(*uintptr)(unsafe.Pointer(endpts + uintptr(i-1)*8)), *(*uintptr)(unsafe.Pointer(endpts + uintptr(i)*8)))
	if !(er == REG_OKAY) {
		goto __19
	}
	nverified = i
	goto __17
__19:
	;
	if !(er == REG_NOMATCH) {
		goto __20
	}
	goto __18
__20:
	;
	// oops, something failed
	XTclpFree(tls, endpts)
	return er
	goto __17
__17:
	i++
	goto __16
	goto __18
__18:
	;

	if !(i > k) {
		goto __21
	}
	/* satisfaction */

	XTclpFree(tls, endpts)
	return REG_OKAY
__21:
	;

	// match failed to verify, so backtrack

backtrack:
	// Must consider longer versions of the current sub-match.
__22:
	if !(k > 0) {
		goto __23
	}
	if !(*(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) < end) {
		goto __24
	}
	limit = *(*uintptr)(unsafe.Pointer(endpts + uintptr(k)*8)) + uintptr(1)*2
	// break out of backtrack loop, continue the outer one
	goto __23
__24:
	;
	// can't lengthen k'th sub-match any more, consider previous one
	k--
	goto __22
__23:
	;
	goto __7
__8:
	;

	/* all possibilities exhausted */

	XTclpFree(tls, endpts)
	return REG_NOMATCH
}

// DFA routines
// This file is #included by regexec.c.
//
// Copyright (c) 1998, 1999 Henry Spencer.  All rights reserved.
//
// Development of this software was funded, in part, by Cray Research Inc.,
// UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
// Corporation, none of whom are responsible for the results.  The author
// thanks all of them.
//
// Redistribution and use in source and binary forms -- with or without
// modification -- are permitted for any purpose, provided that
// redistributions in source form retain this entire copyright notice and
// indicate the origin and nature of any modifications.
//
// I'd appreciate being given credit for this package in the documentation
// of software which uses it, but that is not a requirement.
//
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
// HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//

//
//  - longest - longest-preferred matching engine
//  ^ static chr *longest(struct vars *, struct dfa *, chr *, chr *, int *);
//
func longest(tls *libc.TLS, v uintptr, d uintptr, start uintptr, stop uintptr, hitstopp uintptr) uintptr { /* rege_dfa.c:37:12: */
	var cp uintptr
	var realstop uintptr
	if stop == (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop {
		realstop = stop
	} else {
		realstop = stop + uintptr(1)*2
	}
	var co Color
	var css uintptr
	var ss uintptr
	var post uintptr
	var i int32
	var cm uintptr = (*Dfa)(unsafe.Pointer(d)).Fcm

	// Initialize.

	css = initialize(tls, v, d, start)
	cp = start
	if hitstopp != uintptr(0) {
		*(*int32)(unsafe.Pointer(hitstopp)) = 0
	}

	/*
	 * Startup.
	 */

	{
	}

	if cp == (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart {
		co = *(*Color)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fcnfa + 20 + uintptr(func() int32 {
			if (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Feflags&REG_NOTBOL != 0 {
				return 0
			}
			return 1
		}())*2))
		{
		}

	} else {
		co = *(*Color)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cm + 368 + uintptr(int32(*(*Chr)(unsafe.Pointer(cp - uintptr(1)*2)))>>BYTBITS&(int32(1)<<BYTBITS-1))*8)) + uintptr(int32(*(*Chr)(unsafe.Pointer(cp - uintptr(1)*2)))&(int32(1)<<BYTBITS-1))*2))
		{
		}

	}
	css = miss(tls, v, d, css, int32(co), cp, start)
	if css == uintptr(0) {
		return uintptr(0)
	}
	(*Sset)(unsafe.Pointer(css)).Flastseen = cp

	// Main loop.

	if (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Feflags&REG_FTRACE != 0 {
		for cp < realstop {
			{
			}

			co = *(*Color)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cm + 368 + uintptr(int32(*(*Chr)(unsafe.Pointer(cp)))>>BYTBITS&(int32(1)<<BYTBITS-1))*8)) + uintptr(int32(*(*Chr)(unsafe.Pointer(cp)))&(int32(1)<<BYTBITS-1))*2))
			{
			}

			ss = *(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(css)).Fouts + uintptr(co)*8))
			if ss == uintptr(0) {
				ss = miss(tls, v, d, css, int32(co), cp+uintptr(1)*2, start)
				if ss == uintptr(0) {
					break // NOTE BREAK OUT
				}
			}
			cp += 2
			(*Sset)(unsafe.Pointer(ss)).Flastseen = cp
			css = ss
		}
	} else {
		for cp < realstop {
			co = *(*Color)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cm + 368 + uintptr(int32(*(*Chr)(unsafe.Pointer(cp)))>>BYTBITS&(int32(1)<<BYTBITS-1))*8)) + uintptr(int32(*(*Chr)(unsafe.Pointer(cp)))&(int32(1)<<BYTBITS-1))*2))
			ss = *(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(css)).Fouts + uintptr(co)*8))
			if ss == uintptr(0) {
				ss = miss(tls, v, d, css, int32(co), cp+uintptr(1)*2, start)
				if ss == uintptr(0) {
					break // NOTE BREAK OUT
				}
			}
			cp += 2
			(*Sset)(unsafe.Pointer(ss)).Flastseen = cp
			css = ss
		}
	}

	/*
	 * Shutdown.
	 */

	{
	}

	if cp == (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop && stop == (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop {
		if hitstopp != uintptr(0) {
			*(*int32)(unsafe.Pointer(hitstopp)) = 1
		}
		co = *(*Color)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fcnfa + 24 + uintptr(func() int32 {
			if (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Feflags&REG_NOTEOL != 0 {
				return 0
			}
			return 1
		}())*2))
		{
		}

		ss = miss(tls, v, d, css, int32(co), cp, start)

		// Special case: match ended at eol?

		if ss != uintptr(0) && (*Sset)(unsafe.Pointer(ss)).Fflags&POSTSTATE != 0 {
			return cp
		} else if ss != uintptr(0) {
			(*Sset)(unsafe.Pointer(ss)).Flastseen = cp // to be tidy
		}
	}

	// Find last match, if any.

	post = (*Dfa)(unsafe.Pointer(d)).Flastpost
	ss = (*Dfa)(unsafe.Pointer(d)).Fssets
	i = (*Dfa)(unsafe.Pointer(d)).Fnssused
__1:
	if !(i > 0) {
		goto __3
	}
	{
		if (*Sset)(unsafe.Pointer(ss)).Fflags&POSTSTATE != 0 && post != (*Sset)(unsafe.Pointer(ss)).Flastseen && (post == uintptr(0) || post < (*Sset)(unsafe.Pointer(ss)).Flastseen) {
			post = (*Sset)(unsafe.Pointer(ss)).Flastseen
		}

	}
	goto __2
__2:
	ss += 56
	i--
	goto __1
	goto __3
__3:
	;
	if post != uintptr(0) { // found one
		return post - uintptr(1)*2
	}

	return uintptr(0)
}

//
//  - shortest - shortest-preferred matching engine
//  ^ static chr *shortest(struct vars *, struct dfa *, chr *, chr *, chr *,
//  ^ 	chr **, int *);
//
func shortest(tls *libc.TLS, v uintptr, d uintptr, start uintptr, min uintptr, max uintptr, coldp uintptr, hitstopp uintptr) uintptr { /* rege_dfa.c:164:12: */
	var cp uintptr
	var realmin uintptr
	if min == (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop {
		realmin = min
	} else {
		realmin = min + uintptr(1)*2
	}
	var realmax uintptr
	if max == (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop {
		realmax = max
	} else {
		realmax = max + uintptr(1)*2
	}
	var co Color
	var css uintptr
	var ss uintptr
	var cm uintptr = (*Dfa)(unsafe.Pointer(d)).Fcm

	// Initialize.

	css = initialize(tls, v, d, start)
	cp = start
	if hitstopp != uintptr(0) {
		*(*int32)(unsafe.Pointer(hitstopp)) = 0
	}

	/*
	 * Startup.
	 */

	{
	}

	if cp == (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstart {
		co = *(*Color)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fcnfa + 20 + uintptr(func() int32 {
			if (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Feflags&REG_NOTBOL != 0 {
				return 0
			}
			return 1
		}())*2))
		{
		}

	} else {
		co = *(*Color)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cm + 368 + uintptr(int32(*(*Chr)(unsafe.Pointer(cp - uintptr(1)*2)))>>BYTBITS&(int32(1)<<BYTBITS-1))*8)) + uintptr(int32(*(*Chr)(unsafe.Pointer(cp - uintptr(1)*2)))&(int32(1)<<BYTBITS-1))*2))
		{
		}

	}
	css = miss(tls, v, d, css, int32(co), cp, start)
	if css == uintptr(0) {
		return uintptr(0)
	}
	(*Sset)(unsafe.Pointer(css)).Flastseen = cp
	ss = css

	// Main loop.

	if (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Feflags&REG_FTRACE != 0 {
		for cp < realmax {
			{
			}

			co = *(*Color)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cm + 368 + uintptr(int32(*(*Chr)(unsafe.Pointer(cp)))>>BYTBITS&(int32(1)<<BYTBITS-1))*8)) + uintptr(int32(*(*Chr)(unsafe.Pointer(cp)))&(int32(1)<<BYTBITS-1))*2))
			{
			}

			ss = *(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(css)).Fouts + uintptr(co)*8))
			if ss == uintptr(0) {
				ss = miss(tls, v, d, css, int32(co), cp+uintptr(1)*2, start)
				if ss == uintptr(0) {
					break // NOTE BREAK OUT
				}
			}
			cp += 2
			(*Sset)(unsafe.Pointer(ss)).Flastseen = cp
			css = ss
			if (*Sset)(unsafe.Pointer(ss)).Fflags&POSTSTATE != 0 && cp >= realmin {
				break // NOTE BREAK OUT
			}
		}
	} else {
		for cp < realmax {
			co = *(*Color)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cm + 368 + uintptr(int32(*(*Chr)(unsafe.Pointer(cp)))>>BYTBITS&(int32(1)<<BYTBITS-1))*8)) + uintptr(int32(*(*Chr)(unsafe.Pointer(cp)))&(int32(1)<<BYTBITS-1))*2))
			ss = *(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(css)).Fouts + uintptr(co)*8))
			if ss == uintptr(0) {
				ss = miss(tls, v, d, css, int32(co), cp+uintptr(1)*2, start)
				if ss == uintptr(0) {
					break // NOTE BREAK OUT
				}
			}
			cp += 2
			(*Sset)(unsafe.Pointer(ss)).Flastseen = cp
			css = ss
			if (*Sset)(unsafe.Pointer(ss)).Fflags&POSTSTATE != 0 && cp >= realmin {
				break // NOTE BREAK OUT
			}
		}
	}

	if ss == uintptr(0) {
		return uintptr(0)
	}

	if coldp != uintptr(0) { // report last no-progress state set, if any
		*(*uintptr)(unsafe.Pointer(coldp)) = lastCold(tls, v, d)
	}

	if (*Sset)(unsafe.Pointer(ss)).Fflags&POSTSTATE != 0 && cp > min {

		cp -= 2
	} else if cp == (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop && max == (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop {
		co = *(*Color)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fcnfa + 24 + uintptr(func() int32 {
			if (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Feflags&REG_NOTEOL != 0 {
				return 0
			}
			return 1
		}())*2))
		{
		}

		ss = miss(tls, v, d, css, int32(co), cp, start)

		// Match might have ended at eol.

		if (ss == uintptr(0) || !((*Sset)(unsafe.Pointer(ss)).Fflags&POSTSTATE != 0)) && hitstopp != uintptr(0) {
			*(*int32)(unsafe.Pointer(hitstopp)) = 1
		}
	}

	if ss == uintptr(0) || !((*Sset)(unsafe.Pointer(ss)).Fflags&POSTSTATE != 0) {
		return uintptr(0)
	}

	return cp
}

//
//  - lastCold - determine last point at which no progress had been made
//  ^ static chr *lastCold(struct vars *, struct dfa *);
//
func lastCold(tls *libc.TLS, v uintptr, d uintptr) uintptr { /* rege_dfa.c:288:12: */
	var ss uintptr
	var nopr uintptr = (*Dfa)(unsafe.Pointer(d)).Flastnopr
	var i int32

	if nopr == uintptr(0) {
		nopr = (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Fstart
	}
	ss = (*Dfa)(unsafe.Pointer(d)).Fssets
	i = (*Dfa)(unsafe.Pointer(d)).Fnssused
__1:
	if !(i > 0) {
		goto __3
	}
	{
		if (*Sset)(unsafe.Pointer(ss)).Fflags&NOPROGRESS != 0 && nopr < (*Sset)(unsafe.Pointer(ss)).Flastseen {
			nopr = (*Sset)(unsafe.Pointer(ss)).Flastseen
		}

	}
	goto __2
__2:
	ss += 56
	i--
	goto __1
	goto __3
__3:
	;
	return nopr
}

//
//  - newDFA - set up a fresh DFA
//  ^ static struct dfa *newDFA(struct vars *, struct cnfa *,
//  ^ 	struct colormap *, struct smalldfa *);
//
func newDFA(tls *libc.TLS, v uintptr, cnfa uintptr, cm uintptr, sml uintptr) uintptr { /* rege_dfa.c:313:19: */
	var d uintptr
	var nss Size_t = Size_t((*Cnfa)(unsafe.Pointer(cnfa)).Fnstates * 2)
	var wordsper int32 = int32((uint64((*Cnfa)(unsafe.Pointer(cnfa)).Fnstates) + uint64(8)*uint64(unsafe.Sizeof(uint32(0))) - uint64(1)) / (uint64(8) * uint64(unsafe.Sizeof(uint32(0)))))
	var smallwas uintptr = sml

	if nss <= uint64(FEWSTATES) && (*Cnfa)(unsafe.Pointer(cnfa)).Fncolors <= FEWCOLORS {

		if sml == uintptr(0) {
			sml = XTclpAlloc(tls, uint32(unsafe.Sizeof(Smalldfa{})))
			if sml == uintptr(0) {
				(*struct {
					Fre          uintptr
					Fg           uintptr
					Feflags      int32
					F__ccgo_pad1 [4]byte
					Fnmatch      Size_t
					Fpmatch      uintptr
					Fdetails     uintptr
					Fstart       uintptr
					Fstop        uintptr
					Ferr         int32
					F__ccgo_pad2 [4]byte
					Fsubdfas     uintptr
					Fdfa1        Smalldfa
					Fdfa2        Smalldfa
				})(unsafe.Pointer(v)).Ferr = func() int32 {
					if (*struct {
						Fre          uintptr
						Fg           uintptr
						Feflags      int32
						F__ccgo_pad1 [4]byte
						Fnmatch      Size_t
						Fpmatch      uintptr
						Fdetails     uintptr
						Fstart       uintptr
						Fstop        uintptr
						Ferr         int32
						F__ccgo_pad2 [4]byte
						Fsubdfas     uintptr
						Fdfa1        Smalldfa
						Fdfa2        Smalldfa
					})(unsafe.Pointer(v)).Ferr != 0 {
						return (*struct {
							Fre          uintptr
							Fg           uintptr
							Feflags      int32
							F__ccgo_pad1 [4]byte
							Fnmatch      Size_t
							Fpmatch      uintptr
							Fdetails     uintptr
							Fstart       uintptr
							Fstop        uintptr
							Ferr         int32
							F__ccgo_pad2 [4]byte
							Fsubdfas     uintptr
							Fdfa1        Smalldfa
							Fdfa2        Smalldfa
						})(unsafe.Pointer(v)).Ferr
					}
					return REG_ESPACE
				}()
				return uintptr(0)
			}
		}
		d = sml
		(*Dfa)(unsafe.Pointer(d)).Fssets = sml + 120       /* &.ssets */
		(*Dfa)(unsafe.Pointer(d)).Fstatesarea = sml + 2360 /* &.statesarea */
		(*Dfa)(unsafe.Pointer(d)).Fwork = (*Dfa)(unsafe.Pointer(d)).Fstatesarea + uintptr(nss)*4
		(*Dfa)(unsafe.Pointer(d)).Foutsarea = sml + 2528 /* &.outsarea */
		(*Dfa)(unsafe.Pointer(d)).Fincarea = sml + 7328  /* &.incarea */
		(*Dfa)(unsafe.Pointer(d)).Fcptsmalloced = 0
		(*Dfa)(unsafe.Pointer(d)).Fmallocarea = func() uintptr {
			if smallwas == uintptr(0) {
				return sml
			}
			return uintptr(0)
		}()
	} else {
		d = XTclpAlloc(tls, uint32(unsafe.Sizeof(Dfa{})))
		if d == uintptr(0) {
			(*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fg           uintptr
					Feflags      int32
					F__ccgo_pad1 [4]byte
					Fnmatch      Size_t
					Fpmatch      uintptr
					Fdetails     uintptr
					Fstart       uintptr
					Fstop        uintptr
					Ferr         int32
					F__ccgo_pad2 [4]byte
					Fsubdfas     uintptr
					Fdfa1        Smalldfa
					Fdfa2        Smalldfa
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fg           uintptr
						Feflags      int32
						F__ccgo_pad1 [4]byte
						Fnmatch      Size_t
						Fpmatch      uintptr
						Fdetails     uintptr
						Fstart       uintptr
						Fstop        uintptr
						Ferr         int32
						F__ccgo_pad2 [4]byte
						Fsubdfas     uintptr
						Fdfa1        Smalldfa
						Fdfa2        Smalldfa
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_ESPACE
			}()
			return uintptr(0)
		}
		(*Dfa)(unsafe.Pointer(d)).Fssets = XTclpAlloc(tls, uint32(nss*Size_t(unsafe.Sizeof(Sset{}))))
		(*Dfa)(unsafe.Pointer(d)).Fstatesarea = XTclpAlloc(tls, uint32((nss+uint64(WORK))*Size_t(wordsper)*Size_t(unsafe.Sizeof(uint32(0)))))
		(*Dfa)(unsafe.Pointer(d)).Fwork = (*Dfa)(unsafe.Pointer(d)).Fstatesarea + uintptr(nss*Size_t(wordsper))*4
		(*Dfa)(unsafe.Pointer(d)).Foutsarea = XTclpAlloc(tls, uint32(nss*Size_t((*Cnfa)(unsafe.Pointer(cnfa)).Fncolors)*Size_t(unsafe.Sizeof(uintptr(0)))))
		(*Dfa)(unsafe.Pointer(d)).Fincarea = XTclpAlloc(tls, uint32(nss*Size_t((*Cnfa)(unsafe.Pointer(cnfa)).Fncolors)*Size_t(unsafe.Sizeof(Arcp{}))))
		(*Dfa)(unsafe.Pointer(d)).Fcptsmalloced = 1
		(*Dfa)(unsafe.Pointer(d)).Fmallocarea = d
		if (*Dfa)(unsafe.Pointer(d)).Fssets == uintptr(0) || (*Dfa)(unsafe.Pointer(d)).Fstatesarea == uintptr(0) || (*Dfa)(unsafe.Pointer(d)).Foutsarea == uintptr(0) || (*Dfa)(unsafe.Pointer(d)).Fincarea == uintptr(0) {
			freeDFA(tls, d)
			(*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr = func() int32 {
				if (*struct {
					Fre          uintptr
					Fg           uintptr
					Feflags      int32
					F__ccgo_pad1 [4]byte
					Fnmatch      Size_t
					Fpmatch      uintptr
					Fdetails     uintptr
					Fstart       uintptr
					Fstop        uintptr
					Ferr         int32
					F__ccgo_pad2 [4]byte
					Fsubdfas     uintptr
					Fdfa1        Smalldfa
					Fdfa2        Smalldfa
				})(unsafe.Pointer(v)).Ferr != 0 {
					return (*struct {
						Fre          uintptr
						Fg           uintptr
						Feflags      int32
						F__ccgo_pad1 [4]byte
						Fnmatch      Size_t
						Fpmatch      uintptr
						Fdetails     uintptr
						Fstart       uintptr
						Fstop        uintptr
						Ferr         int32
						F__ccgo_pad2 [4]byte
						Fsubdfas     uintptr
						Fdfa1        Smalldfa
						Fdfa2        Smalldfa
					})(unsafe.Pointer(v)).Ferr
				}
				return REG_ESPACE
			}()
			return uintptr(0)
		}
	}

	(*Dfa)(unsafe.Pointer(d)).Fnssets = func() int32 {
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Feflags&REG_SMALL != 0 {
			return 7
		}
		return int32(nss)
	}()
	(*Dfa)(unsafe.Pointer(d)).Fnssused = 0
	(*Dfa)(unsafe.Pointer(d)).Fnstates = (*Cnfa)(unsafe.Pointer(cnfa)).Fnstates
	(*Dfa)(unsafe.Pointer(d)).Fncolors = (*Cnfa)(unsafe.Pointer(cnfa)).Fncolors
	(*Dfa)(unsafe.Pointer(d)).Fwordsper = wordsper
	(*Dfa)(unsafe.Pointer(d)).Fcnfa = cnfa
	(*Dfa)(unsafe.Pointer(d)).Fcm = cm
	(*Dfa)(unsafe.Pointer(d)).Flastpost = uintptr(0)
	(*Dfa)(unsafe.Pointer(d)).Flastnopr = uintptr(0)
	(*Dfa)(unsafe.Pointer(d)).Fsearch = (*Dfa)(unsafe.Pointer(d)).Fssets

	// Initialization of sset fields is done as needed.

	return d
}

//
//  - freeDFA - free a DFA
//  ^ static void freeDFA(struct dfa *);
//
func freeDFA(tls *libc.TLS, d uintptr) { /* rege_dfa.c:391:1: */
	if (*Dfa)(unsafe.Pointer(d)).Fcptsmalloced != 0 {
		if (*Dfa)(unsafe.Pointer(d)).Fssets != uintptr(0) {
			XTclpFree(tls, (*Dfa)(unsafe.Pointer(d)).Fssets)
		}
		if (*Dfa)(unsafe.Pointer(d)).Fstatesarea != uintptr(0) {
			XTclpFree(tls, (*Dfa)(unsafe.Pointer(d)).Fstatesarea)
		}
		if (*Dfa)(unsafe.Pointer(d)).Foutsarea != uintptr(0) {
			XTclpFree(tls, (*Dfa)(unsafe.Pointer(d)).Foutsarea)
		}
		if (*Dfa)(unsafe.Pointer(d)).Fincarea != uintptr(0) {
			XTclpFree(tls, (*Dfa)(unsafe.Pointer(d)).Fincarea)
		}
	}

	if (*Dfa)(unsafe.Pointer(d)).Fmallocarea != uintptr(0) {
		XTclpFree(tls, (*Dfa)(unsafe.Pointer(d)).Fmallocarea)
	}
}

//
//  - hash - construct a hash code for a bitvector
//  * There are probably better ways, but they're more expensive.
//  ^ static unsigned hash(unsigned *, int);
//
func hash(tls *libc.TLS, uv uintptr, n int32) uint32 { /* rege_dfa.c:420:1: */
	var i int32
	var h uint32

	h = uint32(0)
	for i = 0; i < n; i++ {
		h = h ^ *(*uint32)(unsafe.Pointer(uv + uintptr(i)*4))
	}
	return h
}

//
//  - initialize - hand-craft a cache entry for startup, otherwise get ready
//  ^ static struct sset *initialize(struct vars *, struct dfa *, chr *);
//
func initialize(tls *libc.TLS, v uintptr, d uintptr, start uintptr) uintptr { /* rege_dfa.c:438:20: */
	var ss uintptr
	var i int32

	// Is previous one still there?

	if (*Dfa)(unsafe.Pointer(d)).Fnssused > 0 && (*Sset)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fssets)).Fflags&STARTER != 0 {
		ss = (*Dfa)(unsafe.Pointer(d)).Fssets
	} else { // no, must (re)build it
		ss = getVacantSS(tls, v, d, start, start)
		for i = 0; i < (*Dfa)(unsafe.Pointer(d)).Fwordsper; i++ {
			*(*uint32)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Fstates + uintptr(i)*4)) = uint32(0)
		}
		*(*uint32)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Fstates + uintptr(uint64((*Cnfa)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fcnfa)).Fpre)/(uint64(8)*uint64(unsafe.Sizeof(uint32(0)))))*4)) |= uint32(uint32(1)) << (uint64((*Cnfa)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fcnfa)).Fpre) % (uint64(8) * uint64(unsafe.Sizeof(uint32(0)))))
		(*Sset)(unsafe.Pointer(ss)).Fhash = func() uint32 {
			if (*Dfa)(unsafe.Pointer(d)).Fwordsper == 1 {
				return *(*uint32)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Fstates))
			}
			return hash(tls, (*Sset)(unsafe.Pointer(ss)).Fstates, (*Dfa)(unsafe.Pointer(d)).Fwordsper)
		}()

		(*Sset)(unsafe.Pointer(ss)).Fflags = STARTER | LOCKED | NOPROGRESS

		// lastseen dealt with below
	}

	for i = 0; i < (*Dfa)(unsafe.Pointer(d)).Fnssused; i++ {
		(*Sset)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fssets + uintptr(i)*56)).Flastseen = uintptr(0)
	}
	(*Sset)(unsafe.Pointer(ss)).Flastseen = start // maybe untrue, but harmless
	(*Dfa)(unsafe.Pointer(d)).Flastpost = uintptr(0)
	(*Dfa)(unsafe.Pointer(d)).Flastnopr = uintptr(0)
	return ss
}

//
//  - miss - handle a cache miss
//  ^ static struct sset *miss(struct vars *, struct dfa *, struct sset *,
//  ^ 	pcolor, chr *, chr *);
//
func miss(tls *libc.TLS, v uintptr, d uintptr, css uintptr, co Pcolor, cp uintptr, start uintptr) uintptr { /* rege_dfa.c:482:20: */
	var cnfa uintptr = (*Dfa)(unsafe.Pointer(d)).Fcnfa
	var h uint32
	var ca uintptr
	var p uintptr
	var i int32
	var isPost int32
	var noProgress int32
	var gotState int32
	var doLAConstraints int32
	var sawLAConstraints int32

	// For convenience, we can be called even if it might not be a miss.

	if *(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(css)).Fouts + uintptr(co)*8)) != uintptr(0) {
		{
		}

		return *(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(css)).Fouts + uintptr(co)*8))
	}
	{
	}

	// First, what set of states would we end up in?

	for i = 0; i < (*Dfa)(unsafe.Pointer(d)).Fwordsper; i++ {
		*(*uint32)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fwork + uintptr(i)*4)) = uint32(0)
	}
	isPost = 0
	noProgress = 1
	gotState = 0
	for i = 0; i < (*Dfa)(unsafe.Pointer(d)).Fnstates; i++ {
		if *(*uint32)(unsafe.Pointer((*Sset)(unsafe.Pointer(css)).Fstates + uintptr(uint64(i)/(uint64(8)*uint64(unsafe.Sizeof(uint32(0)))))*4))&(uint32(uint32(1))<<(uint64(i)%(uint64(8)*uint64(unsafe.Sizeof(uint32(0)))))) != 0 {
			for ca = *(*uintptr)(unsafe.Pointer((*Cnfa)(unsafe.Pointer(cnfa)).Fstates + uintptr(i)*8)); int32((*Carc)(unsafe.Pointer(ca)).Fco) != -1; ca += 8 {
				if int32((*Carc)(unsafe.Pointer(ca)).Fco) == co {
					*(*uint32)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fwork + uintptr(uint64((*Carc)(unsafe.Pointer(ca)).Fto)/(uint64(8)*uint64(unsafe.Sizeof(uint32(0)))))*4)) |= uint32(uint32(1)) << (uint64((*Carc)(unsafe.Pointer(ca)).Fto) % (uint64(8) * uint64(unsafe.Sizeof(uint32(0)))))
					gotState = 1
					if (*Carc)(unsafe.Pointer(ca)).Fto == (*Cnfa)(unsafe.Pointer(cnfa)).Fpost {
						isPost = 1
					}
					if !(int32(*(*int8)(unsafe.Pointer((*Cnfa)(unsafe.Pointer(cnfa)).Fstflags + uintptr((*Carc)(unsafe.Pointer(ca)).Fto))))&CNFA_NOPROGRESS != 0) {
						noProgress = 0
					}
					{
					}

				}
			}
		}
	}
	doLAConstraints = func() int32 {
		if gotState != 0 {
			return (*Cnfa)(unsafe.Pointer(cnfa)).Fflags & HASLACONS
		}
		return 0
	}()
	sawLAConstraints = 0
	for doLAConstraints != 0 { // transitive closure
		doLAConstraints = 0
		for i = 0; i < (*Dfa)(unsafe.Pointer(d)).Fnstates; i++ {
			if *(*uint32)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fwork + uintptr(uint64(i)/(uint64(8)*uint64(unsafe.Sizeof(uint32(0)))))*4))&(uint32(uint32(1))<<(uint64(i)%(uint64(8)*uint64(unsafe.Sizeof(uint32(0)))))) != 0 {
				for ca = *(*uintptr)(unsafe.Pointer((*Cnfa)(unsafe.Pointer(cnfa)).Fstates + uintptr(i)*8)); int32((*Carc)(unsafe.Pointer(ca)).Fco) != -1; ca += 8 {
					if int32((*Carc)(unsafe.Pointer(ca)).Fco) < (*Cnfa)(unsafe.Pointer(cnfa)).Fncolors {
						continue // NOTE CONTINUE
					}
					sawLAConstraints = 1
					if *(*uint32)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fwork + uintptr(uint64((*Carc)(unsafe.Pointer(ca)).Fto)/(uint64(8)*uint64(unsafe.Sizeof(uint32(0)))))*4))&(uint32(uint32(1))<<(uint64((*Carc)(unsafe.Pointer(ca)).Fto)%(uint64(8)*uint64(unsafe.Sizeof(uint32(0)))))) != 0 {
						continue // NOTE CONTINUE
					}
					if !(checkLAConstraint(tls, v, cnfa, cp, int32((*Carc)(unsafe.Pointer(ca)).Fco)) != 0) {
						continue // NOTE CONTINUE
					}
					*(*uint32)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fwork + uintptr(uint64((*Carc)(unsafe.Pointer(ca)).Fto)/(uint64(8)*uint64(unsafe.Sizeof(uint32(0)))))*4)) |= uint32(uint32(1)) << (uint64((*Carc)(unsafe.Pointer(ca)).Fto) % (uint64(8) * uint64(unsafe.Sizeof(uint32(0)))))
					doLAConstraints = 1
					if (*Carc)(unsafe.Pointer(ca)).Fto == (*Cnfa)(unsafe.Pointer(cnfa)).Fpost {
						isPost = 1
					}
					if !(int32(*(*int8)(unsafe.Pointer((*Cnfa)(unsafe.Pointer(cnfa)).Fstflags + uintptr((*Carc)(unsafe.Pointer(ca)).Fto))))&CNFA_NOPROGRESS != 0) {
						noProgress = 0
					}
					{
					}

				}
			}
		}
	}
	if !(gotState != 0) {
		return uintptr(0)
	}
	h = func() uint32 {
		if (*Dfa)(unsafe.Pointer(d)).Fwordsper == 1 {
			return *(*uint32)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fwork))
		}
		return hash(tls, (*Dfa)(unsafe.Pointer(d)).Fwork, (*Dfa)(unsafe.Pointer(d)).Fwordsper)
	}()

	// Next, is that in the cache?

	p = (*Dfa)(unsafe.Pointer(d)).Fssets
	i = (*Dfa)(unsafe.Pointer(d)).Fnssused
__1:
	if !(i > 0) {
		goto __3
	}
	{
		if (*Sset)(unsafe.Pointer(p)).Fhash == h && ((*Dfa)(unsafe.Pointer(d)).Fwordsper == 1 || libc.Xmemcmp(tls, (*Dfa)(unsafe.Pointer(d)).Fwork, (*Sset)(unsafe.Pointer(p)).Fstates, uint64((*Dfa)(unsafe.Pointer(d)).Fwordsper)*uint64(unsafe.Sizeof(uint32(0)))) == 0) {
			{
			}

			goto __3 // NOTE BREAK OUT
		}

	}
	goto __2
__2:
	p += 56
	i--
	goto __1
	goto __3
__3:
	;
	if i == 0 { // nope, need a new cache entry
		p = getVacantSS(tls, v, d, cp, start)

		for i = 0; i < (*Dfa)(unsafe.Pointer(d)).Fwordsper; i++ {
			*(*uint32)(unsafe.Pointer((*Sset)(unsafe.Pointer(p)).Fstates + uintptr(i)*4)) = *(*uint32)(unsafe.Pointer((*Dfa)(unsafe.Pointer(d)).Fwork + uintptr(i)*4))
		}
		(*Sset)(unsafe.Pointer(p)).Fhash = h
		(*Sset)(unsafe.Pointer(p)).Fflags = func() int32 {
			if isPost != 0 {
				return POSTSTATE
			}
			return 0
		}()
		if noProgress != 0 {
			*(*int32)(unsafe.Pointer(p + 12)) |= NOPROGRESS
		}

		// lastseen to be dealt with by caller
	}

	if !(sawLAConstraints != 0) { /* lookahead conds. always cache miss */
		{
		}

		*(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(css)).Fouts + uintptr(co)*8)) = p
		*(*Arcp)(unsafe.Pointer((*Sset)(unsafe.Pointer(css)).Finchain + uintptr(co)*16)) = (*Sset)(unsafe.Pointer(p)).Fins
		(*Sset)(unsafe.Pointer(p)).Fins.Fss = css
		(*Sset)(unsafe.Pointer(p)).Fins.Fco = Color(co)
	}
	return p
}

//
//  - checkLAConstraint - lookahead-constraint checker for miss()
//  ^ static int checkLAConstraint(struct vars *, struct cnfa *, chr *, pcolor);
//
func checkLAConstraint(tls *libc.TLS, v uintptr, pcnfa uintptr, cp uintptr, co Pcolor) int32 { /* rege_dfa.c:612:1: */
	bp := tls.Alloc(16928)
	defer tls.Free(16928)

	var n int32
	var sub uintptr
	var d uintptr
	// var sd Smalldfa at bp, 16928

	var end uintptr

	n = co - (*Cnfa)(unsafe.Pointer(pcnfa)).Fncolors

	{
	}

	sub = (*Guts)(unsafe.Pointer((*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg)).Flacons + uintptr(n)*112
	d = newDFA(tls, v, sub+48, (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fg+96, bp)
	if d == uintptr(0) {
		(*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr = func() int32 {
			if (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr != 0 {
				return (*struct {
					Fre          uintptr
					Fg           uintptr
					Feflags      int32
					F__ccgo_pad1 [4]byte
					Fnmatch      Size_t
					Fpmatch      uintptr
					Fdetails     uintptr
					Fstart       uintptr
					Fstop        uintptr
					Ferr         int32
					F__ccgo_pad2 [4]byte
					Fsubdfas     uintptr
					Fdfa1        Smalldfa
					Fdfa2        Smalldfa
				})(unsafe.Pointer(v)).Ferr
			}
			return REG_ESPACE
		}()
		return 0
	}
	end = longest(tls, v, d, cp, (*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Fstop, uintptr(0))
	freeDFA(tls, d)
	{
	}

	if (*Subre)(unsafe.Pointer(sub)).Fsubno != 0 {
		return libc.Bool32(end != uintptr(0))
	}
	return libc.Bool32(end == uintptr(0))
}

//
//  - getVacantSS - get a vacant state set
//  * This routine clears out the inarcs and outarcs, but does not otherwise
//  * clear the innards of the state set -- that's up to the caller.
//  ^ static struct sset *getVacantSS(struct vars *, struct dfa *, chr *, chr *);
//
func getVacantSS(tls *libc.TLS, v uintptr, d uintptr, cp uintptr, start uintptr) uintptr { /* rege_dfa.c:645:20: */
	var i int32
	var ss uintptr
	var p uintptr
	var ap Arcp
	var lastap = Arcp{} // silence gcc 4 warning
	var co Color

	ss = pickNextSS(tls, v, d, cp, start)

	// Clear out its inarcs, including self-referential ones.

	ap = (*Sset)(unsafe.Pointer(ss)).Fins
	for libc.AssignUintptr(&p, ap.Fss) != uintptr(0) {
		co = ap.Fco
		{
		}

		*(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(p)).Fouts + uintptr(co)*8)) = uintptr(0)
		ap = *(*Arcp)(unsafe.Pointer((*Sset)(unsafe.Pointer(p)).Finchain + uintptr(co)*16))
		(*Arcp)(unsafe.Pointer((*Sset)(unsafe.Pointer(p)).Finchain + uintptr(co)*16)).Fss = uintptr(0) // paranoia
	}
	(*Sset)(unsafe.Pointer(ss)).Fins.Fss = uintptr(0)

	// Take it off the inarc chains of the ssets reached by its outarcs.

	for i = 0; i < (*Dfa)(unsafe.Pointer(d)).Fncolors; i++ {
		p = *(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Fouts + uintptr(i)*8))
		// not self-referential
		if p == uintptr(0) {
			continue // NOTE CONTINUE
		}
		{
		}

		if (*Sset)(unsafe.Pointer(p)).Fins.Fss == ss && int32((*Sset)(unsafe.Pointer(p)).Fins.Fco) == i {
			(*Sset)(unsafe.Pointer(p)).Fins = *(*Arcp)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Finchain + uintptr(i)*16))
		} else {

			for ap = (*Sset)(unsafe.Pointer(p)).Fins; ap.Fss != uintptr(0) && !(ap.Fss == ss && int32(ap.Fco) == i); ap = *(*Arcp)(unsafe.Pointer((*Sset)(unsafe.Pointer(ap.Fss)).Finchain + uintptr(ap.Fco)*16)) {
				lastap = ap
			}

			*(*Arcp)(unsafe.Pointer((*Sset)(unsafe.Pointer(lastap.Fss)).Finchain + uintptr(lastap.Fco)*16)) = *(*Arcp)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Finchain + uintptr(i)*16))
		}
		*(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Fouts + uintptr(i)*8)) = uintptr(0)
		(*Arcp)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Finchain + uintptr(i)*16)).Fss = uintptr(0)
	}

	// If ss was a success state, may need to remember location.

	if (*Sset)(unsafe.Pointer(ss)).Fflags&POSTSTATE != 0 && (*Sset)(unsafe.Pointer(ss)).Flastseen != (*Dfa)(unsafe.Pointer(d)).Flastpost && ((*Dfa)(unsafe.Pointer(d)).Flastpost == uintptr(0) || (*Dfa)(unsafe.Pointer(d)).Flastpost < (*Sset)(unsafe.Pointer(ss)).Flastseen) {
		(*Dfa)(unsafe.Pointer(d)).Flastpost = (*Sset)(unsafe.Pointer(ss)).Flastseen
	}

	// Likewise for a no-progress state.

	if (*Sset)(unsafe.Pointer(ss)).Fflags&NOPROGRESS != 0 && (*Sset)(unsafe.Pointer(ss)).Flastseen != (*Dfa)(unsafe.Pointer(d)).Flastnopr && ((*Dfa)(unsafe.Pointer(d)).Flastnopr == uintptr(0) || (*Dfa)(unsafe.Pointer(d)).Flastnopr < (*Sset)(unsafe.Pointer(ss)).Flastseen) {
		(*Dfa)(unsafe.Pointer(d)).Flastnopr = (*Sset)(unsafe.Pointer(ss)).Flastseen
	}

	return ss
}

//
//  - pickNextSS - pick the next stateset to be used
//  ^ static struct sset *pickNextSS(struct vars *, struct dfa *, chr *, chr *);
//
func pickNextSS(tls *libc.TLS, v uintptr, d uintptr, cp uintptr, start uintptr) uintptr { /* rege_dfa.c:725:20: */
	var i int32
	var ss uintptr
	var end uintptr
	var ancient uintptr

	// Shortcut for cases where cache isn't full.

	if (*Dfa)(unsafe.Pointer(d)).Fnssused < (*Dfa)(unsafe.Pointer(d)).Fnssets {
		i = (*Dfa)(unsafe.Pointer(d)).Fnssused
		(*Dfa)(unsafe.Pointer(d)).Fnssused++
		ss = (*Dfa)(unsafe.Pointer(d)).Fssets + uintptr(i)*56
		{
		}

		// Set up innards.

		(*Sset)(unsafe.Pointer(ss)).Fstates = (*Dfa)(unsafe.Pointer(d)).Fstatesarea + uintptr(i*(*Dfa)(unsafe.Pointer(d)).Fwordsper)*4
		(*Sset)(unsafe.Pointer(ss)).Fflags = 0
		(*Sset)(unsafe.Pointer(ss)).Fins.Fss = uintptr(0)
		(*Sset)(unsafe.Pointer(ss)).Fins.Fco = int16(WHITE) // give it some value
		(*Sset)(unsafe.Pointer(ss)).Fouts = (*Dfa)(unsafe.Pointer(d)).Foutsarea + uintptr(i*(*Dfa)(unsafe.Pointer(d)).Fncolors)*8
		(*Sset)(unsafe.Pointer(ss)).Finchain = (*Dfa)(unsafe.Pointer(d)).Fincarea + uintptr(i*(*Dfa)(unsafe.Pointer(d)).Fncolors)*16
		for i = 0; i < (*Dfa)(unsafe.Pointer(d)).Fncolors; i++ {
			*(*uintptr)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Fouts + uintptr(i)*8)) = uintptr(0)
			(*Arcp)(unsafe.Pointer((*Sset)(unsafe.Pointer(ss)).Finchain + uintptr(i)*16)).Fss = uintptr(0)
		}
		return ss
	}

	// Look for oldest, or old enough anyway.

	if (int64(cp)-int64(start))/2 > int64((*Dfa)(unsafe.Pointer(d)).Fnssets*2/3) { // oldest 33% are expendable
		ancient = cp - uintptr((*Dfa)(unsafe.Pointer(d)).Fnssets*2/3)*2
	} else {
		ancient = start
	}
	ss = (*Dfa)(unsafe.Pointer(d)).Fsearch
	end = (*Dfa)(unsafe.Pointer(d)).Fssets + uintptr((*Dfa)(unsafe.Pointer(d)).Fnssets)*56
	for ; ss < end; ss += 56 {
		if ((*Sset)(unsafe.Pointer(ss)).Flastseen == uintptr(0) || (*Sset)(unsafe.Pointer(ss)).Flastseen < ancient) &&
			!((*Sset)(unsafe.Pointer(ss)).Fflags&LOCKED != 0) {
			(*Dfa)(unsafe.Pointer(d)).Fsearch = ss + uintptr(1)*56
			{
			}

			return ss
		}
	}
	ss = (*Dfa)(unsafe.Pointer(d)).Fssets
	end = (*Dfa)(unsafe.Pointer(d)).Fsearch
	for ; ss < end; ss += 56 {
		if ((*Sset)(unsafe.Pointer(ss)).Flastseen == uintptr(0) || (*Sset)(unsafe.Pointer(ss)).Flastseen < ancient) &&
			!((*Sset)(unsafe.Pointer(ss)).Fflags&LOCKED != 0) {
			(*Dfa)(unsafe.Pointer(d)).Fsearch = ss + uintptr(1)*56
			{
			}

			return ss
		}
	}

	/*
	 * Nobody's old enough?!? -- something's really wrong.
	 */

	{
	}

	(*struct {
		Fre          uintptr
		Fg           uintptr
		Feflags      int32
		F__ccgo_pad1 [4]byte
		Fnmatch      Size_t
		Fpmatch      uintptr
		Fdetails     uintptr
		Fstart       uintptr
		Fstop        uintptr
		Ferr         int32
		F__ccgo_pad2 [4]byte
		Fsubdfas     uintptr
		Fdfa1        Smalldfa
		Fdfa2        Smalldfa
	})(unsafe.Pointer(v)).Ferr = func() int32 {
		if (*struct {
			Fre          uintptr
			Fg           uintptr
			Feflags      int32
			F__ccgo_pad1 [4]byte
			Fnmatch      Size_t
			Fpmatch      uintptr
			Fdetails     uintptr
			Fstart       uintptr
			Fstop        uintptr
			Ferr         int32
			F__ccgo_pad2 [4]byte
			Fsubdfas     uintptr
			Fdfa1        Smalldfa
			Fdfa2        Smalldfa
		})(unsafe.Pointer(v)).Ferr != 0 {
			return (*struct {
				Fre          uintptr
				Fg           uintptr
				Feflags      int32
				F__ccgo_pad1 [4]byte
				Fnmatch      Size_t
				Fpmatch      uintptr
				Fdetails     uintptr
				Fstart       uintptr
				Fstop        uintptr
				Ferr         int32
				F__ccgo_pad2 [4]byte
				Fsubdfas     uintptr
				Fdfa1        Smalldfa
				Fdfa2        Smalldfa
			})(unsafe.Pointer(v)).Ferr
		}
		return REG_ASSERT
	}()
	return (*Dfa)(unsafe.Pointer(d)).Fssets
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Magic for allocating a variable workspace. This default version is
// stack-hungry.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//
//  - regfree - free an RE (generic function, punts to RE-specific function)
//  *
//  * Ignoring invocation with NULL is a convenience.
//
func XTclReFree(tls *libc.TLS, re uintptr) { /* regfree.c:45:1: */
	if re == uintptr(0) {
		return
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fns)(unsafe.Pointer((*Regex_t)(unsafe.Pointer(re)).Fre_fns)).Ffree})).f(tls, re)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------------
//
// TclpAlloc --
//
//	Allocate more memory.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpAlloc(tls *libc.TLS, numBytes uint32) uintptr { /* tclAlloc.c:695:6: */
	return libc.Xmalloc(tls, uint64(numBytes))
}

//----------------------------------------------------------------------
//
// TclpFree --
//
//	Free memory.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpFree(tls *libc.TLS, oldPtr uintptr) { /* tclAlloc.c:719:1: */
	libc.Xfree(tls, oldPtr)
	return
}

//----------------------------------------------------------------------
//
// TclpRealloc --
//
//	Reallocate memory.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpRealloc(tls *libc.TLS, oldPtr uintptr, numBytes uint32) uintptr { /* tclAlloc.c:742:6: */
	return libc.Xrealloc(tls, oldPtr, uint64(numBytes))
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// tclCompile.h --
//
// Copyright (c) 1996-1998 Sun Microsystems, Inc.
// Copyright (c) 1998-2000 by Scriptics Corporation.
// Copyright (c) 2001 by Kevin B. Kenny. All rights reserved.
// Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// tclInt.h --
//
//	Declarations of things used internally by the Tcl interpreter.
//
// Copyright (c) 1987-1993 The Regents of the University of California.
// Copyright (c) 1993-1997 Lucent Technologies.
// Copyright (c) 1994-1998 Sun Microsystems, Inc.
// Copyright (c) 1998-1999 by Scriptics Corporation.
// Copyright (c) 2001, 2002 by Kevin B. Kenny.  All rights reserved.
// Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
// Copyright (c) 2006-2008 by Joe Mistachkin.  All rights reserved.
// Copyright (c) 2008 by Miguel Sofer. All rights reserved.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

type ByteCode1 = struct {
	FinterpHandle    TclHandle
	FcompileEpoch    int32
	F__ccgo_pad1     [4]byte
	FnsPtr           uintptr
	FnsEpoch         int32
	FrefCount        int32
	Fflags           uint32
	F__ccgo_pad2     [4]byte
	Fsource          uintptr
	FprocPtr         uintptr
	FstructureSize   Size_t
	FnumCommands     int32
	FnumSrcBytes     int32
	FnumCodeBytes    int32
	FnumLitObjects   int32
	FnumExceptRanges int32
	FnumAuxDataItems int32
	FnumCmdLocBytes  int32
	FmaxExceptDepth  int32
	FmaxStackDepth   int32
	F__ccgo_pad3     [4]byte
	FcodeStart       uintptr
	FobjArrayPtr     uintptr
	FexceptArrayPtr  uintptr
	FauxDataArrayPtr uintptr
	FcodeDeltaStart  uintptr
	FcodeLengthStart uintptr
	FsrcDeltaStart   uintptr
	FsrcLengthStart  uintptr
	FlocalCachePtr   uintptr
} /* tclCompile.h:18:1 */

//------------------------------------------------------------------------
// Data structures related to compilation.
//------------------------------------------------------------------------

// The structure used to implement Tcl "exceptions" (exceptional returns): for
// example, those generated in loops by the break and continue commands, and
// those generated by scripts and caught by the catch command. This
// ExceptionRange structure describes a range of code (e.g., a loop body), the
// kind of exceptions (e.g., a break or continue) that might occur, and the PC
// offsets to jump to if a matching exception does occur. Exception ranges can
// nest so this structure includes a nesting level that is used at runtime to
// find the closest exception range surrounding a PC. For example, when a
// break command is executed, the ExceptionRange structure for the most deeply
// nested loop, if any, is found and used. These structures are also generated
// for the "next" subcommands of for loops since a break there terminates the
// for command. This means a for command actually generates two LoopInfo
// structures.

type ExceptionRangeType = uint32 /* tclCompile.h:88:3 */

type ExceptionRange1 = struct {
	Ftype           ExceptionRangeType
	FnestingLevel   int32
	FcodeOffset     int32
	FnumCodeBytes   int32
	FbreakOffset    int32
	FcontinueOffset int32
	FcatchOffset    int32
} /* tclInt.h:1367:1 */

type ExceptionRange = ExceptionRange1 /* tclCompile.h:107:3 */

// Auxiliary data used when issuing (currently just loop) exception ranges,
// but which is not required during execution.

type ExceptionAux1 = struct {
	FsupportsContinue     int32
	FstackDepth           int32
	FexpandTarget         int32
	FexpandTargetDepth    int32
	FnumBreakTargets      int32
	F__ccgo_pad1          [4]byte
	FbreakTargets         uintptr
	FallocBreakTargets    int32
	FnumContinueTargets   int32
	FcontinueTargets      uintptr
	FallocContinueTargets int32
	F__ccgo_pad2          [4]byte
} /* tclInt.h:1367:1 */

// Auxiliary data used when issuing (currently just loop) exception ranges,
// but which is not required during execution.

type ExceptionAux = ExceptionAux1 /* tclCompile.h:155:3 */

// Structure used to map between instruction pc and source locations. It
// defines for each compiled Tcl command its code's starting offset and its
// source's starting offset and length. Note that the code offset increases
// monotonically: that is, the table is sorted in code offset order. The
// source offset is not monotonic.

type CmdLocation1 = struct {
	FcodeOffset   int32
	FnumCodeBytes int32
	FsrcOffset    int32
	FnumSrcBytes  int32
} /* tclInt.h:1367:1 */

// Structure used to map between instruction pc and source locations. It
// defines for each compiled Tcl command its code's starting offset and its
// source's starting offset and length. Note that the code offset increases
// monotonically: that is, the table is sorted in code offset order. The
// source offset is not monotonic.

type CmdLocation = CmdLocation1 /* tclCompile.h:170:3 */

// TIP #280
// Structure to record additional location information for byte code. This
// information is internal and not saved. i.e. tbcload'ed code will not have
// this information. It records the lines for all words of all commands found
// in the byte code. The association with a ByteCode structure BC is done
// through the 'lineBCPtr' HashTable in Interp, keyed by the address of BC.
// Also recorded is information coming from the context, i.e. type of the
// frame and associated information, like the path of a sourced file.

type ECL1 = struct {
	FsrcOffset int32
	Fnline     int32
	Fline      uintptr
	Fnext      uintptr
} /* tclInt.h:1367:1 */

// TIP #280
// Structure to record additional location information for byte code. This
// information is internal and not saved. i.e. tbcload'ed code will not have
// this information. It records the lines for all words of all commands found
// in the byte code. The association with a ByteCode structure BC is done
// through the 'lineBCPtr' HashTable in Interp, keyed by the address of BC.
// Also recorded is information coming from the context, i.e. type of the
// frame and associated information, like the path of a sourced file.

type ECL = ECL1 /* tclCompile.h:191:3 */

type ExtCmdLoc1 = struct {
	Ftype  int32
	Fstart int32
	Fpath  uintptr
	Floc   uintptr
	Fnloc  int32
	Fnuloc int32
} /* tclInt.h:1367:1 */

type ExtCmdLoc = ExtCmdLoc1 /* tclCompile.h:203:3 */

// We define a separate AuxDataType struct to hold type-related information
// for the AuxData structure. This separation makes it possible for clients
// outside of the TCL core to manipulate (in a limited fashion!) AuxData; for
// example, it makes it possible to pickle and unpickle AuxData structs.

type AuxDataType = AuxDataType1 /* tclCompile.h:258:3 */

// The definition of the AuxData structure that holds information created
// during compilation by CompileProcs and used by instructions during
// execution.

type AuxData1 = struct {
	Ftype       uintptr
	FclientData ClientData
} /* tclInt.h:1367:1 */

// The definition of the AuxData structure that holds information created
// during compilation by CompileProcs and used by instructions during
// execution.

type AuxData = AuxData1 /* tclCompile.h:270:3 */

// Structure defining the compilation environment. After compilation, fields
// describing bytecode instructions are copied out into the more compact
// ByteCode structure defined below.

type CompileEnv = CompileEnv1 /* tclCompile.h:388:3 */

// The structure defining the bytecode instructions resulting from compiling a
// Tcl script. Note that this structure is variable length: a single heap
// object is allocated to hold the ByteCode structure immediately followed by
// the code bytes, the literal object array, the ExceptionRange array, the
// CmdLocation map, and the compilation AuxData array.

// A PRECOMPILED bytecode struct is one that was generated from a compiled
// image rather than implicitly compiled from source

// When a bytecode is compiled, interp or namespace resolvers have not been
// applied yet: this is indicated by the TCL_BYTECODE_RESOLVE_VARS flag.

type ByteCode = ByteCode1 /* tclCompile.h:516:3 */

// Opcodes for the Tcl bytecode instructions. These must correspond to the
// entries in the table of instruction descriptions, tclInstructionTable, in
// tclCompile.c. Also, the order and number of the expression opcodes (e.g.,
// INST_LOR) must match the entries in the array operatorStrings in
// tclExecute.c.

// Opcodes 0 to 9

// Opcodes 10 to 23

// Opcodes 24 to 33

// Opcodes 34 to 39

// Opcodes 40 to 64

// Opcodes 65 to 66

// Opcodes 67 to 68

// Opcodes 69 to 72

// Opcodes 73 to 78

// Opcodes 78 to 81

// Opcodes 82 to 87

// Opcodes 88 to 93

// TIP #22 - LINDEX operator with flat arg list

// TIP #33 - 'lset' command. Code gen also required a Forth-like
//	     OVER operation.

// TIP#90 - 'return' command.

// TIP#123 - exponentiation operator.

// TIP #157 - {*}... (word expansion) language syntax support.

// TIP #57 - 'lassign' command. Code generation requires immediate
//	     LINDEX and LRANGE operators.

// Dictionary (TIP#111) related commands.

// Instruction to support jumps defined by tables (instead of the classic
// [switch] technique of chained comparisons).

// Instructions to support compilation of global, variable, upvar and
// [namespace upvar].

// Instruction to support compiling syntax error to bytecode

// Instruction to reverse N items on top of stack

// regexp instruction

// For [info exists] compilation

// For [subst] compilation

// For [unset] compilation

// For [dict with], [dict exists], [dict create] and [dict merge]

// For [string map] and [regsub] compilation

// For operations to do with coroutines and other NRE-manipulators

// For compilation of basic information operations

// For compilation relating to TclOO

// For compilation of [array] subcommands

// New foreach implementation

// For compilation of [string trim] and related

// The last opcode

// Table describing the Tcl bytecode instructions: their name (for displaying
// code), total number of code bytes required (including operand bytes), and a
// description of the type of each operand. These operand types include signed
// and unsigned integers of length one and four bytes. The unsigned integers
// are used for indexes or for, e.g., the count of objects to push in a "push"
// instruction.

type InstOperandType = uint32 /* tclCompile.h:861:3 */

type InstructionDesc1 = struct {
	Fname        uintptr
	FnumBytes    int32
	FstackEffect int32
	FnumOperands int32
	FopTypes     [2]InstOperandType
	F__ccgo_pad1 [4]byte
} /* tclCompile.h:863:9 */

type InstructionDesc = InstructionDesc1 /* tclCompile.h:874:3 */

// Constants used by INST_STRING_CLASS to indicate character classes. These
// correspond closely by name with what [string is] can support, but there is
// no requirement to keep the values the same.

type InstStringClassType = uint32 /* tclCompile.h:902:3 */

type StringClassDesc1 = struct {
	Fname       uintptr
	Fcomparator uintptr
} /* tclCompile.h:904:9 */

type StringClassDesc = StringClassDesc1 /* tclCompile.h:908:3 */

// Compilation of some Tcl constructs such as if commands and the logical or
// (||) and logical and (&&) operators in expressions requires the generation
// of forward jumps. Since the PC target of these jumps isn't known when the
// jumps are emitted, we record the offset of each jump in an array of
// JumpFixup structures. There is one array for each sequence of jumps to one
// target PC. When we learn the target PC, we update the jumps with the
// correct distance. Also, if the distance is too great (> 127 bytes), we
// replace the single-byte jump with a four byte jump instruction, move the
// instructions after the jump down, and update the code offsets for any
// commands between the jump and the target.

type TclJumpType = uint32 /* tclCompile.h:929:3 */

type JumpFixup1 = struct {
	FjumpType    TclJumpType
	FcodeOffset  uint32
	FcmdIndex    int32
	FexceptIndex int32
} /* tclCompile.h:931:9 */

type JumpFixup = JumpFixup1 /* tclCompile.h:946:3 */

type JumpFixupArray1 = struct {
	Ffixup            uintptr
	Fnext             int32
	Fend              int32
	FmallocedArray    int32
	FstaticFixupSpace [10]JumpFixup
	F__ccgo_pad1      [4]byte
} /* tclCompile.h:950:9 */

type JumpFixupArray = JumpFixupArray1 /* tclCompile.h:958:3 */

// The structure describing one variable list of a foreach command. Note that
// only foreach commands inside procedure bodies are compiled inline so a
// ForeachVarList structure always describes local variables. Furthermore,
// only scalar variables are supported for inline-compiled foreach loops.

type ForeachVarList1 = struct {
	F__ccgo_pad1 [0]uint32
	FnumVars     int32
} /* tclCompile.h:967:9 */

// The structure describing one variable list of a foreach command. Note that
// only foreach commands inside procedure bodies are compiled inline so a
// ForeachVarList structure always describes local variables. Furthermore,
// only scalar variables are supported for inline-compiled foreach loops.

type ForeachVarList = ForeachVarList1 /* tclCompile.h:976:3 */

// Structure used to hold information about a foreach command that is needed
// during program execution. These structures are stored in CompileEnv and
// ByteCode structures as auxiliary data.

type ForeachInfo1 = struct {
	F__ccgo_pad1    [0]uint64
	FnumLists       int32
	FfirstValueTemp int32
	FloopCtTemp     int32
	F__ccgo_pad2    [4]byte
} /* tclCompile.h:984:9 */

// Structure used to hold information about a foreach command that is needed
// during program execution. These structures are stored in CompileEnv and
// ByteCode structures as auxiliary data.

type ForeachInfo = ForeachInfo1 /* tclCompile.h:998:3 */

// Structure used to hold information about a switch command that is needed
// during program execution. These structures are stored in CompileEnv and
// ByteCode structures as auxiliary data.

type JumptableInfo1 = struct{ FhashTable Tcl_HashTable } /* tclCompile.h:1006:9 */

// Structure used to hold information about a switch command that is needed
// during program execution. These structures are stored in CompileEnv and
// ByteCode structures as auxiliary data.

type JumptableInfo = JumptableInfo1 /* tclCompile.h:1009:3 */

// Structure used to hold information about a [dict update] command that is
// needed during program execution. These structures are stored in CompileEnv
// and ByteCode structures as auxiliary data.

type DictUpdateInfo = struct {
	F__ccgo_pad1 [0]uint32
	Flength      int32
} /* tclCompile.h:1030:3 */

// ClientData type used by the math operator commands.

type TclOpCmdClientData = struct {
	Fop          uintptr
	Fexpected    uintptr
	Fi           struct{ FnumArgs int32 }
	F__ccgo_pad1 [4]byte
} /* tclCompile.h:1043:3 */

func sTclPreserveByteCode(tls *libc.TLS, codePtr uintptr) { /* tclCompile.h:1166:1: */
	(*ByteCode)(unsafe.Pointer(codePtr)).FrefCount++
}

func sTclReleaseByteCode(tls *libc.TLS, codePtr uintptr) { /* tclCompile.h:1173:1: */
	if libc.PostDecInt32(&(*ByteCode)(unsafe.Pointer(codePtr)).FrefCount, 1) > 1 {
		return
	}
	// Just dropped to refcount==0.  Clean up.
	XTclCleanupByteCode(tls, codePtr)
}

// These are opaque types.

type Tcl_Class = uintptr         /* tclOO.h:52:27 */
type Tcl_Method = uintptr        /* tclOO.h:53:28 */
type Tcl_Object = uintptr        /* tclOO.h:54:28 */
type Tcl_ObjectContext = uintptr /* tclOO.h:55:35 */

// The type of a method implementation. This describes how to call the method
// implementation, how to delete it (when the object or class is deleted) and
// how to create a clone of it (when the object or class is copied).

type Tcl_MethodType = struct {
	Fversion     int32
	F__ccgo_pad1 [4]byte
	Fname        uintptr
	FcallProc    uintptr
	FdeleteProc  uintptr
	FcloneProc   uintptr
} /* tclOO.h:93:3 */

// The correct value for the version field of the Tcl_MethodType structure.
// This allows new versions of the structure to be introduced without breaking
// binary compatability.

// The type of some object (or class) metadata. This describes how to delete
// the metadata (when the object or class is deleted) and how to create a
// clone of it (when the object or class is copied).

type Tcl_ObjectMetadataType = struct {
	Fversion     int32
	F__ccgo_pad1 [4]byte
	Fname        uintptr
	FdeleteProc  uintptr
	FcloneProc   uintptr
} /* tclOO.h:120:3 */

type TclOOIntStubs1 = struct {
	Fmagic                         int32
	F__ccgo_pad1                   [4]byte
	Fhooks                         uintptr
	FtclOOGetDefineCmdContext      uintptr
	FtclOOMakeProcInstanceMethod   uintptr
	FtclOOMakeProcMethod           uintptr
	FtclOONewProcInstanceMethod    uintptr
	FtclOONewProcMethod            uintptr
	FtclOOObjectCmdCore            uintptr
	FtclOOIsReachable              uintptr
	FtclOONewForwardMethod         uintptr
	FtclOONewForwardInstanceMethod uintptr
	FtclOONewProcInstanceMethodEx  uintptr
	FtclOONewProcMethodEx          uintptr
	FtclOOInvokeObject             uintptr
	FtclOOObjectSetFilters         uintptr
	FtclOOClassSetFilters          uintptr
	FtclOOObjectSetMixins          uintptr
	FtclOOClassSetMixins           uintptr
} /* tclOODecls.h:125:11 */

type TclOOStubHooks = struct{ FtclOOIntStubs uintptr } /* tclOODecls.h:126:3 */

type TclOOStubs1 = struct {
	Fmagic                         int32
	F__ccgo_pad1                   [4]byte
	Fhooks                         uintptr
	Ftcl_CopyObjectInstance        uintptr
	Ftcl_GetClassAsObject          uintptr
	Ftcl_GetObjectAsClass          uintptr
	Ftcl_GetObjectCommand          uintptr
	Ftcl_GetObjectFromObj          uintptr
	Ftcl_GetObjectNamespace        uintptr
	Ftcl_MethodDeclarerClass       uintptr
	Ftcl_MethodDeclarerObject      uintptr
	Ftcl_MethodIsPublic            uintptr
	Ftcl_MethodIsType              uintptr
	Ftcl_MethodName                uintptr
	Ftcl_NewInstanceMethod         uintptr
	Ftcl_NewMethod                 uintptr
	Ftcl_NewObjectInstance         uintptr
	Ftcl_ObjectDeleted             uintptr
	Ftcl_ObjectContextIsFiltering  uintptr
	Ftcl_ObjectContextMethod       uintptr
	Ftcl_ObjectContextObject       uintptr
	Ftcl_ObjectContextSkippedArgs  uintptr
	Ftcl_ClassGetMetadata          uintptr
	Ftcl_ClassSetMetadata          uintptr
	Ftcl_ObjectGetMetadata         uintptr
	Ftcl_ObjectSetMetadata         uintptr
	Ftcl_ObjectContextInvokeNext   uintptr
	Ftcl_ObjectGetMethodNameMapper uintptr
	Ftcl_ObjectSetMethodNameMapper uintptr
	Ftcl_ClassSetConstructor       uintptr
	Ftcl_ClassSetDestructor        uintptr
	Ftcl_GetObjectName             uintptr
	Freserved29                    uintptr
	Freserved30                    uintptr
	FtclOOUnusedStubEntry          uintptr
} /* tclOODecls.h:128:9 */

type TclOOStubs = TclOOStubs1 /* tclOODecls.h:164:3 */

// !END!: Do not edit above this line.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Hack to make things work with Objective C. Note that ObjC isn't really
// supported, but we don't want to to be actively hostile to it. [Bug 2163447]

// Forward declarations.

type CallChain1 = struct {
	FobjectCreationEpoch int32
	FobjectEpoch         int32
	Fepoch               int32
	Fflags               int32
	FrefCount            int32
	FnumChain            int32
	Fchain               uintptr
	FstaticChain         [4]struct {
		FmPtr           uintptr
		FisFilter       int32
		F__ccgo_pad1    [4]byte
		FfilterDeclarer uintptr
	}
} /* tclOOInt.h:33:1 */

type Class1 = struct {
	FthisPtr      uintptr
	Fflags        int32
	F__ccgo_pad1  [4]byte
	Fsuperclasses struct {
		Fnum         int32
		F__ccgo_pad1 [4]byte
		Flist        uintptr
	}
	Fsubclasses struct {
		Fnum  int32
		Fsize int32
		Flist uintptr
	}
	Finstances struct {
		Fnum  int32
		Fsize int32
		Flist uintptr
	}
	Ffilters struct {
		Fnum         int32
		F__ccgo_pad1 [4]byte
		Flist        uintptr
	}
	Fmixins struct {
		Fnum         int32
		F__ccgo_pad1 [4]byte
		Flist        uintptr
	}
	FmixinSubs struct {
		Fnum  int32
		Fsize int32
		Flist uintptr
	}
	FclassMethods        Tcl_HashTable
	FconstructorPtr      uintptr
	FdestructorPtr       uintptr
	FmetadataPtr         uintptr
	FconstructorChainPtr uintptr
	FdestructorChainPtr  uintptr
	FclassChainCache     uintptr
	Fvariables           struct {
		Fnum         int32
		F__ccgo_pad1 [4]byte
		Flist        uintptr
	}
} /* tclOOInt.h:33:1 */

type Foundation1 = struct {
	Finterp               uintptr
	FobjectCls            uintptr
	FclassCls             uintptr
	FooNs                 uintptr
	FdefineNs             uintptr
	FobjdefNs             uintptr
	FhelpersNs            uintptr
	Fepoch                int32
	F__ccgo_pad1          [4]byte
	FtsdPtr               uintptr
	FunknownMethodNameObj uintptr
	FconstructorName      uintptr
	FdestructorName       uintptr
	FclonedName           uintptr
	FdefineName           uintptr
} /* tclOOInt.h:33:1 */

type Object1 = struct {
	FfPtr         uintptr
	FnamespacePtr uintptr
	Fcommand      Tcl_Command
	FmyCommand    Tcl_Command
	FselfCls      uintptr
	FmethodsPtr   uintptr
	Fmixins       struct {
		Fnum         int32
		F__ccgo_pad1 [4]byte
		Flist        uintptr
	}
	Ffilters struct {
		Fnum         int32
		F__ccgo_pad1 [4]byte
		Flist        uintptr
	}
	FclassPtr          uintptr
	FrefCount          int32
	Fflags             int32
	FcreationEpoch     int32
	Fepoch             int32
	FmetadataPtr       uintptr
	FcachedNameObj     uintptr
	FchainCache        uintptr
	FmapMethodNameProc uintptr
	Fvariables         struct {
		Fnum         int32
		F__ccgo_pad1 [4]byte
		Flist        uintptr
	}
} /* tclOOInt.h:33:1 */

// The data that needs to be stored per method. This record is used to collect
// information about all sorts of methods, including forwards, constructors
// and destructors.

type Method1 = struct {
	FtypePtr            uintptr
	FrefCount           int32
	F__ccgo_pad1        [4]byte
	FclientData         ClientData
	FnamePtr            uintptr
	FdeclaringObjectPtr uintptr
	FdeclaringClassPtr  uintptr
	Fflags              int32
	F__ccgo_pad2        [4]byte
} /* tclOOInt.h:33:1 */

// The data that needs to be stored per method. This record is used to collect
// information about all sorts of methods, including forwards, constructors
// and destructors.

type Method = Method1 /* tclOOInt.h:61:3 */

// Procedure-like methods have the following extra information.

type ProcedureMethod1 = struct {
	Fversion              int32
	F__ccgo_pad1          [4]byte
	FprocPtr              uintptr
	Fflags                int32
	FrefCount             int32
	FclientData           ClientData
	FdeleteClientdataProc uintptr
	FcloneClientdataProc  uintptr
	FerrProc              uintptr
	FpreCallProc          uintptr
	FpostCallProc         uintptr
	FgfivProc             uintptr
} /* tclOOInt.h:79:9 */

// Procedure-like methods have the following extra information.

type ProcedureMethod = ProcedureMethod1 /* tclOOInt.h:100:3 */

// Flags for use in a ProcedureMethod.
//
// When the USE_DECLARER_NS flag is set, the method will use the namespace of
// the object or class that declared it (or the clone of it, if it was from
// such that the implementation of the method came to the particular use)
// instead of the namespace of the object on which the method was invoked.
// This flag must be distinct from all others that are associated with
// methods.

// Forwarded methods have the following extra information.

type ForwardMethod1 = struct{ FprefixObj uintptr } /* tclOOInt.h:121:9 */

// Flags for use in a ProcedureMethod.
//
// When the USE_DECLARER_NS flag is set, the method will use the namespace of
// the object or class that declared it (or the clone of it, if it was from
// such that the implementation of the method came to the particular use)
// instead of the namespace of the object on which the method was invoked.
// This flag must be distinct from all others that are associated with
// methods.

// Forwarded methods have the following extra information.

type ForwardMethod = ForwardMethod1 /* tclOOInt.h:125:3 */

// Helper definitions that declare a "list" array. The two varieties are
// either optimized for simplicity (in the case that the whole array is
// typically assigned at once) or efficiency (in the case that the array is
// expected to be expanded over time). These lists are designed to be iterated
// over with the help of the FOREACH macro (see later in this file).
//
// The "num" field always counts the number of listType_t elements used in the
// "list" field. When a "size" field exists, it describes how many elements
// are present in the list; when absent, exactly "num" elements are present.

// Now, the definition of what an object actually is.

type Object = Object1 /* tclOOInt.h:190:3 */

// And the definition of a class. Note that every class also has an associated
// object, through which it is manipulated.

type Class = Class1 /* tclOOInt.h:270:3 */

// The foundation of the object system within an interpreter contains
// references to the key classes and namespaces, together with a few other
// useful bits and pieces. Probably ought to eventually go in the Interp
// structure itself.

type ThreadLocalData1 = struct{ FnsCount int32 } /* tclOOInt.h:33:1 */

// The foundation of the object system within an interpreter contains
// references to the key classes and namespaces, together with a few other
// useful bits and pieces. Probably ought to eventually go in the Interp
// structure itself.

type ThreadLocalData = ThreadLocalData1 /* tclOOInt.h:286:3 */

type Foundation = Foundation1 /* tclOOInt.h:318:3 */

// A call context structure is built when a method is called. It contains the
// chain of method implementations that are to be invoked by a particular
// call, and the process of calling walks the chain, with the [next] command
// proceeding to the next entry in the chain.

type MInvoke = struct {
	FmPtr           uintptr
	FisFilter       int32
	F__ccgo_pad1    [4]byte
	FfilterDeclarer uintptr
} /* tclOOInt.h:33:1 */

type CallChain = CallChain1 /* tclOOInt.h:352:3 */

type CallContext1 = struct {
	FoPtr    uintptr
	Findex   int32
	Fskip    int32
	FcallPtr uintptr
} /* tclOOInt.h:354:9 */

type CallContext = CallContext1 /* tclOOInt.h:363:3 */

// Bits for the 'flags' field of the call chain.

// Structure containing definition information about basic class methods.

type DeclaredClassMethod = struct {
	Fname        uintptr
	FisPublic    int32
	F__ccgo_pad1 [4]byte
	Fdefinition  Tcl_MethodType
} /* tclOOInt.h:384:3 */

type TclOOIntStubs = TclOOIntStubs1 /* tclOOIntDecls.h:115:3 */

// !END!: Do not edit above this line.

// Alternatives to Tcl_Preserve/Tcl_EventuallyFree/Tcl_Release.

// A convenience macro for iterating through the lists used in the internal
// memory management of objects.
// REQUIRES DECLARATION: int i;

// Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS
// sets up the declarations needed for the main macro, FOREACH_HASH, which
// does the actual iteration. FOREACH_HASH_VALUE is a restricted version that
// only iterates over values.

// Convenience macro for duplicating a list. Needs no external declaration,
// but all arguments are used multiple times and so must have no side effects.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Structure that represents a range of instructions in the bytecode.

type CodeRange1 = struct {
	FstartOffset int32
	FendOffset   int32
} /* tclAssembly.c:40:9 */

// !END!: Do not edit above this line.

// Alternatives to Tcl_Preserve/Tcl_EventuallyFree/Tcl_Release.

// A convenience macro for iterating through the lists used in the internal
// memory management of objects.
// REQUIRES DECLARATION: int i;

// Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS
// sets up the declarations needed for the main macro, FOREACH_HASH, which
// does the actual iteration. FOREACH_HASH_VALUE is a restricted version that
// only iterates over values.

// Convenience macro for duplicating a list. Needs no external declaration,
// but all arguments are used multiple times and so must have no side effects.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Structure that represents a range of instructions in the bytecode.

type CodeRange = CodeRange1 /* tclAssembly.c:43:3 */

// State identified for a basic block's catch context.

type BasicBlockCatchState = uint32 /* tclAssembly.c:55:3 */

// Structure that defines a basic block - a linear sequence of bytecode
// instructions with no jumps in or out (including not changing the
// state of any exception range).

type BasicBlock1 = struct {
	ForiginalStartOffset   int32
	FstartOffset           int32
	FstartLine             int32
	FjumpOffset            int32
	FjumpLine              int32
	F__ccgo_pad1           [4]byte
	FprevPtr               uintptr
	Fpredecessor           uintptr
	Fsuccessor1            uintptr
	FjumpTarget            uintptr
	FinitialStackDepth     int32
	FminStackDepth         int32
	FmaxStackDepth         int32
	FfinalStackDepth       int32
	FcatchState            uint32
	FcatchDepth            int32
	FenclosingCatch        uintptr
	FforeignExceptionBase  int32
	FforeignExceptionCount int32
	FforeignExceptions     uintptr
	FjtPtr                 uintptr
	Fflags                 int32
	F__ccgo_pad2           [4]byte
} /* tclAssembly.c:63:9 */

// Structure that defines a basic block - a linear sequence of bytecode
// instructions with no jumps in or out (including not changing the
// state of any exception range).

type BasicBlock = BasicBlock1 /* tclAssembly.c:106:3 */

// Source instruction type recognized by the assembler.

type TalInstType = uint32 /* tclAssembly.c:191:3 */

// Description of an instruction recognized by the assembler.

type TalInstDesc1 = struct {
	Fname             uintptr
	FinstType         TalInstType
	FtclInstCode      int32
	FoperandsConsumed int32
	FoperandsProduced int32
} /* tclAssembly.c:197:9 */

// Description of an instruction recognized by the assembler.

type TalInstDesc = TalInstDesc1 /* tclAssembly.c:209:3 */

// Structure that holds the state of the assembler while generating code.

type AssemblyEnv1 = struct {
	FenvPtr        uintptr
	FparsePtr      uintptr
	FlabelHash     Tcl_HashTable
	FcmdLine       int32
	F__ccgo_pad1   [4]byte
	FclNext        uintptr
	Fhead_bb       uintptr
	Fcurr_bb       uintptr
	FmaxDepth      int32
	FcurCatchDepth int32
	FmaxCatchDepth int32
	Fflags         int32
} /* tclAssembly.c:215:9 */

// Structure that holds the state of the assembler while generating code.

type AssemblyEnv = AssemblyEnv1 /* tclAssembly.c:232:3 */

// Tcl_ObjType that describes bytecode emitted by the assembler.

var assembleCodeType = Tcl_ObjType{
	Fname:           ts + 2644,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // setFromAnyProc
} /* tclAssembly.c:320:26 */

// Source instructions recognized in the Tcl Assembly Language (TAL)

var sTalInstructionTable = [148]TalInstDesc{
	// PUSH must be first, see the code near the end of TclAssembleCode
	{Fname: ts + 2657, FinstType: ASSEM_PUSH, FtclInstCode: int32(INST_PUSH1)<<8 |
		INST_PUSH4, FoperandsProduced: 1},

	{Fname: ts + 2662, FtclInstCode: INST_ADD, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2666, FinstType: ASSEM_LVT, FtclInstCode: int32(INST_APPEND_SCALAR1)<<8 |
		INST_APPEND_SCALAR4, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 2673, FinstType: ASSEM_LVT, FtclInstCode: int32(INST_APPEND_ARRAY1)<<8 |
		INST_APPEND_ARRAY4, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2685, FtclInstCode: INST_APPEND_ARRAY_STK, FoperandsConsumed: 3, FoperandsProduced: 1},
	{Fname: ts + 2700, FtclInstCode: INST_APPEND_STK, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2710, FinstType: ASSEM_LVT4, FtclInstCode: INST_ARRAY_EXISTS_IMM, FoperandsProduced: 1},
	{Fname: ts + 2725, FtclInstCode: INST_ARRAY_EXISTS_STK, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 2740, FinstType: ASSEM_LVT4, FtclInstCode: INST_ARRAY_MAKE_IMM},
	{Fname: ts + 2753, FtclInstCode: INST_ARRAY_MAKE_STK, FoperandsConsumed: 1},
	{Fname: ts + 2766, FinstType: ASSEM_BEGIN_CATCH,
		FtclInstCode: INST_BEGIN_CATCH4},
	{Fname: ts + 2777, FtclInstCode: INST_BITAND, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2784, FtclInstCode: INST_BITNOT, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 2791, FtclInstCode: INST_BITOR, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2797, FtclInstCode: INST_BITXOR, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2804, FinstType: ASSEM_CLOCK_READ, FtclInstCode: INST_CLOCK_READ, FoperandsProduced: 1},
	{Fname: ts + 2814, FinstType: ASSEM_CONCAT1, FtclInstCode: INST_STR_CONCAT1, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 2821, FinstType: ASSEM_LIST, FtclInstCode: INST_CONCAT_STK, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 2831, FtclInstCode: INST_COROUTINE_NAME, FoperandsProduced: 1},
	{Fname: ts + 2840, FtclInstCode: INST_NS_CURRENT, FoperandsProduced: 1},
	{Fname: ts + 2857, FinstType: ASSEM_LVT4, FtclInstCode: INST_DICT_APPEND, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2868, FinstType: ASSEM_DICT_GET, FtclInstCode: INST_DICT_EXISTS, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 2879, FtclInstCode: INST_DICT_EXPAND, FoperandsConsumed: 3, FoperandsProduced: 1},
	{Fname: ts + 2890, FinstType: ASSEM_DICT_GET, FtclInstCode: INST_DICT_GET, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 2898, FinstType: ASSEM_SINT4_LVT4,
		FtclInstCode: INST_DICT_INCR_IMM, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 2910, FinstType: ASSEM_LVT4, FtclInstCode: INST_DICT_LAPPEND, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2922, FtclInstCode: INST_DICT_RECOMBINE_STK, FoperandsConsumed: 3},
	{Fname: ts + 2939, FinstType: ASSEM_LVT4, FtclInstCode: INST_DICT_RECOMBINE_IMM, FoperandsConsumed: 2},
	{Fname: ts + 2956, FinstType: ASSEM_DICT_SET, FtclInstCode: INST_DICT_SET, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 2964, FinstType: ASSEM_DICT_UNSET,
		FtclInstCode: INST_DICT_UNSET, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 2974, FtclInstCode: INST_DIV, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2978, FtclInstCode: INST_DUP, FoperandsConsumed: 1, FoperandsProduced: 2},
	{Fname: ts + 2982, FinstType: ASSEM_END_CATCH, FtclInstCode: INST_END_CATCH},
	{Fname: ts + 2991, FtclInstCode: INST_EQ, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 2994, FinstType: ASSEM_EVAL, FtclInstCode: INST_EVAL_STK, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 2999, FtclInstCode: INST_EVAL_STK, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3007, FinstType: ASSEM_LVT4, FtclInstCode: INST_EXIST_SCALAR, FoperandsProduced: 1},
	{Fname: ts + 3013, FinstType: ASSEM_LVT4, FtclInstCode: INST_EXIST_ARRAY, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3024, FtclInstCode: INST_EXIST_ARRAY_STK, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3038, FtclInstCode: INST_EXIST_STK, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3047, FtclInstCode: INST_EXPON, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3053, FinstType: ASSEM_EVAL, FtclInstCode: INST_EXPR_STK, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3058, FtclInstCode: INST_EXPR_STK, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3066, FtclInstCode: INST_GE, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3069, FtclInstCode: INST_GT, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3072, FinstType: ASSEM_LVT1, FtclInstCode: INST_INCR_SCALAR1, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3077, FinstType: ASSEM_LVT1, FtclInstCode: INST_INCR_ARRAY1, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3087, FinstType: ASSEM_LVT1_SINT1,
		FtclInstCode: INST_INCR_ARRAY1_IMM, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3100, FtclInstCode: INST_INCR_ARRAY_STK, FoperandsConsumed: 3, FoperandsProduced: 1},
	{Fname: ts + 3113, FinstType: ASSEM_SINT1, FtclInstCode: INST_INCR_ARRAY_STK_IMM, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3129, FinstType: ASSEM_LVT1_SINT1,
		FtclInstCode: INST_INCR_SCALAR1_IMM, FoperandsProduced: 1},
	{Fname: ts + 3137, FtclInstCode: INST_INCR_STK, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3145, FinstType: ASSEM_SINT1, FtclInstCode: INST_INCR_STK_IMM, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3156, FtclInstCode: INST_INFO_LEVEL_ARGS, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3170, FtclInstCode: INST_INFO_LEVEL_NUM, FoperandsProduced: 1},
	{Fname: ts + 3186, FinstType: ASSEM_INVOKE, FtclInstCode: int32(INST_INVOKE_STK1)<<8 |
		INST_INVOKE_STK4, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 3196, FinstType: ASSEM_JUMP, FtclInstCode: INST_JUMP1},
	{Fname: ts + 3201, FinstType: ASSEM_JUMP4, FtclInstCode: INST_JUMP4},
	{Fname: ts + 3207, FinstType: ASSEM_JUMP, FtclInstCode: INST_JUMP_FALSE1, FoperandsConsumed: 1},
	{Fname: ts + 3217, FinstType: ASSEM_JUMP4, FtclInstCode: INST_JUMP_FALSE4, FoperandsConsumed: 1},
	{Fname: ts + 3228, FinstType: ASSEM_JUMPTABLE, FtclInstCode: INST_JUMP_TABLE, FoperandsConsumed: 1},
	{Fname: ts + 3238, FinstType: ASSEM_JUMP, FtclInstCode: INST_JUMP_TRUE1, FoperandsConsumed: 1},
	{Fname: ts + 3247, FinstType: ASSEM_JUMP4, FtclInstCode: INST_JUMP_TRUE4, FoperandsConsumed: 1},
	{Fname: ts + 3257, FinstType: ASSEM_LABEL},
	{Fname: ts + 3263, FtclInstCode: INST_LAND, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3268, FinstType: ASSEM_LVT, FtclInstCode: int32(INST_LAPPEND_SCALAR1)<<8 |
		INST_LAPPEND_SCALAR4,
		FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3276, FinstType: ASSEM_LVT, FtclInstCode: int32(INST_LAPPEND_ARRAY1)<<8 |
		INST_LAPPEND_ARRAY4, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3289, FtclInstCode: INST_LAPPEND_ARRAY_STK, FoperandsConsumed: 3, FoperandsProduced: 1},
	{Fname: ts + 3305, FinstType: ASSEM_LVT4, FtclInstCode: INST_LAPPEND_LIST, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3317, FinstType: ASSEM_LVT4, FtclInstCode: INST_LAPPEND_LIST_ARRAY, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3334, FtclInstCode: INST_LAPPEND_LIST_ARRAY_STK, FoperandsConsumed: 3, FoperandsProduced: 1},
	{Fname: ts + 3354, FtclInstCode: INST_LAPPEND_LIST_STK, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3369, FtclInstCode: INST_LAPPEND_STK, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3380, FtclInstCode: INST_LE, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3383, FinstType: ASSEM_LINDEX_MULTI,
		FtclInstCode: INST_LIST_INDEX_MULTI, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 3395, FinstType: ASSEM_LIST, FtclInstCode: INST_LIST, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 3400, FtclInstCode: INST_LIST_CONCAT, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3411, FtclInstCode: INST_LIST_IN, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3418, FtclInstCode: INST_LIST_INDEX, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3428, FinstType: ASSEM_INDEX, FtclInstCode: INST_LIST_INDEX_IMM, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3441, FtclInstCode: INST_LIST_LENGTH, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3452, FtclInstCode: INST_LIST_NOT_IN, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3462, FinstType: ASSEM_LVT, FtclInstCode: int32(INST_LOAD_SCALAR1)<<8 |
		INST_LOAD_SCALAR4, FoperandsProduced: 1},
	{Fname: ts + 3467, FinstType: ASSEM_LVT, FtclInstCode: int32(INST_LOAD_ARRAY1)<<8 |
		INST_LOAD_ARRAY4, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3477, FtclInstCode: INST_LOAD_ARRAY_STK, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3490, FtclInstCode: INST_LOAD_STK, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3498, FtclInstCode: INST_LOR, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3502, FinstType: ASSEM_LSET_FLAT, FtclInstCode: INST_LSET_FLAT, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 3511, FtclInstCode: INST_LSET_LIST, FoperandsConsumed: 3, FoperandsProduced: 1},
	{Fname: ts + 3520, FtclInstCode: INST_LSHIFT, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3527, FtclInstCode: INST_LT, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3530, FtclInstCode: INST_MOD, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3534, FtclInstCode: INST_MULT, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3539, FtclInstCode: INST_NEQ, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3543, FtclInstCode: INST_NOP},
	{Fname: ts + 3547, FtclInstCode: INST_LNOT, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3551, FinstType: ASSEM_LVT4, FtclInstCode: INST_NSUPVAR, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3559, FtclInstCode: INST_NUM_TYPE, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3571, FtclInstCode: INST_ORIGIN_COMMAND, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3581, FinstType: ASSEM_OVER, FtclInstCode: INST_OVER, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: -1 - 1},
	{Fname: ts + 3586, FtclInstCode: INST_POP, FoperandsConsumed: 1},
	{Fname: ts + 3590, FtclInstCode: INST_PUSH_RETURN_CODE, FoperandsProduced: 1},
	{Fname: ts + 3605, FtclInstCode: INST_PUSH_RETURN_OPTIONS, FoperandsProduced: 1},
	{Fname: ts + 3620, FtclInstCode: INST_PUSH_RESULT, FoperandsProduced: 1},
	{Fname: ts + 3631, FinstType: ASSEM_REGEXP, FtclInstCode: INST_REGEXP, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3638, FtclInstCode: INST_RESOLVE_COMMAND, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3649, FinstType: ASSEM_REVERSE, FtclInstCode: INST_REVERSE, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: -1 - 0},
	{Fname: ts + 3657, FtclInstCode: INST_RSHIFT, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3664, FinstType: ASSEM_LVT, FtclInstCode: int32(INST_STORE_SCALAR1)<<8 |
		INST_STORE_SCALAR4, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3670, FinstType: ASSEM_LVT, FtclInstCode: int32(INST_STORE_ARRAY1)<<8 |
		INST_STORE_ARRAY4, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3681, FtclInstCode: INST_STORE_ARRAY_STK, FoperandsConsumed: 3, FoperandsProduced: 1},
	{Fname: ts + 3695, FtclInstCode: INST_STORE_STK, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3704, FtclInstCode: INST_STR_LOWER, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3717, FtclInstCode: INST_STR_TITLE, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3730, FtclInstCode: INST_STR_UPPER, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3743, FtclInstCode: INST_STR_CMP, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3750, FinstType: ASSEM_CONCAT1, FtclInstCode: INST_STR_CONCAT1, FoperandsConsumed: -0x7fffffff - 1, FoperandsProduced: 1},
	{Fname: ts + 3757, FtclInstCode: INST_STR_EQ, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3763, FtclInstCode: INST_STR_FIND, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3771, FtclInstCode: INST_STR_INDEX, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3780, FtclInstCode: INST_STR_LEN, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3787, FtclInstCode: INST_STR_MAP, FoperandsConsumed: 3, FoperandsProduced: 1},
	{Fname: ts + 3794, FinstType: ASSEM_BOOL, FtclInstCode: INST_STR_MATCH, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3803, FtclInstCode: INST_STR_NEQ, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3810, FtclInstCode: INST_STR_RANGE, FoperandsConsumed: 3, FoperandsProduced: 1},
	{Fname: ts + 3819, FtclInstCode: INST_STR_REPLACE, FoperandsConsumed: 4, FoperandsProduced: 1},
	{Fname: ts + 3830, FtclInstCode: INST_STR_FIND_LAST, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3839, FtclInstCode: INST_STR_TRIM, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3847, FtclInstCode: INST_STR_TRIM_LEFT, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3859, FtclInstCode: INST_STR_TRIM_RIGHT, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3872, FtclInstCode: INST_SUB, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 3876, FtclInstCode: INST_TCLOO_CLASS, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3887, FtclInstCode: INST_TCLOO_IS_OBJECT, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3901, FtclInstCode: INST_TCLOO_NS, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3916, FtclInstCode: INST_TCLOO_SELF, FoperandsProduced: 1},
	{Fname: ts + 3926, FtclInstCode: INST_TRY_CVT_TO_BOOLEAN, FoperandsConsumed: 1, FoperandsProduced: 2},
	{Fname: ts + 3942, FtclInstCode: INST_TRY_CVT_TO_NUMERIC, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3958, FtclInstCode: INST_UMINUS, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 3965, FinstType: ASSEM_BOOL_LVT4, FtclInstCode: INST_UNSET_SCALAR},
	{Fname: ts + 3971, FinstType: ASSEM_BOOL_LVT4, FtclInstCode: INST_UNSET_ARRAY, FoperandsConsumed: 1},
	{Fname: ts + 3982, FinstType: ASSEM_BOOL, FtclInstCode: INST_UNSET_ARRAY_STK, FoperandsConsumed: 2},
	{Fname: ts + 3996, FinstType: ASSEM_BOOL, FtclInstCode: INST_UNSET_STK, FoperandsConsumed: 1},
	{Fname: ts + 4005, FtclInstCode: INST_UPLUS, FoperandsConsumed: 1, FoperandsProduced: 1},
	{Fname: ts + 4011, FinstType: ASSEM_LVT4, FtclInstCode: INST_UPVAR, FoperandsConsumed: 2, FoperandsProduced: 1},
	{Fname: ts + 4017, FinstType: ASSEM_LVT4, FtclInstCode: INST_VARIABLE, FoperandsConsumed: 1},
	{Fname: ts + 4026, FtclInstCode: INST_DICT_VERIFY, FoperandsConsumed: 1},
	{Fname: ts + 4037, FtclInstCode: INST_YIELD, FoperandsConsumed: 1, FoperandsProduced: 1},
	{},
} /* tclAssembly.c:332:26 */

// List of instructions that cannot throw an exception under any
// circumstances.  These instructions are the ones that are permissible after
// an exception is caught but before the corresponding exception range is
// popped from the stack.
// The instructions must be in ascending order by numeric operation code.

var sNonThrowingByteCodes = [32]uint8{
	uint8(INST_PUSH1), uint8(INST_PUSH4), uint8(INST_POP), uint8(INST_DUP), // 1-4
	uint8(INST_JUMP1), uint8(INST_JUMP4), // 34-35
	uint8(INST_END_CATCH), uint8(INST_PUSH_RESULT), uint8(INST_PUSH_RETURN_CODE), // 70-72
	uint8(INST_STR_EQ), uint8(INST_STR_NEQ), uint8(INST_STR_CMP), uint8(INST_STR_LEN), // 73-76
	uint8(INST_LIST),                                                            // 79
	uint8(INST_OVER),                                                            // 95
	uint8(INST_PUSH_RETURN_OPTIONS),                                             // 108
	uint8(INST_REVERSE),                                                         // 126
	uint8(INST_NOP),                                                             // 132
	uint8(INST_STR_MAP),                                                         // 143
	uint8(INST_STR_FIND),                                                        // 144
	uint8(INST_COROUTINE_NAME),                                                  // 149
	uint8(INST_NS_CURRENT),                                                      // 151
	uint8(INST_INFO_LEVEL_NUM),                                                  // 152
	uint8(INST_RESOLVE_COMMAND),                                                 // 154
	uint8(INST_STR_TRIM), uint8(INST_STR_TRIM_LEFT), uint8(INST_STR_TRIM_RIGHT), // 166-168
	uint8(INST_CONCAT_STK),                                              // 169
	uint8(INST_STR_UPPER), uint8(INST_STR_LOWER), uint8(INST_STR_TITLE), // 170-172
	uint8(INST_NUM_TYPE), // 180
} /* tclAssembly.c:511:28 */

// Helper macros.

//-----------------------------------------------------------------------------
//
// BBAdjustStackDepth --
//
//	When an opcode is emitted, adjusts the stack information in the basic
//	block to reflect the number of operands produced and consumed.
//
// Results:
//	None.
//
// Side effects:
//	Updates minimum, maximum and final stack requirements in the basic
//	block.
//
//-----------------------------------------------------------------------------

func sBBAdjustStackDepth(tls *libc.TLS, bbPtr uintptr, consumed int32, produced int32) { /* tclAssembly.c:564:1: */
	var depth int32 = (*BasicBlock)(unsafe.Pointer(bbPtr)).FfinalStackDepth

	depth = depth - consumed
	if depth < (*BasicBlock)(unsafe.Pointer(bbPtr)).FminStackDepth {
		(*BasicBlock)(unsafe.Pointer(bbPtr)).FminStackDepth = depth
	}
	depth = depth + produced
	if depth > (*BasicBlock)(unsafe.Pointer(bbPtr)).FmaxStackDepth {
		(*BasicBlock)(unsafe.Pointer(bbPtr)).FmaxStackDepth = depth
	}
	(*BasicBlock)(unsafe.Pointer(bbPtr)).FfinalStackDepth = depth
}

//-----------------------------------------------------------------------------
//
// BBUpdateStackReqs --
//
//	Updates the stack requirements of a basic block, given the opcode
//	being emitted and an operand count.
//
// Results:
//	None.
//
// Side effects:
//	Updates min, max and final stack requirements in the basic block.
//
// Notes:
//	This function must not be called for instructions such as REVERSE and
//	OVER that are variadic but do not consume all their operands. Instead,
//	BBAdjustStackDepth should be called directly.
//
//	count should be provided only for variadic operations. For operations
//	with known arity, count should be 0.
//
//-----------------------------------------------------------------------------

func sBBUpdateStackReqs(tls *libc.TLS, bbPtr uintptr, tblIdx int32, count int32) { /* tclAssembly.c:610:1: */
	var consumed int32 = sTalInstructionTable[tblIdx].FoperandsConsumed
	var produced int32 = sTalInstructionTable[tblIdx].FoperandsProduced

	if consumed == -0x7fffffff-1 {
		// The instruction is variadic; it consumes 'count' operands.

		consumed = count
	}
	if produced < 0 {
		// The instruction leaves some of its variadic operands on the stack,
		// with net stack effect of '-1-produced'

		produced = consumed - produced - 1
	}
	sBBAdjustStackDepth(tls, bbPtr, consumed, produced)
}

//-----------------------------------------------------------------------------
//
// BBEmitOpcode, BBEmitInstInt1, BBEmitInstInt4 --
//
//	Emit the opcode part of an instruction, or the entirety of an
//	instruction with a 1- or 4-byte operand, and adjust stack
//	requirements.
//
// Results:
//	None.
//
// Side effects:
//	Stores instruction and operand in the operand stream, and adjusts the
//	stack.
//
//-----------------------------------------------------------------------------

func sBBEmitOpcode(tls *libc.TLS, assemEnvPtr uintptr, tblIdx int32, count int32) { /* tclAssembly.c:657:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var bbPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb
	// Current basic block
	var op int32 = sTalInstructionTable[tblIdx].FtclInstCode & 0xFF

	// If this is the first instruction in a basic block, record its line
	// number.

	if int64((*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset) == (int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 {
		(*BasicBlock)(unsafe.Pointer(bbPtr)).FstartLine = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FcmdLine
	}

	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(op))
	}
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
		(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
			if op == INST_START_CMD {
				return 1
			}
			return 0
		}()
	}

	sBBUpdateStackReqs(tls, bbPtr, tblIdx, count)
}

func sBBEmitInstInt1(tls *libc.TLS, assemEnvPtr uintptr, tblIdx int32, opnd int32, count int32) { /* tclAssembly.c:683:1: */
	sBBEmitOpcode(tls, assemEnvPtr, tblIdx, count)
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FcodeNext, 1))) = uint8(uint32(opnd))
	}
}

func sBBEmitInstInt4(tls *libc.TLS, assemEnvPtr uintptr, tblIdx int32, opnd int32, count int32) { /* tclAssembly.c:694:1: */
	sBBEmitOpcode(tls, assemEnvPtr, tblIdx, count)
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FcodeNext, 1))) = uint8(uint32(opnd) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FcodeNext, 1))) = uint8(uint32(opnd) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FcodeNext, 1))) = uint8(uint32(opnd) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FcodeNext, 1))) = uint8(uint32(opnd))
	}
}

//-----------------------------------------------------------------------------
//
// BBEmitInst1or4 --
//
//	Emits a 1- or 4-byte operation according to the magnitude of the
//	operand.
//
//-----------------------------------------------------------------------------

func sBBEmitInst1or4(tls *libc.TLS, assemEnvPtr uintptr, tblIdx int32, param int32, count int32) { /* tclAssembly.c:716:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var bbPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb
	// Current basic block
	var op int32 = sTalInstructionTable[tblIdx].FtclInstCode

	if param <= 0xFF {
		op >>= 8
	} else {
		op = op & 0xFF
	}
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(op))
	}
	if param <= 0xFF {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(param))
		}
	} else {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(param) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(param) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(param) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(param))
		}
	}
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
		(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
			if op == INST_START_CMD {
				return 1
			}
			return 0
		}()
	}

	sBBUpdateStackReqs(tls, bbPtr, tblIdx, count)
}

//-----------------------------------------------------------------------------
//
// Tcl_AssembleObjCmd, TclNRAssembleObjCmd --
//
//	Direct evaluation path for tcl::unsupported::assemble
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Assembles the code in objv[1], and executes it, so side effects
//	include whatever the code does.
//
//-----------------------------------------------------------------------------

func XTcl_AssembleObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclAssembly.c:761:1: */
	// Boilerplate - make sure that there is an NRE trampoline on the C stack
	// because there needs to be one in place to execute bytecode.

	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRAssembleObjCmd})), dummy, objc, objv)
}

func XTclNRAssembleObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclAssembly.c:776:1: */
	var codePtr uintptr   // Pointer to the bytecode to execute
	var backtrace uintptr // Object where extra error information is
	// constructed.

	_ = dummy
	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4043)
		return TCL_ERROR
	}

	// Assemble the source to bytecode.

	codePtr = sCompileAssembleObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))

	// On failure, report error line.

	if codePtr == uintptr(0) {
		XTcl_AddErrorInfo(tls, interp, ts+4056)
		XTcl_AppendObjToErrorInfo(tls, interp, *(*uintptr)(unsafe.Pointer(objv)))
		XTcl_AddErrorInfo(tls, interp, ts+4064)
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				backtrace = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(backtrace)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(backtrace)).Fbytes = uintptr(0)
			*(*int32)(unsafe.Pointer(backtrace + 32)) = int32(XTcl_GetErrorLine(tls, interp))
			(*Tcl_Obj)(unsafe.Pointer(backtrace)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
			{
			}
		}
		XTcl_AppendObjToErrorInfo(tls, interp, backtrace)
		XTcl_AddErrorInfo(tls, interp, ts+4078)
		return TCL_ERROR
	}

	// Use NRE to evaluate the bytecode from the trampoline.

	return XTclNRExecuteByteCode(tls, interp, codePtr)
}

//-----------------------------------------------------------------------------
//
// CompileAssembleObj --
//
//	Sets up and assembles Tcl bytecode for the direct-execution path in
//	the Tcl bytecode assembler.
//
// Results:
//	Returns a pointer to the assembled code. Returns NULL if the assembly
//	fails for any reason, with an appropriate error message in the
//	interpreter.
//
//-----------------------------------------------------------------------------

func sCompileAssembleObj(tls *libc.TLS, interp uintptr, objPtr uintptr) uintptr { /* tclAssembly.c:835:17: */
	bp := tls.Alloc(3592)
	defer tls.Free(3592)

	var iPtr uintptr = interp
	// Internals of the interpreter
	// var compEnv CompileEnv at bp+8, 3584
	// Compilation environment structure
	var codePtr uintptr = uintptr(0)
	// Bytecode resulting from the assembly
	var namespacePtr uintptr // Namespace in which variable and command
	// names in the bytecode resolve
	var status int32   // Status return from Tcl_AssembleCode
	var source uintptr // String representation of the source code
	// var sourceLen int32 at bp, 4
	// Length of the source code in bytes

	// Get the expression ByteCode from the object. If it exists, make sure it
	// is valid in the current context.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&assembleCodeType)) {
		namespacePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr
		codePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		if *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle)) == iPtr &&
			(*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch == (*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch &&
			(*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr == namespacePtr &&
			(*ByteCode)(unsafe.Pointer(codePtr)).FnsEpoch == (*Namespace)(unsafe.Pointer(namespacePtr)).FresolverEpoch &&
			(*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr ==
				(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr {
			return codePtr
		}

		// Not valid, so free it and regenerate.

		sFreeAssembleCodeInternalRep(tls, objPtr)
	}

	// Set up the compilation environment, and assemble the code.

	source = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp)
	}()
	XTclInitCompileEnv(tls, interp, bp+8, source, *(*int32)(unsafe.Pointer(bp /* sourceLen */)), uintptr(0), 0)
	status = sTclAssembleCode(tls, bp+8, source, *(*int32)(unsafe.Pointer(bp /* sourceLen */)), TCL_EVAL_DIRECT)
	if status != TCL_OK {
		// Assembly failed. Clean up and report the error.
		XTclFreeCompileEnv(tls, bp+8)
		return uintptr(0)
	}

	// Add a "done" instruction as the last instruction and change the object
	// into a ByteCode object. Ownership of the literal objects and aux data
	// items is given to the ByteCode object.

	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext == (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeEnd {
			XTclExpandCodeArray(tls, bp+8)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(INST_DONE)
		if (*CompileEnv)(unsafe.Pointer(bp+8)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(bp + 8)).FatCmdStart = func() int32 {
				if INST_DONE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DONE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(bp+8)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(bp+8)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(bp + 8)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(bp + 8)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(bp + 8 + 48)) += _delta
				}
			}
		}
	}
	XTclInitByteCodeObj(tls, objPtr, bp+8)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&assembleCodeType))
	XTclFreeCompileEnv(tls, bp+8)

	// Record the local variable context to which the bytecode pertains

	codePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr != 0 {
		(*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr
		(*LocalCache)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr)).FrefCount++
	}

	// Report on what the assembler did.

	return codePtr
}

//-----------------------------------------------------------------------------
//
// TclCompileAssembleCmd --
//
//	Compilation procedure for the '::tcl::unsupported::assemble' command.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Puts the result of assembling the code into the bytecode stream in
//	'compileEnv'.
//
// This procedure makes sure that the command has a single arg, which is
// constant. If that condition is met, the procedure calls TclAssembleCode to
// produce bytecode for the given assembly code, and returns any error
// resulting from the assembly.
//
//-----------------------------------------------------------------------------

func XTclCompileAssembleCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclAssembly.c:948:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var tokenPtr uintptr // Token in the input script

	var numCommands int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands
	var offset int32 = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	var depth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
	_ = cmdPtr
	// Make sure that the command has a single arg that is a simple word.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
		return TCL_ERROR
	}

	// Compile the code and convert any error from the compilation into
	// bytecode reporting the error;

	if TCL_ERROR == sTclAssembleCode(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart,
		(*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, TCL_EVAL_DIRECT) {

		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+4080,
			libc.VaList(bp, (*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).Fsize, (*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).Fstart,
				XTcl_GetErrorLine(tls, interp))))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands = numCommands
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(offset)
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = depth
		XTclCompileSyntaxError(tls, interp, envPtr)
	}
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// TclAssembleCode --
//
//	Take a list of instructions in a Tcl_Obj, and assemble them to Tcl
//	bytecodes
//
// Results:
//	Returns TCL_OK on success, TCL_ERROR on failure.  If 'flags' includes
//	TCL_EVAL_DIRECT, places an error message in the interpreter result.
//
// Side effects:
//	Adds byte codes to the compile environment, and updates the
//	environment's stack depth.
//
//-----------------------------------------------------------------------------

func sTclAssembleCode(tls *libc.TLS, envPtr uintptr, codePtr uintptr, codeLen int32, flags int32) int32 { /* tclAssembly.c:1014:1: */
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	// Walk through the assembly script using the Tcl parser.  Each 'command'
	// will be an instruction or assembly directive.

	var instPtr uintptr = codePtr
	// Where to start looking for a line of code
	var nextPtr uintptr           // Pointer to the end of the line of code
	var bytesLeft int32 = codeLen // Number of bytes of source code remaining to
	// be parsed
	var status int32 // Tcl status return
	var assemEnvPtr uintptr = sNewAssemblyEnv(tls, envPtr, flags)
	var parsePtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FparsePtr

	for ok := true; ok; ok = bytesLeft > 0 {
		// Parse out one command line from the assembly script.

		status = XTcl_ParseCommand(tls, interp, instPtr, bytesLeft, 0, parsePtr)

		// Report errors in the parse.

		if status != TCL_OK {
			if flags&TCL_EVAL_DIRECT != 0 {
				XTcl_LogCommandInfo(tls, interp, codePtr, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart,
					int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm+uintptr(1))-int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart))/1))
			}
			sFreeAssemblyEnv(tls, assemEnvPtr)
			return TCL_ERROR
		}

		// Advance the pointers around any leading commentary.

		XTclAdvanceLines(tls, assemEnvPtr+104, instPtr,
			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)
		XTclAdvanceContinuations(tls, assemEnvPtr+104, assemEnvPtr+112,
			int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1))

		// Process the line of code.

		if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 0 {
			var instLen int32 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize
			// Length in bytes of the current command

			if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm == (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart+uintptr(instLen)-uintptr(1) {
				instLen--
			}

			// If tracing, show each line assembled as it happens.

			if sAssembleOneLine(tls, assemEnvPtr) != TCL_OK {
				if flags&TCL_EVAL_DIRECT != 0 {
					XTcl_LogCommandInfo(tls, interp, codePtr,
						(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart, instLen)
				}
				XTcl_FreeParse(tls, parsePtr)
				sFreeAssemblyEnv(tls, assemEnvPtr)
				return TCL_ERROR
			}
		}

		// Advance to the next line of code.

		nextPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize)
		bytesLeft = int32(int64(bytesLeft) - (int64(nextPtr)-int64(instPtr))/1)
		instPtr = nextPtr
		XTclAdvanceLines(tls, assemEnvPtr+104, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart,
			instPtr)
		XTclAdvanceContinuations(tls, assemEnvPtr+104, assemEnvPtr+112,
			int32((int64(instPtr)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1))
		XTcl_FreeParse(tls, parsePtr)
	}

	// Done with parsing the code.

	status = sFinishAssembly(tls, assemEnvPtr)
	sFreeAssemblyEnv(tls, assemEnvPtr)
	return status
}

//-----------------------------------------------------------------------------
//
// NewAssemblyEnv --
//
//	Creates an environment for the assembler to run in.
//
// Results:
//	Allocates, initialises and returns an assembler environment
//
//-----------------------------------------------------------------------------

func sNewAssemblyEnv(tls *libc.TLS, envPtr uintptr, flags int32) uintptr { /* tclAssembly.c:1138:19: */
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var assemEnvPtr uintptr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(AssemblyEnv{})))
	// Assembler environment under construction
	var parsePtr uintptr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_Parse{})))
	// Parse of one line of assembly code

	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr = envPtr
	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FparsePtr = parsePtr
	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FcmdLine = 1
	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FclNext = (*CompileEnv)(unsafe.Pointer(envPtr)).FclNext

	// Make the hashtables that store symbol resolution.

	XTcl_InitHashTable(tls, assemEnvPtr+16, 0)

	// Start the first basic block.

	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb = uintptr(0)
	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb = sAllocBB(tls, assemEnvPtr)
	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb
	(*BasicBlock)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb)).FstartLine = 1

	// Stash compilation flags.

	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags = flags
	return assemEnvPtr
}

//-----------------------------------------------------------------------------
//
// FreeAssemblyEnv --
//
//	Cleans up the assembler environment when assembly is complete.
//
//-----------------------------------------------------------------------------

func sFreeAssemblyEnv(tls *libc.TLS, assemEnvPtr uintptr) { /* tclAssembly.c:1190:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment being used for code
	// generation
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var thisBB uintptr // Pointer to a basic block being deleted
	var nextBB uintptr // Pointer to a deleted basic block's
	// successor

	// Free all the basic block structures.

	for thisBB = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb; thisBB != uintptr(0); thisBB = nextBB {
		if (*BasicBlock)(unsafe.Pointer(thisBB)).FjumpTarget != uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*BasicBlock)(unsafe.Pointer(thisBB)).FjumpTarget
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		if (*BasicBlock)(unsafe.Pointer(thisBB)).FforeignExceptions != uintptr(0) {
			XTclpFree(tls, (*BasicBlock)(unsafe.Pointer(thisBB)).FforeignExceptions)
		}
		nextBB = (*BasicBlock)(unsafe.Pointer(thisBB)).Fsuccessor1
		if (*BasicBlock)(unsafe.Pointer(thisBB)).FjtPtr != uintptr(0) {
			sDeleteMirrorJumpTable(tls, (*BasicBlock)(unsafe.Pointer(thisBB)).FjtPtr)
			(*BasicBlock)(unsafe.Pointer(thisBB)).FjtPtr = uintptr(0)
		}
		XTclpFree(tls, thisBB)
	}

	// Dispose what's left.

	XTcl_DeleteHashTable(tls, assemEnvPtr+16)
	XTclStackFree(tls, interp, (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FparsePtr)
	XTclStackFree(tls, interp, assemEnvPtr)
}

//-----------------------------------------------------------------------------
//
// AssembleOneLine --
//
//	Assembles a single command from an assembly language source.
//
// Results:
//	Returns TCL_ERROR with an appropriate error message if the assembly
//	fails. Returns TCL_OK if the assembly succeeds. Updates the assembly
//	environment with the state of the assembly.
//
//-----------------------------------------------------------------------------

func sAssembleOneLine(tls *libc.TLS, assemEnvPtr uintptr) int32 { /* tclAssembly.c:1246:1: */
	bp := tls.Alloc(112)
	defer tls.Free(112)

	var envPtr uintptr
	// Compilation environment being used for code
	// gen
	var interp uintptr
	// Tcl interpreter
	var parsePtr uintptr
	// Parse of the line of code
	// var tokenPtr uintptr at bp+72, 8
	// Current token within the line of code
	// var instNameObj uintptr at bp+80, 8
	// Name of the instruction
	// var tblIdx int32 at bp+88, 4
	// Index in TalInstructionTable of the
	// instruction
	var instType uint32 // Type of the instruction
	// var operand1Obj uintptr at bp+96, 8

	// First operand to the instruction
	var operand1 uintptr // String rep of the operand
	// var operand1Len int32 at bp+104, 4
	// String length of the operand
	// var opnd int32 at bp+108, 4
	// Integer representation of an operand
	var litIndex int32  // Literal pool index of a constant
	var localVar int32  // LVT index of a local variable
	var flags int32     // Flags for a basic block
	var jtPtr uintptr   // Pointer to a jumptable
	var infoIndex int32 // Index of the jumptable in auxdata
	var status int32
	var _objPtr uintptr
	var _objPtr1 uintptr
	envPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	interp = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	parsePtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FparsePtr
	*(*uintptr)(unsafe.Pointer(bp + 96 /* operand1Obj */)) = uintptr(0)
	status = TCL_ERROR // Return value from this function

	// Make sure that the instruction name is known at compile time.

	*(*uintptr)(unsafe.Pointer(bp + 72 /* tokenPtr */)) = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(sGetNextOperand(tls, assemEnvPtr, bp+72, bp+80) != TCL_OK) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// Look up the instruction name.

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 80)),
		uintptr(unsafe.Pointer(&sTalInstructionTable)), int32(unsafe.Sizeof(TalInstDesc{})), ts+4108,
		TCL_EXACT, bp+88) != TCL_OK) {
		goto __2
	}
	goto cleanup
__2:
	;

	// Vector on the type of instruction being processed.

	instType = uint32(sTalInstructionTable[*(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */))].FinstType)
	switch instType {

	case ASSEM_PUSH:
		goto __4

	case ASSEM_1BYTE:
		goto __5

	case ASSEM_BEGIN_CATCH:
		goto __6

	case ASSEM_BOOL:
		goto __7

	case ASSEM_BOOL_LVT4:
		goto __8

	case ASSEM_CLOCK_READ:
		goto __9

	case ASSEM_CONCAT1:
		goto __10

	case ASSEM_DICT_GET:
		goto __11

	case ASSEM_DICT_SET:
		goto __12

	case ASSEM_DICT_UNSET:
		goto __13

	case ASSEM_END_CATCH:
		goto __14

	case ASSEM_EVAL:
		goto __15

	case ASSEM_INVOKE:
		goto __16

	case ASSEM_JUMP:
		goto __17
	case ASSEM_JUMP4:
		goto __18

	case ASSEM_JUMPTABLE:
		goto __19

	case ASSEM_LABEL:
		goto __20

	case ASSEM_LINDEX_MULTI:
		goto __21

	case ASSEM_LIST:
		goto __22

	case ASSEM_INDEX:
		goto __23

	case ASSEM_LSET_FLAT:
		goto __24

	case ASSEM_LVT:
		goto __25

	case ASSEM_LVT1:
		goto __26

	case ASSEM_LVT1_SINT1:
		goto __27

	case ASSEM_LVT4:
		goto __28

	case ASSEM_OVER:
		goto __29

	case ASSEM_REGEXP:
		goto __30

	case ASSEM_REVERSE:
		goto __31

	case ASSEM_SINT1:
		goto __32

	case ASSEM_SINT4_LVT4:
		goto __33

	default:
		goto __34
	}
	goto __3

__4:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __35
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4120)
	goto cleanup
__35:
	;
	if !(sGetNextOperand(tls, assemEnvPtr, bp+72, bp+96) != TCL_OK) {
		goto __36
	}
	goto cleanup
__36:
	;
	operand1 = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* operand1Obj */)), bp+104)
	litIndex = XTclRegisterLiteral(tls, envPtr, operand1, *(*int32)(unsafe.Pointer(bp + 104 /* operand1Len */)) /*flags*/, 0)
	sBBEmitInst1or4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), litIndex, 0)
	goto __3

__5:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 1) {
		goto __37
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+2631)
	goto cleanup
__37:
	;
	sBBEmitOpcode(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), 0)
	goto __3

__6:
	// Emit the BEGIN_CATCH instruction with the code offset of the
	// exception branch target instead of the exception range index. The
	// correct index will be generated and inserted later, when catches
	// are being resolved.

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __38
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+3257)
	goto cleanup
__38:
	;
	if !(sGetNextOperand(tls, assemEnvPtr, bp+72, bp+96) != TCL_OK) {
		goto __39
	}
	goto cleanup
__39:
	;
	(*BasicBlock)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb)).FjumpLine = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FcmdLine
	(*BasicBlock)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb)).FjumpOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), 0, 0)
	*(*int32)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb + 112)) |= BB_BEGINCATCH
	sStartBasicBlock(tls, assemEnvPtr, BB_FALLTHRU, *(*uintptr)(unsafe.Pointer(bp + 96 /* operand1Obj */)))
	goto __3

__7:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __40
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4126)
	goto cleanup
__40:
	;
	if !(sGetBooleanOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK) {
		goto __41
	}
	goto cleanup
__41:
	;
	sBBEmitInstInt1(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), 0)
	goto __3

__8:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3) {
		goto __42
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4134)
	goto cleanup
__42:
	;
	if !(sGetBooleanOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK) {
		goto __43
	}
	goto cleanup
__43:
	;
	localVar = sFindLocalVar(tls, assemEnvPtr, bp+72)
	if !(localVar < 0) {
		goto __44
	}
	goto cleanup
__44:
	;
	sBBEmitInstInt1(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), 0)
__45:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __48
	}
	XTclExpandCodeArray(tls, envPtr)
__48:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar))
	goto __46
__46:
	if 0 != 0 {
		goto __45
	}
	goto __47
__47:
	;
	goto __3

__9:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __49
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4150)
	goto cleanup
__49:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK) {
		goto __50
	}
	goto cleanup
__50:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 108)) < 0 || *(*int32)(unsafe.Pointer(bp + 108)) > 3) {
		goto __51
	}
	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, ts+4155, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+4188, uintptr(0)))
	goto cleanup
__51:
	;
	sBBEmitInstInt1(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)))
	goto __3

__10:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __52
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4150)
	goto cleanup
__52:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckOneByte(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK ||
		sCheckStrictlyPositive(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __53
	}
	goto cleanup
__53:
	;
	sBBEmitInstInt1(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)))
	goto __3

__11:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __54
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4201)
	goto cleanup
__54:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckStrictlyPositive(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __55
	}
	goto cleanup
__55:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108))+1)
	goto __3

__12:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3) {
		goto __56
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4207)
	goto cleanup
__56:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckStrictlyPositive(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __57
	}
	goto cleanup
__57:
	;
	localVar = sFindLocalVar(tls, assemEnvPtr, bp+72)
	if !(localVar < 0) {
		goto __58
	}
	goto cleanup
__58:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108))+1)
__59:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __62
	}
	XTclExpandCodeArray(tls, envPtr)
__62:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar))
	goto __60
__60:
	if 0 != 0 {
		goto __59
	}
	goto __61
__61:
	;
	goto __3

__13:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3) {
		goto __63
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4207)
	goto cleanup
__63:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckStrictlyPositive(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __64
	}
	goto cleanup
__64:
	;
	localVar = sFindLocalVar(tls, assemEnvPtr, bp+72)
	if !(localVar < 0) {
		goto __65
	}
	goto cleanup
__65:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)))
__66:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __69
	}
	XTclExpandCodeArray(tls, envPtr)
__69:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar))
	goto __67
__67:
	if 0 != 0 {
		goto __66
	}
	goto __68
__68:
	;
	goto __3

__14:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 1) {
		goto __70
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+2631)
	goto cleanup
__70:
	;
	*(*int32)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb + 112)) |= BB_ENDCATCH
	sBBEmitOpcode(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), 0)
	sStartBasicBlock(tls, assemEnvPtr, BB_FALLTHRU, uintptr(0))
	goto __3

__15:
	// TODO - Refactor this stuff into a subroutine that takes the inst
	// code, the message ("script" or "expression") and an evaluator
	// callback that calls TclCompileScript or TclCompileExpr.

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __71
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80,
		func() uintptr {
			if sTalInstructionTable[*(*int32)(unsafe.Pointer(bp + 88))].FtclInstCode ==
				INST_EVAL_STK {
				return ts + 4221 /* "script" */
			}
			return ts + 4228 /* "expression" */
		}())
	goto cleanup
__71:
	;
	if !((*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __72
	}
	sCompileEmbeddedScript(tls, assemEnvPtr, *(*uintptr)(unsafe.Pointer(bp + 72))+uintptr(1)*24,
		uintptr(unsafe.Pointer(&sTalInstructionTable))+uintptr(*(*int32)(unsafe.Pointer(bp + 88)))*24)
	goto __73
__72:
	if !(sGetNextOperand(tls, assemEnvPtr, bp+72,
		bp+96) != TCL_OK) {
		goto __74
	}
	goto cleanup
	goto __75
__74:
	operand1 = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* operand1Obj */)), bp+104)
	litIndex = XTclRegisterLiteral(tls, envPtr, operand1, *(*int32)(unsafe.Pointer(bp + 104 /* operand1Len */)) /*flags*/, 0)

	// Assumes that PUSH is the first slot!

	sBBEmitInst1or4(tls, assemEnvPtr, 0, litIndex, 0)
	sBBEmitOpcode(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), 0)
__75:
	;
__73:
	;
	goto __3

__16:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __76
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4201)
	goto cleanup
__76:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckStrictlyPositive(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __77
	}
	goto cleanup
__77:
	;

	sBBEmitInst1or4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)))
	goto __3

__17:
__18:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __78
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+3257)
	goto cleanup
__78:
	;
	if !(sGetNextOperand(tls, assemEnvPtr, bp+72, bp+96) != TCL_OK) {
		goto __79
	}
	goto cleanup
__79:
	;
	(*BasicBlock)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb)).FjumpOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	if !(int32(instType) == ASSEM_JUMP) {
		goto __80
	}
	flags = BB_JUMP1
	sBBEmitInstInt1(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), 0, 0)
	goto __81
__80:
	flags = 0
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), 0, 0)
__81:
	;

	// Start a new basic block at the instruction following the jump.

	(*BasicBlock)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb)).FjumpLine = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FcmdLine
	if !(sTalInstructionTable[*(*int32)(unsafe.Pointer(bp + 88))].FoperandsConsumed != 0) {
		goto __82
	}
	flags = flags | BB_FALLTHRU
__82:
	;
	sStartBasicBlock(tls, assemEnvPtr, flags, *(*uintptr)(unsafe.Pointer(bp + 96 /* operand1Obj */)))
	goto __3

__19:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __83
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4239)
	goto cleanup
__83:
	;
	if !(sGetNextOperand(tls, assemEnvPtr, bp+72, bp+96) != TCL_OK) {
		goto __84
	}
	goto cleanup
__84:
	;

	jtPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(JumptableInfo{})))

	XTcl_InitHashTable(tls, jtPtr, 0)
	(*BasicBlock)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb)).FjumpLine = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FcmdLine
	(*BasicBlock)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb)).FjumpOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)

	infoIndex = XTclCreateAuxData(tls, jtPtr, uintptr(unsafe.Pointer(&XtclJumptableInfoType)), envPtr)

	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), infoIndex, 0)
	if !(sCreateMirrorJumpTable(tls, assemEnvPtr, *(*uintptr)(unsafe.Pointer(bp + 96))) != TCL_OK) {
		goto __85
	}
	goto cleanup
__85:
	;
	sStartBasicBlock(tls, assemEnvPtr, BB_JUMPTABLE|BB_FALLTHRU, uintptr(0))
	goto __3

__20:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __86
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4245)
	goto cleanup
__86:
	;
	if !(sGetNextOperand(tls, assemEnvPtr, bp+72, bp+96) != TCL_OK) {
		goto __87
	}
	goto cleanup
__87:
	;

	// Add the (label_name, address) pair to the hash table.

	if !(sDefineLabel(tls, assemEnvPtr, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))) != TCL_OK) {
		goto __88
	}
	goto cleanup
__88:
	;
	goto __3

__21:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __89
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4201)
	goto cleanup
__89:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckStrictlyPositive(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __90
	}
	goto cleanup
__90:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)))
	goto __3

__22:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __91
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4201)
	goto cleanup
__91:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckNonNegative(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __92
	}
	goto cleanup
__92:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)))
	goto __3

__23:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __93
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4201)
	goto cleanup
__93:
	;
	if !(sGetListIndexOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK) {
		goto __94
	}
	goto cleanup
__94:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)))
	goto __3

__24:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __95
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4201)
	goto cleanup
__95:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK) {
		goto __96
	}
	goto cleanup
__96:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 108)) < 2) {
		goto __97
	}
	if !((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0) {
		goto __98
	}
	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, ts+4250, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+4182, ts+4270, uintptr(0)))
__98:
	;
	goto cleanup
__97:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)))
	goto __3

__25:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __99
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4281)
	goto cleanup
__99:
	;
	localVar = sFindLocalVar(tls, assemEnvPtr, bp+72)
	if !(localVar < 0) {
		goto __100
	}
	goto cleanup
__100:
	;
	sBBEmitInst1or4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), localVar, 0)
	goto __3

__26:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __101
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4281)
	goto cleanup
__101:
	;
	localVar = sFindLocalVar(tls, assemEnvPtr, bp+72)
	if !(localVar < 0 || sCheckOneByte(tls, interp, localVar) != 0) {
		goto __102
	}
	goto cleanup
__102:
	;
	sBBEmitInstInt1(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), localVar, 0)
	goto __3

__27:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3) {
		goto __103
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4289)
	goto cleanup
__103:
	;
	localVar = sFindLocalVar(tls, assemEnvPtr, bp+72)
	if !(localVar < 0 || sCheckOneByte(tls, interp, localVar) != 0 ||
		sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckSignedOneByte(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != 0) {
		goto __104
	}
	goto cleanup
__104:
	;
	sBBEmitInstInt1(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), localVar, 0)
__105:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __108
	}
	XTclExpandCodeArray(tls, envPtr)
__108:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 108))))
	goto __106
__106:
	if 0 != 0 {
		goto __105
	}
	goto __107
__107:
	;
	goto __3

__28:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __109
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4281)
	goto cleanup
__109:
	;
	localVar = sFindLocalVar(tls, assemEnvPtr, bp+72)
	if !(localVar < 0) {
		goto __110
	}
	goto cleanup
__110:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), localVar, 0)
	goto __3

__29:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __111
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4201)
	goto cleanup
__111:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckNonNegative(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __112
	}
	goto cleanup
__112:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108))+1)
	goto __3

__30:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __113
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4126)
	goto cleanup
__113:
	;
	if !(sGetBooleanOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK) {
		goto __114
	}
	goto cleanup
__114:
	;

	sBBEmitInstInt1(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), TCL_REG_ADVANCED|func() int32 {
		if *(*int32)(unsafe.Pointer(bp + 108)) != 0 {
			return TCL_REG_NOCASE
		}
		return 0
	}(), 0)

	goto __3

__31:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __115
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4201)
	goto cleanup
__115:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckNonNegative(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __116
	}
	goto cleanup
__116:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)))
	goto __3

__32:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __117
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4150)
	goto cleanup
__117:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK ||
		sCheckSignedOneByte(tls, interp, *(*int32)(unsafe.Pointer(bp + 108))) != TCL_OK) {
		goto __118
	}
	goto cleanup
__118:
	;
	sBBEmitInstInt1(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), 0)
	goto __3

__33:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3) {
		goto __119
	}
	XTcl_WrongNumArgs(tls, interp, 1, bp+80, ts+4207)
	goto cleanup
__119:
	;
	if !(sGetIntegerOperand(tls, assemEnvPtr, bp+72, bp+108) != TCL_OK) {
		goto __120
	}
	goto cleanup
__120:
	;
	localVar = sFindLocalVar(tls, assemEnvPtr, bp+72)
	if !(localVar < 0) {
		goto __121
	}
	goto cleanup
__121:
	;
	sBBEmitInstInt4(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp + 88 /* tblIdx */)), *(*int32)(unsafe.Pointer(bp + 108 /* opnd */)), 0)
__122:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __125
	}
	XTclExpandCodeArray(tls, envPtr)
__125:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar))
	goto __123
__123:
	if 0 != 0 {
		goto __122
	}
	goto __124
__124:
	;
	goto __3

__34:
	XTcl_Panic(tls, ts+4302,
		libc.VaList(bp+64, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* instNameObj */)))))
__3:
	;

	status = TCL_OK
cleanup:
__126:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp + 80))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __129
	}
	XTclFreeObj(tls, _objPtr)
__129:
	;
	goto __127
__127:
	if 0 != 0 {
		goto __126
	}
	goto __128
__128:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 96)) != 0) {
		goto __130
	}
__131:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp + 96))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __134
	}
	XTclFreeObj(tls, _objPtr1)
__134:
	;
	goto __132
__132:
	if 0 != 0 {
		goto __131
	}
	goto __133
__133:
	;
__130:
	;
	return status
}

//-----------------------------------------------------------------------------
//
// CompileEmbeddedScript --
//
//	Compile an embedded 'eval' or 'expr' that appears in assembly code.
//
// This procedure is called when the 'eval' or 'expr' assembly directive is
// encountered, and the argument to the directive is a simple word that
// requires no substitution. The appropriate compiler (TclCompileScript or
// TclCompileExpr) is invoked recursively, and emits bytecode.
//
// Before the compiler is invoked, the compilation environment's stack
// consumption is reset to zero. Upon return from the compilation, the net
// stack effect of the compilation is in the compiler env, and this stack
// effect is posted to the assembler environment. The compile environment's
// stack consumption is then restored to what it was before (which is actually
// the state of the stack on entry to the block of assembly code).
//
// Any exception ranges pushed by the compilation are copied to the basic
// block and removed from the compiler environment. They will be rebuilt at
// the end of assembly, when the exception stack depth is actually known.
//
//-----------------------------------------------------------------------------

func sCompileEmbeddedScript(tls *libc.TLS, assemEnvPtr uintptr, tokenPtr uintptr, instPtr uintptr) { /* tclAssembly.c:1784:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter

	// The expression or script is not only known at compile time, but
	// actually a "simple word". It can be compiled inline by invoking the
	// compiler recursively.
	//
	// Save away the stack depth and reset it before compiling the script.
	// We'll record the stack usage of the script in the BasicBlock, and
	// accumulate it together with the stack usage of the enclosing assembly
	// code.

	var savedStackDepth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
	var savedMaxStackDepth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth
	var savedExceptArrayNext int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext

	(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = 0
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = 0

	sStartBasicBlock(tls, assemEnvPtr, BB_FALLTHRU, uintptr(0))
	switch (*TalInstDesc)(unsafe.Pointer(instPtr)).FtclInstCode {
	case INST_EVAL_STK:
		XTclCompileScript(tls, interp, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize, envPtr)
		break
	case INST_EXPR_STK:
		XTclCompileExpr(tls, interp, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize, envPtr, 1)
		break
	default:
		XTcl_Panic(tls, ts+4353,
			libc.VaList(bp, (*TalInstDesc)(unsafe.Pointer(instPtr)).Fname, (*TalInstDesc)(unsafe.Pointer(instPtr)).FtclInstCode))
	}

	// Roll up the stack usage of the embedded block into the assembler
	// environment.

	sSyncStackDepth(tls, assemEnvPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = savedStackDepth
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = savedMaxStackDepth

	// Save any exception ranges that were pushed by the compiler; they will
	// need to be fixed up once the stack depth is known.

	sMoveExceptionRangesToBasicBlock(tls, assemEnvPtr, savedExceptArrayNext)

	// Flush the current basic block.

	sStartBasicBlock(tls, assemEnvPtr, BB_FALLTHRU, uintptr(0))
}

//-----------------------------------------------------------------------------
//
// SyncStackDepth --
//
//	Copies the stack depth from the compile environment to a basic block.
//
// Side effects:
//	Current and max stack depth in the current basic block are adjusted.
//
// This procedure is called on return from invoking the compiler for the
// 'eval' and 'expr' operations. It adjusts the stack depth of the current
// basic block to reflect the stack required by the just-compiled code.
//
//-----------------------------------------------------------------------------

func sSyncStackDepth(tls *libc.TLS, assemEnvPtr uintptr) { /* tclAssembly.c:1867:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var curr_bb uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb
	// Current basic block
	var maxStackDepth int32 = (*BasicBlock)(unsafe.Pointer(curr_bb)).FfinalStackDepth + (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth
	// Max stack depth in the basic block

	if maxStackDepth > (*BasicBlock)(unsafe.Pointer(curr_bb)).FmaxStackDepth {
		(*BasicBlock)(unsafe.Pointer(curr_bb)).FmaxStackDepth = maxStackDepth
	}
	*(*int32)(unsafe.Pointer(curr_bb + 68)) += (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
}

//-----------------------------------------------------------------------------
//
// MoveExceptionRangesToBasicBlock --
//
//	Removes exception ranges that were created by compiling an embedded
//	script from the CompileEnv, and stores them in the BasicBlock. They
//	will be reinstalled, at the correct stack depth, after control flow
//	analysis is complete on the assembly code.
//
//-----------------------------------------------------------------------------

func sMoveExceptionRangesToBasicBlock(tls *libc.TLS, assemEnvPtr uintptr, savedExceptArrayNext int32) { /* tclAssembly.c:1897:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var curr_bb uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb
	// Current basic block
	var exceptionCount int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext - savedExceptArrayNext
	// Number of ranges that must be moved
	var i int32

	if exceptionCount == 0 {
		// Nothing to do
		return
	}

	// Save the exception ranges in the basic block. They will be re-added at
	// the conclusion of assembly; at this time, the INST_BEGIN_CATCH
	// instructions in the block will be adjusted from whatever range indices
	// they have [savedExceptArrayNext .. envPtr->exceptArrayNext) to the
	// indices that the exceptions acquire. The saved exception ranges are
	// converted to a relative nesting depth. The depth will be recomputed
	// once flow analysis has determined the actual stack depth of the block.

	(*BasicBlock)(unsafe.Pointer(curr_bb)).FforeignExceptionBase = savedExceptArrayNext
	(*BasicBlock)(unsafe.Pointer(curr_bb)).FforeignExceptionCount = exceptionCount
	(*BasicBlock)(unsafe.Pointer(curr_bb)).FforeignExceptions = XTcl_Alloc(tls, uint32(uint64(exceptionCount)*uint64(unsafe.Sizeof(ExceptionRange{}))))
	libc.Xmemcpy(tls, (*BasicBlock)(unsafe.Pointer(curr_bb)).FforeignExceptions,
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(savedExceptArrayNext)*28,
		uint64(exceptionCount)*uint64(unsafe.Sizeof(ExceptionRange{})))
	for i = 0; i < exceptionCount; i++ {
		*(*int32)(unsafe.Pointer((*BasicBlock)(unsafe.Pointer(curr_bb)).FforeignExceptions + uintptr(i)*28 + 4)) -= (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext = savedExceptArrayNext
}

//-----------------------------------------------------------------------------
//
// CreateMirrorJumpTable --
//
//	Makes a jump table with comparison values and assembly code labels.
//
// Results:
//	Returns a standard Tcl status, with an error message in the
//	interpreter on error.
//
// Side effects:
//	Initializes the jump table pointer in the current basic block to a
//	JumptableInfo. The keys in the JumptableInfo are the comparison
//	strings. The values, instead of being jump displacements, are
//	Tcl_Obj's with the code labels.

func sCreateMirrorJumpTable(tls *libc.TLS, assemEnvPtr uintptr, jumps uintptr) int32 { /* tclAssembly.c:1959:1: */
	bp := tls.Alloc(84)
	defer tls.Free(84)

	// var objc int32 at bp+64, 4
	// Number of elements in the 'jumps' list
	// var objv uintptr at bp+72, 8
	// Pointers to the elements in the list
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var bbPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb
	// Current basic block
	var jtPtr uintptr
	var jtHashPtr uintptr // Hashtable in the JumptableInfo
	var hashEntry uintptr // Entry for a key in the hashtable
	// var isNew int32 at bp+80, 4
	// Flag==1 if the key is not yet in the
	// table.
	var i int32

	if XTcl_ListObjGetElements(tls, interp, jumps, bp+64, bp+72) != TCL_OK {
		return TCL_ERROR
	}
	if *(*int32)(unsafe.Pointer(bp + 64))%2 != 0 {
		if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+4398,
				-1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+4451, uintptr(0)))
		}
		return TCL_ERROR
	}

	// Allocate the jumptable.

	jtPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(JumptableInfo{})))
	jtHashPtr = jtPtr
	XTcl_InitHashTable(tls, jtHashPtr, 0)

	// Fill the keys and labels into the table.

	for i = 0; i < *(*int32)(unsafe.Pointer(bp + 64 /* objc */)); i = i + 2 {

		hashEntry = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(jtHashPtr)).FcreateProc})).f(tls, jtHashPtr, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 /* objv */)) + uintptr(i)*8))), bp+80 /* &isNew */)
		if !(*(*int32)(unsafe.Pointer(bp + 80)) != 0) {
			if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+4464,
					libc.VaList(bp+32, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 /* objv */)) + uintptr(i)*8))))))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+4182, ts+4503))
				sDeleteMirrorJumpTable(tls, jtPtr)
				return TCL_ERROR
			}
		}
		(*Tcl_HashEntry)(unsafe.Pointer(hashEntry)).FclientData = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)) + uintptr(i+1)*8))
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)) + uintptr(i+1)*8)))).FrefCount++
	}

	// Put the mirror jumptable in the basic block struct.

	(*BasicBlock)(unsafe.Pointer(bbPtr)).FjtPtr = jtPtr
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// DeleteMirrorJumpTable --
//
//	Cleans up a jump table when the basic block is deleted.
//
//-----------------------------------------------------------------------------

func sDeleteMirrorJumpTable(tls *libc.TLS, jtPtr uintptr) { /* tclAssembly.c:2043:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var jtHashPtr uintptr = jtPtr
	// Hash table pointer
	// var search Tcl_HashSearch at bp, 24
	// Hash search control
	var entry uintptr // Hash table entry containing a jump label
	var label uintptr // Jump label from the hash table

	for entry = XTcl_FirstHashEntry(tls, jtHashPtr, bp); entry != uintptr(0); entry = XTcl_NextHashEntry(tls, bp) {
		label = (*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = label
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData = uintptr(0)
	}
	XTcl_DeleteHashTable(tls, jtHashPtr)
	XTclpFree(tls, jtPtr)
}

//-----------------------------------------------------------------------------
//
// GetNextOperand --
//
//	Retrieves the next operand in sequence from an assembly instruction,
//	and makes sure that its value is known at compile time.
//
// Results:
//	If successful, returns TCL_OK and leaves a Tcl_Obj with the operand
//	text in *operandObjPtr. In case of failure, returns TCL_ERROR and
//	leaves *operandObjPtr untouched.
//
// Side effects:
//	Advances *tokenPtrPtr around the token just processed.
//
//-----------------------------------------------------------------------------

func sGetNextOperand(tls *libc.TLS, assemEnvPtr uintptr, tokenPtrPtr uintptr, operandObjPtr uintptr) int32 { /* tclAssembly.c:2083:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var interp uintptr = (*CompileEnv)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr)).FiPtr
	var operandObj uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		operandObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(operandObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(operandObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(operandObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(operandObj)).FtypePtr = uintptr(0)
	{
	}

	if !(XTclWordKnownAtCompileTime(tls, *(*uintptr)(unsafe.Pointer(tokenPtrPtr)), operandObj) != 0) {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = operandObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+4521, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+4565, uintptr(0)))
		}
		return TCL_ERROR
	}
	*(*uintptr)(unsafe.Pointer(tokenPtrPtr)) = *(*uintptr)(unsafe.Pointer(tokenPtrPtr)) + uintptr((*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tokenPtrPtr)))).FnumComponents+1)*24
	(*Tcl_Obj)(unsafe.Pointer(operandObj)).FrefCount++
	*(*uintptr)(unsafe.Pointer(operandObjPtr)) = operandObj
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// GetBooleanOperand --
//
//	Retrieves a Boolean operand from the input stream and advances
//	the token pointer.
//
// Results:
//	Returns a standard Tcl result (with an error message in the
//	interpreter on failure).
//
// Side effects:
//	Stores the Boolean value in (*result) and advances (*tokenPtrPtr)
//	to the next token.
//
//-----------------------------------------------------------------------------

func sGetBooleanOperand(tls *libc.TLS, assemEnvPtr uintptr, tokenPtrPtr uintptr, result uintptr) int32 { /* tclAssembly.c:2129:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var tokenPtr uintptr = *(*uintptr)(unsafe.Pointer(tokenPtrPtr))
	// INOUT: Pointer to the next token in the
	// source code
	// var intObj uintptr at bp, 8
	// Integer from the source code
	var status int32 // Tcl status return

	// Extract the next token as a string.

	if sGetNextOperand(tls, assemEnvPtr, tokenPtrPtr, bp) != TCL_OK {
		return TCL_ERROR
	}

	// Convert to an integer, advance to the next token and return.

	status = XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* intObj */)), result)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	*(*uintptr)(unsafe.Pointer(tokenPtrPtr)) = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	return status
}

//-----------------------------------------------------------------------------
//
// GetIntegerOperand --
//
//	Retrieves an integer operand from the input stream and advances the
//	token pointer.
//
// Results:
//	Returns a standard Tcl result (with an error message in the
//	interpreter on failure).
//
// Side effects:
//	Stores the integer value in (*result) and advances (*tokenPtrPtr) to
//	the next token.
//
//-----------------------------------------------------------------------------

func sGetIntegerOperand(tls *libc.TLS, assemEnvPtr uintptr, tokenPtrPtr uintptr, result uintptr) int32 { /* tclAssembly.c:2182:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var tokenPtr uintptr = *(*uintptr)(unsafe.Pointer(tokenPtrPtr))
	// INOUT: Pointer to the next token in the
	// source code
	// var intObj uintptr at bp, 8
	// Integer from the source code
	var status int32 // Tcl status return

	// Extract the next token as a string.

	if sGetNextOperand(tls, assemEnvPtr, tokenPtrPtr, bp) != TCL_OK {
		return TCL_ERROR
	}

	// Convert to an integer, advance to the next token and return.

	status = XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* intObj */)), result)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	*(*uintptr)(unsafe.Pointer(tokenPtrPtr)) = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	return status
}

//-----------------------------------------------------------------------------
//
// GetListIndexOperand --
//
//	Gets the value of an operand intended to serve as a list index.
//
// Results:
//	Returns a standard Tcl result: TCL_OK if the parse is successful and
//	TCL_ERROR (with an appropriate error message) if the parse fails.
//
// Side effects:
//	Stores the list index at '*index'. Values between -1 and 0x7FFFFFFF
//	have their natural meaning; values between -2 and -0x80000000
//	represent 'end-2-N'.
//
//-----------------------------------------------------------------------------

func sGetListIndexOperand(tls *libc.TLS, assemEnvPtr uintptr, tokenPtrPtr uintptr, result uintptr) int32 { /* tclAssembly.c:2235:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var tokenPtr uintptr = *(*uintptr)(unsafe.Pointer(tokenPtrPtr))
	// INOUT: Pointer to the next token in the
	// source code
	// var value uintptr at bp, 8

	var status int32

	// General operand validity check
	if sGetNextOperand(tls, assemEnvPtr, tokenPtrPtr, bp) != TCL_OK {
		return TCL_ERROR
	}

	// Convert to an integer, advance to the next token and return.
	// NOTE: Indexing a list with an index before it yields the
	// same result as indexing after it, and might be more easily portable
	// when list size limits grow.
	status = XTclIndexEncode(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* value */)),
		-1, -1, result)

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	*(*uintptr)(unsafe.Pointer(tokenPtrPtr)) = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	return status
}

//-----------------------------------------------------------------------------
//
// FindLocalVar --
//
//	Gets the name of a local variable from the input stream and advances
//	the token pointer.
//
// Results:
//	Returns the LVT index of the local variable.  Returns -1 if the
//	variable is non-local, not known at compile time, or cannot be
//	installed in the LVT (leaving an error message in the interpreter
//	result if necessary).
//
// Side effects:
//	Advances the token pointer.  May define a new LVT slot if the variable
//	has not yet been seen and the execution context allows for it.
//
//-----------------------------------------------------------------------------

func sFindLocalVar(tls *libc.TLS, assemEnvPtr uintptr, tokenPtrPtr uintptr) int32 { /* tclAssembly.c:2291:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var tokenPtr uintptr = *(*uintptr)(unsafe.Pointer(tokenPtrPtr))
	// INOUT: Pointer to the next token in the
	// source code.
	// var varNameObj uintptr at bp+32, 8
	// Name of the variable
	var varNameStr uintptr
	// var varNameLen int32 at bp+40, 4

	var localVar int32 // Index of the variable in the LVT

	if sGetNextOperand(tls, assemEnvPtr, tokenPtrPtr, bp+32) != TCL_OK {
		return -1
	}
	varNameStr = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* varNameObj */)), bp+40)
	if sCheckNamespaceQualifiers(tls, interp, varNameStr, *(*int32)(unsafe.Pointer(bp + 40))) != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 32))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return -1
	}
	localVar = XTclFindCompiledLocal(tls, varNameStr, *(*int32)(unsafe.Pointer(bp + 40 /* varNameLen */)), 1, envPtr)
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 32))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if localVar == -1 {
		if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

				ts+4573, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+4644, uintptr(0)))
		}
		return -1
	}
	*(*uintptr)(unsafe.Pointer(tokenPtrPtr)) = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	return localVar
}

//-----------------------------------------------------------------------------
//
// CheckNamespaceQualifiers --
//
//	Verify that a variable name has no namespace qualifiers before
//	attempting to install it in the LVT.
//
// Results:
//	On success, returns TCL_OK. On failure, returns TCL_ERROR and stores
//	an error message in the interpreter result.
//
//-----------------------------------------------------------------------------

func sCheckNamespaceQualifiers(tls *libc.TLS, interp uintptr, name uintptr, nameLen int32) int32 { /* tclAssembly.c:2346:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var p uintptr

	for p = name; p+uintptr(2) < name+uintptr(nameLen); p++ {
		if int32(*(*int8)(unsafe.Pointer(p))) == ':' && int32(*(*int8)(unsafe.Pointer(p + 1))) == ':' {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+4648, libc.VaList(bp, name)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+4182, ts+4675, name, uintptr(0)))
			return TCL_ERROR
		}
	}
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// CheckOneByte --
//
//	Verify that a constant fits in a single byte in the instruction
//	stream.
//
// Results:
//	On success, returns TCL_OK. On failure, returns TCL_ERROR and stores
//	an error message in the interpreter result.
//
// This code is here primarily to verify that instructions like INCR_SCALAR1
// are possible on a given local variable. The fact that there is no
// INCR_SCALAR4 is puzzling.
//
//-----------------------------------------------------------------------------

func sCheckOneByte(tls *libc.TLS, interp uintptr, value int32) int32 { /* tclAssembly.c:2384:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var result uintptr // Error message

	if value < 0 || value > 0xFF {
		result = XTcl_NewStringObj(tls, ts+4684, -1)
		XTcl_SetObjResult(tls, interp, result)
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+4717, uintptr(0)))
		return TCL_ERROR
	}
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// CheckSignedOneByte --
//
//	Verify that a constant fits in a single signed byte in the instruction
//	stream.
//
// Results:
//	On success, returns TCL_OK. On failure, returns TCL_ERROR and stores
//	an error message in the interpreter result.
//
// This code is here primarily to verify that instructions like INCR_SCALAR1
// are possible on a given local variable. The fact that there is no
// INCR_SCALAR4 is puzzling.
//
//-----------------------------------------------------------------------------

func sCheckSignedOneByte(tls *libc.TLS, interp uintptr, value int32) int32 { /* tclAssembly.c:2419:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var result uintptr // Error message

	if value > 0x7F || value < -0x80 {
		result = XTcl_NewStringObj(tls, ts+4684, -1)
		XTcl_SetObjResult(tls, interp, result)
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+4717, uintptr(0)))
		return TCL_ERROR
	}
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// CheckNonNegative --
//
//	Verify that a constant is nonnegative
//
// Results:
//	On success, returns TCL_OK. On failure, returns TCL_ERROR and stores
//	an error message in the interpreter result.
//
// This code is here primarily to verify that instructions like INCR_INVOKE
// are consuming a positive number of operands
//
//-----------------------------------------------------------------------------

func sCheckNonNegative(tls *libc.TLS, interp uintptr, value int32) int32 { /* tclAssembly.c:2452:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var result uintptr // Error message

	if value < 0 {
		result = XTcl_NewStringObj(tls, ts+4723, -1)
		XTcl_SetObjResult(tls, interp, result)
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+4751, uintptr(0)))
		return TCL_ERROR
	}
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// CheckStrictlyPositive --
//
//	Verify that a constant is positive
//
// Results:
//	On success, returns TCL_OK. On failure, returns TCL_ERROR and
//	stores an error message in the interpreter result.
//
// This code is here primarily to verify that instructions like INCR_INVOKE
// are consuming a positive number of operands
//
//-----------------------------------------------------------------------------

func sCheckStrictlyPositive(tls *libc.TLS, interp uintptr, value int32) int32 { /* tclAssembly.c:2485:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var result uintptr // Error message

	if value <= 0 {
		result = XTcl_NewStringObj(tls, ts+4763, -1)
		XTcl_SetObjResult(tls, interp, result)
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+4788, uintptr(0)))
		return TCL_ERROR
	}
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// DefineLabel --
//
//	Defines a label appearing in the assembly sequence.
//
// Results:
//	Returns a standard Tcl result. Returns TCL_OK and an empty result if
//	the definition succeeds; returns TCL_ERROR and an appropriate message
//	if a duplicate definition is found.
//
//-----------------------------------------------------------------------------

func sDefineLabel(tls *libc.TLS, assemEnvPtr uintptr, labelName uintptr) int32 { /* tclAssembly.c:2516:1: */
	bp := tls.Alloc(52)
	defer tls.Free(52)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var entry uintptr // Label's entry in the symbol table
	// var isNew int32 at bp+48, 4
	// Flag == 1 iff the label was previously
	// undefined

	// TODO - This can now be simplified!

	sStartBasicBlock(tls, assemEnvPtr, BB_FALLTHRU, uintptr(0))

	// Look up the newly-defined label in the symbol table.

	entry = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FcreateProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, labelName, bp+48 /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp + 48)) != 0) {
		// This is a duplicate label.

		if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+4797, libc.VaList(bp, labelName)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+4182, ts+4832, labelName,
				uintptr(0)))
		}
		return TCL_ERROR
	}

	// This is the first appearance of the label in the code.

	(*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// StartBasicBlock --
//
//	Starts a new basic block when a label or jump is encountered.
//
// Results:
//	Returns a pointer to the BasicBlock structure of the new
//	basic block.
//
//-----------------------------------------------------------------------------

func sStartBasicBlock(tls *libc.TLS, assemEnvPtr uintptr, flags int32, jumpLabel uintptr) uintptr { /* tclAssembly.c:2573:18: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var newBB uintptr // BasicBlock structure for the new block
	var currBB uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb

	// Coalesce zero-length blocks.

	if int64((*BasicBlock)(unsafe.Pointer(currBB)).FstartOffset) == (int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 {
		(*BasicBlock)(unsafe.Pointer(currBB)).FstartLine = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FcmdLine
		return currBB
	}

	// Make the new basic block.

	newBB = sAllocBB(tls, assemEnvPtr)

	// Record the jump target if there is one.

	(*BasicBlock)(unsafe.Pointer(currBB)).FjumpTarget = jumpLabel
	if jumpLabel != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer((*BasicBlock)(unsafe.Pointer(currBB)).FjumpTarget)).FrefCount++
	}

	// Record the fallthrough if there is one.

	*(*int32)(unsafe.Pointer(currBB + 112)) |= flags

	// Record the successor block.

	(*BasicBlock)(unsafe.Pointer(currBB)).Fsuccessor1 = newBB
	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb = newBB
	return newBB
}

//-----------------------------------------------------------------------------
//
// AllocBB --
//
//	Allocates a new basic block
//
// Results:
//	Returns a pointer to the newly allocated block, which is initialized
//	to contain no code and begin at the current instruction pointer.
//
//-----------------------------------------------------------------------------

func sAllocBB(tls *libc.TLS, assemEnvPtr uintptr) uintptr { /* tclAssembly.c:2639:19: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	var bb uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(BasicBlock{})))

	(*BasicBlock)(unsafe.Pointer(bb)).ForiginalStartOffset = libc.AssignPtrInt32(bb+4, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1))
	(*BasicBlock)(unsafe.Pointer(bb)).FstartLine = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FcmdLine + 1
	(*BasicBlock)(unsafe.Pointer(bb)).FjumpOffset = -1
	(*BasicBlock)(unsafe.Pointer(bb)).FjumpLine = -1
	(*BasicBlock)(unsafe.Pointer(bb)).FprevPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb
	(*BasicBlock)(unsafe.Pointer(bb)).Fpredecessor = uintptr(0)
	(*BasicBlock)(unsafe.Pointer(bb)).Fsuccessor1 = uintptr(0)
	(*BasicBlock)(unsafe.Pointer(bb)).FjumpTarget = uintptr(0)
	(*BasicBlock)(unsafe.Pointer(bb)).FinitialStackDepth = 0
	(*BasicBlock)(unsafe.Pointer(bb)).FminStackDepth = 0
	(*BasicBlock)(unsafe.Pointer(bb)).FmaxStackDepth = 0
	(*BasicBlock)(unsafe.Pointer(bb)).FfinalStackDepth = 0
	(*BasicBlock)(unsafe.Pointer(bb)).FcatchDepth = 0
	(*BasicBlock)(unsafe.Pointer(bb)).FenclosingCatch = uintptr(0)
	(*BasicBlock)(unsafe.Pointer(bb)).FforeignExceptionBase = -1
	(*BasicBlock)(unsafe.Pointer(bb)).FforeignExceptionCount = 0
	(*BasicBlock)(unsafe.Pointer(bb)).FforeignExceptions = uintptr(0)
	(*BasicBlock)(unsafe.Pointer(bb)).FjtPtr = uintptr(0)
	(*BasicBlock)(unsafe.Pointer(bb)).Fflags = 0

	return bb
}

//-----------------------------------------------------------------------------
//
// FinishAssembly --
//
//	Postprocessing after all bytecode has been generated for a block of
//	assembly code.
//
// Results:
//	Returns a standard Tcl result, with an error message left in the
//	interpreter if appropriate.
//
// Side effects:
//	The program is checked to see if any undefined labels remain.  The
//	initial stack depth of all the basic blocks in the flow graph is
//	calculated and saved.  The stack balance on exit is computed, checked
//	and saved.
//
//-----------------------------------------------------------------------------

func sFinishAssembly(tls *libc.TLS, assemEnvPtr uintptr) int32 { /* tclAssembly.c:2692:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var mustMove int32 at bp, 4
	// Amount by which the code needs to be grown
	// because of expanding jumps

	// Resolve the targets of all jumps and determine whether code needs to be
	// moved around.

	if sCalculateJumpRelocations(tls, assemEnvPtr, bp) != 0 {
		return TCL_ERROR
	}

	// Move the code if necessary.

	if *(*int32)(unsafe.Pointer(bp)) != 0 {
		sMoveCodeForJumps(tls, assemEnvPtr, *(*int32)(unsafe.Pointer(bp /* mustMove */)))
	}

	// Resolve jump target labels to bytecode offsets.

	sFillInJumpOffsets(tls, assemEnvPtr)

	// Label each basic block with its catch context. Quit on inconsistency.

	if sProcessCatches(tls, assemEnvPtr) != TCL_OK {
		return TCL_ERROR
	}

	// Make sure that no block accessible from a catch's error exit that hasn't
	// popped the exception stack can throw an exception.

	if sCheckForThrowInWrongContext(tls, assemEnvPtr) != TCL_OK {
		return TCL_ERROR
	}

	// Compute stack balance throughout the program.

	if sCheckStack(tls, assemEnvPtr) != TCL_OK {
		return TCL_ERROR
	}

	// TODO - Check for unreachable code. Or maybe not; unreachable code is
	// Mostly Harmless.

	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// CalculateJumpRelocations --
//
//	Calculate any movement that has to be done in the assembly code to
//	expand JUMP1 instructions to JUMP4 (because they jump more than a
//	1-byte range).
//
// Results:
//	Returns a standard Tcl result, with an appropriate error message if
//	anything fails.
//
// Side effects:
//	Sets the 'startOffset' pointer in every basic block to the new origin
//	of the block, and turns off JUMP1 flags on instructions that must be
//	expanded (and adjusts them to the corresponding JUMP4's).  Does *not*
//	store the jump offsets at this point.
//
//	Sets *mustMove to 1 if and only if at least one instruction changed
//	size so the code must be moved.
//
//	As a side effect, also checks for undefined labels and reports them.
//
//-----------------------------------------------------------------------------

func sCalculateJumpRelocations(tls *libc.TLS, assemEnvPtr uintptr, mustMove uintptr) int32 { /* tclAssembly.c:2782:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var bbPtr uintptr      // Pointer to a basic block being checked
	var entry uintptr      // Exit label's entry in the symbol table
	var jumpTarget uintptr // Basic block where the jump goes
	var motion int32       // Amount by which the code has expanded
	var offset int32       // Offset in the bytecode from a jump
	// instruction to its target
	var opcode uint32 // Opcode in the bytecode being adjusted

	// Iterate through basic blocks as long as a change results in code
	// expansion.

	*(*int32)(unsafe.Pointer(mustMove)) = 0
	for ok := true; ok; ok = motion != 0 {
		motion = 0
		for bbPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb; bbPtr != uintptr(0); bbPtr = (*BasicBlock)(unsafe.Pointer(bbPtr)).Fsuccessor1 {
			// Advance the basic block start offset by however many bytes we
			// have inserted in the code up to this point

			*(*int32)(unsafe.Pointer(bbPtr + 4)) += motion

			// If the basic block references a label (and hence performs a
			// jump), find the location of the label. Report an error if the
			// label is missing.

			if (*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpTarget != uintptr(0) {
				entry = (*struct {
					f func(*libc.TLS, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FfindProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, XTcl_GetString(tls, (*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpTarget))
				if entry == uintptr(0) {
					sReportUndefinedLabel(tls, assemEnvPtr, bbPtr,
						(*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpTarget)
					return TCL_ERROR
				}

				// If the instruction is a JUMP1, turn it into a JUMP4 if its
				// target is out of range.

				jumpTarget = (*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData
				if (*BasicBlock)(unsafe.Pointer(bbPtr)).Fflags&BB_JUMP1 != 0 {
					offset = (*BasicBlock)(unsafe.Pointer(jumpTarget)).FstartOffset -
						((*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpOffset + motion)
					if offset < -0x80 || offset > 0x7F {
						opcode = uint32(*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpOffset))))
						opcode++
						*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpOffset))) = uint8(opcode)
						motion = motion + 3
						*(*int32)(unsafe.Pointer(bbPtr + 112)) &= libc.CplInt32(BB_JUMP1)
					}
				}
			}

			// If the basic block references a jump table, that doesn't affect
			// the code locations, but resolve the labels now, and store basic
			// block pointers in the jumptable hash.

			if (*BasicBlock)(unsafe.Pointer(bbPtr)).Fflags&BB_JUMPTABLE != 0 {
				if sCheckJumpTableLabels(tls, assemEnvPtr, bbPtr) != TCL_OK {
					return TCL_ERROR
				}
			}
		}
		*(*int32)(unsafe.Pointer(mustMove)) += motion
	}

	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// CheckJumpTableLabels --
//
//	Make sure that all the labels in a jump table are defined.
//
// Results:
//	Returns TCL_OK if they are, TCL_ERROR if they aren't.
//
//-----------------------------------------------------------------------------

func sCheckJumpTableLabels(tls *libc.TLS, assemEnvPtr uintptr, bbPtr uintptr) int32 { /* tclAssembly.c:2883:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var symHash uintptr = (*BasicBlock)(unsafe.Pointer(bbPtr)).FjtPtr
	// Hash table with the symbols
	// var search Tcl_HashSearch at bp, 24
	// Hash table iterator
	var symEntryPtr uintptr // Hash entry for the symbols
	var symbolObj uintptr   // Jump target
	var valEntryPtr uintptr // Hash entry for the resolutions

	// Look up every jump target in the jump hash.

	for symEntryPtr = XTcl_FirstHashEntry(tls, symHash, bp); symEntryPtr != uintptr(0); symEntryPtr = XTcl_NextHashEntry(tls, bp) {
		symbolObj = (*Tcl_HashEntry)(unsafe.Pointer(symEntryPtr)).FclientData
		valEntryPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FfindProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, XTcl_GetString(tls, symbolObj))

		if valEntryPtr == uintptr(0) {
			sReportUndefinedLabel(tls, assemEnvPtr, bbPtr, symbolObj)
			return TCL_ERROR
		}
	}

	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// ReportUndefinedLabel --
//
//	Report that a basic block refers to an undefined jump label
//
// Side effects:
//	Stores an error message, error code, and line number information in
//	the assembler's Tcl interpreter.
//
//-----------------------------------------------------------------------------

func sReportUndefinedLabel(tls *libc.TLS, assemEnvPtr uintptr, bbPtr uintptr, jumpTarget uintptr) { /* tclAssembly.c:2932:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter

	if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+4841, libc.VaList(bp, XTcl_GetString(tls, jumpTarget))))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+4182, ts+4862,
			XTcl_GetString(tls, jumpTarget), uintptr(0)))
		XTcl_SetErrorLine(tls, interp, (*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpLine)
	}
}

//-----------------------------------------------------------------------------
//
// MoveCodeForJumps --
//
//	Move bytecodes in memory to accommodate JUMP1 instructions that have
//	expanded to become JUMP4's.
//
//-----------------------------------------------------------------------------

func sMoveCodeForJumps(tls *libc.TLS, assemEnvPtr uintptr, mustMove int32) { /* tclAssembly.c:2964:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var bbPtr uintptr   // Pointer to a basic block being checked
	var topOffset int32 // Bytecode offset of the following basic
	// block before code motion

	// Make sure that there is enough space in the bytecode array to
	// accommodate the expanded code.

	for (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd < (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(mustMove) {
		XTclExpandCodeArray(tls, envPtr)
	}

	// Iterate through the bytecodes in reverse order, and move them upward to
	// their new homes.

	topOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for bbPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb; bbPtr != uintptr(0); bbPtr = (*BasicBlock)(unsafe.Pointer(bbPtr)).FprevPtr {

		libc.Xmemmove(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart+uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset),
			(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart+uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).ForiginalStartOffset),
			uint64(topOffset-(*BasicBlock)(unsafe.Pointer(bbPtr)).ForiginalStartOffset))
		topOffset = (*BasicBlock)(unsafe.Pointer(bbPtr)).ForiginalStartOffset
		*(*int32)(unsafe.Pointer(bbPtr + 12)) += (*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset - (*BasicBlock)(unsafe.Pointer(bbPtr)).ForiginalStartOffset
	}
	*(*uintptr)(unsafe.Pointer(envPtr + 120)) += uintptr(mustMove)
}

//-----------------------------------------------------------------------------
//
// FillInJumpOffsets --
//
//	Fill in the final offsets of all jump instructions once bytecode
//	locations have been completely determined.
//
//-----------------------------------------------------------------------------

func sFillInJumpOffsets(tls *libc.TLS, assemEnvPtr uintptr) { /* tclAssembly.c:3013:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var bbPtr uintptr      // Pointer to a basic block being checked
	var entry uintptr      // Hashtable entry for a jump target label
	var jumpTarget uintptr // Basic block where a jump goes
	var fromOffset int32   // Bytecode location of a jump instruction
	var targetOffset int32 // Bytecode location of a jump instruction's
	// target

	for bbPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb; bbPtr != uintptr(0); bbPtr = (*BasicBlock)(unsafe.Pointer(bbPtr)).Fsuccessor1 {
		if (*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpTarget != uintptr(0) {
			entry = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FfindProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, XTcl_GetString(tls, (*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpTarget))
			jumpTarget = (*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData
			fromOffset = (*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpOffset
			targetOffset = (*BasicBlock)(unsafe.Pointer(jumpTarget)).FstartOffset
			if (*BasicBlock)(unsafe.Pointer(bbPtr)).Fflags&BB_JUMP1 != 0 {
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(fromOffset) + uintptr(1))) = uint8(uint32(targetOffset - fromOffset))
			} else {
				for ok := true; ok; ok = 0 != 0 {
					*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(fromOffset) + uintptr(1))) = uint8(uint32(targetOffset-fromOffset) >> 24)
					*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(fromOffset) + uintptr(1) + uintptr(1))) = uint8(uint32(targetOffset-fromOffset) >> 16)
					*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(fromOffset) + uintptr(1) + uintptr(2))) = uint8(uint32(targetOffset-fromOffset) >> 8)
					*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(fromOffset) + uintptr(1) + uintptr(3))) = uint8(uint32(targetOffset - fromOffset))
				}
			}
		}
		if (*BasicBlock)(unsafe.Pointer(bbPtr)).Fflags&BB_JUMPTABLE != 0 {
			sResolveJumpTableTargets(tls, assemEnvPtr, bbPtr)
		}
	}
}

//-----------------------------------------------------------------------------
//
// ResolveJumpTableTargets --
//
//	Puts bytecode addresses for the targets of a jumptable into the
//	table
//
// Results:
//	Returns TCL_OK if they are, TCL_ERROR if they aren't.
//
//-----------------------------------------------------------------------------

func sResolveJumpTableTargets(tls *libc.TLS, assemEnvPtr uintptr, bbPtr uintptr) { /* tclAssembly.c:3063:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var symHash uintptr = (*BasicBlock)(unsafe.Pointer(bbPtr)).FjtPtr
	// Hash table with the symbols
	// var search Tcl_HashSearch at bp, 24
	// Hash table iterator
	var symEntryPtr uintptr // Hash entry for the symbols
	var symbolObj uintptr   // Jump target
	var valEntryPtr uintptr // Hash entry for the resolutions
	var auxDataIndex int32  // Index of the auxdata
	var realJumpTablePtr uintptr
	// Jump table in the actual code
	var realJumpHashPtr uintptr
	// Jump table hash in the actual code
	var realJumpEntryPtr uintptr
	// Entry in the jump table hash in
	// the actual code
	var jumpTargetBBPtr uintptr
	// Basic block that the jump proceeds to
	// var junk int32 at bp+24, 4

	auxDataIndex = int32(uint32(*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpOffset) + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpOffset) + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpOffset) + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpOffset) + uintptr(1) + uintptr(3))))

	realJumpTablePtr = (*AuxData)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr + uintptr(auxDataIndex)*16)).FclientData
	realJumpHashPtr = realJumpTablePtr

	// Look up every jump target in the jump hash.

	for symEntryPtr = XTcl_FirstHashEntry(tls, symHash, bp); symEntryPtr != uintptr(0); symEntryPtr = XTcl_NextHashEntry(tls, bp) {
		symbolObj = (*Tcl_HashEntry)(unsafe.Pointer(symEntryPtr)).FclientData

		valEntryPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FfindProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, XTcl_GetString(tls, symbolObj))
		jumpTargetBBPtr = (*Tcl_HashEntry)(unsafe.Pointer(valEntryPtr)).FclientData

		realJumpEntryPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(realJumpHashPtr)).FcreateProc})).f(tls, realJumpHashPtr, func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(symHash)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(symHash)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(symEntryPtr + 32))
			}
			return symEntryPtr + 32
		}(), bp+24)

		(*Tcl_HashEntry)(unsafe.Pointer(realJumpEntryPtr)).FclientData = uintptr(Intptr_t((*BasicBlock)(unsafe.Pointer(jumpTargetBBPtr)).FstartOffset - (*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpOffset))
	}

}

//-----------------------------------------------------------------------------
//
// CheckForThrowInWrongContext --
//
//	Verify that no beginCatch/endCatch sequence can throw an exception
//	after an original exception is caught and before its exception context
//	is removed from the stack.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Stores an appropriate error message in the interpreter as needed.
//
//-----------------------------------------------------------------------------

func sCheckForThrowInWrongContext(tls *libc.TLS, assemEnvPtr uintptr) int32 { /* tclAssembly.c:3140:1: */
	var blockPtr uintptr // Current basic block

	// Walk through the basic blocks in turn, checking all the ones that have
	// caught an exception and not disposed of it properly.

	for blockPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb; blockPtr != uintptr(0); blockPtr = (*BasicBlock)(unsafe.Pointer(blockPtr)).Fsuccessor1 {
		if int32((*BasicBlock)(unsafe.Pointer(blockPtr)).FcatchState) == BBCS_CAUGHT {
			// Walk through the instructions in the basic block.

			if sCheckNonThrowingBlock(tls, assemEnvPtr, blockPtr) != TCL_OK {
				return TCL_ERROR
			}
		}
	}
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// CheckNonThrowingBlock --
//
//	Check that a basic block cannot throw an exception.
//
// Results:
//	Returns TCL_ERROR if the block cannot be proven to be nonthrowing.
//
// Side effects:
//	Stashes an error message in the interpreter result.
//
//-----------------------------------------------------------------------------

func sCheckNonThrowingBlock(tls *libc.TLS, assemEnvPtr uintptr, blockPtr uintptr) int32 { /* tclAssembly.c:3183:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var nextPtr uintptr // Pointer to the succeeding basic block
	var offset int32    // Bytecode offset of the current
	// instruction
	var bound int32 // Bytecode offset following the last
	// instruction of the block.
	var opcode uint8 // Current bytecode instruction

	// Determine where in the code array the basic block ends.

	nextPtr = (*BasicBlock)(unsafe.Pointer(blockPtr)).Fsuccessor1
	if nextPtr == uintptr(0) {
		bound = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	} else {
		bound = (*BasicBlock)(unsafe.Pointer(nextPtr)).FstartOffset
	}

	// Walk through the instructions of the block.

	offset = (*BasicBlock)(unsafe.Pointer(blockPtr)).FstartOffset
	for offset < bound {
		// Determine whether an instruction is nonthrowing.

		opcode = *(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(offset)))
		if sBytecodeMightThrow(tls, opcode) != 0 {
			// Report an error for a throw in the wrong context.

			if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

					ts+4870,
					libc.VaList(bp, XtclInstructionTable[opcode].Fname)))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+4182, ts+4971, uintptr(0)))
				sAddBasicBlockRangeToErrorInfo(tls, assemEnvPtr, blockPtr)
			}
			return TCL_ERROR
		}
		offset = offset + XtclInstructionTable[opcode].FnumBytes
	}
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// BytecodeMightThrow --
//
//	Tests if a given bytecode instruction might throw an exception.
//
// Results:
//	Returns 1 if the bytecode might throw an exception, 0 if the
//	instruction is known never to throw.
//
//-----------------------------------------------------------------------------

func sBytecodeMightThrow(tls *libc.TLS, opcode uint8) int32 { /* tclAssembly.c:3257:1: */
	// Binary search on the non-throwing bytecode list.

	var min int32 = 0
	var max int32 = int32(uint64(unsafe.Sizeof(sNonThrowingByteCodes)) - uint64(1))
	var mid int32
	var c uint8

	for max >= min {
		mid = (min + max) / 2
		c = sNonThrowingByteCodes[mid]
		if int32(opcode) < int32(c) {
			max = mid - 1
		} else if int32(opcode) > int32(c) {
			min = mid + 1
		} else {
			// Opcode is nonthrowing.

			return 0
		}
	}

	return 1
}

//-----------------------------------------------------------------------------
//
// CheckStack --
//
//	Audit stack usage in a block of assembly code.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Updates stack depth on entry for all basic blocks in the flowgraph.
//	Calculates the max stack depth used in the program, and updates the
//	compilation environment to reflect it.
//
//-----------------------------------------------------------------------------

func sCheckStack(tls *libc.TLS, assemEnvPtr uintptr) int32 { /* tclAssembly.c:3307:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var maxDepth int32 // Maximum stack depth overall

	// Checking the head block will check all the other blocks recursively.

	(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FmaxDepth = 0
	if sStackCheckBasicBlock(tls, assemEnvPtr, (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb, uintptr(0),
		0) == TCL_ERROR {
		return TCL_ERROR
	}

	// Post the max stack depth back to the compilation environment.

	maxDepth = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FmaxDepth + (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
	if maxDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth {
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = maxDepth
	}

	// If the exit is reachable, make sure that the program exits with 1
	// operand on the stack.

	if sStackCheckExit(tls, assemEnvPtr) != TCL_OK {
		return TCL_ERROR
	}

	// Reset the visited state on all basic blocks.

	sResetVisitedBasicBlocks(tls, assemEnvPtr)
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// StackCheckBasicBlock --
//
//	Checks stack consumption for a basic block (and recursively for its
//	successors).
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Updates initial stack depth for the basic block and its successors.
//	(Final and maximum stack depth are relative to initial, and are not
//	touched).
//
// This procedure eventually checks, for the entire flow graph, whether stack
// balance is consistent.  It is an error for a given basic block to be
// reachable along multiple flow paths with different stack depths.
//
//-----------------------------------------------------------------------------

func sStackCheckBasicBlock(tls *libc.TLS, assemEnvPtr uintptr, blockPtr uintptr, predecessor uintptr, initialStackDepth int32) int32 { /* tclAssembly.c:3374:1: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var jumpTarget uintptr // Basic block where a jump goes
	var stackDepth int32   // Current stack depth
	var maxDepth int32     // Maximum stack depth so far
	var result int32       // Tcl status return
	// var jtSearch Tcl_HashSearch at bp+96, 24
	// Search structure for the jump table
	var jtEntry uintptr     // Hash entry in the jump table
	var targetLabel uintptr // Target label from the jump table
	var entry uintptr       // Hash entry in the label table

	if (*BasicBlock)(unsafe.Pointer(blockPtr)).Fflags&BB_VISITED != 0 {
		// If the block is already visited, check stack depth for consistency
		// among the paths that reach it.

		if (*BasicBlock)(unsafe.Pointer(blockPtr)).FinitialStackDepth == initialStackDepth {
			return TCL_OK
		}
		if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+4980, -1))

			// TODO - add execution trace of both paths

			XTcl_SetErrorLine(tls, interp, (*BasicBlock)(unsafe.Pointer(blockPtr)).FstartLine)
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+5029, uintptr(0)))
		}
		return TCL_ERROR
	}

	// If the block is not already visited, set the 'predecessor' link to
	// indicate how control got to it. Set the initial stack depth to the
	// current stack depth in the flow of control.

	*(*int32)(unsafe.Pointer(blockPtr + 112)) |= BB_VISITED
	(*BasicBlock)(unsafe.Pointer(blockPtr)).Fpredecessor = predecessor
	(*BasicBlock)(unsafe.Pointer(blockPtr)).FinitialStackDepth = initialStackDepth

	// Calculate minimum stack depth, and flag an error if the block
	// underflows the stack.

	if initialStackDepth+(*BasicBlock)(unsafe.Pointer(blockPtr)).FminStackDepth < 0 {
		if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+5038, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+4182, ts+5029, uintptr(0)))
			sAddBasicBlockRangeToErrorInfo(tls, assemEnvPtr, blockPtr)
			XTcl_SetErrorLine(tls, interp, (*BasicBlock)(unsafe.Pointer(blockPtr)).FstartLine)
		}
		return TCL_ERROR
	}

	// Make sure that the block doesn't try to pop below the stack level of an
	// enclosing catch.

	if (*BasicBlock)(unsafe.Pointer(blockPtr)).FenclosingCatch != uintptr(0) && initialStackDepth+(*BasicBlock)(unsafe.Pointer(blockPtr)).FminStackDepth <
		(*BasicBlock1)(unsafe.Pointer((*BasicBlock)(unsafe.Pointer(blockPtr)).FenclosingCatch)).FinitialStackDepth+
			(*BasicBlock1)(unsafe.Pointer((*BasicBlock)(unsafe.Pointer(blockPtr)).FenclosingCatch)).FfinalStackDepth {
		if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+5054, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+4182, ts+5101, -1))
			sAddBasicBlockRangeToErrorInfo(tls, assemEnvPtr, blockPtr)
			XTcl_SetErrorLine(tls, interp, (*BasicBlock)(unsafe.Pointer(blockPtr)).FstartLine)
		}
		return TCL_ERROR
	}

	// Update maximum stgack depth.

	maxDepth = initialStackDepth + (*BasicBlock)(unsafe.Pointer(blockPtr)).FmaxStackDepth
	if maxDepth > (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FmaxDepth {
		(*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FmaxDepth = maxDepth
	}

	// Calculate stack depth on exit from the block, and invoke this procedure
	// recursively to check successor blocks.

	stackDepth = initialStackDepth + (*BasicBlock)(unsafe.Pointer(blockPtr)).FfinalStackDepth
	result = TCL_OK
	if (*BasicBlock)(unsafe.Pointer(blockPtr)).Fflags&BB_FALLTHRU != 0 {
		result = sStackCheckBasicBlock(tls, assemEnvPtr, (*BasicBlock)(unsafe.Pointer(blockPtr)).Fsuccessor1,
			blockPtr, stackDepth)
	}

	if result == TCL_OK && (*BasicBlock)(unsafe.Pointer(blockPtr)).FjumpTarget != uintptr(0) {
		entry = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FfindProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, XTcl_GetString(tls, (*BasicBlock)(unsafe.Pointer(blockPtr)).FjumpTarget))
		jumpTarget = (*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData
		result = sStackCheckBasicBlock(tls, assemEnvPtr, jumpTarget, blockPtr,
			stackDepth)
	}

	// All blocks referenced in a jump table are successors.

	if (*BasicBlock)(unsafe.Pointer(blockPtr)).Fflags&BB_JUMPTABLE != 0 {
		for jtEntry = XTcl_FirstHashEntry(tls, (*BasicBlock)(unsafe.Pointer(blockPtr)).FjtPtr,
			bp+96); result == TCL_OK && jtEntry != uintptr(0); jtEntry = XTcl_NextHashEntry(tls, bp+96) {
			targetLabel = (*Tcl_HashEntry)(unsafe.Pointer(jtEntry)).FclientData
			entry = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FfindProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, XTcl_GetString(tls, targetLabel))
			jumpTarget = (*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData
			result = sStackCheckBasicBlock(tls, assemEnvPtr, jumpTarget,
				blockPtr, stackDepth)
		}
	}

	return result
}

//-----------------------------------------------------------------------------
//
// StackCheckExit --
//
//	Makes sure that the net stack effect of an entire assembly language
//	script is to push 1 result.
//
// Results:
//	Returns a standard Tcl result, with an error message in the
//	interpreter result if the stack is wrong.
//
// Side effects:
//	If the assembly code had a net stack effect of zero, emits code to the
//	concluding block to push a null result. In any case, updates the stack
//	depth in the compile environment to reflect the net effect of the
//	assembly code.
//
//-----------------------------------------------------------------------------

func sStackCheckExit(tls *libc.TLS, assemEnvPtr uintptr) int32 { /* tclAssembly.c:3533:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var depth int32    // Net stack effect
	var litIndex int32 // Index in the literal pool of the empty
	// string
	var curr_bb uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb
	// Final basic block in the assembly

	// Don't perform these checks if execution doesn't reach the exit (either
	// because of an infinite loop or because the only return is from the
	// middle.

	if (*BasicBlock)(unsafe.Pointer(curr_bb)).Fflags&BB_VISITED != 0 {
		// Exit with no operands; push an empty one.

		depth = (*BasicBlock)(unsafe.Pointer(curr_bb)).FfinalStackDepth + (*BasicBlock)(unsafe.Pointer(curr_bb)).FinitialStackDepth
		if depth == 0 {
			// Emit a 'push' of the empty literal.

			litIndex = XTclRegisterLiteral(tls, envPtr, ts+2631, 0 /*flags*/, 0)

			// Assumes that 'push' is at slot 0 in TalInstructionTable.

			sBBEmitInst1or4(tls, assemEnvPtr, 0, litIndex, 0)
			depth++
		}

		// Exit with unbalanced stack.

		if depth != 1 {
			if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+5117,
					libc.VaList(bp, depth)))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+4182, ts+5029, uintptr(0)))
			}
			return TCL_ERROR
		}

		// Record stack usage.

		*(*int32)(unsafe.Pointer(envPtr + 48)) += depth
	}

	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// ProcessCatches --
//
//	First pass of 'catch' processing.
//
// Results:
//	Returns a standard Tcl result, with an appropriate error message if
//	the result is TCL_ERROR.
//
// Side effects:
//	Labels all basic blocks with their enclosing catches.
//
//-----------------------------------------------------------------------------

func sProcessCatches(tls *libc.TLS, assemEnvPtr uintptr) int32 { /* tclAssembly.c:3615:1: */
	var blockPtr uintptr // Pointer to a basic block

	// Clear the catch state of all basic blocks.

	for blockPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb; blockPtr != uintptr(0); blockPtr = (*BasicBlock)(unsafe.Pointer(blockPtr)).Fsuccessor1 {
		(*BasicBlock)(unsafe.Pointer(blockPtr)).FcatchState = BBCS_UNKNOWN
		(*BasicBlock)(unsafe.Pointer(blockPtr)).FenclosingCatch = uintptr(0)
	}

	// Start the check recursively from the first basic block, which is
	// outside any exception context

	if sProcessCatchesInBasicBlock(tls, assemEnvPtr, (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb,
		uintptr(0), BBCS_NONE, 0) != TCL_OK {
		return TCL_ERROR
	}

	// Check for unclosed catch on exit.

	if sCheckForUnclosedCatches(tls, assemEnvPtr) != TCL_OK {
		return TCL_ERROR
	}

	// Now there's enough information to build the exception ranges.

	if sBuildExceptionRanges(tls, assemEnvPtr) != TCL_OK {
		return TCL_ERROR
	}

	// Finally, restore any exception ranges from embedded scripts.

	sRestoreEmbeddedExceptionRanges(tls, assemEnvPtr)
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// ProcessCatchesInBasicBlock --
//
//	First-pass catch processing for one basic block.
//
// Results:
//	Returns a standard Tcl result, with error message in the interpreter
//	result if an error occurs.
//
// This procedure checks consistency of the exception context through the
// assembler program, and records the enclosing 'catch' for every basic block.
//
//-----------------------------------------------------------------------------

func sProcessCatchesInBasicBlock(tls *libc.TLS, assemEnvPtr uintptr, bbPtr uintptr, enclosing uintptr, state uint32, catchDepth int32) int32 { /* tclAssembly.c:3683:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var result int32 // Return value from this procedure
	var fallThruEnclosing uintptr
	// Enclosing catch if execution falls thru
	var fallThruState uint32
	// Catch state of the successor block
	var jumpEnclosing uintptr // Enclosing catch if execution goes to jump
	// target
	var jumpState uint32
	// Catch state of the jump target
	var changed int32 = 0 // Flag == 1 iff successor blocks need to be
	// checked because the state of this block has
	// changed.
	var jumpTarget uintptr // Basic block where a jump goes
	// var jtSearch Tcl_HashSearch at bp+64, 24
	// Hash search control for a jumptable
	var jtEntry uintptr     // Entry in a jumptable
	var targetLabel uintptr // Target label from a jumptable
	var entry uintptr       // Entry from the label table

	// Update the state of the current block, checking for consistency.  Set
	// 'changed' to 1 if the state changes and successor blocks need to be
	// rechecked.

	if int32((*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchState) == BBCS_UNKNOWN {
		(*BasicBlock)(unsafe.Pointer(bbPtr)).FenclosingCatch = enclosing
	} else if (*BasicBlock)(unsafe.Pointer(bbPtr)).FenclosingCatch != enclosing {
		if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

				ts+5170, -1))
			XTcl_SetErrorLine(tls, interp, (*BasicBlock)(unsafe.Pointer(bbPtr)).FstartLine)
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+5238, uintptr(0)))
		}
		return TCL_ERROR
	}
	if state > (*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchState {
		(*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchState = state
		changed = 1
	}

	// If this block has been visited before, and its state hasn't changed,
	// we're done with it for now.

	if !(changed != 0) {
		return TCL_OK
	}
	(*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchDepth = catchDepth

	// Determine enclosing catch and 'caught' state for the fallthrough and
	// the jump target. Default for both is the state of the current block.

	fallThruEnclosing = enclosing
	fallThruState = state
	jumpEnclosing = enclosing
	jumpState = state

	// TODO: Make sure that the test cases include validating that a natural
	// loop can't include 'beginCatch' or 'endCatch'

	if (*BasicBlock)(unsafe.Pointer(bbPtr)).Fflags&BB_BEGINCATCH != 0 {
		// If the block begins a catch, the state for the successor is 'in
		// catch'. The jump target is the exception exit, and the state of the
		// jump target is 'caught.'

		fallThruEnclosing = bbPtr
		fallThruState = BBCS_INCATCH
		jumpEnclosing = bbPtr
		jumpState = BBCS_CAUGHT
		catchDepth++
	}

	if (*BasicBlock)(unsafe.Pointer(bbPtr)).Fflags&BB_ENDCATCH != 0 {
		// If the block ends a catch, the state for the successor is whatever
		// the state was on entry to the catch.

		if enclosing == uintptr(0) {
			if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+5247, -1))
				XTcl_SetErrorLine(tls, interp, (*BasicBlock)(unsafe.Pointer(bbPtr)).FstartLine)
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+4182, ts+5291, uintptr(0)))
			}
			return TCL_ERROR
		}
		fallThruEnclosing = (*BasicBlock)(unsafe.Pointer(enclosing)).FenclosingCatch
		fallThruState = (*BasicBlock)(unsafe.Pointer(enclosing)).FcatchState
		catchDepth--
	}

	// Visit any successor blocks with the appropriate exception context

	result = TCL_OK
	if (*BasicBlock)(unsafe.Pointer(bbPtr)).Fflags&BB_FALLTHRU != 0 {
		result = sProcessCatchesInBasicBlock(tls, assemEnvPtr, (*BasicBlock)(unsafe.Pointer(bbPtr)).Fsuccessor1,
			fallThruEnclosing, fallThruState, catchDepth)
	}
	if result == TCL_OK && (*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpTarget != uintptr(0) {
		entry = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FfindProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, XTcl_GetString(tls, (*BasicBlock)(unsafe.Pointer(bbPtr)).FjumpTarget))
		jumpTarget = (*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData
		result = sProcessCatchesInBasicBlock(tls, assemEnvPtr, jumpTarget,
			jumpEnclosing, jumpState, catchDepth)
	}

	// All blocks referenced in a jump table are successors.

	if (*BasicBlock)(unsafe.Pointer(bbPtr)).Fflags&BB_JUMPTABLE != 0 {
		for jtEntry = XTcl_FirstHashEntry(tls, (*BasicBlock)(unsafe.Pointer(bbPtr)).FjtPtr, bp+64); result == TCL_OK && jtEntry != uintptr(0); jtEntry = XTcl_NextHashEntry(tls, bp+64) {
			targetLabel = (*Tcl_HashEntry)(unsafe.Pointer(jtEntry)).FclientData
			entry = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FfindProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, XTcl_GetString(tls, targetLabel))
			jumpTarget = (*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData
			result = sProcessCatchesInBasicBlock(tls, assemEnvPtr, jumpTarget,
				jumpEnclosing, jumpState, catchDepth)
		}
	}

	return result
}

//-----------------------------------------------------------------------------
//
// CheckForUnclosedCatches --
//
//	Checks that a sequence of assembly code has no unclosed catches on
//	exit.
//
// Results:
//	Returns a standard Tcl result, with an error message for unclosed
//	catches.
//
//-----------------------------------------------------------------------------

func sCheckForUnclosedCatches(tls *libc.TLS, assemEnvPtr uintptr) int32 { /* tclAssembly.c:3848:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter

	if int32((*BasicBlock)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb)).FcatchState) >= BBCS_INCATCH {
		if (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fflags&TCL_EVAL_DIRECT != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+5303, -1))
			XTcl_SetErrorLine(tls, interp,
				(*BasicBlock1)(unsafe.Pointer((*BasicBlock)(unsafe.Pointer((*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fcurr_bb)).FenclosingCatch)).FstartLine)
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+4182, ts+5349, uintptr(0)))
		}
		return TCL_ERROR
	}
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// BuildExceptionRanges --
//
//	Walks through the assembly code and builds exception ranges for the
//	catches embedded therein.
//
// Results:
//	Returns a standard Tcl result with an error message in the interpreter
//	if anything is unsuccessful.
//
// Side effects:
//	Each contiguous block of code with a given catch exit is assigned an
//	exception range at the appropriate level.
//	Exception ranges in embedded blocks have their levels corrected and
//	collated into the table.
//	Blocks that end with 'beginCatch' are associated with the innermost
//	exception range of the following block.
//
//-----------------------------------------------------------------------------

func sBuildExceptionRanges(tls *libc.TLS, assemEnvPtr uintptr) int32 { /* tclAssembly.c:3893:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var bbPtr uintptr                // Current basic block
	var prevPtr uintptr = uintptr(0) // Previous basic block
	var catchDepth int32 = 0         // Current catch depth
	var maxCatchDepth int32 = 0      // Maximum catch depth in the program
	var catches uintptr              // Stack of catches in progress
	var catchIndices uintptr         // Indices of the exception ranges of catches
	// in progress
	var i int32

	// Determine the max catch depth for the entire assembly script
	// (excluding embedded eval's and expr's, which will be handled later).

	for bbPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb; bbPtr != uintptr(0); bbPtr = (*BasicBlock)(unsafe.Pointer(bbPtr)).Fsuccessor1 {
		if (*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchDepth > maxCatchDepth {
			maxCatchDepth = (*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchDepth
		}
	}

	// Allocate memory for a stack of active catches.

	catches = XTcl_Alloc(tls, uint32(uint64(maxCatchDepth)*uint64(unsafe.Sizeof(uintptr(0)))))
	catchIndices = XTcl_Alloc(tls, uint32(uint64(maxCatchDepth)*uint64(unsafe.Sizeof(int32(0)))))
	for i = 0; i < maxCatchDepth; i++ {
		*(*uintptr)(unsafe.Pointer(catches + uintptr(i)*8)) = uintptr(0)
		*(*int32)(unsafe.Pointer(catchIndices + uintptr(i)*4)) = -1
	}

	// Walk through the basic blocks and manage exception ranges.

	for bbPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb; bbPtr != uintptr(0); bbPtr = (*BasicBlock)(unsafe.Pointer(bbPtr)).Fsuccessor1 {
		sUnstackExpiredCatches(tls, envPtr, bbPtr, catchDepth, catches,
			catchIndices)
		sLookForFreshCatches(tls, bbPtr, catches)
		sStackFreshCatches(tls, assemEnvPtr, bbPtr, catchDepth, catches,
			catchIndices)

		// If the last block was a 'begin catch', fill in the exception range.

		catchDepth = (*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchDepth
		if prevPtr != uintptr(0) && (*BasicBlock)(unsafe.Pointer(prevPtr)).Fflags&BB_BEGINCATCH != 0 {
			for ok := true; ok; ok = 0 != 0 {
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset) - uintptr(4))) = uint8(uint32(*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth-1)*4))) >> 24)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset) - uintptr(4) + uintptr(1))) = uint8(uint32(*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth-1)*4))) >> 16)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset) - uintptr(4) + uintptr(2))) = uint8(uint32(*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth-1)*4))) >> 8)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset) - uintptr(4) + uintptr(3))) = uint8(uint32(*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth-1)*4))))
			}
		}

		prevPtr = bbPtr
	}

	// Make sure that all catches are closed

	if catchDepth != 0 {
		XTcl_Panic(tls,
			ts+5363, 0)
	}

	// Free temp storage

	XTclpFree(tls, catchIndices)
	XTclpFree(tls, catches)

	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// UnstackExpiredCatches --
//
//	Unstacks and closes the exception ranges for any catch contexts that
//	were active in the previous basic block but are inactive in the
//	current one.
//
//-----------------------------------------------------------------------------

func sUnstackExpiredCatches(tls *libc.TLS, envPtr uintptr, bbPtr uintptr, catchDepth int32, catches uintptr, catchIndices uintptr) { /* tclAssembly.c:3981:1: */
	var range1 uintptr // Exception range for a specific catch
	var block uintptr  // Catch block being examined
	var catchState BasicBlockCatchState
	// State of the code relative to the catch
	// block being examined ("in catch" or
	// "caught").

	// Unstack any catches that are deeper than the nesting level of the basic
	// block being entered.

	for catchDepth > (*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchDepth {
		catchDepth--
		if *(*uintptr)(unsafe.Pointer(catches + uintptr(catchDepth)*8)) != uintptr(0) {
			range1 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth)*4)))*28
			(*ExceptionRange)(unsafe.Pointer(range1)).FnumCodeBytes = (*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset - (*ExceptionRange)(unsafe.Pointer(range1)).FcodeOffset
			*(*uintptr)(unsafe.Pointer(catches + uintptr(catchDepth)*8)) = uintptr(0)
			*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth)*4)) = -1
		}
	}

	// Unstack any catches that don't match the basic block being entered,
	// either because they are no longer part of the context, or because the
	// context has changed from INCATCH to CAUGHT.

	catchState = BasicBlockCatchState((*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchState)
	block = (*BasicBlock)(unsafe.Pointer(bbPtr)).FenclosingCatch
	for catchDepth > 0 {
		catchDepth--
		if *(*uintptr)(unsafe.Pointer(catches + uintptr(catchDepth)*8)) != uintptr(0) {
			if *(*uintptr)(unsafe.Pointer(catches + uintptr(catchDepth)*8)) != block || catchState >= BBCS_CAUGHT {
				range1 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth)*4)))*28
				(*ExceptionRange)(unsafe.Pointer(range1)).FnumCodeBytes = (*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset - (*ExceptionRange)(unsafe.Pointer(range1)).FcodeOffset
				*(*uintptr)(unsafe.Pointer(catches + uintptr(catchDepth)*8)) = uintptr(0)
				*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth)*4)) = -1
			}
			catchState = BasicBlockCatchState((*BasicBlock)(unsafe.Pointer(block)).FcatchState)
			block = (*BasicBlock)(unsafe.Pointer(block)).FenclosingCatch
		}
	}
}

//-----------------------------------------------------------------------------
//
// LookForFreshCatches --
//
//	Determines whether a basic block being entered needs any exception
//	ranges that are not already stacked.
//
// Does not create the ranges: this procedure iterates from the innermost
// catch outward, but exception ranges must be created from the outermost
// catch inward.
//
//-----------------------------------------------------------------------------

func sLookForFreshCatches(tls *libc.TLS, bbPtr uintptr, catches uintptr) { /* tclAssembly.c:4051:1: */
	var catchState BasicBlockCatchState
	// State ("in catch" or "caught") of the
	// current catch.
	var block uintptr    // Current enclosing catch
	var catchDepth int32 // Nesting depth of the current catch

	catchState = BasicBlockCatchState((*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchState)
	block = (*BasicBlock)(unsafe.Pointer(bbPtr)).FenclosingCatch
	catchDepth = (*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchDepth
	for catchDepth > 0 {
		catchDepth--
		if *(*uintptr)(unsafe.Pointer(catches + uintptr(catchDepth)*8)) != block && catchState < BBCS_CAUGHT {
			*(*uintptr)(unsafe.Pointer(catches + uintptr(catchDepth)*8)) = block
		}
		catchState = BasicBlockCatchState((*BasicBlock)(unsafe.Pointer(block)).FcatchState)
		block = (*BasicBlock)(unsafe.Pointer(block)).FenclosingCatch
	}
}

//-----------------------------------------------------------------------------
//
// StackFreshCatches --
//
//	Make ExceptionRange records for any catches that are in the basic
//	block being entered and were not in the previous basic block.
//
//-----------------------------------------------------------------------------

func sStackFreshCatches(tls *libc.TLS, assemEnvPtr uintptr, bbPtr uintptr, catchDepth int32, catches uintptr, catchIndices uintptr) { /* tclAssembly.c:4087:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var range1 uintptr    // Exception range for a specific catch
	var block uintptr     // Catch block being examined
	var errorExit uintptr // Error exit from the catch block
	var entryPtr uintptr

	catchDepth = 0

	// Iterate through the enclosing catch blocks from the outside in,
	// looking for ones that don't have exception ranges (and are uncaught)

	for catchDepth = 0; catchDepth < (*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchDepth; catchDepth++ {
		if *(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth)*4)) == -1 && *(*uintptr)(unsafe.Pointer(catches + uintptr(catchDepth)*8)) != uintptr(0) {
			// Create an exception range for a block that needs one.

			block = *(*uintptr)(unsafe.Pointer(catches + uintptr(catchDepth)*8))
			*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth)*4)) = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
			range1 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(*(*int32)(unsafe.Pointer(catchIndices + uintptr(catchDepth)*4)))*28
			(*ExceptionRange)(unsafe.Pointer(range1)).FnestingLevel = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth + catchDepth
			(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
				if (*ExceptionRange)(unsafe.Pointer(range1)).FnestingLevel+1 > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
					return (*ExceptionRange)(unsafe.Pointer(range1)).FnestingLevel + 1
				}
				return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
			}()
			(*ExceptionRange)(unsafe.Pointer(range1)).FcodeOffset = (*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset

			entryPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(assemEnvPtr + 16 /* &.labelHash */)).FfindProc})).f(tls, assemEnvPtr+16 /* &.labelHash */, XTcl_GetString(tls, (*BasicBlock)(unsafe.Pointer(block)).FjumpTarget))
			if entryPtr == uintptr(0) {
				XTcl_Panic(tls,
					ts+5445, 0)
			}

			errorExit = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
			(*ExceptionRange)(unsafe.Pointer(range1)).FcatchOffset = (*BasicBlock)(unsafe.Pointer(errorExit)).FstartOffset
		}
	}
}

//-----------------------------------------------------------------------------
//
// RestoreEmbeddedExceptionRanges --
//
//	Processes an assembly script, replacing any exception ranges that
//	were present in embedded code.
//
//-----------------------------------------------------------------------------

func sRestoreEmbeddedExceptionRanges(tls *libc.TLS, assemEnvPtr uintptr) { /* tclAssembly.c:4150:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var bbPtr uintptr   // Current basic block
	var rangeBase int32 // Base of the foreign exception ranges when
	// they are reinstalled
	var rangeIndex int32 // Index of the current foreign exception
	// range as reinstalled
	var range1 uintptr   // Current foreign exception range
	var opcode uint8     // Current instruction's opcode
	var catchIndex int32 // Index of the exception range to which the
	// current instruction refers
	var i int32

	// Walk the basic blocks looking for exceptions in embedded scripts.

	for bbPtr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb; bbPtr != uintptr(0); bbPtr = (*BasicBlock)(unsafe.Pointer(bbPtr)).Fsuccessor1 {
		if (*BasicBlock)(unsafe.Pointer(bbPtr)).FforeignExceptionCount != 0 {
			// Reinstall the embedded exceptions and track their nesting level

			rangeBase = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext
			for i = 0; i < (*BasicBlock)(unsafe.Pointer(bbPtr)).FforeignExceptionCount; i++ {
				range1 = (*BasicBlock)(unsafe.Pointer(bbPtr)).FforeignExceptions + uintptr(i)*28
				rangeIndex = XTclCreateExceptRange(tls, (*ExceptionRange)(unsafe.Pointer(range1)).Ftype, envPtr)
				*(*int32)(unsafe.Pointer(range1 + 4)) += (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth + (*BasicBlock)(unsafe.Pointer(bbPtr)).FcatchDepth
				libc.Xmemcpy(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(rangeIndex)*28, range1,
					uint64(unsafe.Sizeof(ExceptionRange{})))
				if (*ExceptionRange)(unsafe.Pointer(range1)).FnestingLevel >= (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = (*ExceptionRange)(unsafe.Pointer(range1)).FnestingLevel + 1
				}
			}

			// Walk through the bytecode of the basic block, and relocate
			// INST_BEGIN_CATCH4 instructions to the new locations

			i = (*BasicBlock)(unsafe.Pointer(bbPtr)).FstartOffset
			for i < (*BasicBlock1)(unsafe.Pointer((*BasicBlock)(unsafe.Pointer(bbPtr)).Fsuccessor1)).FstartOffset {
				opcode = *(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(i)))
				if int32(opcode) == INST_BEGIN_CATCH4 {
					catchIndex = int32(uint32(int32(*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(i) + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(i) + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(i) + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(i) + uintptr(1) + uintptr(3)))))
					if catchIndex >= (*BasicBlock)(unsafe.Pointer(bbPtr)).FforeignExceptionBase &&
						catchIndex < (*BasicBlock)(unsafe.Pointer(bbPtr)).FforeignExceptionBase+(*BasicBlock)(unsafe.Pointer(bbPtr)).FforeignExceptionCount {
						catchIndex = catchIndex - (*BasicBlock)(unsafe.Pointer(bbPtr)).FforeignExceptionBase
						catchIndex = catchIndex + rangeBase
						for ok := true; ok; ok = 0 != 0 {
							*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(i) + uintptr(1))) = uint8(uint32(catchIndex) >> 24)
							*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(i) + uintptr(1) + uintptr(1))) = uint8(uint32(catchIndex) >> 16)
							*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(i) + uintptr(1) + uintptr(2))) = uint8(uint32(catchIndex) >> 8)
							*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(i) + uintptr(1) + uintptr(3))) = uint8(uint32(catchIndex))
						}
					}
				}
				i = i + XtclInstructionTable[opcode].FnumBytes
			}
		}
	}
}

//-----------------------------------------------------------------------------
//
// ResetVisitedBasicBlocks --
//
//	Turns off the 'visited' flag in all basic blocks at the conclusion
//	of a pass.
//
//-----------------------------------------------------------------------------

func sResetVisitedBasicBlocks(tls *libc.TLS, assemEnvPtr uintptr) { /* tclAssembly.c:4226:1: */
	var block uintptr

	for block = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).Fhead_bb; block != uintptr(0); block = (*BasicBlock)(unsafe.Pointer(block)).Fsuccessor1 {
		*(*int32)(unsafe.Pointer(block + 112)) &= libc.CplInt32(BB_VISITED)
	}
}

//-----------------------------------------------------------------------------
//
// AddBasicBlockRangeToErrorInfo --
//
//	Updates the error info of the Tcl interpreter to show a given basic
//	block in the code.
//
// This procedure is used to label the callstack with source location
// information when reporting an error in stack checking.
//
//-----------------------------------------------------------------------------

func sAddBasicBlockRangeToErrorInfo(tls *libc.TLS, assemEnvPtr uintptr, bbPtr uintptr) { /* tclAssembly.c:4252:1: */
	var envPtr uintptr = (*AssemblyEnv)(unsafe.Pointer(assemEnvPtr)).FenvPtr
	// Compilation environment
	var interp uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	// Tcl interpreter
	var lineNo uintptr // Line number in the source

	XTcl_AddErrorInfo(tls, interp, ts+5513)
	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			lineNo = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(lineNo)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(lineNo)).Fbytes = uintptr(0)
		*(*int32)(unsafe.Pointer(lineNo + 32)) = int32((*BasicBlock)(unsafe.Pointer(bbPtr)).FstartLine)
		(*Tcl_Obj)(unsafe.Pointer(lineNo)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(lineNo)).FrefCount++
	XTcl_AppendObjToErrorInfo(tls, interp, lineNo)
	XTcl_AddErrorInfo(tls, interp, ts+5550)
	if (*BasicBlock)(unsafe.Pointer(bbPtr)).Fsuccessor1 != uintptr(0) {
		XTcl_SetIntObj(tls, lineNo, (*BasicBlock1)(unsafe.Pointer((*BasicBlock)(unsafe.Pointer(bbPtr)).Fsuccessor1)).FstartLine)
		XTcl_AppendObjToErrorInfo(tls, interp, lineNo)
	} else {
		XTcl_AddErrorInfo(tls, interp, ts+5556)
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = lineNo
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

//-----------------------------------------------------------------------------
//
// DupAssembleCodeInternalRep --
//
//	Part of the Tcl object type implementation for Tcl assembly language
//	bytecode. We do not copy the bytecode internalrep. Instead, we return
//	without setting copyPtr->typePtr, so the copy is a plain string copy
//	of the assembly source, and if it is to be used as a compiled
//	expression, it will need to be reprocessed.
//
//	This makes sense, because with Tcl's copy-on-write practices, the
//	usual (only?) time Tcl_DuplicateObj() will be called is when the copy
//	is about to be modified, which would invalidate any copied bytecode
//	anyway. The only reason it might make sense to copy the bytecode is if
//	we had some modifying routines that operated directly on the internalrep,
//	as we do for lists and dicts.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//-----------------------------------------------------------------------------

func sDupAssembleCodeInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclAssembly.c:4304:1: */
	_ = srcPtr
	_ = copyPtr

	return
}

//-----------------------------------------------------------------------------
//
// FreeAssembleCodeInternalRep --
//
//	Part of the Tcl object type implementation for Tcl expression
//	bytecode. Frees the storage allocated to hold the internal rep, unless
//	ref counts indicate bytecode execution is still in progress.
//
// Results:
//	None.
//
// Side effects:
//	May free allocated memory. Leaves objPtr untyped.
//
//-----------------------------------------------------------------------------

func sFreeAssembleCodeInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclAssembly.c:4333:1: */
	var codePtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if libc.PostDecInt32(&(*ByteCode)(unsafe.Pointer(codePtr)).FrefCount, 1) <= 1 {
		XTclCleanupByteCode(tls, codePtr)
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// One of the following structures exists for each asynchronous handler:

type AsyncHandler1 = struct {
	Fready        int32
	F__ccgo_pad1  [4]byte
	FnextPtr      uintptr
	Fproc         uintptr
	FclientData   ClientData
	ForiginTsd    uintptr
	ForiginThrdId Tcl_ThreadId
} /* tclAsync.c:18:1 */

// One of the following structures exists for each asynchronous handler:

type AsyncHandler = AsyncHandler1 /* tclAsync.c:41:3 */

type ThreadSpecificData = struct {
	FfirstHandler uintptr
	FlastHandler  uintptr
	FasyncReady   int32
	FasyncActive  int32
	FasyncMutex   Tcl_Mutex
}                             /* tclAsync.c:63:3 */
var dataKey Tcl_ThreadDataKey /* tclAsync.c:64:26: */

//----------------------------------------------------------------------
//
// TclFinalizeAsync --
//
//	Finalizes the mutex in the thread local data structure for the async
//	subsystem.
//
// Results:
//	None.
//
// Side effects:
//	Forgets knowledge of the mutex should it have been created.
//
//----------------------------------------------------------------------

func XTclFinalizeAsync(tls *libc.TLS) { /* tclAsync.c:84:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey)), int32(unsafe.Sizeof(ThreadSpecificData{})))

	if (*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FasyncMutex != uintptr(0) {

	}
}

//----------------------------------------------------------------------
//
// Tcl_AsyncCreate --
//
//	This procedure creates the data structures for an asynchronous
//	handler, so that no memory has to be allocated when the handler is
//	activated.
//
// Results:
//	The return value is a token for the handler, which can be used to
//	activate it later on.
//
// Side effects:
//	Information about the handler is recorded.
//
//----------------------------------------------------------------------

func XTcl_AsyncCreate(tls *libc.TLS, proc uintptr, clientData ClientData) Tcl_AsyncHandler { /* tclAsync.c:113:1: */
	var asyncPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey)), int32(unsafe.Sizeof(ThreadSpecificData{})))

	asyncPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(AsyncHandler{})))
	(*AsyncHandler)(unsafe.Pointer(asyncPtr)).Fready = 0
	(*AsyncHandler)(unsafe.Pointer(asyncPtr)).FnextPtr = uintptr(0)
	(*AsyncHandler)(unsafe.Pointer(asyncPtr)).Fproc = proc
	(*AsyncHandler)(unsafe.Pointer(asyncPtr)).FclientData = clientData
	(*AsyncHandler)(unsafe.Pointer(asyncPtr)).ForiginTsd = tsdPtr
	(*AsyncHandler)(unsafe.Pointer(asyncPtr)).ForiginThrdId = XTcl_GetCurrentThread(tls)

	if (*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FfirstHandler == uintptr(0) {
		(*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FfirstHandler = asyncPtr
	} else {
		(*AsyncHandler)(unsafe.Pointer((*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FlastHandler)).FnextPtr = asyncPtr
	}
	(*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FlastHandler = asyncPtr

	return asyncPtr
}

//----------------------------------------------------------------------
//
// Tcl_AsyncMark --
//
//	This procedure is called to request that an asynchronous handler be
//	invoked as soon as possible. It's typically called from an interrupt
//	handler, where it isn't safe to do anything that depends on or
//	modifies application state.
//
// Results:
//	None.
//
// Side effects:
//	The handler gets marked for invocation later.
//
//----------------------------------------------------------------------

func XTcl_AsyncMark(tls *libc.TLS, async Tcl_AsyncHandler) { /* tclAsync.c:160:1: */
	var token uintptr = async

	(*AsyncHandler)(unsafe.Pointer(token)).Fready = 1
	if !((*struct {
		FfirstHandler uintptr
		FlastHandler  uintptr
		FasyncReady   int32
		FasyncActive  int32
		FasyncMutex   Tcl_Mutex
	})(unsafe.Pointer((*AsyncHandler)(unsafe.Pointer(token)).ForiginTsd)).FasyncActive != 0) {
		(*struct {
			FfirstHandler uintptr
			FlastHandler  uintptr
			FasyncReady   int32
			FasyncActive  int32
			FasyncMutex   Tcl_Mutex
		})(unsafe.Pointer((*AsyncHandler)(unsafe.Pointer(token)).ForiginTsd)).FasyncReady = 1
		XTcl_ThreadAlert(tls, (*AsyncHandler)(unsafe.Pointer(token)).ForiginThrdId)
	}

}

//----------------------------------------------------------------------
//
// Tcl_AsyncInvoke --
//
//	This procedure is called at a "safe" time at background level to
//	invoke any active asynchronous handlers.
//
// Results:
//	The return value is a normal Tcl result, which is intended to replace
//	the code argument as the current completion code for interp.
//
// Side effects:
//	Depends on the handlers that are active.
//
//----------------------------------------------------------------------

func XTcl_AsyncInvoke(tls *libc.TLS, interp uintptr, code int32) int32 { /* tclAsync.c:193:1: */
	var asyncPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey)), int32(unsafe.Sizeof(ThreadSpecificData{})))

	if (*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FasyncReady == 0 {

		return code
	}
	(*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FasyncReady = 0
	(*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FasyncActive = 1
	if interp == uintptr(0) {
		code = 0
	}

	// Make one or more passes over the list of handlers, invoking at most one
	// handler in each pass. After invoking a handler, go back to the start of
	// the list again so that (a) if a new higher-priority handler gets marked
	// while executing a lower priority handler, we execute the higher-
	// priority handler next, and (b) if a handler gets deleted during the
	// execution of a handler, then the list structure may change so it isn't
	// safe to continue down the list anyway.

	for 1 != 0 {
		for asyncPtr = (*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FfirstHandler; asyncPtr != uintptr(0); asyncPtr = (*AsyncHandler)(unsafe.Pointer(asyncPtr)).FnextPtr {
			if (*AsyncHandler)(unsafe.Pointer(asyncPtr)).Fready != 0 {
				break
			}
		}
		if asyncPtr == uintptr(0) {
			break
		}
		(*AsyncHandler)(unsafe.Pointer(asyncPtr)).Fready = 0

		code = (*struct {
			f func(*libc.TLS, ClientData, uintptr, int32) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*AsyncHandler)(unsafe.Pointer(asyncPtr)).Fproc})).f(tls, (*AsyncHandler)(unsafe.Pointer(asyncPtr)).FclientData, interp, code)

	}
	(*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FasyncActive = 0

	return code
}

//----------------------------------------------------------------------
//
// Tcl_AsyncDelete --
//
//	Frees up all the state for an asynchronous handler. The handler should
//	never be used again.
//
// Results:
//	None.
//
// Side effects:
//	The state associated with the handler is deleted.
//
//	Failure to locate the handler in current thread private list
//	of async handlers will result in panic; exception: the list
//	is already empty (potential trouble?).
//	Consequently, threads should create and delete handlers
//	themselves.  I.e. a handler created by one should not be
//	deleted by some other thread.
//
//----------------------------------------------------------------------

func XTcl_AsyncDelete(tls *libc.TLS, async Tcl_AsyncHandler) { /* tclAsync.c:271:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey)), int32(unsafe.Sizeof(ThreadSpecificData{})))
	var asyncPtr uintptr = async
	var prevPtr uintptr
	var thisPtr uintptr

	// Assure early handling of the constraint

	if (*AsyncHandler)(unsafe.Pointer(asyncPtr)).ForiginThrdId != XTcl_GetCurrentThread(tls) {
		XTcl_Panic(tls, ts+5577, 0)
	}

	// If we come to this point when TSD's for the current
	// thread have already been garbage-collected, we are
	// in the _serious_ trouble. OTOH, we tolerate calling
	// with already cleaned-up handler list (should we?).

	if (*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FfirstHandler != uintptr(0) {
		prevPtr = libc.AssignUintptr(&thisPtr, (*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FfirstHandler)
		for thisPtr != uintptr(0) && thisPtr != asyncPtr {
			prevPtr = thisPtr
			thisPtr = (*AsyncHandler)(unsafe.Pointer(thisPtr)).FnextPtr
		}
		if thisPtr == uintptr(0) {
			XTcl_Panic(tls, ts+5636, 0)
		}
		if asyncPtr == (*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FfirstHandler {
			(*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FfirstHandler = (*AsyncHandler)(unsafe.Pointer(asyncPtr)).FnextPtr
		} else {
			(*AsyncHandler)(unsafe.Pointer(prevPtr)).FnextPtr = (*AsyncHandler)(unsafe.Pointer(asyncPtr)).FnextPtr
		}
		if asyncPtr == (*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FlastHandler {
			(*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FlastHandler = prevPtr
		}
	}

	XTclpFree(tls, asyncPtr)
}

//----------------------------------------------------------------------
//
// Tcl_AsyncReady --
//
//	This procedure can be used to tell whether Tcl_AsyncInvoke needs to be
//	called. This procedure is the external interface for checking the
//	thread-specific asyncReady variable.
//
// Results:
//	The return value is 1 whenever a handler is ready and is 0 when no
//	handlers are ready.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_AsyncReady(tls *libc.TLS) int32 { /* tclAsync.c:336:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey)), int32(unsafe.Sizeof(ThreadSpecificData{})))
	return (*ThreadSpecificData)(unsafe.Pointer(tsdPtr)).FasyncReady
}

func XTclGetAsyncReadyPtr(tls *libc.TLS) uintptr { /* tclAsync.c:342:5: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey)), int32(unsafe.Sizeof(ThreadSpecificData{})))
	return tsdPtr + 16
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Static assertion.  Requires support in the compiler.

// Determine whether we're using IEEE floating point

// Largest odd integer that can be represented exactly in a double

// The following structure defines the client data for a math function
// registered with Tcl_CreateMathFunc

type OldMathFuncData1 = struct {
	Fproc        uintptr
	FnumArgs     int32
	F__ccgo_pad1 [4]byte
	FargTypes    uintptr
	FclientData  ClientData
} /* tclBasic.c:45:9 */

// Static assertion.  Requires support in the compiler.

// Determine whether we're using IEEE floating point

// Largest odd integer that can be represented exactly in a double

// The following structure defines the client data for a math function
// registered with Tcl_CreateMathFunc

type OldMathFuncData = OldMathFuncData1 /* tclBasic.c:50:3 */

// This is the script cancellation struct and hash table. The hash table is
// used to keep track of the information necessary to process script
// cancellation requests, including the original interp, asynchronous handler
// tokens (created by Tcl_AsyncCreate), and the clientData and flags arguments
// passed to Tcl_CancelEval on a per-interp basis. The cancelLock mutex is
// used for protecting calls to Tcl_CancelEval as well as protecting access to
// the hash table below.

type CancelInfo = struct {
	Finterp      uintptr
	Fasync       Tcl_AsyncHandler
	Fresult      uintptr
	Flength      int32
	F__ccgo_pad1 [4]byte
	FclientData  ClientData
	Fflags       int32
	F__ccgo_pad2 [4]byte
}                                    /* tclBasic.c:71:3 */
var cancelTable Tcl_HashTable        /* tclBasic.c:72:22: */
var cancelTableInitialized int32 = 0 /* tclBasic.c:73:12 */

// Magical counts for the number of arguments accepted by a coroutine command
// after particular kinds of [yield].

// The following structure define the commands in the Tcl core.

type CmdInfo = struct {
	Fname        uintptr
	FobjProc     uintptr
	FcompileProc uintptr
	FnreProc     uintptr
	Fflags       int32
	F__ccgo_pad1 [4]byte
} /* tclBasic.c:186:3 */

// CMD_COMPILES_EXPANDED - Whether the compiler for this command can handle
// expansion for itself rather than needing the generic layer to take care of
// it for it. Defined in tclInt.h.

// The built-in commands, and the functions that implement them:

var builtInCmds = [82]CmdInfo{
	// Commands in the generic core.

	{Fname: ts + 2666, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5679, FobjProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5685, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5691, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5696, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 2814, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5702, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5711, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5721, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 2994, FobjProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 3053, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5727, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5731, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5739, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5746, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5753, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 3072, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5756, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 3268, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5761, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5769, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5776, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 3395, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE | CMD_COMPILES_EXPANDED},
	{Fname: ts + 5784, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5792, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5797, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5804, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5812, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5821, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5830, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5838, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5843, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5849, FobjProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5857, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 3631, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5862, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5869, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5876, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5883, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5888, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5892, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5898, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5904, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5911, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5920, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5926, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5932, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 3965, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5936, FobjProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 4011, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 4017, FobjProc: 0, FcompileProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5944, FobjProc: 0, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 4037, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5950, FcompileProc: 0, FnreProc: 0, Fflags: CMD_IS_SAFE},

	// Commands in the OS-interface. Note that many of these are unsafe.

	{Fname: ts + 5958, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5964, FobjProc: 0},
	{Fname: ts + 5967, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5973, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5977, FobjProc: 0},
	{Fname: ts + 5982, FobjProc: 0},
	{Fname: ts + 5987, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 5996, FobjProc: 0},
	{Fname: ts + 6007, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6013, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6023, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6029, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6034, FobjProc: 0},
	{Fname: ts + 3462, FobjProc: 0},
	{Fname: ts + 6039, FobjProc: 0},
	{Fname: ts + 6044, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6048, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6053, FobjProc: 0},
	{Fname: ts + 6057, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6062, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6067, FobjProc: 0},
	{Fname: ts + 6074, FobjProc: 0, FnreProc: 0},
	{Fname: ts + 6081, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6086, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6091, FobjProc: 0},
	{Fname: ts + 6098, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{Fname: ts + 6105, FobjProc: 0, Fflags: CMD_IS_SAFE},
	{},
} /* tclBasic.c:199:22 */

// Math functions. All are safe.

type BuiltinFuncDef = struct {
	Fname       uintptr
	FobjCmdProc uintptr
	FclientData ClientData
} /* tclBasic.c:307:3 */
var sBuiltinFuncTable = [30]BuiltinFuncDef{
	{Fname: ts + 6111, FobjCmdProc: 0},
	{Fname: ts + 6115, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6120, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6125, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6130, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6136, FobjCmdProc: 0},
	{Fname: ts + 6141, FobjCmdProc: 0},
	{Fname: ts + 6146, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6150, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6155, FobjCmdProc: 0},
	{Fname: ts + 6162, FobjCmdProc: 0},
	{Fname: ts + 6169, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6173, FobjCmdProc: 0},
	{Fname: ts + 6179, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6184, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6190, FobjCmdProc: 0},
	{Fname: ts + 6194, FobjCmdProc: 0},
	{Fname: ts + 6200, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6204, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6210, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6214, FobjCmdProc: 0},
	{Fname: ts + 6219, FobjCmdProc: 0},
	{Fname: ts + 6225, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6229, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6234, FobjCmdProc: 0},
	{Fname: ts + 6239, FobjCmdProc: 0},
	{Fname: ts + 6245, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6249, FobjCmdProc: 0, FclientData: 0},
	{Fname: ts + 6254, FobjCmdProc: 0},
	{},
} /* tclBasic.c:308:29 */

// TIP#174's math operators. All are safe.

type OpCmdInfo = struct {
	Fname        uintptr
	FobjProc     uintptr
	FcompileProc uintptr
	Fi           struct{ FnumArgs int32 }
	F__ccgo_pad1 [4]byte
	Fexpected    uintptr
} /* tclBasic.c:355:3 */
var mathOpCmds = [24]OpCmdInfo{
	{Fname: ts + 6259, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 1
		return r
	}(), Fexpected: ts + 6261 /* "integer" */},
	{Fname: ts + 6269, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 1
		return r
	}(), Fexpected: ts + 4126 /* "boolean" */},
	{Fname: ts + 6271, FobjProc: 0, FcompileProc: 0},
	{Fname: ts + 6273, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 1
		return r
	}()},
	{Fname: ts + 6275, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = -1
		return r
	}()},
	{Fname: ts + 6277, FobjProc: 0, FcompileProc: 0},
	{Fname: ts + 6279, FobjProc: 0, FcompileProc: 0},
	{Fname: ts + 6281, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 1
		return r
	}()},
	{Fname: ts + 6284, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 2
		return r
	}(), Fexpected: ts + 6287 /* "integer shift" */},
	{Fname: ts + 6301, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 2
		return r
	}(), Fexpected: ts + 6287 /* "integer shift" */},
	{Fname: ts + 6304, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 2
		return r
	}(), Fexpected: ts + 6306 /* "integer integer" */},
	{Fname: ts + 6322, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 2
		return r
	}(), Fexpected: ts + 6325 /* "value value" */},
	{Fname: ts + 6337, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 2
		return r
	}(), Fexpected: ts + 6325 /* "value value" */},
	{Fname: ts + 6340, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 2
		return r
	}(), Fexpected: ts + 6343 /* "value list" */},
	{Fname: ts + 6354, FobjProc: 0, FcompileProc: 0, Fi: func() (r struct{ FnumArgs int32 }) {
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = 2
		return r
	}(), Fexpected: ts + 6343 /* "value list" */},
	{Fname: ts + 6357, FobjProc: 0, FcompileProc: 0, Fexpected: ts + 6359},
	{Fname: ts + 6377, FobjProc: 0, FcompileProc: 0, Fexpected: ts + 6359},
	{Fname: ts + 6379, FobjProc: 0, FcompileProc: 0},
	{Fname: ts + 6381, FobjProc: 0, FcompileProc: 0},
	{Fname: ts + 6384, FobjProc: 0, FcompileProc: 0},
	{Fname: ts + 6386, FobjProc: 0, FcompileProc: 0},
	{Fname: ts + 6389, FobjProc: 0, FcompileProc: 0},
	{Fname: ts + 2991, FobjProc: 0, FcompileProc: 0},
	{}} /* tclBasic.c:356:24 */

//----------------------------------------------------------------------
//
// TclFinalizeEvaluation --
//
//	Finalizes the script cancellation hash table.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFinalizeEvaluation(tls *libc.TLS) { /* tclBasic.c:424:1: */

	if cancelTableInitialized == 1 {
		XTcl_DeleteHashTable(tls, uintptr(unsafe.Pointer(&cancelTable)))
		cancelTableInitialized = 0
	}

}

//----------------------------------------------------------------------
//
// Tcl_CreateInterp --
//
//	Create a new TCL command interpreter.
//
// Results:
//	The return value is a token for the interpreter, which may be used in
//	calls to functions like Tcl_CreateCmd, Tcl_Eval, or Tcl_DeleteInterp.
//
// Side effects:
//	The command interpreter is initialized with the built-in commands and
//	with the variables documented in tclvars(n).
//
//----------------------------------------------------------------------

func XTcl_CreateInterp(tls *libc.TLS) uintptr { /* tclBasic.c:452:12: */
	bp := tls.Alloc(70)
	defer tls.Free(70)

	var iPtr uintptr
	var interp uintptr
	var cmdPtr uintptr
	var builtinFuncPtr uintptr
	var opcmdInfoPtr uintptr
	var cmdInfoPtr uintptr
	var nsPtr uintptr
	var hPtr uintptr
	// var isNew int32 at bp+32, 4

	var cancelInfo uintptr
	// var order struct {F__ccgo_pad1 [0]uint16;Fc [2]int8;} at bp+68, 2

	// var mathFuncName [32]int8 at bp+36, 32

	var framePtr uintptr

	XTclInitSubsystems(tls)

	// Panic if someone updated the CallFrame structure without also updating
	// the Tcl_CallFrame structure (or vice versa).

	if uint64(unsafe.Sizeof(Tcl_CallFrame{})) < uint64(unsafe.Sizeof(CallFrame{})) {
		//NOTREACHED
		XTcl_Panic(tls, ts+6392, 0)
	}

	if cancelTableInitialized == 0 {

		if cancelTableInitialized == 0 {
			XTcl_InitHashTable(tls, uintptr(unsafe.Pointer(&cancelTable)), 1)
			cancelTableInitialized = 1
		}

	}

	// Initialize support for namespaces and create the global namespace
	// (whose name is ""; an alias is "::"). This also initializes the Tcl
	// object type table and other object management code.

	iPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Interp{})))
	interp = iPtr

	(*Interp)(unsafe.Pointer(iPtr)).Fresult = iPtr + 464 /* &.resultSpace */
	(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FerrorLine = 0
	(*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).FrefCount++
	(*Interp)(unsafe.Pointer(iPtr)).Fhandle = XTclHandleCreate(tls, iPtr)
	(*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FhiddenCmdTablePtr = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FinterpInfo = uintptr(0)

	{
	}

	*(*uintptr)(unsafe.Pointer(iPtr + 64)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{XTclOptimizeBytecode}))

	(*Interp)(unsafe.Pointer(iPtr)).FnumLevels = 0
	(*Interp)(unsafe.Pointer(iPtr)).FmaxNestingDepth = MAX_NESTING_DEPTH
	(*Interp)(unsafe.Pointer(iPtr)).FframePtr = uintptr(0)    // Initialise as soon as :: is available
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = uintptr(0) // Initialise as soon as :: is available

	// TIP #280 - Initialize the arrays used to extend the ByteCode and Proc
	// structures.

	(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
	(*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
	(*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
	(*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
	XTcl_InitHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr, 1)
	XTcl_InitHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr, 1)
	XTcl_InitHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr, 1)
	XTcl_InitHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr, 1)
	(*Interp)(unsafe.Pointer(iPtr)).FscriptCLLocPtr = uintptr(0)

	(*Interp)(unsafe.Pointer(iPtr)).FactiveVarTracePtr = uintptr(0)

	(*Interp)(unsafe.Pointer(iPtr)).FreturnOpts = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo = uintptr(0)
	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Interp)(unsafe.Pointer(iPtr)).FeiVar = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FeiVar)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FeiVar)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FeiVar)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FeiVar)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FeiVar)).Fbytes, ts+6441, uint64(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FeiVar)).Fbytes + 11)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FeiVar)).Flength = int32(uint64(unsafe.Sizeof([12]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FeiVar)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FeiVar)).FrefCount++
	(*Interp)(unsafe.Pointer(iPtr)).FerrorStack = XTcl_NewListObj(tls, 0, uintptr(0))
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorStack)).FrefCount++
	(*Interp)(unsafe.Pointer(iPtr)).FresetErrorStack = 1
	for ok2 := true; ok2; ok2 = 0 != 0 {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Interp)(unsafe.Pointer(iPtr)).FupLiteral = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FupLiteral)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FupLiteral)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FupLiteral)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FupLiteral)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FupLiteral)).Fbytes, ts+6453, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FupLiteral)).Fbytes + 2)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FupLiteral)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FupLiteral)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FupLiteral)).FrefCount++
	for ok4 := true; ok4; ok4 = 0 != 0 {
		for ok5 := true; ok5; ok5 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Interp)(unsafe.Pointer(iPtr)).FcallLiteral = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)).Fbytes, ts+6456, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)).Fbytes + 4)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)).FrefCount++
	for ok6 := true; ok6; ok6 = 0 != 0 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)).Fbytes, ts+6461, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)).Fbytes + 5)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)).FrefCount++
	(*Interp)(unsafe.Pointer(iPtr)).FinnerContext = XTcl_NewListObj(tls, 0, uintptr(0))
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinnerContext)).FrefCount++
	(*Interp)(unsafe.Pointer(iPtr)).FerrorCode = uintptr(0)
	for ok8 := true; ok8; ok8 = 0 != 0 {
		for ok9 := true; ok9; ok9 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Interp)(unsafe.Pointer(iPtr)).FecVar = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FecVar)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FecVar)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FecVar)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FecVar)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FecVar)).Fbytes, ts+6467, uint64(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FecVar)).Fbytes + 11)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FecVar)).Flength = int32(uint64(unsafe.Sizeof([12]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FecVar)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FecVar)).FrefCount++
	(*Interp)(unsafe.Pointer(iPtr)).FreturnLevel = 1
	(*Interp)(unsafe.Pointer(iPtr)).FreturnCode = TCL_OK

	(*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr = uintptr(0) // Initialise as soon as :: is available
	(*Interp)(unsafe.Pointer(iPtr)).FlookupNsPtr = uintptr(0)

	(*Interp)(unsafe.Pointer(iPtr)).FappendResult = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FappendAvl = 0
	(*Interp)(unsafe.Pointer(iPtr)).FappendUsed = 0

	XTcl_InitHashTable(tls, iPtr+224, 0)
	(*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown = uintptr(0)

	// TIP #268
	if libc.X_wgetenv(tls, wtext) == uintptr(0) {
		(*Interp)(unsafe.Pointer(iPtr)).FpackagePrefer = PKG_PREFER_STABLE
	} else {
		(*Interp)(unsafe.Pointer(iPtr)).FpackagePrefer = PKG_PREFER_LATEST
	}

	(*Interp)(unsafe.Pointer(iPtr)).FcmdCount = 0
	XTclInitLiteralTable(tls, iPtr+336)
	(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch = 0
	(*Interp)(unsafe.Pointer(iPtr)).FcompiledProcPtr = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FresolverPtr = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FevalFlags = 0
	(*Interp)(unsafe.Pointer(iPtr)).FscriptFile = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).Fflags = 0
	(*Interp)(unsafe.Pointer(iPtr)).FtracePtr = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FtracesForbiddingInline = 0
	(*Interp)(unsafe.Pointer(iPtr)).FactiveCmdTracePtr = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FactiveInterpTracePtr = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FassocData = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr = uintptr(0) // Set after namespaces initialized.
	(*Interp)(unsafe.Pointer(iPtr)).FemptyObjPtr = XTcl_NewObj(tls)
	// Another empty object.
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FemptyObjPtr)).FrefCount++
	*(*int8)(unsafe.Pointer(iPtr + 464)) = int8(0)
	(*Interp)(unsafe.Pointer(iPtr)).FthreadId = XTcl_GetCurrentThread(tls)

	// TIP #378
	if libc.X_wgetenv(tls, wtext+44) != uintptr(0) {
		*(*int32)(unsafe.Pointer(iPtr + 424)) |= INTERP_DEBUG_FRAME
	}

	// Initialise the tables for variable traces and searches *before*
	// creating the global ns - so that the trace on errorInfo can be
	// recorded.

	XTcl_InitHashTable(tls, iPtr+1008, 1)
	XTcl_InitHashTable(tls, iPtr+1096, 1)

	(*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr = uintptr(0) // Force creation of global ns below.
	(*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr = XTcl_CreateNamespace(tls, interp, ts+2631,
		uintptr(0), uintptr(0))
	if (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr == uintptr(0) {
		XTcl_Panic(tls, ts+6479, 0)
	}

	// Initialise the rootCallframe. It cannot be allocated on the stack, as
	// it has to be in place before TclCreateExecEnv tries to use a variable.

	// This is needed to satisfy GCC 3.3's strict aliasing rules
	framePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CallFrame{})))
	XTcl_PushCallFrame(tls, interp, framePtr,
		(*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr /*isProcCallFrame*/, 0)
	(*CallFrame)(unsafe.Pointer(framePtr)).Fobjc = 0

	(*Interp)(unsafe.Pointer(iPtr)).FframePtr = framePtr
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = framePtr
	(*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr = framePtr

	// Initialize support for code compilation and execution. We call
	// TclCreateExecEnv after initializing namespaces since it tries to
	// reference a Tcl variable (it links to the Tcl "tcl_traceExec"
	// variable).

	(*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr = XTclCreateExecEnv(tls, interp, INTERP_STACK_INITIAL_SIZE)

	// TIP #219, Tcl Channel Reflection API support.

	(*Interp)(unsafe.Pointer(iPtr)).FchanMsg = uintptr(0)

	// TIP #285, Script cancellation support.

	(*Interp)(unsafe.Pointer(iPtr)).FasyncCancelMsg = XTcl_NewObj(tls)

	cancelInfo = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CancelInfo{})))
	(*CancelInfo)(unsafe.Pointer(cancelInfo)).Finterp = interp

	(*Interp)(unsafe.Pointer(iPtr)).FasyncCancel = XTcl_AsyncCreate(tls, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32) int32
	}{sCancelEvalProc})), cancelInfo)
	(*CancelInfo)(unsafe.Pointer(cancelInfo)).Fasync = (*Interp)(unsafe.Pointer(iPtr)).FasyncCancel
	(*CancelInfo)(unsafe.Pointer(cancelInfo)).Fresult = uintptr(0)
	(*CancelInfo)(unsafe.Pointer(cancelInfo)).Flength = 0

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(uintptr(unsafe.Pointer(&cancelTable)))).FcreateProc})).f(tls, uintptr(unsafe.Pointer(&cancelTable)), iPtr, bp+32 /* &isNew */)
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cancelInfo

	// Initialize the compilation and execution statistics kept for this
	// interpreter.

	// Initialise the stub table pointer.

	(*Interp)(unsafe.Pointer(iPtr)).FstubTable = uintptr(unsafe.Pointer(&XtclStubs))

	// Initialize the ensemble error message rewriting support.

	XTclResetRewriteEnsemble(tls, interp, 1)

	// TIP#143: Initialise the resource limit support.

	XTclInitLimitSupport(tls, interp)

	// Initialise the thread-specific data ekeko. Note that the thread's alloc
	// cache was already initialised by the call to alloc the interp struct.

	(*Interp)(unsafe.Pointer(iPtr)).FallocCache = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FpendingObjDataPtr = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).FasyncReadyPtr = XTclGetAsyncReadyPtr(tls)
	(*Interp)(unsafe.Pointer(iPtr)).FdeferredCallbacks = uintptr(0)

	// Create the core commands. Do it here, rather than calling
	// Tcl_CreateCommand, because it's faster (there's no need to check for a
	// pre-existing command by the same name). If a command has a Tcl_CmdProc
	// but no Tcl_ObjCmdProc, set the Tcl_ObjCmdProc to
	// TclInvokeStringCommand. This is an object-based wrapper function that
	// extracts strings, calls the string function, and creates an object for
	// the result. Similarly, if a command has a Tcl_ObjCmdProc but no
	// Tcl_CmdProc, set the Tcl_CmdProc to TclInvokeObjectCommand.

	for cmdInfoPtr = uintptr(unsafe.Pointer(&builtInCmds)); (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).Fname != uintptr(0); cmdInfoPtr += 40 {
		if (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).FobjProc == uintptr(0) &&
			(*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).FcompileProc == uintptr(0) &&
			(*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).FnreProc == uintptr(0) {
			XTcl_Panic(tls, ts+6527, 0)
		}

		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr + 160 /* &.cmdTable */)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr+160 /* &.cmdTable */, (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).Fname, bp+32 /* &isNew */)
		if *(*int32)(unsafe.Pointer(bp + 32)) != 0 {
			cmdPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Command{})))
			(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = hPtr
			(*Command)(unsafe.Pointer(cmdPtr)).FnsPtr = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
			(*Command)(unsafe.Pointer(cmdPtr)).FrefCount = 1
			(*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch = 0
			(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc = (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).FcompileProc
			(*Command)(unsafe.Pointer(cmdPtr)).Fproc = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{XTclInvokeObjectCommand}))
			(*Command)(unsafe.Pointer(cmdPtr)).FclientData = cmdPtr
			(*Command)(unsafe.Pointer(cmdPtr)).FobjProc = (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).FobjProc
			(*Command)(unsafe.Pointer(cmdPtr)).FobjClientData = uintptr(0)
			(*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc = uintptr(0)
			(*Command)(unsafe.Pointer(cmdPtr)).FdeleteData = uintptr(0)
			(*Command)(unsafe.Pointer(cmdPtr)).Fflags = 0
			if (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).Fflags&CMD_COMPILES_EXPANDED != 0 {
				*(*int32)(unsafe.Pointer(cmdPtr + 80)) |= CMD_COMPILES_EXPANDED
			}
			(*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr = uintptr(0)
			(*Command)(unsafe.Pointer(cmdPtr)).FtracePtr = uintptr(0)
			(*Command)(unsafe.Pointer(cmdPtr)).FnreProc = (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).FnreProc
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cmdPtr
		}
	}

	// Create the "array", "binary", "chan", "clock", "dict", "encoding",
	// "file", "info", "namespace" and "string" ensembles. Note that all these
	// commands (and their subcommands that are not present in the global
	// namespace) are wholly safe *except* for "clock", "encoding" and "file".

	XTclInitArrayCmd(tls, interp)
	XTclInitBinaryCmd(tls, interp)
	XTclInitChanCmd(tls, interp)
	XTclInitDictCmd(tls, interp)
	XTclInitEncodingCmd(tls, interp)
	XTclInitFileCmd(tls, interp)
	XTclInitInfoCmd(tls, interp)
	XTclInitNamespaceCmd(tls, interp)
	XTclInitStringCmd(tls, interp)
	XTclInitPrefixCmd(tls, interp)

	// Register "clock" subcommands. These *do* go through
	// Tcl_CreateObjCommand, since they aren't in the global namespace and
	// involve ensembles.

	XTclClockInit(tls, interp)

	// Register the built-in functions. This is empty now that they are
	// implemented as commands in the ::tcl::mathfunc namespace.

	// Register the default [interp bgerror] handler.

	XTcl_CreateObjCommand(tls, interp, ts+6597,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclDefaultBgErrorHandlerObjCmd})), uintptr(0), uintptr(0))

	// Create unsupported commands for debugging bytecode and objects.

	XTcl_CreateObjCommand(tls, interp, ts+6612,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTcl_DisassembleObjCmd})), uintptr(int64(0)), uintptr(0))
	XTcl_CreateObjCommand(tls, interp, ts+6644,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTcl_DisassembleObjCmd})), uintptr(int64(1)), uintptr(0))
	XTcl_CreateObjCommand(tls, interp, ts+6676,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTcl_RepresentationCmd})), uintptr(0), uintptr(0))

	// Adding the bytecode assembler command
	cmdPtr = XTcl_NRCreateCommand(tls, interp,
		ts+6711, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTcl_AssembleObjCmd})),
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclNRAssembleObjCmd})), uintptr(0), uintptr(0))
	(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
	}{XTclCompileAssembleCmd}))

	// Coroutine monkeybusiness
	XTcl_NRCreateCommand(tls, interp, ts+6740, uintptr(0),
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sNRCoroInjectObjCmd})), uintptr(0), uintptr(0))
	XTcl_CreateObjCommand(tls, interp, ts+6767,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sCoroTypeObjCmd})), uintptr(0), uintptr(0))

	// Create an unsupported command for timerate
	XTcl_CreateObjCommand(tls, interp, ts+6796,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTcl_TimeRateObjCmd})), uintptr(0), uintptr(0))

	// Export unsupported commands
	nsPtr = XTcl_FindNamespace(tls, interp, ts+6825, uintptr(0), 0)
	if nsPtr != 0 {
		XTcl_Export(tls, interp, nsPtr, ts+6273, 1)
	}

	// Register the builtin math functions.

	nsPtr = XTcl_CreateNamespace(tls, interp, ts+6844, uintptr(0), uintptr(0))
	if nsPtr == uintptr(0) {
		XTcl_Panic(tls, ts+6860, 0)
	}
	libc.Xmemcpy(tls, bp+36, ts+6897, uint64(MATH_FUNC_PREFIX_LEN))
	for builtinFuncPtr = uintptr(unsafe.Pointer(&sBuiltinFuncTable)); (*BuiltinFuncDef)(unsafe.Pointer(builtinFuncPtr)).Fname != uintptr(0); builtinFuncPtr += 24 {
		libc.Xstrcpy(tls, bp+36+uintptr(MATH_FUNC_PREFIX_LEN), (*BuiltinFuncDef)(unsafe.Pointer(builtinFuncPtr)).Fname)
		XTcl_CreateObjCommand(tls, interp, bp+36,
			(*BuiltinFuncDef)(unsafe.Pointer(builtinFuncPtr)).FobjCmdProc, (*BuiltinFuncDef)(unsafe.Pointer(builtinFuncPtr)).FclientData, uintptr(0))
		XTcl_Export(tls, interp, nsPtr, (*BuiltinFuncDef)(unsafe.Pointer(builtinFuncPtr)).Fname, 0)
	}

	// Register the mathematical "operator" commands. [TIP #174]

	nsPtr = XTcl_CreateNamespace(tls, interp, ts+6915, uintptr(0), uintptr(0))
	if nsPtr == uintptr(0) {
		XTcl_Panic(tls, ts+6929, 0)
	}
	XTcl_Export(tls, interp, nsPtr, ts+6273, 1)
	libc.Xmemcpy(tls, bp+36, ts+6966, uint64(MATH_OP_PREFIX_LEN))
	for opcmdInfoPtr = uintptr(unsafe.Pointer(&mathOpCmds)); (*OpCmdInfo)(unsafe.Pointer(opcmdInfoPtr)).Fname != uintptr(0); opcmdInfoPtr += 40 {
		var occdPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TclOpCmdClientData{})))

		(*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fop = (*OpCmdInfo)(unsafe.Pointer(opcmdInfoPtr)).Fname
		*(*int32)(unsafe.Pointer(occdPtr + 16)) = *(*int32)(unsafe.Pointer(opcmdInfoPtr + 24))
		(*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fexpected = (*OpCmdInfo)(unsafe.Pointer(opcmdInfoPtr)).Fexpected
		libc.Xstrcpy(tls, bp+36+uintptr(MATH_OP_PREFIX_LEN), (*OpCmdInfo)(unsafe.Pointer(opcmdInfoPtr)).Fname)
		cmdPtr = XTcl_CreateObjCommand(tls, interp, bp+36,
			(*OpCmdInfo)(unsafe.Pointer(opcmdInfoPtr)).FobjProc, occdPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteOpCmdClientData})))
		if cmdPtr == uintptr(0) {
			XTcl_Panic(tls, ts+6982,
				libc.VaList(bp, (*OpCmdInfo)(unsafe.Pointer(opcmdInfoPtr)).Fname))
		} else if (*OpCmdInfo)(unsafe.Pointer(opcmdInfoPtr)).FcompileProc != uintptr(0) {
			(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc = (*OpCmdInfo)(unsafe.Pointer(opcmdInfoPtr)).FcompileProc
		}
	}

	// Do Multiple/Safe Interps Tcl init stuff

	XTclInterpInit(tls, interp)
	XTclSetupEnv(tls, interp)

	// TIP #59: Make embedded configuration information available.

	XTclInitEmbeddedConfigurationInformation(tls, interp)

	// TIP #440: Declare the name of the script engine to be "Tcl".

	XTcl_SetVar2(tls, interp, ts+7016, ts+7029, ts+7036,
		TCL_GLOBAL_ONLY)

	// Compute the byte order of this machine.

	*(*int16)(unsafe.Pointer(bp + 68)) = int16(1)
	XTcl_SetVar2(tls, interp, ts+7016, ts+7040,
		func() uintptr {
			if int32(*(*int8)(unsafe.Pointer(bp + 68))) == 1 {
				return ts + 7050 /* "littleEndian" */
			}
			return ts + 7063 /* "bigEndian" */
		}(),
		TCL_GLOBAL_ONLY)

	XTcl_SetVar2Ex(tls, interp, ts+7016, ts+7073,
		XTcl_NewLongObj(tls, int32(unsafe.Sizeof(int32(0)))), TCL_GLOBAL_ONLY)

	// TIP #291
	XTcl_SetVar2Ex(tls, interp, ts+7016, ts+7082,
		XTcl_NewLongObj(tls, int32(unsafe.Sizeof(uintptr(0)))), TCL_GLOBAL_ONLY)

	// Set up other variables such as tcl_version and tcl_library

	XTcl_SetVar2(tls, interp, ts+7094, uintptr(0), ts+7109, TCL_GLOBAL_ONLY)
	XTcl_SetVar2(tls, interp, ts+7116, uintptr(0), ts+7128, TCL_GLOBAL_ONLY)
	XTcl_TraceVar2(tls, interp, ts+7132, uintptr(0),
		TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{XTclPrecTraceProc})), uintptr(0))
	XTclpSetVariables(tls, interp)

	// Register Tcl's version number.
	// TIP #268: Full patchlevel instead of just major.minor

	XTcl_PkgProvideEx(tls, interp, ts+7036, ts+7109, uintptr(unsafe.Pointer(&XtclStubs)))

	if XTclTommath_Init(tls, interp) != TCL_OK {
		XTcl_Panic(tls, ts+7146, libc.VaList(bp+8, XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))))
	}

	if XTclOOInit(tls, interp) != TCL_OK {
		XTcl_Panic(tls, ts+7146, libc.VaList(bp+16, XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))))
	}

	// Only build in zlib support if we've successfully detected a library to
	// compile and link against.

	if XTclZlibInit(tls, interp) != TCL_OK {
		XTcl_Panic(tls, ts+7146, libc.VaList(bp+24, XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))))
	}

	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr)).FcallbackPtr = uintptr(0)
	return interp
}

func sDeleteOpCmdClientData(tls *libc.TLS, clientData ClientData) { /* tclBasic.c:1015:1: */
	var occdPtr uintptr = clientData

	XTclpFree(tls, occdPtr)
}

//----------------------------------------------------------------------
//
// TclHideUnsafeCommands --
//
//	Hides base commands that are not marked as safe from this interpreter.
//
// Results:
//	TCL_OK if it succeeds, TCL_ERROR else.
//
// Side effects:
//	Hides functionality in an interpreter.
//
//----------------------------------------------------------------------

func XTclHideUnsafeCommands(tls *libc.TLS, interp uintptr) int32 { /* tclBasic.c:1040:1: */
	var cmdInfoPtr uintptr

	if interp == uintptr(0) {
		return TCL_ERROR
	}
	for cmdInfoPtr = uintptr(unsafe.Pointer(&builtInCmds)); (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).Fname != uintptr(0); cmdInfoPtr += 40 {
		if !((*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).Fflags&CMD_IS_SAFE != 0) {
			XTcl_HideCommand(tls, interp, (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).Fname, (*CmdInfo)(unsafe.Pointer(cmdInfoPtr)).Fname)
		}
	}
	XTclMakeEncodingCommandSafe(tls, interp) // Ugh!
	XTclMakeFileCommandSafe(tls, interp)     // Ugh!
	return TCL_OK
}

//--------------------------------------------------------------
//
// Tcl_CallWhenDeleted --
//
//	Arrange for a function to be called before a given interpreter is
//	deleted. The function is called as soon as Tcl_DeleteInterp is called;
//	if Tcl_CallWhenDeleted is called on an interpreter that has already
//	been deleted, the function will be called when the last Tcl_Release is
//	done on the interpreter.
//
// Results:
//	None.
//
// Side effects:
//	When Tcl_DeleteInterp is invoked to delete interp, proc will be
//	invoked. See the manual entry for details.
//
//--------------------------------------------------------------

func XTcl_CallWhenDeleted(tls *libc.TLS, interp uintptr, proc uintptr, clientData ClientData) { /* tclBasic.c:1080:1: */
	bp := tls.Alloc(68)
	defer tls.Free(68)

	var iPtr uintptr = interp
	var assocDataCounterPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&assocDataCounterKey)), int32(unsafe.Sizeof(int32(0))))
	// var isNew int32 at bp+64, 4

	// var buffer [56]int8 at bp+8, 56

	var dPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(AssocData{})))
	var hPtr uintptr

	libc.Xsprintf(tls, bp+8, ts+7149, libc.VaList(bp, *(*int32)(unsafe.Pointer(assocDataCounterPtr))))
	*(*int32)(unsafe.Pointer(assocDataCounterPtr))++

	if (*Interp)(unsafe.Pointer(iPtr)).FassocData == uintptr(0) {
		(*Interp)(unsafe.Pointer(iPtr)).FassocData = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_InitHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FassocData, 0)
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FassocData)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FassocData, bp+8 /* buffer */, bp+64 /* &isNew */)
	(*AssocData)(unsafe.Pointer(dPtr)).Fproc = proc
	(*AssocData)(unsafe.Pointer(dPtr)).FclientData = clientData
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = dPtr
}

var assocDataCounterKey Tcl_ThreadDataKey /* tclBasic.c:1087:30: */

//--------------------------------------------------------------
//
// Tcl_DontCallWhenDeleted --
//
//	Cancel the arrangement for a function to be called when a given
//	interpreter is deleted.
//
// Results:
//	None.
//
// Side effects:
//	If proc and clientData were previously registered as a callback via
//	Tcl_CallWhenDeleted, they are unregistered. If they weren't previously
//	registered then nothing happens.
//
//--------------------------------------------------------------

func XTcl_DontCallWhenDeleted(tls *libc.TLS, interp uintptr, proc uintptr, clientData ClientData) { /* tclBasic.c:1128:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var iPtr uintptr = interp
	var hTablePtr uintptr
	// var hSearch Tcl_HashSearch at bp, 24

	var hPtr uintptr
	var dPtr uintptr

	hTablePtr = (*Interp)(unsafe.Pointer(iPtr)).FassocData
	if hTablePtr == uintptr(0) {
		return
	}
	for hPtr = XTcl_FirstHashEntry(tls, hTablePtr, bp); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
		dPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		if (*AssocData)(unsafe.Pointer(dPtr)).Fproc == proc && (*AssocData)(unsafe.Pointer(dPtr)).FclientData == clientData {
			XTclpFree(tls, dPtr)
			XTcl_DeleteHashEntry(tls, hPtr)
			return
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_SetAssocData --
//
//	Creates a named association between user-specified data, a delete
//	function and this interpreter. If the association already exists the
//	data is overwritten with the new data. The delete function will be
//	invoked when the interpreter is deleted.
//
// Results:
//	None.
//
// Side effects:
//	Sets the associated data, creates the association if needed.
//
//----------------------------------------------------------------------

func XTcl_SetAssocData(tls *libc.TLS, interp uintptr, name uintptr, proc uintptr, clientData ClientData) { /* tclBasic.c:1175:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	var dPtr uintptr
	var hPtr uintptr
	// var isNew int32 at bp, 4

	if (*Interp)(unsafe.Pointer(iPtr)).FassocData == uintptr(0) {
		(*Interp)(unsafe.Pointer(iPtr)).FassocData = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_InitHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FassocData, 0)
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FassocData)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FassocData, name, bp /* &isNew */)
	if *(*int32)(unsafe.Pointer(bp)) == 0 {
		dPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	} else {
		dPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(AssocData{})))
	}
	(*AssocData)(unsafe.Pointer(dPtr)).Fproc = proc
	(*AssocData)(unsafe.Pointer(dPtr)).FclientData = clientData

	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = dPtr
}

//----------------------------------------------------------------------
//
// Tcl_DeleteAssocData --
//
//	Deletes a named association of user-specified data with the specified
//	interpreter.
//
// Results:
//	None.
//
// Side effects:
//	Deletes the association.
//
//----------------------------------------------------------------------

func XTcl_DeleteAssocData(tls *libc.TLS, interp uintptr, name uintptr) { /* tclBasic.c:1221:1: */
	var iPtr uintptr = interp
	var dPtr uintptr
	var hPtr uintptr

	if (*Interp)(unsafe.Pointer(iPtr)).FassocData == uintptr(0) {
		return
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FassocData)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FassocData, name)
	if hPtr == uintptr(0) {
		return
	}
	dPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if (*AssocData)(unsafe.Pointer(dPtr)).Fproc != uintptr(0) {
		(*struct {
			f func(*libc.TLS, ClientData, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*AssocData)(unsafe.Pointer(dPtr)).Fproc})).f(tls, (*AssocData)(unsafe.Pointer(dPtr)).FclientData, interp)
	}
	XTclpFree(tls, dPtr)
	XTcl_DeleteHashEntry(tls, hPtr)
}

//----------------------------------------------------------------------
//
// Tcl_GetAssocData --
//
//	Returns the client data associated with this name in the specified
//	interpreter.
//
// Results:
//	The client data in the AssocData record denoted by the named
//	association, or NULL.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetAssocData(tls *libc.TLS, interp uintptr, name uintptr, procPtr uintptr) ClientData { /* tclBasic.c:1263:1: */
	var iPtr uintptr = interp
	var dPtr uintptr
	var hPtr uintptr

	if (*Interp)(unsafe.Pointer(iPtr)).FassocData == uintptr(0) {
		return uintptr(0)
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FassocData)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FassocData, name)
	if hPtr == uintptr(0) {
		return uintptr(0)
	}
	dPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if procPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(procPtr)) = (*AssocData)(unsafe.Pointer(dPtr)).Fproc
	}
	return (*AssocData)(unsafe.Pointer(dPtr)).FclientData
}

//----------------------------------------------------------------------
//
// Tcl_InterpDeleted --
//
//	Returns nonzero if the interpreter has been deleted with a call to
//	Tcl_DeleteInterp.
//
// Results:
//	Nonzero if the interpreter is deleted, zero otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_InterpDeleted(tls *libc.TLS, interp uintptr) int32 { /* tclBasic.c:1306:1: */
	if (*Interp)(unsafe.Pointer(interp)).Fflags&DELETED != 0 {
		return 1
	}
	return 0
}

//----------------------------------------------------------------------
//
// Tcl_DeleteInterp --
//
//	Ensures that the interpreter will be deleted eventually. If there are
//	no Tcl_Preserve calls in effect for this interpreter, it is deleted
//	immediately, otherwise the interpreter is deleted when the last
//	Tcl_Preserve is matched by a call to Tcl_Release. In either case, the
//	function runs the currently registered deletion callbacks.
//
// Results:
//	None.
//
// Side effects:
//	The interpreter is marked as deleted. The caller may still use it
//	safely if there are calls to Tcl_Preserve in effect for the
//	interpreter, but further calls to Tcl_Eval etc in this interpreter
//	will fail.
//
//----------------------------------------------------------------------

func XTcl_DeleteInterp(tls *libc.TLS, interp uintptr) { /* tclBasic.c:1336:1: */
	var iPtr uintptr = interp

	// If the interpreter has already been marked deleted, just punt.

	if (*Interp)(unsafe.Pointer(iPtr)).Fflags&DELETED != 0 {
		return
	}

	// Mark the interpreter as deleted. No further evals will be allowed.
	// Increase the compileEpoch as a signal to compiled bytecodes.

	*(*int32)(unsafe.Pointer(iPtr + 424)) |= DELETED
	(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++

	// Ensure that the interpreter is eventually deleted.

	XTcl_EventuallyFree(tls, interp, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sDeleteInterpProc})))
}

//----------------------------------------------------------------------
//
// DeleteInterpProc --
//
//	Helper function to delete an interpreter. This function is called when
//	the last call to Tcl_Preserve on this interpreter is matched by a call
//	to Tcl_Release. The function cleans up all resources used in the
//	interpreter and calls all currently registered interpreter deletion
//	callbacks.
//
// Results:
//	None.
//
// Side effects:
//	Whatever the interpreter deletion callbacks do. Frees resources used
//	by the interpreter.
//
//----------------------------------------------------------------------

func sDeleteInterpProc(tls *libc.TLS, interp uintptr) { /* tclBasic.c:1387:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var iPtr uintptr = interp
	var hPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	var hTablePtr uintptr
	var resPtr uintptr
	var nextResPtr uintptr
	var i int32

	// Punt if there is an error in the Tcl_Release/Tcl_Preserve matchup,
	// unless we are exiting.

	if (*Interp)(unsafe.Pointer(iPtr)).FnumLevels > 0 && !(XTclInExit(tls) != 0) {
		XTcl_Panic(tls, ts+7168, 0)
	}

	// The interpreter should already be marked deleted; otherwise how did we
	// get here?

	if !((*Interp)(unsafe.Pointer(iPtr)).Fflags&DELETED != 0) {
		XTcl_Panic(tls, ts+7210, 0)
	}

	// TIP #219, Tcl Channel Reflection API. Discard a leftover state.

	if (*Interp)(unsafe.Pointer(iPtr)).FchanMsg != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FchanMsg
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FchanMsg = uintptr(0)
	}

	// TIP #285, Script cancellation support. Delete this interp from the
	// global hash table of CancelInfo structs.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(uintptr(unsafe.Pointer(&cancelTable)))).FfindProc})).f(tls, uintptr(unsafe.Pointer(&cancelTable)), iPtr)
	if hPtr != uintptr(0) {
		var cancelInfo uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		if cancelInfo != uintptr(0) {
			if (*CancelInfo)(unsafe.Pointer(cancelInfo)).Fresult != uintptr(0) {
				XTclpFree(tls, (*CancelInfo)(unsafe.Pointer(cancelInfo)).Fresult)
			}
			XTclpFree(tls, cancelInfo)
		}

		XTcl_DeleteHashEntry(tls, hPtr)
	}

	if (*Interp)(unsafe.Pointer(iPtr)).FasyncCancel != uintptr(0) {
		XTcl_AsyncDelete(tls, (*Interp)(unsafe.Pointer(iPtr)).FasyncCancel)
		(*Interp)(unsafe.Pointer(iPtr)).FasyncCancel = uintptr(0)
	}

	if (*Interp)(unsafe.Pointer(iPtr)).FasyncCancelMsg != uintptr(0) {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FasyncCancelMsg
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FasyncCancelMsg = uintptr(0)
	}

	// Shut down all limit handler callback scripts that call back into this
	// interpreter. Then eliminate all limit handlers for this interpreter.

	XTclRemoveScriptLimitCallbacks(tls, interp)
	XTclLimitRemoveAllHandlers(tls, interp)

	// Dismantle the namespace here, before we clear the assocData. If any
	// background errors occur here, they will be deleted below.
	//
	// Dismantle the namespace after freeing the iPtr->handle so that each
	// bytecode releases its literals without caring to update the literal
	// table, as it will be freed later in this function without further use.

	XTclHandleFree(tls, (*Interp)(unsafe.Pointer(iPtr)).Fhandle)
	XTclTeardownNamespace(tls, (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr)

	// Delete all the hidden commands.

	hTablePtr = (*Interp)(unsafe.Pointer(iPtr)).FhiddenCmdTablePtr
	if hTablePtr != uintptr(0) {
		// Non-pernicious deletion. The deletion callbacks will not be allowed
		// to create any new hidden or non-hidden commands.
		// Tcl_DeleteCommandFromToken will remove the entry from the
		// hiddenCmdTablePtr.

		hPtr = XTcl_FirstHashEntry(tls, hTablePtr, bp)
		for ; hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
			XTcl_DeleteCommandFromToken(tls, interp, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
		}
		XTcl_DeleteHashTable(tls, hTablePtr)
		XTclpFree(tls, hTablePtr)
	}

	// Invoke deletion callbacks; note that a callback can create new
	// callbacks, so we iterate.

	for (*Interp)(unsafe.Pointer(iPtr)).FassocData != uintptr(0) {
		var dPtr uintptr

		hTablePtr = (*Interp)(unsafe.Pointer(iPtr)).FassocData
		(*Interp)(unsafe.Pointer(iPtr)).FassocData = uintptr(0)
		for hPtr = XTcl_FirstHashEntry(tls, hTablePtr, bp); hPtr != uintptr(0); hPtr = XTcl_FirstHashEntry(tls, hTablePtr, bp) {
			dPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
			XTcl_DeleteHashEntry(tls, hPtr)
			if (*AssocData)(unsafe.Pointer(dPtr)).Fproc != uintptr(0) {
				(*struct {
					f func(*libc.TLS, ClientData, uintptr)
				})(unsafe.Pointer(&struct{ uintptr }{(*AssocData)(unsafe.Pointer(dPtr)).Fproc})).f(tls, (*AssocData)(unsafe.Pointer(dPtr)).FclientData, interp)
			}
			XTclpFree(tls, dPtr)
		}
		XTcl_DeleteHashTable(tls, hTablePtr)
		XTclpFree(tls, hTablePtr)
	}

	// Pop the root frame pointer and finish deleting the global
	// namespace. The order is important [Bug 1658572].

	if (*Interp)(unsafe.Pointer(iPtr)).FframePtr != (*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr && !(XTclInExit(tls) != 0) {
		XTcl_Panic(tls, ts+7268, 0)
	}
	XTcl_PopCallFrame(tls, interp)
	XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr)
	(*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr = uintptr(0)
	XTcl_DeleteNamespace(tls, (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr)

	// Free up the result *after* deleting variables, since variable deletion
	// could have transferred ownership of the result string to Tcl.

	XTcl_FreeResult(tls, interp)
	(*Interp)(unsafe.Pointer(iPtr)).Fresult = uintptr(0)
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr = uintptr(0)
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FecVar
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorCode != 0 {
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorCode
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FerrorCode = uintptr(0)
	}
	for ok5 := true; ok5; ok5 = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FeiVar
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo != 0 {
		for ok6 := true; ok6; ok6 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo = uintptr(0)
	}
	for ok7 := true; ok7; ok7 = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorStack
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FerrorStack = uintptr(0)
	for ok8 := true; ok8; ok8 = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FupLiteral
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok9 := true; ok9; ok9 = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FcallLiteral
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok10 := true; ok10; ok10 = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok11 := true; ok11; ok11 = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FinnerContext
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts != 0 {
		for ok12 := true; ok12; ok12 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FappendResult != uintptr(0) {
		XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FappendResult)
		(*Interp)(unsafe.Pointer(iPtr)).FappendResult = uintptr(0)
	}
	XTclFreePackageInfo(tls, iPtr)
	for (*Interp)(unsafe.Pointer(iPtr)).FtracePtr != uintptr(0) {
		XTcl_DeleteTrace(tls, iPtr, (*Interp)(unsafe.Pointer(iPtr)).FtracePtr)
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr != uintptr(0) {
		XTclDeleteExecEnv(tls, (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr)
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FscriptFile != 0 {
		for ok13 := true; ok13; ok13 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FscriptFile
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FscriptFile = uintptr(0)
	}
	for ok14 := true; ok14; ok14 = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FemptyObjPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FemptyObjPtr = uintptr(0)

	resPtr = (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr
	for resPtr != 0 {
		nextResPtr = (*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr
		XTclpFree(tls, (*ResolverScheme)(unsafe.Pointer(resPtr)).Fname)
		XTclpFree(tls, resPtr)
		resPtr = nextResPtr
	}

	// Free up literal objects created for scripts compiled by the
	// interpreter.

	XTclDeleteLiteralTable(tls, interp, iPtr+336)

	// TIP #280 - Release the arrays for ByteCode/Proc extension, and
	// contents.

	for hPtr = XTcl_FirstHashEntry(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr, bp); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
		var cfPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		var procPtr uintptr = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(hPtr + 32))
			}
			return hPtr + 32
		}()

		(*Proc)(unsafe.Pointer(procPtr)).FiPtr = uintptr(0)
		if cfPtr != 0 {
			if (*CmdFrame)(unsafe.Pointer(cfPtr)).Ftype == 4 {
				for ok15 := true; ok15; ok15 = 0 != 0 {
					var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(cfPtr + 40))
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
			XTclpFree(tls, (*CmdFrame)(unsafe.Pointer(cfPtr)).Fline)
			XTclpFree(tls, cfPtr)
		}
		XTcl_DeleteHashEntry(tls, hPtr)
	}
	XTcl_DeleteHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)
	XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)
	(*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr = uintptr(0)

	// See also tclCompile.c, TclCleanupByteCode

	for hPtr = XTcl_FirstHashEntry(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr, bp); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
		var eclPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		if (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Ftype == 4 {
			for ok16 := true; ok16; ok16 = 0 != 0 {
				var _objPtr uintptr = (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fpath
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		for i = 0; i < (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnuloc; i++ {
			XTclpFree(tls, (*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc+uintptr(i)*24)).Fline)
		}

		if (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc != uintptr(0) {
			XTclpFree(tls, (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc)
		}

		XTclpFree(tls, eclPtr)
		XTcl_DeleteHashEntry(tls, hPtr)
	}
	XTcl_DeleteHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr)
	XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr)
	(*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr = uintptr(0)

	// Location stack for uplevel/eval/... scripts which were passed through
	// proc arguments. Actually we track all arguments as we do not and cannot
	// know which arguments will be used as scripts and which will not.

	if (*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr)).FnumEntries != 0 && !(XTclInExit(tls) != 0) {
		// When the interp goes away we have nothing on the stack, so there
		// are no arguments, so this table has to be empty.

		XTcl_Panic(tls, ts+7333, 0)
	}

	XTcl_DeleteHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr)
	XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr)
	(*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr = uintptr(0)

	if (*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr)).FnumEntries != 0 && !(XTclInExit(tls) != 0) {
		// When the interp goes away we have nothing on the stack, so there
		// are no arguments, so this table has to be empty.

		XTcl_Panic(tls, ts+7333, 0)
	}

	XTcl_DeleteHashTable(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr)
	XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr)
	(*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr = uintptr(0)

	// Squelch the tables of traces on variables and searches over arrays in
	// the in the interpreter.

	XTcl_DeleteHashTable(tls, iPtr+1008)
	XTcl_DeleteHashTable(tls, iPtr+1096)

	XTclpFree(tls, iPtr)
}

//---------------------------------------------------------------------------
//
// Tcl_HideCommand --
//
//	Makes a command hidden so that it cannot be invoked from within an
//	interpreter, only from within an ancestor.
//
// Results:
//	A standard Tcl result; also leaves a message in the interp's result if
//	an error occurs.
//
// Side effects:
//	Removes a command from the command table and create an entry into the
//	hidden command table under the specified token name.
//
//---------------------------------------------------------------------------

func XTcl_HideCommand(tls *libc.TLS, interp uintptr, cmdName uintptr, hiddenCmdToken uintptr) int32 { /* tclBasic.c:1709:1: */
	bp := tls.Alloc(108)
	defer tls.Free(108)

	var iPtr uintptr = interp
	var cmd Tcl_Command
	var cmdPtr uintptr
	var hiddenCmdTablePtr uintptr
	var hPtr uintptr
	// var isNew int32 at bp+104, 4

	if (*Interp)(unsafe.Pointer(iPtr)).Fflags&DELETED != 0 {
		// The interpreter is being deleted. Do not create any new structures,
		// because it is not safe to modify the interpreter.

		return TCL_ERROR
	}

	// Disallow hiding of commands that are currently in a namespace or
	// renaming (as part of hiding) into a namespace (because the current
	// implementation with a single global table and the needed uniqueness of
	// names cause problems with namespaces).
	//
	// We don't need to check for "::" in cmdName because the real check is on
	// the nsPtr below.
	//
	// hiddenCmdToken is just a string which is not interpreted in any way. It
	// may contain :: but the string is not interpreted as a namespace
	// qualifier command name. Thus, hiding foo::bar to foo::bar and then
	// trying to expose or invoke ::foo::bar will NOT work; but if the
	// application always uses the same strings it will get consistent
	// behaviour.
	//
	// But as we currently limit ourselves to the global namespace only for
	// the source, in order to avoid potential confusion, lets prevent "::" in
	// the token too. - dl

	if libc.Xstrstr(tls, hiddenCmdToken, ts+7376) != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

			ts+7379, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+7450, uintptr(0)))
		return TCL_ERROR
	}

	// Find the command to hide. An error is returned if cmdName can't be
	// found. Look up the command only from the global namespace. Full path of
	// the command must be given if using namespaces.

	cmd = XTcl_FindCommand(tls, interp, cmdName, uintptr(0),
		TCL_LEAVE_ERR_MSG|TCL_GLOBAL_ONLY)
	if cmd == uintptr(0) {
		return TCL_ERROR
	}
	cmdPtr = cmd

	// Check that the command is really in global namespace

	if (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr != (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+7462,
			-1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+7525, ts+7530, uintptr(0)))
		return TCL_ERROR
	}

	// Initialize the hidden command table if necessary.

	hiddenCmdTablePtr = (*Interp)(unsafe.Pointer(iPtr)).FhiddenCmdTablePtr
	if hiddenCmdTablePtr == uintptr(0) {
		hiddenCmdTablePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_InitHashTable(tls, hiddenCmdTablePtr, 0)
		(*Interp)(unsafe.Pointer(iPtr)).FhiddenCmdTablePtr = hiddenCmdTablePtr
	}

	// It is an error to move an exposed command to a hidden command with
	// hiddenCmdToken if a hidden command with the name hiddenCmdToken already
	// exists.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hiddenCmdTablePtr)).FcreateProc})).f(tls, hiddenCmdTablePtr, hiddenCmdToken, bp+104 /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+7541,
			libc.VaList(bp+64, hiddenCmdToken)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+7525, ts+7582, uintptr(0)))
		return TCL_ERROR
	}

	// NB: This code is currently 'like' a rename to a specialy set apart name
	// table. Changes here and in TclRenameCommand must be kept in synch until
	// the common parts are actually factorized out.

	// Remove the hash entry for the command from the interpreter command
	// table. This is like deleting the command, so bump its command epoch;
	// this invalidates any cached references that point to the command.

	if (*Command)(unsafe.Pointer(cmdPtr)).FhPtr != uintptr(0) {
		XTcl_DeleteHashEntry(tls, (*Command)(unsafe.Pointer(cmdPtr)).FhPtr)
		(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = uintptr(0)
		(*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch++
	}

	// The list of command exported from the namespace might have changed.
	// However, we do not need to recompute this just yet; next time we need
	// the info will be soon enough.

	if (*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FnumExportPatterns != 0 {
		(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FexportLookupEpoch++
	}
	if (*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FcommandPathLength != 0 {
		(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FcmdRefEpoch++
	}

	// Now link the hash table entry with the command structure. We ensured
	// above that the nsPtr was right.

	(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = hPtr
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cmdPtr

	// If the command being hidden has a compile function, increment the
	// interpreter's compileEpoch to invalidate its compiled code. This makes
	// sure that we don't later try to execute old code compiled with
	// command-specific (i.e., inline) bytecodes for the now-hidden command.
	// This field is checked in Tcl_EvalObj and ObjInterpProc, and code whose
	// compilation epoch doesn't match is recompiled.

	if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc != uintptr(0) {
		(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ExposeCommand --
//
//	Makes a previously hidden command callable from inside the interpreter
//	instead of only by its ancestors.
//
// Results:
//	A standard Tcl result. If an error occurs, a message is left in the
//	interp's result.
//
// Side effects:
//	Moves commands from one hash table to another.
//
//----------------------------------------------------------------------

func XTcl_ExposeCommand(tls *libc.TLS, interp uintptr, hiddenCmdToken uintptr, cmdName uintptr) int32 { /* tclBasic.c:1878:1: */
	bp := tls.Alloc(124)
	defer tls.Free(124)

	var iPtr uintptr = interp
	var cmdPtr uintptr
	var nsPtr uintptr
	var hPtr uintptr
	var hiddenCmdTablePtr uintptr
	// var isNew int32 at bp+120, 4

	if (*Interp)(unsafe.Pointer(iPtr)).Fflags&DELETED != 0 {
		// The interpreter is being deleted. Do not create any new structures,
		// because it is not safe to modify the interpreter.

		return TCL_ERROR
	}

	// Check that we have a regular name for the command (that the user is not
	// trying to do an expose and a rename (to another namespace) at the same
	// time).

	if libc.Xstrstr(tls, cmdName, ts+7376) != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+7597,
			-1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7664, ts+7530, uintptr(0)))
		return TCL_ERROR
	}

	// Get the command from the hidden command table:

	hPtr = uintptr(0)
	hiddenCmdTablePtr = (*Interp)(unsafe.Pointer(iPtr)).FhiddenCmdTablePtr
	if hiddenCmdTablePtr != uintptr(0) {
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hiddenCmdTablePtr)).FfindProc})).f(tls, hiddenCmdTablePtr, hiddenCmdToken)
	}
	if hPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+7671, libc.VaList(bp+32, hiddenCmdToken)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7699, ts+7450,
			hiddenCmdToken, uintptr(0)))
		return TCL_ERROR
	}
	cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

	// Check that we have a true global namespace command (enforced by
	// Tcl_HideCommand but let's double check. (If it was not, we would not
	// really know how to handle it).

	if (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr != (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr {
		// This case is theoritically impossible, we might rather Tcl_Panic
		// than 'nicely' erroring out ?

		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+7706,
			-1))
		return TCL_ERROR
	}

	// This is the global table.

	nsPtr = (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr

	// It is an error to overwrite an existing exposed command as a result of
	// exposing a previously hidden command.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(nsPtr + 160 /* &.cmdTable */)).FcreateProc})).f(tls, nsPtr+160 /* &.cmdTable */, cmdName, bp+120 /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp + 120)) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+7762, libc.VaList(bp+80, cmdName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+88, ts+4178, ts+7664, ts+7798, uintptr(0)))
		return TCL_ERROR
	}

	// Command resolvers (per-interp, per-namespace) might have resolved to a
	// command for the given namespace scope with this command not being
	// registered with the namespace's command table. During BC compilation,
	// the so-resolved command turns into a CmdName literal. Without
	// invalidating a possible CmdName literal here explicitly, such literals
	// keep being reused while pointing to overhauled commands.

	XTclInvalidateCmdLiteral(tls, interp, cmdName, nsPtr)

	// The list of command exported from the namespace might have changed.
	// However, we do not need to recompute this just yet; next time we need
	// the info will be soon enough.

	if (*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns != 0 {
		(*Namespace)(unsafe.Pointer(nsPtr)).FexportLookupEpoch++
	}
	if (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength != 0 {
		(*Namespace)(unsafe.Pointer(nsPtr)).FcmdRefEpoch++
	}

	// Remove the hash entry for the command from the interpreter hidden
	// command table.

	if (*Command)(unsafe.Pointer(cmdPtr)).FhPtr != uintptr(0) {
		XTcl_DeleteHashEntry(tls, (*Command)(unsafe.Pointer(cmdPtr)).FhPtr)
		(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = uintptr(0)
	}

	// Now link the hash table entry with the command structure. This is like
	// creating a new command, so deal with any shadowing of commands in the
	// global namespace.

	(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = hPtr

	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cmdPtr

	// Not needed as we are only in the global namespace (but would be needed
	// again if we supported namespace command hiding)
	//
	// TclResetShadowedCmdRefs(interp, cmdPtr);

	// If the command being exposed has a compile function, increment
	// interpreter's compileEpoch to invalidate its compiled code. This makes
	// sure that we don't later try to execute old code compiled assuming the
	// command is hidden. This field is checked in Tcl_EvalObj and
	// ObjInterpProc, and code whose compilation epoch doesn't match is
	// recompiled.

	if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc != uintptr(0) {
		(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_CreateCommand --
//
//	Define a new command in a command table.
//
// Results:
//	The return value is a token for the command, which can be used in
//	future calls to Tcl_GetCommandName.
//
// Side effects:
//	If a command named cmdName already exists for interp, it is deleted.
//	In the future, when cmdName is seen as the name of a command by
//	Tcl_Eval, proc will be called. To support the bytecode interpreter,
//	the command is created with a wrapper Tcl_ObjCmdProc
//	(TclInvokeStringCommand) that eventially calls proc. When the command
//	is deleted from the table, deleteProc will be called. See the manual
//	entry for details on the calling sequence.
//
//----------------------------------------------------------------------

func XTcl_CreateCommand(tls *libc.TLS, interp uintptr, cmdName uintptr, proc uintptr, clientData ClientData, deleteProc uintptr) Tcl_Command { /* tclBasic.c:2054:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var iPtr uintptr = interp
	var oldRefPtr uintptr = uintptr(0)
	// var nsPtr uintptr at bp, 8

	var cmdPtr uintptr
	var hPtr uintptr
	// var tail uintptr at bp+24, 8

	*(*int32)(unsafe.Pointer(bp + 32 /* isNew */)) = 0
	var deleted int32 = 0
	var dataPtr uintptr

	if (*Interp)(unsafe.Pointer(iPtr)).Fflags&DELETED != 0 {
		// The interpreter is being deleted. Don't create any new commands;
		// it's not safe to muck with the interpreter anymore.

		return uintptr(0)
	}

	// If the command name we seek to create already exists, we need to
	// delete that first.  That can be tricky in the presence of traces.
	// Loop until we no longer find an existing command in the way, or
	// until we've deleted one command and that didn't finish the job.

	for 1 != 0 {
		// Determine where the command should reside. If its name contains
		// namespace qualifiers, we put it in the specified namespace;
		// otherwise, we always put it in the global namespace.

		if libc.Xstrstr(tls, cmdName, ts+7376) != uintptr(0) {
			// var dummy1 uintptr at bp+8, 8

			// var dummy2 uintptr at bp+16, 8

			XTclGetNamespaceForQualName(tls, interp, cmdName, uintptr(0),
				TCL_CREATE_NS_IF_UNKNOWN, bp, bp+8, bp+16, bp+24)
			if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) || *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) {
				return uintptr(0)
			}
		} else {
			*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)) = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
			*(*uintptr)(unsafe.Pointer(bp + 24 /* tail */)) = cmdName
		}

		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)) + 160 /* &.cmdTable */)).FcreateProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp /* nsPtr */))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 24 /* tail */)), bp+32 /* &isNew */)

		if *(*int32)(unsafe.Pointer(bp + 32)) != 0 || deleted != 0 {
			// isNew - No conflict with existing command.
			// deleted - We've already deleted a conflicting command
			break
		}

		// An existing command conflicts. Try to delete it...

		cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		// Be careful to preserve any existing import links so we can restore
		// them down below. That way, you can redefine a command and its
		// import status will remain intact.

		(*Command)(unsafe.Pointer(cmdPtr)).FrefCount++
		if (*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr != 0 {
			*(*int32)(unsafe.Pointer(cmdPtr + 80)) |= CMD_REDEF_IN_PROGRESS
		}

		XTcl_DeleteCommandFromToken(tls, interp, cmdPtr)

		if (*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_REDEF_IN_PROGRESS != 0 {
			oldRefPtr = (*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr
			(*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr = uintptr(0)
		}
		if libc.PostDecInt32(&(*Command)(unsafe.Pointer(cmdPtr)).FrefCount, 1) <= 1 {
			XTclpFree(tls, cmdPtr)
		}

		deleted = 1
	}

	if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) {
		// If the deletion callback recreated the command, just throw away the
		// new command (if we try to delete it again, we could get stuck in an
		// infinite loop).

		XTclpFree(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	}

	if !(deleted != 0) {
		// Command resolvers (per-interp, per-namespace) might have resolved
		// to a command for the given namespace scope with this command not
		// being registered with the namespace's command table. During BC
		// compilation, the so-resolved command turns into a CmdName literal.
		// Without invalidating a possible CmdName literal here explicitly,
		// such literals keep being reused while pointing to overhauled
		// commands.

		XTclInvalidateCmdLiteral(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 24 /* tail */)), *(*uintptr)(unsafe.Pointer(bp /* nsPtr */)))

		// The list of command exported from the namespace might have changed.
		// However, we do not need to recompute this just yet; next time we
		// need the info will be soon enough.

		if (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnumExportPatterns != 0 {
			(*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FexportLookupEpoch++
		}
		if (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcommandPathLength != 0 {
			(*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcmdRefEpoch++
		}

		XTclInvalidateNsPath(tls, *(*uintptr)(unsafe.Pointer(bp /* nsPtr */)))
	}
	cmdPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Command{})))
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cmdPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = hPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FnsPtr = *(*uintptr)(unsafe.Pointer(bp /* nsPtr */))
	(*Command)(unsafe.Pointer(cmdPtr)).FrefCount = 1
	(*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch = 0
	(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc = uintptr(0)
	(*Command)(unsafe.Pointer(cmdPtr)).FobjProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclInvokeStringCommand}))
	(*Command)(unsafe.Pointer(cmdPtr)).FobjClientData = cmdPtr
	(*Command)(unsafe.Pointer(cmdPtr)).Fproc = proc
	(*Command)(unsafe.Pointer(cmdPtr)).FclientData = clientData
	(*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc = deleteProc
	(*Command)(unsafe.Pointer(cmdPtr)).FdeleteData = clientData
	(*Command)(unsafe.Pointer(cmdPtr)).Fflags = 0
	(*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr = uintptr(0)
	(*Command)(unsafe.Pointer(cmdPtr)).FtracePtr = uintptr(0)
	(*Command)(unsafe.Pointer(cmdPtr)).FnreProc = uintptr(0)

	// Plug in any existing import references found above. Be sure to update
	// all of these references to point to the new command.

	if oldRefPtr != uintptr(0) {
		(*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr = oldRefPtr
		for oldRefPtr != uintptr(0) {
			var refCmdPtr uintptr = (*ImportRef)(unsafe.Pointer(oldRefPtr)).FimportedCmdPtr
			dataPtr = (*Command)(unsafe.Pointer(refCmdPtr)).FobjClientData
			(*ImportedCmdData)(unsafe.Pointer(dataPtr)).FrealCmdPtr = cmdPtr
			oldRefPtr = (*ImportRef)(unsafe.Pointer(oldRefPtr)).FnextPtr
		}
	}

	// We just created a command, so in its namespace and all of its parent
	// namespaces, it may shadow global commands with the same name. If any
	// shadowed commands are found, invalidate all cached command references
	// in the affected namespaces.

	XTclResetShadowedCmdRefs(tls, interp, cmdPtr)
	return cmdPtr
}

//----------------------------------------------------------------------
//
// Tcl_CreateObjCommand --
//
//	Define a new object-based command in a command table.
//
// Results:
//	The return value is a token for the command, which can be used in
//	future calls to Tcl_GetCommandName.
//
// Side effects:
//	If a command named "cmdName" already exists for interp, it is
//	first deleted.  Then the new command is created from the arguments.
//	[***] (See below for exception).
//
//	In the future, during bytecode evaluation when "cmdName" is seen as
//	the name of a command by Tcl_EvalObj or Tcl_Eval, the object-based
//	Tcl_ObjCmdProc proc will be called. When the command is deleted from
//	the table, deleteProc will be called. See the manual entry for details
//	on the calling sequence.
//
//----------------------------------------------------------------------

func XTcl_CreateObjCommand(tls *libc.TLS, interp uintptr, cmdName uintptr, proc uintptr, clientData ClientData, deleteProc uintptr) Tcl_Command { /* tclBasic.c:2251:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var iPtr uintptr = interp
	// var nsPtr uintptr at bp, 8

	// var tail uintptr at bp+24, 8

	if (*Interp)(unsafe.Pointer(iPtr)).Fflags&DELETED != 0 {
		// The interpreter is being deleted. Don't create any new commands;
		// it's not safe to muck with the interpreter anymore.
		return uintptr(0)
	}

	// Determine where the command should reside. If its name contains
	// namespace qualifiers, we put it in the specified namespace;
	// otherwise, we always put it in the global namespace.

	if libc.Xstrstr(tls, cmdName, ts+7376) != uintptr(0) {
		// var dummy1 uintptr at bp+8, 8

		// var dummy2 uintptr at bp+16, 8

		XTclGetNamespaceForQualName(tls, interp, cmdName, uintptr(0),
			TCL_CREATE_NS_IF_UNKNOWN, bp, bp+8, bp+16, bp+24)
		if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) || *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) {
			return uintptr(0)
		}
	} else {
		*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)) = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
		*(*uintptr)(unsafe.Pointer(bp + 24 /* tail */)) = cmdName
	}

	return XTclCreateObjCommandInNs(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 24 /* tail */)), *(*uintptr)(unsafe.Pointer(bp /* nsPtr */)),
		proc, clientData, deleteProc)
}

func XTclCreateObjCommandInNs(tls *libc.TLS, interp uintptr, cmdName uintptr, namespace uintptr, proc uintptr, clientData ClientData, deleteProc uintptr) Tcl_Command { /* tclBasic.c:2303:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var deleted int32 = 0
	*(*int32)(unsafe.Pointer(bp /* isNew */)) = 0
	var cmdPtr uintptr
	var oldRefPtr uintptr = uintptr(0)
	var dataPtr uintptr
	var hPtr uintptr
	var nsPtr uintptr = namespace
	// If the command name we seek to create already exists, we need to
	// delete that first.  That can be tricky in the presence of traces.
	// Loop until we no longer find an existing command in the way, or
	// until we've deleted one command and that didn't finish the job.
	for 1 != 0 {
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(nsPtr + 160 /* &.cmdTable */)).FcreateProc})).f(tls, nsPtr+160 /* &.cmdTable */, cmdName, bp /* &isNew */)

		if *(*int32)(unsafe.Pointer(bp)) != 0 || deleted != 0 {
			// isNew - No conflict with existing command.
			// deleted - We've already deleted a conflicting command
			break
		}

		// An existing command conflicts. Try to delete it...

		cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		// [***] This is wrong.  See Tcl Bug a16752c252.
		// However, this buggy behavior is kept under particular circumstances
		// to accommodate deployed binaries of the "tclcompiler" program
		// <http://sourceforge.net/projects/tclpro/> that crash if the bug is
		// fixed.

		if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc == *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclInvokeStringCommand})) &&
			(*Command)(unsafe.Pointer(cmdPtr)).FclientData == clientData &&
			(*Command)(unsafe.Pointer(cmdPtr)).FdeleteData == clientData &&
			(*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc == deleteProc {
			(*Command)(unsafe.Pointer(cmdPtr)).FobjProc = proc
			(*Command)(unsafe.Pointer(cmdPtr)).FobjClientData = clientData
			return cmdPtr
		}

		// Otherwise, we delete the old command. Be careful to preserve any
		// existing import links so we can restore them down below. That way,
		// you can redefine a command and its import status will remain
		// intact.

		(*Command)(unsafe.Pointer(cmdPtr)).FrefCount++
		if (*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr != 0 {
			*(*int32)(unsafe.Pointer(cmdPtr + 80)) |= CMD_REDEF_IN_PROGRESS
		}

		// Make sure namespace doesn't get deallocated.

		(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FrefCount++

		XTcl_DeleteCommandFromToken(tls, interp, cmdPtr)
		nsPtr = XTclEnsureNamespace(tls, interp,
			(*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)
		XTclNsDecrRefCount(tls, (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)

		if (*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_REDEF_IN_PROGRESS != 0 {
			oldRefPtr = (*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr
			(*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr = uintptr(0)
		}
		if libc.PostDecInt32(&(*Command)(unsafe.Pointer(cmdPtr)).FrefCount, 1) <= 1 {
			XTclpFree(tls, cmdPtr)
		}

		deleted = 1
	}
	if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
		// If the deletion callback recreated the command, just throw away
		// the new command (if we try to delete it again, we could get
		// stuck in an infinite loop).

		XTclpFree(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	}

	if !(deleted != 0) {
		// Command resolvers (per-interp, per-namespace) might have resolved
		// to a command for the given namespace scope with this command not
		// being registered with the namespace's command table. During BC
		// compilation, the so-resolved command turns into a CmdName literal.
		// Without invalidating a possible CmdName literal here explicitly,
		// such literals keep being reused while pointing to overhauled
		// commands.

		XTclInvalidateCmdLiteral(tls, interp, cmdName, nsPtr)

		// The list of command exported from the namespace might have changed.
		// However, we do not need to recompute this just yet; next time we
		// need the info will be soon enough.

		if (*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns != 0 {
			(*Namespace)(unsafe.Pointer(nsPtr)).FexportLookupEpoch++
		}
		if (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength != 0 {
			(*Namespace)(unsafe.Pointer(nsPtr)).FcmdRefEpoch++
		}

		XTclInvalidateNsPath(tls, nsPtr)
	}
	cmdPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Command{})))
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cmdPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = hPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FnsPtr = nsPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FrefCount = 1
	(*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch = 0
	(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc = uintptr(0)
	(*Command)(unsafe.Pointer(cmdPtr)).FobjProc = proc
	(*Command)(unsafe.Pointer(cmdPtr)).FobjClientData = clientData
	(*Command)(unsafe.Pointer(cmdPtr)).Fproc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclInvokeObjectCommand}))
	(*Command)(unsafe.Pointer(cmdPtr)).FclientData = cmdPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc = deleteProc
	(*Command)(unsafe.Pointer(cmdPtr)).FdeleteData = clientData
	(*Command)(unsafe.Pointer(cmdPtr)).Fflags = 0
	(*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr = uintptr(0)
	(*Command)(unsafe.Pointer(cmdPtr)).FtracePtr = uintptr(0)
	(*Command)(unsafe.Pointer(cmdPtr)).FnreProc = uintptr(0)

	// Plug in any existing import references found above. Be sure to update
	// all of these references to point to the new command.

	if oldRefPtr != uintptr(0) {
		(*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr = oldRefPtr
		for oldRefPtr != uintptr(0) {
			var refCmdPtr uintptr = (*ImportRef)(unsafe.Pointer(oldRefPtr)).FimportedCmdPtr
			dataPtr = (*Command)(unsafe.Pointer(refCmdPtr)).FobjClientData
			(*ImportedCmdData)(unsafe.Pointer(dataPtr)).FrealCmdPtr = cmdPtr
			oldRefPtr = (*ImportRef)(unsafe.Pointer(oldRefPtr)).FnextPtr
		}
	}

	// We just created a command, so in its namespace and all of its parent
	// namespaces, it may shadow global commands with the same name. If any
	// shadowed commands are found, invalidate all cached command references
	// in the affected namespaces.

	XTclResetShadowedCmdRefs(tls, interp, cmdPtr)
	return cmdPtr
}

//----------------------------------------------------------------------
//
// TclInvokeStringCommand --
//
//	"Wrapper" Tcl_ObjCmdProc used to call an existing string-based
//	Tcl_CmdProc if no object-based function exists for a command. A
//	pointer to this function is stored as the Tcl_ObjCmdProc in a Command
//	structure. It simply turns around and calls the string Tcl_CmdProc in
//	the Command structure.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	Besides those side effects of the called Tcl_CmdProc,
//	TclInvokeStringCommand allocates and frees storage.
//
//----------------------------------------------------------------------

func XTclInvokeStringCommand(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:2489:1: */
	var cmdPtr uintptr = clientData
	var i int32
	var result int32
	var argv uintptr = XTclStackAlloc(tls, interp, int32(uint64(uint32(objc+1))*uint64(unsafe.Sizeof(uintptr(0)))))

	for i = 0; i < objc; i++ {
		*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}
	*(*uintptr)(unsafe.Pointer(argv + uintptr(objc)*8)) = uintptr(0)

	// Invoke the command's string-based Tcl_CmdProc.

	result = (*struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Command)(unsafe.Pointer(cmdPtr)).Fproc})).f(tls, (*Command)(unsafe.Pointer(cmdPtr)).FclientData, interp, objc, argv)

	XTclStackFree(tls, interp, argv)
	return result
}

//----------------------------------------------------------------------
//
// TclInvokeObjectCommand --
//
//	"Wrapper" Tcl_CmdProc used to call an existing object-based
//	Tcl_ObjCmdProc if no string-based function exists for a command. A
//	pointer to this function is stored as the Tcl_CmdProc in a Command
//	structure. It simply turns around and calls the object Tcl_ObjCmdProc
//	in the Command structure.
//
// Results:
//	A standard Tcl string result value.
//
// Side effects:
//	Besides those side effects of the called Tcl_ObjCmdProc,
//	TclInvokeObjectCommand allocates and frees storage.
//
//----------------------------------------------------------------------

func XTclInvokeObjectCommand(tls *libc.TLS, clientData ClientData, interp uintptr, argc int32, argv uintptr) int32 { /* tclBasic.c:2537:1: */
	var cmdPtr uintptr = clientData
	var objPtr uintptr
	var i int32
	var length int32
	var result int32
	var objv uintptr = XTclStackAlloc(tls, interp, int32(uint32(uint64(argc)*uint64(unsafe.Sizeof(uintptr(0))))))

	for i = 0; i < argc; i++ {
		length = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
			if length == 0 {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(length+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), uint64(length))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(length))) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = length
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
			{
			}
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
		*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) = objPtr
	}

	// Invoke the command's object-based Tcl_ObjCmdProc.

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != uintptr(0) {
		result = (*struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Command)(unsafe.Pointer(cmdPtr)).FobjProc})).f(tls, (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData, interp, argc, objv)
	} else {
		result = XTcl_NRCallObjProc(tls, interp, (*Command)(unsafe.Pointer(cmdPtr)).FnreProc,
			(*Command)(unsafe.Pointer(cmdPtr)).FobjClientData, argc, objv)
	}

	// Move the interpreter's object result to the string result, then reset
	// the object result.

	XTcl_GetStringResult(tls, interp)

	// Decrement the ref counts for the argument objects created above, then
	// free the objv array if malloc'ed storage was used.

	for i = 0; i < argc; i++ {
		objPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTclStackFree(tls, interp, objv)
	return result
}

//----------------------------------------------------------------------
//
// TclRenameCommand --
//
//	Called to give an existing Tcl command a different name. Both the old
//	command name and the new command name can have "::" namespace
//	qualifiers. If the new command has a different namespace context, the
//	command will be moved to that namespace and will execute in the
//	context of that new namespace.
//
//	If the new command name is NULL or the null string, the command is
//	deleted.
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	If anything goes wrong, an error message is returned in the
//	interpreter's result object.
//
//----------------------------------------------------------------------

func XTclRenameCommand(tls *libc.TLS, interp uintptr, oldName uintptr, newName uintptr) int32 { /* tclBasic.c:2612:1: */
	bp := tls.Alloc(400)
	defer tls.Free(400)

	var iPtr uintptr
	// var newTail uintptr at bp+168, 8

	var cmdNsPtr uintptr
	// var newNsPtr uintptr at bp+144, 8

	// var dummy1 uintptr at bp+152, 8

	// var dummy2 uintptr at bp+160, 8

	var cmd Tcl_Command
	var cmdPtr uintptr
	var hPtr uintptr
	var oldHPtr uintptr
	// var isNew int32 at bp+176, 4

	var result int32
	var oldFullName uintptr
	// var newFullName Tcl_DString at bp+184, 216
	iPtr = interp

	// Find the existing command. An error is returned if cmdName can't be
	// found.

	cmd = XTcl_FindCommand(tls, interp, oldName, uintptr(0), 0)
	cmdPtr = cmd
	if !(cmdPtr == uintptr(0)) {
		goto __1
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+7813,
		libc.VaList(bp, func() uintptr {
			if newName == uintptr(0) || int32(*(*int8)(unsafe.Pointer(newName))) == 0 {
				return ts + 7850 /* "delete" */
			}
			return ts + 5869 /* "rename" */
		}(),
			oldName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+7699, ts+7857, oldName, uintptr(0)))
	return TCL_ERROR
__1:
	;

	// If the new command name is NULL or empty, delete the command. Do this
	// with Tcl_DeleteCommandFromToken, since we already have the command.

	if !(newName == uintptr(0) || int32(*(*int8)(unsafe.Pointer(newName))) == 0) {
		goto __2
	}
	XTcl_DeleteCommandFromToken(tls, interp, cmd)
	return TCL_OK
__2:
	;

	cmdNsPtr = (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr
	oldFullName = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(oldFullName)).FrefCount++
	XTcl_GetCommandFullName(tls, interp, cmd, oldFullName)

	// Make sure that the destination command does not already exist. The
	// rename operation is like creating a command, so we should automatically
	// create the containing namespaces just like Tcl_CreateCommand would.

	XTclGetNamespaceForQualName(tls, interp, newName, uintptr(0),
		TCL_CREATE_NS_IF_UNKNOWN, bp+144, bp+152, bp+160, bp+168)

	if !(*(*uintptr)(unsafe.Pointer(bp + 144)) == uintptr(0) || *(*uintptr)(unsafe.Pointer(bp + 168)) == uintptr(0)) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+7865, libc.VaList(bp+56, newName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+7444, ts+7857, uintptr(0)))
	result = TCL_ERROR
	goto done
__3:
	;
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 144)) + 160)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 144))+160, *(*uintptr)(unsafe.Pointer(bp + 168))) != uintptr(0)) {
		goto __4
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+7904, libc.VaList(bp+96, newName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+4178, ts+7949, ts+7959,
		ts+7966, uintptr(0)))
	result = TCL_ERROR
	goto done
__4:
	;

	// Warning: any changes done in the code here are likely to be needed in
	// Tcl_HideCommand code too (until the common parts are extracted out).
	// - dl

	// Put the command in the new namespace so we can check for an alias loop.
	// Since we are adding a new command to a namespace, we must handle any
	// shadowing of the global commands that this might create.

	oldHPtr = (*Command)(unsafe.Pointer(cmdPtr)).FhPtr
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 144 /* newNsPtr */)) + 160 /* &.cmdTable */)).FcreateProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 144 /* newNsPtr */))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 168 /* newTail */)), bp+176 /* &isNew */)
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cmdPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = hPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FnsPtr = *(*uintptr)(unsafe.Pointer(bp + 144 /* newNsPtr */))
	XTclResetShadowedCmdRefs(tls, interp, cmdPtr)

	// Now check for an alias loop. If we detect one, put everything back the
	// way it was and report the error.

	result = XTclPreventAliasLoop(tls, interp, interp, cmdPtr)
	if !(result != TCL_OK) {
		goto __5
	}
	XTcl_DeleteHashEntry(tls, (*Command)(unsafe.Pointer(cmdPtr)).FhPtr)
	(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = oldHPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FnsPtr = cmdNsPtr
	goto done
__5:
	;

	// The list of command exported from the namespace might have changed.
	// However, we do not need to recompute this just yet; next time we need
	// the info will be soon enough. These might refer to the same variable,
	// but that's no big deal.

	if !((*Namespace)(unsafe.Pointer(cmdNsPtr)).FnumExportPatterns != 0) {
		goto __6
	}
	(*Namespace)(unsafe.Pointer(cmdNsPtr)).FexportLookupEpoch++
__6:
	;
	if !((*Namespace)(unsafe.Pointer(cmdNsPtr)).FcommandPathLength != 0) {
		goto __7
	}
	(*Namespace)(unsafe.Pointer(cmdNsPtr)).FcmdRefEpoch++
__7:
	;

	if !((*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FnumExportPatterns != 0) {
		goto __8
	}
	(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FexportLookupEpoch++
__8:
	;
	if !((*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FcommandPathLength != 0) {
		goto __9
	}
	(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FcmdRefEpoch++
__9:
	;

	// Command resolvers (per-interp, per-namespace) might have resolved to a
	// command for the given namespace scope with this command not being
	// registered with the namespace's command table. During BC compilation,
	// the so-resolved command turns into a CmdName literal. Without
	// invalidating a possible CmdName literal here explicitly, such literals
	// keep being reused while pointing to overhauled commands.

	XTclInvalidateCmdLiteral(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 168 /* newTail */)), (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)

	// Script for rename traces can delete the command "oldName". Therefore
	// increment the reference count for cmdPtr so that it's Command structure
	// is freed only towards the end of this function by calling
	// TclCleanupCommand.
	//
	// The trace function needs to get a fully qualified name for old and new
	// commands [Tcl bug #651271], or else there's no way for the trace
	// function to get the namespace from which the old command is being
	// renamed!

	XTcl_DStringInit(tls, bp+184)
	XTcl_DStringAppend(tls, bp+184, (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 144 /* newNsPtr */)))).FfullName, -1)
	if !(*(*uintptr)(unsafe.Pointer(bp + 144)) != (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr) {
		goto __10
	}
	XTcl_DStringAppend(tls, bp+184, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
__10:
	;
	XTcl_DStringAppend(tls, bp+184, *(*uintptr)(unsafe.Pointer(bp + 168 /* newTail */)), -1)
	(*Command)(unsafe.Pointer(cmdPtr)).FrefCount++
	sCallCommandTraces(tls, iPtr, cmdPtr, XTcl_GetString(tls, oldFullName),
		(*Tcl_DString)(unsafe.Pointer(bp+184)).Fstring, TCL_TRACE_RENAME)
	XTcl_DStringFree(tls, bp+184)

	// The new command name is okay, so remove the command from its current
	// namespace. This is like deleting the command, so bump the cmdEpoch to
	// invalidate any cached references to the command.

	XTcl_DeleteHashEntry(tls, oldHPtr)
	(*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch++

	// If the command being renamed has a compile function, increment the
	// interpreter's compileEpoch to invalidate its compiled code. This makes
	// sure that we don't later try to execute old code compiled for the
	// now-renamed command.

	if !((*Command)(unsafe.Pointer(cmdPtr)).FcompileProc != uintptr(0)) {
		goto __11
	}
	(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
__11:
	;

	// Now free the Command structure, if the "oldName" command has been
	// deleted by invocation of rename traces.

	if !(libc.PostDecInt32(&(*Command)(unsafe.Pointer(cmdPtr)).FrefCount, 1) <= 1) {
		goto __12
	}
	XTclpFree(tls, cmdPtr)
__12:
	;

	result = TCL_OK

done:
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldFullName)).FrefCount, 1) > 1) {
		goto __13
	}
	goto __14
__13:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(oldFullName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldFullName)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __15
	}

	if !((*Tcl_Obj)(unsafe.Pointer(oldFullName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldFullName)).Fbytes != XtclEmptyStringRep) {
		goto __17
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldFullName)).Fbytes)
__17:
	;
	(*Tcl_Obj)(unsafe.Pointer(oldFullName)).Flength = -1
__18:
	;
	*(*uintptr)(unsafe.Pointer(oldFullName + 32)) = XtclFreeObjList
	XtclFreeObjList = oldFullName
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
	goto __16
__15:
	XTclFreeObj(tls, oldFullName)
__16:
	;
__14:
	;

	return result
}

//----------------------------------------------------------------------
//
// Tcl_SetCommandInfo --
//
//	Modifies various information about a Tcl command. Note that this
//	function will not change a command's namespace; use TclRenameCommand
//	to do that. Also, the isNativeObjectProc member of *infoPtr is
//	ignored.
//
// Results:
//	If cmdName exists in interp, then the information at *infoPtr is
//	stored with the command in place of the current information and 1 is
//	returned. If the command doesn't exist then 0 is returned.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_SetCommandInfo(tls *libc.TLS, interp uintptr, cmdName uintptr, infoPtr uintptr) int32 { /* tclBasic.c:2814:1: */
	var cmd Tcl_Command

	cmd = XTcl_FindCommand(tls, interp, cmdName, uintptr(0), 0)
	return XTcl_SetCommandInfoFromToken(tls, cmd, infoPtr)
}

//----------------------------------------------------------------------
//
// Tcl_SetCommandInfoFromToken --
//
//	Modifies various information about a Tcl command. Note that this
//	function will not change a command's namespace; use TclRenameCommand
//	to do that. Also, the isNativeObjectProc member of *infoPtr is
//	ignored.
//
// Results:
//	If cmdName exists in interp, then the information at *infoPtr is
//	stored with the command in place of the current information and 1 is
//	returned. If the command doesn't exist then 0 is returned.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_SetCommandInfoFromToken(tls *libc.TLS, cmd Tcl_Command, infoPtr uintptr) int32 { /* tclBasic.c:2849:1: */
	var cmdPtr uintptr // Internal representation of the command

	if cmd == uintptr(0) {
		return 0
	}

	// The isNativeObjectProc and nsPtr members of *infoPtr are ignored.

	cmdPtr = cmd
	(*Command)(unsafe.Pointer(cmdPtr)).Fproc = (*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).Fproc
	(*Command)(unsafe.Pointer(cmdPtr)).FclientData = (*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FclientData
	if (*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FobjProc == uintptr(0) {
		(*Command)(unsafe.Pointer(cmdPtr)).FobjProc = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclInvokeStringCommand}))
		(*Command)(unsafe.Pointer(cmdPtr)).FobjClientData = cmdPtr
		(*Command)(unsafe.Pointer(cmdPtr)).FnreProc = uintptr(0)
	} else {
		if (*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FobjProc != (*Command)(unsafe.Pointer(cmdPtr)).FobjProc {
			(*Command)(unsafe.Pointer(cmdPtr)).FnreProc = uintptr(0)
			(*Command)(unsafe.Pointer(cmdPtr)).FobjProc = (*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FobjProc
		}
		(*Command)(unsafe.Pointer(cmdPtr)).FobjClientData = (*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FobjClientData
	}
	(*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc = (*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FdeleteProc
	(*Command)(unsafe.Pointer(cmdPtr)).FdeleteData = (*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FdeleteData
	return 1
}

//----------------------------------------------------------------------
//
// Tcl_GetCommandInfo --
//
//	Returns various information about a Tcl command.
//
// Results:
//	If cmdName exists in interp, then *infoPtr is modified to hold
//	information about cmdName and 1 is returned. If the command doesn't
//	exist then 0 is returned and *infoPtr isn't modified.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetCommandInfo(tls *libc.TLS, interp uintptr, cmdName uintptr, infoPtr uintptr) int32 { /* tclBasic.c:2901:1: */
	var cmd Tcl_Command

	cmd = XTcl_FindCommand(tls, interp, cmdName, uintptr(0), 0)
	return XTcl_GetCommandInfoFromToken(tls, cmd, infoPtr)
}

//----------------------------------------------------------------------
//
// Tcl_GetCommandInfoFromToken --
//
//	Returns various information about a Tcl command.
//
// Results:
//	Copies information from the command identified by 'cmd' into a
//	caller-supplied structure and returns 1. If the 'cmd' is NULL, leaves
//	the structure untouched and returns 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetCommandInfoFromToken(tls *libc.TLS, cmd Tcl_Command, infoPtr uintptr) int32 { /* tclBasic.c:2933:1: */
	var cmdPtr uintptr // Internal representation of the command

	if cmd == uintptr(0) {
		return 0
	}

	// Set isNativeObjectProc 1 if objProc was registered by a call to
	// Tcl_CreateObjCommand. Otherwise set it to 0.

	cmdPtr = cmd
	(*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FisNativeObjectProc = libc.Bool32((*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclInvokeStringCommand})))
	(*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FobjProc = (*Command)(unsafe.Pointer(cmdPtr)).FobjProc
	(*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FobjClientData = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	(*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).Fproc = (*Command)(unsafe.Pointer(cmdPtr)).Fproc
	(*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FclientData = (*Command)(unsafe.Pointer(cmdPtr)).FclientData
	(*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FdeleteProc = (*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc
	(*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FdeleteData = (*Command)(unsafe.Pointer(cmdPtr)).FdeleteData
	(*Tcl_CmdInfo)(unsafe.Pointer(infoPtr)).FnamespacePtr = (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr

	return 1
}

//----------------------------------------------------------------------
//
// Tcl_GetCommandName --
//
//	Given a token returned by Tcl_CreateCommand, this function returns the
//	current name of the command (which may have changed due to renaming).
//
// Results:
//	The return value is the name of the given command.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetCommandName(tls *libc.TLS, interp uintptr, command Tcl_Command) uintptr { /* tclBasic.c:2979:12: */
	var cmdPtr uintptr = command

	if cmdPtr == uintptr(0) || (*Command)(unsafe.Pointer(cmdPtr)).FhPtr == uintptr(0) {
		// This should only happen if command was "created" after the
		// interpreter began to be deleted, so there isn't really any command.
		// Just return an empty string.

		return ts + 2631 /* "" */
	}

	return func() uintptr {
		if (*Tcl_HashTable)(unsafe.Pointer((*Tcl_HashEntry)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FhPtr)).FtablePtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Tcl_HashEntry)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FhPtr)).FtablePtr)).FkeyType == -1 {
			return *(*uintptr)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FhPtr + 32))
		}
		return (*Command)(unsafe.Pointer(cmdPtr)).FhPtr + 32
	}()
}

//----------------------------------------------------------------------
//
// Tcl_GetCommandFullName --
//
//	Given a token returned by, e.g., Tcl_CreateCommand or Tcl_FindCommand,
//	this function appends to an object the command's full name, qualified
//	by a sequence of parent namespace names. The command's fully-qualified
//	name may have changed due to renaming.
//
// Results:
//	None.
//
// Side effects:
//	The command's fully-qualified name is appended to the string
//	representation of objPtr.
//
//----------------------------------------------------------------------

func XTcl_GetCommandFullName(tls *libc.TLS, interp uintptr, command Tcl_Command, objPtr uintptr) { /* tclBasic.c:3022:1: */
	var iPtr uintptr = interp
	var cmdPtr uintptr = command
	var name uintptr

	// Add the full name of the containing namespace, followed by the "::"
	// separator, and the command name.

	if cmdPtr != uintptr(0) {
		if (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr != uintptr(0) {
			XTcl_AppendToObj(tls, objPtr, (*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FfullName, -1)
			if (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr != (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr {
				XTcl_AppendToObj(tls, objPtr, ts+7376, 2)
			}
		}
		if (*Command)(unsafe.Pointer(cmdPtr)).FhPtr != uintptr(0) {
			name = func() uintptr {
				if (*Tcl_HashTable)(unsafe.Pointer((*Tcl_HashEntry)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FhPtr)).FtablePtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Tcl_HashEntry)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FhPtr)).FtablePtr)).FkeyType == -1 {
					return *(*uintptr)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FhPtr + 32))
				}
				return (*Command)(unsafe.Pointer(cmdPtr)).FhPtr + 32
			}()
			XTcl_AppendToObj(tls, objPtr, name, -1)
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_DeleteCommand --
//
//	Remove the given command from the given interpreter.
//
// Results:
//	0 is returned if the command was deleted successfully. -1 is returned
//	if there didn't exist a command by that name.
//
// Side effects:
//	cmdName will no longer be recognized as a valid command for interp.
//
//----------------------------------------------------------------------

func XTcl_DeleteCommand(tls *libc.TLS, interp uintptr, cmdName uintptr) int32 { /* tclBasic.c:3072:1: */
	var cmd Tcl_Command

	// Find the desired command and delete it.

	cmd = XTcl_FindCommand(tls, interp, cmdName, uintptr(0), 0)
	if cmd == uintptr(0) {
		return -1
	}
	return XTcl_DeleteCommandFromToken(tls, interp, cmd)
}

//----------------------------------------------------------------------
//
// Tcl_DeleteCommandFromToken --
//
//	Removes the given command from the given interpreter. This function
//	resembles Tcl_DeleteCommand, but takes a Tcl_Command token instead of
//	a command name for efficiency.
//
// Results:
//	0 is returned if the command was deleted successfully. -1 is returned
//	if there didn't exist a command by that name.
//
// Side effects:
//	The command specified by "cmd" will no longer be recognized as a valid
//	command for "interp".
//
//----------------------------------------------------------------------

func XTcl_DeleteCommandFromToken(tls *libc.TLS, interp uintptr, cmd Tcl_Command) int32 { /* tclBasic.c:3111:1: */
	var iPtr uintptr = interp
	var cmdPtr uintptr = cmd
	var refPtr uintptr
	var nextRefPtr uintptr
	var importCmd Tcl_Command

	// Bump the command epoch counter. This will invalidate all cached
	// references that point to this command.

	(*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch++

	// The code here is tricky. We can't delete the hash table entry before
	// invoking the deletion callback because there are cases where the
	// deletion callback needs to invoke the command (e.g. object systems such
	// as OTcl). However, this means that the callback could try to delete or
	// rename the command. The deleted flag allows us to detect these cases
	// and skip nested deletes.

	if (*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_IS_DELETED != 0 {
		// Another deletion is already in progress. Remove the hash table
		// entry now, but don't invoke a callback or free the command
		// structure. Take care to only remove the hash entry if it has not
		// already been removed; otherwise if we manage to hit this function
		// three times, everything goes up in smoke. [Bug 1220058]

		if (*Command)(unsafe.Pointer(cmdPtr)).FhPtr != uintptr(0) {
			XTcl_DeleteHashEntry(tls, (*Command)(unsafe.Pointer(cmdPtr)).FhPtr)
			(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = uintptr(0)
		}
		return 0
	}

	// We must delete this command, even though both traces and delete procs
	// may try to avoid this (renaming the command etc). Also traces and
	// delete procs may try to delete the command themselves. This flag
	// declares that a delete is in progress and that recursive deletes should
	// be ignored.

	*(*int32)(unsafe.Pointer(cmdPtr + 80)) |= CMD_IS_DELETED

	// Call trace functions for the command being deleted. Then delete its
	// traces.

	(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FrefCount++

	if (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr != uintptr(0) {
		var tracePtr uintptr
		sCallCommandTraces(tls, iPtr, cmdPtr, uintptr(0), uintptr(0), TCL_TRACE_DELETE)

		// Now delete these traces.

		tracePtr = (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr
		for tracePtr != uintptr(0) {
			var nextPtr uintptr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr

			if libc.PostDecInt32(&(*CommandTrace)(unsafe.Pointer(tracePtr)).FrefCount, 1) <= 1 {
				XTclpFree(tls, tracePtr)
			}
			tracePtr = nextPtr
		}
		(*Command)(unsafe.Pointer(cmdPtr)).FtracePtr = uintptr(0)
	}

	// The list of command exported from the namespace might have changed.
	// However, we do not need to recompute this just yet; next time we need
	// the info will be soon enough.

	if (*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FnumExportPatterns != 0 {
		(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FexportLookupEpoch++
	}
	if (*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FcommandPathLength != 0 {
		(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).FcmdRefEpoch++
	}

	XTclNsDecrRefCount(tls, (*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)

	// If the command being deleted has a compile function, increment the
	// interpreter's compileEpoch to invalidate its compiled code. This makes
	// sure that we don't later try to execute old code compiled with
	// command-specific (i.e., inline) bytecodes for the now-deleted command.
	// This field is checked in Tcl_EvalObj and ObjInterpProc, and code whose
	// compilation epoch doesn't match is recompiled.

	if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc != uintptr(0) {
		(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
	}

	// Delete any imports of this routine elsewhere before calling deleteProc
	// to that traces on the imports don't reference deallocated storage.
	if !((*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_REDEF_IN_PROGRESS != 0) {
		for refPtr = (*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr; refPtr != uintptr(0); refPtr = nextRefPtr {
			nextRefPtr = (*ImportRef)(unsafe.Pointer(refPtr)).FnextPtr
			importCmd = (*ImportRef)(unsafe.Pointer(refPtr)).FimportedCmdPtr
			XTcl_DeleteCommandFromToken(tls, interp, importCmd)
		}
	}

	if (*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc != uintptr(0) {
		// Delete the command's client data. If this was an imported command
		// created when a command was imported into a namespace, this client
		// data will be a pointer to a ImportedCmdData structure describing
		// the "real" command that this imported command refers to.
		//
		// If you are getting a crash during the call to deleteProc and
		// cmdPtr->deleteProc is a pointer to the function free(), the most
		// likely cause is that your extension allocated memory for the
		// clientData argument to Tcl_CreateObjCommand with the ckalloc()
		// macro and you are now trying to deallocate this memory with free()
		// instead of ckfree(). You should pass a pointer to your own method
		// that calls ckfree().

		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc})).f(tls, (*Command)(unsafe.Pointer(cmdPtr)).FdeleteData)
	}

	// Don't use hPtr to delete the hash entry here, because it's possible
	// that the deletion callback renamed the command. Instead, use
	// cmdPtr->hptr, and make sure that no-one else has already deleted the
	// hash entry.

	if (*Command)(unsafe.Pointer(cmdPtr)).FhPtr != uintptr(0) {
		XTcl_DeleteHashEntry(tls, (*Command)(unsafe.Pointer(cmdPtr)).FhPtr)
		(*Command)(unsafe.Pointer(cmdPtr)).FhPtr = uintptr(0)
	}

	// A number of tests for particular kinds of commands are done by checking
	// whether the objProc field holds a known value. Set the field to NULL so
	// that such tests won't have false positives when applied to deleted
	// commands.

	(*Command)(unsafe.Pointer(cmdPtr)).FobjProc = uintptr(0)

	// Now free the Command structure, unless there is another reference to it
	// from a CmdName Tcl object in some ByteCode code sequence. In that case,
	// delay the cleanup until all references are either discarded (when a
	// ByteCode is freed) or replaced by a new reference (when a cached
	// CmdName Command reference is found to be invalid and
	// TclNRExecuteByteCode looks up the command in the command hashtable).

	*(*int32)(unsafe.Pointer(cmdPtr + 80)) |= CMD_DEAD
	if libc.PostDecInt32(&(*Command)(unsafe.Pointer(cmdPtr)).FrefCount, 1) <= 1 {
		XTclpFree(tls, cmdPtr)
	}

	return 0
}

//----------------------------------------------------------------------
//
// CallCommandTraces --
//
//	Abstraction of the code to call traces on a command.
//
// Results:
//	Currently always NULL.
//
// Side effects:
//	Anything; this may recursively evaluate scripts and code exists to do
//	just that.
//
//----------------------------------------------------------------------

func sCallCommandTraces(tls *libc.TLS, iPtr uintptr, cmdPtr uintptr, oldName uintptr, newName uintptr, flags int32) uintptr { /* tclBasic.c:3296:13: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var tracePtr uintptr
	// var active ActiveCommandTrace at bp, 32

	var result uintptr
	var oldNamePtr uintptr = uintptr(0)
	var state Tcl_InterpState = uintptr(0)

	if (*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_TRACE_ACTIVE != 0 {
		// While a rename trace is active, we will not process any more rename
		// traces; while a delete trace is active we will never reach here -
		// because Tcl_DeleteCommandFromToken checks for the condition
		// (cmdPtr->flags & CMD_IS_DELETED) and returns immediately when a
		// command deletion is in progress. For all other traces, delete
		// traces will not be invoked but a call to TraceCommandProc will
		// ensure that tracePtr->clientData is freed whenever the command
		// "oldName" is deleted.

		if (*Command)(unsafe.Pointer(cmdPtr)).Fflags&TCL_TRACE_RENAME != 0 {
			flags = flags & libc.CplInt32(TCL_TRACE_RENAME)
		}
		if flags == 0 {
			return uintptr(0)
		}
	}
	*(*int32)(unsafe.Pointer(cmdPtr + 80)) |= CMD_TRACE_ACTIVE

	result = uintptr(0)
	(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveCmdTracePtr
	(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FreverseScan = 0
	(*Interp)(unsafe.Pointer(iPtr)).FactiveCmdTracePtr = bp /* &active */

	if flags&TCL_TRACE_DELETE != 0 {
		flags = flags | TCL_TRACE_DESTROYED
	}
	(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FcmdPtr = cmdPtr

	XTcl_Preserve(tls, iPtr)

	for tracePtr = (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr; tracePtr != uintptr(0); tracePtr = (*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr {
		(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr
		if !((*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags&flags != 0) {
			continue
		}
		*(*int32)(unsafe.Pointer(cmdPtr + 80)) |= (*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags
		if oldName == uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				oldNamePtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).Flength = 0
			(*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).FtypePtr = uintptr(0)
			{
			}

			(*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).FrefCount++
			XTcl_GetCommandFullName(tls, iPtr,
				cmdPtr, oldNamePtr)
			oldName = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).Fbytes
				}
				return XTcl_GetString(tls, oldNamePtr)
			}()
		}
		(*CommandTrace)(unsafe.Pointer(tracePtr)).FrefCount++
		if state == uintptr(0) {
			state = XTcl_SaveInterpState(tls, iPtr, TCL_OK)
		}
		(*struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
		})(unsafe.Pointer(&struct{ uintptr }{(*CommandTrace)(unsafe.Pointer(tracePtr)).FtraceProc})).f(tls, (*CommandTrace)(unsafe.Pointer(tracePtr)).FclientData, iPtr,
			oldName, newName, flags)
		*(*int32)(unsafe.Pointer(cmdPtr + 80)) &= ^(*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags
		if libc.PostDecInt32(&(*CommandTrace)(unsafe.Pointer(tracePtr)).FrefCount, 1) <= 1 {
			XTclpFree(tls, tracePtr)
		}
	}

	if state != 0 {
		XTcl_RestoreInterpState(tls, iPtr, state)
	}

	// If a new object was created to hold the full oldName, free it now.

	if oldNamePtr != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(oldNamePtr)).Flength = -1
				for ok1 := true; ok1; ok1 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(oldNamePtr + 32)) = XtclFreeObjList
					XtclFreeObjList = oldNamePtr
				}
			} else {
				XTclFreeObj(tls, oldNamePtr)
			}
		}

	}

	// Restore the variable's flags, remove the record of our active traces,
	// and then return.

	*(*int32)(unsafe.Pointer(cmdPtr + 80)) &= libc.CplInt32(CMD_TRACE_ACTIVE)
	(*Interp)(unsafe.Pointer(iPtr)).FactiveCmdTracePtr = (*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextPtr
	XTcl_Release(tls, iPtr)
	return result
}

//----------------------------------------------------------------------
//
// CancelEvalProc --
//
//	Marks this interpreter as being canceled. This causes current
//	executions to be unwound as the interpreter enters a state where it
//	refuses to execute more commands or handle [catch] or [try], yet the
//	interpreter is still able to execute further commands after the
//	cancelation is cleared (unlike if it is deleted).
//
// Results:
//	The value given for the code argument.
//
// Side effects:
//	Transfers a message from the cancelation message to the interpreter.
//
//----------------------------------------------------------------------

func sCancelEvalProc(tls *libc.TLS, clientData ClientData, interp uintptr, code int32) int32 { /* tclBasic.c:3417:1: */
	var cancelInfo uintptr = clientData
	var iPtr uintptr

	if cancelInfo != uintptr(0) {

		iPtr = (*CancelInfo)(unsafe.Pointer(cancelInfo)).Finterp

		if iPtr != uintptr(0) {
			// Setting the CANCELED flag will cause the script in progress to
			// be canceled as soon as possible. The core honors this flag at
			// all the necessary places to ensure script cancellation is
			// responsive. Extensions can check for this flag by calling
			// Tcl_Canceled and checking if TCL_ERROR is returned or they can
			// choose to ignore the script cancellation flag and the
			// associated functionality altogether. Currently, the only other
			// flag we care about here is the TCL_CANCEL_UNWIND flag (from
			// Tcl_CancelEval). We do not want to simply combine all the flags
			// from original Tcl_CancelEval call with the interp flags here
			// just in case the caller passed flags that might cause behaviour
			// unrelated to script cancellation.

			*(*int32)(unsafe.Pointer(iPtr + 424)) |= CANCELED
			if ((*CancelInfo)(unsafe.Pointer(cancelInfo)).Fflags|CANCELED)&TCL_CANCEL_UNWIND != 0 {
				*(*int32)(unsafe.Pointer(iPtr + 424)) |= TCL_CANCEL_UNWIND
			}

			// Now, we must set the script cancellation flags on all the child
			// interpreters belonging to this one.

			XTclSetSlaveCancelFlags(tls, iPtr,
				(*CancelInfo)(unsafe.Pointer(cancelInfo)).Fflags|CANCELED, 0)

			// Create the result object now so that Tcl_Canceled can avoid
			// locking the cancelLock mutex.

			if (*CancelInfo)(unsafe.Pointer(cancelInfo)).Fresult != uintptr(0) {
				XTcl_SetStringObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FasyncCancelMsg, (*CancelInfo)(unsafe.Pointer(cancelInfo)).Fresult,
					(*CancelInfo)(unsafe.Pointer(cancelInfo)).Flength)
			} else {
				XTcl_SetObjLength(tls, (*Interp)(unsafe.Pointer(iPtr)).FasyncCancelMsg, 0)
			}
		}

	}

	return code
}

//----------------------------------------------------------------------
//
// TclCleanupCommand --
//
//	This function frees up a Command structure unless it is still
//	referenced from an interpreter's command hashtable or from a CmdName
//	Tcl object representing the name of a command in a ByteCode
//	instruction sequence.
//
// Results:
//	None.
//
// Side effects:
//	Memory gets freed unless a reference to the Command structure still
//	exists. In that case the cleanup is delayed until the command is
//	deleted or when the last ByteCode referring to it is freed.
//
//----------------------------------------------------------------------

func XTclCleanupCommand(tls *libc.TLS, cmdPtr uintptr) { /* tclBasic.c:3495:1: */
	(*Command)(unsafe.Pointer(cmdPtr)).FrefCount--
	if (*Command)(unsafe.Pointer(cmdPtr)).FrefCount <= 0 {
		XTclpFree(tls, cmdPtr)
	}
}

//----------------------------------------------------------------------
//
// Tcl_CreateMathFunc --
//
//	Creates a new math function for expressions in a given interpreter.
//
// Results:
//	None.
//
// Side effects:
//	The Tcl function defined by "name" is created or redefined. If the
//	function already exists then its definition is replaced; this includes
//	the builtin functions. Redefining a builtin function forces all
//	existing code to be invalidated since that code may be compiled using
//	an instruction specific to the replaced function. In addition,
//	redefioning a non-builtin function will force existing code to be
//	invalidated if the number of arguments has changed.
//
//----------------------------------------------------------------------

func XTcl_CreateMathFunc(tls *libc.TLS, interp uintptr, name uintptr, numArgs int32, argTypes uintptr, proc uintptr, clientData ClientData) { /* tclBasic.c:3528:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var bigName Tcl_DString at bp, 216

	var data uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(OldMathFuncData{})))

	(*OldMathFuncData)(unsafe.Pointer(data)).Fproc = proc
	(*OldMathFuncData)(unsafe.Pointer(data)).FnumArgs = numArgs
	(*OldMathFuncData)(unsafe.Pointer(data)).FargTypes = XTcl_Alloc(tls, uint32(uint64(numArgs)*uint64(unsafe.Sizeof(Tcl_ValueType(0)))))
	libc.Xmemcpy(tls, (*OldMathFuncData)(unsafe.Pointer(data)).FargTypes, argTypes, uint64(numArgs)*uint64(unsafe.Sizeof(Tcl_ValueType(0))))
	(*OldMathFuncData)(unsafe.Pointer(data)).FclientData = clientData

	XTcl_DStringInit(tls, bp)
	XTcl_DStringAppend(tls, bp, ts+6897, int32(uint64(unsafe.Sizeof([18]int8{}))-uint64(1)))
	XTcl_DStringAppend(tls, bp, name, -1)

	XTcl_CreateObjCommand(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sOldMathFuncProc})), data, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sOldMathFuncDeleteProc})))
	XTcl_DStringFree(tls, bp)
}

//----------------------------------------------------------------------
//
// OldMathFuncProc --
//
//	Dispatch to a math function created with Tcl_CreateMathFunc
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Whatever the math function does.
//
//----------------------------------------------------------------------

func sOldMathFuncProc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:3576:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var valuePtr uintptr
	var dataPtr uintptr = clientData
	// var funcResult Tcl_Value at bp+8, 24

	var args uintptr
	var result int32
	var j int32
	var k int32
	// var d float64 at bp, 8

	// Check argument count.

	if objc != (*OldMathFuncData)(unsafe.Pointer(dataPtr)).FnumArgs+1 {
		sMathFuncWrongNumArgs(tls, interp, (*OldMathFuncData)(unsafe.Pointer(dataPtr)).FnumArgs+1, objc, objv)
		return TCL_ERROR
	}

	// Convert arguments from Tcl_Obj's to Tcl_Value's.

	args = XTcl_Alloc(tls, uint32(uint64((*OldMathFuncData)(unsafe.Pointer(dataPtr)).FnumArgs)*uint64(unsafe.Sizeof(Tcl_Value{}))))
	j = 1
	k = 0
__1:
	if !(j < objc) {
		goto __3
	}
	{
		// TODO: Convert to TclGetNumberFromObj?
		valuePtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(j)*8))
		result = XTcl_GetDoubleFromObj(tls, uintptr(0), valuePtr, bp)
		if result != TCL_OK {
			// We have a non-numeric argument.

			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+7980,
				-1))
			XTclCheckBadOctal(tls, interp, XTcl_GetString(tls, valuePtr))
			XTclpFree(tls, args)
			return TCL_ERROR
		}

		// Copy the object's numeric value to the argument record, converting
		// it if necessary.
		//
		// NOTE: no bignum support; use the new mathfunc interface for that.

		(*Tcl_Value)(unsafe.Pointer(args + uintptr(k)*24)).Ftype = *(*Tcl_ValueType)(unsafe.Pointer((*OldMathFuncData)(unsafe.Pointer(dataPtr)).FargTypes + uintptr(k)*4))
		switch (*Tcl_Value)(unsafe.Pointer(args + uintptr(k)*24)).Ftype {
		case TCL_EITHER:
			if XTcl_GetLongFromObj(tls, uintptr(0), valuePtr, args+uintptr(k)*24+4) ==
				TCL_OK {
				(*Tcl_Value)(unsafe.Pointer(args + uintptr(k)*24)).Ftype = TCL_INT
				break
			}
			if func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
					return func() int32 {
						*(*Tcl_WideInt)(unsafe.Pointer(args + uintptr(k)*24 + 16)) = *(*Tcl_WideInt)(unsafe.Pointer(valuePtr + 32))
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
						return func() int32 {
							*(*Tcl_WideInt)(unsafe.Pointer(args + uintptr(k)*24 + 16)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(valuePtr + 32)))
							return TCL_OK
						}()
					}
					return XTcl_GetWideIntFromObj(tls, interp, valuePtr, args+uintptr(k)*24+16)
				}()
			}() ==
				TCL_OK {
				(*Tcl_Value)(unsafe.Pointer(args + uintptr(k)*24)).Ftype = TCL_WIDE_INT
				break
			}
			(*Tcl_Value)(unsafe.Pointer(args + uintptr(k)*24)).Ftype = TCL_DOUBLE
			fallthrough
			// FALLTHROUGH

		case TCL_DOUBLE:
			(*Tcl_Value)(unsafe.Pointer(args + uintptr(k)*24)).FdoubleValue = *(*float64)(unsafe.Pointer(bp /* d */))
			break
		case TCL_INT:
			if sExprIntFunc(tls, uintptr(0), interp, 2, objv+uintptr(j-1)*8) != TCL_OK {
				XTclpFree(tls, args)
				return TCL_ERROR
			}
			valuePtr = XTcl_GetObjResult(tls, interp)
			XTcl_GetLongFromObj(tls, uintptr(0), valuePtr, args+uintptr(k)*24+4)
			XTcl_ResetResult(tls, interp)
			break
		case TCL_WIDE_INT:
			if sExprWideFunc(tls, uintptr(0), interp, 2, objv+uintptr(j-1)*8) != TCL_OK {
				XTclpFree(tls, args)
				return TCL_ERROR
			}
			valuePtr = XTcl_GetObjResult(tls, interp)
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				*(*Tcl_WideInt)(unsafe.Pointer(args + uintptr(k)*24 + 16)) = *(*Tcl_WideInt)(unsafe.Pointer(valuePtr + 32))
			} else {
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
					*(*Tcl_WideInt)(unsafe.Pointer(args + uintptr(k)*24 + 16)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(valuePtr + 32)))
				} else {
					XTcl_GetWideIntFromObj(tls, uintptr(0), valuePtr, args+uintptr(k)*24+16)
				}
			}
			XTcl_ResetResult(tls, interp)
			break
		}

	}
	goto __2
__2:
	j++
	k++
	goto __1
	goto __3
__3:
	;

	// Call the function.

	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = 0
	result = (*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*OldMathFuncData)(unsafe.Pointer(dataPtr)).Fproc})).f(tls, (*OldMathFuncData)(unsafe.Pointer(dataPtr)).FclientData, interp, args, bp+8 /* &funcResult */)
	XTclpFree(tls, args)
	if result != TCL_OK {
		return result
	}

	// Return the result of the call.

	if (*Tcl_Value)(unsafe.Pointer(bp+8)).Ftype == TCL_INT {
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				valuePtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes = uintptr(0)
			*(*int32)(unsafe.Pointer(valuePtr + 32)) = (*Tcl_Value)(unsafe.Pointer(bp + 8)).FintValue
			(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
			{
			}
		}
	} else if (*Tcl_Value)(unsafe.Pointer(bp+8)).Ftype == TCL_WIDE_INT {
		valuePtr = XTcl_NewWideIntObj(tls, (*Tcl_Value)(unsafe.Pointer(bp+8 /* &funcResult */)).FwideValue)
	} else {
		return sCheckDoubleResult(tls, interp, (*Tcl_Value)(unsafe.Pointer(bp+8 /* &funcResult */)).FdoubleValue)
	}
	XTcl_SetObjResult(tls, interp, valuePtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// OldMathFuncDeleteProc --
//
//	Cleans up after deleting a math function registered with
//	Tcl_CreateMathFunc
//
// Results:
//	None.
//
// Side effects:
//	Frees allocated memory.
//
//----------------------------------------------------------------------

func sOldMathFuncDeleteProc(tls *libc.TLS, clientData ClientData) { /* tclBasic.c:3718:1: */
	var dataPtr uintptr = clientData

	XTclpFree(tls, (*OldMathFuncData)(unsafe.Pointer(dataPtr)).FargTypes)
	XTclpFree(tls, dataPtr)
}

//----------------------------------------------------------------------
//
// Tcl_GetMathFuncInfo --
//
//	Discovers how a particular math function was created in a given
//	interpreter.
//
// Results:
//	TCL_OK if it succeeds, TCL_ERROR else (leaving an error message in the
//	interpreter result if that happens.)
//
// Side effects:
//	If this function succeeds, the variables pointed to by the numArgsPtr
//	and argTypePtr arguments will be updated to detail the arguments
//	allowed by the function. The variable pointed to by the procPtr
//	argument will be set to NULL if the function is a builtin function,
//	and will be set to the address of the C function used to implement the
//	math function otherwise (in which case the variable pointed to by the
//	clientDataPtr argument will also be updated.)
//
//----------------------------------------------------------------------

func XTcl_GetMathFuncInfo(tls *libc.TLS, interp uintptr, name uintptr, numArgsPtr uintptr, argTypesPtr uintptr, procPtr uintptr, clientDataPtr uintptr) int32 { /* tclBasic.c:3752:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var cmdNameObj uintptr
	var cmdPtr uintptr

	// Get the command that implements the math function.

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			cmdNameObj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([16]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([16]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes, ts+8032, uint64(int32(uint64(unsafe.Sizeof([16]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes + 15)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Flength = int32(uint64(unsafe.Sizeof([16]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).FtypePtr = uintptr(0)
		{
		}
	}
	XTcl_AppendToObj(tls, cmdNameObj, name, -1)
	(*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).FrefCount++
	cmdPtr = XTcl_GetCommandFromObj(tls, interp, cmdNameObj)
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = cmdNameObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	// Report unknown functions.

	if cmdPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+8048, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+8075, name, uintptr(0)))
		*(*int32)(unsafe.Pointer(numArgsPtr)) = -1
		*(*uintptr)(unsafe.Pointer(argTypesPtr)) = uintptr(0)
		*(*uintptr)(unsafe.Pointer(procPtr)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(clientDataPtr)) = uintptr(0)
		return TCL_ERROR
	}

	// Retrieve function info for user defined functions; return dummy
	// information for builtins.

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc == *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sOldMathFuncProc})) {
		var dataPtr uintptr = (*Command)(unsafe.Pointer(cmdPtr)).FclientData

		*(*uintptr)(unsafe.Pointer(procPtr)) = (*OldMathFuncData)(unsafe.Pointer(dataPtr)).Fproc
		*(*int32)(unsafe.Pointer(numArgsPtr)) = (*OldMathFuncData)(unsafe.Pointer(dataPtr)).FnumArgs
		*(*uintptr)(unsafe.Pointer(argTypesPtr)) = (*OldMathFuncData)(unsafe.Pointer(dataPtr)).FargTypes
		*(*ClientData)(unsafe.Pointer(clientDataPtr)) = (*OldMathFuncData)(unsafe.Pointer(dataPtr)).FclientData
	} else {
		*(*uintptr)(unsafe.Pointer(procPtr)) = uintptr(0)
		*(*int32)(unsafe.Pointer(numArgsPtr)) = -1
		*(*uintptr)(unsafe.Pointer(argTypesPtr)) = uintptr(0)
		*(*uintptr)(unsafe.Pointer(procPtr)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(clientDataPtr)) = uintptr(0)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ListMathFuncs --
//
//	Produces a list of all the math functions defined in a given
//	interpreter.
//
// Results:
//	A pointer to a Tcl_Obj structure with a reference count of zero, or
//	NULL in the case of an error (in which case a suitable error message
//	will be left in the interpreter result.)
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ListMathFuncs(tls *libc.TLS, interp uintptr, pattern uintptr) uintptr { /* tclBasic.c:3829:9: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var script uintptr = XTcl_NewStringObj(tls, ts+8084, -1)
	var result uintptr
	var state Tcl_InterpState

	if pattern != 0 {
		*(*uintptr)(unsafe.Pointer(bp /* patternObj */)) = XTcl_NewStringObj(tls, pattern, -1)
		var arg uintptr = XTcl_NewListObj(tls, 1, bp)

		XTcl_AppendObjToObj(tls, script, arg)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = arg
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		} // Should tear down patternObj too
	}

	state = XTcl_SaveInterpState(tls, interp, TCL_OK)
	(*Tcl_Obj)(unsafe.Pointer(script)).FrefCount++
	if TCL_OK == XTcl_EvalObjEx(tls, interp, script, 0) {
		result = XTcl_DuplicateObj(tls, XTcl_GetObjResult(tls, interp))
	} else {
		result = XTcl_NewObj(tls)
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = script
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTcl_RestoreInterpState(tls, interp, state)

	return result
}

//----------------------------------------------------------------------
//
// TclInterpReady --
//
//	Check if an interpreter is ready to eval commands or scripts, i.e., if
//	it was not deleted and if the nesting level is not too high.
//
// Results:
//	The return value is TCL_OK if it the interpreter is ready, TCL_ERROR
//	otherwise.
//
// Side effects:
//	The interpreters object and string results are cleared.
//
//----------------------------------------------------------------------

func XTclInterpReady(tls *libc.TLS, interp uintptr) int32 { /* tclBasic.c:3878:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	var iPtr uintptr = interp

	// Reset both the interpreter's string and object results and clear out
	// any previous error information.

	XTcl_ResetResult(tls, interp)

	// If the interpreter has been deleted, return an error.

	if (*Interp)(unsafe.Pointer(iPtr)).Fflags&DELETED != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+8102, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+8146,
			ts+8102, uintptr(0)))
		return TCL_ERROR
	}

	if (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr)).Frewind != 0 {
		return TCL_ERROR
	}

	// Make sure the script being evaluated (if any) has not been canceled.

	if ((*Interp)(unsafe.Pointer(iPtr)).Fflags&CANCELED != 0 || (*Interp)(unsafe.Pointer(iPtr)).Fflags&TCL_CANCEL_UNWIND != 0) && TCL_OK != XTcl_Canceled(tls, interp, TCL_LEAVE_ERR_MSG) {
		return TCL_ERROR
	}

	// Check depth of nested calls to Tcl_Eval: if this gets too large, it's
	// probably because of an infinite loop somewhere.

	if (*Interp)(unsafe.Pointer(iPtr)).FnumLevels <= (*Interp)(unsafe.Pointer(iPtr)).FmaxNestingDepth {
		return TCL_OK
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+8154, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+8199, ts+8205, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclResetCancellation --
//
//	Reset the script cancellation flags if the nesting level
//	(iPtr->numLevels) for the interp is zero or argument force is
//	non-zero.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	The script cancellation flags for the interp may be reset.
//
//----------------------------------------------------------------------

func XTclResetCancellation(tls *libc.TLS, interp uintptr, force int32) int32 { /* tclBasic.c:3949:1: */
	var iPtr uintptr = interp

	if iPtr == uintptr(0) {
		return TCL_ERROR
	}

	if force != 0 || (*Interp)(unsafe.Pointer(iPtr)).FnumLevels == 0 {
		*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(CANCELED | TCL_CANCEL_UNWIND)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_Canceled --
//
//	Check if the script in progress has been canceled, i.e.,
//	Tcl_CancelEval was called for this interpreter or any of its parent
//	interpreters.
//
// Results:
//	The return value is TCL_OK if the script evaluation has not been
//	canceled, TCL_ERROR otherwise.
//
//	If "flags" contains TCL_LEAVE_ERR_MSG, an error message is returned in
//	the interpreter's result object. Otherwise, the interpreter's result
//	object is left unchanged. If "flags" contains TCL_CANCEL_UNWIND,
//	TCL_ERROR will only be returned if the script evaluation is being
//	completely unwound.
//
// Side effects:
//	The CANCELED flag for the interp will be reset if it is set.
//
//----------------------------------------------------------------------

func XTcl_Canceled(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclBasic.c:3991:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var iPtr uintptr = interp

	// Has the current script in progress for this interpreter been canceled
	// or is the stack being unwound due to the previous script cancellation?

	if !((*Interp)(unsafe.Pointer(iPtr)).Fflags&CANCELED != 0 || (*Interp)(unsafe.Pointer(iPtr)).Fflags&TCL_CANCEL_UNWIND != 0) {
		return TCL_OK
	}

	// The CANCELED flag is a one-shot flag that is reset immediately upon
	// being detected; however, if the TCL_CANCEL_UNWIND flag is set we will
	// continue to report that the script in progress has been canceled
	// thereby allowing the evaluation stack for the interp to be fully
	// unwound.

	*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(CANCELED)

	// The CANCELED flag was detected and reset; however, if the caller
	// specified the TCL_CANCEL_UNWIND flag, we only return TCL_ERROR
	// (indicating that the script in progress has been canceled) if the
	// evaluation stack for the interp is being fully unwound.

	if flags&TCL_CANCEL_UNWIND != 0 && !((*Interp)(unsafe.Pointer(iPtr)).Fflags&TCL_CANCEL_UNWIND != 0) {
		return TCL_OK
	}

	// If the TCL_LEAVE_ERR_MSG flags bit is set, place an error in the
	// interp's result; otherwise, we leave it alone.

	if flags&TCL_LEAVE_ERR_MSG != 0 {
		var id uintptr
		var message uintptr = uintptr(0)
		// var length int32 at bp+40, 4

		// Setup errorCode variables so that we can differentiate between
		// being canceled and unwound.

		if (*Interp)(unsafe.Pointer(iPtr)).FasyncCancelMsg != uintptr(0) {
			message = XTcl_GetStringFromObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FasyncCancelMsg, bp+40)
		} else {
			*(*int32)(unsafe.Pointer(bp + 40 /* length */)) = 0
		}

		if (*Interp)(unsafe.Pointer(iPtr)).Fflags&TCL_CANCEL_UNWIND != 0 {
			id = ts + 8211 /* "IUNWIND" */
			if *(*int32)(unsafe.Pointer(bp + 40)) == 0 {
				message = ts + 8219 /* "eval unwound" */
			}
		} else {
			id = ts + 8232 /* "ICANCEL" */
			if *(*int32)(unsafe.Pointer(bp + 40)) == 0 {
				message = ts + 8240 /* "eval canceled" */
			}
		}

		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, message, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+8254, id, message, uintptr(0)))
	}

	// Return TCL_ERROR to the caller (not necessarily just the Tcl core
	// itself) that indicates further processing of the script or command in
	// progress should halt gracefully and as soon as possible.

	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_CancelEval --
//
//	This function schedules the cancellation of the current script in the
//	given interpreter.
//
// Results:
//	The return value is a standard Tcl completion code such as TCL_OK or
//	TCL_ERROR. Since the interp may belong to a different thread, no error
//	message can be left in the interp's result.
//
// Side effects:
//	The script in progress in the specified interpreter will be canceled
//	with TCL_ERROR after asynchronous handlers are invoked at the next
//	Tcl_Canceled check.
//
//----------------------------------------------------------------------

func XTcl_CancelEval(tls *libc.TLS, interp uintptr, resultObjPtr uintptr, clientData ClientData, flags int32) int32 { /* tclBasic.c:4094:1: */
	var hPtr uintptr
	var cancelInfo uintptr
	var code int32
	var result uintptr
	code = TCL_ERROR

	if !(interp == uintptr(0)) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	if !(cancelTableInitialized != 1) {
		goto __2
	}
	// No CancelInfo hash table (Tcl_CreateInterp has never been called?)

	goto done
__2:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(uintptr(unsafe.Pointer(&cancelTable)))).FfindProc})).f(tls, uintptr(unsafe.Pointer(&cancelTable)), interp)
	if !(hPtr == uintptr(0)) {
		goto __3
	}
	// No CancelInfo record for this interpreter.

	goto done
__3:
	;
	cancelInfo = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

	// Populate information needed by the interpreter thread to fulfill the
	// cancellation request. Currently, clientData is ignored. If the
	// TCL_CANCEL_UNWIND flags bit is set, the script in progress is not
	// allowed to catch the script cancellation because the evaluation stack
	// for the interp is completely unwound.

	if !(resultObjPtr != uintptr(0)) {
		goto __4
	}
	result = XTcl_GetStringFromObj(tls, resultObjPtr, cancelInfo+24)
	(*CancelInfo)(unsafe.Pointer(cancelInfo)).Fresult = XTcl_Realloc(tls, (*CancelInfo)(unsafe.Pointer(cancelInfo)).Fresult, uint32((*CancelInfo)(unsafe.Pointer(cancelInfo)).Flength))
	libc.Xmemcpy(tls, (*CancelInfo)(unsafe.Pointer(cancelInfo)).Fresult, result, uint64((*CancelInfo)(unsafe.Pointer(cancelInfo)).Flength))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(resultObjPtr)).FrefCount, 1) > 1) {
		goto __6
	}
	goto __7
__6:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(resultObjPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObjPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __8
	}

	if !((*Tcl_Obj)(unsafe.Pointer(resultObjPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(resultObjPtr)).Fbytes != XtclEmptyStringRep) {
		goto __10
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(resultObjPtr)).Fbytes)
__10:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObjPtr)).Flength = -1
__11:
	;
	*(*uintptr)(unsafe.Pointer(resultObjPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = resultObjPtr
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	goto __9
__8:
	XTclFreeObj(tls, resultObjPtr)
__9:
	;
__7:
	;
	// Discard their result object.
	goto __5
__4:
	(*CancelInfo)(unsafe.Pointer(cancelInfo)).Fresult = uintptr(0)
	(*CancelInfo)(unsafe.Pointer(cancelInfo)).Flength = 0
__5:
	;
	(*CancelInfo)(unsafe.Pointer(cancelInfo)).FclientData = clientData
	(*CancelInfo)(unsafe.Pointer(cancelInfo)).Fflags = flags
	XTcl_AsyncMark(tls, (*CancelInfo)(unsafe.Pointer(cancelInfo)).Fasync)
	code = TCL_OK

done:
	;
	return code
}

//----------------------------------------------------------------------
//
// Tcl_InterpActive --
//
//	Returns non-zero if the specified interpreter is in use, i.e. if there
//	is an evaluation currently active in the interpreter.
//
// Results:
//	See above.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_InterpActive(tls *libc.TLS, interp uintptr) int32 { /* tclBasic.c:4177:1: */
	return libc.Bool32((*Interp)(unsafe.Pointer(interp)).FnumLevels > 0)
}

//----------------------------------------------------------------------
//
// Tcl_EvalObjv --
//
//	This function evaluates a Tcl command that has already been parsed
//	into words, with one Tcl_Obj holding each word.
//
// Results:
//	The return value is a standard Tcl completion code such as TCL_OK or
//	TCL_ERROR. A result or error message is left in interp's result.
//
// Side effects:
//	Always pushes a callback. Other side effects depend on the command.
//
//----------------------------------------------------------------------

func XTcl_EvalObjv(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, flags int32) int32 { /* tclBasic.c:4202:1: */
	var result int32
	var rootPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr

	result = XTclNREvalObjv(tls, interp, objc, objv, flags, uintptr(0))
	return XTclNRRunCallbacks(tls, interp, result, rootPtr)
}

func XTclNREvalObjv(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, flags int32, cmdPtr uintptr) int32 { /* tclBasic.c:4221:1: */
	var iPtr uintptr = interp

	// data[1] stores a marker for use by tailcalls; it will be set to 1 by
	// command redirectors (imports, alias, ensembles) so that tailcall skips
	// this callback (that marks the end of the target command) and goes back
	// to the end of the source command.

	if (*Interp)(unsafe.Pointer(iPtr)).FdeferredCallbacks != 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FdeferredCallbacks = uintptr(0)
	} else {
		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sNRCommand}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}

	(*Interp)(unsafe.Pointer(iPtr)).FnumLevels++
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _callbackPtr uintptr
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sEvalObjvCore}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = cmdPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(Intptr_t(flags))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(Intptr_t(objc))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = objv
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return TCL_OK
}

func sEvalObjvCore(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:4257:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	// var cmdPtr uintptr at bp+32, 8

	var preCmdPtr uintptr
	var flags int32
	var objc int32
	var objv uintptr
	var iPtr uintptr
	var lookupNsPtr uintptr
	var enterTracesDone int32
	var _objPtr uintptr
	var _objPtr1 uintptr
	var code int32
	var _objPtr2 uintptr
	var _callbackPtr uintptr
	var commandPtr uintptr
	var _objPtr3 uintptr
	var _callbackPtr1 uintptr
	*(*uintptr)(unsafe.Pointer(bp + 32 /* cmdPtr */)) = uintptr(0)
	preCmdPtr = *(*ClientData)(unsafe.Pointer(data))
	flags = int32(*(*ClientData)(unsafe.Pointer(data + 1*8)))
	objc = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))
	objv = *(*ClientData)(unsafe.Pointer(data + 3*8))
	iPtr = interp
	lookupNsPtr = uintptr(0)
	enterTracesDone = 0

	// Push records for task to be done on return, in INVERSE order. First, if
	// needed, the exception handlers (as they should happen last).

	if !!(flags&TCL_EVAL_NOERR != 0) {
		goto __1
	}
	sTEOV_PushExceptionHandlers(tls, interp, objc, objv, flags)
__1:
	;

	if !(TCL_OK != XTclInterpReady(tls, interp)) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	if !(objc == 0) {
		goto __3
	}
	return TCL_OK
__3:
	;

	if !((*Interp)(unsafe.Pointer(iPtr)).Flimit.Fexceeded != 0) {
		goto __4
	}
	return TCL_ERROR
__4:
	;

	// Configure evaluation context to match the requested flags.

	if !((*Interp)(unsafe.Pointer(iPtr)).FlookupNsPtr != 0) {
		goto __5
	}

	// Capture the namespace we should do command name resolution in, as
	// instructed by our caller sneaking it in to us in a private interp
	// field.  Clear that field right away so we cannot possibly have its
	// use leak where it should not.  The sneaky message pass is done.
	//
	// Use of this mechanism overrides the TCL_EVAL_GLOBAL flag.
	// TODO: Is that a bug?

	lookupNsPtr = (*Interp)(unsafe.Pointer(iPtr)).FlookupNsPtr
	(*Interp)(unsafe.Pointer(iPtr)).FlookupNsPtr = uintptr(0)
	goto __6
__5:
	if !(flags&TCL_EVAL_INVOKE != 0) {
		goto __7
	}
	lookupNsPtr = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
	goto __8
__7:

	// TCL_EVAL_INVOKE was not set: clear rewrite rules

	XTclResetRewriteEnsemble(tls, interp, 1)

	if !(flags&TCL_EVAL_GLOBAL != 0) {
		goto __9
	}
	sTEOV_SwitchVarFrame(tls, interp)
	lookupNsPtr = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
__9:
	;
__8:
	;
__6:
	;

	// Lookup the Command to dispatch.

reresolve:
	;
	if !(preCmdPtr != 0) {
		goto __10
	}
	// Caller gave it to us.

	if !!((*Command)(unsafe.Pointer(preCmdPtr)).Fflags&CMD_DEAD != 0) {
		goto __11
	}
	// So long as it exists, use it.

	*(*uintptr)(unsafe.Pointer(bp + 32 /* cmdPtr */)) = preCmdPtr
	goto __12
__11:
	if !(flags&TCL_EVAL_NORESOLVE != 0) {
		goto __13
	}
	// When it's been deleted, and we're told not to attempt resolving
	// it ourselves, all we can do is raise an error.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+8261, 0))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+8297, ts+8302, uintptr(0)))
	return TCL_ERROR
__13:
	;
__12:
	;
__10:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) {
		goto __14
	}
	*(*uintptr)(unsafe.Pointer(bp + 32 /* cmdPtr */)) = sTEOV_LookupCmdFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), lookupNsPtr)
	if !!(*(*uintptr)(unsafe.Pointer(bp + 32)) != 0) {
		goto __15
	}
	return sTEOV_NotFound(tls, interp, objc, objv, lookupNsPtr)
__15:
	;
__14:
	;

	if !(enterTracesDone != 0 || (*Interp)(unsafe.Pointer(iPtr)).FtracePtr != 0 ||
		(*Command)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fflags&CMD_HAS_EXEC_TRACES != 0) {
		goto __16
	}
	commandPtr = XTclGetSourceFromFrame(tls,
		func() uintptr {
			if flags&TCL_EVAL_SOURCE_IN_FRAME != 0 {
				return (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr
			}
			return uintptr(0)
		}(),
		objc, objv)

	(*Tcl_Obj)(unsafe.Pointer(commandPtr)).FrefCount++
	if !!(enterTracesDone != 0) {
		goto __17
	}
	code = sTEOV_RunEnterTraces(tls, interp, bp+32, commandPtr,
		objc, objv)

	// Send any exception from enter traces back as an exception
	// raised by the traced command.
	// TODO: Is this a bug?  Letting an execution trace BREAK or
	// CONTINUE or RETURN in the place of the traced command?  Would
	// either converting all exceptions to TCL_ERROR, or just
	// swallowing them be better?  (Swallowing them has the problem of
	// permanently hiding program errors.)

	if !(code != TCL_OK) {
		goto __18
	}
__19:
	_objPtr = commandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __22
	}
	XTclFreeObj(tls, _objPtr)
__22:
	;
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
	return code
__18:
	;

	// If the enter traces made the resolved cmdPtr unusable, go back
	// and resolve again, but next time don't run enter traces again.

	if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) {
		goto __23
	}
	enterTracesDone = 1
__24:
	_objPtr1 = commandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __27
	}
	XTclFreeObj(tls, _objPtr1)
__27:
	;
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	goto reresolve
__23:
	;
__17:
	;

	// Schedule leave traces.  Raise the refCount on the resolved cmdPtr,
	// so that when it passes to the leave traces we know it's still
	// valid.

	(*Command)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* cmdPtr */)))).FrefCount++
__28:
__31:
	;
__34:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __37
	}
	XTclAllocateFreeObjects(tls)
__37:
	;
	_objPtr2 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
	_callbackPtr = _objPtr2
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTEOV_RunLeaveTraces}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(Intptr_t(objc))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = commandPtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 32))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = objv
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
__16:
	;

__38:
__41:
	;
__44:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __47
	}
	XTclAllocateFreeObjects(tls)
__47:
	;
	_objPtr3 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
	_callbackPtr1 = _objPtr3
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr1)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sDispatch}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8)) = func() uintptr {
		if (*Command)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).FnreProc != 0 {
			return (*Command)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).FnreProc
		}
		return (*Command)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).FobjProc
	}()
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8 + 1*8)) = (*Command)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).FobjClientData
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8 + 2*8)) = uintptr(Intptr_t(objc))
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8 + 3*8)) = objv
	(*NRE_callback)(unsafe.Pointer(_callbackPtr1)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr1
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	return TCL_OK
}

func sDispatch(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:4417:1: */
	var objProc uintptr = *(*ClientData)(unsafe.Pointer(data))
	var clientData ClientData = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var objc int32 = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))
	var objv uintptr = *(*ClientData)(unsafe.Pointer(data + 3*8))
	var iPtr uintptr = interp

	(*Interp)(unsafe.Pointer(iPtr)).FcmdCount++
	return (*struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{objProc})).f(tls, clientData, interp, objc, objv)
}

func XTclNRRunCallbacks(tls *libc.TLS, interp uintptr, result int32, rootPtr uintptr) int32 { /* tclBasic.c:4462:1: */
	var iPtr uintptr = interp

	// If the interpreter has a non-empty string result, the result object is
	// either empty or stale because some function set interp->result
	// directly. If so, move the string result to the result object, then
	// reset the string result.
	//
	// This only needs to be done for the first item in the list: all other
	// are for NR function calls, and those are Tcl_Obj based.

	if int32(*(*int8)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).Fresult))) != 0 {
		XTcl_GetObjResult(tls, interp)
	}

	// This is the trampoline.

	for (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr != rootPtr {
		var callbackPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		var procPtr uintptr = (*NRE_callback)(unsafe.Pointer(callbackPtr)).FprocPtr

		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = (*NRE_callback)(unsafe.Pointer(callbackPtr)).FnextPtr
		result = (*struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		})(unsafe.Pointer(&struct{ uintptr }{procPtr})).f(tls, callbackPtr+8 /* &.data */, interp, result)
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(callbackPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = callbackPtr
			}
		}
	}
	return result
}

func sNRCommand(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:4501:1: */
	var iPtr uintptr = interp

	(*Interp)(unsafe.Pointer(iPtr)).FnumLevels--

	// If there is a tailcall, schedule it next

	if *(*ClientData)(unsafe.Pointer(data + 1*8)) != 0 && *(*ClientData)(unsafe.Pointer(data + 1*8)) != uintptr(int64(1)) {
		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{XTclNRTailcallEval}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = *(*ClientData)(unsafe.Pointer(data + 1*8))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}

	// OPT ??
	// Do not interrupt a series of cleanups with async or limit checks:
	// just check at the end?

	if *(*int32)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FasyncReadyPtr)) != 0 {
		result = XTcl_AsyncInvoke(tls, interp, result)
	}
	if result == TCL_OK && ((*Interp)(unsafe.Pointer(iPtr)).Fflags&CANCELED != 0 || (*Interp)(unsafe.Pointer(iPtr)).Fflags&TCL_CANCEL_UNWIND != 0) {
		result = XTcl_Canceled(tls, interp, TCL_LEAVE_ERR_MSG)
	}
	if result == TCL_OK && func() int32 {
		if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive == 0 {
			return 0
		}
		return func() int32 {
			(*Interp)(unsafe.Pointer(iPtr)).Flimit.FgranularityTicker++
			return func() int32 {
				if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive&TCL_LIMIT_COMMANDS != 0 && ((*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdGranularity == 1 || (*Interp)(unsafe.Pointer(iPtr)).Flimit.FgranularityTicker%(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdGranularity == 0) {
					return 1
				}
				return func() int32 {
					if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive&TCL_LIMIT_TIME != 0 && ((*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeGranularity == 1 || (*Interp)(unsafe.Pointer(iPtr)).Flimit.FgranularityTicker%(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeGranularity == 0) {
						return 1
					}
					return 0
				}()
			}()
		}()
	}() != 0 {
		result = XTcl_LimitCheck(tls, interp)
	}

	return result
}

//----------------------------------------------------------------------
//
// TEOV_Exception	 -
// TEOV_LookupCmdFromObj -
// TEOV_RunEnterTraces	 -
// TEOV_RunLeaveTraces	 -
// TEOV_NotFound	 -
//
//	These are helper functions for Tcl_EvalObjv.
//
//----------------------------------------------------------------------

func sTEOV_PushExceptionHandlers(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, flags int32) { /* tclBasic.c:4551:1: */
	var iPtr uintptr = interp

	// If any error processing is necessary, push the appropriate records.
	// Note that we have to push them in the inverse order: first the one that
	// has to run last.

	if !(flags&TCL_EVAL_INVOKE != 0) {
		// Error messages

		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sTEOV_Error}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(Intptr_t(objc))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = objv
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}

	if (*Interp)(unsafe.Pointer(iPtr)).FnumLevels == 1 {
		// No CONTINUE or BREAK at level 0, manage RETURN

		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _callbackPtr uintptr
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sTEOV_Exception}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(Intptr_t((*Interp)(unsafe.Pointer(iPtr)).FevalFlags))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}
}

func sTEOV_SwitchVarFrame(tls *libc.TLS, interp uintptr) { /* tclBasic.c:4585:1: */
	var iPtr uintptr = interp

	// Change the varFrame to be the rootVarFrame, and push a record to
	// restore things at the end.

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sTEOV_RestoreVarFrame}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr
}

func sTEOV_RestoreVarFrame(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:4601:1: */
	(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = *(*ClientData)(unsafe.Pointer(data))
	return result
}

func sTEOV_Exception(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:4611:1: */
	var iPtr uintptr = interp
	var allowExceptions int32 = int32(*(*ClientData)(unsafe.Pointer(data))) & TCL_ALLOW_EXCEPTIONS

	if result != TCL_OK {
		if result == TCL_RETURN {
			result = XTclUpdateReturnInfo(tls, iPtr)
		}
		if result != TCL_OK && result != TCL_ERROR && !(allowExceptions != 0) {
			sProcessUnexpectedResult(tls, interp, result)
			result = TCL_ERROR
		}
	}

	// We are returning to level 0, so should process TclResetCancellation. As
	// numLevels has not *yet* been decreased, do not call it: do the thing
	// here directly.

	*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(CANCELED | TCL_CANCEL_UNWIND)
	return result
}

func sTEOV_Error(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:4640:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	var listPtr uintptr
	var cmdString uintptr
	// var cmdLen int32 at bp, 4

	var objc int32 = int32(*(*ClientData)(unsafe.Pointer(data)))
	var objv uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	if result == TCL_ERROR && !((*Interp)(unsafe.Pointer(iPtr)).Fflags&ERR_ALREADY_LOGGED != 0) {
		// If there was an error, a command string will be needed for the
		// error log: get it out of the itemPtr. The details depend on the
		// type.

		listPtr = XTcl_NewListObj(tls, objc, objv)
		cmdString = XTcl_GetStringFromObj(tls, listPtr, bp)
		XTcl_LogCommandInfo(tls, interp, cmdString, cmdString, *(*int32)(unsafe.Pointer(bp /* cmdLen */)))
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = listPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED)
	return result
}

func sTEOV_NotFound(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, lookupNsPtr uintptr) int32 { /* tclBasic.c:4669:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	var cmdPtr uintptr
	var iPtr uintptr = interp
	var i int32
	var newObjc int32
	// var handlerObjc int32 at bp+48, 4

	var newObjv uintptr
	// var handlerObjv uintptr at bp+56, 8

	var varFramePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	var currNsPtr uintptr = uintptr(0) // Used to check for and invoke any registered
	// unknown command handler for the current
	// namespace (TIP 181).
	var savedNsPtr uintptr = uintptr(0)

	currNsPtr = (*CallFrame)(unsafe.Pointer(varFramePtr)).FnsPtr
	if currNsPtr == uintptr(0) || (*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr == uintptr(0) {
		currNsPtr = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
		if currNsPtr == uintptr(0) {
			XTcl_Panic(tls, ts+8317, 0)
		}
	}

	// Check to see if the resolution namespace has lost its unknown handler.
	// If so, reset it to "::unknown".

	if (*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr == uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				(*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Fbytes, ts+8361, uint64(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Fbytes + 9)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Flength = int32(uint64(unsafe.Sizeof([10]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).FtypePtr = uintptr(0)
			{
			}
		}
		(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).FrefCount++
	}

	// Get the list of words for the unknown handler and allocate enough space
	// to hold both the handler prefix and all words of the command invokation
	// itself.

	XTcl_ListObjGetElements(tls, uintptr(0), (*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr,
		bp+48, bp+56)
	newObjc = objc + *(*int32)(unsafe.Pointer(bp + 48))
	newObjv = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(uintptr(0)))*newObjc)

	// Copy command prefix from unknown handler and add on the real command's
	// full argument list. Note that we only use memcpy() once because we have
	// to increment the reference count of all the handler arguments anyway.

	for i = 0; i < *(*int32)(unsafe.Pointer(bp + 48 /* handlerObjc */)); i++ {
		*(*uintptr)(unsafe.Pointer(newObjv + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* handlerObjv */)) + uintptr(i)*8))
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(newObjv + uintptr(i)*8)))).FrefCount++
	}
	libc.Xmemcpy(tls, newObjv+uintptr(*(*int32)(unsafe.Pointer(bp + 48)))*8, objv, uint64(unsafe.Sizeof(uintptr(0)))*uint64(objc))

	// Look up and invoke the handler (by recursive call to this function). If
	// there is no handler at all, instead of doing the recursive call we just
	// generate a generic error message; it would be an infinite-recursion
	// nightmare otherwise.
	//
	// In this case we worry a bit less about recursion for now, and call the
	// "blocking" interface.

	cmdPtr = sTEOV_LookupCmdFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(newObjv)), lookupNsPtr)
	if cmdPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+8371, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+7857,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
			}(), uintptr(0)))

		// Release any resources we locked and allocated during the handler
		// call.

		for i = 0; i < *(*int32)(unsafe.Pointer(bp + 48 /* handlerObjc */)); i++ {
			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(newObjv + uintptr(i)*8))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		XTclStackFree(tls, interp, newObjv)
		return TCL_ERROR
	}

	if lookupNsPtr != 0 {
		savedNsPtr = (*CallFrame)(unsafe.Pointer(varFramePtr)).FnsPtr
		(*CallFrame)(unsafe.Pointer(varFramePtr)).FnsPtr = lookupNsPtr
	}
	XTclSkipTailcall(tls, interp)
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _callbackPtr uintptr
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sTEOV_NotFoundCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(Intptr_t(*(*int32)(unsafe.Pointer(bp + 48))))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = newObjv
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = savedNsPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNREvalObjv(tls, interp, newObjc, newObjv, TCL_EVAL_NOERR, uintptr(0))
}

func sTEOV_NotFoundCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:4766:1: */
	var iPtr uintptr = interp
	var objc int32 = int32(*(*ClientData)(unsafe.Pointer(data)))
	var objv uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var savedNsPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))
	var i int32

	if savedNsPtr != 0 {
		(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr = savedNsPtr
	}

	// Release any resources we locked and allocated during the handler call.

	for i = 0; i < objc; i++ {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTclStackFree(tls, interp, objv)

	return result
}

func sTEOV_RunEnterTraces(tls *libc.TLS, interp uintptr, cmdPtrPtr uintptr, commandPtr uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:4795:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	var cmdPtr uintptr = *(*uintptr)(unsafe.Pointer(cmdPtrPtr))
	var newEpoch int32
	var cmdEpoch int32 = (*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch
	// var length int32 at bp, 4

	var traceCode int32 = TCL_OK
	var command uintptr = XTcl_GetStringFromObj(tls, commandPtr, bp)

	// Call trace functions.
	// Execute any command or execution traces. Note that we bump up the
	// command's reference count for the duration of the calling of the
	// traces so that the structure doesn't go away underneath our feet.

	(*Command)(unsafe.Pointer(cmdPtr)).FrefCount++
	if (*Interp)(unsafe.Pointer(iPtr)).FtracePtr != 0 {
		traceCode = XTclCheckInterpTraces(tls, interp, command, *(*int32)(unsafe.Pointer(bp /* length */)),
			cmdPtr, TCL_OK, TCL_TRACE_ENTER_EXEC, objc, objv)
	}
	if (*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_HAS_EXEC_TRACES != 0 && traceCode == TCL_OK {
		traceCode = XTclCheckExecutionTraces(tls, interp, command, *(*int32)(unsafe.Pointer(bp /* length */)),
			cmdPtr, TCL_OK, TCL_TRACE_ENTER_EXEC, objc, objv)
	}
	newEpoch = (*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch
	if libc.PostDecInt32(&(*Command)(unsafe.Pointer(cmdPtr)).FrefCount, 1) <= 1 {
		XTclpFree(tls, cmdPtr)
	}

	if traceCode != TCL_OK {
		if traceCode == TCL_ERROR {
			var info uintptr

			for ok := true; ok; ok = 0 != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					info = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(info)).FrefCount = 0
				if int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1)) == 0 {
					(*Tcl_Obj)(unsafe.Pointer(info)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(info)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(info)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1))+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(info)).Fbytes, ts+8397, uint64(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1))))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(info)).Fbytes + 22)) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(info)).Flength = int32(uint64(unsafe.Sizeof([23]int8{})) - uint64(1))
				}
				(*Tcl_Obj)(unsafe.Pointer(info)).FtypePtr = uintptr(0)
				{
				}
			}
			XTcl_AppendLimitedToObj(tls, info, command, *(*int32)(unsafe.Pointer(bp /* length */)), 55, ts+8420)
			XTcl_AppendToObj(tls, info, ts+8424, 2)
			XTcl_AppendObjToErrorInfo(tls, interp, info)
			*(*int32)(unsafe.Pointer(iPtr + 424)) |= ERR_ALREADY_LOGGED
		}
		return traceCode
	}
	if cmdEpoch != newEpoch {
		*(*uintptr)(unsafe.Pointer(cmdPtrPtr)) = uintptr(0)
	}
	return TCL_OK
}

func sTEOV_RunLeaveTraces(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:4846:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	var traceCode int32 = TCL_OK
	var objc int32 = int32(*(*ClientData)(unsafe.Pointer(data)))
	var commandPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var cmdPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))
	var objv uintptr = *(*ClientData)(unsafe.Pointer(data + 3*8))
	// var length int32 at bp, 4

	var command uintptr = XTcl_GetStringFromObj(tls, commandPtr, bp)

	if !((*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_IS_DELETED != 0) {
		if (*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_HAS_EXEC_TRACES != 0 {
			traceCode = XTclCheckExecutionTraces(tls, interp, command, *(*int32)(unsafe.Pointer(bp /* length */)),
				cmdPtr, result, TCL_TRACE_LEAVE_EXEC, objc, objv)
		}
		if (*Interp)(unsafe.Pointer(iPtr)).FtracePtr != uintptr(0) && traceCode == TCL_OK {
			traceCode = XTclCheckInterpTraces(tls, interp, command, *(*int32)(unsafe.Pointer(bp /* length */)),
				cmdPtr, result, TCL_TRACE_LEAVE_EXEC, objc, objv)
		}
	}

	// As cmdPtr is set, TclNRRunCallbacks is about to reduce the numlevels.
	// Prevent that by resetting the cmdPtr field and dealing right here with
	// cmdPtr->refCount.

	if libc.PostDecInt32(&(*Command)(unsafe.Pointer(cmdPtr)).FrefCount, 1) <= 1 {
		XTclpFree(tls, cmdPtr)
	}

	if traceCode != TCL_OK {
		if traceCode == TCL_ERROR {
			var info uintptr

			for ok := true; ok; ok = 0 != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					info = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(info)).FrefCount = 0
				if int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1)) == 0 {
					(*Tcl_Obj)(unsafe.Pointer(info)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(info)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(info)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1))+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(info)).Fbytes, ts+8427, uint64(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1))))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(info)).Fbytes + 22)) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(info)).Flength = int32(uint64(unsafe.Sizeof([23]int8{})) - uint64(1))
				}
				(*Tcl_Obj)(unsafe.Pointer(info)).FtypePtr = uintptr(0)
				{
				}
			}
			XTcl_AppendLimitedToObj(tls, info, command, *(*int32)(unsafe.Pointer(bp /* length */)), 55, ts+8420)
			XTcl_AppendToObj(tls, info, ts+8424, 2)
			XTcl_AppendObjToErrorInfo(tls, interp, info)
			*(*int32)(unsafe.Pointer(iPtr + 424)) |= ERR_ALREADY_LOGGED
		}
		result = traceCode
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = commandPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return result
}

func sTEOV_LookupCmdFromObj(tls *libc.TLS, interp uintptr, namePtr uintptr, lookupNsPtr uintptr) uintptr { /* tclBasic.c:4895:23: */
	var iPtr uintptr = interp
	var cmdPtr uintptr
	var savedNsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr

	if lookupNsPtr != 0 {
		(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr = lookupNsPtr
	}
	cmdPtr = XTcl_GetCommandFromObj(tls, interp, namePtr)
	(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr = savedNsPtr
	return cmdPtr
}

//----------------------------------------------------------------------
//
// Tcl_EvalTokensStandard --
//
//	Given an array of tokens parsed from a Tcl command (e.g., the tokens
//	that make up a word or the index for an array variable) this function
//	evaluates the tokens and concatenates their values to form a single
//	result value.
//
// Results:
//	The return value is a standard Tcl completion code such as TCL_OK or
//	TCL_ERROR. A result or error message is left in interp's result.
//
// Side effects:
//	Depends on the array of tokens being evaled.
//
//----------------------------------------------------------------------

func XTcl_EvalTokensStandard(tls *libc.TLS, interp uintptr, tokenPtr uintptr, count int32) int32 { /* tclBasic.c:4934:1: */
	return XTclSubstTokens(tls, interp, tokenPtr, count /* numLeftPtr */, uintptr(0), 1,
		uintptr(0), uintptr(0))
}

//----------------------------------------------------------------------
//
// Tcl_EvalTokens --
//
//	Given an array of tokens parsed from a Tcl command (e.g., the tokens
//	that make up a word or the index for an array variable) this function
//	evaluates the tokens and concatenates their values to form a single
//	result value.
//
// Results:
//	The return value is a pointer to a newly allocated Tcl_Obj containing
//	the value of the array of tokens. The reference count of the returned
//	object has been incremented. If an error occurs in evaluating the
//	tokens then a NULL value is returned and an error message is left in
//	interp's result.
//
// Side effects:
//	A new object is allocated to hold the result.
//
//----------------------------------------------------------------------
//
// This uses a non-standard return convention; its use is now deprecated. It
// is a wrapper for the new function Tcl_EvalTokensStandard, and is not used
// in the core any longer. It is only kept for backward compatibility.

func XTcl_EvalTokens(tls *libc.TLS, interp uintptr, tokenPtr uintptr, count int32) uintptr { /* tclBasic.c:4974:9: */
	var resPtr uintptr

	if XTcl_EvalTokensStandard(tls, interp, tokenPtr, count) != TCL_OK {
		return uintptr(0)
	}
	resPtr = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer(resPtr)).FrefCount++
	XTcl_ResetResult(tls, interp)
	return resPtr
}

//----------------------------------------------------------------------
//
// Tcl_EvalEx, TclEvalEx --
//
//	This function evaluates a Tcl script without using the compiler or
//	byte-code interpreter. It just parses the script, creates values for
//	each word of each command, then calls EvalObjv to execute each
//	command.
//
// Results:
//	The return value is a standard Tcl completion code such as TCL_OK or
//	TCL_ERROR. A result or error message is left in interp's result.
//
// Side effects:
//	Depends on the script.
//
// TIP #280 : Keep public API, internally extended API.
//----------------------------------------------------------------------

func XTcl_EvalEx(tls *libc.TLS, interp uintptr, script uintptr, numBytes int32, flags int32) int32 { /* tclBasic.c:5017:1: */
	return XTclEvalEx(tls, interp, script, numBytes, flags, 1, uintptr(0), script)
}

func XTclEvalEx(tls *libc.TLS, interp uintptr, script uintptr, numBytes int32, flags int32, line int32, clNextOuter uintptr, outerScript uintptr) int32 { /* tclBasic.c:5032:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)
	*(*int32)(unsafe.Pointer(bp + 8)) = line

	var iPtr uintptr
	var p uintptr
	var next uintptr
	var minObjs uint32
	var objv uintptr
	var objvSpace uintptr
	var expand uintptr
	var lines uintptr
	var lineSpace uintptr
	var tokenPtr uintptr
	var commandLength int32
	var bytesLeft int32
	var expandRequested int32
	var code int32
	var savedVarFramePtr uintptr // Saves old copy of iPtr->varFramePtr in case
	// TCL_EVAL_GLOBAL was set.
	var allowExceptions int32
	var gotParse int32
	var i uint32
	var objectsUsed uint32
	// These variables keep track of how much
	// state has been allocated while evaluating
	// the script, so that it can be freed
	// properly if an error occurs.
	var parsePtr uintptr
	var eeFramePtr uintptr
	var stackObjArray uintptr
	var expandStack uintptr
	var linesStack uintptr
	// TIP #280 Structures for tracking of command
	// locations.
	// var clNext uintptr at bp+16, 8

	// Normalization here, to have the correct pwd. Should have
	// negligible impact on performance, as the norm should have been
	// done already by the 'source' invoking us, and it caches the
	// result.

	var norm uintptr
	var _objPtr uintptr
	// var numElements int32 at bp+40, 4

	var _objPtr1 uintptr
	// var numElements1 int32 at bp+44, 4

	// var elements uintptr at bp+48, 8

	var temp uintptr
	// Some word expansion was requested. Check for objv resize.

	var copy uintptr
	var lcopy uintptr
	var wordIdx int32
	var objIdx int32
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	// TIP #280. Track lines within the words of the current
	// command. We use a separate pointer into the table of
	// continuation line locations to not lose our position for the
	// per-command parsing.

	// var wordLine int32 at bp+24, 4

	var wordStart uintptr
	// var wordCLNext uintptr at bp+32, 8

	var objectsNeeded uint32
	var numWords uint32
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	iPtr = interp
	minObjs = uint32(20)
	code = TCL_OK
	allowExceptions = (*Interp)(unsafe.Pointer(iPtr)).FevalFlags & TCL_ALLOW_EXCEPTIONS
	gotParse = 0
	objectsUsed = uint32(0)
	parsePtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_Parse{})))
	eeFramePtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CmdFrame{})))
	stackObjArray =
		XTclStackAlloc(tls, interp, int32(uint64(minObjs)*uint64(unsafe.Sizeof(uintptr(0)))))
	expandStack = XTclStackAlloc(tls, interp, int32(uint64(minObjs)*uint64(unsafe.Sizeof(int32(0)))))
	linesStack = XTclStackAlloc(tls, interp, int32(uint64(minObjs)*uint64(unsafe.Sizeof(int32(0)))))
	*(*uintptr)(unsafe.Pointer(bp + 16 /* clNext */)) = uintptr(0) // Pointer for the tracking of invisible
	// continuation lines. Initialized only if the
	// caller gave us a table of locations to
	// track, via scriptCLLocPtr. It always refers
	// to the table entry holding the location of
	// the next invisible continuation line to
	// look for, while parsing the script.

	if !((*Interp)(unsafe.Pointer(iPtr)).FscriptCLLocPtr != 0) {
		goto __1
	}
	if !(clNextOuter != 0) {
		goto __2
	}
	*(*uintptr)(unsafe.Pointer(bp + 16 /* clNext */)) = clNextOuter
	goto __3
__2:
	*(*uintptr)(unsafe.Pointer(bp + 16 /* clNext */)) = (*Interp)(unsafe.Pointer(iPtr)).FscriptCLLocPtr + 4
__3:
	;
__1:
	;

	if !(numBytes < 0) {
		goto __4
	}
	numBytes = int32(libc.Xstrlen(tls, script))
__4:
	;
	XTcl_ResetResult(tls, interp)

	savedVarFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	if !(flags&TCL_EVAL_GLOBAL != 0) {
		goto __5
	}
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr
__5:
	;

	// Each iteration through the following loop parses the next command from
	// the script and then executes it.

	objv = libc.AssignUintptr(&objvSpace, stackObjArray)
	lines = libc.AssignUintptr(&lineSpace, linesStack)
	expand = expandStack
	p = script
	bytesLeft = numBytes

	// TIP #280 Initialize tracking. Do not push on the frame stack yet.
	//
	// We open a new context, either for a sourced script, or 'eval'.
	// For sourced files we always have a path object, even if nothing was
	// specified in the interp itself. That makes code using it simpler as
	// NULL checks can be left out. Sourced file without path in the
	// 'scriptFile' is possible during Tcl initialization.

	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Flevel = func() int32 {
		if (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr != 0 {
			return (*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr)).Flevel + 1
		}
		return 1
	}()
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).FframePtr = (*Interp)(unsafe.Pointer(iPtr)).FframePtr
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Fnline = 0
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Fline = uintptr(0)
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).FcmdObj = uintptr(0)

	(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr = eeFramePtr
	if !((*Interp)(unsafe.Pointer(iPtr)).FevalFlags&TCL_EVAL_FILE != 0) {
		goto __6
	}
	// Set up for a sourced file.

	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Ftype = 4

	if !((*Interp)(unsafe.Pointer(iPtr)).FscriptFile != 0) {
		goto __8
	}
	// Normalization here, to have the correct pwd. Should have
	// negligible impact on performance, as the norm should have been
	// done already by the 'source' invoking us, and it caches the
	// result.

	norm = XTcl_FSGetNormalizedPath(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FscriptFile)

	if !(norm == uintptr(0)) {
		goto __10
	}
	// Error message in the interp result.

	code = TCL_ERROR
	goto error
__10:
	;
	*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)) = norm
	goto __9
__8:
__11:
	;
__14:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __17
	}
	XTclAllocateFreeObjects(tls)
__17:
	;
	*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)))).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)) == 0) {
		goto __18
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)))).Flength = 0
	goto __19
__18:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)))).Fbytes, ts+2631, uint64(int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)))).Fbytes)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)))).Flength = int32(uint64(unsafe.Sizeof([1]int8{})) - uint64(1))
__19:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)))).FtypePtr = uintptr(0)

	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
__9:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)))).FrefCount++
	goto __7
__6:
	// Set up for plain eval.

	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Ftype = 0
	*(*uintptr)(unsafe.Pointer(eeFramePtr + 40)) = uintptr(0)
__7:
	;

	(*Interp)(unsafe.Pointer(iPtr)).FevalFlags = 0
__20:
	if !(XTcl_ParseCommand(tls, interp, p, bytesLeft, 0, parsePtr) != TCL_OK) {
		goto __23
	}
	code = TCL_ERROR
	XTcl_LogCommandInfo(tls, interp, script, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart,
		int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm+uintptr(1))-int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart))/1))
	goto posterror
__23:
	;

	// TIP #280 Track lines. The parser may have skipped text till it
	// found the command we are now at. We have to count the lines in this
	// block, and do not forget invisible continuation lines.

	XTclAdvanceLines(tls, bp+8, p, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)
	XTclAdvanceContinuations(tls, bp+8, bp+16,
		int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)-int64(outerScript))/1))

	gotParse = 1
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 0) {
		goto __24
	}
	// TIP #280. Track lines within the words of the current
	// command. We use a separate pointer into the table of
	// continuation line locations to not lose our position for the
	// per-command parsing.

	*(*int32)(unsafe.Pointer(bp + 24 /* wordLine */)) = *(*int32)(unsafe.Pointer(bp + 8 /* line */))
	wordStart = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart
	*(*uintptr)(unsafe.Pointer(bp + 32 /* wordCLNext */)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* clNext */))
	objectsNeeded = uint32(0)
	numWords = uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords)

	// Generate an array of objects for the words of the command.

	if !(numWords > minObjs) {
		goto __25
	}
	expand = XTcl_Alloc(tls, uint32(uint64(numWords)*uint64(unsafe.Sizeof(int32(0)))))
	objvSpace = XTcl_Alloc(tls, uint32(uint64(numWords)*uint64(unsafe.Sizeof(uintptr(0)))))
	lineSpace = XTcl_Alloc(tls, uint32(uint64(numWords)*uint64(unsafe.Sizeof(int32(0)))))
__25:
	;
	expandRequested = 0
	objv = objvSpace
	lines = lineSpace

	(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr = (*CmdFrame)(unsafe.Pointer(eeFramePtr)).FnextPtr
	objectsUsed = uint32(0)
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
__26:
	if !(objectsUsed < numWords) {
		goto __28
	}
	// TIP #280. Track lines to current word. Save the information
	// on a per-word basis, signaling dynamic words as needed.
	// Make the information available to the recursively called
	// evaluator as well, including the type of context (source
	// vs. eval).

	XTclAdvanceLines(tls, bp+24, wordStart, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)
	XTclAdvanceContinuations(tls, bp+24, bp+32,
		int32((int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)-int64(outerScript))/1))
	wordStart = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart

	*(*int32)(unsafe.Pointer(lines + uintptr(objectsUsed)*4)) = func() int32 {
		if XTclWordKnownAtCompileTime(tls, tokenPtr, uintptr(0)) != 0 {
			return *(*int32)(unsafe.Pointer(bp + 24 /* wordLine */))
		}
		return -1
	}()

	if !((*CmdFrame)(unsafe.Pointer(eeFramePtr)).Ftype == 4) {
		goto __29
	}
	*(*int32)(unsafe.Pointer(iPtr + 324)) |= TCL_EVAL_FILE
__29:
	;

	code = XTclSubstTokens(tls, interp, tokenPtr+uintptr(1)*24,
		(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, uintptr(0), *(*int32)(unsafe.Pointer(bp + 24 /* wordLine */)),
		*(*uintptr)(unsafe.Pointer(bp + 32 /* wordCLNext */)), outerScript)

	(*Interp)(unsafe.Pointer(iPtr)).FevalFlags = 0

	if !(code != TCL_OK) {
		goto __30
	}
	goto __28
__30:
	;
	*(*uintptr)(unsafe.Pointer(objv + uintptr(objectsUsed)*8)) = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objectsUsed)*8)))).FrefCount++
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_EXPAND_WORD) {
		goto __31
	}

	code = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objectsUsed)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 40)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objectsUsed)*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objectsUsed)*8)), bp+40)
	}()
	if !(code == TCL_ERROR) {
		goto __33
	}
	// Attempt to expand a non-list.

	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+8450, libc.VaList(bp, objectsUsed)))
__34:
	_objPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(objectsUsed)*8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __37
	}
	XTclFreeObj(tls, _objPtr)
__37:
	;
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
	goto __28
__33:
	;
	expandRequested = 1
	*(*int32)(unsafe.Pointer(expand + uintptr(objectsUsed)*4)) = 1

	objectsNeeded = objectsNeeded + func() uint32 {
		if *(*int32)(unsafe.Pointer(bp + 40)) != 0 {
			return uint32(*(*int32)(unsafe.Pointer(bp + 40)))
		}
		return uint32(1)
	}()
	goto __32
__31:
	*(*int32)(unsafe.Pointer(expand + uintptr(objectsUsed)*4)) = 0
	objectsNeeded++
__32:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp + 32)) != 0) {
		goto __38
	}
	XTclContinuationsEnterDerived(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objectsUsed)*8)),
		int32((int64(wordStart)-int64(outerScript))/1), *(*uintptr)(unsafe.Pointer(bp + 32 /* wordCLNext */)))
__38:
	;
	goto __27
__27:
	objectsUsed++
	tokenPtr += 24 * uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)
	goto __26
	goto __28
__28:
	; // for loop
	(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr = eeFramePtr
	if !(code != TCL_OK) {
		goto __39
	}
	goto error
__39:
	;
	if !(expandRequested != 0) {
		goto __40
	}
	// Some word expansion was requested. Check for objv resize.

	copy = objvSpace
	lcopy = lineSpace
	wordIdx = int32(numWords)
	objIdx = int32(objectsNeeded - uint32(1))

	if !(numWords > minObjs || objectsNeeded > minObjs) {
		goto __41
	}
	objv = libc.AssignUintptr(&objvSpace, XTcl_Alloc(tls, uint32(uint64(objectsNeeded)*uint64(unsafe.Sizeof(uintptr(0))))))
	lines = libc.AssignUintptr(&lineSpace, XTcl_Alloc(tls, uint32(uint64(objectsNeeded)*uint64(unsafe.Sizeof(int32(0))))))
__41:
	;

	objectsUsed = uint32(0)
__42:
	if !(libc.PostDecInt32(&wordIdx, 1) != 0) {
		goto __43
	}
	if !(*(*int32)(unsafe.Pointer(expand + uintptr(wordIdx)*4)) != 0) {
		goto __44
	}
	temp = *(*uintptr)(unsafe.Pointer(copy + uintptr(wordIdx)*8))

	XTcl_ListObjGetElements(tls, uintptr(0), temp, bp+44,
		bp+48)
	objectsUsed = objectsUsed + uint32(*(*int32)(unsafe.Pointer(bp + 44)))
__46:
	if !(libc.PostDecInt32(&*(*int32)(unsafe.Pointer(bp + 44)), 1) != 0) {
		goto __47
	}
	*(*int32)(unsafe.Pointer(lines + uintptr(objIdx)*4)) = -1
	*(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PostDecInt32(&objIdx, 1))*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* elements */)) + uintptr(*(*int32)(unsafe.Pointer(bp + 44 /* numElements1 */)))*8))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)) + uintptr(*(*int32)(unsafe.Pointer(bp + 44)))*8)))).FrefCount++
	goto __46
__47:
	;
__48:
	_objPtr1 = temp
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __51
	}
	XTclFreeObj(tls, _objPtr1)
__51:
	;
	goto __49
__49:
	if 0 != 0 {
		goto __48
	}
	goto __50
__50:
	;
	goto __45
__44:
	*(*int32)(unsafe.Pointer(lines + uintptr(objIdx)*4)) = *(*int32)(unsafe.Pointer(lcopy + uintptr(wordIdx)*4))
	*(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PostDecInt32(&objIdx, 1))*8)) = *(*uintptr)(unsafe.Pointer(copy + uintptr(wordIdx)*8))
	objectsUsed++
__45:
	;
	goto __42
__43:
	;
	objv += 8 * uintptr(objIdx+1)

	if !(copy != stackObjArray) {
		goto __52
	}
	XTclpFree(tls, copy)
__52:
	;
	if !(lcopy != linesStack) {
		goto __53
	}
	XTclpFree(tls, lcopy)
__53:
	;
__40:
	;

	// Execute the command and free the objects for its words.
	//
	// TIP #280: Remember the command itself for 'info frame'. We
	// shorten the visible command by one char to exclude the
	// termination character, if necessary. Here is where we put our
	// frame on the stack of frames too. _After_ the nested commands
	// have been executed.

	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Fcmd = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Flen = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm == (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart+uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize)-uintptr(1)) {
		goto __54
	}
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Flen--
__54:
	;

	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Fnline = int32(objectsUsed)
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Fline = lines

	XTclArgumentEnter(tls, interp, objv, int32(objectsUsed), eeFramePtr)
	code = XTcl_EvalObjv(tls, interp, int32(objectsUsed), objv,
		TCL_EVAL_NOERR|TCL_EVAL_SOURCE_IN_FRAME)
	XTclArgumentRelease(tls, interp, objv, int32(objectsUsed))

	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Fline = uintptr(0)
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).Fnline = 0
	if !((*CmdFrame)(unsafe.Pointer(eeFramePtr)).FcmdObj != 0) {
		goto __55
	}
__56:
	_objPtr2 = (*CmdFrame)(unsafe.Pointer(eeFramePtr)).FcmdObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __59
	}
	XTclFreeObj(tls, _objPtr2)
__59:
	;
	goto __57
__57:
	if 0 != 0 {
		goto __56
	}
	goto __58
__58:
	;
	(*CmdFrame)(unsafe.Pointer(eeFramePtr)).FcmdObj = uintptr(0)
__55:
	;

	if !(code != TCL_OK) {
		goto __60
	}
	goto error
__60:
	;
	i = uint32(0)
__61:
	if !(i < objectsUsed) {
		goto __63
	}
__64:
	_objPtr3 = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __67
	}
	XTclFreeObj(tls, _objPtr3)
__67:
	;
	goto __65
__65:
	if 0 != 0 {
		goto __64
	}
	goto __66
__66:
	;
	goto __62
__62:
	i++
	goto __61
	goto __63
__63:
	;
	objectsUsed = uint32(0)
	if !(objvSpace != stackObjArray) {
		goto __68
	}
	XTclpFree(tls, objvSpace)
	objvSpace = stackObjArray
	XTclpFree(tls, lineSpace)
	lineSpace = linesStack
__68:
	;

	// Free expand separately since objvSpace could have been
	// reallocated above.

	if !(expand != expandStack) {
		goto __69
	}
	XTclpFree(tls, expand)
	expand = expandStack
__69:
	;
__24:
	;

	// Advance to the next command in the script.
	//
	// TIP #280 Track Lines. Now we track how many lines were in the
	// executed command.

	next = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize)
	bytesLeft = int32(int64(bytesLeft) - (int64(next)-int64(p))/1)
	p = next
	XTclAdvanceLines(tls, bp+8, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart, p)
	XTcl_FreeParse(tls, parsePtr)
	gotParse = 0
	goto __21
__21:
	if bytesLeft > 0 {
		goto __20
	}
	goto __22
__22:
	;
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = savedVarFramePtr
	code = TCL_OK
	goto cleanup_return

error:
	// Generate and log various pieces of error information.

	if !((*Interp)(unsafe.Pointer(iPtr)).FnumLevels == 0) {
		goto __70
	}
	if !(code == TCL_RETURN) {
		goto __71
	}
	code = XTclUpdateReturnInfo(tls, iPtr)
__71:
	;
	if !(code != TCL_OK && code != TCL_ERROR && !(allowExceptions != 0)) {
		goto __72
	}
	sProcessUnexpectedResult(tls, interp, code)
	code = TCL_ERROR
__72:
	;
__70:
	;
	if !(code == TCL_ERROR && !((*Interp)(unsafe.Pointer(iPtr)).Fflags&ERR_ALREADY_LOGGED != 0)) {
		goto __73
	}
	commandLength = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm == (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart+uintptr(commandLength)-uintptr(1)) {
		goto __74
	}
	// The terminator character (such as ; or ]) of the command where
	// the error occurred is the last character in the parsed command.
	// Reduce the length by one so that the error message doesn't
	// include the terminator character.

	commandLength = commandLength - 1
__74:
	;
	XTcl_LogCommandInfo(tls, interp, script, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart,
		commandLength)
__73:
	;
posterror:
	*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED)

	// Then free resources that had been allocated to the command.

	i = uint32(0)
__75:
	if !(i < objectsUsed) {
		goto __77
	}
__78:
	_objPtr4 = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __81
	}
	XTclFreeObj(tls, _objPtr4)
__81:
	;
	goto __79
__79:
	if 0 != 0 {
		goto __78
	}
	goto __80
__80:
	;
	goto __76
__76:
	i++
	goto __75
	goto __77
__77:
	;
	if !(gotParse != 0) {
		goto __82
	}
	XTcl_FreeParse(tls, parsePtr)
__82:
	;
	if !(objvSpace != stackObjArray) {
		goto __83
	}
	XTclpFree(tls, objvSpace)
	XTclpFree(tls, lineSpace)
__83:
	;
	if !(expand != expandStack) {
		goto __84
	}
	XTclpFree(tls, expand)
__84:
	;
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = savedVarFramePtr

cleanup_return:
	// TIP #280. Release the local CmdFrame, and its contents.

	(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr = (*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr)).FnextPtr
	if !((*CmdFrame)(unsafe.Pointer(eeFramePtr)).Ftype == 4) {
		goto __85
	}
__86:
	_objPtr5 = *(*uintptr)(unsafe.Pointer(eeFramePtr + 40))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __89
	}
	XTclFreeObj(tls, _objPtr5)
__89:
	;
	goto __87
__87:
	if 0 != 0 {
		goto __86
	}
	goto __88
__88:
	;
__85:
	;
	XTclStackFree(tls, interp, linesStack)
	XTclStackFree(tls, interp, expandStack)
	XTclStackFree(tls, interp, stackObjArray)
	XTclStackFree(tls, interp, eeFramePtr)
	XTclStackFree(tls, interp, parsePtr)

	return code
}

//----------------------------------------------------------------------
//
// TclAdvanceLines --
//
//	This function is a helper which counts the number of lines in a block
//	of text and advances an external counter.
//
// Results:
//	None.
//
// Side effects:
//	The specified counter is advanced per the number of lines found.
//
// TIP #280
//----------------------------------------------------------------------

func XTclAdvanceLines(tls *libc.TLS, line uintptr, start uintptr, end uintptr) { /* tclBasic.c:5505:1: */
	var p uintptr

	for p = start; p < end; p++ {
		if int32(*(*int8)(unsafe.Pointer(p))) == '\n' {
			*(*int32)(unsafe.Pointer(line))++
		}
	}
}

//----------------------------------------------------------------------
//
// TclAdvanceContinuations --
//
//	This procedure is a helper which counts the number of continuation
//	lines (CL) in a block of text using a table of CL locations and
//	advances an external counter, and the pointer into the table.
//
// Results:
//	None.
//
// Side effects:
//	The specified counter is advanced per the number of continuation lines
//	found.
//
// TIP #280
//----------------------------------------------------------------------

func XTclAdvanceContinuations(tls *libc.TLS, line uintptr, clNextPtrPtr uintptr, loc int32) { /* tclBasic.c:5540:1: */
	// Track the invisible continuation lines embedded in a script, if any.
	// Here they are just spaces (already). They were removed by
	// TclSubstTokens via TclParseBackslash.
	//
	// *clNextPtrPtr         <=> We have continuation lines to track.
	// **clNextPtrPtr >= 0   <=> We are not beyond the last possible location.
	// loc >= **clNextPtrPtr <=> We stepped beyond the current cont. line.

	for *(*uintptr)(unsafe.Pointer(clNextPtrPtr)) != 0 && *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(clNextPtrPtr)))) >= 0 &&
		loc >= *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(clNextPtrPtr)))) {
		// We just stepped over an invisible continuation line. Adjust the
		// line counter and step to the table entry holding the location of
		// the next continuation line to track.

		*(*int32)(unsafe.Pointer(line))++
		*(*uintptr)(unsafe.Pointer(clNextPtrPtr)) += 4
	}
}

//----------------------------------------------------------------------
// Note: The whole data structure access for argument location tracking is
// hidden behind these three functions. The only parts open are the lineLAPtr
// field in the Interp structure. The CFWord definition is internal to here.
// Should make it easier to redo the data structures if we find something more
// space/time efficient.

//----------------------------------------------------------------------
//
// TclArgumentEnter --
//
//	This procedure is a helper for the TIP #280 uplevel extension. It
//	enters location references for the arguments of a command to be
//	invoked. Only the first entry has the actual data, further entries
//	simply count the usage up.
//
// Results:
//	None.
//
// Side effects:
//	May allocate memory.
//
// TIP #280
//----------------------------------------------------------------------

func XTclArgumentEnter(tls *libc.TLS, interp uintptr, objv uintptr, objc int32, cfPtr uintptr) { /* tclBasic.c:5598:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	// var new int32 at bp, 4

	var i int32
	var hPtr uintptr
	var cfwPtr uintptr

	for i = 1; i < objc; i++ {
		// Ignore argument words without line information (= dynamic). If they
		// are variables they may have location information associated with
		// that, either through globally recorded 'set' invokations, or
		// literals in bytecode. Eitehr way there is no need to record
		// something here.

		if *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(cfPtr)).Fline + uintptr(i)*4)) < 0 {
			continue
		}
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp /* &new */)
		if *(*int32)(unsafe.Pointer(bp)) != 0 {
			// The word is not on the stack yet, remember the current location
			// and initialize references.

			cfwPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CFWord{})))
			(*CFWord)(unsafe.Pointer(cfwPtr)).FframePtr = cfPtr
			(*CFWord)(unsafe.Pointer(cfwPtr)).Fword = i
			(*CFWord)(unsafe.Pointer(cfwPtr)).FrefCount = 1
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cfwPtr
		} else {
			// The word is already on the stack, its current location is not
			// relevant. Just remember the reference to prevent early removal.

			cfwPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
			(*CFWord)(unsafe.Pointer(cfwPtr)).FrefCount++
		}
	}
}

//----------------------------------------------------------------------
//
// TclArgumentRelease --
//
//	This procedure is a helper for the TIP #280 uplevel extension. It
//	removes the location references for the arguments of a command just
//	done. Usage is counted down, the data is removed only when no user is
//	left over.
//
// Results:
//	None.
//
// Side effects:
//	May release memory.
//
// TIP #280
//----------------------------------------------------------------------

func XTclArgumentRelease(tls *libc.TLS, interp uintptr, objv uintptr, objc int32) { /* tclBasic.c:5666:1: */
	var iPtr uintptr = interp
	var i int32

	for i = 1; i < objc; i++ {
		var cfwPtr uintptr
		var hPtr uintptr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))

		if !(hPtr != 0) {
			continue
		}
		cfwPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		(*CFWord)(unsafe.Pointer(cfwPtr)).FrefCount--
		if (*CFWord)(unsafe.Pointer(cfwPtr)).FrefCount > 0 {
			continue
		}

		XTclpFree(tls, cfwPtr)
		XTcl_DeleteHashEntry(tls, hPtr)
	}
}

//----------------------------------------------------------------------
//
// TclArgumentBCEnter --
//
//	This procedure is a helper for the TIP #280 uplevel extension. It
//	enters location references for the literal arguments of commands in
//	bytecode about to be invoked. Only the first entry has the actual
//	data, further entries simply count the usage up.
//
// Results:
//	None.
//
// Side effects:
//	May allocate memory.
//
// TIP #280
//----------------------------------------------------------------------

func XTclArgumentBCEnter(tls *libc.TLS, interp uintptr, objv uintptr, objc int32, codePtr uintptr, cfPtr uintptr, cmd int32, pc int32) { /* tclBasic.c:5715:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var eclPtr uintptr
	var word int32
	var ePtr uintptr
	var lastPtr uintptr = uintptr(0)
	var iPtr uintptr = interp
	var hePtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr, codePtr)

	if !(hePtr != 0) {
		return
	}
	eclPtr = (*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData
	ePtr = (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc + uintptr(cmd)*24

	// ePtr->nline is the number of words originally parsed.
	//
	// objc is the number of elements getting invoked.
	//
	// If they are not the same, we arrived here by compiling an
	// ensemble dispatch.  Ensemble subcommands that lead to script
	// evaluation are not supposed to get compiled, because a command
	// such as [info level] in the script can expose some of the dispatch
	// shenanigans.  This means that we don't have to tend to the
	// housekeeping, and can escape now.

	if (*ECL)(unsafe.Pointer(ePtr)).Fnline != objc {
		return
	}

	// Having disposed of the ensemble cases, we can state...
	// A few truths ...
	// (1) ePtr->nline == objc
	// (2) (ePtr->line[word] < 0) => !literal, for all words
	// (3) (word == 0) => !literal
	//
	// Item (2) is why we can use objv to get the literals, and do not
	// have to save them at compile time.

	for word = 1; word < objc; word++ {
		if *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer(ePtr)).Fline + uintptr(word)*4)) >= 0 {
			// var isnew int32 at bp, 4

			var hPtr uintptr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(word)*8)), bp /* &isnew */)
			var cfwPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CFWordBC{})))

			(*CFWordBC)(unsafe.Pointer(cfwPtr)).FframePtr = cfPtr
			(*CFWordBC)(unsafe.Pointer(cfwPtr)).Fobj = *(*uintptr)(unsafe.Pointer(objv + uintptr(word)*8))
			(*CFWordBC)(unsafe.Pointer(cfwPtr)).Fpc = pc
			(*CFWordBC)(unsafe.Pointer(cfwPtr)).Fword = word
			(*CFWordBC)(unsafe.Pointer(cfwPtr)).FnextPtr = lastPtr
			lastPtr = cfwPtr

			if *(*int32)(unsafe.Pointer(bp)) != 0 {
				// The word is not on the stack yet, remember the current
				// location and initialize references.

				(*CFWordBC)(unsafe.Pointer(cfwPtr)).FprevPtr = uintptr(0)
			} else {
				// The object is already on the stack, however it may have
				// a different location now (literal sharing may map
				// multiple location to a single Tcl_Obj*. Save the old
				// information in the new structure.

				(*CFWordBC)(unsafe.Pointer(cfwPtr)).FprevPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
			}

			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cfwPtr
		}
	} // for

	(*CmdFrame)(unsafe.Pointer(cfPtr)).Flitarg = lastPtr
}

//----------------------------------------------------------------------
//
// TclArgumentBCRelease --
//
//	This procedure is a helper for the TIP #280 uplevel extension. It
//	removes the location references for the literal arguments of commands
//	in bytecode just done. Usage is counted down, the data is removed only
//	when no user is left over.
//
// Results:
//	None.
//
// Side effects:
//	May release memory.
//
// TIP #280
//----------------------------------------------------------------------

func XTclArgumentBCRelease(tls *libc.TLS, interp uintptr, cfPtr uintptr) { /* tclBasic.c:5826:1: */
	var iPtr uintptr = interp
	var cfwPtr uintptr = (*CmdFrame)(unsafe.Pointer(cfPtr)).Flitarg

	for cfwPtr != 0 {
		var nextPtr uintptr = (*CFWordBC)(unsafe.Pointer(cfwPtr)).FnextPtr
		var hPtr uintptr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr, (*CFWordBC)(unsafe.Pointer(cfwPtr)).Fobj)
		var xPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		if xPtr != cfwPtr {
			XTcl_Panic(tls, ts+8475, 0)
		}

		if (*CFWordBC)(unsafe.Pointer(cfwPtr)).FprevPtr != 0 {
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = (*CFWordBC)(unsafe.Pointer(cfwPtr)).FprevPtr
		} else {
			XTcl_DeleteHashEntry(tls, hPtr)
		}

		XTclpFree(tls, cfwPtr)
		cfwPtr = nextPtr
	}

	(*CmdFrame)(unsafe.Pointer(cfPtr)).Flitarg = uintptr(0)
}

//----------------------------------------------------------------------
//
// TclArgumentGet --
//
//	This procedure is a helper for the TIP #280 uplevel extension. It
//	finds the location references for a Tcl_Obj, if any.
//
// Results:
//	None.
//
// Side effects:
//	Writes found location information into the result arguments.
//
// TIP #280
//----------------------------------------------------------------------

func XTclArgumentGet(tls *libc.TLS, interp uintptr, obj uintptr, cfPtrPtr uintptr, wordPtr uintptr) { /* tclBasic.c:5875:1: */
	var iPtr uintptr = interp
	var hPtr uintptr
	var framePtr uintptr

	// An object which either has no string rep or else is a canonical list is
	// guaranteed to have been generated dynamically: bail out, this cannot
	// have a usable absolute location. _Do not touch_ the information the set
	// up by the caller. It knows better than us.

	if (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes == uintptr(0) || func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return libc.Bool32((*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes == uintptr(0) || (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(obj + 32)))).FcanonicalFlag != 0)
		}
		return 0
	}() != 0 {
		return
	}

	// First look for location information recorded in the argument
	// stack. That is nearest.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLAPtr, obj)
	if hPtr != 0 {
		var cfwPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		*(*int32)(unsafe.Pointer(wordPtr)) = (*CFWord)(unsafe.Pointer(cfwPtr)).Fword
		*(*uintptr)(unsafe.Pointer(cfPtrPtr)) = (*CFWord)(unsafe.Pointer(cfwPtr)).FframePtr
		return
	}

	// Check if the Tcl_Obj has location information as a bytecode literal, in
	// that stack.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineLABCPtr, obj)
	if hPtr != 0 {
		var cfwPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		framePtr = (*CFWordBC)(unsafe.Pointer(cfwPtr)).FframePtr
		*(*uintptr)(unsafe.Pointer(framePtr + 40 + 8 /* &.pc */)) = (*ByteCode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(framePtr + 40)))).FcodeStart + uintptr((*CFWordBC)(unsafe.Pointer(cfwPtr)).Fpc)
		*(*uintptr)(unsafe.Pointer(cfPtrPtr)) = (*CFWordBC)(unsafe.Pointer(cfwPtr)).FframePtr
		*(*int32)(unsafe.Pointer(wordPtr)) = (*CFWordBC)(unsafe.Pointer(cfwPtr)).Fword
		return
	}
}

//----------------------------------------------------------------------
//
// Tcl_Eval --
//
//	Execute a Tcl command in a string. This function executes the script
//	directly, rather than compiling it to bytecodes. Before the arrival of
//	the bytecode compiler in Tcl 8.0 Tcl_Eval was the main function used
//	for executing Tcl commands, but nowadays it isn't used much.
//
// Results:
//	The return value is one of the return codes defined in tcl.h (such as
//	TCL_OK), and interp's result contains a value to supplement the return
//	code. The value of the result will persist only until the next call to
//	Tcl_Eval or Tcl_EvalObj: you must copy it or lose it!
//
// Side effects:
//	Can be almost arbitrary, depending on the commands in the script.
//
//----------------------------------------------------------------------

func XTcl_Eval(tls *libc.TLS, interp uintptr, script uintptr) int32 { /* tclBasic.c:5952:1: */
	var code int32 = XTcl_EvalEx(tls, interp, script, -1, 0)

	// For backwards compatibility with old C code that predates the object
	// system in Tcl 8.0, we have to mirror the object result back into the
	// string result (some callers may expect it there).

	XTcl_GetStringResult(tls, interp)
	return code
}

//----------------------------------------------------------------------
//
// Tcl_EvalObj, Tcl_GlobalEvalObj --
//
//	These functions are deprecated but we keep them around for backwards
//	compatibility reasons.
//
// Results:
//	See the functions they call.
//
// Side effects:
//	See the functions they call.
//
//----------------------------------------------------------------------

func XTcl_EvalObj(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclBasic.c:5988:1: */
	return XTcl_EvalObjEx(tls, interp, objPtr, 0)
}

func XTcl_GlobalEvalObj(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclBasic.c:5996:1: */
	return XTcl_EvalObjEx(tls, interp, objPtr, TCL_EVAL_GLOBAL)
}

//----------------------------------------------------------------------
//
// Tcl_EvalObjEx, TclEvalObjEx --
//
//	Execute Tcl commands stored in a Tcl object. These commands are
//	compiled into bytecodes if necessary, unless TCL_EVAL_DIRECT is
//	specified.
//
//	If the flag TCL_EVAL_DIRECT is passed in, the value of invoker
//	must be NULL.  Support for non-NULL invokers in that mode has
//	been removed since it was unused and untested.  Failure to
//	follow this limitation will lead to an assertion panic.
//
// Results:
//	The return value is one of the return codes defined in tcl.h (such as
//	TCL_OK), and the interpreter's result contains a value to supplement
//	the return code.
//
// Side effects:
//	The object is converted, if necessary, to a ByteCode object that holds
//	the bytecode instructions for the commands. Executing the commands
//	will almost certainly have side effects that depend on those commands.
//
// TIP #280 : Keep public API, internally extended API.
//----------------------------------------------------------------------

func XTcl_EvalObjEx(tls *libc.TLS, interp uintptr, objPtr uintptr, flags int32) int32 { /* tclBasic.c:6032:1: */
	return XTclEvalObjEx(tls, interp, objPtr, flags, uintptr(0), 0)
}

func XTclEvalObjEx(tls *libc.TLS, interp uintptr, objPtr uintptr, flags int32, invoker uintptr, word int32) int32 { /* tclBasic.c:6045:1: */
	var result int32 = TCL_OK
	var rootPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr

	result = XTclNREvalObjEx(tls, interp, objPtr, flags, invoker, word)
	return XTclNRRunCallbacks(tls, interp, result, rootPtr)
}

func XTclNREvalObjEx(tls *libc.TLS, interp uintptr, objPtr uintptr, flags int32, invoker uintptr, word int32) int32 { /* tclBasic.c:6064:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	var result int32

	// This function consists of three independent blocks for: direct
	// evaluation of canonical lists, compilation and bytecode execution and
	// finally direct evaluation. Precisely one of these blocks will be run.

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return libc.Bool32((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) || (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32)))).FcanonicalFlag != 0)
		}
		return 0
	}() != 0 {
		var eoFramePtr uintptr = uintptr(0)
		var objc int32
		var listPtr uintptr
		var objv uintptr

		// Canonical List Optimization:  In this case, we
		// can safely use Tcl_EvalObjv instead and get an appreciable
		// improvement in execution speed. This is because it allows us to
		// avoid a setFromAny step that would just pack everything into a
		// string and back out again.
		//
		// This also preserves any associations between list elements and
		// location information for such elements.

		// Shimmer protection! Always pass an unshared obj. The caller could
		// incr the refCount of objPtr AFTER calling us! To be completely safe
		// we always make a copy. The callback takes care od the refCounts for
		// both listPtr and objPtr.
		//
		// TODO: Create a test to demo this need, or eliminate it.
		// FIXME OPT: preserve just the internal rep?

		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
		listPtr = XTclListObjCopy(tls, interp, objPtr)
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount++

		if word != -0x7fffffff-1 {
			// TIP #280 Structures for tracking lines. As we know that this is
			// dynamic execution we ignore the invoker, even if known.
			//
			// TIP #280. We do _not_ compute all the line numbers for the
			// words in the command. For the eval of a pure list the most
			// sensible choice is to put all words on line 1. Given that we
			// neither need memory for them nor compute anything. 'line' is
			// left NULL. The two places using this information (TclInfoFrame,
			// and TclInitCompileEnv), are special-cased to use the proper
			// line number directly instead of accessing the 'line' array.
			//
			// Note that we use (word==INTMIN) to signal that no command frame
			// should be pushed, as needed by alias and ensemble redirections.

			eoFramePtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CmdFrame{})))
			(*CmdFrame)(unsafe.Pointer(eoFramePtr)).Fnline = 0
			(*CmdFrame)(unsafe.Pointer(eoFramePtr)).Fline = uintptr(0)

			(*CmdFrame)(unsafe.Pointer(eoFramePtr)).Ftype = 0
			(*CmdFrame)(unsafe.Pointer(eoFramePtr)).Flevel = func() int32 {
				if (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr == uintptr(0) {
					return 1
				}
				return (*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr)).Flevel + 1
			}()
			(*CmdFrame)(unsafe.Pointer(eoFramePtr)).FframePtr = (*Interp)(unsafe.Pointer(iPtr)).FframePtr
			(*CmdFrame)(unsafe.Pointer(eoFramePtr)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr

			(*CmdFrame)(unsafe.Pointer(eoFramePtr)).FcmdObj = objPtr
			(*CmdFrame)(unsafe.Pointer(eoFramePtr)).Fcmd = uintptr(0)
			(*CmdFrame)(unsafe.Pointer(eoFramePtr)).Flen = 0
			*(*uintptr)(unsafe.Pointer(eoFramePtr + 40)) = uintptr(0)

			(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr = eoFramePtr

			flags = flags | TCL_EVAL_SOURCE_IN_FRAME
		}

		XTclMarkTailcall(tls, interp)
		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sTEOEx_ListCallback}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = listPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = eoFramePtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = objPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}

		objv = *(*uintptr)(unsafe.Pointer(listPtr + 32)) + 16
		objc = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listPtr + 32)))).FelemCount
		return XTclNREvalObjv(tls, interp, objc, objv, flags, uintptr(0))
	}

	if !(flags&TCL_EVAL_DIRECT != 0) {
		// Let the compiler/engine subsystem do the evaluation.
		//
		// TIP #280 The invoker provides us with the context for the script.
		// We transfer this to the byte code compiler.

		var allowExceptions int32 = (*Interp)(unsafe.Pointer(iPtr)).FevalFlags & TCL_ALLOW_EXCEPTIONS
		var codePtr uintptr
		var savedVarFramePtr uintptr = uintptr(0) // Saves old copy of
		// iPtr->varFramePtr in case
		// TCL_EVAL_GLOBAL was set.

		if XTclInterpReady(tls, interp) != TCL_OK {
			return TCL_ERROR
		}
		if flags&TCL_EVAL_GLOBAL != 0 {
			savedVarFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
			(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
		codePtr = XTclCompileObj(tls, interp, objPtr, invoker, word)

		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _callbackPtr uintptr
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sTEOEx_ByteCodeCallback}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = savedVarFramePtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = objPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(Intptr_t(allowExceptions))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
		return XTclNRExecuteByteCode(tls, interp, codePtr)
	}

	{
		// We're not supposed to use the compiler or byte-code
		// interpreter. Let Tcl_EvalEx evaluate the command directly (and
		// probably more slowly).

		var script uintptr
		// var numSrcBytes int32 at bp, 4

		// Now we check if we have data about invisible continuation lines for
		// the script, and make it available to the direct script parser and
		// evaluator we are about to call, if so.
		//
		// It may be possible that the script Tcl_Obj* can be free'd while the
		// evaluator is using it, leading to the release of the associated
		// ContLineLoc structure as well. To ensure that the latter doesn't
		// happen we set a lock on it. We release this lock later in this
		// function, after the evaluator is done. The relevant "lineCLPtr"
		// hashtable is managed in the file "tclObj.c".
		//
		// Another important action is to save (and later restore) the
		// continuation line information of the caller, in case we are
		// executing nested commands in the eval/direct path.

		var saveCLLocPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FscriptCLLocPtr

		(*Interp)(unsafe.Pointer(iPtr)).FscriptCLLocPtr = XTclContinuationsGet(tls, objPtr)

		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++

		script = XTcl_GetStringFromObj(tls, objPtr, bp)
		result = XTcl_EvalEx(tls, interp, script, *(*int32)(unsafe.Pointer(bp /* numSrcBytes */)), flags)

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
				for ok6 := true; ok6; ok6 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = objPtr
				}
			} else {
				XTclFreeObj(tls, objPtr)
			}
		}

		(*Interp)(unsafe.Pointer(iPtr)).FscriptCLLocPtr = saveCLLocPtr
		return result

	}
	return int32(0)
}

func sTEOEx_ByteCodeCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:6234:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	var savedVarFramePtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var objPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var allowExceptions int32 = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))

	if (*Interp)(unsafe.Pointer(iPtr)).FnumLevels == 0 {
		if result == TCL_RETURN {
			result = XTclUpdateReturnInfo(tls, iPtr)
		}
		if result != TCL_OK && result != TCL_ERROR && !(allowExceptions != 0) {
			var script uintptr
			// var numSrcBytes int32 at bp, 4

			sProcessUnexpectedResult(tls, interp, result)
			result = TCL_ERROR
			script = XTcl_GetStringFromObj(tls, objPtr, bp)
			XTcl_LogCommandInfo(tls, interp, script, script, *(*int32)(unsafe.Pointer(bp /* numSrcBytes */)))
		}

		// We are returning to level 0, so should call TclResetCancellation.
		// Let us just unset the flags inline.

		*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(CANCELED | TCL_CANCEL_UNWIND)
	}
	(*Interp)(unsafe.Pointer(iPtr)).FevalFlags = 0

	// Restore the callFrame if this was a TCL_EVAL_GLOBAL.

	if savedVarFramePtr != 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = savedVarFramePtr
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = objPtr
			}
		} else {
			XTclFreeObj(tls, objPtr)
		}
	}

	return result
}

func sTEOEx_ListCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:6280:1: */
	var iPtr uintptr = interp
	var listPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var eoFramePtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var objPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))

	// Remove the cmdFrame

	if eoFramePtr != 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr = (*CmdFrame)(unsafe.Pointer(eoFramePtr)).FnextPtr
		XTclStackFree(tls, interp, eoFramePtr)
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = objPtr
			}
		} else {
			XTclFreeObj(tls, objPtr)
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(listPtr)).Flength = -1
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(listPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = listPtr
			}
		} else {
			XTclFreeObj(tls, listPtr)
		}
	}

	return result
}

//----------------------------------------------------------------------
//
// ProcessUnexpectedResult --
//
//	Function called by Tcl_EvalObj to set the interpreter's result value
//	to an appropriate error message when the code it evaluates returns an
//	unexpected result code (not TCL_OK and not TCL_ERROR) to the topmost
//	evaluation level.
//
// Results:
//	None.
//
// Side effects:
//	The interpreter result is set to an error message appropriate to the
//	result code.
//
//----------------------------------------------------------------------

func sProcessUnexpectedResult(tls *libc.TLS, interp uintptr, returnCode int32) { /* tclBasic.c:6325:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	// var buf [24]int8 at bp+48, 24

	XTcl_ResetResult(tls, interp)
	if returnCode == TCL_BREAK {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+8512, -1))
	} else if returnCode == TCL_CONTINUE {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+8546, -1))
	} else {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+8583, libc.VaList(bp, returnCode)))
	}
	libc.Xsprintf(tls, bp+48, ts+909, libc.VaList(bp+8, returnCode))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+8613, bp+48, uintptr(0)))
}

//---------------------------------------------------------------------------
//
// Tcl_ExprLong, Tcl_ExprDouble, Tcl_ExprBoolean --
//
//	Functions to evaluate an expression and return its value in a
//	particular form.
//
// Results:
//	Each of the functions below returns a standard Tcl result. If an error
//	occurs then an error message is left in the interp's result. Otherwise
//	the value of the expression, in the appropriate form, is stored at
//	*ptr. If the expression had a result that was incompatible with the
//	desired form then an error is returned.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_ExprLong(tls *libc.TLS, interp uintptr, exprstring uintptr, ptr uintptr) int32 { /* tclBasic.c:6369:1: */
	var exprPtr uintptr
	var result int32 = TCL_OK
	if int32(*(*int8)(unsafe.Pointer(exprstring))) == 0 {
		// Legacy compatibility - return 0 for the zero-length string.

		*(*int32)(unsafe.Pointer(ptr)) = 0
	} else {
		exprPtr = XTcl_NewStringObj(tls, exprstring, -1)
		(*Tcl_Obj)(unsafe.Pointer(exprPtr)).FrefCount++
		result = XTcl_ExprLongObj(tls, interp, exprPtr, ptr)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = exprPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		if result != TCL_OK {
			XTcl_GetStringResult(tls, interp)
		}
	}
	return result
}

func XTcl_ExprDouble(tls *libc.TLS, interp uintptr, exprstring uintptr, ptr uintptr) int32 { /* tclBasic.c:6396:1: */
	var exprPtr uintptr
	var result int32 = TCL_OK

	if int32(*(*int8)(unsafe.Pointer(exprstring))) == 0 {
		// Legacy compatibility - return 0 for the zero-length string.

		*(*float64)(unsafe.Pointer(ptr)) = 0.0
	} else {
		exprPtr = XTcl_NewStringObj(tls, exprstring, -1)
		(*Tcl_Obj)(unsafe.Pointer(exprPtr)).FrefCount++
		result = XTcl_ExprDoubleObj(tls, interp, exprPtr, ptr)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = exprPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		// Discard the expression object.
		if result != TCL_OK {
			XTcl_GetStringResult(tls, interp)
		}
	}
	return result
}

func XTcl_ExprBoolean(tls *libc.TLS, interp uintptr, exprstring uintptr, ptr uintptr) int32 { /* tclBasic.c:6425:1: */
	if int32(*(*int8)(unsafe.Pointer(exprstring))) == 0 {
		// An empty string. Just set the result boolean to 0 (false).

		*(*int32)(unsafe.Pointer(ptr)) = 0
		return TCL_OK
	} else {
		var result int32
		var exprPtr uintptr = XTcl_NewStringObj(tls, exprstring, -1)

		(*Tcl_Obj)(unsafe.Pointer(exprPtr)).FrefCount++
		result = XTcl_ExprBooleanObj(tls, interp, exprPtr, ptr)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = exprPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		if result != TCL_OK {
			// Move the interpreter's object result to the string result, then
			// reset the object result.

			XTcl_GetStringResult(tls, interp)
		}
		return result
	}
	return int32(0)
}

//--------------------------------------------------------------
//
// Tcl_ExprLongObj, Tcl_ExprDoubleObj, Tcl_ExprBooleanObj --
//
//	Functions to evaluate an expression in an object and return its value
//	in a particular form.
//
// Results:
//	Each of the functions below returns a standard Tcl result object. If
//	an error occurs then an error message is left in the interpreter's
//	result. Otherwise the value of the expression, in the appropriate
//	form, is stored at *ptr. If the expression had a result that was
//	incompatible with the desired form then an error is returned.
//
// Side effects:
//	None.
//
//--------------------------------------------------------------

func XTcl_ExprLongObj(tls *libc.TLS, interp uintptr, objPtr uintptr, ptr uintptr) int32 { /* tclBasic.c:6479:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var resultPtr uintptr at bp, 8

	var result int32
	// var type1 int32 at bp+16, 4

	// var d float64 at bp+48, 8

	// var internalPtr ClientData at bp+8, 8

	result = XTcl_ExprObj(tls, interp, objPtr, bp)
	if result != TCL_OK {
		return TCL_ERROR
	}

	if XTclGetNumberFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp)), bp+8, bp+16) != TCL_OK {
		return TCL_ERROR
	}

	switch *(*int32)(unsafe.Pointer(bp + 16 /* type1 */)) {
	case TCL_NUMBER_DOUBLE:
		{
			// var big Mp_int at bp+24, 24

			*(*float64)(unsafe.Pointer(bp + 48 /* d */)) = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			if XTcl_InitBignumFromDouble(tls, interp, *(*float64)(unsafe.Pointer(bp + 48)), bp+24) != TCL_OK {
				return TCL_ERROR
			}
			*(*uintptr)(unsafe.Pointer(bp /* resultPtr */)) = XTcl_NewBignumObj(tls, bp+24)

		}
		fallthrough
	// FALLTHRU
	case TCL_NUMBER_LONG:
		fallthrough
	case TCL_NUMBER_WIDE:
		fallthrough
	case TCL_NUMBER_BIG:
		result = func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(ptr)) = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32))
					return TCL_OK
				}()
			}
			return XTcl_GetLongFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp)), ptr)
		}()
		break

	case TCL_NUMBER_NAN:
		XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* resultPtr */)), bp+48)
		result = TCL_ERROR
	}

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	} // Discard the result object.
	return result
}

func XTcl_ExprDoubleObj(tls *libc.TLS, interp uintptr, objPtr uintptr, ptr uintptr) int32 { /* tclBasic.c:6527:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	// var resultPtr uintptr at bp, 8

	var result int32
	// var type1 int32 at bp+16, 4

	// var internalPtr ClientData at bp+8, 8

	result = XTcl_ExprObj(tls, interp, objPtr, bp)
	if result != TCL_OK {
		return TCL_ERROR
	}

	result = XTclGetNumberFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* resultPtr */)), bp+8, bp+16)
	if result == TCL_OK {
		switch *(*int32)(unsafe.Pointer(bp + 16 /* type1 */)) {
		case TCL_NUMBER_NAN:
			result = XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* resultPtr */)), ptr)
			break
			fallthrough
		case TCL_NUMBER_DOUBLE:
			*(*float64)(unsafe.Pointer(ptr)) = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
			result = TCL_OK
			break
			fallthrough
		default:
			result = XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* resultPtr */)), ptr)
		}
	}
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	} // Discard the result object.
	return result
}

func XTcl_ExprBooleanObj(tls *libc.TLS, interp uintptr, objPtr uintptr, ptr uintptr) int32 { /* tclBasic.c:6563:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var resultPtr uintptr at bp, 8

	var result int32

	result = XTcl_ExprObj(tls, interp, objPtr, bp)
	if result == TCL_OK {
		result = XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* resultPtr */)), ptr)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		// Discard the result object.
	}
	return result
}

//----------------------------------------------------------------------
//
// TclObjInvokeNamespace --
//
//	Object version: Invokes a Tcl command, given an objv/objc, from either
//	the exposed or hidden set of commands in the given interpreter.
//
//	NOTE: The command is invoked in the global stack frame of the
//	interpreter or namespace, thus it cannot see any current state on the
//	stack of that interpreter.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Whatever the command does.
//
//----------------------------------------------------------------------

func XTclObjInvokeNamespace(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, nsPtr uintptr, flags int32) int32 { /* tclBasic.c:6603:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var result int32
	// var framePtr uintptr at bp, 8

	// Make the specified namespace the current namespace and invoke the
	// command.

	XTclPushStackFrame(tls, interp, bp, nsPtr /*isProcFrame*/, 0)
	result = XTclObjInvoke(tls, interp, objc, objv, flags)

	XTclPopStackFrame(tls, interp)
	return result
}

//----------------------------------------------------------------------
//
// TclObjInvoke --
//
//	Invokes a Tcl command, given an objv/objc, from either the exposed or
//	the hidden sets of commands in the given interpreter.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	Whatever the command does.
//
//----------------------------------------------------------------------

func XTclObjInvoke(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, flags int32) int32 { /* tclBasic.c:6647:1: */
	if interp == uintptr(0) {
		return TCL_ERROR
	}
	if objc < 1 || objv == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+8636, -1))
		return TCL_ERROR
	}
	if flags&(int32(1)<<0) == 0 {
		XTcl_Panic(tls, ts+8660, 0)
	}
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRInvoke})), uintptr(0), objc, objv)
}

func XTclNRInvoke(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:6672:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var iPtr uintptr = interp
	var hTblPtr uintptr // Table of hidden commands.
	var cmdName uintptr // Name of the command from objv[0].
	var hPtr uintptr = uintptr(0)
	var cmdPtr uintptr

	cmdName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
	}()
	hTblPtr = (*Interp)(unsafe.Pointer(iPtr)).FhiddenCmdTablePtr
	if hTblPtr != uintptr(0) {
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FfindProc})).f(tls, hTblPtr, cmdName)
	}
	if hPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+8707, libc.VaList(bp, cmdName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+7450, cmdName,
			uintptr(0)))
		return TCL_ERROR
	}
	cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

	// Avoid the exception-handling brain damage when numLevels == 0

	(*Interp)(unsafe.Pointer(iPtr)).FnumLevels++
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sNRPostInvoke})), uintptr(0), uintptr(0), uintptr(0), uintptr(0))

	// Normal command resolution of objv[0] isn't going to find cmdPtr.
	// That's the whole point of **hidden** commands.  So tell the Eval core
	// machinery not to even try (and risk finding something wrong).

	return XTclNREvalObjv(tls, interp, objc, objv, TCL_EVAL_NORESOLVE, cmdPtr)
}

func sNRPostInvoke(tls *libc.TLS, clientData uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:6715:1: */
	var iPtr uintptr = interp
	(*Interp)(unsafe.Pointer(iPtr)).FnumLevels--
	return result
}

//---------------------------------------------------------------------------
//
// Tcl_ExprString --
//
//	Evaluate an expression in a string and return its value in string
//	form.
//
// Results:
//	A standard Tcl result. If the result is TCL_OK, then the interp's
//	result is set to the string value of the expression. If the result is
//	TCL_ERROR, then the interp's result contains an error message.
//
// Side effects:
//	A Tcl object is allocated to hold a copy of the expression string.
//	This expression object is passed to Tcl_ExprObj and then deallocated.
//
//---------------------------------------------------------------------------

func XTcl_ExprString(tls *libc.TLS, interp uintptr, expr uintptr) int32 { /* tclBasic.c:6746:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var code int32 = TCL_OK

	if int32(*(*int8)(unsafe.Pointer(expr))) == 0 {
		// An empty string. Just set the interpreter's result to 0.

		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, 0))
	} else {
		// var resultPtr uintptr at bp, 8

		var exprObj uintptr = XTcl_NewStringObj(tls, expr, -1)

		(*Tcl_Obj)(unsafe.Pointer(exprObj)).FrefCount++
		code = XTcl_ExprObj(tls, interp, exprObj, bp)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = exprObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		if code == TCL_OK {
			XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* resultPtr */)))
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
	}

	// Force the string rep of the interp result.

	XTcl_GetStringResult(tls, interp)
	return code
}

//----------------------------------------------------------------------
//
// Tcl_AppendObjToErrorInfo --
//
//	Add a Tcl_Obj value to the errorInfo field that describes the current
//	error.
//
// Results:
//	None.
//
// Side effects:
//	The value of the Tcl_obj is appended to the errorInfo field. If we are
//	just starting to log an error, errorInfo is initialized from the error
//	message in the interpreter's result.
//
//----------------------------------------------------------------------

func XTcl_AppendObjToErrorInfo(tls *libc.TLS, interp uintptr, objPtr uintptr) { /* tclBasic.c:6800:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var length int32 at bp, 4

	var message uintptr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp)
	}()

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	XTcl_AddObjErrorInfo(tls, interp, message, *(*int32)(unsafe.Pointer(bp /* length */)))
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = objPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_AddErrorInfo --
//
//	Add information to the errorInfo field that describes the current
//	error.
//
// Results:
//	None.
//
// Side effects:
//	The contents of message are appended to the errorInfo field. If we are
//	just starting to log an error, errorInfo is initialized from the error
//	message in the interpreter's result.
//
//----------------------------------------------------------------------

func XTcl_AddErrorInfo(tls *libc.TLS, interp uintptr, message uintptr) { /* tclBasic.c:6834:1: */
	XTcl_AddObjErrorInfo(tls, interp, message, -1)
}

//----------------------------------------------------------------------
//
// Tcl_AddObjErrorInfo --
//
//	Add information to the errorInfo field that describes the current
//	error. This routine differs from Tcl_AddErrorInfo by taking a byte
//	pointer and length.
//
// Results:
//	None.
//
// Side effects:
//	"length" bytes from "message" are appended to the errorInfo field. If
//	"length" is negative, use bytes up to the first NULL byte. If we are
//	just starting to log an error, errorInfo is initialized from the error
//	message in the interpreter's result.
//
//----------------------------------------------------------------------

func XTcl_AddObjErrorInfo(tls *libc.TLS, interp uintptr, message uintptr, length int32) { /* tclBasic.c:6864:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var iPtr uintptr = interp

	// If we are just starting to log an error, errorInfo is initialized from
	// the error message in the interpreter's result.

	*(*int32)(unsafe.Pointer(iPtr + 424)) |= ERR_LEGACY_COPY
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo == uintptr(0) {
		if int32(*(*int8)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).Fresult))) != 0 {
			// The interp's string result is set, apparently by some extension
			// making a deprecated direct write to it. That extension may
			// expect interp->result to continue to be set, so we'll take
			// special pains to avoid clearing it, until we drop support for
			// interp->result completely.

			(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo = XTcl_NewStringObj(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult, -1)
		} else {
			(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo = (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr
		}
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorInfo)).FrefCount++
		if !(int32((*Interp)(unsafe.Pointer(iPtr)).FerrorCode) != 0) {
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+8740, uintptr(0)))
		}
	}

	// Now append "message" to the end of errorInfo.

	if length != 0 {
		if (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorInfo)).FrefCount > 1 {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo = XTcl_DuplicateObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo)
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorInfo)).FrefCount++
		}
		XTcl_AppendToObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo, message, length)
	}
}

//---------------------------------------------------------------------------
//
// Tcl_VarEvalVA --
//
//	Given a variable number of string arguments, concatenate them all
//	together and execute the result as a Tcl command.
//
// Results:
//	A standard Tcl return result. An error message or other result may be
//	left in the interp's result.
//
// Side effects:
//	Depends on what was done by the command.
//
//---------------------------------------------------------------------------

func XTcl_VarEvalVA(tls *libc.TLS, interp uintptr, argList Va_list) int32 { /* tclBasic.c:6933:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var buf Tcl_DString at bp, 216

	var string uintptr
	var result int32

	// Copy the strings one after the other into a single larger string. Use
	// stack-allocated space for small commands, but if the command gets too
	// large than call ckalloc to create the space.

	XTcl_DStringInit(tls, bp)
	for 1 != 0 {
		string = libc.VaUintptr(&argList)
		if string == uintptr(0) {
			break
		}
		XTcl_DStringAppend(tls, bp, string, -1)
	}

	result = XTcl_Eval(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring)
	XTcl_DStringFree(tls, bp)
	return result
}

//----------------------------------------------------------------------
//
// Tcl_VarEval --
//
//	Given a variable number of string arguments, concatenate them all
//	together and execute the result as a Tcl command.
//
// Results:
//	A standard Tcl return result. An error message or other result may be
//	left in interp->result.
//
// Side effects:
//	Depends on what was done by the command.
//
//----------------------------------------------------------------------
// ARGSUSED
func XTcl_VarEval(tls *libc.TLS, interp uintptr, va uintptr) int32 { /* tclBasic.c:6980:1: */
	var argList Va_list
	_ = argList
	var result int32

	argList = va
	result = XTcl_VarEvalVA(tls, interp, argList)
	_ = argList

	return result
}

//----------------------------------------------------------------------
//
// Tcl_GlobalEval --
//
//	Evaluate a command at global level in an interpreter.
//
// Results:
//	A standard Tcl result is returned, and the interp's result is modified
//	accordingly.
//
// Side effects:
//	The command string is executed in interp, and the execution is carried
//	out in the variable context of global level (no functions active),
//	just as if an "uplevel #0" command were being executed.
//
//----------------------------------------------------------------------

func XTcl_GlobalEval(tls *libc.TLS, interp uintptr, command uintptr) int32 { /* tclBasic.c:7015:1: */
	var iPtr uintptr = interp
	var result int32
	var savedVarFramePtr uintptr

	savedVarFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr
	result = XTcl_Eval(tls, interp, command)
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = savedVarFramePtr
	return result
}

//----------------------------------------------------------------------
//
// Tcl_SetRecursionLimit --
//
//	Set the maximum number of recursive calls that may be active for an
//	interpreter at once.
//
// Results:
//	The return value is the old limit on nesting for interp.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_SetRecursionLimit(tls *libc.TLS, interp uintptr, depth int32) int32 { /* tclBasic.c:7049:1: */
	var iPtr uintptr = interp
	var old int32

	old = (*Interp)(unsafe.Pointer(iPtr)).FmaxNestingDepth
	if depth > 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FmaxNestingDepth = depth
	}
	return old
}

//----------------------------------------------------------------------
//
// Tcl_AllowExceptions --
//
//	Sets a flag in an interpreter so that exceptions can occur in the next
//	call to Tcl_Eval without them being turned into errors.
//
// Results:
//	None.
//
// Side effects:
//	The TCL_ALLOW_EXCEPTIONS flag gets set in the interpreter's evalFlags
//	structure. See the reference documentation for more details.
//
//----------------------------------------------------------------------

func XTcl_AllowExceptions(tls *libc.TLS, interp uintptr) { /* tclBasic.c:7083:1: */
	var iPtr uintptr = interp

	*(*int32)(unsafe.Pointer(iPtr + 324)) |= TCL_ALLOW_EXCEPTIONS
}

//----------------------------------------------------------------------
//
// Tcl_GetVersion --
//
//	Get the Tcl major, minor, and patchlevel version numbers and the
//	release type. A patch is a release type TCL_FINAL_RELEASE with a
//	patchLevel > 0.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetVersion(tls *libc.TLS, majorV uintptr, minorV uintptr, patchLevelV uintptr, type1 uintptr) { /* tclBasic.c:7110:1: */
	if majorV != uintptr(0) {
		*(*int32)(unsafe.Pointer(majorV)) = TCL_MAJOR_VERSION
	}
	if minorV != uintptr(0) {
		*(*int32)(unsafe.Pointer(minorV)) = TCL_MINOR_VERSION
	}
	if patchLevelV != uintptr(0) {
		*(*int32)(unsafe.Pointer(patchLevelV)) = TCL_RELEASE_SERIAL
	}
	if type1 != uintptr(0) {
		*(*int32)(unsafe.Pointer(type1)) = TCL_FINAL_RELEASE
	}
}

//----------------------------------------------------------------------
//
// Math Functions --
//
//	This page contains the functions that implement all of the built-in
//	math functions for expressions.
//
// Results:
//	Each function returns TCL_OK if it succeeds and pushes an Tcl object
//	holding the result. If it fails it returns TCL_ERROR and leaves an
//	error message in the interpreter's result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sExprCeilFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7150:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var code int32
	// var d float64 at bp, 8

	// var big Mp_int at bp+8, 24

	if objc != 2 {
		sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
		return TCL_ERROR
	}
	code = XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	if code != TCL_OK {
		return TCL_ERROR
	}

	if XTcl_GetBignumFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8) == TCL_OK {
		XTcl_SetObjResult(tls, interp, XTcl_NewDoubleObj(tls, XTclCeil(tls, bp+8)))
		XTclBN_mp_clear(tls, bp+8)
	} else {
		XTcl_SetObjResult(tls, interp, XTcl_NewDoubleObj(tls, libc.Xceil(tls, *(*float64)(unsafe.Pointer(bp /* d */)))))
	}
	return TCL_OK
}

func sExprFloorFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7186:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var code int32
	// var d float64 at bp, 8

	// var big Mp_int at bp+8, 24

	if objc != 2 {
		sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
		return TCL_ERROR
	}
	code = XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	if code != TCL_OK {
		return TCL_ERROR
	}

	if XTcl_GetBignumFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8) == TCL_OK {
		XTcl_SetObjResult(tls, interp, XTcl_NewDoubleObj(tls, XTclFloor(tls, bp+8)))
		XTclBN_mp_clear(tls, bp+8)
	} else {
		XTcl_SetObjResult(tls, interp, XTcl_NewDoubleObj(tls, libc.Xfloor(tls, *(*float64)(unsafe.Pointer(bp /* d */)))))
	}
	return TCL_OK
}

func sExprIsqrtFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7222:1: */
	bp := tls.Alloc(112)
	defer tls.Free(112)

	// var ptr ClientData at bp+32, 8

	// var type1 int32 at bp+40, 4

	// var d float64 at bp+48, 8

	// var w Tcl_WideInt at bp+80, 8

	// var big Mp_int at bp+56, 24

	var exact int32
	// var root Mp_int at bp+88, 24
	exact = 0 // Flag ==1 if the argument can be represented
	// in a double as an exact integer.

	// Check syntax.

	if !(objc != 2) {
		goto __1
	}
	sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
	return TCL_ERROR
__1:
	;

	// Make sure that the arg is a number.

	if !(XTclGetNumberFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+32, bp+40) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	switch *(*int32)(unsafe.Pointer(bp + 40 /* type1 */)) {
	case TCL_NUMBER_NAN:
		goto __4
	case TCL_NUMBER_DOUBLE:
		goto __5
	case TCL_NUMBER_BIG:
		goto __6
	default:
		goto __7
	}
	goto __3
__4:
	XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48)
	return TCL_ERROR
__5:
	*(*float64)(unsafe.Pointer(bp + 48 /* d */)) = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 32))))
	if !(*(*float64)(unsafe.Pointer(bp + 48)) < float64(0)) {
		goto __8
	}
	goto negarg
__8:
	;
	if !(*(*float64)(unsafe.Pointer(bp + 48)) <= 9007199254740991.0) {
		goto __9
	}
	exact = 1
__9:
	;
	if !!(exact != 0) {
		goto __10
	}
	if !(XTcl_InitBignumFromDouble(tls, interp, *(*float64)(unsafe.Pointer(bp + 48)), bp+56) != TCL_OK) {
		goto __11
	}
	return TCL_ERROR
__11:
	;
__10:
	;
	goto __3
__6:
	if !(XTcl_GetBignumFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+56) != TCL_OK) {
		goto __12
	}
	return TCL_ERROR
__12:
	;
	if !((*Mp_int)(unsafe.Pointer(bp+56)).Fsign != 0) {
		goto __13
	}
	XTclBN_mp_clear(tls, bp+56)
	goto negarg
__13:
	;
	goto __3
__7:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 80)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 80)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+80)
		}()
	}() != TCL_OK) {
		goto __14
	}
	return TCL_ERROR
__14:
	;
	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 80)) < int64(0)) {
		goto __15
	}
	goto negarg
__15:
	;
	*(*float64)(unsafe.Pointer(bp + 48 /* d */)) = float64(*(*Tcl_WideInt)(unsafe.Pointer(bp + 80 /* w */)))
	if !(*(*float64)(unsafe.Pointer(bp + 48)) < 9007199254740991.0) {
		goto __16
	}
	exact = 1
__16:
	;
	if !!(exact != 0) {
		goto __17
	}
	XTcl_GetBignumFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+56)
__17:
	;
	goto __3
__3:
	;

	if !(exact != 0) {
		goto __18
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, libc.Int64FromFloat64(libc.Xsqrt(tls, *(*float64)(unsafe.Pointer(bp + 48 /* d */))))))
	goto __19
__18:

	XTclBN_mp_init(tls, bp+88)
	XTclBN_mp_sqrt(tls, bp+56, bp+88)
	XTclBN_mp_clear(tls, bp+56)
	XTcl_SetObjResult(tls, interp, XTcl_NewBignumObj(tls, bp+88))
__19:
	;
	return TCL_OK

negarg:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+8745, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+8778, ts+8784,
		ts+8791, uintptr(0)))
	return TCL_ERROR
}

func sExprSqrtFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7322:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var code int32
	// var d float64 at bp, 8

	// var big Mp_int at bp+8, 24

	if objc != 2 {
		sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
		return TCL_ERROR
	}
	code = XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	if code != TCL_OK {
		return TCL_ERROR
	}
	if *(*float64)(unsafe.Pointer(bp)) >= 0.0 && (*(*float64)(unsafe.Pointer(bp)) > 1.79769313486231570814527423731704357e+308 || *(*float64)(unsafe.Pointer(bp)) < -1.79769313486231570814527423731704357e+308) &&
		XTcl_GetBignumFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8) == TCL_OK {
		// var root Mp_int at bp+32, 24

		XTclBN_mp_init(tls, bp+32)
		XTclBN_mp_sqrt(tls, bp+8, bp+32)
		XTclBN_mp_clear(tls, bp+8)
		XTcl_SetObjResult(tls, interp, XTcl_NewDoubleObj(tls, XTclBignumToDouble(tls, bp+32)))
		XTclBN_mp_clear(tls, bp+32)
	} else {
		XTcl_SetObjResult(tls, interp, XTcl_NewDoubleObj(tls, libc.Xsqrt(tls, *(*float64)(unsafe.Pointer(bp /* d */)))))
	}
	return TCL_OK
}

func sExprUnaryFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7363:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var code int32
	// var d float64 at bp, 8

	var func1 uintptr = clientData

	if objc != 2 {
		sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
		return TCL_ERROR
	}
	code = XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	if code != TCL_OK {
		return TCL_ERROR
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = 0
	return sCheckDoubleResult(tls, interp, (*struct {
		f func(*libc.TLS, float64) float64
	})(unsafe.Pointer(&struct{ uintptr }{func1})).f(tls, *(*float64)(unsafe.Pointer(bp /* d */))))
}

func sCheckDoubleResult(tls *libc.TLS, interp uintptr, dResult float64) int32 { /* tclBasic.c:7396:1: */
	if libc.X__isnan(tls, dResult) != 0 {
		XTclExprFloatError(tls, interp, dResult)
		return TCL_ERROR
	}
	if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == ERANGE && (dResult == 0.0 || (dResult > 1.79769313486231570814527423731704357e+308 || dResult < -1.79769313486231570814527423731704357e+308)) {
		// When ERANGE signals under/overflow, just accept 0.0 or +/-Inf
	} else if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) != 0 {
		// Report other errno values as errors.

		XTclExprFloatError(tls, interp, dResult)
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewDoubleObj(tls, dResult))
	return TCL_OK
}

func sExprBinaryFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7423:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var code int32
	// var d1 float64 at bp, 8

	// var d2 float64 at bp+8, 8

	var func1 uintptr = clientData

	if objc != 3 {
		sMathFuncWrongNumArgs(tls, interp, 3, objc, objv)
		return TCL_ERROR
	}
	code = XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	if code != TCL_OK {
		return TCL_ERROR
	}
	code = XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8)
	if code != TCL_OK {
		return TCL_ERROR
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = 0
	return sCheckDoubleResult(tls, interp, (*struct {
		f func(*libc.TLS, float64, float64) float64
	})(unsafe.Pointer(&struct{ uintptr }{func1})).f(tls, *(*float64)(unsafe.Pointer(bp /* d1 */)), *(*float64)(unsafe.Pointer(bp + 8 /* d2 */))))
}

func sExprAbsFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7467:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var ptr ClientData at bp, 8

	// var type1 int32 at bp+8, 4

	// var big Mp_int at bp+16, 24

	var string uintptr
	var l int32
	// var d float64 at bp+40, 8

	var w Tcl_WideInt
	// var d1 float64 at bp+48, 8

	if !(objc != 2) {
		goto __1
	}
	sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
	return TCL_ERROR
__1:
	;

	if !(XTclGetNumberFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, bp+8) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_LONG) {
		goto __3
	}
	l = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp))))

	if !(l > 0) {
		goto __4
	}
	goto unChanged
	goto __5
__4:
	if !(l == 0) {
		goto __6
	}
	string = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
	if !(string != 0) {
		goto __8
	}
__9:
	if !(int32(*(*int8)(unsafe.Pointer(string))) != '0') {
		goto __10
	}
	if !(int32(*(*int8)(unsafe.Pointer(string))) == '-') {
		goto __11
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewLongObj(tls, 0))
	return TCL_OK
__11:
	;
	string++
	goto __9
__10:
	;
__8:
	;
	goto unChanged
	goto __7
__6:
	if !(l == -0x7fffffff-1) {
		goto __12
	}
	XTclBNInitBignumFromLong(tls, bp+16, l)
	goto tooLarge
__12:
	;
__7:
	;
__5:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewLongObj(tls, -l))
	return TCL_OK
__3:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_DOUBLE) {
		goto __13
	}
	*(*float64)(unsafe.Pointer(bp + 40 /* d */)) = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp))))

	// We need to distinguish here between positive 0.0 and negative -0.0.
	// [Bug 2954959]

	if !(*(*float64)(unsafe.Pointer(bp + 40)) == -libc.Float64FromFloat64(0.0)) {
		goto __14
	}
	if !!(libc.Xmemcmp(tls, bp+40, uintptr(unsafe.Pointer(&poszero)), uint64(unsafe.Sizeof(float64(0)))) != 0) {
		goto __16
	}
	goto unChanged
__16:
	;
	goto __15
__14:
	if !(*(*float64)(unsafe.Pointer(bp + 40)) > -libc.Float64FromFloat64(0.0)) {
		goto __17
	}
	goto unChanged
__17:
	;
__15:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewDoubleObj(tls, -*(*float64)(unsafe.Pointer(bp + 40 /* d */))))
	return TCL_OK
__13:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_WIDE) {
		goto __18
	}
	w = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp))))

	if !(w >= int64(0)) {
		goto __19
	}
	goto unChanged
__19:
	;
	if !(w == -0x7fffffffffffffff-1) {
		goto __20
	}
	XTclBNInitBignumFromWideInt(tls, bp+16, w)
	goto tooLarge
__20:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, -w))
	return TCL_OK
__18:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_BIG) {
		goto __21
	}
	if !(XTclBN_mp_cmp_d(tls, *(*ClientData)(unsafe.Pointer(bp)), uint32(0)) == -1) {
		goto __22
	}
	XTcl_GetBignumFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16)
tooLarge:
	XTclBN_mp_neg(tls, bp+16, bp+16)
	XTcl_SetObjResult(tls, interp, XTcl_NewBignumObj(tls, bp+16))
	goto __23
__22:
unChanged:
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
__23:
	;
	return TCL_OK
__21:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_NAN) {
		goto __24
	}

	XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48)
	return TCL_ERROR
__24:
	;
	return TCL_OK
}

var poszero float64 = 0.0 /* tclBasic.c:7514:22 */

func sExprBoolFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7576:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var value int32 at bp, 4

	if objc != 2 {
		sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
		return TCL_ERROR
	}
	if XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) != TCL_OK {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(*(*int32)(unsafe.Pointer(bp)) != 0)))
	return TCL_OK
}

func sExprDoubleFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7597:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var dResult float64 at bp, 8

	if objc != 2 {
		sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
		return TCL_ERROR
	}
	if XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) != TCL_OK {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewDoubleObj(tls, *(*float64)(unsafe.Pointer(bp /* dResult */))))
	return TCL_OK
}

func sExprEntierFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7624:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var d float64 at bp+40, 8

	// var type1 int32 at bp+8, 4

	// var ptr ClientData at bp, 8

	if objc != 2 {
		sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
		return TCL_ERROR
	}
	if XTclGetNumberFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, bp+8) != TCL_OK {
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_DOUBLE {
		*(*float64)(unsafe.Pointer(bp + 40 /* d */)) = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp))))
		if *(*float64)(unsafe.Pointer(bp + 40)) < float64(0x7fffffff) && *(*float64)(unsafe.Pointer(bp + 40)) > float64(-0x7fffffff-1) {
			var result int32 = int32(*(*float64)(unsafe.Pointer(bp + 40 /* d */)))

			XTcl_SetObjResult(tls, interp, XTcl_NewLongObj(tls, result))
			return TCL_OK
		} else if *(*float64)(unsafe.Pointer(bp + 40)) < float64(0x7fffffffffffffff) && *(*float64)(unsafe.Pointer(bp + 40)) > float64(-0x7fffffffffffffff-1) {
			var result Tcl_WideInt = Tcl_WideInt(*(*float64)(unsafe.Pointer(bp + 40 /* d */)))

			XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, result))
			return TCL_OK
		} else {
			// var big Mp_int at bp+16, 24

			if XTcl_InitBignumFromDouble(tls, interp, *(*float64)(unsafe.Pointer(bp + 40)), bp+16) != TCL_OK {
				// Infinity
				return TCL_ERROR
			}
			XTcl_SetObjResult(tls, interp, XTcl_NewBignumObj(tls, bp+16))
			return TCL_OK
		}
	}

	if *(*int32)(unsafe.Pointer(bp + 8)) != TCL_NUMBER_NAN {
		// All integers are already of integer type.

		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		return TCL_OK
	}

	// Get the error message for NaN.

	XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+40)
	return TCL_ERROR
}

func sExprIntFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7687:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var iResult int32 at bp, 4

	var objPtr uintptr
	if sExprEntierFunc(tls, uintptr(0), interp, objc, objv) != TCL_OK {
		return TCL_ERROR
	}
	objPtr = XTcl_GetObjResult(tls, interp)
	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 { *(*int32)(unsafe.Pointer(bp)) = *(*int32)(unsafe.Pointer(objPtr + 32)); return TCL_OK }()
		}
		return XTcl_GetLongFromObj(tls, uintptr(0), objPtr, bp)
	}() != TCL_OK {
		// Truncate the bignum; keep only bits in long range.

		// var big Mp_int at bp+8, 24

		XTcl_GetBignumFromObj(tls, uintptr(0), objPtr, bp+8)
		XTclBN_mp_mod_2d(tls, bp+8, int32(uint64(8)*uint64(unsafe.Sizeof(int32(0)))), bp+8)
		objPtr = XTcl_NewBignumObj(tls, bp+8)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*int32)(unsafe.Pointer(bp)) = *(*int32)(unsafe.Pointer(objPtr + 32))
		} else {
			XTcl_GetLongFromObj(tls, uintptr(0), objPtr, bp)
		}
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewLongObj(tls, *(*int32)(unsafe.Pointer(bp /* iResult */))))
	return TCL_OK
}

func sExprWideFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7719:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var wResult Tcl_WideInt at bp, 8

	var objPtr uintptr

	if sExprEntierFunc(tls, uintptr(0), interp, objc, objv) != TCL_OK {
		return TCL_ERROR
	}
	objPtr = XTcl_GetObjResult(tls, interp)
	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp)) = *(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(objPtr + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, uintptr(0), objPtr, bp)
		}()
	}() != TCL_OK {
		// Truncate the bignum; keep only bits in wide int range.

		// var big Mp_int at bp+8, 24

		XTcl_GetBignumFromObj(tls, uintptr(0), objPtr, bp+8)
		XTclBN_mp_mod_2d(tls, bp+8, int32(uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0)))), bp+8)
		objPtr = XTcl_NewBignumObj(tls, bp+8)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(bp)) = *(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32))
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				*(*Tcl_WideInt)(unsafe.Pointer(bp)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(objPtr + 32)))
			} else {
				XTcl_GetWideIntFromObj(tls, uintptr(0), objPtr, bp)
			}
		}
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, *(*Tcl_WideInt)(unsafe.Pointer(bp /* wResult */))))
	return TCL_OK
}

func sExprRandFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7752:1: */
	var iPtr uintptr = interp
	var dResult float64
	var tmp int32 // Algorithm assumes at least 32 bits. Only
	// long guarantees that. See below.
	var oResult uintptr

	if objc != 1 {
		sMathFuncWrongNumArgs(tls, interp, 1, objc, objv)
		return TCL_ERROR
	}

	if !((*Interp)(unsafe.Pointer(iPtr)).Fflags&RAND_SEED_INITIALIZED != 0) {
		*(*int32)(unsafe.Pointer(iPtr + 424)) |= RAND_SEED_INITIALIZED

		// To ensure different seeds in different threads (bug #416643),
		// take into consideration the thread this interp is running in.

		(*Interp)(unsafe.Pointer(iPtr)).FrandSeed = int32(XTclpGetClicks(tls) + uint32(int32(XTcl_GetCurrentThread(tls))<<12))

		// Make sure 1 <= randSeed <= (2^31) - 2. See below.

		*(*int32)(unsafe.Pointer(iPtr + 428)) &= int32(uint32(0x7FFFFFFF))
		if (*Interp)(unsafe.Pointer(iPtr)).FrandSeed == 0 || (*Interp)(unsafe.Pointer(iPtr)).FrandSeed == 0x7FFFFFFF {
			*(*int32)(unsafe.Pointer(iPtr + 428)) ^= 123459876
		}
	}

	// Generate the random number using the linear congruential generator
	// defined by the following recurrence:
	//		seed = ( IA * seed ) mod IM
	// where IA is 16807 and IM is (2^31) - 1. The recurrence maps a seed in
	// the range [1, IM - 1] to a new seed in that same range. The recurrence
	// maps IM to 0, and maps 0 back to 0, so those two values must not be
	// allowed as initial values of seed.
	//
	// In order to avoid potential problems with integer overflow, the
	// recurrence is implemented in terms of additional constants IQ and IR
	// such that
	//		IM = IA*IQ + IR
	// None of the operations in the implementation overflows a 32-bit signed
	// integer, and the C type long is guaranteed to be at least 32 bits wide.
	//
	// For more details on how this algorithm works, refer to the following
	// papers:
	//
	//	S.K. Park & K.W. Miller, "Random number generators: good ones are hard
	//	to find," Comm ACM 31(10):1192-1201, Oct 1988
	//
	//	W.H. Press & S.A. Teukolsky, "Portable random number generators,"
	//	Computers in Physics 6(5):522-524, Sep/Oct 1992.

	tmp = (*Interp)(unsafe.Pointer(iPtr)).FrandSeed / RAND_IQ
	(*Interp)(unsafe.Pointer(iPtr)).FrandSeed = RAND_IA*((*Interp)(unsafe.Pointer(iPtr)).FrandSeed-tmp*RAND_IQ) - RAND_IR*tmp
	if (*Interp)(unsafe.Pointer(iPtr)).FrandSeed < 0 {
		*(*int32)(unsafe.Pointer(iPtr + 428)) += RAND_IM
	}

	// Since the recurrence keeps seed values in the range [1, RAND_IM - 1],
	// dividing by RAND_IM yields a double in the range (0, 1).

	dResult = float64((*Interp)(unsafe.Pointer(iPtr)).FrandSeed) * (float64(1.0) / float64(RAND_IM))

	// Push a Tcl object with the result.

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			oResult = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(oResult)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(oResult)).Fbytes = uintptr(0)
		*(*float64)(unsafe.Pointer(oResult + 32)) = dResult
		(*Tcl_Obj)(unsafe.Pointer(oResult)).FtypePtr = uintptr(unsafe.Pointer(&XtclDoubleType))
		{
		}
	}
	XTcl_SetObjResult(tls, interp, oResult)
	return TCL_OK
}

func sExprRoundFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7845:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var d float64 at bp+48, 8

	// var ptr ClientData at bp, 8

	// var type1 int32 at bp+8, 4

	if objc != 2 {
		sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
		return TCL_ERROR
	}

	if XTclGetNumberFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, bp+8) != TCL_OK {
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_DOUBLE {
		var fractPart float64
		// var intPart float64 at bp+16, 8

		var max int32 = 0x7fffffff
		var min int32 = -0x7fffffff - 1

		fractPart = libc.Xmodf(tls, *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp)))), bp+16)
		if fractPart <= -0.5 {
			min++
		} else if fractPart >= 0.5 {
			max--
		}
		if *(*float64)(unsafe.Pointer(bp + 16)) >= float64(max) || *(*float64)(unsafe.Pointer(bp + 16)) <= float64(min) {
			// var big Mp_int at bp+24, 24

			if XTcl_InitBignumFromDouble(tls, interp, *(*float64)(unsafe.Pointer(bp + 16)), bp+24) != TCL_OK {
				// Infinity
				return TCL_ERROR
			}
			if fractPart <= -0.5 {
				XTclBN_mp_sub_d(tls, bp+24, uint32(1), bp+24)
			} else if fractPart >= 0.5 {
				XTclBN_mp_add_d(tls, bp+24, uint32(1), bp+24)
			}
			XTcl_SetObjResult(tls, interp, XTcl_NewBignumObj(tls, bp+24))
			return TCL_OK
		} else {
			var result int32 = int32(*(*float64)(unsafe.Pointer(bp + 16 /* intPart */)))

			if fractPart <= -0.5 {
				result--
			} else if fractPart >= 0.5 {
				result++
			}
			XTcl_SetObjResult(tls, interp, XTcl_NewLongObj(tls, result))
			return TCL_OK
		}
	}

	if *(*int32)(unsafe.Pointer(bp + 8)) != TCL_NUMBER_NAN {
		// All integers are already rounded

		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		return TCL_OK
	}

	// Get the error message for NaN.

	XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48)
	return TCL_ERROR
}

func sExprSrandFunc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:7920:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var iPtr uintptr = interp
	*(*int32)(unsafe.Pointer(bp /* i */)) = 0 // Initialized to avoid compiler warning.

	// Convert argument and use it to reset the seed.

	if objc != 2 {
		sMathFuncWrongNumArgs(tls, interp, 2, objc, objv)
		return TCL_ERROR
	}

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32))
				return TCL_OK
			}()
		}
		return XTcl_GetLongFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}() != TCL_OK {
		var objPtr uintptr
		// var big Mp_int at bp+8, 24

		if XTcl_GetBignumFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8) != TCL_OK {
			// TODO: more ::errorInfo here? or in caller?
			return TCL_ERROR
		}

		XTclBN_mp_mod_2d(tls, bp+8, int32(uint64(8)*uint64(unsafe.Sizeof(int32(0)))), bp+8)
		objPtr = XTcl_NewBignumObj(tls, bp+8)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*int32)(unsafe.Pointer(bp)) = *(*int32)(unsafe.Pointer(objPtr + 32))
		} else {
			XTcl_GetLongFromObj(tls, uintptr(0), objPtr, bp)
		}
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	// Reset the seed. Make sure 1 <= randSeed <= 2^31 - 2. See comments in
	// ExprRandFunc for more details.

	*(*int32)(unsafe.Pointer(iPtr + 424)) |= RAND_SEED_INITIALIZED
	(*Interp)(unsafe.Pointer(iPtr)).FrandSeed = *(*int32)(unsafe.Pointer(bp /* i */))
	*(*int32)(unsafe.Pointer(iPtr + 428)) &= int32(uint32(0x7FFFFFFF))
	if (*Interp)(unsafe.Pointer(iPtr)).FrandSeed == 0 || (*Interp)(unsafe.Pointer(iPtr)).FrandSeed == 0x7FFFFFFF {
		*(*int32)(unsafe.Pointer(iPtr + 428)) ^= 123459876
	}

	// To avoid duplicating the random number generation code we simply clean
	// up our state and call the real random number function. That function
	// will always succeed.

	return sExprRandFunc(tls, clientData, interp, 1, objv)
}

//----------------------------------------------------------------------
//
// MathFuncWrongNumArgs --
//
//	Generate an error message when a math function presents the wrong
//	number of arguments.
//
// Results:
//	None.
//
// Side effects:
//	An error message is stored in the interpreter result.
//
//----------------------------------------------------------------------

func sMathFuncWrongNumArgs(tls *libc.TLS, interp uintptr, expected int32, found int32, objv uintptr) { /* tclBasic.c:7994:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var name uintptr = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
	var tail uintptr = name + uintptr(libc.Xstrlen(tls, name))

	for tail > name+uintptr(1) {
		tail--
		if int32(*(*int8)(unsafe.Pointer(tail))) == ':' && int32(*(*int8)(unsafe.Pointer(tail + libc.UintptrFromInt32(-1)))) == ':' {
			name = tail + uintptr(1)
			break
		}
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+8833,
		libc.VaList(bp, func() uintptr {
			if found < expected {
				return ts + 8869 /* "not enough" */
			}
			return ts + 8880 /* "too many" */
		}(), name)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+8889, uintptr(0)))
}

//----------------------------------------------------------------------
//
// Tcl_NRCallObjProc --
//
//	This function calls an objProc directly while managing things properly
//	if it happens to be an NR objProc. It is meant to be used by extenders
//	that provide an NR implementation of a command, as this function
//	permits a trivial coding of the non-NR objProc.
//
// Results:
//	The return value is a standard Tcl completion code such as TCL_OK or
//	TCL_ERROR. A result or error message is left in interp's result.
//
// Side effects:
//	Depends on the objProc.
//
//----------------------------------------------------------------------

func XTcl_NRCallObjProc(tls *libc.TLS, interp uintptr, objProc uintptr, clientData ClientData, objc int32, objv uintptr) int32 { /* tclBasic.c:8180:1: */
	var rootPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sDispatch}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = objProc
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = clientData
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(Intptr_t(objc))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = objv
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNRRunCallbacks(tls, interp, TCL_OK, rootPtr)
}

//----------------------------------------------------------------------
//
// Tcl_NRCreateCommand --
//
//	Define a new NRE-enabled object-based command in a command table.
//
// Results:
//	The return value is a token for the command, which can be used in
//	future calls to Tcl_GetCommandName.
//
// Side effects:
//	If no command named "cmdName" already exists for interp, one is
//	created. Otherwise, if a command does exist, then if the object-based
//	Tcl_ObjCmdProc is TclInvokeStringCommand, we assume Tcl_CreateCommand
//	was called previously for the same command and just set its
//	Tcl_ObjCmdProc to the argument "proc"; otherwise, we delete the old
//	command.
//
//	In the future, during bytecode evaluation when "cmdName" is seen as
//	the name of a command by Tcl_EvalObj or Tcl_Eval, the object-based
//	Tcl_ObjCmdProc proc will be called. When the command is deleted from
//	the table, deleteProc will be called. See the manual entry for details
//	on the calling sequence.
//
//----------------------------------------------------------------------

func XTcl_NRCreateCommand(tls *libc.TLS, interp uintptr, cmdName uintptr, proc uintptr, nreProc uintptr, clientData ClientData, deleteProc uintptr) Tcl_Command { /* tclBasic.c:8223:1: */
	var cmdPtr uintptr = XTcl_CreateObjCommand(tls, interp, cmdName, proc, clientData, deleteProc)

	(*Command)(unsafe.Pointer(cmdPtr)).FnreProc = nreProc
	return cmdPtr
}

func XTclNRCreateCommandInNs(tls *libc.TLS, interp uintptr, cmdName uintptr, nsPtr uintptr, proc uintptr, nreProc uintptr, clientData ClientData, deleteProc uintptr) Tcl_Command { /* tclBasic.c:8249:1: */
	var cmdPtr uintptr = XTclCreateObjCommandInNs(tls, interp, cmdName, nsPtr, proc, clientData, deleteProc)

	(*Command)(unsafe.Pointer(cmdPtr)).FnreProc = nreProc
	return cmdPtr
}

// ***************************************************************************
//
// Stuff for the public api
//

func XTcl_NREvalObj(tls *libc.TLS, interp uintptr, objPtr uintptr, flags int32) int32 { /* tclBasic.c:8269:1: */
	return XTclNREvalObjEx(tls, interp, objPtr, flags, uintptr(0), -0x7fffffff-1)
}

func XTcl_NREvalObjv(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, flags int32) int32 { /* tclBasic.c:8278:1: */
	return XTclNREvalObjv(tls, interp, objc, objv, flags, uintptr(0))
}

func XTcl_NRCmdSwap(tls *libc.TLS, interp uintptr, cmd Tcl_Command, objc int32, objv uintptr, flags int32) int32 { /* tclBasic.c:8293:1: */
	return XTclNREvalObjv(tls, interp, objc, objv, flags|TCL_EVAL_NOERR,
		cmd)
}

// ****************************************************************************
//
// Tailcall related code
//
//
// The steps of the tailcall dance are as follows:
//
//   1. when [tailcall] is invoked, it stores the corresponding callback in
//      the current CallFrame and returns TCL_RETURN
//   2. when the CallFrame is popped, it calls TclSetTailcall to store the
//      callback in the proper NRCommand callback - the spot where the command
//      that pushed the CallFrame is completely cleaned up
//   3. when the NRCommand callback runs, it schedules the tailcall callback
//      to run immediately after it returns
//
//   One delicate point is to properly define the NRCommand where the tailcall
//   will execute. There are functions whose purpose is to help define the
//   precise spot:
//     TclMarkTailcall: if the NEXT command to be pushed tailcalls, execution
//         should continue right here
//     TclSkipTailcall:  if the NEXT command to be pushed tailcalls, execution
//         should continue after the CURRENT command is fully returned ("skip
//         the next command: we are redirecting to it, tailcalls should run
//         after WE return")
//     TclPushTailcallPoint: the search for a tailcalling spot cannot traverse
//         this point. This is special for OO, as some of the oo constructs
//         that behave like commands may not push an NRCommand callback.

func XTclMarkTailcall(tls *libc.TLS, interp uintptr) { /* tclBasic.c:8333:1: */
	var iPtr uintptr = interp

	if (*Interp)(unsafe.Pointer(iPtr)).FdeferredCallbacks == uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sNRCommand}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
		(*Interp)(unsafe.Pointer(iPtr)).FdeferredCallbacks = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	}
}

func XTclSkipTailcall(tls *libc.TLS, interp uintptr) { /* tclBasic.c:8346:1: */
	var iPtr uintptr = interp

	XTclMarkTailcall(tls, interp)
	*(*ClientData)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FdeferredCallbacks + 8 + 1*8)) = uintptr(int64(1))
}

func XTclPushTailcallPoint(tls *libc.TLS, interp uintptr) { /* tclBasic.c:8356:1: */
	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sNRCommand}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	(*Interp)(unsafe.Pointer(interp)).FnumLevels++
}

//----------------------------------------------------------------------
//
// TclSetTailcall --
//
//	Splice a tailcall command in the proper spot of the NRE callback
//	stack, so that it runs at the right time.
//
//----------------------------------------------------------------------

func XTclSetTailcall(tls *libc.TLS, interp uintptr, listPtr uintptr) { /* tclBasic.c:8376:1: */
	// Find the splicing spot: right before the NRCommand of the thing
	// being tailcalled. Note that we skip NRCommands marked by a 1 in data[1]
	// (used by command redirectors).

	var runPtr uintptr

	for runPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr; runPtr != 0; runPtr = (*NRE_callback)(unsafe.Pointer(runPtr)).FnextPtr {
		if (*NRE_callback)(unsafe.Pointer(runPtr)).FprocPtr == *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sNRCommand})) && !(int32(*(*ClientData)(unsafe.Pointer(runPtr + 8 + 1*8))) != 0) {
			break
		}
	}
	if !(runPtr != 0) {
		XTcl_Panic(tls, ts+8899, 0)
	}
	*(*ClientData)(unsafe.Pointer(runPtr + 8 + 1*8)) = listPtr
}

//----------------------------------------------------------------------
//
// TclNRTailcallObjCmd --
//
//	Prepare the tailcall as a list and store it in the current
//	varFrame. When the frame is later popped the tailcall will be spliced
//	at the proper place.
//
// Results:
//	The first NRCommand callback that is not marked to be skipped is
//	updated so that its data[1] field contains the tailcall list.
//
//----------------------------------------------------------------------

func XTclNRTailcallObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:8417:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var iPtr uintptr = interp

	if objc < 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+8964)
		return TCL_ERROR
	}

	if !((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame&1 != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+8984, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+9042, ts+9051, uintptr(0)))
		return TCL_ERROR
	}

	// Invocation without args just clears a scheduled tailcall; invocation
	// with an argument replaces any previously scheduled tailcall.

	if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FtailcallPtr != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FtailcallPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FtailcallPtr = uintptr(0)
	}

	// Create the callback to actually evaluate the tailcalled
	// command, then set it in the varFrame so that PopCallFrame can use it
	// at the proper time.

	if objc > 1 {
		var listPtr uintptr
		var nsObjPtr uintptr
		var nsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr

		// The tailcall data is in a Tcl list: the first element is the
		// namespace, the rest the command to be tailcalled.

		nsObjPtr = XTcl_NewStringObj(tls, (*Tcl_Namespace)(unsafe.Pointer(nsPtr)).FfullName, -1)
		listPtr = XTcl_NewListObj(tls, objc, objv)
		XTclListObjSetElement(tls, interp, listPtr, 0, nsObjPtr)

		(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FtailcallPtr = listPtr
	}
	return TCL_RETURN
}

//----------------------------------------------------------------------
//
// TclNRTailcallEval --
//
//	This NREcallback actually causes the tailcall to be evaluated.
//
//----------------------------------------------------------------------

func XTclNRTailcallEval(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:8483:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var iPtr uintptr = interp
	var listPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var nsObjPtr uintptr
	// var nsPtr uintptr at bp+16, 8

	// var objc int32 at bp, 4

	// var objv uintptr at bp+8, 8

	XTcl_ListObjGetElements(tls, interp, listPtr, bp, bp+8)
	nsObjPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */))))

	if result == TCL_OK {
		result = XTclGetNamespaceFromObj(tls, interp, nsObjPtr, bp+16)
	}

	if result != TCL_OK {
		// Tailcall execution was preempted, eg by an intervening catch or by
		// a now-gone namespace: cleanup and return.

		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = listPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return result
	}

	// Perform the tailcall

	XTclMarkTailcall(tls, interp)
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _callbackPtr uintptr
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRReleaseValues}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = listPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	(*Interp)(unsafe.Pointer(iPtr)).FlookupNsPtr = *(*uintptr)(unsafe.Pointer(bp + 16 /* nsPtr */))
	return XTclNREvalObjv(tls, interp, *(*int32)(unsafe.Pointer(bp))-1, *(*uintptr)(unsafe.Pointer(bp + 8))+uintptr(1)*8, 0, uintptr(0))
}

func XTclNRReleaseValues(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:8522:1: */
	var i int32 = 0
	for i < 4 {
		if *(*ClientData)(unsafe.Pointer(data + uintptr(i)*8)) != 0 {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*ClientData)(unsafe.Pointer(data + uintptr(i)*8))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		} else {
			break
		}
		i++
	}
	return result
}

func XTcl_NRAddCallback(tls *libc.TLS, interp uintptr, postProcPtr uintptr, data0 ClientData, data1 ClientData, data2 ClientData, data3 ClientData) { /* tclBasic.c:8541:1: */
	if !(postProcPtr != 0) {
		XTcl_Panic(tls, ts+9059, 0)
	}
	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = postProcPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = data0
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = data1
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = data2
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = data3
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
}

//----------------------------------------------------------------------
//
// TclNRCoroutineObjCmd -- (and friends)
//
//	This object-based function is invoked to process the "coroutine" Tcl
//	command. It is heavily based on "apply".
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	A new procedure gets created.
//
// ** FIRST EXPERIMENTAL IMPLEMENTATION **
//
// It is fairly amateurish and not up to our standards - mainly in terms of
// error messages and [info] interaction. Just to test the infrastructure in
// teov and tebc.
//----------------------------------------------------------------------

func XTclNRYieldObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:8580:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var corPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcorPtr

	if objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+9098)
		return TCL_ERROR
	}

	if !(corPtr != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+9112, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+9152, ts+9162, uintptr(0)))
		return TCL_ERROR
	}

	if objc == 2 {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRCoroutineActivateCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = corPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = clientData
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return TCL_OK
}

func XTclNRYieldToObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:8611:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	var corPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcorPtr
	var listPtr uintptr
	var nsObjPtr uintptr
	var nsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+9176)
		return TCL_ERROR
	}

	if !(corPtr != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+9194, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+9152, ts+9162, uintptr(0)))
		return TCL_ERROR
	}

	if (*Namespace)(unsafe.Pointer(nsPtr)).Fflags&NS_DYING != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+9236, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+9152, ts+9272,
			uintptr(0)))
		return TCL_ERROR
	}

	// Add the tailcall in the caller env, then just yield.
	//
	// This is essentially code from TclNRTailcallObjCmd

	listPtr = XTcl_NewListObj(tls, objc, objv)
	nsObjPtr = XTcl_NewStringObj(tls, (*Tcl_Namespace)(unsafe.Pointer(nsPtr)).FfullName, -1)
	XTclListObjSetElement(tls, interp, listPtr, 0, nsObjPtr)

	// Add the callback in the caller's env, then instruct TEBC to yield.

	(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr
	XTclSetTailcall(tls, interp, listPtr)
	(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr

	return XTclNRYieldObjCmd(tls, uintptr(int64(int32(uintptr(0))+1)), interp, 1, objv)
}

func sRewindCoroutineCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:8663:1: */
	return XTcl_RestoreInterpState(tls, interp, *(*ClientData)(unsafe.Pointer(data)))
}

func sRewindCoroutine(tls *libc.TLS, corPtr uintptr, result int32) int32 { /* tclBasic.c:8672:1: */
	var interp uintptr = (*ExecEnv1)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr)).Finterp
	var state Tcl_InterpState = XTcl_SaveInterpState(tls, interp, result)

	(*ExecEnv1)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr)).Frewind = 1
	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sRewindCoroutineCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = state
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNRInterpCoroutine(tls, corPtr, interp, 0, uintptr(0))
}

func sDeleteCoroutine(tls *libc.TLS, clientData ClientData) { /* tclBasic.c:8690:1: */
	var corPtr uintptr = clientData
	var interp uintptr = (*ExecEnv1)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr)).Finterp
	var rootPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr

	if (*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel == uintptr(0) {
		XTclNRRunCallbacks(tls, interp, sRewindCoroutine(tls, corPtr, TCL_OK), rootPtr)
	}
}

func sNRCoroutineCallerCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:8703:1: */
	var corPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var cmdPtr uintptr = (*CoroutineData)(unsafe.Pointer(corPtr)).FcmdPtr

	// This is the last callback in the caller execEnv, right before switching
	// to the coroutine's

	if !(int32((*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr) != 0) {
		// The execEnv was wound down but not deleted for our sake. We finish
		// the job here. The caller context has already been restored.

		XTclpFree(tls, corPtr)
		return result
	}

	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FframePtr = (*Interp)(unsafe.Pointer(interp)).FframePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FvarFramePtr = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FcmdFramePtr = (*Interp)(unsafe.Pointer(interp)).FcmdFramePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FlineLABCPtr = (*Interp)(unsafe.Pointer(interp)).FlineLABCPtr
	(*Interp)(unsafe.Pointer(interp)).FframePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FframePtr
	(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FvarFramePtr
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FcmdFramePtr
	(*Interp)(unsafe.Pointer(interp)).FlineLABCPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FlineLABCPtr

	if (*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_IS_DELETED != 0 {
		// The command was deleted while it was running: wind down the
		// execEnv, this will do the complete cleanup. RewindCoroutine will
		// restore both the caller's context and interp state.

		return sRewindCoroutine(tls, corPtr, result)
	}

	return result
}

func sNRCoroutineExitCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:8749:1: */
	var corPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var cmdPtr uintptr = (*CoroutineData)(unsafe.Pointer(corPtr)).FcmdPtr

	// This runs at the bottom of the Coroutine's execEnv: it will be executed
	// when the coroutine returns or is wound down, but not when it yields. It
	// deletes the coroutine and restores the caller's environment.

	(*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc = uintptr(0)
	XTcl_DeleteCommandFromToken(tls, interp, cmdPtr)
	if libc.PostDecInt32(&(*Command)(unsafe.Pointer(cmdPtr)).FrefCount, 1) <= 1 {
		XTclpFree(tls, cmdPtr)
	}

	(*ExecEnv1)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr)).FcorPtr = uintptr(0)
	XTclDeleteExecEnv(tls, (*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr)
	(*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr = uintptr(0)

	(*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel = uintptr(0)

	// #280.
	// Drop the coroutine-owned copy of the lineLABCPtr hashtable for literal
	// command arguments in bytecode.

	XTcl_DeleteHashTable(tls, (*CoroutineData)(unsafe.Pointer(corPtr)).FlineLABCPtr)
	XTclpFree(tls, (*CoroutineData)(unsafe.Pointer(corPtr)).FlineLABCPtr)
	(*CoroutineData)(unsafe.Pointer(corPtr)).FlineLABCPtr = uintptr(0)

	(*Interp)(unsafe.Pointer(interp)).FframePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FframePtr
	(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FvarFramePtr
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FcmdFramePtr
	(*Interp)(unsafe.Pointer(interp)).FlineLABCPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FlineLABCPtr
	(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr
	(*Interp)(unsafe.Pointer(interp)).FnumLevels++

	return result
}

//----------------------------------------------------------------------
//
// TclNRCoroutineActivateCallback --
//
//      This is the workhorse for coroutines: it implements both yield and
//      resume.
//
//      It is important that both be implemented in the same callback: the
//      detection of the impossibility to suspend due to a busy C-stack relies
//      on the precise position of a local variable in the stack. We do not
//      want the compiler to play tricks on us, either by moving things around
//      or inlining.
//
//----------------------------------------------------------------------

func XTclNRCoroutineActivateCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:8814:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var corPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var type1 int32 = int32(*(*ClientData)(unsafe.Pointer(data + 1*8)))
	var numLevels int32
	// var unused int32 at bp+32, 4

	var stackLevel uintptr = bp + 32 /* &unused */

	if !(int32((*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel) != 0) {
		// -- Coroutine is suspended --
		// Push the callback to restore the caller's context on yield or
		// return.

		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sNRCoroutineCallerCallback}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = corPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}

		// Record the stackLevel at which the resume is happening, then swap
		// the interp's environment to make it suitable to run this coroutine.

		(*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel = stackLevel
		numLevels = (*CoroutineData)(unsafe.Pointer(corPtr)).FauxNumLevels
		(*CoroutineData)(unsafe.Pointer(corPtr)).FauxNumLevels = (*Interp)(unsafe.Pointer(interp)).FnumLevels

		(*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FframePtr = (*Interp)(unsafe.Pointer(interp)).FframePtr
		(*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FvarFramePtr = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
		(*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FcmdFramePtr = (*Interp)(unsafe.Pointer(interp)).FcmdFramePtr
		(*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FlineLABCPtr = (*Interp)(unsafe.Pointer(interp)).FlineLABCPtr
		(*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr = (*Interp)(unsafe.Pointer(interp)).FexecEnvPtr
		(*Interp)(unsafe.Pointer(interp)).FframePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FframePtr
		(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FvarFramePtr
		(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FcmdFramePtr
		(*Interp)(unsafe.Pointer(interp)).FlineLABCPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FlineLABCPtr
		(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr
		*(*int32)(unsafe.Pointer(interp + 152)) += numLevels
	} else {
		// Coroutine is active: yield

		if (*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel != stackLevel {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+9291, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+9152, ts+9318,
				uintptr(0)))
			return TCL_ERROR
		}

		if type1 == int32(uintptr(0)) {
			(*CoroutineData)(unsafe.Pointer(corPtr)).Fnargs = -1
		} else if type1 == int32(uintptr(0))+1 {
			(*CoroutineData)(unsafe.Pointer(corPtr)).Fnargs = -2
		} else {
			XTcl_Panic(tls, ts+9329, 0)
		}

		(*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel = uintptr(0)

		numLevels = (*Interp)(unsafe.Pointer(interp)).FnumLevels
		(*Interp)(unsafe.Pointer(interp)).FnumLevels = (*CoroutineData)(unsafe.Pointer(corPtr)).FauxNumLevels
		(*CoroutineData)(unsafe.Pointer(corPtr)).FauxNumLevels = numLevels - (*CoroutineData)(unsafe.Pointer(corPtr)).FauxNumLevels

		(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclNREvalList --
//
//      Callback to invoke command as list, used in order to delayed
//	processing of canonical list command in sane environment.
//
//----------------------------------------------------------------------

func sTclNREvalList(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclBasic.c:8893:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var objc int32 at bp+8, 4

	// var objv uintptr at bp, 8

	var listPtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount++

	XTclMarkTailcall(tls, interp)
	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRReleaseValues}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = listPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(listPtr + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listPtr + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), listPtr, bp+8, bp)
	}
	return XTclNREvalObjv(tls, interp, *(*int32)(unsafe.Pointer(bp + 8 /* objc */)), *(*uintptr)(unsafe.Pointer(bp /* objv */)), 0, uintptr(0))
}

//----------------------------------------------------------------------
//
// CoroTypeObjCmd --
//
//      Implementation of [::tcl::unsupported::corotype] command.
//
//----------------------------------------------------------------------

func sCoroTypeObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:8921:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var cmdPtr uintptr
	var corPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2831)
		return TCL_ERROR
	}

	// Look up the coroutine.

	cmdPtr = XTcl_GetCommandFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if !(cmdPtr != 0) || (*Command)(unsafe.Pointer(cmdPtr)).FnreProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRInterpCoroutine})) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+9379, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+9152,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}

	// An active coroutine is "active". Can't tell what it might do in the
	// future.

	corPtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	if !((*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel == uintptr(0)) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+9422, -1))
		return TCL_OK
	}

	// Inactive coroutines are classified by the (effective) command used to
	// suspend them, which matters when you're injecting a probe.

	switch (*CoroutineData)(unsafe.Pointer(corPtr)).Fnargs {
	case -1:
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+4037, -1))
		return TCL_OK
	case -2:
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+5950, -1))
		return TCL_OK
	default:
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+9429, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+9152, ts+9452, uintptr(0)))
		return TCL_ERROR
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// NRCoroInjectObjCmd --
//
//      Implementation of [::tcl::unsupported::inject] command.
//
//----------------------------------------------------------------------

func sNRCoroInjectObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:8990:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var cmdPtr uintptr
	var corPtr uintptr
	var savedEEPtr uintptr = (*Interp)(unsafe.Pointer(interp)).FexecEnvPtr

	// Usage more or less like tailcall:
	//   inject coroName cmd ?arg1 arg2 ...?

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+9461)
		return TCL_ERROR
	}

	cmdPtr = XTcl_GetCommandFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if !(cmdPtr != 0) || (*Command)(unsafe.Pointer(cmdPtr)).FnreProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRInterpCoroutine})) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+9490, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+9152,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}

	corPtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	if !((*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel == uintptr(0)) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+9533, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+9152, ts+9586, uintptr(0)))
		return TCL_ERROR
	}

	// Add the callback to the coro's execEnv, so that it is the first thing
	// to happen when the coro is resumed.

	(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr
	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sTclNREvalList}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = XTcl_NewListObj(tls, objc-2, objv+uintptr(2)*8)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = savedEEPtr

	return TCL_OK
}

func XTclNRInterpCoroutine(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:9041:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	var corPtr uintptr = clientData

	if !((*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel == uintptr(0)) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+9593,
			libc.VaList(bp, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv))))))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+9152, ts+9627, uintptr(0)))
		return TCL_ERROR
	}

	// Parse all the arguments to work out what to feed as the result of the
	// [yield]. TRICKY POINT: objc==0 happens here! It occurs when a coroutine
	// is deleted!

	switch (*CoroutineData)(unsafe.Pointer(corPtr)).Fnargs {
	case -1:
		if objc == 2 {
			XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		} else if objc > 2 {
			XTcl_WrongNumArgs(tls, interp, 1, objv, ts+9632)
			return TCL_ERROR
		}
		break
	default:
		if (*CoroutineData)(unsafe.Pointer(corPtr)).Fnargs != objc-1 {
			XTcl_SetObjResult(tls, interp,
				XTcl_NewStringObj(tls,
					ts+9638, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+8889, uintptr(0)))
			return TCL_ERROR
		}
		fallthrough
		// fallthrough
	case -2:
		if objc > 1 {
			XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, objc-1, objv+uintptr(1)*8))
		}
		break
	}

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRCoroutineActivateCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = corPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclNRCoroutineObjCmd --
//
//      Implementation of [coroutine] command; see documentation for
//      description of what this does.
//
//----------------------------------------------------------------------

func XTclNRCoroutineObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:9105:1: */
	bp := tls.Alloc(148)
	defer tls.Free(148)

	var cmdPtr uintptr
	var corPtr uintptr
	var procName uintptr
	// var simpleName uintptr at bp+112, 8

	// var nsPtr uintptr at bp+88, 8

	// var altNsPtr uintptr at bp+96, 8

	// var cxtNsPtr uintptr at bp+104, 8

	var inNsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	var lookupNsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+9694)
		return TCL_ERROR
	}

	procName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	XTclGetNamespaceForQualName(tls, interp, procName, inNsPtr, 0,
		bp+88, bp+96, bp+104, bp+112)

	if *(*uintptr)(unsafe.Pointer(bp + 88)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+9713,
			libc.VaList(bp, procName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+9760, uintptr(0)))
		return TCL_ERROR
	}
	if *(*uintptr)(unsafe.Pointer(bp + 112)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+9770,
			libc.VaList(bp+40, procName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7444, ts+7857, procName, uintptr(0)))
		return TCL_ERROR
	}

	// We ARE creating the coroutine command: allocate the corresponding
	// struct and create the corresponding command.

	corPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CoroutineData{})))

	cmdPtr = XTclNRCreateCommandInNs(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112 /* simpleName */)),
		*(*uintptr)(unsafe.Pointer(bp + 88 /* nsPtr */)) /*objProc*/, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclNRInterpCoroutine})),
		corPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteCoroutine})))

	(*CoroutineData)(unsafe.Pointer(corPtr)).FcmdPtr = cmdPtr
	(*Command)(unsafe.Pointer(cmdPtr)).FrefCount++

	/*
	 * #280.
	 * Provide the new coroutine with its own copy of the lineLABCPtr
	 * hashtable for literal command arguments in bytecode. Note that that
	 * CFWordBC chains are not duplicated, only the entrypoints to them. This
	 * means that in the presence of coroutines each chain is potentially a
	 * tree. Like the chain -> tree conversion of the CmdFrame stack.
	 */

	{
		// var hSearch Tcl_HashSearch at bp+120, 24

		var hePtr uintptr

		(*CoroutineData)(unsafe.Pointer(corPtr)).FlineLABCPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_InitHashTable(tls, (*CoroutineData)(unsafe.Pointer(corPtr)).FlineLABCPtr, 1)

		for hePtr = XTcl_FirstHashEntry(tls, (*Interp)(unsafe.Pointer(interp)).FlineLABCPtr, bp+120); hePtr != 0; hePtr = XTcl_NextHashEntry(tls, bp+120) {
			// var isNew int32 at bp+144, 4

			var newPtr uintptr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr)).FlineLABCPtr)).FcreateProc})).f(tls, (*CoroutineData)(unsafe.Pointer(corPtr)).FlineLABCPtr, func() uintptr {
				if (*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FlineLABCPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FlineLABCPtr)).FkeyType == -1 {
					return *(*uintptr)(unsafe.Pointer(hePtr + 32))
				}
				return hePtr + 32
			}(), bp+144)

			(*Tcl_HashEntry)(unsafe.Pointer(newPtr)).FclientData = (*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData
		}

	}

	// Create the base context.

	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FframePtr = (*Interp)(unsafe.Pointer(interp)).FrootFramePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FvarFramePtr = (*Interp)(unsafe.Pointer(interp)).FrootFramePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FcmdFramePtr = uintptr(0)
	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FlineLABCPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FlineLABCPtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).FstackLevel = uintptr(0)
	(*CoroutineData)(unsafe.Pointer(corPtr)).FauxNumLevels = 0

	// Create the coro's execEnv, switch to it to push the exit and coro
	// command callbacks, then switch back.

	(*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr = XTclCreateExecEnv(tls, interp, CORO_STACK_INITIAL_SIZE)
	(*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr = (*Interp)(unsafe.Pointer(interp)).FexecEnvPtr
	(*ExecEnv1)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr)).FcorPtr = corPtr

	(*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FframePtr = (*Interp)(unsafe.Pointer(interp)).FframePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FvarFramePtr = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FcmdFramePtr = (*Interp)(unsafe.Pointer(interp)).FcmdFramePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FlineLABCPtr = (*Interp)(unsafe.Pointer(interp)).FlineLABCPtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr = (*Interp)(unsafe.Pointer(interp)).FexecEnvPtr
	(*Interp)(unsafe.Pointer(interp)).FframePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FframePtr
	(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FvarFramePtr
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FcmdFramePtr
	(*Interp)(unsafe.Pointer(interp)).FlineLABCPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FlineLABCPtr
	(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sNRCoroutineExitCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = corPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}

	// Ensure that the command is looked up in the correct namespace.

	(*Interp)(unsafe.Pointer(interp)).FlookupNsPtr = lookupNsPtr
	XTcl_NREvalObj(tls, interp, XTcl_NewListObj(tls, objc-2, objv+uintptr(2)*8), 0)
	(*Interp)(unsafe.Pointer(interp)).FnumLevels--

	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FframePtr = (*Interp)(unsafe.Pointer(interp)).FframePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FvarFramePtr = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FcmdFramePtr = (*Interp)(unsafe.Pointer(interp)).FcmdFramePtr
	(*CoroutineData)(unsafe.Pointer(corPtr)).Frunning.FlineLABCPtr = (*Interp)(unsafe.Pointer(interp)).FlineLABCPtr
	(*Interp)(unsafe.Pointer(interp)).FframePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FframePtr
	(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FvarFramePtr
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FcmdFramePtr
	(*Interp)(unsafe.Pointer(interp)).FlineLABCPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FlineLABCPtr
	(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr

	// Now just resume the coroutine.

	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _callbackPtr uintptr
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRCoroutineActivateCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = corPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return TCL_OK
}

// This is used in the [info] ensemble

func XTclInfoCoroutineCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBasic.c:9238:1: */
	var corPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcorPtr

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}

	if corPtr != 0 && !((*Command1)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr)).FcmdPtr)).Fflags&CMD_IS_DELETED != 0) {
		var namePtr uintptr

		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			namePtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(namePtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(namePtr)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(namePtr)).FtypePtr = uintptr(0)
		{
		}

		XTcl_GetCommandFullName(tls, interp, (*CoroutineData)(unsafe.Pointer(corPtr)).FcmdPtr, namePtr)
		XTcl_SetObjResult(tls, interp, namePtr)
	}
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// indent-tabs-mode: nil
// End:

// The following tables are used by the binary encoders

var sHexDigits = [16]int8{
	int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'),
	int8('8'), int8('9'), int8('a'), int8('b'), int8('c'), int8('d'), int8('e'), int8('f'),
} /* tclBinary.c:104:19 */

var sUueDigits = [65]int8{
	int8('`'), int8('!'), int8('"'), int8('#'), int8('$'), int8('%'), int8('&'), int8('\''),
	int8('('), int8(')'), int8('*'), int8('+'), int8(','), int8('-'), int8('.'), int8('/'),
	int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'),
	int8('8'), int8('9'), int8(':'), int8(';'), int8('<'), int8('='), int8('>'), int8('?'),
	int8('@'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), int8('G'),
	int8('H'), int8('I'), int8('J'), int8('K'), int8('L'), int8('M'), int8('N'), int8('O'),
	int8('P'), int8('Q'), int8('R'), int8('S'), int8('T'), int8('U'), int8('V'), int8('W'),
	int8('X'), int8('Y'), int8('Z'), int8('['), int8('\\'), int8(']'), int8('^'), int8('_'),
	int8('`'),
} /* tclBinary.c:109:19 */

var sB64Digits = [65]int8{
	int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), int8('G'), int8('H'),
	int8('I'), int8('J'), int8('K'), int8('L'), int8('M'), int8('N'), int8('O'), int8('P'),
	int8('Q'), int8('R'), int8('S'), int8('T'), int8('U'), int8('V'), int8('W'), int8('X'),
	int8('Y'), int8('Z'), int8('a'), int8('b'), int8('c'), int8('d'), int8('e'), int8('f'),
	int8('g'), int8('h'), int8('i'), int8('j'), int8('k'), int8('l'), int8('m'), int8('n'),
	int8('o'), int8('p'), int8('q'), int8('r'), int8('s'), int8('t'), int8('u'), int8('v'),
	int8('w'), int8('x'), int8('y'), int8('z'), int8('0'), int8('1'), int8('2'), int8('3'),
	int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('+'), int8('/'),
	int8('='),
} /* tclBinary.c:121:19 */

// How to construct the ensembles.

var binaryMap = [5]EnsembleImplMap{
	{Fname: ts + 5739, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 5883, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 9818},
	{Fname: ts + 9825},
	{},
} /* tclBinary.c:137:30 */
var encodeMap = [4]EnsembleImplMap{
	{Fname: ts + 9832, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 9836, Fproc: 0},
	{Fname: ts + 9845, Fproc: 0},
	{},
} /* tclBinary.c:144:30 */
var decodeMap = [4]EnsembleImplMap{
	{Fname: ts + 9832, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 9836, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 9845, Fproc: 0, FcompileProc: 0},
	{},
} /* tclBinary.c:150:30 */

// The following object type represents an array of bytes. An array of bytes
// is not equivalent to an internationalized string. Conceptually, a string is
// an array of 16-bit quantities organized as a sequence of properly formed
// UTF-8 characters, while a ByteArray is an array of 8-bit quantities.
// Accessor functions are provided to convert a ByteArray to a String or a
// String to a ByteArray. Two or more consecutive bytes in an array of bytes
// may look like a single UTF-8 character if the array is casually treated as
// a string. But obtaining the String from a ByteArray is guaranteed to
// produced properly formed UTF-8 sequences so that there is a one-to-one map
// between bytes and characters.
//
// Converting a ByteArray to a String proceeds by casting each byte in the
// array to a 16-bit quantity, treating that number as a Unicode character,
// and storing the UTF-8 version of that Unicode character in the String. For
// ByteArrays consisting entirely of values 1..127, the corresponding String
// representation is the same as the ByteArray representation.
//
// Converting a String to a ByteArray proceeds by getting the Unicode
// representation of each character in the String, casting it to a byte by
// truncating the upper 8 bits, and then storing the byte in the ByteArray.
// Converting from ByteArray to String and back to ByteArray is not lossy, but
// converting an arbitrary String to a ByteArray may be.

var XtclByteArrayType = Tcl_ObjType{
	Fname:             ts + 9852,
	FfreeIntRepProc:   0,
	FdupIntRepProc:    0,
	FupdateStringProc: 0,
	FsetFromAnyProc:   0,
} /* tclBinary.c:182:19 */

// The following structure is the internal rep for a ByteArray object. Keeps
// track of how much memory has been used and how much has been allocated for
// the byte array to enable growing and shrinking of the ByteArray object with
// fewer mallocs.

type ByteArray1 = struct {
	F__ccgo_pad1 [0]uint32
	Fused        int32
	Fallocated   int32
} /* tclBinary.c:197:9 */

// The following structure is the internal rep for a ByteArray object. Keeps
// track of how much memory has been used and how much has been allocated for
// the byte array to enable growing and shrinking of the ByteArray object with
// fewer mallocs.

type ByteArray = ByteArray1 /* tclBinary.c:205:3 */

//----------------------------------------------------------------------
//
// Tcl_NewByteArrayObj --
//
//	This procedure is creates a new ByteArray object and initializes it
//	from the given array of bytes.
//
// Results:
//	The newly create object is returned. This object will have no initial
//	string representation. The returned object has a ref count of 0.
//
// Side effects:
//	Memory allocated for new object and copy of byte array argument.
//
//----------------------------------------------------------------------

func XTcl_NewByteArrayObj(tls *libc.TLS, bytes uintptr, length int32) uintptr { /* tclBinary.c:235:9: */
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	XTcl_SetByteArrayObj(tls, objPtr, bytes, length)
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_DbNewByteArrayObj --
//
//	This procedure is normally called when debugging: i.e., when
//	TCL_MEM_DEBUG is defined. It is the same as the Tcl_NewByteArrayObj
//	above except that it calls Tcl_DbCkalloc directly with the file name
//	and line number from its caller. This simplifies debugging since then
//	the [memory active] command will report the correct file name and line
//	number when reporting objects that haven't been freed.
//
//	When TCL_MEM_DEBUG is not defined, this procedure just returns the
//	result of calling Tcl_NewByteArrayObj.
//
// Results:
//	The newly create object is returned. This object will have no initial
//	string representation. The returned object has a ref count of 0.
//
// Side effects:
//	Memory allocated for new object and copy of byte array argument.
//
//----------------------------------------------------------------------

func XTcl_DbNewByteArrayObj(tls *libc.TLS, bytes uintptr, length int32, file uintptr, line int32) uintptr { /* tclBinary.c:278:9: */
	return XTcl_NewByteArrayObj(tls, bytes, length)
}

//---------------------------------------------------------------------------
//
// Tcl_SetByteArrayObj --
//
//	Modify an object to be a ByteArray object and to have the specified
//	array of bytes as its value.
//
// Results:
//	None.
//
// Side effects:
//	The object's old string rep and internal rep is freed. Memory
//	allocated for copy of byte array argument.
//
//----------------------------------------------------------------------

func XTcl_SetByteArrayObj(tls *libc.TLS, objPtr uintptr, bytes uintptr, length int32) { /* tclBinary.c:319:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var byteArrayPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+9891))
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}

	if length < 0 {
		length = 0
	}
	byteArrayPtr = XTcl_Alloc(tls, uint32(int32(uintptr(0)+8)+length))
	(*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fused = length
	(*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fallocated = length

	if bytes != uintptr(0) && length > 0 {
		libc.Xmemcpy(tls, byteArrayPtr+8, bytes, uint64(length))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclByteArrayType))
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = byteArrayPtr
}

//----------------------------------------------------------------------
//
// Tcl_GetByteArrayFromObj --
//
//	Attempt to get the array of bytes from the Tcl object. If the object
//	is not already a ByteArray object, an attempt will be made to convert
//	it to one.
//
// Results:
//	Pointer to array of bytes representing the ByteArray object.
//
// Side effects:
//	Frees old internal rep. Allocates memory for new internal rep.
//
//----------------------------------------------------------------------

func XTcl_GetByteArrayFromObj(tls *libc.TLS, objPtr uintptr, lengthPtr uintptr) uintptr { /* tclBinary.c:366:15: */
	var baPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclByteArrayType)) {
		sSetByteArrayFromAny(tls, uintptr(0), objPtr)
	}
	baPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if lengthPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(lengthPtr)) = (*ByteArray)(unsafe.Pointer(baPtr)).Fused
	}
	return baPtr + 8 /* &.bytes */
}

//----------------------------------------------------------------------
//
// Tcl_SetByteArrayLength --
//
//	This procedure changes the length of the byte array for this object.
//	Once the caller has set the length of the array, it is acceptable to
//	directly modify the bytes in the array up until Tcl_GetStringFromObj()
//	has been called on this object.
//
// Results:
//	The new byte array of the specified length.
//
// Side effects:
//	Allocates enough memory for an array of bytes of the requested size.
//	When growing the array, the old array is copied to the new array; new
//	bytes are undefined. When shrinking, the old array is truncated to the
//	specified length.
//
//----------------------------------------------------------------------

func XTcl_SetByteArrayLength(tls *libc.TLS, objPtr uintptr, length int32) uintptr { /* tclBinary.c:407:15: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var byteArrayPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+9911))
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclByteArrayType)) {
		sSetByteArrayFromAny(tls, uintptr(0), objPtr)
	}

	byteArrayPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	if length > (*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fallocated {
		byteArrayPtr = XTcl_Realloc(tls, byteArrayPtr, uint32(int32(uintptr(0)+8)+length))
		(*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fallocated = length
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = byteArrayPtr
	}
	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	(*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fused = length
	return byteArrayPtr + 8 /* &.bytes */
}

//----------------------------------------------------------------------
//
// SetByteArrayFromAny --
//
//	Generate the ByteArray internal rep from the string rep.
//
// Results:
//	The return value is always TCL_OK.
//
// Side effects:
//	A ByteArray object is stored as the internal rep of objPtr.
//
//----------------------------------------------------------------------

func sSetByteArrayFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclBinary.c:449:1: */
	bp := tls.Alloc(6)
	defer tls.Free(6)

	// var length int32 at bp, 4

	var src uintptr
	var srcEnd uintptr
	var dst uintptr
	var byteArrayPtr uintptr
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */)) = Tcl_UniChar(0)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclByteArrayType)) {
		src = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, objPtr, bp)
		}()
		srcEnd = src + uintptr(*(*int32)(unsafe.Pointer(bp)))

		byteArrayPtr = XTcl_Alloc(tls, uint32(int32(uintptr(0)+8)+*(*int32)(unsafe.Pointer(bp))))
		for dst = byteArrayPtr + 8; /* &.bytes */ src < srcEnd; {
			src += func() uintptr {
				if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
					return uintptr(func() int32 {
						*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
						return 1
					}())
				}
				return uintptr(XTcl_UtfToUniChar(tls, src, bp+4))
			}()
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)))
		}

		(*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fused = int32(int64((dst - (byteArrayPtr + 8)) / 1))
		(*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fallocated = *(*int32)(unsafe.Pointer(bp /* length */))

		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}

		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclByteArrayType))
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = byteArrayPtr
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FreeByteArrayInternalRep --
//
//	Deallocate the storage associated with a ByteArray data object's
//	internal representation.
//
// Results:
//	None.
//
// Side effects:
//	Frees memory.
//
//----------------------------------------------------------------------

func sFreeByteArrayInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclBinary.c:497:1: */
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(objPtr + 32)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DupByteArrayInternalRep --
//
//	Initialize the internal representation of a ByteArray Tcl_Obj to a
//	copy of the internal representation of an existing ByteArray object.
//
// Results:
//	None.
//
// Side effects:
//	Allocates memory.
//
//----------------------------------------------------------------------

func sDupByteArrayInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclBinary.c:522:1: */
	var length int32
	var srcArrayPtr uintptr
	var copyArrayPtr uintptr

	srcArrayPtr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))
	length = (*ByteArray)(unsafe.Pointer(srcArrayPtr)).Fused

	copyArrayPtr = XTcl_Alloc(tls, uint32(int32(uintptr(0)+8)+length))
	(*ByteArray)(unsafe.Pointer(copyArrayPtr)).Fused = length
	(*ByteArray)(unsafe.Pointer(copyArrayPtr)).Fallocated = length
	libc.Xmemcpy(tls, copyArrayPtr+8, srcArrayPtr+8, uint64(length))
	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = copyArrayPtr

	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclByteArrayType))
}

//----------------------------------------------------------------------
//
// UpdateStringOfByteArray --
//
//	Update the string representation for a ByteArray data object. Note:
//	This procedure does not invalidate an existing old string rep so
//	storage will be lost if this has not already been done.
//
// Results:
//	None.
//
// Side effects:
//	The object's string is set to a valid string that results from the
//	ByteArray-to-string conversion.
//
//	The object becomes a string object -- the internal rep is discarded
//	and the typePtr becomes NULL.
//
//----------------------------------------------------------------------

func sUpdateStringOfByteArray(tls *libc.TLS, objPtr uintptr) { /* tclBinary.c:564:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var i int32
	var length int32
	var size int32
	var src uintptr
	var dst uintptr
	var byteArrayPtr uintptr

	byteArrayPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	src = byteArrayPtr + 8 /* &.bytes */
	length = (*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fused

	// How much space will string rep need?

	size = length
	for i = 0; i < length && size >= 0; i++ {
		if int32(*(*uint8)(unsafe.Pointer(src + uintptr(i)))) == 0 || int32(*(*uint8)(unsafe.Pointer(src + uintptr(i)))) > 127 {
			size++
		}
	}
	if size < 0 {
		XTcl_Panic(tls, ts+9934, libc.VaList(bp, 0x7fffffff))
	}

	dst = XTcl_Alloc(tls, uint32(size+1))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = dst
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = size

	if size == length {
		libc.Xmemcpy(tls, dst, src, uint64(size))
		*(*int8)(unsafe.Pointer(dst + uintptr(size))) = int8(0)
	} else {
		for i = 0; i < length; i++ {
			dst += uintptr(XTcl_UniCharToUtf(tls, int32(*(*uint8)(unsafe.Pointer(src + uintptr(i)))), dst))
		}
		*(*int8)(unsafe.Pointer(dst)) = int8(0)
	}
}

//----------------------------------------------------------------------
//
// TclAppendBytesToByteArray --
//
//	This function appends an array of bytes to a byte array object. Note
//	that the object *must* be unshared, and the array of bytes *must not*
//	refer to the object being appended to.
//
// Results:
//	None.
//
// Side effects:
//	Allocates enough memory for an array of bytes of the requested total
//	size, or possibly larger. [Bug 2992970]
//
//----------------------------------------------------------------------

func XTclAppendBytesToByteArray(tls *libc.TLS, objPtr uintptr, bytes uintptr, len int32) { /* tclBinary.c:626:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var byteArrayPtr uintptr
	var needed int32

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+9979))
	}
	if len < 0 {
		XTcl_Panic(tls, ts+10005,
			libc.VaList(bp+8, ts+9979))
	}
	if len == 0 {
		// Append zero bytes is a no-op.

		return
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclByteArrayType)) {
		sSetByteArrayFromAny(tls, uintptr(0), objPtr)
	}
	byteArrayPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if len > 0x7fffffff-(*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fused {
		XTcl_Panic(tls, ts+9934, libc.VaList(bp+16, 0x7fffffff))
	}

	needed = (*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fused + len
	// If we need to, resize the allocated space in the byte array.

	if needed > (*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fallocated {
		var ptr uintptr = uintptr(0)
		var attempt int32

		if needed <= 0x7fffffff/2 {
			// Try to allocate double the total space that is needed.

			attempt = 2 * needed
			ptr = XTclpRealloc(tls, byteArrayPtr, uint32(int32(uintptr(0)+8)+attempt))
		}
		if ptr == uintptr(0) {
			// Try to allocate double the increment that is needed (plus).

			var limit uint32 = uint32(0x7fffffff - needed)
			var extra uint32 = uint32(len + TCL_MIN_GROWTH)
			var growth int32 = func() int32 {
				if extra > limit {
					return int32(limit)
				}
				return int32(extra)
			}()

			attempt = needed + growth
			ptr = XTclpRealloc(tls, byteArrayPtr, uint32(int32(uintptr(0)+8)+attempt))
		}
		if ptr == uintptr(0) {
			// Last chance: Try to allocate exactly what is needed.

			attempt = needed
			ptr = XTcl_Realloc(tls, byteArrayPtr, uint32(int32(uintptr(0)+8)+attempt))
		}
		byteArrayPtr = ptr
		(*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fallocated = attempt
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = byteArrayPtr
	}

	if bytes != 0 {
		libc.Xmemcpy(tls, byteArrayPtr+8+uintptr((*ByteArray)(unsafe.Pointer(byteArrayPtr)).Fused), bytes, uint64(len))
	}
	*(*int32)(unsafe.Pointer(byteArrayPtr)) += len
	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
}

//----------------------------------------------------------------------
//
// TclInitBinaryCmd --
//
//	This function is called to create the "binary" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A command token for the new command.
//
// Side effects:
//	Creates a new binary command as a mapped ensemble.
//
//----------------------------------------------------------------------

func XTclInitBinaryCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclBinary.c:724:1: */
	var binaryEnsemble Tcl_Command

	binaryEnsemble = XTclMakeEnsemble(tls, interp, ts+10063, uintptr(unsafe.Pointer(&binaryMap)))
	XTclMakeEnsemble(tls, interp, ts+10070, uintptr(unsafe.Pointer(&encodeMap)))
	XTclMakeEnsemble(tls, interp, ts+10084, uintptr(unsafe.Pointer(&decodeMap)))
	return binaryEnsemble
}

//----------------------------------------------------------------------
//
// BinaryFormatCmd --
//
//	This procedure implements the "binary format" Tcl command.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sBinaryFormatCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBinary.c:752:1: */
	bp := tls.Alloc(100)
	defer tls.Free(100)

	var arg int32   // Index of next argument to consume.
	var value int32 // Current integer value to be packed.
	// Initialized to avoid compiler warning.
	// var cmd int8 at bp+32, 1
	// Current format character.
	// var count int32 at bp+36, 4
	// Count associated with current format
	// character.
	// var flags int32 at bp+40, 4
	// Format field flags
	// var format uintptr at bp+24, 8
	// Pointer to current position in format
	// string.
	var resultPtr uintptr // Object holding result buffer.
	var buffer uintptr    // Start of result buffer.
	// var cursor uintptr at bp+80, 8
	// Current position within result buffer.
	var maxPos uintptr // Greatest position within result buffer that
	// cursor has visited.
	var errorString uintptr
	var errorValue uintptr
	var str uintptr
	var offset int32
	var size int32
	// var length int32 at bp+60, 4

	// var listc int32 at bp+56, 4

	// var listv uintptr at bp+48, 8

	var pad int8
	var bytes uintptr
	var _objPtr uintptr
	var _objPtr1 uintptr
	var last uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var last1 uintptr
	var c int32
	var _objPtr4 uintptr
	// var listc1 int32 at bp+72, 4

	var i int32
	// var listv1 uintptr at bp+64, 8

	// var ch int32 at bp+88, 4

	// var buf [8]int8 at bp+92, 8
	value = 0
	resultPtr = uintptr(0)

	if !(objc < 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10098)
	return TCL_ERROR
__1:
	;

	// To avoid copying the data, we format the string in two passes. The
	// first pass computes the size of the output buffer. The second pass
	// places the formatted data into the buffer.

	*(*uintptr)(unsafe.Pointer(bp + 24 /* format */)) = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	arg = 2
	offset = 0
	*(*int32)(unsafe.Pointer(bp + 60 /* length */)) = 0
__2:
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24))))) != 0) {
		goto __3
	}
	str = *(*uintptr)(unsafe.Pointer(bp + 24 /* format */))
	*(*int32)(unsafe.Pointer(bp + 40 /* flags */)) = 0
	if !!(sGetFormatSpec(tls, bp+24, bp+32, bp+36, bp+40) != 0) {
		goto __4
	}
	goto __3
__4:
	;
	switch int32(*(*int8)(unsafe.Pointer(bp + 32 /* cmd */))) {
	case 'a':
		goto __6
	case 'A':
		goto __7
	case 'b':
		goto __8
	case 'B':
		goto __9
	case 'h':
		goto __10
	case 'H':
		goto __11
	case 'c':
		goto __12
	case 't':
		goto __13
	case 's':
		goto __14
	case 'S':
		goto __15
	case 'n':
		goto __16
	case 'i':
		goto __17
	case 'I':
		goto __18
	case 'm':
		goto __19
	case 'w':
		goto __20
	case 'W':
		goto __21
	case 'r':
		goto __22
	case 'R':
		goto __23
	case 'f':
		goto __24
	case 'q':
		goto __25
	case 'Q':
		goto __26
	case 'd':
		goto __27

	case 'x':
		goto __28
	case 'X':
		goto __29
	case '@':
		goto __30
	default:
		goto __31
	}
	goto __5
__6:
__7:
__8:
__9:
__10:
__11:
	// For string-type specifiers, the count corresponds to the number
	// of bytes in a single argument.

	if !(arg >= objc) {
		goto __32
	}
	goto badIndex
__32:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __33
	}
	XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)), bp+36)
	goto __34
__33:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __35
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
__35:
	;
__34:
	;
	arg++
	if !(int32(*(*int8)(unsafe.Pointer(bp + 32))) == 'a' || int32(*(*int8)(unsafe.Pointer(bp + 32))) == 'A') {
		goto __36
	}
	offset = offset + *(*int32)(unsafe.Pointer(bp + 36))
	goto __37
__36:
	if !(int32(*(*int8)(unsafe.Pointer(bp + 32))) == 'b' || int32(*(*int8)(unsafe.Pointer(bp + 32))) == 'B') {
		goto __38
	}
	offset = offset + (*(*int32)(unsafe.Pointer(bp + 36))+7)/8
	goto __39
__38:
	offset = offset + (*(*int32)(unsafe.Pointer(bp + 36))+1)/2
__39:
	;
__37:
	;
	goto __5
__12:
	size = 1
	goto doNumbers
__13:
__14:
__15:
	size = 2
	goto doNumbers
__16:
__17:
__18:
	size = 4
	goto doNumbers
__19:
__20:
__21:
	size = 8
	goto doNumbers
__22:
__23:
__24:
	size = int32(unsafe.Sizeof(float32(0)))
	goto doNumbers
__25:
__26:
__27:
	size = int32(unsafe.Sizeof(float64(0)))

doNumbers:
	if !(arg >= objc) {
		goto __40
	}
	goto badIndex
__40:
	;

	// For number-type specifiers, the count corresponds to the number
	// of elements in the list stored in a single argument. If no
	// count is specified, then the argument is taken as a single
	// non-list value.

	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __41
	}
	arg++
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
	goto __42
__41:

	// The macro evals its args more than once: avoid arg++

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 48)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 56)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)), bp+56, bp+48)
	}() != TCL_OK) {
		goto __43
	}
	return TCL_ERROR
__43:
	;
	arg++

	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __44
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = *(*int32)(unsafe.Pointer(bp + 56 /* listc */))
	goto __45
__44:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) > *(*int32)(unsafe.Pointer(bp + 56))) {
		goto __46
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+10121,
		-1))
	return TCL_ERROR
__46:
	;
__45:
	;
__42:
	;
	offset = offset + *(*int32)(unsafe.Pointer(bp + 36))*size
	goto __5

__28:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __47
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+10169, -1))
	return TCL_ERROR
	goto __48
__47:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __49
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
__49:
	;
__48:
	;
	offset = offset + *(*int32)(unsafe.Pointer(bp + 36))
	goto __5
__29:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __50
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
__50:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 36)) > offset || *(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __51
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = offset
__51:
	;
	if !(offset > *(*int32)(unsafe.Pointer(bp + 60))) {
		goto __52
	}
	*(*int32)(unsafe.Pointer(bp + 60 /* length */)) = offset
__52:
	;
	offset = offset - *(*int32)(unsafe.Pointer(bp + 36))
	goto __5
__30:
	if !(offset > *(*int32)(unsafe.Pointer(bp + 60))) {
		goto __53
	}
	*(*int32)(unsafe.Pointer(bp + 60 /* length */)) = offset
__53:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __54
	}
	offset = *(*int32)(unsafe.Pointer(bp + 60 /* length */))
	goto __55
__54:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __56
	}
	goto badCount
	goto __57
__56:
	offset = *(*int32)(unsafe.Pointer(bp + 36 /* count */))
__57:
	;
__55:
	;
	goto __5
__31:
	errorString = str
	goto badField
__5:
	;
	goto __2
__3:
	;
	if !(offset > *(*int32)(unsafe.Pointer(bp + 60))) {
		goto __58
	}
	*(*int32)(unsafe.Pointer(bp + 60 /* length */)) = offset
__58:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 60)) == 0) {
		goto __59
	}
	return TCL_OK
__59:
	;

	// Prepare the result object by preallocating the caclulated number of
	// bytes and filling with nulls.

	resultPtr = XTcl_NewObj(tls)
	buffer = XTcl_SetByteArrayLength(tls, resultPtr, *(*int32)(unsafe.Pointer(bp + 60 /* length */)))
	libc.Xmemset(tls, buffer, 0, uint64(*(*int32)(unsafe.Pointer(bp + 60 /* length */))))

	// Pack the data into the result object. Note that we can skip the error
	// checking during this pass, since we have already parsed the string
	// once.

	arg = 2
	*(*uintptr)(unsafe.Pointer(bp + 24 /* format */)) = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)) = buffer
	maxPos = *(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */))
__60:
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24))))) != 0) {
		goto __61
	}
	*(*int32)(unsafe.Pointer(bp + 40 /* flags */)) = 0
	if !!(sGetFormatSpec(tls, bp+24, bp+32, bp+36, bp+40) != 0) {
		goto __62
	}
	goto __61
__62:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == 0 && int32(*(*int8)(unsafe.Pointer(bp + 32))) != '@') {
		goto __63
	}
	if !(int32(*(*int8)(unsafe.Pointer(bp + 32))) != 'x') {
		goto __64
	}
	arg++
__64:
	;
	goto __60
__63:
	;
	switch int32(*(*int8)(unsafe.Pointer(bp + 32 /* cmd */))) {
	case 'a':
		goto __66
	case 'A':
		goto __67
	case 'b':
		goto __68
	case 'B':
		goto __69
	case 'h':
		goto __70
	case 'H':
		goto __71
	case 'c':
		goto __72
	case 't':
		goto __73
	case 's':
		goto __74
	case 'S':
		goto __75
	case 'n':
		goto __76
	case 'i':
		goto __77
	case 'I':
		goto __78
	case 'm':
		goto __79
	case 'w':
		goto __80
	case 'W':
		goto __81
	case 'r':
		goto __82
	case 'R':
		goto __83
	case 'd':
		goto __84
	case 'q':
		goto __85
	case 'Q':
		goto __86
	case 'f':
		goto __87
	case 'x':
		goto __88
	case 'X':
		goto __89
	case '@':
		goto __90
	}
	goto __65
__66:
__67:
	pad = func() int8 {
		if int32(*(*int8)(unsafe.Pointer(bp + 32))) == 'a' {
			return int8(0)
		}
		return int8(' ')
	}()

	bytes = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PostIncInt32(&arg, 1))*8)), bp+60)

	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __91
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = *(*int32)(unsafe.Pointer(bp + 60 /* length */))
	goto __92
__91:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __93
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
__93:
	;
__92:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 60)) >= *(*int32)(unsafe.Pointer(bp + 36))) {
		goto __94
	}
	libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), bytes, uint64(*(*int32)(unsafe.Pointer(bp + 36 /* count */))))
	goto __95
__94:
	libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), bytes, uint64(*(*int32)(unsafe.Pointer(bp + 60 /* length */))))
	libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer(bp + 80))+uintptr(*(*int32)(unsafe.Pointer(bp + 60))), int32(pad), uint64(*(*int32)(unsafe.Pointer(bp + 36))-*(*int32)(unsafe.Pointer(bp + 60))))
__95:
	;
	*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)) += uintptr(*(*int32)(unsafe.Pointer(bp + 36 /* count */)))
	goto __65

__68:
__69:

	str = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 60)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)), bp+60)
	}()
	arg++
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __96
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = *(*int32)(unsafe.Pointer(bp + 60 /* length */))
	goto __97
__96:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __98
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
__98:
	;
__97:
	;
	last = *(*uintptr)(unsafe.Pointer(bp + 80)) + uintptr((*(*int32)(unsafe.Pointer(bp + 36))+7)/8)
	if !(*(*int32)(unsafe.Pointer(bp + 36)) > *(*int32)(unsafe.Pointer(bp + 60))) {
		goto __99
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = *(*int32)(unsafe.Pointer(bp + 60 /* length */))
__99:
	;
	value = 0
	errorString = ts + 10063 /* "binary" */
	if !(int32(*(*int8)(unsafe.Pointer(bp + 32))) == 'B') {
		goto __100
	}
	offset = 0
__102:
	if !(offset < *(*int32)(unsafe.Pointer(bp + 36))) {
		goto __104
	}
	value <<= 1
	if !(int32(*(*int8)(unsafe.Pointer(str + uintptr(offset)))) == '1') {
		goto __105
	}
	value = value | 1
	goto __106
__105:
	if !(int32(*(*int8)(unsafe.Pointer(str + uintptr(offset)))) != '0') {
		goto __107
	}
	errorValue = str
__108:
	_objPtr = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __111
	}
	XTclFreeObj(tls, _objPtr)
__111:
	;
	goto __109
__109:
	if 0 != 0 {
		goto __108
	}
	goto __110
__110:
	;
	goto badValue
__107:
	;
__106:
	;
	if !((offset+1)%8 == 0) {
		goto __112
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), 1))) = uint8(value)
	value = 0
__112:
	;
	goto __103
__103:
	offset++
	goto __102
	goto __104
__104:
	;
	goto __101
__100:
	offset = 0
__113:
	if !(offset < *(*int32)(unsafe.Pointer(bp + 36))) {
		goto __115
	}
	value >>= 1
	if !(int32(*(*int8)(unsafe.Pointer(str + uintptr(offset)))) == '1') {
		goto __116
	}
	value = value | 128
	goto __117
__116:
	if !(int32(*(*int8)(unsafe.Pointer(str + uintptr(offset)))) != '0') {
		goto __118
	}
	errorValue = str
__119:
	_objPtr1 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __122
	}
	XTclFreeObj(tls, _objPtr1)
__122:
	;
	goto __120
__120:
	if 0 != 0 {
		goto __119
	}
	goto __121
__121:
	;
	goto badValue
__118:
	;
__117:
	;
	if !!((offset+1)%8 != 0) {
		goto __123
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), 1))) = uint8(value)
	value = 0
__123:
	;
	goto __114
__114:
	offset++
	goto __113
	goto __115
__115:
	;
__101:
	;
	if !(offset%8 != 0) {
		goto __124
	}
	if !(int32(*(*int8)(unsafe.Pointer(bp + 32))) == 'B') {
		goto __125
	}
	value <<= 8 - offset%8
	goto __126
__125:
	value >>= 8 - offset%8
__126:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), 1))) = uint8(value)
__124:
	;
__127:
	if !(*(*uintptr)(unsafe.Pointer(bp + 80)) < last) {
		goto __128
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), 1))) = uint8(0)
	goto __127
__128:
	;
	goto __65

__70:
__71:

	str = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 60)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)), bp+60)
	}()
	arg++
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __129
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = *(*int32)(unsafe.Pointer(bp + 60 /* length */))
	goto __130
__129:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __131
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
__131:
	;
__130:
	;
	last1 = *(*uintptr)(unsafe.Pointer(bp + 80)) + uintptr((*(*int32)(unsafe.Pointer(bp + 36))+1)/2)
	if !(*(*int32)(unsafe.Pointer(bp + 36)) > *(*int32)(unsafe.Pointer(bp + 60))) {
		goto __132
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = *(*int32)(unsafe.Pointer(bp + 60 /* length */))
__132:
	;
	value = 0
	errorString = ts + 10210 /* "hexadecimal" */
	if !(int32(*(*int8)(unsafe.Pointer(bp + 32))) == 'H') {
		goto __133
	}
	offset = 0
__135:
	if !(offset < *(*int32)(unsafe.Pointer(bp + 36))) {
		goto __137
	}
	value <<= 4
	if !!(libc.Xisxdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(str + uintptr(offset)))))) != 0) {
		goto __138
	} // INTL: digit
	errorValue = str
__139:
	_objPtr2 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __142
	}
	XTclFreeObj(tls, _objPtr2)
__142:
	;
	goto __140
__140:
	if 0 != 0 {
		goto __139
	}
	goto __141
__141:
	;
	goto badValue
__138:
	;
	c = int32(*(*int8)(unsafe.Pointer(str + uintptr(offset)))) - '0'
	if !(c > 9) {
		goto __143
	}
	c = c + ('0' - 'A' + 10)
__143:
	;
	if !(c > 16) {
		goto __144
	}
	c = c + ('A' - 'a')
__144:
	;
	value = value | c&0xF
	if !(offset%2 != 0) {
		goto __145
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), 1))) = uint8(int8(value))
	value = 0
__145:
	;
	goto __136
__136:
	offset++
	goto __135
	goto __137
__137:
	;
	goto __134
__133:
	offset = 0
__146:
	if !(offset < *(*int32)(unsafe.Pointer(bp + 36))) {
		goto __148
	}
	value >>= 4

	if !!(libc.Xisxdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(str + uintptr(offset)))))) != 0) {
		goto __149
	} // INTL: digit
	errorValue = str
__150:
	_objPtr3 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __153
	}
	XTclFreeObj(tls, _objPtr3)
__153:
	;
	goto __151
__151:
	if 0 != 0 {
		goto __150
	}
	goto __152
__152:
	;
	goto badValue
__149:
	;
	c = int32(*(*int8)(unsafe.Pointer(str + uintptr(offset)))) - '0'
	if !(c > 9) {
		goto __154
	}
	c = c + ('0' - 'A' + 10)
__154:
	;
	if !(c > 16) {
		goto __155
	}
	c = c + ('A' - 'a')
__155:
	;
	value = value | c<<4&0xF0
	if !(offset%2 != 0) {
		goto __156
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), 1))) = uint8(value & 0xFF)
	value = 0
__156:
	;
	goto __147
__147:
	offset++
	goto __146
	goto __148
__148:
	;
__134:
	;
	if !(offset%2 != 0) {
		goto __157
	}
	if !(int32(*(*int8)(unsafe.Pointer(bp + 32))) == 'H') {
		goto __158
	}
	value <<= 4
	goto __159
__158:
	value >>= 4
__159:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), 1))) = uint8(value)
__157:
	;

__160:
	if !(*(*uintptr)(unsafe.Pointer(bp + 80)) < last1) {
		goto __161
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), 1))) = uint8(0)
	goto __160
__161:
	;
	goto __65

__72:
__73:
__74:
__75:
__76:
__77:
__78:
__79:
__80:
__81:
__82:
__83:
__84:
__85:
__86:
__87:

	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __162
	}
	// Note that we are casting away the const-ness of objv, but
	// this is safe since we aren't going to modify the array.

	*(*uintptr)(unsafe.Pointer(bp + 64 /* listv1 */)) = objv + uintptr(arg)*8
	*(*int32)(unsafe.Pointer(bp + 72 /* listc1 */)) = 1
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
	goto __163
__162:
	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 64)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)) + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 72)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)) + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)), bp+72, bp+64)
	}
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __164
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = *(*int32)(unsafe.Pointer(bp + 72 /* listc1 */))
__164:
	;
__163:
	;
	arg++
	i = 0
__165:
	if !(i < *(*int32)(unsafe.Pointer(bp + 36))) {
		goto __167
	}
	if !(sFormatNumber(tls, interp, int32(*(*int8)(unsafe.Pointer(bp + 32))), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)) + uintptr(i)*8)), bp+80) != TCL_OK) {
		goto __168
	}
__169:
	_objPtr4 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __172
	}
	XTclFreeObj(tls, _objPtr4)
__172:
	;
	goto __170
__170:
	if 0 != 0 {
		goto __169
	}
	goto __171
__171:
	;
	return TCL_ERROR
__168:
	;
	goto __166
__166:
	i++
	goto __165
	goto __167
__167:
	;
	goto __65

__88:
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __173
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
__173:
	;
	libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)), 0, uint64(*(*int32)(unsafe.Pointer(bp + 36 /* count */))))
	*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)) += uintptr(*(*int32)(unsafe.Pointer(bp + 36 /* count */)))
	goto __65
__89:
	if !(*(*uintptr)(unsafe.Pointer(bp + 80)) > maxPos) {
		goto __174
	}
	maxPos = *(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */))
__174:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -2) {
		goto __175
	}
	*(*int32)(unsafe.Pointer(bp + 36 /* count */)) = 1
__175:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1 || int64(*(*int32)(unsafe.Pointer(bp + 36))) > (int64(*(*uintptr)(unsafe.Pointer(bp + 80)))-int64(buffer))/1) {
		goto __176
	}
	*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)) = buffer
	goto __177
__176:
	*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)) -= uintptr(*(*int32)(unsafe.Pointer(bp + 36 /* count */)))
__177:
	;
	goto __65
__90:
	if !(*(*uintptr)(unsafe.Pointer(bp + 80)) > maxPos) {
		goto __178
	}
	maxPos = *(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */))
__178:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 36)) == -1) {
		goto __179
	}
	*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)) = maxPos
	goto __180
__179:
	*(*uintptr)(unsafe.Pointer(bp + 80 /* cursor */)) = buffer + uintptr(*(*int32)(unsafe.Pointer(bp + 36)))
__180:
	;
	goto __65
__65:
	;
	goto __60
__61:
	;
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK

badValue:
	XTcl_ResetResult(tls, interp)
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+10222,
		libc.VaList(bp, errorString, errorValue)))
	return TCL_ERROR

badCount:
	errorString = ts + 10262 /* "missing count fo..." */
	goto error

badIndex:
	errorString = ts + 10300 /* "not enough argum..." */
	goto error

badField:

	*(*[8]int8)(unsafe.Pointer(bp + 92 /* buf */)) = *(*[8]int8)(unsafe.Pointer(ts + 10347))

	XTclUtfToUCS4(tls, errorString, bp+88)
	*(*int8)(unsafe.Pointer(bp + 92 + uintptr(XTclUCS4ToUtf(tls, *(*int32)(unsafe.Pointer(bp + 88 /* ch */)), bp+92)))) = int8(0)
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+10355, libc.VaList(bp+16, bp+92)))
	return TCL_ERROR

error:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, errorString, -1))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// BinaryScanCmd --
//
//	This procedure implements the "binary scan" Tcl command.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XBinaryScanCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBinary.c:1257:1: */
	bp := tls.Alloc(148)
	defer tls.Free(148)

	var arg int32   // Index of next argument to consume.
	var value int32 // Current integer value to be packed.
	// Initialized to avoid compiler warning.
	// var cmd int8 at bp+112, 1
	// Current format character.
	// var count int32 at bp+116, 4
	// Count associated with current format
	// character.
	// var flags int32 at bp+120, 4
	// Format field flags
	// var format uintptr at bp+104, 8
	// Pointer to current position in format
	// string.
	var resultPtr uintptr // Object holding result buffer.
	var buffer uintptr    // Start of result buffer.
	var errorString uintptr
	var str uintptr
	var offset int32
	var size int32
	// var length int32 at bp+96, 4

	var i int32
	var valuePtr uintptr
	var elementPtr uintptr
	// var numberCacheHash Tcl_HashTable at bp+8, 88

	// var numberCachePtr uintptr at bp+128, 8

	var src uintptr
	var src1 uintptr
	var dest uintptr
	var dest1 uintptr
	var src2 uintptr
	var src3 uintptr
	// var ch int32 at bp+136, 4

	// var buf [8]int8 at bp+140, 8
	value = 0
	resultPtr = uintptr(0)

	if !(objc < 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+10380)
	return TCL_ERROR
__1:
	;
	*(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)) = bp + 8 /* &numberCacheHash */
	XTcl_InitHashTable(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)), 1)
	buffer = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+96)
	*(*uintptr)(unsafe.Pointer(bp + 104 /* format */)) = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	arg = 3
	offset = 0
__2:
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104))))) != 0) {
		goto __3
	}
	str = *(*uintptr)(unsafe.Pointer(bp + 104 /* format */))
	*(*int32)(unsafe.Pointer(bp + 120 /* flags */)) = 0
	if !!(sGetFormatSpec(tls, bp+104, bp+112, bp+116, bp+120) != 0) {
		goto __4
	}
	goto done
__4:
	;
	switch int32(*(*int8)(unsafe.Pointer(bp + 112 /* cmd */))) {
	case 'a':
		goto __6
	case 'A':
		goto __7
	case 'b':
		goto __8
	case 'B':
		goto __9
	case 'h':
		goto __10
	case 'H':
		goto __11
	case 'c':
		goto __12
	case 't':
		goto __13
	case 's':
		goto __14
	case 'S':
		goto __15
	case 'n':
		goto __16
	case 'i':
		goto __17
	case 'I':
		goto __18
	case 'm':
		goto __19
	case 'w':
		goto __20
	case 'W':
		goto __21
	case 'r':
		goto __22
	case 'R':
		goto __23
	case 'f':
		goto __24
	case 'q':
		goto __25
	case 'Q':
		goto __26
	case 'd':
		goto __27
	case 'x':
		goto __28
	case 'X':
		goto __29
	case '@':
		goto __30
	default:
		goto __31
	}
	goto __5
__6:
__7:

	if !(arg >= objc) {
		goto __32
	}
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	goto badIndex
__32:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -1) {
		goto __33
	}
	*(*int32)(unsafe.Pointer(bp + 116 /* count */)) = *(*int32)(unsafe.Pointer(bp + 96)) - offset
	goto __34
__33:
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -2) {
		goto __35
	}
	*(*int32)(unsafe.Pointer(bp + 116 /* count */)) = 1
__35:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) > *(*int32)(unsafe.Pointer(bp + 96))-offset) {
		goto __36
	}
	goto done
__36:
	;
__34:
	;

	src = buffer + uintptr(offset)
	size = *(*int32)(unsafe.Pointer(bp + 116 /* count */))

	// Trim trailing nulls and spaces, if necessary.

	if !(int32(*(*int8)(unsafe.Pointer(bp + 112))) == 'A') {
		goto __37
	}
__38:
	if !(size > 0) {
		goto __39
	}
	if !(int32(*(*uint8)(unsafe.Pointer(src + uintptr(size-1)))) != 0 && int32(*(*uint8)(unsafe.Pointer(src + uintptr(size-1)))) != ' ') {
		goto __40
	}
	goto __39
__40:
	;
	size--
	goto __38
__39:
	;
__37:
	;

	// Have to do this #ifdef-fery because (as part of defining
	// Tcl_NewByteArrayObj) we removed the #def that hides this stuff
	// normally. If this code ever gets copied to another file, it
	// should be changed back to the simpler version.

	valuePtr = XTcl_NewByteArrayObj(tls, src, size)

	resultPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)), uintptr(0), valuePtr,
		TCL_LEAVE_ERR_MSG)
	arg++
	if !(resultPtr == uintptr(0)) {
		goto __41
	}
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	return TCL_ERROR
__41:
	;
	offset = offset + *(*int32)(unsafe.Pointer(bp + 116))
	goto __5

__8:
__9:

	if !(arg >= objc) {
		goto __42
	}
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	goto badIndex
__42:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -1) {
		goto __43
	}
	*(*int32)(unsafe.Pointer(bp + 116 /* count */)) = (*(*int32)(unsafe.Pointer(bp + 96)) - offset) * 8
	goto __44
__43:
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -2) {
		goto __45
	}
	*(*int32)(unsafe.Pointer(bp + 116 /* count */)) = 1
__45:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) > (*(*int32)(unsafe.Pointer(bp + 96))-offset)*8) {
		goto __46
	}
	goto done
__46:
	;
__44:
	;
	src1 = buffer + uintptr(offset)
	valuePtr = XTcl_NewObj(tls)
	XTcl_SetObjLength(tls, valuePtr, *(*int32)(unsafe.Pointer(bp + 116 /* count */)))
	dest = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes
		}
		return XTcl_GetString(tls, valuePtr)
	}()

	if !(int32(*(*int8)(unsafe.Pointer(bp + 112))) == 'b') {
		goto __47
	}
	i = 0
__49:
	if !(i < *(*int32)(unsafe.Pointer(bp + 116))) {
		goto __51
	}
	if !(i%8 != 0) {
		goto __52
	}
	value >>= 1
	goto __53
__52:
	value = int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&src1, 1))))
__53:
	;
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dest, 1))) = func() int8 {
		if value&1 != 0 {
			return int8('1')
		}
		return int8('0')
	}()
	goto __50
__50:
	i++
	goto __49
	goto __51
__51:
	;
	goto __48
__47:
	i = 0
__54:
	if !(i < *(*int32)(unsafe.Pointer(bp + 116))) {
		goto __56
	}
	if !(i%8 != 0) {
		goto __57
	}
	value <<= 1
	goto __58
__57:
	value = int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&src1, 1))))
__58:
	;
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dest, 1))) = func() int8 {
		if value&0x80 != 0 {
			return int8('1')
		}
		return int8('0')
	}()
	goto __55
__55:
	i++
	goto __54
	goto __56
__56:
	;
__48:
	;

	resultPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)), uintptr(0), valuePtr,
		TCL_LEAVE_ERR_MSG)
	arg++
	if !(resultPtr == uintptr(0)) {
		goto __59
	}
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	return TCL_ERROR
__59:
	;
	offset = offset + (*(*int32)(unsafe.Pointer(bp + 116))+7)/8
	goto __5

__10:
__11:

	if !(arg >= objc) {
		goto __60
	}
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	goto badIndex
__60:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -1) {
		goto __61
	}
	*(*int32)(unsafe.Pointer(bp + 116 /* count */)) = (*(*int32)(unsafe.Pointer(bp + 96)) - offset) * 2
	goto __62
__61:
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -2) {
		goto __63
	}
	*(*int32)(unsafe.Pointer(bp + 116 /* count */)) = 1
__63:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) > (*(*int32)(unsafe.Pointer(bp + 96))-offset)*2) {
		goto __64
	}
	goto done
__64:
	;
__62:
	;
	src2 = buffer + uintptr(offset)
	valuePtr = XTcl_NewObj(tls)
	XTcl_SetObjLength(tls, valuePtr, *(*int32)(unsafe.Pointer(bp + 116 /* count */)))
	dest1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes
		}
		return XTcl_GetString(tls, valuePtr)
	}()

	if !(int32(*(*int8)(unsafe.Pointer(bp + 112))) == 'h') {
		goto __65
	}
	i = 0
__67:
	if !(i < *(*int32)(unsafe.Pointer(bp + 116))) {
		goto __69
	}
	if !(i%2 != 0) {
		goto __70
	}
	value >>= 4
	goto __71
__70:
	value = int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&src2, 1))))
__71:
	;
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dest1, 1))) = hexdigit[value&0xF]
	goto __68
__68:
	i++
	goto __67
	goto __69
__69:
	;
	goto __66
__65:
	i = 0
__72:
	if !(i < *(*int32)(unsafe.Pointer(bp + 116))) {
		goto __74
	}
	if !(i%2 != 0) {
		goto __75
	}
	value <<= 4
	goto __76
__75:
	value = int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&src2, 1))))
__76:
	;
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dest1, 1))) = hexdigit[value>>4&0xF]
	goto __73
__73:
	i++
	goto __72
	goto __74
__74:
	;
__66:
	;

	resultPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)), uintptr(0), valuePtr,
		TCL_LEAVE_ERR_MSG)
	arg++
	if !(resultPtr == uintptr(0)) {
		goto __77
	}
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	return TCL_ERROR
__77:
	;
	offset = offset + (*(*int32)(unsafe.Pointer(bp + 116))+1)/2
	goto __5

__12:
	size = 1
	goto scanNumber
__13:
__14:
__15:
	size = 2
	goto scanNumber
__16:
__17:
__18:
	size = 4
	goto scanNumber
__19:
__20:
__21:
	size = 8
	goto scanNumber
__22:
__23:
__24:
	size = int32(unsafe.Sizeof(float32(0)))
	goto scanNumber
__25:
__26:
__27:

	size = int32(unsafe.Sizeof(float64(0)))
	// fall through

scanNumber:
	if !(arg >= objc) {
		goto __78
	}
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	goto badIndex
__78:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -2) {
		goto __79
	}
	if !(*(*int32)(unsafe.Pointer(bp + 96))-offset < size) {
		goto __81
	}
	goto done
__81:
	;
	valuePtr = sScanNumber(tls, buffer+uintptr(offset), int32(*(*int8)(unsafe.Pointer(bp + 112 /* cmd */))), *(*int32)(unsafe.Pointer(bp + 120 /* flags */)),
		bp+128)
	offset = offset + size
	goto __80
__79:
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -1) {
		goto __82
	}
	*(*int32)(unsafe.Pointer(bp + 116 /* count */)) = (*(*int32)(unsafe.Pointer(bp + 96)) - offset) / size
__82:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 96))-offset < *(*int32)(unsafe.Pointer(bp + 116))*size) {
		goto __83
	}
	goto done
__83:
	;
	valuePtr = XTcl_NewObj(tls)
	src3 = buffer + uintptr(offset)
	i = 0
__84:
	if !(i < *(*int32)(unsafe.Pointer(bp + 116))) {
		goto __86
	}
	elementPtr = sScanNumber(tls, src3, int32(*(*int8)(unsafe.Pointer(bp + 112 /* cmd */))), *(*int32)(unsafe.Pointer(bp + 120 /* flags */)), bp+128)
	src3 += uintptr(size)
	XTcl_ListObjAppendElement(tls, uintptr(0), valuePtr, elementPtr)
	goto __85
__85:
	i++
	goto __84
	goto __86
__86:
	;
	offset = offset + *(*int32)(unsafe.Pointer(bp + 116))*size
__80:
	;

	resultPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(arg)*8)), uintptr(0), valuePtr,
		TCL_LEAVE_ERR_MSG)
	arg++
	if !(resultPtr == uintptr(0)) {
		goto __87
	}
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	return TCL_ERROR
__87:
	;
	goto __5

__28:
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -2) {
		goto __88
	}
	*(*int32)(unsafe.Pointer(bp + 116 /* count */)) = 1
__88:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -1 || *(*int32)(unsafe.Pointer(bp + 116)) > *(*int32)(unsafe.Pointer(bp + 96))-offset) {
		goto __89
	}
	offset = *(*int32)(unsafe.Pointer(bp + 96 /* length */))
	goto __90
__89:
	offset = offset + *(*int32)(unsafe.Pointer(bp + 116))
__90:
	;
	goto __5
__29:
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -2) {
		goto __91
	}
	*(*int32)(unsafe.Pointer(bp + 116 /* count */)) = 1
__91:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -1 || *(*int32)(unsafe.Pointer(bp + 116)) > offset) {
		goto __92
	}
	offset = 0
	goto __93
__92:
	offset = offset - *(*int32)(unsafe.Pointer(bp + 116))
__93:
	;
	goto __5
__30:
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -2) {
		goto __94
	}
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	goto badCount
__94:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 116)) == -1 || *(*int32)(unsafe.Pointer(bp + 116)) > *(*int32)(unsafe.Pointer(bp + 96))) {
		goto __95
	}
	offset = *(*int32)(unsafe.Pointer(bp + 96 /* length */))
	goto __96
__95:
	offset = *(*int32)(unsafe.Pointer(bp + 116 /* count */))
__96:
	;
	goto __5
__31:
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))
	errorString = str
	goto badField
__5:
	;
	goto __2
__3:
	;

	// Set the result to the last position of the cursor.

done:
	XTcl_SetObjResult(tls, interp, XTcl_NewLongObj(tls, int32(arg-3)))
	sDeleteScanNumberCache(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* numberCachePtr */)))

	return TCL_OK

badCount:
	errorString = ts + 10262 /* "missing count fo..." */
	goto error

badIndex:
	errorString = ts + 10300 /* "not enough argum..." */
	goto error

badField:

	*(*[8]int8)(unsafe.Pointer(bp + 140 /* buf */)) = *(*[8]int8)(unsafe.Pointer(ts + 10347))

	XTclUtfToUCS4(tls, errorString, bp+136)
	*(*int8)(unsafe.Pointer(bp + 140 + uintptr(XTclUCS4ToUtf(tls, *(*int32)(unsafe.Pointer(bp + 136 /* ch */)), bp+140)))) = int8(0)
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+10355, libc.VaList(bp, bp+140)))
	return TCL_ERROR

error:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, errorString, -1))
	return TCL_ERROR
}

var hexdigit = *(*[17]int8)(unsafe.Pointer(ts + 10413)) /* tclBinary.c:1417:24 */

//----------------------------------------------------------------------
//
// GetFormatSpec --
//
//	This function parses the format strings used in the binary format and
//	scan commands.
//
// Results:
//	Moves the formatPtr to the start of the next command. Returns the
//	current command character and count in cmdPtr and countPtr. The count
//	is set to BINARY_ALL if the count character was '*' or BINARY_NOCOUNT
//	if no count was specified. Returns 1 on success, or 0 if the string
//	did not have a format specifier.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetFormatSpec(tls *libc.TLS, formatPtr uintptr, cmdPtr uintptr, countPtr uintptr, flagsPtr uintptr) int32 { /* tclBinary.c:1632:1: */
	// Skip any leading blanks.

	for int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(formatPtr))))) == ' ' {
		*(*uintptr)(unsafe.Pointer(formatPtr))++
	}

	// The string was empty, except for whitespace, so fail.

	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(formatPtr))))) != 0) {
		return 0
	}

	// Extract the command character and any trailing digits or '*'.

	*(*int8)(unsafe.Pointer(cmdPtr)) = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(formatPtr))))
	*(*uintptr)(unsafe.Pointer(formatPtr))++
	if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(formatPtr))))) == 'u' {
		*(*uintptr)(unsafe.Pointer(formatPtr))++
		*(*int32)(unsafe.Pointer(flagsPtr)) |= BINARY_UNSIGNED
	}
	if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(formatPtr))))) == '*' {
		*(*uintptr)(unsafe.Pointer(formatPtr))++
		*(*int32)(unsafe.Pointer(countPtr)) = -1
	} else if libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(formatPtr))))))) != 0 { // INTL: digit
		var count uint32

		*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = 0
		count = libc.Xstrtoul(tls, *(*uintptr)(unsafe.Pointer(formatPtr)), formatPtr, 10)
		if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) != 0 || count > uint32(0x7fffffff) {
			*(*int32)(unsafe.Pointer(countPtr)) = 0x7fffffff
		} else {
			*(*int32)(unsafe.Pointer(countPtr)) = int32(count)
		}
	} else {
		*(*int32)(unsafe.Pointer(countPtr)) = -2
	}
	return 1
}

//----------------------------------------------------------------------
//
// NeedReversing --
//
//	This routine determines, if bytes of a number need to be re-ordered,
//	and returns a numeric code indicating the re-ordering to be done.
//	This depends on the endiannes of the machine and the desired format.
//	It is in effect a table (whose contents depend on the endianness of
//	the system) describing whether a value needs reversing or not. Anyone
//	porting the code to a big-endian platform should take care to make
//	sure that they define WORDS_BIGENDIAN though this is already done by
//	configure for the Unix build; little-endian platforms (including
//	Windows) don't need to do anything.
//
// Results:
//	0	No re-ordering needed.
//	1	Reverse the bytes:	01234567 <-> 76543210 (little to big)
//	2	Apply this re-ordering: 01234567 <-> 45670123 (Nokia to little)
//	3	Apply this re-ordering: 01234567 <-> 32107654 (Nokia to big)
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func sNeedReversing(tls *libc.TLS, format int32) int32 { /* tclBinary.c:1711:1: */
	switch format {
	// native floats and doubles: never reverse
	case 'd':
		fallthrough
	case 'f':
		fallthrough
		// big endian ints: never reverse
	case 'I':
		fallthrough
	case 'S':
		fallthrough
	case 'W':
		fallthrough
		// small endian floats: reverse if we're big-endian
	case 'r':
		return 0

		// native ints: reverse if we're little-endian
	case 'n':
		fallthrough
	case 't':
		fallthrough
	case 'm':
		fallthrough
		// f: reverse if we're little-endian
	case 'R':
		fallthrough
		// small endian ints: always reverse
	case 'i':
		fallthrough
	case 's':
		fallthrough
	case 'w':
		return 1

	// The Q and q formats need special handling to account for the unusual
	// byte ordering of 8-byte floats on Nokia 770 systems, which claim to be
	// little-endian, but also reverse word order.

	case 'Q':
		if XTclNokia770Doubles(tls) != 0 {
			return 3
		}
		return 1
	case 'q':
		if XTclNokia770Doubles(tls) != 0 {
			return 2
		}
		return 0
	}

	XTcl_Panic(tls, ts+10430, 0)
	return 0
}

//----------------------------------------------------------------------
//
// CopyNumber --
//
//	This routine is called by FormatNumber and ScanNumber to copy a
//	floating-point number. If required, bytes are reversed while copying.
//	The behaviour is only fully defined when used with IEEE float and
//	double values (guaranteed to be 4 and 8 bytes long, respectively.)
//
// Results:
//	None
//
// Side effects:
//	Copies length bytes
//
//----------------------------------------------------------------------

func sCopyNumber(tls *libc.TLS, from uintptr, to uintptr, length uint32, type1 int32) { /* tclBinary.c:1798:1: */
	switch sNeedReversing(tls, type1) {
	case 0:
		libc.Xmemcpy(tls, to, from, uint64(length))
		break
	case 1:
		{
			var fromPtr uintptr = from
			var toPtr uintptr = to

			switch length {
			case uint32(4):
				*(*uint8)(unsafe.Pointer(toPtr)) = *(*uint8)(unsafe.Pointer(fromPtr + 3))
				*(*uint8)(unsafe.Pointer(toPtr + 1)) = *(*uint8)(unsafe.Pointer(fromPtr + 2))
				*(*uint8)(unsafe.Pointer(toPtr + 2)) = *(*uint8)(unsafe.Pointer(fromPtr + 1))
				*(*uint8)(unsafe.Pointer(toPtr + 3)) = *(*uint8)(unsafe.Pointer(fromPtr))
				break
			case uint32(8):
				*(*uint8)(unsafe.Pointer(toPtr)) = *(*uint8)(unsafe.Pointer(fromPtr + 7))
				*(*uint8)(unsafe.Pointer(toPtr + 1)) = *(*uint8)(unsafe.Pointer(fromPtr + 6))
				*(*uint8)(unsafe.Pointer(toPtr + 2)) = *(*uint8)(unsafe.Pointer(fromPtr + 5))
				*(*uint8)(unsafe.Pointer(toPtr + 3)) = *(*uint8)(unsafe.Pointer(fromPtr + 4))
				*(*uint8)(unsafe.Pointer(toPtr + 4)) = *(*uint8)(unsafe.Pointer(fromPtr + 3))
				*(*uint8)(unsafe.Pointer(toPtr + 5)) = *(*uint8)(unsafe.Pointer(fromPtr + 2))
				*(*uint8)(unsafe.Pointer(toPtr + 6)) = *(*uint8)(unsafe.Pointer(fromPtr + 1))
				*(*uint8)(unsafe.Pointer(toPtr + 7)) = *(*uint8)(unsafe.Pointer(fromPtr))
				break
			}
			break

		}
	case 2:
		{
			var fromPtr uintptr = from
			var toPtr uintptr = to

			*(*uint8)(unsafe.Pointer(toPtr)) = *(*uint8)(unsafe.Pointer(fromPtr + 4))
			*(*uint8)(unsafe.Pointer(toPtr + 1)) = *(*uint8)(unsafe.Pointer(fromPtr + 5))
			*(*uint8)(unsafe.Pointer(toPtr + 2)) = *(*uint8)(unsafe.Pointer(fromPtr + 6))
			*(*uint8)(unsafe.Pointer(toPtr + 3)) = *(*uint8)(unsafe.Pointer(fromPtr + 7))
			*(*uint8)(unsafe.Pointer(toPtr + 4)) = *(*uint8)(unsafe.Pointer(fromPtr))
			*(*uint8)(unsafe.Pointer(toPtr + 5)) = *(*uint8)(unsafe.Pointer(fromPtr + 1))
			*(*uint8)(unsafe.Pointer(toPtr + 6)) = *(*uint8)(unsafe.Pointer(fromPtr + 2))
			*(*uint8)(unsafe.Pointer(toPtr + 7)) = *(*uint8)(unsafe.Pointer(fromPtr + 3))
			break

		}
	case 3:
		{
			var fromPtr uintptr = from
			var toPtr uintptr = to

			*(*uint8)(unsafe.Pointer(toPtr)) = *(*uint8)(unsafe.Pointer(fromPtr + 3))
			*(*uint8)(unsafe.Pointer(toPtr + 1)) = *(*uint8)(unsafe.Pointer(fromPtr + 2))
			*(*uint8)(unsafe.Pointer(toPtr + 2)) = *(*uint8)(unsafe.Pointer(fromPtr + 1))
			*(*uint8)(unsafe.Pointer(toPtr + 3)) = *(*uint8)(unsafe.Pointer(fromPtr))
			*(*uint8)(unsafe.Pointer(toPtr + 4)) = *(*uint8)(unsafe.Pointer(fromPtr + 7))
			*(*uint8)(unsafe.Pointer(toPtr + 5)) = *(*uint8)(unsafe.Pointer(fromPtr + 6))
			*(*uint8)(unsafe.Pointer(toPtr + 6)) = *(*uint8)(unsafe.Pointer(fromPtr + 5))
			*(*uint8)(unsafe.Pointer(toPtr + 7)) = *(*uint8)(unsafe.Pointer(fromPtr + 4))
			break

		}
	}
}

//----------------------------------------------------------------------
//
// FormatNumber --
//
//	This routine is called by Tcl_BinaryObjCmd to format a number into a
//	location pointed at by cursor.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Moves the cursor to the next location to be written into.
//
//----------------------------------------------------------------------

func sFormatNumber(tls *libc.TLS, interp uintptr, type1 int32, src uintptr, cursorPtr uintptr) int32 { /* tclBinary.c:1881:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	// var value int32 at bp+24, 4

	// var dvalue float64 at bp, 8

	// var wvalue Tcl_WideInt at bp+16, 8

	// var fvalue float32 at bp+8, 4

	switch type1 {
	case 'd':
		fallthrough
	case 'q':
		fallthrough
	case 'Q':
		// Double-precision floating point values. Tcl_GetDoubleFromObj
		// returns TCL_ERROR for NaN, but we can check by comparing the
		// object's type pointer.

		if XTcl_GetDoubleFromObj(tls, interp, src, bp) != TCL_OK {
			if (*Tcl_Obj)(unsafe.Pointer(src)).FtypePtr != uintptr(unsafe.Pointer(&XtclDoubleType)) {
				return TCL_ERROR
			}
			*(*float64)(unsafe.Pointer(bp /* dvalue */)) = *(*float64)(unsafe.Pointer(src + 32))
		}
		sCopyNumber(tls, bp, *(*uintptr)(unsafe.Pointer(cursorPtr)), uint32(unsafe.Sizeof(float64(0))), type1)
		*(*uintptr)(unsafe.Pointer(cursorPtr)) += uintptr(unsafe.Sizeof(float64(0)))
		return TCL_OK

	case 'f':
		fallthrough
	case 'r':
		fallthrough
	case 'R':
		// Single-precision floating point values. Tcl_GetDoubleFromObj
		// returns TCL_ERROR for NaN, but we can check by comparing the
		// object's type pointer.

		if XTcl_GetDoubleFromObj(tls, interp, src, bp) != TCL_OK {
			if (*Tcl_Obj)(unsafe.Pointer(src)).FtypePtr != uintptr(unsafe.Pointer(&XtclDoubleType)) {
				return TCL_ERROR
			}
			*(*float64)(unsafe.Pointer(bp /* dvalue */)) = *(*float64)(unsafe.Pointer(src + 32))
		}

		// Because some compilers will generate floating point exceptions on
		// an overflow cast (e.g. Borland), we restrict the values to the
		// valid range for float.

		if libc.Xfabs(tls, *(*float64)(unsafe.Pointer(bp))) > 3.40282346638528859811704183484516925e+38 {
			if *(*float64)(unsafe.Pointer(bp)) >= 0.0 {
				*(*float32)(unsafe.Pointer(bp + 8 /* fvalue */)) = 3.40282346638528859811704183484516925e+38
			} else {
				*(*float32)(unsafe.Pointer(bp + 8 /* fvalue */)) = -3.40282346638528859811704183484516925e+38
			}
		} else {
			*(*float32)(unsafe.Pointer(bp + 8 /* fvalue */)) = float32(*(*float64)(unsafe.Pointer(bp /* dvalue */)))
		}
		sCopyNumber(tls, bp+8, *(*uintptr)(unsafe.Pointer(cursorPtr)), uint32(unsafe.Sizeof(float32(0))), type1)
		*(*uintptr)(unsafe.Pointer(cursorPtr)) += uintptr(unsafe.Sizeof(float32(0)))
		return TCL_OK

		// 64-bit integer values.
	case 'w':
		fallthrough
	case 'W':
		fallthrough
	case 'm':
		if XTcl_GetWideIntFromObj(tls, interp, src, bp+16) != TCL_OK {
			return TCL_ERROR
		}
		if sNeedReversing(tls, type1) != 0 {
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)))
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 32)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 40)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 48)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 56)
		} else {
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 56)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 48)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 40)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 32)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*Tcl_WideInt)(unsafe.Pointer(bp + 16)))
		}
		return TCL_OK

		// 32-bit integer values.
	case 'i':
		fallthrough
	case 'I':
		fallthrough
	case 'n':
		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(src)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 { *(*int32)(unsafe.Pointer(bp + 24)) = *(*int32)(unsafe.Pointer(src + 32)); return TCL_OK }()
			}
			return XTcl_GetLongFromObj(tls, interp, src, bp+24)
		}() != TCL_OK {
			return TCL_ERROR
		}
		if sNeedReversing(tls, type1) != 0 {
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)))
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)) >> 24)
		} else {
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)))
		}
		return TCL_OK

		// 16-bit integer values.
	case 's':
		fallthrough
	case 'S':
		fallthrough
	case 't':
		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(src)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 { *(*int32)(unsafe.Pointer(bp + 24)) = *(*int32)(unsafe.Pointer(src + 32)); return TCL_OK }()
			}
			return XTcl_GetLongFromObj(tls, interp, src, bp+24)
		}() != TCL_OK {
			return TCL_ERROR
		}
		if sNeedReversing(tls, type1) != 0 {
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)))
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)) >> 8)
		} else {
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)))
		}
		return TCL_OK

		// 8-bit integer values.
	case 'c':
		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(src)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 { *(*int32)(unsafe.Pointer(bp + 24)) = *(*int32)(unsafe.Pointer(src + 32)); return TCL_OK }()
			}
			return XTcl_GetLongFromObj(tls, interp, src, bp+24)
		}() != TCL_OK {
			return TCL_ERROR
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(cursorPtr)), 1))) = uint8(*(*int32)(unsafe.Pointer(bp + 24)))
		return TCL_OK

	default:
		XTcl_Panic(tls, ts+10430, 0)
		return TCL_ERROR
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// ScanNumber --
//
//	This routine is called by Tcl_BinaryObjCmd to scan a number out of a
//	buffer.
//
// Results:
//	Returns a newly created object containing the scanned number. This
//	object has a ref count of zero.
//
// Side effects:
//	Might reuse an object in the number cache, place a new object in the
//	cache, or delete the cache and set the reference to it (itself passed
//	in by reference) to NULL.
//
//----------------------------------------------------------------------

func sScanNumber(tls *libc.TLS, buffer uintptr, type1 int32, flags int32, numberCachePtrPtr uintptr) uintptr { /* tclBinary.c:2050:16: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var value int32
	// var fvalue float32 at bp+32, 4

	// var dvalue float64 at bp+40, 8

	var uwvalue Tcl_WideUInt
	var objPtr uintptr
	var tablePtr uintptr
	var hPtr uintptr
	// var isNew int32 at bp, 4

	var bigObj uintptr
	// var big Mp_int at bp+8, 24

	// We cannot rely on the compiler to properly sign extend integer values
	// when we cast from smaller values to larger values because we don't know
	// the exact size of the integer types. So, we have to handle sign
	// extension explicitly by checking the high bit and padding with 1's as
	// needed. This practice is disabled if the BINARY_UNSIGNED flag is set.

	switch type1 {
	case 'c':
		goto __2

		// 16-bit numeric values. We need the sign extension trick (see above)
		// here as well.

	case 's':
		goto __3
	case 'S':
		goto __4
	case 't':
		goto __5

		// 32-bit numeric values.

	case 'i':
		goto __6
	case 'I':
		goto __7
	case 'n':
		goto __8

		// Do not cache wide (64-bit) values; they are already too large to
		// use as keys.

	case 'w':
		goto __9
	case 'W':
		goto __10
	case 'm':
		goto __11

		// Do not cache double values; they are already too large to use as
		// keys and the values stored are utterly incompatible with the
		// integer part of the cache.

		// 32-bit IEEE single-precision floating point.

	case 'f':
		goto __12
	case 'R':
		goto __13
	case 'r':
		goto __14

		// 64-bit IEEE double-precision floating point.

	case 'd':
		goto __15
	case 'Q':
		goto __16
	case 'q':
		goto __17
	}
	goto __1
__2:
	// Characters need special handling. We want to produce a signed
	// result, but on some platforms (such as AIX) chars are unsigned. To
	// deal with this, check for a value that should be negative but
	// isn't.

	value = int32(*(*uint8)(unsafe.Pointer(buffer)))
	if !!(flags&BINARY_UNSIGNED != 0) {
		goto __18
	}
	if !(value&0x80 != 0) {
		goto __19
	}
	value = value | -0x100
__19:
	;
__18:
	;
	goto returnNumericObject

	// 16-bit numeric values. We need the sign extension trick (see above)
	// here as well.

__3:
__4:
__5:
	if !(sNeedReversing(tls, type1) != 0) {
		goto __20
	}
	value = int32(int32(*(*uint8)(unsafe.Pointer(buffer))) + int32(*(*uint8)(unsafe.Pointer(buffer + 1)))<<8)
	goto __21
__20:
	value = int32(int32(*(*uint8)(unsafe.Pointer(buffer + 1))) + int32(*(*uint8)(unsafe.Pointer(buffer)))<<8)
__21:
	;
	if !!(flags&BINARY_UNSIGNED != 0) {
		goto __22
	}
	if !(value&0x8000 != 0) {
		goto __23
	}
	value = value | -0x10000
__23:
	;
__22:
	;
	goto returnNumericObject

	// 32-bit numeric values.

__6:
__7:
__8:
	if !(sNeedReversing(tls, type1) != 0) {
		goto __24
	}
	value = int32(int32(*(*uint8)(unsafe.Pointer(buffer)))+
		int32(*(*uint8)(unsafe.Pointer(buffer + 1)))<<8+
		int32(*(*uint8)(unsafe.Pointer(buffer + 2)))<<16) +
		int32(*(*uint8)(unsafe.Pointer(buffer + 3)))<<24
	goto __25
__24:
	value = int32(int32(*(*uint8)(unsafe.Pointer(buffer + 3)))+
		int32(*(*uint8)(unsafe.Pointer(buffer + 2)))<<8+
		int32(*(*uint8)(unsafe.Pointer(buffer + 1)))<<16) +
		int32(*(*uint8)(unsafe.Pointer(buffer)))<<24
__25:
	;

	// Check to see if the value was sign extended properly on systems
	// where an int is more than 32-bits.
	//
	// We avoid caching unsigned integers as we cannot distinguish between
	// 32bit signed and unsigned in the hash (short and char are ok).

	if !(flags&BINARY_UNSIGNED != 0) {
		goto __26
	}
	return XTcl_NewWideIntObj(tls, Tcl_WideInt(uint32(value)))
__26:
	;
	if !(uint32(value)&(uint32(uint32(1))<<31) != 0 && value > 0) {
		goto __27
	}
	value = libc.Int32FromUint32(uint32(value) - uint32(uint32(1))<<31)
	value = libc.Int32FromUint32(uint32(value) - uint32(uint32(1))<<31)
__27:
	;

returnNumericObject:
	if !(*(*uintptr)(unsafe.Pointer(numberCachePtrPtr)) == uintptr(0)) {
		goto __28
	}
	return XTcl_NewLongObj(tls, value)
	goto __29
__28:
	tablePtr = *(*uintptr)(unsafe.Pointer(numberCachePtrPtr))

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, uintptr(Intptr_t(value)), bp /* &isNew */)
	if !!(*(*int32)(unsafe.Pointer(bp)) != 0) {
		goto __30
	}
	return (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
__30:
	;
	if !((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumEntries <= BINARY_SCAN_MAX_CACHE) {
		goto __31
	}
	objPtr = XTcl_NewLongObj(tls, value)

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = objPtr
	return objPtr
__31:
	;

	// We've overflowed the cache! Someone's parsing a LOT of varied
	// binary data in a single call! Bail out by switching back to the
	// old behaviour for the rest of the scan.
	//
	// Note that anyone just using the 'c' conversion (for bytes)
	// cannot trigger this.

	sDeleteScanNumberCache(tls, tablePtr)
	*(*uintptr)(unsafe.Pointer(numberCachePtrPtr)) = uintptr(0)
	return XTcl_NewLongObj(tls, value)
__29:
	;

	// Do not cache wide (64-bit) values; they are already too large to
	// use as keys.

__9:
__10:
__11:
	if !(sNeedReversing(tls, type1) != 0) {
		goto __32
	}
	uwvalue = Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer))) |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 1)))<<8 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 2)))<<16 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 3)))<<24 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 4)))<<32 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 5)))<<40 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 6)))<<48 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 7)))<<56
	goto __33
__32:
	uwvalue = Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 7))) |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 6)))<<8 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 5)))<<16 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 4)))<<24 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 3)))<<32 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 2)))<<40 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer + 1)))<<48 |
		Tcl_WideUInt(*(*uint8)(unsafe.Pointer(buffer)))<<56
__33:
	;
	if !(flags&BINARY_UNSIGNED != 0) {
		goto __34
	}
	bigObj = uintptr(0)

	XTclBNInitBignumFromWideUInt(tls, bp+8, uwvalue)
	bigObj = XTcl_NewBignumObj(tls, bp+8)
	return bigObj
__34:
	;
	return XTcl_NewWideIntObj(tls, Tcl_WideInt(uwvalue))

	// Do not cache double values; they are already too large to use as
	// keys and the values stored are utterly incompatible with the
	// integer part of the cache.

	// 32-bit IEEE single-precision floating point.

__12:
__13:
__14:
	sCopyNumber(tls, buffer, bp+32, uint32(unsafe.Sizeof(float32(0))), type1)
	return XTcl_NewDoubleObj(tls, float64(*(*float32)(unsafe.Pointer(bp + 32 /* fvalue */))))

	// 64-bit IEEE double-precision floating point.

__15:
__16:
__17:
	sCopyNumber(tls, buffer, bp+40, uint32(unsafe.Sizeof(float64(0))), type1)
	return XTcl_NewDoubleObj(tls, *(*float64)(unsafe.Pointer(bp + 40 /* dvalue */)))
__1:
	;
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// DeleteScanNumberCache --
//
//	Deletes the hash table acting as a scan number cache.
//
// Results:
//	None
//
// Side effects:
//	Decrements the reference counts of the objects in the cache.
//
//----------------------------------------------------------------------

func sDeleteScanNumberCache(tls *libc.TLS, numberCachePtr uintptr) { /* tclBinary.c:2262:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var hEntry uintptr
	// var search Tcl_HashSearch at bp, 24

	if numberCachePtr == uintptr(0) {
		return
	}

	hEntry = XTcl_FirstHashEntry(tls, numberCachePtr, bp)
	for hEntry != uintptr(0) {
		var value uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hEntry)).FclientData

		if value != uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = value
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		hEntry = XTcl_NextHashEntry(tls, bp)
	}
	XTcl_DeleteHashTable(tls, numberCachePtr)
}

// ----------------------------------------------------------------------
//
// NOTES --
//
//	Some measurements show that it is faster to use a table to to perform
//	uuencode and base64 value encoding than to calculate the output (at
//	least on intel P4 arch).
//
//	Conversely using a lookup table for the decoding is slower than just
//	calculating the values. We therefore use the fastest of each method.
//
//	Presumably this has to do with the size of the tables. The base64
//	decode table is 255 bytes while the encode table is only 65 bytes. The
//	choice likely depends on CPU memory cache sizes.

//----------------------------------------------------------------------
//
// BinaryEncodeHex --
//
//	Implement the [binary encode hex] binary encoding. clientData must be
//	a table to convert values to hexadecimal digits.
//
// Results:
//	Interp result set to an encoded byte array object
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func sBinaryEncodeHex(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBinary.c:2322:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var resultObj uintptr = uintptr(0)
	var data uintptr = uintptr(0)
	var cursor uintptr = uintptr(0)
	var offset int32 = 0
	*(*int32)(unsafe.Pointer(bp /* count */)) = 0

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10453)
		return TCL_ERROR
	}

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)
	{
	}

	data = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	cursor = XTcl_SetByteArrayLength(tls, resultObj, *(*int32)(unsafe.Pointer(bp))*2)
	for offset = 0; offset < *(*int32)(unsafe.Pointer(bp /* count */)); offset++ {
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sHexDigits[int32(*(*uint8)(unsafe.Pointer(data + uintptr(offset))))>>4&0x0F])
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sHexDigits[int32(*(*uint8)(unsafe.Pointer(data + uintptr(offset))))&0x0F])
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// BinaryDecodeHex --
//
//	Implement the [binary decode hex] binary encoding.
//
// Results:
//	Interp result set to an decoded byte array object
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func sBinaryDecodeHex(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBinary.c:2366:1: */
	bp := tls.Alloc(66)
	defer tls.Free(66)

	var resultObj uintptr
	var data uintptr
	var datastart uintptr
	var dataend uintptr
	var begin uintptr
	var cursor uintptr
	var c uint8
	var i int32
	// var index int32 at bp+56, 4

	var value int32
	var size int32
	var pure int32
	// var count int32 at bp+60, 4

	var cut int32
	var strict int32
	// var ch Tcl_UniChar at bp+64, 2
	resultObj = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 60 /* count */)) = 0
	cut = 0
	strict = 0
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 64 /* ch */)) = Tcl_UniChar(0)

	if !(objc < 2 || objc > 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10458)
	return TCL_ERROR
__1:
	;
	i = 1
__2:
	if !(i < objc-1) {
		goto __4
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&optStrings)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp+56) != TCL_OK) {
		goto __5
	}
	return TCL_ERROR
__5:
	;
	switch *(*int32)(unsafe.Pointer(bp + 56 /* index */)) {
	case 0 /* OPT_STRICT */ :
		goto __7
	}
	goto __6
__7:
	strict = 1
	goto __6
__6:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;

__8:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __11
	}
	XTclAllocateFreeObjects(tls)
__11:
	;
	resultObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)

	pure = libc.Bool32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes == uintptr(0))
	datastart = libc.AssignUintptr(&data, func() uintptr {
		if pure != 0 {
			return XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), bp+60)
		}
		return func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 60)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), bp+60)
		}()
	}())
	dataend = data + uintptr(*(*int32)(unsafe.Pointer(bp + 60)))
	size = (*(*int32)(unsafe.Pointer(bp + 60)) + 1) / 2
	begin = libc.AssignUintptr(&cursor, XTcl_SetByteArrayLength(tls, resultObj, size))
__12:
	if !(data < dataend) {
		goto __13
	}
	value = 0
	i = 0
__14:
	if !(i < 2) {
		goto __16
	}
	if !(data >= dataend) {
		goto __17
	}
	value <<= 4
	goto __16
__17:
	;

	c = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&data, 1)))
	if !!(libc.Xisxdigit(tls, int32(c)) != 0) {
		goto __18
	}
	if !(strict != 0 || !(XTclIsSpaceProc(tls, int32(c)) != 0)) {
		goto __19
	}
	goto badChar
__19:
	;
	i--
	goto __15
__18:
	;

	value <<= 4
	c = uint8(int32(c) - '0')
	if !(int32(c) > 9) {
		goto __20
	}
	c = libc.Uint8FromInt32(int32(c) + ('0' - 'A' + 10))
__20:
	;
	if !(int32(c) > 16) {
		goto __21
	}
	c = libc.Uint8FromInt32(int32(c) + ('A' - 'a'))
__21:
	;
	value = value | int32(c)&0xF
	goto __15
__15:
	i++
	goto __14
	goto __16
__16:
	;
	if !(i < 2) {
		goto __22
	}
	cut++
__22:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(value)
	value = 0
	goto __12
__13:
	;
	if !(cut > size) {
		goto __23
	}
	cut = size
__23:
	;
	XTcl_SetByteArrayLength(tls, resultObj, int32((int64(cursor)-int64(begin))/1-int64(cut)))
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK

badChar:
	if !(pure != 0) {
		goto __24
	}
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 64 /* ch */)) = Tcl_UniChar(c)
	goto __25
__24:
	if int32(uint8(*(*int8)(unsafe.Pointer(data - uintptr(1))))) < 0x80 {
		*(*Tcl_UniChar)(unsafe.Pointer(bp + 64)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(data - uintptr(1)))))
	} else {
		XTcl_UtfToUniChar(tls, data-uintptr(1), bp+64)
	}
__25:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount, 1) > 1) {
		goto __26
	}
	goto __27
__26:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __28
	}

	if !((*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != XtclEmptyStringRep) {
		goto __30
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes)
__30:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = -1
__31:
	;
	*(*uintptr)(unsafe.Pointer(resultObj + 32)) = XtclFreeObjList
	XtclFreeObjList = resultObj
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
	goto __29
__28:
	XTclFreeObj(tls, resultObj)
__29:
	;
__27:
	;

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+10480,
		libc.VaList(bp, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 64 /* ch */))), int32((int64(data)-int64(datastart))/1-int64(1)))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+10526, ts+10533, ts+10540, uintptr(0)))
	return TCL_ERROR
}

var optStrings = [2]uintptr{ts + 10548, uintptr(0)} /* tclBinary.c:2378:23 */

//----------------------------------------------------------------------
//
// BinaryEncode64 --
//
//	This procedure implements the "binary encode base64" Tcl command.
//
// Results:
//	The base64 encoded value prescribed by the input arguments.
//
//----------------------------------------------------------------------

func sBinaryEncode64(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBinary.c:2487:1: */
	bp := tls.Alloc(59)
	defer tls.Free(59)

	var resultObj uintptr
	var data uintptr
	var limit uintptr
	*(*int32)(unsafe.Pointer(bp + 44 /* maxlen */)) = 0
	var wrapchar uintptr = ts + 935 /* "\n" */
	*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */)) = 1
	var offset int32
	var i int32
	// var index int32 at bp+40, 4

	var size int32
	var outindex int32 = 0
	*(*int32)(unsafe.Pointer(bp + 52 /* count */)) = 0
	var purewrap int32 = 1

	if objc < 2 || objc%2 != 0 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+10556)
		return TCL_ERROR
	}
	for i = 1; i < objc-1; i = i + 2 {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&optStrings1)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp+40) != TCL_OK {
			return TCL_ERROR
		}
		switch *(*int32)(unsafe.Pointer(bp + 40 /* index */)) {
		case 0 /* OPT_MAXLEN */ :
			if XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+44) != TCL_OK {
				return TCL_ERROR
			}
			if *(*int32)(unsafe.Pointer(bp + 44)) < 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+10592, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+10526, ts+10617,
					ts+10624, uintptr(0)))
				return TCL_ERROR
			}
			break
		case 1 /* OPT_WRAPCHAR */ :
			purewrap = libc.Bool32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).Fbytes == uintptr(0))
			if purewrap != 0 {
				wrapchar = XTcl_GetByteArrayFromObj(tls,
					*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+48)
			} else {
				wrapchar = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+48)
			}
			break
		}
	}
	if *(*int32)(unsafe.Pointer(bp + 48)) == 0 {
		*(*int32)(unsafe.Pointer(bp + 44 /* maxlen */)) = 0
	}

	resultObj = XTcl_NewObj(tls)
	data = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), bp+52)
	if *(*int32)(unsafe.Pointer(bp + 52)) > 0 {
		var cursor uintptr = uintptr(0)

		size = (*(*int32)(unsafe.Pointer(bp + 52))*4/3 + 3) & libc.CplInt32(3) // ensure 4 byte chunks
		if *(*int32)(unsafe.Pointer(bp + 44)) > 0 && size > *(*int32)(unsafe.Pointer(bp + 44)) {
			var adjusted int32 = size + *(*int32)(unsafe.Pointer(bp + 48))*(size / *(*int32)(unsafe.Pointer(bp + 44)))

			if size%*(*int32)(unsafe.Pointer(bp + 44)) == 0 {
				adjusted = adjusted - *(*int32)(unsafe.Pointer(bp + 48))
			}
			size = adjusted

			if purewrap == 0 {
				// Wrapchar is (possibly) non-byte, so build result as
				// general string, not bytearray
				XTcl_SetObjLength(tls, resultObj, size)
				cursor = func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes
					}
					return XTcl_GetString(tls, resultObj)
				}()
			}
		}
		if cursor == uintptr(0) {
			cursor = XTcl_SetByteArrayLength(tls, resultObj, size)
		}
		limit = cursor + uintptr(size)
		for offset = 0; offset < *(*int32)(unsafe.Pointer(bp + 52 /* count */)); offset = offset + 3 {
			*(*[3]uint8)(unsafe.Pointer(bp + 56 /* d */)) = [3]uint8{uint8(0), uint8(0), uint8(0)}

			for i = 0; i < 3 && offset+i < *(*int32)(unsafe.Pointer(bp + 52 /* count */)); i++ {
				*(*uint8)(unsafe.Pointer(bp + 56 + uintptr(i))) = *(*uint8)(unsafe.Pointer(data + uintptr(offset+i)))
			}
			for ok := true; ok; ok = 0 != 0 {
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sB64Digits[int32(*(*uint8)(unsafe.Pointer(bp + 56)))>>2])
				outindex++
				if *(*int32)(unsafe.Pointer(bp + 44)) > 0 && cursor != limit {
					if outindex == *(*int32)(unsafe.Pointer(bp + 44)) {
						libc.Xmemcpy(tls, cursor, wrapchar, uint64(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */))))
						cursor += uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */)))
						outindex = 0
					}
				}
				if cursor > limit {
					XTcl_Panic(tls, ts+10636, 0)
				}
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sB64Digits[int32(*(*uint8)(unsafe.Pointer(bp + 56)))&0x03<<4|int32(*(*uint8)(unsafe.Pointer(bp + 56 + 1)))>>4])
				outindex++
				if *(*int32)(unsafe.Pointer(bp + 44)) > 0 && cursor != limit {
					if outindex == *(*int32)(unsafe.Pointer(bp + 44)) {
						libc.Xmemcpy(tls, cursor, wrapchar, uint64(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */))))
						cursor += uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */)))
						outindex = 0
					}
				}
				if cursor > limit {
					XTcl_Panic(tls, ts+10636, 0)
				}
			}
			if offset+1 < *(*int32)(unsafe.Pointer(bp + 52)) {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sB64Digits[int32(*(*uint8)(unsafe.Pointer(bp + 56 + 1)))&0x0F<<2|int32(*(*uint8)(unsafe.Pointer(bp + 56 + 2)))>>6])
					outindex++
					if *(*int32)(unsafe.Pointer(bp + 44)) > 0 && cursor != limit {
						if outindex == *(*int32)(unsafe.Pointer(bp + 44)) {
							libc.Xmemcpy(tls, cursor, wrapchar, uint64(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */))))
							cursor += uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */)))
							outindex = 0
						}
					}
					if cursor > limit {
						XTcl_Panic(tls, ts+10636, 0)
					}
				}
			} else {
				for ok3 := true; ok3; ok3 = 0 != 0 {
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sB64Digits[64])
					outindex++
					if *(*int32)(unsafe.Pointer(bp + 44)) > 0 && cursor != limit {
						if outindex == *(*int32)(unsafe.Pointer(bp + 44)) {
							libc.Xmemcpy(tls, cursor, wrapchar, uint64(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */))))
							cursor += uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */)))
							outindex = 0
						}
					}
					if cursor > limit {
						XTcl_Panic(tls, ts+10636, 0)
					}
				}
			}
			if offset+2 < *(*int32)(unsafe.Pointer(bp + 52)) {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sB64Digits[int32(*(*uint8)(unsafe.Pointer(bp + 56 + 2)))&0x3F])
					outindex++
					if *(*int32)(unsafe.Pointer(bp + 44)) > 0 && cursor != limit {
						if outindex == *(*int32)(unsafe.Pointer(bp + 44)) {
							libc.Xmemcpy(tls, cursor, wrapchar, uint64(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */))))
							cursor += uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */)))
							outindex = 0
						}
					}
					if cursor > limit {
						XTcl_Panic(tls, ts+10636, 0)
					}
				}
			} else {
				for ok5 := true; ok5; ok5 = 0 != 0 {
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sB64Digits[64])
					outindex++
					if *(*int32)(unsafe.Pointer(bp + 44)) > 0 && cursor != limit {
						if outindex == *(*int32)(unsafe.Pointer(bp + 44)) {
							libc.Xmemcpy(tls, cursor, wrapchar, uint64(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */))))
							cursor += uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* wrapcharlen */)))
							outindex = 0
						}
					}
					if cursor > limit {
						XTcl_Panic(tls, ts+10636, 0)
					}
				}
			}
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

var optStrings1 = [3]uintptr{ts + 10646, ts + 10654, uintptr(0)} /* tclBinary.c:2500:23 */

//----------------------------------------------------------------------
//
// BinaryEncodeUu --
//
//	This implements the uuencode binary encoding. Input is broken into 6
//	bit chunks and a lookup table is used to turn these values into output
//	characters. This differs from the generic code above in that line
//	lengths are also encoded.
//
// Results:
//	Interp result set to an encoded byte array object
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func sBinaryEncodeUu(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBinary.c:2610:1: */
	bp := tls.Alloc(100)
	defer tls.Free(100)

	var resultObj uintptr
	var data uintptr
	var start uintptr
	var cursor uintptr
	var offset int32
	// var count int32 at bp+96, 4

	var rawLength int32
	var n int32
	var i int32
	var j int32
	var bits int32
	// var index int32 at bp+84, 4

	// var lineLength int32 at bp+88, 4

	// var SingleNewline [1]uint8 at bp+80, 1

	var wrapchar uintptr
	// var wrapcharlen int32 at bp+92, 4

	var p uintptr
	var numBytes int32
	var lineLen int32
	*(*int32)(unsafe.Pointer(bp + 88 /* lineLength */)) = 61
	*(*[1]uint8)(unsafe.Pointer(bp + 80 /* SingleNewline */)) = [1]uint8{uint8('\n')}
	wrapchar = bp + 80 /* SingleNewline */
	*(*int32)(unsafe.Pointer(bp + 92 /* wrapcharlen */)) = int32(unsafe.Sizeof([1]uint8{}))

	if !(objc < 2 || objc%2 != 0) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+10556)
	return TCL_ERROR
__1:
	;
	i = 1
__2:
	if !(i < objc-1) {
		goto __4
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&optStrings2)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp+84) != TCL_OK) {
		goto __5
	}
	return TCL_ERROR
__5:
	;
	switch *(*int32)(unsafe.Pointer(bp + 84 /* index */)) {
	case 0 /* OPT_MAXLEN */ :
		goto __7
	case 1 /* OPT_WRAPCHAR */ :
		goto __8
	}
	goto __6
__7:
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)),
		bp+88) != TCL_OK) {
		goto __9
	}
	return TCL_ERROR
__9:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 88)) < 5 || *(*int32)(unsafe.Pointer(bp + 88)) > 85) {
		goto __10
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+10592, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+10526, ts+10617,
		ts+10624, uintptr(0)))
	return TCL_ERROR
__10:
	;
	*(*int32)(unsafe.Pointer(bp + 88 /* lineLength */)) = (*(*int32)(unsafe.Pointer(bp + 88))-1)&-4 + 1 // 5, 9, 13 ...
	goto __6
__8:
	wrapchar = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 92)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+92)
	}()
	p = wrapchar
	numBytes = *(*int32)(unsafe.Pointer(bp + 92 /* wrapcharlen */))

__11:
	if !(numBytes != 0) {
		goto __12
	}
	switch int32(*(*uint8)(unsafe.Pointer(p))) {
	case '\t':
		goto __14
	case '\v':
		goto __15
	case '\f':
		goto __16
	case '\r':
		goto __17
	case '\n':
		goto __18
	default:
		goto __19
	}
	goto __13
__14:
__15:
__16:
__17:
	p++
	numBytes--
	goto __11
__18:
	numBytes--
	goto __13
__19:
badwrap:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+10664,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+10526,
		ts+10617, ts+10703, uintptr(0)))
	return TCL_ERROR
__13:
	;
	goto __11
__12:
	;
	if !(numBytes != 0) {
		goto __20
	}
	goto badwrap
__20:
	;

	goto __6
__6:
	;
	goto __3
__3:
	i = i + 2
	goto __2
	goto __4
__4:
	;

	// Allocate the buffer. This is a little bit too long, but is "good
	// enough".

__21:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __24
	}
	XTclAllocateFreeObjects(tls)
__24:
	;
	resultObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)

	offset = 0
	data = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), bp+96)
	rawLength = (*(*int32)(unsafe.Pointer(bp + 88)) - 1) * 3 / 4
	start = libc.AssignUintptr(&cursor, XTcl_SetByteArrayLength(tls, resultObj,
		(*(*int32)(unsafe.Pointer(bp + 88))+*(*int32)(unsafe.Pointer(bp + 92)))*((*(*int32)(unsafe.Pointer(bp + 96))+(rawLength-1))/rawLength)))
	n = libc.AssignInt32(&bits, 0)

	// Encode the data. Each output line first has the length of raw data
	// encoded by the output line described in it by one encoded byte, then
	// the encoded data follows (encoding each 6 bits as one character).
	// Encoded lines are always terminated by a newline.

__25:
	if !(offset < *(*int32)(unsafe.Pointer(bp + 96))) {
		goto __26
	}
	lineLen = *(*int32)(unsafe.Pointer(bp + 96)) - offset

	if !(lineLen > rawLength) {
		goto __27
	}
	lineLen = rawLength
__27:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sUueDigits[lineLen])
	i = 0
__28:
	if !(i < lineLen) {
		goto __30
	}
	n <<= 8
	n = n | int32(*(*uint8)(unsafe.Pointer(data + uintptr(libc.PostIncInt32(&offset, 1)))))
	bits = bits + 8
__31:
	if !(bits > 6) {
		goto __33
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sUueDigits[n>>(bits-6)&0x3F])
	goto __32
__32:
	bits = bits - 6
	goto __31
	goto __33
__33:
	;
	goto __29
__29:
	i++
	goto __28
	goto __30
__30:
	;
	if !(bits > 0) {
		goto __34
	}
	n <<= 8
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(sUueDigits[n>>(bits+2)&0x3F])
	bits = 0
__34:
	;
	j = 0
__35:
	if !(j < *(*int32)(unsafe.Pointer(bp + 92))) {
		goto __37
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = *(*uint8)(unsafe.Pointer(wrapchar + uintptr(j)))
	goto __36
__36:
	j++
	goto __35
	goto __37
__37:
	;
	goto __25
__26:
	;

	// Fix the length of the output bytearray.

	XTcl_SetByteArrayLength(tls, resultObj, int32((int64(cursor)-int64(start))/1))
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

var optStrings2 = [3]uintptr{ts + 10646, ts + 10654, uintptr(0)} /* tclBinary.c:2624:23 */

//----------------------------------------------------------------------
//
// BinaryDecodeUu --
//
//	Decode a uuencoded string.
//
// Results:
//	Interp result set to an byte array object
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func sBinaryDecodeUu(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBinary.c:2758:1: */
	bp := tls.Alloc(110)
	defer tls.Free(110)

	var resultObj uintptr
	var data uintptr
	var datastart uintptr
	var dataend uintptr
	var begin uintptr
	var cursor uintptr
	var i int32
	// var index int32 at bp+96, 4

	var size int32
	var pure int32
	// var count int32 at bp+100, 4

	var strict int32
	var lineLen int32
	var c uint8
	// var ch Tcl_UniChar at bp+108, 2

	// var d [4]int8 at bp+104, 4
	resultObj = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 100 /* count */)) = 0
	strict = 0
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */)) = Tcl_UniChar(0)

	if !(objc < 2 || objc > 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10458)
	return TCL_ERROR
__1:
	;
	i = 1
__2:
	if !(i < objc-1) {
		goto __4
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&optStrings3)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp+96) != TCL_OK) {
		goto __5
	}
	return TCL_ERROR
__5:
	;
	switch *(*int32)(unsafe.Pointer(bp + 96 /* index */)) {
	case 0 /* OPT_STRICT */ :
		goto __7
	}
	goto __6
__7:
	strict = 1
	goto __6
__6:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;

__8:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __11
	}
	XTclAllocateFreeObjects(tls)
__11:
	;
	resultObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)

	pure = libc.Bool32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes == uintptr(0))
	datastart = libc.AssignUintptr(&data, func() uintptr {
		if pure != 0 {
			return XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), bp+100)
		}
		return func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 100)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), bp+100)
		}()
	}())
	dataend = data + uintptr(*(*int32)(unsafe.Pointer(bp + 100)))
	size = (*(*int32)(unsafe.Pointer(bp + 100)) + 3) & libc.CplInt32(3) * 3 / 4
	begin = libc.AssignUintptr(&cursor, XTcl_SetByteArrayLength(tls, resultObj, size))
	lineLen = -1

	// The decoding loop. First, we get the length of line (strictly, the
	// number of data bytes we expect to generate from the line) we're
	// processing this time round if it is not already known (i.e., when the
	// lineLen variable is set to the magic value, -1).

__12:
	if !(data < dataend) {
		goto __13
	}
	*(*[4]int8)(unsafe.Pointer(bp + 104 /* d */)) = [4]int8{int8(0), int8(0), int8(0), int8(0)}

	if !(lineLen < 0) {
		goto __14
	}
	c = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&data, 1)))
	if !(int32(c) < 32 || int32(c) > 96) {
		goto __15
	}
	if !(strict != 0 || !(XTclIsSpaceProc(tls, int32(c)) != 0)) {
		goto __16
	}
	goto badUu
__16:
	;
	i--
	goto __12
__15:
	;
	lineLen = (int32(c) - 32) & 0x3F
__14:
	;

	// Now we read a four-character grouping.

	i = 0
__17:
	if !(i < 4) {
		goto __19
	}
	if !(data < dataend) {
		goto __20
	}
	*(*int8)(unsafe.Pointer(bp + 104 + uintptr(i))) = int8(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&data, 1)))))
	if !(int32(c) < 32 || int32(c) > 96) {
		goto __21
	}
	if !(strict != 0) {
		goto __22
	}
	if !!(XTclIsSpaceProc(tls, int32(c)) != 0) {
		goto __23
	}
	goto badUu
	goto __24
__23:
	if !(int32(c) == '\n') {
		goto __25
	}
	goto shortUu
__25:
	;
__24:
	;
__22:
	;
	i--
	goto __18
__21:
	;
__20:
	;
	goto __18
__18:
	i++
	goto __17
	goto __19
__19:
	;

	// Translate that grouping into (up to) three binary bytes output.

	if !(lineLen > 0) {
		goto __26
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8((int32(*(*int8)(unsafe.Pointer(bp + 104)))-0x20)&0x3F<<2 |
		(int32(*(*int8)(unsafe.Pointer(bp + 104 + 1)))-0x20)&0x3F>>4)
	if !(libc.PreDecInt32(&lineLen, 1) > 0) {
		goto __27
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8((int32(*(*int8)(unsafe.Pointer(bp + 104 + 1)))-0x20)&0x3F<<4 |
		(int32(*(*int8)(unsafe.Pointer(bp + 104 + 2)))-0x20)&0x3F>>2)
	if !(libc.PreDecInt32(&lineLen, 1) > 0) {
		goto __28
	}
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8((int32(*(*int8)(unsafe.Pointer(bp + 104 + 2)))-0x20)&0x3F<<6 |
		(int32(*(*int8)(unsafe.Pointer(bp + 104 + 3)))-0x20)&0x3F)
	lineLen--
__28:
	;
__27:
	;
__26:
	;

	// If we've reached the end of the line, skip until we process a
	// newline.

	if !(lineLen == 0 && data < dataend) {
		goto __29
	}
	lineLen = -1
__30:
	c = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&data, 1)))
	if !(int32(c) == '\n') {
		goto __33
	}
	goto __32
	goto __34
__33:
	if !(int32(c) >= 32 && int32(c) <= 96) {
		goto __35
	}
	data--
	goto __32
	goto __36
__35:
	if !(strict != 0 || !(XTclIsSpaceProc(tls, int32(c)) != 0)) {
		goto __37
	}
	goto badUu
__37:
	;
__36:
	;
__34:
	;
	goto __31
__31:
	if data < dataend {
		goto __30
	}
	goto __32
__32:
	;
__29:
	;
	goto __12
__13:
	;

	// Sanity check, clean up and finish.

	if !(lineLen > 0 && strict != 0) {
		goto __38
	}
	goto shortUu
__38:
	;
	XTcl_SetByteArrayLength(tls, resultObj, int32((int64(cursor)-int64(begin))/1))
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK

shortUu:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+10712, 0))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+10526, ts+10533, ts+10732, uintptr(0)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount, 1) > 1) {
		goto __39
	}
	goto __40
__39:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __41
	}

	if !((*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != XtclEmptyStringRep) {
		goto __43
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes)
__43:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = -1
__44:
	;
	*(*uintptr)(unsafe.Pointer(resultObj + 32)) = XtclFreeObjList
	XtclFreeObjList = resultObj
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
	goto __42
__41:
	XTclFreeObj(tls, resultObj)
__42:
	;
__40:
	;

	return TCL_ERROR

badUu:
	if !(pure != 0) {
		goto __47
	}
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */)) = Tcl_UniChar(c)
	goto __48
__47:
	if int32(uint8(*(*int8)(unsafe.Pointer(data - uintptr(1))))) < 0x80 {
		*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(data - uintptr(1)))))
	} else {
		XTcl_UtfToUniChar(tls, data-uintptr(1), bp+108)
	}
__48:
	;
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+10738,
		libc.VaList(bp+40, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */))), int32((int64(data)-int64(datastart))/1-int64(1)))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+4178, ts+10526, ts+10533, ts+10540, uintptr(0)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount, 1) > 1) {
		goto __49
	}
	goto __50
__49:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __51
	}

	if !((*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != XtclEmptyStringRep) {
		goto __53
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes)
__53:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = -1
__54:
	;
	*(*uintptr)(unsafe.Pointer(resultObj + 32)) = XtclFreeObjList
	XtclFreeObjList = resultObj
	goto __55
__55:
	if 0 != 0 {
		goto __54
	}
	goto __56
__56:
	;
	goto __52
__51:
	XTclFreeObj(tls, resultObj)
__52:
	;
__50:
	;

	return TCL_ERROR
}

var optStrings3 = [2]uintptr{ts + 10548, uintptr(0)} /* tclBinary.c:2771:23 */

//----------------------------------------------------------------------
//
// BinaryDecode64 --
//
//	Decode a base64 encoded string.
//
// Results:
//	Interp result set to an byte array object
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func sBinaryDecode64(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclBinary.c:2928:1: */
	bp := tls.Alloc(66)
	defer tls.Free(66)

	var resultObj uintptr
	var data uintptr
	var datastart uintptr
	var dataend uintptr
	var c uint8
	var begin uintptr
	var cursor uintptr
	var pure int32
	var strict int32
	var i int32
	// var index int32 at bp+56, 4

	var size int32
	var cut int32
	// var count int32 at bp+60, 4

	// var ch Tcl_UniChar at bp+64, 2

	var value uint32
	resultObj = uintptr(0)
	c = uint8(0)
	begin = uintptr(0)
	cursor = uintptr(0)
	strict = 0
	cut = 0
	*(*int32)(unsafe.Pointer(bp + 60 /* count */)) = 0
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 64 /* ch */)) = Tcl_UniChar(0)

	if !(objc < 2 || objc > 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10458)
	return TCL_ERROR
__1:
	;
	i = 1
__2:
	if !(i < objc-1) {
		goto __4
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&optStrings4)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp+56) != TCL_OK) {
		goto __5
	}
	return TCL_ERROR
__5:
	;
	switch *(*int32)(unsafe.Pointer(bp + 56 /* index */)) {
	case 0 /* OPT_STRICT */ :
		goto __7
	}
	goto __6
__7:
	strict = 1
	goto __6
__6:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;

__8:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __11
	}
	XTclAllocateFreeObjects(tls)
__11:
	;
	resultObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)

	pure = libc.Bool32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes == uintptr(0))
	datastart = libc.AssignUintptr(&data, func() uintptr {
		if pure != 0 {
			return XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), bp+60)
		}
		return func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 60)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), bp+60)
		}()
	}())
	dataend = data + uintptr(*(*int32)(unsafe.Pointer(bp + 60)))
	size = (*(*int32)(unsafe.Pointer(bp + 60)) + 3) & libc.CplInt32(3) * 3 / 4
	begin = libc.AssignUintptr(&cursor, XTcl_SetByteArrayLength(tls, resultObj, size))
__12:
	if !(data < dataend) {
		goto __13
	}
	value = uint32(0)

	// Decode the current block. Each base64 block consists of four input
	// characters A-Z, a-z, 0-9, +, or /. Each character supplies six bits
	// of output data, so each block's output is 24 bits (three bytes) in
	// length. The final block can be shorter by one or two bytes, denoted
	// by the input ending with one or two ='s, respectively.

	i = 0
__14:
	if !(i < 4) {
		goto __16
	}
	// Get the next input character. At end of input, pad with at most
	// two ='s. If more than two ='s would be needed, instead discard
	// the block read thus far.

	if !(data < dataend) {
		goto __17
	}
	c = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&data, 1)))
	goto __18
__17:
	if !(i > 1) {
		goto __19
	}
	c = uint8('=')
	goto __20
__19:
	if !(strict != 0 && i <= 1) {
		goto __21
	}
	// Single resp. unfulfilled char (each 4th next single
	// char) is rather bad64 error case in strict mode.

	goto bad64
__21:
	;
	cut = cut + 3
	goto __16
__20:
	;
__18:
	;

	// Load the character into the block value. Handle ='s specially
	// because they're only valid as the last character or two of the
	// final block of input. Unless strict mode is enabled, skip any
	// input whitespace characters.

	if !(cut != 0) {
		goto __22
	}
	if !(int32(c) == '=' && i > 1) {
		goto __24
	}
	value <<= 6
	cut++
	goto __25
__24:
	if !!(strict != 0) {
		goto __26
	}
	i--
	goto __27
__26:
	goto bad64
__27:
	;
__25:
	;
	goto __23
__22:
	if !(int32(c) >= 'A' && int32(c) <= 'Z') {
		goto __28
	}
	value = value<<6 | uint32((int32(c)-'A')&0x3F)
	goto __29
__28:
	if !(int32(c) >= 'a' && int32(c) <= 'z') {
		goto __30
	}
	value = value<<6 | uint32((int32(c)-'a'+26)&0x3F)
	goto __31
__30:
	if !(int32(c) >= '0' && int32(c) <= '9') {
		goto __32
	}
	value = value<<6 | uint32((int32(c)-'0'+52)&0x3F)
	goto __33
__32:
	if !(int32(c) == '+') {
		goto __34
	}
	value = value<<6 | uint32(0x3E)
	goto __35
__34:
	if !(int32(c) == '/') {
		goto __36
	}
	value = value<<6 | uint32(0x3F)
	goto __37
__36:
	if !(int32(c) == '=' && (!(strict != 0) || i > 1)) {
		goto __38
	}
	// "=" and "a=" is rather bad64 error case in strict mode.

	value <<= 6
	if !(i != 0) {
		goto __40
	}
	cut++
__40:
	;
	goto __39
__38:
	if !(strict != 0) {
		goto __41
	}
	goto bad64
	goto __42
__41:
	i--
__42:
	;
__39:
	;
__37:
	;
__35:
	;
__33:
	;
__31:
	;
__29:
	;
__23:
	;
	goto __15
__15:
	i++
	goto __14
	goto __16
__16:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(value >> 16 & uint32(0xFF))
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(value >> 8 & uint32(0xFF))
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&cursor, 1))) = uint8(value & uint32(0xFF))

	// Since = is only valid within the final block, if it was encountered
	// but there are still more input characters, confirm that strict mode
	// is off and all subsequent characters are whitespace.

	if !(cut != 0 && data < dataend) {
		goto __43
	}
	if !(strict != 0) {
		goto __44
	}
	goto bad64
__44:
	;
__43:
	;
	goto __12
__13:
	;
	XTcl_SetByteArrayLength(tls, resultObj, int32((int64(cursor)-int64(begin))/1-int64(cut)))
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK

bad64:
	if !(pure != 0) {
		goto __45
	}
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 64 /* ch */)) = Tcl_UniChar(c)
	goto __46
__45:
	// The decoder is byte-oriented. If we saw a byte that's not a
	// valid member of the base64 alphabet, it could be the lead byte
	// of a multi-byte character.

	// Safe because we know data is NUL-terminated
	if int32(uint8(*(*int8)(unsafe.Pointer(data - uintptr(1))))) < 0x80 {
		*(*Tcl_UniChar)(unsafe.Pointer(bp + 64)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(data - uintptr(1)))))
	} else {
		XTcl_UtfToUniChar(tls, data-uintptr(1), bp+64)
	}
__46:
	;

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+10785, libc.VaList(bp, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 64 /* ch */))),
			int32((int64(data)-int64(datastart))/1-int64(1)))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+10526, ts+10533, ts+10540, uintptr(0)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount, 1) > 1) {
		goto __47
	}
	goto __48
__47:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __49
	}

	if !((*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != XtclEmptyStringRep) {
		goto __51
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes)
__51:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = -1
__52:
	;
	*(*uintptr)(unsafe.Pointer(resultObj + 32)) = XtclFreeObjList
	XtclFreeObjList = resultObj
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
	goto __50
__49:
	XTclFreeObj(tls, resultObj)
__50:
	;
__48:
	;

	return TCL_ERROR
}

var optStrings4 = [2]uintptr{ts + 10548, uintptr(0)} /* tclBinary.c:2942:23 */

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// This is the !TCL_MEM_DEBUG case

//----------------------------------------------------------------------
//
// Tcl_Alloc --
//
//	Interface to TclpAlloc when TCL_MEM_DEBUG is disabled. It does check
//	that memory was actually allocated.
//
//----------------------------------------------------------------------

func XTcl_Alloc(tls *libc.TLS, size uint32) uintptr { /* tclCkalloc.c:1053:6: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var result uintptr

	result = XTclpAlloc(tls, size)

	// Most systems will not alloc(0), instead bumping it to one so that NULL
	// isn't returned. Some systems (AIX, Tru64) will alloc(0) by returning
	// NULL, so we have to check that the NULL we get is not in response to
	// alloc(0).
	//
	// The ANSI spec actually says that systems either return NULL *or* a
	// special pointer on failure, but we only check for NULL

	if result == uintptr(0) && size != 0 {
		XTcl_Panic(tls, ts+10830, libc.VaList(bp, size))
	}
	return result
}

func XTcl_DbCkalloc(tls *libc.TLS, size uint32, file uintptr, line int32) uintptr { /* tclCkalloc.c:1077:6: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var result uintptr

	result = XTclpAlloc(tls, size)

	if result == uintptr(0) && size != 0 {
		libc.Xfflush(tls, libc.X__acrt_iob_func(tls, uint32(1)))
		XTcl_Panic(tls, ts+10855, libc.VaList(bp, size, file, line))
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_AttemptAlloc --
//
//	Interface to TclpAlloc when TCL_MEM_DEBUG is disabled. It does not
//	check that memory was actually allocated.
//
//----------------------------------------------------------------------

func XTcl_AttemptAlloc(tls *libc.TLS, size uint32) uintptr { /* tclCkalloc.c:1105:6: */
	var result uintptr

	result = XTclpAlloc(tls, size)
	return result
}

func XTcl_AttemptDbCkalloc(tls *libc.TLS, size uint32, file uintptr, line int32) uintptr { /* tclCkalloc.c:1115:6: */
	var result uintptr
	_ = file
	_ = line

	result = XTclpAlloc(tls, size)
	return result
}

//----------------------------------------------------------------------
//
// Tcl_Realloc --
//
//	Interface to TclpRealloc when TCL_MEM_DEBUG is disabled. It does check
//	that memory was actually allocated.
//
//----------------------------------------------------------------------

func XTcl_Realloc(tls *libc.TLS, ptr uintptr, size uint32) uintptr { /* tclCkalloc.c:1140:6: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var result uintptr

	result = XTclpRealloc(tls, ptr, size)

	if result == uintptr(0) && size != 0 {
		XTcl_Panic(tls, ts+10892, libc.VaList(bp, size))
	}
	return result
}

func XTcl_DbCkrealloc(tls *libc.TLS, ptr uintptr, size uint32, file uintptr, line int32) uintptr { /* tclCkalloc.c:1155:6: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var result uintptr

	result = XTclpRealloc(tls, ptr, size)

	if result == uintptr(0) && size != 0 {
		libc.Xfflush(tls, libc.X__acrt_iob_func(tls, uint32(1)))
		XTcl_Panic(tls, ts+10919, libc.VaList(bp, size, file, line))
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_AttemptRealloc --
//
//	Interface to TclpRealloc when TCL_MEM_DEBUG is disabled. It does not
//	check that memory was actually allocated.
//
//----------------------------------------------------------------------

func XTcl_AttemptRealloc(tls *libc.TLS, ptr uintptr, size uint32) uintptr { /* tclCkalloc.c:1184:6: */
	var result uintptr

	result = XTclpRealloc(tls, ptr, size)
	return result
}

func XTcl_AttemptDbCkrealloc(tls *libc.TLS, ptr uintptr, size uint32, file uintptr, line int32) uintptr { /* tclCkalloc.c:1195:6: */
	var result uintptr
	_ = file
	_ = line

	result = XTclpRealloc(tls, ptr, size)
	return result
}

//----------------------------------------------------------------------
//
// Tcl_Free --
//
//	Interface to TclpFree when TCL_MEM_DEBUG is disabled. Done here rather
//	in the macro to keep some modules from being compiled with
//	TCL_MEM_DEBUG enabled and some with it disabled.
//
//----------------------------------------------------------------------

func XTcl_Free(tls *libc.TLS, ptr uintptr) { /* tclCkalloc.c:1223:1: */
	XTclpFree(tls, ptr)
}

func XTcl_DbCkfree(tls *libc.TLS, ptr uintptr, file uintptr, line int32) { /* tclCkalloc.c:1230:1: */
	_ = file
	_ = line
	XTclpFree(tls, ptr)
}

//----------------------------------------------------------------------
//
// Tcl_InitMemory --
//
//	Dummy initialization for memory command, which is only available if
//	TCL_MEM_DEBUG is on.
//
//----------------------------------------------------------------------
// ARGSUSED
func XTcl_InitMemory(tls *libc.TLS, interp uintptr) { /* tclCkalloc.c:1252:1: */
	_ = interp
}

func XTcl_DumpActiveMemory(tls *libc.TLS, fileName uintptr) int32 { /* tclCkalloc.c:1259:1: */
	_ = fileName
	return TCL_OK
}

func XTcl_ValidateAllMemory(tls *libc.TLS, file uintptr, line int32) { /* tclCkalloc.c:1267:1: */
	_ = file
	_ = line
}

func XTclDumpMemoryInfo(tls *libc.TLS, clientData ClientData, flags int32) int32 { /* tclCkalloc.c:1276:1: */
	_ = clientData
	_ = flags
	return 1
}

//---------------------------------------------------------------------------
//
// TclFinalizeMemorySubsystem --
//
//	This procedure is called to finalize all the structures that are used
//	by the memory allocator on a per-process basis.
//
// Results:
//	None.
//
// Side effects:
//	This subsystem is self-initializing, since memory can be allocated
//	before Tcl is formally initialized. After this call, this subsystem
//	has been reset to its initial state and is usable again.
//
//---------------------------------------------------------------------------

func XTclFinalizeMemorySubsystem(tls *libc.TLS) { /* tclCkalloc.c:1307:1: */

}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// indent-tabs-mode: nil
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Windows has mktime. The configurators do not check.

// Constants

// Table of the days in each month, leap and common years

var hath = [2][12]int32{
	{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
	{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
} /* tclClock.c:45:18 */
var daysInPriorMonths = [2][13]int32{
	{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365},
	{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366},
} /* tclClock.c:49:18 */

// Enumeration of the string literals used in [clock]

type ClockLiteral = uint32 /* tclClock.c:73:3 */
var literals = [22]uintptr{
	ts + 2631,
	ts + 10958,
	ts + 10982, ts + 10986,
	ts + 10988,
	ts + 11031,
	ts + 11034, ts + 11045, ts + 11055,
	ts + 11065, ts + 11069, ts + 11074,
	ts + 11084,
	ts + 11121, ts + 11133,
	ts + 11145, ts + 11155,
	ts + 11168,
	ts + 11174, ts + 11182, ts + 11189,
	ts + 11198,
} /* tclClock.c:74:19 */

// Structure containing the client data for [clock]

type ClockClientData = struct {
	FrefCount Size_t
	Fliterals uintptr
} /* tclClock.c:97:3 */

// Structure containing the fields used in [clock format] and [clock scan]

type TclDateFields1 = struct {
	Fseconds      Tcl_WideInt
	FlocalSeconds Tcl_WideInt
	FtzOffset     int32
	F__ccgo_pad1  [4]byte
	FtzName       uintptr
	FjulianDay    int32
	Fera          uint32
	Fgregorian    int32
	Fyear         int32
	FdayOfYear    int32
	Fmonth        int32
	FdayOfMonth   int32
	Fiso8601Year  int32
	Fiso8601Week  int32
	FdayOfWeek    int32
} /* tclClock.c:103:9 */

// Structure containing the fields used in [clock format] and [clock scan]

const ( /* tclClock.c:103:1: */
	BCE = 1
	CE  = 0
)

// Structure containing the fields used in [clock format] and [clock scan]

type TclDateFields = TclDateFields1                       /* tclClock.c:121:3 */
var eras = [3]uintptr{ts + 11031, ts + 10982, uintptr(0)} /* tclClock.c:122:19 */

// Thread specific data block holding a 'struct tm' for the 'gmtime' and
// 'localtime' library calls.

var tmKey Tcl_ThreadDataKey /* tclClock.c:129:26: */

// Structure containing description of "native" clock commands to create.

type ClockCommand = struct {
	Fname       uintptr
	FobjCmdProc uintptr
} /* tclClock.c:201:1 */

var clockCommands = [8]ClockCommand{
	{Fname: ts + 11203, FobjCmdProc: 0},
	{Fname: ts + 11210, FobjCmdProc: 0},
	{Fname: ts + 11218, FobjCmdProc: 0},
	{Fname: ts + 11236, FobjCmdProc: 0},
	{Fname: ts + 11250,
		FobjCmdProc: 0},
	{Fname: ts + 11282,
		FobjCmdProc: 0},
	{Fname: ts + 11313, FobjCmdProc: 0},
	{},
} /* tclClock.c:210:34 */

//----------------------------------------------------------------------
//
// TclClockInit --
//
//	Registers the 'clock' subcommands with the Tcl interpreter and
//	initializes its client data (which consists mostly of constant
//	Tcl_Obj's that it is too much trouble to keep recreating).
//
// Results:
//	None.
//
// Side effects:
//	Installs the commands and creates the client data
//
//----------------------------------------------------------------------

func XTclClockInit(tls *libc.TLS, interp uintptr) { /* tclClock.c:242:1: */
	bp := tls.Alloc(50)
	defer tls.Free(50)

	var clockCmdPtr uintptr
	// var cmdName [50]int8 at bp, 50
	// Buffer large enough to hold the string
	//::tcl::clock::GetJulianDayFromEraYearMonthDay
	// plus a terminating NUL.
	var data uintptr
	var i int32

	// Safe interps get [::clock] as alias to a parent, so do not need their
	// own copies of the support routines.

	if XTcl_IsSafe(tls, interp) != 0 {
		return
	}

	// Create the client data, which is a refcounted literal pool.

	data = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ClockClientData{})))
	(*ClockClientData)(unsafe.Pointer(data)).FrefCount = uint64(0)
	(*ClockClientData)(unsafe.Pointer(data)).Fliterals = XTcl_Alloc(tls, uint32(LIT__END*uint64(unsafe.Sizeof(uintptr(0)))))
	for i = 0; i < LIT__END; i++ {
		*(*uintptr)(unsafe.Pointer((*ClockClientData)(unsafe.Pointer(data)).Fliterals + uintptr(i)*8)) = XTcl_NewStringObj(tls, literals[i], -1)
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ClockClientData)(unsafe.Pointer(data)).Fliterals + uintptr(i)*8)))).FrefCount++
	}

	// Install the commands.
	// TODO - Let Tcl_MakeEnsemble do this?

	libc.Xmemcpy(tls, bp, ts+11329, uint64(TCL_CLOCK_PREFIX_LEN))
	for clockCmdPtr = uintptr(unsafe.Pointer(&clockCommands)); (*ClockCommand)(unsafe.Pointer(clockCmdPtr)).Fname != uintptr(0); clockCmdPtr += 16 {
		libc.Xstrcpy(tls, bp+uintptr(TCL_CLOCK_PREFIX_LEN), (*ClockCommand)(unsafe.Pointer(clockCmdPtr)).Fname)
		(*ClockClientData)(unsafe.Pointer(data)).FrefCount++
		XTcl_CreateObjCommand(tls, interp, bp, (*ClockCommand)(unsafe.Pointer(clockCmdPtr)).FobjCmdProc, data,
			*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sClockDeleteCmdProc})))
	}

	// Make the clock ensemble

	XTclMakeEnsemble(tls, interp, ts+11344, uintptr(unsafe.Pointer(&clockImplMap)))
}

var clockImplMap = [8]EnsembleImplMap{
	{Fname: ts + 2662, FcompileProc: 0},
	{Fname: ts + 11350, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 5739, FcompileProc: 0},
	{Fname: ts + 11357, Fproc: 0, FcompileProc: 0, FclientData: uintptr(int64(1))},
	{Fname: ts + 11370, Fproc: 0, FcompileProc: 0, FclientData: uintptr(int64(2))},
	{Fname: ts + 5883, FcompileProc: 0},
	{Fname: ts + 11174, Fproc: 0, FcompileProc: 0, FclientData: uintptr(int64(3))},
	{},
} /* tclClock.c:254:34 */

//----------------------------------------------------------------------
//
// ClockConvertlocaltoutcObjCmd --
//
//	Tcl command that converts a UTC time to a local time by whatever means
//	is available.
//
// Usage:
//	::tcl::clock::ConvertUTCToLocal dictionary tzdata changeover
//
// Parameters:
//	dict - Dictionary containing a 'localSeconds' entry.
//	tzdata - Time zone data
//	changeover - Julian Day of the adoption of the Gregorian calendar.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	On success, sets the interpreter result to the given dictionary
//	augmented with a 'seconds' field giving the UTC time. On failure,
//	leaves an error message in the interpreter result.
//
//----------------------------------------------------------------------

func sClockConvertlocaltoutcObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:333:1: */
	bp := tls.Alloc(84)
	defer tls.Free(84)

	var data uintptr = clientData
	var lit uintptr = (*ClockClientData)(unsafe.Pointer(data)).Fliterals
	// var secondsObj uintptr at bp, 8

	var dict uintptr
	// var changeover int32 at bp+80, 4

	// var fields TclDateFields at bp+8, 72

	var created int32 = 0
	var status int32

	// Check params and convert time.

	if objc != 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+11383)
		return TCL_ERROR
	}
	dict = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if XTcl_DictObjGet(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 16*8)),
		bp) != TCL_OK {
		return TCL_ERROR
	}
	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+11406, -1))
		return TCL_ERROR
	}
	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 8 + 8)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 8 + 8)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp)), bp+8+8)
		}()
	}() != TCL_OK ||
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 80)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+80)
		}() != TCL_OK ||
		sConvertLocalToUTC(tls, interp, bp+8, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp + 80))) != 0 {
		return TCL_ERROR
	}

	// Copy-on-write; set the 'seconds' field in the dictionary and place the
	// modified dictionary in the interpreter result.

	if (*Tcl_Obj)(unsafe.Pointer(dict)).FrefCount > 1 {
		dict = XTcl_DuplicateObj(tls, dict)
		created = 1
		(*Tcl_Obj)(unsafe.Pointer(dict)).FrefCount++
	}
	status = XTcl_DictObjPut(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 18*8)),
		XTcl_NewWideIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp+8 /* &fields */)).Fseconds))
	if status == TCL_OK {
		XTcl_SetObjResult(tls, interp, dict)
	}
	if created != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = dict
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return status
}

//----------------------------------------------------------------------
//
// ClockGetdatefieldsObjCmd --
//
//	Tcl command that determines the values that [clock format] will use in
//	formatting a date, and populates a dictionary with them.
//
// Usage:
//	::tcl::clock::GetDateFields seconds tzdata changeover
//
// Parameters:
//	seconds - Time expressed in seconds from the Posix epoch.
//	tzdata - Time zone data of the time zone in which time is to be
//		 expressed.
//	changeover - Julian Day Number at which the current locale adopted
//		     the Gregorian calendar
//
// Results:
//	Returns a dictonary populated with the fields:
//		seconds - Seconds from the Posix epoch
//		localSeconds - Nominal seconds from the Posix epoch in the
//			       local time zone.
//		tzOffset - Time zone offset in seconds east of Greenwich
//		tzName - Time zone name
//		julianDay - Julian Day Number in the local time zone
//
//----------------------------------------------------------------------

func XClockGetdatefieldsObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:425:1: */
	bp := tls.Alloc(76)
	defer tls.Free(76)

	// var fields TclDateFields at bp, 72

	var dict uintptr
	var data uintptr = clientData
	var lit uintptr = (*ClockClientData)(unsafe.Pointer(data)).Fliterals
	// var changeover int32 at bp+72, 4

	// Check params.

	if objc != 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+11449)
		return TCL_ERROR
	}
	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
		}()
	}() != TCL_OK ||
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 72)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+72)
		}() != TCL_OK {
		return TCL_ERROR
	}

	// fields.seconds could be an unsigned number that overflowed. Make sure
	// that it isn't.

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType)) {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(lit + 12*8)))
		return TCL_ERROR
	}

	// Convert UTC time to local.

	if sConvertUTCToLocal(tls, interp, bp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp + 72))) != TCL_OK {
		return TCL_ERROR
	}

	// Extract Julian day.

	(*TclDateFields)(unsafe.Pointer(bp /* &fields */)).FjulianDay = int32(((*TclDateFields)(unsafe.Pointer(bp)).FlocalSeconds + int64(JULIAN_DAY_POSIX_EPOCH)*int64(SECONDS_PER_DAY)) /
		int64(SECONDS_PER_DAY))

	// Convert to Julian or Gregorian calendar.

	sGetGregorianEraYearDay(tls, bp, *(*int32)(unsafe.Pointer(bp + 72 /* changeover */)))
	sGetMonthDay(tls, bp)
	sGetYearWeekDay(tls, bp, *(*int32)(unsafe.Pointer(bp + 72 /* changeover */)))

	dict = XTcl_NewDictObj(tls)
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 16*8)),
		XTcl_NewWideIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).FlocalSeconds))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 18*8)),
		XTcl_NewWideIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).Fseconds))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 19*8)), (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).FtzName)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*TclDateFields)(unsafe.Pointer(bp)).FtzName
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 20*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).FtzOffset))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 15*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).FjulianDay))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 11*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).Fgregorian))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 9*8)),
		*(*uintptr)(unsafe.Pointer(lit + uintptr(func() int32 {
			if (*TclDateFields)(unsafe.Pointer(bp)).Fera != 0 {
				return LIT_BCE
			}
			return LIT_CE
		}())*8)))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 21*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).Fyear))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 8*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).FdayOfYear))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 17*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).Fmonth))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 6*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).FdayOfMonth))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 14*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).Fiso8601Year))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 13*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).Fiso8601Week))
	XTcl_DictObjPut(tls, uintptr(0), dict, *(*uintptr)(unsafe.Pointer(lit + 7*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp /* &fields */)).FdayOfWeek))
	XTcl_SetObjResult(tls, interp, dict)

	return TCL_OK
}

//----------------------------------------------------------------------
//
// ClockGetjuliandayfromerayearmonthdayObjCmd --
//
//	Tcl command that converts a time from era-year-month-day to a Julian
//	Day Number.
//
// Parameters:
//	dict - Dictionary that contains 'era', 'year', 'month' and
//	       'dayOfMonth' keys.
//	changeover - Julian Day of changeover to the Gregorian calendar
//
// Results:
//	Result is either TCL_OK, with the interpreter result being the
//	dictionary augmented with a 'julianDay' key, or TCL_ERROR,
//	with the result being an error message.
//
//----------------------------------------------------------------------

func sFetchEraField(tls *libc.TLS, interp uintptr, dict uintptr, key uintptr, storePtr uintptr) int32 { /* tclClock.c:539:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	*(*uintptr)(unsafe.Pointer(bp /* value */)) = uintptr(0)

	if XTcl_DictObjGet(tls, interp, dict, key, bp) != TCL_OK {
		return TCL_ERROR
	}
	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+11475, -1))
		return TCL_ERROR
	}
	return XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* value */)), uintptr(unsafe.Pointer(&eras)), int32(unsafe.Sizeof(uintptr(0))), ts+11065, TCL_EXACT, storePtr)
}

func sFetchIntField(tls *libc.TLS, interp uintptr, dict uintptr, key uintptr, storePtr uintptr) int32 { /* tclClock.c:559:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	*(*uintptr)(unsafe.Pointer(bp /* value */)) = uintptr(0)

	if XTcl_DictObjGet(tls, interp, dict, key, bp) != TCL_OK {
		return TCL_ERROR
	}
	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+11475, -1))
		return TCL_ERROR
	}
	return func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(storePtr)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp)), storePtr)
	}()
}

func sClockGetjuliandayfromerayearmonthdayObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:579:1: */
	bp := tls.Alloc(84)
	defer tls.Free(84)

	// var fields TclDateFields at bp+8, 72

	var dict uintptr
	var data uintptr = clientData
	var lit uintptr = (*ClockClientData)(unsafe.Pointer(data)).Fliterals
	// var changeover int32 at bp+80, 4

	var copied int32 = 0
	var status int32
	*(*int32)(unsafe.Pointer(bp /* era */)) = 0

	// Check params.

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+11515)
		return TCL_ERROR
	}
	dict = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if sFetchEraField(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 9*8)), bp) != TCL_OK ||
		sFetchIntField(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 21*8)), bp+8+44) !=
			TCL_OK ||
		sFetchIntField(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 17*8)), bp+8+52) !=
			TCL_OK ||
		sFetchIntField(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 6*8)),
			bp+8+56) != TCL_OK ||
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 80)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+80)
		}() != TCL_OK {
		return TCL_ERROR
	}
	(*TclDateFields)(unsafe.Pointer(bp + 8 /* &fields */)).Fera = uint32(*(*int32)(unsafe.Pointer(bp /* era */)))

	// Get Julian day.

	sGetJulianDayFromEraYearMonthDay(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 80 /* changeover */)))

	// Store Julian day in the dictionary - copy on write.

	if (*Tcl_Obj)(unsafe.Pointer(dict)).FrefCount > 1 {
		dict = XTcl_DuplicateObj(tls, dict)
		(*Tcl_Obj)(unsafe.Pointer(dict)).FrefCount++
		copied = 1
	}
	status = XTcl_DictObjPut(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 15*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp+8 /* &fields */)).FjulianDay))
	if status == TCL_OK {
		XTcl_SetObjResult(tls, interp, dict)
	}
	if copied != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = dict
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return status
}

//----------------------------------------------------------------------
//
// ClockGetjuliandayfromerayearweekdayObjCmd --
//
//	Tcl command that converts a time from the ISO calendar to a Julian Day
//	Number.
//
// Parameters:
//	dict - Dictionary that contains 'era', 'iso8601Year', 'iso8601Week'
//	       and 'dayOfWeek' keys.
//	changeover - Julian Day of changeover to the Gregorian calendar
//
// Results:
//	Result is either TCL_OK, with the interpreter result being the
//	dictionary augmented with a 'julianDay' key, or TCL_ERROR, with the
//	result being an error message.
//
//----------------------------------------------------------------------

func sClockGetjuliandayfromerayearweekdayObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:663:1: */
	bp := tls.Alloc(84)
	defer tls.Free(84)

	// var fields TclDateFields at bp+8, 72

	var dict uintptr
	var data uintptr = clientData
	var lit uintptr = (*ClockClientData)(unsafe.Pointer(data)).Fliterals
	// var changeover int32 at bp+80, 4

	var copied int32 = 0
	var status int32
	*(*int32)(unsafe.Pointer(bp /* era */)) = 0

	// Check params.

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+11515)
		return TCL_ERROR
	}
	dict = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if sFetchEraField(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 9*8)), bp) != TCL_OK ||
		sFetchIntField(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 14*8)),
			bp+8+60) != TCL_OK ||
		sFetchIntField(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 13*8)),
			bp+8+64) != TCL_OK ||
		sFetchIntField(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 7*8)),
			bp+8+68) != TCL_OK ||
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 80)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+80)
		}() != TCL_OK {
		return TCL_ERROR
	}
	(*TclDateFields)(unsafe.Pointer(bp + 8 /* &fields */)).Fera = uint32(*(*int32)(unsafe.Pointer(bp /* era */)))

	// Get Julian day.

	sGetJulianDayFromEraYearWeekDay(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 80 /* changeover */)))

	// Store Julian day in the dictionary - copy on write.

	if (*Tcl_Obj)(unsafe.Pointer(dict)).FrefCount > 1 {
		dict = XTcl_DuplicateObj(tls, dict)
		(*Tcl_Obj)(unsafe.Pointer(dict)).FrefCount++
		copied = 1
	}
	status = XTcl_DictObjPut(tls, interp, dict, *(*uintptr)(unsafe.Pointer(lit + 15*8)),
		XTcl_NewIntObj(tls, (*TclDateFields)(unsafe.Pointer(bp+8 /* &fields */)).FjulianDay))
	if status == TCL_OK {
		XTcl_SetObjResult(tls, interp, dict)
	}
	if copied != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = dict
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return status
}

//----------------------------------------------------------------------
//
// ConvertLocalToUTC --
//
//	Converts a time (in a TclDateFields structure) from the local wall
//	clock to UTC.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Populates the 'seconds' field if successful; stores an error message
//	in the interpreter result on failure.
//
//----------------------------------------------------------------------

func sConvertLocalToUTC(tls *libc.TLS, interp uintptr, fields uintptr, tzdata uintptr, changeover int32) int32 { /* tclClock.c:744:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var rowc int32 at bp+8, 4
	// Number of rows in tzdata
	// var rowv uintptr at bp, 8
	// Pointers to the rows

	// Unpack the tz data.

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(tzdata)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(tzdata + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tzdata + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, tzdata, bp+8, bp)
	}() != TCL_OK {
		return TCL_ERROR
	}

	// Special case: If the time zone is :localtime, the tzdata will be empty.
	// Use 'mktime' to convert the time to local

	if *(*int32)(unsafe.Pointer(bp + 8)) == 0 {
		return sConvertLocalToUTCUsingC(tls, interp, fields, changeover)
	} else {
		return sConvertLocalToUTCUsingTable(tls, interp, fields, *(*int32)(unsafe.Pointer(bp + 8 /* rowc */)), *(*uintptr)(unsafe.Pointer(bp /* rowv */)))
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// ConvertLocalToUTCUsingTable --
//
//	Converts a time (in a TclDateFields structure) from local time in a
//	given time zone to UTC.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Stores an error message in the interpreter if an error occurs; if
//	successful, stores the 'seconds' field in 'fields.
//
//----------------------------------------------------------------------

func sConvertLocalToUTCUsingTable(tls *libc.TLS, interp uintptr, fields uintptr, rowc int32, rowv uintptr) int32 { /* tclClock.c:792:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var row uintptr
	// var cellc int32 at bp+8, 4

	// var cellv uintptr at bp, 8

	// var have [8]int32 at bp+12, 32

	var nHave int32 = 0
	var i int32
	var found int32

	// Perform an initial lookup assuming that local == UTC, and locate the
	// last time conversion prior to that time. Get the offset from that row,
	// and look up again. Continue until we find an offset that we found
	// before. This definition, rather than "the same offset" ensures that we
	// don't enter an endless loop, as would otherwise happen when trying to
	// convert a non-existent time such as 02:30 during the US Spring Daylight
	// Saving Time transition.

	found = 0
	(*TclDateFields)(unsafe.Pointer(fields)).FtzOffset = 0
	(*TclDateFields)(unsafe.Pointer(fields)).Fseconds = (*TclDateFields)(unsafe.Pointer(fields)).FlocalSeconds
	for !(found != 0) {
		row = sLookupLastTransition(tls, interp, (*TclDateFields)(unsafe.Pointer(fields)).Fseconds, rowc, rowv)
		if row == uintptr(0) ||
			func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(row)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
					return func() int32 {
						*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(row + 32)) + 16
						*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(row + 32)))).FelemCount
						return TCL_OK
					}()
				}
				return XTcl_ListObjGetElements(tls, interp, row, bp+8, bp)
			}() != TCL_OK ||
			func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
					return func() int32 {
						*(*int32)(unsafe.Pointer(fields + 16)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1*8)) + 32)))
						return TCL_OK
					}()
				}
				return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1*8)), fields+16)
			}() != TCL_OK {
			return TCL_ERROR
		}
		found = 0
		for i = 0; !(found != 0) && i < nHave; i++ {
			if *(*int32)(unsafe.Pointer(bp + 12 + uintptr(i)*4)) == (*TclDateFields)(unsafe.Pointer(fields)).FtzOffset {
				found = 1
				break
			}
		}
		if !(found != 0) {
			if nHave == 8 {
				XTcl_Panic(tls, ts+11531, 0)
			}
			*(*int32)(unsafe.Pointer(bp + 12 + uintptr(libc.PostIncInt32(&nHave, 1))*4)) = (*TclDateFields)(unsafe.Pointer(fields)).FtzOffset
		}
		(*TclDateFields)(unsafe.Pointer(fields)).Fseconds = (*TclDateFields)(unsafe.Pointer(fields)).FlocalSeconds - Tcl_WideInt((*TclDateFields)(unsafe.Pointer(fields)).FtzOffset)
	}
	(*TclDateFields)(unsafe.Pointer(fields)).FtzOffset = *(*int32)(unsafe.Pointer(bp + 12 + uintptr(i)*4))
	(*TclDateFields)(unsafe.Pointer(fields)).Fseconds = (*TclDateFields)(unsafe.Pointer(fields)).FlocalSeconds - Tcl_WideInt((*TclDateFields)(unsafe.Pointer(fields)).FtzOffset)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ConvertLocalToUTCUsingC --
//
//	Converts a time from local wall clock to UTC when the local time zone
//	cannot be determined. Uses 'mktime' to do the job.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Stores an error message in the interpreter if an error occurs; if
//	successful, stores the 'seconds' field in 'fields.
//
//----------------------------------------------------------------------

func sConvertLocalToUTCUsingC(tls *libc.TLS, interp uintptr, fields uintptr, changeover int32) int32 { /* tclClock.c:867:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	// var timeVal Tm at bp, 36

	var localErrno int32
	var secondOfDay int32
	var jsec Tcl_WideInt

	// Convert the given time to a date.

	jsec = (*TclDateFields)(unsafe.Pointer(fields)).FlocalSeconds + int64(JULIAN_DAY_POSIX_EPOCH)*int64(SECONDS_PER_DAY)
	(*TclDateFields)(unsafe.Pointer(fields)).FjulianDay = int32(jsec / int64(SECONDS_PER_DAY))
	secondOfDay = int32(jsec % int64(SECONDS_PER_DAY))
	if secondOfDay < 0 {
		secondOfDay = secondOfDay + SECONDS_PER_DAY
		(*TclDateFields)(unsafe.Pointer(fields)).FjulianDay--
	}
	sGetGregorianEraYearDay(tls, fields, changeover)
	sGetMonthDay(tls, fields)

	// Convert the date/time to a 'struct tm'.

	(*Tm)(unsafe.Pointer(bp /* &timeVal */)).Ftm_year = (*TclDateFields)(unsafe.Pointer(fields)).Fyear - 1900
	(*Tm)(unsafe.Pointer(bp /* &timeVal */)).Ftm_mon = (*TclDateFields)(unsafe.Pointer(fields)).Fmonth - 1
	(*Tm)(unsafe.Pointer(bp /* &timeVal */)).Ftm_mday = (*TclDateFields)(unsafe.Pointer(fields)).FdayOfMonth
	(*Tm)(unsafe.Pointer(bp /* &timeVal */)).Ftm_hour = secondOfDay / 3600 % 24
	(*Tm)(unsafe.Pointer(bp /* &timeVal */)).Ftm_min = secondOfDay / 60 % 60
	(*Tm)(unsafe.Pointer(bp /* &timeVal */)).Ftm_sec = secondOfDay % 60
	(*Tm)(unsafe.Pointer(bp /* &timeVal */)).Ftm_isdst = -1
	(*Tm)(unsafe.Pointer(bp /* &timeVal */)).Ftm_wday = -1
	(*Tm)(unsafe.Pointer(bp /* &timeVal */)).Ftm_yday = -1

	// Get local time. It is rumored that mktime is not thread safe on some
	// platforms, so seize a mutex before attempting this.

	sTzsetIfNecessary(tls)

	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = 0
	(*TclDateFields)(unsafe.Pointer(fields)).Fseconds = mktime(tls, bp)
	localErrno = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))

	// If conversion fails, report an error.

	if localErrno != 0 ||
		(*TclDateFields)(unsafe.Pointer(fields)).Fseconds == int64(-1) && (*Tm)(unsafe.Pointer(bp)).Ftm_yday == -1 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+11567, -1))
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ConvertUTCToLocal --
//
//	Converts a time (in a TclDateFields structure) from UTC to local time.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Populates the 'tzName' and 'tzOffset' fields.
//
//----------------------------------------------------------------------

func sConvertUTCToLocal(tls *libc.TLS, interp uintptr, fields uintptr, tzdata uintptr, changeover int32) int32 { /* tclClock.c:947:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var rowc int32 at bp+8, 4
	// Number of rows in tzdata
	// var rowv uintptr at bp, 8
	// Pointers to the rows

	// Unpack the tz data.

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(tzdata)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(tzdata + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tzdata + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, tzdata, bp+8, bp)
	}() != TCL_OK {
		return TCL_ERROR
	}

	// Special case: If the time zone is :localtime, the tzdata will be empty.
	// Use 'localtime' to convert the time to local

	if *(*int32)(unsafe.Pointer(bp + 8)) == 0 {
		return sConvertUTCToLocalUsingC(tls, interp, fields, changeover)
	} else {
		return sConvertUTCToLocalUsingTable(tls, interp, fields, *(*int32)(unsafe.Pointer(bp + 8 /* rowc */)), *(*uintptr)(unsafe.Pointer(bp /* rowv */)))
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// ConvertUTCToLocalUsingTable --
//
//	Converts UTC to local time, given a table of transition points
//
// Results:
//	Returns a standard Tcl result
//
// Side effects:
//	On success, fills fields->tzName, fields->tzOffset and
//	fields->localSeconds. On failure, places an error message in the
//	interpreter result.
//
//----------------------------------------------------------------------

func sConvertUTCToLocalUsingTable(tls *libc.TLS, interp uintptr, fields uintptr, rowc int32, rowv uintptr) int32 { /* tclClock.c:995:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var row uintptr // Row containing the current information
	// var cellc int32 at bp+8, 4
	// Count of cells in the row (must be 4)
	// var cellv uintptr at bp, 8
	// Pointers to the cells

	// Look up the nearest transition time.

	row = sLookupLastTransition(tls, interp, (*TclDateFields)(unsafe.Pointer(fields)).Fseconds, rowc, rowv)
	if row == uintptr(0) || func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(row)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(row + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(row + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, row, bp+8, bp)
	}() != TCL_OK || func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(fields + 16)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 1*8)), fields+16)
	}() != TCL_OK {
		return TCL_ERROR
	}

	// Convert the time.

	(*TclDateFields)(unsafe.Pointer(fields)).FtzName = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* cellv */)) + 3*8))
	(*Tcl_Obj)(unsafe.Pointer((*TclDateFields)(unsafe.Pointer(fields)).FtzName)).FrefCount++
	(*TclDateFields)(unsafe.Pointer(fields)).FlocalSeconds = (*TclDateFields)(unsafe.Pointer(fields)).Fseconds + Tcl_WideInt((*TclDateFields)(unsafe.Pointer(fields)).FtzOffset)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ConvertUTCToLocalUsingC --
//
//	Converts UTC to localtime in cases where the local time zone is not
//	determinable, using the C 'localtime' function to do it.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	On success, fills fields->tzName, fields->tzOffset and
//	fields->localSeconds. On failure, places an error message in the
//	interpreter result.
//
//----------------------------------------------------------------------

func sConvertUTCToLocalUsingC(tls *libc.TLS, interp uintptr, fields uintptr, changeover int32) int32 { /* tclClock.c:1047:1: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	// var tock Time_t at bp+72, 8

	var timeVal uintptr // Time after conversion
	var diff int32      // Time zone diff local-Greenwich
	// var buffer [16]int8 at bp+80, 16
	// Buffer for time zone name

	// Use 'localtime' to determine local year, month, day, time of day.

	*(*Time_t)(unsafe.Pointer(bp + 72 /* tock */)) = (*TclDateFields)(unsafe.Pointer(fields)).Fseconds
	if *(*Time_t)(unsafe.Pointer(bp + 72)) != (*TclDateFields)(unsafe.Pointer(fields)).Fseconds {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+11607, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+11653, ts+11659, uintptr(0)))
		return TCL_ERROR
	}
	sTzsetIfNecessary(tls)
	timeVal = sThreadSafeLocalTime(tls, bp+72)
	if timeVal == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

			ts+11671, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+11653, ts+11738, uintptr(0)))
		return TCL_ERROR
	}

	// Fill in the date in 'fields' and use it to derive Julian Day.

	(*TclDateFields)(unsafe.Pointer(fields)).Fera = CE
	(*TclDateFields)(unsafe.Pointer(fields)).Fyear = (*Tm)(unsafe.Pointer(timeVal)).Ftm_year + 1900
	(*TclDateFields)(unsafe.Pointer(fields)).Fmonth = (*Tm)(unsafe.Pointer(timeVal)).Ftm_mon + 1
	(*TclDateFields)(unsafe.Pointer(fields)).FdayOfMonth = (*Tm)(unsafe.Pointer(timeVal)).Ftm_mday
	sGetJulianDayFromEraYearMonthDay(tls, fields, changeover)

	// Convert that value to seconds.

	(*TclDateFields)(unsafe.Pointer(fields)).FlocalSeconds = ((Tcl_WideInt((*TclDateFields)(unsafe.Pointer(fields)).FjulianDay)*int64(24)+
		Tcl_WideInt((*Tm)(unsafe.Pointer(timeVal)).Ftm_hour))*int64(60)+Tcl_WideInt((*Tm)(unsafe.Pointer(timeVal)).Ftm_min))*int64(60) +
		Tcl_WideInt((*Tm)(unsafe.Pointer(timeVal)).Ftm_sec) - int64(JULIAN_DAY_POSIX_EPOCH)*int64(SECONDS_PER_DAY)

	// Determine a time zone offset and name; just use +hhmm for the name.

	diff = int32((*TclDateFields)(unsafe.Pointer(fields)).FlocalSeconds - (*TclDateFields)(unsafe.Pointer(fields)).Fseconds)
	(*TclDateFields)(unsafe.Pointer(fields)).FtzOffset = diff
	if diff < 0 {
		*(*int8)(unsafe.Pointer(bp + 80)) = int8('-')
		diff = -diff
	} else {
		*(*int8)(unsafe.Pointer(bp + 80)) = int8('+')
	}
	libc.Xsprintf(tls, bp+80+uintptr(1), ts+11754, libc.VaList(bp+48, diff/3600))
	diff = diff % 3600
	libc.Xsprintf(tls, bp+80+uintptr(3), ts+11754, libc.VaList(bp+56, diff/60))
	diff = diff % 60
	if diff > 0 {
		libc.Xsprintf(tls, bp+80+uintptr(5), ts+11754, libc.VaList(bp+64, diff))
	}
	(*TclDateFields)(unsafe.Pointer(fields)).FtzName = XTcl_NewStringObj(tls, bp+80, -1)
	(*Tcl_Obj)(unsafe.Pointer((*TclDateFields)(unsafe.Pointer(fields)).FtzName)).FrefCount++
	return TCL_OK
}

//----------------------------------------------------------------------
//
// LookupLastTransition --
//
//	Given a UTC time and a tzdata array, looks up the last transition on
//	or before the given time.
//
// Results:
//	Returns a pointer to the row, or NULL if an error occurs.
//
//----------------------------------------------------------------------

func sLookupLastTransition(tls *libc.TLS, interp uintptr, tick Tcl_WideInt, rowc int32, rowv uintptr) uintptr { /* tclClock.c:1134:16: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var l int32
	var u int32
	// var compObj uintptr at bp, 8

	// var compVal Tcl_WideInt at bp+8, 8

	// Examine the first row to make sure we're in bounds.

	if XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(rowv)), 0, bp) != TCL_OK ||
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32))
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
					return func() int32 {
						*(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32)))
						return TCL_OK
					}()
				}
				return XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp)), bp+8)
			}()
		}() != TCL_OK {
		return uintptr(0)
	}

	// Bizarre case - first row doesn't begin at MIN_WIDE_INT. Return it
	// anyway.

	if tick < *(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) {
		return *(*uintptr)(unsafe.Pointer(rowv))
	}

	// Binary-search to find the transition.

	l = 0
	u = rowc - 1
	for l < u {
		var m int32 = (l + u + 1) / 2

		if XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(rowv + uintptr(m)*8)), 0, bp) != TCL_OK || func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32))
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
					return func() int32 {
						*(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32)))
						return TCL_OK
					}()
				}
				return XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp)), bp+8)
			}()
		}() != TCL_OK {
			return uintptr(0)
		}
		if tick >= *(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) {
			l = m
		} else {
			u = m - 1
		}
	}
	return *(*uintptr)(unsafe.Pointer(rowv + uintptr(l)*8))
}

//----------------------------------------------------------------------
//
// GetYearWeekDay --
//
//	Given a date with Julian Calendar Day, compute the year, week, and day
//	in the ISO8601 calendar.
//
// Results:
//	None.
//
// Side effects:
//	Stores 'iso8601Year', 'iso8601Week' and 'dayOfWeek' in the date
//	fields.
//
//----------------------------------------------------------------------

func sGetYearWeekDay(tls *libc.TLS, fields uintptr, changeover int32) { /* tclClock.c:1205:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	// var temp TclDateFields at bp, 72

	var dayOfFiscalYear int32

	// Find the given date, minus three days, plus one year. That date's
	// iso8601 year is an upper bound on the ISO8601 year of the given date.

	(*TclDateFields)(unsafe.Pointer(bp /* &temp */)).FjulianDay = (*TclDateFields)(unsafe.Pointer(fields)).FjulianDay - 3
	sGetGregorianEraYearDay(tls, bp, changeover)
	if (*TclDateFields)(unsafe.Pointer(bp)).Fera == BCE {
		(*TclDateFields)(unsafe.Pointer(bp /* &temp */)).Fiso8601Year = (*TclDateFields)(unsafe.Pointer(bp)).Fyear - 1
	} else {
		(*TclDateFields)(unsafe.Pointer(bp /* &temp */)).Fiso8601Year = (*TclDateFields)(unsafe.Pointer(bp)).Fyear + 1
	}
	(*TclDateFields)(unsafe.Pointer(bp /* &temp */)).Fiso8601Week = 1
	(*TclDateFields)(unsafe.Pointer(bp /* &temp */)).FdayOfWeek = 1
	sGetJulianDayFromEraYearWeekDay(tls, bp, changeover)

	// temp.julianDay is now the start of an ISO8601 year, either the one
	// corresponding to the given date, or the one after. If we guessed high,
	// move one year earlier

	if (*TclDateFields)(unsafe.Pointer(fields)).FjulianDay < (*TclDateFields)(unsafe.Pointer(bp)).FjulianDay {
		if (*TclDateFields)(unsafe.Pointer(bp)).Fera == BCE {
			*(*int32)(unsafe.Pointer(bp + 60)) += 1
		} else {
			*(*int32)(unsafe.Pointer(bp + 60)) -= 1
		}
		sGetJulianDayFromEraYearWeekDay(tls, bp, changeover)
	}

	(*TclDateFields)(unsafe.Pointer(fields)).Fiso8601Year = (*TclDateFields)(unsafe.Pointer(bp /* &temp */)).Fiso8601Year
	dayOfFiscalYear = (*TclDateFields)(unsafe.Pointer(fields)).FjulianDay - (*TclDateFields)(unsafe.Pointer(bp)).FjulianDay
	(*TclDateFields)(unsafe.Pointer(fields)).Fiso8601Week = dayOfFiscalYear/7 + 1
	(*TclDateFields)(unsafe.Pointer(fields)).FdayOfWeek = (dayOfFiscalYear + 1) % 7
	if (*TclDateFields)(unsafe.Pointer(fields)).FdayOfWeek < 1 {
		*(*int32)(unsafe.Pointer(fields + 68)) += 7
	}
}

//----------------------------------------------------------------------
//
// GetGregorianEraYearDay --
//
//	Given a Julian Day Number, extracts the year and day of the year and
//	puts them into TclDateFields, along with the era (BCE or CE) and a
//	flag indicating whether the date is Gregorian or Julian.
//
// Results:
//	None.
//
// Side effects:
//	Stores 'era', 'gregorian', 'year', and 'dayOfYear'.
//
//----------------------------------------------------------------------

func sGetGregorianEraYearDay(tls *libc.TLS, fields uintptr, changeover int32) { /* tclClock.c:1272:1: */
	var jday int32 = (*TclDateFields)(unsafe.Pointer(fields)).FjulianDay
	var day int32
	var year int32
	var n int32

	if jday >= changeover {
		// Gregorian calendar.

		(*TclDateFields)(unsafe.Pointer(fields)).Fgregorian = 1
		year = 1

		// n = Number of 400-year cycles since 1 January, 1 CE in the
		// proleptic Gregorian calendar. day = remaining days.

		day = jday - JDAY_1_JAN_1_CE_GREGORIAN
		n = day / FOUR_CENTURIES
		day = day % FOUR_CENTURIES
		if day < 0 {
			day = day + FOUR_CENTURIES
			n--
		}
		year = year + 400*n

		// n = number of centuries since the start of (year);
		// day = remaining days

		n = day / ONE_CENTURY_GREGORIAN
		day = day % ONE_CENTURY_GREGORIAN
		if n > 3 {
			// 31 December in the last year of a 400-year cycle.

			n = 3
			day = day + ONE_CENTURY_GREGORIAN
		}
		year = year + 100*n
	} else {
		// Julian calendar.

		(*TclDateFields)(unsafe.Pointer(fields)).Fgregorian = 0
		year = 1
		day = jday - JDAY_1_JAN_1_CE_JULIAN
	}

	// n = number of 4-year cycles; days = remaining days.

	n = day / FOUR_YEARS
	day = day % FOUR_YEARS
	if day < 0 {
		day = day + FOUR_YEARS
		n--
	}
	year = year + 4*n

	// n = number of years; days = remaining days.

	n = day / ONE_YEAR
	day = day % ONE_YEAR
	if n > 3 {
		// 31 December of a leap year.

		n = 3
		day = day + 365
	}
	year = year + n

	// store era/year/day back into fields.

	if year <= 0 {
		(*TclDateFields)(unsafe.Pointer(fields)).Fera = BCE
		(*TclDateFields)(unsafe.Pointer(fields)).Fyear = 1 - year
	} else {
		(*TclDateFields)(unsafe.Pointer(fields)).Fera = CE
		(*TclDateFields)(unsafe.Pointer(fields)).Fyear = year
	}
	(*TclDateFields)(unsafe.Pointer(fields)).FdayOfYear = day + 1
}

//----------------------------------------------------------------------
//
// GetMonthDay --
//
//	Given a date as year and day-of-year, find month and day.
//
// Results:
//	None.
//
// Side effects:
//	Stores 'month' and 'dayOfMonth' in the 'fields' structure.
//
//----------------------------------------------------------------------

func sGetMonthDay(tls *libc.TLS, fields uintptr) { /* tclClock.c:1388:1: */
	var day int32 = (*TclDateFields)(unsafe.Pointer(fields)).FdayOfYear
	var month int32
	var h uintptr = uintptr(unsafe.Pointer(&hath)) + uintptr(sIsGregorianLeapYear(tls, fields))*48

	for month = 0; month < 12 && day > *(*int32)(unsafe.Pointer(h + uintptr(month)*4)); month++ {
		day = day - *(*int32)(unsafe.Pointer(h + uintptr(month)*4))
	}
	(*TclDateFields)(unsafe.Pointer(fields)).Fmonth = month + 1
	(*TclDateFields)(unsafe.Pointer(fields)).FdayOfMonth = day
}

//----------------------------------------------------------------------
//
// GetJulianDayFromEraYearWeekDay --
//
//	Given a TclDateFields structure containing era, ISO8601 year, ISO8601
//	week, and day of week, computes the Julian Day Number.
//
// Results:
//	None.
//
// Side effects:
//	Stores 'julianDay' in the fields.
//
//----------------------------------------------------------------------

func sGetJulianDayFromEraYearWeekDay(tls *libc.TLS, fields uintptr, changeover int32) { /* tclClock.c:1420:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var firstMonday int32 // Julian day number of week 1, day 1 in the
	// given year
	// var firstWeek TclDateFields at bp, 72

	// Find January 4 in the ISO8601 year, which will always be in week 1.

	(*TclDateFields)(unsafe.Pointer(bp /* &firstWeek */)).Fera = (*TclDateFields)(unsafe.Pointer(fields)).Fera
	(*TclDateFields)(unsafe.Pointer(bp /* &firstWeek */)).Fyear = (*TclDateFields)(unsafe.Pointer(fields)).Fiso8601Year
	(*TclDateFields)(unsafe.Pointer(bp /* &firstWeek */)).Fmonth = 1
	(*TclDateFields)(unsafe.Pointer(bp /* &firstWeek */)).FdayOfMonth = 4
	sGetJulianDayFromEraYearMonthDay(tls, bp, changeover)

	// Find Monday of week 1.

	firstMonday = sWeekdayOnOrBefore(tls, 1, (*TclDateFields)(unsafe.Pointer(bp /* &firstWeek */)).FjulianDay)

	// Advance to the given week and day.

	(*TclDateFields)(unsafe.Pointer(fields)).FjulianDay = firstMonday + 7*((*TclDateFields)(unsafe.Pointer(fields)).Fiso8601Week-1) +
		(*TclDateFields)(unsafe.Pointer(fields)).FdayOfWeek - 1
}

//----------------------------------------------------------------------
//
// GetJulianDayFromEraYearMonthDay --
//
//	Given era, year, month, and dayOfMonth (in TclDateFields), and the
//	Gregorian transition date, computes the Julian Day Number.
//
// Results:
//	None.
//
// Side effects:
//	Stores day number in 'julianDay'
//
//----------------------------------------------------------------------

func sGetJulianDayFromEraYearMonthDay(tls *libc.TLS, fields uintptr, changeover int32) { /* tclClock.c:1471:1: */
	var year int32
	var ym1 int32
	var month int32
	var mm1 int32
	var q int32
	var r int32
	var ym1o4 int32
	var ym1o100 int32
	var ym1o400 int32

	if (*TclDateFields)(unsafe.Pointer(fields)).Fera == BCE {
		year = 1 - (*TclDateFields)(unsafe.Pointer(fields)).Fyear
	} else {
		year = (*TclDateFields)(unsafe.Pointer(fields)).Fyear
	}

	// Reduce month modulo 12.

	month = (*TclDateFields)(unsafe.Pointer(fields)).Fmonth
	mm1 = month - 1
	q = mm1 / 12
	r = mm1 % 12
	if r < 0 {
		r = r + 12
		q = q - 1
	}
	year = year + q
	month = r + 1
	ym1 = year - 1

	// Adjust the year after reducing the month.

	(*TclDateFields)(unsafe.Pointer(fields)).Fgregorian = 1
	if year < 1 {
		(*TclDateFields)(unsafe.Pointer(fields)).Fera = BCE
		(*TclDateFields)(unsafe.Pointer(fields)).Fyear = 1 - year
	} else {
		(*TclDateFields)(unsafe.Pointer(fields)).Fera = CE
		(*TclDateFields)(unsafe.Pointer(fields)).Fyear = year
	}

	// Try an initial conversion in the Gregorian calendar.

	// Have to make sure quotient is truncated towards 0 when negative.
	// See above bug for details. The casts are necessary.
	if ym1 >= 0 {
		ym1o4 = ym1 / 4
	} else {
		ym1o4 = -int32(uint32(-ym1) / uint32(4))
	}
	if ym1%4 < 0 {
		ym1o4--
	}
	ym1o100 = ym1 / 100
	if ym1%100 < 0 {
		ym1o100--
	}
	ym1o400 = ym1 / 400
	if ym1%400 < 0 {
		ym1o400--
	}
	(*TclDateFields)(unsafe.Pointer(fields)).FjulianDay = JDAY_1_JAN_1_CE_GREGORIAN - 1 +
		(*TclDateFields)(unsafe.Pointer(fields)).FdayOfMonth +
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&daysInPriorMonths)) + uintptr(sIsGregorianLeapYear(tls, fields))*52 + uintptr(month-1)*4)) +
		ONE_YEAR*ym1 +
		ym1o4 -
		ym1o100 +
		ym1o400

	// If the resulting date is before the Gregorian changeover, convert in
	// the Julian calendar instead.

	if (*TclDateFields)(unsafe.Pointer(fields)).FjulianDay < changeover {
		(*TclDateFields)(unsafe.Pointer(fields)).Fgregorian = 0
		(*TclDateFields)(unsafe.Pointer(fields)).FjulianDay = JDAY_1_JAN_1_CE_JULIAN - 1 +
			(*TclDateFields)(unsafe.Pointer(fields)).FdayOfMonth +
			*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&daysInPriorMonths)) + uintptr(libc.Bool32(year%4 == 0))*52 + uintptr(month-1)*4)) +
			365*ym1 +
			ym1o4
	}
}

//----------------------------------------------------------------------
//
// IsGregorianLeapYear --
//
//	Tests whether a given year is a leap year, in either Julian or
//	Gregorian calendar.
//
// Results:
//	Returns 1 for a leap year, 0 otherwise.
//
//----------------------------------------------------------------------

func sIsGregorianLeapYear(tls *libc.TLS, fields uintptr) int32 { /* tclClock.c:1578:1: */
	var year int32 = (*TclDateFields)(unsafe.Pointer(fields)).Fyear

	if (*TclDateFields)(unsafe.Pointer(fields)).Fera == BCE {
		year = 1 - year
	}
	if year%4 != 0 {
		return 0
	} else if !((*TclDateFields)(unsafe.Pointer(fields)).Fgregorian != 0) {
		return 1
	} else if year%400 == 0 {
		return 1
	} else if year%100 == 0 {
		return 0
	} else {
		return 1
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// WeekdayOnOrBefore --
//
//	Finds the Julian Day Number of a given day of the week that falls on
//	or before a given date, expressed as Julian Day Number.
//
// Results:
//	Returns the Julian Day Number
//
//----------------------------------------------------------------------

func sWeekdayOnOrBefore(tls *libc.TLS, dayOfWeek int32, julianDay int32) int32 { /* tclClock.c:1614:1: */
	var k int32 = (dayOfWeek + 6) % 7
	if k < 0 {
		k = k + 7
	}
	return julianDay - (julianDay-k)%7
}

//----------------------------------------------------------------------
//
// ClockGetenvObjCmd --
//
//	Tcl command that reads an environment variable from the system
//
// Usage:
//	::tcl::clock::getEnv NAME
//
// Parameters:
//	NAME - Name of the environment variable desired
//
// Results:
//	Returns a standard Tcl result. Returns an error if the variable does
//	not exist, with a message left in the interpreter. Returns TCL_OK and
//	the value of the variable if the variable does exist,
//
//----------------------------------------------------------------------

func XClockGetenvObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:1647:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var varName uintptr
	var varValue uintptr
	// var ds Tcl_DString at bp, 216

	_ = clientData

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	varName = XTcl_WinUtfToTChar(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}(), -1, bp)
	varValue = libc.X_wgetenv(tls, varName)
	XTcl_DStringFree(tls, bp)
	if varValue == uintptr(0) {
		varValue = wtext + 90
	}
	XTcl_WinTCharToUtf(tls, varValue, -1, bp)
	XTcl_DStringResult(tls, interp, bp)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ThreadSafeLocalTime --
//
//	Wrapper around the 'localtime' library function to make it thread
//	safe.
//
// Results:
//	Returns a pointer to a 'struct tm' in thread-specific data.
//
// Side effects:
//	Invokes localtime or localtime_r as appropriate.
//
//----------------------------------------------------------------------

func sThreadSafeLocalTime(tls *libc.TLS, timePtr uintptr) uintptr { /* tclClock.c:1704:18: */
	// Get a thread-local buffer to hold the returned time.

	var tmPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&tmKey)), int32(unsafe.Sizeof(Tm{})))
	var sysTmPtr uintptr

	sysTmPtr = localtime(tls, timePtr)
	if sysTmPtr == uintptr(0) {

		return uintptr(0)
	}
	libc.Xmemcpy(tls, tmPtr, localtime(tls, timePtr), uint64(unsafe.Sizeof(Tm{})))

	return tmPtr
}

// ----------------------------------------------------------------------
//
// ClockClicksObjCmd --
//
//	Returns a high-resolution counter.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	None.
//
// This function implements the 'clock clicks' Tcl command. Refer to the user
// documentation for details on what it does.
//
//----------------------------------------------------------------------

func XClockClicksObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:1750:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	*(*int32)(unsafe.Pointer(bp /* index */)) = 2 /* CLICKS_NATIVE */
	// var now Tcl_Time at bp+4, 8

	var clicks Tcl_WideInt = int64(0)
	_ = clientData

	switch objc {
	case 1:
		break
	case 2:
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&clicksSwitches)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK {
			return TCL_ERROR
		}
		break
	default:
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+11759)
		return TCL_ERROR
	}

	switch *(*int32)(unsafe.Pointer(bp /* index */)) {
	case 0 /* CLICKS_MILLIS */ :
		XTcl_GetTime(tls, bp+4)
		clicks = Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp+4)).Fsec)*int64(1000) + Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp+4)).Fusec/1000)
		break
	case 2 /* CLICKS_NATIVE */ :
		clicks = XTclpGetWideClicks(tls)
		break
	case 1 /* CLICKS_MICROS */ :
		clicks = XTclpGetMicroseconds(tls)
		break
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, clicks))
	return TCL_OK
}

var clicksSwitches = [3]uintptr{
	ts + 11769, ts + 11783, uintptr(0),
} /* tclClock.c:1756:23 */

// ----------------------------------------------------------------------
//
// ClockMillisecondsObjCmd -
//
//	Returns a count of milliseconds since the epoch.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	None.
//
// This function implements the 'clock milliseconds' Tcl command. Refer to the
// user documentation for details on what it does.
//
//----------------------------------------------------------------------

func XClockMillisecondsObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:1821:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var now Tcl_Time at bp, 8

	_ = clientData

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}
	XTcl_GetTime(tls, bp)
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp)).Fsec)*int64(1000)+Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp)).Fusec/1000)))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// ClockMicrosecondsObjCmd -
//
//	Returns a count of microseconds since the epoch.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	None.
//
// This function implements the 'clock microseconds' Tcl command. Refer to the
// user documentation for details on what it does.
//
//----------------------------------------------------------------------

func XClockMicrosecondsObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:1859:1: */
	_ = clientData
	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, XTclpGetMicroseconds(tls)))
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// ClockParseformatargsObjCmd --
//
//	Parses the arguments for [clock format].
//
// Results:
//	Returns a standard Tcl result, whose value is a four-element list
//	comprising the time format, the locale, and the timezone.
//
// This function exists because the loop that parses the [clock format]
// options is a known performance "hot spot", and is implemented in an effort
// to speed that particular code up.
//
//-----------------------------------------------------------------------------

func sClockParseformatargsObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:1893:1: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	var dataPtr uintptr = clientData
	var litPtr uintptr = (*ClockClientData)(unsafe.Pointer(dataPtr)).Fliterals
	// var results [3]uintptr at bp+80, 24
	// Format, locale and timezone
	*(*int32)(unsafe.Pointer(bp + 108 /* gmtFlag */)) = 0
	// var optionIndex int32 at bp+104, 4
	// Index of an option.
	var saw int32 = 0 // Flag == 1 if option was seen already.
	// var clockVal Tcl_WideInt at bp+112, 8
	// Clock value - just used to parse.
	var i int32

	// Args consist of a time followed by keyword-value pairs.

	if objc < 2 || objc%2 != 0 {
		XTcl_WrongNumArgs(tls, interp, 0, objv,

			ts+11797)
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+11653, ts+11885, uintptr(0)))
		return TCL_ERROR
	}

	// Extract values for the keywords.

	*(*uintptr)(unsafe.Pointer(bp + 80)) = *(*uintptr)(unsafe.Pointer(litPtr + 1*8))
	*(*uintptr)(unsafe.Pointer(bp + 80 + 1*8)) = *(*uintptr)(unsafe.Pointer(litPtr + 3*8))
	*(*uintptr)(unsafe.Pointer(bp + 80 + 2*8)) = *(*uintptr)(unsafe.Pointer(litPtr))
	for i = 2; i < objc; i = i + 2 {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+104) != TCL_OK {
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+11653, ts+11898,
				XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))), uintptr(0)))
			return TCL_ERROR
		}
		switch *(*int32)(unsafe.Pointer(bp + 104 /* optionIndex */)) {
		case 0 /* CLOCK_FORMAT_FORMAT */ :
			*(*uintptr)(unsafe.Pointer(bp + 80)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
			break
		case 1 /* CLOCK_FORMAT_GMT */ :
			if XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+108) != TCL_OK {
				return TCL_ERROR
			}
			break
		case 2 /* CLOCK_FORMAT_LOCALE */ :
			*(*uintptr)(unsafe.Pointer(bp + 80 + 1*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
			break
		case 3 /* CLOCK_FORMAT_TIMEZONE */ :
			*(*uintptr)(unsafe.Pointer(bp + 80 + 2*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
			break
		}
		saw = saw | int32(1)<<*(*int32)(unsafe.Pointer(bp + 104))
	}

	// Check options.

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 112)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 112)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+112)
		}()
	}() != TCL_OK {
		return TCL_ERROR
	}
	if saw&(int32(1)<<1) != 0 &&
		saw&(int32(1)<<3) != 0 {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(litPtr + 4*8)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+11653, ts+11908, uintptr(0)))
		return TCL_ERROR
	}
	if *(*int32)(unsafe.Pointer(bp + 108)) != 0 {
		*(*uintptr)(unsafe.Pointer(bp + 80 + 2*8)) = *(*uintptr)(unsafe.Pointer(litPtr + 10*8))
	}

	// Return options as a list.

	XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 3, bp+80))
	return TCL_OK

}

var options = [5]uintptr{ // Command line options expected
	ts + 11924, ts + 11932, ts + 11937,
	ts + 11945, uintptr(0)} /* tclClock.c:1906:23 */

// ----------------------------------------------------------------------
//
// ClockSecondsObjCmd -
//
//	Returns a count of microseconds since the epoch.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	None.
//
// This function implements the 'clock seconds' Tcl command. Refer to the user
// documentation for details on what it does.
//
//----------------------------------------------------------------------

func XClockSecondsObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclClock.c:2011:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var now Tcl_Time at bp, 8

	_ = clientData

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}
	XTcl_GetTime(tls, bp)
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp /* &now */)).Fsec)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TzsetIfNecessary --
//
//	Calls the tzset() library function if the contents of the TZ
//	environment variable has changed.
//
// Results:
//	None.
//
// Side effects:
//	Calls tzset.
//
//----------------------------------------------------------------------

func sTzsetIfNecessary(tls *libc.TLS) { /* tclClock.c:2056:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)
	// Last env epoch, for faster signaling,
	// 					    that TZ changed via TCL
	var tzIsNow uintptr // Current value of TZ

	// Prevent performance regression on some platforms by resolving of system time zone:
	// small latency for check whether environment was changed (once per second)
	// no latency if environment was changed with tcl-env (compare both epoch values)
	// var now Tcl_Time at bp, 8

	XTcl_GetTime(tls, bp)
	if (*Tcl_Time)(unsafe.Pointer(bp)).Fsec == tzLastRefresh && tzEnvEpoch == XTclEnvEpoch {
		return
	}

	tzEnvEpoch = XTclEnvEpoch
	tzLastRefresh = (*Tcl_Time)(unsafe.Pointer(bp /* &now */)).Fsec

	tzIsNow = libc.X_wgetenv(tls, wtext+92)
	if tzIsNow != uintptr(0) && (tzWas == uintptr(0) || tzWas == libc.UintptrFromInt64(int64(-1)) ||
		libc.Xwcscmp(tls, tzIsNow, tzWas) != 0) {
		libc.Xtzset(tls)
		if tzWas != uintptr(0) && tzWas != libc.UintptrFromInt64(int64(-1)) {
			XTclpFree(tls, tzWas)
		}
		tzWas = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(WCHAR(0)))*(libc.Xwcslen(tls, tzIsNow)+uint64(1))))
		libc.Xwcscpy(tls, tzWas, tzIsNow)
	} else if tzIsNow == uintptr(0) && tzWas != uintptr(0) {
		libc.Xtzset(tls)
		if tzWas != libc.UintptrFromInt64(int64(-1)) {
			XTclpFree(tls, tzWas)
		}
		tzWas = uintptr(0)
	}

}

var tzWas uintptr = libc.UintptrFromInt64(int64(-1)) /* tclClock.c:2058:17 */
var tzLastRefresh int32 = 0                          /* tclClock.c:2060:18 */
var tzEnvEpoch Size_t = uint64(0)                    /* tclClock.c:2061:19 */

//----------------------------------------------------------------------
//
// ClockDeleteCmdProc --
//
//	Remove a reference to the clock client data, and clean up memory
//	when it's all gone.
//
// Results:
//	None.
//
//----------------------------------------------------------------------

func sClockDeleteCmdProc(tls *libc.TLS, clientData ClientData) { /* tclClock.c:2112:1: */
	var data uintptr = clientData
	var i int32

	if libc.PostDecUint64(&(*ClockClientData)(unsafe.Pointer(data)).FrefCount, 1) <= uint64(1) {
		for i = 0; i < LIT__END; i++ {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer((*ClockClientData)(unsafe.Pointer(data)).Fliterals + uintptr(i)*8))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		XTclpFree(tls, (*ClockClientData)(unsafe.Pointer(data)).Fliterals)
		XTclpFree(tls, data)
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// tclWinInt.h --
//
//	Declarations of Windows-specific shared variables and procedures.
//
// Copyright (c) 1994-1996 Sun Microsystems, Inc.
//
// See the file "license.terms" for information on usage and redistribution
// of this file, and for a DISCLAIMER OF ALL WARRANTIES.

// tclInt.h --
//
//	Declarations of things used internally by the Tcl interpreter.
//
// Copyright (c) 1987-1993 The Regents of the University of California.
// Copyright (c) 1993-1997 Lucent Technologies.
// Copyright (c) 1994-1998 Sun Microsystems, Inc.
// Copyright (c) 1998-1999 by Scriptics Corporation.
// Copyright (c) 2001, 2002 by Kevin B. Kenny.  All rights reserved.
// Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
// Copyright (c) 2006-2008 by Joe Mistachkin.  All rights reserved.
// Copyright (c) 2008 by Miguel Sofer. All rights reserved.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Unlike Borland and Microsoft, we don't register exception handlers by
// pushing registration records onto the runtime stack. Instead, we register
// them by creating an TCLEXCEPTION_REGISTRATION within the activation record.

type TCLEXCEPTION_REGISTRATION1 = struct {
	Flink        uintptr
	Fhandler     uintptr
	Febp         uintptr
	Fesp         uintptr
	Fstatus      int32
	F__ccgo_pad1 [4]byte
} /* tclWinInt.h:24:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// tclWinInt.h --
//
//	Declarations of Windows-specific shared variables and procedures.
//
// Copyright (c) 1994-1996 Sun Microsystems, Inc.
//
// See the file "license.terms" for information on usage and redistribution
// of this file, and for a DISCLAIMER OF ALL WARRANTIES.

// tclInt.h --
//
//	Declarations of things used internally by the Tcl interpreter.
//
// Copyright (c) 1987-1993 The Regents of the University of California.
// Copyright (c) 1993-1997 Lucent Technologies.
// Copyright (c) 1994-1998 Sun Microsystems, Inc.
// Copyright (c) 1998-1999 by Scriptics Corporation.
// Copyright (c) 2001, 2002 by Kevin B. Kenny.  All rights reserved.
// Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
// Copyright (c) 2006-2008 by Joe Mistachkin.  All rights reserved.
// Copyright (c) 2008 by Miguel Sofer. All rights reserved.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Unlike Borland and Microsoft, we don't register exception handlers by
// pushing registration records onto the runtime stack. Instead, we register
// them by creating an TCLEXCEPTION_REGISTRATION within the activation record.

type TCLEXCEPTION_REGISTRATION = TCLEXCEPTION_REGISTRATION1 /* tclWinInt.h:31:3 */

// Windows version dependend functions
type TclWinProcs1 = struct {
	FcancelSynchronousIo uintptr
	FcreateSymbolicLink  uintptr
} /* tclWinInt.h:37:9 */

// Windows version dependend functions
type TclWinProcs = TclWinProcs1 /* tclWinInt.h:40:3 */

// Needed by tclWinFile.c and tclWinFCmd.c

//----------------------------------------------------------------------
// Declarations of helper-workers threaded facilities for a pipe based channel.
//
// Corresponding functionality provided in "tclWinPipe.c".
//----------------------------------------------------------------------

type TclPipeThreadInfo1 = struct {
	FevControl   HANDLE
	Fstate       LONG
	F__ccgo_pad1 [4]byte
	FclientData  ClientData
	FevWakeUp    HANDLE
} /* tclWinInt.h:116:9 */

// Needed by tclWinFile.c and tclWinFCmd.c

//----------------------------------------------------------------------
// Declarations of helper-workers threaded facilities for a pipe based channel.
//
// Corresponding functionality provided in "tclWinPipe.c".
//----------------------------------------------------------------------

type TclPipeThreadInfo = TclPipeThreadInfo1 /* tclWinInt.h:124:3 */

// The state structure used by [foreach]. Note that the actual structure has
// all its working arrays appended afterwards so they can be allocated and
// freed in a single step.

type ForeachState = struct {
	FbodyPtr    uintptr
	FbodyIdx    int32
	Fj          int32
	Fmaxj       int32
	FnumLists   int32
	Findex      uintptr
	FvarcList   uintptr
	FvarvList   uintptr
	FvCopyList  uintptr
	FargcList   uintptr
	FargvList   uintptr
	FaCopyList  uintptr
	FresultList uintptr
} /* tclCmdAH.c:26:1 */

//----------------------------------------------------------------------
//
// Tcl_BreakObjCmd --
//
//	This procedure is invoked to process the "break" Tcl command. See the
//	user documentation for details on what it does.
//
//	With the bytecode compiler, this procedure is only called when a
//	command name is computed at runtime, and is "break" or the name to
//	which "break" was renamed: e.g., "set z break; $z"
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_BreakObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:137:1: */
	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}
	return TCL_BREAK
}

//----------------------------------------------------------------------
//
// Tcl_CaseObjCmd --
//
//	This procedure is invoked to process the "case" Tcl command. See the
//	user documentation for details on what it does. THIS COMMAND IS
//	OBSOLETE AND DEPRECATED. SLATED FOR REMOVAL IN TCL 9.0.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_CaseObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:170:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var i int32
	var body int32
	var result int32
	// var caseObjc int32 at bp+24, 4

	var stringPtr uintptr
	var arg uintptr
	var caseObjv uintptr
	var armPtr uintptr
	// var newObjv uintptr at bp+16, 8

	// var patObjc int32 at bp+28, 4

	var j int32
	// var patObjv uintptr at bp+32, 8

	var pat uintptr
	var p uintptr

	if !(objc < 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+11955)
	return TCL_ERROR
__1:
	;

	stringPtr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	body = -1

	arg = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	if !(libc.Xstrcmp(tls, arg, ts+6340) == 0) {
		goto __2
	}
	i = 3
	goto __3
__2:
	i = 2
__3:
	;
	*(*int32)(unsafe.Pointer(bp + 24 /* caseObjc */)) = objc - i
	caseObjv = objv + uintptr(i)*8

	// If all of the pattern/command pairs are lumped into a single argument,
	// split them out again.

	if !(*(*int32)(unsafe.Pointer(bp + 24)) == 1) {
		goto __4
	}

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(caseObjv)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 16)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(caseObjv)) + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 24)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(caseObjv)) + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(caseObjv)), bp+24, bp+16)
	}
	caseObjv = *(*uintptr)(unsafe.Pointer(bp + 16 /* newObjv */))
__4:
	;

	i = 0
__5:
	if !(i < *(*int32)(unsafe.Pointer(bp + 24))) {
		goto __7
	}

	if !(i == *(*int32)(unsafe.Pointer(bp + 24))-1) {
		goto __8
	}
	XTcl_ResetResult(tls, interp)
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+12001, -1))
	return TCL_ERROR
__8:
	;

	// Check for special case of single pattern (no list) with no
	// backslash sequences.

	pat = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(caseObjv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(caseObjv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(caseObjv + uintptr(i)*8)))
	}()
	p = pat
__9:
	if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) {
		goto __11
	}
	if !(func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0 || int32(*(*int8)(unsafe.Pointer(p))) == '\\') {
		goto __12
	}
	goto __11
__12:
	;
	goto __10
__10:
	p++
	goto __9
	goto __11
__11:
	;
	if !(int32(*(*int8)(unsafe.Pointer(p))) == 0) {
		goto __13
	}
	if !(int32(*(*int8)(unsafe.Pointer(pat))) == 'd' && libc.Xstrcmp(tls, pat, ts+12033) == 0) {
		goto __14
	}
	body = i + 1
__14:
	;
	if !(XTcl_StringMatch(tls, stringPtr, pat) != 0) {
		goto __15
	}
	body = i + 1
	goto match
__15:
	;
	goto __6
__13:
	;

	// Break up pattern lists, then check each of the patterns in the
	// list.

	result = XTcl_SplitList(tls, interp, pat, bp+28, bp+32)
	if !(result != TCL_OK) {
		goto __16
	}
	return result
__16:
	;
	j = 0
__17:
	if !(j < *(*int32)(unsafe.Pointer(bp + 28))) {
		goto __19
	}
	if !(XTcl_StringMatch(tls, stringPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)) + uintptr(j)*8))) != 0) {
		goto __20
	}
	body = i + 1
	goto __19
__20:
	;
	goto __18
__18:
	j++
	goto __17
	goto __19
__19:
	;
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 32)))
	if !(j < *(*int32)(unsafe.Pointer(bp + 28))) {
		goto __21
	}
	goto __7
__21:
	;
	goto __6
__6:
	i = i + 2
	goto __5
	goto __7
__7:
	;

match:
	if !(body != -1) {
		goto __22
	}
	armPtr = *(*uintptr)(unsafe.Pointer(caseObjv + uintptr(body-1)*8))
	result = XTcl_EvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(caseObjv + uintptr(body)*8)), 0)
	if !(result == TCL_ERROR) {
		goto __23
	}
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+12041,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(armPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(armPtr)).Fbytes
			}
			return XTcl_GetString(tls, armPtr)
		}(), XTcl_GetErrorLine(tls, interp))))
__23:
	;
	return result
__22:
	;

	// Nothing matched: return nothing.

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_CatchObjCmd --
//
//	This object-based procedure is invoked to process the "catch" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_CatchObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:305:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRCatchObjCmd})), dummy, objc, objv)
}

func XTclNRCatchObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:315:1: */
	var varNamePtr uintptr = uintptr(0)
	var optionVarNamePtr uintptr = uintptr(0)
	var iPtr uintptr = interp

	if objc < 2 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+12068)
		return TCL_ERROR
	}

	if objc >= 3 {
		varNamePtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	}
	if objc == 4 {
		optionVarNamePtr = *(*uintptr)(unsafe.Pointer(objv + 3*8))
	}

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sCatchObjCmdCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(Intptr_t(objc))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = varNamePtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = optionVarNamePtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}

	// TIP #280. Make invoking context available to caught script.

	return XTclNREvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, 1)
}

func sCatchObjCmdCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdAH.c:349:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var iPtr uintptr = interp
	var objc int32 = int32(*(*ClientData)(unsafe.Pointer(data)))
	var varNamePtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var optionVarNamePtr uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))
	var rewind int32 = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr)).Frewind

	// We disable catch in interpreters where the limit has been exceeded.

	if rewind != 0 || XTcl_LimitExceeded(tls, interp) != 0 {
		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+12107, libc.VaList(bp, XTcl_GetErrorLine(tls, interp))))
		return TCL_ERROR
	}

	if objc >= 3 {
		if uintptr(0) == XTcl_ObjSetVar2(tls, interp, varNamePtr, uintptr(0),
			XTcl_GetObjResult(tls, interp), TCL_LEAVE_ERR_MSG) {
			return TCL_ERROR
		}
	}
	if objc == 4 {
		var options uintptr = XTcl_GetReturnOptions(tls, interp, result)

		if uintptr(0) == XTcl_ObjSetVar2(tls, interp, optionVarNamePtr, uintptr(0),
			options, TCL_LEAVE_ERR_MSG) {
			// Do not decrRefCount 'options', it was already done by
			// Tcl_ObjSetVar2
			return TCL_ERROR
		}
	}

	XTcl_ResetResult(tls, interp)
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, result))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_CdObjCmd --
//
//	This procedure is invoked to process the "cd" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_CdObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:411:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var dir uintptr
	var result int32

	if objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12135)
		return TCL_ERROR
	}

	if objc == 2 {
		dir = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	} else {
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				dir = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(dir)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(dir)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes, ts+6259, uint64(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes + 1)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(dir)).Flength = int32(uint64(unsafe.Sizeof([2]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(dir)).FtypePtr = uintptr(0)
			{
			}
		}
		(*Tcl_Obj)(unsafe.Pointer(dir)).FrefCount++
	}
	if XTcl_FSConvertToPathType(tls, interp, dir) != TCL_OK {
		result = TCL_ERROR
	} else {
		result = XTcl_FSChdir(tls, dir)
		if result != TCL_OK {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+12145,
				libc.VaList(bp, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes
					}
					return XTcl_GetString(tls, dir)
				}(), XTcl_PosixError(tls, interp))))
			result = TCL_ERROR
		}
	}
	if objc != 2 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = dir
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_ConcatObjCmd --
//
//	This object-based procedure is invoked to process the "concat" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ConcatObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:467:1: */
	if objc >= 2 {
		XTcl_SetObjResult(tls, interp, XTcl_ConcatObj(tls, objc-1, objv+uintptr(1)*8))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ContinueObjCmd --
//
//	This procedure is invoked to process the "continue" Tcl command. See
//	the user documentation for details on what it does.
//
//	With the bytecode compiler, this procedure is only called when a
//	command name is computed at runtime, and is "continue" or the name to
//	which "continue" was renamed: e.g., "set z continue; $z"
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ContinueObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:502:1: */
	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}
	return TCL_CONTINUE
}

//-----------------------------------------------------------------------------
//
// TclInitEncodingCmd --
//
//	This function creates the 'encoding' ensemble.
//
// Results:
//	Returns the Tcl_Command so created.
//
// Side effects:
//	The ensemble is initialized.
//
// This command is hidden in a safe interpreter.

func XTclInitEncodingCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclCmdAH.c:532:1: */

	return XTclMakeEnsemble(tls, interp, ts+12191, uintptr(unsafe.Pointer(&encodingImplMap)))
}

var encodingImplMap = [6]EnsembleImplMap{
	{Fname: ts + 12200, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12212, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12222, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12227, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12233, Fproc: 0, FcompileProc: 0},
	{},
} /* tclCmdAH.c:535:34 */

//-----------------------------------------------------------------------------
//
// TclMakeEncodingCommandSafe --
//
//	This function hides the unsafe 'dirs' and 'system' subcommands of
//	the "encoding" Tcl command ensemble. It must be called only from
//	TclHideUnsafeCommands.
//
// Results:
//	A standard Tcl result
//
// Side effects:
//	Adds commands to the table of hidden commands.
//
//-----------------------------------------------------------------------------

func XTclMakeEncodingCommandSafe(tls *libc.TLS, interp uintptr) int32 { /* tclCmdAH.c:566:1: */
	bp := tls.Alloc(456)
	defer tls.Free(456)

	var i int32
	// var oldBuf Tcl_DString at bp+24, 216

	// var newBuf Tcl_DString at bp+240, 216

	XTcl_DStringInit(tls, bp+24)
	XTcl_DStringAppend(tls, bp+24, ts+12240, int32(uint64(unsafe.Sizeof([18]int8{}))-uint64(1)))
	XTcl_DStringInit(tls, bp+240)
	XTcl_DStringAppend(tls, bp+240, ts+12258, int32(uint64(unsafe.Sizeof([14]int8{}))-uint64(1)))
	for i = 0; unsafeInfo[i].FcmdName != uintptr(0); i++ {
		if unsafeInfo[i].Funsafe != 0 {
			var oldName uintptr
			var newName uintptr

			XTcl_DStringSetLength(tls, bp+24, 17)
			oldName = XTcl_DStringAppend(tls, bp+24, unsafeInfo[i].FcmdName, -1)
			XTcl_DStringSetLength(tls, bp+240, 13)
			newName = XTcl_DStringAppend(tls, bp+240, unsafeInfo[i].FcmdName, -1)
			if XTclRenameCommand(tls, interp, oldName, ts+12272) != TCL_OK ||
				XTcl_HideCommand(tls, interp, ts+12272, newName) != TCL_OK {
				XTcl_Panic(tls, ts+12279,
					libc.VaList(bp, unsafeInfo[i].FcmdName,
						XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))))
			}
			XTcl_CreateObjCommand(tls, interp, oldName, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{sBadEncodingSubcommand})),
				unsafeInfo[i].FcmdName, uintptr(0))
		}
	}
	XTcl_DStringFree(tls, bp+24)
	XTcl_DStringFree(tls, bp+240)

	// Ugh. The [encoding] command is now actually safe, but it is assumed by
	// scripts that it is not, which messes up security policies.

	if XTcl_HideCommand(tls, interp, ts+12191, ts+12191) != TCL_OK {
		XTcl_Panic(tls, ts+12317,
			libc.VaList(bp+16, XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))))
	}
	return TCL_OK
}

var unsafeInfo = [6]struct {
	FcmdName     uintptr
	Funsafe      int32
	F__ccgo_pad1 [4]byte
}{
	{FcmdName: ts + 12200 /* "convertfrom" */},
	{FcmdName: ts + 12212 /* "convertto" */},
	{FcmdName: ts + 12222 /* "dirs" */, Funsafe: 1},
	{FcmdName: ts + 12227 /* "names" */},
	{FcmdName: ts + 12233 /* "system" */},
	{},
} /* tclCmdAH.c:572:7 */

//----------------------------------------------------------------------
//
// BadEncodingSubcommand --
//
//	Command used to act as a backstop implementation when subcommands of
//	"encoding" are unsafe (the real implementations of the subcommands are
//	hidden). The clientData is always the full official subcommand name.
//
// Results:
//	A standard Tcl result (always a TCL_ERROR).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sBadEncodingSubcommand(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:640:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var subcommandName uintptr = clientData

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+12352, libc.VaList(bp, subcommandName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+12400, ts+12405, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// EncodingConvertfromObjCmd --
//
//	This command converts a byte array in an external encoding into a
//	Tcl string
//
// Results:
//	A standard Tcl result.
//
//----------------------------------------------------------------------

func XEncodingConvertfromObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:669:1: */
	bp := tls.Alloc(232)
	defer tls.Free(232)

	var data uintptr // Byte array to convert
	// var ds Tcl_DString at bp+16, 216
	// Buffer to hold the string
	// var encoding Tcl_Encoding at bp, 8
	// Encoding to use
	// var length int32 at bp+8, 4
	// Length of the byte array being converted
	var bytesPtr uintptr // Pointer to the first byte of the array

	if objc == 2 {
		*(*Tcl_Encoding)(unsafe.Pointer(bp /* encoding */)) = XTcl_GetEncoding(tls, interp, uintptr(0))
		data = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	} else if objc == 3 {
		if XTcl_GetEncodingFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) != TCL_OK {
			return TCL_ERROR
		}
		data = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12416)
		return TCL_ERROR
	}

	// Convert the string into a byte array in 'ds'
	bytesPtr = XTcl_GetByteArrayFromObj(tls, data, bp+8)
	XTcl_ExternalToUtfDString(tls, *(*Tcl_Encoding)(unsafe.Pointer(bp /* encoding */)), bytesPtr, *(*int32)(unsafe.Pointer(bp + 8 /* length */)), bp+16)

	// Note that we cannot use Tcl_DStringResult here because it will
	// truncate the string at the first null byte.

	XTcl_SetObjResult(tls, interp, XTclDStringToObj(tls, bp+16))

	// We're done with the encoding

	XTcl_FreeEncoding(tls, *(*Tcl_Encoding)(unsafe.Pointer(bp /* encoding */)))
	return TCL_OK

}

//----------------------------------------------------------------------
//
// EncodingConverttoObjCmd --
//
//	This command converts a Tcl string into a byte array that
//	encodes the string according to some encoding.
//
// Results:
//	A standard Tcl result.
//
//----------------------------------------------------------------------

func XEncodingConverttoObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:731:1: */
	bp := tls.Alloc(232)
	defer tls.Free(232)

	var data uintptr // String to convert
	// var ds Tcl_DString at bp+16, 216
	// Buffer to hold the byte array
	// var encoding Tcl_Encoding at bp, 8
	// Encoding to use
	// var length int32 at bp+8, 4
	// Length of the string being converted
	var stringPtr uintptr // Pointer to the first byte of the string

	if objc == 2 {
		*(*Tcl_Encoding)(unsafe.Pointer(bp /* encoding */)) = XTcl_GetEncoding(tls, interp, uintptr(0))
		data = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	} else if objc == 3 {
		if XTcl_GetEncodingFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) != TCL_OK {
			return TCL_ERROR
		}
		data = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12416)
		return TCL_ERROR
	}

	// Convert the string to a byte array in 'ds'

	stringPtr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(data)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 8)) = (*Tcl_Obj)(unsafe.Pointer(data)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(data)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, data, bp+8)
	}()
	XTcl_UtfToExternalDString(tls, *(*Tcl_Encoding)(unsafe.Pointer(bp /* encoding */)), stringPtr, *(*int32)(unsafe.Pointer(bp + 8 /* length */)), bp+16)
	XTcl_SetObjResult(tls, interp,
		XTcl_NewByteArrayObj(tls, (*Tcl_DString)(unsafe.Pointer(bp+16)).Fstring,
			(*Tcl_DString)(unsafe.Pointer(bp+16)).Flength))
	XTcl_DStringFree(tls, bp+16)

	// We're done with the encoding

	XTcl_FreeEncoding(tls, *(*Tcl_Encoding)(unsafe.Pointer(bp /* encoding */)))
	return TCL_OK

}

//----------------------------------------------------------------------
//
// EncodingDirsObjCmd --
//
//	This command manipulates the encoding search path.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Can set the encoding search path.
//
//----------------------------------------------------------------------

func XEncodingDirsObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:793:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var dirListObj uintptr

	if objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12432)
		return TCL_ERROR
	}
	if objc == 1 {
		XTcl_SetObjResult(tls, interp, XTcl_GetEncodingSearchPath(tls))
		return TCL_OK
	}

	dirListObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if XTcl_SetEncodingSearchPath(tls, dirListObj) == TCL_ERROR {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+12442,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(dirListObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(dirListObj)).Fbytes
				}
				return XTcl_GetString(tls, dirListObj)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7949, ts+12479, ts+12488,
			uintptr(0)))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, dirListObj)
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// EncodingNamesObjCmd --
//
//	This command returns a list of the available encoding names
//
// Results:
//	Returns a standard Tcl result
//
//-----------------------------------------------------------------------------

func XEncodingNamesObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:837:1: */
	if objc > 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}
	XTcl_GetEncodingNames(tls, interp)
	return TCL_OK
}

//-----------------------------------------------------------------------------
//
// EncodingSystemObjCmd --
//
//	This command retrieves or changes the system encoding
//
// Results:
//	Returns a standard Tcl result
//
// Side effects:
//	May change the system encoding.
//
//-----------------------------------------------------------------------------

func XEncodingSystemObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:867:1: */
	if objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12496)
		return TCL_ERROR
	}
	if objc == 1 {
		XTcl_SetObjResult(tls, interp,
			XTcl_NewStringObj(tls, XTcl_GetEncodingName(tls, uintptr(0)), -1))
	} else {
		return XTcl_SetSystemEncoding(tls, interp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}())
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ErrorObjCmd --
//
//	This procedure is invoked to process the "error" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ErrorObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:904:1: */
	var options uintptr
	var optName uintptr

	if objc < 2 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12507)
		return TCL_ERROR
	}

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			options = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(options)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([21]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(options)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(options)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(options)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([21]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(options)).Fbytes, ts+12539, uint64(int32(uint64(unsafe.Sizeof([21]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(options)).Fbytes + 20)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(options)).Flength = int32(uint64(unsafe.Sizeof([21]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(options)).FtypePtr = uintptr(0)
		{
		}
	}

	if objc >= 3 { // Process the optional info argument
		for ok2 := true; ok2; ok2 = 0 != 0 {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				optName = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(optName)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(optName)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(optName)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(optName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(optName)).Fbytes, ts+12560, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(optName)).Fbytes + 10)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(optName)).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(optName)).FtypePtr = uintptr(0)
			{
			}
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), options, optName)
		XTcl_ListObjAppendElement(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}

	if objc >= 4 { // Process the optional code argument
		for ok4 := true; ok4; ok4 = 0 != 0 {
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				optName = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(optName)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(optName)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(optName)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(optName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(optName)).Fbytes, ts+12571, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(optName)).Fbytes + 10)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(optName)).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(optName)).FtypePtr = uintptr(0)
			{
			}
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), options, optName)
		XTcl_ListObjAppendElement(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}

	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	return XTcl_SetReturnOptions(tls, interp, options)
}

//----------------------------------------------------------------------
//
// Tcl_EvalObjCmd --
//
//	This object-based procedure is invoked to process the "eval" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sEvalCmdErrMsg(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdAH.c:954:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if result == TCL_ERROR {
		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+12582, libc.VaList(bp, XTcl_GetErrorLine(tls, interp))))
	}
	return result
}

func XTcl_EvalObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:967:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNREvalObjCmd})), dummy, objc, objv)
}

func XTclNREvalObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:977:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var objPtr uintptr
	var iPtr uintptr = interp
	*(*uintptr)(unsafe.Pointer(bp /* invoker */)) = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 8 /* word */)) = 0

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12609)
		return TCL_ERROR
	}

	if objc == 2 {
		// TIP #280. Make argument location available to eval'd script.

		*(*uintptr)(unsafe.Pointer(bp /* invoker */)) = (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr
		*(*int32)(unsafe.Pointer(bp + 8 /* word */)) = 1
		objPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		XTclArgumentGet(tls, interp, objPtr, bp, bp+8)
	} else {
		// More than one argument: concatenate them together with spaces
		// between, then evaluate the result. Tcl_EvalObjEx will delete the
		// object when it decrements its refcount after eval'ing it.
		//
		// TIP #280. Make invoking context available to eval'd script, done
		// with the default values.

		objPtr = XTcl_ConcatObj(tls, objc-1, objv+uintptr(1)*8)
	}
	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sEvalCmdErrMsg}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNREvalObjEx(tls, interp, objPtr, 0, *(*uintptr)(unsafe.Pointer(bp /* invoker */)), *(*int32)(unsafe.Pointer(bp + 8 /* word */)))
}

//----------------------------------------------------------------------
//
// Tcl_ExitObjCmd --
//
//	This procedure is invoked to process the "exit" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ExitObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1037:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var value int32 at bp, 4

	if objc != 1 && objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12623)
		return TCL_ERROR
	}

	if objc == 1 {
		*(*int32)(unsafe.Pointer(bp /* value */)) = 0
	} else if XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) != TCL_OK {
		return TCL_ERROR
	}
	XTcl_Exit(tls, *(*int32)(unsafe.Pointer(bp /* value */)))
	//NOTREACHED
	return TCL_OK // Better not ever reach this!
}

//----------------------------------------------------------------------
//
// Tcl_ExprObjCmd --
//
//	This object-based procedure is invoked to process the "expr" Tcl
//	command. See the user documentation for details on what it does.
//
//	With the bytecode compiler, this procedure is called in two
//	circumstances: 1) to execute expr commands that are too complicated or
//	too unsafe to try compiling directly into an inline sequence of
//	instructions, and 2) to execute commands where the command name is
//	computed at runtime and is "expr" or the name to which "expr" was
//	renamed (e.g., "set z expr; $z 2+3")
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ExprObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1086:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRExprObjCmd})), dummy, objc, objv)
}

func XTclNRExprObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1096:1: */
	var resultPtr uintptr
	var objPtr uintptr

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12609)
		return TCL_ERROR
	}

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)
	{
	}

	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	if objc == 2 {
		objPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _callbackPtr uintptr
			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok3 := true; ok3; ok3 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sExprCallback}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = resultPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	} else {
		objPtr = XTcl_ConcatObj(tls, objc-1, objv+uintptr(1)*8)
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _callbackPtr uintptr
			for ok5 := true; ok5; ok5 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok6 := true; ok6; ok6 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sExprCallback}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = resultPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = objPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}

	return XTcl_NRExprObj(tls, interp, objPtr, resultPtr)
}

func sExprCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdAH.c:1123:1: */
	var resultPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var objPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	if objPtr != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	if result == TCL_OK {
		XTcl_SetObjResult(tls, interp, resultPtr)
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = resultPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// TclInitFileCmd --
//
//	This function builds the "file" Tcl command ensemble. See the user
//	documentation for details on what that ensemble does.
//
//	PLEASE NOTE THAT THIS FAILS WITH FILENAMES AND PATHS WITH EMBEDDED
//	NULLS. With the object-based Tcl_FS APIs, the above NOTE may no longer
//	be true. In any case this assertion should be tested.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTclInitFileCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclCmdAH.c:1164:1: */
	return XTclMakeEnsemble(tls, interp, ts+12636, uintptr(unsafe.Pointer(&initMap)))
}

var initMap = [35]EnsembleImplMap{
	{Fname: ts + 12641, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12647, Fproc: 0},
	{Fname: ts + 12658, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12667, Fproc: 0},
	{Fname: ts + 7850, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12672, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12680, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12691, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12698, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12708, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12720, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 5756, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12727, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12732, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12738, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12744, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12750, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12761, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12771, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12777, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12786, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12795, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 5869, Fproc: 0},
	{Fname: ts + 12804, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12813, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12823, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 5892, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12828, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12233, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12833, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12838, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12847, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12852, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12860, Fproc: 0, FcompileProc: 0},
	{},
} /* tclCmdAH.c:1173:34 */

//----------------------------------------------------------------------
//
// TclMakeFileCommandSafe --
//
//	This function hides the unsafe subcommands of the "file" Tcl command
//	ensemble. It must only be called from TclHideUnsafeCommands.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Adds commands to the table of hidden commands.
//
//----------------------------------------------------------------------

func XTclMakeFileCommandSafe(tls *libc.TLS, interp uintptr) int32 { /* tclCmdAH.c:1231:1: */
	bp := tls.Alloc(456)
	defer tls.Free(456)

	var i int32
	// var oldBuf Tcl_DString at bp+24, 216

	// var newBuf Tcl_DString at bp+240, 216

	XTcl_DStringInit(tls, bp+24)
	XTcl_DStringAppend(tls, bp+24, ts+12869, int32(uint64(unsafe.Sizeof([14]int8{}))-uint64(1)))
	XTcl_DStringInit(tls, bp+240)
	XTcl_DStringAppend(tls, bp+240, ts+12883, int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1)))
	for i = 0; unsafeInfo1[i].FcmdName != uintptr(0); i++ {
		if unsafeInfo1[i].Funsafe != 0 {
			var oldName uintptr
			var newName uintptr

			XTcl_DStringSetLength(tls, bp+24, 13)
			oldName = XTcl_DStringAppend(tls, bp+24, unsafeInfo1[i].FcmdName, -1)
			XTcl_DStringSetLength(tls, bp+240, 9)
			newName = XTcl_DStringAppend(tls, bp+240, unsafeInfo1[i].FcmdName, -1)
			if XTclRenameCommand(tls, interp, oldName, ts+12272) != TCL_OK ||
				XTcl_HideCommand(tls, interp, ts+12272, newName) != TCL_OK {
				XTcl_Panic(tls, ts+12893,
					libc.VaList(bp, unsafeInfo1[i].FcmdName,
						XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))))
			}
			XTcl_CreateObjCommand(tls, interp, oldName, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{sBadFileSubcommand})),
				unsafeInfo1[i].FcmdName, uintptr(0))
		}
	}
	XTcl_DStringFree(tls, bp+24)
	XTcl_DStringFree(tls, bp+240)

	// Ugh. The [file] command is now actually safe, but it is assumed by
	// scripts that it is not, which messes up security policies. [Bug
	// 3211758]

	if XTcl_HideCommand(tls, interp, ts+12636, ts+12636) != TCL_OK {
		XTcl_Panic(tls, ts+12927,
			libc.VaList(bp+16, XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))))
	}
	return TCL_OK
}

var unsafeInfo1 = [35]struct {
	FcmdName     uintptr
	Funsafe      int32
	F__ccgo_pad1 [4]byte
}{
	{FcmdName: ts + 12641 /* "atime" */, Funsafe: 1},
	{FcmdName: ts + 12647 /* "attributes" */, Funsafe: 1},
	{FcmdName: ts + 12658 /* "channels" */},
	{FcmdName: ts + 12667 /* "copy" */, Funsafe: 1},
	{FcmdName: ts + 7850 /* "delete" */, Funsafe: 1},
	{FcmdName: ts + 12672 /* "dirname" */, Funsafe: 1},
	{FcmdName: ts + 12680 /* "executable" */, Funsafe: 1},
	{FcmdName: ts + 12691 /* "exists" */, Funsafe: 1},
	{FcmdName: ts + 12698 /* "extension" */, Funsafe: 1},
	{FcmdName: ts + 12708 /* "isdirectory" */, Funsafe: 1},
	{FcmdName: ts + 12720 /* "isfile" */, Funsafe: 1},
	{FcmdName: ts + 5756 /* "join" */},
	{FcmdName: ts + 12727 /* "link" */, Funsafe: 1},
	{FcmdName: ts + 12732 /* "lstat" */, Funsafe: 1},
	{FcmdName: ts + 12738 /* "mtime" */, Funsafe: 1},
	{FcmdName: ts + 12744 /* "mkdir" */, Funsafe: 1},
	{FcmdName: ts + 12750 /* "nativename" */, Funsafe: 1},
	{FcmdName: ts + 12761 /* "normalize" */, Funsafe: 1},
	{FcmdName: ts + 12771 /* "owned" */, Funsafe: 1},
	{FcmdName: ts + 12777 /* "pathtype" */},
	{FcmdName: ts + 12786 /* "readable" */, Funsafe: 1},
	{FcmdName: ts + 12795 /* "readlink" */, Funsafe: 1},
	{FcmdName: ts + 5869 /* "rename" */, Funsafe: 1},
	{FcmdName: ts + 12804 /* "rootname" */, Funsafe: 1},
	{FcmdName: ts + 12813 /* "separator" */},
	{FcmdName: ts + 12823 /* "size" */, Funsafe: 1},
	{FcmdName: ts + 5892 /* "split" */},
	{FcmdName: ts + 12828 /* "stat" */, Funsafe: 1},
	{FcmdName: ts + 12233 /* "system" */},
	{FcmdName: ts + 12833 /* "tail" */, Funsafe: 1},
	{FcmdName: ts + 12838 /* "tempfile" */, Funsafe: 1},
	{FcmdName: ts + 12847 /* "type" */, Funsafe: 1},
	{FcmdName: ts + 12852 /* "volumes" */, Funsafe: 1},
	{FcmdName: ts + 12860 /* "writable" */, Funsafe: 1},
	{},
} /* tclCmdAH.c:1237:7 */

//----------------------------------------------------------------------
//
// BadFileSubcommand --
//
//	Command used to act as a backstop implementation when subcommands of
//	"file" are unsafe (the real implementations of the subcommands are
//	hidden). The clientData is always the full official subcommand name.
//
// Results:
//	A standard Tcl result (always a TCL_ERROR).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sBadFileSubcommand(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1334:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var subcommandName uintptr = clientData

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+12958, libc.VaList(bp, subcommandName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+12400, ts+12405, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// FileAttrAccessTimeCmd --
//
//	This function is invoked to process the "file atime" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May update the access time on the file, if requested by the user.
//
//----------------------------------------------------------------------

func sFileAttrAccessTimeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1366:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	// var buf Tcl_StatBuf at bp+24, 56

	// var tval Utimbuf at bp+88, 16

	if objc < 2 || objc > 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13002)
		return TCL_ERROR
	}
	if sGetStatBuf(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTcl_FSStat})), bp+24) != TCL_OK {
		return TCL_ERROR
	}
	// We use a value of 0 to indicate the access time not available
	if XTcl_GetAccessTimeFromStat(tls, bp+24) == int64(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+13014,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}())))
		return TCL_ERROR
	}

	if objc == 3 {
		// var newTime Tcl_WideInt at bp+80, 8

		if XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+80) != TCL_OK {
			return TCL_ERROR
		}

		(*Utimbuf)(unsafe.Pointer(bp + 88 /* &tval */)).Factime = *(*Tcl_WideInt)(unsafe.Pointer(bp + 80 /* newTime */))
		(*Utimbuf)(unsafe.Pointer(bp + 88 /* &tval */)).Fmodtime = XTcl_GetModificationTimeFromStat(tls, bp+24)

		if XTcl_FSUtime(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+88) != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+13054,
				libc.VaList(bp+8, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
				}(), XTcl_PosixError(tls, interp))))
			return TCL_ERROR
		}

		// Do another stat to ensure that the we return the new recognized
		// atime - hopefully the same as the one we sent in. However, fs's
		// like FAT don't even know what atime is.

		if sGetStatBuf(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		}{XTcl_FSStat})), bp+24) != TCL_OK {
			return TCL_ERROR
		}
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, XTcl_GetAccessTimeFromStat(tls, bp+24)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FileAttrModifyTimeCmd --
//
//	This function is invoked to process the "file mtime" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May update the modification time on the file, if requested by the
//	user.
//
//----------------------------------------------------------------------

func sFileAttrModifyTimeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1443:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	// var buf Tcl_StatBuf at bp+24, 56

	// var tval Utimbuf at bp+88, 16

	if objc < 2 || objc > 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13002)
		return TCL_ERROR
	}
	if sGetStatBuf(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTcl_FSStat})), bp+24) != TCL_OK {
		return TCL_ERROR
	}
	// We use a value of 0 to indicate the modification time not available
	if XTcl_GetModificationTimeFromStat(tls, bp+24) == int64(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+13098,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}())))
		return TCL_ERROR
	}
	if objc == 3 {
		// Need separate variable for reading longs from an object on 64-bit
		// platforms. [Bug 698146]

		// var newTime Tcl_WideInt at bp+80, 8

		if XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+80) != TCL_OK {
			return TCL_ERROR
		}

		(*Utimbuf)(unsafe.Pointer(bp + 88 /* &tval */)).Factime = XTcl_GetAccessTimeFromStat(tls, bp+24)
		(*Utimbuf)(unsafe.Pointer(bp + 88 /* &tval */)).Fmodtime = *(*Tcl_WideInt)(unsafe.Pointer(bp + 80 /* newTime */))

		if XTcl_FSUtime(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+88) != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+13144,
				libc.VaList(bp+8, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
				}(), XTcl_PosixError(tls, interp))))
			return TCL_ERROR
		}

		// Do another stat to ensure that the we return the new recognized
		// mtime - hopefully the same as the one we sent in.

		if sGetStatBuf(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		}{XTcl_FSStat})), bp+24) != TCL_OK {
			return TCL_ERROR
		}
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, XTcl_GetModificationTimeFromStat(tls, bp+24)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FileAttrLinkStatCmd --
//
//	This function is invoked to process the "file lstat" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Writes to an array named by the user.
//
//----------------------------------------------------------------------

func sFileAttrLinkStatCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1522:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var buf Tcl_StatBuf at bp, 56

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13194)
		return TCL_ERROR
	}
	if sGetStatBuf(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTcl_FSLstat})), bp) != TCL_OK {
		return TCL_ERROR
	}
	return sStoreStatData(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp)
}

//----------------------------------------------------------------------
//
// FileAttrStatCmd --
//
//	This function is invoked to process the "file stat" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Writes to an array named by the user.
//
//----------------------------------------------------------------------

func sFileAttrStatCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1558:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var buf Tcl_StatBuf at bp, 56

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13194)
		return TCL_ERROR
	}
	if sGetStatBuf(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTcl_FSStat})), bp) != TCL_OK {
		return TCL_ERROR
	}
	return sStoreStatData(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp)
}

//----------------------------------------------------------------------
//
// FileAttrTypeCmd --
//
//	This function is invoked to process the "file type" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileAttrTypeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1594:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var buf Tcl_StatBuf at bp, 56

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	if sGetStatBuf(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTcl_FSLstat})), bp) != TCL_OK {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		sGetTypeFromMode(tls, int32((*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_mode)), -1))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FileAttrSizeCmd --
//
//	This function is invoked to process the "file size" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileAttrSizeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1632:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var buf Tcl_StatBuf at bp, 56

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	if sGetStatBuf(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTcl_FSStat})), bp) != TCL_OK {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_size))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FileAttrIsDirectoryCmd --
//
//	This function is invoked to process the "file isdirectory" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileAttrIsDirectoryCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1669:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var buf Tcl_StatBuf at bp, 56

	var value int32 = 0

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	if sGetStatBuf(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTcl_FSStat})), bp) == TCL_OK {
		value = libc.Bool32(int32((*Tcl_StatBuf)(unsafe.Pointer(bp)).Fst_mode)&X_S_IFMT == X_S_IFDIR)
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(value != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FileAttrIsExecutableCmd --
//
//	This function is invoked to process the "file executable" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileAttrIsExecutableCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1707:1: */
	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	return sCheckAccess(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), X_OK)
}

//----------------------------------------------------------------------
//
// FileAttrIsExistingCmd --
//
//	This function is invoked to process the "file exists" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileAttrIsExistingCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1738:1: */
	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	return sCheckAccess(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), F_OK)
}

//----------------------------------------------------------------------
//
// FileAttrIsFileCmd --
//
//	This function is invoked to process the "file isfile" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileAttrIsFileCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1769:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var buf Tcl_StatBuf at bp, 56

	var value int32 = 0

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	if sGetStatBuf(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTcl_FSStat})), bp) == TCL_OK {
		value = libc.Bool32(int32((*Tcl_StatBuf)(unsafe.Pointer(bp)).Fst_mode)&X_S_IFMT == X_S_IFREG)
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(value != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FileAttrIsOwnedCmd --
//
//	This function is invoked to process the "file owned" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileAttrIsOwnedCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1807:1: */
	var value int32 = 0

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	value = XTclWinFileOwned(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(value != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FileAttrIsReadableCmd --
//
//	This function is invoked to process the "file readable" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileAttrIsReadableCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1854:1: */
	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	return sCheckAccess(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), R_OK)
}

//----------------------------------------------------------------------
//
// FileAttrIsWritableCmd --
//
//	This function is invoked to process the "file writable" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileAttrIsWritableCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1885:1: */
	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	return sCheckAccess(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), W_OK)
}

//----------------------------------------------------------------------
//
// PathDirNameCmd --
//
//	This function is invoked to process the "file dirname" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathDirNameCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1916:1: */
	var dirPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	dirPtr = XTclPathPart(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), TCL_PATH_DIRNAME)
	if dirPtr == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, dirPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = dirPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// PathExtensionCmd --
//
//	This function is invoked to process the "file extension" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathExtensionCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1955:1: */
	var dirPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	dirPtr = XTclPathPart(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), TCL_PATH_EXTENSION)
	if dirPtr == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, dirPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = dirPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// PathRootNameCmd --
//
//	This function is invoked to process the "file root" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathRootNameCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:1994:1: */
	var dirPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	dirPtr = XTclPathPart(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), TCL_PATH_ROOT)
	if dirPtr == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, dirPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = dirPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// PathTailCmd --
//
//	This function is invoked to process the "file tail" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathTailCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2033:1: */
	var dirPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	dirPtr = XTclPathPart(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), TCL_PATH_TAIL)
	if dirPtr == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, dirPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = dirPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// PathFilesystemCmd --
//
//	This function is invoked to process the "file system" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathFilesystemCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2072:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var fsInfo uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	fsInfo = XTcl_FSFileSystemInfo(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if fsInfo == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+13207, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+13225,
			XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0)))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, fsInfo)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// PathJoinCmd --
//
//	This function is invoked to process the "file join" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathJoinCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2113:1: */
	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13236)
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTclJoinPath(tls, objc-1, objv+uintptr(1)*8, 0))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// PathNativeNameCmd --
//
//	This function is invoked to process the "file nativename" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathNativeNameCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2145:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var ds Tcl_DString at bp, 216

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	if XTcl_TranslateFileName(tls, interp, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}(), bp) == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTclDStringToObj(tls, bp))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// PathNormalizeCmd --
//
//	This function is invoked to process the "file normalize" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathNormalizeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2182:1: */
	var fileName uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	fileName = XTcl_FSGetNormalizedPath(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if fileName == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, fileName)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// PathSplitCmd --
//
//	This function is invoked to process the "file split" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathSplitCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2220:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var res uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	res = XTcl_FSSplitPath(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0))
	if res == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+13252,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7949, ts+13299, ts+13309,
			uintptr(0)))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, res)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// PathTypeCmd --
//
//	This function is invoked to process the "file pathtype" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPathTypeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2263:1: */
	var typeName uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	switch XTcl_FSGetPathType(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) {
	case TCL_PATH_ABSOLUTE:
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				typeName = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(typeName)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes, ts+13318, uint64(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes + 8)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Flength = int32(uint64(unsafe.Sizeof([9]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(typeName)).FtypePtr = uintptr(0)
			{
			}
		}
		break
	case TCL_PATH_RELATIVE:
		for ok2 := true; ok2; ok2 = 0 != 0 {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				typeName = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(typeName)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes, ts+13327, uint64(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes + 8)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Flength = int32(uint64(unsafe.Sizeof([9]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(typeName)).FtypePtr = uintptr(0)
			{
			}
		}
		break
	case TCL_PATH_VOLUME_RELATIVE:
		for ok4 := true; ok4; ok4 = 0 != 0 {
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				typeName = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(typeName)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes, ts+13336, uint64(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(typeName)).Fbytes + 14)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(typeName)).Flength = int32(uint64(unsafe.Sizeof([15]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(typeName)).FtypePtr = uintptr(0)
			{
			}
		}
		break
	default:
		// Should be unreachable
		return TCL_OK
	}
	XTcl_SetObjResult(tls, interp, typeName)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FilesystemSeparatorCmd --
//
//	This function is invoked to process the "file separator" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFilesystemSeparatorCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2311:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	if objc < 1 || objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13351)
		return TCL_ERROR
	}
	if objc == 1 {
		var separator uintptr = uintptr(0) // lint

		switch XtclPlatform {
		case TCL_PLATFORM_UNIX:
			separator = ts + 6377 /* "/" */
			break
			fallthrough
		case TCL_PLATFORM_WINDOWS:
			separator = ts + 13358 /* "\\" */
			break
		}
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, separator, 1))
	} else {
		var separatorObj uintptr = XTcl_FSPathSeparator(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))

		if separatorObj == uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+13207, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+13225,
				XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))), uintptr(0)))
			return TCL_ERROR
		}
		XTcl_SetObjResult(tls, interp, separatorObj)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FilesystemVolumesCmd --
//
//	This function is invoked to process the "file volumes" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFilesystemVolumesCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2366:1: */
	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTcl_FSListVolumes(tls))
	return TCL_OK
}

//---------------------------------------------------------------------------
//
// CheckAccess --
//
//	Utility procedure used by Tcl_FileObjCmd() to query file attributes
//	available through the access() system call.
//
// Results:
//	Always returns TCL_OK. Sets interp's result to boolean true or false
//	depending on whether the file has the specified attribute.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sCheckAccess(tls *libc.TLS, interp uintptr, pathPtr uintptr, mode int32) int32 { /* tclCmdAH.c:2399:1: */
	var value int32

	if XTcl_FSConvertToPathType(tls, interp, pathPtr) != TCL_OK {
		value = 0
	} else {
		value = libc.Bool32(XTcl_FSAccess(tls, pathPtr, mode) == 0)
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(value != 0)))

	return TCL_OK
}

//---------------------------------------------------------------------------
//
// GetStatBuf --
//
//	Utility procedure used by Tcl_FileObjCmd() to query file attributes
//	available through the stat() or lstat() system call.
//
// Results:
//	The return value is TCL_OK if the specified file exists and can be
//	stat'ed, TCL_ERROR otherwise. If TCL_ERROR is returned, an error
//	message is left in interp's result. If TCL_OK is returned, *statPtr is
//	filled with information about the specified file.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sGetStatBuf(tls *libc.TLS, interp uintptr, pathPtr uintptr, statProc uintptr, statPtr uintptr) int32 { /* tclCmdAH.c:2439:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var status int32

	if XTcl_FSConvertToPathType(tls, interp, pathPtr) != TCL_OK {
		return TCL_ERROR
	}

	status = (*struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{statProc})).f(tls, pathPtr, statPtr)

	if status < 0 {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+13360,
				libc.VaList(bp, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
					}
					return XTcl_GetString(tls, pathPtr)
				}(), XTcl_PosixError(tls, interp))))
		}
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StoreStatData --
//
//	This is a utility procedure that breaks out the fields of a "stat"
//	structure and stores them in textual form into the elements of an
//	associative array.
//
// Results:
//	Returns a standard Tcl return value. If an error occurs then a message
//	is left in interp's result.
//
// Side effects:
//	Elements of the associative array given by "varName" are modified.
//
//----------------------------------------------------------------------

func sStoreStatData(tls *libc.TLS, interp uintptr, varName uintptr, statPtr uintptr) int32 { /* tclCmdAH.c:2486:1: */
	var field uintptr
	var value uintptr
	var mode uint16

	// Assume Tcl_ObjSetVar2() does not keep a copy of the field name!
	//
	// Might be a better idea to call Tcl_SetVar2Ex() instead, except we want
	// to have an object (i.e. possibly cached) array variable name but a
	// string element name, so no API exists. Messy.

	// Watch out porters; the inode is meant to be an *unsigned* value, so the
	// cast might fail when there isn't a real arithmetic 'long long' type...

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+13384, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 3)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewLongObj(tls, int32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_dev))
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok2 := true; ok2; ok2 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok3 := true; ok3; ok3 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	for ok4 := true; ok4; ok4 = 0 != 0 {
		for ok5 := true; ok5; ok5 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+13388, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 3)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewWideIntObj(tls, Tcl_WideInt((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_ino))
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok6 := true; ok6; ok6 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok7 := true; ok7; ok7 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	for ok8 := true; ok8; ok8 = 0 != 0 {
		for ok9 := true; ok9; ok9 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+13392, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 5)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewLongObj(tls, int32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_nlink))
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok10 := true; ok10; ok10 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok11 := true; ok11; ok11 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	for ok12 := true; ok12; ok12 = 0 != 0 {
		for ok13 := true; ok13; ok13 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+13398, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 3)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewLongObj(tls, int32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_uid))
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok14 := true; ok14; ok14 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok15 := true; ok15; ok15 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	for ok16 := true; ok16; ok16 = 0 != 0 {
		for ok17 := true; ok17; ok17 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+13402, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 3)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewLongObj(tls, int32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_gid))
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok18 := true; ok18; ok18 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok19 := true; ok19; ok19 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	for ok20 := true; ok20; ok20 = 0 != 0 {
		for ok21 := true; ok21; ok21 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+12823, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 4)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewWideIntObj(tls, (*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_size)
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok22 := true; ok22; ok22 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok23 := true; ok23; ok23 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	for ok24 := true; ok24; ok24 = 0 != 0 {
		for ok25 := true; ok25; ok25 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+12641, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 5)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewWideIntObj(tls, XTcl_GetAccessTimeFromStat(tls, statPtr))
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok26 := true; ok26; ok26 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok27 := true; ok27; ok27 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	for ok28 := true; ok28; ok28 = 0 != 0 {
		for ok29 := true; ok29; ok29 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+12738, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 5)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewWideIntObj(tls, XTcl_GetModificationTimeFromStat(tls, statPtr))
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok30 := true; ok30; ok30 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok31 := true; ok31; ok31 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	for ok32 := true; ok32; ok32 = 0 != 0 {
		for ok33 := true; ok33; ok33 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+13406, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 5)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewWideIntObj(tls, XTcl_GetChangeTimeFromStat(tls, statPtr))
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok34 := true; ok34; ok34 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok35 := true; ok35; ok35 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	mode = (*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_mode
	for ok36 := true; ok36; ok36 = 0 != 0 {
		for ok37 := true; ok37; ok37 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+13412, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 4)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewIntObj(tls, int32(mode))
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok38 := true; ok38; ok38 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok39 := true; ok39; ok39 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	for ok40 := true; ok40; ok40 = 0 != 0 {
		for ok41 := true; ok41; ok41 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			field = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(field)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes, ts+12847, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).Fbytes + 4)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount++
	value = XTcl_NewStringObj(tls, sGetTypeFromMode(tls, int32(mode)), -1)
	if XTcl_ObjSetVar2(tls, interp, varName, field, value, TCL_LEAVE_ERR_MSG) == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
				for ok42 := true; ok42; ok42 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
					XtclFreeObjList = field
				}
			} else {
				XTclFreeObj(tls, field)
			}
		}
		return TCL_ERROR
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(field)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(field)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(field)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(field)).Flength = -1
			for ok43 := true; ok43; ok43 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(field + 32)) = XtclFreeObjList
				XtclFreeObjList = field
			}
		} else {
			XTclFreeObj(tls, field)
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// GetTypeFromMode --
//
//	Given a mode word, returns a string identifying the type of a file.
//
// Results:
//	A static text string giving the file type from mode.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetTypeFromMode(tls *libc.TLS, mode int32) uintptr { /* tclCmdAH.c:2558:19: */
	if mode&X_S_IFMT == X_S_IFREG {
		return ts + 12636 /* "file" */
	} else if mode&X_S_IFMT == X_S_IFDIR {
		return ts + 13417 /* "directory" */
	} else if mode&X_S_IFMT == X_S_IFCHR {
		return ts + 13427 /* "characterSpecial" */
	} else if mode&X_S_IFMT == X_S_IFBLK {
		return ts + 13444 /* "blockSpecial" */
	} else if mode&X_S_IFMT == X_S_IFIFO {
		return ts + 13457 /* "fifo" */
	} else if mode&X_S_IFMT == S_IFLNK {
		return ts + 12727 /* "link" */
	}
	return ts + 13462 /* "unknown" */
}

//----------------------------------------------------------------------
//
// Tcl_ForObjCmd --
//
//	This procedure is invoked to process the "for" Tcl command. See the
//	user documentation for details on what it does.
//
//	With the bytecode compiler, this procedure is only called when a
//	command name is computed at runtime, and is "for" or the name to which
//	"for" was renamed: e.g.,
//	"set z for; $z {set i 0} {$i<100} {incr i} {puts $i}"
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
// Notes:
//	This command is split into a lot of pieces so that it can avoid doing
//	reentrant TEBC calls. This makes things rather hard to follow, but
//	here's the plan:
//
//	NR:	---------------_ *	Direct:	Tcl_ForObjCmd -> TclNRForObjCmd
//					|
//				ForSetupCallback
//					|
//	[while] ------------> TclNRForIterCallback <---------.
//					|		     |
//				 ForCondCallback	     |
//					|		     |
//				 ForNextCallback ------------|
//					|		     |
//			       ForPostNextCallback	     |
//					|____________________|
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ForObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2627:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRForObjCmd})), dummy, objc, objv)
}

func XTclNRForObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2637:1: */
	var iPtr uintptr = interp
	var iterPtr uintptr

	if objc != 5 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13470)
		return TCL_ERROR
	}

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr
		{
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			_objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		iterPtr = _objPtr
	}
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fcond = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fbody = *(*uintptr)(unsafe.Pointer(objv + 4*8))
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fnext = *(*uintptr)(unsafe.Pointer(objv + 3*8))
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fmsg = ts + 13494 /* "\n    (\"for\" body..." */
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fword = 4

	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _callbackPtr uintptr
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sForSetupCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = iterPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}

	// TIP #280. Make invoking context available to initial script.

	return XTclNREvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, 1)
}

func sForSetupCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdAH.c:2668:1: */
	var iterPtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	if result != TCL_OK {
		if result == TCL_ERROR {
			XTcl_AddErrorInfo(tls, interp, ts+13520)
		}
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(iterPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = iterPtr
			}
		}
		return result
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _callbackPtr uintptr
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRForIterCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = iterPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return TCL_OK
}

func XTclNRForIterCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdAH.c:2687:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var iterPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var boolObj uintptr

	switch result {
	case TCL_OK:
		fallthrough
	case TCL_CONTINUE:
		// We need to reset the result before evaluating the expression.
		// Otherwise, any error message will be appended to the result of the
		// last evaluation.

		XTcl_ResetResult(tls, interp)
		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			boolObj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr = uintptr(0)
		{
		}

		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _callbackPtr uintptr
			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok3 := true; ok3; ok3 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sForCondCallback}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = iterPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = boolObj
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
		return XTcl_NRExprObj(tls, interp, (*ForIterData)(unsafe.Pointer(iterPtr)).Fcond, boolObj)
	case TCL_BREAK:
		result = TCL_OK
		XTcl_ResetResult(tls, interp)
		break
	case TCL_ERROR:
		XTcl_AppendObjToErrorInfo(tls, interp,
			XTcl_ObjPrintf(tls, (*ForIterData)(unsafe.Pointer(iterPtr)).Fmsg, libc.VaList(bp, XTcl_GetErrorLine(tls, interp))))
	}
	for ok4 := true; ok4; ok4 = 0 != 0 {
		for ok5 := true; ok5; ok5 = 0 != 0 {
			*(*uintptr)(unsafe.Pointer(iterPtr + 32)) = XtclFreeObjList
			XtclFreeObjList = iterPtr
		}
	}
	return result
}

func sForCondCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdAH.c:2722:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	var iterPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var boolObj uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	// var value int32 at bp, 4

	if result != TCL_OK {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = boolObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			for ok2 := true; ok2; ok2 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(iterPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = iterPtr
			}
		}
		return result
	} else if XTcl_GetBooleanFromObj(tls, interp, boolObj, bp) != TCL_OK {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = boolObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok4 := true; ok4; ok4 = 0 != 0 {
			for ok5 := true; ok5; ok5 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(iterPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = iterPtr
			}
		}
		return TCL_ERROR
	}
	for ok6 := true; ok6; ok6 = 0 != 0 {
		var _objPtr uintptr = boolObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	if *(*int32)(unsafe.Pointer(bp)) != 0 {
		// TIP #280.
		if (*ForIterData)(unsafe.Pointer(iterPtr)).Fnext != 0 {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _callbackPtr uintptr
				for ok8 := true; ok8; ok8 = 0 != 0 {
					var _objPtr uintptr
					{
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						_objPtr = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					_callbackPtr = _objPtr
				}
				(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, uintptr, uintptr, int32) int32
				}{sForNextCallback}))
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = iterPtr
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
				(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
				(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
			}
		} else {
			for ok10 := true; ok10; ok10 = 0 != 0 {
				var _callbackPtr uintptr
				for ok11 := true; ok11; ok11 = 0 != 0 {
					var _objPtr uintptr
					{
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						_objPtr = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					_callbackPtr = _objPtr
				}
				(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, uintptr, uintptr, int32) int32
				}{XTclNRForIterCallback}))
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = iterPtr
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
				(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
				(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
			}
		}
		return XTclNREvalObjEx(tls, interp, (*ForIterData)(unsafe.Pointer(iterPtr)).Fbody, 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr,
			(*ForIterData)(unsafe.Pointer(iterPtr)).Fword)
	}
	for ok13 := true; ok13; ok13 = 0 != 0 {
		for ok14 := true; ok14; ok14 = 0 != 0 {
			*(*uintptr)(unsafe.Pointer(iterPtr + 32)) = XtclFreeObjList
			XtclFreeObjList = iterPtr
		}
	}
	return result
}

func sForNextCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdAH.c:2760:1: */
	var iPtr uintptr = interp
	var iterPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var next uintptr = (*ForIterData)(unsafe.Pointer(iterPtr)).Fnext

	if result == TCL_OK || result == TCL_CONTINUE {
		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sForPostNextCallback}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = iterPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}

		// TIP #280. Make invoking context available to next script.

		return XTclNREvalObjEx(tls, interp, next, 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, 3)
	}

	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _callbackPtr uintptr
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRForIterCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = iterPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return result
}

func sForPostNextCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdAH.c:2785:1: */
	var iterPtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	if result != TCL_BREAK && result != TCL_OK {
		if result == TCL_ERROR {
			XTcl_AddErrorInfo(tls, interp, ts+13549)
			for ok := true; ok; ok = 0 != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(iterPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = iterPtr
				}
			}
		}
		return result
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _callbackPtr uintptr
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRForIterCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = iterPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_ForeachObjCmd, TclNRForeachCmd, EachloopCmd --
//
//	This object-based procedure is invoked to process the "foreach" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ForeachObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2822:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRForeachCmd})), dummy, objc, objv)
}

func XTclNRForeachCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2832:1: */
	return sEachloopCmd(tls, interp, TCL_EACH_KEEP_NONE, objc, objv)
}

func XTcl_LmapObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2842:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRLmapCmd})), dummy, objc, objv)
}

func XTclNRLmapCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2852:1: */
	return sEachloopCmd(tls, interp, TCL_EACH_COLLECT, objc, objv)
}

func sEachloopCmd(tls *libc.TLS, interp uintptr, collect int32, objc int32, objv uintptr) int32 { /* tclCmdAH.c:2862:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var numLists int32
	var statePtr uintptr
	var i int32
	var j int32
	var result int32
	var _objPtr uintptr
	var _callbackPtr uintptr
	numLists = (objc - 2) / 2

	if !(objc < 4 || objc%2 != 0) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+13579)
	return TCL_ERROR
__1:
	;

	// Manage numList parallel value lists.
	// statePtr->argvList[i] is a value list counted by statePtr->argcList[i];
	// statePtr->varvList[i] is the list of variables associated with the
	//		value list;
	// statePtr->varcList[i] is the number of variables associated with the
	//		value list;
	// statePtr->index[i] is the current pointer into the value list
	//		statePtr->argvList[i].
	//
	// The setting up of all of these pointers is moderately messy, but allows
	// the rest of this code to be simple and for us to use a single memory
	// allocation for better performance.

	statePtr = XTclStackAlloc(tls, interp,
		int32(uint64(unsafe.Sizeof(ForeachState{}))+uint64(3*numLists)*uint64(unsafe.Sizeof(int32(0)))+
			uint64(2*numLists)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(unsafe.Sizeof(uintptr(0))))))
	libc.Xmemset(tls, statePtr, 0,
		uint64(unsafe.Sizeof(ForeachState{}))+uint64(3*numLists)*uint64(unsafe.Sizeof(int32(0)))+
			uint64(2*numLists)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(unsafe.Sizeof(uintptr(0)))))
	(*ForeachState)(unsafe.Pointer(statePtr)).FvarvList = statePtr + uintptr(1)*88
	(*ForeachState)(unsafe.Pointer(statePtr)).FargvList = (*ForeachState)(unsafe.Pointer(statePtr)).FvarvList + uintptr(numLists)*8
	(*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList = (*ForeachState)(unsafe.Pointer(statePtr)).FargvList + uintptr(numLists)*8
	(*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList = (*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(numLists)*8
	(*ForeachState)(unsafe.Pointer(statePtr)).Findex = (*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(numLists)*8
	(*ForeachState)(unsafe.Pointer(statePtr)).FvarcList = (*ForeachState)(unsafe.Pointer(statePtr)).Findex + uintptr(numLists)*4
	(*ForeachState)(unsafe.Pointer(statePtr)).FargcList = (*ForeachState)(unsafe.Pointer(statePtr)).FvarcList + uintptr(numLists)*4

	(*ForeachState)(unsafe.Pointer(statePtr)).FnumLists = numLists
	(*ForeachState)(unsafe.Pointer(statePtr)).FbodyPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))
	(*ForeachState)(unsafe.Pointer(statePtr)).FbodyIdx = objc - 1

	if !(collect == TCL_EACH_COLLECT) {
		goto __2
	}
	(*ForeachState)(unsafe.Pointer(statePtr)).FresultList = XTcl_NewListObj(tls, 0, uintptr(0))
	goto __3
__2:
	(*ForeachState)(unsafe.Pointer(statePtr)).FresultList = uintptr(0)
__3:
	;

	// Break up the value lists and variable lists into elements.

	i = 0
__4:
	if !(i < numLists) {
		goto __6
	}
	*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)) = XTclListObjCopy(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1+i*2)*8)))
	if !(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)) == uintptr(0)) {
		goto __7
	}
	result = TCL_ERROR
	goto done
__7:
	;
	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarvList + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)) + 32)) + 16
		*(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarcList + uintptr(i)*4)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)) + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)), (*ForeachState)(unsafe.Pointer(statePtr)).FvarcList+uintptr(i)*4, (*ForeachState)(unsafe.Pointer(statePtr)).FvarvList+uintptr(i)*8)
	}
	if !(*(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarcList + uintptr(i)*4)) < 1) {
		goto __8
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+13619,
		libc.VaList(bp, func() uintptr {
			if (*ForeachState)(unsafe.Pointer(statePtr)).FresultList != uintptr(0) {
				return ts + 5792 /* "lmap" */
			}
			return ts + 5731 /* "foreach" */
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7949,
		func() uintptr {
			if (*ForeachState)(unsafe.Pointer(statePtr)).FresultList != uintptr(0) {
				return ts + 13639 /* "LMAP" */
			}
			return ts + 13644 /* "FOREACH" */
		}(),
		ts+13652, uintptr(0)))
	result = TCL_ERROR
	goto done
__8:
	;

	*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)) = XTclListObjCopy(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2+i*2)*8)))
	if !(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)) == uintptr(0)) {
		goto __9
	}
	result = TCL_ERROR
	goto done
__9:
	;
	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FargvList + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)) + 32)) + 16
		*(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FargcList + uintptr(i)*4)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)) + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)), (*ForeachState)(unsafe.Pointer(statePtr)).FargcList+uintptr(i)*4, (*ForeachState)(unsafe.Pointer(statePtr)).FargvList+uintptr(i)*8)
	}

	j = *(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FargcList + uintptr(i)*4)) / *(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarcList + uintptr(i)*4))
	if !(*(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FargcList + uintptr(i)*4))%*(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarcList + uintptr(i)*4)) != 0) {
		goto __10
	}
	j++
__10:
	;
	if !(j > (*ForeachState)(unsafe.Pointer(statePtr)).Fmaxj) {
		goto __11
	}
	(*ForeachState)(unsafe.Pointer(statePtr)).Fmaxj = j
__11:
	;
	goto __5
__5:
	i++
	goto __4
	goto __6
__6:
	;

	// If there is any work to do, assign the variables and set things going
	// non-recursively.

	if !((*ForeachState)(unsafe.Pointer(statePtr)).Fmaxj > 0) {
		goto __12
	}
	result = sForeachAssignments(tls, interp, statePtr)
	if !(result == TCL_ERROR) {
		goto __13
	}
	goto done
__13:
	;

__14:
__17:
	;
__20:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __23
	}
	XTclAllocateFreeObjects(tls)
__23:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	_callbackPtr = _objPtr
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sForeachLoopStep}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = statePtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	return XTclNREvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), 0,
		(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr, objc-1)
__12:
	;

	// This cleanup stage is only used when an error occurs during setup or if
	// there is no work to do.

	result = TCL_OK
done:
	sForeachCleanup(tls, interp, statePtr)
	return result
}

// Post-body processing handler.

func sForeachLoopStep(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdAH.c:2991:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var statePtr uintptr
	var _objPtr uintptr
	var _callbackPtr uintptr
	statePtr = *(*ClientData)(unsafe.Pointer(data))

	// Process the result code from this run of the [foreach] body. Note that
	// this switch uses fallthroughs in several places. Maintainer aware!

	switch result {
	case TCL_CONTINUE:
		goto __2
	case TCL_OK:
		goto __3
	case TCL_BREAK:
		goto __4
	case TCL_ERROR:
		goto __5
	default:
		goto __6
	}
	goto __1
__2:
	result = TCL_OK
	goto __1
__3:
	if !((*ForeachState)(unsafe.Pointer(statePtr)).FresultList != uintptr(0)) {
		goto __7
	}
	XTcl_ListObjAppendElement(tls, interp, (*ForeachState)(unsafe.Pointer(statePtr)).FresultList,
		XTcl_GetObjResult(tls, interp))
__7:
	;
	goto __1
__4:
	result = TCL_OK
	goto finish
__5:
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+13661,
		libc.VaList(bp, func() uintptr {
			if (*ForeachState)(unsafe.Pointer(statePtr)).FresultList != uintptr(0) {
				return ts + 5792 /* "lmap" */
			}
			return ts + 5731 /* "foreach" */
		}(),
			XTcl_GetErrorLine(tls, interp))))
__6:
	goto done
__1:
	;

	// Test if there is work still to be done. If so, do the next round of
	// variable assignments, reschedule ourselves and run the body again.

	if !((*ForeachState)(unsafe.Pointer(statePtr)).Fmaxj > libc.PreIncInt32(&(*ForeachState)(unsafe.Pointer(statePtr)).Fj, 1)) {
		goto __8
	}
	result = sForeachAssignments(tls, interp, statePtr)
	if !(result == TCL_ERROR) {
		goto __9
	}
	goto done
__9:
	;

__10:
__13:
	;
__16:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __19
	}
	XTclAllocateFreeObjects(tls)
__19:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	_callbackPtr = _objPtr
	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sForeachLoopStep}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = statePtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	return XTclNREvalObjEx(tls, interp, (*ForeachState)(unsafe.Pointer(statePtr)).FbodyPtr, 0,
		(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr, (*ForeachState)(unsafe.Pointer(statePtr)).FbodyIdx)
__8:
	;

	// We're done. Tidy up our work space and finish off.

finish:
	if !((*ForeachState)(unsafe.Pointer(statePtr)).FresultList == uintptr(0)) {
		goto __20
	}
	XTcl_ResetResult(tls, interp)
	goto __21
__20:
	XTcl_SetObjResult(tls, interp, (*ForeachState)(unsafe.Pointer(statePtr)).FresultList)
	(*ForeachState)(unsafe.Pointer(statePtr)).FresultList = uintptr(0) // Don't clean it up
__21:
	;

done:
	sForeachCleanup(tls, interp, statePtr)
	return result
}

// Factored out code to do the assignments in [foreach].

func sForeachAssignments(tls *libc.TLS, interp uintptr, statePtr uintptr) int32 { /* tclCmdAH.c:3063:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var i int32
	var v int32
	var k int32
	var valuePtr uintptr
	var varValuePtr uintptr

	for i = 0; i < (*ForeachState)(unsafe.Pointer(statePtr)).FnumLists; i++ {
		for v = 0; v < *(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarcList + uintptr(i)*4)); v++ {
			k = libc.PostIncInt32(&*(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).Findex + uintptr(i)*4)), 1)

			if k < *(*int32)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FargcList + uintptr(i)*4)) {
				valuePtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FargvList + uintptr(i)*8)) + uintptr(k)*8))
			} else {
				for ok := true; ok; ok = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					valuePtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount = 0
				(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength = 0
				(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr = uintptr(0)
				{
				}
				// Empty string
			}

			varValuePtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarvList + uintptr(i)*8)) + uintptr(v)*8)),
				uintptr(0), valuePtr, TCL_LEAVE_ERR_MSG)

			if varValuePtr == uintptr(0) {
				XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
					ts+13686,
					libc.VaList(bp, func() uintptr {
						if (*ForeachState)(unsafe.Pointer(statePtr)).FresultList != uintptr(0) {
							return ts + 5792 /* "lmap" */
						}
						return ts + 5731 /* "foreach" */
					}(),
						func() uintptr {
							if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarvList + uintptr(i)*8)) + uintptr(v)*8)))).Fbytes != 0 {
								return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarvList + uintptr(i)*8)) + uintptr(v)*8)))).Fbytes
							}
							return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvarvList + uintptr(i)*8)) + uintptr(v)*8)))
						}())))
				return TCL_ERROR
			}
		}
	}

	return TCL_OK
}

// Factored out code for cleaning up the state of the foreach.

func sForeachCleanup(tls *libc.TLS, interp uintptr, statePtr uintptr) { /* tclCmdAH.c:3101:1: */
	var i int32

	for i = 0; i < (*ForeachState)(unsafe.Pointer(statePtr)).FnumLists; i++ {
		if *(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)) != 0 {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)))).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)))).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)))).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)))).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)))).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)) + 32)) = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8))
					}
				} else {
					XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FvCopyList + uintptr(i)*8)))
				}
			}

		}
		if *(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)) != 0 {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)))).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)))).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)))).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)))).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)))).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)) + 32)) = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8))
					}
				} else {
					XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FaCopyList + uintptr(i)*8)))
				}
			}

		}
	}
	if (*ForeachState)(unsafe.Pointer(statePtr)).FresultList != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FresultList)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FresultList)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FresultList)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FresultList)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FresultList)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FresultList)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FresultList)).Flength = -1
				for ok2 := true; ok2; ok2 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer((*ForeachState)(unsafe.Pointer(statePtr)).FresultList + 32)) = XtclFreeObjList
					XtclFreeObjList = (*ForeachState)(unsafe.Pointer(statePtr)).FresultList
				}
			} else {
				XTclFreeObj(tls, (*ForeachState)(unsafe.Pointer(statePtr)).FresultList)
			}
		}

	}
	XTclStackFree(tls, interp, statePtr)
}

//----------------------------------------------------------------------
//
// Tcl_FormatObjCmd --
//
//	This procedure is invoked to process the "format" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_FormatObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdAH.c:3140:1: */
	var resultPtr uintptr // Where result is stored finally.

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10098)
		return TCL_ERROR
	}

	resultPtr = XTcl_Format(tls, interp, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}(), objc-2, objv+uintptr(2)*8)
	if resultPtr == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// automatically gathered by fwd; do not hand-edit
// =====^!^===== end forwards =====^!^=====

// more C++ voodoo

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The TclRegexp structure encapsulates a compiled regex_t, the flags that
// were used to compile it, and an array of pointers that are used to indicate
// subexpressions after a call to Tcl_RegExpExec. Note that the string and
// objPtr are mutually exclusive. These values are needed by Tcl_RegExpRange
// in order to return pointers into the original string.

type TclRegexp1 = struct {
	Fflags       int32
	F__ccgo_pad1 [4]byte
	Fre          Regex_t
	Fstring      uintptr
	FobjPtr      uintptr
	FglobObjPtr  uintptr
	Fmatches     uintptr
	Fdetails     Rm_detail_t
	FrefCount    int32
	F__ccgo_pad2 [4]byte
} /* tclRegexp.h:27:9 */

// automatically gathered by fwd; do not hand-edit
// =====^!^===== end forwards =====^!^=====

// more C++ voodoo

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The TclRegexp structure encapsulates a compiled regex_t, the flags that
// were used to compile it, and an array of pointers that are used to indicate
// subexpressions after a call to Tcl_RegExpExec. Note that the string and
// objPtr are mutually exclusive. These values are needed by Tcl_RegExpRange
// in order to return pointers into the original string.

type TclRegexp = TclRegexp1 /* tclRegexp.h:42:3 */

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// During execution of the "lsort" command, structures of the following type
// are used to arrange the objects being sorted into a collection of linked
// lists.

type SortElement1 = struct {
	FcollationKey struct{ FstrValuePtr uintptr }
	Fpayload      struct{ FobjPtr uintptr }
	FnextPtr      uintptr
} /* tclCmdIL.c:29:9 */

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// During execution of the "lsort" command, structures of the following type
// are used to arrange the objects being sorted into a collection of linked
// lists.

type SortElement = SortElement1 /* tclCmdIL.c:42:3 */

// These function pointer types are used with the "lsearch" and "lsort"
// commands to facilitate the "-nocase" option.

type SortStrCmpFn_t = uintptr /* tclCmdIL.c:49:13 */
type SortMemCmpFn_t = uintptr /* tclCmdIL.c:50:13 */

// The "lsort" command needs to pass certain information down to the function
// that compares two list elements, and the comparison function needs to pass
// success or failure information back up to the top-level "lsort" command.
// The following structure is used to pass this information.

type SortInfo1 = struct {
	FisIncreasing  int32
	FsortMode      int32
	FcompareCmdPtr uintptr
	Findexv        uintptr
	Findexc        int32
	FsingleIndex   int32
	Funique        int32
	FnumElements   int32
	Finterp        uintptr
	FresultCode    int32
	F__ccgo_pad1   [4]byte
} /* tclCmdIL.c:59:9 */

// The "lsort" command needs to pass certain information down to the function
// that compares two list elements, and the comparison function needs to pass
// success or failure information back up to the top-level "lsort" command.
// The following structure is used to pass this information.

type SortInfo = SortInfo1 /* tclCmdIL.c:82:3 */

// Array of values describing how to implement each standard subcommand of the
// "info" command.

var defaultInfoMap = [25]EnsembleImplMap{
	{Fname: ts + 13723, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13728, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13733, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13742, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13751, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 5711, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12033, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13760, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12691, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13771, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13777, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13787, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13795, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13804, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13810, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13818, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13825, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13832, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13849, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13860, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 4221, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13866, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13885, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13896, Fproc: 0, FcompileProc: 0},
	{},
} /* tclCmdIL.c:155:30 */

//----------------------------------------------------------------------
//
// Tcl_IfObjCmd --
//
//	This procedure is invoked to process the "if" Tcl command. See the
//	user documentation for details on what it does.
//
//	With the bytecode compiler, this procedure is only called when a
//	command name is computed at runtime, and is "if" or the name to which
//	"if" was renamed: e.g., "set z if; $z 1 {puts foo}"
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_IfObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:205:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRIfObjCmd})), dummy, objc, objv)
}

func XTclNRIfObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:215:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var boolObj uintptr

	if objc <= 1 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+13901,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+8889, uintptr(0)))
		return TCL_ERROR
	}

	// At this point, objv[1] refers to the main expression to test. The
	// arguments after the expression must be "then" (optional) and a script
	// to execute if the expression is true.

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		boolObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr = uintptr(0)
	{
	}

	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sIfConditionCallback})), uintptr(Intptr_t(objc)),
		objv, uintptr(int64(1)), boolObj)
	return XTcl_NRExprObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), boolObj)
}

func sIfConditionCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdIL.c:244:1: */
	bp := tls.Alloc(92)
	defer tls.Free(92)

	var iPtr uintptr
	var objc int32
	var objv uintptr
	var i int32
	var boolObj uintptr
	// var value int32 at bp+88, 4

	var thenScriptIndex int32
	var clause uintptr
	iPtr = interp
	objc = int32(*(*ClientData)(unsafe.Pointer(data)))
	objv = *(*ClientData)(unsafe.Pointer(data + 1*8))
	i = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))
	boolObj = *(*ClientData)(unsafe.Pointer(data + 3*8))
	thenScriptIndex = 0

	if !(result != TCL_OK) {
		goto __1
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount, 1) > 1) {
		goto __2
	}
	goto __3
__2:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4
	}

	if !((*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != XtclEmptyStringRep) {
		goto __6
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes)
__6:
	;
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = -1
__7:
	;
	*(*uintptr)(unsafe.Pointer(boolObj + 32)) = XtclFreeObjList
	XtclFreeObjList = boolObj
	goto __8
__8:
	if 0 != 0 {
		goto __7
	}
	goto __9
__9:
	;
	goto __5
__4:
	XTclFreeObj(tls, boolObj)
__5:
	;
__3:
	;

	return result
__1:
	;
	if !(XTcl_GetBooleanFromObj(tls, interp, boolObj, bp+88) != TCL_OK) {
		goto __10
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount, 1) > 1) {
		goto __11
	}
	goto __12
__11:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __13
	}

	if !((*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != XtclEmptyStringRep) {
		goto __15
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes)
__15:
	;
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = -1
__16:
	;
	*(*uintptr)(unsafe.Pointer(boolObj + 32)) = XtclFreeObjList
	XtclFreeObjList = boolObj
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	goto __14
__13:
	XTclFreeObj(tls, boolObj)
__14:
	;
__12:
	;

	return TCL_ERROR
__10:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount, 1) > 1) {
		goto __19
	}
	goto __20
__19:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __21
	}

	if !((*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != XtclEmptyStringRep) {
		goto __23
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes)
__23:
	;
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = -1
__24:
	;
	*(*uintptr)(unsafe.Pointer(boolObj + 32)) = XtclFreeObjList
	XtclFreeObjList = boolObj
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	goto __22
__21:
	XTclFreeObj(tls, boolObj)
__22:
	;
__20:
	;

__27:
	if !(1 != 0) {
		goto __28
	}
	i++
	if !(i >= objc) {
		goto __29
	}
	goto missingScript
__29:
	;
	clause = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}()
	if !(i < objc && libc.Xstrcmp(tls, clause, ts+13949) == 0) {
		goto __30
	}
	i++
__30:
	;
	if !(i >= objc) {
		goto __31
	}
	goto missingScript
__31:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 88)) != 0) {
		goto __32
	}
	thenScriptIndex = i
	*(*int32)(unsafe.Pointer(bp + 88 /* value */)) = 0
__32:
	;

	// The expression evaluated to false. Skip the command, then see if
	// there is an "else" or "elseif" clause.

	i++
	if !(i >= objc) {
		goto __33
	}
	if !(thenScriptIndex != 0) {
		goto __34
	}
	// TIP #280. Make invoking context available to branch.

	return XTclNREvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(thenScriptIndex)*8)), 0,
		(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, thenScriptIndex)
__34:
	;
	return TCL_OK
__33:
	;
	clause = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}()
	if !(int32(*(*int8)(unsafe.Pointer(clause))) != 'e' || libc.Xstrcmp(tls, clause, ts+13954) != 0) {
		goto __35
	}
	goto __28
__35:
	;
	i++

	// At this point in the loop, objv and objc refer to an expression to
	// test, either for the main expression or an expression following an
	// "elseif". The arguments after the expression must be "then"
	// (optional) and a script to execute if the expression is true.

	if !(i >= objc) {
		goto __36
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+13901,
		libc.VaList(bp, clause)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+8889, uintptr(0)))
	return TCL_ERROR
__36:
	;
	if !!(thenScriptIndex != 0) {
		goto __37
	}
__38:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __41
	}
	XTclAllocateFreeObjects(tls)
__41:
	;
	boolObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr = uintptr(0)

	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sIfConditionCallback})), *(*ClientData)(unsafe.Pointer(data)), *(*ClientData)(unsafe.Pointer(data + 1*8)),
		uintptr(Intptr_t(i)), boolObj)
	return XTcl_NRExprObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), boolObj)
__37:
	;
	goto __27
__28:
	;

	// Couldn't find a "then" or "elseif" clause to execute. Check now for an
	// "else" clause. We know that there's at least one more argument when we
	// get here.

	if !(libc.Xstrcmp(tls, clause, ts+13961) == 0) {
		goto __42
	}
	i++
	if !(i >= objc) {
		goto __43
	}
	goto missingScript
__43:
	;
__42:
	;
	if !(i < objc-1) {
		goto __44
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+13966,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+8889, uintptr(0)))
	return TCL_ERROR
__44:
	;
	if !(thenScriptIndex != 0) {
		goto __45
	}
	// TIP #280. Make invoking context available to branch/else.

	return XTclNREvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(thenScriptIndex)*8)), 0,
		(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, thenScriptIndex)
__45:
	;
	return XTclNREvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, i)

missingScript:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+14028,
		libc.VaList(bp+56, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i-1)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i-1)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i-1)*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+8889, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_IncrObjCmd --
//
//	This procedure is invoked to process the "incr" Tcl command. See the
//	user documentation for details on what it does.
//
//	With the bytecode compiler, this procedure is only called when a
//	command name is computed at runtime, and is "incr" or the name to
//	which "incr" was renamed: e.g., "set z incr; $z i -1"
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_IncrObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:388:1: */
	var newValuePtr uintptr
	var incrPtr uintptr

	if objc != 2 && objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14076)
		return TCL_ERROR
	}

	if objc == 3 {
		incrPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	} else {
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				incrPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes = uintptr(0)
			*(*int32)(unsafe.Pointer(incrPtr + 32)) = 1
			(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
			{
			}
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount++
	newValuePtr = XTclIncrObjVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0),
		incrPtr, TCL_LEAVE_ERR_MSG)
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = incrPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	if newValuePtr == uintptr(0) {
		return TCL_ERROR
	}

	// Set the interpreter's object result to refer to the variable's new
	// value object.

	XTcl_SetObjResult(tls, interp, newValuePtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclInitInfoCmd --
//
//	This function is called to create the "info" Tcl command. See the user
//	documentation for details on what it does.
//
// Results:
//	Handle for the info command, or NULL on failure.
//
// Side effects:
//	none
//
//----------------------------------------------------------------------

func XTclInitInfoCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclCmdIL.c:442:1: */
	return XTclMakeEnsemble(tls, interp, ts+14096, uintptr(unsafe.Pointer(&defaultInfoMap)))
}

//----------------------------------------------------------------------
//
// InfoArgsCmd --
//
//	Called to implement the "info args" command that returns the argument
//	list for a procedure. Handles the following syntax:
//
//	    info args procName
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoArgsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:469:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var iPtr uintptr = interp
	var name uintptr
	var procPtr uintptr
	var localPtr uintptr
	var listObjPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14101)
		return TCL_ERROR
	}

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	procPtr = XTclFindProc(tls, iPtr, name)
	if procPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+14110, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+14133, name, uintptr(0)))
		return TCL_ERROR
	}

	// Build a return list containing the arguments.

	listObjPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	for localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr; localPtr != uintptr(0); localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr {
		if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARGUMENT != 0 {
			XTcl_ListObjAppendElement(tls, interp, listObjPtr,
				XTcl_NewStringObj(tls, localPtr+40, -1))
		}
	}
	XTcl_SetObjResult(tls, interp, listObjPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoBodyCmd --
//
//	Called to implement the "info body" command that returns the body for
//	a procedure. Handles the following syntax:
//
//	    info body procName
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoBodyCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:532:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var iPtr uintptr = interp
	var name uintptr
	var procPtr uintptr
	var bodyPtr uintptr
	var resultPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14101)
		return TCL_ERROR
	}

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	procPtr = XTclFindProc(tls, iPtr, name)
	if procPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+14110, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+14133, name, uintptr(0)))
		return TCL_ERROR
	}

	// Here we used to return procPtr->bodyPtr, except when the body was
	// bytecompiled - in that case, the return was a copy of the body's string
	// rep. In order to better isolate the implementation details of the
	// compiler/engine subsystem, we now always return a copy of the string
	// rep. It is important to return a copy so that later manipulations of
	// the object do not invalidate the internal rep.

	bodyPtr = (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr
	if (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).Fbytes == uintptr(0) {
		// The string rep might not be valid if the procedure has never been
		// run before. [Bug #545644]

		if !((*Tcl_Obj)(unsafe.Pointer(bodyPtr)).Fbytes != 0) {
			XTcl_GetString(tls, bodyPtr)
		}
	}
	resultPtr = XTcl_NewStringObj(tls, (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).Fbytes, (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).Flength)

	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoCmdCountCmd --
//
//	Called to implement the "info cmdcount" command that returns the
//	number of commands that have been executed. Handles the following
//	syntax:
//
//	    info cmdcount
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoCmdCountCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:603:1: */
	var iPtr uintptr = interp

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FcmdCount))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoCommandsCmd --
//
//	Called to implement the "info commands" command that returns the list
//	of commands in the interpreter that match an optional pattern. The
//	pattern, if any, consists of an optional sequence of namespace names
//	separated by "::" qualifiers, which is followed by a glob-style
//	pattern that restricts which commands are returned. Handles the
//	following syntax:
//
//	    info commands ?pattern?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoCommandsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:645:1: */
	bp := tls.Alloc(148)
	defer tls.Free(148)

	var cmdName uintptr
	var pattern uintptr
	// var simplePattern uintptr at bp+24, 8

	var entryPtr uintptr
	// var search Tcl_HashSearch at bp+32, 24

	// var nsPtr uintptr at bp, 8

	var globalNsPtr uintptr = XTcl_GetGlobalNamespace(tls, interp)
	var currNsPtr uintptr = XTcl_GetCurrentNamespace(tls, interp)
	var listPtr uintptr
	var elemObjPtr uintptr
	var specificNsInPattern int32 = 0 // Init. to avoid compiler warning.
	var cmd Tcl_Command
	var i int32

	// Get the pattern and find the "effective namespace" in which to list
	// commands.

	if objc == 1 {
		*(*uintptr)(unsafe.Pointer(bp + 24 /* simplePattern */)) = uintptr(0)
		*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)) = currNsPtr
		specificNsInPattern = 0
	} else if objc == 2 {
		// From the pattern, get the effective namespace and the simple
		// pattern (no namespace qualifiers or ::'s) at the end. If an error
		// was found while parsing the pattern, return it. Otherwise, if the
		// namespace wasn't found, just leave nsPtr NULL: we will return an
		// empty list since no commands there can be found.

		// var dummy1NsPtr uintptr at bp+8, 8

		// var dummy2NsPtr uintptr at bp+16, 8

		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}()
		XTclGetNamespaceForQualName(tls, interp, pattern, uintptr(0), 0, bp,
			bp+8, bp+16, bp+24)

		if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) { // We successfully found the pattern's ns.
			specificNsInPattern = libc.Bool32(libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), pattern) != 0)
		}
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14143)
		return TCL_ERROR
	}

	// Exit as quickly as possible if we couldn't find the namespace.

	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
		return TCL_OK
	}

	// Scan through the effective namespace's command table and create a list
	// with all commands that match the pattern. If a specific namespace was
	// requested in the pattern, qualify the command names with the namespace
	// name.

	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))

	if *(*uintptr)(unsafe.Pointer(bp + 24)) != uintptr(0) && libc.Xstrpbrk(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), ts+14153) == uintptr(0) {
		// Special case for when the pattern doesn't include any of glob's
		// special characters. This lets us avoid scans of any hash tables.

		entryPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)) + 160 /* &.cmdTable */)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp /* nsPtr */))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 24 /* simplePattern */)))
		if entryPtr != uintptr(0) {
			if specificNsInPattern != 0 {
				cmd = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
				for ok := true; ok; ok = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					elemObjPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount = 0
				(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Flength = 0
				(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr = uintptr(0)
				{
				}

				XTcl_GetCommandFullName(tls, interp, cmd, elemObjPtr)
			} else {
				cmdName = func() uintptr {
					if (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+160)).FkeyType == -1 {
						return *(*uintptr)(unsafe.Pointer(entryPtr + 32))
					}
					return entryPtr + 32
				}()
				elemObjPtr = XTcl_NewStringObj(tls, cmdName, -1)
			}
			XTcl_ListObjAppendElement(tls, interp, listPtr, elemObjPtr)
			XTcl_SetObjResult(tls, interp, listPtr)
			return TCL_OK
		}
		if *(*uintptr)(unsafe.Pointer(bp)) != globalNsPtr && !(specificNsInPattern != 0) {
			var tablePtr uintptr = uintptr(0) // Quell warning.

			for i = 0; i < (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)))).FcommandPathLength; i++ {
				var pathNsPtr uintptr = (*NamespacePathEntry)(unsafe.Pointer((*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)))).FcommandPathArray + uintptr(i)*32)).FnsPtr

				if pathNsPtr == uintptr(0) {
					continue
				}
				tablePtr = pathNsPtr + 160
				entryPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FfindProc})).f(tls, tablePtr, *(*uintptr)(unsafe.Pointer(bp + 24 /* simplePattern */)))
				if entryPtr != uintptr(0) {
					break
				}
			}
			if entryPtr == uintptr(0) {
				tablePtr = globalNsPtr + 160
				entryPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FfindProc})).f(tls, tablePtr, *(*uintptr)(unsafe.Pointer(bp + 24 /* simplePattern */)))
			}
			if entryPtr != uintptr(0) {
				cmdName = func() uintptr {
					if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -1 {
						return *(*uintptr)(unsafe.Pointer(entryPtr + 32))
					}
					return entryPtr + 32
				}()
				XTcl_ListObjAppendElement(tls, interp, listPtr,
					XTcl_NewStringObj(tls, cmdName, -1))
				XTcl_SetObjResult(tls, interp, listPtr)
				return TCL_OK
			}
		}
	} else if (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcommandPathLength == 0 || specificNsInPattern != 0 {
		// The pattern is non-trivial, but either there is no explicit path or
		// there is an explicit namespace in the pattern. In both cases, the
		// old matching scheme is perfect.

		entryPtr = XTcl_FirstHashEntry(tls, *(*uintptr)(unsafe.Pointer(bp))+160, bp+32)
		for entryPtr != uintptr(0) {
			cmdName = func() uintptr {
				if (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+160)).FkeyType == -1 {
					return *(*uintptr)(unsafe.Pointer(entryPtr + 32))
				}
				return entryPtr + 32
			}()
			if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) ||
				XTcl_StringMatch(tls, cmdName, *(*uintptr)(unsafe.Pointer(bp + 24))) != 0 {
				if specificNsInPattern != 0 {
					cmd = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						elemObjPtr = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount = 0
					(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Flength = 0
					(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr = uintptr(0)
					{
					}

					XTcl_GetCommandFullName(tls, interp, cmd, elemObjPtr)
				} else {
					elemObjPtr = XTcl_NewStringObj(tls, cmdName, -1)
				}
				XTcl_ListObjAppendElement(tls, interp, listPtr, elemObjPtr)
			}
			entryPtr = XTcl_NextHashEntry(tls, bp+32)
		}

		// If the effective namespace isn't the global :: namespace, and a
		// specific namespace wasn't requested in the pattern, then add in all
		// global :: commands that match the simple pattern. Of course, we add
		// in only those commands that aren't hidden by a command in the
		// effective namespace.

		if *(*uintptr)(unsafe.Pointer(bp)) != globalNsPtr && !(specificNsInPattern != 0) {
			entryPtr = XTcl_FirstHashEntry(tls, globalNsPtr+160, bp+32)
			for entryPtr != uintptr(0) {
				cmdName = func() uintptr {
					if (*Tcl_HashTable)(unsafe.Pointer(globalNsPtr+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(globalNsPtr+160)).FkeyType == -1 {
						return *(*uintptr)(unsafe.Pointer(entryPtr + 32))
					}
					return entryPtr + 32
				}()
				if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) ||
					XTcl_StringMatch(tls, cmdName, *(*uintptr)(unsafe.Pointer(bp + 24))) != 0 {
					if (*struct {
						f func(*libc.TLS, uintptr, uintptr) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 160)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp))+160, cmdName) == uintptr(0) {
						XTcl_ListObjAppendElement(tls, interp, listPtr,
							XTcl_NewStringObj(tls, cmdName, -1))
					}
				}
				entryPtr = XTcl_NextHashEntry(tls, bp+32)
			}
		}
	} else {
		// The pattern is non-trivial (can match more than one command name),
		// there is an explicit path, and there is no explicit namespace in
		// the pattern. This means that we have to traverse the path to
		// discover all the commands defined.

		// var addedCommandsTable Tcl_HashTable at bp+56, 88

		// var isNew int32 at bp+144, 4

		var foundGlobal int32 = libc.Bool32(*(*uintptr)(unsafe.Pointer(bp)) == globalNsPtr)

		// We keep a hash of the objects already added to the result list.

		XTcl_InitObjHashTable(tls, bp+56)

		entryPtr = XTcl_FirstHashEntry(tls, *(*uintptr)(unsafe.Pointer(bp))+160, bp+32)
		for entryPtr != uintptr(0) {
			cmdName = func() uintptr {
				if (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+160)).FkeyType == -1 {
					return *(*uintptr)(unsafe.Pointer(entryPtr + 32))
				}
				return entryPtr + 32
			}()
			if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) ||
				XTcl_StringMatch(tls, cmdName, *(*uintptr)(unsafe.Pointer(bp + 24))) != 0 {
				elemObjPtr = XTcl_NewStringObj(tls, cmdName, -1)
				XTcl_ListObjAppendElement(tls, interp, listPtr, elemObjPtr)
				(*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp + 56 /* &addedCommandsTable */)).FcreateProc})).f(tls, bp+56 /* &addedCommandsTable */, elemObjPtr, bp+144 /* &isNew */)
			}
			entryPtr = XTcl_NextHashEntry(tls, bp+32)
		}

		// Search the path next.

		for i = 0; i < (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)))).FcommandPathLength; i++ {
			var pathNsPtr uintptr = (*NamespacePathEntry)(unsafe.Pointer((*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)))).FcommandPathArray + uintptr(i)*32)).FnsPtr

			if pathNsPtr == uintptr(0) {
				continue
			}
			if pathNsPtr == globalNsPtr {
				foundGlobal = 1
			}
			entryPtr = XTcl_FirstHashEntry(tls, pathNsPtr+160, bp+32)
			for entryPtr != uintptr(0) {
				cmdName = func() uintptr {
					if (*Tcl_HashTable)(unsafe.Pointer(pathNsPtr+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(pathNsPtr+160)).FkeyType == -1 {
						return *(*uintptr)(unsafe.Pointer(entryPtr + 32))
					}
					return entryPtr + 32
				}()
				if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) ||
					XTcl_StringMatch(tls, cmdName, *(*uintptr)(unsafe.Pointer(bp + 24))) != 0 {
					elemObjPtr = XTcl_NewStringObj(tls, cmdName, -1)
					(*struct {
						f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp + 56 /* &addedCommandsTable */)).FcreateProc})).f(tls, bp+56 /* &addedCommandsTable */, elemObjPtr, bp+144 /* &isNew */)
					if *(*int32)(unsafe.Pointer(bp + 144)) != 0 {
						XTcl_ListObjAppendElement(tls, interp, listPtr, elemObjPtr)
					} else {
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount, 1) > 1 {
						} else {
							if !(int32((*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
								{
								}
								if (*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes != XtclEmptyStringRep {
									XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes)
								}
								(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Flength = -1
								for ok2 := true; ok2; ok2 = 0 != 0 {
									*(*uintptr)(unsafe.Pointer(elemObjPtr + 32)) = XtclFreeObjList
									XtclFreeObjList = elemObjPtr
								}
							} else {
								XTclFreeObj(tls, elemObjPtr)
							}
						}

					}
				}
				entryPtr = XTcl_NextHashEntry(tls, bp+32)
			}
		}

		// If the effective namespace isn't the global :: namespace, and a
		// specific namespace wasn't requested in the pattern, then add in all
		// global :: commands that match the simple pattern. Of course, we add
		// in only those commands that aren't hidden by a command in the
		// effective namespace.

		if !(foundGlobal != 0) {
			entryPtr = XTcl_FirstHashEntry(tls, globalNsPtr+160, bp+32)
			for entryPtr != uintptr(0) {
				cmdName = func() uintptr {
					if (*Tcl_HashTable)(unsafe.Pointer(globalNsPtr+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(globalNsPtr+160)).FkeyType == -1 {
						return *(*uintptr)(unsafe.Pointer(entryPtr + 32))
					}
					return entryPtr + 32
				}()
				if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) ||
					XTcl_StringMatch(tls, cmdName, *(*uintptr)(unsafe.Pointer(bp + 24))) != 0 {
					elemObjPtr = XTcl_NewStringObj(tls, cmdName, -1)
					if (*struct {
						f func(*libc.TLS, uintptr, uintptr) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp + 56)).FfindProc})).f(tls, bp+56, elemObjPtr) == uintptr(0) {
						XTcl_ListObjAppendElement(tls, interp, listPtr, elemObjPtr)
					} else {
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount, 1) > 1 {
						} else {
							if !(int32((*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
								{
								}
								if (*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes != XtclEmptyStringRep {
									XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes)
								}
								(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Flength = -1
								for ok3 := true; ok3; ok3 = 0 != 0 {
									*(*uintptr)(unsafe.Pointer(elemObjPtr + 32)) = XtclFreeObjList
									XtclFreeObjList = elemObjPtr
								}
							} else {
								XTclFreeObj(tls, elemObjPtr)
							}
						}

					}
				}
				entryPtr = XTcl_NextHashEntry(tls, bp+32)
			}
		}

		XTcl_DeleteHashTable(tls, bp+56)
	}

	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoCompleteCmd --
//
//	Called to implement the "info complete" command that determines
//	whether a string is a complete Tcl command. Handles the following
//	syntax:
//
//	    info complete command
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoCompleteCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:922:1: */
	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14158)
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(XTclObjCommandComplete(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoDefaultCmd --
//
//	Called to implement the "info default" command that returns the
//	default value for a procedure argument. Handles the following syntax:
//
//	    info default procName arg varName
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoDefaultCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:959:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	var iPtr uintptr = interp
	var procName uintptr
	var argName uintptr
	var procPtr uintptr
	var localPtr uintptr
	var valueObjPtr uintptr

	if objc != 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14166)
		return TCL_ERROR
	}

	procName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	argName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()

	procPtr = XTclFindProc(tls, iPtr, procName)
	if procPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+14110, libc.VaList(bp, procName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+14133, procName,
			uintptr(0)))
		return TCL_ERROR
	}

	for localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr; localPtr != uintptr(0); localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr {
		if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARGUMENT != 0 &&
			libc.Xstrcmp(tls, argName, localPtr+40) == 0 {
			if (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr != uintptr(0) {
				valueObjPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(0),
					(*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr, TCL_LEAVE_ERR_MSG)
				if valueObjPtr == uintptr(0) {
					return TCL_ERROR
				}
				XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, 1))
			} else {
				var nullObjPtr uintptr

				for ok := true; ok; ok = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					nullObjPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(nullObjPtr)).FrefCount = 0
				(*Tcl_Obj)(unsafe.Pointer(nullObjPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(nullObjPtr)).Flength = 0
				(*Tcl_Obj)(unsafe.Pointer(nullObjPtr)).FtypePtr = uintptr(0)
				{
				}

				valueObjPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(0),
					nullObjPtr, TCL_LEAVE_ERR_MSG)
				if valueObjPtr == uintptr(0) {
					return TCL_ERROR
				}
				XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, 0))
			}
			return TCL_OK
		}
	}

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+14187,
		libc.VaList(bp+48, procName, argName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+7699, ts+14232, argName, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// InfoErrorStackCmd --
//
//	Called to implement the "info errorstack" command that returns information
//	about the last error's call stack. Handles the following syntax:
//
//	    info errorstack ?interp?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoErrorStackCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1042:1: */
	var target uintptr
	var iPtr uintptr

	if objc != 1 && objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14241)
		return TCL_ERROR
	}

	target = interp
	if objc == 2 {
		target = XTcl_GetSlave(tls, interp, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))))
		if target == uintptr(0) {
			return TCL_ERROR
		}
	}

	iPtr = target
	XTcl_SetObjResult(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack)

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclInfoExistsCmd --
//
//	Called to implement the "info exists" command that determines whether
//	a variable exists. Handles the following syntax:
//
//	    info exists varName
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func XTclInfoExistsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1091:1: */
	var varName uintptr
	var varPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14250)
		return TCL_ERROR
	}

	varName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	varPtr = XTclVarTraceExists(tls, interp, varName)

	XTcl_SetObjResult(tls, interp,
		XTcl_NewIntObj(tls, libc.Bool32(libc.Bool32(varPtr != 0 && *(*uintptr)(unsafe.Pointer(varPtr + 8)) != 0) != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoFrameCmd --
//	TIP #280
//
//	Called to implement the "info frame" command that returns the location
//	of either the currently executing command, or its caller. Handles the
//	following syntax:
//
//		info frame ?number?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoFrameCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1136:1: */
	bp := tls.Alloc(52)
	defer tls.Free(52)

	var iPtr uintptr
	// var level int32 at bp+48, 4

	var code int32
	var framePtr uintptr
	var cmdFramePtrPtr uintptr
	var corPtr uintptr
	var topLevel int32
	var runPtr uintptr
	var endPtr uintptr
	iPtr = interp
	code = TCL_OK
	cmdFramePtrPtr = iPtr + 936
	corPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr)).FcorPtr
	topLevel = 0

	if !(objc > 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14258)
	return TCL_ERROR
__1:
	;

__2:
	if !(corPtr != 0) {
		goto __3
	}
__4:
	if !(*(*uintptr)(unsafe.Pointer(cmdFramePtrPtr)) != 0) {
		goto __5
	}
	topLevel++
	cmdFramePtrPtr = *(*uintptr)(unsafe.Pointer(cmdFramePtrPtr)) + 32
	goto __4
__5:
	;
	if !((*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FcmdFramePtr != 0) {
		goto __6
	}
	*(*uintptr)(unsafe.Pointer(cmdFramePtrPtr)) = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FcmdFramePtr
__6:
	;
	corPtr = (*ExecEnv1)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr)).FcorPtr
	goto __2
__3:
	;
	topLevel = topLevel + (*CmdFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cmdFramePtrPtr)))).Flevel

	if !(topLevel != (*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr)).Flevel) {
		goto __7
	}
	framePtr = (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr
__8:
	if !(framePtr != 0) {
		goto __9
	}
	(*CmdFrame)(unsafe.Pointer(framePtr)).Flevel = libc.PostDecInt32(&topLevel, 1)
	framePtr = (*CmdFrame)(unsafe.Pointer(framePtr)).FnextPtr
	goto __8
__9:
	;
	if !(topLevel != 0) {
		goto __10
	}
	XTcl_Panic(tls, ts+14267, 0)
__10:
	;
	topLevel = (*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr)).Flevel
__7:
	;

	if !(objc == 1) {
		goto __11
	}
	// Just "info frame".

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, topLevel))
	goto done
__11:
	;

	// We've got "info frame level" and must parse the level first.

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 48)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48)
	}() != TCL_OK) {
		goto __12
	}
	code = TCL_ERROR
	goto done
__12:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 48)) > topLevel || *(*int32)(unsafe.Pointer(bp + 48)) <= -topLevel) {
		goto __13
	}
levelError:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+14298, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+14313,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}(), uintptr(0)))
	code = TCL_ERROR
	goto done
__13:
	;

	// Let us convert to relative so that we know how many levels to go back

	if !(*(*int32)(unsafe.Pointer(bp + 48)) > 0) {
		goto __14
	}
	*(*int32)(unsafe.Pointer(bp + 48 /* level */)) -= topLevel
__14:
	;

	framePtr = (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr
__15:
	if !(libc.PreIncInt32(&*(*int32)(unsafe.Pointer(bp + 48)), 1) <= 0) {
		goto __16
	}
	framePtr = (*CmdFrame)(unsafe.Pointer(framePtr)).FnextPtr
	if !!(framePtr != 0) {
		goto __17
	}
	goto levelError
__17:
	;
	goto __15
__16:
	;

	XTcl_SetObjResult(tls, interp, XTclInfoFrame(tls, interp, framePtr))

done:
	cmdFramePtrPtr = iPtr + 936
	corPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr)).FcorPtr
__18:
	if !(corPtr != 0) {
		goto __19
	}
	endPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).Fcaller.FcmdFramePtr

	if !(endPtr != 0) {
		goto __20
	}
	if !(*(*uintptr)(unsafe.Pointer(cmdFramePtrPtr)) == endPtr) {
		goto __21
	}
	*(*uintptr)(unsafe.Pointer(cmdFramePtrPtr)) = uintptr(0)
	goto __22
__21:
	runPtr = *(*uintptr)(unsafe.Pointer(cmdFramePtrPtr))

__23:
	if !((*CmdFrame)(unsafe.Pointer(runPtr)).FnextPtr != endPtr) {
		goto __24
	}
	*(*int32)(unsafe.Pointer(runPtr + 4)) -= (*CmdFrame)(unsafe.Pointer(endPtr)).Flevel
	runPtr = (*CmdFrame)(unsafe.Pointer(runPtr)).FnextPtr
	goto __23
__24:
	;
	(*CmdFrame)(unsafe.Pointer(runPtr)).Flevel = 1
	(*CmdFrame)(unsafe.Pointer(runPtr)).FnextPtr = uintptr(0)
__22:
	;
	cmdFramePtrPtr = corPtr + 24 + 16
__20:
	;
	corPtr = (*ExecEnv1)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr)).FcorPtr
	goto __18
__19:
	;
	return code
}

//----------------------------------------------------------------------
//
// TclInfoFrame --
//
//	Core of InfoFrameCmd, returns TIP280 dict for a given frame.
//
// Results:
//	Returns TIP280 dict.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclInfoFrame(tls *libc.TLS, interp uintptr, framePtr uintptr) uintptr { /* tclCmdIL.c:1265:9: */
	bp := tls.Alloc(160)
	defer tls.Free(160)

	var iPtr uintptr = interp
	var tmpObj uintptr
	*(*[20]uintptr)(unsafe.Pointer(bp /* lv */)) = [20]uintptr{0: uintptr(0)} // Keep uptodate when more keys are added to
	// the dict.
	var lc int32 = 0
	var procPtr uintptr
	if (*CmdFrame)(unsafe.Pointer(framePtr)).FframePtr != 0 {
		procPtr = (*CallFrame)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(framePtr)).FframePtr)).FprocPtr
	} else {
		procPtr = uintptr(0)
	}
	var needsFree int32 = -1

	// Pull the information and construct the dictionary to return, as list.
	// Regarding use of the CmdFrame fields see tclInt.h, and its definition.

	switch (*CmdFrame)(unsafe.Pointer(framePtr)).Ftype {
	case 0:

		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				tmpObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+12847, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewStringObj(tls, typeString[(*CmdFrame)(unsafe.Pointer(framePtr)).Ftype], -1)
		if (*CmdFrame)(unsafe.Pointer(framePtr)).Fline != 0 {
			for ok2 := true; ok2; ok2 = 0 != 0 {
				for ok3 := true; ok3; ok3 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					tmpObj = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
				if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+14319, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
				{
				}
			}
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(framePtr)).Fline)))
		} else {
			for ok4 := true; ok4; ok4 = 0 != 0 {
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					tmpObj = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
				if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+14319, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
				{
				}
			}
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewIntObj(tls, 1)
		}
		for ok6 := true; ok6; ok6 = 0 != 0 {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				tmpObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+14324, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 3)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTclGetSourceFromFrame(tls, framePtr, 0, uintptr(0))
		break

	case 3:

		for ok8 := true; ok8; ok8 = 0 != 0 {
			for ok9 := true; ok9; ok9 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				tmpObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+12847, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewStringObj(tls, typeString[(*CmdFrame)(unsafe.Pointer(framePtr)).Ftype], -1)
		break

	case 2:
		{
			// Execution of bytecode. Talk to the BC engine to fill out the frame.

			var fPtr uintptr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CmdFrame{})))

			*(*CmdFrame)(unsafe.Pointer(fPtr)) = *(*CmdFrame)(unsafe.Pointer(framePtr))

			// Note:
			// Type BC => f.data.eval.path	  is not used.
			//	      f.data.tebc.codePtr is used instead.

			XTclGetSrcInfoForPc(tls, fPtr)

			// Now filled: cmd.str.(cmd,len), line
			// Possibly modified: type, path!

			for ok10 := true; ok10; ok10 = 0 != 0 {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					tmpObj = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
				if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+12847, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
				{
				}
			}
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewStringObj(tls, typeString[(*CmdFrame)(unsafe.Pointer(fPtr)).Ftype], -1)
			if (*CmdFrame)(unsafe.Pointer(fPtr)).Fline != 0 {
				for ok12 := true; ok12; ok12 = 0 != 0 {
					for ok13 := true; ok13; ok13 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						tmpObj = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
					if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+14319, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
					}
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
					{
					}
				}
				*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
				*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(fPtr)).Fline)))
			}

			if (*CmdFrame)(unsafe.Pointer(fPtr)).Ftype == 4 {
				for ok14 := true; ok14; ok14 = 0 != 0 {
					for ok15 := true; ok15; ok15 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						tmpObj = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
					if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+12636, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
					}
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
					{
					}
				}
				*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
				*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = *(*uintptr)(unsafe.Pointer(fPtr + 40))

				// Death of reference by TclGetSrcInfoForPc.

				for ok16 := true; ok16; ok16 = 0 != 0 {
					var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(fPtr + 40))
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}

			for ok17 := true; ok17; ok17 = 0 != 0 {
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					tmpObj = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
				if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+14324, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 3)) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
				{
				}
			}
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTclGetSourceFromFrame(tls, fPtr, 0, uintptr(0))
			if (*CmdFrame)(unsafe.Pointer(fPtr)).FcmdObj != 0 && (*CmdFrame)(unsafe.Pointer(framePtr)).FcmdObj == uintptr(0) {
				needsFree = lc - 1
			}
			XTclStackFree(tls, interp, fPtr)
			break

		}

	case 4:

		for ok19 := true; ok19; ok19 = 0 != 0 {
			for ok20 := true; ok20; ok20 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				tmpObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+12847, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewStringObj(tls, typeString[(*CmdFrame)(unsafe.Pointer(framePtr)).Ftype], -1)
		for ok21 := true; ok21; ok21 = 0 != 0 {
			for ok22 := true; ok22; ok22 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				tmpObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+14319, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(framePtr)).Fline)))
		for ok23 := true; ok23; ok23 = 0 != 0 {
			for ok24 := true; ok24; ok24 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				tmpObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+12636, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = *(*uintptr)(unsafe.Pointer(framePtr + 40))

		// Refcount framePtr->data.eval.path goes up when lv is converted into
		// the result list object.

		for ok25 := true; ok25; ok25 = 0 != 0 {
			for ok26 := true; ok26; ok26 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				tmpObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+14324, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 3)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
		*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTclGetSourceFromFrame(tls, framePtr, 0, uintptr(0))
		break

	case 5:
		XTcl_Panic(tls, ts+14328, 0)
		break
	}

	// 'proc'. Common to all frame types. Conditional on having an associated
	// Procedure CallFrame.

	if procPtr != uintptr(0) {
		var namePtr uintptr = (*Command1)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FcmdPtr)).FhPtr

		if namePtr != 0 {
			var procNameObj uintptr

			// This is a regular command.

			for ok27 := true; ok27; ok27 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				procNameObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(procNameObj)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(procNameObj)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(procNameObj)).Flength = 0
			(*Tcl_Obj)(unsafe.Pointer(procNameObj)).FtypePtr = uintptr(0)
			{
			}

			XTcl_GetCommandFullName(tls, interp, (*Proc)(unsafe.Pointer(procPtr)).FcmdPtr,
				procNameObj)
			for ok28 := true; ok28; ok28 = 0 != 0 {
				for ok29 := true; ok29; ok29 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					tmpObj = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
				if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+5857, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 4)) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
				{
				}
			}
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
			*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = procNameObj
		} else if (*Command1)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FcmdPtr)).FclientData != 0 {
			var efiPtr uintptr = (*Command1)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FcmdPtr)).FclientData
			var i int32

			// This is a non-standard command. Luckily, it's told us how to
			// render extra information about its frame.

			for i = 0; i < (*ExtraFrameInfo)(unsafe.Pointer(efiPtr)).Flength; i++ {
				*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewStringObj(tls, (*ExtraFrameInfoField)(unsafe.Pointer(efiPtr+8+uintptr(i)*24)).Fname, -1)
				if (*ExtraFrameInfoField)(unsafe.Pointer(efiPtr+8+uintptr(i)*24)).Fproc != 0 {
					*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = (*struct {
						f func(*libc.TLS, ClientData) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*ExtraFrameInfoField)(unsafe.Pointer(efiPtr + 8 /* &.fields */ + uintptr(i)*24)).Fproc})).f(tls, (*ExtraFrameInfoField)(unsafe.Pointer(efiPtr+8 /* &.fields */ +uintptr(i)*24)).FclientData)
				} else {
					*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = (*ExtraFrameInfoField)(unsafe.Pointer(efiPtr + 8 + uintptr(i)*24)).FclientData
				}
			}
		}
	}

	// 'level'. Common to all frame types. Conditional on having an associated
	// _visible_ CallFrame.

	if (*CmdFrame)(unsafe.Pointer(framePtr)).FframePtr != uintptr(0) && (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr != uintptr(0) {
		var current uintptr = (*CmdFrame)(unsafe.Pointer(framePtr)).FframePtr
		var top uintptr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
		var idx uintptr

		for idx = top; idx != uintptr(0); idx = (*CallFrame)(unsafe.Pointer(idx)).FcallerVarPtr {
			if idx == current {
				var c int32 = (*CallFrame)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(framePtr)).FframePtr)).Flevel
				var t int32 = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Flevel

				for ok30 := true; ok30; ok30 = 0 != 0 {
					for ok31 := true; ok31; ok31 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						tmpObj = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
					if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes, ts+13804, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes + 5)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
					}
					(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
					{
					}
				}
				*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = tmpObj
				*(*uintptr)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&lc, 1))*8)) = XTcl_NewIntObj(tls, t-c)
				break
			}
		}
	}

	tmpObj = XTcl_NewListObj(tls, lc, bp)
	if needsFree >= 0 {
		for ok32 := true; ok32; ok32 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + uintptr(needsFree)*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return tmpObj
}

var typeString = [6]uintptr{
	ts + 2994, ts + 2994, ts + 2994, ts + 14370, ts + 6074, ts + 5857,
} /* tclCmdIL.c:1279:23 */

//----------------------------------------------------------------------
//
// InfoFunctionsCmd --
//
//	Called to implement the "info functions" command that returns the list
//	of math functions matching an optional pattern. Handles the following
//	syntax:
//
//	    info functions ?pattern?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoFunctionsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1476:1: */
	var script uintptr
	var code int32

	if objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14143)
		return TCL_ERROR
	}

	script = XTcl_NewStringObj(tls,

		ts+14382, -1)

	if objc == 2 {
		var arg uintptr = XTcl_NewListObj(tls, 1, objv+1*8)

		XTcl_AppendObjToObj(tls, script, arg)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = arg
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	(*Tcl_Obj)(unsafe.Pointer(script)).FrefCount++
	code = XTcl_EvalObjEx(tls, interp, script, 0)

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = script
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return code
}

//----------------------------------------------------------------------
//
// InfoHostnameCmd --
//
//	Called to implement the "info hostname" command that returns the host
//	name. Handles the following syntax:
//
//	    info hostname
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoHostnameCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1541:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var name uintptr

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}

	name = XTcl_GetHostName(tls)
	if name != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, name, -1))
		return TCL_OK
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+14758, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+14791, ts+14800, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// InfoLevelCmd --
//
//	Called to implement the "info level" command that returns information
//	about the call stack. Handles the following syntax:
//
//	    info level ?number?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoLevelCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1587:1: */
	bp := tls.Alloc(52)
	defer tls.Free(52)

	var iPtr uintptr
	// var level int32 at bp+48, 4

	var framePtr uintptr
	var rootFramePtr uintptr
	iPtr = interp

	if !(objc == 1) {
		goto __1
	} // Just "info level"
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Flevel))
	return TCL_OK
__1:
	;

	if !(objc == 2) {
		goto __2
	}
	rootFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 48)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48)
	}() != TCL_OK) {
		goto __3
	}
	return TCL_ERROR
__3:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 48)) <= 0) {
		goto __4
	}
	if !((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr == rootFramePtr) {
		goto __5
	}
	goto levelError
__5:
	;
	*(*int32)(unsafe.Pointer(bp + 48 /* level */)) += (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Flevel
__4:
	;
	framePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
__6:
	if !(framePtr != rootFramePtr) {
		goto __8
	}
	if !((*CallFrame)(unsafe.Pointer(framePtr)).Flevel == *(*int32)(unsafe.Pointer(bp + 48))) {
		goto __9
	}
	goto __8
__9:
	;
	goto __7
__7:
	framePtr = (*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr
	goto __6
	goto __8
__8:
	;
	if !(framePtr == rootFramePtr) {
		goto __10
	}
	goto levelError
__10:
	;

	XTcl_SetObjResult(tls, interp,
		XTcl_NewListObj(tls, (*CallFrame)(unsafe.Pointer(framePtr)).Fobjc, (*CallFrame)(unsafe.Pointer(framePtr)).Fobjv))
	return TCL_OK
__2:
	;

	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14258)
	return TCL_ERROR

levelError:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+14298, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+14313,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}(), uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// InfoLibraryCmd --
//
//	Called to implement the "info library" command that returns the
//	library directory for the Tcl installation. Handles the following
//	syntax:
//
//	    info library
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoLibraryCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1661:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var libDirName uintptr

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}

	libDirName = XTcl_GetVar2(tls, interp, ts+14808, uintptr(0), TCL_GLOBAL_ONLY)
	if libDirName != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, libDirName, -1))
		return TCL_OK
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+14820, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+14858, ts+14808, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// InfoLoadedCmd --
//
//	Called to implement the "info loaded" command that returns the
//	packages that have been loaded into an interpreter. Handles the
//	following syntax:
//
//	    info loaded ?interp?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoLoadedCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1708:1: */
	var interpName uintptr

	if objc != 1 && objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14241)
		return TCL_ERROR
	}

	if objc == 1 { // Get loaded pkgs in all interpreters.
		interpName = uintptr(0)
	} else { // Get pkgs just in specified interp.
		interpName = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}()
	}
	return XTclGetLoadedPackages(tls, interp, interpName)
}

//----------------------------------------------------------------------
//
// InfoNameOfExecutableCmd --
//
//	Called to implement the "info nameofexecutable" command that returns
//	the name of the binary file running this application. Handles the
//	following syntax:
//
//	    info nameofexecutable
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoNameOfExecutableCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1751:1: */
	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTclGetObjNameOfExecutable(tls))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoPatchLevelCmd --
//
//	Called to implement the "info patchlevel" command that returns the
//	default value for an argument to a procedure. Handles the following
//	syntax:
//
//	    info patchlevel
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoPatchLevelCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1787:1: */
	var patchlevel uintptr

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}

	patchlevel = XTcl_GetVar2(tls, interp, ts+7094, uintptr(0), TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG)
	if patchlevel != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, patchlevel, -1))
		return TCL_OK
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// InfoProcsCmd --
//
//	Called to implement the "info procs" command that returns the list of
//	procedures in the interpreter that match an optional pattern. The
//	pattern, if any, consists of an optional sequence of namespace names
//	separated by "::" qualifiers, which is followed by a glob-style
//	pattern that restricts which commands are returned. Handles the
//	following syntax:
//
//	    info procs ?pattern?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoProcsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:1834:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var cmdName uintptr
	var pattern uintptr
	// var simplePattern uintptr at bp+24, 8

	// var nsPtr uintptr at bp, 8

	var currNsPtr uintptr
	var listPtr uintptr
	var elemObjPtr uintptr
	var specificNsInPattern int32 // Init. to avoid compiler warning.
	var entryPtr uintptr
	// var search Tcl_HashSearch at bp+32, 24

	var cmdPtr uintptr
	var realCmdPtr uintptr
	// From the pattern, get the effective namespace and the simple
	// pattern (no namespace qualifiers or ::'s) at the end. If an error
	// was found while parsing the pattern, return it. Otherwise, if the
	// namespace wasn't found, just leave nsPtr NULL: we will return an
	// empty list since no commands there can be found.

	// var dummy1NsPtr uintptr at bp+8, 8

	// var dummy2NsPtr uintptr at bp+16, 8
	currNsPtr = XTcl_GetCurrentNamespace(tls, interp)
	specificNsInPattern = 0

	// Get the pattern and find the "effective namespace" in which to list
	// procs.

	if !(objc == 1) {
		goto __1
	}
	*(*uintptr)(unsafe.Pointer(bp + 24 /* simplePattern */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)) = currNsPtr
	specificNsInPattern = 0
	goto __2
__1:
	if !(objc == 2) {
		goto __3
	}

	pattern = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	XTclGetNamespaceForQualName(tls, interp, pattern, uintptr(0), 0, bp,
		bp+8, bp+16, bp+24)

	if !(*(*uintptr)(unsafe.Pointer(bp)) != uintptr(0)) {
		goto __5
	} // We successfully found the pattern's ns.
	specificNsInPattern = libc.Bool32(libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), pattern) != 0)
__5:
	;
	goto __4
__3:
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14143)
	return TCL_ERROR
__4:
	;
__2:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0)) {
		goto __6
	}
	return TCL_OK
__6:
	;

	// Scan through the effective namespace's command table and create a list
	// with all procs that match the pattern. If a specific namespace was
	// requested in the pattern, qualify the command names with the namespace
	// name.

	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	if !(*(*uintptr)(unsafe.Pointer(bp + 24)) != uintptr(0) && libc.Xstrpbrk(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), ts+14153) == uintptr(0)) {
		goto __7
	}
	entryPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)) + 160 /* &.cmdTable */)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp /* nsPtr */))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 24 /* simplePattern */)))
	if !(entryPtr != uintptr(0)) {
		goto __9
	}
	cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData

	if !!(XTclIsProc(tls, cmdPtr) != 0) {
		goto __10
	}
	realCmdPtr = XTclGetOriginalCommand(tls, cmdPtr)
	if !(realCmdPtr != uintptr(0) && XTclIsProc(tls, realCmdPtr) != 0) {
		goto __12
	}
	goto simpleProcOK
__12:
	;
	goto __11
__10:
simpleProcOK:
	if !(specificNsInPattern != 0) {
		goto __13
	}
__15:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __18
	}
	XTclAllocateFreeObjects(tls)
__18:
	;
	elemObjPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __16
__16:
	if 0 != 0 {
		goto __15
	}
	goto __17
__17:
	;
	(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr = uintptr(0)

	XTcl_GetCommandFullName(tls, interp, cmdPtr,
		elemObjPtr)
	goto __14
__13:
	elemObjPtr = XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* simplePattern */)), -1)
__14:
	;
	XTcl_ListObjAppendElement(tls, interp, listPtr, elemObjPtr)
__11:
	;
__9:
	;
	goto __8
__7:

	entryPtr = XTcl_FirstHashEntry(tls, *(*uintptr)(unsafe.Pointer(bp))+160, bp+32)
__19:
	if !(entryPtr != uintptr(0)) {
		goto __20
	}
	cmdName = func() uintptr {
		if (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+160)).FkeyType == -1 {
			return *(*uintptr)(unsafe.Pointer(entryPtr + 32))
		}
		return entryPtr + 32
	}()
	if !(*(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) ||
		XTcl_StringMatch(tls, cmdName, *(*uintptr)(unsafe.Pointer(bp + 24))) != 0) {
		goto __21
	}
	cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData

	if !!(XTclIsProc(tls, cmdPtr) != 0) {
		goto __22
	}
	realCmdPtr = XTclGetOriginalCommand(tls, cmdPtr)
	if !(realCmdPtr != uintptr(0) && XTclIsProc(tls, realCmdPtr) != 0) {
		goto __24
	}
	goto procOK
__24:
	;
	goto __23
__22:
procOK:
	if !(specificNsInPattern != 0) {
		goto __25
	}
__27:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __30
	}
	XTclAllocateFreeObjects(tls)
__30:
	;
	elemObjPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
	(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr = uintptr(0)

	XTcl_GetCommandFullName(tls, interp, cmdPtr,
		elemObjPtr)
	goto __26
__25:
	elemObjPtr = XTcl_NewStringObj(tls, cmdName, -1)
__26:
	;
	XTcl_ListObjAppendElement(tls, interp, listPtr, elemObjPtr)
__23:
	;
__21:
	;
	entryPtr = XTcl_NextHashEntry(tls, bp+32)
	goto __19
__20:
	;

	// If the effective namespace isn't the global :: namespace, and a
	// specific namespace wasn't requested in the pattern, then add in all
	// global :: procs that match the simple pattern. Of course, we add in
	// only those procs that aren't hidden by a proc in the effective
	// namespace.

__8:
	;

	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoScriptCmd --
//
//	Called to implement the "info script" command that returns the script
//	file that is currently being evaluated. Handles the following syntax:
//
//	    info script ?newName?
//
//	If newName is specified, it will set that as the internal name.
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message. It may change the internal
//	script filename.
//
//----------------------------------------------------------------------

func sInfoScriptCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2021:1: */
	var iPtr uintptr = interp
	if objc != 1 && objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14867)
		return TCL_ERROR
	}

	if objc == 2 {
		if (*Interp)(unsafe.Pointer(iPtr)).FscriptFile != uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FscriptFile
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FscriptFile = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FscriptFile)).FrefCount++
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FscriptFile != uintptr(0) {
		XTcl_SetObjResult(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FscriptFile)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoSharedlibCmd --
//
//	Called to implement the "info sharedlibextension" command that returns
//	the file extension used for shared libraries. Handles the following
//	syntax:
//
//	    info sharedlibextension
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoSharedlibCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2068:1: */
	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+14878, -1))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoTclVersionCmd --
//
//	Called to implement the "info tclversion" command that returns the
//	version number for this Tcl library. Handles the following syntax:
//
//	    info tclversion
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func sInfoTclVersionCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2106:1: */
	var version uintptr

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}

	version = XTcl_GetVar2Ex(tls, interp, ts+7116, uintptr(0),
		TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG)
	if version != uintptr(0) {
		XTcl_SetObjResult(tls, interp, version)
		return TCL_OK
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_JoinObjCmd --
//
//	This procedure is invoked to process the "join" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_JoinObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2146:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var listLen int32 at bp+8, 4

	var i int32
	var resObjPtr uintptr
	var joinObjPtr uintptr
	// var elemPtrs uintptr at bp, 8

	if objc < 2 || objc > 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14883)
		return TCL_ERROR
	}

	// Make sure the list argument is a list object and get its length and a
	// pointer to its array of element pointers.

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8, bp)
	}() != TCL_OK {
		return TCL_ERROR
	}

	if objc == 2 {
		joinObjPtr = XTcl_NewStringObj(tls, ts+14901, 1)
	} else {
		joinObjPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	}
	(*Tcl_Obj)(unsafe.Pointer(joinObjPtr)).FrefCount++

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resObjPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resObjPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resObjPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resObjPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resObjPtr)).FtypePtr = uintptr(0)
	{
	}

	for i = 0; i < *(*int32)(unsafe.Pointer(bp + 8 /* listLen */)); i++ {
		if i > 0 {

			// NOTE: This code is relying on Tcl_AppendObjToObj() **NOT**
			// to shimmer joinObjPtr.  If it did, then the case where
			// objv[1] and objv[2] are the same value would not be safe.
			// Accessing elemPtrs would crash.

			XTcl_AppendObjToObj(tls, resObjPtr, joinObjPtr)
		}
		XTcl_AppendObjToObj(tls, resObjPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* elemPtrs */)) + uintptr(i)*8)))
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = joinObjPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTcl_SetObjResult(tls, interp, resObjPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LassignObjCmd --
//
//	This object-based procedure is invoked to process the "lassign" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LassignObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2211:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var listCopyPtr uintptr
	// var listObjv uintptr at bp, 8
	// The contents of the list.
	// var listObjc int32 at bp+8, 4
	// The length of the list.
	var code int32 = TCL_OK

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14903)
		return TCL_ERROR
	}

	listCopyPtr = XTclListObjCopy(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if listCopyPtr == uintptr(0) {
		return TCL_ERROR
	}

	if (*Tcl_Obj)(unsafe.Pointer(listCopyPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(listCopyPtr + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listCopyPtr + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), listCopyPtr, bp+8, bp)
	}

	objc = objc - 2
	objv += 8 * uintptr(2)
	for code == TCL_OK && objc > 0 && *(*int32)(unsafe.Pointer(bp + 8)) > 0 {
		if XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&objv, 8))), uintptr(0), *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp)), 8))),
			TCL_LEAVE_ERR_MSG) == uintptr(0) {
			code = TCL_ERROR
		}
		objc--
		*(*int32)(unsafe.Pointer(bp + 8 /* listObjc */))--
	}

	if code == TCL_OK && objc > 0 {
		var emptyObj uintptr

		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			emptyObj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(emptyObj)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(emptyObj)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(emptyObj)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(emptyObj)).FtypePtr = uintptr(0)
		{
		}

		(*Tcl_Obj)(unsafe.Pointer(emptyObj)).FrefCount++
		for code == TCL_OK && libc.PostDecInt32(&objc, 1) > 0 {
			if XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&objv, 8))), uintptr(0), emptyObj,
				TCL_LEAVE_ERR_MSG) == uintptr(0) {
				code = TCL_ERROR
			}
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = emptyObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	if code == TCL_OK && *(*int32)(unsafe.Pointer(bp + 8)) > 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, *(*int32)(unsafe.Pointer(bp + 8 /* listObjc */)), *(*uintptr)(unsafe.Pointer(bp /* listObjv */))))
	}

	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = listCopyPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return code
}

//----------------------------------------------------------------------
//
// Tcl_LindexObjCmd --
//
//	This object-based procedure is invoked to process the "lindex" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LindexObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2285:1: */
	var elemPtr uintptr // Pointer to the element being extracted.

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14922)
		return TCL_ERROR
	}

	// If objc==3, then objv[2] may be either a single index or a list of
	// indices: go to TclLindexList to determine which. If objc>=4, or
	// objc==2, then objv[2 .. objc-2] are all single indices and processed as
	// such in TclLindexFlat.

	if objc == 3 {
		elemPtr = XTclLindexList(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	} else {
		elemPtr = XTclLindexFlat(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), objc-2, objv+uintptr(2)*8)
	}

	// Set the interpreter's object result to the last element extracted.

	if elemPtr == uintptr(0) {
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, elemPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = elemPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LinsertObjCmd --
//
//	This object-based procedure is invoked to process the "linsert" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A new Tcl list object formed by inserting zero or more elements into a
//	list.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LinsertObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2344:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var listPtr uintptr
	// var index int32 at bp+4, 4

	// var len int32 at bp, 4

	var result int32

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14939)
		return TCL_ERROR
	}

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()
	if result != TCL_OK {
		return result
	}

	// Get the index. "end" is interpreted to be the index after the last
	// element, such that using it will cause any inserted elements to be
	// appended to the list.

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp)), bp+4)
	}()
	if result != TCL_OK {
		return result
	}
	if *(*int32)(unsafe.Pointer(bp + 4)) > *(*int32)(unsafe.Pointer(bp)) {
		*(*int32)(unsafe.Pointer(bp + 4 /* index */)) = *(*int32)(unsafe.Pointer(bp /* len */))
	}

	// If the list object is unshared we can modify it directly. Otherwise we
	// create a copy to modify: this is "copy on write".

	listPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount > 1 {
		listPtr = XTclListObjCopy(tls, uintptr(0), listPtr)
	}

	if objc == 4 && *(*int32)(unsafe.Pointer(bp + 4)) == *(*int32)(unsafe.Pointer(bp)) {
		// Special case: insert one element at the end of the list.

		XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	} else {
		if TCL_OK != XTcl_ListObjReplace(tls, interp, listPtr, *(*int32)(unsafe.Pointer(bp + 4)), 0,
			objc-3, objv+3*8) {
			return TCL_ERROR
		}
	}

	// Set the interpreter's object result.

	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ListObjCmd --
//
//	This procedure is invoked to process the "list" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_ListObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2426:1: */
	// If there are no list elements, the result is an empty object.
	// Otherwise set the interpreter's result object to be a list object.

	if objc > 1 {
		XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, objc-1, objv+1*8))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LlengthObjCmd --
//
//	This object-based procedure is invoked to process the "llength" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LlengthObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2462:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var listLen int32 at bp, 4

	var result int32

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+3395)
		return TCL_ERROR
	}

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()
	if result != TCL_OK {
		return result
	}

	// Set the interpreter's object result to an integer object holding the
	// length.

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp /* listLen */))))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LrangeObjCmd --
//
//	This procedure is invoked to process the "lrange" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LrangeObjCmd(tls *libc.TLS, notUsed ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2508:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var elemPtrs uintptr at bp+16, 8

	// var listLen int32 at bp, 4

	// var first int32 at bp+4, 4

	// var last int32 at bp+8, 4

	var result int32

	if objc != 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14964)
		return TCL_ERROR
	}

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()
	if result != TCL_OK {
		return result
	}

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp))-1, bp+4)
	}()
	if result != TCL_OK {
		return result
	}
	if *(*int32)(unsafe.Pointer(bp + 4)) < 0 {
		*(*int32)(unsafe.Pointer(bp + 4 /* first */)) = 0
	}

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), *(*int32)(unsafe.Pointer(bp))-1, bp+8)
	}()
	if result != TCL_OK {
		return result
	}
	if *(*int32)(unsafe.Pointer(bp + 8)) >= *(*int32)(unsafe.Pointer(bp)) {
		*(*int32)(unsafe.Pointer(bp + 8 /* last */)) = *(*int32)(unsafe.Pointer(bp)) - 1
	}

	if *(*int32)(unsafe.Pointer(bp + 4)) > *(*int32)(unsafe.Pointer(bp + 8)) {
		// Returning an empty list is easy.

		return TCL_OK
	}

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 16)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, bp+16)
	}()
	if result != TCL_OK {
		return result
	}

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FrefCount > 1 || (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FrefCount > 1 {
		XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, *(*int32)(unsafe.Pointer(bp + 8))-*(*int32)(unsafe.Pointer(bp + 4))+1,
			*(*uintptr)(unsafe.Pointer(bp + 16))+uintptr(*(*int32)(unsafe.Pointer(bp + 4)))*8))
	} else {
		// In-place is possible.

		if *(*int32)(unsafe.Pointer(bp + 8)) < *(*int32)(unsafe.Pointer(bp))-1 {
			XTcl_ListObjReplace(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*int32)(unsafe.Pointer(bp + 8))+1, *(*int32)(unsafe.Pointer(bp))-1-*(*int32)(unsafe.Pointer(bp + 8)),
				0, uintptr(0))
		}

		// This one is not conditioned on (first > 0) in order to preserve the
		// string-canonizing effect of [lrange 0 end].

		XTcl_ListObjReplace(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), 0, *(*int32)(unsafe.Pointer(bp + 4 /* first */)), 0, uintptr(0))
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LrepeatObjCmd --
//
//	This procedure is invoked to process the "lrepeat" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LrepeatObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2603:1: */
	bp := tls.Alloc(84)
	defer tls.Free(84)

	// var elementCount int32 at bp+80, 4

	var i int32
	var totalElems int32
	var listPtr uintptr
	var dataArray uintptr = uintptr(0)

	// Check arguments for legality:
	//		lrepeat count ?value ...?

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14980)
		return TCL_ERROR
	}
	if TCL_OK != func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 80)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+80)
	}() {
		return TCL_ERROR
	}
	if *(*int32)(unsafe.Pointer(bp + 80)) < 0 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+14998, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 80 /* elementCount */)))))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7949, ts+15035, ts+15043,
			uintptr(0)))
		return TCL_ERROR
	}

	// Skip forward to the interesting arguments now we've finished parsing.

	objc = objc - 2
	objv += 8 * uintptr(2)

	// Final sanity check. Do not exceed limits on max list length.

	if *(*int32)(unsafe.Pointer(bp + 80)) != 0 && objc > (1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0))))) / *(*int32)(unsafe.Pointer(bp + 80)) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+15050, libc.VaList(bp+48, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))))))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+4178, ts+15098, uintptr(0)))
		return TCL_ERROR
	}
	totalElems = objc * *(*int32)(unsafe.Pointer(bp + 80))

	// Get an empty list object that is allocated large enough to hold each
	// init value elementCount times.

	listPtr = XTcl_NewListObj(tls, totalElems, uintptr(0))
	if totalElems != 0 {
		var listRepPtr uintptr = *(*uintptr)(unsafe.Pointer(listPtr + 32))

		(*List)(unsafe.Pointer(listRepPtr)).FelemCount = *(*int32)(unsafe.Pointer(bp + 80)) * objc
		dataArray = listRepPtr + 16
	}

	// Set the elements. Note that we handle the common degenerate case of a
	// single value being repeated separately to permit the compiler as much
	// room as possible to optimize a loop that might be run a very large
	// number of times.

	if objc == 1 {
		var tmpPtr uintptr = *(*uintptr)(unsafe.Pointer(objv))

		*(*int32)(unsafe.Pointer(tmpPtr)) += *(*int32)(unsafe.Pointer(bp + 80))
		for i = 0; i < *(*int32)(unsafe.Pointer(bp + 80 /* elementCount */)); i++ {
			*(*uintptr)(unsafe.Pointer(dataArray + uintptr(i)*8)) = tmpPtr
		}
	} else {
		var j int32
		var k int32 = 0

		for i = 0; i < *(*int32)(unsafe.Pointer(bp + 80 /* elementCount */)); i++ {
			for j = 0; j < objc; j++ {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(j)*8)))).FrefCount++
				*(*uintptr)(unsafe.Pointer(dataArray + uintptr(libc.PostIncInt32(&k, 1))*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(j)*8))
			}
		}
	}

	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LreplaceObjCmd --
//
//	This object-based procedure is invoked to process the "lreplace" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A new Tcl list object formed by replacing zero or more elements of a
//	list.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LreplaceObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2712:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var listPtr uintptr
	// var first int32 at bp+4, 4

	// var last int32 at bp+8, 4

	// var listLen int32 at bp, 4

	var numToDelete int32
	var result int32

	if objc < 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+15105)
		return TCL_ERROR
	}

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()
	if result != TCL_OK {
		return result
	}

	// Get the first and last indexes. "end" is interpreted to be the index
	// for the last element, such that using it will cause that element to be
	// included for deletion.

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp))-1, bp+4)
	}()
	if result != TCL_OK {
		return result
	}

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), *(*int32)(unsafe.Pointer(bp))-1, bp+8)
	}()
	if result != TCL_OK {
		return result
	}

	if *(*int32)(unsafe.Pointer(bp + 4)) < 0 {
		*(*int32)(unsafe.Pointer(bp + 4 /* first */)) = 0
	}
	if *(*int32)(unsafe.Pointer(bp + 4)) > *(*int32)(unsafe.Pointer(bp)) {
		*(*int32)(unsafe.Pointer(bp + 4 /* first */)) = *(*int32)(unsafe.Pointer(bp /* listLen */))
	}

	if *(*int32)(unsafe.Pointer(bp + 8)) >= *(*int32)(unsafe.Pointer(bp)) {
		*(*int32)(unsafe.Pointer(bp + 8 /* last */)) = *(*int32)(unsafe.Pointer(bp)) - 1
	}
	if *(*int32)(unsafe.Pointer(bp + 4)) <= *(*int32)(unsafe.Pointer(bp + 8)) {
		numToDelete = *(*int32)(unsafe.Pointer(bp + 8)) - *(*int32)(unsafe.Pointer(bp + 4)) + 1
	} else {
		numToDelete = 0
	}

	// If the list object is unshared we can modify it directly, otherwise we
	// create a copy to modify: this is "copy on write".

	listPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount > 1 {
		listPtr = XTclListObjCopy(tls, uintptr(0), listPtr)
	}

	// Note that we call Tcl_ListObjReplace even when numToDelete == 0 and
	// objc == 4. In this case, the list value of listPtr is not changed (no
	// elements are removed or added), but by making the call we are assured
	// we end up with a list in canonical form. Resist any temptation to
	// optimize this case away.

	if TCL_OK != XTcl_ListObjReplace(tls, interp, listPtr, *(*int32)(unsafe.Pointer(bp + 4)), numToDelete,
		objc-4, objv+uintptr(4)*8) {
		return TCL_ERROR
	}

	// Set the interpreter's object result.

	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LreverseObjCmd --
//
//	This procedure is invoked to process the "lreverse" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LreverseObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2813:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var elemv uintptr at bp, 8

	// var elemc int32 at bp+8, 4

	var i int32
	var j int32

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+3395)
		return TCL_ERROR
	}
	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8, bp)
	}() != TCL_OK {
		return TCL_ERROR
	}

	// If the list is empty, just return it. [Bug 1876793]

	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		return TCL_OK
	}

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FrefCount > 1 ||
		(*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FrefCount > 1 { // Bug 1675044
		var resultObj uintptr
		var dataArray uintptr
		var listRepPtr uintptr

		resultObj = XTcl_NewListObj(tls, *(*int32)(unsafe.Pointer(bp + 8 /* elemc */)), uintptr(0))
		listRepPtr = *(*uintptr)(unsafe.Pointer(resultObj + 32))
		(*List)(unsafe.Pointer(listRepPtr)).FelemCount = *(*int32)(unsafe.Pointer(bp + 8 /* elemc */))
		dataArray = listRepPtr + 16

		i = 0
		j = *(*int32)(unsafe.Pointer(bp + 8)) - 1
	__1:
		if !(i < *(*int32)(unsafe.Pointer(bp + 8))) {
			goto __3
		}
		{
			*(*uintptr)(unsafe.Pointer(dataArray + uintptr(j)*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* elemv */)) + uintptr(i)*8))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(i)*8)))).FrefCount++

		}
		goto __2
	__2:
		i++
		j--
		goto __1
		goto __3
	__3:
		;

		XTcl_SetObjResult(tls, interp, resultObj)
	} else {

		// Not shared, so swap "in place". This relies on Tcl_LOGE above
		// returning a pointer to the live array of Tcl_Obj values.

		i = 0
		j = *(*int32)(unsafe.Pointer(bp + 8)) - 1
	__4:
		if !(i < j) {
			goto __6
		}
		{
			var tmp uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* elemv */)) + uintptr(i)*8))

			*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* elemv */)) + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* elemv */)) + uintptr(j)*8))
			*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* elemv */)) + uintptr(j)*8)) = tmp

		}
		goto __5
	__5:
		i++
		j--
		goto __4
		goto __6
	__6:
		;
		for ok := true; ok; ok = 0 != 0 {
			var _isobjPtr uintptr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LsearchObjCmd --
//
//	This procedure is invoked to process the "lsearch" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LsearchObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:2892:1: */
	bp := tls.Alloc(332)
	defer tls.Free(332)

	var bytes uintptr
	var patternBytes uintptr
	var i int32
	var match int32
	// var index int32 at bp+192, 4

	var result int32
	// var listc int32 at bp+280, 4

	// var length int32 at bp+288, 4

	// var elemLen int32 at bp+328, 4

	var bisect int32
	var dataType int32
	var isIncreasing int32
	var lower int32
	var upper int32
	// var offset int32 at bp+284, 4

	// var patWide Tcl_WideInt at bp+296, 8

	// var objWide Tcl_WideInt at bp+312, 8

	var allMatches int32
	var inlineReturn int32
	var negatedMatch int32
	var returnSubindices int32
	var noCase int32
	// var patDouble float64 at bp+304, 8

	// var objDouble float64 at bp+320, 8

	// var sortInfo SortInfo at bp+208, 56

	var patObj uintptr
	// var listv uintptr at bp+272, 8

	var listPtr uintptr
	var startPtr uintptr
	var itemPtr uintptr
	var strCmpFn SortStrCmpFn_t
	var regexp Tcl_RegExp
	var mode uint32
	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	// var encoded int32 at bp+264, 4
	// -index
	// var indices uintptr at bp+200, 8

	var j int32
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	var _objPtr7 uintptr
	var _objPtr8 uintptr
	var _objPtr9 uintptr
	var _objPtr10 uintptr
	var _objPtr11 uintptr
	var _objPtr12 uintptr
	var j1 int32
	var j2 int32
	result = TCL_OK
	strCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{libc.Xstrcmp}))
	regexp = uintptr(0)

	mode = uint32(1) /* GLOB */
	dataType = 0     /* ASCII */
	isIncreasing = 1
	allMatches = 0
	inlineReturn = 0
	returnSubindices = 0
	negatedMatch = 0
	bisect = 0
	listPtr = uintptr(0)
	startPtr = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 284 /* offset */)) = 0
	noCase = 0
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).FcompareCmdPtr = uintptr(0)
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).FisIncreasing = 1
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).FsortMode = 0
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).Finterp = interp
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).FresultCode = TCL_OK
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).Findexv = uintptr(0)
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).Findexc = 0

	if !(objc < 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15135)
	return TCL_ERROR
__1:
	;

	i = 1
__2:
	if !(i < objc-2) {
		goto __4
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options1)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+192) !=
		TCL_OK) {
		goto __5
	}
	if !(startPtr != uintptr(0)) {
		goto __6
	}
__7:
	_objPtr = startPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __10
	}
	XTclFreeObj(tls, _objPtr)
__10:
	;
	goto __8
__8:
	if 0 != 0 {
		goto __7
	}
	goto __9
__9:
	;
__6:
	;
	result = TCL_ERROR
	goto done
__5:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 192 /* index */))) {
	case uint32(0) /* LSEARCH_ALL */ :
		goto __12
	case uint32(1) /* LSEARCH_ASCII */ :
		goto __13
	case uint32(2) /* LSEARCH_BISECT */ :
		goto __14
	case uint32(3) /* LSEARCH_DECREASING */ :
		goto __15
	case uint32(4) /* LSEARCH_DICTIONARY */ :
		goto __16
	case uint32(5) /* LSEARCH_EXACT */ :
		goto __17
	case uint32(6) /* LSEARCH_GLOB */ :
		goto __18
	case uint32(7) /* LSEARCH_INCREASING */ :
		goto __19
	case uint32(9) /* LSEARCH_INLINE */ :
		goto __20
	case uint32(10) /* LSEARCH_INTEGER */ :
		goto __21
	case uint32(11) /* LSEARCH_NOCASE */ :
		goto __22
	case uint32(12) /* LSEARCH_NOT */ :
		goto __23
	case uint32(13) /* LSEARCH_REAL */ :
		goto __24
	case uint32(14) /* LSEARCH_REGEXP */ :
		goto __25
	case uint32(15) /* LSEARCH_SORTED */ :
		goto __26
	case uint32(17) /* LSEARCH_SUBINDICES */ :
		goto __27
	case uint32(16) /* LSEARCH_START */ :
		goto __28
	case uint32(8) /* LSEARCH_INDEX */ :
		goto __29
	}
	goto __11
__12: // -all
	allMatches = 1
	goto __11
__13: // -ascii
	dataType = 0 /* ASCII */
	goto __11
__14: // -bisect
	mode = uint32(3) /* SORTED */
	bisect = 1
	goto __11
__15: // -decreasing
	isIncreasing = 0
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).FisIncreasing = 0
	goto __11
__16: // -dictionary
	dataType = 1 /* DICTIONARY */
	goto __11
__17: // -increasing
	mode = uint32(0) /* EXACT */
	goto __11
__18: // -glob
	mode = uint32(1) /* GLOB */
	goto __11
__19: // -increasing
	isIncreasing = 1
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).FisIncreasing = 1
	goto __11
__20: // -inline
	inlineReturn = 1
	goto __11
__21: // -integer
	dataType = 2 /* INTEGER */
	goto __11
__22: // -nocase
	strCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTclUtfCasecmp}))
	noCase = 1
	goto __11
__23: // -not
	negatedMatch = 1
	goto __11
__24: // -real
	dataType = 3 /* REAL */
	goto __11
__25: // -regexp
	mode = uint32(2) /* REGEXP */
	goto __11
__26: // -sorted
	mode = uint32(3) /* SORTED */
	goto __11
__27: // -subindices
	returnSubindices = 1
	goto __11
__28: // -start
	// If there was a previous -start option, release its saved index
	// because it will either be replaced or there will be an error.

	if !(startPtr != uintptr(0)) {
		goto __30
	}
__31:
	_objPtr1 = startPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __34
	}
	XTclFreeObj(tls, _objPtr1)
__34:
	;
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
__30:
	;
	if !(i > objc-4) {
		goto __35
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+15168, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+14232, ts+15191, uintptr(0)))
	result = TCL_ERROR
	goto done
__35:
	;
	i++
	if !(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) == *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8))) {
		goto __36
	}
	// Take copy to prevent shimmering problems. Note that it does
	// not matter if the index obj is also a component of the list
	// being searched. We only need to copy where the list and the
	// index are one-and-the-same.

	startPtr = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	goto __37
__36:
	startPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	(*Tcl_Obj)(unsafe.Pointer(startPtr)).FrefCount++
__37:
	;
	goto __11
__29:

	if !((*SortInfo)(unsafe.Pointer(bp+208)).Findexc > 1) {
		goto __38
	}
	XTclStackFree(tls, interp, (*SortInfo)(unsafe.Pointer(bp+208 /* &sortInfo */)).Findexv)
__38:
	;
	if !(i > objc-4) {
		goto __39
	}
	if !(startPtr != uintptr(0)) {
		goto __40
	}
__41:
	_objPtr2 = startPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __44
	}
	XTclFreeObj(tls, _objPtr2)
__44:
	;
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
__40:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+15199,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+14232, ts+15191, uintptr(0)))
	return TCL_ERROR
__39:
	;

	// Store the extracted indices for processing by sublist
	// extraction. Note that we don't do this using objects because
	// that has shimmering problems.

	i++
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 200)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 208 + 24)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+208+24, bp+200)
	}() != TCL_OK) {
		goto __45
	}
	if !(startPtr != uintptr(0)) {
		goto __46
	}
__47:
	_objPtr3 = startPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __50
	}
	XTclFreeObj(tls, _objPtr3)
__50:
	;
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
__46:
	;
	return TCL_ERROR
__45:
	;
	switch (*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).Findexc {
	case 0:
		goto __52
	case 1:
		goto __53
	default:
		goto __54
	}
	goto __51
__52:
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).Findexv = uintptr(0)
	goto __51
__53:
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).Findexv = bp + 208 + 28
	goto __51
__54:
	(*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).Findexv = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64((*SortInfo)(unsafe.Pointer(bp+208)).Findexc)))
__51:
	;

	// Fill the array by parsing each index. We don't know whether
	// their scale is sensible yet, but we at least perform the
	// syntactic check here.

	j = 0
__55:
	if !(j < (*SortInfo)(unsafe.Pointer(bp+208)).Findexc) {
		goto __57
	}
	*(*int32)(unsafe.Pointer(bp + 264 /* encoded */)) = 0
	if !(XTclIndexEncode(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200)) + uintptr(j)*8)), -1,
		0x7fffffff, bp+264) != TCL_OK) {
		goto __58
	}
	result = TCL_ERROR
__58:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 264)) == -1 ||
		*(*int32)(unsafe.Pointer(bp + 264)) == 0x7fffffff) {
		goto __59
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+15246, libc.VaList(bp+64, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* indices */)) + uintptr(j)*8))))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+7444,
		ts+15296, uintptr(0)))
	result = TCL_ERROR
__59:
	;
	if !(result == TCL_ERROR) {
		goto __60
	}
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+15312, libc.VaList(bp+104, j)))
	goto done
__60:
	;
	*(*int32)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+208 /* &sortInfo */)).Findexv + uintptr(j)*4)) = *(*int32)(unsafe.Pointer(bp + 264 /* encoded */))
	goto __56
__56:
	j++
	goto __55
	goto __57
__57:
	;
	goto __11

__11:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;

	// Subindices only make sense if asked for with -index option set.

	if !(returnSubindices != 0 && (*SortInfo)(unsafe.Pointer(bp+208)).Findexc == 0) {
		goto __61
	}
	if !(startPtr != uintptr(0)) {
		goto __62
	}
__63:
	_objPtr4 = startPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __66
	}
	XTclFreeObj(tls, _objPtr4)
__66:
	;
	goto __64
__64:
	if 0 != 0 {
		goto __63
	}
	goto __65
__65:
	;
__62:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+15348, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+112, ts+4178, ts+7949, ts+15397,
		ts+15405, uintptr(0)))
	return TCL_ERROR
__61:
	;

	if !(bisect != 0 && (allMatches != 0 || negatedMatch != 0)) {
		goto __67
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+15420, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+152, ts+4178, ts+7949, ts+15397,
		ts+15405, uintptr(0)))
	return TCL_ERROR
__67:
	;

	if !(int32(mode) == 2) {
		goto __68
	}
	// We can shimmer regexp/list if listv[i] == pattern, so get the
	// regexp rep before the list rep. First time round, omit the interp
	// and hope that the compilation will succeed. If it fails, we'll
	// recompile in "expensive" mode with a place to put error messages.

	regexp = XTcl_GetRegExpFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)),
		TCL_REG_ADVANCED|TCL_REG_NOSUB|func() int32 {
			if noCase != 0 {
				return TCL_REG_NOCASE
			}
			return 0
		}())
	if !(regexp == uintptr(0)) {
		goto __69
	}
	// Failed to compile the RE. Try again without the TCL_REG_NOSUB
	// flag in case the RE had sub-expressions in it [Bug 1366683]. If
	// this fails, an error message will be left in the interpreter.

	regexp = XTcl_GetRegExpFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)),
		TCL_REG_ADVANCED|func() int32 {
			if noCase != 0 {
				return TCL_REG_NOCASE
			}
			return 0
		}())
__69:
	;

	if !(regexp == uintptr(0)) {
		goto __70
	}
	if !(startPtr != uintptr(0)) {
		goto __71
	}
__72:
	_objPtr5 = startPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __75
	}
	XTclFreeObj(tls, _objPtr5)
__75:
	;
	goto __73
__73:
	if 0 != 0 {
		goto __72
	}
	goto __74
__74:
	;
__71:
	;
	result = TCL_ERROR
	goto done
__70:
	;
__68:
	;

	// Make sure the list argument is a list object and get its length and a
	// pointer to its array of element pointers.

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 272)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 280)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)), bp+280, bp+272)
	}()
	if !(result != TCL_OK) {
		goto __76
	}
	if !(startPtr != uintptr(0)) {
		goto __77
	}
__78:
	_objPtr6 = startPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __81
	}
	XTclFreeObj(tls, _objPtr6)
__81:
	;
	goto __79
__79:
	if 0 != 0 {
		goto __78
	}
	goto __80
__80:
	;
__77:
	;
	goto done
__76:
	;

	// Get the user-specified start offset.

	if !(startPtr != 0) {
		goto __82
	}
	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(startPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 284)) = int32(*(*int32)(unsafe.Pointer(startPtr + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, startPtr, *(*int32)(unsafe.Pointer(bp + 280))-1, bp+284)
	}()
__83:
	_objPtr7 = startPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __86
	}
	XTclFreeObj(tls, _objPtr7)
__86:
	;
	goto __84
__84:
	if 0 != 0 {
		goto __83
	}
	goto __85
__85:
	;
	if !(result != TCL_OK) {
		goto __87
	}
	goto done
__87:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 284)) < 0) {
		goto __88
	}
	*(*int32)(unsafe.Pointer(bp + 284 /* offset */)) = 0
__88:
	;

	// If the search started past the end of the list, we just return a
	// "did not match anything at all" result straight away. [Bug 1374778]

	if !(*(*int32)(unsafe.Pointer(bp + 284)) > *(*int32)(unsafe.Pointer(bp + 280))-1) {
		goto __89
	}
	if !((*SortInfo)(unsafe.Pointer(bp+208)).Findexc > 1) {
		goto __90
	}
	XTclStackFree(tls, interp, (*SortInfo)(unsafe.Pointer(bp+208 /* &sortInfo */)).Findexv)
__90:
	;
	if !(allMatches != 0 || inlineReturn != 0) {
		goto __91
	}
	XTcl_ResetResult(tls, interp)
	goto __92
__91:
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, -1))
__92:
	;
	return TCL_OK
__89:
	;
__82:
	;

	patObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))
	patternBytes = uintptr(0)
	if !(int32(mode) == 0 || int32(mode) == 3) {
		goto __93
	}
	switch uint32(dataType) {
	case uint32(0) /* ASCII */ :
		goto __96
	case uint32(1) /* DICTIONARY */ :
		goto __97
	case uint32(2) /* INTEGER */ :
		goto __98
	case uint32(3) /* REAL */ :
		goto __99
	}
	goto __95
__96:
__97:
	patternBytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(patObj)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 288)) = (*Tcl_Obj)(unsafe.Pointer(patObj)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(patObj)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, patObj, bp+288)
	}()
	goto __95
__98:
	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(patObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 296)) = *(*Tcl_WideInt)(unsafe.Pointer(patObj + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(patObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 296)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(patObj + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, interp, patObj, bp+296)
		}()
	}()
	if !(result != TCL_OK) {
		goto __100
	}
	goto done
__100:
	;

	// List representation might have been shimmered; restore it. [Bug
	// 1844789]

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 272)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)) + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 280)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)) + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)), bp+280, bp+272)
	}
	goto __95
__99:
	result = XTcl_GetDoubleFromObj(tls, interp, patObj, bp+304)
	if !(result != TCL_OK) {
		goto __101
	}
	goto done
__101:
	;

	// List representation might have been shimmered; restore it. [Bug
	// 1844789]

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 272)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)) + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 280)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)) + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)), bp+280, bp+272)
	}
	goto __95
__95:
	;
	goto __94
__93:
	patternBytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(patObj)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 288)) = (*Tcl_Obj)(unsafe.Pointer(patObj)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(patObj)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, patObj, bp+288)
	}()
__94:
	;

	// Set default index value to -1, indicating failure; if we find the item
	// in the course of our search, index will be set to the correct value.

	*(*int32)(unsafe.Pointer(bp + 192 /* index */)) = -1
	match = 0

	if !(int32(mode) == 3 && !(allMatches != 0) && !(negatedMatch != 0)) {
		goto __102
	}
	// If the data is sorted, we can do a more intelligent search. Note
	// that there is no point in being smart when -all was specified; in
	// that case, we have to look at all items anyway, and there is no
	// sense in doing this when the match sense is inverted.

	lower = *(*int32)(unsafe.Pointer(bp + 284)) - 1
	upper = *(*int32)(unsafe.Pointer(bp + 280 /* listc */))
__104:
	if !(lower+1 != upper && (*SortInfo)(unsafe.Pointer(bp+208)).FresultCode == TCL_OK) {
		goto __105
	}
	i = (lower + upper) / 2
	if !((*SortInfo)(unsafe.Pointer(bp+208)).Findexc != 0) {
		goto __106
	}
	itemPtr = sSelectObjFromSublist(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272 /* listv */)) + uintptr(i)*8)), bp+208)
	if !((*SortInfo)(unsafe.Pointer(bp+208)).FresultCode != TCL_OK) {
		goto __108
	}
	result = (*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).FresultCode
	goto done
__108:
	;
	goto __107
__106:
	itemPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272 /* listv */)) + uintptr(i)*8))
__107:
	;
	switch uint32(dataType) {
	case uint32(0) /* ASCII */ :
		goto __110
	case uint32(1) /* DICTIONARY */ :
		goto __111
	case uint32(2) /* INTEGER */ :
		goto __112
	case uint32(3) /* REAL */ :
		goto __113
	}
	goto __109
__110:
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes
		}
		return XTcl_GetString(tls, itemPtr)
	}()
	match = (*struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{strCmpFn})).f(tls, patternBytes, bytes)
	goto __109
__111:
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes
		}
		return XTcl_GetString(tls, itemPtr)
	}()
	match = sDictionaryCompare(tls, patternBytes, bytes)
	goto __109
__112:
	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(itemPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 312)) = *(*Tcl_WideInt)(unsafe.Pointer(itemPtr + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(itemPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 312)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(itemPtr + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, interp, itemPtr, bp+312)
		}()
	}()
	if !(result != TCL_OK) {
		goto __114
	}
	goto done
__114:
	;
	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 296)) == *(*Tcl_WideInt)(unsafe.Pointer(bp + 312))) {
		goto __115
	}
	match = 0
	goto __116
__115:
	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 296)) < *(*Tcl_WideInt)(unsafe.Pointer(bp + 312))) {
		goto __117
	}
	match = -1
	goto __118
__117:
	match = 1
__118:
	;
__116:
	;
	goto __109
__113:
	result = XTcl_GetDoubleFromObj(tls, interp, itemPtr, bp+320)
	if !(result != TCL_OK) {
		goto __119
	}
	goto done
__119:
	;
	if !(*(*float64)(unsafe.Pointer(bp + 304)) == *(*float64)(unsafe.Pointer(bp + 320))) {
		goto __120
	}
	match = 0
	goto __121
__120:
	if !(*(*float64)(unsafe.Pointer(bp + 304)) < *(*float64)(unsafe.Pointer(bp + 320))) {
		goto __122
	}
	match = -1
	goto __123
__122:
	match = 1
__123:
	;
__121:
	;
	goto __109
__109:
	;
	if !(match == 0) {
		goto __124
	}
	// Normally, binary search is written to stop when it finds a
	// match. If there are duplicates of an element in the list,
	// our first match might not be the first occurrence.
	// Consider: 0 0 0 1 1 1 2 2 2
	//
	// To maintain consistancy with standard lsearch semantics, we
	// must find the leftmost occurrence of the pattern in the
	// list. Thus we don't just stop searching here. This
	// variation means that a search always makes log n
	// comparisons (normal binary search might "get lucky" with an
	// early comparison).
	//
	// In bisect mode though, we want the last of equals.

	*(*int32)(unsafe.Pointer(bp + 192 /* index */)) = i
	if !(bisect != 0) {
		goto __126
	}
	lower = i
	goto __127
__126:
	upper = i
__127:
	;
	goto __125
__124:
	if !(match > 0) {
		goto __128
	}
	if !(isIncreasing != 0) {
		goto __130
	}
	lower = i
	goto __131
__130:
	upper = i
__131:
	;
	goto __129
__128:
	if !(isIncreasing != 0) {
		goto __132
	}
	upper = i
	goto __133
__132:
	lower = i
__133:
	;
__129:
	;
__125:
	;
	goto __104
__105:
	;
	if !(bisect != 0 && *(*int32)(unsafe.Pointer(bp + 192)) < 0) {
		goto __134
	}
	*(*int32)(unsafe.Pointer(bp + 192 /* index */)) = lower
__134:
	;
	goto __103
__102:
	// We need to do a linear search, because (at least one) of:
	//   - our matcher can only tell equal vs. not equal
	//   - our matching sense is negated
	//   - we're building a list of all matched items

	if !(allMatches != 0) {
		goto __135
	}
	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
__135:
	;
	i = *(*int32)(unsafe.Pointer(bp + 284 /* offset */))
__136:
	if !(i < *(*int32)(unsafe.Pointer(bp + 280))) {
		goto __138
	}
	match = 0
	if !((*SortInfo)(unsafe.Pointer(bp+208)).Findexc != 0) {
		goto __139
	}
	itemPtr = sSelectObjFromSublist(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272 /* listv */)) + uintptr(i)*8)), bp+208)
	if !((*SortInfo)(unsafe.Pointer(bp+208)).FresultCode != TCL_OK) {
		goto __141
	}
	if !(listPtr != uintptr(0)) {
		goto __142
	}
__143:
	_objPtr8 = listPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr8)).FrefCount, 1) <= 1) {
		goto __146
	}
	XTclFreeObj(tls, _objPtr8)
__146:
	;
	goto __144
__144:
	if 0 != 0 {
		goto __143
	}
	goto __145
__145:
	;
__142:
	;
	result = (*SortInfo)(unsafe.Pointer(bp + 208 /* &sortInfo */)).FresultCode
	goto done
__141:
	;
	goto __140
__139:
	itemPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272 /* listv */)) + uintptr(i)*8))
__140:
	;

	switch mode {
	case uint32(3) /* SORTED */ :
		goto __148
	case uint32(0) /* EXACT */ :
		goto __149

	case uint32(1) /* GLOB */ :
		goto __150

	case uint32(2) /* REGEXP */ :
		goto __151
	}
	goto __147
__148:
__149:
	switch uint32(dataType) {
	case uint32(0) /* ASCII */ :
		goto __153

	case uint32(1) /* DICTIONARY */ :
		goto __154

	case uint32(2) /* INTEGER */ :
		goto __155

	case uint32(3) /* REAL */ :
		goto __156
	}
	goto __152
__153:
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 328)) = (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, itemPtr, bp+328)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 288)) == *(*int32)(unsafe.Pointer(bp + 328))) {
		goto __157
	}
	// This split allows for more optimal compilation of
	// memcmp/strcasecmp.

	if !(noCase != 0) {
		goto __158
	}
	match = libc.Bool32(XTclUtfCasecmp(tls, bytes, patternBytes) == 0)
	goto __159
__158:
	match = libc.Bool32(libc.Xmemcmp(tls, bytes, patternBytes,
		Size_t(*(*int32)(unsafe.Pointer(bp + 288)))) == 0)
__159:
	;
__157:
	;
	goto __152

__154:
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes
		}
		return XTcl_GetString(tls, itemPtr)
	}()
	match = libc.Bool32(sDictionaryCompare(tls, bytes, patternBytes) == 0)
	goto __152

__155:
	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(itemPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 312)) = *(*Tcl_WideInt)(unsafe.Pointer(itemPtr + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(itemPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 312)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(itemPtr + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, interp, itemPtr, bp+312)
		}()
	}()
	if !(result != TCL_OK) {
		goto __160
	}
	if !(listPtr != uintptr(0)) {
		goto __161
	}
__162:
	_objPtr9 = listPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr9)).FrefCount, 1) <= 1) {
		goto __165
	}
	XTclFreeObj(tls, _objPtr9)
__165:
	;
	goto __163
__163:
	if 0 != 0 {
		goto __162
	}
	goto __164
__164:
	;
__161:
	;
	goto done
__160:
	;
	match = libc.Bool32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 312)) == *(*Tcl_WideInt)(unsafe.Pointer(bp + 296)))
	goto __152

__156:
	result = XTcl_GetDoubleFromObj(tls, interp, itemPtr, bp+320)
	if !(result != TCL_OK) {
		goto __166
	}
	if !(listPtr != 0) {
		goto __167
	}
__168:
	_objPtr10 = listPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr10)).FrefCount, 1) <= 1) {
		goto __171
	}
	XTclFreeObj(tls, _objPtr10)
__171:
	;
	goto __169
__169:
	if 0 != 0 {
		goto __168
	}
	goto __170
__170:
	;
__167:
	;
	goto done
__166:
	;
	match = libc.Bool32(*(*float64)(unsafe.Pointer(bp + 320)) == *(*float64)(unsafe.Pointer(bp + 304)))
	goto __152
__152:
	;
	goto __147

__150:
	match = XTcl_StringCaseMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes
		}
		return XTcl_GetString(tls, itemPtr)
	}(),
		patternBytes, noCase)
	goto __147

__151:
	match = XTcl_RegExpExecObj(tls, interp, regexp, itemPtr, 0, 0, 0)
	if !(match < 0) {
		goto __172
	}
__173:
	_objPtr11 = patObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr11)).FrefCount, 1) <= 1) {
		goto __176
	}
	XTclFreeObj(tls, _objPtr11)
__176:
	;
	goto __174
__174:
	if 0 != 0 {
		goto __173
	}
	goto __175
__175:
	;
	if !(listPtr != uintptr(0)) {
		goto __177
	}
__178:
	_objPtr12 = listPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr12)).FrefCount, 1) <= 1) {
		goto __181
	}
	XTclFreeObj(tls, _objPtr12)
__181:
	;
	goto __179
__179:
	if 0 != 0 {
		goto __178
	}
	goto __180
__180:
	;
__177:
	;
	result = TCL_ERROR
	goto done
__172:
	;
	goto __147
__147:
	;

	// Invert match condition for -not.

	if !(negatedMatch != 0) {
		goto __182
	}
	match = libc.BoolInt32(!(match != 0))
__182:
	;
	if !!(match != 0) {
		goto __183
	}
	goto __137
__183:
	;
	if !!(allMatches != 0) {
		goto __184
	}
	*(*int32)(unsafe.Pointer(bp + 192 /* index */)) = i
	goto __138
	goto __185
__184:
	if !(inlineReturn != 0) {
		goto __186
	}
	// Note that these appends are not expected to fail.

	if !(returnSubindices != 0 && (*SortInfo)(unsafe.Pointer(bp+208)).Findexc != 0) {
		goto __188
	}
	itemPtr = sSelectObjFromSublist(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272 /* listv */)) + uintptr(i)*8)), bp+208)
	goto __189
__188:
	itemPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272 /* listv */)) + uintptr(i)*8))
__189:
	;
	XTcl_ListObjAppendElement(tls, interp, listPtr, itemPtr)
	goto __187
__186:
	if !(returnSubindices != 0) {
		goto __190
	}

__192:
	;
__195:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __198
	}
	XTclAllocateFreeObjects(tls)
__198:
	;
	itemPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __196
__196:
	if 0 != 0 {
		goto __195
	}
	goto __197
__197:
	;
	(*Tcl_Obj)(unsafe.Pointer(itemPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(itemPtr + 32)) = int32(i)
	(*Tcl_Obj)(unsafe.Pointer(itemPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __193
__193:
	if 0 != 0 {
		goto __192
	}
	goto __194
__194:
	;
	j1 = 0
__199:
	if !(j1 < (*SortInfo)(unsafe.Pointer(bp+208)).Findexc) {
		goto __201
	}
	XTcl_ListObjAppendElement(tls, interp, itemPtr, XTcl_NewIntObj(tls,
		XTclIndexDecode(tls, *(*int32)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+208 /* &sortInfo */)).Findexv + uintptr(j1)*4)), *(*int32)(unsafe.Pointer(bp + 280 /* listc */)))))
	goto __200
__200:
	j1++
	goto __199
	goto __201
__201:
	;
	XTcl_ListObjAppendElement(tls, interp, listPtr, itemPtr)
	goto __191
__190:
	XTcl_ListObjAppendElement(tls, interp, listPtr, XTcl_NewIntObj(tls, i))
__191:
	;
__187:
	;
__185:
	;
	goto __137
__137:
	i++
	goto __136
	goto __138
__138:
	;
__103:
	;

	// Return everything or a single value.

	if !(allMatches != 0) {
		goto __202
	}
	XTcl_SetObjResult(tls, interp, listPtr)
	goto __203
__202:
	if !!(inlineReturn != 0) {
		goto __204
	}
	if !(returnSubindices != 0) {
		goto __206
	}

__208:
	;
__211:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __214
	}
	XTclAllocateFreeObjects(tls)
__214:
	;
	itemPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __212
__212:
	if 0 != 0 {
		goto __211
	}
	goto __213
__213:
	;
	(*Tcl_Obj)(unsafe.Pointer(itemPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(itemPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(itemPtr + 32)) = int32(*(*int32)(unsafe.Pointer(bp + 192)))
	(*Tcl_Obj)(unsafe.Pointer(itemPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __209
__209:
	if 0 != 0 {
		goto __208
	}
	goto __210
__210:
	;
	j2 = 0
__215:
	if !(j2 < (*SortInfo)(unsafe.Pointer(bp+208)).Findexc) {
		goto __217
	}
	XTcl_ListObjAppendElement(tls, interp, itemPtr, XTcl_NewIntObj(tls,
		XTclIndexDecode(tls, *(*int32)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+208 /* &sortInfo */)).Findexv + uintptr(j2)*4)), *(*int32)(unsafe.Pointer(bp + 280 /* listc */)))))
	goto __216
__216:
	j2++
	goto __215
	goto __217
__217:
	;
	XTcl_SetObjResult(tls, interp, itemPtr)
	goto __207
__206:
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 192 /* index */))))
__207:
	;
	goto __205
__204:
	if !(*(*int32)(unsafe.Pointer(bp + 192)) < 0) {
		goto __218
	}
	// Is this superfluous? The result should be a blank object by
	// default...

	XTcl_SetObjResult(tls, interp, XTcl_NewObj(tls))
	goto __219
__218:
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272 /* listv */)) + uintptr(*(*int32)(unsafe.Pointer(bp + 192 /* index */)))*8)))
__219:
	;
__205:
	;
__203:
	;
	result = TCL_OK

	// Cleanup the index list array.

done:
	if !((*SortInfo)(unsafe.Pointer(bp+208)).Findexc > 1) {
		goto __220
	}
	XTclStackFree(tls, interp, (*SortInfo)(unsafe.Pointer(bp+208 /* &sortInfo */)).Findexv)
__220:
	;
	return result
}

var options1 = [19]uintptr{
	ts + 15464, ts + 15469, ts + 15476, ts + 15484, ts + 15496,
	ts + 15508, ts + 15515, ts + 15521, ts + 15533,
	ts + 15540, ts + 15548, ts + 15557, ts + 15565,
	ts + 15570, ts + 15576, ts + 15584, ts + 15592,
	ts + 15599, uintptr(0),
} /* tclCmdIL.c:2908:23 */

//----------------------------------------------------------------------
//
// Tcl_LsetObjCmd --
//
//	This procedure is invoked to process the "lset" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LsetObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:3561:1: */
	var listPtr uintptr       // Pointer to the list being altered.
	var finalValuePtr uintptr // Value finally assigned to the variable.

	// Check parameter count.

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+15611)
		return TCL_ERROR
	}

	// Look up the list variable's value.

	listPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), TCL_LEAVE_ERR_MSG)
	if listPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Substitute the value in the value. Return either the value or else an
	// unshared copy of it.

	if objc == 4 {
		finalValuePtr = XTclLsetList(tls, interp, listPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	} else {
		finalValuePtr = XTclLsetFlat(tls, interp, listPtr, objc-3, objv+uintptr(2)*8,
			*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
	}

	// If substitution has failed, bail out.

	if finalValuePtr == uintptr(0) {
		return TCL_ERROR
	}

	// Finally, update the variable so that traces fire.

	listPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), finalValuePtr,
		TCL_LEAVE_ERR_MSG)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = finalValuePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if listPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Return the new value of the variable as the interpreter result.

	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LsortObjCmd --
//
//	This procedure is invoked to process the "lsort" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LsortObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdIL.c:3646:1: */
	bp := tls.Alloc(672)
	defer tls.Free(672)

	var i int32
	var j int32
	// var index int32 at bp+296, 4

	var indices int32
	// var length int32 at bp+400, 4

	var nocase int32
	var indexc int32
	var sortMode int32
	var group int32
	// var groupSize int32 at bp+320, 4

	var groupOffset int32
	var idx int32
	var allocatedIndexVector int32
	var resultPtr uintptr
	var cmdPtr uintptr
	// var listObjPtrs uintptr at bp+392, 8

	var listObj uintptr
	var indexPtr uintptr
	var elmArrSize Size_t
	var elementArray uintptr
	var elementPtr uintptr
	// var sortInfo SortInfo at bp+336, 56
	// Information about this sort that needs to
	// be passed to the comparison function.
	// var subList [31]uintptr at bp+408, 248

	// var encoded int32 at bp+316, 4

	var result int32
	// var sortindex int32 at bp+312, 4

	// var indexv uintptr at bp+304, 8

	// var indexv1 uintptr at bp+328, 8

	var newCommandPtr uintptr
	var newObjPtr uintptr
	// var a Tcl_WideInt at bp+656, 8

	// var a1 float64 at bp+664, 8

	var listRepPtr uintptr
	var newArray uintptr
	var objPtr uintptr
	nocase = 0
	sortMode = SORTMODE_ASCII
	allocatedIndexVector = 0
	elementArray = uintptr(0)

	if !(objc < 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15645)
	return TCL_ERROR
__1:
	;

	// Parse arguments to set up the mode for the sort.

	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FisIncreasing = 1
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FsortMode = SORTMODE_ASCII
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexv = uintptr(0)
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexc = 0
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Funique = 0
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Finterp = interp
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_OK
	cmdPtr = uintptr(0)
	indices = 0
	group = 0
	*(*int32)(unsafe.Pointer(bp + 320 /* groupSize */)) = 1
	groupOffset = 0
	indexPtr = uintptr(0)
	i = 1
__2:
	if !(i < objc-1) {
		goto __4
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&switches)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+296) != TCL_OK) {
		goto __5
	}
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__5:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 296 /* index */))) {
	case uint32(0) /* LSORT_ASCII */ :
		goto __7
	case uint32(1) /* LSORT_COMMAND */ :
		goto __8
	case uint32(2) /* LSORT_DECREASING */ :
		goto __9
	case uint32(3) /* LSORT_DICTIONARY */ :
		goto __10
	case uint32(4) /* LSORT_INCREASING */ :
		goto __11
	case uint32(5) /* LSORT_INDEX */ :
		goto __12
	case uint32(7) /* LSORT_INTEGER */ :
		goto __13
	case uint32(8) /* LSORT_NOCASE */ :
		goto __14
	case uint32(9) /* LSORT_REAL */ :
		goto __15
	case uint32(11) /* LSORT_UNIQUE */ :
		goto __16
	case uint32(6) /* LSORT_INDICES */ :
		goto __17
	case uint32(10) /* LSORT_STRIDE */ :
		goto __18
	}
	goto __6
__7:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FsortMode = SORTMODE_ASCII
	goto __6
__8:
	if !(i == objc-2) {
		goto __19
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+15670, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+14232, ts+15191, uintptr(0)))
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__19:
	;
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FsortMode = SORTMODE_COMMAND
	cmdPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	i++
	goto __6
__9:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FisIncreasing = 0
	goto __6
__10:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FsortMode = SORTMODE_DICTIONARY
	goto __6
__11:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FisIncreasing = 1
	goto __6
__12:

	if !(i == objc-2) {
		goto __20
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+15199,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+14232, ts+15191, uintptr(0)))
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__20:
	;
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 304)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 312)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+312, bp+304)
	}() != TCL_OK) {
		goto __21
	}
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__21:
	;

	// Check each of the indices for syntactic correctness. Note that
	// we do not store the converted values here because we do not
	// know if this is the only -index option yet and so we can't
	// allocate any space; that happens after the scan through all the
	// options is done.

	j = 0
__22:
	if !(j < *(*int32)(unsafe.Pointer(bp + 312))) {
		goto __24
	}
	*(*int32)(unsafe.Pointer(bp + 316 /* encoded */)) = 0
	result = XTclIndexEncode(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 304 /* indexv */)) + uintptr(j)*8)),
		-1, 0x7fffffff, bp+316)

	if !(result == TCL_OK && (*(*int32)(unsafe.Pointer(bp + 316)) == -1 ||
		*(*int32)(unsafe.Pointer(bp + 316)) == 0x7fffffff)) {
		goto __25
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+15246, libc.VaList(bp+64, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 304 /* indexv */)) + uintptr(j)*8))))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+7444,
		ts+15296, uintptr(0)))
	result = TCL_ERROR
__25:
	;
	if !(result == TCL_ERROR) {
		goto __26
	}
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+15312, libc.VaList(bp+104, j)))
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__26:
	;
	goto __23
__23:
	j++
	goto __22
	goto __24
__24:
	;
	indexPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	i++
	goto __6

__13:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FsortMode = SORTMODE_INTEGER
	goto __6
__14:
	nocase = 1
	goto __6
__15:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FsortMode = SORTMODE_REAL
	goto __6
__16:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Funique = 1
	goto __6
__17:
	indices = 1
	goto __6
__18:
	if !(i == objc-2) {
		goto __27
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+15727, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+112, ts+4178, ts+14232, ts+15191, uintptr(0)))
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__27:
	;
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+320) != TCL_OK) {
		goto __28
	}
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__28:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 320)) < 2) {
		goto __29
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+15778, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+144, ts+4178, ts+7949, ts+15811,
		ts+15817, uintptr(0)))
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__29:
	;
	group = 1
	i++
	goto __6
__6:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;
	if !(nocase != 0 && (*SortInfo)(unsafe.Pointer(bp+336)).FsortMode == SORTMODE_ASCII) {
		goto __30
	}
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FsortMode = SORTMODE_ASCII_NC
__30:
	;

	// Now extract the -index list for real, if present. No failures are
	// expected here; the values are all of the right type or convertible to
	// it.

	if !(indexPtr != 0) {
		goto __31
	}

	if (*Tcl_Obj)(unsafe.Pointer(indexPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 328)) = *(*uintptr)(unsafe.Pointer(indexPtr + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 336 + 24)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(indexPtr + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, interp, indexPtr, bp+336+24, bp+328)
	}
	switch (*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexc {
	case 0:
		goto __33
	case 1:
		goto __34
	default:
		goto __35
	}
	goto __32
__33:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexv = uintptr(0)
	goto __32
__34:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexv = bp + 336 + 28
	goto __32
__35:
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexv = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64((*SortInfo)(unsafe.Pointer(bp+336)).Findexc)))
	allocatedIndexVector = 1 // Cannot use indexc field, as it
	// might be decreased by 1 later.
__32:
	;
	j = 0
__36:
	if !(j < (*SortInfo)(unsafe.Pointer(bp+336)).Findexc) {
		goto __38
	}
	// Prescreened values, no errors or out of range possible
	XTclIndexEncode(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 328 /* indexv1 */)) + uintptr(j)*8)), 0, 0, (*SortInfo)(unsafe.Pointer(bp+336)).Findexv+uintptr(j)*4)
	goto __37
__37:
	j++
	goto __36
	goto __38
__38:
	;
__31:
	;

	listObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))

	if !((*SortInfo)(unsafe.Pointer(bp+336)).FsortMode == SORTMODE_COMMAND) {
		goto __39
	}

	// When sorting using a command, we are reentrant and therefore might
	// have the representation of the list being sorted shimmered out from
	// underneath our feet. Take a copy (cheap) to prevent this. [Bug
	// 1675116]

	listObj = XTclListObjCopy(tls, interp, listObj)
	if !(listObj == uintptr(0)) {
		goto __40
	}
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__40:
	;

	// The existing command is a list. We want to flatten it, append two
	// dummy arguments on the end, and replace these arguments later.

	newCommandPtr = XTcl_DuplicateObj(tls, cmdPtr)
__41:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __44
	}
	XTclAllocateFreeObjects(tls)
__44:
	;
	newObjPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
	(*Tcl_Obj)(unsafe.Pointer(newObjPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(newObjPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(newCommandPtr)).FrefCount++
	if !(XTcl_ListObjAppendElement(tls, interp, newCommandPtr, newObjPtr) !=
		TCL_OK) {
		goto __45
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(newCommandPtr)).FrefCount, 1) > 1) {
		goto __46
	}
	goto __47
__46:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(newCommandPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(newCommandPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __48
	}

	if !((*Tcl_Obj)(unsafe.Pointer(newCommandPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(newCommandPtr)).Fbytes != XtclEmptyStringRep) {
		goto __50
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(newCommandPtr)).Fbytes)
__50:
	;
	(*Tcl_Obj)(unsafe.Pointer(newCommandPtr)).Flength = -1
__51:
	;
	*(*uintptr)(unsafe.Pointer(newCommandPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = newCommandPtr
	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
	goto __49
__48:
	XTclFreeObj(tls, newCommandPtr)
__49:
	;
__47:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(listObj)).FrefCount, 1) > 1) {
		goto __54
	}
	goto __55
__54:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(listObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(listObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __56
	}

	if !((*Tcl_Obj)(unsafe.Pointer(listObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(listObj)).Fbytes != XtclEmptyStringRep) {
		goto __58
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(listObj)).Fbytes)
__58:
	;
	(*Tcl_Obj)(unsafe.Pointer(listObj)).Flength = -1
__59:
	;
	*(*uintptr)(unsafe.Pointer(listObj + 32)) = XtclFreeObjList
	XtclFreeObjList = listObj
	goto __60
__60:
	if 0 != 0 {
		goto __59
	}
	goto __61
__61:
	;
	goto __57
__56:
	XTclFreeObj(tls, listObj)
__57:
	;
__55:
	;

	(*Tcl_Obj)(unsafe.Pointer(newObjPtr)).FrefCount++
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(newObjPtr)).FrefCount, 1) > 1) {
		goto __62
	}
	goto __63
__62:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(newObjPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(newObjPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __64
	}

	if !((*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Fbytes != XtclEmptyStringRep) {
		goto __66
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Fbytes)
__66:
	;
	(*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Flength = -1
__67:
	;
	*(*uintptr)(unsafe.Pointer(newObjPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = newObjPtr
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
	goto __65
__64:
	XTclFreeObj(tls, newObjPtr)
__65:
	;
__63:
	;

	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__45:
	;
	XTcl_ListObjAppendElement(tls, interp, newCommandPtr, XTcl_NewObj(tls))
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FcompareCmdPtr = newCommandPtr
__39:
	;

	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(listObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 392)) = *(*uintptr)(unsafe.Pointer(listObj + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 400)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listObj + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, listObj, bp+400, bp+392)
	}()
	if !((*SortInfo)(unsafe.Pointer(bp+336)).FresultCode != TCL_OK || *(*int32)(unsafe.Pointer(bp + 400)) <= 0) {
		goto __70
	}
	goto done
__70:
	;

	// Check for sanity when grouping elements of the overall list together
	// because of the -stride option. [TIP #326]

	if !(group != 0) {
		goto __71
	}
	if !(*(*int32)(unsafe.Pointer(bp + 400))%*(*int32)(unsafe.Pointer(bp + 320)) != 0) {
		goto __72
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+15827,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+184, ts+4178, ts+7949, ts+15811, ts+15817,
		uintptr(0)))
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__72:
	;
	*(*int32)(unsafe.Pointer(bp + 400 /* length */)) = *(*int32)(unsafe.Pointer(bp + 400)) / *(*int32)(unsafe.Pointer(bp + 320))
	if !((*SortInfo)(unsafe.Pointer(bp+336)).Findexc > 0) {
		goto __73
	}
	// Use the first value in the list supplied to -index as the
	// offset of the element within each group by which to sort.

	groupOffset = XTclIndexDecode(tls, *(*int32)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexv)), *(*int32)(unsafe.Pointer(bp + 320))-1)
	if !(groupOffset < 0 || groupOffset >= *(*int32)(unsafe.Pointer(bp + 320))) {
		goto __74
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+15877, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+224, ts+4178, ts+7949, ts+15811,
		ts+15955, uintptr(0)))
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__74:
	;
	if !((*SortInfo)(unsafe.Pointer(bp+336)).Findexc == 1) {
		goto __75
	}
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexc = 0
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexv = uintptr(0)
	goto __76
__75:
	(*SortInfo)(unsafe.Pointer(bp+336 /* &sortInfo */)).Findexc--

	// Do not shrink the actual memory block used; that doesn't
	// work with TclStackAlloc-allocated memory. [Bug 2918962]
	//
	// TODO: Consider a pointer increment to replace this
	// array shift.

	i = 0
__77:
	if !(i < (*SortInfo)(unsafe.Pointer(bp+336)).Findexc) {
		goto __79
	}
	*(*int32)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+336 /* &sortInfo */)).Findexv + uintptr(i)*4)) = *(*int32)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+336 /* &sortInfo */)).Findexv + uintptr(i+1)*4))
	goto __78
__78:
	i++
	goto __77
	goto __79
__79:
	;
__76:
	;
__73:
	;
__71:
	;

	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FnumElements = *(*int32)(unsafe.Pointer(bp + 400 /* length */))

	indexc = (*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).Findexc
	sortMode = (*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FsortMode
	if !(sortMode == SORTMODE_ASCII_NC ||
		sortMode == SORTMODE_DICTIONARY) {
		goto __80
	}
	// For this function's purpose all string-based modes are equivalent

	sortMode = SORTMODE_ASCII
__80:
	;

	// Initialize the sublists. After the following loop, subList[i] will
	// contain a sorted sublist of length 2**i. Use one extra subList at the
	// end, always at NULL, to indicate the end of the lists.

	j = 0
__81:
	if !(j <= NUM_LISTS) {
		goto __83
	}
	*(*uintptr)(unsafe.Pointer(bp + 408 + uintptr(j)*8)) = uintptr(0)
	goto __82
__82:
	j++
	goto __81
	goto __83
__83:
	;

	// The following loop creates a SortElement for each list element and
	// begins sorting it into the sublists as it appears.

	elmArrSize = uint64(*(*int32)(unsafe.Pointer(bp + 400))) * uint64(unsafe.Sizeof(SortElement{}))
	if !(elmArrSize <= uint64(MAXCALLOC)) {
		goto __84
	}
	elementArray = XTcl_Alloc(tls, uint32(elmArrSize))
	goto __85
__84:
	elementArray = libc.Xmalloc(tls, elmArrSize)
__85:
	;
	if !!(elementArray != 0) {
		goto __86
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+15964, libc.VaList(bp+264, *(*int32)(unsafe.Pointer(bp + 400 /* length */)))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+272, ts+4178, ts+15098, uintptr(0)))
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__86:
	;

	i = 0
__87:
	if !(i < *(*int32)(unsafe.Pointer(bp + 400))) {
		goto __89
	}
	idx = *(*int32)(unsafe.Pointer(bp + 320))*i + groupOffset
	if !(indexc != 0) {
		goto __90
	}
	// If this is an indexed sort, retrieve the corresponding element
	indexPtr = sSelectObjFromSublist(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 392 /* listObjPtrs */)) + uintptr(idx)*8)), bp+336)
	if !((*SortInfo)(unsafe.Pointer(bp+336)).FresultCode != TCL_OK) {
		goto __92
	}
	goto done
__92:
	;
	goto __91
__90:
	indexPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 392 /* listObjPtrs */)) + uintptr(idx)*8))
__91:
	;

	// Determine the "value" of this object for sorting purposes

	if !(sortMode == SORTMODE_ASCII) {
		goto __93
	}
	*(*uintptr)(unsafe.Pointer(elementArray + uintptr(i)*24)) = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(indexPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(indexPtr)).Fbytes
		}
		return XTcl_GetString(tls, indexPtr)
	}()
	goto __94
__93:
	if !(sortMode == SORTMODE_INTEGER) {
		goto __95
	}

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(indexPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 656)) = *(*Tcl_WideInt)(unsafe.Pointer(indexPtr + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(indexPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 656)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(indexPtr + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, (*SortInfo)(unsafe.Pointer(bp+336)).Finterp, indexPtr, bp+656)
		}()
	}() != TCL_OK) {
		goto __97
	}
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__97:
	;
	*(*Tcl_WideInt)(unsafe.Pointer(elementArray + uintptr(i)*24)) = *(*Tcl_WideInt)(unsafe.Pointer(bp + 656 /* a */))
	goto __96
__95:
	if !(sortMode == SORTMODE_REAL) {
		goto __98
	}

	if !(XTcl_GetDoubleFromObj(tls, (*SortInfo)(unsafe.Pointer(bp+336)).Finterp, indexPtr,
		bp+664) != TCL_OK) {
		goto __100
	}
	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode = TCL_ERROR
	goto done
__100:
	;
	*(*float64)(unsafe.Pointer(elementArray + uintptr(i)*24)) = *(*float64)(unsafe.Pointer(bp + 664 /* a1 */))
	goto __99
__98:
	*(*uintptr)(unsafe.Pointer(elementArray + uintptr(i)*24)) = indexPtr
__99:
	;
__96:
	;
__94:
	;

	// Determine the representation of this element in the result: either
	// the objPtr itself, or its index in the original list.

	if !(indices != 0 || group != 0) {
		goto __101
	}
	*(*int32)(unsafe.Pointer(elementArray + uintptr(i)*24 + 8)) = idx
	goto __102
__101:
	*(*uintptr)(unsafe.Pointer(elementArray + uintptr(i)*24 + 8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 392 /* listObjPtrs */)) + uintptr(idx)*8))
__102:
	;

	// Merge this element in the pre-existing sublists (and merge together
	// sublists when we have two of the same size).

	(*SortElement)(unsafe.Pointer(elementArray + uintptr(i)*24)).FnextPtr = uintptr(0)
	elementPtr = elementArray + uintptr(i)*24
	j = 0
__103:
	if !(*(*uintptr)(unsafe.Pointer(bp + 408 + uintptr(j)*8)) != 0) {
		goto __105
	}
	elementPtr = sMergeLists(tls, *(*uintptr)(unsafe.Pointer(bp + 408 + uintptr(j)*8)), elementPtr, bp+336)
	*(*uintptr)(unsafe.Pointer(bp + 408 + uintptr(j)*8)) = uintptr(0)
	goto __104
__104:
	j++
	goto __103
	goto __105
__105:
	;
	if !(j >= NUM_LISTS) {
		goto __106
	}
	j = NUM_LISTS - 1
__106:
	;
	*(*uintptr)(unsafe.Pointer(bp + 408 + uintptr(j)*8)) = elementPtr
	goto __88
__88:
	i++
	goto __87
	goto __89
__89:
	;

	// Merge all sublists

	elementPtr = *(*uintptr)(unsafe.Pointer(bp + 408))
	j = 1
__107:
	if !(j < NUM_LISTS) {
		goto __109
	}
	elementPtr = sMergeLists(tls, *(*uintptr)(unsafe.Pointer(bp + 408 + uintptr(j)*8)), elementPtr, bp+336)
	goto __108
__108:
	j++
	goto __107
	goto __109
__109:
	;

	// Now store the sorted elements in the result list.

	if !((*SortInfo)(unsafe.Pointer(bp+336)).FresultCode == TCL_OK) {
		goto __110
	}

	resultPtr = XTcl_NewListObj(tls, (*SortInfo)(unsafe.Pointer(bp+336)).FnumElements**(*int32)(unsafe.Pointer(bp + 320)), uintptr(0))
	listRepPtr = *(*uintptr)(unsafe.Pointer(resultPtr + 32))
	newArray = listRepPtr + 16
	if !(group != 0) {
		goto __111
	}
	i = 0
__113:
	if !(elementPtr != uintptr(0)) {
		goto __115
	}
	idx = *(*int32)(unsafe.Pointer(elementPtr + 8))
	j = 0
__116:
	if !(j < *(*int32)(unsafe.Pointer(bp + 320))) {
		goto __118
	}
	if !(indices != 0) {
		goto __119
	}
__121:
	;
__124:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __127
	}
	XTclAllocateFreeObjects(tls)
__127:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __125
__125:
	if 0 != 0 {
		goto __124
	}
	goto __126
__126:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(idx + j - groupOffset)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __122
__122:
	if 0 != 0 {
		goto __121
	}
	goto __123
__123:
	;
	*(*uintptr)(unsafe.Pointer(newArray + uintptr(libc.PostIncInt32(&i, 1))*8)) = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	goto __120
__119:
	objPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 392 /* listObjPtrs */)) + uintptr(idx+j-groupOffset)*8))
	*(*uintptr)(unsafe.Pointer(newArray + uintptr(libc.PostIncInt32(&i, 1))*8)) = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
__120:
	;
	goto __117
__117:
	j++
	goto __116
	goto __118
__118:
	;
	goto __114
__114:
	elementPtr = (*SortElement)(unsafe.Pointer(elementPtr)).FnextPtr
	goto __113
	goto __115
__115:
	;
	goto __112
__111:
	if !(indices != 0) {
		goto __128
	}
	i = 0
__130:
	if !(elementPtr != uintptr(0)) {
		goto __132
	}
__133:
	;
__136:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __139
	}
	XTclAllocateFreeObjects(tls)
__139:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __137
__137:
	if 0 != 0 {
		goto __136
	}
	goto __138
__138:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(*(*int32)(unsafe.Pointer(elementPtr + 8)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __134
__134:
	if 0 != 0 {
		goto __133
	}
	goto __135
__135:
	;
	*(*uintptr)(unsafe.Pointer(newArray + uintptr(libc.PostIncInt32(&i, 1))*8)) = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	goto __131
__131:
	elementPtr = (*SortElement)(unsafe.Pointer(elementPtr)).FnextPtr
	goto __130
	goto __132
__132:
	;
	goto __129
__128:
	i = 0
__140:
	if !(elementPtr != uintptr(0)) {
		goto __142
	}
	objPtr = *(*uintptr)(unsafe.Pointer(elementPtr + 8))
	*(*uintptr)(unsafe.Pointer(newArray + uintptr(libc.PostIncInt32(&i, 1))*8)) = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	goto __141
__141:
	elementPtr = (*SortElement)(unsafe.Pointer(elementPtr)).FnextPtr
	goto __140
	goto __142
__142:
	;
__129:
	;
__112:
	;
	(*List)(unsafe.Pointer(listRepPtr)).FelemCount = i
	XTcl_SetObjResult(tls, interp, resultPtr)
__110:
	;

done:
	if !(sortMode == SORTMODE_COMMAND) {
		goto __143
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+336)).FcompareCmdPtr)).FrefCount, 1) > 1) {
		goto __144
	}
	goto __145
__144:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+336)).FcompareCmdPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+336)).FcompareCmdPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __146
	}

	if !((*Tcl_Obj)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+336)).FcompareCmdPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+336)).FcompareCmdPtr)).Fbytes != XtclEmptyStringRep) {
		goto __148
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+336)).FcompareCmdPtr)).Fbytes)
__148:
	;
	(*Tcl_Obj)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp + 336)).FcompareCmdPtr)).Flength = -1
__149:
	;
	*(*uintptr)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(bp+336)).FcompareCmdPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = (*SortInfo)(unsafe.Pointer(bp + 336)).FcompareCmdPtr
	goto __150
__150:
	if 0 != 0 {
		goto __149
	}
	goto __151
__151:
	;
	goto __147
__146:
	XTclFreeObj(tls, (*SortInfo)(unsafe.Pointer(bp+336 /* &sortInfo */)).FcompareCmdPtr)
__147:
	;
__145:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(listObj)).FrefCount, 1) > 1) {
		goto __152
	}
	goto __153
__152:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(listObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(listObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __154
	}

	if !((*Tcl_Obj)(unsafe.Pointer(listObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(listObj)).Fbytes != XtclEmptyStringRep) {
		goto __156
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(listObj)).Fbytes)
__156:
	;
	(*Tcl_Obj)(unsafe.Pointer(listObj)).Flength = -1
__157:
	;
	*(*uintptr)(unsafe.Pointer(listObj + 32)) = XtclFreeObjList
	XtclFreeObjList = listObj
	goto __158
__158:
	if 0 != 0 {
		goto __157
	}
	goto __159
__159:
	;
	goto __155
__154:
	XTclFreeObj(tls, listObj)
__155:
	;
__153:
	;

	(*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FcompareCmdPtr = uintptr(0)
__143:
	;
	if !(allocatedIndexVector != 0) {
		goto __160
	}
	XTclStackFree(tls, interp, (*SortInfo)(unsafe.Pointer(bp+336 /* &sortInfo */)).Findexv)
__160:
	;
	if !(elementArray != 0) {
		goto __161
	}
	if !(elmArrSize <= uint64(MAXCALLOC)) {
		goto __162
	}
	XTclpFree(tls, elementArray)
	goto __163
__162:
	libc.Xfree(tls, elementArray)
__163:
	;
__161:
	;
	return (*SortInfo)(unsafe.Pointer(bp + 336 /* &sortInfo */)).FresultCode
}

var switches = [13]uintptr{
	ts + 15469, ts + 16010, ts + 15484, ts + 15496, ts + 15521,
	ts + 15533, ts + 16019, ts + 15548, ts + 15557, ts + 15570, ts + 16028,
	ts + 16036, uintptr(0),
} /* tclCmdIL.c:3667:23 */

//----------------------------------------------------------------------
//
// MergeLists -
//
//	This procedure combines two sorted lists of SortElement structures
//	into a single sorted list.
//
// Results:
//	The unified list of SortElement structures.
//
// Side effects:
//	If infoPtr->unique is set then infoPtr->numElements may be updated.
//	Possibly others, if a user-defined comparison command does something
//	weird.
//
// Note:
//	If infoPtr->unique is set, the merge assumes that there are no
//	"repeated" elements in each of the left and right lists. In that case,
//	if any element of the left list is equivalent to one in the right list
//	it is omitted from the merged list.
//
//	This simplified mechanism works because of the special way our
//	MergeSort creates the sublists to be merged and will fail to eliminate
//	all repeats in the general case where they are already present in
//	either the left or right list. A general code would need to skip
//	adjacent initial repeats in the left and right lists before comparing
//	their initial elements, at each step.
//
//----------------------------------------------------------------------

func sMergeLists(tls *libc.TLS, leftPtr uintptr, rightPtr uintptr, infoPtr uintptr) uintptr { /* tclCmdIL.c:4169:20: */
	var headPtr uintptr
	var tailPtr uintptr
	var cmp int32

	if leftPtr == uintptr(0) {
		return rightPtr
	}
	if rightPtr == uintptr(0) {
		return leftPtr
	}
	cmp = sSortCompare(tls, leftPtr, rightPtr, infoPtr)
	if cmp > 0 || cmp == 0 && (*SortInfo)(unsafe.Pointer(infoPtr)).Funique != 0 {
		if cmp == 0 {
			(*SortInfo)(unsafe.Pointer(infoPtr)).FnumElements--
			leftPtr = (*SortElement)(unsafe.Pointer(leftPtr)).FnextPtr
		}
		tailPtr = rightPtr
		rightPtr = (*SortElement)(unsafe.Pointer(rightPtr)).FnextPtr
	} else {
		tailPtr = leftPtr
		leftPtr = (*SortElement)(unsafe.Pointer(leftPtr)).FnextPtr
	}
	headPtr = tailPtr
	if !((*SortInfo)(unsafe.Pointer(infoPtr)).Funique != 0) {
		for leftPtr != uintptr(0) && rightPtr != uintptr(0) {
			cmp = sSortCompare(tls, leftPtr, rightPtr, infoPtr)
			if cmp > 0 {
				(*SortElement)(unsafe.Pointer(tailPtr)).FnextPtr = rightPtr
				tailPtr = rightPtr
				rightPtr = (*SortElement)(unsafe.Pointer(rightPtr)).FnextPtr
			} else {
				(*SortElement)(unsafe.Pointer(tailPtr)).FnextPtr = leftPtr
				tailPtr = leftPtr
				leftPtr = (*SortElement)(unsafe.Pointer(leftPtr)).FnextPtr
			}
		}
	} else {
		for leftPtr != uintptr(0) && rightPtr != uintptr(0) {
			cmp = sSortCompare(tls, leftPtr, rightPtr, infoPtr)
			if cmp >= 0 {
				if cmp == 0 {
					(*SortInfo)(unsafe.Pointer(infoPtr)).FnumElements--
					leftPtr = (*SortElement)(unsafe.Pointer(leftPtr)).FnextPtr
				}
				(*SortElement)(unsafe.Pointer(tailPtr)).FnextPtr = rightPtr
				tailPtr = rightPtr
				rightPtr = (*SortElement)(unsafe.Pointer(rightPtr)).FnextPtr
			} else {
				(*SortElement)(unsafe.Pointer(tailPtr)).FnextPtr = leftPtr
				tailPtr = leftPtr
				leftPtr = (*SortElement)(unsafe.Pointer(leftPtr)).FnextPtr
			}
		}
	}
	if leftPtr != uintptr(0) {
		(*SortElement)(unsafe.Pointer(tailPtr)).FnextPtr = leftPtr
	} else {
		(*SortElement)(unsafe.Pointer(tailPtr)).FnextPtr = rightPtr
	}
	return headPtr
}

//----------------------------------------------------------------------
//
// SortCompare --
//
//	This procedure is invoked by MergeLists to determine the proper
//	ordering between two elements.
//
// Results:
//	A negative results means the the first element comes before the
//	second, and a positive results means that the second element should
//	come first. A result of zero means the two elements are equal and it
//	doesn't matter which comes first.
//
// Side effects:
//	None, unless a user-defined comparison command does something weird.
//
//----------------------------------------------------------------------

func sSortCompare(tls *libc.TLS, elemPtr1 uintptr, elemPtr2 uintptr, infoPtr uintptr) int32 { /* tclCmdIL.c:4258:1: */
	bp := tls.Alloc(76)
	defer tls.Free(76)

	*(*int32)(unsafe.Pointer(bp + 72 /* order */)) = 0

	if (*SortInfo)(unsafe.Pointer(infoPtr)).FsortMode == SORTMODE_ASCII {
		*(*int32)(unsafe.Pointer(bp + 72 /* order */)) = libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(elemPtr1)),
			*(*uintptr)(unsafe.Pointer(elemPtr2)))
	} else if (*SortInfo)(unsafe.Pointer(infoPtr)).FsortMode == SORTMODE_ASCII_NC {
		*(*int32)(unsafe.Pointer(bp + 72 /* order */)) = XTclUtfCasecmp(tls, *(*uintptr)(unsafe.Pointer(elemPtr1)),
			*(*uintptr)(unsafe.Pointer(elemPtr2)))
	} else if (*SortInfo)(unsafe.Pointer(infoPtr)).FsortMode == SORTMODE_DICTIONARY {
		*(*int32)(unsafe.Pointer(bp + 72 /* order */)) = sDictionaryCompare(tls, *(*uintptr)(unsafe.Pointer(elemPtr1)),
			*(*uintptr)(unsafe.Pointer(elemPtr2)))
	} else if (*SortInfo)(unsafe.Pointer(infoPtr)).FsortMode == SORTMODE_INTEGER {
		var a Tcl_WideInt
		var b Tcl_WideInt

		a = *(*Tcl_WideInt)(unsafe.Pointer(elemPtr1))
		b = *(*Tcl_WideInt)(unsafe.Pointer(elemPtr2))
		*(*int32)(unsafe.Pointer(bp + 72 /* order */)) = libc.Bool32(a >= b) - libc.Bool32(a <= b)
	} else if (*SortInfo)(unsafe.Pointer(infoPtr)).FsortMode == SORTMODE_REAL {
		var a float64
		var b float64

		a = *(*float64)(unsafe.Pointer(elemPtr1))
		b = *(*float64)(unsafe.Pointer(elemPtr2))
		*(*int32)(unsafe.Pointer(bp + 72 /* order */)) = libc.Bool32(a >= b) - libc.Bool32(a <= b)
	} else {
		// var objv uintptr at bp+64, 8

		// var paramObjv [2]uintptr at bp+40, 16

		// var objc int32 at bp+56, 4

		var objPtr1 uintptr
		var objPtr2 uintptr

		if (*SortInfo)(unsafe.Pointer(infoPtr)).FresultCode != TCL_OK {
			// Once an error has occurred, skip any future comparisons so as
			// to preserve the error message in sortInterp->result.

			return 0
		}

		objPtr1 = *(*uintptr)(unsafe.Pointer(elemPtr1))
		objPtr2 = *(*uintptr)(unsafe.Pointer(elemPtr2))

		*(*uintptr)(unsafe.Pointer(bp + 40)) = objPtr1
		*(*uintptr)(unsafe.Pointer(bp + 40 + 1*8)) = objPtr2

		// We made space in the command list for the two things to compare.
		// Replace them and evaluate the result.

		if (*Tcl_Obj)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(infoPtr)).FcompareCmdPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			*(*int32)(unsafe.Pointer(bp + 56)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(infoPtr)).FcompareCmdPtr + 32)))).FelemCount
		} else {
			XTcl_ListObjLength(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, (*SortInfo)(unsafe.Pointer(infoPtr)).FcompareCmdPtr, bp+56)
		}
		XTcl_ListObjReplace(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, (*SortInfo)(unsafe.Pointer(infoPtr)).FcompareCmdPtr, *(*int32)(unsafe.Pointer(bp + 56))-2,
			2, 2, bp+40)
		if (*Tcl_Obj)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(infoPtr)).FcompareCmdPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			*(*uintptr)(unsafe.Pointer(bp + 64)) = *(*uintptr)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(infoPtr)).FcompareCmdPtr + 32)) + 16
			*(*int32)(unsafe.Pointer(bp + 56)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(infoPtr)).FcompareCmdPtr + 32)))).FelemCount
		} else {
			XTcl_ListObjGetElements(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, (*SortInfo)(unsafe.Pointer(infoPtr)).FcompareCmdPtr, bp+56, bp+64)
		}

		(*SortInfo)(unsafe.Pointer(infoPtr)).FresultCode = XTcl_EvalObjv(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, *(*int32)(unsafe.Pointer(bp + 56 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 64 /* objv */)), 0)

		if (*SortInfo)(unsafe.Pointer(infoPtr)).FresultCode != TCL_OK {
			XTcl_AddErrorInfo(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, ts+16044)
			return 0
		}

		// Parse the result of the command.

		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(XTcl_GetObjResult(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 72)) = int32(*(*int32)(unsafe.Pointer(XTcl_GetObjResult(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, XTcl_GetObjResult(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp), bp+72)
		}() != TCL_OK {
			XTcl_SetObjResult(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, XTcl_NewStringObj(tls,
				ts+16068, -1))
			XTcl_SetErrorCode(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, libc.VaList(bp, ts+4178, ts+7949, ts+15811,
				ts+16113, uintptr(0)))
			(*SortInfo)(unsafe.Pointer(infoPtr)).FresultCode = TCL_ERROR
			return 0
		}
	}
	if !((*SortInfo)(unsafe.Pointer(infoPtr)).FisIncreasing != 0) {
		*(*int32)(unsafe.Pointer(bp + 72 /* order */)) = -*(*int32)(unsafe.Pointer(bp + 72 /* order */))
	}
	return *(*int32)(unsafe.Pointer(bp + 72 /* order */))
}

//----------------------------------------------------------------------
//
// DictionaryCompare
//
//	This function compares two strings as if they were being used in an
//	index or card catalog. The case of alphabetic characters is ignored,
//	except to break ties. Thus "B" comes before "b" but after "a". Also,
//	integers embedded in the strings compare in numerical order. In other
//	words, "x10y" comes after "x9y", not * before it as it would when
//	using strcmp().
//
// Results:
//	A negative result means that the first element comes before the
//	second, and a positive result means that the second element should
//	come first. A result of zero means the two elements are equal and it
//	doesn't matter which comes first.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sDictionaryCompare(tls *libc.TLS, left uintptr, right uintptr) int32 { /* tclCmdIL.c:4371:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	*(*int32)(unsafe.Pointer(bp /* uniLeft */)) = 0
	*(*int32)(unsafe.Pointer(bp + 4 /* uniRight */)) = 0
	var uniLeftLower int32
	var uniRightLower int32
	var diff int32
	var zeros int32
	var secondaryDiff int32 = 0

	for 1 != 0 {
		if libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(right))))) != 0 &&
			libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(left))))) != 0 { // INTL: digit
			// There are decimal numbers embedded in the two strings. Compare
			// them as numbers, rather than strings. If one number has more
			// leading zeros than the other, the number with more leading
			// zeros sorts later, but only as a secondary choice.

			zeros = 0
			for int32(*(*int8)(unsafe.Pointer(right))) == '0' && libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(right + 1))))) != 0 {
				right++
				zeros--
			}
			for int32(*(*int8)(unsafe.Pointer(left))) == '0' && libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(left + 1))))) != 0 {
				left++
				zeros++
			}
			if secondaryDiff == 0 {
				secondaryDiff = zeros
			}

			// The code below compares the numbers in the two strings without
			// ever converting them to integers. It does this by first
			// comparing the lengths of the numbers and then comparing the
			// digit values.

			diff = 0
			for 1 != 0 {
				if diff == 0 {
					diff = int32(uint8(*(*int8)(unsafe.Pointer(left)))) - int32(uint8(*(*int8)(unsafe.Pointer(right))))
				}
				right++
				left++
				if !(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(right))))) != 0) { // INTL: digit
					if libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(left))))) != 0 { // INTL: digit
						return 1
					} else {
						// The two numbers have the same length. See if their
						// values are different.

						if diff != 0 {
							return diff
						}
						break
					}
				} else if !(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(left))))) != 0) { // INTL: digit
					return -1
				}
			}
			continue
		}

		// Convert character to Unicode for comparison purposes. If either
		// string is at the terminating null, do a byte-wise comparison and
		// bail out immediately.

		if int32(*(*int8)(unsafe.Pointer(left))) != 0 && int32(*(*int8)(unsafe.Pointer(right))) != 0 {
			left += uintptr(XTclUtfToUCS4(tls, left, bp))
			right += uintptr(XTclUtfToUCS4(tls, right, bp+4))

			// Convert both chars to lower for the comparison, because
			// dictionary sorts are case insensitve. Covert to lower, not
			// upper, so chars between Z and a will sort before A (where most
			// other interesting punctuations occur).

			uniLeftLower = XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp /* uniLeft */)))
			uniRightLower = XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp + 4 /* uniRight */)))
		} else {
			diff = int32(uint8(*(*int8)(unsafe.Pointer(left)))) - int32(uint8(*(*int8)(unsafe.Pointer(right))))
			break
		}

		diff = uniLeftLower - uniRightLower
		if diff != 0 {
			return diff
		}
		if secondaryDiff == 0 {
			if XTcl_UniCharIsUpper(tls, *(*int32)(unsafe.Pointer(bp))) != 0 && XTcl_UniCharIsLower(tls, *(*int32)(unsafe.Pointer(bp + 4))) != 0 {
				secondaryDiff = -1
			} else if XTcl_UniCharIsUpper(tls, *(*int32)(unsafe.Pointer(bp + 4))) != 0 &&
				XTcl_UniCharIsLower(tls, *(*int32)(unsafe.Pointer(bp))) != 0 {
				secondaryDiff = 1
			}
		}
	}
	if diff == 0 {
		diff = secondaryDiff
	}
	return diff
}

//----------------------------------------------------------------------
//
// SelectObjFromSublist --
//
//	This procedure is invoked from lsearch and SortCompare. It is used for
//	implementing the -index option, for the lsort and lsearch commands.
//
// Results:
//	Returns NULL if a failure occurs, and sets the result in the infoPtr.
//	Otherwise returns the Tcl_Obj* to the item.
//
// Side effects:
//	None.
//
// Note:
//	No reference counting is done, as the result is only used internally
//	and never passed directly to user code.
//
//----------------------------------------------------------------------

func sSelectObjFromSublist(tls *libc.TLS, objPtr uintptr, infoPtr uintptr) uintptr { /* tclCmdIL.c:4501:16: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var i int32

	// Quick check for case when no "-index" option is there.

	if (*SortInfo)(unsafe.Pointer(infoPtr)).Findexc == 0 {
		return objPtr
	}

	// Iterate over the indices, traversing through the nested sublists as we
	// go.

	for i = 0; i < (*SortInfo)(unsafe.Pointer(infoPtr)).Findexc; i++ {
		// var listLen int32 at bp+56, 4

		var index int32
		// var currentObj uintptr at bp+64, 8

		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 56)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjLength(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, objPtr, bp+56)
		}() != TCL_OK {
			(*SortInfo)(unsafe.Pointer(infoPtr)).FresultCode = TCL_ERROR
			return uintptr(0)
		}

		index = XTclIndexDecode(tls, *(*int32)(unsafe.Pointer((*SortInfo)(unsafe.Pointer(infoPtr)).Findexv + uintptr(i)*4)), *(*int32)(unsafe.Pointer(bp + 56))-1)

		if XTcl_ListObjIndex(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, objPtr, index,
			bp+64) != TCL_OK {
			(*SortInfo)(unsafe.Pointer(infoPtr)).FresultCode = TCL_ERROR
			return uintptr(0)
		}
		if *(*uintptr)(unsafe.Pointer(bp + 64)) == uintptr(0) {
			XTcl_SetObjResult(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, XTcl_ObjPrintf(tls,
				ts+16130,
				libc.VaList(bp, index, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
					}
					return XTcl_GetString(tls, objPtr)
				}())))
			XTcl_SetErrorCode(tls, (*SortInfo)(unsafe.Pointer(infoPtr)).Finterp, libc.VaList(bp+16, ts+4178, ts+7949, ts+15811,
				ts+16167, uintptr(0)))
			(*SortInfo)(unsafe.Pointer(infoPtr)).FresultCode = TCL_ERROR
			return uintptr(0)
		}
		objPtr = *(*uintptr)(unsafe.Pointer(bp + 64 /* currentObj */))
	}
	return objPtr
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// End:

// Default set of characters to trim in [string trim] and friends. This is a
// UTF-8 literal string containing all Unicode space characters [TIP #413]

var XtclDefaultTrimSet =
// ASCII
//     nul (U+0000)
//     next line (U+0085)
//     non-breaking space (U+00a0)
// ogham space mark (U+1680)
// mongolian vowel separator (U+180e)
// en quad (U+2000)
// em quad (U+2001)
// en space (U+2002)
// em space (U+2003)
// three-per-em space (U+2004)
// four-per-em space (U+2005)
// six-per-em space (U+2006)
// figure space (U+2007)
// punctuation space (U+2008)
// thin space (U+2009)
// hair space (U+200a)
// zero width space (U+200b)
// line separator (U+2028)
// paragraph separator (U+2029)
// narrow no-break space (U+202f)
// medium mathematical space (U+205f)
// word joiner (U+2060)
// ideographic space (U+3000)
*(*[76]int8)(unsafe.Pointer(ts + 16179)) /* tclCmdMZ.c:38:12 */

//----------------------------------------------------------------------
//
// Tcl_PwdObjCmd --
//
//	This procedure is invoked to process the "pwd" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_PwdObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:84:1: */
	var retVal uintptr

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}

	retVal = XTcl_FSGetCwd(tls, interp)
	if retVal == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, retVal)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = retVal
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_RegexpObjCmd --
//
//	This procedure is invoked to process the "regexp" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_RegexpObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:124:1: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	var i int32
	var indices int32
	var match int32
	var about int32
	// var offset int32 at bp+48, 4

	var all int32
	var doinline int32
	var numMatchesSaved int32
	var cflags int32
	var eflags int32
	var stringLength int32
	var matchLength int32
	var regExpr Tcl_RegExp
	var objPtr uintptr
	var startIndex uintptr
	var resultPtr uintptr
	// var info Tcl_RegExpInfo at bp+56, 24

	var _objPtr uintptr
	// var temp int32 at bp+44, 4

	var name uintptr
	// var index int32 at bp+40, 4

	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var start int32
	var end int32
	// var objs [2]uintptr at bp+80, 16

	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var newPtr uintptr
	startIndex = uintptr(0)
	resultPtr = uintptr(0)

	indices = 0
	about = 0
	cflags = TCL_REG_ADVANCED
	*(*int32)(unsafe.Pointer(bp + 48 /* offset */)) = 0
	all = 0
	doinline = 0

	i = 1
__1:
	if !(i < objc) {
		goto __3
	}

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}()
	if !(int32(*(*int8)(unsafe.Pointer(name))) != '-') {
		goto __4
	}
	goto __3
__4:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options2)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp+40) != TCL_OK) {
		goto __5
	}
	goto optionError
__5:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 40 /* index */))) {
	case uint32(0) /* REGEXP_ALL */ :
		goto __7
	case uint32(2) /* REGEXP_INDICES */ :
		goto __8
	case uint32(3) /* REGEXP_INLINE */ :
		goto __9
	case uint32(8) /* REGEXP_NOCASE */ :
		goto __10
	case uint32(1) /* REGEXP_ABOUT */ :
		goto __11
	case uint32(4) /* REGEXP_EXPANDED */ :
		goto __12
	case uint32(5) /* REGEXP_LINE */ :
		goto __13
	case uint32(6) /* REGEXP_LINESTOP */ :
		goto __14
	case uint32(7) /* REGEXP_LINEANCHOR */ :
		goto __15
	case uint32(9) /* REGEXP_START */ :
		goto __16
	case uint32(10) /* REGEXP_LAST */ :
		goto __17
	}
	goto __6
__7:
	all = 1
	goto __6
__8:
	indices = 1
	goto __6
__9:
	doinline = 1
	goto __6
__10:
	cflags = cflags | TCL_REG_NOCASE
	goto __6
__11:
	about = 1
	goto __6
__12:
	cflags = cflags | TCL_REG_EXPANDED
	goto __6
__13:
	cflags = cflags | TCL_REG_NEWLINE
	goto __6
__14:
	cflags = cflags | TCL_REG_NLSTOP
	goto __6
__15:
	cflags = cflags | TCL_REG_NLANCH
	goto __6
__16:
	if !(libc.PreIncInt32(&i, 1) >= objc) {
		goto __18
	}
	goto endOfForLoop
__18:
	;
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 44)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), 0, bp+44)
	}() != TCL_OK) {
		goto __19
	}
	goto optionError
__19:
	;
	if !(startIndex != 0) {
		goto __20
	}
__21:
	_objPtr = startIndex
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __24
	}
	XTclFreeObj(tls, _objPtr)
__24:
	;
	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
__20:
	;
	startIndex = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	(*Tcl_Obj)(unsafe.Pointer(startIndex)).FrefCount++
	goto __6

__17:
	i++
	goto endOfForLoop
__6:
	;
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;

endOfForLoop:
	if !(objc-i < 2-about) {
		goto __25
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+16255)
	goto optionError
__25:
	;
	objc = objc - i
	objv += 8 * uintptr(i)

	// Check if the user requested -inline, but specified match variables; a
	// no-no.

	if !(doinline != 0 && objc-2 != 0) {
		goto __26
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+16309, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+16363,
		ts+16370, uintptr(0)))
	goto optionError
__26:
	;

	// Handle the odd about case separately.

	if !(about != 0) {
		goto __27
	}
	regExpr = XTcl_GetRegExpFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), cflags)
	if !(regExpr == uintptr(0) || XTclRegAbout(tls, interp, regExpr) < 0) {
		goto __28
	}
optionError:
	if !(startIndex != 0) {
		goto __29
	}
__30:
	_objPtr1 = startIndex
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __33
	}
	XTclFreeObj(tls, _objPtr1)
__33:
	;
	goto __31
__31:
	if 0 != 0 {
		goto __30
	}
	goto __32
__32:
	;
__29:
	;
	return TCL_ERROR
__28:
	;
	return TCL_OK
__27:
	;

	// Get the length of the string that we are matching against so we can do
	// the termination test for -all matches. Do this before getting the
	// regexp to avoid shimmering problems.

	objPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	stringLength = XTcl_GetCharLength(tls, objPtr)

	if !(startIndex != 0) {
		goto __34
	}
	if (*Tcl_Obj)(unsafe.Pointer(startIndex)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
		*(*int32)(unsafe.Pointer(bp + 48)) = int32(*(*int32)(unsafe.Pointer(startIndex + 32)))
	} else {
		XTclGetIntForIndex(tls, uintptr(0), startIndex, stringLength, bp+48)
	}
__35:
	_objPtr2 = startIndex
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __38
	}
	XTclFreeObj(tls, _objPtr2)
__38:
	;
	goto __36
__36:
	if 0 != 0 {
		goto __35
	}
	goto __37
__37:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 48)) < 0) {
		goto __39
	}
	*(*int32)(unsafe.Pointer(bp + 48 /* offset */)) = 0
__39:
	;
__34:
	;

	regExpr = XTcl_GetRegExpFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), cflags)
	if !(regExpr == uintptr(0)) {
		goto __40
	}
	return TCL_ERROR
__40:
	;

	objc = objc - 2
	objv += 8 * uintptr(2)

	if !(doinline != 0) {
		goto __41
	}
	// Save all the subexpressions, as we will return them as a list

	numMatchesSaved = -1
	goto __42
__41:
	// Save only enough subexpressions for matches we want to keep, expect
	// in the case of -all, where we need to keep at least one to know
	// where to move the offset.

	if objc == 0 {
		numMatchesSaved = all
	} else {
		numMatchesSaved = objc
	}
__42:
	;

	// The following loop is to handle multiple matches within the same source
	// string; each iteration handles one match. If "-all" hasn't been
	// specified then the loop body only gets executed once. We terminate the
	// loop when the starting offset is past the end of the string.

__43:
	if !(1 != 0) {
		goto __44
	}
	// Pass either 0 or TCL_REG_NOTBOL in the eflags. Passing
	// TCL_REG_NOTBOL indicates that the character at offset should not be
	// considered the start of the line. If for example the pattern {^} is
	// passed and -start is positive, then the pattern will not match the
	// start of the string unless the previous character is a newline.

	if !(*(*int32)(unsafe.Pointer(bp + 48)) == 0) {
		goto __45
	}
	eflags = 0
	goto __46
__45:
	if !(*(*int32)(unsafe.Pointer(bp + 48)) > stringLength) {
		goto __47
	}
	eflags = TCL_REG_NOTBOL
	goto __48
__47:
	if !(int32(XTcl_GetUniChar(tls, objPtr, *(*int32)(unsafe.Pointer(bp + 48))-1)) == '\n') {
		goto __49
	}
	eflags = 0
	goto __50
__49:
	eflags = TCL_REG_NOTBOL
__50:
	;
__48:
	;
__46:
	;

	match = XTcl_RegExpExecObj(tls, interp, regExpr, objPtr, *(*int32)(unsafe.Pointer(bp + 48 /* offset */)),
		numMatchesSaved, eflags)
	if !(match < 0) {
		goto __51
	}
	return TCL_ERROR
__51:
	;

	if !(match == 0) {
		goto __52
	}
	// We want to set the value of the intepreter result only when
	// this is the first time through the loop.

	if !(all <= 1) {
		goto __53
	}
	// If inlining, the interpreter's object result remains an
	// empty list, otherwise set it to an integer object w/ value
	// 0.

	if !!(doinline != 0) {
		goto __54
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, 0))
__54:
	;
	return TCL_OK
__53:
	;
	goto __44
__52:
	;

	// If additional variable names have been specified, return index
	// information in those variables.

	XTcl_RegExpGetInfo(tls, regExpr, bp+56)
	if !(doinline != 0) {
		goto __55
	}
	// It's the number of substitutions, plus one for the matchVar at
	// index 0

	objc = (*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fnsubs + 1
	if !(all <= 1) {
		goto __56
	}
__57:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __60
	}
	XTclAllocateFreeObjects(tls)
__60:
	;
	resultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __58
__58:
	if 0 != 0 {
		goto __57
	}
	goto __59
__59:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)

__56:
	;
__55:
	;
	i = 0
__61:
	if !(i < objc) {
		goto __63
	}

	if !(indices != 0) {
		goto __64
	}

	// Only adjust the match area if there was a match for that
	// area. (Scriptics Bug 4391/SF Bug #219232)

	if !(i <= (*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fnsubs && (*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fmatches+uintptr(i)*8)).Fstart >= 0) {
		goto __66
	}
	start = int32(int32(*(*int32)(unsafe.Pointer(bp + 48))) + (*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fmatches+uintptr(i)*8)).Fstart)
	end = int32(int32(*(*int32)(unsafe.Pointer(bp + 48))) + (*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fmatches+uintptr(i)*8)).Fend)

	// Adjust index so it refers to the last character in the
	// match instead of the first character after the match.

	if !(end >= *(*int32)(unsafe.Pointer(bp + 48))) {
		goto __68
	}
	end--
__68:
	;
	goto __67
__66:
	start = -1
	end = -1
__67:
	;

	*(*uintptr)(unsafe.Pointer(bp + 80)) = XTcl_NewLongObj(tls, int32(start))
	*(*uintptr)(unsafe.Pointer(bp + 80 + 1*8)) = XTcl_NewLongObj(tls, int32(end))

	newPtr = XTcl_NewListObj(tls, 2, bp+80)
	goto __65
__64:
	if !(i <= (*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fnsubs) {
		goto __69
	}
	newPtr = XTcl_GetRange(tls, objPtr,
		int32(int32(*(*int32)(unsafe.Pointer(bp + 48)))+(*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fmatches+uintptr(i)*8)).Fstart),
		int32(int32(*(*int32)(unsafe.Pointer(bp + 48)))+(*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fmatches+uintptr(i)*8)).Fend-1))
	goto __70
__69:
	;
__71:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __74
	}
	XTclAllocateFreeObjects(tls)
__74:
	;
	newPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __72
__72:
	if 0 != 0 {
		goto __71
	}
	goto __73
__73:
	;
	(*Tcl_Obj)(unsafe.Pointer(newPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(newPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(newPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(newPtr)).FtypePtr = uintptr(0)

__70:
	;
__65:
	;
	if !(doinline != 0) {
		goto __75
	}
	if !(XTcl_ListObjAppendElement(tls, interp, resultPtr, newPtr) !=
		TCL_OK) {
		goto __77
	}
__78:
	_objPtr3 = newPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __81
	}
	XTclFreeObj(tls, _objPtr3)
__81:
	;
	goto __79
__79:
	if 0 != 0 {
		goto __78
	}
	goto __80
__80:
	;
__82:
	_objPtr4 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __85
	}
	XTclFreeObj(tls, _objPtr4)
__85:
	;
	goto __83
__83:
	if 0 != 0 {
		goto __82
	}
	goto __84
__84:
	;
	return TCL_ERROR
__77:
	;
	goto __76
__75:
	if !(XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(0), newPtr,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __86
	}
	return TCL_ERROR
__86:
	;
__76:
	;
	goto __62
__62:
	i++
	goto __61
	goto __63
__63:
	;

	if !(all == 0) {
		goto __87
	}
	goto __44
__87:
	;

	// Adjust the offset to the character just after the last one in the
	// matchVar and increment all to count how many times we are making a
	// match. We always increment the offset by at least one to prevent
	// endless looping (as in the case: regexp -all {a*} a). Otherwise,
	// when we match the NULL string at the end of the input string, we
	// will loop indefinately (because the length of the match is 0, so
	// offset never changes).

	matchLength = int32((*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fmatches)).Fend - (*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+56)).Fmatches)).Fstart)

	*(*int32)(unsafe.Pointer(bp + 48 /* offset */)) += int32((*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp + 56 /* &info */)).Fmatches)).Fend)

	// A match of length zero could happen for {^} {$} or {.*} and in
	// these cases we always want to bump the index up one.

	if !(matchLength == 0) {
		goto __88
	}
	*(*int32)(unsafe.Pointer(bp + 48 /* offset */))++
__88:
	;
	all++
	if !(*(*int32)(unsafe.Pointer(bp + 48)) >= stringLength) {
		goto __89
	}
	goto __44
__89:
	;
	goto __43
__44:
	;

	// Set the interpreter's object result to an integer object with value 1
	// if -all wasn't specified, otherwise it's all-1 (the number of times
	// through the while - 1).

	if !(doinline != 0) {
		goto __90
	}
	XTcl_SetObjResult(tls, interp, resultPtr)
	goto __91
__90:
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, func() int32 {
		if all != 0 {
			return all - 1
		}
		return 1
	}()))
__91:
	;
	return TCL_OK
}

var options2 = [12]uintptr{
	ts + 15464, ts + 16385, ts + 16019, ts + 15540,
	ts + 16392, ts + 16402, ts + 16408, ts + 16418,
	ts + 15557, ts + 15592, ts + 16430, uintptr(0),
} /* tclCmdMZ.c:135:23 */

//----------------------------------------------------------------------
//
// Tcl_RegsubObjCmd --
//
//	This procedure is invoked to process the "regsub" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_RegsubObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:484:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var idx int32
	var result int32
	var cflags int32
	var all int32
	// var wlen int32 at bp+16, 4

	// var wsublen int32 at bp+20, 4

	var numMatches int32
	// var offset int32 at bp+8, 4

	var start int32
	var end int32
	var subStart int32
	var subEnd int32
	var match int32
	var regExpr Tcl_RegExp
	// var info Tcl_RegExpInfo at bp+24, 24

	var resultPtr uintptr
	var subPtr uintptr
	var objPtr uintptr
	var startIndex uintptr
	var ch Tcl_UniChar
	var wsrc uintptr
	var wfirstChar uintptr
	var wstring uintptr
	var wsubspec uintptr
	var wend uintptr
	var _objPtr uintptr
	// var temp int32 at bp+4, 4

	var name uintptr
	// var index int32 at bp, 4

	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var stringLength int32
	// This is a simple one pair string map situation. We make use of a
	// slightly modified version of the one pair STR_MAP code.

	// var slen int32 at bp+12, 4

	var nocase int32
	var strCmpFn uintptr
	var p uintptr
	var wsrclc Tcl_UniChar
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	startIndex = uintptr(0)

	cflags = TCL_REG_ADVANCED
	all = 0
	*(*int32)(unsafe.Pointer(bp + 8 /* offset */)) = 0
	resultPtr = uintptr(0)

	idx = 1
__1:
	if !(idx < objc) {
		goto __3
	}

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(idx)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(idx)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(idx)*8)))
	}()
	if !(int32(*(*int8)(unsafe.Pointer(name))) != '-') {
		goto __4
	}
	goto __3
__4:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(idx)*8)), uintptr(unsafe.Pointer(&options3)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp) != TCL_OK) {
		goto __5
	}
	goto optionError
__5:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp /* index */))) {
	case uint32(0) /* REGSUB_ALL */ :
		goto __7
	case uint32(1) /* REGSUB_NOCASE */ :
		goto __8
	case uint32(2) /* REGSUB_EXPANDED */ :
		goto __9
	case uint32(3) /* REGSUB_LINE */ :
		goto __10
	case uint32(4) /* REGSUB_LINESTOP */ :
		goto __11
	case uint32(5) /* REGSUB_LINEANCHOR */ :
		goto __12
	case uint32(6) /* REGSUB_START */ :
		goto __13
	case uint32(7) /* REGSUB_LAST */ :
		goto __14
	}
	goto __6
__7:
	all = 1
	goto __6
__8:
	cflags = cflags | TCL_REG_NOCASE
	goto __6
__9:
	cflags = cflags | TCL_REG_EXPANDED
	goto __6
__10:
	cflags = cflags | TCL_REG_NEWLINE
	goto __6
__11:
	cflags = cflags | TCL_REG_NLSTOP
	goto __6
__12:
	cflags = cflags | TCL_REG_NLANCH
	goto __6
__13:
	if !(libc.PreIncInt32(&idx, 1) >= objc) {
		goto __15
	}
	goto endOfForLoop
__15:
	;
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(idx)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(idx)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(idx)*8)), 0, bp+4)
	}() != TCL_OK) {
		goto __16
	}
	goto optionError
__16:
	;
	if !(startIndex != 0) {
		goto __17
	}
__18:
	_objPtr = startIndex
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __21
	}
	XTclFreeObj(tls, _objPtr)
__21:
	;
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
__17:
	;
	startIndex = *(*uintptr)(unsafe.Pointer(objv + uintptr(idx)*8))
	(*Tcl_Obj)(unsafe.Pointer(startIndex)).FrefCount++
	goto __6

__14:
	idx++
	goto endOfForLoop
__6:
	;
	goto __2
__2:
	idx++
	goto __1
	goto __3
__3:
	;

endOfForLoop:
	if !(objc-idx < 3 || objc-idx > 4) {
		goto __22
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+16433)
optionError:
	if !(startIndex != 0) {
		goto __23
	}
__24:
	_objPtr1 = startIndex
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __27
	}
	XTclFreeObj(tls, _objPtr1)
__27:
	;
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
__23:
	;
	return TCL_ERROR
__22:
	;

	objc = objc - idx
	objv += 8 * uintptr(idx)

	if !(startIndex != 0) {
		goto __28
	}
	stringLength = XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))

	if (*Tcl_Obj)(unsafe.Pointer(startIndex)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
		*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(startIndex + 32)))
	} else {
		XTclGetIntForIndex(tls, uintptr(0), startIndex, stringLength, bp+8)
	}
__29:
	_objPtr2 = startIndex
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __32
	}
	XTclFreeObj(tls, _objPtr2)
__32:
	;
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 8)) < 0) {
		goto __33
	}
	*(*int32)(unsafe.Pointer(bp + 8 /* offset */)) = 0
__33:
	;
__28:
	;

	if !(all != 0 && *(*int32)(unsafe.Pointer(bp + 8)) == 0 &&
		libc.Xstrpbrk(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), ts+16476) == uintptr(0) &&
		libc.Xstrpbrk(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
		}(), ts+16479) == uintptr(0)) {
		goto __34
	}

	numMatches = 0
	nocase = cflags & TCL_REG_NOCASE
	if nocase != 0 {
		strCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, uint32) int32
		}{XTcl_UniCharNcasecmp}))
	} else {
		strCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, uint32) int32
		}{XTcl_UniCharNcmp}))
	}

	wsrc = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), bp+12)
	wstring = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16)
	wsubspec = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+20)
	wend = wstring + uintptr(*(*int32)(unsafe.Pointer(bp + 16)))*2 - uintptr(func() int32 {
		if *(*int32)(unsafe.Pointer(bp + 12)) != 0 {
			return *(*int32)(unsafe.Pointer(bp + 12)) - 1
		}
		return 0
	}())*2
	result = TCL_OK

	if !(*(*int32)(unsafe.Pointer(bp + 12)) == 0) {
		goto __35
	}
	// regsub behavior for "" matches between each character. 'string
	// map' skips the "" case.

	if !(wstring < wend) {
		goto __37
	}
	resultPtr = XTcl_NewUnicodeObj(tls, wstring, 0)
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
__38:
	if !(wstring < wend) {
		goto __40
	}
	XTcl_AppendUnicodeToObj(tls, resultPtr, wsubspec, *(*int32)(unsafe.Pointer(bp + 20 /* wsublen */)))
	XTcl_AppendUnicodeToObj(tls, resultPtr, wstring, 1)
	numMatches++
	goto __39
__39:
	wstring += 2
	goto __38
	goto __40
__40:
	;
	*(*int32)(unsafe.Pointer(bp + 16 /* wlen */)) = 0
__37:
	;
	goto __36
__35:
	wsrclc = XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(wsrc))))
	p = libc.AssignUintptr(&wfirstChar, wstring)
__41:
	if !(wstring < wend) {
		goto __43
	}
	if !((int32(*(*Tcl_UniChar)(unsafe.Pointer(wstring))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(wsrc))) || nocase != 0 && int32(XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(wstring))))) == int32(wsrclc)) && (*(*int32)(unsafe.Pointer(bp + 12)) == 1 || (*struct {
		f func(*libc.TLS, uintptr, uintptr, uint32) int32
	})(unsafe.Pointer(&struct{ uintptr }{strCmpFn})).f(tls, wstring, wsrc,
		uint32(*(*int32)(unsafe.Pointer(bp + 12)))) == 0)) {
		goto __44
	}
	if !(numMatches == 0) {
		goto __45
	}
	resultPtr = XTcl_NewUnicodeObj(tls, wstring, 0)
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
__45:
	;
	if !(p != wstring) {
		goto __46
	}
	XTcl_AppendUnicodeToObj(tls, resultPtr, p, int32((int64(wstring)-int64(p))/2))
	p = wstring + uintptr(*(*int32)(unsafe.Pointer(bp + 12)))*2
	goto __47
__46:
	p += 2 * uintptr(*(*int32)(unsafe.Pointer(bp + 12)))
__47:
	;
	wstring = p - uintptr(1)*2

	XTcl_AppendUnicodeToObj(tls, resultPtr, wsubspec, *(*int32)(unsafe.Pointer(bp + 20 /* wsublen */)))
	numMatches++
__44:
	;
	goto __42
__42:
	wstring += 2
	goto __41
	goto __43
__43:
	;
	if !(numMatches != 0) {
		goto __48
	}
	*(*int32)(unsafe.Pointer(bp + 16 /* wlen */)) = int32((int64(wfirstChar+uintptr(*(*int32)(unsafe.Pointer(bp + 16)))*2) - int64(p)) / 2)
	wstring = p
__48:
	;
__36:
	;
	objPtr = uintptr(0)
	subPtr = uintptr(0)
	goto regsubDone
__34:
	;

	regExpr = XTcl_GetRegExpFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), cflags)
	if !(regExpr == uintptr(0)) {
		goto __49
	}
	return TCL_ERROR
__49:
	;

	// Make sure to avoid problems where the objects are shared. This can
	// cause RegExpObj <> UnicodeObj shimmering that causes data corruption.
	// [Bug #461322]

	if !(*(*uintptr)(unsafe.Pointer(objv + 1*8)) == *(*uintptr)(unsafe.Pointer(objv))) {
		goto __50
	}
	objPtr = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	goto __51
__50:
	objPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
__51:
	;
	wstring = XTcl_GetUnicodeFromObj(tls, objPtr, bp+16)
	if !(*(*uintptr)(unsafe.Pointer(objv + 2*8)) == *(*uintptr)(unsafe.Pointer(objv))) {
		goto __52
	}
	subPtr = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	goto __53
__52:
	subPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
__53:
	;
	wsubspec = XTcl_GetUnicodeFromObj(tls, subPtr, bp+20)

	result = TCL_OK

	// The following loop is to handle multiple matches within the same source
	// string; each iteration handles one match and its corresponding
	// substitution. If "-all" hasn't been specified then the loop body only
	// gets executed once. We must use 'offset <= wlen' in particular for the
	// case where the regexp pattern can match the empty string - this is
	// useful when doing, say, 'regsub -- ^ $str ...' when $str might be
	// empty.

	numMatches = 0
__54:
	if !(*(*int32)(unsafe.Pointer(bp + 8)) <= *(*int32)(unsafe.Pointer(bp + 16))) {
		goto __56
	}

	// The flags argument is set if string is part of a larger string, so
	// that "^" won't match.

	match = XTcl_RegExpExecObj(tls, interp, regExpr, objPtr, *(*int32)(unsafe.Pointer(bp + 8 /* offset */)),
		10, func() int32 {
			if *(*int32)(unsafe.Pointer(bp + 8)) > 0 && int32(*(*Tcl_UniChar)(unsafe.Pointer(wstring + uintptr(*(*int32)(unsafe.Pointer(bp + 8))-1)*2))) != int32(Tcl_UniChar('\n')) {
				return TCL_REG_NOTBOL
			}
			return 0
		}())

	if !(match < 0) {
		goto __57
	}
	result = TCL_ERROR
	goto done
__57:
	;
	if !(match == 0) {
		goto __58
	}
	goto __56
__58:
	;
	if !(numMatches == 0) {
		goto __59
	}
	resultPtr = XTcl_NewUnicodeObj(tls, wstring, 0)
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	if !(*(*int32)(unsafe.Pointer(bp + 8)) > 0) {
		goto __60
	}
	// Copy the initial portion of the string in if an offset was
	// specified.

	XTcl_AppendUnicodeToObj(tls, resultPtr, wstring, *(*int32)(unsafe.Pointer(bp + 8 /* offset */)))
__60:
	;
__59:
	;
	numMatches++

	// Copy the portion of the source string before the match to the
	// result variable.

	XTcl_RegExpGetInfo(tls, regExpr, bp+24)
	start = int32((*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp + 24 /* &info */)).Fmatches)).Fstart)
	end = int32((*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp + 24 /* &info */)).Fmatches)).Fend)
	XTcl_AppendUnicodeToObj(tls, resultPtr, wstring+uintptr(*(*int32)(unsafe.Pointer(bp + 8)))*2, start)

	// Append the subSpec argument to the variable, making appropriate
	// substitutions. This code is a bit hairy because of the backslash
	// conventions and because the code saves up ranges of characters in
	// subSpec to reduce the number of calls to Tcl_SetVar.

	wsrc = libc.AssignUintptr(&wfirstChar, wsubspec)
	wend = wsubspec + uintptr(*(*int32)(unsafe.Pointer(bp + 20)))*2
	ch = *(*Tcl_UniChar)(unsafe.Pointer(wsrc))
__61:
	if !(wsrc != wend) {
		goto __63
	}
	if !(int32(ch) == '&') {
		goto __64
	}
	idx = 0
	goto __65
__64:
	if !(int32(ch) == '\\') {
		goto __66
	}
	ch = *(*Tcl_UniChar)(unsafe.Pointer(wsrc + 1*2))
	if !(int32(ch) >= '0' && int32(ch) <= '9') {
		goto __68
	}
	idx = int32(ch) - '0'
	goto __69
__68:
	if !(int32(ch) == '\\' || int32(ch) == '&') {
		goto __70
	}
	*(*Tcl_UniChar)(unsafe.Pointer(wsrc)) = ch
	XTcl_AppendUnicodeToObj(tls, resultPtr, wfirstChar,
		int32((int64(wsrc)-int64(wfirstChar))/2+int64(1)))
	*(*Tcl_UniChar)(unsafe.Pointer(wsrc)) = Tcl_UniChar('\\')
	wfirstChar = wsrc + uintptr(2)*2
	wsrc += 2
	goto __62
	goto __71
__70:
	goto __62
__71:
	;
__69:
	;
	goto __67
__66:
	goto __62
__67:
	;
__65:
	;

	if !(wfirstChar != wsrc) {
		goto __72
	}
	XTcl_AppendUnicodeToObj(tls, resultPtr, wfirstChar,
		int32((int64(wsrc)-int64(wfirstChar))/2))
__72:
	;

	if !(idx <= (*Tcl_RegExpInfo)(unsafe.Pointer(bp+24)).Fnsubs) {
		goto __73
	}
	subStart = int32((*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+24 /* &info */)).Fmatches + uintptr(idx)*8)).Fstart)
	subEnd = int32((*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+24 /* &info */)).Fmatches + uintptr(idx)*8)).Fend)
	if !(subStart >= 0 && subEnd >= 0) {
		goto __74
	}
	XTcl_AppendUnicodeToObj(tls, resultPtr,
		wstring+uintptr(*(*int32)(unsafe.Pointer(bp + 8)))*2+uintptr(subStart)*2, subEnd-subStart)
__74:
	;
__73:
	;

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(wsrc))) == '\\') {
		goto __75
	}
	wsrc += 2
__75:
	;
	wfirstChar = wsrc + uintptr(1)*2
	goto __62
__62:
	wsrc += 2
	ch = *(*Tcl_UniChar)(unsafe.Pointer(wsrc))
	goto __61
	goto __63
__63:
	;

	if !(wfirstChar != wsrc) {
		goto __76
	}
	XTcl_AppendUnicodeToObj(tls, resultPtr, wfirstChar, int32((int64(wsrc)-int64(wfirstChar))/2))
__76:
	;

	if !(end == 0) {
		goto __77
	}
	// Always consume at least one character of the input string in
	// order to prevent infinite loops.

	if !(*(*int32)(unsafe.Pointer(bp + 8)) < *(*int32)(unsafe.Pointer(bp + 16))) {
		goto __79
	}
	XTcl_AppendUnicodeToObj(tls, resultPtr, wstring+uintptr(*(*int32)(unsafe.Pointer(bp + 8)))*2, 1)
__79:
	;
	*(*int32)(unsafe.Pointer(bp + 8 /* offset */))++
	goto __78
__77:
	*(*int32)(unsafe.Pointer(bp + 8 /* offset */)) += end
	if !(start == end) {
		goto __80
	}
	// We matched an empty string, which means we must go forward
	// one more step so we don't match again at the same spot.

	if !(*(*int32)(unsafe.Pointer(bp + 8)) < *(*int32)(unsafe.Pointer(bp + 16))) {
		goto __81
	}
	XTcl_AppendUnicodeToObj(tls, resultPtr, wstring+uintptr(*(*int32)(unsafe.Pointer(bp + 8)))*2, 1)
__81:
	;
	*(*int32)(unsafe.Pointer(bp + 8 /* offset */))++
__80:
	;
__78:
	;
	if !!(all != 0) {
		goto __82
	}
	goto __56
__82:
	;
	goto __55
__55:
	;
	goto __54
	goto __56
__56:
	;

	// Copy the portion of the source string after the last match to the
	// result variable.

regsubDone:
	if !(numMatches == 0) {
		goto __83
	}
	// On zero matches, just ignore the offset, since it shouldn't matter
	// to us in this case, and the user may have skewed it.

	resultPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	goto __84
__83:
	if !(*(*int32)(unsafe.Pointer(bp + 8)) < *(*int32)(unsafe.Pointer(bp + 16))) {
		goto __85
	}
	XTcl_AppendUnicodeToObj(tls, resultPtr, wstring+uintptr(*(*int32)(unsafe.Pointer(bp + 8)))*2, *(*int32)(unsafe.Pointer(bp + 16))-*(*int32)(unsafe.Pointer(bp + 8)))
__85:
	;
__84:
	;
	if !(objc == 4) {
		goto __86
	}
	if !(XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(0), resultPtr,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __88
	}
	result = TCL_ERROR
	goto __89
__88:
	// Set the interpreter's object result to an integer object
	// holding the number of matches.

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, numMatches))
__89:
	;
	goto __87
__86:
	// No varname supplied, so just return the modified string.

	XTcl_SetObjResult(tls, interp, resultPtr)
__87:
	;

done:
	if !(objPtr != 0 && *(*uintptr)(unsafe.Pointer(objv + 1*8)) == *(*uintptr)(unsafe.Pointer(objv))) {
		goto __90
	}
__91:
	_objPtr3 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __94
	}
	XTclFreeObj(tls, _objPtr3)
__94:
	;
	goto __92
__92:
	if 0 != 0 {
		goto __91
	}
	goto __93
__93:
	;
__90:
	;
	if !(subPtr != 0 && *(*uintptr)(unsafe.Pointer(objv + 2*8)) == *(*uintptr)(unsafe.Pointer(objv))) {
		goto __95
	}
__96:
	_objPtr4 = subPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __99
	}
	XTclFreeObj(tls, _objPtr4)
__99:
	;
	goto __97
__97:
	if 0 != 0 {
		goto __96
	}
	goto __98
__98:
	;
__95:
	;
	if !(resultPtr != 0) {
		goto __100
	}
__101:
	_objPtr5 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __104
	}
	XTclFreeObj(tls, _objPtr5)
__104:
	;
	goto __102
__102:
	if 0 != 0 {
		goto __101
	}
	goto __103
__103:
	;
__100:
	;
	return result
}

var options3 = [9]uintptr{
	ts + 15464, ts + 15557, ts + 16392,
	ts + 16402, ts + 16408, ts + 16418, ts + 15592,
	ts + 16430, uintptr(0),
} /* tclCmdMZ.c:497:23 */

//----------------------------------------------------------------------
//
// Tcl_RenameObjCmd --
//
//	This procedure is invoked to process the "rename" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_RenameObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:892:1: */
	var oldName uintptr
	var newName uintptr

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16494)
		return TCL_ERROR
	}

	oldName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	newName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	return XTclRenameCommand(tls, interp, oldName, newName)
}

//----------------------------------------------------------------------
//
// Tcl_ReturnObjCmd --
//
//	This object-based procedure is invoked to process the "return" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_ReturnObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:928:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var code int32 at bp+8, 4

	// var level int32 at bp+12, 4

	// var returnOpts uintptr at bp, 8

	// General syntax: [return ?-option value ...? ?result?]
	// An even number of words means an explicit result argument is present.

	var explicitResult int32 = libc.Bool32(0 == objc%2)
	var numOptionWords int32 = objc - 1 - explicitResult

	if TCL_ERROR == XTclMergeReturnOptions(tls, interp, numOptionWords, objv+uintptr(1)*8,
		bp, bp+8, bp+12) {
		return TCL_ERROR
	}

	*(*int32)(unsafe.Pointer(bp + 8 /* code */)) = XTclProcessReturn(tls, interp, *(*int32)(unsafe.Pointer(bp + 8 /* code */)), *(*int32)(unsafe.Pointer(bp + 12 /* level */)), *(*uintptr)(unsafe.Pointer(bp /* returnOpts */)))
	if explicitResult != 0 {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
	}
	return *(*int32)(unsafe.Pointer(bp + 8 /* code */))
}

//----------------------------------------------------------------------
//
// Tcl_SourceObjCmd --
//
//	This procedure is invoked to process the "source" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_SourceObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:975:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRSourceObjCmd})), dummy, objc, objv)
}

func XTclNRSourceObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:985:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var encodingName uintptr = uintptr(0)
	var fileName uintptr

	if objc != 2 && objc != 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16510)
		return TCL_ERROR
	}

	fileName = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))

	if objc == 4 {
		// var index int32 at bp, 4

		if TCL_ERROR == XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&options4)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp) {
			return TCL_ERROR
		}
		encodingName = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}()
	}

	return XTclNREvalFile(tls, interp, fileName, encodingName)
}

var options4 = [2]uintptr{
	ts + 16536, uintptr(0),
} /* tclCmdMZ.c:1002:20 */

//----------------------------------------------------------------------
//
// Tcl_SplitObjCmd --
//
//	This procedure is invoked to process the "split" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_SplitObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:1035:1: */
	bp := tls.Alloc(108)
	defer tls.Free(108)

	*(*Tcl_UniChar)(unsafe.Pointer(bp + 104 /* ch */)) = Tcl_UniChar(0)
	var len int32
	var splitChars uintptr
	var stringPtr uintptr
	var end uintptr
	// var splitCharLen int32 at bp, 4

	// var stringLen int32 at bp+4, 4

	var listPtr uintptr
	var objPtr uintptr

	if objc == 2 {
		splitChars = ts + 16546 /* " \n\t\r" */
		*(*int32)(unsafe.Pointer(bp /* splitCharLen */)) = 4
	} else if objc == 3 {
		splitChars = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp)
		}()
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16551)
		return TCL_ERROR
	}

	stringPtr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+4)
	}()
	end = stringPtr + uintptr(*(*int32)(unsafe.Pointer(bp + 4)))
	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		listPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr = uintptr(0)
	{
	}

	if *(*int32)(unsafe.Pointer(bp + 4)) == 0 {
		// Do nothing.
	} else if *(*int32)(unsafe.Pointer(bp)) == 0 {
		// var charReuseTable Tcl_HashTable at bp+8, 88

		var hPtr uintptr
		// var isNew int32 at bp+100, 4

		// Handle the special case of splitting on every character.
		//
		// Uses a hash table to ensure that each kind of character has only
		// one Tcl_Obj instance (multiply-referenced) in the final list. This
		// is a *major* win when splitting on a long string (especially in the
		// megabyte range!) - DKF

		XTcl_InitHashTable(tls, bp+8, 1)

		for ; stringPtr < end; stringPtr += uintptr(len) {
			// var ucs4 int32 at bp+96, 4

			len = XTclUtfToUCS4(tls, stringPtr, bp+96)
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp + 8 /* &charReuseTable */)).FcreateProc})).f(tls, bp+8 /* &charReuseTable */, uintptr(Intptr_t(*(*int32)(unsafe.Pointer(bp + 96 /* ucs4 */)))), bp+100 /* &isNew */)
			if *(*int32)(unsafe.Pointer(bp + 100)) != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						objPtr = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
					if len == 0 {
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(len+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, stringPtr, uint64(len))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(len))) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = len
					}
					(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
					{
					}
				}

				// Don't need to fiddle with refcount...

				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = objPtr
			} else {
				objPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, objPtr)
		}
		XTcl_DeleteHashTable(tls, bp+8)

	} else if *(*int32)(unsafe.Pointer(bp)) == 1 {
		var p uintptr

		// Handle the special case of splitting on a single character. This is
		// only true for the one-char ASCII case, as one unicode char is > 1
		// byte in length.

		for *(*int8)(unsafe.Pointer(stringPtr)) != 0 && libc.AssignUintptr(&p, libc.Xstrchr(tls, stringPtr, int32(*(*int8)(unsafe.Pointer(splitChars))))) != uintptr(0) {
			objPtr = XTcl_NewStringObj(tls, stringPtr, int32((int64(p)-int64(stringPtr))/1))
			XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, objPtr)
			stringPtr = p + uintptr(1)
		}
		for ok3 := true; ok3; ok3 = 0 != 0 {
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
			if (int64(end)-int64(stringPtr))/1 == int64(0) {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32((int64(end)-int64(stringPtr))/1+int64(1)))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, stringPtr, uint64((int64(end)-int64(stringPtr))/1))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr((int64(end)-int64(stringPtr))/1))) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32((int64(end) - int64(stringPtr)) / 1)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
			{
			}
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, objPtr)
	} else {
		var element uintptr
		var p uintptr
		var splitEnd uintptr
		var splitLen int32
		*(*Tcl_UniChar)(unsafe.Pointer(bp + 106 /* splitChar */)) = Tcl_UniChar(0)

		// Normal case: split on any of a given set of characters. Discard
		// instances of the split characters.

		splitEnd = splitChars + uintptr(*(*int32)(unsafe.Pointer(bp)))

		for element = stringPtr; stringPtr < end; stringPtr += uintptr(len) {
			len = func() int32 {
				if int32(uint8(*(*int8)(unsafe.Pointer(stringPtr)))) < 0x80 {
					return func() int32 {
						*(*Tcl_UniChar)(unsafe.Pointer(bp + 104)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(stringPtr))))
						return 1
					}()
				}
				return XTcl_UtfToUniChar(tls, stringPtr, bp+104)
			}()
			for p = splitChars; p < splitEnd; p += uintptr(splitLen) {
				splitLen = func() int32 {
					if int32(uint8(*(*int8)(unsafe.Pointer(p)))) < 0x80 {
						return func() int32 {
							*(*Tcl_UniChar)(unsafe.Pointer(bp + 106)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(p))))
							return 1
						}()
					}
					return XTcl_UtfToUniChar(tls, p, bp+106)
				}()
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 104))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 106))) {
					for ok5 := true; ok5; ok5 = 0 != 0 {
						for ok6 := true; ok6; ok6 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							objPtr = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
						if (int64(stringPtr)-int64(element))/1 == int64(0) {
							(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32((int64(stringPtr)-int64(element))/1+int64(1)))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, element, uint64((int64(stringPtr)-int64(element))/1))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr((int64(stringPtr)-int64(element))/1))) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32((int64(stringPtr) - int64(element)) / 1)
						}
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, objPtr)
					element = stringPtr + uintptr(len)
					break
				}
			}
		}

		for ok7 := true; ok7; ok7 = 0 != 0 {
			for ok8 := true; ok8; ok8 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
			if (int64(stringPtr)-int64(element))/1 == int64(0) {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32((int64(stringPtr)-int64(element))/1+int64(1)))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, element, uint64((int64(stringPtr)-int64(element))/1))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr((int64(stringPtr)-int64(element))/1))) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32((int64(stringPtr) - int64(element)) / 1)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
			{
			}
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, objPtr)
	}
	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringFirstCmd --
//
//	This procedure is invoked to process the "string first" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringFirstCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:1170:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var needleStr uintptr
	var haystackStr uintptr
	var match int32
	// var start int32 at bp+8, 4

	// var needleLen int32 at bp, 4

	// var haystackLen int32 at bp+4, 4

	var p uintptr
	var end uintptr

	if !(objc < 3 || objc > 4) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+16571)
	return TCL_ERROR
__1:
	;

	// We are searching haystackStr for the sequence needleStr.

	match = -1
	*(*int32)(unsafe.Pointer(bp + 8 /* start */)) = 0
	*(*int32)(unsafe.Pointer(bp + 4 /* haystackLen */)) = -1

	needleStr = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	haystackStr = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+4)

	if !(objc == 4) {
		goto __2
	}
	// If a startIndex is specified, we will need to fast forward to that
	// point in the string before we think about a match.

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), *(*int32)(unsafe.Pointer(bp + 4))-1, bp+8)
	}() != TCL_OK) {
		goto __3
	}
	return TCL_ERROR
__3:
	;

	// Reread to prevent shimmering problems.

	needleStr = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	haystackStr = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+4)

	if !(*(*int32)(unsafe.Pointer(bp + 8)) >= *(*int32)(unsafe.Pointer(bp + 4))) {
		goto __4
	}
	goto str_first_done
	goto __5
__4:
	if !(*(*int32)(unsafe.Pointer(bp + 8)) > 0) {
		goto __6
	}
	haystackStr += 2 * uintptr(*(*int32)(unsafe.Pointer(bp + 8)))
	*(*int32)(unsafe.Pointer(bp + 4 /* haystackLen */)) -= *(*int32)(unsafe.Pointer(bp + 8 /* start */))
	goto __7
__6:
	if !(*(*int32)(unsafe.Pointer(bp + 8)) < 0) {
		goto __8
	}
	// Invalid start index mapped to string start; Bug #423581

	*(*int32)(unsafe.Pointer(bp + 8 /* start */)) = 0
__8:
	;
__7:
	;
__5:
	;
__2:
	;

	// If the length of the needle is more than the length of the haystack, it
	// cannot be contained in there so we can avoid searching. [Bug 2960021]

	if !(*(*int32)(unsafe.Pointer(bp)) > 0 && *(*int32)(unsafe.Pointer(bp)) <= *(*int32)(unsafe.Pointer(bp + 4))) {
		goto __9
	}

	end = haystackStr + uintptr(*(*int32)(unsafe.Pointer(bp + 4)))*2 - uintptr(*(*int32)(unsafe.Pointer(bp)))*2 + uintptr(1)*2
	p = haystackStr
__10:
	if !(p < end) {
		goto __12
	}
	// Scan forward to find the first character.

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(p))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(needleStr))) && XTcl_UniCharNcmp(tls, needleStr, p,
		uint32(*(*int32)(unsafe.Pointer(bp)))) == 0) {
		goto __13
	}
	match = int32((int64(p) - int64(haystackStr)) / 2)
	goto __12
__13:
	;
	goto __11
__11:
	p += 2
	goto __10
	goto __12
__12:
	;
__9:
	;

	// Compute the character index of the matching string by counting the
	// number of characters before the match.

	if !(match != -1 && objc == 4) {
		goto __14
	}
	match = match + *(*int32)(unsafe.Pointer(bp + 8))
__14:
	;

str_first_done:
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, match))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringLastCmd --
//
//	This procedure is invoked to process the "string last" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringLastCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:1283:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var needleStr uintptr
	var haystackStr uintptr
	var p uintptr
	var match int32
	// var start int32 at bp+8, 4

	// var needleLen int32 at bp, 4

	// var haystackLen int32 at bp+4, 4

	if !(objc < 3 || objc > 4) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+16571)
	return TCL_ERROR
__1:
	;

	// We are searching haystackString for the sequence needleString.

	match = -1
	*(*int32)(unsafe.Pointer(bp + 8 /* start */)) = 0
	*(*int32)(unsafe.Pointer(bp + 4 /* haystackLen */)) = -1

	needleStr = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	haystackStr = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+4)

	if !(objc == 4) {
		goto __2
	}
	// If a startIndex is specified, we will need to restrict the string
	// range to that char index in the string

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), *(*int32)(unsafe.Pointer(bp + 4))-1, bp+8)
	}() != TCL_OK) {
		goto __4
	}
	return TCL_ERROR
__4:
	;

	// Reread to prevent shimmering problems.

	needleStr = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	haystackStr = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+4)

	if !(*(*int32)(unsafe.Pointer(bp + 8)) < 0) {
		goto __5
	}
	goto str_last_done
	goto __6
__5:
	if !(*(*int32)(unsafe.Pointer(bp + 8)) < *(*int32)(unsafe.Pointer(bp + 4))) {
		goto __7
	}
	p = haystackStr + uintptr(*(*int32)(unsafe.Pointer(bp + 8)))*2 + uintptr(1)*2 - uintptr(*(*int32)(unsafe.Pointer(bp)))*2
	goto __8
__7:
	p = haystackStr + uintptr(*(*int32)(unsafe.Pointer(bp + 4)))*2 - uintptr(*(*int32)(unsafe.Pointer(bp)))*2
__8:
	;
__6:
	;
	goto __3
__2:
	p = haystackStr + uintptr(*(*int32)(unsafe.Pointer(bp + 4)))*2 - uintptr(*(*int32)(unsafe.Pointer(bp)))*2
__3:
	;

	// If the length of the needle is more than the length of the haystack, it
	// cannot be contained in there so we can avoid searching. [Bug 2960021]

	if !(*(*int32)(unsafe.Pointer(bp)) > 0 && *(*int32)(unsafe.Pointer(bp)) <= *(*int32)(unsafe.Pointer(bp + 4))) {
		goto __9
	}
__10:
	if !(p >= haystackStr) {
		goto __12
	}
	// Scan backwards to find the first character.

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(p))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(needleStr))) && !(libc.Xmemcmp(tls, needleStr, p,
		uint64(unsafe.Sizeof(Tcl_UniChar(0)))*Size_t(*(*int32)(unsafe.Pointer(bp)))) != 0)) {
		goto __13
	}
	match = int32((int64(p) - int64(haystackStr)) / 2)
	goto __12
__13:
	;
	goto __11
__11:
	p -= 2
	goto __10
	goto __12
__12:
	;
__9:
	;

str_last_done:
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, match))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringIndexCmd --
//
//	This procedure is invoked to process the "string index" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringIndexCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:1381:1: */
	bp := tls.Alloc(13)
	defer tls.Free(13)

	var length int32
	// var index int32 at bp, 4

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16612)
		return TCL_ERROR
	}

	// Get the char length to calulate what 'end' means.

	length = XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), length-1, bp)
	}() != TCL_OK {
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp)) >= 0 && *(*int32)(unsafe.Pointer(bp)) < length {
		var ch int32 = int32(XTcl_GetUniChar(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*int32)(unsafe.Pointer(bp /* index */))))

		// If we have a ByteArray object, we're careful to generate a new
		// bytearray for a result.

		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes == uintptr(0) {
			*(*uint8)(unsafe.Pointer(bp + 4 /* uch */)) = uint8(ch)

			XTcl_SetObjResult(tls, interp, XTcl_NewByteArrayObj(tls, bp+4, 1))
		} else {
			*(*[8]int8)(unsafe.Pointer(bp + 5 /* buf */)) = *(*[8]int8)(unsafe.Pointer(ts + 10347))

			length = XTclUCS4ToUtf(tls, ch, bp+5)
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, bp+5, length))
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringIsCmd --
//
//	This procedure is invoked to process the "string is" Tcl command. See
//	the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringIsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:1444:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var string1 uintptr
	var end uintptr
	// var stop uintptr at bp+16, 8

	var chcomp uintptr // The UniChar comparison function.
	// var i int32 at bp+24, 4

	var failat int32
	var result int32
	var strict int32
	// var index int32 at bp, 4

	// var length1 int32 at bp+8, 4

	// var length2 int32 at bp+40, 4

	var objPtr uintptr
	var failVarObj uintptr
	// var w Tcl_WideInt at bp+32, 8

	// var idx2 int32 at bp+4, 4

	var tmpStr uintptr
	// Need to figure out where the list parsing failed, which is
	// fairly expensive. This is adapted from the core of
	// SetListFromAny().

	// var elemStart uintptr at bp+48, 8

	// var nextElem uintptr at bp+56, 8

	var lenRemain int32
	// var elemSize int32 at bp+64, 4

	var p uintptr
	// var ucs4 int32 at bp+68, 4
	chcomp = uintptr(0)
	failat = 0
	result = 1
	strict = 0
	failVarObj = uintptr(0)

	if !(objc < 3 || objc > 6) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+16629)
	return TCL_ERROR
__1:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&isClasses)), int32(unsafe.Sizeof(uintptr(0))), ts+16666, 0, bp) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	if !(objc != 3) {
		goto __3
	}
	*(*int32)(unsafe.Pointer(bp + 24 /* i */)) = 2
__4:
	if !(*(*int32)(unsafe.Pointer(bp + 24)) < objc-1) {
		goto __6
	}

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))*8)), uintptr(unsafe.Pointer(&isOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+4) != TCL_OK) {
		goto __7
	}
	return TCL_ERROR
__7:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 4 /* idx2 */))) {
	case uint32(0) /* OPT_STRICT */ :
		goto __9
	case uint32(1) /* OPT_FAILIDX */ :
		goto __10
	}
	goto __8
__9:
	strict = 1
	goto __8
__10:
	if !(*(*int32)(unsafe.Pointer(bp + 24))+1 >= objc-1) {
		goto __11
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv,
		ts+16672)
	return TCL_ERROR
__11:
	;
	failVarObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PreIncInt32(&*(*int32)(unsafe.Pointer(bp + 24 /* i */)), 1))*8))
	goto __8
__8:
	;
	goto __5
__5:
	*(*int32)(unsafe.Pointer(bp + 24 /* i */))++
	goto __4
	goto __6
__6:
	;
__3:
	;

	// We get the objPtr so that we can short-cut for some classes by checking
	// the object type (int and double), but we need the string otherwise,
	// because we don't want any conversion of type occuring (as, for example,
	// Tcl_Get*FromObj would do).

	objPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))

	// When entering here, result == 1 and failat == 0.

	switch uint32(*(*int32)(unsafe.Pointer(bp /* index */))) {
	case uint32(0) /* STR_IS_ALNUM */ :
		goto __13
	case uint32(1) /* STR_IS_ALPHA */ :
		goto __14
	case uint32(2) /* STR_IS_ASCII */ :
		goto __15
	case uint32(4) /* STR_IS_BOOL */ :
		goto __16
	case uint32(16) /* STR_IS_TRUE */ :
		goto __17
	case uint32(8) /* STR_IS_FALSE */ :
		goto __18
	case uint32(3) /* STR_IS_CONTROL */ :
		goto __19
	case uint32(5) /* STR_IS_DIGIT */ :
		goto __20
	case uint32(6) /* STR_IS_DOUBLE */ :
		goto __21
	case uint32(9) /* STR_IS_GRAPH */ :
		goto __22
	case uint32(10) /* STR_IS_INT */ :
		goto __23
	case uint32(7) /* STR_IS_ENTIER */ :
		goto __24
	case uint32(18) /* STR_IS_WIDE */ :
		goto __25
	case uint32(11) /* STR_IS_LIST */ :
		goto __26
	case uint32(12) /* STR_IS_LOWER */ :
		goto __27
	case uint32(13) /* STR_IS_PRINT */ :
		goto __28
	case uint32(14) /* STR_IS_PUNCT */ :
		goto __29
	case uint32(15) /* STR_IS_SPACE */ :
		goto __30
	case uint32(17) /* STR_IS_UPPER */ :
		goto __31
	case uint32(19) /* STR_IS_WORD */ :
		goto __32
	case uint32(20) /* STR_IS_XDIGIT */ :
		goto __33
	}
	goto __12
__13:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsAlnum}))
	goto __12
__14:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsAlpha}))
	goto __12
__15:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{sUniCharIsAscii}))
	goto __12
__16:
__17:
__18:
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclBooleanType)) &&
		TCL_OK != XTclSetBooleanFromAny(tls, uintptr(0), objPtr)) {
		goto __34
	}
	if !(strict != 0) {
		goto __36
	}
	result = 0
	goto __37
__36:
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 8)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+8)
	}()
	result = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 8)) == 0)
__37:
	;
	goto __35
__34:
	if !(*(*int32)(unsafe.Pointer(bp)) == 16 && *(*int32)(unsafe.Pointer(objPtr + 32)) == 0 ||
		*(*int32)(unsafe.Pointer(bp)) == 8 && *(*int32)(unsafe.Pointer(objPtr + 32)) != 0) {
		goto __38
	}
	result = 0
__38:
	;
__35:
	;
	goto __12
__19:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsControl}))
	goto __12
__20:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsDigit}))
	goto __12
__21:
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) || (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) || (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) || (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType))) {
		goto __39
	}
	goto __12
__39:
	;
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 8)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+8)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 8)) == 0) {
		goto __40
	}
	if !(strict != 0) {
		goto __41
	}
	result = 0
__41:
	;
	goto str_is_done
__40:
	;
	end = string1 + uintptr(*(*int32)(unsafe.Pointer(bp + 8)))
	if !(XTclParseNumber(tls, uintptr(0), objPtr, uintptr(0), uintptr(0), -1,
		bp+16, 0) != TCL_OK) {
		goto __42
	}
	result = 0
	failat = 0
	goto __43
__42:
	failat = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 16))) - int64(string1)) / 1)
	if !(*(*uintptr)(unsafe.Pointer(bp + 16)) < end) {
		goto __44
	}
	result = 0
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __45
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __46
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__46:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__45:
	;

__44:
	;
__43:
	;
	goto __12

__22:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsGraph}))
	goto __12
__23:
	if !(TCL_OK == func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 24)) = int32(*(*int32)(unsafe.Pointer(objPtr + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, uintptr(0), objPtr, bp+24)
	}()) {
		goto __47
	}
	goto __12
__47:
	;
	goto failedIntParse
__24:
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) || (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) || (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType))) {
		goto __48
	}
	goto __12
__48:
	;
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 8)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+8)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 8)) == 0) {
		goto __49
	}
	if !(strict != 0) {
		goto __50
	}
	result = 0
__50:
	;
	goto str_is_done
__49:
	;
	end = string1 + uintptr(*(*int32)(unsafe.Pointer(bp + 8)))
	if !(XTclParseNumber(tls, uintptr(0), objPtr, uintptr(0), uintptr(0), -1,
		bp+16, TCL_PARSE_INTEGER_ONLY) == TCL_OK) {
		goto __51
	}
	if !(*(*uintptr)(unsafe.Pointer(bp + 16)) == end) {
		goto __53
	}
	// Entire string parses as an integer.

	goto __12
	goto __54
__53:
	// Some prefix parsed as an integer, but not the whole string,
	// so return failure index as the point where parsing stopped.
	// Clear out the internal rep, since keeping it would leave
	// *objPtr in an inconsistent state.

	result = 0
	failat = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 16))) - int64(string1)) / 1)
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __55
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __56
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__56:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__55:
	;

__54:
	;
	goto __52
__51:
	// No prefix is a valid integer. Fail at beginning.

	result = 0
	failat = 0
__52:
	;
	goto __12
__25:
	if !(TCL_OK == func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = *(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(objPtr + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, uintptr(0), objPtr, bp+32)
		}()
	}()) {
		goto __57
	}
	goto __12
__57:
	;

failedIntParse:
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 8)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+8)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 8)) == 0) {
		goto __58
	}
	if !(strict != 0) {
		goto __59
	}
	result = 0
__59:
	;
	goto str_is_done
__58:
	;
	result = 0
	if !(failVarObj == uintptr(0)) {
		goto __60
	}
	// Don't bother computing the failure point if we're not going to
	// return it.

	goto __12
__60:
	;
	end = string1 + uintptr(*(*int32)(unsafe.Pointer(bp + 8)))
	if !(XTclParseNumber(tls, uintptr(0), objPtr, uintptr(0), uintptr(0), -1,
		bp+16, TCL_PARSE_INTEGER_ONLY) == TCL_OK) {
		goto __61
	}
	if !(*(*uintptr)(unsafe.Pointer(bp + 16)) == end) {
		goto __63
	}
	// Entire string parses as an integer, but rejected by
	// Tcl_Get(Wide)IntFromObj() so we must have overflowed the
	// target type, and our convention is to return failure at
	// index -1 in that situation.

	failat = -1
	goto __64
__63:
	// Some prefix parsed as an integer, but not the whole string,
	// so return failure index as the point where parsing stopped.
	// Clear out the internal rep, since keeping it would leave
	// *objPtr in an inconsistent state.

	failat = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 16))) - int64(string1)) / 1)
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __65
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __66
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__66:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__65:
	;

__64:
	;
	goto __62
__61:
	// No prefix is a valid integer. Fail at beginning.

	failat = 0
__62:
	;
	goto __12
__26:
	// We ignore the strictness here, since empty strings are always
	// well-formed lists.

	if !(TCL_OK == func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 40)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, uintptr(0), objPtr, bp+40)
	}()) {
		goto __67
	}
	goto __12
__67:
	;

	if !(failVarObj != uintptr(0)) {
		goto __68
	}

	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 8)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+8)
	}()
	end = string1 + uintptr(*(*int32)(unsafe.Pointer(bp + 8)))
	failat = -1
	p = string1
	lenRemain = *(*int32)(unsafe.Pointer(bp + 8 /* length1 */))
__69:
	if !(lenRemain > 0) {
		goto __71
	}
	if !(TCL_ERROR == XTclFindElement(tls, uintptr(0), p, lenRemain,
		bp+48, bp+56, bp+64, uintptr(0))) {
		goto __72
	}

	// This is the simplest way of getting the number of
	// characters parsed. Note that this is not the same as
	// the number of bytes when parsing strings with non-ASCII
	// characters in them.
	//
	// Skip leading spaces first. This is only really an issue
	// if it is the first "element" that has the failure.

__73:
	if !(func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0) {
		goto __74
	}
	p++
	goto __73
__74:
	;
__75:
	;
__78:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __81
	}
	XTclAllocateFreeObjects(tls)
__81:
	;
	tmpStr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __79
__79:
	if 0 != 0 {
		goto __78
	}
	goto __80
__80:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpStr)).FrefCount = 0
	if !((int64(p)-int64(string1))/1 == int64(0)) {
		goto __82
	}
	(*Tcl_Obj)(unsafe.Pointer(tmpStr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(tmpStr)).Flength = 0
	goto __83
__82:
	(*Tcl_Obj)(unsafe.Pointer(tmpStr)).Fbytes = XTcl_Alloc(tls, uint32((int64(p)-int64(string1))/1+int64(1)))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpStr)).Fbytes, string1, uint64((int64(p)-int64(string1))/1))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpStr)).Fbytes + uintptr((int64(p)-int64(string1))/1))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(tmpStr)).Flength = int32((int64(p) - int64(string1)) / 1)
__83:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpStr)).FtypePtr = uintptr(0)

	goto __76
__76:
	if 0 != 0 {
		goto __75
	}
	goto __77
__77:
	;
	failat = XTcl_GetCharLength(tls, tmpStr)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpStr)).FrefCount, 1) > 1) {
		goto __84
	}
	goto __85
__84:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpStr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpStr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __86
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpStr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpStr)).Fbytes != XtclEmptyStringRep) {
		goto __88
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpStr)).Fbytes)
__88:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpStr)).Flength = -1
__89:
	;
	*(*uintptr)(unsafe.Pointer(tmpStr + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpStr
	goto __90
__90:
	if 0 != 0 {
		goto __89
	}
	goto __91
__91:
	;
	goto __87
__86:
	XTclFreeObj(tls, tmpStr)
__87:
	;
__85:
	;

	goto __71
__72:
	;
	goto __70
__70:
	p = *(*uintptr)(unsafe.Pointer(bp + 56 /* nextElem */))
	lenRemain = int32((int64(end) - int64(*(*uintptr)(unsafe.Pointer(bp + 56)))) / 1)
	goto __69
	goto __71
__71:
	;
__68:
	;
	result = 0
	goto __12
__27:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsLower}))
	goto __12
__28:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsPrint}))
	goto __12
__29:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsPunct}))
	goto __12
__30:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsSpace}))
	goto __12
__31:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsUpper}))
	goto __12
__32:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{XTcl_UniCharIsWordChar}))
	goto __12
__33:
	chcomp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{sUniCharIsHexDigit}))
	goto __12
__12:
	;

	if !(chcomp != uintptr(0)) {
		goto __92
	}
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 8)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+8)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 8)) == 0) {
		goto __93
	}
	if !(strict != 0) {
		goto __94
	}
	result = 0
__94:
	;
	goto str_is_done
__93:
	;
	end = string1 + uintptr(*(*int32)(unsafe.Pointer(bp + 8)))
__95:
	if !(string1 < end) {
		goto __97
	}

	*(*int32)(unsafe.Pointer(bp + 40 /* length2 */)) = XTclUtfToUCS4(tls, string1, bp+68)
	if !!((*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{chcomp})).f(tls, *(*int32)(unsafe.Pointer(bp + 68))) != 0) {
		goto __98
	}
	result = 0
	goto __97
__98:
	;
	goto __96
__96:
	string1 += uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* length2 */)))
	failat++
	goto __95
	goto __97
__97:
	;
__92:
	;

	// Only set the failVarObj when we will return 0 and we have indicated a
	// valid fail index (>= 0).

str_is_done:
	if !(result == 0 && failVarObj != uintptr(0) && XTcl_ObjSetVar2(tls, interp, failVarObj, uintptr(0), XTcl_NewIntObj(tls, failat),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __99
	}
	return TCL_ERROR
__99:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(result != 0)))
	return TCL_OK
}

var isClasses = [22]uintptr{
	ts + 1768, ts + 1774, ts + 1780, ts + 16703,
	ts + 4126, ts + 1798, ts + 6155, ts + 6162,
	ts + 16711, ts + 1804, ts + 6261, ts + 3395,
	ts + 1810, ts + 1816, ts + 1822, ts + 1207,
	ts + 16717, ts + 1828, ts + 16722, ts + 16734,
	ts + 1834, uintptr(0),
} /* tclCmdMZ.c:1456:23 */
var isOptions = [3]uintptr{
	ts + 10548, ts + 16743, uintptr(0),
} /* tclCmdMZ.c:1472:23 */

func sUniCharIsAscii(tls *libc.TLS, character int32) int32 { /* tclCmdMZ.c:1807:1: */
	return libc.Bool32(character >= 0 && character < 0x80)
}

func sUniCharIsHexDigit(tls *libc.TLS, character int32) int32 { /* tclCmdMZ.c:1814:1: */
	return libc.Bool32(character >= 0 && character < 0x80 && libc.Xisxdigit(tls, character) != 0)
}

//----------------------------------------------------------------------
//
// StringMapCmd --
//
//	This procedure is invoked to process the "string map" Tcl command. See
//	the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringMapCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:1839:1: */
	bp := tls.Alloc(152)
	defer tls.Free(152)

	// var length1 int32 at bp+144, 4

	// var length2 int32 at bp+96, 4

	// var mapElemc int32 at bp+100, 4

	var index int32
	var nocase int32
	var mapWithDict int32
	var copySource int32
	// var mapElemv uintptr at bp+136, 8

	var sourceObj uintptr
	var resultPtr uintptr
	var ustring1 uintptr
	var ustring2 uintptr
	var p uintptr
	var end uintptr
	var strCmpFn uintptr
	var string uintptr
	var i int32
	// var done int32 at bp+128, 4

	// var search Tcl_DictSearch at bp+104, 24

	// Special case for one map pair which avoids the extra for loop and
	// extra calls to get Unicode data. The algorithm is otherwise
	// identical to the multi-pair case. This will be >30% faster on
	// larger strings.

	// var mapLen int32 at bp+148, 4

	var mapString uintptr
	var u2lc Tcl_UniChar
	var mapStrings uintptr
	var u2lc1 uintptr
	var mapLens uintptr
	var _objPtr uintptr
	nocase = 0
	mapWithDict = 0
	copySource = 0

	if !(objc < 3 || objc > 4) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16754)
	return TCL_ERROR
__1:
	;

	if !(objc == 4) {
		goto __2
	}
	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 96)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+96)
	}()

	if !(*(*int32)(unsafe.Pointer(bp + 96)) > 1 && libc.Xstrncmp(tls, string, ts+15557, uint64(*(*int32)(unsafe.Pointer(bp + 96)))) == 0) {
		goto __3
	}
	nocase = 1
	goto __4
__3:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+16779, libc.VaList(bp, string)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+16812, ts+10473,
		string, uintptr(0)))
	return TCL_ERROR
__4:
	;
__2:
	;

	// This test is tricky, but has to be that way or you get other strange
	// inconsistencies (see test string-10.20 for illustration why!)

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclDictType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)))).Fbytes == uintptr(0)) {
		goto __5
	}

	// We know the type exactly, so all dict operations will succeed for
	// sure. This shortens this code quite a bit.

	XTcl_DictObjSize(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)), bp+100)
	if !(*(*int32)(unsafe.Pointer(bp + 100)) == 0) {
		goto __7
	}
	// Empty charMap, just return whatever string was given.

	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
	return TCL_OK
__7:
	;

	*(*int32)(unsafe.Pointer(bp + 100 /* mapElemc */)) *= 2
	mapWithDict = 1

	// Copy the dictionary out into an array; that's the easiest way to
	// adapt this code...

	*(*uintptr)(unsafe.Pointer(bp + 136 /* mapElemv */)) = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 100)))))
	XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)), bp+104, *(*uintptr)(unsafe.Pointer(bp + 136))+uintptr(0)*8,
		*(*uintptr)(unsafe.Pointer(bp + 136))+uintptr(1)*8, bp+128)
	i = 2
__8:
	if !(i < *(*int32)(unsafe.Pointer(bp + 100))) {
		goto __10
	}
	XTcl_DictObjNext(tls, bp+104, *(*uintptr)(unsafe.Pointer(bp + 136))+uintptr(i)*8, *(*uintptr)(unsafe.Pointer(bp + 136))+uintptr(i)*8+uintptr(1)*8, bp+128)
	goto __9
__9:
	i = i + 2
	goto __8
	goto __10
__10:
	;
	XTcl_DictObjDone(tls, bp+104)
	goto __6
__5:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 136)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 100)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)), bp+100, bp+136)
	}() != TCL_OK) {
		goto __11
	}
	return TCL_ERROR
__11:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 100)) == 0) {
		goto __12
	}
	// empty charMap, just return whatever string was given.

	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
	return TCL_OK
	goto __13
__12:
	if !(*(*int32)(unsafe.Pointer(bp + 100))&1 != 0) {
		goto __14
	}
	// The charMap must be an even number of key/value items.

	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, ts+16818, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+4178, ts+7949, ts+16843,
		ts+16847, uintptr(0)))
	return TCL_ERROR
__14:
	;
__13:
	;
__6:
	;

	// Take a copy of the source string object if it is the same as the map
	// string to cut out nasty sharing crashes. [Bug 1018562]

	if !(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)) == *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))) {
		goto __15
	}
	sourceObj = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
	copySource = 1
	goto __16
__15:
	sourceObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))
__16:
	;
	ustring1 = XTcl_GetUnicodeFromObj(tls, sourceObj, bp+144)
	if !(*(*int32)(unsafe.Pointer(bp + 144)) == 0) {
		goto __17
	}
	// Empty input string, just stop now.

	goto done
__17:
	;
	end = ustring1 + uintptr(*(*int32)(unsafe.Pointer(bp + 144)))*2

	strCmpFn = func() uintptr {
		if nocase != 0 {
			return *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, uint32) int32
			}{XTcl_UniCharNcasecmp}))
		}
		return *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, uint32) int32
		}{XTcl_UniCharNcmp}))
	}()

	// Force result to be Unicode

	resultPtr = XTcl_NewUnicodeObj(tls, ustring1, 0)

	if !(*(*int32)(unsafe.Pointer(bp + 100)) == 2) {
		goto __18
	}

	ustring2 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 136 /* mapElemv */)))), bp+96)
	p = ustring1
	if !(*(*int32)(unsafe.Pointer(bp + 96)) > *(*int32)(unsafe.Pointer(bp + 144)) || *(*int32)(unsafe.Pointer(bp + 96)) == 0) {
		goto __20
	}
	// Match string is either longer than input or empty.

	ustring1 = end
	goto __21
__20:
	mapString = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 136 /* mapElemv */)) + 1*8)), bp+148)
	u2lc = func() uint16 {
		if nocase != 0 {
			return XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring2))))
		}
		return uint16(0)
	}()
__22:
	if !(ustring1 < end) {
		goto __24
	}
	if !((int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring1))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring2))) || nocase != 0 && int32(XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring1))))) == int32(u2lc)) && (*(*int32)(unsafe.Pointer(bp + 96)) == 1 || (*struct {
		f func(*libc.TLS, uintptr, uintptr, uint32) int32
	})(unsafe.Pointer(&struct{ uintptr }{strCmpFn})).f(tls, ustring1, ustring2,
		uint32(*(*int32)(unsafe.Pointer(bp + 96)))) == 0)) {
		goto __25
	}
	if !(p != ustring1) {
		goto __26
	}
	XTcl_AppendUnicodeToObj(tls, resultPtr, p, int32((int64(ustring1)-int64(p))/2))
	p = ustring1 + uintptr(*(*int32)(unsafe.Pointer(bp + 96)))*2
	goto __27
__26:
	p += 2 * uintptr(*(*int32)(unsafe.Pointer(bp + 96)))
__27:
	;
	ustring1 = p - uintptr(1)*2

	XTcl_AppendUnicodeToObj(tls, resultPtr, mapString, *(*int32)(unsafe.Pointer(bp + 148 /* mapLen */)))
__25:
	;
	goto __23
__23:
	ustring1 += 2
	goto __22
	goto __24
__24:
	;
__21:
	;
	goto __19
__18:
	u2lc1 = uintptr(0)

	// Precompute pointers to the unicode string and length. This saves us
	// repeated function calls later, significantly speeding up the
	// algorithm. We only need the lowercase first char in the nocase
	// case.

	mapStrings = XTclStackAlloc(tls, interp, int32(uint64(*(*int32)(unsafe.Pointer(bp + 100))*2)*uint64(unsafe.Sizeof(uintptr(0)))))
	mapLens = XTclStackAlloc(tls, interp, int32(uint64(*(*int32)(unsafe.Pointer(bp + 100))*2)*uint64(unsafe.Sizeof(int32(0)))))
	if !(nocase != 0) {
		goto __28
	}
	u2lc1 = XTclStackAlloc(tls, interp, int32(uint64(*(*int32)(unsafe.Pointer(bp + 100)))*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
__28:
	;
	index = 0
__29:
	if !(index < *(*int32)(unsafe.Pointer(bp + 100))) {
		goto __31
	}
	*(*uintptr)(unsafe.Pointer(mapStrings + uintptr(index)*8)) = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 136 /* mapElemv */)) + uintptr(index)*8)),
		mapLens+uintptr(index)*4)
	if !(nocase != 0 && index%2 == 0) {
		goto __32
	}
	*(*Tcl_UniChar)(unsafe.Pointer(u2lc1 + uintptr(index/2)*2)) = XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(mapStrings + uintptr(index)*8))))))
__32:
	;
	goto __30
__30:
	index++
	goto __29
	goto __31
__31:
	;
	p = ustring1
__33:
	if !(ustring1 < end) {
		goto __35
	}
	index = 0
__36:
	if !(index < *(*int32)(unsafe.Pointer(bp + 100))) {
		goto __38
	}
	// Get the key string to match on.

	ustring2 = *(*uintptr)(unsafe.Pointer(mapStrings + uintptr(index)*8))
	*(*int32)(unsafe.Pointer(bp + 96 /* length2 */)) = *(*int32)(unsafe.Pointer(mapLens + uintptr(index)*4))
	if !(*(*int32)(unsafe.Pointer(bp + 96)) > 0 && (int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring1))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring2))) || nocase != 0 && int32(XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring1))))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(u2lc1 + uintptr(index/2)*2)))) && (int64(end)-int64(ustring1))/2 >= int64(*(*int32)(unsafe.Pointer(bp + 96))) && (*(*int32)(unsafe.Pointer(bp + 96)) == 1 || !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uint32) int32
	})(unsafe.Pointer(&struct{ uintptr }{strCmpFn})).f(tls, ustring2, ustring1, uint32(*(*int32)(unsafe.Pointer(bp + 96)))) != 0))) {
		goto __39
	}
	if !(p != ustring1) {
		goto __40
	}
	// Put the skipped chars onto the result first.

	XTcl_AppendUnicodeToObj(tls, resultPtr, p, int32((int64(ustring1)-int64(p))/2))
	p = ustring1 + uintptr(*(*int32)(unsafe.Pointer(bp + 96)))*2
	goto __41
__40:
	p += 2 * uintptr(*(*int32)(unsafe.Pointer(bp + 96)))
__41:
	;

	// Adjust len to be full length of matched string.

	ustring1 = p - uintptr(1)*2

	// Append the map value to the unicode string.

	XTcl_AppendUnicodeToObj(tls, resultPtr,
		*(*uintptr)(unsafe.Pointer(mapStrings + uintptr(index+1)*8)), *(*int32)(unsafe.Pointer(mapLens + uintptr(index+1)*4)))
	goto __38
__39:
	;
	goto __37
__37:
	index = index + 2
	goto __36
	goto __38
__38:
	;
	goto __34
__34:
	ustring1 += 2
	goto __33
	goto __35
__35:
	;
	if !(nocase != 0) {
		goto __42
	}
	XTclStackFree(tls, interp, u2lc1)
__42:
	;
	XTclStackFree(tls, interp, mapLens)
	XTclStackFree(tls, interp, mapStrings)
__19:
	;
	if !(p != ustring1) {
		goto __43
	}
	// Put the rest of the unmapped chars onto result.

	XTcl_AppendUnicodeToObj(tls, resultPtr, p, int32((int64(ustring1)-int64(p))/2))
__43:
	;
	XTcl_SetObjResult(tls, interp, resultPtr)
done:
	if !(mapWithDict != 0) {
		goto __44
	}
	XTclStackFree(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 136 /* mapElemv */)))
__44:
	;
	if !(copySource != 0) {
		goto __45
	}
__46:
	_objPtr = sourceObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __49
	}
	XTclFreeObj(tls, _objPtr)
__49:
	;
	goto __47
__47:
	if 0 != 0 {
		goto __46
	}
	goto __48
__48:
	;
__45:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringMatchCmd --
//
//	This procedure is invoked to process the "string match" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringMatchCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2109:1: */
	bp := tls.Alloc(60)
	defer tls.Free(60)

	var nocase int32 = 0

	if objc < 3 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16858)
		return TCL_ERROR
	}

	if objc == 4 {
		// var length int32 at bp+56, 4

		var string uintptr = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 56)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+56)
		}()

		if *(*int32)(unsafe.Pointer(bp + 56)) > 1 && libc.Xstrncmp(tls, string, ts+15557, uint64(*(*int32)(unsafe.Pointer(bp + 56)))) == 0 {
			nocase = int32(1) << 0
		} else {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+16779, libc.VaList(bp, string)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+16812, ts+10473,
				string, uintptr(0)))
			return TCL_ERROR
		}
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(XTclStringMatchObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8)), nocase) != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringRangeCmd --
//
//	This procedure is invoked to process the "string range" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringRangeCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2161:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var length int32
	// var first int32 at bp, 4

	// var last int32 at bp+4, 4

	if objc != 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16883)
		return TCL_ERROR
	}

	// Get the length in actual characters; Then reduce it by one because
	// 'end' refers to the last character, not one past it.

	length = XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))) - 1

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), length, bp)
	}() != TCL_OK || func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), length, bp+4)
	}() != TCL_OK {
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp)) < 0 {
		*(*int32)(unsafe.Pointer(bp /* first */)) = 0
	}
	if *(*int32)(unsafe.Pointer(bp + 4)) >= length {
		*(*int32)(unsafe.Pointer(bp + 4 /* last */)) = length
	}
	if *(*int32)(unsafe.Pointer(bp + 4)) >= *(*int32)(unsafe.Pointer(bp)) {
		XTcl_SetObjResult(tls, interp, XTcl_GetRange(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*int32)(unsafe.Pointer(bp /* first */)), *(*int32)(unsafe.Pointer(bp + 4 /* last */))))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringReptCmd --
//
//	This procedure is invoked to process the "string repeat" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringReptCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2217:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var string1 uintptr
	var string2 uintptr
	// var count int32 at bp+64, 4

	var index int32
	// var length1 int32 at bp+68, 4

	var length2 int32
	var resultPtr uintptr

	if !(objc != 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16901)
	return TCL_ERROR
__1:
	;

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 64)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+64)
	}() != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	// Check for cases that allow us to skip copying stuff.

	if !(*(*int32)(unsafe.Pointer(bp + 64)) == 1) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	goto done
	goto __4
__3:
	if !(*(*int32)(unsafe.Pointer(bp + 64)) < 1) {
		goto __5
	}
	goto done
__5:
	;
__4:
	;
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 68)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+68)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 68)) <= 0) {
		goto __6
	}
	goto done
__6:
	;

	// Only build up a string that has data. Instead of building it up with
	// repeated appends, we just allocate the necessary space once and copy
	// the string value in.
	//
	// We have to worry about overflow [Bugs 714106, 2561746].
	// At this point we know 1 <= length1 <= INT_MAX and 2 <= count <= INT_MAX.
	// We need to keep 2 <= length2 <= INT_MAX.

	if !(*(*int32)(unsafe.Pointer(bp + 64)) > 0x7fffffff / *(*int32)(unsafe.Pointer(bp + 68))) {
		goto __7
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+16914,
		libc.VaList(bp, 0x7fffffff)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+15098, uintptr(0)))
	return TCL_ERROR
__7:
	;
	length2 = *(*int32)(unsafe.Pointer(bp + 68)) * *(*int32)(unsafe.Pointer(bp + 64))

	// Include space for the NUL.

	string2 = XTclpAlloc(tls, uint32(length2+1))
	if !(string2 == uintptr(0)) {
		goto __8
	}
	// Alloc failed. Note that in this case we try to do an error message
	// since this is a case that's most likely when the alloc is large and
	// that's easy to do with this API. Note that if we fail allocating a
	// short string, this will likely keel over too (and fatally).

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+16965,
		libc.VaList(bp+32, length2+1)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+15098, uintptr(0)))
	return TCL_ERROR
__8:
	;
	index = 0
__9:
	if !(index < *(*int32)(unsafe.Pointer(bp + 64))) {
		goto __11
	}
	libc.Xmemcpy(tls, string2+uintptr(*(*int32)(unsafe.Pointer(bp + 68))*index), string1, uint64(*(*int32)(unsafe.Pointer(bp + 68 /* length1 */))))
	goto __10
__10:
	index++
	goto __9
	goto __11
__11:
	;
	*(*int8)(unsafe.Pointer(string2 + uintptr(length2))) = int8(0)

	// We have to directly assign this instead of using Tcl_SetStringObj (and
	// indirectly TclInitStringRep) because that makes another copy of the
	// data.

__12:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __15
	}
	XTclAllocateFreeObjects(tls)
__15:
	;
	resultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = string2
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = length2
	XTcl_SetObjResult(tls, interp, resultPtr)

done:
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringRplcCmd --
//
//	This procedure is invoked to process the "string replace" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringRplcCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2329:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var ustring uintptr
	// var first int32 at bp+4, 4

	// var last int32 at bp+8, 4

	// var length int32 at bp, 4

	var end int32

	if objc < 4 || objc > 5 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17021)
		return TCL_ERROR
	}

	ustring = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	end = *(*int32)(unsafe.Pointer(bp)) - 1

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), end, bp+4)
	}() != TCL_OK || func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), end, bp+8)
	}() != TCL_OK {
		return TCL_ERROR
	}

	// The following test screens out most empty substrings as
	// candidates for replacement. When they are detected, no
	// replacement is done, and the result is the original string,
	if *(*int32)(unsafe.Pointer(bp + 8)) < 0 || *(*int32)(unsafe.Pointer(bp + 4)) > end || *(*int32)(unsafe.Pointer(bp + 8)) < *(*int32)(unsafe.Pointer(bp + 4)) { // Range begins after it starts

		// BUT!!! when (end < 0) -- an empty original string -- we can
		// have (first <= end < 0 <= last) and an empty string is permitted
		// to be replaced.
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	} else {
		var resultPtr uintptr

		// We are re-fetching in case the string argument is same value as
		// an index argument, and shimmering cost us our ustring.

		ustring = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
		end = *(*int32)(unsafe.Pointer(bp)) - 1

		if *(*int32)(unsafe.Pointer(bp + 4)) < 0 {
			*(*int32)(unsafe.Pointer(bp + 4 /* first */)) = 0
		}

		resultPtr = XTcl_NewUnicodeObj(tls, ustring, *(*int32)(unsafe.Pointer(bp + 4 /* first */)))
		if objc == 5 {
			XTcl_AppendObjToObj(tls, resultPtr, *(*uintptr)(unsafe.Pointer(objv + 4*8)))
		}
		if *(*int32)(unsafe.Pointer(bp + 8)) < end {
			XTcl_AppendUnicodeToObj(tls, resultPtr, ustring+uintptr(*(*int32)(unsafe.Pointer(bp + 8)))*2+uintptr(1)*2,
				end-*(*int32)(unsafe.Pointer(bp + 8)))
		}
		XTcl_SetObjResult(tls, interp, resultPtr)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringRevCmd --
//
//	This procedure is invoked to process the "string reverse" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringRevCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2413:1: */
	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17048)
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTclStringReverse(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringStartCmd --
//
//	This procedure is invoked to process the "string wordstart" Tcl
//	command. See the user documentation for details on what it does. Note
//	that this command only functions correctly on properly formed Tcl UTF
//	strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringStartCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2448:1: */
	bp := tls.Alloc(10)
	defer tls.Free(10)

	*(*Tcl_UniChar)(unsafe.Pointer(bp + 8 /* ch */)) = Tcl_UniChar(0)
	var p uintptr
	var string uintptr
	var cur int32
	// var index int32 at bp+4, 4

	// var length int32 at bp, 4

	var numChars int32

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17055)
		return TCL_ERROR
	}

	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()
	numChars = XTcl_NumUtfChars(tls, string, *(*int32)(unsafe.Pointer(bp /* length */)))
	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), numChars-1, bp+4)
	}() != TCL_OK {
		return TCL_ERROR
	}
	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()
	if *(*int32)(unsafe.Pointer(bp + 4)) >= numChars {
		*(*int32)(unsafe.Pointer(bp + 4 /* index */)) = numChars - 1
	}
	cur = 0
	if *(*int32)(unsafe.Pointer(bp + 4)) > 0 {
		p = XTcl_UtfAtIndex(tls, string, *(*int32)(unsafe.Pointer(bp + 4 /* index */)))

		if int32(uint8(*(*int8)(unsafe.Pointer(p)))) < 0x80 {
			*(*Tcl_UniChar)(unsafe.Pointer(bp + 8)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(p))))
		} else {
			XTcl_UtfToUniChar(tls, p, bp+8)
		}
		for cur = *(*int32)(unsafe.Pointer(bp + 4 /* index */)); cur >= 0; cur-- {
			var delta int32 = 0
			var next uintptr

			if !(XTcl_UniCharIsWordChar(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 8)))) != 0) {
				break
			}

			next = func() uintptr {
				if p < string+uintptr(2) {
					return string
				}
				return func() uintptr {
					if int32(uint8(*(*int8)(unsafe.Pointer(p - uintptr(1))))) < 0x80 {
						return p - uintptr(1)
					}
					return XTcl_UtfPrev(tls, p, string)
				}()
			}()
			for ok := true; ok; ok = next+uintptr(delta) < p {
				next += uintptr(delta)
				delta = func() int32 {
					if int32(uint8(*(*int8)(unsafe.Pointer(next)))) < 0x80 {
						return func() int32 {
							*(*Tcl_UniChar)(unsafe.Pointer(bp + 8)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(next))))
							return 1
						}()
					}
					return XTcl_UtfToUniChar(tls, next, bp+8)
				}()
			}
			p = next
		}
		if cur != *(*int32)(unsafe.Pointer(bp + 4)) {
			cur = cur + 1
		}
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, cur))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringEndCmd --
//
//	This procedure is invoked to process the "string wordend" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringEndCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2519:1: */
	bp := tls.Alloc(10)
	defer tls.Free(10)

	*(*Tcl_UniChar)(unsafe.Pointer(bp + 8 /* ch */)) = Tcl_UniChar(0)
	var p uintptr
	var end uintptr
	var string uintptr
	var cur int32
	// var index int32 at bp+4, 4

	// var length int32 at bp, 4

	var numChars int32

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17055)
		return TCL_ERROR
	}

	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()
	numChars = XTcl_NumUtfChars(tls, string, *(*int32)(unsafe.Pointer(bp /* length */)))
	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), numChars-1, bp+4)
	}() != TCL_OK {
		return TCL_ERROR
	}
	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()
	if *(*int32)(unsafe.Pointer(bp + 4)) < 0 {
		*(*int32)(unsafe.Pointer(bp + 4 /* index */)) = 0
	}
	if *(*int32)(unsafe.Pointer(bp + 4)) < numChars {
		p = XTcl_UtfAtIndex(tls, string, *(*int32)(unsafe.Pointer(bp + 4 /* index */)))
		end = string + uintptr(*(*int32)(unsafe.Pointer(bp)))
		for cur = *(*int32)(unsafe.Pointer(bp + 4 /* index */)); p < end; cur++ {
			p += func() uintptr {
				if int32(uint8(*(*int8)(unsafe.Pointer(p)))) < 0x80 {
					return uintptr(func() int32 {
						*(*Tcl_UniChar)(unsafe.Pointer(bp + 8)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(p))))
						return 1
					}())
				}
				return uintptr(XTcl_UtfToUniChar(tls, p, bp+8))
			}()
			if !(XTcl_UniCharIsWordChar(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 8)))) != 0) {
				break
			}
		}
		if cur == *(*int32)(unsafe.Pointer(bp + 4)) {
			cur++
		}
	} else {
		cur = numChars
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, cur))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringEqualCmd --
//
//	This procedure is invoked to process the "string equal" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringEqualCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2581:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	// Remember to keep code here in some sync with the byte-compiled versions
	// in tclExecute.c (INST_STR_EQ, INST_STR_NEQ and INST_STR_CMP as well as
	// the expr string comparison in INST_EQ/INST_NEQ/INST_LT/...).

	var string2 uintptr
	// var length2 int32 at bp+56, 4

	var i int32
	var match int32
	var nocase int32
	// var reqlength int32 at bp+60, 4
	nocase = 0
	*(*int32)(unsafe.Pointer(bp + 60 /* reqlength */)) = -1

	if !(objc < 3 || objc > 6) {
		goto __1
	}
str_cmp_args:
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+17068)
	return TCL_ERROR
__1:
	;

	i = 1
__2:
	if !(i < objc-2) {
		goto __4
	}
	string2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 56)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+56)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 56)) > 1 && !(libc.Xstrncmp(tls, string2, ts+15557, uint64(*(*int32)(unsafe.Pointer(bp + 56)))) != 0)) {
		goto __5
	}
	nocase = 1
	goto __6
__5:
	if !(*(*int32)(unsafe.Pointer(bp + 56)) > 1 &&
		!(libc.Xstrncmp(tls, string2, ts+17108, uint64(*(*int32)(unsafe.Pointer(bp + 56)))) != 0)) {
		goto __7
	}
	if !(i+1 >= objc-2) {
		goto __9
	}
	goto str_cmp_args
__9:
	;
	i++
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 60)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+60)
	}() != TCL_OK) {
		goto __10
	}
	return TCL_ERROR
__10:
	;
	goto __8
__7:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+17116,
		libc.VaList(bp, string2)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+16812, ts+10473,
		string2, uintptr(0)))
	return TCL_ERROR
__8:
	;
__6:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;

	// From now on, we only access the two objects at the end of the argument
	// array.

	objv += 8 * uintptr(objc-2)
	match = XTclStringCmp(tls, *(*uintptr)(unsafe.Pointer(objv)), *(*uintptr)(unsafe.Pointer(objv + 1*8)), 0, nocase, *(*int32)(unsafe.Pointer(bp + 60 /* reqlength */)))
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(func() int32 {
		if match != 0 {
			return 0
		}
		return 1
	}() != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringCmpCmd --
//
//	This procedure is invoked to process the "string compare" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringCmpCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2656:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// Remember to keep code here in some sync with the byte-compiled versions
	// in tclExecute.c (INST_STR_EQ, INST_STR_NEQ and INST_STR_CMP as well as
	// the expr string comparison in INST_EQ/INST_NEQ/INST_LT/...).

	var match int32
	// var nocase int32 at bp, 4

	// var reqlength int32 at bp+4, 4

	var status int32

	status = XTclStringCmpOpts(tls, interp, objc, objv, bp, bp+4)
	if status != TCL_OK {
		return status
	}

	objv += 8 * uintptr(objc-2)
	match = XTclStringCmp(tls, *(*uintptr)(unsafe.Pointer(objv)), *(*uintptr)(unsafe.Pointer(objv + 1*8)), 0, *(*int32)(unsafe.Pointer(bp /* nocase */)), *(*int32)(unsafe.Pointer(bp + 4 /* reqlength */)))
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, match))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclStringCmp --
//
//	This is the core of Tcl's string comparison. It only handles byte
//	arrays, UNICODE strings and UTF-8 strings correctly.
//
// Results:
//	-1 if value1Ptr is less than value2Ptr, 0 if they are equal, or 1 if
//	value1Ptr is greater.
//
// Side effects:
//	May cause string representations of objects to be allocated.
//
//----------------------------------------------------------------------

func XTclStringCmp(tls *libc.TLS, value1Ptr uintptr, value2Ptr uintptr, checkEq int32, nocase int32, reqlength int32) int32 { /* tclCmdMZ.c:2700:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var s1 uintptr
	var s2 uintptr
	var empty int32
	var length int32
	var match int32
	// var s1len int32 at bp, 4

	// var s2len int32 at bp+4, 4

	var memCmpFn MemCmpFn_t

	if reqlength == 0 || value1Ptr == value2Ptr {
		// Always match at 0 chars or if it is the same obj.
		return 0
	}

	if !(nocase != 0) && ((*Tcl_Obj)(unsafe.Pointer(value1Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Fbytes == uintptr(0)) &&
		((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes == uintptr(0)) {
		// Use binary versions of comparisons since that won't cause undue
		// type conversions and it is much faster. Only do this if we're
		// case-sensitive (which is all that really makes sense with byte
		// arrays anyway, and we have no memcasecmp() for some reason... :^)

		s1 = XTcl_GetByteArrayFromObj(tls, value1Ptr, bp)
		s2 = XTcl_GetByteArrayFromObj(tls, value2Ptr, bp+4)
		memCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, Size_t) int32
		}{libc.Xmemcmp}))
	} else if (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclStringType)) &&
		(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclStringType)) {
		// Do a unicode-specific comparison if both of the args are of String
		// type. If the char length == byte length, we can do a memcmp. In
		// benchmark testing this proved the most efficient check between the
		// unicode and string comparison operations.

		if nocase != 0 {
			s1 = XTcl_GetUnicodeFromObj(tls, value1Ptr, bp)
			s2 = XTcl_GetUnicodeFromObj(tls, value2Ptr, bp+4)
			memCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, uint32) int32
			}{XTcl_UniCharNcasecmp}))
		} else {
			*(*int32)(unsafe.Pointer(bp /* s1len */)) = XTcl_GetCharLength(tls, value1Ptr)
			*(*int32)(unsafe.Pointer(bp + 4 /* s2len */)) = XTcl_GetCharLength(tls, value2Ptr)
			if *(*int32)(unsafe.Pointer(bp)) == (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Flength &&
				(*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Fbytes != uintptr(0) &&
				*(*int32)(unsafe.Pointer(bp + 4)) == (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength &&
				(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != uintptr(0) {
				s1 = (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Fbytes
				s2 = (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes
				memCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, uintptr, uintptr, Size_t) int32
				}{libc.Xmemcmp}))
			} else {
				s1 = XTcl_GetUnicode(tls, value1Ptr)
				s2 = XTcl_GetUnicode(tls, value2Ptr)
				if checkEq != 0 {
					memCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
						f func(*libc.TLS, uintptr, uintptr, Size_t) int32
					}{libc.Xmemcmp}))
					*(*int32)(unsafe.Pointer(bp /* s1len */)) *= int32(uint64(unsafe.Sizeof(Tcl_UniChar(0))))
					*(*int32)(unsafe.Pointer(bp + 4 /* s2len */)) *= int32(uint64(unsafe.Sizeof(Tcl_UniChar(0))))
				} else {
					memCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
						f func(*libc.TLS, uintptr, uintptr, uint32) int32
					}{XTcl_UniCharNcmp}))
				}
			}
		}
	} else {
		// Get the string representations, being careful in case we have
		// special empty string objects about.

		empty = XTclCheckEmptyString(tls, value1Ptr)
		if empty > 0 {
			switch XTclCheckEmptyString(tls, value2Ptr) {
			case -1:
				s1 = ts + 2631 /* "" */
				*(*int32)(unsafe.Pointer(bp /* s1len */)) = 0
				s2 = func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 {
						return func() uintptr {
							*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength
							return (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes
						}()
					}
					return XTcl_GetStringFromObj(tls, value2Ptr, bp+4)
				}()
				break
				fallthrough
			case 0:
				return -1
				fallthrough
			default: // avoid warn: `s2` may be used uninitialized
				return 0
			}
		} else if XTclCheckEmptyString(tls, value2Ptr) > 0 {
			switch empty {
			case -1:
				s2 = ts + 2631 /* "" */
				*(*int32)(unsafe.Pointer(bp + 4 /* s2len */)) = 0
				s1 = func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Fbytes != 0 {
						return func() uintptr {
							*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Flength
							return (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Fbytes
						}()
					}
					return XTcl_GetStringFromObj(tls, value1Ptr, bp)
				}()
				break
				fallthrough
			case 0:
				return 1
				fallthrough
			default: // avoid warn: `s1` may be used uninitialized
				return 0
			}
		} else {
			s1 = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Fbytes != 0 {
					return func() uintptr {
						*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Flength
						return (*Tcl_Obj)(unsafe.Pointer(value1Ptr)).Fbytes
					}()
				}
				return XTcl_GetStringFromObj(tls, value1Ptr, bp)
			}()
			s2 = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 {
					return func() uintptr {
						*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength
						return (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes
					}()
				}
				return XTcl_GetStringFromObj(tls, value2Ptr, bp+4)
			}()
		}

		if !(nocase != 0) && checkEq != 0 {
			// When we have equal-length we can check only for (in)equality.
			// We can use memcmp() in all (n)eq cases because we don't need to
			// worry about lexical LE/BE variance.
			memCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, Size_t) int32
			}{libc.Xmemcmp}))
		} else {
			// As a catch-all we will work with UTF-8. We cannot use memcmp()
			// as that is unsafe with any string containing NUL (\xC0\x80 in
			// Tcl's utf rep). We can use the more efficient TclpUtfNcmp2 if
			// we are case-sensitive and no specific length was requested.

			if reqlength < 0 && !(nocase != 0) {
				memCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, uintptr, uintptr, uint32) int32
				}{XTclpUtfNcmp2}))
			} else {
				*(*int32)(unsafe.Pointer(bp /* s1len */)) = XTcl_NumUtfChars(tls, s1, *(*int32)(unsafe.Pointer(bp /* s1len */)))
				*(*int32)(unsafe.Pointer(bp + 4 /* s2len */)) = XTcl_NumUtfChars(tls, s2, *(*int32)(unsafe.Pointer(bp + 4 /* s2len */)))
				memCmpFn = func() uintptr {
					if nocase != 0 {
						return *(*uintptr)(unsafe.Pointer(&struct {
							f func(*libc.TLS, uintptr, uintptr, uint32) int32
						}{XTcl_UtfNcasecmp}))
					}
					return *(*uintptr)(unsafe.Pointer(&struct {
						f func(*libc.TLS, uintptr, uintptr, uint32) int32
					}{XTcl_UtfNcmp}))
				}()
			}
		}
	}

	if *(*int32)(unsafe.Pointer(bp)) < *(*int32)(unsafe.Pointer(bp + 4)) {
		length = *(*int32)(unsafe.Pointer(bp /* s1len */))
	} else {
		length = *(*int32)(unsafe.Pointer(bp + 4 /* s2len */))
	}
	if reqlength > 0 && reqlength < length {
		length = reqlength
	} else if reqlength < 0 {
		// The requested length is negative, so we ignore it by setting it to
		// length + 1 so we correct the match var.

		reqlength = length + 1
	}

	if checkEq != 0 && *(*int32)(unsafe.Pointer(bp)) != *(*int32)(unsafe.Pointer(bp + 4)) {
		match = 1 // This will be reversed below.
	} else {
		// The comparison function should compare up to the minimum byte
		// length only.
		match = (*struct {
			f func(*libc.TLS, uintptr, uintptr, Size_t) int32
		})(unsafe.Pointer(&struct{ uintptr }{memCmpFn})).f(tls, s1, s2, uint64(length))
	}
	if match == 0 && reqlength > length {
		match = *(*int32)(unsafe.Pointer(bp)) - *(*int32)(unsafe.Pointer(bp + 4))
	}
	if match > 0 {
		return 1
	}
	if match < 0 {
		return -1
	}
	return 0
}

func XTclStringCmpOpts(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, nocase uintptr, reqlength uintptr) int32 { /* tclCmdMZ.c:2861:5: */
	bp := tls.Alloc(60)
	defer tls.Free(60)

	var i int32
	// var length int32 at bp+56, 4

	var string uintptr

	*(*int32)(unsafe.Pointer(reqlength)) = -1
	*(*int32)(unsafe.Pointer(nocase)) = 0
	if !(objc < 3 || objc > 6) {
		goto __1
	}
str_cmp_args:
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+17068)
	return TCL_ERROR
__1:
	;

	i = 1
__2:
	if !(i < objc-2) {
		goto __4
	}
	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 56)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+56)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 56)) > 1 && !(libc.Xstrncmp(tls, string, ts+15557, uint64(*(*int32)(unsafe.Pointer(bp + 56)))) != 0)) {
		goto __5
	}
	*(*int32)(unsafe.Pointer(nocase)) = 1
	goto __6
__5:
	if !(*(*int32)(unsafe.Pointer(bp + 56)) > 1 &&
		!(libc.Xstrncmp(tls, string, ts+17108, uint64(*(*int32)(unsafe.Pointer(bp + 56)))) != 0)) {
		goto __7
	}
	if !(i+1 >= objc-2) {
		goto __9
	}
	goto str_cmp_args
__9:
	;
	i++
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(reqlength)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), reqlength)
	}() != TCL_OK) {
		goto __10
	}
	return TCL_ERROR
__10:
	;
	goto __8
__7:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+17116,
		libc.VaList(bp, string)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+16812, ts+10473,
		string, uintptr(0)))
	return TCL_ERROR
__8:
	;
__6:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringCatCmd --
//
//	This procedure is invoked to process the "string cat" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringCatCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2923:1: */
	var i int32
	var objResultPtr uintptr

	if objc < 2 {
		// If there are no args, the result is an empty object.
		// Just leave the preset empty interp result.
		return TCL_OK
	}
	if objc == 2 {
		// Other trivial case, single arg, just return it.
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		return TCL_OK
	}
	objResultPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount > 1 {
		objResultPtr = XTcl_DuplicateObj(tls, objResultPtr)
	}
	for i = 2; i < objc; i++ {
		XTcl_AppendObjToObj(tls, objResultPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}
	XTcl_SetObjResult(tls, interp, objResultPtr)

	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringBytesCmd --
//
//	This procedure is invoked to process the "string bytelength" Tcl
//	command. See the user documentation for details on what it does. Note
//	that this command only functions correctly on properly formed Tcl UTF
//	strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringBytesCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:2978:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var length int32 at bp, 4

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17048)
		return TCL_ERROR
	}

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
		*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
		_ = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
	} else {
		XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp /* length */))))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringLenCmd --
//
//	This procedure is invoked to process the "string length" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringLenCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3015:1: */
	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17048)
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringLowerCmd --
//
//	This procedure is invoked to process the "string tolower" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringLowerCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3049:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var length1 int32 at bp, 4

	var length2 int32
	var string1 uintptr
	var string2 uintptr

	if objc < 2 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17160)
		return TCL_ERROR
	}

	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()

	if objc == 2 {
		var resultPtr uintptr = XTcl_NewStringObj(tls, string1, *(*int32)(unsafe.Pointer(bp /* length1 */)))

		*(*int32)(unsafe.Pointer(bp /* length1 */)) = XTcl_UtfToLower(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
			}
			return XTcl_GetString(tls, resultPtr)
		}())
		XTcl_SetObjLength(tls, resultPtr, *(*int32)(unsafe.Pointer(bp /* length1 */)))
		XTcl_SetObjResult(tls, interp, resultPtr)
	} else {
		// var first int32 at bp+4, 4

		// var last int32 at bp+8, 4

		var start uintptr
		var end uintptr
		var resultPtr uintptr

		*(*int32)(unsafe.Pointer(bp /* length1 */)) = XTcl_NumUtfChars(tls, string1, *(*int32)(unsafe.Pointer(bp))) - 1
		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp)), bp+4)
		}() != TCL_OK {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 4)) < 0 {
			*(*int32)(unsafe.Pointer(bp + 4 /* first */)) = 0
		}
		*(*int32)(unsafe.Pointer(bp + 8 /* last */)) = *(*int32)(unsafe.Pointer(bp + 4 /* first */))

		if objc == 4 && func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), *(*int32)(unsafe.Pointer(bp)), bp+8)
		}() != TCL_OK {
			return TCL_ERROR
		}

		if *(*int32)(unsafe.Pointer(bp + 8)) >= *(*int32)(unsafe.Pointer(bp)) {
			*(*int32)(unsafe.Pointer(bp + 8 /* last */)) = *(*int32)(unsafe.Pointer(bp /* length1 */))
		}
		if *(*int32)(unsafe.Pointer(bp + 8)) < *(*int32)(unsafe.Pointer(bp + 4)) {
			XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			return TCL_OK
		}

		string1 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
		}()
		start = XTcl_UtfAtIndex(tls, string1, *(*int32)(unsafe.Pointer(bp + 4 /* first */)))
		end = XTcl_UtfAtIndex(tls, start, *(*int32)(unsafe.Pointer(bp + 8))-*(*int32)(unsafe.Pointer(bp + 4))+1)
		resultPtr = XTcl_NewStringObj(tls, string1, int32((int64(end)-int64(string1))/1))
		string2 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
			}
			return XTcl_GetString(tls, resultPtr)
		}() + uintptr((int64(start)-int64(string1))/1)

		length2 = XTcl_UtfToLower(tls, string2)
		XTcl_SetObjLength(tls, resultPtr, int32(int64(length2)+(int64(start)-int64(string1))/1))

		XTcl_AppendToObj(tls, resultPtr, end, -1)
		XTcl_SetObjResult(tls, interp, resultPtr)
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringUpperCmd --
//
//	This procedure is invoked to process the "string toupper" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringUpperCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3134:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var length1 int32 at bp, 4

	var length2 int32
	var string1 uintptr
	var string2 uintptr

	if objc < 2 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17160)
		return TCL_ERROR
	}

	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()

	if objc == 2 {
		var resultPtr uintptr = XTcl_NewStringObj(tls, string1, *(*int32)(unsafe.Pointer(bp /* length1 */)))

		*(*int32)(unsafe.Pointer(bp /* length1 */)) = XTcl_UtfToUpper(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
			}
			return XTcl_GetString(tls, resultPtr)
		}())
		XTcl_SetObjLength(tls, resultPtr, *(*int32)(unsafe.Pointer(bp /* length1 */)))
		XTcl_SetObjResult(tls, interp, resultPtr)
	} else {
		// var first int32 at bp+4, 4

		// var last int32 at bp+8, 4

		var start uintptr
		var end uintptr
		var resultPtr uintptr

		*(*int32)(unsafe.Pointer(bp /* length1 */)) = XTcl_NumUtfChars(tls, string1, *(*int32)(unsafe.Pointer(bp))) - 1
		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp)), bp+4)
		}() != TCL_OK {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 4)) < 0 {
			*(*int32)(unsafe.Pointer(bp + 4 /* first */)) = 0
		}
		*(*int32)(unsafe.Pointer(bp + 8 /* last */)) = *(*int32)(unsafe.Pointer(bp + 4 /* first */))

		if objc == 4 && func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), *(*int32)(unsafe.Pointer(bp)), bp+8)
		}() != TCL_OK {
			return TCL_ERROR
		}

		if *(*int32)(unsafe.Pointer(bp + 8)) >= *(*int32)(unsafe.Pointer(bp)) {
			*(*int32)(unsafe.Pointer(bp + 8 /* last */)) = *(*int32)(unsafe.Pointer(bp /* length1 */))
		}
		if *(*int32)(unsafe.Pointer(bp + 8)) < *(*int32)(unsafe.Pointer(bp + 4)) {
			XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			return TCL_OK
		}

		string1 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
		}()
		start = XTcl_UtfAtIndex(tls, string1, *(*int32)(unsafe.Pointer(bp + 4 /* first */)))
		end = XTcl_UtfAtIndex(tls, start, *(*int32)(unsafe.Pointer(bp + 8))-*(*int32)(unsafe.Pointer(bp + 4))+1)
		resultPtr = XTcl_NewStringObj(tls, string1, int32((int64(end)-int64(string1))/1))
		string2 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
			}
			return XTcl_GetString(tls, resultPtr)
		}() + uintptr((int64(start)-int64(string1))/1)

		length2 = XTcl_UtfToUpper(tls, string2)
		XTcl_SetObjLength(tls, resultPtr, int32(int64(length2)+(int64(start)-int64(string1))/1))

		XTcl_AppendToObj(tls, resultPtr, end, -1)
		XTcl_SetObjResult(tls, interp, resultPtr)
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringTitleCmd --
//
//	This procedure is invoked to process the "string totitle" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringTitleCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3219:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var length1 int32 at bp, 4

	var length2 int32
	var string1 uintptr
	var string2 uintptr

	if objc < 2 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17160)
		return TCL_ERROR
	}

	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()

	if objc == 2 {
		var resultPtr uintptr = XTcl_NewStringObj(tls, string1, *(*int32)(unsafe.Pointer(bp /* length1 */)))

		*(*int32)(unsafe.Pointer(bp /* length1 */)) = XTcl_UtfToTitle(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
			}
			return XTcl_GetString(tls, resultPtr)
		}())
		XTcl_SetObjLength(tls, resultPtr, *(*int32)(unsafe.Pointer(bp /* length1 */)))
		XTcl_SetObjResult(tls, interp, resultPtr)
	} else {
		// var first int32 at bp+4, 4

		// var last int32 at bp+8, 4

		var start uintptr
		var end uintptr
		var resultPtr uintptr

		*(*int32)(unsafe.Pointer(bp /* length1 */)) = XTcl_NumUtfChars(tls, string1, *(*int32)(unsafe.Pointer(bp))) - 1
		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 4)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp)), bp+4)
		}() != TCL_OK {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 4)) < 0 {
			*(*int32)(unsafe.Pointer(bp + 4 /* first */)) = 0
		}
		*(*int32)(unsafe.Pointer(bp + 8 /* last */)) = *(*int32)(unsafe.Pointer(bp + 4 /* first */))

		if objc == 4 && func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), *(*int32)(unsafe.Pointer(bp)), bp+8)
		}() != TCL_OK {
			return TCL_ERROR
		}

		if *(*int32)(unsafe.Pointer(bp + 8)) >= *(*int32)(unsafe.Pointer(bp)) {
			*(*int32)(unsafe.Pointer(bp + 8 /* last */)) = *(*int32)(unsafe.Pointer(bp /* length1 */))
		}
		if *(*int32)(unsafe.Pointer(bp + 8)) < *(*int32)(unsafe.Pointer(bp + 4)) {
			XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			return TCL_OK
		}

		string1 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
		}()
		start = XTcl_UtfAtIndex(tls, string1, *(*int32)(unsafe.Pointer(bp + 4 /* first */)))
		end = XTcl_UtfAtIndex(tls, start, *(*int32)(unsafe.Pointer(bp + 8))-*(*int32)(unsafe.Pointer(bp + 4))+1)
		resultPtr = XTcl_NewStringObj(tls, string1, int32((int64(end)-int64(string1))/1))
		string2 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
			}
			return XTcl_GetString(tls, resultPtr)
		}() + uintptr((int64(start)-int64(string1))/1)

		length2 = XTcl_UtfToTitle(tls, string2)
		XTcl_SetObjLength(tls, resultPtr, int32(int64(length2)+(int64(start)-int64(string1))/1))

		XTcl_AppendToObj(tls, resultPtr, end, -1)
		XTcl_SetObjResult(tls, interp, resultPtr)
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringTrimCmd --
//
//	This procedure is invoked to process the "string trim" Tcl command.
//	See the user documentation for details on what it does. Note that this
//	command only functions correctly on properly formed Tcl UTF strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringTrimCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3304:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var string1 uintptr
	var string2 uintptr
	var triml int32
	// var trimr int32 at bp+8, 4

	// var length1 int32 at bp+4, 4

	// var length2 int32 at bp, 4

	if objc == 3 {
		string2 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp)
		}()
	} else if objc == 2 {
		string2 = uintptr(unsafe.Pointer(&XtclDefaultTrimSet))
		*(*int32)(unsafe.Pointer(bp /* length2 */)) = int32(libc.Xstrlen(tls, uintptr(unsafe.Pointer(&XtclDefaultTrimSet))))
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17182)
		return TCL_ERROR
	}
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+4)
	}()

	triml = XTclTrim(tls, string1, *(*int32)(unsafe.Pointer(bp + 4 /* length1 */)), string2, *(*int32)(unsafe.Pointer(bp /* length2 */)), bp+8)

	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, string1+uintptr(triml), *(*int32)(unsafe.Pointer(bp + 4))-triml-*(*int32)(unsafe.Pointer(bp + 8))))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringTrimLCmd --
//
//	This procedure is invoked to process the "string trimleft" Tcl
//	command. See the user documentation for details on what it does. Note
//	that this command only functions correctly on properly formed Tcl UTF
//	strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringTrimLCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3351:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var string1 uintptr
	var string2 uintptr
	var trim int32
	// var length1 int32 at bp+4, 4

	// var length2 int32 at bp, 4

	if objc == 3 {
		string2 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp)
		}()
	} else if objc == 2 {
		string2 = uintptr(unsafe.Pointer(&XtclDefaultTrimSet))
		*(*int32)(unsafe.Pointer(bp /* length2 */)) = int32(libc.Xstrlen(tls, uintptr(unsafe.Pointer(&XtclDefaultTrimSet))))
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17182)
		return TCL_ERROR
	}
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+4)
	}()

	trim = XTclTrimLeft(tls, string1, *(*int32)(unsafe.Pointer(bp + 4 /* length1 */)), string2, *(*int32)(unsafe.Pointer(bp /* length2 */)))

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, string1+uintptr(trim), *(*int32)(unsafe.Pointer(bp + 4))-trim))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringTrimRCmd --
//
//	This procedure is invoked to process the "string trimright" Tcl
//	command. See the user documentation for details on what it does. Note
//	that this command only functions correctly on properly formed Tcl UTF
//	strings.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sStringTrimRCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3397:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var string1 uintptr
	var string2 uintptr
	var trim int32
	// var length1 int32 at bp+4, 4

	// var length2 int32 at bp, 4

	if objc == 3 {
		string2 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp)
		}()
	} else if objc == 2 {
		string2 = uintptr(unsafe.Pointer(&XtclDefaultTrimSet))
		*(*int32)(unsafe.Pointer(bp /* length2 */)) = int32(libc.Xstrlen(tls, uintptr(unsafe.Pointer(&XtclDefaultTrimSet))))
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17182)
		return TCL_ERROR
	}
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+4)
	}()

	trim = XTclTrimRight(tls, string1, *(*int32)(unsafe.Pointer(bp + 4 /* length1 */)), string2, *(*int32)(unsafe.Pointer(bp /* length2 */)))

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, string1, *(*int32)(unsafe.Pointer(bp + 4))-trim))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclInitStringCmd --
//
//	This procedure creates the "string" Tcl command. See the user
//	documentation for details on what it does. Note that this command only
//	functions correctly on properly formed Tcl UTF strings.
//
//	Also note that the primary methods here (equal, compare, match, ...)
//	have bytecode equivalents. You will find the code for those in
//	tclExecute.c. The code here will only be used in the non-bc case (like
//	in an 'eval').
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTclInitStringCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclCmdMZ.c:3447:1: */

	return XTclMakeEnsemble(tls, interp, ts+17048, uintptr(unsafe.Pointer(&stringImplMap)))
}

var stringImplMap = [24]EnsembleImplMap{
	{Fname: ts + 17197, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17208, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17212, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17220, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17226, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17232, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17238, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17241, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17246, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17253, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17257, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17263, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17269, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17276, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 3649, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17284, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17292, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17300, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17308, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17313, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17322, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17332, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17340, Fproc: 0, FcompileProc: 0},
	{},
} /* tclCmdMZ.c:3450:34 */

//----------------------------------------------------------------------
//
// Tcl_SubstObjCmd --
//
//	This procedure is invoked to process the "subst" Tcl command. See the
//	user documentation for details on what it does. This command relies on
//	Tcl_SubstObj() for its implementation.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTclSubstOptions(tls *libc.TLS, interp uintptr, numOpts int32, opts uintptr, flagPtr uintptr) int32 { /* tclCmdMZ.c:3499:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var i int32
	var flags int32 = TCL_SUBST_ALL

	for i = 0; i < numOpts; i++ {
		// var optionIndex int32 at bp, 4

		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(opts + uintptr(i)*8)), uintptr(unsafe.Pointer(&substOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK {
			return TCL_ERROR
		}
		switch *(*int32)(unsafe.Pointer(bp /* optionIndex */)) {
		case 0 /* SUBST_NOBACKSLASHES */ :
			flags = flags & libc.CplInt32(TCL_SUBST_BACKSLASHES)
			break
		case 1 /* SUBST_NOCOMMANDS */ :
			flags = flags & libc.CplInt32(TCL_SUBST_COMMANDS)
			break
		case 2 /* SUBST_NOVARS */ :
			flags = flags & libc.CplInt32(TCL_SUBST_VARIABLES)
			break
		default:
			XTcl_Panic(tls, ts+17350, 0)
		}
	}
	*(*int32)(unsafe.Pointer(flagPtr)) = flags
	return TCL_OK
}

var substOptions = [4]uintptr{
	ts + 17400, ts + 17415, ts + 17427, uintptr(0),
} /* tclCmdMZ.c:3505:23 */

func XTcl_SubstObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3539:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRSubstObjCmd})), dummy, objc, objv)
}

func XTclNRSubstObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3549:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var flags int32 at bp, 4

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+17440)
		return TCL_ERROR
	}

	if XTclSubstOptions(tls, interp, objc-2, objv+uintptr(1)*8, bp) != TCL_OK {
		return TCL_ERROR
	}
	return XTcl_NRSubstObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), *(*int32)(unsafe.Pointer(bp /* flags */)))
}

//----------------------------------------------------------------------
//
// Tcl_SwitchObjCmd --
//
//	This object-based procedure is invoked to process the "switch" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_SwitchObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3587:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRSwitchObjCmd})), dummy, objc, objv)
}

func XTclNRSwitchObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:3596:1: */
	bp := tls.Alloc(456)
	defer tls.Free(456)
	*(*int32)(unsafe.Pointer(bp + 408)) = objc

	var i int32
	var j int32
	// var index int32 at bp+392, 4

	var mode int32
	var foundmode int32
	var splitObjs int32
	var numMatchesSaved int32
	var noCase int32
	// var patternLength int32 at bp+412, 4

	var pattern uintptr
	var stringObj uintptr
	var indexVarObj uintptr
	var matchVarObj uintptr
	var savedObjv uintptr
	var regExpr Tcl_RegExp
	var iPtr uintptr
	var pc int32
	var bidx int32    // Index of body argument.
	var blist uintptr // List obj which is the body
	var ctxPtr uintptr
	var strCmpFn uintptr
	// var listv uintptr at bp+400, 8

	var emptyObj uintptr
	var matched int32
	// var rangeObjAry [2]uintptr at bp+440, 16

	var substringObj uintptr
	var _objPtr uintptr
	// var info Tcl_RegExpInfo at bp+416, 24

	var matchesObj uintptr
	var indicesObj uintptr
	var bline int32
	// This is either a dynamic code word, when all elements are
	// relative to themselves, or something else less expected and
	// where we have no information. The result is the same in both
	// cases; tell the code to come that it doesn't know where it is,
	// which triggers reversion to the old behavior.

	var k int32
	savedObjv = objv
	regExpr = uintptr(0)
	iPtr = interp
	pc = 0
	bidx = 0
	blist = uintptr(0)
	strCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{libc.Xstrcmp}))

	mode = 0 /* OPT_EXACT */
	foundmode = 0
	indexVarObj = uintptr(0)
	matchVarObj = uintptr(0)
	numMatchesSaved = 0
	noCase = 0
	i = 1
__1:
	if !(i < *(*int32)(unsafe.Pointer(bp + 408))-2) {
		goto __3
	}
	if !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}()))) != '-') {
		goto __4
	}
	goto __3
__4:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options5)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+392) != TCL_OK) {
		goto __5
	}
	return TCL_ERROR
__5:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 392 /* index */))) {
	// General options.

	case uint32(6) /* OPT_LAST */ :
		goto __7
	case uint32(4) /* OPT_NOCASE */ :
		goto __8

		// Handle the different switch mode options.

	default:
		goto __9

		// Check for TIP#75 options specifying the variables to write
		// regexp information into.

	case uint32(2) /* OPT_INDEXV */ :
		goto __10
	case uint32(3) /* OPT_MATCHV */ :
		goto __11
	}
	goto __6
	// General options.

__7:
	i++
	goto finishedOptions
__8:
	strCmpFn = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	}{XTclUtfCasecmp}))
	noCase = 1
	goto __6

	// Handle the different switch mode options.

__9:
	if !(foundmode != 0) {
		goto __12
	}
	// Mode already set via -exact, -glob, or -regexp.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+17493,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}(), options5[mode])))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+7949, ts+17534,
		ts+17541, uintptr(0)))
	return TCL_ERROR
__12:
	;
	foundmode = 1
	mode = *(*int32)(unsafe.Pointer(bp + 392 /* index */))
	goto __6

	// Check for TIP#75 options specifying the variables to write
	// regexp information into.

__10:
	i++
	if !(i >= *(*int32)(unsafe.Pointer(bp + 408))-2) {
		goto __13
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+17551,
		libc.VaList(bp+56, ts+17595)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+7949, ts+17534,
		ts+17605, uintptr(0)))
	return TCL_ERROR
__13:
	;
	indexVarObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	numMatchesSaved = -1
	goto __6
__11:
	i++
	if !(i >= *(*int32)(unsafe.Pointer(bp + 408))-2) {
		goto __14
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+17551,
		libc.VaList(bp+104, ts+17611)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+112, ts+4178, ts+7949, ts+17534,
		ts+17605, uintptr(0)))
	return TCL_ERROR
__14:
	;
	matchVarObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	numMatchesSaved = -1
	goto __6
__6:
	;
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;

finishedOptions:
	if !(*(*int32)(unsafe.Pointer(bp + 408))-i < 2) {
		goto __15
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+17621)
	return TCL_ERROR
__15:
	;
	if !(indexVarObj != uintptr(0) && mode != 5) {
		goto __16
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+17676, libc.VaList(bp+152, ts+17595)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+160, ts+4178, ts+7949, ts+17534,
		ts+17710, uintptr(0)))
	return TCL_ERROR
__16:
	;
	if !(matchVarObj != uintptr(0) && mode != 5) {
		goto __17
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+17676, libc.VaList(bp+200, ts+17611)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+208, ts+4178, ts+7949, ts+17534,
		ts+17710, uintptr(0)))
	return TCL_ERROR
__17:
	;

	stringObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	*(*int32)(unsafe.Pointer(bp + 408 /* objc */)) -= i + 1
	objv += 8 * uintptr(i+1)
	bidx = i + 1 // First after the match string.

	// If all of the pattern/command pairs are lumped into a single argument,
	// split them out again.
	//
	// TIP #280: Determine the lines the words in the list start at, based on
	// the same data for the list word itself. The cmdFramePtr line
	// information is manipulated directly.

	splitObjs = 0
	if !(*(*int32)(unsafe.Pointer(bp + 408)) == 1) {
		goto __18
	}

	blist = *(*uintptr)(unsafe.Pointer(objv))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 400)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 408)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp+408, bp+400)
	}() != TCL_OK) {
		goto __19
	}
	return TCL_ERROR
__19:
	;

	// Ensure that the list is non-empty.

	if !(*(*int32)(unsafe.Pointer(bp + 408)) < 1) {
		goto __20
	}
	XTcl_WrongNumArgs(tls, interp, 1, savedObjv,
		ts+17726)
	return TCL_ERROR
__20:
	;
	objv = *(*uintptr)(unsafe.Pointer(bp + 400 /* listv */))
	splitObjs = 1
__18:
	;

	// Complain if there is an odd number of words in the list of patterns and
	// bodies.

	if !(*(*int32)(unsafe.Pointer(bp + 408))%2 != 0) {
		goto __21
	}
	XTcl_ResetResult(tls, interp)
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+17783, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+248, ts+4178, ts+7949, ts+17534, ts+17817,
		uintptr(0)))

	// Check if this can be due to a badly placed comment in the switch
	// block.
	//
	// The following is an heuristic to detect the infamous "comment in
	// switch" error: just check if a pattern begins with '#'.

	if !(splitObjs != 0) {
		goto __22
	}
	i = 0
__23:
	if !(i < *(*int32)(unsafe.Pointer(bp + 408))) {
		goto __25
	}
	if !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}()))) == '#') {
		goto __26
	}
	XTcl_AppendToObj(tls, XTcl_GetObjResult(tls, interp),

		ts+17824, -1)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+288, ts+4178, ts+7949, ts+17534,
		ts+17817, ts+17932, uintptr(0)))
	goto __25
__26:
	;
	goto __24
__24:
	i = i + 2
	goto __23
	goto __25
__25:
	;
__22:
	;

	return TCL_ERROR
__21:
	;

	// Complain if the last body is a continuation. Note that this check
	// assumes that the list is non-empty!

	if !(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(*(*int32)(unsafe.Pointer(bp + 408))-1)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(*(*int32)(unsafe.Pointer(bp + 408))-1)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(*(*int32)(unsafe.Pointer(bp + 408))-1)*8)))
	}(), ts+6357) == 0) {
		goto __27
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+17941,
		libc.VaList(bp+336, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(*(*int32)(unsafe.Pointer(bp + 408))-2)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(*(*int32)(unsafe.Pointer(bp + 408))-2)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(*(*int32)(unsafe.Pointer(bp + 408))-2)*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+344, ts+4178, ts+7949, ts+17534, ts+17817,
		ts+17976, uintptr(0)))
	return TCL_ERROR
__27:
	;

	i = 0
__28:
	if !(i < *(*int32)(unsafe.Pointer(bp + 408))) {
		goto __30
	}
	// See if the pattern matches the string.

	pattern = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 412)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+412)
	}()

	if !(i == *(*int32)(unsafe.Pointer(bp + 408))-2 && int32(*(*int8)(unsafe.Pointer(pattern))) == 'd' &&
		libc.Xstrcmp(tls, pattern, ts+12033) == 0) {
		goto __31
	}
	emptyObj = uintptr(0)

	// If either indexVarObj or matchVarObj are non-NULL, we're in
	// REGEXP mode but have reached the default clause anyway. TIP#75
	// specifies that we set the variables to empty lists (== empty
	// objects) in that case.

	if !(indexVarObj != uintptr(0)) {
		goto __32
	}
__33:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __36
	}
	XTclAllocateFreeObjects(tls)
__36:
	;
	emptyObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
	(*Tcl_Obj)(unsafe.Pointer(emptyObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(emptyObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(emptyObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(emptyObj)).FtypePtr = uintptr(0)

	if !(XTcl_ObjSetVar2(tls, interp, indexVarObj, uintptr(0), emptyObj,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __37
	}
	return TCL_ERROR
__37:
	;
__32:
	;
	if !(matchVarObj != uintptr(0)) {
		goto __38
	}
	if !(emptyObj == uintptr(0)) {
		goto __39
	}
__40:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __43
	}
	XTclAllocateFreeObjects(tls)
__43:
	;
	emptyObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __41
__41:
	if 0 != 0 {
		goto __40
	}
	goto __42
__42:
	;
	(*Tcl_Obj)(unsafe.Pointer(emptyObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(emptyObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(emptyObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(emptyObj)).FtypePtr = uintptr(0)

__39:
	;
	if !(XTcl_ObjSetVar2(tls, interp, matchVarObj, uintptr(0), emptyObj,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __44
	}
	return TCL_ERROR
__44:
	;
__38:
	;
	goto matchFound
__31:
	;

	switch mode {
	case 0 /* OPT_EXACT */ :
		goto __46
	case 1 /* OPT_GLOB */ :
		goto __47
	case 5 /* OPT_REGEXP */ :
		goto __48
	}
	goto __45
__46:
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{strCmpFn})).f(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(stringObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(stringObj)).Fbytes
		}
		return XTcl_GetString(tls, stringObj)
	}(), pattern) == 0) {
		goto __49
	}
	goto matchFound
__49:
	;
	goto __45
__47:
	if !(XTcl_StringCaseMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(stringObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(stringObj)).Fbytes
		}
		return XTcl_GetString(tls, stringObj)
	}(), pattern, noCase) != 0) {
		goto __50
	}
	goto matchFound
__50:
	;
	goto __45
__48:
	regExpr = XTcl_GetRegExpFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)),
		TCL_REG_ADVANCED|func() int32 {
			if noCase != 0 {
				return TCL_REG_NOCASE
			}
			return 0
		}())
	if !(regExpr == uintptr(0)) {
		goto __51
	}
	return TCL_ERROR
	goto __52
__51:
	matched = XTcl_RegExpExecObj(tls, interp, regExpr, stringObj, 0,
		numMatchesSaved, 0)

	if !(matched < 0) {
		goto __53
	}
	return TCL_ERROR
	goto __54
__53:
	if !(matched != 0) {
		goto __55
	}
	goto matchFoundRegexp
__55:
	;
__54:
	;
__52:
	;
	goto __45
__45:
	;
	goto __29
__29:
	i = i + 2
	goto __28
	goto __30
__30:
	;
	return TCL_OK

matchFoundRegexp:
	// We are operating in REGEXP mode and we need to store information about
	// what we matched in some user-nominated arrays. So build the lists of
	// values and indices to write here. [TIP#75]

	if !(numMatchesSaved != 0) {
		goto __56
	}
	indicesObj = uintptr(0)

	XTcl_RegExpGetInfo(tls, regExpr, bp+416)
	if !(matchVarObj != uintptr(0)) {
		goto __57
	}
__59:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __62
	}
	XTclAllocateFreeObjects(tls)
__62:
	;
	matchesObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __60
__60:
	if 0 != 0 {
		goto __59
	}
	goto __61
__61:
	;
	(*Tcl_Obj)(unsafe.Pointer(matchesObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(matchesObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(matchesObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(matchesObj)).FtypePtr = uintptr(0)

	goto __58
__57:
	matchesObj = uintptr(0)
__58:
	;
	if !(indexVarObj != uintptr(0)) {
		goto __63
	}
__64:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __67
	}
	XTclAllocateFreeObjects(tls)
__67:
	;
	indicesObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __65
__65:
	if 0 != 0 {
		goto __64
	}
	goto __66
__66:
	;
	(*Tcl_Obj)(unsafe.Pointer(indicesObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(indicesObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(indicesObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(indicesObj)).FtypePtr = uintptr(0)

__63:
	;

	j = 0
__68:
	if !(j <= (*Tcl_RegExpInfo)(unsafe.Pointer(bp+416)).Fnsubs) {
		goto __70
	}
	if !(indexVarObj != uintptr(0)) {
		goto __71
	}

	if !((*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+416)).Fmatches+uintptr(j)*8)).Fend > 0) {
		goto __72
	}
	*(*uintptr)(unsafe.Pointer(bp + 440)) = XTcl_NewLongObj(tls, (*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+416 /* &info */)).Fmatches+uintptr(j)*8)).Fstart)
	*(*uintptr)(unsafe.Pointer(bp + 440 + 1*8)) = XTcl_NewLongObj(tls, (*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+416)).Fmatches+uintptr(j)*8)).Fend-1)
	goto __73
__72:
__74:
	;
__77:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __80
	}
	XTclAllocateFreeObjects(tls)
__80:
	;
	*(*uintptr)(unsafe.Pointer(bp + 440 + 1*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __78
__78:
	if 0 != 0 {
		goto __77
	}
	goto __79
__79:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 440 + 1*8)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 440 + 1*8)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 440 + 1*8)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 440 + 1*8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __75
__75:
	if 0 != 0 {
		goto __74
	}
	goto __76
__76:
	;
	*(*uintptr)(unsafe.Pointer(bp + 440)) = *(*uintptr)(unsafe.Pointer(bp + 440 + 1*8))
__73:
	;

	// Never fails; the object is always clean at this point.

	XTcl_ListObjAppendElement(tls, uintptr(0), indicesObj,
		XTcl_NewListObj(tls, 2, bp+440))
__71:
	;

	if !(matchVarObj != uintptr(0)) {
		goto __81
	}

	substringObj = XTcl_GetRange(tls, stringObj,
		int32((*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+416 /* &info */)).Fmatches+uintptr(j)*8)).Fstart), int32((*Tcl_RegExpIndices)(unsafe.Pointer((*Tcl_RegExpInfo)(unsafe.Pointer(bp+416)).Fmatches+uintptr(j)*8)).Fend-1))

	// Never fails; the object is always clean at this point.

	XTcl_ListObjAppendElement(tls, uintptr(0), matchesObj, substringObj)
__81:
	;
	goto __69
__69:
	j++
	goto __68
	goto __70
__70:
	;

	if !(indexVarObj != uintptr(0)) {
		goto __82
	}
	if !(XTcl_ObjSetVar2(tls, interp, indexVarObj, uintptr(0), indicesObj,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __83
	}
	// Careful! Check to see if we have allocated the list of
	// matched strings; if so (but there was an error assigning
	// the indices list) we have a potential memory leak because
	// the match list has not been written to a variable. Except
	// that we'll clean that up right now.

	if !(matchesObj != uintptr(0)) {
		goto __84
	}
__85:
	_objPtr = matchesObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __88
	}
	XTclFreeObj(tls, _objPtr)
__88:
	;
	goto __86
__86:
	if 0 != 0 {
		goto __85
	}
	goto __87
__87:
	;
__84:
	;
	return TCL_ERROR
__83:
	;
__82:
	;
	if !(matchVarObj != uintptr(0)) {
		goto __89
	}
	if !(XTcl_ObjSetVar2(tls, interp, matchVarObj, uintptr(0), matchesObj,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __90
	}
	// Unlike above, if indicesObj is non-NULL at this point, it
	// will have been written to a variable already and will hence
	// not be leaked.

	return TCL_ERROR
__90:
	;
__89:
	;
__56:
	;

	// We've got a match. Find a body to execute, skipping bodies that are
	// "-".

matchFound:
	ctxPtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CmdFrame{})))
	*(*CmdFrame)(unsafe.Pointer(ctxPtr)) = *(*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr))

	if !(splitObjs != 0) {
		goto __91
	}
	// We have to perform the GetSrc and other type dependent handling of
	// the frame here because we are munging with the line numbers,
	// something the other commands like if, etc. are not doing. Them are
	// fine with simply passing the CmdFrame through and having the
	// special handling done in 'info frame', or the bc compiler

	if !((*CmdFrame)(unsafe.Pointer(ctxPtr)).Ftype == 2) {
		goto __92
	}
	// Type BC => ctxPtr->data.eval.path    is not used.
	//		  ctxPtr->data.tebc.codePtr is used instead.

	XTclGetSrcInfoForPc(tls, ctxPtr)
	pc = 1

	// The line information in the cmdFrame is now a copy we do not
	// own.
__92:
	;

	if !((*CmdFrame)(unsafe.Pointer(ctxPtr)).Ftype == 4 && *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(ctxPtr)).Fline + uintptr(bidx)*4)) >= 0) {
		goto __93
	}
	bline = *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(ctxPtr)).Fline + uintptr(bidx)*4))

	(*CmdFrame)(unsafe.Pointer(ctxPtr)).Fline = XTcl_Alloc(tls, uint32(uint64(*(*int32)(unsafe.Pointer(bp + 408)))*uint64(unsafe.Sizeof(int32(0)))))
	(*CmdFrame)(unsafe.Pointer(ctxPtr)).Fnline = *(*int32)(unsafe.Pointer(bp + 408 /* objc */))
	XTclListLines(tls, blist, bline, *(*int32)(unsafe.Pointer(bp + 408 /* objc */)), (*CmdFrame)(unsafe.Pointer(ctxPtr)).Fline, objv)
	goto __94
__93:

	(*CmdFrame)(unsafe.Pointer(ctxPtr)).Fline = XTcl_Alloc(tls, uint32(uint64(*(*int32)(unsafe.Pointer(bp + 408)))*uint64(unsafe.Sizeof(int32(0)))))
	(*CmdFrame)(unsafe.Pointer(ctxPtr)).Fnline = *(*int32)(unsafe.Pointer(bp + 408 /* objc */))
	k = 0
__95:
	if !(k < *(*int32)(unsafe.Pointer(bp + 408))) {
		goto __97
	}
	*(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(ctxPtr)).Fline + uintptr(k)*4)) = -1
	goto __96
__96:
	k++
	goto __95
	goto __97
__97:
	;
__94:
	;
__91:
	;

	j = i + 1
__98:
	;
	if !(j >= *(*int32)(unsafe.Pointer(bp + 408))) {
		goto __101
	}
	// This shouldn't happen since we've checked that the last body is
	// not a continuation...

	XTcl_Panic(tls, ts+17988, 0)
__101:
	;
	if !(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(j)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(j)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(j)*8)))
	}(), ts+6357) != 0) {
		goto __102
	}
	goto __100
__102:
	;
	goto __99
__99:
	j = j + 2
	goto __98
	goto __100
__100:
	;

	// TIP #280: Make invoking context available to switch branch.

	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sSwitchPostProc})), uintptr(Intptr_t(splitObjs)), ctxPtr,
		uintptr(Intptr_t(pc)), pattern)
	return XTclNREvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(j)*8)), 0, ctxPtr, func() int32 {
		if splitObjs != 0 {
			return j
		}
		return bidx + j
	}())
}

var options5 = [8]uintptr{
	ts + 15508, ts + 15515, ts + 17595, ts + 17611, ts + 15557, ts + 15576,
	ts + 16430, uintptr(0),
} /* tclCmdMZ.c:3620:23 */

func sSwitchPostProc(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdMZ.c:4057:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// Unpack the preserved data

	var splitObjs int32 = int32(*(*ClientData)(unsafe.Pointer(data)))
	var ctxPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var pc int32 = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))
	var pattern uintptr = *(*ClientData)(unsafe.Pointer(data + 3*8))
	var patternLength int32 = int32(libc.Xstrlen(tls, pattern))

	// Clean up TIP 280 context information

	if splitObjs != 0 {
		XTclpFree(tls, (*CmdFrame)(unsafe.Pointer(ctxPtr)).Fline)
		if pc != 0 && (*CmdFrame)(unsafe.Pointer(ctxPtr)).Ftype == 4 {
			// Death of SrcInfo reference.

			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(ctxPtr + 40))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
	}

	// Generate an error message if necessary.

	if result == TCL_ERROR {
		var limit int32 = 50
		var overflow int32 = libc.Bool32(patternLength > limit)

		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+18038,
			libc.VaList(bp, func() int32 {
				if overflow != 0 {
					return limit
				}
				return patternLength
			}(), pattern,
				func() uintptr {
					if overflow != 0 {
						return ts + 8420 /* "..." */
					}
					return ts + 2631 /* "" */
				}(), XTcl_GetErrorLine(tls, interp))))
	}
	XTclStackFree(tls, interp, ctxPtr)
	return result
}

//----------------------------------------------------------------------
//
// Tcl_ThrowObjCmd --
//
//	This procedure is invoked to process the "throw" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ThrowObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:4121:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var options uintptr
	// var len int32 at bp+40, 4

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18066)
		return TCL_ERROR
	}

	// The type must be a list of at least length 1.

	if XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+40) != TCL_OK {
		return TCL_ERROR
	} else if *(*int32)(unsafe.Pointer(bp + 40)) < 1 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+18079, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+18107, ts+18113,
			uintptr(0)))
		return TCL_ERROR
	}

	// Now prepare the result options dictionary. We use the list API as it is
	// slightly more convenient.

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			options = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(options)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([32]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(options)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(options)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(options)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([32]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(options)).Fbytes, ts+18126, uint64(int32(uint64(unsafe.Sizeof([32]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(options)).Fbytes + 31)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(options)).Flength = int32(uint64(unsafe.Sizeof([32]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(options)).FtypePtr = uintptr(0)
		{
		}
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(objv + 1*8)))

	// We're ready to go. Fire things into the low-level result machinery.

	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	return XTcl_SetReturnOptions(tls, interp, options)
}

//----------------------------------------------------------------------
//
// Tcl_TimeObjCmd --
//
//	This object-based procedure is invoked to process the "time" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_TimeObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:4183:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var objPtr uintptr
	// var objs [4]uintptr at bp+8, 32

	var i int32
	var result int32
	// var count int32 at bp, 4

	var totalMicroSec float64
	var start Tcl_WideInt
	var stop Tcl_WideInt

	if objc == 2 {
		*(*int32)(unsafe.Pointer(bp /* count */)) = 1
	} else if objc == 3 {
		result = func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp)
		}()
		if result != TCL_OK {
			return result
		}
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18158)
		return TCL_ERROR
	}

	objPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	i = *(*int32)(unsafe.Pointer(bp /* count */))
	start = XTclpGetWideClicks(tls)
	for libc.PostDecInt32(&i, 1) > 0 {
		result = XTclEvalObjEx(tls, interp, objPtr, 0, uintptr(0), 0)
		if result != TCL_OK {
			return result
		}
	}
	stop = XTclpGetWideClicks(tls)
	totalMicroSec = float64(stop-start) * XTclpWideClickInMicrosec(tls) * float64(1000) / 1.0e3

	if *(*int32)(unsafe.Pointer(bp)) <= 1 {
		// Use int obj since we know time is not fractional. [Bug 1202178]

		*(*uintptr)(unsafe.Pointer(bp + 8)) = XTcl_NewWideIntObj(tls, func() int64 {
			if *(*int32)(unsafe.Pointer(bp)) <= 0 {
				return int64(0)
			}
			return Tcl_WideInt(totalMicroSec)
		}())
	} else {
		*(*uintptr)(unsafe.Pointer(bp + 8)) = XTcl_NewDoubleObj(tls, totalMicroSec/float64(*(*int32)(unsafe.Pointer(bp))))
	}

	// Construct the result as a list because many programs have always parsed
	// as such (extracting the first element, typically).

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).Fbytes, ts+11357, uint64(int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).Fbytes + 12)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).Flength = int32(uint64(unsafe.Sizeof([13]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).FtypePtr = uintptr(0)
		{
		}
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(bp + 8 + 2*8)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 2*8)))).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 2*8)))).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 2*8)))).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 2*8)))).Fbytes, ts+18174, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 2*8)))).Fbytes + 3)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 2*8)))).FtypePtr = uintptr(0)
		{
		}
	}
	for ok4 := true; ok4; ok4 = 0 != 0 {
		for ok5 := true; ok5; ok5 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(bp + 8 + 3*8)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 3*8)))).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 3*8)))).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 3*8)))).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 3*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 3*8)))).Fbytes, ts+18178, uint64(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 3*8)))).Fbytes + 9)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 3*8)))).Flength = int32(uint64(unsafe.Sizeof([10]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 3*8)))).FtypePtr = uintptr(0)
		{
		}
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 4, bp+8))

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_TimeRateObjCmd --
//
//	This object-based procedure is invoked to process the "timerate" Tcl
//	command.
//
//	This is similar to command "time", except the execution limited by
//	given time (in milliseconds) instead of repetition count.
//
// Example:
//	timerate {after 5} 1000; # equivalent to: time {after 5} [expr 1000/5]
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_TimeRateObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:4281:1: */
	bp := tls.Alloc(184)
	defer tls.Free(184)

	// global measure-overhead
	// var overhead float64 at bp+48, 8
	// given measure-overhead
	var objPtr uintptr
	var result int32
	var i int32
	var calibrate uintptr
	var direct uintptr
	var count Tcl_WideUInt // Holds repetition count
	// var maxms Tcl_WideInt at bp+56, 8

	// Maximal running time (in milliseconds)
	var maxcnt Tcl_WideUInt
	// Maximal count of iterations.
	var threshold Tcl_WideUInt // Current threshold for check time (faster
	// repeat count without time check)
	var maxIterTm Tcl_WideUInt // Max time of some iteration as max
	// threshold, additionally avoiding divide to
	// zero (i.e., never < 1)
	var factor uint16 // Factor (4..50) limiting threshold to avoid
	// growth of execution time.
	var start Tcl_WideInt
	var middle Tcl_WideInt
	var stop Tcl_WideInt
	var rootPtr uintptr
	var codePtr uintptr
	// var index int32 at bp+40, 4
	// max-count
	// var v Tcl_WideInt at bp+64, 8

	var _objPtr uintptr
	var _objPtr1 uintptr
	// var clobjv [6]uintptr at bp+72, 48

	var maxCalTime Tcl_WideInt
	var lastMeasureOverhead float64
	// Estimate the time of overhead (microsecs).

	var curOverhead Tcl_WideUInt
	// var objarr [8]uintptr at bp+120, 64

	var objs uintptr
	var usec Tcl_WideUInt
	var val Tcl_WideUInt
	var digits int32
	*(*float64)(unsafe.Pointer(bp + 48 /* overhead */)) = float64(-1)
	calibrate = uintptr(0)
	direct = uintptr(0)
	count = uint64(0)
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 56 /* maxms */)) = libc.Int64FromUint64(Tcl_WideUInt(int64(Tcl_WideUInt(libc.Uint64(libc.Uint64FromInt32(-1)))>>1)) + uint64(1))
	maxcnt = Tcl_WideUInt(int64(Tcl_WideUInt(libc.Uint64(libc.Uint64FromInt32(-1))) >> 1))
	threshold = uint64(1)
	maxIterTm = uint64(1)
	factor = uint16(50)
	codePtr = uintptr(0)

	i = 1
__1:
	if !(i < objc-1) {
		goto __3
	}

	if !(XTcl_GetIndexFromObjStruct(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options6)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp+40) != TCL_OK) {
		goto __4
	}
	goto __3
__4:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 40)) == 3) {
		goto __5
	}
	i++
	goto __3
__5:
	;
	switch *(*int32)(unsafe.Pointer(bp + 40 /* index */)) {
	case 0 /* TMRT_EV_DIRECT */ :
		goto __7
	case 1 /* TMRT_OVERHEAD */ :
		goto __8
	case 2 /* TMRT_CALIBRATE */ :
		goto __9
	}
	goto __6
__7:
	direct = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	goto __6
__8:
	if !(libc.PreIncInt32(&i, 1) >= objc-1) {
		goto __10
	}
	goto usage
__10:
	;
	if !(XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+48) != TCL_OK) {
		goto __11
	}
	return TCL_ERROR
__11:
	;
	goto __6
__9:
	calibrate = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	goto __6
__6:
	;
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;

	if !(i >= objc || i < objc-3) {
		goto __12
	}
usage:
	XTcl_WrongNumArgs(tls, interp, 1, objv,

		ts+18188)
	return TCL_ERROR
__12:
	;
	objPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PostIncInt32(&i, 1))*8))
	if !(i < objc) {
		goto __13
	} // max-time
	result = XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PostIncInt32(&i, 1))*8)), bp+56)
	if !(result != TCL_OK) {
		goto __14
	}
	return result
__14:
	;
	if !(i < objc) {
		goto __15
	}

	result = XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+64)
	if !(result != TCL_OK) {
		goto __16
	}
	return result
__16:
	;
	if *(*Tcl_WideInt)(unsafe.Pointer(bp + 64)) > int64(0) {
		maxcnt = uint64(*(*Tcl_WideInt)(unsafe.Pointer(bp + 64 /* v */)))
	} else {
		maxcnt = uint64(0)
	}
__15:
	;
__13:
	;

	// If we are doing calibration.

	if !(calibrate != 0) {
		goto __17
	}
	// If no time specified for the calibration.

	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 56)) == libc.Int64FromUint64(Tcl_WideUInt(int64(Tcl_WideUInt(libc.Uint64(libc.Uint64FromInt32(-1)))>>1))+uint64(1))) {
		goto __18
	}
	maxCalTime = int64(5000)
	lastMeasureOverhead = measureOverhead

	*(*uintptr)(unsafe.Pointer(bp + 72)) = *(*uintptr)(unsafe.Pointer(objv))
	i = 1
	if !(direct != 0) {
		goto __19
	}
	*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(libc.PostIncInt32(&i, 1))*8)) = direct
__19:
	;
	*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(libc.PostIncInt32(&i, 1))*8)) = objPtr

	// Reset last measurement overhead.

	measureOverhead = float64(0)

	// Self-call with 100 milliseconds to warm-up, before entering the
	// calibration cycle.

__20:
	;
__23:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __26
	}
	XTclAllocateFreeObjects(tls)
__26:
	;
	*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)) + 32)) = 100
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)))).FrefCount++
	result = XTcl_TimeRateObjCmd(tls, uintptr(0), interp, i+1, bp+72)
__27:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __30
	}
	XTclFreeObj(tls, _objPtr)
__30:
	;
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
	if !(result != TCL_OK) {
		goto __31
	}
	return result
__31:
	;

	i--
	*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(libc.PostIncInt32(&i, 1))*8)) = calibrate
	*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(libc.PostIncInt32(&i, 1))*8)) = objPtr

	// Set last measurement overhead to max.

	measureOverhead = float64(libc.Uint64FromInt32(-1))

	// Run the calibration cycle until it is more precise.

	*(*Tcl_WideInt)(unsafe.Pointer(bp + 56 /* maxms */)) = int64(-1000)
__32:
	lastMeasureOverhead = measureOverhead
__35:
	;
__38:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __41
	}
	XTclAllocateFreeObjects(tls)
__41:
	;
	*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)) + 32)) = int32(int32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 56))))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __36
__36:
	if 0 != 0 {
		goto __35
	}
	goto __37
__37:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8)))).FrefCount++
	result = XTcl_TimeRateObjCmd(tls, uintptr(0), interp, i+1, bp+72)
__42:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __45
	}
	XTclFreeObj(tls, _objPtr1)
__45:
	;
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
	if !(result != TCL_OK) {
		goto __46
	}
	return result
__46:
	;
	maxCalTime = maxCalTime + *(*Tcl_WideInt)(unsafe.Pointer(bp + 56))

	// Increase maxms for more precise calibration.

	*(*Tcl_WideInt)(unsafe.Pointer(bp + 56 /* maxms */)) -= -*(*Tcl_WideInt)(unsafe.Pointer(bp + 56)) / int64(4)

	// As long as new value more as 0.05% better
	goto __33
__33:
	if (measureOverhead >= lastMeasureOverhead ||
		measureOverhead/lastMeasureOverhead <= 0.9995) &&
		maxCalTime > int64(0) {
		goto __32
	}
	goto __34
__34:
	;

	return result
__18:
	;
	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 56)) == int64(0)) {
		goto __47
	}
	// Reset last measurement overhead

	measureOverhead = float64(0)
	XTcl_SetObjResult(tls, interp, XTcl_NewLongObj(tls, 0))
	return TCL_OK
__47:
	;

	// If time is negative, make current overhead more precise.

	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 56)) > int64(0)) {
		goto __48
	}
	// Set last measurement overhead to max.

	measureOverhead = float64(libc.Uint64FromInt32(-1))
	goto __49
__48:
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 56 /* maxms */)) = -*(*Tcl_WideInt)(unsafe.Pointer(bp + 56 /* maxms */))
__49:
	;
__17:
	;

	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 56)) == libc.Int64FromUint64(Tcl_WideUInt(int64(Tcl_WideUInt(libc.Uint64(libc.Uint64FromInt32(-1)))>>1))+uint64(1))) {
		goto __50
	}
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 56 /* maxms */)) = int64(1000)
__50:
	;
	if !(*(*float64)(unsafe.Pointer(bp + 48)) == float64(-1)) {
		goto __51
	}
	*(*float64)(unsafe.Pointer(bp + 48 /* overhead */)) = measureOverhead
__51:
	;

	// Ensure that resetting of result will not smudge the further
	// measurement.

	XTcl_ResetResult(tls, interp)

	// Compile object if needed.

	if !!(direct != 0) {
		goto __52
	}
	if !(XTclInterpReady(tls, interp) != TCL_OK) {
		goto __53
	}
	return TCL_ERROR
__53:
	;
	codePtr = XTclCompileObj(tls, interp, objPtr, uintptr(0), 0)
	sTclPreserveByteCode(tls, codePtr)
__52:
	;

	// Get start and stop time.

	start = libc.AssignInt64(&middle, XTclpGetWideClicks(tls))

	// Time to stop execution (in wide clicks).

	stop = libc.Int64FromFloat64(float64(start) + float64(*(*Tcl_WideInt)(unsafe.Pointer(bp + 56))*int64(1000))/XTclpWideClickInMicrosec(tls))

	// Start measurement.

	if !(maxcnt > uint64(0)) {
		goto __54
	}
__55:
	if !(1 != 0) {
		goto __56
	}
	// Evaluate a single iteration.

	count++
	if !!(direct != 0) {
		goto __57
	} // precompiled
	rootPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	// Use loop optimized TEBC call (TCL_EVAL_DISCARD_RESULT): it's a part of
	// iteration, this way evaluation will be more similar to a cycle (also
	// avoids extra overhead to set result to interp, etc.)
	*(*int32)(unsafe.Pointer(interp + 324)) |= TCL_EVAL_DISCARD_RESULT
	result = XTclNRExecuteByteCode(tls, interp, codePtr)
	result = XTclNRRunCallbacks(tls, interp, result, rootPtr)
	goto __58
__57: // eval
	result = XTclEvalObjEx(tls, interp, objPtr, 0, uintptr(0), 0)
__58:
	;
	// Allow break and continue from measurement cycle (used for
	// conditional stop and flow control of iterations).

	switch result {
	case TCL_OK:
		goto __60
	case TCL_BREAK:
		goto __61
		// FALLTHRU
	case TCL_CONTINUE:
		goto __62
	default:
		goto __63
	}
	goto __59
__60:
	goto __59
__61:
	// Force stop immediately.
	threshold = uint64(1)
	maxcnt = uint64(0)
	// FALLTHRU
__62:
	result = TCL_OK
	goto __59
__63:
	goto done
__59:
	;

	// Don't check time up to threshold.

	if !(libc.PreDecUint64(&threshold, 1) > uint64(0)) {
		goto __64
	}
	goto __55
__64:
	;

	// Check stop time reached, estimate new threshold.

	middle = XTclpGetWideClicks(tls)

	if !(middle >= stop || count >= maxcnt) {
		goto __65
	}
	goto __56
__65:
	;

	// Don't calculate threshold by few iterations, because sometimes
	// first iteration(s) can be too fast or slow (cached, delayed
	// clean up, etc).

	if !(count < uint64(10)) {
		goto __66
	}
	threshold = uint64(1)
	goto __55
__66:
	;

	// Average iteration time in microsecs.

	threshold = Tcl_WideUInt(middle-start) / count
	if !(threshold > maxIterTm) {
		goto __67
	}
	maxIterTm = threshold

	// Iterations seem to be longer.

	if !(threshold > maxIterTm*uint64(2)) {
		goto __69
	}
	factor = uint16(int32(factor) * 2)
	if !(int32(factor) > 50) {
		goto __71
	}
	factor = uint16(50)
__71:
	;
	goto __70
__69:
	if !(int32(factor) < 50) {
		goto __72
	}
	factor++
__72:
	;
__70:
	;
	goto __68
__67:
	if !(int32(factor) > 4) {
		goto __73
	}
	// Iterations seem to be shorter.

	if !(threshold < maxIterTm/uint64(2)) {
		goto __74
	}
	factor = uint16(int32(factor) / 2)
	if !(int32(factor) < 4) {
		goto __76
	}
	factor = uint16(4)
__76:
	;
	goto __75
__74:
	factor--
__75:
	;
__73:
	;
__68:
	;

	// As relation between remaining time and time since last check,
	// maximal some % of time (by factor), so avoid growing of the
	// execution time if iterations are not consistent, e.g. was
	// continuously on time).

	threshold = Tcl_WideUInt(stop-middle)/maxIterTm/Tcl_WideUInt(factor) + uint64(1)
	if !(threshold > uint64(100000)) {
		goto __77
	} // fix for too large threshold
	threshold = uint64(100000)
__77:
	;

	// Consider max-count

	if !(threshold > maxcnt-count) {
		goto __78
	}
	threshold = maxcnt - count
__78:
	;
	goto __55
__56:
	;
__54:
	;

	objs = bp + 120 /* objarr */

	// Absolute execution time in microseconds or in wide clicks.
	usec = Tcl_WideUInt(middle - start)

	// convert execution time (in wide clicks) to microsecs.

	usec = libc.Uint64FromFloat64(float64(usec) * XTclpWideClickInMicrosec(tls))

	if !!(count != 0) {
		goto __79
	} // no iterations - avoid divide by zero
	*(*uintptr)(unsafe.Pointer(objs)) = libc.AssignPtrUintptr(objs+2*8, libc.AssignPtrUintptr(objs+4*8, XTcl_NewWideIntObj(tls, int64(0))))
	goto retRes
__79:
	;

	// If not calibrating...

	if !!(calibrate != 0) {
		goto __80
	}
	// Minimize influence of measurement overhead.

	if !(*(*float64)(unsafe.Pointer(bp + 48)) > float64(0)) {
		goto __82
	}
	// Estimate the time of overhead (microsecs).

	curOverhead = libc.Uint64FromFloat64(*(*float64)(unsafe.Pointer(bp + 48)) * float64(count))

	if !(usec > curOverhead) {
		goto __83
	}
	usec = usec - curOverhead
	goto __84
__83:
	usec = uint64(0)
__84:
	;
__82:
	;
	goto __81
__80:
	// Calibration: obtaining new measurement overhead.

	if !(measureOverhead > float64(usec)/float64(count)) {
		goto __85
	}
	measureOverhead = float64(usec) / float64(count)
__85:
	;
	*(*uintptr)(unsafe.Pointer(objs)) = XTcl_NewDoubleObj(tls, measureOverhead)
__86:
	;
__89:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __92
	}
	XTclAllocateFreeObjects(tls)
__92:
	;
	*(*uintptr)(unsafe.Pointer(objs + 1*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __90
__90:
	if 0 != 0 {
		goto __89
	}
	goto __91
__91:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1)) == 0) {
		goto __93
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Flength = 0
	goto __94
__93:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Fbytes, ts+18257, uint64(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Fbytes + 14)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Flength = int32(uint64(unsafe.Sizeof([15]int8{})) - uint64(1))
__94:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).FtypePtr = uintptr(0)

	goto __87
__87:
	if 0 != 0 {
		goto __86
	}
	goto __88
__88:
	; // mics
	objs += 8 * uintptr(2)
__81:
	;

	val = usec / count // microsecs per iteration
	if !(val >= uint64(1000000)) {
		goto __95
	}
	*(*uintptr)(unsafe.Pointer(objs)) = XTcl_NewWideIntObj(tls, int64(val))
	goto __96
__95:
	if !(val < uint64(10)) {
		goto __97
	}
	digits = 6
	goto __98
__97:
	if !(val < uint64(100)) {
		goto __99
	}
	digits = 4
	goto __100
__99:
	if !(val < uint64(1000)) {
		goto __101
	}
	digits = 3
	goto __102
__101:
	if !(val < uint64(10000)) {
		goto __103
	}
	digits = 2
	goto __104
__103:
	digits = 1
__104:
	;
__102:
	;
__100:
	;
__98:
	;
	*(*uintptr)(unsafe.Pointer(objs)) = XTcl_ObjPrintf(tls, ts+18272, libc.VaList(bp, digits, float64(usec)/float64(count)))
__96:
	;

	*(*uintptr)(unsafe.Pointer(objs + 2*8)) = XTcl_NewWideIntObj(tls, int64(count)) // iterations

	// Calculate speed as rate (count) per sec

	if !!(usec != 0) {
		goto __105
	}
	usec++ // Avoid divide by zero.
__105:
	;
	if !(count < uint64(int64(Tcl_WideUInt(libc.Uint64(libc.Uint64FromInt32(-1)))>>1)/int64(1000000))) {
		goto __106
	}
	val = count * uint64(1000000) / usec
	if !(val < uint64(100000)) {
		goto __108
	}
	if !(val < uint64(100)) {
		goto __110
	}
	digits = 3
	goto __111
__110:
	if !(val < uint64(1000)) {
		goto __112
	}
	digits = 2
	goto __113
__112:
	digits = 1
__113:
	;
__111:
	;
	*(*uintptr)(unsafe.Pointer(objs + 4*8)) = XTcl_ObjPrintf(tls, ts+18272,
		libc.VaList(bp+16, digits, float64(count*uint64(1000000))/float64(usec)))
	goto __109
__108:
	*(*uintptr)(unsafe.Pointer(objs + 4*8)) = XTcl_NewWideIntObj(tls, int64(val))
__109:
	;
	goto __107
__106:
	*(*uintptr)(unsafe.Pointer(objs + 4*8)) = XTcl_NewWideIntObj(tls, int64(count/usec*uint64(1000000)))
__107:
	;

retRes:
	// Estimated net execution time (in millisecs).

	if !!(calibrate != 0) {
		goto __114
	}
	if !(usec >= uint64(1)) {
		goto __115
	}
	*(*uintptr)(unsafe.Pointer(objs + 6*8)) = XTcl_ObjPrintf(tls, ts+18277, libc.VaList(bp+32, float64(usec)/float64(1000)))
	goto __116
__115:
	*(*uintptr)(unsafe.Pointer(objs + 6*8)) = XTcl_NewWideIntObj(tls, int64(0))
__116:
	;
__117:
	;
__120:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __123
	}
	XTclAllocateFreeObjects(tls)
__123:
	;
	*(*uintptr)(unsafe.Pointer(objs + 7*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __121
__121:
	if 0 != 0 {
		goto __120
	}
	goto __122
__122:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 7*8)))).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)) == 0) {
		goto __124
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 7*8)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 7*8)))).Flength = 0
	goto __125
__124:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 7*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 7*8)))).Fbytes, ts+18282, uint64(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 7*8)))).Fbytes + 6)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 7*8)))).Flength = int32(uint64(unsafe.Sizeof([7]int8{})) - uint64(1))
__125:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 7*8)))).FtypePtr = uintptr(0)

	goto __118
__118:
	if 0 != 0 {
		goto __117
	}
	goto __119
__119:
	;
__114:
	;

	// Construct the result as a list because many programs have always
	// parsed as such (extracting the first element, typically).

__126:
	;
__129:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __132
	}
	XTclAllocateFreeObjects(tls)
__132:
	;
	*(*uintptr)(unsafe.Pointer(objs + 1*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __130
__130:
	if 0 != 0 {
		goto __129
	}
	goto __131
__131:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0) {
		goto __133
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Flength = 0
	goto __134
__133:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Fbytes, ts+18289, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Fbytes + 5)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
__134:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 1*8)))).FtypePtr = uintptr(0)

	goto __127
__127:
	if 0 != 0 {
		goto __126
	}
	goto __128
__128:
	; // mics/#
__135:
	;
__138:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __141
	}
	XTclAllocateFreeObjects(tls)
__141:
	;
	*(*uintptr)(unsafe.Pointer(objs + 3*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __139
__139:
	if 0 != 0 {
		goto __138
	}
	goto __140
__140:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 3*8)))).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)) == 0) {
		goto __142
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 3*8)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 3*8)))).Flength = 0
	goto __143
__142:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 3*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 3*8)))).Fbytes, ts+18295, uint64(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 3*8)))).Fbytes + 1)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 3*8)))).Flength = int32(uint64(unsafe.Sizeof([2]int8{})) - uint64(1))
__143:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 3*8)))).FtypePtr = uintptr(0)

	goto __136
__136:
	if 0 != 0 {
		goto __135
	}
	goto __137
__137:
	;
__144:
	;
__147:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __150
	}
	XTclAllocateFreeObjects(tls)
__150:
	;
	*(*uintptr)(unsafe.Pointer(objs + 5*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __148
__148:
	if 0 != 0 {
		goto __147
	}
	goto __149
__149:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 5*8)))).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0) {
		goto __151
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 5*8)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 5*8)))).Flength = 0
	goto __152
__151:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 5*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 5*8)))).Fbytes, ts+18297, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 5*8)))).Fbytes + 5)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 5*8)))).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
__152:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objs + 5*8)))).FtypePtr = uintptr(0)

	goto __145
__145:
	if 0 != 0 {
		goto __144
	}
	goto __146
__146:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 8, bp+120))

done:
	if !(codePtr != uintptr(0)) {
		goto __153
	}
	sTclReleaseByteCode(tls, codePtr)
__153:
	;
	return result
}

var measureOverhead float64 = float64(0) /* tclCmdMZ.c:4287:19 */
var options6 = [5]uintptr{
	ts + 18303, ts + 18311, ts + 18321, ts + 16430, uintptr(0),
} /* tclCmdMZ.c:4309:23 */

//----------------------------------------------------------------------
//
// Tcl_TryObjCmd, TclNRTryObjCmd --
//
//	This procedure is invoked to process the "try" Tcl command. See the
//	user documentation (or TIP #329) for details on what it does.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_TryObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:4824:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRTryObjCmd})), dummy, objc, objv)
}

func XTclNRTryObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:4834:1: */
	bp := tls.Alloc(340)
	defer tls.Free(340)

	var bodyObj uintptr
	var handlersObj uintptr
	var finallyObj uintptr
	var i int32
	var bodyShared int32
	var haveHandlers int32
	// var dummy int32 at bp+336, 4

	// var code int32 at bp+292, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	var _objPtr7 uintptr
	// var type1 int32 at bp+288, 4

	// var info [5]uintptr at bp+296, 40

	var _objPtr8 uintptr
	var _objPtr9 uintptr
	finallyObj = uintptr(0)

	// Parse the arguments. The handlers are passed to subsequent callbacks as
	// a Tcl_Obj list of the 5-tuples like (type, returnCode, errorCodePrefix,
	// bindVariables, script), and the finally script is just passed as it is.

	if !(objc < 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+18332)
	return TCL_ERROR
__1:
	;
	bodyObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
__2:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __5
	}
	XTclAllocateFreeObjects(tls)
__5:
	;
	handlersObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3
__3:
	if 0 != 0 {
		goto __2
	}
	goto __4
__4:
	;
	(*Tcl_Obj)(unsafe.Pointer(handlersObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(handlersObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(handlersObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(handlersObj)).FtypePtr = uintptr(0)

	bodyShared = 0
	haveHandlers = 0
	i = 2
__6:
	if !(i < objc) {
		goto __8
	}

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&handlerNames)), int32(unsafe.Sizeof(uintptr(0))), ts+18368, 0, bp+288) != TCL_OK) {
		goto __9
	}
__10:
	_objPtr = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __13
	}
	XTclFreeObj(tls, _objPtr)
__13:
	;
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	return TCL_ERROR
__9:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 288 /* type1 */))) {
	case uint32(0) /* TryFinally */ :
		goto __15

	case uint32(1) /* TryOn */ :
		goto __16

	case uint32(2) /* TryTrap */ :
		goto __17
	}
	goto __14
__15: // finally script
	if !(i < objc-2) {
		goto __18
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+18381, -1))
__20:
	_objPtr1 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __23
	}
	XTclFreeObj(tls, _objPtr1)
__23:
	;
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+18409, ts+18413,
		ts+18421, uintptr(0)))
	return TCL_ERROR
	goto __19
__18:
	if !(i == objc-1) {
		goto __24
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+18433, -1))
__25:
	_objPtr2 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __28
	}
	XTclFreeObj(tls, _objPtr2)
__28:
	;
	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7949, ts+18409, ts+18413,
		ts+14232, uintptr(0)))
	return TCL_ERROR
__24:
	;
__19:
	;
	finallyObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PreIncInt32(&i, 1))*8))
	goto __14

__16: // on code variableList script
	if !(i > objc-4) {
		goto __29
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+18494, -1))
__30:
	_objPtr3 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __33
	}
	XTclFreeObj(tls, _objPtr3)
__33:
	;
	goto __31
__31:
	if 0 != 0 {
		goto __30
	}
	goto __32
__32:
	;
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+7949, ts+18409, ts+18563,
		ts+14232, uintptr(0)))
	return TCL_ERROR
__29:
	;
	if !(XTclGetCompletionCodeFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)),
		bp+292) != TCL_OK) {
		goto __34
	}
__35:
	_objPtr4 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __38
	}
	XTclFreeObj(tls, _objPtr4)
__38:
	;
	goto __36
__36:
	if 0 != 0 {
		goto __35
	}
	goto __37
__37:
	;
	return TCL_ERROR
__34:
	;
	*(*uintptr)(unsafe.Pointer(bp + 296 + 2*8)) = uintptr(0)
	goto commonHandler

__17: // trap pattern variableList script
	if !(i > objc-4) {
		goto __39
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+18566,
		-1))
__40:
	_objPtr5 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __43
	}
	XTclFreeObj(tls, _objPtr5)
__43:
	;
	goto __41
__41:
	if 0 != 0 {
		goto __40
	}
	goto __42
__42:
	;
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+144, ts+4178, ts+7949, ts+18409, ts+18642,
		ts+14232, uintptr(0)))
	return TCL_ERROR
__39:
	;
	*(*int32)(unsafe.Pointer(bp + 292 /* code */)) = 1
	if !(XTcl_ListObjLength(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+336) != TCL_OK) {
		goto __44
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+18647,
		libc.VaList(bp+192, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))))))
__45:
	_objPtr6 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __48
	}
	XTclFreeObj(tls, _objPtr6)
__48:
	;
	goto __46
__46:
	if 0 != 0 {
		goto __45
	}
	goto __47
__47:
	;
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+200, ts+4178, ts+7949, ts+18409, ts+18642,
		ts+18679, uintptr(0)))
	return TCL_ERROR
__44:
	;
	*(*uintptr)(unsafe.Pointer(bp + 296 + 2*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))

commonHandler:
	if !(XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+2)*8)), bp+336) != TCL_OK) {
		goto __49
	}
__50:
	_objPtr7 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __53
	}
	XTclFreeObj(tls, _objPtr7)
__53:
	;
	goto __51
__51:
	if 0 != 0 {
		goto __50
	}
	goto __52
__52:
	;
	return TCL_ERROR
__49:
	;

	*(*uintptr)(unsafe.Pointer(bp + 296)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) // type
__54:
	;
__57:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __60
	}
	XTclAllocateFreeObjects(tls)
__60:
	;
	*(*uintptr)(unsafe.Pointer(bp + 296 + 1*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __58
__58:
	if 0 != 0 {
		goto __57
	}
	goto __59
__59:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 + 1*8)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 + 1*8)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 + 1*8)) + 32)) = int32(*(*int32)(unsafe.Pointer(bp + 292)))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 + 1*8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __55
__55:
	if 0 != 0 {
		goto __54
	}
	goto __56
__56:
	; // returnCode
	if !(*(*uintptr)(unsafe.Pointer(bp + 296 + 2*8)) == uintptr(0)) {
		goto __61
	} // errorCodePrefix
__62:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __65
	}
	XTclAllocateFreeObjects(tls)
__65:
	;
	*(*uintptr)(unsafe.Pointer(bp + 296 + 2*8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 + 2*8)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 + 2*8)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 + 2*8)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 + 2*8)))).FtypePtr = uintptr(0)

__61:
	;
	*(*uintptr)(unsafe.Pointer(bp + 296 + 3*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+2)*8)) // bindVariables
	*(*uintptr)(unsafe.Pointer(bp + 296 + 4*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+3)*8)) // script

	bodyShared = libc.BoolInt32(!(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+3)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+3)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+3)*8)))
	}(), ts+6357) != 0))
	XTcl_ListObjAppendElement(tls, uintptr(0), handlersObj,
		XTcl_NewListObj(tls, 5, bp+296))
	haveHandlers = 1
	i = i + 3
	goto __14
__14:
	;
	goto __7
__7:
	i++
	goto __6
	goto __8
__8:
	;
	if !(bodyShared != 0) {
		goto __66
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+18689, -1))
__67:
	_objPtr8 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr8)).FrefCount, 1) <= 1) {
		goto __70
	}
	XTclFreeObj(tls, _objPtr8)
__70:
	;
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+248, ts+4178, ts+7949, ts+18409, ts+18741,
		uintptr(0)))
	return TCL_ERROR
__66:
	;
	if !!(haveHandlers != 0) {
		goto __71
	}
__72:
	_objPtr9 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr9)).FrefCount, 1) <= 1) {
		goto __75
	}
	XTclFreeObj(tls, _objPtr9)
__75:
	;
	goto __73
__73:
	if 0 != 0 {
		goto __72
	}
	goto __74
__74:
	;
	handlersObj = uintptr(0)
__71:
	;

	// Execute the body.

	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTryPostBody})), handlersObj, finallyObj,
		objv, uintptr(Intptr_t(objc)))
	return XTclNREvalObjEx(tls, interp, bodyObj, 0,
		(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr, 1)
}

var handlerNames = [4]uintptr{
	ts + 18756, ts + 18764, ts + 18767, uintptr(0),
} /* tclCmdMZ.c:4842:23 */

//----------------------------------------------------------------------
//
// During --
//
//	This helper function patches together the updates to the interpreter's
//	return options that are needed when things fail during the processing
//	of a handler or finally script for the [try] command.
//
// Returns:
//	The new option dictionary.
//
//----------------------------------------------------------------------

func sDuring(tls *libc.TLS, interp uintptr, resultCode int32, oldOptions uintptr, errorInfo uintptr) uintptr { /* tclCmdMZ.c:4995:23: */
	var during uintptr
	var options uintptr

	if errorInfo != uintptr(0) {
		XTcl_AppendObjToErrorInfo(tls, interp, errorInfo)
	}
	options = XTcl_GetReturnOptions(tls, interp, resultCode)
	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			during = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(during)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(during)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(during)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(during)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(during)).Fbytes, ts+18772, uint64(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(during)).Fbytes + 7)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(during)).Flength = int32(uint64(unsafe.Sizeof([8]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(during)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(during)).FrefCount++
	XTcl_DictObjPut(tls, interp, options, during, oldOptions)
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = during
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(options)).FrefCount++
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _objPtr uintptr = oldOptions
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return options
}

//----------------------------------------------------------------------
//
// TryPostBody --
//
//	Callback to handle the outcome of the execution of the body of a 'try'
//	command.
//
//----------------------------------------------------------------------

func sTryPostBody(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdMZ.c:5032:1: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	var resultObj uintptr
	var options uintptr
	var handlersObj uintptr
	var finallyObj uintptr
	var cmdObj uintptr
	var objv uintptr
	var i int32
	// var dummy int32 at bp+48, 4

	// var code int32 at bp+64, 4

	var objc int32
	// var numHandlers int32 at bp+32, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	var errorCodeName uintptr
	// var errcode uintptr at bp+72, 8

	// var bits1 uintptr at bp+88, 8

	// var bits2 uintptr at bp+104, 8

	// var len1 int32 at bp+80, 4

	// var len2 int32 at bp+96, 4

	var j int32
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	// var varName uintptr at bp+112, 8

	var _objPtr4 uintptr
	var _objPtr5 uintptr
	var handlerBodyObj uintptr
	var _objPtr6 uintptr
	var found int32
	// var handlers uintptr at bp+40, 8

	// var info uintptr at bp+56, 8

	var _objPtr7 uintptr
	var _objPtr8 uintptr
	*(*int32)(unsafe.Pointer(bp + 32 /* numHandlers */)) = 0

	handlersObj = *(*ClientData)(unsafe.Pointer(data))
	finallyObj = *(*ClientData)(unsafe.Pointer(data + 1*8))
	objv = *(*ClientData)(unsafe.Pointer(data + 2*8))
	objc = int32(*(*ClientData)(unsafe.Pointer(data + 3*8)))

	cmdObj = *(*uintptr)(unsafe.Pointer(objv))

	// Check for limits/rewinding, which override normal trapping behaviour.

	if !((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).Frewind != 0 || XTcl_LimitExceeded(tls, interp) != 0) {
		goto __1
	}
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+13661, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes
			}
			return XTcl_GetString(tls, cmdObj)
		}(),
			XTcl_GetErrorLine(tls, interp))))
	if !(handlersObj != uintptr(0)) {
		goto __2
	}
__3:
	_objPtr = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __6
	}
	XTclFreeObj(tls, _objPtr)
__6:
	;
	goto __4
__4:
	if 0 != 0 {
		goto __3
	}
	goto __5
__5:
	;
__2:
	;
	return TCL_ERROR
__1:
	;

	// Basic processing of the outcome of the script, including adding of
	// errorinfo trace.

	if !(result == TCL_ERROR) {
		goto __7
	}
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+13661, libc.VaList(bp+16, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes
			}
			return XTcl_GetString(tls, cmdObj)
		}(),
			XTcl_GetErrorLine(tls, interp))))
__7:
	;
	resultObj = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount++
	options = XTcl_GetReturnOptions(tls, interp, result)
	(*Tcl_Obj)(unsafe.Pointer(options)).FrefCount++
	XTcl_ResetResult(tls, interp)

	// Handle the results.

	if !(handlersObj != uintptr(0)) {
		goto __8
	}
	found = 0

	XTcl_ListObjGetElements(tls, uintptr(0), handlersObj, bp+32, bp+40)
	i = 0
__9:
	if !(i < *(*int32)(unsafe.Pointer(bp + 32))) {
		goto __11
	}

	XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* handlers */)) + uintptr(i)*8)), bp+48, bp+56)
	if !!(found != 0) {
		goto __12
	}
	XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* info */)) + 1*8)), bp+64)
	if !(*(*int32)(unsafe.Pointer(bp + 64)) != result) {
		goto __13
	}
	goto __10
__13:
	;

	// When processing an error, we must also perform list-prefix
	// matching of the errorcode list. However, if this was an
	// 'on' handler, the list that we are matching against will be
	// empty.

	if !(*(*int32)(unsafe.Pointer(bp + 64)) == TCL_ERROR) {
		goto __14
	}

__15:
	;
__18:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __21
	}
	XTclAllocateFreeObjects(tls)
__21:
	;
	errorCodeName = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
	(*Tcl_Obj)(unsafe.Pointer(errorCodeName)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0) {
		goto __22
	}
	(*Tcl_Obj)(unsafe.Pointer(errorCodeName)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(errorCodeName)).Flength = 0
	goto __23
__22:
	(*Tcl_Obj)(unsafe.Pointer(errorCodeName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(errorCodeName)).Fbytes, ts+12571, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(errorCodeName)).Fbytes + 10)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(errorCodeName)).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
__23:
	;
	(*Tcl_Obj)(unsafe.Pointer(errorCodeName)).FtypePtr = uintptr(0)

	goto __16
__16:
	if 0 != 0 {
		goto __15
	}
	goto __17
__17:
	;
	XTcl_DictObjGet(tls, uintptr(0), options, errorCodeName, bp+72)
__24:
	_objPtr1 = errorCodeName
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __27
	}
	XTclFreeObj(tls, _objPtr1)
__27:
	;
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* info */)) + 2*8)), bp+80, bp+88)
	if !(XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 72)), bp+96,
		bp+104) != TCL_OK) {
		goto __28
	}
	goto __10
__28:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 96)) < *(*int32)(unsafe.Pointer(bp + 80))) {
		goto __29
	}
	goto __10
__29:
	;
	j = 0
__30:
	if !(j < *(*int32)(unsafe.Pointer(bp + 80))) {
		goto __32
	}
	if !(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)) + uintptr(j)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)) + uintptr(j)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)) + uintptr(j)*8)))
	}(),
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104)) + uintptr(j)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104)) + uintptr(j)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104)) + uintptr(j)*8)))
		}()) != 0) {
		goto __33
	}
	// Really want 'continue outerloop;', but C does
	// not give us that.

	goto didNotMatch
__33:
	;
	goto __31
__31:
	j++
	goto __30
	goto __32
__32:
	;
__14:
	;

	found = 1
__12:
	;

	// Now we need to scan forward over "-" bodies. Note that we've
	// already checked that the last body is not a "-", so this search
	// will terminate successfully.

	if !!(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)) + 4*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)) + 4*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)) + 4*8)))
	}(), ts+6357) != 0) {
		goto __34
	}
	goto __10
__34:
	;

	// Bind the variables. We already know this is a list of variable
	// names, but it might be empty.

	XTcl_ResetResult(tls, interp)
	result = TCL_ERROR
	XTcl_ListObjLength(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* info */)) + 3*8)), bp+48)
	if !(*(*int32)(unsafe.Pointer(bp + 48)) > 0) {
		goto __35
	}

	XTcl_ListObjIndex(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* info */)) + 3*8)), 0, bp+112)
	if !(XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112)), uintptr(0), resultObj,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __37
	}
__38:
	_objPtr2 = resultObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __41
	}
	XTclFreeObj(tls, _objPtr2)
__41:
	;
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	goto handlerFailed
__37:
	;
__42:
	_objPtr3 = resultObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __45
	}
	XTclFreeObj(tls, _objPtr3)
__45:
	;
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 48)) > 1) {
		goto __46
	}
	XTcl_ListObjIndex(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* info */)) + 3*8)), 1, bp+112)
	if !(XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112)), uintptr(0), options,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __47
	}
	goto handlerFailed
__47:
	;
__46:
	;
	goto __36
__35:
	// Dispose of the result to prevent a memleak. [Bug 2910044]

__48:
	_objPtr4 = resultObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __51
	}
	XTclFreeObj(tls, _objPtr4)
__51:
	;
	goto __49
__49:
	if 0 != 0 {
		goto __48
	}
	goto __50
__50:
	;
__36:
	;

	// Evaluate the handler body and process the outcome. Note that we
	// need to keep the kind of handler for debugging purposes, and in
	// any case anything we want from info[] must be extracted right
	// now because the info[] array is about to become invalid. There
	// is very little refcount handling here however, since we know
	// that the objects that we still want to refer to now were input
	// arguments to [try] and so are still on the Tcl value stack.

	handlerBodyObj = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* info */)) + 4*8))
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTryPostHandler})), objv, options, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* info */)))),
		uintptr(func() int64 {
			if finallyObj == uintptr(0) {
				return int64(0)
			}
			return int64(objc - 1)
		}()))
__52:
	_objPtr5 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __55
	}
	XTclFreeObj(tls, _objPtr5)
__55:
	;
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
	return XTclNREvalObjEx(tls, interp, handlerBodyObj, 0,
		(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr, 4*i+5)

handlerFailed:
	resultObj = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount++
	options = sDuring(tls, interp, result, options, uintptr(0))
	goto __11

didNotMatch:
	goto __10
	goto __10
__10:
	i++
	goto __9
	goto __11
__11:
	;

	// No handler matched; get rid of the list of handlers.

__56:
	_objPtr6 = handlersObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __59
	}
	XTclFreeObj(tls, _objPtr6)
__59:
	;
	goto __57
__57:
	if 0 != 0 {
		goto __56
	}
	goto __58
__58:
	;
__8:
	;

	// Process the finally clause.

	if !(finallyObj != uintptr(0)) {
		goto __60
	}
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTryPostFinal})), resultObj, options, cmdObj,
		uintptr(0))
	return XTclNREvalObjEx(tls, interp, finallyObj, 0,
		(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr, objc-1)
__60:
	;

	// Install the correct result/options into the interpreter and clean up
	// any temporary storage.

	result = XTcl_SetReturnOptions(tls, interp, options)
__61:
	_objPtr7 = options
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __64
	}
	XTclFreeObj(tls, _objPtr7)
__64:
	;
	goto __62
__62:
	if 0 != 0 {
		goto __61
	}
	goto __63
__63:
	;
	XTcl_SetObjResult(tls, interp, resultObj)
__65:
	_objPtr8 = resultObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr8)).FrefCount, 1) <= 1) {
		goto __68
	}
	XTclFreeObj(tls, _objPtr8)
__68:
	;
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
	return result
}

//----------------------------------------------------------------------
//
// TryPostHandler --
//
//	Callback to handle the outcome of the execution of a handler of a
//	'try' command.
//
//----------------------------------------------------------------------

func sTryPostHandler(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdMZ.c:5247:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var resultObj uintptr
	var cmdObj uintptr
	var options uintptr
	var handlerKindObj uintptr
	var objv uintptr
	var finallyObj uintptr
	var finallyIndex int32

	objv = *(*ClientData)(unsafe.Pointer(data))
	options = *(*ClientData)(unsafe.Pointer(data + 1*8))
	handlerKindObj = *(*ClientData)(unsafe.Pointer(data + 2*8))
	finallyIndex = int32(*(*ClientData)(unsafe.Pointer(data + 3*8)))

	cmdObj = *(*uintptr)(unsafe.Pointer(objv))
	if finallyIndex != 0 {
		finallyObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(finallyIndex)*8))
	} else {
		finallyObj = uintptr(0)
	}

	// Check for limits/rewinding, which override normal trapping behaviour.

	if (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).Frewind != 0 || XTcl_LimitExceeded(tls, interp) != 0 {
		options = sDuring(tls, interp, result, options, XTcl_ObjPrintf(tls,
			ts+18780,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes
				}
				return XTcl_GetString(tls, cmdObj)
			}(), func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(handlerKindObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(handlerKindObj)).Fbytes
				}
				return XTcl_GetString(tls, handlerKindObj)
			}(),
				XTcl_GetErrorLine(tls, interp))))
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = options
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return TCL_ERROR
	}

	// The handler result completely substitutes for the result of the body.

	resultObj = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount++
	if result == TCL_ERROR {
		options = sDuring(tls, interp, result, options, XTcl_ObjPrintf(tls,
			ts+18780,
			libc.VaList(bp+24, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes
				}
				return XTcl_GetString(tls, cmdObj)
			}(), func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(handlerKindObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(handlerKindObj)).Fbytes
				}
				return XTcl_GetString(tls, handlerKindObj)
			}(),
				XTcl_GetErrorLine(tls, interp))))
	} else {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = options
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		options = XTcl_GetReturnOptions(tls, interp, result)
		(*Tcl_Obj)(unsafe.Pointer(options)).FrefCount++
	}

	// Process the finally clause if it is present.

	if finallyObj != uintptr(0) {
		var iPtr uintptr = interp

		XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sTryPostFinal})), resultObj, options, cmdObj,
			uintptr(0))

		// The 'finally' script is always the last argument word.
		return XTclNREvalObjEx(tls, interp, finallyObj, 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr,
			finallyIndex)
	}

	// Install the correct result/options into the interpreter and clean up
	// any temporary storage.

	result = XTcl_SetReturnOptions(tls, interp, options)
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = options
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _objPtr uintptr = resultObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// TryPostFinal --
//
//	Callback to handle the outcome of the execution of the finally script
//	of a 'try' command.
//
//----------------------------------------------------------------------

func sTryPostFinal(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclCmdMZ.c:5333:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var resultObj uintptr
	var options uintptr
	var cmdObj uintptr

	resultObj = *(*ClientData)(unsafe.Pointer(data))
	options = *(*ClientData)(unsafe.Pointer(data + 1*8))
	cmdObj = *(*ClientData)(unsafe.Pointer(data + 2*8))

	// If the result wasn't OK, we need to adjust the result options.

	if result != TCL_OK {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = resultObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		resultObj = uintptr(0)
		if result == TCL_ERROR {
			options = sDuring(tls, interp, result, options, XTcl_ObjPrintf(tls,
				ts+18815,
				libc.VaList(bp, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes
					}
					return XTcl_GetString(tls, cmdObj)
				}(), XTcl_GetErrorLine(tls, interp))))
		} else {
			var origOptions uintptr = options

			options = XTcl_GetReturnOptions(tls, interp, result)
			(*Tcl_Obj)(unsafe.Pointer(options)).FrefCount++
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = origOptions
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
	}

	// Install the correct result/options into the interpreter and clean up
	// any temporary storage.

	result = XTcl_SetReturnOptions(tls, interp, options)
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = options
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if resultObj != uintptr(0) {
		XTcl_SetObjResult(tls, interp, resultObj)
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = resultObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_WhileObjCmd --
//
//	This procedure is invoked to process the "while" Tcl command. See the
//	user documentation for details on what it does.
//
//	With the bytecode compiler, this procedure is only called when a
//	command name is computed at runtime, and is "while" or the name to
//	which "while" was renamed: e.g., "set z while; $z {$i<100} {}"
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_WhileObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:5400:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRWhileObjCmd})), dummy, objc, objv)
}

func XTclNRWhileObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCmdMZ.c:5410:1: */
	var iterPtr uintptr

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18852)
		return TCL_ERROR
	}

	// We reuse [for]'s callback, passing a NULL for the 'next' script.

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr
		{
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			_objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		iterPtr = _objPtr
	}
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fcond = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fbody = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fnext = uintptr(0)
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fmsg = ts + 18865 /* "\n    (\"while\" bo..." */
	(*ForIterData)(unsafe.Pointer(iterPtr)).Fword = 2

	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _callbackPtr uintptr
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRForIterCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = iterPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclListLines --
//
//	???
//
// Results:
//	Filled in array of line numbers?
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclListLines(tls *libc.TLS, listObj uintptr, line int32, n int32, lines uintptr, elems uintptr) { /* tclCmdMZ.c:5456:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)
	*(*int32)(unsafe.Pointer(bp + 16)) = line

	var listStr uintptr = XTcl_GetString(tls, listObj)
	var listHead uintptr = listStr
	var i int32
	var length int32 = int32(libc.Xstrlen(tls, listStr))
	*(*uintptr)(unsafe.Pointer(bp /* element */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 8 /* next */)) = uintptr(0)
	var clLocPtr uintptr = XTclContinuationsGet(tls, listObj)
	*(*uintptr)(unsafe.Pointer(bp + 24 /* clNext */)) = func() uintptr {
		if clLocPtr != 0 {
			return clLocPtr + 4
		}
		return uintptr(0)
	}()

	for i = 0; i < n; i++ {
		XTclFindElement(tls, uintptr(0), listStr, length, bp, bp+8, uintptr(0), uintptr(0))

		XTclAdvanceLines(tls, bp+16, listStr, *(*uintptr)(unsafe.Pointer(bp /* element */)))
		// Leading whitespace
		XTclAdvanceContinuations(tls, bp+16, bp+24, int32((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(listHead))/1))
		if elems != 0 && *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 {
			XTclContinuationsEnterDerived(tls, *(*uintptr)(unsafe.Pointer(elems + uintptr(i)*8)), int32((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(listHead))/1), *(*uintptr)(unsafe.Pointer(bp + 24 /* clNext */)))
		}
		*(*int32)(unsafe.Pointer(lines + uintptr(i)*4)) = *(*int32)(unsafe.Pointer(bp + 16 /* line */))
		length = int32(int64(length) - (int64(*(*uintptr)(unsafe.Pointer(bp + 8)))-int64(listStr))/1)
		XTclAdvanceLines(tls, bp+16, *(*uintptr)(unsafe.Pointer(bp /* element */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* next */)))
		// Element
		listStr = *(*uintptr)(unsafe.Pointer(bp + 8 /* next */))

		if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) == 0 {
			// ASSERT i == n
			break
		}
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The structures below define the AuxData types defined in this file.

var foreachInfoType = AuxDataType{
	Fname:            ts + 18893,
	FdupProc:         0, // dupProc
	FfreeProc:        0, // freeProc
	FprintProc:       0, // printProc
	FdisassembleProc: 0, // disassembleProc
} /* tclCompCmds.c:57:26 */

var newForeachInfoType = AuxDataType{
	Fname:            ts + 18905,
	FdupProc:         0, // dupProc
	FfreeProc:        0, // freeProc
	FprintProc:       0, // printProc
	FdisassembleProc: 0, // disassembleProc
} /* tclCompCmds.c:65:26 */

var dictUpdateInfoType = AuxDataType{
	Fname:            ts + 18920,
	FdupProc:         0, // dupProc
	FfreeProc:        0, // freeProc
	FprintProc:       0, // printProc
	FdisassembleProc: 0, // disassembleProc
} /* tclCompCmds.c:73:26 */

//----------------------------------------------------------------------
//
// TclGetAuxDataType --
//
//	This procedure looks up an Auxdata type by name.
//
// Results:
//	If an AuxData type with name matching "typeName" is found, a pointer
//	to its AuxDataType structure is returned; otherwise, NULL is returned.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetAuxDataType(tls *libc.TLS, typeName uintptr) uintptr { /* tclCompCmds.c:98:19: */
	if !(libc.Xstrcmp(tls, typeName, foreachInfoType.Fname) != 0) {
		return uintptr(unsafe.Pointer(&foreachInfoType))
	} else if !(libc.Xstrcmp(tls, typeName, newForeachInfoType.Fname) != 0) {
		return uintptr(unsafe.Pointer(&newForeachInfoType))
	} else if !(libc.Xstrcmp(tls, typeName, dictUpdateInfoType.Fname) != 0) {
		return uintptr(unsafe.Pointer(&dictUpdateInfoType))
	} else if !(libc.Xstrcmp(tls, typeName, XtclJumptableInfoType.Fname) != 0) {
		return uintptr(unsafe.Pointer(&XtclJumptableInfoType))
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclCompileAppendCmd --
//
//	Procedure called to compile the "append" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "append" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileAppendCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:133:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var varTokenPtr uintptr
	var valueTokenPtr uintptr
	// var isScalar int32 at bp+4, 4

	// var localIndex int32 at bp, 4

	var numWords int32
	var i int32
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _delta7 int32
	var _delta8 int32
	var _delta9 int32
	var _objIndexCopy1 int32
	var _delta10 int32
	var _delta11 int32
	var _delta12 int32
	var _delta13 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1

	// TODO: Consider support for compiling expanded args.
	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	if !(numWords == 1) {
		goto __1
	}
	return TCL_ERROR
	goto __2
__1:
	if !(numWords == 2) {
		goto __3
	}
	// append varName == set varName

	return XTclCompileSetCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	goto __4
__3:
	if !(numWords > 3) {
		goto __5
	}
	// APPEND instructions currently only handle one value, but we can
	// handle some multi-value cases by stringing them together.

	goto appendMultiple
__5:
	;
__4:
	;
__2:
	;

	// Decide if we can use a frame slot for the var/array name or if we need
	// to emit code to compute and push the name at runtime. We use a frame
	// slot (entry in the array of local vars) if we are compiling a procedure
	// body and if the name is simple text that does not include namespace
	// qualifiers.

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, varTokenPtr, envPtr, 0, bp, bp+4)

	// We are doing an assignment, otherwise TclCompileSetCmd was called, so
	// push the new value. This will need to be extended to push a value for
	// each argument.

	valueTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __6
	}
__8:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __11
	}
__13:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __16
	}
	XTclExpandCodeArray(tls, envPtr)
__16:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __17
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__17:
	;
__18:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __21
	}
	if !(_delta == -0x7fffffff-1) {
		goto __22
	}
	_delta = 1 - _objIndexCopy
__22:
	;
__23:
	if !(_delta < 0) {
		goto __26
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __27
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__27:
	;
__26:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
__21:
	;
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;
	goto __12
__11:
__28:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __31
	}
	XTclExpandCodeArray(tls, envPtr)
__31:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __32
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__32:
	;
__33:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __36
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __37
	}
	_delta1 = 1 - _objIndexCopy
__37:
	;
__38:
	if !(_delta1 < 0) {
		goto __41
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __42
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__42:
	;
__41:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
__36:
	;
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
__12:
	;
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	goto __7
__6:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
	XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
__7:
	;

	// Emit instructions to set/get the variable.

	if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) {
		goto __43
	}
	if !(*(*int32)(unsafe.Pointer(bp)) < 0) {
		goto __45
	}
__47:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __50
	}
	XTclExpandCodeArray(tls, envPtr)
__50:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_APPEND_STK)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __51
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_APPEND_STK == INST_START_CMD {
			return 1
		}
		return 0
	}()
__51:
	;
__52:
	_delta2 = XtclInstructionTable[INST_APPEND_STK].FstackEffect
	if !(_delta2 != 0) {
		goto __55
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __56
	}
	_delta2 = 1 - 0
__56:
	;
__57:
	if !(_delta2 < 0) {
		goto __60
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __61
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__61:
	;
__60:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __58
__58:
	if 0 != 0 {
		goto __57
	}
	goto __59
__59:
	;
__55:
	;
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
	goto __46
__45:
	if !(*(*int32)(unsafe.Pointer(bp)) <= 255) {
		goto __62
	}
__64:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __67
	}
	XTclExpandCodeArray(tls, envPtr)
__67:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_APPEND_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __68
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_APPEND_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__68:
	;
__69:
	_delta3 = XtclInstructionTable[INST_APPEND_SCALAR1].FstackEffect
	if !(_delta3 != 0) {
		goto __72
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __73
	}
	_delta3 = 1 - *(*int32)(unsafe.Pointer(bp))
__73:
	;
__74:
	if !(_delta3 < 0) {
		goto __77
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __78
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__78:
	;
__77:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __75
__75:
	if 0 != 0 {
		goto __74
	}
	goto __76
__76:
	;
__72:
	;
	goto __70
__70:
	if 0 != 0 {
		goto __69
	}
	goto __71
__71:
	;
	goto __65
__65:
	if 0 != 0 {
		goto __64
	}
	goto __66
__66:
	;
	goto __63
__62:
__79:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __82
	}
	XTclExpandCodeArray(tls, envPtr)
__82:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_APPEND_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __83
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_APPEND_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__83:
	;
__84:
	_delta4 = XtclInstructionTable[INST_APPEND_SCALAR4].FstackEffect
	if !(_delta4 != 0) {
		goto __87
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __88
	}
	_delta4 = 1 - *(*int32)(unsafe.Pointer(bp))
__88:
	;
__89:
	if !(_delta4 < 0) {
		goto __92
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __93
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__93:
	;
__92:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __90
__90:
	if 0 != 0 {
		goto __89
	}
	goto __91
__91:
	;
__87:
	;
	goto __85
__85:
	if 0 != 0 {
		goto __84
	}
	goto __86
__86:
	;
	goto __80
__80:
	if 0 != 0 {
		goto __79
	}
	goto __81
__81:
	;
__63:
	;

__46:
	;
	goto __44
__43:
	if !(*(*int32)(unsafe.Pointer(bp)) < 0) {
		goto __94
	}
__96:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __99
	}
	XTclExpandCodeArray(tls, envPtr)
__99:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_APPEND_ARRAY_STK)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __100
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_APPEND_ARRAY_STK == INST_START_CMD {
			return 1
		}
		return 0
	}()
__100:
	;
__101:
	_delta5 = XtclInstructionTable[INST_APPEND_ARRAY_STK].FstackEffect
	if !(_delta5 != 0) {
		goto __104
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __105
	}
	_delta5 = 1 - 0
__105:
	;
__106:
	if !(_delta5 < 0) {
		goto __109
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __110
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__110:
	;
__109:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __107
__107:
	if 0 != 0 {
		goto __106
	}
	goto __108
__108:
	;
__104:
	;
	goto __102
__102:
	if 0 != 0 {
		goto __101
	}
	goto __103
__103:
	;
	goto __97
__97:
	if 0 != 0 {
		goto __96
	}
	goto __98
__98:
	;
	goto __95
__94:
	if !(*(*int32)(unsafe.Pointer(bp)) <= 255) {
		goto __111
	}
__113:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __116
	}
	XTclExpandCodeArray(tls, envPtr)
__116:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_APPEND_ARRAY1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __117
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_APPEND_ARRAY1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__117:
	;
__118:
	_delta6 = XtclInstructionTable[INST_APPEND_ARRAY1].FstackEffect
	if !(_delta6 != 0) {
		goto __121
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __122
	}
	_delta6 = 1 - *(*int32)(unsafe.Pointer(bp))
__122:
	;
__123:
	if !(_delta6 < 0) {
		goto __126
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __127
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__127:
	;
__126:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __124
__124:
	if 0 != 0 {
		goto __123
	}
	goto __125
__125:
	;
__121:
	;
	goto __119
__119:
	if 0 != 0 {
		goto __118
	}
	goto __120
__120:
	;
	goto __114
__114:
	if 0 != 0 {
		goto __113
	}
	goto __115
__115:
	;
	goto __112
__111:
__128:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __131
	}
	XTclExpandCodeArray(tls, envPtr)
__131:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_APPEND_ARRAY4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __132
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_APPEND_ARRAY4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__132:
	;
__133:
	_delta7 = XtclInstructionTable[INST_APPEND_ARRAY4].FstackEffect
	if !(_delta7 != 0) {
		goto __136
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __137
	}
	_delta7 = 1 - *(*int32)(unsafe.Pointer(bp))
__137:
	;
__138:
	if !(_delta7 < 0) {
		goto __141
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __142
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__142:
	;
__141:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __139
__139:
	if 0 != 0 {
		goto __138
	}
	goto __140
__140:
	;
__136:
	;
	goto __134
__134:
	if 0 != 0 {
		goto __133
	}
	goto __135
__135:
	;
	goto __129
__129:
	if 0 != 0 {
		goto __128
	}
	goto __130
__130:
	;
__112:
	;

__95:
	;
__44:
	;

	return TCL_OK

appendMultiple:
	// Can only handle the case where we are appending to a local scalar when
	// there are multiple values to append.  Fortunately, this is common.

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	*(*int32)(unsafe.Pointer(bp /* localIndex */)) = XTclLocalScalarFromToken(tls, varTokenPtr, envPtr)
	if !(*(*int32)(unsafe.Pointer(bp)) < 0) {
		goto __143
	}
	return TCL_ERROR
__143:
	;

	// Definitely appending to a local scalar; generate the words and append
	// them.

	valueTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	i = 2
__144:
	if !(i < numWords) {
		goto __146
	}
	if !((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __147
	}
__149:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy1 <= 255) {
		goto __152
	}
__154:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __157
	}
	XTclExpandCodeArray(tls, envPtr)
__157:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __158
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__158:
	;
__159:
	_delta8 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta8 != 0) {
		goto __162
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __163
	}
	_delta8 = 1 - _objIndexCopy1
__163:
	;
__164:
	if !(_delta8 < 0) {
		goto __167
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __168
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__168:
	;
__167:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __165
__165:
	if 0 != 0 {
		goto __164
	}
	goto __166
__166:
	;
__162:
	;
	goto __160
__160:
	if 0 != 0 {
		goto __159
	}
	goto __161
__161:
	;
	goto __155
__155:
	if 0 != 0 {
		goto __154
	}
	goto __156
__156:
	;
	goto __153
__152:
__169:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __172
	}
	XTclExpandCodeArray(tls, envPtr)
__172:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __173
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__173:
	;
__174:
	_delta9 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta9 != 0) {
		goto __177
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __178
	}
	_delta9 = 1 - _objIndexCopy1
__178:
	;
__179:
	if !(_delta9 < 0) {
		goto __182
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __183
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__183:
	;
__182:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __180
__180:
	if 0 != 0 {
		goto __179
	}
	goto __181
__181:
	;
__177:
	;
	goto __175
__175:
	if 0 != 0 {
		goto __174
	}
	goto __176
__176:
	;
	goto __170
__170:
	if 0 != 0 {
		goto __169
	}
	goto __171
__171:
	;
__153:
	;
	goto __150
__150:
	if 0 != 0 {
		goto __149
	}
	goto __151
__151:
	;
	goto __148
__147:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
	XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
__148:
	;

	valueTokenPtr = valueTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents+1)*24
	goto __145
__145:
	i++
	goto __144
	goto __146
__146:
	;
__184:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __187
	}
	XTclExpandCodeArray(tls, envPtr)
__187:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords-2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords-2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords-2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords - 2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __188
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__188:
	;
__189:
	_delta10 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta10 != 0) {
		goto __192
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __193
	}
	_delta10 = 1 - (numWords - 2)
__193:
	;
__194:
	if !(_delta10 < 0) {
		goto __197
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __198
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__198:
	;
__197:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __195
__195:
	if 0 != 0 {
		goto __194
	}
	goto __196
__196:
	;
__192:
	;
	goto __190
__190:
	if 0 != 0 {
		goto __189
	}
	goto __191
__191:
	;
	goto __185
__185:
	if 0 != 0 {
		goto __184
	}
	goto __186
__186:
	;
	i = 2
__199:
	if !(i < numWords) {
		goto __201
	}
	if !(*(*int32)(unsafe.Pointer(bp)) <= 255) {
		goto __202
	}
__204:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __207
	}
	XTclExpandCodeArray(tls, envPtr)
__207:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_APPEND_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __208
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_APPEND_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__208:
	;
__209:
	_delta11 = XtclInstructionTable[INST_APPEND_SCALAR1].FstackEffect
	if !(_delta11 != 0) {
		goto __212
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __213
	}
	_delta11 = 1 - *(*int32)(unsafe.Pointer(bp))
__213:
	;
__214:
	if !(_delta11 < 0) {
		goto __217
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __218
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__218:
	;
__217:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __215
__215:
	if 0 != 0 {
		goto __214
	}
	goto __216
__216:
	;
__212:
	;
	goto __210
__210:
	if 0 != 0 {
		goto __209
	}
	goto __211
__211:
	;
	goto __205
__205:
	if 0 != 0 {
		goto __204
	}
	goto __206
__206:
	;
	goto __203
__202:
__219:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __222
	}
	XTclExpandCodeArray(tls, envPtr)
__222:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_APPEND_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __223
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_APPEND_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__223:
	;
__224:
	_delta12 = XtclInstructionTable[INST_APPEND_SCALAR4].FstackEffect
	if !(_delta12 != 0) {
		goto __227
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __228
	}
	_delta12 = 1 - *(*int32)(unsafe.Pointer(bp))
__228:
	;
__229:
	if !(_delta12 < 0) {
		goto __232
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __233
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__233:
	;
__232:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __230
__230:
	if 0 != 0 {
		goto __229
	}
	goto __231
__231:
	;
__227:
	;
	goto __225
__225:
	if 0 != 0 {
		goto __224
	}
	goto __226
__226:
	;
	goto __220
__220:
	if 0 != 0 {
		goto __219
	}
	goto __221
__221:
	;
__203:
	;

	if !(libc.PreIncInt32(&i, 1) < numWords) {
		goto __234
	}
__235:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __238
	}
	XTclExpandCodeArray(tls, envPtr)
__238:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __239
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__239:
	;
__240:
	_delta13 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta13 != 0) {
		goto __243
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __244
	}
	_delta13 = 1 - 0
__244:
	;
__245:
	if !(_delta13 < 0) {
		goto __248
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __249
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__249:
	;
__248:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __246
__246:
	if 0 != 0 {
		goto __245
	}
	goto __247
__247:
	;
__243:
	;
	goto __241
__241:
	if 0 != 0 {
		goto __240
	}
	goto __242
__242:
	;
	goto __236
__236:
	if 0 != 0 {
		goto __235
	}
	goto __237
__237:
	;
__234:
	;
	goto __200
__200:
	;
	goto __199
	goto __201
__201:
	;

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileArray*Cmd --
//
//	Functions called to compile "array" sucommands.
//
// Results:
//	All return TCL_OK for a successful compile, and TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "array" subcommand at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileArrayExistsCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:259:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	// var isScalar int32 at bp+4, 4

	// var localIndex int32 at bp, 4

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, tokenPtr, envPtr, TCL_NO_ELEMENT, bp, bp+4)
	if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) {
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp)) >= 0 {
		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_EXISTS_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_ARRAY_EXISTS_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_ARRAY_EXISTS_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - *(*int32)(unsafe.Pointer(bp))
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_EXISTS_STK)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_ARRAY_EXISTS_STK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_ARRAY_EXISTS_STK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileArraySetCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:291:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var varTokenPtr uintptr
	var dataTokenPtr uintptr
	// var isScalar int32 at bp+8, 4

	// var localIndex int32 at bp+4, 4

	var code int32
	var isDataLiteral int32
	var isDataValid int32
	var isDataEven int32
	// var len int32 at bp, 4

	var keyVar int32
	var valVar int32
	var infoIndex int32
	var fwd int32
	var offsetBack int32
	var offsetFwd int32
	var literalObj uintptr
	var infoPtr uintptr
	var _delta int32
	var _delta1 int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _delta7 int32
	var _delta8 int32
	var _delta9 int32
	var _delta10 int32
	var _objIndexCopy int32
	var _delta11 int32
	var _delta12 int32
	var _objIndexCopy1 int32
	var _delta13 int32
	var _delta14 int32
	var _delta15 int32
	var _delta16 int32
	var _delta17 int32
	var _delta18 int32
	var _delta19 int32
	var _delta20 int32
	var _objIndexCopy2 int32
	var _delta21 int32
	var _delta22 int32
	var _delta23 int32
	var _delta24 int32
	var _objIndexCopy3 int32
	var _delta25 int32
	var _delta26 int32
	var _delta27 int32
	var _delta28 int32
	var _objIndexCopy4 int32
	var _delta29 int32
	var _delta30 int32
	var _objIndexCopy5 int32
	var _delta31 int32
	var _delta32 int32
	var _delta33 int32
	var _delta34 int32
	var _delta35 int32
	var _delta36 int32
	var _delta37 int32
	var _delta38 int32
	var _delta39 int32
	var _delta40 int32
	var _delta41 int32
	var _delta42 int32
	var _delta43 int32
	var _objIndexCopy6 int32
	var _objPtr uintptr
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	code = TCL_OK

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	dataTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	literalObj = XTcl_NewObj(tls)
	isDataLiteral = XTclWordKnownAtCompileTime(tls, dataTokenPtr, literalObj)
	isDataValid = libc.Bool32(isDataLiteral != 0 &&
		XTcl_ListObjLength(tls, uintptr(0), literalObj, bp) == TCL_OK)
	isDataEven = libc.Bool32(isDataValid != 0 && *(*int32)(unsafe.Pointer(bp))&1 == 0)

	// Special case: literal odd-length argument is always an error.

	if !(isDataValid != 0 && !(isDataEven != 0)) {
		goto __2
	}
	// Abandon custom compile and let invocation raise the error
	code = XTclCompileBasic2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	goto done

	//
	//  We used to compile to the bytecode that would throw the error,
	//  but that was wrong because it would not invoke the array trace
	//  on the variable.
	//
	// 	PushStringLiteral(envPtr, "list must have an even number of elements");
	// 	PushStringLiteral(envPtr, "-errorcode {TCL ARGUMENT FORMAT}");
	// 	TclEmitInstInt4(INST_RETURN_IMM, TCL_ERROR,		envPtr);
	// 	TclEmitInt4(		0,				envPtr);
	// 	goto done;
	// 	 *
	//
__2:
	;

	// Except for the special "ensure array" case below, when we're not in
	// a proc, we cannot do a better compile than generic.

	if !((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD || (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr == uintptr(0) && !(isDataEven != 0 && *(*int32)(unsafe.Pointer(bp)) == 0)) {
		goto __3
	}
	code = XTclCompileBasic2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	goto done
__3:
	;

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, varTokenPtr, envPtr, TCL_NO_ELEMENT, bp+4, bp+8)
	if !!(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		goto __4
	}
	code = TCL_ERROR
	goto done
__4:
	;

	// Special case: literal empty value argument is just an "ensure array"
	// operation.

	if !(isDataEven != 0 && *(*int32)(unsafe.Pointer(bp)) == 0) {
		goto __5
	}
	if !(*(*int32)(unsafe.Pointer(bp + 4)) >= 0) {
		goto __6
	}
__8:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __11
	}
	XTclExpandCodeArray(tls, envPtr)
__11:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_EXISTS_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __12
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_ARRAY_EXISTS_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__12:
	;
__13:
	_delta = XtclInstructionTable[INST_ARRAY_EXISTS_IMM].FstackEffect
	if !(_delta != 0) {
		goto __16
	}
	if !(_delta == -0x7fffffff-1) {
		goto __17
	}
	_delta = 1 - *(*int32)(unsafe.Pointer(bp + 4))
__17:
	;
__18:
	if !(_delta < 0) {
		goto __21
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __22
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__22:
	;
__21:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
__16:
	;
	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
__23:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __26
	}
	XTclExpandCodeArray(tls, envPtr)
__26:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __27
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__27:
	;
__28:
	_delta1 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta1 != 0) {
		goto __31
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __32
	}
	_delta1 = 1 - 7
__32:
	;
__33:
	if !(_delta1 < 0) {
		goto __36
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __37
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__37:
	;
__36:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
__31:
	;
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
__38:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __41
	}
	XTclExpandCodeArray(tls, envPtr)
__41:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_MAKE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __42
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_ARRAY_MAKE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__42:
	;
__43:
	_delta2 = XtclInstructionTable[INST_ARRAY_MAKE_IMM].FstackEffect
	if !(_delta2 != 0) {
		goto __46
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __47
	}
	_delta2 = 1 - *(*int32)(unsafe.Pointer(bp + 4))
__47:
	;
__48:
	if !(_delta2 < 0) {
		goto __51
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __52
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__52:
	;
__51:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __49
__49:
	if 0 != 0 {
		goto __48
	}
	goto __50
__50:
	;
__46:
	;
	goto __44
__44:
	if 0 != 0 {
		goto __43
	}
	goto __45
__45:
	;
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	goto __7
__6:
__53:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __56
	}
	XTclExpandCodeArray(tls, envPtr)
__56:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __57
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__57:
	;
__58:
	_delta3 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta3 != 0) {
		goto __61
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __62
	}
	_delta3 = 1 - 0
__62:
	;
__63:
	if !(_delta3 < 0) {
		goto __66
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __67
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__67:
	;
__66:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __64
__64:
	if 0 != 0 {
		goto __63
	}
	goto __65
__65:
	;
__61:
	;
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
__68:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __71
	}
	XTclExpandCodeArray(tls, envPtr)
__71:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_EXISTS_STK)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __72
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_ARRAY_EXISTS_STK == INST_START_CMD {
			return 1
		}
		return 0
	}()
__72:
	;
__73:
	_delta4 = XtclInstructionTable[INST_ARRAY_EXISTS_STK].FstackEffect
	if !(_delta4 != 0) {
		goto __76
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __77
	}
	_delta4 = 1 - 0
__77:
	;
__78:
	if !(_delta4 < 0) {
		goto __81
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __82
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__82:
	;
__81:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __79
__79:
	if 0 != 0 {
		goto __78
	}
	goto __80
__80:
	;
__76:
	;
	goto __74
__74:
	if 0 != 0 {
		goto __73
	}
	goto __75
__75:
	;
	goto __69
__69:
	if 0 != 0 {
		goto __68
	}
	goto __70
__70:
	;
__83:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __86
	}
	XTclExpandCodeArray(tls, envPtr)
__86:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __87
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__87:
	;
__88:
	_delta5 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta5 != 0) {
		goto __91
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __92
	}
	_delta5 = 1 - 5
__92:
	;
__93:
	if !(_delta5 < 0) {
		goto __96
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __97
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__97:
	;
__96:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __94
__94:
	if 0 != 0 {
		goto __93
	}
	goto __95
__95:
	;
__91:
	;
	goto __89
__89:
	if 0 != 0 {
		goto __88
	}
	goto __90
__90:
	;
	goto __84
__84:
	if 0 != 0 {
		goto __83
	}
	goto __85
__85:
	;
__98:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __101
	}
	XTclExpandCodeArray(tls, envPtr)
__101:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_MAKE_STK)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __102
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_ARRAY_MAKE_STK == INST_START_CMD {
			return 1
		}
		return 0
	}()
__102:
	;
__103:
	_delta6 = XtclInstructionTable[INST_ARRAY_MAKE_STK].FstackEffect
	if !(_delta6 != 0) {
		goto __106
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __107
	}
	_delta6 = 1 - 0
__107:
	;
__108:
	if !(_delta6 < 0) {
		goto __111
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __112
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__112:
	;
__111:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __109
__109:
	if 0 != 0 {
		goto __108
	}
	goto __110
__110:
	;
__106:
	;
	goto __104
__104:
	if 0 != 0 {
		goto __103
	}
	goto __105
__105:
	;
	goto __99
__99:
	if 0 != 0 {
		goto __98
	}
	goto __100
__100:
	;
__113:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __116
	}
	XTclExpandCodeArray(tls, envPtr)
__116:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __117
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__117:
	;
__118:
	_delta7 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta7 != 0) {
		goto __121
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __122
	}
	_delta7 = 1 - 3
__122:
	;
__123:
	if !(_delta7 < 0) {
		goto __126
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __127
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__127:
	;
__126:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __124
__124:
	if 0 != 0 {
		goto __123
	}
	goto __125
__125:
	;
__121:
	;
	goto __119
__119:
	if 0 != 0 {
		goto __118
	}
	goto __120
__120:
	;
	goto __114
__114:
	if 0 != 0 {
		goto __113
	}
	goto __115
__115:
	;
	// Each branch decrements stack depth, but we only take one.
__128:
	if !(1 < 0) {
		goto __131
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __132
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__132:
	;
__131:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
	goto __129
__129:
	if 0 != 0 {
		goto __128
	}
	goto __130
__130:
	;
__133:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __136
	}
	XTclExpandCodeArray(tls, envPtr)
__136:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __137
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__137:
	;
__138:
	_delta8 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta8 != 0) {
		goto __141
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __142
	}
	_delta8 = 1 - 0
__142:
	;
__143:
	if !(_delta8 < 0) {
		goto __146
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __147
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__147:
	;
__146:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __144
__144:
	if 0 != 0 {
		goto __143
	}
	goto __145
__145:
	;
__141:
	;
	goto __139
__139:
	if 0 != 0 {
		goto __138
	}
	goto __140
__140:
	;
	goto __134
__134:
	if 0 != 0 {
		goto __133
	}
	goto __135
__135:
	;
__7:
	;
__148:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy <= 255) {
		goto __151
	}
__153:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __156
	}
	XTclExpandCodeArray(tls, envPtr)
__156:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __157
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__157:
	;
__158:
	_delta9 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta9 != 0) {
		goto __161
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __162
	}
	_delta9 = 1 - _objIndexCopy
__162:
	;
__163:
	if !(_delta9 < 0) {
		goto __166
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __167
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__167:
	;
__166:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __164
__164:
	if 0 != 0 {
		goto __163
	}
	goto __165
__165:
	;
__161:
	;
	goto __159
__159:
	if 0 != 0 {
		goto __158
	}
	goto __160
__160:
	;
	goto __154
__154:
	if 0 != 0 {
		goto __153
	}
	goto __155
__155:
	;
	goto __152
__151:
__168:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __171
	}
	XTclExpandCodeArray(tls, envPtr)
__171:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __172
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__172:
	;
__173:
	_delta10 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta10 != 0) {
		goto __176
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __177
	}
	_delta10 = 1 - _objIndexCopy
__177:
	;
__178:
	if !(_delta10 < 0) {
		goto __181
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __182
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__182:
	;
__181:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __179
__179:
	if 0 != 0 {
		goto __178
	}
	goto __180
__180:
	;
__176:
	;
	goto __174
__174:
	if 0 != 0 {
		goto __173
	}
	goto __175
__175:
	;
	goto __169
__169:
	if 0 != 0 {
		goto __168
	}
	goto __170
__170:
	;
__152:
	;
	goto __149
__149:
	if 0 != 0 {
		goto __148
	}
	goto __150
__150:
	;
	goto done
__5:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 4)) < 0) {
		goto __183
	}
	// a non-local variable: upvar from a local one! This consumes the
	// variable name that was left at stacktop.

	*(*int32)(unsafe.Pointer(bp + 4 /* localIndex */)) = XTclFindCompiledLocal(tls, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Fstart,
		(*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Fsize, 1, envPtr)
__184:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy1 <= 255) {
		goto __187
	}
__189:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __192
	}
	XTclExpandCodeArray(tls, envPtr)
__192:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __193
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__193:
	;
__194:
	_delta11 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta11 != 0) {
		goto __197
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __198
	}
	_delta11 = 1 - _objIndexCopy1
__198:
	;
__199:
	if !(_delta11 < 0) {
		goto __202
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __203
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__203:
	;
__202:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __200
__200:
	if 0 != 0 {
		goto __199
	}
	goto __201
__201:
	;
__197:
	;
	goto __195
__195:
	if 0 != 0 {
		goto __194
	}
	goto __196
__196:
	;
	goto __190
__190:
	if 0 != 0 {
		goto __189
	}
	goto __191
__191:
	;
	goto __188
__187:
__204:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __207
	}
	XTclExpandCodeArray(tls, envPtr)
__207:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __208
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__208:
	;
__209:
	_delta12 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta12 != 0) {
		goto __212
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __213
	}
	_delta12 = 1 - _objIndexCopy1
__213:
	;
__214:
	if !(_delta12 < 0) {
		goto __217
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __218
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__218:
	;
__217:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __215
__215:
	if 0 != 0 {
		goto __214
	}
	goto __216
__216:
	;
__212:
	;
	goto __210
__210:
	if 0 != 0 {
		goto __209
	}
	goto __211
__211:
	;
	goto __205
__205:
	if 0 != 0 {
		goto __204
	}
	goto __206
__206:
	;
__188:
	;
	goto __185
__185:
	if 0 != 0 {
		goto __184
	}
	goto __186
__186:
	;
__219:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __222
	}
	XTclExpandCodeArray(tls, envPtr)
__222:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __223
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__223:
	;
__224:
	_delta13 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta13 != 0) {
		goto __227
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __228
	}
	_delta13 = 1 - 2
__228:
	;
__229:
	if !(_delta13 < 0) {
		goto __232
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __233
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__233:
	;
__232:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __230
__230:
	if 0 != 0 {
		goto __229
	}
	goto __231
__231:
	;
__227:
	;
	goto __225
__225:
	if 0 != 0 {
		goto __224
	}
	goto __226
__226:
	;
	goto __220
__220:
	if 0 != 0 {
		goto __219
	}
	goto __221
__221:
	;
__234:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __237
	}
	XTclExpandCodeArray(tls, envPtr)
__237:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UPVAR)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __238
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_UPVAR == INST_START_CMD {
			return 1
		}
		return 0
	}()
__238:
	;
__239:
	_delta14 = XtclInstructionTable[INST_UPVAR].FstackEffect
	if !(_delta14 != 0) {
		goto __242
	}
	if !(_delta14 == -0x7fffffff-1) {
		goto __243
	}
	_delta14 = 1 - *(*int32)(unsafe.Pointer(bp + 4))
__243:
	;
__244:
	if !(_delta14 < 0) {
		goto __247
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __248
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__248:
	;
__247:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta14
	goto __245
__245:
	if 0 != 0 {
		goto __244
	}
	goto __246
__246:
	;
__242:
	;
	goto __240
__240:
	if 0 != 0 {
		goto __239
	}
	goto __241
__241:
	;
	goto __235
__235:
	if 0 != 0 {
		goto __234
	}
	goto __236
__236:
	;
__249:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __252
	}
	XTclExpandCodeArray(tls, envPtr)
__252:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __253
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__253:
	;
__254:
	_delta15 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta15 != 0) {
		goto __257
	}
	if !(_delta15 == -0x7fffffff-1) {
		goto __258
	}
	_delta15 = 1 - 0
__258:
	;
__259:
	if !(_delta15 < 0) {
		goto __262
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __263
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__263:
	;
__262:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta15
	goto __260
__260:
	if 0 != 0 {
		goto __259
	}
	goto __261
__261:
	;
__257:
	;
	goto __255
__255:
	if 0 != 0 {
		goto __254
	}
	goto __256
__256:
	;
	goto __250
__250:
	if 0 != 0 {
		goto __249
	}
	goto __251
__251:
	;
__183:
	;

	// Prepare for the internal foreach.

	keyVar = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	valVar = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)

	infoPtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+16))+uint64(unsafe.Sizeof(uintptr(0)))))
	(*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists = 1
	*(*uintptr)(unsafe.Pointer(infoPtr + 16)) = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+4))+uint64(2)*uint64(unsafe.Sizeof(int32(0)))))
	(*ForeachVarList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(infoPtr + 16)))).FnumVars = 2
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(infoPtr + 16)) + 4)) = keyVar
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(infoPtr + 16)) + 4 + 1*4)) = valVar
	infoIndex = XTclCreateAuxData(tls, infoPtr, uintptr(unsafe.Pointer(&newForeachInfoType)), envPtr)

	// Start issuing instructions to write to the array.

__264:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __267
	}
	XTclExpandCodeArray(tls, envPtr)
__267:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_EXISTS_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __268
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_ARRAY_EXISTS_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__268:
	;
__269:
	_delta16 = XtclInstructionTable[INST_ARRAY_EXISTS_IMM].FstackEffect
	if !(_delta16 != 0) {
		goto __272
	}
	if !(_delta16 == -0x7fffffff-1) {
		goto __273
	}
	_delta16 = 1 - *(*int32)(unsafe.Pointer(bp + 4))
__273:
	;
__274:
	if !(_delta16 < 0) {
		goto __277
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __278
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__278:
	;
__277:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta16
	goto __275
__275:
	if 0 != 0 {
		goto __274
	}
	goto __276
__276:
	;
__272:
	;
	goto __270
__270:
	if 0 != 0 {
		goto __269
	}
	goto __271
__271:
	;
	goto __265
__265:
	if 0 != 0 {
		goto __264
	}
	goto __266
__266:
	;
__279:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __282
	}
	XTclExpandCodeArray(tls, envPtr)
__282:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __283
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__283:
	;
__284:
	_delta17 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta17 != 0) {
		goto __287
	}
	if !(_delta17 == -0x7fffffff-1) {
		goto __288
	}
	_delta17 = 1 - 7
__288:
	;
__289:
	if !(_delta17 < 0) {
		goto __292
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __293
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__293:
	;
__292:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta17
	goto __290
__290:
	if 0 != 0 {
		goto __289
	}
	goto __291
__291:
	;
__287:
	;
	goto __285
__285:
	if 0 != 0 {
		goto __284
	}
	goto __286
__286:
	;
	goto __280
__280:
	if 0 != 0 {
		goto __279
	}
	goto __281
__281:
	;
__294:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __297
	}
	XTclExpandCodeArray(tls, envPtr)
__297:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_MAKE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __298
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_ARRAY_MAKE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__298:
	;
__299:
	_delta18 = XtclInstructionTable[INST_ARRAY_MAKE_IMM].FstackEffect
	if !(_delta18 != 0) {
		goto __302
	}
	if !(_delta18 == -0x7fffffff-1) {
		goto __303
	}
	_delta18 = 1 - *(*int32)(unsafe.Pointer(bp + 4))
__303:
	;
__304:
	if !(_delta18 < 0) {
		goto __307
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __308
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__308:
	;
__307:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta18
	goto __305
__305:
	if 0 != 0 {
		goto __304
	}
	goto __306
__306:
	;
__302:
	;
	goto __300
__300:
	if 0 != 0 {
		goto __299
	}
	goto __301
__301:
	;
	goto __295
__295:
	if 0 != 0 {
		goto __294
	}
	goto __296
__296:
	;

	if !((*Tcl_Token)(unsafe.Pointer(dataTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __309
	}
__311:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(dataTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(dataTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy2 <= 255) {
		goto __314
	}
__316:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __319
	}
	XTclExpandCodeArray(tls, envPtr)
__319:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __320
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__320:
	;
__321:
	_delta19 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta19 != 0) {
		goto __324
	}
	if !(_delta19 == -0x7fffffff-1) {
		goto __325
	}
	_delta19 = 1 - _objIndexCopy2
__325:
	;
__326:
	if !(_delta19 < 0) {
		goto __329
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __330
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__330:
	;
__329:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta19
	goto __327
__327:
	if 0 != 0 {
		goto __326
	}
	goto __328
__328:
	;
__324:
	;
	goto __322
__322:
	if 0 != 0 {
		goto __321
	}
	goto __323
__323:
	;
	goto __317
__317:
	if 0 != 0 {
		goto __316
	}
	goto __318
__318:
	;
	goto __315
__314:
__331:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __334
	}
	XTclExpandCodeArray(tls, envPtr)
__334:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __335
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__335:
	;
__336:
	_delta20 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta20 != 0) {
		goto __339
	}
	if !(_delta20 == -0x7fffffff-1) {
		goto __340
	}
	_delta20 = 1 - _objIndexCopy2
__340:
	;
__341:
	if !(_delta20 < 0) {
		goto __344
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __345
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__345:
	;
__344:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta20
	goto __342
__342:
	if 0 != 0 {
		goto __341
	}
	goto __343
__343:
	;
__339:
	;
	goto __337
__337:
	if 0 != 0 {
		goto __336
	}
	goto __338
__338:
	;
	goto __332
__332:
	if 0 != 0 {
		goto __331
	}
	goto __333
__333:
	;
__315:
	;
	goto __312
__312:
	if 0 != 0 {
		goto __311
	}
	goto __313
__313:
	;
	goto __310
__309:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
	XTclCompileTokens(tls, interp, dataTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(dataTokenPtr)).FnumComponents, envPtr)
__310:
	;

	if !(!(isDataLiteral != 0) || !(isDataValid != 0)) {
		goto __346
	}
	// Only need this safety check if we're handling a non-literal or list
	// containing an invalid literal; with valid list literals, we've
	// already checked (worth it because literals are a very common
	// use-case with [array set]).

__347:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __350
	}
	XTclExpandCodeArray(tls, envPtr)
__350:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __351
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__351:
	;
__352:
	_delta21 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta21 != 0) {
		goto __355
	}
	if !(_delta21 == -0x7fffffff-1) {
		goto __356
	}
	_delta21 = 1 - 0
__356:
	;
__357:
	if !(_delta21 < 0) {
		goto __360
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __361
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__361:
	;
__360:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta21
	goto __358
__358:
	if 0 != 0 {
		goto __357
	}
	goto __359
__359:
	;
__355:
	;
	goto __353
__353:
	if 0 != 0 {
		goto __352
	}
	goto __354
__354:
	;
	goto __348
__348:
	if 0 != 0 {
		goto __347
	}
	goto __349
__349:
	;
__362:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __365
	}
	XTclExpandCodeArray(tls, envPtr)
__365:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_LENGTH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __366
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST_LENGTH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__366:
	;
__367:
	_delta22 = XtclInstructionTable[INST_LIST_LENGTH].FstackEffect
	if !(_delta22 != 0) {
		goto __370
	}
	if !(_delta22 == -0x7fffffff-1) {
		goto __371
	}
	_delta22 = 1 - 0
__371:
	;
__372:
	if !(_delta22 < 0) {
		goto __375
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __376
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__376:
	;
__375:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta22
	goto __373
__373:
	if 0 != 0 {
		goto __372
	}
	goto __374
__374:
	;
__370:
	;
	goto __368
__368:
	if 0 != 0 {
		goto __367
	}
	goto __369
__369:
	;
	goto __363
__363:
	if 0 != 0 {
		goto __362
	}
	goto __364
__364:
	;
__377:
	_objIndexCopy3 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy3 <= 255) {
		goto __380
	}
__382:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __385
	}
	XTclExpandCodeArray(tls, envPtr)
__385:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __386
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__386:
	;
__387:
	_delta23 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta23 != 0) {
		goto __390
	}
	if !(_delta23 == -0x7fffffff-1) {
		goto __391
	}
	_delta23 = 1 - _objIndexCopy3
__391:
	;
__392:
	if !(_delta23 < 0) {
		goto __395
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __396
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__396:
	;
__395:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta23
	goto __393
__393:
	if 0 != 0 {
		goto __392
	}
	goto __394
__394:
	;
__390:
	;
	goto __388
__388:
	if 0 != 0 {
		goto __387
	}
	goto __389
__389:
	;
	goto __383
__383:
	if 0 != 0 {
		goto __382
	}
	goto __384
__384:
	;
	goto __381
__380:
__397:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __400
	}
	XTclExpandCodeArray(tls, envPtr)
__400:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __401
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__401:
	;
__402:
	_delta24 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta24 != 0) {
		goto __405
	}
	if !(_delta24 == -0x7fffffff-1) {
		goto __406
	}
	_delta24 = 1 - _objIndexCopy3
__406:
	;
__407:
	if !(_delta24 < 0) {
		goto __410
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __411
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__411:
	;
__410:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta24
	goto __408
__408:
	if 0 != 0 {
		goto __407
	}
	goto __409
__409:
	;
__405:
	;
	goto __403
__403:
	if 0 != 0 {
		goto __402
	}
	goto __404
__404:
	;
	goto __398
__398:
	if 0 != 0 {
		goto __397
	}
	goto __399
__399:
	;
__381:
	;
	goto __378
__378:
	if 0 != 0 {
		goto __377
	}
	goto __379
__379:
	;
__412:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __415
	}
	XTclExpandCodeArray(tls, envPtr)
__415:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BITAND)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __416
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_BITAND == INST_START_CMD {
			return 1
		}
		return 0
	}()
__416:
	;
__417:
	_delta25 = XtclInstructionTable[INST_BITAND].FstackEffect
	if !(_delta25 != 0) {
		goto __420
	}
	if !(_delta25 == -0x7fffffff-1) {
		goto __421
	}
	_delta25 = 1 - 0
__421:
	;
__422:
	if !(_delta25 < 0) {
		goto __425
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __426
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__426:
	;
__425:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta25
	goto __423
__423:
	if 0 != 0 {
		goto __422
	}
	goto __424
__424:
	;
__420:
	;
	goto __418
__418:
	if 0 != 0 {
		goto __417
	}
	goto __419
__419:
	;
	goto __413
__413:
	if 0 != 0 {
		goto __412
	}
	goto __414
__414:
	;
	offsetFwd = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__427:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __430
	}
	XTclExpandCodeArray(tls, envPtr)
__430:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __431
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_FALSE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__431:
	;
__432:
	_delta26 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
	if !(_delta26 != 0) {
		goto __435
	}
	if !(_delta26 == -0x7fffffff-1) {
		goto __436
	}
	_delta26 = 1 - 0
__436:
	;
__437:
	if !(_delta26 < 0) {
		goto __440
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __441
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__441:
	;
__440:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta26
	goto __438
__438:
	if 0 != 0 {
		goto __437
	}
	goto __439
__439:
	;
__435:
	;
	goto __433
__433:
	if 0 != 0 {
		goto __432
	}
	goto __434
__434:
	;
	goto __428
__428:
	if 0 != 0 {
		goto __427
	}
	goto __429
__429:
	;
__442:
	_objIndexCopy4 = XTclRegisterLiteral(tls, envPtr, ts+18939, int32(uint64(unsafe.Sizeof([42]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy4 <= 255) {
		goto __445
	}
__447:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __450
	}
	XTclExpandCodeArray(tls, envPtr)
__450:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __451
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__451:
	;
__452:
	_delta27 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta27 != 0) {
		goto __455
	}
	if !(_delta27 == -0x7fffffff-1) {
		goto __456
	}
	_delta27 = 1 - _objIndexCopy4
__456:
	;
__457:
	if !(_delta27 < 0) {
		goto __460
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __461
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__461:
	;
__460:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta27
	goto __458
__458:
	if 0 != 0 {
		goto __457
	}
	goto __459
__459:
	;
__455:
	;
	goto __453
__453:
	if 0 != 0 {
		goto __452
	}
	goto __454
__454:
	;
	goto __448
__448:
	if 0 != 0 {
		goto __447
	}
	goto __449
__449:
	;
	goto __446
__445:
__462:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __465
	}
	XTclExpandCodeArray(tls, envPtr)
__465:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __466
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__466:
	;
__467:
	_delta28 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta28 != 0) {
		goto __470
	}
	if !(_delta28 == -0x7fffffff-1) {
		goto __471
	}
	_delta28 = 1 - _objIndexCopy4
__471:
	;
__472:
	if !(_delta28 < 0) {
		goto __475
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __476
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__476:
	;
__475:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta28
	goto __473
__473:
	if 0 != 0 {
		goto __472
	}
	goto __474
__474:
	;
__470:
	;
	goto __468
__468:
	if 0 != 0 {
		goto __467
	}
	goto __469
__469:
	;
	goto __463
__463:
	if 0 != 0 {
		goto __462
	}
	goto __464
__464:
	;
__446:
	;
	goto __443
__443:
	if 0 != 0 {
		goto __442
	}
	goto __444
__444:
	;
__477:
	_objIndexCopy5 = XTclRegisterLiteral(tls, envPtr, ts+18981, int32(uint64(unsafe.Sizeof([33]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy5 <= 255) {
		goto __480
	}
__482:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __485
	}
	XTclExpandCodeArray(tls, envPtr)
__485:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __486
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__486:
	;
__487:
	_delta29 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta29 != 0) {
		goto __490
	}
	if !(_delta29 == -0x7fffffff-1) {
		goto __491
	}
	_delta29 = 1 - _objIndexCopy5
__491:
	;
__492:
	if !(_delta29 < 0) {
		goto __495
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __496
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__496:
	;
__495:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta29
	goto __493
__493:
	if 0 != 0 {
		goto __492
	}
	goto __494
__494:
	;
__490:
	;
	goto __488
__488:
	if 0 != 0 {
		goto __487
	}
	goto __489
__489:
	;
	goto __483
__483:
	if 0 != 0 {
		goto __482
	}
	goto __484
__484:
	;
	goto __481
__480:
__497:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __500
	}
	XTclExpandCodeArray(tls, envPtr)
__500:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __501
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__501:
	;
__502:
	_delta30 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta30 != 0) {
		goto __505
	}
	if !(_delta30 == -0x7fffffff-1) {
		goto __506
	}
	_delta30 = 1 - _objIndexCopy5
__506:
	;
__507:
	if !(_delta30 < 0) {
		goto __510
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __511
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__511:
	;
__510:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta30
	goto __508
__508:
	if 0 != 0 {
		goto __507
	}
	goto __509
__509:
	;
__505:
	;
	goto __503
__503:
	if 0 != 0 {
		goto __502
	}
	goto __504
__504:
	;
	goto __498
__498:
	if 0 != 0 {
		goto __497
	}
	goto __499
__499:
	;
__481:
	;
	goto __478
__478:
	if 0 != 0 {
		goto __477
	}
	goto __479
__479:
	;
__512:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __515
	}
	XTclExpandCodeArray(tls, envPtr)
__515:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RETURN_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(TCL_ERROR))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __516
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_RETURN_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__516:
	;
__517:
	_delta31 = XtclInstructionTable[INST_RETURN_IMM].FstackEffect
	if !(_delta31 != 0) {
		goto __520
	}
	if !(_delta31 == -0x7fffffff-1) {
		goto __521
	}
	_delta31 = 1 - TCL_ERROR
__521:
	;
__522:
	if !(_delta31 < 0) {
		goto __525
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __526
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__526:
	;
__525:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta31
	goto __523
__523:
	if 0 != 0 {
		goto __522
	}
	goto __524
__524:
	;
__520:
	;
	goto __518
__518:
	if 0 != 0 {
		goto __517
	}
	goto __519
__519:
	;
	goto __513
__513:
	if 0 != 0 {
		goto __512
	}
	goto __514
__514:
	;
__527:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __530
	}
	XTclExpandCodeArray(tls, envPtr)
__530:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	goto __528
__528:
	if 0 != 0 {
		goto __527
	}
	goto __529
__529:
	;
__531:
	if !(-1 < 0) {
		goto __534
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __535
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__535:
	;
__534:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	goto __532
__532:
	if 0 != 0 {
		goto __531
	}
	goto __533
__533:
	;
	fwd = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(offsetFwd))
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(offsetFwd) + uintptr(1))) = uint8(uint32(fwd))
__346:
	;

__536:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __539
	}
	XTclExpandCodeArray(tls, envPtr)
__539:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_FOREACH_START)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __540
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_FOREACH_START == INST_START_CMD {
			return 1
		}
		return 0
	}()
__540:
	;
__541:
	_delta32 = XtclInstructionTable[INST_FOREACH_START].FstackEffect
	if !(_delta32 != 0) {
		goto __544
	}
	if !(_delta32 == -0x7fffffff-1) {
		goto __545
	}
	_delta32 = 1 - infoIndex
__545:
	;
__546:
	if !(_delta32 < 0) {
		goto __549
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __550
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__550:
	;
__549:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta32
	goto __547
__547:
	if 0 != 0 {
		goto __546
	}
	goto __548
__548:
	;
__544:
	;
	goto __542
__542:
	if 0 != 0 {
		goto __541
	}
	goto __543
__543:
	;
	goto __537
__537:
	if 0 != 0 {
		goto __536
	}
	goto __538
__538:
	;
	offsetBack = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	if !(keyVar <= 255) {
		goto __551
	}
__553:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __556
	}
	XTclExpandCodeArray(tls, envPtr)
__556:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __557
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__557:
	;
__558:
	_delta33 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta33 != 0) {
		goto __561
	}
	if !(_delta33 == -0x7fffffff-1) {
		goto __562
	}
	_delta33 = 1 - keyVar
__562:
	;
__563:
	if !(_delta33 < 0) {
		goto __566
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __567
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__567:
	;
__566:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta33
	goto __564
__564:
	if 0 != 0 {
		goto __563
	}
	goto __565
__565:
	;
__561:
	;
	goto __559
__559:
	if 0 != 0 {
		goto __558
	}
	goto __560
__560:
	;
	goto __554
__554:
	if 0 != 0 {
		goto __553
	}
	goto __555
__555:
	;
	goto __552
__551:
__568:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __571
	}
	XTclExpandCodeArray(tls, envPtr)
__571:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __572
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__572:
	;
__573:
	_delta34 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta34 != 0) {
		goto __576
	}
	if !(_delta34 == -0x7fffffff-1) {
		goto __577
	}
	_delta34 = 1 - keyVar
__577:
	;
__578:
	if !(_delta34 < 0) {
		goto __581
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __582
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__582:
	;
__581:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta34
	goto __579
__579:
	if 0 != 0 {
		goto __578
	}
	goto __580
__580:
	;
__576:
	;
	goto __574
__574:
	if 0 != 0 {
		goto __573
	}
	goto __575
__575:
	;
	goto __569
__569:
	if 0 != 0 {
		goto __568
	}
	goto __570
__570:
	;
__552:
	;

	if !(valVar <= 255) {
		goto __583
	}
__585:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __588
	}
	XTclExpandCodeArray(tls, envPtr)
__588:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __589
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__589:
	;
__590:
	_delta35 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta35 != 0) {
		goto __593
	}
	if !(_delta35 == -0x7fffffff-1) {
		goto __594
	}
	_delta35 = 1 - valVar
__594:
	;
__595:
	if !(_delta35 < 0) {
		goto __598
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __599
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__599:
	;
__598:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta35
	goto __596
__596:
	if 0 != 0 {
		goto __595
	}
	goto __597
__597:
	;
__593:
	;
	goto __591
__591:
	if 0 != 0 {
		goto __590
	}
	goto __592
__592:
	;
	goto __586
__586:
	if 0 != 0 {
		goto __585
	}
	goto __587
__587:
	;
	goto __584
__583:
__600:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __603
	}
	XTclExpandCodeArray(tls, envPtr)
__603:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __604
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__604:
	;
__605:
	_delta36 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta36 != 0) {
		goto __608
	}
	if !(_delta36 == -0x7fffffff-1) {
		goto __609
	}
	_delta36 = 1 - valVar
__609:
	;
__610:
	if !(_delta36 < 0) {
		goto __613
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __614
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__614:
	;
__613:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta36
	goto __611
__611:
	if 0 != 0 {
		goto __610
	}
	goto __612
__612:
	;
__608:
	;
	goto __606
__606:
	if 0 != 0 {
		goto __605
	}
	goto __607
__607:
	;
	goto __601
__601:
	if 0 != 0 {
		goto __600
	}
	goto __602
__602:
	;
__584:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 4)) <= 255) {
		goto __615
	}
__617:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __620
	}
	XTclExpandCodeArray(tls, envPtr)
__620:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_ARRAY1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __621
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_ARRAY1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__621:
	;
__622:
	_delta37 = XtclInstructionTable[INST_STORE_ARRAY1].FstackEffect
	if !(_delta37 != 0) {
		goto __625
	}
	if !(_delta37 == -0x7fffffff-1) {
		goto __626
	}
	_delta37 = 1 - *(*int32)(unsafe.Pointer(bp + 4))
__626:
	;
__627:
	if !(_delta37 < 0) {
		goto __630
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __631
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__631:
	;
__630:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta37
	goto __628
__628:
	if 0 != 0 {
		goto __627
	}
	goto __629
__629:
	;
__625:
	;
	goto __623
__623:
	if 0 != 0 {
		goto __622
	}
	goto __624
__624:
	;
	goto __618
__618:
	if 0 != 0 {
		goto __617
	}
	goto __619
__619:
	;
	goto __616
__615:
__632:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __635
	}
	XTclExpandCodeArray(tls, envPtr)
__635:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_ARRAY4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __636
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_ARRAY4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__636:
	;
__637:
	_delta38 = XtclInstructionTable[INST_STORE_ARRAY4].FstackEffect
	if !(_delta38 != 0) {
		goto __640
	}
	if !(_delta38 == -0x7fffffff-1) {
		goto __641
	}
	_delta38 = 1 - *(*int32)(unsafe.Pointer(bp + 4))
__641:
	;
__642:
	if !(_delta38 < 0) {
		goto __645
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __646
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__646:
	;
__645:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta38
	goto __643
__643:
	if 0 != 0 {
		goto __642
	}
	goto __644
__644:
	;
__640:
	;
	goto __638
__638:
	if 0 != 0 {
		goto __637
	}
	goto __639
__639:
	;
	goto __633
__633:
	if 0 != 0 {
		goto __632
	}
	goto __634
__634:
	;
__616:
	;

__647:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __650
	}
	XTclExpandCodeArray(tls, envPtr)
__650:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __651
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__651:
	;
__652:
	_delta39 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta39 != 0) {
		goto __655
	}
	if !(_delta39 == -0x7fffffff-1) {
		goto __656
	}
	_delta39 = 1 - 0
__656:
	;
__657:
	if !(_delta39 < 0) {
		goto __660
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __661
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__661:
	;
__660:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta39
	goto __658
__658:
	if 0 != 0 {
		goto __657
	}
	goto __659
__659:
	;
__655:
	;
	goto __653
__653:
	if 0 != 0 {
		goto __652
	}
	goto __654
__654:
	;
	goto __648
__648:
	if 0 != 0 {
		goto __647
	}
	goto __649
__649:
	;
	(*ForeachInfo)(unsafe.Pointer(infoPtr)).FloopCtTemp = int32(int64(offsetBack) - (int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1) //misuse
__662:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __665
	}
	XTclExpandCodeArray(tls, envPtr)
__665:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_FOREACH_STEP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __666
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_FOREACH_STEP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__666:
	;
__667:
	_delta40 = XtclInstructionTable[INST_FOREACH_STEP].FstackEffect
	if !(_delta40 != 0) {
		goto __670
	}
	if !(_delta40 == -0x7fffffff-1) {
		goto __671
	}
	_delta40 = 1 - 0
__671:
	;
__672:
	if !(_delta40 < 0) {
		goto __675
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __676
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__676:
	;
__675:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta40
	goto __673
__673:
	if 0 != 0 {
		goto __672
	}
	goto __674
__674:
	;
__670:
	;
	goto __668
__668:
	if 0 != 0 {
		goto __667
	}
	goto __669
__669:
	;
	goto __663
__663:
	if 0 != 0 {
		goto __662
	}
	goto __664
__664:
	;
__677:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __680
	}
	XTclExpandCodeArray(tls, envPtr)
__680:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_FOREACH_END)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __681
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_FOREACH_END == INST_START_CMD {
			return 1
		}
		return 0
	}()
__681:
	;
__682:
	_delta41 = XtclInstructionTable[INST_FOREACH_END].FstackEffect
	if !(_delta41 != 0) {
		goto __685
	}
	if !(_delta41 == -0x7fffffff-1) {
		goto __686
	}
	_delta41 = 1 - 0
__686:
	;
__687:
	if !(_delta41 < 0) {
		goto __690
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __691
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__691:
	;
__690:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta41
	goto __688
__688:
	if 0 != 0 {
		goto __687
	}
	goto __689
__689:
	;
__685:
	;
	goto __683
__683:
	if 0 != 0 {
		goto __682
	}
	goto __684
__684:
	;
	goto __678
__678:
	if 0 != 0 {
		goto __677
	}
	goto __679
__679:
	;
__692:
	if !(-3 < 0) {
		goto __695
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __696
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__696:
	;
__695:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -3
	goto __693
__693:
	if 0 != 0 {
		goto __692
	}
	goto __694
__694:
	;
__697:
	_objIndexCopy6 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy6 <= 255) {
		goto __700
	}
__702:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __705
	}
	XTclExpandCodeArray(tls, envPtr)
__705:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __706
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__706:
	;
__707:
	_delta42 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta42 != 0) {
		goto __710
	}
	if !(_delta42 == -0x7fffffff-1) {
		goto __711
	}
	_delta42 = 1 - _objIndexCopy6
__711:
	;
__712:
	if !(_delta42 < 0) {
		goto __715
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __716
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__716:
	;
__715:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta42
	goto __713
__713:
	if 0 != 0 {
		goto __712
	}
	goto __714
__714:
	;
__710:
	;
	goto __708
__708:
	if 0 != 0 {
		goto __707
	}
	goto __709
__709:
	;
	goto __703
__703:
	if 0 != 0 {
		goto __702
	}
	goto __704
__704:
	;
	goto __701
__700:
__717:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __720
	}
	XTclExpandCodeArray(tls, envPtr)
__720:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __721
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__721:
	;
__722:
	_delta43 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta43 != 0) {
		goto __725
	}
	if !(_delta43 == -0x7fffffff-1) {
		goto __726
	}
	_delta43 = 1 - _objIndexCopy6
__726:
	;
__727:
	if !(_delta43 < 0) {
		goto __730
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __731
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__731:
	;
__730:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta43
	goto __728
__728:
	if 0 != 0 {
		goto __727
	}
	goto __729
__729:
	;
__725:
	;
	goto __723
__723:
	if 0 != 0 {
		goto __722
	}
	goto __724
__724:
	;
	goto __718
__718:
	if 0 != 0 {
		goto __717
	}
	goto __719
__719:
	;
__701:
	;
	goto __698
__698:
	if 0 != 0 {
		goto __697
	}
	goto __699
__699:
	;

done:
__732:
	_objPtr = literalObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __735
	}
	XTclFreeObj(tls, _objPtr)
__735:
	;
	goto __733
__733:
	if 0 != 0 {
		goto __732
	}
	goto __734
__734:
	;
	return code
}

func XTclCompileArrayUnsetCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:464:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	// var isScalar int32 at bp+4, 4

	// var localIndex int32 at bp, 4

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return XTclCompileBasic2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, tokenPtr, envPtr, TCL_NO_ELEMENT, bp, bp+4)
	if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) {
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp)) >= 0 {
		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_EXISTS_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_ARRAY_EXISTS_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_ARRAY_EXISTS_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - *(*int32)(unsafe.Pointer(bp))
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(8))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP_FALSE1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 8
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok6 := true; ok6; ok6 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_UNSET_SCALAR == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 1
					}
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok9 := true; ok9; ok9 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
		}
	} else {
		for ok10 := true; ok10; ok10 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DUP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok11 := true; ok11; ok11 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok13 := true; ok13; ok13 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ARRAY_EXISTS_STK)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_ARRAY_EXISTS_STK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok14 := true; ok14; ok14 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_ARRAY_EXISTS_STK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok15 := true; ok15; ok15 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok16 := true; ok16; ok16 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(6))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP_FALSE1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok17 := true; ok17; ok17 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 6
					}
					for ok18 := true; ok18; ok18 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok19 := true; ok19; ok19 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_STK)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_UNSET_STK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok20 := true; ok20; ok20 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_UNSET_STK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 1
					}
					for ok21 := true; ok21; ok21 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok22 := true; ok22; ok22 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok23 := true; ok23; ok23 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 3
					}
					for ok24 := true; ok24; ok24 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		// Each branch decrements stack depth, but we only take one.
		for ok25 := true; ok25; ok25 = 0 != 0 {
			if 1 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
		}
		for ok26 := true; ok26; ok26 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok27 := true; ok27; ok27 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok28 := true; ok28; ok28 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	for ok29 := true; ok29; ok29 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok30 := true; ok30; ok30 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok31 := true; ok31; ok31 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok32 := true; ok32; ok32 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok33 := true; ok33; ok33 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok34 := true; ok34; ok34 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok35 := true; ok35; ok35 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileBreakCmd --
//
//	Procedure called to compile the "break" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "break" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileBreakCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:524:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var rangePtr uintptr
	// var auxPtr uintptr at bp, 8

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 1 {
		return TCL_ERROR
	}

	// Find the innermost exception range that contains this command.

	rangePtr = XTclGetInnermostExceptionRange(tls, envPtr, TCL_BREAK, bp)
	if rangePtr != 0 && (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype == LOOP_EXCEPTION_RANGE {
		// Found the target! No need for a nasty INST_BREAK here.

		XTclCleanupStackForBreakContinue(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp /* auxPtr */)))
		XTclAddLoopBreakFixup(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp /* auxPtr */)))
	} else {
		// Emit a real break.

		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BREAK)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_BREAK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_BREAK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	for ok3 := true; ok3; ok3 = 0 != 0 {
		if 1 < 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
			}
		}
		*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileCatchCmd --
//
//	Procedure called to compile the "catch" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "catch" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileCatchCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:582:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	// var jumpFixup JumpFixup at bp+40, 16

	var cmdTokenPtr uintptr
	var resultNameTokenPtr uintptr
	var optsNameTokenPtr uintptr
	var resultIndex int32
	var optsIndex int32
	var range1 int32
	var dropScript int32 = 0
	var depth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth

	// If syntax does not match what we expect for [catch], do not compile.
	// Let runtime checks determine if syntax has changed.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 4 {
		return TCL_ERROR
	}

	// If variables were specified and the catch command is at global level
	// (not in a procedure), don't compile it inline: the payoff is too small.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords >= 3 && !((*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr != 0 || (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr)).FvarFramePtr)).FlocalCachePtr != 0) {
		return TCL_ERROR
	}

	// Make sure the variable names, if any, have no substitutions and just
	// refer to local scalars.

	resultIndex = libc.AssignInt32(&optsIndex, -1)
	cmdTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords >= 3 {
		resultNameTokenPtr = cmdTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(cmdTokenPtr)).FnumComponents+1)*24
		resultIndex = XTclLocalScalarFromToken(tls, resultNameTokenPtr, envPtr)
		if resultIndex < 0 {
			return TCL_ERROR
		}

		if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 4 {
			optsNameTokenPtr = resultNameTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(resultNameTokenPtr)).FnumComponents+1)*24
			optsIndex = XTclLocalScalarFromToken(tls, optsNameTokenPtr, envPtr)
			if optsIndex < 0 {
				return TCL_ERROR
			}
		}
	}

	// We will compile the catch command. Declare the exception range that it
	// uses.
	//
	// If the body is a simple word, compile a BEGIN_CATCH instruction,
	// followed by the instructions to eval the body.
	// Otherwise, compile instructions to substitute the body text before
	// starting the catch, then BEGIN_CATCH, and then EVAL_STK to evaluate the
	// substituted body.
	// Care has to be taken to make sure that substitution happens outside the
	// catch range so that errors in the substitution are not caught.
	// [Bug 219184]
	// The reason for duplicating the script is that EVAL_STK would otherwise
	// begin by undeflowing the stack below the mark set by BEGIN_CATCH4.

	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
	if (*Tcl_Token)(unsafe.Pointer(cmdTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_BEGIN_CATCH4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - range1
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
				return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
			}
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
		}()
		(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileCmdWord(tls, interp, cmdTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(cmdTokenPtr)).FnumComponents, envPtr)
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, cmdTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(cmdTokenPtr)).FnumComponents, envPtr)

		for ok3 := true; ok3; ok3 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_BEGIN_CATCH4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - range1
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
				return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
			}
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
		}()
		(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		for ok6 := true; ok6; ok6 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DUP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		XTclEmitInvoke(tls, envPtr, INST_EVAL_STK, 0)
		// drop the script
		dropScript = 1
		for ok9 := true; ok9; ok9 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok10 := true; ok10; ok10 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 2
					}
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok12 := true; ok12; ok12 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok13 := true; ok13; ok13 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok14 := true; ok14; ok14 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))

	// Emit the "no errors" epilogue: push "0" (TCL_OK) as the catch result,
	// and jump around the "error case" code.

	for ok15 := true; ok15; ok15 = 0 != 0 {
		var _dd int32 = depth + 1
		if _dd != (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
			XTcl_Panic(tls, ts+19014, libc.VaList(bp, (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth, _dd))
		}
	}
	for ok16 := true; ok16; ok16 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok17 := true; ok17; ok17 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok18 := true; ok18; ok18 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok19 := true; ok19; ok19 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok20 := true; ok20; ok20 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok21 := true; ok21; ok21 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok22 := true; ok22; ok22 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+40)

	// Emit the "error case" epilogue. Push the interpreter result and the
	// return code.

	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = depth + dropScript

	if dropScript != 0 {
		for ok23 := true; ok23; ok23 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok24 := true; ok24; ok24 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok25 := true; ok25; ok25 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// Stack at this point is empty
	for ok26 := true; ok26; ok26 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RESULT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok27 := true; ok27; ok27 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok28 := true; ok28; ok28 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok29 := true; ok29; ok29 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_CODE)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RETURN_CODE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok30 := true; ok30; ok30 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_CODE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok31 := true; ok31; ok31 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Stack at this point on both branches: result returnCode

	if XTclFixupForwardJump(tls, envPtr, bp+40, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+40)).FcodeOffset)), 127) != 0 {
		XTcl_Panic(tls, ts+19064,
			libc.VaList(bp+16, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+40)).FcodeOffset))))
	}

	// Push the return options if the caller wants them. This needs to happen
	// before INST_END_CATCH

	if optsIndex != -1 {
		for ok32 := true; ok32; ok32 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok33 := true; ok33; ok33 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok34 := true; ok34; ok34 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// End the catch

	for ok35 := true; ok35; ok35 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok36 := true; ok36; ok36 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok37 := true; ok37; ok37 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Save the result and return options if the caller wants them. This needs
	// to happen after INST_END_CATCH (compile-3.6/7).

	if optsIndex != -1 {
		if optsIndex <= 255 {
			for ok38 := true; ok38; ok38 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optsIndex))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok39 := true; ok39; ok39 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - optsIndex
						}
						for ok40 := true; ok40; ok40 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok41 := true; ok41; ok41 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optsIndex) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optsIndex) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optsIndex) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optsIndex))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok42 := true; ok42; ok42 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - optsIndex
						}
						for ok43 := true; ok43; ok43 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

		for ok44 := true; ok44; ok44 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok45 := true; ok45; ok45 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok46 := true; ok46; ok46 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// At this point, the top of the stack is inconveniently ordered:
	//		result returnCode
	// Reverse the stack to store the result.

	for ok47 := true; ok47; ok47 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_REVERSE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok48 := true; ok48; ok48 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 2
				}
				for ok49 := true; ok49; ok49 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if resultIndex != -1 {
		if resultIndex <= 255 {
			for ok50 := true; ok50; ok50 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultIndex))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok51 := true; ok51; ok51 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - resultIndex
						}
						for ok52 := true; ok52; ok52 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok53 := true; ok53; ok53 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultIndex) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultIndex) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultIndex) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultIndex))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok54 := true; ok54; ok54 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - resultIndex
						}
						for ok55 := true; ok55; ok55 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

	}
	for ok56 := true; ok56; ok56 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok57 := true; ok57; ok57 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok58 := true; ok58; ok58 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	for ok59 := true; ok59; ok59 = 0 != 0 {
		var _dd int32 = depth + 1
		if _dd != (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
			XTcl_Panic(tls, ts+19014, libc.VaList(bp+24, (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth, _dd))
		}
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclCompileClockClicksCmd --
//
//	Procedure called to compile the "tcl::clock::clicks" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to run time.
//
// Side effects:
//	Instructions are added to envPtr to execute the "clock clicks"
//	command at runtime.
//
//----------------------------------------------------------------------

func XTclCompileClockClicksCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:765:1: */
	var tokenPtr uintptr

	switch (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords {
	case 1:
		// No args
		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_CLOCK_READ)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_CLOCK_READ == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_CLOCK_READ].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		break
	case 2:
		// -milliseconds or -microseconds
		tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD ||
			(*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize < 4 ||
			(*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize > 13 {
			return TCL_ERROR
		} else if !(libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, ts+11783,
			uint64((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize)) != 0) {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_CLOCK_READ)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_CLOCK_READ == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok4 := true; ok4; ok4 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_CLOCK_READ].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 1
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			break
		} else if !(libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, ts+11769,
			uint64((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize)) != 0) {
			for ok6 := true; ok6; ok6 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_CLOCK_READ)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_CLOCK_READ == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok7 := true; ok7; ok7 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_CLOCK_READ].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 2
						}
						for ok8 := true; ok8; ok8 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			break
		} else {
			return TCL_ERROR
		}
		fallthrough
	default:
		return TCL_ERROR
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclCompileClockReadingCmd --
//
//	Procedure called to compile the "tcl::clock::microseconds",
//	"tcl::clock::milliseconds" and "tcl::clock::seconds" commands.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to run time.
//
// Side effects:
//	Instructions are added to envPtr to execute the "clock clicks"
//	command at runtime.
//
// Client data is 1 for microseconds, 2 for milliseconds, 3 for seconds.
//----------------------------------------------------------------------

func XTclCompileClockReadingCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:829:1: */
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 1 {
		return TCL_ERROR
	}

	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_CLOCK_READ)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(int32((*Command)(unsafe.Pointer(cmdPtr)).FobjClientData)))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_CLOCK_READ == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_CLOCK_READ].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - int32((*Command)(unsafe.Pointer(cmdPtr)).FobjClientData)
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileConcatCmd --
//
//	Procedure called to compile the "concat" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "concat" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileConcatCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:865:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var objPtr uintptr
	var listObj uintptr
	var tokenPtr uintptr
	var i int32

	// TODO: Consider compiling expansion case.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 1 {
		// [concat] without arguments just pushes an empty object.

		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		return TCL_OK
	}

	// Test if all arguments are compile-time known. If they are, we can
	// implement with a simple push.

	listObj = XTcl_NewObj(tls)
	i = 1
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	for ; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		objPtr = XTcl_NewObj(tls)
		if !(XTclWordKnownAtCompileTime(tls, tokenPtr, objPtr) != 0) {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objPtr uintptr = objPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _objPtr uintptr = listObj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			listObj = uintptr(0)
			break
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), listObj, objPtr)
	}
	if listObj != uintptr(0) {
		// var objs uintptr at bp+8, 8

		var bytes uintptr
		// var len int32 at bp, 4

		XTcl_ListObjGetElements(tls, uintptr(0), listObj, bp, bp+8)
		objPtr = XTcl_ConcatObj(tls, *(*int32)(unsafe.Pointer(bp /* len */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* objs */)))
		for ok9 := true; ok9; ok9 = 0 != 0 {
			var _objPtr uintptr = listObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		bytes = XTcl_GetStringFromObj(tls, objPtr, bp)
		for ok10 := true; ok10; ok10 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp)), 0)
			if _objIndexCopy <= 255 {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok14 := true; ok14; ok14 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok15 := true; ok15; ok15 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok16 := true; ok16; ok16 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		for ok17 := true; ok17; ok17 = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return TCL_OK
	}

	// General case: runtime concat.

	i = 1
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	for ; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok18 := true; ok18; ok18 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok19 := true; ok19; ok19 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok20 := true; ok20; ok20 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok21 := true; ok21; ok21 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok22 := true; ok22; ok22 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok23 := true; ok23; ok23 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok24 := true; ok24; ok24 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	}

	for ok25 := true; ok25; ok25 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_CONCAT_STK)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i-1) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i-1) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i-1) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i - 1))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_CONCAT_STK == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok26 := true; ok26; ok26 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_CONCAT_STK].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - (i - 1)
				}
				for ok27 := true; ok27; ok27 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileContinueCmd --
//
//	Procedure called to compile the "continue" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "continue" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileContinueCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:952:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var rangePtr uintptr
	// var auxPtr uintptr at bp, 8

	// There should be no argument after the "continue".

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 1 {
		return TCL_ERROR
	}

	// See if we can find a valid continueOffset (i.e., not -1) in the
	// innermost containing exception range.

	rangePtr = XTclGetInnermostExceptionRange(tls, envPtr, TCL_CONTINUE, bp)
	if rangePtr != 0 && (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype == LOOP_EXCEPTION_RANGE {
		// Found the target! No need for a nasty INST_CONTINUE here.

		XTclCleanupStackForBreakContinue(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp /* auxPtr */)))
		XTclAddLoopContinueFixup(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp /* auxPtr */)))
	} else {
		// Emit a real continue.

		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_CONTINUE)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_CONTINUE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_CONTINUE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	for ok3 := true; ok3; ok3 = 0 != 0 {
		if 1 < 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
			}
		}
		*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileDict*Cmd --
//
//	Functions called to compile "dict" sucommands.
//
// Results:
//	All return TCL_OK for a successful compile, and TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "dict" subcommand at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileDictSetCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1015:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var varTokenPtr uintptr
	var i int32
	var dictVarIndex int32

	// There must be at least one argument after the command.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 4 {
		return TCL_ERROR
	}

	// The dictionary variable must be a local scalar that is knowable at
	// compile time; anything else exceeds the complexity of the opcode. So
	// discover what the index is.

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	dictVarIndex = XTclLocalScalarFromToken(tls, varTokenPtr, envPtr)
	if dictVarIndex < 0 {
		return TCL_ERROR
	}

	// Remaining words (key path and value to set) can be handled normally.

	tokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	for i = 2; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}

	// Now emit the instruction to do the dict manipulation.

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_SET)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_SET == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_SET].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3)
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok10 := true; ok10; ok10 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex))
	}
	for ok11 := true; ok11; ok11 = 0 != 0 {
		if -1 < 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
			}
		}
		*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	}
	return TCL_OK
}

func XTclCompileDictIncrCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1068:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varTokenPtr uintptr
	var keyTokenPtr uintptr
	var dictVarIndex int32
	// var incrAmount int32 at bp, 4

	// There must be at least two arguments after the command.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 4 {
		return TCL_ERROR
	}
	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	keyTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24

	// Parse the increment amount, if present.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 4 {
		var word uintptr
		var numBytes int32
		var code int32
		var incrTokenPtr uintptr
		var intObj uintptr

		incrTokenPtr = keyTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(keyTokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(incrTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
			return XTclCompileBasic2Or3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
		}
		word = (*Tcl_Token)(unsafe.Pointer(incrTokenPtr + 1*24)).Fstart
		numBytes = (*Tcl_Token)(unsafe.Pointer(incrTokenPtr + 1*24)).Fsize

		intObj = XTcl_NewStringObj(tls, word, numBytes)
		(*Tcl_Obj)(unsafe.Pointer(intObj)).FrefCount++
		code = func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(intObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(intObj + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, uintptr(0), intObj, bp)
		}()
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(intObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(intObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(intObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(intObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(intObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(intObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(intObj)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(intObj + 32)) = XtclFreeObjList
					XtclFreeObjList = intObj
				}
			} else {
				XTclFreeObj(tls, intObj)
			}
		}

		if code != TCL_OK {
			return XTclCompileBasic2Or3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
		}
	} else {
		*(*int32)(unsafe.Pointer(bp /* incrAmount */)) = 1
	}

	// The dictionary variable must be a local scalar that is knowable at
	// compile time; anything else exceeds the complexity of the opcode. So
	// discover what the index is.

	dictVarIndex = XTclLocalScalarFromToken(tls, varTokenPtr, envPtr)
	if dictVarIndex < 0 {
		return XTclCompileBasic2Or3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	// Emit the key and the code to actually do the increment.

	if (*Tcl_Token)(unsafe.Pointer(keyTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(keyTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(keyTokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok3 := true; ok3; ok3 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok4 := true; ok4; ok4 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok6 := true; ok6; ok6 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok7 := true; ok7; ok7 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
		XTclCompileTokens(tls, interp, keyTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(keyTokenPtr)).FnumComponents, envPtr)
	}

	for ok8 := true; ok8; ok8 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_INCR_IMM)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_INCR_IMM == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok9 := true; ok9; ok9 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_INCR_IMM].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - *(*int32)(unsafe.Pointer(bp))
				}
				for ok10 := true; ok10; ok10 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok11 := true; ok11; ok11 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex))
	}
	return TCL_OK
}

func XTclCompileDictGetCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1140:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var i int32

	// There must be at least two arguments after the command (the single-arg
	// case is legal, but too special and magic for us to deal with here).

	// TODO: Consider support for compiling expanded args.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 {
		return TCL_ERROR
	}
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	// Only compile this because we need INST_DICT_GET anyway.

	for i = 1; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}
	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_GET)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 2))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_GET == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_GET].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 2)
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok10 := true; ok10; ok10 = 0 != 0 {
		if -1 < 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
			}
		}
		*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	}
	return TCL_OK
}

func XTclCompileDictExistsCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1177:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var i int32

	// There must be at least two arguments after the command (the single-arg
	// case is legal, but too special and magic for us to deal with here).

	// TODO: Consider support for compiling expanded args.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 {
		return TCL_ERROR
	}
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	// Now we do the code generation.

	for i = 1; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}
	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_EXISTS)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 2))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_EXISTS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_EXISTS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 2)
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok10 := true; ok10; ok10 = 0 != 0 {
		if -1 < 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
			}
		}
		*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	}
	return TCL_OK
}

func XTclCompileDictUnsetCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1214:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var i int32
	var dictVarIndex int32

	// There must be at least one argument after the variable name for us to
	// compile to bytecode.

	// TODO: Consider support for compiling expanded args.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 {
		return TCL_ERROR
	}

	// The dictionary variable must be a local scalar that is knowable at
	// compile time; anything else exceeds the complexity of the opcode. So
	// discover what the index is.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	dictVarIndex = XTclLocalScalarFromToken(tls, tokenPtr, envPtr)
	if dictVarIndex < 0 {
		return XTclCompileBasicMin2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	// Remaining words (the key path) can be handled normally.

	for i = 2; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	}

	// Now emit the instruction to do the dict manipulation.

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_UNSET)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 2))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_UNSET == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_UNSET].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 2)
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok10 := true; ok10; ok10 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex))
	}
	return TCL_OK
}

func XTclCompileDictCreateCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1267:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var worker int32   // Temp var for building the value in.
	var tokenPtr uintptr
	var keyObj uintptr
	var valueObj uintptr
	var dictObj uintptr
	var bytes uintptr
	var i int32
	// var len int32 at bp, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _objPtr7 uintptr
	var _delta4 int32
	var _delta5 int32
	var _objIndexCopy1 int32
	var _delta6 int32
	var _delta7 int32
	var _delta8 int32
	var _delta9 int32
	var _delta10 int32
	var _objIndexCopy2 int32
	var _delta11 int32
	var _delta12 int32
	var _objIndexCopy3 int32
	var _delta13 int32
	var _delta14 int32
	var _delta15 int32
	var _delta16 int32
	var _delta17 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords&1 == 0) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// See if we can build the value at compile time...

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	dictObj = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(dictObj)).FrefCount++
	i = 1
__2:
	if !(i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords) {
		goto __4
	}
	keyObj = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(keyObj)).FrefCount++
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, keyObj) != 0) {
		goto __5
	}
__6:
	_objPtr = keyObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __9
	}
	XTclFreeObj(tls, _objPtr)
__9:
	;
	goto __7
__7:
	if 0 != 0 {
		goto __6
	}
	goto __8
__8:
	;
__10:
	_objPtr1 = dictObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __13
	}
	XTclFreeObj(tls, _objPtr1)
__13:
	;
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	goto nonConstant
__5:
	;
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	valueObj = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(valueObj)).FrefCount++
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, valueObj) != 0) {
		goto __14
	}
__15:
	_objPtr2 = keyObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __18
	}
	XTclFreeObj(tls, _objPtr2)
__18:
	;
	goto __16
__16:
	if 0 != 0 {
		goto __15
	}
	goto __17
__17:
	;
__19:
	_objPtr3 = valueObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __22
	}
	XTclFreeObj(tls, _objPtr3)
__22:
	;
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
__23:
	_objPtr4 = dictObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __26
	}
	XTclFreeObj(tls, _objPtr4)
__26:
	;
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
	goto nonConstant
__14:
	;
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	XTcl_DictObjPut(tls, uintptr(0), dictObj, keyObj, valueObj)
__27:
	_objPtr5 = keyObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __30
	}
	XTclFreeObj(tls, _objPtr5)
__30:
	;
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
__31:
	_objPtr6 = valueObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __34
	}
	XTclFreeObj(tls, _objPtr6)
__34:
	;
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
	goto __3
__3:
	i = i + 2
	goto __2
	goto __4
__4:
	;

	// We did! Excellent. The "verifyDict" is to do type forcing.

	bytes = XTcl_GetStringFromObj(tls, dictObj, bp)
__35:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp)), 0)
	if !(_objIndexCopy <= 255) {
		goto __38
	}
__40:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __43
	}
	XTclExpandCodeArray(tls, envPtr)
__43:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __44
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__44:
	;
__45:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __48
	}
	if !(_delta == -0x7fffffff-1) {
		goto __49
	}
	_delta = 1 - _objIndexCopy
__49:
	;
__50:
	if !(_delta < 0) {
		goto __53
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __54
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__54:
	;
__53:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __51
__51:
	if 0 != 0 {
		goto __50
	}
	goto __52
__52:
	;
__48:
	;
	goto __46
__46:
	if 0 != 0 {
		goto __45
	}
	goto __47
__47:
	;
	goto __41
__41:
	if 0 != 0 {
		goto __40
	}
	goto __42
__42:
	;
	goto __39
__38:
__55:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __58
	}
	XTclExpandCodeArray(tls, envPtr)
__58:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __59
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__59:
	;
__60:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __63
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __64
	}
	_delta1 = 1 - _objIndexCopy
__64:
	;
__65:
	if !(_delta1 < 0) {
		goto __68
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __69
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__69:
	;
__68:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
__63:
	;
	goto __61
__61:
	if 0 != 0 {
		goto __60
	}
	goto __62
__62:
	;
	goto __56
__56:
	if 0 != 0 {
		goto __55
	}
	goto __57
__57:
	;
__39:
	;
	goto __36
__36:
	if 0 != 0 {
		goto __35
	}
	goto __37
__37:
	;
__70:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __73
	}
	XTclExpandCodeArray(tls, envPtr)
__73:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __74
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__74:
	;
__75:
	_delta2 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta2 != 0) {
		goto __78
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __79
	}
	_delta2 = 1 - 0
__79:
	;
__80:
	if !(_delta2 < 0) {
		goto __83
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __84
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__84:
	;
__83:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __81
__81:
	if 0 != 0 {
		goto __80
	}
	goto __82
__82:
	;
__78:
	;
	goto __76
__76:
	if 0 != 0 {
		goto __75
	}
	goto __77
__77:
	;
	goto __71
__71:
	if 0 != 0 {
		goto __70
	}
	goto __72
__72:
	;
__85:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __88
	}
	XTclExpandCodeArray(tls, envPtr)
__88:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_VERIFY)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __89
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DICT_VERIFY == INST_START_CMD {
			return 1
		}
		return 0
	}()
__89:
	;
__90:
	_delta3 = XtclInstructionTable[INST_DICT_VERIFY].FstackEffect
	if !(_delta3 != 0) {
		goto __93
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __94
	}
	_delta3 = 1 - 0
__94:
	;
__95:
	if !(_delta3 < 0) {
		goto __98
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __99
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__99:
	;
__98:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __96
__96:
	if 0 != 0 {
		goto __95
	}
	goto __97
__97:
	;
__93:
	;
	goto __91
__91:
	if 0 != 0 {
		goto __90
	}
	goto __92
__92:
	;
	goto __86
__86:
	if 0 != 0 {
		goto __85
	}
	goto __87
__87:
	;
__100:
	_objPtr7 = dictObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __103
	}
	XTclFreeObj(tls, _objPtr7)
__103:
	;
	goto __101
__101:
	if 0 != 0 {
		goto __100
	}
	goto __102
__102:
	;
	return TCL_OK

	// Otherwise, we've got to issue runtime code to do the building, which we
	// do by [dict set]ting into an unnamed local variable. This requires that
	// we are in a context with an LVT.

nonConstant:
	worker = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	if !(worker < 0) {
		goto __104
	}
	return XTclCompileBasicMin0ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
__104:
	;

__105:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy1 <= 255) {
		goto __108
	}
__110:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __113
	}
	XTclExpandCodeArray(tls, envPtr)
__113:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __114
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__114:
	;
__115:
	_delta4 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta4 != 0) {
		goto __118
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __119
	}
	_delta4 = 1 - _objIndexCopy1
__119:
	;
__120:
	if !(_delta4 < 0) {
		goto __123
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __124
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__124:
	;
__123:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __121
__121:
	if 0 != 0 {
		goto __120
	}
	goto __122
__122:
	;
__118:
	;
	goto __116
__116:
	if 0 != 0 {
		goto __115
	}
	goto __117
__117:
	;
	goto __111
__111:
	if 0 != 0 {
		goto __110
	}
	goto __112
__112:
	;
	goto __109
__108:
__125:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __128
	}
	XTclExpandCodeArray(tls, envPtr)
__128:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __129
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__129:
	;
__130:
	_delta5 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta5 != 0) {
		goto __133
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __134
	}
	_delta5 = 1 - _objIndexCopy1
__134:
	;
__135:
	if !(_delta5 < 0) {
		goto __138
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __139
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__139:
	;
__138:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __136
__136:
	if 0 != 0 {
		goto __135
	}
	goto __137
__137:
	;
__133:
	;
	goto __131
__131:
	if 0 != 0 {
		goto __130
	}
	goto __132
__132:
	;
	goto __126
__126:
	if 0 != 0 {
		goto __125
	}
	goto __127
__127:
	;
__109:
	;
	goto __106
__106:
	if 0 != 0 {
		goto __105
	}
	goto __107
__107:
	;
	if !(worker <= 255) {
		goto __140
	}
__142:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __145
	}
	XTclExpandCodeArray(tls, envPtr)
__145:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __146
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__146:
	;
__147:
	_delta6 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta6 != 0) {
		goto __150
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __151
	}
	_delta6 = 1 - worker
__151:
	;
__152:
	if !(_delta6 < 0) {
		goto __155
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __156
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__156:
	;
__155:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __153
__153:
	if 0 != 0 {
		goto __152
	}
	goto __154
__154:
	;
__150:
	;
	goto __148
__148:
	if 0 != 0 {
		goto __147
	}
	goto __149
__149:
	;
	goto __143
__143:
	if 0 != 0 {
		goto __142
	}
	goto __144
__144:
	;
	goto __141
__140:
__157:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __160
	}
	XTclExpandCodeArray(tls, envPtr)
__160:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __161
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__161:
	;
__162:
	_delta7 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta7 != 0) {
		goto __165
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __166
	}
	_delta7 = 1 - worker
__166:
	;
__167:
	if !(_delta7 < 0) {
		goto __170
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __171
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__171:
	;
__170:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __168
__168:
	if 0 != 0 {
		goto __167
	}
	goto __169
__169:
	;
__165:
	;
	goto __163
__163:
	if 0 != 0 {
		goto __162
	}
	goto __164
__164:
	;
	goto __158
__158:
	if 0 != 0 {
		goto __157
	}
	goto __159
__159:
	;
__141:
	;

__172:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __175
	}
	XTclExpandCodeArray(tls, envPtr)
__175:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __176
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__176:
	;
__177:
	_delta8 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta8 != 0) {
		goto __180
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __181
	}
	_delta8 = 1 - 0
__181:
	;
__182:
	if !(_delta8 < 0) {
		goto __185
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __186
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__186:
	;
__185:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __183
__183:
	if 0 != 0 {
		goto __182
	}
	goto __184
__184:
	;
__180:
	;
	goto __178
__178:
	if 0 != 0 {
		goto __177
	}
	goto __179
__179:
	;
	goto __173
__173:
	if 0 != 0 {
		goto __172
	}
	goto __174
__174:
	;
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	i = 1
__187:
	if !(i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords) {
		goto __189
	}
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __190
	}
__192:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy2 <= 255) {
		goto __195
	}
__197:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __200
	}
	XTclExpandCodeArray(tls, envPtr)
__200:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __201
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__201:
	;
__202:
	_delta9 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta9 != 0) {
		goto __205
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __206
	}
	_delta9 = 1 - _objIndexCopy2
__206:
	;
__207:
	if !(_delta9 < 0) {
		goto __210
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __211
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__211:
	;
__210:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __208
__208:
	if 0 != 0 {
		goto __207
	}
	goto __209
__209:
	;
__205:
	;
	goto __203
__203:
	if 0 != 0 {
		goto __202
	}
	goto __204
__204:
	;
	goto __198
__198:
	if 0 != 0 {
		goto __197
	}
	goto __199
__199:
	;
	goto __196
__195:
__212:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __215
	}
	XTclExpandCodeArray(tls, envPtr)
__215:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __216
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__216:
	;
__217:
	_delta10 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta10 != 0) {
		goto __220
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __221
	}
	_delta10 = 1 - _objIndexCopy2
__221:
	;
__222:
	if !(_delta10 < 0) {
		goto __225
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __226
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__226:
	;
__225:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __223
__223:
	if 0 != 0 {
		goto __222
	}
	goto __224
__224:
	;
__220:
	;
	goto __218
__218:
	if 0 != 0 {
		goto __217
	}
	goto __219
__219:
	;
	goto __213
__213:
	if 0 != 0 {
		goto __212
	}
	goto __214
__214:
	;
__196:
	;
	goto __193
__193:
	if 0 != 0 {
		goto __192
	}
	goto __194
__194:
	;
	goto __191
__190:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__191:
	;

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __227
	}
__229:
	_objIndexCopy3 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy3 <= 255) {
		goto __232
	}
__234:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __237
	}
	XTclExpandCodeArray(tls, envPtr)
__237:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __238
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__238:
	;
__239:
	_delta11 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta11 != 0) {
		goto __242
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __243
	}
	_delta11 = 1 - _objIndexCopy3
__243:
	;
__244:
	if !(_delta11 < 0) {
		goto __247
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __248
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__248:
	;
__247:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __245
__245:
	if 0 != 0 {
		goto __244
	}
	goto __246
__246:
	;
__242:
	;
	goto __240
__240:
	if 0 != 0 {
		goto __239
	}
	goto __241
__241:
	;
	goto __235
__235:
	if 0 != 0 {
		goto __234
	}
	goto __236
__236:
	;
	goto __233
__232:
__249:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __252
	}
	XTclExpandCodeArray(tls, envPtr)
__252:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __253
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__253:
	;
__254:
	_delta12 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta12 != 0) {
		goto __257
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __258
	}
	_delta12 = 1 - _objIndexCopy3
__258:
	;
__259:
	if !(_delta12 < 0) {
		goto __262
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __263
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__263:
	;
__262:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __260
__260:
	if 0 != 0 {
		goto __259
	}
	goto __261
__261:
	;
__257:
	;
	goto __255
__255:
	if 0 != 0 {
		goto __254
	}
	goto __256
__256:
	;
	goto __250
__250:
	if 0 != 0 {
		goto __249
	}
	goto __251
__251:
	;
__233:
	;
	goto __230
__230:
	if 0 != 0 {
		goto __229
	}
	goto __231
__231:
	;
	goto __228
__227:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i+1)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i+1)*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__228:
	;

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
__264:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __267
	}
	XTclExpandCodeArray(tls, envPtr)
__267:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_SET)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __268
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DICT_SET == INST_START_CMD {
			return 1
		}
		return 0
	}()
__268:
	;
__269:
	_delta13 = XtclInstructionTable[INST_DICT_SET].FstackEffect
	if !(_delta13 != 0) {
		goto __272
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __273
	}
	_delta13 = 1 - 1
__273:
	;
__274:
	if !(_delta13 < 0) {
		goto __277
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __278
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__278:
	;
__277:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __275
__275:
	if 0 != 0 {
		goto __274
	}
	goto __276
__276:
	;
__272:
	;
	goto __270
__270:
	if 0 != 0 {
		goto __269
	}
	goto __271
__271:
	;
	goto __265
__265:
	if 0 != 0 {
		goto __264
	}
	goto __266
__266:
	;
__279:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __282
	}
	XTclExpandCodeArray(tls, envPtr)
__282:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker))
	goto __280
__280:
	if 0 != 0 {
		goto __279
	}
	goto __281
__281:
	;
__283:
	if !(-1 < 0) {
		goto __286
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __287
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__287:
	;
__286:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	goto __284
__284:
	if 0 != 0 {
		goto __283
	}
	goto __285
__285:
	;
__288:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __291
	}
	XTclExpandCodeArray(tls, envPtr)
__291:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __292
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__292:
	;
__293:
	_delta14 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta14 != 0) {
		goto __296
	}
	if !(_delta14 == -0x7fffffff-1) {
		goto __297
	}
	_delta14 = 1 - 0
__297:
	;
__298:
	if !(_delta14 < 0) {
		goto __301
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __302
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__302:
	;
__301:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta14
	goto __299
__299:
	if 0 != 0 {
		goto __298
	}
	goto __300
__300:
	;
__296:
	;
	goto __294
__294:
	if 0 != 0 {
		goto __293
	}
	goto __295
__295:
	;
	goto __289
__289:
	if 0 != 0 {
		goto __288
	}
	goto __290
__290:
	;
	goto __188
__188:
	i = i + 2
	goto __187
	goto __189
__189:
	;
	if !(worker <= 255) {
		goto __303
	}
__305:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __308
	}
	XTclExpandCodeArray(tls, envPtr)
__308:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __309
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__309:
	;
__310:
	_delta15 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta15 != 0) {
		goto __313
	}
	if !(_delta15 == -0x7fffffff-1) {
		goto __314
	}
	_delta15 = 1 - worker
__314:
	;
__315:
	if !(_delta15 < 0) {
		goto __318
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __319
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__319:
	;
__318:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta15
	goto __316
__316:
	if 0 != 0 {
		goto __315
	}
	goto __317
__317:
	;
__313:
	;
	goto __311
__311:
	if 0 != 0 {
		goto __310
	}
	goto __312
__312:
	;
	goto __306
__306:
	if 0 != 0 {
		goto __305
	}
	goto __307
__307:
	;
	goto __304
__303:
__320:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __323
	}
	XTclExpandCodeArray(tls, envPtr)
__323:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __324
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__324:
	;
__325:
	_delta16 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta16 != 0) {
		goto __328
	}
	if !(_delta16 == -0x7fffffff-1) {
		goto __329
	}
	_delta16 = 1 - worker
__329:
	;
__330:
	if !(_delta16 < 0) {
		goto __333
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __334
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__334:
	;
__333:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta16
	goto __331
__331:
	if 0 != 0 {
		goto __330
	}
	goto __332
__332:
	;
__328:
	;
	goto __326
__326:
	if 0 != 0 {
		goto __325
	}
	goto __327
__327:
	;
	goto __321
__321:
	if 0 != 0 {
		goto __320
	}
	goto __322
__322:
	;
__304:
	;

__335:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __338
	}
	XTclExpandCodeArray(tls, envPtr)
__338:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __339
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_UNSET_SCALAR == INST_START_CMD {
			return 1
		}
		return 0
	}()
__339:
	;
__340:
	_delta17 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
	if !(_delta17 != 0) {
		goto __343
	}
	if !(_delta17 == -0x7fffffff-1) {
		goto __344
	}
	_delta17 = 1 - 0
__344:
	;
__345:
	if !(_delta17 < 0) {
		goto __348
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __349
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__349:
	;
__348:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta17
	goto __346
__346:
	if 0 != 0 {
		goto __345
	}
	goto __347
__347:
	;
__343:
	;
	goto __341
__341:
	if 0 != 0 {
		goto __340
	}
	goto __342
__342:
	;
	goto __336
__336:
	if 0 != 0 {
		goto __335
	}
	goto __337
__337:
	;
__350:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __353
	}
	XTclExpandCodeArray(tls, envPtr)
__353:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(worker))
	goto __351
__351:
	if 0 != 0 {
		goto __350
	}
	goto __352
__352:
	;
	return TCL_OK
}

func XTclCompileDictMergeCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1360:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var i int32
	var workerIndex int32
	var infoIndex int32
	var outLoop int32

	// Deal with some special edge cases. Note that in the case with one
	// argument, the only thing to do is to verify the dict-ness.

	// TODO: Consider support for compiling expanded args. (less likely)
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2 {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		return TCL_OK
	} else if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 2 {
		tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		for ok14 := true; ok14; ok14 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DUP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok15 := true; ok15; ok15 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok17 := true; ok17; ok17 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_VERIFY)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DICT_VERIFY == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok18 := true; ok18; ok18 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DICT_VERIFY].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		return TCL_OK
	}

	// There's real merging work to do.
	//
	// Allocate some working space. This means we'll only ever compile this
	// command when there's an LVT present.

	workerIndex = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	if workerIndex < 0 {
		return XTclCompileBasicMin2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}
	infoIndex = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)

	// Get the first dictionary and verify that it is so.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok20 := true; ok20; ok20 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok21 := true; ok21; ok21 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok22 := true; ok22; ok22 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok23 := true; ok23; ok23 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok24 := true; ok24; ok24 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok25 := true; ok25; ok25 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok26 := true; ok26; ok26 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok27 := true; ok27; ok27 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DUP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok28 := true; ok28; ok28 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok29 := true; ok29; ok29 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok30 := true; ok30; ok30 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_VERIFY)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_VERIFY == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok31 := true; ok31; ok31 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_VERIFY].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok32 := true; ok32; ok32 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if workerIndex <= 255 {
		for ok33 := true; ok33; ok33 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok34 := true; ok34; ok34 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - workerIndex
					}
					for ok35 := true; ok35; ok35 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok36 := true; ok36; ok36 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok37 := true; ok37; ok37 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - workerIndex
					}
					for ok38 := true; ok38; ok38 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	for ok39 := true; ok39; ok39 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok40 := true; ok40; ok40 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok41 := true; ok41; ok41 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// For each of the remaining dictionaries...

	outLoop = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
	for ok42 := true; ok42; ok42 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(outLoop) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(outLoop) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(outLoop) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(outLoop))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_BEGIN_CATCH4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok43 := true; ok43; ok43 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - outLoop
				}
				for ok44 := true; ok44; ok44 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(outLoop)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for i = 2; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		// Get the dictionary, and merge its pairs into the first dict (using
		// a small loop).

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok45 := true; ok45; ok45 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok46 := true; ok46; ok46 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok47 := true; ok47; ok47 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok48 := true; ok48; ok48 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok49 := true; ok49; ok49 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok50 := true; ok50; ok50 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok51 := true; ok51; ok51 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		for ok52 := true; ok52; ok52 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_FIRST)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DICT_FIRST == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok53 := true; ok53; ok53 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DICT_FIRST].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - infoIndex
					}
					for ok54 := true; ok54; ok54 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok55 := true; ok55; ok55 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(24))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP_TRUE1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok56 := true; ok56; ok56 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 24
					}
					for ok57 := true; ok57; ok57 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok58 := true; ok58; ok58 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok59 := true; ok59; ok59 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 2
					}
					for ok60 := true; ok60; ok60 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok61 := true; ok61; ok61 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_SET)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DICT_SET == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok62 := true; ok62; ok62 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DICT_SET].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 1
					}
					for ok63 := true; ok63; ok63 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok64 := true; ok64; ok64 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex))
		}
		for ok65 := true; ok65; ok65 = 0 != 0 {
			if -1 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
		}
		for ok66 := true; ok66; ok66 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok67 := true; ok67; ok67 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok68 := true; ok68; ok68 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok69 := true; ok69; ok69 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_NEXT)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DICT_NEXT == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok70 := true; ok70; ok70 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DICT_NEXT].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - infoIndex
					}
					for ok71 := true; ok71; ok71 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok72 := true; ok72; ok72 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-20))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP_FALSE1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok73 := true; ok73; ok73 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - -20
					}
					for ok74 := true; ok74; ok74 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok75 := true; ok75; ok75 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok76 := true; ok76; ok76 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok77 := true; ok77; ok77 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok78 := true; ok78; ok78 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok79 := true; ok79; ok79 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok80 := true; ok80; ok80 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok81 := true; ok81; ok81 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_UNSET_SCALAR == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok82 := true; ok82; ok82 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok83 := true; ok83; ok83 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok84 := true; ok84; ok84 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
		}
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(outLoop)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(outLoop)*28)).FcodeOffset))
	for ok85 := true; ok85; ok85 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok86 := true; ok86; ok86 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok87 := true; ok87; ok87 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Clean up any state left over.

	if workerIndex <= 255 {
		for ok88 := true; ok88; ok88 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok89 := true; ok89; ok89 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - workerIndex
					}
					for ok90 := true; ok90; ok90 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok91 := true; ok91; ok91 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok92 := true; ok92; ok92 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - workerIndex
					}
					for ok93 := true; ok93; ok93 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	for ok94 := true; ok94; ok94 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_UNSET_SCALAR == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok95 := true; ok95; ok95 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok96 := true; ok96; ok96 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok97 := true; ok97; ok97 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex))
	}
	for ok98 := true; ok98; ok98 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(18))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP1 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok99 := true; ok99; ok99 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 18
				}
				for ok100 := true; ok100; ok100 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// If an exception happens when starting to iterate over the second (and
	// subsequent) dicts. This is strictly not necessary, but it is nice.

	for ok101 := true; ok101; ok101 = 0 != 0 {
		if -1 < 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
			}
		}
		*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	}
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(outLoop)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok102 := true; ok102; ok102 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok103 := true; ok103; ok103 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok104 := true; ok104; ok104 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok105 := true; ok105; ok105 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RESULT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok106 := true; ok106; ok106 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok107 := true; ok107; ok107 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok108 := true; ok108; ok108 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok109 := true; ok109; ok109 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok110 := true; ok110; ok110 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok111 := true; ok111; ok111 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_UNSET_SCALAR == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok112 := true; ok112; ok112 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok113 := true; ok113; ok113 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok114 := true; ok114; ok114 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(workerIndex))
	}
	for ok115 := true; ok115; ok115 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_UNSET_SCALAR == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok116 := true; ok116; ok116 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok117 := true; ok117; ok117 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok118 := true; ok118; ok118 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
	}
	for ok119 := true; ok119; ok119 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RETURN_STK)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_RETURN_STK == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok120 := true; ok120; ok120 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_RETURN_STK].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok121 := true; ok121; ok121 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	return TCL_OK
}

func XTclCompileDictForCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1474:1: */
	return XCompileDictEachCmd(tls, interp, parsePtr, cmdPtr, envPtr,
		TCL_EACH_KEEP_NONE)
}

func XTclCompileDictMapCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1487:1: */
	return XCompileDictEachCmd(tls, interp, parsePtr, cmdPtr, envPtr,
		TCL_EACH_COLLECT)
}

func XCompileDictEachCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr, collect int32) int32 { /* tclCompCmds.c:1500:1: */
	bp := tls.Alloc(232)
	defer tls.Free(232)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varsTokenPtr uintptr
	var dictTokenPtr uintptr
	var bodyTokenPtr uintptr
	var keyVarIndex int32
	var valueVarIndex int32
	var nameChars int32
	var loopRange int32
	var catchRange int32
	var infoIndex int32
	var jumpDisplacement int32
	var bodyTargetOffset int32
	var emptyTargetOffset int32
	// var numVars int32 at bp+216, 4

	var endTargetOffset int32
	var collectVar int32 = -1 // Index of temp var holding the result
	// dict.
	// var argv uintptr at bp+224, 8

	// var buffer Tcl_DString at bp, 216

	// There must be three arguments after the command.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 4 {
		return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	varsTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	dictTokenPtr = varsTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varsTokenPtr)).FnumComponents+1)*24
	bodyTokenPtr = dictTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(dictTokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(varsTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD || (*Tcl_Token)(unsafe.Pointer(bodyTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
		return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	// Create temporary variable to capture return values from loop body when
	// we're collecting results.

	if collect == TCL_EACH_COLLECT {
		collectVar = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
		if collectVar < 0 {
			return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
		}
	}

	// Check we've got a pair of variables and that they are local variables.
	// Then extract their indices in the LVT.

	XTcl_DStringInit(tls, bp)
	XTcl_DStringAppend(tls, bp, (*Tcl_Token)(unsafe.Pointer(varsTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(varsTokenPtr+1*24)).Fsize)
	if XTcl_SplitList(tls, uintptr(0), (*Tcl_DString)(unsafe.Pointer(bp)).Fstring, bp+216,
		bp+224) != TCL_OK {
		XTcl_DStringFree(tls, bp)
		return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}
	XTcl_DStringFree(tls, bp)
	if *(*int32)(unsafe.Pointer(bp + 216)) != 2 {
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 224)))
		return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	nameChars = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224 /* argv */))))))
	keyVarIndex = XTclLocalScalar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224 /* argv */)))), nameChars, envPtr)
	nameChars = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224 /* argv */)) + 1*8))))
	valueVarIndex = XTclLocalScalar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224 /* argv */)) + 1*8)), nameChars, envPtr)
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 224)))

	if keyVarIndex < 0 || valueVarIndex < 0 {
		return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	// Allocate a temporary variable to store the iterator reference. The
	// variable will contain a Tcl_DictSearch reference which will be
	// allocated by INST_DICT_FIRST and disposed when the variable is unset
	// (at which point it should also have been finished with).

	infoIndex = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	if infoIndex < 0 {
		return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	// Preparation complete; issue instructions. Note that this code issues
	// fixed-sized jumps. That simplifies things a lot!
	//
	// First up, initialize the accumulator dictionary if needed.

	if collect == TCL_EACH_COLLECT {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		if collectVar <= 255 {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok8 := true; ok8; ok8 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - collectVar
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok10 := true; ok10; ok10 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok11 := true; ok11; ok11 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - collectVar
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

		for ok13 := true; ok13; ok13 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok14 := true; ok14; ok14 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok15 := true; ok15; ok15 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// Get the dictionary and start the iteration. No catching of errors at
	// this point.

	if (*Tcl_Token)(unsafe.Pointer(dictTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok16 := true; ok16; ok16 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(dictTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(dictTokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok17 := true; ok17; ok17 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok18 := true; ok18; ok18 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok19 := true; ok19; ok19 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok20 := true; ok20; ok20 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok21 := true; ok21; ok21 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok22 := true; ok22; ok22 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
		XTclCompileTokens(tls, interp, dictTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(dictTokenPtr)).FnumComponents, envPtr)
	}

	// Now we catch errors from here on so that we can finalize the search
	// started by Tcl_DictObjFirst above.

	catchRange = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
	for ok23 := true; ok23; ok23 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(catchRange) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(catchRange) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(catchRange) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(catchRange))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_BEGIN_CATCH4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok24 := true; ok24; ok24 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - catchRange
				}
				for ok25 := true; ok25; ok25 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(catchRange)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)

	for ok26 := true; ok26; ok26 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_FIRST)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_FIRST == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok27 := true; ok27; ok27 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_FIRST].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - infoIndex
				}
				for ok28 := true; ok28; ok28 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	emptyTargetOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok29 := true; ok29; ok29 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP_TRUE4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok30 := true; ok30; ok30 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP_TRUE4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok31 := true; ok31; ok31 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Inside the iteration, write the loop variables.

	bodyTargetOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	if keyVarIndex <= 255 {
		for ok32 := true; ok32; ok32 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok33 := true; ok33; ok33 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - keyVarIndex
					}
					for ok34 := true; ok34; ok34 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok35 := true; ok35; ok35 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok36 := true; ok36; ok36 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - keyVarIndex
					}
					for ok37 := true; ok37; ok37 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	for ok38 := true; ok38; ok38 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok39 := true; ok39; ok39 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok40 := true; ok40; ok40 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if valueVarIndex <= 255 {
		for ok41 := true; ok41; ok41 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valueVarIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok42 := true; ok42; ok42 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - valueVarIndex
					}
					for ok43 := true; ok43; ok43 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok44 := true; ok44; ok44 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valueVarIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valueVarIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valueVarIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(valueVarIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok45 := true; ok45; ok45 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - valueVarIndex
					}
					for ok46 := true; ok46; ok46 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	for ok47 := true; ok47; ok47 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok48 := true; ok48; ok48 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok49 := true; ok49; ok49 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Set up the loop exception targets.

	loopRange = XTclCreateExceptRange(tls, LOOP_EXCEPTION_RANGE, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(loopRange)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)

	// Compile the loop body itself. It should be stack-neutral.

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 3*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 3*8))
	XTclCompileCmdWord(tls, interp, bodyTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(bodyTokenPtr)).FnumComponents, envPtr)
	if collect == TCL_EACH_COLLECT {
		if keyVarIndex <= 255 {
			for ok50 := true; ok50; ok50 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok51 := true; ok51; ok51 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - keyVarIndex
						}
						for ok52 := true; ok52; ok52 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok53 := true; ok53; ok53 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keyVarIndex))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok54 := true; ok54; ok54 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - keyVarIndex
						}
						for ok55 := true; ok55; ok55 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

		for ok56 := true; ok56; ok56 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_OVER == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok57 := true; ok57; ok57 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 1
					}
					for ok58 := true; ok58; ok58 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok59 := true; ok59; ok59 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_SET)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DICT_SET == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok60 := true; ok60; ok60 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DICT_SET].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 1
					}
					for ok61 := true; ok61; ok61 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok62 := true; ok62; ok62 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar))
		}
		for ok63 := true; ok63; ok63 = 0 != 0 {
			if -1 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
		}
		for ok64 := true; ok64; ok64 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok65 := true; ok65; ok65 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok66 := true; ok66; ok66 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	for ok67 := true; ok67; ok67 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok68 := true; ok68; ok68 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok69 := true; ok69; ok69 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Both exception target ranges (error and loop) end here.

	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(loopRange)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(loopRange)*28)).FcodeOffset))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(catchRange)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(catchRange)*28)).FcodeOffset))

	// Continue (or just normally process) by getting the next pair of items
	// from the dictionary and jumping back to the code to write them into
	// variables if there is another pair.

	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(loopRange)*28)).FcontinueOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok70 := true; ok70; ok70 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_NEXT)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_NEXT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok71 := true; ok71; ok71 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_NEXT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - infoIndex
				}
				for ok72 := true; ok72; ok72 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	jumpDisplacement = int32(int64(bodyTargetOffset) - (int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1)
	for ok73 := true; ok73; ok73 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(jumpDisplacement) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(jumpDisplacement) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(jumpDisplacement) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(jumpDisplacement))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP_FALSE4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok74 := true; ok74; ok74 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP_FALSE4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - jumpDisplacement
				}
				for ok75 := true; ok75; ok75 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	endTargetOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok76 := true; ok76; ok76 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP1 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok77 := true; ok77; ok77 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok78 := true; ok78; ok78 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Error handler "finally" clause, which force-terminates the iteration
	// and rethrows the error.

	for ok79 := true; ok79; ok79 = 0 != 0 {
		if -1 < 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
			}
		}
		*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	}
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(catchRange)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok80 := true; ok80; ok80 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok81 := true; ok81; ok81 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok82 := true; ok82; ok82 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok83 := true; ok83; ok83 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RESULT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok84 := true; ok84; ok84 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok85 := true; ok85; ok85 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok86 := true; ok86; ok86 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok87 := true; ok87; ok87 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok88 := true; ok88; ok88 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok89 := true; ok89; ok89 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_UNSET_SCALAR == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok90 := true; ok90; ok90 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok91 := true; ok91; ok91 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok92 := true; ok92; ok92 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
	}
	if collect == TCL_EACH_COLLECT {
		for ok93 := true; ok93; ok93 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_UNSET_SCALAR == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok94 := true; ok94; ok94 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok95 := true; ok95; ok95 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok96 := true; ok96; ok96 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar))
		}
	}
	for ok97 := true; ok97; ok97 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RETURN_STK)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_RETURN_STK == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok98 := true; ok98; ok98 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_RETURN_STK].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok99 := true; ok99; ok99 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Otherwise we're done (the jump after the DICT_FIRST points here) and we
	// need to pop the bogus key/value pair (pushed to keep stack calculations
	// easy!) Note that we skip the END_CATCH. [Bug 1382528]

	jumpDisplacement = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(emptyTargetOffset))
	for ok100 := true; ok100; ok100 = 0 != 0 {
		*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(emptyTargetOffset))) = uint8(INST_JUMP_TRUE4)
		for ok101 := true; ok101; ok101 = 0 != 0 {
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(emptyTargetOffset) + uintptr(1))) = uint8(uint32(jumpDisplacement) >> 24)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(emptyTargetOffset) + uintptr(1) + uintptr(1))) = uint8(uint32(jumpDisplacement) >> 16)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(emptyTargetOffset) + uintptr(1) + uintptr(2))) = uint8(uint32(jumpDisplacement) >> 8)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(emptyTargetOffset) + uintptr(1) + uintptr(3))) = uint8(uint32(jumpDisplacement))
		}
	}
	jumpDisplacement = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(endTargetOffset))
	for ok102 := true; ok102; ok102 = 0 != 0 {
		*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(endTargetOffset))) = uint8(INST_JUMP1)
		*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(endTargetOffset) + uintptr(1))) = uint8(uint32(jumpDisplacement))
	}
	for ok103 := true; ok103; ok103 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok104 := true; ok104; ok104 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok105 := true; ok105; ok105 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok106 := true; ok106; ok106 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok107 := true; ok107; ok107 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok108 := true; ok108; ok108 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(loopRange)*28)).FbreakOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	XTclFinalizeLoopExceptionRange(tls, envPtr, loopRange)
	for ok109 := true; ok109; ok109 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok110 := true; ok110; ok110 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok111 := true; ok111; ok111 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Final stage of the command (normal case) is that we push an empty
	// object (or push the accumulator as the result object). This is done
	// last to promote peephole optimization when it's dropped immediately.

	for ok112 := true; ok112; ok112 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_UNSET_SCALAR == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok113 := true; ok113; ok113 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok114 := true; ok114; ok114 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok115 := true; ok115; ok115 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
	}
	if collect == TCL_EACH_COLLECT {
		if collectVar <= 255 {
			for ok116 := true; ok116; ok116 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok117 := true; ok117; ok117 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - collectVar
						}
						for ok118 := true; ok118; ok118 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok119 := true; ok119; ok119 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok120 := true; ok120; ok120 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - collectVar
						}
						for ok121 := true; ok121; ok121 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

		for ok122 := true; ok122; ok122 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_UNSET_SCALAR == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok123 := true; ok123; ok123 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok124 := true; ok124; ok124 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok125 := true; ok125; ok125 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(collectVar))
		}
	} else {
		for ok126 := true; ok126; ok126 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok127 := true; ok127; ok127 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok128 := true; ok128; ok128 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok129 := true; ok129; ok129 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok130 := true; ok130; ok130 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok131 := true; ok131; ok131 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok132 := true; ok132; ok132 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileDictUpdateCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1729:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var i int32
	var dictIndex int32
	var numVars int32
	var range1 int32
	var infoIndex int32
	var keyTokenPtrs uintptr
	var dictVarTokenPtr uintptr
	var bodyTokenPtr uintptr
	var tokenPtr uintptr
	var duiPtr uintptr
	// var jumpFixup JumpFixup at bp+8, 16

	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _delta7 int32
	var _delta8 int32
	var _delta9 int32
	var _delta10 int32
	var _delta11 int32
	var _delta12 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1

	// There must be at least one argument after the command.

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 5) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// Parse the command. Expect the following:
	//   dict update <lit(eral)> <any> <lit> ?<any> <lit> ...? <lit>

	if !(((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1)&1 != 0) {
		goto __2
	}
	return TCL_ERROR
__2:
	;
	numVars = ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3) / 2

	// The dictionary variable must be a local scalar that is knowable at
	// compile time; anything else exceeds the complexity of the opcode. So
	// discover what the index is.

	dictVarTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	dictIndex = XTclLocalScalarFromToken(tls, dictVarTokenPtr, envPtr)
	if !(dictIndex < 0) {
		goto __3
	}
	goto issueFallback
__3:
	;

	// Assemble the instruction metadata. This is complex enough that it is
	// represented as auxData; it holds an ordered list of variable indices
	// that are to be used.

	duiPtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+4))+uint64(unsafe.Sizeof(int32(0)))*uint64(numVars)))
	(*DictUpdateInfo)(unsafe.Pointer(duiPtr)).Flength = numVars
	keyTokenPtrs = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(numVars)))
	tokenPtr = dictVarTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(dictVarTokenPtr)).FnumComponents+1)*24

	i = 0
__4:
	if !(i < numVars) {
		goto __6
	}
	// Put keys to one side for later compilation to bytecode.

	*(*uintptr)(unsafe.Pointer(keyTokenPtrs + uintptr(i)*8)) = tokenPtr
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24

	// Stash the index in the auxiliary data (if it is indeed a local
	// scalar that is resolvable at compile-time).

	*(*int32)(unsafe.Pointer(duiPtr + 4 + uintptr(i)*4)) = XTclLocalScalarFromToken(tls, tokenPtr, envPtr)
	if !(*(*int32)(unsafe.Pointer(duiPtr + 4 + uintptr(i)*4)) < 0) {
		goto __7
	}
	goto failedUpdateInfoAssembly
__7:
	;
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __5
__5:
	i++
	goto __4
	goto __6
__6:
	;
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __8
	}
	goto failedUpdateInfoAssembly
__8:
	;
	bodyTokenPtr = tokenPtr

	// The list of variables to bind is stored in auxiliary data so that it
	// can't be snagged by literal sharing and forced to shimmer dangerously.

	infoIndex = XTclCreateAuxData(tls, duiPtr, uintptr(unsafe.Pointer(&dictUpdateInfoType)), envPtr)

	i = 0
__9:
	if !(i < numVars) {
		goto __11
	}
	if !((*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyTokenPtrs + uintptr(i)*8)))).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __12
	}
__14:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyTokenPtrs + uintptr(i)*8))+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyTokenPtrs + uintptr(i)*8))+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __17
	}
__19:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __22
	}
	XTclExpandCodeArray(tls, envPtr)
__22:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __23
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__23:
	;
__24:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __27
	}
	if !(_delta == -0x7fffffff-1) {
		goto __28
	}
	_delta = 1 - _objIndexCopy
__28:
	;
__29:
	if !(_delta < 0) {
		goto __32
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __33
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__33:
	;
__32:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
__27:
	;
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
	goto __18
__17:
__34:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __37
	}
	XTclExpandCodeArray(tls, envPtr)
__37:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __38
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__38:
	;
__39:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __42
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __43
	}
	_delta1 = 1 - _objIndexCopy
__43:
	;
__44:
	if !(_delta1 < 0) {
		goto __47
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __48
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__48:
	;
__47:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
__42:
	;
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
__18:
	;
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto __13
__12:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(2*i+2)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(2*i+2)*8))
	XTclCompileTokens(tls, interp, *(*uintptr)(unsafe.Pointer(keyTokenPtrs + uintptr(i)*8))+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyTokenPtrs + uintptr(i)*8)))).FnumComponents, envPtr)
__13:
	;

	goto __10
__10:
	i++
	goto __9
	goto __11
__11:
	;
__49:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __52
	}
	XTclExpandCodeArray(tls, envPtr)
__52:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numVars) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numVars) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numVars) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numVars))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __53
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST == INST_START_CMD {
			return 1
		}
		return 0
	}()
__53:
	;
__54:
	_delta2 = XtclInstructionTable[INST_LIST].FstackEffect
	if !(_delta2 != 0) {
		goto __57
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __58
	}
	_delta2 = 1 - numVars
__58:
	;
__59:
	if !(_delta2 < 0) {
		goto __62
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __63
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__63:
	;
__62:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __60
__60:
	if 0 != 0 {
		goto __59
	}
	goto __61
__61:
	;
__57:
	;
	goto __55
__55:
	if 0 != 0 {
		goto __54
	}
	goto __56
__56:
	;
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
__64:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __67
	}
	XTclExpandCodeArray(tls, envPtr)
__67:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_UPDATE_START)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __68
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DICT_UPDATE_START == INST_START_CMD {
			return 1
		}
		return 0
	}()
__68:
	;
__69:
	_delta3 = XtclInstructionTable[INST_DICT_UPDATE_START].FstackEffect
	if !(_delta3 != 0) {
		goto __72
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __73
	}
	_delta3 = 1 - dictIndex
__73:
	;
__74:
	if !(_delta3 < 0) {
		goto __77
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __78
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__78:
	;
__77:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __75
__75:
	if 0 != 0 {
		goto __74
	}
	goto __76
__76:
	;
__72:
	;
	goto __70
__70:
	if 0 != 0 {
		goto __69
	}
	goto __71
__71:
	;
	goto __65
__65:
	if 0 != 0 {
		goto __64
	}
	goto __66
__66:
	;
__79:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __82
	}
	XTclExpandCodeArray(tls, envPtr)
__82:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
	goto __80
__80:
	if 0 != 0 {
		goto __79
	}
	goto __81
__81:
	;

	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
__83:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __86
	}
	XTclExpandCodeArray(tls, envPtr)
__86:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __87
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_BEGIN_CATCH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__87:
	;
__88:
	_delta4 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
	if !(_delta4 != 0) {
		goto __91
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __92
	}
	_delta4 = 1 - range1
__92:
	;
__93:
	if !(_delta4 < 0) {
		goto __96
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __97
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__97:
	;
__96:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __94
__94:
	if 0 != 0 {
		goto __93
	}
	goto __95
__95:
	;
__91:
	;
	goto __89
__89:
	if 0 != 0 {
		goto __88
	}
	goto __90
__90:
	;
	goto __84
__84:
	if 0 != 0 {
		goto __83
	}
	goto __85
__85:
	;

	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1)*8))
	XTclCompileCmdWord(tls, interp, bodyTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(bodyTokenPtr)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))

	// Normal termination code: the stack has the key list below the result of
	// the body evaluation: swap them and finish the update code.

__98:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __101
	}
	XTclExpandCodeArray(tls, envPtr)
__101:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __102
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_END_CATCH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__102:
	;
__103:
	_delta5 = XtclInstructionTable[INST_END_CATCH].FstackEffect
	if !(_delta5 != 0) {
		goto __106
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __107
	}
	_delta5 = 1 - 0
__107:
	;
__108:
	if !(_delta5 < 0) {
		goto __111
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __112
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__112:
	;
__111:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __109
__109:
	if 0 != 0 {
		goto __108
	}
	goto __110
__110:
	;
__106:
	;
	goto __104
__104:
	if 0 != 0 {
		goto __103
	}
	goto __105
__105:
	;
	goto __99
__99:
	if 0 != 0 {
		goto __98
	}
	goto __100
__100:
	;
__113:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __116
	}
	XTclExpandCodeArray(tls, envPtr)
__116:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __117
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__117:
	;
__118:
	_delta6 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta6 != 0) {
		goto __121
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __122
	}
	_delta6 = 1 - 2
__122:
	;
__123:
	if !(_delta6 < 0) {
		goto __126
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __127
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__127:
	;
__126:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __124
__124:
	if 0 != 0 {
		goto __123
	}
	goto __125
__125:
	;
__121:
	;
	goto __119
__119:
	if 0 != 0 {
		goto __118
	}
	goto __120
__120:
	;
	goto __114
__114:
	if 0 != 0 {
		goto __113
	}
	goto __115
__115:
	;
__128:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __131
	}
	XTclExpandCodeArray(tls, envPtr)
__131:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_UPDATE_END)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __132
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DICT_UPDATE_END == INST_START_CMD {
			return 1
		}
		return 0
	}()
__132:
	;
__133:
	_delta7 = XtclInstructionTable[INST_DICT_UPDATE_END].FstackEffect
	if !(_delta7 != 0) {
		goto __136
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __137
	}
	_delta7 = 1 - dictIndex
__137:
	;
__138:
	if !(_delta7 < 0) {
		goto __141
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __142
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__142:
	;
__141:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __139
__139:
	if 0 != 0 {
		goto __138
	}
	goto __140
__140:
	;
__136:
	;
	goto __134
__134:
	if 0 != 0 {
		goto __133
	}
	goto __135
__135:
	;
	goto __129
__129:
	if 0 != 0 {
		goto __128
	}
	goto __130
__130:
	;
__143:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __146
	}
	XTclExpandCodeArray(tls, envPtr)
__146:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
	goto __144
__144:
	if 0 != 0 {
		goto __143
	}
	goto __145
__145:
	;

	// Jump around the exceptional termination code.

	XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+8)

	// Termination code for non-ok returns: stash the result and return
	// options in the stack, bring up the key list, finish the update code,
	// and finally return with the catched return data

	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__147:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __150
	}
	XTclExpandCodeArray(tls, envPtr)
__150:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __151
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RESULT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__151:
	;
__152:
	_delta8 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
	if !(_delta8 != 0) {
		goto __155
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __156
	}
	_delta8 = 1 - 0
__156:
	;
__157:
	if !(_delta8 < 0) {
		goto __160
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __161
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__161:
	;
__160:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __158
__158:
	if 0 != 0 {
		goto __157
	}
	goto __159
__159:
	;
__155:
	;
	goto __153
__153:
	if 0 != 0 {
		goto __152
	}
	goto __154
__154:
	;
	goto __148
__148:
	if 0 != 0 {
		goto __147
	}
	goto __149
__149:
	;
__162:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __165
	}
	XTclExpandCodeArray(tls, envPtr)
__165:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __166
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
			return 1
		}
		return 0
	}()
__166:
	;
__167:
	_delta9 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
	if !(_delta9 != 0) {
		goto __170
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __171
	}
	_delta9 = 1 - 0
__171:
	;
__172:
	if !(_delta9 < 0) {
		goto __175
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __176
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__176:
	;
__175:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __173
__173:
	if 0 != 0 {
		goto __172
	}
	goto __174
__174:
	;
__170:
	;
	goto __168
__168:
	if 0 != 0 {
		goto __167
	}
	goto __169
__169:
	;
	goto __163
__163:
	if 0 != 0 {
		goto __162
	}
	goto __164
__164:
	;
__177:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __180
	}
	XTclExpandCodeArray(tls, envPtr)
__180:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __181
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_END_CATCH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__181:
	;
__182:
	_delta10 = XtclInstructionTable[INST_END_CATCH].FstackEffect
	if !(_delta10 != 0) {
		goto __185
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __186
	}
	_delta10 = 1 - 0
__186:
	;
__187:
	if !(_delta10 < 0) {
		goto __190
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __191
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__191:
	;
__190:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __188
__188:
	if 0 != 0 {
		goto __187
	}
	goto __189
__189:
	;
__185:
	;
	goto __183
__183:
	if 0 != 0 {
		goto __182
	}
	goto __184
__184:
	;
	goto __178
__178:
	if 0 != 0 {
		goto __177
	}
	goto __179
__179:
	;
__192:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __195
	}
	XTclExpandCodeArray(tls, envPtr)
__195:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __196
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__196:
	;
__197:
	_delta11 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta11 != 0) {
		goto __200
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __201
	}
	_delta11 = 1 - 3
__201:
	;
__202:
	if !(_delta11 < 0) {
		goto __205
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __206
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__206:
	;
__205:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __203
__203:
	if 0 != 0 {
		goto __202
	}
	goto __204
__204:
	;
__200:
	;
	goto __198
__198:
	if 0 != 0 {
		goto __197
	}
	goto __199
__199:
	;
	goto __193
__193:
	if 0 != 0 {
		goto __192
	}
	goto __194
__194:
	;

__207:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __210
	}
	XTclExpandCodeArray(tls, envPtr)
__210:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_UPDATE_END)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictIndex))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __211
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DICT_UPDATE_END == INST_START_CMD {
			return 1
		}
		return 0
	}()
__211:
	;
__212:
	_delta12 = XtclInstructionTable[INST_DICT_UPDATE_END].FstackEffect
	if !(_delta12 != 0) {
		goto __215
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __216
	}
	_delta12 = 1 - dictIndex
__216:
	;
__217:
	if !(_delta12 < 0) {
		goto __220
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __221
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__221:
	;
__220:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __218
__218:
	if 0 != 0 {
		goto __217
	}
	goto __219
__219:
	;
__215:
	;
	goto __213
__213:
	if 0 != 0 {
		goto __212
	}
	goto __214
__214:
	;
	goto __208
__208:
	if 0 != 0 {
		goto __207
	}
	goto __209
__209:
	;
__222:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __225
	}
	XTclExpandCodeArray(tls, envPtr)
__225:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
	goto __223
__223:
	if 0 != 0 {
		goto __222
	}
	goto __224
__224:
	;
	XTclEmitInvoke(tls, envPtr, INST_RETURN_STK, 0)

	if !(XTclFixupForwardJump(tls, envPtr, bp+8, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+8)).FcodeOffset)), 127) != 0) {
		goto __226
	}
	XTcl_Panic(tls, ts+19105,
		libc.VaList(bp, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+8)).FcodeOffset))))
__226:
	;
	XTclStackFree(tls, interp, keyTokenPtrs)
	return TCL_OK

	// Clean up after a failure to create the DictUpdateInfo structure.

failedUpdateInfoAssembly:
	XTclpFree(tls, duiPtr)
	XTclStackFree(tls, interp, keyTokenPtrs)
issueFallback:
	return XTclCompileBasicMin2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileDictAppendCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1880:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var i int32
	var dictVarIndex int32

	// There must be at least two argument after the command. And we impose an
	// (arbirary) safe limit; anyone exceeding it should stop worrying about
	// speed quite so much. ;-)

	// TODO: Consider support for compiling expanded args.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 4 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 100 {
		return TCL_ERROR
	}

	// Get the index of the local variable that we will be working with.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	dictVarIndex = XTclLocalScalarFromToken(tls, tokenPtr, envPtr)
	if dictVarIndex < 0 {
		return XTclCompileBasicMin2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	// Produce the string to concatenate onto the dictionary entry.

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	for i = 2; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 4 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_CONCAT1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3)
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// Do the concatenation.

	for ok10 := true; ok10; ok10 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_APPEND)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_APPEND == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok11 := true; ok11; ok11 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_APPEND].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - dictVarIndex
				}
				for ok12 := true; ok12; ok12 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileDictLappendCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1935:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varTokenPtr uintptr
	var keyTokenPtr uintptr
	var valueTokenPtr uintptr
	var dictVarIndex int32

	// There must be three arguments after the command.

	// TODO: Consider support for compiling expanded args.
	// Probably not.  Why is INST_DICT_LAPPEND limited to one value?
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 4 {
		return TCL_ERROR
	}

	// Parse the arguments.

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	keyTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	valueTokenPtr = keyTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(keyTokenPtr)).FnumComponents+1)*24
	dictVarIndex = XTclLocalScalarFromToken(tls, varTokenPtr, envPtr)
	if dictVarIndex < 0 {
		return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	// Issue the implementation.

	if (*Tcl_Token)(unsafe.Pointer(keyTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(keyTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(keyTokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
		XTclCompileTokens(tls, interp, keyTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(keyTokenPtr)).FnumComponents, envPtr)
	}

	if (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 3*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 3*8))
		XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
	}

	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_LAPPEND)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVarIndex))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_LAPPEND == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_LAPPEND].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - dictVarIndex
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileDictWithCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:1980:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var i int32
	var range1 int32
	var varNameTmp int32 = -1
	var pathTmp int32 = -1
	var keysTmp int32
	var gotPath int32
	var dictVar int32
	var bodyIsEmpty int32 = 1
	var varTokenPtr uintptr
	var tokenPtr uintptr
	// var jumpFixup JumpFixup at bp+8, 16

	var ptr uintptr
	var end uintptr

	// There must be at least one argument after the command.

	// TODO: Consider support for compiling expanded args.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 {
		return TCL_ERROR
	}

	// Parse the command (trivially). Expect the following:
	//   dict with <any (varName)> ?<any> ...? <literal>

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	tokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	for i = 3; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
		return XTclCompileBasicMin2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	// Test if the last word is an empty script; if so, we can compile it in
	// all cases, but if it is non-empty we need local variable table entries
	// to hold the temporary variables (used to keep stack usage simple).

	ptr = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart
	end = ptr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize)
	for ; ptr != end; ptr++ {
		if int32(*(*int8)(unsafe.Pointer(ptr))) != ' ' && int32(*(*int8)(unsafe.Pointer(ptr))) != '\t' && int32(*(*int8)(unsafe.Pointer(ptr))) != '\n' && int32(*(*int8)(unsafe.Pointer(ptr))) != '\r' {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr == uintptr(0) {
				return XTclCompileBasicMin2ArgCmd(tls, interp, parsePtr, cmdPtr,
					envPtr)
			}
			bodyIsEmpty = 0
			break
		}
	}

	// Determine if we're manipulating a dict in a simple local variable.

	gotPath = libc.Bool32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 3)
	dictVar = XTclLocalScalarFromToken(tls, varTokenPtr, envPtr)

	// Special case: an empty body means we definitely have no need to issue
	// try-finally style code or to allocate local variable table entries for
	// storing temporaries. Still need to do both INST_DICT_EXPAND and
	// INST_DICT_RECOMBINE_* though, because we can't determine if we're free
	// of traces.

	if bodyIsEmpty != 0 {
		if dictVar >= 0 {
			if gotPath != 0 {
				// Case: Path into dict in LVT with empty body.

				tokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
				for i = 2; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1; i++ {
					if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
						for ok := true; ok; ok = 0 != 0 {
							var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
							if _objIndexCopy <= 255 {
								for ok1 := true; ok1; ok1 = 0 != 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
										XTclExpandCodeArray(tls, envPtr)
									}
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
											if INST_PUSH1 == INST_START_CMD {
												return 1
											}
											return 0
										}()
									}
									for ok2 := true; ok2; ok2 = 0 != 0 {
										var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
										if _delta != 0 {
											if _delta == -0x7fffffff-1 {
												_delta = 1 - _objIndexCopy
											}
											for ok3 := true; ok3; ok3 = 0 != 0 {
												if _delta < 0 {
													if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
														(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
													}
												}
												*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
											}
										}
									}
								}
							} else {
								for ok4 := true; ok4; ok4 = 0 != 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
										XTclExpandCodeArray(tls, envPtr)
									}
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
											if INST_PUSH4 == INST_START_CMD {
												return 1
											}
											return 0
										}()
									}
									for ok5 := true; ok5; ok5 = 0 != 0 {
										var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
										if _delta != 0 {
											if _delta == -0x7fffffff-1 {
												_delta = 1 - _objIndexCopy
											}
											for ok6 := true; ok6; ok6 = 0 != 0 {
												if _delta < 0 {
													if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
														(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
													}
												}
												*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
											}
										}
									}
								}
							}
						}
					} else {
						(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
						(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
						XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
					}

					tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
				}
				for ok7 := true; ok7; ok7 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LIST == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok8 := true; ok8; ok8 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3)
							}
							for ok9 := true; ok9; ok9 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				if dictVar <= 255 {
					for ok10 := true; ok10; ok10 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_LOAD_SCALAR1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok11 := true; ok11; ok11 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - dictVar
								}
								for ok12 := true; ok12; ok12 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok13 := true; ok13; ok13 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_LOAD_SCALAR4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok14 := true; ok14; ok14 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - dictVar
								}
								for ok15 := true; ok15; ok15 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}

				for ok16 := true; ok16; ok16 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_OVER == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok17 := true; ok17; ok17 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 1
							}
							for ok18 := true; ok18; ok18 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok19 := true; ok19; ok19 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_EXPAND)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DICT_EXPAND == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok20 := true; ok20; ok20 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DICT_EXPAND].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok21 := true; ok21; ok21 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok22 := true; ok22; ok22 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_RECOMBINE_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DICT_RECOMBINE_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok23 := true; ok23; ok23 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DICT_RECOMBINE_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - dictVar
							}
							for ok24 := true; ok24; ok24 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				// Case: Direct dict in LVT with empty body.

				for ok25 := true; ok25; ok25 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
					if _objIndexCopy <= 255 {
						for ok26 := true; ok26; ok26 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok27 := true; ok27; ok27 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok28 := true; ok28; ok28 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok29 := true; ok29; ok29 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok30 := true; ok30; ok30 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok31 := true; ok31; ok31 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
				if dictVar <= 255 {
					for ok32 := true; ok32; ok32 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_LOAD_SCALAR1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok33 := true; ok33; ok33 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - dictVar
								}
								for ok34 := true; ok34; ok34 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok35 := true; ok35; ok35 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_LOAD_SCALAR4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok36 := true; ok36; ok36 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - dictVar
								}
								for ok37 := true; ok37; ok37 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}

				for ok38 := true; ok38; ok38 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
					if _objIndexCopy <= 255 {
						for ok39 := true; ok39; ok39 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok40 := true; ok40; ok40 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok41 := true; ok41; ok41 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok42 := true; ok42; ok42 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok43 := true; ok43; ok43 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok44 := true; ok44; ok44 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
				for ok45 := true; ok45; ok45 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_EXPAND)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DICT_EXPAND == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok46 := true; ok46; ok46 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DICT_EXPAND].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok47 := true; ok47; ok47 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok48 := true; ok48; ok48 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_RECOMBINE_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DICT_RECOMBINE_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok49 := true; ok49; ok49 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DICT_RECOMBINE_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - dictVar
							}
							for ok50 := true; ok50; ok50 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		} else {
			if gotPath != 0 {
				// Case: Path into dict in non-simple var with empty body.

				tokenPtr = varTokenPtr
				for i = 1; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1; i++ {
					if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
						for ok51 := true; ok51; ok51 = 0 != 0 {
							var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
							if _objIndexCopy <= 255 {
								for ok52 := true; ok52; ok52 = 0 != 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
										XTclExpandCodeArray(tls, envPtr)
									}
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
											if INST_PUSH1 == INST_START_CMD {
												return 1
											}
											return 0
										}()
									}
									for ok53 := true; ok53; ok53 = 0 != 0 {
										var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
										if _delta != 0 {
											if _delta == -0x7fffffff-1 {
												_delta = 1 - _objIndexCopy
											}
											for ok54 := true; ok54; ok54 = 0 != 0 {
												if _delta < 0 {
													if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
														(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
													}
												}
												*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
											}
										}
									}
								}
							} else {
								for ok55 := true; ok55; ok55 = 0 != 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
										XTclExpandCodeArray(tls, envPtr)
									}
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
											if INST_PUSH4 == INST_START_CMD {
												return 1
											}
											return 0
										}()
									}
									for ok56 := true; ok56; ok56 = 0 != 0 {
										var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
										if _delta != 0 {
											if _delta == -0x7fffffff-1 {
												_delta = 1 - _objIndexCopy
											}
											for ok57 := true; ok57; ok57 = 0 != 0 {
												if _delta < 0 {
													if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
														(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
													}
												}
												*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
											}
										}
									}
								}
							}
						}
					} else {
						(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
						(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
						XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
					}

					tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
				}
				for ok58 := true; ok58; ok58 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LIST == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok59 := true; ok59; ok59 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3)
							}
							for ok60 := true; ok60; ok60 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok61 := true; ok61; ok61 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_OVER == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok62 := true; ok62; ok62 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 1
							}
							for ok63 := true; ok63; ok63 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok64 := true; ok64; ok64 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_STK)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok65 := true; ok65; ok65 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok66 := true; ok66; ok66 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok67 := true; ok67; ok67 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_OVER == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok68 := true; ok68; ok68 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 1
							}
							for ok69 := true; ok69; ok69 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok70 := true; ok70; ok70 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_EXPAND)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DICT_EXPAND == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok71 := true; ok71; ok71 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DICT_EXPAND].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok72 := true; ok72; ok72 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok73 := true; ok73; ok73 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_RECOMBINE_STK)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DICT_RECOMBINE_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok74 := true; ok74; ok74 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DICT_RECOMBINE_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok75 := true; ok75; ok75 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				// Case: Direct dict in non-simple var with empty body.

				if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
					for ok76 := true; ok76; ok76 = 0 != 0 {
						var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize, 0)
						if _objIndexCopy <= 255 {
							for ok77 := true; ok77; ok77 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH1 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok78 := true; ok78; ok78 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok79 := true; ok79; ok79 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						} else {
							for ok80 := true; ok80; ok80 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH4 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok81 := true; ok81; ok81 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok82 := true; ok82; ok82 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						}
					}
				} else {
					(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
					(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
					XTclCompileTokens(tls, interp, varTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents, envPtr)
				}

				for ok83 := true; ok83; ok83 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DUP == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok84 := true; ok84; ok84 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok85 := true; ok85; ok85 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok86 := true; ok86; ok86 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_STK)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok87 := true; ok87; ok87 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok88 := true; ok88; ok88 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok89 := true; ok89; ok89 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
					if _objIndexCopy <= 255 {
						for ok90 := true; ok90; ok90 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok91 := true; ok91; ok91 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok92 := true; ok92; ok92 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok93 := true; ok93; ok93 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok94 := true; ok94; ok94 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok95 := true; ok95; ok95 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
				for ok96 := true; ok96; ok96 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_EXPAND)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DICT_EXPAND == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok97 := true; ok97; ok97 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DICT_EXPAND].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok98 := true; ok98; ok98 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok99 := true; ok99; ok99 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
					if _objIndexCopy <= 255 {
						for ok100 := true; ok100; ok100 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok101 := true; ok101; ok101 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok102 := true; ok102; ok102 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok103 := true; ok103; ok103 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok104 := true; ok104; ok104 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok105 := true; ok105; ok105 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
				for ok106 := true; ok106; ok106 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_REVERSE == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok107 := true; ok107; ok107 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 2
							}
							for ok108 := true; ok108; ok108 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok109 := true; ok109; ok109 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_RECOMBINE_STK)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DICT_RECOMBINE_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok110 := true; ok110; ok110 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DICT_RECOMBINE_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok111 := true; ok111; ok111 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		for ok112 := true; ok112; ok112 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok113 := true; ok113; ok113 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok114 := true; ok114; ok114 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok115 := true; ok115; ok115 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok116 := true; ok116; ok116 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok117 := true; ok117; ok117 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok118 := true; ok118; ok118 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		return TCL_OK
	}

	// OK, we have a non-trivial body. This means that the focus is on
	// generating a try-finally structure where the INST_DICT_RECOMBINE_* goes
	// in the 'finally' clause.
	//
	// Start by allocating local (unnamed, untraced) working variables.

	if dictVar == -1 {
		varNameTmp = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	}
	if gotPath != 0 {
		pathTmp = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	}
	keysTmp = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)

	// Issue instructions. First, the part to expand the dictionary.

	if dictVar == -1 {
		if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok119 := true; ok119; ok119 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok120 := true; ok120; ok120 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok121 := true; ok121; ok121 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok122 := true; ok122; ok122 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok123 := true; ok123; ok123 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok124 := true; ok124; ok124 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok125 := true; ok125; ok125 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
			XTclCompileTokens(tls, interp, varTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents, envPtr)
		}

		if varNameTmp <= 255 {
			for ok126 := true; ok126; ok126 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok127 := true; ok127; ok127 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - varNameTmp
						}
						for ok128 := true; ok128; ok128 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok129 := true; ok129; ok129 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok130 := true; ok130; ok130 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - varNameTmp
						}
						for ok131 := true; ok131; ok131 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

	}
	tokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	if gotPath != 0 {
		for i = 2; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1; i++ {
			if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
				for ok132 := true; ok132; ok132 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
					if _objIndexCopy <= 255 {
						for ok133 := true; ok133; ok133 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok134 := true; ok134; ok134 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok135 := true; ok135; ok135 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok136 := true; ok136; ok136 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok137 := true; ok137; ok137 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok138 := true; ok138; ok138 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
			} else {
				(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
				(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
				XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
			}

			tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		}
		for ok139 := true; ok139; ok139 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-3) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok140 := true; ok140; ok140 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 3)
					}
					for ok141 := true; ok141; ok141 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		if pathTmp <= 255 {
			for ok142 := true; ok142; ok142 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok143 := true; ok143; ok143 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - pathTmp
						}
						for ok144 := true; ok144; ok144 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok145 := true; ok145; ok145 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok146 := true; ok146; ok146 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - pathTmp
						}
						for ok147 := true; ok147; ok147 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

		for ok148 := true; ok148; ok148 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok149 := true; ok149; ok149 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok150 := true; ok150; ok150 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	if dictVar == -1 {
		for ok151 := true; ok151; ok151 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_STK)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_STK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok152 := true; ok152; ok152 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_STK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok153 := true; ok153; ok153 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		if dictVar <= 255 {
			for ok154 := true; ok154; ok154 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok155 := true; ok155; ok155 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - dictVar
						}
						for ok156 := true; ok156; ok156 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok157 := true; ok157; ok157 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok158 := true; ok158; ok158 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - dictVar
						}
						for ok159 := true; ok159; ok159 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

	}
	if gotPath != 0 {
		if pathTmp <= 255 {
			for ok160 := true; ok160; ok160 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok161 := true; ok161; ok161 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - pathTmp
						}
						for ok162 := true; ok162; ok162 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok163 := true; ok163; ok163 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok164 := true; ok164; ok164 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - pathTmp
						}
						for ok165 := true; ok165; ok165 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

	} else {
		for ok166 := true; ok166; ok166 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok167 := true; ok167; ok167 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok168 := true; ok168; ok168 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok169 := true; ok169; ok169 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok170 := true; ok170; ok170 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok171 := true; ok171; ok171 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok172 := true; ok172; ok172 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}
	for ok173 := true; ok173; ok173 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_EXPAND)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DICT_EXPAND == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok174 := true; ok174; ok174 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DICT_EXPAND].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok175 := true; ok175; ok175 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if keysTmp <= 255 {
		for ok176 := true; ok176; ok176 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok177 := true; ok177; ok177 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - keysTmp
					}
					for ok178 := true; ok178; ok178 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok179 := true; ok179; ok179 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok180 := true; ok180; ok180 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - keysTmp
					}
					for ok181 := true; ok181; ok181 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	for ok182 := true; ok182; ok182 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok183 := true; ok183; ok183 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok184 := true; ok184; ok184 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Now the body of the [dict with].

	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
	for ok185 := true; ok185; ok185 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_BEGIN_CATCH4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok186 := true; ok186; ok186 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - range1
				}
				for ok187 := true; ok187; ok187 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1)*8))
	XTclCompileCmdWord(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))

	// Now fold the results back into the dictionary in the OK case.

	for ok188 := true; ok188; ok188 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok189 := true; ok189; ok189 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok190 := true; ok190; ok190 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if dictVar == -1 {
		if varNameTmp <= 255 {
			for ok191 := true; ok191; ok191 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok192 := true; ok192; ok192 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - varNameTmp
						}
						for ok193 := true; ok193; ok193 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok194 := true; ok194; ok194 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok195 := true; ok195; ok195 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - varNameTmp
						}
						for ok196 := true; ok196; ok196 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

	}
	if gotPath != 0 {
		if pathTmp <= 255 {
			for ok197 := true; ok197; ok197 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok198 := true; ok198; ok198 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - pathTmp
						}
						for ok199 := true; ok199; ok199 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok200 := true; ok200; ok200 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok201 := true; ok201; ok201 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - pathTmp
						}
						for ok202 := true; ok202; ok202 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

	} else {
		for ok203 := true; ok203; ok203 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok204 := true; ok204; ok204 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok205 := true; ok205; ok205 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok206 := true; ok206; ok206 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok207 := true; ok207; ok207 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok208 := true; ok208; ok208 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok209 := true; ok209; ok209 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}
	if keysTmp <= 255 {
		for ok210 := true; ok210; ok210 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok211 := true; ok211; ok211 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - keysTmp
					}
					for ok212 := true; ok212; ok212 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok213 := true; ok213; ok213 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok214 := true; ok214; ok214 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - keysTmp
					}
					for ok215 := true; ok215; ok215 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	if dictVar == -1 {
		for ok216 := true; ok216; ok216 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_RECOMBINE_STK)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DICT_RECOMBINE_STK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok217 := true; ok217; ok217 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DICT_RECOMBINE_STK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok218 := true; ok218; ok218 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok219 := true; ok219; ok219 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_RECOMBINE_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DICT_RECOMBINE_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok220 := true; ok220; ok220 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DICT_RECOMBINE_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - dictVar
					}
					for ok221 := true; ok221; ok221 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+8)

	// Now fold the results back into the dictionary in the exception case.

	for ok222 := true; ok222; ok222 = 0 != 0 {
		if -1 < 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
			}
		}
		*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	}
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok223 := true; ok223; ok223 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok224 := true; ok224; ok224 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok225 := true; ok225; ok225 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok226 := true; ok226; ok226 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RESULT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok227 := true; ok227; ok227 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok228 := true; ok228; ok228 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok229 := true; ok229; ok229 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok230 := true; ok230; ok230 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok231 := true; ok231; ok231 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if dictVar == -1 {
		if varNameTmp <= 255 {
			for ok232 := true; ok232; ok232 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok233 := true; ok233; ok233 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - varNameTmp
						}
						for ok234 := true; ok234; ok234 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok235 := true; ok235; ok235 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(varNameTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok236 := true; ok236; ok236 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - varNameTmp
						}
						for ok237 := true; ok237; ok237 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

	}
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 3 {
		if pathTmp <= 255 {
			for ok238 := true; ok238; ok238 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok239 := true; ok239; ok239 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - pathTmp
						}
						for ok240 := true; ok240; ok240 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok241 := true; ok241; ok241 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(pathTmp))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok242 := true; ok242; ok242 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - pathTmp
						}
						for ok243 := true; ok243; ok243 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

	} else {
		for ok244 := true; ok244; ok244 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok245 := true; ok245; ok245 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok246 := true; ok246; ok246 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok247 := true; ok247; ok247 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok248 := true; ok248; ok248 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok249 := true; ok249; ok249 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok250 := true; ok250; ok250 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}
	if keysTmp <= 255 {
		for ok251 := true; ok251; ok251 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok252 := true; ok252; ok252 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - keysTmp
					}
					for ok253 := true; ok253; ok253 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok254 := true; ok254; ok254 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(keysTmp))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok255 := true; ok255; ok255 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - keysTmp
					}
					for ok256 := true; ok256; ok256 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	if dictVar == -1 {
		for ok257 := true; ok257; ok257 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_RECOMBINE_STK)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DICT_RECOMBINE_STK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok258 := true; ok258; ok258 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DICT_RECOMBINE_STK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok259 := true; ok259; ok259 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok260 := true; ok260; ok260 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_RECOMBINE_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(dictVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DICT_RECOMBINE_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok261 := true; ok261; ok261 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DICT_RECOMBINE_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - dictVar
					}
					for ok262 := true; ok262; ok262 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	XTclEmitInvoke(tls, envPtr, INST_RETURN_STK, 0)

	// Prepare for the start of the next command.

	if XTclFixupForwardJump(tls, envPtr, bp+8, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+8)).FcodeOffset)), 127) != 0 {
		XTcl_Panic(tls, ts+19105,
			libc.VaList(bp, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+8)).FcodeOffset))))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DupDictUpdateInfo, FreeDictUpdateInfo --
//
//	Functions to duplicate, release and print the aux data created for use
//	with the INST_DICT_UPDATE_START and INST_DICT_UPDATE_END instructions.
//
// Results:
//	DupDictUpdateInfo: a copy of the auxiliary data
//	FreeDictUpdateInfo: none
//	PrintDictUpdateInfo: none
//	DisassembleDictUpdateInfo: none
//
// Side effects:
//	DupDictUpdateInfo: allocates memory
//	FreeDictUpdateInfo: releases memory
//	PrintDictUpdateInfo: none
//	DisassembleDictUpdateInfo: none
//
//----------------------------------------------------------------------

func sDupDictUpdateInfo(tls *libc.TLS, clientData ClientData) ClientData { /* tclCompCmds.c:2254:1: */
	var dui1Ptr uintptr
	var dui2Ptr uintptr
	var len uint32

	dui1Ptr = clientData
	len = uint32(uint64(int32(uintptr(0)+4)) + uint64(unsafe.Sizeof(int32(0)))*uint64((*DictUpdateInfo)(unsafe.Pointer(dui1Ptr)).Flength))
	dui2Ptr = XTcl_Alloc(tls, len)
	libc.Xmemcpy(tls, dui2Ptr, dui1Ptr, uint64(len))
	return dui2Ptr
}

func sFreeDictUpdateInfo(tls *libc.TLS, clientData ClientData) { /* tclCompCmds.c:2268:1: */
	XTclpFree(tls, clientData)
}

func sPrintDictUpdateInfo(tls *libc.TLS, clientData ClientData, appendObj uintptr, codePtr uintptr, pcOffset uint32) { /* tclCompCmds.c:2275:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var duiPtr uintptr = clientData
	var i int32

	for i = 0; i < (*DictUpdateInfo)(unsafe.Pointer(duiPtr)).Flength; i++ {
		if i != 0 {
			XTcl_AppendToObj(tls, appendObj, ts+19153, -1)
		}
		XTcl_AppendPrintfToObj(tls, appendObj, ts+19156, libc.VaList(bp, *(*int32)(unsafe.Pointer(duiPtr + 4 + uintptr(i)*4))))
	}
}

func sDisassembleDictUpdateInfo(tls *libc.TLS, clientData ClientData, dictObj uintptr, codePtr uintptr, pcOffset uint32) { /* tclCompCmds.c:2293:1: */
	var duiPtr uintptr = clientData
	var i int32
	var variables uintptr = XTcl_NewObj(tls)

	for i = 0; i < (*DictUpdateInfo)(unsafe.Pointer(duiPtr)).Flength; i++ {
		XTcl_ListObjAppendElement(tls, uintptr(0), variables,
			XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(duiPtr + 4 + uintptr(i)*4))))
	}
	XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+19162, -1),
		variables)
}

//----------------------------------------------------------------------
//
// TclCompileErrorCmd --
//
//	Procedure called to compile the "error" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "error" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileErrorCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:2330:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	// General syntax: [error message ?errorInfo? ?errorCode?]

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 4 {
		return TCL_ERROR
	}

	// Handle the message.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	// Construct the options. Note that -code and -level are not here.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 2 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+12560, int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok17 := true; ok17; ok17 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok20 := true; ok20; ok20 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok21 := true; ok21; ok21 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok22 := true; ok22; ok22 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok23 := true; ok23; ok23 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok24 := true; ok24; ok24 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok25 := true; ok25; ok25 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok26 := true; ok26; ok26 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok27 := true; ok27; ok27 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 3 {
			for ok28 := true; ok28; ok28 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LIST == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok29 := true; ok29; ok29 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 2
						}
						for ok30 := true; ok30; ok30 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok31 := true; ok31; ok31 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+12571, int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)), 0)
				if _objIndexCopy <= 255 {
					for ok32 := true; ok32; ok32 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok33 := true; ok33; ok33 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok34 := true; ok34; ok34 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok35 := true; ok35; ok35 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok36 := true; ok36; ok36 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok37 := true; ok37; ok37 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
			if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
				for ok38 := true; ok38; ok38 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
					if _objIndexCopy <= 255 {
						for ok39 := true; ok39; ok39 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok40 := true; ok40; ok40 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok41 := true; ok41; ok41 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok42 := true; ok42; ok42 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok43 := true; ok43; ok43 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok44 := true; ok44; ok44 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
			} else {
				(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 3*4))
				(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 3*8))
				XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
			}

			for ok45 := true; ok45; ok45 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(4)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(4)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(4)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(4))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LIST == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok46 := true; ok46; ok46 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 4
						}
						for ok47 := true; ok47; ok47 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}

	// Issue the error via 'returnImm error 0'.

	for ok48 := true; ok48; ok48 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RETURN_IMM)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(TCL_ERROR))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_RETURN_IMM == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok49 := true; ok49; ok49 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_RETURN_IMM].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - TCL_ERROR
				}
				for ok50 := true; ok50; ok50 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok51 := true; ok51; ok51 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileExprCmd --
//
//	Procedure called to compile the "expr" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "expr" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileExprCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:2404:1: */
	var firstWordPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 1 {
		return TCL_ERROR
	}

	// TIP #280: Use the per-word line information of the current command.

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Floc+uintptr((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fnuloc-1)*24)).Fline + 1*4))

	firstWordPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	XTclCompileExprWords(tls, interp, firstWordPtr, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1, envPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileForCmd --
//
//	Procedure called to compile the "for" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "for" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileForCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:2449:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var startTokenPtr uintptr
	var testTokenPtr uintptr
	var nextTokenPtr uintptr
	var bodyTokenPtr uintptr
	// var jumpEvalCondFixup JumpFixup at bp, 16

	var bodyCodeOffset int32
	var nextCodeOffset int32
	var jumpDist int32
	var bodyRange int32
	var nextRange int32

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 5 {
		return TCL_ERROR
	}

	// If the test expression requires substitutions, don't compile the for
	// command inline. E.g., the expression might cause the loop to never
	// execute or execute forever, as in "for {} "$x > 5" {incr x} {}".

	startTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	testTokenPtr = startTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(startTokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(testTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
		return TCL_ERROR
	}

	// Bail out also if the body or the next expression require substitutions
	// in order to insure correct behaviour [Bug 219166]

	nextTokenPtr = testTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(testTokenPtr)).FnumComponents+1)*24
	bodyTokenPtr = nextTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(nextTokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(nextTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD ||
		(*Tcl_Token)(unsafe.Pointer(bodyTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
		return TCL_ERROR
	}

	// Inline compile the initial command.

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileCmdWord(tls, interp, startTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(startTokenPtr)).FnumComponents, envPtr)
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Jump to the evaluation of the condition. This code uses the "loop
	// rotation" optimisation (which eliminates one branch from the loop).
	// "for start cond next body" produces then:
	//       start
	//       goto A
	//    B: body                : bodyCodeOffset
	//       next                : nextCodeOffset, continueOffset
	//    A: cond -> result      : testCodeOffset
	//       if (result) goto B

	XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp)

	// Compile the loop body.

	bodyRange = XTclCreateExceptRange(tls, LOOP_EXCEPTION_RANGE, envPtr)
	bodyCodeOffset = func() int32 {
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
				return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
			}
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
		}()
		return libc.AssignPtrInt32((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(bodyRange)*28+8, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1))
	}()
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 4*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 4*8))
	XTclCompileCmdWord(tls, interp, bodyTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(bodyTokenPtr)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(bodyRange)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(bodyRange)*28)).FcodeOffset))
	for ok3 := true; ok3; ok3 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Compile the "next" subcommand. Note that this exception range will not
	// have a continueOffset (other than -1) connected to it; it won't trap
	// TCL_CONTINUE but rather just TCL_BREAK.

	nextRange = XTclCreateExceptRange(tls, LOOP_EXCEPTION_RANGE, envPtr)
	(*ExceptionAux)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr + uintptr(nextRange)*56)).FsupportsContinue = 0
	nextCodeOffset = func() int32 {
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
				return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
			}
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
		}()
		return libc.AssignPtrInt32((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(nextRange)*28+8, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1))
	}()
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 3*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 3*8))
	XTclCompileCmdWord(tls, interp, nextTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(nextTokenPtr)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(nextRange)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(nextRange)*28)).FcodeOffset))
	for ok6 := true; ok6; ok6 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Compile the test expression then emit the conditional jump that
	// terminates the for.

	if XTclFixupForwardJump(tls, envPtr, bp, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp)).FcodeOffset)), 127) != 0 {
		bodyCodeOffset = bodyCodeOffset + 3
		nextCodeOffset = nextCodeOffset + 3
	}

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
	XTclCompileExprWords(tls, interp, testTokenPtr, 1, envPtr)

	jumpDist = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(bodyCodeOffset))
	if jumpDist > 127 {
		for ok9 := true; ok9; ok9 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP_TRUE4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok10 := true; ok10; ok10 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP_TRUE4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - -jumpDist
					}
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok12 := true; ok12; ok12 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP_TRUE1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok13 := true; ok13; ok13 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - -jumpDist
					}
					for ok14 := true; ok14; ok14 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// Fix the starting points of the exception ranges (may have moved due to
	// jump type modification) and set where the exceptions target.

	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(bodyRange)*28)).FcodeOffset = bodyCodeOffset
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(bodyRange)*28)).FcontinueOffset = nextCodeOffset

	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(nextRange)*28)).FcodeOffset = nextCodeOffset

	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(bodyRange)*28)).FbreakOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(nextRange)*28)).FbreakOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	XTclFinalizeLoopExceptionRange(tls, envPtr, bodyRange)
	XTclFinalizeLoopExceptionRange(tls, envPtr, nextRange)

	// The for command's result is an empty string.

	for ok15 := true; ok15; ok15 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok16 := true; ok16; ok16 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok17 := true; ok17; ok17 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok18 := true; ok18; ok18 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok19 := true; ok19; ok19 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok20 := true; ok20; ok20 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok21 := true; ok21; ok21 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileForeachCmd --
//
//	Procedure called to compile the "foreach" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "foreach" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileForeachCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:2598:1: */
	return sCompileEachloopCmd(tls, interp, parsePtr, cmdPtr, envPtr,
		TCL_EACH_KEEP_NONE)
}

//----------------------------------------------------------------------
//
// TclCompileLmapCmd --
//
//	Procedure called to compile the "lmap" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "lmap" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileLmapCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:2629:1: */
	return sCompileEachloopCmd(tls, interp, parsePtr, cmdPtr, envPtr,
		TCL_EACH_COLLECT)
}

//----------------------------------------------------------------------
//
// CompileEachloopCmd --
//
//	Procedure called to compile the "foreach" and "lmap" commands.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "foreach" command at
//	runtime.
//
//----------------------------------------------------------------------

func sCompileEachloopCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr, collect int32) int32 { /* tclCompCmds.c:2660:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var procPtr uintptr
	var infoPtr uintptr // Points to the structure describing this
	// foreach command. Stored in a AuxData
	// record in the ByteCode.

	var tokenPtr uintptr
	var bodyTokenPtr uintptr
	var jumpBackOffset int32
	var infoIndex int32
	var range1 int32
	var numWords int32
	var numLists int32
	var i int32
	var j int32
	var code int32
	var varListObj uintptr
	// var varNameObj uintptr at bp+8, 8

	var bytes uintptr
	// var numBytes int32 at bp+16, 4

	var varIndex int32
	var varListPtr uintptr
	// var numVars int32 at bp, 4

	var _delta int32
	var _delta1 int32
	var _delta2 int32
	var _objIndexCopy int32
	var _delta3 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _delta7 int32
	var _delta8 int32
	var _delta9 int32
	var _objIndexCopy1 int32
	var _objPtr uintptr
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	procPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr
	infoPtr = uintptr(0)
	code = TCL_OK
	varListObj = uintptr(0)

	// If the foreach command isn't in a procedure, don't compile it inline:
	// the payoff is too small.

	if !(procPtr == uintptr(0)) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	if !(numWords < 4 || numWords%2 != 0) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	// Bail out if the body requires substitutions in order to insure correct
	// behaviour. [Bug 219166]

	i = 0
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
__3:
	if !(i < numWords-1) {
		goto __5
	}
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __4
__4:
	i++
	goto __3
	goto __5
__5:
	;
	bodyTokenPtr = tokenPtr
	if !((*Tcl_Token)(unsafe.Pointer(bodyTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __6
	}
	return TCL_ERROR
__6:
	;

	// Create and initialize the ForeachInfo and ForeachVarList data
	// structures describing this command. Then create a AuxData record
	// pointing to the ForeachInfo structure.

	numLists = (numWords - 2) / 2
	infoPtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+16))+uint64(numLists)*uint64(unsafe.Sizeof(uintptr(0)))))
	(*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists = 0 // Count this up as we go

	// Parse each var list into sequence of var names.  Don't
	// compile the foreach inline if any var name needs substitutions or isn't
	// a scalar, or if any var list needs substitutions.

	varListObj = XTcl_NewObj(tls)
	i = 0
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
__7:
	if !(i < numWords-1) {
		goto __9
	}

	if !(i%2 != 1) {
		goto __10
	}
	goto __8
__10:
	;

	// If the variable list is empty, we can enter an infinite loop when
	// the interpreted version would not.  Take care to ensure this does
	// not happen.  [Bug 1671138]

	if !(!(XTclWordKnownAtCompileTime(tls, tokenPtr, varListObj) != 0) || TCL_OK != XTcl_ListObjLength(tls, uintptr(0), varListObj, bp) || *(*int32)(unsafe.Pointer(bp)) == 0) {
		goto __11
	}
	code = TCL_ERROR
	goto done
__11:
	;

	varListPtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+4))+uint64(*(*int32)(unsafe.Pointer(bp)))*uint64(unsafe.Sizeof(int32(0)))))
	(*ForeachVarList)(unsafe.Pointer(varListPtr)).FnumVars = *(*int32)(unsafe.Pointer(bp /* numVars */))
	*(*uintptr)(unsafe.Pointer(infoPtr + 16 + uintptr(i/2)*8)) = varListPtr
	(*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists++

	j = 0
__12:
	if !(j < *(*int32)(unsafe.Pointer(bp))) {
		goto __14
	}

	XTcl_ListObjIndex(tls, uintptr(0), varListObj, j, bp+8)
	bytes = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* varNameObj */)), bp+16)
	varIndex = XTclLocalScalar(tls, bytes, *(*int32)(unsafe.Pointer(bp + 16 /* numBytes */)), envPtr)
	if !(varIndex < 0) {
		goto __15
	}
	code = TCL_ERROR
	goto done
__15:
	;
	*(*int32)(unsafe.Pointer(varListPtr + 4 + uintptr(j)*4)) = varIndex
	goto __13
__13:
	j++
	goto __12
	goto __14
__14:
	;
	XTcl_SetObjLength(tls, varListObj, 0)
	goto __8
__8:
	i++
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __7
	goto __9
__9:
	;

	// We will compile the foreach command.

	infoIndex = XTclCreateAuxData(tls, infoPtr, uintptr(unsafe.Pointer(&newForeachInfoType)), envPtr)

	// Create the collecting object, unshared.

	if !(collect == TCL_EACH_COLLECT) {
		goto __16
	}
__17:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __20
	}
	XTclExpandCodeArray(tls, envPtr)
__20:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __21
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST == INST_START_CMD {
			return 1
		}
		return 0
	}()
__21:
	;
__22:
	_delta = XtclInstructionTable[INST_LIST].FstackEffect
	if !(_delta != 0) {
		goto __25
	}
	if !(_delta == -0x7fffffff-1) {
		goto __26
	}
	_delta = 1 - 0
__26:
	;
__27:
	if !(_delta < 0) {
		goto __30
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __31
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__31:
	;
__30:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
__25:
	;
	goto __23
__23:
	if 0 != 0 {
		goto __22
	}
	goto __24
__24:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
__16:
	;

	// Evaluate each value list and leave it on stack.

	i = 0
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
__32:
	if !(i < numWords-1) {
		goto __34
	}
	if !(i%2 == 0 && i > 0) {
		goto __35
	}
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __36
	}
__38:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __41
	}
__43:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __46
	}
	XTclExpandCodeArray(tls, envPtr)
__46:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __47
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__47:
	;
__48:
	_delta1 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta1 != 0) {
		goto __51
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __52
	}
	_delta1 = 1 - _objIndexCopy
__52:
	;
__53:
	if !(_delta1 < 0) {
		goto __56
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __57
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__57:
	;
__56:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
__51:
	;
	goto __49
__49:
	if 0 != 0 {
		goto __48
	}
	goto __50
__50:
	;
	goto __44
__44:
	if 0 != 0 {
		goto __43
	}
	goto __45
__45:
	;
	goto __42
__41:
__58:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __61
	}
	XTclExpandCodeArray(tls, envPtr)
__61:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __62
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__62:
	;
__63:
	_delta2 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta2 != 0) {
		goto __66
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __67
	}
	_delta2 = 1 - _objIndexCopy
__67:
	;
__68:
	if !(_delta2 < 0) {
		goto __71
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __72
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__72:
	;
__71:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __69
__69:
	if 0 != 0 {
		goto __68
	}
	goto __70
__70:
	;
__66:
	;
	goto __64
__64:
	if 0 != 0 {
		goto __63
	}
	goto __65
__65:
	;
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
__42:
	;
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	goto __37
__36:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__37:
	;

__35:
	;
	goto __33
__33:
	i++
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __32
	goto __34
__34:
	;

__73:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __76
	}
	XTclExpandCodeArray(tls, envPtr)
__76:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_FOREACH_START)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __77
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_FOREACH_START == INST_START_CMD {
			return 1
		}
		return 0
	}()
__77:
	;
__78:
	_delta3 = XtclInstructionTable[INST_FOREACH_START].FstackEffect
	if !(_delta3 != 0) {
		goto __81
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __82
	}
	_delta3 = 1 - infoIndex
__82:
	;
__83:
	if !(_delta3 < 0) {
		goto __86
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __87
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__87:
	;
__86:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __84
__84:
	if 0 != 0 {
		goto __83
	}
	goto __85
__85:
	;
__81:
	;
	goto __79
__79:
	if 0 != 0 {
		goto __78
	}
	goto __80
__80:
	;
	goto __74
__74:
	if 0 != 0 {
		goto __73
	}
	goto __75
__75:
	;

	// Inline compile the loop body.

	range1 = XTclCreateExceptRange(tls, LOOP_EXCEPTION_RANGE, envPtr)

	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(numWords-1)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(numWords-1)*8))
	XTclCompileCmdWord(tls, interp, bodyTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(bodyTokenPtr)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))

	if !(collect == TCL_EACH_COLLECT) {
		goto __88
	}
__90:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __93
	}
	XTclExpandCodeArray(tls, envPtr)
__93:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LMAP_COLLECT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __94
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LMAP_COLLECT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__94:
	;
__95:
	_delta4 = XtclInstructionTable[INST_LMAP_COLLECT].FstackEffect
	if !(_delta4 != 0) {
		goto __98
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __99
	}
	_delta4 = 1 - 0
__99:
	;
__100:
	if !(_delta4 < 0) {
		goto __103
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __104
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__104:
	;
__103:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __101
__101:
	if 0 != 0 {
		goto __100
	}
	goto __102
__102:
	;
__98:
	;
	goto __96
__96:
	if 0 != 0 {
		goto __95
	}
	goto __97
__97:
	;
	goto __91
__91:
	if 0 != 0 {
		goto __90
	}
	goto __92
__92:
	;
	goto __89
__88:
__105:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __108
	}
	XTclExpandCodeArray(tls, envPtr)
__108:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __109
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__109:
	;
__110:
	_delta5 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta5 != 0) {
		goto __113
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __114
	}
	_delta5 = 1 - 0
__114:
	;
__115:
	if !(_delta5 < 0) {
		goto __118
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __119
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__119:
	;
__118:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __116
__116:
	if 0 != 0 {
		goto __115
	}
	goto __117
__117:
	;
__113:
	;
	goto __111
__111:
	if 0 != 0 {
		goto __110
	}
	goto __112
__112:
	;
	goto __106
__106:
	if 0 != 0 {
		goto __105
	}
	goto __107
__107:
	;
__89:
	;

	// Bottom of loop code: assign each loop variable and check whether
	// to terminate the loop. Set the loop's break target.

	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcontinueOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__120:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __123
	}
	XTclExpandCodeArray(tls, envPtr)
__123:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_FOREACH_STEP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __124
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_FOREACH_STEP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__124:
	;
__125:
	_delta6 = XtclInstructionTable[INST_FOREACH_STEP].FstackEffect
	if !(_delta6 != 0) {
		goto __128
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __129
	}
	_delta6 = 1 - 0
__129:
	;
__130:
	if !(_delta6 < 0) {
		goto __133
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __134
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__134:
	;
__133:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __131
__131:
	if 0 != 0 {
		goto __130
	}
	goto __132
__132:
	;
__128:
	;
	goto __126
__126:
	if 0 != 0 {
		goto __125
	}
	goto __127
__127:
	;
	goto __121
__121:
	if 0 != 0 {
		goto __120
	}
	goto __122
__122:
	;
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FbreakOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	XTclFinalizeLoopExceptionRange(tls, envPtr, range1)
__135:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __138
	}
	XTclExpandCodeArray(tls, envPtr)
__138:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_FOREACH_END)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __139
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_FOREACH_END == INST_START_CMD {
			return 1
		}
		return 0
	}()
__139:
	;
__140:
	_delta7 = XtclInstructionTable[INST_FOREACH_END].FstackEffect
	if !(_delta7 != 0) {
		goto __143
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __144
	}
	_delta7 = 1 - 0
__144:
	;
__145:
	if !(_delta7 < 0) {
		goto __148
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __149
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__149:
	;
__148:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __146
__146:
	if 0 != 0 {
		goto __145
	}
	goto __147
__147:
	;
__143:
	;
	goto __141
__141:
	if 0 != 0 {
		goto __140
	}
	goto __142
__142:
	;
	goto __136
__136:
	if 0 != 0 {
		goto __135
	}
	goto __137
__137:
	;
__150:
	if !(-(numLists + 2) < 0) {
		goto __153
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __154
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__154:
	;
__153:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -(numLists + 2)
	goto __151
__151:
	if 0 != 0 {
		goto __150
	}
	goto __152
__152:
	;

	// Set the jumpback distance from INST_FOREACH_STEP to the start of the
	// body's code. Misuse loopCtTemp for storing the jump size.

	jumpBackOffset = (*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcontinueOffset - (*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset
	(*ForeachInfo)(unsafe.Pointer(infoPtr)).FloopCtTemp = -jumpBackOffset

	// The command's result is an empty string if not collecting. If
	// collecting, it is automatically left on stack after FOREACH_END.

	if !(collect != TCL_EACH_COLLECT) {
		goto __155
	}
__156:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy1 <= 255) {
		goto __159
	}
__161:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __164
	}
	XTclExpandCodeArray(tls, envPtr)
__164:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __165
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__165:
	;
__166:
	_delta8 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta8 != 0) {
		goto __169
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __170
	}
	_delta8 = 1 - _objIndexCopy1
__170:
	;
__171:
	if !(_delta8 < 0) {
		goto __174
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __175
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__175:
	;
__174:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __172
__172:
	if 0 != 0 {
		goto __171
	}
	goto __173
__173:
	;
__169:
	;
	goto __167
__167:
	if 0 != 0 {
		goto __166
	}
	goto __168
__168:
	;
	goto __162
__162:
	if 0 != 0 {
		goto __161
	}
	goto __163
__163:
	;
	goto __160
__159:
__176:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __179
	}
	XTclExpandCodeArray(tls, envPtr)
__179:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __180
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__180:
	;
__181:
	_delta9 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta9 != 0) {
		goto __184
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __185
	}
	_delta9 = 1 - _objIndexCopy1
__185:
	;
__186:
	if !(_delta9 < 0) {
		goto __189
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __190
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__190:
	;
__189:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __187
__187:
	if 0 != 0 {
		goto __186
	}
	goto __188
__188:
	;
__184:
	;
	goto __182
__182:
	if 0 != 0 {
		goto __181
	}
	goto __183
__183:
	;
	goto __177
__177:
	if 0 != 0 {
		goto __176
	}
	goto __178
__178:
	;
__160:
	;
	goto __157
__157:
	if 0 != 0 {
		goto __156
	}
	goto __158
__158:
	;
__155:
	;

done:
	if !(code == TCL_ERROR) {
		goto __191
	}
	sFreeForeachInfo(tls, infoPtr)
__191:
	;
__192:
	_objPtr = varListObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __195
	}
	XTclFreeObj(tls, _objPtr)
__195:
	;
	goto __193
__193:
	if 0 != 0 {
		goto __192
	}
	goto __194
__194:
	;
	return code
}

//----------------------------------------------------------------------
//
// DupForeachInfo --
//
//	This procedure duplicates a ForeachInfo structure created as auxiliary
//	data during the compilation of a foreach command.
//
// Results:
//	A pointer to a newly allocated copy of the existing ForeachInfo
//	structure is returned.
//
// Side effects:
//	Storage for the copied ForeachInfo record is allocated. If the
//	original ForeachInfo structure pointed to any ForeachVarList records,
//	these structures are also copied and pointers to them are stored in
//	the new ForeachInfo record.
//
//----------------------------------------------------------------------

func sDupForeachInfo(tls *libc.TLS, clientData ClientData) ClientData { /* tclCompCmds.c:2876:1: */
	var srcPtr uintptr = clientData
	var dupPtr uintptr
	var srcListPtr uintptr
	var dupListPtr uintptr
	var numVars int32
	var i int32
	var j int32
	var numLists int32 = (*ForeachInfo)(unsafe.Pointer(srcPtr)).FnumLists

	dupPtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+16))+uint64(numLists)*uint64(unsafe.Sizeof(uintptr(0)))))
	(*ForeachInfo)(unsafe.Pointer(dupPtr)).FnumLists = numLists
	(*ForeachInfo)(unsafe.Pointer(dupPtr)).FfirstValueTemp = (*ForeachInfo)(unsafe.Pointer(srcPtr)).FfirstValueTemp
	(*ForeachInfo)(unsafe.Pointer(dupPtr)).FloopCtTemp = (*ForeachInfo)(unsafe.Pointer(srcPtr)).FloopCtTemp

	for i = 0; i < numLists; i++ {
		srcListPtr = *(*uintptr)(unsafe.Pointer(srcPtr + 16 + uintptr(i)*8))
		numVars = (*ForeachVarList)(unsafe.Pointer(srcListPtr)).FnumVars
		dupListPtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+4))+uint64(numVars)*uint64(unsafe.Sizeof(int32(0)))))
		(*ForeachVarList)(unsafe.Pointer(dupListPtr)).FnumVars = numVars
		for j = 0; j < numVars; j++ {
			*(*int32)(unsafe.Pointer(dupListPtr + 4 + uintptr(j)*4)) = *(*int32)(unsafe.Pointer(srcListPtr + 4 + uintptr(j)*4))
		}
		*(*uintptr)(unsafe.Pointer(dupPtr + 16 + uintptr(i)*8)) = dupListPtr
	}
	return dupPtr
}

//----------------------------------------------------------------------
//
// FreeForeachInfo --
//
//	Procedure to free a ForeachInfo structure created as auxiliary data
//	during the compilation of a foreach command.
//
// Results:
//	None.
//
// Side effects:
//	Storage for the ForeachInfo structure pointed to by the ClientData
//	argument is freed as is any ForeachVarList record pointed to by the
//	ForeachInfo structure.
//
//----------------------------------------------------------------------

func sFreeForeachInfo(tls *libc.TLS, clientData ClientData) { /* tclCompCmds.c:2925:1: */
	var infoPtr uintptr = clientData
	var listPtr uintptr
	var numLists int32 = (*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists
	var i int32

	for i = 0; i < numLists; i++ {
		listPtr = *(*uintptr)(unsafe.Pointer(infoPtr + 16 + uintptr(i)*8))
		XTclpFree(tls, listPtr)
	}
	XTclpFree(tls, infoPtr)
}

//----------------------------------------------------------------------
//
// PrintForeachInfo, DisassembleForeachInfo --
//
//	Functions to write a human-readable or script-readablerepresentation
//	of a ForeachInfo structure to a Tcl_Obj for debugging.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPrintForeachInfo(tls *libc.TLS, clientData ClientData, appendObj uintptr, codePtr uintptr, pcOffset uint32) { /* tclCompCmds.c:2959:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var infoPtr uintptr = clientData
	var varsPtr uintptr
	var i int32
	var j int32

	XTcl_AppendToObj(tls, appendObj, ts+19172, -1)

	for i = 0; i < (*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists; i++ {
		if i != 0 {
			XTcl_AppendToObj(tls, appendObj, ts+19153, -1)
		}
		XTcl_AppendPrintfToObj(tls, appendObj, ts+19156,
			libc.VaList(bp, uint32((*ForeachInfo)(unsafe.Pointer(infoPtr)).FfirstValueTemp+i)))
	}
	XTcl_AppendPrintfToObj(tls, appendObj, ts+19179,
		libc.VaList(bp+8, uint32((*ForeachInfo)(unsafe.Pointer(infoPtr)).FloopCtTemp)))
	for i = 0; i < (*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists; i++ {
		if i != 0 {
			XTcl_AppendToObj(tls, appendObj, ts+19193, -1)
		}
		XTcl_AppendPrintfToObj(tls, appendObj, ts+19195,
			libc.VaList(bp+16, uint32((*ForeachInfo)(unsafe.Pointer(infoPtr)).FfirstValueTemp+i)))
		varsPtr = *(*uintptr)(unsafe.Pointer(infoPtr + 16 + uintptr(i)*8))
		for j = 0; j < (*ForeachVarList)(unsafe.Pointer(varsPtr)).FnumVars; j++ {
			if j != 0 {
				XTcl_AppendToObj(tls, appendObj, ts+19153, -1)
			}
			XTcl_AppendPrintfToObj(tls, appendObj, ts+19156,
				libc.VaList(bp+24, uint32(*(*int32)(unsafe.Pointer(varsPtr + 4 + uintptr(j)*4)))))
		}
		XTcl_AppendToObj(tls, appendObj, ts+19209, -1)
	}
}

func sPrintNewForeachInfo(tls *libc.TLS, clientData ClientData, appendObj uintptr, codePtr uintptr, pcOffset uint32) { /* tclCompCmds.c:2999:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var infoPtr uintptr = clientData
	var varsPtr uintptr
	var i int32
	var j int32

	XTcl_AppendPrintfToObj(tls, appendObj, ts+19211,
		libc.VaList(bp, (*ForeachInfo)(unsafe.Pointer(infoPtr)).FloopCtTemp))
	for i = 0; i < (*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists; i++ {
		if i != 0 {
			XTcl_AppendToObj(tls, appendObj, ts+19193, -1)
		}
		XTcl_AppendToObj(tls, appendObj, ts+19233, -1)
		varsPtr = *(*uintptr)(unsafe.Pointer(infoPtr + 16 + uintptr(i)*8))
		for j = 0; j < (*ForeachVarList)(unsafe.Pointer(varsPtr)).FnumVars; j++ {
			if j != 0 {
				XTcl_AppendToObj(tls, appendObj, ts+19193, -1)
			}
			XTcl_AppendPrintfToObj(tls, appendObj, ts+19156,
				libc.VaList(bp+8, uint32(*(*int32)(unsafe.Pointer(varsPtr + 4 + uintptr(j)*4)))))
		}
		XTcl_AppendToObj(tls, appendObj, ts+19209, -1)
	}
}

func sDisassembleForeachInfo(tls *libc.TLS, clientData ClientData, dictObj uintptr, codePtr uintptr, pcOffset uint32) { /* tclCompCmds.c:3029:1: */
	var infoPtr uintptr = clientData
	var varsPtr uintptr
	var i int32
	var j int32
	var objPtr uintptr
	var innerPtr uintptr

	// Data stores.

	objPtr = XTcl_NewObj(tls)
	for i = 0; i < (*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists; i++ {
		XTcl_ListObjAppendElement(tls, uintptr(0), objPtr,
			XTcl_NewIntObj(tls, (*ForeachInfo)(unsafe.Pointer(infoPtr)).FfirstValueTemp+i))
	}
	XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+10453, -1), objPtr)

	// Loop counter.

	XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+19235, -1),
		XTcl_NewIntObj(tls, (*ForeachInfo)(unsafe.Pointer(infoPtr)).FloopCtTemp))

	// Assignment targets.

	objPtr = XTcl_NewObj(tls)
	for i = 0; i < (*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists; i++ {
		innerPtr = XTcl_NewObj(tls)
		varsPtr = *(*uintptr)(unsafe.Pointer(infoPtr + 16 + uintptr(i)*8))
		for j = 0; j < (*ForeachVarList)(unsafe.Pointer(varsPtr)).FnumVars; j++ {
			XTcl_ListObjAppendElement(tls, uintptr(0), innerPtr,
				XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(varsPtr + 4 + uintptr(j)*4))))
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), objPtr, innerPtr)
	}
	XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+19240, -1), objPtr)
}

func sDisassembleNewForeachInfo(tls *libc.TLS, clientData ClientData, dictObj uintptr, codePtr uintptr, pcOffset uint32) { /* tclCompCmds.c:3076:1: */
	var infoPtr uintptr = clientData
	var varsPtr uintptr
	var i int32
	var j int32
	var objPtr uintptr
	var innerPtr uintptr

	// Jump offset.

	XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+19247, -1),
		XTcl_NewIntObj(tls, (*ForeachInfo)(unsafe.Pointer(infoPtr)).FloopCtTemp))

	// Assignment targets.

	objPtr = XTcl_NewObj(tls)
	for i = 0; i < (*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists; i++ {
		innerPtr = XTcl_NewObj(tls)
		varsPtr = *(*uintptr)(unsafe.Pointer(infoPtr + 16 + uintptr(i)*8))
		for j = 0; j < (*ForeachVarList)(unsafe.Pointer(varsPtr)).FnumVars; j++ {
			XTcl_ListObjAppendElement(tls, uintptr(0), innerPtr,
				XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(varsPtr + 4 + uintptr(j)*4))))
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), objPtr, innerPtr)
	}
	XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+19240, -1), objPtr)
}

//----------------------------------------------------------------------
//
// TclCompileFormatCmd --
//
//	Procedure called to compile the "format" command. Handles cases that
//	can be done as constants or simple string concatenation only.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "format" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileFormatCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:3131:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var tokenPtr uintptr
	var objv uintptr
	var formatObj uintptr
	var tmpObj uintptr
	var bytes uintptr
	var start uintptr
	var i int32
	var j int32
	// var len int32 at bp, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	var _delta2 int32
	var _delta3 int32
	var _objIndexCopy1 int32
	var _objPtr7 uintptr
	var _delta4 int32
	var _delta5 int32
	var _objIndexCopy2 int32
	var b uintptr
	var _delta6 int32
	var _delta7 int32
	var _objIndexCopy3 int32
	var _objPtr8 uintptr
	var _objPtr9 uintptr
	var _delta8 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr

	// Don't handle any guaranteed-error cases.

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// Check if the argument words are all compile-time-known literals; that's
	// a case we can handle by compiling to a constant.

	formatObj = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(formatObj)).FrefCount++
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, formatObj) != 0) {
		goto __2
	}
__3:
	_objPtr = formatObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __6
	}
	XTclFreeObj(tls, _objPtr)
__6:
	;
	goto __4
__4:
	if 0 != 0 {
		goto __3
	}
	goto __5
__5:
	;
	return TCL_ERROR
__2:
	;

	objv = XTcl_Alloc(tls, uint32(uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2)*uint64(unsafe.Sizeof(uintptr(0)))))
	i = 0
__7:
	if !(i+2 < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords) {
		goto __9
	}
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FrefCount++
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) != 0) {
		goto __10
	}
	goto checkForStringConcatCase
__10:
	;
	goto __8
__8:
	i++
	goto __7
	goto __9
__9:
	;

	// Everything is a literal, so the result is constant too (or an error if
	// the format is broken). Do the format now.

	tmpObj = XTcl_Format(tls, interp, XTcl_GetString(tls, formatObj),
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2, objv)
__11:
	if !(libc.PreDecInt32(&i, 1) >= 0) {
		goto __13
	}
__14:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __17
	}
	XTclFreeObj(tls, _objPtr1)
__17:
	;
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto __12
__12:
	;
	goto __11
	goto __13
__13:
	;
	XTclpFree(tls, objv)
__18:
	_objPtr2 = formatObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __21
	}
	XTclFreeObj(tls, _objPtr2)
__21:
	;
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
	if !(tmpObj == uintptr(0)) {
		goto __22
	}
	XTclCompileSyntaxError(tls, interp, envPtr)
	return TCL_OK
__22:
	;

	// Not an error, always a constant result, so just push the result as a
	// literal. Job done.

	bytes = XTcl_GetStringFromObj(tls, tmpObj, bp)
__23:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp)), 0)
	if !(_objIndexCopy <= 255) {
		goto __26
	}
__28:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __31
	}
	XTclExpandCodeArray(tls, envPtr)
__31:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __32
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__32:
	;
__33:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __36
	}
	if !(_delta == -0x7fffffff-1) {
		goto __37
	}
	_delta = 1 - _objIndexCopy
__37:
	;
__38:
	if !(_delta < 0) {
		goto __41
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __42
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__42:
	;
__41:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
__36:
	;
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	goto __27
__26:
__43:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __46
	}
	XTclExpandCodeArray(tls, envPtr)
__46:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __47
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__47:
	;
__48:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __51
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __52
	}
	_delta1 = 1 - _objIndexCopy
__52:
	;
__53:
	if !(_delta1 < 0) {
		goto __56
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __57
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__57:
	;
__56:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
__51:
	;
	goto __49
__49:
	if 0 != 0 {
		goto __48
	}
	goto __50
__50:
	;
	goto __44
__44:
	if 0 != 0 {
		goto __43
	}
	goto __45
__45:
	;
__27:
	;
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
__58:
	_objPtr3 = tmpObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __61
	}
	XTclFreeObj(tls, _objPtr3)
__61:
	;
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
	return TCL_OK

checkForStringConcatCase:
	// See if we can generate a sequence of things to concatenate. This
	// requires that all the % sequences be %s or %%, as everything else is
	// sufficiently complex that we don't bother.
	//
	// First, get the state of the system relatively sensible (cleaning up
	// after our attempt to spot a literal).

	;
__62:
	if !(i >= 0) {
		goto __64
	}
__65:
	_objPtr4 = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __68
	}
	XTclFreeObj(tls, _objPtr4)
__68:
	;
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
	goto __63
__63:
	i--
	goto __62
	goto __64
__64:
	;
	XTclpFree(tls, objv)
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	i = 0

	// Now scan through and check for non-%s and non-%% substitutions.

	bytes = XTcl_GetString(tls, formatObj)
__69:
	if !(*(*int8)(unsafe.Pointer(bytes)) != 0) {
		goto __71
	}
	if !(int32(*(*int8)(unsafe.Pointer(bytes))) == '%') {
		goto __72
	}
	bytes++
	if !(int32(*(*int8)(unsafe.Pointer(bytes))) == 's') {
		goto __73
	}
	i++
	goto __70
	goto __74
__73:
	if !(int32(*(*int8)(unsafe.Pointer(bytes))) == '%') {
		goto __75
	}
	goto __70
__75:
	;
__74:
	;
__76:
	_objPtr5 = formatObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __79
	}
	XTclFreeObj(tls, _objPtr5)
__79:
	;
	goto __77
__77:
	if 0 != 0 {
		goto __76
	}
	goto __78
__78:
	;
	return TCL_ERROR
__72:
	;
	goto __70
__70:
	bytes++
	goto __69
	goto __71
__71:
	;

	// Check if the number of things to concatenate will fit in a byte.

	if !(i+2 != (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords || i > 125) {
		goto __80
	}
__81:
	_objPtr6 = formatObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __84
	}
	XTclFreeObj(tls, _objPtr6)
__84:
	;
	goto __82
__82:
	if 0 != 0 {
		goto __81
	}
	goto __83
__83:
	;
	return TCL_ERROR
__80:
	;

	// Generate the pushes of the things to concatenate, a sequence of
	// literals and compiled tokens (of which at least one is non-literal or
	// we'd have the case in the first half of this function) which we will
	// concatenate.

	i = 0 // The count of things to concat.
	j = 2 // The index into the argument tokens, for
	// TIP#280 handling.
	start = XTcl_GetString(tls, formatObj)
	// The start of the currently-scanned literal
	// in the format string.
	tmpObj = XTcl_NewObj(tls) // The buffer used to accumulate the literal
	// being built.
	bytes = start
__85:
	if !(*(*int8)(unsafe.Pointer(bytes)) != 0) {
		goto __87
	}
	if !(int32(*(*int8)(unsafe.Pointer(bytes))) == '%') {
		goto __88
	}
	XTcl_AppendToObj(tls, tmpObj, start, int32((int64(bytes)-int64(start))/1))
	if !(int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&bytes, 1)))) == '%') {
		goto __89
	}
	XTcl_AppendToObj(tls, tmpObj, ts+6304, 1)
	goto __90
__89:
	b = XTcl_GetStringFromObj(tls, tmpObj, bp)

	// If there is a non-empty literal from the format string,
	// push it and reset.

	if !(*(*int32)(unsafe.Pointer(bp)) > 0) {
		goto __91
	}
__92:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, b, *(*int32)(unsafe.Pointer(bp)), 0)
	if !(_objIndexCopy1 <= 255) {
		goto __95
	}
__97:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __100
	}
	XTclExpandCodeArray(tls, envPtr)
__100:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __101
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__101:
	;
__102:
	_delta2 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta2 != 0) {
		goto __105
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __106
	}
	_delta2 = 1 - _objIndexCopy1
__106:
	;
__107:
	if !(_delta2 < 0) {
		goto __110
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __111
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__111:
	;
__110:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __108
__108:
	if 0 != 0 {
		goto __107
	}
	goto __109
__109:
	;
__105:
	;
	goto __103
__103:
	if 0 != 0 {
		goto __102
	}
	goto __104
__104:
	;
	goto __98
__98:
	if 0 != 0 {
		goto __97
	}
	goto __99
__99:
	;
	goto __96
__95:
__112:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __115
	}
	XTclExpandCodeArray(tls, envPtr)
__115:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __116
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__116:
	;
__117:
	_delta3 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta3 != 0) {
		goto __120
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __121
	}
	_delta3 = 1 - _objIndexCopy1
__121:
	;
__122:
	if !(_delta3 < 0) {
		goto __125
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __126
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__126:
	;
__125:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __123
__123:
	if 0 != 0 {
		goto __122
	}
	goto __124
__124:
	;
__120:
	;
	goto __118
__118:
	if 0 != 0 {
		goto __117
	}
	goto __119
__119:
	;
	goto __113
__113:
	if 0 != 0 {
		goto __112
	}
	goto __114
__114:
	;
__96:
	;
	goto __93
__93:
	if 0 != 0 {
		goto __92
	}
	goto __94
__94:
	;
__127:
	_objPtr7 = tmpObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __130
	}
	XTclFreeObj(tls, _objPtr7)
__130:
	;
	goto __128
__128:
	if 0 != 0 {
		goto __127
	}
	goto __129
__129:
	;
	tmpObj = XTcl_NewObj(tls)
	i++
__91:
	;

	// Push the code to produce the string that would be
	// substituted with %s, except we'll be concatenating
	// directly.

	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __131
	}
__133:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy2 <= 255) {
		goto __136
	}
__138:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __141
	}
	XTclExpandCodeArray(tls, envPtr)
__141:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __142
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__142:
	;
__143:
	_delta4 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta4 != 0) {
		goto __146
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __147
	}
	_delta4 = 1 - _objIndexCopy2
__147:
	;
__148:
	if !(_delta4 < 0) {
		goto __151
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __152
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__152:
	;
__151:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __149
__149:
	if 0 != 0 {
		goto __148
	}
	goto __150
__150:
	;
__146:
	;
	goto __144
__144:
	if 0 != 0 {
		goto __143
	}
	goto __145
__145:
	;
	goto __139
__139:
	if 0 != 0 {
		goto __138
	}
	goto __140
__140:
	;
	goto __137
__136:
__153:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __156
	}
	XTclExpandCodeArray(tls, envPtr)
__156:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __157
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__157:
	;
__158:
	_delta5 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta5 != 0) {
		goto __161
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __162
	}
	_delta5 = 1 - _objIndexCopy2
__162:
	;
__163:
	if !(_delta5 < 0) {
		goto __166
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __167
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__167:
	;
__166:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __164
__164:
	if 0 != 0 {
		goto __163
	}
	goto __165
__165:
	;
__161:
	;
	goto __159
__159:
	if 0 != 0 {
		goto __158
	}
	goto __160
__160:
	;
	goto __154
__154:
	if 0 != 0 {
		goto __153
	}
	goto __155
__155:
	;
__137:
	;
	goto __134
__134:
	if 0 != 0 {
		goto __133
	}
	goto __135
__135:
	;
	goto __132
__131:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(j)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(j)*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__132:
	;

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	j++
	i++
__90:
	;
	start = bytes + uintptr(1)
__88:
	;
	goto __86
__86:
	bytes++
	goto __85
	goto __87
__87:
	;

	// Handle the case of a trailing literal.

	XTcl_AppendToObj(tls, tmpObj, start, int32((int64(bytes)-int64(start))/1))
	bytes = XTcl_GetStringFromObj(tls, tmpObj, bp)
	if !(*(*int32)(unsafe.Pointer(bp)) > 0) {
		goto __168
	}
__169:
	_objIndexCopy3 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp)), 0)
	if !(_objIndexCopy3 <= 255) {
		goto __172
	}
__174:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __177
	}
	XTclExpandCodeArray(tls, envPtr)
__177:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __178
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__178:
	;
__179:
	_delta6 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta6 != 0) {
		goto __182
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __183
	}
	_delta6 = 1 - _objIndexCopy3
__183:
	;
__184:
	if !(_delta6 < 0) {
		goto __187
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __188
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__188:
	;
__187:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __185
__185:
	if 0 != 0 {
		goto __184
	}
	goto __186
__186:
	;
__182:
	;
	goto __180
__180:
	if 0 != 0 {
		goto __179
	}
	goto __181
__181:
	;
	goto __175
__175:
	if 0 != 0 {
		goto __174
	}
	goto __176
__176:
	;
	goto __173
__172:
__189:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __192
	}
	XTclExpandCodeArray(tls, envPtr)
__192:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __193
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__193:
	;
__194:
	_delta7 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta7 != 0) {
		goto __197
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __198
	}
	_delta7 = 1 - _objIndexCopy3
__198:
	;
__199:
	if !(_delta7 < 0) {
		goto __202
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __203
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__203:
	;
__202:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __200
__200:
	if 0 != 0 {
		goto __199
	}
	goto __201
__201:
	;
__197:
	;
	goto __195
__195:
	if 0 != 0 {
		goto __194
	}
	goto __196
__196:
	;
	goto __190
__190:
	if 0 != 0 {
		goto __189
	}
	goto __191
__191:
	;
__173:
	;
	goto __170
__170:
	if 0 != 0 {
		goto __169
	}
	goto __171
__171:
	;
	i++
__168:
	;
__204:
	_objPtr8 = tmpObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr8)).FrefCount, 1) <= 1) {
		goto __207
	}
	XTclFreeObj(tls, _objPtr8)
__207:
	;
	goto __205
__205:
	if 0 != 0 {
		goto __204
	}
	goto __206
__206:
	;
__208:
	_objPtr9 = formatObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr9)).FrefCount, 1) <= 1) {
		goto __211
	}
	XTclFreeObj(tls, _objPtr9)
__211:
	;
	goto __209
__209:
	if 0 != 0 {
		goto __208
	}
	goto __210
__210:
	;

	if !(i > 1) {
		goto __212
	}
	// Do the concatenation, which produces the result.

__213:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __216
	}
	XTclExpandCodeArray(tls, envPtr)
__216:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __217
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_CONCAT1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__217:
	;
__218:
	_delta8 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
	if !(_delta8 != 0) {
		goto __221
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __222
	}
	_delta8 = 1 - i
__222:
	;
__223:
	if !(_delta8 < 0) {
		goto __226
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __227
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__227:
	;
__226:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __224
__224:
	if 0 != 0 {
		goto __223
	}
	goto __225
__225:
	;
__221:
	;
	goto __219
__219:
	if 0 != 0 {
		goto __218
	}
	goto __220
__220:
	;
	goto __214
__214:
	if 0 != 0 {
		goto __213
	}
	goto __215
__215:
	;
__212:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclLocalScalarFromToken --
//
//	Get the index into the table of compiled locals that corresponds
//	to a local scalar variable name.
//
// Results:
// 	Returns the non-negative integer index value into the table of
// 	compiled locals corresponding to a local scalar variable name.
// 	If the arguments passed in do not identify a local scalar variable
// 	then return -1.
//
// Side effects:
//	May add an entery into the table of compiled locals.
//
//----------------------------------------------------------------------

func XTclLocalScalarFromToken(tls *libc.TLS, tokenPtr uintptr, envPtr uintptr) int32 { /* tclCompCmds.c:3342:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var isScalar int32 at bp+4, 4

	// var index int32 at bp, 4

	XTclPushVarName(tls, uintptr(0), tokenPtr, envPtr, TCL_NO_ELEMENT, bp, bp+4)
	if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) {
		*(*int32)(unsafe.Pointer(bp /* index */)) = -1
	}
	return *(*int32)(unsafe.Pointer(bp /* index */))
}

func XTclLocalScalar(tls *libc.TLS, bytes uintptr, numBytes int32, envPtr uintptr) int32 { /* tclCompCmds.c:3356:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	*(*[2]Tcl_Token)(unsafe.Pointer(bp /* token */)) = [2]Tcl_Token{{Ftype: TCL_TOKEN_SIMPLE_WORD, FnumComponents: 1},
		{Ftype: TCL_TOKEN_TEXT}}

	(*Tcl_Token)(unsafe.Pointer(bp + 1*24)).Fstart = bytes
	(*Tcl_Token)(unsafe.Pointer(bp + 1*24)).Fsize = numBytes
	return XTclLocalScalarFromToken(tls, bp, envPtr)
}

//----------------------------------------------------------------------
//
// TclPushVarName --
//
//	Procedure used in the compiling where pushing a variable name is
//	necessary (append, lappend, set).
//
// Results:
//	The values written to *localIndexPtr and *isScalarPtr signal to
//	the caller what the instructions emitted by this routine will do:
//
//	*isScalarPtr	(*localIndexPtr < 0)
//	1		1	Push the varname on the stack. (Stack +1)
//	1		0	*localIndexPtr is the index of the compiled
//				local for this varname.  No instructions
//				emitted.	(Stack +0)
//	0		1	Push part1 and part2 names of array element
//				on the stack.	(Stack +2)
//	0		0	*localIndexPtr is the index of the compiled
//				local for this array.  Element name is pushed
//				on the stack.	(Stack +1)
//
// Side effects:
//	Instructions are added to envPtr.
//
//----------------------------------------------------------------------

func XTclPushVarName(tls *libc.TLS, interp uintptr, varTokenPtr uintptr, envPtr uintptr, flags int32, localIndexPtr uintptr, isScalarPtr uintptr) { /* tclCompCmds.c:3399:1: */
	var p uintptr
	var last uintptr
	var name uintptr
	var elName uintptr
	var n int32
	var elemTokenPtr uintptr = uintptr(0)
	var nameLen int32
	var elNameLen int32
	var simpleVarName int32
	var localIndex int32
	var elemTokenCount int32 = 0
	var allocedTokens int32 = 0
	var removedParen int32 = 0

	// Decide if we can use a frame slot for the var/array name or if we need
	// to emit code to compute and push the name at runtime. We use a frame
	// slot (entry in the array of local vars) if we are compiling a procedure
	// body and if the name is simple text that does not include namespace
	// qualifiers.

	simpleVarName = 0
	name = libc.AssignUintptr(&elName, uintptr(0))
	nameLen = libc.AssignInt32(&elNameLen, 0)
	localIndex = -1

	if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		// A simple variable name. Divide it up into "name" and "elName"
		// strings. If it is not a local variable, look it up at runtime.

		simpleVarName = 1

		name = (*Tcl_Token)(unsafe.Pointer(varTokenPtr + 1*24)).Fstart
		nameLen = (*Tcl_Token)(unsafe.Pointer(varTokenPtr + 1*24)).Fsize
		if int32(*(*int8)(unsafe.Pointer(name + uintptr(nameLen-1)))) == ')' {
			// last char is ')' => potential array reference.
			last = name + uintptr(nameLen-1)

			if int32(*(*int8)(unsafe.Pointer(last))) == ')' {
				for p = name; p < last; p++ {
					if int32(*(*int8)(unsafe.Pointer(p))) == '(' {
						elName = p + uintptr(1)
						elNameLen = int32((int64(last) - int64(elName)) / 1)
						nameLen = int32((int64(p) - int64(name)) / 1)
						break
					}
				}
			}

			if !(flags&TCL_NO_ELEMENT != 0) && elNameLen != 0 {
				// An array element, the element name is a simple string:
				// assemble the corresponding token.

				elemTokenPtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_Token{})))
				allocedTokens = 1
				(*Tcl_Token)(unsafe.Pointer(elemTokenPtr)).Ftype = TCL_TOKEN_TEXT
				(*Tcl_Token)(unsafe.Pointer(elemTokenPtr)).Fstart = elName
				(*Tcl_Token)(unsafe.Pointer(elemTokenPtr)).Fsize = elNameLen
				(*Tcl_Token)(unsafe.Pointer(elemTokenPtr)).FnumComponents = 0
				elemTokenCount = 1
			}
		}
	} else if interp != 0 && libc.AssignInt32(&n, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents) > 1 &&
		(*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Ftype == TCL_TOKEN_TEXT &&
		(*Tcl_Token)(unsafe.Pointer(varTokenPtr+uintptr(n)*24)).Ftype == TCL_TOKEN_TEXT &&
		int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(varTokenPtr+uintptr(n)*24)).Fstart + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr+uintptr(n)*24)).Fsize) - uintptr(1)))) == ')' {
		// Check for parentheses inside first token.

		simpleVarName = 0
		p = (*Tcl_Token)(unsafe.Pointer(varTokenPtr + 1*24)).Fstart
		last = p + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize)
		for ; p < last; p++ {
			if int32(*(*int8)(unsafe.Pointer(p))) == '(' {
				simpleVarName = 1
				break
			}
		}
		if simpleVarName != 0 {
			var remainingLen int32

			// Check the last token: if it is just ')', do not count it.
			// Otherwise, remove the ')' and flag so that it is restored at
			// the end.

			if (*Tcl_Token)(unsafe.Pointer(varTokenPtr+uintptr(n)*24)).Fsize == 1 {
				n--
			} else {
				(*Tcl_Token)(unsafe.Pointer(varTokenPtr+uintptr(n)*24)).Fsize--
				removedParen = n
			}

			name = (*Tcl_Token)(unsafe.Pointer(varTokenPtr + 1*24)).Fstart
			nameLen = int32((int64(p) - int64((*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart)) / 1)
			elName = p + uintptr(1)
			remainingLen = int32((int64((*Tcl_Token)(unsafe.Pointer(varTokenPtr+2*24)).Fstart)-int64(p))/1 - int64(1))
			elNameLen = int32((int64((*Tcl_Token)(unsafe.Pointer(varTokenPtr+uintptr(n)*24)).Fstart)-int64(p))/1 + int64((*Tcl_Token)(unsafe.Pointer(varTokenPtr+uintptr(n)*24)).Fsize) - int64(1))

			if !(flags&TCL_NO_ELEMENT != 0) {
				if remainingLen != 0 {
					// Make a first token with the extra characters in the first
					// token.

					elemTokenPtr = XTclStackAlloc(tls, interp, int32(uint64(n)*uint64(unsafe.Sizeof(Tcl_Token{}))))
					allocedTokens = 1
					(*Tcl_Token)(unsafe.Pointer(elemTokenPtr)).Ftype = TCL_TOKEN_TEXT
					(*Tcl_Token)(unsafe.Pointer(elemTokenPtr)).Fstart = elName
					(*Tcl_Token)(unsafe.Pointer(elemTokenPtr)).Fsize = remainingLen
					(*Tcl_Token)(unsafe.Pointer(elemTokenPtr)).FnumComponents = 0
					elemTokenCount = n

					// Copy the remaining tokens.

					libc.Xmemcpy(tls, elemTokenPtr+uintptr(1)*24, varTokenPtr+uintptr(2)*24,
						uint64(n-1)*uint64(unsafe.Sizeof(Tcl_Token{})))
				} else {
					// Use the already available tokens.

					elemTokenPtr = varTokenPtr + 2*24
					elemTokenCount = n - 1
				}
			}
		}
	}

	if simpleVarName != 0 {
		// See whether name has any namespace separators (::'s).

		var hasNsQualifiers int32 = 0

		p = name
		last = p + uintptr(nameLen) - uintptr(1)
		for ; p < last; p++ {
			if int32(*(*int8)(unsafe.Pointer(p))) == ':' && int32(*(*int8)(unsafe.Pointer(p + uintptr(1)))) == ':' {
				hasNsQualifiers = 1
				break
			}
		}

		// Look up the var name's index in the array of local vars in the proc
		// frame. If retrieving the var's value and it doesn't already exist,
		// push its name and look it up at runtime.

		if !(hasNsQualifiers != 0) {
			localIndex = XTclFindCompiledLocal(tls, name, nameLen, 1, envPtr)
			if flags&TCL_NO_LARGE_INDEX != 0 && localIndex > 255 {
				// We'll push the name.

				localIndex = -1
			}
		}
		if interp != 0 && localIndex < 0 {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, name, nameLen, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		}

		// Compile the element script, if any, and only if not inhibited. [Bug
		// 3600328]

		if elName != uintptr(0) && !(flags&TCL_NO_ELEMENT != 0) {
			if elNameLen != 0 {
				XTclCompileTokens(tls, interp, elemTokenPtr, elemTokenCount,
					envPtr)
			} else {
				for ok7 := true; ok7; ok7 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
					if _objIndexCopy <= 255 {
						for ok8 := true; ok8; ok8 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok9 := true; ok9; ok9 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok10 := true; ok10; ok10 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok11 := true; ok11; ok11 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok12 := true; ok12; ok12 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok13 := true; ok13; ok13 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
			}
		}
	} else if interp != 0 {
		// The var name isn't simple: compile and push it.

		XTclCompileTokens(tls, interp, varTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents, envPtr)

	}

	if removedParen != 0 {
		(*Tcl_Token)(unsafe.Pointer(varTokenPtr+uintptr(removedParen)*24)).Fsize++
	}
	if allocedTokens != 0 {
		XTclStackFree(tls, interp, elemTokenPtr)
	}
	*(*int32)(unsafe.Pointer(localIndexPtr)) = localIndex
	*(*int32)(unsafe.Pointer(isScalarPtr)) = libc.Bool32(elName == uintptr(0))
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------------
//
// TclGetIndexFromToken --
//
//	Parse a token to determine if an index value is known at
//	compile time.
//
// Returns:
//	TCL_OK if parsing succeeded, and TCL_ERROR if it failed.
//
// Side effects:
//	When TCL_OK is returned, the encoded index value is written
//	to *index.
//
//----------------------------------------------------------------------

func XTclGetIndexFromToken(tls *libc.TLS, tokenPtr uintptr, before int32, after int32, indexPtr uintptr) int32 { /* tclCompCmdsGR.c:51:1: */
	var tmpObj uintptr = XTcl_NewObj(tls)
	var result int32 = TCL_ERROR

	if XTclWordKnownAtCompileTime(tls, tokenPtr, tmpObj) != 0 {
		result = XTclIndexEncode(tls, uintptr(0), tmpObj, before, after, indexPtr)
	}
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = tmpObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// TclCompileGlobalCmd --
//
//	Procedure called to compile the "global" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "global" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileGlobalCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:86:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varTokenPtr uintptr
	var localIndex int32
	var numWords int32
	var i int32

	// TODO: Consider support for compiling expanded args.
	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	if numWords < 2 {
		return TCL_ERROR
	}

	// 'global' has no effect outside of proc bodies; handle that at runtime

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Push the namespace

	for ok := true; ok; ok = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok3 := true; ok3; ok3 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok6 := true; ok6; ok6 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}

	// Loop over the variables.

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	i = 1
__1:
	if !(i < numWords) {
		goto __3
	}
	{
		localIndex = sIndexTailVarIfKnown(tls, interp, varTokenPtr, envPtr)

		if localIndex < 0 {
			return TCL_ERROR
		}

		// TODO: Consider what value can pass through the
		// IndexTailVarIfKnown() screen.  Full CompileWord()
		// likely does not apply here.  Push known value instead.
		if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, varTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents, envPtr)
		}

		for ok14 := true; ok14; ok14 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NSUPVAR)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_NSUPVAR == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok15 := true; ok15; ok15 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_NSUPVAR].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - localIndex
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}

	}
	goto __2
__2:
	varTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	i++
	goto __1
	goto __3
__3:
	;

	// Pop the namespace, and set the result to empty

	for ok17 := true; ok17; ok17 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok18 := true; ok18; ok18 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok19 := true; ok19; ok19 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok20 := true; ok20; ok20 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok21 := true; ok21; ok21 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok22 := true; ok22; ok22 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok23 := true; ok23; ok23 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok24 := true; ok24; ok24 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok25 := true; ok25; ok25 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok26 := true; ok26; ok26 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileIfCmd --
//
//	Procedure called to compile the "if" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "if" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileIfCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:165:1: */
	bp := tls.Alloc(380)
	defer tls.Free(380)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	// var jumpFalseFixupArray JumpFixupArray at bp+8, 184

	// Used to fix the ifFalse jump after each
	// test when its target PC is determined.
	// var jumpEndFixupArray JumpFixupArray at bp+192, 184

	// Used to fix the jump after each "then" body
	// to the end of the "if" when that PC is
	// determined.
	var tokenPtr uintptr
	var testTokenPtr uintptr
	var jumpIndex int32 // Avoid compiler warning.
	var jumpFalseDist int32
	var numWords int32
	var wordIdx int32
	var numBytes int32
	var j int32
	var code int32
	var word uintptr
	var realCond int32 // Set to 0 for static conditions:
	// "if 0 {..}"
	// var boolVal int32 at bp+376, 4
	// Value of static condition.
	var compileScripts int32
	// Find out if the condition is a constant.

	var boolObj uintptr
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	// Adjust the immediately preceeding "ifFalse" jump. We moved it's
	// target (just after this jump) down three bytes.

	var ifFalsePc uintptr
	var opCode uint8
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	jumpIndex = 0
	realCond = 1
	compileScripts = 1

	// Only compile the "if" command if all arguments are simple words, in
	// order to insure correct substitution [Bug 219166]

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	wordIdx = 0
	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords

	wordIdx = 0
__1:
	if !(wordIdx < numWords) {
		goto __3
	}
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __4
	}
	return TCL_ERROR
__4:
	;
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __2
__2:
	wordIdx++
	goto __1
	goto __3
__3:
	;

	XTclInitJumpFixupArray(tls, bp+8)
	XTclInitJumpFixupArray(tls, bp+192)
	code = TCL_OK

	// Each iteration of this loop compiles one "if expr ?then? body" or
	// "elseif expr ?then? body" clause.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	wordIdx = 0
__5:
	if !(wordIdx < numWords) {
		goto __6
	}
	// Stop looping if the token isn't "if" or "elseif".

	word = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart
	numBytes = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fsize
	if !(tokenPtr == (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr ||
		numBytes == 6 && libc.Xstrncmp(tls, word, ts+13954, uint64(6)) == 0) {
		goto __7
	}
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	wordIdx++
	goto __8
__7:
	goto __6
__8:
	;
	if !(wordIdx >= numWords) {
		goto __9
	}
	code = TCL_ERROR
	goto done
__9:
	;

	// Compile the test expression then emit the conditional jump around
	// the "then" part.

	testTokenPtr = tokenPtr

	if !(realCond != 0) {
		goto __10
	}
	// Find out if the condition is a constant.

	boolObj = XTcl_NewStringObj(tls, (*Tcl_Token)(unsafe.Pointer(testTokenPtr+1*24)).Fstart,
		(*Tcl_Token)(unsafe.Pointer(testTokenPtr+1*24)).Fsize)

	(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount++
	code = XTcl_GetBooleanFromObj(tls, uintptr(0), boolObj, bp+376)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount, 1) > 1) {
		goto __11
	}
	goto __12
__11:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __13
	}

	if !((*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != XtclEmptyStringRep) {
		goto __15
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes)
__15:
	;
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = -1
__16:
	;
	*(*uintptr)(unsafe.Pointer(boolObj + 32)) = XtclFreeObjList
	XtclFreeObjList = boolObj
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	goto __14
__13:
	XTclFreeObj(tls, boolObj)
__14:
	;
__12:
	;

	if !(code == TCL_OK) {
		goto __19
	}
	// A static condition.

	realCond = 0
	if !!(*(*int32)(unsafe.Pointer(bp + 376)) != 0) {
		goto __21
	}
	compileScripts = 0
__21:
	;
	goto __20
__19:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(wordIdx)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(wordIdx)*8))
	XTcl_ResetResult(tls, interp)
	XTclCompileExprWords(tls, interp, testTokenPtr, 1, envPtr)
	if !((*JumpFixupArray)(unsafe.Pointer(bp+8)).Fnext >= (*JumpFixupArray)(unsafe.Pointer(bp+8)).Fend) {
		goto __22
	}
	XTclExpandJumpFixupArray(tls, bp+8)
__22:
	;
	jumpIndex = (*JumpFixupArray)(unsafe.Pointer(bp + 8 /* &jumpFalseFixupArray */)).Fnext
	(*JumpFixupArray)(unsafe.Pointer(bp+8 /* &jumpFalseFixupArray */)).Fnext++
	XTclEmitForwardJump(tls, envPtr, TCL_FALSE_JUMP,
		(*JumpFixupArray)(unsafe.Pointer(bp+8)).Ffixup+uintptr(jumpIndex)*16)
__20:
	;
	code = TCL_OK
__10:
	;

	// Skip over the optional "then" before the then clause.

	tokenPtr = testTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(testTokenPtr)).FnumComponents+1)*24
	wordIdx++
	if !(wordIdx >= numWords) {
		goto __23
	}
	code = TCL_ERROR
	goto done
__23:
	;
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __24
	}
	word = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart
	numBytes = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fsize
	if !(numBytes == 4 && libc.Xstrncmp(tls, word, ts+13949, uint64(4)) == 0) {
		goto __25
	}
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	wordIdx++
	if !(wordIdx >= numWords) {
		goto __26
	}
	code = TCL_ERROR
	goto done
__26:
	;
__25:
	;
__24:
	;

	// Compile the "then" command body.

	if !(compileScripts != 0) {
		goto __27
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(wordIdx)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(wordIdx)*8))
	XTclCompileCmdWord(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__27:
	;

	if !(realCond != 0) {
		goto __28
	}
	// Jump to the end of the "if" command. Both jumpFalseFixupArray
	// and jumpEndFixupArray are indexed by "jumpIndex".

	if !((*JumpFixupArray)(unsafe.Pointer(bp+192)).Fnext >= (*JumpFixupArray)(unsafe.Pointer(bp+192)).Fend) {
		goto __30
	}
	XTclExpandJumpFixupArray(tls, bp+192)
__30:
	;
	(*JumpFixupArray)(unsafe.Pointer(bp+192 /* &jumpEndFixupArray */)).Fnext++
	XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP,
		(*JumpFixupArray)(unsafe.Pointer(bp+192)).Ffixup+uintptr(jumpIndex)*16)

	// Fix the target of the jumpFalse after the test. Generate a 4
	// byte jump if the distance is > 120 bytes. This is conservative,
	// and ensures that we won't have to replace this jump if we later
	// also need to replace the proceeding jump to the end of the "if"
	// with a 4 byte jump.

__31:
	if !(-1 < 0) {
		goto __34
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __35
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__35:
	;
__34:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
	if !(XTclFixupForwardJump(tls, envPtr, (*JumpFixupArray)(unsafe.Pointer(bp+8)).Ffixup+uintptr(jumpIndex)*16, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer((*JumpFixupArray)(unsafe.Pointer(bp+8)).Ffixup+uintptr(jumpIndex)*16)).FcodeOffset)), 120) != 0) {
		goto __36
	}
	// Adjust the code offset for the proceeding jump to the end
	// of the "if" command.

	*(*uint32)(unsafe.Pointer((*JumpFixupArray)(unsafe.Pointer(bp+192)).Ffixup + uintptr(jumpIndex)*16 + 4)) += uint32(3)
__36:
	;
	goto __29
__28:
	if !(*(*int32)(unsafe.Pointer(bp + 376)) != 0) {
		goto __37
	}
	// We were processing an "if 1 {...}"; stop compiling scripts.

	compileScripts = 0
	goto __38
__37:
	// We were processing an "if 0 {...}"; reset so that the rest
	// (elseif, else) is compiled correctly.

	realCond = 1
	compileScripts = 1
__38:
	;
__29:
	;

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	wordIdx++
	goto __5
__6:
	;

	// Check for the optional else clause. Do not compile anything if this was
	// an "if 1 {...}" case.

	if !(wordIdx < numWords && (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __39
	}
	// There is an else clause. Skip over the optional "else" word.

	word = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart
	numBytes = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fsize
	if !(numBytes == 4 && libc.Xstrncmp(tls, word, ts+13961, uint64(4)) == 0) {
		goto __41
	}
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	wordIdx++
	if !(wordIdx >= numWords) {
		goto __42
	}
	code = TCL_ERROR
	goto done
__42:
	;
__41:
	;

	if !(compileScripts != 0) {
		goto __43
	}
	// Compile the else command body.

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(wordIdx)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(wordIdx)*8))
	XTclCompileCmdWord(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__43:
	;

	// Make sure there are no words after the else clause.

	wordIdx++
	if !(wordIdx < numWords) {
		goto __44
	}
	code = TCL_ERROR
	goto done
__44:
	;
	goto __40
__39:
	// No else clause: the "if" command's result is an empty string.

	if !(compileScripts != 0) {
		goto __45
	}
__46:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy <= 255) {
		goto __49
	}
__51:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __54
	}
	XTclExpandCodeArray(tls, envPtr)
__54:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __55
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__55:
	;
__56:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __59
	}
	if !(_delta == -0x7fffffff-1) {
		goto __60
	}
	_delta = 1 - _objIndexCopy
__60:
	;
__61:
	if !(_delta < 0) {
		goto __64
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __65
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__65:
	;
__64:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __62
__62:
	if 0 != 0 {
		goto __61
	}
	goto __63
__63:
	;
__59:
	;
	goto __57
__57:
	if 0 != 0 {
		goto __56
	}
	goto __58
__58:
	;
	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
	goto __50
__49:
__66:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __69
	}
	XTclExpandCodeArray(tls, envPtr)
__69:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __70
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__70:
	;
__71:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __74
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __75
	}
	_delta1 = 1 - _objIndexCopy
__75:
	;
__76:
	if !(_delta1 < 0) {
		goto __79
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __80
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__80:
	;
__79:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __77
__77:
	if 0 != 0 {
		goto __76
	}
	goto __78
__78:
	;
__74:
	;
	goto __72
__72:
	if 0 != 0 {
		goto __71
	}
	goto __73
__73:
	;
	goto __67
__67:
	if 0 != 0 {
		goto __66
	}
	goto __68
__68:
	;
__50:
	;
	goto __47
__47:
	if 0 != 0 {
		goto __46
	}
	goto __48
__48:
	;
__45:
	;
__40:
	;

	// Fix the unconditional jumps to the end of the "if" command.

	j = (*JumpFixupArray)(unsafe.Pointer(bp + 192 /* &jumpEndFixupArray */)).Fnext
__81:
	if !(j > 0) {
		goto __83
	}
	jumpIndex = j - 1 // i.e. process the closest jump first.
	if !(XTclFixupForwardJump(tls, envPtr, (*JumpFixupArray)(unsafe.Pointer(bp+192)).Ffixup+uintptr(jumpIndex)*16, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer((*JumpFixupArray)(unsafe.Pointer(bp+192)).Ffixup+uintptr(jumpIndex)*16)).FcodeOffset)), 127) != 0) {
		goto __84
	}
	// Adjust the immediately preceeding "ifFalse" jump. We moved it's
	// target (just after this jump) down three bytes.

	ifFalsePc = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart +
		uintptr((*JumpFixup)(unsafe.Pointer((*JumpFixupArray)(unsafe.Pointer(bp+8)).Ffixup+uintptr(jumpIndex)*16)).FcodeOffset)
	opCode = *(*uint8)(unsafe.Pointer(ifFalsePc))

	if !(int32(opCode) == INST_JUMP_FALSE1) {
		goto __85
	}
	jumpFalseDist = int32(*(*int8)(unsafe.Pointer(ifFalsePc + uintptr(1))))
	jumpFalseDist = jumpFalseDist + 3
	*(*uint8)(unsafe.Pointer(ifFalsePc + uintptr(1))) = uint8(uint32(jumpFalseDist))
	goto __86
__85:
	if !(int32(opCode) == INST_JUMP_FALSE4) {
		goto __87
	}
	jumpFalseDist = int32(uint32(*(*uint8)(unsafe.Pointer(ifFalsePc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(ifFalsePc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(ifFalsePc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(ifFalsePc + uintptr(1) + uintptr(3))))
	jumpFalseDist = jumpFalseDist + 3
__89:
	*(*uint8)(unsafe.Pointer(ifFalsePc + uintptr(1))) = uint8(uint32(jumpFalseDist) >> 24)
	*(*uint8)(unsafe.Pointer(ifFalsePc + uintptr(1) + uintptr(1))) = uint8(uint32(jumpFalseDist) >> 16)
	*(*uint8)(unsafe.Pointer(ifFalsePc + uintptr(1) + uintptr(2))) = uint8(uint32(jumpFalseDist) >> 8)
	*(*uint8)(unsafe.Pointer(ifFalsePc + uintptr(1) + uintptr(3))) = uint8(uint32(jumpFalseDist))
	goto __90
__90:
	if 0 != 0 {
		goto __89
	}
	goto __91
__91:
	;
	goto __88
__87:
	XTcl_Panic(tls, ts+19258, libc.VaList(bp, int32(opCode)))
__88:
	;
__86:
	;
__84:
	;
	goto __82
__82:
	j--
	goto __81
	goto __83
__83:
	;

	// Free the jumpFixupArray array if malloc'ed storage was used.

done:
	XTclFreeJumpFixupArray(tls, bp+8)
	XTclFreeJumpFixupArray(tls, bp+192)
	return code
}

//----------------------------------------------------------------------
//
// TclCompileIncrCmd --
//
//	Procedure called to compile the "incr" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "incr" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileIncrCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:468:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varTokenPtr uintptr
	var incrTokenPtr uintptr
	// var isScalar int32 at bp+4, 4

	// var localIndex int32 at bp, 4

	var haveImmValue int32
	// var immValue int32 at bp+8, 4

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 && (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, varTokenPtr, envPtr, TCL_NO_LARGE_INDEX, bp, bp+4)

	// If an increment is given, push it, but see first if it's a small
	// integer.

	haveImmValue = 0
	*(*int32)(unsafe.Pointer(bp + 8 /* immValue */)) = 1
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 3 {
		incrTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(incrTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			var word uintptr = (*Tcl_Token)(unsafe.Pointer(incrTokenPtr + 1*24)).Fstart
			var numBytes int32 = (*Tcl_Token)(unsafe.Pointer(incrTokenPtr + 1*24)).Fsize
			var code int32
			var intObj uintptr = XTcl_NewStringObj(tls, word, numBytes)

			(*Tcl_Obj)(unsafe.Pointer(intObj)).FrefCount++
			code = func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(intObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
					return func() int32 {
						*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(intObj + 32)))
						return TCL_OK
					}()
				}
				return XTcl_GetIntFromObj(tls, uintptr(0), intObj, bp+8)
			}()
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(intObj)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(intObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(intObj)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(intObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(intObj)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(intObj)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(intObj)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(intObj + 32)) = XtclFreeObjList
						XtclFreeObjList = intObj
					}
				} else {
					XTclFreeObj(tls, intObj)
				}
			}

			if code == TCL_OK && -127 <= *(*int32)(unsafe.Pointer(bp + 8)) && *(*int32)(unsafe.Pointer(bp + 8)) <= 127 {
				haveImmValue = 1
			}
			if !(haveImmValue != 0) {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, word, numBytes, 0)
					if _objIndexCopy <= 255 {
						for ok2 := true; ok2; ok2 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok4 := true; ok4; ok4 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok5 := true; ok5; ok5 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok7 := true; ok7; ok7 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, incrTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(incrTokenPtr)).FnumComponents, envPtr)

		}
	} else { // No incr amount given so use 1.
		haveImmValue = 1
	}

	// Emit the instruction to increment the variable.

	if *(*int32)(unsafe.Pointer(bp + 4)) != 0 { // Simple scalar variable.
		if *(*int32)(unsafe.Pointer(bp)) >= 0 {
			if haveImmValue != 0 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INCR_SCALAR1_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_INCR_SCALAR1_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_INCR_SCALAR1_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 8))))
				}
			} else {
				for ok12 := true; ok12; ok12 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INCR_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_INCR_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok13 := true; ok13; ok13 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_INCR_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok14 := true; ok14; ok14 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		} else {
			if haveImmValue != 0 {
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INCR_STK_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 8))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_INCR_STK_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_INCR_STK_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp + 8))
							}
							for ok17 := true; ok17; ok17 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INCR_STK)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_INCR_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_INCR_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok20 := true; ok20; ok20 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else { // Simple array variable.
		if *(*int32)(unsafe.Pointer(bp)) >= 0 {
			if haveImmValue != 0 {
				for ok21 := true; ok21; ok21 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INCR_ARRAY1_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_INCR_ARRAY1_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok22 := true; ok22; ok22 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_INCR_ARRAY1_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok23 := true; ok23; ok23 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok24 := true; ok24; ok24 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 8))))
				}
			} else {
				for ok25 := true; ok25; ok25 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INCR_ARRAY1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_INCR_ARRAY1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok26 := true; ok26; ok26 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_INCR_ARRAY1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok27 := true; ok27; ok27 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		} else {
			if haveImmValue != 0 {
				for ok28 := true; ok28; ok28 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INCR_ARRAY_STK_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 8))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_INCR_ARRAY_STK_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok29 := true; ok29; ok29 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_INCR_ARRAY_STK_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp + 8))
							}
							for ok30 := true; ok30; ok30 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok31 := true; ok31; ok31 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INCR_ARRAY_STK)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_INCR_ARRAY_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok32 := true; ok32; ok32 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_INCR_ARRAY_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok33 := true; ok33; ok33 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileInfo*Cmd --
//
//	Procedures called to compile "info" subcommands.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "info" subcommand at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileInfoCommandsCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:579:1: */
	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var tokenPtr uintptr
	var objPtr uintptr
	var bytes uintptr
	var _objPtr uintptr
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _objPtr1 uintptr
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1

	// We require one compile-time known argument for the case we can compile.

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 1) {
		goto __1
	}
	return XTclCompileBasic0ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	goto __2
__1:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2) {
		goto __3
	}
	return TCL_ERROR
__3:
	;
__2:
	;
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	objPtr = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, objPtr) != 0) {
		goto __4
	}
	goto notCompilable
__4:
	;
	bytes = XTcl_GetString(tls, objPtr)

	// We require that the argument start with "::" and not have any of "*\[?"
	// in it. (Theoretically, we should look in only the final component, but
	// the difference is so slight given current naming practices.)

	if !(int32(*(*int8)(unsafe.Pointer(bytes))) != ':' || int32(*(*int8)(unsafe.Pointer(bytes + 1))) != ':' || !(libc.Xstrpbrk(tls, bytes, ts+14153) == uintptr(0))) {
		goto __5
	}
	goto notCompilable
__5:
	;
__6:
	_objPtr = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __9
	}
	XTclFreeObj(tls, _objPtr)
__9:
	;
	goto __7
__7:
	if 0 != 0 {
		goto __6
	}
	goto __8
__8:
	;

	// Confirmed as a literal that will not frighten the horses. Compile. Note
	// that the result needs to be list-ified.

	// TODO: Just push the known value
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __10
	}
__12:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __15
	}
__17:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __20
	}
	XTclExpandCodeArray(tls, envPtr)
__20:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __21
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__21:
	;
__22:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __25
	}
	if !(_delta == -0x7fffffff-1) {
		goto __26
	}
	_delta = 1 - _objIndexCopy
__26:
	;
__27:
	if !(_delta < 0) {
		goto __30
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __31
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__31:
	;
__30:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
__25:
	;
	goto __23
__23:
	if 0 != 0 {
		goto __22
	}
	goto __24
__24:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
	goto __16
__15:
__32:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __35
	}
	XTclExpandCodeArray(tls, envPtr)
__35:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __36
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__36:
	;
__37:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __40
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __41
	}
	_delta1 = 1 - _objIndexCopy
__41:
	;
__42:
	if !(_delta1 < 0) {
		goto __45
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __46
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__46:
	;
__45:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
__40:
	;
	goto __38
__38:
	if 0 != 0 {
		goto __37
	}
	goto __39
__39:
	;
	goto __33
__33:
	if 0 != 0 {
		goto __32
	}
	goto __34
__34:
	;
__16:
	;
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	;
	goto __11
__10:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__11:
	;

__47:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __50
	}
	XTclExpandCodeArray(tls, envPtr)
__50:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RESOLVE_COMMAND)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __51
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_RESOLVE_COMMAND == INST_START_CMD {
			return 1
		}
		return 0
	}()
__51:
	;
__52:
	_delta2 = XtclInstructionTable[INST_RESOLVE_COMMAND].FstackEffect
	if !(_delta2 != 0) {
		goto __55
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __56
	}
	_delta2 = 1 - 0
__56:
	;
__57:
	if !(_delta2 < 0) {
		goto __60
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __61
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__61:
	;
__60:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __58
__58:
	if 0 != 0 {
		goto __57
	}
	goto __59
__59:
	;
__55:
	;
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
__62:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __65
	}
	XTclExpandCodeArray(tls, envPtr)
__65:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __66
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__66:
	;
__67:
	_delta3 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta3 != 0) {
		goto __70
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __71
	}
	_delta3 = 1 - 0
__71:
	;
__72:
	if !(_delta3 < 0) {
		goto __75
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __76
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__76:
	;
__75:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __73
__73:
	if 0 != 0 {
		goto __72
	}
	goto __74
__74:
	;
__70:
	;
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
__77:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __80
	}
	XTclExpandCodeArray(tls, envPtr)
__80:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_LEN)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __81
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_LEN == INST_START_CMD {
			return 1
		}
		return 0
	}()
__81:
	;
__82:
	_delta4 = XtclInstructionTable[INST_STR_LEN].FstackEffect
	if !(_delta4 != 0) {
		goto __85
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __86
	}
	_delta4 = 1 - 0
__86:
	;
__87:
	if !(_delta4 < 0) {
		goto __90
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __91
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__91:
	;
__90:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __88
__88:
	if 0 != 0 {
		goto __87
	}
	goto __89
__89:
	;
__85:
	;
	goto __83
__83:
	if 0 != 0 {
		goto __82
	}
	goto __84
__84:
	;
	goto __78
__78:
	if 0 != 0 {
		goto __77
	}
	goto __79
__79:
	;
__92:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __95
	}
	XTclExpandCodeArray(tls, envPtr)
__95:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __96
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_FALSE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__96:
	;
__97:
	_delta5 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
	if !(_delta5 != 0) {
		goto __100
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __101
	}
	_delta5 = 1 - 7
__101:
	;
__102:
	if !(_delta5 < 0) {
		goto __105
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __106
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__106:
	;
__105:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __103
__103:
	if 0 != 0 {
		goto __102
	}
	goto __104
__104:
	;
__100:
	;
	goto __98
__98:
	if 0 != 0 {
		goto __97
	}
	goto __99
__99:
	;
	goto __93
__93:
	if 0 != 0 {
		goto __92
	}
	goto __94
__94:
	;
__107:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __110
	}
	XTclExpandCodeArray(tls, envPtr)
__110:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __111
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST == INST_START_CMD {
			return 1
		}
		return 0
	}()
__111:
	;
__112:
	_delta6 = XtclInstructionTable[INST_LIST].FstackEffect
	if !(_delta6 != 0) {
		goto __115
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __116
	}
	_delta6 = 1 - 1
__116:
	;
__117:
	if !(_delta6 < 0) {
		goto __120
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __121
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__121:
	;
__120:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __118
__118:
	if 0 != 0 {
		goto __117
	}
	goto __119
__119:
	;
__115:
	;
	goto __113
__113:
	if 0 != 0 {
		goto __112
	}
	goto __114
__114:
	;
	goto __108
__108:
	if 0 != 0 {
		goto __107
	}
	goto __109
__109:
	;
	return TCL_OK

notCompilable:
__122:
	_objPtr1 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __125
	}
	XTclFreeObj(tls, _objPtr1)
__125:
	;
	goto __123
__123:
	if 0 != 0 {
		goto __122
	}
	goto __124
__124:
	;
	return XTclCompileBasic1ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileInfoCoroutineCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:640:1: */
	// Only compile [info coroutine] without arguments.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 1 {
		return TCL_ERROR
	}

	// Not much to do; we compile to a single instruction...

	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_COROUTINE_NAME)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_COROUTINE_NAME == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_COROUTINE_NAME].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileInfoExistsCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:665:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	// var isScalar int32 at bp+4, 4

	// var localIndex int32 at bp, 4

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}

	// Decide if we can use a frame slot for the var/array name or if we need
	// to emit code to compute and push the name at runtime. We use a frame
	// slot (entry in the array of local vars) if we are compiling a procedure
	// body and if the name is simple text that does not include namespace
	// qualifiers.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, tokenPtr, envPtr, 0, bp, bp+4)

	// Emit instruction to check the variable for existence.

	if *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
		if *(*int32)(unsafe.Pointer(bp)) < 0 {
			for ok := true; ok; ok = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EXIST_STK)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_EXIST_STK == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_EXIST_STK].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EXIST_SCALAR)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_EXIST_SCALAR == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok4 := true; ok4; ok4 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_EXIST_SCALAR].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - *(*int32)(unsafe.Pointer(bp))
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	} else {
		if *(*int32)(unsafe.Pointer(bp)) < 0 {
			for ok6 := true; ok6; ok6 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EXIST_ARRAY_STK)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_EXIST_ARRAY_STK == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok7 := true; ok7; ok7 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_EXIST_ARRAY_STK].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok8 := true; ok8; ok8 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok9 := true; ok9; ok9 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EXIST_ARRAY)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_EXIST_ARRAY == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok10 := true; ok10; ok10 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_EXIST_ARRAY].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - *(*int32)(unsafe.Pointer(bp))
						}
						for ok11 := true; ok11; ok11 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}

	return TCL_OK
}

func XTclCompileInfoLevelCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:714:1: */
	// Only compile [info level] without arguments or with a single argument.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 1 {
		// Not much to do; we compile to a single instruction...

		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INFO_LEVEL_NUM)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_INFO_LEVEL_NUM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_INFO_LEVEL_NUM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	} else {
		var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
		var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280

		// Compile the argument, then add the instruction to convert it into a
		// list of arguments.

		if (*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr+uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr+uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr+uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok7 := true; ok7; ok7 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok8 := true; ok8; ok8 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok9 := true; ok9; ok9 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
			XTclCompileTokens(tls, interp, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr+uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr+uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24)).FnumComponents, envPtr)
		}

		for ok10 := true; ok10; ok10 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INFO_LEVEL_ARGS)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_INFO_LEVEL_ARGS == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok11 := true; ok11; ok11 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_INFO_LEVEL_ARGS].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileInfoObjectClassCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:749:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TCLOO_CLASS)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_TCLOO_CLASS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_TCLOO_CLASS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileInfoObjectIsACmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:769:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	// We only handle [info object isa object <somevalue>]. The first three
	// words are compressed to a single token by the ensemble compilation
	// engine.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD || (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize < 1 ||
		libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, ts+19320, uint64((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize)) != 0 {
		return TCL_ERROR
	}
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24

	// Issue the code.

	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TCLOO_IS_OBJECT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_TCLOO_IS_OBJECT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_TCLOO_IS_OBJECT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileInfoObjectNamespaceCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:805:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TCLOO_NS)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_TCLOO_NS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_TCLOO_NS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileLappendCmd --
//
//	Procedure called to compile the "lappend" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "lappend" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileLappendCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:843:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var varTokenPtr uintptr
	var valueTokenPtr uintptr
	// var isScalar int32 at bp+4, 4

	// var localIndex int32 at bp, 4

	var numWords int32
	var i int32
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _delta7 int32
	var _delta8 int32
	var _delta9 int32
	var _objIndexCopy1 int32
	var _delta10 int32
	var _delta11 int32
	var _delta12 int32
	var _delta13 int32
	var _delta14 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1

	// TODO: Consider support for compiling expanded args.
	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	if !(numWords < 3) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	if !(numWords != 3 || (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr == uintptr(0)) {
		goto __2
	}
	goto lappendMultiple
__2:
	;

	// Decide if we can use a frame slot for the var/array name or if we
	// need to emit code to compute and push the name at runtime. We use a
	// frame slot (entry in the array of local vars) if we are compiling a
	// procedure body and if the name is simple text that does not include
	// namespace qualifiers.

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, varTokenPtr, envPtr, 0, bp, bp+4)

	// If we are doing an assignment, push the new value. In the no values
	// case, create an empty object.

	if !(numWords > 2) {
		goto __3
	}
	valueTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24

	if !((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __4
	}
__6:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __9
	}
__11:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __14
	}
	XTclExpandCodeArray(tls, envPtr)
__14:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __15
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__15:
	;
__16:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __19
	}
	if !(_delta == -0x7fffffff-1) {
		goto __20
	}
	_delta = 1 - _objIndexCopy
__20:
	;
__21:
	if !(_delta < 0) {
		goto __24
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __25
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__25:
	;
__24:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
__19:
	;
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	goto __10
__9:
__26:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __29
	}
	XTclExpandCodeArray(tls, envPtr)
__29:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __30
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__30:
	;
__31:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __34
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __35
	}
	_delta1 = 1 - _objIndexCopy
__35:
	;
__36:
	if !(_delta1 < 0) {
		goto __39
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __40
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__40:
	;
__39:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __37
__37:
	if 0 != 0 {
		goto __36
	}
	goto __38
__38:
	;
__34:
	;
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
	goto __27
__27:
	if 0 != 0 {
		goto __26
	}
	goto __28
__28:
	;
__10:
	;
	goto __7
__7:
	if 0 != 0 {
		goto __6
	}
	goto __8
__8:
	;
	goto __5
__4:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
	XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
__5:
	;

__3:
	;

	// Emit instructions to set/get the variable.

	// The *_STK opcodes should be refactored to make better use of existing
	// LOAD/STORE instructions.

	if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) {
		goto __41
	}
	if !(*(*int32)(unsafe.Pointer(bp)) < 0) {
		goto __43
	}
__45:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __48
	}
	XTclExpandCodeArray(tls, envPtr)
__48:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_STK)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __49
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_STK == INST_START_CMD {
			return 1
		}
		return 0
	}()
__49:
	;
__50:
	_delta2 = XtclInstructionTable[INST_LAPPEND_STK].FstackEffect
	if !(_delta2 != 0) {
		goto __53
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __54
	}
	_delta2 = 1 - 0
__54:
	;
__55:
	if !(_delta2 < 0) {
		goto __58
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __59
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__59:
	;
__58:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __56
__56:
	if 0 != 0 {
		goto __55
	}
	goto __57
__57:
	;
__53:
	;
	goto __51
__51:
	if 0 != 0 {
		goto __50
	}
	goto __52
__52:
	;
	goto __46
__46:
	if 0 != 0 {
		goto __45
	}
	goto __47
__47:
	;
	goto __44
__43:
	if !(*(*int32)(unsafe.Pointer(bp)) <= 255) {
		goto __60
	}
__62:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __65
	}
	XTclExpandCodeArray(tls, envPtr)
__65:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __66
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__66:
	;
__67:
	_delta3 = XtclInstructionTable[INST_LAPPEND_SCALAR1].FstackEffect
	if !(_delta3 != 0) {
		goto __70
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __71
	}
	_delta3 = 1 - *(*int32)(unsafe.Pointer(bp))
__71:
	;
__72:
	if !(_delta3 < 0) {
		goto __75
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __76
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__76:
	;
__75:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __73
__73:
	if 0 != 0 {
		goto __72
	}
	goto __74
__74:
	;
__70:
	;
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
	goto __61
__60:
__77:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __80
	}
	XTclExpandCodeArray(tls, envPtr)
__80:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __81
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__81:
	;
__82:
	_delta4 = XtclInstructionTable[INST_LAPPEND_SCALAR4].FstackEffect
	if !(_delta4 != 0) {
		goto __85
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __86
	}
	_delta4 = 1 - *(*int32)(unsafe.Pointer(bp))
__86:
	;
__87:
	if !(_delta4 < 0) {
		goto __90
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __91
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__91:
	;
__90:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __88
__88:
	if 0 != 0 {
		goto __87
	}
	goto __89
__89:
	;
__85:
	;
	goto __83
__83:
	if 0 != 0 {
		goto __82
	}
	goto __84
__84:
	;
	goto __78
__78:
	if 0 != 0 {
		goto __77
	}
	goto __79
__79:
	;
__61:
	;

__44:
	;
	goto __42
__41:
	if !(*(*int32)(unsafe.Pointer(bp)) < 0) {
		goto __92
	}
__94:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __97
	}
	XTclExpandCodeArray(tls, envPtr)
__97:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_ARRAY_STK)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __98
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_ARRAY_STK == INST_START_CMD {
			return 1
		}
		return 0
	}()
__98:
	;
__99:
	_delta5 = XtclInstructionTable[INST_LAPPEND_ARRAY_STK].FstackEffect
	if !(_delta5 != 0) {
		goto __102
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __103
	}
	_delta5 = 1 - 0
__103:
	;
__104:
	if !(_delta5 < 0) {
		goto __107
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __108
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__108:
	;
__107:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __105
__105:
	if 0 != 0 {
		goto __104
	}
	goto __106
__106:
	;
__102:
	;
	goto __100
__100:
	if 0 != 0 {
		goto __99
	}
	goto __101
__101:
	;
	goto __95
__95:
	if 0 != 0 {
		goto __94
	}
	goto __96
__96:
	;
	goto __93
__92:
	if !(*(*int32)(unsafe.Pointer(bp)) <= 255) {
		goto __109
	}
__111:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __114
	}
	XTclExpandCodeArray(tls, envPtr)
__114:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_ARRAY1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __115
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_ARRAY1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__115:
	;
__116:
	_delta6 = XtclInstructionTable[INST_LAPPEND_ARRAY1].FstackEffect
	if !(_delta6 != 0) {
		goto __119
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __120
	}
	_delta6 = 1 - *(*int32)(unsafe.Pointer(bp))
__120:
	;
__121:
	if !(_delta6 < 0) {
		goto __124
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __125
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__125:
	;
__124:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __122
__122:
	if 0 != 0 {
		goto __121
	}
	goto __123
__123:
	;
__119:
	;
	goto __117
__117:
	if 0 != 0 {
		goto __116
	}
	goto __118
__118:
	;
	goto __112
__112:
	if 0 != 0 {
		goto __111
	}
	goto __113
__113:
	;
	goto __110
__109:
__126:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __129
	}
	XTclExpandCodeArray(tls, envPtr)
__129:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_ARRAY4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __130
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_ARRAY4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__130:
	;
__131:
	_delta7 = XtclInstructionTable[INST_LAPPEND_ARRAY4].FstackEffect
	if !(_delta7 != 0) {
		goto __134
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __135
	}
	_delta7 = 1 - *(*int32)(unsafe.Pointer(bp))
__135:
	;
__136:
	if !(_delta7 < 0) {
		goto __139
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __140
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__140:
	;
__139:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __137
__137:
	if 0 != 0 {
		goto __136
	}
	goto __138
__138:
	;
__134:
	;
	goto __132
__132:
	if 0 != 0 {
		goto __131
	}
	goto __133
__133:
	;
	goto __127
__127:
	if 0 != 0 {
		goto __126
	}
	goto __128
__128:
	;
__110:
	;

__93:
	;
__42:
	;

	return TCL_OK

lappendMultiple:
	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, varTokenPtr, envPtr, 0, bp, bp+4)
	valueTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	i = 2
__141:
	if !(i < numWords) {
		goto __143
	}
	if !((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __144
	}
__146:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy1 <= 255) {
		goto __149
	}
__151:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __154
	}
	XTclExpandCodeArray(tls, envPtr)
__154:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __155
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__155:
	;
__156:
	_delta8 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta8 != 0) {
		goto __159
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __160
	}
	_delta8 = 1 - _objIndexCopy1
__160:
	;
__161:
	if !(_delta8 < 0) {
		goto __164
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __165
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__165:
	;
__164:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __162
__162:
	if 0 != 0 {
		goto __161
	}
	goto __163
__163:
	;
__159:
	;
	goto __157
__157:
	if 0 != 0 {
		goto __156
	}
	goto __158
__158:
	;
	goto __152
__152:
	if 0 != 0 {
		goto __151
	}
	goto __153
__153:
	;
	goto __150
__149:
__166:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __169
	}
	XTclExpandCodeArray(tls, envPtr)
__169:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __170
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__170:
	;
__171:
	_delta9 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta9 != 0) {
		goto __174
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __175
	}
	_delta9 = 1 - _objIndexCopy1
__175:
	;
__176:
	if !(_delta9 < 0) {
		goto __179
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __180
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__180:
	;
__179:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __177
__177:
	if 0 != 0 {
		goto __176
	}
	goto __178
__178:
	;
__174:
	;
	goto __172
__172:
	if 0 != 0 {
		goto __171
	}
	goto __173
__173:
	;
	goto __167
__167:
	if 0 != 0 {
		goto __166
	}
	goto __168
__168:
	;
__150:
	;
	goto __147
__147:
	if 0 != 0 {
		goto __146
	}
	goto __148
__148:
	;
	goto __145
__144:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
	XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
__145:
	;

	valueTokenPtr = valueTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents+1)*24
	goto __142
__142:
	i++
	goto __141
	goto __143
__143:
	;
__181:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __184
	}
	XTclExpandCodeArray(tls, envPtr)
__184:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords-2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords-2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords-2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords - 2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __185
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST == INST_START_CMD {
			return 1
		}
		return 0
	}()
__185:
	;
__186:
	_delta10 = XtclInstructionTable[INST_LIST].FstackEffect
	if !(_delta10 != 0) {
		goto __189
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __190
	}
	_delta10 = 1 - (numWords - 2)
__190:
	;
__191:
	if !(_delta10 < 0) {
		goto __194
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __195
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__195:
	;
__194:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __192
__192:
	if 0 != 0 {
		goto __191
	}
	goto __193
__193:
	;
__189:
	;
	goto __187
__187:
	if 0 != 0 {
		goto __186
	}
	goto __188
__188:
	;
	goto __182
__182:
	if 0 != 0 {
		goto __181
	}
	goto __183
__183:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) {
		goto __196
	}
	if !(*(*int32)(unsafe.Pointer(bp)) < 0) {
		goto __198
	}
__200:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __203
	}
	XTclExpandCodeArray(tls, envPtr)
__203:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_LIST_STK)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __204
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_LIST_STK == INST_START_CMD {
			return 1
		}
		return 0
	}()
__204:
	;
__205:
	_delta11 = XtclInstructionTable[INST_LAPPEND_LIST_STK].FstackEffect
	if !(_delta11 != 0) {
		goto __208
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __209
	}
	_delta11 = 1 - 0
__209:
	;
__210:
	if !(_delta11 < 0) {
		goto __213
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __214
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__214:
	;
__213:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __211
__211:
	if 0 != 0 {
		goto __210
	}
	goto __212
__212:
	;
__208:
	;
	goto __206
__206:
	if 0 != 0 {
		goto __205
	}
	goto __207
__207:
	;
	goto __201
__201:
	if 0 != 0 {
		goto __200
	}
	goto __202
__202:
	;
	goto __199
__198:
__215:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __218
	}
	XTclExpandCodeArray(tls, envPtr)
__218:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_LIST)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __219
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_LIST == INST_START_CMD {
			return 1
		}
		return 0
	}()
__219:
	;
__220:
	_delta12 = XtclInstructionTable[INST_LAPPEND_LIST].FstackEffect
	if !(_delta12 != 0) {
		goto __223
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __224
	}
	_delta12 = 1 - *(*int32)(unsafe.Pointer(bp))
__224:
	;
__225:
	if !(_delta12 < 0) {
		goto __228
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __229
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__229:
	;
__228:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __226
__226:
	if 0 != 0 {
		goto __225
	}
	goto __227
__227:
	;
__223:
	;
	goto __221
__221:
	if 0 != 0 {
		goto __220
	}
	goto __222
__222:
	;
	goto __216
__216:
	if 0 != 0 {
		goto __215
	}
	goto __217
__217:
	;
__199:
	;
	goto __197
__196:
	if !(*(*int32)(unsafe.Pointer(bp)) < 0) {
		goto __230
	}
__232:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __235
	}
	XTclExpandCodeArray(tls, envPtr)
__235:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_LIST_ARRAY_STK)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __236
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_LIST_ARRAY_STK == INST_START_CMD {
			return 1
		}
		return 0
	}()
__236:
	;
__237:
	_delta13 = XtclInstructionTable[INST_LAPPEND_LIST_ARRAY_STK].FstackEffect
	if !(_delta13 != 0) {
		goto __240
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __241
	}
	_delta13 = 1 - 0
__241:
	;
__242:
	if !(_delta13 < 0) {
		goto __245
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __246
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__246:
	;
__245:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __243
__243:
	if 0 != 0 {
		goto __242
	}
	goto __244
__244:
	;
__240:
	;
	goto __238
__238:
	if 0 != 0 {
		goto __237
	}
	goto __239
__239:
	;
	goto __233
__233:
	if 0 != 0 {
		goto __232
	}
	goto __234
__234:
	;
	goto __231
__230:
__247:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __250
	}
	XTclExpandCodeArray(tls, envPtr)
__250:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LAPPEND_LIST_ARRAY)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __251
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LAPPEND_LIST_ARRAY == INST_START_CMD {
			return 1
		}
		return 0
	}()
__251:
	;
__252:
	_delta14 = XtclInstructionTable[INST_LAPPEND_LIST_ARRAY].FstackEffect
	if !(_delta14 != 0) {
		goto __255
	}
	if !(_delta14 == -0x7fffffff-1) {
		goto __256
	}
	_delta14 = 1 - *(*int32)(unsafe.Pointer(bp))
__256:
	;
__257:
	if !(_delta14 < 0) {
		goto __260
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __261
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__261:
	;
__260:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta14
	goto __258
__258:
	if 0 != 0 {
		goto __257
	}
	goto __259
__259:
	;
__255:
	;
	goto __253
__253:
	if 0 != 0 {
		goto __252
	}
	goto __254
__254:
	;
	goto __248
__248:
	if 0 != 0 {
		goto __247
	}
	goto __249
__249:
	;
__231:
	;
__197:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileLassignCmd --
//
//	Procedure called to compile the "lassign" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "lassign" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileLassignCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:959:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	// var isScalar int32 at bp+4, 4

	// var localIndex int32 at bp, 4

	var numWords int32
	var idx int32

	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords

	// Check for command syntax error, but we'll punt that to runtime.

	if numWords < 3 {
		return TCL_ERROR
	}

	// Generate code to push list being taken apart by [lassign].

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	// Generate code to assign values from the list to variables.

	for idx = 0; idx < numWords-2; idx++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24

		// Generate the next variable name.

		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(idx+2)*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(idx+2)*8))
		XTclPushVarName(tls, interp, tokenPtr, envPtr, 0, bp, bp+4)

		// Emit instructions to get the idx'th item out of the list value on
		// the stack and assign it to the variable.

		if *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
			if *(*int32)(unsafe.Pointer(bp)) >= 0 {
				for ok7 := true; ok7; ok7 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DUP == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok8 := true; ok8; ok8 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok9 := true; ok9; ok9 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok10 := true; ok10; ok10 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_INDEX_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LIST_INDEX_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok11 := true; ok11; ok11 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LIST_INDEX_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - idx
							}
							for ok12 := true; ok12; ok12 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				if *(*int32)(unsafe.Pointer(bp)) <= 255 {
					for ok13 := true; ok13; ok13 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STORE_SCALAR1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok14 := true; ok14; ok14 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - *(*int32)(unsafe.Pointer(bp))
								}
								for ok15 := true; ok15; ok15 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok16 := true; ok16; ok16 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STORE_SCALAR4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok17 := true; ok17; ok17 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - *(*int32)(unsafe.Pointer(bp))
								}
								for ok18 := true; ok18; ok18 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}

				for ok19 := true; ok19; ok19 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_POP == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok20 := true; ok20; ok20 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok21 := true; ok21; ok21 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok22 := true; ok22; ok22 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_OVER == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok23 := true; ok23; ok23 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 1
							}
							for ok24 := true; ok24; ok24 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok25 := true; ok25; ok25 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_INDEX_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LIST_INDEX_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok26 := true; ok26; ok26 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LIST_INDEX_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - idx
							}
							for ok27 := true; ok27; ok27 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok28 := true; ok28; ok28 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_STK)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok29 := true; ok29; ok29 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok30 := true; ok30; ok30 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok31 := true; ok31; ok31 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_POP == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok32 := true; ok32; ok32 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok33 := true; ok33; ok33 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		} else {
			if *(*int32)(unsafe.Pointer(bp)) >= 0 {
				for ok34 := true; ok34; ok34 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_OVER == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok35 := true; ok35; ok35 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 1
							}
							for ok36 := true; ok36; ok36 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok37 := true; ok37; ok37 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_INDEX_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LIST_INDEX_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok38 := true; ok38; ok38 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LIST_INDEX_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - idx
							}
							for ok39 := true; ok39; ok39 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				if *(*int32)(unsafe.Pointer(bp)) <= 255 {
					for ok40 := true; ok40; ok40 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_ARRAY1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STORE_ARRAY1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok41 := true; ok41; ok41 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STORE_ARRAY1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - *(*int32)(unsafe.Pointer(bp))
								}
								for ok42 := true; ok42; ok42 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok43 := true; ok43; ok43 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_ARRAY4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STORE_ARRAY4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok44 := true; ok44; ok44 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STORE_ARRAY4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - *(*int32)(unsafe.Pointer(bp))
								}
								for ok45 := true; ok45; ok45 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}

				for ok46 := true; ok46; ok46 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_POP == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok47 := true; ok47; ok47 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok48 := true; ok48; ok48 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok49 := true; ok49; ok49 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_OVER == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok50 := true; ok50; ok50 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 2
							}
							for ok51 := true; ok51; ok51 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok52 := true; ok52; ok52 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_INDEX_IMM)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LIST_INDEX_IMM == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok53 := true; ok53; ok53 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LIST_INDEX_IMM].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - idx
							}
							for ok54 := true; ok54; ok54 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok55 := true; ok55; ok55 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_ARRAY_STK)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_ARRAY_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok56 := true; ok56; ok56 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_ARRAY_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok57 := true; ok57; ok57 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok58 := true; ok58; ok58 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_POP == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok59 := true; ok59; ok59 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok60 := true; ok60; ok60 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}

	// Generate code to leave the rest of the list on the stack.

	for ok61 := true; ok61; ok61 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(idx))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_LIST_RANGE_IMM == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok62 := true; ok62; ok62 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - idx
				}
				for ok63 := true; ok63; ok63 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok64 := true; ok64; ok64 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-2))
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileLindexCmd --
//
//	Procedure called to compile the "lindex" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "lindex" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileLindexCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1063:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var idxTokenPtr uintptr
	var valTokenPtr uintptr
	var i int32
	// var idx int32 at bp, 4

	var numWords int32
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _objIndexCopy1 int32
	var _delta5 int32
	var _delta6 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords

	// Quit if not enough args.

	// TODO: Consider support for compiling expanded args.
	if !(numWords <= 1) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	valTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if !(numWords != 3) {
		goto __2
	}
	goto emitComplexLindex
__2:
	;

	idxTokenPtr = valTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(valTokenPtr)).FnumComponents+1)*24
	if !(XTclGetIndexFromToken(tls, idxTokenPtr, -1, -1,
		bp) == TCL_OK) {
		goto __3
	}
	// The idxTokenPtr parsed as a valid index value and was
	// encoded as expected by INST_LIST_INDEX_IMM.
	//
	// NOTE: that we rely on indexing before a list producing the
	// same result as indexing after a list.

	if !((*Tcl_Token)(unsafe.Pointer(valTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __4
	}
__6:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __9
	}
__11:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __14
	}
	XTclExpandCodeArray(tls, envPtr)
__14:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __15
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__15:
	;
__16:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __19
	}
	if !(_delta == -0x7fffffff-1) {
		goto __20
	}
	_delta = 1 - _objIndexCopy
__20:
	;
__21:
	if !(_delta < 0) {
		goto __24
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __25
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__25:
	;
__24:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
__19:
	;
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	goto __10
__9:
__26:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __29
	}
	XTclExpandCodeArray(tls, envPtr)
__29:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __30
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__30:
	;
__31:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __34
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __35
	}
	_delta1 = 1 - _objIndexCopy
__35:
	;
__36:
	if !(_delta1 < 0) {
		goto __39
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __40
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__40:
	;
__39:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __37
__37:
	if 0 != 0 {
		goto __36
	}
	goto __38
__38:
	;
__34:
	;
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
	goto __27
__27:
	if 0 != 0 {
		goto __26
	}
	goto __28
__28:
	;
__10:
	;
	goto __7
__7:
	if 0 != 0 {
		goto __6
	}
	goto __8
__8:
	;
	goto __5
__4:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileTokens(tls, interp, valTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valTokenPtr)).FnumComponents, envPtr)
__5:
	;

__41:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __44
	}
	XTclExpandCodeArray(tls, envPtr)
__44:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_INDEX_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __45
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST_INDEX_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__45:
	;
__46:
	_delta2 = XtclInstructionTable[INST_LIST_INDEX_IMM].FstackEffect
	if !(_delta2 != 0) {
		goto __49
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __50
	}
	_delta2 = 1 - *(*int32)(unsafe.Pointer(bp))
__50:
	;
__51:
	if !(_delta2 < 0) {
		goto __54
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __55
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__55:
	;
__54:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
__49:
	;
	goto __47
__47:
	if 0 != 0 {
		goto __46
	}
	goto __48
__48:
	;
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
	return TCL_OK
__3:
	;

	// If the value was not known at compile time, the conversion failed or
	// the value was negative, we just keep on going with the more complex
	// compilation.

	// Push the operands onto the stack.

emitComplexLindex:
	i = 1
__56:
	if !(i < numWords) {
		goto __58
	}
	if !((*Tcl_Token)(unsafe.Pointer(valTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __59
	}
__61:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy1 <= 255) {
		goto __64
	}
__66:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __69
	}
	XTclExpandCodeArray(tls, envPtr)
__69:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __70
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__70:
	;
__71:
	_delta3 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta3 != 0) {
		goto __74
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __75
	}
	_delta3 = 1 - _objIndexCopy1
__75:
	;
__76:
	if !(_delta3 < 0) {
		goto __79
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __80
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__80:
	;
__79:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __77
__77:
	if 0 != 0 {
		goto __76
	}
	goto __78
__78:
	;
__74:
	;
	goto __72
__72:
	if 0 != 0 {
		goto __71
	}
	goto __73
__73:
	;
	goto __67
__67:
	if 0 != 0 {
		goto __66
	}
	goto __68
__68:
	;
	goto __65
__64:
__81:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __84
	}
	XTclExpandCodeArray(tls, envPtr)
__84:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __85
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__85:
	;
__86:
	_delta4 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta4 != 0) {
		goto __89
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __90
	}
	_delta4 = 1 - _objIndexCopy1
__90:
	;
__91:
	if !(_delta4 < 0) {
		goto __94
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __95
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__95:
	;
__94:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __92
__92:
	if 0 != 0 {
		goto __91
	}
	goto __93
__93:
	;
__89:
	;
	goto __87
__87:
	if 0 != 0 {
		goto __86
	}
	goto __88
__88:
	;
	goto __82
__82:
	if 0 != 0 {
		goto __81
	}
	goto __83
__83:
	;
__65:
	;
	goto __62
__62:
	if 0 != 0 {
		goto __61
	}
	goto __63
__63:
	;
	goto __60
__59:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
	XTclCompileTokens(tls, interp, valTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valTokenPtr)).FnumComponents, envPtr)
__60:
	;

	valTokenPtr = valTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(valTokenPtr)).FnumComponents+1)*24
	goto __57
__57:
	i++
	goto __56
	goto __58
__58:
	;

	// Emit INST_LIST_INDEX if objc==3, or INST_LIST_INDEX_MULTI if there are
	// multiple index args.

	if !(numWords == 3) {
		goto __96
	}
__98:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __101
	}
	XTclExpandCodeArray(tls, envPtr)
__101:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_INDEX)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __102
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST_INDEX == INST_START_CMD {
			return 1
		}
		return 0
	}()
__102:
	;
__103:
	_delta5 = XtclInstructionTable[INST_LIST_INDEX].FstackEffect
	if !(_delta5 != 0) {
		goto __106
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __107
	}
	_delta5 = 1 - 0
__107:
	;
__108:
	if !(_delta5 < 0) {
		goto __111
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __112
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__112:
	;
__111:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __109
__109:
	if 0 != 0 {
		goto __108
	}
	goto __110
__110:
	;
__106:
	;
	goto __104
__104:
	if 0 != 0 {
		goto __103
	}
	goto __105
__105:
	;
	goto __99
__99:
	if 0 != 0 {
		goto __98
	}
	goto __100
__100:
	;
	goto __97
__96:
__113:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __116
	}
	XTclExpandCodeArray(tls, envPtr)
__116:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_INDEX_MULTI)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords-1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords-1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords-1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numWords - 1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __117
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST_INDEX_MULTI == INST_START_CMD {
			return 1
		}
		return 0
	}()
__117:
	;
__118:
	_delta6 = XtclInstructionTable[INST_LIST_INDEX_MULTI].FstackEffect
	if !(_delta6 != 0) {
		goto __121
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __122
	}
	_delta6 = 1 - (numWords - 1)
__122:
	;
__123:
	if !(_delta6 < 0) {
		goto __126
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __127
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__127:
	;
__126:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __124
__124:
	if 0 != 0 {
		goto __123
	}
	goto __125
__125:
	;
__121:
	;
	goto __119
__119:
	if 0 != 0 {
		goto __118
	}
	goto __120
__120:
	;
	goto __114
__114:
	if 0 != 0 {
		goto __113
	}
	goto __115
__115:
	;
__97:
	;

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileListCmd --
//
//	Procedure called to compile the "list" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "list" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileListCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1154:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var valueTokenPtr uintptr
	var i int32
	var numWords int32
	var concat int32
	var build int32
	var listObj uintptr
	var objPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 1 {
		// [list] without arguments just pushes an empty object.

		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		return TCL_OK
	}

	// Test if all arguments are compile-time known. If they are, we can
	// implement with a simple push.

	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	valueTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	listObj = XTcl_NewObj(tls)
	for i = 1; i < numWords && listObj != uintptr(0); i++ {
		objPtr = XTcl_NewObj(tls)
		if XTclWordKnownAtCompileTime(tls, valueTokenPtr, objPtr) != 0 {
			XTcl_ListObjAppendElement(tls, uintptr(0), listObj, objPtr)
		} else {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objPtr uintptr = objPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _objPtr uintptr = listObj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			listObj = uintptr(0)
		}
		valueTokenPtr = valueTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents+1)*24
	}
	if listObj != uintptr(0) {
		for ok9 := true; ok9; ok9 = 0 != 0 {
			var _objIndexCopy int32 = XTclAddLiteralObj(tls, envPtr, listObj, uintptr(0))
			if _objIndexCopy <= 255 {
				for ok10 := true; ok10; ok10 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok11 := true; ok11; ok11 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok12 := true; ok12; ok12 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok13 := true; ok13; ok13 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok14 := true; ok14; ok14 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok15 := true; ok15; ok15 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		return TCL_OK
	}

	// Push the all values onto the stack.

	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	valueTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	concat = libc.AssignInt32(&build, 0)
	for i = 1; i < numWords; i++ {
		if (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_EXPAND_WORD && build > 0 {
			for ok16 := true; ok16; ok16 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(build) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(build) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(build) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(build))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LIST == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok17 := true; ok17; ok17 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - build
						}
						for ok18 := true; ok18; ok18 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			if concat != 0 {
				for ok19 := true; ok19; ok19 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LIST_CONCAT == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok20 := true; ok20; ok20 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok21 := true; ok21; ok21 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
			build = 0
			concat = 1
		}
		if (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok22 := true; ok22; ok22 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok23 := true; ok23; ok23 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok24 := true; ok24; ok24 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok25 := true; ok25; ok25 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok26 := true; ok26; ok26 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok27 := true; ok27; ok27 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok28 := true; ok28; ok28 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
		}

		if (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_EXPAND_WORD {
			if concat != 0 {
				for ok29 := true; ok29; ok29 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LIST_CONCAT == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok30 := true; ok30; ok30 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok31 := true; ok31; ok31 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				concat = 1
			}
		} else {
			build++
		}
		valueTokenPtr = valueTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents+1)*24
	}
	if build > 0 {
		for ok32 := true; ok32; ok32 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(build) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(build) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(build) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(build))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok33 := true; ok33; ok33 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - build
					}
					for ok34 := true; ok34; ok34 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		if concat != 0 {
			for ok35 := true; ok35; ok35 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LIST_CONCAT == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok36 := true; ok36; ok36 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok37 := true; ok37; ok37 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}

	// If there was just one expanded word, we must ensure that it is a list
	// at this point. We use an [lrange ... 0 end] for this (instead of
	// [llength], as with literals) as we must drop any string representation
	// that might be hanging around.

	if concat != 0 && numWords == 2 {
		for ok38 := true; ok38; ok38 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_RANGE_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok39 := true; ok39; ok39 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok40 := true; ok40; ok40 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok41 := true; ok41; ok41 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-2))
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileLlengthCmd --
//
//	Procedure called to compile the "llength" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "llength" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileLlengthCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1268:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varTokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}
	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, varTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_LENGTH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_LIST_LENGTH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_LIST_LENGTH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileLrangeCmd --
//
//	How to compile the "lrange" command. We only bother because we needed
//	the opcode anyway for "lassign".
//
//----------------------------------------------------------------------

func XTclCompileLrangeCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1301:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var listTokenPtr uintptr
	// var idx1 int32 at bp, 4

	// var idx2 int32 at bp+4, 4

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 4 {
		return TCL_ERROR
	}
	listTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	tokenPtr = listTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(listTokenPtr)).FnumComponents+1)*24
	if XTclGetIndexFromToken(tls, tokenPtr, 0, 0x7fffffff,
		bp) != TCL_OK {
		return TCL_ERROR
	}
	// Token was an index value, and we treat all "first" indices
	// before the list same as the start of the list.

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if XTclGetIndexFromToken(tls, tokenPtr, -1, -2,
		bp+4) != TCL_OK {
		return TCL_ERROR
	}
	// Token was an index value, and we treat all "last" indices
	// after the list same as the end of the list.

	// Issue instructions. It's not safe to skip doing the LIST_RANGE, as
	// we've not proved that the 'list' argument is really a list. Not that it
	// is worth trying to do that given current knowledge.

	if (*Tcl_Token)(unsafe.Pointer(listTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(listTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(listTokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, listTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(listTokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_LIST_RANGE_IMM == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - *(*int32)(unsafe.Pointer(bp))
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok10 := true; ok10; ok10 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileLinsertCmd --
//
//	How to compile the "linsert" command. We only bother with the case
//	where the index is constant.
//
//----------------------------------------------------------------------

func XTclCompileLinsertCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1362:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var listTokenPtr uintptr
	// var idx int32 at bp, 4

	var i int32

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 {
		return TCL_ERROR
	}
	listTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	// Parse the index. Will only compile if it is constant and not an
	// _integer_ less than zero (since we reserve negative indices here for
	// end-relative indexing) or an end-based index greater than 'end' itself.

	tokenPtr = listTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(listTokenPtr)).FnumComponents+1)*24

	// NOTE: This command treats all inserts at indices before the list
	// the same as inserts at the start of the list, and all inserts
	// after the list the same as inserts at the end of the list. We
	// make that transformation here so we can use the optimized bytecode
	// as much as possible.
	if XTclGetIndexFromToken(tls, tokenPtr, 0, -2,
		bp) != TCL_OK {
		return TCL_ERROR
	}

	// There are four main cases. If there are no values to insert, this is
	// just a confirm-listiness check. If the index is '0', this is a prepend.
	// If the index is 'end' (== TCL_INDEX_END), this is an append. Otherwise,
	// this is a splice (== split, insert values as list, concat-3).

	if (*Tcl_Token)(unsafe.Pointer(listTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(listTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(listTokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, listTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(listTokenPtr)).FnumComponents, envPtr)
	}

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 3 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_RANGE_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok10 := true; ok10; ok10 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-2))
		}
		return TCL_OK
	}

	for i = 3; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok11 := true; ok11; ok11 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok12 := true; ok12; ok12 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok13 := true; ok13; ok13 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok14 := true; ok14; ok14 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok15 := true; ok15; ok15 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok16 := true; ok16; ok16 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok17 := true; ok17; ok17 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	}
	for ok18 := true; ok18; ok18 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i-3) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i-3) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i-3) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i - 3))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_LIST == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok19 := true; ok19; ok19 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - (i - 3)
				}
				for ok20 := true; ok20; ok20 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	if *(*int32)(unsafe.Pointer(bp)) == 0 {
		for ok21 := true; ok21; ok21 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok22 := true; ok22; ok22 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 2
					}
					for ok23 := true; ok23; ok23 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok24 := true; ok24; ok24 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_CONCAT == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok25 := true; ok25; ok25 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok26 := true; ok26; ok26 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else if *(*int32)(unsafe.Pointer(bp)) == -2 {
		for ok27 := true; ok27; ok27 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_CONCAT == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok28 := true; ok28; ok28 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok29 := true; ok29; ok29 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		// Here we handle two ranges for idx. First when idx > 0, we
		// want the first half of the split to end at index idx-1 and
		// the second half to start at index idx.
		// Second when idx < TCL_INDEX_END, indicating "end-N" indexing,
		// we want the first half of the split to end at index end-N and
		// the second half to start at index end-N+1. We accomplish this
		// with a pre-adjustment of the end-N value.
		// The root of this is that the commands [lrange] and [linsert]
		// differ in their interpretation of the "end" index.

		if *(*int32)(unsafe.Pointer(bp)) < -2 {
			*(*int32)(unsafe.Pointer(bp /* idx */))++
		}
		for ok30 := true; ok30; ok30 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_OVER == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok31 := true; ok31; ok31 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 1
					}
					for ok32 := true; ok32; ok32 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok33 := true; ok33; ok33 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_RANGE_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok34 := true; ok34; ok34 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok35 := true; ok35; ok35 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok36 := true; ok36; ok36 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp)) - 1))
		}
		for ok37 := true; ok37; ok37 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok38 := true; ok38; ok38 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 3
					}
					for ok39 := true; ok39; ok39 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok40 := true; ok40; ok40 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_RANGE_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok41 := true; ok41; ok41 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - *(*int32)(unsafe.Pointer(bp))
					}
					for ok42 := true; ok42; ok42 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok43 := true; ok43; ok43 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-2))
		}
		for ok44 := true; ok44; ok44 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_CONCAT == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok45 := true; ok45; ok45 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok46 := true; ok46; ok46 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok47 := true; ok47; ok47 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_CONCAT == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok48 := true; ok48; ok48 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok49 := true; ok49; ok49 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileLreplaceCmd --
//
//	How to compile the "lreplace" command. We only bother with the case
//	where the indices are constant.
//
//----------------------------------------------------------------------

func XTclCompileLreplaceCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1465:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var listTokenPtr uintptr
	// var idx1 int32 at bp, 4

	// var idx2 int32 at bp+4, 4

	var i int32
	var emptyPrefix int32 = 1
	var suffixStart int32 = 0

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 4 {
		return TCL_ERROR
	}
	listTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	tokenPtr = listTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(listTokenPtr)).FnumComponents+1)*24
	if XTclGetIndexFromToken(tls, tokenPtr, 0, 0x7fffffff,
		bp) != TCL_OK {
		return TCL_ERROR
	}

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if XTclGetIndexFromToken(tls, tokenPtr, -1, -2,
		bp+4) != TCL_OK {
		return TCL_ERROR
	}

	// General structure of the [lreplace] result is
	//		prefix replacement suffix
	// In a few cases we can predict various parts will be empty and
	// take advantage.
	//
	// The proper suffix begins with the greater of indices idx1 or
	// idx2 + 1. If we cannot tell at compile time which is greater,
	// we must defer to direct evaluation.

	if *(*int32)(unsafe.Pointer(bp)) == 0x7fffffff {
		suffixStart = *(*int32)(unsafe.Pointer(bp /* idx1 */))
	} else if *(*int32)(unsafe.Pointer(bp + 4)) == -1 {
		suffixStart = *(*int32)(unsafe.Pointer(bp /* idx1 */))
	} else if *(*int32)(unsafe.Pointer(bp + 4)) == -2 {
		suffixStart = 0x7fffffff
	} else if *(*int32)(unsafe.Pointer(bp + 4)) < -2 && *(*int32)(unsafe.Pointer(bp)) <= -2 ||
		*(*int32)(unsafe.Pointer(bp + 4)) >= 0 && *(*int32)(unsafe.Pointer(bp)) >= 0 {
		if *(*int32)(unsafe.Pointer(bp)) > *(*int32)(unsafe.Pointer(bp + 4))+1 {
			suffixStart = *(*int32)(unsafe.Pointer(bp /* idx1 */))
		} else {
			suffixStart = *(*int32)(unsafe.Pointer(bp + 4)) + 1
		}
	} else {
		return TCL_ERROR
	}

	// All paths start with computing/pushing the original value.
	if (*Tcl_Token)(unsafe.Pointer(listTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(listTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(listTokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, listTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(listTokenPtr)).FnumComponents, envPtr)
	}

	// Push all the replacement values next so any errors raised in
	// creating them get raised first.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 4 {
		// Push the replacement arguments
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		for i = 4; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
			if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
				for ok7 := true; ok7; ok7 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
					if _objIndexCopy <= 255 {
						for ok8 := true; ok8; ok8 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok9 := true; ok9; ok9 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok10 := true; ok10; ok10 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok11 := true; ok11; ok11 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok12 := true; ok12; ok12 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok13 := true; ok13; ok13 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
			} else {
				(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
				(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
				XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
			}

			tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		}

		// Make a list of them...
		for ok14 := true; ok14; ok14 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i-4) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i-4) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i-4) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i - 4))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok15 := true; ok15; ok15 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - (i - 4)
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}

		emptyPrefix = 0
	}

	if *(*int32)(unsafe.Pointer(bp)) == suffixStart && (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 4 {
		// This is a "no-op". Example: [lreplace {a b c} 2 0]
		// We still do a list operation to get list-verification
		// and canonicalization side effects.
		for ok17 := true; ok17; ok17 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_RANGE_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok18 := true; ok18; ok18 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok20 := true; ok20; ok20 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-2))
		}
		return TCL_OK
	}

	if *(*int32)(unsafe.Pointer(bp)) != 0 {
		// Prefix may not be empty; generate bytecode to push it
		if emptyPrefix != 0 {
			for ok21 := true; ok21; ok21 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_DUP == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok22 := true; ok22; ok22 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok23 := true; ok23; ok23 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok24 := true; ok24; ok24 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_OVER == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok25 := true; ok25; ok25 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 1
						}
						for ok26 := true; ok26; ok26 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
		for ok27 := true; ok27; ok27 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_RANGE_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok28 := true; ok28; ok28 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok29 := true; ok29; ok29 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok30 := true; ok30; ok30 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp)) - 1))
		}
		if !(emptyPrefix != 0) {
			for ok31 := true; ok31; ok31 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_REVERSE == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok32 := true; ok32; ok32 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 2
						}
						for ok33 := true; ok33; ok33 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok34 := true; ok34; ok34 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LIST_CONCAT == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok35 := true; ok35; ok35 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok36 := true; ok36; ok36 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
		emptyPrefix = 0
	}

	if !(emptyPrefix != 0) {
		for ok37 := true; ok37; ok37 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok38 := true; ok38; ok38 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 2
					}
					for ok39 := true; ok39; ok39 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	if suffixStart == 0x7fffffff {
		for ok40 := true; ok40; ok40 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok41 := true; ok41; ok41 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok42 := true; ok42; ok42 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		if emptyPrefix != 0 {
			for ok43 := true; ok43; ok43 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
				if _objIndexCopy <= 255 {
					for ok44 := true; ok44; ok44 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok45 := true; ok45; ok45 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok46 := true; ok46; ok46 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok47 := true; ok47; ok47 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok48 := true; ok48; ok48 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok49 := true; ok49; ok49 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		}
	} else {
		// Suffix may not be empty; generate bytecode to push it
		for ok50 := true; ok50; ok50 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(suffixStart) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(suffixStart) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(suffixStart) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(suffixStart))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LIST_RANGE_IMM == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok51 := true; ok51; ok51 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - suffixStart
					}
					for ok52 := true; ok52; ok52 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok53 := true; ok53; ok53 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-2))
		}
		if !(emptyPrefix != 0) {
			for ok54 := true; ok54; ok54 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LIST_CONCAT == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok55 := true; ok55; ok55 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok56 := true; ok56; ok56 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileLsetCmd --
//
//	Procedure called to compile the "lset" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "lset" command at
//	runtime.
//
// The general template for execution of the "lset" command is:
//	(1) Instructions to push the variable name, unless the variable is
//	    local to the stack frame.
//	(2) If the variable is an array element, instructions to push the
//	    array element name.
//	(3) Instructions to push each of zero or more "index" arguments to the
//	    stack, followed with the "newValue" element.
//	(4) Instructions to duplicate the variable name and/or array element
//	    name onto the top of the stack, if either was pushed at steps (1)
//	    and (2).
//	(5) The appropriate INST_LOAD_* instruction to place the original
//	    value of the list variable at top of stack.
//	(6) At this point, the stack contains:
//		varName? arrayElementName? index1 index2 ... newValue oldList
//	    The compiler emits one of INST_LSET_FLAT or INST_LSET_LIST
//	    according as whether there is exactly one index element (LIST) or
//	    either zero or else two or more (FLAT). This instruction removes
//	    everything from the stack except for the two names and pushes the
//	    new value of the variable.
//	(7) Finally, INST_STORE_* stores the new value in the variable and
//	    cleans up the stack.
//
//----------------------------------------------------------------------

func XTclCompileLsetCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1629:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tempDepth int32                                                  // Depth used for emitting one part of the
	// code burst.
	var varTokenPtr uintptr // Pointer to the Tcl_Token representing the
	// parse of the variable name.
	// var localIndex int32 at bp, 4
	// Index of var in local var table.
	// var isScalar int32 at bp+4, 4
	// Flag == 1 if scalar, 0 if array.
	var i int32

	// Check argument count.

	// TODO: Consider support for compiling expanded args.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 {
		// Fail at run time, not in compilation.

		return TCL_ERROR
	}

	// Decide if we can use a frame slot for the var/array name or if we need
	// to emit code to compute and push the name at runtime. We use a frame
	// slot (entry in the array of local vars) if we are compiling a procedure
	// body and if the name is simple text that does not include namespace
	// qualifiers.

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, varTokenPtr, envPtr, 0, bp, bp+4)

	// Push the "index" args and the new element value.

	for i = 2; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		varTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, varTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents, envPtr)
		}

	}

	// Duplicate the variable name if it's been pushed.

	if *(*int32)(unsafe.Pointer(bp)) < 0 {
		if *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
			tempDepth = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 2
		} else {
			tempDepth = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 1
		}
		for ok7 := true; ok7; ok7 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tempDepth) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tempDepth) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tempDepth) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tempDepth))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_OVER == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - tempDepth
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// Duplicate an array index if one's been pushed.

	if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) {
		if *(*int32)(unsafe.Pointer(bp)) < 0 {
			tempDepth = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 1
		} else {
			tempDepth = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 2
		}
		for ok10 := true; ok10; ok10 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tempDepth) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tempDepth) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tempDepth) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tempDepth))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_OVER == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok11 := true; ok11; ok11 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - tempDepth
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// Emit code to load the variable's value.

	if *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
		if *(*int32)(unsafe.Pointer(bp)) < 0 {
			for ok13 := true; ok13; ok13 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_STK)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_STK == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok14 := true; ok14; ok14 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_STK].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok15 := true; ok15; ok15 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			if *(*int32)(unsafe.Pointer(bp)) <= 255 {
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok17 := true; ok17; ok17 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok18 := true; ok18; ok18 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok19 := true; ok19; ok19 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok20 := true; ok20; ok20 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok21 := true; ok21; ok21 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

		}
	} else {
		if *(*int32)(unsafe.Pointer(bp)) < 0 {
			for ok22 := true; ok22; ok22 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_ARRAY_STK)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_ARRAY_STK == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok23 := true; ok23; ok23 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_ARRAY_STK].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok24 := true; ok24; ok24 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			if *(*int32)(unsafe.Pointer(bp)) <= 255 {
				for ok25 := true; ok25; ok25 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_ARRAY1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_ARRAY1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok26 := true; ok26; ok26 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_ARRAY1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok27 := true; ok27; ok27 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok28 := true; ok28; ok28 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_ARRAY4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_ARRAY4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok29 := true; ok29; ok29 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_ARRAY4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok30 := true; ok30; ok30 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

		}
	}

	// Emit the correct variety of 'lset' instruction.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 4 {
		for ok31 := true; ok31; ok31 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LSET_LIST)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LSET_LIST == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok32 := true; ok32; ok32 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LSET_LIST].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok33 := true; ok33; ok33 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok34 := true; ok34; ok34 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LSET_FLAT)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LSET_FLAT == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok35 := true; ok35; ok35 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LSET_FLAT].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - ((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 1)
					}
					for ok36 := true; ok36; ok36 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// Emit code to put the value back in the variable.

	if *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
		if *(*int32)(unsafe.Pointer(bp)) < 0 {
			for ok37 := true; ok37; ok37 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_STK)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_STK == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok38 := true; ok38; ok38 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_STK].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok39 := true; ok39; ok39 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			if *(*int32)(unsafe.Pointer(bp)) <= 255 {
				for ok40 := true; ok40; ok40 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok41 := true; ok41; ok41 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok42 := true; ok42; ok42 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok43 := true; ok43; ok43 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_SCALAR4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok44 := true; ok44; ok44 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok45 := true; ok45; ok45 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

		}
	} else {
		if *(*int32)(unsafe.Pointer(bp)) < 0 {
			for ok46 := true; ok46; ok46 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_ARRAY_STK)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_ARRAY_STK == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok47 := true; ok47; ok47 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_ARRAY_STK].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok48 := true; ok48; ok48 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			if *(*int32)(unsafe.Pointer(bp)) <= 255 {
				for ok49 := true; ok49; ok49 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_ARRAY1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_ARRAY1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok50 := true; ok50; ok50 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_ARRAY1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok51 := true; ok51; ok51 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok52 := true; ok52; ok52 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_ARRAY4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_ARRAY4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok53 := true; ok53; ok53 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_ARRAY4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(bp))
							}
							for ok54 := true; ok54; ok54 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileNamespace*Cmd --
//
//	Procedures called to compile the "namespace" command; currently, only
//	the subcommands "namespace current" and "namespace upvar" are compiled
//	to bytecodes, and the latter only inside a procedure(-like) context.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "namespace upvar"
//	command at runtime.
//
//----------------------------------------------------------------------

func XTclCompileNamespaceCurrentCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1776:1: */
	// Only compile [namespace current] without arguments.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 1 {
		return TCL_ERROR
	}

	// Not much to do; we compile to a single instruction...

	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NS_CURRENT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_NS_CURRENT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_NS_CURRENT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileNamespaceCodeCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1801:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	// The specification of [namespace code] is rather shocking, in that it is
	// supposed to check if the argument is itself the result of [namespace
	// code] and not apply itself in that case. Which is excessively cautious,
	// but what the test suite checks for.

	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD || (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize > 20 &&
		libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, ts+19327, uint64(20)) == 0 {
		// Technically, we could just pass a literal '::namespace inscope '
		// term through, but that's something which really shouldn't be
		// occurring as something that the user writes so we'll just punt it.

		return TCL_ERROR
	}

	// Now we can compile using the same strategy as [namespace code]'s normal
	// implementation does internally. Note that we can't bind the namespace
	// name directly here, because TclOO plays complex games with namespaces;
	// the value needs to be determined at runtime for safety.

	for ok := true; ok; ok = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+19348, int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok3 := true; ok3; ok3 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok6 := true; ok6; ok6 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok7 := true; ok7; ok7 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+19360, int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok8 := true; ok8; ok8 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok10 := true; ok10; ok10 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok11 := true; ok11; ok11 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok12 := true; ok12; ok12 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok13 := true; ok13; ok13 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NS_CURRENT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_NS_CURRENT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_NS_CURRENT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok17 := true; ok17; ok17 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok20 := true; ok20; ok20 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok21 := true; ok21; ok21 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok22 := true; ok22; ok22 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok23 := true; ok23; ok23 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok24 := true; ok24; ok24 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(4)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(4)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(4)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(4))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_LIST == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok25 := true; ok25; ok25 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 4
				}
				for ok26 := true; ok26; ok26 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileNamespaceOriginCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1851:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ORIGIN_COMMAND)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_ORIGIN_COMMAND == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_ORIGIN_COMMAND].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileNamespaceQualifiersCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1873:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	var off int32

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}

	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok8 := true; ok8; ok8 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok10 := true; ok10; ok10 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok11 := true; ok11; ok11 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok12 := true; ok12; ok12 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok13 := true; ok13; ok13 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok14 := true; ok14; ok14 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok15 := true; ok15; ok15 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok17 := true; ok17; ok17 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok18 := true; ok18; ok18 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok19 := true; ok19; ok19 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok20 := true; ok20; ok20 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok21 := true; ok21; ok21 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_OVER == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok22 := true; ok22; ok22 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 2
				}
				for ok23 := true; ok23; ok23 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok24 := true; ok24; ok24 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_FIND_LAST)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_FIND_LAST == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok25 := true; ok25; ok25 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_FIND_LAST].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok26 := true; ok26; ok26 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	off = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok27 := true; ok27; ok27 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok28 := true; ok28; ok28 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok29 := true; ok29; ok29 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok30 := true; ok30; ok30 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok31 := true; ok31; ok31 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok32 := true; ok32; ok32 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok33 := true; ok33; ok33 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok34 := true; ok34; ok34 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_SUB)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_SUB == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok35 := true; ok35; ok35 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_SUB].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok36 := true; ok36; ok36 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok37 := true; ok37; ok37 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_OVER == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok38 := true; ok38; ok38 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 2
				}
				for ok39 := true; ok39; ok39 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok40 := true; ok40; ok40 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_OVER == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok41 := true; ok41; ok41 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 1
				}
				for ok42 := true; ok42; ok42 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok43 := true; ok43; ok43 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_INDEX)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_INDEX == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok44 := true; ok44; ok44 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_INDEX].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok45 := true; ok45; ok45 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok46 := true; ok46; ok46 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+19368, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok47 := true; ok47; ok47 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok48 := true; ok48; ok48 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok49 := true; ok49; ok49 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok50 := true; ok50; ok50 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok51 := true; ok51; ok51 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok52 := true; ok52; ok52 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok53 := true; ok53; ok53 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_EQ == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok54 := true; ok54; ok54 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_EQ].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok55 := true; ok55; ok55 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	off = int32(int64(off) - (int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1)
	for ok56 := true; ok56; ok56 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(off))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP_TRUE1 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok57 := true; ok57; ok57 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - off
				}
				for ok58 := true; ok58; ok58 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok59 := true; ok59; ok59 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_RANGE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok60 := true; ok60; ok60 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_RANGE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok61 := true; ok61; ok61 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileNamespaceTailCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1909:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	// var jumpFixup JumpFixup at bp, 16

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}

	// Take care; only add 2 to found index if the string was actually found.

	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok8 := true; ok8; ok8 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok10 := true; ok10; ok10 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok11 := true; ok11; ok11 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok12 := true; ok12; ok12 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok13 := true; ok13; ok13 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_OVER == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 1
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok17 := true; ok17; ok17 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_FIND_LAST)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_FIND_LAST == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok18 := true; ok18; ok18 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_FIND_LAST].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok19 := true; ok19; ok19 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok20 := true; ok20; ok20 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DUP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok21 := true; ok21; ok21 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok22 := true; ok22; ok22 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok23 := true; ok23; ok23 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok24 := true; ok24; ok24 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok25 := true; ok25; ok25 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok26 := true; ok26; ok26 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok27 := true; ok27; ok27 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok28 := true; ok28; ok28 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok29 := true; ok29; ok29 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok30 := true; ok30; ok30 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_GE)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_GE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok31 := true; ok31; ok31 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_GE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok32 := true; ok32; ok32 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	XTclEmitForwardJump(tls, envPtr, TCL_FALSE_JUMP, bp)
	for ok33 := true; ok33; ok33 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+19370, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok34 := true; ok34; ok34 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok35 := true; ok35; ok35 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok36 := true; ok36; ok36 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok37 := true; ok37; ok37 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok38 := true; ok38; ok38 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok39 := true; ok39; ok39 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok40 := true; ok40; ok40 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_ADD)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_ADD == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok41 := true; ok41; ok41 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_ADD].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok42 := true; ok42; ok42 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	XTclFixupForwardJump(tls, envPtr, bp, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp)).FcodeOffset)), 127)
	for ok43 := true; ok43; ok43 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+19372, int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok44 := true; ok44; ok44 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok45 := true; ok45; ok45 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok46 := true; ok46; ok46 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok47 := true; ok47; ok47 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok48 := true; ok48; ok48 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok49 := true; ok49; ok49 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok50 := true; ok50; ok50 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_RANGE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok51 := true; ok51; ok51 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_RANGE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok52 := true; ok52; ok52 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileNamespaceUpvarCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:1946:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var otherTokenPtr uintptr
	var localTokenPtr uintptr
	var localIndex int32
	var numWords int32
	var i int32

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Only compile [namespace upvar ...]: needs an even number of args, >=4

	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	if numWords%2 != 0 || numWords < 4 {
		return TCL_ERROR
	}

	// Push the namespace

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	// Loop over the (otherVar, thisVar) pairs. If any of the thisVar is not a
	// local variable, return an error so that the non-compiled command will
	// be called at runtime.

	localTokenPtr = tokenPtr
	for i = 2; i < numWords; i = i + 2 {
		otherTokenPtr = localTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(localTokenPtr)).FnumComponents+1)*24
		localTokenPtr = otherTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(otherTokenPtr)).FnumComponents+1)*24

		if (*Tcl_Token)(unsafe.Pointer(otherTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(otherTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(otherTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, otherTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(otherTokenPtr)).FnumComponents, envPtr)
		}

		localIndex = XTclLocalScalarFromToken(tls, localTokenPtr, envPtr)
		if localIndex < 0 {
			return TCL_ERROR
		}
		for ok14 := true; ok14; ok14 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NSUPVAR)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_NSUPVAR == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok15 := true; ok15; ok15 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_NSUPVAR].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - localIndex
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// Pop the namespace, and set the result to empty

	for ok17 := true; ok17; ok17 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok18 := true; ok18; ok18 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok19 := true; ok19; ok19 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok20 := true; ok20; ok20 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok21 := true; ok21; ok21 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok22 := true; ok22; ok22 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok23 := true; ok23; ok23 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok24 := true; ok24; ok24 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok25 := true; ok25; ok25 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok26 := true; ok26; ok26 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileNamespaceWhichCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2007:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var opt uintptr
	var idx int32

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 3 {
		return TCL_ERROR
	}
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	idx = 1

	// If there's an option, check that it's "-command". We don't handle
	// "-variable" (currently) and anything else is an error.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 3 {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
			return TCL_ERROR
		}
		opt = tokenPtr + uintptr(1)*24
		if (*Tcl_Token)(unsafe.Pointer(opt)).Fsize < 2 || (*Tcl_Token)(unsafe.Pointer(opt)).Fsize > 8 ||
			libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(opt)).Fstart, ts+16010, uint64((*Tcl_Token)(unsafe.Pointer(opt)).Fsize)) != 0 {
			return TCL_ERROR
		}
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		idx++
	}

	// Issue the bytecode.

	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(idx)*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(idx)*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RESOLVE_COMMAND)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_RESOLVE_COMMAND == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_RESOLVE_COMMAND].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileRegexpCmd --
//
//	Procedure called to compile the "regexp" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "regexp" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileRegexpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2071:1: */
	bp := tls.Alloc(220)
	defer tls.Free(220)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varTokenPtr uintptr                                              // Pointer to the Tcl_Token representing the
	// parse of the RE or string.
	var i int32
	var len int32
	var nocase int32
	// var exact int32 at bp+216, 4

	var sawLast int32
	var simple int32
	var str uintptr

	// We are only interested in compiling simple regexp cases. Currently
	// supported compile cases are:
	//   regexp ?-nocase? ?--? staticString $var
	//   regexp ?-nocase? ?--? {^staticString$} $var

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 {
		return TCL_ERROR
	}

	simple = 0
	nocase = 0
	sawLast = 0
	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr

	// We only look for -nocase and -- as options. Everything else gets pushed
	// to runtime execution. This is different than regexp's runtime option
	// handling, but satisfies our stricter needs.

	for i = 1; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2; i++ {
		varTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
			// Not a simple string, so punt to runtime.

			return TCL_ERROR
		}
		str = (*Tcl_Token)(unsafe.Pointer(varTokenPtr + 1*24)).Fstart
		len = (*Tcl_Token)(unsafe.Pointer(varTokenPtr + 1*24)).Fsize
		if len == 2 && int32(*(*int8)(unsafe.Pointer(str))) == '-' && int32(*(*int8)(unsafe.Pointer(str + 1))) == '-' {
			sawLast++
			i++
			break
		} else if len > 1 && libc.Xstrncmp(tls, str, ts+15557, uint64(len)) == 0 {
			nocase = 1
		} else {
			// Not an option we recognize.

			return TCL_ERROR
		}
	}

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-i != 2 {
		// We don't support capturing to variables.

		return TCL_ERROR
	}

	// Get the regexp string. If it is not a simple string or can't be
	// converted to a glob pattern, push the word for the INST_REGEXP.
	// Keep changes here in sync with TclCompileSwitchCmd Switch_Regexp.

	varTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24

	if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		// var ds Tcl_DString at bp, 216

		str = (*Tcl_Token)(unsafe.Pointer(varTokenPtr + 1*24)).Fstart
		len = (*Tcl_Token)(unsafe.Pointer(varTokenPtr + 1*24)).Fsize

		// If it has a '-', it could be an incorrectly formed regexp command.

		if int32(*(*int8)(unsafe.Pointer(str))) == '-' && !(sawLast != 0) {
			return TCL_ERROR
		}

		if len == 0 {
			// The semantics of regexp are always match on re == "".

			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			return TCL_OK
		}

		// Attempt to convert pattern to glob.  If successful, push the
		// converted pattern as a literal.

		if XTclReToGlob(tls, uintptr(0), (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart, len, bp, bp+216, uintptr(0)) ==
			TCL_OK {
			simple = 1
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring, (*Tcl_DString)(unsafe.Pointer(bp)).Flength, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			XTcl_DStringFree(tls, bp)
		}
	}

	if !(simple != 0) {
		if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok14 := true; ok14; ok14 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok15 := true; ok15; ok15 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok16 := true; ok16; ok16 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok17 := true; ok17; ok17 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok18 := true; ok18; ok18 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok19 := true; ok19; ok19 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok20 := true; ok20; ok20 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2)*8))
			XTclCompileTokens(tls, interp, varTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents, envPtr)
		}

	}

	// Push the string arg.

	varTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok21 := true; ok21; ok21 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok22 := true; ok22; ok22 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok23 := true; ok23; ok23 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok24 := true; ok24; ok24 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok25 := true; ok25; ok25 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok26 := true; ok26; ok26 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok27 := true; ok27; ok27 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1)*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1)*8))
		XTclCompileTokens(tls, interp, varTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents, envPtr)
	}

	if simple != 0 {
		if *(*int32)(unsafe.Pointer(bp + 216)) != 0 && !(nocase != 0) {
			for ok28 := true; ok28; ok28 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STR_EQ == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok29 := true; ok29; ok29 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STR_EQ].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok30 := true; ok30; ok30 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok31 := true; ok31; ok31 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_MATCH)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(nocase))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STR_MATCH == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok32 := true; ok32; ok32 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STR_MATCH].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - nocase
						}
						for ok33 := true; ok33; ok33 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	} else {
		// Pass correct RE compile flags.  We use only Int1 (8-bit), but
		// that handles all the flags we want to pass.
		// Don't use TCL_REG_NOSUB as we may have backrefs.

		var cflags int32 = TCL_REG_ADVANCED | func() int32 {
			if nocase != 0 {
				return TCL_REG_NOCASE
			}
			return 0
		}()

		for ok34 := true; ok34; ok34 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REGEXP)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(cflags))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REGEXP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok35 := true; ok35; ok35 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REGEXP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - cflags
					}
					for ok36 := true; ok36; ok36 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileRegsubCmd --
//
//	Procedure called to compile the "regsub" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "regsub" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileRegsubCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2236:1: */
	bp := tls.Alloc(228)
	defer tls.Free(228)

	// We only compile the case with [regsub -all] where the pattern is both
	// known at compile time and simple (i.e., no RE metacharacters). That is,
	// the pattern must be translatable into a glob like "*foo*" with no other
	// glob metacharacters inside it; there must be some "foo" in there too.
	// The substitution string must also be known at compile time and free of
	// metacharacters ("\digit" and "&"). Finally, there must not be a
	// variable mentioned in the [regsub] to write the result back to (because
	// we can't get the count of substitutions that would be the result in
	// that case). The key is that these are the conditions under which a
	// [string map] could be used instead, in particular a [string map] of the
	// form we can compile to bytecode.
	//
	// In short, we look for:
	//
	//   regsub -all [--] simpleRE string simpleReplacement
	//
	// The only optional part is the "--", and no other options are handled.

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var tokenPtr uintptr
	var stringTokenPtr uintptr
	var patternObj uintptr
	var replacementObj uintptr
	// var pattern Tcl_DString at bp, 216

	var bytes uintptr
	// var len int32 at bp+216, 4

	// var exact int32 at bp+220, 4

	// var quantified int32 at bp+224, 4

	var result int32
	var _objPtr uintptr
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _objIndexCopy1 int32
	var _delta4 int32
	var _delta5 int32
	var _objIndexCopy2 int32
	var _delta6 int32
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	patternObj = uintptr(0)
	replacementObj = uintptr(0)
	result = TCL_ERROR

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 5 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 6) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// Parse the "-all", which must be the first argument (other options not
	// supported, non-"-all" substitution we can't compile).

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD || (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize != 4 ||
		libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, ts+15464, uint64(4)) != 0) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	// Get the pattern into patternObj, checking for "--" in the process.

	XTcl_DStringInit(tls, bp)
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	patternObj = XTcl_NewObj(tls)
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, patternObj) != 0) {
		goto __3
	}
	goto done
__3:
	;
	if !(int32(*(*int8)(unsafe.Pointer(XTcl_GetString(tls, patternObj)))) == '-') {
		goto __4
	}
	if !(libc.Xstrcmp(tls, XTcl_GetString(tls, patternObj), ts+16430) != 0 ||
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 5) {
		goto __6
	}
	goto done
__6:
	;
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
__7:
	_objPtr = patternObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __10
	}
	XTclFreeObj(tls, _objPtr)
__10:
	;
	goto __8
__8:
	if 0 != 0 {
		goto __7
	}
	goto __9
__9:
	;
	patternObj = XTcl_NewObj(tls)
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, patternObj) != 0) {
		goto __11
	}
	goto done
__11:
	;
	goto __5
__4:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 6) {
		goto __12
	}
	goto done
__12:
	;
__5:
	;

	// Identify the code which produces the string to apply the substitution
	// to (stringTokenPtr), and the replacement string (into replacementObj).

	stringTokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	tokenPtr = stringTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).FnumComponents+1)*24
	replacementObj = XTcl_NewObj(tls)
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, replacementObj) != 0) {
		goto __13
	}
	goto done
__13:
	;

	// Next, higher-level checks. Is the RE a very simple glob? Is the
	// replacement "simple"?

	bytes = XTcl_GetStringFromObj(tls, patternObj, bp+216)
	if !(XTclReToGlob(tls, uintptr(0), bytes, *(*int32)(unsafe.Pointer(bp + 216)), bp, bp+220, bp+224) !=
		TCL_OK || *(*int32)(unsafe.Pointer(bp + 220)) != 0 || *(*int32)(unsafe.Pointer(bp + 224)) != 0) {
		goto __14
	}
	goto done
__14:
	;
	bytes = (*Tcl_DString)(unsafe.Pointer(bp)).Fstring
	if !(int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bytes, 1)))) != '*') {
		goto __15
	}
	goto done
__15:
	;
__16:
	if !(1 != 0) {
		goto __17
	}
	switch int32(*(*int8)(unsafe.Pointer(bytes))) {
	case '*':
		goto __19
	case 0:
		goto __20
	case '?':
		goto __21
	case '[':
		goto __22
	case '\\':
		goto __23
	}
	goto __18
__19:
	if !(int32(*(*int8)(unsafe.Pointer(bytes + 1))) == 0) {
		goto __24
	}
	// OK, we've proved there are no metacharacters except for the
	// '*' at each end.

	*(*int32)(unsafe.Pointer(bp + 216 /* len */)) = (*Tcl_DString)(unsafe.Pointer(bp)).Flength - 2
	if !(*(*int32)(unsafe.Pointer(bp + 216)) > 0) {
		goto __25
	}
	goto isSimpleGlob
__25:
	;

	// The pattern is "**"! I believe that should be impossible,
	// but we definitely can't handle that at all.
__24:
	;
__20:
__21:
__22:
__23:
	goto done
__18:
	;
	bytes++
	goto __16
__17:
	;
isSimpleGlob:
	bytes = XTcl_GetString(tls, replacementObj)
__26:
	if !(*(*int8)(unsafe.Pointer(bytes)) != 0) {
		goto __28
	}
	switch int32(*(*int8)(unsafe.Pointer(bytes))) {
	case '\\':
		goto __30
	case '&':
		goto __31
	}
	goto __29
__30:
__31:
	goto done
__29:
	;
	goto __27
__27:
	bytes++
	goto __26
	goto __28
__28:
	;

	// Proved the simplicity constraints! Time to issue the code.

	result = TCL_OK
	bytes = (*Tcl_DString)(unsafe.Pointer(bp)).Fstring + uintptr(1)
__32:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp + 216)), 0)
	if !(_objIndexCopy <= 255) {
		goto __35
	}
__37:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __40
	}
	XTclExpandCodeArray(tls, envPtr)
__40:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __41
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__41:
	;
__42:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __45
	}
	if !(_delta == -0x7fffffff-1) {
		goto __46
	}
	_delta = 1 - _objIndexCopy
__46:
	;
__47:
	if !(_delta < 0) {
		goto __50
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __51
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__51:
	;
__50:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
__45:
	;
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
	goto __38
__38:
	if 0 != 0 {
		goto __37
	}
	goto __39
__39:
	;
	goto __36
__35:
__52:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __55
	}
	XTclExpandCodeArray(tls, envPtr)
__55:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __56
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__56:
	;
__57:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __60
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __61
	}
	_delta1 = 1 - _objIndexCopy
__61:
	;
__62:
	if !(_delta1 < 0) {
		goto __65
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __66
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__66:
	;
__65:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
__60:
	;
	goto __58
__58:
	if 0 != 0 {
		goto __57
	}
	goto __59
__59:
	;
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
__36:
	;
	goto __33
__33:
	if 0 != 0 {
		goto __32
	}
	goto __34
__34:
	;
	bytes = XTcl_GetStringFromObj(tls, replacementObj, bp+216)
__67:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp + 216)), 0)
	if !(_objIndexCopy1 <= 255) {
		goto __70
	}
__72:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __75
	}
	XTclExpandCodeArray(tls, envPtr)
__75:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __76
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__76:
	;
__77:
	_delta2 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta2 != 0) {
		goto __80
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __81
	}
	_delta2 = 1 - _objIndexCopy1
__81:
	;
__82:
	if !(_delta2 < 0) {
		goto __85
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __86
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__86:
	;
__85:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __83
__83:
	if 0 != 0 {
		goto __82
	}
	goto __84
__84:
	;
__80:
	;
	goto __78
__78:
	if 0 != 0 {
		goto __77
	}
	goto __79
__79:
	;
	goto __73
__73:
	if 0 != 0 {
		goto __72
	}
	goto __74
__74:
	;
	goto __71
__70:
__87:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __90
	}
	XTclExpandCodeArray(tls, envPtr)
__90:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __91
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__91:
	;
__92:
	_delta3 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta3 != 0) {
		goto __95
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __96
	}
	_delta3 = 1 - _objIndexCopy1
__96:
	;
__97:
	if !(_delta3 < 0) {
		goto __100
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __101
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__101:
	;
__100:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __98
__98:
	if 0 != 0 {
		goto __97
	}
	goto __99
__99:
	;
__95:
	;
	goto __93
__93:
	if 0 != 0 {
		goto __92
	}
	goto __94
__94:
	;
	goto __88
__88:
	if 0 != 0 {
		goto __87
	}
	goto __89
__89:
	;
__71:
	;
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
	if !((*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __102
	}
__104:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy2 <= 255) {
		goto __107
	}
__109:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __112
	}
	XTclExpandCodeArray(tls, envPtr)
__112:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __113
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__113:
	;
__114:
	_delta4 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta4 != 0) {
		goto __117
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __118
	}
	_delta4 = 1 - _objIndexCopy2
__118:
	;
__119:
	if !(_delta4 < 0) {
		goto __122
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __123
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__123:
	;
__122:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __120
__120:
	if 0 != 0 {
		goto __119
	}
	goto __121
__121:
	;
__117:
	;
	goto __115
__115:
	if 0 != 0 {
		goto __114
	}
	goto __116
__116:
	;
	goto __110
__110:
	if 0 != 0 {
		goto __109
	}
	goto __111
__111:
	;
	goto __108
__107:
__124:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __127
	}
	XTclExpandCodeArray(tls, envPtr)
__127:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __128
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__128:
	;
__129:
	_delta5 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta5 != 0) {
		goto __132
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __133
	}
	_delta5 = 1 - _objIndexCopy2
__133:
	;
__134:
	if !(_delta5 < 0) {
		goto __137
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __138
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__138:
	;
__137:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __135
__135:
	if 0 != 0 {
		goto __134
	}
	goto __136
__136:
	;
__132:
	;
	goto __130
__130:
	if 0 != 0 {
		goto __129
	}
	goto __131
__131:
	;
	goto __125
__125:
	if 0 != 0 {
		goto __124
	}
	goto __126
__126:
	;
__108:
	;
	goto __105
__105:
	if 0 != 0 {
		goto __104
	}
	goto __106
__106:
	;
	goto __103
__102:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-2)*8))
	XTclCompileTokens(tls, interp, stringTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).FnumComponents, envPtr)
__103:
	;

__139:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __142
	}
	XTclExpandCodeArray(tls, envPtr)
__142:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_MAP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __143
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_MAP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__143:
	;
__144:
	_delta6 = XtclInstructionTable[INST_STR_MAP].FstackEffect
	if !(_delta6 != 0) {
		goto __147
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __148
	}
	_delta6 = 1 - 0
__148:
	;
__149:
	if !(_delta6 < 0) {
		goto __152
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __153
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__153:
	;
__152:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __150
__150:
	if 0 != 0 {
		goto __149
	}
	goto __151
__151:
	;
__147:
	;
	goto __145
__145:
	if 0 != 0 {
		goto __144
	}
	goto __146
__146:
	;
	goto __140
__140:
	if 0 != 0 {
		goto __139
	}
	goto __141
__141:
	;

done:
	XTcl_DStringFree(tls, bp)
	if !(patternObj != 0) {
		goto __154
	}
__155:
	_objPtr1 = patternObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __158
	}
	XTclFreeObj(tls, _objPtr1)
__158:
	;
	goto __156
__156:
	if 0 != 0 {
		goto __155
	}
	goto __157
__157:
	;
__154:
	;
	if !(replacementObj != 0) {
		goto __159
	}
__160:
	_objPtr2 = replacementObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __163
	}
	XTclFreeObj(tls, _objPtr2)
__163:
	;
	goto __161
__161:
	if 0 != 0 {
		goto __160
	}
	goto __162
__162:
	;
__159:
	;
	return result
}

//----------------------------------------------------------------------
//
// TclCompileReturnCmd --
//
//	Procedure called to compile the "return" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "return" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileReturnCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2411:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	// General syntax: [return ?-option value ...? ?result?]
	// An even number of words means an explicit result argument is present.
	// var level int32 at bp+12, 4

	// var code int32 at bp+8, 4

	var objc int32
	// var size int32 at bp+16, 4

	var status int32
	var numWords int32
	var explicitResult int32
	var numOptionWords int32
	// var returnOpts uintptr at bp, 8

	var objv uintptr
	var wordTokenPtr uintptr
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _objIndexCopy1 int32
	var optsTokenPtr uintptr
	var msgTokenPtr uintptr
	var _delta4 int32
	var _delta5 int32
	var _objIndexCopy2 int32
	var _delta6 int32
	var _delta7 int32
	var _objIndexCopy3 int32
	var range1 ExceptionRange
	var _objPtr uintptr
	var _delta8 int32
	// We have default return options and we're in a proc ...

	var index int32
	var enclosingCatch int32
	var _objPtr1 uintptr
	var _delta9 int32
	var _delta10 int32
	var _objIndexCopy4 int32
	var _delta11 int32
	var _delta12 int32
	var _delta13 int32
	var _objIndexCopy5 int32
	var _delta14 int32
	var _delta15 int32
	var _objIndexCopy6 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	status = TCL_OK
	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	explicitResult = libc.Bool32(0 == numWords%2)
	numOptionWords = numWords - 1 - explicitResult
	wordTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	// Check for special case which can always be compiled:
	//	    return -options <opts> <msg>
	// Unlike the normal [return] compilation, this version does everything at
	// runtime so it can handle arbitrary words and not just literals. Note
	// that if INST_RETURN_STK wasn't already needed for something else
	// ('finally' clause processing) this piece of code would not be present.

	if !(numWords == 4 && (*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD &&
		(*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fsize == 8 &&
		libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fstart, ts+19376, uint64(8)) == 0) {
		goto __1
	}
	optsTokenPtr = wordTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).FnumComponents+1)*24
	msgTokenPtr = optsTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(optsTokenPtr)).FnumComponents+1)*24

	if !((*Tcl_Token)(unsafe.Pointer(optsTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __2
	}
__4:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(optsTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(optsTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __7
	}
__9:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __12
	}
	XTclExpandCodeArray(tls, envPtr)
__12:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __13
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__13:
	;
__14:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __17
	}
	if !(_delta == -0x7fffffff-1) {
		goto __18
	}
	_delta = 1 - _objIndexCopy
__18:
	;
__19:
	if !(_delta < 0) {
		goto __22
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __23
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__23:
	;
__22:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
__17:
	;
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto __10
__10:
	if 0 != 0 {
		goto __9
	}
	goto __11
__11:
	;
	goto __8
__7:
__24:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __27
	}
	XTclExpandCodeArray(tls, envPtr)
__27:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __28
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__28:
	;
__29:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __32
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __33
	}
	_delta1 = 1 - _objIndexCopy
__33:
	;
__34:
	if !(_delta1 < 0) {
		goto __37
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __38
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__38:
	;
__37:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
__32:
	;
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
__8:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	goto __3
__2:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
	XTclCompileTokens(tls, interp, optsTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(optsTokenPtr)).FnumComponents, envPtr)
__3:
	;

	if !((*Tcl_Token)(unsafe.Pointer(msgTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __39
	}
__41:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(msgTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(msgTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy1 <= 255) {
		goto __44
	}
__46:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __49
	}
	XTclExpandCodeArray(tls, envPtr)
__49:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __50
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__50:
	;
__51:
	_delta2 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta2 != 0) {
		goto __54
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __55
	}
	_delta2 = 1 - _objIndexCopy1
__55:
	;
__56:
	if !(_delta2 < 0) {
		goto __59
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __60
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__60:
	;
__59:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __57
__57:
	if 0 != 0 {
		goto __56
	}
	goto __58
__58:
	;
__54:
	;
	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
	goto __47
__47:
	if 0 != 0 {
		goto __46
	}
	goto __48
__48:
	;
	goto __45
__44:
__61:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __64
	}
	XTclExpandCodeArray(tls, envPtr)
__64:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __65
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__65:
	;
__66:
	_delta3 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta3 != 0) {
		goto __69
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __70
	}
	_delta3 = 1 - _objIndexCopy1
__70:
	;
__71:
	if !(_delta3 < 0) {
		goto __74
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __75
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__75:
	;
__74:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __72
__72:
	if 0 != 0 {
		goto __71
	}
	goto __73
__73:
	;
__69:
	;
	goto __67
__67:
	if 0 != 0 {
		goto __66
	}
	goto __68
__68:
	;
	goto __62
__62:
	if 0 != 0 {
		goto __61
	}
	goto __63
__63:
	;
__45:
	;
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
	goto __40
__39:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 3*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 3*8))
	XTclCompileTokens(tls, interp, msgTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(msgTokenPtr)).FnumComponents, envPtr)
__40:
	;

	XTclEmitInvoke(tls, envPtr, INST_RETURN_STK, 0)
	return TCL_OK
__1:
	;

	// Allocate some working space.

	objv = XTclStackAlloc(tls, interp, int32(uint64(numOptionWords)*uint64(unsafe.Sizeof(uintptr(0)))))

	// Scan through the return options. If any are unknown at compile time,
	// there is no value in bytecompiling. Save the option values known in an
	// objv array for merging into a return options dictionary.
	//
	// TODO: There is potential for improvement if all option keys are known
	// at compile time and all option values relating to '-code' and '-level'
	// are known at compile time.

	objc = 0
__76:
	if !(objc < numOptionWords) {
		goto __78
	}
	*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)) = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FrefCount++
	if !!(XTclWordKnownAtCompileTime(tls, wordTokenPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8))) != 0) {
		goto __79
	}
	// Non-literal, so punt to run-time assembly of the dictionary.

__80:
	if !(objc >= 0) {
		goto __82
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FrefCount, 1) > 1) {
		goto __83
	}
	goto __84
__83:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __85
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Fbytes != XtclEmptyStringRep) {
		goto __87
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Fbytes)
__87:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Flength = -1
__88:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8))
	goto __89
__89:
	if 0 != 0 {
		goto __88
	}
	goto __90
__90:
	;
	goto __86
__85:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))
__86:
	;
__84:
	;

	goto __81
__81:
	objc--
	goto __80
	goto __82
__82:
	;
	XTclStackFree(tls, interp, objv)
	goto issueRuntimeReturn
__79:
	;
	wordTokenPtr = wordTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).FnumComponents+1)*24
	goto __77
__77:
	objc++
	goto __76
	goto __78
__78:
	;
	status = XTclMergeReturnOptions(tls, interp, objc, objv,
		bp, bp+8, bp+12)
__91:
	if !(libc.PreDecInt32(&objc, 1) >= 0) {
		goto __92
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FrefCount, 1) > 1) {
		goto __93
	}
	goto __94
__93:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __95
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Fbytes != XtclEmptyStringRep) {
		goto __97
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Fbytes)
__97:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Flength = -1
__98:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8))
	goto __99
__99:
	if 0 != 0 {
		goto __98
	}
	goto __100
__100:
	;
	goto __96
__95:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))
__96:
	;
__94:
	;

	goto __91
__92:
	;
	XTclStackFree(tls, interp, objv)
	if !(TCL_ERROR == status) {
		goto __101
	}
	// Something was bogus in the return options. Clear the error message,
	// and report back to the compiler that this must be interpreted at
	// runtime.

	XTcl_ResetResult(tls, interp)
	return TCL_ERROR
__101:
	;

	// All options are known at compile time, so we're going to bytecompile.
	// Emit instructions to push the result on the stack.

	if !(explicitResult != 0) {
		goto __102
	}
	if !((*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __104
	}
__106:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy2 <= 255) {
		goto __109
	}
__111:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __114
	}
	XTclExpandCodeArray(tls, envPtr)
__114:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __115
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__115:
	;
__116:
	_delta4 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta4 != 0) {
		goto __119
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __120
	}
	_delta4 = 1 - _objIndexCopy2
__120:
	;
__121:
	if !(_delta4 < 0) {
		goto __124
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __125
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__125:
	;
__124:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __122
__122:
	if 0 != 0 {
		goto __121
	}
	goto __123
__123:
	;
__119:
	;
	goto __117
__117:
	if 0 != 0 {
		goto __116
	}
	goto __118
__118:
	;
	goto __112
__112:
	if 0 != 0 {
		goto __111
	}
	goto __113
__113:
	;
	goto __110
__109:
__126:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __129
	}
	XTclExpandCodeArray(tls, envPtr)
__129:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __130
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__130:
	;
__131:
	_delta5 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta5 != 0) {
		goto __134
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __135
	}
	_delta5 = 1 - _objIndexCopy2
__135:
	;
__136:
	if !(_delta5 < 0) {
		goto __139
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __140
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__140:
	;
__139:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __137
__137:
	if 0 != 0 {
		goto __136
	}
	goto __138
__138:
	;
__134:
	;
	goto __132
__132:
	if 0 != 0 {
		goto __131
	}
	goto __133
__133:
	;
	goto __127
__127:
	if 0 != 0 {
		goto __126
	}
	goto __128
__128:
	;
__110:
	;
	goto __107
__107:
	if 0 != 0 {
		goto __106
	}
	goto __108
__108:
	;
	goto __105
__104:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(numWords-1)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(numWords-1)*8))
	XTclCompileTokens(tls, interp, wordTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).FnumComponents, envPtr)
__105:
	;

	goto __103
__102:
	// No explict result argument, so default result is empty string.

__141:
	_objIndexCopy3 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy3 <= 255) {
		goto __144
	}
__146:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __149
	}
	XTclExpandCodeArray(tls, envPtr)
__149:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __150
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__150:
	;
__151:
	_delta6 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta6 != 0) {
		goto __154
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __155
	}
	_delta6 = 1 - _objIndexCopy3
__155:
	;
__156:
	if !(_delta6 < 0) {
		goto __159
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __160
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__160:
	;
__159:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __157
__157:
	if 0 != 0 {
		goto __156
	}
	goto __158
__158:
	;
__154:
	;
	goto __152
__152:
	if 0 != 0 {
		goto __151
	}
	goto __153
__153:
	;
	goto __147
__147:
	if 0 != 0 {
		goto __146
	}
	goto __148
__148:
	;
	goto __145
__144:
__161:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __164
	}
	XTclExpandCodeArray(tls, envPtr)
__164:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __165
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__165:
	;
__166:
	_delta7 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta7 != 0) {
		goto __169
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __170
	}
	_delta7 = 1 - _objIndexCopy3
__170:
	;
__171:
	if !(_delta7 < 0) {
		goto __174
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __175
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__175:
	;
__174:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __172
__172:
	if 0 != 0 {
		goto __171
	}
	goto __173
__173:
	;
__169:
	;
	goto __167
__167:
	if 0 != 0 {
		goto __166
	}
	goto __168
__168:
	;
	goto __162
__162:
	if 0 != 0 {
		goto __161
	}
	goto __163
__163:
	;
__145:
	;
	goto __142
__142:
	if 0 != 0 {
		goto __141
	}
	goto __143
__143:
	;
__103:
	;

	// Check for optimization: When [return] is in a proc, and there's no
	// enclosing [catch], and there are no return options, then the INST_DONE
	// instruction is equivalent, and may be more efficient.

	if !(numOptionWords == 0 && (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr != uintptr(0)) {
		goto __176
	}
	// We have default return options and we're in a proc ...

	index = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext - 1
	enclosingCatch = 0

__177:
	if !(index >= 0) {
		goto __178
	}
	range1 = *(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(index)*28))

	if !(range1.Ftype == CATCH_EXCEPTION_RANGE &&
		range1.FcatchOffset == -1) {
		goto __179
	}
	enclosingCatch = 1
	goto __178
__179:
	;
	index--
	goto __177
__178:
	;
	if !!(enclosingCatch != 0) {
		goto __180
	}
	// ... and there is no enclosing catch. Issue the maximally
	// efficient exit instruction.

__181:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __184
	}
	XTclFreeObj(tls, _objPtr)
__184:
	;
	goto __182
__182:
	if 0 != 0 {
		goto __181
	}
	goto __183
__183:
	;
__185:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __188
	}
	XTclExpandCodeArray(tls, envPtr)
__188:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DONE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __189
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DONE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__189:
	;
__190:
	_delta8 = XtclInstructionTable[INST_DONE].FstackEffect
	if !(_delta8 != 0) {
		goto __193
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __194
	}
	_delta8 = 1 - 0
__194:
	;
__195:
	if !(_delta8 < 0) {
		goto __198
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __199
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__199:
	;
__198:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __196
__196:
	if 0 != 0 {
		goto __195
	}
	goto __197
__197:
	;
__193:
	;
	goto __191
__191:
	if 0 != 0 {
		goto __190
	}
	goto __192
__192:
	;
	goto __186
__186:
	if 0 != 0 {
		goto __185
	}
	goto __187
__187:
	;
__200:
	if !(1 < 0) {
		goto __203
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __204
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__204:
	;
__203:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
	goto __201
__201:
	if 0 != 0 {
		goto __200
	}
	goto __202
__202:
	;
	return TCL_OK
__180:
	;
__176:
	;

	// Optimize [return -level 0 $x].
	XTcl_DictObjSize(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* returnOpts */)), bp+16)
	if !(*(*int32)(unsafe.Pointer(bp + 16)) == 0 && *(*int32)(unsafe.Pointer(bp + 12)) == 0 && *(*int32)(unsafe.Pointer(bp + 8)) == TCL_OK) {
		goto __205
	}
__206:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __209
	}
	XTclFreeObj(tls, _objPtr1)
__209:
	;
	goto __207
__207:
	if 0 != 0 {
		goto __206
	}
	goto __208
__208:
	;
	return TCL_OK
__205:
	;

	// Could not use the optimization, so we push the return options dict, and
	// emit the INST_RETURN_IMM instruction with code and level as operands.

	sCompileReturnInternal(tls, envPtr, uint8(INST_RETURN_IMM), *(*int32)(unsafe.Pointer(bp + 8 /* code */)), *(*int32)(unsafe.Pointer(bp + 12 /* level */)), *(*uintptr)(unsafe.Pointer(bp /* returnOpts */)))
	return TCL_OK

issueRuntimeReturn:
	// Assemble the option dictionary (as a list as that's good enough).

	wordTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	objc = 1
__210:
	if !(objc <= numOptionWords) {
		goto __212
	}
	if !((*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __213
	}
__215:
	_objIndexCopy4 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy4 <= 255) {
		goto __218
	}
__220:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __223
	}
	XTclExpandCodeArray(tls, envPtr)
__223:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __224
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__224:
	;
__225:
	_delta9 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta9 != 0) {
		goto __228
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __229
	}
	_delta9 = 1 - _objIndexCopy4
__229:
	;
__230:
	if !(_delta9 < 0) {
		goto __233
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __234
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__234:
	;
__233:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __231
__231:
	if 0 != 0 {
		goto __230
	}
	goto __232
__232:
	;
__228:
	;
	goto __226
__226:
	if 0 != 0 {
		goto __225
	}
	goto __227
__227:
	;
	goto __221
__221:
	if 0 != 0 {
		goto __220
	}
	goto __222
__222:
	;
	goto __219
__218:
__235:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __238
	}
	XTclExpandCodeArray(tls, envPtr)
__238:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __239
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__239:
	;
__240:
	_delta10 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta10 != 0) {
		goto __243
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __244
	}
	_delta10 = 1 - _objIndexCopy4
__244:
	;
__245:
	if !(_delta10 < 0) {
		goto __248
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __249
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__249:
	;
__248:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __246
__246:
	if 0 != 0 {
		goto __245
	}
	goto __247
__247:
	;
__243:
	;
	goto __241
__241:
	if 0 != 0 {
		goto __240
	}
	goto __242
__242:
	;
	goto __236
__236:
	if 0 != 0 {
		goto __235
	}
	goto __237
__237:
	;
__219:
	;
	goto __216
__216:
	if 0 != 0 {
		goto __215
	}
	goto __217
__217:
	;
	goto __214
__213:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(objc)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(objc)*8))
	XTclCompileTokens(tls, interp, wordTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).FnumComponents, envPtr)
__214:
	;

	wordTokenPtr = wordTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).FnumComponents+1)*24
	goto __211
__211:
	objc++
	goto __210
	goto __212
__212:
	;
__250:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __253
	}
	XTclExpandCodeArray(tls, envPtr)
__253:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numOptionWords) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numOptionWords) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numOptionWords) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numOptionWords))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __254
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST == INST_START_CMD {
			return 1
		}
		return 0
	}()
__254:
	;
__255:
	_delta11 = XtclInstructionTable[INST_LIST].FstackEffect
	if !(_delta11 != 0) {
		goto __258
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __259
	}
	_delta11 = 1 - numOptionWords
__259:
	;
__260:
	if !(_delta11 < 0) {
		goto __263
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __264
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__264:
	;
__263:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __261
__261:
	if 0 != 0 {
		goto __260
	}
	goto __262
__262:
	;
__258:
	;
	goto __256
__256:
	if 0 != 0 {
		goto __255
	}
	goto __257
__257:
	;
	goto __251
__251:
	if 0 != 0 {
		goto __250
	}
	goto __252
__252:
	;

	// Push the result.

	if !(explicitResult != 0) {
		goto __265
	}
	if !((*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __267
	}
__269:
	_objIndexCopy5 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy5 <= 255) {
		goto __272
	}
__274:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __277
	}
	XTclExpandCodeArray(tls, envPtr)
__277:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __278
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__278:
	;
__279:
	_delta12 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta12 != 0) {
		goto __282
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __283
	}
	_delta12 = 1 - _objIndexCopy5
__283:
	;
__284:
	if !(_delta12 < 0) {
		goto __287
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __288
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__288:
	;
__287:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __285
__285:
	if 0 != 0 {
		goto __284
	}
	goto __286
__286:
	;
__282:
	;
	goto __280
__280:
	if 0 != 0 {
		goto __279
	}
	goto __281
__281:
	;
	goto __275
__275:
	if 0 != 0 {
		goto __274
	}
	goto __276
__276:
	;
	goto __273
__272:
__289:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __292
	}
	XTclExpandCodeArray(tls, envPtr)
__292:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __293
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__293:
	;
__294:
	_delta13 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta13 != 0) {
		goto __297
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __298
	}
	_delta13 = 1 - _objIndexCopy5
__298:
	;
__299:
	if !(_delta13 < 0) {
		goto __302
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __303
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__303:
	;
__302:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __300
__300:
	if 0 != 0 {
		goto __299
	}
	goto __301
__301:
	;
__297:
	;
	goto __295
__295:
	if 0 != 0 {
		goto __294
	}
	goto __296
__296:
	;
	goto __290
__290:
	if 0 != 0 {
		goto __289
	}
	goto __291
__291:
	;
__273:
	;
	goto __270
__270:
	if 0 != 0 {
		goto __269
	}
	goto __271
__271:
	;
	goto __268
__267:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(numWords-1)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(numWords-1)*8))
	XTclCompileTokens(tls, interp, wordTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).FnumComponents, envPtr)
__268:
	;

	goto __266
__265:
__304:
	_objIndexCopy6 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy6 <= 255) {
		goto __307
	}
__309:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __312
	}
	XTclExpandCodeArray(tls, envPtr)
__312:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __313
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__313:
	;
__314:
	_delta14 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta14 != 0) {
		goto __317
	}
	if !(_delta14 == -0x7fffffff-1) {
		goto __318
	}
	_delta14 = 1 - _objIndexCopy6
__318:
	;
__319:
	if !(_delta14 < 0) {
		goto __322
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __323
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__323:
	;
__322:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta14
	goto __320
__320:
	if 0 != 0 {
		goto __319
	}
	goto __321
__321:
	;
__317:
	;
	goto __315
__315:
	if 0 != 0 {
		goto __314
	}
	goto __316
__316:
	;
	goto __310
__310:
	if 0 != 0 {
		goto __309
	}
	goto __311
__311:
	;
	goto __308
__307:
__324:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __327
	}
	XTclExpandCodeArray(tls, envPtr)
__327:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __328
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__328:
	;
__329:
	_delta15 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta15 != 0) {
		goto __332
	}
	if !(_delta15 == -0x7fffffff-1) {
		goto __333
	}
	_delta15 = 1 - _objIndexCopy6
__333:
	;
__334:
	if !(_delta15 < 0) {
		goto __337
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __338
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__338:
	;
__337:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta15
	goto __335
__335:
	if 0 != 0 {
		goto __334
	}
	goto __336
__336:
	;
__332:
	;
	goto __330
__330:
	if 0 != 0 {
		goto __329
	}
	goto __331
__331:
	;
	goto __325
__325:
	if 0 != 0 {
		goto __324
	}
	goto __326
__326:
	;
__308:
	;
	goto __305
__305:
	if 0 != 0 {
		goto __304
	}
	goto __306
__306:
	;
__266:
	;

	// Issue the RETURN itself.

	XTclEmitInvoke(tls, envPtr, INST_RETURN_STK, 0)
	return TCL_OK
}

func sCompileReturnInternal(tls *libc.TLS, envPtr uintptr, op uint8, code int32, level int32, returnOpts uintptr) { /* tclCompCmdsGR.c:2599:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if level == 0 && (code == TCL_BREAK || code == TCL_CONTINUE) {
		var rangePtr uintptr
		// var exceptAux uintptr at bp, 8

		rangePtr = XTclGetInnermostExceptionRange(tls, envPtr, code, bp)
		if rangePtr != 0 && (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype == LOOP_EXCEPTION_RANGE {
			XTclCleanupStackForBreakContinue(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp /* exceptAux */)))
			if code == TCL_BREAK {
				XTclAddLoopBreakFixup(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp /* exceptAux */)))
			} else {
				XTclAddLoopContinueFixup(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp /* exceptAux */)))
			}
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = returnOpts
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			return
		}
	}

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objIndexCopy int32 = XTclAddLiteralObj(tls, envPtr, returnOpts, uintptr(0))
		if _objIndexCopy <= 255 {
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok3 := true; ok3; ok3 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok4 := true; ok4; ok4 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok6 := true; ok6; ok6 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok7 := true; ok7; ok7 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok8 := true; ok8; ok8 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = op
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(code) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(code) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(code) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(code))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if int32(op) == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok9 := true; ok9; ok9 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[op].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - code
				}
				for ok10 := true; ok10; ok10 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok11 := true; ok11; ok11 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(level) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(level) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(level) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(level))
	}
}

func XTclCompileSyntaxError(tls *libc.TLS, interp uintptr, envPtr uintptr) { /* tclCompCmdsGR.c:2629:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var msg uintptr = XTcl_GetObjResult(tls, interp)
	// var numBytes int32 at bp, 4

	var bytes uintptr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(msg)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, msg, bp)
	}()

	XTclErrorStackResetIf(tls, interp, bytes, *(*int32)(unsafe.Pointer(bp /* numBytes */)))
	for ok := true; ok; ok = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp)), 0)
		if _objIndexCopy <= 255 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok3 := true; ok3; ok3 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok6 := true; ok6; ok6 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	sCompileReturnInternal(tls, envPtr, uint8(INST_SYNTAX), TCL_ERROR, 0,
		XTclNoErrorStack(tls, interp, XTcl_GetReturnOptions(tls, interp, TCL_ERROR)))
	XTcl_ResetResult(tls, interp)
}

//----------------------------------------------------------------------
//
// TclCompileUpvarCmd --
//
//	Procedure called to compile the "upvar" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "upvar" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileUpvarCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2663:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var otherTokenPtr uintptr
	var localTokenPtr uintptr
	var localIndex int32
	var numWords int32
	var i int32
	var objPtr uintptr

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr == uintptr(0) {
		return TCL_ERROR
	}

	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	if numWords < 3 {
		return TCL_ERROR
	}

	// Push the frame index if it is known at compile time

	objPtr = XTcl_NewObj(tls)
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if XTclWordKnownAtCompileTime(tls, tokenPtr, objPtr) != 0 {
		// var framePtr uintptr at bp, 8

		var newTypePtr uintptr
		var typePtr uintptr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr

		// Attempt to convert to a level reference. Note that TclObjGetFrame
		// only changes the obj type when a conversion was successful.

		XTclObjGetFrame(tls, interp, objPtr, bp)
		newTypePtr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}

		if newTypePtr != typePtr {
			if numWords%2 != 0 {
				return TCL_ERROR
			}
			// TODO: Push the known value instead?
			if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
					if _objIndexCopy <= 255 {
						for ok2 := true; ok2; ok2 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok4 := true; ok4; ok4 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok5 := true; ok5; ok5 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok7 := true; ok7; ok7 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
			} else {
				(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
				(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
				XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
			}

			otherTokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
			i = 2
		} else {
			if !(numWords%2 != 0) {
				return TCL_ERROR
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
				if _objIndexCopy <= 255 {
					for ok9 := true; ok9; ok9 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok10 := true; ok10; ok10 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok11 := true; ok11; ok11 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok12 := true; ok12; ok12 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok13 := true; ok13; ok13 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok14 := true; ok14; ok14 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			otherTokenPtr = tokenPtr
			i = 1
		}
	} else {
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return TCL_ERROR
	}

	// Loop over the (otherVar, thisVar) pairs. If any of the thisVar is not a
	// local variable, return an error so that the non-compiled command will
	// be called at runtime.

__1:
	if !(i < numWords) {
		goto __3
	}
	{
		localTokenPtr = otherTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(otherTokenPtr)).FnumComponents+1)*24

		if (*Tcl_Token)(unsafe.Pointer(otherTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok16 := true; ok16; ok16 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(otherTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(otherTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok17 := true; ok17; ok17 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok18 := true; ok18; ok18 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok19 := true; ok19; ok19 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok20 := true; ok20; ok20 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok21 := true; ok21; ok21 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok22 := true; ok22; ok22 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, otherTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(otherTokenPtr)).FnumComponents, envPtr)
		}

		localIndex = XTclLocalScalarFromToken(tls, localTokenPtr, envPtr)
		if localIndex < 0 {
			return TCL_ERROR
		}
		for ok23 := true; ok23; ok23 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UPVAR)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_UPVAR == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok24 := true; ok24; ok24 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_UPVAR].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - localIndex
					}
					for ok25 := true; ok25; ok25 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}

	}
	goto __2
__2:
	i = i + 2
	otherTokenPtr = localTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(localTokenPtr)).FnumComponents+1)*24
	goto __1
	goto __3
__3:
	;

	// Pop the frame index, and set the result to empty

	for ok26 := true; ok26; ok26 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok27 := true; ok27; ok27 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok28 := true; ok28; ok28 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok29 := true; ok29; ok29 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok30 := true; ok30; ok30 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok31 := true; ok31; ok31 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok32 := true; ok32; ok32 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok33 := true; ok33; ok33 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok34 := true; ok34; ok34 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok35 := true; ok35; ok35 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileVariableCmd --
//
//	Procedure called to compile the "variable" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "variable" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileVariableCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2770:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varTokenPtr uintptr
	var valueTokenPtr uintptr
	var localIndex int32
	var numWords int32
	var i int32

	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	if numWords < 2 {
		return TCL_ERROR
	}

	// Bail out if not compiling a proc body

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Loop over the (var, value) pairs.

	valueTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	for i = 1; i < numWords; i = i + 2 {
		varTokenPtr = valueTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents+1)*24
		valueTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24

		localIndex = sIndexTailVarIfKnown(tls, interp, varTokenPtr, envPtr)

		if localIndex < 0 {
			return TCL_ERROR
		}

		// TODO: Consider what value can pass through the
		// IndexTailVarIfKnown() screen.  Full CompileWord()
		// likely does not apply here.  Push known value instead.
		if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, varTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents, envPtr)
		}

		for ok7 := true; ok7; ok7 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_VARIABLE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_VARIABLE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_VARIABLE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - localIndex
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}

		if i+1 < numWords {
			// A value has been given: set the variable, pop the value

			if (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
				for ok10 := true; ok10; ok10 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
					if _objIndexCopy <= 255 {
						for ok11 := true; ok11; ok11 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok12 := true; ok12; ok12 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok13 := true; ok13; ok13 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok14 := true; ok14; ok14 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok15 := true; ok15; ok15 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok16 := true; ok16; ok16 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
			} else {
				(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i+1)*4))
				(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i+1)*8))
				XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
			}

			if localIndex <= 255 {
				for ok17 := true; ok17; ok17 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok18 := true; ok18; ok18 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - localIndex
							}
							for ok19 := true; ok19; ok19 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok20 := true; ok20; ok20 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localIndex))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_SCALAR4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok21 := true; ok21; ok21 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - localIndex
							}
							for ok22 := true; ok22; ok22 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

			for ok23 := true; ok23; ok23 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_POP == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok24 := true; ok24; ok24 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok25 := true; ok25; ok25 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}

	// Set the result to empty

	for ok26 := true; ok26; ok26 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok27 := true; ok27; ok27 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok28 := true; ok28; ok28 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok29 := true; ok29; ok29 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok30 := true; ok30; ok30 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok31 := true; ok31; ok31 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok32 := true; ok32; ok32 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// IndexTailVarIfKnown --
//
//	Procedure used in compiling [global] and [variable] commands. It
//	inspects the variable name described by varTokenPtr and, if the tail
//	is known at compile time, defines a corresponding local variable.
//
// Results:
//	Returns the variable's index in the table of compiled locals if the
//	tail is known at compile time, or -1 otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sIndexTailVarIfKnown(tls *libc.TLS, interp uintptr, varTokenPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2855:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var tailPtr uintptr
	var tailName uintptr
	var p uintptr
	// var len int32 at bp, 4

	var n int32 = (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents
	var lastTokenPtr uintptr
	var full int32
	var localIndex int32

	// Determine if the tail is (a) known at compile time, and (b) not an
	// array element. Should any of these fail, return an error so that the
	// non-compiled command will be called at runtime.
	//
	// In order for the tail to be known at compile time, the last token in
	// the word has to be constant and contain "::" if it is not the only one.

	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr != 0 || (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr)).FvarFramePtr)).FlocalCachePtr != 0) {
		return -1
	}

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		tailPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(tailPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(tailPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(tailPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(tailPtr)).FtypePtr = uintptr(0)
	{
	}

	if XTclWordKnownAtCompileTime(tls, varTokenPtr, tailPtr) != 0 {
		full = 1
		lastTokenPtr = varTokenPtr
	} else {
		full = 0
		lastTokenPtr = varTokenPtr + uintptr(n)*24

		if (*Tcl_Token)(unsafe.Pointer(lastTokenPtr)).Ftype != TCL_TOKEN_TEXT {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = tailPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			return -1
		}
		XTcl_SetStringObj(tls, tailPtr, (*Tcl_Token)(unsafe.Pointer(lastTokenPtr)).Fstart, (*Tcl_Token)(unsafe.Pointer(lastTokenPtr)).Fsize)
	}

	tailName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(tailPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(tailPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(tailPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, tailPtr, bp)
	}()

	if *(*int32)(unsafe.Pointer(bp)) != 0 {
		if int32(*(*int8)(unsafe.Pointer(tailName + uintptr(*(*int32)(unsafe.Pointer(bp))) - uintptr(1)))) == ')' {
			// Possible array: bail out

			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr = tailPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			return -1
		}

		// Get the tail: immediately after the last '::'

		for p = tailName + uintptr(*(*int32)(unsafe.Pointer(bp))) - uintptr(1); p > tailName; p-- {
			if int32(*(*int8)(unsafe.Pointer(p))) == ':' && int32(*(*int8)(unsafe.Pointer(p - uintptr(1)))) == ':' {
				p++
				break
			}
		}
		if !(full != 0) && p == tailName {
			// No :: in the last component.

			for ok3 := true; ok3; ok3 = 0 != 0 {
				var _objPtr uintptr = tailPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			return -1
		}
		*(*int32)(unsafe.Pointer(bp /* len */)) -= int32((int64(p) - int64(tailName)) / 1)
		tailName = p
	}

	localIndex = XTclFindCompiledLocal(tls, tailName, *(*int32)(unsafe.Pointer(bp /* len */)), 1, envPtr)
	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _objPtr uintptr = tailPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return localIndex
}

// ----------------------------------------------------------------------
//
// TclCompileObjectNextCmd, TclCompileObjectSelfCmd --
//
//	Compilations of the TclOO utility commands [next] and [self].
//
// ----------------------------------------------------------------------

func XTclCompileObjectNextCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2944:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	var i int32

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 255 {
		return TCL_ERROR
	}

	for i = 0; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}
	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TCLOO_NEXT)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_TCLOO_NEXT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_TCLOO_NEXT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - i
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileObjectNextToCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2969:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	var i int32

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 255 {
		return TCL_ERROR
	}

	for i = 0; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}
	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TCLOO_NEXT_CLASS)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_TCLOO_NEXT_CLASS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_TCLOO_NEXT_CLASS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - i
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileObjectSelfCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsGR.c:2994:1: */
	var tokenPtr uintptr
	var subcmd uintptr
	var _delta int32
	var _delta1 int32
	var _delta2 int32
	var _delta3 int32
	// We only handle [self] and [self object] (which is the same operation).
	// These are the only very common operations on [self] for which
	// bytecoding is at all reasonable.

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 1) {
		goto __1
	}
	goto compileSelfObject
	goto __2
__1:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 2) {
		goto __3
	}
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD || (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize == 0) {
		goto __4
	}
	return TCL_ERROR
__4:
	;

	subcmd = tokenPtr + uintptr(1)*24
	if !(libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(subcmd)).Fstart, ts+19320, uint64((*Tcl_Token)(unsafe.Pointer(subcmd)).Fsize)) == 0) {
		goto __5
	}
	goto compileSelfObject
	goto __6
__5:
	if !(libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(subcmd)).Fstart, ts+19385, uint64((*Tcl_Token)(unsafe.Pointer(subcmd)).Fsize)) == 0) {
		goto __7
	}
	goto compileSelfNamespace
__7:
	;
__6:
	;
__3:
	;
__2:
	;

	// Can't compile; handle with runtime call.

	return TCL_ERROR

compileSelfObject:

	// This delegates the entire problem to a single opcode.

__8:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __11
	}
	XTclExpandCodeArray(tls, envPtr)
__11:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TCLOO_SELF)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __12
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_TCLOO_SELF == INST_START_CMD {
			return 1
		}
		return 0
	}()
__12:
	;
__13:
	_delta = XtclInstructionTable[INST_TCLOO_SELF].FstackEffect
	if !(_delta != 0) {
		goto __16
	}
	if !(_delta == -0x7fffffff-1) {
		goto __17
	}
	_delta = 1 - 0
__17:
	;
__18:
	if !(_delta < 0) {
		goto __21
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __22
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__22:
	;
__21:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
__16:
	;
	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	return TCL_OK

compileSelfNamespace:

	// This is formally only correct with TclOO methods as they are currently
	// implemented; it assumes that the current namespace is invariably when a
	// TclOO context is present is the object's namespace, and that's
	// technically only something that's a matter of current policy. But it
	// avoids creating another opcode, so that's all good!

__23:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __26
	}
	XTclExpandCodeArray(tls, envPtr)
__26:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TCLOO_SELF)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __27
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_TCLOO_SELF == INST_START_CMD {
			return 1
		}
		return 0
	}()
__27:
	;
__28:
	_delta1 = XtclInstructionTable[INST_TCLOO_SELF].FstackEffect
	if !(_delta1 != 0) {
		goto __31
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __32
	}
	_delta1 = 1 - 0
__32:
	;
__33:
	if !(_delta1 < 0) {
		goto __36
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __37
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__37:
	;
__36:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
__31:
	;
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
__38:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __41
	}
	XTclExpandCodeArray(tls, envPtr)
__41:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __42
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__42:
	;
__43:
	_delta2 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta2 != 0) {
		goto __46
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __47
	}
	_delta2 = 1 - 0
__47:
	;
__48:
	if !(_delta2 < 0) {
		goto __51
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __52
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__52:
	;
__51:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __49
__49:
	if 0 != 0 {
		goto __48
	}
	goto __50
__50:
	;
__46:
	;
	goto __44
__44:
	if 0 != 0 {
		goto __43
	}
	goto __45
__45:
	;
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
__53:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __56
	}
	XTclExpandCodeArray(tls, envPtr)
__56:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NS_CURRENT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __57
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_NS_CURRENT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__57:
	;
__58:
	_delta3 = XtclInstructionTable[INST_NS_CURRENT].FstackEffect
	if !(_delta3 != 0) {
		goto __61
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __62
	}
	_delta3 = 1 - 0
__62:
	;
__63:
	if !(_delta3 < 0) {
		goto __66
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __67
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__67:
	;
__66:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __64
__64:
	if 0 != 0 {
		goto __63
	}
	goto __65
__65:
	;
__61:
	;
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The structures below define the AuxData types defined in this file.

var XtclJumptableInfoType = AuxDataType{
	Fname:            ts + 19395,
	FdupProc:         0, // dupProc
	FfreeProc:        0, // freeProc
	FprintProc:       0, // printProc
	FdisassembleProc: 0, // disassembleProc
} /* tclCompCmdsSZ.c:74:19 */

// Shorthand macros for instruction issuing.

//----------------------------------------------------------------------
//
// TclCompileSetCmd --
//
//	Procedure called to compile the "set" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "set" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileSetCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:130:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varTokenPtr uintptr
	var valueTokenPtr uintptr
	var isAssignment int32
	// var isScalar int32 at bp+4, 4

	// var localIndex int32 at bp, 4

	var numWords int32

	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	if numWords != 2 && numWords != 3 {
		return TCL_ERROR
	}
	isAssignment = libc.Bool32(numWords == 3)

	// Decide if we can use a frame slot for the var/array name or if we need
	// to emit code to compute and push the name at runtime. We use a frame
	// slot (entry in the array of local vars) if we are compiling a procedure
	// body and if the name is simple text that does not include namespace
	// qualifiers.

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclPushVarName(tls, interp, varTokenPtr, envPtr, 0, bp, bp+4)

	// If we are doing an assignment, push the new value.

	if isAssignment != 0 {
		valueTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
		}

	}

	// Emit instructions to set/get the variable.

	if *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
		if *(*int32)(unsafe.Pointer(bp)) < 0 {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = func() uint8 {
					if isAssignment != 0 {
						return uint8(INST_STORE_STK)
					}
					return uint8(INST_LOAD_STK)
				}()
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if func() int32 {
							if isAssignment != 0 {
								return INST_STORE_STK
							}
							return INST_LOAD_STK
						}() == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok8 := true; ok8; ok8 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[func() int32 {
						if isAssignment != 0 {
							return INST_STORE_STK
						}
						return INST_LOAD_STK
					}()].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else if *(*int32)(unsafe.Pointer(bp)) <= 255 {
			for ok10 := true; ok10; ok10 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = func() uint8 {
					if isAssignment != 0 {
						return uint8(INST_STORE_SCALAR1)
					}
					return uint8(INST_LOAD_SCALAR1)
				}()
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if func() int32 {
							if isAssignment != 0 {
								return INST_STORE_SCALAR1
							}
							return INST_LOAD_SCALAR1
						}() == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok11 := true; ok11; ok11 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[func() int32 {
						if isAssignment != 0 {
							return INST_STORE_SCALAR1
						}
						return INST_LOAD_SCALAR1
					}()].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - *(*int32)(unsafe.Pointer(bp))
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok13 := true; ok13; ok13 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = func() uint8 {
					if isAssignment != 0 {
						return uint8(INST_STORE_SCALAR4)
					}
					return uint8(INST_LOAD_SCALAR4)
				}()
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if func() int32 {
							if isAssignment != 0 {
								return INST_STORE_SCALAR4
							}
							return INST_LOAD_SCALAR4
						}() == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok14 := true; ok14; ok14 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[func() int32 {
						if isAssignment != 0 {
							return INST_STORE_SCALAR4
						}
						return INST_LOAD_SCALAR4
					}()].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - *(*int32)(unsafe.Pointer(bp))
						}
						for ok15 := true; ok15; ok15 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	} else {
		if *(*int32)(unsafe.Pointer(bp)) < 0 {
			for ok16 := true; ok16; ok16 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = func() uint8 {
					if isAssignment != 0 {
						return uint8(INST_STORE_ARRAY_STK)
					}
					return uint8(INST_LOAD_ARRAY_STK)
				}()
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if func() int32 {
							if isAssignment != 0 {
								return INST_STORE_ARRAY_STK
							}
							return INST_LOAD_ARRAY_STK
						}() == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok17 := true; ok17; ok17 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[func() int32 {
						if isAssignment != 0 {
							return INST_STORE_ARRAY_STK
						}
						return INST_LOAD_ARRAY_STK
					}()].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok18 := true; ok18; ok18 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else if *(*int32)(unsafe.Pointer(bp)) <= 255 {
			for ok19 := true; ok19; ok19 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = func() uint8 {
					if isAssignment != 0 {
						return uint8(INST_STORE_ARRAY1)
					}
					return uint8(INST_LOAD_ARRAY1)
				}()
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if func() int32 {
							if isAssignment != 0 {
								return INST_STORE_ARRAY1
							}
							return INST_LOAD_ARRAY1
						}() == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok20 := true; ok20; ok20 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[func() int32 {
						if isAssignment != 0 {
							return INST_STORE_ARRAY1
						}
						return INST_LOAD_ARRAY1
					}()].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - *(*int32)(unsafe.Pointer(bp))
						}
						for ok21 := true; ok21; ok21 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok22 := true; ok22; ok22 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = func() uint8 {
					if isAssignment != 0 {
						return uint8(INST_STORE_ARRAY4)
					}
					return uint8(INST_LOAD_ARRAY4)
				}()
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if func() int32 {
							if isAssignment != 0 {
								return INST_STORE_ARRAY4
							}
							return INST_LOAD_ARRAY4
						}() == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok23 := true; ok23; ok23 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[func() int32 {
						if isAssignment != 0 {
							return INST_STORE_ARRAY4
						}
						return INST_LOAD_ARRAY4
					}()].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - *(*int32)(unsafe.Pointer(bp))
						}
						for ok24 := true; ok24; ok24 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileString*Cmd --
//
//	Procedures called to compile various subcommands of the "string"
//	command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "string" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileStringCatCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:224:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var i int32
	var numWords int32 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	var numArgs int32
	var wordTokenPtr uintptr
	var obj uintptr
	var folded uintptr

	// Trivial case, no arg

	if numWords < 2 {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		return TCL_OK
	}

	// General case: issue CONCAT1's (by chunks of 254 if needed), folding
	//        contiguous constants along the way

	numArgs = 0
	folded = uintptr(0)
	wordTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	for i = 1; i < numWords; i++ {
		obj = XTcl_NewObj(tls)
		if XTclWordKnownAtCompileTime(tls, wordTokenPtr, obj) != 0 {
			if folded != 0 {
				XTcl_AppendObjToObj(tls, folded, obj)
				for ok7 := true; ok7; ok7 = 0 != 0 {
					var _objPtr uintptr = obj
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			} else {
				folded = obj
			}
		} else {
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _objPtr uintptr = obj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			if folded != 0 {
				// var len int32 at bp, 4

				var bytes uintptr = XTcl_GetStringFromObj(tls, folded, bp)

				for ok9 := true; ok9; ok9 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp)), 0)
					if _objIndexCopy <= 255 {
						for ok10 := true; ok10; ok10 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok11 := true; ok11; ok11 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok12 := true; ok12; ok12 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok13 := true; ok13; ok13 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok14 := true; ok14; ok14 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok15 := true; ok15; ok15 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					var _objPtr uintptr = folded
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				folded = uintptr(0)
				numArgs++
			}
			if (*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
				for ok17 := true; ok17; ok17 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fsize, 0)
					if _objIndexCopy <= 255 {
						for ok18 := true; ok18; ok18 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok19 := true; ok19; ok19 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok20 := true; ok20; ok20 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok21 := true; ok21; ok21 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok22 := true; ok22; ok22 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok23 := true; ok23; ok23 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
			} else {
				(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
				(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
				XTclCompileTokens(tls, interp, wordTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).FnumComponents, envPtr)
			}

			numArgs++
			if numArgs >= 254 { // 254 to take care of the possible +1 of "folded" above
				for ok24 := true; ok24; ok24 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numArgs))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STR_CONCAT1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok25 := true; ok25; ok25 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - numArgs
							}
							for ok26 := true; ok26; ok26 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				numArgs = 1 // concat pushes 1 obj, the result
			}
		}
		wordTokenPtr = wordTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).FnumComponents+1)*24
	}
	if folded != 0 {
		// var len int32 at bp+4, 4

		var bytes uintptr = XTcl_GetStringFromObj(tls, folded, bp+4)

		for ok27 := true; ok27; ok27 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp + 4)), 0)
			if _objIndexCopy <= 255 {
				for ok28 := true; ok28; ok28 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok29 := true; ok29; ok29 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok30 := true; ok30; ok30 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok31 := true; ok31; ok31 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok32 := true; ok32; ok32 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok33 := true; ok33; ok33 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		for ok34 := true; ok34; ok34 = 0 != 0 {
			var _objPtr uintptr = folded
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		folded = uintptr(0)
		numArgs++
	}
	if numArgs > 1 {
		for ok35 := true; ok35; ok35 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numArgs))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_CONCAT1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok36 := true; ok36; ok36 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - numArgs
					}
					for ok37 := true; ok37; ok37 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	return TCL_OK
}

func XTclCompileStringCmpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:296:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	// We don't support any flags; the bytecode isn't that sophisticated.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	// Push the two operands onto the stack and then the test.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CMP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_CMP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_CMP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringEqualCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:328:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	// We don't support any flags; the bytecode isn't that sophisticated.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	// Push the two operands onto the stack and then the test.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_EQ == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_EQ].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringFirstCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:360:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	// We don't support any flags; the bytecode isn't that sophisticated.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	// Push the two operands onto the stack and then the test.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_FIND)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_FIND == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_FIND].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringLastCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:392:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	// We don't support any flags; the bytecode isn't that sophisticated.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	// Push the two operands onto the stack and then the test.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_FIND_LAST)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_FIND_LAST == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_FIND_LAST].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringIndexCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:424:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	// Push the two operands onto the stack and then the index operation.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_INDEX)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_INDEX == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_INDEX].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringIsCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:452:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var tokenPtr uintptr
	// var t int32 at bp, 4

	var range1 int32
	var allowEmpty int32
	var end int32
	var strClassType InstStringClassType
	var isClass uintptr
	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _delta7 int32
	var _delta8 int32
	var _objIndexCopy1 int32
	var _delta9 int32
	var _delta10 int32
	var _delta11 int32
	var _objIndexCopy2 int32
	var _delta12 int32
	var over int32
	var over2 int32
	var _delta13 int32
	var _delta14 int32
	var _delta15 int32
	var _delta16 int32
	var _objIndexCopy3 int32
	var _delta17 int32
	var _delta18 int32
	var _delta19 int32
	var _delta20 int32
	var _delta21 int32
	var _objIndexCopy4 int32
	var _delta22 int32
	var _delta23 int32
	var _delta24 int32
	var _delta25 int32
	var _delta26 int32
	var _objIndexCopy5 int32
	var _delta27 int32
	var _delta28 int32
	var _delta29 int32
	var _delta30 int32
	var _objIndexCopy6 int32
	var _delta31 int32
	var _delta32 int32
	var _delta33 int32
	var _delta34 int32
	var _delta35 int32
	var _objIndexCopy7 int32
	var _delta36 int32
	var _delta37 int32
	var _delta38 int32
	var _delta39 int32
	var _objIndexCopy8 int32
	var _delta40 int32
	var over1 int32
	var over21 int32
	var _delta41 int32
	var _delta42 int32
	var _delta43 int32
	var _objIndexCopy9 int32
	var _delta44 int32
	var _delta45 int32
	var _delta46 int32
	var _delta47 int32
	var _delta48 int32
	var _delta49 int32
	var _objIndexCopy10 int32
	var _delta50 int32
	var _delta51 int32
	var _delta52 int32
	var _delta53 int32
	var _delta54 int32
	var _delta55 int32
	var _objIndexCopy11 int32
	var _delta56 int32
	var _delta57 int32
	var _delta58 int32
	var _objIndexCopy12 int32
	var satisfied int32
	var isEmpty int32
	var _delta59 int32
	var _delta60 int32
	var _delta61 int32
	var _delta62 int32
	var _delta63 int32
	var _delta64 int32
	var _delta65 int32
	var _objIndexCopy13 int32
	var _delta66 int32
	var _delta67 int32
	var _delta68 int32
	var _delta69 int32
	var testNumType int32
	var _delta70 int32
	var _delta71 int32
	var _delta72 int32
	var _delta73 int32
	var _delta74 int32
	var _objIndexCopy14 int32
	var _delta75 int32
	var _delta76 int32
	var _delta77 int32
	var _objIndexCopy15 int32
	var _delta78 int32
	var _delta79 int32
	var _delta80 int32
	var _objIndexCopy16 int32
	var _delta81 int32
	var _delta82 int32
	var _delta83 int32
	var _delta84 int32
	var _delta85 int32
	var _delta86 int32
	var _delta87 int32
	var _delta88 int32
	var _delta89 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	allowEmpty = 0

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 6) {
		goto __1
	}
	return TCL_ERROR
__1:
	;
	isClass = XTcl_NewObj(tls)
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, isClass) != 0) {
		goto __2
	}
__4:
	_objPtr = isClass
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __7
	}
	XTclFreeObj(tls, _objPtr)
__7:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	return TCL_ERROR
	goto __3
__2:
	if !(XTcl_GetIndexFromObjStruct(tls, interp, isClass, uintptr(unsafe.Pointer(&isClasses1)), int32(unsafe.Sizeof(uintptr(0))), ts+16666, 0, bp) != TCL_OK) {
		goto __8
	}
__9:
	_objPtr1 = isClass
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __12
	}
	XTclFreeObj(tls, _objPtr1)
__12:
	;
	goto __10
__10:
	if 0 != 0 {
		goto __9
	}
	goto __11
__11:
	;
	XTclCompileSyntaxError(tls, interp, envPtr)
	return TCL_OK
__8:
	;
__3:
	;
__13:
	_objPtr2 = isClass
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __16
	}
	XTclFreeObj(tls, _objPtr2)
__16:
	;
	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;

	// Cannot handle the -failindex option at all, and that's the only legal
	// way to have more than 4 arguments.

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 && (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 4) {
		goto __17
	}
	return TCL_ERROR
__17:
	;

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 3) {
		goto __18
	}
	allowEmpty = 1
	goto __19
__18:
	if !!((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD && (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize > 1 && int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart))) == int32(*(*int8)(unsafe.Pointer(ts + 10548))) && libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, ts+10548, uint64((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize)) == 0) {
		goto __20
	}
	return TCL_ERROR
__20:
	;
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
__19:
	;

	// Compile the code. There are several main classes of check here.
	//	1. Character classes
	//	2. Booleans
	//	3. Integers
	//	4. Floats
	//	5. Lists

	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __21
	}
__23:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __26
	}
__28:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __31
	}
	XTclExpandCodeArray(tls, envPtr)
__31:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __32
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__32:
	;
__33:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __36
	}
	if !(_delta == -0x7fffffff-1) {
		goto __37
	}
	_delta = 1 - _objIndexCopy
__37:
	;
__38:
	if !(_delta < 0) {
		goto __41
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __42
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__42:
	;
__41:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
__36:
	;
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	goto __27
__26:
__43:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __46
	}
	XTclExpandCodeArray(tls, envPtr)
__46:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __47
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__47:
	;
__48:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __51
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __52
	}
	_delta1 = 1 - _objIndexCopy
__52:
	;
__53:
	if !(_delta1 < 0) {
		goto __56
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __57
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__57:
	;
__56:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
__51:
	;
	goto __49
__49:
	if 0 != 0 {
		goto __48
	}
	goto __50
__50:
	;
	goto __44
__44:
	if 0 != 0 {
		goto __43
	}
	goto __45
__45:
	;
__27:
	;
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
	goto __22
__21:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords-1)*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__22:
	;

	switch uint32(*(*int32)(unsafe.Pointer(bp /* t */))) {
	case uint32(0) /* STR_IS_ALNUM */ :
		goto __59
	case uint32(1) /* STR_IS_ALPHA */ :
		goto __60
	case uint32(2) /* STR_IS_ASCII */ :
		goto __61
	case uint32(3) /* STR_IS_CONTROL */ :
		goto __62
	case uint32(5) /* STR_IS_DIGIT */ :
		goto __63
	case uint32(9) /* STR_IS_GRAPH */ :
		goto __64
	case uint32(12) /* STR_IS_LOWER */ :
		goto __65
	case uint32(13) /* STR_IS_PRINT */ :
		goto __66
	case uint32(14) /* STR_IS_PUNCT */ :
		goto __67
	case uint32(15) /* STR_IS_SPACE */ :
		goto __68
	case uint32(17) /* STR_IS_UPPER */ :
		goto __69
	case uint32(19) /* STR_IS_WORD */ :
		goto __70
	case uint32(20) /* STR_IS_XDIGIT */ :
		goto __71

	case uint32(4) /* STR_IS_BOOL */ :
		goto __72
	case uint32(8) /* STR_IS_FALSE */ :
		goto __73
	case uint32(16) /* STR_IS_TRUE */ :
		goto __74

	case uint32(6) /* STR_IS_DOUBLE */ :
		goto __75

	case uint32(10) /* STR_IS_INT */ :
		goto __76
	case uint32(18) /* STR_IS_WIDE */ :
		goto __77
	case uint32(7) /* STR_IS_ENTIER */ :
		goto __78

	case uint32(11) /* STR_IS_LIST */ :
		goto __79
	}
	goto __58
__59:
	strClassType = STR_CLASS_ALNUM
	goto compileStrClass
__60:
	strClassType = STR_CLASS_ALPHA
	goto compileStrClass
__61:
	strClassType = STR_CLASS_ASCII
	goto compileStrClass
__62:
	strClassType = STR_CLASS_CONTROL
	goto compileStrClass
__63:
	strClassType = STR_CLASS_DIGIT
	goto compileStrClass
__64:
	strClassType = STR_CLASS_GRAPH
	goto compileStrClass
__65:
	strClassType = STR_CLASS_LOWER
	goto compileStrClass
__66:
	strClassType = STR_CLASS_PRINT
	goto compileStrClass
__67:
	strClassType = STR_CLASS_PUNCT
	goto compileStrClass
__68:
	strClassType = STR_CLASS_SPACE
	goto compileStrClass
__69:
	strClassType = STR_CLASS_UPPER
	goto compileStrClass
__70:
	strClassType = STR_CLASS_WORD
	goto compileStrClass
__71:
	strClassType = STR_CLASS_XDIGIT
compileStrClass:
	if !(allowEmpty != 0) {
		goto __80
	}
__82:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __85
	}
	XTclExpandCodeArray(tls, envPtr)
__85:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CLASS)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(strClassType)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __86
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_CLASS == INST_START_CMD {
			return 1
		}
		return 0
	}()
__86:
	;
__87:
	_delta2 = XtclInstructionTable[INST_STR_CLASS].FstackEffect
	if !(_delta2 != 0) {
		goto __90
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __91
	}
	_delta2 = int32(InstStringClassType(1) - strClassType)
__91:
	;
__92:
	if !(_delta2 < 0) {
		goto __95
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __96
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__96:
	;
__95:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __93
__93:
	if 0 != 0 {
		goto __92
	}
	goto __94
__94:
	;
__90:
	;
	goto __88
__88:
	if 0 != 0 {
		goto __87
	}
	goto __89
__89:
	;
	goto __83
__83:
	if 0 != 0 {
		goto __82
	}
	goto __84
__84:
	;
	goto __81
__80:

__97:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __100
	}
	XTclExpandCodeArray(tls, envPtr)
__100:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __101
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__101:
	;
__102:
	_delta3 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta3 != 0) {
		goto __105
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __106
	}
	_delta3 = 1 - 0
__106:
	;
__107:
	if !(_delta3 < 0) {
		goto __110
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __111
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__111:
	;
__110:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __108
__108:
	if 0 != 0 {
		goto __107
	}
	goto __109
__109:
	;
__105:
	;
	goto __103
__103:
	if 0 != 0 {
		goto __102
	}
	goto __104
__104:
	;
	goto __98
__98:
	if 0 != 0 {
		goto __97
	}
	goto __99
__99:
	;
__112:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __115
	}
	XTclExpandCodeArray(tls, envPtr)
__115:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CLASS)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(strClassType)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __116
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_CLASS == INST_START_CMD {
			return 1
		}
		return 0
	}()
__116:
	;
__117:
	_delta4 = XtclInstructionTable[INST_STR_CLASS].FstackEffect
	if !(_delta4 != 0) {
		goto __120
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __121
	}
	_delta4 = int32(InstStringClassType(1) - strClassType)
__121:
	;
__122:
	if !(_delta4 < 0) {
		goto __125
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __126
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__126:
	;
__125:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __123
__123:
	if 0 != 0 {
		goto __122
	}
	goto __124
__124:
	;
__120:
	;
	goto __118
__118:
	if 0 != 0 {
		goto __117
	}
	goto __119
__119:
	;
	goto __113
__113:
	if 0 != 0 {
		goto __112
	}
	goto __114
__114:
	;
	over = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__127:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __130
	}
	XTclExpandCodeArray(tls, envPtr)
__130:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __131
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__131:
	;
__132:
	_delta5 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta5 != 0) {
		goto __135
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __136
	}
	_delta5 = 1 - 0
__136:
	;
__137:
	if !(_delta5 < 0) {
		goto __140
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __141
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__141:
	;
__140:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __138
__138:
	if 0 != 0 {
		goto __137
	}
	goto __139
__139:
	;
__135:
	;
	goto __133
__133:
	if 0 != 0 {
		goto __132
	}
	goto __134
__134:
	;
	goto __128
__128:
	if 0 != 0 {
		goto __127
	}
	goto __129
__129:
	;
__142:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __145
	}
	XTclExpandCodeArray(tls, envPtr)
__145:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __146
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__146:
	;
__147:
	_delta6 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta6 != 0) {
		goto __150
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __151
	}
	_delta6 = 1 - 0
__151:
	;
__152:
	if !(_delta6 < 0) {
		goto __155
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __156
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__156:
	;
__155:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __153
__153:
	if 0 != 0 {
		goto __152
	}
	goto __154
__154:
	;
__150:
	;
	goto __148
__148:
	if 0 != 0 {
		goto __147
	}
	goto __149
__149:
	;
	goto __143
__143:
	if 0 != 0 {
		goto __142
	}
	goto __144
__144:
	;
__157:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy1 <= 255) {
		goto __160
	}
__162:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __165
	}
	XTclExpandCodeArray(tls, envPtr)
__165:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __166
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__166:
	;
__167:
	_delta7 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta7 != 0) {
		goto __170
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __171
	}
	_delta7 = 1 - _objIndexCopy1
__171:
	;
__172:
	if !(_delta7 < 0) {
		goto __175
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __176
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__176:
	;
__175:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __173
__173:
	if 0 != 0 {
		goto __172
	}
	goto __174
__174:
	;
__170:
	;
	goto __168
__168:
	if 0 != 0 {
		goto __167
	}
	goto __169
__169:
	;
	goto __163
__163:
	if 0 != 0 {
		goto __162
	}
	goto __164
__164:
	;
	goto __161
__160:
__177:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __180
	}
	XTclExpandCodeArray(tls, envPtr)
__180:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __181
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__181:
	;
__182:
	_delta8 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta8 != 0) {
		goto __185
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __186
	}
	_delta8 = 1 - _objIndexCopy1
__186:
	;
__187:
	if !(_delta8 < 0) {
		goto __190
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __191
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__191:
	;
__190:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __188
__188:
	if 0 != 0 {
		goto __187
	}
	goto __189
__189:
	;
__185:
	;
	goto __183
__183:
	if 0 != 0 {
		goto __182
	}
	goto __184
__184:
	;
	goto __178
__178:
	if 0 != 0 {
		goto __177
	}
	goto __179
__179:
	;
__161:
	;
	goto __158
__158:
	if 0 != 0 {
		goto __157
	}
	goto __159
__159:
	;
	over2 = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__192:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __195
	}
	XTclExpandCodeArray(tls, envPtr)
__195:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __196
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__196:
	;
__197:
	_delta9 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta9 != 0) {
		goto __200
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __201
	}
	_delta9 = 1 - 0
__201:
	;
__202:
	if !(_delta9 < 0) {
		goto __205
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __206
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__206:
	;
__205:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __203
__203:
	if 0 != 0 {
		goto __202
	}
	goto __204
__204:
	;
__200:
	;
	goto __198
__198:
	if 0 != 0 {
		goto __197
	}
	goto __199
__199:
	;
	goto __193
__193:
	if 0 != 0 {
		goto __192
	}
	goto __194
__194:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(over) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(over)))
__207:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy2 <= 255) {
		goto __210
	}
__212:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __215
	}
	XTclExpandCodeArray(tls, envPtr)
__215:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __216
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__216:
	;
__217:
	_delta10 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta10 != 0) {
		goto __220
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __221
	}
	_delta10 = 1 - _objIndexCopy2
__221:
	;
__222:
	if !(_delta10 < 0) {
		goto __225
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __226
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__226:
	;
__225:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __223
__223:
	if 0 != 0 {
		goto __222
	}
	goto __224
__224:
	;
__220:
	;
	goto __218
__218:
	if 0 != 0 {
		goto __217
	}
	goto __219
__219:
	;
	goto __213
__213:
	if 0 != 0 {
		goto __212
	}
	goto __214
__214:
	;
	goto __211
__210:
__227:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __230
	}
	XTclExpandCodeArray(tls, envPtr)
__230:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __231
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__231:
	;
__232:
	_delta11 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta11 != 0) {
		goto __235
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __236
	}
	_delta11 = 1 - _objIndexCopy2
__236:
	;
__237:
	if !(_delta11 < 0) {
		goto __240
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __241
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__241:
	;
__240:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __238
__238:
	if 0 != 0 {
		goto __237
	}
	goto __239
__239:
	;
__235:
	;
	goto __233
__233:
	if 0 != 0 {
		goto __232
	}
	goto __234
__234:
	;
	goto __228
__228:
	if 0 != 0 {
		goto __227
	}
	goto __229
__229:
	;
__211:
	;
	goto __208
__208:
	if 0 != 0 {
		goto __207
	}
	goto __209
__209:
	;
__242:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __245
	}
	XTclExpandCodeArray(tls, envPtr)
__245:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_NEQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __246
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_NEQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__246:
	;
__247:
	_delta12 = XtclInstructionTable[INST_STR_NEQ].FstackEffect
	if !(_delta12 != 0) {
		goto __250
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __251
	}
	_delta12 = 1 - 0
__251:
	;
__252:
	if !(_delta12 < 0) {
		goto __255
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __256
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__256:
	;
__255:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __253
__253:
	if 0 != 0 {
		goto __252
	}
	goto __254
__254:
	;
__250:
	;
	goto __248
__248:
	if 0 != 0 {
		goto __247
	}
	goto __249
__249:
	;
	goto __243
__243:
	if 0 != 0 {
		goto __242
	}
	goto __244
__244:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(over2) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(over2)))
__81:
	;
	return TCL_OK

__72:
__73:
__74:
__257:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __260
	}
	XTclExpandCodeArray(tls, envPtr)
__260:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TRY_CVT_TO_BOOLEAN)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __261
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_TRY_CVT_TO_BOOLEAN == INST_START_CMD {
			return 1
		}
		return 0
	}()
__261:
	;
__262:
	_delta13 = XtclInstructionTable[INST_TRY_CVT_TO_BOOLEAN].FstackEffect
	if !(_delta13 != 0) {
		goto __265
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __266
	}
	_delta13 = 1 - 0
__266:
	;
__267:
	if !(_delta13 < 0) {
		goto __270
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __271
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__271:
	;
__270:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __268
__268:
	if 0 != 0 {
		goto __267
	}
	goto __269
__269:
	;
__265:
	;
	goto __263
__263:
	if 0 != 0 {
		goto __262
	}
	goto __264
__264:
	;
	goto __258
__258:
	if 0 != 0 {
		goto __257
	}
	goto __259
__259:
	;
	switch *(*int32)(unsafe.Pointer(bp /* t */)) {

	case 4 /* STR_IS_BOOL */ :
		goto __273
	case 16 /* STR_IS_TRUE */ :
		goto __274
	case 8 /* STR_IS_FALSE */ :
		goto __275
	}
	goto __272

__273:
	if !(allowEmpty != 0) {
		goto __276
	}
	over1 = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__278:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __281
	}
	XTclExpandCodeArray(tls, envPtr)
__281:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __282
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__282:
	;
__283:
	_delta14 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta14 != 0) {
		goto __286
	}
	if !(_delta14 == -0x7fffffff-1) {
		goto __287
	}
	_delta14 = 1 - 0
__287:
	;
__288:
	if !(_delta14 < 0) {
		goto __291
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __292
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__292:
	;
__291:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta14
	goto __289
__289:
	if 0 != 0 {
		goto __288
	}
	goto __290
__290:
	;
__286:
	;
	goto __284
__284:
	if 0 != 0 {
		goto __283
	}
	goto __285
__285:
	;
	goto __279
__279:
	if 0 != 0 {
		goto __278
	}
	goto __280
__280:
	;
__293:
	_objIndexCopy3 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy3 <= 255) {
		goto __296
	}
__298:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __301
	}
	XTclExpandCodeArray(tls, envPtr)
__301:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __302
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__302:
	;
__303:
	_delta15 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta15 != 0) {
		goto __306
	}
	if !(_delta15 == -0x7fffffff-1) {
		goto __307
	}
	_delta15 = 1 - _objIndexCopy3
__307:
	;
__308:
	if !(_delta15 < 0) {
		goto __311
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __312
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__312:
	;
__311:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta15
	goto __309
__309:
	if 0 != 0 {
		goto __308
	}
	goto __310
__310:
	;
__306:
	;
	goto __304
__304:
	if 0 != 0 {
		goto __303
	}
	goto __305
__305:
	;
	goto __299
__299:
	if 0 != 0 {
		goto __298
	}
	goto __300
__300:
	;
	goto __297
__296:
__313:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __316
	}
	XTclExpandCodeArray(tls, envPtr)
__316:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __317
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__317:
	;
__318:
	_delta16 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta16 != 0) {
		goto __321
	}
	if !(_delta16 == -0x7fffffff-1) {
		goto __322
	}
	_delta16 = 1 - _objIndexCopy3
__322:
	;
__323:
	if !(_delta16 < 0) {
		goto __326
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __327
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__327:
	;
__326:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta16
	goto __324
__324:
	if 0 != 0 {
		goto __323
	}
	goto __325
__325:
	;
__321:
	;
	goto __319
__319:
	if 0 != 0 {
		goto __318
	}
	goto __320
__320:
	;
	goto __314
__314:
	if 0 != 0 {
		goto __313
	}
	goto __315
__315:
	;
__297:
	;
	goto __294
__294:
	if 0 != 0 {
		goto __293
	}
	goto __295
__295:
	;
__328:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __331
	}
	XTclExpandCodeArray(tls, envPtr)
__331:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __332
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_EQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__332:
	;
__333:
	_delta17 = XtclInstructionTable[INST_STR_EQ].FstackEffect
	if !(_delta17 != 0) {
		goto __336
	}
	if !(_delta17 == -0x7fffffff-1) {
		goto __337
	}
	_delta17 = 1 - 0
__337:
	;
__338:
	if !(_delta17 < 0) {
		goto __341
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __342
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__342:
	;
__341:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta17
	goto __339
__339:
	if 0 != 0 {
		goto __338
	}
	goto __340
__340:
	;
__336:
	;
	goto __334
__334:
	if 0 != 0 {
		goto __333
	}
	goto __335
__335:
	;
	goto __329
__329:
	if 0 != 0 {
		goto __328
	}
	goto __330
__330:
	;
	over21 = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__343:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __346
	}
	XTclExpandCodeArray(tls, envPtr)
__346:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __347
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__347:
	;
__348:
	_delta18 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta18 != 0) {
		goto __351
	}
	if !(_delta18 == -0x7fffffff-1) {
		goto __352
	}
	_delta18 = 1 - 0
__352:
	;
__353:
	if !(_delta18 < 0) {
		goto __356
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __357
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__357:
	;
__356:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta18
	goto __354
__354:
	if 0 != 0 {
		goto __353
	}
	goto __355
__355:
	;
__351:
	;
	goto __349
__349:
	if 0 != 0 {
		goto __348
	}
	goto __350
__350:
	;
	goto __344
__344:
	if 0 != 0 {
		goto __343
	}
	goto __345
__345:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(over1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(over1)))
__358:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __361
	}
	XTclExpandCodeArray(tls, envPtr)
__361:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __362
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__362:
	;
__363:
	_delta19 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta19 != 0) {
		goto __366
	}
	if !(_delta19 == -0x7fffffff-1) {
		goto __367
	}
	_delta19 = 1 - 0
__367:
	;
__368:
	if !(_delta19 < 0) {
		goto __371
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __372
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__372:
	;
__371:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta19
	goto __369
__369:
	if 0 != 0 {
		goto __368
	}
	goto __370
__370:
	;
__366:
	;
	goto __364
__364:
	if 0 != 0 {
		goto __363
	}
	goto __365
__365:
	;
	goto __359
__359:
	if 0 != 0 {
		goto __358
	}
	goto __360
__360:
	;
__373:
	_objIndexCopy4 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy4 <= 255) {
		goto __376
	}
__378:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __381
	}
	XTclExpandCodeArray(tls, envPtr)
__381:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __382
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__382:
	;
__383:
	_delta20 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta20 != 0) {
		goto __386
	}
	if !(_delta20 == -0x7fffffff-1) {
		goto __387
	}
	_delta20 = 1 - _objIndexCopy4
__387:
	;
__388:
	if !(_delta20 < 0) {
		goto __391
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __392
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__392:
	;
__391:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta20
	goto __389
__389:
	if 0 != 0 {
		goto __388
	}
	goto __390
__390:
	;
__386:
	;
	goto __384
__384:
	if 0 != 0 {
		goto __383
	}
	goto __385
__385:
	;
	goto __379
__379:
	if 0 != 0 {
		goto __378
	}
	goto __380
__380:
	;
	goto __377
__376:
__393:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __396
	}
	XTclExpandCodeArray(tls, envPtr)
__396:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __397
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__397:
	;
__398:
	_delta21 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta21 != 0) {
		goto __401
	}
	if !(_delta21 == -0x7fffffff-1) {
		goto __402
	}
	_delta21 = 1 - _objIndexCopy4
__402:
	;
__403:
	if !(_delta21 < 0) {
		goto __406
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __407
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__407:
	;
__406:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta21
	goto __404
__404:
	if 0 != 0 {
		goto __403
	}
	goto __405
__405:
	;
__401:
	;
	goto __399
__399:
	if 0 != 0 {
		goto __398
	}
	goto __400
__400:
	;
	goto __394
__394:
	if 0 != 0 {
		goto __393
	}
	goto __395
__395:
	;
__377:
	;
	goto __374
__374:
	if 0 != 0 {
		goto __373
	}
	goto __375
__375:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(over21) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(over21)))
	goto __277
__276:
__408:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __411
	}
	XTclExpandCodeArray(tls, envPtr)
__411:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __412
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__412:
	;
__413:
	_delta22 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta22 != 0) {
		goto __416
	}
	if !(_delta22 == -0x7fffffff-1) {
		goto __417
	}
	_delta22 = 1 - 2
__417:
	;
__418:
	if !(_delta22 < 0) {
		goto __421
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __422
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__422:
	;
__421:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta22
	goto __419
__419:
	if 0 != 0 {
		goto __418
	}
	goto __420
__420:
	;
__416:
	;
	goto __414
__414:
	if 0 != 0 {
		goto __413
	}
	goto __415
__415:
	;
	goto __409
__409:
	if 0 != 0 {
		goto __408
	}
	goto __410
__410:
	;
__423:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __426
	}
	XTclExpandCodeArray(tls, envPtr)
__426:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __427
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__427:
	;
__428:
	_delta23 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta23 != 0) {
		goto __431
	}
	if !(_delta23 == -0x7fffffff-1) {
		goto __432
	}
	_delta23 = 1 - 0
__432:
	;
__433:
	if !(_delta23 < 0) {
		goto __436
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __437
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__437:
	;
__436:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta23
	goto __434
__434:
	if 0 != 0 {
		goto __433
	}
	goto __435
__435:
	;
__431:
	;
	goto __429
__429:
	if 0 != 0 {
		goto __428
	}
	goto __430
__430:
	;
	goto __424
__424:
	if 0 != 0 {
		goto __423
	}
	goto __425
__425:
	;
__277:
	;
	return TCL_OK
__274:
	over1 = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__438:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __441
	}
	XTclExpandCodeArray(tls, envPtr)
__441:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __442
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__442:
	;
__443:
	_delta24 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta24 != 0) {
		goto __446
	}
	if !(_delta24 == -0x7fffffff-1) {
		goto __447
	}
	_delta24 = 1 - 0
__447:
	;
__448:
	if !(_delta24 < 0) {
		goto __451
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __452
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__452:
	;
__451:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta24
	goto __449
__449:
	if 0 != 0 {
		goto __448
	}
	goto __450
__450:
	;
__446:
	;
	goto __444
__444:
	if 0 != 0 {
		goto __443
	}
	goto __445
__445:
	;
	goto __439
__439:
	if 0 != 0 {
		goto __438
	}
	goto __440
__440:
	;
	if !(allowEmpty != 0) {
		goto __453
	}
__455:
	_objIndexCopy5 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy5 <= 255) {
		goto __458
	}
__460:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __463
	}
	XTclExpandCodeArray(tls, envPtr)
__463:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __464
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__464:
	;
__465:
	_delta25 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta25 != 0) {
		goto __468
	}
	if !(_delta25 == -0x7fffffff-1) {
		goto __469
	}
	_delta25 = 1 - _objIndexCopy5
__469:
	;
__470:
	if !(_delta25 < 0) {
		goto __473
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __474
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__474:
	;
__473:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta25
	goto __471
__471:
	if 0 != 0 {
		goto __470
	}
	goto __472
__472:
	;
__468:
	;
	goto __466
__466:
	if 0 != 0 {
		goto __465
	}
	goto __467
__467:
	;
	goto __461
__461:
	if 0 != 0 {
		goto __460
	}
	goto __462
__462:
	;
	goto __459
__458:
__475:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __478
	}
	XTclExpandCodeArray(tls, envPtr)
__478:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __479
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__479:
	;
__480:
	_delta26 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta26 != 0) {
		goto __483
	}
	if !(_delta26 == -0x7fffffff-1) {
		goto __484
	}
	_delta26 = 1 - _objIndexCopy5
__484:
	;
__485:
	if !(_delta26 < 0) {
		goto __488
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __489
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__489:
	;
__488:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta26
	goto __486
__486:
	if 0 != 0 {
		goto __485
	}
	goto __487
__487:
	;
__483:
	;
	goto __481
__481:
	if 0 != 0 {
		goto __480
	}
	goto __482
__482:
	;
	goto __476
__476:
	if 0 != 0 {
		goto __475
	}
	goto __477
__477:
	;
__459:
	;
	goto __456
__456:
	if 0 != 0 {
		goto __455
	}
	goto __457
__457:
	;
__490:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __493
	}
	XTclExpandCodeArray(tls, envPtr)
__493:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __494
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_EQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__494:
	;
__495:
	_delta27 = XtclInstructionTable[INST_STR_EQ].FstackEffect
	if !(_delta27 != 0) {
		goto __498
	}
	if !(_delta27 == -0x7fffffff-1) {
		goto __499
	}
	_delta27 = 1 - 0
__499:
	;
__500:
	if !(_delta27 < 0) {
		goto __503
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __504
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__504:
	;
__503:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta27
	goto __501
__501:
	if 0 != 0 {
		goto __500
	}
	goto __502
__502:
	;
__498:
	;
	goto __496
__496:
	if 0 != 0 {
		goto __495
	}
	goto __497
__497:
	;
	goto __491
__491:
	if 0 != 0 {
		goto __490
	}
	goto __492
__492:
	;
	goto __454
__453:
__505:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __508
	}
	XTclExpandCodeArray(tls, envPtr)
__508:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __509
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__509:
	;
__510:
	_delta28 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta28 != 0) {
		goto __513
	}
	if !(_delta28 == -0x7fffffff-1) {
		goto __514
	}
	_delta28 = 1 - 0
__514:
	;
__515:
	if !(_delta28 < 0) {
		goto __518
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __519
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__519:
	;
__518:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta28
	goto __516
__516:
	if 0 != 0 {
		goto __515
	}
	goto __517
__517:
	;
__513:
	;
	goto __511
__511:
	if 0 != 0 {
		goto __510
	}
	goto __512
__512:
	;
	goto __506
__506:
	if 0 != 0 {
		goto __505
	}
	goto __507
__507:
	;
__520:
	_objIndexCopy6 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy6 <= 255) {
		goto __523
	}
__525:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __528
	}
	XTclExpandCodeArray(tls, envPtr)
__528:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __529
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__529:
	;
__530:
	_delta29 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta29 != 0) {
		goto __533
	}
	if !(_delta29 == -0x7fffffff-1) {
		goto __534
	}
	_delta29 = 1 - _objIndexCopy6
__534:
	;
__535:
	if !(_delta29 < 0) {
		goto __538
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __539
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__539:
	;
__538:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta29
	goto __536
__536:
	if 0 != 0 {
		goto __535
	}
	goto __537
__537:
	;
__533:
	;
	goto __531
__531:
	if 0 != 0 {
		goto __530
	}
	goto __532
__532:
	;
	goto __526
__526:
	if 0 != 0 {
		goto __525
	}
	goto __527
__527:
	;
	goto __524
__523:
__540:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __543
	}
	XTclExpandCodeArray(tls, envPtr)
__543:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __544
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__544:
	;
__545:
	_delta30 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta30 != 0) {
		goto __548
	}
	if !(_delta30 == -0x7fffffff-1) {
		goto __549
	}
	_delta30 = 1 - _objIndexCopy6
__549:
	;
__550:
	if !(_delta30 < 0) {
		goto __553
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __554
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__554:
	;
__553:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta30
	goto __551
__551:
	if 0 != 0 {
		goto __550
	}
	goto __552
__552:
	;
__548:
	;
	goto __546
__546:
	if 0 != 0 {
		goto __545
	}
	goto __547
__547:
	;
	goto __541
__541:
	if 0 != 0 {
		goto __540
	}
	goto __542
__542:
	;
__524:
	;
	goto __521
__521:
	if 0 != 0 {
		goto __520
	}
	goto __522
__522:
	;
__454:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(over1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(over1)))
__555:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __558
	}
	XTclExpandCodeArray(tls, envPtr)
__558:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LNOT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __559
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LNOT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__559:
	;
__560:
	_delta31 = XtclInstructionTable[INST_LNOT].FstackEffect
	if !(_delta31 != 0) {
		goto __563
	}
	if !(_delta31 == -0x7fffffff-1) {
		goto __564
	}
	_delta31 = 1 - 0
__564:
	;
__565:
	if !(_delta31 < 0) {
		goto __568
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __569
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__569:
	;
__568:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta31
	goto __566
__566:
	if 0 != 0 {
		goto __565
	}
	goto __567
__567:
	;
__563:
	;
	goto __561
__561:
	if 0 != 0 {
		goto __560
	}
	goto __562
__562:
	;
	goto __556
__556:
	if 0 != 0 {
		goto __555
	}
	goto __557
__557:
	;
__570:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __573
	}
	XTclExpandCodeArray(tls, envPtr)
__573:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LNOT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __574
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LNOT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__574:
	;
__575:
	_delta32 = XtclInstructionTable[INST_LNOT].FstackEffect
	if !(_delta32 != 0) {
		goto __578
	}
	if !(_delta32 == -0x7fffffff-1) {
		goto __579
	}
	_delta32 = 1 - 0
__579:
	;
__580:
	if !(_delta32 < 0) {
		goto __583
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __584
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__584:
	;
__583:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta32
	goto __581
__581:
	if 0 != 0 {
		goto __580
	}
	goto __582
__582:
	;
__578:
	;
	goto __576
__576:
	if 0 != 0 {
		goto __575
	}
	goto __577
__577:
	;
	goto __571
__571:
	if 0 != 0 {
		goto __570
	}
	goto __572
__572:
	;
	return TCL_OK
__275:
	over1 = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__585:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __588
	}
	XTclExpandCodeArray(tls, envPtr)
__588:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __589
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__589:
	;
__590:
	_delta33 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta33 != 0) {
		goto __593
	}
	if !(_delta33 == -0x7fffffff-1) {
		goto __594
	}
	_delta33 = 1 - 0
__594:
	;
__595:
	if !(_delta33 < 0) {
		goto __598
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __599
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__599:
	;
__598:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta33
	goto __596
__596:
	if 0 != 0 {
		goto __595
	}
	goto __597
__597:
	;
__593:
	;
	goto __591
__591:
	if 0 != 0 {
		goto __590
	}
	goto __592
__592:
	;
	goto __586
__586:
	if 0 != 0 {
		goto __585
	}
	goto __587
__587:
	;
	if !(allowEmpty != 0) {
		goto __600
	}
__602:
	_objIndexCopy7 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy7 <= 255) {
		goto __605
	}
__607:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __610
	}
	XTclExpandCodeArray(tls, envPtr)
__610:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __611
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__611:
	;
__612:
	_delta34 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta34 != 0) {
		goto __615
	}
	if !(_delta34 == -0x7fffffff-1) {
		goto __616
	}
	_delta34 = 1 - _objIndexCopy7
__616:
	;
__617:
	if !(_delta34 < 0) {
		goto __620
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __621
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__621:
	;
__620:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta34
	goto __618
__618:
	if 0 != 0 {
		goto __617
	}
	goto __619
__619:
	;
__615:
	;
	goto __613
__613:
	if 0 != 0 {
		goto __612
	}
	goto __614
__614:
	;
	goto __608
__608:
	if 0 != 0 {
		goto __607
	}
	goto __609
__609:
	;
	goto __606
__605:
__622:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __625
	}
	XTclExpandCodeArray(tls, envPtr)
__625:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __626
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__626:
	;
__627:
	_delta35 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta35 != 0) {
		goto __630
	}
	if !(_delta35 == -0x7fffffff-1) {
		goto __631
	}
	_delta35 = 1 - _objIndexCopy7
__631:
	;
__632:
	if !(_delta35 < 0) {
		goto __635
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __636
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__636:
	;
__635:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta35
	goto __633
__633:
	if 0 != 0 {
		goto __632
	}
	goto __634
__634:
	;
__630:
	;
	goto __628
__628:
	if 0 != 0 {
		goto __627
	}
	goto __629
__629:
	;
	goto __623
__623:
	if 0 != 0 {
		goto __622
	}
	goto __624
__624:
	;
__606:
	;
	goto __603
__603:
	if 0 != 0 {
		goto __602
	}
	goto __604
__604:
	;
__637:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __640
	}
	XTclExpandCodeArray(tls, envPtr)
__640:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_NEQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __641
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_NEQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__641:
	;
__642:
	_delta36 = XtclInstructionTable[INST_STR_NEQ].FstackEffect
	if !(_delta36 != 0) {
		goto __645
	}
	if !(_delta36 == -0x7fffffff-1) {
		goto __646
	}
	_delta36 = 1 - 0
__646:
	;
__647:
	if !(_delta36 < 0) {
		goto __650
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __651
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__651:
	;
__650:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta36
	goto __648
__648:
	if 0 != 0 {
		goto __647
	}
	goto __649
__649:
	;
__645:
	;
	goto __643
__643:
	if 0 != 0 {
		goto __642
	}
	goto __644
__644:
	;
	goto __638
__638:
	if 0 != 0 {
		goto __637
	}
	goto __639
__639:
	;
	goto __601
__600:
__652:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __655
	}
	XTclExpandCodeArray(tls, envPtr)
__655:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __656
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__656:
	;
__657:
	_delta37 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta37 != 0) {
		goto __660
	}
	if !(_delta37 == -0x7fffffff-1) {
		goto __661
	}
	_delta37 = 1 - 0
__661:
	;
__662:
	if !(_delta37 < 0) {
		goto __665
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __666
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__666:
	;
__665:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta37
	goto __663
__663:
	if 0 != 0 {
		goto __662
	}
	goto __664
__664:
	;
__660:
	;
	goto __658
__658:
	if 0 != 0 {
		goto __657
	}
	goto __659
__659:
	;
	goto __653
__653:
	if 0 != 0 {
		goto __652
	}
	goto __654
__654:
	;
__667:
	_objIndexCopy8 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy8 <= 255) {
		goto __670
	}
__672:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __675
	}
	XTclExpandCodeArray(tls, envPtr)
__675:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __676
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__676:
	;
__677:
	_delta38 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta38 != 0) {
		goto __680
	}
	if !(_delta38 == -0x7fffffff-1) {
		goto __681
	}
	_delta38 = 1 - _objIndexCopy8
__681:
	;
__682:
	if !(_delta38 < 0) {
		goto __685
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __686
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__686:
	;
__685:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta38
	goto __683
__683:
	if 0 != 0 {
		goto __682
	}
	goto __684
__684:
	;
__680:
	;
	goto __678
__678:
	if 0 != 0 {
		goto __677
	}
	goto __679
__679:
	;
	goto __673
__673:
	if 0 != 0 {
		goto __672
	}
	goto __674
__674:
	;
	goto __671
__670:
__687:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __690
	}
	XTclExpandCodeArray(tls, envPtr)
__690:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __691
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__691:
	;
__692:
	_delta39 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta39 != 0) {
		goto __695
	}
	if !(_delta39 == -0x7fffffff-1) {
		goto __696
	}
	_delta39 = 1 - _objIndexCopy8
__696:
	;
__697:
	if !(_delta39 < 0) {
		goto __700
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __701
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__701:
	;
__700:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta39
	goto __698
__698:
	if 0 != 0 {
		goto __697
	}
	goto __699
__699:
	;
__695:
	;
	goto __693
__693:
	if 0 != 0 {
		goto __692
	}
	goto __694
__694:
	;
	goto __688
__688:
	if 0 != 0 {
		goto __687
	}
	goto __689
__689:
	;
__671:
	;
	goto __668
__668:
	if 0 != 0 {
		goto __667
	}
	goto __669
__669:
	;
__601:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(over1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(over1)))
__702:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __705
	}
	XTclExpandCodeArray(tls, envPtr)
__705:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LNOT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __706
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LNOT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__706:
	;
__707:
	_delta40 = XtclInstructionTable[INST_LNOT].FstackEffect
	if !(_delta40 != 0) {
		goto __710
	}
	if !(_delta40 == -0x7fffffff-1) {
		goto __711
	}
	_delta40 = 1 - 0
__711:
	;
__712:
	if !(_delta40 < 0) {
		goto __715
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __716
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__716:
	;
__715:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta40
	goto __713
__713:
	if 0 != 0 {
		goto __712
	}
	goto __714
__714:
	;
__710:
	;
	goto __708
__708:
	if 0 != 0 {
		goto __707
	}
	goto __709
__709:
	;
	goto __703
__703:
	if 0 != 0 {
		goto __702
	}
	goto __704
__704:
	;
	return TCL_OK
__272:
	;
	goto __58

__75:

	if !(allowEmpty != 0) {
		goto __717
	}
__719:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __722
	}
	XTclExpandCodeArray(tls, envPtr)
__722:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __723
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__723:
	;
__724:
	_delta41 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta41 != 0) {
		goto __727
	}
	if !(_delta41 == -0x7fffffff-1) {
		goto __728
	}
	_delta41 = 1 - 0
__728:
	;
__729:
	if !(_delta41 < 0) {
		goto __732
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __733
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__733:
	;
__732:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta41
	goto __730
__730:
	if 0 != 0 {
		goto __729
	}
	goto __731
__731:
	;
__727:
	;
	goto __725
__725:
	if 0 != 0 {
		goto __724
	}
	goto __726
__726:
	;
	goto __720
__720:
	if 0 != 0 {
		goto __719
	}
	goto __721
__721:
	;
__734:
	_objIndexCopy9 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy9 <= 255) {
		goto __737
	}
__739:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __742
	}
	XTclExpandCodeArray(tls, envPtr)
__742:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __743
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__743:
	;
__744:
	_delta42 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta42 != 0) {
		goto __747
	}
	if !(_delta42 == -0x7fffffff-1) {
		goto __748
	}
	_delta42 = 1 - _objIndexCopy9
__748:
	;
__749:
	if !(_delta42 < 0) {
		goto __752
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __753
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__753:
	;
__752:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta42
	goto __750
__750:
	if 0 != 0 {
		goto __749
	}
	goto __751
__751:
	;
__747:
	;
	goto __745
__745:
	if 0 != 0 {
		goto __744
	}
	goto __746
__746:
	;
	goto __740
__740:
	if 0 != 0 {
		goto __739
	}
	goto __741
__741:
	;
	goto __738
__737:
__754:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __757
	}
	XTclExpandCodeArray(tls, envPtr)
__757:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __758
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__758:
	;
__759:
	_delta43 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta43 != 0) {
		goto __762
	}
	if !(_delta43 == -0x7fffffff-1) {
		goto __763
	}
	_delta43 = 1 - _objIndexCopy9
__763:
	;
__764:
	if !(_delta43 < 0) {
		goto __767
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __768
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__768:
	;
__767:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta43
	goto __765
__765:
	if 0 != 0 {
		goto __764
	}
	goto __766
__766:
	;
__762:
	;
	goto __760
__760:
	if 0 != 0 {
		goto __759
	}
	goto __761
__761:
	;
	goto __755
__755:
	if 0 != 0 {
		goto __754
	}
	goto __756
__756:
	;
__738:
	;
	goto __735
__735:
	if 0 != 0 {
		goto __734
	}
	goto __736
__736:
	;
__769:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __772
	}
	XTclExpandCodeArray(tls, envPtr)
__772:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __773
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_EQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__773:
	;
__774:
	_delta44 = XtclInstructionTable[INST_STR_EQ].FstackEffect
	if !(_delta44 != 0) {
		goto __777
	}
	if !(_delta44 == -0x7fffffff-1) {
		goto __778
	}
	_delta44 = 1 - 0
__778:
	;
__779:
	if !(_delta44 < 0) {
		goto __782
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __783
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__783:
	;
__782:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta44
	goto __780
__780:
	if 0 != 0 {
		goto __779
	}
	goto __781
__781:
	;
__777:
	;
	goto __775
__775:
	if 0 != 0 {
		goto __774
	}
	goto __776
__776:
	;
	goto __770
__770:
	if 0 != 0 {
		goto __769
	}
	goto __771
__771:
	;
	isEmpty = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__784:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __787
	}
	XTclExpandCodeArray(tls, envPtr)
__787:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __788
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__788:
	;
__789:
	_delta45 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta45 != 0) {
		goto __792
	}
	if !(_delta45 == -0x7fffffff-1) {
		goto __793
	}
	_delta45 = 1 - 0
__793:
	;
__794:
	if !(_delta45 < 0) {
		goto __797
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __798
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__798:
	;
__797:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta45
	goto __795
__795:
	if 0 != 0 {
		goto __794
	}
	goto __796
__796:
	;
__792:
	;
	goto __790
__790:
	if 0 != 0 {
		goto __789
	}
	goto __791
__791:
	;
	goto __785
__785:
	if 0 != 0 {
		goto __784
	}
	goto __786
__786:
	;
__799:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __802
	}
	XTclExpandCodeArray(tls, envPtr)
__802:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NUM_TYPE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __803
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_NUM_TYPE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__803:
	;
__804:
	_delta46 = XtclInstructionTable[INST_NUM_TYPE].FstackEffect
	if !(_delta46 != 0) {
		goto __807
	}
	if !(_delta46 == -0x7fffffff-1) {
		goto __808
	}
	_delta46 = 1 - 0
__808:
	;
__809:
	if !(_delta46 < 0) {
		goto __812
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __813
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__813:
	;
__812:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta46
	goto __810
__810:
	if 0 != 0 {
		goto __809
	}
	goto __811
__811:
	;
__807:
	;
	goto __805
__805:
	if 0 != 0 {
		goto __804
	}
	goto __806
__806:
	;
	goto __800
__800:
	if 0 != 0 {
		goto __799
	}
	goto __801
__801:
	;
	satisfied = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__814:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __817
	}
	XTclExpandCodeArray(tls, envPtr)
__817:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __818
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__818:
	;
__819:
	_delta47 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta47 != 0) {
		goto __822
	}
	if !(_delta47 == -0x7fffffff-1) {
		goto __823
	}
	_delta47 = 1 - 0
__823:
	;
__824:
	if !(_delta47 < 0) {
		goto __827
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __828
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__828:
	;
__827:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta47
	goto __825
__825:
	if 0 != 0 {
		goto __824
	}
	goto __826
__826:
	;
__822:
	;
	goto __820
__820:
	if 0 != 0 {
		goto __819
	}
	goto __821
__821:
	;
	goto __815
__815:
	if 0 != 0 {
		goto __814
	}
	goto __816
__816:
	;
__829:
	_objIndexCopy10 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy10 <= 255) {
		goto __832
	}
__834:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __837
	}
	XTclExpandCodeArray(tls, envPtr)
__837:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy10))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __838
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__838:
	;
__839:
	_delta48 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta48 != 0) {
		goto __842
	}
	if !(_delta48 == -0x7fffffff-1) {
		goto __843
	}
	_delta48 = 1 - _objIndexCopy10
__843:
	;
__844:
	if !(_delta48 < 0) {
		goto __847
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __848
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__848:
	;
__847:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta48
	goto __845
__845:
	if 0 != 0 {
		goto __844
	}
	goto __846
__846:
	;
__842:
	;
	goto __840
__840:
	if 0 != 0 {
		goto __839
	}
	goto __841
__841:
	;
	goto __835
__835:
	if 0 != 0 {
		goto __834
	}
	goto __836
__836:
	;
	goto __833
__832:
__849:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __852
	}
	XTclExpandCodeArray(tls, envPtr)
__852:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy10) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy10) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy10) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy10))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __853
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__853:
	;
__854:
	_delta49 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta49 != 0) {
		goto __857
	}
	if !(_delta49 == -0x7fffffff-1) {
		goto __858
	}
	_delta49 = 1 - _objIndexCopy10
__858:
	;
__859:
	if !(_delta49 < 0) {
		goto __862
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __863
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__863:
	;
__862:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta49
	goto __860
__860:
	if 0 != 0 {
		goto __859
	}
	goto __861
__861:
	;
__857:
	;
	goto __855
__855:
	if 0 != 0 {
		goto __854
	}
	goto __856
__856:
	;
	goto __850
__850:
	if 0 != 0 {
		goto __849
	}
	goto __851
__851:
	;
__833:
	;
	goto __830
__830:
	if 0 != 0 {
		goto __829
	}
	goto __831
__831:
	;
	end = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__864:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __867
	}
	XTclExpandCodeArray(tls, envPtr)
__867:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __868
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__868:
	;
__869:
	_delta50 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta50 != 0) {
		goto __872
	}
	if !(_delta50 == -0x7fffffff-1) {
		goto __873
	}
	_delta50 = 1 - 0
__873:
	;
__874:
	if !(_delta50 < 0) {
		goto __877
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __878
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__878:
	;
__877:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta50
	goto __875
__875:
	if 0 != 0 {
		goto __874
	}
	goto __876
__876:
	;
__872:
	;
	goto __870
__870:
	if 0 != 0 {
		goto __869
	}
	goto __871
__871:
	;
	goto __865
__865:
	if 0 != 0 {
		goto __864
	}
	goto __866
__866:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(isEmpty) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(isEmpty)))
__879:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __882
	}
	XTclExpandCodeArray(tls, envPtr)
__882:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __883
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__883:
	;
__884:
	_delta51 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta51 != 0) {
		goto __887
	}
	if !(_delta51 == -0x7fffffff-1) {
		goto __888
	}
	_delta51 = 1 - 0
__888:
	;
__889:
	if !(_delta51 < 0) {
		goto __892
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __893
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__893:
	;
__892:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta51
	goto __890
__890:
	if 0 != 0 {
		goto __889
	}
	goto __891
__891:
	;
__887:
	;
	goto __885
__885:
	if 0 != 0 {
		goto __884
	}
	goto __886
__886:
	;
	goto __880
__880:
	if 0 != 0 {
		goto __879
	}
	goto __881
__881:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(satisfied) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(satisfied)))
	goto __718
__717:
__894:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __897
	}
	XTclExpandCodeArray(tls, envPtr)
__897:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NUM_TYPE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __898
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_NUM_TYPE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__898:
	;
__899:
	_delta52 = XtclInstructionTable[INST_NUM_TYPE].FstackEffect
	if !(_delta52 != 0) {
		goto __902
	}
	if !(_delta52 == -0x7fffffff-1) {
		goto __903
	}
	_delta52 = 1 - 0
__903:
	;
__904:
	if !(_delta52 < 0) {
		goto __907
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __908
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__908:
	;
__907:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta52
	goto __905
__905:
	if 0 != 0 {
		goto __904
	}
	goto __906
__906:
	;
__902:
	;
	goto __900
__900:
	if 0 != 0 {
		goto __899
	}
	goto __901
__901:
	;
	goto __895
__895:
	if 0 != 0 {
		goto __894
	}
	goto __896
__896:
	;
	satisfied = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__909:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __912
	}
	XTclExpandCodeArray(tls, envPtr)
__912:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __913
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__913:
	;
__914:
	_delta53 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta53 != 0) {
		goto __917
	}
	if !(_delta53 == -0x7fffffff-1) {
		goto __918
	}
	_delta53 = 1 - 0
__918:
	;
__919:
	if !(_delta53 < 0) {
		goto __922
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __923
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__923:
	;
__922:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta53
	goto __920
__920:
	if 0 != 0 {
		goto __919
	}
	goto __921
__921:
	;
__917:
	;
	goto __915
__915:
	if 0 != 0 {
		goto __914
	}
	goto __916
__916:
	;
	goto __910
__910:
	if 0 != 0 {
		goto __909
	}
	goto __911
__911:
	;
__924:
	_objIndexCopy11 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy11 <= 255) {
		goto __927
	}
__929:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __932
	}
	XTclExpandCodeArray(tls, envPtr)
__932:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy11))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __933
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__933:
	;
__934:
	_delta54 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta54 != 0) {
		goto __937
	}
	if !(_delta54 == -0x7fffffff-1) {
		goto __938
	}
	_delta54 = 1 - _objIndexCopy11
__938:
	;
__939:
	if !(_delta54 < 0) {
		goto __942
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __943
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__943:
	;
__942:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta54
	goto __940
__940:
	if 0 != 0 {
		goto __939
	}
	goto __941
__941:
	;
__937:
	;
	goto __935
__935:
	if 0 != 0 {
		goto __934
	}
	goto __936
__936:
	;
	goto __930
__930:
	if 0 != 0 {
		goto __929
	}
	goto __931
__931:
	;
	goto __928
__927:
__944:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __947
	}
	XTclExpandCodeArray(tls, envPtr)
__947:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy11) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy11) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy11) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy11))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __948
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__948:
	;
__949:
	_delta55 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta55 != 0) {
		goto __952
	}
	if !(_delta55 == -0x7fffffff-1) {
		goto __953
	}
	_delta55 = 1 - _objIndexCopy11
__953:
	;
__954:
	if !(_delta55 < 0) {
		goto __957
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __958
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__958:
	;
__957:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta55
	goto __955
__955:
	if 0 != 0 {
		goto __954
	}
	goto __956
__956:
	;
__952:
	;
	goto __950
__950:
	if 0 != 0 {
		goto __949
	}
	goto __951
__951:
	;
	goto __945
__945:
	if 0 != 0 {
		goto __944
	}
	goto __946
__946:
	;
__928:
	;
	goto __925
__925:
	if 0 != 0 {
		goto __924
	}
	goto __926
__926:
	;
	end = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__959:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __962
	}
	XTclExpandCodeArray(tls, envPtr)
__962:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __963
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__963:
	;
__964:
	_delta56 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta56 != 0) {
		goto __967
	}
	if !(_delta56 == -0x7fffffff-1) {
		goto __968
	}
	_delta56 = 1 - 0
__968:
	;
__969:
	if !(_delta56 < 0) {
		goto __972
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __973
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__973:
	;
__972:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta56
	goto __970
__970:
	if 0 != 0 {
		goto __969
	}
	goto __971
__971:
	;
__967:
	;
	goto __965
__965:
	if 0 != 0 {
		goto __964
	}
	goto __966
__966:
	;
	goto __960
__960:
	if 0 != 0 {
		goto __959
	}
	goto __961
__961:
	;
__974:
	if !(-1 < 0) {
		goto __977
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __978
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__978:
	;
__977:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	goto __975
__975:
	if 0 != 0 {
		goto __974
	}
	goto __976
__976:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(satisfied) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(satisfied)))
__718:
	;
__979:
	_objIndexCopy12 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy12 <= 255) {
		goto __982
	}
__984:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __987
	}
	XTclExpandCodeArray(tls, envPtr)
__987:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy12))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __988
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__988:
	;
__989:
	_delta57 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta57 != 0) {
		goto __992
	}
	if !(_delta57 == -0x7fffffff-1) {
		goto __993
	}
	_delta57 = 1 - _objIndexCopy12
__993:
	;
__994:
	if !(_delta57 < 0) {
		goto __997
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __998
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__998:
	;
__997:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta57
	goto __995
__995:
	if 0 != 0 {
		goto __994
	}
	goto __996
__996:
	;
__992:
	;
	goto __990
__990:
	if 0 != 0 {
		goto __989
	}
	goto __991
__991:
	;
	goto __985
__985:
	if 0 != 0 {
		goto __984
	}
	goto __986
__986:
	;
	goto __983
__982:
__999:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1002
	}
	XTclExpandCodeArray(tls, envPtr)
__1002:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy12) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy12) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy12) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy12))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1003
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1003:
	;
__1004:
	_delta58 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta58 != 0) {
		goto __1007
	}
	if !(_delta58 == -0x7fffffff-1) {
		goto __1008
	}
	_delta58 = 1 - _objIndexCopy12
__1008:
	;
__1009:
	if !(_delta58 < 0) {
		goto __1012
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1013
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1013:
	;
__1012:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta58
	goto __1010
__1010:
	if 0 != 0 {
		goto __1009
	}
	goto __1011
__1011:
	;
__1007:
	;
	goto __1005
__1005:
	if 0 != 0 {
		goto __1004
	}
	goto __1006
__1006:
	;
	goto __1000
__1000:
	if 0 != 0 {
		goto __999
	}
	goto __1001
__1001:
	;
__983:
	;
	goto __980
__980:
	if 0 != 0 {
		goto __979
	}
	goto __981
__981:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(end) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(end)))
	return TCL_OK

__76:
__77:
__78:
	if !(allowEmpty != 0) {
		goto __1014
	}

__1016:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1019
	}
	XTclExpandCodeArray(tls, envPtr)
__1019:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1020
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1020:
	;
__1021:
	_delta59 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta59 != 0) {
		goto __1024
	}
	if !(_delta59 == -0x7fffffff-1) {
		goto __1025
	}
	_delta59 = 1 - 0
__1025:
	;
__1026:
	if !(_delta59 < 0) {
		goto __1029
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1030
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1030:
	;
__1029:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta59
	goto __1027
__1027:
	if 0 != 0 {
		goto __1026
	}
	goto __1028
__1028:
	;
__1024:
	;
	goto __1022
__1022:
	if 0 != 0 {
		goto __1021
	}
	goto __1023
__1023:
	;
	goto __1017
__1017:
	if 0 != 0 {
		goto __1016
	}
	goto __1018
__1018:
	;
__1031:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1034
	}
	XTclExpandCodeArray(tls, envPtr)
__1034:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NUM_TYPE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1035
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_NUM_TYPE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1035:
	;
__1036:
	_delta60 = XtclInstructionTable[INST_NUM_TYPE].FstackEffect
	if !(_delta60 != 0) {
		goto __1039
	}
	if !(_delta60 == -0x7fffffff-1) {
		goto __1040
	}
	_delta60 = 1 - 0
__1040:
	;
__1041:
	if !(_delta60 < 0) {
		goto __1044
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1045
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1045:
	;
__1044:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta60
	goto __1042
__1042:
	if 0 != 0 {
		goto __1041
	}
	goto __1043
__1043:
	;
__1039:
	;
	goto __1037
__1037:
	if 0 != 0 {
		goto __1036
	}
	goto __1038
__1038:
	;
	goto __1032
__1032:
	if 0 != 0 {
		goto __1031
	}
	goto __1033
__1033:
	;
__1046:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1049
	}
	XTclExpandCodeArray(tls, envPtr)
__1049:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1050
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1050:
	;
__1051:
	_delta61 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta61 != 0) {
		goto __1054
	}
	if !(_delta61 == -0x7fffffff-1) {
		goto __1055
	}
	_delta61 = 1 - 0
__1055:
	;
__1056:
	if !(_delta61 < 0) {
		goto __1059
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1060
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1060:
	;
__1059:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta61
	goto __1057
__1057:
	if 0 != 0 {
		goto __1056
	}
	goto __1058
__1058:
	;
__1054:
	;
	goto __1052
__1052:
	if 0 != 0 {
		goto __1051
	}
	goto __1053
__1053:
	;
	goto __1047
__1047:
	if 0 != 0 {
		goto __1046
	}
	goto __1048
__1048:
	;
	testNumType = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1061:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1064
	}
	XTclExpandCodeArray(tls, envPtr)
__1064:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1065
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1065:
	;
__1066:
	_delta62 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta62 != 0) {
		goto __1069
	}
	if !(_delta62 == -0x7fffffff-1) {
		goto __1070
	}
	_delta62 = 1 - 0
__1070:
	;
__1071:
	if !(_delta62 < 0) {
		goto __1074
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1075
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1075:
	;
__1074:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta62
	goto __1072
__1072:
	if 0 != 0 {
		goto __1071
	}
	goto __1073
__1073:
	;
__1069:
	;
	goto __1067
__1067:
	if 0 != 0 {
		goto __1066
	}
	goto __1068
__1068:
	;
	goto __1062
__1062:
	if 0 != 0 {
		goto __1061
	}
	goto __1063
__1063:
	;
__1076:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1079
	}
	XTclExpandCodeArray(tls, envPtr)
__1079:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1080
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1080:
	;
__1081:
	_delta63 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta63 != 0) {
		goto __1084
	}
	if !(_delta63 == -0x7fffffff-1) {
		goto __1085
	}
	_delta63 = 1 - 0
__1085:
	;
__1086:
	if !(_delta63 < 0) {
		goto __1089
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1090
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1090:
	;
__1089:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta63
	goto __1087
__1087:
	if 0 != 0 {
		goto __1086
	}
	goto __1088
__1088:
	;
__1084:
	;
	goto __1082
__1082:
	if 0 != 0 {
		goto __1081
	}
	goto __1083
__1083:
	;
	goto __1077
__1077:
	if 0 != 0 {
		goto __1076
	}
	goto __1078
__1078:
	;
__1091:
	_objIndexCopy13 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy13 <= 255) {
		goto __1094
	}
__1096:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1099
	}
	XTclExpandCodeArray(tls, envPtr)
__1099:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy13))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1100
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1100:
	;
__1101:
	_delta64 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta64 != 0) {
		goto __1104
	}
	if !(_delta64 == -0x7fffffff-1) {
		goto __1105
	}
	_delta64 = 1 - _objIndexCopy13
__1105:
	;
__1106:
	if !(_delta64 < 0) {
		goto __1109
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1110
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1110:
	;
__1109:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta64
	goto __1107
__1107:
	if 0 != 0 {
		goto __1106
	}
	goto __1108
__1108:
	;
__1104:
	;
	goto __1102
__1102:
	if 0 != 0 {
		goto __1101
	}
	goto __1103
__1103:
	;
	goto __1097
__1097:
	if 0 != 0 {
		goto __1096
	}
	goto __1098
__1098:
	;
	goto __1095
__1094:
__1111:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1114
	}
	XTclExpandCodeArray(tls, envPtr)
__1114:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy13) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy13) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy13) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy13))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1115
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1115:
	;
__1116:
	_delta65 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta65 != 0) {
		goto __1119
	}
	if !(_delta65 == -0x7fffffff-1) {
		goto __1120
	}
	_delta65 = 1 - _objIndexCopy13
__1120:
	;
__1121:
	if !(_delta65 < 0) {
		goto __1124
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1125
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1125:
	;
__1124:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta65
	goto __1122
__1122:
	if 0 != 0 {
		goto __1121
	}
	goto __1123
__1123:
	;
__1119:
	;
	goto __1117
__1117:
	if 0 != 0 {
		goto __1116
	}
	goto __1118
__1118:
	;
	goto __1112
__1112:
	if 0 != 0 {
		goto __1111
	}
	goto __1113
__1113:
	;
__1095:
	;
	goto __1092
__1092:
	if 0 != 0 {
		goto __1091
	}
	goto __1093
__1093:
	;
__1126:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1129
	}
	XTclExpandCodeArray(tls, envPtr)
__1129:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1130
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_EQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1130:
	;
__1131:
	_delta66 = XtclInstructionTable[INST_STR_EQ].FstackEffect
	if !(_delta66 != 0) {
		goto __1134
	}
	if !(_delta66 == -0x7fffffff-1) {
		goto __1135
	}
	_delta66 = 1 - 0
__1135:
	;
__1136:
	if !(_delta66 < 0) {
		goto __1139
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1140
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1140:
	;
__1139:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta66
	goto __1137
__1137:
	if 0 != 0 {
		goto __1136
	}
	goto __1138
__1138:
	;
__1134:
	;
	goto __1132
__1132:
	if 0 != 0 {
		goto __1131
	}
	goto __1133
__1133:
	;
	goto __1127
__1127:
	if 0 != 0 {
		goto __1126
	}
	goto __1128
__1128:
	;
	end = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1141:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1144
	}
	XTclExpandCodeArray(tls, envPtr)
__1144:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1145
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1145:
	;
__1146:
	_delta67 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta67 != 0) {
		goto __1149
	}
	if !(_delta67 == -0x7fffffff-1) {
		goto __1150
	}
	_delta67 = 1 - 0
__1150:
	;
__1151:
	if !(_delta67 < 0) {
		goto __1154
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1155
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1155:
	;
__1154:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta67
	goto __1152
__1152:
	if 0 != 0 {
		goto __1151
	}
	goto __1153
__1153:
	;
__1149:
	;
	goto __1147
__1147:
	if 0 != 0 {
		goto __1146
	}
	goto __1148
__1148:
	;
	goto __1142
__1142:
	if 0 != 0 {
		goto __1141
	}
	goto __1143
__1143:
	;
__1156:
	if !(1 < 0) {
		goto __1159
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1160
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1160:
	;
__1159:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
	goto __1157
__1157:
	if 0 != 0 {
		goto __1156
	}
	goto __1158
__1158:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(testNumType) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(testNumType)))
__1161:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1164
	}
	XTclExpandCodeArray(tls, envPtr)
__1164:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1165
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1165:
	;
__1166:
	_delta68 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta68 != 0) {
		goto __1169
	}
	if !(_delta68 == -0x7fffffff-1) {
		goto __1170
	}
	_delta68 = 1 - 2
__1170:
	;
__1171:
	if !(_delta68 < 0) {
		goto __1174
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1175
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1175:
	;
__1174:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta68
	goto __1172
__1172:
	if 0 != 0 {
		goto __1171
	}
	goto __1173
__1173:
	;
__1169:
	;
	goto __1167
__1167:
	if 0 != 0 {
		goto __1166
	}
	goto __1168
__1168:
	;
	goto __1162
__1162:
	if 0 != 0 {
		goto __1161
	}
	goto __1163
__1163:
	;
__1176:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1179
	}
	XTclExpandCodeArray(tls, envPtr)
__1179:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1180
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1180:
	;
__1181:
	_delta69 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta69 != 0) {
		goto __1184
	}
	if !(_delta69 == -0x7fffffff-1) {
		goto __1185
	}
	_delta69 = 1 - 0
__1185:
	;
__1186:
	if !(_delta69 < 0) {
		goto __1189
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1190
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1190:
	;
__1189:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta69
	goto __1187
__1187:
	if 0 != 0 {
		goto __1186
	}
	goto __1188
__1188:
	;
__1184:
	;
	goto __1182
__1182:
	if 0 != 0 {
		goto __1181
	}
	goto __1183
__1183:
	;
	goto __1177
__1177:
	if 0 != 0 {
		goto __1176
	}
	goto __1178
__1178:
	;
	goto __1015
__1014:
__1191:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1194
	}
	XTclExpandCodeArray(tls, envPtr)
__1194:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NUM_TYPE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1195
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_NUM_TYPE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1195:
	;
__1196:
	_delta70 = XtclInstructionTable[INST_NUM_TYPE].FstackEffect
	if !(_delta70 != 0) {
		goto __1199
	}
	if !(_delta70 == -0x7fffffff-1) {
		goto __1200
	}
	_delta70 = 1 - 0
__1200:
	;
__1201:
	if !(_delta70 < 0) {
		goto __1204
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1205
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1205:
	;
__1204:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta70
	goto __1202
__1202:
	if 0 != 0 {
		goto __1201
	}
	goto __1203
__1203:
	;
__1199:
	;
	goto __1197
__1197:
	if 0 != 0 {
		goto __1196
	}
	goto __1198
__1198:
	;
	goto __1192
__1192:
	if 0 != 0 {
		goto __1191
	}
	goto __1193
__1193:
	;
__1206:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1209
	}
	XTclExpandCodeArray(tls, envPtr)
__1209:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1210
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1210:
	;
__1211:
	_delta71 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta71 != 0) {
		goto __1214
	}
	if !(_delta71 == -0x7fffffff-1) {
		goto __1215
	}
	_delta71 = 1 - 0
__1215:
	;
__1216:
	if !(_delta71 < 0) {
		goto __1219
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1220
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1220:
	;
__1219:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta71
	goto __1217
__1217:
	if 0 != 0 {
		goto __1216
	}
	goto __1218
__1218:
	;
__1214:
	;
	goto __1212
__1212:
	if 0 != 0 {
		goto __1211
	}
	goto __1213
__1213:
	;
	goto __1207
__1207:
	if 0 != 0 {
		goto __1206
	}
	goto __1208
__1208:
	;
	end = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1221:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1224
	}
	XTclExpandCodeArray(tls, envPtr)
__1224:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1225
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_FALSE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1225:
	;
__1226:
	_delta72 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
	if !(_delta72 != 0) {
		goto __1229
	}
	if !(_delta72 == -0x7fffffff-1) {
		goto __1230
	}
	_delta72 = 1 - 0
__1230:
	;
__1231:
	if !(_delta72 < 0) {
		goto __1234
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1235
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1235:
	;
__1234:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta72
	goto __1232
__1232:
	if 0 != 0 {
		goto __1231
	}
	goto __1233
__1233:
	;
__1229:
	;
	goto __1227
__1227:
	if 0 != 0 {
		goto __1226
	}
	goto __1228
__1228:
	;
	goto __1222
__1222:
	if 0 != 0 {
		goto __1221
	}
	goto __1223
__1223:
	;
__1015:
	;

	switch *(*int32)(unsafe.Pointer(bp /* t */)) {
	case 10 /* STR_IS_INT */ :
		goto __1237
	case 18 /* STR_IS_WIDE */ :
		goto __1238
	case 7 /* STR_IS_ENTIER */ :
		goto __1239
	}
	goto __1236
__1237:
__1240:
	_objIndexCopy14 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy14 <= 255) {
		goto __1243
	}
__1245:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1248
	}
	XTclExpandCodeArray(tls, envPtr)
__1248:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy14))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1249
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1249:
	;
__1250:
	_delta73 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta73 != 0) {
		goto __1253
	}
	if !(_delta73 == -0x7fffffff-1) {
		goto __1254
	}
	_delta73 = 1 - _objIndexCopy14
__1254:
	;
__1255:
	if !(_delta73 < 0) {
		goto __1258
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1259
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1259:
	;
__1258:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta73
	goto __1256
__1256:
	if 0 != 0 {
		goto __1255
	}
	goto __1257
__1257:
	;
__1253:
	;
	goto __1251
__1251:
	if 0 != 0 {
		goto __1250
	}
	goto __1252
__1252:
	;
	goto __1246
__1246:
	if 0 != 0 {
		goto __1245
	}
	goto __1247
__1247:
	;
	goto __1244
__1243:
__1260:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1263
	}
	XTclExpandCodeArray(tls, envPtr)
__1263:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy14) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy14) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy14) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy14))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1264
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1264:
	;
__1265:
	_delta74 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta74 != 0) {
		goto __1268
	}
	if !(_delta74 == -0x7fffffff-1) {
		goto __1269
	}
	_delta74 = 1 - _objIndexCopy14
__1269:
	;
__1270:
	if !(_delta74 < 0) {
		goto __1273
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1274
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1274:
	;
__1273:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta74
	goto __1271
__1271:
	if 0 != 0 {
		goto __1270
	}
	goto __1272
__1272:
	;
__1268:
	;
	goto __1266
__1266:
	if 0 != 0 {
		goto __1265
	}
	goto __1267
__1267:
	;
	goto __1261
__1261:
	if 0 != 0 {
		goto __1260
	}
	goto __1262
__1262:
	;
__1244:
	;
	goto __1241
__1241:
	if 0 != 0 {
		goto __1240
	}
	goto __1242
__1242:
	;
__1275:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1278
	}
	XTclExpandCodeArray(tls, envPtr)
__1278:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1279
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_EQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1279:
	;
__1280:
	_delta75 = XtclInstructionTable[INST_EQ].FstackEffect
	if !(_delta75 != 0) {
		goto __1283
	}
	if !(_delta75 == -0x7fffffff-1) {
		goto __1284
	}
	_delta75 = 1 - 0
__1284:
	;
__1285:
	if !(_delta75 < 0) {
		goto __1288
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1289
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1289:
	;
__1288:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta75
	goto __1286
__1286:
	if 0 != 0 {
		goto __1285
	}
	goto __1287
__1287:
	;
__1283:
	;
	goto __1281
__1281:
	if 0 != 0 {
		goto __1280
	}
	goto __1282
__1282:
	;
	goto __1276
__1276:
	if 0 != 0 {
		goto __1275
	}
	goto __1277
__1277:
	;
	goto __1236
__1238:
__1290:
	_objIndexCopy15 = XTclRegisterLiteral(tls, envPtr, ts+19370, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy15 <= 255) {
		goto __1293
	}
__1295:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1298
	}
	XTclExpandCodeArray(tls, envPtr)
__1298:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy15))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1299
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1299:
	;
__1300:
	_delta76 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta76 != 0) {
		goto __1303
	}
	if !(_delta76 == -0x7fffffff-1) {
		goto __1304
	}
	_delta76 = 1 - _objIndexCopy15
__1304:
	;
__1305:
	if !(_delta76 < 0) {
		goto __1308
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1309
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1309:
	;
__1308:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta76
	goto __1306
__1306:
	if 0 != 0 {
		goto __1305
	}
	goto __1307
__1307:
	;
__1303:
	;
	goto __1301
__1301:
	if 0 != 0 {
		goto __1300
	}
	goto __1302
__1302:
	;
	goto __1296
__1296:
	if 0 != 0 {
		goto __1295
	}
	goto __1297
__1297:
	;
	goto __1294
__1293:
__1310:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1313
	}
	XTclExpandCodeArray(tls, envPtr)
__1313:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy15) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy15) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy15) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy15))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1314
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1314:
	;
__1315:
	_delta77 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta77 != 0) {
		goto __1318
	}
	if !(_delta77 == -0x7fffffff-1) {
		goto __1319
	}
	_delta77 = 1 - _objIndexCopy15
__1319:
	;
__1320:
	if !(_delta77 < 0) {
		goto __1323
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1324
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1324:
	;
__1323:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta77
	goto __1321
__1321:
	if 0 != 0 {
		goto __1320
	}
	goto __1322
__1322:
	;
__1318:
	;
	goto __1316
__1316:
	if 0 != 0 {
		goto __1315
	}
	goto __1317
__1317:
	;
	goto __1311
__1311:
	if 0 != 0 {
		goto __1310
	}
	goto __1312
__1312:
	;
__1294:
	;
	goto __1291
__1291:
	if 0 != 0 {
		goto __1290
	}
	goto __1292
__1292:
	;
__1325:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1328
	}
	XTclExpandCodeArray(tls, envPtr)
__1328:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1329
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1329:
	;
__1330:
	_delta78 = XtclInstructionTable[INST_LE].FstackEffect
	if !(_delta78 != 0) {
		goto __1333
	}
	if !(_delta78 == -0x7fffffff-1) {
		goto __1334
	}
	_delta78 = 1 - 0
__1334:
	;
__1335:
	if !(_delta78 < 0) {
		goto __1338
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1339
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1339:
	;
__1338:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta78
	goto __1336
__1336:
	if 0 != 0 {
		goto __1335
	}
	goto __1337
__1337:
	;
__1333:
	;
	goto __1331
__1331:
	if 0 != 0 {
		goto __1330
	}
	goto __1332
__1332:
	;
	goto __1326
__1326:
	if 0 != 0 {
		goto __1325
	}
	goto __1327
__1327:
	;
	goto __1236
__1239:
__1340:
	_objIndexCopy16 = XTclRegisterLiteral(tls, envPtr, ts+19409, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy16 <= 255) {
		goto __1343
	}
__1345:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1348
	}
	XTclExpandCodeArray(tls, envPtr)
__1348:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy16))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1349
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1349:
	;
__1350:
	_delta79 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta79 != 0) {
		goto __1353
	}
	if !(_delta79 == -0x7fffffff-1) {
		goto __1354
	}
	_delta79 = 1 - _objIndexCopy16
__1354:
	;
__1355:
	if !(_delta79 < 0) {
		goto __1358
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1359
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1359:
	;
__1358:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta79
	goto __1356
__1356:
	if 0 != 0 {
		goto __1355
	}
	goto __1357
__1357:
	;
__1353:
	;
	goto __1351
__1351:
	if 0 != 0 {
		goto __1350
	}
	goto __1352
__1352:
	;
	goto __1346
__1346:
	if 0 != 0 {
		goto __1345
	}
	goto __1347
__1347:
	;
	goto __1344
__1343:
__1360:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1363
	}
	XTclExpandCodeArray(tls, envPtr)
__1363:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy16) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy16) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy16) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy16))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1364
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1364:
	;
__1365:
	_delta80 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta80 != 0) {
		goto __1368
	}
	if !(_delta80 == -0x7fffffff-1) {
		goto __1369
	}
	_delta80 = 1 - _objIndexCopy16
__1369:
	;
__1370:
	if !(_delta80 < 0) {
		goto __1373
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1374
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1374:
	;
__1373:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta80
	goto __1371
__1371:
	if 0 != 0 {
		goto __1370
	}
	goto __1372
__1372:
	;
__1368:
	;
	goto __1366
__1366:
	if 0 != 0 {
		goto __1365
	}
	goto __1367
__1367:
	;
	goto __1361
__1361:
	if 0 != 0 {
		goto __1360
	}
	goto __1362
__1362:
	;
__1344:
	;
	goto __1341
__1341:
	if 0 != 0 {
		goto __1340
	}
	goto __1342
__1342:
	;
__1375:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1378
	}
	XTclExpandCodeArray(tls, envPtr)
__1378:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1379
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1379:
	;
__1380:
	_delta81 = XtclInstructionTable[INST_LE].FstackEffect
	if !(_delta81 != 0) {
		goto __1383
	}
	if !(_delta81 == -0x7fffffff-1) {
		goto __1384
	}
	_delta81 = 1 - 0
__1384:
	;
__1385:
	if !(_delta81 < 0) {
		goto __1388
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1389
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1389:
	;
__1388:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta81
	goto __1386
__1386:
	if 0 != 0 {
		goto __1385
	}
	goto __1387
__1387:
	;
__1383:
	;
	goto __1381
__1381:
	if 0 != 0 {
		goto __1380
	}
	goto __1382
__1382:
	;
	goto __1376
__1376:
	if 0 != 0 {
		goto __1375
	}
	goto __1377
__1377:
	;
	goto __1236
__1236:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(end) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(end)))
	return TCL_OK

__79:
	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
__1390:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1393
	}
	XTclExpandCodeArray(tls, envPtr)
__1393:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1394
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_BEGIN_CATCH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1394:
	;
__1395:
	_delta82 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
	if !(_delta82 != 0) {
		goto __1398
	}
	if !(_delta82 == -0x7fffffff-1) {
		goto __1399
	}
	_delta82 = 1 - range1
__1399:
	;
__1400:
	if !(_delta82 < 0) {
		goto __1403
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1404
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1404:
	;
__1403:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta82
	goto __1401
__1401:
	if 0 != 0 {
		goto __1400
	}
	goto __1402
__1402:
	;
__1398:
	;
	goto __1396
__1396:
	if 0 != 0 {
		goto __1395
	}
	goto __1397
__1397:
	;
	goto __1391
__1391:
	if 0 != 0 {
		goto __1390
	}
	goto __1392
__1392:
	;
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1405:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1408
	}
	XTclExpandCodeArray(tls, envPtr)
__1408:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1409
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1409:
	;
__1410:
	_delta83 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta83 != 0) {
		goto __1413
	}
	if !(_delta83 == -0x7fffffff-1) {
		goto __1414
	}
	_delta83 = 1 - 0
__1414:
	;
__1415:
	if !(_delta83 < 0) {
		goto __1418
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1419
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1419:
	;
__1418:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta83
	goto __1416
__1416:
	if 0 != 0 {
		goto __1415
	}
	goto __1417
__1417:
	;
__1413:
	;
	goto __1411
__1411:
	if 0 != 0 {
		goto __1410
	}
	goto __1412
__1412:
	;
	goto __1406
__1406:
	if 0 != 0 {
		goto __1405
	}
	goto __1407
__1407:
	;
__1420:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1423
	}
	XTclExpandCodeArray(tls, envPtr)
__1423:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_LENGTH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1424
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST_LENGTH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1424:
	;
__1425:
	_delta84 = XtclInstructionTable[INST_LIST_LENGTH].FstackEffect
	if !(_delta84 != 0) {
		goto __1428
	}
	if !(_delta84 == -0x7fffffff-1) {
		goto __1429
	}
	_delta84 = 1 - 0
__1429:
	;
__1430:
	if !(_delta84 < 0) {
		goto __1433
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1434
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1434:
	;
__1433:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta84
	goto __1431
__1431:
	if 0 != 0 {
		goto __1430
	}
	goto __1432
__1432:
	;
__1428:
	;
	goto __1426
__1426:
	if 0 != 0 {
		goto __1425
	}
	goto __1427
__1427:
	;
	goto __1421
__1421:
	if 0 != 0 {
		goto __1420
	}
	goto __1422
__1422:
	;
__1435:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1438
	}
	XTclExpandCodeArray(tls, envPtr)
__1438:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1439
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1439:
	;
__1440:
	_delta85 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta85 != 0) {
		goto __1443
	}
	if !(_delta85 == -0x7fffffff-1) {
		goto __1444
	}
	_delta85 = 1 - 0
__1444:
	;
__1445:
	if !(_delta85 < 0) {
		goto __1448
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1449
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1449:
	;
__1448:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta85
	goto __1446
__1446:
	if 0 != 0 {
		goto __1445
	}
	goto __1447
__1447:
	;
__1443:
	;
	goto __1441
__1441:
	if 0 != 0 {
		goto __1440
	}
	goto __1442
__1442:
	;
	goto __1436
__1436:
	if 0 != 0 {
		goto __1435
	}
	goto __1437
__1437:
	;
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1450:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1453
	}
	XTclExpandCodeArray(tls, envPtr)
__1453:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1454
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1454:
	;
__1455:
	_delta86 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta86 != 0) {
		goto __1458
	}
	if !(_delta86 == -0x7fffffff-1) {
		goto __1459
	}
	_delta86 = 1 - 0
__1459:
	;
__1460:
	if !(_delta86 < 0) {
		goto __1463
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1464
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1464:
	;
__1463:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta86
	goto __1461
__1461:
	if 0 != 0 {
		goto __1460
	}
	goto __1462
__1462:
	;
__1458:
	;
	goto __1456
__1456:
	if 0 != 0 {
		goto __1455
	}
	goto __1457
__1457:
	;
	goto __1451
__1451:
	if 0 != 0 {
		goto __1450
	}
	goto __1452
__1452:
	;
__1465:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1468
	}
	XTclExpandCodeArray(tls, envPtr)
__1468:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_CODE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1469
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RETURN_CODE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1469:
	;
__1470:
	_delta87 = XtclInstructionTable[INST_PUSH_RETURN_CODE].FstackEffect
	if !(_delta87 != 0) {
		goto __1473
	}
	if !(_delta87 == -0x7fffffff-1) {
		goto __1474
	}
	_delta87 = 1 - 0
__1474:
	;
__1475:
	if !(_delta87 < 0) {
		goto __1478
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1479
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1479:
	;
__1478:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta87
	goto __1476
__1476:
	if 0 != 0 {
		goto __1475
	}
	goto __1477
__1477:
	;
__1473:
	;
	goto __1471
__1471:
	if 0 != 0 {
		goto __1470
	}
	goto __1472
__1472:
	;
	goto __1466
__1466:
	if 0 != 0 {
		goto __1465
	}
	goto __1467
__1467:
	;
__1480:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1483
	}
	XTclExpandCodeArray(tls, envPtr)
__1483:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1484
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_END_CATCH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1484:
	;
__1485:
	_delta88 = XtclInstructionTable[INST_END_CATCH].FstackEffect
	if !(_delta88 != 0) {
		goto __1488
	}
	if !(_delta88 == -0x7fffffff-1) {
		goto __1489
	}
	_delta88 = 1 - 0
__1489:
	;
__1490:
	if !(_delta88 < 0) {
		goto __1493
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1494
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1494:
	;
__1493:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta88
	goto __1491
__1491:
	if 0 != 0 {
		goto __1490
	}
	goto __1492
__1492:
	;
__1488:
	;
	goto __1486
__1486:
	if 0 != 0 {
		goto __1485
	}
	goto __1487
__1487:
	;
	goto __1481
__1481:
	if 0 != 0 {
		goto __1480
	}
	goto __1482
__1482:
	;
__1495:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1498
	}
	XTclExpandCodeArray(tls, envPtr)
__1498:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LNOT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1499
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LNOT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1499:
	;
__1500:
	_delta89 = XtclInstructionTable[INST_LNOT].FstackEffect
	if !(_delta89 != 0) {
		goto __1503
	}
	if !(_delta89 == -0x7fffffff-1) {
		goto __1504
	}
	_delta89 = 1 - 0
__1504:
	;
__1505:
	if !(_delta89 < 0) {
		goto __1508
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1509
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1509:
	;
__1508:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta89
	goto __1506
__1506:
	if 0 != 0 {
		goto __1505
	}
	goto __1507
__1507:
	;
__1503:
	;
	goto __1501
__1501:
	if 0 != 0 {
		goto __1500
	}
	goto __1502
__1502:
	;
	goto __1496
__1496:
	if 0 != 0 {
		goto __1495
	}
	goto __1497
__1497:
	;
	return TCL_OK
__58:
	;

	return XTclCompileBasicMin0ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
}

var isClasses1 = [22]uintptr{
	ts + 1768, ts + 1774, ts + 1780, ts + 16703,
	ts + 4126, ts + 1798, ts + 6155, ts + 6162,
	ts + 16711, ts + 1804, ts + 6261, ts + 3395,
	ts + 1810, ts + 1816, ts + 1822, ts + 1207,
	ts + 16717, ts + 1828, ts + 16722, ts + 16734,
	ts + 1834, uintptr(0),
} /* tclCompCmdsSZ.c:462:23 */

func XTclCompileStringMatchCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:731:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var i int32
	var length int32
	var exactMatch int32 = 0
	var nocase int32 = 0
	var str uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 4 {
		return TCL_ERROR
	}
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	// Check if we have a -nocase flag.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 4 {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
			return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
		}
		str = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart
		length = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fsize
		if length <= 1 || libc.Xstrncmp(tls, str, ts+15557, uint64(length)) != 0 {
			// Fail at run time, not in compilation.

			return XTclCompileBasic3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
		}
		nocase = 1
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}

	// Push the strings to match against each other.

	for i = 0; i < 2; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			str = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart
			length = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fsize
			if !(nocase != 0) && i == 0 {
				// Trivial matches can be done by 'string equal'. If -nocase
				// was specified, we can't do this because INST_STR_EQ has no
				// support for nocase.

				var copy uintptr = XTcl_NewStringObj(tls, str, length)

				(*Tcl_Obj)(unsafe.Pointer(copy)).FrefCount++
				exactMatch = libc.Bool32(libc.Xstrpbrk(tls, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(copy)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(copy)).Fbytes
					}
					return XTcl_GetString(tls, copy)
				}(), ts+14153) == uintptr(0))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(copy)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(copy)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(copy)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(copy)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(copy)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(copy)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(copy)).Flength = -1
						for ok := true; ok; ok = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(copy + 32)) = XtclFreeObjList
							XtclFreeObjList = copy
						}
					} else {
						XTclFreeObj(tls, copy)
					}
				}

			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, str, length, 0)
				if _objIndexCopy <= 255 {
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok3 := true; ok3; ok3 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok4 := true; ok4; ok4 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok5 := true; ok5; ok5 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok6 := true; ok6; ok6 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok7 := true; ok7; ok7 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i+1+nocase)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i+1+nocase)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)

		}
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}

	// Push the matcher.

	if exactMatch != 0 {
		for ok8 := true; ok8; ok8 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_EQ == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok9 := true; ok9; ok9 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_EQ].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok10 := true; ok10; ok10 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok11 := true; ok11; ok11 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_MATCH)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(nocase))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_MATCH == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok12 := true; ok12; ok12 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_MATCH].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - nocase
					}
					for ok13 := true; ok13; ok13 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringLenCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:812:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr
	var objPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	if XTclWordKnownAtCompileTime(tls, tokenPtr, objPtr) != 0 {
		// Here someone is asking for the length of a static string (or
		// something with backslashes). Just push the actual character (not
		// byte) length.

		// var buf [24]int8 at bp+8, 24

		var len int32 = XTcl_GetCharLength(tls, objPtr)

		len = libc.Xsprintf(tls, bp+8, ts+909, libc.VaList(bp, len))
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, bp+8, len, 0)
			if _objIndexCopy <= 255 {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok3 := true; ok3; ok3 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok4 := true; ok4; ok4 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok6 := true; ok6; ok6 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok7 := true; ok7; ok7 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)

		for ok8 := true; ok8; ok8 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_LEN)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_LEN == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok9 := true; ok9; ok9 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_LEN].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok10 := true; ok10; ok10 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
			for ok11 := true; ok11; ok11 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = objPtr
			}
		} else {
			XTclFreeObj(tls, objPtr)
		}
	}

	return TCL_OK
}

func XTclCompileStringMapCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:852:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var mapTokenPtr uintptr
	var stringTokenPtr uintptr
	var mapObj uintptr
	// var objv uintptr at bp+8, 8

	var bytes uintptr
	// var len int32 at bp, 4

	// We only handle the case:
	//
	//    string map {foo bar} $thing
	//
	// That is, a literal two-element list (doesn't need to be brace-quoted,
	// but does need to be compile-time knowable) and any old argument (the
	// thing to map).

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}
	mapTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	stringTokenPtr = mapTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(mapTokenPtr)).FnumComponents+1)*24
	mapObj = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(mapObj)).FrefCount++
	if !(XTclWordKnownAtCompileTime(tls, mapTokenPtr, mapObj) != 0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = mapObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return XTclCompileBasic2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	} else if XTcl_ListObjGetElements(tls, uintptr(0), mapObj, bp, bp+8) != TCL_OK {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = mapObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return XTclCompileBasic2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	} else if *(*int32)(unsafe.Pointer(bp)) != 2 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = mapObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return XTclCompileBasic2ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	// Now issue the opcodes. Note that in the case that we know that the
	// first word is an empty word, we don't issue the map at all. That is the
	// correct semantics for mapping.

	bytes = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)))), bp)
	if *(*int32)(unsafe.Pointer(bp)) == 0 {
		if (*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok7 := true; ok7; ok7 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok8 := true; ok8; ok8 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok9 := true; ok9; ok9 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, stringTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).FnumComponents, envPtr)
		}

	} else {
		for ok10 := true; ok10; ok10 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp)), 0)
			if _objIndexCopy <= 255 {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok14 := true; ok14; ok14 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok15 := true; ok15; ok15 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok16 := true; ok16; ok16 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		bytes = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)) + 1*8)), bp)
		for ok17 := true; ok17; ok17 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp)), 0)
			if _objIndexCopy <= 255 {
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok20 := true; ok20; ok20 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok21 := true; ok21; ok21 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok22 := true; ok22; ok22 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok23 := true; ok23; ok23 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		if (*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok24 := true; ok24; ok24 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok25 := true; ok25; ok25 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok26 := true; ok26; ok26 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok27 := true; ok27; ok27 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok28 := true; ok28; ok28 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok29 := true; ok29; ok29 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok30 := true; ok30; ok30 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, stringTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).FnumComponents, envPtr)
		}

		for ok31 := true; ok31; ok31 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_MAP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_MAP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok32 := true; ok32; ok32 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_MAP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok33 := true; ok33; ok33 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	for ok34 := true; ok34; ok34 = 0 != 0 {
		var _objPtr uintptr = mapObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

func XTclCompileStringRangeCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:915:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var stringTokenPtr uintptr
	var fromTokenPtr uintptr
	var toTokenPtr uintptr
	// var idx1 int32 at bp, 4

	// var idx2 int32 at bp+4, 4

	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _objIndexCopy1 int32
	var _delta5 int32
	var _delta6 int32
	var _delta7 int32
	var _objIndexCopy2 int32
	var _delta8 int32
	var _delta9 int32
	var _delta10 int32
	var _objIndexCopy3 int32
	var _delta11 int32
	var _delta12 int32
	var _objIndexCopy4 int32
	var _delta13 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 4) {
		goto __1
	}
	return TCL_ERROR
__1:
	;
	stringTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	fromTokenPtr = stringTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).FnumComponents+1)*24
	toTokenPtr = fromTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(fromTokenPtr)).FnumComponents+1)*24

	// Every path must push the string argument
	if !((*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __2
	}
__4:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __7
	}
__9:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __12
	}
	XTclExpandCodeArray(tls, envPtr)
__12:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __13
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__13:
	;
__14:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __17
	}
	if !(_delta == -0x7fffffff-1) {
		goto __18
	}
	_delta = 1 - _objIndexCopy
__18:
	;
__19:
	if !(_delta < 0) {
		goto __22
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __23
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__23:
	;
__22:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
__17:
	;
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto __10
__10:
	if 0 != 0 {
		goto __9
	}
	goto __11
__11:
	;
	goto __8
__7:
__24:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __27
	}
	XTclExpandCodeArray(tls, envPtr)
__27:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __28
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__28:
	;
__29:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __32
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __33
	}
	_delta1 = 1 - _objIndexCopy
__33:
	;
__34:
	if !(_delta1 < 0) {
		goto __37
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __38
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__38:
	;
__37:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
__32:
	;
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
__8:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	goto __3
__2:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileTokens(tls, interp, stringTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(stringTokenPtr)).FnumComponents, envPtr)
__3:
	;

	// Parse the two indices.

	if !(XTclGetIndexFromToken(tls, fromTokenPtr, 0, 0x7fffffff,
		bp) != TCL_OK) {
		goto __39
	}
	goto nonConstantIndices
__39:
	;
	// Token parsed as an index expression. We treat all indices before
	// the string the same as the start of the string.

	if !(*(*int32)(unsafe.Pointer(bp)) == 0x7fffffff) {
		goto __40
	}
	// [string range $s end+1 $last] must be empty string
__41:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __44
	}
	XTclExpandCodeArray(tls, envPtr)
__44:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __45
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__45:
	;
__46:
	_delta2 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta2 != 0) {
		goto __49
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __50
	}
	_delta2 = 1 - 0
__50:
	;
__51:
	if !(_delta2 < 0) {
		goto __54
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __55
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__55:
	;
__54:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
__49:
	;
	goto __47
__47:
	if 0 != 0 {
		goto __46
	}
	goto __48
__48:
	;
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
__56:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy1 <= 255) {
		goto __59
	}
__61:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __64
	}
	XTclExpandCodeArray(tls, envPtr)
__64:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __65
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__65:
	;
__66:
	_delta3 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta3 != 0) {
		goto __69
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __70
	}
	_delta3 = 1 - _objIndexCopy1
__70:
	;
__71:
	if !(_delta3 < 0) {
		goto __74
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __75
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__75:
	;
__74:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __72
__72:
	if 0 != 0 {
		goto __71
	}
	goto __73
__73:
	;
__69:
	;
	goto __67
__67:
	if 0 != 0 {
		goto __66
	}
	goto __68
__68:
	;
	goto __62
__62:
	if 0 != 0 {
		goto __61
	}
	goto __63
__63:
	;
	goto __60
__59:
__76:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __79
	}
	XTclExpandCodeArray(tls, envPtr)
__79:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __80
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__80:
	;
__81:
	_delta4 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta4 != 0) {
		goto __84
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __85
	}
	_delta4 = 1 - _objIndexCopy1
__85:
	;
__86:
	if !(_delta4 < 0) {
		goto __89
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __90
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__90:
	;
__89:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __87
__87:
	if 0 != 0 {
		goto __86
	}
	goto __88
__88:
	;
__84:
	;
	goto __82
__82:
	if 0 != 0 {
		goto __81
	}
	goto __83
__83:
	;
	goto __77
__77:
	if 0 != 0 {
		goto __76
	}
	goto __78
__78:
	;
__60:
	;
	goto __57
__57:
	if 0 != 0 {
		goto __56
	}
	goto __58
__58:
	;
	return TCL_OK
__40:
	;

	if !(XTclGetIndexFromToken(tls, toTokenPtr, -1, -2,
		bp+4) != TCL_OK) {
		goto __91
	}
	goto nonConstantIndices
__91:
	;
	// Token parsed as an index expression. We treat all indices after
	// the string the same as the end of the string.
	if !(*(*int32)(unsafe.Pointer(bp + 4)) == -1) {
		goto __92
	}
	// [string range $s $first -1] must be empty string
__93:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __96
	}
	XTclExpandCodeArray(tls, envPtr)
__96:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __97
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__97:
	;
__98:
	_delta5 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta5 != 0) {
		goto __101
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __102
	}
	_delta5 = 1 - 0
__102:
	;
__103:
	if !(_delta5 < 0) {
		goto __106
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __107
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__107:
	;
__106:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __104
__104:
	if 0 != 0 {
		goto __103
	}
	goto __105
__105:
	;
__101:
	;
	goto __99
__99:
	if 0 != 0 {
		goto __98
	}
	goto __100
__100:
	;
	goto __94
__94:
	if 0 != 0 {
		goto __93
	}
	goto __95
__95:
	;
__108:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy2 <= 255) {
		goto __111
	}
__113:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __116
	}
	XTclExpandCodeArray(tls, envPtr)
__116:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __117
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__117:
	;
__118:
	_delta6 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta6 != 0) {
		goto __121
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __122
	}
	_delta6 = 1 - _objIndexCopy2
__122:
	;
__123:
	if !(_delta6 < 0) {
		goto __126
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __127
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__127:
	;
__126:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __124
__124:
	if 0 != 0 {
		goto __123
	}
	goto __125
__125:
	;
__121:
	;
	goto __119
__119:
	if 0 != 0 {
		goto __118
	}
	goto __120
__120:
	;
	goto __114
__114:
	if 0 != 0 {
		goto __113
	}
	goto __115
__115:
	;
	goto __112
__111:
__128:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __131
	}
	XTclExpandCodeArray(tls, envPtr)
__131:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __132
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__132:
	;
__133:
	_delta7 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta7 != 0) {
		goto __136
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __137
	}
	_delta7 = 1 - _objIndexCopy2
__137:
	;
__138:
	if !(_delta7 < 0) {
		goto __141
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __142
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__142:
	;
__141:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __139
__139:
	if 0 != 0 {
		goto __138
	}
	goto __140
__140:
	;
__136:
	;
	goto __134
__134:
	if 0 != 0 {
		goto __133
	}
	goto __135
__135:
	;
	goto __129
__129:
	if 0 != 0 {
		goto __128
	}
	goto __130
__130:
	;
__112:
	;
	goto __109
__109:
	if 0 != 0 {
		goto __108
	}
	goto __110
__110:
	;
	return TCL_OK
__92:
	;

	// Push the operand onto the stack and then the substring operation.

__143:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __146
	}
	XTclExpandCodeArray(tls, envPtr)
__146:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __147
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_RANGE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__147:
	;
__148:
	_delta8 = XtclInstructionTable[INST_STR_RANGE_IMM].FstackEffect
	if !(_delta8 != 0) {
		goto __151
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __152
	}
	_delta8 = 1 - *(*int32)(unsafe.Pointer(bp))
__152:
	;
__153:
	if !(_delta8 < 0) {
		goto __156
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __157
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__157:
	;
__156:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __154
__154:
	if 0 != 0 {
		goto __153
	}
	goto __155
__155:
	;
__151:
	;
	goto __149
__149:
	if 0 != 0 {
		goto __148
	}
	goto __150
__150:
	;
	goto __144
__144:
	if 0 != 0 {
		goto __143
	}
	goto __145
__145:
	;
__158:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __161
	}
	XTclExpandCodeArray(tls, envPtr)
__161:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
	goto __159
__159:
	if 0 != 0 {
		goto __158
	}
	goto __160
__160:
	;
	return TCL_OK

	// Push the operands onto the stack and then the substring operation.

nonConstantIndices:
	if !((*Tcl_Token)(unsafe.Pointer(fromTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __162
	}
__164:
	_objIndexCopy3 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(fromTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(fromTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy3 <= 255) {
		goto __167
	}
__169:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __172
	}
	XTclExpandCodeArray(tls, envPtr)
__172:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __173
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__173:
	;
__174:
	_delta9 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta9 != 0) {
		goto __177
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __178
	}
	_delta9 = 1 - _objIndexCopy3
__178:
	;
__179:
	if !(_delta9 < 0) {
		goto __182
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __183
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__183:
	;
__182:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __180
__180:
	if 0 != 0 {
		goto __179
	}
	goto __181
__181:
	;
__177:
	;
	goto __175
__175:
	if 0 != 0 {
		goto __174
	}
	goto __176
__176:
	;
	goto __170
__170:
	if 0 != 0 {
		goto __169
	}
	goto __171
__171:
	;
	goto __168
__167:
__184:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __187
	}
	XTclExpandCodeArray(tls, envPtr)
__187:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __188
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__188:
	;
__189:
	_delta10 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta10 != 0) {
		goto __192
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __193
	}
	_delta10 = 1 - _objIndexCopy3
__193:
	;
__194:
	if !(_delta10 < 0) {
		goto __197
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __198
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__198:
	;
__197:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __195
__195:
	if 0 != 0 {
		goto __194
	}
	goto __196
__196:
	;
__192:
	;
	goto __190
__190:
	if 0 != 0 {
		goto __189
	}
	goto __191
__191:
	;
	goto __185
__185:
	if 0 != 0 {
		goto __184
	}
	goto __186
__186:
	;
__168:
	;
	goto __165
__165:
	if 0 != 0 {
		goto __164
	}
	goto __166
__166:
	;
	goto __163
__162:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
	XTclCompileTokens(tls, interp, fromTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(fromTokenPtr)).FnumComponents, envPtr)
__163:
	;

	if !((*Tcl_Token)(unsafe.Pointer(toTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __199
	}
__201:
	_objIndexCopy4 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(toTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(toTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy4 <= 255) {
		goto __204
	}
__206:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __209
	}
	XTclExpandCodeArray(tls, envPtr)
__209:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __210
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__210:
	;
__211:
	_delta11 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta11 != 0) {
		goto __214
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __215
	}
	_delta11 = 1 - _objIndexCopy4
__215:
	;
__216:
	if !(_delta11 < 0) {
		goto __219
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __220
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__220:
	;
__219:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __217
__217:
	if 0 != 0 {
		goto __216
	}
	goto __218
__218:
	;
__214:
	;
	goto __212
__212:
	if 0 != 0 {
		goto __211
	}
	goto __213
__213:
	;
	goto __207
__207:
	if 0 != 0 {
		goto __206
	}
	goto __208
__208:
	;
	goto __205
__204:
__221:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __224
	}
	XTclExpandCodeArray(tls, envPtr)
__224:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __225
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__225:
	;
__226:
	_delta12 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta12 != 0) {
		goto __229
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __230
	}
	_delta12 = 1 - _objIndexCopy4
__230:
	;
__231:
	if !(_delta12 < 0) {
		goto __234
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __235
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__235:
	;
__234:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __232
__232:
	if 0 != 0 {
		goto __231
	}
	goto __233
__233:
	;
__229:
	;
	goto __227
__227:
	if 0 != 0 {
		goto __226
	}
	goto __228
__228:
	;
	goto __222
__222:
	if 0 != 0 {
		goto __221
	}
	goto __223
__223:
	;
__205:
	;
	goto __202
__202:
	if 0 != 0 {
		goto __201
	}
	goto __203
__203:
	;
	goto __200
__199:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 3*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 3*8))
	XTclCompileTokens(tls, interp, toTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(toTokenPtr)).FnumComponents, envPtr)
__200:
	;

__236:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __239
	}
	XTclExpandCodeArray(tls, envPtr)
__239:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __240
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_RANGE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__240:
	;
__241:
	_delta13 = XtclInstructionTable[INST_STR_RANGE].FstackEffect
	if !(_delta13 != 0) {
		goto __244
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __245
	}
	_delta13 = 1 - 0
__245:
	;
__246:
	if !(_delta13 < 0) {
		goto __249
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __250
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__250:
	;
__249:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __247
__247:
	if 0 != 0 {
		goto __246
	}
	goto __248
__248:
	;
__244:
	;
	goto __242
__242:
	if 0 != 0 {
		goto __241
	}
	goto __243
__243:
	;
	goto __237
__237:
	if 0 != 0 {
		goto __236
	}
	goto __238
__238:
	;
	return TCL_OK
}

func XTclCompileStringReplaceCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:991:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var tokenPtr uintptr
	var valueTokenPtr uintptr
	// var first int32 at bp, 4

	// var last int32 at bp+4, 4

	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _objIndexCopy1 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _objIndexCopy2 int32
	var _delta7 int32
	var _delta8 int32
	var _delta9 int32
	var _delta10 int32
	var _delta11 int32
	var _delta12 int32
	var _delta13 int32
	var _objIndexCopy3 int32
	var _delta14 int32
	var _delta15 int32
	var _delta16 int32
	var _delta17 int32
	var _objIndexCopy4 int32
	var _delta18 int32
	var _delta19 int32
	var _delta20 int32
	var _delta21 int32
	var _delta22 int32
	var _delta23 int32
	var _delta24 int32
	var _delta25 int32
	var _delta26 int32
	var _objIndexCopy5 int32
	var _delta27 int32
	var _delta28 int32
	var _objIndexCopy6 int32
	var _delta29 int32
	var _delta30 int32
	var _objIndexCopy7 int32
	var _delta31 int32
	var _delta32 int32
	var _objIndexCopy8 int32
	var _delta33 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 4 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 5) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// Bytecode to compute/push string argument being replaced
	valueTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __2
	}
__4:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __7
	}
__9:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __12
	}
	XTclExpandCodeArray(tls, envPtr)
__12:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __13
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__13:
	;
__14:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __17
	}
	if !(_delta == -0x7fffffff-1) {
		goto __18
	}
	_delta = 1 - _objIndexCopy
__18:
	;
__19:
	if !(_delta < 0) {
		goto __22
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __23
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__23:
	;
__22:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
__17:
	;
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto __10
__10:
	if 0 != 0 {
		goto __9
	}
	goto __11
__11:
	;
	goto __8
__7:
__24:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __27
	}
	XTclExpandCodeArray(tls, envPtr)
__27:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __28
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__28:
	;
__29:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __32
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __33
	}
	_delta1 = 1 - _objIndexCopy
__33:
	;
__34:
	if !(_delta1 < 0) {
		goto __37
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __38
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__38:
	;
__37:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
__32:
	;
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
__8:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	goto __3
__2:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
__3:
	;

	// Check for first index known and useful at compile time.
	tokenPtr = valueTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents+1)*24
	if !(XTclGetIndexFromToken(tls, tokenPtr, -1, 0x7fffffff,
		bp) != TCL_OK) {
		goto __39
	}
	goto genericReplace
__39:
	;

	// Check for last index known and useful at compile time.
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !(XTclGetIndexFromToken(tls, tokenPtr, -1, 0x7fffffff,
		bp+4) != TCL_OK) {
		goto __40
	}
	goto genericReplace
__40:
	;

	// [string replace] is an odd bird.  For many arguments it is
	// a conventional substring replacer.  However it also goes out
	// of its way to become a no-op for many cases where it would be
	// replacing an empty substring.  Precisely, it is a no-op when
	//
	//		(last < first)		OR
	//		(last < 0)		OR
	//		(end < first)
	//
	// For some compile-time values we can detect these cases, and
	// compile direct to bytecode implementing the no-op.

	if !(*(*int32)(unsafe.Pointer(bp + 4)) == -1 ||
		*(*int32)(unsafe.Pointer(bp)) == 0x7fffffff ||

		*(*int32)(unsafe.Pointer(bp)) <= -2 && *(*int32)(unsafe.Pointer(bp + 4)) <= -2 &&
			*(*int32)(unsafe.Pointer(bp + 4)) < *(*int32)(unsafe.Pointer(bp)) ||

		*(*int32)(unsafe.Pointer(bp)) >= 0 && *(*int32)(unsafe.Pointer(bp + 4)) >= 0 &&
			*(*int32)(unsafe.Pointer(bp + 4)) < *(*int32)(unsafe.Pointer(bp))) {
		goto __41
	} // Know (last < first)
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 5) {
		goto __42
	}
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __43
	}
__45:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy1 <= 255) {
		goto __48
	}
__50:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __53
	}
	XTclExpandCodeArray(tls, envPtr)
__53:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __54
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__54:
	;
__55:
	_delta2 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta2 != 0) {
		goto __58
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __59
	}
	_delta2 = 1 - _objIndexCopy1
__59:
	;
__60:
	if !(_delta2 < 0) {
		goto __63
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __64
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__64:
	;
__63:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __61
__61:
	if 0 != 0 {
		goto __60
	}
	goto __62
__62:
	;
__58:
	;
	goto __56
__56:
	if 0 != 0 {
		goto __55
	}
	goto __57
__57:
	;
	goto __51
__51:
	if 0 != 0 {
		goto __50
	}
	goto __52
__52:
	;
	goto __49
__48:
__65:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __68
	}
	XTclExpandCodeArray(tls, envPtr)
__68:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __69
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__69:
	;
__70:
	_delta3 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta3 != 0) {
		goto __73
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __74
	}
	_delta3 = 1 - _objIndexCopy1
__74:
	;
__75:
	if !(_delta3 < 0) {
		goto __78
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __79
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__79:
	;
__78:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __76
__76:
	if 0 != 0 {
		goto __75
	}
	goto __77
__77:
	;
__73:
	;
	goto __71
__71:
	if 0 != 0 {
		goto __70
	}
	goto __72
__72:
	;
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
__49:
	;
	goto __46
__46:
	if 0 != 0 {
		goto __45
	}
	goto __47
__47:
	;
	goto __44
__43:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 4*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 4*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__44:
	;

__80:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __83
	}
	XTclExpandCodeArray(tls, envPtr)
__83:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __84
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__84:
	;
__85:
	_delta4 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta4 != 0) {
		goto __88
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __89
	}
	_delta4 = 1 - 0
__89:
	;
__90:
	if !(_delta4 < 0) {
		goto __93
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __94
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__94:
	;
__93:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __91
__91:
	if 0 != 0 {
		goto __90
	}
	goto __92
__92:
	;
__88:
	;
	goto __86
__86:
	if 0 != 0 {
		goto __85
	}
	goto __87
__87:
	;
	goto __81
__81:
	if 0 != 0 {
		goto __80
	}
	goto __82
__82:
	; // Pop newString
__42:
	;
	// Original string argument now on TOS as result
	return TCL_OK
__41:
	;

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 5) {
		goto __95
	}
	// When we have a string replacement, we have to take care about
	// not replacing empty substrings that [string replace] promises
	// not to replace
	//
	// The remaining index values might be suitable for conventional
	// string replacement, but only if they cannot possibly meet the
	// conditions described above at runtime. If there's a chance they
	// might, we would have to emit bytecode to check and at that point
	// we're paying more in bytecode execution time than would make
	// things worthwhile. Trouble is we are very limited in
	// how much we can detect that at compile time. After decoding,
	// we need, first:
	//
	//		(first <= end)
	//
	// The encoded indices (first <= TCL_INDEX END) and
	// (first == TCL_INDEX_BEFORE) always meets this condition, but
	// any other encoded first index has some list for which it fails.
	//
	// We also need, second:
	//
	//		(last >= 0)
	//
	// The encoded indices (last >= TCL_INDEX_START) and
	// (last == TCL_INDEX_AFTER) always meet this condition but any
	// other encoded last index has some list for which it fails.
	//
	// Finally we need, third:
	//
	//		(first <= last)
	//
	// Considered in combination with the constraints we already have,
	// we see that we can proceed when (first == TCL_INDEX_BEFORE)
	// or (last == TCL_INDEX_AFTER). These also permit simplification
	// of the prefix|replace|suffix construction. The other constraints,
	// though, interfere with getting a guarantee that first <= last.

	if !(*(*int32)(unsafe.Pointer(bp)) == -1 && *(*int32)(unsafe.Pointer(bp + 4)) >= 0) {
		goto __97
	}
	// empty prefix
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __98
	}
__100:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy2 <= 255) {
		goto __103
	}
__105:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __108
	}
	XTclExpandCodeArray(tls, envPtr)
__108:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __109
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__109:
	;
__110:
	_delta5 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta5 != 0) {
		goto __113
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __114
	}
	_delta5 = 1 - _objIndexCopy2
__114:
	;
__115:
	if !(_delta5 < 0) {
		goto __118
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __119
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__119:
	;
__118:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __116
__116:
	if 0 != 0 {
		goto __115
	}
	goto __117
__117:
	;
__113:
	;
	goto __111
__111:
	if 0 != 0 {
		goto __110
	}
	goto __112
__112:
	;
	goto __106
__106:
	if 0 != 0 {
		goto __105
	}
	goto __107
__107:
	;
	goto __104
__103:
__120:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __123
	}
	XTclExpandCodeArray(tls, envPtr)
__123:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __124
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__124:
	;
__125:
	_delta6 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta6 != 0) {
		goto __128
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __129
	}
	_delta6 = 1 - _objIndexCopy2
__129:
	;
__130:
	if !(_delta6 < 0) {
		goto __133
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __134
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__134:
	;
__133:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __131
__131:
	if 0 != 0 {
		goto __130
	}
	goto __132
__132:
	;
__128:
	;
	goto __126
__126:
	if 0 != 0 {
		goto __125
	}
	goto __127
__127:
	;
	goto __121
__121:
	if 0 != 0 {
		goto __120
	}
	goto __122
__122:
	;
__104:
	;
	goto __101
__101:
	if 0 != 0 {
		goto __100
	}
	goto __102
__102:
	;
	goto __99
__98:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 4*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 4*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__99:
	;

__135:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __138
	}
	XTclExpandCodeArray(tls, envPtr)
__138:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __139
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__139:
	;
__140:
	_delta7 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta7 != 0) {
		goto __143
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __144
	}
	_delta7 = 1 - 2
__144:
	;
__145:
	if !(_delta7 < 0) {
		goto __148
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __149
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__149:
	;
__148:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __146
__146:
	if 0 != 0 {
		goto __145
	}
	goto __147
__147:
	;
__143:
	;
	goto __141
__141:
	if 0 != 0 {
		goto __140
	}
	goto __142
__142:
	;
	goto __136
__136:
	if 0 != 0 {
		goto __135
	}
	goto __137
__137:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 4)) == 0x7fffffff) {
		goto __150
	}
__152:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __155
	}
	XTclExpandCodeArray(tls, envPtr)
__155:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __156
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__156:
	;
__157:
	_delta8 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta8 != 0) {
		goto __160
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __161
	}
	_delta8 = 1 - 0
__161:
	;
__162:
	if !(_delta8 < 0) {
		goto __165
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __166
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__166:
	;
__165:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __163
__163:
	if 0 != 0 {
		goto __162
	}
	goto __164
__164:
	;
__160:
	;
	goto __158
__158:
	if 0 != 0 {
		goto __157
	}
	goto __159
__159:
	;
	goto __153
__153:
	if 0 != 0 {
		goto __152
	}
	goto __154
__154:
	; // Pop  original
	goto __151
__150:
__167:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __170
	}
	XTclExpandCodeArray(tls, envPtr)
__170:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))+1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))+1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))+1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4)) + 1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __171
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_RANGE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__171:
	;
__172:
	_delta9 = XtclInstructionTable[INST_STR_RANGE_IMM].FstackEffect
	if !(_delta9 != 0) {
		goto __175
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __176
	}
	_delta9 = 1 - (*(*int32)(unsafe.Pointer(bp + 4)) + 1)
__176:
	;
__177:
	if !(_delta9 < 0) {
		goto __180
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __181
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__181:
	;
__180:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __178
__178:
	if 0 != 0 {
		goto __177
	}
	goto __179
__179:
	;
__175:
	;
	goto __173
__173:
	if 0 != 0 {
		goto __172
	}
	goto __174
__174:
	;
	goto __168
__168:
	if 0 != 0 {
		goto __167
	}
	goto __169
__169:
	;
__182:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __185
	}
	XTclExpandCodeArray(tls, envPtr)
__185:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-2))
	goto __183
__183:
	if 0 != 0 {
		goto __182
	}
	goto __184
__184:
	;
__186:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __189
	}
	XTclExpandCodeArray(tls, envPtr)
__189:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __190
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_CONCAT1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__190:
	;
__191:
	_delta10 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
	if !(_delta10 != 0) {
		goto __194
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __195
	}
	_delta10 = 1 - 2
__195:
	;
__196:
	if !(_delta10 < 0) {
		goto __199
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __200
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__200:
	;
__199:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __197
__197:
	if 0 != 0 {
		goto __196
	}
	goto __198
__198:
	;
__194:
	;
	goto __192
__192:
	if 0 != 0 {
		goto __191
	}
	goto __193
__193:
	;
	goto __187
__187:
	if 0 != 0 {
		goto __186
	}
	goto __188
__188:
	;
__151:
	;
	return TCL_OK
__97:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 4)) == 0x7fffffff && *(*int32)(unsafe.Pointer(bp)) <= -2) {
		goto __201
	}
__202:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __205
	}
	XTclExpandCodeArray(tls, envPtr)
__205:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __206
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_RANGE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__206:
	;
__207:
	_delta11 = XtclInstructionTable[INST_STR_RANGE_IMM].FstackEffect
	if !(_delta11 != 0) {
		goto __210
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __211
	}
	_delta11 = 1 - 0
__211:
	;
__212:
	if !(_delta11 < 0) {
		goto __215
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __216
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__216:
	;
__215:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __213
__213:
	if 0 != 0 {
		goto __212
	}
	goto __214
__214:
	;
__210:
	;
	goto __208
__208:
	if 0 != 0 {
		goto __207
	}
	goto __209
__209:
	;
	goto __203
__203:
	if 0 != 0 {
		goto __202
	}
	goto __204
__204:
	;
__217:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __220
	}
	XTclExpandCodeArray(tls, envPtr)
__220:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp)) - 1))
	goto __218
__218:
	if 0 != 0 {
		goto __217
	}
	goto __219
__219:
	;
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __221
	}
__223:
	_objIndexCopy3 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy3 <= 255) {
		goto __226
	}
__228:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __231
	}
	XTclExpandCodeArray(tls, envPtr)
__231:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __232
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__232:
	;
__233:
	_delta12 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta12 != 0) {
		goto __236
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __237
	}
	_delta12 = 1 - _objIndexCopy3
__237:
	;
__238:
	if !(_delta12 < 0) {
		goto __241
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __242
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__242:
	;
__241:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __239
__239:
	if 0 != 0 {
		goto __238
	}
	goto __240
__240:
	;
__236:
	;
	goto __234
__234:
	if 0 != 0 {
		goto __233
	}
	goto __235
__235:
	;
	goto __229
__229:
	if 0 != 0 {
		goto __228
	}
	goto __230
__230:
	;
	goto __227
__226:
__243:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __246
	}
	XTclExpandCodeArray(tls, envPtr)
__246:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __247
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__247:
	;
__248:
	_delta13 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta13 != 0) {
		goto __251
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __252
	}
	_delta13 = 1 - _objIndexCopy3
__252:
	;
__253:
	if !(_delta13 < 0) {
		goto __256
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __257
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__257:
	;
__256:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __254
__254:
	if 0 != 0 {
		goto __253
	}
	goto __255
__255:
	;
__251:
	;
	goto __249
__249:
	if 0 != 0 {
		goto __248
	}
	goto __250
__250:
	;
	goto __244
__244:
	if 0 != 0 {
		goto __243
	}
	goto __245
__245:
	;
__227:
	;
	goto __224
__224:
	if 0 != 0 {
		goto __223
	}
	goto __225
__225:
	;
	goto __222
__221:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 4*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 4*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__222:
	;

__258:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __261
	}
	XTclExpandCodeArray(tls, envPtr)
__261:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __262
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_CONCAT1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__262:
	;
__263:
	_delta14 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
	if !(_delta14 != 0) {
		goto __266
	}
	if !(_delta14 == -0x7fffffff-1) {
		goto __267
	}
	_delta14 = 1 - 2
__267:
	;
__268:
	if !(_delta14 < 0) {
		goto __271
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __272
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__272:
	;
__271:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta14
	goto __269
__269:
	if 0 != 0 {
		goto __268
	}
	goto __270
__270:
	;
__266:
	;
	goto __264
__264:
	if 0 != 0 {
		goto __263
	}
	goto __265
__265:
	;
	goto __259
__259:
	if 0 != 0 {
		goto __258
	}
	goto __260
__260:
	;
	return TCL_OK
__201:
	;

	// FLOW THROUGH TO genericReplace

	goto __96
__95:
	// When we have no replacement string to worry about, we may
	// have more luck, because the forbidden empty string replacements
	// are harmless when they are replaced by another empty string.

	if !(*(*int32)(unsafe.Pointer(bp)) == -1 || *(*int32)(unsafe.Pointer(bp)) == 0) {
		goto __273
	}
	// empty prefix - build suffix only

	if !(*(*int32)(unsafe.Pointer(bp + 4)) == -2 || *(*int32)(unsafe.Pointer(bp + 4)) == 0x7fffffff) {
		goto __275
	}
	// empty suffix too => empty result
__276:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __279
	}
	XTclExpandCodeArray(tls, envPtr)
__279:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __280
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__280:
	;
__281:
	_delta15 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta15 != 0) {
		goto __284
	}
	if !(_delta15 == -0x7fffffff-1) {
		goto __285
	}
	_delta15 = 1 - 0
__285:
	;
__286:
	if !(_delta15 < 0) {
		goto __289
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __290
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__290:
	;
__289:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta15
	goto __287
__287:
	if 0 != 0 {
		goto __286
	}
	goto __288
__288:
	;
__284:
	;
	goto __282
__282:
	if 0 != 0 {
		goto __281
	}
	goto __283
__283:
	;
	goto __277
__277:
	if 0 != 0 {
		goto __276
	}
	goto __278
__278:
	; // Pop  original
__291:
	_objIndexCopy4 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy4 <= 255) {
		goto __294
	}
__296:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __299
	}
	XTclExpandCodeArray(tls, envPtr)
__299:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __300
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__300:
	;
__301:
	_delta16 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta16 != 0) {
		goto __304
	}
	if !(_delta16 == -0x7fffffff-1) {
		goto __305
	}
	_delta16 = 1 - _objIndexCopy4
__305:
	;
__306:
	if !(_delta16 < 0) {
		goto __309
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __310
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__310:
	;
__309:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta16
	goto __307
__307:
	if 0 != 0 {
		goto __306
	}
	goto __308
__308:
	;
__304:
	;
	goto __302
__302:
	if 0 != 0 {
		goto __301
	}
	goto __303
__303:
	;
	goto __297
__297:
	if 0 != 0 {
		goto __296
	}
	goto __298
__298:
	;
	goto __295
__294:
__311:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __314
	}
	XTclExpandCodeArray(tls, envPtr)
__314:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __315
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__315:
	;
__316:
	_delta17 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta17 != 0) {
		goto __319
	}
	if !(_delta17 == -0x7fffffff-1) {
		goto __320
	}
	_delta17 = 1 - _objIndexCopy4
__320:
	;
__321:
	if !(_delta17 < 0) {
		goto __324
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __325
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__325:
	;
__324:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta17
	goto __322
__322:
	if 0 != 0 {
		goto __321
	}
	goto __323
__323:
	;
__319:
	;
	goto __317
__317:
	if 0 != 0 {
		goto __316
	}
	goto __318
__318:
	;
	goto __312
__312:
	if 0 != 0 {
		goto __311
	}
	goto __313
__313:
	;
__295:
	;
	goto __292
__292:
	if 0 != 0 {
		goto __291
	}
	goto __293
__293:
	;
	return TCL_OK
__275:
	;
__326:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __329
	}
	XTclExpandCodeArray(tls, envPtr)
__329:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))+1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))+1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))+1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4)) + 1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __330
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_RANGE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__330:
	;
__331:
	_delta18 = XtclInstructionTable[INST_STR_RANGE_IMM].FstackEffect
	if !(_delta18 != 0) {
		goto __334
	}
	if !(_delta18 == -0x7fffffff-1) {
		goto __335
	}
	_delta18 = 1 - (*(*int32)(unsafe.Pointer(bp + 4)) + 1)
__335:
	;
__336:
	if !(_delta18 < 0) {
		goto __339
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __340
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__340:
	;
__339:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta18
	goto __337
__337:
	if 0 != 0 {
		goto __336
	}
	goto __338
__338:
	;
__334:
	;
	goto __332
__332:
	if 0 != 0 {
		goto __331
	}
	goto __333
__333:
	;
	goto __327
__327:
	if 0 != 0 {
		goto __326
	}
	goto __328
__328:
	;
__341:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __344
	}
	XTclExpandCodeArray(tls, envPtr)
__344:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-2))
	goto __342
__342:
	if 0 != 0 {
		goto __341
	}
	goto __343
__343:
	;
	return TCL_OK
	goto __274
__273:
	if !(*(*int32)(unsafe.Pointer(bp + 4)) == -2 || *(*int32)(unsafe.Pointer(bp + 4)) == 0x7fffffff) {
		goto __345
	}
	// empty suffix - build prefix only
__346:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __349
	}
	XTclExpandCodeArray(tls, envPtr)
__349:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __350
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_RANGE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__350:
	;
__351:
	_delta19 = XtclInstructionTable[INST_STR_RANGE_IMM].FstackEffect
	if !(_delta19 != 0) {
		goto __354
	}
	if !(_delta19 == -0x7fffffff-1) {
		goto __355
	}
	_delta19 = 1 - 0
__355:
	;
__356:
	if !(_delta19 < 0) {
		goto __359
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __360
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__360:
	;
__359:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta19
	goto __357
__357:
	if 0 != 0 {
		goto __356
	}
	goto __358
__358:
	;
__354:
	;
	goto __352
__352:
	if 0 != 0 {
		goto __351
	}
	goto __353
__353:
	;
	goto __347
__347:
	if 0 != 0 {
		goto __346
	}
	goto __348
__348:
	;
__361:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __364
	}
	XTclExpandCodeArray(tls, envPtr)
__364:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp)) - 1))
	goto __362
__362:
	if 0 != 0 {
		goto __361
	}
	goto __363
__363:
	;
	return TCL_OK
__345:
	;
__365:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __368
	}
	XTclExpandCodeArray(tls, envPtr)
__368:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __369
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__369:
	;
__370:
	_delta20 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta20 != 0) {
		goto __373
	}
	if !(_delta20 == -0x7fffffff-1) {
		goto __374
	}
	_delta20 = 1 - 0
__374:
	;
__375:
	if !(_delta20 < 0) {
		goto __378
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __379
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__379:
	;
__378:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta20
	goto __376
__376:
	if 0 != 0 {
		goto __375
	}
	goto __377
__377:
	;
__373:
	;
	goto __371
__371:
	if 0 != 0 {
		goto __370
	}
	goto __372
__372:
	;
	goto __366
__366:
	if 0 != 0 {
		goto __365
	}
	goto __367
__367:
	;
__380:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __383
	}
	XTclExpandCodeArray(tls, envPtr)
__383:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __384
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_RANGE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__384:
	;
__385:
	_delta21 = XtclInstructionTable[INST_STR_RANGE_IMM].FstackEffect
	if !(_delta21 != 0) {
		goto __388
	}
	if !(_delta21 == -0x7fffffff-1) {
		goto __389
	}
	_delta21 = 1 - 0
__389:
	;
__390:
	if !(_delta21 < 0) {
		goto __393
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __394
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__394:
	;
__393:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta21
	goto __391
__391:
	if 0 != 0 {
		goto __390
	}
	goto __392
__392:
	;
__388:
	;
	goto __386
__386:
	if 0 != 0 {
		goto __385
	}
	goto __387
__387:
	;
	goto __381
__381:
	if 0 != 0 {
		goto __380
	}
	goto __382
__382:
	;
__395:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __398
	}
	XTclExpandCodeArray(tls, envPtr)
__398:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp))-1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp)) - 1))
	goto __396
__396:
	if 0 != 0 {
		goto __395
	}
	goto __397
__397:
	;
__399:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __402
	}
	XTclExpandCodeArray(tls, envPtr)
__402:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __403
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__403:
	;
__404:
	_delta22 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta22 != 0) {
		goto __407
	}
	if !(_delta22 == -0x7fffffff-1) {
		goto __408
	}
	_delta22 = 1 - 2
__408:
	;
__409:
	if !(_delta22 < 0) {
		goto __412
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __413
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__413:
	;
__412:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta22
	goto __410
__410:
	if 0 != 0 {
		goto __409
	}
	goto __411
__411:
	;
__407:
	;
	goto __405
__405:
	if 0 != 0 {
		goto __404
	}
	goto __406
__406:
	;
	goto __400
__400:
	if 0 != 0 {
		goto __399
	}
	goto __401
__401:
	;
__414:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __417
	}
	XTclExpandCodeArray(tls, envPtr)
__417:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_RANGE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))+1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))+1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))+1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4)) + 1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __418
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_RANGE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__418:
	;
__419:
	_delta23 = XtclInstructionTable[INST_STR_RANGE_IMM].FstackEffect
	if !(_delta23 != 0) {
		goto __422
	}
	if !(_delta23 == -0x7fffffff-1) {
		goto __423
	}
	_delta23 = 1 - (*(*int32)(unsafe.Pointer(bp + 4)) + 1)
__423:
	;
__424:
	if !(_delta23 < 0) {
		goto __427
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __428
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__428:
	;
__427:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta23
	goto __425
__425:
	if 0 != 0 {
		goto __424
	}
	goto __426
__426:
	;
__422:
	;
	goto __420
__420:
	if 0 != 0 {
		goto __419
	}
	goto __421
__421:
	;
	goto __415
__415:
	if 0 != 0 {
		goto __414
	}
	goto __416
__416:
	;
__429:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __432
	}
	XTclExpandCodeArray(tls, envPtr)
__432:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(uint32(libc.Uint32(libc.Uint32FromInt32(-2))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = libc.Uint8FromUint32(libc.Uint32FromInt32(-2))
	goto __430
__430:
	if 0 != 0 {
		goto __429
	}
	goto __431
__431:
	;
__433:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __436
	}
	XTclExpandCodeArray(tls, envPtr)
__436:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __437
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_CONCAT1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__437:
	;
__438:
	_delta24 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
	if !(_delta24 != 0) {
		goto __441
	}
	if !(_delta24 == -0x7fffffff-1) {
		goto __442
	}
	_delta24 = 1 - 2
__442:
	;
__443:
	if !(_delta24 < 0) {
		goto __446
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __447
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__447:
	;
__446:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta24
	goto __444
__444:
	if 0 != 0 {
		goto __443
	}
	goto __445
__445:
	;
__441:
	;
	goto __439
__439:
	if 0 != 0 {
		goto __438
	}
	goto __440
__440:
	;
	goto __434
__434:
	if 0 != 0 {
		goto __433
	}
	goto __435
__435:
	;
	return TCL_OK
__274:
	;
__96:
	;

genericReplace:
	tokenPtr = valueTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __448
	}
__450:
	_objIndexCopy5 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy5 <= 255) {
		goto __453
	}
__455:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __458
	}
	XTclExpandCodeArray(tls, envPtr)
__458:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __459
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__459:
	;
__460:
	_delta25 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta25 != 0) {
		goto __463
	}
	if !(_delta25 == -0x7fffffff-1) {
		goto __464
	}
	_delta25 = 1 - _objIndexCopy5
__464:
	;
__465:
	if !(_delta25 < 0) {
		goto __468
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __469
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__469:
	;
__468:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta25
	goto __466
__466:
	if 0 != 0 {
		goto __465
	}
	goto __467
__467:
	;
__463:
	;
	goto __461
__461:
	if 0 != 0 {
		goto __460
	}
	goto __462
__462:
	;
	goto __456
__456:
	if 0 != 0 {
		goto __455
	}
	goto __457
__457:
	;
	goto __454
__453:
__470:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __473
	}
	XTclExpandCodeArray(tls, envPtr)
__473:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __474
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__474:
	;
__475:
	_delta26 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta26 != 0) {
		goto __478
	}
	if !(_delta26 == -0x7fffffff-1) {
		goto __479
	}
	_delta26 = 1 - _objIndexCopy5
__479:
	;
__480:
	if !(_delta26 < 0) {
		goto __483
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __484
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__484:
	;
__483:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta26
	goto __481
__481:
	if 0 != 0 {
		goto __480
	}
	goto __482
__482:
	;
__478:
	;
	goto __476
__476:
	if 0 != 0 {
		goto __475
	}
	goto __477
__477:
	;
	goto __471
__471:
	if 0 != 0 {
		goto __470
	}
	goto __472
__472:
	;
__454:
	;
	goto __451
__451:
	if 0 != 0 {
		goto __450
	}
	goto __452
__452:
	;
	goto __449
__448:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__449:
	;

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __485
	}
__487:
	_objIndexCopy6 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy6 <= 255) {
		goto __490
	}
__492:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __495
	}
	XTclExpandCodeArray(tls, envPtr)
__495:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __496
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__496:
	;
__497:
	_delta27 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta27 != 0) {
		goto __500
	}
	if !(_delta27 == -0x7fffffff-1) {
		goto __501
	}
	_delta27 = 1 - _objIndexCopy6
__501:
	;
__502:
	if !(_delta27 < 0) {
		goto __505
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __506
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__506:
	;
__505:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta27
	goto __503
__503:
	if 0 != 0 {
		goto __502
	}
	goto __504
__504:
	;
__500:
	;
	goto __498
__498:
	if 0 != 0 {
		goto __497
	}
	goto __499
__499:
	;
	goto __493
__493:
	if 0 != 0 {
		goto __492
	}
	goto __494
__494:
	;
	goto __491
__490:
__507:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __510
	}
	XTclExpandCodeArray(tls, envPtr)
__510:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __511
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__511:
	;
__512:
	_delta28 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta28 != 0) {
		goto __515
	}
	if !(_delta28 == -0x7fffffff-1) {
		goto __516
	}
	_delta28 = 1 - _objIndexCopy6
__516:
	;
__517:
	if !(_delta28 < 0) {
		goto __520
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __521
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__521:
	;
__520:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta28
	goto __518
__518:
	if 0 != 0 {
		goto __517
	}
	goto __519
__519:
	;
__515:
	;
	goto __513
__513:
	if 0 != 0 {
		goto __512
	}
	goto __514
__514:
	;
	goto __508
__508:
	if 0 != 0 {
		goto __507
	}
	goto __509
__509:
	;
__491:
	;
	goto __488
__488:
	if 0 != 0 {
		goto __487
	}
	goto __489
__489:
	;
	goto __486
__485:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 3*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 3*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__486:
	;

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 5) {
		goto __522
	}
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __524
	}
__526:
	_objIndexCopy7 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy7 <= 255) {
		goto __529
	}
__531:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __534
	}
	XTclExpandCodeArray(tls, envPtr)
__534:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __535
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__535:
	;
__536:
	_delta29 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta29 != 0) {
		goto __539
	}
	if !(_delta29 == -0x7fffffff-1) {
		goto __540
	}
	_delta29 = 1 - _objIndexCopy7
__540:
	;
__541:
	if !(_delta29 < 0) {
		goto __544
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __545
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__545:
	;
__544:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta29
	goto __542
__542:
	if 0 != 0 {
		goto __541
	}
	goto __543
__543:
	;
__539:
	;
	goto __537
__537:
	if 0 != 0 {
		goto __536
	}
	goto __538
__538:
	;
	goto __532
__532:
	if 0 != 0 {
		goto __531
	}
	goto __533
__533:
	;
	goto __530
__529:
__546:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __549
	}
	XTclExpandCodeArray(tls, envPtr)
__549:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __550
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__550:
	;
__551:
	_delta30 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta30 != 0) {
		goto __554
	}
	if !(_delta30 == -0x7fffffff-1) {
		goto __555
	}
	_delta30 = 1 - _objIndexCopy7
__555:
	;
__556:
	if !(_delta30 < 0) {
		goto __559
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __560
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__560:
	;
__559:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta30
	goto __557
__557:
	if 0 != 0 {
		goto __556
	}
	goto __558
__558:
	;
__554:
	;
	goto __552
__552:
	if 0 != 0 {
		goto __551
	}
	goto __553
__553:
	;
	goto __547
__547:
	if 0 != 0 {
		goto __546
	}
	goto __548
__548:
	;
__530:
	;
	goto __527
__527:
	if 0 != 0 {
		goto __526
	}
	goto __528
__528:
	;
	goto __525
__524:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 4*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 4*8))
	XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
__525:
	;

	goto __523
__522:
__561:
	_objIndexCopy8 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy8 <= 255) {
		goto __564
	}
__566:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __569
	}
	XTclExpandCodeArray(tls, envPtr)
__569:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __570
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__570:
	;
__571:
	_delta31 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta31 != 0) {
		goto __574
	}
	if !(_delta31 == -0x7fffffff-1) {
		goto __575
	}
	_delta31 = 1 - _objIndexCopy8
__575:
	;
__576:
	if !(_delta31 < 0) {
		goto __579
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __580
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__580:
	;
__579:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta31
	goto __577
__577:
	if 0 != 0 {
		goto __576
	}
	goto __578
__578:
	;
__574:
	;
	goto __572
__572:
	if 0 != 0 {
		goto __571
	}
	goto __573
__573:
	;
	goto __567
__567:
	if 0 != 0 {
		goto __566
	}
	goto __568
__568:
	;
	goto __565
__564:
__581:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __584
	}
	XTclExpandCodeArray(tls, envPtr)
__584:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __585
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__585:
	;
__586:
	_delta32 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta32 != 0) {
		goto __589
	}
	if !(_delta32 == -0x7fffffff-1) {
		goto __590
	}
	_delta32 = 1 - _objIndexCopy8
__590:
	;
__591:
	if !(_delta32 < 0) {
		goto __594
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __595
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__595:
	;
__594:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta32
	goto __592
__592:
	if 0 != 0 {
		goto __591
	}
	goto __593
__593:
	;
__589:
	;
	goto __587
__587:
	if 0 != 0 {
		goto __586
	}
	goto __588
__588:
	;
	goto __582
__582:
	if 0 != 0 {
		goto __581
	}
	goto __583
__583:
	;
__565:
	;
	goto __562
__562:
	if 0 != 0 {
		goto __561
	}
	goto __563
__563:
	;
__523:
	;
__596:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __599
	}
	XTclExpandCodeArray(tls, envPtr)
__599:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_REPLACE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __600
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_REPLACE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__600:
	;
__601:
	_delta33 = XtclInstructionTable[INST_STR_REPLACE].FstackEffect
	if !(_delta33 != 0) {
		goto __604
	}
	if !(_delta33 == -0x7fffffff-1) {
		goto __605
	}
	_delta33 = 1 - 0
__605:
	;
__606:
	if !(_delta33 < 0) {
		goto __609
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __610
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__610:
	;
__609:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta33
	goto __607
__607:
	if 0 != 0 {
		goto __606
	}
	goto __608
__608:
	;
__604:
	;
	goto __602
__602:
	if 0 != 0 {
		goto __601
	}
	goto __603
__603:
	;
	goto __597
__597:
	if 0 != 0 {
		goto __596
	}
	goto __598
__598:
	;
	return TCL_OK
}

func XTclCompileStringTrimLCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:1193:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 && (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 3 {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	} else {
		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, uintptr(uintptr(unsafe.Pointer(&XtclDefaultTrimSet))), int32(libc.Xstrlen(tls, uintptr(unsafe.Pointer(&XtclDefaultTrimSet)))), 0)
			if _objIndexCopy <= 255 {
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok17 := true; ok17; ok17 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok20 := true; ok20; ok20 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}
	for ok21 := true; ok21; ok21 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_TRIM_LEFT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_TRIM_LEFT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok22 := true; ok22; ok22 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_TRIM_LEFT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok23 := true; ok23; ok23 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringTrimRCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:1221:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 && (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 3 {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	} else {
		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, uintptr(uintptr(unsafe.Pointer(&XtclDefaultTrimSet))), int32(libc.Xstrlen(tls, uintptr(unsafe.Pointer(&XtclDefaultTrimSet)))), 0)
			if _objIndexCopy <= 255 {
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok17 := true; ok17; ok17 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok20 := true; ok20; ok20 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}
	for ok21 := true; ok21; ok21 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_TRIM_RIGHT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_TRIM_RIGHT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok22 := true; ok22; ok22 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_TRIM_RIGHT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok23 := true; ok23; ok23 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringTrimCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:1249:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 && (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 3 {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	} else {
		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, uintptr(uintptr(unsafe.Pointer(&XtclDefaultTrimSet))), int32(libc.Xstrlen(tls, uintptr(unsafe.Pointer(&XtclDefaultTrimSet)))), 0)
			if _objIndexCopy <= 255 {
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok17 := true; ok17; ok17 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok20 := true; ok20; ok20 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}
	for ok21 := true; ok21; ok21 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_TRIM)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_TRIM == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok22 := true; ok22; ok22 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_TRIM].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok23 := true; ok23; ok23 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringToUpperCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:1277:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return XTclCompileBasic1To3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_UPPER)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_UPPER == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_UPPER].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringToLowerCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:1299:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return XTclCompileBasic1To3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_LOWER)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_LOWER == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_LOWER].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileStringToTitleCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:1321:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return XTclCompileBasic1To3ArgCmd(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_TITLE)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_STR_TITLE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_STR_TITLE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

// Support definitions for the [string is] compilation.

func sUniCharIsAscii1(tls *libc.TLS, character int32) int32 { /* tclCompCmdsSZ.c:1347:1: */
	return libc.Bool32(character >= 0 && character < 0x80)
}

func sUniCharIsHexDigit1(tls *libc.TLS, character int32) int32 { /* tclCompCmdsSZ.c:1354:1: */
	return libc.Bool32(character >= 0 && character < 0x80 && libc.Xisxdigit(tls, character) != 0)
}

var XtclStringClassTable = [14]StringClassDesc{
	{Fname: ts + 1768, Fcomparator: 0},
	{Fname: ts + 1774, Fcomparator: 0},
	{Fname: ts + 1780, Fcomparator: 0},
	{Fname: ts + 16703, Fcomparator: 0},
	{Fname: ts + 1798, Fcomparator: 0},
	{Fname: ts + 1804, Fcomparator: 0},
	{Fname: ts + 1810, Fcomparator: 0},
	{Fname: ts + 1816, Fcomparator: 0},
	{Fname: ts + 1822, Fcomparator: 0},
	{Fname: ts + 1207, Fcomparator: 0},
	{Fname: ts + 1828, Fcomparator: 0},
	{Fname: ts + 19411, Fcomparator: 0},
	{Fname: ts + 1834, Fcomparator: 0},
	{},
} /* tclCompCmdsSZ.c:1360:23 */

//----------------------------------------------------------------------
//
// TclCompileSubstCmd --
//
//	Procedure called to compile the "subst" command.
//
// Results:
//	Returns TCL_OK for successful compile, or TCL_ERROR to defer
//	evaluation to runtime (either when it is too complex to get the
//	semantics right, or when we know for sure that it is an error but need
//	the error to happen at the right time).
//
// Side effects:
//	Instructions are added to envPtr to execute the "subst" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileSubstCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:1398:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var numArgs int32
	var numOpts int32
	var objc int32
	// var flags int32 at bp, 4

	var objv uintptr
	var wordTokenPtr uintptr
	var code int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	numArgs = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 1
	numOpts = numArgs - 1
	*(*int32)(unsafe.Pointer(bp /* flags */)) = TCL_SUBST_ALL
	wordTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	code = TCL_ERROR

	if !(numArgs == 0) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	objv = XTclStackAlloc(tls, interp /*numArgs*/, int32(uint64(numOpts)*uint64(unsafe.Sizeof(uintptr(0)))))

	objc = 0
__2:
	if !(objc < numOpts) {
		goto __4
	}
	*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)) = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FrefCount++
	if !!(XTclWordKnownAtCompileTime(tls, wordTokenPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8))) != 0) {
		goto __5
	}
	objc++
	goto cleanup
__5:
	;
	wordTokenPtr = wordTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).FnumComponents+1)*24
	goto __3
__3:
	objc++
	goto __2
	goto __4
__4:
	;

	//
	//     if (TclSubstOptions(NULL, numOpts, objv, &flags) == TCL_OK) {
	// 	toSubst = objv[numOpts];
	// 	Tcl_IncrRefCount(toSubst);
	//     }

	// TODO: Figure out expansion to cover WordKnownAtCompileTime
	//	The difficulty is that WKACT makes a copy, and if TclSubstParse
	//	below parses the copy of the original source string, some deep
	//	parts of the compile machinery get upset.  They want all pointers
	//	stored in Tcl_Tokens to point back to the same original string.
	if !((*Tcl_Token)(unsafe.Pointer(wordTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __6
	}
	code = XTclSubstOptions(tls, uintptr(0), numOpts, objv, bp)
__6:
	;

cleanup:
__7:
	if !(libc.PreDecInt32(&objc, 1) >= 0) {
		goto __8
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FrefCount, 1) > 1) {
		goto __9
	}
	goto __10
__9:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __11
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Fbytes != XtclEmptyStringRep) {
		goto __13
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Fbytes)
__13:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))).Flength = -1
__14:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8))
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto __12
__11:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc)*8)))
__12:
	;
__10:
	;

	goto __7
__8:
	;
	XTclStackFree(tls, interp, objv)
	if !(code != TCL_OK) {
		goto __17
	}
	return TCL_ERROR
__17:
	;

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(numArgs)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(numArgs)*8))
	XTclSubstCompile(tls, interp, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(wordTokenPtr+1*24)).Fsize,
		*(*int32)(unsafe.Pointer(bp /* flags */)), *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(numArgs)*4)), envPtr)

	//    TclDecrRefCount(toSubst);
	return TCL_OK
}

func XTclSubstCompile(tls *libc.TLS, interp uintptr, bytes uintptr, numBytes int32, flags int32, line int32, envPtr uintptr) { /* tclCompCmdsSZ.c:1465:1: */
	bp := tls.Alloc(768)
	defer tls.Free(768)

	var endTokenPtr uintptr
	var tokenPtr uintptr
	var breakOffset int32 = 0
	var count int32 = 0
	*(*int32)(unsafe.Pointer(bp + 648 /* bline */)) = line
	// var parse Tcl_Parse at bp+64, 576

	*(*Tcl_InterpState)(unsafe.Pointer(bp + 640 /* state */)) = uintptr(0)

	XTclSubstParse(tls, interp, bytes, numBytes, flags, bp+64, bp+640)
	if *(*Tcl_InterpState)(unsafe.Pointer(bp + 640)) != uintptr(0) {
		XTcl_ResetResult(tls, interp)
	}

	// Tricky point! If the first token does not result in a *guaranteed* push
	// of a Tcl_Obj on the stack, we must push an empty object. Otherwise it
	// is possible to get to an INST_STR_CONCAT1 or INST_DONE without enough
	// values on the stack, resulting in a crash. Thanks to Joe Mistachkin for
	// identifying a script that could trigger this case.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(bp + 64 /* &parse */)).FtokenPtr
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_TEXT && (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_BS {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		count++
	}

	for endTokenPtr = tokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(bp+64)).FnumTokens)*24; tokenPtr < endTokenPtr; tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24 {
		var length int32
		var literal int32
		var catchRange int32
		var breakJump int32
		*(*[3]int8)(unsafe.Pointer(bp + 652 /* buf */)) = *(*[3]int8)(unsafe.Pointer(ts + 19416))
		// var startFixup JumpFixup at bp+656, 16

		// var okFixup JumpFixup at bp+672, 16

		// var returnFixup JumpFixup at bp+688, 16

		// var breakFixup JumpFixup at bp+704, 16

		// var continueFixup JumpFixup at bp+720, 16

		// var otherFixup JumpFixup at bp+736, 16

		// var endFixup JumpFixup at bp+752, 16

		switch (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype {
		case TCL_TOKEN_TEXT:
			literal = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize /*flags*/, 0)
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = literal
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			XTclAdvanceLines(tls, bp+648, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart,
				(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart+uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize))
			count++
			continue
		case TCL_TOKEN_BS:
			length = XTclParseBackslash(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize,
				uintptr(0), bp+652)
			literal = XTclRegisterLiteral(tls, envPtr, bp+652, length /*flags*/, 0)
			for ok14 := true; ok14; ok14 = 0 != 0 {
				var _objIndexCopy int32 = literal
				if _objIndexCopy <= 255 {
					for ok15 := true; ok15; ok15 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok16 := true; ok16; ok16 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok17 := true; ok17; ok17 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok18 := true; ok18; ok18 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok19 := true; ok19; ok19 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok20 := true; ok20; ok20 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			count++
			continue
		case TCL_TOKEN_VARIABLE:
			// Check for simple variable access; see if we can only generate
			// TCL_OK or TCL_ERROR from the substituted variable read; if so,
			// there is no need to generate elaborate exception-management
			// code. Note that the first component of TCL_TOKEN_VARIABLE is
			// always TCL_TOKEN_TEXT...

			if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents > 1 {
				var i int32
				var foundCommand int32 = 0

				for i = 2; i <= (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents; i++ {
					if (*Tcl_Token)(unsafe.Pointer(tokenPtr+uintptr(i)*24)).Ftype == TCL_TOKEN_COMMAND {
						foundCommand = 1
						break
					}
				}
				if foundCommand != 0 {
					break
				}
			}

			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer(bp + 648 /* bline */))
			XTclCompileVarSubst(tls, interp, tokenPtr, envPtr)
			*(*int32)(unsafe.Pointer(bp + 648 /* bline */)) = (*CompileEnv)(unsafe.Pointer(envPtr)).Fline
			count++
			continue
		}

		for count > 255 {
			for ok21 := true; ok21; ok21 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(255))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STR_CONCAT1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok22 := true; ok22; ok22 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 255
						}
						for ok23 := true; ok23; ok23 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			count = count - 254
		}
		if count > 1 {
			for ok24 := true; ok24; ok24 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(count))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STR_CONCAT1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok25 := true; ok25; ok25 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - count
						}
						for ok26 := true; ok26; ok26 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			count = 1
		}

		if breakOffset == 0 {
			// Jump to the start (jump over the jump to end)
			XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+656)

			// Jump to the end (all BREAKs land here)
			breakOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			for ok27 := true; ok27; ok27 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_JUMP4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok28 := true; ok28; ok28 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok29 := true; ok29; ok29 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}

			// Start
			if XTclFixupForwardJump(tls, envPtr, bp+656, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+656)).FcodeOffset)), 127) != 0 {
				XTcl_Panic(tls, ts+19419,
					libc.VaList(bp, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+656)).FcodeOffset))))
			}
		}

		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer(bp + 648 /* bline */))
		catchRange = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
		for ok30 := true; ok30; ok30 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(catchRange) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(catchRange) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(catchRange) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(catchRange))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_BEGIN_CATCH4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok31 := true; ok31; ok31 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - catchRange
					}
					for ok32 := true; ok32; ok32 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
				return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
			}
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
		}()
		(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(catchRange)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)

		switch (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype {
		case TCL_TOKEN_COMMAND:
			XTclCompileScript(tls, interp, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart+uintptr(1), (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize-2,
				envPtr)
			count++
			break
		case TCL_TOKEN_VARIABLE:
			XTclCompileVarSubst(tls, interp, tokenPtr, envPtr)
			count++
			break
		default:
			XTcl_Panic(tls, ts+19466,
				libc.VaList(bp+8, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype))
		}

		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
		(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(catchRange)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(catchRange)*28)).FcodeOffset))

		// Substitution produced TCL_OK
		for ok33 := true; ok33; ok33 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_END_CATCH == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok34 := true; ok34; ok34 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok35 := true; ok35; ok35 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+672)
		for ok36 := true; ok36; ok36 = 0 != 0 {
			if -1 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
		}

		// Exceptional return codes processed here
		(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(catchRange)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		for ok37 := true; ok37; ok37 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok38 := true; ok38; ok38 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok39 := true; ok39; ok39 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok40 := true; ok40; ok40 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_PUSH_RESULT == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok41 := true; ok41; ok41 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok42 := true; ok42; ok42 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok43 := true; ok43; ok43 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_CODE)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_PUSH_RETURN_CODE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok44 := true; ok44; ok44 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_CODE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok45 := true; ok45; ok45 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok46 := true; ok46; ok46 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_END_CATCH == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok47 := true; ok47; ok47 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok48 := true; ok48; ok48 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok49 := true; ok49; ok49 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RETURN_CODE_BRANCH)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_RETURN_CODE_BRANCH == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok50 := true; ok50; ok50 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_RETURN_CODE_BRANCH].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok51 := true; ok51; ok51 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}

		// ERROR -> reraise it; NB: can't require BREAK/CONTINUE handling
		for ok52 := true; ok52; ok52 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RETURN_STK)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_RETURN_STK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok53 := true; ok53; ok53 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_RETURN_STK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok54 := true; ok54; ok54 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok55 := true; ok55; ok55 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NOP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_NOP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok56 := true; ok56; ok56 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_NOP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok57 := true; ok57; ok57 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}

		// RETURN
		XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+688)

		// BREAK
		XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+704)

		// CONTINUE
		XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+720)

		// OTHER
		XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+736)

		for ok58 := true; ok58; ok58 = 0 != 0 {
			if 1 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
		}
		// BREAK destination
		if XTclFixupForwardJump(tls, envPtr, bp+704, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+704)).FcodeOffset)), 127) != 0 {
			XTcl_Panic(tls, ts+19514,
				libc.VaList(bp+16, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+704)).FcodeOffset))))
		}
		for ok59 := true; ok59; ok59 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok60 := true; ok60; ok60 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok61 := true; ok61; ok61 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok62 := true; ok62; ok62 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok63 := true; ok63; ok63 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok64 := true; ok64; ok64 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}

		breakJump = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(breakOffset))
		if breakJump > 127 {
			for ok65 := true; ok65; ok65 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-breakJump) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-breakJump) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-breakJump) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-breakJump))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_JUMP4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok66 := true; ok66; ok66 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - -breakJump
						}
						for ok67 := true; ok67; ok67 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok68 := true; ok68; ok68 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-breakJump))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_JUMP1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok69 := true; ok69; ok69 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - -breakJump
						}
						for ok70 := true; ok70; ok70 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

		for ok71 := true; ok71; ok71 = 0 != 0 {
			if 2 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += 2
		}
		// CONTINUE destination
		if XTclFixupForwardJump(tls, envPtr, bp+720, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+720)).FcodeOffset)), 127) != 0 {
			XTcl_Panic(tls, ts+19561,
				libc.VaList(bp+24, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+720)).FcodeOffset))))
		}
		for ok72 := true; ok72; ok72 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok73 := true; ok73; ok73 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok74 := true; ok74; ok74 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok75 := true; ok75; ok75 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok76 := true; ok76; ok76 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok77 := true; ok77; ok77 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+752)

		for ok78 := true; ok78; ok78 = 0 != 0 {
			if 2 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += 2
		}
		// RETURN + other destination
		if XTclFixupForwardJump(tls, envPtr, bp+688, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+688)).FcodeOffset)), 127) != 0 {
			XTcl_Panic(tls, ts+19611,
				libc.VaList(bp+32, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+688)).FcodeOffset))))
		}
		if XTclFixupForwardJump(tls, envPtr, bp+736, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+736)).FcodeOffset)), 127) != 0 {
			XTcl_Panic(tls, ts+19659,
				libc.VaList(bp+40, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+736)).FcodeOffset))))
		}

		// Pull the result to top of stack, discard options dict.

		for ok79 := true; ok79; ok79 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok80 := true; ok80; ok80 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 2
					}
					for ok81 := true; ok81; ok81 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok82 := true; ok82; ok82 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok83 := true; ok83; ok83 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok84 := true; ok84; ok84 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}

		// OK destination
		if XTclFixupForwardJump(tls, envPtr, bp+672, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+672)).FcodeOffset)), 127) != 0 {
			XTcl_Panic(tls, ts+19706,
				libc.VaList(bp+48, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+672)).FcodeOffset))))
		}
		if count > 1 {
			for ok85 := true; ok85; ok85 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(count))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STR_CONCAT1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok86 := true; ok86; ok86 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - count
						}
						for ok87 := true; ok87; ok87 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			count = 1
		}

		// CONTINUE jump to here
		if XTclFixupForwardJump(tls, envPtr, bp+752, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+752)).FcodeOffset)), 127) != 0 {
			XTcl_Panic(tls, ts+19750,
				libc.VaList(bp+56, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+752)).FcodeOffset))))
		}
		*(*int32)(unsafe.Pointer(bp + 648 /* bline */)) = (*CompileEnv)(unsafe.Pointer(envPtr)).Fline
	}

	for count > 255 {
		for ok88 := true; ok88; ok88 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(255))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_CONCAT1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok89 := true; ok89; ok89 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 255
					}
					for ok90 := true; ok90; ok90 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		count = count - 254
	}
	if count > 1 {
		for ok91 := true; ok91; ok91 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(count))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_CONCAT1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok92 := true; ok92; ok92 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - count
					}
					for ok93 := true; ok93; ok93 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	XTcl_FreeParse(tls, bp+64)

	if *(*Tcl_InterpState)(unsafe.Pointer(bp + 640)) != uintptr(0) {
		XTcl_RestoreInterpState(tls, interp, *(*Tcl_InterpState)(unsafe.Pointer(bp + 640 /* state */)))
		XTclCompileSyntaxError(tls, interp, envPtr)
		for ok94 := true; ok94; ok94 = 0 != 0 {
			if -1 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
		}
	}

	// Final target of the multi-jump from all BREAKs
	if breakOffset > 0 {
		for ok95 := true; ok95; ok95 = 0 != 0 {
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(breakOffset))) = uint8(INST_JUMP4)
			for ok96 := true; ok96; ok96 = 0 != 0 {
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(breakOffset) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(breakOffset)) >> 24)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(breakOffset) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(breakOffset)) >> 16)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(breakOffset) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(breakOffset)) >> 8)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(breakOffset) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(breakOffset)))
			}
		}
	}
}

//----------------------------------------------------------------------
//
// TclCompileSwitchCmd --
//
//	Procedure called to compile the "switch" command.
//
// Results:
//	Returns TCL_OK for successful compile, or TCL_ERROR to defer
//	evaluation to runtime (either when it is too complex to get the
//	semantics right, or when we know for sure that it is an error but need
//	the error to happen at the right time).
//
// Side effects:
//	Instructions are added to envPtr to execute the "switch" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileSwitchCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:1731:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var mapPtr uintptr
	var eclIndex int32   // TIP #280
	var tokenPtr uintptr // Pointer to tokens in command.
	var numWords int32   // Number of words in command.

	var valueTokenPtr uintptr // Token for the value to switch on.
	var mode uint32
	// What kind of switch are we doing?

	var bodyTokenArray uintptr // Array of real pattern list items.
	var bodyToken uintptr      // Array of pointers to pattern list items.
	var bodyLines uintptr      // Array of line numbers for body list
	// items.
	var bodyContLines uintptr // Array of continuation line info.
	var noCase int32          // Has the -nocase flag been given?
	var foundMode int32       // Have we seen a mode flag yet?
	var i int32
	var valueIndex int32
	var result int32
	// var clNext uintptr at bp+16, 8

	var size uint32
	var chrs uintptr
	var prevBytes uintptr
	// var literal int32 at bp+8, 4

	// var bytes uintptr at bp, 8

	var maxLen int32
	var numBytes int32
	// var bline int32 at bp+12, 4

	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	foundMode = 0
	result = TCL_ERROR
	*(*uintptr)(unsafe.Pointer(bp + 16 /* clNext */)) = (*CompileEnv)(unsafe.Pointer(envPtr)).FclNext

	// Only handle the following versions:
	//   switch         ?--? word {pattern body ...}
	//   switch -exact  ?--? word {pattern body ...}
	//   switch -glob   ?--? word {pattern body ...}
	//   switch -regexp ?--? word {pattern body ...}
	//   switch         --   word simpleWordPattern simpleWordBody ...
	//   switch -exact  --   word simpleWordPattern simpleWordBody ...
	//   switch -glob   --   word simpleWordPattern simpleWordBody ...
	//   switch -regexp --   word simpleWordPattern simpleWordBody ...
	// When the mode is -glob, can also handle a -nocase flag.
	//
	// First off, we don't care how the command's word was generated; we're
	// compiling it anyway! So skip it...

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	valueIndex = 1
	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords - 1

	// Check for options.

	noCase = 0
	mode = uint32(0) /* Switch_Exact */
	if !(numWords == 2) {
		goto __1
	}
	// There's just the switch value and the bodies list. In that case, we
	// can skip all option parsing and move on to consider switch values
	// and the body list.

	goto finishedOptionParse
__1:
	;

	// There must be at least one option, --, because without that there is no
	// way to statically avoid the problems you get from strings-to-be-matched
	// that start with a - (the interpreted code falls apart if it encounters
	// them, so we punt if we *might* encounter them as that is the easiest
	// way of emulating the behaviour).

__2:
	if !(numWords >= 3) {
		goto __4
	}
	size = uint32((*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fsize)
	chrs = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart

	// We only process literal options, and we assume that -e, -g and -n
	// are unique prefixes of -exact, -glob and -nocase respectively (true
	// at time of writing). Note that -exact and -glob may only be given
	// at most once or we bail out (error case).

	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD || size < uint32(2)) {
		goto __5
	}
	return TCL_ERROR
__5:
	;

	if !(size <= uint32(6) && !(libc.Xmemcmp(tls, chrs, ts+15508, uint64(size)) != 0)) {
		goto __6
	}
	if !(foundMode != 0) {
		goto __8
	}
	return TCL_ERROR
__8:
	;
	mode = uint32(0) /* Switch_Exact */
	foundMode = 1
	valueIndex++
	goto __3
	goto __7
__6:
	if !(size <= uint32(5) && !(libc.Xmemcmp(tls, chrs, ts+15515, uint64(size)) != 0)) {
		goto __9
	}
	if !(foundMode != 0) {
		goto __11
	}
	return TCL_ERROR
__11:
	;
	mode = uint32(1) /* Switch_Glob */
	foundMode = 1
	valueIndex++
	goto __3
	goto __10
__9:
	if !(size <= uint32(7) && !(libc.Xmemcmp(tls, chrs, ts+15576, uint64(size)) != 0)) {
		goto __12
	}
	if !(foundMode != 0) {
		goto __14
	}
	return TCL_ERROR
__14:
	;
	mode = uint32(2) /* Switch_Regexp */
	foundMode = 1
	valueIndex++
	goto __3
	goto __13
__12:
	if !(size <= uint32(7) && !(libc.Xmemcmp(tls, chrs, ts+15557, uint64(size)) != 0)) {
		goto __15
	}
	noCase = 1
	valueIndex++
	goto __3
	goto __16
__15:
	if !(size == uint32(2) && !(libc.Xmemcmp(tls, chrs, ts+16430, uint64(2)) != 0)) {
		goto __17
	}
	valueIndex++
	goto __4
__17:
	;
__16:
	;
__13:
	;
__10:
	;
__7:
	;

	// The switch command has many flags we cannot compile at all (e.g.
	// all the RE-related ones) which we must have encountered. Either
	// that or we have run off the end. The action here is the same: punt
	// to interpreted version.

	return TCL_ERROR
	goto __3
__3:
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	numWords--
	goto __2
	goto __4
__4:
	;
	if !(numWords < 3) {
		goto __18
	}
	return TCL_ERROR
__18:
	;
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	numWords--
	if !(noCase != 0 && mode == uint32(0)) {
		goto __19
	}
	// Can't compile this case; no opcode for case-insensitive equality!

	return TCL_ERROR
__19:
	;

	// The value to test against is going to always get pushed on the stack.
	// But not yet; we need to verify that the rest of the command is
	// compilable too.

finishedOptionParse:
	valueTokenPtr = tokenPtr
	// For valueIndex, see previous loop.
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	numWords--

	// Build an array of tokens for the matcher terms and script bodies. Note
	// that in the case of the quoted bodies, this is tricky as we cannot use
	// copies of the string from the input token for the generated tokens (it
	// causes a crash during exception handling). When multiple tokens are
	// available at this point, this is pretty easy.

	if !(numWords == 1) {
		goto __20
	} // TIP #280: line of the pattern/action list,
	// and start of list for when tracking the
	// location. This list comes immediately after
	// the value we switch on.

	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __22
	}
	return TCL_ERROR
__22:
	;
	*(*uintptr)(unsafe.Pointer(bp /* bytes */)) = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart
	numBytes = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fsize

	// Allocate enough space to work in.
	maxLen = XTclMaxListLength(tls, *(*uintptr)(unsafe.Pointer(bp /* bytes */)), numBytes, uintptr(0))
	if !(maxLen < 2) {
		goto __23
	}
	return TCL_ERROR
__23:
	;
	bodyTokenArray = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(Tcl_Token{}))*uint64(maxLen)))
	bodyToken = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(maxLen)))
	bodyLines = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(int32(0)))*uint64(maxLen)))
	bodyContLines = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(maxLen)))

	*(*int32)(unsafe.Pointer(bp + 12 /* bline */)) = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(valueIndex+1)*4))
	numWords = 0

__24:
	if !(numBytes > 0) {
		goto __25
	}
	prevBytes = *(*uintptr)(unsafe.Pointer(bp /* bytes */))

	if !(TCL_OK != XTclFindElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp)), numBytes,
		bodyTokenArray+uintptr(numWords)*24+8, bp,
		bodyTokenArray+uintptr(numWords)*24+16, bp+8) || !(*(*int32)(unsafe.Pointer(bp + 8)) != 0)) {
		goto __26
	}
	goto abort
__26:
	;

	(*Tcl_Token)(unsafe.Pointer(bodyTokenArray + uintptr(numWords)*24)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(bodyTokenArray + uintptr(numWords)*24)).FnumComponents = 0
	*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(numWords)*8)) = bodyTokenArray + uintptr(numWords)*24

	// TIP #280: Now determine the line the list element starts on
	// (there is no need to do it earlier, due to the possibility of
	// aborting, see above).

	XTclAdvanceLines(tls, bp+12, prevBytes, (*Tcl_Token)(unsafe.Pointer(bodyTokenArray+uintptr(numWords)*24)).Fstart)
	XTclAdvanceContinuations(tls, bp+12, bp+16,
		int32((int64((*Tcl_Token)(unsafe.Pointer(bodyTokenArray+uintptr(numWords)*24)).Fstart)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1))
	*(*int32)(unsafe.Pointer(bodyLines + uintptr(numWords)*4)) = *(*int32)(unsafe.Pointer(bp + 12 /* bline */))
	*(*uintptr)(unsafe.Pointer(bodyContLines + uintptr(numWords)*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* clNext */))
	XTclAdvanceLines(tls, bp+12, (*Tcl_Token)(unsafe.Pointer(bodyTokenArray+uintptr(numWords)*24)).Fstart, *(*uintptr)(unsafe.Pointer(bp /* bytes */)))
	XTclAdvanceContinuations(tls, bp+12, bp+16, int32((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1))

	numBytes = int32(int64(numBytes) - (int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(prevBytes))/1)
	numWords++
	goto __24
__25:
	;
	if !(numWords%2 != 0) {
		goto __27
	}
abort:
	XTclpFree(tls, bodyToken)
	XTclpFree(tls, bodyTokenArray)
	XTclpFree(tls, bodyLines)
	XTclpFree(tls, bodyContLines)
	return TCL_ERROR
__27:
	;
	goto __21
__20:
	if !(numWords%2 != 0 || numWords == 0) {
		goto __28
	}
	// Odd number of words (>1) available, or no words at all available.
	// Both are error cases, so punt and let the interpreted-version
	// generate the error message. Note that the second case probably
	// should get caught earlier, but it's easy to check here again anyway
	// because it'd cause a nasty crash otherwise.

	return TCL_ERROR
	goto __29
__28:
	// Multi-word definition of patterns & actions.

	bodyToken = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(numWords)))
	bodyLines = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(int32(0)))*uint64(numWords)))
	bodyContLines = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(numWords)))
	bodyTokenArray = uintptr(0)
	i = 0
__30:
	if !(i < numWords) {
		goto __32
	}
	// We only handle the very simplest case. Anything more complex is
	// a good reason to go to the interpreted case anyway due to
	// traces, etc.

	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __33
	}
	goto freeTemporaries
__33:
	;
	*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)) = tokenPtr + uintptr(1)*24

	// TIP #280: Copy line information from regular cmd info.

	*(*int32)(unsafe.Pointer(bodyLines + uintptr(i)*4)) = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(valueIndex+1+i)*4))
	*(*uintptr)(unsafe.Pointer(bodyContLines + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(valueIndex+1+i)*8))
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __31
__31:
	i++
	goto __30
	goto __32
__32:
	;
__29:
	;
__21:
	;

	// Fall back to interpreted if the last body is a continuation (it's
	// illegal, but this makes the error happen at the right time).

	if !((*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(numWords-1)*8)))).Fsize == 1 && int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(numWords-1)*8)))).Fstart))) == '-') {
		goto __34
	}
	goto freeTemporaries
__34:
	;

	// Now we commit to generating code; the parsing stage per se is done.
	// Check if we can generate a jump table, since if so that's faster than
	// doing an explicit compare with each body. Note that we're definitely
	// over-conservative with determining whether we can do the jump table,
	// but it handles the most common case well enough.

	// Both methods push the value to match against onto the stack.
	if !((*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __35
	}
__37:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __40
	}
__42:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __45
	}
	XTclExpandCodeArray(tls, envPtr)
__45:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __46
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__46:
	;
__47:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __50
	}
	if !(_delta == -0x7fffffff-1) {
		goto __51
	}
	_delta = 1 - _objIndexCopy
__51:
	;
__52:
	if !(_delta < 0) {
		goto __55
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __56
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__56:
	;
__55:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
__50:
	;
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
	goto __41
__40:
__57:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __60
	}
	XTclExpandCodeArray(tls, envPtr)
__60:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __61
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__61:
	;
__62:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __65
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __66
	}
	_delta1 = 1 - _objIndexCopy
__66:
	;
__67:
	if !(_delta1 < 0) {
		goto __70
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __71
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__71:
	;
__70:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
__65:
	;
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
	goto __58
__58:
	if 0 != 0 {
		goto __57
	}
	goto __59
__59:
	;
__41:
	;
	goto __38
__38:
	if 0 != 0 {
		goto __37
	}
	goto __39
__39:
	;
	goto __36
__35:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(valueIndex)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(valueIndex)*8))
	XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
__36:
	;

	if !(mode == uint32(0)) {
		goto __72
	}
	sIssueSwitchJumpTable(tls, interp, envPtr, valueIndex, numWords, bodyToken,
		bodyLines, bodyContLines)
	goto __73
__72:
	sIssueSwitchChainedTests(tls, interp, envPtr, int32(mode), noCase, valueIndex,
		numWords, bodyToken, bodyLines, bodyContLines)
__73:
	;
	result = TCL_OK

	// Clean up all our temporary space and return.

freeTemporaries:
	XTclpFree(tls, bodyToken)
	XTclpFree(tls, bodyLines)
	XTclpFree(tls, bodyContLines)
	if !(bodyTokenArray != uintptr(0)) {
		goto __74
	}
	XTclpFree(tls, bodyTokenArray)
__74:
	;
	return result
}

//----------------------------------------------------------------------
//
// IssueSwitchChainedTests --
//
//	Generate instructions for a [switch] command that is to be compiled
//	into a sequence of tests. This is the generic handle-everything mode
//	that inherently has performance that is (on average) linear in the
//	number of tests. It is the only mode that can handle -glob and -regexp
//	matches, or anything that is case-insensitive. It does not handle the
//	wild-and-wooly end of regexp matching (i.e., capture of match results)
//	so that's when we spill to the interpreted version.
//
//----------------------------------------------------------------------

func sIssueSwitchChainedTests(tls *libc.TLS, interp uintptr, envPtr uintptr, mode int32, noCase int32, valueIndex int32, numBodyTokens int32, bodyToken uintptr, bodyLines uintptr, bodyContLines uintptr) { /* tclCompCmdsSZ.c:2060:1: */
	bp := tls.Alloc(228)
	defer tls.Free(228)

	var foundDefault int32 // Flag to indicate whether a "default" clause
	// is present.
	var fixupArray uintptr       // Array of forward-jump fixup records.
	var fixupTargetArray uintptr // Array of places for fixups to point at.
	var fixupCount int32         // Number of places to fix up.
	var contFixIndex int32       // Where the first of the jumps due to a group
	// of continuation bodies starts, or -1 if
	// there aren't any.
	var contFixCount int32 // Number of continuation bodies pointing to
	// the current (or next) real body.
	var nextArmFixupIndex int32
	var simple int32
	// var exact int32 at bp+224, 4
	// For extracting the type of regexp.
	var i int32

	// Generate a test for each arm.

	contFixIndex = -1
	contFixCount = 0
	fixupArray = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(JumpFixup{}))*uint64(numBodyTokens)))
	fixupTargetArray = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numBodyTokens)))
	libc.Xmemset(tls, fixupTargetArray, 0, uint64(numBodyTokens)*uint64(unsafe.Sizeof(int32(0))))
	fixupCount = 0
	foundDefault = 0
	for i = 0; i < numBodyTokens; i = i + 2 {
		nextArmFixupIndex = -1
		if i != numBodyTokens-2 || (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(numBodyTokens-2)*8)))).Fsize != 7 || libc.Xmemcmp(tls, (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(numBodyTokens-2)*8)))).Fstart, ts+12033, uint64(7)) != 0 {
			// Generate the test for the arm.

			switch mode {
			case 0 /* Switch_Exact */ :
				for ok := true; ok; ok = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_DUP == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok1 := true; ok1; ok1 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok2 := true; ok2; ok2 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				XTclCompileTokens(tls, interp, *(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)), 1, envPtr)
				for ok3 := true; ok3; ok3 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STR_EQ == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok4 := true; ok4; ok4 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STR_EQ].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok5 := true; ok5; ok5 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				break
				fallthrough
			case 1 /* Switch_Glob */ :
				XTclCompileTokens(tls, interp, *(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)), 1, envPtr)
				for ok6 := true; ok6; ok6 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_OVER == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok7 := true; ok7; ok7 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 1
							}
							for ok8 := true; ok8; ok8 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_MATCH)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(noCase))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STR_MATCH == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok10 := true; ok10; ok10 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STR_MATCH].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - noCase
							}
							for ok11 := true; ok11; ok11 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				break
				fallthrough
			case 2 /* Switch_Regexp */ :
				simple = libc.AssignPtrInt32(bp+224 /* exact */, 0)

				// Keep in sync with TclCompileRegexpCmd.

				if (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)))).Ftype == TCL_TOKEN_TEXT {
					// var ds Tcl_DString at bp+8, 216

					if (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)))).Fsize == 0 {
						// The semantics of regexps are that they always match
						// when the RE == "".

						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
							if _objIndexCopy <= 255 {
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
										XTclExpandCodeArray(tls, envPtr)
									}
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
											if INST_PUSH1 == INST_START_CMD {
												return 1
											}
											return 0
										}()
									}
									for ok14 := true; ok14; ok14 = 0 != 0 {
										var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
										if _delta != 0 {
											if _delta == -0x7fffffff-1 {
												_delta = 1 - _objIndexCopy
											}
											for ok15 := true; ok15; ok15 = 0 != 0 {
												if _delta < 0 {
													if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
														(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
													}
												}
												*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
											}
										}
									}
								}
							} else {
								for ok16 := true; ok16; ok16 = 0 != 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
										XTclExpandCodeArray(tls, envPtr)
									}
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
											if INST_PUSH4 == INST_START_CMD {
												return 1
											}
											return 0
										}()
									}
									for ok17 := true; ok17; ok17 = 0 != 0 {
										var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
										if _delta != 0 {
											if _delta == -0x7fffffff-1 {
												_delta = 1 - _objIndexCopy
											}
											for ok18 := true; ok18; ok18 = 0 != 0 {
												if _delta < 0 {
													if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
														(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
													}
												}
												*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
											}
										}
									}
								}
							}
						}
						break
					}

					// Attempt to convert pattern to glob. If successful, push
					// the converted pattern.

					if XTclReToGlob(tls, uintptr(0), (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)))).Fstart,
						(*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)))).Fsize, bp+8, bp+224, uintptr(0)) == TCL_OK {
						simple = 1
						for ok19 := true; ok19; ok19 = 0 != 0 {
							var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_DString)(unsafe.Pointer(bp+8)).Fstring, (*Tcl_DString)(unsafe.Pointer(bp+8)).Flength, 0)
							if _objIndexCopy <= 255 {
								for ok20 := true; ok20; ok20 = 0 != 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
										XTclExpandCodeArray(tls, envPtr)
									}
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
											if INST_PUSH1 == INST_START_CMD {
												return 1
											}
											return 0
										}()
									}
									for ok21 := true; ok21; ok21 = 0 != 0 {
										var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
										if _delta != 0 {
											if _delta == -0x7fffffff-1 {
												_delta = 1 - _objIndexCopy
											}
											for ok22 := true; ok22; ok22 = 0 != 0 {
												if _delta < 0 {
													if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
														(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
													}
												}
												*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
											}
										}
									}
								}
							} else {
								for ok23 := true; ok23; ok23 = 0 != 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
										XTclExpandCodeArray(tls, envPtr)
									}
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
									*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
											if INST_PUSH4 == INST_START_CMD {
												return 1
											}
											return 0
										}()
									}
									for ok24 := true; ok24; ok24 = 0 != 0 {
										var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
										if _delta != 0 {
											if _delta == -0x7fffffff-1 {
												_delta = 1 - _objIndexCopy
											}
											for ok25 := true; ok25; ok25 = 0 != 0 {
												if _delta < 0 {
													if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
														(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
													}
												}
												*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
											}
										}
									}
								}
							}
						}
						XTcl_DStringFree(tls, bp+8)
					}
				}
				if !(simple != 0) {
					XTclCompileTokens(tls, interp, *(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)), 1, envPtr)
				}

				for ok26 := true; ok26; ok26 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_OVER == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok27 := true; ok27; ok27 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 1
							}
							for ok28 := true; ok28; ok28 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				if !(simple != 0) {
					// Pass correct RE compile flags. We use only Int1
					// (8-bit), but that handles all the flags we want to
					// pass. Don't use TCL_REG_NOSUB as we may have backrefs
					// or capture vars.

					var cflags int32 = TCL_REG_ADVANCED |
						func() int32 {
							if noCase != 0 {
								return TCL_REG_NOCASE
							}
							return 0
						}()

					for ok29 := true; ok29; ok29 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REGEXP)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(cflags))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_REGEXP == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok30 := true; ok30; ok30 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_REGEXP].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - cflags
								}
								for ok31 := true; ok31; ok31 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else if *(*int32)(unsafe.Pointer(bp + 224)) != 0 && !(noCase != 0) {
					for ok32 := true; ok32; ok32 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STR_EQ == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok33 := true; ok33; ok33 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STR_EQ].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - 0
								}
								for ok34 := true; ok34; ok34 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok35 := true; ok35; ok35 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_MATCH)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(noCase))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STR_MATCH == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok36 := true; ok36; ok36 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STR_MATCH].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - noCase
								}
								for ok37 := true; ok37; ok37 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
				break
				fallthrough
			default:
				XTcl_Panic(tls, ts+19795, libc.VaList(bp, mode))
			}

			// In a fall-through case, we will jump on _true_ to the place
			// where the body starts (generated later, with guarantee of this
			// ensured earlier; the final body is never a fall-through).

			if (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i+1)*8)))).Fsize == 1 && int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i+1)*8)))).Fstart))) == '-' {
				if contFixIndex == -1 {
					contFixIndex = fixupCount
					contFixCount = 0
				}
				XTclEmitForwardJump(tls, envPtr, TCL_TRUE_JUMP,
					fixupArray+uintptr(contFixIndex+contFixCount)*16)
				fixupCount++
				contFixCount++
				continue
			}

			XTclEmitForwardJump(tls, envPtr, TCL_FALSE_JUMP,
				fixupArray+uintptr(fixupCount)*16)
			nextArmFixupIndex = fixupCount
			fixupCount++
		} else {
			// Got a default clause; set a flag to inhibit the generation of
			// the jump after the body and the cleanup of the intermediate
			// value that we are switching against.
			//
			// Note that default clauses (which are always terminal clauses)
			// cannot be fall-through clauses as well, since the last clause
			// is never a fall-through clause (which we have already
			// verified).

			foundDefault = 1
		}

		// Generate the body for the arm. This is guaranteed not to be a
		// fall-through case, but it might have preceding fall-through cases,
		// so we must process those first.

		if contFixIndex != -1 {
			var j int32

			for j = 0; j < contFixCount; j++ {
				*(*uint32)(unsafe.Pointer(fixupTargetArray + uintptr(contFixIndex+j)*4)) = uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			}
			contFixIndex = -1
		}

		// Now do the actual compilation. Note that we do not use BODY()
		// because we may have synthesized the tokens in a non-standard
		// pattern.

		for ok38 := true; ok38; ok38 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok39 := true; ok39; ok39 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok40 := true; ok40; ok40 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer(bodyLines + uintptr(i+1)*4))         // TIP #280
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer(bodyContLines + uintptr(i+1)*8)) // TIP #280
		XTclCompileCmdWord(tls, interp, *(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i+1)*8)), 1, envPtr)

		if !(foundDefault != 0) {
			XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP,
				fixupArray+uintptr(fixupCount)*16)
			fixupCount++
			*(*uint32)(unsafe.Pointer(fixupTargetArray + uintptr(nextArmFixupIndex)*4)) = uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		}
	}

	// Discard the value we are matching against unless we've had a default
	// clause (in which case it will already be gone due to the code at the
	// start of processing an arm, guaranteed) and make the result of the
	// command an empty string.

	if !(foundDefault != 0) {
		for ok41 := true; ok41; ok41 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok42 := true; ok42; ok42 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok43 := true; ok43; ok43 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok44 := true; ok44; ok44 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok45 := true; ok45; ok45 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok46 := true; ok46; ok46 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok47 := true; ok47; ok47 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok48 := true; ok48; ok48 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok49 := true; ok49; ok49 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok50 := true; ok50; ok50 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}

	// Do jump fixups for arms that were executed. First, fill in the jumps of
	// all jumps that don't point elsewhere to point to here.

	for i = 0; i < fixupCount; i++ {
		if *(*uint32)(unsafe.Pointer(fixupTargetArray + uintptr(i)*4)) == uint32(0) {
			*(*uint32)(unsafe.Pointer(fixupTargetArray + uintptr(i)*4)) = uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		}
	}

	// Now scan backwards over all the jumps (all of which are forward jumps)
	// doing each one. When we do one and there is a size changes, we must
	// scan back over all the previous ones and see if they need adjusting
	// before proceeding with further jump fixups (the interleaved nature of
	// all the jumps makes this impossible to do without nested loops).

	for i = fixupCount - 1; i >= 0; i-- {
		if XTclFixupForwardJump(tls, envPtr, fixupArray+uintptr(i)*16,
			int32(*(*uint32)(unsafe.Pointer(fixupTargetArray + uintptr(i)*4))-(*JumpFixup)(unsafe.Pointer(fixupArray+uintptr(i)*16)).FcodeOffset), 127) != 0 {
			var j int32

			for j = i - 1; j >= 0; j-- {
				if *(*uint32)(unsafe.Pointer(fixupTargetArray + uintptr(j)*4)) > (*JumpFixup)(unsafe.Pointer(fixupArray+uintptr(i)*16)).FcodeOffset {
					*(*uint32)(unsafe.Pointer(fixupTargetArray + uintptr(j)*4)) += uint32(3)
				}
			}
		}
	}
	XTclStackFree(tls, interp, fixupTargetArray)
	XTclStackFree(tls, interp, fixupArray)
}

//----------------------------------------------------------------------
//
// IssueSwitchJumpTable --
//
//	Generate instructions for a [switch] command that is to be compiled
//	into a jump table. This only handles the case where case-sensitive,
//	exact matching is used, but this is actually the most common case in
//	real code.
//
//----------------------------------------------------------------------

func sIssueSwitchJumpTable(tls *libc.TLS, interp uintptr, envPtr uintptr, valueIndex int32, numBodyTokens int32, bodyToken uintptr, bodyLines uintptr, bodyContLines uintptr) { /* tclCompCmdsSZ.c:2311:1: */
	bp := tls.Alloc(220)
	defer tls.Free(220)

	var jtPtr uintptr
	var infoIndex int32
	// var isNew int32 at bp+216, 4

	var finalFixups uintptr
	var numRealBodies int32 = 0
	var jumpLocation int32
	var mustGenerate int32
	var foundDefault int32
	var jumpToDefault int32
	var i int32
	// var buffer Tcl_DString at bp, 216

	var hPtr uintptr

	// Compile the switch by using a jump table, which is basically a
	// hashtable that maps from literal values to match against to the offset
	// (relative to the INST_JUMP_TABLE instruction) to jump to. The jump
	// table itself is independent of any invokation of the bytecode, and as
	// such is stored in an auxData block.
	//
	// Start by allocating the jump table itself, plus some workspace.

	jtPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(JumptableInfo{})))
	XTcl_InitHashTable(tls, jtPtr, 0)
	infoIndex = XTclCreateAuxData(tls, jtPtr, uintptr(unsafe.Pointer(&XtclJumptableInfoType)), envPtr)
	finalFixups = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numBodyTokens/2)))
	foundDefault = 0
	mustGenerate = 1

	// Next, issue the instruction to do the jump, together with what we want
	// to do if things do not work out (jump to either the default clause or
	// the "default" default, which just sets the result to empty). Note that
	// we will come back and rewrite the jump's offset parameter when we know
	// what it should be, and that all jumps we issue are of the wide kind
	// because that makes the code much easier to debug!

	jumpLocation = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TABLE)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(infoIndex))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP_TABLE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP_TABLE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - infoIndex
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	jumpToDefault = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok3 := true; ok3; ok3 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	for i = 0; i < numBodyTokens; i = i + 2 {
		// For each arm, we must first work out what to do with the match
		// term.

		if i != numBodyTokens-2 || (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(numBodyTokens-2)*8)))).Fsize != 7 || libc.Xmemcmp(tls, (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(numBodyTokens-2)*8)))).Fstart, ts+12033, uint64(7)) != 0 {
			// This is not a default clause, so insert the current location as
			// a target in the jump table (assuming it isn't already there,
			// which would indicate that this clause is probably masked by an
			// earlier one). Note that we use a Tcl_DString here simply
			// because the hash API does not let us specify the string length.

			XTcl_DStringInit(tls, bp)
			XTcl_DStringAppend(tls, bp, (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)))).Fstart, (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i)*8)))).Fsize)
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(jtPtr /* &.hashTable */)).FcreateProc})).f(tls, jtPtr /* &.hashTable */, (*Tcl_DString)(unsafe.Pointer(bp /* &buffer */)).Fstring, bp+216 /* &isNew */)
			if *(*int32)(unsafe.Pointer(bp + 216)) != 0 {
				// First time we've encountered this match clause, so it must
				// point to here.

				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = ClientData((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(jumpLocation))
			}
			XTcl_DStringFree(tls, bp)
		} else {
			// This is a default clause, so patch up the fallthrough from the
			// INST_JUMP_TABLE instruction to here.

			foundDefault = 1
			*(*int32)(unsafe.Pointer(bp + 216 /* isNew */)) = 1
			for ok6 := true; ok6; ok6 = 0 != 0 {
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpToDefault) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(jumpToDefault)) >> 24)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpToDefault) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(jumpToDefault)) >> 16)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpToDefault) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(jumpToDefault)) >> 8)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpToDefault) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(jumpToDefault)))
			}
		}

		// Now, for each arm we must deal with the body of the clause.
		//
		// If this is a continuation body (never true of a final clause,
		// whether default or not) we're done because the next jump target
		// will also point here, so we advance to the next clause.

		if (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i+1)*8)))).Fsize == 1 && int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i+1)*8)))).Fstart))) == '-' {
			mustGenerate = 1
			continue
		}

		// Also skip this arm if its only match clause is masked. (We could
		// probably be more aggressive about this, but that would be much more
		// difficult to get right.)

		if !(*(*int32)(unsafe.Pointer(bp + 216)) != 0) && !(mustGenerate != 0) {
			continue
		}
		mustGenerate = 0

		// Compile the body of the arm.

		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer(bodyLines + uintptr(i+1)*4))         // TIP #280
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer(bodyContLines + uintptr(i+1)*8)) // TIP #280
		XTclCompileCmdWord(tls, interp, *(*uintptr)(unsafe.Pointer(bodyToken + uintptr(i+1)*8)), 1, envPtr)

		// Compile a jump in to the end of the command if this body is
		// anything other than a user-supplied default arm (to either skip
		// over the remaining bodies or the code that generates an empty
		// result).

		if i+2 < numBodyTokens || !(foundDefault != 0) {
			*(*int32)(unsafe.Pointer(finalFixups + uintptr(libc.PostIncInt32(&numRealBodies, 1))*4)) = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)

			// Easier by far to issue this jump as a fixed-width jump, since
			// otherwise we'd need to do a lot more (and more awkward)
			// rewriting when we fixed this all up.

			for ok7 := true; ok7; ok7 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_JUMP4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok8 := true; ok8; ok8 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok10 := true; ok10; ok10 = 0 != 0 {
				if -1 < 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
					}
				}
				*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
			}
		}
	}

	// We're at the end. If we've not already done so through the processing
	// of a user-supplied default clause, add in a "default" default clause
	// now.

	if !(foundDefault != 0) {
		for ok11 := true; ok11; ok11 = 0 != 0 {
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpToDefault) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(jumpToDefault)) >> 24)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpToDefault) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(jumpToDefault)) >> 16)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpToDefault) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(jumpToDefault)) >> 8)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpToDefault) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(jumpToDefault)))
		}
		for ok12 := true; ok12; ok12 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok13 := true; ok13; ok13 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok14 := true; ok14; ok14 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok15 := true; ok15; ok15 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok17 := true; ok17; ok17 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok18 := true; ok18; ok18 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}

	// No more instructions to be issued; everything that needs to jump to the
	// end of the command is fixed up at this point.

	for i = 0; i < numRealBodies; i++ {
		for ok19 := true; ok19; ok19 = 0 != 0 {
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(finalFixups + uintptr(i)*4))) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(finalFixups + uintptr(i)*4)))) >> 24)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(finalFixups + uintptr(i)*4))) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(finalFixups + uintptr(i)*4)))) >> 16)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(finalFixups + uintptr(i)*4))) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(finalFixups + uintptr(i)*4)))) >> 8)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(finalFixups + uintptr(i)*4))) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(*(*int32)(unsafe.Pointer(finalFixups + uintptr(i)*4)))))
		}
	}

	// Clean up all our temporary space and return.

	XTclStackFree(tls, interp, finalFixups)
}

//----------------------------------------------------------------------
//
// DupJumptableInfo, FreeJumptableInfo --
//
//	Functions to duplicate, release and print a jump-table created for use
//	with the INST_JUMP_TABLE instruction.
//
// Results:
//	DupJumptableInfo: a copy of the jump-table
//	FreeJumptableInfo: none
//	PrintJumptableInfo: none
//	DisassembleJumptableInfo: none
//
// Side effects:
//	DupJumptableInfo: allocates memory
//	FreeJumptableInfo: releases memory
//	PrintJumptableInfo: none
//	DisassembleJumptableInfo: none
//
//----------------------------------------------------------------------

func sDupJumptableInfo(tls *libc.TLS, clientData ClientData) ClientData { /* tclCompCmdsSZ.c:2507:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var jtPtr uintptr = clientData
	var newJtPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(JumptableInfo{})))
	var hPtr uintptr
	var newHPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	// var isNew int32 at bp+24, 4

	XTcl_InitHashTable(tls, newJtPtr, 0)
	hPtr = XTcl_FirstHashEntry(tls, jtPtr, bp)
	for hPtr != uintptr(0) {
		newHPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(newJtPtr /* &.hashTable */)).FcreateProc})).f(tls, newJtPtr /* &.hashTable */, func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(jtPtr /* &.hashTable */)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(jtPtr /* &.hashTable */)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(hPtr + 32 /* &.key */))
			}
			return hPtr + 32 /* &.key */
		}(), bp+24)
		(*Tcl_HashEntry)(unsafe.Pointer(newHPtr)).FclientData = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	}
	return newJtPtr
}

func sFreeJumptableInfo(tls *libc.TLS, clientData ClientData) { /* tclCompCmdsSZ.c:2527:1: */
	var jtPtr uintptr = clientData

	XTcl_DeleteHashTable(tls, jtPtr)
	XTclpFree(tls, jtPtr)
}

func sPrintJumptableInfo(tls *libc.TLS, clientData ClientData, appendObj uintptr, codePtr uintptr, pcOffset uint32) { /* tclCompCmdsSZ.c:2537:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var jtPtr uintptr = clientData
	var hPtr uintptr
	// var search Tcl_HashSearch at bp+16, 24

	var keyPtr uintptr
	var offset int32
	var i int32 = 0

	hPtr = XTcl_FirstHashEntry(tls, jtPtr, bp+16)
	for ; hPtr != 0; hPtr = XTcl_NextHashEntry(tls, bp+16) {
		keyPtr = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(jtPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(jtPtr)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(hPtr + 32))
			}
			return hPtr + 32
		}()
		offset = int32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)

		if libc.PostIncInt32(&i, 1) != 0 {
			XTcl_AppendToObj(tls, appendObj, ts+19153, -1)
			if i%4 == 0 {
				XTcl_AppendToObj(tls, appendObj, ts+19819, -1)
			}
		}
		XTcl_AppendPrintfToObj(tls, appendObj, ts+19823,
			libc.VaList(bp, keyPtr, pcOffset+uint32(offset)))
	}
}

func sDisassembleJumptableInfo(tls *libc.TLS, clientData ClientData, dictObj uintptr, codePtr uintptr, pcOffset uint32) { /* tclCompCmdsSZ.c:2566:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var jtPtr uintptr = clientData
	var mapping uintptr = XTcl_NewObj(tls)
	var hPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	var keyPtr uintptr
	var offset int32

	hPtr = XTcl_FirstHashEntry(tls, jtPtr, bp)
	for ; hPtr != 0; hPtr = XTcl_NextHashEntry(tls, bp) {
		keyPtr = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(jtPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(jtPtr)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(hPtr + 32))
			}
			return hPtr + 32
		}()
		offset = int32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
		XTcl_DictObjPut(tls, uintptr(0), mapping, XTcl_NewStringObj(tls, keyPtr, -1),
			XTcl_NewIntObj(tls, offset))
	}
	XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+19835, -1), mapping)
}

//----------------------------------------------------------------------
//
// TclCompileTailcallCmd --
//
//	Procedure called to compile the "tailcall" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "tailcall" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileTailcallCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:2608:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	var i int32

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 256 ||
		(*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr == uintptr(0) {
		return TCL_ERROR
	}

	// make room for the nsObjPtr
	// TODO: Doesn't this have to be a known value?
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc + uintptr(eclIndex)*24)).Fline))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc + uintptr(eclIndex)*24)).Fnext))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for i = 1; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	}
	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TAILCALL)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_TAILCALL == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_TAILCALL].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileThrowCmd --
//
//	Procedure called to compile the "throw" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "throw" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileThrowCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:2655:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var numWords int32
	var codeToken uintptr
	var msgToken uintptr
	var objPtr uintptr
	var codeKnown int32
	var codeIsList int32
	var codeIsValid int32
	// var len int32 at bp, 4

	var _delta int32
	var _delta1 int32
	var _objIndexCopy int32
	var _delta2 int32
	var _delta3 int32
	var _objIndexCopy1 int32
	var _delta4 int32
	var _delta5 int32
	var _objIndexCopy2 int32
	var _delta6 int32
	var _delta7 int32
	var _objIndexCopy3 int32
	var errPtr uintptr
	var dictPtr uintptr
	var _delta8 int32
	var _delta9 int32
	var _delta10 int32
	var _delta11 int32
	var _delta12 int32
	var _delta13 int32
	var _delta14 int32
	var _delta15 int32
	var _delta16 int32
	var _delta17 int32
	var _delta18 int32
	var _delta19 int32
	var _objIndexCopy4 int32
	var _delta20 int32
	var _delta21 int32
	var _objIndexCopy5 int32
	var _delta22 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords

	if !(numWords != 3) {
		goto __1
	}
	return TCL_ERROR
__1:
	;
	codeToken = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	msgToken = codeToken + uintptr((*Tcl_Token)(unsafe.Pointer(codeToken)).FnumComponents+1)*24

__2:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __5
	}
	XTclAllocateFreeObjects(tls)
__5:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3
__3:
	if 0 != 0 {
		goto __2
	}
	goto __4
__4:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++

	codeKnown = XTclWordKnownAtCompileTime(tls, codeToken, objPtr)

	// First we must emit the code to substitute the arguments.  This
	// must come first in case substitution raises errors.
	if !!(codeKnown != 0) {
		goto __6
	}
	if !((*Tcl_Token)(unsafe.Pointer(codeToken)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __7
	}
__9:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(codeToken+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(codeToken+1*24)).Fsize, 0)
	if !(_objIndexCopy <= 255) {
		goto __12
	}
__14:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __17
	}
	XTclExpandCodeArray(tls, envPtr)
__17:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __18
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__18:
	;
__19:
	_delta = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta != 0) {
		goto __22
	}
	if !(_delta == -0x7fffffff-1) {
		goto __23
	}
	_delta = 1 - _objIndexCopy
__23:
	;
__24:
	if !(_delta < 0) {
		goto __27
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __28
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__28:
	;
__27:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
__22:
	;
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto __13
__12:
__29:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __32
	}
	XTclExpandCodeArray(tls, envPtr)
__32:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __33
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__33:
	;
__34:
	_delta1 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta1 != 0) {
		goto __37
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __38
	}
	_delta1 = 1 - _objIndexCopy
__38:
	;
__39:
	if !(_delta1 < 0) {
		goto __42
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __43
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__43:
	;
__42:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
__37:
	;
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
__13:
	;
	goto __10
__10:
	if 0 != 0 {
		goto __9
	}
	goto __11
__11:
	;
	goto __8
__7:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileTokens(tls, interp, codeToken+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(codeToken)).FnumComponents, envPtr)
__8:
	;

__44:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, ts+12571, int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy1 <= 255) {
		goto __47
	}
__49:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __52
	}
	XTclExpandCodeArray(tls, envPtr)
__52:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __53
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__53:
	;
__54:
	_delta2 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta2 != 0) {
		goto __57
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __58
	}
	_delta2 = 1 - _objIndexCopy1
__58:
	;
__59:
	if !(_delta2 < 0) {
		goto __62
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __63
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__63:
	;
__62:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __60
__60:
	if 0 != 0 {
		goto __59
	}
	goto __61
__61:
	;
__57:
	;
	goto __55
__55:
	if 0 != 0 {
		goto __54
	}
	goto __56
__56:
	;
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
	goto __48
__47:
__64:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __67
	}
	XTclExpandCodeArray(tls, envPtr)
__67:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __68
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__68:
	;
__69:
	_delta3 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta3 != 0) {
		goto __72
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __73
	}
	_delta3 = 1 - _objIndexCopy1
__73:
	;
__74:
	if !(_delta3 < 0) {
		goto __77
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __78
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__78:
	;
__77:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __75
__75:
	if 0 != 0 {
		goto __74
	}
	goto __76
__76:
	;
__72:
	;
	goto __70
__70:
	if 0 != 0 {
		goto __69
	}
	goto __71
__71:
	;
	goto __65
__65:
	if 0 != 0 {
		goto __64
	}
	goto __66
__66:
	;
__48:
	;
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
__6:
	;
	if !((*Tcl_Token)(unsafe.Pointer(msgToken)).Ftype == TCL_TOKEN_SIMPLE_WORD) {
		goto __79
	}
__81:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(msgToken+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(msgToken+1*24)).Fsize, 0)
	if !(_objIndexCopy2 <= 255) {
		goto __84
	}
__86:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __89
	}
	XTclExpandCodeArray(tls, envPtr)
__89:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __90
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__90:
	;
__91:
	_delta4 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta4 != 0) {
		goto __94
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __95
	}
	_delta4 = 1 - _objIndexCopy2
__95:
	;
__96:
	if !(_delta4 < 0) {
		goto __99
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __100
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__100:
	;
__99:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __97
__97:
	if 0 != 0 {
		goto __96
	}
	goto __98
__98:
	;
__94:
	;
	goto __92
__92:
	if 0 != 0 {
		goto __91
	}
	goto __93
__93:
	;
	goto __87
__87:
	if 0 != 0 {
		goto __86
	}
	goto __88
__88:
	;
	goto __85
__84:
__101:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __104
	}
	XTclExpandCodeArray(tls, envPtr)
__104:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __105
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__105:
	;
__106:
	_delta5 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta5 != 0) {
		goto __109
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __110
	}
	_delta5 = 1 - _objIndexCopy2
__110:
	;
__111:
	if !(_delta5 < 0) {
		goto __114
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __115
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__115:
	;
__114:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __112
__112:
	if 0 != 0 {
		goto __111
	}
	goto __113
__113:
	;
__109:
	;
	goto __107
__107:
	if 0 != 0 {
		goto __106
	}
	goto __108
__108:
	;
	goto __102
__102:
	if 0 != 0 {
		goto __101
	}
	goto __103
__103:
	;
__85:
	;
	goto __82
__82:
	if 0 != 0 {
		goto __81
	}
	goto __83
__83:
	;
	goto __80
__79:
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
	XTclCompileTokens(tls, interp, msgToken+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(msgToken)).FnumComponents, envPtr)
__80:
	;

	codeIsList = libc.Bool32(codeKnown != 0 && TCL_OK == XTcl_ListObjLength(tls, interp, objPtr, bp))
	codeIsValid = libc.Bool32(codeIsList != 0 && *(*int32)(unsafe.Pointer(bp)) != 0)

	if !(codeIsValid != 0) {
		goto __116
	}

__117:
	;
__120:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __123
	}
	XTclAllocateFreeObjects(tls)
__123:
	;
	errPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __121
__121:
	if 0 != 0 {
		goto __120
	}
	goto __122
__122:
	;
	(*Tcl_Obj)(unsafe.Pointer(errPtr)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0) {
		goto __124
	}
	(*Tcl_Obj)(unsafe.Pointer(errPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(errPtr)).Flength = 0
	goto __125
__124:
	(*Tcl_Obj)(unsafe.Pointer(errPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(errPtr)).Fbytes, ts+12571, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(errPtr)).Fbytes + 10)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(errPtr)).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
__125:
	;
	(*Tcl_Obj)(unsafe.Pointer(errPtr)).FtypePtr = uintptr(0)

	goto __118
__118:
	if 0 != 0 {
		goto __117
	}
	goto __119
__119:
	;
__126:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __129
	}
	XTclAllocateFreeObjects(tls)
__129:
	;
	dictPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __127
__127:
	if 0 != 0 {
		goto __126
	}
	goto __128
__128:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr = uintptr(0)

	XTcl_DictObjPut(tls, uintptr(0), dictPtr, errPtr, objPtr)
__130:
	_objIndexCopy3 = XTclAddLiteralObj(tls, envPtr, dictPtr, uintptr(0))
	if !(_objIndexCopy3 <= 255) {
		goto __133
	}
__135:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __138
	}
	XTclExpandCodeArray(tls, envPtr)
__138:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __139
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__139:
	;
__140:
	_delta6 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta6 != 0) {
		goto __143
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __144
	}
	_delta6 = 1 - _objIndexCopy3
__144:
	;
__145:
	if !(_delta6 < 0) {
		goto __148
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __149
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__149:
	;
__148:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __146
__146:
	if 0 != 0 {
		goto __145
	}
	goto __147
__147:
	;
__143:
	;
	goto __141
__141:
	if 0 != 0 {
		goto __140
	}
	goto __142
__142:
	;
	goto __136
__136:
	if 0 != 0 {
		goto __135
	}
	goto __137
__137:
	;
	goto __134
__133:
__150:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __153
	}
	XTclExpandCodeArray(tls, envPtr)
__153:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __154
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__154:
	;
__155:
	_delta7 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta7 != 0) {
		goto __158
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __159
	}
	_delta7 = 1 - _objIndexCopy3
__159:
	;
__160:
	if !(_delta7 < 0) {
		goto __163
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __164
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__164:
	;
__163:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __161
__161:
	if 0 != 0 {
		goto __160
	}
	goto __162
__162:
	;
__158:
	;
	goto __156
__156:
	if 0 != 0 {
		goto __155
	}
	goto __157
__157:
	;
	goto __151
__151:
	if 0 != 0 {
		goto __150
	}
	goto __152
__152:
	;
__134:
	;
	goto __131
__131:
	if 0 != 0 {
		goto __130
	}
	goto __132
__132:
	;
__116:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __165
	}
	goto __166
__165:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __167
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __169
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__169:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__170:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __171
__171:
	if 0 != 0 {
		goto __170
	}
	goto __172
__172:
	;
	goto __168
__167:
	XTclFreeObj(tls, objPtr)
__168:
	;
__166:
	;

	// Simpler bytecodes when we detect invalid arguments at compile time.
	if !(codeKnown != 0 && !(codeIsValid != 0)) {
		goto __173
	}
__174:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __177
	}
	XTclExpandCodeArray(tls, envPtr)
__177:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __178
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__178:
	;
__179:
	_delta8 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta8 != 0) {
		goto __182
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __183
	}
	_delta8 = 1 - 0
__183:
	;
__184:
	if !(_delta8 < 0) {
		goto __187
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __188
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__188:
	;
__187:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __185
__185:
	if 0 != 0 {
		goto __184
	}
	goto __186
__186:
	;
__182:
	;
	goto __180
__180:
	if 0 != 0 {
		goto __179
	}
	goto __181
__181:
	;
	goto __175
__175:
	if 0 != 0 {
		goto __174
	}
	goto __176
__176:
	;
	if !(codeIsList != 0) {
		goto __189
	}
	// Must be an empty list
	goto issueErrorForEmptyCode
__189:
	;
	XTclCompileSyntaxError(tls, interp, envPtr)
	return TCL_OK
__173:
	;

	if !!(codeKnown != 0) {
		goto __190
	}
	// Argument validity checking has to be done by bytecode at
	// run time.
__191:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __194
	}
	XTclExpandCodeArray(tls, envPtr)
__194:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __195
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__195:
	;
__196:
	_delta9 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta9 != 0) {
		goto __199
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __200
	}
	_delta9 = 1 - 3
__200:
	;
__201:
	if !(_delta9 < 0) {
		goto __204
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __205
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__205:
	;
__204:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __202
__202:
	if 0 != 0 {
		goto __201
	}
	goto __203
__203:
	;
__199:
	;
	goto __197
__197:
	if 0 != 0 {
		goto __196
	}
	goto __198
__198:
	;
	goto __192
__192:
	if 0 != 0 {
		goto __191
	}
	goto __193
__193:
	;
__206:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __209
	}
	XTclExpandCodeArray(tls, envPtr)
__209:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __210
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__210:
	;
__211:
	_delta10 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta10 != 0) {
		goto __214
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __215
	}
	_delta10 = 1 - 0
__215:
	;
__216:
	if !(_delta10 < 0) {
		goto __219
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __220
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__220:
	;
__219:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __217
__217:
	if 0 != 0 {
		goto __216
	}
	goto __218
__218:
	;
__214:
	;
	goto __212
__212:
	if 0 != 0 {
		goto __211
	}
	goto __213
__213:
	;
	goto __207
__207:
	if 0 != 0 {
		goto __206
	}
	goto __208
__208:
	;
__221:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __224
	}
	XTclExpandCodeArray(tls, envPtr)
__224:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_LENGTH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __225
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST_LENGTH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__225:
	;
__226:
	_delta11 = XtclInstructionTable[INST_LIST_LENGTH].FstackEffect
	if !(_delta11 != 0) {
		goto __229
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __230
	}
	_delta11 = 1 - 0
__230:
	;
__231:
	if !(_delta11 < 0) {
		goto __234
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __235
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__235:
	;
__234:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __232
__232:
	if 0 != 0 {
		goto __231
	}
	goto __233
__233:
	;
__229:
	;
	goto __227
__227:
	if 0 != 0 {
		goto __226
	}
	goto __228
__228:
	;
	goto __222
__222:
	if 0 != 0 {
		goto __221
	}
	goto __223
__223:
	;
__236:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __239
	}
	XTclExpandCodeArray(tls, envPtr)
__239:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(16))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __240
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_FALSE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__240:
	;
__241:
	_delta12 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
	if !(_delta12 != 0) {
		goto __244
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __245
	}
	_delta12 = 1 - 16
__245:
	;
__246:
	if !(_delta12 < 0) {
		goto __249
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __250
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__250:
	;
__249:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __247
__247:
	if 0 != 0 {
		goto __246
	}
	goto __248
__248:
	;
__244:
	;
	goto __242
__242:
	if 0 != 0 {
		goto __241
	}
	goto __243
__243:
	;
	goto __237
__237:
	if 0 != 0 {
		goto __236
	}
	goto __238
__238:
	;
__251:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __254
	}
	XTclExpandCodeArray(tls, envPtr)
__254:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __255
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST == INST_START_CMD {
			return 1
		}
		return 0
	}()
__255:
	;
__256:
	_delta13 = XtclInstructionTable[INST_LIST].FstackEffect
	if !(_delta13 != 0) {
		goto __259
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __260
	}
	_delta13 = 1 - 2
__260:
	;
__261:
	if !(_delta13 < 0) {
		goto __264
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __265
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__265:
	;
__264:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __262
__262:
	if 0 != 0 {
		goto __261
	}
	goto __263
__263:
	;
__259:
	;
	goto __257
__257:
	if 0 != 0 {
		goto __256
	}
	goto __258
__258:
	;
	goto __252
__252:
	if 0 != 0 {
		goto __251
	}
	goto __253
__253:
	;
__266:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __269
	}
	XTclExpandCodeArray(tls, envPtr)
__269:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RETURN_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(TCL_ERROR))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __270
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_RETURN_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__270:
	;
__271:
	_delta14 = XtclInstructionTable[INST_RETURN_IMM].FstackEffect
	if !(_delta14 != 0) {
		goto __274
	}
	if !(_delta14 == -0x7fffffff-1) {
		goto __275
	}
	_delta14 = 1 - TCL_ERROR
__275:
	;
__276:
	if !(_delta14 < 0) {
		goto __279
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __280
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__280:
	;
__279:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta14
	goto __277
__277:
	if 0 != 0 {
		goto __276
	}
	goto __278
__278:
	;
__274:
	;
	goto __272
__272:
	if 0 != 0 {
		goto __271
	}
	goto __273
__273:
	;
	goto __267
__267:
	if 0 != 0 {
		goto __266
	}
	goto __268
__268:
	;
__281:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __284
	}
	XTclExpandCodeArray(tls, envPtr)
__284:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	goto __282
__282:
	if 0 != 0 {
		goto __281
	}
	goto __283
__283:
	;
__285:
	if !(2 < 0) {
		goto __288
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __289
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__289:
	;
__288:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += 2
	goto __286
__286:
	if 0 != 0 {
		goto __285
	}
	goto __287
__287:
	;
__290:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __293
	}
	XTclExpandCodeArray(tls, envPtr)
__293:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __294
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__294:
	;
__295:
	_delta15 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta15 != 0) {
		goto __298
	}
	if !(_delta15 == -0x7fffffff-1) {
		goto __299
	}
	_delta15 = 1 - 0
__299:
	;
__300:
	if !(_delta15 < 0) {
		goto __303
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __304
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__304:
	;
__303:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta15
	goto __301
__301:
	if 0 != 0 {
		goto __300
	}
	goto __302
__302:
	;
__298:
	;
	goto __296
__296:
	if 0 != 0 {
		goto __295
	}
	goto __297
__297:
	;
	goto __291
__291:
	if 0 != 0 {
		goto __290
	}
	goto __292
__292:
	;
__305:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __308
	}
	XTclExpandCodeArray(tls, envPtr)
__308:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __309
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__309:
	;
__310:
	_delta16 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta16 != 0) {
		goto __313
	}
	if !(_delta16 == -0x7fffffff-1) {
		goto __314
	}
	_delta16 = 1 - 0
__314:
	;
__315:
	if !(_delta16 < 0) {
		goto __318
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __319
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__319:
	;
__318:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta16
	goto __316
__316:
	if 0 != 0 {
		goto __315
	}
	goto __317
__317:
	;
__313:
	;
	goto __311
__311:
	if 0 != 0 {
		goto __310
	}
	goto __312
__312:
	;
	goto __306
__306:
	if 0 != 0 {
		goto __305
	}
	goto __307
__307:
	;
__320:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __323
	}
	XTclExpandCodeArray(tls, envPtr)
__323:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __324
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__324:
	;
__325:
	_delta17 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta17 != 0) {
		goto __328
	}
	if !(_delta17 == -0x7fffffff-1) {
		goto __329
	}
	_delta17 = 1 - 0
__329:
	;
__330:
	if !(_delta17 < 0) {
		goto __333
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __334
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__334:
	;
__333:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta17
	goto __331
__331:
	if 0 != 0 {
		goto __330
	}
	goto __332
__332:
	;
__328:
	;
	goto __326
__326:
	if 0 != 0 {
		goto __325
	}
	goto __327
__327:
	;
	goto __321
__321:
	if 0 != 0 {
		goto __320
	}
	goto __322
__322:
	;
issueErrorForEmptyCode:
__335:
	_objIndexCopy4 = XTclRegisterLiteral(tls, envPtr, ts+18079, int32(uint64(unsafe.Sizeof([28]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy4 <= 255) {
		goto __338
	}
__340:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __343
	}
	XTclExpandCodeArray(tls, envPtr)
__343:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __344
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__344:
	;
__345:
	_delta18 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta18 != 0) {
		goto __348
	}
	if !(_delta18 == -0x7fffffff-1) {
		goto __349
	}
	_delta18 = 1 - _objIndexCopy4
__349:
	;
__350:
	if !(_delta18 < 0) {
		goto __353
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __354
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__354:
	;
__353:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta18
	goto __351
__351:
	if 0 != 0 {
		goto __350
	}
	goto __352
__352:
	;
__348:
	;
	goto __346
__346:
	if 0 != 0 {
		goto __345
	}
	goto __347
__347:
	;
	goto __341
__341:
	if 0 != 0 {
		goto __340
	}
	goto __342
__342:
	;
	goto __339
__338:
__355:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __358
	}
	XTclExpandCodeArray(tls, envPtr)
__358:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __359
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__359:
	;
__360:
	_delta19 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta19 != 0) {
		goto __363
	}
	if !(_delta19 == -0x7fffffff-1) {
		goto __364
	}
	_delta19 = 1 - _objIndexCopy4
__364:
	;
__365:
	if !(_delta19 < 0) {
		goto __368
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __369
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__369:
	;
__368:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta19
	goto __366
__366:
	if 0 != 0 {
		goto __365
	}
	goto __367
__367:
	;
__363:
	;
	goto __361
__361:
	if 0 != 0 {
		goto __360
	}
	goto __362
__362:
	;
	goto __356
__356:
	if 0 != 0 {
		goto __355
	}
	goto __357
__357:
	;
__339:
	;
	goto __336
__336:
	if 0 != 0 {
		goto __335
	}
	goto __337
__337:
	;
__370:
	_objIndexCopy5 = XTclRegisterLiteral(tls, envPtr, ts+19843, int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy5 <= 255) {
		goto __373
	}
__375:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __378
	}
	XTclExpandCodeArray(tls, envPtr)
__378:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __379
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__379:
	;
__380:
	_delta20 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta20 != 0) {
		goto __383
	}
	if !(_delta20 == -0x7fffffff-1) {
		goto __384
	}
	_delta20 = 1 - _objIndexCopy5
__384:
	;
__385:
	if !(_delta20 < 0) {
		goto __388
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __389
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__389:
	;
__388:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta20
	goto __386
__386:
	if 0 != 0 {
		goto __385
	}
	goto __387
__387:
	;
__383:
	;
	goto __381
__381:
	if 0 != 0 {
		goto __380
	}
	goto __382
__382:
	;
	goto __376
__376:
	if 0 != 0 {
		goto __375
	}
	goto __377
__377:
	;
	goto __374
__373:
__390:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __393
	}
	XTclExpandCodeArray(tls, envPtr)
__393:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __394
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__394:
	;
__395:
	_delta21 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta21 != 0) {
		goto __398
	}
	if !(_delta21 == -0x7fffffff-1) {
		goto __399
	}
	_delta21 = 1 - _objIndexCopy5
__399:
	;
__400:
	if !(_delta21 < 0) {
		goto __403
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __404
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__404:
	;
__403:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta21
	goto __401
__401:
	if 0 != 0 {
		goto __400
	}
	goto __402
__402:
	;
__398:
	;
	goto __396
__396:
	if 0 != 0 {
		goto __395
	}
	goto __397
__397:
	;
	goto __391
__391:
	if 0 != 0 {
		goto __390
	}
	goto __392
__392:
	;
__374:
	;
	goto __371
__371:
	if 0 != 0 {
		goto __370
	}
	goto __372
__372:
	;
__190:
	;
__405:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __408
	}
	XTclExpandCodeArray(tls, envPtr)
__408:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RETURN_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(TCL_ERROR)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(TCL_ERROR))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __409
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_RETURN_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__409:
	;
__410:
	_delta22 = XtclInstructionTable[INST_RETURN_IMM].FstackEffect
	if !(_delta22 != 0) {
		goto __413
	}
	if !(_delta22 == -0x7fffffff-1) {
		goto __414
	}
	_delta22 = 1 - TCL_ERROR
__414:
	;
__415:
	if !(_delta22 < 0) {
		goto __418
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __419
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__419:
	;
__418:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta22
	goto __416
__416:
	if 0 != 0 {
		goto __415
	}
	goto __417
__417:
	;
__413:
	;
	goto __411
__411:
	if 0 != 0 {
		goto __410
	}
	goto __412
__412:
	;
	goto __406
__406:
	if 0 != 0 {
		goto __405
	}
	goto __407
__407:
	;
__420:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __423
	}
	XTclExpandCodeArray(tls, envPtr)
__423:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	goto __421
__421:
	if 0 != 0 {
		goto __420
	}
	goto __422
__422:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileTryCmd --
//
//	Procedure called to compile the "try" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "try" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileTryCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:2759:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var numWords int32
	var numHandlers int32
	var result int32
	var bodyToken uintptr
	var finallyToken uintptr
	var tokenPtr uintptr
	var handlerTokens uintptr
	var matchClauses uintptr
	var matchCodes uintptr
	var resultVarIndices uintptr
	var optionVarIndices uintptr
	var i int32
	// No handlers or finally; do nothing beyond evaluating the body.

	var mapPtr uintptr
	var eclIndex int32
	// var code int32 at bp+4, 4

	// var len int32 at bp+16, 4

	var varname uintptr
	// var len1 int32 at bp+20, 4

	var varname1 uintptr
	var tmpObj uintptr
	// var objv uintptr at bp+8, 8

	// var objc int32 at bp, 4
	numWords = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords
	result = TCL_ERROR
	handlerTokens = uintptr(0)
	matchClauses = uintptr(0)
	matchCodes = uintptr(0)
	resultVarIndices = uintptr(0)
	optionVarIndices = uintptr(0)

	if !(numWords < 2) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	bodyToken = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

	if !(numWords == 2) {
		goto __2
	}
	// No handlers or finally; do nothing beyond evaluating the body.

	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileCmdWord(tls, interp, bodyToken+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(bodyToken)).FnumComponents, envPtr)
	return TCL_OK
__2:
	;

	numWords = numWords - 2
	tokenPtr = bodyToken + uintptr((*Tcl_Token)(unsafe.Pointer(bodyToken)).FnumComponents+1)*24

	// Extract information about what handlers there are.

	numHandlers = numWords >> 2
	numWords = numWords - numHandlers*4
	if !(numHandlers > 0) {
		goto __3
	}
	handlerTokens = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(numHandlers)))
	matchClauses = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(numHandlers)))
	libc.Xmemset(tls, matchClauses, 0, uint64(unsafe.Sizeof(uintptr(0)))*uint64(numHandlers))
	matchCodes = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numHandlers)))
	resultVarIndices = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numHandlers)))
	optionVarIndices = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numHandlers)))

	i = 0
__4:
	if !(i < numHandlers) {
		goto __6
	}

	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __7
	}
	goto failedToCompile
__7:
	;
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize == 4 &&
		!(libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, ts+18767, uint64(4)) != 0)) {
		goto __8
	}
	// Parse the list of errorCode words to match against.

	*(*int32)(unsafe.Pointer(matchCodes + uintptr(i)*4)) = TCL_ERROR
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
__10:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __13
	}
	XTclAllocateFreeObjects(tls)
__13:
	;
	tmpObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount++
	if !(!(XTclWordKnownAtCompileTime(tls, tokenPtr, tmpObj) != 0) ||
		XTcl_ListObjLength(tls, uintptr(0), tmpObj, bp) != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp)) == 0) {
		goto __14
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __15
	}
	goto __16
__15:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __17
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __19
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__19:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__20:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	goto __18
__17:
	XTclFreeObj(tls, tmpObj)
__18:
	;
__16:
	;

	goto failedToCompile
__14:
	;
	XTcl_ListObjReplace(tls, uintptr(0), tmpObj, 0, 0, 0, uintptr(0))
	*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)) = tmpObj
	goto __9
__8:
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize == 2 &&
		!(libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, ts+18764, uint64(2)) != 0)) {
		goto __23
	}

	// Parse the result code to look for.

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
__25:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __28
	}
	XTclAllocateFreeObjects(tls)
__28:
	;
	tmpObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount++
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, tmpObj) != 0) {
		goto __29
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __30
	}
	goto __31
__30:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __32
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __34
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__34:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__35:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __36
__36:
	if 0 != 0 {
		goto __35
	}
	goto __37
__37:
	;
	goto __33
__32:
	XTclFreeObj(tls, tmpObj)
__33:
	;
__31:
	;

	goto failedToCompile
__29:
	;
	if !(TCL_ERROR == XTclGetCompletionCodeFromObj(tls, uintptr(0), tmpObj, bp+4)) {
		goto __38
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __39
	}
	goto __40
__39:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __41
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __43
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__43:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__44:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
	goto __42
__41:
	XTclFreeObj(tls, tmpObj)
__42:
	;
__40:
	;

	goto failedToCompile
__38:
	;
	*(*int32)(unsafe.Pointer(matchCodes + uintptr(i)*4)) = *(*int32)(unsafe.Pointer(bp + 4 /* code */))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __47
	}
	goto __48
__47:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __49
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __51
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__51:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__52:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
	goto __50
__49:
	XTclFreeObj(tls, tmpObj)
__50:
	;
__48:
	;

	goto __24
__23:
	goto failedToCompile
__24:
	;
__9:
	;

	// Parse the variable binding.

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
__55:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __58
	}
	XTclAllocateFreeObjects(tls)
__58:
	;
	tmpObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __56
__56:
	if 0 != 0 {
		goto __55
	}
	goto __57
__57:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount++
	if !!(XTclWordKnownAtCompileTime(tls, tokenPtr, tmpObj) != 0) {
		goto __59
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __60
	}
	goto __61
__60:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __62
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __64
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__64:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__65:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
	goto __63
__62:
	XTclFreeObj(tls, tmpObj)
__63:
	;
__61:
	;

	goto failedToCompile
__59:
	;
	if !(XTcl_ListObjGetElements(tls, uintptr(0), tmpObj, bp, bp+8) != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp)) > 2) {
		goto __68
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __69
	}
	goto __70
__69:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __71
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __73
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__73:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__74:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __75
__75:
	if 0 != 0 {
		goto __74
	}
	goto __76
__76:
	;
	goto __72
__71:
	XTclFreeObj(tls, tmpObj)
__72:
	;
__70:
	;

	goto failedToCompile
__68:
	;
	if !(*(*int32)(unsafe.Pointer(bp)) > 0) {
		goto __77
	}
	varname = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)))), bp+16)

	*(*int32)(unsafe.Pointer(resultVarIndices + uintptr(i)*4)) = XTclLocalScalar(tls, varname, *(*int32)(unsafe.Pointer(bp + 16 /* len */)), envPtr)
	if !(*(*int32)(unsafe.Pointer(resultVarIndices + uintptr(i)*4)) < 0) {
		goto __79
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __80
	}
	goto __81
__80:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __82
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __84
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__84:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__85:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __86
__86:
	if 0 != 0 {
		goto __85
	}
	goto __87
__87:
	;
	goto __83
__82:
	XTclFreeObj(tls, tmpObj)
__83:
	;
__81:
	;

	goto failedToCompile
__79:
	;
	goto __78
__77:
	*(*int32)(unsafe.Pointer(resultVarIndices + uintptr(i)*4)) = -1
__78:
	;
	if !(*(*int32)(unsafe.Pointer(bp)) == 2) {
		goto __88
	}
	varname1 = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)) + 1*8)), bp+20)

	*(*int32)(unsafe.Pointer(optionVarIndices + uintptr(i)*4)) = XTclLocalScalar(tls, varname1, *(*int32)(unsafe.Pointer(bp + 20 /* len1 */)), envPtr)
	if !(*(*int32)(unsafe.Pointer(optionVarIndices + uintptr(i)*4)) < 0) {
		goto __90
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __91
	}
	goto __92
__91:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __93
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __95
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__95:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__96:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __97
__97:
	if 0 != 0 {
		goto __96
	}
	goto __98
__98:
	;
	goto __94
__93:
	XTclFreeObj(tls, tmpObj)
__94:
	;
__92:
	;

	goto failedToCompile
__90:
	;
	goto __89
__88:
	*(*int32)(unsafe.Pointer(optionVarIndices + uintptr(i)*4)) = -1
__89:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __99
	}
	goto __100
__99:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __101
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __103
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__103:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__104:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __105
__105:
	if 0 != 0 {
		goto __104
	}
	goto __106
__106:
	;
	goto __102
__101:
	XTclFreeObj(tls, tmpObj)
__102:
	;
__100:
	;

	// Extract the body for this handler.

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __107
	}
	goto failedToCompile
__107:
	;
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize == 1 && int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart))) == '-') {
		goto __108
	}
	*(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8)) = uintptr(0)
	goto __109
__108:
	*(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8)) = tokenPtr
__109:
	;

	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __5
__5:
	i++
	goto __4
	goto __6
__6:
	;

	if !(*(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(numHandlers-1)*8)) == uintptr(0)) {
		goto __110
	}
	goto failedToCompile
__110:
	;
__3:
	;

	// Parse the finally clause

	if !(numWords == 0) {
		goto __111
	}
	finallyToken = uintptr(0)
	goto __112
__111:
	if !(numWords == 2) {
		goto __113
	}
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD || (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize != 7 ||
		libc.Xstrncmp(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, ts+18756, uint64(7)) != 0) {
		goto __115
	}
	goto failedToCompile
__115:
	;
	finallyToken = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __114
__113:
	goto failedToCompile
__114:
	;
__112:
	;

	// Issue the bytecode.

	if !!(finallyToken != 0) {
		goto __116
	}
	result = sIssueTryClausesInstructions(tls, interp, envPtr, bodyToken,
		numHandlers, matchCodes, matchClauses, resultVarIndices,
		optionVarIndices, handlerTokens)
	goto __117
__116:
	if !(numHandlers == 0) {
		goto __118
	}
	result = sIssueTryFinallyInstructions(tls, interp, envPtr, bodyToken,
		finallyToken)
	goto __119
__118:
	result = sIssueTryClausesFinallyInstructions(tls, interp, envPtr, bodyToken,
		numHandlers, matchCodes, matchClauses, resultVarIndices,
		optionVarIndices, handlerTokens, finallyToken)
__119:
	;
__117:
	;

	// Delete any temporary state and finish off.

failedToCompile:
	if !(numHandlers > 0) {
		goto __120
	}
	i = 0
__121:
	if !(i < numHandlers) {
		goto __123
	}
	if !(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)) != 0) {
		goto __124
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)))).FrefCount, 1) > 1) {
		goto __125
	}
	goto __126
__125:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __127
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)))).Fbytes != XtclEmptyStringRep) {
		goto __129
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)))).Fbytes)
__129:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)))).Flength = -1
__130:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8))
	goto __131
__131:
	if 0 != 0 {
		goto __130
	}
	goto __132
__132:
	;
	goto __128
__127:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)))
__128:
	;
__126:
	;

__124:
	;
	goto __122
__122:
	i++
	goto __121
	goto __123
__123:
	;
	XTclStackFree(tls, interp, optionVarIndices)
	XTclStackFree(tls, interp, resultVarIndices)
	XTclStackFree(tls, interp, matchCodes)
	XTclStackFree(tls, interp, matchClauses)
	XTclStackFree(tls, interp, handlerTokens)
__120:
	;
	return result
}

//----------------------------------------------------------------------
//
// IssueTryClausesInstructions, IssueTryClausesFinallyInstructions,
// IssueTryFinallyInstructions --
//
//	The code generators for [try]. Split from the parsing engine for
//	reasons of developer sanity, and also split between no-finally,
//	just-finally and with-finally cases because so many of the details of
//	generation vary between the three.
//
//	The macros below make the instruction issuing easier to follow.
//
//----------------------------------------------------------------------

func sIssueTryClausesInstructions(tls *libc.TLS, interp uintptr, envPtr uintptr, bodyToken uintptr, numHandlers int32, matchCodes uintptr, matchClauses uintptr, resultVars uintptr, optionVars uintptr, handlerTokens uintptr) int32 { /* tclCompCmdsSZ.c:2991:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var range1 int32
	var resultVar int32
	var optionsVar int32
	var i int32
	var j int32
	// var len int32 at bp+32, 4

	var forwardsNeedFixing int32 = 0
	var trapZero int32 = 0
	var afterBody int32 = 0
	var addrsToFix uintptr
	var forwardsToFix uintptr
	var notCodeJumpSource int32
	var notECJumpSource int32
	var noError uintptr
	// var buf [24]int8 at bp+8, 24

	resultVar = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	optionsVar = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	if resultVar < 0 || optionsVar < 0 {
		return TCL_ERROR
	}

	// Check if we're supposed to trap a normal TCL_OK completion of the body.
	// If not, we can handle that case much more efficiently.

	for i = 0; i < numHandlers; i++ {
		if *(*int32)(unsafe.Pointer(matchCodes + uintptr(i)*4)) == 0 {
			trapZero = 1
			break
		}
	}

	// Compile the body, trapping any error in it so that we can trap on it
	// and/or run a finally clause. Note that there must be at least one
	// on/trap clause; when none is present, this whole function is not called
	// (and it's never called when there's a finally clause).

	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_BEGIN_CATCH4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - range1
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileCmdWord(tls, interp, bodyToken+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(bodyToken)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
	if !(trapZero != 0) {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_END_CATCH == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		afterBody = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		for ok6 := true; ok6; ok6 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok9 := true; ok9; ok9 = 0 != 0 {
			if -1 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
		}
	} else {
		for ok10 := true; ok10; ok10 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok14 := true; ok14; ok14 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok15 := true; ok15; ok15 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok16 := true; ok16; ok16 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		for ok17 := true; ok17; ok17 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok18 := true; ok18; ok18 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 2
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok20 := true; ok20; ok20 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(4))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok21 := true; ok21; ok21 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 4
					}
					for ok22 := true; ok22; ok22 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok23 := true; ok23; ok23 = 0 != 0 {
			if -2 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += -2
		}
	}
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok24 := true; ok24; ok24 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_CODE)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RETURN_CODE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok25 := true; ok25; ok25 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_CODE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok26 := true; ok26; ok26 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok27 := true; ok27; ok27 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RESULT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok28 := true; ok28; ok28 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok29 := true; ok29; ok29 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok30 := true; ok30; ok30 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok31 := true; ok31; ok31 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok32 := true; ok32; ok32 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok33 := true; ok33; ok33 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok34 := true; ok34; ok34 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok35 := true; ok35; ok35 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if optionsVar < 256 {
		for ok36 := true; ok36; ok36 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok37 := true; ok37; ok37 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - optionsVar
					}
					for ok38 := true; ok38; ok38 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok39 := true; ok39; ok39 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok40 := true; ok40; ok40 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - optionsVar
					}
					for ok41 := true; ok41; ok41 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	for ok42 := true; ok42; ok42 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok43 := true; ok43; ok43 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok44 := true; ok44; ok44 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if resultVar < 256 {
		for ok45 := true; ok45; ok45 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok46 := true; ok46; ok46 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - resultVar
					}
					for ok47 := true; ok47; ok47 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok48 := true; ok48; ok48 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STORE_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok49 := true; ok49; ok49 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - resultVar
					}
					for ok50 := true; ok50; ok50 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	for ok51 := true; ok51; ok51 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok52 := true; ok52; ok52 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok53 := true; ok53; ok53 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Now we handle all the registered 'on' and 'trap' handlers in order.
	// For us to be here, there must be at least one handler.
	//
	// Slight overallocation, but reduces size of this function.

	addrsToFix = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numHandlers)))
	forwardsToFix = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numHandlers)))
	noError = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numHandlers)))

	for i = 0; i < numHandlers; i++ {
		*(*int32)(unsafe.Pointer(noError + uintptr(i)*4)) = -1
		libc.Xsprintf(tls, bp+8, ts+909, libc.VaList(bp, *(*int32)(unsafe.Pointer(matchCodes + uintptr(i)*4))))
		for ok54 := true; ok54; ok54 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DUP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok55 := true; ok55; ok55 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DUP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok56 := true; ok56; ok56 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok57 := true; ok57; ok57 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, bp+8, int32(libc.Xstrlen(tls, bp+8)), 0)
			if _objIndexCopy <= 255 {
				for ok58 := true; ok58; ok58 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok59 := true; ok59; ok59 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok60 := true; ok60; ok60 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok61 := true; ok61; ok61 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok62 := true; ok62; ok62 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok63 := true; ok63; ok63 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		for ok64 := true; ok64; ok64 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EQ)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_EQ == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok65 := true; ok65; ok65 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_EQ].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok66 := true; ok66; ok66 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		notCodeJumpSource = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		for ok67 := true; ok67; ok67 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP_FALSE4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok68 := true; ok68; ok68 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP_FALSE4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok69 := true; ok69; ok69 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		if *(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)) != 0 {
			var p uintptr
			XTcl_ListObjLength(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)), bp+32)

			// Match the errorcode according to try/trap rules.

			if optionsVar < 256 {
				for ok70 := true; ok70; ok70 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok71 := true; ok71; ok71 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - optionsVar
							}
							for ok72 := true; ok72; ok72 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok73 := true; ok73; ok73 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok74 := true; ok74; ok74 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - optionsVar
							}
							for ok75 := true; ok75; ok75 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

			for ok76 := true; ok76; ok76 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+12571, int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)), 0)
				if _objIndexCopy <= 255 {
					for ok77 := true; ok77; ok77 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok78 := true; ok78; ok78 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok79 := true; ok79; ok79 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok80 := true; ok80; ok80 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok81 := true; ok81; ok81 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok82 := true; ok82; ok82 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			for ok83 := true; ok83; ok83 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_GET)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_DICT_GET == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok84 := true; ok84; ok84 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_DICT_GET].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 1
						}
						for ok85 := true; ok85; ok85 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok86 := true; ok86; ok86 = 0 != 0 {
				if -1 < 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
					}
				}
				*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
			}
			for ok87 := true; ok87; ok87 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LIST_RANGE_IMM == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok88 := true; ok88; ok88 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok89 := true; ok89; ok89 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok90 := true; ok90; ok90 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 32))-1) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 32))-1) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 32))-1) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 32)) - 1))
			}
			p = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)), bp+32)
			for ok91 := true; ok91; ok91 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, p, *(*int32)(unsafe.Pointer(bp + 32)), 0)
				if _objIndexCopy <= 255 {
					for ok92 := true; ok92; ok92 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok93 := true; ok93; ok93 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok94 := true; ok94; ok94 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok95 := true; ok95; ok95 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok96 := true; ok96; ok96 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok97 := true; ok97; ok97 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			for ok98 := true; ok98; ok98 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STR_EQ == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok99 := true; ok99; ok99 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STR_EQ].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok100 := true; ok100; ok100 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			notECJumpSource = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			for ok101 := true; ok101; ok101 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_JUMP_FALSE4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok102 := true; ok102; ok102 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_JUMP_FALSE4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok103 := true; ok103; ok103 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			notECJumpSource = -1 // LINT
		}
		for ok104 := true; ok104; ok104 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok105 := true; ok105; ok105 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok106 := true; ok106; ok106 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}

		// There is no finally clause, so we can avoid wrapping a catch
		// context around the handler. That simplifies what instructions need
		// to be issued a lot since we can let errors just fall through.

		if *(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4)) >= 0 {
			if resultVar < 256 {
				for ok107 := true; ok107; ok107 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok108 := true; ok108; ok108 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - resultVar
							}
							for ok109 := true; ok109; ok109 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok110 := true; ok110; ok110 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok111 := true; ok111; ok111 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - resultVar
							}
							for ok112 := true; ok112; ok112 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

			if *(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4)) < 256 {
				for ok113 := true; ok113; ok113 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok114 := true; ok114; ok114 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))
							}
							for ok115 := true; ok115; ok115 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok116 := true; ok116; ok116 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_SCALAR4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok117 := true; ok117; ok117 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - *(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))
							}
							for ok118 := true; ok118; ok118 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

			for ok119 := true; ok119; ok119 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_POP == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok120 := true; ok120; ok120 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok121 := true; ok121; ok121 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			if *(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4)) >= 0 {
				if optionsVar < 256 {
					for ok122 := true; ok122; ok122 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_LOAD_SCALAR1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok123 := true; ok123; ok123 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - optionsVar
								}
								for ok124 := true; ok124; ok124 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok125 := true; ok125; ok125 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_LOAD_SCALAR4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok126 := true; ok126; ok126 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - optionsVar
								}
								for ok127 := true; ok127; ok127 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}

				if *(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4)) < 256 {
					for ok128 := true; ok128; ok128 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STORE_SCALAR1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok129 := true; ok129; ok129 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - *(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))
								}
								for ok130 := true; ok130; ok130 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok131 := true; ok131; ok131 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STORE_SCALAR4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok132 := true; ok132; ok132 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - *(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))
								}
								for ok133 := true; ok133; ok133 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}

				for ok134 := true; ok134; ok134 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_POP == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok135 := true; ok135; ok135 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok136 := true; ok136; ok136 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		if !(int32(*(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8))) != 0) {
			forwardsNeedFixing = 1
			*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(i)*4)) = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			for ok137 := true; ok137; ok137 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_JUMP4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok138 := true; ok138; ok138 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok139 := true; ok139; ok139 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok140 := true; ok140; ok140 = 0 != 0 {
				if 1 < 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
					}
				}
				*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
			}
		} else {
			var dontChangeOptions int32

			*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(i)*4)) = -1
			if forwardsNeedFixing != 0 {
				forwardsNeedFixing = 0
				for j = 0; j < i; j++ {
					if *(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)) == -1 {
						continue
					}
					for ok141 := true; ok141; ok141 = 0 != 0 {
						*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4))) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)))) >> 24)
						*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4))) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)))) >> 16)
						*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4))) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)))) >> 8)
						*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4))) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)))))
					}
					*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)) = -1
				}
			}
			range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
			for ok142 := true; ok142; ok142 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_BEGIN_CATCH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok143 := true; ok143; ok143 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - range1
						}
						for ok144 := true; ok144; ok144 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
			(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
					return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
				}
				return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
			}()
			(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(5+i*4)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(5+i*4)*8))
			XTclCompileCmdWord(tls, interp, *(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8))+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8)))).FnumComponents, envPtr)
			(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
			(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
			for ok145 := true; ok145; ok145 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_END_CATCH == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok146 := true; ok146; ok146 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok147 := true; ok147; ok147 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			*(*int32)(unsafe.Pointer(noError + uintptr(i)*4)) = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			for ok148 := true; ok148; ok148 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_JUMP4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok149 := true; ok149; ok149 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok150 := true; ok150; ok150 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			for ok151 := true; ok151; ok151 = 0 != 0 {
				if -1 < 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
					}
				}
				*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
			}
			for ok152 := true; ok152; ok152 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH_RESULT == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok153 := true; ok153; ok153 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok154 := true; ok154; ok154 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok155 := true; ok155; ok155 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok156 := true; ok156; ok156 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok157 := true; ok157; ok157 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok158 := true; ok158; ok158 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_CODE)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH_RETURN_CODE == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok159 := true; ok159; ok159 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_CODE].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok160 := true; ok160; ok160 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok161 := true; ok161; ok161 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_END_CATCH == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok162 := true; ok162; ok162 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok163 := true; ok163; ok163 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok164 := true; ok164; ok164 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
				if _objIndexCopy <= 255 {
					for ok165 := true; ok165; ok165 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok166 := true; ok166; ok166 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok167 := true; ok167; ok167 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok168 := true; ok168; ok168 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok169 := true; ok169; ok169 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok170 := true; ok170; ok170 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			for ok171 := true; ok171; ok171 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EQ)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_EQ == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok172 := true; ok172; ok172 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_EQ].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok173 := true; ok173; ok173 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			dontChangeOptions = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			for ok174 := true; ok174; ok174 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_JUMP_FALSE1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok175 := true; ok175; ok175 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok176 := true; ok176; ok176 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			if optionsVar < 256 {
				for ok177 := true; ok177; ok177 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok178 := true; ok178; ok178 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - optionsVar
							}
							for ok179 := true; ok179; ok179 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok180 := true; ok180; ok180 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok181 := true; ok181; ok181 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - optionsVar
							}
							for ok182 := true; ok182; ok182 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

			for ok183 := true; ok183; ok183 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_REVERSE == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok184 := true; ok184; ok184 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 2
						}
						for ok185 := true; ok185; ok185 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			if optionsVar < 256 {
				for ok186 := true; ok186; ok186 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok187 := true; ok187; ok187 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - optionsVar
							}
							for ok188 := true; ok188; ok188 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok189 := true; ok189; ok189 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_STORE_SCALAR4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok190 := true; ok190; ok190 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - optionsVar
							}
							for ok191 := true; ok191; ok191 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

			for ok192 := true; ok192; ok192 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_POP == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok193 := true; ok193; ok193 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok194 := true; ok194; ok194 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok195 := true; ok195; ok195 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18772, int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)), 0)
				if _objIndexCopy <= 255 {
					for ok196 := true; ok196; ok196 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok197 := true; ok197; ok197 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok198 := true; ok198; ok198 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok199 := true; ok199; ok199 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok200 := true; ok200; ok200 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok201 := true; ok201; ok201 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			for ok202 := true; ok202; ok202 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_REVERSE == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok203 := true; ok203; ok203 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 2
						}
						for ok204 := true; ok204; ok204 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok205 := true; ok205; ok205 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_SET)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_DICT_SET == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok206 := true; ok206; ok206 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_DICT_SET].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 1
						}
						for ok207 := true; ok207; ok207 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			for ok208 := true; ok208; ok208 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
			}
			for ok209 := true; ok209; ok209 = 0 != 0 {
				if -1 < 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
					}
				}
				*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
			}
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(dontChangeOptions) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(dontChangeOptions)))
			for ok210 := true; ok210; ok210 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_REVERSE == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok211 := true; ok211; ok211 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 2
						}
						for ok212 := true; ok212; ok212 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
			XTclEmitInvoke(tls, envPtr, INST_RETURN_STK, 0)
		}

		*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)) = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		for ok213 := true; ok213; ok213 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok214 := true; ok214; ok214 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok215 := true; ok215; ok215 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		if *(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)) != 0 {
			for ok216 := true; ok216; ok216 = 0 != 0 {
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notECJumpSource) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notECJumpSource)) >> 24)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notECJumpSource) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notECJumpSource)) >> 16)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notECJumpSource) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notECJumpSource)) >> 8)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notECJumpSource) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(notECJumpSource)))
			}
		}
		for ok217 := true; ok217; ok217 = 0 != 0 {
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notCodeJumpSource) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notCodeJumpSource)) >> 24)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notCodeJumpSource) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notCodeJumpSource)) >> 16)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notCodeJumpSource) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notCodeJumpSource)) >> 8)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notCodeJumpSource) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(notCodeJumpSource)))
		}
	}

	// Drop the result code since it didn't match any clause, and reissue the
	// exception. Note also that INST_RETURN_STK can proceed to the next
	// instruction.

	for ok218 := true; ok218; ok218 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok219 := true; ok219; ok219 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok220 := true; ok220; ok220 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	if optionsVar < 256 {
		for ok221 := true; ok221; ok221 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok222 := true; ok222; ok222 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - optionsVar
					}
					for ok223 := true; ok223; ok223 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok224 := true; ok224; ok224 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok225 := true; ok225; ok225 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - optionsVar
					}
					for ok226 := true; ok226; ok226 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	if resultVar < 256 {
		for ok227 := true; ok227; ok227 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok228 := true; ok228; ok228 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - resultVar
					}
					for ok229 := true; ok229; ok229 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else {
		for ok230 := true; ok230; ok230 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_LOAD_SCALAR4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok231 := true; ok231; ok231 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - resultVar
					}
					for ok232 := true; ok232; ok232 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	XTclEmitInvoke(tls, envPtr, INST_RETURN_STK, 0)

	// Fix all the jumps from taken clauses to here (which is the end of the
	// [try]).

	if !(trapZero != 0) {
		for ok233 := true; ok233; ok233 = 0 != 0 {
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(afterBody) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(afterBody)) >> 24)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(afterBody) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(afterBody)) >> 16)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(afterBody) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(afterBody)) >> 8)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(afterBody) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(afterBody)))
		}
	}
	for i = 0; i < numHandlers; i++ {
		for ok234 := true; ok234; ok234 = 0 != 0 {
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4))) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)))) >> 24)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4))) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)))) >> 16)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4))) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)))) >> 8)
			*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4))) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)))))
		}
		if *(*int32)(unsafe.Pointer(noError + uintptr(i)*4)) != -1 {
			for ok235 := true; ok235; ok235 = 0 != 0 {
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(noError + uintptr(i)*4))) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(noError + uintptr(i)*4)))) >> 24)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(noError + uintptr(i)*4))) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(noError + uintptr(i)*4)))) >> 16)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(noError + uintptr(i)*4))) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(noError + uintptr(i)*4)))) >> 8)
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(noError + uintptr(i)*4))) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(*(*int32)(unsafe.Pointer(noError + uintptr(i)*4)))))
			}
		}
	}
	XTclStackFree(tls, interp, noError)
	XTclStackFree(tls, interp, forwardsToFix)
	XTclStackFree(tls, interp, addrsToFix)
	return TCL_OK
}

func sIssueTryClausesFinallyInstructions(tls *libc.TLS, interp uintptr, envPtr uintptr, bodyToken uintptr, numHandlers int32, matchCodes uintptr, matchClauses uintptr, resultVars uintptr, optionVars uintptr, handlerTokens uintptr, finallyToken uintptr) int32 { /* tclCompCmdsSZ.c:3201:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var range1 int32
	var resultVar int32
	var optionsVar int32
	var i int32
	var j int32
	// var len int32 at bp+32, 4

	var forwardsNeedFixing int32
	var trapZero int32
	var afterBody int32
	var finalOK int32
	var finalError int32
	var noFinalError int32
	var addrsToFix uintptr
	var forwardsToFix uintptr
	var notCodeJumpSource int32
	var notECJumpSource int32
	// var buf [24]int8 at bp+8, 24

	var _delta int32
	var _delta1 int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _objIndexCopy int32
	var _delta7 int32
	var _delta8 int32
	var _delta9 int32
	var _delta10 int32
	var _delta11 int32
	var _delta12 int32
	var _objIndexCopy1 int32
	var _delta13 int32
	var _delta14 int32
	var _delta15 int32
	var _delta16 int32
	var _delta17 int32
	var _delta18 int32
	var _delta19 int32
	var _delta20 int32
	var _delta21 int32
	var _delta22 int32
	var _delta23 int32
	var _delta24 int32
	var _delta25 int32
	var _delta26 int32
	var _delta27 int32
	var _objIndexCopy2 int32
	var _delta28 int32
	var _delta29 int32
	var _delta30 int32
	var _delta31 int32
	var _delta32 int32
	var _delta33 int32
	var _objIndexCopy3 int32
	var _delta34 int32
	var _delta35 int32
	var _delta36 int32
	var _delta37 int32
	var _objIndexCopy4 int32
	var _delta38 int32
	var _delta39 int32
	var _delta40 int32
	var _delta41 int32
	var _delta42 int32
	var _delta43 int32
	var _delta44 int32
	var _delta45 int32
	var _delta46 int32
	var _delta47 int32
	var _delta48 int32
	var _delta49 int32
	var _delta50 int32
	var _delta51 int32
	var _delta52 int32
	var _delta53 int32
	var _delta54 int32
	var _delta55 int32
	var _delta56 int32
	var _delta57 int32
	var _delta58 int32
	var _objIndexCopy5 int32
	var _delta59 int32
	var _delta60 int32
	var _delta61 int32
	var _delta62 int32
	var _delta63 int32
	var _delta64 int32
	var _delta65 int32
	var _delta66 int32
	var _delta67 int32
	var _delta68 int32
	var _delta69 int32
	var _delta70 int32
	var _objIndexCopy6 int32
	var _delta71 int32
	var _delta72 int32
	var _delta73 int32
	var _delta74 int32
	var _delta75 int32
	var _delta76 int32
	var _objIndexCopy7 int32
	var _delta77 int32
	var _delta78 int32
	var _delta79 int32
	var _delta80 int32
	var _delta81 int32
	var _delta82 int32
	var _delta83 int32
	var _delta84 int32
	var _delta85 int32
	var _delta86 int32
	var noTrapError int32
	var trapError int32
	var p uintptr
	var _delta87 int32
	var _delta88 int32
	var _delta89 int32
	var _delta90 int32
	var _delta91 int32
	var _delta92 int32
	var _delta93 int32
	var _delta94 int32
	var _delta95 int32
	var _delta96 int32
	var _delta97 int32
	var _objIndexCopy8 int32
	var _delta98 int32
	var _delta99 int32
	var _delta100 int32
	var _delta101 int32
	var _delta102 int32
	var _delta103 int32
	var _objIndexCopy9 int32
	var _delta104 int32
	var _delta105 int32
	var _delta106 int32
	var _delta107 int32
	var _delta108 int32
	var _delta109 int32
	var _delta110 int32
	var _delta111 int32
	var _delta112 int32
	var _delta113 int32
	var _delta114 int32
	var _delta115 int32
	var _delta116 int32
	var _delta117 int32
	var _delta118 int32
	var _delta119 int32
	var _delta120 int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	forwardsNeedFixing = 0
	trapZero = 0
	afterBody = 0

	resultVar = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	optionsVar = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
	if !(resultVar < 0 || optionsVar < 0) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// Check if we're supposed to trap a normal TCL_OK completion of the body.
	// If not, we can handle that case much more efficiently.

	i = 0
__2:
	if !(i < numHandlers) {
		goto __4
	}
	if !(*(*int32)(unsafe.Pointer(matchCodes + uintptr(i)*4)) == 0) {
		goto __5
	}
	trapZero = 1
	goto __4
__5:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;

	// Compile the body, trapping any error in it so that we can trap on it
	// (if any trap matches) and run a finally clause.

	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
__6:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __9
	}
	XTclExpandCodeArray(tls, envPtr)
__9:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __10
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_BEGIN_CATCH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__10:
	;
__11:
	_delta = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
	if !(_delta != 0) {
		goto __14
	}
	if !(_delta == -0x7fffffff-1) {
		goto __15
	}
	_delta = 1 - range1
__15:
	;
__16:
	if !(_delta < 0) {
		goto __19
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __20
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__20:
	;
__19:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
__14:
	;
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	goto __7
__7:
	if 0 != 0 {
		goto __6
	}
	goto __8
__8:
	;
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileCmdWord(tls, interp, bodyToken+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(bodyToken)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
	if !!(trapZero != 0) {
		goto __21
	}
__23:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __26
	}
	XTclExpandCodeArray(tls, envPtr)
__26:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __27
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_END_CATCH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__27:
	;
__28:
	_delta1 = XtclInstructionTable[INST_END_CATCH].FstackEffect
	if !(_delta1 != 0) {
		goto __31
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __32
	}
	_delta1 = 1 - 0
__32:
	;
__33:
	if !(_delta1 < 0) {
		goto __36
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __37
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__37:
	;
__36:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
__31:
	;
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
	if !(resultVar < 256) {
		goto __38
	}
__40:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __43
	}
	XTclExpandCodeArray(tls, envPtr)
__43:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __44
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__44:
	;
__45:
	_delta2 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta2 != 0) {
		goto __48
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __49
	}
	_delta2 = 1 - resultVar
__49:
	;
__50:
	if !(_delta2 < 0) {
		goto __53
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __54
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__54:
	;
__53:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __51
__51:
	if 0 != 0 {
		goto __50
	}
	goto __52
__52:
	;
__48:
	;
	goto __46
__46:
	if 0 != 0 {
		goto __45
	}
	goto __47
__47:
	;
	goto __41
__41:
	if 0 != 0 {
		goto __40
	}
	goto __42
__42:
	;
	goto __39
__38:
__55:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __58
	}
	XTclExpandCodeArray(tls, envPtr)
__58:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __59
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__59:
	;
__60:
	_delta3 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta3 != 0) {
		goto __63
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __64
	}
	_delta3 = 1 - resultVar
__64:
	;
__65:
	if !(_delta3 < 0) {
		goto __68
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __69
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__69:
	;
__68:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
__63:
	;
	goto __61
__61:
	if 0 != 0 {
		goto __60
	}
	goto __62
__62:
	;
	goto __56
__56:
	if 0 != 0 {
		goto __55
	}
	goto __57
__57:
	;
__39:
	;

__70:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __73
	}
	XTclExpandCodeArray(tls, envPtr)
__73:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __74
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__74:
	;
__75:
	_delta4 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta4 != 0) {
		goto __78
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __79
	}
	_delta4 = 1 - 0
__79:
	;
__80:
	if !(_delta4 < 0) {
		goto __83
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __84
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__84:
	;
__83:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __81
__81:
	if 0 != 0 {
		goto __80
	}
	goto __82
__82:
	;
__78:
	;
	goto __76
__76:
	if 0 != 0 {
		goto __75
	}
	goto __77
__77:
	;
	goto __71
__71:
	if 0 != 0 {
		goto __70
	}
	goto __72
__72:
	;
__85:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, ts+19889, int32(uint64(unsafe.Sizeof([17]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy <= 255) {
		goto __88
	}
__90:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __93
	}
	XTclExpandCodeArray(tls, envPtr)
__93:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __94
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__94:
	;
__95:
	_delta5 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta5 != 0) {
		goto __98
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __99
	}
	_delta5 = 1 - _objIndexCopy
__99:
	;
__100:
	if !(_delta5 < 0) {
		goto __103
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __104
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__104:
	;
__103:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __101
__101:
	if 0 != 0 {
		goto __100
	}
	goto __102
__102:
	;
__98:
	;
	goto __96
__96:
	if 0 != 0 {
		goto __95
	}
	goto __97
__97:
	;
	goto __91
__91:
	if 0 != 0 {
		goto __90
	}
	goto __92
__92:
	;
	goto __89
__88:
__105:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __108
	}
	XTclExpandCodeArray(tls, envPtr)
__108:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __109
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__109:
	;
__110:
	_delta6 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta6 != 0) {
		goto __113
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __114
	}
	_delta6 = 1 - _objIndexCopy
__114:
	;
__115:
	if !(_delta6 < 0) {
		goto __118
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __119
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__119:
	;
__118:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __116
__116:
	if 0 != 0 {
		goto __115
	}
	goto __117
__117:
	;
__113:
	;
	goto __111
__111:
	if 0 != 0 {
		goto __110
	}
	goto __112
__112:
	;
	goto __106
__106:
	if 0 != 0 {
		goto __105
	}
	goto __107
__107:
	;
__89:
	;
	goto __86
__86:
	if 0 != 0 {
		goto __85
	}
	goto __87
__87:
	;
	if !(optionsVar < 256) {
		goto __120
	}
__122:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __125
	}
	XTclExpandCodeArray(tls, envPtr)
__125:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __126
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__126:
	;
__127:
	_delta7 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta7 != 0) {
		goto __130
	}
	if !(_delta7 == -0x7fffffff-1) {
		goto __131
	}
	_delta7 = 1 - optionsVar
__131:
	;
__132:
	if !(_delta7 < 0) {
		goto __135
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __136
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__136:
	;
__135:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta7
	goto __133
__133:
	if 0 != 0 {
		goto __132
	}
	goto __134
__134:
	;
__130:
	;
	goto __128
__128:
	if 0 != 0 {
		goto __127
	}
	goto __129
__129:
	;
	goto __123
__123:
	if 0 != 0 {
		goto __122
	}
	goto __124
__124:
	;
	goto __121
__120:
__137:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __140
	}
	XTclExpandCodeArray(tls, envPtr)
__140:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __141
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__141:
	;
__142:
	_delta8 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta8 != 0) {
		goto __145
	}
	if !(_delta8 == -0x7fffffff-1) {
		goto __146
	}
	_delta8 = 1 - optionsVar
__146:
	;
__147:
	if !(_delta8 < 0) {
		goto __150
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __151
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__151:
	;
__150:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta8
	goto __148
__148:
	if 0 != 0 {
		goto __147
	}
	goto __149
__149:
	;
__145:
	;
	goto __143
__143:
	if 0 != 0 {
		goto __142
	}
	goto __144
__144:
	;
	goto __138
__138:
	if 0 != 0 {
		goto __137
	}
	goto __139
__139:
	;
__121:
	;

__152:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __155
	}
	XTclExpandCodeArray(tls, envPtr)
__155:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __156
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__156:
	;
__157:
	_delta9 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta9 != 0) {
		goto __160
	}
	if !(_delta9 == -0x7fffffff-1) {
		goto __161
	}
	_delta9 = 1 - 0
__161:
	;
__162:
	if !(_delta9 < 0) {
		goto __165
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __166
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__166:
	;
__165:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta9
	goto __163
__163:
	if 0 != 0 {
		goto __162
	}
	goto __164
__164:
	;
__160:
	;
	goto __158
__158:
	if 0 != 0 {
		goto __157
	}
	goto __159
__159:
	;
	goto __153
__153:
	if 0 != 0 {
		goto __152
	}
	goto __154
__154:
	;
	afterBody = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__167:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __170
	}
	XTclExpandCodeArray(tls, envPtr)
__170:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __171
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__171:
	;
__172:
	_delta10 = XtclInstructionTable[INST_JUMP4].FstackEffect
	if !(_delta10 != 0) {
		goto __175
	}
	if !(_delta10 == -0x7fffffff-1) {
		goto __176
	}
	_delta10 = 1 - 0
__176:
	;
__177:
	if !(_delta10 < 0) {
		goto __180
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __181
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__181:
	;
__180:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta10
	goto __178
__178:
	if 0 != 0 {
		goto __177
	}
	goto __179
__179:
	;
__175:
	;
	goto __173
__173:
	if 0 != 0 {
		goto __172
	}
	goto __174
__174:
	;
	goto __168
__168:
	if 0 != 0 {
		goto __167
	}
	goto __169
__169:
	;
	goto __22
__21:
__182:
	_objIndexCopy1 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy1 <= 255) {
		goto __185
	}
__187:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __190
	}
	XTclExpandCodeArray(tls, envPtr)
__190:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __191
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__191:
	;
__192:
	_delta11 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta11 != 0) {
		goto __195
	}
	if !(_delta11 == -0x7fffffff-1) {
		goto __196
	}
	_delta11 = 1 - _objIndexCopy1
__196:
	;
__197:
	if !(_delta11 < 0) {
		goto __200
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __201
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__201:
	;
__200:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta11
	goto __198
__198:
	if 0 != 0 {
		goto __197
	}
	goto __199
__199:
	;
__195:
	;
	goto __193
__193:
	if 0 != 0 {
		goto __192
	}
	goto __194
__194:
	;
	goto __188
__188:
	if 0 != 0 {
		goto __187
	}
	goto __189
__189:
	;
	goto __186
__185:
__202:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __205
	}
	XTclExpandCodeArray(tls, envPtr)
__205:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __206
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__206:
	;
__207:
	_delta12 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta12 != 0) {
		goto __210
	}
	if !(_delta12 == -0x7fffffff-1) {
		goto __211
	}
	_delta12 = 1 - _objIndexCopy1
__211:
	;
__212:
	if !(_delta12 < 0) {
		goto __215
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __216
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__216:
	;
__215:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta12
	goto __213
__213:
	if 0 != 0 {
		goto __212
	}
	goto __214
__214:
	;
__210:
	;
	goto __208
__208:
	if 0 != 0 {
		goto __207
	}
	goto __209
__209:
	;
	goto __203
__203:
	if 0 != 0 {
		goto __202
	}
	goto __204
__204:
	;
__186:
	;
	goto __183
__183:
	if 0 != 0 {
		goto __182
	}
	goto __184
__184:
	;
__217:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __220
	}
	XTclExpandCodeArray(tls, envPtr)
__220:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __221
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__221:
	;
__222:
	_delta13 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta13 != 0) {
		goto __225
	}
	if !(_delta13 == -0x7fffffff-1) {
		goto __226
	}
	_delta13 = 1 - 2
__226:
	;
__227:
	if !(_delta13 < 0) {
		goto __230
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __231
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__231:
	;
__230:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta13
	goto __228
__228:
	if 0 != 0 {
		goto __227
	}
	goto __229
__229:
	;
__225:
	;
	goto __223
__223:
	if 0 != 0 {
		goto __222
	}
	goto __224
__224:
	;
	goto __218
__218:
	if 0 != 0 {
		goto __217
	}
	goto __219
__219:
	;
__232:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __235
	}
	XTclExpandCodeArray(tls, envPtr)
__235:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __236
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__236:
	;
__237:
	_delta14 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta14 != 0) {
		goto __240
	}
	if !(_delta14 == -0x7fffffff-1) {
		goto __241
	}
	_delta14 = 1 - 4
__241:
	;
__242:
	if !(_delta14 < 0) {
		goto __245
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __246
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__246:
	;
__245:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta14
	goto __243
__243:
	if 0 != 0 {
		goto __242
	}
	goto __244
__244:
	;
__240:
	;
	goto __238
__238:
	if 0 != 0 {
		goto __237
	}
	goto __239
__239:
	;
	goto __233
__233:
	if 0 != 0 {
		goto __232
	}
	goto __234
__234:
	;
__247:
	if !(-2 < 0) {
		goto __250
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __251
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__251:
	;
__250:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -2
	goto __248
__248:
	if 0 != 0 {
		goto __247
	}
	goto __249
__249:
	;
__22:
	;
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__252:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __255
	}
	XTclExpandCodeArray(tls, envPtr)
__255:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_CODE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __256
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RETURN_CODE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__256:
	;
__257:
	_delta15 = XtclInstructionTable[INST_PUSH_RETURN_CODE].FstackEffect
	if !(_delta15 != 0) {
		goto __260
	}
	if !(_delta15 == -0x7fffffff-1) {
		goto __261
	}
	_delta15 = 1 - 0
__261:
	;
__262:
	if !(_delta15 < 0) {
		goto __265
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __266
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__266:
	;
__265:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta15
	goto __263
__263:
	if 0 != 0 {
		goto __262
	}
	goto __264
__264:
	;
__260:
	;
	goto __258
__258:
	if 0 != 0 {
		goto __257
	}
	goto __259
__259:
	;
	goto __253
__253:
	if 0 != 0 {
		goto __252
	}
	goto __254
__254:
	;
__267:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __270
	}
	XTclExpandCodeArray(tls, envPtr)
__270:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __271
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RESULT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__271:
	;
__272:
	_delta16 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
	if !(_delta16 != 0) {
		goto __275
	}
	if !(_delta16 == -0x7fffffff-1) {
		goto __276
	}
	_delta16 = 1 - 0
__276:
	;
__277:
	if !(_delta16 < 0) {
		goto __280
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __281
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__281:
	;
__280:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta16
	goto __278
__278:
	if 0 != 0 {
		goto __277
	}
	goto __279
__279:
	;
__275:
	;
	goto __273
__273:
	if 0 != 0 {
		goto __272
	}
	goto __274
__274:
	;
	goto __268
__268:
	if 0 != 0 {
		goto __267
	}
	goto __269
__269:
	;
__282:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __285
	}
	XTclExpandCodeArray(tls, envPtr)
__285:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __286
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
			return 1
		}
		return 0
	}()
__286:
	;
__287:
	_delta17 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
	if !(_delta17 != 0) {
		goto __290
	}
	if !(_delta17 == -0x7fffffff-1) {
		goto __291
	}
	_delta17 = 1 - 0
__291:
	;
__292:
	if !(_delta17 < 0) {
		goto __295
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __296
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__296:
	;
__295:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta17
	goto __293
__293:
	if 0 != 0 {
		goto __292
	}
	goto __294
__294:
	;
__290:
	;
	goto __288
__288:
	if 0 != 0 {
		goto __287
	}
	goto __289
__289:
	;
	goto __283
__283:
	if 0 != 0 {
		goto __282
	}
	goto __284
__284:
	;
__297:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __300
	}
	XTclExpandCodeArray(tls, envPtr)
__300:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __301
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_END_CATCH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__301:
	;
__302:
	_delta18 = XtclInstructionTable[INST_END_CATCH].FstackEffect
	if !(_delta18 != 0) {
		goto __305
	}
	if !(_delta18 == -0x7fffffff-1) {
		goto __306
	}
	_delta18 = 1 - 0
__306:
	;
__307:
	if !(_delta18 < 0) {
		goto __310
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __311
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__311:
	;
__310:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta18
	goto __308
__308:
	if 0 != 0 {
		goto __307
	}
	goto __309
__309:
	;
__305:
	;
	goto __303
__303:
	if 0 != 0 {
		goto __302
	}
	goto __304
__304:
	;
	goto __298
__298:
	if 0 != 0 {
		goto __297
	}
	goto __299
__299:
	;
	if !(optionsVar < 256) {
		goto __312
	}
__314:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __317
	}
	XTclExpandCodeArray(tls, envPtr)
__317:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __318
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__318:
	;
__319:
	_delta19 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta19 != 0) {
		goto __322
	}
	if !(_delta19 == -0x7fffffff-1) {
		goto __323
	}
	_delta19 = 1 - optionsVar
__323:
	;
__324:
	if !(_delta19 < 0) {
		goto __327
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __328
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__328:
	;
__327:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta19
	goto __325
__325:
	if 0 != 0 {
		goto __324
	}
	goto __326
__326:
	;
__322:
	;
	goto __320
__320:
	if 0 != 0 {
		goto __319
	}
	goto __321
__321:
	;
	goto __315
__315:
	if 0 != 0 {
		goto __314
	}
	goto __316
__316:
	;
	goto __313
__312:
__329:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __332
	}
	XTclExpandCodeArray(tls, envPtr)
__332:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __333
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__333:
	;
__334:
	_delta20 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta20 != 0) {
		goto __337
	}
	if !(_delta20 == -0x7fffffff-1) {
		goto __338
	}
	_delta20 = 1 - optionsVar
__338:
	;
__339:
	if !(_delta20 < 0) {
		goto __342
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __343
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__343:
	;
__342:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta20
	goto __340
__340:
	if 0 != 0 {
		goto __339
	}
	goto __341
__341:
	;
__337:
	;
	goto __335
__335:
	if 0 != 0 {
		goto __334
	}
	goto __336
__336:
	;
	goto __330
__330:
	if 0 != 0 {
		goto __329
	}
	goto __331
__331:
	;
__313:
	;

__344:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __347
	}
	XTclExpandCodeArray(tls, envPtr)
__347:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __348
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__348:
	;
__349:
	_delta21 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta21 != 0) {
		goto __352
	}
	if !(_delta21 == -0x7fffffff-1) {
		goto __353
	}
	_delta21 = 1 - 0
__353:
	;
__354:
	if !(_delta21 < 0) {
		goto __357
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __358
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__358:
	;
__357:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta21
	goto __355
__355:
	if 0 != 0 {
		goto __354
	}
	goto __356
__356:
	;
__352:
	;
	goto __350
__350:
	if 0 != 0 {
		goto __349
	}
	goto __351
__351:
	;
	goto __345
__345:
	if 0 != 0 {
		goto __344
	}
	goto __346
__346:
	;
	if !(resultVar < 256) {
		goto __359
	}
__361:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __364
	}
	XTclExpandCodeArray(tls, envPtr)
__364:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __365
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__365:
	;
__366:
	_delta22 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta22 != 0) {
		goto __369
	}
	if !(_delta22 == -0x7fffffff-1) {
		goto __370
	}
	_delta22 = 1 - resultVar
__370:
	;
__371:
	if !(_delta22 < 0) {
		goto __374
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __375
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__375:
	;
__374:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta22
	goto __372
__372:
	if 0 != 0 {
		goto __371
	}
	goto __373
__373:
	;
__369:
	;
	goto __367
__367:
	if 0 != 0 {
		goto __366
	}
	goto __368
__368:
	;
	goto __362
__362:
	if 0 != 0 {
		goto __361
	}
	goto __363
__363:
	;
	goto __360
__359:
__376:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __379
	}
	XTclExpandCodeArray(tls, envPtr)
__379:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __380
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__380:
	;
__381:
	_delta23 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta23 != 0) {
		goto __384
	}
	if !(_delta23 == -0x7fffffff-1) {
		goto __385
	}
	_delta23 = 1 - resultVar
__385:
	;
__386:
	if !(_delta23 < 0) {
		goto __389
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __390
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__390:
	;
__389:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta23
	goto __387
__387:
	if 0 != 0 {
		goto __386
	}
	goto __388
__388:
	;
__384:
	;
	goto __382
__382:
	if 0 != 0 {
		goto __381
	}
	goto __383
__383:
	;
	goto __377
__377:
	if 0 != 0 {
		goto __376
	}
	goto __378
__378:
	;
__360:
	;

__391:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __394
	}
	XTclExpandCodeArray(tls, envPtr)
__394:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __395
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__395:
	;
__396:
	_delta24 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta24 != 0) {
		goto __399
	}
	if !(_delta24 == -0x7fffffff-1) {
		goto __400
	}
	_delta24 = 1 - 0
__400:
	;
__401:
	if !(_delta24 < 0) {
		goto __404
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __405
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__405:
	;
__404:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta24
	goto __402
__402:
	if 0 != 0 {
		goto __401
	}
	goto __403
__403:
	;
__399:
	;
	goto __397
__397:
	if 0 != 0 {
		goto __396
	}
	goto __398
__398:
	;
	goto __392
__392:
	if 0 != 0 {
		goto __391
	}
	goto __393
__393:
	;

	// Now we handle all the registered 'on' and 'trap' handlers in order.
	//
	// Slight overallocation, but reduces size of this function.

	addrsToFix = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numHandlers)))
	forwardsToFix = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(int32(0)))*uint64(numHandlers)))

	i = 0
__406:
	if !(i < numHandlers) {
		goto __408
	}

	libc.Xsprintf(tls, bp+8, ts+909, libc.VaList(bp, *(*int32)(unsafe.Pointer(matchCodes + uintptr(i)*4))))
__409:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __412
	}
	XTclExpandCodeArray(tls, envPtr)
__412:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DUP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __413
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DUP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__413:
	;
__414:
	_delta25 = XtclInstructionTable[INST_DUP].FstackEffect
	if !(_delta25 != 0) {
		goto __417
	}
	if !(_delta25 == -0x7fffffff-1) {
		goto __418
	}
	_delta25 = 1 - 0
__418:
	;
__419:
	if !(_delta25 < 0) {
		goto __422
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __423
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__423:
	;
__422:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta25
	goto __420
__420:
	if 0 != 0 {
		goto __419
	}
	goto __421
__421:
	;
__417:
	;
	goto __415
__415:
	if 0 != 0 {
		goto __414
	}
	goto __416
__416:
	;
	goto __410
__410:
	if 0 != 0 {
		goto __409
	}
	goto __411
__411:
	;
__424:
	_objIndexCopy2 = XTclRegisterLiteral(tls, envPtr, bp+8, int32(libc.Xstrlen(tls, bp+8)), 0)
	if !(_objIndexCopy2 <= 255) {
		goto __427
	}
__429:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __432
	}
	XTclExpandCodeArray(tls, envPtr)
__432:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __433
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__433:
	;
__434:
	_delta26 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta26 != 0) {
		goto __437
	}
	if !(_delta26 == -0x7fffffff-1) {
		goto __438
	}
	_delta26 = 1 - _objIndexCopy2
__438:
	;
__439:
	if !(_delta26 < 0) {
		goto __442
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __443
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__443:
	;
__442:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta26
	goto __440
__440:
	if 0 != 0 {
		goto __439
	}
	goto __441
__441:
	;
__437:
	;
	goto __435
__435:
	if 0 != 0 {
		goto __434
	}
	goto __436
__436:
	;
	goto __430
__430:
	if 0 != 0 {
		goto __429
	}
	goto __431
__431:
	;
	goto __428
__427:
__444:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __447
	}
	XTclExpandCodeArray(tls, envPtr)
__447:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy2))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __448
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__448:
	;
__449:
	_delta27 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta27 != 0) {
		goto __452
	}
	if !(_delta27 == -0x7fffffff-1) {
		goto __453
	}
	_delta27 = 1 - _objIndexCopy2
__453:
	;
__454:
	if !(_delta27 < 0) {
		goto __457
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __458
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__458:
	;
__457:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta27
	goto __455
__455:
	if 0 != 0 {
		goto __454
	}
	goto __456
__456:
	;
__452:
	;
	goto __450
__450:
	if 0 != 0 {
		goto __449
	}
	goto __451
__451:
	;
	goto __445
__445:
	if 0 != 0 {
		goto __444
	}
	goto __446
__446:
	;
__428:
	;
	goto __425
__425:
	if 0 != 0 {
		goto __424
	}
	goto __426
__426:
	;
__459:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __462
	}
	XTclExpandCodeArray(tls, envPtr)
__462:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __463
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_EQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__463:
	;
__464:
	_delta28 = XtclInstructionTable[INST_EQ].FstackEffect
	if !(_delta28 != 0) {
		goto __467
	}
	if !(_delta28 == -0x7fffffff-1) {
		goto __468
	}
	_delta28 = 1 - 0
__468:
	;
__469:
	if !(_delta28 < 0) {
		goto __472
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __473
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__473:
	;
__472:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta28
	goto __470
__470:
	if 0 != 0 {
		goto __469
	}
	goto __471
__471:
	;
__467:
	;
	goto __465
__465:
	if 0 != 0 {
		goto __464
	}
	goto __466
__466:
	;
	goto __460
__460:
	if 0 != 0 {
		goto __459
	}
	goto __461
__461:
	;
	notCodeJumpSource = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__474:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __477
	}
	XTclExpandCodeArray(tls, envPtr)
__477:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __478
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_FALSE4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__478:
	;
__479:
	_delta29 = XtclInstructionTable[INST_JUMP_FALSE4].FstackEffect
	if !(_delta29 != 0) {
		goto __482
	}
	if !(_delta29 == -0x7fffffff-1) {
		goto __483
	}
	_delta29 = 1 - 0
__483:
	;
__484:
	if !(_delta29 < 0) {
		goto __487
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __488
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__488:
	;
__487:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta29
	goto __485
__485:
	if 0 != 0 {
		goto __484
	}
	goto __486
__486:
	;
__482:
	;
	goto __480
__480:
	if 0 != 0 {
		goto __479
	}
	goto __481
__481:
	;
	goto __475
__475:
	if 0 != 0 {
		goto __474
	}
	goto __476
__476:
	;
	if !(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)) != 0) {
		goto __489
	}
	XTcl_ListObjLength(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)), bp+32)

	// Match the errorcode according to try/trap rules.

	if !(optionsVar < 256) {
		goto __491
	}
__493:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __496
	}
	XTclExpandCodeArray(tls, envPtr)
__496:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __497
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__497:
	;
__498:
	_delta30 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta30 != 0) {
		goto __501
	}
	if !(_delta30 == -0x7fffffff-1) {
		goto __502
	}
	_delta30 = 1 - optionsVar
__502:
	;
__503:
	if !(_delta30 < 0) {
		goto __506
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __507
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__507:
	;
__506:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta30
	goto __504
__504:
	if 0 != 0 {
		goto __503
	}
	goto __505
__505:
	;
__501:
	;
	goto __499
__499:
	if 0 != 0 {
		goto __498
	}
	goto __500
__500:
	;
	goto __494
__494:
	if 0 != 0 {
		goto __493
	}
	goto __495
__495:
	;
	goto __492
__491:
__508:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __511
	}
	XTclExpandCodeArray(tls, envPtr)
__511:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __512
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__512:
	;
__513:
	_delta31 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta31 != 0) {
		goto __516
	}
	if !(_delta31 == -0x7fffffff-1) {
		goto __517
	}
	_delta31 = 1 - optionsVar
__517:
	;
__518:
	if !(_delta31 < 0) {
		goto __521
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __522
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__522:
	;
__521:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta31
	goto __519
__519:
	if 0 != 0 {
		goto __518
	}
	goto __520
__520:
	;
__516:
	;
	goto __514
__514:
	if 0 != 0 {
		goto __513
	}
	goto __515
__515:
	;
	goto __509
__509:
	if 0 != 0 {
		goto __508
	}
	goto __510
__510:
	;
__492:
	;

__523:
	_objIndexCopy3 = XTclRegisterLiteral(tls, envPtr, ts+12571, int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy3 <= 255) {
		goto __526
	}
__528:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __531
	}
	XTclExpandCodeArray(tls, envPtr)
__531:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __532
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__532:
	;
__533:
	_delta32 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta32 != 0) {
		goto __536
	}
	if !(_delta32 == -0x7fffffff-1) {
		goto __537
	}
	_delta32 = 1 - _objIndexCopy3
__537:
	;
__538:
	if !(_delta32 < 0) {
		goto __541
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __542
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__542:
	;
__541:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta32
	goto __539
__539:
	if 0 != 0 {
		goto __538
	}
	goto __540
__540:
	;
__536:
	;
	goto __534
__534:
	if 0 != 0 {
		goto __533
	}
	goto __535
__535:
	;
	goto __529
__529:
	if 0 != 0 {
		goto __528
	}
	goto __530
__530:
	;
	goto __527
__526:
__543:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __546
	}
	XTclExpandCodeArray(tls, envPtr)
__546:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __547
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__547:
	;
__548:
	_delta33 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta33 != 0) {
		goto __551
	}
	if !(_delta33 == -0x7fffffff-1) {
		goto __552
	}
	_delta33 = 1 - _objIndexCopy3
__552:
	;
__553:
	if !(_delta33 < 0) {
		goto __556
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __557
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__557:
	;
__556:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta33
	goto __554
__554:
	if 0 != 0 {
		goto __553
	}
	goto __555
__555:
	;
__551:
	;
	goto __549
__549:
	if 0 != 0 {
		goto __548
	}
	goto __550
__550:
	;
	goto __544
__544:
	if 0 != 0 {
		goto __543
	}
	goto __545
__545:
	;
__527:
	;
	goto __524
__524:
	if 0 != 0 {
		goto __523
	}
	goto __525
__525:
	;
__558:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __561
	}
	XTclExpandCodeArray(tls, envPtr)
__561:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_GET)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __562
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DICT_GET == INST_START_CMD {
			return 1
		}
		return 0
	}()
__562:
	;
__563:
	_delta34 = XtclInstructionTable[INST_DICT_GET].FstackEffect
	if !(_delta34 != 0) {
		goto __566
	}
	if !(_delta34 == -0x7fffffff-1) {
		goto __567
	}
	_delta34 = 1 - 1
__567:
	;
__568:
	if !(_delta34 < 0) {
		goto __571
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __572
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__572:
	;
__571:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta34
	goto __569
__569:
	if 0 != 0 {
		goto __568
	}
	goto __570
__570:
	;
__566:
	;
	goto __564
__564:
	if 0 != 0 {
		goto __563
	}
	goto __565
__565:
	;
	goto __559
__559:
	if 0 != 0 {
		goto __558
	}
	goto __560
__560:
	;
__573:
	if !(-1 < 0) {
		goto __576
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __577
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__577:
	;
__576:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	goto __574
__574:
	if 0 != 0 {
		goto __573
	}
	goto __575
__575:
	;
__578:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __581
	}
	XTclExpandCodeArray(tls, envPtr)
__581:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_RANGE_IMM)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __582
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LIST_RANGE_IMM == INST_START_CMD {
			return 1
		}
		return 0
	}()
__582:
	;
__583:
	_delta35 = XtclInstructionTable[INST_LIST_RANGE_IMM].FstackEffect
	if !(_delta35 != 0) {
		goto __586
	}
	if !(_delta35 == -0x7fffffff-1) {
		goto __587
	}
	_delta35 = 1 - 0
__587:
	;
__588:
	if !(_delta35 < 0) {
		goto __591
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __592
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__592:
	;
__591:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta35
	goto __589
__589:
	if 0 != 0 {
		goto __588
	}
	goto __590
__590:
	;
__586:
	;
	goto __584
__584:
	if 0 != 0 {
		goto __583
	}
	goto __585
__585:
	;
	goto __579
__579:
	if 0 != 0 {
		goto __578
	}
	goto __580
__580:
	;
__593:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __596
	}
	XTclExpandCodeArray(tls, envPtr)
__596:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 32))-1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 32))-1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 32))-1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 32)) - 1))
	goto __594
__594:
	if 0 != 0 {
		goto __593
	}
	goto __595
__595:
	;
	p = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)), bp+32)
__597:
	_objIndexCopy4 = XTclRegisterLiteral(tls, envPtr, p, *(*int32)(unsafe.Pointer(bp + 32)), 0)
	if !(_objIndexCopy4 <= 255) {
		goto __600
	}
__602:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __605
	}
	XTclExpandCodeArray(tls, envPtr)
__605:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __606
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__606:
	;
__607:
	_delta36 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta36 != 0) {
		goto __610
	}
	if !(_delta36 == -0x7fffffff-1) {
		goto __611
	}
	_delta36 = 1 - _objIndexCopy4
__611:
	;
__612:
	if !(_delta36 < 0) {
		goto __615
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __616
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__616:
	;
__615:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta36
	goto __613
__613:
	if 0 != 0 {
		goto __612
	}
	goto __614
__614:
	;
__610:
	;
	goto __608
__608:
	if 0 != 0 {
		goto __607
	}
	goto __609
__609:
	;
	goto __603
__603:
	if 0 != 0 {
		goto __602
	}
	goto __604
__604:
	;
	goto __601
__600:
__617:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __620
	}
	XTclExpandCodeArray(tls, envPtr)
__620:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy4))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __621
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__621:
	;
__622:
	_delta37 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta37 != 0) {
		goto __625
	}
	if !(_delta37 == -0x7fffffff-1) {
		goto __626
	}
	_delta37 = 1 - _objIndexCopy4
__626:
	;
__627:
	if !(_delta37 < 0) {
		goto __630
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __631
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__631:
	;
__630:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta37
	goto __628
__628:
	if 0 != 0 {
		goto __627
	}
	goto __629
__629:
	;
__625:
	;
	goto __623
__623:
	if 0 != 0 {
		goto __622
	}
	goto __624
__624:
	;
	goto __618
__618:
	if 0 != 0 {
		goto __617
	}
	goto __619
__619:
	;
__601:
	;
	goto __598
__598:
	if 0 != 0 {
		goto __597
	}
	goto __599
__599:
	;
__632:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __635
	}
	XTclExpandCodeArray(tls, envPtr)
__635:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_EQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __636
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STR_EQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__636:
	;
__637:
	_delta38 = XtclInstructionTable[INST_STR_EQ].FstackEffect
	if !(_delta38 != 0) {
		goto __640
	}
	if !(_delta38 == -0x7fffffff-1) {
		goto __641
	}
	_delta38 = 1 - 0
__641:
	;
__642:
	if !(_delta38 < 0) {
		goto __645
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __646
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__646:
	;
__645:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta38
	goto __643
__643:
	if 0 != 0 {
		goto __642
	}
	goto __644
__644:
	;
__640:
	;
	goto __638
__638:
	if 0 != 0 {
		goto __637
	}
	goto __639
__639:
	;
	goto __633
__633:
	if 0 != 0 {
		goto __632
	}
	goto __634
__634:
	;
	notECJumpSource = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__647:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __650
	}
	XTclExpandCodeArray(tls, envPtr)
__650:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __651
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_FALSE4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__651:
	;
__652:
	_delta39 = XtclInstructionTable[INST_JUMP_FALSE4].FstackEffect
	if !(_delta39 != 0) {
		goto __655
	}
	if !(_delta39 == -0x7fffffff-1) {
		goto __656
	}
	_delta39 = 1 - 0
__656:
	;
__657:
	if !(_delta39 < 0) {
		goto __660
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __661
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__661:
	;
__660:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta39
	goto __658
__658:
	if 0 != 0 {
		goto __657
	}
	goto __659
__659:
	;
__655:
	;
	goto __653
__653:
	if 0 != 0 {
		goto __652
	}
	goto __654
__654:
	;
	goto __648
__648:
	if 0 != 0 {
		goto __647
	}
	goto __649
__649:
	;
	goto __490
__489:
	notECJumpSource = -1 // LINT
__490:
	;
__662:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __665
	}
	XTclExpandCodeArray(tls, envPtr)
__665:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __666
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__666:
	;
__667:
	_delta40 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta40 != 0) {
		goto __670
	}
	if !(_delta40 == -0x7fffffff-1) {
		goto __671
	}
	_delta40 = 1 - 0
__671:
	;
__672:
	if !(_delta40 < 0) {
		goto __675
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __676
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__676:
	;
__675:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta40
	goto __673
__673:
	if 0 != 0 {
		goto __672
	}
	goto __674
__674:
	;
__670:
	;
	goto __668
__668:
	if 0 != 0 {
		goto __667
	}
	goto __669
__669:
	;
	goto __663
__663:
	if 0 != 0 {
		goto __662
	}
	goto __664
__664:
	;

	// There is a finally clause, so we need a fairly complex sequence of
	// instructions to deal with an on/trap handler because we must call
	// the finally handler *and* we need to substitute the result from a
	// failed trap for the result from the main script.

	if !(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4)) >= 0 || *(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8)) != 0) {
		goto __677
	}
	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
__678:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __681
	}
	XTclExpandCodeArray(tls, envPtr)
__681:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __682
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_BEGIN_CATCH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__682:
	;
__683:
	_delta41 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
	if !(_delta41 != 0) {
		goto __686
	}
	if !(_delta41 == -0x7fffffff-1) {
		goto __687
	}
	_delta41 = 1 - range1
__687:
	;
__688:
	if !(_delta41 < 0) {
		goto __691
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __692
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__692:
	;
__691:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta41
	goto __689
__689:
	if 0 != 0 {
		goto __688
	}
	goto __690
__690:
	;
__686:
	;
	goto __684
__684:
	if 0 != 0 {
		goto __683
	}
	goto __685
__685:
	;
	goto __679
__679:
	if 0 != 0 {
		goto __678
	}
	goto __680
__680:
	;
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__677:
	;
	if !(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4)) >= 0) {
		goto __693
	}
	if !(resultVar < 256) {
		goto __695
	}
__697:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __700
	}
	XTclExpandCodeArray(tls, envPtr)
__700:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __701
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__701:
	;
__702:
	_delta42 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta42 != 0) {
		goto __705
	}
	if !(_delta42 == -0x7fffffff-1) {
		goto __706
	}
	_delta42 = 1 - resultVar
__706:
	;
__707:
	if !(_delta42 < 0) {
		goto __710
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __711
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__711:
	;
__710:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta42
	goto __708
__708:
	if 0 != 0 {
		goto __707
	}
	goto __709
__709:
	;
__705:
	;
	goto __703
__703:
	if 0 != 0 {
		goto __702
	}
	goto __704
__704:
	;
	goto __698
__698:
	if 0 != 0 {
		goto __697
	}
	goto __699
__699:
	;
	goto __696
__695:
__712:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __715
	}
	XTclExpandCodeArray(tls, envPtr)
__715:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __716
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__716:
	;
__717:
	_delta43 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta43 != 0) {
		goto __720
	}
	if !(_delta43 == -0x7fffffff-1) {
		goto __721
	}
	_delta43 = 1 - resultVar
__721:
	;
__722:
	if !(_delta43 < 0) {
		goto __725
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __726
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__726:
	;
__725:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta43
	goto __723
__723:
	if 0 != 0 {
		goto __722
	}
	goto __724
__724:
	;
__720:
	;
	goto __718
__718:
	if 0 != 0 {
		goto __717
	}
	goto __719
__719:
	;
	goto __713
__713:
	if 0 != 0 {
		goto __712
	}
	goto __714
__714:
	;
__696:
	;

	if !(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4)) < 256) {
		goto __727
	}
__729:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __732
	}
	XTclExpandCodeArray(tls, envPtr)
__732:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __733
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__733:
	;
__734:
	_delta44 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta44 != 0) {
		goto __737
	}
	if !(_delta44 == -0x7fffffff-1) {
		goto __738
	}
	_delta44 = 1 - *(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))
__738:
	;
__739:
	if !(_delta44 < 0) {
		goto __742
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __743
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__743:
	;
__742:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta44
	goto __740
__740:
	if 0 != 0 {
		goto __739
	}
	goto __741
__741:
	;
__737:
	;
	goto __735
__735:
	if 0 != 0 {
		goto __734
	}
	goto __736
__736:
	;
	goto __730
__730:
	if 0 != 0 {
		goto __729
	}
	goto __731
__731:
	;
	goto __728
__727:
__744:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __747
	}
	XTclExpandCodeArray(tls, envPtr)
__747:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __748
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__748:
	;
__749:
	_delta45 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta45 != 0) {
		goto __752
	}
	if !(_delta45 == -0x7fffffff-1) {
		goto __753
	}
	_delta45 = 1 - *(*int32)(unsafe.Pointer(resultVars + uintptr(i)*4))
__753:
	;
__754:
	if !(_delta45 < 0) {
		goto __757
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __758
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__758:
	;
__757:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta45
	goto __755
__755:
	if 0 != 0 {
		goto __754
	}
	goto __756
__756:
	;
__752:
	;
	goto __750
__750:
	if 0 != 0 {
		goto __749
	}
	goto __751
__751:
	;
	goto __745
__745:
	if 0 != 0 {
		goto __744
	}
	goto __746
__746:
	;
__728:
	;

__759:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __762
	}
	XTclExpandCodeArray(tls, envPtr)
__762:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __763
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__763:
	;
__764:
	_delta46 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta46 != 0) {
		goto __767
	}
	if !(_delta46 == -0x7fffffff-1) {
		goto __768
	}
	_delta46 = 1 - 0
__768:
	;
__769:
	if !(_delta46 < 0) {
		goto __772
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __773
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__773:
	;
__772:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta46
	goto __770
__770:
	if 0 != 0 {
		goto __769
	}
	goto __771
__771:
	;
__767:
	;
	goto __765
__765:
	if 0 != 0 {
		goto __764
	}
	goto __766
__766:
	;
	goto __760
__760:
	if 0 != 0 {
		goto __759
	}
	goto __761
__761:
	;
	if !(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4)) >= 0) {
		goto __774
	}
	if !(optionsVar < 256) {
		goto __775
	}
__777:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __780
	}
	XTclExpandCodeArray(tls, envPtr)
__780:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __781
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__781:
	;
__782:
	_delta47 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta47 != 0) {
		goto __785
	}
	if !(_delta47 == -0x7fffffff-1) {
		goto __786
	}
	_delta47 = 1 - optionsVar
__786:
	;
__787:
	if !(_delta47 < 0) {
		goto __790
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __791
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__791:
	;
__790:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta47
	goto __788
__788:
	if 0 != 0 {
		goto __787
	}
	goto __789
__789:
	;
__785:
	;
	goto __783
__783:
	if 0 != 0 {
		goto __782
	}
	goto __784
__784:
	;
	goto __778
__778:
	if 0 != 0 {
		goto __777
	}
	goto __779
__779:
	;
	goto __776
__775:
__792:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __795
	}
	XTclExpandCodeArray(tls, envPtr)
__795:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __796
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__796:
	;
__797:
	_delta48 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta48 != 0) {
		goto __800
	}
	if !(_delta48 == -0x7fffffff-1) {
		goto __801
	}
	_delta48 = 1 - optionsVar
__801:
	;
__802:
	if !(_delta48 < 0) {
		goto __805
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __806
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__806:
	;
__805:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta48
	goto __803
__803:
	if 0 != 0 {
		goto __802
	}
	goto __804
__804:
	;
__800:
	;
	goto __798
__798:
	if 0 != 0 {
		goto __797
	}
	goto __799
__799:
	;
	goto __793
__793:
	if 0 != 0 {
		goto __792
	}
	goto __794
__794:
	;
__776:
	;

	if !(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4)) < 256) {
		goto __807
	}
__809:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __812
	}
	XTclExpandCodeArray(tls, envPtr)
__812:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __813
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__813:
	;
__814:
	_delta49 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta49 != 0) {
		goto __817
	}
	if !(_delta49 == -0x7fffffff-1) {
		goto __818
	}
	_delta49 = 1 - *(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))
__818:
	;
__819:
	if !(_delta49 < 0) {
		goto __822
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __823
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__823:
	;
__822:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta49
	goto __820
__820:
	if 0 != 0 {
		goto __819
	}
	goto __821
__821:
	;
__817:
	;
	goto __815
__815:
	if 0 != 0 {
		goto __814
	}
	goto __816
__816:
	;
	goto __810
__810:
	if 0 != 0 {
		goto __809
	}
	goto __811
__811:
	;
	goto __808
__807:
__824:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __827
	}
	XTclExpandCodeArray(tls, envPtr)
__827:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __828
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__828:
	;
__829:
	_delta50 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta50 != 0) {
		goto __832
	}
	if !(_delta50 == -0x7fffffff-1) {
		goto __833
	}
	_delta50 = 1 - *(*int32)(unsafe.Pointer(optionVars + uintptr(i)*4))
__833:
	;
__834:
	if !(_delta50 < 0) {
		goto __837
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __838
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__838:
	;
__837:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta50
	goto __835
__835:
	if 0 != 0 {
		goto __834
	}
	goto __836
__836:
	;
__832:
	;
	goto __830
__830:
	if 0 != 0 {
		goto __829
	}
	goto __831
__831:
	;
	goto __825
__825:
	if 0 != 0 {
		goto __824
	}
	goto __826
__826:
	;
__808:
	;

__839:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __842
	}
	XTclExpandCodeArray(tls, envPtr)
__842:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __843
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__843:
	;
__844:
	_delta51 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta51 != 0) {
		goto __847
	}
	if !(_delta51 == -0x7fffffff-1) {
		goto __848
	}
	_delta51 = 1 - 0
__848:
	;
__849:
	if !(_delta51 < 0) {
		goto __852
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __853
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__853:
	;
__852:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta51
	goto __850
__850:
	if 0 != 0 {
		goto __849
	}
	goto __851
__851:
	;
__847:
	;
	goto __845
__845:
	if 0 != 0 {
		goto __844
	}
	goto __846
__846:
	;
	goto __840
__840:
	if 0 != 0 {
		goto __839
	}
	goto __841
__841:
	;
__774:
	;

	if !!(int32(*(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8))) != 0) {
		goto __854
	}
	// No handler. Will not be the last handler (that is a
	// condition that is checked by the caller). Chain to the next
	// one.

	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
__855:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __858
	}
	XTclExpandCodeArray(tls, envPtr)
__858:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __859
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_END_CATCH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__859:
	;
__860:
	_delta52 = XtclInstructionTable[INST_END_CATCH].FstackEffect
	if !(_delta52 != 0) {
		goto __863
	}
	if !(_delta52 == -0x7fffffff-1) {
		goto __864
	}
	_delta52 = 1 - 0
__864:
	;
__865:
	if !(_delta52 < 0) {
		goto __868
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __869
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__869:
	;
__868:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta52
	goto __866
__866:
	if 0 != 0 {
		goto __865
	}
	goto __867
__867:
	;
__863:
	;
	goto __861
__861:
	if 0 != 0 {
		goto __860
	}
	goto __862
__862:
	;
	goto __856
__856:
	if 0 != 0 {
		goto __855
	}
	goto __857
__857:
	;
	forwardsNeedFixing = 1
	*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(i)*4)) = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__870:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __873
	}
	XTclExpandCodeArray(tls, envPtr)
__873:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __874
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__874:
	;
__875:
	_delta53 = XtclInstructionTable[INST_JUMP4].FstackEffect
	if !(_delta53 != 0) {
		goto __878
	}
	if !(_delta53 == -0x7fffffff-1) {
		goto __879
	}
	_delta53 = 1 - 0
__879:
	;
__880:
	if !(_delta53 < 0) {
		goto __883
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __884
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__884:
	;
__883:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta53
	goto __881
__881:
	if 0 != 0 {
		goto __880
	}
	goto __882
__882:
	;
__878:
	;
	goto __876
__876:
	if 0 != 0 {
		goto __875
	}
	goto __877
__877:
	;
	goto __871
__871:
	if 0 != 0 {
		goto __870
	}
	goto __872
__872:
	;
	goto finishTrapCatchHandling
__854:
	;
	goto __694
__693:
	if !!(int32(*(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8))) != 0) {
		goto __885
	}
	// No handler. Will not be the last handler (that condition is
	// checked by the caller). Chain to the next one.

	forwardsNeedFixing = 1
	*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(i)*4)) = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__886:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __889
	}
	XTclExpandCodeArray(tls, envPtr)
__889:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __890
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__890:
	;
__891:
	_delta54 = XtclInstructionTable[INST_JUMP4].FstackEffect
	if !(_delta54 != 0) {
		goto __894
	}
	if !(_delta54 == -0x7fffffff-1) {
		goto __895
	}
	_delta54 = 1 - 0
__895:
	;
__896:
	if !(_delta54 < 0) {
		goto __899
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __900
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__900:
	;
__899:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta54
	goto __897
__897:
	if 0 != 0 {
		goto __896
	}
	goto __898
__898:
	;
__894:
	;
	goto __892
__892:
	if 0 != 0 {
		goto __891
	}
	goto __893
__893:
	;
	goto __887
__887:
	if 0 != 0 {
		goto __886
	}
	goto __888
__888:
	;
	goto endOfThisArm
__885:
	;
__694:
	;

	// Got a handler. Make sure that any pending patch-up actions from
	// previous unprocessed handlers are dealt with now that we know where
	// they are to jump to.

	if !(forwardsNeedFixing != 0) {
		goto __901
	}
	forwardsNeedFixing = 0
__902:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __905
	}
	XTclExpandCodeArray(tls, envPtr)
__905:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __906
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__906:
	;
__907:
	_delta55 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta55 != 0) {
		goto __910
	}
	if !(_delta55 == -0x7fffffff-1) {
		goto __911
	}
	_delta55 = 1 - 7
__911:
	;
__912:
	if !(_delta55 < 0) {
		goto __915
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __916
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__916:
	;
__915:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta55
	goto __913
__913:
	if 0 != 0 {
		goto __912
	}
	goto __914
__914:
	;
__910:
	;
	goto __908
__908:
	if 0 != 0 {
		goto __907
	}
	goto __909
__909:
	;
	goto __903
__903:
	if 0 != 0 {
		goto __902
	}
	goto __904
__904:
	;
	j = 0
__917:
	if !(j < i) {
		goto __919
	}
	if !(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)) == -1) {
		goto __920
	}
	goto __918
__920:
	;
__921:
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4))) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)))) >> 24)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4))) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)))) >> 16)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4))) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)))) >> 8)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4))) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)))))
	goto __922
__922:
	if 0 != 0 {
		goto __921
	}
	goto __923
__923:
	;
	*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(j)*4)) = -1
	goto __918
__918:
	j++
	goto __917
	goto __919
__919:
	;
__924:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __927
	}
	XTclExpandCodeArray(tls, envPtr)
__927:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __928
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_BEGIN_CATCH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__928:
	;
__929:
	_delta56 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
	if !(_delta56 != 0) {
		goto __932
	}
	if !(_delta56 == -0x7fffffff-1) {
		goto __933
	}
	_delta56 = 1 - range1
__933:
	;
__934:
	if !(_delta56 < 0) {
		goto __937
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __938
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__938:
	;
__937:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta56
	goto __935
__935:
	if 0 != 0 {
		goto __934
	}
	goto __936
__936:
	;
__932:
	;
	goto __930
__930:
	if 0 != 0 {
		goto __929
	}
	goto __931
__931:
	;
	goto __925
__925:
	if 0 != 0 {
		goto __924
	}
	goto __926
__926:
	;
__901:
	;
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(5+i*4)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(5+i*4)*8))
	XTclCompileCmdWord(tls, interp, *(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8))+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(handlerTokens + uintptr(i)*8)))).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
__939:
	_objIndexCopy5 = XTclRegisterLiteral(tls, envPtr, ts+18935, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy5 <= 255) {
		goto __942
	}
__944:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __947
	}
	XTclExpandCodeArray(tls, envPtr)
__947:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __948
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__948:
	;
__949:
	_delta57 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta57 != 0) {
		goto __952
	}
	if !(_delta57 == -0x7fffffff-1) {
		goto __953
	}
	_delta57 = 1 - _objIndexCopy5
__953:
	;
__954:
	if !(_delta57 < 0) {
		goto __957
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __958
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__958:
	;
__957:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta57
	goto __955
__955:
	if 0 != 0 {
		goto __954
	}
	goto __956
__956:
	;
__952:
	;
	goto __950
__950:
	if 0 != 0 {
		goto __949
	}
	goto __951
__951:
	;
	goto __945
__945:
	if 0 != 0 {
		goto __944
	}
	goto __946
__946:
	;
	goto __943
__942:
__959:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __962
	}
	XTclExpandCodeArray(tls, envPtr)
__962:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __963
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__963:
	;
__964:
	_delta58 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta58 != 0) {
		goto __967
	}
	if !(_delta58 == -0x7fffffff-1) {
		goto __968
	}
	_delta58 = 1 - _objIndexCopy5
__968:
	;
__969:
	if !(_delta58 < 0) {
		goto __972
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __973
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__973:
	;
__972:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta58
	goto __970
__970:
	if 0 != 0 {
		goto __969
	}
	goto __971
__971:
	;
__967:
	;
	goto __965
__965:
	if 0 != 0 {
		goto __964
	}
	goto __966
__966:
	;
	goto __960
__960:
	if 0 != 0 {
		goto __959
	}
	goto __961
__961:
	;
__943:
	;
	goto __940
__940:
	if 0 != 0 {
		goto __939
	}
	goto __941
__941:
	;
__974:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __977
	}
	XTclExpandCodeArray(tls, envPtr)
__977:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __978
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
			return 1
		}
		return 0
	}()
__978:
	;
__979:
	_delta59 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
	if !(_delta59 != 0) {
		goto __982
	}
	if !(_delta59 == -0x7fffffff-1) {
		goto __983
	}
	_delta59 = 1 - 0
__983:
	;
__984:
	if !(_delta59 < 0) {
		goto __987
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __988
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__988:
	;
__987:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta59
	goto __985
__985:
	if 0 != 0 {
		goto __984
	}
	goto __986
__986:
	;
__982:
	;
	goto __980
__980:
	if 0 != 0 {
		goto __979
	}
	goto __981
__981:
	;
	goto __975
__975:
	if 0 != 0 {
		goto __974
	}
	goto __976
__976:
	;
__989:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __992
	}
	XTclExpandCodeArray(tls, envPtr)
__992:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __993
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__993:
	;
__994:
	_delta60 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta60 != 0) {
		goto __997
	}
	if !(_delta60 == -0x7fffffff-1) {
		goto __998
	}
	_delta60 = 1 - 3
__998:
	;
__999:
	if !(_delta60 < 0) {
		goto __1002
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1003
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1003:
	;
__1002:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta60
	goto __1000
__1000:
	if 0 != 0 {
		goto __999
	}
	goto __1001
__1001:
	;
__997:
	;
	goto __995
__995:
	if 0 != 0 {
		goto __994
	}
	goto __996
__996:
	;
	goto __990
__990:
	if 0 != 0 {
		goto __989
	}
	goto __991
__991:
	;
__1004:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1007
	}
	XTclExpandCodeArray(tls, envPtr)
__1007:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(5))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1008
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1008:
	;
__1009:
	_delta61 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta61 != 0) {
		goto __1012
	}
	if !(_delta61 == -0x7fffffff-1) {
		goto __1013
	}
	_delta61 = 1 - 5
__1013:
	;
__1014:
	if !(_delta61 < 0) {
		goto __1017
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1018
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1018:
	;
__1017:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta61
	goto __1015
__1015:
	if 0 != 0 {
		goto __1014
	}
	goto __1016
__1016:
	;
__1012:
	;
	goto __1010
__1010:
	if 0 != 0 {
		goto __1009
	}
	goto __1011
__1011:
	;
	goto __1005
__1005:
	if 0 != 0 {
		goto __1004
	}
	goto __1006
__1006:
	;
__1019:
	if !(-3 < 0) {
		goto __1022
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1023
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1023:
	;
__1022:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -3
	goto __1020
__1020:
	if 0 != 0 {
		goto __1019
	}
	goto __1021
__1021:
	;
	*(*int32)(unsafe.Pointer(forwardsToFix + uintptr(i)*4)) = -1

	// Error in handler or setting of variables; replace the stored
	// exception with the new one. Note that we only push this if we have
	// either a body or some variable setting here. Otherwise this code is
	// unreachable.

finishTrapCatchHandling:
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1024:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1027
	}
	XTclExpandCodeArray(tls, envPtr)
__1027:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1028
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1028:
	;
__1029:
	_delta62 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
	if !(_delta62 != 0) {
		goto __1032
	}
	if !(_delta62 == -0x7fffffff-1) {
		goto __1033
	}
	_delta62 = 1 - 0
__1033:
	;
__1034:
	if !(_delta62 < 0) {
		goto __1037
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1038
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1038:
	;
__1037:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta62
	goto __1035
__1035:
	if 0 != 0 {
		goto __1034
	}
	goto __1036
__1036:
	;
__1032:
	;
	goto __1030
__1030:
	if 0 != 0 {
		goto __1029
	}
	goto __1031
__1031:
	;
	goto __1025
__1025:
	if 0 != 0 {
		goto __1024
	}
	goto __1026
__1026:
	;
__1039:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1042
	}
	XTclExpandCodeArray(tls, envPtr)
__1042:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_CODE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1043
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RETURN_CODE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1043:
	;
__1044:
	_delta63 = XtclInstructionTable[INST_PUSH_RETURN_CODE].FstackEffect
	if !(_delta63 != 0) {
		goto __1047
	}
	if !(_delta63 == -0x7fffffff-1) {
		goto __1048
	}
	_delta63 = 1 - 0
__1048:
	;
__1049:
	if !(_delta63 < 0) {
		goto __1052
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1053
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1053:
	;
__1052:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta63
	goto __1050
__1050:
	if 0 != 0 {
		goto __1049
	}
	goto __1051
__1051:
	;
__1047:
	;
	goto __1045
__1045:
	if 0 != 0 {
		goto __1044
	}
	goto __1046
__1046:
	;
	goto __1040
__1040:
	if 0 != 0 {
		goto __1039
	}
	goto __1041
__1041:
	;
__1054:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1057
	}
	XTclExpandCodeArray(tls, envPtr)
__1057:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1058
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RESULT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1058:
	;
__1059:
	_delta64 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
	if !(_delta64 != 0) {
		goto __1062
	}
	if !(_delta64 == -0x7fffffff-1) {
		goto __1063
	}
	_delta64 = 1 - 0
__1063:
	;
__1064:
	if !(_delta64 < 0) {
		goto __1067
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1068
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1068:
	;
__1067:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta64
	goto __1065
__1065:
	if 0 != 0 {
		goto __1064
	}
	goto __1066
__1066:
	;
__1062:
	;
	goto __1060
__1060:
	if 0 != 0 {
		goto __1059
	}
	goto __1061
__1061:
	;
	goto __1055
__1055:
	if 0 != 0 {
		goto __1054
	}
	goto __1056
__1056:
	;
__1069:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1072
	}
	XTclExpandCodeArray(tls, envPtr)
__1072:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1073
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_END_CATCH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1073:
	;
__1074:
	_delta65 = XtclInstructionTable[INST_END_CATCH].FstackEffect
	if !(_delta65 != 0) {
		goto __1077
	}
	if !(_delta65 == -0x7fffffff-1) {
		goto __1078
	}
	_delta65 = 1 - 0
__1078:
	;
__1079:
	if !(_delta65 < 0) {
		goto __1082
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1083
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1083:
	;
__1082:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta65
	goto __1080
__1080:
	if 0 != 0 {
		goto __1079
	}
	goto __1081
__1081:
	;
__1077:
	;
	goto __1075
__1075:
	if 0 != 0 {
		goto __1074
	}
	goto __1076
__1076:
	;
	goto __1070
__1070:
	if 0 != 0 {
		goto __1069
	}
	goto __1071
__1071:
	;
	if !(resultVar < 256) {
		goto __1084
	}
__1086:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1089
	}
	XTclExpandCodeArray(tls, envPtr)
__1089:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1090
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1090:
	;
__1091:
	_delta66 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta66 != 0) {
		goto __1094
	}
	if !(_delta66 == -0x7fffffff-1) {
		goto __1095
	}
	_delta66 = 1 - resultVar
__1095:
	;
__1096:
	if !(_delta66 < 0) {
		goto __1099
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1100
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1100:
	;
__1099:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta66
	goto __1097
__1097:
	if 0 != 0 {
		goto __1096
	}
	goto __1098
__1098:
	;
__1094:
	;
	goto __1092
__1092:
	if 0 != 0 {
		goto __1091
	}
	goto __1093
__1093:
	;
	goto __1087
__1087:
	if 0 != 0 {
		goto __1086
	}
	goto __1088
__1088:
	;
	goto __1085
__1084:
__1101:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1104
	}
	XTclExpandCodeArray(tls, envPtr)
__1104:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1105
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1105:
	;
__1106:
	_delta67 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta67 != 0) {
		goto __1109
	}
	if !(_delta67 == -0x7fffffff-1) {
		goto __1110
	}
	_delta67 = 1 - resultVar
__1110:
	;
__1111:
	if !(_delta67 < 0) {
		goto __1114
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1115
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1115:
	;
__1114:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta67
	goto __1112
__1112:
	if 0 != 0 {
		goto __1111
	}
	goto __1113
__1113:
	;
__1109:
	;
	goto __1107
__1107:
	if 0 != 0 {
		goto __1106
	}
	goto __1108
__1108:
	;
	goto __1102
__1102:
	if 0 != 0 {
		goto __1101
	}
	goto __1103
__1103:
	;
__1085:
	;

__1116:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1119
	}
	XTclExpandCodeArray(tls, envPtr)
__1119:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1120
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1120:
	;
__1121:
	_delta68 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta68 != 0) {
		goto __1124
	}
	if !(_delta68 == -0x7fffffff-1) {
		goto __1125
	}
	_delta68 = 1 - 0
__1125:
	;
__1126:
	if !(_delta68 < 0) {
		goto __1129
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1130
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1130:
	;
__1129:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta68
	goto __1127
__1127:
	if 0 != 0 {
		goto __1126
	}
	goto __1128
__1128:
	;
__1124:
	;
	goto __1122
__1122:
	if 0 != 0 {
		goto __1121
	}
	goto __1123
__1123:
	;
	goto __1117
__1117:
	if 0 != 0 {
		goto __1116
	}
	goto __1118
__1118:
	;
__1131:
	_objIndexCopy6 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy6 <= 255) {
		goto __1134
	}
__1136:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1139
	}
	XTclExpandCodeArray(tls, envPtr)
__1139:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1140
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1140:
	;
__1141:
	_delta69 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta69 != 0) {
		goto __1144
	}
	if !(_delta69 == -0x7fffffff-1) {
		goto __1145
	}
	_delta69 = 1 - _objIndexCopy6
__1145:
	;
__1146:
	if !(_delta69 < 0) {
		goto __1149
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1150
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1150:
	;
__1149:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta69
	goto __1147
__1147:
	if 0 != 0 {
		goto __1146
	}
	goto __1148
__1148:
	;
__1144:
	;
	goto __1142
__1142:
	if 0 != 0 {
		goto __1141
	}
	goto __1143
__1143:
	;
	goto __1137
__1137:
	if 0 != 0 {
		goto __1136
	}
	goto __1138
__1138:
	;
	goto __1135
__1134:
__1151:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1154
	}
	XTclExpandCodeArray(tls, envPtr)
__1154:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy6))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1155
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1155:
	;
__1156:
	_delta70 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta70 != 0) {
		goto __1159
	}
	if !(_delta70 == -0x7fffffff-1) {
		goto __1160
	}
	_delta70 = 1 - _objIndexCopy6
__1160:
	;
__1161:
	if !(_delta70 < 0) {
		goto __1164
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1165
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1165:
	;
__1164:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta70
	goto __1162
__1162:
	if 0 != 0 {
		goto __1161
	}
	goto __1163
__1163:
	;
__1159:
	;
	goto __1157
__1157:
	if 0 != 0 {
		goto __1156
	}
	goto __1158
__1158:
	;
	goto __1152
__1152:
	if 0 != 0 {
		goto __1151
	}
	goto __1153
__1153:
	;
__1135:
	;
	goto __1132
__1132:
	if 0 != 0 {
		goto __1131
	}
	goto __1133
__1133:
	;
__1166:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1169
	}
	XTclExpandCodeArray(tls, envPtr)
__1169:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1170
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_EQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1170:
	;
__1171:
	_delta71 = XtclInstructionTable[INST_EQ].FstackEffect
	if !(_delta71 != 0) {
		goto __1174
	}
	if !(_delta71 == -0x7fffffff-1) {
		goto __1175
	}
	_delta71 = 1 - 0
__1175:
	;
__1176:
	if !(_delta71 < 0) {
		goto __1179
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1180
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1180:
	;
__1179:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta71
	goto __1177
__1177:
	if 0 != 0 {
		goto __1176
	}
	goto __1178
__1178:
	;
__1174:
	;
	goto __1172
__1172:
	if 0 != 0 {
		goto __1171
	}
	goto __1173
__1173:
	;
	goto __1167
__1167:
	if 0 != 0 {
		goto __1166
	}
	goto __1168
__1168:
	;
	noTrapError = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1181:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1184
	}
	XTclExpandCodeArray(tls, envPtr)
__1184:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1185
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_FALSE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1185:
	;
__1186:
	_delta72 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
	if !(_delta72 != 0) {
		goto __1189
	}
	if !(_delta72 == -0x7fffffff-1) {
		goto __1190
	}
	_delta72 = 1 - 0
__1190:
	;
__1191:
	if !(_delta72 < 0) {
		goto __1194
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1195
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1195:
	;
__1194:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta72
	goto __1192
__1192:
	if 0 != 0 {
		goto __1191
	}
	goto __1193
__1193:
	;
__1189:
	;
	goto __1187
__1187:
	if 0 != 0 {
		goto __1186
	}
	goto __1188
__1188:
	;
	goto __1182
__1182:
	if 0 != 0 {
		goto __1181
	}
	goto __1183
__1183:
	;
	if !(optionsVar < 256) {
		goto __1196
	}
__1198:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1201
	}
	XTclExpandCodeArray(tls, envPtr)
__1201:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1202
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1202:
	;
__1203:
	_delta73 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta73 != 0) {
		goto __1206
	}
	if !(_delta73 == -0x7fffffff-1) {
		goto __1207
	}
	_delta73 = 1 - optionsVar
__1207:
	;
__1208:
	if !(_delta73 < 0) {
		goto __1211
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1212
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1212:
	;
__1211:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta73
	goto __1209
__1209:
	if 0 != 0 {
		goto __1208
	}
	goto __1210
__1210:
	;
__1206:
	;
	goto __1204
__1204:
	if 0 != 0 {
		goto __1203
	}
	goto __1205
__1205:
	;
	goto __1199
__1199:
	if 0 != 0 {
		goto __1198
	}
	goto __1200
__1200:
	;
	goto __1197
__1196:
__1213:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1216
	}
	XTclExpandCodeArray(tls, envPtr)
__1216:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1217
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1217:
	;
__1218:
	_delta74 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta74 != 0) {
		goto __1221
	}
	if !(_delta74 == -0x7fffffff-1) {
		goto __1222
	}
	_delta74 = 1 - optionsVar
__1222:
	;
__1223:
	if !(_delta74 < 0) {
		goto __1226
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1227
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1227:
	;
__1226:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta74
	goto __1224
__1224:
	if 0 != 0 {
		goto __1223
	}
	goto __1225
__1225:
	;
__1221:
	;
	goto __1219
__1219:
	if 0 != 0 {
		goto __1218
	}
	goto __1220
__1220:
	;
	goto __1214
__1214:
	if 0 != 0 {
		goto __1213
	}
	goto __1215
__1215:
	;
__1197:
	;

__1228:
	_objIndexCopy7 = XTclRegisterLiteral(tls, envPtr, ts+18772, int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy7 <= 255) {
		goto __1231
	}
__1233:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1236
	}
	XTclExpandCodeArray(tls, envPtr)
__1236:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1237
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1237:
	;
__1238:
	_delta75 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta75 != 0) {
		goto __1241
	}
	if !(_delta75 == -0x7fffffff-1) {
		goto __1242
	}
	_delta75 = 1 - _objIndexCopy7
__1242:
	;
__1243:
	if !(_delta75 < 0) {
		goto __1246
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1247
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1247:
	;
__1246:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta75
	goto __1244
__1244:
	if 0 != 0 {
		goto __1243
	}
	goto __1245
__1245:
	;
__1241:
	;
	goto __1239
__1239:
	if 0 != 0 {
		goto __1238
	}
	goto __1240
__1240:
	;
	goto __1234
__1234:
	if 0 != 0 {
		goto __1233
	}
	goto __1235
__1235:
	;
	goto __1232
__1231:
__1248:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1251
	}
	XTclExpandCodeArray(tls, envPtr)
__1251:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy7))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1252
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1252:
	;
__1253:
	_delta76 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta76 != 0) {
		goto __1256
	}
	if !(_delta76 == -0x7fffffff-1) {
		goto __1257
	}
	_delta76 = 1 - _objIndexCopy7
__1257:
	;
__1258:
	if !(_delta76 < 0) {
		goto __1261
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1262
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1262:
	;
__1261:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta76
	goto __1259
__1259:
	if 0 != 0 {
		goto __1258
	}
	goto __1260
__1260:
	;
__1256:
	;
	goto __1254
__1254:
	if 0 != 0 {
		goto __1253
	}
	goto __1255
__1255:
	;
	goto __1249
__1249:
	if 0 != 0 {
		goto __1248
	}
	goto __1250
__1250:
	;
__1232:
	;
	goto __1229
__1229:
	if 0 != 0 {
		goto __1228
	}
	goto __1230
__1230:
	;
__1263:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1266
	}
	XTclExpandCodeArray(tls, envPtr)
__1266:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1267
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1267:
	;
__1268:
	_delta77 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta77 != 0) {
		goto __1271
	}
	if !(_delta77 == -0x7fffffff-1) {
		goto __1272
	}
	_delta77 = 1 - 3
__1272:
	;
__1273:
	if !(_delta77 < 0) {
		goto __1276
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1277
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1277:
	;
__1276:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta77
	goto __1274
__1274:
	if 0 != 0 {
		goto __1273
	}
	goto __1275
__1275:
	;
__1271:
	;
	goto __1269
__1269:
	if 0 != 0 {
		goto __1268
	}
	goto __1270
__1270:
	;
	goto __1264
__1264:
	if 0 != 0 {
		goto __1263
	}
	goto __1265
__1265:
	;
	if !(optionsVar < 256) {
		goto __1278
	}
__1280:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1283
	}
	XTclExpandCodeArray(tls, envPtr)
__1283:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1284
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1284:
	;
__1285:
	_delta78 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta78 != 0) {
		goto __1288
	}
	if !(_delta78 == -0x7fffffff-1) {
		goto __1289
	}
	_delta78 = 1 - optionsVar
__1289:
	;
__1290:
	if !(_delta78 < 0) {
		goto __1293
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1294
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1294:
	;
__1293:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta78
	goto __1291
__1291:
	if 0 != 0 {
		goto __1290
	}
	goto __1292
__1292:
	;
__1288:
	;
	goto __1286
__1286:
	if 0 != 0 {
		goto __1285
	}
	goto __1287
__1287:
	;
	goto __1281
__1281:
	if 0 != 0 {
		goto __1280
	}
	goto __1282
__1282:
	;
	goto __1279
__1278:
__1295:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1298
	}
	XTclExpandCodeArray(tls, envPtr)
__1298:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1299
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1299:
	;
__1300:
	_delta79 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta79 != 0) {
		goto __1303
	}
	if !(_delta79 == -0x7fffffff-1) {
		goto __1304
	}
	_delta79 = 1 - optionsVar
__1304:
	;
__1305:
	if !(_delta79 < 0) {
		goto __1308
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1309
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1309:
	;
__1308:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta79
	goto __1306
__1306:
	if 0 != 0 {
		goto __1305
	}
	goto __1307
__1307:
	;
__1303:
	;
	goto __1301
__1301:
	if 0 != 0 {
		goto __1300
	}
	goto __1302
__1302:
	;
	goto __1296
__1296:
	if 0 != 0 {
		goto __1295
	}
	goto __1297
__1297:
	;
__1279:
	;

__1310:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1313
	}
	XTclExpandCodeArray(tls, envPtr)
__1313:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1314
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1314:
	;
__1315:
	_delta80 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta80 != 0) {
		goto __1318
	}
	if !(_delta80 == -0x7fffffff-1) {
		goto __1319
	}
	_delta80 = 1 - 0
__1319:
	;
__1320:
	if !(_delta80 < 0) {
		goto __1323
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1324
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1324:
	;
__1323:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta80
	goto __1321
__1321:
	if 0 != 0 {
		goto __1320
	}
	goto __1322
__1322:
	;
__1318:
	;
	goto __1316
__1316:
	if 0 != 0 {
		goto __1315
	}
	goto __1317
__1317:
	;
	goto __1311
__1311:
	if 0 != 0 {
		goto __1310
	}
	goto __1312
__1312:
	;
__1325:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1328
	}
	XTclExpandCodeArray(tls, envPtr)
__1328:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_SET)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1329
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DICT_SET == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1329:
	;
__1330:
	_delta81 = XtclInstructionTable[INST_DICT_SET].FstackEffect
	if !(_delta81 != 0) {
		goto __1333
	}
	if !(_delta81 == -0x7fffffff-1) {
		goto __1334
	}
	_delta81 = 1 - 1
__1334:
	;
__1335:
	if !(_delta81 < 0) {
		goto __1338
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1339
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1339:
	;
__1338:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta81
	goto __1336
__1336:
	if 0 != 0 {
		goto __1335
	}
	goto __1337
__1337:
	;
__1333:
	;
	goto __1331
__1331:
	if 0 != 0 {
		goto __1330
	}
	goto __1332
__1332:
	;
	goto __1326
__1326:
	if 0 != 0 {
		goto __1325
	}
	goto __1327
__1327:
	;
__1340:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1343
	}
	XTclExpandCodeArray(tls, envPtr)
__1343:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	goto __1341
__1341:
	if 0 != 0 {
		goto __1340
	}
	goto __1342
__1342:
	;
__1344:
	if !(-1 < 0) {
		goto __1347
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1348
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1348:
	;
__1347:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	goto __1345
__1345:
	if 0 != 0 {
		goto __1344
	}
	goto __1346
__1346:
	;
	trapError = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1349:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1352
	}
	XTclExpandCodeArray(tls, envPtr)
__1352:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1353
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1353:
	;
__1354:
	_delta82 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta82 != 0) {
		goto __1357
	}
	if !(_delta82 == -0x7fffffff-1) {
		goto __1358
	}
	_delta82 = 1 - 0
__1358:
	;
__1359:
	if !(_delta82 < 0) {
		goto __1362
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1363
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1363:
	;
__1362:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta82
	goto __1360
__1360:
	if 0 != 0 {
		goto __1359
	}
	goto __1361
__1361:
	;
__1357:
	;
	goto __1355
__1355:
	if 0 != 0 {
		goto __1354
	}
	goto __1356
__1356:
	;
	goto __1350
__1350:
	if 0 != 0 {
		goto __1349
	}
	goto __1351
__1351:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(noTrapError) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(noTrapError)))
	if !(optionsVar < 256) {
		goto __1364
	}
__1366:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1369
	}
	XTclExpandCodeArray(tls, envPtr)
__1369:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1370
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1370:
	;
__1371:
	_delta83 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta83 != 0) {
		goto __1374
	}
	if !(_delta83 == -0x7fffffff-1) {
		goto __1375
	}
	_delta83 = 1 - optionsVar
__1375:
	;
__1376:
	if !(_delta83 < 0) {
		goto __1379
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1380
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1380:
	;
__1379:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta83
	goto __1377
__1377:
	if 0 != 0 {
		goto __1376
	}
	goto __1378
__1378:
	;
__1374:
	;
	goto __1372
__1372:
	if 0 != 0 {
		goto __1371
	}
	goto __1373
__1373:
	;
	goto __1367
__1367:
	if 0 != 0 {
		goto __1366
	}
	goto __1368
__1368:
	;
	goto __1365
__1364:
__1381:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1384
	}
	XTclExpandCodeArray(tls, envPtr)
__1384:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1385
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1385:
	;
__1386:
	_delta84 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta84 != 0) {
		goto __1389
	}
	if !(_delta84 == -0x7fffffff-1) {
		goto __1390
	}
	_delta84 = 1 - optionsVar
__1390:
	;
__1391:
	if !(_delta84 < 0) {
		goto __1394
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1395
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1395:
	;
__1394:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta84
	goto __1392
__1392:
	if 0 != 0 {
		goto __1391
	}
	goto __1393
__1393:
	;
__1389:
	;
	goto __1387
__1387:
	if 0 != 0 {
		goto __1386
	}
	goto __1388
__1388:
	;
	goto __1382
__1382:
	if 0 != 0 {
		goto __1381
	}
	goto __1383
__1383:
	;
__1365:
	;

	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(trapError) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(trapError)))
	// Skip POP at end; can clean up with subsequent POP
	if !(i+1 < numHandlers) {
		goto __1396
	}
__1397:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1400
	}
	XTclExpandCodeArray(tls, envPtr)
__1400:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1401
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1401:
	;
__1402:
	_delta85 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta85 != 0) {
		goto __1405
	}
	if !(_delta85 == -0x7fffffff-1) {
		goto __1406
	}
	_delta85 = 1 - 0
__1406:
	;
__1407:
	if !(_delta85 < 0) {
		goto __1410
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1411
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1411:
	;
__1410:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta85
	goto __1408
__1408:
	if 0 != 0 {
		goto __1407
	}
	goto __1409
__1409:
	;
__1405:
	;
	goto __1403
__1403:
	if 0 != 0 {
		goto __1402
	}
	goto __1404
__1404:
	;
	goto __1398
__1398:
	if 0 != 0 {
		goto __1397
	}
	goto __1399
__1399:
	;
__1396:
	;

endOfThisArm:
	if !(i+1 < numHandlers) {
		goto __1412
	}
	*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)) = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1413:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1416
	}
	XTclExpandCodeArray(tls, envPtr)
__1416:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1417
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1417:
	;
__1418:
	_delta86 = XtclInstructionTable[INST_JUMP4].FstackEffect
	if !(_delta86 != 0) {
		goto __1421
	}
	if !(_delta86 == -0x7fffffff-1) {
		goto __1422
	}
	_delta86 = 1 - 0
__1422:
	;
__1423:
	if !(_delta86 < 0) {
		goto __1426
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1427
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1427:
	;
__1426:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta86
	goto __1424
__1424:
	if 0 != 0 {
		goto __1423
	}
	goto __1425
__1425:
	;
__1421:
	;
	goto __1419
__1419:
	if 0 != 0 {
		goto __1418
	}
	goto __1420
__1420:
	;
	goto __1414
__1414:
	if 0 != 0 {
		goto __1413
	}
	goto __1415
__1415:
	;
__1428:
	if !(1 < 0) {
		goto __1431
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1432
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1432:
	;
__1431:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
	goto __1429
__1429:
	if 0 != 0 {
		goto __1428
	}
	goto __1430
__1430:
	;
__1412:
	;
	if !(*(*uintptr)(unsafe.Pointer(matchClauses + uintptr(i)*8)) != 0) {
		goto __1433
	}
__1434:
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notECJumpSource) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notECJumpSource)) >> 24)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notECJumpSource) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notECJumpSource)) >> 16)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notECJumpSource) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notECJumpSource)) >> 8)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notECJumpSource) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(notECJumpSource)))
	goto __1435
__1435:
	if 0 != 0 {
		goto __1434
	}
	goto __1436
__1436:
	;
__1433:
	;
__1437:
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notCodeJumpSource) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notCodeJumpSource)) >> 24)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notCodeJumpSource) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notCodeJumpSource)) >> 16)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notCodeJumpSource) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(notCodeJumpSource)) >> 8)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(notCodeJumpSource) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(notCodeJumpSource)))
	goto __1438
__1438:
	if 0 != 0 {
		goto __1437
	}
	goto __1439
__1439:
	;
	goto __407
__407:
	i++
	goto __406
	goto __408
__408:
	;

	// Drop the result code, and fix all the jumps from taken clauses - which
	// drop the result code as their first action - to point straight after
	// (i.e., to the start of the finally clause).

__1440:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1443
	}
	XTclExpandCodeArray(tls, envPtr)
__1443:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1444
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1444:
	;
__1445:
	_delta87 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta87 != 0) {
		goto __1448
	}
	if !(_delta87 == -0x7fffffff-1) {
		goto __1449
	}
	_delta87 = 1 - 0
__1449:
	;
__1450:
	if !(_delta87 < 0) {
		goto __1453
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1454
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1454:
	;
__1453:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta87
	goto __1451
__1451:
	if 0 != 0 {
		goto __1450
	}
	goto __1452
__1452:
	;
__1448:
	;
	goto __1446
__1446:
	if 0 != 0 {
		goto __1445
	}
	goto __1447
__1447:
	;
	goto __1441
__1441:
	if 0 != 0 {
		goto __1440
	}
	goto __1442
__1442:
	;
	i = 0
__1455:
	if !(i < numHandlers-1) {
		goto __1457
	}
__1458:
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4))) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)))) >> 24)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4))) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)))) >> 16)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4))) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)))) >> 8)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4))) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(*(*int32)(unsafe.Pointer(addrsToFix + uintptr(i)*4)))))
	goto __1459
__1459:
	if 0 != 0 {
		goto __1458
	}
	goto __1460
__1460:
	;
	goto __1456
__1456:
	i++
	goto __1455
	goto __1457
__1457:
	;
	XTclStackFree(tls, interp, forwardsToFix)
	XTclStackFree(tls, interp, addrsToFix)

	// Process the finally clause (at last!) Note that we do not wrap this in
	// error handlers because we would just rethrow immediately anyway. Then
	// (on normal success) we reissue the exception. Note also that
	// INST_RETURN_STK can proceed to the next instruction; that'll be the
	// next command (or some inter-command manipulation).

	if !!(trapZero != 0) {
		goto __1461
	}
__1462:
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(afterBody) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(afterBody)) >> 24)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(afterBody) + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(afterBody)) >> 16)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(afterBody) + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(afterBody)) >> 8)
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(afterBody) + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(afterBody)))
	goto __1463
__1463:
	if 0 != 0 {
		goto __1462
	}
	goto __1464
__1464:
	;
__1461:
	;
	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
__1465:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1468
	}
	XTclExpandCodeArray(tls, envPtr)
__1468:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1469
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_BEGIN_CATCH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1469:
	;
__1470:
	_delta88 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
	if !(_delta88 != 0) {
		goto __1473
	}
	if !(_delta88 == -0x7fffffff-1) {
		goto __1474
	}
	_delta88 = 1 - range1
__1474:
	;
__1475:
	if !(_delta88 < 0) {
		goto __1478
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1479
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1479:
	;
__1478:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta88
	goto __1476
__1476:
	if 0 != 0 {
		goto __1475
	}
	goto __1477
__1477:
	;
__1473:
	;
	goto __1471
__1471:
	if 0 != 0 {
		goto __1470
	}
	goto __1472
__1472:
	;
	goto __1466
__1466:
	if 0 != 0 {
		goto __1465
	}
	goto __1467
__1467:
	;
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(3+4*numHandlers)*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(3+4*numHandlers)*8))
	XTclCompileCmdWord(tls, interp, finallyToken+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(finallyToken)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
__1480:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1483
	}
	XTclExpandCodeArray(tls, envPtr)
__1483:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1484
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_END_CATCH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1484:
	;
__1485:
	_delta89 = XtclInstructionTable[INST_END_CATCH].FstackEffect
	if !(_delta89 != 0) {
		goto __1488
	}
	if !(_delta89 == -0x7fffffff-1) {
		goto __1489
	}
	_delta89 = 1 - 0
__1489:
	;
__1490:
	if !(_delta89 < 0) {
		goto __1493
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1494
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1494:
	;
__1493:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta89
	goto __1491
__1491:
	if 0 != 0 {
		goto __1490
	}
	goto __1492
__1492:
	;
__1488:
	;
	goto __1486
__1486:
	if 0 != 0 {
		goto __1485
	}
	goto __1487
__1487:
	;
	goto __1481
__1481:
	if 0 != 0 {
		goto __1480
	}
	goto __1482
__1482:
	;
__1495:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1498
	}
	XTclExpandCodeArray(tls, envPtr)
__1498:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1499
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1499:
	;
__1500:
	_delta90 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta90 != 0) {
		goto __1503
	}
	if !(_delta90 == -0x7fffffff-1) {
		goto __1504
	}
	_delta90 = 1 - 0
__1504:
	;
__1505:
	if !(_delta90 < 0) {
		goto __1508
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1509
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1509:
	;
__1508:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta90
	goto __1506
__1506:
	if 0 != 0 {
		goto __1505
	}
	goto __1507
__1507:
	;
__1503:
	;
	goto __1501
__1501:
	if 0 != 0 {
		goto __1500
	}
	goto __1502
__1502:
	;
	goto __1496
__1496:
	if 0 != 0 {
		goto __1495
	}
	goto __1497
__1497:
	;
	finalOK = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1510:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1513
	}
	XTclExpandCodeArray(tls, envPtr)
__1513:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1514
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1514:
	;
__1515:
	_delta91 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta91 != 0) {
		goto __1518
	}
	if !(_delta91 == -0x7fffffff-1) {
		goto __1519
	}
	_delta91 = 1 - 0
__1519:
	;
__1520:
	if !(_delta91 < 0) {
		goto __1523
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1524
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1524:
	;
__1523:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta91
	goto __1521
__1521:
	if 0 != 0 {
		goto __1520
	}
	goto __1522
__1522:
	;
__1518:
	;
	goto __1516
__1516:
	if 0 != 0 {
		goto __1515
	}
	goto __1517
__1517:
	;
	goto __1511
__1511:
	if 0 != 0 {
		goto __1510
	}
	goto __1512
__1512:
	;
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1525:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1528
	}
	XTclExpandCodeArray(tls, envPtr)
__1528:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1529
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RESULT == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1529:
	;
__1530:
	_delta92 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
	if !(_delta92 != 0) {
		goto __1533
	}
	if !(_delta92 == -0x7fffffff-1) {
		goto __1534
	}
	_delta92 = 1 - 0
__1534:
	;
__1535:
	if !(_delta92 < 0) {
		goto __1538
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1539
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1539:
	;
__1538:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta92
	goto __1536
__1536:
	if 0 != 0 {
		goto __1535
	}
	goto __1537
__1537:
	;
__1533:
	;
	goto __1531
__1531:
	if 0 != 0 {
		goto __1530
	}
	goto __1532
__1532:
	;
	goto __1526
__1526:
	if 0 != 0 {
		goto __1525
	}
	goto __1527
__1527:
	;
__1540:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1543
	}
	XTclExpandCodeArray(tls, envPtr)
__1543:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1544
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1544:
	;
__1545:
	_delta93 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
	if !(_delta93 != 0) {
		goto __1548
	}
	if !(_delta93 == -0x7fffffff-1) {
		goto __1549
	}
	_delta93 = 1 - 0
__1549:
	;
__1550:
	if !(_delta93 < 0) {
		goto __1553
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1554
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1554:
	;
__1553:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta93
	goto __1551
__1551:
	if 0 != 0 {
		goto __1550
	}
	goto __1552
__1552:
	;
__1548:
	;
	goto __1546
__1546:
	if 0 != 0 {
		goto __1545
	}
	goto __1547
__1547:
	;
	goto __1541
__1541:
	if 0 != 0 {
		goto __1540
	}
	goto __1542
__1542:
	;
__1555:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1558
	}
	XTclExpandCodeArray(tls, envPtr)
__1558:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_CODE)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1559
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH_RETURN_CODE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1559:
	;
__1560:
	_delta94 = XtclInstructionTable[INST_PUSH_RETURN_CODE].FstackEffect
	if !(_delta94 != 0) {
		goto __1563
	}
	if !(_delta94 == -0x7fffffff-1) {
		goto __1564
	}
	_delta94 = 1 - 0
__1564:
	;
__1565:
	if !(_delta94 < 0) {
		goto __1568
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1569
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1569:
	;
__1568:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta94
	goto __1566
__1566:
	if 0 != 0 {
		goto __1565
	}
	goto __1567
__1567:
	;
__1563:
	;
	goto __1561
__1561:
	if 0 != 0 {
		goto __1560
	}
	goto __1562
__1562:
	;
	goto __1556
__1556:
	if 0 != 0 {
		goto __1555
	}
	goto __1557
__1557:
	;
__1570:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1573
	}
	XTclExpandCodeArray(tls, envPtr)
__1573:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1574
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_END_CATCH == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1574:
	;
__1575:
	_delta95 = XtclInstructionTable[INST_END_CATCH].FstackEffect
	if !(_delta95 != 0) {
		goto __1578
	}
	if !(_delta95 == -0x7fffffff-1) {
		goto __1579
	}
	_delta95 = 1 - 0
__1579:
	;
__1580:
	if !(_delta95 < 0) {
		goto __1583
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1584
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1584:
	;
__1583:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta95
	goto __1581
__1581:
	if 0 != 0 {
		goto __1580
	}
	goto __1582
__1582:
	;
__1578:
	;
	goto __1576
__1576:
	if 0 != 0 {
		goto __1575
	}
	goto __1577
__1577:
	;
	goto __1571
__1571:
	if 0 != 0 {
		goto __1570
	}
	goto __1572
__1572:
	;
__1585:
	_objIndexCopy8 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy8 <= 255) {
		goto __1588
	}
__1590:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1593
	}
	XTclExpandCodeArray(tls, envPtr)
__1593:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1594
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1594:
	;
__1595:
	_delta96 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta96 != 0) {
		goto __1598
	}
	if !(_delta96 == -0x7fffffff-1) {
		goto __1599
	}
	_delta96 = 1 - _objIndexCopy8
__1599:
	;
__1600:
	if !(_delta96 < 0) {
		goto __1603
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1604
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1604:
	;
__1603:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta96
	goto __1601
__1601:
	if 0 != 0 {
		goto __1600
	}
	goto __1602
__1602:
	;
__1598:
	;
	goto __1596
__1596:
	if 0 != 0 {
		goto __1595
	}
	goto __1597
__1597:
	;
	goto __1591
__1591:
	if 0 != 0 {
		goto __1590
	}
	goto __1592
__1592:
	;
	goto __1589
__1588:
__1605:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1608
	}
	XTclExpandCodeArray(tls, envPtr)
__1608:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy8))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1609
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1609:
	;
__1610:
	_delta97 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta97 != 0) {
		goto __1613
	}
	if !(_delta97 == -0x7fffffff-1) {
		goto __1614
	}
	_delta97 = 1 - _objIndexCopy8
__1614:
	;
__1615:
	if !(_delta97 < 0) {
		goto __1618
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1619
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1619:
	;
__1618:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta97
	goto __1616
__1616:
	if 0 != 0 {
		goto __1615
	}
	goto __1617
__1617:
	;
__1613:
	;
	goto __1611
__1611:
	if 0 != 0 {
		goto __1610
	}
	goto __1612
__1612:
	;
	goto __1606
__1606:
	if 0 != 0 {
		goto __1605
	}
	goto __1607
__1607:
	;
__1589:
	;
	goto __1586
__1586:
	if 0 != 0 {
		goto __1585
	}
	goto __1587
__1587:
	;
__1620:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1623
	}
	XTclExpandCodeArray(tls, envPtr)
__1623:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EQ)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1624
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_EQ == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1624:
	;
__1625:
	_delta98 = XtclInstructionTable[INST_EQ].FstackEffect
	if !(_delta98 != 0) {
		goto __1628
	}
	if !(_delta98 == -0x7fffffff-1) {
		goto __1629
	}
	_delta98 = 1 - 0
__1629:
	;
__1630:
	if !(_delta98 < 0) {
		goto __1633
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1634
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1634:
	;
__1633:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta98
	goto __1631
__1631:
	if 0 != 0 {
		goto __1630
	}
	goto __1632
__1632:
	;
__1628:
	;
	goto __1626
__1626:
	if 0 != 0 {
		goto __1625
	}
	goto __1627
__1627:
	;
	goto __1621
__1621:
	if 0 != 0 {
		goto __1620
	}
	goto __1622
__1622:
	;
	noFinalError = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1635:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1638
	}
	XTclExpandCodeArray(tls, envPtr)
__1638:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1639
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_FALSE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1639:
	;
__1640:
	_delta99 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
	if !(_delta99 != 0) {
		goto __1643
	}
	if !(_delta99 == -0x7fffffff-1) {
		goto __1644
	}
	_delta99 = 1 - 0
__1644:
	;
__1645:
	if !(_delta99 < 0) {
		goto __1648
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1649
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1649:
	;
__1648:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta99
	goto __1646
__1646:
	if 0 != 0 {
		goto __1645
	}
	goto __1647
__1647:
	;
__1643:
	;
	goto __1641
__1641:
	if 0 != 0 {
		goto __1640
	}
	goto __1642
__1642:
	;
	goto __1636
__1636:
	if 0 != 0 {
		goto __1635
	}
	goto __1637
__1637:
	;
	if !(optionsVar < 256) {
		goto __1650
	}
__1652:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1655
	}
	XTclExpandCodeArray(tls, envPtr)
__1655:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1656
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1656:
	;
__1657:
	_delta100 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta100 != 0) {
		goto __1660
	}
	if !(_delta100 == -0x7fffffff-1) {
		goto __1661
	}
	_delta100 = 1 - optionsVar
__1661:
	;
__1662:
	if !(_delta100 < 0) {
		goto __1665
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1666
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1666:
	;
__1665:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta100
	goto __1663
__1663:
	if 0 != 0 {
		goto __1662
	}
	goto __1664
__1664:
	;
__1660:
	;
	goto __1658
__1658:
	if 0 != 0 {
		goto __1657
	}
	goto __1659
__1659:
	;
	goto __1653
__1653:
	if 0 != 0 {
		goto __1652
	}
	goto __1654
__1654:
	;
	goto __1651
__1650:
__1667:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1670
	}
	XTclExpandCodeArray(tls, envPtr)
__1670:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1671
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1671:
	;
__1672:
	_delta101 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta101 != 0) {
		goto __1675
	}
	if !(_delta101 == -0x7fffffff-1) {
		goto __1676
	}
	_delta101 = 1 - optionsVar
__1676:
	;
__1677:
	if !(_delta101 < 0) {
		goto __1680
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1681
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1681:
	;
__1680:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta101
	goto __1678
__1678:
	if 0 != 0 {
		goto __1677
	}
	goto __1679
__1679:
	;
__1675:
	;
	goto __1673
__1673:
	if 0 != 0 {
		goto __1672
	}
	goto __1674
__1674:
	;
	goto __1668
__1668:
	if 0 != 0 {
		goto __1667
	}
	goto __1669
__1669:
	;
__1651:
	;

__1682:
	_objIndexCopy9 = XTclRegisterLiteral(tls, envPtr, ts+18772, int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy9 <= 255) {
		goto __1685
	}
__1687:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1690
	}
	XTclExpandCodeArray(tls, envPtr)
__1690:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1691
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1691:
	;
__1692:
	_delta102 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta102 != 0) {
		goto __1695
	}
	if !(_delta102 == -0x7fffffff-1) {
		goto __1696
	}
	_delta102 = 1 - _objIndexCopy9
__1696:
	;
__1697:
	if !(_delta102 < 0) {
		goto __1700
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1701
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1701:
	;
__1700:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta102
	goto __1698
__1698:
	if 0 != 0 {
		goto __1697
	}
	goto __1699
__1699:
	;
__1695:
	;
	goto __1693
__1693:
	if 0 != 0 {
		goto __1692
	}
	goto __1694
__1694:
	;
	goto __1688
__1688:
	if 0 != 0 {
		goto __1687
	}
	goto __1689
__1689:
	;
	goto __1686
__1685:
__1702:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1705
	}
	XTclExpandCodeArray(tls, envPtr)
__1705:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy9))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1706
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1706:
	;
__1707:
	_delta103 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta103 != 0) {
		goto __1710
	}
	if !(_delta103 == -0x7fffffff-1) {
		goto __1711
	}
	_delta103 = 1 - _objIndexCopy9
__1711:
	;
__1712:
	if !(_delta103 < 0) {
		goto __1715
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1716
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1716:
	;
__1715:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta103
	goto __1713
__1713:
	if 0 != 0 {
		goto __1712
	}
	goto __1714
__1714:
	;
__1710:
	;
	goto __1708
__1708:
	if 0 != 0 {
		goto __1707
	}
	goto __1709
__1709:
	;
	goto __1703
__1703:
	if 0 != 0 {
		goto __1702
	}
	goto __1704
__1704:
	;
__1686:
	;
	goto __1683
__1683:
	if 0 != 0 {
		goto __1682
	}
	goto __1684
__1684:
	;
__1717:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1720
	}
	XTclExpandCodeArray(tls, envPtr)
__1720:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1721
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_REVERSE == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1721:
	;
__1722:
	_delta104 = XtclInstructionTable[INST_REVERSE].FstackEffect
	if !(_delta104 != 0) {
		goto __1725
	}
	if !(_delta104 == -0x7fffffff-1) {
		goto __1726
	}
	_delta104 = 1 - 3
__1726:
	;
__1727:
	if !(_delta104 < 0) {
		goto __1730
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1731
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1731:
	;
__1730:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta104
	goto __1728
__1728:
	if 0 != 0 {
		goto __1727
	}
	goto __1729
__1729:
	;
__1725:
	;
	goto __1723
__1723:
	if 0 != 0 {
		goto __1722
	}
	goto __1724
__1724:
	;
	goto __1718
__1718:
	if 0 != 0 {
		goto __1717
	}
	goto __1719
__1719:
	;
	if !(optionsVar < 256) {
		goto __1732
	}
__1734:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1737
	}
	XTclExpandCodeArray(tls, envPtr)
__1737:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1738
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1738:
	;
__1739:
	_delta105 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta105 != 0) {
		goto __1742
	}
	if !(_delta105 == -0x7fffffff-1) {
		goto __1743
	}
	_delta105 = 1 - optionsVar
__1743:
	;
__1744:
	if !(_delta105 < 0) {
		goto __1747
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1748
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1748:
	;
__1747:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta105
	goto __1745
__1745:
	if 0 != 0 {
		goto __1744
	}
	goto __1746
__1746:
	;
__1742:
	;
	goto __1740
__1740:
	if 0 != 0 {
		goto __1739
	}
	goto __1741
__1741:
	;
	goto __1735
__1735:
	if 0 != 0 {
		goto __1734
	}
	goto __1736
__1736:
	;
	goto __1733
__1732:
__1749:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1752
	}
	XTclExpandCodeArray(tls, envPtr)
__1752:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1753
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1753:
	;
__1754:
	_delta106 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta106 != 0) {
		goto __1757
	}
	if !(_delta106 == -0x7fffffff-1) {
		goto __1758
	}
	_delta106 = 1 - optionsVar
__1758:
	;
__1759:
	if !(_delta106 < 0) {
		goto __1762
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1763
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1763:
	;
__1762:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta106
	goto __1760
__1760:
	if 0 != 0 {
		goto __1759
	}
	goto __1761
__1761:
	;
__1757:
	;
	goto __1755
__1755:
	if 0 != 0 {
		goto __1754
	}
	goto __1756
__1756:
	;
	goto __1750
__1750:
	if 0 != 0 {
		goto __1749
	}
	goto __1751
__1751:
	;
__1733:
	;

__1764:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1767
	}
	XTclExpandCodeArray(tls, envPtr)
__1767:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1768
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1768:
	;
__1769:
	_delta107 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta107 != 0) {
		goto __1772
	}
	if !(_delta107 == -0x7fffffff-1) {
		goto __1773
	}
	_delta107 = 1 - 0
__1773:
	;
__1774:
	if !(_delta107 < 0) {
		goto __1777
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1778
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1778:
	;
__1777:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta107
	goto __1775
__1775:
	if 0 != 0 {
		goto __1774
	}
	goto __1776
__1776:
	;
__1772:
	;
	goto __1770
__1770:
	if 0 != 0 {
		goto __1769
	}
	goto __1771
__1771:
	;
	goto __1765
__1765:
	if 0 != 0 {
		goto __1764
	}
	goto __1766
__1766:
	;
__1779:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1782
	}
	XTclExpandCodeArray(tls, envPtr)
__1782:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DICT_SET)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(1)) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(1))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1783
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_DICT_SET == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1783:
	;
__1784:
	_delta108 = XtclInstructionTable[INST_DICT_SET].FstackEffect
	if !(_delta108 != 0) {
		goto __1787
	}
	if !(_delta108 == -0x7fffffff-1) {
		goto __1788
	}
	_delta108 = 1 - 1
__1788:
	;
__1789:
	if !(_delta108 < 0) {
		goto __1792
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1793
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1793:
	;
__1792:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta108
	goto __1790
__1790:
	if 0 != 0 {
		goto __1789
	}
	goto __1791
__1791:
	;
__1787:
	;
	goto __1785
__1785:
	if 0 != 0 {
		goto __1784
	}
	goto __1786
__1786:
	;
	goto __1780
__1780:
	if 0 != 0 {
		goto __1779
	}
	goto __1781
__1781:
	;
__1794:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1797
	}
	XTclExpandCodeArray(tls, envPtr)
__1797:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	goto __1795
__1795:
	if 0 != 0 {
		goto __1794
	}
	goto __1796
__1796:
	;
__1798:
	if !(-1 < 0) {
		goto __1801
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1802
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1802:
	;
__1801:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	goto __1799
__1799:
	if 0 != 0 {
		goto __1798
	}
	goto __1800
__1800:
	;
__1803:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1806
	}
	XTclExpandCodeArray(tls, envPtr)
__1806:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1807
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1807:
	;
__1808:
	_delta109 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta109 != 0) {
		goto __1811
	}
	if !(_delta109 == -0x7fffffff-1) {
		goto __1812
	}
	_delta109 = 1 - 0
__1812:
	;
__1813:
	if !(_delta109 < 0) {
		goto __1816
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1817
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1817:
	;
__1816:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta109
	goto __1814
__1814:
	if 0 != 0 {
		goto __1813
	}
	goto __1815
__1815:
	;
__1811:
	;
	goto __1809
__1809:
	if 0 != 0 {
		goto __1808
	}
	goto __1810
__1810:
	;
	goto __1804
__1804:
	if 0 != 0 {
		goto __1803
	}
	goto __1805
__1805:
	;
	finalError = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__1818:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1821
	}
	XTclExpandCodeArray(tls, envPtr)
__1821:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1822
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1822:
	;
__1823:
	_delta110 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta110 != 0) {
		goto __1826
	}
	if !(_delta110 == -0x7fffffff-1) {
		goto __1827
	}
	_delta110 = 1 - 0
__1827:
	;
__1828:
	if !(_delta110 < 0) {
		goto __1831
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1832
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1832:
	;
__1831:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta110
	goto __1829
__1829:
	if 0 != 0 {
		goto __1828
	}
	goto __1830
__1830:
	;
__1826:
	;
	goto __1824
__1824:
	if 0 != 0 {
		goto __1823
	}
	goto __1825
__1825:
	;
	goto __1819
__1819:
	if 0 != 0 {
		goto __1818
	}
	goto __1820
__1820:
	;
__1833:
	if !(1 < 0) {
		goto __1836
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1837
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1837:
	;
__1836:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
	goto __1834
__1834:
	if 0 != 0 {
		goto __1833
	}
	goto __1835
__1835:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(noFinalError) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(noFinalError)))
	if !(optionsVar < 256) {
		goto __1838
	}
__1840:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1843
	}
	XTclExpandCodeArray(tls, envPtr)
__1843:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1844
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1844:
	;
__1845:
	_delta111 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta111 != 0) {
		goto __1848
	}
	if !(_delta111 == -0x7fffffff-1) {
		goto __1849
	}
	_delta111 = 1 - optionsVar
__1849:
	;
__1850:
	if !(_delta111 < 0) {
		goto __1853
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1854
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1854:
	;
__1853:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta111
	goto __1851
__1851:
	if 0 != 0 {
		goto __1850
	}
	goto __1852
__1852:
	;
__1848:
	;
	goto __1846
__1846:
	if 0 != 0 {
		goto __1845
	}
	goto __1847
__1847:
	;
	goto __1841
__1841:
	if 0 != 0 {
		goto __1840
	}
	goto __1842
__1842:
	;
	goto __1839
__1838:
__1855:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1858
	}
	XTclExpandCodeArray(tls, envPtr)
__1858:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1859
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1859:
	;
__1860:
	_delta112 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta112 != 0) {
		goto __1863
	}
	if !(_delta112 == -0x7fffffff-1) {
		goto __1864
	}
	_delta112 = 1 - optionsVar
__1864:
	;
__1865:
	if !(_delta112 < 0) {
		goto __1868
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1869
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1869:
	;
__1868:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta112
	goto __1866
__1866:
	if 0 != 0 {
		goto __1865
	}
	goto __1867
__1867:
	;
__1863:
	;
	goto __1861
__1861:
	if 0 != 0 {
		goto __1860
	}
	goto __1862
__1862:
	;
	goto __1856
__1856:
	if 0 != 0 {
		goto __1855
	}
	goto __1857
__1857:
	;
__1839:
	;

__1870:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1873
	}
	XTclExpandCodeArray(tls, envPtr)
__1873:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1874
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1874:
	;
__1875:
	_delta113 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta113 != 0) {
		goto __1878
	}
	if !(_delta113 == -0x7fffffff-1) {
		goto __1879
	}
	_delta113 = 1 - 0
__1879:
	;
__1880:
	if !(_delta113 < 0) {
		goto __1883
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1884
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1884:
	;
__1883:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta113
	goto __1881
__1881:
	if 0 != 0 {
		goto __1880
	}
	goto __1882
__1882:
	;
__1878:
	;
	goto __1876
__1876:
	if 0 != 0 {
		goto __1875
	}
	goto __1877
__1877:
	;
	goto __1871
__1871:
	if 0 != 0 {
		goto __1870
	}
	goto __1872
__1872:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(finalError) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(finalError)))
	if !(resultVar < 256) {
		goto __1885
	}
__1887:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1890
	}
	XTclExpandCodeArray(tls, envPtr)
__1890:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1891
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1891:
	;
__1892:
	_delta114 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
	if !(_delta114 != 0) {
		goto __1895
	}
	if !(_delta114 == -0x7fffffff-1) {
		goto __1896
	}
	_delta114 = 1 - resultVar
__1896:
	;
__1897:
	if !(_delta114 < 0) {
		goto __1900
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1901
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1901:
	;
__1900:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta114
	goto __1898
__1898:
	if 0 != 0 {
		goto __1897
	}
	goto __1899
__1899:
	;
__1895:
	;
	goto __1893
__1893:
	if 0 != 0 {
		goto __1892
	}
	goto __1894
__1894:
	;
	goto __1888
__1888:
	if 0 != 0 {
		goto __1887
	}
	goto __1889
__1889:
	;
	goto __1886
__1885:
__1902:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1905
	}
	XTclExpandCodeArray(tls, envPtr)
__1905:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1906
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_STORE_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1906:
	;
__1907:
	_delta115 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
	if !(_delta115 != 0) {
		goto __1910
	}
	if !(_delta115 == -0x7fffffff-1) {
		goto __1911
	}
	_delta115 = 1 - resultVar
__1911:
	;
__1912:
	if !(_delta115 < 0) {
		goto __1915
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1916
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1916:
	;
__1915:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta115
	goto __1913
__1913:
	if 0 != 0 {
		goto __1912
	}
	goto __1914
__1914:
	;
__1910:
	;
	goto __1908
__1908:
	if 0 != 0 {
		goto __1907
	}
	goto __1909
__1909:
	;
	goto __1903
__1903:
	if 0 != 0 {
		goto __1902
	}
	goto __1904
__1904:
	;
__1886:
	;

__1917:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1920
	}
	XTclExpandCodeArray(tls, envPtr)
__1920:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1921
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1921:
	;
__1922:
	_delta116 = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta116 != 0) {
		goto __1925
	}
	if !(_delta116 == -0x7fffffff-1) {
		goto __1926
	}
	_delta116 = 1 - 0
__1926:
	;
__1927:
	if !(_delta116 < 0) {
		goto __1930
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1931
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1931:
	;
__1930:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta116
	goto __1928
__1928:
	if 0 != 0 {
		goto __1927
	}
	goto __1929
__1929:
	;
__1925:
	;
	goto __1923
__1923:
	if 0 != 0 {
		goto __1922
	}
	goto __1924
__1924:
	;
	goto __1918
__1918:
	if 0 != 0 {
		goto __1917
	}
	goto __1919
__1919:
	;
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(finalOK) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(finalOK)))
	if !(optionsVar < 256) {
		goto __1932
	}
__1934:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1937
	}
	XTclExpandCodeArray(tls, envPtr)
__1937:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1938
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1938:
	;
__1939:
	_delta117 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta117 != 0) {
		goto __1942
	}
	if !(_delta117 == -0x7fffffff-1) {
		goto __1943
	}
	_delta117 = 1 - optionsVar
__1943:
	;
__1944:
	if !(_delta117 < 0) {
		goto __1947
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1948
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1948:
	;
__1947:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta117
	goto __1945
__1945:
	if 0 != 0 {
		goto __1944
	}
	goto __1946
__1946:
	;
__1942:
	;
	goto __1940
__1940:
	if 0 != 0 {
		goto __1939
	}
	goto __1941
__1941:
	;
	goto __1935
__1935:
	if 0 != 0 {
		goto __1934
	}
	goto __1936
__1936:
	;
	goto __1933
__1932:
__1949:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1952
	}
	XTclExpandCodeArray(tls, envPtr)
__1952:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(optionsVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1953
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1953:
	;
__1954:
	_delta118 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta118 != 0) {
		goto __1957
	}
	if !(_delta118 == -0x7fffffff-1) {
		goto __1958
	}
	_delta118 = 1 - optionsVar
__1958:
	;
__1959:
	if !(_delta118 < 0) {
		goto __1962
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1963
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1963:
	;
__1962:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta118
	goto __1960
__1960:
	if 0 != 0 {
		goto __1959
	}
	goto __1961
__1961:
	;
__1957:
	;
	goto __1955
__1955:
	if 0 != 0 {
		goto __1954
	}
	goto __1956
__1956:
	;
	goto __1950
__1950:
	if 0 != 0 {
		goto __1949
	}
	goto __1951
__1951:
	;
__1933:
	;

	if !(resultVar < 256) {
		goto __1964
	}
__1966:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1969
	}
	XTclExpandCodeArray(tls, envPtr)
__1969:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1970
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1970:
	;
__1971:
	_delta119 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
	if !(_delta119 != 0) {
		goto __1974
	}
	if !(_delta119 == -0x7fffffff-1) {
		goto __1975
	}
	_delta119 = 1 - resultVar
__1975:
	;
__1976:
	if !(_delta119 < 0) {
		goto __1979
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1980
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1980:
	;
__1979:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta119
	goto __1977
__1977:
	if 0 != 0 {
		goto __1976
	}
	goto __1978
__1978:
	;
__1974:
	;
	goto __1972
__1972:
	if 0 != 0 {
		goto __1971
	}
	goto __1973
__1973:
	;
	goto __1967
__1967:
	if 0 != 0 {
		goto __1966
	}
	goto __1968
__1968:
	;
	goto __1965
__1964:
__1981:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __1984
	}
	XTclExpandCodeArray(tls, envPtr)
__1984:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(resultVar))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __1985
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_LOAD_SCALAR4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__1985:
	;
__1986:
	_delta120 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
	if !(_delta120 != 0) {
		goto __1989
	}
	if !(_delta120 == -0x7fffffff-1) {
		goto __1990
	}
	_delta120 = 1 - resultVar
__1990:
	;
__1991:
	if !(_delta120 < 0) {
		goto __1994
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __1995
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__1995:
	;
__1994:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta120
	goto __1992
__1992:
	if 0 != 0 {
		goto __1991
	}
	goto __1993
__1993:
	;
__1989:
	;
	goto __1987
__1987:
	if 0 != 0 {
		goto __1986
	}
	goto __1988
__1988:
	;
	goto __1982
__1982:
	if 0 != 0 {
		goto __1981
	}
	goto __1983
__1983:
	;
__1965:
	;

	XTclEmitInvoke(tls, envPtr, INST_RETURN_STK, 0)

	return TCL_OK
}

func sIssueTryFinallyInstructions(tls *libc.TLS, interp uintptr, envPtr uintptr, bodyToken uintptr, finallyToken uintptr) int32 { /* tclCompCmdsSZ.c:3493:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var range1 int32
	var jumpOK int32
	var jumpSplice int32

	// Note that this one is simple enough that we can issue it without
	// needing a local variable table, making it a universal compilation.

	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_BEGIN_CATCH4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - range1
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileCmdWord(tls, interp, bodyToken+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(bodyToken)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
	for ok3 := true; ok3; ok3 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP1 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 3
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok6 := true; ok6; ok6 = 0 != 0 {
		if -1 < 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
			}
		}
		*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
	}
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RESULT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok10 := true; ok10; ok10 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok11 := true; ok11; ok11 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok12 := true; ok12; ok12 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok13 := true; ok13; ok13 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	range1 = XTclCreateExceptRange(tls, CATCH_EXCEPTION_RANGE, envPtr)
	for ok16 := true; ok16; ok16 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BEGIN_CATCH4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(range1))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_BEGIN_CATCH4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok17 := true; ok17; ok17 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_BEGIN_CATCH4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - range1
				}
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
		}
		return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	}()
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 3*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 3*8))
	XTclCompileCmdWord(tls, interp, finallyToken+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(finallyToken)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
	for ok19 := true; ok19; ok19 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok20 := true; ok20; ok20 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok21 := true; ok21; ok21 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok22 := true; ok22; ok22 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok23 := true; ok23; ok23 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok24 := true; ok24; ok24 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	jumpOK = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok25 := true; ok25; ok25 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP1 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok26 := true; ok26; ok26 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok27 := true; ok27; ok27 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcatchOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok28 := true; ok28; ok28 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RESULT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RESULT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok29 := true; ok29; ok29 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RESULT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok30 := true; ok30; ok30 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok31 := true; ok31; ok31 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_OPTIONS)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RETURN_OPTIONS == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok32 := true; ok32; ok32 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_OPTIONS].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok33 := true; ok33; ok33 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok34 := true; ok34; ok34 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH_RETURN_CODE)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_PUSH_RETURN_CODE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok35 := true; ok35; ok35 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_PUSH_RETURN_CODE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok36 := true; ok36; ok36 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok37 := true; ok37; ok37 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_END_CATCH)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_END_CATCH == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok38 := true; ok38; ok38 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_END_CATCH].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok39 := true; ok39; ok39 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok40 := true; ok40; ok40 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok41 := true; ok41; ok41 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok42 := true; ok42; ok42 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok43 := true; ok43; ok43 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok44 := true; ok44; ok44 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok45 := true; ok45; ok45 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok46 := true; ok46; ok46 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok47 := true; ok47; ok47 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EQ)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_EQ == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok48 := true; ok48; ok48 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_EQ].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok49 := true; ok49; ok49 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	jumpSplice = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok50 := true; ok50; ok50 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP_FALSE1 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok51 := true; ok51; ok51 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok52 := true; ok52; ok52 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok53 := true; ok53; ok53 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18772, int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok54 := true; ok54; ok54 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok55 := true; ok55; ok55 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok56 := true; ok56; ok56 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok57 := true; ok57; ok57 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok58 := true; ok58; ok58 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok59 := true; ok59; ok59 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok60 := true; ok60; ok60 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_OVER)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(3)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(3))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_OVER == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok61 := true; ok61; ok61 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_OVER].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 3
				}
				for ok62 := true; ok62; ok62 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok63 := true; ok63; ok63 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_LIST == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok64 := true; ok64; ok64 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 2
				}
				for ok65 := true; ok65; ok65 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok66 := true; ok66; ok66 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST_CONCAT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_LIST_CONCAT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok67 := true; ok67; ok67 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_LIST_CONCAT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok68 := true; ok68; ok68 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpSplice) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(jumpSplice)))
	for ok69 := true; ok69; ok69 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(4)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(4)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(4)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(4))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_REVERSE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok70 := true; ok70; ok70 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 4
				}
				for ok71 := true; ok71; ok71 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok72 := true; ok72; ok72 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok73 := true; ok73; ok73 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok74 := true; ok74; ok74 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok75 := true; ok75; ok75 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok76 := true; ok76; ok76 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok77 := true; ok77; ok77 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok78 := true; ok78; ok78 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(7))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP1 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok79 := true; ok79; ok79 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 7
				}
				for ok80 := true; ok80; ok80 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(jumpOK) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(jumpOK)))
	for ok81 := true; ok81; ok81 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_REVERSE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok82 := true; ok82; ok82 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 2
				}
				for ok83 := true; ok83; ok83 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	XTclEmitInvoke(tls, envPtr, INST_RETURN_STK, 0)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileUnsetCmd --
//
//	Procedure called to compile the "unset" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "unset" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileUnsetCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:3569:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var varTokenPtr uintptr
	// var isScalar int32 at bp+8, 4

	// var localIndex int32 at bp+4, 4

	var flags int32 = 1
	var i int32
	var varCount int32 = 0
	var haveFlags int32 = 0

	// TODO: Consider support for compiling expanded args.

	// Verify that all words - except the first non-option one - are known at
	// compile time so that we can handle them without needing to do a nasty
	// push/rotate. [Bug 3970f54c4e]

	i = 1
	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	for ; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		var leadingWord uintptr = XTcl_NewObj(tls)

		varTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
		if !(XTclWordKnownAtCompileTime(tls, varTokenPtr, leadingWord) != 0) {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(leadingWord)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(leadingWord)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(leadingWord)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(leadingWord)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(leadingWord)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(leadingWord)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(leadingWord)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(leadingWord + 32)) = XtclFreeObjList
						XtclFreeObjList = leadingWord
					}
				} else {
					XTclFreeObj(tls, leadingWord)
				}
			}

			// We can tolerate non-trivial substitutions in the first variable
			// to be unset. If a '--' or '-nocomplain' was present, anything
			// goes in that one place! (All subsequent variable names must be
			// constants since we don't want to have to push them all first.)

			if varCount == 0 {
				if haveFlags != 0 {
					continue
				}

				// In fact, we're OK as long as we're the first argument *and*
				// we provably don't start with a '-'. If that is true, then
				// even if everything else is varying, we still can't be a
				// flag. Otherwise we'll spill to runtime to place a limit on
				// the trickiness.

				if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype == TCL_TOKEN_WORD &&
					(*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Ftype == TCL_TOKEN_TEXT &&
					(*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Fsize > 0 &&
					int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(varTokenPtr + 1*24)).Fstart))) != '-' {
					continue
				}
			}
			return TCL_ERROR
		}
		if varCount == 0 {
			var bytes uintptr
			// var len int32 at bp, 4

			bytes = XTcl_GetStringFromObj(tls, leadingWord, bp)
			if i == 1 && *(*int32)(unsafe.Pointer(bp)) == 11 && !(libc.Xstrncmp(tls, ts+19906, bytes, uint64(11)) != 0) {
				flags = 0
				haveFlags++
			} else if i == 2-flags && *(*int32)(unsafe.Pointer(bp)) == 2 && !(libc.Xstrncmp(tls, ts+16430, bytes, uint64(2)) != 0) {
				haveFlags++
			} else {
				varCount++
			}
		} else {
			varCount++
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(leadingWord)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(leadingWord)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(leadingWord)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(leadingWord)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(leadingWord)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(leadingWord)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(leadingWord)).Flength = -1
				for ok1 := true; ok1; ok1 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(leadingWord + 32)) = XtclFreeObjList
					XtclFreeObjList = leadingWord
				}
			} else {
				XTclFreeObj(tls, leadingWord)
			}
		}

	}

	// Issue instructions to unset each of the named variables.

	varTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	for i = 0; i < haveFlags; i++ {
		varTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	}
	for i = 1 + haveFlags; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		// Decide if we can use a frame slot for the var/array name or if we
		// need to emit code to compute and push the name at runtime. We use a
		// frame slot (entry in the array of local vars) if we are compiling a
		// procedure body and if the name is simple text that does not include
		// namespace qualifiers.

		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
		XTclPushVarName(tls, interp, varTokenPtr, envPtr, 0, bp+4, bp+8)

		// Emit instructions to unset the variable.

		if *(*int32)(unsafe.Pointer(bp + 8)) != 0 {
			if *(*int32)(unsafe.Pointer(bp + 4)) < 0 {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_STK)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(flags))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_UNSET_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok3 := true; ok3; ok3 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_UNSET_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - flags
							}
							for ok4 := true; ok4; ok4 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(flags))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_UNSET_SCALAR == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok6 := true; ok6; ok6 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - flags
							}
							for ok7 := true; ok7; ok7 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
				}
			}
		} else {
			if *(*int32)(unsafe.Pointer(bp + 4)) < 0 {
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_ARRAY_STK)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(flags))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_UNSET_ARRAY_STK == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok10 := true; ok10; ok10 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_UNSET_ARRAY_STK].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - flags
							}
							for ok11 := true; ok11; ok11 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok12 := true; ok12; ok12 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_ARRAY)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(flags))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_UNSET_ARRAY == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok13 := true; ok13; ok13 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_UNSET_ARRAY].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - flags
							}
							for ok14 := true; ok14; ok14 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(*(*int32)(unsafe.Pointer(bp + 4))))
				}
			}
		}

		varTokenPtr = varTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(varTokenPtr)).FnumComponents+1)*24
	}
	for ok16 := true; ok16; ok16 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok17 := true; ok17; ok17 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok18 := true; ok18; ok18 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok19 := true; ok19; ok19 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok20 := true; ok20; ok20 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok21 := true; ok21; ok21 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok22 := true; ok22; ok22 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileWhileCmd --
//
//	Procedure called to compile the "while" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "while" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileWhileCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:3707:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var mapPtr uintptr
	var eclIndex int32 // TIP #280
	var testTokenPtr uintptr
	var bodyTokenPtr uintptr
	// var jumpEvalCondFixup JumpFixup at bp+4, 16

	var testCodeOffset int32
	var bodyCodeOffset int32
	var jumpDist int32
	var range1 int32
	var code int32
	// var boolVal int32 at bp, 4

	var loopMayEnd int32 // This is set to 0 if it is recognized as an
	// infinite loop.
	var boolObj uintptr
	var _delta int32
	var _delta1 int32
	var _delta2 int32
	var _delta3 int32
	var _delta4 int32
	var _delta5 int32
	var _delta6 int32
	var _objIndexCopy int32
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	loopMayEnd = 1

	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// If the test expression requires substitutions, don't compile the while
	// command inline. E.g., the expression might cause the loop to never
	// execute or execute forever, as in "while "$x < 5" {}".
	//
	// Bail out also if the body expression requires substitutions in order to
	// insure correct behaviour [Bug 219166]

	testTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	bodyTokenPtr = testTokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(testTokenPtr)).FnumComponents+1)*24

	if !((*Tcl_Token)(unsafe.Pointer(testTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD ||
		(*Tcl_Token)(unsafe.Pointer(bodyTokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	// Find out if the condition is a constant.

	boolObj = XTcl_NewStringObj(tls, (*Tcl_Token)(unsafe.Pointer(testTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(testTokenPtr+1*24)).Fsize)
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount++
	code = XTcl_GetBooleanFromObj(tls, uintptr(0), boolObj, bp)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount, 1) > 1) {
		goto __3
	}
	goto __4
__3:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __5
	}

	if !((*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != XtclEmptyStringRep) {
		goto __7
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes)
__7:
	;
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = -1
__8:
	;
	*(*uintptr)(unsafe.Pointer(boolObj + 32)) = XtclFreeObjList
	XtclFreeObjList = boolObj
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	goto __6
__5:
	XTclFreeObj(tls, boolObj)
__6:
	;
__4:
	;

	if !(code == TCL_OK) {
		goto __11
	}
	if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
		goto __12
	}
	// It is an infinite loop; flag it so that we generate a more
	// efficient body.

	loopMayEnd = 0
	goto __13
__12:
	// This is an empty loop: "while 0 {...}" or such. Compile no
	// bytecodes.

	goto pushResult
__13:
	;
__11:
	;

	// Create a ExceptionRange record for the loop body. This is used to
	// implement break and continue.

	range1 = XTclCreateExceptRange(tls, LOOP_EXCEPTION_RANGE, envPtr)

	// Jump to the evaluation of the condition. This code uses the "loop
	// rotation" optimisation (which eliminates one branch from the loop).
	// "while cond body" produces then:
	//       goto A
	//    B: body                : bodyCodeOffset
	//    A: cond -> result      : testCodeOffset, continueOffset
	//       if (result) goto B
	//
	// The infinite loop "while 1 body" produces:
	//    B: body                : all three offsets here
	//       goto B

	if !(loopMayEnd != 0) {
		goto __14
	}
	XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP,
		bp+4)
	testCodeOffset = 0 // Avoid compiler warning.
	goto __15
__14:
	// Make sure that the first command in the body is preceded by an
	// INST_START_CMD, and hence counted properly. [Bug 1752146]

	*(*int32)(unsafe.Pointer(envPtr + 3564)) &= libc.CplInt32(1)
	testCodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
__15:
	;

	// Compile the loop body.

	bodyCodeOffset = func() int32 {
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
				return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
			}
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
		}()
		return libc.AssignPtrInt32((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28+8, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1))
	}()
	if !!(loopMayEnd != 0) {
		goto __16
	}
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcontinueOffset = testCodeOffset
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = bodyCodeOffset
__16:
	;
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
	XTclCompileCmdWord(tls, interp, bodyTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(bodyTokenPtr)).FnumComponents, envPtr)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).FcodeOffset))
__17:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __20
	}
	XTclExpandCodeArray(tls, envPtr)
__20:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __21
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_POP == INST_START_CMD {
			return 1
		}
		return 0
	}()
__21:
	;
__22:
	_delta = XtclInstructionTable[INST_POP].FstackEffect
	if !(_delta != 0) {
		goto __25
	}
	if !(_delta == -0x7fffffff-1) {
		goto __26
	}
	_delta = 1 - 0
__26:
	;
__27:
	if !(_delta < 0) {
		goto __30
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __31
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__31:
	;
__30:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
__25:
	;
	goto __23
__23:
	if 0 != 0 {
		goto __22
	}
	goto __24
__24:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;

	// Compile the test expression then emit the conditional jump that
	// terminates the while. We already know it's a simple word.

	if !(loopMayEnd != 0) {
		goto __32
	}
	testCodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	jumpDist = int32(uint32(testCodeOffset) - (*JumpFixup)(unsafe.Pointer(bp+4)).FcodeOffset)
	if !(XTclFixupForwardJump(tls, envPtr, bp+4, jumpDist, 127) != 0) {
		goto __34
	}
	bodyCodeOffset = bodyCodeOffset + 3
	testCodeOffset = testCodeOffset + 3
__34:
	;
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
	XTclCompileExprWords(tls, interp, testTokenPtr, 1, envPtr)

	jumpDist = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(bodyCodeOffset))
	if !(jumpDist > 127) {
		goto __35
	}
__37:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __40
	}
	XTclExpandCodeArray(tls, envPtr)
__40:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __41
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__41:
	;
__42:
	_delta1 = XtclInstructionTable[INST_JUMP_TRUE4].FstackEffect
	if !(_delta1 != 0) {
		goto __45
	}
	if !(_delta1 == -0x7fffffff-1) {
		goto __46
	}
	_delta1 = 1 - -jumpDist
__46:
	;
__47:
	if !(_delta1 < 0) {
		goto __50
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __51
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__51:
	;
__50:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta1
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
__45:
	;
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
	goto __38
__38:
	if 0 != 0 {
		goto __37
	}
	goto __39
__39:
	;
	goto __36
__35:
__52:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __55
	}
	XTclExpandCodeArray(tls, envPtr)
__55:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __56
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP_TRUE1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__56:
	;
__57:
	_delta2 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
	if !(_delta2 != 0) {
		goto __60
	}
	if !(_delta2 == -0x7fffffff-1) {
		goto __61
	}
	_delta2 = 1 - -jumpDist
__61:
	;
__62:
	if !(_delta2 < 0) {
		goto __65
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __66
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__66:
	;
__65:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta2
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
__60:
	;
	goto __58
__58:
	if 0 != 0 {
		goto __57
	}
	goto __59
__59:
	;
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
__36:
	;
	goto __33
__32:
	jumpDist = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(bodyCodeOffset))
	if !(jumpDist > 127) {
		goto __67
	}
__69:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __72
	}
	XTclExpandCodeArray(tls, envPtr)
__72:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __73
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__73:
	;
__74:
	_delta3 = XtclInstructionTable[INST_JUMP4].FstackEffect
	if !(_delta3 != 0) {
		goto __77
	}
	if !(_delta3 == -0x7fffffff-1) {
		goto __78
	}
	_delta3 = 1 - -jumpDist
__78:
	;
__79:
	if !(_delta3 < 0) {
		goto __82
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __83
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__83:
	;
__82:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta3
	goto __80
__80:
	if 0 != 0 {
		goto __79
	}
	goto __81
__81:
	;
__77:
	;
	goto __75
__75:
	if 0 != 0 {
		goto __74
	}
	goto __76
__76:
	;
	goto __70
__70:
	if 0 != 0 {
		goto __69
	}
	goto __71
__71:
	;
	goto __68
__67:
__84:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __87
	}
	XTclExpandCodeArray(tls, envPtr)
__87:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(-jumpDist))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __88
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_JUMP1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__88:
	;
__89:
	_delta4 = XtclInstructionTable[INST_JUMP1].FstackEffect
	if !(_delta4 != 0) {
		goto __92
	}
	if !(_delta4 == -0x7fffffff-1) {
		goto __93
	}
	_delta4 = 1 - -jumpDist
__93:
	;
__94:
	if !(_delta4 < 0) {
		goto __97
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __98
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__98:
	;
__97:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta4
	goto __95
__95:
	if 0 != 0 {
		goto __94
	}
	goto __96
__96:
	;
__92:
	;
	goto __90
__90:
	if 0 != 0 {
		goto __89
	}
	goto __91
__91:
	;
	goto __85
__85:
	if 0 != 0 {
		goto __84
	}
	goto __86
__86:
	;
__68:
	;
__33:
	;

	// Set the loop's body, continue and break offsets.

	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcontinueOffset = testCodeOffset
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FcodeOffset = bodyCodeOffset
	(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28)).FbreakOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	XTclFinalizeLoopExceptionRange(tls, envPtr, range1)

	// The while command's result is an empty string.

pushResult:
__99:
	_objIndexCopy = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
	if !(_objIndexCopy <= 255) {
		goto __102
	}
__104:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __107
	}
	XTclExpandCodeArray(tls, envPtr)
__107:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __108
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH1 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__108:
	;
__109:
	_delta5 = XtclInstructionTable[INST_PUSH1].FstackEffect
	if !(_delta5 != 0) {
		goto __112
	}
	if !(_delta5 == -0x7fffffff-1) {
		goto __113
	}
	_delta5 = 1 - _objIndexCopy
__113:
	;
__114:
	if !(_delta5 < 0) {
		goto __117
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __118
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__118:
	;
__117:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta5
	goto __115
__115:
	if 0 != 0 {
		goto __114
	}
	goto __116
__116:
	;
__112:
	;
	goto __110
__110:
	if 0 != 0 {
		goto __109
	}
	goto __111
__111:
	;
	goto __105
__105:
	if 0 != 0 {
		goto __104
	}
	goto __106
__106:
	;
	goto __103
__102:
__119:
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) {
		goto __122
	}
	XTclExpandCodeArray(tls, envPtr)
__122:
	;
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2) {
		goto __123
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
		if INST_PUSH4 == INST_START_CMD {
			return 1
		}
		return 0
	}()
__123:
	;
__124:
	_delta6 = XtclInstructionTable[INST_PUSH4].FstackEffect
	if !(_delta6 != 0) {
		goto __127
	}
	if !(_delta6 == -0x7fffffff-1) {
		goto __128
	}
	_delta6 = 1 - _objIndexCopy
__128:
	;
__129:
	if !(_delta6 < 0) {
		goto __132
	}
	if !((*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) {
		goto __133
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
__133:
	;
__132:
	;
	*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta6
	goto __130
__130:
	if 0 != 0 {
		goto __129
	}
	goto __131
__131:
	;
__127:
	;
	goto __125
__125:
	if 0 != 0 {
		goto __124
	}
	goto __126
__126:
	;
	goto __120
__120:
	if 0 != 0 {
		goto __119
	}
	goto __121
__121:
	;
__103:
	;
	goto __100
__100:
	if 0 != 0 {
		goto __99
	}
	goto __101
__101:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileYieldCmd --
//
//	Procedure called to compile the "yield" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "yield" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileYieldCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:3885:1: */
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 1 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 2 {
		return TCL_ERROR
	}

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 1 {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
		var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
		var valueTokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24

		if (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
			XTclCompileTokens(tls, interp, valueTokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(valueTokenPtr)).FnumComponents, envPtr)
		}

	}
	for ok14 := true; ok14; ok14 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_YIELD)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_YIELD == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok15 := true; ok15; ok15 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_YIELD].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompileYieldToCmd --
//
//	Procedure called to compile the "yieldto" command.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the "yieldto" command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileYieldToCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:3928:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	var i int32

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2 {
		return TCL_ERROR
	}

	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_NS_CURRENT)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_NS_CURRENT == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_NS_CURRENT].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for i = 1; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok7 := true; ok7; ok7 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok8 := true; ok8; ok8 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok9 := true; ok9; ok9 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}
	for ok10 := true; ok10; ok10 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LIST)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(i))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_LIST == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok11 := true; ok11; ok11 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_LIST].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - i
				}
				for ok12 := true; ok12; ok12 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for ok13 := true; ok13; ok13 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_YIELD_TO_INVOKE)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_YIELD_TO_INVOKE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_YIELD_TO_INVOKE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// CompileUnaryOpCmd --
//
//	Utility routine to compile the unary operator commands.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the compiled command at
//	runtime.
//
//----------------------------------------------------------------------

func sCompileUnaryOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, instruction int32, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:3973:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(instruction)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if instruction == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[instruction].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok9 := true; ok9; ok9 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// CompileAssociativeBinaryOpCmd --
//
//	Utility routine to compile the binary operator commands that accept an
//	arbitrary number of arguments, and that are associative operations.
//	Because of the associativity, we may combine operations from right to
//	left, saving us any effort of re-ordering the arguments on the stack
//	after substitutions are completed.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the compiled command at
//	runtime.
//
//----------------------------------------------------------------------

func sCompileAssociativeBinaryOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, identity uintptr, instruction int32, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4014:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	var words int32

	// TODO: Consider support for compiling expanded args.
	for words = 1; words < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; words++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(words)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(words)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	}
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords <= 2 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, identity, -1, 0)
			if _objIndexCopy <= 255 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		words++
	}
	if words > 3 {
		// Reverse order of arguments to get precise agreement with [expr] in
		// calcuations, including roundoff errors.

		for ok14 := true; ok14; ok14 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words-1) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words-1) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words-1) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words - 1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok15 := true; ok15; ok15 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - (words - 1)
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	for libc.PreDecInt32(&words, 1) > 1 {
		for ok17 := true; ok17; ok17 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(instruction)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if instruction == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok18 := true; ok18; ok18 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[instruction].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// CompileStrictlyBinaryOpCmd --
//
//	Utility routine to compile the binary operator commands, that strictly
//	accept exactly two arguments.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the compiled command at
//	runtime.
//
//----------------------------------------------------------------------

func sCompileStrictlyBinaryOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, instruction int32, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4068:1: */
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}
	return sCompileAssociativeBinaryOpCmd(tls, interp, parsePtr,
		uintptr(0), instruction, envPtr)
}

//----------------------------------------------------------------------
//
// CompileComparisonOpCmd --
//
//	Utility routine to compile the n-ary comparison operator commands.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the compiled command at
//	runtime.
//
//----------------------------------------------------------------------

func sCompileComparisonOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, instruction int32, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4100:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr

	// TODO: Consider support for compiling expanded args.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 3 {
		tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok14 := true; ok14; ok14 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok15 := true; ok15; ok15 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok16 := true; ok16; ok16 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok17 := true; ok17; ok17 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok18 := true; ok18; ok18 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok19 := true; ok19; ok19 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok20 := true; ok20; ok20 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		for ok21 := true; ok21; ok21 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(instruction)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if instruction == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok22 := true; ok22; ok22 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[instruction].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok23 := true; ok23; ok23 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	} else if (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr == uintptr(0) {
		// No local variable space!

		return TCL_ERROR
	} else {
		var tmpIndex int32 = XTclFindCompiledLocal(tls, uintptr(0), 0, 1, envPtr)
		var words int32

		tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok24 := true; ok24; ok24 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok25 := true; ok25; ok25 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok26 := true; ok26; ok26 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok27 := true; ok27; ok27 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok28 := true; ok28; ok28 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok29 := true; ok29; ok29 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok30 := true; ok30; ok30 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 1*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 1*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok31 := true; ok31; ok31 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok32 := true; ok32; ok32 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok33 := true; ok33; ok33 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok34 := true; ok34; ok34 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok35 := true; ok35; ok35 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok36 := true; ok36; ok36 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok37 := true; ok37; ok37 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + 2*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + 2*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

		if tmpIndex < 256 {
			for ok38 := true; ok38; ok38 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok39 := true; ok39; ok39 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - tmpIndex
						}
						for ok40 := true; ok40; ok40 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok41 := true; ok41; ok41 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_STORE_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok42 := true; ok42; ok42 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - tmpIndex
						}
						for ok43 := true; ok43; ok43 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

		for ok44 := true; ok44; ok44 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(instruction)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if instruction == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok45 := true; ok45; ok45 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[instruction].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok46 := true; ok46; ok46 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for words = 3; words < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; {
			if tmpIndex < 256 {
				for ok47 := true; ok47; ok47 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok48 := true; ok48; ok48 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - tmpIndex
							}
							for ok49 := true; ok49; ok49 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok50 := true; ok50; ok50 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_LOAD_SCALAR4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok51 := true; ok51; ok51 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - tmpIndex
							}
							for ok52 := true; ok52; ok52 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}

			tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
			if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
				for ok53 := true; ok53; ok53 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
					if _objIndexCopy <= 255 {
						for ok54 := true; ok54; ok54 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok55 := true; ok55; ok55 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok56 := true; ok56; ok56 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok57 := true; ok57; ok57 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok58 := true; ok58; ok58 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok59 := true; ok59; ok59 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
			} else {
				(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(words)*4))
				(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(words)*8))
				XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
			}

			if libc.PreIncInt32(&words, 1) < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords {
				if tmpIndex < 256 {
					for ok60 := true; ok60; ok60 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STORE_SCALAR1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok61 := true; ok61; ok61 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - tmpIndex
								}
								for ok62 := true; ok62; ok62 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok63 := true; ok63; ok63 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STORE_SCALAR4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_STORE_SCALAR4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok64 := true; ok64; ok64 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_STORE_SCALAR4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - tmpIndex
								}
								for ok65 := true; ok65; ok65 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}

			}
			for ok66 := true; ok66; ok66 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(instruction)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if instruction == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok67 := true; ok67; ok67 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[instruction].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok68 := true; ok68; ok68 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
		for ; words > 3; words-- {
			for ok69 := true; ok69; ok69 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_BITAND)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_BITAND == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok70 := true; ok70; ok70 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_BITAND].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok71 := true; ok71; ok71 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}

		// Drop the value from the temp variable; retaining that reference
		// might be expensive elsewhere.

		for ok72 := true; ok72; ok72 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UNSET_SCALAR)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_UNSET_SCALAR == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok73 := true; ok73; ok73 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_UNSET_SCALAR].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok74 := true; ok74; ok74 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok75 := true; ok75; ok75 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(tmpIndex))
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCompile*OpCmd --
//
//	Procedures called to compile the corresponding "::tcl::mathop::*"
//	commands. These are all wrappers around the utility operator command
//	compiler functions, except for the compilers for subtraction and
//	division, which are special.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the compiled command at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileInvertOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4179:1: */
	return sCompileUnaryOpCmd(tls, interp, parsePtr, INST_BITNOT, envPtr)
}

func XTclCompileNotOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4190:1: */
	return sCompileUnaryOpCmd(tls, interp, parsePtr, INST_LNOT, envPtr)
}

func XTclCompileAddOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4201:1: */
	return sCompileAssociativeBinaryOpCmd(tls, interp, parsePtr, ts+18935, INST_ADD,
		envPtr)
}

func XTclCompileMulOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4213:1: */
	return sCompileAssociativeBinaryOpCmd(tls, interp, parsePtr, ts+18937, INST_MULT,
		envPtr)
}

func XTclCompileAndOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4225:1: */
	return sCompileAssociativeBinaryOpCmd(tls, interp, parsePtr, ts+19918, INST_BITAND,
		envPtr)
}

func XTclCompileOrOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4237:1: */
	return sCompileAssociativeBinaryOpCmd(tls, interp, parsePtr, ts+18935, INST_BITOR,
		envPtr)
}

func XTclCompileXorOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4249:1: */
	return sCompileAssociativeBinaryOpCmd(tls, interp, parsePtr, ts+18935, INST_BITXOR,
		envPtr)
}

func XTclCompilePowOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4261:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	var words int32

	// This one has its own implementation because the ** operator is the only
	// one with right associativity.

	for words = 1; words < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; words++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(words)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(words)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	}
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords <= 2 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+18937, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok10 := true; ok10; ok10 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		words++
	}
	for libc.PreDecInt32(&words, 1) > 1 {
		for ok14 := true; ok14; ok14 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EXPON)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_EXPON == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok15 := true; ok15; ok15 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_EXPON].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileLshiftOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4292:1: */
	return sCompileStrictlyBinaryOpCmd(tls, interp, parsePtr, INST_LSHIFT, envPtr)
}

func XTclCompileRshiftOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4303:1: */
	return sCompileStrictlyBinaryOpCmd(tls, interp, parsePtr, INST_RSHIFT, envPtr)
}

func XTclCompileModOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4314:1: */
	return sCompileStrictlyBinaryOpCmd(tls, interp, parsePtr, INST_MOD, envPtr)
}

func XTclCompileNeqOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4325:1: */
	return sCompileStrictlyBinaryOpCmd(tls, interp, parsePtr, INST_NEQ, envPtr)
}

func XTclCompileStrneqOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4336:1: */
	return sCompileStrictlyBinaryOpCmd(tls, interp, parsePtr, INST_STR_NEQ, envPtr)
}

func XTclCompileInOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4347:1: */
	return sCompileStrictlyBinaryOpCmd(tls, interp, parsePtr, INST_LIST_IN, envPtr)
}

func XTclCompileNiOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4358:1: */
	return sCompileStrictlyBinaryOpCmd(tls, interp, parsePtr, INST_LIST_NOT_IN,
		envPtr)
}

func XTclCompileLessOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4370:1: */
	return sCompileComparisonOpCmd(tls, interp, parsePtr, INST_LT, envPtr)
}

func XTclCompileLeqOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4381:1: */
	return sCompileComparisonOpCmd(tls, interp, parsePtr, INST_LE, envPtr)
}

func XTclCompileGreaterOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4392:1: */
	return sCompileComparisonOpCmd(tls, interp, parsePtr, INST_GT, envPtr)
}

func XTclCompileGeqOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4403:1: */
	return sCompileComparisonOpCmd(tls, interp, parsePtr, INST_GE, envPtr)
}

func XTclCompileEqOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4414:1: */
	return sCompileComparisonOpCmd(tls, interp, parsePtr, INST_EQ, envPtr)
}

func XTclCompileStreqOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4425:1: */
	return sCompileComparisonOpCmd(tls, interp, parsePtr, INST_STR_EQ, envPtr)
}

func XTclCompileMinusOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4436:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	var words int32

	// TODO: Consider support for compiling expanded args.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 1 {
		// Fallback to direct eval to report syntax error.

		return TCL_ERROR
	}
	for words = 1; words < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; words++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(words)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(words)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	}
	if words == 2 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_UMINUS)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_UMINUS == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_UMINUS].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		return TCL_OK
	}
	if words == 3 {
		for ok10 := true; ok10; ok10 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_SUB)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_SUB == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok11 := true; ok11; ok11 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_SUB].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		return TCL_OK
	}

	// Reverse order of arguments to get precise agreement with [expr] in
	// calcuations, including roundoff errors.

	for ok13 := true; ok13; ok13 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words-1) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words-1) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words-1) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words - 1))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_REVERSE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - (words - 1)
				}
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for libc.PreDecInt32(&words, 1) > 1 {
		for ok16 := true; ok16; ok16 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok17 := true; ok17; ok17 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 2
					}
					for ok18 := true; ok18; ok18 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok19 := true; ok19; ok19 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_SUB)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_SUB == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok20 := true; ok20; ok20 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_SUB].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok21 := true; ok21; ok21 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	return TCL_OK
}

func XTclCompileDivOpCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompCmdsSZ.c:4482:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1 // TIP #280
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	var words int32

	// TODO: Consider support for compiling expanded args.
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 1 {
		// Fallback to direct eval to report syntax error.

		return TCL_ERROR
	}
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 2 {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+19921, int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}
	for words = 1; words < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; words++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, 0)
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(words)*4))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(words)*8))
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)
		}

	}
	if words <= 3 {
		for ok14 := true; ok14; ok14 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DIV)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DIV == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok15 := true; ok15; ok15 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DIV].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		return TCL_OK
	}

	// Reverse order of arguments to get precise agreement with [expr] in
	// calcuations, including roundoff errors.

	for ok17 := true; ok17; ok17 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words-1) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words-1) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words-1) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(words - 1))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_REVERSE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok18 := true; ok18; ok18 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - (words - 1)
				}
				for ok19 := true; ok19; ok19 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	for libc.PreDecInt32(&words, 1) > 1 {
		for ok20 := true; ok20; ok20 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_REVERSE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(2)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(2))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_REVERSE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok21 := true; ok21; ok21 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_REVERSE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 2
					}
					for ok22 := true; ok22; ok22 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok23 := true; ok23; ok23 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DIV)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_DIV == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok24 := true; ok24; ok24 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DIV].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok25 := true; ok25; ok25 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------
// Macros and flag values used by Tcl bytecode compilation and execution
// modules inside the Tcl core but not used outside.
//----------------------------------------------------------------

// Simplified form to access AuxData.
//
// ClientData TclFetchAuxData(CompileEng *envPtr, int index);

// Form of TclRegisterLiteral with flags == 0. In that case, it is safe to
// cast away constness, and it is cleanest to do that here, all in one place.
//
// int TclRegisterNewLiteral(CompileEnv *envPtr, const char *bytes,
//			     int length);

// Form of TclRegisterLiteral with flags == LITERAL_CMD_NAME. In that case, it
// is safe to cast away constness, and it is cleanest to do that here, all in
// one place.
//
// int TclRegisterNewNSLiteral(CompileEnv *envPtr, const char *bytes,
//			       int length);

// Macro used to manually adjust the stack requirements; used in cases where
// the stack effect cannot be computed from the opcode and its operands, but
// is still known at compile time.
//
// void TclAdjustStackDepth(int delta, CompileEnv *envPtr);

// Macro used to update the stack requirements. It is called by the macros
// TclEmitOpCode, TclEmitInst1 and TclEmitInst4.
// Remark that the very last instruction of a bytecode always reduces the
// stack level: INST_DONE or INST_POP, so that the maxStackdepth is always
// updated.
//
// void TclUpdateStackReqs(unsigned char op, int i, CompileEnv *envPtr);

// Macros used to update the flag that indicates if we are at the start of a
// command, based on whether the opcode is INST_START_COMMAND.
//
// void TclUpdateAtCmdStart(unsigned char op, CompileEnv *envPtr);

// Macro to emit an opcode byte into a CompileEnv's code array. The ANSI C
// "prototype" for this macro is:
//
// void TclEmitOpcode(unsigned char op, CompileEnv *envPtr);

// Macros to emit an integer operand. The ANSI C "prototype" for these macros
// are:
//
// void TclEmitInt1(int i, CompileEnv *envPtr);
// void TclEmitInt4(int i, CompileEnv *envPtr);

// Macros to emit an instruction with signed or unsigned integer operands.
// Four byte integers are stored in "big-endian" order with the high order
// byte stored at the lowest address. The ANSI C "prototypes" for these macros
// are:
//
// void TclEmitInstInt1(unsigned char op, int i, CompileEnv *envPtr);
// void TclEmitInstInt4(unsigned char op, int i, CompileEnv *envPtr);

// Macro to push a Tcl object onto the Tcl evaluation stack. It emits the
// object's one or four byte array index into the CompileEnv's code array.
// These support, respectively, a maximum of 256 (2**8) and 2**32 objects in a
// CompileEnv. The ANSI C "prototype" for this macro is:
//
// void	TclEmitPush(int objIndex, CompileEnv *envPtr);

// Macros to update a (signed or unsigned) integer starting at a pointer. The
// two variants depend on the number of bytes. The ANSI C "prototypes" for
// these macros are:
//
// void TclStoreInt1AtPtr(int i, unsigned char *p);
// void TclStoreInt4AtPtr(int i, unsigned char *p);

// Macros to update instructions at a particular pc with a new op code and a
// (signed or unsigned) int operand. The ANSI C "prototypes" for these macros
// are:
//
// void TclUpdateInstInt1AtPc(unsigned char op, int i, unsigned char *pc);
// void TclUpdateInstInt4AtPc(unsigned char op, int i, unsigned char *pc);

// Macro to fix up a forward jump to point to the current code-generation
// position in the bytecode being created (the most common case). The ANSI C
// "prototypes" for this macro is:
//
// int TclFixupForwardJumpToHere(CompileEnv *envPtr, JumpFixup *fixupPtr,
//				 int threshold);

// Macros to get a signed integer (GET_INT{1,2}) or an unsigned int
// (GET_UINT{1,2}) from a pointer. There are two variants for each return type
// that depend on the number of bytes fetched. The ANSI C "prototypes" for
// these macros are:
//
// int TclGetInt1AtPtr(unsigned char *p);
// int TclGetInt4AtPtr(unsigned char *p);
// unsigned int TclGetUInt1AtPtr(unsigned char *p);
// unsigned int TclGetUInt4AtPtr(unsigned char *p);

// The TclGetInt1AtPtr macro is tricky because we want to do sign extension on
// the 1-byte value. Unfortunately the "char" type isn't signed on all
// platforms so sign-extension doesn't always happen automatically. Sometimes
// we can explicitly declare the pointer to be signed, but other times we have
// to explicitly sign-extend the value in software.

// Macros used to compute the minimum and maximum of two integers. The ANSI C
// "prototypes" for these macros are:
//
// int TclMin(int i, int j);
// int TclMax(int i, int j);

// Convenience macros for use when compiling bodies of commands. The ANSI C
// "prototype" for these macros are:
//
// static void		BODY(Tcl_Token *tokenPtr, int word);

// Convenience macro for use when compiling tokens to be pushed. The ANSI C
// "prototype" for this macro is:
//
// static void		CompileTokens(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp);

// Convenience macros for use when pushing literals. The ANSI C "prototype" for
// these macros are:
//
// static void		PushLiteral(CompileEnv *envPtr,
//			    const char *string, int length);
// static void		PushStringLiteral(CompileEnv *envPtr,
//			    const char *string);

// Macro to advance to the next token; it is more mnemonic than the address
// arithmetic that it replaces. The ANSI C "prototype" for this macro is:
//
// static Tcl_Token *	TokenAfter(Tcl_Token *tokenPtr);

// Macro to get the offset to the next instruction to be issued. The ANSI C
// "prototype" for this macro is:
//
// static int	CurrentOffset(CompileEnv *envPtr);

// Note: the exceptDepth is a bit of a misnomer: TEBC only needs the
// maximal depth of nested CATCH ranges in order to alloc runtime
// memory. These macros should compute precisely that? OTOH, the nesting depth
// of LOOP ranges is an interesting datum for debugging purposes, and that is
// what we compute now.
//
// static int	ExceptionRangeStarts(CompileEnv *envPtr, int index);
// static void	ExceptionRangeEnds(CompileEnv *envPtr, int index);
// static void	ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL);

// Check if there is an LVT for compiled locals

// Macros for making it easier to deal with tokens and DStrings.

// Macro that encapsulates an efficiency trick that avoids a function call for
// the simplest of compiles. The ANSI C "prototype" for this macro is:
//
// static void		CompileWord(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp, int word);

// TIP #280: Remember the per-word line information of the current command. An
// index is used instead of a pointer as recursive compilation may reallocate,
// i.e. move, the array. This is also the reason to save the nuloc now, it may
// change during the course of the function.
//
// Macro to encapsulate the variable definition and setup.

// Often want to issue one of two versions of an instruction based on whether
// the argument will fit in a single byte or not. This makes it much clearer.

// How to get an anonymous local variable (used for holding temporary values
// off the stack) or a local simple scalar.

// Flags bits used by TclPushVarName.

// DTrace probe macros (NOPs if DTrace support is not enabled).

// Define the following macros to enable debug logging of the DTrace proc,
// cmd, and inst probes. Note that this does _not_ require a platform with
// DTrace, it simply logs all probe output to /tmp/tclDTraceDebug-[pid].log.
//
// If the second macro is defined, logging to file starts immediately,
// otherwise only after the first call to [tcl::dtrace]. Note that the debug
// probe data is always computed, even when it is not logged to file.
//
// Defining the third macro enables debug logging of inst probes (disabled
// by default due to the significant performance impact).

//
// #define TCL_DTRACE_DEBUG 1
// #define TCL_DTRACE_DEBUG_LOG_ENABLED 1
// #define TCL_DTRACE_DEBUG_INST_PROBES 1

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Expression parsing takes place in the routine ParseExpr(). It takes a
// string as input, parses that string, and generates a representation of the
// expression in the form of a tree of operators, a list of literals, a list
// of function names, and an array of Tcl_Token's within a Tcl_Parse struct.
// The tree is composed of OpNodes.

type OpNode1 = struct {
	Fleft       int32
	Fright      int32
	Fp          struct{ Fparent int32 }
	Flexeme     uint8
	Fprecedence uint8
	Fmark       uint8
	Fconstant   uint8
} /* tclCompExpr.c:25:9 */

//----------------------------------------------------------------
// Macros and flag values used by Tcl bytecode compilation and execution
// modules inside the Tcl core but not used outside.
//----------------------------------------------------------------

// Simplified form to access AuxData.
//
// ClientData TclFetchAuxData(CompileEng *envPtr, int index);

// Form of TclRegisterLiteral with flags == 0. In that case, it is safe to
// cast away constness, and it is cleanest to do that here, all in one place.
//
// int TclRegisterNewLiteral(CompileEnv *envPtr, const char *bytes,
//			     int length);

// Form of TclRegisterLiteral with flags == LITERAL_CMD_NAME. In that case, it
// is safe to cast away constness, and it is cleanest to do that here, all in
// one place.
//
// int TclRegisterNewNSLiteral(CompileEnv *envPtr, const char *bytes,
//			       int length);

// Macro used to manually adjust the stack requirements; used in cases where
// the stack effect cannot be computed from the opcode and its operands, but
// is still known at compile time.
//
// void TclAdjustStackDepth(int delta, CompileEnv *envPtr);

// Macro used to update the stack requirements. It is called by the macros
// TclEmitOpCode, TclEmitInst1 and TclEmitInst4.
// Remark that the very last instruction of a bytecode always reduces the
// stack level: INST_DONE or INST_POP, so that the maxStackdepth is always
// updated.
//
// void TclUpdateStackReqs(unsigned char op, int i, CompileEnv *envPtr);

// Macros used to update the flag that indicates if we are at the start of a
// command, based on whether the opcode is INST_START_COMMAND.
//
// void TclUpdateAtCmdStart(unsigned char op, CompileEnv *envPtr);

// Macro to emit an opcode byte into a CompileEnv's code array. The ANSI C
// "prototype" for this macro is:
//
// void TclEmitOpcode(unsigned char op, CompileEnv *envPtr);

// Macros to emit an integer operand. The ANSI C "prototype" for these macros
// are:
//
// void TclEmitInt1(int i, CompileEnv *envPtr);
// void TclEmitInt4(int i, CompileEnv *envPtr);

// Macros to emit an instruction with signed or unsigned integer operands.
// Four byte integers are stored in "big-endian" order with the high order
// byte stored at the lowest address. The ANSI C "prototypes" for these macros
// are:
//
// void TclEmitInstInt1(unsigned char op, int i, CompileEnv *envPtr);
// void TclEmitInstInt4(unsigned char op, int i, CompileEnv *envPtr);

// Macro to push a Tcl object onto the Tcl evaluation stack. It emits the
// object's one or four byte array index into the CompileEnv's code array.
// These support, respectively, a maximum of 256 (2**8) and 2**32 objects in a
// CompileEnv. The ANSI C "prototype" for this macro is:
//
// void	TclEmitPush(int objIndex, CompileEnv *envPtr);

// Macros to update a (signed or unsigned) integer starting at a pointer. The
// two variants depend on the number of bytes. The ANSI C "prototypes" for
// these macros are:
//
// void TclStoreInt1AtPtr(int i, unsigned char *p);
// void TclStoreInt4AtPtr(int i, unsigned char *p);

// Macros to update instructions at a particular pc with a new op code and a
// (signed or unsigned) int operand. The ANSI C "prototypes" for these macros
// are:
//
// void TclUpdateInstInt1AtPc(unsigned char op, int i, unsigned char *pc);
// void TclUpdateInstInt4AtPc(unsigned char op, int i, unsigned char *pc);

// Macro to fix up a forward jump to point to the current code-generation
// position in the bytecode being created (the most common case). The ANSI C
// "prototypes" for this macro is:
//
// int TclFixupForwardJumpToHere(CompileEnv *envPtr, JumpFixup *fixupPtr,
//				 int threshold);

// Macros to get a signed integer (GET_INT{1,2}) or an unsigned int
// (GET_UINT{1,2}) from a pointer. There are two variants for each return type
// that depend on the number of bytes fetched. The ANSI C "prototypes" for
// these macros are:
//
// int TclGetInt1AtPtr(unsigned char *p);
// int TclGetInt4AtPtr(unsigned char *p);
// unsigned int TclGetUInt1AtPtr(unsigned char *p);
// unsigned int TclGetUInt4AtPtr(unsigned char *p);

// The TclGetInt1AtPtr macro is tricky because we want to do sign extension on
// the 1-byte value. Unfortunately the "char" type isn't signed on all
// platforms so sign-extension doesn't always happen automatically. Sometimes
// we can explicitly declare the pointer to be signed, but other times we have
// to explicitly sign-extend the value in software.

// Macros used to compute the minimum and maximum of two integers. The ANSI C
// "prototypes" for these macros are:
//
// int TclMin(int i, int j);
// int TclMax(int i, int j);

// Convenience macros for use when compiling bodies of commands. The ANSI C
// "prototype" for these macros are:
//
// static void		BODY(Tcl_Token *tokenPtr, int word);

// Convenience macro for use when compiling tokens to be pushed. The ANSI C
// "prototype" for this macro is:
//
// static void		CompileTokens(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp);

// Convenience macros for use when pushing literals. The ANSI C "prototype" for
// these macros are:
//
// static void		PushLiteral(CompileEnv *envPtr,
//			    const char *string, int length);
// static void		PushStringLiteral(CompileEnv *envPtr,
//			    const char *string);

// Macro to advance to the next token; it is more mnemonic than the address
// arithmetic that it replaces. The ANSI C "prototype" for this macro is:
//
// static Tcl_Token *	TokenAfter(Tcl_Token *tokenPtr);

// Macro to get the offset to the next instruction to be issued. The ANSI C
// "prototype" for this macro is:
//
// static int	CurrentOffset(CompileEnv *envPtr);

// Note: the exceptDepth is a bit of a misnomer: TEBC only needs the
// maximal depth of nested CATCH ranges in order to alloc runtime
// memory. These macros should compute precisely that? OTOH, the nesting depth
// of LOOP ranges is an interesting datum for debugging purposes, and that is
// what we compute now.
//
// static int	ExceptionRangeStarts(CompileEnv *envPtr, int index);
// static void	ExceptionRangeEnds(CompileEnv *envPtr, int index);
// static void	ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL);

// Check if there is an LVT for compiled locals

// Macros for making it easier to deal with tokens and DStrings.

// Macro that encapsulates an efficiency trick that avoids a function call for
// the simplest of compiles. The ANSI C "prototype" for this macro is:
//
// static void		CompileWord(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp, int word);

// TIP #280: Remember the per-word line information of the current command. An
// index is used instead of a pointer as recursive compilation may reallocate,
// i.e. move, the array. This is also the reason to save the nuloc now, it may
// change during the course of the function.
//
// Macro to encapsulate the variable definition and setup.

// Often want to issue one of two versions of an instruction based on whether
// the argument will fit in a single byte or not. This makes it much clearer.

// How to get an anonymous local variable (used for holding temporary values
// off the stack) or a local simple scalar.

// Flags bits used by TclPushVarName.

// DTrace probe macros (NOPs if DTrace support is not enabled).

// Define the following macros to enable debug logging of the DTrace proc,
// cmd, and inst probes. Note that this does _not_ require a platform with
// DTrace, it simply logs all probe output to /tmp/tclDTraceDebug-[pid].log.
//
// If the second macro is defined, logging to file starts immediately,
// otherwise only after the first call to [tcl::dtrace]. Note that the debug
// probe data is always computed, even when it is not logged to file.
//
// Defining the third macro enables debug logging of inst probes (disabled
// by default due to the significant performance impact).

//
// #define TCL_DTRACE_DEBUG 1
// #define TCL_DTRACE_DEBUG_LOG_ENABLED 1
// #define TCL_DTRACE_DEBUG_INST_PROBES 1

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Expression parsing takes place in the routine ParseExpr(). It takes a
// string as input, parses that string, and generates a representation of the
// expression in the form of a tree of operators, a list of literals, a list
// of function names, and an array of Tcl_Token's within a Tcl_Parse struct.
// The tree is composed of OpNodes.

type OpNode = OpNode1 /* tclCompExpr.c:36:3 */

// Here the same information contained in the comments above is stored in
// inverted form, so that given a lexeme, one can quickly look up its
// precedence value.

var prec = [136]uint8{
	// Non-operator lexemes
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0),
	// Binary operator lexemes
	PREC_ADD,         // BINARY_PLUS
	PREC_ADD,         // BINARY_MINUS
	PREC_COMMA,       // COMMA
	PREC_MULT,        // MULT
	PREC_MULT,        // DIVIDE
	PREC_MULT,        // MOD
	PREC_COMPARE,     // LESS
	PREC_COMPARE,     // GREATER
	PREC_BIT_AND,     // BIT_AND
	PREC_BIT_XOR,     // BIT_XOR
	PREC_BIT_OR,      // BIT_OR
	PREC_CONDITIONAL, // QUESTION
	PREC_CONDITIONAL, // COLON
	PREC_SHIFT,       // LEFT_SHIFT
	PREC_SHIFT,       // RIGHT_SHIFT
	PREC_COMPARE,     // LEQ
	PREC_COMPARE,     // GEQ
	PREC_EQUAL,       // EQUAL
	PREC_EQUAL,       // NEQ
	PREC_AND,         // AND
	PREC_OR,          // OR
	PREC_EQUAL,       // STREQ
	PREC_EQUAL,       // STRNEQ
	PREC_EXPON,       // EXPON
	PREC_EQUAL,       // IN_LIST
	PREC_EQUAL,       // NOT_IN_LIST
	PREC_CLOSE_PAREN, // CLOSE_PAREN
	PREC_END,         // END
	// Expansion room for more binary operators
	uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0),
	// Unary operator lexemes
	PREC_UNARY,      // UNARY_PLUS
	PREC_UNARY,      // UNARY_MINUS
	PREC_UNARY,      // FUNCTION
	PREC_START,      // START
	PREC_OPEN_PAREN, // OPEN_PAREN
	PREC_UNARY,      // NOT
	PREC_UNARY,      // BIT_NOT
} /* tclCompExpr.c:328:28 */

// A table mapping lexemes to bytecode instructions, used by CompileExprTree().

var instruction = [136]uint8{
	// Non-operator lexemes
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0),
	// Binary operator lexemes
	uint8(INST_ADD),         // BINARY_PLUS
	uint8(INST_SUB),         // BINARY_MINUS
	uint8(0),                // COMMA
	uint8(INST_MULT),        // MULT
	uint8(INST_DIV),         // DIVIDE
	uint8(INST_MOD),         // MOD
	uint8(INST_LT),          // LESS
	uint8(INST_GT),          // GREATER
	uint8(INST_BITAND),      // BIT_AND
	uint8(INST_BITXOR),      // BIT_XOR
	uint8(INST_BITOR),       // BIT_OR
	uint8(0),                // QUESTION
	uint8(0),                // COLON
	uint8(INST_LSHIFT),      // LEFT_SHIFT
	uint8(INST_RSHIFT),      // RIGHT_SHIFT
	uint8(INST_LE),          // LEQ
	uint8(INST_GE),          // GEQ
	uint8(INST_EQ),          // EQUAL
	uint8(INST_NEQ),         // NEQ
	uint8(0),                // AND
	uint8(0),                // OR
	uint8(INST_STR_EQ),      // STREQ
	uint8(INST_STR_NEQ),     // STRNEQ
	uint8(INST_EXPON),       // EXPON
	uint8(INST_LIST_IN),     // IN_LIST
	uint8(INST_LIST_NOT_IN), // NOT_IN_LIST
	uint8(0),                // CLOSE_PAREN
	uint8(0),                // END
	// Expansion room for more binary operators
	uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0),
	// Unary operator lexemes
	uint8(INST_UPLUS),  // UNARY_PLUS
	uint8(INST_UMINUS), // UNARY_MINUS
	uint8(0),           // FUNCTION
	uint8(0),           // START
	uint8(0),           // OPEN_PAREN
	uint8(INST_LNOT),   // NOT
	uint8(INST_BITNOT), // BIT_NOT
} /* tclCompExpr.c:383:28 */

// A table mapping a byte value to the corresponding lexeme for use by
// ParseLexeme().

var sLexeme = [128]uint8{
	uint8(INVALID) /* NUL */, uint8(INVALID), /* SOH */
	uint8(INVALID) /* STX */, uint8(INVALID), /* ETX */
	uint8(INVALID) /* EOT */, uint8(INVALID), /* ENQ */
	uint8(INVALID) /* ACK */, uint8(INVALID), /* BEL */
	uint8(INVALID) /* BS */, uint8(INVALID), /* HT */
	uint8(INVALID) /* LF */, uint8(INVALID), /* VT */
	uint8(INVALID) /* FF */, uint8(INVALID), /* CR */
	uint8(INVALID) /* SO */, uint8(INVALID), /* SI */
	uint8(INVALID) /* DLE */, uint8(INVALID), /* DC1 */
	uint8(INVALID) /* DC2 */, uint8(INVALID), /* DC3 */
	uint8(INVALID) /* DC4 */, uint8(INVALID), /* NAK */
	uint8(INVALID) /* SYN */, uint8(INVALID), /* ETB */
	uint8(INVALID) /* CAN */, uint8(INVALID), /* EM */
	uint8(INVALID) /* SUB */, uint8(INVALID), /* ESC */
	uint8(INVALID) /* FS */, uint8(INVALID), /* GS */
	uint8(INVALID) /* RS */, uint8(INVALID), /* US */
	uint8(INVALID) /* SPACE */, uint8(0), /* ! or != */
	uint8(LEAF | 6), uint8(INVALID), /* # */
	uint8(LEAF | 5), uint8(BINARY | 6),
	uint8(0) /* & or && */, uint8(INVALID), /* ' */
	uint8(UNARY | 5), uint8(BINARY | 27),
	uint8(0) /* * or ** */, uint8(PLUS), /* + */
	uint8(BINARY | 3), uint8(MINUS), /* - */
	uint8(0) /* . */, uint8(BINARY | 5),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0-9
	uint8(BINARY | 13), uint8(INVALID), /* ; */
	uint8(0),                           /* < or << or <= */
	uint8(0),                           /* == or INVALID */
	uint8(0),                           /* > or >> or >= */
	uint8(BINARY | 12), uint8(INVALID), /* @ */
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // A-M
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // N-Z
	uint8(LEAF | 2), uint8(INVALID), /* \ */
	uint8(INVALID) /* ] */, uint8(BINARY | 10),
	uint8(INVALID) /* _ */, uint8(INVALID), /* ` */
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // a-m
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // n-z
	uint8(LEAF | 4), uint8(0), /* | or || */
	uint8(INVALID) /* } */, uint8(UNARY | 7),
	uint8(INVALID), // DEL
} /* tclCompExpr.c:439:28 */

// The JumpList struct is used to create a stack of data needed for the
// TclEmitForwardJump() and TclFixupForwardJump() calls that are performed
// when compiling the short-circuiting operators QUESTION/COLON, AND, and OR.
// Keeping a stack permits the CompileExprTree() routine to be non-recursive.

type JumpList1 = struct {
	Fjump JumpFixup
	Fnext uintptr
} /* tclCompExpr.c:489:9 */

// The JumpList struct is used to create a stack of data needed for the
// TclEmitForwardJump() and TclFixupForwardJump() calls that are performed
// when compiling the short-circuiting operators QUESTION/COLON, AND, and OR.
// Keeping a stack permits the CompileExprTree() routine to be non-recursive.

type JumpList = JumpList1 /* tclCompExpr.c:494:3 */

//----------------------------------------------------------------------
//
// ParseExpr --
//
//	Given a string, the numBytes bytes starting at start, this function
//	parses it as a Tcl expression and constructs a tree representing the
//	structure of the expression. The caller must pass in empty lists as
//	the funcList and litList arguments. The elements of the parsed
//	expression are returned to the caller as that tree, a list of literal
//	values, a list of function names, and in Tcl_Tokens added to a
//	Tcl_Parse struct passed in by the caller.
//
// Results:
//	If the string is successfully parsed as a valid Tcl expression, TCL_OK
//	is returned, and data about the expression structure is written to the
//	last four arguments. If the string cannot be parsed as a valid Tcl
//	expression, TCL_ERROR is returned, and if interp is non-NULL, an error
//	message is written to interp.
//
// Side effects:
//	Memory will be allocated. If TCL_OK is returned, the caller must clean
//	up the returned data structures. The (OpNode *) value written to
//	opTreePtr should be passed to ckfree() and the parsePtr argument
//	should be passed to Tcl_FreeParse(). The elements appended to the
//	litList and funcList will automatically be freed whenever the refcount
//	on those lists indicates they can be freed.
//
//----------------------------------------------------------------------

func sParseExpr(tls *libc.TLS, interp uintptr, start uintptr, numBytes int32, opTreePtr uintptr, litList uintptr, funcList uintptr, parsePtr uintptr, parseOnly int32) int32 { /* tclCompExpr.c:548:1: */
	bp := tls.Alloc(384)
	defer tls.Free(384)

	var nodes uintptr // Pointer to the OpNode storage array where
	// we build the parse tree.
	var nodesAvailable uint32 // Initial size of the storage array. This
	// value establishes a minimum tree memory
	// cost of only about 1 kibyte, and is large
	// enough for most expressions to parse with
	// no need for array growth and
	// reallocation.
	var nodesUsed uint32 // Number of OpNodes filled.
	var scanned int32    // Capture number of byte scanned by parsing
	// routines.
	var lastParsed int32 // Stores info about what the lexeme parsed
	// the previous pass through the parsing loop
	// was. If it was an operator, lastParsed is
	// the index of the OpNode for that operator.
	// If it was not an operator, lastParsed holds
	// an OperandTypes value encoding what we need
	// to know about it.
	var incomplete int32 // Index of the most recent incomplete tree in
	// the OpNode array. Heads a stack of
	// incomplete trees linked by p.prev.
	var complete int32 // "Index" of the complete tree (that is, a
	// complete subexpression) determined at the
	// moment. OT_EMPTY is a nonsense value used
	// only to silence compiler warnings. During a
	// parse, complete will always hold an index
	// or an OperandTypes value pointing to an
	// actual leaf at the time the complete tree
	// is needed.

	// These variables control generation of the error message.

	var msg uintptr  // The error message.
	var post uintptr // In a few cases, an additional postscript
	// for the error message, supplying more
	// information after the error msg and
	// location have been reported.
	var errCode uintptr // The detail word of the errorCode list, or
	// NULL to indicate that no changes to the
	// errorCode are to be done.
	var subErrCode uintptr
	// Extra information for use in generating the
	// errorCode.
	var mark uintptr // In the portion of the complete error
	// message where the error location is
	// reported, this "mark" substring is inserted
	// into the string being parsed to aid in
	// pinpointing the location of the syntax
	// error in the expression.
	var insertMark int32 // A boolean controlling whether the "mark"
	// should be inserted.
	var limit int32
	var size uint32
	var newPtr uintptr
	var _objPtr uintptr
	// var stop uintptr at bp+368, 8

	// var b int32 at bp+360, 4

	var _objPtr1 uintptr
	var allocated int32
	var oldPtr uintptr
	var newPtr1 uintptr
	var _needed int32
	var nestedPtr uintptr
	var _objPtr2 uintptr
	// Each LEAF results in either a literal getting appended to the
	// litList, or a sequence of Tcl_Tokens representing a Tcl word
	// getting appended to the parsePtr->tokens. No OpNode is filled
	// for this lexeme.

	var tokenPtr uintptr
	// var end uintptr at bp+376, 8

	var wordIndex int32
	var code int32
	var incompletePtr uintptr
	var precedence uint8
	var nodePtr uintptr // Points to the OpNode we may fill this pass
	// through the loop.
	// var lexeme uint8 at bp+344, 1
	// The lexeme we parse this iteration.
	// var literal uintptr at bp+352, 8

	var _objPtr3 uintptr
	var _objPtr4 uintptr
	nodes = uintptr(0)
	nodesAvailable = uint32(64)
	nodesUsed = uint32(0)
	scanned = 0
	complete = OT_EMPTY
	msg = uintptr(0)
	post = uintptr(0)
	errCode = uintptr(0)
	subErrCode = uintptr(0)
	mark = ts + 19925 /* "_@_" */
	insertMark = 0
	limit = 25 // Portions of the error message are
	// constructed out of substrings of the
	// original expression. In order to keep the
	// error message readable, we impose this
	// limit on the substring size we extract.

	XTclParseInit(tls, interp, start, numBytes, parsePtr)

	nodes = XTclpAlloc(tls, uint32(uint64(nodesAvailable)*uint64(unsafe.Sizeof(OpNode{}))))
	if !(nodes == uintptr(0)) {
		goto __1
	}
__2:
	;
__5:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __8
	}
	XTclAllocateFreeObjects(tls)
__8:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __6
__6:
	if 0 != 0 {
		goto __5
	}
	goto __7
__7:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([38]int8{}))-uint64(1)) == 0) {
		goto __9
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __10
__9:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([38]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+19929, uint64(int32(uint64(unsafe.Sizeof([38]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 37)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([38]int8{})) - uint64(1))
__10:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __3
__3:
	if 0 != 0 {
		goto __2
	}
	goto __4
__4:
	;
	errCode = ts + 19967 /* "NOMEM" */
	goto error
__1:
	;

	// Initialize the parse tree with the special "START" node.

	(*OpNode)(unsafe.Pointer(nodes)).Flexeme = uint8(UNARY | 4)
	(*OpNode)(unsafe.Pointer(nodes)).Fprecedence = prec[UNARY|4]
	(*OpNode)(unsafe.Pointer(nodes)).Fmark = MARK_RIGHT
	(*OpNode)(unsafe.Pointer(nodes)).Fconstant = uint8(1)
	incomplete = libc.AssignInt32(&lastParsed, int32(nodesUsed))
	nodesUsed++

	// Main parsing loop parses one lexeme per iteration. We exit the loop
	// only when there's a syntax error with a "goto error" which takes us to
	// the error handling code following the loop, or when we've successfully
	// completed the parse and we return to the caller.

__11:
	if !(1 != 0) {
		goto __12
	} // Filled by the ParseLexeme() call when a
	// literal is parsed that has a Tcl_Obj rep
	// worth preserving.

	// Each pass through this loop adds up to one more OpNode. Allocate
	// space for one if required.

	if !(nodesUsed >= nodesAvailable) {
		goto __13
	}
	size = nodesUsed * uint32(2)
	newPtr = uintptr(0)

__14:
	if !(uint64(size) <= uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(OpNode{}))) {
		goto __17
	}
	newPtr = XTclpRealloc(tls, nodes, uint32(uint64(size)*uint64(unsafe.Sizeof(OpNode{}))))
__17:
	;
	goto __15
__15:
	if newPtr == uintptr(0) &&
		libc.AssignSubUint32(&size, (size-nodesUsed)/uint32(2)) > nodesUsed {
		goto __14
	}
	goto __16
__16:
	;
	if !(newPtr == uintptr(0)) {
		goto __18
	}
__19:
	;
__22:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __25
	}
	XTclAllocateFreeObjects(tls)
__25:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __23
__23:
	if 0 != 0 {
		goto __22
	}
	goto __24
__24:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([38]int8{}))-uint64(1)) == 0) {
		goto __26
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __27
__26:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([38]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+19929, uint64(int32(uint64(unsafe.Sizeof([38]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 37)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([38]int8{})) - uint64(1))
__27:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
	errCode = ts + 19967 /* "NOMEM" */
	goto error
__18:
	;
	nodesAvailable = size
	nodes = newPtr
__13:
	;
	nodePtr = nodes + uintptr(nodesUsed)*16

	// Skip white space between lexemes.

	scanned = XTclParseAllWhiteSpace(tls, start, numBytes)
	start += uintptr(scanned)
	numBytes = numBytes - scanned

	scanned = sParseLexeme(tls, start, numBytes, bp+344, bp+352)

	// Use context to categorize the lexemes that are ambiguous.

	if !(NODE_TYPE&int32(*(*uint8)(unsafe.Pointer(bp + 344))) == 0) {
		goto __28
	}

	switch int32(*(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */))) {
	case INVALID:
		goto __30
	case INCOMPLETE:
		goto __31
	case BAREWORD:
		goto __32
	case PLUS:
		goto __33
	case MINUS:
		goto __34
	}
	goto __29
__30:
	msg = XTcl_ObjPrintf(tls, ts+19973,
		libc.VaList(bp, scanned, start))
	errCode = ts + 19998 /* "BADCHAR" */
	goto error
__31:
	msg = XTcl_ObjPrintf(tls, ts+20006,
		libc.VaList(bp+16, scanned, start))
	errCode = ts + 20033 /* "PARTOP" */
	goto error
__32:

	// Most barewords in an expression are a syntax error. The
	// exceptions are that when a bareword is followed by an open
	// paren, it might be a function call, and when the bareword
	// is a legal literal boolean value, we accept that as well.

	if !(int32(*(*int8)(unsafe.Pointer(start + uintptr(scanned+XTclParseAllWhiteSpace(tls,
		start+uintptr(scanned), numBytes-scanned))))) == '(') {
		goto __35
	}
	*(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */)) = uint8(UNARY | BAREWORD)

	// When we compile the expression we'll need the function
	// name, and there's no place in the parse tree to store
	// it, so we keep a separate list of all the function
	// names we've parsed in the order we found them.

	XTcl_ListObjAppendElement(tls, uintptr(0), funcList, *(*uintptr)(unsafe.Pointer(bp + 352 /* literal */)))
	goto __36
__35:
	if !(XTcl_GetBooleanFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 352)), bp+360) == TCL_OK) {
		goto __37
	}
	*(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */)) = uint8(LEAF | BAREWORD)
	goto __38
__37:
__39:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp + 352))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __42
	}
	XTclFreeObj(tls, _objPtr)
__42:
	;
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
	msg = XTcl_ObjPrintf(tls, ts+20040,
		libc.VaList(bp+32, func() int32 {
			if scanned < limit {
				return scanned
			}
			return limit - 3
		}(), start,
			func() uintptr {
				if scanned < limit {
					return ts + 2631 /* "" */
				}
				return ts + 8420 /* "..." */
			}()))
	post = XTcl_ObjPrintf(tls,
		ts+20066,
		libc.VaList(bp+56, func() int32 {
			if scanned < limit {
				return scanned
			}
			return limit - 3
		}(),
			start, func() uintptr {
				if scanned < limit {
					return ts + 2631 /* "" */
				}
				return ts + 8420 /* "..." */
			}(),
			func() int32 {
				if scanned < limit {
					return scanned
				}
				return limit - 3
			}(),
			start, func() uintptr {
				if scanned < limit {
					return ts + 2631 /* "" */
				}
				return ts + 8420 /* "..." */
			}()))
	XTcl_AppendPrintfToObj(tls, post, ts+20100,
		libc.VaList(bp+104, func() int32 {
			if scanned < limit {
				return scanned
			}
			return limit - 3
		}(),
			start, func() uintptr {
				if scanned < limit {
					return ts + 2631 /* "" */
				}
				return ts + 8420 /* "..." */
			}()))
	errCode = ts + 20125 /* "BAREWORD" */
	if !(int32(*(*int8)(unsafe.Pointer(start))) == '0') {
		goto __43
	}
	XTclParseNumber(tls, uintptr(0), uintptr(0), uintptr(0), start, scanned,
		bp+368, TCL_PARSE_NO_WHITESPACE)

	if !(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 368))))))) != 0 || *(*uintptr)(unsafe.Pointer(bp + 368)) == start+uintptr(1)) {
		goto __44
	}
	switch int32(*(*int8)(unsafe.Pointer(start + 1))) {
	case 'b':
		goto __46
	case 'o':
		goto __47
	default:
		goto __48
	}
	goto __45
__46:
	XTcl_AppendToObj(tls, post,
		ts+20134, -1)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_BAD_NUMBER
	errCode = ts + 20160    /* "BADNUMBER" */
	subErrCode = ts + 10526 /* "BINARY" */
	goto __45
__47:
	XTcl_AppendToObj(tls, post,
		ts+20170, -1)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_BAD_NUMBER
	errCode = ts + 20160    /* "BADNUMBER" */
	subErrCode = ts + 20195 /* "OCTAL" */
	goto __45
__48:
	if !(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(start + 1))))) != 0) {
		goto __49
	}
	XTcl_AppendToObj(tls, post,
		ts+20170, -1)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_BAD_NUMBER
	errCode = ts + 20160    /* "BADNUMBER" */
	subErrCode = ts + 20195 /* "OCTAL" */
__49:
	;
	goto __45
__45:
	;
__44:
	;
__43:
	;
	goto error
__38:
	;
__36:
	;
	goto __29
__33:
__34:
	if !(lastParsed >= 0) {
		goto __50
	}
	// A "+" or "-" coming just after another operator must be
	// interpreted as a unary operator.

	*(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */)) |= uint8(UNARY)
	goto __51
__50:
	*(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */)) |= uint8(BINARY)
__51:
	;
__29:
	;
__28:
	; // Uncategorized lexemes

	// Handle lexeme based on its category.

	switch NODE_TYPE & int32(*(*uint8)(unsafe.Pointer(bp + 344))) {
	case LEAF:
		goto __53 // case LEAF

	case UNARY:
		goto __54

	case BINARY:
		goto __55
	}
	goto __52
__53:
	*(*uintptr)(unsafe.Pointer(bp + 376 /* end */)) = start
	code = TCL_OK

	// A leaf operand appearing just after something that's not an
	// operator is a syntax error.

	if !(lastParsed < 0) {
		goto __56
	}
	msg = XTcl_ObjPrintf(tls, ts+20201, libc.VaList(bp+128, mark))
	errCode = ts + 15191 /* "MISSING" */
	scanned = 0
	insertMark = 1

	// Free any literal to avoid a memleak.

	if !(int32(*(*uint8)(unsafe.Pointer(bp + 344))) == LEAF|1 || int32(*(*uint8)(unsafe.Pointer(bp + 344))) == LEAF|BAREWORD) {
		goto __57
	}
__58:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp + 352))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __61
	}
	XTclFreeObj(tls, _objPtr1)
__61:
	;
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
__57:
	;
	goto error
__56:
	;

	switch int32(*(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */))) {
	case LEAF | 1:
		goto __63
	case LEAF | BAREWORD:
		goto __64

	default:
		goto __65
	}
	goto __62
__63:
__64:
	// TODO: Consider using a dict or hash to collapse all
	// duplicate literals into a single representative value.
	// (Like what is done with [split $s {}]).
	// Pro:	~75% memory saving on expressions like
	//	{1+1+1+1+1+.....+1} (Convert "pointer + Tcl_Obj" cost
	//	to "pointer" cost only)
	// Con:	Cost of the dict store/retrieve on every literal in
	//	every expression when expressions like the above tend
	//	to be uncommon.
	//	The memory savings is temporary; Compiling to bytecode
	//	will collapse things as literals are registered
	//	anyway, so the savings applies only to the time
	//	between parsing and compiling. Possibly important due
	//	to high-water mark nature of memory allocation.

	XTcl_ListObjAppendElement(tls, uintptr(0), litList, *(*uintptr)(unsafe.Pointer(bp + 352 /* literal */)))
	complete = libc.AssignInt32(&lastParsed, OT_LITERAL)
	start += uintptr(scanned)
	numBytes = numBytes - scanned
	goto __11

__65:
	goto __62
__62:
	;

	// Remaining LEAF cases may involve filling Tcl_Tokens, so make
	// room for at least 2 more tokens.

__66:
	_needed = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 2
	if !(_needed > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __69
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp+136, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__69:
	;
	if !(_needed > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __70
	}
	allocated = 2 * _needed
	oldPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr == parsePtr+96) {
		goto __71
	}
	oldPtr = uintptr(0)
__71:
	;
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __72
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__72:
	;
	newPtr1 = XTclpRealloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr1 == uintptr(0)) {
		goto __73
	}
	allocated = int32(uint64(_needed+2) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __74
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__74:
	;
	newPtr1 = XTcl_Realloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__73:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated
	if !(oldPtr == uintptr(0)) {
		goto __75
	}
	libc.Xmemcpy(tls, newPtr1, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__75:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr1
__70:
	;
	goto __67
__67:
	if 0 != 0 {
		goto __66
	}
	goto __68
__68:
	;
	wordIndex = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(wordIndex)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_WORD
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = start
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++

	switch int32(*(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */))) {
	case LEAF | 6:
		goto __77

	case LEAF | 4:
		goto __78

	case LEAF | 5:
		goto __79

	case LEAF | 2:
		goto __80
	}
	goto __76
__77:
	code = XTcl_ParseQuotedString(tls, uintptr(0), start, numBytes,
		parsePtr, 1, bp+376)
	scanned = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 376))) - int64(start)) / 1)
	goto __76

__78:
	code = XTcl_ParseBraces(tls, uintptr(0), start, numBytes,
		parsePtr, 1, bp+376)
	scanned = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 376))) - int64(start)) / 1)
	goto __76

__79:
	code = XTcl_ParseVarName(tls, uintptr(0), start, numBytes, parsePtr, 1)

	// Handle the quirk that Tcl_ParseVarName reports a successful
	// parse even when it gets only a "$" with no variable name.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(wordIndex)*24 + uintptr(1)*24
	if !(code == TCL_OK && (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_VARIABLE) {
		goto __81
	}
__82:
	;
__85:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __88
	}
	XTclAllocateFreeObjects(tls)
__88:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __86
__86:
	if 0 != 0 {
		goto __85
	}
	goto __87
__87:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1)) == 0) {
		goto __89
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __90
__89:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20270, uint64(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 21)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([22]int8{})) - uint64(1))
__90:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __83
__83:
	if 0 != 0 {
		goto __82
	}
	goto __84
__84:
	;
	errCode = ts + 19998 /* "BADCHAR" */
	goto error
__81:
	;
	scanned = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize
	goto __76

__80:
	nestedPtr =
		XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_Parse{})))

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_COMMAND
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = start
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0

	*(*uintptr)(unsafe.Pointer(bp + 376 /* end */)) = start + uintptr(numBytes)
	start++
__91:
	if !(1 != 0) {
		goto __92
	}
	code = XTcl_ParseCommand(tls, interp, start, int32((int64(*(*uintptr)(unsafe.Pointer(bp + 376)))-int64(start))/1), 1,
		nestedPtr)
	if !(code != TCL_OK) {
		goto __93
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).FerrorType
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fincomplete
	goto __92
__93:
	;
	start = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).FcommandStart + uintptr((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).FcommandSize)
	XTcl_FreeParse(tls, nestedPtr)
	if !((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm < *(*uintptr)(unsafe.Pointer(bp + 376)) && int32(*(*int8)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm))) == ']' &&
		!((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fincomplete != 0)) {
		goto __94
	}
	goto __92
__94:
	;

	if !(start == *(*uintptr)(unsafe.Pointer(bp + 376))) {
		goto __95
	}
__96:
	;
__99:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __102
	}
	XTclAllocateFreeObjects(tls)
__102:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __100
__100:
	if 0 != 0 {
		goto __99
	}
	goto __101
__101:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1)) == 0) {
		goto __103
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __104
__103:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20292, uint64(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 21)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([22]int8{})) - uint64(1))
__104:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __97
__97:
	if 0 != 0 {
		goto __96
	}
	goto __98
__98:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_MISSING_BRACKET
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 1
	code = TCL_ERROR
	errCode = ts + 16847 /* "UNBALANCED" */
	goto __92
__95:
	;
	goto __91
__92:
	;
	XTclStackFree(tls, interp, nestedPtr)
	*(*uintptr)(unsafe.Pointer(bp + 376 /* end */)) = start
	start = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart
	scanned = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 376))) - int64(start)) / 1)
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = scanned
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	goto __76
	// SCRIPT case
__76:
	;
	if !(code != TCL_OK) {
		goto __105
	}
	// Here we handle all the syntax errors generated by the
	// Tcl_Token generating parsing routines called in the switch
	// just above. If the value of parsePtr->incomplete is 1, then
	// the error was an unbalanced '[', '(', '{', or '"' and
	// parsePtr->term is pointing to that unbalanced character. If
	// the value of parsePtr->incomplete is 0, then the error is
	// one of lacking whitespace following a quoted word, for
	// example: expr {[an error {foo}bar]}, and parsePtr->term
	// points to where the whitespace is missing. We reset our
	// values of start and scanned so that when our error message
	// is constructed, the location of the syntax error is sure to
	// appear in it, even if the quoted expression is truncated.

	start = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm
	scanned = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete != 0) {
		goto __106
	}
	errCode = ts + 16847 /* "UNBALANCED" */
__106:
	;
	goto error
__105:
	;

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(wordIndex)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = scanned
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens - wordIndex - 1
	if !(!(parseOnly != 0) && (int32(*(*uint8)(unsafe.Pointer(bp + 344))) == LEAF|6 || int32(*(*uint8)(unsafe.Pointer(bp + 344))) == LEAF|4)) {
		goto __107
	}
	// When this expression is destined to be compiled, and a
	// braced or quoted word within an expression is known at
	// compile time (no runtime substitutions in it), we can store
	// it as a literal rather than in its tokenized form. This is
	// an advantage since the compiled bytecode is going to need
	// the argument in Tcl_Obj form eventually, so it's just as
	// well to get there now. Another advantage is that with this
	// conversion, larger constant expressions might be grown and
	// optimized.
	//
	// On the contrary, if the end goal of this parse is to fill a
	// Tcl_Parse for a caller of Tcl_ParseExpr(), then it's
	// wasteful to convert to a literal only to convert back again
	// later.

	*(*uintptr)(unsafe.Pointer(bp + 352 /* literal */)) = XTcl_NewObj(tls)
	if !(XTclWordKnownAtCompileTime(tls, tokenPtr, *(*uintptr)(unsafe.Pointer(bp + 352))) != 0) {
		goto __108
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), litList, *(*uintptr)(unsafe.Pointer(bp + 352 /* literal */)))
	complete = libc.AssignInt32(&lastParsed, OT_LITERAL)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens = wordIndex
	goto __52
__108:
	;
__109:
	_objPtr2 = *(*uintptr)(unsafe.Pointer(bp + 352))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __112
	}
	XTclFreeObj(tls, _objPtr2)
__112:
	;
	goto __110
__110:
	if 0 != 0 {
		goto __109
	}
	goto __111
__111:
	;
__107:
	;
	complete = libc.AssignInt32(&lastParsed, OT_TOKENS)
	goto __52
	// case LEAF

__54:

	// A unary operator appearing just after something that's not an
	// operator is a syntax error -- something trying to be the left
	// operand of an operator that doesn't take one.

	if !(lastParsed < 0) {
		goto __113
	}
	msg = XTcl_ObjPrintf(tls, ts+20201, libc.VaList(bp+144, mark))
	scanned = 0
	insertMark = 1
	errCode = ts + 15191 /* "MISSING" */
	goto error
__113:
	;

	// Create an OpNode for the unary operator.

	(*OpNode)(unsafe.Pointer(nodePtr)).Flexeme = *(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */))
	(*OpNode)(unsafe.Pointer(nodePtr)).Fprecedence = prec[*(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */))]
	(*OpNode)(unsafe.Pointer(nodePtr)).Fmark = MARK_RIGHT

	// A FUNCTION cannot be a constant expression, because Tcl allows
	// functions to return variable results with the same arguments;
	// for example, rand(). Other unary operators can root a constant
	// expression, so long as the argument is a constant expression.

	(*OpNode)(unsafe.Pointer(nodePtr)).Fconstant = uint8(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(bp + 344))) != UNARY|BAREWORD))

	// This unary operator is a new incomplete tree, so push it onto
	// our stack of incomplete trees. Also remember it as the last
	// lexeme we parsed.

	*(*int32)(unsafe.Pointer(nodePtr + 8)) = incomplete
	incomplete = libc.AssignInt32(&lastParsed, int32(nodesUsed))
	nodesUsed++
	goto __52

__55:
	precedence = prec[*(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */))]

	// A binary operator appearing just after another operator is a
	// syntax error -- one of the two operators is missing an operand.

	if !(lastParsed >= 0) {
		goto __114
	}
	if !(int32(*(*uint8)(unsafe.Pointer(bp + 344))) == BINARY|27 &&
		int32((*OpNode)(unsafe.Pointer(nodePtr+libc.UintptrFromInt32(-1)*16)).Flexeme) == UNARY|5) {
		goto __115
	}
	if !(int32((*OpNode)(unsafe.Pointer(nodePtr+libc.UintptrFromInt32(-2)*16)).Flexeme) == UNARY|BAREWORD) {
		goto __116
	}
	// Normally, "()" is a syntax error, but as a special
	// case accept it as an argument list for a function.
	// Treat this as a special LEAF lexeme, and restart
	// the parsing loop with zero characters scanned. We
	// will parse the ")" again the next time through, but
	// with the OT_EMPTY leaf as the subexpression between
	// the parens.

	scanned = 0
	complete = libc.AssignInt32(&lastParsed, OT_EMPTY)
	goto __52
__116:
	;
	msg = XTcl_ObjPrintf(tls, ts+20314, libc.VaList(bp+152, mark))
	scanned = 0
	insertMark = 1
	errCode = ts + 20340 /* "EMPTY" */
	goto error
__115:
	;

	if !(int32((*OpNode)(unsafe.Pointer(nodePtr+libc.UintptrFromInt32(-1)*16)).Fprecedence) > int32(precedence)) {
		goto __117
	}
	if !(int32((*OpNode)(unsafe.Pointer(nodePtr+libc.UintptrFromInt32(-1)*16)).Flexeme) == UNARY|5) {
		goto __119
	}
__121:
	;
__124:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __127
	}
	XTclAllocateFreeObjects(tls)
__127:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __125
__125:
	if 0 != 0 {
		goto __124
	}
	goto __126
__126:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1)) == 0) {
		goto __128
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __129
__128:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20346, uint64(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 21)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([22]int8{})) - uint64(1))
__129:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __122
__122:
	if 0 != 0 {
		goto __121
	}
	goto __123
__123:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_MISSING_PAREN
	errCode = ts + 16847 /* "UNBALANCED" */
	goto __120
__119:
	if !(int32((*OpNode)(unsafe.Pointer(nodePtr+libc.UintptrFromInt32(-1)*16)).Flexeme) == BINARY|3) {
		goto __130
	}
	msg = XTcl_ObjPrintf(tls,
		ts+20368, libc.VaList(bp+160, mark))
	scanned = 0
	insertMark = 1
	errCode = ts + 15191 /* "MISSING" */
	goto __131
__130:
	if !(int32((*OpNode)(unsafe.Pointer(nodePtr+libc.UintptrFromInt32(-1)*16)).Flexeme) == UNARY|4) {
		goto __132
	}
__133:
	;
__136:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __139
	}
	XTclAllocateFreeObjects(tls)
__139:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __137
__137:
	if 0 != 0 {
		goto __136
	}
	goto __138
__138:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([17]int8{}))-uint64(1)) == 0) {
		goto __140
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __141
__140:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([17]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20400, uint64(int32(uint64(unsafe.Sizeof([17]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 16)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([17]int8{})) - uint64(1))
__141:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __134
__134:
	if 0 != 0 {
		goto __133
	}
	goto __135
__135:
	;
	errCode = ts + 20340 /* "EMPTY" */
__132:
	;
__131:
	;
__120:
	;
	goto __118
__117:
	if !(int32(*(*uint8)(unsafe.Pointer(bp + 344))) == BINARY|27) {
		goto __142
	}
__144:
	;
__147:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __150
	}
	XTclAllocateFreeObjects(tls)
__150:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __148
__148:
	if 0 != 0 {
		goto __147
	}
	goto __149
__149:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1)) == 0) {
		goto __151
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __152
__151:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20417, uint64(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 22)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([23]int8{})) - uint64(1))
__152:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __145
__145:
	if 0 != 0 {
		goto __144
	}
	goto __146
__146:
	;
	errCode = ts + 16847 /* "UNBALANCED" */
	goto __143
__142:
	if !(int32(*(*uint8)(unsafe.Pointer(bp + 344))) == BINARY|3 &&
		int32((*OpNode)(unsafe.Pointer(nodePtr+libc.UintptrFromInt32(-1)*16)).Flexeme) == UNARY|5 &&
		int32((*OpNode)(unsafe.Pointer(nodePtr+libc.UintptrFromInt32(-2)*16)).Flexeme) == UNARY|BAREWORD) {
		goto __153
	}
	msg = XTcl_ObjPrintf(tls, ts+20368,
		libc.VaList(bp+168, mark))
	scanned = 0
	insertMark = 1
	errCode = ts + 16847 /* "UNBALANCED" */
__153:
	;
__143:
	;
__118:
	;
	if !(msg == uintptr(0)) {
		goto __154
	}
	msg = XTcl_ObjPrintf(tls, ts+20440, libc.VaList(bp+176, mark))
	scanned = 0
	insertMark = 1
	errCode = ts + 15191 /* "MISSING" */
__154:
	;
	goto error
__114:
	;

	// Here is where the tree comes together. At this point, we have a
	// stack of incomplete trees corresponding to substrings that are
	// incomplete expressions, followed by a complete tree
	// corresponding to a substring that is itself a complete
	// expression, followed by the binary operator we have just
	// parsed. The incomplete trees can each be completed by adding a
	// right operand.
	//
	// To illustrate with an example, when we parse the expression
	// "1+2*3-4" and we reach this point having just parsed the "-"
	// operator, we have these incomplete trees: START, "1+", and
	// "2*". Next we have the complete subexpression "3". Last is the
	// "-" we've just parsed.
	//
	// The next step is to join our complete tree to an operator. The
	// choice is governed by the precedence and associativity of the
	// competing operators. If we connect it as the right operand of
	// our most recent incomplete tree, we get a new complete tree,
	// and we can repeat the process. The while loop following repeats
	// this until precedence indicates it is time to join the complete
	// tree as the left operand of the just parsed binary operator.
	//
	// Continuing the example, the first pass through the loop will
	// join "3" to "2*"; the next pass will join "2*3" to "1+". Then
	// we'll exit the loop and join "1+2*3" to "-". When we return to
	// parse another lexeme, our stack of incomplete trees is START
	// and "1+2*3-".

__155:
	if !(1 != 0) {
		goto __156
	}
	incompletePtr = nodes + uintptr(incomplete)*16

	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Fprecedence) < int32(precedence)) {
		goto __157
	}
	goto __156
__157:
	;

	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Fprecedence) == int32(precedence)) {
		goto __158
	}
	// Right association rules for exponentiation.

	if !(int32(*(*uint8)(unsafe.Pointer(bp + 344))) == BINARY|24) {
		goto __159
	}
	goto __156
__159:
	;

	// Special association rules for the conditional
	// operators. The "?" and ":" operators have equal
	// precedence, but must be linked up in sensible pairs.

	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) == BINARY|12 &&
		(complete < 0 ||
			int32((*OpNode)(unsafe.Pointer(nodes+uintptr(complete)*16)).Flexeme) != BINARY|13)) {
		goto __160
	}
	goto __156
__160:
	;
	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) == BINARY|13 &&
		int32(*(*uint8)(unsafe.Pointer(bp + 344))) == BINARY|12) {
		goto __161
	}
	goto __156
__161:
	;
__158:
	;

	// Some special syntax checks...

	// Parens must balance
	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) == UNARY|5 &&
		int32(*(*uint8)(unsafe.Pointer(bp + 344))) != BINARY|27) {
		goto __162
	}
__163:
	;
__166:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __169
	}
	XTclAllocateFreeObjects(tls)
__169:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __167
__167:
	if 0 != 0 {
		goto __166
	}
	goto __168
__168:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1)) == 0) {
		goto __170
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __171
__170:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20346, uint64(int32(uint64(unsafe.Sizeof([22]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 21)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([22]int8{})) - uint64(1))
__171:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __164
__164:
	if 0 != 0 {
		goto __163
	}
	goto __165
__165:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_MISSING_PAREN
	errCode = ts + 16847 /* "UNBALANCED" */
	goto error
__162:
	;

	// Right operand of "?" must be ":"
	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) == BINARY|12 &&
		(complete < 0 ||
			int32((*OpNode)(unsafe.Pointer(nodes+uintptr(complete)*16)).Flexeme) != BINARY|13)) {
		goto __172
	}
	msg = XTcl_ObjPrintf(tls, ts+20462, libc.VaList(bp+184, mark))
	scanned = 0
	insertMark = 1
	errCode = ts + 15191 /* "MISSING" */
	goto error
__172:
	;

	// Operator ":" may only be right operand of "?"
	if !(complete >= 0 &&
		int32((*OpNode)(unsafe.Pointer(nodes+uintptr(complete)*16)).Flexeme) == BINARY|13 &&
		int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) != BINARY|12) {
		goto __173
	}
__174:
	;
__177:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __180
	}
	XTclAllocateFreeObjects(tls)
__180:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __178
__178:
	if 0 != 0 {
		goto __177
	}
	goto __179
__179:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1)) == 0) {
		goto __181
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __182
__181:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20489, uint64(int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 45)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([46]int8{})) - uint64(1))
__182:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __175
__175:
	if 0 != 0 {
		goto __174
	}
	goto __176
__176:
	;
	errCode = ts + 20535 /* "SURPRISE" */
	goto error
__173:
	;

	// Attach complete tree as right operand of most recent
	// incomplete tree.

	(*OpNode)(unsafe.Pointer(incompletePtr)).Fright = complete
	if !(complete >= 0) {
		goto __183
	}
	*(*int32)(unsafe.Pointer(nodes + uintptr(complete)*16 + 8)) = incomplete
	(*OpNode)(unsafe.Pointer(incompletePtr)).Fconstant = uint8(libc.Bool32((*OpNode)(unsafe.Pointer(incompletePtr)).Fconstant != 0 &&
		(*OpNode)(unsafe.Pointer(nodes+uintptr(complete)*16)).Fconstant != 0))
	goto __184
__183:
	(*OpNode)(unsafe.Pointer(incompletePtr)).Fconstant = uint8(libc.Bool32((*OpNode)(unsafe.Pointer(incompletePtr)).Fconstant != 0 &&
		complete == OT_LITERAL))
__184:
	;

	// The QUESTION/COLON and FUNCTION/OPEN_PAREN combinations
	// each make up a single operator. Force them to agree whether
	// they have a constant expression.

	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) == BINARY|12 ||
		int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) == UNARY|BAREWORD) {
		goto __185
	}
	(*OpNode)(unsafe.Pointer(nodes + uintptr(complete)*16)).Fconstant = (*OpNode)(unsafe.Pointer(incompletePtr)).Fconstant
__185:
	;

	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) == UNARY|4) {
		goto __186
	}
	// Completing the START tree indicates we're done.
	// Transfer the parse tree to the caller and return.

	*(*uintptr)(unsafe.Pointer(opTreePtr)) = nodes
	return TCL_OK
__186:
	;

	// With a right operand attached, last incomplete tree has
	// become the complete tree. Pop it from the incomplete tree
	// stack.

	complete = incomplete
	incomplete = *(*int32)(unsafe.Pointer(incompletePtr + 8))

	// CLOSE_PAREN can only close one OPEN_PAREN.
	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) == UNARY|5) {
		goto __187
	}
	goto __156
__187:
	;
	goto __155
__156:
	;

	// More syntax checks...

	// Parens must balance.
	if !(int32(*(*uint8)(unsafe.Pointer(bp + 344))) == BINARY|27) {
		goto __188
	}
	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) != UNARY|5) {
		goto __189
	}
__190:
	;
__193:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __196
	}
	XTclAllocateFreeObjects(tls)
__196:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __194
__194:
	if 0 != 0 {
		goto __193
	}
	goto __195
__195:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1)) == 0) {
		goto __197
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __198
__197:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20417, uint64(int32(uint64(unsafe.Sizeof([23]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 22)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([23]int8{})) - uint64(1))
__198:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __191
__191:
	if 0 != 0 {
		goto __190
	}
	goto __192
__192:
	;
	errCode = ts + 16847 /* "UNBALANCED" */
	goto error
__189:
	;
__188:
	;

	// Commas must appear only in function argument lists.
	if !(int32(*(*uint8)(unsafe.Pointer(bp + 344))) == BINARY|3) {
		goto __199
	}
	if !(int32((*OpNode)(unsafe.Pointer(incompletePtr)).Flexeme) != UNARY|5 ||
		int32((*OpNode)(unsafe.Pointer(incompletePtr+libc.UintptrFromInt32(-1)*16)).Flexeme) != UNARY|BAREWORD) {
		goto __200
	}
__201:
	;
__204:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __207
	}
	XTclAllocateFreeObjects(tls)
__207:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __205
__205:
	if 0 != 0 {
		goto __204
	}
	goto __206
__206:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1)) == 0) {
		goto __208
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __209
__208:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20544, uint64(int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 45)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([46]int8{})) - uint64(1))
__209:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __202
__202:
	if 0 != 0 {
		goto __201
	}
	goto __203
__203:
	;
	errCode = ts + 20535 /* "SURPRISE" */
	goto error
__200:
	;
__199:
	;

	// Operator ":" may only be right operand of "?"
	if !(complete >= 0 && int32((*OpNode)(unsafe.Pointer(nodes+uintptr(complete)*16)).Flexeme) == BINARY|13) {
		goto __210
	}
__211:
	;
__214:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __217
	}
	XTclAllocateFreeObjects(tls)
__217:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __215
__215:
	if 0 != 0 {
		goto __214
	}
	goto __216
__216:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1)) == 0) {
		goto __218
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __219
__218:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+20489, uint64(int32(uint64(unsafe.Sizeof([46]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 45)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([46]int8{})) - uint64(1))
__219:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __212
__212:
	if 0 != 0 {
		goto __211
	}
	goto __213
__213:
	;
	errCode = ts + 20535 /* "SURPRISE" */
	goto error
__210:
	;

	// Create no node for a CLOSE_PAREN lexeme.

	if !(int32(*(*uint8)(unsafe.Pointer(bp + 344))) == BINARY|27) {
		goto __220
	}
	goto __52
__220:
	;

	// Link complete tree as left operand of new node.

	(*OpNode)(unsafe.Pointer(nodePtr)).Flexeme = *(*uint8)(unsafe.Pointer(bp + 344 /* lexeme */))
	(*OpNode)(unsafe.Pointer(nodePtr)).Fprecedence = precedence
	(*OpNode)(unsafe.Pointer(nodePtr)).Fmark = MARK_LEFT
	(*OpNode)(unsafe.Pointer(nodePtr)).Fleft = complete

	// The COMMA operator cannot be optimized, since the function
	// needs all of its arguments, and optimization would reduce the
	// number. Other binary operators root constant expressions when
	// both arguments are constant expressions.

	(*OpNode)(unsafe.Pointer(nodePtr)).Fconstant = uint8(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(bp + 344))) != BINARY|3))

	if !(complete >= 0) {
		goto __221
	}
	*(*int32)(unsafe.Pointer(nodes + uintptr(complete)*16 + 8)) = int32(nodesUsed)
	(*OpNode)(unsafe.Pointer(nodePtr)).Fconstant = uint8(libc.Bool32((*OpNode)(unsafe.Pointer(nodePtr)).Fconstant != 0 &&
		(*OpNode)(unsafe.Pointer(nodes+uintptr(complete)*16)).Fconstant != 0))
	goto __222
__221:
	(*OpNode)(unsafe.Pointer(nodePtr)).Fconstant = uint8(libc.Bool32((*OpNode)(unsafe.Pointer(nodePtr)).Fconstant != 0 &&
		complete == OT_LITERAL))
__222:
	;

	// With a left operand attached and a right operand missing, the
	// just-parsed binary operator is root of a new incomplete tree.
	// Push it onto the stack of incomplete trees.

	*(*int32)(unsafe.Pointer(nodePtr + 8)) = incomplete
	incomplete = libc.AssignInt32(&lastParsed, int32(nodesUsed))
	nodesUsed++
	goto __52
	// case BINARY
__52:
	; // lexeme handler

	// Advance past the just-parsed lexeme
	start += uintptr(scanned)
	numBytes = numBytes - scanned
	goto __11
__12:
	; // main parsing loop

	// We only get here if there's been an error. Any errors that didn't get a
	// suitable parsePtr->errorType, get recorded as syntax errors.

error:
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType == TCL_PARSE_SUCCESS) {
		goto __223
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_SYNTAX
__223:
	;

	// Free any partial parse tree we've built.

	if !(nodes != uintptr(0)) {
		goto __224
	}
	XTclpFree(tls, nodes)
__224:
	;

	if !(interp == uintptr(0)) {
		goto __225
	}
	// Nowhere to report an error message, so just free it.

	if !(msg != 0) {
		goto __227
	}
__228:
	_objPtr3 = msg
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __231
	}
	XTclFreeObj(tls, _objPtr3)
__231:
	;
	goto __229
__229:
	if 0 != 0 {
		goto __228
	}
	goto __230
__230:
	;
__227:
	;
	goto __226
__225:
	// Construct the complete error message. Start with the simple error
	// message, pulled from the interp result if necessary...

	if !(msg == uintptr(0)) {
		goto __232
	}
	msg = XTcl_GetObjResult(tls, interp)
__232:
	;

	// Add a detailed quote from the bad expression, displaying and
	// sometimes marking the precise location of the syntax error.

	XTcl_AppendPrintfToObj(tls, msg, ts+20590,
		libc.VaList(bp+192, func() uintptr {
			if start-uintptr(limit) < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fstring {
				return ts + 2631 /* "" */
			}
			return ts + 8420 /* "..." */
		}(),
			func() int32 {
				if start-uintptr(limit) < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fstring {
					return int32((int64(start) - int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fstring)) / 1)
				}
				return limit - 3
			}(),
			func() uintptr {
				if start-uintptr(limit) < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fstring {
					return (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fstring
				}
				return start - uintptr(limit) + uintptr(3)
			}(),
			func() int32 {
				if scanned < limit {
					return scanned
				}
				return limit - 3
			}(), start,
			func() uintptr {
				if scanned < limit {
					return ts + 2631 /* "" */
				}
				return ts + 8420 /* "..." */
			}(), func() uintptr {
				if insertMark != 0 {
					return mark
				}
				return ts + 2631 /* "" */
			}(),
			func() int32 {
				if start+uintptr(scanned)+uintptr(limit) > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend {
					return int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend)-int64(start))/1) - scanned
				}
				return limit - 3
			}(),
			start+uintptr(scanned),
			func() uintptr {
				if start+uintptr(scanned)+uintptr(limit) > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend {
					return ts + 2631 /* "" */
				}
				return ts + 8420 /* "..." */
			}()))

	// Next, append any postscript message.

	if !(post != uintptr(0)) {
		goto __233
	}
	XTcl_AppendToObj(tls, msg, ts+20628, -1)
	XTcl_AppendObjToObj(tls, msg, post)
__234:
	_objPtr4 = post
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __237
	}
	XTclFreeObj(tls, _objPtr4)
__237:
	;
	goto __235
__235:
	if 0 != 0 {
		goto __234
	}
	goto __236
__236:
	;
__233:
	;
	XTcl_SetObjResult(tls, interp, msg)

	// Finally, place context information in the errorInfo.

	numBytes = int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend) - int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fstring)) / 1)
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+20631,
		libc.VaList(bp+272, func() int32 {
			if numBytes < limit {
				return numBytes
			}
			return limit - 3
		}(),
			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fstring, func() uintptr {
				if numBytes < limit {
					return ts + 2631 /* "" */
				}
				return ts + 8420 /* "..." */
			}())))
	if !(errCode != 0) {
		goto __238
	}
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+296, ts+4178, ts+20666, ts+20672, errCode,
		subErrCode, uintptr(0)))
__238:
	;
__226:
	;

	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// ConvertTreeToTokens --
//
//	Given a string, the numBytes bytes starting at start, and an OpNode
//	tree and Tcl_Token array created by passing that same string to
//	ParseExpr(), this function writes into *parsePtr the sequence of
//	Tcl_Tokens needed so to satisfy the historical interface provided by
//	Tcl_ParseExpr(). Note that this routine exists only for the sake of
//	the public Tcl_ParseExpr() routine. It is not used by Tcl itself at
//	all.
//
// Results:
//	None.
//
// Side effects:
//	The Tcl_Parse *parsePtr is filled with Tcl_Tokens representing the
//	parsed expression.
//
//----------------------------------------------------------------------

func sConvertTreeToTokens(tls *libc.TLS, start uintptr, numBytes int32, nodes uintptr, tokenPtr uintptr, parsePtr uintptr) { /* tclCompExpr.c:1472:1: */
	bp := tls.Alloc(33)
	defer tls.Free(33)

	var subExprTokenIdx int32
	var nodePtr uintptr
	var next int32
	var allocated int32
	var oldPtr uintptr
	var newPtr uintptr
	var _needed int32
	var allocated1 int32
	var oldPtr1 uintptr
	var newPtr1 uintptr
	var _needed1 int32
	var allocated2 int32
	var oldPtr2 uintptr
	var newPtr2 uintptr
	var _needed2 int32
	// tokenPtr points to a token sequence that came from parsing a
	// Tcl word. A Tcl word is made up of a sequence of one or more
	// elements. When the word is only a single element, it's been the
	// historical practice to replace the TCL_TOKEN_WORD token
	// directly with a TCL_TOKEN_SUB_EXPR token. However, when the
	// word has multiple elements, a TCL_TOKEN_WORD token is kept as a
	// grouping device so that TCL_TOKEN_SUB_EXPR always has only one
	// element. Wise or not, these are the rules the Tcl expr parser
	// has followed, and for the sake of those few callers of
	// Tcl_ParseExpr() we do not change them now. Internally, we can
	// do better.

	var toCopy int32
	var allocated3 int32
	var oldPtr3 uintptr
	var newPtr3 uintptr
	var _needed3 int32
	var subExprTokenPtr uintptr
	var scanned int32
	var parentIdx int32
	// var lexeme uint8 at bp+32, 1
	subExprTokenIdx = 0
	nodePtr = nodes
	next = (*OpNode)(unsafe.Pointer(nodePtr)).Fright

__1:
	if !(1 != 0) {
		goto __2
	}

	// Advance the mark so the next exit from this node won't retrace
	// steps over ground already covered.

	(*OpNode)(unsafe.Pointer(nodePtr)).Fmark++

	// Handle next child node or leaf.

	switch next {
	case OT_EMPTY:
		goto __4

	case OT_LITERAL:
		goto __5

	case OT_TOKENS:
		goto __6

	default:
		goto __7
	}
	goto __3
__4:

	// No tokens and no characters for the OT_EMPTY leaf.
	goto __3

__5:

	// Skip any white space that comes before the literal.

	scanned = XTclParseAllWhiteSpace(tls, start, numBytes)
	start += uintptr(scanned)
	numBytes = numBytes - scanned

	// Reparse the literal to get pointers into source string.

	scanned = sParseLexeme(tls, start, numBytes, bp+32, uintptr(0))

__8:
	_needed = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 2
	if !(_needed > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __11
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__11:
	;
	if !(_needed > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __12
	}
	allocated = 2 * _needed
	oldPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr == parsePtr+96) {
		goto __13
	}
	oldPtr = uintptr(0)
__13:
	;
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __14
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__14:
	;
	newPtr = XTclpRealloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr == uintptr(0)) {
		goto __15
	}
	allocated = int32(uint64(_needed+2) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __16
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__16:
	;
	newPtr = XTcl_Realloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__15:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated
	if !(oldPtr == uintptr(0)) {
		goto __17
	}
	libc.Xmemcpy(tls, newPtr, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__17:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr
__12:
	;
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	subExprTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).Ftype = TCL_TOKEN_SUB_EXPR
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).Fstart = start
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).Fsize = scanned
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).FnumComponents = 1
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).Fstart = start
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).Fsize = scanned
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).FnumComponents = 0

	*(*int32)(unsafe.Pointer(parsePtr + 40)) += 2
	start += uintptr(scanned)
	numBytes = numBytes - scanned
	goto __3

__6:
	// tokenPtr points to a token sequence that came from parsing a
	// Tcl word. A Tcl word is made up of a sequence of one or more
	// elements. When the word is only a single element, it's been the
	// historical practice to replace the TCL_TOKEN_WORD token
	// directly with a TCL_TOKEN_SUB_EXPR token. However, when the
	// word has multiple elements, a TCL_TOKEN_WORD token is kept as a
	// grouping device so that TCL_TOKEN_SUB_EXPR always has only one
	// element. Wise or not, these are the rules the Tcl expr parser
	// has followed, and for the sake of those few callers of
	// Tcl_ParseExpr() we do not change them now. Internally, we can
	// do better.

	toCopy = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents + 1

	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents == (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).FnumComponents+1) {
		goto __18
	}
	// Single element word. Copy tokens and convert the leading
	// token to TCL_TOKEN_SUB_EXPR.

__20:
	_needed1 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + toCopy
	if !(_needed1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __23
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp+8, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__23:
	;
	if !(_needed1 > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __24
	}
	allocated1 = 2 * _needed1
	oldPtr1 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr1 == parsePtr+96) {
		goto __25
	}
	oldPtr1 = uintptr(0)
__25:
	;
	if !(allocated1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __26
	}
	allocated1 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__26:
	;
	newPtr1 = XTclpRealloc(tls, oldPtr1, uint32(uint64(allocated1)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr1 == uintptr(0)) {
		goto __27
	}
	allocated1 = int32(uint64(_needed1+toCopy) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __28
	}
	allocated1 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__28:
	;
	newPtr1 = XTcl_Realloc(tls, oldPtr1, uint32(uint64(allocated1)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__27:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated1
	if !(oldPtr1 == uintptr(0)) {
		goto __29
	}
	libc.Xmemcpy(tls, newPtr1, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__29:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr1
__24:
	;
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	subExprTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24
	libc.Xmemcpy(tls, subExprTokenPtr, tokenPtr,
		Size_t(toCopy)*Size_t(unsafe.Sizeof(Tcl_Token{})))
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).Ftype = TCL_TOKEN_SUB_EXPR
	*(*int32)(unsafe.Pointer(parsePtr + 40)) += toCopy
	goto __19
__18:
	// Multiple element word. Create a TCL_TOKEN_SUB_EXPR token to
	// lead, with fields initialized from the leading token, then
	// copy entire set of word tokens.

__30:
	_needed2 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + (toCopy + 1)
	if !(_needed2 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __33
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp+16, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__33:
	;
	if !(_needed2 > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __34
	}
	allocated2 = 2 * _needed2
	oldPtr2 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr2 == parsePtr+96) {
		goto __35
	}
	oldPtr2 = uintptr(0)
__35:
	;
	if !(allocated2 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __36
	}
	allocated2 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__36:
	;
	newPtr2 = XTclpRealloc(tls, oldPtr2, uint32(uint64(allocated2)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr2 == uintptr(0)) {
		goto __37
	}
	allocated2 = int32(uint64(_needed2+(toCopy+1)) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated2 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __38
	}
	allocated2 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__38:
	;
	newPtr2 = XTcl_Realloc(tls, oldPtr2, uint32(uint64(allocated2)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__37:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated2
	if !(oldPtr2 == uintptr(0)) {
		goto __39
	}
	libc.Xmemcpy(tls, newPtr2, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__39:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr2
__34:
	;
	goto __31
__31:
	if 0 != 0 {
		goto __30
	}
	goto __32
__32:
	;
	subExprTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24
	*(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)) = *(*Tcl_Token)(unsafe.Pointer(tokenPtr))
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).Ftype = TCL_TOKEN_SUB_EXPR
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).FnumComponents++
	subExprTokenPtr += 24
	libc.Xmemcpy(tls, subExprTokenPtr, tokenPtr,
		Size_t(toCopy)*Size_t(unsafe.Sizeof(Tcl_Token{})))
	*(*int32)(unsafe.Pointer(parsePtr + 40)) += toCopy + 1
__19:
	;

	scanned = int32((int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart+uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize)) - int64(start)) / 1)
	start += uintptr(scanned)
	numBytes = numBytes - scanned
	tokenPtr += 24 * uintptr(toCopy)
	goto __3

__7:

	// Advance to the child node, which is an operator.

	nodePtr = nodes + uintptr(next)*16

	// Skip any white space that comes before the subexpression.

	scanned = XTclParseAllWhiteSpace(tls, start, numBytes)
	start += uintptr(scanned)
	numBytes = numBytes - scanned

	// Generate tokens for the operator / subexpression...

	switch int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) {
	case UNARY | 5:
		goto __41
	case BINARY | 3:
		goto __42
	case BINARY | 13:
		goto __43

	default:
		goto __44
	}
	goto __40
__41:
__42:
__43:

	// Historical practice has been to have no Tcl_Tokens for
	// these operators.

	goto __40

__44:

	// Remember the index of the last subexpression we were
	// working on -- that of our parent. We'll stack it later.

	parentIdx = subExprTokenIdx

	// Verify space for the two leading Tcl_Tokens representing
	// the subexpression rooted by this operator. The first
	// Tcl_Token will be of type TCL_TOKEN_SUB_EXPR; the second of
	// type TCL_TOKEN_OPERATOR.

__45:
	_needed3 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 2
	if !(_needed3 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __48
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp+24, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__48:
	;
	if !(_needed3 > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __49
	}
	allocated3 = 2 * _needed3
	oldPtr3 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr3 == parsePtr+96) {
		goto __50
	}
	oldPtr3 = uintptr(0)
__50:
	;
	if !(allocated3 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __51
	}
	allocated3 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__51:
	;
	newPtr3 = XTclpRealloc(tls, oldPtr3, uint32(uint64(allocated3)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr3 == uintptr(0)) {
		goto __52
	}
	allocated3 = int32(uint64(_needed3+2) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated3 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __53
	}
	allocated3 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__53:
	;
	newPtr3 = XTcl_Realloc(tls, oldPtr3, uint32(uint64(allocated3)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__52:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated3
	if !(oldPtr3 == uintptr(0)) {
		goto __54
	}
	libc.Xmemcpy(tls, newPtr3, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__54:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr3
__49:
	;
	goto __46
__46:
	if 0 != 0 {
		goto __45
	}
	goto __47
__47:
	;
	subExprTokenIdx = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens
	subExprTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(subExprTokenIdx)*24
	*(*int32)(unsafe.Pointer(parsePtr + 40)) += 2
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).Ftype = TCL_TOKEN_SUB_EXPR
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).Ftype = TCL_TOKEN_OPERATOR

	// Our current position scanning the string is the starting
	// point for this subexpression.

	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).Fstart = start

	// Eventually, we know that the numComponents field of the
	// Tcl_Token of type TCL_TOKEN_OPERATOR will be 0. This means
	// we can make other use of this field for now to track the
	// stack of subexpressions we have pending.

	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).FnumComponents = parentIdx
	goto __40

__40:
	;
	goto __3
__3:
	;

	// Determine which way to exit the node on this pass.
router:
	switch int32((*OpNode)(unsafe.Pointer(nodePtr)).Fmark) {
	case MARK_LEFT:
		goto __56

	case MARK_RIGHT:
		goto __57

	case MARK_PARENT:
		goto __58
	}
	goto __55
__56:
	next = (*OpNode)(unsafe.Pointer(nodePtr)).Fleft
	goto __55

__57:
	next = (*OpNode)(unsafe.Pointer(nodePtr)).Fright

	// Skip any white space that comes before the operator.

	scanned = XTclParseAllWhiteSpace(tls, start, numBytes)
	start += uintptr(scanned)
	numBytes = numBytes - scanned

	// Here we scan from the string the operator corresponding to
	// nodePtr->lexeme.

	scanned = sParseLexeme(tls, start, numBytes, bp+32, uintptr(0))

	switch int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) {
	case UNARY | 5:
		goto __60
	case BINARY | 3:
		goto __61
	case BINARY | 13:
		goto __62

	default:
		goto __63
	}
	goto __59
__60:
__61:
__62:

	// No tokens for these lexemes -> nothing to do.

	goto __59

__63:

	// Record in the TCL_TOKEN_OPERATOR token the pointers into
	// the string marking where the operator is.

	subExprTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(subExprTokenIdx)*24
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).Fstart = start
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).Fsize = scanned
	goto __59
__59:
	;

	start += uintptr(scanned)
	numBytes = numBytes - scanned
	goto __55

__58:
	switch int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) {
	case UNARY | 4:
		goto __65

	case BINARY | 3:
		goto __66
	case BINARY | 13:
		goto __67

	case UNARY | 5:
		goto __68

	default:
		goto __69
	}
	goto __64
__65:

	// When we get back to the START node, we're done.
	return

__66:
__67:

	// No tokens for these lexemes -> nothing to do.
	goto __64

__68:

	// Skip past matching close paren.

	scanned = XTclParseAllWhiteSpace(tls, start, numBytes)
	start += uintptr(scanned)
	numBytes = numBytes - scanned
	scanned = sParseLexeme(tls, start, numBytes, bp+32, uintptr(0))
	start += uintptr(scanned)
	numBytes = numBytes - scanned
	goto __64

__69:

	// Before we leave this node/operator/subexpression for the
	// last time, finish up its tokens....
	//
	// Our current position scanning the string is where the
	// substring for the subexpression ends.

	subExprTokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(subExprTokenIdx)*24
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).Fsize = int32((int64(start) - int64((*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).Fstart)) / 1)

	// All the Tcl_Tokens allocated and filled belong to
	// this subexpresion. The first token is the leading
	// TCL_TOKEN_SUB_EXPR token, and all the rest (one fewer)
	// are its components.

	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr)).FnumComponents = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens - subExprTokenIdx - 1

	// Finally, as we return up the tree to our parent, pop the
	// parent subexpression off our subexpression stack, and
	// fill in the zero numComponents for the operator Tcl_Token.

	parentIdx = (*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).FnumComponents
	(*Tcl_Token)(unsafe.Pointer(subExprTokenPtr + 1*24)).FnumComponents = 0
	subExprTokenIdx = parentIdx
	goto __64
__64:
	;

	// Since we're returning to parent, skip child handling code.

	nodePtr = nodes + uintptr(*(*int32)(unsafe.Pointer(nodePtr + 8)))*16
	goto router
__55:
	;
	goto __1
__2:
}

//----------------------------------------------------------------------
//
// Tcl_ParseExpr --
//
//	Given a string, the numBytes bytes starting at start, this function
//	parses it as a Tcl expression and stores information about the
//	structure of the expression in the Tcl_Parse struct indicated by the
//	caller.
//
// Results:
//	If the string is successfully parsed as a valid Tcl expression, TCL_OK
//	is returned, and data about the expression structure is written to
//	*parsePtr. If the string cannot be parsed as a valid Tcl expression,
//	TCL_ERROR is returned, and if interp is non-NULL, an error message is
//	written to interp.
//
// Side effects:
//	If there is insufficient space in parsePtr to hold all the information
//	about the expression, then additional space is malloc-ed. If the
//	function returns TCL_OK then the caller must eventually invoke
//	Tcl_FreeParse to release any additional space that was allocated.
//
//----------------------------------------------------------------------

func XTcl_ParseExpr(tls *libc.TLS, interp uintptr, start uintptr, numBytes int32, parsePtr uintptr) int32 { /* tclCompExpr.c:1819:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var code int32
	*(*uintptr)(unsafe.Pointer(bp /* opTree */)) = uintptr(0) // Will point to the tree of operators.
	var litList uintptr = XTcl_NewObj(tls)                    // List to hold the literals.
	var funcList uintptr = XTcl_NewObj(tls)                   // List to hold the functon names.
	var exprParsePtr uintptr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_Parse{})))
	// Holds the Tcl_Tokens of substitutions.

	if numBytes < 0 {
		numBytes = func() int32 {
			if start != 0 {
				return int32(libc.Xstrlen(tls, start))
			}
			return 0
		}()
	}

	code = sParseExpr(tls, interp, start, numBytes, bp, litList, funcList,
		exprParsePtr, 1)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = funcList
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = litList
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	XTclParseInit(tls, interp, start, numBytes, parsePtr)
	if code == TCL_OK {
		sConvertTreeToTokens(tls, start, numBytes,
			*(*uintptr)(unsafe.Pointer(bp /* opTree */)), (*Tcl_Parse)(unsafe.Pointer(exprParsePtr)).FtokenPtr, parsePtr)
	} else {
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = (*Tcl_Parse)(unsafe.Pointer(exprParsePtr)).Fterm
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = (*Tcl_Parse)(unsafe.Pointer(exprParsePtr)).FerrorType
	}

	XTcl_FreeParse(tls, exprParsePtr)
	XTclStackFree(tls, interp, exprParsePtr)
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp)))
	return code
}

//----------------------------------------------------------------------
//
// ParseLexeme --
//
//	Parse a single lexeme from the start of a string, scanning no more
//	than numBytes bytes.
//
// Results:
//	Returns the number of bytes scanned to produce the lexeme.
//
// Side effects:
//	Code identifying lexeme parsed is writen to *lexemePtr.
//
//----------------------------------------------------------------------

func sParseLexeme(tls *libc.TLS, start uintptr, numBytes int32, lexemePtr uintptr, literalPtr uintptr) int32 { /* tclCompExpr.c:1878:1: */
	bp := tls.Alloc(15)
	defer tls.Free(15)

	// var end uintptr at bp, 8

	var scanned int32
	// var ch Tcl_UniChar at bp+10, 2

	var literal uintptr
	var byte uint8
	var _objPtr uintptr
	var p uintptr
	// var lexeme uint8 at bp+8, 1

	// var utfBytes [3]int8 at bp+12, 3

	var _objPtr1 uintptr
	var _objPtr2 uintptr
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 10 /* ch */)) = Tcl_UniChar(0)
	literal = uintptr(0)

	if !(numBytes == 0) {
		goto __1
	}
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 28)
	return 0
__1:
	;
	byte = uint8(*(*int8)(unsafe.Pointer(start)))
	if !(uint64(byte) < uint64(unsafe.Sizeof(sLexeme)) && int32(sLexeme[byte]) != 0) {
		goto __2
	}
	*(*uint8)(unsafe.Pointer(lexemePtr)) = sLexeme[byte]
	return 1
__2:
	;
	switch int32(byte) {
	case '*':
		goto __4

	case '=':
		goto __5

	case '!':
		goto __6

	case '&':
		goto __7

	case '|':
		goto __8

	case '<':
		goto __9

	case '>':
		goto __10

	case 'i':
		goto __11

	case 'e':
		goto __12

	case 'n':
		goto __13
	}
	goto __3
__4:
	if !(numBytes > 1 && int32(*(*int8)(unsafe.Pointer(start + 1))) == '*') {
		goto __14
	}
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 24)
	return 2
__14:
	;
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 4)
	return 1

__5:
	if !(numBytes > 1 && int32(*(*int8)(unsafe.Pointer(start + 1))) == '=') {
		goto __15
	}
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 18)
	return 2
__15:
	;
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(INCOMPLETE)
	return 1

__6:
	if !(numBytes > 1 && int32(*(*int8)(unsafe.Pointer(start + 1))) == '=') {
		goto __16
	}
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 19)
	return 2
__16:
	;
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(UNARY | 6)
	return 1

__7:
	if !(numBytes > 1 && int32(*(*int8)(unsafe.Pointer(start + 1))) == '&') {
		goto __17
	}
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 20)
	return 2
__17:
	;
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 9)
	return 1

__8:
	if !(numBytes > 1 && int32(*(*int8)(unsafe.Pointer(start + 1))) == '|') {
		goto __18
	}
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 21)
	return 2
__18:
	;
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 11)
	return 1

__9:
	if !(numBytes > 1) {
		goto __19
	}
	switch int32(*(*int8)(unsafe.Pointer(start + 1))) {
	case '<':
		goto __21
	case '=':
		goto __22
	}
	goto __20
__21:
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 14)
	return 2
__22:
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 16)
	return 2
__20:
	;
__19:
	;
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 7)
	return 1

__10:
	if !(numBytes > 1) {
		goto __23
	}
	switch int32(*(*int8)(unsafe.Pointer(start + 1))) {
	case '>':
		goto __25
	case '=':
		goto __26
	}
	goto __24
__25:
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 15)
	return 2
__26:
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 17)
	return 2
__24:
	;
__23:
	;
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 8)
	return 1

__11:
	if !(numBytes > 1 && int32(*(*int8)(unsafe.Pointer(start + 1))) == 'n' &&
		(numBytes == 2 || int32(*(*int8)(unsafe.Pointer(start + 2)))&0x80 != 0 || !(libc.Xisalpha(tls, int32(uint8(*(*int8)(unsafe.Pointer(start + 2))))) != 0))) {
		goto __27
	}
	// Must make this check so we can tell the difference between the
	// "in" operator and the "int" function name and the "infinity"
	// numeric value.

	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 25)
	return 2
__27:
	;
	goto __3

__12:
	if !(numBytes > 1 && int32(*(*int8)(unsafe.Pointer(start + 1))) == 'q' &&
		(numBytes == 2 || int32(*(*int8)(unsafe.Pointer(start + 2)))&0x80 != 0 || !(libc.Xisalpha(tls, int32(uint8(*(*int8)(unsafe.Pointer(start + 2))))) != 0))) {
		goto __28
	}
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 22)
	return 2
__28:
	;
	goto __3

__13:
	if !(numBytes > 1 &&
		(numBytes == 2 || int32(*(*int8)(unsafe.Pointer(start + 2)))&0x80 != 0 || !(libc.Xisalpha(tls, int32(uint8(*(*int8)(unsafe.Pointer(start + 2))))) != 0))) {
		goto __29
	}
	switch int32(*(*int8)(unsafe.Pointer(start + 1))) {
	case 'e':
		goto __31
	case 'i':
		goto __32
	}
	goto __30
__31:
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 23)
	return 2
__32:
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BINARY | 26)
	return 2
__30:
	;
__29:
	;
__3:
	;

	literal = XTcl_NewObj(tls)
	if !(XTclParseNumber(tls, uintptr(0), literal, uintptr(0), start, numBytes, bp,
		TCL_PARSE_NO_WHITESPACE) == TCL_OK) {
		goto __33
	}
	if !(*(*uintptr)(unsafe.Pointer(bp)) < start+uintptr(numBytes) && !(XTclIsBareword(tls, int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))) != 0)) {
		goto __34
	}

number:
	if !((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(start))/1 == int64(0)) {
		goto __36
	}
	(*Tcl_Obj)(unsafe.Pointer(literal)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(literal)).Flength = 0
	goto __37
__36:
	(*Tcl_Obj)(unsafe.Pointer(literal)).Fbytes = XTcl_Alloc(tls, uint32((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(start))/1+int64(1)))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(literal)).Fbytes, start, uint64((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(start))/1))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(literal)).Fbytes + uintptr((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(start))/1))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(literal)).Flength = int32((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64(start)) / 1)
__37:
	;

	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(LEAF | 1)
	if !(literalPtr != 0) {
		goto __38
	}
	*(*uintptr)(unsafe.Pointer(literalPtr)) = literal
	goto __39
__38:
__40:
	_objPtr = literal
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __43
	}
	XTclFreeObj(tls, _objPtr)
__43:
	;
	goto __41
__41:
	if 0 != 0 {
		goto __40
	}
	goto __42
__42:
	;
__39:
	;
	return int32((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64(start)) / 1)
	goto __35
__34:

	// We have a number followed directly by bareword characters
	// (alpha, digit, underscore).  Is this a number followed by
	// bareword syntax error?  Or should we join into one bareword?
	// Example: Inf + luence + () becomes a valid function call.
	// [Bug 3401704]
	if !((*Tcl_Obj)(unsafe.Pointer(literal)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType))) {
		goto __44
	}
	p = start

__45:
	if !(p < *(*uintptr)(unsafe.Pointer(bp))) {
		goto __46
	}
	if !!(XTclIsBareword(tls, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))))) != 0) {
		goto __47
	}
	// The number has non-bareword characters, so we
	// must treat it as a number.
	goto number
__47:
	;
	goto __45
__46:
	;
__44:
	;
	sParseLexeme(tls, *(*uintptr)(unsafe.Pointer(bp /* end */)), int32(int64(numBytes)-(int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(start))/1), bp+8, uintptr(0))
	if !(NODE_TYPE&int32(*(*uint8)(unsafe.Pointer(bp + 8))) == BINARY) {
		goto __48
	}
	// The bareword characters following the number take the
	// form of an operator (eq, ne, in, ni, ...) so we treat
	// as number + operator.
	goto number
__48:
	;

	// Otherwise, fall through and parse the whole as a bareword.
__35:
	;
__33:
	;

	// We reject leading underscores in bareword.  No sensible reason why.
	// Might be inspired by reserved identifier rules in C, which of course
	// have no direct relevance here.

	if !(!(XTclIsBareword(tls, int32(*(*int8)(unsafe.Pointer(start)))) != 0) || int32(*(*int8)(unsafe.Pointer(start))) == '_') {
		goto __49
	}
	if !(XTcl_UtfCharComplete(tls, start, numBytes) != 0) {
		goto __50
	}
	scanned = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(start)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 10)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(start))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, start, bp+10)
	}()
	goto __51
__50:

	libc.Xmemcpy(tls, bp+12, start, uint64(numBytes))
	*(*int8)(unsafe.Pointer(bp + 12 + uintptr(numBytes))) = int8(0)
	scanned = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(bp + 12)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 10)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(bp + 12))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, bp+12, bp+10)
	}()
__51:
	;
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(INVALID)
__52:
	_objPtr1 = literal
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __55
	}
	XTclFreeObj(tls, _objPtr1)
__55:
	;
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
	return scanned
__49:
	;
	*(*uintptr)(unsafe.Pointer(bp /* end */)) = start
__56:
	if !(numBytes != 0 && XTclIsBareword(tls, int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))) != 0) {
		goto __57
	}
	*(*uintptr)(unsafe.Pointer(bp /* end */)) += uintptr(1)
	numBytes = numBytes - 1
	goto __56
__57:
	;
	*(*uint8)(unsafe.Pointer(lexemePtr)) = uint8(BAREWORD)
	if !(literalPtr != 0) {
		goto __58
	}
	XTcl_SetStringObj(tls, literal, start, int32((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(start))/1))
	*(*uintptr)(unsafe.Pointer(literalPtr)) = literal
	goto __59
__58:
__60:
	_objPtr2 = literal
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __63
	}
	XTclFreeObj(tls, _objPtr2)
__63:
	;
	goto __61
__61:
	if 0 != 0 {
		goto __60
	}
	goto __62
__62:
	;
__59:
	;
	return int32((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64(start)) / 1)
}

//----------------------------------------------------------------------
//
// TclCompileExpr --
//
//	This procedure compiles a string containing a Tcl expression into Tcl
//	bytecodes.
//
// Results:
//	None.
//
// Side effects:
//	Adds instructions to envPtr to evaluate the expression at runtime.
//
//----------------------------------------------------------------------

func XTclCompileExpr(tls *libc.TLS, interp uintptr, script uintptr, numBytes int32, envPtr uintptr, optimize int32) { /* tclCompExpr.c:2112:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	*(*uintptr)(unsafe.Pointer(bp /* opTree */)) = uintptr(0) // Will point to the tree of operators
	var litList uintptr = XTcl_NewObj(tls)                    // List to hold the literals
	var funcList uintptr = XTcl_NewObj(tls)                   // List to hold the functon names
	var parsePtr uintptr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_Parse{})))
	// Holds the Tcl_Tokens of substitutions

	var code int32 = sParseExpr(tls, interp, script, numBytes, bp, litList,
		funcList, parsePtr, 0)

	if code == TCL_OK {
		// Valid parse; compile the tree.

		// var objc int32 at bp+16, 4

		// var litObjv uintptr at bp+8, 8

		// var funcObjv uintptr at bp+24, 8

		// TIP #280 : Track Lines within the expression
		XTclAdvanceLines(tls, envPtr+3560, script,
			script+uintptr(XTclParseAllWhiteSpace(tls, script, numBytes)))

		if (*Tcl_Obj)(unsafe.Pointer(litList)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			*(*uintptr)(unsafe.Pointer(bp + 8)) = *(*uintptr)(unsafe.Pointer(litList + 32)) + 16
			*(*int32)(unsafe.Pointer(bp + 16)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(litList + 32)))).FelemCount
		} else {
			XTcl_ListObjGetElements(tls, uintptr(0), litList, bp+16, bp+8)
		}
		if (*Tcl_Obj)(unsafe.Pointer(funcList)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			*(*uintptr)(unsafe.Pointer(bp + 24)) = *(*uintptr)(unsafe.Pointer(funcList + 32)) + 16
			*(*int32)(unsafe.Pointer(bp + 16)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(funcList + 32)))).FelemCount
		} else {
			XTcl_ListObjGetElements(tls, uintptr(0), funcList, bp+16, bp+24)
		}
		sCompileExprTree(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* opTree */)), 0, bp+8, *(*uintptr)(unsafe.Pointer(bp + 24 /* funcObjv */)),
			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr, envPtr, optimize)
	} else {
		XTclCompileSyntaxError(tls, interp, envPtr)
	}

	XTcl_FreeParse(tls, parsePtr)
	XTclStackFree(tls, interp, parsePtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = funcList
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = litList
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp)))
}

//----------------------------------------------------------------------
//
// ExecConstantExprTree --
//	Compiles and executes bytecode for the subexpression tree at index
//	in the nodes array.  This subexpression must be constant, made up
//	of only constant operators (not functions) and literals.
//
// Results:
//	A standard Tcl return code and result left in interp.
//
// Side effects:
//	Consumes subtree of nodes rooted at index.  Advances the pointer
//	*litObjvPtr.
//
//----------------------------------------------------------------------

func sExecConstantExprTree(tls *libc.TLS, interp uintptr, nodes uintptr, index int32, litObjvPtr uintptr) int32 { /* tclCompExpr.c:2175:1: */
	var envPtr uintptr
	var byteCodePtr uintptr
	var code int32
	var byteCodeObj uintptr = XTcl_NewObj(tls)
	var rootPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr

	// Note we are compiling an expression with literal arguments. This means
	// there can be no [info frame] calls when we execute the resulting
	// bytecode, so there's no need to tend to TIP 280 issues.

	envPtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CompileEnv{})))
	XTclInitCompileEnv(tls, interp, envPtr, uintptr(0), 0, uintptr(0), 0)
	sCompileExprTree(tls, interp, nodes, index, litObjvPtr, uintptr(0), uintptr(0), envPtr,
		0)
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_DONE)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_DONE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DONE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(byteCodeObj)).FrefCount++
	XTclInitByteCodeObj(tls, byteCodeObj, envPtr)
	XTclFreeCompileEnv(tls, envPtr)
	XTclStackFree(tls, interp, envPtr)
	byteCodePtr = *(*uintptr)(unsafe.Pointer(byteCodeObj + 32))
	XTclNRExecuteByteCode(tls, interp, byteCodePtr)
	code = XTclNRRunCallbacks(tls, interp, TCL_OK, rootPtr)
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _objPtr uintptr = byteCodeObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return code
}

//----------------------------------------------------------------------
//
// CompileExprTree --
//
//	Compiles and writes to envPtr instructions for the subexpression tree
//	at index in the nodes array. (*litObjvPtr) must point to the proper
//	location in a corresponding literals list. Likewise, when non-NULL,
//	funcObjv and tokenPtr must point into matching arrays of function
//	names and Tcl_Token's derived from earlier call to ParseExpr(). When
//	optimize is true, any constant subexpressions will be precomputed.
//
// Results:
//	None.
//
// Side effects:
//	Adds instructions to envPtr to evaluate the expression at runtime.
//	Consumes subtree of nodes rooted at index. Advances the pointer
//	*litObjvPtr.
//
//----------------------------------------------------------------------

func sCompileExprTree(tls *libc.TLS, interp uintptr, nodes uintptr, index int32, litObjvPtr uintptr, funcObjv uintptr, tokenPtr uintptr, envPtr uintptr, optimize int32) { /* tclCompExpr.c:2233:1: */
	bp := tls.Alloc(240)
	defer tls.Free(240)

	var nodePtr uintptr = nodes + uintptr(index)*16
	var rootPtr uintptr = nodePtr
	var numWords int32 = 0
	var jumpPtr uintptr = uintptr(0)
	var convert int32 = 1

	for 1 != 0 {
		var next int32
		var freePtr uintptr
		var newJump uintptr

		if int32((*OpNode)(unsafe.Pointer(nodePtr)).Fmark) == MARK_LEFT {
			next = (*OpNode)(unsafe.Pointer(nodePtr)).Fleft

			if int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) == BINARY|12 {
				convert = 1
			}
		} else if int32((*OpNode)(unsafe.Pointer(nodePtr)).Fmark) == MARK_RIGHT {
			next = (*OpNode)(unsafe.Pointer(nodePtr)).Fright

			switch int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) {
			case UNARY | BAREWORD:
				{
					// var cmdName Tcl_DString at bp+16, 216

					var p uintptr
					// var length int32 at bp+232, 4

					XTcl_DStringInit(tls, bp+16)
					XTcl_DStringAppend(tls, bp+16, ts+8032, int32(uint64(unsafe.Sizeof([16]int8{}))-uint64(1)))
					p = func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(funcObjv)))).Fbytes != 0 {
							return func() uintptr {
								*(*int32)(unsafe.Pointer(bp + 232)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(funcObjv)))).Flength
								return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(funcObjv)))).Fbytes
							}()
						}
						return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(funcObjv)), bp+232)
					}()
					funcObjv += 8
					XTcl_DStringAppend(tls, bp+16, p, *(*int32)(unsafe.Pointer(bp + 232 /* length */)))
					for ok := true; ok; ok = 0 != 0 {
						var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_DString)(unsafe.Pointer(bp+16)).Fstring, (*Tcl_DString)(unsafe.Pointer(bp+16)).Flength, LITERAL_CMD_NAME)
						if _objIndexCopy <= 255 {
							for ok1 := true; ok1; ok1 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH1 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok2 := true; ok2; ok2 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok3 := true; ok3; ok3 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						} else {
							for ok4 := true; ok4; ok4 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH4 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok5 := true; ok5; ok5 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok6 := true; ok6; ok6 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						}
					}
					XTcl_DStringFree(tls, bp+16)

					// Start a count of the number of words in this function
					// command invocation. In case there's already a count in
					// progress (nested functions), save it in our unused "left"
					// field for restoring later.

					(*OpNode)(unsafe.Pointer(nodePtr)).Fleft = numWords
					numWords = 2 // Command plus one argument
					break

				}
				fallthrough
			case BINARY | 12:
				newJump = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(JumpList{})))
				(*JumpList)(unsafe.Pointer(newJump)).Fnext = jumpPtr
				jumpPtr = newJump
				XTclEmitForwardJump(tls, envPtr, TCL_FALSE_JUMP, jumpPtr)
				break
				fallthrough
			case BINARY | 13:
				newJump = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(JumpList{})))
				(*JumpList)(unsafe.Pointer(newJump)).Fnext = jumpPtr
				jumpPtr = newJump
				XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP,
					jumpPtr)
				for ok7 := true; ok7; ok7 = 0 != 0 {
					if -1 < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
				}
				if convert != 0 {
					(*JumpList)(unsafe.Pointer(jumpPtr)).Fjump.FjumpType = TCL_TRUE_JUMP
				}
				convert = 1
				break
				fallthrough
			case BINARY | 20:
				fallthrough
			case BINARY | 21:
				newJump = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(JumpList{})))
				(*JumpList)(unsafe.Pointer(newJump)).Fnext = jumpPtr
				jumpPtr = newJump
				XTclEmitForwardJump(tls, envPtr, func() uint32 {
					if int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) == BINARY|20 {
						return TCL_FALSE_JUMP
					}
					return TCL_TRUE_JUMP
				}(), jumpPtr /* &.jump */)
				break
			}
		} else {
			var pc1 int32
			var pc2 int32
			var target int32

			switch int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) {
			case UNARY | 4:
				fallthrough
			case BINARY | 12:
				if convert != 0 && nodePtr == rootPtr {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_TRY_CVT_TO_NUMERIC)
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_TRY_CVT_TO_NUMERIC == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_TRY_CVT_TO_NUMERIC].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - 0
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
				break
				fallthrough
			case UNARY | 5:

				// do nothing
				break
				fallthrough
			case UNARY | BAREWORD:

				if numWords < 255 {
					XTclEmitInvoke(tls, envPtr, INST_INVOKE_STK1, libc.VaList(bp, numWords))
				} else {
					XTclEmitInvoke(tls, envPtr, INST_INVOKE_STK4, libc.VaList(bp+8, numWords))
				}

				// Restore any saved numWords value.

				numWords = (*OpNode)(unsafe.Pointer(nodePtr)).Fleft
				convert = 1
				break
				fallthrough
			case BINARY | 3:

				numWords++
				break
				fallthrough
			case BINARY | 13:

				if (*JumpList)(unsafe.Pointer(jumpPtr)).Fjump.FjumpType == TCL_TRUE_JUMP {
					(*JumpList)(unsafe.Pointer(jumpPtr)).Fjump.FjumpType = TCL_UNCONDITIONAL_JUMP
					convert = 1
				}
				target = int32((*JumpList)(unsafe.Pointer(jumpPtr)).Fjump.FcodeOffset + uint32(2))
				if XTclFixupForwardJump(tls, envPtr, jumpPtr, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(jumpPtr)).FcodeOffset)), 127) != 0 {
					target = target + 3
				}
				freePtr = jumpPtr
				jumpPtr = (*JumpList)(unsafe.Pointer(jumpPtr)).Fnext
				XTclStackFree(tls, interp, freePtr)
				XTclFixupForwardJump(tls, envPtr, jumpPtr,
					int32(uint32(target)-(*JumpList)(unsafe.Pointer(jumpPtr)).Fjump.FcodeOffset), 127)

				freePtr = jumpPtr
				jumpPtr = (*JumpList)(unsafe.Pointer(jumpPtr)).Fnext
				XTclStackFree(tls, interp, freePtr)
				break
				fallthrough
			case BINARY | 20:
				fallthrough
			case BINARY | 21:

				pc1 = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
				for ok11 := true; ok11; ok11 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = func() uint8 {
						if int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) == BINARY|20 {
							return uint8(INST_JUMP_FALSE1)
						}
						return uint8(INST_JUMP_TRUE1)
					}()
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if func() int32 {
								if int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) == BINARY|20 {
									return INST_JUMP_FALSE1
								}
								return INST_JUMP_TRUE1
							}() == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[func() int32 {
							if int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) == BINARY|20 {
								return INST_JUMP_FALSE1
							}
							return INST_JUMP_TRUE1
						}()].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok13 := true; ok13; ok13 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok14 := true; ok14; ok14 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, func() uintptr {
						if int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) == BINARY|20 {
							return ts + 18937
						}
						return ts + 18935
					}(), 1, 0)
					if _objIndexCopy <= 255 {
						for ok15 := true; ok15; ok15 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok16 := true; ok16; ok16 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok17 := true; ok17; ok17 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok18 := true; ok18; ok18 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok19 := true; ok19; ok19 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok20 := true; ok20; ok20 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
				pc2 = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
				for ok21 := true; ok21; ok21 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_JUMP1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok22 := true; ok22; ok22 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok23 := true; ok23; ok23 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				for ok24 := true; ok24; ok24 = 0 != 0 {
					if -1 < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
				}
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(pc1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(pc1)))
				if XTclFixupForwardJump(tls, envPtr, jumpPtr, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(jumpPtr)).FcodeOffset)), 127) != 0 {
					pc2 = pc2 + 3
				}
				for ok25 := true; ok25; ok25 = 0 != 0 {
					var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, func() uintptr {
						if int32((*OpNode)(unsafe.Pointer(nodePtr)).Flexeme) == BINARY|20 {
							return ts + 18935
						}
						return ts + 18937
					}(), 1, 0)
					if _objIndexCopy <= 255 {
						for ok26 := true; ok26; ok26 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok27 := true; ok27; ok27 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok28 := true; ok28; ok28 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok29 := true; ok29; ok29 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok30 := true; ok30; ok30 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok31 := true; ok31; ok31 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
				*(*uint8)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(pc2) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64(pc2)))
				convert = 0
				freePtr = jumpPtr
				jumpPtr = (*JumpList)(unsafe.Pointer(jumpPtr)).Fnext
				XTclStackFree(tls, interp, freePtr)
				break
				fallthrough
			default:
				for ok32 := true; ok32; ok32 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = instruction[(*OpNode)(unsafe.Pointer(nodePtr)).Flexeme]
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if int32(instruction[(*OpNode)(unsafe.Pointer(nodePtr)).Flexeme]) == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok33 := true; ok33; ok33 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[instruction[(*OpNode)(unsafe.Pointer(nodePtr)).Flexeme]].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - 0
							}
							for ok34 := true; ok34; ok34 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
				convert = 0
				break
			}
			if nodePtr == rootPtr {
				// We're done

				return
			}
			nodePtr = nodes + uintptr(*(*int32)(unsafe.Pointer(nodePtr + 8)))*16
			continue
		}

		(*OpNode)(unsafe.Pointer(nodePtr)).Fmark++
		switch next {
		case OT_EMPTY:
			numWords = 1 // No arguments, so just the command
			break
		case OT_LITERAL:
			{
				var litObjv uintptr = *(*uintptr)(unsafe.Pointer(litObjvPtr))
				var literal uintptr = *(*uintptr)(unsafe.Pointer(litObjv))

				if optimize != 0 {
					// var length int32 at bp+236, 4

					var bytes uintptr = func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(literal)).Fbytes != 0 {
							return func() uintptr {
								*(*int32)(unsafe.Pointer(bp + 236)) = (*Tcl_Obj)(unsafe.Pointer(literal)).Flength
								return (*Tcl_Obj)(unsafe.Pointer(literal)).Fbytes
							}()
						}
						return XTcl_GetStringFromObj(tls, literal, bp+236)
					}()
					var idx int32 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp + 236 /* length */)) /*flags*/, 0)
					var objPtr uintptr = XTclFetchLiteral(tls, envPtr, uint32(idx))

					if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(literal)).FtypePtr != uintptr(0) {
						// Would like to do this:
						//
						// lePtr->objPtr = literal;
						// Tcl_IncrRefCount(literal);
						// Tcl_DecrRefCount(objPtr);
						//
						// However, the design of the "global" and "local"
						// LiteralTable does not permit the value of lePtr->objPtr
						// to change. So rather than replace lePtr->objPtr, we do
						// surgery to transfer our desired internalrep into it.

						(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = (*Tcl_Obj)(unsafe.Pointer(literal)).FtypePtr
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).FinternalRep = (*Tcl_Obj)(unsafe.Pointer(literal)).FinternalRep
						(*Tcl_Obj)(unsafe.Pointer(literal)).FtypePtr = uintptr(0)
					}
					for ok35 := true; ok35; ok35 = 0 != 0 {
						var _objIndexCopy int32 = idx
						if _objIndexCopy <= 255 {
							for ok36 := true; ok36; ok36 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH1 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok37 := true; ok37; ok37 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok38 := true; ok38; ok38 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						} else {
							for ok39 := true; ok39; ok39 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH4 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok40 := true; ok40; ok40 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok41 := true; ok41; ok41 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						}
					}
				} else {
					// When optimize==0, we know the expression is a one-off and
					// there's nothing to be gained from sharing literals when
					// they won't live long, and the copies we have already have
					// an appropriate internalrep. In this case, skip literal
					// registration that would enable sharing, and use the routine
					// that preserves internalreps.

					for ok42 := true; ok42; ok42 = 0 != 0 {
						var _objIndexCopy int32 = XTclAddLiteralObj(tls, envPtr, literal, uintptr(0))
						if _objIndexCopy <= 255 {
							for ok43 := true; ok43; ok43 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH1 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok44 := true; ok44; ok44 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok45 := true; ok45; ok45 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						} else {
							for ok46 := true; ok46; ok46 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH4 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok47 := true; ok47; ok47 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok48 := true; ok48; ok48 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						}
					}
				}
				*(*uintptr)(unsafe.Pointer(litObjvPtr)) += 8
				break

			}
		case OT_TOKENS:
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)

			tokenPtr += 24 * uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)
			break
		default:
			if optimize != 0 && (*OpNode)(unsafe.Pointer(nodes+uintptr(next)*16)).Fconstant != 0 {
				var save Tcl_InterpState = XTcl_SaveInterpState(tls, interp, TCL_OK)

				if sExecConstantExprTree(tls, interp, nodes, next, litObjvPtr) ==
					TCL_OK {
					var idx int32
					var objPtr uintptr = XTcl_GetObjResult(tls, interp)

					// Don't generate a string rep, but if we have one
					// already, then use it to share via the literal table.

					if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
						var tableValue uintptr

						idx = XTclRegisterLiteral(tls, envPtr, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength /*flags*/, 0)
						tableValue = XTclFetchLiteral(tls, envPtr, uint32(idx))
						if (*Tcl_Obj)(unsafe.Pointer(tableValue)).FtypePtr == uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
							// Same internalrep surgery as for OT_LITERAL.

							(*Tcl_Obj)(unsafe.Pointer(tableValue)).FtypePtr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr
							(*Tcl_Obj)(unsafe.Pointer(tableValue)).FinternalRep = (*Tcl_Obj)(unsafe.Pointer(objPtr)).FinternalRep
							(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
						}
					} else {
						idx = XTclAddLiteralObj(tls, envPtr, objPtr, uintptr(0))
					}
					for ok49 := true; ok49; ok49 = 0 != 0 {
						var _objIndexCopy int32 = idx
						if _objIndexCopy <= 255 {
							for ok50 := true; ok50; ok50 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH1 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok51 := true; ok51; ok51 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok52 := true; ok52; ok52 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						} else {
							for ok53 := true; ok53; ok53 = 0 != 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
									XTclExpandCodeArray(tls, envPtr)
								}
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
								*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
										if INST_PUSH4 == INST_START_CMD {
											return 1
										}
										return 0
									}()
								}
								for ok54 := true; ok54; ok54 = 0 != 0 {
									var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
									if _delta != 0 {
										if _delta == -0x7fffffff-1 {
											_delta = 1 - _objIndexCopy
										}
										for ok55 := true; ok55; ok55 = 0 != 0 {
											if _delta < 0 {
												if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
													(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
												}
											}
											*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
										}
									}
								}
							}
						}
					}
				} else {
					XTclCompileSyntaxError(tls, interp, envPtr)
				}
				XTcl_RestoreInterpState(tls, interp, save)
				convert = 0
			} else {
				nodePtr = nodes + uintptr(next)*16
			}
		}
	}
}

//----------------------------------------------------------------------
//
// TclSingleOpCmd --
//
//	Implements the commands: ~, !, <<, >>, %, !=, ne, in, ni
//	in the ::tcl::mathop namespace.  These commands have no
//	extension to arbitrary arguments; they accept only exactly one
//	or exactly two arguments as suitable for the operator.
//
// Results:
//	A standard Tcl return code and result left in interp.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclSingleOpCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCompExpr.c:2534:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var occdPtr uintptr = clientData
	// var lexeme uint8 at bp, 1

	// var nodes [2]OpNode at bp+4, 32

	*(*uintptr)(unsafe.Pointer(bp + 40 /* litObjv */)) = objv + uintptr(1)*8

	if objc != 1+*(*int32)(unsafe.Pointer(occdPtr + 16)) {
		XTcl_WrongNumArgs(tls, interp, 1, objv, (*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fexpected)
		return TCL_ERROR
	}

	sParseLexeme(tls, (*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fop, int32(libc.Xstrlen(tls, (*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fop)), bp, uintptr(0))
	(*OpNode)(unsafe.Pointer(bp + 4)).Flexeme = uint8(UNARY | 4)
	(*OpNode)(unsafe.Pointer(bp + 4)).Fmark = MARK_RIGHT
	(*OpNode)(unsafe.Pointer(bp + 4)).Fright = 1
	(*OpNode)(unsafe.Pointer(bp + 4 + 1*16)).Flexeme = *(*uint8)(unsafe.Pointer(bp /* lexeme */))
	if objc == 2 {
		(*OpNode)(unsafe.Pointer(bp + 4 + 1*16)).Fmark = MARK_RIGHT
	} else {
		(*OpNode)(unsafe.Pointer(bp + 4 + 1*16)).Fmark = MARK_LEFT
		(*OpNode)(unsafe.Pointer(bp + 4 + 1*16)).Fleft = OT_LITERAL
	}
	(*OpNode)(unsafe.Pointer(bp + 4 + 1*16)).Fright = OT_LITERAL
	*(*int32)(unsafe.Pointer(bp + 4 + 1*16 + 8)) = 0

	return sExecConstantExprTree(tls, interp, bp+4, 0, bp+40)
}

//----------------------------------------------------------------------
//
// TclSortingOpCmd --
//	Implements the commands:
//		<, <=, >, >=, ==, eq
//	in the ::tcl::mathop namespace. These commands are defined for
//	arbitrary number of arguments by computing the AND of the base
//	operator applied to all neighbor argument pairs.
//
// Results:
//	A standard Tcl return code and result left in interp.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclSortingOpCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCompExpr.c:2587:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var code int32 = TCL_OK

	if objc < 3 {
		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(1 != 0)))
	} else {
		var occdPtr uintptr = clientData
		var litObjv uintptr = XTclStackAlloc(tls, interp,
			int32(uint64(2*(objc-2))*uint64(unsafe.Sizeof(uintptr(0)))))
		var nodes uintptr = XTclStackAlloc(tls, interp, int32(uint64(2*(objc-2))*uint64(unsafe.Sizeof(OpNode{}))))
		// var lexeme uint8 at bp, 1

		var i int32
		var lastAnd int32 = 1
		*(*uintptr)(unsafe.Pointer(bp + 8 /* litObjPtrPtr */)) = litObjv

		sParseLexeme(tls, (*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fop, int32(libc.Xstrlen(tls, (*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fop)), bp, uintptr(0))

		*(*uintptr)(unsafe.Pointer(litObjv)) = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		(*OpNode)(unsafe.Pointer(nodes)).Flexeme = uint8(UNARY | 4)
		(*OpNode)(unsafe.Pointer(nodes)).Fmark = MARK_RIGHT
		for i = 2; i < objc-1; i++ {
			*(*uintptr)(unsafe.Pointer(litObjv + uintptr(2*(i-1)-1)*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
			(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(i-1)-1)*16)).Flexeme = *(*uint8)(unsafe.Pointer(bp /* lexeme */))
			(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(i-1)-1)*16)).Fmark = MARK_LEFT
			(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(i-1)-1)*16)).Fleft = OT_LITERAL
			(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(i-1)-1)*16)).Fright = OT_LITERAL

			*(*uintptr)(unsafe.Pointer(litObjv + uintptr(2*(i-1))*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
			(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(i-1))*16)).Flexeme = uint8(BINARY | 20)
			(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(i-1))*16)).Fmark = MARK_LEFT
			(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(i-1))*16)).Fleft = lastAnd
			*(*int32)(unsafe.Pointer(nodes + uintptr(lastAnd)*16 + 8)) = 2 * (i - 1)

			(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(i-1))*16)).Fright = 2*(i-1) + 1
			*(*int32)(unsafe.Pointer(nodes + uintptr(2*(i-1)+1)*16 + 8)) = 2 * (i - 1)

			lastAnd = 2 * (i - 1)
		}
		*(*uintptr)(unsafe.Pointer(litObjv + uintptr(2*(objc-2)-1)*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))

		(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(objc-2)-1)*16)).Flexeme = *(*uint8)(unsafe.Pointer(bp /* lexeme */))
		(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(objc-2)-1)*16)).Fmark = MARK_LEFT
		(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(objc-2)-1)*16)).Fleft = OT_LITERAL
		(*OpNode)(unsafe.Pointer(nodes + uintptr(2*(objc-2)-1)*16)).Fright = OT_LITERAL

		(*OpNode)(unsafe.Pointer(nodes)).Fright = lastAnd
		*(*int32)(unsafe.Pointer(nodes + uintptr(lastAnd)*16 + 8)) = 0

		code = sExecConstantExprTree(tls, interp, nodes, 0, bp+8)

		XTclStackFree(tls, interp, nodes)
		XTclStackFree(tls, interp, litObjv)
	}
	return code
}

//----------------------------------------------------------------------
//
// TclVariadicOpCmd --
//	Implements the commands: +, *, &, |, ^, **
//	in the ::tcl::mathop namespace. These commands are defined for
//	arbitrary number of arguments by repeatedly applying the base
//	operator with suitable associative rules. When fewer than two
//	arguments are provided, suitable identity values are returned.
//
// Results:
//	A standard Tcl return code and result left in interp.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclVariadicOpCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCompExpr.c:2667:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var occdPtr uintptr = clientData
	// var lexeme uint8 at bp, 1

	var code int32

	if objc < 2 {
		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(occdPtr + 16))))
		return TCL_OK
	}

	sParseLexeme(tls, (*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fop, int32(libc.Xstrlen(tls, (*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fop)), bp, uintptr(0))
	*(*uint8)(unsafe.Pointer(bp /* lexeme */)) |= uint8(BINARY)

	if objc == 2 {
		// var litObjv [2]uintptr at bp+8, 16

		// var nodes [2]OpNode at bp+24, 32

		var decrMe int32 = 0
		*(*uintptr)(unsafe.Pointer(bp + 56 /* litObjPtrPtr */)) = bp + 8 /* litObjv */

		if int32(*(*uint8)(unsafe.Pointer(bp))) == BINARY|24 {
			for ok := true; ok; ok = 0 != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)) = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).FrefCount = 0
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).Fbytes = uintptr(0)
				*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)) + 32)) = int32(*(*int32)(unsafe.Pointer(occdPtr + 16)))
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
				{
				}
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)))).FrefCount++
			decrMe = 1
			*(*uintptr)(unsafe.Pointer(bp + 8)) = *(*uintptr)(unsafe.Pointer(objv + 1*8))
			(*OpNode)(unsafe.Pointer(bp + 24)).Flexeme = uint8(UNARY | 4)
			(*OpNode)(unsafe.Pointer(bp + 24)).Fmark = MARK_RIGHT
			(*OpNode)(unsafe.Pointer(bp + 24)).Fright = 1
			(*OpNode)(unsafe.Pointer(bp + 24 + 1*16)).Flexeme = *(*uint8)(unsafe.Pointer(bp /* lexeme */))
			(*OpNode)(unsafe.Pointer(bp + 24 + 1*16)).Fmark = MARK_LEFT
			(*OpNode)(unsafe.Pointer(bp + 24 + 1*16)).Fleft = OT_LITERAL
			(*OpNode)(unsafe.Pointer(bp + 24 + 1*16)).Fright = OT_LITERAL
			*(*int32)(unsafe.Pointer(bp + 24 + 1*16 + 8)) = 0
		} else {
			if int32(*(*uint8)(unsafe.Pointer(bp))) == BINARY|5 {
				*(*uintptr)(unsafe.Pointer(bp + 8)) = XTcl_NewDoubleObj(tls, 1.0)
			} else {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					for ok3 := true; ok3; ok3 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						*(*uintptr)(unsafe.Pointer(bp + 8)) = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FrefCount = 0
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).Fbytes = uintptr(0)
					*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 32)) = int32(*(*int32)(unsafe.Pointer(occdPtr + 16)))
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
					{
					}
				}
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FrefCount++
			*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)) = *(*uintptr)(unsafe.Pointer(objv + 1*8))
			(*OpNode)(unsafe.Pointer(bp + 24)).Flexeme = uint8(UNARY | 4)
			(*OpNode)(unsafe.Pointer(bp + 24)).Fmark = MARK_RIGHT
			(*OpNode)(unsafe.Pointer(bp + 24)).Fright = 1
			(*OpNode)(unsafe.Pointer(bp + 24 + 1*16)).Flexeme = *(*uint8)(unsafe.Pointer(bp /* lexeme */))
			(*OpNode)(unsafe.Pointer(bp + 24 + 1*16)).Fmark = MARK_LEFT
			(*OpNode)(unsafe.Pointer(bp + 24 + 1*16)).Fleft = OT_LITERAL
			(*OpNode)(unsafe.Pointer(bp + 24 + 1*16)).Fright = OT_LITERAL
			*(*int32)(unsafe.Pointer(bp + 24 + 1*16 + 8)) = 0
		}

		code = sExecConstantExprTree(tls, interp, bp+24, 0, bp+56)

		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 8 + uintptr(decrMe)*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return code
	} else {
		*(*uintptr)(unsafe.Pointer(bp + 64 /* litObjv */)) = objv + uintptr(1)*8
		var nodes uintptr = XTclStackAlloc(tls, interp, int32(uint64(objc-1)*uint64(unsafe.Sizeof(OpNode{}))))
		var i int32
		var lastOp int32 = OT_LITERAL

		(*OpNode)(unsafe.Pointer(nodes)).Flexeme = uint8(UNARY | 4)
		(*OpNode)(unsafe.Pointer(nodes)).Fmark = MARK_RIGHT
		if int32(*(*uint8)(unsafe.Pointer(bp))) == BINARY|24 {
			for i = objc - 2; i > 0; i-- {
				(*OpNode)(unsafe.Pointer(nodes + uintptr(i)*16)).Flexeme = *(*uint8)(unsafe.Pointer(bp /* lexeme */))
				(*OpNode)(unsafe.Pointer(nodes + uintptr(i)*16)).Fmark = MARK_LEFT
				(*OpNode)(unsafe.Pointer(nodes + uintptr(i)*16)).Fleft = OT_LITERAL
				(*OpNode)(unsafe.Pointer(nodes + uintptr(i)*16)).Fright = lastOp
				if lastOp >= 0 {
					*(*int32)(unsafe.Pointer(nodes + uintptr(lastOp)*16 + 8)) = i
				}
				lastOp = i
			}
		} else {
			for i = 1; i < objc-1; i++ {
				(*OpNode)(unsafe.Pointer(nodes + uintptr(i)*16)).Flexeme = *(*uint8)(unsafe.Pointer(bp /* lexeme */))
				(*OpNode)(unsafe.Pointer(nodes + uintptr(i)*16)).Fmark = MARK_LEFT
				(*OpNode)(unsafe.Pointer(nodes + uintptr(i)*16)).Fleft = lastOp
				if lastOp >= 0 {
					*(*int32)(unsafe.Pointer(nodes + uintptr(lastOp)*16 + 8)) = i
				}
				(*OpNode)(unsafe.Pointer(nodes + uintptr(i)*16)).Fright = OT_LITERAL
				lastOp = i
			}
		}
		(*OpNode)(unsafe.Pointer(nodes)).Fright = lastOp
		*(*int32)(unsafe.Pointer(nodes + uintptr(lastOp)*16 + 8)) = 0

		code = sExecConstantExprTree(tls, interp, nodes, 0, bp+64)

		XTclStackFree(tls, interp, nodes)
		return code
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// TclNoIdentOpCmd --
//	Implements the commands: -, /
//	in the ::tcl::mathop namespace. These commands are defined for
//	arbitrary non-zero number of arguments by repeatedly applying the base
//	operator with suitable associative rules. When no arguments are
//	provided, an error is raised.
//
// Results:
//	A standard Tcl return code and result left in interp.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclNoIdentOpCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclCompExpr.c:2786:1: */
	var occdPtr uintptr = clientData

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, (*TclOpCmdClientData)(unsafe.Pointer(occdPtr)).Fexpected)
		return TCL_ERROR
	}
	return XTclVariadicOpCmd(tls, clientData, interp, objc, objv)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Static assertion.  Requires support in the compiler.

// Variable that controls whether compilation tracing is enabled and, if so,
// what level of tracing is desired:
//    0: no compilation tracing
//    1: summarize compilation of top level cmds and proc bodies
//    2: display all instructions of each ByteCode compiled
// This variable is linked to the Tcl variable "tcl_traceCompile".

// A table describing the Tcl bytecode instructions. Entries in this table
// must correspond to the instruction opcode definitions in tclCompile.h. The
// names "op1" and "op4" refer to an instruction's one or four byte first
// operand. Similarly, "stktop" and "stknext" refer to the topmost and next to
// topmost stack elements.
//
// Note that the load, store, and incr instructions do not distinguish local
// from global variables; the bytecode interpreter at runtime uses the
// existence of a procedure call frame to distinguish these.

var XtclInstructionTable = [191]InstructionDesc{
	// Name	      Bytes stackEffect #Opnds  Operand types
	{Fname: ts + 20677, FnumBytes: 1, FstackEffect: -1},
	// Finish ByteCode execution and return stktop (top stack item)
	{Fname: ts + 20682, FnumBytes: 2, FstackEffect: +1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LIT1}},
	// Push object at ByteCode objArray[op1]
	{Fname: ts + 20688, FnumBytes: 5, FstackEffect: +1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LIT4}},
	// Push object at ByteCode objArray[op4]
	{Fname: ts + 3586, FnumBytes: 1, FstackEffect: -1},
	// Pop the topmost stack object
	{Fname: ts + 2978, FnumBytes: 1, FstackEffect: +1},
	// Duplicate the topmost stack object and push the result
	{Fname: ts + 3750, FnumBytes: 2, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Concatenate the top op1 items and push result
	{Fname: ts + 20694, FnumBytes: 2, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Invoke command named objv[0]; <objc,objv> = <op1,top op1>
	{Fname: ts + 20705, FnumBytes: 5, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// Invoke command named objv[0]; <objc,objv> = <op4,top op4>
	{Fname: ts + 2999, FnumBytes: 1},
	// Evaluate command in stktop using Tcl_EvalObj.
	{Fname: ts + 3058, FnumBytes: 1},
	// Execute expression in stktop using Tcl_ExprStringObj.

	{Fname: ts + 20716, FnumBytes: 2, FstackEffect: 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Load scalar variable at index op1 <= 255 in call frame
	{Fname: ts + 20728, FnumBytes: 5, FstackEffect: 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Load scalar variable at index op1 >= 256 in call frame
	{Fname: ts + 20740, FnumBytes: 1},
	// Load scalar variable; scalar's name is stktop
	{Fname: ts + 20754, FnumBytes: 2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Load array element; array at slot op1<=255, element is stktop
	{Fname: ts + 20765, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Load array element; array at slot op1 > 255, element is stktop
	{Fname: ts + 3477, FnumBytes: 1, FstackEffect: -1},
	// Load array element; element is stktop, array name is stknext
	{Fname: ts + 3490, FnumBytes: 1},
	// Load general variable; unparsed variable name is stktop
	{Fname: ts + 20776, FnumBytes: 2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Store scalar variable at op1<=255 in frame; value is stktop
	{Fname: ts + 20789, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Store scalar variable at op1 > 255 in frame; value is stktop
	{Fname: ts + 20802, FnumBytes: 1, FstackEffect: -1},
	// Store scalar; value is stktop, scalar name is stknext
	{Fname: ts + 20817, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Store array element; array at op1<=255, value is top then elem
	{Fname: ts + 20829, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Store array element; array at op1>=256, value is top then elem
	{Fname: ts + 3681, FnumBytes: 1, FstackEffect: -2},
	// Store array element; value is stktop, then elem, array names
	{Fname: ts + 3695, FnumBytes: 1, FstackEffect: -1},
	// Store general variable; value is stktop, then unparsed name

	{Fname: ts + 20841, FnumBytes: 2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Incr scalar at index op1<=255 in frame; incr amount is stktop
	{Fname: ts + 20853, FnumBytes: 1, FstackEffect: -1},
	// Incr scalar; incr amount is stktop, scalar's name is stknext
	{Fname: ts + 20867, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Incr array elem; arr at slot op1<=255, amount is top then elem
	{Fname: ts + 3100, FnumBytes: 1, FstackEffect: -2},
	// Incr array element; amount is top then elem then array names
	{Fname: ts + 3137, FnumBytes: 1, FstackEffect: -1},
	// Incr general variable; amount is stktop then unparsed var name
	{Fname: ts + 20878, FnumBytes: 3, FstackEffect: +1, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_LVT1, OPERAND_INT1}},
	// Incr scalar at slot op1 <= 255; amount is 2nd operand byte
	{Fname: ts + 20893, FnumBytes: 2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_INT1}},
	// Incr scalar; scalar name is stktop; incr amount is op1
	{Fname: ts + 20910, FnumBytes: 3, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_LVT1, OPERAND_INT1}},
	// Incr array elem; array at slot op1 <= 255, elem is stktop,
	// amount is 2nd operand byte
	{Fname: ts + 3113, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_INT1}},
	// Incr array element; elem is top then array name, amount is op1
	{Fname: ts + 3145, FnumBytes: 2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_INT1}},
	// Incr general variable; unparsed name is top, amount is op1

	{Fname: ts + 20924, FnumBytes: 2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_OFFSET1}},
	// Jump relative to (pc + op1)
	{Fname: ts + 3201, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_OFFSET4}},
	// Jump relative to (pc + op4)
	{Fname: ts + 20930, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_OFFSET1}},
	// Jump relative to (pc + op1) if stktop expr object is true
	{Fname: ts + 3247, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_OFFSET4}},
	// Jump relative to (pc + op4) if stktop expr object is true
	{Fname: ts + 20940, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_OFFSET1}},
	// Jump relative to (pc + op1) if stktop expr object is false
	{Fname: ts + 3217, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_OFFSET4}},
	// Jump relative to (pc + op4) if stktop expr object is false

	{Fname: ts + 3498, FnumBytes: 1, FstackEffect: -1},
	// Logical or:	push (stknext || stktop)
	{Fname: ts + 3263, FnumBytes: 1, FstackEffect: -1},
	// Logical and:	push (stknext && stktop)
	{Fname: ts + 2791, FnumBytes: 1, FstackEffect: -1},
	// Bitwise or:	push (stknext | stktop)
	{Fname: ts + 2797, FnumBytes: 1, FstackEffect: -1},
	// Bitwise xor	push (stknext ^ stktop)
	{Fname: ts + 2777, FnumBytes: 1, FstackEffect: -1},
	// Bitwise and:	push (stknext & stktop)
	{Fname: ts + 2991, FnumBytes: 1, FstackEffect: -1},
	// Equal:	push (stknext == stktop)
	{Fname: ts + 3539, FnumBytes: 1, FstackEffect: -1},
	// Not equal:	push (stknext != stktop)
	{Fname: ts + 3527, FnumBytes: 1, FstackEffect: -1},
	// Less:	push (stknext < stktop)
	{Fname: ts + 3069, FnumBytes: 1, FstackEffect: -1},
	// Greater:	push (stknext > stktop)
	{Fname: ts + 3380, FnumBytes: 1, FstackEffect: -1},
	// Less or equal: push (stknext <= stktop)
	{Fname: ts + 3066, FnumBytes: 1, FstackEffect: -1},
	// Greater or equal: push (stknext >= stktop)
	{Fname: ts + 3520, FnumBytes: 1, FstackEffect: -1},
	// Left shift:	push (stknext << stktop)
	{Fname: ts + 3657, FnumBytes: 1, FstackEffect: -1},
	// Right shift:	push (stknext >> stktop)
	{Fname: ts + 2662, FnumBytes: 1, FstackEffect: -1},
	// Add:		push (stknext + stktop)
	{Fname: ts + 3872, FnumBytes: 1, FstackEffect: -1},
	// Sub:		push (stkext - stktop)
	{Fname: ts + 3534, FnumBytes: 1, FstackEffect: -1},
	// Multiply:	push (stknext * stktop)
	{Fname: ts + 2974, FnumBytes: 1, FstackEffect: -1},
	// Divide:	push (stknext / stktop)
	{Fname: ts + 3530, FnumBytes: 1, FstackEffect: -1},
	// Mod:		push (stknext % stktop)
	{Fname: ts + 4005, FnumBytes: 1},
	// Unary plus:	push +stktop
	{Fname: ts + 3958, FnumBytes: 1},
	// Unary minus:	push -stktop
	{Fname: ts + 2784, FnumBytes: 1},
	// Bitwise not:	push ~stktop
	{Fname: ts + 3547, FnumBytes: 1},
	// Logical not:	push !stktop
	{Fname: ts + 20951, FnumBytes: 2, FstackEffect: 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Call builtin math function with index op1; any args are on stk
	{Fname: ts + 20968, FnumBytes: 2, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Call non-builtin func objv[0]; <objc,objv>=<op1,top op1>
	{Fname: ts + 3942, FnumBytes: 1},
	// Try converting stktop to first int then double if possible.

	{Fname: ts + 5685, FnumBytes: 1},
	// Abort closest enclosing loop; if none, return TCL_BREAK code.
	{Fname: ts + 5702, FnumBytes: 1},
	// Skip to next iteration of closest enclosing loop; if none, return
	// TCL_CONTINUE code.

	{Fname: ts + 20978, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_AUX4}},
	// Initialize execution of a foreach loop. Operand is aux data index
	// of the ForeachInfo structure for the foreach command.
	{Fname: ts + 20993, FnumBytes: 5, FstackEffect: +1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_AUX4}},
	// "Step" or begin next iteration of foreach loop. Push 0 if to
	// terminate loop, else push 1.

	{Fname: ts + 21007, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// Record start of catch with the operand's exception index. Push the
	// current stack depth onto a special catch stack.
	{Fname: ts + 2982, FnumBytes: 1},
	// End of last catch. Pop the bytecode interpreter's catch stack.
	{Fname: ts + 3620, FnumBytes: 1, FstackEffect: +1},
	// Push the interpreter's object result onto the stack.
	{Fname: ts + 3590, FnumBytes: 1, FstackEffect: +1},
	// Push interpreter's return code (e.g. TCL_OK or TCL_ERROR) as a new
	// object onto the stack.

	{Fname: ts + 3757, FnumBytes: 1, FstackEffect: -1},
	// Str Equal:	push (stknext eq stktop)
	{Fname: ts + 3803, FnumBytes: 1, FstackEffect: -1},
	// Str !Equal:	push (stknext neq stktop)
	{Fname: ts + 3743, FnumBytes: 1, FstackEffect: -1},
	// Str Compare:	push (stknext cmp stktop)
	{Fname: ts + 3780, FnumBytes: 1},
	// Str Length:	push (strlen stktop)
	{Fname: ts + 3771, FnumBytes: 1, FstackEffect: -1},
	// Str Index:	push (strindex stknext stktop)
	{Fname: ts + 3794, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_INT1}},
	// Str Match:	push (strmatch stknext stktop) opnd == nocase

	{Fname: ts + 3395, FnumBytes: 5, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// List:	push (stk1 stk2 ... stktop)
	{Fname: ts + 3418, FnumBytes: 1, FstackEffect: -1},
	// List Index:	push (listindex stknext stktop)
	{Fname: ts + 3441, FnumBytes: 1},
	// List Len:	push (listlength stktop)

	{Fname: ts + 21019, FnumBytes: 2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Append scalar variable at op1<=255 in frame; value is stktop
	{Fname: ts + 21033, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Append scalar variable at op1 > 255 in frame; value is stktop
	{Fname: ts + 21047, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Append array element; array at op1<=255, value is top then elem
	{Fname: ts + 21060, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Append array element; array at op1>=256, value is top then elem
	{Fname: ts + 2685, FnumBytes: 1, FstackEffect: -2},
	// Append array element; value is stktop, then elem, array names
	{Fname: ts + 2700, FnumBytes: 1, FstackEffect: -1},
	// Append general variable; value is stktop, then unparsed name
	{Fname: ts + 21073, FnumBytes: 2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Lappend scalar variable at op1<=255 in frame; value is stktop
	{Fname: ts + 21088, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Lappend scalar variable at op1 > 255 in frame; value is stktop
	{Fname: ts + 21103, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT1}},
	// Lappend array element; array at op1<=255, value is top then elem
	{Fname: ts + 21117, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Lappend array element; array at op1>=256, value is top then elem
	{Fname: ts + 3289, FnumBytes: 1, FstackEffect: -2},
	// Lappend array element; value is stktop, then elem, array names
	{Fname: ts + 3369, FnumBytes: 1, FstackEffect: -1},
	// Lappend general variable; value is stktop, then unparsed name

	{Fname: ts + 3383, FnumBytes: 5, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// Lindex with generalized args, operand is number of stacked objs
	// used: (operand-1) entries from stktop are the indices; then list to
	// process.
	{Fname: ts + 3581, FnumBytes: 5, FstackEffect: +1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// Duplicate the arg-th element from top of stack (TOS=0)
	{Fname: ts + 3511, FnumBytes: 1, FstackEffect: -2},
	// Four-arg version of 'lset'. stktop is old value; next is new
	// element value, next is the index list; pushes new value
	{Fname: ts + 3502, FnumBytes: 5, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// Three- or >=5-arg version of 'lset', operand is number of stacked
	// objs: stktop is old value, next is new element value, next come
	// (operand-2) indices; pushes the new value.

	{Fname: ts + 21131, FnumBytes: 9, FstackEffect: -1, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_INT4, OPERAND_UINT4}},
	// Compiled [return], code, level are operands; options and result
	// are on the stack.
	{Fname: ts + 3047, FnumBytes: 1, FstackEffect: -1},
	// Binary exponentiation operator: push (stknext ** stktop)

	// NOTE: the stack effects of expandStkTop and invokeExpanded are wrong -
	// but it cannot be done right at compile time, the stack effect is only
	// known at run time. The value for invokeExpanded is estimated better at
	// compile time.
	// See the comments further down in this file, where INST_INVOKE_EXPANDED
	// is emitted.
	{Fname: ts + 21141, FnumBytes: 1},
	// Start of command with {*} (expanded) arguments
	{Fname: ts + 21153, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// Expand the list at stacktop: push its elements on the stack
	{Fname: ts + 21166, FnumBytes: 1},
	// Invoke the command marked by the last 'expandStart'

	{Fname: ts + 3428, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_IDX4}},
	// List Index:	push (lindex stktop op4)
	{Fname: ts + 21181, FnumBytes: 9, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_IDX4, OPERAND_IDX4}},
	// List Range:	push (lrange stktop op4 op4)
	{Fname: ts + 21194, FnumBytes: 9, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_OFFSET4, OPERAND_UINT4}},
	// Start of bytecoded command: op is the length of the cmd's code, op2
	// is number of commands here

	{Fname: ts + 3411, FnumBytes: 1, FstackEffect: -1},
	// List containment: push [lsearch stktop stknext]>=0)
	{Fname: ts + 3452, FnumBytes: 1, FstackEffect: -1},
	// List negated containment: push [lsearch stktop stknext]<0)

	{Fname: ts + 3605, FnumBytes: 1, FstackEffect: +1},
	// Push the interpreter's return option dictionary as an object on the
	// stack.
	{Fname: ts + 21207, FnumBytes: 1, FstackEffect: -1},
	// Compiled [return]; options and result are on the stack, code and
	// level are in the options.

	{Fname: ts + 2890, FnumBytes: 5, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// The top op4 words (min 1) are a key path into the dictionary just
	// below the keys on the stack, and all those values are replaced by
	// the value read out of that key-path (like [dict get]).
	// Stack:  ... dict key1 ... keyN => ... value
	{Fname: ts + 2956, FnumBytes: 9, FstackEffect: -0x7fffffff - 1, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_UINT4, OPERAND_LVT4}},
	// Update a dictionary value such that the keys are a path pointing to
	// the value. op4#1 = numKeys, op4#2 = LVTindex
	// Stack:  ... key1 ... keyN value => ... newDict
	{Fname: ts + 2964, FnumBytes: 9, FstackEffect: -0x7fffffff - 1, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_UINT4, OPERAND_LVT4}},
	// Update a dictionary value such that the keys are not a path pointing
	// to any value. op4#1 = numKeys, op4#2 = LVTindex
	// Stack:  ... key1 ... keyN => ... newDict
	{Fname: ts + 2898, FnumBytes: 9, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_INT4, OPERAND_LVT4}},
	// Update a dictionary value such that the value pointed to by key is
	// incremented by some value (or set to it if the key isn't in the
	// dictionary at all). op4#1 = incrAmount, op4#2 = LVTindex
	// Stack:  ... key => ... newDict
	{Fname: ts + 2857, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Update a dictionary value such that the value pointed to by key has
	// some value string-concatenated onto it. op4 = LVTindex
	// Stack:  ... key valueToAppend => ... newDict
	{Fname: ts + 2910, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Update a dictionary value such that the value pointed to by key has
	// some value list-appended onto it. op4 = LVTindex
	// Stack:  ... key valueToAppend => ... newDict
	{Fname: ts + 21217, FnumBytes: 5, FstackEffect: +2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Begin iterating over the dictionary, using the local scalar
	// indicated by op4 to hold the iterator state. The local scalar
	// should not refer to a named variable as the value is not wholly
	// managed correctly.
	// Stack:  ... dict => ... value key doneBool
	{Fname: ts + 21227, FnumBytes: 5, FstackEffect: +3, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Get the next iteration from the iterator in op4's local scalar.
	// Stack:  ... => ... value key doneBool
	{Fname: ts + 21236, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Terminate the iterator in op4's local scalar. Use unsetScalar
	// instead (with 0 for flags).
	{Fname: ts + 21245, FnumBytes: 9, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_LVT4, OPERAND_AUX4}},
	// Create the variables (described in the aux data referred to by the
	// second immediate argument) to mirror the state of the dictionary in
	// the variable referred to by the first immediate argument. The list
	// of keys (top of the stack, not popped) must be the same length as
	// the list of variables.
	// Stack:  ... keyList => ... keyList
	{Fname: ts + 21261, FnumBytes: 9, FstackEffect: -1, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_LVT4, OPERAND_AUX4}},
	// Reflect the state of local variables (described in the aux data
	// referred to by the second immediate argument) back to the state of
	// the dictionary in the variable referred to by the first immediate
	// argument. The list of keys (popped from the stack) must be the same
	// length as the list of variables.
	// Stack:  ... keyList => ...
	{Fname: ts + 3228, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_AUX4}},
	// Jump according to the jump-table (in AuxData as indicated by the
	// operand) and the argument popped from the list. Always executes the
	// next instruction if no match against the table's entries was found.
	// Stack:  ... value => ...
	// Note that the jump table contains offsets relative to the PC when
	// it points to this instruction; the code is relocatable.
	{Fname: ts + 4011, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// finds level and otherName in stack, links to local variable at
	// index op1. Leaves the level on stack.
	{Fname: ts + 3551, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// finds namespace and otherName in stack, links to local variable at
	// index op1. Leaves the namespace on stack.
	{Fname: ts + 4017, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// finds namespace and otherName in stack, links to local variable at
	// index op1. Leaves the namespace on stack.
	{Fname: ts + 21275, FnumBytes: 9, FstackEffect: -1, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_INT4, OPERAND_UINT4}},
	// Compiled bytecodes to signal syntax error. Equivalent to returnImm
	// except for the ERR_ALREADY_LOGGED flag in the interpreter.
	{Fname: ts + 3649, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// Reverse the order of the arg elements at the top of stack

	{Fname: ts + 3631, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_INT1}},
	// Regexp:	push (regexp stknext stktop) opnd == nocase

	{Fname: ts + 21282, FnumBytes: 5, FstackEffect: 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Test if scalar variable at index op1 in call frame exists
	{Fname: ts + 3013, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Test if array element exists; array at slot op1, element is
	// stktop
	{Fname: ts + 3024, FnumBytes: 1, FstackEffect: -1},
	// Test if array element exists; element is stktop, array name is
	// stknext
	{Fname: ts + 3038, FnumBytes: 1},
	// Test if general variable exists; unparsed variable name is stktop

	{Fname: ts + 3543, FnumBytes: 1},
	// Do nothing
	{Fname: ts + 21294, FnumBytes: 1, FstackEffect: -1},
	// Jump to next instruction based on the return code on top of stack
	// ERROR: +1;	RETURN: +3;	BREAK: +5;	CONTINUE: +7;
	// Other non-OK: +9

	{Fname: ts + 21311, FnumBytes: 6, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_UINT1, OPERAND_LVT4}},
	// Make scalar variable at index op2 in call frame cease to exist;
	// op1 is 1 for errors on problems, 0 otherwise
	{Fname: ts + 3971, FnumBytes: 6, FstackEffect: -1, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_UINT1, OPERAND_LVT4}},
	// Make array element cease to exist; array at slot op2, element is
	// stktop; op1 is 1 for errors on problems, 0 otherwise
	{Fname: ts + 3982, FnumBytes: 2, FstackEffect: -2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Make array element cease to exist; element is stktop, array name is
	// stknext; op1 is 1 for errors on problems, 0 otherwise
	{Fname: ts + 3996, FnumBytes: 2, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Make general variable cease to exist; unparsed variable name is
	// stktop; op1 is 1 for errors on problems, 0 otherwise

	{Fname: ts + 2879, FnumBytes: 1, FstackEffect: -1},
	// Probe into a dict and extract it (or a subdict of it) into
	// variables with matched names. Produces list of keys bound as
	// result. Part of [dict with].
	// Stack:  ... dict path => ... keyList
	{Fname: ts + 2922, FnumBytes: 1, FstackEffect: -3},
	// Map variable contents back into a dictionary in a variable. Part of
	// [dict with].
	// Stack:  ... dictVarName path keyList => ...
	{Fname: ts + 2939, FnumBytes: 5, FstackEffect: -2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Map variable contents back into a dictionary in the local variable
	// indicated by the LVT index. Part of [dict with].
	// Stack:  ... path keyList => ...
	{Fname: ts + 2868, FnumBytes: 5, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// The top op4 words (min 1) are a key path into the dictionary just
	// below the keys on the stack, and all those values are replaced by a
	// boolean indicating whether it is possible to read out a value from
	// that key-path (like [dict exists]).
	// Stack:  ... dict key1 ... keyN => ... boolean
	{Fname: ts + 4026, FnumBytes: 1, FstackEffect: -1},
	// Verifies that the word on the top of the stack is a dictionary,
	// popping it if it is and throwing an error if it is not.
	// Stack:  ... value => ...

	{Fname: ts + 3787, FnumBytes: 1, FstackEffect: -2},
	// Simplified version of [string map] that only applies one change
	// string, and only case-sensitively.
	// Stack:  ... from to string => ... changedString
	{Fname: ts + 3763, FnumBytes: 1, FstackEffect: -1},
	// Find the first index of a needle string in a haystack string,
	// producing the index (integer) or -1 if nothing found.
	// Stack:  ... needle haystack => ... index
	{Fname: ts + 3830, FnumBytes: 1, FstackEffect: -1},
	// Find the last index of a needle string in a haystack string,
	// producing the index (integer) or -1 if nothing found.
	// Stack:  ... needle haystack => ... index
	{Fname: ts + 21323, FnumBytes: 9, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_IDX4, OPERAND_IDX4}},
	// String Range: push (string range stktop op4 op4)
	{Fname: ts + 3810, FnumBytes: 1, FstackEffect: -2},
	// String Range with non-constant arguments.
	// Stack:  ... string idxA idxB => ... substring

	{Fname: ts + 4037, FnumBytes: 1},
	// Makes the current coroutine yield the value at the top of the
	// stack, and places the response back on top of the stack when it
	// resumes.
	// Stack:  ... valueToYield => ... resumeValue
	{Fname: ts + 2831, FnumBytes: 1, FstackEffect: +1},
	// Push the name of the interpreter's current coroutine as an object
	// on the stack.
	{Fname: ts + 5911, FnumBytes: 2, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Do a tailcall with the opnd items on the stack as the thing to
	// tailcall to; opnd must be greater than 0 for the semantics to work
	// right.

	{Fname: ts + 2840, FnumBytes: 1, FstackEffect: +1},
	// Push the name of the interpreter's current namespace as an object
	// on the stack.
	{Fname: ts + 3170, FnumBytes: 1, FstackEffect: +1},
	// Push the stack depth (i.e., [info level]) of the interpreter as an
	// object on the stack.
	{Fname: ts + 3156, FnumBytes: 1},
	// Push the argument words to a stack depth (i.e., [info level <n>])
	// of the interpreter as an object on the stack.
	// Stack:  ... depth => ... argList
	{Fname: ts + 3638, FnumBytes: 1},
	// Resolves the command named on the top of the stack to its fully
	// qualified version, or produces the empty string if no such command
	// exists. Never generates errors.
	// Stack:  ... cmdName => ... fullCmdName

	{Fname: ts + 3916, FnumBytes: 1, FstackEffect: +1},
	// Push the identity of the current TclOO object (i.e., the name of
	// its current public access command) on the stack.
	{Fname: ts + 3876, FnumBytes: 1},
	// Push the class of the TclOO object named at the top of the stack
	// onto the stack.
	// Stack:  ... object => ... class
	{Fname: ts + 3901, FnumBytes: 1},
	// Push the namespace of the TclOO object named at the top of the
	// stack onto the stack.
	// Stack:  ... object => ... namespace
	{Fname: ts + 3887, FnumBytes: 1},
	// Push whether the value named at the top of the stack is a TclOO
	// object (i.e., a boolean). Can corrupt the interpreter result
	// despite not throwing, so not safe for use in a post-exception
	// context.
	// Stack:  ... value => ... boolean

	{Fname: ts + 2725, FnumBytes: 1},
	// Looks up the element on the top of the stack and tests whether it
	// is an array. Pushes a boolean describing whether this is the
	// case. Also runs the whole-array trace on the named variable, so can
	// throw anything.
	// Stack:  ... varName => ... boolean
	{Fname: ts + 2710, FnumBytes: 5, FstackEffect: +1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Looks up the variable indexed by opnd and tests whether it is an
	// array. Pushes a boolean describing whether this is the case. Also
	// runs the whole-array trace on the named variable, so can throw
	// anything.
	// Stack:  ... => ... boolean
	{Fname: ts + 2753, FnumBytes: 1, FstackEffect: -1},
	// Forces the element on the top of the stack to be the name of an
	// array.
	// Stack:  ... varName => ...
	{Fname: ts + 2740, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Forces the variable indexed by opnd to be an array. Does not touch
	// the stack.

	{Fname: ts + 21335, FnumBytes: 6, FstackEffect: -0x7fffffff - 1, FnumOperands: 2, FopTypes: [2]InstOperandType{OPERAND_UINT4, OPERAND_UINT1}},
	// Invoke command named objv[0], replacing the first two words with
	// the word at the top of the stack;
	// <objc,objv> = <op4,top op4 after popping 1>

	{Fname: ts + 3400, FnumBytes: 1, FstackEffect: -1},
	// Concatenates the two lists at the top of the stack into a single
	// list and pushes that resulting list onto the stack.
	// Stack: ... list1 list2 => ... [lconcat list1 list2]

	{Fname: ts + 21349, FnumBytes: 1},
	// Drops an element from the auxiliary stack, popping stack elements
	// until the matching stack depth is reached.

	// New foreach implementation
	{Fname: ts + 21360, FnumBytes: 5, FstackEffect: +2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_AUX4}},
	// Initialize execution of a foreach loop. Operand is aux data index
	// of the ForeachInfo structure for the foreach command. It pushes 2
	// elements which hold runtime params for foreach_step, they are later
	// dropped by foreach_end together with the value lists. NOTE that the
	// iterator-tracker and info reference must not be passed to bytecodes
	// that handle normal Tcl values. NOTE that this instruction jumps to
	// the foreach_step instruction paired with it; the stack info below
	// is only nominal.
	// Stack: ... listObjs... => ... listObjs... iterTracker info
	{Fname: ts + 21374, FnumBytes: 1},
	// "Step" or begin next iteration of foreach loop. Assigns to foreach
	// iteration variables. May jump to straight after the foreach_start
	// that pushed the iterTracker and info values. MUST be followed
	// immediately by a foreach_end.
	// Stack: ... listObjs... iterTracker info =>
	//				... listObjs... iterTracker info
	{Fname: ts + 21387, FnumBytes: 1},
	// Clean up a foreach loop by dropping the info value, the tracker
	// value and the lists that were being iterated over.
	// Stack: ... listObjs... iterTracker info => ...
	{Fname: ts + 21399, FnumBytes: 1, FstackEffect: -1},
	// Appends the value at the top of the stack to the list located on
	// the stack the "other side" of the foreach-related values.
	// Stack: ... collector listObjs... iterTracker info value =>
	//			... collector listObjs... iterTracker info

	{Fname: ts + 3839, FnumBytes: 1, FstackEffect: -1},
	// [string trim] core: removes the characters (designated by the value
	// at the top of the stack) from both ends of the string and pushes
	// the resulting string.
	// Stack: ... string charset => ... trimmedString
	{Fname: ts + 3847, FnumBytes: 1, FstackEffect: -1},
	// [string trimleft] core: removes the characters (designated by the
	// value at the top of the stack) from the left of the string and
	// pushes the resulting string.
	// Stack: ... string charset => ... trimmedString
	{Fname: ts + 3859, FnumBytes: 1, FstackEffect: -1},
	// [string trimright] core: removes the characters (designated by the
	// value at the top of the stack) from the right of the string and
	// pushes the resulting string.
	// Stack: ... string charset => ... trimmedString

	{Fname: ts + 2821, FnumBytes: 5, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT4}},
	// Wrapper round Tcl_ConcatObj(), used for [concat] and [eval]. opnd
	// is number of values to concatenate.
	// Operation:	push concat(stk1 stk2 ... stktop)

	{Fname: ts + 3730, FnumBytes: 1},
	// [string toupper] core: converts whole string to upper case using
	// the default (extended "C" locale) rules.
	// Stack: ... string => ... newString
	{Fname: ts + 3704, FnumBytes: 1},
	// [string tolower] core: converts whole string to upper case using
	// the default (extended "C" locale) rules.
	// Stack: ... string => ... newString
	{Fname: ts + 3717, FnumBytes: 1},
	// [string totitle] core: converts whole string to upper case using
	// the default (extended "C" locale) rules.
	// Stack: ... string => ... newString
	{Fname: ts + 3819, FnumBytes: 1, FstackEffect: -3},
	// [string replace] core: replaces a non-empty range of one string
	// with the contents of another.
	// Stack: ... string fromIdx toIdx replacement => ... newString

	{Fname: ts + 3571, FnumBytes: 1},
	// Reports which command was the origin (via namespace import chain)
	// of the command named on the top of the stack.
	// Stack:  ... cmdName => ... fullOriginalCmdName

	{Fname: ts + 21412, FnumBytes: 2, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Call the next item on the TclOO call chain, passing opnd arguments
	// (min 1, max 255, *includes* "next").  The result of the invoked
	// method implementation will be pushed on the stack in place of the
	// arguments (similar to invokeStk).
	// Stack:  ... "next" arg2 arg3 -- argN => ... result
	{Fname: ts + 21422, FnumBytes: 2, FstackEffect: -0x7fffffff - 1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Call the following item on the TclOO call chain defined by class
	// className, passing opnd arguments (min 2, max 255, *includes*
	// "nextto" and the class name). The result of the invoked method
	// implementation will be pushed on the stack in place of the
	// arguments (similar to invokeStk).
	// Stack:  ... "nextto" className arg3 arg4 -- argN => ... result

	{Fname: ts + 21437, FnumBytes: 1},
	// Makes the current coroutine yield the value at the top of the
	// stack, invoking the given command/args with resolution in the given
	// namespace (all packed into a list), and places the list of values
	// that are the response back on top of the stack when it resumes.
	// Stack:  ... [list ns cmd arg1 ... argN] => ... resumeList

	{Fname: ts + 3559, FnumBytes: 1},
	// Pushes the numeric type code of the word at the top of the stack.
	// Stack:  ... value => ... typeCode
	{Fname: ts + 3926, FnumBytes: 1, FstackEffect: +1},
	// Try converting stktop to boolean if possible. No errors.
	// Stack:  ... value => ... value isStrictBool
	{Fname: ts + 21451, FnumBytes: 2, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_SCLS1}},
	// See if all the characters of the given string are a member of the
	// specified (by opnd) character class. Note that an empty string will
	// satisfy the class check (standard definition of "all").
	// Stack:  ... stringValue => ... boolean

	{Fname: ts + 3305, FnumBytes: 5, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Lappend list to scalar variable at op4 in frame.
	// Stack:  ... list => ... listVarContents
	{Fname: ts + 3317, FnumBytes: 5, FstackEffect: -1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_LVT4}},
	// Lappend list to array element; array at op4.
	// Stack:  ... elem list => ... listVarContents
	{Fname: ts + 3334, FnumBytes: 1, FstackEffect: -2},
	// Lappend list to array element.
	// Stack:  ... arrayName elem list => ... listVarContents
	{Fname: ts + 3354, FnumBytes: 1, FstackEffect: -1},
	// Lappend list to general variable.
	// Stack:  ... varName list => ... listVarContents

	{Fname: ts + 2804, FnumBytes: 2, FstackEffect: +1, FnumOperands: 1, FopTypes: [2]InstOperandType{0: OPERAND_UINT1}},
	// Read clock out to the stack. Operand is which clock to read
	// 0=clicks, 1=microseconds, 2=milliseconds, 3=seconds.
	// Stack: ... => ... time

	{}} /* tclCompile.c:45:23 */

// The structure below defines the bytecode Tcl object type by means of
// procedures that can be invoked by generic object code.

var XtclByteCodeType = Tcl_ObjType{
	Fname:           ts + 21460,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // updateStringProc
	FsetFromAnyProc: 0, // setFromAnyProc
} /* tclCompile.c:706:19 */

// The structure below defines a bytecode Tcl object type to hold the
// compiled bytecode for the [subst]itution of Tcl values.

var substCodeType = Tcl_ObjType{
	Fname:           ts + 21469,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // setFromAnyProc
} /* tclCompile.c:719:26 */

// Helper macros.

//----------------------------------------------------------------------
//
// TclSetByteCodeFromAny --
//
//	Part of the bytecode Tcl object type implementation. Attempts to
//	generate an byte code internal form for the Tcl object "objPtr" by
//	compiling its string representation. This function also takes a hook
//	procedure that will be invoked to perform any needed post processing
//	on the compilation results before generating byte codes. interp is
//	compilation context and may not be NULL.
//
// Results:
//	The return value is a standard Tcl object result. If an error occurs
//	during compilation, an error message is left in the interpreter's
//	result.
//
// Side effects:
//	Frees the old internal representation. If no error occurs, then the
//	compiled code is stored as "objPtr"s bytecode representation. Also, if
//	debugging, initializes the "tcl_traceCompile" Tcl variable used to
//	trace compilations.
//
//----------------------------------------------------------------------

func XTclSetByteCodeFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr, hookProc uintptr, clientData ClientData) int32 { /* tclCompile.c:761:1: */
	bp := tls.Alloc(3592)
	defer tls.Free(3592)

	var iPtr uintptr = interp
	// var compEnv CompileEnv at bp+8, 3584
	// Compilation environment structure allocated
	// in frame.
	// var length int32 at bp, 4

	var result int32 = TCL_OK
	var stringPtr uintptr
	var procPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FcompiledProcPtr
	var clLocPtr uintptr

	stringPtr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp)
	}()

	// TIP #280: Pick up the CmdFrame in which the BC compiler was invoked and
	// use to initialize the tracking in the compiler. This information was
	// stored by TclCompEvalObj and ProcCompileProc.

	XTclInitCompileEnv(tls, interp, bp+8, stringPtr, *(*int32)(unsafe.Pointer(bp /* length */)),
		(*Interp)(unsafe.Pointer(iPtr)).FinvokeCmdFramePtr, (*Interp)(unsafe.Pointer(iPtr)).FinvokeWord)

	// Now we check if we have data about invisible continuation lines for the
	// script, and make it available to the compile environment, if so.
	//
	// It is not clear if the script Tcl_Obj* can be free'd while the compiler
	// is using it, leading to the release of the associated ContLineLoc
	// structure as well. To ensure that the latter doesn't happen we set a
	// lock on it. We release this lock in the function TclFreeCompileEnv(),
	// found in this file. The "lineCLPtr" hashtable is managed in the file
	// "tclObj.c".

	clLocPtr = XTclContinuationsGet(tls, objPtr)
	if clLocPtr != 0 {
		(*CompileEnv)(unsafe.Pointer(bp + 8 /* &compEnv */)).FclNext = clLocPtr + 4
	}

	XTclCompileScript(tls, interp, stringPtr, *(*int32)(unsafe.Pointer(bp /* length */)), bp+8)

	// Successful compilation. Add a "done" instruction at the end.

	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext == (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeEnd {
			XTclExpandCodeArray(tls, bp+8)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(INST_DONE)
		if (*CompileEnv)(unsafe.Pointer(bp+8)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(bp + 8)).FatCmdStart = func() int32 {
				if INST_DONE == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_DONE].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(bp+8)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(bp+8)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(bp + 8)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(bp + 8)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(bp + 8 + 48)) += _delta
				}
			}
		}
	}

	// Check for optimizations!
	//
	// Test if the generated code is free of most hazards; if so, recompile
	// but with generation of INST_START_CMD disabled. This produces somewhat
	// faster code in some cases, and more compact code in more.

	if XTcl_GetMaster(tls, interp) == uintptr(0) && !(XTcl_LimitTypeEnabled(tls, interp, TCL_LIMIT_COMMANDS|TCL_LIMIT_TIME) != 0) &&
		sIsCompactibleCompileEnv(tls, interp, bp+8) != 0 {
		XTclFreeCompileEnv(tls, bp+8)
		(*Interp)(unsafe.Pointer(iPtr)).FcompiledProcPtr = procPtr
		XTclInitCompileEnv(tls, interp, bp+8, stringPtr, *(*int32)(unsafe.Pointer(bp /* length */)),
			(*Interp)(unsafe.Pointer(iPtr)).FinvokeCmdFramePtr, (*Interp)(unsafe.Pointer(iPtr)).FinvokeWord)
		if clLocPtr != 0 {
			(*CompileEnv)(unsafe.Pointer(bp + 8 /* &compEnv */)).FclNext = clLocPtr + 4
		}
		(*CompileEnv)(unsafe.Pointer(bp + 8 /* &compEnv */)).FatCmdStart = 2 // The disabling magic.
		XTclCompileScript(tls, interp, stringPtr, *(*int32)(unsafe.Pointer(bp /* length */)), bp+8)

		for ok3 := true; ok3; ok3 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext == (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeEnd {
				XTclExpandCodeArray(tls, bp+8)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(INST_DONE)
			if (*CompileEnv)(unsafe.Pointer(bp+8)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(bp + 8)).FatCmdStart = func() int32 {
					if INST_DONE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DONE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(bp+8)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(bp+8)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(bp + 8)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(bp + 8)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(bp + 8 + 48)) += _delta
					}
				}
			}
		}

	}

	// Apply some peephole optimizations that can cross specific/generic
	// instruction generator boundaries.

	if *(*uintptr)(unsafe.Pointer(iPtr + 64)) != 0 {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(iPtr + 64 /* &.extra */))})).f(tls, bp+8 /* &compEnv */)
	}

	// Invoke the compilation hook procedure if one exists.

	if hookProc != 0 {
		result = (*struct {
			f func(*libc.TLS, uintptr, uintptr, ClientData) int32
		})(unsafe.Pointer(&struct{ uintptr }{hookProc})).f(tls, interp, bp+8 /* &compEnv */, clientData)
	}

	// Change the object into a ByteCode object. Ownership of the literal
	// objects and aux data items is given to the ByteCode object.

	if result == TCL_OK {
		XTclInitByteCodeObj(tls, objPtr, bp+8)
	}

	XTclFreeCompileEnv(tls, bp+8)
	return result
}

//-----------------------------------------------------------------------
//
// SetByteCodeFromAny --
//
//	Part of the bytecode Tcl object type implementation. Attempts to
//	generate an byte code internal form for the Tcl object "objPtr" by
//	compiling its string representation.
//
// Results:
//	The return value is a standard Tcl object result. If an error occurs
//	during compilation, an error message is left in the interpreter's
//	result unless "interp" is NULL.
//
// Side effects:
//	Frees the old internal representation. If no error occurs, then the
//	compiled code is stored as "objPtr"s bytecode representation. Also, if
//	debugging, initializes the "tcl_traceCompile" Tcl variable used to
//	trace compilations.
//
//----------------------------------------------------------------------

func sSetByteCodeFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclCompile.c:911:1: */
	if interp == uintptr(0) {
		return TCL_ERROR
	}
	return XTclSetByteCodeFromAny(tls, interp, objPtr, uintptr(0), uintptr(0))
}

//----------------------------------------------------------------------
//
// DupByteCodeInternalRep --
//
//	Part of the bytecode Tcl object type implementation. However, it does
//	not copy the internal representation of a bytecode Tcl_Obj, but
//	instead leaves the new object untyped (with a NULL type pointer).
//	Code will be compiled for the new object only if necessary.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sDupByteCodeInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclCompile.c:942:1: */
	return
}

//----------------------------------------------------------------------
//
// FreeByteCodeInternalRep --
//
//	Part of the bytecode Tcl object type implementation. Frees the storage
//	associated with a bytecode object's internal representation unless its
//	code is actively being executed.
//
// Results:
//	None.
//
// Side effects:
//	The bytecode object's internal rep is marked invalid and its code gets
//	freed unless the code is actively being executed. In that case the
//	cleanup is delayed until the last execution of the code completes.
//
//----------------------------------------------------------------------

func sFreeByteCodeInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclCompile.c:970:1: */
	var codePtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	if libc.PostDecInt32(&(*ByteCode)(unsafe.Pointer(codePtr)).FrefCount, 1) <= 1 {
		XTclCleanupByteCode(tls, codePtr)
	}
}

//----------------------------------------------------------------------
//
// TclCleanupByteCode --
//
//	This procedure does all the real work of freeing up a bytecode
//	object's ByteCode structure. It's called only when the structure's
//	reference count becomes zero.
//
// Results:
//	None.
//
// Side effects:
//	Frees objPtr's bytecode internal representation and sets its type NULL
//	Also releases its literals and frees its auxiliary data items.
//
//----------------------------------------------------------------------

func XTclCleanupByteCode(tls *libc.TLS, codePtr uintptr) { /* tclCompile.c:1001:1: */
	var interp uintptr = *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle))
	var iPtr uintptr = interp
	var numLitObjects int32 = (*ByteCode)(unsafe.Pointer(codePtr)).FnumLitObjects
	var numAuxDataItems int32 = (*ByteCode)(unsafe.Pointer(codePtr)).FnumAuxDataItems
	var objArrayPtr uintptr
	var objPtr uintptr
	var auxDataPtr uintptr
	var i int32

	// A single heap object holds the ByteCode structure and its code, object,
	// command location, and auxiliary data arrays. This means we only need to
	// 1) decrement the ref counts of the LiteralEntry's in its literal array,
	// 2) call the free procs for the auxiliary data items, 3) free the
	// localCache if it is unused, and finally 4) free the ByteCode
	// structure's heap object.
	//
	// The case for TCL_BYTECODE_PRECOMPILED (precompiled ByteCodes, like
	// those generated from tbcload) is special, as they doesn't make use of
	// the global literal table. They instead maintain private references to
	// their literals which must be decremented.
	//
	// In order to insure a proper and efficient cleanup of the literal array
	// when it contains non-shared literals [Bug 983660], we also distinguish
	// the case of an interpreter being deleted (signaled by interp == NULL).
	// Also, as the interp deletion will remove the global literal table
	// anyway, we avoid the extra cost of updating it for each literal being
	// released.

	if (*ByteCode)(unsafe.Pointer(codePtr)).Fflags&uint32(TCL_BYTECODE_PRECOMPILED) != 0 {

		objArrayPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr
		for i = 0; i < numLitObjects; i++ {
			objPtr = *(*uintptr)(unsafe.Pointer(objArrayPtr))
			if objPtr != 0 {
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = objPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
			objArrayPtr += 8
		}
		(*ByteCode)(unsafe.Pointer(codePtr)).FnumLitObjects = 0
	} else {
		objArrayPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr
		for libc.PostDecInt32(&numLitObjects, 1) != 0 {
			// TclReleaseLiteral calls Tcl_DecrRefCount() for us
			XTclReleaseLiteral(tls, interp, *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&objArrayPtr, 8))))
		}
	}

	auxDataPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FauxDataArrayPtr
	for i = 0; i < numAuxDataItems; i++ {
		if (*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxDataPtr)).Ftype)).FfreeProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxDataPtr)).Ftype)).FfreeProc})).f(tls, (*AuxData)(unsafe.Pointer(auxDataPtr)).FclientData)
		}
		auxDataPtr += 16
	}

	// TIP #280. Release the location data associated with this byte code
	// structure, if any. NOTE: The interp we belong to may be gone already,
	// and the data with it.
	//
	// See also tclBasic.c, DeleteInterpProc

	if iPtr != 0 {
		var hePtr uintptr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr, codePtr)

		if hePtr != 0 {
			sReleaseCmdWordData(tls, (*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData)
			XTcl_DeleteHashEntry(tls, hePtr)
		}
	}

	if (*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr != 0 && libc.PreDecInt32(&(*LocalCache)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr)).FrefCount, 1) == 0 {
		XTclFreeLocalCache(tls, interp, (*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr)
	}

	XTclHandleRelease(tls, (*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle)
	XTclpFree(tls, codePtr)
}

// ---------------------------------------------------------------------
//
// IsCompactibleCompileEnv --
//
//	Checks to see if we may apply some basic compaction optimizations to a
//	piece of bytecode. Idempotent.
//
// ---------------------------------------------------------------------

func sIsCompactibleCompileEnv(tls *libc.TLS, interp uintptr, envPtr uintptr) int32 { /* tclCompile.c:1135:1: */
	var pc uintptr
	var size int32

	// Special: procedures in the '::tcl' namespace (or its children) are
	// considered to be well-behaved and so can have compaction applied even
	// if it would otherwise be invalid.

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr != uintptr(0) && (*Proc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr)).FcmdPtr != uintptr(0) &&
		(*Command1)(unsafe.Pointer((*Proc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr)).FcmdPtr)).FnsPtr != uintptr(0) {
		var nsPtr uintptr = (*Command1)(unsafe.Pointer((*Proc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr)).FcmdPtr)).FnsPtr

		if libc.Xstrcmp(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName, ts+21479) == 0 ||
			libc.Xstrncmp(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName, ts+21485, uint64(7)) == 0 {
			return 1
		}
	}

	// Go through and ensure that no operation involved can cause a desired
	// change of bytecode sequence during running. This comes down to ensuring
	// that there are no mapped variables (due to traces) or calls to external
	// commands (traces, [uplevel] trickery). This is actually a very
	// conservative check; it turns down a lot of code that is OK in practice.

	for pc = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart; pc < (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext; pc += uintptr(size) {
		switch int32(*(*uint8)(unsafe.Pointer(pc))) {
		// Invokes
		case INST_INVOKE_STK1:
			fallthrough
		case INST_INVOKE_STK4:
			fallthrough
		case INST_INVOKE_EXPANDED:
			fallthrough
		case INST_INVOKE_REPLACE:
			return 0
			// Runtime evals
		case INST_EVAL_STK:
			fallthrough
		case INST_EXPR_STK:
			fallthrough
		case INST_YIELD:
			return 0
			// Upvars
		case INST_UPVAR:
			fallthrough
		case INST_NSUPVAR:
			fallthrough
		case INST_VARIABLE:
			return 0
		default:
			size = XtclInstructionTable[*(*uint8)(unsafe.Pointer(pc))].FnumBytes

			break
		}
	}

	return 1
}

//----------------------------------------------------------------------
//
// Tcl_SubstObj --
//
//	This function performs the substitutions specified on the given string
//	as described in the user documentation for the "subst" Tcl command.
//
// Results:
//	A Tcl_Obj* containing the substituted string, or NULL to indicate that
//	an error occurred.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_SubstObj(tls *libc.TLS, interp uintptr, objPtr uintptr, flags int32) uintptr { /* tclCompile.c:1212:9: */
	var rootPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr

	if XTclNRRunCallbacks(tls, interp, XTcl_NRSubstObj(tls, interp, objPtr, flags),
		rootPtr) != TCL_OK {
		return uintptr(0)
	}
	return XTcl_GetObjResult(tls, interp)
}

//----------------------------------------------------------------------
//
// Tcl_NRSubstObj --
//
//	Request substitution of a Tcl value by the NR stack.
//
// Results:
//	Returns TCL_OK.
//
// Side effects:
//	Compiles objPtr into bytecode that performs the substitutions as
//	governed by flags and places callbacks on the NR stack to execute
//	the bytecode and store the result in the interp.
//
//----------------------------------------------------------------------

func XTcl_NRSubstObj(tls *libc.TLS, interp uintptr, objPtr uintptr, flags int32) int32 { /* tclCompile.c:1246:1: */
	var codePtr uintptr = sCompileSubstObj(tls, interp, objPtr, flags)

	// TODO: Confirm we do not need this.
	// Tcl_ResetResult(interp);
	return XTclNRExecuteByteCode(tls, interp, codePtr)
}

//----------------------------------------------------------------------
//
// CompileSubstObj --
//
//	Compile a Tcl value into ByteCode implementing its substitution, as
//	governed by flags.
//
// Results:
//	A (ByteCode *) is returned pointing to the resulting ByteCode.
//	The caller must manage its refCount and arrange for a call to
//	TclCleanupByteCode() when the last reference disappears.
//
// Side effects:
//	The Tcl_ObjType of objPtr is changed to the "substcode" type, and the
//	ByteCode and governing flags value are kept in the internal rep for
//	faster operations the next time CompileSubstObj is called on the same
//	value.
//
//----------------------------------------------------------------------

func sCompileSubstObj(tls *libc.TLS, interp uintptr, objPtr uintptr, flags int32) uintptr { /* tclCompile.c:1280:17: */
	bp := tls.Alloc(3592)
	defer tls.Free(3592)

	var iPtr uintptr = interp
	var codePtr uintptr = uintptr(0)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&substCodeType)) {
		var nsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr

		codePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		if flags != int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) ||
			*(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle)) != iPtr ||
			(*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch != (*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch ||
			(*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr != nsPtr ||
			(*ByteCode)(unsafe.Pointer(codePtr)).FnsEpoch != (*Namespace)(unsafe.Pointer(nsPtr)).FresolverEpoch ||
			(*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr != (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr {
			sFreeSubstCodeInternalRep(tls, objPtr)
		}
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&substCodeType)) {
		// var compEnv CompileEnv at bp+8, 3584

		// var numBytes int32 at bp, 4

		var bytes uintptr = XTcl_GetStringFromObj(tls, objPtr, bp)

		// TODO: Check for more TIP 280
		XTclInitCompileEnv(tls, interp, bp+8, bytes, *(*int32)(unsafe.Pointer(bp /* numBytes */)), uintptr(0), 0)

		XTclSubstCompile(tls, interp, bytes, *(*int32)(unsafe.Pointer(bp /* numBytes */)), flags, 1, bp+8)

		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext == (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeEnd {
				XTclExpandCodeArray(tls, bp+8)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(INST_DONE)
			if (*CompileEnv)(unsafe.Pointer(bp+8)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(bp + 8)).FatCmdStart = func() int32 {
					if INST_DONE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DONE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(bp+8)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(bp+8)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(bp + 8)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(bp + 8)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(bp + 8 + 48)) += _delta
					}
				}
			}
		}
		XTclInitByteCodeObj(tls, objPtr, bp+8)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&substCodeType))
		XTclFreeCompileEnv(tls, bp+8)

		codePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = codePtr
		*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(Intptr_t(flags))
		if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr != 0 {
			(*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr
			(*LocalCache)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr)).FrefCount++
		}
	}
	return codePtr
}

//----------------------------------------------------------------------
//
// FreeSubstCodeInternalRep --
//
//	Part of the substcode Tcl object type implementation. Frees the
//	storage associated with a substcode object's internal representation
//	unless its code is actively being executed.
//
// Results:
//	None.
//
// Side effects:
//	The substcode object's internal rep is marked invalid and its code
//	gets freed unless the code is actively being executed. In that case
//	the cleanup is delayed until the last execution of the code completes.
//
//----------------------------------------------------------------------

func sFreeSubstCodeInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclCompile.c:1356:1: */
	var codePtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	if libc.PostDecInt32(&(*ByteCode)(unsafe.Pointer(codePtr)).FrefCount, 1) <= 1 {
		XTclCleanupByteCode(tls, codePtr)
	}
}

func sReleaseCmdWordData(tls *libc.TLS, eclPtr uintptr) { /* tclCompile.c:1368:1: */
	var i int32

	if (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Ftype == 4 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fpath
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	for i = 0; i < (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnuloc; i++ {
		XTclpFree(tls, (*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc+uintptr(i)*24)).Fline)
	}

	if (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc != uintptr(0) {
		XTclpFree(tls, (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc)
	}

	XTclpFree(tls, eclPtr)
}

//----------------------------------------------------------------------
//
// TclInitCompileEnv --
//
//	Initializes a CompileEnv compilation environment structure for the
//	compilation of a string in an interpreter.
//
// Results:
//	None.
//
// Side effects:
//	The CompileEnv structure is initialized.
//
//----------------------------------------------------------------------

func XTclInitCompileEnv(tls *libc.TLS, interp uintptr, envPtr uintptr, stringPtr uintptr, numBytes int32, invoker uintptr, word int32) { /* tclCompile.c:1405:1: */
	var iPtr uintptr = interp

	(*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr = iPtr
	(*CompileEnv)(unsafe.Pointer(envPtr)).Fsource = stringPtr
	(*CompileEnv)(unsafe.Pointer(envPtr)).FnumSrcBytes = numBytes
	(*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr = (*Interp)(unsafe.Pointer(iPtr)).FcompiledProcPtr
	(*Interp)(unsafe.Pointer(iPtr)).FcompiledProcPtr = uintptr(0)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands = 0
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth = 0
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = 0
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = 0
	(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = 0
	XTclInitLiteralTable(tls, envPtr+56)

	(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart = envPtr + 236 /* &.staticCodeSpace */
	(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart
	(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(COMPILEENV_INIT_CODE_BYTES)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedCodeArray = 0

	(*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayPtr = envPtr + 488 /* &.staticLiteralSpace */
	(*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayNext = 0
	(*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayEnd = COMPILEENV_INIT_NUM_OBJECTS
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedLiteralArray = 0

	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr = envPtr + 2408    /* &.staticExceptArraySpace */
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr = envPtr + 2552 /* &.staticExAuxArraySpace */
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext = 0
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayEnd = COMPILEENV_INIT_EXCEPT_RANGES
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedExceptArray = 0

	(*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr = envPtr + 2832 /* &.staticCmdMapSpace */
	(*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapEnd = COMPILEENV_INIT_CMD_MAP_SIZE
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedCmdMap = 0
	(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = 1
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount = 0

	// TIP #280: Set up the extended command location information, based on
	// the context invoking the byte code compiler. This structure is used to
	// keep the per-word line information for all compiled commands.
	//
	// See also tclBasic.c, TclEvalObjEx, for the equivalent code in the
	// non-compiling evaluator

	(*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ExtCmdLoc{})))
	(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Floc = uintptr(0)
	(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fnloc = 0
	(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fnuloc = 0
	(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath = uintptr(0)

	if invoker == uintptr(0) {
		// Initialize the compiler for relative counting in case of a
		// dynamic context.

		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = 1
		if (*Interp)(unsafe.Pointer(iPtr)).FevalFlags&TCL_EVAL_FILE != 0 {
			*(*int32)(unsafe.Pointer(iPtr + 324)) &= libc.CplInt32(TCL_EVAL_FILE)
			(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Ftype = 4

			if (*Interp)(unsafe.Pointer(iPtr)).FscriptFile != 0 {
				// Normalization here, to have the correct pwd. Should have
				// negligible impact on performance, as the norm should have
				// been done already by the 'source' invoking us, and it
				// caches the result.

				var norm uintptr = XTcl_FSGetNormalizedPath(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FscriptFile)

				if norm == uintptr(0) {
					// Error message in the interp result. No place to put it.
					// And no place to serve the error itself to either. Fake
					// a path, empty string.

					for ok := true; ok; ok = 0 != 0 {
						for ok1 := true; ok1; ok1 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Fbytes, ts+2631, uint64(int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Fbytes)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Flength = int32(uint64(unsafe.Sizeof([1]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).FtypePtr = uintptr(0)
						{
						}
					}
				} else {
					(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath = norm
				}
			} else {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					for ok3 := true; ok3; ok3 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).FrefCount = 0
					if int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Fbytes, ts+2631, uint64(int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Fbytes)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).Flength = int32(uint64(unsafe.Sizeof([1]int8{})) - uint64(1))
					}
					(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).FtypePtr = uintptr(0)
					{
					}
				}
			}

			(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).FrefCount++
		} else {
			(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Ftype = func() int32 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr != 0 {
					return 5
				}
				return 2
			}()
		}
	} else {
		// Initialize the compiler using the context, making counting absolute
		// to that context. Note that the context can be byte code execution.
		// In that case we have to fill out the missing pieces (line, path,
		// ...) which may make change the type as well.

		var ctxPtr uintptr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CmdFrame{})))
		var pc int32 = 0

		*(*CmdFrame)(unsafe.Pointer(ctxPtr)) = *(*CmdFrame)(unsafe.Pointer(invoker))
		if (*CmdFrame)(unsafe.Pointer(invoker)).Ftype == 2 {
			// Note: Type BC => ctx.data.eval.path    is not used.
			//			ctx.data.tebc.codePtr is used instead.

			XTclGetSrcInfoForPc(tls, ctxPtr)
			pc = 1
		}

		if (*CmdFrame)(unsafe.Pointer(ctxPtr)).Fnline <= word || *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(ctxPtr)).Fline + uintptr(word)*4)) < 0 {
			// Word is not a literal, relative counting.

			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = 1
			(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Ftype = func() int32 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr != 0 {
					return 5
				}
				return 2
			}()

			if pc != 0 && (*CmdFrame)(unsafe.Pointer(ctxPtr)).Ftype == 4 {
				// The reference made by 'TclGetSrcInfoForPc' is dead.

				for ok4 := true; ok4; ok4 = 0 != 0 {
					var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(ctxPtr + 40))
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
		} else {
			(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(ctxPtr)).Fline + uintptr(word)*4))
			(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Ftype = (*CmdFrame)(unsafe.Pointer(ctxPtr)).Ftype

			if (*CmdFrame)(unsafe.Pointer(ctxPtr)).Ftype == 4 {
				(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath = *(*uintptr)(unsafe.Pointer(ctxPtr + 40))

				if pc != 0 {
					// The reference 'TclGetSrcInfoForPc' made is transfered.

					*(*uintptr)(unsafe.Pointer(ctxPtr + 40)) = uintptr(0)
				} else {
					// We have a new reference here.

					(*Tcl_Obj)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fpath)).FrefCount++
				}
			}
		}

		XTclStackFree(tls, interp, ctxPtr)
	}

	(*ExtCmdLoc)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)).Fstart = (*CompileEnv)(unsafe.Pointer(envPtr)).Fline

	// Initialize the data about invisible continuation lines as empty, i.e.
	// not used. The caller (TclSetByteCodeFromAny) will set this up, if such
	// data is available.

	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = uintptr(0)

	(*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr = envPtr + 3472 /* &.staticAuxDataArraySpace */
	(*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext = 0
	(*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayEnd = COMPILEENV_INIT_AUX_DATA_SIZE
	(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedAuxDataArray = 0
}

//----------------------------------------------------------------------
//
// TclFreeCompileEnv --
//
//	Free the storage allocated in a CompileEnv compilation environment
//	structure.
//
// Results:
//	None.
//
// Side effects:
//	Allocated storage in the CompileEnv structure is freed. Note that its
//	local literal table is not deleted and its literal objects are not
//	released. In addition, storage referenced by its auxiliary data items
//	is not freed. This is done so that, when compilation is successful,
//	"ownership" of these objects and aux data items is handed over to the
//	corresponding ByteCode structure.
//
//----------------------------------------------------------------------

func XTclFreeCompileEnv(tls *libc.TLS, envPtr uintptr) { /* tclCompile.c:1614:1: */
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FlocalLitTable.Fbuckets != envPtr+56+8 {
		XTclpFree(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FlocalLitTable.Fbuckets)
		(*CompileEnv)(unsafe.Pointer(envPtr)).FlocalLitTable.Fbuckets = envPtr + 56 + 8
	}
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr != 0 {
		// We never converted to Bytecode, so free the things we would
		// have transferred to it.

		var i int32
		var entryPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayPtr
		var auxDataPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr

		for i = 0; i < (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayNext; i++ {
			XTclReleaseLiteral(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr, (*LiteralEntry)(unsafe.Pointer(entryPtr)).FobjPtr)
			entryPtr += 32
		}

		for i = 0; i < (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext; i++ {
			if (*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxDataPtr)).Ftype)).FfreeProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxDataPtr)).Ftype)).FfreeProc})).f(tls, (*AuxData)(unsafe.Pointer(auxDataPtr)).FclientData)
			}
			auxDataPtr += 16
		}
	}
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedCodeArray != 0 {
		XTclpFree(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)
	}
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedLiteralArray != 0 {
		XTclpFree(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayPtr)
	}
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedExceptArray != 0 {
		XTclpFree(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr)
		XTclpFree(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr)
	}
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedCmdMap != 0 {
		XTclpFree(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr)
	}
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedAuxDataArray != 0 {
		XTclpFree(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr)
	}
	if (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr != 0 {
		sReleaseCmdWordData(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr)
		(*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr = uintptr(0)
	}
}

//----------------------------------------------------------------------
//
// TclWordKnownAtCompileTime --
//
//	Test whether the value of a token is completely known at compile time.
//
// Results:
//	Returns true if the tokenPtr argument points to a word value that is
//	completely known at compile time. Generally, values that are known at
//	compile time can be compiled to their values, while values that cannot
//	be known until substitution at runtime must be compiled to bytecode
//	instructions that perform that substitution. For several commands,
//	whether or not arguments are known at compile time determine whether
//	it is worthwhile to compile at all.
//
// Side effects:
//	When returning true, appends the known value of the word to the
//	unshared Tcl_Obj (*valuePtr), unless valuePtr is NULL.
//
//----------------------------------------------------------------------

func XTclWordKnownAtCompileTime(tls *libc.TLS, tokenPtr uintptr, valuePtr uintptr) int32 { /* tclCompile.c:1693:1: */
	bp := tls.Alloc(3)
	defer tls.Free(3)

	var numComponents int32 = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents
	var tempPtr uintptr = uintptr(0)

	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		if valuePtr != uintptr(0) {
			XTcl_AppendToObj(tls, valuePtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize)
		}
		return 1
	}
	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_WORD {
		return 0
	}
	tokenPtr += 24
	if valuePtr != uintptr(0) {
		tempPtr = XTcl_NewObj(tls)
		(*Tcl_Obj)(unsafe.Pointer(tempPtr)).FrefCount++
	}
	for libc.PostDecInt32(&numComponents, 1) != 0 {
		switch (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype {
		case TCL_TOKEN_TEXT:
			if tempPtr != uintptr(0) {
				XTcl_AppendToObj(tls, tempPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize)
			}
			break

		case TCL_TOKEN_BS:
			if tempPtr != uintptr(0) {
				*(*[3]int8)(unsafe.Pointer(bp /* utfBuf */)) = *(*[3]int8)(unsafe.Pointer(ts + 19416))
				var length int32 = XTclParseBackslash(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart,
					(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize, uintptr(0), bp)

				XTcl_AppendToObj(tls, tempPtr, bp, length)
			}
			break

		default:
			if tempPtr != uintptr(0) {
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = tempPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
			return 0
		}
		tokenPtr += 24
	}
	if valuePtr != uintptr(0) {
		XTcl_AppendObjToObj(tls, valuePtr, tempPtr)
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = tempPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return 1
}

//----------------------------------------------------------------------
//
// TclCompileScript --
//
//	Compile a Tcl script in a string.
//
// Results:
//	The return value is TCL_OK on a successful compilation and TCL_ERROR
//	on failure. If TCL_ERROR is returned, then the interpreter's result
//	contains an error message.
//
// Side effects:
//	Adds instructions to envPtr to evaluate the script at runtime.
//
//----------------------------------------------------------------------

func sExpandRequested(tls *libc.TLS, tokenPtr uintptr, numWords int32) int32 { /* tclCompile.c:1768:1: */
	// Determine whether any words of the command require expansion
	for libc.PostDecInt32(&numWords, 1) != 0 {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_EXPAND_WORD {
			return 1
		}
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}
	return 0
}

func sCompileCmdLiteral(tls *libc.TLS, interp uintptr, cmdObj uintptr, envPtr uintptr) { /* tclCompile.c:1783:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var numBytes int32 at bp, 4

	var bytes uintptr
	var cmdPtr uintptr
	var cmdLitIdx int32
	var extraLiteralFlags int32 = LITERAL_CMD_NAME

	cmdPtr = XTcl_GetCommandFromObj(tls, interp, cmdObj)
	if cmdPtr != uintptr(0) && (*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_VIA_RESOLVER != 0 {
		extraLiteralFlags = extraLiteralFlags | LITERAL_UNSHARED
	}

	bytes = XTcl_GetStringFromObj(tls, cmdObj, bp)
	cmdLitIdx = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp /* numBytes */)), extraLiteralFlags)

	if cmdPtr != 0 {
		XTclSetCmdNameObj(tls, interp, XTclFetchLiteral(tls, envPtr, uint32(cmdLitIdx)), cmdPtr)
	}
	for ok := true; ok; ok = 0 != 0 {
		var _objIndexCopy int32 = cmdLitIdx
		if _objIndexCopy <= 255 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok3 := true; ok3; ok3 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok6 := true; ok6; ok6 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
}

func XTclCompileInvocation(tls *libc.TLS, interp uintptr, tokenPtr uintptr, cmdObj uintptr, numWords int32, envPtr uintptr) { /* tclCompile.c:1808:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	var wordIdx int32 = 0
	var depth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth

	if cmdObj != 0 {
		sCompileCmdLiteral(tls, interp, cmdObj, envPtr)
		wordIdx = 1
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}

__1:
	if !(wordIdx < numWords) {
		goto __3
	}
	{
		var objIdx int32

		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(wordIdx)*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(wordIdx)*8))

		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)

			goto __2
		}

		objIdx = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize /*flags*/, 0)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FclNext != 0 {
			XTclContinuationsEnterDerived(tls, XTclFetchLiteral(tls, envPtr, uint32(objIdx)),
				int32((int64((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1), (*CompileEnv)(unsafe.Pointer(envPtr)).FclNext)
		}
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = objIdx
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}

	}
	goto __2
__2:
	wordIdx++
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __1
	goto __3
__3:
	;

	if wordIdx <= 255 {
		XTclEmitInvoke(tls, envPtr, INST_INVOKE_STK1, libc.VaList(bp, wordIdx))
	} else {
		XTclEmitInvoke(tls, envPtr, INST_INVOKE_STK4, libc.VaList(bp+8, wordIdx))
	}
	for ok7 := true; ok7; ok7 = 0 != 0 {
		var _dd int32 = depth + 1
		if _dd != (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
			XTcl_Panic(tls, ts+19014, libc.VaList(bp+16, (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth, _dd))
		}
	}
}

func sCompileExpanded(tls *libc.TLS, interp uintptr, tokenPtr uintptr, cmdObj uintptr, numWords int32, envPtr uintptr) { /* tclCompile.c:1852:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	var wordIdx int32 = 0
	var depth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth

	sStartExpanding(tls, envPtr)
	if cmdObj != 0 {
		sCompileCmdLiteral(tls, interp, cmdObj, envPtr)
		wordIdx = 1
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	}

__1:
	if !(wordIdx < numWords) {
		goto __3
	}
	{
		var objIdx int32

		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(wordIdx)*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(wordIdx)*8))

		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)

			if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_EXPAND_WORD {
				for ok := true; ok; ok = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EXPAND_STKTOP)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32((*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_EXPAND_STKTOP == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok1 := true; ok1; ok1 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_EXPAND_STKTOP].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
							for ok2 := true; ok2; ok2 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
			goto __2
		}

		objIdx = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize /*flags*/, 0)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FclNext != 0 {
			XTclContinuationsEnterDerived(tls, XTclFetchLiteral(tls, envPtr, uint32(objIdx)),
				int32((int64((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1), (*CompileEnv)(unsafe.Pointer(envPtr)).FclNext)
		}
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objIndexCopy int32 = objIdx
			if _objIndexCopy <= 255 {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok7 := true; ok7; ok7 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok8 := true; ok8; ok8 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok9 := true; ok9; ok9 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}

	}
	goto __2
__2:
	wordIdx++
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	goto __1
	goto __3
__3:
	;

	// The stack depth during argument expansion can only be managed at
	// runtime, as the number of elements in the expanded lists is not known
	// at compile time. We adjust here the stack depth estimate so that it is
	// correct after the command with expanded arguments returns.
	//
	// The end effect of this command's invocation is that all the words of
	// the command are popped from the stack, and the result is pushed: the
	// stack top changes by (1-wordIdx).
	//
	// Note that the estimates are not correct while the command is being
	// prepared and run, INST_EXPAND_STKTOP is not stack-neutral in general.

	XTclEmitInvoke(tls, envPtr, INST_INVOKE_EXPANDED, libc.VaList(bp, wordIdx))
	for ok10 := true; ok10; ok10 = 0 != 0 {
		var _dd int32 = depth + 1
		if _dd != (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
			XTcl_Panic(tls, ts+19014, libc.VaList(bp+8, (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth, _dd))
		}
	}
}

func sCompileCmdCompileProc(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompile.c:1912:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	var unwind int32 = 0
	var incrOffset int32 = -1
	var depth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth

	// Emit of the INST_START_CMD instruction is controlled by the value of
	// envPtr->atCmdStart:
	//
	// atCmdStart == 2	: We are not using the INST_START_CMD instruction.
	// atCmdStart == 1	: INST_START_CMD was the last instruction emitted.
	//			: We do not need to emit another.  Instead we
	//			: increment the number of cmds started at it (except
	//			: for the special case at the start of a script.)
	// atCmdStart == 0	: The last instruction was something else.  We need
	//			: to emit INST_START_CMD here.

	switch (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart {
	case 0:
		unwind = XtclInstructionTable[INST_START_CMD].FnumBytes
		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_START_CMD)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_START_CMD == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_START_CMD].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		incrOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(4) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		}
		break
	case 1:
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart {
			incrOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext-uintptr(4)) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
		}
		break
	case 2:
		// Nothing to do

	}

	if TCL_OK == XTclAttemptCompileProc(tls, interp, parsePtr, 1, cmdPtr, envPtr) {
		if incrOffset >= 0 {
			// We successfully compiled a command.  Increment the number of
			// commands that start at the currently active INST_START_CMD.

			var incrPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(incrOffset)
			var startPtr uintptr = incrPtr - uintptr(5)

			for ok4 := true; ok4; ok4 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(incrPtr)) = uint8((uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr)))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(3)))) + uint32(1)) >> 24)
				*(*uint8)(unsafe.Pointer(incrPtr + uintptr(1))) = uint8((uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr)))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(3)))) + uint32(1)) >> 16)
				*(*uint8)(unsafe.Pointer(incrPtr + uintptr(2))) = uint8((uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr)))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(3)))) + uint32(1)) >> 8)
				*(*uint8)(unsafe.Pointer(incrPtr + uintptr(3))) = uint8(uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr)))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(incrPtr + uintptr(3)))) + uint32(1))
			}

			if unwind != 0 {
				// We started the INST_START_CMD.  Record the code length.
				for ok5 := true; ok5; ok5 = 0 != 0 {
					*(*uint8)(unsafe.Pointer(startPtr + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64(startPtr))/1) >> 24)
					*(*uint8)(unsafe.Pointer(startPtr + uintptr(1) + uintptr(1))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64(startPtr))/1) >> 16)
					*(*uint8)(unsafe.Pointer(startPtr + uintptr(1) + uintptr(2))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64(startPtr))/1) >> 8)
					*(*uint8)(unsafe.Pointer(startPtr + uintptr(1) + uintptr(3))) = uint8(uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64(startPtr)) / 1))
				}
			}
		}
		for ok6 := true; ok6; ok6 = 0 != 0 {
			var _dd int32 = depth + 1
			if _dd != (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
				XTcl_Panic(tls, ts+19014, libc.VaList(bp, (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth, _dd))
			}
		}
		return TCL_OK
	}

	*(*uintptr)(unsafe.Pointer(envPtr + 120)) -= uintptr(unwind) // Unwind INST_START_CMD

	// Throw out any line information generated by the failed compile attempt.

	for (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc-1 > eclIndex {
		(*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc--
		XTclpFree(tls, (*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc)*24)).Fline)
		(*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc + uintptr((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc)*24)).Fline = uintptr(0)
	}

	// Reset the index of next command.  Toss out any from failed nested
	// partial compiles.

	(*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc
	return TCL_ERROR
}

func sCompileCommandTokens(tls *libc.TLS, interp uintptr, parsePtr uintptr, envPtr uintptr) int32 { /* tclCompile.c:1994:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var iPtr uintptr = interp
	var tokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	var eclPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var cmdObj uintptr = XTcl_NewObj(tls)
	var cmdPtr uintptr = uintptr(0)
	var code int32 = TCL_ERROR
	var cmdKnown int32
	var expand int32 = -1
	// var wlines uintptr at bp+16, 8

	var wlineat int32
	var cmdLine int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).Fline
	var clNext uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FclNext
	var cmdIdx int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands
	var startCodeOffset int32 = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	var depth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth

	// Pre-Compile

	(*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands++
	sEnterCmdStartData(tls, envPtr, cmdIdx,
		int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1), startCodeOffset)

	// TIP #280. Scan the words and compute the extended location information.
	// The map first contain full per-word line information for use by the
	// compiler. This is later replaced by a reduced form which signals
	// non-literal words, stored in 'wlines'.

	sEnterCmdWordData(tls, eclPtr, int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1),
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart,
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords, cmdLine,
		clNext, bp+16, envPtr)
	wlineat = (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnuloc - 1

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc + uintptr(wlineat)*24)).Fline))
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc + uintptr(wlineat)*24)).Fnext))

	// Do we know the command word?
	(*Tcl_Obj)(unsafe.Pointer(cmdObj)).FrefCount++
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	cmdKnown = XTclWordKnownAtCompileTime(tls, tokenPtr, cmdObj)

	// Is this a command we should (try to) compile with a compileProc ?
	if cmdKnown != 0 && !((*Interp)(unsafe.Pointer(iPtr)).Fflags&DONT_COMPILE_CMDS_INLINE != 0) {
		cmdPtr = XTcl_GetCommandFromObj(tls, interp, cmdObj)
		if cmdPtr != 0 {
			// Found a command.  Test the ways we can be told not to attempt
			// to compile it.
			if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc == uintptr(0) ||
				(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).Fflags&NS_SUPPRESS_COMPILATION != 0 ||
				(*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_HAS_EXEC_TRACES != 0 {
				cmdPtr = uintptr(0)
			}
		}
		if cmdPtr != 0 && !((*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_COMPILES_EXPANDED != 0) {
			expand = sExpandRequested(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords)
			if expand != 0 {
				// We need to expand, but compileProc cannot.
				cmdPtr = uintptr(0)
			}
		}
	}

	// If cmdPtr != NULL, we will try to call cmdPtr->compileProc
	if cmdPtr != 0 {
		code = sCompileCmdCompileProc(tls, interp, parsePtr, cmdPtr, envPtr)
	}

	if code == TCL_ERROR {
		if expand < 0 {
			expand = sExpandRequested(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords)
		}

		if expand != 0 {
			sCompileExpanded(tls, interp, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr,
				func() uintptr {
					if cmdKnown != 0 {
						return cmdObj
					}
					return uintptr(0)
				}(), (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords, envPtr)
		} else {
			XTclCompileInvocation(tls, interp, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr,
				func() uintptr {
					if cmdKnown != 0 {
						return cmdObj
					}
					return uintptr(0)
				}(), (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords, envPtr)
		}
	}

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = cmdObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	for ok1 := true; ok1; ok1 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_POP == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok3 := true; ok3; ok3 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
	sEnterCmdExtentData(tls, envPtr, cmdIdx,
		int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm)-int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart))/1),
		int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64(startCodeOffset)))

	// TIP #280: Free full form of per-word line data and insert the reduced
	// form now

	(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = cmdLine
	(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = clNext
	XTclpFree(tls, (*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc+uintptr(wlineat)*24)).Fline)
	XTclpFree(tls, (*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc+uintptr(wlineat)*24)).Fnext)
	(*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc + uintptr(wlineat)*24)).Fline = *(*uintptr)(unsafe.Pointer(bp + 16 /* wlines */))
	(*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc + uintptr(wlineat)*24)).Fnext = uintptr(0)

	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _dd int32 = depth
		if _dd != (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
			XTcl_Panic(tls, ts+19014, libc.VaList(bp, (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth, _dd))
		}
	}
	return cmdIdx
}

func XTclCompileScript(tls *libc.TLS, interp uintptr, script uintptr, numBytes int32, envPtr uintptr) { /* tclCompile.c:2108:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var lastCmdIdx int32 = -1 // Index into envPtr->cmdMapPtr of the last
	// command this routine compiles into bytecode.
	// Initial value of -1 indicates this routine
	// has not yet generated any bytecode.
	var p uintptr = script // Where we are in our compile.
	var depth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
	var iPtr uintptr = interp

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr == uintptr(0) {
		XTcl_Panic(tls, ts+21493, 0)
	}
	// Check depth to avoid overflow of the C execution stack by too many
	// nested calls of TclCompileScript (considering interp recursionlimit).
	// Factor 5/4 (1.25) is used to avoid too mistaken limit recognition
	// during "mixed" evaluation and compilation process (nested eval+compile)
	// and is good enough for default recursionlimit (1000).
	if (*Interp)(unsafe.Pointer(iPtr)).FnumLevels/5 > (*Interp)(unsafe.Pointer(iPtr)).FmaxNestingDepth/4 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+21547, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+8199, ts+8205, uintptr(0)))
		XTclCompileSyntaxError(tls, interp, envPtr)
		return
	}

	// Each iteration compiles one command from the script.

	if numBytes > 0 {
		// Don't use system stack (size of Tcl_Parse is ca. 400 bytes), so
		// many nested compilations (body enclosed in body) can cause abnormal
		// program termination with a stack overflow exception, bug [fec0c17d39].
		var parsePtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_Parse{})))

		for ok := true; ok; ok = numBytes > 0 {
			var next uintptr

			if TCL_OK != XTcl_ParseCommand(tls, interp, p, numBytes, 0, parsePtr) {
				// Compile bytecodes to report the parsePtr error at runtime.

				XTcl_LogCommandInfo(tls, interp, script, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart,
					int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm+uintptr(1))-int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart))/1))
				XTclCompileSyntaxError(tls, interp, envPtr)
				XTclpFree(tls, parsePtr)
				return
			}

			// TIP #280: Count newlines before the command start.
			// (See test info-30.33).

			XTclAdvanceLines(tls, envPtr+3560, p, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)
			XTclAdvanceContinuations(tls, envPtr+3560, envPtr+3576,
				int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1))

			// Advance parser to the next command in the script.

			next = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize)
			numBytes = int32(int64(numBytes) - (int64(next)-int64(p))/1)
			p = next

			if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords == 0 {
				// The "command" parsed has no words.  In this case we can skip
				// the rest of the loop body.  With no words, clearly
				// CompileCommandTokens() has nothing to do.  Since the parser
				// aggressively sucks up leading comment and white space,
				// including newlines, parsePtr->commandStart must be pointing at
				// either the end of script, or a command-terminating semi-colon.
				// In either case, the TclAdvance*() calls have nothing to do.
				// Finally, when no words are parsed, no tokens have been
				// allocated at parsePtr->tokenPtr so there's also nothing for
				// Tcl_FreeParse() to do.
				//
				// The advantage of this shortcut is that CompileCommandTokens()
				// can be written with an assumption that parsePtr->numWords > 0, with
				// the implication the CCT() always generates bytecode.
				continue
			}

			// Avoid stack exhaustion by too many nested calls of TclCompileScript
			// (considering interp recursionlimit).
			(*Interp)(unsafe.Pointer(iPtr)).FnumLevels++

			lastCmdIdx = sCompileCommandTokens(tls, interp, parsePtr, envPtr)

			(*Interp)(unsafe.Pointer(iPtr)).FnumLevels--

			// TIP #280: Track lines in the just compiled command.

			XTclAdvanceLines(tls, envPtr+3560, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart, p)
			XTclAdvanceContinuations(tls, envPtr+3560, envPtr+3576,
				int32((int64(p)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1))
			XTcl_FreeParse(tls, parsePtr)
		}

		XTclpFree(tls, parsePtr)
	}

	if lastCmdIdx == -1 {
		// Compiling the script yielded no bytecode.  The script must be all
		// whitespace, comments, and empty commands.  Such scripts are defined
		// to successfully produce the empty string result, so we emit the
		// simple bytecode that makes that happen.

		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok3 := true; ok3; ok3 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok4 := true; ok4; ok4 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok6 := true; ok6; ok6 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok7 := true; ok7; ok7 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	} else {
		// We compiled at least one command to bytecode.  The routine
		// CompileCommandTokens() follows the bytecode of each compiled
		// command with an INST_POP, so that stack balance is maintained when
		// several commands are in sequence.  (The result of each command is
		// thrown away before moving on to the next command).  For the last
		// command compiled, we need to undo that INST_POP so that the result
		// of the last command becomes the result of the script.  The code
		// here removes that trailing INST_POP.

		(*CmdLocation)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr+uintptr(lastCmdIdx)*16)).FnumCodeBytes--
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext--
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth++
	}
	for ok8 := true; ok8; ok8 = 0 != 0 {
		var _dd int32 = depth + 1
		if _dd != (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
			XTcl_Panic(tls, ts+19014, libc.VaList(bp+32, (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth, _dd))
		}
	}
}

//----------------------------------------------------------------------
//
// TclCompileTokens --
//
//	Given an array of tokens parsed from a Tcl command (e.g., the tokens
//	that make up a word) this procedure emits instructions to evaluate the
//	tokens and concatenate their values to form a single result value on
//	the interpreter's runtime evaluation stack.
//
// Results:
//	The return value is a standard Tcl result. If an error occurs, an
//	error message is left in the interpreter's result.
//
// Side effects:
//	Instructions are added to envPtr to push and evaluate the tokens at
//	runtime.
//
//----------------------------------------------------------------------

func XTclCompileVarSubst(tls *libc.TLS, interp uintptr, tokenPtr uintptr, envPtr uintptr) { /* tclCompile.c:2294:1: */
	var p uintptr
	var name uintptr = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart
	var nameBytes int32 = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fsize
	var i int32
	var localVar int32
	var localVarName int32 = 1

	// Determine how the variable name should be handled: if it contains any
	// namespace qualifiers it is not a local variable (localVarName=-1); if
	// it looks like an array element and the token has a single component, it
	// should not be created here [Bug 569438] (localVarName=0); otherwise,
	// the local variable can safely be created (localVarName=1).

	i = 0
	p = name
__1:
	if !(i < nameBytes) {
		goto __3
	}
	{
		if int32(*(*int8)(unsafe.Pointer(p))) == ':' && i < nameBytes-1 && int32(*(*int8)(unsafe.Pointer(p + uintptr(1)))) == ':' {
			localVarName = -1
			goto __3
		} else if int32(*(*int8)(unsafe.Pointer(p))) == '(' &&
			(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents == 1 &&
			int32(*(*int8)(unsafe.Pointer(name + uintptr(nameBytes) - uintptr(1)))) == ')' {
			localVarName = 0
			goto __3
		}

	}
	goto __2
__2:
	i++
	p++
	goto __1
	goto __3
__3:
	;

	// Either push the variable's name, or find its index in the array
	// of local variables in a procedure frame.

	localVar = -1
	if localVarName != -1 {
		localVar = XTclFindCompiledLocal(tls, name, nameBytes, localVarName, envPtr)
	}
	if localVar < 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, name, nameBytes, 0)
			if _objIndexCopy <= 255 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok3 := true; ok3; ok3 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok6 := true; ok6; ok6 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}

	// Emit instructions to load the variable.

	XTclAdvanceLines(tls, envPtr+3560, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart,
		(*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart+uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize))

	if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents == 1 {
		if localVar < 0 {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_STK)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_STK == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok8 := true; ok8; ok8 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_STK].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else if localVar <= 255 {
			for ok10 := true; ok10; ok10 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok11 := true; ok11; ok11 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - localVar
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok13 := true; ok13; ok13 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_SCALAR4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_SCALAR4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok14 := true; ok14; ok14 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_SCALAR4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - localVar
						}
						for ok15 := true; ok15; ok15 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	} else {
		XTclCompileTokens(tls, interp, tokenPtr+uintptr(2)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents-1, envPtr)
		if localVar < 0 {
			for ok16 := true; ok16; ok16 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_ARRAY_STK)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_ARRAY_STK == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok17 := true; ok17; ok17 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_ARRAY_STK].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok18 := true; ok18; ok18 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else if localVar <= 255 {
			for ok19 := true; ok19; ok19 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_ARRAY1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_ARRAY1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok20 := true; ok20; ok20 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_ARRAY1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - localVar
						}
						for ok21 := true; ok21; ok21 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok22 := true; ok22; ok22 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_LOAD_ARRAY4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(localVar))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_LOAD_ARRAY4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok23 := true; ok23; ok23 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_LOAD_ARRAY4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - localVar
						}
						for ok24 := true; ok24; ok24 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
}

func XTclCompileTokens(tls *libc.TLS, interp uintptr, tokenPtr uintptr, count int32, envPtr uintptr) { /* tclCompile.c:2364:1: */
	bp := tls.Alloc(259)
	defer tls.Free(259)

	// var textBuffer Tcl_DString at bp+40, 216
	// Holds concatenated chars from adjacent
	// TCL_TOKEN_TEXT, TCL_TOKEN_BS tokens.
	*(*[3]int8)(unsafe.Pointer(bp + 256 /* buffer */)) = *(*[3]int8)(unsafe.Pointer(ts + 19416))
	var i int32
	var numObjsToConcat int32
	var length int32
	var adjust int32
	var entryCodeNext uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext
	var isLiteral int32
	var maxNumCL int32
	var numCL int32
	var clPosition uintptr = uintptr(0)
	var depth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth

	// For the handling of continuation lines in literals we first check if
	// this is actually a literal. For if not we can forego the additional
	// processing. Otherwise we pre-allocate a small table to store the
	// locations of all continuation lines we find in this literal, if any.
	// The table is extended if needed.
	//
	// Note: Different to the equivalent code in function 'TclSubstTokens()'
	// (see file "tclParse.c") we do not seem to need the 'adjust' variable.
	// We also do not seem to need code which merges continuation line
	// information of multiple words which concat'd at runtime. Either that or
	// I have not managed to find a test case for these two possibilities yet.
	// It might be a difference between compile- versus run-time processing.

	numCL = 0
	maxNumCL = 0
	isLiteral = 1
	for i = 0; i < count; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr+uintptr(i)*24)).Ftype != TCL_TOKEN_TEXT &&
			(*Tcl_Token)(unsafe.Pointer(tokenPtr+uintptr(i)*24)).Ftype != TCL_TOKEN_BS {
			isLiteral = 0
			break
		}
	}

	if isLiteral != 0 {
		maxNumCL = NUM_STATIC_POS
		clPosition = XTcl_Alloc(tls, uint32(uint64(maxNumCL)*uint64(unsafe.Sizeof(int32(0)))))
	}

	adjust = 0
	XTcl_DStringInit(tls, bp+40)
	numObjsToConcat = 0
__1:
	if !(count > 0) {
		goto __3
	}
	{
		switch (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype {
		case TCL_TOKEN_TEXT:
			XTcl_DStringAppend(tls, bp+40, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize)
			XTclAdvanceLines(tls, envPtr+3560, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart,
				(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart+uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize))
			break

		case TCL_TOKEN_BS:
			length = XTclParseBackslash(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize,
				uintptr(0), bp+256)
			XTcl_DStringAppend(tls, bp+40, bp+256, length)

			// If the backslash sequence we found is in a literal, and
			// represented a continuation line, we compute and store its
			// location (as char offset to the beginning of the _result_
			// script). We may have to extend the table of locations.
			//
			// Note that the continuation line information is relevant even if
			// the word we are processing is not a literal, as it can affect
			// nested commands. See the branch for TCL_TOKEN_COMMAND below,
			// where the adjustment we are tracking here is taken into
			// account. The good thing is that we do not need a table of
			// everything, just the number of lines we have to add as
			// correction.

			if length == 1 && int32(*(*int8)(unsafe.Pointer(bp + 256))) == ' ' && int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart + 1))) == '\n' {
				if isLiteral != 0 {
					var clPos int32 = (*Tcl_DString)(unsafe.Pointer(bp + 40)).Flength

					if numCL >= maxNumCL {
						maxNumCL = maxNumCL * 2
						clPosition = XTcl_Realloc(tls, clPosition, uint32(uint64(maxNumCL)*uint64(unsafe.Sizeof(int32(0)))))
					}
					*(*int32)(unsafe.Pointer(clPosition + uintptr(numCL)*4)) = clPos
					numCL++
				}
				adjust++
			}
			break

		case TCL_TOKEN_COMMAND:
			// Push any accumulated chars appearing before the command.

			if (*Tcl_DString)(unsafe.Pointer(bp+40)).Flength > 0 {
				var literal int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_DString)(unsafe.Pointer(bp+40)).Fstring, (*Tcl_DString)(unsafe.Pointer(bp+40)).Flength, 0)

				for ok := true; ok; ok = 0 != 0 {
					var _objIndexCopy int32 = literal
					if _objIndexCopy <= 255 {
						for ok1 := true; ok1; ok1 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok2 := true; ok2; ok2 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok3 := true; ok3; ok3 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok4 := true; ok4; ok4 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok5 := true; ok5; ok5 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok6 := true; ok6; ok6 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
				numObjsToConcat++
				XTcl_DStringFree(tls, bp+40)

				if numCL != 0 {
					XTclContinuationsEnter(tls, XTclFetchLiteral(tls, envPtr, uint32(literal)),
						numCL, clPosition)
				}
				numCL = 0
			}

			*(*int32)(unsafe.Pointer(envPtr + 3560)) += adjust
			XTclCompileScript(tls, interp, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart+uintptr(1),
				(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize-2, envPtr)
			*(*int32)(unsafe.Pointer(envPtr + 3560)) -= adjust
			numObjsToConcat++
			break

		case TCL_TOKEN_VARIABLE:
			// Push any accumulated chars appearing before the $<var>.

			if (*Tcl_DString)(unsafe.Pointer(bp+40)).Flength > 0 {
				var literal int32

				literal = XTclRegisterLiteral(tls, envPtr, (*Tcl_DString)(unsafe.Pointer(bp+40)).Fstring, (*Tcl_DString)(unsafe.Pointer(bp+40)).Flength, 0)
				for ok7 := true; ok7; ok7 = 0 != 0 {
					var _objIndexCopy int32 = literal
					if _objIndexCopy <= 255 {
						for ok8 := true; ok8; ok8 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH1 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok9 := true; ok9; ok9 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok10 := true; ok10; ok10 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					} else {
						for ok11 := true; ok11; ok11 = 0 != 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
								XTclExpandCodeArray(tls, envPtr)
							}
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
							*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
									if INST_PUSH4 == INST_START_CMD {
										return 1
									}
									return 0
								}()
							}
							for ok12 := true; ok12; ok12 = 0 != 0 {
								var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
								if _delta != 0 {
									if _delta == -0x7fffffff-1 {
										_delta = 1 - _objIndexCopy
									}
									for ok13 := true; ok13; ok13 = 0 != 0 {
										if _delta < 0 {
											if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
												(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
											}
										}
										*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
									}
								}
							}
						}
					}
				}
				numObjsToConcat++
				XTcl_DStringFree(tls, bp+40)
			}

			XTclCompileVarSubst(tls, interp, tokenPtr, envPtr)
			numObjsToConcat++
			count = count - (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents
			tokenPtr += 24 * uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents)
			break

		default:
			XTcl_Panic(tls, ts+21593,
				libc.VaList(bp, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart))
		}

	}
	goto __2
__2:
	count--
	tokenPtr += 24
	goto __1
	goto __3
__3:
	;

	// Push any accumulated characters appearing at the end.

	if (*Tcl_DString)(unsafe.Pointer(bp+40)).Flength > 0 {
		var literal int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_DString)(unsafe.Pointer(bp+40)).Fstring, (*Tcl_DString)(unsafe.Pointer(bp+40)).Flength, 0)

		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _objIndexCopy int32 = literal
			if _objIndexCopy <= 255 {
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok16 := true; ok16; ok16 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok17 := true; ok17; ok17 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok18 := true; ok18; ok18 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok19 := true; ok19; ok19 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok20 := true; ok20; ok20 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
		numObjsToConcat++
		if numCL != 0 {
			XTclContinuationsEnter(tls, XTclFetchLiteral(tls, envPtr, uint32(literal)),
				numCL, clPosition)
		}
		numCL = 0
	}

	// If necessary, concatenate the parts of the word.

	for numObjsToConcat > 255 {
		for ok21 := true; ok21; ok21 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(255))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_CONCAT1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok22 := true; ok22; ok22 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 255
					}
					for ok23 := true; ok23; ok23 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		numObjsToConcat = numObjsToConcat - 254 // concat pushes 1 obj, the result
	}
	if numObjsToConcat > 1 {
		for ok24 := true; ok24; ok24 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(numObjsToConcat))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_CONCAT1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok25 := true; ok25; ok25 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - numObjsToConcat
					}
					for ok26 := true; ok26; ok26 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}

	// If the tokens yielded no instructions, push an empty string.

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == entryCodeNext {
		for ok27 := true; ok27; ok27 = 0 != 0 {
			var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
			if _objIndexCopy <= 255 {
				for ok28 := true; ok28; ok28 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH1 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok29 := true; ok29; ok29 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok30 := true; ok30; ok30 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			} else {
				for ok31 := true; ok31; ok31 = 0 != 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
						XTclExpandCodeArray(tls, envPtr)
					}
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
					*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
							if INST_PUSH4 == INST_START_CMD {
								return 1
							}
							return 0
						}()
					}
					for ok32 := true; ok32; ok32 = 0 != 0 {
						var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
						if _delta != 0 {
							if _delta == -0x7fffffff-1 {
								_delta = 1 - _objIndexCopy
							}
							for ok33 := true; ok33; ok33 = 0 != 0 {
								if _delta < 0 {
									if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
										(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
									}
								}
								*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
							}
						}
					}
				}
			}
		}
	}
	XTcl_DStringFree(tls, bp+40)

	// Release the temp table we used to collect the locations of continuation
	// lines, if any.

	if maxNumCL != 0 {
		XTclpFree(tls, clPosition)
	}
	for ok34 := true; ok34; ok34 = 0 != 0 {
		var _dd int32 = depth + 1
		if _dd != (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
			XTcl_Panic(tls, ts+19014, libc.VaList(bp+24, (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth, _dd))
		}
	}
}

//----------------------------------------------------------------------
//
// TclCompileCmdWord --
//
//	Given an array of parse tokens for a word containing one or more Tcl
//	commands, emit inline instructions to execute them. This procedure
//	differs from TclCompileTokens in that a simple word such as a loop
//	body enclosed in braces is not just pushed as a string, but is itself
//	parsed into tokens and compiled.
//
// Results:
//	The return value is a standard Tcl result. If an error occurs, an
//	error message is left in the interpreter's result.
//
// Side effects:
//	Instructions are added to envPtr to execute the tokens at runtime.
//
//----------------------------------------------------------------------

func XTclCompileCmdWord(tls *libc.TLS, interp uintptr, tokenPtr uintptr, count int32, envPtr uintptr) { /* tclCompile.c:2583:1: */
	if count == 1 && (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_TEXT {
		// Handle the common case: if there is a single text token, compile it
		// into an inline sequence of instructions.

		XTclCompileScript(tls, interp, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize, envPtr)
	} else {
		// Multiple tokens or the single token involves substitutions. Emit
		// instructions to invoke the eval command procedure at runtime on the
		// result of evaluating the tokens.

		XTclCompileTokens(tls, interp, tokenPtr, count, envPtr)
		XTclEmitInvoke(tls, envPtr, INST_EVAL_STK, 0)
	}
}

//----------------------------------------------------------------------
//
// TclCompileExprWords --
//
//	Given an array of parse tokens representing one or more words that
//	contain a Tcl expression, emit inline instructions to execute the
//	expression. This procedure differs from TclCompileExpr in that it
//	supports Tcl's two-level substitution semantics for expressions that
//	appear as command words.
//
// Results:
//	The return value is a standard Tcl result. If an error occurs, an
//	error message is left in the interpreter's result.
//
// Side effects:
//	Instructions are added to envPtr to execute the expression.
//
//----------------------------------------------------------------------

func XTclCompileExprWords(tls *libc.TLS, interp uintptr, tokenPtr uintptr, numWords int32, envPtr uintptr) { /* tclCompile.c:2632:1: */
	var wordPtr uintptr
	var i int32
	var concatItems int32

	// If the expression is a single word that doesn't require substitutions,
	// just compile its string into inline instructions.

	if numWords == 1 && (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
		XTclCompileExpr(tls, interp, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize, envPtr, 1)
		return
	}

	// Emit code to call the expr command proc at runtime. Concatenate the
	// (already substituted once) expr tokens with a space between each.

	wordPtr = tokenPtr
	for i = 0; i < numWords; i++ {
		XTclCompileTokens(tls, interp, wordPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(wordPtr)).FnumComponents, envPtr)

		if i < numWords-1 {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+14901, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)), 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		}
		wordPtr += 24 * uintptr((*Tcl_Token)(unsafe.Pointer(wordPtr)).FnumComponents+1)
	}
	concatItems = 2*numWords - 1
	for concatItems > 255 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(255))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_CONCAT1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 255
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		concatItems = concatItems - 254
	}
	if concatItems > 1 {
		for ok10 := true; ok10; ok10 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_STR_CONCAT1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(concatItems))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_STR_CONCAT1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok11 := true; ok11; ok11 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_STR_CONCAT1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - concatItems
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	for ok13 := true; ok13; ok13 = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EXPR_STK)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_EXPR_STK == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_EXPR_STK].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok15 := true; ok15; ok15 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
}

//----------------------------------------------------------------------
//
// TclCompileNoOp --
//
//	Function called to compile no-op's
//
// Results:
//	The return value is TCL_OK, indicating successful compilation.
//
// Side effects:
//	Instructions are added to envPtr to execute a no-op at runtime. No
//	result is pushed onto the stack: the compiler has to take care of this
//	itself if the last compiled command is a NoOp.
//
//----------------------------------------------------------------------

func XTclCompileNoOp(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclCompile.c:2698:1: */
	var tokenPtr uintptr
	var i int32

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	for i = 1; i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords; i++ {
		tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents)*24 + uintptr(1)*24

		if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD {
			XTclCompileTokens(tls, interp, tokenPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents, envPtr)

			for ok := true; ok; ok = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_POP == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, ts+2631, int32(uint64(unsafe.Sizeof([1]int8{}))-uint64(1)), 0)
		if _objIndexCopy <= 255 {
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok6 := true; ok6; ok6 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok8 := true; ok8; ok8 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclInitByteCodeObj --
//
//	Create a ByteCode structure and initialize it from a CompileEnv
//	compilation environment structure. The ByteCode structure is smaller
//	and contains just that information needed to execute the bytecode
//	instructions resulting from compiling a Tcl script. The resulting
//	structure is placed in the specified object.
//
// Results:
//	A newly constructed ByteCode object is stored in the internal
//	representation of the objPtr.
//
// Side effects:
//	A single heap object is allocated to hold the new ByteCode structure
//	and its code, object, command location, and aux data arrays. Note that
//	"ownership" (i.e., the pointers to) the Tcl objects and aux data items
//	will be handed over to the new ByteCode structure from the CompileEnv
//	structure.
//
//----------------------------------------------------------------------

func XTclInitByteCodeObj(tls *libc.TLS, objPtr uintptr, envPtr uintptr) { /* tclCompile.c:2748:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var codePtr uintptr
	var codeBytes Size_t
	var objArrayBytes Size_t
	var exceptArrayBytes Size_t
	var cmdLocBytes Size_t
	var auxDataArrayBytes Size_t
	var structureSize Size_t
	var p uintptr
	var numLitObjects int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayNext
	var namespacePtr uintptr
	var i int32
	// var isNew int32 at bp+4, 4

	var iPtr uintptr

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr == uintptr(0) {
		XTcl_Panic(tls, ts+21645, 0)
	}

	iPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr

	codeBytes = Size_t((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	objArrayBytes = uint64((*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayNext) * uint64(unsafe.Sizeof(uintptr(0)))
	exceptArrayBytes = uint64((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext) * uint64(unsafe.Sizeof(ExceptionRange{}))
	auxDataArrayBytes = uint64((*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext) * uint64(unsafe.Sizeof(AuxData{}))
	cmdLocBytes = Size_t(sGetCmdLocEncodingSize(tls, envPtr))

	// Compute the total number of bytes needed for this bytecode.

	structureSize = Size_t(unsafe.Sizeof(ByteCode{}))
	structureSize = structureSize + Size_t((int32(codeBytes)+7)&libc.CplInt32(7))        // align object array
	structureSize = structureSize + Size_t((int32(objArrayBytes)+7)&libc.CplInt32(7))    // align exc range arr
	structureSize = structureSize + Size_t((int32(exceptArrayBytes)+7)&libc.CplInt32(7)) // align AuxData array
	structureSize = structureSize + auxDataArrayBytes
	structureSize = structureSize + cmdLocBytes

	if (*Interp)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr)).FvarFramePtr != uintptr(0) {
		namespacePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr)).FvarFramePtr)).FnsPtr
	} else {
		namespacePtr = (*Interp)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr)).FglobalNsPtr
	}

	p = XTcl_Alloc(tls, uint32(structureSize))
	codePtr = p
	(*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle = XTclHandlePreserve(tls, (*Interp)(unsafe.Pointer(iPtr)).Fhandle)
	(*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch = (*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch
	(*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr = namespacePtr
	(*ByteCode)(unsafe.Pointer(codePtr)).FnsEpoch = (*Namespace)(unsafe.Pointer(namespacePtr)).FresolverEpoch
	(*ByteCode)(unsafe.Pointer(codePtr)).FrefCount = 1
	if (*Namespace)(unsafe.Pointer(namespacePtr)).FcompiledVarResProc != 0 || (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr != 0 {
		(*ByteCode)(unsafe.Pointer(codePtr)).Fflags = uint32(TCL_BYTECODE_RESOLVE_VARS)
	} else {
		(*ByteCode)(unsafe.Pointer(codePtr)).Fflags = uint32(0)
	}
	(*ByteCode)(unsafe.Pointer(codePtr)).Fsource = (*CompileEnv)(unsafe.Pointer(envPtr)).Fsource
	(*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr

	(*ByteCode)(unsafe.Pointer(codePtr)).FnumCommands = (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands
	(*ByteCode)(unsafe.Pointer(codePtr)).FnumSrcBytes = (*CompileEnv)(unsafe.Pointer(envPtr)).FnumSrcBytes
	(*ByteCode)(unsafe.Pointer(codePtr)).FnumCodeBytes = int32(codeBytes)
	(*ByteCode)(unsafe.Pointer(codePtr)).FnumLitObjects = numLitObjects
	(*ByteCode)(unsafe.Pointer(codePtr)).FnumExceptRanges = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext
	(*ByteCode)(unsafe.Pointer(codePtr)).FnumAuxDataItems = (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext
	(*ByteCode)(unsafe.Pointer(codePtr)).FnumCmdLocBytes = int32(cmdLocBytes)
	(*ByteCode)(unsafe.Pointer(codePtr)).FmaxExceptDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
	(*ByteCode)(unsafe.Pointer(codePtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth

	p += uintptr(unsafe.Sizeof(ByteCode{}))
	(*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart = p
	libc.Xmemcpy(tls, p, (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart, codeBytes)

	p += uintptr((int32(codeBytes) + 7) & libc.CplInt32(7)) // align object array
	(*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr = p
	for i = 0; i < numLitObjects; i++ {
		var fetched uintptr = XTclFetchLiteral(tls, envPtr, uint32(i))

		if objPtr == fetched {
			// Prevent circular reference where the bytecode internalrep of
			// a value contains a literal which is that same value.
			// If this is allowed to happen, refcount decrements may not
			// reach zero, and memory may leak.  Bugs 467523, 3357771
			//
			// NOTE:  [Bugs 3392070, 3389764] We make a copy based completely
			// on the string value, and do not call Tcl_DuplicateObj() so we
			// can be sure we do not have any lingering cycles hiding in
			// the internalrep.
			// var numBytes int32 at bp, 4

			var bytes uintptr = XTcl_GetStringFromObj(tls, objPtr, bp)

			*(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr + uintptr(i)*8)) = XTcl_NewStringObj(tls, bytes, *(*int32)(unsafe.Pointer(bp /* numBytes */)))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr + uintptr(i)*8)))).FrefCount++
			XTclReleaseLiteral(tls, iPtr, objPtr)
		} else {
			*(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr + uintptr(i)*8)) = fetched
		}
	}

	p += uintptr((int32(objArrayBytes) + 7) & libc.CplInt32(7)) // align exception range array
	if exceptArrayBytes > uint64(0) {
		(*ByteCode)(unsafe.Pointer(codePtr)).FexceptArrayPtr = p
		libc.Xmemcpy(tls, p, (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr, exceptArrayBytes)
	} else {
		(*ByteCode)(unsafe.Pointer(codePtr)).FexceptArrayPtr = uintptr(0)
	}

	p += uintptr((int32(exceptArrayBytes) + 7) & libc.CplInt32(7)) // align AuxData array
	if auxDataArrayBytes > uint64(0) {
		(*ByteCode)(unsafe.Pointer(codePtr)).FauxDataArrayPtr = p
		libc.Xmemcpy(tls, p, (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr, auxDataArrayBytes)
	} else {
		(*ByteCode)(unsafe.Pointer(codePtr)).FauxDataArrayPtr = uintptr(0)
	}

	p += uintptr(auxDataArrayBytes)
	sEncodeCmdLocMap(tls, envPtr, codePtr, p)

	// Record various compilation-related statistics about the new ByteCode
	// structure. Don't include overhead for statistics-related fields.

	// Free the old internal rep then convert the object to a bytecode object
	// by making its internal rep point to the just compiled ByteCode.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = codePtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclByteCodeType))

	// TIP #280. Associate the extended per-word line information with the
	// byte code object (internal rep), for use with the bc compiler.

	(*Tcl_HashEntry)(unsafe.Pointer((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr, codePtr, bp+4))).FclientData = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	(*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr = uintptr(0)

	// We've used up the CompileEnv.  Mark as uninitialized.
	(*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr = uintptr(0)

	(*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// TclFindCompiledLocal --
//
//	This procedure is called at compile time to look up and optionally
//	allocate an entry ("slot") for a variable in a procedure's array of
//	local variables. If the variable's name is NULL, a new temporary
//	variable is always created. (Such temporary variables can only be
//	referenced using their slot index.)
//
// Results:
//	If create is 0 and the name is non-NULL, then if the variable is
//	found, the index of its entry in the procedure's array of local
//	variables is returned; otherwise -1 is returned. If name is NULL, the
//	index of a new temporary variable is returned. Finally, if create is 1
//	and name is non-NULL, the index of a new entry is returned.
//
// Side effects:
//	Creates and registers a new local variable if create is 1 and the
//	variable is unknown, or if the name is NULL.
//
//----------------------------------------------------------------------

func XTclFindCompiledLocal(tls *libc.TLS, name uintptr, nameBytes int32, create int32, envPtr uintptr) int32 { /* tclCompile.c:2942:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var localPtr uintptr
	var localVar int32 = -1
	var i int32
	var procPtr uintptr

	// If not creating a temporary, does a local variable of the specified
	// name already exist?

	procPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FprocPtr

	if procPtr == uintptr(0) {
		// Compiling a non-body script: give it read access to the LVT in the
		// current localCache

		var cachePtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr)).FvarFramePtr)).FlocalCachePtr
		var localName uintptr
		var varNamePtr uintptr
		// var len int32 at bp, 4

		if !(cachePtr != 0) || !(name != 0) {
			return -1
		}

		varNamePtr = cachePtr + 8
		i = 0
	__1:
		if !(i < (*LocalCache)(unsafe.Pointer(cachePtr)).FnumVars) {
			goto __3
		}
		{
			if *(*uintptr)(unsafe.Pointer(varNamePtr)) != 0 {
				localName = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(varNamePtr)), bp)
				if *(*int32)(unsafe.Pointer(bp)) == nameBytes && !(libc.Xstrncmp(tls, name, localName, uint64(*(*int32)(unsafe.Pointer(bp)))) != 0) {
					return i
				}
			}

		}
		goto __2
	__2:
		varNamePtr += 8
		i++
		goto __1
		goto __3
	__3:
		;
		return -1
	}

	if name != uintptr(0) {
		var localCt int32 = (*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals

		localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr
		for i = 0; i < localCt; i++ {
			if !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_TEMPORARY != 0) {
				var localName uintptr = localPtr + 40 /* &.name */

				if nameBytes == (*CompiledLocal)(unsafe.Pointer(localPtr)).FnameLength && libc.Xstrncmp(tls, name, localName, uint64(nameBytes)) == 0 {
					return i
				}
			}
			localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
		}
	}

	// Create a new variable if appropriate.

	if create != 0 || name == uintptr(0) {
		localVar = (*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals
		localPtr = XTcl_Alloc(tls, uint32(int32(uintptr(0)+40)+nameBytes+1))
		if (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr == uintptr(0) {
			(*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr = libc.AssignPtrUintptr(procPtr+48, localPtr)
		} else {
			(*CompiledLocal)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FlastLocalPtr)).FnextPtr = localPtr
			(*Proc)(unsafe.Pointer(procPtr)).FlastLocalPtr = localPtr
		}
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr = uintptr(0)
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FnameLength = nameBytes
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FframeIndex = localVar
		(*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags = 0
		if name == uintptr(0) {
			*(*int32)(unsafe.Pointer(localPtr + 16)) |= VAR_TEMPORARY
		}
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr = uintptr(0)
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo = uintptr(0)

		if name != uintptr(0) {
			libc.Xmemcpy(tls, localPtr+40, name, uint64(nameBytes))
		}
		*(*int8)(unsafe.Pointer(localPtr + 40 + uintptr(nameBytes))) = int8(0)
		(*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals++
	}
	return localVar
}

//----------------------------------------------------------------------
//
// TclExpandCodeArray --
//
//	Procedure that uses malloc to allocate more storage for a CompileEnv's
//	code array.
//
// Results:
//	None.
//
// Side effects:
//	The byte code array in *envPtr is reallocated to a new array of double
//	the size, and if envPtr->mallocedCodeArray is non-zero the old array
//	is freed. Byte codes are copied from the old array to the new one.
//
//----------------------------------------------------------------------

func XTclExpandCodeArray(tls *libc.TLS, envArgPtr uintptr) { /* tclCompile.c:3059:1: */
	var envPtr uintptr = envArgPtr
	// The CompileEnv containing the code array to
	// be doubled in size.

	// envPtr->codeNext is equal to envPtr->codeEnd. The currently defined
	// code bytes are stored between envPtr->codeStart and envPtr->codeNext-1
	// [inclusive].

	var currBytes Size_t = Size_t((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	var newBytes Size_t = Size_t(int64(2) * ((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1))

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedCodeArray != 0 {
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart = XTcl_Realloc(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart, uint32(newBytes))
	} else {
		// envPtr->codeStart isn't a ckalloc'd pointer, so we must code a
		// ckrealloc equivalent for ourselves.

		var newPtr uintptr = XTcl_Alloc(tls, uint32(newBytes))

		libc.Xmemcpy(tls, newPtr, (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart, currBytes)
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart = newPtr
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedCodeArray = 1
	}

	(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(currBytes)
	(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(newBytes)
}

//----------------------------------------------------------------------
//
// EnterCmdStartData --
//
//	Registers the starting source and bytecode location of a command. This
//	information is used at runtime to map between instruction pc and
//	source locations.
//
// Results:
//	None.
//
// Side effects:
//	Inserts source and code location information into the compilation
//	environment envPtr for the command at index cmdIndex. The compilation
//	environment's CmdLocation array is grown if necessary.
//
//----------------------------------------------------------------------

func sEnterCmdStartData(tls *libc.TLS, envPtr uintptr, cmdIndex int32, srcOffset int32, codeOffset int32) { /* tclCompile.c:3116:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var cmdLocPtr uintptr

	if cmdIndex < 0 || cmdIndex >= (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands {
		XTcl_Panic(tls, ts+21701, libc.VaList(bp, cmdIndex))
	}

	if cmdIndex >= (*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapEnd {
		// Expand the command location array by allocating more storage from
		// the heap. The currently allocated CmdLocation entries are stored
		// from cmdMapPtr[0] up to cmdMapPtr[envPtr->cmdMapEnd] (inclusive).

		var currElems Size_t = Size_t((*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapEnd)
		var newElems Size_t = uint64(2) * currElems
		var currBytes Size_t = currElems * Size_t(unsafe.Sizeof(CmdLocation{}))
		var newBytes Size_t = newElems * Size_t(unsafe.Sizeof(CmdLocation{}))

		if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedCmdMap != 0 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr = XTcl_Realloc(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr, uint32(newBytes))
		} else {
			// envPtr->cmdMapPtr isn't a ckalloc'd pointer, so we must code a
			// ckrealloc equivalent for ourselves.

			var newPtr uintptr = XTcl_Alloc(tls, uint32(newBytes))

			libc.Xmemcpy(tls, newPtr, (*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr, currBytes)
			(*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr = newPtr
			(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedCmdMap = 1
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapEnd = int32(newElems)
	}

	if cmdIndex > 0 {
		if codeOffset < (*CmdLocation)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr+uintptr(cmdIndex-1)*16)).FcodeOffset {
			XTcl_Panic(tls, ts+21741, 0)
		}
	}

	cmdLocPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr + uintptr(cmdIndex)*16
	(*CmdLocation)(unsafe.Pointer(cmdLocPtr)).FcodeOffset = codeOffset
	(*CmdLocation)(unsafe.Pointer(cmdLocPtr)).FsrcOffset = srcOffset
	(*CmdLocation)(unsafe.Pointer(cmdLocPtr)).FnumSrcBytes = -1
	(*CmdLocation)(unsafe.Pointer(cmdLocPtr)).FnumCodeBytes = -1
}

//----------------------------------------------------------------------
//
// EnterCmdExtentData --
//
//	Registers the source and bytecode length for a command. This
//	information is used at runtime to map between instruction pc and
//	source locations.
//
// Results:
//	None.
//
// Side effects:
//	Inserts source and code length information into the compilation
//	environment envPtr for the command at index cmdIndex. Starting source
//	and bytecode information for the command must already have been
//	registered.
//
//----------------------------------------------------------------------

func sEnterCmdExtentData(tls *libc.TLS, envPtr uintptr, cmdIndex int32, numSrcBytes int32, numCodeBytes int32) { /* tclCompile.c:3195:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var cmdLocPtr uintptr

	if cmdIndex < 0 || cmdIndex >= (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands {
		XTcl_Panic(tls, ts+21794, libc.VaList(bp, cmdIndex))
	}

	if cmdIndex > (*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapEnd {
		XTcl_Panic(tls, ts+21835,
			libc.VaList(bp+8, cmdIndex))
	}

	cmdLocPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr + uintptr(cmdIndex)*16
	(*CmdLocation)(unsafe.Pointer(cmdLocPtr)).FnumSrcBytes = numSrcBytes
	(*CmdLocation)(unsafe.Pointer(cmdLocPtr)).FnumCodeBytes = numCodeBytes
}

//----------------------------------------------------------------------
// TIP #280
//
// EnterCmdWordData --
//
//	Registers the lines for the words of a command. This information is
//	used at runtime by 'info frame'.
//
// Results:
//	None.
//
// Side effects:
//	Inserts word location information into the compilation environment
//	envPtr for the command at index cmdIndex. The compilation
//	environment's ExtCmdLoc.ECL array is grown if necessary.
//
//----------------------------------------------------------------------

func sEnterCmdWordData(tls *libc.TLS, eclPtr uintptr, srcOffset int32, tokenPtr uintptr, cmd uintptr, len int32, numWords int32, line int32, clNext uintptr, wlines uintptr, envPtr uintptr) { /* tclCompile.c:3241:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var ePtr uintptr
	var last uintptr
	var wordIdx int32
	// var wordLine int32 at bp, 4

	var wwlines uintptr
	// var wordNext uintptr at bp+8, 8

	if (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnuloc >= (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnloc {
		// Expand the ECL array by allocating more storage from the heap. The
		// currently allocated ECL entries are stored from eclPtr->loc[0] up
		// to eclPtr->loc[eclPtr->nuloc-1] (inclusive).

		var currElems Size_t = Size_t((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnloc)
		var newElems Size_t = func() uint64 {
			if currElems != 0 {
				return uint64(2) * currElems
			}
			return uint64(1)
		}()
		var newBytes Size_t = newElems * Size_t(unsafe.Sizeof(ECL{}))

		(*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc = XTcl_Realloc(tls, (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc, uint32(newBytes))
		(*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnloc = int32(newElems)
	}

	ePtr = (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc + uintptr((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnuloc)*24
	(*ECL)(unsafe.Pointer(ePtr)).FsrcOffset = srcOffset
	(*ECL)(unsafe.Pointer(ePtr)).Fline = XTcl_Alloc(tls, uint32(uint64(numWords)*uint64(unsafe.Sizeof(int32(0)))))
	(*ECL)(unsafe.Pointer(ePtr)).Fnext = XTcl_Alloc(tls, uint32(uint64(numWords)*uint64(unsafe.Sizeof(uintptr(0)))))
	(*ECL)(unsafe.Pointer(ePtr)).Fnline = numWords
	wwlines = XTcl_Alloc(tls, uint32(uint64(numWords)*uint64(unsafe.Sizeof(int32(0)))))

	last = cmd
	*(*int32)(unsafe.Pointer(bp /* wordLine */)) = line
	*(*uintptr)(unsafe.Pointer(bp + 8 /* wordNext */)) = clNext
	wordIdx = 0
__1:
	if !(wordIdx < numWords) {
		goto __3
	}
	{
		XTclAdvanceLines(tls, bp, last, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)
		XTclAdvanceContinuations(tls, bp, bp+8,
			int32((int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1))
		// See Ticket 4b61afd660
		*(*int32)(unsafe.Pointer(wwlines + uintptr(wordIdx)*4)) = func() int32 {
			if wordIdx == 0 || XTclWordKnownAtCompileTime(tls, tokenPtr, uintptr(0)) != 0 {
				return *(*int32)(unsafe.Pointer(bp /* wordLine */))
			}
			return -1
		}()
		*(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer(ePtr)).Fline + uintptr(wordIdx)*4)) = *(*int32)(unsafe.Pointer(bp /* wordLine */))
		*(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer(ePtr)).Fnext + uintptr(wordIdx)*8)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* wordNext */))
		last = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart

	}
	goto __2
__2:
	wordIdx++
	tokenPtr += 24 * uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)
	goto __1
	goto __3
__3:
	;

	*(*uintptr)(unsafe.Pointer(wlines)) = wwlines
	(*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnuloc++
}

//----------------------------------------------------------------------
//
// TclCreateExceptRange --
//
//	Procedure that allocates and initializes a new ExceptionRange
//	structure of the specified kind in a CompileEnv.
//
// Results:
//	Returns the index for the newly created ExceptionRange.
//
// Side effects:
//	If there is not enough room in the CompileEnv's ExceptionRange array,
//	the array in expanded: a new array of double the size is allocated, if
//	envPtr->mallocedExceptArray is non-zero the old array is freed, and
//	ExceptionRange entries are copied from the old array to the new one.
//
//----------------------------------------------------------------------

func XTclCreateExceptRange(tls *libc.TLS, type1 ExceptionRangeType, envPtr uintptr) int32 { /* tclCompile.c:3323:1: */
	var rangePtr uintptr
	var auxPtr uintptr
	var index int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext

	if index >= (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayEnd {
		// Expand the ExceptionRange array. The currently allocated entries
		// are stored between elements 0 and (envPtr->exceptArrayNext - 1)
		// [inclusive].

		var currBytes Size_t = uint64((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext) * uint64(unsafe.Sizeof(ExceptionRange{}))
		var currBytes2 Size_t = uint64((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext) * uint64(unsafe.Sizeof(ExceptionAux{}))
		var newElems int32 = 2 * (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayEnd
		var newBytes Size_t = uint64(newElems) * uint64(unsafe.Sizeof(ExceptionRange{}))
		var newBytes2 Size_t = uint64(newElems) * uint64(unsafe.Sizeof(ExceptionAux{}))

		if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedExceptArray != 0 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr = XTcl_Realloc(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr, uint32(newBytes))
			(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr = XTcl_Realloc(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr, uint32(newBytes2))
		} else {
			// envPtr->exceptArrayPtr isn't a ckalloc'd pointer, so we must
			// code a ckrealloc equivalent for ourselves.

			var newPtr uintptr = XTcl_Alloc(tls, uint32(newBytes))
			var newPtr2 uintptr = XTcl_Alloc(tls, uint32(newBytes2))

			libc.Xmemcpy(tls, newPtr, (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr, currBytes)
			libc.Xmemcpy(tls, newPtr2, (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr, currBytes2)
			(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr = newPtr
			(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr = newPtr2
			(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedExceptArray = 1
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayEnd = newElems
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext++

	rangePtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(index)*28
	(*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype = type1
	(*ExceptionRange)(unsafe.Pointer(rangePtr)).FnestingLevel = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
	(*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset = -1
	(*ExceptionRange)(unsafe.Pointer(rangePtr)).FnumCodeBytes = -1
	(*ExceptionRange)(unsafe.Pointer(rangePtr)).FbreakOffset = -1
	(*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset = -1
	(*ExceptionRange)(unsafe.Pointer(rangePtr)).FcatchOffset = -1
	auxPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr + uintptr(index)*56
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FsupportsContinue = 1
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FstackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FexpandTarget = (*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FexpandTargetDepth = -1
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumBreakTargets = 0
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets = uintptr(0)
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FallocBreakTargets = 0
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumContinueTargets = 0
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets = uintptr(0)
	(*ExceptionAux)(unsafe.Pointer(auxPtr)).FallocContinueTargets = 0
	return index
}

// ---------------------------------------------------------------------
//
// TclGetInnermostExceptionRange --
//
//	Returns the innermost exception range that covers the current code
//	creation point, and (optionally) the stack depth that is expected at
//	that point. Relies on the fact that the range has a numCodeBytes = -1
//	when it is being populated and that inner ranges come after outer
//	ranges.
//
// ---------------------------------------------------------------------

func XTclGetInnermostExceptionRange(tls *libc.TLS, envPtr uintptr, returnCode int32, auxPtrPtr uintptr) uintptr { /* tclCompile.c:3406:16: */
	var i int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext
	var rangePtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(i)*28

	for i > 0 {
		rangePtr -= 28
		i--

		if (int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 >= int64((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset) && ((*ExceptionRange)(unsafe.Pointer(rangePtr)).FnumCodeBytes == -1 || (int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 < int64((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset+(*ExceptionRange)(unsafe.Pointer(rangePtr)).FnumCodeBytes)) && (returnCode != TCL_CONTINUE || (*ExceptionAux)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr+uintptr(i)*56)).FsupportsContinue != 0) {

			if auxPtrPtr != 0 {
				*(*uintptr)(unsafe.Pointer(auxPtrPtr)) = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr + uintptr(i)*56
			}
			return rangePtr
		}
	}
	return uintptr(0)
}

// ---------------------------------------------------------------------
//
// TclAddLoopBreakFixup, TclAddLoopContinueFixup --
//
//	Adds a place that wants to break/continue to the loop exception range
//	tracking that will be fixed up once the loop can be finalized. These
//	functions will generate an INST_JUMP4 that will be fixed up during the
//	loop finalization.
//
// ---------------------------------------------------------------------

func XTclAddLoopBreakFixup(tls *libc.TLS, envPtr uintptr, auxPtr uintptr) { /* tclCompile.c:3447:1: */
	var range1 int32 = int32((int64(auxPtr) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr)) / 56)

	if (*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).Ftype != LOOP_EXCEPTION_RANGE {
		XTcl_Panic(tls, ts+21889, 0)
	}

	if libc.PreIncInt32(&(*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumBreakTargets, 1) > (*ExceptionAux)(unsafe.Pointer(auxPtr)).FallocBreakTargets {
		*(*int32)(unsafe.Pointer(auxPtr + 32)) *= 2
		*(*int32)(unsafe.Pointer(auxPtr + 32)) += 2
		if (*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets != 0 {
			(*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets = XTcl_Realloc(tls, (*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets, uint32(uint64(unsafe.Sizeof(int32(0)))*uint64((*ExceptionAux)(unsafe.Pointer(auxPtr)).FallocBreakTargets)))
		} else {
			(*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(int32(0)))*uint64((*ExceptionAux)(unsafe.Pointer(auxPtr)).FallocBreakTargets)))
		}
	}
	*(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets + uintptr((*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumBreakTargets-1)*4)) = uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
}

func XTclAddLoopContinueFixup(tls *libc.TLS, envPtr uintptr, auxPtr uintptr) { /* tclCompile.c:3473:1: */
	var range1 int32 = int32((int64(auxPtr) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr)) / 56)

	if (*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(range1)*28)).Ftype != LOOP_EXCEPTION_RANGE {
		XTcl_Panic(tls, ts+21941, 0)
	}

	if libc.PreIncInt32(&(*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumContinueTargets, 1) > (*ExceptionAux)(unsafe.Pointer(auxPtr)).FallocContinueTargets {
		*(*int32)(unsafe.Pointer(auxPtr + 48)) *= 2
		*(*int32)(unsafe.Pointer(auxPtr + 48)) += 2
		if (*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets != 0 {
			(*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets = XTcl_Realloc(tls, (*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets, uint32(uint64(unsafe.Sizeof(int32(0)))*uint64((*ExceptionAux)(unsafe.Pointer(auxPtr)).FallocContinueTargets)))
		} else {
			(*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(int32(0)))*uint64((*ExceptionAux)(unsafe.Pointer(auxPtr)).FallocContinueTargets)))
		}
	}
	*(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets + uintptr((*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumContinueTargets-1)*4)) = uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP4)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 24)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 16)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(uint32(0)) >> 8)
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_JUMP4 == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_JUMP4].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}
}

// ---------------------------------------------------------------------
//
// TclCleanupStackForBreakContinue --
//
//	Ditch the extra elements from the auxiliary stack and the main stack.
//	How to do this exactly depends on whether there are any elements on
//	the auxiliary stack to pop.
//
// ---------------------------------------------------------------------

func XTclCleanupStackForBreakContinue(tls *libc.TLS, envPtr uintptr, auxPtr uintptr) { /* tclCompile.c:3512:1: */
	var savedStackDepth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
	var toPop int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount - (*ExceptionAux)(unsafe.Pointer(auxPtr)).FexpandTarget

	if toPop > 0 {
		for libc.PostDecInt32(&toPop, 1) > 0 {
			for ok := true; ok; ok = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EXPAND_DROP)
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_EXPAND_DROP == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_EXPAND_DROP].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - 0
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if (*ExceptionAux)(unsafe.Pointer(auxPtr)).FexpandTargetDepth-(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += (*ExceptionAux)(unsafe.Pointer(auxPtr)).FexpandTargetDepth - (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = (*ExceptionAux)(unsafe.Pointer(auxPtr)).FexpandTargetDepth
	}
	toPop = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth - (*ExceptionAux)(unsafe.Pointer(auxPtr)).FstackDepth
	for libc.PostDecInt32(&toPop, 1) > 0 {
		for ok4 := true; ok4; ok4 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_POP)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_POP == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok5 := true; ok5; ok5 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_POP].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok6 := true; ok6; ok6 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = savedStackDepth
}

// ---------------------------------------------------------------------
//
// StartExpanding --
//
//	Pushes an INST_EXPAND_START and does some additional housekeeping so
//	that the [break] and [continue] compilers can use an exception-free
//	issue to discard it.
//
// ---------------------------------------------------------------------

func sStartExpanding(tls *libc.TLS, envPtr uintptr) { /* tclCompile.c:3547:1: */
	var i int32

	for ok := true; ok; ok = 0 != 0 {
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
			XTclExpandCodeArray(tls, envPtr)
		}
		*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EXPAND_START)
		if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
				if INST_EXPAND_START == INST_START_CMD {
					return 1
				}
				return 0
			}()
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _delta int32 = XtclInstructionTable[INST_EXPAND_START].FstackEffect
			if _delta != 0 {
				if _delta == -0x7fffffff-1 {
					_delta = 1 - 0
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if _delta < 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
						}
					}
					*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
				}
			}
		}
	}

	// Update inner exception ranges with information about the environment
	// where this expansion started.

	for i = 0; i < (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext; i++ {
		var rangePtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(i)*28
		var auxPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr + uintptr(i)*56

		// Ignore loops unless they're still being built.

		if int64((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset) > (int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 {
			continue
		}
		if (*ExceptionRange)(unsafe.Pointer(rangePtr)).FnumCodeBytes != -1 {
			continue
		}

		// Adequate condition: further out loops and further in exceptions
		// don't actually need this information.

		if (*ExceptionAux)(unsafe.Pointer(auxPtr)).FexpandTarget == (*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount {
			(*ExceptionAux)(unsafe.Pointer(auxPtr)).FexpandTargetDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
		}
	}

	// There's now one more expansion being processed on the auxiliary stack.

	(*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount++
}

// ---------------------------------------------------------------------
//
// TclFinalizeLoopExceptionRange --
//
//	Finalizes a loop exception range, binding the registered [break] and
//	[continue] implementations so that they jump to the correct place.
//	Note that this must only be called after *all* the exception range
//	target offsets have been set.
//
// ---------------------------------------------------------------------

func XTclFinalizeLoopExceptionRange(tls *libc.TLS, envPtr uintptr, range1 int32) { /* tclCompile.c:3605:1: */
	var rangePtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(range1)*28
	var auxPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr + uintptr(range1)*56
	var i int32
	var offset int32
	var site uintptr

	if (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype != LOOP_EXCEPTION_RANGE {
		XTcl_Panic(tls, ts+21996, 0)
	}

	// Do the jump fixups. Note that these are always issued as INST_JUMP4 so
	// there is no need to fuss around with updating code offsets.

	for i = 0; i < (*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumBreakTargets; i++ {
		site = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets + uintptr(i)*4)))
		offset = int32(uint32((*ExceptionRange)(unsafe.Pointer(rangePtr)).FbreakOffset) - *(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets + uintptr(i)*4)))
		for ok := true; ok; ok = 0 != 0 {
			*(*uint8)(unsafe.Pointer(site)) = uint8(INST_JUMP4)
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(site + uintptr(1))) = uint8(uint32(offset) >> 24)
				*(*uint8)(unsafe.Pointer(site + uintptr(1) + uintptr(1))) = uint8(uint32(offset) >> 16)
				*(*uint8)(unsafe.Pointer(site + uintptr(1) + uintptr(2))) = uint8(uint32(offset) >> 8)
				*(*uint8)(unsafe.Pointer(site + uintptr(1) + uintptr(3))) = uint8(uint32(offset))
			}
		}
	}
	for i = 0; i < (*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumContinueTargets; i++ {
		site = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(*(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets + uintptr(i)*4)))
		if (*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset == -1 {
			var j int32

			// WTF? Can't bind, so revert to an INST_CONTINUE. Not enough
			// space to do anything else.

			*(*uint8)(unsafe.Pointer(site)) = uint8(INST_CONTINUE)
			for j = 0; j < 4; j++ {
				*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&site, 1))) = uint8(INST_NOP)
			}
		} else {
			offset = int32(uint32((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset) - *(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets + uintptr(i)*4)))
			for ok2 := true; ok2; ok2 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(site)) = uint8(INST_JUMP4)
				for ok3 := true; ok3; ok3 = 0 != 0 {
					*(*uint8)(unsafe.Pointer(site + uintptr(1))) = uint8(uint32(offset) >> 24)
					*(*uint8)(unsafe.Pointer(site + uintptr(1) + uintptr(1))) = uint8(uint32(offset) >> 16)
					*(*uint8)(unsafe.Pointer(site + uintptr(1) + uintptr(2))) = uint8(uint32(offset) >> 8)
					*(*uint8)(unsafe.Pointer(site + uintptr(1) + uintptr(3))) = uint8(uint32(offset))
				}
			}
		}
	}

	// Drop the arrays we were holding the only reference to.

	if (*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets != 0 {
		XTclpFree(tls, (*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets)
		(*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets = uintptr(0)
		(*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumBreakTargets = 0
	}
	if (*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets != 0 {
		XTclpFree(tls, (*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets)
		(*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets = uintptr(0)
		(*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumContinueTargets = 0
	}
}

//----------------------------------------------------------------------
//
// TclCreateAuxData --
//
//	Procedure that allocates and initializes a new AuxData structure in a
//	CompileEnv's array of compilation auxiliary data records. These
//	AuxData records hold information created during compilation by
//	CompileProcs and used by instructions during execution.
//
// Results:
//	Returns the index for the newly created AuxData structure.
//
// Side effects:
//	If there is not enough room in the CompileEnv's AuxData array, the
//	AuxData array in expanded: a new array of double the size is
//	allocated, if envPtr->mallocedAuxDataArray is non-zero the old array
//	is freed, and AuxData entries are copied from the old array to the new
//	one.
//
//----------------------------------------------------------------------

func XTclCreateAuxData(tls *libc.TLS, clientData ClientData, typePtr uintptr, envPtr uintptr) int32 { /* tclCompile.c:3688:1: */
	var index int32 // Index for the new AuxData structure.
	var auxDataPtr uintptr
	// Points to the new AuxData structure

	index = (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext
	if index >= (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayEnd {
		// Expand the AuxData array. The currently allocated entries are
		// stored between elements 0 and (envPtr->auxDataArrayNext - 1)
		// [inclusive].

		var currBytes Size_t = uint64((*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext) * uint64(unsafe.Sizeof(AuxData{}))
		var newElems int32 = 2 * (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayEnd
		var newBytes Size_t = uint64(newElems) * uint64(unsafe.Sizeof(AuxData{}))

		if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedAuxDataArray != 0 {
			(*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr = XTcl_Realloc(tls, (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr, uint32(newBytes))
		} else {
			// envPtr->auxDataArrayPtr isn't a ckalloc'd pointer, so we must
			// code a ckrealloc equivalent for ourselves.

			var newPtr uintptr = XTcl_Alloc(tls, uint32(newBytes))

			libc.Xmemcpy(tls, newPtr, (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr, currBytes)
			(*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr = newPtr
			(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedAuxDataArray = 1
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayEnd = newElems
	}
	(*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext++

	auxDataPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr + uintptr(index)*16
	(*AuxData)(unsafe.Pointer(auxDataPtr)).FclientData = clientData
	(*AuxData)(unsafe.Pointer(auxDataPtr)).Ftype = typePtr
	return index
}

//----------------------------------------------------------------------
//
// TclInitJumpFixupArray --
//
//	Initializes a JumpFixupArray structure to hold some number of jump
//	fixup entries.
//
// Results:
//	None.
//
// Side effects:
//	The JumpFixupArray structure is initialized.
//
//----------------------------------------------------------------------

func XTclInitJumpFixupArray(tls *libc.TLS, fixupArrayPtr uintptr) { /* tclCompile.c:3755:1: */
	(*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Ffixup = fixupArrayPtr + 20 /* &.staticFixupSpace */
	(*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Fnext = 0
	(*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Fend = JUMPFIXUP_INIT_ENTRIES - 1
	(*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).FmallocedArray = 0
}

//----------------------------------------------------------------------
//
// TclExpandJumpFixupArray --
//
//	Procedure that uses malloc to allocate more storage for a jump fixup
//	array.
//
// Results:
//	None.
//
// Side effects:
//	The jump fixup array in *fixupArrayPtr is reallocated to a new array
//	of double the size, and if fixupArrayPtr->mallocedArray is non-zero
//	the old array is freed. Jump fixup structures are copied from the old
//	array to the new one.
//
//----------------------------------------------------------------------

func XTclExpandJumpFixupArray(tls *libc.TLS, fixupArrayPtr uintptr) { /* tclCompile.c:3787:1: */
	// The currently allocated jump fixup entries are stored from fixup[0] up
	// to fixup[fixupArrayPtr->fixupNext] (*not* inclusive). We assume
	// fixupArrayPtr->fixupNext is equal to fixupArrayPtr->fixupEnd.

	var currBytes Size_t = uint64((*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Fnext) * uint64(unsafe.Sizeof(JumpFixup{}))
	var newElems int32 = 2 * ((*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Fend + 1)
	var newBytes Size_t = uint64(newElems) * uint64(unsafe.Sizeof(JumpFixup{}))

	if (*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).FmallocedArray != 0 {
		(*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Ffixup = XTcl_Realloc(tls, (*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Ffixup, uint32(newBytes))
	} else {
		// fixupArrayPtr->fixup isn't a ckalloc'd pointer, so we must code a
		// ckrealloc equivalent for ourselves.

		var newPtr uintptr = XTcl_Alloc(tls, uint32(newBytes))

		libc.Xmemcpy(tls, newPtr, (*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Ffixup, currBytes)
		(*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Ffixup = newPtr
		(*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).FmallocedArray = 1
	}
	(*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Fend = newElems
}

//----------------------------------------------------------------------
//
// TclFreeJumpFixupArray --
//
//	Free any storage allocated in a jump fixup array structure.
//
// Results:
//	None.
//
// Side effects:
//	Allocated storage in the JumpFixupArray structure is freed.
//
//----------------------------------------------------------------------

func XTclFreeJumpFixupArray(tls *libc.TLS, fixupArrayPtr uintptr) { /* tclCompile.c:3836:1: */
	if (*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).FmallocedArray != 0 {
		XTclpFree(tls, (*JumpFixupArray)(unsafe.Pointer(fixupArrayPtr)).Ffixup)
	}
}

//----------------------------------------------------------------------
//
// TclEmitForwardJump --
//
//	Procedure to emit a two-byte forward jump of kind "jumpType". Since
//	the jump may later have to be grown to five bytes if the jump target
//	is more than, say, 127 bytes away, this procedure also initializes a
//	JumpFixup record with information about the jump.
//
// Results:
//	None.
//
// Side effects:
//	The JumpFixup record pointed to by "jumpFixupPtr" is initialized with
//	information needed later if the jump is to be grown. Also, a two byte
//	jump of the designated type is emitted at the current point in the
//	bytecode stream.
//
//----------------------------------------------------------------------

func XTclEmitForwardJump(tls *libc.TLS, envPtr uintptr, jumpType TclJumpType, jumpFixupPtr uintptr) { /* tclCompile.c:3869:1: */
	// Initialize the JumpFixup structure:
	//    - codeOffset is offset of first byte of jump below
	//    - cmdIndex is index of the command after the current one
	//    - exceptIndex is the index of the first ExceptionRange after the
	//	    current one.

	(*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FjumpType = jumpType
	(*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FcodeOffset = uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	(*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FcmdIndex = (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands
	(*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FexceptIndex = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext

	switch jumpType {
	case TCL_UNCONDITIONAL_JUMP:
		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		break
	case TCL_TRUE_JUMP:
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_TRUE1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP_TRUE1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP_TRUE1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		break
	default:
		for ok6 := true; ok6; ok6 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_JUMP_FALSE1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(0))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_JUMP_FALSE1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_JUMP_FALSE1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		break
	}
}

//----------------------------------------------------------------------
//
// TclFixupForwardJump --
//
//	Procedure that updates a previously-emitted forward jump to jump a
//	specified number of bytes, "jumpDist". If necessary, the jump is grown
//	from two to five bytes; this is done if the jump distance is greater
//	than "distThreshold" (normally 127 bytes). The jump is described by a
//	JumpFixup record previously initialized by TclEmitForwardJump.
//
// Results:
//	1 if the jump was grown and subsequent instructions had to be moved;
//	otherwise 0. This result is returned to allow callers to update any
//	additional code offsets they may hold.
//
// Side effects:
//	The jump may be grown and subsequent instructions moved. If this
//	happens, the code offsets for any commands and any ExceptionRange
//	records between the jump and the current code address will be updated
//	to reflect the moved code. Also, the bytecode instruction array in the
//	CompileEnv structure may be grown and reallocated.
//
//----------------------------------------------------------------------

func XTclFixupForwardJump(tls *libc.TLS, envPtr uintptr, jumpFixupPtr uintptr, jumpDist int32, distThreshold int32) int32 { /* tclCompile.c:3931:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var jumpPc uintptr
	var p uintptr
	var firstCmd int32
	var lastCmd int32
	var firstRange int32
	var lastRange int32
	var k int32
	var numBytes uint32

	if jumpDist <= distThreshold {
		jumpPc = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FcodeOffset)
		switch (*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FjumpType {
		case TCL_UNCONDITIONAL_JUMP:
			for ok := true; ok; ok = 0 != 0 {
				*(*uint8)(unsafe.Pointer(jumpPc)) = uint8(INST_JUMP1)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1))) = uint8(uint32(jumpDist))
			}
			break
			fallthrough
		case TCL_TRUE_JUMP:
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(jumpPc)) = uint8(INST_JUMP_TRUE1)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1))) = uint8(uint32(jumpDist))
			}
			break
			fallthrough
		default:
			for ok2 := true; ok2; ok2 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(jumpPc)) = uint8(INST_JUMP_FALSE1)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1))) = uint8(uint32(jumpDist))
			}
			break
		}
		return 0
	}

	// We must grow the jump then move subsequent instructions down. Note that
	// if we expand the space for generated instructions, code addresses might
	// change; be careful about updating any of these addresses held in
	// variables.

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(3) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
		XTclExpandCodeArray(tls, envPtr)
	}
	jumpPc = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FcodeOffset)
	numBytes = uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64(jumpPc))/1 - int64(2))
	p = jumpPc + uintptr(2)
	libc.Xmemmove(tls, p+uintptr(3), p, uint64(numBytes))

	*(*uintptr)(unsafe.Pointer(envPtr + 120)) += uintptr(3)
	jumpDist = jumpDist + 3
	switch (*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FjumpType {
	case TCL_UNCONDITIONAL_JUMP:
		for ok3 := true; ok3; ok3 = 0 != 0 {
			*(*uint8)(unsafe.Pointer(jumpPc)) = uint8(INST_JUMP4)
			for ok4 := true; ok4; ok4 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1))) = uint8(uint32(jumpDist) >> 24)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1) + uintptr(1))) = uint8(uint32(jumpDist) >> 16)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1) + uintptr(2))) = uint8(uint32(jumpDist) >> 8)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1) + uintptr(3))) = uint8(uint32(jumpDist))
			}
		}
		break
	case TCL_TRUE_JUMP:
		for ok5 := true; ok5; ok5 = 0 != 0 {
			*(*uint8)(unsafe.Pointer(jumpPc)) = uint8(INST_JUMP_TRUE4)
			for ok6 := true; ok6; ok6 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1))) = uint8(uint32(jumpDist) >> 24)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1) + uintptr(1))) = uint8(uint32(jumpDist) >> 16)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1) + uintptr(2))) = uint8(uint32(jumpDist) >> 8)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1) + uintptr(3))) = uint8(uint32(jumpDist))
			}
		}
		break
	default:
		for ok7 := true; ok7; ok7 = 0 != 0 {
			*(*uint8)(unsafe.Pointer(jumpPc)) = uint8(INST_JUMP_FALSE4)
			for ok8 := true; ok8; ok8 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1))) = uint8(uint32(jumpDist) >> 24)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1) + uintptr(1))) = uint8(uint32(jumpDist) >> 16)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1) + uintptr(2))) = uint8(uint32(jumpDist) >> 8)
				*(*uint8)(unsafe.Pointer(jumpPc + uintptr(1) + uintptr(3))) = uint8(uint32(jumpDist))
			}
		}
		break
	}

	// Adjust the code offsets for any commands and any ExceptionRange records
	// between the jump and the current code address.

	firstCmd = (*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FcmdIndex
	lastCmd = (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands - 1
	if firstCmd < lastCmd {
		for k = firstCmd; k <= lastCmd; k++ {
			*(*int32)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr + uintptr(k)*16)) += 3
		}
	}

	firstRange = (*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FexceptIndex
	lastRange = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext - 1
	for k = firstRange; k <= lastRange; k++ {
		var rangePtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(k)*28

		*(*int32)(unsafe.Pointer(rangePtr + 8)) += 3
		switch (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype {
		case LOOP_EXCEPTION_RANGE:
			*(*int32)(unsafe.Pointer(rangePtr + 16)) += 3
			if (*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset != -1 {
				*(*int32)(unsafe.Pointer(rangePtr + 20)) += 3
			}
			break
		case CATCH_EXCEPTION_RANGE:
			*(*int32)(unsafe.Pointer(rangePtr + 24)) += 3
			break
		default:
			XTcl_Panic(tls, ts+22038,
				libc.VaList(bp, (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype))
		}
	}

	for k = 0; k < (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext; k++ {
		var auxPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr + uintptr(k)*56
		var i int32

		for i = 0; i < (*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumBreakTargets; i++ {
			if (*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FcodeOffset < *(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets + uintptr(i)*4)) {
				*(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets + uintptr(i)*4)) += uint32(3)
			}
		}
		for i = 0; i < (*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumContinueTargets; i++ {
			if (*JumpFixup)(unsafe.Pointer(jumpFixupPtr)).FcodeOffset < *(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets + uintptr(i)*4)) {
				*(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets + uintptr(i)*4)) += uint32(3)
			}
		}
	}

	return 1 // the jump was grown
}

//----------------------------------------------------------------------
//
// TclEmitInvoke --
//
//	Emit one of the invoke-related instructions, wrapping it if necessary
//	in code that ensures that any break or continue operation passing
//	through it gets the stack unwinding correct, converting it into an
//	internal jump if in an appropriate context.
//
// Results:
//	None
//
// Side effects:
//	Issues the jump with all correct stack management. May create another
//	loop exception range; pointers to ExceptionRange and ExceptionAux
//	structures should not be held across this call.
//
//----------------------------------------------------------------------

func XTclEmitInvoke(tls *libc.TLS, envPtr uintptr, opcode int32, va uintptr) { /* tclCompile.c:4065:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var argList Va_list
	_ = argList
	var rangePtr uintptr
	// var auxBreakPtr uintptr at bp+24, 8

	// var auxContinuePtr uintptr at bp+16, 8

	var arg1 int32
	var arg2 int32
	var wordCount int32 = 0
	var expandCount int32 = 0
	var loopRange int32 = 0
	var breakRange int32 = 0
	var continueRange int32 = 0
	var cleanup int32
	var depth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth

	// Parse the arguments.

	argList = va
	switch opcode {
	case INST_INVOKE_STK1:
		wordCount = libc.AssignInt32(&arg1, libc.AssignInt32(&cleanup, int32(libc.VaInt32(&argList))))
		arg2 = 0
		break
	case INST_INVOKE_STK4:
		wordCount = libc.AssignInt32(&arg1, libc.AssignInt32(&cleanup, int32(libc.VaInt32(&argList))))
		arg2 = 0
		break
	case INST_INVOKE_REPLACE:
		arg1 = int32(libc.VaInt32(&argList))
		arg2 = int32(libc.VaInt32(&argList))
		wordCount = arg1 + arg2 - 1
		cleanup = arg1 + 1
		break
	default:
		XTcl_Panic(tls, ts+22086, 0)
		fallthrough
	case INST_EVAL_STK:
		wordCount = libc.AssignInt32(&cleanup, 1)
		arg1 = libc.AssignInt32(&arg2, 0)
		break
	case INST_RETURN_STK:
		wordCount = libc.AssignInt32(&cleanup, 2)
		arg1 = libc.AssignInt32(&arg2, 0)
		break
	case INST_INVOKE_EXPANDED:
		wordCount = libc.AssignInt32(&arg1, libc.AssignInt32(&cleanup, int32(libc.VaInt32(&argList))))
		arg2 = 0
		expandCount = 1
		break
	}
	_ = argList

	// Determine if we need to handle break and continue exceptions with a
	// special handling exception range (so that we can correctly unwind the
	// stack).
	//
	// These must be done separately; they can be different (especially for
	// calls from inside a [for] increment clause).

	rangePtr = XTclGetInnermostExceptionRange(tls, envPtr, TCL_CONTINUE,
		bp+16)
	if rangePtr == uintptr(0) || (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype != LOOP_EXCEPTION_RANGE {
		*(*uintptr)(unsafe.Pointer(bp + 16 /* auxContinuePtr */)) = uintptr(0)
	} else if (*ExceptionAux)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FstackDepth == (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth-wordCount &&
		(*ExceptionAux)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FexpandTarget == (*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount-expandCount {
		*(*uintptr)(unsafe.Pointer(bp + 16 /* auxContinuePtr */)) = uintptr(0)
	} else {
		continueRange = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 16))) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr)) / 56)
	}

	rangePtr = XTclGetInnermostExceptionRange(tls, envPtr, TCL_BREAK, bp+24)
	if rangePtr == uintptr(0) || (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype != LOOP_EXCEPTION_RANGE {
		*(*uintptr)(unsafe.Pointer(bp + 24 /* auxBreakPtr */)) = uintptr(0)
	} else if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) &&
		(*ExceptionAux)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).FstackDepth == (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth-wordCount &&
		(*ExceptionAux)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).FexpandTarget == (*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount-expandCount {
		*(*uintptr)(unsafe.Pointer(bp + 24 /* auxBreakPtr */)) = uintptr(0)
	} else {
		breakRange = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 24))) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr)) / 56)
	}

	if *(*uintptr)(unsafe.Pointer(bp + 24)) != uintptr(0) || *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
		loopRange = XTclCreateExceptRange(tls, LOOP_EXCEPTION_RANGE, envPtr)
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth++
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth = func() int32 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth > (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth {
				return (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth
			}
			return (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxExceptDepth
		}()
		(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(loopRange)*28)).FcodeOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	}

	// Issue the invoke itself.

	switch opcode {
	case INST_INVOKE_STK1:
		for ok := true; ok; ok = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INVOKE_STK1)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_INVOKE_STK1 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_INVOKE_STK1].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - arg1
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		break
	case INST_INVOKE_STK4:
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INVOKE_STK4)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg1) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg1) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg1) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_INVOKE_STK4 == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_INVOKE_STK4].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - arg1
					}
					for ok5 := true; ok5; ok5 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		break
	case INST_INVOKE_EXPANDED:
		for ok6 := true; ok6; ok6 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INVOKE_EXPANDED)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_INVOKE_EXPANDED == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_INVOKE_EXPANDED].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount--
		for ok9 := true; ok9; ok9 = 0 != 0 {
			if 1-arg1 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += 1 - arg1
		}
		break
	case INST_EVAL_STK:
		for ok10 := true; ok10; ok10 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_EVAL_STK)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_EVAL_STK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok11 := true; ok11; ok11 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_EVAL_STK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok12 := true; ok12; ok12 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		break
	case INST_RETURN_STK:
		for ok13 := true; ok13; ok13 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_RETURN_STK)
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_RETURN_STK == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok14 := true; ok14; ok14 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_RETURN_STK].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok15 := true; ok15; ok15 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		break
	case INST_INVOKE_REPLACE:
		for ok16 := true; ok16; ok16 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_INVOKE_REPLACE)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg1) >> 24)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg1) >> 16)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg1) >> 8)
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg1))
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
					if INST_INVOKE_REPLACE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok17 := true; ok17; ok17 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_INVOKE_REPLACE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - arg1
					}
					for ok18 := true; ok18; ok18 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
					}
				}
			}
		}
		for ok19 := true; ok19; ok19 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
				XTclExpandCodeArray(tls, envPtr)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(arg2))
		}
		for ok20 := true; ok20; ok20 = 0 != 0 {
			if -1 < 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
				}
			}
			*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
		} // Correction to stack depth calcs
		break
	}

	// If we're generating a special wrapper exception range, we need to
	// finish that up now.

	if *(*uintptr)(unsafe.Pointer(bp + 24)) != uintptr(0) || *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
		var savedStackDepth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
		var savedExpandCount int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount
		// var nonTrapFixup JumpFixup at bp+32, 16

		if *(*uintptr)(unsafe.Pointer(bp + 24)) != uintptr(0) {
			*(*uintptr)(unsafe.Pointer(bp + 24 /* auxBreakPtr */)) = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr + uintptr(breakRange)*56
		}
		if *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
			*(*uintptr)(unsafe.Pointer(bp + 16 /* auxContinuePtr */)) = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr + uintptr(continueRange)*56
		}

		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptDepth--
		(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(loopRange)*28)).FnumCodeBytes = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1 - int64((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(loopRange)*28)).FcodeOffset))
		XTclEmitForwardJump(tls, envPtr, TCL_UNCONDITIONAL_JUMP, bp+32)

		// Careful! When generating these stack unwinding sequences, the depth
		// of stack in the cases where they are taken is not the same as if
		// the exception is not taken.

		if *(*uintptr)(unsafe.Pointer(bp + 24)) != uintptr(0) {
			for ok21 := true; ok21; ok21 = 0 != 0 {
				if -1 < 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
					}
				}
				*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
			}

			(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(loopRange)*28)).FbreakOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			XTclCleanupStackForBreakContinue(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp + 24 /* auxBreakPtr */)))
			XTclAddLoopBreakFixup(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp + 24 /* auxBreakPtr */)))
			for ok22 := true; ok22; ok22 = 0 != 0 {
				if 1 < 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
					}
				}
				*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
			}

			(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = savedStackDepth
			(*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount = savedExpandCount
		}

		if *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
			for ok23 := true; ok23; ok23 = 0 != 0 {
				if -1 < 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
					}
				}
				*(*int32)(unsafe.Pointer(envPtr + 48)) += -1
			}

			(*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(loopRange)*28)).FcontinueOffset = int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
			XTclCleanupStackForBreakContinue(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp + 16 /* auxContinuePtr */)))
			XTclAddLoopContinueFixup(tls, envPtr, *(*uintptr)(unsafe.Pointer(bp + 16 /* auxContinuePtr */)))
			for ok24 := true; ok24; ok24 = 0 != 0 {
				if 1 < 0 {
					if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
						(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
					}
				}
				*(*int32)(unsafe.Pointer(envPtr + 48)) += 1
			}

			(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = savedStackDepth
			(*CompileEnv)(unsafe.Pointer(envPtr)).FexpandCount = savedExpandCount
		}

		XTclFinalizeLoopExceptionRange(tls, envPtr, loopRange)
		XTclFixupForwardJump(tls, envPtr, bp+32, int32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart))/1-int64((*JumpFixup)(unsafe.Pointer(bp+32)).FcodeOffset)), 127)
	}
	for ok25 := true; ok25; ok25 = 0 != 0 {
		var _dd int32 = depth + 1 - cleanup
		if _dd != (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
			XTcl_Panic(tls, ts+19014, libc.VaList(bp, (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth, _dd))
		}
	}
}

//----------------------------------------------------------------------
//
// TclGetInstructionTable --
//
//	Returns a pointer to the table describing Tcl bytecode instructions.
//	This procedure is defined so that clients can access the pointer from
//	outside the TCL DLLs.
//
// Results:
//	Returns a pointer to the global instruction table, same as the
//	expression (&tclInstructionTable[0]).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetInstructionTable(tls *libc.TLS) uintptr { /* tclCompile.c:4255:12: */
	return uintptr(unsafe.Pointer(&XtclInstructionTable))
}

//----------------------------------------------------------------------
//
// GetCmdLocEncodingSize --
//
//	Computes the total number of bytes needed to encode the command
//	location information for some compiled code.
//
// Results:
//	The byte count needed to encode the compiled location information.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetCmdLocEncodingSize(tls *libc.TLS, envPtr uintptr) int32 { /* tclCompile.c:4279:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr
	var numCmds int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands
	var codeDelta int32
	var codeLen int32
	var srcDelta int32
	var srcLen int32
	var codeDeltaNext int32
	var codeLengthNext int32
	var srcDeltaNext int32
	var srcLengthNext int32
	// The offsets in their respective byte
	// sequences where the next encoded offset or
	// length should go.
	var prevCodeOffset int32
	var prevSrcOffset int32
	var i int32

	codeDeltaNext = libc.AssignInt32(&codeLengthNext, libc.AssignInt32(&srcDeltaNext, libc.AssignInt32(&srcLengthNext, 0)))
	prevCodeOffset = libc.AssignInt32(&prevSrcOffset, 0)
	for i = 0; i < numCmds; i++ {
		codeDelta = (*CmdLocation)(unsafe.Pointer(mapPtr+uintptr(i)*16)).FcodeOffset - prevCodeOffset
		if codeDelta < 0 {
			XTcl_Panic(tls, ts+22104, 0)
		} else if codeDelta <= 127 {
			codeDeltaNext++
		} else {
			codeDeltaNext = codeDeltaNext + 5 // 1 byte for 0xFF, 4 for positive delta
		}
		prevCodeOffset = (*CmdLocation)(unsafe.Pointer(mapPtr + uintptr(i)*16)).FcodeOffset

		codeLen = (*CmdLocation)(unsafe.Pointer(mapPtr + uintptr(i)*16)).FnumCodeBytes
		if codeLen < 0 {
			XTcl_Panic(tls, ts+22143, 0)
		} else if codeLen <= 127 {
			codeLengthNext++
		} else {
			codeLengthNext = codeLengthNext + 5 // 1 byte for 0xFF, 4 for length
		}

		srcDelta = (*CmdLocation)(unsafe.Pointer(mapPtr+uintptr(i)*16)).FsrcOffset - prevSrcOffset
		if -127 <= srcDelta && srcDelta <= 127 && srcDelta != -1 {
			srcDeltaNext++
		} else {
			srcDeltaNext = srcDeltaNext + 5 // 1 byte for 0xFF, 4 for delta
		}
		prevSrcOffset = (*CmdLocation)(unsafe.Pointer(mapPtr + uintptr(i)*16)).FsrcOffset

		srcLen = (*CmdLocation)(unsafe.Pointer(mapPtr + uintptr(i)*16)).FnumSrcBytes
		if srcLen < 0 {
			XTcl_Panic(tls, ts+22182, 0)
		} else if srcLen <= 127 {
			srcLengthNext++
		} else {
			srcLengthNext = srcLengthNext + 5 // 1 byte for 0xFF, 4 for length
		}
	}

	return codeDeltaNext + codeLengthNext + srcDeltaNext + srcLengthNext
}

//----------------------------------------------------------------------
//
// EncodeCmdLocMap --
//
//	Encode the command location information for some compiled code into a
//	ByteCode structure. The encoded command location map is stored as
//	three adjacent byte sequences.
//
// Results:
//	Pointer to the first byte after the encoded command location
//	information.
//
// Side effects:
//	The encoded information is stored into the block of memory headed by
//	codePtr. Also records pointers to the start of the four byte sequences
//	in fields in codePtr's ByteCode header structure.
//
//----------------------------------------------------------------------

func sEncodeCmdLocMap(tls *libc.TLS, envPtr uintptr, codePtr uintptr, startPtr uintptr) uintptr { /* tclCompile.c:4357:22: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr
	var numCmds int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands
	var p uintptr = startPtr
	var codeDelta int32
	var codeLen int32
	var srcDelta int32
	var srcLen int32
	var prevOffset int32
	var i int32

	// Encode the code offset for each command as a sequence of deltas.

	(*ByteCode)(unsafe.Pointer(codePtr)).FcodeDeltaStart = p
	prevOffset = 0
	for i = 0; i < numCmds; i++ {
		codeDelta = (*CmdLocation)(unsafe.Pointer(mapPtr+uintptr(i)*16)).FcodeOffset - prevOffset
		if codeDelta < 0 {
			XTcl_Panic(tls, ts+22223, 0)
		} else if codeDelta <= 127 {
			*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(codeDelta))
			p++
		} else {
			*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(0xFF))
			p++
			for ok := true; ok; ok = 0 != 0 {
				*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(codeDelta) >> 24)
				*(*uint8)(unsafe.Pointer(p + uintptr(1))) = uint8(uint32(codeDelta) >> 16)
				*(*uint8)(unsafe.Pointer(p + uintptr(2))) = uint8(uint32(codeDelta) >> 8)
				*(*uint8)(unsafe.Pointer(p + uintptr(3))) = uint8(uint32(codeDelta))
			}
			p += uintptr(4)
		}
		prevOffset = (*CmdLocation)(unsafe.Pointer(mapPtr + uintptr(i)*16)).FcodeOffset
	}

	// Encode the code length for each command.

	(*ByteCode)(unsafe.Pointer(codePtr)).FcodeLengthStart = p
	for i = 0; i < numCmds; i++ {
		codeLen = (*CmdLocation)(unsafe.Pointer(mapPtr + uintptr(i)*16)).FnumCodeBytes
		if codeLen < 0 {
			XTcl_Panic(tls, ts+22256, 0)
		} else if codeLen <= 127 {
			*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(codeLen))
			p++
		} else {
			*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(0xFF))
			p++
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(codeLen) >> 24)
				*(*uint8)(unsafe.Pointer(p + uintptr(1))) = uint8(uint32(codeLen) >> 16)
				*(*uint8)(unsafe.Pointer(p + uintptr(2))) = uint8(uint32(codeLen) >> 8)
				*(*uint8)(unsafe.Pointer(p + uintptr(3))) = uint8(uint32(codeLen))
			}
			p += uintptr(4)
		}
	}

	// Encode the source offset for each command as a sequence of deltas.

	(*ByteCode)(unsafe.Pointer(codePtr)).FsrcDeltaStart = p
	prevOffset = 0
	for i = 0; i < numCmds; i++ {
		srcDelta = (*CmdLocation)(unsafe.Pointer(mapPtr+uintptr(i)*16)).FsrcOffset - prevOffset
		if -127 <= srcDelta && srcDelta <= 127 && srcDelta != -1 {
			*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(srcDelta))
			p++
		} else {
			*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(0xFF))
			p++
			for ok2 := true; ok2; ok2 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(srcDelta) >> 24)
				*(*uint8)(unsafe.Pointer(p + uintptr(1))) = uint8(uint32(srcDelta) >> 16)
				*(*uint8)(unsafe.Pointer(p + uintptr(2))) = uint8(uint32(srcDelta) >> 8)
				*(*uint8)(unsafe.Pointer(p + uintptr(3))) = uint8(uint32(srcDelta))
			}
			p += uintptr(4)
		}
		prevOffset = (*CmdLocation)(unsafe.Pointer(mapPtr + uintptr(i)*16)).FsrcOffset
	}

	// Encode the source length for each command.

	(*ByteCode)(unsafe.Pointer(codePtr)).FsrcLengthStart = p
	for i = 0; i < numCmds; i++ {
		srcLen = (*CmdLocation)(unsafe.Pointer(mapPtr + uintptr(i)*16)).FnumSrcBytes
		if srcLen < 0 {
			XTcl_Panic(tls, ts+22289, 0)
		} else if srcLen <= 127 {
			*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(srcLen))
			p++
		} else {
			*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(0xFF))
			p++
			for ok3 := true; ok3; ok3 = 0 != 0 {
				*(*uint8)(unsafe.Pointer(p)) = uint8(uint32(srcLen) >> 24)
				*(*uint8)(unsafe.Pointer(p + uintptr(1))) = uint8(uint32(srcLen) >> 16)
				*(*uint8)(unsafe.Pointer(p + uintptr(2))) = uint8(uint32(srcLen) >> 8)
				*(*uint8)(unsafe.Pointer(p + uintptr(3))) = uint8(uint32(srcLen))
			}
			p += uintptr(4)
		}
	}

	return p
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Internal structure to hold embedded configuration information.
//
// Our structure is a two-level dictionary associated with the 'interp'. The
// first level is keyed with the package name and maps to the dictionary for
// that package. The package dictionary is keyed with metadata keys and maps
// to the metadata value for that key. This is package specific. The metadata
// values are in UTF-8, converted from the external representation given to us
// by the caller.

// A ClientData struct for the QueryConfig command.  Store the three bits
// of data we need; the package name for which we store a config dict,
// the (Tcl_Interp *) in which it is stored, and the encoding.

type QCCD1 = struct {
	Fpkg      uintptr
	Finterp   uintptr
	Fencoding uintptr
} /* tclConfig.c:34:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Internal structure to hold embedded configuration information.
//
// Our structure is a two-level dictionary associated with the 'interp'. The
// first level is keyed with the package name and maps to the dictionary for
// that package. The package dictionary is keyed with metadata keys and maps
// to the metadata value for that key. This is package specific. The metadata
// values are in UTF-8, converted from the external representation given to us
// by the caller.

// A ClientData struct for the QueryConfig command.  Store the three bits
// of data we need; the package name for which we store a config dict,
// the (Tcl_Interp *) in which it is stored, and the encoding.

type QCCD = QCCD1 /* tclConfig.c:38:3 */

//----------------------------------------------------------------------
//
// Tcl_RegisterConfig --
//
//	See TIP#59 for details on what this function does.
//
// Results:
//	None.
//
// Side effects:
//	Creates namespace and cfg query command in it as per TIP #59.
//
//----------------------------------------------------------------------

func XTcl_RegisterConfig(tls *libc.TLS, interp uintptr, pkgName uintptr, configuration uintptr, valEncoding uintptr) { /* tclConfig.c:69:1: */
	bp := tls.Alloc(264)
	defer tls.Free(264)

	var pDB uintptr
	// var pkgDict uintptr at bp+40, 8

	// var cmdName Tcl_DString at bp+48, 216

	var cfg uintptr
	var cdPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(QCCD{})))

	(*QCCD)(unsafe.Pointer(cdPtr)).Finterp = interp
	if valEncoding != 0 {
		(*QCCD)(unsafe.Pointer(cdPtr)).Fencoding = XTcl_Alloc(tls, uint32(libc.Xstrlen(tls, valEncoding)+uint64(1)))
		libc.Xstrcpy(tls, (*QCCD)(unsafe.Pointer(cdPtr)).Fencoding, valEncoding)
	} else {
		(*QCCD)(unsafe.Pointer(cdPtr)).Fencoding = uintptr(0)
	}
	(*QCCD)(unsafe.Pointer(cdPtr)).Fpkg = XTcl_NewStringObj(tls, pkgName, -1)

	// Phase I: Adding the provided information to the internal database of
	// package meta data.
	//
	// Phase II: Create a command for querying this database, specific to the
	// package registering its configuration. This is the approved interface
	// in TIP 59. In the future a more general interface should be done, as
	// follow-up to TIP 59. Simply because our database is now general across
	// packages, and not a structure tied to one package.
	//
	// Note, the created command will have a reference through its clientdata.

	(*Tcl_Obj)(unsafe.Pointer((*QCCD)(unsafe.Pointer(cdPtr)).Fpkg)).FrefCount++

	// For venc == NULL aka bogus encoding we skip the step setting up the
	// dictionaries visible at Tcl level. I.e. they are not filled

	pDB = sGetConfigDict(tls, interp)

	// Retrieve package specific configuration...

	if XTcl_DictObjGet(tls, interp, pDB, (*QCCD)(unsafe.Pointer(cdPtr)).Fpkg, bp+40) != TCL_OK ||
		*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0) {
		*(*uintptr)(unsafe.Pointer(bp + 40 /* pkgDict */)) = XTcl_NewDictObj(tls)
	} else if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount > 1 {
		*(*uintptr)(unsafe.Pointer(bp + 40 /* pkgDict */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pkgDict */)))
	}

	// Extend the package configuration...
	// We cannot assume that the encodings are initialized, therefore
	// store the value as-is in a byte array. See Bug [9b2e636361].

	for cfg = configuration; (*Tcl_Config)(unsafe.Pointer(cfg)).Fkey != uintptr(0) && int32(*(*int8)(unsafe.Pointer((*Tcl_Config)(unsafe.Pointer(cfg)).Fkey))) != 0; cfg += 16 {
		XTcl_DictObjPut(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 40 /* pkgDict */)), XTcl_NewStringObj(tls, (*Tcl_Config)(unsafe.Pointer(cfg)).Fkey, -1),
			XTcl_NewByteArrayObj(tls, (*Tcl_Config)(unsafe.Pointer(cfg)).Fvalue, int32(libc.Xstrlen(tls, (*Tcl_Config)(unsafe.Pointer(cfg)).Fvalue))))
	}

	// Write the changes back into the overall database.

	XTcl_DictObjPut(tls, interp, pDB, (*QCCD)(unsafe.Pointer(cdPtr)).Fpkg, *(*uintptr)(unsafe.Pointer(bp + 40 /* pkgDict */)))

	// Now create the interface command for retrieval of the package
	// information.

	XTcl_DStringInit(tls, bp+48)
	XTcl_DStringAppend(tls, bp+48, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
	XTcl_DStringAppend(tls, bp+48, pkgName, -1)

	// The incomplete command name is the name of the namespace to place it
	// in.

	if XTcl_FindNamespace(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+48)).Fstring, uintptr(0),
		TCL_GLOBAL_ONLY) == uintptr(0) {
		if XTcl_CreateNamespace(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+48)).Fstring,
			uintptr(0), uintptr(0)) == uintptr(0) {
			XTcl_Panic(tls, ts+22324,
				libc.VaList(bp, XTcl_GetStringResult(tls, interp), ts+22335,
					ts+22354))
		}
	}

	XTcl_DStringAppend(tls, bp+48, ts+22408, int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1)))

	if XTcl_CreateObjCommand(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+48)).Fstring,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sQueryConfigObjCmd})), cdPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sQueryConfigDelete}))) == uintptr(0) {
		XTcl_Panic(tls, ts+22420, libc.VaList(bp+24, ts+22335,
			ts+22427))
	}

	XTcl_DStringFree(tls, bp+48)
}

//----------------------------------------------------------------------
//
// QueryConfigObjCmd --
//
//	Implementation of "::<package>::pkgconfig", the command to query
//	configuration information embedded into a binary library.
//
// Results:
//	A standard tcl result.
//
// Side effects:
//	See the manual for what this command does.
//
//----------------------------------------------------------------------

func sQueryConfigObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclConfig.c:196:1: */
	bp := tls.Alloc(388)
	defer tls.Free(388)

	var cdPtr uintptr = clientData
	var pkgName uintptr = (*QCCD)(unsafe.Pointer(cdPtr)).Fpkg
	var pDB uintptr
	// var pkgDict uintptr at bp+112, 8

	// var val uintptr at bp+120, 8

	var listPtr uintptr
	// var n int32 at bp+128, 4

	// var index int32 at bp+104, 4

	// var conv Tcl_DString at bp+136, 216

	var venc Tcl_Encoding = uintptr(0)
	var value uintptr

	if objc < 2 || objc > 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22484)
		return TCL_ERROR
	}
	if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&subcmdStrings)), int32(unsafe.Sizeof(uintptr(0))), ts+22501, 0, bp+104) != TCL_OK {
		return TCL_ERROR
	}

	pDB = sGetConfigDict(tls, interp)
	if XTcl_DictObjGet(tls, interp, pDB, pkgName, bp+112) != TCL_OK ||
		*(*uintptr)(unsafe.Pointer(bp + 112)) == uintptr(0) {
		// Maybe a Tcl_Panic is better, because the package data has to be
		// present.

		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+22512, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+22530, ts+22536,
			XTcl_GetString(tls, pkgName), uintptr(0)))
		return TCL_ERROR
	}

	switch uint32(*(*int32)(unsafe.Pointer(bp + 104 /* index */))) {
	case uint32(0) /* CFG_GET */ :
		if objc != 3 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+22548)
			return TCL_ERROR
		}

		if XTcl_DictObjGet(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112)), *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+120) != TCL_OK ||
			*(*uintptr)(unsafe.Pointer(bp + 120)) == uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+22552, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7699, ts+22566,
				XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))), uintptr(0)))
			return TCL_ERROR
		}

		if (*QCCD)(unsafe.Pointer(cdPtr)).Fencoding != 0 {
			venc = XTcl_GetEncoding(tls, interp, (*QCCD)(unsafe.Pointer(cdPtr)).Fencoding)
			if !(venc != 0) {
				return TCL_ERROR
			}
		}
		// Value is stored as-is in a byte array, see Bug [9b2e636361],
		// so we have to decode it first.
		value = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 120 /* val */)), bp+128)
		value = XTcl_ExternalToUtfDString(tls, venc, value, *(*int32)(unsafe.Pointer(bp + 128 /* n */)), bp+136)
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, value,
			(*Tcl_DString)(unsafe.Pointer(bp+136)).Flength))
		XTcl_DStringFree(tls, bp+136)
		return TCL_OK

	case uint32(1) /* CFG_LIST */ :
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}

		XTcl_DictObjSize(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112 /* pkgDict */)), bp+128)
		listPtr = XTcl_NewListObj(tls, *(*int32)(unsafe.Pointer(bp + 128 /* n */)), uintptr(0))

		if !(listPtr != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+22573, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+15098, uintptr(0)))
			return TCL_ERROR
		}

		if *(*int32)(unsafe.Pointer(bp + 128)) != 0 {
			// var s Tcl_DictSearch at bp+352, 24

			// var key uintptr at bp+376, 8

			// var done int32 at bp+384, 4

			for XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112 /* pkgDict */)), bp+352, bp+376, uintptr(0), bp+384); !(*(*int32)(unsafe.Pointer(bp + 384 /* done */)) != 0); XTcl_DictObjNext(tls, bp+352 /* &s */, bp+376 /* &key */, uintptr(0), bp+384 /* &done */) {
				XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, *(*uintptr)(unsafe.Pointer(bp + 376 /* key */)))
			}
		}

		XTcl_SetObjResult(tls, interp, listPtr)
		return TCL_OK

	default:
		XTcl_Panic(tls, ts+22608, 0)
		break
	}
	return TCL_ERROR
}

var subcmdStrings = [3]uintptr{
	ts + 22680, ts + 3395, uintptr(0),
} /* tclConfig.c:206:23 */

//-------------------------------------------------------------------------
//
// QueryConfigDelete --
//
//	Command delete function. Cleans up after the configuration query
//	command when it is deleted by the user or during finalization.
//
// Results:
//	None.
//
// Side effects:
//	Deallocates all non-transient memory allocated by Tcl_RegisterConfig.
//
//-------------------------------------------------------------------------

func sQueryConfigDelete(tls *libc.TLS, clientData ClientData) { /* tclConfig.c:326:1: */
	var cdPtr uintptr = clientData
	var pkgName uintptr = (*QCCD)(unsafe.Pointer(cdPtr)).Fpkg
	var pDB uintptr = sGetConfigDict(tls, (*QCCD)(unsafe.Pointer(cdPtr)).Finterp)

	XTcl_DictObjRemove(tls, uintptr(0), pDB, pkgName)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = pkgName
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if (*QCCD)(unsafe.Pointer(cdPtr)).Fencoding != 0 {
		XTclpFree(tls, (*QCCD)(unsafe.Pointer(cdPtr)).Fencoding)
	}
	XTclpFree(tls, cdPtr)
}

//-------------------------------------------------------------------------
//
// GetConfigDict --
//
//	Retrieve the package metadata database from the interpreter.
//	Initializes it, if not present yet.
//
// Results:
//	A Tcl_Obj reference
//
// Side effects:
//	May allocate a Tcl_Obj.
//
//-------------------------------------------------------------------------

func sGetConfigDict(tls *libc.TLS, interp uintptr) uintptr { /* tclConfig.c:358:16: */
	var pDB uintptr = XTcl_GetAssocData(tls, interp, ts+22684, uintptr(0))

	if pDB == uintptr(0) {
		pDB = XTcl_NewDictObj(tls)
		(*Tcl_Obj)(unsafe.Pointer(pDB)).FrefCount++
		XTcl_SetAssocData(tls, interp, ts+22684, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr)
		}{sConfigDictDeleteProc})), pDB)
	}

	return pDB
}

//----------------------------------------------------------------------
//
// ConfigDictDeleteProc --
//
//	This function is associated with the "Package About dict" assoc data
//	for an interpreter; it is invoked when the interpreter is deleted in
//	order to free the information associated with any pending error
//	reports.
//
// Results:
//	None.
//
// Side effects:
//	The package metadata database is freed.
//
//----------------------------------------------------------------------

func sConfigDictDeleteProc(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclConfig.c:393:1: */
	var pDB uintptr = clientData

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = pDB
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Bison generates several labels that happen to be unused. MS Visual C++
// doesn't like that, and complains. Tell it to shut up.

// Meridian: am, pm, or 24-hour style.

type MERIDIAN = uint32 /* tclDate.c:103:3 */

// yyparse will accept a 'struct DateInfo' as its parameter; that's where the
// parsed fields will be returned.

type DateInfo1 = struct {
	Fmessages             uintptr
	Fseparatrix           uintptr
	FdateYear             Time_t
	FdateMonth            Time_t
	FdateDay              Time_t
	FdateHaveDate         int32
	F__ccgo_pad1          [4]byte
	FdateHour             Time_t
	FdateMinutes          Time_t
	FdateSeconds          Time_t
	FdateMeridian         MERIDIAN
	FdateHaveTime         int32
	FdateTimezone         Time_t
	FdateDSTmode          int32
	FdateHaveZone         int32
	FdateRelMonth         Time_t
	FdateRelDay           Time_t
	FdateRelSeconds       Time_t
	FdateHaveRel          int32
	F__ccgo_pad2          [4]byte
	FdateMonthOrdinal     Time_t
	FdateHaveOrdinalMonth int32
	F__ccgo_pad3          [4]byte
	FdateDayOrdinal       Time_t
	FdateDayNumber        Time_t
	FdateHaveDay          int32
	F__ccgo_pad4          [4]byte
	FdateStart            uintptr
	FdateInput            uintptr
	FdateRelPointer       uintptr
	FdateDigitCount       int32
	F__ccgo_pad5          [4]byte
} /* tclDate.c:110:9 */

// yyparse will accept a 'struct DateInfo' as its parameter; that's where the
// parsed fields will be returned.

type DateInfo = DateInfo1 /* tclDate.c:147:3 */

// The offset of tm_year of struct tm returned by localtime, gmtime, etc.
// Posix requires 1900.

// An entry in the lexical lookup table.

type X_TABLE = struct {
	Fname        uintptr
	Ftype        int32
	F__ccgo_pad1 [4]byte
	Fvalue       Time_t
} /* tclDate.c:196:9 */

// The offset of tm_year of struct tm returned by localtime, gmtime, etc.
// Posix requires 1900.

// An entry in the lexical lookup table.

type TABLE = X_TABLE /* tclDate.c:200:3 */

// Daylight-savings mode: on, off, or not yet known.

type DSTMODE = uint32 /* tclDate.c:208:3 */

// Value type.

type YYSTYPE1 = struct{ FNumber Time_t } /* tclDate.c:266:1 */

type YYSTYPE = YYSTYPE1 /* tclDate.c:276:23 */

// Location type.
type YYLTYPE1 = struct {
	Ffirst_line   int32
	Ffirst_column int32
	Flast_line    int32
	Flast_column  int32
} /* tclDate.c:283:9 */

// Location type.
type YYLTYPE = YYLTYPE1 /* tclDate.c:283:24 */

type Yytype_uint8 = uint8 /* tclDate.c:328:23 */

type Yytype_int8 = int8 /* tclDate.c:334:21 */

type Yytype_uint16 = uint16 /* tclDate.c:340:24 */

type Yytype_int16 = int16 /* tclDate.c:346:15 */

// Suppress unused-variable warnings by "using" E.

// Suppress an incorrect diagnostic about yylval being uninitialized.

// The parser invokes alloca or malloc; define the necessary symbols.

// A type that is properly aligned for any stack member.
type Yyalloc = struct {
	F__ccgo_pad1 [0]uint64
	Fyyss_alloc  Yytype_int16
	F__ccgo_pad2 [14]byte
} /* tclDate.c:504:1 */

// The size of the maximum gap between one aligned stack and the next.

// The size of an array large to enough to hold all stacks, each with
//    N elements.

// Relocate STACK from its old location to the new one.  The
//    local variables YYSIZE and YYSTACKSIZE give the old and new number of
//    elements in the stack, and YYPTR gives the new location of the
//    stack.  Advance YYPTR to a properly aligned location for the next
//    stack.

// Copy COUNT objects from SRC to DST.  The source and destination do
//    not overlap.

// YYFINAL -- State number of the termination state.
// YYLAST -- Last index in YYTABLE.

// YYNTOKENS -- Number of terminals.
// YYNNTS -- Number of nonterminals.
// YYNRULES -- Number of rules.
// YYNSTATES -- Number of states.

// YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
//    by yylex, with out-of-bounds checking.

// YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
//    as returned by yylex, without out-of-bounds checking.
var yytranslate = [275]Yytype_uint8{
	Yytype_uint8(0), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(25), Yytype_uint8(21), Yytype_uint8(23), Yytype_uint8(24), Yytype_uint8(22), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(20), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2),
	Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(1), Yytype_uint8(2), Yytype_uint8(3), Yytype_uint8(4),
	Yytype_uint8(5), Yytype_uint8(6), Yytype_uint8(7), Yytype_uint8(8), Yytype_uint8(9), Yytype_uint8(10), Yytype_uint8(11), Yytype_uint8(12), Yytype_uint8(13), Yytype_uint8(14),
	Yytype_uint8(15), Yytype_uint8(16), Yytype_uint8(17), Yytype_uint8(18), Yytype_uint8(19),
} /* tclDate.c:584:27 */

// YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
//      STATE-NUM.
var yypact = [85]Yytype_int8{
	int8(-18), int8(2), int8(-18), int8(-17), int8(-18), int8(-4), int8(-18), int8(10), int8(-18), int8(22),
	int8(8), int8(-18), int8(18), int8(-18), int8(39), int8(-18), int8(-18), int8(-18), int8(-18), int8(-18),
	int8(-18), int8(-18), int8(-18), int8(-18), int8(-18), int8(-18), int8(25), int8(21), int8(-18), int8(-18),
	int8(-18), int8(16), int8(14), int8(-18), int8(-18), int8(28), int8(36), int8(41), int8(-5), int8(-18),
	int8(-18), int8(5), int8(-18), int8(-18), int8(-18), int8(47), int8(-18), int8(-18), int8(42), int8(46),
	int8(48), int8(-18), int8(-6), int8(40), int8(43), int8(44), int8(49), int8(-18), int8(-18), int8(-18),
	int8(-18), int8(-18), int8(-18), int8(-18), int8(-18), int8(50), int8(-18), int8(51), int8(55), int8(57),
	int8(58), int8(65), int8(-18), int8(-18), int8(59), int8(54), int8(-18), int8(62), int8(63), int8(60),
	int8(-18), int8(64), int8(61), int8(66), int8(-18),
} /* tclDate.c:667:26 */

// YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
//      Performed when YYTABLE does not specify something else to do.  Zero
//      means the default is an error.
var yydefact = [85]Yytype_uint8{
	Yytype_uint8(2), Yytype_uint8(0), Yytype_uint8(1), Yytype_uint8(20), Yytype_uint8(18), Yytype_uint8(0), Yytype_uint8(53), Yytype_uint8(0), Yytype_uint8(51), Yytype_uint8(54),
	Yytype_uint8(17), Yytype_uint8(33), Yytype_uint8(27), Yytype_uint8(52), Yytype_uint8(0), Yytype_uint8(49), Yytype_uint8(50), Yytype_uint8(3), Yytype_uint8(4), Yytype_uint8(5),
	Yytype_uint8(8), Yytype_uint8(6), Yytype_uint8(7), Yytype_uint8(10), Yytype_uint8(11), Yytype_uint8(9), Yytype_uint8(43), Yytype_uint8(0), Yytype_uint8(48), Yytype_uint8(12),
	Yytype_uint8(21), Yytype_uint8(30), Yytype_uint8(0), Yytype_uint8(22), Yytype_uint8(13), Yytype_uint8(32), Yytype_uint8(0), Yytype_uint8(0), Yytype_uint8(0), Yytype_uint8(45),
	Yytype_uint8(16), Yytype_uint8(0), Yytype_uint8(40), Yytype_uint8(24), Yytype_uint8(35), Yytype_uint8(0), Yytype_uint8(46), Yytype_uint8(42), Yytype_uint8(19), Yytype_uint8(0),
	Yytype_uint8(0), Yytype_uint8(34), Yytype_uint8(55), Yytype_uint8(25), Yytype_uint8(0), Yytype_uint8(0), Yytype_uint8(0), Yytype_uint8(38), Yytype_uint8(36), Yytype_uint8(47),
	Yytype_uint8(23), Yytype_uint8(44), Yytype_uint8(31), Yytype_uint8(41), Yytype_uint8(56), Yytype_uint8(0), Yytype_uint8(14), Yytype_uint8(0), Yytype_uint8(0), Yytype_uint8(0),
	Yytype_uint8(0), Yytype_uint8(55), Yytype_uint8(26), Yytype_uint8(28), Yytype_uint8(29), Yytype_uint8(0), Yytype_uint8(15), Yytype_uint8(0), Yytype_uint8(0), Yytype_uint8(0),
	Yytype_uint8(39), Yytype_uint8(0), Yytype_uint8(0), Yytype_uint8(0), Yytype_uint8(37),
} /* tclDate.c:683:27 */

// YYPGOTO[NTERM-NUM].
var yypgoto = [16]Yytype_int8{
	int8(-18), int8(-18), int8(-18), int8(-18), int8(-18), int8(-18), int8(-18), int8(-18), int8(-18), int8(-18),
	int8(-18), int8(-18), int8(-18), int8(-9), int8(-18), int8(7),
} /* tclDate.c:697:26 */

// YYDEFGOTO[NTERM-NUM].
var yydefgoto = [16]Yytype_int8{
	int8(-1), int8(1), int8(17), int8(18), int8(19), int8(20), int8(21), int8(22), int8(23), int8(24),
	int8(25), int8(26), int8(27), int8(28), int8(29), int8(66),
} /* tclDate.c:704:26 */

// YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
//      positive, shift that token.  If negative, reduce the rule whose
//      number is the opposite.  If YYTABLE_NINF, syntax error.
var yytable = [82]Yytype_uint8{
	Yytype_uint8(39), Yytype_uint8(64), Yytype_uint8(2), Yytype_uint8(54), Yytype_uint8(30), Yytype_uint8(46), Yytype_uint8(3), Yytype_uint8(4), Yytype_uint8(55), Yytype_uint8(31),
	Yytype_uint8(5), Yytype_uint8(6), Yytype_uint8(7), Yytype_uint8(8), Yytype_uint8(65), Yytype_uint8(9), Yytype_uint8(10), Yytype_uint8(11), Yytype_uint8(56), Yytype_uint8(12),
	Yytype_uint8(13), Yytype_uint8(14), Yytype_uint8(57), Yytype_uint8(32), Yytype_uint8(40), Yytype_uint8(15), Yytype_uint8(33), Yytype_uint8(16), Yytype_uint8(47), Yytype_uint8(34),
	Yytype_uint8(35), Yytype_uint8(6), Yytype_uint8(41), Yytype_uint8(8), Yytype_uint8(48), Yytype_uint8(42), Yytype_uint8(59), Yytype_uint8(49), Yytype_uint8(50), Yytype_uint8(61),
	Yytype_uint8(13), Yytype_uint8(51), Yytype_uint8(36), Yytype_uint8(43), Yytype_uint8(37), Yytype_uint8(38), Yytype_uint8(60), Yytype_uint8(44), Yytype_uint8(6), Yytype_uint8(52),
	Yytype_uint8(8), Yytype_uint8(6), Yytype_uint8(45), Yytype_uint8(8), Yytype_uint8(53), Yytype_uint8(58), Yytype_uint8(6), Yytype_uint8(13), Yytype_uint8(8), Yytype_uint8(62),
	Yytype_uint8(13), Yytype_uint8(63), Yytype_uint8(67), Yytype_uint8(71), Yytype_uint8(72), Yytype_uint8(13), Yytype_uint8(68), Yytype_uint8(69), Yytype_uint8(73), Yytype_uint8(70),
	Yytype_uint8(74), Yytype_uint8(75), Yytype_uint8(64), Yytype_uint8(77), Yytype_uint8(78), Yytype_uint8(79), Yytype_uint8(80), Yytype_uint8(82), Yytype_uint8(76), Yytype_uint8(84),
	Yytype_uint8(81), Yytype_uint8(83),
} /* tclDate.c:713:27 */

var yycheck = [82]Yytype_uint8{
	Yytype_uint8(9), Yytype_uint8(7), Yytype_uint8(0), Yytype_uint8(8), Yytype_uint8(21), Yytype_uint8(14), Yytype_uint8(4), Yytype_uint8(5), Yytype_uint8(13), Yytype_uint8(13),
	Yytype_uint8(8), Yytype_uint8(9), Yytype_uint8(10), Yytype_uint8(11), Yytype_uint8(20), Yytype_uint8(13), Yytype_uint8(14), Yytype_uint8(15), Yytype_uint8(13), Yytype_uint8(17),
	Yytype_uint8(18), Yytype_uint8(19), Yytype_uint8(17), Yytype_uint8(13), Yytype_uint8(16), Yytype_uint8(23), Yytype_uint8(4), Yytype_uint8(25), Yytype_uint8(3), Yytype_uint8(7),
	Yytype_uint8(8), Yytype_uint8(9), Yytype_uint8(14), Yytype_uint8(11), Yytype_uint8(13), Yytype_uint8(17), Yytype_uint8(45), Yytype_uint8(21), Yytype_uint8(24), Yytype_uint8(48),
	Yytype_uint8(18), Yytype_uint8(13), Yytype_uint8(20), Yytype_uint8(4), Yytype_uint8(22), Yytype_uint8(23), Yytype_uint8(4), Yytype_uint8(8), Yytype_uint8(9), Yytype_uint8(13),
	Yytype_uint8(11), Yytype_uint8(9), Yytype_uint8(13), Yytype_uint8(11), Yytype_uint8(13), Yytype_uint8(8), Yytype_uint8(9), Yytype_uint8(18), Yytype_uint8(11), Yytype_uint8(13),
	Yytype_uint8(18), Yytype_uint8(13), Yytype_uint8(22), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(18), Yytype_uint8(23), Yytype_uint8(23), Yytype_uint8(13), Yytype_uint8(20),
	Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(7), Yytype_uint8(14), Yytype_uint8(20), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(71), Yytype_uint8(13),
	Yytype_uint8(20), Yytype_uint8(20),
} /* tclDate.c:726:27 */

// YYSTOS[STATE-NUM] -- The (internal number of the) accessing
//      symbol of state STATE-NUM.
var yystos = [85]Yytype_uint8{
	Yytype_uint8(0), Yytype_uint8(27), Yytype_uint8(0), Yytype_uint8(4), Yytype_uint8(5), Yytype_uint8(8), Yytype_uint8(9), Yytype_uint8(10), Yytype_uint8(11), Yytype_uint8(13),
	Yytype_uint8(14), Yytype_uint8(15), Yytype_uint8(17), Yytype_uint8(18), Yytype_uint8(19), Yytype_uint8(23), Yytype_uint8(25), Yytype_uint8(28), Yytype_uint8(29), Yytype_uint8(30),
	Yytype_uint8(31), Yytype_uint8(32), Yytype_uint8(33), Yytype_uint8(34), Yytype_uint8(35), Yytype_uint8(36), Yytype_uint8(37), Yytype_uint8(38), Yytype_uint8(39), Yytype_uint8(40),
	Yytype_uint8(21), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(4), Yytype_uint8(7), Yytype_uint8(8), Yytype_uint8(20), Yytype_uint8(22), Yytype_uint8(23), Yytype_uint8(39),
	Yytype_uint8(16), Yytype_uint8(14), Yytype_uint8(17), Yytype_uint8(4), Yytype_uint8(8), Yytype_uint8(13), Yytype_uint8(39), Yytype_uint8(3), Yytype_uint8(13), Yytype_uint8(21),
	Yytype_uint8(24), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(8), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(17), Yytype_uint8(8), Yytype_uint8(39),
	Yytype_uint8(4), Yytype_uint8(39), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(7), Yytype_uint8(20), Yytype_uint8(41), Yytype_uint8(22), Yytype_uint8(23), Yytype_uint8(23),
	Yytype_uint8(20), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(13), Yytype_uint8(41), Yytype_uint8(14), Yytype_uint8(20), Yytype_uint8(13),
	Yytype_uint8(13), Yytype_uint8(20), Yytype_uint8(13), Yytype_uint8(20), Yytype_uint8(13),
} /* tclDate.c:741:27 */

// YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
var yyr1 = [57]Yytype_uint8{
	Yytype_uint8(0), Yytype_uint8(26), Yytype_uint8(27), Yytype_uint8(27), Yytype_uint8(28), Yytype_uint8(28), Yytype_uint8(28), Yytype_uint8(28), Yytype_uint8(28), Yytype_uint8(28),
	Yytype_uint8(28), Yytype_uint8(28), Yytype_uint8(28), Yytype_uint8(29), Yytype_uint8(29), Yytype_uint8(29), Yytype_uint8(30), Yytype_uint8(30), Yytype_uint8(30), Yytype_uint8(30),
	Yytype_uint8(31), Yytype_uint8(31), Yytype_uint8(31), Yytype_uint8(31), Yytype_uint8(31), Yytype_uint8(32), Yytype_uint8(32), Yytype_uint8(32), Yytype_uint8(32), Yytype_uint8(32),
	Yytype_uint8(32), Yytype_uint8(32), Yytype_uint8(32), Yytype_uint8(32), Yytype_uint8(32), Yytype_uint8(33), Yytype_uint8(33), Yytype_uint8(34), Yytype_uint8(34), Yytype_uint8(34),
	Yytype_uint8(34), Yytype_uint8(35), Yytype_uint8(36), Yytype_uint8(36), Yytype_uint8(37), Yytype_uint8(37), Yytype_uint8(37), Yytype_uint8(37), Yytype_uint8(37), Yytype_uint8(38),
	Yytype_uint8(38), Yytype_uint8(39), Yytype_uint8(39), Yytype_uint8(39), Yytype_uint8(40), Yytype_uint8(41), Yytype_uint8(41),
} /* tclDate.c:755:27 */

// YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
var yyr2 = [57]Yytype_uint8{
	Yytype_uint8(0), Yytype_uint8(2), Yytype_uint8(0), Yytype_uint8(2), Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(1),
	Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(2), Yytype_uint8(4), Yytype_uint8(6), Yytype_uint8(2), Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(2),
	Yytype_uint8(1), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(3), Yytype_uint8(2), Yytype_uint8(3), Yytype_uint8(5), Yytype_uint8(1), Yytype_uint8(5), Yytype_uint8(5),
	Yytype_uint8(2), Yytype_uint8(4), Yytype_uint8(2), Yytype_uint8(1), Yytype_uint8(3), Yytype_uint8(2), Yytype_uint8(3), Yytype_uint8(11), Yytype_uint8(3), Yytype_uint8(7),
	Yytype_uint8(2), Yytype_uint8(4), Yytype_uint8(2), Yytype_uint8(1), Yytype_uint8(3), Yytype_uint8(2), Yytype_uint8(2), Yytype_uint8(3), Yytype_uint8(1), Yytype_uint8(1),
	Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(1), Yytype_uint8(0), Yytype_uint8(1),
} /* tclDate.c:766:27 */

// Error token number

// YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
//    If N is 0, then set CURRENT to the empty location which ends
//    the previous symbol: RHS[0] (always defined).

// Enable debugging if requested.

// YYINITDEPTH -- initial size of the parser's stacks.

// YYMAXDEPTH -- maximum size the stacks can grow to (effective only
//    if the built-in stack extension method is used).
//
//    Do not make this value too large; the results are undefined if
//    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
//    evaluated with infinite-precision integer arithmetic.

//-----------------------------------------------.
// | Release the memory associated to this symbol.  |
// `-----------------------------------------------

func yydestruct(tls *libc.TLS, yymsg uintptr, yytype int32, yyvaluep uintptr, yylocationp uintptr, info uintptr) { /* tclDate.c:1256:1: */
	_ = yyvaluep
	_ = yylocationp
	_ = info
	if !(yymsg != 0) {
		yymsg = ts + 22704 /* "Deleting" */
	}

	_ = yytype
}

//----------.
// | yyparse.  |
// `----------

func XTclDateparse(tls *libc.TLS, info uintptr) int32 { /* tclDate.c:1278:1: */
	bp := tls.Alloc(5296)
	defer tls.Free(5296)

	// The lookahead symbol.
	var yychar int32

	// The semantic value of the lookahead symbol.
	// Default value used for initialization, for pacifying older GCCs
	//    or non-GCC compilers.

	// var yylval YYSTYPE at bp+5200, 8

	// var yylloc YYLTYPE at bp+5208, 16

	// Number of syntax errors so far.
	var TclDatenerrs int32
	var yystate int32
	// Number of tokens to shift before error messages enabled.
	var yyerrstatus int32

	// The stacks and their tools:
	//        'yyss': related to states.
	//        'yyvs': related to semantic values.
	//        'yyls': related to locations.
	//
	//        Refer to the stacks through separate pointers, to allow yyoverflow
	//        to reallocate them elsewhere.

	// The state stack.
	// var yyssa [200]Yytype_int16 at bp, 400

	var yyss uintptr
	var yyssp uintptr

	// The semantic value stack.
	// var yyvsa [200]YYSTYPE at bp+400, 1600

	var yyvs uintptr
	var yyvsp uintptr

	// The location stack.
	// var yylsa [200]YYLTYPE at bp+2000, 3200

	var yyls uintptr
	var yylsp uintptr

	// The locations where the error started and ended.
	// var yyerror_range [3]YYLTYPE at bp+5240, 48

	var yystacksize uint64
	var yyn int32
	var yyresult int32
	// Lookahead token as an internal (translated) token number.
	var yytoken int32
	// The variables used to return semantic value and location from the
	//      action routines.
	// var yyval YYSTYPE at bp+5288, 8

	// var yyloc YYLTYPE at bp+5224, 16

	// The number of symbols on the RHS of the reduced rule.
	//      Keep to zero when no symbol should be popped.
	var yylen int32
	var yynewbytes uint64
	var yynewbytes1 uint64
	var yynewbytes2 uint64
	var yyss1 uintptr
	var yyptr uintptr
	// Get the current used size of the three stacks, in elements.
	var yysize uint64
	*(*YYLTYPE)(unsafe.Pointer(bp + 5208 /* yylloc */)) = yyloc_default
	yytoken = 0
	yylen = 0

	yyssp = libc.AssignUintptr(&yyss, bp)
	yyvsp = libc.AssignUintptr(&yyvs, bp+400)
	yylsp = libc.AssignUintptr(&yyls, bp+2000)
	yystacksize = uint64(YYINITDEPTH)

	yystate = 0
	yyerrstatus = 0
	TclDatenerrs = 0
	yychar = -2 // Cause a token to be read.
	*(*YYLTYPE)(unsafe.Pointer(yylsp)) = *(*YYLTYPE)(unsafe.Pointer(bp + 5208 /* yylloc */))
	goto yysetstate

	//------------------------------------------------------------.
	// | yynewstate -- Push a new state, which is found in yystate.  |
	// `------------------------------------------------------------
yynewstate:
	// In all cases, when you get here, the value and location stacks
	//      have just been pushed.  So pushing a state here evens the stacks.
	yyssp += 2

yysetstate:
	*(*Yytype_int16)(unsafe.Pointer(yyssp)) = Yytype_int16(yystate)

	if !(yyss+uintptr(yystacksize)*2-uintptr(1)*2 <= yyssp) {
		goto __1
	}

	// Get the current used size of the three stacks, in elements.
	yysize = uint64((int64(yyssp)-int64(yyss))/2 + int64(1))

	// Extend the stack our own way.
	if !(uint64(YYMAXDEPTH) <= yystacksize) {
		goto __2
	}
	goto yyexhaustedlab
__2:
	;
	yystacksize = yystacksize * uint64(2)
	if !(uint64(YYMAXDEPTH) < yystacksize) {
		goto __3
	}
	yystacksize = uint64(YYMAXDEPTH)
__3:
	;

	yyss1 = yyss
	yyptr =
		XTcl_Alloc(tls, uint32(yystacksize*(uint64(unsafe.Sizeof(Yytype_int16(0)))+uint64(unsafe.Sizeof(YYSTYPE{}))+uint64(unsafe.Sizeof(YYLTYPE{})))+uint64(2)*(uint64(unsafe.Sizeof(Yyalloc{}))-uint64(1))))
	if !!(yyptr != 0) {
		goto __4
	}
	goto yyexhaustedlab
__4:
	;
__5:
	libc.X__builtin_memcpy(tls, yyptr, yyss, yysize*uint64(unsafe.Sizeof(Yytype_int16(0))))
	yyss = yyptr
	yynewbytes = yystacksize*uint64(unsafe.Sizeof(Yytype_int16(0))) + (uint64(unsafe.Sizeof(Yyalloc{})) - uint64(1))
	yyptr += 16 * uintptr(yynewbytes/uint64(unsafe.Sizeof(Yyalloc{})))
	goto __6
__6:
	if 0 != 0 {
		goto __5
	}
	goto __7
__7:
	;
__8:
	libc.X__builtin_memcpy(tls, yyptr, yyvs, yysize*uint64(unsafe.Sizeof(YYSTYPE{})))
	yyvs = yyptr
	yynewbytes1 = yystacksize*uint64(unsafe.Sizeof(YYSTYPE{})) + (uint64(unsafe.Sizeof(Yyalloc{})) - uint64(1))
	yyptr += 16 * uintptr(yynewbytes1/uint64(unsafe.Sizeof(Yyalloc{})))
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
__11:
	libc.X__builtin_memcpy(tls, yyptr, yyls, yysize*uint64(unsafe.Sizeof(YYLTYPE{})))
	yyls = yyptr
	yynewbytes2 = yystacksize*uint64(unsafe.Sizeof(YYLTYPE{})) + (uint64(unsafe.Sizeof(Yyalloc{})) - uint64(1))
	yyptr += 16 * uintptr(yynewbytes2/uint64(unsafe.Sizeof(Yyalloc{})))
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	if !(yyss1 != bp) {
		goto __14
	}
	XTclpFree(tls, yyss1)
__14:
	;

	yyssp = yyss + uintptr(yysize)*2 - uintptr(1)*2
	yyvsp = yyvs + uintptr(yysize)*8 - uintptr(1)*8
	yylsp = yyls + uintptr(yysize)*16 - uintptr(1)*16

	if !(yyss+uintptr(yystacksize)*2-uintptr(1)*2 <= yyssp) {
		goto __15
	}
	goto yyabortlab
__15:
	;
__1:
	;

	if !(yystate == YYFINAL) {
		goto __16
	}
	goto yyacceptlab
__16:
	;

	goto yybackup

	//-----------.
	// | yybackup.  |
	// `-----------
yybackup:

	// Do appropriate processing given the current state.  Read a
	//      lookahead token if we need one and don't already have one.

	// First try to decide what to do without reference to lookahead token.
	yyn = int32(yypact[yystate])
	if !!!(yyn == -18) {
		goto __17
	}
	goto yydefault
__17:
	;

	// Not known => get a lookahead token if don't already have one.

	// YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.
	if !(yychar == -2) {
		goto __18
	}

	yychar = sTclDatelex(tls, bp+5200, bp+5208, info)
__18:
	;

	if !(yychar <= YYEOF) {
		goto __19
	}

	yychar = libc.AssignInt32(&yytoken, YYEOF)

	goto __20
__19:

	yytoken = func() int32 {
		if uint32(yychar) <= uint32(YYMAXUTOK) {
			return int32(yytranslate[yychar])
		}
		return YYUNDEFTOK
	}()

__20:
	;

	// If the proper action on seeing token YYTOKEN is to reduce or to
	//      detect an error, take that action.
	yyn = yyn + yytoken
	if !(yyn < 0 || YYLAST < yyn || int32(yycheck[yyn]) != yytoken) {
		goto __21
	}
	goto yydefault
__21:
	;
	yyn = int32(yytable[yyn])
	if !(yyn <= 0) {
		goto __22
	}

	if !(0 != 0) {
		goto __23
	}
	goto yyerrlab
__23:
	;
	yyn = -yyn
	goto yyreduce
__22:
	;

	// Count tokens shifted since error; after three, turn off error
	//      status.
	if !(yyerrstatus != 0) {
		goto __24
	}
	yyerrstatus--
__24:
	;

	// Shift the lookahead token.

	// Discard the shifted token.
	yychar = -2

	yystate = yyn
	*(*YYSTYPE)(unsafe.Pointer(libc.PreIncUintptr(&yyvsp, 8))) = *(*YYSTYPE)(unsafe.Pointer(bp + 5200 /* yylval */))
	*(*YYLTYPE)(unsafe.Pointer(libc.PreIncUintptr(&yylsp, 16))) = *(*YYLTYPE)(unsafe.Pointer(bp + 5208 /* yylloc */))
	goto yynewstate

	//-----------------------------------------------------------.
	// | yydefault -- do the default action for the current state.  |
	// `-----------------------------------------------------------
yydefault:
	yyn = int32(yydefact[yystate])
	if !(yyn == 0) {
		goto __25
	}
	goto yyerrlab
__25:
	;
	goto yyreduce

	//-----------------------------.
	// | yyreduce -- Do a reduction.  |
	// `-----------------------------
yyreduce:
	// yyn is the number of a rule to reduce with.
	yylen = int32(yyr2[yyn])

	// If YYLEN is nonzero, implement the default value of the action:
	//      '$$ = $1'.
	//
	//      Otherwise, the following line sets YYVAL to garbage.
	//      This behavior is undocumented and Bison
	//      users should not rely upon it.  Assigning to YYVAL
	//      unconditionally makes the parser a bit smaller, and it avoids a
	//      GCC warning that YYVAL may be used uninitialized.
	*(*YYSTYPE)(unsafe.Pointer(bp + 5288 /* yyval */)) = *(*YYSTYPE)(unsafe.Pointer(yyvsp + uintptr(1-yylen)*8))

	// Default location.
__26:
	if !(yylen != 0) {
		goto __29
	}
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Ffirst_line = (*YYLTYPE)(unsafe.Pointer(yylsp - uintptr(yylen)*16 + 1*16)).Ffirst_line
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Ffirst_column = (*YYLTYPE)(unsafe.Pointer(yylsp - uintptr(yylen)*16 + 1*16)).Ffirst_column
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Flast_line = (*YYLTYPE)(unsafe.Pointer(yylsp - uintptr(yylen)*16 + uintptr(yylen)*16)).Flast_line
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Flast_column = (*YYLTYPE)(unsafe.Pointer(yylsp - uintptr(yylen)*16 + uintptr(yylen)*16)).Flast_column
	goto __30
__29:
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Ffirst_line = libc.AssignPtrInt32(bp+5224+8, (*YYLTYPE)(unsafe.Pointer(yylsp-uintptr(yylen)*16)).Flast_line)
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Ffirst_column = libc.AssignPtrInt32(bp+5224+12, (*YYLTYPE)(unsafe.Pointer(yylsp-uintptr(yylen)*16)).Flast_column)
__30:
	;
	goto __27
__27:
	if 0 != 0 {
		goto __26
	}
	goto __28
__28:
	;
	*(*YYLTYPE)(unsafe.Pointer(bp + 5240 + 1*16)) = *(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* yyloc */))

	switch yyn {
	case 4:
		goto __32

	case 5:
		goto __33

	case 6:
		goto __34

	case 7:
		goto __35

	case 8:
		goto __36

	case 9:
		goto __37

	case 10:
		goto __38

	case 11:
		goto __39

	case 13:
		goto __40

	case 14:
		goto __41

	case 15:
		goto __42

	case 16:
		goto __43

	case 17:
		goto __44

	case 18:
		goto __45

	case 19:
		goto __46

	case 20:
		goto __47

	case 21:
		goto __48

	case 22:
		goto __49

	case 23:
		goto __50

	case 24:
		goto __51

	case 25:
		goto __52

	case 26:
		goto __53

	case 27:
		goto __54

	case 28:
		goto __55

	case 29:
		goto __56

	case 30:
		goto __57

	case 31:
		goto __58

	case 32:
		goto __59

	case 33:
		goto __60

	case 34:
		goto __61

	case 35:
		goto __62

	case 36:
		goto __63

	case 37:
		goto __64

	case 38:
		goto __65

	case 39:
		goto __66

	case 40:
		goto __67

	case 41:
		goto __68

	case 42:
		goto __69

	case 44:
		goto __70

	case 45:
		goto __71

	case 46:
		goto __72

	case 47:
		goto __73

	case 48:
		goto __74

	case 49:
		goto __75

	case 50:
		goto __76

	case 51:
		goto __77

	case 52:
		goto __78

	case 53:
		goto __79

	case 54:
		goto __80

	case 55:
		goto __81

	case 56:
		goto __82

	default:
		goto __83
	}
	goto __31

__32:

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveTime++

	goto __31

__33:

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveZone++

	goto __31

__34:

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveDate++

	goto __31

__35:

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveOrdinalMonth++

	goto __31

__36:

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveDay++

	goto __31

__37:

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveRel++

	goto __31

__38:

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveTime++
	(*DateInfo)(unsafe.Pointer(info)).FdateHaveDate++

	goto __31

__39:

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveTime++
	(*DateInfo)(unsafe.Pointer(info)).FdateHaveDate++
	(*DateInfo)(unsafe.Pointer(info)).FdateHaveRel++

	goto __31

__40:

	(*DateInfo)(unsafe.Pointer(info)).FdateHour = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateSeconds = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateMeridian = MERIDIAN(*(*uint32)(unsafe.Pointer(yyvsp)))

	goto __31

__41:

	(*DateInfo)(unsafe.Pointer(info)).FdateHour = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-3)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateSeconds = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateMeridian = MERIDIAN(*(*uint32)(unsafe.Pointer(yyvsp)))

	goto __31

__42:

	(*DateInfo)(unsafe.Pointer(info)).FdateHour = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-5)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-3)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateSeconds = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateMeridian = MERIDIAN(*(*uint32)(unsafe.Pointer(yyvsp)))

	goto __31

__43:

	(*DateInfo)(unsafe.Pointer(info)).FdateTimezone = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))
	if !((*DateInfo)(unsafe.Pointer(info)).FdateTimezone > Time_t(60*12)) {
		goto __84
	}
	*(*Time_t)(unsafe.Pointer(info + 80)) -= Time_t(60 * 100)
__84:
	;
	(*DateInfo)(unsafe.Pointer(info)).FdateDSTmode = DSTon

	goto __31

__44:

	(*DateInfo)(unsafe.Pointer(info)).FdateTimezone = *(*Time_t)(unsafe.Pointer(yyvsp))
	if !((*DateInfo)(unsafe.Pointer(info)).FdateTimezone > Time_t(60*12)) {
		goto __85
	}
	*(*Time_t)(unsafe.Pointer(info + 80)) -= Time_t(60 * 100)
__85:
	;
	(*DateInfo)(unsafe.Pointer(info)).FdateDSTmode = DSToff

	goto __31

__45:

	(*DateInfo)(unsafe.Pointer(info)).FdateTimezone = *(*Time_t)(unsafe.Pointer(yyvsp))
	(*DateInfo)(unsafe.Pointer(info)).FdateDSTmode = DSTon

	goto __31

__46:

	(*DateInfo)(unsafe.Pointer(info)).FdateTimezone = -*(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8)) * (*(*Time_t)(unsafe.Pointer(yyvsp))%int64(100) + *(*Time_t)(unsafe.Pointer(yyvsp))/int64(100)*int64(60))
	(*DateInfo)(unsafe.Pointer(info)).FdateDSTmode = DSToff

	goto __31

__47:

	(*DateInfo)(unsafe.Pointer(info)).FdateDayOrdinal = int64(1)
	(*DateInfo)(unsafe.Pointer(info)).FdateDayNumber = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__48:

	(*DateInfo)(unsafe.Pointer(info)).FdateDayOrdinal = int64(1)
	(*DateInfo)(unsafe.Pointer(info)).FdateDayNumber = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))

	goto __31

__49:

	(*DateInfo)(unsafe.Pointer(info)).FdateDayOrdinal = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateDayNumber = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__50:

	(*DateInfo)(unsafe.Pointer(info)).FdateDayOrdinal = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8)) * *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateDayNumber = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__51:

	(*DateInfo)(unsafe.Pointer(info)).FdateDayOrdinal = int64(2)
	(*DateInfo)(unsafe.Pointer(info)).FdateDayNumber = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__52:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__53:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-4)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__54:

	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp)) / int64(10000)
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp)) % int64(10000) / int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp)) % int64(100)

	goto __31

__55:

	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-4)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__56:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp))
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-4)*8))

	goto __31

__57:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__58:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-3)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__59:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp))
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))

	goto __31

__60:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = int64(1)
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = int64(1)
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = int64(EPOCH)

	goto __31

__61:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__62:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonthOrdinal = int64(1)
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__63:

	(*DateInfo)(unsafe.Pointer(info)).FdateMonthOrdinal = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__64:

	if !(*(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-5)*8)) != int64(60*7+60*100)) {
		goto __86
	}
	goto yyabortlab
__86:
	;
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-10)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-8)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-6)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateHour = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-4)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateSeconds = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__65:

	if !(*(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8)) != int64(60*7+60*100)) {
		goto __87
	}
	goto yyabortlab
__87:
	;
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8)) / int64(10000)
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8)) % int64(10000) / int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8)) % int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateHour = *(*Time_t)(unsafe.Pointer(yyvsp)) / int64(10000)
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = *(*Time_t)(unsafe.Pointer(yyvsp)) % int64(10000) / int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateSeconds = *(*Time_t)(unsafe.Pointer(yyvsp)) % int64(100)

	goto __31

__66:

	if !(*(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-5)*8)) != int64(60*7+60*100)) {
		goto __88
	}
	goto yyabortlab
__88:
	;
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-6)*8)) / int64(10000)
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-6)*8)) % int64(10000) / int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-6)*8)) % int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateHour = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-4)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8))
	(*DateInfo)(unsafe.Pointer(info)).FdateSeconds = *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__67:

	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8)) / int64(10000)
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8)) % int64(10000) / int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8)) % int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateHour = *(*Time_t)(unsafe.Pointer(yyvsp)) / int64(10000)
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = *(*Time_t)(unsafe.Pointer(yyvsp)) % int64(10000) / int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateSeconds = *(*Time_t)(unsafe.Pointer(yyvsp)) % int64(100)

	goto __31

__68:

	// Offset computed year by -377 so that the returned years will be
	// in a range accessible with a 32 bit clock seconds value.

	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8))/int64(1000) + int64(2323) - int64(377)
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = int64(1)
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = int64(1)
	*(*Time_t)(unsafe.Pointer(info + 104)) += *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8)) % int64(1000) * Time_t(365+libc.Bool32((*DateInfo)(unsafe.Pointer(info)).FdateYear%int64(4) == int64(0) && ((*DateInfo)(unsafe.Pointer(info)).FdateYear%int64(100) != int64(0) || (*DateInfo)(unsafe.Pointer(info)).FdateYear%int64(400) == int64(0)))) / int64(1000)
	*(*Time_t)(unsafe.Pointer(info + 112)) += *(*Time_t)(unsafe.Pointer(yyvsp)) * int64(144) * int64(60)

	goto __31

__69:

	*(*Time_t)(unsafe.Pointer(info + 112)) *= int64(-1)
	*(*Time_t)(unsafe.Pointer(info + 96)) *= int64(-1)
	*(*Time_t)(unsafe.Pointer(info + 104)) *= int64(-1)

	goto __31

__70:

	*(*Time_t)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(info)).FdateRelPointer)) += *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-2)*8)) * *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8)) * *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__71:

	*(*Time_t)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(info)).FdateRelPointer)) += *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8)) * *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__72:

	*(*Time_t)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(info)).FdateRelPointer)) += *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__73:

	*(*Time_t)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(info)).FdateRelPointer)) += *(*Time_t)(unsafe.Pointer(yyvsp + libc.UintptrFromInt32(-1)*8)) * *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__74:

	*(*Time_t)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(info)).FdateRelPointer)) += *(*Time_t)(unsafe.Pointer(yyvsp))

	goto __31

__75:

	*(*Time_t)(unsafe.Pointer(bp + 5288)) = int64(-1)

	goto __31

__76:

	*(*Time_t)(unsafe.Pointer(bp + 5288)) = int64(1)

	goto __31

__77:

	*(*Time_t)(unsafe.Pointer(bp + 5288)) = *(*Time_t)(unsafe.Pointer(yyvsp))
	(*DateInfo)(unsafe.Pointer(info)).FdateRelPointer = info + 112

	goto __31

__78:

	*(*Time_t)(unsafe.Pointer(bp + 5288)) = *(*Time_t)(unsafe.Pointer(yyvsp))
	(*DateInfo)(unsafe.Pointer(info)).FdateRelPointer = info + 104

	goto __31

__79:

	*(*Time_t)(unsafe.Pointer(bp + 5288)) = *(*Time_t)(unsafe.Pointer(yyvsp))
	(*DateInfo)(unsafe.Pointer(info)).FdateRelPointer = info + 96

	goto __31

__80:

	if !((*DateInfo)(unsafe.Pointer(info)).FdateHaveTime != 0 && (*DateInfo)(unsafe.Pointer(info)).FdateHaveDate != 0 && !((*DateInfo)(unsafe.Pointer(info)).FdateHaveRel != 0)) {
		goto __89
	}
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = *(*Time_t)(unsafe.Pointer(yyvsp))
	goto __90
__89:
	(*DateInfo)(unsafe.Pointer(info)).FdateHaveTime++
	if !((*DateInfo)(unsafe.Pointer(info)).FdateDigitCount <= 2) {
		goto __91
	}
	(*DateInfo)(unsafe.Pointer(info)).FdateHour = *(*Time_t)(unsafe.Pointer(yyvsp))
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = int64(0)
	goto __92
__91:
	(*DateInfo)(unsafe.Pointer(info)).FdateHour = *(*Time_t)(unsafe.Pointer(yyvsp)) / int64(100)
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = *(*Time_t)(unsafe.Pointer(yyvsp)) % int64(100)
__92:
	;
	(*DateInfo)(unsafe.Pointer(info)).FdateSeconds = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateMeridian = MER24
__90:
	;

	goto __31

__81:

	*(*uint32)(unsafe.Pointer(bp + 5288)) = MER24

	goto __31

__82:

	*(*uint32)(unsafe.Pointer(bp + 5288)) = *(*uint32)(unsafe.Pointer(yyvsp))

	goto __31

__83:
	goto __31
__31:
	;
	// User semantic actions sometimes alter yychar, and that requires
	//      that yytoken be updated with the new translation.  We take the
	//      approach of translating immediately before every use of yytoken.
	//      One alternative is translating here after every semantic action,
	//      but that translation would be missed if the semantic action invokes
	//      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
	//      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
	//      incorrect destructor might then be invoked immediately.  In the
	//      case of YYERROR or YYBACKUP, subsequent parser actions might lead
	//      to an incorrect destructor call or verbose syntax error message
	//      before the lookahead is translated.

	yyvsp -= 8 * uintptr(yylen)
	yyssp -= 2 * uintptr(yylen)
	yylsp -= 16 * uintptr(yylen)
	yylen = 0

	*(*YYSTYPE)(unsafe.Pointer(libc.PreIncUintptr(&yyvsp, 8))) = *(*YYSTYPE)(unsafe.Pointer(bp + 5288 /* yyval */))
	*(*YYLTYPE)(unsafe.Pointer(libc.PreIncUintptr(&yylsp, 16))) = *(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* yyloc */))

	// Now 'shift' the result of the reduction.  Determine what state
	//      that goes to, based on the state we popped back to and the rule
	//      number reduced by.

	yyn = int32(yyr1[yyn])

	yystate = int32(yypgoto[yyn-YYNTOKENS]) + int32(*(*Yytype_int16)(unsafe.Pointer(yyssp)))
	if !(0 <= yystate && yystate <= YYLAST && int32(yycheck[yystate]) == int32(*(*Yytype_int16)(unsafe.Pointer(yyssp)))) {
		goto __93
	}
	yystate = int32(yytable[yystate])
	goto __94
__93:
	yystate = int32(yydefgoto[yyn-YYNTOKENS])
__94:
	;

	goto yynewstate

	//--------------------------------------.
	// | yyerrlab -- here on detecting error.  |
	// `--------------------------------------
yyerrlab:
	// Make sure we have latest lookahead translation.  See comments at
	//      user semantic actions for why this is necessary.
	if yychar == -2 {
		yytoken = -2
	} else {
		yytoken = func() int32 {
			if uint32(yychar) <= uint32(YYMAXUTOK) {
				return int32(yytranslate[yychar])
			}
			return YYUNDEFTOK
		}()
	}

	// If not already recovering from an error, report this error.
	if !!(yyerrstatus != 0) {
		goto __95
	}

	TclDatenerrs++
	sTclDateerror(tls, bp+5208, info, ts+22713)
__95:
	;

	*(*YYLTYPE)(unsafe.Pointer(bp + 5240 + 1*16)) = *(*YYLTYPE)(unsafe.Pointer(bp + 5208 /* yylloc */))

	if !(yyerrstatus == 3) {
		goto __96
	}

	// If just tried and failed to reuse lookahead token after an
	//          error, discard it.

	if !(yychar <= YYEOF) {
		goto __97
	}

	// Return failure if at end of input.
	if !(yychar == YYEOF) {
		goto __99
	}
	goto yyabortlab
__99:
	;
	goto __98
__97:

	yydestruct(tls, ts+22726,
		yytoken, bp+5200, bp+5208, info)
	yychar = -2
__98:
	;
__96:
	;

	// Else will try to reuse lookahead token after shifting the error
	//      token.
	goto yyerrlab1

	//---------------------------------------------------.
	// | yyerrorlab -- error raised explicitly by YYERROR.  |
	// `---------------------------------------------------
yyerrorlab:

	// Pacify compilers like GCC when the user code never invokes
	//      YYERROR and the label yyerrorlab therefore never appears in user
	//      code.
	if !(0 != 0) {
		goto __100
	}
	goto yyerrorlab
__100:
	;

	// Do not reclaim the symbols of the rule whose action triggered
	//      this YYERROR.
	yyvsp -= 8 * uintptr(yylen)
	yyssp -= 2 * uintptr(yylen)
	yylsp -= 16 * uintptr(yylen)
	yylen = 0

	yystate = int32(*(*Yytype_int16)(unsafe.Pointer(yyssp)))
	goto yyerrlab1

	//-------------------------------------------------------------.
	// | yyerrlab1 -- common code for both syntax error and YYERROR.  |
	// `-------------------------------------------------------------
yyerrlab1:
	yyerrstatus = 3 // Each real token shifted decrements this.

__101:

	yyn = int32(yypact[yystate])
	if !!!!(yyn == -18) {
		goto __104
	}

	yyn = yyn + YYTERROR
	if !(0 <= yyn && yyn <= YYLAST && int32(yycheck[yyn]) == YYTERROR) {
		goto __105
	}

	yyn = int32(yytable[yyn])
	if !(0 < yyn) {
		goto __106
	}
	goto __103
__106:
	;
__105:
	;
__104:
	;

	// Pop the current state because it cannot handle the error token.
	if !(yyssp == yyss) {
		goto __107
	}
	goto yyabortlab
__107:
	;

	*(*YYLTYPE)(unsafe.Pointer(bp + 5240 + 1*16)) = *(*YYLTYPE)(unsafe.Pointer(yylsp))
	yydestruct(tls, ts+22744,
		int32(yystos[yystate]), yyvsp, yylsp, info)
	yyvsp -= 8 * uintptr(1)
	yyssp -= 2 * uintptr(1)
	yylsp -= 16 * uintptr(1)
	yystate = int32(*(*Yytype_int16)(unsafe.Pointer(yyssp)))

	goto __102
__102:
	goto __101
	goto __103
__103:
	;

	*(*YYSTYPE)(unsafe.Pointer(libc.PreIncUintptr(&yyvsp, 8))) = *(*YYSTYPE)(unsafe.Pointer(bp + 5200 /* yylval */))

	*(*YYLTYPE)(unsafe.Pointer(bp + 5240 + 2*16)) = *(*YYLTYPE)(unsafe.Pointer(bp + 5208 /* yylloc */))
	// Using YYLLOC is tempting, but would change the location of
	//      the lookahead.  YYLOC is available though.
__108:
	if !(2 != 0) {
		goto __111
	}
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Ffirst_line = (*YYLTYPE)(unsafe.Pointer(bp + 5240 + 1*16)).Ffirst_line
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Ffirst_column = (*YYLTYPE)(unsafe.Pointer(bp + 5240 + 1*16)).Ffirst_column
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Flast_line = (*YYLTYPE)(unsafe.Pointer(bp + 5240 + 2*16)).Flast_line
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Flast_column = (*YYLTYPE)(unsafe.Pointer(bp + 5240 + 2*16)).Flast_column
	goto __112
__111:
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Ffirst_line = libc.AssignPtrInt32(bp+5224+8, (*YYLTYPE)(unsafe.Pointer(bp+5240)).Flast_line)
	(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* &yyloc */)).Ffirst_column = libc.AssignPtrInt32(bp+5224+12, (*YYLTYPE)(unsafe.Pointer(bp+5240)).Flast_column)
__112:
	;
	goto __109
__109:
	if 0 != 0 {
		goto __108
	}
	goto __110
__110:
	;
	*(*YYLTYPE)(unsafe.Pointer(libc.PreIncUintptr(&yylsp, 16))) = *(*YYLTYPE)(unsafe.Pointer(bp + 5224 /* yyloc */))

	// Shift the error token.

	yystate = yyn
	goto yynewstate

	//-------------------------------------.
	// | yyacceptlab -- YYACCEPT comes here.  |
	// `-------------------------------------
yyacceptlab:
	yyresult = 0
	goto yyreturn

	//-----------------------------------.
	// | yyabortlab -- YYABORT comes here.  |
	// `-----------------------------------
yyabortlab:
	yyresult = 1
	goto yyreturn

	//-------------------------------------------------.
	// | yyexhaustedlab -- memory exhaustion comes here.  |
	// `-------------------------------------------------
yyexhaustedlab:
	sTclDateerror(tls, bp+5208, info, ts+22759)
	yyresult = 2
	// Fall through.

yyreturn:
	if !(yychar != -2) {
		goto __113
	}

	// Make sure we have latest lookahead translation.  See comments at
	//          user semantic actions for why this is necessary.
	yytoken = func() int32 {
		if uint32(yychar) <= uint32(YYMAXUTOK) {
			return int32(yytranslate[yychar])
		}
		return YYUNDEFTOK
	}()
	yydestruct(tls, ts+22776,
		yytoken, bp+5200, bp+5208, info)
__113:
	;
	// Do not reclaim the symbols of the rule whose action triggered
	//      this YYABORT or YYACCEPT.
	yyvsp -= 8 * uintptr(yylen)
	yyssp -= 2 * uintptr(yylen)
	yylsp -= 16 * uintptr(yylen)

__114:
	if !(yyssp != yyss) {
		goto __115
	}

	yydestruct(tls, ts+22806,
		int32(yystos[*(*Yytype_int16)(unsafe.Pointer(yyssp))]), yyvsp, yylsp, info)
	yyvsp -= 8 * uintptr(1)
	yyssp -= 2 * uintptr(1)
	yylsp -= 16 * uintptr(1)
	goto __114
__115:
	;
	if !(yyss != bp) {
		goto __116
	}
	XTclpFree(tls, yyss)
__116:
	;
	return yyresult
}

var yyloc_default = YYLTYPE{Ffirst_line: 1, Ffirst_column: 1, Flast_line: 1, Flast_column: 1} /* tclDate.c:1291:16 */

// Month and day table.

var sMonthDayTable = [25]TABLE{
	{Fname: ts + 22823, Ftype: TMONTH, Fvalue: int64(1)},
	{Fname: ts + 22831, Ftype: TMONTH, Fvalue: int64(2)},
	{Fname: ts + 22840, Ftype: TMONTH, Fvalue: int64(3)},
	{Fname: ts + 22846, Ftype: TMONTH, Fvalue: int64(4)},
	{Fname: ts + 22852, Ftype: TMONTH, Fvalue: int64(5)},
	{Fname: ts + 22856, Ftype: TMONTH, Fvalue: int64(6)},
	{Fname: ts + 22861, Ftype: TMONTH, Fvalue: int64(7)},
	{Fname: ts + 22866, Ftype: TMONTH, Fvalue: int64(8)},
	{Fname: ts + 22873, Ftype: TMONTH, Fvalue: int64(9)},
	{Fname: ts + 22883, Ftype: TMONTH, Fvalue: int64(9)},
	{Fname: ts + 22888, Ftype: TMONTH, Fvalue: int64(10)},
	{Fname: ts + 22896, Ftype: TMONTH, Fvalue: int64(11)},
	{Fname: ts + 22905, Ftype: TMONTH, Fvalue: int64(12)},
	{Fname: ts + 22914, Ftype: TDAY},
	{Fname: ts + 22921, Ftype: TDAY, Fvalue: int64(1)},
	{Fname: ts + 22928, Ftype: TDAY, Fvalue: int64(2)},
	{Fname: ts + 22936, Ftype: TDAY, Fvalue: int64(2)},
	{Fname: ts + 22941, Ftype: TDAY, Fvalue: int64(3)},
	{Fname: ts + 22951, Ftype: TDAY, Fvalue: int64(3)},
	{Fname: ts + 22958, Ftype: TDAY, Fvalue: int64(4)},
	{Fname: ts + 22967, Ftype: TDAY, Fvalue: int64(4)},
	{Fname: ts + 22972, Ftype: TDAY, Fvalue: int64(4)},
	{Fname: ts + 22978, Ftype: TDAY, Fvalue: int64(5)},
	{Fname: ts + 22985, Ftype: TDAY, Fvalue: int64(6)},
	{},
} /* tclDate.c:2293:20 */

// Time units table.

var sUnitsTable = [11]TABLE{
	{Fname: ts + 11198, Ftype: TMONTH_UNIT, Fvalue: int64(12)},
	{Fname: ts + 11168, Ftype: TMONTH_UNIT, Fvalue: int64(1)},
	{Fname: ts + 22994, Ftype: TDAY_UNIT, Fvalue: int64(14)},
	{Fname: ts + 23004, Ftype: TDAY_UNIT, Fvalue: int64(7)},
	{Fname: ts + 23009, Ftype: TDAY_UNIT, Fvalue: int64(1)},
	{Fname: ts + 23013, Ftype: TSEC_UNIT, Fvalue: int64(60 * 60)},
	{Fname: ts + 23018, Ftype: TSEC_UNIT, Fvalue: int64(60)},
	{Fname: ts + 23025, Ftype: TSEC_UNIT, Fvalue: int64(60)},
	{Fname: ts + 23029, Ftype: TSEC_UNIT, Fvalue: int64(1)},
	{Fname: ts + 23036, Ftype: TSEC_UNIT, Fvalue: int64(1)},
	{},
} /* tclDate.c:2325:20 */

// Assorted relative-time words.

var sOtherTable = [11]TABLE{
	{Fname: ts + 23040, Ftype: TDAY_UNIT, Fvalue: int64(1)},
	{Fname: ts + 23049, Ftype: TDAY_UNIT, Fvalue: int64(-1)},
	{Fname: ts + 23059, Ftype: TDAY_UNIT},
	{Fname: ts + 23065, Ftype: TSEC_UNIT},
	{Fname: ts + 17241, Ftype: TUNUMBER, Fvalue: int64(-1)},
	{Fname: ts + 23069, Ftype: TSEC_UNIT},
	{Fname: ts + 23074, Ftype: TNEXT, Fvalue: int64(1)},
	{Fname: ts + 23079, Ftype: TAGO, Fvalue: int64(1)},
	{Fname: ts + 23083, Ftype: TEPOCH},
	{Fname: ts + 23089, Ftype: TSTARDATE},
	{},
} /* tclDate.c:2343:20 */

// The timezone table. (Note: This table was modified to not use any floating
// point constants to work around an SGI compiler bug).

var sTimezoneTable = [64]TABLE{
	{Fname: ts + 23098, Ftype: TZONE}, // Greenwich Mean
	{Fname: ts + 23102, Ftype: TZONE}, // Universal (Coordinated)
	{Fname: ts + 23105, Ftype: TZONE},
	{Fname: ts + 23109, Ftype: TZONE},    // Universal Coordinated Time
	{Fname: ts + 23113, Ftype: TZONE},    // Western European
	{Fname: ts + 23117, Ftype: TDAYZONE}, // British Summer
	{Fname: ts + 23121, Ftype: TZONE, Fvalue: Time_t(60 * 1)},
	{Fname: ts + 23125, Ftype: TZONE, Fvalue: Time_t(60 * 2)},
	{Fname: ts + 23128, Ftype: TZONE, Fvalue: Time_t(60 * 7 / 2)},
	{Fname: ts + 23132, Ftype: TZONE, Fvalue: Time_t(60 * 7 / 2)},
	{Fname: ts + 23136, Ftype: TDAYZONE, Fvalue: Time_t(60 * 7 / 2)},
	{Fname: ts + 23140, Ftype: TZONE, Fvalue: Time_t(60 * 4)},
	{Fname: ts + 23144, Ftype: TDAYZONE, Fvalue: Time_t(60 * 4)},
	{Fname: ts + 23148, Ftype: TZONE, Fvalue: Time_t(60 * 5)},
	{Fname: ts + 23152, Ftype: TDAYZONE, Fvalue: Time_t(60 * 5)},
	{Fname: ts + 23156, Ftype: TZONE, Fvalue: Time_t(60 * 6)},
	{Fname: ts + 23160, Ftype: TDAYZONE, Fvalue: Time_t(60 * 6)},
	{Fname: ts + 23164, Ftype: TZONE, Fvalue: Time_t(60 * 7)},
	{Fname: ts + 23168, Ftype: TDAYZONE, Fvalue: Time_t(60 * 7)},
	{Fname: ts + 23172, Ftype: TZONE, Fvalue: Time_t(60 * 8)},
	{Fname: ts + 23176, Ftype: TDAYZONE, Fvalue: Time_t(60 * 8)},
	{Fname: ts + 23180, Ftype: TZONE, Fvalue: Time_t(60 * 9)},
	{Fname: ts + 23184, Ftype: TDAYZONE, Fvalue: Time_t(60 * 9)},
	{Fname: ts + 23188, Ftype: TZONE, Fvalue: Time_t(60 * 10)},
	{Fname: ts + 23192, Ftype: TDAYZONE, Fvalue: Time_t(60 * 10)},
	{Fname: ts + 17208, Ftype: TZONE, Fvalue: Time_t(60 * 10)},
	{Fname: ts + 23196, Ftype: TZONE, Fvalue: Time_t(60 * 10)},
	{Fname: ts + 23201, Ftype: TZONE, Fvalue: Time_t(60 * 11)},
	{Fname: ts + 23204, Ftype: TZONE, Fvalue: Time_t(60 * 12)},
	{Fname: ts + 23209, Ftype: TZONE, Fvalue: int64(-(60 * 1))},
	{Fname: ts + 23213, Ftype: TDAYZONE, Fvalue: int64(-(60 * 1))},
	{Fname: ts + 23218, Ftype: TZONE, Fvalue: int64(-(60 * 1))},
	{Fname: ts + 23222, Ftype: TZONE, Fvalue: int64(-(60 * 1))},
	{Fname: ts + 23227, Ftype: TDAYZONE, Fvalue: int64(-(60 * 1))},
	{Fname: ts + 23232, Ftype: TZONE, Fvalue: int64(-(60 * 1))},
	{Fname: ts + 23236, Ftype: TDAYZONE, Fvalue: int64(-(60 * 1))},
	{Fname: ts + 23240, Ftype: TZONE, Fvalue: int64(-(60 * 1))},
	{Fname: ts + 23244, Ftype: TDAYZONE, Fvalue: int64(-(60 * 1))},
	{Fname: ts + 23248, Ftype: TZONE, Fvalue: int64(-(60 * 2))},
	{Fname: ts + 23252, Ftype: TZONE, Fvalue: int64(-(60 * 3))},
	{Fname: ts + 23255, Ftype: TZONE, Fvalue: int64(-(60 * 7 / 2))},
	{Fname: ts + 23258, Ftype: TZONE, Fvalue: int64(-(60 * 4))},
	{Fname: ts + 23262, Ftype: TZONE, Fvalue: int64(-(60 * 5))},
	{Fname: ts + 23266, Ftype: TZONE, Fvalue: int64(-(60 * 11 / 2))},
	{Fname: ts + 23270, Ftype: TZONE, Fvalue: int64(-(60 * 6))},
	{Fname: ts + 23274, Ftype: TZONE, Fvalue: int64(-(60 * 7))},
	{Fname: ts + 23279, Ftype: TDAYZONE, Fvalue: int64(-(60 * 7))},
	{Fname: ts + 23284, Ftype: TZONE, Fvalue: int64(-(60 * 15 / 2))},
	{Fname: ts + 23287, Ftype: TZONE, Fvalue: int64(-(60 * 8))},
	{Fname: ts + 23291, Ftype: TZONE, Fvalue: int64(-(60 * 9))},
	{Fname: ts + 23295, Ftype: TDAYZONE, Fvalue: int64(-(60 * 9))},
	{Fname: ts + 23299, Ftype: TZONE, Fvalue: int64(-(60 * 9))},
	{Fname: ts + 23303, Ftype: TDAYZONE, Fvalue: int64(-(60 * 9))},
	{Fname: ts + 23307, Ftype: TZONE, Fvalue: int64(-(60 * 19 / 2))},
	{Fname: ts + 23312, Ftype: TDAYZONE, Fvalue: int64(-(60 * 19 / 2))},
	{Fname: ts + 23317, Ftype: TZONE, Fvalue: int64(-(60 * 10))},
	{Fname: ts + 23322, Ftype: TDAYZONE, Fvalue: int64(-(60 * 10))},
	{Fname: ts + 23327, Ftype: TZONE, Fvalue: int64(-(60 * 10))},
	{Fname: ts + 23331, Ftype: TZONE, Fvalue: int64(-(60 * 12))},
	{Fname: ts + 23335, Ftype: TZONE, Fvalue: int64(-(60 * 12))},
	{Fname: ts + 23340, Ftype: TDAYZONE, Fvalue: int64(-(60 * 12))},
	{Fname: ts + 23345, Ftype: TZONE, Fvalue: int64(-(60 * 12))},
	// ADDED BY Marco Nijdam
	{Fname: ts + 23350, Ftype: TDST}, // DST on (hour is ignored)
	// End ADDED
	{},
} /* tclDate.c:2376:20 */

// Military timezone table.

var sMilitaryTable = [26]TABLE{
	{Fname: ts + 23354, Ftype: TZONE, Fvalue: int64(-(60 * 1) + 60*100)},
	{Fname: ts + 23356, Ftype: TZONE, Fvalue: int64(-(60 * 2) + 60*100)},
	{Fname: ts + 23358, Ftype: TZONE, Fvalue: int64(-(60 * 3) + 60*100)},
	{Fname: ts + 23360, Ftype: TZONE, Fvalue: int64(-(60 * 4) + 60*100)},
	{Fname: ts + 23362, Ftype: TZONE, Fvalue: int64(-(60 * 5) + 60*100)},
	{Fname: ts + 23364, Ftype: TZONE, Fvalue: int64(-(60 * 6) + 60*100)},
	{Fname: ts + 23366, Ftype: TZONE, Fvalue: int64(-(60 * 7) + 60*100)},
	{Fname: ts + 23368, Ftype: TZONE, Fvalue: int64(-(60 * 8) + 60*100)},
	{Fname: ts + 23370, Ftype: TZONE, Fvalue: int64(-(60 * 9) + 60*100)},
	{Fname: ts + 23372, Ftype: TZONE, Fvalue: int64(-(60 * 10) + 60*100)},
	{Fname: ts + 23374, Ftype: TZONE, Fvalue: int64(-(60 * 11) + 60*100)},
	{Fname: ts + 23376, Ftype: TZONE, Fvalue: int64(-(60 * 12) + 60*100)},
	{Fname: ts + 23378, Ftype: TZONE, Fvalue: int64(60*1 + 60*100)},
	{Fname: ts + 23380, Ftype: TZONE, Fvalue: int64(60*2 + 60*100)},
	{Fname: ts + 23382, Ftype: TZONE, Fvalue: int64(60*3 + 60*100)},
	{Fname: ts + 23384, Ftype: TZONE, Fvalue: int64(60*4 + 60*100)},
	{Fname: ts + 23386, Ftype: TZONE, Fvalue: int64(60*5 + 60*100)},
	{Fname: ts + 23388, Ftype: TZONE, Fvalue: int64(60*6 + 60*100)},
	{Fname: ts + 23390, Ftype: TZONE, Fvalue: int64(60*7 + 60*100)},
	{Fname: ts + 23392, Ftype: TZONE, Fvalue: int64(60*8 + 60*100)},
	{Fname: ts + 23394, Ftype: TZONE, Fvalue: int64(60*9 + 60*100)},
	{Fname: ts + 23396, Ftype: TZONE, Fvalue: int64(60*10 + 60*100)},
	{Fname: ts + 23398, Ftype: TZONE, Fvalue: int64(60*11 + 60*100)},
	{Fname: ts + 23400, Ftype: TZONE, Fvalue: int64(60*12 + 60*100)},
	{Fname: ts + 23402, Ftype: TZONE, Fvalue: int64(60*0 + 60*100)},
	{},
} /* tclDate.c:2461:20 */

// Dump error messages in the bit bucket.

func sTclDateerror(tls *libc.TLS, location uintptr, infoPtr uintptr, s uintptr) { /* tclDate.c:2495:1: */
	var t uintptr
	XTcl_AppendToObj(tls, (*DateInfo)(unsafe.Pointer(infoPtr)).Fmessages, (*DateInfo)(unsafe.Pointer(infoPtr)).Fseparatrix, -1)
	XTcl_AppendToObj(tls, (*DateInfo)(unsafe.Pointer(infoPtr)).Fmessages, s, -1)
	XTcl_AppendToObj(tls, (*DateInfo)(unsafe.Pointer(infoPtr)).Fmessages, ts+23404, -1)
	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			t = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(t)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(t)).Fbytes = uintptr(0)
		*(*int32)(unsafe.Pointer(t + 32)) = int32((*YYLTYPE)(unsafe.Pointer(location)).Ffirst_column)
		(*Tcl_Obj)(unsafe.Pointer(t)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(t)).FrefCount++
	XTcl_AppendObjToObj(tls, (*DateInfo)(unsafe.Pointer(infoPtr)).Fmessages, t)
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = t
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTcl_AppendToObj(tls, (*DateInfo)(unsafe.Pointer(infoPtr)).Fmessages, ts+6357, -1)
	for ok3 := true; ok3; ok3 = 0 != 0 {
		for ok4 := true; ok4; ok4 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			t = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(t)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(t)).Fbytes = uintptr(0)
		*(*int32)(unsafe.Pointer(t + 32)) = int32((*YYLTYPE)(unsafe.Pointer(location)).Flast_column)
		(*Tcl_Obj)(unsafe.Pointer(t)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(t)).FrefCount++
	XTcl_AppendObjToObj(tls, (*DateInfo)(unsafe.Pointer(infoPtr)).Fmessages, t)
	for ok5 := true; ok5; ok5 = 0 != 0 {
		var _objPtr uintptr = t
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTcl_AppendToObj(tls, (*DateInfo)(unsafe.Pointer(infoPtr)).Fmessages, ts+4078, -1)
	(*DateInfo)(unsafe.Pointer(infoPtr)).Fseparatrix = ts + 935 /* "\n" */
}

func sToSeconds(tls *libc.TLS, Hours Time_t, Minutes Time_t, Seconds Time_t, Meridian MERIDIAN) Time_t { /* tclDate.c:2518:1: */
	if Minutes < int64(0) || Minutes > int64(59) || Seconds < int64(0) || Seconds > int64(59) {
		return int64(-1)
	}
	switch Meridian {
	case MER24:
		if Hours < int64(0) || Hours > int64(23) {
			return int64(-1)
		}
		return (Hours*int64(60)+Minutes)*int64(60) + Seconds
	case MERam:
		if Hours < int64(1) || Hours > int64(12) {
			return int64(-1)
		}
		return (Hours%int64(12)*int64(60)+Minutes)*int64(60) + Seconds
	case MERpm:
		if Hours < int64(1) || Hours > int64(12) {
			return int64(-1)
		}
		return ((Hours%int64(12)+int64(12))*int64(60)+Minutes)*int64(60) + Seconds
	}
	return int64(-1) // Should never be reached
}

func sLookupWord(tls *libc.TLS, yylvalPtr uintptr, buff uintptr) int32 { /* tclDate.c:2548:1: */
	var p uintptr
	var q uintptr
	var tp uintptr
	var i int32
	var abbrev int32

	// Make it lowercase.

	XTcl_UtfToLower(tls, buff)

	if libc.Xstrcmp(tls, buff, ts+23418) == 0 || libc.Xstrcmp(tls, buff, ts+23421) == 0 {
		*(*uint32)(unsafe.Pointer(yylvalPtr)) = MERam
		return TMERIDIAN
	}
	if libc.Xstrcmp(tls, buff, ts+23426) == 0 || libc.Xstrcmp(tls, buff, ts+23429) == 0 {
		*(*uint32)(unsafe.Pointer(yylvalPtr)) = MERpm
		return TMERIDIAN
	}

	// See if we have an abbreviation for a month.

	if libc.Xstrlen(tls, buff) == uint64(3) {
		abbrev = 1
	} else if libc.Xstrlen(tls, buff) == uint64(4) && int32(*(*int8)(unsafe.Pointer(buff + 3))) == '.' {
		abbrev = 1
		*(*int8)(unsafe.Pointer(buff + 3)) = int8(0)
	} else {
		abbrev = 0
	}

	for tp = uintptr(unsafe.Pointer(&sMonthDayTable)); (*TABLE)(unsafe.Pointer(tp)).Fname != 0; tp += 24 {
		if abbrev != 0 {
			if libc.Xstrncmp(tls, buff, (*TABLE)(unsafe.Pointer(tp)).Fname, uint64(3)) == 0 {
				*(*Time_t)(unsafe.Pointer(yylvalPtr)) = (*TABLE)(unsafe.Pointer(tp)).Fvalue
				return (*TABLE)(unsafe.Pointer(tp)).Ftype
			}
		} else if libc.Xstrcmp(tls, buff, (*TABLE)(unsafe.Pointer(tp)).Fname) == 0 {
			*(*Time_t)(unsafe.Pointer(yylvalPtr)) = (*TABLE)(unsafe.Pointer(tp)).Fvalue
			return (*TABLE)(unsafe.Pointer(tp)).Ftype
		}
	}

	for tp = uintptr(unsafe.Pointer(&sTimezoneTable)); (*TABLE)(unsafe.Pointer(tp)).Fname != 0; tp += 24 {
		if libc.Xstrcmp(tls, buff, (*TABLE)(unsafe.Pointer(tp)).Fname) == 0 {
			*(*Time_t)(unsafe.Pointer(yylvalPtr)) = (*TABLE)(unsafe.Pointer(tp)).Fvalue
			return (*TABLE)(unsafe.Pointer(tp)).Ftype
		}
	}

	for tp = uintptr(unsafe.Pointer(&sUnitsTable)); (*TABLE)(unsafe.Pointer(tp)).Fname != 0; tp += 24 {
		if libc.Xstrcmp(tls, buff, (*TABLE)(unsafe.Pointer(tp)).Fname) == 0 {
			*(*Time_t)(unsafe.Pointer(yylvalPtr)) = (*TABLE)(unsafe.Pointer(tp)).Fvalue
			return (*TABLE)(unsafe.Pointer(tp)).Ftype
		}
	}

	// Strip off any plural and try the units table again.

	i = int32(libc.Xstrlen(tls, buff) - uint64(1))
	if i > 0 && int32(*(*int8)(unsafe.Pointer(buff + uintptr(i)))) == 's' {
		*(*int8)(unsafe.Pointer(buff + uintptr(i))) = int8(0)
		for tp = uintptr(unsafe.Pointer(&sUnitsTable)); (*TABLE)(unsafe.Pointer(tp)).Fname != 0; tp += 24 {
			if libc.Xstrcmp(tls, buff, (*TABLE)(unsafe.Pointer(tp)).Fname) == 0 {
				*(*Time_t)(unsafe.Pointer(yylvalPtr)) = (*TABLE)(unsafe.Pointer(tp)).Fvalue
				return (*TABLE)(unsafe.Pointer(tp)).Ftype
			}
		}
	}

	for tp = uintptr(unsafe.Pointer(&sOtherTable)); (*TABLE)(unsafe.Pointer(tp)).Fname != 0; tp += 24 {
		if libc.Xstrcmp(tls, buff, (*TABLE)(unsafe.Pointer(tp)).Fname) == 0 {
			*(*Time_t)(unsafe.Pointer(yylvalPtr)) = (*TABLE)(unsafe.Pointer(tp)).Fvalue
			return (*TABLE)(unsafe.Pointer(tp)).Ftype
		}
	}

	// Military timezones.

	if int32(*(*int8)(unsafe.Pointer(buff + 1))) == 0 && !(int32(*(*int8)(unsafe.Pointer(buff)))&0x80 != 0) &&
		libc.Xisalpha(tls, int32(uint8(*(*int8)(unsafe.Pointer(buff))))) != 0 { // INTL: ISO only
		for tp = uintptr(unsafe.Pointer(&sMilitaryTable)); (*TABLE)(unsafe.Pointer(tp)).Fname != 0; tp += 24 {
			if libc.Xstrcmp(tls, buff, (*TABLE)(unsafe.Pointer(tp)).Fname) == 0 {
				*(*Time_t)(unsafe.Pointer(yylvalPtr)) = (*TABLE)(unsafe.Pointer(tp)).Fvalue
				return (*TABLE)(unsafe.Pointer(tp)).Ftype
			}
		}
	}

	// Drop out any periods and try the timezone table again.

	i = 0
	p = libc.AssignUintptr(&q, buff)
	for ; *(*int8)(unsafe.Pointer(q)) != 0; q++ {
		if int32(*(*int8)(unsafe.Pointer(q))) != '.' {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*int8)(unsafe.Pointer(q))
		} else {
			i++
		}
	}
	*(*int8)(unsafe.Pointer(p)) = int8(0)
	if i != 0 {
		for tp = uintptr(unsafe.Pointer(&sTimezoneTable)); (*TABLE)(unsafe.Pointer(tp)).Fname != 0; tp += 24 {
			if libc.Xstrcmp(tls, buff, (*TABLE)(unsafe.Pointer(tp)).Fname) == 0 {
				*(*Time_t)(unsafe.Pointer(yylvalPtr)) = (*TABLE)(unsafe.Pointer(tp)).Fvalue
				return (*TABLE)(unsafe.Pointer(tp)).Ftype
			}
		}
	}

	return TID
}

func sTclDatelex(tls *libc.TLS, yylvalPtr uintptr, location uintptr, info uintptr) int32 { /* tclDate.c:2672:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var c int8
	var p uintptr
	// var buff [20]int8 at bp, 20

	var Count int32

	(*YYLTYPE)(unsafe.Pointer(location)).Ffirst_column = int32((int64((*DateInfo)(unsafe.Pointer(info)).FdateInput) - int64((*DateInfo)(unsafe.Pointer(info)).FdateStart)) / 1)
	for {
		for func() int32 {
			if int32(*(*int8)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(info)).FdateInput))) > 0x20 {
				return 0
			}
			return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(info)).FdateInput))))
		}() != 0 {
			(*DateInfo)(unsafe.Pointer(info)).FdateInput++
		}

		if libc.Xisdigit(tls, int32(uint8(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(info)).FdateInput)))))) != 0 { // INTL: digit
			// Convert the string into a number; count the number of digits.

			Count = 0
			for *(*Time_t)(unsafe.Pointer(yylvalPtr)) = int64(0); libc.Xisdigit(tls, int32(uint8(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&(*DateInfo)(unsafe.Pointer(info)).FdateInput, 1))))))) != 0; { // INTL: digit
				*(*Time_t)(unsafe.Pointer(yylvalPtr)) = int64(10)**(*Time_t)(unsafe.Pointer(yylvalPtr)) + Time_t(c) - int64('0')
				Count++
			}
			(*DateInfo)(unsafe.Pointer(info)).FdateInput--
			(*DateInfo)(unsafe.Pointer(info)).FdateDigitCount = Count

			// A number with 6 or more digits is considered an ISO 8601 base.

			if Count >= 6 {
				(*YYLTYPE)(unsafe.Pointer(location)).Flast_column = int32((int64((*DateInfo)(unsafe.Pointer(info)).FdateInput)-int64((*DateInfo)(unsafe.Pointer(info)).FdateStart))/1 - int64(1))
				return TISOBASE
			} else {
				(*YYLTYPE)(unsafe.Pointer(location)).Flast_column = int32((int64((*DateInfo)(unsafe.Pointer(info)).FdateInput)-int64((*DateInfo)(unsafe.Pointer(info)).FdateStart))/1 - int64(1))
				return TUNUMBER
			}
		}
		if !(int32(c)&0x80 != 0) && libc.Xisalpha(tls, int32(uint8(c))) != 0 { // INTL: ISO only.
			for p = bp; /* &buff[0] */ libc.Xisalpha(tls, int32(uint8(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&(*DateInfo)(unsafe.Pointer(info)).FdateInput, 1))))))) != 0 || // INTL: ISO only.
				int32(c) == '.'; {
				if p < bp+19 {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = c
				}
			}
			*(*int8)(unsafe.Pointer(p)) = int8(0)
			(*DateInfo)(unsafe.Pointer(info)).FdateInput--
			(*YYLTYPE)(unsafe.Pointer(location)).Flast_column = int32((int64((*DateInfo)(unsafe.Pointer(info)).FdateInput)-int64((*DateInfo)(unsafe.Pointer(info)).FdateStart))/1 - int64(1))
			return sLookupWord(tls, yylvalPtr, bp)
		}
		if int32(c) != '(' {
			(*YYLTYPE)(unsafe.Pointer(location)).Flast_column = int32((int64((*DateInfo)(unsafe.Pointer(info)).FdateInput) - int64((*DateInfo)(unsafe.Pointer(info)).FdateStart)) / 1)
			return int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&(*DateInfo)(unsafe.Pointer(info)).FdateInput, 1))))
		}
		Count = 0
		for ok := true; ok; ok = Count > 0 {
			c = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&(*DateInfo)(unsafe.Pointer(info)).FdateInput, 1)))
			if int32(c) == 0 {
				(*YYLTYPE)(unsafe.Pointer(location)).Flast_column = int32((int64((*DateInfo)(unsafe.Pointer(info)).FdateInput)-int64((*DateInfo)(unsafe.Pointer(info)).FdateStart))/1 - int64(1))
				return int32(c)
			} else if int32(c) == '(' {
				Count++
			} else if int32(c) == ')' {
				Count--
			}
		}
	}
	return int32(0)
}

func XTclClockOldscanObjCmd(tls *libc.TLS, dummy uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* tclDate.c:2746:1: */
	bp := tls.Alloc(500)
	defer tls.Free(500)

	var result uintptr
	var resultElement uintptr
	// var yr int32 at bp+488, 4

	// var mo int32 at bp+492, 4

	// var da int32 at bp+496, 4

	// var dateInfo DateInfo at bp+288, 200

	var info uintptr = bp + 288 /* &dateInfo */
	var status int32
	_ = dummy

	if objc != 5 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+23434)
		return TCL_ERROR
	}

	(*DateInfo)(unsafe.Pointer(info)).FdateInput = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	(*DateInfo)(unsafe.Pointer(bp + 288 /* &dateInfo */)).FdateStart = (*DateInfo)(unsafe.Pointer(info)).FdateInput

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveDate = 0
	if XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+488) != TCL_OK ||
		XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+492) != TCL_OK ||
		XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+496) != TCL_OK {
		return TCL_ERROR
	}
	(*DateInfo)(unsafe.Pointer(info)).FdateYear = Time_t(*(*int32)(unsafe.Pointer(bp + 488 /* yr */)))
	(*DateInfo)(unsafe.Pointer(info)).FdateMonth = Time_t(*(*int32)(unsafe.Pointer(bp + 492 /* mo */)))
	(*DateInfo)(unsafe.Pointer(info)).FdateDay = Time_t(*(*int32)(unsafe.Pointer(bp + 496 /* da */)))

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveTime = 0
	(*DateInfo)(unsafe.Pointer(info)).FdateHour = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateMinutes = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateSeconds = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateMeridian = MER24

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveZone = 0
	(*DateInfo)(unsafe.Pointer(info)).FdateTimezone = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateDSTmode = DSTmaybe

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveOrdinalMonth = 0
	(*DateInfo)(unsafe.Pointer(info)).FdateMonthOrdinal = int64(0)

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveDay = 0
	(*DateInfo)(unsafe.Pointer(info)).FdateDayOrdinal = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateDayNumber = int64(0)

	(*DateInfo)(unsafe.Pointer(info)).FdateHaveRel = 0
	(*DateInfo)(unsafe.Pointer(info)).FdateRelMonth = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateRelDay = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateRelSeconds = int64(0)
	(*DateInfo)(unsafe.Pointer(info)).FdateRelPointer = uintptr(0)

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		(*DateInfo)(unsafe.Pointer(bp + 288)).Fmessages = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(bp + 288)).Fmessages)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(bp + 288)).Fmessages)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(bp + 288)).Fmessages)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(bp + 288)).Fmessages)).FtypePtr = uintptr(0)
	{
	}

	(*DateInfo)(unsafe.Pointer(bp + 288 /* &dateInfo */)).Fseparatrix = ts + 2631 /* "" */
	(*Tcl_Obj)(unsafe.Pointer((*DateInfo)(unsafe.Pointer(bp+288)).Fmessages)).FrefCount++

	status = XTclDateparse(tls, bp+288)
	if status == 1 {
		XTcl_SetObjResult(tls, interp, (*DateInfo)(unsafe.Pointer(bp+288 /* &dateInfo */)).Fmessages)
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*DateInfo)(unsafe.Pointer(bp + 288)).Fmessages
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+23475, ts+20666, uintptr(0)))
		return TCL_ERROR
	} else if status == 2 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+22759, -1))
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = (*DateInfo)(unsafe.Pointer(bp + 288)).Fmessages
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+15098, uintptr(0)))
		return TCL_ERROR
	} else if status != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

			ts+23480, -1))
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = (*DateInfo)(unsafe.Pointer(bp + 288)).Fmessages
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+23564, uintptr(0)))
		return TCL_ERROR
	}
	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _objPtr uintptr = (*DateInfo)(unsafe.Pointer(bp + 288)).Fmessages
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveDate > 1 {
		XTcl_SetObjResult(tls, interp,
			XTcl_NewStringObj(tls, ts+23568, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+88, ts+4178, ts+7444, ts+23475, ts+23597, uintptr(0)))
		return TCL_ERROR
	}
	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveTime > 1 {
		XTcl_SetObjResult(tls, interp,
			XTcl_NewStringObj(tls, ts+23606, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+128, ts+4178, ts+7444, ts+23475, ts+23597, uintptr(0)))
		return TCL_ERROR
	}
	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveZone > 1 {
		XTcl_SetObjResult(tls, interp,
			XTcl_NewStringObj(tls, ts+23642, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+168, ts+4178, ts+7444, ts+23475, ts+23597, uintptr(0)))
		return TCL_ERROR
	}
	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveDay > 1 {
		XTcl_SetObjResult(tls, interp,
			XTcl_NewStringObj(tls, ts+23676, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+208, ts+4178, ts+7444, ts+23475, ts+23597, uintptr(0)))
		return TCL_ERROR
	}
	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveOrdinalMonth > 1 {
		XTcl_SetObjResult(tls, interp,
			XTcl_NewStringObj(tls, ts+23708, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+248, ts+4178, ts+7444, ts+23475, ts+23597, uintptr(0)))
		return TCL_ERROR
	}

	for ok5 := true; ok5; ok5 = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		result = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(result)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(result)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(result)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(result)).FtypePtr = uintptr(0)
	{
	}

	for ok6 := true; ok6; ok6 = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultElement = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FtypePtr = uintptr(0)
	{
	}

	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveDate != 0 {
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateYear)))
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateMonth)))
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateDay)))
	}
	XTcl_ListObjAppendElement(tls, interp, result, resultElement)

	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveTime != 0 {
		XTcl_ListObjAppendElement(tls, interp, result, XTcl_NewIntObj(tls, int32(sToSeconds(tls, (*DateInfo)(unsafe.Pointer(info)).FdateHour, (*DateInfo)(unsafe.Pointer(info)).FdateMinutes, (*DateInfo)(unsafe.Pointer(info)).FdateSeconds, (*DateInfo)(unsafe.Pointer(info)).FdateMeridian))))
	} else {
		XTcl_ListObjAppendElement(tls, interp, result, XTcl_NewObj(tls))
	}

	for ok7 := true; ok7; ok7 = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultElement = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FtypePtr = uintptr(0)
	{
	}

	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveZone != 0 {
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32(-(*DateInfo)(unsafe.Pointer(info)).FdateTimezone)))
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, 1-(*DateInfo)(unsafe.Pointer(info)).FdateDSTmode))
	}
	XTcl_ListObjAppendElement(tls, interp, result, resultElement)

	for ok8 := true; ok8; ok8 = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultElement = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FtypePtr = uintptr(0)
	{
	}

	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveRel != 0 {
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateRelMonth)))
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateRelDay)))
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateRelSeconds)))
	}
	XTcl_ListObjAppendElement(tls, interp, result, resultElement)

	for ok9 := true; ok9; ok9 = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultElement = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FtypePtr = uintptr(0)
	{
	}

	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveDay != 0 && !((*DateInfo)(unsafe.Pointer(info)).FdateHaveDate != 0) {
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateDayOrdinal)))
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateDayNumber)))
	}
	XTcl_ListObjAppendElement(tls, interp, result, resultElement)

	for ok10 := true; ok10; ok10 = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultElement = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultElement)).FtypePtr = uintptr(0)
	{
	}

	if (*DateInfo)(unsafe.Pointer(info)).FdateHaveOrdinalMonth != 0 {
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateMonthOrdinal)))
		XTcl_ListObjAppendElement(tls, interp, resultElement,
			XTcl_NewIntObj(tls, int32((*DateInfo)(unsafe.Pointer(info)).FdateMonth)))
	}
	XTcl_ListObjAppendElement(tls, interp, result, resultElement)

	XTcl_SetObjResult(tls, interp, result)
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// tclInt.h --
//
//	Declarations of things used internally by the Tcl interpreter.
//
// Copyright (c) 1987-1993 The Regents of the University of California.
// Copyright (c) 1993-1997 Lucent Technologies.
// Copyright (c) 1994-1998 Sun Microsystems, Inc.
// Copyright (c) 1998-1999 by Scriptics Corporation.
// Copyright (c) 2001, 2002 by Kevin B. Kenny.  All rights reserved.
// Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
// Copyright (c) 2006-2008 by Joe Mistachkin.  All rights reserved.
// Copyright (c) 2008 by Miguel Sofer. All rights reserved.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// Forward declaration.
type Dict1 = struct {
	Ftable          Tcl_HashTable
	FentryChainHead uintptr
	FentryChainTail uintptr
	Fepoch          int32
	F__ccgo_pad1    [4]byte
	FrefCount       Size_t
	Fchain          uintptr
} /* tclDictObj.c:19:1 */

// Table of dict subcommand names and implementations.

var implementationMap = [21]EnsembleImplMap{
	{Fname: ts + 2666, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 23746, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12691, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 23753, Fproc: 0},
	{Fname: ts + 5727, FcompileProc: 0, FnreProc: 0},
	{Fname: ts + 22680, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 3072, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 14096, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 23760, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 3268, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17253, FcompileProc: 0, FnreProc: 0},
	{Fname: ts + 23765, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 23771, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17276, Fproc: 0},
	{Fname: ts + 5888, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12823, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 3965, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 6098, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 23778, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 23785, Fproc: 0, FcompileProc: 0},
	{},
} /* tclDictObj.c:84:30 */

// Internal representation of the entries in the hash table that backs a
// dictionary.

type ChainEntry1 = struct {
	Fentry   Tcl_HashEntry
	FprevPtr uintptr
	FnextPtr uintptr
} /* tclDictObj.c:19:1 */

// Internal representation of the entries in the hash table that backs a
// dictionary.

type ChainEntry = ChainEntry1 /* tclDictObj.c:117:3 */

// Internal representation of a dictionary.
//
// The internal representation of a dictionary object is a hash table (with
// Tcl_Objs for both keys and values), a reference count and epoch number for
// detecting concurrent modifications of the dictionary, and a pointer to the
// parent object (used when invalidating string reps of pathed dictionary
// trees) which is NULL in normal use. The fact that hash tables know (with
// appropriate initialisation) already about objects makes key management /so/
// much easier!
//
// Reference counts are used to enable safe iteration across hashes while
// allowing the type of the containing object to be modified.

type Dict = Dict1 /* tclDictObj.c:149:3 */

// Accessor macro for converting between a Tcl_Obj* and a Dict. Note that this
// must be assignable as well as readable.

// The structure below defines the dictionary object type by means of
// functions that can be invoked by generic object code.

var XtclDictType = Tcl_ObjType{
	Fname:             ts + 23790,
	FfreeIntRepProc:   0, // freeIntRepProc
	FdupIntRepProc:    0, // dupIntRepProc
	FupdateStringProc: 0, // updateStringProc
	FsetFromAnyProc:   0, // setFromAnyProc
} /* tclDictObj.c:163:19 */

// The type of the specially adapted version of the Tcl_Obj*-containing hash
// table defined in the tclObj.c code. This version differs in that it
// allocates a bit more space in each hash entry in order to hold the pointers
// used to keep the hash entries in a linked list.
//
// Note that this type of hash table is *only* suitable for direct use in
// *this* file. Everything else should use the dict iterator API.

var chainHashType = Tcl_HashKeyType{
	Fversion:         TCL_HASH_KEY_TYPE_VERSION,
	FhashKeyProc:     0,
	FcompareKeysProc: 0,
	FallocEntryProc:  0,
	FfreeEntryProc:   0,
} /* tclDictObj.c:181:30 */

// Structure used in implementation of 'dict map' to hold the state that gets
// passed between parts of the implementation.

type DictMapStorage = struct {
	FkeyVarObj      uintptr
	FvalueVarObj    uintptr
	Fsearch         Tcl_DictSearch
	FscriptObj      uintptr
	FaccumulatorObj uintptr
} /* tclDictObj.c:205:3 */

//**** START OF FUNCTIONS IMPLEMENTING DICT CORE API ****

//----------------------------------------------------------------------
//
// AllocChainEntry --
//
//	Allocate space for a Tcl_HashEntry containing the Tcl_Obj * key, and
//	which has a bit of extra space afterwards for storing pointers to the
//	rest of the chain of entries (the extra pointers are left NULL).
//
// Results:
//	The return value is a pointer to the created entry.
//
// Side effects:
//	Increments the reference count on the object.
//
//----------------------------------------------------------------------

func sAllocChainEntry(tls *libc.TLS, tablePtr uintptr, keyPtr uintptr) uintptr { /* tclDictObj.c:227:22: */
	var objPtr uintptr = keyPtr
	var cPtr uintptr

	cPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ChainEntry{})))
	*(*uintptr)(unsafe.Pointer(cPtr + 32)) = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	(*ChainEntry)(unsafe.Pointer(cPtr)).Fentry.FclientData = uintptr(0)
	(*ChainEntry)(unsafe.Pointer(cPtr)).FprevPtr = libc.AssignPtrUintptr(cPtr+48, uintptr(0))

	return cPtr
}

// Helper functions that disguise most of the details relating to how the
// linked list of hash entries is managed. In particular, these manage the
// creation of the table and initializing of the chain, the deletion of the
// table and chain, the adding of an entry to the chain, and the removal of an
// entry from the chain.

func sInitChainTable(tls *libc.TLS, dict uintptr) { /* tclDictObj.c:253:1: */
	XTcl_InitCustomHashTable(tls, dict, -1,
		uintptr(unsafe.Pointer(&chainHashType)))
	(*Dict)(unsafe.Pointer(dict)).FentryChainHead = libc.AssignPtrUintptr(dict+96, uintptr(0))
}

func sDeleteChainTable(tls *libc.TLS, dict uintptr) { /* tclDictObj.c:262:1: */
	var cPtr uintptr

	for cPtr = (*Dict)(unsafe.Pointer(dict)).FentryChainHead; cPtr != uintptr(0); cPtr = (*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr {
		var valuePtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(cPtr)).FclientData

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(valuePtr + 32)) = XtclFreeObjList
					XtclFreeObjList = valuePtr
				}
			} else {
				XTclFreeObj(tls, valuePtr)
			}
		}

	}
	XTcl_DeleteHashTable(tls, dict)
}

func sCreateChainEntry(tls *libc.TLS, dict uintptr, keyPtr uintptr, newPtr uintptr) uintptr { /* tclDictObj.c:275:29: */
	var cPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(dict /* &.table */)).FcreateProc})).f(tls, dict /* &.table */, keyPtr, newPtr)

	// If this is a new entry in the hash table, stitch it into the chain.

	if *(*int32)(unsafe.Pointer(newPtr)) != 0 {
		(*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr = uintptr(0)
		if (*Dict)(unsafe.Pointer(dict)).FentryChainHead == uintptr(0) {
			(*ChainEntry)(unsafe.Pointer(cPtr)).FprevPtr = uintptr(0)
			(*Dict)(unsafe.Pointer(dict)).FentryChainHead = cPtr
			(*Dict)(unsafe.Pointer(dict)).FentryChainTail = cPtr
		} else {
			(*ChainEntry)(unsafe.Pointer(cPtr)).FprevPtr = (*Dict)(unsafe.Pointer(dict)).FentryChainTail
			(*ChainEntry)(unsafe.Pointer((*Dict)(unsafe.Pointer(dict)).FentryChainTail)).FnextPtr = cPtr
			(*Dict)(unsafe.Pointer(dict)).FentryChainTail = cPtr
		}
	}

	return cPtr
}

func sDeleteChainEntry(tls *libc.TLS, dict uintptr, keyPtr uintptr) int32 { /* tclDictObj.c:305:1: */
	var cPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(dict /* &.table */)).FfindProc})).f(tls, dict /* &.table */, keyPtr)

	if cPtr == uintptr(0) {
		return 0
	} else {
		var valuePtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(cPtr)).FclientData

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(valuePtr + 32)) = XtclFreeObjList
					XtclFreeObjList = valuePtr
				}
			} else {
				XTclFreeObj(tls, valuePtr)
			}
		}

	}

	// Unstitch from the chain.

	if (*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr != 0 {
		(*ChainEntry1)(unsafe.Pointer((*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr)).FprevPtr = (*ChainEntry)(unsafe.Pointer(cPtr)).FprevPtr
	} else {
		(*Dict)(unsafe.Pointer(dict)).FentryChainTail = (*ChainEntry)(unsafe.Pointer(cPtr)).FprevPtr
	}
	if (*ChainEntry)(unsafe.Pointer(cPtr)).FprevPtr != 0 {
		(*ChainEntry1)(unsafe.Pointer((*ChainEntry)(unsafe.Pointer(cPtr)).FprevPtr)).FnextPtr = (*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr
	} else {
		(*Dict)(unsafe.Pointer(dict)).FentryChainHead = (*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr
	}

	XTcl_DeleteHashEntry(tls, cPtr)
	return 1
}

//----------------------------------------------------------------------
//
// DupDictInternalRep --
//
//	Initialize the internal representation of a dictionary Tcl_Obj to a
//	copy of the internal representation of an existing dictionary object.
//
// Results:
//	None.
//
// Side effects:
//	"srcPtr"s dictionary internal rep pointer should not be NULL and we
//	assume it is not NULL. We set "copyPtr"s internal rep to a pointer to
//	a newly allocated dictionary rep that, in turn, points to "srcPtr"s
//	key and value objects. Those objects are not actually copied but are
//	shared between "srcPtr" and "copyPtr". The ref count of each key and
//	value object is incremented.
//
//----------------------------------------------------------------------

func sDupDictInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclDictObj.c:362:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var oldDict uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))
	var newDict uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Dict{})))
	var cPtr uintptr

	// Copy values across from the old hash table.

	sInitChainTable(tls, newDict)
	for cPtr = (*Dict)(unsafe.Pointer(oldDict)).FentryChainHead; cPtr != uintptr(0); cPtr = (*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr {
		var key uintptr = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(oldDict)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(oldDict)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(cPtr + 32))
			}
			return cPtr + 32
		}()
		var valuePtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(cPtr)).FclientData
		// var n int32 at bp, 4

		var hPtr uintptr = sCreateChainEntry(tls, newDict, key, bp)

		// Fill in the contents.

		(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = valuePtr
		(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount++
	}

	// Initialise other fields.

	(*Dict)(unsafe.Pointer(newDict)).Fepoch = 0
	(*Dict)(unsafe.Pointer(newDict)).Fchain = uintptr(0)
	(*Dict)(unsafe.Pointer(newDict)).FrefCount = uint64(1)

	// Store in the object.

	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = newDict
	*(*uintptr)(unsafe.Pointer(copyPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDictType))
}

//----------------------------------------------------------------------
//
// FreeDictInternalRep --
//
//	Deallocate the storage associated with a dictionary object's internal
//	representation.
//
// Results:
//	None
//
// Side effects:
//	Frees the memory holding the dictionary's internal hash table unless
//	it is locked by an iteration going over it.
//
//----------------------------------------------------------------------

func sFreeDictInternalRep(tls *libc.TLS, dictPtr uintptr) { /* tclDictObj.c:425:1: */
	var dict uintptr = *(*uintptr)(unsafe.Pointer(dictPtr + 32))

	if libc.PostDecUint64(&(*Dict)(unsafe.Pointer(dict)).FrefCount, 1) <= uint64(1) {
		sDeleteDict(tls, dict)
	}
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DeleteDict --
//
//	Delete the structure that is used to implement a dictionary's internal
//	representation. Called when either the dictionary object loses its
//	internal representation or when the last iteration over the dictionary
//	completes.
//
// Results:
//	None
//
// Side effects:
//	Decrements the reference count of all key and value objects in the
//	dictionary, which may free them.
//
//----------------------------------------------------------------------

func sDeleteDict(tls *libc.TLS, dict uintptr) { /* tclDictObj.c:457:1: */
	sDeleteChainTable(tls, dict)
	XTclpFree(tls, dict)
}

//----------------------------------------------------------------------
//
// UpdateStringOfDict --
//
//	Update the string representation for a dictionary object. Note: This
//	function does not invalidate an existing old string rep so storage
//	will be lost if this has not already been done. This code is based on
//	UpdateStringOfList in tclListObj.c
//
// Results:
//	None.
//
// Side effects:
//	The object's string is set to a valid string that results from the
//	dict-to-string conversion. This string will be empty if the dictionary
//	has no key/value pairs. The dictionary internal representation should
//	not be NULL and we assume it is not NULL.
//
//----------------------------------------------------------------------

func sUpdateStringOfDict(tls *libc.TLS, dictPtr uintptr) { /* tclDictObj.c:487:1: */
	bp := tls.Alloc(92)
	defer tls.Free(92)

	// var localFlags [64]int8 at bp+24, 64

	var flagPtr uintptr = uintptr(0)
	var dict uintptr = *(*uintptr)(unsafe.Pointer(dictPtr + 32))
	var cPtr uintptr
	var keyPtr uintptr
	var valuePtr uintptr
	var i int32
	// var length int32 at bp+88, 4

	var bytesNeeded int32 = 0
	var elem uintptr
	var dst uintptr

	// This field is the most useful one in the whole hash structure, and it
	// is not exposed by any API function...

	var numElems int32 = (*Dict)(unsafe.Pointer(dict)).Ftable.FnumEntries * 2

	// Handle empty list case first, simplifies what follows
	if numElems == 0 {
		(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = 0
		return
	}

	// Pass 1: estimate space, gather flags.

	if numElems <= LOCAL_SIZE {
		flagPtr = bp + 24 /* &localFlags[0] */
	} else {
		flagPtr = XTcl_Alloc(tls, uint32(numElems))
	}
	i = 0
	cPtr = (*Dict)(unsafe.Pointer(dict)).FentryChainHead
__1:
	if !(i < numElems) {
		goto __3
	}
	{
		// Assume that cPtr is never NULL since we know the number of array
		// elements already.

		*(*int8)(unsafe.Pointer(flagPtr + uintptr(i))) = func() int8 {
			if i != 0 {
				return int8(TCL_DONT_QUOTE_HASH)
			}
			return int8(0)
		}()
		keyPtr = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(dict)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(dict)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(cPtr + 32))
			}
			return cPtr + 32
		}()
		elem = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 88)) = (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, keyPtr, bp+88)
		}()
		bytesNeeded = bytesNeeded + XTclScanElement(tls, elem, *(*int32)(unsafe.Pointer(bp + 88)), flagPtr+uintptr(i))
		if bytesNeeded < 0 {
			XTcl_Panic(tls, ts+9934, libc.VaList(bp, 0x7fffffff))
		}

		*(*int8)(unsafe.Pointer(flagPtr + uintptr(i+1))) = int8(TCL_DONT_QUOTE_HASH)
		valuePtr = (*Tcl_HashEntry)(unsafe.Pointer(cPtr)).FclientData
		elem = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 88)) = (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, valuePtr, bp+88)
		}()
		bytesNeeded = bytesNeeded + XTclScanElement(tls, elem, *(*int32)(unsafe.Pointer(bp + 88)), flagPtr+uintptr(i)+uintptr(1))
		if bytesNeeded < 0 {
			XTcl_Panic(tls, ts+9934, libc.VaList(bp+8, 0x7fffffff))
		}

	}
	goto __2
__2:
	i = i + 2
	cPtr = (*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr
	goto __1
	goto __3
__3:
	;
	if bytesNeeded > 0x7fffffff-numElems+1 {
		XTcl_Panic(tls, ts+9934, libc.VaList(bp+16, 0x7fffffff))
	}
	bytesNeeded = bytesNeeded + numElems

	// Pass 2: copy into string rep buffer.

	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = bytesNeeded - 1
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes = XTcl_Alloc(tls, uint32(bytesNeeded))
	dst = (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes
	i = 0
	cPtr = (*Dict)(unsafe.Pointer(dict)).FentryChainHead
__4:
	if !(i < numElems) {
		goto __6
	}
	{
		*(*int8)(unsafe.Pointer(flagPtr + uintptr(i))) |= int8(func() int32 {
			if i != 0 {
				return TCL_DONT_QUOTE_HASH
			}
			return 0
		}())
		keyPtr = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(dict)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(dict)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(cPtr + 32))
			}
			return cPtr + 32
		}()
		elem = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 88)) = (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, keyPtr, bp+88)
		}()
		dst += uintptr(XTclConvertElement(tls, elem, *(*int32)(unsafe.Pointer(bp + 88 /* length */)), dst, int32(*(*int8)(unsafe.Pointer(flagPtr + uintptr(i))))))
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(' ')

		*(*int8)(unsafe.Pointer(flagPtr + uintptr(i+1))) |= int8(TCL_DONT_QUOTE_HASH)
		valuePtr = (*Tcl_HashEntry)(unsafe.Pointer(cPtr)).FclientData
		elem = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 88)) = (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, valuePtr, bp+88)
		}()
		dst += uintptr(XTclConvertElement(tls, elem, *(*int32)(unsafe.Pointer(bp + 88 /* length */)), dst, int32(*(*int8)(unsafe.Pointer(flagPtr + uintptr(i+1))))))
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(' ')

	}
	goto __5
__5:
	i = i + 2
	cPtr = (*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr
	goto __4
	goto __6
__6:
	;
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes + uintptr((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength))) = int8(0)

	if flagPtr != bp+24 {
		XTclpFree(tls, flagPtr)
	}
}

//----------------------------------------------------------------------
//
// SetDictFromAny --
//
//	Convert a non-dictionary object into a dictionary object. This code is
//	very closely related to SetListFromAny in tclListObj.c but does not
//	actually guarantee that a dictionary object will have a string rep (as
//	conversions from lists are handled with a special case.)
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	If the string can be converted, it loses any old internal
//	representation that it had and gains a dictionary's internalRep.
//
//----------------------------------------------------------------------

func sSetDictFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclDictObj.c:597:1: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var hPtr uintptr
	// var isNew int32 at bp+44, 4

	var dict uintptr
	var discardedValue uintptr
	// var objc int32 at bp+40, 4

	var i int32
	// var objv uintptr at bp+32, 8

	var discardedValue1 uintptr
	var keyPtr uintptr
	var valuePtr uintptr
	// var elemStart uintptr at bp+56, 8

	// var elemSize int32 at bp+72, 4

	// var literal int32 at bp+76, 4

	// var length int32 at bp+48, 4

	// var nextElem uintptr at bp+64, 8

	var limit uintptr
	dict = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Dict{})))

	sInitChainTable(tls, dict)

	// Since lists and dictionaries have very closely-related string
	// representations (i.e. the same parsing code) we can safely special-case
	// the conversion from lists to dictionaries.

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType))) {
		goto __1
	}

	// Cannot fail, we already know the Tcl_ObjType is "list".
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 32)) = *(*uintptr)(unsafe.Pointer(objPtr + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 40)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), objPtr, bp+40, bp+32)
	}
	if !(*(*int32)(unsafe.Pointer(bp + 40))&1 != 0) {
		goto __3
	}
	goto missingValue
__3:
	;

	i = 0
__4:
	if !(i < *(*int32)(unsafe.Pointer(bp + 40))) {
		goto __6
	}

	// Store key and value in the hash table we're building.
	hPtr = sCreateChainEntry(tls, dict, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* objv */)) + uintptr(i)*8)), bp+44)
	if !!(*(*int32)(unsafe.Pointer(bp + 44)) != 0) {
		goto __7
	}
	discardedValue = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

	// Not really a well-formed dictionary as there are duplicate
	// keys, so better get the string rep here so that we can
	// convert back.

	XTcl_GetString(tls, objPtr)

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(discardedValue)).FrefCount, 1) > 1) {
		goto __8
	}
	goto __9
__8:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(discardedValue)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(discardedValue)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __10
	}

	if !((*Tcl_Obj)(unsafe.Pointer(discardedValue)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(discardedValue)).Fbytes != XtclEmptyStringRep) {
		goto __12
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(discardedValue)).Fbytes)
__12:
	;
	(*Tcl_Obj)(unsafe.Pointer(discardedValue)).Flength = -1
__13:
	;
	*(*uintptr)(unsafe.Pointer(discardedValue + 32)) = XtclFreeObjList
	XtclFreeObjList = discardedValue
	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;
	goto __11
__10:
	XTclFreeObj(tls, discardedValue)
__11:
	;
__9:
	;

__7:
	;
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)) + uintptr(i+1)*8))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)) + uintptr(i+1)*8)))).FrefCount++ // Since hash now holds ref to it
	goto __5
__5:
	i = i + 2
	goto __4
	goto __6
__6:
	;
	goto __2
__1:
	*(*uintptr)(unsafe.Pointer(bp + 64 /* nextElem */)) = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 48)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+48)
	}()
	limit = *(*uintptr)(unsafe.Pointer(bp + 64)) + uintptr(*(*int32)(unsafe.Pointer(bp + 48)))

__16:
	if !(*(*uintptr)(unsafe.Pointer(bp + 64)) < limit) {
		goto __17
	}

	if !(XTclFindDictElement(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 64)), int32((int64(limit)-int64(*(*uintptr)(unsafe.Pointer(bp + 64))))/1),
		bp+56, bp+64, bp+72, bp+76) != TCL_OK) {
		goto __18
	}
	goto errorInFindDictElement
__18:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == limit) {
		goto __19
	}
	goto __17
__19:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 64)) == limit) {
		goto __20
	}
	goto missingValue
__20:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 76)) != 0) {
		goto __21
	}
__23:
	;
__26:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __29
	}
	XTclAllocateFreeObjects(tls)
__29:
	;
	keyPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __27
__27:
	if 0 != 0 {
		goto __26
	}
	goto __28
__28:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount = 0
	if !(*(*int32)(unsafe.Pointer(bp + 72)) == 0) {
		goto __30
	}
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = 0
	goto __31
__30:
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 72))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes, *(*uintptr)(unsafe.Pointer(bp + 56)), uint64(*(*int32)(unsafe.Pointer(bp + 72))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes + uintptr(*(*int32)(unsafe.Pointer(bp + 72))))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = *(*int32)(unsafe.Pointer(bp + 72))
__31:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr = uintptr(0)

	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
	goto __22
__21:
	// Avoid double copy
	;
__32:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __35
	}
	XTclAllocateFreeObjects(tls)
__35:
	;
	keyPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __33
__33:
	if 0 != 0 {
		goto __32
	}
	goto __34
__34:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 72)))+uint32(1))
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = XTclCopyAndCollapse(tls, *(*int32)(unsafe.Pointer(bp + 72 /* elemSize */)), *(*uintptr)(unsafe.Pointer(bp + 56 /* elemStart */)),
		(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes)
__22:
	;

	if !(XTclFindDictElement(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 64)), int32((int64(limit)-int64(*(*uintptr)(unsafe.Pointer(bp + 64))))/1),
		bp+56, bp+64, bp+72, bp+76) != TCL_OK) {
		goto __36
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount, 1) > 1) {
		goto __37
	}
	goto __38
__37:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __39
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes != XtclEmptyStringRep) {
		goto __41
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes)
__41:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = -1
__42:
	;
	*(*uintptr)(unsafe.Pointer(keyPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = keyPtr
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
	goto __40
__39:
	XTclFreeObj(tls, keyPtr)
__40:
	;
__38:
	;

	goto errorInFindDictElement
__36:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 76)) != 0) {
		goto __45
	}
__47:
	;
__50:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __53
	}
	XTclAllocateFreeObjects(tls)
__53:
	;
	valuePtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __51
__51:
	if 0 != 0 {
		goto __50
	}
	goto __52
__52:
	;
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount = 0
	if !(*(*int32)(unsafe.Pointer(bp + 72)) == 0) {
		goto __54
	}
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength = 0
	goto __55
__54:
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 72))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes, *(*uintptr)(unsafe.Pointer(bp + 56)), uint64(*(*int32)(unsafe.Pointer(bp + 72))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes + uintptr(*(*int32)(unsafe.Pointer(bp + 72))))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength = *(*int32)(unsafe.Pointer(bp + 72))
__55:
	;
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr = uintptr(0)

	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
	goto __46
__45:
	// Avoid double copy
	;
__56:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __59
	}
	XTclAllocateFreeObjects(tls)
__59:
	;
	valuePtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __57
__57:
	if 0 != 0 {
		goto __56
	}
	goto __58
__58:
	;
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 72)))+uint32(1))
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength = XTclCopyAndCollapse(tls, *(*int32)(unsafe.Pointer(bp + 72 /* elemSize */)), *(*uintptr)(unsafe.Pointer(bp + 56 /* elemStart */)),
		(*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes)
__46:
	;

	// Store key and value in the hash table we're building.
	hPtr = sCreateChainEntry(tls, dict, keyPtr, bp+44)
	if !!(*(*int32)(unsafe.Pointer(bp + 44)) != 0) {
		goto __60
	}
	discardedValue1 = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount, 1) > 1) {
		goto __61
	}
	goto __62
__61:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __63
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes != XtclEmptyStringRep) {
		goto __65
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes)
__65:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = -1
__66:
	;
	*(*uintptr)(unsafe.Pointer(keyPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = keyPtr
	goto __67
__67:
	if 0 != 0 {
		goto __66
	}
	goto __68
__68:
	;
	goto __64
__63:
	XTclFreeObj(tls, keyPtr)
__64:
	;
__62:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(discardedValue1)).FrefCount, 1) > 1) {
		goto __69
	}
	goto __70
__69:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(discardedValue1)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(discardedValue1)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __71
	}

	if !((*Tcl_Obj)(unsafe.Pointer(discardedValue1)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(discardedValue1)).Fbytes != XtclEmptyStringRep) {
		goto __73
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(discardedValue1)).Fbytes)
__73:
	;
	(*Tcl_Obj)(unsafe.Pointer(discardedValue1)).Flength = -1
__74:
	;
	*(*uintptr)(unsafe.Pointer(discardedValue1 + 32)) = XtclFreeObjList
	XtclFreeObjList = discardedValue1
	goto __75
__75:
	if 0 != 0 {
		goto __74
	}
	goto __76
__76:
	;
	goto __72
__71:
	XTclFreeObj(tls, discardedValue1)
__72:
	;
__70:
	;

__60:
	;
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = valuePtr
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount++ // since hash now holds ref to it
	goto __16
__17:
	;
__2:
	;

	// Free the old internalRep before setting the new one. We do this as late
	// as possible to allow the conversion code, in particular
	// Tcl_GetStringFromObj, to use that old internalRep.

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __77
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __78
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__78:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__77:
	;

	(*Dict)(unsafe.Pointer(dict)).Fepoch = 0
	(*Dict)(unsafe.Pointer(dict)).Fchain = uintptr(0)
	(*Dict)(unsafe.Pointer(dict)).FrefCount = uint64(1)
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = dict
	*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDictType))
	return TCL_OK

missingValue:
	if !(interp != uintptr(0)) {
		goto __79
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+23795, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+23824, uintptr(0)))
__79:
	;
errorInFindDictElement:
	sDeleteChainTable(tls, dict)
	XTclpFree(tls, dict)
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclTraceDictPath --
//
//	Trace through a tree of dictionaries using the array of keys given. If
//	the flags argument has the DICT_PATH_UPDATE flag is set, a
//	backward-pointing chain of dictionaries is also built (in the Dict's
//	chain field) and the chained dictionaries are made into unshared
//	dictionaries (if they aren't already.)
//
// Results:
//	The object at the end of the path, or NULL if there was an error. Note
//	that this it is an error for an intermediate dictionary on the path to
//	not exist. If the flags argument has the DICT_PATH_EXISTS set, a
//	non-existent path gives a DICT_PATH_NON_EXISTENT result.
//
// Side effects:
//	If the flags argument is zero or DICT_PATH_EXISTS, there are no side
//	effects (other than potential conversion of objects to dictionaries.)
//	If the flags argument is DICT_PATH_UPDATE, the following additional
//	side effects occur. Shared dictionaries along the path are converted
//	into unshared objects, and a backward-pointing chain is built using
//	the chain fields of the dictionaries (for easy invalidation of string
//	representations using InvalidateDictChain). If the flags argument has
//	the DICT_PATH_CREATE bits set (and not the DICT_PATH_EXISTS bit),
//	non-existant keys will be inserted with a value of an empty
//	dictionary, resulting in the path being built.
//
//----------------------------------------------------------------------

func XTclTraceDictPath(tls *libc.TLS, interp uintptr, dictPtr uintptr, keyc int32, keyv uintptr, flags int32) uintptr { /* tclDictObj.c:762:9: */
	bp := tls.Alloc(52)
	defer tls.Free(52)

	var dict uintptr
	var newDict uintptr
	var i int32

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, dictPtr) != TCL_OK {
		return uintptr(0)
	}
	dict = *(*uintptr)(unsafe.Pointer(dictPtr + 32))
	if flags&DICT_PATH_UPDATE != 0 {
		(*Dict)(unsafe.Pointer(dict)).Fchain = uintptr(0)
	}

	for i = 0; i < keyc; i++ {
		var hPtr uintptr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(dict /* &.table */)).FfindProc})).f(tls, dict /* &.table */, *(*uintptr)(unsafe.Pointer(keyv + uintptr(i)*8)))
		var tmpObj uintptr

		if hPtr == uintptr(0) {
			// var isNew int32 at bp+48, 4
			// Dummy

			if flags&DICT_PATH_EXISTS != 0 {
				return uintptr(1)
			}
			if flags&DICT_PATH_CREATE != DICT_PATH_CREATE {
				if interp != uintptr(0) {
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
						ts+23835,
						libc.VaList(bp, func() uintptr {
							if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyv + uintptr(i)*8)))).Fbytes != 0 {
								return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyv + uintptr(i)*8)))).Fbytes
							}
							return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(keyv + uintptr(i)*8)))
						}())))
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+23868,
						func() uintptr {
							if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyv + uintptr(i)*8)))).Fbytes != 0 {
								return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyv + uintptr(i)*8)))).Fbytes
							}
							return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(keyv + uintptr(i)*8)))
						}(), uintptr(0)))
				}
				return uintptr(0)
			}

			// The next line should always set isNew to 1.

			hPtr = sCreateChainEntry(tls, dict, *(*uintptr)(unsafe.Pointer(keyv + uintptr(i)*8)), bp+48)
			tmpObj = XTcl_NewDictObj(tls)
			(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount++
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = tmpObj
		} else {
			tmpObj = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
			if (*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
				sSetDictFromAny(tls, interp, tmpObj) != TCL_OK {
				return uintptr(0)
			}
		}

		newDict = *(*uintptr)(unsafe.Pointer(tmpObj + 32))
		if flags&DICT_PATH_UPDATE != 0 {
			if (*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount > 1 {
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
						for ok := true; ok; ok = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
							XtclFreeObjList = tmpObj
						}
					} else {
						XTclFreeObj(tls, tmpObj)
					}
				}

				tmpObj = XTcl_DuplicateObj(tls, tmpObj)
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount++
				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = tmpObj
				(*Dict)(unsafe.Pointer(dict)).Fepoch++
				newDict = *(*uintptr)(unsafe.Pointer(tmpObj + 32))
			}

			(*Dict)(unsafe.Pointer(newDict)).Fchain = dictPtr
		}
		dict = newDict
		dictPtr = tmpObj
	}
	return dictPtr
}

//----------------------------------------------------------------------
//
// InvalidateDictChain --
//
//	Go through a dictionary chain (built by an updating invokation of
//	TclTraceDictPath) and invalidate the string representations of all the
//	dictionaries on the chain.
//
// Results:
//	None
//
// Side effects:
//	String reps are invalidated and epoch counters (for detecting illegal
//	concurrent modifications) are updated through the chain of updated
//	dictionaries.
//
//----------------------------------------------------------------------

func sInvalidateDictChain(tls *libc.TLS, dictObj uintptr) { /* tclDictObj.c:859:1: */
	var dict uintptr = *(*uintptr)(unsafe.Pointer(dictObj + 32))

	for ok := true; ok; ok = dict != uintptr(0) {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _isobjPtr uintptr = dictObj
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
		(*Dict)(unsafe.Pointer(dict)).Fepoch++
		dictObj = (*Dict)(unsafe.Pointer(dict)).Fchain
		if dictObj == uintptr(0) {
			break
		}
		(*Dict)(unsafe.Pointer(dict)).Fchain = uintptr(0)
		dict = *(*uintptr)(unsafe.Pointer(dictObj + 32))
	}
}

//----------------------------------------------------------------------
//
// Tcl_DictObjPut --
//
//	Add a key,value pair to a dictionary, or update the value for a key if
//	that key already has a mapping in the dictionary.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	The object pointed to by dictPtr is converted to a dictionary if it is
//	not already one, and any string representation that it has is
//	invalidated.
//
//----------------------------------------------------------------------

func XTcl_DictObjPut(tls *libc.TLS, interp uintptr, dictPtr uintptr, keyPtr uintptr, valuePtr uintptr) int32 { /* tclDictObj.c:896:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var dict uintptr
	var hPtr uintptr
	// var isNew int32 at bp+8, 4

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+23873))
	}

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, dictPtr) != TCL_OK {
		return TCL_ERROR
	}

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _isobjPtr uintptr = dictPtr
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
	}
	dict = *(*uintptr)(unsafe.Pointer(dictPtr + 32))
	hPtr = sCreateChainEntry(tls, dict, keyPtr, bp+8)
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount++
	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		var oldValuePtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Flength = -1
				for ok1 := true; ok1; ok1 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(oldValuePtr + 32)) = XtclFreeObjList
					XtclFreeObjList = oldValuePtr
				}
			} else {
				XTclFreeObj(tls, oldValuePtr)
			}
		}

	}
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = valuePtr
	(*Dict)(unsafe.Pointer(dict)).Fepoch++
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_DictObjGet --
//
//	Given a key, get its value from the dictionary (or NULL if key is not
//	found in dictionary.)
//
// Results:
//	A standard Tcl result. The variable pointed to by valuePtrPtr is
//	updated with the value for the key. Note that it is not an error for
//	the key to have no mapping in the dictionary.
//
// Side effects:
//	The object pointed to by dictPtr is converted to a dictionary if it is
//	not already one.
//
//----------------------------------------------------------------------

func XTcl_DictObjGet(tls *libc.TLS, interp uintptr, dictPtr uintptr, keyPtr uintptr, valuePtrPtr uintptr) int32 { /* tclDictObj.c:952:1: */
	var dict uintptr
	var hPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, dictPtr) != TCL_OK {
		*(*uintptr)(unsafe.Pointer(valuePtrPtr)) = uintptr(0)
		return TCL_ERROR
	}

	dict = *(*uintptr)(unsafe.Pointer(dictPtr + 32))
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(dict /* &.table */)).FfindProc})).f(tls, dict /* &.table */, keyPtr)
	if hPtr == uintptr(0) {
		*(*uintptr)(unsafe.Pointer(valuePtrPtr)) = uintptr(0)
	} else {
		*(*uintptr)(unsafe.Pointer(valuePtrPtr)) = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_DictObjRemove --
//
//	Remove the key,value pair with the given key from the dictionary; the
//	key does not need to be present in the dictionary.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	The object pointed to by dictPtr is converted to a dictionary if it is
//	not already one, and any string representation that it has is
//	invalidated.
//
//----------------------------------------------------------------------

func XTcl_DictObjRemove(tls *libc.TLS, interp uintptr, dictPtr uintptr, keyPtr uintptr) int32 { /* tclDictObj.c:997:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var dict uintptr

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+23888))
	}

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, dictPtr) != TCL_OK {
		return TCL_ERROR
	}

	dict = *(*uintptr)(unsafe.Pointer(dictPtr + 32))
	if sDeleteChainEntry(tls, dict, keyPtr) != 0 {
		if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				var _isobjPtr uintptr = dictPtr
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
					if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
				}
			}
		}
		(*Dict)(unsafe.Pointer(dict)).Fepoch++
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_DictObjSize --
//
//	How many key,value pairs are there in the dictionary?
//
// Results:
//	A standard Tcl result. Updates the variable pointed to by sizePtr with
//	the number of key,value pairs in the dictionary.
//
// Side effects:
//	The dictPtr object is converted to a dictionary type if it is not a
//	dictionary already.
//
//----------------------------------------------------------------------

func XTcl_DictObjSize(tls *libc.TLS, interp uintptr, dictPtr uintptr, sizePtr uintptr) int32 { /* tclDictObj.c:1042:1: */
	var dict uintptr

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, dictPtr) != TCL_OK {
		return TCL_ERROR
	}

	dict = *(*uintptr)(unsafe.Pointer(dictPtr + 32))
	*(*int32)(unsafe.Pointer(sizePtr)) = (*Dict)(unsafe.Pointer(dict)).Ftable.FnumEntries
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_DictObjFirst --
//
//	Start a traversal of the dictionary. Caller must supply the search
//	context, pointers for returning key and value, and a pointer to allow
//	indication of whether the dictionary has been traversed (i.e. the
//	dictionary is empty). The order of traversal is undefined.
//
// Results:
//	A standard Tcl result. Updates the variables pointed to by keyPtrPtr,
//	valuePtrPtr and donePtr. Either of keyPtrPtr and valuePtrPtr may be
//	NULL, in which case the key/value is not made available to the caller.
//
// Side effects:
//	The dictPtr object is converted to a dictionary type if it is not a
//	dictionary already. The search context is initialised if the search
//	has not finished. The dictionary's internal rep is Tcl_Preserve()d if
//	the dictionary has at least one element.
//
//----------------------------------------------------------------------

func XTcl_DictObjFirst(tls *libc.TLS, interp uintptr, dictPtr uintptr, searchPtr uintptr, keyPtrPtr uintptr, valuePtrPtr uintptr, donePtr uintptr) int32 { /* tclDictObj.c:1084:1: */
	var dict uintptr
	var cPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, dictPtr) != TCL_OK {
		return TCL_ERROR
	}

	dict = *(*uintptr)(unsafe.Pointer(dictPtr + 32))
	cPtr = (*Dict)(unsafe.Pointer(dict)).FentryChainHead
	if cPtr == uintptr(0) {
		(*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).Fepoch = -1
		*(*int32)(unsafe.Pointer(donePtr)) = 1
	} else {
		*(*int32)(unsafe.Pointer(donePtr)) = 0
		(*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).FdictionaryPtr = dict
		(*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).Fepoch = (*Dict)(unsafe.Pointer(dict)).Fepoch
		(*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).Fnext = (*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr
		(*Dict)(unsafe.Pointer(dict)).FrefCount++
		if keyPtrPtr != uintptr(0) {
			*(*uintptr)(unsafe.Pointer(keyPtrPtr)) = func() uintptr {
				if (*Tcl_HashTable)(unsafe.Pointer(dict)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(dict)).FkeyType == -1 {
					return *(*uintptr)(unsafe.Pointer(cPtr + 32))
				}
				return cPtr + 32
			}()
		}
		if valuePtrPtr != uintptr(0) {
			*(*uintptr)(unsafe.Pointer(valuePtrPtr)) = (*Tcl_HashEntry)(unsafe.Pointer(cPtr)).FclientData
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_DictObjNext --
//
//	Continue a traversal of a dictionary previously started with
//	Tcl_DictObjFirst. This function is safe against concurrent
//	modification of the underlying object (including type shimmering),
//	treating such situations as if the search has terminated, though it is
//	up to the caller to ensure that the object itself is not disposed
//	until the search has finished. It is _not_ safe against modifications
//	from other threads.
//
// Results:
//	Updates the variables pointed to by keyPtrPtr, valuePtrPtr and
//	donePtr. Either of keyPtrPtr and valuePtrPtr may be NULL, in which
//	case the key/value is not made available to the caller.
//
// Side effects:
//	Removes a reference to the dictionary's internal rep if the search
//	terminates.
//
//----------------------------------------------------------------------

func XTcl_DictObjNext(tls *libc.TLS, searchPtr uintptr, keyPtrPtr uintptr, valuePtrPtr uintptr, donePtr uintptr) { /* tclDictObj.c:1153:1: */
	var cPtr uintptr

	// If the searh is done; we do no work.

	if (*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).Fepoch == -1 {
		*(*int32)(unsafe.Pointer(donePtr)) = 1
		return
	}

	// Bail out if the dictionary has had any elements added, modified or
	// removed. This *shouldn't* happen, but...

	if (*Dict)(unsafe.Pointer((*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).FdictionaryPtr)).Fepoch != (*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).Fepoch {
		XTcl_Panic(tls, ts+23906, 0)
	}

	cPtr = (*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).Fnext
	if cPtr == uintptr(0) {
		XTcl_DictObjDone(tls, searchPtr)
		*(*int32)(unsafe.Pointer(donePtr)) = 1
		return
	}

	(*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).Fnext = (*ChainEntry)(unsafe.Pointer(cPtr)).FnextPtr
	*(*int32)(unsafe.Pointer(donePtr)) = 0
	if keyPtrPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(keyPtrPtr)) = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer((*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).FdictionaryPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).FdictionaryPtr)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(cPtr + 32))
			}
			return cPtr + 32
		}()
	}
	if valuePtrPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(valuePtrPtr)) = (*Tcl_HashEntry)(unsafe.Pointer(cPtr)).FclientData
	}
}

//----------------------------------------------------------------------
//
// Tcl_DictObjDone --
//
//	Call this if you want to stop a search before you reach the end of the
//	dictionary (e.g. because of abnormal termination of the search). It
//	need not be used if the search reaches its natural end (i.e. if either
//	Tcl_DictObjFirst or Tcl_DictObjNext sets its donePtr variable to 1).
//
// Results:
//	None.
//
// Side effects:
//	Removes a reference to the dictionary's internal rep.
//
//----------------------------------------------------------------------

func XTcl_DictObjDone(tls *libc.TLS, searchPtr uintptr) { /* tclDictObj.c:1222:1: */
	var dict uintptr

	if (*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).Fepoch != -1 {
		(*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).Fepoch = -1
		dict = (*Tcl_DictSearch)(unsafe.Pointer(searchPtr)).FdictionaryPtr
		if libc.PostDecUint64(&(*Dict)(unsafe.Pointer(dict)).FrefCount, 1) <= uint64(1) {
			sDeleteDict(tls, dict)
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_DictObjPutKeyList --
//
//	Add a key...key,value pair to a dictionary tree. The main dictionary
//	value must not be shared, though sub-dictionaries may be. All
//	intermediate dictionaries on the path must exist.
//
// Results:
//	A standard Tcl result. Note that in the error case, a message is left
//	in interp unless that is NULL.
//
// Side effects:
//	If the dictionary and any of its sub-dictionaries on the path have
//	string representations, these are invalidated.
//
//----------------------------------------------------------------------

func XTcl_DictObjPutKeyList(tls *libc.TLS, interp uintptr, dictPtr uintptr, keyc int32, keyv uintptr, valuePtr uintptr) int32 { /* tclDictObj.c:1257:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var dict uintptr
	var hPtr uintptr
	// var isNew int32 at bp+16, 4

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+23952))
	}
	if keyc < 1 {
		XTcl_Panic(tls, ts+23974, libc.VaList(bp+8, ts+23952))
	}

	dictPtr = XTclTraceDictPath(tls, interp, dictPtr, keyc-1, keyv, DICT_PATH_CREATE)
	if dictPtr == uintptr(0) {
		return TCL_ERROR
	}

	dict = *(*uintptr)(unsafe.Pointer(dictPtr + 32))
	hPtr = sCreateChainEntry(tls, dict, *(*uintptr)(unsafe.Pointer(keyv + uintptr(keyc-1)*8)), bp+16)
	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount++
	if !(*(*int32)(unsafe.Pointer(bp + 16)) != 0) {
		var oldValuePtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(oldValuePtr + 32)) = XtclFreeObjList
					XtclFreeObjList = oldValuePtr
				}
			} else {
				XTclFreeObj(tls, oldValuePtr)
			}
		}

	}
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = valuePtr
	sInvalidateDictChain(tls, dictPtr)

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_DictObjRemoveKeyList --
//
//	Remove a key...key,value pair from a dictionary tree (the value
//	removed is implicit in the key path). The main dictionary value must
//	not be shared, though sub-dictionaries may be. It is not an error if
//	there is no value associated with the given key list, but all
//	intermediate dictionaries on the key path must exist.
//
// Results:
//	A standard Tcl result. Note that in the error case, a message is left
//	in interp unless that is NULL.
//
// Side effects:
//	If the dictionary and any of its sub-dictionaries on the key path have
//	string representations, these are invalidated.
//
//----------------------------------------------------------------------

func XTcl_DictObjRemoveKeyList(tls *libc.TLS, interp uintptr, dictPtr uintptr, keyc int32, keyv uintptr) int32 { /* tclDictObj.c:1317:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var dict uintptr

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+24004))
	}
	if keyc < 1 {
		XTcl_Panic(tls, ts+23974, libc.VaList(bp+8, ts+24004))
	}

	dictPtr = XTclTraceDictPath(tls, interp, dictPtr, keyc-1, keyv, DICT_PATH_UPDATE)
	if dictPtr == uintptr(0) {
		return TCL_ERROR
	}

	dict = *(*uintptr)(unsafe.Pointer(dictPtr + 32))
	sDeleteChainEntry(tls, dict, *(*uintptr)(unsafe.Pointer(keyv + uintptr(keyc-1)*8)))
	sInvalidateDictChain(tls, dictPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_NewDictObj --
//
//	This function is normally called when not debugging: i.e., when
//	TCL_MEM_DEBUG is not defined. It creates a new dict object without any
//	content.
//
//	When TCL_MEM_DEBUG is defined, this function just returns the result
//	of calling the debugging version Tcl_DbNewDictObj.
//
// Results:
//	A new dict object is returned; it has no keys defined in it. The new
//	object's string representation is left NULL, and the ref count of the
//	object is 0.
//
// Side Effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_NewDictObj(tls *libc.TLS) uintptr { /* tclDictObj.c:1366:9: */
	var dictPtr uintptr
	var dict uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		dictPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr = uintptr(0)
	{
	}

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _isobjPtr uintptr = dictPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	dict = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Dict{})))
	sInitChainTable(tls, dict)
	(*Dict)(unsafe.Pointer(dict)).Fepoch = 0
	(*Dict)(unsafe.Pointer(dict)).Fchain = uintptr(0)
	(*Dict)(unsafe.Pointer(dict)).FrefCount = uint64(1)
	*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = dict
	*(*uintptr)(unsafe.Pointer(dictPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDictType))
	return dictPtr
}

//----------------------------------------------------------------------
//
// Tcl_DbNewDictObj --
//
//	This function is normally called when debugging: i.e., when
//	TCL_MEM_DEBUG is defined. It creates new dict objects. It is the same
//	as the Tcl_NewDictObj function above except that it calls
//	Tcl_DbCkalloc directly with the file name and line number from its
//	caller. This simplifies debugging since then the [memory active]
//	command will report the correct file name and line number when
//	reporting objects that haven't been freed.
//
//	When TCL_MEM_DEBUG is not defined, this function just returns the
//	result of calling Tcl_NewDictObj.
//
// Results:
//	A new dict object is returned; it has no keys defined in it. The new
//	object's string representation is left NULL, and the ref count of the
//	object is 0.
//
// Side Effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_DbNewDictObj(tls *libc.TLS, file uintptr, line int32) uintptr { /* tclDictObj.c:1417:9: */
	return XTcl_NewDictObj(tls)
}

//**** START OF FUNCTIONS IMPLEMENTING TCL COMMANDS ****

//----------------------------------------------------------------------
//
// DictCreateCmd --
//
//	This function implements the "dict create" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictCreateCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:1463:1: */
	var dictObj uintptr
	var i int32

	// Must have an even number of arguments; note that number of preceding
	// arguments (i.e. "dict create" is also even, which makes this much
	// easier.)

	if objc&1 == 0 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24029)
		return TCL_ERROR
	}

	dictObj = XTcl_NewDictObj(tls)
	for i = 1; i < objc; i = i + 2 {
		// The next command is assumed to never fail...
		XTcl_DictObjPut(tls, uintptr(0), dictObj, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))
	}
	XTcl_SetObjResult(tls, interp, dictObj)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictGetCmd --
//
//	This function implements the "dict get" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictGetCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:1513:1: */
	bp := tls.Alloc(92)
	defer tls.Free(92)

	var dictPtr uintptr
	*(*uintptr)(unsafe.Pointer(bp + 80 /* valuePtr */)) = uintptr(0)
	var result int32

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24045)
		return TCL_ERROR
	}

	// Test for the special case of no keys, which returns a *list* of all
	// key,value pairs. We produce a copy here because that makes subsequent
	// list handling more efficient.

	if objc == 2 {
		*(*uintptr)(unsafe.Pointer(bp + 72 /* keyPtr */)) = uintptr(0)
		var listPtr uintptr
		// var search Tcl_DictSearch at bp+48, 24

		// var done int32 at bp+88, 4

		result = XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48,
			bp+72, bp+80, bp+88)
		if result != TCL_OK {
			return result
		}
		listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
		for !(*(*int32)(unsafe.Pointer(bp + 88)) != 0) {
			// Assume these won't fail as we have complete control over the
			// types of things here.

			XTcl_ListObjAppendElement(tls, interp, listPtr, *(*uintptr)(unsafe.Pointer(bp + 72 /* keyPtr */)))
			XTcl_ListObjAppendElement(tls, interp, listPtr, *(*uintptr)(unsafe.Pointer(bp + 80 /* valuePtr */)))

			XTcl_DictObjNext(tls, bp+48, bp+72, bp+80, bp+88)
		}
		XTcl_SetObjResult(tls, interp, listPtr)
		return TCL_OK
	}

	// Loop through the list of keys, looking up the key at the current index
	// in the current dictionary each time. Once we've done the lookup, we set
	// the current dictionary to be the value we looked up (in case the value
	// was not the last one and we are going through a chain of searches.)
	// Note that this loop always executes at least once.

	dictPtr = XTclTraceDictPath(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), objc-3, objv+uintptr(2)*8, DICT_PATH_READ)
	if dictPtr == uintptr(0) {
		return TCL_ERROR
	}
	result = XTcl_DictObjGet(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), bp+80)
	if result != TCL_OK {
		return result
	}
	if *(*uintptr)(unsafe.Pointer(bp + 80)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+23835,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+23868,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 80 /* valuePtr */)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictReplaceCmd --
//
//	This function implements the "dict replace" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictReplaceCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:1606:1: */
	var dictPtr uintptr
	var i int32

	if objc < 2 || objc&1 != 0 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24066)
		return TCL_ERROR
	}

	dictPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, dictPtr) != TCL_OK {
		return TCL_ERROR
	}
	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		dictPtr = XTcl_DuplicateObj(tls, dictPtr)
	}
	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _isobjPtr uintptr = dictPtr
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
	}
	for i = 2; i < objc; i = i + 2 {
		XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))
	}
	XTcl_SetObjResult(tls, interp, dictPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictRemoveCmd --
//
//	This function implements the "dict remove" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictRemoveCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:1657:1: */
	var dictPtr uintptr
	var i int32

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24045)
		return TCL_ERROR
	}

	dictPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, dictPtr) != TCL_OK {
		return TCL_ERROR
	}
	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		dictPtr = XTcl_DuplicateObj(tls, dictPtr)
	}
	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _isobjPtr uintptr = dictPtr
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
	}
	for i = 2; i < objc; i++ {
		XTcl_DictObjRemove(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}
	XTcl_SetObjResult(tls, interp, dictPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictMergeCmd --
//
//	This function implements the "dict merge" Tcl command. See the user
//	documentation for details on what it does, and TIP#163 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictMergeCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:1708:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var targetObj uintptr
	*(*uintptr)(unsafe.Pointer(bp + 24 /* keyObj */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 32 /* valueObj */)) = uintptr(0)
	var allocatedDict int32 = 0
	var i int32
	// var done int32 at bp+40, 4

	// var search Tcl_DictSearch at bp, 24

	if objc == 1 {
		// No dictionary arguments; return default (empty value).

		return TCL_OK
	}

	// Make sure first argument is a dictionary.

	targetObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if (*Tcl_Obj)(unsafe.Pointer(targetObj)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, targetObj) != TCL_OK {
		return TCL_ERROR
	}

	if objc == 2 {
		// Single argument, return it.

		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		return TCL_OK
	}

	// Normal behaviour: combining two (or more) dictionaries.

	if (*Tcl_Obj)(unsafe.Pointer(targetObj)).FrefCount > 1 {
		targetObj = XTcl_DuplicateObj(tls, targetObj)
		allocatedDict = 1
	}
	for i = 2; i < objc; i++ {
		if XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp, bp+24, bp+32,
			bp+40) != TCL_OK {
			if allocatedDict != 0 {
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(targetObj)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(targetObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(targetObj)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(targetObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(targetObj)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(targetObj)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(targetObj)).Flength = -1
						for ok := true; ok; ok = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(targetObj + 32)) = XtclFreeObjList
							XtclFreeObjList = targetObj
						}
					} else {
						XTclFreeObj(tls, targetObj)
					}
				}

			}
			return TCL_ERROR
		}
		for !(*(*int32)(unsafe.Pointer(bp + 40)) != 0) {
			// Next line can't fail; already know we have a dictionary in
			// targetObj.

			XTcl_DictObjPut(tls, uintptr(0), targetObj, *(*uintptr)(unsafe.Pointer(bp + 24 /* keyObj */)), *(*uintptr)(unsafe.Pointer(bp + 32 /* valueObj */)))
			XTcl_DictObjNext(tls, bp, bp+24, bp+32, bp+40)
		}
		XTcl_DictObjDone(tls, bp)
	}
	XTcl_SetObjResult(tls, interp, targetObj)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictKeysCmd --
//
//	This function implements the "dict keys" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictKeysCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:1796:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var listPtr uintptr
	var pattern uintptr = uintptr(0)

	if objc != 2 && objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24093)
		return TCL_ERROR
	}

	// A direct check that we have a dictionary. We don't start the iteration
	// yet because that might allocate memory or set locks that we do not
	// need. [Bug 1705778, leak K04]

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) != TCL_OK {
		return TCL_ERROR
	}

	if objc == 3 {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}()
	}
	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	if pattern != uintptr(0) && libc.Xstrpbrk(tls, pattern, ts+14153) == uintptr(0) {
		*(*uintptr)(unsafe.Pointer(bp /* valuePtr */)) = uintptr(0)

		XTcl_DictObjGet(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp)
		if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
			XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}
	} else {
		// var search Tcl_DictSearch at bp+8, 24

		*(*uintptr)(unsafe.Pointer(bp + 32 /* keyPtr */)) = uintptr(0)
		*(*int32)(unsafe.Pointer(bp + 40 /* done */)) = 0

		// At this point, we know we have a dictionary (or at least something
		// that can be represented; it could theoretically have shimmered away
		// when the pattern was fetched, but that shouldn't be damaging) so we
		// can start the iteration process without checking for failures.

		XTcl_DictObjFirst(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8, bp+32, uintptr(0), bp+40)
		for ; !(*(*int32)(unsafe.Pointer(bp + 40)) != 0); XTcl_DictObjNext(tls, bp+8, bp+32, uintptr(0), bp+40) {
			if !(pattern != 0) || XTcl_StringMatch(tls, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 32)))
			}(), pattern) != 0 {
				XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, *(*uintptr)(unsafe.Pointer(bp + 32 /* keyPtr */)))
			}
		}
		XTcl_DictObjDone(tls, bp+8)
	}

	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictValuesCmd --
//
//	This function implements the "dict values" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictValuesCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:1876:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	*(*uintptr)(unsafe.Pointer(bp + 24 /* valuePtr */)) = uintptr(0)
	var listPtr uintptr
	// var search Tcl_DictSearch at bp, 24

	// var done int32 at bp+32, 4

	var pattern uintptr

	if objc != 2 && objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24093)
		return TCL_ERROR
	}

	if XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, uintptr(0), bp+24,
		bp+32) != TCL_OK {
		return TCL_ERROR
	}
	if objc == 3 {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}()
	} else {
		pattern = uintptr(0)
	}
	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	for ; !(*(*int32)(unsafe.Pointer(bp + 32)) != 0); XTcl_DictObjNext(tls, bp, uintptr(0), bp+24, bp+32) {
		if pattern == uintptr(0) || XTcl_StringMatch(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 24)))
		}(), pattern) != 0 {
			// Assume this operation always succeeds.

			XTcl_ListObjAppendElement(tls, interp, listPtr, *(*uintptr)(unsafe.Pointer(bp + 24 /* valuePtr */)))
		}
	}
	XTcl_DictObjDone(tls, bp)

	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictSizeCmd --
//
//	This function implements the "dict size" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictSizeCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:1936:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var result int32
	// var size int32 at bp, 4

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24114)
		return TCL_ERROR
	}
	result = XTcl_DictObjSize(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	if result == TCL_OK {
		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp /* size */))))
	}
	return result
}

//----------------------------------------------------------------------
//
// DictExistsCmd --
//
//	This function implements the "dict exists" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictExistsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:1974:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var dictPtr uintptr
	// var valuePtr uintptr at bp, 8

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24125)
		return TCL_ERROR
	}

	dictPtr = XTclTraceDictPath(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), objc-3, objv+uintptr(2)*8,
		DICT_PATH_EXISTS)
	if dictPtr == uintptr(0) || dictPtr == uintptr(1) ||
		XTcl_DictObjGet(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)),
			bp) != TCL_OK {
		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(0 != 0)))
	} else {
		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(libc.Bool32(*(*uintptr)(unsafe.Pointer(bp)) != uintptr(0)) != 0)))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictInfoCmd --
//
//	This function implements the "dict info" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictInfoCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:2018:1: */
	var dictPtr uintptr
	var dict uintptr
	var statsStr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24114)
		return TCL_ERROR
	}

	dictPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclDictType)) &&
		sSetDictFromAny(tls, interp, dictPtr) != TCL_OK {
		return TCL_ERROR
	}
	dict = *(*uintptr)(unsafe.Pointer(dictPtr + 32))

	statsStr = XTcl_HashStats(tls, dict)
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, statsStr, -1))
	XTclpFree(tls, statsStr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictIncrCmd --
//
//	This function implements the "dict incr" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictIncrCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:2065:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var code int32 = TCL_OK
	var dictPtr uintptr
	*(*uintptr)(unsafe.Pointer(bp /* valuePtr */)) = uintptr(0)

	if objc < 3 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24150)
		return TCL_ERROR
	}

	dictPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), 0)
	if dictPtr == uintptr(0) {
		// Variable didn't yet exist. Create new dictionary value.

		dictPtr = XTcl_NewDictObj(tls)
	} else if XTcl_DictObjGet(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp) != TCL_OK {
		// Variable contents are not a dict, report error.

		return TCL_ERROR
	}
	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		// A little internals surgery to avoid copying a string rep that will
		// soon be no good.

		var saved uintptr = (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes
		var oldPtr uintptr = dictPtr

		(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes = uintptr(0)
		dictPtr = XTcl_DuplicateObj(tls, dictPtr)
		(*Tcl_Obj)(unsafe.Pointer(oldPtr)).Fbytes = saved
	}
	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
		// Key not in dictionary. Create new key with increment as value.

		if objc == 4 {
			// Verify increment is an integer.

			// var increment Mp_int at bp+8, 24

			code = XTcl_GetBignumFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+8)
			if code != TCL_OK {
				XTcl_AddErrorInfo(tls, interp, ts+24178)
			} else {
				// Remember to dispose with the bignum as we're not actually
				// using it directly. [Bug 2874678]

				XTclBN_mp_clear(tls, bp+8)
				XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*uintptr)(unsafe.Pointer(objv + 3*8)))
			}
		} else {
			XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), XTcl_NewIntObj(tls, 1))
		}
	} else {
		// Key in dictionary. Increment its value with minimum dup.

		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount > 1 {
			*(*uintptr)(unsafe.Pointer(bp /* valuePtr */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)))
			XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)))
		}
		if objc == 4 {
			code = XTclIncrObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)), *(*uintptr)(unsafe.Pointer(objv + 3*8)))
		} else {
			var incrPtr uintptr

			for ok := true; ok; ok = 0 != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					incrPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount = 0
				(*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes = uintptr(0)
				*(*int32)(unsafe.Pointer(incrPtr + 32)) = 1
				(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
				{
				}
			}
			(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount++
			code = XTclIncrObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)), incrPtr)
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(incrPtr)).Flength = -1
					for ok2 := true; ok2; ok2 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(incrPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = incrPtr
					}
				} else {
					XTclFreeObj(tls, incrPtr)
				}
			}

		}
	}
	if code == TCL_OK {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _isobjPtr uintptr = dictPtr
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
		*(*uintptr)(unsafe.Pointer(bp /* valuePtr */)) = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0),
			dictPtr, TCL_LEAVE_ERR_MSG)
		if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
			code = TCL_ERROR
		} else {
			XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)))
		}
	} else if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount == 0 {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
				for ok4 := true; ok4; ok4 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = dictPtr
				}
			} else {
				XTclFreeObj(tls, dictPtr)
			}
		}

	}
	return code
}

//----------------------------------------------------------------------
//
// DictLappendCmd --
//
//	This function implements the "dict lappend" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictLappendCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:2187:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var dictPtr uintptr
	// var valuePtr uintptr at bp, 8

	var resultPtr uintptr
	var i int32
	var allocatedDict int32 = 0
	var allocatedValue int32 = 0

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24203)
		return TCL_ERROR
	}

	dictPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), 0)
	if dictPtr == uintptr(0) {
		allocatedDict = 1
		dictPtr = XTcl_NewDictObj(tls)
	} else if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		allocatedDict = 1
		dictPtr = XTcl_DuplicateObj(tls, dictPtr)
	}

	if XTcl_DictObjGet(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp) != TCL_OK {
		if allocatedDict != 0 {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = dictPtr
					}
				} else {
					XTclFreeObj(tls, dictPtr)
				}
			}

		}
		return TCL_ERROR
	}

	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
		*(*uintptr)(unsafe.Pointer(bp /* valuePtr */)) = XTcl_NewListObj(tls, objc-3, objv+uintptr(3)*8)
		allocatedValue = 1
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount > 1 {
			allocatedValue = 1
			*(*uintptr)(unsafe.Pointer(bp /* valuePtr */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)))
		}

		for i = 3; i < objc; i++ {
			if XTcl_ListObjAppendElement(tls, interp, *(*uintptr)(unsafe.Pointer(bp)),
				*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) != TCL_OK {
				if allocatedValue != 0 {
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount, 1) > 1 {
					} else {
						if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr)).FfreeIntRepProc) != 0) {
							{
							}
							if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != XtclEmptyStringRep {
								XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes)
							}
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Flength = -1
							for ok1 := true; ok1; ok1 = 0 != 0 {
								*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32)) = XtclFreeObjList
								XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp))
							}
						} else {
							XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)))
						}
					}

				}
				if allocatedDict != 0 {
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
					} else {
						if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
							{
							}
							if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
								XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
							}
							(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
							for ok2 := true; ok2; ok2 = 0 != 0 {
								*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
								XtclFreeObjList = dictPtr
							}
						} else {
							XTclFreeObj(tls, dictPtr)
						}
					}

				}
				return TCL_ERROR
			}
		}
	}

	if allocatedValue != 0 {
		XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)))
	} else if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != uintptr(0) {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _isobjPtr uintptr = dictPtr
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
	}

	resultPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), dictPtr,
		TCL_LEAVE_ERR_MSG)
	if resultPtr == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictAppendCmd --
//
//	This function implements the "dict append" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictAppendCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:2274:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var dictPtr uintptr
	// var valuePtr uintptr at bp, 8

	var resultPtr uintptr
	var i int32
	var allocatedDict int32 = 0

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24203)
		return TCL_ERROR
	}

	dictPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), 0)
	if dictPtr == uintptr(0) {
		allocatedDict = 1
		dictPtr = XTcl_NewDictObj(tls)
	} else if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		allocatedDict = 1
		dictPtr = XTcl_DuplicateObj(tls, dictPtr)
	}

	if XTcl_DictObjGet(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp) != TCL_OK {
		if allocatedDict != 0 {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = dictPtr
					}
				} else {
					XTclFreeObj(tls, dictPtr)
				}
			}

		}
		return TCL_ERROR
	}

	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(bp)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr = uintptr(0)
		{
		}

	} else if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount > 1 {
		*(*uintptr)(unsafe.Pointer(bp /* valuePtr */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)))
	}

	for i = 3; i < objc; i++ {
		XTcl_AppendObjToObj(tls, *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)), *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}

	XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*uintptr)(unsafe.Pointer(bp /* valuePtr */)))

	resultPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), dictPtr,
		TCL_LEAVE_ERR_MSG)
	if resultPtr == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictForNRCmd --
//
//	These functions implement the "dict for" Tcl command.  See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictForNRCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:2344:1: */
	bp := tls.Alloc(76)
	defer tls.Free(76)

	var iPtr uintptr
	var scriptObj uintptr
	var keyVarObj uintptr
	var valueVarObj uintptr
	// var varv uintptr at bp+40, 8

	// var keyObj uintptr at bp+56, 8

	// var valueObj uintptr at bp+64, 8

	var searchPtr uintptr
	// var varc int32 at bp+48, 4

	// var done int32 at bp+72, 4

	var _objPtr uintptr
	var _callbackPtr uintptr
	iPtr = interp

	if !(objc != 4) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+24231)
	return TCL_ERROR
__1:
	;

	// Parse arguments.

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 48)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48, bp+40)
	}() != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 48)) != 2) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+24275, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+24312, ts+23790, ts+5727, uintptr(0)))
	return TCL_ERROR
__3:
	;
	searchPtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_DictSearch{})))
	if !(XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), searchPtr, bp+56, bp+64,
		bp+72) != TCL_OK) {
		goto __4
	}
	XTclStackFree(tls, interp, searchPtr)
	return TCL_ERROR
__4:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 72)) != 0) {
		goto __5
	}
	XTclStackFree(tls, interp, searchPtr)
	return TCL_OK
__5:
	;
	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 48)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48, bp+40)
	}
	keyVarObj = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* varv */))))
	valueVarObj = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* varv */)) + 1*8))
	scriptObj = *(*uintptr)(unsafe.Pointer(objv + 3*8))

	// Make sure that these objects (which we need throughout the body of the
	// loop) don't vanish. Note that the dictionary internal rep is locked
	// internally so that updates, shimmering, etc are not a problem.

	(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(scriptObj)).FrefCount++

	// Stop the value from getting hit in any way by any traces on the key
	// variable.

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount++
	if !(XTcl_ObjSetVar2(tls, interp, keyVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 56)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __6
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount, 1) > 1) {
		goto __7
	}
	goto __8
__7:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __9
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != XtclEmptyStringRep) {
		goto __11
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes)
__11:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Flength = -1
__12:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 64))
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	;
	goto __10
__9:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* valueObj */)))
__10:
	;
__8:
	;

	goto error
__6:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount, 1) > 1) {
		goto __15
	}
	goto __16
__15:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __17
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != XtclEmptyStringRep) {
		goto __19
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes)
__19:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Flength = -1
__20:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 64))
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	goto __18
__17:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* valueObj */)))
__18:
	;
__16:
	;

	if !(XTcl_ObjSetVar2(tls, interp, valueVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 64)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __23
	}
	goto error
__23:
	;

	// Run the script.

__24:
__27:
	;
__30:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __33
	}
	XTclAllocateFreeObjects(tls)
__33:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __31
__31:
	if 0 != 0 {
		goto __30
	}
	goto __32
__32:
	;
	_callbackPtr = _objPtr
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sDictForLoopCallback}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = searchPtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = keyVarObj
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = valueVarObj
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = scriptObj
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	return XTclNREvalObjEx(tls, interp, scriptObj, 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, 3)

	// For unwinding everything on error.

error:
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FrefCount, 1) > 1) {
		goto __34
	}
	goto __35
__34:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __36
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __38
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes)
__38:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Flength = -1
__39:
	;
	*(*uintptr)(unsafe.Pointer(keyVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = keyVarObj
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
	goto __37
__36:
	XTclFreeObj(tls, keyVarObj)
__37:
	;
__35:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FrefCount, 1) > 1) {
		goto __42
	}
	goto __43
__42:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __44
	}

	if !((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __46
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes)
__46:
	;
	(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Flength = -1
__47:
	;
	*(*uintptr)(unsafe.Pointer(valueVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = valueVarObj
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
	goto __45
__44:
	XTclFreeObj(tls, valueVarObj)
__45:
	;
__43:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(scriptObj)).FrefCount, 1) > 1) {
		goto __50
	}
	goto __51
__50:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __52
	}

	if !((*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != XtclEmptyStringRep) {
		goto __54
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes)
__54:
	;
	(*Tcl_Obj)(unsafe.Pointer(scriptObj)).Flength = -1
__55:
	;
	*(*uintptr)(unsafe.Pointer(scriptObj + 32)) = XtclFreeObjList
	XtclFreeObjList = scriptObj
	goto __56
__56:
	if 0 != 0 {
		goto __55
	}
	goto __57
__57:
	;
	goto __53
__52:
	XTclFreeObj(tls, scriptObj)
__53:
	;
__51:
	;

	XTcl_DictObjDone(tls, searchPtr)
	XTclStackFree(tls, interp, searchPtr)
	return TCL_ERROR
}

func sDictForLoopCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclDictObj.c:2439:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var iPtr uintptr
	var searchPtr uintptr
	var keyVarObj uintptr
	var valueVarObj uintptr
	var scriptObj uintptr
	// var keyObj uintptr at bp+8, 8

	// var valueObj uintptr at bp+16, 8

	// var done int32 at bp+24, 4

	var _objPtr uintptr
	var _callbackPtr uintptr
	iPtr = interp
	searchPtr = *(*ClientData)(unsafe.Pointer(data))
	keyVarObj = *(*ClientData)(unsafe.Pointer(data + 1*8))
	valueVarObj = *(*ClientData)(unsafe.Pointer(data + 2*8))
	scriptObj = *(*ClientData)(unsafe.Pointer(data + 3*8))

	// Process the result from the previous execution of the script body.

	if !(result == TCL_CONTINUE) {
		goto __1
	}
	result = TCL_OK
	goto __2
__1:
	if !(result != TCL_OK) {
		goto __3
	}
	if !(result == TCL_BREAK) {
		goto __4
	}
	XTcl_ResetResult(tls, interp)
	result = TCL_OK
	goto __5
__4:
	if !(result == TCL_ERROR) {
		goto __6
	}
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+24319,
		libc.VaList(bp, XTcl_GetErrorLine(tls, interp))))
__6:
	;
__5:
	;
	goto done
__3:
	;
__2:
	;

	// Get the next mapping from the dictionary.

	XTcl_DictObjNext(tls, searchPtr, bp+8, bp+16, bp+24)
	if !(*(*int32)(unsafe.Pointer(bp + 24)) != 0) {
		goto __7
	}
	XTcl_ResetResult(tls, interp)
	goto done
__7:
	;

	// Stop the value from getting hit in any way by any traces on the key
	// variable.

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount++
	if !(XTcl_ObjSetVar2(tls, interp, keyVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 8)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __8
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount, 1) > 1) {
		goto __9
	}
	goto __10
__9:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __11
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != XtclEmptyStringRep) {
		goto __13
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes)
__13:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Flength = -1
__14:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 16))
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto __12
__11:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* valueObj */)))
__12:
	;
__10:
	;

	result = TCL_ERROR
	goto done
__8:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount, 1) > 1) {
		goto __17
	}
	goto __18
__17:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __19
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != XtclEmptyStringRep) {
		goto __21
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes)
__21:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Flength = -1
__22:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 16))
	goto __23
__23:
	if 0 != 0 {
		goto __22
	}
	goto __24
__24:
	;
	goto __20
__19:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* valueObj */)))
__20:
	;
__18:
	;

	if !(XTcl_ObjSetVar2(tls, interp, valueVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 16)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __25
	}
	result = TCL_ERROR
	goto done
__25:
	;

	// Run the script.

__26:
__29:
	;
__32:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __35
	}
	XTclAllocateFreeObjects(tls)
__35:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __33
__33:
	if 0 != 0 {
		goto __32
	}
	goto __34
__34:
	;
	_callbackPtr = _objPtr
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sDictForLoopCallback}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = searchPtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = keyVarObj
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = valueVarObj
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = scriptObj
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __27
__27:
	if 0 != 0 {
		goto __26
	}
	goto __28
__28:
	;
	return XTclNREvalObjEx(tls, interp, scriptObj, 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, 3)

	// For unwinding everything once the iterating is done.

done:
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FrefCount, 1) > 1) {
		goto __36
	}
	goto __37
__36:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __38
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __40
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes)
__40:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Flength = -1
__41:
	;
	*(*uintptr)(unsafe.Pointer(keyVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = keyVarObj
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
	goto __39
__38:
	XTclFreeObj(tls, keyVarObj)
__39:
	;
__37:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FrefCount, 1) > 1) {
		goto __44
	}
	goto __45
__44:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __46
	}

	if !((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __48
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes)
__48:
	;
	(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Flength = -1
__49:
	;
	*(*uintptr)(unsafe.Pointer(valueVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = valueVarObj
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
	goto __47
__46:
	XTclFreeObj(tls, valueVarObj)
__47:
	;
__45:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(scriptObj)).FrefCount, 1) > 1) {
		goto __52
	}
	goto __53
__52:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __54
	}

	if !((*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != XtclEmptyStringRep) {
		goto __56
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes)
__56:
	;
	(*Tcl_Obj)(unsafe.Pointer(scriptObj)).Flength = -1
__57:
	;
	*(*uintptr)(unsafe.Pointer(scriptObj + 32)) = XtclFreeObjList
	XtclFreeObjList = scriptObj
	goto __58
__58:
	if 0 != 0 {
		goto __57
	}
	goto __59
__59:
	;
	goto __55
__54:
	XTclFreeObj(tls, scriptObj)
__55:
	;
__53:
	;

	XTcl_DictObjDone(tls, searchPtr)
	XTclStackFree(tls, interp, searchPtr)
	return result
}

//----------------------------------------------------------------------
//
// DictMapNRCmd --
//
//	These functions implement the "dict map" Tcl command.  See the user
//	documentation for details on what it does, and TIP#405 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictMapNRCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:2539:1: */
	bp := tls.Alloc(76)
	defer tls.Free(76)

	var iPtr uintptr
	// var varv uintptr at bp+40, 8

	// var keyObj uintptr at bp+56, 8

	// var valueObj uintptr at bp+64, 8

	var storagePtr uintptr
	// var varc int32 at bp+48, 4

	// var done int32 at bp+72, 4

	var _objPtr uintptr
	var _callbackPtr uintptr
	iPtr = interp

	if !(objc != 4) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+24231)
	return TCL_ERROR
__1:
	;

	// Parse arguments.

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 48)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48, bp+40)
	}() != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 48)) != 2) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+24275, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+24312, ts+23790, ts+17253, uintptr(0)))
	return TCL_ERROR
__3:
	;
	storagePtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(DictMapStorage{})))
	if !(XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), storagePtr+16, bp+56,
		bp+64, bp+72) != TCL_OK) {
		goto __4
	}
	XTclStackFree(tls, interp, storagePtr)
	return TCL_ERROR
__4:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 72)) != 0) {
		goto __5
	}
	// Note that this exit leaves an empty value in the result (due to
	// command calling conventions) but that is OK since an empty value is
	// an empty dictionary.

	XTclStackFree(tls, interp, storagePtr)
	return TCL_OK
__5:
	;
__6:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __9
	}
	XTclAllocateFreeObjects(tls)
__9:
	;
	(*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __7
__7:
	if 0 != 0 {
		goto __6
	}
	goto __8
__8:
	;
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).FtypePtr = uintptr(0)

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 48)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+48, bp+40)
	}
	(*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* varv */))))
	(*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* varv */)) + 1*8))
	(*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj = *(*uintptr)(unsafe.Pointer(objv + 3*8))

	// Make sure that these objects (which we need throughout the body of the
	// loop) don't vanish. Note that the dictionary internal rep is locked
	// internally so that updates, shimmering, etc are not a problem.

	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).FrefCount++

	// Stop the value from getting hit in any way by any traces on the key
	// variable.

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount++
	if !(XTcl_ObjSetVar2(tls, interp, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 56)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __10
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount, 1) > 1) {
		goto __11
	}
	goto __12
__11:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __13
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != XtclEmptyStringRep) {
		goto __15
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes)
__15:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Flength = -1
__16:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 64))
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	goto __14
__13:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* valueObj */)))
__14:
	;
__12:
	;

	goto error
__10:
	;
	if !(XTcl_ObjSetVar2(tls, interp, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 64)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __19
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount, 1) > 1) {
		goto __20
	}
	goto __21
__20:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __22
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != XtclEmptyStringRep) {
		goto __24
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes)
__24:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Flength = -1
__25:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 64))
	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	goto __23
__22:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* valueObj */)))
__23:
	;
__21:
	;

	goto error
__19:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount, 1) > 1) {
		goto __28
	}
	goto __29
__28:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __30
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != XtclEmptyStringRep) {
		goto __32
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes)
__32:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Flength = -1
__33:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 64))
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
	goto __31
__30:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* valueObj */)))
__31:
	;
__29:
	;

	// Run the script.

__36:
__39:
	;
__42:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __45
	}
	XTclAllocateFreeObjects(tls)
__45:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
	_callbackPtr = _objPtr
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sDictMapLoopCallback}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = storagePtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __37
__37:
	if 0 != 0 {
		goto __36
	}
	goto __38
__38:
	;
	return XTclNREvalObjEx(tls, interp, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj, 0,
		(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, 3)

	// For unwinding everything on error.

error:
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).FrefCount, 1) > 1) {
		goto __46
	}
	goto __47
__46:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __48
	}

	if !((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __50
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).Fbytes)
__50:
	;
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).Flength = -1
__51:
	;
	*(*uintptr)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = (*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj
	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
	goto __49
__48:
	XTclFreeObj(tls, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)
__49:
	;
__47:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).FrefCount, 1) > 1) {
		goto __54
	}
	goto __55
__54:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __56
	}

	if !((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __58
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).Fbytes)
__58:
	;
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).Flength = -1
__59:
	;
	*(*uintptr)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = (*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj
	goto __60
__60:
	if 0 != 0 {
		goto __59
	}
	goto __61
__61:
	;
	goto __57
__56:
	XTclFreeObj(tls, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)
__57:
	;
__55:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).FrefCount, 1) > 1) {
		goto __62
	}
	goto __63
__62:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __64
	}

	if !((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).Fbytes != XtclEmptyStringRep) {
		goto __66
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).Fbytes)
__66:
	;
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).Flength = -1
__67:
	;
	*(*uintptr)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj + 32)) = XtclFreeObjList
	XtclFreeObjList = (*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
	goto __65
__64:
	XTclFreeObj(tls, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)
__65:
	;
__63:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).FrefCount, 1) > 1) {
		goto __70
	}
	goto __71
__70:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __72
	}

	if !((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Fbytes != XtclEmptyStringRep) {
		goto __74
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Fbytes)
__74:
	;
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Flength = -1
__75:
	;
	*(*uintptr)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj + 32)) = XtclFreeObjList
	XtclFreeObjList = (*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj
	goto __76
__76:
	if 0 != 0 {
		goto __75
	}
	goto __77
__77:
	;
	goto __73
__72:
	XTclFreeObj(tls, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)
__73:
	;
__71:
	;

	XTcl_DictObjDone(tls, storagePtr+16)
	XTclStackFree(tls, interp, storagePtr)
	return TCL_ERROR
}

func sDictMapLoopCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclDictObj.c:2643:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var iPtr uintptr
	var storagePtr uintptr
	// var keyObj uintptr at bp+8, 8

	// var valueObj uintptr at bp+16, 8

	// var done int32 at bp+24, 4

	var _objPtr uintptr
	var _callbackPtr uintptr
	iPtr = interp
	storagePtr = *(*ClientData)(unsafe.Pointer(data))

	// Process the result from the previous execution of the script body.

	if !(result == TCL_CONTINUE) {
		goto __1
	}
	result = TCL_OK
	goto __2
__1:
	if !(result != TCL_OK) {
		goto __3
	}
	if !(result == TCL_BREAK) {
		goto __5
	}
	XTcl_ResetResult(tls, interp)
	result = TCL_OK
	goto __6
__5:
	if !(result == TCL_ERROR) {
		goto __7
	}
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+24350,
		libc.VaList(bp, XTcl_GetErrorLine(tls, interp))))
__7:
	;
__6:
	;
	goto done
	goto __4
__3:
	*(*uintptr)(unsafe.Pointer(bp + 8 /* keyObj */)) = XTcl_ObjGetVar2(tls, interp, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj, uintptr(0),
		TCL_LEAVE_ERR_MSG)
	if !(*(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0)) {
		goto __8
	}
	result = TCL_ERROR
	goto done
__8:
	;
	XTcl_DictObjPut(tls, uintptr(0), (*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj, *(*uintptr)(unsafe.Pointer(bp + 8 /* keyObj */)),
		XTcl_GetObjResult(tls, interp))
__4:
	;
__2:
	;

	// Get the next mapping from the dictionary.

	XTcl_DictObjNext(tls, storagePtr+16, bp+8, bp+16, bp+24)
	if !(*(*int32)(unsafe.Pointer(bp + 24)) != 0) {
		goto __9
	}
	XTcl_SetObjResult(tls, interp, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)
	goto done
__9:
	;

	// Stop the value from getting hit in any way by any traces on the key
	// variable.

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount++
	if !(XTcl_ObjSetVar2(tls, interp, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 8)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __10
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount, 1) > 1) {
		goto __11
	}
	goto __12
__11:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __13
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != XtclEmptyStringRep) {
		goto __15
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes)
__15:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Flength = -1
__16:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 16))
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	goto __14
__13:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* valueObj */)))
__14:
	;
__12:
	;

	result = TCL_ERROR
	goto done
__10:
	;
	if !(XTcl_ObjSetVar2(tls, interp, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 16)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __19
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount, 1) > 1) {
		goto __20
	}
	goto __21
__20:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __22
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != XtclEmptyStringRep) {
		goto __24
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes)
__24:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Flength = -1
__25:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 16))
	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	goto __23
__22:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* valueObj */)))
__23:
	;
__21:
	;

	result = TCL_ERROR
	goto done
__19:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount, 1) > 1) {
		goto __28
	}
	goto __29
__28:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __30
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != XtclEmptyStringRep) {
		goto __32
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes)
__32:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Flength = -1
__33:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 16))
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
	goto __31
__30:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* valueObj */)))
__31:
	;
__29:
	;

	// Run the script.

__36:
__39:
	;
__42:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __45
	}
	XTclAllocateFreeObjects(tls)
__45:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
	_callbackPtr = _objPtr
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sDictMapLoopCallback}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = storagePtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __37
__37:
	if 0 != 0 {
		goto __36
	}
	goto __38
__38:
	;
	return XTclNREvalObjEx(tls, interp, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj, 0,
		(*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, 3)

	// For unwinding everything once the iterating is done.

done:
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).FrefCount, 1) > 1) {
		goto __46
	}
	goto __47
__46:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __48
	}

	if !((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __50
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).Fbytes)
__50:
	;
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)).Flength = -1
__51:
	;
	*(*uintptr)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = (*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj
	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
	goto __49
__48:
	XTclFreeObj(tls, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FkeyVarObj)
__49:
	;
__47:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).FrefCount, 1) > 1) {
		goto __54
	}
	goto __55
__54:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __56
	}

	if !((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __58
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).Fbytes)
__58:
	;
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)).Flength = -1
__59:
	;
	*(*uintptr)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = (*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj
	goto __60
__60:
	if 0 != 0 {
		goto __59
	}
	goto __61
__61:
	;
	goto __57
__56:
	XTclFreeObj(tls, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FvalueVarObj)
__57:
	;
__55:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).FrefCount, 1) > 1) {
		goto __62
	}
	goto __63
__62:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __64
	}

	if !((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).Fbytes != XtclEmptyStringRep) {
		goto __66
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).Fbytes)
__66:
	;
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)).Flength = -1
__67:
	;
	*(*uintptr)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj + 32)) = XtclFreeObjList
	XtclFreeObjList = (*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
	goto __65
__64:
	XTclFreeObj(tls, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FscriptObj)
__65:
	;
__63:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).FrefCount, 1) > 1) {
		goto __70
	}
	goto __71
__70:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __72
	}

	if !((*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Fbytes != XtclEmptyStringRep) {
		goto __74
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Fbytes)
__74:
	;
	(*Tcl_Obj)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)).Flength = -1
__75:
	;
	*(*uintptr)(unsafe.Pointer((*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj + 32)) = XtclFreeObjList
	XtclFreeObjList = (*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj
	goto __76
__76:
	if 0 != 0 {
		goto __75
	}
	goto __77
__77:
	;
	goto __73
__72:
	XTclFreeObj(tls, (*DictMapStorage)(unsafe.Pointer(storagePtr)).FaccumulatorObj)
__73:
	;
__71:
	;

	XTcl_DictObjDone(tls, storagePtr+16)
	XTclStackFree(tls, interp, storagePtr)
	return result
}

//----------------------------------------------------------------------
//
// DictSetCmd --
//
//	This function implements the "dict set" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictSetCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:2751:1: */
	var dictPtr uintptr
	var resultPtr uintptr
	var result int32
	var allocatedDict int32 = 0

	if objc < 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24381)
		return TCL_ERROR
	}

	dictPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), 0)
	if dictPtr == uintptr(0) {
		allocatedDict = 1
		dictPtr = XTcl_NewDictObj(tls)
	} else if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		allocatedDict = 1
		dictPtr = XTcl_DuplicateObj(tls, dictPtr)
	}

	result = XTcl_DictObjPutKeyList(tls, interp, dictPtr, objc-3, objv+uintptr(2)*8,
		*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
	if result != TCL_OK {
		if allocatedDict != 0 {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = dictPtr
					}
				} else {
					XTclFreeObj(tls, dictPtr)
				}
			}

		}
		return TCL_ERROR
	}

	resultPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), dictPtr,
		TCL_LEAVE_ERR_MSG)
	if resultPtr == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictUnsetCmd --
//
//	This function implements the "dict unset" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictUnsetCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:2811:1: */
	var dictPtr uintptr
	var resultPtr uintptr
	var result int32
	var allocatedDict int32 = 0

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24413)
		return TCL_ERROR
	}

	dictPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), 0)
	if dictPtr == uintptr(0) {
		allocatedDict = 1
		dictPtr = XTcl_NewDictObj(tls)
	} else if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		allocatedDict = 1
		dictPtr = XTcl_DuplicateObj(tls, dictPtr)
	}

	result = XTcl_DictObjRemoveKeyList(tls, interp, dictPtr, objc-2, objv+uintptr(2)*8)
	if result != TCL_OK {
		if allocatedDict != 0 {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = dictPtr
					}
				} else {
					XTclFreeObj(tls, dictPtr)
				}
			}

		}
		return TCL_ERROR
	}

	resultPtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), dictPtr,
		TCL_LEAVE_ERR_MSG)
	if resultPtr == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DictFilterCmd --
//
//	This function implements the "dict filter" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictFilterCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:2870:1: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	var iPtr uintptr
	var scriptObj uintptr
	var keyVarObj uintptr
	var valueVarObj uintptr
	// var varv uintptr at bp+104, 8

	// var keyObj uintptr at bp+80, 8

	// var valueObj uintptr at bp+88, 8

	var resultObj uintptr
	var boolObj uintptr
	// var search Tcl_DictSearch at bp+56, 24

	// var index int32 at bp+48, 4

	// var varc int32 at bp+112, 4

	// var done int32 at bp+96, 4

	var result int32
	// var satisfied int32 at bp+116, 4

	var pattern uintptr
	var i int32
	var i1 int32
	iPtr = interp
	*(*uintptr)(unsafe.Pointer(bp + 80 /* keyObj */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 88 /* valueObj */)) = uintptr(0)

	if !(objc < 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24439)
	return TCL_ERROR
__1:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&filters)), int32(unsafe.Sizeof(uintptr(0))), ts+24471, 0, bp+48) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	switch uint32(*(*int32)(unsafe.Pointer(bp + 48 /* index */))) {
	case uint32(0) /* FILTER_KEYS */ :
		goto __4

	case uint32(2) /* FILTER_VALUES */ :
		goto __5

	case uint32(1) /* FILTER_SCRIPT */ :
		goto __6
	}
	goto __3
__4:
	// Create a dictionary whose keys all match a certain pattern.

	if !(XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+56,
		bp+80, bp+88, bp+96) != TCL_OK) {
		goto __7
	}
	return TCL_ERROR
__7:
	;
	if !(objc == 3) {
		goto __8
	}
	// Nothing to match, so return nothing (== empty dictionary).

	XTcl_DictObjDone(tls, bp+56)
	return TCL_OK
	goto __9
__8:
	if !(objc == 4) {
		goto __10
	}
	pattern = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}()
	resultObj = XTcl_NewDictObj(tls)
	if !(libc.Xstrpbrk(tls, pattern, ts+14153) == uintptr(0)) {
		goto __12
	}
	// Must release the search lock here to prevent a memory leak
	// since we are not exhausing the search. [Bug 1705778, leak
	// K05]

	XTcl_DictObjDone(tls, bp+56)
	XTcl_DictObjGet(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+88)
	if !(*(*uintptr)(unsafe.Pointer(bp + 88)) != uintptr(0)) {
		goto __14
	}
	XTcl_DictObjPut(tls, uintptr(0), resultObj, *(*uintptr)(unsafe.Pointer(objv + 3*8)), *(*uintptr)(unsafe.Pointer(bp + 88 /* valueObj */)))
__14:
	;
	goto __13
__12:
__15:
	if !!(*(*int32)(unsafe.Pointer(bp + 96)) != 0) {
		goto __16
	}
	if !(XTcl_StringMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 80)))
	}(), pattern) != 0) {
		goto __17
	}
	XTcl_DictObjPut(tls, uintptr(0), resultObj, *(*uintptr)(unsafe.Pointer(bp + 80 /* keyObj */)), *(*uintptr)(unsafe.Pointer(bp + 88 /* valueObj */)))
__17:
	;
	XTcl_DictObjNext(tls, bp+56, bp+80, bp+88, bp+96)
	goto __15
__16:
	;
__13:
	;
	goto __11
__10:
	// Can't optimize this match for trivial globbing: would disturb
	// order.

	resultObj = XTcl_NewDictObj(tls)
__18:
	if !!(*(*int32)(unsafe.Pointer(bp + 96)) != 0) {
		goto __19
	}

	i = 3
__20:
	if !(i < objc) {
		goto __22
	}
	pattern = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}()
	if !(XTcl_StringMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 80)))
	}(), pattern) != 0) {
		goto __23
	}
	XTcl_DictObjPut(tls, uintptr(0), resultObj, *(*uintptr)(unsafe.Pointer(bp + 80 /* keyObj */)), *(*uintptr)(unsafe.Pointer(bp + 88 /* valueObj */)))
	goto __22 // stop inner loop
__23:
	;
	goto __21
__21:
	i++
	goto __20
	goto __22
__22:
	;
	XTcl_DictObjNext(tls, bp+56, bp+80, bp+88, bp+96)
	goto __18
__19:
	;
__11:
	;
__9:
	;
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK

__5:
	// Create a dictionary whose values all match a certain pattern.

	if !(XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+56,
		bp+80, bp+88, bp+96) != TCL_OK) {
		goto __24
	}
	return TCL_ERROR
__24:
	;
	resultObj = XTcl_NewDictObj(tls)
__25:
	if !!(*(*int32)(unsafe.Pointer(bp + 96)) != 0) {
		goto __26
	}

	i1 = 3
__27:
	if !(i1 < objc) {
		goto __29
	}
	pattern = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i1)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i1)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i1)*8)))
	}()
	if !(XTcl_StringMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 88)))
	}(), pattern) != 0) {
		goto __30
	}
	XTcl_DictObjPut(tls, uintptr(0), resultObj, *(*uintptr)(unsafe.Pointer(bp + 80 /* keyObj */)), *(*uintptr)(unsafe.Pointer(bp + 88 /* valueObj */)))
	goto __29 // stop inner loop
__30:
	;
	goto __28
__28:
	i1++
	goto __27
	goto __29
__29:
	;
	XTcl_DictObjNext(tls, bp+56, bp+80, bp+88, bp+96)
	goto __25
__26:
	;
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK

__6:
	if !(objc != 5) {
		goto __31
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+24482)
	return TCL_ERROR
__31:
	;

	// Create a dictionary whose key,value pairs all satisfy a script
	// (i.e. get a true boolean result from its evaluation). Massive
	// copying from the "dict for" implementation has occurred!

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 104)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 112)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+112, bp+104)
	}() != TCL_OK) {
		goto __32
	}
	return TCL_ERROR
__32:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 112)) != 2) {
		goto __33
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+24275, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+24312, ts+23790, ts+23753, uintptr(0)))
	return TCL_ERROR
__33:
	;
	keyVarObj = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* varv */))))
	valueVarObj = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* varv */)) + 1*8))
	scriptObj = *(*uintptr)(unsafe.Pointer(objv + 4*8))

	// Make sure that these objects (which we need throughout the body of
	// the loop) don't vanish. Note that the dictionary internal rep is
	// locked internally so that updates, shimmering, etc are not a
	// problem.

	(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(scriptObj)).FrefCount++

	result = XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)),
		bp+56, bp+80, bp+88, bp+96)
	if !(result != TCL_OK) {
		goto __34
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FrefCount, 1) > 1) {
		goto __35
	}
	goto __36
__35:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __37
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __39
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes)
__39:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Flength = -1
__40:
	;
	*(*uintptr)(unsafe.Pointer(keyVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = keyVarObj
	goto __41
__41:
	if 0 != 0 {
		goto __40
	}
	goto __42
__42:
	;
	goto __38
__37:
	XTclFreeObj(tls, keyVarObj)
__38:
	;
__36:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FrefCount, 1) > 1) {
		goto __43
	}
	goto __44
__43:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __45
	}

	if !((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __47
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes)
__47:
	;
	(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Flength = -1
__48:
	;
	*(*uintptr)(unsafe.Pointer(valueVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = valueVarObj
	goto __49
__49:
	if 0 != 0 {
		goto __48
	}
	goto __50
__50:
	;
	goto __46
__45:
	XTclFreeObj(tls, valueVarObj)
__46:
	;
__44:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(scriptObj)).FrefCount, 1) > 1) {
		goto __51
	}
	goto __52
__51:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __53
	}

	if !((*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != XtclEmptyStringRep) {
		goto __55
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes)
__55:
	;
	(*Tcl_Obj)(unsafe.Pointer(scriptObj)).Flength = -1
__56:
	;
	*(*uintptr)(unsafe.Pointer(scriptObj + 32)) = XtclFreeObjList
	XtclFreeObjList = scriptObj
	goto __57
__57:
	if 0 != 0 {
		goto __56
	}
	goto __58
__58:
	;
	goto __54
__53:
	XTclFreeObj(tls, scriptObj)
__54:
	;
__52:
	;

	return TCL_ERROR
__34:
	;

	resultObj = XTcl_NewDictObj(tls)

__59:
	if !!(*(*int32)(unsafe.Pointer(bp + 96)) != 0) {
		goto __60
	}
	// Stop the value from getting hit in any way by any traces on the
	// key variable.

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FrefCount++
	if !(XTcl_ObjSetVar2(tls, interp, keyVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 80)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __61
	}
	XTcl_AddErrorInfo(tls, interp,
		ts+24539)
	result = TCL_ERROR
	goto abnormalResult
__61:
	;
	if !(XTcl_ObjSetVar2(tls, interp, valueVarObj, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 88)),
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __62
	}
	XTcl_AddErrorInfo(tls, interp,
		ts+24587)
	result = TCL_ERROR
	goto abnormalResult
__62:
	;

	// TIP #280. Make invoking context available to loop body.

	result = XTclEvalObjEx(tls, interp, scriptObj, 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, 4)
	switch result {
	case TCL_OK:
		goto __64
	case TCL_BREAK:
		goto __65
	// FALLTHRU
	case TCL_CONTINUE:
		goto __66
	case TCL_ERROR:
		goto __67
	default:
		goto __68
	}
	goto __63
__64:
	boolObj = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount++
	XTcl_ResetResult(tls, interp)
	if !(XTcl_GetBooleanFromObj(tls, interp, boolObj,
		bp+116) != TCL_OK) {
		goto __69
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount, 1) > 1) {
		goto __70
	}
	goto __71
__70:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __72
	}

	if !((*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != XtclEmptyStringRep) {
		goto __74
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes)
__74:
	;
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = -1
__75:
	;
	*(*uintptr)(unsafe.Pointer(boolObj + 32)) = XtclFreeObjList
	XtclFreeObjList = boolObj
	goto __76
__76:
	if 0 != 0 {
		goto __75
	}
	goto __77
__77:
	;
	goto __73
__72:
	XTclFreeObj(tls, boolObj)
__73:
	;
__71:
	;

	result = TCL_ERROR
	goto abnormalResult
__69:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(boolObj)).FrefCount, 1) > 1) {
		goto __78
	}
	goto __79
__78:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(boolObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __80
	}

	if !((*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes != XtclEmptyStringRep) {
		goto __82
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(boolObj)).Fbytes)
__82:
	;
	(*Tcl_Obj)(unsafe.Pointer(boolObj)).Flength = -1
__83:
	;
	*(*uintptr)(unsafe.Pointer(boolObj + 32)) = XtclFreeObjList
	XtclFreeObjList = boolObj
	goto __84
__84:
	if 0 != 0 {
		goto __83
	}
	goto __85
__85:
	;
	goto __81
__80:
	XTclFreeObj(tls, boolObj)
__81:
	;
__79:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 116)) != 0) {
		goto __86
	}
	XTcl_DictObjPut(tls, uintptr(0), resultObj, *(*uintptr)(unsafe.Pointer(bp + 80 /* keyObj */)), *(*uintptr)(unsafe.Pointer(bp + 88 /* valueObj */)))
__86:
	;
	goto __63
__65:
	// Force loop termination by calling Tcl_DictObjDone; this
	// makes the next Tcl_DictObjNext say there is nothing more to
	// do.

	XTcl_ResetResult(tls, interp)
	XTcl_DictObjDone(tls, bp+56)
	// FALLTHRU
__66:
	result = TCL_OK
	goto __63
__67:
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+24637,
		libc.VaList(bp+40, XTcl_GetErrorLine(tls, interp))))
__68:
	goto abnormalResult
__63:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).FrefCount, 1) > 1) {
		goto __87
	}
	goto __88
__87:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __89
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes != XtclEmptyStringRep) {
		goto __91
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes)
__91:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Flength = -1
__92:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 80))
	goto __93
__93:
	if 0 != 0 {
		goto __92
	}
	goto __94
__94:
	;
	goto __90
__89:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* keyObj */)))
__90:
	;
__88:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FrefCount, 1) > 1) {
		goto __95
	}
	goto __96
__95:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __97
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes != XtclEmptyStringRep) {
		goto __99
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes)
__99:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Flength = -1
__100:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 88))
	goto __101
__101:
	if 0 != 0 {
		goto __100
	}
	goto __102
__102:
	;
	goto __98
__97:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* valueObj */)))
__98:
	;
__96:
	;

	XTcl_DictObjNext(tls, bp+56, bp+80, bp+88, bp+96)
	goto __59
__60:
	;

	// Stop holding a reference to these objects.

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FrefCount, 1) > 1) {
		goto __103
	}
	goto __104
__103:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __105
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __107
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes)
__107:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Flength = -1
__108:
	;
	*(*uintptr)(unsafe.Pointer(keyVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = keyVarObj
	goto __109
__109:
	if 0 != 0 {
		goto __108
	}
	goto __110
__110:
	;
	goto __106
__105:
	XTclFreeObj(tls, keyVarObj)
__106:
	;
__104:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FrefCount, 1) > 1) {
		goto __111
	}
	goto __112
__111:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __113
	}

	if !((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __115
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes)
__115:
	;
	(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Flength = -1
__116:
	;
	*(*uintptr)(unsafe.Pointer(valueVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = valueVarObj
	goto __117
__117:
	if 0 != 0 {
		goto __116
	}
	goto __118
__118:
	;
	goto __114
__113:
	XTclFreeObj(tls, valueVarObj)
__114:
	;
__112:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(scriptObj)).FrefCount, 1) > 1) {
		goto __119
	}
	goto __120
__119:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __121
	}

	if !((*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != XtclEmptyStringRep) {
		goto __123
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes)
__123:
	;
	(*Tcl_Obj)(unsafe.Pointer(scriptObj)).Flength = -1
__124:
	;
	*(*uintptr)(unsafe.Pointer(scriptObj + 32)) = XtclFreeObjList
	XtclFreeObjList = scriptObj
	goto __125
__125:
	if 0 != 0 {
		goto __124
	}
	goto __126
__126:
	;
	goto __122
__121:
	XTclFreeObj(tls, scriptObj)
__122:
	;
__120:
	;

	XTcl_DictObjDone(tls, bp+56)

	if !(result == TCL_OK) {
		goto __127
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	goto __128
__127:
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount, 1) > 1) {
		goto __129
	}
	goto __130
__129:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __131
	}

	if !((*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != XtclEmptyStringRep) {
		goto __133
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes)
__133:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = -1
__134:
	;
	*(*uintptr)(unsafe.Pointer(resultObj + 32)) = XtclFreeObjList
	XtclFreeObjList = resultObj
	goto __135
__135:
	if 0 != 0 {
		goto __134
	}
	goto __136
__136:
	;
	goto __132
__131:
	XTclFreeObj(tls, resultObj)
__132:
	;
__130:
	;

__128:
	;
	return result

abnormalResult:
	XTcl_DictObjDone(tls, bp+56)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).FrefCount, 1) > 1) {
		goto __137
	}
	goto __138
__137:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __139
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes != XtclEmptyStringRep) {
		goto __141
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Fbytes)
__141:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))).Flength = -1
__142:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 80))
	goto __143
__143:
	if 0 != 0 {
		goto __142
	}
	goto __144
__144:
	;
	goto __140
__139:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* keyObj */)))
__140:
	;
__138:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FrefCount, 1) > 1) {
		goto __145
	}
	goto __146
__145:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __147
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes != XtclEmptyStringRep) {
		goto __149
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes)
__149:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Flength = -1
__150:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 88))
	goto __151
__151:
	if 0 != 0 {
		goto __150
	}
	goto __152
__152:
	;
	goto __148
__147:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* valueObj */)))
__148:
	;
__146:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FrefCount, 1) > 1) {
		goto __153
	}
	goto __154
__153:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __155
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __157
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Fbytes)
__157:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyVarObj)).Flength = -1
__158:
	;
	*(*uintptr)(unsafe.Pointer(keyVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = keyVarObj
	goto __159
__159:
	if 0 != 0 {
		goto __158
	}
	goto __160
__160:
	;
	goto __156
__155:
	XTclFreeObj(tls, keyVarObj)
__156:
	;
__154:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FrefCount, 1) > 1) {
		goto __161
	}
	goto __162
__161:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __163
	}

	if !((*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes != XtclEmptyStringRep) {
		goto __165
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Fbytes)
__165:
	;
	(*Tcl_Obj)(unsafe.Pointer(valueVarObj)).Flength = -1
__166:
	;
	*(*uintptr)(unsafe.Pointer(valueVarObj + 32)) = XtclFreeObjList
	XtclFreeObjList = valueVarObj
	goto __167
__167:
	if 0 != 0 {
		goto __166
	}
	goto __168
__168:
	;
	goto __164
__163:
	XTclFreeObj(tls, valueVarObj)
__164:
	;
__162:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(scriptObj)).FrefCount, 1) > 1) {
		goto __169
	}
	goto __170
__169:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(scriptObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __171
	}

	if !((*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes != XtclEmptyStringRep) {
		goto __173
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(scriptObj)).Fbytes)
__173:
	;
	(*Tcl_Obj)(unsafe.Pointer(scriptObj)).Flength = -1
__174:
	;
	*(*uintptr)(unsafe.Pointer(scriptObj + 32)) = XtclFreeObjList
	XtclFreeObjList = scriptObj
	goto __175
__175:
	if 0 != 0 {
		goto __174
	}
	goto __176
__176:
	;
	goto __172
__171:
	XTclFreeObj(tls, scriptObj)
__172:
	;
__170:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount, 1) > 1) {
		goto __177
	}
	goto __178
__177:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __179
	}

	if !((*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != XtclEmptyStringRep) {
		goto __181
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes)
__181:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = -1
__182:
	;
	*(*uintptr)(unsafe.Pointer(resultObj + 32)) = XtclFreeObjList
	XtclFreeObjList = resultObj
	goto __183
__183:
	if 0 != 0 {
		goto __182
	}
	goto __184
__184:
	;
	goto __180
__179:
	XTclFreeObj(tls, resultObj)
__180:
	;
__178:
	;

	return result
__3:
	;
	XTcl_Panic(tls, ts+10430, 0)
	// Control never reaches this point.
	return TCL_ERROR
}

var filters = [4]uintptr{
	ts + 22548, ts + 4221, ts + 4120, uintptr(0),
} /* tclDictObj.c:2877:23 */

//----------------------------------------------------------------------
//
// DictUpdateCmd --
//
//	This function implements the "dict update" Tcl command. See the user
//	documentation for details on what it does, and TIP#212 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictUpdateCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:3155:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var iPtr uintptr = interp
	var dictPtr uintptr
	// var objPtr uintptr at bp+8, 8

	var i int32
	// var dummy int32 at bp, 4

	if objc < 5 || !(objc&1 != 0) {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+24673)
		return TCL_ERROR
	}

	dictPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), TCL_LEAVE_ERR_MSG)
	if dictPtr == uintptr(0) {
		return TCL_ERROR
	}
	if XTcl_DictObjSize(tls, interp, dictPtr, bp) != TCL_OK {
		return TCL_ERROR
	}
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount++
	for i = 2; i+2 < objc; i = i + 2 {
		if XTcl_DictObjGet(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+8) != TCL_OK {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = dictPtr
					}
				} else {
					XTclFreeObj(tls, dictPtr)
				}
			}

			return TCL_ERROR
		}
		if *(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0) {
			// ???
			XTcl_UnsetVar2(tls, interp, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))), uintptr(0), 0)
		} else if XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 8)),
			TCL_LEAVE_ERR_MSG) == uintptr(0) {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = dictPtr
					}
				} else {
					XTclFreeObj(tls, dictPtr)
				}
			}

			return TCL_ERROR
		}
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
			for ok2 := true; ok2; ok2 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = dictPtr
			}
		} else {
			XTclFreeObj(tls, dictPtr)
		}
	}

	// Execute the body after setting up the NRE handler to process the
	// results.

	*(*uintptr)(unsafe.Pointer(bp + 8 /* objPtr */)) = XTcl_NewListObj(tls, objc-3, objv+uintptr(2)*8)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FrefCount++
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _callbackPtr uintptr
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sFinalizeDictUpdate}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = *(*uintptr)(unsafe.Pointer(bp + 8))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}

	return XTclNREvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, objc-1)
}

func sFinalizeDictUpdate(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclDictObj.c:3209:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var dictPtr uintptr
	var objPtr uintptr
	// var objv uintptr at bp+8, 8

	var state Tcl_InterpState
	var i int32
	// var objc int32 at bp, 4

	var varName uintptr = *(*ClientData)(unsafe.Pointer(data))
	var argsObj uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	// ErrorInfo handling.

	if result == TCL_ERROR {
		XTcl_AddErrorInfo(tls, interp, ts+24722)
	}

	// If the dictionary variable doesn't exist, drop everything silently.

	dictPtr = XTcl_ObjGetVar2(tls, interp, varName, uintptr(0), 0)
	if dictPtr == uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(varName)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(varName)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(varName + 32)) = XtclFreeObjList
					XtclFreeObjList = varName
				}
			} else {
				XTclFreeObj(tls, varName)
			}
		}

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(argsObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(argsObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(argsObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(argsObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(argsObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(argsObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(argsObj)).Flength = -1
				for ok1 := true; ok1; ok1 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(argsObj + 32)) = XtclFreeObjList
					XtclFreeObjList = argsObj
				}
			} else {
				XTclFreeObj(tls, argsObj)
			}
		}

		return result
	}

	// Double-check that it is still a dictionary.

	state = XTcl_SaveInterpState(tls, interp, result)
	if XTcl_DictObjSize(tls, interp, dictPtr, bp) != TCL_OK {
		XTcl_DiscardInterpState(tls, state)
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(varName)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(varName)).Flength = -1
				for ok2 := true; ok2; ok2 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(varName + 32)) = XtclFreeObjList
					XtclFreeObjList = varName
				}
			} else {
				XTclFreeObj(tls, varName)
			}
		}

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(argsObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(argsObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(argsObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(argsObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(argsObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(argsObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(argsObj)).Flength = -1
				for ok3 := true; ok3; ok3 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(argsObj + 32)) = XtclFreeObjList
					XtclFreeObjList = argsObj
				}
			} else {
				XTclFreeObj(tls, argsObj)
			}
		}

		return TCL_ERROR
	}

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		dictPtr = XTcl_DuplicateObj(tls, dictPtr)
	}

	// Write back the values from the variables, treating failure to read as
	// an instruction to remove the key.

	XTcl_ListObjGetElements(tls, uintptr(0), argsObj, bp, bp+8)
	for i = 0; i < *(*int32)(unsafe.Pointer(bp /* objc */)); i = i + 2 {
		objPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)) + uintptr(i+1)*8)), uintptr(0), 0)
		if objPtr == uintptr(0) {
			XTcl_DictObjRemove(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)) + uintptr(i)*8)))
		} else if objPtr == dictPtr {
			// Someone is messing us around, trying to build a recursive
			// structure. [Bug 1786481]

			XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)) + uintptr(i)*8)), XTcl_DuplicateObj(tls, objPtr))
		} else {
			// Shouldn't fail
			XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)) + uintptr(i)*8)), objPtr)
		}
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(argsObj)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(argsObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(argsObj)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(argsObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(argsObj)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(argsObj)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(argsObj)).Flength = -1
			for ok4 := true; ok4; ok4 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(argsObj + 32)) = XtclFreeObjList
				XtclFreeObjList = argsObj
			}
		} else {
			XTclFreeObj(tls, argsObj)
		}
	}

	// Write the dictionary back to its variable.

	if XTcl_ObjSetVar2(tls, interp, varName, uintptr(0), dictPtr,
		TCL_LEAVE_ERR_MSG) == uintptr(0) {
		XTcl_DiscardInterpState(tls, state)
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(varName)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(varName)).Flength = -1
				for ok5 := true; ok5; ok5 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(varName + 32)) = XtclFreeObjList
					XtclFreeObjList = varName
				}
			} else {
				XTclFreeObj(tls, varName)
			}
		}

		return TCL_ERROR
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(varName)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(varName)).Flength = -1
			for ok6 := true; ok6; ok6 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(varName + 32)) = XtclFreeObjList
				XtclFreeObjList = varName
			}
		} else {
			XTclFreeObj(tls, varName)
		}
	}

	return XTcl_RestoreInterpState(tls, interp, state)
}

//----------------------------------------------------------------------
//
// DictWithCmd --
//
//	This function implements the "dict with" Tcl command. See the user
//	documentation for details on what it does, and TIP#212 for the formal
//	specification.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDictWithCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDictObj.c:3313:1: */
	var iPtr uintptr = interp
	var dictPtr uintptr
	var keysPtr uintptr
	var pathPtr uintptr

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24751)
		return TCL_ERROR
	}

	// Get the dictionary to open out.

	dictPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), TCL_LEAVE_ERR_MSG)
	if dictPtr == uintptr(0) {
		return TCL_ERROR
	}

	keysPtr = XTclDictWithInit(tls, interp, dictPtr, objc-3, objv+uintptr(2)*8)
	if keysPtr == uintptr(0) {
		return TCL_ERROR
	}
	(*Tcl_Obj)(unsafe.Pointer(keysPtr)).FrefCount++

	// Execute the body, while making the invoking context available to the
	// loop body (TIP#280) and postponing the cleanup until later (NRE).

	pathPtr = uintptr(0)
	if objc > 3 {
		pathPtr = XTcl_NewListObj(tls, objc-3, objv+uintptr(2)*8)
		(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount++
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FrefCount++
	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sFinalizeDictWith}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = keysPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = pathPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}

	return XTclNREvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), 0, (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr, objc-1)
}

func sFinalizeDictWith(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclDictObj.c:3360:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var pathv uintptr at bp+8, 8

	// var pathc int32 at bp, 4

	var state Tcl_InterpState
	var varName uintptr = *(*ClientData)(unsafe.Pointer(data))
	var keysPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var pathPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))
	var varPtr uintptr
	// var arrayPtr uintptr at bp+16, 8

	if result == TCL_ERROR {
		XTcl_AddErrorInfo(tls, interp, ts+24780)
	}

	// Save the result state; TDWF doesn't guarantee to not modify that on
	// TCL_OK result.

	state = XTcl_SaveInterpState(tls, interp, result)
	if pathPtr != uintptr(0) {
		XTcl_ListObjGetElements(tls, uintptr(0), pathPtr, bp, bp+8)
	} else {
		*(*int32)(unsafe.Pointer(bp /* pathc */)) = 0
		*(*uintptr)(unsafe.Pointer(bp + 8 /* pathv */)) = uintptr(0)
	}

	// Pack from local variables back into the dictionary.

	varPtr = XTclObjLookupVarEx(tls, interp, varName, uintptr(0), TCL_LEAVE_ERR_MSG, ts+5888,
		/*createPart1*/ 1 /*createPart2*/, 1, bp+16)
	if varPtr == uintptr(0) {
		result = TCL_ERROR
	} else {
		result = XTclDictWithFinish(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp + 16 /* arrayPtr */)), varName, uintptr(0), -1,
			*(*int32)(unsafe.Pointer(bp /* pathc */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* pathv */)), keysPtr)
	}

	// Tidy up and return the real result (unless we had an error).

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(varName)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(varName)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(varName)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(varName)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(varName + 32)) = XtclFreeObjList
				XtclFreeObjList = varName
			}
		} else {
			XTclFreeObj(tls, varName)
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keysPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(keysPtr)).Flength = -1
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(keysPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = keysPtr
			}
		} else {
			XTclFreeObj(tls, keysPtr)
		}
	}

	if pathPtr != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(pathPtr)).Flength = -1
				for ok2 := true; ok2; ok2 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(pathPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = pathPtr
				}
			} else {
				XTclFreeObj(tls, pathPtr)
			}
		}

	}
	if result != TCL_OK {
		XTcl_DiscardInterpState(tls, state)
		return TCL_ERROR
	}
	return XTcl_RestoreInterpState(tls, interp, state)
}

//----------------------------------------------------------------------
//
// TclDictWithInit --
//
//	Part of the core of [dict with]. Pokes into a dictionary and converts
//	the mappings there into assignments to (presumably) local variables.
//	Returns a list of all the names that were mapped so that removal of
//	either the variable or the dictionary entry won't surprise us when we
//	come to stuffing everything back.
//
// Result:
//	List of mapped names, or NULL if there was an error.
//
// Side effects:
//	Assigns to variables, so potentially legion due to traces.
//
//----------------------------------------------------------------------

func XTclDictWithInit(tls *libc.TLS, interp uintptr, dictPtr uintptr, pathc int32, pathv uintptr) uintptr { /* tclDictObj.c:3439:9: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	// var s Tcl_DictSearch at bp, 24

	// var keyPtr uintptr at bp+24, 8

	// var valPtr uintptr at bp+32, 8

	var keysPtr uintptr
	// var done int32 at bp+40, 4

	if pathc > 0 {
		dictPtr = XTclTraceDictPath(tls, interp, dictPtr, pathc, pathv,
			DICT_PATH_READ)
		if dictPtr == uintptr(0) {
			return uintptr(0)
		}
	}

	// Go over the list of keys and write each corresponding value to a
	// variable in the current context with the same name. Also keep a copy of
	// the keys so we can write back properly later on even if the dictionary
	// has been structurally modified.

	if XTcl_DictObjFirst(tls, interp, dictPtr, bp, bp+24, bp+32,
		bp+40) != TCL_OK {
		return uintptr(0)
	}

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		keysPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(keysPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(keysPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr = uintptr(0)
	{
	}

	for ; !(*(*int32)(unsafe.Pointer(bp + 40)) != 0); XTcl_DictObjNext(tls, bp, bp+24, bp+32, bp+40) {
		XTcl_ListObjAppendElement(tls, uintptr(0), keysPtr, *(*uintptr)(unsafe.Pointer(bp + 24 /* keyPtr */)))
		if XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 24)), uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 32)),
			TCL_LEAVE_ERR_MSG) == uintptr(0) {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keysPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(keysPtr)).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(keysPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = keysPtr
					}
				} else {
					XTclFreeObj(tls, keysPtr)
				}
			}

			XTcl_DictObjDone(tls, bp)
			return uintptr(0)
		}
	}

	return keysPtr
}

//----------------------------------------------------------------------
//
// TclDictWithFinish --
//
//	Part of the core of [dict with]. Reassembles the piece of the dict (in
//	varName, location given by pathc/pathv) from the variables named in
//	the keysPtr argument. NB, does not try to preserve errors or manage
//	argument lifetimes.
//
// Result:
//	TCL_OK if we succeeded, or TCL_ERROR if we failed.
//
// Side effects:
//	Assigns to a variable, so potentially legion due to traces. Updates
//	the dictionary in the named variable.
//
//----------------------------------------------------------------------

func XTclDictWithFinish(tls *libc.TLS, interp uintptr, varPtr uintptr, arrayPtr uintptr, part1Ptr uintptr, part2Ptr uintptr, index int32, pathc int32, pathv uintptr, keysPtr uintptr) int32 { /* tclDictObj.c:3506:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var dictPtr uintptr
	var leafPtr uintptr
	var valPtr uintptr
	// var i int32 at bp, 4

	var allocdict int32
	// var keyc int32 at bp+16, 4

	// var keyv uintptr at bp+8, 8

	// If the dictionary variable doesn't exist, drop everything silently.

	dictPtr = XTclPtrGetVarIdx(tls, interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
		TCL_LEAVE_ERR_MSG, index)
	if dictPtr == uintptr(0) {
		return TCL_OK
	}

	// Double-check that it is still a dictionary.

	if XTcl_DictObjSize(tls, interp, dictPtr, bp) != TCL_OK {
		return TCL_ERROR
	}

	if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1 {
		dictPtr = XTcl_DuplicateObj(tls, dictPtr)
		allocdict = 1
	} else {
		allocdict = 0
	}

	if pathc > 0 {
		// Want to get to the dictionary which we will update; need to do
		// prepare-for-update de-sharing along the path *but* avoid generating
		// an error on a non-existant path (we'll treat that the same as a
		// non-existant variable. Luckily, the de-sharing operation isn't
		// deeply damaging if we don't go on to update; it's just less than
		// perfectly efficient (but no memory should be leaked).

		leafPtr = XTclTraceDictPath(tls, interp, dictPtr, pathc, pathv,
			DICT_PATH_EXISTS|DICT_PATH_UPDATE)
		if leafPtr == uintptr(0) {
			if allocdict != 0 {
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
						for ok := true; ok; ok = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
							XtclFreeObjList = dictPtr
						}
					} else {
						XTclFreeObj(tls, dictPtr)
					}
				}

			}
			return TCL_ERROR
		}
		if leafPtr == uintptr(1) {
			if allocdict != 0 {
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
						for ok1 := true; ok1; ok1 = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
							XtclFreeObjList = dictPtr
						}
					} else {
						XTclFreeObj(tls, dictPtr)
					}
				}

			}
			return TCL_OK
		}
	} else {
		leafPtr = dictPtr
	}

	// Now process our updates on the leaf dictionary.

	if (*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 8)) = *(*uintptr)(unsafe.Pointer(keysPtr + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 16)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keysPtr + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), keysPtr, bp+16, bp+8)
	}
	for *(*int32)(unsafe.Pointer(bp /* i */)) = 0; *(*int32)(unsafe.Pointer(bp /* i */)) < *(*int32)(unsafe.Pointer(bp + 16 /* keyc */)); *(*int32)(unsafe.Pointer(bp /* i */))++ {
		valPtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* keyv */)) + uintptr(*(*int32)(unsafe.Pointer(bp /* i */)))*8)), uintptr(0), 0)
		if valPtr == uintptr(0) {
			XTcl_DictObjRemove(tls, uintptr(0), leafPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* keyv */)) + uintptr(*(*int32)(unsafe.Pointer(bp /* i */)))*8)))
		} else if leafPtr == valPtr {
			// Someone is messing us around, trying to build a recursive
			// structure. [Bug 1786481]

			XTcl_DictObjPut(tls, uintptr(0), leafPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* keyv */)) + uintptr(*(*int32)(unsafe.Pointer(bp /* i */)))*8)), XTcl_DuplicateObj(tls, valPtr))
		} else {
			XTcl_DictObjPut(tls, uintptr(0), leafPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* keyv */)) + uintptr(*(*int32)(unsafe.Pointer(bp /* i */)))*8)), valPtr)
		}
	}

	// Ensure that none of the dictionaries in the chain still have a string
	// rep.

	if pathc > 0 {
		sInvalidateDictChain(tls, leafPtr)
	}

	// Write back the outermost dictionary to the variable.

	if XTclPtrSetVarIdx(tls, interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
		dictPtr, TCL_LEAVE_ERR_MSG, index) == uintptr(0) {
		if allocdict != 0 {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
					for ok2 := true; ok2; ok2 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = dictPtr
					}
				} else {
					XTclFreeObj(tls, dictPtr)
				}
			}

		}
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclInitDictCmd --
//
//	This function is create the "dict" Tcl command. See the user
//	documentation for details on what it does, and TIP#111 for the formal
//	specification.
//
// Results:
//	A Tcl command handle.
//
// Side effects:
//	May advance compilation epoch.
//
//----------------------------------------------------------------------

func XTclInitDictCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclDictObj.c:3649:1: */
	return XTclMakeEnsemble(tls, interp, ts+23790, uintptr(unsafe.Pointer(&implementationMap)))
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The structure below defines an instruction name Tcl object to allow
// reporting of inner contexts in errorstack without string allocation.

var tclInstNameType = Tcl_ObjType{
	Fname:             ts + 24807,
	FupdateStringProc: 0, // setFromAnyProc
} /* tclDisassemble.c:41:26 */

// How to get the bytecode out of a Tcl_Obj.

//----------------------------------------------------------------------
//
// GetLocationInformation --
//
//	This procedure looks up the information about where a procedure was
//	originally declared.
//
// Results:
//	Writes to the variables pointed at by fileObjPtr and linePtr.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetLocationInformation(tls *libc.TLS, procPtr uintptr, fileObjPtr uintptr, linePtr uintptr) { /* tclDisassemble.c:74:1: */
	var cfPtr uintptr = XTclGetCmdFrameForProcedure(tls, procPtr)

	*(*uintptr)(unsafe.Pointer(fileObjPtr)) = uintptr(0)
	*(*int32)(unsafe.Pointer(linePtr)) = -1
	if cfPtr == uintptr(0) {
		return
	}

	// Get the source location data out of the CmdFrame.

	*(*int32)(unsafe.Pointer(linePtr)) = *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(cfPtr)).Fline))
	if (*CmdFrame)(unsafe.Pointer(cfPtr)).Ftype == 4 {
		*(*uintptr)(unsafe.Pointer(fileObjPtr)) = *(*uintptr)(unsafe.Pointer(cfPtr + 40))
	}
}

//----------------------------------------------------------------------
//
// DisassembleByteCodeObj --
//
//	Given an object which is of bytecode type, return a disassembled
//	version of the bytecode (in a new refcount 0 object). No guarantees
//	are made about the details of the contents of the result.
//
//----------------------------------------------------------------------

func sDisassembleByteCodeObj(tls *libc.TLS, interp uintptr, objPtr uintptr) uintptr { /* tclDisassemble.c:243:16: */
	bp := tls.Alloc(436)
	defer tls.Free(436)

	var codePtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	var codeStart uintptr
	var codeLimit uintptr
	var pc uintptr
	var codeDeltaNext uintptr
	var codeLengthNext uintptr
	var srcDeltaNext uintptr
	var srcLengthNext uintptr
	var codeOffset int32
	var codeLen int32
	var srcOffset int32
	var srcLen int32
	var numCmds int32
	var delta int32
	var i int32
	// var line int32 at bp+432, 4

	var iPtr uintptr = *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle))
	var bufferObj uintptr
	// var fileObj uintptr at bp+424, 8

	// var ptrBuf1 [20]int8 at bp+384, 20

	// var ptrBuf2 [20]int8 at bp+404, 20

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		bufferObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(bufferObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(bufferObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(bufferObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(bufferObj)).FtypePtr = uintptr(0)
	{
	}

	if (*ByteCode)(unsafe.Pointer(codePtr)).FrefCount <= 0 {
		return bufferObj // Already freed.
	}

	codeStart = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart
	codeLimit = codeStart + uintptr((*ByteCode)(unsafe.Pointer(codePtr)).FnumCodeBytes)
	numCmds = (*ByteCode)(unsafe.Pointer(codePtr)).FnumCommands

	// Print header lines describing the ByteCode.

	libc.Xsprintf(tls, bp+384, ts+944, libc.VaList(bp, codePtr))
	libc.Xsprintf(tls, bp+404, ts+944, libc.VaList(bp+8, iPtr))
	XTcl_AppendPrintfToObj(tls, bufferObj,
		ts+24816,
		libc.VaList(bp+16, bp+384, (*ByteCode)(unsafe.Pointer(codePtr)).FrefCount, (*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch, bp+404,
			(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch))
	XTcl_AppendToObj(tls, bufferObj, ts+24875, -1)
	sPrintSourceToObj(tls, bufferObj, (*ByteCode)(unsafe.Pointer(codePtr)).Fsource,
		func() int32 {
			if (*ByteCode)(unsafe.Pointer(codePtr)).FnumSrcBytes < 55 {
				return (*ByteCode)(unsafe.Pointer(codePtr)).FnumSrcBytes
			}
			return 55
		}())
	sGetLocationInformation(tls, (*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr, bp+424, bp+432)
	if *(*int32)(unsafe.Pointer(bp + 432)) > -1 && *(*uintptr)(unsafe.Pointer(bp + 424)) != uintptr(0) {
		XTcl_AppendPrintfToObj(tls, bufferObj, ts+24885,
			libc.VaList(bp+56, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 424 /* fileObj */))), *(*int32)(unsafe.Pointer(bp + 432 /* line */))))
	}
	XTcl_AppendPrintfToObj(tls, bufferObj,
		ts+24906,
		libc.VaList(bp+72, numCmds, (*ByteCode)(unsafe.Pointer(codePtr)).FnumSrcBytes, (*ByteCode)(unsafe.Pointer(codePtr)).FnumCodeBytes,
			(*ByteCode)(unsafe.Pointer(codePtr)).FnumLitObjects, (*ByteCode)(unsafe.Pointer(codePtr)).FnumAuxDataItems,
			(*ByteCode)(unsafe.Pointer(codePtr)).FmaxStackDepth,
			0.0))

	// If the ByteCode is the compiled body of a Tcl procedure, print
	// information about that procedure. Note that we don't know the
	// procedure's name since ByteCode's can be shared among procedures.

	if (*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr != uintptr(0) {
		var procPtr uintptr = (*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr
		var numCompiledLocals int32 = (*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals

		libc.Xsprintf(tls, bp+384, ts+944, libc.VaList(bp+128, procPtr))
		XTcl_AppendPrintfToObj(tls, bufferObj,
			ts+24983,
			libc.VaList(bp+136, bp+384, (*Proc)(unsafe.Pointer(procPtr)).FrefCount, (*Proc)(unsafe.Pointer(procPtr)).FnumArgs,
				numCompiledLocals))
		if numCompiledLocals > 0 {
			var localPtr uintptr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr

			for i = 0; i < numCompiledLocals; i++ {
				XTcl_AppendPrintfToObj(tls, bufferObj,
					ts+25035, libc.VaList(bp+168, i,
						func() uintptr {
							if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&(VAR_ARRAY|VAR_LINK) != 0 {
								return ts + 2631 /* "" */
							}
							return ts + 25061 /* ", scalar" */
						}(),
						func() uintptr {
							if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARRAY != 0 {
								return ts + 25070 /* ", array" */
							}
							return ts + 2631 /* "" */
						}(),
						func() uintptr {
							if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_LINK != 0 {
								return ts + 25078 /* ", link" */
							}
							return ts + 2631 /* "" */
						}(),
						func() uintptr {
							if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARGUMENT != 0 {
								return ts + 25085 /* ", arg" */
							}
							return ts + 2631 /* "" */
						}(),
						func() uintptr {
							if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_TEMPORARY != 0 {
								return ts + 25091 /* ", temp" */
							}
							return ts + 2631 /* "" */
						}(),
						func() uintptr {
							if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_RESOLVED != 0 {
								return ts + 25098 /* ", resolved" */
							}
							return ts + 2631 /* "" */
						}()))
				if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_TEMPORARY != 0 {
					XTcl_AppendToObj(tls, bufferObj, ts+935, -1)
				} else {
					XTcl_AppendPrintfToObj(tls, bufferObj, ts+25109,
						libc.VaList(bp+224, localPtr+40))
				}
				localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
			}
		}
	}

	// Print the ExceptionRange array.

	if (*ByteCode)(unsafe.Pointer(codePtr)).FnumExceptRanges > 0 {
		XTcl_AppendPrintfToObj(tls, bufferObj, ts+25117,
			libc.VaList(bp+232, (*ByteCode)(unsafe.Pointer(codePtr)).FnumExceptRanges, (*ByteCode)(unsafe.Pointer(codePtr)).FmaxExceptDepth))
		for i = 0; i < (*ByteCode)(unsafe.Pointer(codePtr)).FnumExceptRanges; i++ {
			var rangePtr uintptr = (*ByteCode)(unsafe.Pointer(codePtr)).FexceptArrayPtr + uintptr(i)*28

			XTcl_AppendPrintfToObj(tls, bufferObj,
				ts+25151,
				libc.VaList(bp+248, i, (*ExceptionRange)(unsafe.Pointer(rangePtr)).FnestingLevel,
					func() uintptr {
						if (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype == LOOP_EXCEPTION_RANGE {
							return ts + 19235 /* "loop" */
						}
						return ts + 5696 /* "catch" */
					}(),
					(*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset,
					(*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset+(*ExceptionRange)(unsafe.Pointer(rangePtr)).FnumCodeBytes-1))
			switch (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype {
			case LOOP_EXCEPTION_RANGE:
				XTcl_AppendPrintfToObj(tls, bufferObj, ts+25186,
					libc.VaList(bp+288, (*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset, (*ExceptionRange)(unsafe.Pointer(rangePtr)).FbreakOffset))
				break
				fallthrough
			case CATCH_EXCEPTION_RANGE:
				XTcl_AppendPrintfToObj(tls, bufferObj, ts+25209,
					libc.VaList(bp+304, (*ExceptionRange)(unsafe.Pointer(rangePtr)).FcatchOffset))
				break
				fallthrough
			default:
				XTcl_Panic(tls, ts+25219,
					libc.VaList(bp+312, (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype))
			}
		}
	}

	// If there were no commands (e.g., an expression or an empty string was
	// compiled), just print all instructions and return.

	if numCmds == 0 {
		pc = codeStart
		for pc < codeLimit {
			XTcl_AppendToObj(tls, bufferObj, ts+25270, -1)
			pc += uintptr(sFormatInstruction(tls, codePtr, pc, bufferObj))
		}
		return bufferObj
	}

	// Print table showing the code offset, source offset, and source length
	// for each command. These are encoded as a sequence of bytes.

	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25275, libc.VaList(bp+320, numCmds))
	codeDeltaNext = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeDeltaStart
	codeLengthNext = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeLengthStart
	srcDeltaNext = (*ByteCode)(unsafe.Pointer(codePtr)).FsrcDeltaStart
	srcLengthNext = (*ByteCode)(unsafe.Pointer(codePtr)).FsrcLengthStart
	codeOffset = libc.AssignInt32(&srcOffset, 0)
	for i = 0; i < numCmds; i++ {
		if uint32(*(*uint8)(unsafe.Pointer(codeDeltaNext))) == uint32(0xFF) {
			codeDeltaNext++
			delta = int32(uint32(*(*uint8)(unsafe.Pointer(codeDeltaNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(codeDeltaNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(codeDeltaNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(codeDeltaNext + uintptr(3))))
			codeDeltaNext += uintptr(4)
		} else {
			delta = int32(*(*int8)(unsafe.Pointer(codeDeltaNext)))
			codeDeltaNext++
		}
		codeOffset = codeOffset + delta

		if uint32(*(*uint8)(unsafe.Pointer(codeLengthNext))) == uint32(0xFF) {
			codeLengthNext++
			codeLen = int32(uint32(*(*uint8)(unsafe.Pointer(codeLengthNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(codeLengthNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(codeLengthNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(codeLengthNext + uintptr(3))))
			codeLengthNext += uintptr(4)
		} else {
			codeLen = int32(*(*int8)(unsafe.Pointer(codeLengthNext)))
			codeLengthNext++
		}

		if uint32(*(*uint8)(unsafe.Pointer(srcDeltaNext))) == uint32(0xFF) {
			srcDeltaNext++
			delta = int32(uint32(*(*uint8)(unsafe.Pointer(srcDeltaNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(srcDeltaNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(srcDeltaNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(srcDeltaNext + uintptr(3))))
			srcDeltaNext += uintptr(4)
		} else {
			delta = int32(*(*int8)(unsafe.Pointer(srcDeltaNext)))
			srcDeltaNext++
		}
		srcOffset = srcOffset + delta

		if uint32(*(*uint8)(unsafe.Pointer(srcLengthNext))) == uint32(0xFF) {
			srcLengthNext++
			srcLen = int32(uint32(*(*uint8)(unsafe.Pointer(srcLengthNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(srcLengthNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(srcLengthNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(srcLengthNext + uintptr(3))))
			srcLengthNext += uintptr(4)
		} else {
			srcLen = int32(*(*int8)(unsafe.Pointer(srcLengthNext)))
			srcLengthNext++
		}

		XTcl_AppendPrintfToObj(tls, bufferObj, ts+25290,
			libc.VaList(bp+328, func() uintptr {
				if i%2 != 0 {
					return ts + 25317 /* "     " */
				}
				return ts + 25323 /* "\n   " */
			}(),
				i+1, codeOffset, codeOffset+codeLen-1,
				srcOffset, srcOffset+srcLen-1))
	}
	if numCmds > 0 {
		XTcl_AppendToObj(tls, bufferObj, ts+935, -1)
	}

	// Print each instruction. If the instruction corresponds to the start of
	// a command, print the command's source. Note that we don't need the code
	// length here.

	codeDeltaNext = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeDeltaStart
	srcDeltaNext = (*ByteCode)(unsafe.Pointer(codePtr)).FsrcDeltaStart
	srcLengthNext = (*ByteCode)(unsafe.Pointer(codePtr)).FsrcLengthStart
	codeOffset = libc.AssignInt32(&srcOffset, 0)
	pc = codeStart
	for i = 0; i < numCmds; i++ {
		if uint32(*(*uint8)(unsafe.Pointer(codeDeltaNext))) == uint32(0xFF) {
			codeDeltaNext++
			delta = int32(uint32(*(*uint8)(unsafe.Pointer(codeDeltaNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(codeDeltaNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(codeDeltaNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(codeDeltaNext + uintptr(3))))
			codeDeltaNext += uintptr(4)
		} else {
			delta = int32(*(*int8)(unsafe.Pointer(codeDeltaNext)))
			codeDeltaNext++
		}
		codeOffset = codeOffset + delta

		if uint32(*(*uint8)(unsafe.Pointer(srcDeltaNext))) == uint32(0xFF) {
			srcDeltaNext++
			delta = int32(uint32(*(*uint8)(unsafe.Pointer(srcDeltaNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(srcDeltaNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(srcDeltaNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(srcDeltaNext + uintptr(3))))
			srcDeltaNext += uintptr(4)
		} else {
			delta = int32(*(*int8)(unsafe.Pointer(srcDeltaNext)))
			srcDeltaNext++
		}
		srcOffset = srcOffset + delta

		if uint32(*(*uint8)(unsafe.Pointer(srcLengthNext))) == uint32(0xFF) {
			srcLengthNext++
			srcLen = int32(uint32(*(*uint8)(unsafe.Pointer(srcLengthNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(srcLengthNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(srcLengthNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(srcLengthNext + uintptr(3))))
			srcLengthNext += uintptr(4)
		} else {
			srcLen = int32(*(*int8)(unsafe.Pointer(srcLengthNext)))
			srcLengthNext++
		}

		// Print instructions before command i.

		for (int64(pc)-int64(codeStart))/1 < int64(codeOffset) {
			XTcl_AppendToObj(tls, bufferObj, ts+25270, -1)
			pc += uintptr(sFormatInstruction(tls, codePtr, pc, bufferObj))
		}

		XTcl_AppendPrintfToObj(tls, bufferObj, ts+25328, libc.VaList(bp+376, i+1))
		sPrintSourceToObj(tls, bufferObj, (*ByteCode)(unsafe.Pointer(codePtr)).Fsource+uintptr(srcOffset),
			func() int32 {
				if srcLen < 55 {
					return srcLen
				}
				return 55
			}())
		XTcl_AppendToObj(tls, bufferObj, ts+935, -1)
	}
	if pc < codeLimit {
		// Print instructions after the last command.

		for pc < codeLimit {
			XTcl_AppendToObj(tls, bufferObj, ts+25270, -1)
			pc += uintptr(sFormatInstruction(tls, codePtr, pc, bufferObj))
		}
	}
	return bufferObj
}

//----------------------------------------------------------------------
//
// FormatInstruction --
//
//	Appends a representation of a bytecode instruction to a Tcl_Obj.
//
//----------------------------------------------------------------------

func sFormatInstruction(tls *libc.TLS, codePtr uintptr, pc uintptr, bufferObj uintptr) int32 { /* tclDisassemble.c:529:1: */
	bp := tls.Alloc(316)
	defer tls.Free(316)

	var procPtr uintptr
	var opCode uint8
	var instDesc uintptr
	var codeStart uintptr
	var pcOffset uint32
	var opnd int32
	var i int32
	var j int32
	var numBytes int32
	var localCt int32
	var localPtr uintptr
	// var suffixBuffer [128]int8 at bp+184, 128
	// Additional info to print after main opcode
	// and immediates.
	var suffixSrc uintptr
	var suffixObj uintptr
	var auxPtr uintptr
	var bytes uintptr
	// var length int32 at bp+312, 4
	procPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr
	opCode = *(*uint8)(unsafe.Pointer(pc))
	instDesc = uintptr(unsafe.Pointer(&XtclInstructionTable)) + uintptr(opCode)*32
	codeStart = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart
	pcOffset = uint32((int64(pc) - int64(codeStart)) / 1)
	opnd = 0
	numBytes = 1
	if procPtr != 0 {
		localCt = (*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals
	} else {
		localCt = 0
	}
	if procPtr != 0 {
		localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr
	} else {
		localPtr = uintptr(0)
	}
	suffixSrc = uintptr(0)
	suffixObj = uintptr(0)
	auxPtr = uintptr(0)

	*(*int8)(unsafe.Pointer(bp + 184)) = int8(0)
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25343, libc.VaList(bp, pcOffset, (*InstructionDesc)(unsafe.Pointer(instDesc)).Fname))
	i = 0
__1:
	if !(i < (*InstructionDesc)(unsafe.Pointer(instDesc)).FnumOperands) {
		goto __3
	}
	switch *(*InstOperandType)(unsafe.Pointer(instDesc + 20 + uintptr(i)*4)) {
	case OPERAND_INT1:
		goto __5
	case OPERAND_INT4:
		goto __6
	case OPERAND_UINT1:
		goto __7
	case OPERAND_UINT4:
		goto __8
	case OPERAND_OFFSET1:
		goto __9
	case OPERAND_OFFSET4:
		goto __10
	case OPERAND_LIT1:
		goto __11
	case OPERAND_LIT4:
		goto __12
	case OPERAND_AUX4:
		goto __13
	case OPERAND_IDX4:
		goto __14
	case OPERAND_LVT1:
		goto __15
	case OPERAND_LVT4:
		goto __16
	case OPERAND_SCLS1:
		goto __17
	case OPERAND_NONE:
		goto __18
	default:
		goto __19
	}
	goto __4
__5:
	opnd = int32(*(*int8)(unsafe.Pointer(pc + uintptr(numBytes))))
	numBytes++
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25352, libc.VaList(bp+16, opnd))
	goto __4
__6:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(3))))
	numBytes = numBytes + 4
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25352, libc.VaList(bp+24, opnd))
	goto __4
__7:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes)))))
	numBytes++
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25357, libc.VaList(bp+32, uint32(opnd)))
	goto __4
__8:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(3)))))
	numBytes = numBytes + 4
	if !(int32(opCode) == INST_START_CMD) {
		goto __20
	}
	libc.Xsprintf(tls, bp+184+uintptr(libc.Xstrlen(tls, bp+184)),
		ts+25361, libc.VaList(bp+40, opnd))
__20:
	;
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25357, libc.VaList(bp+48, uint32(opnd)))
	goto __4
__9:
	opnd = int32(*(*int8)(unsafe.Pointer(pc + uintptr(numBytes))))
	numBytes++
	libc.Xsprintf(tls, bp+184, ts+25382, libc.VaList(bp+56, pcOffset+uint32(opnd)))
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25352, libc.VaList(bp+64, opnd))
	goto __4
__10:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(3))))
	numBytes = numBytes + 4
	if !(int32(opCode) == INST_START_CMD) {
		goto __21
	}
	libc.Xsprintf(tls, bp+184, ts+25388, libc.VaList(bp+72, pcOffset+uint32(opnd)))
	goto __22
__21:
	libc.Xsprintf(tls, bp+184, ts+25382, libc.VaList(bp+80, pcOffset+uint32(opnd)))
__22:
	;
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25352, libc.VaList(bp+88, opnd))
	goto __4
__11:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes)))))
	numBytes++
	suffixObj = *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr + uintptr(opnd)*8))
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25357, libc.VaList(bp+96, uint32(opnd)))
	goto __4
__12:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(3)))))
	numBytes = numBytes + 4
	suffixObj = *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr + uintptr(opnd)*8))
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25357, libc.VaList(bp+104, uint32(opnd)))
	goto __4
__13:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(3)))))
	numBytes = numBytes + 4
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25357, libc.VaList(bp+112, uint32(opnd)))
	auxPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FauxDataArrayPtr + uintptr(opnd)*16
	goto __4
__14:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(3))))
	numBytes = numBytes + 4
	if !(opnd >= -1) {
		goto __23
	}
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25406, libc.VaList(bp+120, opnd))
	goto __24
__23:
	if !(opnd == -2) {
		goto __25
	}
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25410, 0)
	goto __26
__25:
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25415, libc.VaList(bp+128, -2-opnd))
__26:
	;
__24:
	;
	goto __4
__15:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes)))))
	numBytes++
	goto printLVTindex
__16:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes) + uintptr(3)))))
	numBytes = numBytes + 4
printLVTindex:
	if !(localPtr != uintptr(0)) {
		goto __27
	}
	if !(opnd >= localCt) {
		goto __28
	}
	XTcl_Panic(tls, ts+25423,
		libc.VaList(bp+136, uint32(opnd), localCt))
__28:
	;
	j = 0
__29:
	if !(j < opnd) {
		goto __31
	}
	localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
	goto __30
__30:
	j++
	goto __29
	goto __31
__31:
	;
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_TEMPORARY != 0) {
		goto __32
	}
	libc.Xsprintf(tls, bp+184, ts+25477, libc.VaList(bp+152, uint32(opnd)))
	goto __33
__32:
	libc.Xsprintf(tls, bp+184, ts+25489, 0)
	suffixSrc = localPtr + 40 /* &.name */
__33:
	;
__27:
	;
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25494, libc.VaList(bp+160, uint32(opnd)))
	goto __4
__17:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(numBytes)))))
	numBytes++
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25501,
		libc.VaList(bp+168, XtclStringClassTable[opnd].Fname))
	goto __4
__18:
__19:
	goto __4
__4:
	;
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;
	if !(suffixObj != 0) {
		goto __34
	}

	XTcl_AppendToObj(tls, bufferObj, ts+25505, -1)
	bytes = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr + uintptr(opnd)*8)), bp+312)
	sPrintSourceToObj(tls, bufferObj, bytes, func() int32 {
		if *(*int32)(unsafe.Pointer(bp + 312)) < 40 {
			return *(*int32)(unsafe.Pointer(bp + 312))
		}
		return 40
	}())
	goto __35
__34:
	if !(*(*int8)(unsafe.Pointer(bp + 184)) != 0) {
		goto __36
	}
	XTcl_AppendPrintfToObj(tls, bufferObj, ts+25509, libc.VaList(bp+176, bp+184))
	if !(suffixSrc != 0) {
		goto __37
	}
	sPrintSourceToObj(tls, bufferObj, suffixSrc, 40)
__37:
	;
__36:
	;
__35:
	;
	XTcl_AppendToObj(tls, bufferObj, ts+935, -1)
	if !(auxPtr != 0 && (*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxPtr)).Ftype)).FprintProc != 0) {
		goto __38
	}
	XTcl_AppendToObj(tls, bufferObj, ts+25515, -1)
	(*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uint32)
	})(unsafe.Pointer(&struct{ uintptr }{(*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxPtr)).Ftype)).FprintProc})).f(tls, (*AuxData)(unsafe.Pointer(auxPtr)).FclientData, bufferObj, codePtr,
		pcOffset)
	XTcl_AppendToObj(tls, bufferObj, ts+25519, -1)
__38:
	;
	return numBytes
}

//----------------------------------------------------------------------
//
// TclGetInnerContext --
//
//	If possible, returns a list capturing the inner context. Otherwise
//	return NULL.
//
//----------------------------------------------------------------------

func XTclGetInnerContext(tls *libc.TLS, interp uintptr, pc uintptr, tosPtr uintptr) uintptr { /* tclDisassemble.c:680:9: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var objc int32 = 0
	var off int32 = 0
	var result uintptr
	var iPtr uintptr = interp

	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_STR_LEN:
		fallthrough
	case INST_LNOT:
		fallthrough
	case INST_BITNOT:
		fallthrough
	case INST_UMINUS:
		fallthrough
	case INST_UPLUS:
		fallthrough
	case INST_TRY_CVT_TO_NUMERIC:
		fallthrough
	case INST_EXPAND_STKTOP:
		fallthrough
	case INST_EXPR_STK:
		objc = 1
		break

	case INST_LIST_IN:
		fallthrough
	case INST_LIST_NOT_IN:
		fallthrough // Basic list containment operators.
	case INST_STR_EQ:
		fallthrough
	case INST_STR_NEQ:
		fallthrough // String (in)equality check
	case INST_STR_CMP:
		fallthrough // String compare.
	case INST_STR_INDEX:
		fallthrough
	case INST_STR_MATCH:
		fallthrough
	case INST_REGEXP:
		fallthrough
	case INST_EQ:
		fallthrough
	case INST_NEQ:
		fallthrough
	case INST_LT:
		fallthrough
	case INST_GT:
		fallthrough
	case INST_LE:
		fallthrough
	case INST_GE:
		fallthrough
	case INST_MOD:
		fallthrough
	case INST_LSHIFT:
		fallthrough
	case INST_RSHIFT:
		fallthrough
	case INST_BITOR:
		fallthrough
	case INST_BITXOR:
		fallthrough
	case INST_BITAND:
		fallthrough
	case INST_EXPON:
		fallthrough
	case INST_ADD:
		fallthrough
	case INST_SUB:
		fallthrough
	case INST_DIV:
		fallthrough
	case INST_MULT:
		objc = 2
		break

	case INST_RETURN_STK:
		// early pop. TODO: dig out opt dict too :/
		objc = 1
		break

	case INST_SYNTAX:
		fallthrough
	case INST_RETURN_IMM:
		objc = 2
		break

	case INST_INVOKE_STK4:
		objc = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		break

	case INST_INVOKE_STK1:
		objc = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
		break
	}

	result = (*Interp)(unsafe.Pointer(iPtr)).FinnerContext
	if (*Tcl_Obj)(unsafe.Pointer(result)).FrefCount > 1 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = result
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FinnerContext = libc.AssignUintptr(&result, XTcl_NewListObj(tls, objc+1, uintptr(0)))
		(*Tcl_Obj)(unsafe.Pointer(result)).FrefCount++
	} else {
		// var len int32 at bp+8, 4

		// Reset while keeping the list internalrep as much as possible.

		XTcl_ListObjLength(tls, interp, result, bp+8)
		XTcl_ListObjReplace(tls, interp, result, 0, *(*int32)(unsafe.Pointer(bp + 8 /* len */)), 0, uintptr(0))
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), result, XTclNewInstNameObj(tls, *(*uint8)(unsafe.Pointer(pc))))

	for ; objc > 0; objc-- {
		var objPtr uintptr

		objPtr = *(*uintptr)(unsafe.Pointer(tosPtr + uintptr(1-objc+off)*8))
		if !(objPtr != 0) {
			XTcl_Panic(tls, ts+25522, 0)
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount <= 0 {
			XTcl_Panic(tls, ts+25569,
				libc.VaList(bp, objPtr))
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), result, objPtr)
	}

	return result
}

//----------------------------------------------------------------------
//
// TclNewInstNameObj --
//
//	Creates a new InstName Tcl_Obj based on the given instruction
//
//----------------------------------------------------------------------

func XTclNewInstNameObj(tls *libc.TLS, inst uint8) uintptr { /* tclDisassemble.c:797:9: */
	var objPtr uintptr = XTcl_NewObj(tls)

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&tclInstNameType))
	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(inst)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)

	return objPtr
}

//----------------------------------------------------------------------
//
// UpdateStringOfInstName --
//
//	Update the string representation for an instruction name object.
//
//----------------------------------------------------------------------

func sUpdateStringOfInstName(tls *libc.TLS, objPtr uintptr) { /* tclDisassemble.c:821:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var inst int32 = int32(*(*int32)(unsafe.Pointer(objPtr + 32)))
	var s uintptr
	// var buf [20]int8 at bp+8, 20

	var len int32

	if inst < 0 || inst > LAST_INST_OPCODE {
		libc.Xsprintf(tls, bp+8, ts+25620, libc.VaList(bp, inst))
		s = bp + 8 /* &buf[0] */
	} else {
		s = XtclInstructionTable[*(*int32)(unsafe.Pointer(objPtr + 32))].Fname
	}
	len = int32(libc.Xstrlen(tls, s))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(len+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, s, uint64(len+1))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = len
}

//----------------------------------------------------------------------
//
// PrintSourceToObj --
//
//	Appends a quoted representation of a string to a Tcl_Obj.
//
//----------------------------------------------------------------------

func sPrintSourceToObj(tls *libc.TLS, appendObj uintptr, stringPtr uintptr, maxChars int32) { /* tclDisassemble.c:851:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var p uintptr
	var i int32 = 0
	var len int32

	if stringPtr == uintptr(0) {
		XTcl_AppendToObj(tls, appendObj, ts+25628, -1)
		return
	}

	XTcl_AppendToObj(tls, appendObj, ts+25631, -1)
	p = stringPtr
	for ; int32(*(*int8)(unsafe.Pointer(p))) != 0 && i < maxChars; p += uintptr(len) {
		// var ucs4 int32 at bp+24, 4

		len = XTclUtfToUCS4(tls, p, bp+24)
		switch *(*int32)(unsafe.Pointer(bp + 24 /* ucs4 */)) {
		case '"':
			XTcl_AppendToObj(tls, appendObj, ts+25633, -1)
			i = i + 2
			continue
		case '\f':
			XTcl_AppendToObj(tls, appendObj, ts+25636, -1)
			i = i + 2
			continue
		case '\n':
			XTcl_AppendToObj(tls, appendObj, ts+25639, -1)
			i = i + 2
			continue
		case '\r':
			XTcl_AppendToObj(tls, appendObj, ts+25642, -1)
			i = i + 2
			continue
		case '\t':
			XTcl_AppendToObj(tls, appendObj, ts+25645, -1)
			i = i + 2
			continue
		case '\v':
			XTcl_AppendToObj(tls, appendObj, ts+25648, -1)
			i = i + 2
			continue
		default:
			if *(*int32)(unsafe.Pointer(bp + 24)) > 0xFFFF {
				XTcl_AppendPrintfToObj(tls, appendObj, ts+25651, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 24 /* ucs4 */))))
				i = i + 10
			} else if *(*int32)(unsafe.Pointer(bp + 24)) < 0x20 || *(*int32)(unsafe.Pointer(bp + 24)) >= 0x7F {
				XTcl_AppendPrintfToObj(tls, appendObj, ts+25658, libc.VaList(bp+8, *(*int32)(unsafe.Pointer(bp + 24 /* ucs4 */))))
				i = i + 6
			} else {
				XTcl_AppendPrintfToObj(tls, appendObj, ts+25665, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(bp + 24 /* ucs4 */))))
				i++
			}
			continue
		}
	}
	if int32(*(*int8)(unsafe.Pointer(p))) != 0 {
		XTcl_AppendToObj(tls, appendObj, ts+8420, -1)
	}
	XTcl_AppendToObj(tls, appendObj, ts+25631, -1)
}

//----------------------------------------------------------------------
//
// DisassembleByteCodeAsDicts --
//
//	Given an object which is of bytecode type, return a disassembled
//	version of the bytecode (in a new refcount 0 object) in a dictionary.
//	No guarantees are made about the details of the contents of the
//	result, but it is intended to be more readable than the old output
//	format.
//
//----------------------------------------------------------------------

func sDisassembleByteCodeAsDicts(tls *libc.TLS, interp uintptr, objPtr uintptr) uintptr { /* tclDisassemble.c:929:16: */
	bp := tls.Alloc(180)
	defer tls.Free(180)

	var codePtr uintptr
	var description uintptr
	var literals uintptr
	var variables uintptr
	var instructions uintptr
	var inst uintptr
	var aux uintptr
	var exn uintptr
	var commands uintptr
	// var file uintptr at bp+168, 8

	var pc uintptr
	var opnd uintptr
	var codeOffPtr uintptr
	var codeLenPtr uintptr
	var srcOffPtr uintptr
	var srcLenPtr uintptr
	var codeOffset int32
	var codeLength int32
	var sourceOffset int32
	var sourceLength int32
	var i int32
	var val int32
	// var line int32 at bp+176, 4

	// var descriptor [2]uintptr at bp+152, 16

	var localCount int32
	var localPtr uintptr
	var instDesc uintptr
	var address int32
	var desc uintptr
	var desc1 uintptr
	var auxData uintptr
	var auxDesc uintptr
	var rangePtr uintptr
	var cmd uintptr
	codePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	// Get the literals from the bytecode.

	literals = XTcl_NewObj(tls)
	i = 0
__1:
	if !(i < (*ByteCode)(unsafe.Pointer(codePtr)).FnumLitObjects) {
		goto __3
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), literals, *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FobjArrayPtr + uintptr(i)*8)))
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;

	// Get the variables from the bytecode.

	variables = XTcl_NewObj(tls)
	if !((*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr != 0) {
		goto __4
	}
	localCount = (*Proc)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr)).FnumCompiledLocals
	localPtr = (*Proc)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr)).FfirstLocalPtr

	i = 0
__5:
	if !(i < localCount) {
		goto __7
	}

	*(*uintptr)(unsafe.Pointer(bp + 152)) = XTcl_NewObj(tls)
	if !!((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&(VAR_ARRAY|VAR_LINK) != 0) {
		goto __8
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 152)),
		XTcl_NewStringObj(tls, ts+25668, -1))
__8:
	;
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARRAY != 0) {
		goto __9
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 152)),
		XTcl_NewStringObj(tls, ts+25675, -1))
__9:
	;
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_LINK != 0) {
		goto __10
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 152)),
		XTcl_NewStringObj(tls, ts+12727, -1))
__10:
	;
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARGUMENT != 0) {
		goto __11
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 152)),
		XTcl_NewStringObj(tls, ts+25681, -1))
__11:
	;
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_TEMPORARY != 0) {
		goto __12
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 152)),
		XTcl_NewStringObj(tls, ts+25685, -1))
__12:
	;
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_RESOLVED != 0) {
		goto __13
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 152)),
		XTcl_NewStringObj(tls, ts+25690, -1))
__13:
	;
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_TEMPORARY != 0) {
		goto __14
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), variables,
		XTcl_NewListObj(tls, 1, bp+152))
	goto __15
__14:
	*(*uintptr)(unsafe.Pointer(bp + 152 + 1*8)) = XTcl_NewStringObj(tls, localPtr+40, -1)
	XTcl_ListObjAppendElement(tls, uintptr(0), variables,
		XTcl_NewListObj(tls, 2, bp+152))
__15:
	;
	goto __6
__6:
	i++
	localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
	goto __5
	goto __7
__7:
	;
__4:
	;

	// Get the instructions from the bytecode.

	instructions = XTcl_NewObj(tls)
	pc = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart
__16:
	if !(pc < (*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart+uintptr((*ByteCode)(unsafe.Pointer(codePtr)).FnumCodeBytes)) {
		goto __18
	}
	instDesc = uintptr(unsafe.Pointer(&XtclInstructionTable)) + uintptr(*(*uint8)(unsafe.Pointer(pc)))*32
	address = int32((int64(pc) - int64((*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart)) / 1)

	inst = XTcl_NewObj(tls)
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_NewStringObj(tls,
		(*InstructionDesc)(unsafe.Pointer(instDesc)).Fname, -1))
	opnd = pc + uintptr(1)
	i = 0
__19:
	if !(i < (*InstructionDesc)(unsafe.Pointer(instDesc)).FnumOperands) {
		goto __21
	}
	switch *(*InstOperandType)(unsafe.Pointer(instDesc + 20 + uintptr(i)*4)) {
	case OPERAND_INT1:
		goto __23
	case OPERAND_UINT1:
		goto __24
	case OPERAND_INT4:
		goto __25
	case OPERAND_UINT4:
		goto __26

	case OPERAND_OFFSET1:
		goto __27
	case OPERAND_OFFSET4:
		goto __28

	case OPERAND_LIT1:
		goto __29
	case OPERAND_LIT4:
		goto __30

	case OPERAND_LVT1:
		goto __31
	case OPERAND_LVT4:
		goto __32
	case OPERAND_IDX4:
		goto __33
	case OPERAND_AUX4:
		goto __34
	case OPERAND_SCLS1:
		goto __35
	case OPERAND_NONE:
		goto __36
	}
	goto __22
__23:
	val = int32(*(*int8)(unsafe.Pointer(opnd)))
	opnd += uintptr(1)
	goto formatNumber
__24:
	val = int32(uint32(*(*uint8)(unsafe.Pointer(opnd))))
	opnd += uintptr(1)
	goto formatNumber
__25:
	val = int32(uint32(*(*uint8)(unsafe.Pointer(opnd)))<<24) | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(3))))
	opnd += uintptr(4)
	goto formatNumber
__26:
	val = int32(uint32(int32(*(*uint8)(unsafe.Pointer(opnd)))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(opnd + uintptr(3)))))
	opnd += uintptr(4)
formatNumber:
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_NewIntObj(tls, val))
	goto __22

__27:
	val = int32(*(*int8)(unsafe.Pointer(opnd)))
	opnd += uintptr(1)
	goto formatAddress
__28:
	val = int32(uint32(*(*uint8)(unsafe.Pointer(opnd)))<<24) | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(3))))
	opnd += uintptr(4)
formatAddress:
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_ObjPrintf(tls,
		ts+25699, libc.VaList(bp, address+val)))
	goto __22

__29:
	val = int32(uint32(*(*uint8)(unsafe.Pointer(opnd))))
	opnd += uintptr(1)
	goto formatLiteral
__30:
	val = int32(uint32(int32(*(*uint8)(unsafe.Pointer(opnd)))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(opnd + uintptr(3)))))
	opnd += uintptr(4)
formatLiteral:
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_ObjPrintf(tls,
		ts+25705, libc.VaList(bp+8, val)))
	goto __22

__31:
	val = int32(uint32(*(*uint8)(unsafe.Pointer(opnd))))
	opnd += uintptr(1)
	goto formatVariable
__32:
	val = int32(uint32(int32(*(*uint8)(unsafe.Pointer(opnd)))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(opnd + uintptr(3)))))
	opnd += uintptr(4)
formatVariable:
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_ObjPrintf(tls,
		ts+25709, libc.VaList(bp+16, val)))
	goto __22
__33:
	val = int32(uint32(*(*uint8)(unsafe.Pointer(opnd)))<<24) | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(3))))
	opnd += uintptr(4)
	if !(val >= -1) {
		goto __37
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_ObjPrintf(tls,
		ts+25714, libc.VaList(bp+24, val)))
	goto __38
__37:
	if !(val == -2) {
		goto __39
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_NewStringObj(tls,
		ts+25718, -1))
	goto __40
__39:
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_ObjPrintf(tls,
		ts+25723, libc.VaList(bp+32, -2-val)))
__40:
	;
__38:
	;
	goto __22
__34:
	val = int32(uint32(*(*uint8)(unsafe.Pointer(opnd)))<<24) | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(opnd + uintptr(3))))
	opnd += uintptr(4)
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_ObjPrintf(tls,
		ts+25731, libc.VaList(bp+40, val)))
	goto __22
__35:
	val = int32(uint32(*(*uint8)(unsafe.Pointer(opnd))))
	opnd++
	XTcl_ListObjAppendElement(tls, uintptr(0), inst, XTcl_ObjPrintf(tls,
		ts+25735, libc.VaList(bp+48, XtclStringClassTable[val].Fname)))
	goto __22
__36:
	XTcl_Panic(tls, ts+25739, libc.VaList(bp+56, int32(*(*uint8)(unsafe.Pointer(pc)))))
__22:
	;
	goto __20
__20:
	i++
	goto __19
	goto __21
__21:
	;
	XTcl_DictObjPut(tls, uintptr(0), instructions, XTcl_NewIntObj(tls, address), inst)
	pc += uintptr((*InstructionDesc)(unsafe.Pointer(instDesc)).FnumBytes)
	goto __17
__17:
	;
	goto __16
	goto __18
__18:
	;

	// Get the auxiliary data from the bytecode.

	aux = XTcl_NewObj(tls)
	i = 0
__41:
	if !(i < (*ByteCode)(unsafe.Pointer(codePtr)).FnumAuxDataItems) {
		goto __43
	}
	auxData = (*ByteCode)(unsafe.Pointer(codePtr)).FauxDataArrayPtr + uintptr(i)*16
	auxDesc = XTcl_NewStringObj(tls, (*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxData)).Ftype)).Fname, -1)

	if !((*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxData)).Ftype)).FdisassembleProc != 0) {
		goto __44
	}
	desc = XTcl_NewObj(tls)

	XTcl_DictObjPut(tls, uintptr(0), desc, XTcl_NewStringObj(tls, ts+4245, -1), auxDesc)
	auxDesc = desc
	(*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uint32)
	})(unsafe.Pointer(&struct{ uintptr }{(*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxData)).Ftype)).FdisassembleProc})).f(tls, (*AuxData)(unsafe.Pointer(auxData)).FclientData, auxDesc,
		codePtr, uint32(0))
	goto __45
__44:
	if !((*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxData)).Ftype)).FprintProc != 0) {
		goto __46
	}
	desc1 = XTcl_NewObj(tls)

	(*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uint32)
	})(unsafe.Pointer(&struct{ uintptr }{(*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxData)).Ftype)).FprintProc})).f(tls, (*AuxData)(unsafe.Pointer(auxData)).FclientData, desc1, codePtr, uint32(0))
	XTcl_ListObjAppendElement(tls, uintptr(0), auxDesc, desc1)
__46:
	;
__45:
	;
	XTcl_ListObjAppendElement(tls, uintptr(0), aux, auxDesc)
	goto __42
__42:
	i++
	goto __41
	goto __43
__43:
	;

	// Get the exception ranges from the bytecode.

	exn = XTcl_NewObj(tls)
	i = 0
__47:
	if !(i < (*ByteCode)(unsafe.Pointer(codePtr)).FnumExceptRanges) {
		goto __49
	}
	rangePtr = (*ByteCode)(unsafe.Pointer(codePtr)).FexceptArrayPtr + uintptr(i)*28

	switch (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype {
	case LOOP_EXCEPTION_RANGE:
		goto __51
	case CATCH_EXCEPTION_RANGE:
		goto __52
	}
	goto __50
__51:
	XTcl_ListObjAppendElement(tls, uintptr(0), exn, XTcl_ObjPrintf(tls,
		ts+25783,
		libc.VaList(bp+64, ts+19235, (*ExceptionRange)(unsafe.Pointer(rangePtr)).FnestingLevel, (*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset,
			(*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset+(*ExceptionRange)(unsafe.Pointer(rangePtr)).FnumCodeBytes-1,
			(*ExceptionRange)(unsafe.Pointer(rangePtr)).FbreakOffset, (*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset)))
	goto __50
__52:
	XTcl_ListObjAppendElement(tls, uintptr(0), exn, XTcl_ObjPrintf(tls,
		ts+25835,
		libc.VaList(bp+112, ts+5696, (*ExceptionRange)(unsafe.Pointer(rangePtr)).FnestingLevel, (*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset,
			(*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset+(*ExceptionRange)(unsafe.Pointer(rangePtr)).FnumCodeBytes-1,
			(*ExceptionRange)(unsafe.Pointer(rangePtr)).FcatchOffset)))
	goto __50
__50:
	;
	goto __48
__48:
	i++
	goto __47
	goto __49
__49:
	;

	// Get the command information from the bytecode.
	//
	// The way these are encoded in the bytecode is non-trivial; the Decode
	// macro (which updates its argument and returns the next decoded value)
	// handles this so that the rest of the code does not.

	commands = XTcl_NewObj(tls)
	codeOffPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeDeltaStart
	codeLenPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeLengthStart
	srcOffPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FsrcDeltaStart
	srcLenPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FsrcLengthStart
	codeOffset = libc.AssignInt32(&sourceOffset, 0)
	i = 0
__53:
	if !(i < (*ByteCode)(unsafe.Pointer(codePtr)).FnumCommands) {
		goto __55
	}

	codeOffset = codeOffset + func() int32 {
		if uint32(*(*uint8)(unsafe.Pointer(codeOffPtr))) == uint32(0xFF) {
			return func() int32 {
				codeOffPtr += uintptr(5)
				return int32(uint32(*(*uint8)(unsafe.Pointer(codeOffPtr - uintptr(4))))<<24) | int32(*(*uint8)(unsafe.Pointer(codeOffPtr - uintptr(4) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(codeOffPtr - uintptr(4) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(codeOffPtr - uintptr(4) + uintptr(3))))
			}()
		}
		return func() int32 {
			codeOffPtr += uintptr(1)
			return int32(*(*int8)(unsafe.Pointer(codeOffPtr - uintptr(1))))
		}()
	}()
	codeLength = func() int32 {
		if uint32(*(*uint8)(unsafe.Pointer(codeLenPtr))) == uint32(0xFF) {
			return func() int32 {
				codeLenPtr += uintptr(5)
				return int32(uint32(*(*uint8)(unsafe.Pointer(codeLenPtr - uintptr(4))))<<24) | int32(*(*uint8)(unsafe.Pointer(codeLenPtr - uintptr(4) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(codeLenPtr - uintptr(4) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(codeLenPtr - uintptr(4) + uintptr(3))))
			}()
		}
		return func() int32 {
			codeLenPtr += uintptr(1)
			return int32(*(*int8)(unsafe.Pointer(codeLenPtr - uintptr(1))))
		}()
	}()
	sourceOffset = sourceOffset + func() int32 {
		if uint32(*(*uint8)(unsafe.Pointer(srcOffPtr))) == uint32(0xFF) {
			return func() int32 {
				srcOffPtr += uintptr(5)
				return int32(uint32(*(*uint8)(unsafe.Pointer(srcOffPtr - uintptr(4))))<<24) | int32(*(*uint8)(unsafe.Pointer(srcOffPtr - uintptr(4) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(srcOffPtr - uintptr(4) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(srcOffPtr - uintptr(4) + uintptr(3))))
			}()
		}
		return func() int32 { srcOffPtr += uintptr(1); return int32(*(*int8)(unsafe.Pointer(srcOffPtr - uintptr(1)))) }()
	}()
	sourceLength = func() int32 {
		if uint32(*(*uint8)(unsafe.Pointer(srcLenPtr))) == uint32(0xFF) {
			return func() int32 {
				srcLenPtr += uintptr(5)
				return int32(uint32(*(*uint8)(unsafe.Pointer(srcLenPtr - uintptr(4))))<<24) | int32(*(*uint8)(unsafe.Pointer(srcLenPtr - uintptr(4) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(srcLenPtr - uintptr(4) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(srcLenPtr - uintptr(4) + uintptr(3))))
			}()
		}
		return func() int32 { srcLenPtr += uintptr(1); return int32(*(*int8)(unsafe.Pointer(srcLenPtr - uintptr(1)))) }()
	}()
	cmd = XTcl_NewObj(tls)
	XTcl_DictObjPut(tls, uintptr(0), cmd, XTcl_NewStringObj(tls, ts+25875, -1),
		XTcl_NewIntObj(tls, codeOffset))
	XTcl_DictObjPut(tls, uintptr(0), cmd, XTcl_NewStringObj(tls, ts+25884, -1),
		XTcl_NewIntObj(tls, codeOffset+codeLength-1))

	// Convert byte offsets to character offsets; important if multibyte
	// characters are present in the source!

	XTcl_DictObjPut(tls, uintptr(0), cmd, XTcl_NewStringObj(tls, ts+25891, -1),
		XTcl_NewIntObj(tls, XTcl_NumUtfChars(tls, (*ByteCode)(unsafe.Pointer(codePtr)).Fsource,
			sourceOffset)))
	XTcl_DictObjPut(tls, uintptr(0), cmd, XTcl_NewStringObj(tls, ts+25902, -1),
		XTcl_NewIntObj(tls, XTcl_NumUtfChars(tls, (*ByteCode)(unsafe.Pointer(codePtr)).Fsource,
			sourceOffset+sourceLength-1)))
	XTcl_DictObjPut(tls, uintptr(0), cmd, XTcl_NewStringObj(tls, ts+4221, -1),
		XTcl_NewStringObj(tls, (*ByteCode)(unsafe.Pointer(codePtr)).Fsource+uintptr(sourceOffset), sourceLength))
	XTcl_ListObjAppendElement(tls, uintptr(0), commands, cmd)
	goto __54
__54:
	i++
	goto __53
	goto __55
__55:
	;

	// Get the source file and line number information from the CmdFrame
	// system if it is available.

	sGetLocationInformation(tls, (*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr, bp+168, bp+176)

	// Build the overall result.

	description = XTcl_NewObj(tls)
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+25911, -1),
		literals)
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+19162, -1),
		variables)
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+25920, -1), exn)
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+25930, -1),
		instructions)
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+25943, -1), aux)
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+13742, -1),
		commands)
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+4221, -1),
		XTcl_NewStringObj(tls, (*ByteCode)(unsafe.Pointer(codePtr)).Fsource, (*ByteCode)(unsafe.Pointer(codePtr)).FnumSrcBytes))
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+19385, -1),
		XTcl_NewStringObj(tls, (*Namespace)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr)).FfullName, -1))
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+25953, -1),
		XTcl_NewIntObj(tls, (*ByteCode)(unsafe.Pointer(codePtr)).FmaxStackDepth))
	XTcl_DictObjPut(tls, uintptr(0), description, XTcl_NewStringObj(tls, ts+25964, -1),
		XTcl_NewIntObj(tls, (*ByteCode)(unsafe.Pointer(codePtr)).FmaxExceptDepth))
	if !(*(*int32)(unsafe.Pointer(bp + 176)) > -1) {
		goto __56
	}
	XTcl_DictObjPut(tls, uintptr(0), description,
		XTcl_NewStringObj(tls, ts+25976, -1),
		XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 176 /* line */))))
__56:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 168)) != 0) {
		goto __57
	}
	XTcl_DictObjPut(tls, uintptr(0), description,
		XTcl_NewStringObj(tls, ts+25994, -1), *(*uintptr)(unsafe.Pointer(bp + 168 /* file */)))
__57:
	;
	return description
}

//----------------------------------------------------------------------
//
// Tcl_DisassembleObjCmd --
//
//	Implementation of the "::tcl::unsupported::disassemble" command. This
//	command is not documented, but will disassemble procedures, lambda
//	terms and general scripts. Note that will compile terms if necessary
//	in order to disassemble them.
//
//----------------------------------------------------------------------

func XTcl_DisassembleObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclDisassemble.c:1259:1: */
	bp := tls.Alloc(960)
	defer tls.Free(960)

	// var idx int32 at bp+496, 4

	var result int32
	var codeObjPtr uintptr
	var procPtr uintptr
	var hPtr uintptr
	var oPtr uintptr
	var methodPtr uintptr
	// var cmd Command at bp+504, 112

	var nsObjPtr uintptr
	// var nsPtr uintptr at bp+616, 8

	// var cmd1 Command at bp+624, 112

	// var cmd2 Command at bp+736, 112

	// var cmd3 Command at bp+848, 112
	codeObjPtr = uintptr(0)
	procPtr = uintptr(0)

	if !(objc < 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26005)
	return TCL_ERROR
__1:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&types1)), int32(unsafe.Sizeof(uintptr(0))), ts+12847, 0, bp+496) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	switch uint32(*(*int32)(unsafe.Pointer(bp + 496 /* idx */))) {
	case uint32(2) /* DISAS_LAMBDA */ :
		goto __4
	case uint32(5) /* DISAS_PROC */ :
		goto __5
	case uint32(6) /* DISAS_SCRIPT */ :
		goto __6

	case uint32(0) /* DISAS_CLASS_CONSTRUCTOR */ :
		goto __7

	case uint32(1) /* DISAS_CLASS_DESTRUCTOR */ :
		goto __8

	case uint32(3) /* DISAS_CLASS_METHOD */ :
		goto __9
	case uint32(4) /* DISAS_OBJECT_METHOD */ :
		goto __10
	default:
		goto __11
	}
	goto __3
__4:

	// Compile (if uncompiled) and disassemble a lambda term.
	//
	// WARNING! Pokes inside the lambda objtype.

	if !(objc != 3) {
		goto __12
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+26014)
	return TCL_ERROR
__12:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclLambdaType))) {
		goto __13
	}
	procPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32))
__13:
	;
	if !(procPtr == uintptr(0) || (*Proc)(unsafe.Pointer(procPtr)).FiPtr != interp) {
		goto __14
	}
	result = (*struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{XtclLambdaType.FsetFromAnyProc})).f(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(result != TCL_OK) {
		goto __15
	}
	return result
__15:
	;
	procPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32))
__14:
	;

	libc.Xmemset(tls, bp+504, 0, uint64(unsafe.Sizeof(Command{})))
	nsObjPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)) + 32 + 8 /* &.ptr2 */))
	result = XTclGetNamespaceFromObj(tls, interp, nsObjPtr, bp+616)
	if !(result != TCL_OK) {
		goto __16
	}
	return result
__16:
	;
	(*Command)(unsafe.Pointer(bp + 504 /* &cmd */)).FnsPtr = *(*uintptr)(unsafe.Pointer(bp + 616 /* nsPtr */))
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = bp + 504 /* &cmd */
	result = XTclPushProcCallFrame(tls, procPtr, interp, objc, objv, 1)
	if !(result != TCL_OK) {
		goto __17
	}
	return result
__17:
	;
	XTclPopStackFrame(tls, interp)
	codeObjPtr = (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr
	goto __3

__5:
	if !(objc != 3) {
		goto __18
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+26025)
	return TCL_ERROR
__18:
	;

	procPtr = XTclFindProc(tls, interp, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}())
	if !(procPtr == uintptr(0)) {
		goto __19
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+14110, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26034,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__19:
	;

	// Compile (if uncompiled) and disassemble a procedure.

	result = XTclPushProcCallFrame(tls, procPtr, interp, 2, objv+uintptr(1)*8, 1)
	if !(result != TCL_OK) {
		goto __20
	}
	return result
__20:
	;
	XTclPopStackFrame(tls, interp)
	codeObjPtr = (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr
	goto __3
__6:
	// Compile and disassemble a script.

	if !(objc != 3) {
		goto __21
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+4221)
	return TCL_ERROR
__21:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FtypePtr != uintptr(unsafe.Pointer(&XtclByteCodeType)) &&
		XTclSetByteCodeFromAny(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0), uintptr(0)) != TCL_OK) {
		goto __22
	}
	return TCL_ERROR
__22:
	;
	codeObjPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	goto __3

__7:
	if !(objc != 3) {
		goto __23
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+26039)
	return TCL_ERROR
__23:
	;

	// Look up the body of a constructor.

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(oPtr == uintptr(0)) {
		goto __24
	}
	return TCL_ERROR
__24:
	;
	if !((*Object)(unsafe.Pointer(oPtr)).FclassPtr == uintptr(0)) {
		goto __25
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26049, libc.VaList(bp+48, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+4178, ts+7699, ts+26069,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__25:
	;

	methodPtr = (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).FconstructorPtr
	if !(methodPtr == uintptr(0)) {
		goto __26
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26075,
		libc.VaList(bp+96, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+4178, ts+7949, ts+26107,
		ts+26119, uintptr(0)))
	return TCL_ERROR
__26:
	;
	procPtr = XTclOOGetProcFromMethod(tls, methodPtr)
	if !(procPtr == uintptr(0)) {
		goto __27
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+26130, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+144, ts+4178, ts+7949, ts+26107,
		ts+26178, uintptr(0)))
	return TCL_ERROR
__27:
	;

	// Compile if necessary.

	if !((*Tcl_Obj)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FbodyPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclByteCodeType))) {
		goto __28
	}

	// Yes, this is ugly, but we need to pass the namespace in to the
	// compiler in two places.

	(*Command)(unsafe.Pointer(bp + 624 /* &cmd1 */)).FnsPtr = (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = bp + 624 /* &cmd1 */
	result = XTclProcCompileProc(tls, interp, procPtr, (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr,
		(*Object)(unsafe.Pointer(oPtr)).FnamespacePtr, ts+26189,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = uintptr(0)
	if !(result != TCL_OK) {
		goto __29
	}
	return result
__29:
	;
__28:
	;
	codeObjPtr = (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr
	goto __3

__8:
	if !(objc != 3) {
		goto __30
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+26039)
	return TCL_ERROR
__30:
	;

	// Look up the body of a destructor.

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(oPtr == uintptr(0)) {
		goto __31
	}
	return TCL_ERROR
__31:
	;
	if !((*Object)(unsafe.Pointer(oPtr)).FclassPtr == uintptr(0)) {
		goto __32
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26049, libc.VaList(bp+184, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+192, ts+4178, ts+7699, ts+26069,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__32:
	;

	methodPtr = (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).FdestructorPtr
	if !(methodPtr == uintptr(0)) {
		goto __33
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26209,
		libc.VaList(bp+232, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+240, ts+4178, ts+7949, ts+26107,
		ts+26240, uintptr(0)))
	return TCL_ERROR
__33:
	;
	procPtr = XTclOOGetProcFromMethod(tls, methodPtr)
	if !(procPtr == uintptr(0)) {
		goto __34
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+26250, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+280, ts+4178, ts+7949, ts+26107,
		ts+26178, uintptr(0)))
	return TCL_ERROR
__34:
	;

	// Compile if necessary.

	if !((*Tcl_Obj)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FbodyPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclByteCodeType))) {
		goto __35
	}

	// Yes, this is ugly, but we need to pass the namespace in to the
	// compiler in two places.

	(*Command)(unsafe.Pointer(bp + 736 /* &cmd2 */)).FnsPtr = (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = bp + 736 /* &cmd2 */
	result = XTclProcCompileProc(tls, interp, procPtr, (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr,
		(*Object)(unsafe.Pointer(oPtr)).FnamespacePtr, ts+26297,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = uintptr(0)
	if !(result != TCL_OK) {
		goto __36
	}
	return result
__36:
	;
__35:
	;
	codeObjPtr = (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr
	goto __3

__9:
	if !(objc != 4) {
		goto __37
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+26316)
	return TCL_ERROR
__37:
	;

	// Look up the body of a class method.

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(oPtr == uintptr(0)) {
		goto __38
	}
	return TCL_ERROR
__38:
	;
	if !((*Object)(unsafe.Pointer(oPtr)).FclassPtr == uintptr(0)) {
		goto __39
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26049, libc.VaList(bp+320, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+328, ts+4178, ts+7699, ts+26069,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__39:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr + 112 /* &.classMethods */)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr+112 /* &.classMethods */, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	goto methodBody
__10:
	if !(objc != 4) {
		goto __40
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+26337)
	return TCL_ERROR
__40:
	;

	// Look up the body of an instance method.

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(oPtr == uintptr(0)) {
		goto __41
	}
	return TCL_ERROR
__41:
	;
	if !((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr == uintptr(0)) {
		goto __42
	}
	goto unknownMethod
__42:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, *(*uintptr)(unsafe.Pointer(objv + 3*8)))

	// Compile (if necessary) and disassemble a method body.

methodBody:
	if !(hPtr == uintptr(0)) {
		goto __43
	}
unknownMethod:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26359, libc.VaList(bp+368, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+376, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__43:
	;
	procPtr = XTclOOGetProcFromMethod(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	if !(procPtr == uintptr(0)) {
		goto __44
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+26386, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+416, ts+4178, ts+7949, ts+26107,
		ts+26178, uintptr(0)))
	return TCL_ERROR
__44:
	;
	if !((*Tcl_Obj)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FbodyPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclByteCodeType))) {
		goto __45
	}

	// Yes, this is ugly, but we need to pass the namespace in to the
	// compiler in two places.

	(*Command)(unsafe.Pointer(bp + 848 /* &cmd3 */)).FnsPtr = (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = bp + 848 /* &cmd3 */
	result = XTclProcCompileProc(tls, interp, procPtr, (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr,
		(*Object)(unsafe.Pointer(oPtr)).FnamespacePtr, ts+26429,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
		}())
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = uintptr(0)
	if !(result != TCL_OK) {
		goto __46
	}
	return result
__46:
	;
__45:
	;
	codeObjPtr = (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr
	goto __3
__11:
	;
__3:
	;

	// Do the actual disassembly.

	if !((*ByteCode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(codeObjPtr + 32)))).Fflags&uint32(TCL_BYTECODE_PRECOMPILED) != 0) {
		goto __47
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+26444, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+456, ts+4178, ts+7949, ts+26107,
		ts+26482, uintptr(0)))
	return TCL_ERROR
__47:
	;
	if !(int32(clientData) != 0) {
		goto __48
	}
	XTcl_SetObjResult(tls, interp,
		sDisassembleByteCodeAsDicts(tls, interp, codeObjPtr))
	goto __49
__48:
	XTcl_SetObjResult(tls, interp,
		sDisassembleByteCodeObj(tls, interp, codeObjPtr))
__49:
	;
	return TCL_OK
}

var types1 = [8]uintptr{
	ts + 26491, ts + 26503,
	ts + 26514, ts + 26521, ts + 26528, ts + 5857, ts + 4221, uintptr(0),
} /* tclDisassemble.c:1265:23 */

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// End:

// The following data structure represents an encoding, which describes how to
// convert between various character sets and UTF-8.

type Encoding = struct {
	Fname        uintptr
	FtoUtfProc   uintptr
	FfromUtfProc uintptr
	FfreeProc    uintptr
	FnullSize    int32
	F__ccgo_pad1 [4]byte
	FclientData  ClientData
	FlengthProc  uintptr
	FrefCount    int32
	F__ccgo_pad2 [4]byte
	FhPtr        uintptr
} /* tclEncoding.c:51:3 */

// The following structure is the clientData for a dynamically-loaded,
// table-driven encoding created by LoadTableEncoding(). It maps between
// Unicode and a single-byte, double-byte, or multibyte (1 or 2 bytes only)
// encoding.

type TableEncodingData = struct {
	Ffallback    int32
	FprefixBytes [256]int8
	F__ccgo_pad1 [4]byte
	FtoUnicode   uintptr
	FfromUnicode uintptr
} /* tclEncoding.c:83:3 */

// Each of the following structures is the clientData for a dynamically-loaded
// escape-driven encoding that is itself comprised of other simpler encodings.
// An example is "iso-2022-jp", which uses escape sequences to switch between
// ascii, jis0208, jis0212, gb2312, and ksc5601. Note that "escape-driven"
// does not necessarily mean that the ESCAPE character is the character used
// for switching character sets.

type EscapeSubTable = struct {
	FsequenceLen uint32
	Fsequence    [16]int8
	Fname        [32]int8
	F__ccgo_pad1 [4]byte
	FencodingPtr uintptr
} /* tclEncoding.c:101:3 */

type EscapeEncodingData = struct {
	F__ccgo_pad1  [0]uint64
	Ffallback     int32
	FinitLen      uint32
	Finit         [16]int8
	FfinalLen     uint32
	Ffinal        [16]int8
	FprefixBytes  [256]int8
	FnumSubTables int32
}                                                     /* tclEncoding.c:123:3 */
var encodingSearchPath = ProcessGlobalValue{Fproc: 0} /* tclEncoding.c:141:27 */

// A map from encoding names to the directories in which their data files have
// been seen. The string value of the map is shared by all threads. Access to
// the shared string is governed by a mutex lock.

var encodingFileMap = ProcessGlobalValue{} /* tclEncoding.c:151:27 */

// A list of directories making up the "library path". Historically this
// search path has served many uses, but the only one remaining is a base for
// the encodingSearchPath above. If the application does not explicitly set
// the encodingSearchPath, then it is initialized by appending /encoding
// to each directory in this "libraryPath".

var libraryPath = ProcessGlobalValue{Fproc: 0} /* tclEncoding.c:163:27 */

var encodingsInitialized int32 = 0 /* tclEncoding.c:167:12 */

// Hash table that keeps track of all loaded Encodings. Keys are the string
// names that represent the encoding, values are (Encoding *).

var encodingTable Tcl_HashTable /* tclEncoding.c:174:22: */

// The following are used to hold the default and current system encodings.
// If NULL is passed to one of the conversion routines, the current setting of
// the system encoding is used to perform the conversion.

var defaultEncoding Tcl_Encoding = uintptr(0)      /* tclEncoding.c:183:21 */
var systemEncoding Tcl_Encoding = uintptr(0)       /* tclEncoding.c:184:21 */
var XtclIdentityEncoding Tcl_Encoding = uintptr(0) /* tclEncoding.c:185:14 */

// The following variable is used in the sparse matrix code for a
// TableEncoding to represent a page in the table that has no entries.

var emptyPage [256]uint16 /* tclEncoding.c:192:23: */

// A Tcl_ObjType for holding a cached Tcl_Encoding in the twoPtrValue.ptr1 field
// of the internalrep. This should help the lifetime of encodings be more useful.
// See concerns raised in [Bug 1077262].

var encodingType = Tcl_ObjType{
	Fname: ts + 12191, FfreeIntRepProc: 0, FdupIntRepProc: 0,
} /* tclEncoding.c:269:26 */

//----------------------------------------------------------------------
//
// Tcl_GetEncodingFromObj --
//
//	Writes to (*encodingPtr) the Tcl_Encoding value of (*objPtr), if
//	possible, and returns TCL_OK. If no such encoding exists, TCL_ERROR is
//	returned, and if interp is non-NULL, an error message is written
//	there.
//
// Results:
//	Standard Tcl return code.
//
// Side effects:
//	Caches the Tcl_Encoding value as the internal rep of (*objPtr).
//
//----------------------------------------------------------------------

func XTcl_GetEncodingFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, encodingPtr uintptr) int32 { /* tclEncoding.c:293:1: */
	var name uintptr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&encodingType)) {
		var encoding Tcl_Encoding = XTcl_GetEncoding(tls, interp, name)

		if encoding == uintptr(0) {
			return TCL_ERROR
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}

		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = encoding
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&encodingType))
	}
	*(*Tcl_Encoding)(unsafe.Pointer(encodingPtr)) = XTcl_GetEncoding(tls, uintptr(0), name)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FreeEncodingInternalRep --
//
//	The Tcl_FreeInternalRepProc for the "encoding" Tcl_ObjType.
//
//----------------------------------------------------------------------

func sFreeEncodingInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclEncoding.c:325:1: */
	XTcl_FreeEncoding(tls, *(*uintptr)(unsafe.Pointer(objPtr + 32)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DupEncodingInternalRep --
//
//	The Tcl_DupInternalRepProc for the "encoding" Tcl_ObjType.
//
//----------------------------------------------------------------------

func sDupEncodingInternalRep(tls *libc.TLS, srcPtr uintptr, dupPtr uintptr) { /* tclEncoding.c:343:1: */
	*(*uintptr)(unsafe.Pointer(dupPtr + 32)) = XTcl_GetEncoding(tls, uintptr(0), (*Tcl_Obj)(unsafe.Pointer(srcPtr)).Fbytes)
}

//----------------------------------------------------------------------
//
// Tcl_GetEncodingSearchPath --
//
//	Keeps the per-thread copy of the encoding search path current with
//	changes to the global copy.
//
// Results:
//	Returns a "list" (Tcl_Obj *) that contains the encoding search path.
//
//----------------------------------------------------------------------

func XTcl_GetEncodingSearchPath(tls *libc.TLS) uintptr { /* tclEncoding.c:364:9: */
	return XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&encodingSearchPath)))
}

//----------------------------------------------------------------------
//
// Tcl_SetEncodingSearchPath --
//
//	Keeps the per-thread copy of the encoding search path current with
//	changes to the global copy.
//
//----------------------------------------------------------------------

func XTcl_SetEncodingSearchPath(tls *libc.TLS, searchPath uintptr) int32 { /* tclEncoding.c:382:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var dummy int32 at bp, 4

	if TCL_ERROR == XTcl_ListObjLength(tls, uintptr(0), searchPath, bp) {
		return TCL_ERROR
	}
	XTclSetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&encodingSearchPath)), searchPath, uintptr(0))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclGetLibraryPath --
//
//	Keeps the per-thread copy of the library path current with changes to
//	the global copy.
//
// Results:
//	Returns a "list" (Tcl_Obj *) that contains the library path.
//
//----------------------------------------------------------------------

func XTclGetLibraryPath(tls *libc.TLS) uintptr { /* tclEncoding.c:408:9: */
	return XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&libraryPath)))
}

//----------------------------------------------------------------------
//
// TclSetLibraryPath --
//
//	Keeps the per-thread copy of the library path current with changes to
//	the global copy.
//
//	Since the result of this routine is void, if searchPath is not a valid
//	list this routine silently does nothing.
//
//----------------------------------------------------------------------

func XTclSetLibraryPath(tls *libc.TLS, path uintptr) { /* tclEncoding.c:429:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var dummy int32 at bp, 4

	if TCL_ERROR == XTcl_ListObjLength(tls, uintptr(0), path, bp) {
		return
	}
	XTclSetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&libraryPath)), path, uintptr(0))
}

//---------------------------------------------------------------------------
//
// FillEncodingFileMap --
//
//	Called to update the encoding file map with the current value
//	of the encoding search path.
//
//	Finds *.end files in the directories on the encoding search path and
//	stores the found pathnames in a map associated with the encoding name.
//
//	If $dir is on the encoding search path and the file $dir/foo.enc is
//	found, stores a "foo" -> $dir entry in the map.  if the "foo" encoding
//	is needed later, the $dir/foo.enc name can be quickly constructed in
//	order to read the encoding data.
//
// Results:
//	None.
//
// Side effects:
//	Entries are added to the encoding file map.
//
//---------------------------------------------------------------------------

func sFillEncodingFileMap(tls *libc.TLS) { /* tclEncoding.c:466:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var i int32
	*(*int32)(unsafe.Pointer(bp /* numDirs */)) = 0
	var map1 uintptr
	var searchPath uintptr

	searchPath = XTcl_GetEncodingSearchPath(tls)
	(*Tcl_Obj)(unsafe.Pointer(searchPath)).FrefCount++
	XTcl_ListObjLength(tls, uintptr(0), searchPath, bp)
	map1 = XTcl_NewDictObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(map1)).FrefCount++

	for i = *(*int32)(unsafe.Pointer(bp)) - 1; i >= 0; i-- {
		// Iterate backwards through the search path so as we overwrite
		// entries found, we favor files earlier on the search path.

		var j int32
		// var numFiles int32 at bp+40, 4

		// var directory uintptr at bp+8, 8

		var matchFileList uintptr = XTcl_NewObj(tls)
		// var filev uintptr at bp+48, 8

		*(*Tcl_GlobTypeData)(unsafe.Pointer(bp + 16 /* readableFiles */)) = Tcl_GlobTypeData{
			Ftype: int32(1) << 4, Fperm: int32(1) << 2,
		}

		XTcl_ListObjIndex(tls, uintptr(0), searchPath, i, bp+8)
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FrefCount++
		(*Tcl_Obj)(unsafe.Pointer(matchFileList)).FrefCount++
		XTcl_FSMatchInDirectory(tls, uintptr(0), matchFileList, *(*uintptr)(unsafe.Pointer(bp + 8 /* directory */)), ts+26538,
			bp+16)

		XTcl_ListObjGetElements(tls, uintptr(0), matchFileList, bp+40, bp+48)
		for j = 0; j < *(*int32)(unsafe.Pointer(bp + 40 /* numFiles */)); j++ {
			var encodingName uintptr
			var fileObj uintptr

			fileObj = XTclPathPart(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* filev */)) + uintptr(j)*8)), TCL_PATH_TAIL)
			encodingName = XTclPathPart(tls, uintptr(0), fileObj, TCL_PATH_ROOT)
			XTcl_DictObjPut(tls, uintptr(0), map1, encodingName, *(*uintptr)(unsafe.Pointer(bp + 8 /* directory */)))
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = fileObj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = encodingName
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = matchFileList
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _objPtr uintptr = searchPath
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTclSetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&encodingFileMap)), map1, uintptr(0))
	for ok5 := true; ok5; ok5 = 0 != 0 {
		var _objPtr uintptr = map1
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

//---------------------------------------------------------------------------
//
// TclInitEncodingSubsystem --
//
//	Initialize all resources used by this subsystem on a per-process
//	basis.
//
// Results:
//	None.
//
// Side effects:
//	Depends on the memory, object, and IO subsystems.
//
//---------------------------------------------------------------------------

func XTclInitEncodingSubsystem(tls *libc.TLS) { /* tclEncoding.c:532:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var type1 Tcl_EncodingType at bp+8, 48

	var dataPtr uintptr
	var size uint32
	var i uint16
	// var isLe struct {F__ccgo_pad1 [0]uint16;Fc int8;F__ccgo_pad2 [1]byte;} at bp, 2

	if encodingsInitialized != 0 {
		return
	}

	*(*int16)(unsafe.Pointer(bp)) = int16(1)

	XTcl_InitHashTable(tls, uintptr(unsafe.Pointer(&encodingTable)), 0)

	// Create a few initial encodings.  UTF-8 to UTF-8 translation is not a
	// no-op because it turns a stream of improperly formed UTF-8 into a
	// properly formed stream.

	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FencodingName = ts + 26544 /* "identity" */
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FtoUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sBinaryProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FfromUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sBinaryProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FfreeProc = uintptr(0)
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FnullSize = 1
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FclientData = uintptr(0)
	XtclIdentityEncoding = XTcl_CreateEncoding(tls, bp+8)

	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FencodingName = ts + 26553 /* "utf-8" */
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FtoUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sUtfExtToUtfIntProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FfromUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sUtfIntToUtfExtProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FfreeProc = uintptr(0)
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FnullSize = 1
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FclientData = uintptr(0)
	XTcl_CreateEncoding(tls, bp+8)

	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FencodingName = ts + 26559 /* "unicode" */
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FtoUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sUnicodeToUtfProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FfromUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sUtfToUnicodeProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FfreeProc = uintptr(0)
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FnullSize = 2
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FclientData = uintptr(Intptr_t(*(*int8)(unsafe.Pointer(bp))))
	XTcl_CreateEncoding(tls, bp+8)

	// Need the iso8859-1 encoding in order to process binary data, so force
	// it to always be embedded. Note that this encoding *must* be a proper
	// table encoding or some of the escape encodings crash! Hence the ugly
	// code to duplicate the structure of a table encoding here.

	dataPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TableEncodingData{})))
	libc.Xmemset(tls, dataPtr, 0, uint64(unsafe.Sizeof(TableEncodingData{})))
	(*TableEncodingData)(unsafe.Pointer(dataPtr)).Ffallback = '?'

	size = uint32(uint64(256) * (uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(uint16(0)))))
	(*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode = XTcl_Alloc(tls, size)
	libc.Xmemset(tls, (*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode, 0, uint64(size))
	(*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode = XTcl_Alloc(tls, size)
	libc.Xmemset(tls, (*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode, 0, uint64(size))

	*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode)) = (*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode + uintptr(256)*8
	*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode)) = (*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode + uintptr(256)*8
	for i = uint16(1); int32(i) < 256; i++ {
		*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode + uintptr(i)*8)) = uintptr(unsafe.Pointer(&emptyPage))
		*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode + uintptr(i)*8)) = uintptr(unsafe.Pointer(&emptyPage))
	}

	for i = uint16(0); int32(i) < 256; i++ {
		*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode)) + uintptr(i)*2)) = i
		*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode)) + uintptr(i)*2)) = i
	}

	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FencodingName = ts + 26567 /* "iso8859-1" */
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FtoUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sIso88591ToUtfProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FfromUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sIso88591FromUtfProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FfreeProc = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sTableFreeProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FnullSize = 1
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 8 /* &type1 */)).FclientData = dataPtr
	defaultEncoding = XTcl_CreateEncoding(tls, bp+8)
	systemEncoding = XTcl_GetEncoding(tls, uintptr(0), (*Tcl_EncodingType)(unsafe.Pointer(bp+8 /* &type1 */)).FencodingName)

	encodingsInitialized = 1
}

//----------------------------------------------------------------------
//
// TclFinalizeEncodingSubsystem --
//
//	Release the state associated with the encoding subsystem.
//
// Results:
//	None.
//
// Side effects:
//	Frees all of the encodings.
//
//----------------------------------------------------------------------

func XTclFinalizeEncodingSubsystem(tls *libc.TLS) { /* tclEncoding.c:640:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var search Tcl_HashSearch at bp, 24

	var hPtr uintptr

	encodingsInitialized = 0
	sFreeEncoding(tls, systemEncoding)
	systemEncoding = uintptr(0)
	defaultEncoding = uintptr(0)
	sFreeEncoding(tls, XtclIdentityEncoding)
	XtclIdentityEncoding = uintptr(0)

	hPtr = XTcl_FirstHashEntry(tls, uintptr(unsafe.Pointer(&encodingTable)), bp)
	for hPtr != uintptr(0) {
		// Call FreeEncoding instead of doing it directly to handle refcounts
		// like escape encodings use. [Bug 524674] Make sure to call
		// Tcl_FirstHashEntry repeatedly so that all encodings are eventually
		// cleaned up.

		sFreeEncoding(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
		hPtr = XTcl_FirstHashEntry(tls, uintptr(unsafe.Pointer(&encodingTable)), bp)
	}

	XTcl_DeleteHashTable(tls, uintptr(unsafe.Pointer(&encodingTable)))

}

//-------------------------------------------------------------------------
//
// Tcl_GetDefaultEncodingDir --
//
//	Legacy public interface to retrieve first directory in the encoding
//	searchPath.
//
// Results:
//	The directory pathname, as a string, or NULL for an empty encoding
//	search path.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func XTcl_GetDefaultEncodingDir(tls *libc.TLS) uintptr { /* tclEncoding.c:688:12: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var numDirs int32 at bp, 4

	// var first uintptr at bp+8, 8

	var searchPath uintptr = XTcl_GetEncodingSearchPath(tls)

	XTcl_ListObjLength(tls, uintptr(0), searchPath, bp)
	if *(*int32)(unsafe.Pointer(bp)) == 0 {
		return uintptr(0)
	}
	XTcl_ListObjIndex(tls, uintptr(0), searchPath, 0, bp+8)

	return func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 8)))
	}()
}

//-------------------------------------------------------------------------
//
// Tcl_SetDefaultEncodingDir --
//
//	Legacy public interface to set the first directory in the encoding
//	search path.
//
// Results:
//	None.
//
// Side effects:
//	Modifies the encoding search path.
//
//-------------------------------------------------------------------------

func XTcl_SetDefaultEncodingDir(tls *libc.TLS, path uintptr) { /* tclEncoding.c:721:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var searchPath uintptr = XTcl_GetEncodingSearchPath(tls)
	*(*uintptr)(unsafe.Pointer(bp /* directory */)) = XTcl_NewStringObj(tls, path, -1)

	searchPath = XTcl_DuplicateObj(tls, searchPath)
	XTcl_ListObjReplace(tls, uintptr(0), searchPath, 0, 0, 1, bp)
	XTcl_SetEncodingSearchPath(tls, searchPath)
}

//-------------------------------------------------------------------------
//
// Tcl_GetEncoding --
//
//	Given the name of a encoding, find the corresponding Tcl_Encoding
//	token. If the encoding did not already exist, Tcl attempts to
//	dynamically load an encoding by that name.
//
// Results:
//	Returns a token that represents the encoding. If the name didn't refer
//	to any known or loadable encoding, NULL is returned. If NULL was
//	returned, an error message is left in interp's result object, unless
//	interp was NULL.
//
// Side effects:
//	LoadEncodingFile is called if necessary.
//
//-------------------------------------------------------------------------

func XTcl_GetEncoding(tls *libc.TLS, interp uintptr, name uintptr) Tcl_Encoding { /* tclEncoding.c:754:1: */
	var hPtr uintptr
	var encodingPtr uintptr

	if name == uintptr(0) {
		encodingPtr = systemEncoding
		(*Encoding)(unsafe.Pointer(encodingPtr)).FrefCount++

		return systemEncoding
	}

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingTable)))).FfindProc})).f(tls, uintptr(unsafe.Pointer(&encodingTable)), name)
	if hPtr != uintptr(0) {
		encodingPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		(*Encoding)(unsafe.Pointer(encodingPtr)).FrefCount++

		return encodingPtr
	}

	return sLoadEncodingFile(tls, interp, name)
}

//---------------------------------------------------------------------------
//
// Tcl_FreeEncoding --
//
//	Releases an encoding allocated by Tcl_CreateEncoding() or
//	Tcl_GetEncoding().
//
// Results:
//	None.
//
// Side effects:
//	The reference count associated with the encoding is decremented and
//	the encoding is deleted if nothing is using it anymore.
//
//---------------------------------------------------------------------------

func XTcl_FreeEncoding(tls *libc.TLS, encoding Tcl_Encoding) { /* tclEncoding.c:800:1: */

	sFreeEncoding(tls, encoding)

}

//----------------------------------------------------------------------
//
// FreeEncoding --
//
//	Decrements the reference count of an encoding.  The caller must hold
//	encodingMutes.
//
// Results:
//	None.
//
// Side effects:
//	Releases the resource for an encoding if it is now unused.
//	The reference count associated with the encoding is decremented and
//	the encoding may be deleted if nothing is using it anymore.
//
//----------------------------------------------------------------------

func sFreeEncoding(tls *libc.TLS, encoding Tcl_Encoding) { /* tclEncoding.c:828:1: */
	var encodingPtr uintptr = encoding

	if encodingPtr == uintptr(0) {
		return
	}
	if (*Encoding)(unsafe.Pointer(encodingPtr)).FrefCount <= 0 {
		XTcl_Panic(tls, ts+26577, 0)
	}
	if libc.PostDecInt32(&(*Encoding)(unsafe.Pointer(encodingPtr)).FrefCount, 1) <= 1 {
		if (*Encoding)(unsafe.Pointer(encodingPtr)).FfreeProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Encoding)(unsafe.Pointer(encodingPtr)).FfreeProc})).f(tls, (*Encoding)(unsafe.Pointer(encodingPtr)).FclientData)
		}
		if (*Encoding)(unsafe.Pointer(encodingPtr)).FhPtr != uintptr(0) {
			XTcl_DeleteHashEntry(tls, (*Encoding)(unsafe.Pointer(encodingPtr)).FhPtr)
		}
		if (*Encoding)(unsafe.Pointer(encodingPtr)).Fname != 0 {
			XTclpFree(tls, (*Encoding)(unsafe.Pointer(encodingPtr)).Fname)
		}
		XTclpFree(tls, encodingPtr)
	}
}

//-------------------------------------------------------------------------
//
// Tcl_GetEncodingName --
//
//	Given an encoding, return the name that was used to constuct the
//	encoding.
//
// Results:
//	The name of the encoding.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_GetEncodingName(tls *libc.TLS, encoding Tcl_Encoding) uintptr { /* tclEncoding.c:870:12: */
	if encoding == uintptr(0) {
		encoding = systemEncoding
	}

	return (*Encoding)(unsafe.Pointer(encoding)).Fname
}

//-------------------------------------------------------------------------
//
// Tcl_GetEncodingNames --
//
//	Get the list of all known encodings, including the ones stored as
//	files on disk in the encoding path.
//
// Results:
//	Modifies interp's result object to hold a list of all the available
//	encodings.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func XTcl_GetEncodingNames(tls *libc.TLS, interp uintptr) { /* tclEncoding.c:900:1: */
	bp := tls.Alloc(156)
	defer tls.Free(156)

	// var table Tcl_HashTable at bp, 88

	// var search Tcl_HashSearch at bp+88, 24

	var hPtr uintptr
	var map1 uintptr
	// var name uintptr at bp+144, 8

	var result uintptr = XTcl_NewObj(tls)
	// var mapSearch Tcl_DictSearch at bp+120, 24

	// var dummy int32 at bp+112, 4

	*(*int32)(unsafe.Pointer(bp + 152 /* done */)) = 0

	XTcl_InitObjHashTable(tls, bp)

	// Copy encoding names from loaded encoding table to table.

	for hPtr = XTcl_FirstHashEntry(tls, uintptr(unsafe.Pointer(&encodingTable)), bp+88); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp+88) {
		var encodingPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		(*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &table */)).FcreateProc})).f(tls, bp /* &table */, XTcl_NewStringObj(tls, (*Encoding)(unsafe.Pointer(encodingPtr)).Fname, -1), bp+112 /* &dummy */)
	}

	sFillEncodingFileMap(tls)
	map1 = XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&encodingFileMap)))

	// Copy encoding names from encoding file map to table.

	XTcl_DictObjFirst(tls, uintptr(0), map1, bp+120, bp+144, uintptr(0), bp+152)
	for ; !(*(*int32)(unsafe.Pointer(bp + 152)) != 0); XTcl_DictObjNext(tls, bp+120, bp+144, uintptr(0), bp+152) {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &table */)).FcreateProc})).f(tls, bp /* &table */, *(*uintptr)(unsafe.Pointer(bp + 144 /* name */)), bp+112 /* &dummy */)
	}

	// Pull all encoding names from table into the result list.

	for hPtr = XTcl_FirstHashEntry(tls, bp, bp+88); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp+88) {
		XTcl_ListObjAppendElement(tls, uintptr(0), result,
			func() uintptr {
				if (*Tcl_HashTable)(unsafe.Pointer(bp)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(bp)).FkeyType == -1 {
					return *(*uintptr)(unsafe.Pointer(hPtr + 32))
				}
				return hPtr + 32
			}())
	}
	XTcl_SetObjResult(tls, interp, result)
	XTcl_DeleteHashTable(tls, bp)
}

//------------------------------------------------------------------------
//
// Tcl_SetSystemEncoding --
//
//	Sets the default encoding that should be used whenever the user passes
//	a NULL value in to one of the conversion routines. If the supplied
//	name is NULL, the system encoding is reset to the default system
//	encoding.
//
// Results:
//	The return value is TCL_OK if the system encoding was successfully set
//	to the encoding specified by name, TCL_ERROR otherwise. If TCL_ERROR
//	is returned, an error message is left in interp's result object,
//	unless interp was NULL.
//
// Side effects:
//	The reference count of the new system encoding is incremented. The
//	reference count of the old system encoding is decremented and it may
//	be freed. All VFS cached information is invalidated.
//
//------------------------------------------------------------------------

func XTcl_SetSystemEncoding(tls *libc.TLS, interp uintptr, name uintptr) int32 { /* tclEncoding.c:976:1: */
	var encoding Tcl_Encoding
	var encodingPtr uintptr

	if !(name != 0) || !(int32(*(*int8)(unsafe.Pointer(name))) != 0) {

		encoding = defaultEncoding
		encodingPtr = encoding
		(*Encoding)(unsafe.Pointer(encodingPtr)).FrefCount++

	} else {
		encoding = XTcl_GetEncoding(tls, interp, name)
		if encoding == uintptr(0) {
			return TCL_ERROR
		}
	}

	sFreeEncoding(tls, systemEncoding)
	systemEncoding = encoding

	XTcl_FSMountsChanged(tls, uintptr(0))

	return TCL_OK
}

//---------------------------------------------------------------------------
//
// Tcl_CreateEncoding --
//
//	Defines a new encoding, along with the functions that are used to
//	convert to and from Unicode.
//
// Results:
//	Returns a token that represents the encoding. If an encoding with the
//	same name already existed, the old encoding token remains valid and
//	continues to behave as it used to, and is eventually garbage collected
//	when the last reference to it goes away. Any subsequent calls to
//	Tcl_GetEncoding with the specified name retrieve the most recent
//	encoding token.
//
// Side effects:
//	A new record having the name of the encoding is entered into a table of
//	encodings visible to all interpreters.  For each call to this function,
//	there should eventually be a call to Tcl_FreeEncoding, which cleans
//	deletes the record in the table when an encoding is no longer needed.
//
//---------------------------------------------------------------------------

func XTcl_CreateEncoding(tls *libc.TLS, typePtr uintptr) Tcl_Encoding { /* tclEncoding.c:1032:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var hPtr uintptr
	// var isNew int32 at bp, 4

	var encodingPtr uintptr
	var name uintptr

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingTable)))).FcreateProc})).f(tls, uintptr(unsafe.Pointer(&encodingTable)), (*Tcl_EncodingType)(unsafe.Pointer(typePtr)).FencodingName, bp /* &isNew */)
	if *(*int32)(unsafe.Pointer(bp)) == 0 {
		// Remove old encoding from hash table, but don't delete it until last
		// reference goes away.

		encodingPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		(*Encoding)(unsafe.Pointer(encodingPtr)).FhPtr = uintptr(0)
	}

	name = XTcl_Alloc(tls, uint32(libc.Xstrlen(tls, (*Tcl_EncodingType)(unsafe.Pointer(typePtr)).FencodingName)+uint64(1)))

	encodingPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Encoding{})))
	(*Encoding)(unsafe.Pointer(encodingPtr)).Fname = libc.Xstrcpy(tls, name, (*Tcl_EncodingType)(unsafe.Pointer(typePtr)).FencodingName)
	(*Encoding)(unsafe.Pointer(encodingPtr)).FtoUtfProc = (*Tcl_EncodingType)(unsafe.Pointer(typePtr)).FtoUtfProc
	(*Encoding)(unsafe.Pointer(encodingPtr)).FfromUtfProc = (*Tcl_EncodingType)(unsafe.Pointer(typePtr)).FfromUtfProc
	(*Encoding)(unsafe.Pointer(encodingPtr)).FfreeProc = (*Tcl_EncodingType)(unsafe.Pointer(typePtr)).FfreeProc
	(*Encoding)(unsafe.Pointer(encodingPtr)).FnullSize = (*Tcl_EncodingType)(unsafe.Pointer(typePtr)).FnullSize
	(*Encoding)(unsafe.Pointer(encodingPtr)).FclientData = (*Tcl_EncodingType)(unsafe.Pointer(typePtr)).FclientData
	if (*Tcl_EncodingType)(unsafe.Pointer(typePtr)).FnullSize == 1 {
		(*Encoding)(unsafe.Pointer(encodingPtr)).FlengthProc = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr) Size_t
		}{libc.Xstrlen}))
	} else {
		(*Encoding)(unsafe.Pointer(encodingPtr)).FlengthProc = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr) Size_t
		}{unilen}))
	}
	(*Encoding)(unsafe.Pointer(encodingPtr)).FrefCount = 1
	(*Encoding)(unsafe.Pointer(encodingPtr)).FhPtr = hPtr
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = encodingPtr

	return encodingPtr
}

//-------------------------------------------------------------------------
//
// Tcl_ExternalToUtfDString --
//
//	Convert a source buffer from the specified encoding into UTF-8. If any
//	of the bytes in the source buffer are invalid or cannot be represented
//	in the target encoding, a default fallback character will be
//	substituted.
//
// Results:
//	The converted bytes are stored in the DString, which is then NULL
//	terminated. The return value is a pointer to the value stored in the
//	DString.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func XTcl_ExternalToUtfDString(tls *libc.TLS, encoding Tcl_Encoding, src uintptr, srcLen int32, dstPtr uintptr) uintptr { /* tclEncoding.c:1097:6: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var dst uintptr
	// var state Tcl_EncodingState at bp, 8

	var encodingPtr uintptr
	var flags int32
	var dstLen int32
	var result int32
	var soFar int32
	// var srcRead int32 at bp+8, 4

	// var dstWrote int32 at bp+12, 4

	// var dstChars int32 at bp+16, 4

	XTcl_DStringInit(tls, dstPtr)
	dst = (*Tcl_DString)(unsafe.Pointer(dstPtr)).Fstring
	dstLen = (*Tcl_DString)(unsafe.Pointer(dstPtr)).FspaceAvl - 1

	if encoding == uintptr(0) {
		encoding = systemEncoding
	}
	encodingPtr = encoding

	if src == uintptr(0) {
		srcLen = 0
	} else if srcLen < 0 {
		srcLen = int32((*struct {
			f func(*libc.TLS, uintptr) Size_t
		})(unsafe.Pointer(&struct{ uintptr }{(*Encoding)(unsafe.Pointer(encodingPtr)).FlengthProc})).f(tls, src))
	}

	flags = TCL_ENCODING_START | TCL_ENCODING_END

	for 1 != 0 {
		result = (*struct {
			f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Encoding)(unsafe.Pointer(encodingPtr)).FtoUtfProc})).f(tls, (*Encoding)(unsafe.Pointer(encodingPtr)).FclientData, src, srcLen,
			flags, bp, dst, dstLen, bp+8, bp+12, bp+16)
		soFar = int32((int64(dst+uintptr(*(*int32)(unsafe.Pointer(bp + 12)))) - int64((*Tcl_DString)(unsafe.Pointer(dstPtr)).Fstring)) / 1)

		if result != -4 {
			XTcl_DStringSetLength(tls, dstPtr, soFar)
			return (*Tcl_DString)(unsafe.Pointer(dstPtr)).Fstring
		}

		flags = flags & libc.CplInt32(TCL_ENCODING_START)
		src += uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* srcRead */)))
		srcLen = srcLen - *(*int32)(unsafe.Pointer(bp + 8))
		if (*Tcl_DString)(unsafe.Pointer(dstPtr)).Flength == 0 {
			XTcl_DStringSetLength(tls, dstPtr, dstLen)
		}
		XTcl_DStringSetLength(tls, dstPtr, 2*(*Tcl_DString)(unsafe.Pointer(dstPtr)).Flength+1)
		dst = (*Tcl_DString)(unsafe.Pointer(dstPtr)).Fstring + uintptr(soFar)
		dstLen = (*Tcl_DString)(unsafe.Pointer(dstPtr)).Flength - soFar - 1
	}
	return uintptr(0)
}

//-------------------------------------------------------------------------
//
// Tcl_ExternalToUtf --
//
//	Convert a source buffer from the specified encoding into UTF-8.
//
// Results:
//	The return value is one of TCL_OK, TCL_CONVERT_MULTIBYTE,
//	TCL_CONVERT_SYNTAX, TCL_CONVERT_UNKNOWN, or TCL_CONVERT_NOSPACE, as
//	documented in tcl.h.
//
// Side effects:
//	The converted bytes are stored in the output buffer.
//
//-------------------------------------------------------------------------

func XTcl_ExternalToUtf(tls *libc.TLS, interp uintptr, encoding Tcl_Encoding, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:1170:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var encodingPtr uintptr
	var result int32
	// var srcRead int32 at bp+8, 4

	// var dstWrote int32 at bp+12, 4

	*(*int32)(unsafe.Pointer(bp + 16 /* dstChars */)) = 0
	var noTerminate int32 = flags & TCL_ENCODING_NO_TERMINATE
	var charLimited int32 = libc.Bool32(flags&TCL_ENCODING_CHAR_LIMIT != 0 && dstCharsPtr != 0)
	var maxChars int32 = 0x7fffffff
	// var state Tcl_EncodingState at bp, 8

	if encoding == uintptr(0) {
		encoding = systemEncoding
	}
	encodingPtr = encoding

	if src == uintptr(0) {
		srcLen = 0
	} else if srcLen < 0 {
		srcLen = int32((*struct {
			f func(*libc.TLS, uintptr) Size_t
		})(unsafe.Pointer(&struct{ uintptr }{(*Encoding)(unsafe.Pointer(encodingPtr)).FlengthProc})).f(tls, src))
	}
	if statePtr == uintptr(0) {
		flags = flags | (TCL_ENCODING_START | TCL_ENCODING_END)
		statePtr = bp /* &state */
	}
	if srcReadPtr == uintptr(0) {
		srcReadPtr = bp + 8 /* &srcRead */
	}
	if dstWrotePtr == uintptr(0) {
		dstWrotePtr = bp + 12 /* &dstWrote */
	}
	if dstCharsPtr == uintptr(0) {
		dstCharsPtr = bp + 16 /* &dstChars */
		flags = flags & libc.CplInt32(TCL_ENCODING_CHAR_LIMIT)
	} else if charLimited != 0 {
		maxChars = *(*int32)(unsafe.Pointer(dstCharsPtr))
	}

	if !(noTerminate != 0) {
		// If there are any null characters in the middle of the buffer,
		// they will converted to the UTF-8 null character (\xC080). To get
		// the actual \0 at the end of the destination buffer, we need to
		// append it manually.  First make room for it...

		dstLen--
	}
	for ok := true; ok; ok = 1 != 0 {
		var savedState Tcl_EncodingState = *(*Tcl_EncodingState)(unsafe.Pointer(statePtr))

		result = (*struct {
			f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Encoding)(unsafe.Pointer(encodingPtr)).FtoUtfProc})).f(tls, (*Encoding)(unsafe.Pointer(encodingPtr)).FclientData, src, srcLen,
			flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
			dstCharsPtr)
		if *(*int32)(unsafe.Pointer(dstCharsPtr)) <= maxChars {
			break
		}
		dstLen = int32((int64(XTcl_UtfAtIndex(tls, dst, maxChars))-int64(dst))/1 + int64(TCL_UTF_MAX-1))
		*(*Tcl_EncodingState)(unsafe.Pointer(statePtr)) = savedState
	}
	if !(noTerminate != 0) {
		// ...and then append it

		*(*int8)(unsafe.Pointer(dst + uintptr(*(*int32)(unsafe.Pointer(dstWrotePtr))))) = int8(0)
	}

	return result
}

//-------------------------------------------------------------------------
//
// Tcl_UtfToExternalDString --
//
//	Convert a source buffer from UTF-8 to the specified encoding. If any
//	of the bytes in the source buffer are invalid or cannot be represented
//	in the target encoding, a default fallback character is substituted.
//
// Results:
//	The converted bytes are stored in the DString, which is then NULL
//	terminated in an encoding-specific manner. The return value is a
//	pointer to the value stored in the DString.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func XTcl_UtfToExternalDString(tls *libc.TLS, encoding Tcl_Encoding, src uintptr, srcLen int32, dstPtr uintptr) uintptr { /* tclEncoding.c:1284:6: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var dst uintptr
	// var state Tcl_EncodingState at bp, 8

	var encodingPtr uintptr
	var flags int32
	var dstLen int32
	var result int32
	var soFar int32
	// var srcRead int32 at bp+8, 4

	// var dstWrote int32 at bp+12, 4

	// var dstChars int32 at bp+16, 4

	XTcl_DStringInit(tls, dstPtr)
	dst = (*Tcl_DString)(unsafe.Pointer(dstPtr)).Fstring
	dstLen = (*Tcl_DString)(unsafe.Pointer(dstPtr)).FspaceAvl - 1

	if encoding == uintptr(0) {
		encoding = systemEncoding
	}
	encodingPtr = encoding

	if src == uintptr(0) {
		srcLen = 0
	} else if srcLen < 0 {
		srcLen = int32(libc.Xstrlen(tls, src))
	}
	flags = TCL_ENCODING_START | TCL_ENCODING_END
	for 1 != 0 {
		result = (*struct {
			f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Encoding)(unsafe.Pointer(encodingPtr)).FfromUtfProc})).f(tls, (*Encoding)(unsafe.Pointer(encodingPtr)).FclientData, src,
			srcLen, flags, bp, dst, dstLen, bp+8, bp+12,
			bp+16)
		soFar = int32((int64(dst+uintptr(*(*int32)(unsafe.Pointer(bp + 12)))) - int64((*Tcl_DString)(unsafe.Pointer(dstPtr)).Fstring)) / 1)

		if result != -4 {
			if (*Encoding)(unsafe.Pointer(encodingPtr)).FnullSize == 2 {
				XTcl_DStringSetLength(tls, dstPtr, soFar+1)
			}
			XTcl_DStringSetLength(tls, dstPtr, soFar)
			return (*Tcl_DString)(unsafe.Pointer(dstPtr)).Fstring
		}

		flags = flags & libc.CplInt32(TCL_ENCODING_START)
		src += uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* srcRead */)))
		srcLen = srcLen - *(*int32)(unsafe.Pointer(bp + 8))
		if (*Tcl_DString)(unsafe.Pointer(dstPtr)).Flength == 0 {
			XTcl_DStringSetLength(tls, dstPtr, dstLen)
		}
		XTcl_DStringSetLength(tls, dstPtr, 2*(*Tcl_DString)(unsafe.Pointer(dstPtr)).Flength+1)
		dst = (*Tcl_DString)(unsafe.Pointer(dstPtr)).Fstring + uintptr(soFar)
		dstLen = (*Tcl_DString)(unsafe.Pointer(dstPtr)).Flength - soFar - 1
	}
	return uintptr(0)
}

//-------------------------------------------------------------------------
//
// Tcl_UtfToExternal --
//
//	Convert a buffer from UTF-8 into the specified encoding.
//
// Results:
//	The return value is one of TCL_OK, TCL_CONVERT_MULTIBYTE,
//	TCL_CONVERT_SYNTAX, TCL_CONVERT_UNKNOWN, or TCL_CONVERT_NOSPACE, as
//	documented in tcl.h.
//
// Side effects:
//	The converted bytes are stored in the output buffer.
//
//-------------------------------------------------------------------------

func XTcl_UtfToExternal(tls *libc.TLS, interp uintptr, encoding Tcl_Encoding, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:1359:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var encodingPtr uintptr
	var result int32
	// var srcRead int32 at bp+8, 4

	// var dstWrote int32 at bp+12, 4

	// var dstChars int32 at bp+16, 4

	// var state Tcl_EncodingState at bp, 8

	if encoding == uintptr(0) {
		encoding = systemEncoding
	}
	encodingPtr = encoding

	if src == uintptr(0) {
		srcLen = 0
	} else if srcLen < 0 {
		srcLen = int32(libc.Xstrlen(tls, src))
	}
	if statePtr == uintptr(0) {
		flags = flags | (TCL_ENCODING_START | TCL_ENCODING_END)
		statePtr = bp /* &state */
	}
	if srcReadPtr == uintptr(0) {
		srcReadPtr = bp + 8 /* &srcRead */
	}
	if dstWrotePtr == uintptr(0) {
		dstWrotePtr = bp + 12 /* &dstWrote */
	}
	if dstCharsPtr == uintptr(0) {
		dstCharsPtr = bp + 16 /* &dstChars */
	}

	dstLen = dstLen - (*Encoding)(unsafe.Pointer(encodingPtr)).FnullSize
	result = (*struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Encoding)(unsafe.Pointer(encodingPtr)).FfromUtfProc})).f(tls, (*Encoding)(unsafe.Pointer(encodingPtr)).FclientData, src, srcLen,
		flags, statePtr, dst, dstLen, srcReadPtr, dstWrotePtr,
		dstCharsPtr)
	if (*Encoding)(unsafe.Pointer(encodingPtr)).FnullSize == 2 {
		*(*int8)(unsafe.Pointer(dst + uintptr(*(*int32)(unsafe.Pointer(dstWrotePtr))+1))) = int8(0)
	}
	*(*int8)(unsafe.Pointer(dst + uintptr(*(*int32)(unsafe.Pointer(dstWrotePtr))))) = int8(0)

	return result
}

//---------------------------------------------------------------------------
//
// Tcl_FindExecutable --
//
//	This function computes the absolute path name of the current
//	application, given its argv[0] value.
//
// Results:
//	None.
//
// Side effects:
//	The absolute pathname for the application is computed and stored to be
//	returned later by [info nameofexecutable].
//
//---------------------------------------------------------------------------
func XTcl_FindExecutable(tls *libc.TLS, argv0 uintptr) { /* tclEncoding.c:1447:1: */
	XTclInitSubsystems(tls)
	XTclpSetInitialEncodings(tls)
	XTclpFindExecutable(tls, argv0)
}

//---------------------------------------------------------------------------
//
// OpenEncodingFileChannel --
//
//	Open the file believed to hold data for the encoding, "name".
//
// Results:
//	Returns the readable Tcl_Channel from opening the file, or NULL if the
//	file could not be successfully opened. If NULL was returned, an error
//	message is left in interp's result object, unless interp was NULL.
//
// Side effects:
//	Channel may be opened. Information about the filesystem may be cached
//	to speed later calls.
//
//---------------------------------------------------------------------------

func sOpenEncodingFileChannel(tls *libc.TLS, interp uintptr, name uintptr) Tcl_Channel { /* tclEncoding.c:1476:1: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var nameObj uintptr = XTcl_NewStringObj(tls, name, -1)
	*(*uintptr)(unsafe.Pointer(bp + 72 /* fileNameObj */)) = XTcl_DuplicateObj(tls, nameObj)
	var searchPath uintptr = XTcl_DuplicateObj(tls, XTcl_GetEncodingSearchPath(tls))
	var map1 uintptr = XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&encodingFileMap)))
	// var dir uintptr at bp+56, 8

	var path uintptr
	*(*uintptr)(unsafe.Pointer(bp + 64 /* directory */)) = uintptr(0)
	var chan1 Tcl_Channel = uintptr(0)
	var i int32
	// var numDirs int32 at bp+48, 4

	XTcl_ListObjGetElements(tls, uintptr(0), searchPath, bp+48, bp+56)
	(*Tcl_Obj)(unsafe.Pointer(nameObj)).FrefCount++
	XTcl_AppendToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* fileNameObj */)), ts+26612, -1)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FrefCount++
	XTcl_DictObjGet(tls, uintptr(0), map1, nameObj, bp+64)

	// Check that any cached directory is still on the encoding search path.

	if uintptr(0) != *(*uintptr)(unsafe.Pointer(bp + 64)) {
		var verified int32 = 0

		for i = 0; i < *(*int32)(unsafe.Pointer(bp + 48 /* numDirs */)) && !(verified != 0); i++ {
			if *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)) + uintptr(i)*8)) == *(*uintptr)(unsafe.Pointer(bp + 64)) {
				verified = 1
			}
		}
		if !(verified != 0) {
			var dirString uintptr = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 64)))
			}()

			for i = 0; i < *(*int32)(unsafe.Pointer(bp + 48 /* numDirs */)) && !(verified != 0); i++ {
				if libc.Xstrcmp(tls, dirString, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)) + uintptr(i)*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)) + uintptr(i)*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)) + uintptr(i)*8)))
				}()) == 0 {
					verified = 1
				}
			}
		}
		if !(verified != 0) {
			// Directory no longer on the search path. Remove from cache.

			map1 = XTcl_DuplicateObj(tls, map1)
			XTcl_DictObjRemove(tls, uintptr(0), map1, nameObj)
			XTclSetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&encodingFileMap)), map1, uintptr(0))
			*(*uintptr)(unsafe.Pointer(bp + 64 /* directory */)) = uintptr(0)
		}
	}

	if uintptr(0) != *(*uintptr)(unsafe.Pointer(bp + 64)) {
		// Got a directory from the cache. Try to use it first.

		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount++
		path = XTcl_FSJoinToPath(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* directory */)), 1, bp+72)
		(*Tcl_Obj)(unsafe.Pointer(path)).FrefCount++
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 64))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		chan1 = XTcl_FSOpenFileChannel(tls, uintptr(0), path, ts+23386, 0)
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = path
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	// Scan the search path until we find it.

	for i = 0; i < *(*int32)(unsafe.Pointer(bp + 48 /* numDirs */)) && chan1 == uintptr(0); i++ {
		path = XTcl_FSJoinToPath(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* dir */)) + uintptr(i)*8)), 1, bp+72)
		(*Tcl_Obj)(unsafe.Pointer(path)).FrefCount++
		chan1 = XTcl_FSOpenFileChannel(tls, uintptr(0), path, ts+23386, 0)
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = path
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		if chan1 != uintptr(0) {
			// Save directory in the cache.

			map1 = XTcl_DuplicateObj(tls, XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&encodingFileMap))))
			XTcl_DictObjPut(tls, uintptr(0), map1, nameObj, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* dir */)) + uintptr(i)*8)))
			XTclSetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&encodingFileMap)), map1, uintptr(0))
		}
	}

	if uintptr(0) == chan1 && interp != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+26617, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+12479, name, uintptr(0)))
	}
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 72))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _objPtr uintptr = nameObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok5 := true; ok5; ok5 = 0 != 0 {
		var _objPtr uintptr = searchPath
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return chan1
}

//---------------------------------------------------------------------------
//
// LoadEncodingFile --
//
//	Read a file that describes an encoding and create a new Encoding from
//	the data.
//
// Results:
//	The return value is the newly loaded Tcl_Encoding or NULL if the file
//	didn't exist or could not be processed. If NULL is returned and interp
//	is not NULL, an error message is left in interp's result object.
//
// Side effects:
//	A corresponding encoding file might be read from persistent storage, in
//	which case LoadTableEncoding is called.
//
//---------------------------------------------------------------------------

func sLoadEncodingFile(tls *libc.TLS, interp uintptr, name uintptr) Tcl_Encoding { /* tclEncoding.c:1594:1: */
	bp := tls.Alloc(264)
	defer tls.Free(264)

	var chan1 Tcl_Channel = uintptr(0)
	var encoding Tcl_Encoding = uintptr(0)
	var ch int32

	chan1 = sOpenEncodingFileChannel(tls, interp, name)
	if chan1 == uintptr(0) {
		return uintptr(0)
	}

	XTcl_SetChannelOption(tls, uintptr(0), chan1, ts+16536, ts+26553)

	for 1 != 0 {
		// var ds Tcl_DString at bp+48, 216

		XTcl_DStringInit(tls, bp+48)
		XTcl_Gets(tls, chan1, bp+48)
		ch = int32(*(*int8)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(bp + 48)).Fstring)))
		XTcl_DStringFree(tls, bp+48)
		if ch != '#' {
			break
		}
	}

	switch ch {
	case 'S':
		encoding = sLoadTableEncoding(tls, name, ENCODING_SINGLEBYTE, chan1)
		break
	case 'D':
		encoding = sLoadTableEncoding(tls, name, ENCODING_DOUBLEBYTE, chan1)
		break
	case 'M':
		encoding = sLoadTableEncoding(tls, name, ENCODING_MULTIBYTE, chan1)
		break
	case 'E':
		encoding = sLoadEscapeEncoding(tls, name, chan1)
		break
	}
	if encoding == uintptr(0) && interp != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+26639, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+12479, name, uintptr(0)))
	}
	XTcl_Close(tls, uintptr(0), chan1)

	return encoding
}

//-------------------------------------------------------------------------
//
// LoadTableEncoding --
//
//	Helper function for LoadEncodingFile().  Creates a Tcl_EncodingType
//	structure along with its corresponding TableEncodingData structure, and
//	passes it to Tcl_Createncoding.
//
//	The file contains binary data but begins with a marker to indicate
//	byte-ordering so a single binary file can be read on big or
//	little-endian systems.
//
// Results:
//	Returns the new Tcl_Encoding,  or NULL if it could could
//	not be created because the file contained invalid data.
//
// Side effects:
//	See Tcl_CreateEncoding().
//
//-------------------------------------------------------------------------

func sLoadTableEncoding(tls *libc.TLS, name uintptr, type1 int32, chan1 Tcl_Channel) Tcl_Encoding { /* tclEncoding.c:1670:1: */
	bp := tls.Alloc(528)
	defer tls.Free(528)

	// var lineString Tcl_DString at bp, 216

	var objPtr uintptr
	// var line uintptr at bp+216, 8

	var i int32
	var hi int32
	var lo int32
	var numPages int32
	var symbol int32
	var fallback int32
	var len int32
	// var used [256]uint8 at bp+224, 256

	var size uint32
	var dataPtr uintptr
	var pageMemPtr uintptr
	var page uintptr
	// var encType Tcl_EncodingType at bp+480, 48

	var ch int32
	var p uintptr
	var expected int32
	var ch1 int32
	var p1 uintptr
	var to int32
	var from int32

	XTcl_DStringInit(tls, bp)
	if !(XTcl_Gets(tls, chan1, bp) == -1) {
		goto __1
	}
	return uintptr(0)
__1:
	;
	*(*uintptr)(unsafe.Pointer(bp + 216 /* line */)) = (*Tcl_DString)(unsafe.Pointer(bp)).Fstring

	fallback = int32(libc.Xstrtol(tls, *(*uintptr)(unsafe.Pointer(bp + 216 /* line */)), bp+216, 16))
	symbol = int32(libc.Xstrtol(tls, *(*uintptr)(unsafe.Pointer(bp + 216 /* line */)), bp+216, 10))
	numPages = int32(libc.Xstrtol(tls, *(*uintptr)(unsafe.Pointer(bp + 216 /* line */)), bp+216, 10))
	XTcl_DStringFree(tls, bp)

	if !(numPages < 0) {
		goto __2
	}
	numPages = 0
	goto __3
__2:
	if !(numPages > 256) {
		goto __4
	}
	numPages = 256
__4:
	;
__3:
	;

	libc.Xmemset(tls, bp+224, 0, uint64(unsafe.Sizeof([256]uint8{})))

	dataPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TableEncodingData{})))
	libc.Xmemset(tls, dataPtr, 0, uint64(unsafe.Sizeof(TableEncodingData{})))

	(*TableEncodingData)(unsafe.Pointer(dataPtr)).Ffallback = fallback

	// Read the table that maps characters to Unicode. Performs a single
	// malloc to get the memory for the array and all the pages needed by the
	// array.

	size = uint32(uint64(256)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(numPages)*(uint64(256)*uint64(unsafe.Sizeof(uint16(0)))))
	(*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode = XTcl_Alloc(tls, size)
	libc.Xmemset(tls, (*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode, 0, uint64(size))
	pageMemPtr = (*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode + uintptr(256)*8

__5:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __8
	}
	XTclAllocateFreeObjects(tls)
__8:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __6
__6:
	if 0 != 0 {
		goto __5
	}
	goto __7
__7:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	i = 0
__9:
	if !(i < numPages) {
		goto __11
	}
	expected = 3 + 16*(16*4+1)

	if !(XTcl_ReadChars(tls, chan1, objPtr, expected, 0) != expected) {
		goto __12
	}
	return uintptr(0)
__12:
	;
	p = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()
	hi = int32(staticHex[uint8(*(*int8)(unsafe.Pointer(p)))])<<4 + int32(staticHex[uint8(*(*int8)(unsafe.Pointer(p + 1)))])
	*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode + uintptr(hi)*8)) = pageMemPtr
	p += uintptr(2)
	lo = 0
__13:
	if !(lo < 256) {
		goto __15
	}
	if !(lo&0x0F == 0) {
		goto __16
	}
	p++
__16:
	;
	ch = int32(staticHex[uint8(*(*int8)(unsafe.Pointer(p)))])<<12 + int32(staticHex[uint8(*(*int8)(unsafe.Pointer(p + 1)))])<<8 +
		int32(staticHex[uint8(*(*int8)(unsafe.Pointer(p + 2)))])<<4 + int32(staticHex[uint8(*(*int8)(unsafe.Pointer(p + 3)))])
	if !(ch != 0) {
		goto __17
	}
	*(*uint8)(unsafe.Pointer(bp + 224 + uintptr(ch>>8))) = uint8(1)
__17:
	;
	*(*uint16)(unsafe.Pointer(pageMemPtr)) = uint16(ch)
	pageMemPtr += 2
	p += uintptr(4)
	goto __14
__14:
	lo++
	goto __13
	goto __15
__15:
	;
	goto __10
__10:
	i++
	goto __9
	goto __11
__11:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __18
	}
	goto __19
__18:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __20
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __22
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__22:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__23:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
	goto __21
__20:
	XTclFreeObj(tls, objPtr)
__21:
	;
__19:
	;

	if !(type1 == ENCODING_DOUBLEBYTE) {
		goto __26
	}
	libc.Xmemset(tls, dataPtr+4, 1, uint64(unsafe.Sizeof([256]int8{})))
	goto __27
__26:
	hi = 1
__28:
	if !(hi < 256) {
		goto __30
	}
	if !(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode + uintptr(hi)*8)) != uintptr(0)) {
		goto __31
	}
	*(*int8)(unsafe.Pointer(dataPtr + 4 + uintptr(hi))) = int8(1)
__31:
	;
	goto __29
__29:
	hi++
	goto __28
	goto __30
__30:
	;
__27:
	;

	// Invert the toUnicode array to produce the fromUnicode array. Performs a
	// single malloc to get the memory for the array and all the pages needed
	// by the array. While reading in the toUnicode array remember what
	// pages are needed for the fromUnicode array.

	if !(symbol != 0) {
		goto __32
	}
	*(*uint8)(unsafe.Pointer(bp + 224)) = uint8(1)
__32:
	;
	numPages = 0
	hi = 0
__33:
	if !(hi < 256) {
		goto __35
	}
	if !(*(*uint8)(unsafe.Pointer(bp + 224 + uintptr(hi))) != 0) {
		goto __36
	}
	numPages++
__36:
	;
	goto __34
__34:
	hi++
	goto __33
	goto __35
__35:
	;
	size = uint32(uint64(256)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(numPages)*(uint64(256)*uint64(unsafe.Sizeof(uint16(0)))))
	(*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode = XTcl_Alloc(tls, size)
	libc.Xmemset(tls, (*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode, 0, uint64(size))
	pageMemPtr = (*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode + uintptr(256)*8

	hi = 0
__37:
	if !(hi < 256) {
		goto __39
	}
	if !(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode + uintptr(hi)*8)) == uintptr(0)) {
		goto __40
	}
	*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode + uintptr(hi)*8)) = uintptr(unsafe.Pointer(&emptyPage))
	goto __38
__40:
	;
	lo = 0
__41:
	if !(lo < 256) {
		goto __43
	}
	ch1 = int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode + uintptr(hi)*8)) + uintptr(lo)*2)))

	if !(ch1 != 0) {
		goto __44
	}
	page = *(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode + uintptr(ch1>>8)*8))
	if !(page == uintptr(0)) {
		goto __45
	}
	page = pageMemPtr
	pageMemPtr += 2 * uintptr(256)
	*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode + uintptr(ch1>>8)*8)) = page
__45:
	;
	*(*uint16)(unsafe.Pointer(page + uintptr(ch1&0xFF)*2)) = uint16(hi<<8 + lo)
__44:
	;
	goto __42
__42:
	lo++
	goto __41
	goto __43
__43:
	;
	goto __38
__38:
	hi++
	goto __37
	goto __39
__39:
	;
	if !(type1 == ENCODING_MULTIBYTE) {
		goto __46
	}
	// If multibyte encodings don't have a backslash character, define
	// one. Otherwise, on Windows, native file names don't work because
	// the backslash in the file name maps to the unknown character
	// (question mark) when converting from UTF-8 to external encoding.

	if !(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode)) != uintptr(0)) {
		goto __47
	}
	if !(int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode)) + 92*2))) == 0) {
		goto __48
	}
	*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode)) + 92*2)) = uint16('\\')
__48:
	;
__47:
	;
__46:
	;
	if !(symbol != 0) {
		goto __49
	}
	// Make a special symbol encoding that maps each symbol character from
	// its Unicode code point down into page 0, and also ensure that each
	// characters on page 0 maps to itself so that a symbol font can be
	// used to display a simple string like "abcd" and have alpha, beta,
	// chi, delta show up, rather than have "unknown" chars show up because
	// strictly speaking the symbol font doesn't have glyphs for those low
	// ASCII chars.

	page = *(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode))
	if !(page == uintptr(0)) {
		goto __50
	}
	page = pageMemPtr
	*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode)) = page
__50:
	;
	lo = 0
__51:
	if !(lo < 256) {
		goto __53
	}
	if !(int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode)) + uintptr(lo)*2))) != 0) {
		goto __54
	}
	*(*uint16)(unsafe.Pointer(page + uintptr(lo)*2)) = uint16(lo)
__54:
	;
	goto __52
__52:
	lo++
	goto __51
	goto __53
__53:
	;
__49:
	;
	hi = 0
__55:
	if !(hi < 256) {
		goto __57
	}
	if !(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode + uintptr(hi)*8)) == uintptr(0)) {
		goto __58
	}
	*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode + uintptr(hi)*8)) = uintptr(unsafe.Pointer(&emptyPage))
__58:
	;
	goto __56
__56:
	hi++
	goto __55
	goto __57
__57:
	;

	// For trailing 'R'everse encoding, see [Patch 689341]

	XTcl_DStringInit(tls, bp)

	// Skip leading empty lines.

__59:
	if !(libc.AssignInt32(&len, XTcl_Gets(tls, chan1, bp)) == 0) {
		goto __60
	}
	// empty body
	goto __59
__60:
	;
	if !(len < 0) {
		goto __61
	}
	goto doneParse
__61:
	;

	// Require that it starts with an 'R'.

	*(*uintptr)(unsafe.Pointer(bp + 216 /* line */)) = (*Tcl_DString)(unsafe.Pointer(bp)).Fstring
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216))))) != 'R') {
		goto __62
	}
	goto doneParse
__62:
	;

	// Read lines until EOF.

	XTcl_DStringSetLength(tls, bp, 0)
__63:
	if !(libc.AssignInt32(&len, XTcl_Gets(tls, chan1, bp)) >= 0) {
		goto __65
	}

	// Skip short lines.

	if !(len < 5) {
		goto __66
	}
	goto __64
__66:
	;

	// Parse the line as a sequence of hex digits.

	p1 = (*Tcl_DString)(unsafe.Pointer(bp)).Fstring
	to = int32(staticHex[*(*uint8)(unsafe.Pointer(p1))])<<12 + int32(staticHex[*(*uint8)(unsafe.Pointer(p1 + 1))])<<8 +
		int32(staticHex[*(*uint8)(unsafe.Pointer(p1 + 2))])<<4 + int32(staticHex[*(*uint8)(unsafe.Pointer(p1 + 3))])
	if !(to == 0) {
		goto __67
	}
	goto __64
__67:
	;
	p1 += uintptr(5)
	len = len - 5
__68:
	if !(len >= 0 && *(*uint8)(unsafe.Pointer(p1)) != 0) {
		goto __70
	}
	from = int32(staticHex[*(*uint8)(unsafe.Pointer(p1))])<<12 + int32(staticHex[*(*uint8)(unsafe.Pointer(p1 + 1))])<<8 +
		int32(staticHex[*(*uint8)(unsafe.Pointer(p1 + 2))])<<4 + int32(staticHex[*(*uint8)(unsafe.Pointer(p1 + 3))])
	if !(from == 0) {
		goto __71
	}
	goto __69
__71:
	;
	*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode + uintptr(from>>8)*8)) + uintptr(from&0xFF)*2)) = uint16(to)
	goto __69
__69:
	p1 += uintptr(5)
	len = len - 5
	goto __68
	goto __70
__70:
	;
	goto __64
__64:
	XTcl_DStringSetLength(tls, bp, 0)
	goto __63
	goto __65
__65:
	;
doneParse:
	XTcl_DStringFree(tls, bp)

	// Package everything into an encoding structure.

	(*Tcl_EncodingType)(unsafe.Pointer(bp + 480 /* &encType */)).FencodingName = name
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 480 /* &encType */)).FtoUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sTableToUtfProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 480 /* &encType */)).FfromUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sTableFromUtfProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 480 /* &encType */)).FfreeProc = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sTableFreeProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 480 /* &encType */)).FnullSize = func() int32 {
		if type1 == ENCODING_DOUBLEBYTE {
			return 2
		}
		return 1
	}()
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 480 /* &encType */)).FclientData = dataPtr

	return XTcl_CreateEncoding(tls, bp+480)
}

var staticHex = [256]int8{
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), //   0 ...  15
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), //  16 ...  31
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), //  32 ...  47
	int8(0), int8(1), int8(2), int8(3), int8(4), int8(5), int8(6), int8(7), int8(8), int8(9), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), //  48 ...  63
	int8(0), int8(10), int8(11), int8(12), int8(13), int8(14), int8(15), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), //  64 ...  79
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), //  80 ...  95
	int8(0), int8(10), int8(11), int8(12), int8(13), int8(14), int8(15), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), //  96 ... 111
	int8(0), int8(1), int8(2), int8(3), int8(4), int8(5), int8(6), int8(7), int8(8), int8(9), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), // 112 ... 127
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), // 128 ... 143
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), // 144 ... 159
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), // 160 ... 175
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), // 176 ... 191
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), // 192 ... 207
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), // 208 ... 223
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), // 224 ... 239
	int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), // 240 ... 255
} /* tclEncoding.c:1690:23 */

//-------------------------------------------------------------------------
//
// LoadEscapeEncoding --
//
//	Helper function for LoadEncodingTable(). Loads a state machine that
//	converts between Unicode and some other encoding.
//
//	File contains text data that describes the escape sequences that are
//	used to choose an encoding and the associated names for the
//	sub-encodings.
//
// Results:
//	The return value is the new encoding, or NULL if the encoding could
//	not be created (because the file contained invalid data).
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sLoadEscapeEncoding(tls *libc.TLS, name uintptr, chan1 Tcl_Channel) Tcl_Encoding { /* tclEncoding.c:1972:1: */
	bp := tls.Alloc(592)
	defer tls.Free(592)

	var i int32
	var size uint32
	// var escapeData Tcl_DString at bp+32, 216

	// var init1 [16]int8 at bp, 16

	// var final [16]int8 at bp+16, 16

	var dataPtr uintptr
	// var type1 Tcl_EncodingType at bp+544, 48

	*(*int8)(unsafe.Pointer(bp)) = int8(0)
	*(*int8)(unsafe.Pointer(bp + 16)) = int8(0)
	XTcl_DStringInit(tls, bp+32)

	for 1 != 0 {
		// var argc int32 at bp+464, 4

		// var argv uintptr at bp+472, 8

		var line uintptr
		// var lineString Tcl_DString at bp+248, 216

		XTcl_DStringInit(tls, bp+248)
		if XTcl_Gets(tls, chan1, bp+248) < 0 {
			break
		}
		line = (*Tcl_DString)(unsafe.Pointer(bp + 248)).Fstring
		if XTcl_SplitList(tls, uintptr(0), line, bp+464, bp+472) != TCL_OK {
			XTcl_DStringFree(tls, bp+248)
			continue
		}
		if *(*int32)(unsafe.Pointer(bp + 464)) >= 2 {
			if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 472)))), ts+4245) == 0 {
				// do nothing
			} else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 472)))), ts+26666) == 0 {
				libc.Xstrncpy(tls, bp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 472 /* argv */)) + 1*8)), uint64(unsafe.Sizeof([16]int8{})))
				*(*int8)(unsafe.Pointer(bp + 15)) = int8(0)
			} else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 472)))), ts+26671) == 0 {
				libc.Xstrncpy(tls, bp+16, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 472 /* argv */)) + 1*8)), uint64(unsafe.Sizeof([16]int8{})))
				*(*int8)(unsafe.Pointer(bp + 16 + 15)) = int8(0)
			} else {
				// var est EscapeSubTable at bp+480, 64

				var e uintptr

				libc.Xstrncpy(tls, bp+480+4, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 472 /* argv */)) + 1*8)), uint64(unsafe.Sizeof([16]int8{})))
				*(*int8)(unsafe.Pointer(bp + 480 + 4 + 15)) = int8(0)
				(*EscapeSubTable)(unsafe.Pointer(bp + 480 /* &est */)).FsequenceLen = uint32(libc.Xstrlen(tls, bp+480+4))

				libc.Xstrncpy(tls, bp+480+20, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 472 /* argv */)))), uint64(unsafe.Sizeof([32]int8{})))
				*(*int8)(unsafe.Pointer(bp + 480 + 20 + 31)) = int8(0)

				// To avoid infinite recursion in [encoding system iso2022-*]

				e = XTcl_GetEncoding(tls, uintptr(0), bp+480+20)
				if e != uintptr(0) && (*Encoding)(unsafe.Pointer(e)).FtoUtfProc != *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
				}{sTableToUtfProc})) &&
					(*Encoding)(unsafe.Pointer(e)).FtoUtfProc != *(*uintptr)(unsafe.Pointer(&struct {
						f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
					}{sIso88591ToUtfProc})) {
					XTcl_FreeEncoding(tls, e)
					e = uintptr(0)
				}
				(*EscapeSubTable)(unsafe.Pointer(bp + 480 /* &est */)).FencodingPtr = e
				XTcl_DStringAppend(tls, bp+32, bp+480, int32(unsafe.Sizeof(EscapeSubTable{})))
			}
		}
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 472)))
		XTcl_DStringFree(tls, bp+248)
	}

	size = uint32(int32(uintptr(0)+304) +
		(*Tcl_DString)(unsafe.Pointer(bp+32)).Flength)
	dataPtr = XTcl_Alloc(tls, size)
	(*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FinitLen = uint32(libc.Xstrlen(tls, bp))
	libc.Xmemcpy(tls, dataPtr+8, bp, uint64((*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FinitLen+uint32(1)))
	(*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FfinalLen = uint32(libc.Xstrlen(tls, bp+16))
	libc.Xmemcpy(tls, dataPtr+28, bp+16, uint64((*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FfinalLen+uint32(1)))
	(*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FnumSubTables = int32(uint64((*Tcl_DString)(unsafe.Pointer(bp+32)).Flength) / uint64(unsafe.Sizeof(EscapeSubTable{})))
	libc.Xmemcpy(tls, dataPtr+304, (*Tcl_DString)(unsafe.Pointer(bp+32)).Fstring,
		uint64((*Tcl_DString)(unsafe.Pointer(bp+32)).Flength))
	XTcl_DStringFree(tls, bp+32)

	libc.Xmemset(tls, dataPtr+44, 0, uint64(unsafe.Sizeof([256]int8{})))
	for i = 0; i < (*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FnumSubTables; i++ {
		*(*int8)(unsafe.Pointer(dataPtr + 44 + uintptr(uint8(*(*int8)(unsafe.Pointer(dataPtr + 304 + uintptr(i)*64 + 4)))))) = int8(1)
	}
	if int32(*(*int8)(unsafe.Pointer(dataPtr + 8))) != 0 {
		*(*int8)(unsafe.Pointer(dataPtr + 44 + uintptr(uint8(*(*int8)(unsafe.Pointer(dataPtr + 8)))))) = int8(1)
	}
	if int32(*(*int8)(unsafe.Pointer(dataPtr + 28))) != 0 {
		*(*int8)(unsafe.Pointer(dataPtr + 44 + uintptr(uint8(*(*int8)(unsafe.Pointer(dataPtr + 28)))))) = int8(1)
	}

	// Package everything into an encoding structure.

	(*Tcl_EncodingType)(unsafe.Pointer(bp + 544 /* &type1 */)).FencodingName = name
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 544 /* &type1 */)).FtoUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sEscapeToUtfProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 544 /* &type1 */)).FfromUtfProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
	}{sEscapeFromUtfProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 544 /* &type1 */)).FfreeProc = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sEscapeFreeProc}))
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 544 /* &type1 */)).FnullSize = 1
	(*Tcl_EncodingType)(unsafe.Pointer(bp + 544 /* &type1 */)).FclientData = dataPtr

	return XTcl_CreateEncoding(tls, bp+544)
}

//-------------------------------------------------------------------------
//
// BinaryProc --
//
//	The default conversion when no other conversion is specified. No
//	translation is done; source bytes are copied directly to destination
//	bytes.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sBinaryProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:2097:1: */
	var result int32

	result = TCL_OK
	dstLen = dstLen - (TCL_UTF_MAX - 1)
	if dstLen < 0 {
		dstLen = 0
	}
	if flags&TCL_ENCODING_CHAR_LIMIT != 0 && srcLen > *(*int32)(unsafe.Pointer(dstCharsPtr)) {
		srcLen = *(*int32)(unsafe.Pointer(dstCharsPtr))
	}
	if srcLen > dstLen {
		srcLen = dstLen
		result = -4
	}

	*(*int32)(unsafe.Pointer(srcReadPtr)) = srcLen
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = srcLen
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = srcLen
	libc.Xmemcpy(tls, dst, src, uint64(srcLen))
	return result
}

//-------------------------------------------------------------------------
//
// UtfIntToUtfExtProc --
//
//	Convert from UTF-8 to UTF-8. While converting null-bytes from the
//	Tcl's internal representation (0xC0, 0x80) to the official
//	representation (0x00). See UtfToUtfProc for details.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sUtfIntToUtfExtProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:2161:1: */
	return sUtfToUtfProc(tls, clientData, src, srcLen, flags, statePtr, dst, dstLen,
		srcReadPtr, dstWrotePtr, dstCharsPtr, 1)
}

//-------------------------------------------------------------------------
//
// UtfExtToUtfIntProc --
//
//	Convert from UTF-8 to UTF-8 while converting null-bytes from the
//	official representation (0x00) to Tcl's internal representation (0xC0,
//	0x80). See UtfToUtfProc for details.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sUtfExtToUtfIntProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:2210:1: */
	return sUtfToUtfProc(tls, clientData, src, srcLen, flags, statePtr, dst, dstLen,
		srcReadPtr, dstWrotePtr, dstCharsPtr, 0)
}

//-------------------------------------------------------------------------
//
// UtfToUtfProc --
//
//	Convert from UTF-8 to UTF-8. Note that the UTF-8 to UTF-8 translation
//	is not a no-op, because it will turn a stream of improperly formed
//	UTF-8 into a properly formed stream.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sUtfToUtfProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr, pureNullMode int32) int32 { /* tclEncoding.c:2259:1: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	var srcStart uintptr
	var srcEnd uintptr
	var srcClose uintptr
	var dstStart uintptr
	var dstEnd uintptr
	var result int32
	var numChars int32
	var charLimit int32 = 0x7fffffff
	var chPtr uintptr = statePtr

	if flags&TCL_ENCODING_START != 0 {
		*(*Tcl_EncodingState)(unsafe.Pointer(statePtr)) = uintptr(0)
	}
	result = TCL_OK

	srcStart = src
	srcEnd = src + uintptr(srcLen)
	srcClose = srcEnd
	if flags&TCL_ENCODING_END == 0 {
		srcClose -= uintptr(6)
	}
	if flags&TCL_ENCODING_CHAR_LIMIT != 0 {
		charLimit = *(*int32)(unsafe.Pointer(dstCharsPtr))
	}

	dstStart = dst
	dstEnd = dst + uintptr(dstLen) - uintptr(func() int32 {
		if pureNullMode == 1 {
			return 4
		}
		return TCL_UTF_MAX
	}())

	for numChars = 0; src < srcEnd && numChars <= charLimit; numChars++ {
		if src > srcClose && !(XTcl_UtfCharComplete(tls, src, int32((int64(srcEnd)-int64(src))/1)) != 0) {
			// If there is more string to follow, this will ensure that the
			// last UTF-8 character in the source buffer hasn't been cut off.

			result = -1
			break
		}
		if dst > dstEnd {
			result = -4
			break
		}
		if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 && !(int32(uint8(*(*int8)(unsafe.Pointer(src)))) == 0 && pureNullMode == 0) {
			// Copy 7bit characters, but skip null-bytes when we are in input
			// mode, so that they get converted to 0xC080.

			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))
			*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(0) // reset surrogate handling
		} else if int32(uint8(*(*int8)(unsafe.Pointer(src)))) == 0xC0 && src+uintptr(1) < srcEnd &&
			int32(uint8(*(*int8)(unsafe.Pointer(src + 1)))) == 0x80 && pureNullMode == 1 {
			// Convert 0xC080 to real nulls when we are in output mode.

			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(0)
			*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(0) // reset surrogate handling
			src += uintptr(2)
		} else if !(XTcl_UtfCharComplete(tls, src, int32((int64(srcEnd)-int64(src))/1)) != 0) {
			// Always check before using TclUtfToUniChar. Not doing can so
			// cause it run beyond the end of the buffer! If we happen such an
			// incomplete char its bytes are made to represent themselves
			// unless the user has explicitly asked to be told.

			if flags&TCL_ENCODING_STOPONERROR != 0 && pureNullMode == 0 {
				result = -1
				break
			}
			*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
			src += uintptr(1)
			dst += uintptr(XTcl_UniCharToUtf(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))), dst))
		} else {
			var len Size_t = func() uint64 {
				if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
					return uint64(func() int32 {
						*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
						return 1
					}())
				}
				return uint64(XTcl_UtfToUniChar(tls, src, chPtr))
			}()
			if len < uint64(2) && int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))) != 0 && flags&TCL_ENCODING_STOPONERROR != 0 &&
				int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr)))&libc.CplInt32(0x7FF) != 0xD800 && pureNullMode == 0 {
				result = -2
				break
			}
			src += uintptr(len)
			if int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr)))&libc.CplInt32(0x7FF) == 0xD800 {
				// var low Tcl_UniChar at bp, 2

				// A surrogate character is detected, handle especially
				if len < uint64(3) && int32(*(*int8)(unsafe.Pointer(src + uintptr(uint64(3)-len))))&0xC0 != 0x80 {
					// It's invalid. See [ed29806ba]
					*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src + libc.UintptrFromInt32(-1)))))
					dst += uintptr(XTcl_UniCharToUtf(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))), dst))
					continue
				}
				*(*Tcl_UniChar)(unsafe.Pointer(bp /* low */)) = *(*Tcl_UniChar)(unsafe.Pointer(chPtr))
				if src <= srcEnd-uintptr(3) {
					len = uint64(XTcl_UtfToUniChar(tls, src, bp))
				} else {
					len = uint64(0)
				}
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))&libc.CplInt32(0x3FF) != 0xDC00 || int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr)))&0x400 != 0 {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8((int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr)))>>12 | 0xE0) & 0xEF)
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8((int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr)))>>6 | 0x80) & 0xBF)
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8((int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))) | 0x80) & 0xBF)
					*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(0) // reset surrogate handling
					continue
				} else if TCL_UTF_MAX > 3 || pureNullMode == 1 {
					var full int32 = int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr)))&0x3FF<<10 | int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))&0x3FF + 0x10000
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8((full>>18 | 0xF0) & 0xF7)
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8((full>>12 | 0x80) & 0xBF)
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8((full>>6 | 0x80) & 0xBF)
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8((full | 0x80) & 0xBF)
					*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(0) // reset surrogate handling
					src += uintptr(len)
					continue
				}
			}
			dst += uintptr(XTcl_UniCharToUtf(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))), dst))
		}
	}

	*(*int32)(unsafe.Pointer(srcReadPtr)) = int32((int64(src) - int64(srcStart)) / 1)
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = int32((int64(dst) - int64(dstStart)) / 1)
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = numChars
	return result
}

//-------------------------------------------------------------------------
//
// UnicodeToUtfProc --
//
//	Convert from UTF-16 to UTF-8.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sUnicodeToUtfProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:2422:1: */
	var srcStart uintptr
	var srcEnd uintptr
	var dstEnd uintptr
	var dstStart uintptr
	var result int32
	var numChars int32
	var charLimit int32 = 0x7fffffff
	var ch uint16

	if flags&TCL_ENCODING_CHAR_LIMIT != 0 {
		charLimit = *(*int32)(unsafe.Pointer(dstCharsPtr))
	}
	result = TCL_OK

	// check alignment with utf-16 (2 == sizeof(UTF-16))
	if srcLen%2 != 0 {
		result = -1
		srcLen--
	}

	// If last code point is a high surrogate, we cannot handle that yet.

	if srcLen >= 2 && int32(*(*int8)(unsafe.Pointer(src + uintptr(srcLen-func() int32 {
		if clientData != 0 {
			return 1
		}
		return 2
	}()))))&0xFC == 0xD8 {
		result = -1
		srcLen = srcLen - 2
	}

	srcStart = src
	srcEnd = src + uintptr(srcLen)

	dstStart = dst
	dstEnd = dst + uintptr(dstLen) - uintptr(TCL_UTF_MAX)

	for numChars = 0; src < srcEnd && numChars <= charLimit; numChars++ {
		if dst > dstEnd {
			result = -4
			break
		}

		if clientData != 0 {
			ch = uint16(int32(*(*int8)(unsafe.Pointer(src + 1)))&0xFF<<8 | int32(*(*int8)(unsafe.Pointer(src)))&0xFF)
		} else {
			ch = uint16(int32(*(*int8)(unsafe.Pointer(src)))&0xFF<<8 | int32(*(*int8)(unsafe.Pointer(src + 1)))&0xFF)
		}

		// Special case for 1-byte utf chars for speed. Make sure we work with
		// unsigned short-size data.

		if ch != 0 && int32(ch) < 0x80 {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(int32(ch) & 0xFF)
		} else {
			dst += uintptr(XTcl_UniCharToUtf(tls, int32(ch), dst))
		}
		src += uintptr(unsafe.Sizeof(uint16(0)))
	}

	*(*int32)(unsafe.Pointer(srcReadPtr)) = int32((int64(src) - int64(srcStart)) / 1)
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = int32((int64(dst) - int64(dstStart)) / 1)
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = numChars
	return result
}

//-------------------------------------------------------------------------
//
// UtfToUnicodeProc --
//
//	Convert from UTF-8 to UTF-16.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sUtfToUnicodeProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:2528:1: */
	var srcStart uintptr
	var srcEnd uintptr
	var srcClose uintptr
	var dstStart uintptr
	var dstEnd uintptr
	var result int32
	var numChars int32
	var chPtr uintptr = statePtr

	if flags&TCL_ENCODING_START != 0 {
		*(*Tcl_EncodingState)(unsafe.Pointer(statePtr)) = uintptr(0)
	}
	srcStart = src
	srcEnd = src + uintptr(srcLen)
	srcClose = srcEnd
	if flags&TCL_ENCODING_END == 0 {
		srcClose -= uintptr(TCL_UTF_MAX)
	}

	dstStart = dst
	dstEnd = dst + uintptr(dstLen) - uintptr(uint64(unsafe.Sizeof(Tcl_UniChar(0))))

	result = TCL_OK
	for numChars = 0; src < srcEnd; numChars++ {
		if src > srcClose && !(XTcl_UtfCharComplete(tls, src, int32((int64(srcEnd)-int64(src))/1)) != 0) {
			// If there is more string to follow, this will ensure that the
			// last UTF-8 character in the source buffer hasn't been cut off.

			result = -1
			break
		}
		if dst > dstEnd {
			result = -4
			break
		}
		src += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, src, chPtr))
		}()

		if clientData != 0 {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))) & 0xFF)
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))) >> 8)
		} else {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))) >> 8)
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))) & 0xFF)
		}
	}
	*(*int32)(unsafe.Pointer(srcReadPtr)) = int32((int64(src) - int64(srcStart)) / 1)
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = int32((int64(dst) - int64(dstStart)) / 1)
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = numChars
	return result
}

//-------------------------------------------------------------------------
//
// TableToUtfProc --
//
//	Convert from the encoding specified by the TableEncodingData into
//	UTF-8.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sTableToUtfProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:2644:1: */
	var srcStart uintptr
	var srcEnd uintptr
	var dstEnd uintptr
	var dstStart uintptr
	var prefixBytes uintptr
	var result int32
	var byte int32
	var numChars int32
	var charLimit int32 = 0x7fffffff
	var ch Tcl_UniChar = Tcl_UniChar(0)
	var toUnicode uintptr
	var pageZero uintptr
	var dataPtr uintptr = clientData

	if flags&TCL_ENCODING_CHAR_LIMIT != 0 {
		charLimit = *(*int32)(unsafe.Pointer(dstCharsPtr))
	}
	srcStart = src
	srcEnd = src + uintptr(srcLen)

	dstStart = dst
	dstEnd = dst + uintptr(dstLen) - uintptr(TCL_UTF_MAX)

	toUnicode = (*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode
	prefixBytes = dataPtr + 4 /* &.prefixBytes */
	pageZero = *(*uintptr)(unsafe.Pointer(toUnicode))

	result = TCL_OK
	for numChars = 0; src < srcEnd && numChars <= charLimit; numChars++ {
		if dst > dstEnd {
			result = -4
			break
		}
		byte = int32(*(*uint8)(unsafe.Pointer(src)))
		if *(*int8)(unsafe.Pointer(prefixBytes + uintptr(byte))) != 0 {
			src++
			if src >= srcEnd {
				src--
				result = -1
				break
			}
			ch = *(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(toUnicode + uintptr(byte)*8)) + uintptr(*(*uint8)(unsafe.Pointer(src)))*2))
		} else {
			ch = *(*uint16)(unsafe.Pointer(pageZero + uintptr(byte)*2))
		}
		if int32(ch) == 0 && byte != 0 {
			if flags&TCL_ENCODING_STOPONERROR != 0 {
				result = -2
				break
			}
			if *(*int8)(unsafe.Pointer(prefixBytes + uintptr(byte))) != 0 {
				src--
			}
			ch = Tcl_UniChar(byte)
		}

		// Special case for 1-byte utf chars for speed.

		if ch != 0 && int32(ch) < 0x80 {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(ch)
		} else {
			dst += uintptr(XTcl_UniCharToUtf(tls, int32(ch), dst))
		}
		src++
	}

	*(*int32)(unsafe.Pointer(srcReadPtr)) = int32((int64(src) - int64(srcStart)) / 1)
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = int32((int64(dst) - int64(dstStart)) / 1)
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = numChars
	return result
}

//-------------------------------------------------------------------------
//
// TableFromUtfProc --
//
//	Convert from UTF-8 into the encoding specified by the
//	TableEncodingData.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sTableFromUtfProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:2757:1: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	var srcStart uintptr
	var srcEnd uintptr
	var srcClose uintptr
	var dstStart uintptr
	var dstEnd uintptr
	var prefixBytes uintptr
	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar(0)
	var result int32
	var len int32
	var word int32
	var numChars int32
	var dataPtr uintptr = clientData
	var fromUnicode uintptr

	result = TCL_OK

	prefixBytes = dataPtr + 4 /* &.prefixBytes */
	fromUnicode = (*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode

	srcStart = src
	srcEnd = src + uintptr(srcLen)
	srcClose = srcEnd
	if flags&TCL_ENCODING_END == 0 {
		srcClose -= uintptr(TCL_UTF_MAX)
	}

	dstStart = dst
	dstEnd = dst + uintptr(dstLen) - uintptr(1)

	for numChars = 0; src < srcEnd; numChars++ {
		if src > srcClose && !(XTcl_UtfCharComplete(tls, src, int32((int64(srcEnd)-int64(src))/1)) != 0) {
			// If there is more string to follow, this will ensure that the
			// last UTF-8 character in the source buffer hasn't been cut off.

			result = -1
			break
		}
		len = func() int32 {
			if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
				return func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
					return 1
				}()
			}
			return XTcl_UtfToUniChar(tls, src, bp)
		}()

		word = int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(fromUnicode + uintptr(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))>>8)*8)) + uintptr(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))&0xFF)*2)))

		if word == 0 && int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) != 0 {
			if flags&TCL_ENCODING_STOPONERROR != 0 {
				result = -3
				break
			}
			word = (*TableEncodingData)(unsafe.Pointer(dataPtr)).Ffallback
		}
		if int32(*(*int8)(unsafe.Pointer(prefixBytes + uintptr(word>>8)))) != 0 {
			if dst+uintptr(1) > dstEnd {
				result = -4
				break
			}
			*(*int8)(unsafe.Pointer(dst)) = int8(word >> 8)
			*(*int8)(unsafe.Pointer(dst + 1)) = int8(word)
			dst += uintptr(2)
		} else {
			if dst > dstEnd {
				result = -4
				break
			}
			*(*int8)(unsafe.Pointer(dst)) = int8(word)
			dst++
		}
		src += uintptr(len)
	}

	*(*int32)(unsafe.Pointer(srcReadPtr)) = int32((int64(src) - int64(srcStart)) / 1)
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = int32((int64(dst) - int64(dstStart)) / 1)
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = numChars
	return result
}

//-------------------------------------------------------------------------
//
// Iso88591ToUtfProc --
//
//	Convert from the "iso8859-1" encoding into UTF-8.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sIso88591ToUtfProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:2879:1: */
	var srcStart uintptr
	var srcEnd uintptr
	var dstEnd uintptr
	var dstStart uintptr
	var result int32
	var numChars int32
	var charLimit int32 = 0x7fffffff

	if flags&TCL_ENCODING_CHAR_LIMIT != 0 {
		charLimit = *(*int32)(unsafe.Pointer(dstCharsPtr))
	}
	srcStart = src
	srcEnd = src + uintptr(srcLen)

	dstStart = dst
	dstEnd = dst + uintptr(dstLen) - uintptr(TCL_UTF_MAX)

	result = TCL_OK
	for numChars = 0; src < srcEnd && numChars <= charLimit; numChars++ {
		var ch Tcl_UniChar = Tcl_UniChar(0)

		if dst > dstEnd {
			result = -4
			break
		}
		ch = Tcl_UniChar(*(*uint8)(unsafe.Pointer(src)))

		// Special case for 1-byte utf chars for speed.

		if ch != 0 && int32(ch) < 0x80 {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(ch)
		} else {
			dst += uintptr(XTcl_UniCharToUtf(tls, int32(ch), dst))
		}
		src++
	}

	*(*int32)(unsafe.Pointer(srcReadPtr)) = int32((int64(src) - int64(srcStart)) / 1)
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = int32((int64(dst) - int64(dstStart)) / 1)
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = numChars
	return result
}

//-------------------------------------------------------------------------
//
// Iso88591FromUtfProc --
//
//	Convert from UTF-8 into the encoding "iso8859-1".
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sIso88591FromUtfProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:2963:1: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	var srcStart uintptr
	var srcEnd uintptr
	var srcClose uintptr
	var dstStart uintptr
	var dstEnd uintptr
	var result int32 = TCL_OK
	var numChars int32
	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar(0)

	srcStart = src
	srcEnd = src + uintptr(srcLen)
	srcClose = srcEnd
	if flags&TCL_ENCODING_END == 0 {
		srcClose -= uintptr(TCL_UTF_MAX)
	}

	dstStart = dst
	dstEnd = dst + uintptr(dstLen) - uintptr(1)

	for numChars = 0; src < srcEnd; numChars++ {
		var len int32

		if src > srcClose && !(XTcl_UtfCharComplete(tls, src, int32((int64(srcEnd)-int64(src))/1)) != 0) {
			// If there is more string to follow, this will ensure that the
			// last UTF-8 character in the source buffer hasn't been cut off.

			result = -1
			break
		}
		len = func() int32 {
			if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
				return func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
					return 1
				}()
			}
			return XTcl_UtfToUniChar(tls, src, bp)
		}()

		// Check for illegal characters.

		if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) > 0xFF {
			if flags&TCL_ENCODING_STOPONERROR != 0 {
				result = -3
				break
			}
			// Plunge on, using '?' as a fallback character.

			*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar('?')
		}

		if dst > dstEnd {
			result = -4
			break
		}
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)))
		src += uintptr(len)
	}

	*(*int32)(unsafe.Pointer(srcReadPtr)) = int32((int64(src) - int64(srcStart)) / 1)
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = int32((int64(dst) - int64(dstStart)) / 1)
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = numChars
	return result
}

//---------------------------------------------------------------------------
//
// TableFreeProc --
//
//	This function is invoked when an encoding is deleted. It deletes the
//	memory used by the TableEncodingData.
//
// Results:
//	None.
//
// Side effects:
//	Memory freed.
//
//---------------------------------------------------------------------------

func sTableFreeProc(tls *libc.TLS, clientData ClientData) { /* tclEncoding.c:3075:1: */
	var dataPtr uintptr = clientData

	// Make sure we aren't freeing twice on shutdown. [Bug 219314]

	XTclpFree(tls, (*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode)
	(*TableEncodingData)(unsafe.Pointer(dataPtr)).FtoUnicode = uintptr(0)
	XTclpFree(tls, (*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode)
	(*TableEncodingData)(unsafe.Pointer(dataPtr)).FfromUnicode = uintptr(0)
	XTclpFree(tls, dataPtr)
}

//-------------------------------------------------------------------------
//
// EscapeToUtfProc --
//
//	Convert from the encoding specified by the EscapeEncodingData into
//	UTF-8.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sEscapeToUtfProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:3110:1: */
	var dataPtr uintptr = clientData
	var prefixBytes uintptr
	var tablePrefixBytes uintptr
	var srcStart uintptr
	var srcEnd uintptr
	var tableToUnicode uintptr
	var encodingPtr uintptr
	var state int32
	var result int32
	var numChars int32
	var charLimit int32 = 0x7fffffff
	var dstStart uintptr
	var dstEnd uintptr

	if flags&TCL_ENCODING_CHAR_LIMIT != 0 {
		charLimit = *(*int32)(unsafe.Pointer(dstCharsPtr))
	}
	result = TCL_OK
	tablePrefixBytes = uintptr(0)
	tableToUnicode = uintptr(0)
	prefixBytes = dataPtr + 44 /* &.prefixBytes */
	encodingPtr = uintptr(0)

	srcStart = src
	srcEnd = src + uintptr(srcLen)

	dstStart = dst
	dstEnd = dst + uintptr(dstLen) - uintptr(TCL_UTF_MAX)

	state = int32(*(*Tcl_EncodingState)(unsafe.Pointer(statePtr)))
	if flags&TCL_ENCODING_START != 0 {
		state = 0
	}

	for numChars = 0; src < srcEnd && numChars <= charLimit; {
		var byte int32
		var hi int32
		var lo int32
		var ch int32

		if dst > dstEnd {
			result = -4
			break
		}
		byte = int32(*(*uint8)(unsafe.Pointer(src)))
		if *(*int8)(unsafe.Pointer(prefixBytes + uintptr(byte))) != 0 {
			var left uint32
			var len uint32
			var longest uint32
			var checked int32
			var i int32
			var subTablePtr uintptr

			// Saw the beginning of an escape sequence.

			left = uint32((int64(srcEnd) - int64(src)) / 1)
			len = (*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FinitLen
			longest = len
			checked = 0

			if len <= left {
				checked++
				if len > uint32(0) && libc.Xmemcmp(tls, src, dataPtr+8, uint64(len)) == 0 {
					// If we see initialization string, skip it, even if we're
					// not at the beginning of the buffer.

					src += uintptr(len)
					continue
				}
			}

			len = (*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FfinalLen
			if len > longest {
				longest = len
			}

			if len <= left {
				checked++
				if len > uint32(0) && libc.Xmemcmp(tls, src, dataPtr+28, uint64(len)) == 0 {
					// If we see finalization string, skip it, even if we're
					// not at the end of the buffer.

					src += uintptr(len)
					continue
				}
			}

			subTablePtr = dataPtr + 304 /* &.subTables */
			for i = 0; i < (*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FnumSubTables; i++ {
				len = (*EscapeSubTable)(unsafe.Pointer(subTablePtr)).FsequenceLen
				if len > longest {
					longest = len
				}
				if len <= left {
					checked++
					if len > uint32(0) && libc.Xmemcmp(tls, src, subTablePtr+4, uint64(len)) == 0 {
						state = i
						encodingPtr = uintptr(0)
						subTablePtr = uintptr(0)
						src += uintptr(len)
						break
					}
				}
				subTablePtr += 64
			}

			if subTablePtr == uintptr(0) {
				// A match was found, the escape sequence was consumed, and
				// the state was updated.

				continue
			}

			// We have a split-up or unrecognized escape sequence. If we
			// checked all the sequences, then it's a syntax error, otherwise
			// we need more bytes to determine a match.

			if checked == (*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FnumSubTables+2 ||
				flags&TCL_ENCODING_END != 0 {
				if flags&TCL_ENCODING_STOPONERROR == 0 {
					// Skip the unknown escape sequence.

					src += uintptr(longest)
					continue
				}
				result = -2
			} else {
				result = -1
			}
			break
		}

		if encodingPtr == uintptr(0) {
			var tableDataPtr uintptr

			encodingPtr = sGetTableEncoding(tls, dataPtr, state)
			tableDataPtr = (*Encoding)(unsafe.Pointer(encodingPtr)).FclientData
			tablePrefixBytes = tableDataPtr + 4 /* &.prefixBytes */
			tableToUnicode = (*TableEncodingData)(unsafe.Pointer(tableDataPtr)).FtoUnicode
		}

		if *(*int8)(unsafe.Pointer(tablePrefixBytes + uintptr(byte))) != 0 {
			src++
			if src >= srcEnd {
				src--
				result = -1
				break
			}
			hi = byte
			lo = int32(*(*uint8)(unsafe.Pointer(src)))
		} else {
			hi = 0
			lo = byte
		}

		ch = int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tableToUnicode + uintptr(hi)*8)) + uintptr(lo)*2)))
		dst += uintptr(XTcl_UniCharToUtf(tls, ch, dst))
		src++
		numChars++
	}

	*(*Tcl_EncodingState)(unsafe.Pointer(statePtr)) = uintptr(Intptr_t(state))
	*(*int32)(unsafe.Pointer(srcReadPtr)) = int32((int64(src) - int64(srcStart)) / 1)
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = int32((int64(dst) - int64(dstStart)) / 1)
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = numChars
	return result
}

//-------------------------------------------------------------------------
//
// EscapeFromUtfProc --
//
//	Convert from UTF-8 into the encoding specified by the
//	EscapeEncodingData.
//
// Results:
//	Returns TCL_OK if conversion was successful.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func sEscapeFromUtfProc(tls *libc.TLS, clientData ClientData, src uintptr, srcLen int32, flags int32, statePtr uintptr, dst uintptr, dstLen int32, srcReadPtr uintptr, dstWrotePtr uintptr, dstCharsPtr uintptr) int32 { /* tclEncoding.c:3324:1: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	var dataPtr uintptr = clientData
	var encodingPtr uintptr
	var srcStart uintptr
	var srcEnd uintptr
	var srcClose uintptr
	var dstStart uintptr
	var dstEnd uintptr
	var state int32
	var result int32
	var numChars int32
	var tableDataPtr uintptr
	var tablePrefixBytes uintptr
	var tableFromUnicode uintptr
	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar(0)

	result = TCL_OK

	srcStart = src
	srcEnd = src + uintptr(srcLen)
	srcClose = srcEnd
	if flags&TCL_ENCODING_END == 0 {
		srcClose -= uintptr(TCL_UTF_MAX)
	}

	dstStart = dst
	dstEnd = dst + uintptr(dstLen) - uintptr(1)

	// RFC 1468 states that the text starts in ASCII, and switches to Japanese
	// characters, and that the text must end in ASCII. [Patch 474358]

	if flags&TCL_ENCODING_START != 0 {
		state = 0
		if dst+uintptr((*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FinitLen) > dstEnd {
			*(*int32)(unsafe.Pointer(srcReadPtr)) = 0
			*(*int32)(unsafe.Pointer(dstWrotePtr)) = 0
			return -4
		}
		libc.Xmemcpy(tls, dst, dataPtr+8, uint64((*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FinitLen))
		dst += uintptr((*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FinitLen)
	} else {
		state = int32(*(*Tcl_EncodingState)(unsafe.Pointer(statePtr)))
	}

	encodingPtr = sGetTableEncoding(tls, dataPtr, state)
	tableDataPtr = (*Encoding)(unsafe.Pointer(encodingPtr)).FclientData
	tablePrefixBytes = tableDataPtr + 4 /* &.prefixBytes */
	tableFromUnicode = (*TableEncodingData)(unsafe.Pointer(tableDataPtr)).FfromUnicode

	for numChars = 0; src < srcEnd; numChars++ {
		var len uint32
		var word int32

		if src > srcClose && !(XTcl_UtfCharComplete(tls, src, int32((int64(srcEnd)-int64(src))/1)) != 0) {
			// If there is more string to follow, this will ensure that the
			// last UTF-8 character in the source buffer hasn't been cut off.

			result = -1
			break
		}
		len = func() uint32 {
			if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
				return uint32(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
					return 1
				}())
			}
			return uint32(XTcl_UtfToUniChar(tls, src, bp))
		}()
		word = int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tableFromUnicode + uintptr(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))>>8)*8)) + uintptr(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))&0xFF)*2)))

		if word == 0 && int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) != 0 {
			var oldState int32
			var subTablePtr uintptr

			oldState = state
			for state = 0; state < (*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FnumSubTables; state++ {
				encodingPtr = sGetTableEncoding(tls, dataPtr, state)
				tableDataPtr = (*Encoding)(unsafe.Pointer(encodingPtr)).FclientData
				word = int32(*(*uint16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TableEncodingData)(unsafe.Pointer(tableDataPtr)).FfromUnicode + uintptr(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))>>8)*8)) + uintptr(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))&0xFF)*2)))
				if word != 0 {
					break
				}
			}

			if word == 0 {
				state = oldState
				if flags&TCL_ENCODING_STOPONERROR != 0 {
					result = -3
					break
				}
				encodingPtr = sGetTableEncoding(tls, dataPtr, state)
				tableDataPtr = (*Encoding)(unsafe.Pointer(encodingPtr)).FclientData
				word = (*TableEncodingData)(unsafe.Pointer(tableDataPtr)).Ffallback
			}

			tablePrefixBytes = tableDataPtr + 4 /* &.prefixBytes */
			tableFromUnicode = (*TableEncodingData)(unsafe.Pointer(tableDataPtr)).FfromUnicode

			// The state variable has the value of oldState when word is 0.
			// In this case, the escape sequence should not be copied to dst
			// because the current character set is not changed.

			if state != oldState {
				subTablePtr = dataPtr + 304 + uintptr(state)*64
				if dst+uintptr((*EscapeSubTable)(unsafe.Pointer(subTablePtr)).FsequenceLen) > dstEnd {
					// If there is no space to write the escape sequence, the
					// state variable must be changed to the value of oldState
					// variable because this escape sequence must be written
					// in the next conversion.

					state = oldState
					result = -4
					break
				}
				libc.Xmemcpy(tls, dst, subTablePtr+4,
					uint64((*EscapeSubTable)(unsafe.Pointer(subTablePtr)).FsequenceLen))
				dst += uintptr((*EscapeSubTable)(unsafe.Pointer(subTablePtr)).FsequenceLen)
			}
		}

		if int32(*(*int8)(unsafe.Pointer(tablePrefixBytes + uintptr(word>>8)))) != 0 {
			if dst+uintptr(1) > dstEnd {
				result = -4
				break
			}
			*(*int8)(unsafe.Pointer(dst)) = int8(word >> 8)
			*(*int8)(unsafe.Pointer(dst + 1)) = int8(word)
			dst += uintptr(2)
		} else {
			if dst > dstEnd {
				result = -4
				break
			}
			*(*int8)(unsafe.Pointer(dst)) = int8(word)
			dst++
		}
		src += uintptr(len)
	}

	if result == TCL_OK && flags&TCL_ENCODING_END != 0 {
		var len uint32 = (*EscapeSubTable)(unsafe.Pointer(dataPtr + 304)).FsequenceLen

		// Certain encodings like iso2022-jp need to write an escape sequence
		// after all characters have been converted. This logic checks that
		// enough room is available in the buffer for the escape bytes. The
		// TCL_ENCODING_END flag is cleared after a final escape sequence has
		// been added to the buffer so that another call to this method does
		// not attempt to append escape bytes a second time.

		if dst+uintptr((*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FfinalLen)+uintptr(func() uint32 {
			if state != 0 {
				return len
			}
			return uint32(0)
		}()) > dstEnd {
			result = -4
		} else {
			if state != 0 {
				libc.Xmemcpy(tls, dst, dataPtr+304+4, uint64(len))
				dst += uintptr(len)
			}
			libc.Xmemcpy(tls, dst, dataPtr+28, uint64((*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FfinalLen))
			dst += uintptr((*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FfinalLen)
			state = state & libc.CplInt32(TCL_ENCODING_END)
		}
	}

	*(*Tcl_EncodingState)(unsafe.Pointer(statePtr)) = uintptr(Intptr_t(state))
	*(*int32)(unsafe.Pointer(srcReadPtr)) = int32((int64(src) - int64(srcStart)) / 1)
	*(*int32)(unsafe.Pointer(dstWrotePtr)) = int32((int64(dst) - int64(dstStart)) / 1)
	*(*int32)(unsafe.Pointer(dstCharsPtr)) = numChars
	return result
}

//---------------------------------------------------------------------------
//
// EscapeFreeProc --
//
//	Frees resources used by the encoding.
//
// Results:
//	None.
//
// Side effects:
//	Memory is freed.
//
//---------------------------------------------------------------------------

func sEscapeFreeProc(tls *libc.TLS, clientData ClientData) { /* tclEncoding.c:3536:1: */
	var dataPtr uintptr = clientData
	var subTablePtr uintptr
	var i int32

	if dataPtr == uintptr(0) {
		return
	}

	// The subTables should be freed recursively in normal operation but not
	// during TclFinalizeEncodingSubsystem because they are also present as a
	// weak reference in the toplevel encodingTable (i.e., they don't have a
	// +1 refcount for this), and unpredictable nuking order could remove them
	// from under the following loop's feet. [Bug 2891556]
	//
	// The encodingsInitialized flag, being reset on entry to TFES, can serve
	// as a "not in finalization" test.

	if encodingsInitialized != 0 {
		subTablePtr = dataPtr + 304 /* &.subTables */
		for i = 0; i < (*EscapeEncodingData)(unsafe.Pointer(dataPtr)).FnumSubTables; i++ {
			sFreeEncoding(tls, (*EscapeSubTable)(unsafe.Pointer(subTablePtr)).FencodingPtr)
			(*EscapeSubTable)(unsafe.Pointer(subTablePtr)).FencodingPtr = uintptr(0)
			subTablePtr += 64
		}
	}
	XTclpFree(tls, dataPtr)
}

//---------------------------------------------------------------------------
//
// GetTableEncoding --
//
//	Helper function for the EscapeEncodingData conversions. Gets the
//	encoding (of type TextEncodingData) that represents the specified
//	state.
//
// Results:
//	The return value is the encoding.
//
// Side effects:
//	If the encoding that represents the specified state has not already
//	been used by this EscapeEncoding, it will be loaded and cached in the
//	dataPtr.
//
//---------------------------------------------------------------------------

func sGetTableEncoding(tls *libc.TLS, dataPtr uintptr, state int32) uintptr { /* tclEncoding.c:3590:17: */
	var subTablePtr uintptr = dataPtr + 304 + uintptr(state)*64
	var encodingPtr uintptr = (*EscapeSubTable)(unsafe.Pointer(subTablePtr)).FencodingPtr

	if encodingPtr == uintptr(0) {
		encodingPtr = XTcl_GetEncoding(tls, uintptr(0), subTablePtr+20)
		if encodingPtr == uintptr(0) ||
			(*Encoding)(unsafe.Pointer(encodingPtr)).FtoUtfProc != *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
			}{sTableToUtfProc})) &&
				(*Encoding)(unsafe.Pointer(encodingPtr)).FtoUtfProc != *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
				}{sIso88591ToUtfProc})) {
			XTcl_Panic(tls, ts+26677, 0)
		}
		(*EscapeSubTable)(unsafe.Pointer(subTablePtr)).FencodingPtr = encodingPtr
	}

	return encodingPtr
}

//---------------------------------------------------------------------------
//
// unilen --
//
//	A helper function for the Tcl_ExternalToUtf functions. This function
//	is similar to strlen for double-byte characters: it returns the number
//	of bytes in a 0x0000 terminated string.
//
// Results:
//	As above.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func unilen(tls *libc.TLS, src uintptr) Size_t { /* tclEncoding.c:3630:1: */
	var p uintptr

	p = src
	for int32(*(*uint16)(unsafe.Pointer(p))) != 0x0000 {
		p += 2
	}
	return Size_t((int64(p) - int64(src)) / 1)
}

//-------------------------------------------------------------------------
//
// InitializeEncodingSearchPath	--
//
//	This is the fallback routine that sets the default value of the
//	encoding search path if the application has not set one via a call to
//	Tcl_SetEncodingSearchPath() by the first time the search path is needed
//	to load encoding data.
//
//	The default encoding search path is produced by taking each directory
//	in the library path, appending a subdirectory named "encoding", and if
//	the resulting directory exists, adding it to the encoding search path.
//
// Results:
//	None.
//
// Side effects:
//	Sets the encoding search path to an initial value.
//
//-------------------------------------------------------------------------

func sInitializeEncodingSearchPath(tls *libc.TLS, valuePtr uintptr, lengthPtr uintptr, encodingPtr uintptr) { /* tclEncoding.c:3666:1: */
	bp := tls.Alloc(84)
	defer tls.Free(84)

	var bytes uintptr
	var i int32
	// var numDirs int32 at bp, 4

	// var numBytes int32 at bp+80, 4

	var libPathObj uintptr
	// var encodingObj uintptr at bp+16, 8

	var searchPathObj uintptr

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(bp + 16)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes, ts+12191, uint64(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes + 8)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Flength = int32(uint64(unsafe.Sizeof([9]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr = uintptr(0)
		{
		}
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		searchPathObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(searchPathObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(searchPathObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(searchPathObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(searchPathObj)).FtypePtr = uintptr(0)
	{
	}

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(searchPathObj)).FrefCount++
	libPathObj = XTclGetLibraryPath(tls)
	(*Tcl_Obj)(unsafe.Pointer(libPathObj)).FrefCount++
	XTcl_ListObjLength(tls, uintptr(0), libPathObj, bp)

	for i = 0; i < *(*int32)(unsafe.Pointer(bp /* numDirs */)); i++ {
		// var directoryObj uintptr at bp+8, 8

		var pathObj uintptr
		// var _stat64 Tcl_StatBuf at bp+24, 56

		XTcl_ListObjIndex(tls, uintptr(0), libPathObj, i, bp+8)
		pathObj = XTcl_FSJoinToPath(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* directoryObj */)), 1, bp+16)
		(*Tcl_Obj)(unsafe.Pointer(pathObj)).FrefCount++
		if 0 == XTcl_FSStat(tls, pathObj, bp+24) && int32((*Tcl_StatBuf)(unsafe.Pointer(bp+24)).Fst_mode)&X_S_IFMT == X_S_IFDIR {
			XTcl_ListObjAppendElement(tls, uintptr(0), searchPathObj, pathObj)
		}
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = pathObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _objPtr uintptr = libPathObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok5 := true; ok5; ok5 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 16))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	*(*Tcl_Encoding)(unsafe.Pointer(encodingPtr)) = libraryPath.Fencoding
	if *(*Tcl_Encoding)(unsafe.Pointer(encodingPtr)) != 0 {
		(*Encoding)(unsafe.Pointer(*(*Tcl_Encoding)(unsafe.Pointer(encodingPtr)))).FrefCount++
	}
	bytes = XTcl_GetStringFromObj(tls, searchPathObj, bp+80)

	*(*int32)(unsafe.Pointer(lengthPtr)) = *(*int32)(unsafe.Pointer(bp + 80 /* numBytes */))
	*(*uintptr)(unsafe.Pointer(valuePtr)) = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 80))+1))
	libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(valuePtr)), bytes, uint64(*(*int32)(unsafe.Pointer(bp + 80))+1))
	for ok6 := true; ok6; ok6 = 0 != 0 {
		var _objPtr uintptr = searchPathObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The lists of subcommands and options for the [namespace ensemble] command.

var ensembleSubcommands = [4]uintptr{
	ts + 26712, ts + 23746, ts + 12691, uintptr(0),
} /* tclEnsemble.c:50:19 */

var ensembleCreateOptions = [7]uintptr{
	ts + 16010, ts + 26722, ts + 26727, ts + 26739, ts + 26749,
	ts + 26762, uintptr(0),
} /* tclEnsemble.c:57:19 */

var ensembleConfigOptions = [7]uintptr{
	ts + 26722, ts + 26771, ts + 26727, ts + 26739, ts + 26749,
	ts + 26762, uintptr(0),
} /* tclEnsemble.c:65:19 */

// This structure defines a Tcl object type that contains a reference to an
// ensemble subcommand (e.g. the "length" in [string length ab]). It is used
// to cache the mapping between the subcommand itself and the real command
// that implements it.

var ensembleCmdType = Tcl_ObjType{
	Fname:           ts + 26782,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // setFromAnyProc
} /* tclEnsemble.c:81:26 */

// The internal rep for caching ensemble subcommand lookups and
// spell corrections.

type EnsembleCmdRep = struct {
	Fepoch       int32
	F__ccgo_pad1 [4]byte
	Ftoken       uintptr
	Ffix         uintptr
	FhPtr        uintptr
} /* tclEnsemble.c:103:3 */

func sNewNsObj(tls *libc.TLS, namespacePtr uintptr) uintptr { /* tclEnsemble.c:106:23: */
	var nsPtr uintptr = namespacePtr

	if namespacePtr == (*Interp)(unsafe.Pointer((*Namespace)(unsafe.Pointer(nsPtr)).Finterp)).FglobalNsPtr {
		return XTcl_NewStringObj(tls, ts+7376, 2)
	} else {
		return XTcl_NewStringObj(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName, -1)
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclNamespaceEnsembleCmd --
//
//	Invoked to implement the "namespace ensemble" command that creates and
//	manipulates ensembles built on top of namespaces. Handles the
//	following syntax:
//
//	    namespace ensemble name ?dictionary?
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Creates the ensemble for the namespace if one did not previously
//	exist. Alternatively, alters the way that the ensemble's subcommand =>
//	implementation prefix is configured.
//
//----------------------------------------------------------------------

func XTclNamespaceEnsembleCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclEnsemble.c:142:1: */
	bp := tls.Alloc(380)
	defer tls.Free(380)

	// var namespacePtr uintptr at bp+280, 8

	var nsPtr uintptr
	var cxtPtr uintptr
	// var foundNsPtr uintptr at bp+240, 8

	// var altFoundNsPtr uintptr at bp+248, 8

	// var actualCxtPtr uintptr at bp+256, 8

	var token Tcl_Command
	// var search Tcl_DictSearch at bp+168, 24

	// var listObj uintptr at bp+200, 8

	// var simpleName uintptr at bp+264, 8

	// var index int32 at bp+160, 4

	// var done int32 at bp+208, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	var _objPtr7 uintptr
	var newList uintptr
	// var newCmd uintptr at bp+224, 8

	// var listv uintptr at bp+216, 8

	var cmd uintptr
	var _objPtr8 uintptr
	var patchedDict uintptr
	// var subcmdWordsObj uintptr at bp+192, 8

	var _objPtr9 uintptr
	var _objPtr10 uintptr
	var name uintptr
	// var len int32 at bp+164, 4

	var allocatedMapFlag int32
	// Defaults
	var subcmdObj uintptr
	var mapObj uintptr
	// var permitPrefix int32 at bp+232, 4

	var unknownObj uintptr
	var paramObj uintptr
	// var flags int32 at bp+288, 4

	// var resultObj uintptr at bp+272, 8

	// Produce list of all information.

	var resultObj1 uintptr
	// var tmpObj uintptr at bp+296, 8
	// silence gcc 4 warning
	// var flags1 int32 at bp+304, 4

	var _objPtr11 uintptr
	var _objPtr12 uintptr
	var _objPtr13 uintptr
	var newList1 uintptr
	// var newCmd1 uintptr at bp+368, 8

	var _objPtr14 uintptr
	var patchedDict1 uintptr
	// var subcmdWordsObj1 uintptr at bp+352, 8

	// var listv1 uintptr at bp+360, 8

	var cmd1 uintptr
	// var len1 int32 at bp+348, 4

	var allocatedMapFlag1 int32
	// var subcmdObj1 uintptr at bp+312, 8

	// var mapObj1 uintptr at bp+320, 8

	// var paramObj1 uintptr at bp+328, 8

	// var unknownObj1 uintptr at bp+336, 8
	// Defaults, silence gcc 4 warnings
	// var permitPrefix1 int32 at bp+376, 4

	// var flags2 int32 at bp+344, 4
	nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr

	if !(nsPtr == uintptr(0) || (*Namespace)(unsafe.Pointer(nsPtr)).Fflags&NS_DYING != 0) {
		goto __1
	}
	if !!(XTcl_InterpDeleted(tls, interp) != 0) {
		goto __2
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+26798,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+26857, uintptr(0)))
__2:
	;
	return TCL_ERROR
__1:
	;

	if !(objc < 2) {
		goto __3
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26862)
	return TCL_ERROR
__3:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&ensembleSubcommands)), int32(unsafe.Sizeof(uintptr(0))), ts+22501, 0, bp+160) != TCL_OK) {
		goto __4
	}
	return TCL_ERROR
__4:
	;

	switch uint32(*(*int32)(unsafe.Pointer(bp + 160 /* index */))) {
	case ENS_CREATE:
		goto __6

	case ENS_EXISTS:
		goto __7

	case ENS_CONFIG:
		goto __8

	default:
		goto __9
	}
	goto __5
__6:
	allocatedMapFlag = 0
	// Defaults
	subcmdObj = uintptr(0)
	mapObj = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 232 /* permitPrefix */)) = 1
	unknownObj = uintptr(0)
	paramObj = uintptr(0)

	// Check that we've got option-value pairs... [Bug 1558654]

	if !(objc&1 != 0) {
		goto __10
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+26883)
	return TCL_ERROR
__10:
	;
	objv += 8 * uintptr(2)
	objc = objc - 2

	name = (*Namespace)(unsafe.Pointer(nsPtr)).Fname
	cxtPtr = (*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr

	// Parse the option list, applying type checks as we go. Note that we
	// are not incrementing any reference counts in the objects at this
	// stage, so the presence of an option multiple times won't cause any
	// memory leaks.

__11:
	if !(objc > 1) {
		goto __13
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), uintptr(unsafe.Pointer(&ensembleCreateOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+160) != TCL_OK) {
		goto __14
	}
	if !(allocatedMapFlag != 0) {
		goto __15
	}
__16:
	_objPtr = mapObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __19
	}
	XTclFreeObj(tls, _objPtr)
__19:
	;
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
__15:
	;
	return TCL_ERROR
__14:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 160 /* index */))) {
	case CRT_CMD:
		goto __21
	case CRT_SUBCMDS:
		goto __22
	case CRT_PARAM:
		goto __23
	case CRT_MAP:
		goto __24
	case CRT_PREFIX:
		goto __25
	case CRT_UNKNOWN:
		goto __26
	}
	goto __20
__21:
	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	cxtPtr = nsPtr
	goto __12
__22:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 164)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+164)
	}() != TCL_OK) {
		goto __27
	}
	if !(allocatedMapFlag != 0) {
		goto __28
	}
__29:
	_objPtr1 = mapObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __32
	}
	XTclFreeObj(tls, _objPtr1)
__32:
	;
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
__28:
	;
	return TCL_ERROR
__27:
	;
	subcmdObj = func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 164)) > 0 {
			return *(*uintptr)(unsafe.Pointer(objv + 1*8))
		}
		return uintptr(0)
	}()
	goto __12
__23:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 164)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+164)
	}() != TCL_OK) {
		goto __33
	}
	if !(allocatedMapFlag != 0) {
		goto __34
	}
__35:
	_objPtr2 = mapObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __38
	}
	XTclFreeObj(tls, _objPtr2)
__38:
	;
	goto __36
__36:
	if 0 != 0 {
		goto __35
	}
	goto __37
__37:
	;
__34:
	;
	return TCL_ERROR
__33:
	;
	paramObj = func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 164)) > 0 {
			return *(*uintptr)(unsafe.Pointer(objv + 1*8))
		}
		return uintptr(0)
	}()
	goto __12
__24:
	patchedDict = uintptr(0)

	// Verify that the map is sensible.

	if !(XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+168,
		bp+192, bp+200, bp+208) != TCL_OK) {
		goto __39
	}
	if !(allocatedMapFlag != 0) {
		goto __40
	}
__41:
	_objPtr3 = mapObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __44
	}
	XTclFreeObj(tls, _objPtr3)
__44:
	;
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
__40:
	;
	return TCL_ERROR
__39:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 208)) != 0) {
		goto __45
	}
	mapObj = uintptr(0)
	goto __12
__45:
	;
__46:

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 216)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 164)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 200)), bp+164, bp+216)
	}() != TCL_OK) {
		goto __49
	}
	XTcl_DictObjDone(tls, bp+168)
	if !(patchedDict != 0) {
		goto __50
	}
__51:
	_objPtr4 = patchedDict
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __54
	}
	XTclFreeObj(tls, _objPtr4)
__54:
	;
	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
__50:
	;
	if !(allocatedMapFlag != 0) {
		goto __55
	}
__56:
	_objPtr5 = mapObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __59
	}
	XTclFreeObj(tls, _objPtr5)
__59:
	;
	goto __57
__57:
	if 0 != 0 {
		goto __56
	}
	goto __58
__58:
	;
__55:
	;
	return TCL_ERROR
__49:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 164)) < 1) {
		goto __60
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+26902, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+26848,
		ts+26962, uintptr(0)))
	XTcl_DictObjDone(tls, bp+168)
	if !(patchedDict != 0) {
		goto __61
	}
__62:
	_objPtr6 = patchedDict
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __65
	}
	XTclFreeObj(tls, _objPtr6)
__65:
	;
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
__61:
	;
	if !(allocatedMapFlag != 0) {
		goto __66
	}
__67:
	_objPtr7 = mapObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __70
	}
	XTclFreeObj(tls, _objPtr7)
__70:
	;
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
__66:
	;
	return TCL_ERROR
__60:
	;
	cmd = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216)))))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216)))))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216)))))
	}()
	if !!(int32(*(*int8)(unsafe.Pointer(cmd))) == ':' && int32(*(*int8)(unsafe.Pointer(cmd + 1))) == ':') {
		goto __71
	}
	newList = XTcl_NewListObj(tls, *(*int32)(unsafe.Pointer(bp + 164 /* len */)), *(*uintptr)(unsafe.Pointer(bp + 216 /* listv */)))
	*(*uintptr)(unsafe.Pointer(bp + 224 /* newCmd */)) = sNewNsObj(tls, nsPtr)

	if !((*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr != 0) {
		goto __72
	}
	XTcl_AppendStringsToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* newCmd */)), libc.VaList(bp+64, ts+7376, uintptr(0)))
__72:
	;
	XTcl_AppendObjToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* newCmd */)), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 /* listv */)))))
	XTcl_ListObjReplace(tls, uintptr(0), newList, 0, 1, 1, bp+224)
	if !(patchedDict == uintptr(0)) {
		goto __73
	}
	patchedDict = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
__73:
	;
	XTcl_DictObjPut(tls, uintptr(0), patchedDict, *(*uintptr)(unsafe.Pointer(bp + 192 /* subcmdWordsObj */)),
		newList)
__71:
	;
	XTcl_DictObjNext(tls, bp+168, bp+192, bp+200, bp+208)
	goto __47
__47:
	if !(*(*int32)(unsafe.Pointer(bp + 208)) != 0) {
		goto __46
	}
	goto __48
__48:
	;

	if !(allocatedMapFlag != 0) {
		goto __74
	}
__75:
	_objPtr8 = mapObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr8)).FrefCount, 1) <= 1) {
		goto __78
	}
	XTclFreeObj(tls, _objPtr8)
__78:
	;
	goto __76
__76:
	if 0 != 0 {
		goto __75
	}
	goto __77
__77:
	;
__74:
	;
	mapObj = func() uintptr {
		if patchedDict != 0 {
			return patchedDict
		}
		return *(*uintptr)(unsafe.Pointer(objv + 1*8))
	}()
	if !(patchedDict != 0) {
		goto __79
	}
	allocatedMapFlag = 1
__79:
	;
	goto __12

__25:
	if !(XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)),
		bp+232) != TCL_OK) {
		goto __80
	}
	if !(allocatedMapFlag != 0) {
		goto __81
	}
__82:
	_objPtr9 = mapObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr9)).FrefCount, 1) <= 1) {
		goto __85
	}
	XTclFreeObj(tls, _objPtr9)
__85:
	;
	goto __83
__83:
	if 0 != 0 {
		goto __82
	}
	goto __84
__84:
	;
__81:
	;
	return TCL_ERROR
__80:
	;
	goto __12
__26:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 164)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+164)
	}() != TCL_OK) {
		goto __86
	}
	if !(allocatedMapFlag != 0) {
		goto __87
	}
__88:
	_objPtr10 = mapObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr10)).FrefCount, 1) <= 1) {
		goto __91
	}
	XTclFreeObj(tls, _objPtr10)
__91:
	;
	goto __89
__89:
	if 0 != 0 {
		goto __88
	}
	goto __90
__90:
	;
__87:
	;
	return TCL_ERROR
__86:
	;
	unknownObj = func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 164)) > 0 {
			return *(*uintptr)(unsafe.Pointer(objv + 1*8))
		}
		return uintptr(0)
	}()
	goto __12
__20:
	;
	goto __12
__12:
	objc = objc - 2
	objv += 8 * uintptr(2)
	goto __11
	goto __13
__13:
	;

	XTclGetNamespaceForQualName(tls, interp, name, cxtPtr,
		TCL_CREATE_NS_IF_UNKNOWN, bp+240, bp+248, bp+256,
		bp+264)

	// Create the ensemble. Note that this might delete another ensemble
	// linked to the same namespace, so we must be careful. However, we
	// should be OK because we only link the namespace into the list once
	// we've created it (and after any deletions have occurred.)

	token = XTclCreateEnsembleInNs(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 264 /* simpleName */)),
		*(*uintptr)(unsafe.Pointer(bp + 240 /* foundNsPtr */)), nsPtr,
		func() int32 {
			if *(*int32)(unsafe.Pointer(bp + 232)) != 0 {
				return TCL_ENSEMBLE_PREFIX
			}
			return 0
		}())
	XTcl_SetEnsembleSubcommandList(tls, interp, token, subcmdObj)
	XTcl_SetEnsembleMappingDict(tls, interp, token, mapObj)
	XTcl_SetEnsembleUnknownHandler(tls, interp, token, unknownObj)
	XTcl_SetEnsembleParameterList(tls, interp, token, paramObj)

	// Tricky! Must ensure that the result is not shared (command delete
	// traces could have corrupted the pristine object that we started
	// with). [Snit test rename-1.5]

	XTcl_ResetResult(tls, interp)
	XTcl_GetCommandFullName(tls, interp, token, XTcl_GetObjResult(tls, interp))
	return TCL_OK

__7:
	if !(objc != 3) {
		goto __92
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+26975)
	return TCL_ERROR
__92:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(libc.Bool32(XTcl_FindEnsemble(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), 0) != uintptr(0)) != 0)))
	return TCL_OK

__8:
	if !(objc < 3 || objc != 4 && !(objc&1 != 0)) {
		goto __93
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv,
		ts+26983)
	return TCL_ERROR
__93:
	;
	token = XTcl_FindEnsemble(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), TCL_LEAVE_ERR_MSG)
	if !(token == uintptr(0)) {
		goto __94
	}
	return TCL_ERROR
__94:
	;

	if !(objc == 4) {
		goto __95
	}
	*(*uintptr)(unsafe.Pointer(bp + 272 /* resultObj */)) = uintptr(0) // silence gcc 4 warning

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(unsafe.Pointer(&ensembleConfigOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+160) != TCL_OK) {
		goto __97
	}
	return TCL_ERROR
__97:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 160 /* index */))) {
	case CONF_SUBCMDS:
		goto __99
	case CONF_PARAM:
		goto __100
	case CONF_MAP:
		goto __101
	case CONF_NAMESPACE:
		goto __102
	case CONF_PREFIX:
		goto __103
	case CONF_UNKNOWN:
		goto __104
	}
	goto __98
__99:
	XTcl_GetEnsembleSubcommandList(tls, uintptr(0), token, bp+272)
	if !(*(*uintptr)(unsafe.Pointer(bp + 272)) != uintptr(0)) {
		goto __105
	}
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 272 /* resultObj */)))
__105:
	;
	goto __98
__100:
	XTcl_GetEnsembleParameterList(tls, uintptr(0), token, bp+272)
	if !(*(*uintptr)(unsafe.Pointer(bp + 272)) != uintptr(0)) {
		goto __106
	}
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 272 /* resultObj */)))
__106:
	;
	goto __98
__101:
	XTcl_GetEnsembleMappingDict(tls, uintptr(0), token, bp+272)
	if !(*(*uintptr)(unsafe.Pointer(bp + 272)) != uintptr(0)) {
		goto __107
	}
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 272 /* resultObj */)))
__107:
	;
	goto __98
__102:
	*(*uintptr)(unsafe.Pointer(bp + 280 /* namespacePtr */)) = uintptr(0) // silence gcc 4 warning
	XTcl_GetEnsembleNamespace(tls, uintptr(0), token, bp+280)
	XTcl_SetObjResult(tls, interp, sNewNsObj(tls, *(*uintptr)(unsafe.Pointer(bp + 280 /* namespacePtr */))))
	goto __98
__103:
	*(*int32)(unsafe.Pointer(bp + 288 /* flags */)) = 0 // silence gcc 4 warning

	XTcl_GetEnsembleFlags(tls, uintptr(0), token, bp+288)
	XTcl_SetObjResult(tls, interp,
		XTcl_NewIntObj(tls, libc.Bool32(*(*int32)(unsafe.Pointer(bp + 288))&TCL_ENSEMBLE_PREFIX != 0)))
	goto __98

__104:
	XTcl_GetEnsembleUnknownHandler(tls, uintptr(0), token, bp+272)
	if !(*(*uintptr)(unsafe.Pointer(bp + 272)) != uintptr(0)) {
		goto __108
	}
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 272 /* resultObj */)))
__108:
	;
	goto __98
__98:
	;
	goto __96
__95:
	if !(objc == 3) {
		goto __109
	}
	*(*uintptr)(unsafe.Pointer(bp + 296 /* tmpObj */)) = uintptr(0) // silence gcc 4 warning
	*(*int32)(unsafe.Pointer(bp + 304 /* flags1 */)) = 0            // silence gcc 4 warning

__111:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __114
	}
	XTclAllocateFreeObjects(tls)
__114:
	;
	resultObj1 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __112
__112:
	if 0 != 0 {
		goto __111
	}
	goto __113
__113:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj1)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj1)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj1)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj1)).FtypePtr = uintptr(0)

	// -map option
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		XTcl_NewStringObj(tls, ensembleConfigOptions[CONF_MAP], -1))
	XTcl_GetEnsembleMappingDict(tls, uintptr(0), token, bp+296)
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		func() uintptr {
			if *(*uintptr)(unsafe.Pointer(bp + 296)) != uintptr(0) {
				return *(*uintptr)(unsafe.Pointer(bp + 296 /* tmpObj */))
			}
			return XTcl_NewObj(tls)
		}())

	// -namespace option
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		XTcl_NewStringObj(tls, ensembleConfigOptions[CONF_NAMESPACE],
			-1))
	*(*uintptr)(unsafe.Pointer(bp + 280 /* namespacePtr */)) = uintptr(0) // silence gcc 4 warning
	XTcl_GetEnsembleNamespace(tls, uintptr(0), token, bp+280)
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1, sNewNsObj(tls, *(*uintptr)(unsafe.Pointer(bp + 280 /* namespacePtr */))))

	// -parameters option
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		XTcl_NewStringObj(tls, ensembleConfigOptions[CONF_PARAM], -1))
	XTcl_GetEnsembleParameterList(tls, uintptr(0), token, bp+296)
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		func() uintptr {
			if *(*uintptr)(unsafe.Pointer(bp + 296)) != uintptr(0) {
				return *(*uintptr)(unsafe.Pointer(bp + 296 /* tmpObj */))
			}
			return XTcl_NewObj(tls)
		}())

	// -prefix option
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		XTcl_NewStringObj(tls, ensembleConfigOptions[CONF_PREFIX], -1))
	XTcl_GetEnsembleFlags(tls, uintptr(0), token, bp+304)
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		XTcl_NewIntObj(tls, libc.Bool32(*(*int32)(unsafe.Pointer(bp + 304))&TCL_ENSEMBLE_PREFIX != 0)))

	// -subcommands option
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		XTcl_NewStringObj(tls, ensembleConfigOptions[CONF_SUBCMDS], -1))
	XTcl_GetEnsembleSubcommandList(tls, uintptr(0), token, bp+296)
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		func() uintptr {
			if *(*uintptr)(unsafe.Pointer(bp + 296)) != uintptr(0) {
				return *(*uintptr)(unsafe.Pointer(bp + 296 /* tmpObj */))
			}
			return XTcl_NewObj(tls)
		}())

	// -unknown option
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		XTcl_NewStringObj(tls, ensembleConfigOptions[CONF_UNKNOWN], -1))
	XTcl_GetEnsembleUnknownHandler(tls, uintptr(0), token, bp+296)
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		func() uintptr {
			if *(*uintptr)(unsafe.Pointer(bp + 296)) != uintptr(0) {
				return *(*uintptr)(unsafe.Pointer(bp + 296 /* tmpObj */))
			}
			return XTcl_NewObj(tls)
		}())

	XTcl_SetObjResult(tls, interp, resultObj1)
	goto __110
__109:
	allocatedMapFlag1 = 0
	*(*uintptr)(unsafe.Pointer(bp + 312 /* subcmdObj1 */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 320 /* mapObj1 */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 328 /* paramObj1 */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 336 /* unknownObj1 */)) = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 344 /* flags2 */)) = 0 // silence gcc 4 warning

	XTcl_GetEnsembleSubcommandList(tls, uintptr(0), token, bp+312)
	XTcl_GetEnsembleMappingDict(tls, uintptr(0), token, bp+320)
	XTcl_GetEnsembleParameterList(tls, uintptr(0), token, bp+328)
	XTcl_GetEnsembleUnknownHandler(tls, uintptr(0), token, bp+336)
	XTcl_GetEnsembleFlags(tls, uintptr(0), token, bp+344)
	*(*int32)(unsafe.Pointer(bp + 376 /* permitPrefix1 */)) = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 344))&TCL_ENSEMBLE_PREFIX != 0)

	objv += 8 * uintptr(3)
	objc = objc - 3

	// Parse the option list, applying type checks as we go. Note that
	// we are not incrementing any reference counts in the objects at
	// this stage, so the presence of an option multiple times won't
	// cause any memory leaks.

__115:
	if !(objc > 0) {
		goto __117
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), uintptr(unsafe.Pointer(&ensembleConfigOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+160) != TCL_OK) {
		goto __118
	}
freeMapAndError:
	if !(allocatedMapFlag1 != 0) {
		goto __119
	}
__120:
	_objPtr11 = *(*uintptr)(unsafe.Pointer(bp + 320))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr11)).FrefCount, 1) <= 1) {
		goto __123
	}
	XTclFreeObj(tls, _objPtr11)
__123:
	;
	goto __121
__121:
	if 0 != 0 {
		goto __120
	}
	goto __122
__122:
	;
__119:
	;
	return TCL_ERROR
__118:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 160 /* index */))) {
	case CONF_SUBCMDS:
		goto __125
	case CONF_PARAM:
		goto __126
	case CONF_MAP:
		goto __127
	case CONF_NAMESPACE:
		goto __128
	case CONF_PREFIX:
		goto __129
	case CONF_UNKNOWN:
		goto __130
	}
	goto __124
__125:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 348)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+348)
	}() != TCL_OK) {
		goto __131
	}
	goto freeMapAndError
__131:
	;
	*(*uintptr)(unsafe.Pointer(bp + 312 /* subcmdObj1 */)) = func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 348)) > 0 {
			return *(*uintptr)(unsafe.Pointer(objv + 1*8))
		}
		return uintptr(0)
	}()
	goto __116
__126:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 348)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+348)
	}() != TCL_OK) {
		goto __132
	}
	goto freeMapAndError
__132:
	;
	*(*uintptr)(unsafe.Pointer(bp + 328 /* paramObj1 */)) = func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 348)) > 0 {
			return *(*uintptr)(unsafe.Pointer(objv + 1*8))
		}
		return uintptr(0)
	}()
	goto __116
__127:
	patchedDict1 = uintptr(0)

	// Verify that the map is sensible.

	if !(XTcl_DictObjFirst(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+168,
		bp+352, bp+200, bp+208) != TCL_OK) {
		goto __133
	}
	goto freeMapAndError
__133:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 208)) != 0) {
		goto __134
	}
	*(*uintptr)(unsafe.Pointer(bp + 320 /* mapObj1 */)) = uintptr(0)
	goto __116
__134:
	;
__135:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 360)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 348)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 200)), bp+348, bp+360)
	}() != TCL_OK) {
		goto __138
	}
	XTcl_DictObjDone(tls, bp+168)
	if !(patchedDict1 != 0) {
		goto __139
	}
__140:
	_objPtr12 = patchedDict1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr12)).FrefCount, 1) <= 1) {
		goto __143
	}
	XTclFreeObj(tls, _objPtr12)
__143:
	;
	goto __141
__141:
	if 0 != 0 {
		goto __140
	}
	goto __142
__142:
	;
__139:
	;
	goto freeMapAndError
__138:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 348)) < 1) {
		goto __144
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+26902, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+26848,
		ts+26962, uintptr(0)))
	XTcl_DictObjDone(tls, bp+168)
	if !(patchedDict1 != 0) {
		goto __145
	}
__146:
	_objPtr13 = patchedDict1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr13)).FrefCount, 1) <= 1) {
		goto __149
	}
	XTclFreeObj(tls, _objPtr13)
__149:
	;
	goto __147
__147:
	if 0 != 0 {
		goto __146
	}
	goto __148
__148:
	;
__145:
	;
	goto freeMapAndError
__144:
	;
	cmd1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))))
	}()
	if !!(int32(*(*int8)(unsafe.Pointer(cmd1))) == ':' && int32(*(*int8)(unsafe.Pointer(cmd1 + 1))) == ':') {
		goto __150
	}
	newList1 = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* listObj */)))
	*(*uintptr)(unsafe.Pointer(bp + 368 /* newCmd1 */)) = sNewNsObj(tls, nsPtr)

	if !((*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr != 0) {
		goto __151
	}
	XTcl_AppendStringsToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 368 /* newCmd1 */)), libc.VaList(bp+112, ts+7376, uintptr(0)))
__151:
	;
	XTcl_AppendObjToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 368 /* newCmd1 */)), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360 /* listv1 */)))))
	XTcl_ListObjReplace(tls, uintptr(0), newList1, 0, 1, 1, bp+368)
	if !(patchedDict1 == uintptr(0)) {
		goto __152
	}
	patchedDict1 = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
__152:
	;
	XTcl_DictObjPut(tls, uintptr(0), patchedDict1, *(*uintptr)(unsafe.Pointer(bp + 352 /* subcmdWordsObj1 */)),
		newList1)
__150:
	;
	XTcl_DictObjNext(tls, bp+168, bp+352, bp+200,
		bp+208)
	goto __136
__136:
	if !(*(*int32)(unsafe.Pointer(bp + 208)) != 0) {
		goto __135
	}
	goto __137
__137:
	;
	if !(allocatedMapFlag1 != 0) {
		goto __153
	}
__154:
	_objPtr14 = *(*uintptr)(unsafe.Pointer(bp + 320))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr14)).FrefCount, 1) <= 1) {
		goto __157
	}
	XTclFreeObj(tls, _objPtr14)
__157:
	;
	goto __155
__155:
	if 0 != 0 {
		goto __154
	}
	goto __156
__156:
	;
__153:
	;
	*(*uintptr)(unsafe.Pointer(bp + 320 /* mapObj1 */)) = func() uintptr {
		if patchedDict1 != 0 {
			return patchedDict1
		}
		return *(*uintptr)(unsafe.Pointer(objv + 1*8))
	}()
	if !(patchedDict1 != 0) {
		goto __158
	}
	allocatedMapFlag1 = 1
__158:
	;
	goto __116

__128:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+27021, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+128, ts+4178, ts+26848, ts+27052,
		uintptr(0)))
	goto freeMapAndError
__129:
	if !(XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)),
		bp+376) != TCL_OK) {
		goto __159
	}
	goto freeMapAndError
__159:
	;
	goto __116
__130:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 348)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+348)
	}() != TCL_OK) {
		goto __160
	}
	goto freeMapAndError
__160:
	;
	*(*uintptr)(unsafe.Pointer(bp + 336 /* unknownObj1 */)) = func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 348)) > 0 {
			return *(*uintptr)(unsafe.Pointer(objv + 1*8))
		}
		return uintptr(0)
	}()
	goto __116
__124:
	;
	goto __116
__116:
	objc = objc - 2
	objv += 8 * uintptr(2)
	goto __115
	goto __117
__117:
	;

	// Update the namespace now that we've finished the parsing stage.

	*(*int32)(unsafe.Pointer(bp + 344 /* flags2 */)) = func() int32 {
		if *(*int32)(unsafe.Pointer(bp + 376)) != 0 {
			return *(*int32)(unsafe.Pointer(bp + 344)) | TCL_ENSEMBLE_PREFIX
		}
		return *(*int32)(unsafe.Pointer(bp + 344)) & libc.CplInt32(TCL_ENSEMBLE_PREFIX)
	}()
	XTcl_SetEnsembleSubcommandList(tls, interp, token, *(*uintptr)(unsafe.Pointer(bp + 312 /* subcmdObj1 */)))
	XTcl_SetEnsembleMappingDict(tls, interp, token, *(*uintptr)(unsafe.Pointer(bp + 320 /* mapObj1 */)))
	XTcl_SetEnsembleParameterList(tls, interp, token, *(*uintptr)(unsafe.Pointer(bp + 328 /* paramObj1 */)))
	XTcl_SetEnsembleUnknownHandler(tls, interp, token, *(*uintptr)(unsafe.Pointer(bp + 336 /* unknownObj1 */)))
	XTcl_SetEnsembleFlags(tls, interp, token, *(*int32)(unsafe.Pointer(bp + 344 /* flags2 */)))
__110:
	;
__96:
	;
	return TCL_OK

__9:
	XTcl_Panic(tls, ts+27062, 0)
__5:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCreateEnsembleInNs --
//
//	Like Tcl_CreateEnsemble, but additionally accepts as an argument the
//	name of the namespace to create the command in.
//
//----------------------------------------------------------------------

func XTclCreateEnsembleInNs(tls *libc.TLS, interp uintptr, name uintptr, nameNsPtr uintptr, ensembleNsPtr uintptr, flags int32) Tcl_Command { /* tclEnsemble.c:651:1: */
	var nsPtr uintptr = ensembleNsPtr
	var ensemblePtr uintptr
	var token Tcl_Command

	ensemblePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(EnsembleConfig{})))
	token = XTclNRCreateCommandInNs(tls, interp, name,
		nameNsPtr, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sNsEnsembleImplementationCmd})),
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sNsEnsembleImplementationCmdNR})), ensemblePtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteEnsembleConfig})))
	if token == uintptr(0) {
		XTclpFree(tls, ensemblePtr)
		return uintptr(0)
	}

	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr = nsPtr
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fepoch = 0
	XTcl_InitHashTable(tls, ensemblePtr+32, 0)
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr = uintptr(0)
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcmdList = uintptr(0)
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandDict = uintptr(0)
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fflags = flags
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnumParameters = 0
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList = uintptr(0)
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FunknownHandler = uintptr(0)
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Ftoken = token
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fnext = (*Namespace)(unsafe.Pointer(nsPtr)).Fensembles
	(*Namespace)(unsafe.Pointer(nsPtr)).Fensembles = ensemblePtr

	// Trigger an eventual recomputation of the ensemble command set. Note
	// that this is slightly tricky, as it means that we are not actually
	// counting the number of namespace export actions, but it is the simplest
	// way to go!

	(*Namespace)(unsafe.Pointer(nsPtr)).FexportLookupEpoch++

	if flags&ENSEMBLE_COMPILE != 0 {
		(*Command)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Ftoken)).FcompileProc = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
		}{XTclCompileEnsemble}))
	}

	return (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Ftoken

}

//----------------------------------------------------------------------
//
// Tcl_CreateEnsemble
//
//	Create a simple ensemble attached to the given namespace.
//
//	Deprecated by TclCreateEnsembleInNs.
//
// Value
//
//	The token for the command created.
//
// Effect
//	The ensemble is created and marked for compilation.
//
//
//----------------------------------------------------------------------

func XTcl_CreateEnsemble(tls *libc.TLS, interp uintptr, name uintptr, namespacePtr uintptr, flags int32) Tcl_Command { /* tclEnsemble.c:729:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var nsPtr uintptr = namespacePtr
	// var foundNsPtr uintptr at bp, 8

	// var altNsPtr uintptr at bp+8, 8

	// var actualNsPtr uintptr at bp+16, 8

	// var simpleName uintptr at bp+24, 8

	if nsPtr == uintptr(0) {
		nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	}

	XTclGetNamespaceForQualName(tls, interp, name, nsPtr, TCL_CREATE_NS_IF_UNKNOWN,
		bp, bp+8, bp+16, bp+24)
	return XTclCreateEnsembleInNs(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 24 /* simpleName */)),
		*(*uintptr)(unsafe.Pointer(bp /* foundNsPtr */)), nsPtr, flags)
}

//----------------------------------------------------------------------
//
// Tcl_SetEnsembleSubcommandList --
//
//	Set the subcommand list for a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an ensemble
//	or the subcommand list - if non-NULL - is not a list).
//
// Side effects:
//	The ensemble is updated and marked for recompilation.
//
//----------------------------------------------------------------------

func XTcl_SetEnsembleSubcommandList(tls *libc.TLS, interp uintptr, token Tcl_Command, subcmdList uintptr) int32 { /* tclEnsemble.c:768:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr
	var oldList uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+27090, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		return TCL_ERROR
	}
	if subcmdList != uintptr(0) {
		// var length int32 at bp+32, 4

		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(subcmdList)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 32)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(subcmdList + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjLength(tls, interp, subcmdList, bp+32)
		}() != TCL_OK {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 32)) < 1 {
			subcmdList = uintptr(0)
		}
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	oldList = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcmdList
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcmdList = subcmdList
	if subcmdList != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer(subcmdList)).FrefCount++
	}
	if oldList != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldList)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(oldList)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldList)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(oldList)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldList)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldList)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(oldList)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(oldList + 32)) = XtclFreeObjList
					XtclFreeObjList = oldList
				}
			} else {
				XTclFreeObj(tls, oldList)
			}
		}

	}

	// Trigger an eventual recomputation of the ensemble command set. Note
	// that this is slightly tricky, as it means that we are not actually
	// counting the number of namespace export actions, but it is the simplest
	// way to go!

	(*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FexportLookupEpoch++

	// Special hack to make compiling of [info exists] work when the
	// dictionary is modified.

	if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc != uintptr(0) {
		(*Interp)(unsafe.Pointer(interp)).FcompileEpoch++
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_SetEnsembleParameterList --
//
//	Set the parameter list for a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an ensemble
//	or the parameter list - if non-NULL - is not a list).
//
// Side effects:
//	The ensemble is updated and marked for recompilation.
//
//----------------------------------------------------------------------

func XTcl_SetEnsembleParameterList(tls *libc.TLS, interp uintptr, token Tcl_Command, paramList uintptr) int32 { /* tclEnsemble.c:843:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr
	var oldList uintptr
	// var length int32 at bp+32, 4

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+27090, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		return TCL_ERROR
	}
	if paramList == uintptr(0) {
		*(*int32)(unsafe.Pointer(bp + 32 /* length */)) = 0
	} else {
		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(paramList)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 32)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(paramList + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjLength(tls, interp, paramList, bp+32)
		}() != TCL_OK {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 32)) < 1 {
			paramList = uintptr(0)
		}
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	oldList = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList = paramList
	if paramList != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer(paramList)).FrefCount++
	}
	if oldList != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldList)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(oldList)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldList)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(oldList)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldList)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldList)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(oldList)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(oldList + 32)) = XtclFreeObjList
					XtclFreeObjList = oldList
				}
			} else {
				XTclFreeObj(tls, oldList)
			}
		}

	}
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnumParameters = *(*int32)(unsafe.Pointer(bp + 32 /* length */))

	// Trigger an eventual recomputation of the ensemble command set. Note
	// that this is slightly tricky, as it means that we are not actually
	// counting the number of namespace export actions, but it is the simplest
	// way to go!

	(*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FexportLookupEpoch++

	// Special hack to make compiling of [info exists] work when the
	// dictionary is modified.

	if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc != uintptr(0) {
		(*Interp)(unsafe.Pointer(interp)).FcompileEpoch++
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_SetEnsembleMappingDict --
//
//	Set the mapping dictionary for a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an ensemble
//	or the mapping - if non-NULL - is not a dict).
//
// Side effects:
//	The ensemble is updated and marked for recompilation.
//
//----------------------------------------------------------------------

func XTcl_SetEnsembleMappingDict(tls *libc.TLS, interp uintptr, token Tcl_Command, mapDict uintptr) int32 { /* tclEnsemble.c:920:1: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr
	var oldDict uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+27090, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		return TCL_ERROR
	}
	if mapDict != uintptr(0) {
		// var size int32 at bp+64, 4

		// var done int32 at bp+104, 4

		// var search Tcl_DictSearch at bp+72, 24

		// var valuePtr uintptr at bp+96, 8

		if XTcl_DictObjSize(tls, interp, mapDict, bp+64) != TCL_OK {
			return TCL_ERROR
		}

		for XTcl_DictObjFirst(tls, uintptr(0), mapDict, bp+72, uintptr(0), bp+96, bp+104); !(*(*int32)(unsafe.Pointer(bp + 104 /* done */)) != 0); XTcl_DictObjNext(tls, bp+72 /* &search */, uintptr(0), bp+96 /* &valuePtr */, bp+104 /* &done */) {
			// var cmdObjPtr uintptr at bp+112, 8

			var bytes uintptr

			if XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 96)), 0, bp+112) != TCL_OK {
				XTcl_DictObjDone(tls, bp+72)
				return TCL_ERROR
			}
			bytes = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 112)))
			}()
			if int32(*(*int8)(unsafe.Pointer(bytes))) != ':' || int32(*(*int8)(unsafe.Pointer(bytes + 1))) != ':' {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+27130,
					-1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+26848,
					ts+27179, uintptr(0)))
				XTcl_DictObjDone(tls, bp+72)
				return TCL_ERROR
			}
		}

		if *(*int32)(unsafe.Pointer(bp + 64)) < 1 {
			mapDict = uintptr(0)
		}
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	oldDict = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandDict
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandDict = mapDict
	if mapDict != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer(mapDict)).FrefCount++
	}
	if oldDict != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldDict)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(oldDict)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldDict)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(oldDict)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldDict)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldDict)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(oldDict)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(oldDict + 32)) = XtclFreeObjList
					XtclFreeObjList = oldDict
				}
			} else {
				XTclFreeObj(tls, oldDict)
			}
		}

	}

	// Trigger an eventual recomputation of the ensemble command set. Note
	// that this is slightly tricky, as it means that we are not actually
	// counting the number of namespace export actions, but it is the simplest
	// way to go!

	(*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FexportLookupEpoch++

	// Special hack to make compiling of [info exists] work when the
	// dictionary is modified.

	if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc != uintptr(0) {
		(*Interp)(unsafe.Pointer(interp)).FcompileEpoch++
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_SetEnsembleUnknownHandler --
//
//	Set the unknown handler for a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an ensemble
//	or the unknown handler - if non-NULL - is not a list).
//
// Side effects:
//	The ensemble is updated and marked for recompilation.
//
//----------------------------------------------------------------------

func XTcl_SetEnsembleUnknownHandler(tls *libc.TLS, interp uintptr, token Tcl_Command, unknownList uintptr) int32 { /* tclEnsemble.c:1019:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr
	var oldList uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+27090, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		return TCL_ERROR
	}
	if unknownList != uintptr(0) {
		// var length int32 at bp+32, 4

		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(unknownList)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 32)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(unknownList + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjLength(tls, interp, unknownList, bp+32)
		}() != TCL_OK {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 32)) < 1 {
			unknownList = uintptr(0)
		}
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	oldList = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FunknownHandler
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FunknownHandler = unknownList
	if unknownList != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer(unknownList)).FrefCount++
	}
	if oldList != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldList)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(oldList)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldList)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(oldList)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldList)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldList)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(oldList)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(oldList + 32)) = XtclFreeObjList
					XtclFreeObjList = oldList
				}
			} else {
				XTclFreeObj(tls, oldList)
			}
		}

	}

	// Trigger an eventual recomputation of the ensemble command set. Note
	// that this is slightly tricky, as it means that we are not actually
	// counting the number of namespace export actions, but it is the simplest
	// way to go!

	(*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FexportLookupEpoch++

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_SetEnsembleFlags --
//
//	Set the flags for a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an
//	ensemble).
//
// Side effects:
//	The ensemble is updated and marked for recompilation.
//
//----------------------------------------------------------------------

func XTcl_SetEnsembleFlags(tls *libc.TLS, interp uintptr, token Tcl_Command, flags int32) int32 { /* tclEnsemble.c:1085:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr
	var wasCompiled int32

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+27090, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		return TCL_ERROR
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	wasCompiled = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fflags & ENSEMBLE_COMPILE

	// This API refuses to set the ENSEMBLE_DEAD flag...

	*(*int32)(unsafe.Pointer(ensemblePtr + 128)) &= ENSEMBLE_DEAD
	*(*int32)(unsafe.Pointer(ensemblePtr + 128)) |= flags & libc.CplInt32(ENSEMBLE_DEAD)

	// Trigger an eventual recomputation of the ensemble command set. Note
	// that this is slightly tricky, as it means that we are not actually
	// counting the number of namespace export actions, but it is the simplest
	// way to go!

	(*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FexportLookupEpoch++

	// If the ENSEMBLE_COMPILE flag status was changed, install or remove the
	// compiler function and bump the interpreter's compilation epoch so that
	// bytecode gets regenerated.

	if flags&ENSEMBLE_COMPILE != 0 {
		if !(wasCompiled != 0) {
			(*Command)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Ftoken)).FcompileProc = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
			}{XTclCompileEnsemble}))
			(*Interp)(unsafe.Pointer(interp)).FcompileEpoch++
		}
	} else {
		if wasCompiled != 0 {
			(*Command)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Ftoken)).FcompileProc = uintptr(0)
			(*Interp)(unsafe.Pointer(interp)).FcompileEpoch++
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetEnsembleSubcommandList --
//
//	Get the list of subcommands associated with a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an
//	ensemble). The list of subcommands is returned by updating the
//	variable pointed to by the last parameter (NULL if this is to be
//	derived from the mapping dictionary or the associated namespace's
//	exported commands).
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func XTcl_GetEnsembleSubcommandList(tls *libc.TLS, interp uintptr, token Tcl_Command, subcmdListPtr uintptr) int32 { /* tclEnsemble.c:1162:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+27090, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		}
		return TCL_ERROR
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	*(*uintptr)(unsafe.Pointer(subcmdListPtr)) = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcmdList
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetEnsembleParameterList --
//
//	Get the list of parameters associated with a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an
//	ensemble). The list of parameters is returned by updating the
//	variable pointed to by the last parameter (NULL if there are
//	no parameters).
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func XTcl_GetEnsembleParameterList(tls *libc.TLS, interp uintptr, token Tcl_Command, paramListPtr uintptr) int32 { /* tclEnsemble.c:1204:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+27090, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		}
		return TCL_ERROR
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	*(*uintptr)(unsafe.Pointer(paramListPtr)) = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetEnsembleMappingDict --
//
//	Get the command mapping dictionary associated with a particular
//	ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an
//	ensemble). The mapping dict is returned by updating the variable
//	pointed to by the last parameter (NULL if none is installed).
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func XTcl_GetEnsembleMappingDict(tls *libc.TLS, interp uintptr, token Tcl_Command, mapDictPtr uintptr) int32 { /* tclEnsemble.c:1246:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+27090, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		}
		return TCL_ERROR
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	*(*uintptr)(unsafe.Pointer(mapDictPtr)) = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandDict
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetEnsembleUnknownHandler --
//
//	Get the unknown handler associated with a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an
//	ensemble). The unknown handler is returned by updating the variable
//	pointed to by the last parameter (NULL if no handler is installed).
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func XTcl_GetEnsembleUnknownHandler(tls *libc.TLS, interp uintptr, token Tcl_Command, unknownListPtr uintptr) int32 { /* tclEnsemble.c:1287:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+27090, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		}
		return TCL_ERROR
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	*(*uintptr)(unsafe.Pointer(unknownListPtr)) = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FunknownHandler
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetEnsembleFlags --
//
//	Get the flags for a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an
//	ensemble). The flags are returned by updating the variable pointed to
//	by the last parameter.
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func XTcl_GetEnsembleFlags(tls *libc.TLS, interp uintptr, token Tcl_Command, flagsPtr uintptr) int32 { /* tclEnsemble.c:1328:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+27090, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		}
		return TCL_ERROR
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	*(*int32)(unsafe.Pointer(flagsPtr)) = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fflags
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetEnsembleNamespace --
//
//	Get the namespace associated with a particular ensemble.
//
// Results:
//	Tcl result code (error if command token does not indicate an
//	ensemble). Namespace is returned by updating the variable pointed to
//	by the last parameter.
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func XTcl_GetEnsembleNamespace(tls *libc.TLS, interp uintptr, token Tcl_Command, namespacePtrPtr uintptr) int32 { /* tclEnsemble.c:1369:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var cmdPtr uintptr = token
	var ensemblePtr uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+27090, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27117, uintptr(0)))
		}
		return TCL_ERROR
	}

	ensemblePtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	*(*uintptr)(unsafe.Pointer(namespacePtrPtr)) = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_FindEnsemble --
//
//	Given a command name, get the ensemble token for it, allowing for
//	[namespace import]s. [Bug 1017022]
//
// Results:
//	The token for the ensemble command with the given name, or NULL if the
//	command either does not exist or is not an ensemble (when an error
//	message will be written into the interp if thats non-NULL).
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func XTcl_FindEnsemble(tls *libc.TLS, interp uintptr, cmdNameObj uintptr, flags int32) Tcl_Command { /* tclEnsemble.c:1411:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var cmdPtr uintptr

	cmdPtr = XTcl_FindCommand(tls, interp, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes
		}
		return XTcl_GetString(tls, cmdNameObj)
	}(), uintptr(0), flags)
	if cmdPtr == uintptr(0) {
		return uintptr(0)
	}

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		// Reuse existing infrastructure for following import link chains
		// rather than duplicating it.

		cmdPtr = XTclGetOriginalCommand(tls, cmdPtr)

		if cmdPtr == uintptr(0) || (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sNsEnsembleImplementationCmd})) {
			if flags&TCL_LEAVE_ERR_MSG != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+27198,
					libc.VaList(bp, func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes
						}
						return XTcl_GetString(tls, cmdNameObj)
					}())))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26848,
					func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(cmdNameObj)).Fbytes
						}
						return XTcl_GetString(tls, cmdNameObj)
					}(), uintptr(0)))
			}
			return uintptr(0)
		}
	}

	return cmdPtr
}

//----------------------------------------------------------------------
//
// Tcl_IsEnsemble --
//
//	Simple test for ensemble-hood that takes into account imported
//	ensemble commands as well.
//
// Results:
//	Boolean value
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func XTcl_IsEnsemble(tls *libc.TLS, token Tcl_Command) int32 { /* tclEnsemble.c:1468:1: */
	var cmdPtr uintptr = token

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc == *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		return 1
	}
	cmdPtr = XTclGetOriginalCommand(tls, cmdPtr)
	if cmdPtr == uintptr(0) || (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmd})) {
		return 0
	}
	return 1
}

//----------------------------------------------------------------------
//
// TclMakeEnsemble --
//
//	Create an ensemble from a table of implementation commands. The
//	ensemble will be subject to (limited) compilation if any of the
//	implementation commands are compilable.
//
//	The 'name' parameter may be a single command name or a list if
//	creating an ensemble subcommand (see the binary implementation).
//
//	Currently, the TCL_ENSEMBLE_PREFIX ensemble flag is only used on
//	top-level ensemble commands.
//
// Results:
//	Handle for the new ensemble, or NULL on failure.
//
// Side effects:
//	May advance the bytecode compilation epoch.
//
//----------------------------------------------------------------------

func XTclMakeEnsemble(tls *libc.TLS, interp uintptr, name uintptr, map1 uintptr) Tcl_Command { /* tclEnsemble.c:1508:1: */
	bp := tls.Alloc(472)
	defer tls.Free(472)

	var ensemble Tcl_Command
	var ns uintptr
	// var buf Tcl_DString at bp+24, 216

	// var hiddenBuf Tcl_DString at bp+240, 216

	*(*uintptr)(unsafe.Pointer(bp + 464 /* nameParts */)) = uintptr(0)
	var cmdName uintptr = uintptr(0)
	var i int32
	*(*int32)(unsafe.Pointer(bp + 456 /* nameCount */)) = 0
	var ensembleFlags int32 = 0
	var hiddenLen int32

	// Construct the path for the ensemble namespace and create it.

	XTcl_DStringInit(tls, bp+24)
	XTcl_DStringInit(tls, bp+240)
	XTcl_DStringAppend(tls, bp+240, ts+27230, int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)))
	XTcl_DStringAppend(tls, bp+240, name, -1)
	XTcl_DStringAppend(tls, bp+240, ts+19368, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
	hiddenLen = (*Tcl_DString)(unsafe.Pointer(bp + 240)).Flength
	if int32(*(*int8)(unsafe.Pointer(name))) == ':' && int32(*(*int8)(unsafe.Pointer(name + 1))) == ':' {
		// An absolute name, so use it directly.

		cmdName = name
		XTcl_DStringAppend(tls, bp+24, name, -1)
		ensembleFlags = TCL_ENSEMBLE_PREFIX
	} else {
		// Not an absolute name, so do munging of it. Note that this treats a
		// multi-word list differently to a single word.

		XTcl_DStringAppend(tls, bp+24, ts+21479, int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)))

		if XTcl_SplitList(tls, uintptr(0), name, bp+456, bp+464) != TCL_OK {
			XTcl_Panic(tls, ts+27235, libc.VaList(bp, name))
		}

		for i = 0; i < *(*int32)(unsafe.Pointer(bp + 456 /* nameCount */)); i++ {
			XTcl_DStringAppend(tls, bp+24, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
			XTcl_DStringAppend(tls, bp+24, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 464 /* nameParts */)) + uintptr(i)*8)), -1)
		}
	}

	ns = XTcl_FindNamespace(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring, uintptr(0),
		TCL_CREATE_NS_IF_UNKNOWN)
	if !(ns != 0) {
		XTcl_Panic(tls, ts+27262,
			libc.VaList(bp+8, (*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring))
	}

	// Create the named ensemble in the correct namespace

	if cmdName == uintptr(0) {
		if *(*int32)(unsafe.Pointer(bp + 456)) == 1 {
			ensembleFlags = TCL_ENSEMBLE_PREFIX
			cmdName = (*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring + uintptr(5)
		} else {
			ns = (*Tcl_Namespace)(unsafe.Pointer(ns)).FparentPtr
			cmdName = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 464 /* nameParts */)) + uintptr(*(*int32)(unsafe.Pointer(bp + 456))-1)*8))
		}
	}

	// Switch on compilation always for core ensembles now that we can do
	// nice bytecode things with them.  Do it now.  Waiting until later will
	// just cause pointless epoch bumps.

	ensembleFlags = ensembleFlags | ENSEMBLE_COMPILE
	ensemble = XTcl_CreateEnsemble(tls, interp, cmdName, ns, ensembleFlags)

	// Create the ensemble mapping dictionary and the ensemble command procs.

	if ensemble != uintptr(0) {
		var mapDict uintptr
		var fromObj uintptr
		var toObj uintptr
		var cmdPtr uintptr

		XTcl_DStringAppend(tls, bp+24, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			mapDict = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(mapDict)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(mapDict)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(mapDict)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(mapDict)).FtypePtr = uintptr(0)
		{
		}

		for i = 0; (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).Fname != uintptr(0); i++ {
			fromObj = XTcl_NewStringObj(tls, (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).Fname, -1)
			for ok1 := true; ok1; ok1 = 0 != 0 {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					toObj = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(toObj)).FrefCount = 0
				if (*Tcl_DString)(unsafe.Pointer(bp+24)).Flength == 0 {
					(*Tcl_Obj)(unsafe.Pointer(toObj)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(toObj)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(toObj)).Fbytes = XTcl_Alloc(tls, uint32((*Tcl_DString)(unsafe.Pointer(bp+24)).Flength+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(toObj)).Fbytes, (*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring, uint64((*Tcl_DString)(unsafe.Pointer(bp+24)).Flength))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(toObj)).Fbytes + uintptr((*Tcl_DString)(unsafe.Pointer(bp+24)).Flength))) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(toObj)).Flength = (*Tcl_DString)(unsafe.Pointer(bp + 24)).Flength
				}
				(*Tcl_Obj)(unsafe.Pointer(toObj)).FtypePtr = uintptr(0)
				{
				}
			}
			XTcl_AppendToObj(tls, toObj, (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).Fname, -1)
			XTcl_DictObjPut(tls, uintptr(0), mapDict, fromObj, toObj)

			if (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).Fproc != 0 || (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).FnreProc != 0 {
				// If the command is unsafe, hide it when we're in a safe
				// interpreter. The code to do this is really hokey! It also
				// doesn't work properly yet; this function is always
				// currently called before the safe-interp flag is set so the
				// Tcl_IsSafe check fails.

				if (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).Funsafe != 0 && XTcl_IsSafe(tls, interp) != 0 {
					cmdPtr = XTcl_NRCreateCommand(tls, interp, ts+12272, (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).Fproc,
						(*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).FnreProc, (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).FclientData, uintptr(0))
					XTcl_DStringSetLength(tls, bp+240, hiddenLen)
					if XTcl_HideCommand(tls, interp, ts+12272,
						XTcl_DStringAppend(tls, bp+240, (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).Fname, -1)) != 0 {
						XTcl_Panic(tls, ts+7146, libc.VaList(bp+16, XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))))
					}
				} else {
					// Not hidden, so just create it. Yay!

					cmdPtr = XTcl_NRCreateCommand(tls, interp, func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(toObj)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(toObj)).Fbytes
						}
						return XTcl_GetString(tls, toObj)
					}(),
						(*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).Fproc, (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).FnreProc, (*EnsembleImplMap)(unsafe.Pointer(map1+uintptr(i)*48)).FclientData,
						uintptr(0))
				}
				(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc = (*EnsembleImplMap)(unsafe.Pointer(map1 + uintptr(i)*48)).FcompileProc
			}
		}
		XTcl_SetEnsembleMappingDict(tls, interp, ensemble, mapDict)
	}

	XTcl_DStringFree(tls, bp+24)
	XTcl_DStringFree(tls, bp+240)
	if *(*uintptr)(unsafe.Pointer(bp + 464)) != uintptr(0) {
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 464)))
	}
	return ensemble
}

//----------------------------------------------------------------------
//
// NsEnsembleImplementationCmd --
//
//	Implements an ensemble of commands (being those exported by a
//	namespace other than the global namespace) as a command with the same
//	(short) name as the namespace in the parent namespace.
//
// Results:
//	A standard Tcl result code. Will be TCL_ERROR if the command is not an
//	unambiguous prefix of any command exported by the ensemble's
//	namespace.
//
// Side effects:
//	Depends on the command within the namespace that gets executed. If the
//	ensemble itself returns TCL_ERROR, a descriptive error message will be
//	placed in the interpreter's result.
//
//----------------------------------------------------------------------

func sNsEnsembleImplementationCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclEnsemble.c:1668:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNsEnsembleImplementationCmdNR})),
		clientData, objc, objv)
}

func sNsEnsembleImplementationCmdNR(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclEnsemble.c:1679:1: */
	bp := tls.Alloc(368)
	defer tls.Free(368)

	var ensemblePtr uintptr
	// The ensemble itself.
	// var prefixObj uintptr at bp+360, 8
	// An object containing the prefix words of
	// the command that implements the
	// subcommand.
	var hPtr uintptr // Used for efficient lookup of fully
	// specified but not yet cached command
	// names.
	var reparseCount int32 // Number of reparses.
	var errorObj uintptr   // Used for building error messages.
	var subObj uintptr
	var subIdx int32
	// We don't have a subcommand argument. Make error message.

	// var buf Tcl_DString at bp+120, 216

	var ensembleCmd uintptr
	var cmp int32
	// If we've not already confirmed the command with the hash as part of
	// building our export table, we need to scan the sorted array for
	// matches.

	var subcmdName uintptr // Name of the subcommand, or unique prefix of
	// it (will be an error for a non-unique
	// prefix).
	var fullName uintptr // Full name of the subcommand.
	// var stringLength int32 at bp+336, 4

	var i int32
	var tableLength int32
	var fix uintptr
	var _objPtr uintptr
	var _callbackPtr uintptr
	var _objPtr1 uintptr
	var _callbackPtr1 uintptr
	var copyPtr uintptr // The actual list of words to dispatch to.
	// Will be freed by the dispatch engine.
	// var copyObjv uintptr at bp+352, 8

	// var copyObjc int32 at bp+344, 4

	// var prefixObjc int32 at bp+340, 4

	var i1 int32
	ensemblePtr = clientData
	reparseCount = 0

	// Must recheck objc, since numParameters might have changed. Cf. test
	// namespace-53.9.

restartEnsembleParse:
	subIdx = 1 + (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnumParameters
	if !(objc < subIdx+1) {
		goto __1
	} // Message being built

	XTcl_DStringInit(tls, bp+120)
	if !((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList != 0) {
		goto __2
	}
	XTcl_DStringAppend(tls, bp+120,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList)).Fbytes
			}
			return XTcl_GetString(tls, (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList)
		}(), -1)
	XTcl_DStringAppend(tls, bp+120, ts+14901, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
__2:
	;
	XTcl_DStringAppend(tls, bp+120, ts+26862, int32(uint64(unsafe.Sizeof([21]int8{}))-uint64(1)))
	XTcl_WrongNumArgs(tls, interp, 1, objv, (*Tcl_DString)(unsafe.Pointer(bp+120)).Fstring)
	XTcl_DStringFree(tls, bp+120)

	return TCL_ERROR
__1:
	;

	if !((*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).Fflags&NS_DYING != 0) {
		goto __3
	}
	// Don't know how we got here, but make things give up quickly.

	if !!(XTcl_InterpDeleted(tls, interp) != 0) {
		goto __4
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+27301, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+26857, uintptr(0)))
__4:
	;
	return TCL_ERROR
__3:
	;

	// Determine if the table of subcommands is right. If so, we can just look
	// up in there and go straight to dispatch.

	subObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(subIdx)*8))

	if !((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fepoch == (*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FexportLookupEpoch) {
		goto __5
	}
	// Table of subcommands is still valid; therefore there might be a
	// valid cache of discovered information which we can reuse. Do the
	// check here, and if we're still valid, we can jump straight to the
	// part where we do the invocation of the subcommand.

	if !((*Tcl_Obj)(unsafe.Pointer(subObj)).FtypePtr == uintptr(unsafe.Pointer(&ensembleCmdType))) {
		goto __7
	}
	ensembleCmd = *(*uintptr)(unsafe.Pointer(subObj + 32))

	if !((*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Fepoch == (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fepoch && (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ftoken == (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Ftoken) {
		goto __8
	}
	*(*uintptr)(unsafe.Pointer(bp + 360 /* prefixObj */)) = (*Tcl_HashEntry)(unsafe.Pointer((*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).FhPtr)).FclientData
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))).FrefCount++
	if !((*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ffix != 0) {
		goto __9
	}
	XTclSpellFix(tls, interp, objv, objc, subIdx, subObj, (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ffix)
__9:
	;
	goto runResultingSubcommand
__8:
	;
__7:
	;
	goto __6
__5:
	sBuildEnsembleConfig(tls, ensemblePtr)
	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fepoch = (*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FexportLookupEpoch
__6:
	;

	// Look in the hashtable for the subcommand name; this is the fastest way
	// of all if there is no cache in operation.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(ensemblePtr + 32 /* &.subcommandTable */)).FfindProc})).f(tls, ensemblePtr+32 /* &.subcommandTable */, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(subObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(subObj)).Fbytes
		}
		return XTcl_GetString(tls, subObj)
	}())
	if !(hPtr != uintptr(0)) {
		goto __10
	}

	// Cache for later in the subcommand object.

	sMakeCachedEnsembleCommand(tls, subObj, ensemblePtr, hPtr, uintptr(0))
	goto __11
__10:
	if !!((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fflags&TCL_ENSEMBLE_PREFIX != 0) {
		goto __12
	}
	// Could not map, no prefixing, go to unknown/error handling.

	goto unknownOrAmbiguousSubcommand
	goto __13
__12: // Name of the subcommand, or unique prefix of
	// it (will be an error for a non-unique
	// prefix).
	fullName = uintptr(0)
	tableLength = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandTable.FnumEntries

	subcmdName = XTcl_GetStringFromObj(tls, subObj, bp+336)
	i = 0
__14:
	if !(i < tableLength) {
		goto __16
	}
	cmp = libc.Xstrncmp(tls, subcmdName,
		*(*uintptr)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr + uintptr(i)*8)),
		uint64(uint32(*(*int32)(unsafe.Pointer(bp + 336 /* stringLength */)))))

	if !(cmp == 0) {
		goto __17
	}
	if !(fullName != uintptr(0)) {
		goto __19
	}
	// Since there's never the exact-match case to worry about
	// (hash search filters this), getting here indicates that
	// our subcommand is an ambiguous prefix of (at least) two
	// exported subcommands, which is an error case.

	goto unknownOrAmbiguousSubcommand
__19:
	;
	fullName = *(*uintptr)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr + uintptr(i)*8))
	goto __18
__17:
	if !(cmp < 0) {
		goto __20
	}
	// Because we are searching a sorted table, we can now stop
	// searching because we have gone past anything that could
	// possibly match.

	goto __16
__20:
	;
__18:
	;
	goto __15
__15:
	i++
	goto __14
	goto __16
__16:
	;
	if !(fullName == uintptr(0)) {
		goto __21
	}
	// The subcommand is not a prefix of anything, so bail out!

	goto unknownOrAmbiguousSubcommand
__21:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(ensemblePtr + 32 /* &.subcommandTable */)).FfindProc})).f(tls, ensemblePtr+32 /* &.subcommandTable */, fullName)
	if !(hPtr == uintptr(0)) {
		goto __22
	}
	XTcl_Panic(tls, ts+27342,
		libc.VaList(bp+32, fullName))
__22:
	;

	// Record the spelling correction for usage message.

	fix = XTcl_NewStringObj(tls, fullName, -1)

	// Cache for later in the subcommand object.

	sMakeCachedEnsembleCommand(tls, subObj, ensemblePtr, hPtr, fix)
	XTclSpellFix(tls, interp, objv, objc, subIdx, subObj, fix)
__13:
	;
__11:
	;

	*(*uintptr)(unsafe.Pointer(bp + 360 /* prefixObj */)) = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))).FrefCount++
runResultingSubcommand:

	/*
	 * Do the real work of execution of the subcommand by building an array of
	 * objects (note that this is potentially not the same length as the
	 * number of arguments to this ensemble command), populating it and then
	 * feeding it back through the main command-lookup engine. In theory, we
	 * could look up the command in the namespace ourselves, as we already
	 * have the namespace in which it is guaranteed to exist,
	 *
	 *   ((Q: That's not true if the -map option is used, is it?))
	 *
	 * but we don't do that (the cacheing of the command object used should
	 * help with that.)
	 */

	XTcl_ListObjLength(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 360 /* prefixObj */)), bp+340)

	if !(objc == 2) {
		goto __23
	}
	copyPtr = XTclListObjCopy(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 360 /* prefixObj */)))
	goto __24
__23:
	copyPtr = XTcl_NewListObj(tls, objc-2+*(*int32)(unsafe.Pointer(bp + 340)), uintptr(0))
	XTcl_ListObjAppendList(tls, uintptr(0), copyPtr, *(*uintptr)(unsafe.Pointer(bp + 360 /* prefixObj */)))
	XTcl_ListObjReplace(tls, uintptr(0), copyPtr, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))), 0,
		(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnumParameters, objv+uintptr(1)*8)
	XTcl_ListObjReplace(tls, uintptr(0), copyPtr, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))), 0,
		objc-2-(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnumParameters,
		objv+uintptr(2)*8+uintptr((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnumParameters)*8)
__24:
	;
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FrefCount++
__25:
__28:
	;
__31:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __34
	}
	XTclAllocateFreeObjects(tls)
__34:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
	_callbackPtr = _objPtr
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{XTclNRReleaseValues}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = copyPtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))).FrefCount, 1) > 1) {
		goto __35
	}
	goto __36
__35:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __37
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))).Fbytes != XtclEmptyStringRep) {
		goto __39
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))).Fbytes)
__39:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))).Flength = -1
__40:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 360))
	goto __41
__41:
	if 0 != 0 {
		goto __40
	}
	goto __42
__42:
	;
	goto __38
__37:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 360 /* prefixObj */)))
__38:
	;
__36:
	;

	// Record what arguments the script sent in so that things like
	// Tcl_WrongNumArgs can give the correct error message. Parameters
	// count both as inserted and removed arguments.

	if !(XTclInitRewriteEnsemble(tls, interp, 2+(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnumParameters,
		*(*int32)(unsafe.Pointer(bp + 340))+(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnumParameters, objv) != 0) {
		goto __43
	}
__44:
__47:
	;
__50:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __53
	}
	XTclAllocateFreeObjects(tls)
__53:
	;
	_objPtr1 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __51
__51:
	if 0 != 0 {
		goto __50
	}
	goto __52
__52:
	;
	_callbackPtr1 = _objPtr1
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr1)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{XTclClearRootEnsemble}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr1)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr1
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
__43:
	;

	// Hand off to the target command.

	XTclSkipTailcall(tls, interp)
	XTcl_ListObjGetElements(tls, uintptr(0), copyPtr, bp+344, bp+352)
	(*Interp)(unsafe.Pointer(interp)).FlookupNsPtr = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr
	return XTclNREvalObjv(tls, interp, *(*int32)(unsafe.Pointer(bp + 344 /* copyObjc */)), *(*uintptr)(unsafe.Pointer(bp + 352 /* copyObjv */)), TCL_EVAL_INVOKE, uintptr(0))

unknownOrAmbiguousSubcommand:
	// Have not been able to match the subcommand asked for with a real
	// subcommand that we export. See whether a handler has been registered
	// for dealing with this situation. Will only call (at most) once for any
	// particular ensemble invocation.

	if !((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FunknownHandler != uintptr(0) && libc.PostIncInt32(&reparseCount, 1) < 1) {
		goto __54
	}
	switch sEnsembleUnknownCallback(tls, interp, ensemblePtr, objc, objv,
		bp+360) {
	case TCL_OK:
		goto __56
	case TCL_ERROR:
		goto __57
	case TCL_CONTINUE:
		goto __58
	}
	goto __55
__56:
	goto runResultingSubcommand
__57:
	return TCL_ERROR
__58:
	goto restartEnsembleParse
__55:
	;
__54:
	;

	// We cannot determine what subcommand to hand off to, so generate a
	// (standard) failure message. Note the one odd case compared with
	// standard ensemble-like command, which is where a namespace has no
	// exported commands at all...

	XTcl_ResetResult(tls, interp)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7699, ts+12405,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(subObj)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(subObj)).Fbytes
			}
			return XTcl_GetString(tls, subObj)
		}(), uintptr(0)))
	if !((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandTable.FnumEntries == 0) {
		goto __59
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+27397, libc.VaList(bp+80, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(subObj)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(subObj)).Fbytes
			}
			return XTcl_GetString(tls, subObj)
		}(),
			(*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FfullName)))
	return TCL_ERROR
__59:
	;
	errorObj = XTcl_ObjPrintf(tls, ts+27464,
		libc.VaList(bp+96, func() uintptr {
			if (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fflags&TCL_ENSEMBLE_PREFIX != 0 {
				return ts + 27500 /* " or ambiguous" */
			}
			return ts + 2631 /* "" */
		}(),
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(subObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(subObj)).Fbytes
				}
				return XTcl_GetString(tls, subObj)
			}()))
	if !((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandTable.FnumEntries == 1) {
		goto __60
	}
	XTcl_AppendToObj(tls, errorObj, *(*uintptr)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr)), -1)
	goto __61
__60:

	i1 = 0
__62:
	if !(i1 < (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandTable.FnumEntries-1) {
		goto __64
	}
	XTcl_AppendToObj(tls, errorObj, *(*uintptr)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr + uintptr(i1)*8)), -1)
	XTcl_AppendToObj(tls, errorObj, ts+19153, 2)
	goto __63
__63:
	i1++
	goto __62
	goto __64
__64:
	;
	XTcl_AppendPrintfToObj(tls, errorObj, ts+27514,
		libc.VaList(bp+112, *(*uintptr)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr + uintptr(i1)*8))))
__61:
	;
	XTcl_SetObjResult(tls, interp, errorObj)
	return TCL_ERROR
}

func XTclClearRootEnsemble(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclEnsemble.c:1981:1: */
	XTclResetRewriteEnsemble(tls, interp, 1)
	return result
}

//----------------------------------------------------------------------
//
// TclInitRewriteEnsemble --
//
//	Applies a rewrite of arguments so that an ensemble subcommand will
//	report error messages correctly for the overall command.
//
// Results:
//	Whether this is the first rewrite applied, a value which must be
//	passed to TclResetRewriteEnsemble when undoing this command's
//	behaviour.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclInitRewriteEnsemble(tls *libc.TLS, interp uintptr, numRemoved int32, numInserted int32, objv uintptr) int32 { /* tclEnsemble.c:2010:1: */
	var iPtr uintptr = interp

	var isRootEnsemble int32 = libc.Bool32((*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs == uintptr(0))

	if isRootEnsemble != 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs = objv
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumRemovedObjs = numRemoved
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs = numInserted
	} else {
		var numIns int32 = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs

		if numIns < numRemoved {
			*(*int32)(unsafe.Pointer(iPtr + 912 + 8)) += numRemoved - numIns
			(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs = numInserted
		} else {
			*(*int32)(unsafe.Pointer(iPtr + 912 + 12)) += numInserted - numRemoved
		}
	}
	return isRootEnsemble
}

//----------------------------------------------------------------------
//
// TclResetRewriteEnsemble --
//
//	Removes any rewrites applied to support proper reporting of error
//	messages used in ensembles. Should be paired with
//	TclInitRewriteEnsemble.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclResetRewriteEnsemble(tls *libc.TLS, interp uintptr, isRootEnsemble int32) { /* tclEnsemble.c:2056:1: */
	var iPtr uintptr = interp

	if isRootEnsemble != 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs = uintptr(0)
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumRemovedObjs = 0
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs = 0
	}
}

//----------------------------------------------------------------------
//
// TclSpellFix --
//
//	Record a spelling correction that needs making in the generation of
//	the WrongNumArgs usage message.
//
// Results:
//	None.
//
// Side effects:
//	Can create an alternative ensemble rewrite structure.
//
//----------------------------------------------------------------------

func sFreeER(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclEnsemble.c:2087:1: */
	var tmp uintptr = *(*ClientData)(unsafe.Pointer(data))
	var store uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	XTclpFree(tls, store)
	XTclpFree(tls, tmp)
	return result
}

func XTclSpellFix(tls *libc.TLS, interp uintptr, objv uintptr, objc int32, badIdx int32, bad uintptr, fix uintptr) { /* tclEnsemble.c:2101:1: */
	var iPtr uintptr = interp
	var search uintptr
	var store uintptr
	var idx int32
	var size int32

	if (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs == uintptr(0) {
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs = objv
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumRemovedObjs = 0
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs = 0
	}

	// Compute the valid length of the ensemble root.

	size = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumRemovedObjs + objc -
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs

	search = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs
	if *(*uintptr)(unsafe.Pointer(search)) == uintptr(0) {
		// Awful casting abuse here!

		search = *(*uintptr)(unsafe.Pointer(search + 1*8))
	}

	if badIdx < (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs {
		// Misspelled value was inserted. We cannot directly jump to the bad
		// value, but have to search.

		idx = 1
		for idx < size {
			if *(*uintptr)(unsafe.Pointer(search + uintptr(idx)*8)) == bad {
				break
			}
			idx++
		}
		if idx == size {
			return
		}
	} else {
		// Jump to the misspelled value.

		idx = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumRemovedObjs + badIdx -
			(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs

		// Verify
		if *(*uintptr)(unsafe.Pointer(search + uintptr(idx)*8)) != bad {
			XTcl_Panic(tls, ts+27520, 0)
		}
	}

	search = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs
	if *(*uintptr)(unsafe.Pointer(search)) == uintptr(0) {
		store = *(*uintptr)(unsafe.Pointer(search + 2*8))
	} else {
		var tmp uintptr = XTcl_Alloc(tls, uint32(uint64(3)*uint64(unsafe.Sizeof(uintptr(0)))))

		store = XTcl_Alloc(tls, uint32(uint64(size)*uint64(unsafe.Sizeof(uintptr(0)))))
		libc.Xmemcpy(tls, store, (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs,
			uint64(size)*uint64(unsafe.Sizeof(uintptr(0))))

		// Awful casting abuse here! Note that the NULL in the first element
		// indicates that the initial objects are a raw array in the second
		// element and the rewritten ones are a raw array in the third.

		*(*uintptr)(unsafe.Pointer(tmp)) = uintptr(0)
		*(*uintptr)(unsafe.Pointer(tmp + 1*8)) = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs
		*(*uintptr)(unsafe.Pointer(tmp + 2*8)) = store
		(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs = tmp

		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sFreeER}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = tmp
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = store
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}

	*(*uintptr)(unsafe.Pointer(store + uintptr(idx)*8)) = fix
	(*Tcl_Obj)(unsafe.Pointer(fix)).FrefCount++
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _callbackPtr uintptr
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{XTclNRReleaseValues}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = fix
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
}

func XTclEnsembleGetRewriteValues(tls *libc.TLS, interp uintptr) uintptr { /* tclEnsemble.c:2196:9: */
	var iPtr uintptr = interp
	var origObjv uintptr = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs
	if *(*uintptr)(unsafe.Pointer(origObjv)) == uintptr(0) {
		origObjv = *(*uintptr)(unsafe.Pointer(origObjv + 2*8))
	}
	return origObjv
}

//----------------------------------------------------------------------
//
// TclFetchEnsembleRoot --
//
//	Returns the root of ensemble rewriting, if any.
//	If no root exists, returns objv instead.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFetchEnsembleRoot(tls *libc.TLS, interp uintptr, objv uintptr, objc int32, objcPtr uintptr) uintptr { /* tclEnsemble.c:2225:9: */
	var sourceObjs uintptr
	var iPtr uintptr = interp

	if (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs != 0 {
		*(*int32)(unsafe.Pointer(objcPtr)) = objc + (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumRemovedObjs -
			(*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs
		if *(*uintptr)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs)) == uintptr(0) {
			sourceObjs = *(*uintptr)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs + 1*8))
		} else {
			sourceObjs = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs
		}
		return sourceObjs
	}
	*(*int32)(unsafe.Pointer(objcPtr)) = objc
	return objv
}

// ----------------------------------------------------------------------
//
// EnsmebleUnknownCallback --
//
//	Helper for the ensemble engine that handles the procesing of unknown
//	callbacks. See the user documentation of the ensemble unknown handler
//	for details; this function is only ever called when such a function is
//	defined, and is only ever called once per ensemble dispatch (i.e. if a
//	reparse still fails, this isn't called again).
//
// Results:
//	TCL_OK -	*prefixObjPtr contains the command words to dispatch
//			to.
//	TCL_CONTINUE -	Need to reparse (*prefixObjPtr is invalid).
//	TCL_ERROR -	Something went wrong! Error message in interpreter.
//
// Side effects:
//	Calls the Tcl interpreter, so arbitrary.
//
// ----------------------------------------------------------------------

func sEnsembleUnknownCallback(tls *libc.TLS, interp uintptr, ensemblePtr uintptr, objc int32, objv uintptr, prefixObjPtr uintptr) int32 { /* tclEnsemble.c:2273:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	// var paramc int32 at bp+80, 4

	var i int32
	var result int32
	// var prefixObjc int32 at bp+84, 4

	// var paramv uintptr at bp+72, 8

	var unknownCmd uintptr
	var ensObj uintptr

	// Create the unknown command callback to determine what to do.

	unknownCmd = XTcl_DuplicateObj(tls, (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FunknownHandler)
	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		ensObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(ensObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(ensObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(ensObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(ensObj)).FtypePtr = uintptr(0)
	{
	}

	XTcl_GetCommandFullName(tls, interp, (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Ftoken, ensObj)
	XTcl_ListObjAppendElement(tls, uintptr(0), unknownCmd, ensObj)
	for i = 1; i < objc; i++ {
		XTcl_ListObjAppendElement(tls, uintptr(0), unknownCmd, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}
	if (*Tcl_Obj)(unsafe.Pointer(unknownCmd)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 72)) = *(*uintptr)(unsafe.Pointer(unknownCmd + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 80)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(unknownCmd + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), unknownCmd, bp+80, bp+72)
	}
	(*Tcl_Obj)(unsafe.Pointer(unknownCmd)).FrefCount++

	// Now call the unknown handler. (We don't bother NRE-enabling this; deep
	// recursing through unknown handlers is horribly perverse.) Note that it
	// is always an error for an unknown handler to delete its ensemble; don't
	// do that!

	XTcl_Preserve(tls, ensemblePtr)
	XTclSkipTailcall(tls, interp)
	result = XTcl_EvalObjv(tls, interp, *(*int32)(unsafe.Pointer(bp + 80 /* paramc */)), *(*uintptr)(unsafe.Pointer(bp + 72 /* paramv */)), 0)
	if result == TCL_OK && (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fflags&ENSEMBLE_DEAD != 0 {
		if !(XTcl_InterpDeleted(tls, interp) != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+27548, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+26848, ts+27596,
				uintptr(0)))
		}
		result = TCL_ERROR
	}
	XTcl_Release(tls, ensemblePtr)

	// If we succeeded, we should either have a list of words that form the
	// command to be executed, or an empty list. In the empty-list case, the
	// ensemble is believed to be updated so we should ask the ensemble engine
	// to reparse the original command.

	if result == TCL_OK {
		*(*uintptr)(unsafe.Pointer(prefixObjPtr)) = XTcl_GetObjResult(tls, interp)
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).FrefCount++
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(unknownCmd)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(unknownCmd)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(unknownCmd)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(unknownCmd)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(unknownCmd)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(unknownCmd)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(unknownCmd)).Flength = -1
				for ok1 := true; ok1; ok1 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(unknownCmd + 32)) = XtclFreeObjList
					XtclFreeObjList = unknownCmd
				}
			} else {
				XTclFreeObj(tls, unknownCmd)
			}
		}

		XTcl_ResetResult(tls, interp)

		// Namespace is still there. Check if the result is a valid list. If
		// it is, and it is non-empty, that list is what we are using as our
		// replacement.

		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 84)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)) + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(prefixObjPtr)), bp+84)
		}() != TCL_OK {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).Flength = -1
					for ok2 := true; ok2; ok2 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)) + 32)) = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(prefixObjPtr))
					}
				} else {
					XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(prefixObjPtr)))
				}
			}

			XTcl_AddErrorInfo(tls, interp,
				ts+27612)
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 84)) > 0 {
			return TCL_OK
		}

		// Namespace alive & empty result => reparse.

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)))).Flength = -1
				for ok3 := true; ok3; ok3 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(prefixObjPtr)) + 32)) = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(prefixObjPtr))
				}
			} else {
				XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(prefixObjPtr)))
			}
		}

		return TCL_CONTINUE
	}

	// Oh no! An exceptional result. Convert to an error.

	if !(XTcl_InterpDeleted(tls, interp) != 0) {
		if result != TCL_ERROR {
			XTcl_ResetResult(tls, interp)
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+27677, -1))
			switch result {
			case TCL_RETURN:
				XTcl_AppendToObj(tls, XTcl_GetObjResult(tls, interp), ts+5876, -1)
				break
				fallthrough
			case TCL_BREAK:
				XTcl_AppendToObj(tls, XTcl_GetObjResult(tls, interp), ts+5685, -1)
				break
				fallthrough
			case TCL_CONTINUE:
				XTcl_AppendToObj(tls, XTcl_GetObjResult(tls, interp), ts+5702, -1)
				break
				fallthrough
			default:
				XTcl_AppendPrintfToObj(tls, XTcl_GetObjResult(tls, interp), ts+909, libc.VaList(bp+32, result))
			}
			XTcl_AddErrorInfo(tls, interp,
				ts+27724)
			XTcl_AppendObjToErrorInfo(tls, interp, unknownCmd)
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+26848, ts+27777,
				uintptr(0)))
		} else {
			XTcl_AddErrorInfo(tls, interp,
				ts+27792)
		}
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(unknownCmd)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(unknownCmd)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(unknownCmd)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(unknownCmd)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(unknownCmd)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(unknownCmd)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(unknownCmd)).Flength = -1
			for ok4 := true; ok4; ok4 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(unknownCmd + 32)) = XtclFreeObjList
				XtclFreeObjList = unknownCmd
			}
		} else {
			XTclFreeObj(tls, unknownCmd)
		}
	}

	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// MakeCachedEnsembleCommand --
//
//	Cache what we've computed so far; it's not nice to repeatedly copy
//	strings about. Note that to do this, we start by deleting any old
//	representation that there was (though if it was an out of date
//	ensemble rep, we can skip some of the deallocation process.)
//
// Results:
//	None
//
// Side effects:
//	Alters the internal representation of the first object parameter.
//
//----------------------------------------------------------------------

func sMakeCachedEnsembleCommand(tls *libc.TLS, objPtr uintptr, ensemblePtr uintptr, hPtr uintptr, fix uintptr) { /* tclEnsemble.c:2411:1: */
	var ensembleCmd uintptr

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&ensembleCmdType)) {
		ensembleCmd = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		if libc.PostDecInt32(&(*Command)(unsafe.Pointer((*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ftoken)).FrefCount, 1) <= 1 {
			XTclpFree(tls, (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ftoken)
		}

		if (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ffix != 0 {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ffix
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
	} else {
		// Kill the old internal rep, and replace it with a brand new one of
		// our own.

		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}

		ensembleCmd = XTcl_Alloc(tls, uint32(unsafe.Sizeof(EnsembleCmdRep{})))
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = ensembleCmd
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&ensembleCmdType))
	}

	// Populate the internal rep.

	(*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Fepoch = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fepoch
	(*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ftoken = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Ftoken
	(*Command)(unsafe.Pointer((*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ftoken)).FrefCount++
	if fix != 0 {
		(*Tcl_Obj)(unsafe.Pointer(fix)).FrefCount++
	}
	(*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ffix = fix
	(*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).FhPtr = hPtr
}

//----------------------------------------------------------------------
//
// DeleteEnsembleConfig --
//
//	Destroys the data structure used to represent an ensemble. This is
//	called when the ensemble's command is deleted (which happens
//	automatically if the ensemble's namespace is deleted.) Maintainers
//	should note that ensembles should be deleted by deleting their
//	commands.
//
// Results:
//	None.
//
// Side effects:
//	Memory is (eventually) deallocated.
//
//----------------------------------------------------------------------

func sClearTable(tls *libc.TLS, ensemblePtr uintptr) { /* tclEnsemble.c:2472:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var hash uintptr = ensemblePtr + 32

	if (*Tcl_HashTable)(unsafe.Pointer(hash)).FnumEntries != 0 {
		// var search Tcl_HashSearch at bp, 24

		var hPtr uintptr = XTcl_FirstHashEntry(tls, hash, bp)

		for hPtr != uintptr(0) {
			var prefixObj uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = prefixObj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			hPtr = XTcl_NextHashEntry(tls, bp)
		}
		XTclpFree(tls, (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr)
	}
	XTcl_DeleteHashTable(tls, hash)
}

func sDeleteEnsembleConfig(tls *libc.TLS, clientData ClientData) { /* tclEnsemble.c:2492:1: */
	var ensemblePtr uintptr = clientData
	var nsPtr uintptr = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr

	// Unlink from the ensemble chain if it has not been marked as having been
	// done already.

	if (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fnext != ensemblePtr {
		var ensPtr uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).Fensembles

		if ensPtr == ensemblePtr {
			(*Namespace)(unsafe.Pointer(nsPtr)).Fensembles = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fnext
		} else {
			for ensPtr != uintptr(0) {
				if (*EnsembleConfig)(unsafe.Pointer(ensPtr)).Fnext == ensemblePtr {
					(*EnsembleConfig)(unsafe.Pointer(ensPtr)).Fnext = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fnext
					break
				}
				ensPtr = (*EnsembleConfig)(unsafe.Pointer(ensPtr)).Fnext
			}
		}
	}

	// Mark the namespace as dead so code that uses Tcl_Preserve() can tell
	// whether disaster happened anyway.

	*(*int32)(unsafe.Pointer(ensemblePtr + 128)) |= ENSEMBLE_DEAD

	// Kill the pointer-containing fields.

	sClearTable(tls, ensemblePtr)
	if (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcmdList != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcmdList
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList != uintptr(0) {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FparameterList
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandDict != uintptr(0) {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandDict
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FunknownHandler != uintptr(0) {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FunknownHandler
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	// Arrange for the structure to be reclaimed. Note that this is complex
	// because we have to make sure that we can react sensibly when an
	// ensemble is deleted during the process of initialising the ensemble
	// (especially the unknown callback.)

	XTcl_EventuallyFree(tls, ensemblePtr, uintptr(3))
}

//----------------------------------------------------------------------
//
// BuildEnsembleConfig --
//
//	Create the internal data structures that describe how an ensemble
//	looks, being a hash mapping from the simple command name to the Tcl list
//	that describes the implementation prefix words, and a sorted array of
//	the names to allow for reasonably efficient unambiguous prefix handling.
//
// Results:
//	None.
//
// Side effects:
//	Reallocates and rebuilds the hash table and array stored at the
//	ensemblePtr argument. For large ensembles or large namespaces, this is
//	a potentially expensive operation.
//
//----------------------------------------------------------------------

func sBuildEnsembleConfig(tls *libc.TLS, ensemblePtr uintptr) { /* tclEnsemble.c:2576:1: */
	bp := tls.Alloc(152)
	defer tls.Free(152)

	// var search Tcl_HashSearch at bp+120, 24
	// Used for scanning the set of commands in
	// the namespace that backs up this
	// ensemble.
	var i int32
	var j int32
	// var isNew int32 at bp+48, 4

	var hash uintptr = ensemblePtr + 32
	var hPtr uintptr
	var mapDict uintptr = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandDict
	var subList uintptr = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcmdList

	sClearTable(tls, ensemblePtr)
	XTcl_InitHashTable(tls, hash, 0)

	if subList != 0 {
		// var subc int32 at bp+32, 4

		// var subv uintptr at bp+40, 8

		// var target uintptr at bp+64, 8

		// var cmdObj uintptr at bp+56, 8

		var cmdPrefixObj uintptr
		var name uintptr

		// There is a list of exactly what subcommands go in the table.
		// Must determine the target for each.

		XTcl_ListObjGetElements(tls, uintptr(0), subList, bp+32, bp+40)
		if subList == mapDict {
			// Strange case where explicit list of subcommands is same value
			// as the dict mapping to targets.

			for i = 0; i < *(*int32)(unsafe.Pointer(bp + 32 /* subc */)); i = i + 2 {
				name = func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i)*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i)*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i)*8)))
				}()
				hPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hash)).FcreateProc})).f(tls, hash, name, bp+48 /* &isNew */)
				if !(*(*int32)(unsafe.Pointer(bp + 48)) != 0) {
					*(*uintptr)(unsafe.Pointer(bp + 56 /* cmdObj */)) = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					for ok := true; ok; ok = 0 != 0 {
						var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 56))
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
				}
				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i+1)*8))
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i+1)*8)))).FrefCount++

				name = func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i+1)*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i+1)*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i+1)*8)))
				}()
				hPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hash)).FcreateProc})).f(tls, hash, name, bp+48 /* &isNew */)
				if *(*int32)(unsafe.Pointer(bp + 48)) != 0 {
					*(*uintptr)(unsafe.Pointer(bp + 56 /* cmdObj */)) = XTcl_NewStringObj(tls, name, -1)
					cmdPrefixObj = XTcl_NewListObj(tls, 1, bp+56)
					(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cmdPrefixObj
					(*Tcl_Obj)(unsafe.Pointer(cmdPrefixObj)).FrefCount++
				}
			}
		} else {
			// Usual case where we can freely act on the list and dict.

			for i = 0; i < *(*int32)(unsafe.Pointer(bp + 32 /* subc */)); i++ {
				name = func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i)*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i)*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + uintptr(i)*8)))
				}()
				hPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hash)).FcreateProc})).f(tls, hash, name, bp+48 /* &isNew */)
				if !(*(*int32)(unsafe.Pointer(bp + 48)) != 0) {
					continue
				}

				// Lookup target in the dictionary
				if mapDict != 0 {
					XTcl_DictObjGet(tls, uintptr(0), mapDict, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* subv */)) + uintptr(i)*8)), bp+64)
					if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 {
						(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = *(*uintptr)(unsafe.Pointer(bp + 64))
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount++
						continue
					}
				}

				// target was not in the dictionary so map onto the namespace.
				// Note in this case that we do not guarantee that the
				// command is actually there; that is the programmer's
				// responsibility (or [::unknown] of course).
				*(*uintptr)(unsafe.Pointer(bp + 56 /* cmdObj */)) = XTcl_NewStringObj(tls, name, -1)
				cmdPrefixObj = XTcl_NewListObj(tls, 1, bp+56)
				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cmdPrefixObj
				(*Tcl_Obj)(unsafe.Pointer(cmdPrefixObj)).FrefCount++
			}
		}
	} else if mapDict != 0 {
		// No subcmd list, but we do have a mapping dictionary so we should
		// use the keys of that. Convert the dictionary's contents into the
		// form required for the ensemble's internal hashtable.

		// var dictSearch Tcl_DictSearch at bp+72, 24

		// var keyObj uintptr at bp+96, 8

		// var valueObj uintptr at bp+104, 8

		// var done int32 at bp+112, 4

		XTcl_DictObjFirst(tls, uintptr(0), (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandDict, bp+72,
			bp+96, bp+104, bp+112)
		for !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) {
			var name uintptr = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))
			}()

			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hash)).FcreateProc})).f(tls, hash, name, bp+48 /* &isNew */)
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = *(*uintptr)(unsafe.Pointer(bp + 104))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104)))).FrefCount++
			XTcl_DictObjNext(tls, bp+72, bp+96, bp+104, bp+112)
		}
	} else {
		// Discover what commands are actually exported by the namespace.
		// What we have is an array of patterns and a hash table whose keys
		// are the command names exported by the namespace (the contents do
		// not matter here.) We must find out what commands are actually
		// exported by filtering each command in the namespace against each of
		// the patterns in the export list. Note that we use an intermediate
		// hash table to make memory management easier, and because that makes
		// exact matching far easier too.
		//
		// Suggestion for future enhancement: compute the unique prefixes and
		// place them in the hash too, which should make for even faster
		// matching.

		hPtr = XTcl_FirstHashEntry(tls, (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr+160, bp+120)
		for ; hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp+120) {
			var nsCmdName uintptr = // Name of command in namespace.
			func() uintptr {
				if (*Tcl_HashTable)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr+160)).FkeyType == -1 {
					return *(*uintptr)(unsafe.Pointer(hPtr + 32))
				}
				return hPtr + 32
			}()

			for i = 0; i < (*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FnumExportPatterns; i++ {
				if XTcl_StringMatch(tls, nsCmdName,
					*(*uintptr)(unsafe.Pointer((*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FexportArrayPtr + uintptr(i)*8))) != 0 {
					hPtr = (*struct {
						f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hash)).FcreateProc})).f(tls, hash, nsCmdName, bp+48 /* &isNew */)

					// Remember, hash entries have a full reference to the
					// substituted part of the command (as a list) as their
					// content!

					if *(*int32)(unsafe.Pointer(bp + 48)) != 0 {
						// var cmdObj uintptr at bp+144, 8

						var cmdPrefixObj uintptr

						for ok1 := true; ok1; ok1 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							*(*uintptr)(unsafe.Pointer(bp + 144)) = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 144)))).FrefCount = 0
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 144)))).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 144)))).Flength = 0
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 144)))).FtypePtr = uintptr(0)
						{
						}

						XTcl_AppendStringsToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 144 /* cmdObj */)),
							libc.VaList(bp, (*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FfullName,
								func() uintptr {
									if (*Namespace)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FnsPtr)).FparentPtr != 0 {
										return ts + 7376 /* "::" */
									}
									return ts + 2631 /* "" */
								}(),
								nsCmdName, uintptr(0)))
						cmdPrefixObj = XTcl_NewListObj(tls, 1, bp+144)
						(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cmdPrefixObj
						(*Tcl_Obj)(unsafe.Pointer(cmdPrefixObj)).FrefCount++
					}
					break
				}
			}
		}
	}

	if (*Tcl_HashTable)(unsafe.Pointer(hash)).FnumEntries == 0 {
		(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr = uintptr(0)
		return
	}

	// Create a sorted array of all subcommands in the ensemble; hash tables
	// are all very well for a quick look for an exact match, but they can't
	// determine things like whether a string is a prefix of another (not
	// without lots of preparation anyway) and they're no good for when we're
	// generating the error message either.
	//
	// We do this by filling an array with the names (we use the hash keys
	// directly to save a copy, since any time we change the array we change
	// the hash too, and vice versa) and running quicksort over the array.

	(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Tcl_HashTable)(unsafe.Pointer(hash)).FnumEntries)))

	// Fill array from both ends as this makes us less likely to end up with
	// performance problems in qsort(), which is good. Note that doing this
	// makes this code much more opaque, but the naive alternatve:
	//
	// for (hPtr=Tcl_FirstHashEntry(hash,&search),i=0 ;
	//	       hPtr!=NULL ; hPtr=Tcl_NextHashEntry(&search),i++) {
	//     ensemblePtr->subcommandArrayPtr[i] = Tcl_GetHashKey(hash, &hPtr);
	// }
	//
	// can produce long runs of precisely ordered table entries when the
	// commands in the namespace are declared in a sorted fashion (an ordering
	// some people like) and the hashing functions (or the command names
	// themselves) are fairly unfortunate. By filling from both ends, it
	// requires active malice (and probably a debugger) to get qsort() to have
	// awful runtime behaviour.

	i = 0
	j = (*Tcl_HashTable)(unsafe.Pointer(hash)).FnumEntries
	hPtr = XTcl_FirstHashEntry(tls, hash, bp+120)
	for hPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr + uintptr(libc.PostIncInt32(&i, 1))*8)) = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(hash)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(hash)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(hPtr + 32))
			}
			return hPtr + 32
		}()
		hPtr = XTcl_NextHashEntry(tls, bp+120)
		if hPtr == uintptr(0) {
			break
		}
		*(*uintptr)(unsafe.Pointer((*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr + uintptr(libc.PreDecInt32(&j, 1))*8)) = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(hash)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(hash)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(hPtr + 32))
			}
			return hPtr + 32
		}()
		hPtr = XTcl_NextHashEntry(tls, bp+120)
	}
	if (*Tcl_HashTable)(unsafe.Pointer(hash)).FnumEntries > 1 {
		libc.Xqsort(tls, (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).FsubcommandArrayPtr, uint64(uint32((*Tcl_HashTable)(unsafe.Pointer(hash)).FnumEntries)),
			uint64(unsafe.Sizeof(uintptr(0))), *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr) int32
			}{sNsEnsembleStringOrder})))
	}
}

//----------------------------------------------------------------------
//
// NsEnsembleStringOrder --
//
//	Helper function to compare two pointers to two strings for use with
//	qsort().
//
// Results:
//	-1 if the first string is smaller, 1 if the second string is smaller,
//	and 0 if they are equal.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sNsEnsembleStringOrder(tls *libc.TLS, strPtr1 uintptr, strPtr2 uintptr) int32 { /* tclEnsemble.c:2805:1: */
	return libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(strPtr1)), *(*uintptr)(unsafe.Pointer(strPtr2)))
}

//----------------------------------------------------------------------
//
// FreeEnsembleCmdRep --
//
//	Destroys the internal representation of a Tcl_Obj that has been
//	holding information about a command in an ensemble.
//
// Results:
//	None.
//
// Side effects:
//	Memory is deallocated. If this held the last reference to a
//	namespace's main structure, that main structure will also be
//	destroyed.
//
//----------------------------------------------------------------------

func sFreeEnsembleCmdRep(tls *libc.TLS, objPtr uintptr) { /* tclEnsemble.c:2832:1: */
	var ensembleCmd uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if libc.PostDecInt32(&(*Command)(unsafe.Pointer((*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ftoken)).FrefCount, 1) <= 1 {
		XTclpFree(tls, (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ftoken)
	}

	if (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ffix != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ffix
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTclpFree(tls, ensembleCmd)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DupEnsembleCmdRep --
//
//	Makes one Tcl_Obj into a copy of another that is a subcommand of an
//	ensemble.
//
// Results:
//	None.
//
// Side effects:
//	Memory is allocated, and the namespace that the ensemble is built on
//	top of gains another reference.
//
//----------------------------------------------------------------------

func sDupEnsembleCmdRep(tls *libc.TLS, objPtr uintptr, copyPtr uintptr) { /* tclEnsemble.c:2864:1: */
	var ensembleCmd uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	var ensembleCopy uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(EnsembleCmdRep{})))

	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&ensembleCmdType))
	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = ensembleCopy
	(*EnsembleCmdRep)(unsafe.Pointer(ensembleCopy)).Fepoch = (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Fepoch
	(*EnsembleCmdRep)(unsafe.Pointer(ensembleCopy)).Ftoken = (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ftoken
	(*Command)(unsafe.Pointer((*EnsembleCmdRep)(unsafe.Pointer(ensembleCopy)).Ftoken)).FrefCount++
	(*EnsembleCmdRep)(unsafe.Pointer(ensembleCopy)).Ffix = (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).Ffix
	if (*EnsembleCmdRep)(unsafe.Pointer(ensembleCopy)).Ffix != 0 {
		(*Tcl_Obj)(unsafe.Pointer((*EnsembleCmdRep)(unsafe.Pointer(ensembleCopy)).Ffix)).FrefCount++
	}
	(*EnsembleCmdRep)(unsafe.Pointer(ensembleCopy)).FhPtr = (*EnsembleCmdRep)(unsafe.Pointer(ensembleCmd)).FhPtr
}

//----------------------------------------------------------------------
//
// TclCompileEnsemble --
//
//	Procedure called to compile an ensemble command. Note that most
//	ensembles are not compiled, since modifying a compiled ensemble causes
//	a invalidation of all existing bytecode (expensive!) which is not
//	normally warranted.
//
// Results:
//	Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
//	evaluation to runtime.
//
// Side effects:
//	Instructions are added to envPtr to execute the subcommands of the
//	ensemble at runtime if a compile-time mapping is possible.
//
//----------------------------------------------------------------------

func XTclCompileEnsemble(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:2905:1: */
	bp := tls.Alloc(92)
	defer tls.Free(92)

	var mapPtr uintptr
	var eclIndex int32
	var tokenPtr uintptr
	// var mapObj uintptr at bp, 8

	// var subcmdObj uintptr at bp+72, 8

	// var targetCmdObj uintptr at bp+40, 8

	// var listObj uintptr at bp+8, 8

	// var elems uintptr at bp+24, 8

	var replaced uintptr
	var replacement uintptr
	var ensemble Tcl_Command
	var oldCmdPtr uintptr
	var newCmdPtr uintptr
	// var len int32 at bp+20, 4

	var result int32
	// var flags int32 at bp+16, 4

	var i int32
	var depth int32
	var invokeAnyway int32
	var ourResult int32
	var numBytes uint32
	var word uintptr
	// var sclen int32 at bp+32, 4

	var str uintptr
	var matchObj uintptr
	// var s Tcl_DictSearch at bp+48, 24

	// var done int32 at bp+88, 4

	var matched int32
	// var tmpObj uintptr at bp+80, 8

	var _objPtr uintptr
	mapPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	eclIndex = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	replaced = XTcl_NewObj(tls)
	ensemble = cmdPtr
	oldCmdPtr = cmdPtr
	*(*int32)(unsafe.Pointer(bp + 16 /* flags */)) = 0
	depth = 1
	invokeAnyway = 0
	ourResult = TCL_ERROR

	(*Tcl_Obj)(unsafe.Pointer(replaced)).FrefCount++
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < depth+1) {
		goto __1
	}
	goto failed
__1:
	;
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __2
	}
	// Too hard.

	goto failed
__2:
	;

	// This is where we return to if we are parsing multiple nested compiled
	// ensembles. [info object] is such a beast.

checkNextWord:
	word = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart
	numBytes = uint32((*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fsize)

	// There's a sporting chance we'll be able to compile this. But now we
	// must check properly. To do that, check that we're compiling an ensemble
	// that has a compilable command as its appropriate subcommand.

	if !(XTcl_GetEnsembleMappingDict(tls, uintptr(0), ensemble, bp) != TCL_OK ||
		*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0)) {
		goto __3
	}
	// Either not an ensemble or a mapping isn't installed. Crud. Too hard
	// to proceed.

	goto failed
__3:
	;

	// Also refuse to compile anything that uses a formal parameter list for
	// now, on the grounds that it is too complex.

	if !(XTcl_GetEnsembleParameterList(tls, uintptr(0), ensemble, bp+8) != TCL_OK ||
		*(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0)) {
		goto __4
	}
	// Figuring out how to compile this has become too much. Bail out.

	goto failed
__4:
	;

	// Next, get the flags. We need them on several code paths so that we can
	// know whether we're to do prefix matching.

	XTcl_GetEnsembleFlags(tls, uintptr(0), ensemble, bp+16)

	// Check to see if there's also a subcommand list; must check to see if
	// the subcommand we are calling is in that list if it exists, since that
	// list filters the entries in the map.

	XTcl_GetEnsembleSubcommandList(tls, uintptr(0), ensemble, bp+8)
	if !(*(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0)) {
		goto __5
	}
	matchObj = uintptr(0)

	if !(XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 8)), bp+20, bp+24) != TCL_OK) {
		goto __7
	}
	goto failed
__7:
	;
	i = 0
__8:
	if !(i < *(*int32)(unsafe.Pointer(bp + 20))) {
		goto __10
	}
	str = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* elems */)) + uintptr(i)*8)), bp+32)
	if !(*(*int32)(unsafe.Pointer(bp + 32)) == int32(numBytes) && !(libc.Xmemcmp(tls, word, str, uint64(numBytes)) != 0)) {
		goto __11
	}
	// Exact match! Excellent!

	result = XTcl_DictObjGet(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* mapObj */)), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* elems */)) + uintptr(i)*8)), bp+40)
	if !(result != TCL_OK || *(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) {
		goto __12
	}
	goto failed
__12:
	;
	replacement = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* elems */)) + uintptr(i)*8))
	goto doneMapLookup
__11:
	;

	// Check to see if we've got a prefix match. A single prefix match
	// is fine, and allows us to refine our dictionary lookup, but
	// multiple prefix matches is a Bad Thing and will prevent us from
	// making progress. Note that we cannot do the lookup immediately
	// in the prefix case; might be another entry later in the list
	// that causes things to fail.

	if !(*(*int32)(unsafe.Pointer(bp + 16))&TCL_ENSEMBLE_PREFIX != 0 &&
		libc.Xstrncmp(tls, word, str, uint64(numBytes)) == 0) {
		goto __13
	}
	if !(matchObj != uintptr(0)) {
		goto __14
	}
	goto failed
__14:
	;
	matchObj = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* elems */)) + uintptr(i)*8))
__13:
	;
	goto __9
__9:
	i++
	goto __8
	goto __10
__10:
	;
	if !(matchObj == uintptr(0)) {
		goto __15
	}
	goto failed
__15:
	;
	result = XTcl_DictObjGet(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* mapObj */)), matchObj, bp+40)
	if !(result != TCL_OK || *(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) {
		goto __16
	}
	goto failed
__16:
	;
	replacement = matchObj
	goto __6
__5:

	// No map, so check the dictionary directly.

__17:
	;
__20:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __23
	}
	XTclAllocateFreeObjects(tls)
__23:
	;
	*(*uintptr)(unsafe.Pointer(bp + 72)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FrefCount = 0
	if !(int32(numBytes) == 0) {
		goto __24
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Flength = 0
	goto __25
__24:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes = XTcl_Alloc(tls, uint32(int32(numBytes)+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes, word, uint64(int32(numBytes)))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes + uintptr(int32(numBytes)))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Flength = int32(numBytes)
__25:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FtypePtr = uintptr(0)

	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
	result = XTcl_DictObjGet(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* mapObj */)), *(*uintptr)(unsafe.Pointer(bp + 72 /* subcmdObj */)), bp+40)
	if !(result == TCL_OK && *(*uintptr)(unsafe.Pointer(bp + 40)) != uintptr(0)) {
		goto __26
	}
	// Got it. Skip the fiddling around with prefixes.

	replacement = *(*uintptr)(unsafe.Pointer(bp + 72 /* subcmdObj */))
	goto doneMapLookup
__26:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FrefCount, 1) > 1) {
		goto __27
	}
	goto __28
__27:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __29
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes != XtclEmptyStringRep) {
		goto __31
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes)
__31:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Flength = -1
__32:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 72))
	goto __33
__33:
	if 0 != 0 {
		goto __32
	}
	goto __34
__34:
	;
	goto __30
__29:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* subcmdObj */)))
__30:
	;
__28:
	;

	// We've not literally got a valid subcommand. But maybe we have a
	// prefix. Check if prefix matches are allowed.

	if !!(*(*int32)(unsafe.Pointer(bp + 16))&TCL_ENSEMBLE_PREFIX != 0) {
		goto __35
	}
	goto failed
__35:
	;

	// Iterate over the keys in the dictionary, checking to see if we're a
	// prefix.

	XTcl_DictObjFirst(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* mapObj */)), bp+48, bp+72, bp+80, bp+88)
	matched = 0
	replacement = uintptr(0) // Silence, fool compiler!
__36:
	if !!(*(*int32)(unsafe.Pointer(bp + 88)) != 0) {
		goto __37
	}
	if !(libc.Xstrncmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 72)))
	}(), word, uint64(numBytes)) == 0) {
		goto __38
	}
	if !(libc.PostIncInt32(&matched, 1) != 0) {
		goto __39
	}
	// Must have matched twice! Not unique, so no point
	// looking further.

	goto __37
__39:
	;
	replacement = *(*uintptr)(unsafe.Pointer(bp + 72 /* subcmdObj */))
	*(*uintptr)(unsafe.Pointer(bp + 40 /* targetCmdObj */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* tmpObj */))
__38:
	;
	XTcl_DictObjNext(tls, bp+48, bp+72, bp+80, bp+88)
	goto __36
__37:
	;
	XTcl_DictObjDone(tls, bp+48)

	// If we have anything other than a single match, we've failed the
	// unique prefix check.

	if !(matched != 1) {
		goto __40
	}
	invokeAnyway = 1
	goto failed
__40:
	;
__6:
	;

	// OK, we definitely map to something. But what?
	//
	// The command we map to is the first word out of the map element. Note
	// that we also reject dealing with multi-element rewrites if we are in a
	// safe interpreter, as there is otherwise a (highly gnarly!) way to make
	// Tcl crash open to exploit.

doneMapLookup:
	XTcl_ListObjAppendElement(tls, uintptr(0), replaced, replacement)
	if !(XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 40)), bp+20, bp+24) != TCL_OK) {
		goto __41
	}
	goto failed
	goto __42
__41:
	if !(*(*int32)(unsafe.Pointer(bp + 20)) != 1) {
		goto __43
	}
	// Note that at this point we know we can't issue any special
	// instruction sequence as the mapping isn't one that we support at
	// the compiled level.

	goto cleanup
__43:
	;
__42:
	;
	*(*uintptr)(unsafe.Pointer(bp + 40 /* targetCmdObj */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* elems */))))

	oldCmdPtr = cmdPtr
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount++
	newCmdPtr = XTcl_GetCommandFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 40 /* targetCmdObj */)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount, 1) > 1) {
		goto __44
	}
	goto __45
__44:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __46
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).Fbytes != XtclEmptyStringRep) {
		goto __48
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).Fbytes)
__48:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).Flength = -1
__49:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 40))
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
	goto __47
__46:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* targetCmdObj */)))
__47:
	;
__45:
	;

	if !(newCmdPtr == uintptr(0) || XTcl_IsSafe(tls, interp) != 0 ||
		(*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(newCmdPtr)).FnsPtr)).Fflags&NS_SUPPRESS_COMPILATION != 0 ||
		(*Command)(unsafe.Pointer(newCmdPtr)).Fflags&CMD_HAS_EXEC_TRACES != 0 ||
		(*Interp)(unsafe.Pointer(interp)).Fflags&DONT_COMPILE_CMDS_INLINE != 0) {
		goto __52
	}
	// Maps to an undefined command or a command without a compiler.
	// Cannot compile.

	goto cleanup
__52:
	;
	cmdPtr = newCmdPtr
	depth++

	// See whether we have a nested ensemble. If we do, we can go round the
	// mulberry bush again, consuming the next word.

	if !((*Command)(unsafe.Pointer(cmdPtr)).FcompileProc == *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
	}{XTclCompileEnsemble}))) {
		goto __53
	}
	tokenPtr = tokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents+1)*24
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < depth+1 ||
		(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype != TCL_TOKEN_SIMPLE_WORD) {
		goto __54
	}
	// Too hard because the user has done something unpleasant like
	// omitting the sub-ensemble's command name or used a non-constant
	// name for a sub-ensemble's command name; we respond by bailing
	// out completely (this is a rare case). [Bug 6d2f249a01]

	goto cleanup
__54:
	;
	ensemble = cmdPtr
	goto checkNextWord
__53:
	;

	// Now we've done the mapping process, can now actually try to compile.
	// If there is a subcommand compiler and that successfully produces code,
	// we'll use that. Otherwise, we fall back to generating opcodes to do the
	// invoke at runtime.

	invokeAnyway = 1
	if !(TCL_OK == XTclAttemptCompileProc(tls, interp, parsePtr, depth, cmdPtr,
		envPtr)) {
		goto __55
	}
	ourResult = TCL_OK
	goto cleanup
__55:
	;

	// Throw out any line information generated by the failed compile attempt.

__56:
	if !((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc-1 > eclIndex) {
		goto __57
	}
	(*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc--
	XTclpFree(tls, (*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc)*24)).Fline)
	(*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc + uintptr((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc)*24)).Fline = uintptr(0)
	goto __56
__57:
	;

	// Reset the index of next command.  Toss out any from failed nested
	// partial compiles.

	(*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc

	// Failed to do a full compile for some reason. Try to do a direct invoke
	// instead of going through the ensemble lookup process again.

failed:
	if !(depth < 250) {
		goto __58
	}
	if !(depth > 1) {
		goto __59
	}
	if !!(invokeAnyway != 0) {
		goto __60
	}
	cmdPtr = oldCmdPtr
	depth--
__60:
	;
__59:
	;
	// The length of the "replaced" list must be depth-1.  Trim back
	// any extra elements that might have been appended by failing
	// pathways above.
	XTcl_ListObjReplace(tls, uintptr(0), replaced, depth-1, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))), 0, uintptr(0))

	// TODO: Reconsider whether we ought to call CompileToInvokedCommand()
	// when depth==1.  In that case we are choosing to emit the
	// INST_INVOKE_REPLACE bytecode when there is in fact no replacing
	// to be done.  It would be equally functional and presumably more
	// performant to fall through to cleanup below, return TCL_ERROR,
	// and let the compiler harness emit the INST_INVOKE_STK
	// implementation for us.

	sCompileToInvokedCommand(tls, interp, parsePtr, replaced, cmdPtr, envPtr)
	ourResult = TCL_OK
__58:
	;

	// Release the memory we allocated. If we've got here, we've either done
	// something useful or we're in a case that we can't compile at all and
	// we're just giving up.

cleanup:
__61:
	_objPtr = replaced
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __64
	}
	XTclFreeObj(tls, _objPtr)
__64:
	;
	goto __62
__62:
	if 0 != 0 {
		goto __61
	}
	goto __63
__63:
	;
	return ourResult
}

func XTclAttemptCompileProc(tls *libc.TLS, interp uintptr, parsePtr uintptr, depth int32, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3244:1: */
	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	var result int32
	var i int32
	var saveTokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	var savedStackDepth int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
	var savedCodeNext uint32 = uint32((int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart)) / 1)
	var savedAuxDataArrayNext int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext
	var savedExceptArrayNext int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext

	if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc == uintptr(0) {
		return TCL_ERROR
	}

	// Advance parsePtr->tokenPtr so that it points at the last subcommand.
	// This will be wrong, but it will not matter, and it will put the
	// tokens for the arguments in the right place without the needed to
	// allocate a synthetic Tcl_Parse struct, or copy tokens around.

	for i = 0; i < depth-1; i++ {
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).FnumComponents+1)*24
	}
	*(*int32)(unsafe.Pointer(parsePtr + 28)) -= depth - 1

	// Shift the line information arrays to account for different word
	// index values.

	*(*uintptr)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc + uintptr(eclIndex)*24 + 8)) += uintptr(depth-1) * 4
	*(*uintptr)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc + uintptr(eclIndex)*24 + 16)) += uintptr(depth-1) * 8

	// Hand off compilation to the subcommand compiler. At last!

	result = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc})).f(tls, interp, parsePtr, cmdPtr, envPtr)

	// Undo the shift.

	*(*uintptr)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc + uintptr(eclIndex)*24 + 8)) -= uintptr(depth-1) * 4
	*(*uintptr)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc + uintptr(eclIndex)*24 + 16)) -= uintptr(depth-1) * 8

	*(*int32)(unsafe.Pointer(parsePtr + 28)) += depth - 1
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = saveTokenPtr

	// If our target failed to compile, revert any data from failed partial
	// compiles.  Note that envPtr->numCommands need not be checked because
	// we avoid compiling subcommands that recursively call TclCompileScript().

	if result != TCL_OK {
		var auxPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptAuxArrayPtr

		for i = 0; i < savedExceptArrayNext; i++ {
			for (*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumBreakTargets > 0 &&
				*(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FbreakTargets + uintptr((*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumBreakTargets-1)*4)) >=
					savedCodeNext {
				(*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumBreakTargets--
			}
			for (*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumContinueTargets > 0 &&
				*(*uint32)(unsafe.Pointer((*ExceptionAux)(unsafe.Pointer(auxPtr)).FcontinueTargets + uintptr((*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumContinueTargets-1)*4)) >=
					savedCodeNext {
				(*ExceptionAux)(unsafe.Pointer(auxPtr)).FnumContinueTargets--
			}
			auxPtr += 56
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext = savedExceptArrayNext

		if savedAuxDataArrayNext != (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext {
			var auxDataPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr
			var auxDataEnd uintptr = auxDataPtr

			auxDataPtr += 16 * uintptr(savedAuxDataArrayNext)
			auxDataEnd += 16 * uintptr((*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext)

			for auxDataPtr < auxDataEnd {
				if (*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxDataPtr)).Ftype)).FfreeProc != uintptr(0) {
					(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*AuxDataType)(unsafe.Pointer((*AuxData)(unsafe.Pointer(auxDataPtr)).Ftype)).FfreeProc})).f(tls, (*AuxData)(unsafe.Pointer(auxDataPtr)).FclientData)
				}
				auxDataPtr += 16
			}
			(*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayNext = savedAuxDataArrayNext
		}
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth = savedStackDepth
		(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr(savedCodeNext)
	}

	return result
}

// How to compile a subcommand to a _replacing_ invoke of its implementation
// command.

func sCompileToInvokedCommand(tls *libc.TLS, interp uintptr, parsePtr uintptr, replacements uintptr, cmdPtr uintptr, envPtr uintptr) { /* tclEnsemble.c:3377:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var mapPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FextCmdMapPtr
	var eclIndex int32 = (*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Fnuloc - 1
	var tokPtr uintptr
	var objPtr uintptr
	// var words uintptr at bp+24, 8

	var bytes uintptr
	// var length int32 at bp+32, 4

	var i int32
	// var numWords int32 at bp+16, 4

	var cmdLit int32
	var extraLiteralFlags int32 = LITERAL_CMD_NAME

	// Push the words of the command. Take care; the command words may be
	// scripts that have backslashes in them, and [info frame 0] can see the
	// difference. Hence the call to TclContinuationsEnterDerived...

	XTcl_ListObjGetElements(tls, uintptr(0), replacements, bp+16, bp+24)
	i = 0
	tokPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
__1:
	if !(i < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords) {
		goto __3
	}
	{
		if i > 0 && i < *(*int32)(unsafe.Pointer(bp + 16))+1 {
			bytes = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* words */)) + uintptr(i-1)*8)), bp+32)
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp + 32)), 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
			goto __2
		}

		(*CompileEnv)(unsafe.Pointer(envPtr)).Fline = *(*int32)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fline + uintptr(i)*4))
		(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext = *(*uintptr)(unsafe.Pointer((*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(mapPtr)).Floc+uintptr(eclIndex)*24)).Fnext + uintptr(i)*8))
		if (*Tcl_Token)(unsafe.Pointer(tokPtr)).Ftype == TCL_TOKEN_SIMPLE_WORD {
			var literal int32 = XTclRegisterLiteral(tls, envPtr, (*Tcl_Token)(unsafe.Pointer(tokPtr+1*24)).Fstart, (*Tcl_Token)(unsafe.Pointer(tokPtr+1*24)).Fsize /*flags*/, 0)

			if (*CompileEnv)(unsafe.Pointer(envPtr)).FclNext != 0 {
				XTclContinuationsEnterDerived(tls,
					XTclFetchLiteral(tls, envPtr, uint32(literal)),
					int32((int64((*Tcl_Token)(unsafe.Pointer(tokPtr+1*24)).Fstart)-int64((*CompileEnv)(unsafe.Pointer(envPtr)).Fsource))/1),
					(*CompileEnv)(unsafe.Pointer(envPtr)).FclNext)
			}
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objIndexCopy int32 = literal
				if _objIndexCopy <= 255 {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok9 := true; ok9; ok9 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok10 := true; ok10; ok10 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok11 := true; ok11; ok11 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
							XTclExpandCodeArray(tls, envPtr)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok12 := true; ok12; ok12 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok13 := true; ok13; ok13 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
								}
							}
						}
					}
				}
			}
		} else {
			XTclCompileTokens(tls, interp, tokPtr+uintptr(1)*24, (*Tcl_Token)(unsafe.Pointer(tokPtr)).FnumComponents, envPtr)

		}

	}
	goto __2
__2:
	i++
	tokPtr = tokPtr + uintptr((*Tcl_Token)(unsafe.Pointer(tokPtr)).FnumComponents+1)*24
	goto __1
	goto __3
__3:
	;

	// Push the name of the command we're actually dispatching to as part of
	// the implementation.

	objPtr = XTcl_NewObj(tls)
	XTcl_GetCommandFullName(tls, interp, cmdPtr, objPtr)
	bytes = XTcl_GetStringFromObj(tls, objPtr, bp+32)
	if cmdPtr != uintptr(0) && (*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_VIA_RESOLVER != 0 {
		extraLiteralFlags = extraLiteralFlags | LITERAL_UNSHARED
	}
	cmdLit = XTclRegisterLiteral(tls, envPtr, bytes, *(*int32)(unsafe.Pointer(bp + 32 /* length */)), extraLiteralFlags)
	XTclSetCmdNameObj(tls, interp, XTclFetchLiteral(tls, envPtr, uint32(cmdLit)), cmdPtr)
	for ok14 := true; ok14; ok14 = 0 != 0 {
		var _objIndexCopy int32 = cmdLit
		if _objIndexCopy <= 255 {
			for ok15 := true; ok15; ok15 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH1)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH1 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok16 := true; ok16; ok16 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok17 := true; ok17; ok17 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		} else {
			for ok18 := true; ok18; ok18 = 0 != 0 {
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeEnd {
					XTclExpandCodeArray(tls, envPtr)
				}
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(INST_PUSH4)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
				if (*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart < 2 {
					(*CompileEnv)(unsafe.Pointer(envPtr)).FatCmdStart = func() int32 {
						if INST_PUSH4 == INST_START_CMD {
							return 1
						}
						return 0
					}()
				}
				for ok19 := true; ok19; ok19 = 0 != 0 {
					var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
					if _delta != 0 {
						if _delta == -0x7fffffff-1 {
							_delta = 1 - _objIndexCopy
						}
						for ok20 := true; ok20; ok20 = 0 != 0 {
							if _delta < 0 {
								if (*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth {
									(*CompileEnv)(unsafe.Pointer(envPtr)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(envPtr)).FcurrStackDepth
								}
							}
							*(*int32)(unsafe.Pointer(envPtr + 48)) += _delta
						}
					}
				}
			}
		}
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
			for ok21 := true; ok21; ok21 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = objPtr
			}
		} else {
			XTclFreeObj(tls, objPtr)
		}
	}

	// Do the replacing dispatch.

	XTclEmitInvoke(tls, envPtr, INST_INVOKE_REPLACE, libc.VaList(bp, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords, *(*int32)(unsafe.Pointer(bp + 16))+1))
}

// Helpers that do issuing of instructions for commands that "don't have
// compilers" (well, they do; these). They all work by just generating base
// code to invoke the command; they're intended for ensemble subcommands so
// that the costs of INST_INVOKE_REPLACE can be avoided where we can work out
// that they're not needed.
//
// Note that these are NOT suitable for commands where there's an argument
// that is a script, as an [info level] or [info frame] in the inner context
// can see the difference.

func sCompileBasicNArgCommand(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3458:1: */
	var objPtr uintptr = XTcl_NewObj(tls)

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	XTcl_GetCommandFullName(tls, interp, cmdPtr, objPtr)
	XTclCompileInvocation(tls, interp, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr, objPtr,
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords, envPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = objPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

func XTclCompileBasic0ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3477:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 1 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasic1ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3499:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasic2ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3521:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasic3ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3543:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 4 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasic0Or1ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3565:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 1 && (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasic1Or2ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3587:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 2 && (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasic2Or3ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3609:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 3 && (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords != 4 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasic0To2ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3631:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 1 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 3 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasic1To3ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3653:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2 || (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords > 4 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasicMin0ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3675:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 1 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasicMin1ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3697:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 2 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

func XTclCompileBasicMin2ArgCmd(tls *libc.TLS, interp uintptr, parsePtr uintptr, cmdPtr uintptr, envPtr uintptr) int32 { /* tclEnsemble.c:3719:1: */
	// Verify that the number of arguments is correct; that's the only case
	// that we know will avoid the call to Tcl_WrongNumArgs() at invoke time,
	// which is the only code that sees the shenanigans of ensemble dispatch.

	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords < 3 {
		return TCL_ERROR
	}

	return sCompileBasicNArgCommand(tls, interp, parsePtr, cmdPtr, envPtr)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// To serialize access to environ.

// MODULE_SCOPE
var XTclEnvEpoch Size_t = uint64(0) /* tclEnv.c:41:8 */ // Epoch of the tcl environment
// (if changed with tcl-env).

var env struct {
	FcacheSize   int32
	F__ccgo_pad1 [4]byte
	Fcache       uintptr
} /* tclEnv.c:59:3: */

//----------------------------------------------------------------------
//
// TclSetupEnv --
//
//	This function is invoked for an interpreter to make environment
//	variables accessible from that interpreter via the "env" associative
//	array.
//
// Results:
//	None.
//
// Side effects:
//	The interpreter is added to a list of interpreters managed by us, so
//	that its view of envariables can be kept consistent with the view in
//	other interpreters. If this is the first call to TclSetupEnv, then
//	additional initialization happens, such as copying the environment to
//	dynamically-allocated space for ease of management.
//
//----------------------------------------------------------------------

func XTclSetupEnv(tls *libc.TLS, interp uintptr) { /* tclEnv.c:96:1: */
	bp := tls.Alloc(336)
	defer tls.Free(336)

	var varPtr uintptr
	// var arrayPtr uintptr at bp+88, 8

	var varNamePtr uintptr
	// var envString Tcl_DString at bp+96, 216

	// var namesHash Tcl_HashTable at bp, 88

	var hPtr uintptr
	// var search Tcl_HashSearch at bp+312, 24

	// Synchronize the values in the environ array with the contents of the
	// Tcl "env" variable. To do this:
	//    1) Remove the trace that fires when the "env" var is updated.
	//    2) Find the existing contents of the "env", storing in a hash table.
	//    3) Create/update elements for each environ variable, removing
	//	     elements from the hash table as we go.
	//    4) Remove the elements for each remaining entry in the hash table,
	//	     which must have existed before yet have no analog in the environ
	//	     variable.
	//    5) Add a trace that synchronizes the "env" array.

	XTcl_UntraceVar2(tls, interp, ts+27835, uintptr(0),
		TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS|TCL_TRACE_READS|TCL_TRACE_ARRAY, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sEnvTraceProc})), uintptr(0))

	// Find out what elements are currently in the global env array.

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			varNamePtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes, ts+27835, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes + 3)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FrefCount++
	XTcl_InitObjHashTable(tls, bp)
	varPtr = XTclObjLookupVarEx(tls, interp, varNamePtr, uintptr(0), TCL_GLOBAL_ONLY,
		/*msg*/ uintptr(0) /*createPart1*/, 0 /*createPart2*/, 0, bp+88)
	XTclFindArrayPtrElements(tls, varPtr, bp)

	if *(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) == uintptr(0) {
		// When we are started from main(), the _wenviron array could
		// be NULL and will be initialized by the first _wgetenv() call.

		libc.X_wgetenv(tls, wtext+98)
	}

	// Go through the environment array and transfer its values into Tcl. At
	// the same time, remove those elements we add/update from the hash table
	// of existing elements, so that after this part processes, that table
	// will hold just the parts to remove.

	if *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)))) != uintptr(0) {
		var i int32

		for i = 0; *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(i)*8)) != uintptr(0); i++ {
			var obj1 uintptr
			var obj2 uintptr
			var p1 uintptr
			var p2 uintptr

			p1 = XTcl_WinTCharToUtf(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(i)*8)), -1, bp+96)
			p2 = libc.Xstrchr(tls, p1, '=')
			if p2 == uintptr(0) {
				// This condition seem to happen occasionally under some
				// versions of Solaris, or when encoding accidents swallow the
				// '='; ignore the entry.

				XTcl_DStringFree(tls, bp+96)
				continue
			}
			p2++
			*(*int8)(unsafe.Pointer(p2 + libc.UintptrFromInt32(-1))) = int8(0)
			// Enforce PATH and COMSPEC to be all uppercase. This eliminates
			// additional trace logic otherwise required in init.tcl.

			if libc.X_stricmp(tls, p1, ts+27839) == 0 {
				p1 = ts + 27839 /* "PATH" */
			} else if libc.X_stricmp(tls, p1, ts+27844) == 0 {
				p1 = ts + 27844 /* "COMSPEC" */
			}
			obj1 = XTcl_NewStringObj(tls, p1, -1)
			obj2 = XTcl_NewStringObj(tls, p2, -1)
			XTcl_DStringFree(tls, bp+96)

			(*Tcl_Obj)(unsafe.Pointer(obj1)).FrefCount++
			(*Tcl_Obj)(unsafe.Pointer(obj2)).FrefCount++
			XTcl_ObjSetVar2(tls, interp, varNamePtr, obj1, obj2, TCL_GLOBAL_ONLY)
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &namesHash */)).FfindProc})).f(tls, bp /* &namesHash */, obj1)
			if hPtr != uintptr(0) {
				XTcl_DeleteHashEntry(tls, hPtr)
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr = obj1
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			for ok3 := true; ok3; ok3 = 0 != 0 {
				var _objPtr uintptr = obj2
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}

	}

	// Delete those elements that existed in the array but which had no
	// counterparts in the environment array.

	for hPtr = XTcl_FirstHashEntry(tls, bp, bp+312); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp+312) {
		var elemName uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		XTclObjUnsetVar2(tls, interp, varNamePtr, elemName, TCL_GLOBAL_ONLY)
	}
	XTcl_DeleteHashTable(tls, bp)
	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _objPtr uintptr = varNamePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	// Re-establish the trace.

	XTcl_TraceVar2(tls, interp, ts+27835, uintptr(0),
		TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS|TCL_TRACE_READS|TCL_TRACE_ARRAY, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sEnvTraceProc})), uintptr(0))
}

//----------------------------------------------------------------------
//
// TclSetEnv --
//
//	Set an environment variable, replacing an existing value or creating a
//	new variable if there doesn't exist a variable by the given name. This
//	function is intended to be a stand-in for the UNIX "setenv" function
//	so that applications using that function will interface properly to
//	Tcl. To make it a stand-in, the Makefile must define "TclSetEnv" to
//	"setenv".
//
// Results:
//	None.
//
// Side effects:
//	The environ array gets updated.
//
//----------------------------------------------------------------------

func XTclSetEnv(tls *libc.TLS, name uintptr, value uintptr) { /* tclEnv.c:250:1: */
	bp := tls.Alloc(224)
	defer tls.Free(224)

	// var envString Tcl_DString at bp+8, 216

	var nameLength uint32
	var valueLength uint32
	var index int32
	// var length int32 at bp, 4

	var p uintptr
	var oldValue uintptr
	var p2 uintptr

	// Figure out where the entry is going to go. If the name doesn't already
	// exist, enlarge the array if necessary to make room. If the name exists,
	// free its old entry.

	index = XTclpFindVariable(tls, name, bp)

	if index == -1 {
		oldValue = uintptr(0)
		nameLength = uint32(libc.Xstrlen(tls, name))
	} else {
		var oldEnv uintptr

		// Compare the new value to the existing value. If they're the same
		// then quit immediately (e.g. don't rewrite the value or propagate it
		// to other interpreters). Otherwise, when there are N interpreters
		// there will be N! propagations of the same value among the
		// interpreters.

		oldEnv = XTcl_WinTCharToUtf(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(index)*8)), -1, bp+8)
		if libc.Xstrcmp(tls, value, oldEnv+uintptr(*(*int32)(unsafe.Pointer(bp))+1)) == 0 {
			XTcl_DStringFree(tls, bp+8)

			return
		}
		XTcl_DStringFree(tls, bp+8)

		oldValue = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(index)*8))
		nameLength = uint32(*(*int32)(unsafe.Pointer(bp /* length */)))
	}

	// Create a new entry. Build a complete UTF string that contains a
	// "name=value" pattern. Then convert the string to the native encoding,
	// and set the environ array value.

	valueLength = uint32(libc.Xstrlen(tls, value))
	p = XTcl_Alloc(tls, nameLength+valueLength+uint32(2))
	libc.Xmemcpy(tls, p, name, uint64(nameLength))
	*(*int8)(unsafe.Pointer(p + uintptr(nameLength))) = int8('=')
	libc.Xmemcpy(tls, p+uintptr(nameLength)+uintptr(1), value, uint64(valueLength+uint32(1)))
	p2 = XTcl_WinUtfToTChar(tls, p, -1, bp+8)

	// Copy the native string to heap memory.

	p = XTcl_Realloc(tls, p, uint32(uint64((*Tcl_DString)(unsafe.Pointer(bp+8)).Flength)+uint64(unsafe.Sizeof(WCHAR(0)))))
	libc.Xmemcpy(tls, p, p2, uint64((*Tcl_DString)(unsafe.Pointer(bp+8)).Flength)+uint64(unsafe.Sizeof(WCHAR(0))))
	XTcl_DStringFree(tls, bp+8)

	// Update the system environment.

	libc.X_wputenv(tls, p)
	index = XTclpFindVariable(tls, name, bp)

	// Watch out for versions of putenv that copy the string (e.g. VC++). In
	// this case we need to free the string immediately. Otherwise update the
	// string in the cache.

	if index != -1 && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(index)*8)) == p {
		sReplaceString(tls, oldValue, p)
	} else {
		// This putenv() copies instead of taking ownership.

		XTclpFree(tls, p)
	}

	if !(libc.Xstrcmp(tls, name, ts+27852) != 0) {
		// If the user's home directory has changed, we must invalidate the
		// filesystem cache, because '~' expansions will now be incorrect.

		XTcl_FSMountsChanged(tls, uintptr(0))
	}
}

//----------------------------------------------------------------------
//
// Tcl_PutEnv --
//
//	Set an environment variable. Similar to setenv except that the
//	information is passed in a single string of the form NAME=value,
//	rather than as separate name strings. This function is intended to be
//	a stand-in for the UNIX "putenv" function so that applications using
//	that function will interface properly to Tcl. To make it a stand-in,
//	the Makefile will define "Tcl_PutEnv" to "putenv".
//
// Results:
//	None.
//
// Side effects:
//	The environ array gets updated, as do all of the interpreters that we
//	manage.
//
//----------------------------------------------------------------------

func XTcl_PutEnv(tls *libc.TLS, assignment uintptr) int32 { /* tclEnv.c:401:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var nameString Tcl_DString at bp, 216

	var name uintptr
	var value uintptr

	if assignment == uintptr(0) {
		return 0
	}

	// First convert the native string to UTF. Then separate the string into
	// name and value parts, and call TclSetEnv to do all of the real work.

	name = XTcl_ExternalToUtfDString(tls, uintptr(0), assignment, -1, bp)
	value = libc.Xstrchr(tls, name, '=')

	if value != uintptr(0) && value != name {
		*(*int8)(unsafe.Pointer(value)) = int8(0)
		if *(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) == uintptr(0) {
			// When we are started from main(), the _wenviron array could
			// be NULL and will be initialized by the first _wgetenv() call.

			libc.X_wgetenv(tls, wtext+98)
		}
		XTclSetEnv(tls, name, value+uintptr(1))
	}
	XTclEnvEpoch++

	XTcl_DStringFree(tls, bp)
	return 0
}

//----------------------------------------------------------------------
//
// TclUnsetEnv --
//
//	Remove an environment variable, updating the "env" arrays in all
//	interpreters managed by us. This function is intended to replace the
//	UNIX "unsetenv" function (but to do this the Makefile must be modified
//	to redefine "TclUnsetEnv" to "unsetenv".
//
// Results:
//	None.
//
// Side effects:
//	Interpreters are updated, as is environ.
//
//----------------------------------------------------------------------

func XTclUnsetEnv(tls *libc.TLS, name uintptr) { /* tclEnv.c:461:1: */
	bp := tls.Alloc(224)
	defer tls.Free(224)

	var oldValue uintptr
	// var length int32 at bp, 4

	var index int32
	// var envString Tcl_DString at bp+8, 216

	var string uintptr

	index = XTclpFindVariable(tls, name, bp)

	// First make sure that the environment variable exists to avoid doing
	// needless work and to avoid recursion on the unset.

	if index == -1 {

		return
	}

	// Remember the old value so we can free it if Tcl created the string.

	oldValue = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(index)*8))

	// Update the system environment. This must be done before we update the
	// interpreters or we will recurse.

	// For those platforms that support putenv to unset, Linux indicates
	// that no = should be included, and Windows requires it.

	string = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp))+2))
	libc.Xmemcpy(tls, string, name, uint64(*(*int32)(unsafe.Pointer(bp /* length */))))
	*(*int8)(unsafe.Pointer(string + uintptr(*(*int32)(unsafe.Pointer(bp /* length */))))) = int8('=')
	*(*int8)(unsafe.Pointer(string + uintptr(*(*int32)(unsafe.Pointer(bp))+1))) = int8(0)

	XTcl_WinUtfToTChar(tls, string, -1, bp+8)
	string = XTcl_Realloc(tls, string, uint32(uint64((*Tcl_DString)(unsafe.Pointer(bp+8)).Flength)+uint64(unsafe.Sizeof(WCHAR(0)))))
	libc.Xmemcpy(tls, string, (*Tcl_DString)(unsafe.Pointer(bp+8)).Fstring,
		uint64((*Tcl_DString)(unsafe.Pointer(bp+8)).Flength)+uint64(unsafe.Sizeof(WCHAR(0))))
	XTcl_DStringFree(tls, bp+8)

	libc.X_wputenv(tls, string)

	// Watch out for versions of putenv that copy the string (e.g. VC++). In
	// this case we need to free the string immediately. Otherwise update the
	// string in the cache.

	if *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(index)*8)) == string {
		sReplaceString(tls, oldValue, string)
	} else {
		// This putenv() copies instead of taking ownership.

		XTclpFree(tls, string)
	}

}

//---------------------------------------------------------------------------
//
// TclGetEnv --
//
//	Retrieve the value of an environment variable.
//
// Results:
//	The result is a pointer to a string specifying the value of the
//	environment variable, or NULL if that environment variable does not
//	exist. Storage for the result string is allocated in valuePtr; the
//	caller must call Tcl_DStringFree() when the result is no longer
//	needed.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetEnv(tls *libc.TLS, name uintptr, valuePtr uintptr) uintptr { /* tclEnv.c:573:12: */
	bp := tls.Alloc(224)
	defer tls.Free(224)

	// var length int32 at bp, 4

	var index int32
	var result uintptr

	index = XTclpFindVariable(tls, name, bp)
	result = uintptr(0)
	if index != -1 {
		// var envStr Tcl_DString at bp+8, 216

		result = XTcl_WinTCharToUtf(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(index)*8)), -1, bp+8)
		result += uintptr(*(*int32)(unsafe.Pointer(bp /* length */)))
		if int32(*(*int8)(unsafe.Pointer(result))) == '=' {
			result++
			XTcl_DStringInit(tls, valuePtr)
			XTcl_DStringAppend(tls, valuePtr, result, -1)
			result = (*Tcl_DString)(unsafe.Pointer(valuePtr)).Fstring
		} else {
			result = uintptr(0)
		}
		XTcl_DStringFree(tls, bp+8)
	}

	return result
}

//----------------------------------------------------------------------
//
// EnvTraceProc --
//
//	This function is invoked whenever an environment variable is read,
//	modified or deleted. It propagates the change to the global "environ"
//	array.
//
// Results:
//	Returns NULL to indicate success, or an error-message if the array
//	element being handled doesn't exist.
//
// Side effects:
//	Environment variable changes get propagated. If the whole "env" array
//	is deleted, then we stop managing things for this interpreter (usually
//	this happens because the whole interpreter is being deleted).
//
//----------------------------------------------------------------------

// ARGSUSED
func sEnvTraceProc(tls *libc.TLS, clientData ClientData, interp uintptr, name1 uintptr, name2 uintptr, flags int32) uintptr { /* tclEnv.c:628:13: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// For array traces, let TclSetupEnv do all the work.

	if flags&TCL_TRACE_ARRAY != 0 {
		XTclSetupEnv(tls, interp)
		XTclEnvEpoch++
		return uintptr(0)
	}

	// If name2 is NULL, then return and do nothing.

	if name2 == uintptr(0) {
		return uintptr(0)
	}

	// If a value is being set, call TclSetEnv to do all of the work.

	if flags&TCL_TRACE_WRITES != 0 {
		var value uintptr

		value = XTcl_GetVar2(tls, interp, ts+27835, name2, TCL_GLOBAL_ONLY)
		XTclSetEnv(tls, name2, value)
		XTclEnvEpoch++
	}

	// If a value is being read, call TclGetEnv to do all of the work.

	if flags&TCL_TRACE_READS != 0 {
		// var valueString Tcl_DString at bp, 216

		var value uintptr = XTclGetEnv(tls, name2, bp)

		if value == uintptr(0) {
			return ts + 27857 /* "no such variable" */
		}
		XTcl_SetVar2(tls, interp, name1, name2, value, 0)
		XTcl_DStringFree(tls, bp)
	}

	// For unset traces, let TclUnsetEnv do all the work.

	if flags&TCL_TRACE_UNSETS != 0 {
		XTclUnsetEnv(tls, name2)
		XTclEnvEpoch++
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// ReplaceString --
//
//	Replace one string with another in the environment variable cache. The
//	cache keeps track of all of the environment variables that Tcl has
//	modified so they can be freed later.
//
// Results:
//	None.
//
// Side effects:
//	May free the old string.
//
//----------------------------------------------------------------------

func sReplaceString(tls *libc.TLS, oldStr uintptr, newStr uintptr) { /* tclEnv.c:713:1: */
	var i int32

	// Check to see if the old value was allocated by Tcl. If so, it needs to
	// be deallocated to avoid memory leaks. Note that this algorithm is O(n),
	// not O(1). This will result in n-squared behavior if lots of environment
	// changes are being made.

	for i = 0; i < env.FcacheSize; i++ {
		if *(*uintptr)(unsafe.Pointer(env.Fcache + uintptr(i)*8)) == oldStr || *(*uintptr)(unsafe.Pointer(env.Fcache + uintptr(i)*8)) == uintptr(0) {
			break
		}
	}
	if i < env.FcacheSize {
		// Replace or delete the old value.

		if *(*uintptr)(unsafe.Pointer(env.Fcache + uintptr(i)*8)) != 0 {
			XTclpFree(tls, *(*uintptr)(unsafe.Pointer(env.Fcache + uintptr(i)*8)))
		}

		if newStr != 0 {
			*(*uintptr)(unsafe.Pointer(env.Fcache + uintptr(i)*8)) = newStr
		} else {
			for ; i < env.FcacheSize-1; i++ {
				*(*uintptr)(unsafe.Pointer(env.Fcache + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(env.Fcache + uintptr(i+1)*8))
			}
			*(*uintptr)(unsafe.Pointer(env.Fcache + uintptr(env.FcacheSize-1)*8)) = uintptr(0)
		}
	} else {
		// We need to grow the cache in order to hold the new string.

		var growth int32 = 5

		env.Fcache = XTcl_Realloc(tls, env.Fcache, uint32(uint64(env.FcacheSize+growth)*uint64(unsafe.Sizeof(uintptr(0)))))
		*(*uintptr)(unsafe.Pointer(env.Fcache + uintptr(env.FcacheSize)*8)) = newStr
		libc.Xmemset(tls, env.Fcache+uintptr(env.FcacheSize)*8+uintptr(1)*8, 0,
			Size_t(growth-1)*Size_t(unsafe.Sizeof(uintptr(0))))
		*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&env)))) += growth
	}
}

//----------------------------------------------------------------------
//
// TclFinalizeEnvironment --
//
//	This function releases any storage allocated by this module that isn't
//	still in use by the global environment. Any strings that are still in
//	the environment will be leaked.
//
// Results:
//	None.
//
// Side effects:
//	May deallocate storage.
//
//----------------------------------------------------------------------

func XTclFinalizeEnvironment(tls *libc.TLS) { /* tclEnv.c:783:1: */
	// For now we just deallocate the cache array and none of the environment
	// strings. This may leak more memory that strictly necessary, since some
	// of the strings may no longer be in the environment. However,
	// determining which ones are ok to delete is n-squared, and is pretty
	// unlikely, so we don't bother.  However, in the case of DPURIFY, just
	// free all strings in the cache.

	if env.Fcache != 0 {
		XTclpFree(tls, env.Fcache)
		env.Fcache = uintptr(0)
		env.FcacheSize = 0
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The data structure below is used to report background errors. One such
// structure is allocated for each error; it holds information about the
// interpreter and the error until an idle handler command can be invoked.

type BgError1 = struct {
	FerrorMsg   uintptr
	FreturnOpts uintptr
	FnextPtr    uintptr
} /* tclEvent.c:24:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The data structure below is used to report background errors. One such
// structure is allocated for each error; it holds information about the
// interpreter and the error until an idle handler command can be invoked.

type BgError = BgError1 /* tclEvent.c:32:3 */

// One of the structures below is associated with the "tclBgError" assoc data
// for each interpreter. It keeps track of the head and tail of the list of
// pending background errors for the interpreter.

type ErrAssocData1 = struct {
	Finterp     uintptr
	FcmdPrefix  uintptr
	FfirstBgPtr uintptr
	FlastBgPtr  uintptr
} /* tclEvent.c:40:9 */

// One of the structures below is associated with the "tclBgError" assoc data
// for each interpreter. It keeps track of the head and tail of the list of
// pending background errors for the interpreter.

type ErrAssocData = ErrAssocData1 /* tclEvent.c:49:3 */

// For each exit handler created with a call to Tcl_Create(Late)ExitHandler
// there is a structure of the following type:

type ExitHandler1 = struct {
	Fproc       uintptr
	FclientData ClientData
	FnextPtr    uintptr
} /* tclEvent.c:56:9 */

// For each exit handler created with a call to Tcl_Create(Late)ExitHandler
// there is a structure of the following type:

type ExitHandler = ExitHandler1 /* tclEvent.c:61:3 */

// There is both per-process and per-thread exit handlers. The first list is
// controlled by a mutex. The other is in thread local storage.

var firstExitPtr uintptr = uintptr(0) /* tclEvent.c:68:20 */
// First in list of all exit handlers for
// application.
var firstLateExitPtr uintptr = uintptr(0) /* tclEvent.c:71:20 */
// First in list of all late exit handlers for
// application.

// This variable is set to 1 when Tcl_Exit is called. The variable is checked
// by TclInExit() to allow different behavior for exit-time processing, e.g.,
// in closing of files and pipes.

var inExit int32 = 0 /* tclEvent.c:82:12 */

var subsystemsInitialized int32 = 0 /* tclEvent.c:84:12 */

// This variable contains the application wide exit handler. It will be called
// by Tcl_Exit instead of the C-runtime exit if this variable is set to a
// non-NULL value.

var appExitPtr uintptr = uintptr(0) /* tclEvent.c:92:35 */

type ThreadSpecificData1 = struct {
	FfirstExitPtr uintptr
	FinExit       int32
	F__ccgo_pad1  [4]byte
}                              /* tclEvent.c:100:3 */
var dataKey1 Tcl_ThreadDataKey /* tclEvent.c:101:26: */

//----------------------------------------------------------------------
//
// Tcl_BackgroundError --
//
//	This function is invoked to handle errors that occur in Tcl commands
//	that are invoked in "background" (e.g. from event or timer bindings).
//
// Results:
//	None.
//
// Side effects:
//	A handler command is invoked later as an idle handler to process the
//	error, passing it the interp result and return options.
//
//----------------------------------------------------------------------

func XTcl_BackgroundError(tls *libc.TLS, interp uintptr) { /* tclEvent.c:143:1: */
	XTcl_BackgroundException(tls, interp, TCL_ERROR)
}

func XTcl_BackgroundException(tls *libc.TLS, interp uintptr, code int32) { /* tclEvent.c:151:1: */
	var errPtr uintptr
	var assocPtr uintptr

	if code == TCL_OK {
		return
	}

	errPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(BgError{})))
	(*BgError)(unsafe.Pointer(errPtr)).FerrorMsg = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer((*BgError)(unsafe.Pointer(errPtr)).FerrorMsg)).FrefCount++
	(*BgError)(unsafe.Pointer(errPtr)).FreturnOpts = XTcl_GetReturnOptions(tls, interp, code)
	(*Tcl_Obj)(unsafe.Pointer((*BgError)(unsafe.Pointer(errPtr)).FreturnOpts)).FrefCount++
	(*BgError)(unsafe.Pointer(errPtr)).FnextPtr = uintptr(0)

	XTclGetBgErrorHandler(tls, interp)
	assocPtr = XTcl_GetAssocData(tls, interp, ts+27874, uintptr(0))
	if (*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr == uintptr(0) {
		(*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr = errPtr
		XTcl_DoWhenIdle(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sHandleBgErrors})), assocPtr)
	} else {
		(*BgError)(unsafe.Pointer((*ErrAssocData)(unsafe.Pointer(assocPtr)).FlastBgPtr)).FnextPtr = errPtr
	}
	(*ErrAssocData)(unsafe.Pointer(assocPtr)).FlastBgPtr = errPtr
	XTcl_ResetResult(tls, interp)
}

//----------------------------------------------------------------------
//
// HandleBgErrors --
//
//	This function is invoked as an idle handler to process all of the
//	accumulated background errors.
//
// Results:
//	None.
//
// Side effects:
//	Depends on what actions the handler command takes for the errors.
//
//----------------------------------------------------------------------

func sHandleBgErrors(tls *libc.TLS, clientData ClientData) { /* tclEvent.c:200:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var assocPtr uintptr = clientData
	var interp uintptr = (*ErrAssocData)(unsafe.Pointer(assocPtr)).Finterp
	var errPtr uintptr

	// Not bothering to save/restore the interp state. Assume that any code
	// that has interp state it needs to keep will make its own
	// Tcl_SaveInterpState call before calling something like Tcl_DoOneEvent()
	// that could lead us here.

	XTcl_Preserve(tls, assocPtr)
	XTcl_Preserve(tls, interp)
	for (*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr != uintptr(0) {
		var code int32
		// var prefixObjc int32 at bp, 4

		// var prefixObjv uintptr at bp+8, 8

		var tempObjv uintptr

		// Note we copy the handler command prefix each pass through, so we do
		// support one handler setting another handler.

		var copyObj uintptr = XTclListObjCopy(tls, uintptr(0), (*ErrAssocData)(unsafe.Pointer(assocPtr)).FcmdPrefix)

		errPtr = (*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr

		XTcl_ListObjGetElements(tls, uintptr(0), copyObj, bp, bp+8)
		tempObjv = XTcl_Alloc(tls, uint32(uint64(*(*int32)(unsafe.Pointer(bp))+2)*uint64(unsafe.Sizeof(uintptr(0)))))
		libc.Xmemcpy(tls, tempObjv, *(*uintptr)(unsafe.Pointer(bp + 8 /* prefixObjv */)), uint64(*(*int32)(unsafe.Pointer(bp)))*uint64(unsafe.Sizeof(uintptr(0))))
		*(*uintptr)(unsafe.Pointer(tempObjv + uintptr(*(*int32)(unsafe.Pointer(bp /* prefixObjc */)))*8)) = (*BgError)(unsafe.Pointer(errPtr)).FerrorMsg
		*(*uintptr)(unsafe.Pointer(tempObjv + uintptr(*(*int32)(unsafe.Pointer(bp))+1)*8)) = (*BgError)(unsafe.Pointer(errPtr)).FreturnOpts
		XTcl_AllowExceptions(tls, interp)
		code = XTcl_EvalObjv(tls, interp, *(*int32)(unsafe.Pointer(bp))+2, tempObjv, TCL_EVAL_GLOBAL)

		// Discard the command and the information about the error report.

		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = copyObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*BgError)(unsafe.Pointer(errPtr)).FerrorMsg
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = (*BgError)(unsafe.Pointer(errPtr)).FreturnOpts
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr = (*BgError)(unsafe.Pointer(errPtr)).FnextPtr
		XTclpFree(tls, errPtr)
		XTclpFree(tls, tempObjv)

		if code == TCL_BREAK {
			// Break means cancel any remaining error reports for this
			// interpreter.

			for (*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr != uintptr(0) {
				errPtr = (*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr
				(*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr = (*BgError)(unsafe.Pointer(errPtr)).FnextPtr
				for ok3 := true; ok3; ok3 = 0 != 0 {
					var _objPtr uintptr = (*BgError)(unsafe.Pointer(errPtr)).FerrorMsg
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				for ok4 := true; ok4; ok4 = 0 != 0 {
					var _objPtr uintptr = (*BgError)(unsafe.Pointer(errPtr)).FreturnOpts
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				XTclpFree(tls, errPtr)
			}
		} else if code == TCL_ERROR && !(XTcl_IsSafe(tls, interp) != 0) {
			var errChannel Tcl_Channel = XTcl_GetStdChannel(tls, int32(1)<<3)

			if errChannel != uintptr(0) {
				var options uintptr = XTcl_GetReturnOptions(tls, interp, code)
				var keyPtr uintptr
				*(*uintptr)(unsafe.Pointer(bp + 16 /* valuePtr */)) = uintptr(0)

				for ok5 := true; ok5; ok5 = 0 != 0 {
					for ok6 := true; ok6; ok6 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						keyPtr = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount = 0
					if int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes, ts+12560, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes + 10)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
					}
					(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr = uintptr(0)
					{
					}
				}
				(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount++
				XTcl_DictObjGet(tls, uintptr(0), options, keyPtr, bp+16)
				for ok7 := true; ok7; ok7 = 0 != 0 {
					var _objPtr uintptr = keyPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}

				XTcl_WriteChars(tls, errChannel,
					ts+27885, -1)
				if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 {
					XTcl_WriteObj(tls, errChannel, *(*uintptr)(unsafe.Pointer(bp + 16 /* valuePtr */)))
				} else {
					XTcl_WriteObj(tls, errChannel, XTcl_GetObjResult(tls, interp))
				}
				XTcl_WriteChars(tls, errChannel, ts+935, 1)
				XTcl_Flush(tls, errChannel)
				for ok8 := true; ok8; ok8 = 0 != 0 {
					var _objPtr uintptr = options
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
		}
	}
	(*ErrAssocData)(unsafe.Pointer(assocPtr)).FlastBgPtr = uintptr(0)
	XTcl_Release(tls, interp)
	XTcl_Release(tls, assocPtr)
}

//----------------------------------------------------------------------
//
// TclDefaultBgErrorHandlerObjCmd --
//
//	This function is invoked to process the "::tcl::Bgerror" Tcl command.
//	It is the default handler command registered with [interp bgerror] for
//	the sake of compatibility with older Tcl releases.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	Depends on what actions the "bgerror" command takes for the errors.
//
//----------------------------------------------------------------------

func XTclDefaultBgErrorHandlerObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclEvent.c:310:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	var keyPtr uintptr
	// var valuePtr uintptr at bp+72, 8

	// var tempObjv [2]uintptr at bp+88, 16

	var result int32
	// var code int32 at bp+84, 4

	// var level int32 at bp+80, 4

	var saved Tcl_InterpState

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+27921)
		return TCL_ERROR
	}

	// Check for a valid return options dictionary.

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			keyPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes, ts+27933, uint64(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes + 6)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = int32(uint64(unsafe.Sizeof([7]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount++
	result = XTcl_DictObjGet(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)), keyPtr, bp+72)
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = keyPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if result != TCL_OK || *(*uintptr)(unsafe.Pointer(bp + 72)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+27940, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+14232, ts+15191, uintptr(0)))
		return TCL_ERROR
	}
	if XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 72)), bp+80) == TCL_ERROR {
		return TCL_ERROR
	}
	for ok3 := true; ok3; ok3 = 0 != 0 {
		for ok4 := true; ok4; ok4 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			keyPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes, ts+27971, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes + 5)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount++
	result = XTcl_DictObjGet(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)), keyPtr, bp+72)
	for ok5 := true; ok5; ok5 = 0 != 0 {
		var _objPtr uintptr = keyPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if result != TCL_OK || *(*uintptr)(unsafe.Pointer(bp + 72)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+27977, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+14232, ts+15191, uintptr(0)))
		return TCL_ERROR
	}
	if XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 72)), bp+84) == TCL_ERROR {
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp + 80)) != 0 {
		// We're handling a TCL_RETURN exception.

		*(*int32)(unsafe.Pointer(bp + 84 /* code */)) = TCL_RETURN
	}
	if *(*int32)(unsafe.Pointer(bp + 84)) == TCL_OK {
		// Somehow we got to exception handling with no exception. (Pass
		// TCL_OK to Tcl_BackgroundException()?) Just return without doing
		// anything.

		return TCL_OK
	}

	// Construct the bgerror command.

	for ok6 := true; ok6; ok6 = 0 != 0 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(bp + 88)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes, ts+28007, uint64(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Fbytes + 7)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).Flength = int32(uint64(unsafe.Sizeof([8]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))).FrefCount++

	// Determine error message argument.  Check the return options in case
	// a non-error exception brought us here.

	switch *(*int32)(unsafe.Pointer(bp + 84 /* code */)) {
	case TCL_ERROR:
		*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)) = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		break
	case TCL_BREAK:
		for ok8 := true; ok8; ok8 = 0 != 0 {
			for ok9 := true; ok9; ok9 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([34]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([34]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Fbytes, ts+8512, uint64(int32(uint64(unsafe.Sizeof([34]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Fbytes + 33)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Flength = int32(uint64(unsafe.Sizeof([34]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		break
	case TCL_CONTINUE:
		for ok10 := true; ok10; ok10 = 0 != 0 {
			for ok11 := true; ok11; ok11 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([37]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([37]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Fbytes, ts+8546, uint64(int32(uint64(unsafe.Sizeof([37]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Fbytes + 36)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).Flength = int32(uint64(unsafe.Sizeof([37]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		break
	default:
		*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)) = XTcl_ObjPrintf(tls, ts+8583, libc.VaList(bp+64, *(*int32)(unsafe.Pointer(bp + 84 /* code */))))
		break
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))).FrefCount++

	if *(*int32)(unsafe.Pointer(bp + 84)) != TCL_ERROR {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))
	}

	for ok12 := true; ok12; ok12 = 0 != 0 {
		for ok13 := true; ok13; ok13 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			keyPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes, ts+12571, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes + 10)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount++
	result = XTcl_DictObjGet(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)), keyPtr, bp+72)
	for ok14 := true; ok14; ok14 = 0 != 0 {
		var _objPtr uintptr = keyPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if result == TCL_OK && *(*uintptr)(unsafe.Pointer(bp + 72)) != uintptr(0) {
		XTcl_SetObjErrorCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 72 /* valuePtr */)))
	}

	for ok15 := true; ok15; ok15 = 0 != 0 {
		for ok16 := true; ok16; ok16 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			keyPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes, ts+12560, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes + 10)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount++
	result = XTcl_DictObjGet(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)), keyPtr, bp+72)
	for ok17 := true; ok17; ok17 = 0 != 0 {
		var _objPtr uintptr = keyPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if result == TCL_OK && *(*uintptr)(unsafe.Pointer(bp + 72)) != uintptr(0) {
		XTcl_AppendObjToErrorInfo(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 72 /* valuePtr */)))
	}

	if *(*int32)(unsafe.Pointer(bp + 84)) == TCL_ERROR {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))
	}

	// Save interpreter state so we can restore it if multiple handler
	// attempts are needed.

	saved = XTcl_SaveInterpState(tls, interp, *(*int32)(unsafe.Pointer(bp + 84 /* code */)))

	// Invoke the bgerror command.

	XTcl_AllowExceptions(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 84 /* code */)) = XTcl_EvalObjv(tls, interp, 2, bp+88, TCL_EVAL_GLOBAL)
	if *(*int32)(unsafe.Pointer(bp + 84)) == TCL_ERROR {
		// If the interpreter is safe, we look for a hidden command named
		// "bgerror" and call that with the error information. Otherwise,
		// simply ignore the error. The rationale is that this could be an
		// error caused by a malicious applet trying to cause an infinite
		// barrage of error messages. The hidden "bgerror" command can be used
		// by a security policy to interpose on such attacks and e.g. kill the
		// applet after a few attempts.

		if XTcl_IsSafe(tls, interp) != 0 {
			XTcl_RestoreInterpState(tls, interp, saved)
			XTclObjInvoke(tls, interp, 2, bp+88, int32(1)<<0)
		} else {
			var errChannel Tcl_Channel = XTcl_GetStdChannel(tls, int32(1)<<3)

			if errChannel != uintptr(0) {
				var resultPtr uintptr = XTcl_GetObjResult(tls, interp)

				(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
				if XTcl_FindCommand(tls, interp, ts+28007, uintptr(0),
					TCL_GLOBAL_ONLY) == uintptr(0) {
					XTcl_RestoreInterpState(tls, interp, saved)
					XTcl_WriteObj(tls, errChannel, XTcl_GetVar2Ex(tls, interp,
						ts+28015, uintptr(0), TCL_GLOBAL_ONLY))
					XTcl_WriteChars(tls, errChannel, ts+935, -1)
				} else {
					XTcl_DiscardInterpState(tls, saved)
					XTcl_WriteChars(tls, errChannel,
						ts+28025, -1)
					XTcl_WriteChars(tls, errChannel, ts+28069, -1)
					XTcl_WriteObj(tls, errChannel, *(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)))
					XTcl_WriteChars(tls, errChannel, ts+935, -1)
					XTcl_WriteChars(tls, errChannel, ts+28090, -1)
					XTcl_WriteObj(tls, errChannel, resultPtr)
					XTcl_WriteChars(tls, errChannel, ts+935, -1)
				}
				for ok18 := true; ok18; ok18 = 0 != 0 {
					var _objPtr uintptr = resultPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				XTcl_Flush(tls, errChannel)
			} else {
				XTcl_DiscardInterpState(tls, saved)
			}
		}
		*(*int32)(unsafe.Pointer(bp + 84 /* code */)) = TCL_OK
	} else {
		XTcl_DiscardInterpState(tls, saved)
	}

	for ok19 := true; ok19; ok19 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 88))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok20 := true; ok20; ok20 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 88 + 1*8))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTcl_ResetResult(tls, interp)
	return *(*int32)(unsafe.Pointer(bp + 84 /* code */))
}

//----------------------------------------------------------------------
//
// TclSetBgErrorHandler --
//
//	This function sets the command prefix to be used to handle background
//	errors in interp.
//
// Results:
//	None.
//
// Side effects:
//	Error handler is registered.
//
//----------------------------------------------------------------------

func XTclSetBgErrorHandler(tls *libc.TLS, interp uintptr, cmdPrefix uintptr) { /* tclEvent.c:514:1: */
	var assocPtr uintptr = XTcl_GetAssocData(tls, interp, ts+27874, uintptr(0))

	if cmdPrefix == uintptr(0) {
		XTcl_Panic(tls, ts+28113, 0)
	}
	if assocPtr == uintptr(0) {
		// First access: initialize.

		assocPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ErrAssocData{})))
		(*ErrAssocData)(unsafe.Pointer(assocPtr)).Finterp = interp
		(*ErrAssocData)(unsafe.Pointer(assocPtr)).FcmdPrefix = uintptr(0)
		(*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr = uintptr(0)
		(*ErrAssocData)(unsafe.Pointer(assocPtr)).FlastBgPtr = uintptr(0)
		XTcl_SetAssocData(tls, interp, ts+27874, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr)
		}{sBgErrorDeleteProc})), assocPtr)
	}
	if (*ErrAssocData)(unsafe.Pointer(assocPtr)).FcmdPrefix != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ErrAssocData)(unsafe.Pointer(assocPtr)).FcmdPrefix
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*ErrAssocData)(unsafe.Pointer(assocPtr)).FcmdPrefix = cmdPrefix
	(*Tcl_Obj)(unsafe.Pointer((*ErrAssocData)(unsafe.Pointer(assocPtr)).FcmdPrefix)).FrefCount++
}

//----------------------------------------------------------------------
//
// TclGetBgErrorHandler --
//
//	This function retrieves the command prefix currently used to handle
//	background errors in interp.
//
// Results:
//	A (Tcl_Obj *) to a list of words (command prefix).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetBgErrorHandler(tls *libc.TLS, interp uintptr) uintptr { /* tclEvent.c:559:9: */
	var assocPtr uintptr = XTcl_GetAssocData(tls, interp, ts+27874, uintptr(0))

	if assocPtr == uintptr(0) {
		var bgerrorObj uintptr

		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				bgerrorObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(bgerrorObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(bgerrorObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(bgerrorObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(bgerrorObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(bgerrorObj)).Fbytes, ts+6597, uint64(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bgerrorObj)).Fbytes + 14)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(bgerrorObj)).Flength = int32(uint64(unsafe.Sizeof([15]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(bgerrorObj)).FtypePtr = uintptr(0)
			{
			}
		}
		XTclSetBgErrorHandler(tls, interp, bgerrorObj)
		assocPtr = XTcl_GetAssocData(tls, interp, ts+27874, uintptr(0))
	}
	return (*ErrAssocData)(unsafe.Pointer(assocPtr)).FcmdPrefix
}

//----------------------------------------------------------------------
//
// BgErrorDeleteProc --
//
//	This function is associated with the "tclBgError" assoc data for an
//	interpreter; it is invoked when the interpreter is deleted in order to
//	free the information assoicated with any pending error reports.
//
// Results:
//	None.
//
// Side effects:
//	Background error information is freed: if there were any pending error
//	reports, they are canceled.
//
//----------------------------------------------------------------------

func sBgErrorDeleteProc(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclEvent.c:595:1: */
	var assocPtr uintptr = clientData
	var errPtr uintptr

	for (*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr != uintptr(0) {
		errPtr = (*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr
		(*ErrAssocData)(unsafe.Pointer(assocPtr)).FfirstBgPtr = (*BgError)(unsafe.Pointer(errPtr)).FnextPtr
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*BgError)(unsafe.Pointer(errPtr)).FerrorMsg
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*BgError)(unsafe.Pointer(errPtr)).FreturnOpts
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		XTclpFree(tls, errPtr)
	}
	XTcl_CancelIdleCall(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sHandleBgErrors})), assocPtr)
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = (*ErrAssocData)(unsafe.Pointer(assocPtr)).FcmdPrefix
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTcl_EventuallyFree(tls, assocPtr, uintptr(3))
}

//----------------------------------------------------------------------
//
// Tcl_CreateExitHandler --
//
//	Arrange for a given function to be invoked just before the application
//	exits.
//
// Results:
//	None.
//
// Side effects:
//	Proc will be invoked with clientData as argument when the application
//	exits.
//
//----------------------------------------------------------------------

func XTcl_CreateExitHandler(tls *libc.TLS, proc uintptr, clientData ClientData) { /* tclEvent.c:633:1: */
	var exitPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ExitHandler{})))

	(*ExitHandler)(unsafe.Pointer(exitPtr)).Fproc = proc
	(*ExitHandler)(unsafe.Pointer(exitPtr)).FclientData = clientData

	(*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr = firstExitPtr
	firstExitPtr = exitPtr

}

//----------------------------------------------------------------------
//
// TclCreateLateExitHandler --
//
//	Arrange for a given function to be invoked after all pre-thread
//	cleanups.
//
// Results:
//	None.
//
// Side effects:
//	Proc will be invoked with clientData as argument when the application
//	exits.
//
//----------------------------------------------------------------------

func XTclCreateLateExitHandler(tls *libc.TLS, proc uintptr, clientData ClientData) { /* tclEvent.c:666:1: */
	var exitPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ExitHandler{})))

	(*ExitHandler)(unsafe.Pointer(exitPtr)).Fproc = proc
	(*ExitHandler)(unsafe.Pointer(exitPtr)).FclientData = clientData

	(*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr = firstLateExitPtr
	firstLateExitPtr = exitPtr

}

//----------------------------------------------------------------------
//
// Tcl_DeleteExitHandler --
//
//	This function cancels an existing exit handler matching proc and
//	clientData, if such a handler exits.
//
// Results:
//	None.
//
// Side effects:
//	If there is an exit handler corresponding to proc and clientData then
//	it is canceled; if no such handler exists then nothing happens.
//
//----------------------------------------------------------------------

func XTcl_DeleteExitHandler(tls *libc.TLS, proc uintptr, clientData ClientData) { /* tclEvent.c:699:1: */
	var exitPtr uintptr
	var prevPtr uintptr

	prevPtr = uintptr(0)
	exitPtr = firstExitPtr
__1:
	if !(exitPtr != uintptr(0)) {
		goto __3
	}
	{
		if (*ExitHandler)(unsafe.Pointer(exitPtr)).Fproc == proc &&
			(*ExitHandler)(unsafe.Pointer(exitPtr)).FclientData == clientData {
			if prevPtr == uintptr(0) {
				firstExitPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
			} else {
				(*ExitHandler)(unsafe.Pointer(prevPtr)).FnextPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
			}
			XTclpFree(tls, exitPtr)
			goto __3
		}

	}
	goto __2
__2:
	prevPtr = exitPtr
	exitPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
	goto __1
	goto __3
__3:
	;

	return
}

//----------------------------------------------------------------------
//
// TclDeleteLateExitHandler --
//
//	This function cancels an existing late exit handler matching proc and
//	clientData, if such a handler exits.
//
// Results:
//	None.
//
// Side effects:
//	If there is a late exit handler corresponding to proc and clientData
//	then it is canceled; if no such handler exists then nothing happens.
//
//----------------------------------------------------------------------

func XTclDeleteLateExitHandler(tls *libc.TLS, proc uintptr, clientData ClientData) { /* tclEvent.c:742:1: */
	var exitPtr uintptr
	var prevPtr uintptr

	prevPtr = uintptr(0)
	exitPtr = firstLateExitPtr
__1:
	if !(exitPtr != uintptr(0)) {
		goto __3
	}
	{
		if (*ExitHandler)(unsafe.Pointer(exitPtr)).Fproc == proc &&
			(*ExitHandler)(unsafe.Pointer(exitPtr)).FclientData == clientData {
			if prevPtr == uintptr(0) {
				firstLateExitPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
			} else {
				(*ExitHandler)(unsafe.Pointer(prevPtr)).FnextPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
			}
			XTclpFree(tls, exitPtr)
			goto __3
		}

	}
	goto __2
__2:
	prevPtr = exitPtr
	exitPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
	goto __1
	goto __3
__3:
	;

	return
}

//----------------------------------------------------------------------
//
// Tcl_CreateThreadExitHandler --
//
//	Arrange for a given function to be invoked just before the current
//	thread exits.
//
// Results:
//	None.
//
// Side effects:
//	Proc will be invoked with clientData as argument when the application
//	exits.
//
//----------------------------------------------------------------------

func XTcl_CreateThreadExitHandler(tls *libc.TLS, proc uintptr, clientData ClientData) { /* tclEvent.c:785:1: */
	var exitPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey1)), int32(unsafe.Sizeof(ThreadSpecificData1{})))

	exitPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ExitHandler{})))
	(*ExitHandler)(unsafe.Pointer(exitPtr)).Fproc = proc
	(*ExitHandler)(unsafe.Pointer(exitPtr)).FclientData = clientData
	(*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr = (*ThreadSpecificData1)(unsafe.Pointer(tsdPtr)).FfirstExitPtr
	(*ThreadSpecificData1)(unsafe.Pointer(tsdPtr)).FfirstExitPtr = exitPtr
}

//----------------------------------------------------------------------
//
// Tcl_DeleteThreadExitHandler --
//
//	This function cancels an existing exit handler matching proc and
//	clientData, if such a handler exits.
//
// Results:
//	None.
//
// Side effects:
//	If there is an exit handler corresponding to proc and clientData then
//	it is canceled; if no such handler exists then nothing happens.
//
//----------------------------------------------------------------------

func XTcl_DeleteThreadExitHandler(tls *libc.TLS, proc uintptr, clientData ClientData) { /* tclEvent.c:818:1: */
	var exitPtr uintptr
	var prevPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey1)), int32(unsafe.Sizeof(ThreadSpecificData1{})))

	prevPtr = uintptr(0)
	exitPtr = (*ThreadSpecificData1)(unsafe.Pointer(tsdPtr)).FfirstExitPtr
__1:
	if !(exitPtr != uintptr(0)) {
		goto __3
	}
	{
		if (*ExitHandler)(unsafe.Pointer(exitPtr)).Fproc == proc &&
			(*ExitHandler)(unsafe.Pointer(exitPtr)).FclientData == clientData {
			if prevPtr == uintptr(0) {
				(*ThreadSpecificData1)(unsafe.Pointer(tsdPtr)).FfirstExitPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
			} else {
				(*ExitHandler)(unsafe.Pointer(prevPtr)).FnextPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
			}
			XTclpFree(tls, exitPtr)
			return
		}

	}
	goto __2
__2:
	prevPtr = exitPtr
	exitPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
	goto __1
	goto __3
__3:
}

//----------------------------------------------------------------------
//
// Tcl_SetExitProc --
//
//	This function sets the application wide exit handler that will be
//	called by Tcl_Exit in place of the C-runtime exit. If the application
//	wide exit handler is NULL, the C-runtime exit will be used instead.
//
// Results:
//	The previously set application wide exit handler.
//
// Side effects:
//	Sets the application wide exit handler to the specified value.
//
//----------------------------------------------------------------------

func XTcl_SetExitProc(tls *libc.TLS, proc uintptr) uintptr { /* tclEvent.c:858:14: */
	var prevExitProc uintptr

	// Swap the old exit proc for the new one, saving the old one for our
	// return value.

	prevExitProc = appExitPtr
	appExitPtr = proc

	return prevExitProc
}

//----------------------------------------------------------------------
//
// InvokeExitHandlers --
//
//      Call the registered exit handlers.
//
// Results:
//	None.
//
// Side effects:
//	The exit handlers are invoked, and the ExitHandler struct is
//      freed.
//
//----------------------------------------------------------------------
func sInvokeExitHandlers(tls *libc.TLS) { /* tclEvent.c:895:1: */
	var exitPtr uintptr

	inExit = 1

	for exitPtr = firstExitPtr; exitPtr != uintptr(0); exitPtr = firstExitPtr {
		// Be careful to remove the handler from the list before invoking its
		// callback. This protects us against double-freeing if the callback
		// should call Tcl_DeleteExitHandler on itself.

		firstExitPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr

		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*ExitHandler)(unsafe.Pointer(exitPtr)).Fproc})).f(tls, (*ExitHandler)(unsafe.Pointer(exitPtr)).FclientData)
		XTclpFree(tls, exitPtr)

	}
	firstExitPtr = uintptr(0)

}

//----------------------------------------------------------------------
//
// Tcl_Exit --
//
//	This function is called to terminate the application.
//
// Results:
//	None.
//
// Side effects:
//	All existing exit handlers are invoked, then the application ends.
//
//----------------------------------------------------------------------

func XTcl_Exit(tls *libc.TLS, status int32) { /* tclEvent.c:937:1: */
	var currentAppExitPtr uintptr

	currentAppExitPtr = appExitPtr

	// Warning: this function SHOULD NOT return, as there is code that depends
	// on Tcl_Exit never returning. In fact, we will Tcl_Panic if anyone
	// returns, so critical is this dependcy.
	//
	// If subsystems are not (yet) initialized, proper Tcl-finalization is
	// impossible, so fallback to system exit, see bug-[f8a33ce3db5d8cc2].

	if currentAppExitPtr != 0 {

		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{currentAppExitPtr})).f(tls, uintptr(Intptr_t(status)))

	} else if subsystemsInitialized != 0 {

		if XTclFullFinalizationRequested(tls) != 0 {

			// Thorough finalization for Valgrind et al.

			XTcl_Finalize(tls)

		} else {

			// Fast and deterministic exit (default behavior)

			sInvokeExitHandlers(tls)

			// Ensure the thread-specific data is initialised as it is used in
			// Tcl_FinalizeThread()

			XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey1)), int32(unsafe.Sizeof(ThreadSpecificData1{})))

			// Now finalize the calling thread only (others are not safely
			// reachable).  Among other things, this triggers a flush of the
			// Tcl_Channels that may have data enqueued.

			XFinalizeThread(tls /* quick */, 1)
		}
	}

	libc.Xexit(tls, status)
	XTcl_Panic(tls, ts+28159, 0)
}

//-------------------------------------------------------------------------
//
// TclInitSubsystems --
//
//	Initialize various subsytems in Tcl. This should be called the first
//	time an interp is created, or before any of the subsystems are used.
//	This function ensures an order for the initialization of subsystems:
//
//	1. that cannot be initialized in lazy order because they are mutually
//	dependent.
//
//	2. so that they can be finalized in a known order w/o causing the
//	subsequent re-initialization of a subsystem in the act of shutting
//	down another.
//
// Results:
//	None.
//
// Side effects:
//	Varied, see the respective initialization routines.
//
//-------------------------------------------------------------------------

func XTclInitSubsystems(tls *libc.TLS) { /* tclEvent.c:1025:1: */
	if inExit != 0 {
		XTcl_Panic(tls, ts+28175, 0)
	}

	if subsystemsInitialized == 0 {
		// Double check inside the mutex. There are definitly calls back into
		// this routine from some of the functions below.

		XTclpInitLock(tls)
		if subsystemsInitialized == 0 {

			// Initialize locks used by the memory allocators before anything
			// interesting happens so we can use the allocators in the
			// implementation of self-initializing locks.

			XTclInitThreadStorage(tls) // Creates hash table for
			// thread local storage

			XTclpInitPlatform(tls)        // Creates signal handler(s)
			XTclInitDoubleConversion(tls) // Initializes constants for
			// converting to/from double.
			XTclInitObjSubsystem(tls) // Register obj types, create
			// mutexes.
			XTclInitIOSubsystem(tls)        // Inits a tsd key (noop).
			XTclInitEncodingSubsystem(tls)  // Process wide encoding init.
			XTclInitNamespaceSubsystem(tls) // Register ns obj type (mutexed).
			subsystemsInitialized = 1
		}
		XTclpInitUnlock(tls)
	}
	XTclInitNotifier(tls)
}

//----------------------------------------------------------------------
//
// Tcl_Finalize --
//
//	Shut down Tcl. First calls registered exit handlers, then carefully
//	shuts down various subsystems.  Should be invoked by user before the
//	Tcl shared library is being unloaded in an embedded context.
//
// Results:
//	None.
//
// Side effects:
//	Varied, see the respective finalization routines.
//
//----------------------------------------------------------------------

func XTcl_Finalize(tls *libc.TLS) { /* tclEvent.c:1089:1: */
	var exitPtr uintptr

	// Invoke exit handlers first.

	sInvokeExitHandlers(tls)

	XTclpInitLock(tls)
	if !(subsystemsInitialized == 0) {
		goto __1
	}
	goto alreadyFinalized
__1:
	;
	subsystemsInitialized = 0

	// Ensure the thread-specific data is initialised as it is used in
	// Tcl_FinalizeThread()

	XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey1)), int32(unsafe.Sizeof(ThreadSpecificData1{})))

	// Clean up after the current thread now, after exit handlers. In
	// particular, the testexithandler command sets up something that writes
	// to standard output, which gets closed. Note that there is no
	// thread-local storage or IO subsystem after this call.

	XTcl_FinalizeThread(tls)

	// Now invoke late (process-wide) exit handlers.

	exitPtr = firstLateExitPtr
__2:
	if !(exitPtr != uintptr(0)) {
		goto __4
	}
	// Be careful to remove the handler from the list before invoking its
	// callback. This protects us against double-freeing if the callback
	// should call Tcl_DeleteLateExitHandler on itself.

	firstLateExitPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr

	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*ExitHandler)(unsafe.Pointer(exitPtr)).Fproc})).f(tls, (*ExitHandler)(unsafe.Pointer(exitPtr)).FclientData)
	XTclpFree(tls, exitPtr)

	goto __3
__3:
	exitPtr = firstLateExitPtr
	goto __2
	goto __4
__4:
	;
	firstLateExitPtr = uintptr(0)

	// Now finalize the Tcl execution environment. Note that this must be done
	// after the exit handlers, because there are order dependencies.

	XTclFinalizeEvaluation(tls)
	XTclFinalizeExecution(tls)
	XTclFinalizeEnvironment(tls)

	// Finalizing the filesystem must come after anything which might
	// conceivably interact with the 'Tcl_FS' API.

	XTclFinalizeFilesystem(tls)

	// Undo all Tcl_ObjType registrations, and reset the global list of free
	// Tcl_Obj's. After this returns, no more Tcl_Obj's should be allocated or
	// freed.
	//
	// Note in particular that TclFinalizeObjects() must follow
	// TclFinalizeFilesystem() because TclFinalizeFilesystem free's the
	// Tcl_Obj that holds the path of the current working directory.

	XTclFinalizeObjects(tls)

	// We must be sure the encoding finalization doesn't need to examine the
	// filesystem in any way. Since it only needs to clean up internal data
	// structures, this is fine.

	XTclFinalizeEncodingSubsystem(tls)

	// Repeat finalization of the thread local storage once more. Although
	// this step is already done by the Tcl_FinalizeThread call above, series
	// of events happening afterwards may re-initialize TSD slots. Those need
	// to be finalized again, otherwise we're leaking memory chunks. Very
	// important to note is that things happening afterwards should not
	// reference anything which may re-initialize TSD's. This includes freeing
	// Tcl_Objs's, among other things.
	//
	// This fixes the Tcl Bug #990552.

	XTclFinalizeThreadData(tls /* quick */, 0)

	// Now we can free constants for conversions to/from double.

	XTclFinalizeDoubleConversion(tls)

	// There have been several bugs in the past that cause exit handlers to be
	// established during Tcl_Finalize processing. Such exit handlers leave
	// malloc'ed memory, and Tcl_FinalizeMemorySubsystem or
	// Tcl_FinalizeThreadAlloc will result in a corrupted heap. The result can
	// be a mysterious crash on process exit. Check here that nobody's done
	// this.

	if !(firstExitPtr != uintptr(0)) {
		goto __5
	}
	XTcl_Panic(tls, ts+28214, 0)
__5:
	;

	XTclFinalizePreserve(tls)

	// Free synchronization objects. There really should only be one thread
	// alive at this moment.

	XTclFinalizeSynchronization(tls)

	// Close down the thread-specific object allocator.

	// We defer unloading of packages until very late to avoid memory access
	// issues. Both exit callbacks and synchronization variables may be stored
	// in packages.
	//
	// Note that TclFinalizeLoad unloads packages in the reverse of the order
	// they were loaded in (i.e. last to be loaded is the first to be
	// unloaded). This can be important for correct unloading when
	// dependencies exist.
	//
	// Once load has been finalized, we will have deleted any temporary copies
	// of shared libraries and can therefore reset the filesystem to its
	// original state.

	XTclFinalizeLoad(tls)
	XTclResetFilesystem(tls)

	// At this point, there should no longer be any ckalloc'ed memory.

	XTclFinalizeMemorySubsystem(tls)

alreadyFinalized:
	XTclFinalizeLock(tls)
}

//----------------------------------------------------------------------
//
// Tcl_FinalizeThread --
//
//	Runs the exit handlers to allow Tcl to clean up its state about a
//	particular thread.
//
// Results:
//	None.
//
// Side effects:
//	Varied, see the respective finalization routines.
//
//----------------------------------------------------------------------

func XTcl_FinalizeThread(tls *libc.TLS) { /* tclEvent.c:1275:1: */
	XFinalizeThread(tls /* quick */, 0)
}

func XFinalizeThread(tls *libc.TLS, quick int32) { /* tclEvent.c:1281:1: */
	var exitPtr uintptr
	var tsdPtr uintptr

	// We use TclThreadDataKeyGet here, rather than Tcl_GetThreadData, because
	// we don't want to initialize the data block if it hasn't been
	// initialized already.

	tsdPtr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey1)))
	if tsdPtr != uintptr(0) {
		(*ThreadSpecificData1)(unsafe.Pointer(tsdPtr)).FinExit = 1

		for exitPtr = (*ThreadSpecificData1)(unsafe.Pointer(tsdPtr)).FfirstExitPtr; exitPtr != uintptr(0); exitPtr = (*ThreadSpecificData1)(unsafe.Pointer(tsdPtr)).FfirstExitPtr {
			// Be careful to remove the handler from the list before invoking
			// its callback. This protects us against double-freeing if the
			// callback should call Tcl_DeleteThreadExitHandler on itself.

			(*ThreadSpecificData1)(unsafe.Pointer(tsdPtr)).FfirstExitPtr = (*ExitHandler)(unsafe.Pointer(exitPtr)).FnextPtr
			(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*ExitHandler)(unsafe.Pointer(exitPtr)).Fproc})).f(tls, (*ExitHandler)(unsafe.Pointer(exitPtr)).FclientData)
			XTclpFree(tls, exitPtr)
		}
		XTclFinalizeIOSubsystem(tls)
		XTclFinalizeNotifier(tls)
		XTclFinalizeAsync(tls)
		XTclFinalizeThreadObjects(tls)
	}

	// Blow away all thread local storage blocks.
	//
	// Note that Tcl API allows creation of threads which do not use any Tcl
	// interp or other Tcl subsytems. Those threads might, however, use thread
	// local storage, so we must unconditionally finalize it.
	//
	// Fix [Bug #571002]
	XTclFinalizeThreadData(tls, quick)
}

//----------------------------------------------------------------------
//
// TclInExit --
//
//	Determines if we are in the middle of exit-time cleanup.
//
// Results:
//	If we are in the middle of exiting, 1, otherwise 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclInExit(tls *libc.TLS) int32 { /* tclEvent.c:1344:1: */
	return inExit
}

//----------------------------------------------------------------------
//
// TclInThreadExit --
//
//	Determines if we are in the middle of thread exit-time cleanup.
//
// Results:
//	If we are in the middle of exiting this thread, 1, otherwise 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclInThreadExit(tls *libc.TLS) int32 { /* tclEvent.c:1366:1: */
	var tsdPtr uintptr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey1)))

	if tsdPtr == uintptr(0) {
		return 0
	}
	return (*ThreadSpecificData1)(unsafe.Pointer(tsdPtr)).FinExit
}

//----------------------------------------------------------------------
//
// Tcl_VwaitObjCmd --
//
//	This function is invoked to process the "vwait" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_VwaitObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclEvent.c:1395:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	// var done int32 at bp+40, 4

	var foundEvent int32
	var nameString uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}
	nameString = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if XTcl_TraceVar2(tls, interp, nameString, uintptr(0),
		TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sVwaitVarProc})), bp+40) != TCL_OK {
		return TCL_ERROR
	}

	*(*int32)(unsafe.Pointer(bp + 40 /* done */)) = 0
	foundEvent = 1
	for !(*(*int32)(unsafe.Pointer(bp + 40)) != 0) && foundEvent != 0 {
		foundEvent = XTcl_DoOneEvent(tls, libc.CplInt32(int32(1)<<1))
		if XTcl_Canceled(tls, interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR {
			break
		}
		if XTcl_LimitExceeded(tls, interp) != 0 {
			XTcl_ResetResult(tls, interp)
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+28261, -1))
			break
		}
	}
	XTcl_UntraceVar2(tls, interp, nameString, uintptr(0),
		TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sVwaitVarProc})), bp+40 /* &done */)

	if !(foundEvent != 0) {
		XTcl_ResetResult(tls, interp)
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+28276,
			libc.VaList(bp, nameString)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+28325, ts+28331, uintptr(0)))
		return TCL_ERROR
	}
	if !(*(*int32)(unsafe.Pointer(bp + 40)) != 0) {
		// The interpreter's result was already set to the right error message
		// prior to exiting the loop above.

		return TCL_ERROR
	}

	// Clear out the interpreter's result, since it may have been set by event
	// handlers.

	XTcl_ResetResult(tls, interp)
	return TCL_OK
}

// ARGSUSED
func sVwaitVarProc(tls *libc.TLS, clientData ClientData, interp uintptr, name1 uintptr, name2 uintptr, flags int32) uintptr { /* tclEvent.c:1458:13: */
	var donePtr uintptr = clientData

	*(*int32)(unsafe.Pointer(donePtr)) = 1
	XTcl_UntraceVar2(tls, interp, name1, uintptr(0), TCL_TRACE_WRITES|TCL_TRACE_UNSETS, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
	}{sVwaitVarProc})), clientData)
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_UpdateObjCmd --
//
//	This function is invoked to process the "update" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_UpdateObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclEvent.c:1493:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var optionIndex int32 at bp, 4

	var flags int32 = 0

	if objc == 1 {
		flags = libc.CplInt32(int32(1)<<1) | int32(1)<<1
	} else if objc == 2 {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&updateOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK {
			return TCL_ERROR
		}
		switch uint32(*(*int32)(unsafe.Pointer(bp /* optionIndex */))) {
		case uint32(0) /* OPT_IDLETASKS */ :
			flags = int32(1)<<2 | int32(1)<<5 | int32(1)<<1
			break
			fallthrough
		default:
			XTcl_Panic(tls, ts+28342, 0)
		}
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+28394)
		return TCL_ERROR
	}

	for XTcl_DoOneEvent(tls, flags) != 0 {
		if XTcl_Canceled(tls, interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR {
			return TCL_ERROR
		}
		if XTcl_LimitExceeded(tls, interp) != 0 {
			XTcl_ResetResult(tls, interp)
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+28261, -1))
			return TCL_ERROR
		}
	}

	// Must clear the interpreter's result because event handlers could have
	// executed commands.

	XTcl_ResetResult(tls, interp)
	return TCL_OK
}

var updateOptions = [2]uintptr{ts + 28406, uintptr(0)} /* tclEvent.c:1501:23 */

//----------------------------------------------------------------------
//
// Tcl_CreateThread --
//
//	This function creates a new thread. This actually belongs to the
//	tclThread.c file but since we use some private data structures local
//	to this file, it is placed here.
//
// Results:
//	TCL_OK if the thread could be created. The thread ID is returned in a
//	parameter.
//
// Side effects:
//	A new thread is created.
//
//----------------------------------------------------------------------

func XTcl_CreateThread(tls *libc.TLS, idPtr uintptr, proc uintptr, clientData ClientData, stackSize int32, flags int32) int32 { /* tclEvent.c:1598:1: */
	return TCL_ERROR
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Static assertion.  Requires support in the compiler.

// Hack to determine whether we may expect IEEE floating point. The hack is
// formally incorrect in that non-IEEE platforms might have the same precision
// and range, but VAX, IBM, and Cray do not; are there any other floating
// point units that we might care about?

// A mask (should be 2**n-1) that is used to work out when the bytecode engine
// should call Tcl_AsyncReady() to see whether there is a signal that needs
// handling.

// Boolean flag indicating whether the Tcl bytecode interpreter has been
// initialized.

var execInitialized int32 = 0 /* tclExecute.c:51:12 */

var cachedInExit int32 = 0 /* tclExecute.c:54:12 */

// Mapping from expression instruction opcodes to strings; used for error
// messages. Note that these entries must match the order and number of the
// expression opcodes (e.g., INST_LOR) in tclCompile.h.
//
// Does not include the string for INST_EXPON (and beyond), as that is
// disjoint for backward-compatability reasons.

var operatorStrings = [22]uintptr{
	ts + 28416, ts + 28419, ts + 6277, ts + 6279, ts + 6275, ts + 6389, ts + 6322, ts + 6379, ts + 6384, ts + 6381, ts + 6386, ts + 6284, ts + 6301,
	ts + 6271, ts + 6357, ts + 6273, ts + 6377, ts + 6304, ts + 6271, ts + 6357, ts + 6259, ts + 6269,
} /* tclExecute.c:79:19 */

// Mapping from Tcl result codes to strings; used for error and debugging
// messages.

// These are used by evalstats to monitor object usage in Tcl.

// Support pre-8.5 bytecodes unless specifically requested otherwise.

// We need to know the tclBuiltinFuncTable to support translation of pre-8.5
// math functions to the namespace-based ::tcl::mathfunc::op in 8.5+.

type BuiltinFunc = struct {
	Fname        uintptr
	FnumArgs     int32
	F__ccgo_pad1 [4]byte
} /* tclExecute.c:122:3 */

// Table describing the built-in math functions. Entries in this table are
// indexed by the values of the INST_CALL_BUILTIN_FUNC instruction's
// operand byte.

var tclBuiltinFuncTable = [27]BuiltinFunc{
	{Fname: ts + 6115, FnumArgs: 1},
	{Fname: ts + 6120, FnumArgs: 1},
	{Fname: ts + 6125, FnumArgs: 1},
	{Fname: ts + 6130, FnumArgs: 2},
	{Fname: ts + 6141, FnumArgs: 1},
	{Fname: ts + 6146, FnumArgs: 1},
	{Fname: ts + 6150, FnumArgs: 1},
	{Fname: ts + 6169, FnumArgs: 1},
	{Fname: ts + 6173, FnumArgs: 1},
	{Fname: ts + 6179, FnumArgs: 2},
	{Fname: ts + 6184, FnumArgs: 2},
	{Fname: ts + 6200, FnumArgs: 1},
	{Fname: ts + 6204, FnumArgs: 1},
	{Fname: ts + 6210, FnumArgs: 2},
	{Fname: ts + 6225, FnumArgs: 1},
	{Fname: ts + 6229, FnumArgs: 1},
	{Fname: ts + 6234, FnumArgs: 1},
	{Fname: ts + 6245, FnumArgs: 1},
	{Fname: ts + 6249, FnumArgs: 1},
	{Fname: ts + 6111, FnumArgs: 1},
	{Fname: ts + 6155, FnumArgs: 1},
	{Fname: ts + 6190, FnumArgs: 1},
	{Fname: ts + 6214},
	{Fname: ts + 6219, FnumArgs: 1},
	{Fname: ts + 6239, FnumArgs: 1},
	{Fname: ts + 6254, FnumArgs: 1},
	{},
} /* tclExecute.c:130:26 */

// NR_TEBC
// Helpers for NR - non-recursive calls to TEBC
// Minimal data required to fully reconstruct the execution state.

type TEBCdata1 = struct {
	FcodePtr    uintptr
	FcatchTop   uintptr
	FauxObjList uintptr
	FcmdFrame   CmdFrame
	Fstack      [1]uintptr
} /* tclExecute.c:169:9 */

// NR_TEBC
// Helpers for NR - non-recursive calls to TEBC
// Minimal data required to fully reconstruct the execution state.

type TEBCdata = TEBCdata1 /* tclExecute.c:179:3 */

// These variable-access macros have to coincide with those in tclVar.c

func sVarHashCreateVar(tls *libc.TLS, tablePtr uintptr, key uintptr, newPtr uintptr) uintptr { /* tclExecute.c:216:19: */
	var hPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr /* &.table */)).FcreateProc})).f(tls, tablePtr /* &.table */, key, newPtr)

	if !(hPtr != 0) {
		return uintptr(0)
	}
	return hPtr - uintptr(int32(uintptr(0)+24))
}

// The new macro for ending an instruction; note that a reasonable C-optimiser
// will resolve all branches at compile time. (result) is always a constant;
// the macro NEXT_INST_F handles constant (nCleanup), NEXT_INST_V is resolved
// at runtime for variable (nCleanup).
//
// ARGUMENTS:
//    pcAdjustment: how much to increment pc
//    nCleanup: how many objects to remove from the stack
//    resultHandling: 0 indicates no object should be pushed on the stack;
//	otherwise, push objResultPtr. If (result < 0), objResultPtr already
//	has the correct reference count.
//
// We use the new compile-time assertions to check that nCleanup is constant
// and within range.

// Verify the stack depth, only when no expansion is in progress

// Macros used to cache often-referenced Tcl evaluation stack information
// in local variables. Note that a DECACHE_STACK_INFO()-CACHE_STACK_INFO()
// pair must surround any call inside TclNRExecuteByteCode (and a few other
// procedures that use this scheme) that could result in a recursive call
// to TclNRExecuteByteCode.

// Macros used to access items on the Tcl evaluation stack. PUSH_OBJECT
// increments the object's ref count since it makes the stack have another
// reference pointing to the object. However, POP_OBJECT does not decrement
// the ref count. This is because the stack may hold the only reference to the
// object, so the object would be destroyed if its ref count were decremented
// before the caller had a chance to, e.g., store it in a variable. It is the
// caller's responsibility to decrement the ref count when it is finished with
// an object.
//
// WARNING! It is essential that objPtr only appear once in the PUSH_OBJECT
// macro. The actual parameter might be an expression with side effects, and
// this ensures that it will be executed only once.

// Macros used to trace instruction execution. The macros TRACE,
// TRACE_WITH_OBJ, and O2S are only used inside TclNRExecuteByteCode. O2S is
// only used in TRACE* calls to get a string from an object.

// DTrace instruction probe macros.

// Macro used in this file to save a function call for common uses of
// TclGetNumberFromObj(). The ANSI C "prototype" is:
//
// MODULE_SCOPE int GetNumberFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
//			ClientData *ptrPtr, int *tPtr);

// Macro used in this file to save a function call for common uses of
// Tcl_GetBooleanFromObj(). The ANSI C "prototype" is:
//
// MODULE_SCOPE int TclGetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
//			int *boolPtr);

// Macro used to make the check for type overflow more mnemonic. This works by
// comparing sign bits; the rest of the word is irrelevant. The ANSI C
// "prototype" (where inttype_t is any integer type) is:
//
// MODULE_SCOPE int Overflowing(inttype_t a, inttype_t b, inttype_t sum);
//
// Check first the condition most likely to fail in usual code (at least for
// usage in [incr]: do the first summand and the sum have != signs?

// Macro for checking whether the type is NaN, used when we're thinking about
// throwing an error for supplying a non-number number.

// Auxiliary tables used to compute powers of small integers.

// Maximum base that, when raised to powers 2, 3, ... 8, fits in a 32-bit
// signed integer.

var sMaxBase32 = [7]int32{46340, 1290, 215, 73, 35, 21, 14}                                     /* tclExecute.c:596:19 */
var sMaxBase32Size Size_t = uint64(unsafe.Sizeof(sMaxBase32)) / uint64(unsafe.Sizeof(int32(0))) /* tclExecute.c:597:21 */

// Table giving 3, 4, ..., 11, raised to the powers 9, 10, ..., as far as they
// fit in a 32-bit signed integer. Exp32Index[i] gives the starting index of
// powers of i+3; Exp32Value[i] gives the corresponding powers.

var sExp32Index = [9]uint16{
	uint16(0), uint16(11), uint16(18), uint16(23), uint16(26), uint16(29), uint16(31), uint16(32), uint16(33),
}                                                                                                  /* tclExecute.c:605:29 */
var sExp32IndexSize Size_t = uint64(unsafe.Sizeof(sExp32Index)) / uint64(unsafe.Sizeof(uint16(0))) /* tclExecute.c:608:21 */
var sExp32Value = [33]int32{
	19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721,
	129140163, 387420489, 1162261467, 262144, 1048576, 4194304,
	16777216, 67108864, 268435456, 1073741824, 1953125, 9765625,
	48828125, 244140625, 1220703125, 10077696, 60466176, 362797056,
	40353607, 282475249, 1977326743, 134217728, 1073741824, 387420489,
	1000000000,
}                                                                                                 /* tclExecute.c:610:19 */
var sExp32ValueSize Size_t = uint64(unsafe.Sizeof(sExp32Value)) / uint64(unsafe.Sizeof(int32(0))) /* tclExecute.c:618:21 */

// Maximum base that, when raised to powers 2, 3, ..., 16, fits in a
// Tcl_WideInt.

var sMaxBase64 = [15]Tcl_WideInt{
	int64(46340)*int64(65536) + int64(62259),
	int64(2097151), int64(55108), int64(6208),
	int64(1448), int64(511), int64(234), int64(127),
	int64(78), int64(52), int64(38), int64(28),
	int64(22), int64(18), int64(15),
}                                                                                                     /* tclExecute.c:628:26 */
var sMaxBase64Size Size_t = uint64(unsafe.Sizeof(sMaxBase64)) / uint64(unsafe.Sizeof(Tcl_WideInt(0))) /* tclExecute.c:635:21 */

// Table giving 3, 4, ..., 13 raised to powers greater than 16 when the
// results fit in a 64-bit signed integer.

var sExp64Index = [12]uint16{
	uint16(0), uint16(23), uint16(38), uint16(49), uint16(57), uint16(63), uint16(67), uint16(70), uint16(72), uint16(74), uint16(75), uint16(76),
}                                                                                                  /* tclExecute.c:642:29 */
var sExp64IndexSize Size_t = uint64(unsafe.Sizeof(sExp64Index)) / uint64(unsafe.Sizeof(uint16(0))) /* tclExecute.c:645:21 */
var sExp64Value = [76]Tcl_WideInt{
	int64(243) * int64(243) * int64(243) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3),
	int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(243) * int64(3) * int64(3) * int64(3) * int64(3),
	int64(1024) * int64(1024) * int64(1024) * int64(4) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(4) * int64(4) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(4) * int64(4) * int64(4) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(1024),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(4) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(4) * int64(4) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(4) * int64(4) * int64(4) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(1024),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(4) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(4) * int64(4) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(4) * int64(4) * int64(4) * int64(4),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(1024),
	int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(1024) * int64(4),
	int64(3125) * int64(3125) * int64(3125) * int64(5) * int64(5),
	int64(3125) * int64(3125) * int64(3125) * int64(5) * int64(5) * int64(5),
	int64(3125) * int64(3125) * int64(3125) * int64(5) * int64(5) * int64(5) * int64(5),
	int64(3125) * int64(3125) * int64(3125) * int64(3125),
	int64(3125) * int64(3125) * int64(3125) * int64(3125) * int64(5),
	int64(3125) * int64(3125) * int64(3125) * int64(3125) * int64(5) * int64(5),
	int64(3125) * int64(3125) * int64(3125) * int64(3125) * int64(5) * int64(5) * int64(5),
	int64(3125) * int64(3125) * int64(3125) * int64(3125) * int64(5) * int64(5) * int64(5) * int64(5),
	int64(3125) * int64(3125) * int64(3125) * int64(3125) * int64(3125),
	int64(3125) * int64(3125) * int64(3125) * int64(3125) * int64(3125) * int64(5),
	int64(3125) * int64(3125) * int64(3125) * int64(3125) * int64(3125) * int64(5) * int64(5),
	int64(7776) * int64(7776) * int64(7776) * int64(6) * int64(6),
	int64(7776) * int64(7776) * int64(7776) * int64(6) * int64(6) * int64(6),
	int64(7776) * int64(7776) * int64(7776) * int64(6) * int64(6) * int64(6) * int64(6),
	int64(7776) * int64(7776) * int64(7776) * int64(7776),
	int64(7776) * int64(7776) * int64(7776) * int64(7776) * int64(6),
	int64(7776) * int64(7776) * int64(7776) * int64(7776) * int64(6) * int64(6),
	int64(7776) * int64(7776) * int64(7776) * int64(7776) * int64(6) * int64(6) * int64(6),
	int64(7776) * int64(7776) * int64(7776) * int64(7776) * int64(6) * int64(6) * int64(6) * int64(6),
	int64(16807) * int64(16807) * int64(16807) * int64(7) * int64(7),
	int64(16807) * int64(16807) * int64(16807) * int64(7) * int64(7) * int64(7),
	int64(16807) * int64(16807) * int64(16807) * int64(7) * int64(7) * int64(7) * int64(7),
	int64(16807) * int64(16807) * int64(16807) * int64(16807),
	int64(16807) * int64(16807) * int64(16807) * int64(16807) * int64(7),
	int64(16807) * int64(16807) * int64(16807) * int64(16807) * int64(7) * int64(7),
	int64(32768) * int64(32768) * int64(32768) * int64(8) * int64(8),
	int64(32768) * int64(32768) * int64(32768) * int64(8) * int64(8) * int64(8),
	int64(32768) * int64(32768) * int64(32768) * int64(8) * int64(8) * int64(8) * int64(8),
	int64(32768) * int64(32768) * int64(32768) * int64(32768),
	int64(59049) * int64(59049) * int64(59049) * int64(9) * int64(9),
	int64(59049) * int64(59049) * int64(59049) * int64(9) * int64(9) * int64(9),
	int64(59049) * int64(59049) * int64(59049) * int64(9) * int64(9) * int64(9) * int64(9),
	int64(100000) * int64(100000) * int64(100000) * int64(10) * int64(10),
	int64(100000) * int64(100000) * int64(100000) * int64(10) * int64(10) * int64(10),
	int64(161051) * int64(161051) * int64(161051) * int64(11) * int64(11),
	int64(161051) * int64(161051) * int64(161051) * int64(11) * int64(11) * int64(11),
	int64(248832) * int64(248832) * int64(248832) * int64(12) * int64(12),
	int64(371293) * int64(371293) * int64(371293) * int64(13) * int64(13),
}                                                                                                       /* tclExecute.c:647:26 */
var sExp64ValueSize Size_t = uint64(unsafe.Sizeof(sExp64Value)) / uint64(unsafe.Sizeof(Tcl_WideInt(0))) /* tclExecute.c:725:21 */

// The structure below defines a bytecode Tcl object type to hold the
// compiled bytecode for Tcl expressions.

var exprCodeType = Tcl_ObjType{
	Fname:           ts + 28422,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // setFromAnyProc
} /* tclExecute.c:791:26 */

// Custom object type only used in this file; values of its type should never
// be seen by user scripts.

var dictIteratorType = Tcl_ObjType{
	Fname:           ts + 28431,
	FfreeIntRepProc: 0,
} /* tclExecute.c:804:26 */

//----------------------------------------------------------------------
//
// ReleaseDictIterator --
//
//	This takes apart a dictionary iterator that is stored in the given Tcl
//	object.
//
// Results:
//	None.
//
// Side effects:
//	Deallocates memory, marks the object as being untyped.
//
//----------------------------------------------------------------------

func sReleaseDictIterator(tls *libc.TLS, objPtr uintptr) { /* tclExecute.c:828:1: */
	var searchPtr uintptr
	var dictPtr uintptr

	// First kill the search, and then release the reference to the dictionary
	// that we were holding.

	searchPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	XTcl_DictObjDone(tls, searchPtr)
	XTclpFree(tls, searchPtr)

	dictPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */))
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = dictPtr
			}
		} else {
			XTclFreeObj(tls, dictPtr)
		}
	}

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// InitByteCodeExecution --
//
//	This procedure is called once to initialize the Tcl bytecode
//	interpreter.
//
// Results:
//	None.
//
// Side effects:
//	This procedure initializes the array of instruction names. If
//	compiling with the TCL_COMPILE_STATS flag, it initializes the array
//	that counts the executions of each instruction and it creates the
//	"evalstats" command. It also establishes the link between the Tcl
//	"tcl_traceExec" and C "tclTraceExec" variables.
//
//----------------------------------------------------------------------

func sInitByteCodeExecution(tls *libc.TLS, interp uintptr) { /* tclExecute.c:871:1: */
}

//----------------------------------------------------------------------
//
// TclCreateExecEnv --
//
//	This procedure creates a new execution environment for Tcl bytecode
//	execution. An ExecEnv points to a Tcl evaluation stack. An ExecEnv is
//	typically created once for each Tcl interpreter (Interp structure) and
//	recursively passed to TclNRExecuteByteCode to execute ByteCode sequences
//	for nested commands.
//
// Results:
//	A newly allocated ExecEnv is returned. This points to an empty
//	evaluation stack of the standard initial size.
//
// Side effects:
//	The bytecode interpreter is also initialized here, as this procedure
//	will be called before any call to TclNRExecuteByteCode.
//
//----------------------------------------------------------------------

func XTclCreateExecEnv(tls *libc.TLS, interp uintptr, size int32) uintptr { /* tclExecute.c:909:9: */
	var eePtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ExecEnv{})))
	var esPtr uintptr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+40))+uint64(size)*uint64(unsafe.Sizeof(uintptr(0)))))

	(*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr = esPtr
	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(eePtr + 8)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).Fbytes = uintptr(0)
		*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)) + 32)) = libc.Bool32(0 != 0)
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).FrefCount++
	for ok2 := true; ok2; ok2 = 0 != 0 {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).Fbytes = uintptr(0)
		*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)) + 32)) = libc.Bool32(1 != 0)
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).FrefCount++
	(*ExecEnv)(unsafe.Pointer(eePtr)).Finterp = interp
	(*ExecEnv)(unsafe.Pointer(eePtr)).FcallbackPtr = uintptr(0)
	(*ExecEnv)(unsafe.Pointer(eePtr)).FcorPtr = uintptr(0)
	(*ExecEnv)(unsafe.Pointer(eePtr)).Frewind = 0

	(*ExecStack)(unsafe.Pointer(esPtr)).FprevPtr = uintptr(0)
	(*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr = uintptr(0)
	(*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr = uintptr(0)
	(*ExecStack)(unsafe.Pointer(esPtr)).FendPtr = esPtr + 40 + uintptr(size-1)*8
	(*ExecStack)(unsafe.Pointer(esPtr)).FtosPtr = esPtr + 40 - uintptr(1)*8

	if !(execInitialized != 0) {
		sInitByteCodeExecution(tls, interp)
		execInitialized = 1
	}

	return eePtr
}

//----------------------------------------------------------------------
//
// TclDeleteExecEnv --
//
//	Frees the storage for an ExecEnv.
//
// Results:
//	None.
//
// Side effects:
//	Storage for an ExecEnv and its contained storage (e.g. the evaluation
//	stack) is freed.
//
//----------------------------------------------------------------------

func sDeleteExecStack(tls *libc.TLS, esPtr uintptr) { /* tclExecute.c:964:1: */
	if (*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr != 0 && !(cachedInExit != 0) {
		XTcl_Panic(tls, ts+28444, 0)
	}

	if (*ExecStack)(unsafe.Pointer(esPtr)).FprevPtr != 0 {
		(*ExecStack1)(unsafe.Pointer((*ExecStack)(unsafe.Pointer(esPtr)).FprevPtr)).FnextPtr = (*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr
	}
	if (*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr != 0 {
		(*ExecStack1)(unsafe.Pointer((*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr)).FprevPtr = (*ExecStack)(unsafe.Pointer(esPtr)).FprevPtr
	}
	XTclpFree(tls, esPtr)
}

func XTclDeleteExecEnv(tls *libc.TLS, eePtr uintptr) { /* tclExecute.c:981:1: */
	var esPtr uintptr = (*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr
	var tmpPtr uintptr

	cachedInExit = XTclInExit(tls)

	// Delete all stacks in this exec env.

	for (*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr != 0 {
		esPtr = (*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr
	}
	for esPtr != 0 {
		tmpPtr = esPtr
		esPtr = (*ExecStack)(unsafe.Pointer(tmpPtr)).FprevPtr
		sDeleteExecStack(tls, tmpPtr)
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)))).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8)) + 32)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(eePtr + 8))
			}
		} else {
			XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(eePtr + 8)))
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))).Flength = -1
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)) + 32)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8))
			}
		} else {
			XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(eePtr + 8 + 1*8)))
		}
	}

	if (*ExecEnv)(unsafe.Pointer(eePtr)).FcallbackPtr != 0 && !(cachedInExit != 0) {
		XTcl_Panic(tls, ts+28487, 0)
	}
	if (*ExecEnv)(unsafe.Pointer(eePtr)).FcorPtr != 0 && !(cachedInExit != 0) {
		XTcl_Panic(tls, ts+28533, 0)
	}
	XTclpFree(tls, eePtr)
}

//----------------------------------------------------------------------
//
// TclFinalizeExecution --
//
//	Finalizes the execution environment setup so that it can be later
//	reinitialized.
//
// Results:
//	None.
//
// Side effects:
//	After this call, the next time TclCreateExecEnv will be called it will
//	call InitByteCodeExecution.
//
//----------------------------------------------------------------------

func XTclFinalizeExecution(tls *libc.TLS) { /* tclExecute.c:1031:1: */

	execInitialized = 0

}

// Auxiliary code to insure that GrowEvaluationStack always returns correctly
// aligned memory.
//
// WALLOCALIGN represents the alignment reqs in words, just as TCL_ALLOCALIGN
// represents the reqs in bytes. This assumes that TCL_ALLOCALIGN is a
// multiple of the wordsize 'sizeof(Tcl_Obj *)'.

// wordSkip computes how many words have to be skipped until the next aligned
// word. Note that we are only interested in the low order bits of ptr, so
// that any possible information loss in PTR2INT is of no consequence.

func wordSkip(tls *libc.TLS, ptr uintptr) int32 { /* tclExecute.c:1057:1: */
	var mask int32 = int32(uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) - uint64(1))
	var base int32 = int32(ptr) & mask
	return int32((uint64(2)*uint64(unsafe.Sizeof(uintptr(0))) - uint64(base)) / uint64(unsafe.Sizeof(uintptr(0))))
}

// Given a marker, compute where the following aligned memory starts.

//----------------------------------------------------------------------
//
// GrowEvaluationStack --
//
//	This procedure grows a Tcl evaluation stack stored in an ExecEnv,
//	copying over the words since the last mark if so requested. A mark is
//	set at the beginning of the new area when no copying is requested.
//
// Results:
//	Returns a pointer to the first usable word in the (possibly) grown
//	stack.
//
// Side effects:
//	The size of the evaluation stack may be grown, a marker is set
//
//----------------------------------------------------------------------

func sGrowEvaluationStack(tls *libc.TLS, eePtr uintptr, growth int32, move int32) uintptr { /* tclExecute.c:1091:16: */
	var esPtr uintptr
	var oldPtr uintptr
	var newBytes int32
	var newElems int32
	var currElems int32
	var needed int32
	var markerPtr uintptr
	var memStart uintptr
	var moveWords int32
	var tmpMarkerPtr uintptr
	var offset int32
	esPtr = (*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr
	oldPtr = uintptr(0)
	needed = int32(int64(growth) - (int64((*ExecStack)(unsafe.Pointer(esPtr)).FendPtr)-int64((*ExecStack)(unsafe.Pointer(esPtr)).FtosPtr))/8)
	markerPtr = (*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr
	moveWords = 0

	if !(move != 0) {
		goto __1
	}
	if !!(markerPtr != 0) {
		goto __3
	}
	XTcl_Panic(tls, ts+28574, 0)
__3:
	;
	if !(needed <= 0) {
		goto __4
	}
	return markerPtr + uintptr(wordSkip(tls, markerPtr))*8
__4:
	;
	goto __2
__1:
	tmpMarkerPtr = (*ExecStack)(unsafe.Pointer(esPtr)).FtosPtr + uintptr(1)*8
	offset = wordSkip(tls, tmpMarkerPtr)

	if !(needed+offset < 0) {
		goto __5
	}
	// Put a marker pointing to the previous marker in this stack, and
	// store it in esPtr as the current marker. Return a pointer to
	// the start of aligned memory.

	(*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr = tmpMarkerPtr
	memStart = tmpMarkerPtr + uintptr(offset)*8
	(*ExecStack)(unsafe.Pointer(esPtr)).FtosPtr = memStart - uintptr(1)*8
	*(*uintptr)(unsafe.Pointer((*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr)) = markerPtr
	return memStart
__5:
	;
__2:
	;

	// Reset move to hold the number of words to be moved to new stack (if
	// any) and growth to hold the complete stack requirements: add one for
	// the marker, (WALLOCALIGN-1) for the maximal possible offset.

	if !(move != 0) {
		goto __6
	}
	moveWords = int32((int64((*ExecStack)(unsafe.Pointer(esPtr)).FtosPtr)-int64(markerPtr+uintptr(wordSkip(tls, markerPtr))*8))/8 + int64(1))
__6:
	;
	needed = int32(uint64(growth+moveWords) + uint64(2)*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(uintptr(0))))

	// Check if there is enough room in the next stack (if there is one, it
	// should be both empty and the last one!)

	if !((*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr != 0) {
		goto __7
	}
	oldPtr = esPtr
	esPtr = (*ExecStack)(unsafe.Pointer(oldPtr)).FnextPtr
	currElems = int32((int64((*ExecStack)(unsafe.Pointer(esPtr)).FendPtr) - int64(esPtr+40-uintptr(1)*8)) / 8)
	if !((*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr != 0 || (*ExecStack)(unsafe.Pointer(esPtr)).FtosPtr != esPtr+40-uintptr(1)*8) {
		goto __9
	}
	XTcl_Panic(tls, ts+28617, 0)
__9:
	;
	if !((*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr != 0) {
		goto __10
	}
	XTcl_Panic(tls, ts+28654, 0)
__10:
	;
	if !(needed <= currElems) {
		goto __11
	}
	goto newStackReady
__11:
	;
	sDeleteExecStack(tls, esPtr)
	esPtr = oldPtr
	goto __8
__7:
	currElems = int32((int64((*ExecStack)(unsafe.Pointer(esPtr)).FendPtr) - int64(esPtr+40-uintptr(1)*8)) / 8)
__8:
	;

	// We need to allocate a new stack! It needs to store 'growth' words,
	// including the elements to be copied over and the new marker.

	newElems = 2 * currElems
__12:
	if !(needed > newElems) {
		goto __13
	}
	newElems = newElems * 2
	goto __12
__13:
	;

	newBytes = int32(uint64(int32(uintptr(0)+40)) + uint64(newElems)*uint64(unsafe.Sizeof(uintptr(0))))

	oldPtr = esPtr
	esPtr = XTcl_Alloc(tls, uint32(newBytes))

	(*ExecStack)(unsafe.Pointer(oldPtr)).FnextPtr = esPtr
	(*ExecStack)(unsafe.Pointer(esPtr)).FprevPtr = oldPtr
	(*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr = uintptr(0)
	(*ExecStack)(unsafe.Pointer(esPtr)).FendPtr = esPtr + 40 + uintptr(newElems-1)*8

newStackReady:
	(*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr = esPtr

	// Store a NULL marker at the beginning of the stack, to indicate that
	// this is the first marker in this stack and that rewinding to here
	// should actually be a return to the previous stack.

	*(*uintptr)(unsafe.Pointer(esPtr + 40)) = uintptr(0)
	(*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr = esPtr + 40
	memStart = (*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr + uintptr(wordSkip(tls, (*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr))*8
	(*ExecStack)(unsafe.Pointer(esPtr)).FtosPtr = memStart - uintptr(1)*8

	if !(move != 0) {
		goto __14
	}
	libc.Xmemcpy(tls, memStart, markerPtr+uintptr(wordSkip(tls, markerPtr))*8, uint64(moveWords)*uint64(unsafe.Sizeof(uintptr(0))))
	*(*uintptr)(unsafe.Pointer(esPtr + 32)) += uintptr(moveWords) * 8
	(*ExecStack)(unsafe.Pointer(oldPtr)).FmarkerPtr = *(*uintptr)(unsafe.Pointer(markerPtr))
	(*ExecStack)(unsafe.Pointer(oldPtr)).FtosPtr = markerPtr - uintptr(1)*8
__14:
	;

	// Free the old stack if it is now unused.

	if !!(int32((*ExecStack)(unsafe.Pointer(oldPtr)).FmarkerPtr) != 0) {
		goto __15
	}
	sDeleteExecStack(tls, oldPtr)
__15:
	;

	return memStart
}

//--------------------------------------------------------------
//
// TclStackAlloc, TclStackRealloc, TclStackFree --
//
//	Allocate memory from the execution stack; it has to be returned later
//	with a call to TclStackFree.
//
// Results:
//	A pointer to the first byte allocated, or panics if the allocation did
//	not succeed.
//
// Side effects:
//	The execution stack may be grown.
//
//--------------------------------------------------------------

func sStackAllocWords(tls *libc.TLS, interp uintptr, numWords int32) uintptr { /* tclExecute.c:1243:16: */
	// Note that GrowEvaluationStack sets a marker in the stack. This marker
	// is read when rewinding, e.g., by TclStackFree.

	var iPtr uintptr = interp
	var eePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr
	var resPtr uintptr = sGrowEvaluationStack(tls, eePtr, numWords, 0)

	*(*uintptr)(unsafe.Pointer((*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr + 32)) += uintptr(numWords) * 8
	return resPtr
}

func sStackReallocWords(tls *libc.TLS, interp uintptr, numWords int32) uintptr { /* tclExecute.c:1261:16: */
	var iPtr uintptr = interp
	var eePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr
	var resPtr uintptr = sGrowEvaluationStack(tls, eePtr, numWords, 1)

	*(*uintptr)(unsafe.Pointer((*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr + 32)) += uintptr(numWords) * 8
	return resPtr
}

func XTclStackFree(tls *libc.TLS, interp uintptr, freePtr uintptr) { /* tclExecute.c:1275:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var iPtr uintptr = interp
	var eePtr uintptr
	var esPtr uintptr
	var markerPtr uintptr
	var marker uintptr

	if iPtr == uintptr(0) || (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr == uintptr(0) {
		XTclpFree(tls, freePtr)
		return
	}

	// Rewind the stack to the previous marker position. The current marker,
	// as set in the last call to GrowEvaluationStack, contains a pointer to
	// the previous marker.

	eePtr = (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr
	esPtr = (*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr
	markerPtr = (*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr
	marker = *(*uintptr)(unsafe.Pointer(markerPtr))

	if freePtr != uintptr(0) && markerPtr+uintptr(wordSkip(tls, markerPtr))*8 != freePtr {
		XTcl_Panic(tls, ts+28693,
			libc.VaList(bp, freePtr, markerPtr+uintptr(wordSkip(tls, markerPtr))*8))
	}

	(*ExecStack)(unsafe.Pointer(esPtr)).FtosPtr = markerPtr - uintptr(1)*8
	(*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr = marker
	if marker != 0 {
		return
	}

	// Return to previous active stack. Note that repeated expansions or
	// reallocs could have generated several unused intervening stacks: free
	// them too.

	for (*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr != 0 {
		esPtr = (*ExecStack)(unsafe.Pointer(esPtr)).FnextPtr
	}
	(*ExecStack)(unsafe.Pointer(esPtr)).FtosPtr = esPtr + 40 - uintptr(1)*8
	for (*ExecStack)(unsafe.Pointer(esPtr)).FprevPtr != 0 {
		var tmpPtr uintptr = (*ExecStack)(unsafe.Pointer(esPtr)).FprevPtr
		if (*ExecStack)(unsafe.Pointer(tmpPtr)).FtosPtr == tmpPtr+40-uintptr(1)*8 {
			sDeleteExecStack(tls, tmpPtr)
		} else {
			break
		}
	}
	if (*ExecStack)(unsafe.Pointer(esPtr)).FprevPtr != 0 {
		(*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr = (*ExecStack)(unsafe.Pointer(esPtr)).FprevPtr
	} else {
		(*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr = esPtr
	}
}

func XTclStackAlloc(tls *libc.TLS, interp uintptr, numBytes int32) uintptr { /* tclExecute.c:1340:6: */
	var iPtr uintptr = interp
	var numWords int32

	if iPtr == uintptr(0) || (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr == uintptr(0) {
		return XTcl_Alloc(tls, uint32(numBytes))
	}
	numWords = int32((uint64(numBytes) + (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1))) / uint64(unsafe.Sizeof(uintptr(0))))
	return sStackAllocWords(tls, interp, numWords)
}

func XTclStackRealloc(tls *libc.TLS, interp uintptr, ptr uintptr, numBytes int32) uintptr { /* tclExecute.c:1355:6: */
	var iPtr uintptr = interp
	var eePtr uintptr
	var esPtr uintptr
	var markerPtr uintptr
	var numWords int32

	if iPtr == uintptr(0) || (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr == uintptr(0) {
		return XTcl_Realloc(tls, ptr, uint32(numBytes))
	}

	eePtr = (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr
	esPtr = (*ExecEnv)(unsafe.Pointer(eePtr)).FexecStackPtr
	markerPtr = (*ExecStack)(unsafe.Pointer(esPtr)).FmarkerPtr

	if markerPtr+uintptr(wordSkip(tls, markerPtr))*8 != ptr {
		XTcl_Panic(tls, ts+28759, 0)
	}

	numWords = int32((uint64(numBytes) + (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1))) / uint64(unsafe.Sizeof(uintptr(0))))
	return sStackReallocWords(tls, interp, numWords)
}

//--------------------------------------------------------------
//
// Tcl_ExprObj --
//
//	Evaluate an expression in a Tcl_Obj.
//
// Results:
//	A standard Tcl object result. If the result is other than TCL_OK, then
//	the interpreter's result contains an error message. If the result is
//	TCL_OK, then a pointer to the expression's result value object is
//	stored in resultPtrPtr. In that case, the object's ref count is
//	incremented to reflect the reference returned to the caller; the
//	caller is then responsible for the resulting object and must, for
//	example, decrement the ref count when it is finished with the object.
//
// Side effects:
//	Any side effects caused by subcommands in the expression, if any. The
//	interpreter result is not modified unless there is an error.
//
//--------------------------------------------------------------

func XTcl_ExprObj(tls *libc.TLS, interp uintptr, objPtr uintptr, resultPtrPtr uintptr) int32 { /* tclExecute.c:1407:1: */
	var rootPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	var resultPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)
	{
	}

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _callbackPtr uintptr
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sCopyCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = resultPtrPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = resultPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	XTcl_NRExprObj(tls, interp, objPtr, resultPtr)
	return XTclNRRunCallbacks(tls, interp, TCL_OK, rootPtr)
}

func sCopyCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclExecute.c:1426:1: */
	var resultPtrPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var resultPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	if result == TCL_OK {
		*(*uintptr)(unsafe.Pointer(resultPtrPtr)) = resultPtr
		(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	} else {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = resultPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return result
}

//--------------------------------------------------------------
//
// Tcl_NRExprObj --
//
//	Request evaluation of the expression in a Tcl_Obj by the NR stack.
//
// Results:
//	Returns TCL_OK.
//
// Side effects:
//	Compiles objPtr as a Tcl expression and places callbacks on the
//	NR stack to execute the bytecode and store the result in resultPtr.
//	If bytecode execution raises an exception, nothing is written
//	to resultPtr, and the exceptional return code flows up the NR
//	stack.  If the exception is TCL_ERROR, an error message is left
//	in the interp result and the interp's return options dictionary
//	holds additional error information too.  Execution of the bytecode
//	may have other side effects, depending on the expression.
//
//--------------------------------------------------------------

func XTcl_NRExprObj(tls *libc.TLS, interp uintptr, objPtr uintptr, resultPtr uintptr) int32 { /* tclExecute.c:1467:1: */
	var codePtr uintptr
	var state Tcl_InterpState = XTcl_SaveInterpState(tls, interp, TCL_OK)

	XTcl_ResetResult(tls, interp)
	codePtr = sCompileExprObj(tls, interp, objPtr)

	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sExprObjCallback})), state, resultPtr,
		uintptr(0), uintptr(0))
	return XTclNRExecuteByteCode(tls, interp, codePtr)
}

func sExprObjCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclExecute.c:1484:1: */
	var state Tcl_InterpState = *(*ClientData)(unsafe.Pointer(data))
	var resultPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	if result == TCL_OK {
		XTclSetDuplicateObj(tls, resultPtr, XTcl_GetObjResult(tls, interp))
		XTcl_RestoreInterpState(tls, interp, state)
	} else {
		XTcl_DiscardInterpState(tls, state)
	}
	return result
}

//----------------------------------------------------------------------
//
// CompileExprObj --
//	Compile a Tcl expression value into ByteCode.
//
// Results:
//	A (ByteCode *) is returned pointing to the resulting ByteCode.
//	The caller must manage its refCount and arrange for a call to
//	TclCleanupByteCode() when the last reference disappears.
//
// Side effects:
//	The Tcl_ObjType of objPtr is changed to the "bytecode" type,
//	and the ByteCode is kept in the internal rep (along with context
//	data for checking validity) for faster operations the next time
//	CompileExprObj is called on the same value.
//
//----------------------------------------------------------------------

func sCompileExprObj(tls *libc.TLS, interp uintptr, objPtr uintptr) uintptr { /* tclExecute.c:1521:17: */
	bp := tls.Alloc(3592)
	defer tls.Free(3592)

	var iPtr uintptr = interp
	// var compEnv CompileEnv at bp+8, 3584
	// Compilation environment structure allocated
	// in frame.
	var codePtr uintptr = uintptr(0)
	// Tcl Internal type of bytecode. Initialized
	// to avoid compiler warning.

	// Get the expression ByteCode from the object. If it exists, make sure it
	// is valid in the current context.
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&exprCodeType)) {
		var namespacePtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr

		codePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		if *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle)) != iPtr ||
			(*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch != (*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch ||
			(*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr != namespacePtr ||
			(*ByteCode)(unsafe.Pointer(codePtr)).FnsEpoch != (*Namespace)(unsafe.Pointer(namespacePtr)).FresolverEpoch ||
			(*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr != (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr {
			sFreeExprCodeInternalRep(tls, objPtr)
		}
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&exprCodeType)) {
		// TIP #280: No invoker (yet) - Expression compilation.

		// var length int32 at bp, 4

		var string uintptr = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, objPtr, bp)
		}()

		XTclInitCompileEnv(tls, interp, bp+8, string, *(*int32)(unsafe.Pointer(bp /* length */)), uintptr(0), 0)
		XTclCompileExpr(tls, interp, string, *(*int32)(unsafe.Pointer(bp /* length */)), bp+8, 0)

		// Successful compilation. If the expression yielded no instructions,
		// push an zero object as the expression's result.

		if (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext == (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeStart {
			for ok := true; ok; ok = 0 != 0 {
				var _objIndexCopy int32 = XTclRegisterLiteral(tls, bp+8, ts+18935, 1, 0)
				if _objIndexCopy <= 255 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext+uintptr(2) > (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeEnd {
							XTclExpandCodeArray(tls, bp+8)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(INST_PUSH1)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(bp+8)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(bp + 8)).FatCmdStart = func() int32 {
								if INST_PUSH1 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok2 := true; ok2; ok2 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH1].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok3 := true; ok3; ok3 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(bp+8)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(bp+8)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(bp + 8)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(bp + 8)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(bp + 8 + 48)) += _delta
								}
							}
						}
					}
				} else {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						if (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext+uintptr(5) > (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeEnd {
							XTclExpandCodeArray(tls, bp+8)
						}
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(INST_PUSH4)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 24)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 16)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy) >> 8)
						*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(uint32(_objIndexCopy))
						if (*CompileEnv)(unsafe.Pointer(bp+8)).FatCmdStart < 2 {
							(*CompileEnv)(unsafe.Pointer(bp + 8)).FatCmdStart = func() int32 {
								if INST_PUSH4 == INST_START_CMD {
									return 1
								}
								return 0
							}()
						}
						for ok5 := true; ok5; ok5 = 0 != 0 {
							var _delta int32 = XtclInstructionTable[INST_PUSH4].FstackEffect
							if _delta != 0 {
								if _delta == -0x7fffffff-1 {
									_delta = 1 - _objIndexCopy
								}
								for ok6 := true; ok6; ok6 = 0 != 0 {
									if _delta < 0 {
										if (*CompileEnv)(unsafe.Pointer(bp+8)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(bp+8)).FcurrStackDepth {
											(*CompileEnv)(unsafe.Pointer(bp + 8)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(bp + 8)).FcurrStackDepth
										}
									}
									*(*int32)(unsafe.Pointer(bp + 8 + 48)) += _delta
								}
							}
						}
					}
				}
			}
		}

		// Add a "done" instruction as the last instruction and change the
		// object into a ByteCode object. Ownership of the literal objects and
		// aux data items is given to the ByteCode object.

		for ok7 := true; ok7; ok7 = 0 != 0 {
			if (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext == (*CompileEnv)(unsafe.Pointer(bp+8)).FcodeEnd {
				XTclExpandCodeArray(tls, bp+8)
			}
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*CompileEnv)(unsafe.Pointer(bp+8)).FcodeNext, 1))) = uint8(INST_DONE)
			if (*CompileEnv)(unsafe.Pointer(bp+8)).FatCmdStart < 2 {
				(*CompileEnv)(unsafe.Pointer(bp + 8)).FatCmdStart = func() int32 {
					if INST_DONE == INST_START_CMD {
						return 1
					}
					return 0
				}()
			}
			for ok8 := true; ok8; ok8 = 0 != 0 {
				var _delta int32 = XtclInstructionTable[INST_DONE].FstackEffect
				if _delta != 0 {
					if _delta == -0x7fffffff-1 {
						_delta = 1 - 0
					}
					for ok9 := true; ok9; ok9 = 0 != 0 {
						if _delta < 0 {
							if (*CompileEnv)(unsafe.Pointer(bp+8)).FmaxStackDepth < (*CompileEnv)(unsafe.Pointer(bp+8)).FcurrStackDepth {
								(*CompileEnv)(unsafe.Pointer(bp + 8)).FmaxStackDepth = (*CompileEnv)(unsafe.Pointer(bp + 8)).FcurrStackDepth
							}
						}
						*(*int32)(unsafe.Pointer(bp + 8 + 48)) += _delta
					}
				}
			}
		}
		XTclInitByteCodeObj(tls, objPtr, bp+8)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&exprCodeType))
		XTclFreeCompileEnv(tls, bp+8)
		codePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr != 0 {
			(*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr
			(*LocalCache)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr)).FrefCount++
		}
	}
	return codePtr
}

//----------------------------------------------------------------------
//
// DupExprCodeInternalRep --
//
//	Part of the Tcl object type implementation for Tcl expression
//	bytecode. We do not copy the bytecode internalrep. Instead, we return
//	without setting copyPtr->typePtr, so the copy is a plain string copy
//	of the expression value, and if it is to be used as a compiled
//	expression, it will just need a recompile.
//
//	This makes sense, because with Tcl's copy-on-write practices, the
//	usual (only?) time Tcl_DuplicateObj() will be called is when the copy
//	is about to be modified, which would invalidate any copied bytecode
//	anyway. The only reason it might make sense to copy the bytecode is if
//	we had some modifying routines that operated directly on the internalrep,
//	like we do for lists and dicts.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sDupExprCodeInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclExecute.c:1623:1: */
	return
}

//----------------------------------------------------------------------
//
// FreeExprCodeInternalRep --
//
//	Part of the Tcl object type implementation for Tcl expression
//	bytecode. Frees the storage allocated to hold the internal rep, unless
//	ref counts indicate bytecode execution is still in progress.
//
// Results:
//	None.
//
// Side effects:
//	May free allocated memory. Leaves objPtr untyped.
//
//----------------------------------------------------------------------

func sFreeExprCodeInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclExecute.c:1649:1: */
	var codePtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	if libc.PostDecInt32(&(*ByteCode)(unsafe.Pointer(codePtr)).FrefCount, 1) <= 1 {
		XTclCleanupByteCode(tls, codePtr)
	}
}

//----------------------------------------------------------------------
//
// TclCompileObj --
//
//	This procedure compiles the script contained in a Tcl_Obj.
//
// Results:
//	A pointer to the corresponding ByteCode, never NULL.
//
// Side effects:
//	The object is shimmered to bytecode type.
//
//----------------------------------------------------------------------

func XTclCompileObj(tls *libc.TLS, interp uintptr, objPtr uintptr, invoker uintptr, word int32) uintptr { /* tclExecute.c:1676:10: */
	var iPtr uintptr
	var codePtr uintptr // Tcl Internal type of bytecode.
	var namespacePtr uintptr
	var _objPtr uintptr
	var hePtr uintptr
	var eclPtr uintptr
	var ctxCopyPtr uintptr
	var redo int32
	iPtr = interp
	namespacePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr

	// If the object is not already of tclByteCodeType, compile it (and reset
	// the compilation flags in the interpreter; this should be done after any
	// compilation). Otherwise, check that it is "fresh" enough.

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteCodeType))) {
		goto __1
	}
	// Make sure the Bytecode hasn't been invalidated by, e.g., someone
	// redefining a command with a compile procedure (this might make the
	// compiled code wrong). The object needs to be recompiled if it was
	// compiled in/for a different interpreter, or for a different
	// namespace, or for the same namespace but with different name
	// resolution rules. Precompiled objects, however, are immutable and
	// therefore they are not recompiled, even if the epoch has changed.
	//
	// To be pedantically correct, we should also check that the
	// originating procPtr is the same as the current context procPtr
	// (assuming one exists at all - none for global level). This code is
	// #def'ed out because [info body] was changed to never return a
	// bytecode type object, which should obviate us from the extra checks
	// here.

	codePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	if !(*(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle)) != iPtr ||
		(*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch != (*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch ||
		(*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr != namespacePtr ||
		(*ByteCode)(unsafe.Pointer(codePtr)).FnsEpoch != (*Namespace)(unsafe.Pointer(namespacePtr)).FresolverEpoch) {
		goto __2
	}
	if !!((*ByteCode)(unsafe.Pointer(codePtr)).Fflags&uint32(TCL_BYTECODE_PRECOMPILED) != 0) {
		goto __3
	}
	goto recompileObj
__3:
	;
	if !(*(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle)) != iPtr) {
		goto __4
	}
	XTcl_Panic(tls, ts+28813, 0)
__4:
	;
	(*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch = (*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch
__2:
	;

	// Check that any compiled locals do refer to the current proc
	// environment! If not, recompile.

	if !(!((*ByteCode)(unsafe.Pointer(codePtr)).Fflags&uint32(TCL_BYTECODE_PRECOMPILED) != 0) && (*ByteCode)(unsafe.Pointer(codePtr)).FprocPtr == uintptr(0) && (*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr != (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr) {
		goto __5
	}
	goto recompileObj
__5:
	;

	// #280.
	// Literal sharing fix. This part of the fix is not required by 8.4
	// nor 8.5, because they eval-direct any literals, so just saving the
	// argument locations per command in bytecode is enough, embedded
	// 'eval' commands, etc. get the correct information.
	//
	// But in 8.6 all the embedded script are compiled, and the resulting
	// bytecode stored in the literal. Now the shared literal has bytecode
	// with location data for _one_ particular location this literal is
	// found at. If we get executed from a different location the bytecode
	// has to be recompiled to get the correct locations. Not doing this
	// will execute the saved bytecode with data for a different location,
	// causing 'info frame' to point to the wrong place in the sources.
	//
	// Future optimizations ...
	// (1) Save the location data (ExtCmdLoc) keyed by start line. In that
	//     case we recompile once per location of the literal, but not
	//     continously, because the moment we have all locations we do not
	//     need to recompile any longer.
	//
	// (2) Alternative: Do not recompile, tell the execution engine the
	//     offset between saved starting line and actual one. Then modify
	//     the users to adjust the locations they have by this offset.
	//
	// (3) Alternative 2: Do not fully recompile, adjust just the location
	//     information.

	if !(invoker == uintptr(0)) {
		goto __6
	}
	return codePtr
	goto __7
__6:
	hePtr =
		(*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr, codePtr)

	if !!(hePtr != 0) {
		goto __8
	}
	return codePtr
__8:
	;

	eclPtr = (*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData
	redo = 0
	ctxCopyPtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CmdFrame{})))
	*(*CmdFrame)(unsafe.Pointer(ctxCopyPtr)) = *(*CmdFrame)(unsafe.Pointer(invoker))

	if !((*CmdFrame)(unsafe.Pointer(invoker)).Ftype == 2) {
		goto __9
	}
	// Note: Type BC => ctx.data.eval.path    is not used.
	//		    ctx.data.tebc.codePtr used instead

	XTclGetSrcInfoForPc(tls, ctxCopyPtr)
	if !((*CmdFrame)(unsafe.Pointer(ctxCopyPtr)).Ftype == 4) {
		goto __10
	}
	// The reference made by 'TclGetSrcInfoForPc' is dead.

__11:
	_objPtr = *(*uintptr)(unsafe.Pointer(ctxCopyPtr + 40))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __14
	}
	XTclFreeObj(tls, _objPtr)
__14:
	;
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	*(*uintptr)(unsafe.Pointer(ctxCopyPtr + 40)) = uintptr(0)
__10:
	;
__9:
	;

	if !(word < (*CmdFrame)(unsafe.Pointer(ctxCopyPtr)).Fnline) {
		goto __15
	}
	// Note: We do not care if the line[word] is -1. This is a
	// difference and requires a recompile (location changed from
	// absolute to relative, literal is used fixed and through
	// variable)
	//
	// Example:
	// test info-32.0 using literal of info-24.8
	//     (dict with ... vs           set body ...).

	redo = libc.Bool32((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Ftype == 4 &&
		(*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fstart != *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(ctxCopyPtr)).Fline + uintptr(word)*4)) ||
		(*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Ftype == 2 &&
			(*CmdFrame)(unsafe.Pointer(ctxCopyPtr)).Ftype == 4)
__15:
	;

	XTclStackFree(tls, interp, ctxCopyPtr)
	if !!(redo != 0) {
		goto __16
	}
	return codePtr
__16:
	;
__7:
	;
__1:
	;

recompileObj:
	(*Interp)(unsafe.Pointer(iPtr)).FerrorLine = 1

	// TIP #280. Remember the invoker for a moment in the interpreter
	// structures so that the byte code compiler can pick it up when
	// initializing the compilation environment, i.e. the extended location
	// information.

	(*Interp)(unsafe.Pointer(iPtr)).FinvokeCmdFramePtr = invoker
	(*Interp)(unsafe.Pointer(iPtr)).FinvokeWord = word
	XTclSetByteCodeFromAny(tls, interp, objPtr, uintptr(0), uintptr(0))
	(*Interp)(unsafe.Pointer(iPtr)).FinvokeCmdFramePtr = uintptr(0)
	codePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	if !((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr != 0) {
		goto __17
	}
	(*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr
	(*LocalCache)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr)).FrefCount++
__17:
	;
	return codePtr
}

//----------------------------------------------------------------------
//
// TclIncrObj --
//
//	Increment an integeral value in a Tcl_Obj by an integeral value held
//	in another Tcl_Obj. Caller is responsible for making sure we can
//	update the first object.
//
// Results:
//	TCL_ERROR if either object is non-integer, and TCL_OK otherwise. On
//	error, an error message is left in the interpreter (if it is not NULL,
//	of course).
//
// Side effects:
//	valuePtr gets the new incrmented value.
//
//----------------------------------------------------------------------

func XTclIncrObj(tls *libc.TLS, interp uintptr, valuePtr uintptr, incrPtr uintptr) int32 { /* tclExecute.c:1868:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	// var ptr1 ClientData at bp+16, 8

	// var ptr2 ClientData at bp+32, 8

	// var type1 int32 at bp+8, 4

	// var type2 int32 at bp+24, 4

	// var value Mp_int at bp+56, 24

	// var incr Mp_int at bp+80, 24

	if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+28857))
	}

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 8)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 16)) = valuePtr + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 8)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 16)) = valuePtr + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(valuePtr + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 8)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 8)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 16)) = valuePtr + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 8)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), valuePtr, bp+16, bp+8)
				}()
			}()
		}()
	}() != TCL_OK {
		// Produce error message (reparse?!)

		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(valuePtr + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, interp, valuePtr, bp+8)
		}()
	}
	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 24)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 32)) = incrPtr + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 24)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 32)) = incrPtr + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(incrPtr + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 24)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 24)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 32)) = incrPtr + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(incrPtr)).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 24)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), incrPtr, bp+32, bp+24)
				}()
			}()
		}()
	}() != TCL_OK {
		// Produce error message (reparse?!)

		if (*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(incrPtr + 32)))
		} else {
			XTcl_GetIntFromObj(tls, interp, incrPtr, bp+8)
		}
		XTcl_AddErrorInfo(tls, interp, ts+24178)
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_LONG && *(*int32)(unsafe.Pointer(bp + 24)) == TCL_NUMBER_LONG {
		var augend int32 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 16))))
		var addend int32 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 32))))
		var sum int32 = augend + addend

		// Overflow when (augend and sum have different sign) and (augend and
		// addend have the same sign). This is encapsulated in the Overflowing
		// macro.

		if !(augend^sum < 0 && augend^addend >= 0) {
			for ok := true; ok; ok = 0 != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _isobjPtr uintptr = valuePtr
					if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
						if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
					}
				}
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr != uintptr(0) {
					if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
						(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr)).FfreeIntRepProc})).f(tls, valuePtr)
					}
					(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr = uintptr(0)
				}
				*(*int32)(unsafe.Pointer(valuePtr + 32)) = sum
				(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
			}
			return TCL_OK
		}
		{
			var w1 Tcl_WideInt = Tcl_WideInt(augend)
			var w2 Tcl_WideInt = Tcl_WideInt(addend)

			// We know the sum value is outside the long range, so we use the
			// macro form that doesn't range test again.

			for ok2 := true; ok2; ok2 = 0 != 0 {
				for ok3 := true; ok3; ok3 = 0 != 0 {
					var _isobjPtr uintptr = valuePtr
					if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
						if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
					}
				}
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr != uintptr(0) {
					if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
						(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr)).FfreeIntRepProc})).f(tls, valuePtr)
					}
					(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr = uintptr(0)
				}
				*(*Tcl_WideInt)(unsafe.Pointer(valuePtr + 32)) = w1 + w2
				(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclWideIntType))
			}
			return TCL_OK

		}
	}

	if *(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_DOUBLE || *(*int32)(unsafe.Pointer(bp + 8)) == TCL_NUMBER_NAN {
		// Produce error message (reparse?!)

		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(valuePtr + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, interp, valuePtr, bp+8)
		}()
	}
	if *(*int32)(unsafe.Pointer(bp + 24)) == TCL_NUMBER_DOUBLE || *(*int32)(unsafe.Pointer(bp + 24)) == TCL_NUMBER_NAN {
		// Produce error message (reparse?!)

		if (*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*int32)(unsafe.Pointer(bp + 8)) = int32(*(*int32)(unsafe.Pointer(incrPtr + 32)))
		} else {
			XTcl_GetIntFromObj(tls, interp, incrPtr, bp+8)
		}
		XTcl_AddErrorInfo(tls, interp, ts+24178)
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp + 8)) != TCL_NUMBER_BIG && *(*int32)(unsafe.Pointer(bp + 24)) != TCL_NUMBER_BIG {
		// var w1 Tcl_WideInt at bp+40, 8

		// var w2 Tcl_WideInt at bp+48, 8

		var sum Tcl_WideInt

		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 40)) = *(*Tcl_WideInt)(unsafe.Pointer(valuePtr + 32))
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 40)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(valuePtr + 32)))
			} else {
				XTcl_GetWideIntFromObj(tls, uintptr(0), valuePtr, bp+40)
			}
		}
		if (*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 48)) = *(*Tcl_WideInt)(unsafe.Pointer(incrPtr + 32))
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 48)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(incrPtr + 32)))
			} else {
				XTcl_GetWideIntFromObj(tls, uintptr(0), incrPtr, bp+48)
			}
		}
		sum = *(*Tcl_WideInt)(unsafe.Pointer(bp + 40)) + *(*Tcl_WideInt)(unsafe.Pointer(bp + 48))

		// Check for overflow.

		if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 40))^sum < int64(0) && *(*Tcl_WideInt)(unsafe.Pointer(bp + 40))^*(*Tcl_WideInt)(unsafe.Pointer(bp + 48)) >= int64(0)) {
			XTcl_SetWideIntObj(tls, valuePtr, sum)
			return TCL_OK
		}
	}

	XTcl_TakeBignumFromObj(tls, interp, valuePtr, bp+56)
	XTcl_GetBignumFromObj(tls, interp, incrPtr, bp+80)
	XTclBN_mp_add(tls, bp+56, bp+80, bp+56)
	XTclBN_mp_clear(tls, bp+80)
	XTcl_SetBignumObj(tls, valuePtr, bp+56)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ArgumentBCEnter --
//
//	This is a helper for TclNRExecuteByteCode/TEBCresume that encapsulates
//	a code sequence that is fairly common in the code but *not* commonly
//	called.
//
// Results:
//	None
//
// Side effects:
//	May register information about the bytecode in the command frame.
//
//----------------------------------------------------------------------

func sArgumentBCEnter(tls *libc.TLS, interp uintptr, codePtr uintptr, tdPtr uintptr, pc uintptr, objc int32, objv uintptr) { /* tclExecute.c:1992:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var cmd int32 at bp, 4

	if sGetSrcInfoForPc(tls, pc, codePtr, uintptr(0), uintptr(0), bp) != 0 {
		XTclArgumentBCEnter(tls, interp, objv, objc, codePtr, tdPtr+24, *(*int32)(unsafe.Pointer(bp /* cmd */)),
			int32((int64(pc)-int64((*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart))/1))
	}
}

//----------------------------------------------------------------------
//
// TclNRExecuteByteCode --
//
//	This procedure executes the instructions of a ByteCode structure. It
//	returns when a "done" instruction is executed or an error occurs.
//
// Results:
//	The return value is one of the return codes defined in tcl.h (such as
//	TCL_OK), and interp->objResultPtr refers to a Tcl object that either
//	contains the result of executing the code or an error message.
//
// Side effects:
//	Almost certainly, depending on the ByteCode's instructions.
//
//----------------------------------------------------------------------

func XTclNRExecuteByteCode(tls *libc.TLS, interp uintptr, codePtr uintptr) int32 { /* tclExecute.c:2032:1: */
	var iPtr uintptr = interp
	var TD uintptr
	var size int32 = int32(uint64(unsafe.Sizeof(TEBCdata{})) - uint64(1) +
		uint64((*ByteCode)(unsafe.Pointer(codePtr)).FmaxStackDepth+(*ByteCode)(unsafe.Pointer(codePtr)).FmaxExceptDepth)*
			uint64(unsafe.Sizeof(uintptr(0))))
	var numWords int32 = int32((uint64(size) + uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) / uint64(unsafe.Sizeof(uintptr(0))))

	(*ByteCode)(unsafe.Pointer(codePtr)).FrefCount++

	// Reserve the stack, setup the TEBCdataPtr (TD) and CallFrame
	//
	// The execution uses a unified stack: first a TEBCdata, immediately
	// above it a CmdFrame, then the catch stack, then the execution stack.
	//
	// Make sure the catch stack is large enough to hold the maximum number of
	// catch commands that could ever be executing at the same time (this will
	// be no more than the exception range array's depth). Make sure the
	// execution stack is large enough to execute this ByteCode.

	TD = sGrowEvaluationStack(tls, (*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr, numWords, 0)
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = TD + 112 - uintptr(1)*8 + uintptr((*ByteCode)(unsafe.Pointer(codePtr)).FmaxExceptDepth)*8

	(*TEBCdata)(unsafe.Pointer(TD)).FcodePtr = codePtr
	(*TEBCdata)(unsafe.Pointer(TD)).FcatchTop = TD + 112 - uintptr(1)*8
	(*TEBCdata)(unsafe.Pointer(TD)).FauxObjList = uintptr(0)

	// TIP #280: Initialize the frame. Do not push it yet: it will be pushed
	// every time that we call out from this TD, popped when we return to it.

	(*CmdFrame)(unsafe.Pointer(TD + 24)).Ftype = func() int32 {
		if (*ByteCode)(unsafe.Pointer(codePtr)).Fflags&uint32(TCL_BYTECODE_PRECOMPILED) != 0 {
			return 3
		}
		return 2
	}()
	(*CmdFrame)(unsafe.Pointer(TD + 24)).Flevel = func() int32 {
		if (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr != 0 {
			return (*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr)).Flevel + 1
		}
		return 1
	}()
	(*CmdFrame)(unsafe.Pointer(TD + 24)).FframePtr = (*Interp)(unsafe.Pointer(iPtr)).FframePtr
	(*CmdFrame)(unsafe.Pointer(TD + 24)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr
	(*CmdFrame)(unsafe.Pointer(TD + 24)).Fnline = 0
	(*CmdFrame)(unsafe.Pointer(TD + 24)).Fline = uintptr(0)
	(*CmdFrame)(unsafe.Pointer(TD + 24)).Flitarg = uintptr(0)
	*(*uintptr)(unsafe.Pointer(TD + 24 + 40)) = codePtr
	*(*uintptr)(unsafe.Pointer(TD + 24 + 40 + 8 /* &.pc */)) = uintptr(0)
	(*CmdFrame)(unsafe.Pointer(TD + 24)).FcmdObj = uintptr(0)
	(*CmdFrame)(unsafe.Pointer(TD + 24)).Fcmd = uintptr(0)
	(*CmdFrame)(unsafe.Pointer(TD + 24)).Flen = 0

	// Test namespace-50.9 demonstrates the need for this call.
	// Use a --enable-symbols=mem bug to see.

	XTclResetRewriteEnsemble(tls, interp, 1)

	// Push the callback for bytecode execution

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sTEBCresume}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = TD
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(int64(0))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(Intptr_t((*Interp)(unsafe.Pointer(iPtr)).FevalFlags))
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}

	// Reset discard result flag - because it is applicable for this call only,
	// and should not affect all the nested invocations may return result.
	*(*int32)(unsafe.Pointer(iPtr + 324)) &= libc.CplInt32(TCL_EVAL_DISCARD_RESULT)

	return TCL_OK
}

func sTEBCresume(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclExecute.c:2111:1: */
	bp := tls.Alloc(984)
	defer tls.Free(984)

	// Compiler cast directive - not a real variable.
	//	   Interp *iPtr = (Interp *) interp;

	// Check just the read-traced/write-traced bit of a variable.

	// Bottom of allocated stack holds the NR data

	// Constants: variables that do not change during the execution, used
	// sporadically: no special need for speed.

	var instructionCount int32 // Counter that is used to work out when to
	// call Tcl_AsyncReady()
	var curInstName uintptr
	var compiledLocals uintptr
	var constants uintptr

	// These macros are just meant to save some global variables that are not
	// used too frequently

	var TD uintptr

	// Globals: variables that store state, must remain valid at all times.

	var tosPtr uintptr // Cached pointer to top of evaluation
	// stack.
	var pc uintptr
	// The current program counter.
	var inst uint8 // The currently running instruction

	// Transfer variables - needed only between opcodes, but not while
	// executing an instruction.

	var cleanup int32
	// var objResultPtr uintptr at bp+936, 8

	var checkInterp int32 // Indicates when a check of interp readyness
	// is necessary. Set by CACHE_STACK_INFO()

	// Locals - variables that are used within opcodes or bounded sections of
	// the file (jumps between opcodes within a family).
	// NOTE: These are now mostly defined locally where needed.

	var objPtr uintptr
	// var valuePtr uintptr at bp+944, 8

	var value2Ptr uintptr
	var part1Ptr uintptr
	var part2Ptr uintptr
	var tmpPtr uintptr
	// var objv uintptr at bp+712, 8

	// var objc int32 at bp+720, 4

	var opnd int32
	// var length int32 at bp+704, 4

	var pcAdjustment int32
	// var varPtr uintptr at bp+760, 8

	// var arrayPtr uintptr at bp+728, 8

	var _objPtr uintptr
	var code int32
	var level int32
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var _callbackPtr uintptr
	var _objPtr5 uintptr
	var _callbackPtr1 uintptr
	var corPtr uintptr
	var yieldParameter int32
	var _objPtr6 uintptr
	var listPtr uintptr
	var nsObjPtr uintptr
	var a uintptr
	var b uintptr
	var appendLen int32
	var bytes uintptr
	var p uintptr
	var currPtr uintptr
	var onlyb int32
	var _objPtr7 uintptr
	var _objPtr8 uintptr
	var i int32
	var moved Ptrdiff_t
	var _objPtr9 uintptr
	var _callbackPtr2 uintptr
	var newCodePtr uintptr
	var _objPtr10 uintptr
	var _callbackPtr3 uintptr
	var _objPtr11 uintptr
	var _objPtr12 uintptr
	var _callbackPtr4 uintptr
	var _objPtr13 uintptr
	var _objPtr14 uintptr
	var _objPtr15 uintptr
	var numArgs int32
	var tmpPtr1 uintptr
	var tmpPtr2 uintptr
	var _objPtr16 uintptr
	var _objPtr17 uintptr
	var copyPtr uintptr
	var _objPtr18 uintptr
	var _callbackPtr5 uintptr
	var _objPtr19 uintptr
	var _callbackPtr6 uintptr
	var _objPtr20 uintptr
	var _callbackPtr7 uintptr
	var _objPtr21 uintptr
	var newValue uintptr
	var createdNewObj int32
	var valueToAssign uintptr
	var storeFlags int32
	// var len int32 at bp+736, 4

	var _objPtr22 uintptr
	var _objPtr23 uintptr
	var _isobjPtr uintptr
	var _isobjPtr1 uintptr
	var augend int32
	var sum int32
	var sum1 Tcl_WideInt
	var _objPtr24 uintptr
	var _objPtr25 uintptr
	// var ptr ClientData at bp+744, 8

	// var type1 int32 at bp+740, 4

	var _objPtr26 uintptr
	var _objPtr27 uintptr
	var _objPtr28 uintptr
	var incrPtr uintptr
	var w Tcl_WideInt
	var increment int32
	var found int32
	var flags int32
	// Then it is a defined link.

	var linkPtr uintptr
	var otherPtr uintptr
	// var framePtr uintptr at bp+752, 8

	var savedFramePtr uintptr
	// var nsPtr uintptr at bp+768, 8

	var savedNsPtr uintptr
	// var jmpOffset [2]int32 at bp+776, 8

	// var b1 int32 at bp+784, 4

	var jumpOffset int32
	var hPtr uintptr
	var jtPtr uintptr
	// Operands must be boolean or numeric. No int->double conversions are
	// performed.

	// var i1 int32 at bp+788, 4

	// var i2 int32 at bp+792, 4

	var iResult int32
	var currNsPtr uintptr
	var corPtr1 uintptr
	// var level1 int32 at bp+796, 4

	var framePtr1 uintptr
	var rootFramePtr uintptr
	var cmd Tcl_Command
	var origCmd Tcl_Command
	var classPtr uintptr
	var miPtr uintptr
	var i3 int32
	var methodType uintptr
	// We're at the end of the chain; generate an error message unless
	// the interpreter is being torn down, in which case we might be
	// getting here because of methods/destructors doing a [next] (or
	// equivalent) unexpectedly.

	var methodType1 uintptr
	var _objPtr29 uintptr
	var _callbackPtr8 uintptr
	var _objPtr30 uintptr
	var _callbackPtr9 uintptr
	var _objPtr31 uintptr
	var _callbackPtr10 uintptr
	var mPtr uintptr
	var oPtr uintptr
	var framePtr2 uintptr
	var contextPtr uintptr
	var skip int32
	var newDepth int32
	var _objPtr32 uintptr
	var _objPtr33 uintptr
	var i4 int32
	// var o uintptr at bp+808, 8

	var checkEq int32
	// var buf [8]int8 at bp+820, 8

	var ch int32
	var bytes1 uintptr
	var bytes2 uintptr
	// var ch1 int32 at bp+844, 4

	var ustring1 uintptr
	var ustring2 uintptr
	var ustring3 uintptr
	var end uintptr
	var p1 uintptr
	// var length3 int32 at bp+840, 4

	var endIdx int32
	var value3Ptr uintptr
	var ustring11 uintptr
	var ustring21 uintptr
	var bytes11 uintptr
	var bytes21 uintptr
	var string1 uintptr
	var string2 uintptr
	var trim1 int32
	// var trim2 int32 at bp+848, 4

	var regExpr Tcl_RegExp
	// var index int32 at bp+800, 4

	var numIndices int32
	// var fromIdx int32 at bp+828, 4

	// var toIdx int32 at bp+832, 4

	var nocase int32
	var match int32
	// var length2 int32 at bp+836, 4

	var cflags int32
	// var s1len int32 at bp+804, 4

	// var s2len int32 at bp+816, 4

	var s1 uintptr
	var s2 uintptr
	// value is between LONG_MIN and LONG_MAX
	// [string is integer] is -UINT_MAX to UINT_MAX range
	// var i5 int32 at bp+864, 4

	// value is between WIDE_MIN and WIDE_MAX
	// [string is wideinteger] is -UWIDE_MAX to UWIDE_MAX range
	// var i6 int32 at bp+868, 4

	// value is an integer outside the WIDE_MIN to WIDE_MAX range
	// [string is wideinteger] is -UWIDE_MAX to UWIDE_MAX range
	// var w1 Tcl_WideInt at bp+872, 8

	var iResult1 int32
	var compare int32
	var shift int32
	var _isobjPtr2 uintptr
	var w11 Tcl_WideInt
	var w2 Tcl_WideInt
	var wResult Tcl_WideInt
	// var b2 int32 at bp+896, 4

	var _isobjPtr3 uintptr
	var _isobjPtr4 uintptr
	// Here we do some surgery within the Tcl_Obj internals. We want
	// to copy the internalrep, but not the string, so we temporarily hide
	// the string so we do not copy it.

	var savedString uintptr
	var _isobjPtr5 uintptr
	// var ptr1 ClientData at bp+856, 8

	// var ptr2 ClientData at bp+888, 8

	// var type11 int32 at bp+852, 4

	// var type2 int32 at bp+880, 4

	var l1 int32
	var l2 int32
	var lResult int32
	var res int32
	var _isobjPtr6 uintptr
	var _isobjPtr7 uintptr
	var infoPtr uintptr
	var iterVarPtr uintptr
	var listVarPtr uintptr
	var oldValuePtr uintptr
	var listPtr1 uintptr
	// var elements uintptr at bp+904, 8

	var varListPtr uintptr
	var numLists int32
	var iterNum int32
	var listTmpIndex int32
	// var listLen int32 at bp+900, 4

	var numVars int32
	var varIndex int32
	var valIndex int32
	var continueLoop int32
	var j int32
	var iterTmpIndex int32
	var i7 int32
	var _objPtr34 uintptr
	var infoPtr1 uintptr
	var listPtr2 uintptr
	// var elements1 uintptr at bp+920, 8

	var varListPtr1 uintptr
	var numLists1 int32
	var iterMax int32
	// var listLen1 int32 at bp+912, 4

	var numVars1 int32
	var iterTmp int32
	var iterNum1 int32
	var listTmpDepth int32
	var varIndex1 int32
	var valIndex1 int32
	var j1 int32
	var i8 int32
	// var code1 int32 at bp+928, 4

	var interp2 uintptr
	var found1 int32
	var _isobjPtr8 uintptr
	var _isobjPtr9 uintptr
	var _isobjPtr10 uintptr
	var _objPtr35 uintptr
	var _objPtr36 uintptr
	var _objPtr37 uintptr
	var _isobjPtr11 uintptr
	var var2Ptr uintptr
	var opnd2 int32
	var allocateDict int32
	// var done int32 at bp+932, 4

	var i9 int32
	var allocdict int32
	var dictPtr uintptr
	var statePtr uintptr
	// var keyPtr uintptr at bp+952, 8

	var listPtr3 uintptr
	var varNamePtr uintptr
	var keysPtr uintptr
	var emptyPtr uintptr
	// var keyPtrPtr uintptr at bp+960, 8

	var searchPtr uintptr
	var duiPtr uintptr // Read the wall clock
	var wval Tcl_WideInt
	// var now Tcl_Time at bp+968, 8

	// var pcBeg uintptr at bp+976, 8

	var _objPtr38 uintptr
	var _objPtr39 uintptr
	var _objPtr40 uintptr
	var rangePtr uintptr
	// Points to closest loop or catch exception
	// range enclosing the pc. Used by various
	// instructions and processCatch to process
	// break, continue, and errors.
	var bytes3 uintptr
	var bytes4 uintptr
	instructionCount = 0
	compiledLocals = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FcompiledLocals
	constants = (*Interp)(unsafe.Pointer(interp)).FexecEnvPtr + 8
	TD = *(*ClientData)(unsafe.Pointer(data))
	pc = *(*ClientData)(unsafe.Pointer(data + 1*8))
	cleanup = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))
	checkInterp = 0
	*(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)) = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 720 /* objc */)) = 0

__1:
	tosPtr = (*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr
	goto __2
__2:
	if 0 != 0 {
		goto __1
	}
	goto __3
__3:
	;

	if !!(pc != 0) {
		goto __4
	}
	// bytecode is starting from scratch
	pc = (*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FcodeStart

	// Reset the interp's result to avoid possible duplications of large
	// objects [3c6e47363e], [781585], [804681], This can happen by start
	// also in nested compiled blocks (enclosed in parent cycle).
	// See else branch below for opposite handling by continuation/resume.

	objPtr = (*Interp)(unsafe.Pointer(interp)).FobjResultPtr
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1) {
		goto __6
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __7
	}
	goto __8
__7:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __9
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __11
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__11:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__12:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	;
	goto __10
__9:
	XTclFreeObj(tls, objPtr)
__10:
	;
__8:
	;

__15:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __18
	}
	XTclAllocateFreeObjects(tls)
__18:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __16
__16:
	if 0 != 0 {
		goto __15
	}
	goto __17
__17:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	(*Interp)(unsafe.Pointer(interp)).FobjResultPtr = objPtr
__6:
	;

	goto cleanup0
	goto __5
__4:
	// resume from invocation
	checkInterp = 1

	if !((*CmdFrame)(unsafe.Pointer(TD+24)).FcmdObj != 0) {
		goto __19
	}
__20:
	_objPtr = (*CmdFrame)(unsafe.Pointer(TD + 24)).FcmdObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __23
	}
	XTclFreeObj(tls, _objPtr)
__23:
	;
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	(*CmdFrame)(unsafe.Pointer(TD + 24)).FcmdObj = uintptr(0)
	(*CmdFrame)(unsafe.Pointer(TD + 24)).Fcmd = uintptr(0)
__19:
	;
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = (*CmdFrame)(unsafe.Pointer(TD + 24)).FnextPtr
	if !((*Interp)(unsafe.Pointer(interp)).Fflags&INTERP_DEBUG_FRAME != 0) {
		goto __24
	}
	XTclArgumentBCRelease(tls, interp, TD+24)
__24:
	;
	if !((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).Frewind != 0) {
		goto __25
	}
	result = TCL_ERROR
	goto abnormalReturn
__25:
	;
	if !((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).Fflags&uint32(TCL_BYTECODE_RECOMPILE) != 0) {
		goto __26
	}
	*(*uint32)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr + 32)) &= libc.Uint32FromInt32(libc.CplInt32(TCL_BYTECODE_RECOMPILE))
	checkInterp = 1
	*(*int32)(unsafe.Pointer(interp + 424)) |= ERR_ALREADY_LOGGED
__26:
	;

	if !(result != TCL_OK) {
		goto __27
	}
	pc--
	goto processExceptionReturn
__27:
	;

	// Push the call's object result and continue execution with the next
	// instruction.

	// Obtain and reset interp's result to avoid possible duplications of
	// objects [Bug 781585]. We do not call Tcl_ResetResult to avoid any
	// side effects caused by the resetting of errorInfo and errorCode
	// [Bug 804681], which are not needed here. We chose instead to
	// manipulate the interp's object result directly.
	//
	// Note that the result object is now in objResultPtr, it keeps the
	// refCount it had in its role of iPtr->objResultPtr.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_GetObjResult(tls, interp)
__28:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __31
	}
	XTclAllocateFreeObjects(tls)
__31:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	(*Interp)(unsafe.Pointer(interp)).FobjResultPtr = objPtr
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_POP) {
		goto __32
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount, 1) > 1) {
		goto __33
	}
	goto __34
__33:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __35
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != XtclEmptyStringRep) {
		goto __37
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes)
__37:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = -1
__38:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 936))
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	goto __36
__35:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
__36:
	;
__34:
	;

__41:
	pc += uintptr(1)
	cleanup = cleanup
	if !(0 != 0) {
		goto __44
	}
	if !(0 > 0) {
		goto __46
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__46:
	;
	goto cleanupV_pushObjResultPtr
	goto __45
__44:
	goto cleanupV
__45:
	;
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
__32:
	;
__47:
	pc += uintptr(0)
	cleanup = cleanup
	if !(-1 != 0) {
		goto __50
	}
	if !(-1 > 0) {
		goto __52
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__52:
	;
	goto cleanupV_pushObjResultPtr
	goto __51
__50:
	goto cleanupV
__51:
	;
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
__5:
	;

	// Targets for standard instruction endings; unrolled for speed in the
	// most frequent cases (instructions that consume up to two stack
	// elements).
	//
	// This used to be a "for(;;)" loop, with each instruction doing its own
	// cleanup.

cleanupV_pushObjResultPtr:
	switch cleanup {
	case 0:
		goto __54
	default:
		goto __55
		// FALLTHRU
	case 2:
		goto __56
		// FALLTHRU
	case 1:
		goto __57
	}
	goto __53
__54:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936))
	goto cleanup0
__55:
	cleanup = cleanup - 2
__58:
	if !(libc.PostDecInt32(&cleanup, 1) != 0) {
		goto __59
	}
	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __60
	}
	goto __61
__60:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __62
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __64
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__64:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__65:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
	goto __63
__62:
	XTclFreeObj(tls, objPtr)
__63:
	;
__61:
	;

	goto __58
__59:
	;
	// FALLTHRU
__56:
cleanup2_pushObjResultPtr:
	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __68
	}
	goto __69
__68:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __70
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __72
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__72:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__73:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __74
__74:
	if 0 != 0 {
		goto __73
	}
	goto __75
__75:
	;
	goto __71
__70:
	XTclFreeObj(tls, objPtr)
__71:
	;
__69:
	;

	// FALLTHRU
__57:
cleanup1_pushObjResultPtr:
	objPtr = *(*uintptr)(unsafe.Pointer(tosPtr))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __76
	}
	goto __77
__76:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __78
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __80
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__80:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__81:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __82
__82:
	if 0 != 0 {
		goto __81
	}
	goto __83
__83:
	;
	goto __79
__78:
	XTclFreeObj(tls, objPtr)
__79:
	;
__77:
	;

__53:
	;
	*(*uintptr)(unsafe.Pointer(tosPtr)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
	goto cleanup0

cleanupV:
	switch cleanup {
	default:
		goto __85
		// FALLTHRU
	case 2:
		goto __86
		// FALLTHRU
	case 1:
		goto __87
		// FALLTHRU
	case 0:
		goto __88
	}
	goto __84
__85:
	cleanup = cleanup - 2
__89:
	if !(libc.PostDecInt32(&cleanup, 1) != 0) {
		goto __90
	}
	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __91
	}
	goto __92
__91:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __93
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __95
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__95:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__96:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __97
__97:
	if 0 != 0 {
		goto __96
	}
	goto __98
__98:
	;
	goto __94
__93:
	XTclFreeObj(tls, objPtr)
__94:
	;
__92:
	;

	goto __89
__90:
	;
	// FALLTHRU
__86:
cleanup2:
	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __99
	}
	goto __100
__99:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __101
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __103
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__103:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__104:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __105
__105:
	if 0 != 0 {
		goto __104
	}
	goto __106
__106:
	;
	goto __102
__101:
	XTclFreeObj(tls, objPtr)
__102:
	;
__100:
	;

	// FALLTHRU
__87:
cleanup1:
	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __107
	}
	goto __108
__107:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __109
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __111
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__111:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__112:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __113
__113:
	if 0 != 0 {
		goto __112
	}
	goto __114
__114:
	;
	goto __110
__109:
	XTclFreeObj(tls, objPtr)
__110:
	;
__108:
	;

	// FALLTHRU
__88:
	// We really want to do nothing now, but this is needed for some
	// compilers (SunPro CC).

	goto __84
__84:
	;
cleanup0:

	// Check for asynchronous handlers [Bug 746722]; we do the check every
	// ASYNC_CHECK_COUNT_MASK instruction, of the form (2**n-1).

	if !(libc.PostIncInt32(&instructionCount, 1)&ASYNC_CHECK_COUNT_MASK == 0) {
		goto __115
	}
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	if !(*(*int32)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FasyncReadyPtr)) != 0) {
		goto __116
	}
	result = XTcl_AsyncInvoke(tls, interp, result)
	if !(result == TCL_ERROR) {
		goto __117
	}
	checkInterp = 1
	goto gotError
__117:
	;
__116:
	;

	if !((*Interp)(unsafe.Pointer(interp)).Fflags&CANCELED != 0 || (*Interp)(unsafe.Pointer(interp)).Fflags&TCL_CANCEL_UNWIND != 0) {
		goto __118
	}
	if !(XTcl_Canceled(tls, interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) {
		goto __119
	}
	checkInterp = 1
	goto gotError
__119:
	;
__118:
	;

	if !(func() int32 {
		if (*Interp)(unsafe.Pointer(interp)).Flimit.Factive == 0 {
			return 0
		}
		return func() int32 {
			(*Interp)(unsafe.Pointer(interp)).Flimit.FgranularityTicker++
			return func() int32 {
				if (*Interp)(unsafe.Pointer(interp)).Flimit.Factive&TCL_LIMIT_COMMANDS != 0 && ((*Interp)(unsafe.Pointer(interp)).Flimit.FcmdGranularity == 1 || (*Interp)(unsafe.Pointer(interp)).Flimit.FgranularityTicker%(*Interp)(unsafe.Pointer(interp)).Flimit.FcmdGranularity == 0) {
					return 1
				}
				return func() int32 {
					if (*Interp)(unsafe.Pointer(interp)).Flimit.Factive&TCL_LIMIT_TIME != 0 && ((*Interp)(unsafe.Pointer(interp)).Flimit.FtimeGranularity == 1 || (*Interp)(unsafe.Pointer(interp)).Flimit.FgranularityTicker%(*Interp)(unsafe.Pointer(interp)).Flimit.FtimeGranularity == 0) {
						return 1
					}
					return 0
				}()
			}()
		}()
	}() != 0) {
		goto __120
	}
	if !(XTcl_LimitCheck(tls, interp) == TCL_ERROR) {
		goto __121
	}
	checkInterp = 1
	goto gotError
__121:
	;
__120:
	;
	checkInterp = 1
__115:
	;

	// These two instructions account for 26% of all instructions (according
	// to measurements on tclbench by Ben Vitale
	// [http://www.cs.toronto.edu/syslab/pubs/tcl2005-vitale-zaleski.pdf]
	// Resolving them before the switch reduces the cost of branch
	// mispredictions, seems to improve runtime by 5% to 15%, and (amazingly!)
	// reduces total obj size.

	inst = *(*uint8)(unsafe.Pointer(pc))

peepholeStart:

__122:
	if !(0 != 0) {
		goto __125
	}
	if !(curInstName != 0) {
		goto __127
	}

__127:
	;
	curInstName = XtclInstructionTable[*(*uint8)(unsafe.Pointer(pc))].Fname
	if !(0 != 0) {
		goto __128
	}

__128:
	;
	goto __126
__125:
	if !(0 != 0) {
		goto __129
	}

__129:
	;
__126:
	;
	goto __123
__123:
	if 0 != 0 {
		goto __122
	}
	goto __124
__124:
	;

	if !(int32(inst) == INST_LOAD_SCALAR1) {
		goto __130
	}
	goto instLoadScalar1
	goto __131
__130:
	if !(int32(inst) == INST_PUSH1) {
		goto __132
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FobjArrayPtr + uintptr(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))*8))))).FrefCount++

	inst = *(*uint8)(unsafe.Pointer(libc.AssignAddUintptr(&pc, uintptr(2))))
	goto peepholeStart
	goto __133
__132:
	if !(int32(inst) == INST_START_CMD) {
		goto __134
	}
	// Peephole: do not run INST_START_CMD, just skip it

	*(*int32)(unsafe.Pointer(interp + 320)) += int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(3)))))
	if !(checkInterp != 0) {
		goto __136
	}
	if !(((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FcompileEpoch != (*Interp)(unsafe.Pointer(interp)).FcompileEpoch || (*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FnsEpoch != (*Namespace)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr)).FresolverEpoch) && !((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).Fflags&uint32(TCL_BYTECODE_PRECOMPILED) != 0)) {
		goto __137
	}
	goto instStartCmdFailed
__137:
	;
	checkInterp = 0
__136:
	;
	inst = *(*uint8)(unsafe.Pointer(libc.AssignAddUintptr(&pc, uintptr(9))))
	goto peepholeStart
	goto __135
__134:
	if !(int32(inst) == INST_NOP) {
		goto __138
	}
__139:
	if !(int32(inst) == INST_NOP) {
		goto __140
	}

	inst = *(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&pc, 1)))
	goto __139
__140:
	;
	goto peepholeStart
__138:
	;
__135:
	;
__133:
	;
__131:
	;

	switch int32(inst) {
	case INST_SYNTAX:
		goto __142
	case INST_RETURN_IMM:
		goto __143

	case INST_RETURN_STK:
		goto __144

	case INST_YIELD:
		goto __145

	case INST_YIELD_TO_INVOKE:
		goto __146

	case INST_TAILCALL:
		goto __147

	case INST_DONE:
		goto __148

	case INST_PUSH4:
		goto __149

	case INST_POP:
		goto __150

	case INST_DUP:
		goto __151

	case INST_OVER:
		goto __152

	case INST_REVERSE:
		goto __153

	case INST_STR_CONCAT1:
		goto __154

	case INST_CONCAT_STK:
		goto __155

	case INST_EXPAND_START:
		goto __156

	case INST_EXPAND_DROP:
		goto __157

	case INST_EXPAND_STKTOP:
		goto __158

	case INST_EXPR_STK:
		goto __159

		// INVOCATION BLOCK

	case INST_EVAL_STK:
		goto __160

	case INST_INVOKE_EXPANDED:
		goto __161

	case INST_INVOKE_STK4:
		goto __162

	case INST_INVOKE_STK1:
		goto __163

	case INST_CALL_BUILTIN_FUNC1:
		goto __164

	case INST_CALL_FUNC1:
		goto __165

	case INST_INVOKE_REPLACE:
		goto __166

	// -----------------------------------------------------------------
	//	   Start of INST_LOAD instructions.
	//
	// WARNING: more 'goto' here than your doctor recommended! The different
	// instructions set the value of some variables and then jump to some
	// common execution code.

	case INST_LOAD_SCALAR1:
		goto __167

	case INST_LOAD_SCALAR4:
		goto __168

	case INST_LOAD_ARRAY4:
		goto __169

	case INST_LOAD_ARRAY1:
		goto __170

	case INST_LOAD_ARRAY_STK:
		goto __171

	case INST_LOAD_STK:
		goto __172
	case INST_LOAD_SCALAR_STK:
		goto __173

	case INST_STORE_ARRAY4:
		goto __174

	case INST_STORE_ARRAY1:
		goto __175

	case INST_STORE_SCALAR4:
		goto __176

	case INST_STORE_SCALAR1:
		goto __177

	case INST_LAPPEND_STK:
		goto __178

	case INST_LAPPEND_ARRAY_STK:
		goto __179

	case INST_APPEND_STK:
		goto __180

	case INST_APPEND_ARRAY_STK:
		goto __181

	case INST_STORE_ARRAY_STK:
		goto __182

	case INST_STORE_STK:
		goto __183
	case INST_STORE_SCALAR_STK:
		goto __184

	case INST_LAPPEND_ARRAY4:
		goto __185

	case INST_LAPPEND_ARRAY1:
		goto __186

	case INST_APPEND_ARRAY4:
		goto __187

	case INST_APPEND_ARRAY1:
		goto __188

	case INST_LAPPEND_SCALAR4:
		goto __189

	case INST_LAPPEND_SCALAR1:
		goto __190

	case INST_APPEND_SCALAR4:
		goto __191

	case INST_APPEND_SCALAR1:
		goto __192

	case INST_LAPPEND_LIST:
		goto __193

	case INST_LAPPEND_LIST_ARRAY:
		goto __194

	case INST_LAPPEND_LIST_ARRAY_STK:
		goto __195

	case INST_LAPPEND_LIST_STK:
		goto __196

	case INST_INCR_SCALAR1:
		goto __197
	case INST_INCR_ARRAY1:
		goto __198
	case INST_INCR_ARRAY_STK:
		goto __199
	case INST_INCR_SCALAR_STK:
		goto __200
	case INST_INCR_STK:
		goto __201

	case INST_INCR_ARRAY_STK_IMM:
		goto __202
	case INST_INCR_SCALAR_STK_IMM:
		goto __203
	case INST_INCR_STK_IMM:
		goto __204

	case INST_INCR_ARRAY1_IMM:
		goto __205

	case INST_INCR_SCALAR1_IMM:
		goto __206

	//	   End of INST_INCR instructions.
	// -----------------------------------------------------------------
	//	   Start of INST_EXIST instructions.

	case INST_EXIST_SCALAR:
		goto __207

	case INST_EXIST_ARRAY:
		goto __208

	case INST_EXIST_ARRAY_STK:
		goto __209

	case INST_EXIST_STK:
		goto __210

	case INST_UNSET_SCALAR:
		goto __211

	case INST_UNSET_ARRAY:
		goto __212

	case INST_UNSET_ARRAY_STK:
		goto __213

	case INST_UNSET_STK:
		goto __214

		// This is really an unset operation these days. Do not issue.

	case INST_DICT_DONE:
		goto __215

	//	   End of INST_UNSET instructions.
	// -----------------------------------------------------------------
	//	   Start of INST_ARRAY instructions.

	case INST_ARRAY_EXISTS_IMM:
		goto __216
	case INST_ARRAY_EXISTS_STK:
		goto __217

	case INST_ARRAY_MAKE_IMM:
		goto __218
	case INST_ARRAY_MAKE_STK:
		goto __219

	case INST_UPVAR:
		goto __220

	case INST_NSUPVAR:
		goto __221

	case INST_VARIABLE:
		goto __222

	//	   End of variable linking instructions.
	// -----------------------------------------------------------------

	case INST_JUMP1:
		goto __223

	case INST_JUMP4:
		goto __224

		// TODO: consider rewrite so we don't compute the offset we're not
		// going to take.
	case INST_JUMP_FALSE4:
		goto __225

	case INST_JUMP_TRUE4:
		goto __226

	case INST_JUMP_FALSE1:
		goto __227

	case INST_JUMP_TRUE1:
		goto __228

	case INST_JUMP_TABLE:
		goto __229

	// These two instructions are now redundant: the complete logic of the LOR
	// and LAND is now handled by the expression compiler.

	case INST_LOR:
		goto __230
	case INST_LAND:
		goto __231

	// -----------------------------------------------------------------
	//	   Start of general introspector instructions.

	case INST_NS_CURRENT:
		goto __232
	case INST_COROUTINE_NAME:
		goto __233
	case INST_INFO_LEVEL_NUM:
		goto __234
	case INST_INFO_LEVEL_ARGS:
		goto __235

	case INST_RESOLVE_COMMAND:
		goto __236

	case INST_ORIGIN_COMMAND:
		goto __237

	case INST_TCLOO_SELF:
		goto __238

	case INST_TCLOO_NEXT_CLASS:
		goto __239

	case INST_TCLOO_NEXT:
		goto __240

	case INST_TCLOO_IS_OBJECT:
		goto __241
	case INST_TCLOO_CLASS:
		goto __242
	case INST_TCLOO_NS:
		goto __243

	case INST_LIST:
		goto __244

	case INST_LIST_LENGTH:
		goto __245

	case INST_LIST_INDEX:
		goto __246 // Already has the correct refCount

	case INST_LIST_INDEX_IMM:
		goto __247

	case INST_LIST_INDEX_MULTI:
		goto __248

	case INST_LSET_FLAT:
		goto __249

	case INST_LSET_LIST:
		goto __250

	case INST_LIST_RANGE_IMM:
		goto __251

	case INST_LIST_IN:
		goto __252
	case INST_LIST_NOT_IN:
		goto __253

	case INST_LIST_CONCAT:
		goto __254

	//	   End of INST_LIST and related instructions.
	// -----------------------------------------------------------------
	//	   Start of string-related instructions.

	case INST_STR_EQ:
		goto __255
	case INST_STR_NEQ:
		goto __256 // String (in)equality check
	case INST_STR_CMP:
		goto __257

	case INST_STR_LEN:
		goto __258

	case INST_STR_UPPER:
		goto __259
	case INST_STR_LOWER:
		goto __260
	case INST_STR_TITLE:
		goto __261

	case INST_STR_INDEX:
		goto __262

	case INST_STR_RANGE:
		goto __263

	case INST_STR_RANGE_IMM:
		goto __264

	case INST_STR_REPLACE:
		goto __265

	case INST_STR_MAP:
		goto __266

	case INST_STR_FIND:
		goto __267

	case INST_STR_FIND_LAST:
		goto __268

	case INST_STR_CLASS:
		goto __269

	case INST_STR_MATCH:
		goto __270

	case INST_STR_TRIM_LEFT:
		goto __271
	case INST_STR_TRIM_RIGHT:
		goto __272
	case INST_STR_TRIM:
		goto __273

	case INST_REGEXP:
		goto __274

	case INST_NUM_TYPE:
		goto __275

	case INST_EQ:
		goto __276
	case INST_NEQ:
		goto __277
	case INST_LT:
		goto __278
	case INST_GT:
		goto __279
	case INST_LE:
		goto __280
	case INST_GE:
		goto __281

	case INST_MOD:
		goto __282
	case INST_LSHIFT:
		goto __283
	case INST_RSHIFT:
		goto __284
	case INST_BITOR:
		goto __285
	case INST_BITXOR:
		goto __286
	case INST_BITAND:
		goto __287

	case INST_EXPON:
		goto __288
	case INST_ADD:
		goto __289
	case INST_SUB:
		goto __290
	case INST_DIV:
		goto __291
	case INST_MULT:
		goto __292

	case INST_LNOT:
		goto __293

	case INST_BITNOT:
		goto __294

	case INST_UMINUS:
		goto __295

	case INST_UPLUS:
		goto __296
	case INST_TRY_CVT_TO_NUMERIC:
		goto __297

	//	   End of numeric operator instructions.
	// -----------------------------------------------------------------

	case INST_TRY_CVT_TO_BOOLEAN:
		goto __298

	case INST_BREAK:
		goto __299

	case INST_CONTINUE:
		goto __300

	case INST_FOREACH_START4:
		goto __301

	case INST_FOREACH_STEP4:
		goto __302

	case INST_FOREACH_START:
		goto __303

	case INST_FOREACH_STEP:
		goto __304

	case INST_FOREACH_END:
		goto __305

	case INST_LMAP_COLLECT:
		goto __306

	case INST_BEGIN_CATCH4:
		goto __307

	case INST_END_CATCH:
		goto __308

	case INST_PUSH_RESULT:
		goto __309

	case INST_PUSH_RETURN_CODE:
		goto __310

	case INST_PUSH_RETURN_OPTIONS:
		goto __311

	case INST_RETURN_CODE_BRANCH:
		goto __312

	case INST_DICT_VERIFY:
		goto __313

	case INST_DICT_GET:
		goto __314
	case INST_DICT_EXISTS:
		goto __315

	case INST_DICT_SET:
		goto __316
	case INST_DICT_UNSET:
		goto __317
	case INST_DICT_INCR_IMM:
		goto __318

	case INST_DICT_APPEND:
		goto __319
	case INST_DICT_LAPPEND:
		goto __320

	case INST_DICT_FIRST:
		goto __321

	case INST_DICT_NEXT:
		goto __322

	case INST_DICT_UPDATE_START:
		goto __323

	case INST_DICT_UPDATE_END:
		goto __324

	case INST_DICT_EXPAND:
		goto __325

	case INST_DICT_RECOMBINE_STK:
		goto __326

	case INST_DICT_RECOMBINE_IMM:
		goto __327

	//	   End of dictionary-related instructions.
	// -----------------------------------------------------------------

	case INST_CLOCK_READ:
		goto __328

	default:
		goto __329
	}
	goto __141
__142:
__143:
	code = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3))))
	level = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(3)))))

	// OBJ_AT_TOS is returnOpts, OBJ_UNDER_TOS is resultObjPtr.

	result = XTclProcessReturn(tls, interp, code, level, *(*uintptr)(unsafe.Pointer(tosPtr)))
	if !(result == TCL_OK) {
		goto __330
	}

__331:
	;
	if !(1 == 0) {
		goto __334
	}
	if !(0 != 0) {
		goto __336
	}
	if !(0 > 0) {
		goto __337
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __338
__337:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__338:
	;
__336:
	;
	pc += uintptr(9)
	goto cleanup0
	goto __335
__334:
	if !(0 != 0) {
		goto __339
	}
	if !(0 > 0) {
		goto __341
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__341:
	;
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __343
	case 2:
		goto __344
	case 0:
		goto __345
	}
	goto __342
__343:
	goto cleanup1_pushObjResultPtr
__344:
	goto cleanup2_pushObjResultPtr
__345:
	goto __342
__342:
	;
	goto __340
__339:
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __347
	case 2:
		goto __348
	case 0:
		goto __349
	}
	goto __346
__347:
	goto cleanup1
__348:
	goto cleanup2
__349:
	goto __346
__346:
	;
__340:
	;
__335:
	;
	goto __332
__332:
	if 0 != 0 {
		goto __331
	}
	goto __333
__333:
	;
__330:
	;
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)))
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_SYNTAX) {
		goto __350
	}
	*(*int32)(unsafe.Pointer(interp + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED)
__350:
	;
	cleanup = 2

	goto processExceptionReturn

__144:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	result = XTcl_SetReturnOptions(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
	if !(result == TCL_OK) {
		goto __351
	}
__353:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(tosPtr))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __356
	}
	XTclFreeObj(tls, _objPtr1)
__356:
	;
	goto __354
__354:
	if 0 != 0 {
		goto __353
	}
	goto __355
__355:
	;
	*(*uintptr)(unsafe.Pointer(tosPtr)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))

__357:
	;
	if !(0 == 0) {
		goto __360
	}
	if !(0 != 0) {
		goto __362
	}
	if !(0 > 0) {
		goto __363
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __364
__363:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__364:
	;
__362:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __361
__360:
	if !(0 != 0) {
		goto __365
	}
	if !(0 > 0) {
		goto __367
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__367:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __369
	case 2:
		goto __370
	case 0:
		goto __371
	}
	goto __368
__369:
	goto cleanup1_pushObjResultPtr
__370:
	goto cleanup2_pushObjResultPtr
__371:
	goto __368
__368:
	;
	goto __366
__365:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __373
	case 2:
		goto __374
	case 0:
		goto __375
	}
	goto __372
__373:
	goto cleanup1
__374:
	goto cleanup2
__375:
	goto __372
__372:
	;
__366:
	;
__361:
	;
	goto __358
__358:
	if 0 != 0 {
		goto __357
	}
	goto __359
__359:
	;
	goto __352
__351:
	if !(result == TCL_ERROR) {
		goto __376
	}
	// BEWARE! Must do this in this order, because an error in the
	// option dictionary overrides the result (and can be verified by
	// test).

	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
	XTcl_SetReturnOptions(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
__378:
	_objPtr2 = *(*uintptr)(unsafe.Pointer(tosPtr))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __381
	}
	XTclFreeObj(tls, _objPtr2)
__381:
	;
	goto __379
__379:
	if 0 != 0 {
		goto __378
	}
	goto __380
__380:
	;
	*(*uintptr)(unsafe.Pointer(tosPtr)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
	goto __377
__376:
__382:
	_objPtr3 = *(*uintptr)(unsafe.Pointer(tosPtr))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __385
	}
	XTclFreeObj(tls, _objPtr3)
__385:
	;
	goto __383
__383:
	if 0 != 0 {
		goto __382
	}
	goto __384
__384:
	;
	*(*uintptr)(unsafe.Pointer(tosPtr)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
__377:
	;
__352:
	;
	cleanup = 1

	goto processExceptionReturn

__145:
	corPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcorPtr

	if !!(corPtr != 0) {
		goto __386
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+9112, -1))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+9152, ts+9162,
		uintptr(0)))
	checkInterp = 1
	goto gotError
__386:
	;

	yieldParameter = 0
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
	goto doYield

__146:
	corPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcorPtr
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	if !!(corPtr != 0) {
		goto __387
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+9194, -1))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+9152, ts+9162,
		uintptr(0)))
	checkInterp = 1
	goto gotError
__387:
	;
	if !((*Namespace)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr)).Fflags&NS_DYING != 0) {
		goto __388
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+9236, -1))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+9152, ts+9272,
		uintptr(0)))
	checkInterp = 1
	goto gotError
__388:
	;

	// Install a tailcall record in the caller and continue with the
	// yield. The yield is switched into multi-return mode (via the
	// 'yieldParameter').

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount++
	(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FcallerEEPtr
	XTclSetTailcall(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	(*Interp)(unsafe.Pointer(interp)).FexecEnvPtr = (*CoroutineData)(unsafe.Pointer(corPtr)).FeePtr
	yieldParameter = int32(uintptr(0)) + 1 //==CORO_ACTIVATE_YIELDM

doYield:
	// TIP #280: Record the last piece of info needed by
	// 'TclGetSrcInfoForPc', and push the frame.

	*(*uintptr)(unsafe.Pointer(TD + 24 + 40 + 8 /* &.pc */)) = pc
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = TD + 24

	if !((*Interp)(unsafe.Pointer(interp)).Fflags&INTERP_DEBUG_FRAME != 0) {
		goto __389
	}
	sArgumentBCEnter(tls, interp, (*TEBCdata)(unsafe.Pointer(TD)).FcodePtr, TD, pc, *(*int32)(unsafe.Pointer(bp + 720 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)))
__389:
	;

	pc++
	cleanup = 1
__390:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
__393:
__396:
	;
__399:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __402
	}
	XTclAllocateFreeObjects(tls)
__402:
	;
	_objPtr4 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __400
__400:
	if 0 != 0 {
		goto __399
	}
	goto __401
__401:
	;
	_callbackPtr = _objPtr4
	goto __397
__397:
	if 0 != 0 {
		goto __396
	}
	goto __398
__398:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTEBCresume}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = TD
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = pc
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(Intptr_t(cleanup))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __394
__394:
	if 0 != 0 {
		goto __393
	}
	goto __395
__395:
	;
	goto __391
__391:
	if 0 != 0 {
		goto __390
	}
	goto __392
__392:
	;
__403:
__406:
	;
__409:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __412
	}
	XTclAllocateFreeObjects(tls)
__412:
	;
	_objPtr5 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __410
__410:
	if 0 != 0 {
		goto __409
	}
	goto __411
__411:
	;
	_callbackPtr1 = _objPtr5
	goto __407
__407:
	if 0 != 0 {
		goto __406
	}
	goto __408
__408:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr1)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{XTclNRCoroutineActivateCallback}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8)) = corPtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8 + 1*8)) = uintptr(Intptr_t(yieldParameter))
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr1 + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr1)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr1
	goto __404
__404:
	if 0 != 0 {
		goto __403
	}
	goto __405
__405:
	;
	return TCL_OK

__147:

	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))

	if !!((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FisProcCallFrame&1 != 0) {
		goto __413
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+28868, -1))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+9042, ts+9051, uintptr(0)))
	checkInterp = 1
	goto gotError
__413:
	;

	// Push the evaluation of the called command into the NR callback
	// stack.

	listPtr = XTcl_NewListObj(tls, opnd, tosPtr-uintptr(opnd-1)*8)
	nsObjPtr = XTcl_NewStringObj(tls, (*Namespace)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr)).FfullName, -1)
	XTclListObjSetElement(tls, interp, listPtr, 0, nsObjPtr)
	if !((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FtailcallPtr != 0) {
		goto __414
	}
__415:
	_objPtr6 = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FtailcallPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __418
	}
	XTclFreeObj(tls, _objPtr6)
__418:
	;
	goto __416
__416:
	if 0 != 0 {
		goto __415
	}
	goto __417
__417:
	;
__414:
	;
	(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FtailcallPtr = listPtr

	result = TCL_RETURN
	cleanup = opnd
	goto processExceptionReturn

__148:
	if !(tosPtr > TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8) {
		goto __419
	}

	if !(int32(*(*ClientData)(unsafe.Pointer(data + 3*8)))&TCL_EVAL_DISCARD_RESULT != 0 && result == TCL_OK) {
		goto __420
	}
	// simulate pop & fast done (like it does continue in loop)

	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __421
	}
	goto __422
__421:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __423
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __425
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__425:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__426:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __427
__427:
	if 0 != 0 {
		goto __426
	}
	goto __428
__428:
	;
	goto __424
__423:
	XTclFreeObj(tls, objPtr)
__424:
	;
__422:
	;

	goto abnormalReturn
__420:
	;
	// Set the interpreter's object result to point to the topmost
	// object from the stack, and check for a possible [catch]. The
	// stackTop's level and refCount will be handled by "processCatch"
	// or "abnormalReturn".

	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
	goto checkForCatch
__419:
	;
	_ = *(*byte)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	goto abnormalReturn

__149:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FobjArrayPtr + uintptr(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24)|uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16)|uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8)|uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))*8))

__429:
	;
	if !(0 == 0) {
		goto __432
	}
	if !(1 != 0) {
		goto __434
	}
	if !(1 > 0) {
		goto __435
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __436
__435:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__436:
	;
__434:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __433
__432:
	if !(1 != 0) {
		goto __437
	}
	if !(1 > 0) {
		goto __439
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__439:
	;
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __441
	case 2:
		goto __442
	case 0:
		goto __443
	}
	goto __440
__441:
	goto cleanup1_pushObjResultPtr
__442:
	goto cleanup2_pushObjResultPtr
__443:
	goto __440
__440:
	;
	goto __438
__437:
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __445
	case 2:
		goto __446
	case 0:
		goto __447
	}
	goto __444
__445:
	goto cleanup1
__446:
	goto cleanup2
__447:
	goto __444
__444:
	;
__438:
	;
__433:
	;
	goto __430
__430:
	if 0 != 0 {
		goto __429
	}
	goto __431
__431:
	;
	goto __141

__150:
	;
	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __448
	}
	goto __449
__448:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __450
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __452
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__452:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__453:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __454
__454:
	if 0 != 0 {
		goto __453
	}
	goto __455
__455:
	;
	goto __451
__450:
	XTclFreeObj(tls, objPtr)
__451:
	;
__449:
	;

__456:
	;
	if !(0 == 0) {
		goto __459
	}
	if !(0 != 0) {
		goto __461
	}
	if !(0 > 0) {
		goto __462
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __463
__462:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__463:
	;
__461:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __460
__459:
	if !(0 != 0) {
		goto __464
	}
	if !(0 > 0) {
		goto __466
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__466:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __468
	case 2:
		goto __469
	case 0:
		goto __470
	}
	goto __467
__468:
	goto cleanup1_pushObjResultPtr
__469:
	goto cleanup2_pushObjResultPtr
__470:
	goto __467
__467:
	;
	goto __465
__464:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __472
	case 2:
		goto __473
	case 0:
		goto __474
	}
	goto __471
__472:
	goto cleanup1
__473:
	goto cleanup2
__474:
	goto __471
__471:
	;
__465:
	;
__460:
	;
	goto __457
__457:
	if 0 != 0 {
		goto __456
	}
	goto __458
__458:
	;
	goto __141

__151:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

__475:
	;
	if !(0 == 0) {
		goto __478
	}
	if !(1 != 0) {
		goto __480
	}
	if !(1 > 0) {
		goto __481
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __482
__481:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__482:
	;
__480:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __479
__478:
	if !(1 != 0) {
		goto __483
	}
	if !(1 > 0) {
		goto __485
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__485:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __487
	case 2:
		goto __488
	case 0:
		goto __489
	}
	goto __486
__487:
	goto cleanup1_pushObjResultPtr
__488:
	goto cleanup2_pushObjResultPtr
__489:
	goto __486
__486:
	;
	goto __484
__483:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __491
	case 2:
		goto __492
	case 0:
		goto __493
	}
	goto __490
__491:
	goto cleanup1
__492:
	goto cleanup2
__493:
	goto __490
__490:
	;
__484:
	;
__479:
	;
	goto __476
__476:
	if 0 != 0 {
		goto __475
	}
	goto __477
__477:
	;
	goto __141

__152:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(opnd)*8))

__494:
	;
	if !(0 == 0) {
		goto __497
	}
	if !(1 != 0) {
		goto __499
	}
	if !(1 > 0) {
		goto __500
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __501
__500:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__501:
	;
__499:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __498
__497:
	if !(1 != 0) {
		goto __502
	}
	if !(1 > 0) {
		goto __504
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__504:
	;
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __506
	case 2:
		goto __507
	case 0:
		goto __508
	}
	goto __505
__506:
	goto cleanup1_pushObjResultPtr
__507:
	goto cleanup2_pushObjResultPtr
__508:
	goto __505
__505:
	;
	goto __503
__502:
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __510
	case 2:
		goto __511
	case 0:
		goto __512
	}
	goto __509
__510:
	goto cleanup1
__511:
	goto cleanup2
__512:
	goto __509
__509:
	;
__503:
	;
__498:
	;
	goto __495
__495:
	if 0 != 0 {
		goto __494
	}
	goto __496
__496:
	;
	goto __141

__153:

	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	a = tosPtr - uintptr(opnd-1)*8
	b = tosPtr
__513:
	if !(a < b) {
		goto __514
	}
	tmpPtr = *(*uintptr)(unsafe.Pointer(a))
	*(*uintptr)(unsafe.Pointer(a)) = *(*uintptr)(unsafe.Pointer(b))
	*(*uintptr)(unsafe.Pointer(b)) = tmpPtr
	a += 8
	b -= 8
	goto __513
__514:
	;

__515:
	;
	if !(0 == 0) {
		goto __518
	}
	if !(0 != 0) {
		goto __520
	}
	if !(0 > 0) {
		goto __521
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __522
__521:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__522:
	;
__520:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __519
__518:
	if !(0 != 0) {
		goto __523
	}
	if !(0 > 0) {
		goto __525
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__525:
	;
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __527
	case 2:
		goto __528
	case 0:
		goto __529
	}
	goto __526
__527:
	goto cleanup1_pushObjResultPtr
__528:
	goto cleanup2_pushObjResultPtr
__529:
	goto __526
__526:
	;
	goto __524
__523:
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __531
	case 2:
		goto __532
	case 0:
		goto __533
	}
	goto __530
__531:
	goto cleanup1
__532:
	goto cleanup2
__533:
	goto __530
__530:
	;
__524:
	;
__519:
	;
	goto __516
__516:
	if 0 != 0 {
		goto __515
	}
	goto __517
__517:
	;

	goto __141

__154:
	appendLen = 0
	onlyb = 1

	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))

	// Detect only-bytearray-or-null case.

	currPtr = tosPtr - uintptr(opnd-1)*8
__534:
	if !(currPtr <= tosPtr) {
		goto __536
	}
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).FtypePtr != uintptr(unsafe.Pointer(&XtclByteArrayType)) &&
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Fbytes != XtclEmptyStringRep) {
		goto __537
	}
	onlyb = 0
	goto __536
	goto __538
__537:
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Fbytes != uintptr(0)) {
		goto __539
	}
	onlyb = 0
	goto __536
__539:
	;
__538:
	;
	goto __535
__535:
	currPtr += 8
	goto __534
	goto __536
__536:
	;

	// Compute the length to be appended.

	if !(onlyb != 0) {
		goto __540
	}
	currPtr = tosPtr - uintptr(opnd-2)*8
__542:
	if !(appendLen >= 0 && currPtr <= tosPtr) {
		goto __544
	}
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Fbytes != XtclEmptyStringRep) {
		goto __545
	}
	XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(currPtr)), bp+704)
	appendLen = appendLen + *(*int32)(unsafe.Pointer(bp + 704))
__545:
	;
	goto __543
__543:
	currPtr += 8
	goto __542
	goto __544
__544:
	;
	goto __541
__540:
	currPtr = tosPtr - uintptr(opnd-2)*8
__546:
	if !(appendLen >= 0 && currPtr <= tosPtr) {
		goto __548
	}
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(currPtr)), bp+704)
	}()
	if !(bytes != uintptr(0)) {
		goto __549
	}
	appendLen = appendLen + *(*int32)(unsafe.Pointer(bp + 704))
__549:
	;
	goto __547
__547:
	currPtr += 8
	goto __546
	goto __548
__548:
	;
__541:
	;

	if !(appendLen < 0) {
		goto __550
	}
	// TODO: convert panic to error ?
	XTcl_Panic(tls, ts+9934, libc.VaList(bp+128, 0x7fffffff))
__550:
	;

	// If nothing is to be appended, just return the first object by
	// dropping all the others from the stack; this saves both the
	// computation and copy of the string rep of the first object,
	// enabling the fast '$x[set x {}]' idiom for 'K $x [set x {}]'.

	if !(appendLen == 0) {
		goto __551
	}

__552:
	pc += uintptr(2)
	cleanup = opnd - 1
	if !(0 != 0) {
		goto __555
	}
	if !(0 > 0) {
		goto __557
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__557:
	;
	goto cleanupV_pushObjResultPtr
	goto __556
__555:
	goto cleanupV
__556:
	;
	goto __553
__553:
	if 0 != 0 {
		goto __552
	}
	goto __554
__554:
	;
__551:
	;

	// If the first object is shared, we need a new obj for the result;
	// otherwise, we can reuse the first object. In any case, make sure it
	// has enough room to accomodate all the concatenated bytes. Note that
	// if it is unshared its bytes are copied by ckrealloc, so that we set
	// the loop parameters to avoid copying them again: p points to the
	// end of the already copied bytes, currPtr to the second object.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(opnd-1)*8))
	if !!(onlyb != 0) {
		goto __558
	}
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936)), bp+704)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 704))+appendLen < 0) {
		goto __560
	}
	// TODO: convert panic to error ?
	XTcl_Panic(tls, ts+9934,
		libc.VaList(bp+136, 0x7fffffff))
__560:
	;
	if !(bytes != XtclEmptyStringRep && !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount > 1)) {
		goto __561
	}
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr != uintptr(0)) {
		goto __563
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __564
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
__564:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))).FtypePtr = uintptr(0)
__563:
	;

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))).Fbytes = XTcl_Realloc(tls, bytes, uint32(*(*int32)(unsafe.Pointer(bp + 704))+appendLen+1))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))).Flength = *(*int32)(unsafe.Pointer(bp + 704)) + appendLen
	p = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 936)))
	}() + uintptr(*(*int32)(unsafe.Pointer(bp + 704)))
	currPtr = tosPtr - uintptr(opnd-2)*8
	goto __562
__561:

	p = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 704))+appendLen+1))
__565:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __568
	}
	XTclAllocateFreeObjects(tls)
__568:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __566
__566:
	if 0 != 0 {
		goto __565
	}
	goto __567
__567:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))).Fbytes = p
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))).Flength = *(*int32)(unsafe.Pointer(bp + 704)) + appendLen
	currPtr = tosPtr - uintptr(opnd-1)*8
__562:
	;

	// Append the remaining characters.

__569:
	if !(currPtr <= tosPtr) {
		goto __571
	}
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(currPtr)), bp+704)
	}()
	if !(bytes != uintptr(0)) {
		goto __572
	}
	libc.Xmemcpy(tls, p, bytes, uint64(*(*int32)(unsafe.Pointer(bp + 704 /* length */))))
	p += uintptr(*(*int32)(unsafe.Pointer(bp + 704 /* length */)))
__572:
	;
	goto __570
__570:
	currPtr += 8
	goto __569
	goto __571
__571:
	;
	*(*int8)(unsafe.Pointer(p)) = int8(0)
	goto __559
__558:
	bytes = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), bp+704)
	if !(*(*int32)(unsafe.Pointer(bp + 704))+appendLen < 0) {
		goto __573
	}
	// TODO: convert panic to error ?
	XTcl_Panic(tls, ts+9934,
		libc.VaList(bp+144, 0x7fffffff))
__573:
	;
	if !!((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount > 1) {
		goto __574
	}
	bytes = XTcl_SetByteArrayLength(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)),
		*(*int32)(unsafe.Pointer(bp + 704))+appendLen)
	p = bytes + uintptr(*(*int32)(unsafe.Pointer(bp + 704)))
	currPtr = tosPtr - uintptr(opnd-2)*8
	goto __575
__574:
	;
__576:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __579
	}
	XTclAllocateFreeObjects(tls)
__579:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __577
__577:
	if 0 != 0 {
		goto __576
	}
	goto __578
__578:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	bytes = XTcl_SetByteArrayLength(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)),
		*(*int32)(unsafe.Pointer(bp + 704))+appendLen)
	p = bytes
	currPtr = tosPtr - uintptr(opnd-1)*8
__575:
	;

	// Append the remaining characters.

__580:
	if !(currPtr <= tosPtr) {
		goto __582
	}
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(currPtr)))).Fbytes != XtclEmptyStringRep) {
		goto __583
	}
	bytes = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(currPtr)), bp+704)
	libc.Xmemcpy(tls, p, bytes, uint64(*(*int32)(unsafe.Pointer(bp + 704 /* length */))))
	p += uintptr(*(*int32)(unsafe.Pointer(bp + 704 /* length */)))
__583:
	;
	goto __581
__581:
	currPtr += 8
	goto __580
	goto __582
__582:
	;
__559:
	;

__584:
	pc += uintptr(2)
	cleanup = opnd
	if !(1 != 0) {
		goto __587
	}
	if !(1 > 0) {
		goto __589
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__589:
	;
	goto cleanupV_pushObjResultPtr
	goto __588
__587:
	goto cleanupV
__588:
	;
	goto __585
__585:
	if 0 != 0 {
		goto __584
	}
	goto __586
__586:
	;

__155:
	// Pop the opnd (objc) top stack elements, run through Tcl_ConcatObj,
	// and then decrement their ref counts.

	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_ConcatObj(tls, opnd, tosPtr-uintptr(opnd-1)*8)

__590:
	pc += uintptr(5)
	cleanup = opnd
	if !(1 != 0) {
		goto __593
	}
	if !(1 > 0) {
		goto __595
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__595:
	;
	goto cleanupV_pushObjResultPtr
	goto __594
__593:
	goto cleanupV
__594:
	;
	goto __591
__591:
	if 0 != 0 {
		goto __590
	}
	goto __592
__592:
	;

__156:
	// Push an element to the auxObjList. This records the current
	// stack depth - i.e., the point in the stack where the expanded
	// command starts.
	//
	// Use a Tcl_Obj as linked list element; slight mem waste, but faster
	// allocation than ckalloc. This also abuses the Tcl_Obj structure, as
	// we do not define a special tclObjType for it. It is not dangerous
	// as the obj is never passed anywhere, so that all manipulations are
	// performed here and in INST_INVOKE_EXPANDED (in case of an expansion
	// error, also in INST_EXPAND_STKTOP).

	;
__596:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __599
	}
	XTclAllocateFreeObjects(tls)
__599:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __597
__597:
	if 0 != 0 {
		goto __596
	}
	goto __598
__598:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

	*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr((int64(tosPtr) - int64(TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8)) / 8)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
__600:
	if !((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList != 0) {
		goto __603
	}
	*(*int32)(unsafe.Pointer(objPtr + 16)) += (*Tcl_Obj)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList)).Flength
__603:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = (*TEBCdata)(unsafe.Pointer(TD)).FauxObjList
	(*TEBCdata)(unsafe.Pointer(TD)).FauxObjList = objPtr
	goto __601
__601:
	if 0 != 0 {
		goto __600
	}
	goto __602
__602:
	;

__604:
	;
	if !(0 == 0) {
		goto __607
	}
	if !(0 != 0) {
		goto __609
	}
	if !(0 > 0) {
		goto __610
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __611
__610:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__611:
	;
__609:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __608
__607:
	if !(0 != 0) {
		goto __612
	}
	if !(0 > 0) {
		goto __614
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__614:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __616
	case 2:
		goto __617
	case 0:
		goto __618
	}
	goto __615
__616:
	goto cleanup1_pushObjResultPtr
__617:
	goto cleanup2_pushObjResultPtr
__618:
	goto __615
__615:
	;
	goto __613
__612:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __620
	case 2:
		goto __621
	case 0:
		goto __622
	}
	goto __619
__620:
	goto cleanup1
__621:
	goto cleanup2
__622:
	goto __619
__619:
	;
__613:
	;
__608:
	;
	goto __605
__605:
	if 0 != 0 {
		goto __604
	}
	goto __606
__606:
	;
	goto __141

__157:
	// Drops an element of the auxObjList, popping stack elements to
	// restore the stack to the state before the point where the aux
	// element was created.

	;
	*(*int32)(unsafe.Pointer(bp + 720 /* objc */)) = int32((int64(tosPtr)-int64(TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8))/8 - Ptrdiff_t(int32(*(*uintptr)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList + 32 + 8)))))
__623:
	tmpPtr = (*TEBCdata)(unsafe.Pointer(TD)).FauxObjList
	(*TEBCdata)(unsafe.Pointer(TD)).FauxObjList = *(*uintptr)(unsafe.Pointer(tmpPtr + 32))
__626:
	_objPtr7 = tmpPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __629
	}
	XTclFreeObj(tls, _objPtr7)
__629:
	;
	goto __627
__627:
	if 0 != 0 {
		goto __626
	}
	goto __628
__628:
	;
	goto __624
__624:
	if 0 != 0 {
		goto __623
	}
	goto __625
__625:
	;

__630:
	pc += uintptr(1)
	cleanup = *(*int32)(unsafe.Pointer(bp + 720))
	if !(0 != 0) {
		goto __633
	}
	if !(0 > 0) {
		goto __635
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__635:
	;
	goto cleanupV_pushObjResultPtr
	goto __634
__633:
	goto cleanupV
__634:
	;
	goto __631
__631:
	if 0 != 0 {
		goto __630
	}
	goto __632
__632:
	;

__158:

	// Make sure that the element at stackTop is a list; if not, just
	// leave with an error. Note that the element from the expand list
	// will be removed at checkForCatch.

	objPtr = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(objPtr + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, objPtr, bp+720, bp+712)
	}() != TCL_OK) {
		goto __636
	}

	goto gotError
__636:
	;
	_ = *(*byte)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))

	// Make sure there is enough room in the stack to expand this list
	// *and* process the rest of the command (at least up to the next
	// argument expansion or command end). The operand is the current
	// stack depth, as seen by the compiler.

	*(*int32)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList + 16)) += *(*int32)(unsafe.Pointer(bp + 720)) - 1
	if !(*(*int32)(unsafe.Pointer(bp + 720)) > 1 && (*Tcl_Obj)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList)).Flength > 0) {
		goto __637
	}
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = int32(Ptrdiff_t((*Tcl_Obj)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList)).Flength+
		(*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxStackDepth) -
		(int64(tosPtr)-int64(TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8))/8) // Relative to where we are
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	moved = (int64(sGrowEvaluationStack(tls, (*Interp)(unsafe.Pointer(interp)).FexecEnvPtr, *(*int32)(unsafe.Pointer(bp + 704)), 1)) -
		int64(TD)) / 8
	if !(moved != 0) {
		goto __638
	}
	// Change the global data to point to the new stack: move the
	// TEBCdataPtr TD, recompute the position of every other
	// stack-allocated parameter, update the stack pointers.

	TD = TD + uintptr(moved)*8

	*(*uintptr)(unsafe.Pointer(TD + 8)) += uintptr(moved) * 8
	tosPtr += 8 * uintptr(moved)
__638:
	;
__637:
	;

	// Expand the list at stacktop onto the stack; free the list. Knowing
	// that it has a freeIntRepProc we use Tcl_DecrRefCount().

	i = 0
__639:
	if !(i < *(*int32)(unsafe.Pointer(bp + 720))) {
		goto __641
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 712)) + uintptr(i)*8))))).FrefCount++
	goto __640
__640:
	i++
	goto __639
	goto __641
__641:
	;

__642:
	_objPtr8 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr8)).FrefCount, 1) <= 1) {
		goto __645
	}
	XTclFreeObj(tls, _objPtr8)
__645:
	;
	goto __643
__643:
	if 0 != 0 {
		goto __642
	}
	goto __644
__644:
	;
__646:
	;
	if !(0 == 0) {
		goto __649
	}
	if !(0 != 0) {
		goto __651
	}
	if !(0 > 0) {
		goto __652
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __653
__652:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__653:
	;
__651:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __650
__649:
	if !(0 != 0) {
		goto __654
	}
	if !(0 > 0) {
		goto __656
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__656:
	;
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __658
	case 2:
		goto __659
	case 0:
		goto __660
	}
	goto __657
__658:
	goto cleanup1_pushObjResultPtr
__659:
	goto cleanup2_pushObjResultPtr
__660:
	goto __657
__657:
	;
	goto __655
__654:
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __662
	case 2:
		goto __663
	case 0:
		goto __664
	}
	goto __661
__662:
	goto cleanup1
__663:
	goto cleanup2
__664:
	goto __661
__661:
	;
__655:
	;
__650:
	;
	goto __647
__647:
	if 0 != 0 {
		goto __646
	}
	goto __648
__648:
	;

	goto __141

__159:

	*(*uintptr)(unsafe.Pointer(TD + 24 + 40 + 8 /* &.pc */)) = pc
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = TD + 24
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	newCodePtr = sCompileExprObj(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
	checkInterp = 1
	cleanup = 1
	pc++
__665:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
__668:
__671:
	;
__674:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __677
	}
	XTclAllocateFreeObjects(tls)
__677:
	;
	_objPtr9 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __675
__675:
	if 0 != 0 {
		goto __674
	}
	goto __676
__676:
	;
	_callbackPtr2 = _objPtr9
	goto __672
__672:
	if 0 != 0 {
		goto __671
	}
	goto __673
__673:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr2)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTEBCresume}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr2 + 8)) = TD
	*(*ClientData)(unsafe.Pointer(_callbackPtr2 + 8 + 1*8)) = pc
	*(*ClientData)(unsafe.Pointer(_callbackPtr2 + 8 + 2*8)) = uintptr(Intptr_t(cleanup))
	*(*ClientData)(unsafe.Pointer(_callbackPtr2 + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr2)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr2
	goto __669
__669:
	if 0 != 0 {
		goto __668
	}
	goto __670
__670:
	;
	goto __666
__666:
	if 0 != 0 {
		goto __665
	}
	goto __667
__667:
	;
	return XTclNRExecuteByteCode(tls, interp, newCodePtr)

	// INVOCATION BLOCK

__160:
instEvalStk:
	*(*uintptr)(unsafe.Pointer(TD + 24 + 40 + 8 /* &.pc */)) = pc
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = TD + 24

	cleanup = 1
	pc += uintptr(1)
	// yield next instruction
__678:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
__681:
__684:
	;
__687:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __690
	}
	XTclAllocateFreeObjects(tls)
__690:
	;
	_objPtr10 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __688
__688:
	if 0 != 0 {
		goto __687
	}
	goto __689
__689:
	;
	_callbackPtr3 = _objPtr10
	goto __685
__685:
	if 0 != 0 {
		goto __684
	}
	goto __686
__686:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr3)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTEBCresume}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr3 + 8)) = TD
	*(*ClientData)(unsafe.Pointer(_callbackPtr3 + 8 + 1*8)) = pc
	*(*ClientData)(unsafe.Pointer(_callbackPtr3 + 8 + 2*8)) = uintptr(Intptr_t(cleanup))
	*(*ClientData)(unsafe.Pointer(_callbackPtr3 + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr3)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr3
	goto __682
__682:
	if 0 != 0 {
		goto __681
	}
	goto __683
__683:
	;
	goto __679
__679:
	if 0 != 0 {
		goto __678
	}
	goto __680
__680:
	;
	// add TEBCResume for object at top of stack
	return XTclNRExecuteByteCode(tls, interp,
		XTclCompileObj(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), uintptr(0), 0))

__161:
	;
	*(*int32)(unsafe.Pointer(bp + 720 /* objc */)) = int32((int64(tosPtr)-int64(TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8))/8 - Ptrdiff_t(int32(*(*uintptr)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList + 32 + 8)))))
__691:
	tmpPtr = (*TEBCdata)(unsafe.Pointer(TD)).FauxObjList
	(*TEBCdata)(unsafe.Pointer(TD)).FauxObjList = *(*uintptr)(unsafe.Pointer(tmpPtr + 32))
__694:
	_objPtr11 = tmpPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr11)).FrefCount, 1) <= 1) {
		goto __697
	}
	XTclFreeObj(tls, _objPtr11)
__697:
	;
	goto __695
__695:
	if 0 != 0 {
		goto __694
	}
	goto __696
__696:
	;
	goto __692
__692:
	if 0 != 0 {
		goto __691
	}
	goto __693
__693:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 720)) != 0) {
		goto __698
	}
	pcAdjustment = 1
	goto doInvocation
__698:
	;

	// Nothing was expanded, return {}.

__699:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __702
	}
	XTclAllocateFreeObjects(tls)
__702:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __700
__700:
	if 0 != 0 {
		goto __699
	}
	goto __701
__701:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

__703:
	;
	if !(0 == 0) {
		goto __706
	}
	if !(1 != 0) {
		goto __708
	}
	if !(1 > 0) {
		goto __709
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __710
__709:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__710:
	;
__708:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __707
__706:
	if !(1 != 0) {
		goto __711
	}
	if !(1 > 0) {
		goto __713
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__713:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __715
	case 2:
		goto __716
	case 0:
		goto __717
	}
	goto __714
__715:
	goto cleanup1_pushObjResultPtr
__716:
	goto cleanup2_pushObjResultPtr
__717:
	goto __714
__714:
	;
	goto __712
__711:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __719
	case 2:
		goto __720
	case 0:
		goto __721
	}
	goto __718
__719:
	goto cleanup1
__720:
	goto cleanup2
__721:
	goto __718
__718:
	;
__712:
	;
__707:
	;
	goto __704
__704:
	if 0 != 0 {
		goto __703
	}
	goto __705
__705:
	;
	goto __141

__162:
	*(*int32)(unsafe.Pointer(bp + 720 /* objc */)) = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	goto doInvocation

__163:
	*(*int32)(unsafe.Pointer(bp + 720 /* objc */)) = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	pcAdjustment = 2

doInvocation:
	*(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)) = tosPtr - uintptr(*(*int32)(unsafe.Pointer(bp + 720))-1)*8
	cleanup = *(*int32)(unsafe.Pointer(bp + 720 /* objc */))

	// Finally, let TclEvalObjv handle the command.
	//
	// TIP #280: Record the last piece of info needed by
	// 'TclGetSrcInfoForPc', and push the frame.

	*(*uintptr)(unsafe.Pointer(TD + 24 + 40 + 8 /* &.pc */)) = pc
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = TD + 24

	if !((*Interp)(unsafe.Pointer(interp)).Fflags&INTERP_DEBUG_FRAME != 0) {
		goto __722
	}
	sArgumentBCEnter(tls, interp, (*TEBCdata)(unsafe.Pointer(TD)).FcodePtr, TD, pc, *(*int32)(unsafe.Pointer(bp + 720 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)))
__722:
	;

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr

	pc += uintptr(pcAdjustment)
__723:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
__726:
__729:
	;
__732:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __735
	}
	XTclAllocateFreeObjects(tls)
__735:
	;
	_objPtr12 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __733
__733:
	if 0 != 0 {
		goto __732
	}
	goto __734
__734:
	;
	_callbackPtr4 = _objPtr12
	goto __730
__730:
	if 0 != 0 {
		goto __729
	}
	goto __731
__731:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr4)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTEBCresume}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr4 + 8)) = TD
	*(*ClientData)(unsafe.Pointer(_callbackPtr4 + 8 + 1*8)) = pc
	*(*ClientData)(unsafe.Pointer(_callbackPtr4 + 8 + 2*8)) = uintptr(Intptr_t(cleanup))
	*(*ClientData)(unsafe.Pointer(_callbackPtr4 + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr4)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr4
	goto __727
__727:
	if 0 != 0 {
		goto __726
	}
	goto __728
__728:
	;
	goto __724
__724:
	if 0 != 0 {
		goto __723
	}
	goto __725
__725:
	;
	return XTclNREvalObjv(tls, interp, *(*int32)(unsafe.Pointer(bp + 720 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)),
		TCL_EVAL_NOERR|TCL_EVAL_SOURCE_IN_FRAME, uintptr(0))

__164:
	// Call one of the built-in pre-8.5 Tcl math functions. This
	// translates to INST_INVOKE_STK1 with the first argument of
	// ::tcl::mathfunc::$objv[0]. We need to insert the named math
	// function into the stack.

	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	if !(opnd < 0 || opnd > LAST_BUILTIN_FUNC) {
		goto __736
	}

	XTcl_Panic(tls, ts+28918, libc.VaList(bp+152, opnd))
__736:
	;

__737:
	;
__740:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __743
	}
	XTclAllocateFreeObjects(tls)
__743:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __741
__741:
	if 0 != 0 {
		goto __740
	}
	goto __742
__742:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([18]int8{}))-uint64(1)) == 0) {
		goto __744
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	goto __745
__744:
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([18]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, ts+6897, uint64(int32(uint64(unsafe.Sizeof([18]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + 17)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32(uint64(unsafe.Sizeof([18]int8{})) - uint64(1))
__745:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

	goto __738
__738:
	if 0 != 0 {
		goto __737
	}
	goto __739
__739:
	;
	XTcl_AppendToObj(tls, objPtr, tclBuiltinFuncTable[opnd].Fname, -1)

	/*
	 * Only 0, 1 or 2 args.
	 */

	numArgs = tclBuiltinFuncTable[opnd].FnumArgs

	if !(numArgs == 0) {
		goto __746
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), objPtr))).FrefCount++
	goto __747
__746:
	if !(numArgs == 1) {
		goto __748
	}
	tmpPtr1 = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), objPtr))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), tmpPtr1))).FrefCount++
__750:
	_objPtr13 = tmpPtr1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr13)).FrefCount, 1) <= 1) {
		goto __753
	}
	XTclFreeObj(tls, _objPtr13)
__753:
	;
	goto __751
__751:
	if 0 != 0 {
		goto __750
	}
	goto __752
__752:
	;
	goto __749
__748:
	tmpPtr2 = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	tmpPtr1 = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), objPtr))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), tmpPtr1))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), tmpPtr2))).FrefCount++
__754:
	_objPtr14 = tmpPtr1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr14)).FrefCount, 1) <= 1) {
		goto __757
	}
	XTclFreeObj(tls, _objPtr14)
__757:
	;
	goto __755
__755:
	if 0 != 0 {
		goto __754
	}
	goto __756
__756:
	;
__758:
	_objPtr15 = tmpPtr2
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr15)).FrefCount, 1) <= 1) {
		goto __761
	}
	XTclFreeObj(tls, _objPtr15)
__761:
	;
	goto __759
__759:
	if 0 != 0 {
		goto __758
	}
	goto __760
__760:
	;
__749:
	;
__747:
	;
	*(*int32)(unsafe.Pointer(bp + 720 /* objc */)) = numArgs + 1

	pcAdjustment = 2
	goto doInvocation

__165:
	// Call a non-builtin Tcl math function previously registered by a
	// call to Tcl_CreateMathFunc pre-8.5. This is essentially
	// INST_INVOKE_STK1 converting the first arg to
	// ::tcl::mathfunc::$objv[0].

	*(*int32)(unsafe.Pointer(bp + 720 /* objc */)) = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))) // Number of arguments. The function
	// name is the 0-th argument.

	objPtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(*(*int32)(unsafe.Pointer(bp + 720))-1)*8))
__762:
	;
__765:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __768
	}
	XTclAllocateFreeObjects(tls)
__768:
	;
	tmpPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __766
__766:
	if 0 != 0 {
		goto __765
	}
	goto __767
__767:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([18]int8{}))-uint64(1)) == 0) {
		goto __769
	}
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Flength = 0
	goto __770
__769:
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([18]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Fbytes, ts+6897, uint64(int32(uint64(unsafe.Sizeof([18]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Fbytes + 17)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Flength = int32(uint64(unsafe.Sizeof([18]int8{})) - uint64(1))
__770:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).FtypePtr = uintptr(0)

	goto __763
__763:
	if 0 != 0 {
		goto __762
	}
	goto __764
__764:
	;
	XTcl_AppendObjToObj(tls, tmpPtr, objPtr)
__771:
	_objPtr16 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr16)).FrefCount, 1) <= 1) {
		goto __774
	}
	XTclFreeObj(tls, _objPtr16)
__774:
	;
	goto __772
__772:
	if 0 != 0 {
		goto __771
	}
	goto __773
__773:
	;

	// Variation of PUSH_OBJECT.

	*(*uintptr)(unsafe.Pointer(tosPtr - uintptr(*(*int32)(unsafe.Pointer(bp + 720))-1)*8)) = tmpPtr
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).FrefCount++

	pcAdjustment = 2
	goto doInvocation

__166:
	*(*int32)(unsafe.Pointer(bp + 720 /* objc */)) = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(5)))))
	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	*(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)) = tosPtr - uintptr(*(*int32)(unsafe.Pointer(bp + 720))-1)*8
	cleanup = *(*int32)(unsafe.Pointer(bp + 720 /* objc */))

	*(*uintptr)(unsafe.Pointer(TD + 24 + 40 + 8 /* &.pc */)) = pc
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = TD + 24
	if !((*Interp)(unsafe.Pointer(interp)).Fflags&INTERP_DEBUG_FRAME != 0) {
		goto __775
	}
	sArgumentBCEnter(tls, interp, (*TEBCdata)(unsafe.Pointer(TD)).FcodePtr, TD, pc, *(*int32)(unsafe.Pointer(bp + 720 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)))
__775:
	;

	XTclInitRewriteEnsemble(tls, interp, opnd, 1, *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)))

	copyPtr = XTcl_NewListObj(tls, *(*int32)(unsafe.Pointer(bp + 720))-opnd+1, uintptr(0))

	XTcl_ListObjAppendElement(tls, uintptr(0), copyPtr, objPtr)
	XTcl_ListObjReplace(tls, uintptr(0), copyPtr, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))), 0,
		*(*int32)(unsafe.Pointer(bp + 720))-opnd, *(*uintptr)(unsafe.Pointer(bp + 712))+uintptr(opnd)*8)
__776:
	_objPtr17 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr17)).FrefCount, 1) <= 1) {
		goto __779
	}
	XTclFreeObj(tls, _objPtr17)
__779:
	;
	goto __777
__777:
	if 0 != 0 {
		goto __776
	}
	goto __778
__778:
	;
	objPtr = copyPtr

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	pc += uintptr(6)
__780:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
__783:
__786:
	;
__789:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __792
	}
	XTclAllocateFreeObjects(tls)
__792:
	;
	_objPtr18 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __790
__790:
	if 0 != 0 {
		goto __789
	}
	goto __791
__791:
	;
	_callbackPtr5 = _objPtr18
	goto __787
__787:
	if 0 != 0 {
		goto __786
	}
	goto __788
__788:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr5)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTEBCresume}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr5 + 8)) = TD
	*(*ClientData)(unsafe.Pointer(_callbackPtr5 + 8 + 1*8)) = pc
	*(*ClientData)(unsafe.Pointer(_callbackPtr5 + 8 + 2*8)) = uintptr(Intptr_t(cleanup))
	*(*ClientData)(unsafe.Pointer(_callbackPtr5 + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr5)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr5
	goto __784
__784:
	if 0 != 0 {
		goto __783
	}
	goto __785
__785:
	;
	goto __781
__781:
	if 0 != 0 {
		goto __780
	}
	goto __782
__782:
	;

	XTclMarkTailcall(tls, interp)
__793:
__796:
	;
__799:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __802
	}
	XTclAllocateFreeObjects(tls)
__802:
	;
	_objPtr19 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __800
__800:
	if 0 != 0 {
		goto __799
	}
	goto __801
__801:
	;
	_callbackPtr6 = _objPtr19
	goto __797
__797:
	if 0 != 0 {
		goto __796
	}
	goto __798
__798:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr6)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{XTclClearRootEnsemble}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr6 + 8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr6 + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr6 + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr6 + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr6)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr6
	goto __794
__794:
	if 0 != 0 {
		goto __793
	}
	goto __795
__795:
	;
	XTcl_ListObjGetElements(tls, uintptr(0), objPtr, bp+720, bp+712)
__803:
__806:
	;
__809:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __812
	}
	XTclAllocateFreeObjects(tls)
__812:
	;
	_objPtr20 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __810
__810:
	if 0 != 0 {
		goto __809
	}
	goto __811
__811:
	;
	_callbackPtr7 = _objPtr20
	goto __807
__807:
	if 0 != 0 {
		goto __806
	}
	goto __808
__808:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr7)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{XTclNRReleaseValues}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr7 + 8)) = objPtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr7 + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr7 + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr7 + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr7)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr7
	goto __804
__804:
	if 0 != 0 {
		goto __803
	}
	goto __805
__805:
	;
	return XTclNREvalObjv(tls, interp, *(*int32)(unsafe.Pointer(bp + 720 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)), TCL_EVAL_INVOKE, uintptr(0))

	// -----------------------------------------------------------------
	//	   Start of INST_LOAD instructions.
	//
	// WARNING: more 'goto' here than your doctor recommended! The different
	// instructions set the value of some variables and then jump to some
	// common execution code.

__167:
instLoadScalar1:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__813:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __814
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __813
__814:
	;

	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0) {
		goto __815
	}
	// No errors, no traces: just get the value.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))

__816:
	;
	if !(0 == 0) {
		goto __819
	}
	if !(1 != 0) {
		goto __821
	}
	if !(1 > 0) {
		goto __822
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __823
__822:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__823:
	;
__821:
	;
	pc += uintptr(2)
	goto cleanup0
	goto __820
__819:
	if !(1 != 0) {
		goto __824
	}
	if !(1 > 0) {
		goto __826
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__826:
	;
	pc += uintptr(2)
	switch 0 {
	case 1:
		goto __828
	case 2:
		goto __829
	case 0:
		goto __830
	}
	goto __827
__828:
	goto cleanup1_pushObjResultPtr
__829:
	goto cleanup2_pushObjResultPtr
__830:
	goto __827
__827:
	;
	goto __825
__824:
	pc += uintptr(2)
	switch 0 {
	case 1:
		goto __832
	case 2:
		goto __833
	case 0:
		goto __834
	}
	goto __831
__832:
	goto cleanup1
__833:
	goto cleanup2
__834:
	goto __831
__831:
	;
__825:
	;
__820:
	;
	goto __817
__817:
	if 0 != 0 {
		goto __816
	}
	goto __818
__818:
	;
__815:
	;
	pcAdjustment = 2
	cleanup = 0
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = uintptr(0)
	part1Ptr = libc.AssignUintptr(&part2Ptr, uintptr(0))
	goto doCallPtrGetVar

__168:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__835:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __836
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __835
__836:
	;

	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0) {
		goto __837
	}
	// No errors, no traces: just get the value.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))

__838:
	;
	if !(0 == 0) {
		goto __841
	}
	if !(1 != 0) {
		goto __843
	}
	if !(1 > 0) {
		goto __844
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __845
__844:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__845:
	;
__843:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __842
__841:
	if !(1 != 0) {
		goto __846
	}
	if !(1 > 0) {
		goto __848
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__848:
	;
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __850
	case 2:
		goto __851
	case 0:
		goto __852
	}
	goto __849
__850:
	goto cleanup1_pushObjResultPtr
__851:
	goto cleanup2_pushObjResultPtr
__852:
	goto __849
__849:
	;
	goto __847
__846:
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __854
	case 2:
		goto __855
	case 0:
		goto __856
	}
	goto __853
__854:
	goto cleanup1
__855:
	goto cleanup2
__856:
	goto __853
__853:
	;
__847:
	;
__842:
	;
	goto __839
__839:
	if 0 != 0 {
		goto __838
	}
	goto __840
__840:
	;
__837:
	;
	pcAdjustment = 5
	cleanup = 0
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = uintptr(0)
	part1Ptr = libc.AssignUintptr(&part2Ptr, uintptr(0))
	goto doCallPtrGetVar

__169:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	goto doLoadArray

__170:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	pcAdjustment = 2

doLoadArray:
	part1Ptr = uintptr(0)
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = compiledLocals + uintptr(opnd)*16
__857:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_LINK != 0) {
		goto __858
	}
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8))
	goto __857
__858:
	;

	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_ARRAY != 0 && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_TRACED_READ != 0)) {
		goto __859
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = sVarHashCreateVar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8)), part2Ptr, uintptr(0))
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0 && (!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0)) {
		goto __860
	}
	// No errors, no traces: just get the value.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))

__861:
	;
	if !(1 == 0) {
		goto __864
	}
	if !(1 != 0) {
		goto __866
	}
	if !(1 > 0) {
		goto __867
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __868
__867:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__868:
	;
__866:
	;
	pc += uintptr(pcAdjustment)
	goto cleanup0
	goto __865
__864:
	if !(1 != 0) {
		goto __869
	}
	if !(1 > 0) {
		goto __871
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__871:
	;
	pc += uintptr(pcAdjustment)
	switch 1 {
	case 1:
		goto __873
	case 2:
		goto __874
	case 0:
		goto __875
	}
	goto __872
__873:
	goto cleanup1_pushObjResultPtr
__874:
	goto cleanup2_pushObjResultPtr
__875:
	goto __872
__872:
	;
	goto __870
__869:
	pc += uintptr(pcAdjustment)
	switch 1 {
	case 1:
		goto __877
	case 2:
		goto __878
	case 0:
		goto __879
	}
	goto __876
__877:
	goto cleanup1
__878:
	goto cleanup2
__879:
	goto __876
__876:
	;
__870:
	;
__865:
	;
	goto __862
__862:
	if 0 != 0 {
		goto __861
	}
	goto __863
__863:
	;
__860:
	;
__859:
	;
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclLookupArrayElement(tls, interp, part1Ptr, part2Ptr,
		TCL_LEAVE_ERR_MSG, ts+6057, 0, 1, *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), opnd)
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) == uintptr(0)) {
		goto __880
	}

	goto gotError
__880:
	;
	cleanup = 1
	goto doCallPtrGetVar

__171:
	cleanup = 2
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))              // element name
	objPtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) // array name

	goto doLoadStk

__172:
__173:
	cleanup = 1
	part2Ptr = uintptr(0)
	objPtr = *(*uintptr)(unsafe.Pointer(tosPtr)) // variable name

doLoadStk:
	part1Ptr = objPtr
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclObjLookupVarEx(tls, interp, part1Ptr, part2Ptr,
		TCL_LEAVE_ERR_MSG, ts+6057, 0 /*createPart2*/, 1,
		bp+728)
	if !!(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) {
		goto __881
	}

	goto gotError
__881:
	;

	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0 && (!(*(*uintptr)(unsafe.Pointer(bp + 728)) != 0) || !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_TRACED_READ != 0))) {
		goto __882
	}
	// No errors, no traces: just get the value.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))

__883:
	pc += uintptr(1)
	cleanup = cleanup
	if !(1 != 0) {
		goto __886
	}
	if !(1 > 0) {
		goto __888
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__888:
	;
	goto cleanupV_pushObjResultPtr
	goto __887
__886:
	goto cleanupV
__887:
	;
	goto __884
__884:
	if 0 != 0 {
		goto __883
	}
	goto __885
__885:
	;
__882:
	;
	pcAdjustment = 1
	opnd = -1

doCallPtrGetVar:
	// There are either errors or the variable is traced: call
	// TclPtrGetVar to process fully.

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclPtrGetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)),
		part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, opnd)
	checkInterp = 1
	if !!(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __889
	}

	goto gotError
__889:
	;

__890:
	pc += uintptr(pcAdjustment)
	cleanup = cleanup
	if !(1 != 0) {
		goto __893
	}
	if !(1 > 0) {
		goto __895
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__895:
	;
	goto cleanupV_pushObjResultPtr
	goto __894
__893:
	goto cleanupV
__894:
	;
	goto __891
__891:
	if 0 != 0 {
		goto __890
	}
	goto __892
__892:
	;

	/*
	 *	   End of INST_LOAD instructions.
	 * -----------------------------------------------------------------
	 *	   Start of INST_STORE and related instructions.
	 *
	 * WARNING: more 'goto' here than your doctor recommended! The different
	 * instructions set the value of some variables and then jump to somme
	 * common execution code.
	 */

__174:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	goto doStoreArrayDirect

__175:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	pcAdjustment = 2

doStoreArrayDirect:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = compiledLocals + uintptr(opnd)*16

__896:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_LINK != 0) {
		goto __897
	}
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8))
	goto __896
__897:
	;
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_ARRAY != 0 && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_TRACED_WRITE != 0)) {
		goto __898
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = sVarHashCreateVar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8)), part2Ptr, uintptr(0))
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0 && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH) != 0)) {
		goto __899
	}
	tosPtr -= 8
__900:
	_objPtr21 = *(*uintptr)(unsafe.Pointer(tosPtr))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr21)).FrefCount, 1) <= 1) {
		goto __903
	}
	XTclFreeObj(tls, _objPtr21)
__903:
	;
	goto __901
__901:
	if 0 != 0 {
		goto __900
	}
	goto __902
__902:
	;
	*(*uintptr)(unsafe.Pointer(tosPtr)) = *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))
	goto doStoreVarDirect
__899:
	;
__898:
	;
	cleanup = 2
	storeFlags = TCL_LEAVE_ERR_MSG
	part1Ptr = uintptr(0)
	goto doStoreArrayDirectFailed

__176:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	goto doStoreScalarDirect

__177:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	pcAdjustment = 2

doStoreScalarDirect:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16

__904:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __905
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __904
__905:
	;
	if !!!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH) != 0) {
		goto __906
	}
	storeFlags = TCL_LEAVE_ERR_MSG
	part1Ptr = uintptr(0)
	goto doStoreScalar
__906:
	;

	// No traces, no errors, plain 'set': we can safely inline. The value
	// *will* be set to what's requested, so that the stack top remains
	// pointing to the same Tcl_Obj.

doStoreVarDirect:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) != uintptr(0)) {
		goto __907
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount, 1) > 1) {
		goto __908
	}
	goto __909
__908:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __910
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != XtclEmptyStringRep) {
		goto __912
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes)
__912:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength = -1
__913:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 944))
	goto __914
__914:
	if 0 != 0 {
		goto __913
	}
	goto __915
__915:
	;
	goto __911
__910:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__911:
	;
__909:
	;

__907:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
	if !(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(pcAdjustment)))) == INST_POP) {
		goto __916
	}
	tosPtr -= 8
__917:
	;
	if !(0 == 0) {
		goto __920
	}
	if !(0 != 0) {
		goto __922
	}
	if !(0 > 0) {
		goto __923
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __924
__923:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__924:
	;
__922:
	;
	pc += uintptr(pcAdjustment + 1)
	goto cleanup0
	goto __921
__920:
	if !(0 != 0) {
		goto __925
	}
	if !(0 > 0) {
		goto __927
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__927:
	;
	pc += uintptr(pcAdjustment + 1)
	switch 0 {
	case 1:
		goto __929
	case 2:
		goto __930
	case 0:
		goto __931
	}
	goto __928
__929:
	goto cleanup1_pushObjResultPtr
__930:
	goto cleanup2_pushObjResultPtr
__931:
	goto __928
__928:
	;
	goto __926
__925:
	pc += uintptr(pcAdjustment + 1)
	switch 0 {
	case 1:
		goto __933
	case 2:
		goto __934
	case 0:
		goto __935
	}
	goto __932
__933:
	goto cleanup1
__934:
	goto cleanup2
__935:
	goto __932
__932:
	;
__926:
	;
__921:
	;
	goto __918
__918:
	if 0 != 0 {
		goto __917
	}
	goto __919
__919:
	;
__916:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__936:
	;
	if !(0 == 0) {
		goto __939
	}
	if !(0 != 0) {
		goto __941
	}
	if !(0 > 0) {
		goto __942
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __943
__942:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__943:
	;
__941:
	;
	pc += uintptr(pcAdjustment)
	goto cleanup0
	goto __940
__939:
	if !(0 != 0) {
		goto __944
	}
	if !(0 > 0) {
		goto __946
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__946:
	;
	pc += uintptr(pcAdjustment)
	switch 0 {
	case 1:
		goto __948
	case 2:
		goto __949
	case 0:
		goto __950
	}
	goto __947
__948:
	goto cleanup1_pushObjResultPtr
__949:
	goto cleanup2_pushObjResultPtr
__950:
	goto __947
__947:
	;
	goto __945
__944:
	pc += uintptr(pcAdjustment)
	switch 0 {
	case 1:
		goto __952
	case 2:
		goto __953
	case 0:
		goto __954
	}
	goto __951
__952:
	goto cleanup1
__953:
	goto cleanup2
__954:
	goto __951
__951:
	;
__945:
	;
__940:
	;
	goto __937
__937:
	if 0 != 0 {
		goto __936
	}
	goto __938
__938:
	;

__178:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr)) // value to append
	part2Ptr = uintptr(0)
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE |
		TCL_LIST_ELEMENT
	goto doStoreStk

__179:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr)) // value to append
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE |
		TCL_LIST_ELEMENT
	goto doStoreStk

__180:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr)) // value to append
	part2Ptr = uintptr(0)
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE
	goto doStoreStk

__181:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr)) // value to append
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE
	goto doStoreStk

__182:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	storeFlags = TCL_LEAVE_ERR_MSG
	goto doStoreStk

__183:
__184:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	part2Ptr = uintptr(0)
	storeFlags = TCL_LEAVE_ERR_MSG

doStoreStk:
	objPtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1+libc.Bool32(part2Ptr != uintptr(0)))*8)) // variable name
	part1Ptr = objPtr
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclObjLookupVarEx(tls, interp, objPtr, part2Ptr, TCL_LEAVE_ERR_MSG,
		ts+5888, 1 /*createPart2*/, 1, bp+728)
	if !!(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) {
		goto __955
	}

	goto gotError
__955:
	;
	cleanup = func() int32 {
		if part2Ptr == uintptr(0) {
			return 2
		}
		return 3
	}()
	pcAdjustment = 1
	opnd = -1
	goto doCallPtrSetVar

__185:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE |
		TCL_LIST_ELEMENT
	goto doStoreArray

__186:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	pcAdjustment = 2
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE |
		TCL_LIST_ELEMENT
	goto doStoreArray

__187:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE
	goto doStoreArray

__188:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	pcAdjustment = 2
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE
	goto doStoreArray

doStoreArray:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = compiledLocals + uintptr(opnd)*16

__956:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_LINK != 0) {
		goto __957
	}
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8))
	goto __956
__957:
	;
	cleanup = 2
	part1Ptr = uintptr(0)

doStoreArrayDirectFailed:
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclLookupArrayElement(tls, interp, part1Ptr, part2Ptr,
		TCL_LEAVE_ERR_MSG, ts+5888, 1, 1, *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), opnd)
	if !!(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) {
		goto __958
	}

	goto gotError
__958:
	;
	goto doCallPtrSetVar

__189:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE |
		TCL_LIST_ELEMENT
	goto doStoreScalar

__190:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	pcAdjustment = 2
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE |
		TCL_LIST_ELEMENT
	goto doStoreScalar

__191:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE
	goto doStoreScalar

__192:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	pcAdjustment = 2
	storeFlags = TCL_LEAVE_ERR_MSG | TCL_APPEND_VALUE
	goto doStoreScalar

doStoreScalar:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16

__959:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __960
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __959
__960:
	;
	cleanup = 1
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = uintptr(0)
	part1Ptr = libc.AssignUintptr(&part2Ptr, uintptr(0))

doCallPtrSetVar:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclPtrSetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)),
		part1Ptr, part2Ptr, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), storeFlags, opnd)
	checkInterp = 1
	if !!(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __961
	}

	goto gotError
__961:
	;
	if !(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(pcAdjustment)))) == INST_POP) {
		goto __962
	}
__963:
	pc += uintptr(pcAdjustment + 1)
	cleanup = cleanup
	if !(0 != 0) {
		goto __966
	}
	if !(0 > 0) {
		goto __968
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__968:
	;
	goto cleanupV_pushObjResultPtr
	goto __967
__966:
	goto cleanupV
__967:
	;
	goto __964
__964:
	if 0 != 0 {
		goto __963
	}
	goto __965
__965:
	;
__962:
	;

__969:
	pc += uintptr(pcAdjustment)
	cleanup = cleanup
	if !(1 != 0) {
		goto __972
	}
	if !(1 > 0) {
		goto __974
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__974:
	;
	goto cleanupV_pushObjResultPtr
	goto __973
__972:
	goto cleanupV
__973:
	;
	goto __970
__970:
	if 0 != 0 {
		goto __969
	}
	goto __971
__971:
	;

__193:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
	cleanup = 1
	pcAdjustment = 5
__975:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __976
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __975
__976:
	;

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+720, bp+712)
	}() !=
		TCL_OK) {
		goto __977
	}

	goto gotError
__977:
	;
	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0 &&
		!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH) != 0)) {
		goto __978
	}
	goto lappendListDirect
__978:
	;
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = uintptr(0)
	part1Ptr = libc.AssignUintptr(&part2Ptr, uintptr(0))
	goto lappendListPtr

__194:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	part1Ptr = uintptr(0)
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = compiledLocals + uintptr(opnd)*16
	cleanup = 2
	pcAdjustment = 5
__979:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_LINK != 0) {
		goto __980
	}
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8))
	goto __979
__980:
	;

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+720, bp+712)
	}() !=
		TCL_OK) {
		goto __981
	}

	goto gotError
__981:
	;
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_ARRAY != 0 && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_TRACED_READ != 0) &&
		!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_TRACED_WRITE != 0)) {
		goto __982
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = sVarHashCreateVar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8)), part2Ptr, uintptr(0))
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0 && (!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0) &&
		!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH) != 0)) {
		goto __983
	}
	goto lappendListDirect
__983:
	;
__982:
	;
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclLookupArrayElement(tls, interp, part1Ptr, part2Ptr,
		TCL_LEAVE_ERR_MSG, ts+5888, 1, 1, *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), opnd)
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) == uintptr(0)) {
		goto __984
	}

	goto gotError
__984:
	;
	goto lappendListPtr

__195:
	pcAdjustment = 1
	cleanup = 3
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) // element name
	part1Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(2)*8)) // array name

	goto lappendList

__196:
	pcAdjustment = 1
	cleanup = 2
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	part2Ptr = uintptr(0)
	part1Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) // variable name

	goto lappendList

lappendListDirect:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 736)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 936)), bp+736)
	}() != TCL_OK) {
		goto __985
	}

	goto gotError
__985:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount > 1) {
		goto __986
	}
	newValue = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount, 1) > 1) {
		goto __987
	}
	goto __988
__987:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __989
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != XtclEmptyStringRep) {
		goto __991
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes)
__991:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = -1
__992:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 936))
	goto __993
__993:
	if 0 != 0 {
		goto __992
	}
	goto __994
__994:
	;
	goto __990
__989:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
__990:
	;
__988:
	;

	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = libc.AssignPtrUintptr(bp+936 /* objResultPtr */, newValue)
	(*Tcl_Obj)(unsafe.Pointer(newValue)).FrefCount++
__986:
	;
	if !(XTcl_ListObjReplace(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 936)), *(*int32)(unsafe.Pointer(bp + 736)), 0, *(*int32)(unsafe.Pointer(bp + 720)), *(*uintptr)(unsafe.Pointer(bp + 712))) !=
		TCL_OK) {
		goto __995
	}

	goto gotError
__995:
	;

__996:
	pc += uintptr(pcAdjustment)
	cleanup = cleanup
	if !(1 != 0) {
		goto __999
	}
	if !(1 > 0) {
		goto __1001
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1001:
	;
	goto cleanupV_pushObjResultPtr
	goto __1000
__999:
	goto cleanupV
__1000:
	;
	goto __997
__997:
	if 0 != 0 {
		goto __996
	}
	goto __998
__998:
	;

lappendList:
	opnd = -1
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+720, bp+712)
	}() !=
		TCL_OK) {
		goto __1002
	}

	goto gotError
__1002:
	;
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclObjLookupVarEx(tls, interp, part1Ptr, part2Ptr,
		TCL_LEAVE_ERR_MSG, ts+5888, 1, 1, bp+728)
	checkInterp = 1
	if !!(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) {
		goto __1003
	}

	goto gotError
__1003:
	;

lappendListPtr:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __1004
	}
	(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).FrefCount++
__1004:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 728)) != 0 && (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __1005
	}
	(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).FrefCount++
__1005:
	;
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclPtrGetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)),
		part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, opnd)
	checkInterp = 1
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __1006
	}
	(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).FrefCount--
__1006:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 728)) != 0 && (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __1007
	}
	(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).FrefCount--
__1007:
	;

	createdNewObj = 0

	if !!(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __1008
	}
	valueToAssign = *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))
	goto __1009
__1008:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 736)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 936)), bp+736)
	}() != TCL_OK) {
		goto __1010
	}

	goto gotError
	goto __1011
__1010:
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount > 1) {
		goto __1012
	}
	valueToAssign = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
	createdNewObj = 1
	goto __1013
__1012:
	valueToAssign = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1013:
	;
	if !(XTcl_ListObjReplace(tls, interp, valueToAssign, *(*int32)(unsafe.Pointer(bp + 736)), 0,
		*(*int32)(unsafe.Pointer(bp + 720)), *(*uintptr)(unsafe.Pointer(bp + 712))) != TCL_OK) {
		goto __1014
	}
	if !(createdNewObj != 0) {
		goto __1015
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(valueToAssign)).FrefCount, 1) > 1) {
		goto __1016
	}
	goto __1017
__1016:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(valueToAssign)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valueToAssign)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __1018
	}

	if !((*Tcl_Obj)(unsafe.Pointer(valueToAssign)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(valueToAssign)).Fbytes != XtclEmptyStringRep) {
		goto __1020
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(valueToAssign)).Fbytes)
__1020:
	;
	(*Tcl_Obj)(unsafe.Pointer(valueToAssign)).Flength = -1
__1021:
	;
	*(*uintptr)(unsafe.Pointer(valueToAssign + 32)) = XtclFreeObjList
	XtclFreeObjList = valueToAssign
	goto __1022
__1022:
	if 0 != 0 {
		goto __1021
	}
	goto __1023
__1023:
	;
	goto __1019
__1018:
	XTclFreeObj(tls, valueToAssign)
__1019:
	;
__1017:
	;

__1015:
	;
	goto errorInLappendListPtr
__1014:
	;
__1011:
	;
__1009:
	;
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	(*Tcl_Obj)(unsafe.Pointer(valueToAssign)).FrefCount++
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclPtrSetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), part1Ptr,
		part2Ptr, valueToAssign, TCL_LEAVE_ERR_MSG, opnd)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(valueToAssign)).FrefCount, 1) > 1) {
		goto __1024
	}
	goto __1025
__1024:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(valueToAssign)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(valueToAssign)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __1026
	}

	if !((*Tcl_Obj)(unsafe.Pointer(valueToAssign)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(valueToAssign)).Fbytes != XtclEmptyStringRep) {
		goto __1028
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(valueToAssign)).Fbytes)
__1028:
	;
	(*Tcl_Obj)(unsafe.Pointer(valueToAssign)).Flength = -1
__1029:
	;
	*(*uintptr)(unsafe.Pointer(valueToAssign + 32)) = XtclFreeObjList
	XtclFreeObjList = valueToAssign
	goto __1030
__1030:
	if 0 != 0 {
		goto __1029
	}
	goto __1031
__1031:
	;
	goto __1027
__1026:
	XTclFreeObj(tls, valueToAssign)
__1027:
	;
__1025:
	;

	checkInterp = 1
	if !!(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __1032
	}
errorInLappendListPtr:
	;
	goto gotError
__1032:
	;

__1033:
	pc += uintptr(pcAdjustment)
	cleanup = cleanup
	if !(1 != 0) {
		goto __1036
	}
	if !(1 > 0) {
		goto __1038
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1038:
	;
	goto cleanupV_pushObjResultPtr
	goto __1037
__1036:
	goto cleanupV
__1037:
	;
	goto __1034
__1034:
	if 0 != 0 {
		goto __1033
	}
	goto __1035
__1035:
	;

	/*
	 *	   End of INST_STORE and related instructions.
	 * -----------------------------------------------------------------
	 *	   Start of INST_INCR instructions.
	 *
	 * WARNING: more 'goto' here than your doctor recommended! The different
	 * instructions set the value of some variables and then jump to somme
	 * common execution code.
	 */

	/*TODO: Consider more untangling here; merge with LOAD and STORE ? */

__197:
__198:
__199:
__200:
__201:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	incrPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_INCR_SCALAR1:
		goto __1040
	case INST_INCR_ARRAY1:
		goto __1041
	default:
		goto __1042
	}
	goto __1039
__1040:
	pcAdjustment = 2
	goto doIncrScalar
__1041:
	pcAdjustment = 2
	goto doIncrArray
__1042:
	pcAdjustment = 1
	goto doIncrStk
__1039:
	;

__202:
__203:
__204:
	increment = int32(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
__1043:
	;
__1046:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1049
	}
	XTclAllocateFreeObjects(tls)
__1049:
	;
	incrPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1047
__1047:
	if 0 != 0 {
		goto __1046
	}
	goto __1048
__1048:
	;
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(incrPtr + 32)) = increment
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __1044
__1044:
	if 0 != 0 {
		goto __1043
	}
	goto __1045
__1045:
	;
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount++
	pcAdjustment = 2

doIncrStk:
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_INCR_ARRAY_STK_IMM ||
		int32(*(*uint8)(unsafe.Pointer(pc))) == INST_INCR_ARRAY_STK) {
		goto __1050
	}
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	objPtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	goto __1051
__1050:
	part2Ptr = uintptr(0)
	objPtr = *(*uintptr)(unsafe.Pointer(tosPtr))

__1051:
	;
	part1Ptr = objPtr
	opnd = -1
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclObjLookupVarEx(tls, interp, objPtr, part2Ptr,
		TCL_LEAVE_ERR_MSG, ts+6057, 1, 1, bp+728)
	if !!(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) {
		goto __1052
	}
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_AddErrorInfo(tls, interp,
		ts+28978)
	checkInterp = 1

__1053:
	_objPtr22 = incrPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr22)).FrefCount, 1) <= 1) {
		goto __1056
	}
	XTclFreeObj(tls, _objPtr22)
__1056:
	;
	goto __1054
__1054:
	if 0 != 0 {
		goto __1053
	}
	goto __1055
__1055:
	;
	goto gotError
__1052:
	;
	cleanup = func() int32 {
		if part2Ptr == uintptr(0) {
			return 1
		}
		return 2
	}()
	goto doIncrVar

__205:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	increment = int32(int32(*(*int8)(unsafe.Pointer(pc + uintptr(2)))))
__1057:
	;
__1060:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1063
	}
	XTclAllocateFreeObjects(tls)
__1063:
	;
	incrPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1061
__1061:
	if 0 != 0 {
		goto __1060
	}
	goto __1062
__1062:
	;
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(incrPtr + 32)) = increment
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __1058
__1058:
	if 0 != 0 {
		goto __1057
	}
	goto __1059
__1059:
	;
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount++
	pcAdjustment = 3

doIncrArray:
	part1Ptr = uintptr(0)
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = compiledLocals + uintptr(opnd)*16
	cleanup = 1
__1064:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_LINK != 0) {
		goto __1065
	}
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8))
	goto __1064
__1065:
	;

	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclLookupArrayElement(tls, interp, part1Ptr, part2Ptr,
		TCL_LEAVE_ERR_MSG, ts+6057, 1, 1, *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), opnd)
	if !!(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) {
		goto __1066
	}

__1067:
	_objPtr23 = incrPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr23)).FrefCount, 1) <= 1) {
		goto __1070
	}
	XTclFreeObj(tls, _objPtr23)
__1070:
	;
	goto __1068
__1068:
	if 0 != 0 {
		goto __1067
	}
	goto __1069
__1069:
	;
	goto gotError
__1066:
	;
	goto doIncrVar

__206:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	increment = int32(int32(*(*int8)(unsafe.Pointer(pc + uintptr(2)))))
	pcAdjustment = 3
	cleanup = 0
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__1071:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __1072
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1071
__1072:
	;

	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ|VAR_TRACED_WRITE) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0) {
		goto __1073
	}

	objPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 740)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 744)) = objPtr + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 740)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 744)) = objPtr + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(objPtr + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 740)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 740)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 744)) = objPtr + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 740)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), objPtr, bp+744, bp+740)
				}()
			}()
		}()
	}() == TCL_OK) {
		goto __1074
	}
	if !(*(*int32)(unsafe.Pointer(bp + 740)) == TCL_NUMBER_LONG) {
		goto __1075
	}
	augend = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 744))))
	sum = augend + increment

	// Overflow when (augend and sum have different sign) and
	// (augend and increment have the same sign). This is
	// encapsulated in the Overflowing macro.

	if !!(augend^sum < 0 && augend^increment >= 0) {
		goto __1076
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1) {
		goto __1077
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount-- // We know it's shared.
__1079:
	;
__1082:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1085
	}
	XTclAllocateFreeObjects(tls)
__1085:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1083
__1083:
	if 0 != 0 {
		goto __1082
	}
	goto __1084
__1084:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = sum
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __1080
__1080:
	if 0 != 0 {
		goto __1079
	}
	goto __1081
__1081:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
	goto __1078
__1077:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = objPtr
__1086:
__1089:
	_isobjPtr = objPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0)) {
		goto __1092
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep) {
		goto __1093
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
__1093:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
__1092:
	;
	goto __1090
__1090:
	if 0 != 0 {
		goto __1089
	}
	goto __1091
__1091:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __1094
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __1095
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__1095:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__1094:
	;
	*(*int32)(unsafe.Pointer(objPtr + 32)) = sum
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	goto __1087
__1087:
	if 0 != 0 {
		goto __1086
	}
	goto __1088
__1088:
	;
__1078:
	;
	goto doneIncr
__1076:
	;
	w = Tcl_WideInt(augend)

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1) {
		goto __1096
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount-- // We know it's shared.
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewWideIntObj(tls, w+Tcl_WideInt(increment))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
	goto __1097
__1096:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = objPtr

	// We know the sum value is outside the long range;
	// use macro form that doesn't range test again.

__1098:
__1101:
	_isobjPtr1 = objPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr1)).Fbytes != uintptr(0)) {
		goto __1104
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr1)).Fbytes != XtclEmptyStringRep) {
		goto __1105
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr1)).Fbytes)
__1105:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr1)).Fbytes = uintptr(0)
__1104:
	;
	goto __1102
__1102:
	if 0 != 0 {
		goto __1101
	}
	goto __1103
__1103:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __1106
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __1107
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__1107:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__1106:
	;
	*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)) = w + Tcl_WideInt(increment)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclWideIntType))
	goto __1099
__1099:
	if 0 != 0 {
		goto __1098
	}
	goto __1100
__1100:
	;
__1097:
	;
	goto doneIncr
__1075:
	; // end if (type == TCL_NUMBER_LONG)
	if !(*(*int32)(unsafe.Pointer(bp + 740)) == TCL_NUMBER_WIDE) {
		goto __1108
	}

	w = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 744))))
	sum1 = w + Tcl_WideInt(increment)

	// Check for overflow.

	if !!(w^sum1 < int64(0) && w^Tcl_WideInt(increment) >= int64(0)) {
		goto __1109
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1) {
		goto __1110
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount-- // We know it's shared.
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewWideIntObj(tls, sum1)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
	goto __1111
__1110:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = objPtr

	// We *do not* know the sum value is outside the
	// long range (wide + long can yield long); use
	// the function call that checks range.

	XTcl_SetWideIntObj(tls, objPtr, sum1)
__1111:
	;
	goto doneIncr
__1109:
	;
__1108:
	;
__1074:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1) {
		goto __1112
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount-- // We know it's shared
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_DuplicateObj(tls, objPtr)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
	goto __1113
__1112:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = objPtr
__1113:
	;
__1114:
	;
__1117:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1120
	}
	XTclAllocateFreeObjects(tls)
__1120:
	;
	incrPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1118
__1118:
	if 0 != 0 {
		goto __1117
	}
	goto __1119
__1119:
	;
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(incrPtr + 32)) = increment
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __1115
__1115:
	if 0 != 0 {
		goto __1114
	}
	goto __1116
__1116:
	;
	if !(XTclIncrObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 936)), incrPtr) != TCL_OK) {
		goto __1121
	}
__1122:
	_objPtr24 = incrPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr24)).FrefCount, 1) <= 1) {
		goto __1125
	}
	XTclFreeObj(tls, _objPtr24)
__1125:
	;
	goto __1123
__1123:
	if 0 != 0 {
		goto __1122
	}
	goto __1124
__1124:
	;

	goto gotError
__1121:
	;
__1126:
	_objPtr25 = incrPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr25)).FrefCount, 1) <= 1) {
		goto __1129
	}
	XTclFreeObj(tls, _objPtr25)
__1129:
	;
	goto __1127
__1127:
	if 0 != 0 {
		goto __1126
	}
	goto __1128
__1128:
	;
	goto doneIncr
__1073:
	;

	// All other cases, flow through to generic handling.

__1130:
	;
__1133:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1136
	}
	XTclAllocateFreeObjects(tls)
__1136:
	;
	incrPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1134
__1134:
	if 0 != 0 {
		goto __1133
	}
	goto __1135
__1135:
	;
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(incrPtr + 32)) = increment
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __1131
__1131:
	if 0 != 0 {
		goto __1130
	}
	goto __1132
__1132:
	;
	(*Tcl_Obj)(unsafe.Pointer(incrPtr)).FrefCount++

doIncrScalar:
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__1137:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __1138
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1137
__1138:
	;
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = uintptr(0)
	part1Ptr = libc.AssignUintptr(&part2Ptr, uintptr(0))
	cleanup = 0

doIncrVar:
	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ|VAR_TRACED_WRITE) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0 && (!(*(*uintptr)(unsafe.Pointer(bp + 728)) != 0) || !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE) != 0))) {
		goto __1139
	}
	objPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1) {
		goto __1141
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount-- // We know it's shared
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_DuplicateObj(tls, objPtr)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
	goto __1142
__1141:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = objPtr
__1142:
	;
	if !(XTclIncrObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 936)), incrPtr) != TCL_OK) {
		goto __1143
	}
__1144:
	_objPtr26 = incrPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr26)).FrefCount, 1) <= 1) {
		goto __1147
	}
	XTclFreeObj(tls, _objPtr26)
__1147:
	;
	goto __1145
__1145:
	if 0 != 0 {
		goto __1144
	}
	goto __1146
__1146:
	;

	goto gotError
__1143:
	;
__1148:
	_objPtr27 = incrPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr27)).FrefCount, 1) <= 1) {
		goto __1151
	}
	XTclFreeObj(tls, _objPtr27)
__1151:
	;
	goto __1149
__1149:
	if 0 != 0 {
		goto __1148
	}
	goto __1150
__1150:
	;
	goto __1140
__1139:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclPtrIncrObjVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)),
		part1Ptr, part2Ptr, incrPtr, TCL_LEAVE_ERR_MSG, opnd)
	checkInterp = 1
__1152:
	_objPtr28 = incrPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr28)).FrefCount, 1) <= 1) {
		goto __1155
	}
	XTclFreeObj(tls, _objPtr28)
__1155:
	;
	goto __1153
__1153:
	if 0 != 0 {
		goto __1152
	}
	goto __1154
__1154:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == uintptr(0)) {
		goto __1156
	}

	goto gotError
__1156:
	;
__1140:
	;
doneIncr:
	;
	if !(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(pcAdjustment)))) == INST_POP) {
		goto __1157
	}
__1158:
	pc += uintptr(pcAdjustment + 1)
	cleanup = cleanup
	if !(0 != 0) {
		goto __1161
	}
	if !(0 > 0) {
		goto __1163
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1163:
	;
	goto cleanupV_pushObjResultPtr
	goto __1162
__1161:
	goto cleanupV
__1162:
	;
	goto __1159
__1159:
	if 0 != 0 {
		goto __1158
	}
	goto __1160
__1160:
	;
__1157:
	;
__1164:
	pc += uintptr(pcAdjustment)
	cleanup = cleanup
	if !(1 != 0) {
		goto __1167
	}
	if !(1 > 0) {
		goto __1169
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1169:
	;
	goto cleanupV_pushObjResultPtr
	goto __1168
__1167:
	goto cleanupV
__1168:
	;
	goto __1165
__1165:
	if 0 != 0 {
		goto __1164
	}
	goto __1166
__1166:
	;

	//	   End of INST_INCR instructions.
	// -----------------------------------------------------------------
	//	   Start of INST_EXIST instructions.

__207:
	cleanup = 0
	pcAdjustment = 5
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__1170:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __1171
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1170
__1171:
	;

	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_TRACED_READ != 0) {
		goto __1172
	}
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTclObjCallVarTraces(tls, interp, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0),
		TCL_TRACE_READS, 0, opnd)
	checkInterp = 1
	if !(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0)) {
		goto __1173
	}
	XTclCleanupVar(tls, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = uintptr(0)
__1173:
	;
__1172:
	;
	goto afterExistsPeephole

__208:
	cleanup = 1
	pcAdjustment = 5
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = compiledLocals + uintptr(opnd)*16
__1174:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_LINK != 0) {
		goto __1175
	}
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8))
	goto __1174
__1175:
	;

	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_ARRAY != 0 && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_TRACED_READ != 0)) {
		goto __1176
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = sVarHashCreateVar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8)), part2Ptr, uintptr(0))
	if !(!(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) || !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_TRACED_READ != 0)) {
		goto __1177
	}
	goto afterExistsPeephole
__1177:
	;
__1176:
	;
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclLookupArrayElement(tls, interp, uintptr(0), part2Ptr, 0, ts+29024,
		0, 1, *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), opnd)
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) {
		goto __1178
	}
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_TRACED_READ != 0 || *(*uintptr)(unsafe.Pointer(bp + 728)) != 0 && (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_TRACED_READ != 0) {
		goto __1179
	}
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTclObjCallVarTraces(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), part2Ptr,
		TCL_TRACE_READS, 0, opnd)
	checkInterp = 1
__1179:
	;
	if !(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0)) {
		goto __1180
	}
	XTclCleanupVar(tls, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = uintptr(0)
__1180:
	;
__1178:
	;
	goto afterExistsPeephole

__209:
	cleanup = 2
	pcAdjustment = 1
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))                // element name
	part1Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) // array name

	goto doExistStk

__210:
	cleanup = 1
	pcAdjustment = 1
	part2Ptr = uintptr(0)
	part1Ptr = *(*uintptr)(unsafe.Pointer(tosPtr)) // variable name

doExistStk:
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclObjLookupVarEx(tls, interp, part1Ptr, part2Ptr, 0, ts+29024,
		/*createPart1*/ 0 /*createPart2*/, 1, bp+728)
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) {
		goto __1181
	}
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_TRACED_READ != 0 || *(*uintptr)(unsafe.Pointer(bp + 728)) != 0 && (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_TRACED_READ != 0) {
		goto __1182
	}
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTclObjCallVarTraces(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), part1Ptr, part2Ptr,
		TCL_TRACE_READS, 0, -1)
	checkInterp = 1
__1182:
	;
	if !(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0)) {
		goto __1183
	}
	XTclCleanupVar(tls, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = uintptr(0)
__1183:
	;
__1181:
	;

	// Peep-hole optimisation: if you're about to jump, do jump from here.

afterExistsPeephole:
	found = libc.Bool32(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0 && !(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0)))

__1184:
	pc += uintptr(pcAdjustment)
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_JUMP_FALSE1:
		goto __1188
	case INST_JUMP_TRUE1:
		goto __1189
	case INST_JUMP_FALSE4:
		goto __1190
	case INST_JUMP_TRUE4:
		goto __1191
	default:
		goto __1192
	}
	goto __1187
__1188:
	;
__1193:
	pc += func() uintptr {
		if found != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	cleanup = cleanup
	if !(0 != 0) {
		goto __1196
	}
	if !(0 > 0) {
		goto __1198
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1198:
	;
	goto cleanupV_pushObjResultPtr
	goto __1197
__1196:
	goto cleanupV
__1197:
	;
	goto __1194
__1194:
	if 0 != 0 {
		goto __1193
	}
	goto __1195
__1195:
	;
	goto __1187
__1189:
	;
__1199:
	pc += func() uintptr {
		if found != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	cleanup = cleanup
	if !(0 != 0) {
		goto __1202
	}
	if !(0 > 0) {
		goto __1204
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1204:
	;
	goto cleanupV_pushObjResultPtr
	goto __1203
__1202:
	goto cleanupV
__1203:
	;
	goto __1200
__1200:
	if 0 != 0 {
		goto __1199
	}
	goto __1201
__1201:
	;
	goto __1187
__1190:
	;
__1205:
	pc += func() uintptr {
		if found != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	cleanup = cleanup
	if !(0 != 0) {
		goto __1208
	}
	if !(0 > 0) {
		goto __1210
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1210:
	;
	goto cleanupV_pushObjResultPtr
	goto __1209
__1208:
	goto cleanupV
__1209:
	;
	goto __1206
__1206:
	if 0 != 0 {
		goto __1205
	}
	goto __1207
__1207:
	;
	goto __1187
__1191:
	;
__1211:
	pc += func() uintptr {
		if found != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	cleanup = cleanup
	if !(0 != 0) {
		goto __1214
	}
	if !(0 > 0) {
		goto __1216
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1216:
	;
	goto cleanupV_pushObjResultPtr
	goto __1215
__1214:
	goto cleanupV
__1215:
	;
	goto __1212
__1212:
	if 0 != 0 {
		goto __1211
	}
	goto __1213
__1213:
	;
	goto __1187
__1192:
	if !(found < 0) {
		goto __1217
	}
__1219:
	;
__1222:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1225
	}
	XTclAllocateFreeObjects(tls)
__1225:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1223
__1223:
	if 0 != 0 {
		goto __1222
	}
	goto __1224
__1224:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __1220
__1220:
	if 0 != 0 {
		goto __1219
	}
	goto __1221
__1221:
	;
	goto __1218
__1217:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.Bool32(found > 0))*8))
__1218:
	;
__1226:
	pc += uintptr(0)
	cleanup = cleanup
	if !(1 != 0) {
		goto __1229
	}
	if !(1 > 0) {
		goto __1231
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1231:
	;
	goto cleanupV_pushObjResultPtr
	goto __1230
__1229:
	goto cleanupV
__1230:
	;
	goto __1227
__1227:
	if 0 != 0 {
		goto __1226
	}
	goto __1228
__1228:
	;
	goto __1187
__1187:
	;
	goto __1185
__1185:
	if 0 != 0 {
		goto __1184
	}
	goto __1186
__1186:
	;

	/*
	 *	   End of INST_EXIST instructions.
	 * -----------------------------------------------------------------
	 *	   Start of INST_UNSET instructions.
	 */

__211:
	if uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))) != 0 {
		flags = TCL_LEAVE_ERR_MSG
	} else {
		flags = 0
	}
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(2))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(2) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(2) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(2) + uintptr(3)))))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__1232:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __1233
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1232
__1233:
	;

	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_UNSET|VAR_DEAD_HASH) != 0) && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_IN_HASHTABLE != 0)) {
		goto __1234
	}
	// No errors, no traces, no searches: just make the variable cease
	// to exist.

	if !!(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0)) {
		goto __1235
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FrefCount, 1) > 1) {
		goto __1237
	}
	goto __1238
__1237:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __1239
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != XtclEmptyStringRep) {
		goto __1241
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes)
__1241:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Flength = -1
__1242:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1243
__1243:
	if 0 != 0 {
		goto __1242
	}
	goto __1244
__1244:
	;
	goto __1240
__1239:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))
__1240:
	;
__1238:
	;

	goto __1236
__1235:
	if !(flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __1245
	}
	goto slowUnsetScalar
__1245:
	;
__1236:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = uintptr(0)

__1246:
	;
	if !(0 == 0) {
		goto __1249
	}
	if !(0 != 0) {
		goto __1251
	}
	if !(0 > 0) {
		goto __1252
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1253
__1252:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1253:
	;
__1251:
	;
	pc += uintptr(6)
	goto cleanup0
	goto __1250
__1249:
	if !(0 != 0) {
		goto __1254
	}
	if !(0 > 0) {
		goto __1256
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1256:
	;
	pc += uintptr(6)
	switch 0 {
	case 1:
		goto __1258
	case 2:
		goto __1259
	case 0:
		goto __1260
	}
	goto __1257
__1258:
	goto cleanup1_pushObjResultPtr
__1259:
	goto cleanup2_pushObjResultPtr
__1260:
	goto __1257
__1257:
	;
	goto __1255
__1254:
	pc += uintptr(6)
	switch 0 {
	case 1:
		goto __1262
	case 2:
		goto __1263
	case 0:
		goto __1264
	}
	goto __1261
__1262:
	goto cleanup1
__1263:
	goto cleanup2
__1264:
	goto __1261
__1261:
	;
__1255:
	;
__1250:
	;
	goto __1247
__1247:
	if 0 != 0 {
		goto __1246
	}
	goto __1248
__1248:
	;
__1234:
	;

slowUnsetScalar:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	if !(XTclPtrUnsetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760)), uintptr(0), uintptr(0), uintptr(0), flags,
		opnd) != TCL_OK && flags != 0) {
		goto __1265
	}
	goto errorInUnset
__1265:
	;
	checkInterp = 1
__1266:
	;
	if !(0 == 0) {
		goto __1269
	}
	if !(0 != 0) {
		goto __1271
	}
	if !(0 > 0) {
		goto __1272
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1273
__1272:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1273:
	;
__1271:
	;
	pc += uintptr(6)
	goto cleanup0
	goto __1270
__1269:
	if !(0 != 0) {
		goto __1274
	}
	if !(0 > 0) {
		goto __1276
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1276:
	;
	pc += uintptr(6)
	switch 0 {
	case 1:
		goto __1278
	case 2:
		goto __1279
	case 0:
		goto __1280
	}
	goto __1277
__1278:
	goto cleanup1_pushObjResultPtr
__1279:
	goto cleanup2_pushObjResultPtr
__1280:
	goto __1277
__1277:
	;
	goto __1275
__1274:
	pc += uintptr(6)
	switch 0 {
	case 1:
		goto __1282
	case 2:
		goto __1283
	case 0:
		goto __1284
	}
	goto __1281
__1282:
	goto cleanup1
__1283:
	goto cleanup2
__1284:
	goto __1281
__1281:
	;
__1275:
	;
__1270:
	;
	goto __1267
__1267:
	if 0 != 0 {
		goto __1266
	}
	goto __1268
__1268:
	;

__212:
	if uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))) != 0 {
		flags = TCL_LEAVE_ERR_MSG
	} else {
		flags = 0
	}
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(2))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(2) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(2) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(2) + uintptr(3)))))
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = compiledLocals + uintptr(opnd)*16
__1285:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_LINK != 0) {
		goto __1286
	}
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8))
	goto __1285
__1286:
	;

	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_ARRAY != 0 && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_TRACED_UNSET != 0) &&
		!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)))).Fflags&VAR_SEARCH_ACTIVE != 0)) {
		goto __1287
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = sVarHashCreateVar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 728)) + 8)), part2Ptr, uintptr(0))
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0 && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_UNSET|VAR_DEAD_HASH) != 0)) {
		goto __1288
	}
	// No nasty traces and element exists, so we can proceed to
	// unset it. Might still not exist though...

	if !!(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0)) {
		goto __1290
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FrefCount, 1) > 1) {
		goto __1292
	}
	goto __1293
__1292:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __1294
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != XtclEmptyStringRep) {
		goto __1296
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes)
__1296:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Flength = -1
__1297:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1298
__1298:
	if 0 != 0 {
		goto __1297
	}
	goto __1299
__1299:
	;
	goto __1295
__1294:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))
__1295:
	;
__1293:
	;

	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))) &= libc.CplInt32(VAR_ARRAY | VAR_LINK)
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = uintptr(0)
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_NAMESPACE_VAR != 0) {
		goto __1300
	}
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))) &= libc.CplInt32(VAR_NAMESPACE_VAR)
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __1301
	}
	(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).FrefCount--
__1301:
	;
__1300:
	;

	XTclCleanupVar(tls, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)))
	goto __1291
__1290:
	if !(flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __1302
	}
	goto slowUnsetArray
__1302:
	;
__1291:
	;

__1303:
	;
	if !(1 == 0) {
		goto __1306
	}
	if !(0 != 0) {
		goto __1308
	}
	if !(0 > 0) {
		goto __1309
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1310
__1309:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1310:
	;
__1308:
	;
	pc += uintptr(6)
	goto cleanup0
	goto __1307
__1306:
	if !(0 != 0) {
		goto __1311
	}
	if !(0 > 0) {
		goto __1313
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1313:
	;
	pc += uintptr(6)
	switch 1 {
	case 1:
		goto __1315
	case 2:
		goto __1316
	case 0:
		goto __1317
	}
	goto __1314
__1315:
	goto cleanup1_pushObjResultPtr
__1316:
	goto cleanup2_pushObjResultPtr
__1317:
	goto __1314
__1314:
	;
	goto __1312
__1311:
	pc += uintptr(6)
	switch 1 {
	case 1:
		goto __1319
	case 2:
		goto __1320
	case 0:
		goto __1321
	}
	goto __1318
__1319:
	goto cleanup1
__1320:
	goto cleanup2
__1321:
	goto __1318
__1318:
	;
__1312:
	;
__1307:
	;
	goto __1304
__1304:
	if 0 != 0 {
		goto __1303
	}
	goto __1305
__1305:
	;
	goto __1289
__1288:
	if !(!(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) && !(flags&TCL_LEAVE_ERR_MSG != 0)) {
		goto __1322
	}
	// Don't need to do anything here.

__1323:
	;
	if !(1 == 0) {
		goto __1326
	}
	if !(0 != 0) {
		goto __1328
	}
	if !(0 > 0) {
		goto __1329
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1330
__1329:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1330:
	;
__1328:
	;
	pc += uintptr(6)
	goto cleanup0
	goto __1327
__1326:
	if !(0 != 0) {
		goto __1331
	}
	if !(0 > 0) {
		goto __1333
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1333:
	;
	pc += uintptr(6)
	switch 1 {
	case 1:
		goto __1335
	case 2:
		goto __1336
	case 0:
		goto __1337
	}
	goto __1334
__1335:
	goto cleanup1_pushObjResultPtr
__1336:
	goto cleanup2_pushObjResultPtr
__1337:
	goto __1334
__1334:
	;
	goto __1332
__1331:
	pc += uintptr(6)
	switch 1 {
	case 1:
		goto __1339
	case 2:
		goto __1340
	case 0:
		goto __1341
	}
	goto __1338
__1339:
	goto cleanup1
__1340:
	goto cleanup2
__1341:
	goto __1338
__1338:
	;
__1332:
	;
__1327:
	;
	goto __1324
__1324:
	if 0 != 0 {
		goto __1323
	}
	goto __1325
__1325:
	;
__1322:
	;
__1289:
	;
__1287:
	;
slowUnsetArray:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclLookupArrayElement(tls, interp, uintptr(0), part2Ptr, flags, ts+3965,
		0, 0, *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), opnd)
	if !!(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0) {
		goto __1342
	}
	if !(flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __1344
	}
	goto errorInUnset
__1344:
	;
	goto __1343
__1342:
	if !(XTclPtrUnsetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760)), *(*uintptr)(unsafe.Pointer(bp + 728)), uintptr(0), part2Ptr,
		flags, opnd) != TCL_OK && flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __1345
	}
	goto errorInUnset
__1345:
	;
__1343:
	;
	checkInterp = 1
__1346:
	;
	if !(1 == 0) {
		goto __1349
	}
	if !(0 != 0) {
		goto __1351
	}
	if !(0 > 0) {
		goto __1352
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1353
__1352:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1353:
	;
__1351:
	;
	pc += uintptr(6)
	goto cleanup0
	goto __1350
__1349:
	if !(0 != 0) {
		goto __1354
	}
	if !(0 > 0) {
		goto __1356
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1356:
	;
	pc += uintptr(6)
	switch 1 {
	case 1:
		goto __1358
	case 2:
		goto __1359
	case 0:
		goto __1360
	}
	goto __1357
__1358:
	goto cleanup1_pushObjResultPtr
__1359:
	goto cleanup2_pushObjResultPtr
__1360:
	goto __1357
__1357:
	;
	goto __1355
__1354:
	pc += uintptr(6)
	switch 1 {
	case 1:
		goto __1362
	case 2:
		goto __1363
	case 0:
		goto __1364
	}
	goto __1361
__1362:
	goto cleanup1
__1363:
	goto cleanup2
__1364:
	goto __1361
__1361:
	;
__1355:
	;
__1350:
	;
	goto __1347
__1347:
	if 0 != 0 {
		goto __1346
	}
	goto __1348
__1348:
	;

__213:
	if uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))) != 0 {
		flags = TCL_LEAVE_ERR_MSG
	} else {
		flags = 0
	}
	cleanup = 2
	part2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))                // element name
	part1Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) // array name

	goto doUnsetStk

__214:
	if uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))) != 0 {
		flags = TCL_LEAVE_ERR_MSG
	} else {
		flags = 0
	}
	cleanup = 1
	part2Ptr = uintptr(0)
	part1Ptr = *(*uintptr)(unsafe.Pointer(tosPtr)) // variable name

doUnsetStk:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	if !(XTclObjUnsetVar2(tls, interp, part1Ptr, part2Ptr, flags) != TCL_OK &&
		flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __1365
	}
	goto errorInUnset
__1365:
	;
	checkInterp = 1

__1366:
	pc += uintptr(2)
	cleanup = cleanup
	if !(0 != 0) {
		goto __1369
	}
	if !(0 > 0) {
		goto __1371
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1371:
	;
	goto cleanupV_pushObjResultPtr
	goto __1370
__1369:
	goto cleanupV
__1370:
	;
	goto __1367
__1367:
	if 0 != 0 {
		goto __1366
	}
	goto __1368
__1368:
	;

errorInUnset:
	checkInterp = 1

	goto gotError

	// This is really an unset operation these days. Do not issue.

__215:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))

	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__1372:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __1373
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1372
__1373:
	;
	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_UNSET|VAR_DEAD_HASH) != 0) && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_IN_HASHTABLE != 0)) {
		goto __1374
	}
	if !!(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0)) {
		goto __1376
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FrefCount, 1) > 1) {
		goto __1377
	}
	goto __1378
__1377:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __1379
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != XtclEmptyStringRep) {
		goto __1381
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes)
__1381:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Flength = -1
__1382:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1383
__1383:
	if 0 != 0 {
		goto __1382
	}
	goto __1384
__1384:
	;
	goto __1380
__1379:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))
__1380:
	;
__1378:
	;

__1376:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = uintptr(0)
	goto __1375
__1374:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTclPtrUnsetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0), uintptr(0), 0, opnd)
	checkInterp = 1
__1375:
	;
__1385:
	;
	if !(0 == 0) {
		goto __1388
	}
	if !(0 != 0) {
		goto __1390
	}
	if !(0 > 0) {
		goto __1391
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1392
__1391:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1392:
	;
__1390:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __1389
__1388:
	if !(0 != 0) {
		goto __1393
	}
	if !(0 > 0) {
		goto __1395
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1395:
	;
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __1397
	case 2:
		goto __1398
	case 0:
		goto __1399
	}
	goto __1396
__1397:
	goto cleanup1_pushObjResultPtr
__1398:
	goto cleanup2_pushObjResultPtr
__1399:
	goto __1396
__1396:
	;
	goto __1394
__1393:
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __1401
	case 2:
		goto __1402
	case 0:
		goto __1403
	}
	goto __1400
__1401:
	goto cleanup1
__1402:
	goto cleanup2
__1403:
	goto __1400
__1400:
	;
__1394:
	;
__1389:
	;
	goto __1386
__1386:
	if 0 != 0 {
		goto __1385
	}
	goto __1387
__1387:
	;

	goto __141

	//	   End of INST_UNSET instructions.
	// -----------------------------------------------------------------
	//	   Start of INST_ARRAY instructions.

__216:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	cleanup = 0
	part1Ptr = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = uintptr(0)

	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__1404:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __1405
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1404
__1405:
	;
	goto doArrayExists
__217:
	opnd = -1
	pcAdjustment = 1
	cleanup = 1
	part1Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))

	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclObjLookupVarEx(tls, interp, part1Ptr, uintptr(0), 0, uintptr(0),
		/*createPart1*/ 0 /*createPart2*/, 0, bp+728)
doArrayExists:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	result = XTclCheckArrayTraces(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), part1Ptr, opnd)
	checkInterp = 1
	if !(result == TCL_ERROR) {
		goto __1406
	}

	goto gotError
__1406:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0 && (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_ARRAY != 0 && !(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0))) {
		goto __1407
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + 1*8))
	goto __1408
__1407:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants))
__1408:
	;

__1409:
	pc += uintptr(pcAdjustment)
	cleanup = cleanup
	if !(1 != 0) {
		goto __1412
	}
	if !(1 > 0) {
		goto __1414
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1414:
	;
	goto cleanupV_pushObjResultPtr
	goto __1413
__1412:
	goto cleanupV
__1413:
	;
	goto __1410
__1410:
	if 0 != 0 {
		goto __1409
	}
	goto __1411
__1411:
	;

__218:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pcAdjustment = 5
	cleanup = 0
	part1Ptr = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)) = uintptr(0)

	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__1415:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __1416
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __1415
__1416:
	;
	goto doArrayMake
__219:
	opnd = -1
	pcAdjustment = 1
	cleanup = 1
	part1Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))

	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclObjLookupVarEx(tls, interp, part1Ptr, uintptr(0), TCL_LEAVE_ERR_MSG,
		ts+5888, 1 /*createPart2*/, 0, bp+728)
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) == uintptr(0)) {
		goto __1417
	}

	goto gotError
__1417:
	;
doArrayMake:
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) != 0 && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_ARRAY != 0)) {
		goto __1418
	}
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_ARRAY_ELEMENT != 0 || !(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0))) {
		goto __1419
	}
	// Either an array element, or a scalar: lose!

	XTclObjVarErrMsg(tls, interp, part1Ptr, uintptr(0), ts+29031,
		ts+29041, opnd)
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+160, ts+4178, ts+29062, ts+29068, uintptr(0)))
	checkInterp = 1

	goto gotError
__1419:
	;
	(*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags = (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&libc.CplInt32(VAR_LINK) | VAR_ARRAY
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TclVarHashTable{})))
	XTclInitVarHashTable(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)),
		func() uintptr {
			if (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_IN_HASHTABLE != 0 {
				return (*TclVarHashTable)(unsafe.Pointer((*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fentry.FtablePtr)).FnsPtr
			}
			return uintptr(0)
		}())
__1418:
	;
__1420:
	pc += uintptr(pcAdjustment)
	cleanup = cleanup
	if !(0 != 0) {
		goto __1423
	}
	if !(0 > 0) {
		goto __1425
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1425:
	;
	goto cleanupV_pushObjResultPtr
	goto __1424
__1423:
	goto cleanupV
__1424:
	;
	goto __1421
__1421:
	if 0 != 0 {
		goto __1420
	}
	goto __1422
__1422:
	;

	/*
	 *	   End of INST_ARRAY instructions.
	 * -----------------------------------------------------------------
	 *	   Start of variable linking instructions.
	 */

__220:
	;

	if !(XTclObjGetFrame(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)), bp+752) == -1) {
		goto __1426
	}

	goto gotError
__1426:
	;

	// Locate the other variable.

	savedFramePtr = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = *(*uintptr)(unsafe.Pointer(bp + 752 /* framePtr */))
	otherPtr = XTclObjLookupVarEx(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), uintptr(0),
		TCL_LEAVE_ERR_MSG, ts+29024, 1,
		/*createPart2*/ 1, bp+760)
	(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = savedFramePtr
	if !!(otherPtr != 0) {
		goto __1427
	}

	goto gotError
__1427:
	;
	goto doLinkVars

__221:
	;
	if !(XTclGetNamespaceFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)), bp+768) != TCL_OK) {
		goto __1428
	}

	goto gotError
__1428:
	;

	// Locate the other variable.

	savedNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr = *(*uintptr)(unsafe.Pointer(bp + 768 /* nsPtr */))
	otherPtr = XTclObjLookupVarEx(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), uintptr(0),
		TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG|TCL_AVOID_RESOLVERS,
		ts+29024, 1 /*createPart2*/, 1, bp+760)
	(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr = savedNsPtr
	if !!(otherPtr != 0) {
		goto __1429
	}

	goto gotError
__1429:
	;
	goto doLinkVars

__222:
	;
	otherPtr = XTclObjLookupVarEx(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), uintptr(0),
		TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG, ts+29024,
		/*createPart1*/ 1 /*createPart2*/, 1, bp+760)
	if !!(otherPtr != 0) {
		goto __1430
	}

	goto gotError
__1430:
	;

	// Do the [variable] magic.

	if !!((*Var)(unsafe.Pointer(otherPtr)).Fflags&VAR_NAMESPACE_VAR != 0) {
		goto __1431
	}
	*(*int32)(unsafe.Pointer(otherPtr)) |= VAR_NAMESPACE_VAR
	if !((*Var)(unsafe.Pointer(otherPtr)).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __1432
	}
	(*VarInHash)(unsafe.Pointer(otherPtr)).FrefCount++
__1432:
	;
__1431:
	;

doLinkVars:

	// If we are here, the local variable has already been created: do the
	// little work of TclPtrMakeUpvar that remains to be done right here
	// if there are no errors; otherwise, let it handle the case.

	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3))))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) != otherPtr && !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0) &&
		(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0) || (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0)) {
		goto __1433
	}
	if !!(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) == uintptr(0)) {
		goto __1435
	}
	// Then it is a defined link.

	linkPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))

	if !(linkPtr == otherPtr) {
		goto __1436
	}

__1437:
	;
	if !(1 == 0) {
		goto __1440
	}
	if !(0 != 0) {
		goto __1442
	}
	if !(0 > 0) {
		goto __1443
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1444
__1443:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1444:
	;
__1442:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __1441
__1440:
	if !(0 != 0) {
		goto __1445
	}
	if !(0 > 0) {
		goto __1447
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1447:
	;
	pc += uintptr(5)
	switch 1 {
	case 1:
		goto __1449
	case 2:
		goto __1450
	case 0:
		goto __1451
	}
	goto __1448
__1449:
	goto cleanup1_pushObjResultPtr
__1450:
	goto cleanup2_pushObjResultPtr
__1451:
	goto __1448
__1448:
	;
	goto __1446
__1445:
	pc += uintptr(5)
	switch 1 {
	case 1:
		goto __1453
	case 2:
		goto __1454
	case 0:
		goto __1455
	}
	goto __1452
__1453:
	goto cleanup1
__1454:
	goto cleanup2
__1455:
	goto __1452
__1452:
	;
__1446:
	;
__1441:
	;
	goto __1438
__1438:
	if 0 != 0 {
		goto __1437
	}
	goto __1439
__1439:
	;
__1436:
	;
	if !((*Var)(unsafe.Pointer(linkPtr)).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __1456
	}
	(*VarInHash)(unsafe.Pointer(linkPtr)).FrefCount--
	if !(*(*uintptr)(unsafe.Pointer(linkPtr + 8)) == uintptr(0)) {
		goto __1457
	}
	XTclCleanupVar(tls, linkPtr, uintptr(0))
__1457:
	;
__1456:
	;
__1435:
	;
	(*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags = (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&libc.CplInt32(VAR_ARRAY) | VAR_LINK
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = otherPtr
	if !((*Var)(unsafe.Pointer(otherPtr)).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __1458
	}
	(*VarInHash)(unsafe.Pointer(otherPtr)).FrefCount++
__1458:
	;
	goto __1434
__1433:
	if !(XTclPtrObjMakeUpvarIdx(tls, interp, otherPtr, uintptr(0), 0,
		opnd) != TCL_OK) {
		goto __1459
	}

	goto gotError
__1459:
	;
__1434:
	;

	// Do not pop the namespace or frame index, it may be needed for other
	// variables - and [variable] did not push it at all.

__1460:
	;
	if !(1 == 0) {
		goto __1463
	}
	if !(0 != 0) {
		goto __1465
	}
	if !(0 > 0) {
		goto __1466
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1467
__1466:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1467:
	;
__1465:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __1464
__1463:
	if !(0 != 0) {
		goto __1468
	}
	if !(0 > 0) {
		goto __1470
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1470:
	;
	pc += uintptr(5)
	switch 1 {
	case 1:
		goto __1472
	case 2:
		goto __1473
	case 0:
		goto __1474
	}
	goto __1471
__1472:
	goto cleanup1_pushObjResultPtr
__1473:
	goto cleanup2_pushObjResultPtr
__1474:
	goto __1471
__1471:
	;
	goto __1469
__1468:
	pc += uintptr(5)
	switch 1 {
	case 1:
		goto __1476
	case 2:
		goto __1477
	case 0:
		goto __1478
	}
	goto __1475
__1476:
	goto cleanup1
__1477:
	goto cleanup2
__1478:
	goto __1475
__1475:
	;
__1469:
	;
__1464:
	;
	goto __1461
__1461:
	if 0 != 0 {
		goto __1460
	}
	goto __1462
__1462:
	;

	goto __141

	//	   End of variable linking instructions.
	// -----------------------------------------------------------------

__223:
	opnd = int32(*(*int8)(unsafe.Pointer(pc + uintptr(1))))

__1479:
	;
	if !(0 == 0) {
		goto __1482
	}
	if !(0 != 0) {
		goto __1484
	}
	if !(0 > 0) {
		goto __1485
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1486
__1485:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1486:
	;
__1484:
	;
	pc += uintptr(opnd)
	goto cleanup0
	goto __1483
__1482:
	if !(0 != 0) {
		goto __1487
	}
	if !(0 > 0) {
		goto __1489
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1489:
	;
	pc += uintptr(opnd)
	switch 0 {
	case 1:
		goto __1491
	case 2:
		goto __1492
	case 0:
		goto __1493
	}
	goto __1490
__1491:
	goto cleanup1_pushObjResultPtr
__1492:
	goto cleanup2_pushObjResultPtr
__1493:
	goto __1490
__1490:
	;
	goto __1488
__1487:
	pc += uintptr(opnd)
	switch 0 {
	case 1:
		goto __1495
	case 2:
		goto __1496
	case 0:
		goto __1497
	}
	goto __1494
__1495:
	goto cleanup1
__1496:
	goto cleanup2
__1497:
	goto __1494
__1494:
	;
__1488:
	;
__1483:
	;
	goto __1480
__1480:
	if 0 != 0 {
		goto __1479
	}
	goto __1481
__1481:
	;
	goto __141

__224:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3))))

__1498:
	;
	if !(0 == 0) {
		goto __1501
	}
	if !(0 != 0) {
		goto __1503
	}
	if !(0 > 0) {
		goto __1504
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1505
__1504:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1505:
	;
__1503:
	;
	pc += uintptr(opnd)
	goto cleanup0
	goto __1502
__1501:
	if !(0 != 0) {
		goto __1506
	}
	if !(0 > 0) {
		goto __1508
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1508:
	;
	pc += uintptr(opnd)
	switch 0 {
	case 1:
		goto __1510
	case 2:
		goto __1511
	case 0:
		goto __1512
	}
	goto __1509
__1510:
	goto cleanup1_pushObjResultPtr
__1511:
	goto cleanup2_pushObjResultPtr
__1512:
	goto __1509
__1509:
	;
	goto __1507
__1506:
	pc += uintptr(opnd)
	switch 0 {
	case 1:
		goto __1514
	case 2:
		goto __1515
	case 0:
		goto __1516
	}
	goto __1513
__1514:
	goto cleanup1
__1515:
	goto cleanup2
__1516:
	goto __1513
__1513:
	;
__1507:
	;
__1502:
	;
	goto __1499
__1499:
	if 0 != 0 {
		goto __1498
	}
	goto __1500
__1500:
	;

	// TODO: consider rewrite so we don't compute the offset we're not
	// going to take.
__225:
	*(*int32)(unsafe.Pointer(bp + 776)) = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))) // FALSE offset
	*(*int32)(unsafe.Pointer(bp + 776 + 1*4)) = 5                                                                                                                                                                                                                                                                 // TRUE offset
	goto doCondJump

__226:
	*(*int32)(unsafe.Pointer(bp + 776)) = 5
	*(*int32)(unsafe.Pointer(bp + 776 + 1*4)) = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3))))
	goto doCondJump

__227:
	*(*int32)(unsafe.Pointer(bp + 776)) = int32(*(*int8)(unsafe.Pointer(pc + uintptr(1))))
	*(*int32)(unsafe.Pointer(bp + 776 + 1*4)) = 2
	goto doCondJump

__228:
	*(*int32)(unsafe.Pointer(bp + 776)) = 2
	*(*int32)(unsafe.Pointer(bp + 776 + 1*4)) = int32(*(*int8)(unsafe.Pointer(pc + uintptr(1))))

doCondJump:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

	// TODO - check claim that taking address of b harms performance
	// TODO - consider optimization search for constants
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) || (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclBooleanType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 784)) = libc.Bool32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) != 0)
				return TCL_OK
			}()
		}
		return XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+784)
	}() != TCL_OK) {
		goto __1517
	}

	goto gotError
__1517:
	;

__1518:
	;
	if !(1 == 0) {
		goto __1521
	}
	if !(0 != 0) {
		goto __1523
	}
	if !(0 > 0) {
		goto __1524
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1525
__1524:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1525:
	;
__1523:
	;
	pc += uintptr(*(*int32)(unsafe.Pointer(bp + 776 + uintptr(*(*int32)(unsafe.Pointer(bp + 784)))*4)))
	goto cleanup0
	goto __1522
__1521:
	if !(0 != 0) {
		goto __1526
	}
	if !(0 > 0) {
		goto __1528
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1528:
	;
	pc += uintptr(*(*int32)(unsafe.Pointer(bp + 776 + uintptr(*(*int32)(unsafe.Pointer(bp + 784)))*4)))
	switch 1 {
	case 1:
		goto __1530
	case 2:
		goto __1531
	case 0:
		goto __1532
	}
	goto __1529
__1530:
	goto cleanup1_pushObjResultPtr
__1531:
	goto cleanup2_pushObjResultPtr
__1532:
	goto __1529
__1529:
	;
	goto __1527
__1526:
	pc += uintptr(*(*int32)(unsafe.Pointer(bp + 776 + uintptr(*(*int32)(unsafe.Pointer(bp + 784)))*4)))
	switch 1 {
	case 1:
		goto __1534
	case 2:
		goto __1535
	case 0:
		goto __1536
	}
	goto __1533
__1534:
	goto cleanup1
__1535:
	goto cleanup2
__1536:
	goto __1533
__1533:
	;
__1527:
	;
__1522:
	;
	goto __1519
__1519:
	if 0 != 0 {
		goto __1518
	}
	goto __1520
__1520:
	;

	goto __141

__229:

	// Jump to location looked up in a hashtable; fall through to next
	// instr if lookup fails.

	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3))))
	jtPtr = (*AuxData)(unsafe.Pointer((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FauxDataArrayPtr + uintptr(opnd)*16)).FclientData

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(jtPtr /* &.hashTable */)).FfindProc})).f(tls, jtPtr /* &.hashTable */, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
	}())
	if !(hPtr != uintptr(0)) {
		goto __1537
	}
	jumpOffset = int32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)

__1539:
	;
	if !(1 == 0) {
		goto __1542
	}
	if !(0 != 0) {
		goto __1544
	}
	if !(0 > 0) {
		goto __1545
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1546
__1545:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1546:
	;
__1544:
	;
	pc += uintptr(jumpOffset)
	goto cleanup0
	goto __1543
__1542:
	if !(0 != 0) {
		goto __1547
	}
	if !(0 > 0) {
		goto __1549
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1549:
	;
	pc += uintptr(jumpOffset)
	switch 1 {
	case 1:
		goto __1551
	case 2:
		goto __1552
	case 0:
		goto __1553
	}
	goto __1550
__1551:
	goto cleanup1_pushObjResultPtr
__1552:
	goto cleanup2_pushObjResultPtr
__1553:
	goto __1550
__1550:
	;
	goto __1548
__1547:
	pc += uintptr(jumpOffset)
	switch 1 {
	case 1:
		goto __1555
	case 2:
		goto __1556
	case 0:
		goto __1557
	}
	goto __1554
__1555:
	goto cleanup1
__1556:
	goto cleanup2
__1557:
	goto __1554
__1554:
	;
__1548:
	;
__1543:
	;
	goto __1540
__1540:
	if 0 != 0 {
		goto __1539
	}
	goto __1541
__1541:
	;
	goto __1538
__1537:
	;
__1558:
	;
	if !(1 == 0) {
		goto __1561
	}
	if !(0 != 0) {
		goto __1563
	}
	if !(0 > 0) {
		goto __1564
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1565
__1564:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1565:
	;
__1563:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __1562
__1561:
	if !(0 != 0) {
		goto __1566
	}
	if !(0 > 0) {
		goto __1568
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1568:
	;
	pc += uintptr(5)
	switch 1 {
	case 1:
		goto __1570
	case 2:
		goto __1571
	case 0:
		goto __1572
	}
	goto __1569
__1570:
	goto cleanup1_pushObjResultPtr
__1571:
	goto cleanup2_pushObjResultPtr
__1572:
	goto __1569
__1569:
	;
	goto __1567
__1566:
	pc += uintptr(5)
	switch 1 {
	case 1:
		goto __1574
	case 2:
		goto __1575
	case 0:
		goto __1576
	}
	goto __1573
__1574:
	goto cleanup1
__1575:
	goto cleanup2
__1576:
	goto __1573
__1573:
	;
__1567:
	;
__1562:
	;
	goto __1559
__1559:
	if 0 != 0 {
		goto __1558
	}
	goto __1560
__1560:
	;
__1538:
	;

	goto __141

	// These two instructions are now redundant: the complete logic of the LOR
	// and LAND is now handled by the expression compiler.

__230:
__231:

	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) || (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclBooleanType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 788)) = libc.Bool32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) != 0)
				return TCL_OK
			}()
		}
		return XTcl_GetBooleanFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944)), bp+788)
	}() != TCL_OK) {
		goto __1577
	}

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	checkInterp = 1
	goto gotError
__1577:
	;

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) || (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBooleanType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 792)) = libc.Bool32(*(*int32)(unsafe.Pointer(value2Ptr + 32)) != 0)
				return TCL_OK
			}()
		}
		return XTcl_GetBooleanFromObj(tls, uintptr(0), value2Ptr, bp+792)
	}() != TCL_OK) {
		goto __1578
	}

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, value2Ptr)
	checkInterp = 1
	goto gotError
__1578:
	;

	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_LOR) {
		goto __1579
	}
	iResult = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 788)) != 0 || *(*int32)(unsafe.Pointer(bp + 792)) != 0)
	goto __1580
__1579:
	iResult = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 788)) != 0 && *(*int32)(unsafe.Pointer(bp + 792)) != 0)
__1580:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(iResult)*8))

__1581:
	;
	if !(2 == 0) {
		goto __1584
	}
	if !(1 != 0) {
		goto __1586
	}
	if !(1 > 0) {
		goto __1587
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1588
__1587:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1588:
	;
__1586:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1585
__1584:
	if !(1 != 0) {
		goto __1589
	}
	if !(1 > 0) {
		goto __1591
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1591:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __1593
	case 2:
		goto __1594
	case 0:
		goto __1595
	}
	goto __1592
__1593:
	goto cleanup1_pushObjResultPtr
__1594:
	goto cleanup2_pushObjResultPtr
__1595:
	goto __1592
__1592:
	;
	goto __1590
__1589:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __1597
	case 2:
		goto __1598
	case 0:
		goto __1599
	}
	goto __1596
__1597:
	goto cleanup1
__1598:
	goto cleanup2
__1599:
	goto __1596
__1596:
	;
__1590:
	;
__1585:
	;
	goto __1582
__1582:
	if 0 != 0 {
		goto __1581
	}
	goto __1583
__1583:
	;

	goto __141

	// -----------------------------------------------------------------
	//	   Start of general introspector instructions.

__232:
	currNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr

	if !(currNsPtr == (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr) {
		goto __1600
	}
__1602:
	;
__1605:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1608
	}
	XTclAllocateFreeObjects(tls)
__1608:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1606
__1606:
	if 0 != 0 {
		goto __1605
	}
	goto __1607
__1607:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0) {
		goto __1609
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	goto __1610
__1609:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes, ts+7376, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes + 2)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
__1610:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	goto __1603
__1603:
	if 0 != 0 {
		goto __1602
	}
	goto __1604
__1604:
	;
	goto __1601
__1600:
__1611:
	;
__1614:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1617
	}
	XTclAllocateFreeObjects(tls)
__1617:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1615
__1615:
	if 0 != 0 {
		goto __1614
	}
	goto __1616
__1616:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	if !(libc.Xstrlen(tls, (*Namespace)(unsafe.Pointer(currNsPtr)).FfullName) == uint64(0)) {
		goto __1618
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	goto __1619
__1618:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XTcl_Alloc(tls, uint32(libc.Xstrlen(tls, (*Namespace)(unsafe.Pointer(currNsPtr)).FfullName)+uint64(1)))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes, (*Namespace)(unsafe.Pointer(currNsPtr)).FfullName, libc.Xstrlen(tls, (*Namespace)(unsafe.Pointer(currNsPtr)).FfullName))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes + uintptr(libc.Xstrlen(tls, (*Namespace)(unsafe.Pointer(currNsPtr)).FfullName)))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = int32(libc.Xstrlen(tls, (*Namespace)(unsafe.Pointer(currNsPtr)).FfullName))
__1619:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	goto __1612
__1612:
	if 0 != 0 {
		goto __1611
	}
	goto __1613
__1613:
	;
__1601:
	;

__1620:
	;
	if !(0 == 0) {
		goto __1623
	}
	if !(1 != 0) {
		goto __1625
	}
	if !(1 > 0) {
		goto __1626
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1627
__1626:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1627:
	;
__1625:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1624
__1623:
	if !(1 != 0) {
		goto __1628
	}
	if !(1 > 0) {
		goto __1630
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1630:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __1632
	case 2:
		goto __1633
	case 0:
		goto __1634
	}
	goto __1631
__1632:
	goto cleanup1_pushObjResultPtr
__1633:
	goto cleanup2_pushObjResultPtr
__1634:
	goto __1631
__1631:
	;
	goto __1629
__1628:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __1636
	case 2:
		goto __1637
	case 0:
		goto __1638
	}
	goto __1635
__1636:
	goto cleanup1
__1637:
	goto cleanup2
__1638:
	goto __1635
__1635:
	;
__1629:
	;
__1624:
	;
	goto __1621
__1621:
	if 0 != 0 {
		goto __1620
	}
	goto __1622
__1622:
	;

	goto __141
__233:
	corPtr1 = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcorPtr

__1639:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1642
	}
	XTclAllocateFreeObjects(tls)
__1642:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1640
__1640:
	if 0 != 0 {
		goto __1639
	}
	goto __1641
__1641:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	if !(corPtr1 != 0 && !((*Command1)(unsafe.Pointer((*CoroutineData)(unsafe.Pointer(corPtr1)).FcmdPtr)).Fflags&CMD_IS_DELETED != 0)) {
		goto __1643
	}
	XTcl_GetCommandFullName(tls, interp, (*CoroutineData)(unsafe.Pointer(corPtr1)).FcmdPtr,
		*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
__1643:
	;

__1644:
	;
	if !(0 == 0) {
		goto __1647
	}
	if !(1 != 0) {
		goto __1649
	}
	if !(1 > 0) {
		goto __1650
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1651
__1650:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1651:
	;
__1649:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1648
__1647:
	if !(1 != 0) {
		goto __1652
	}
	if !(1 > 0) {
		goto __1654
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1654:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __1656
	case 2:
		goto __1657
	case 0:
		goto __1658
	}
	goto __1655
__1656:
	goto cleanup1_pushObjResultPtr
__1657:
	goto cleanup2_pushObjResultPtr
__1658:
	goto __1655
__1655:
	;
	goto __1653
__1652:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __1660
	case 2:
		goto __1661
	case 0:
		goto __1662
	}
	goto __1659
__1660:
	goto cleanup1
__1661:
	goto cleanup2
__1662:
	goto __1659
__1659:
	;
__1653:
	;
__1648:
	;
	goto __1645
__1645:
	if 0 != 0 {
		goto __1644
	}
	goto __1646
__1646:
	;

	goto __141
__234:
__1663:
	;
__1666:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1669
	}
	XTclAllocateFreeObjects(tls)
__1669:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1667
__1667:
	if 0 != 0 {
		goto __1666
	}
	goto __1668
__1668:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = int32((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).Flevel)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __1664
__1664:
	if 0 != 0 {
		goto __1663
	}
	goto __1665
__1665:
	;

__1670:
	;
	if !(0 == 0) {
		goto __1673
	}
	if !(1 != 0) {
		goto __1675
	}
	if !(1 > 0) {
		goto __1676
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1677
__1676:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1677:
	;
__1675:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1674
__1673:
	if !(1 != 0) {
		goto __1678
	}
	if !(1 > 0) {
		goto __1680
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1680:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __1682
	case 2:
		goto __1683
	case 0:
		goto __1684
	}
	goto __1681
__1682:
	goto cleanup1_pushObjResultPtr
__1683:
	goto cleanup2_pushObjResultPtr
__1684:
	goto __1681
__1681:
	;
	goto __1679
__1678:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __1686
	case 2:
		goto __1687
	case 0:
		goto __1688
	}
	goto __1685
__1686:
	goto cleanup1
__1687:
	goto cleanup2
__1688:
	goto __1685
__1685:
	;
__1679:
	;
__1674:
	;
	goto __1671
__1671:
	if 0 != 0 {
		goto __1670
	}
	goto __1672
__1672:
	;
	goto __141
__235:
	framePtr1 = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	rootFramePtr = (*Interp)(unsafe.Pointer(interp)).FrootFramePtr

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 796)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), bp+796)
	}() != TCL_OK) {
		goto __1689
	}

	goto gotError
__1689:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 796)) <= 0) {
		goto __1690
	}
	*(*int32)(unsafe.Pointer(bp + 796 /* level1 */)) += (*CallFrame)(unsafe.Pointer(framePtr1)).Flevel
__1690:
	;
__1691:
	if !((*CallFrame)(unsafe.Pointer(framePtr1)).Flevel != *(*int32)(unsafe.Pointer(bp + 796)) && framePtr1 != rootFramePtr) {
		goto __1693
	}
	// Empty loop body
	goto __1692
__1692:
	framePtr1 = (*CallFrame)(unsafe.Pointer(framePtr1)).FcallerVarPtr
	goto __1691
	goto __1693
__1693:
	;
	if !(framePtr1 == rootFramePtr) {
		goto __1694
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+14298, libc.VaList(bp+192, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
		}())))

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+200, ts+4178, ts+7699, ts+29074,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
		}(), uintptr(0)))
	checkInterp = 1
	goto gotError
__1694:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewListObj(tls, (*CallFrame)(unsafe.Pointer(framePtr1)).Fobjc, (*CallFrame)(unsafe.Pointer(framePtr1)).Fobjv)

__1695:
	;
	if !(1 == 0) {
		goto __1698
	}
	if !(1 != 0) {
		goto __1700
	}
	if !(1 > 0) {
		goto __1701
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1702
__1701:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1702:
	;
__1700:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1699
__1698:
	if !(1 != 0) {
		goto __1703
	}
	if !(1 > 0) {
		goto __1705
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1705:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1707
	case 2:
		goto __1708
	case 0:
		goto __1709
	}
	goto __1706
__1707:
	goto cleanup1_pushObjResultPtr
__1708:
	goto cleanup2_pushObjResultPtr
__1709:
	goto __1706
__1706:
	;
	goto __1704
__1703:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1711
	case 2:
		goto __1712
	case 0:
		goto __1713
	}
	goto __1710
__1711:
	goto cleanup1
__1712:
	goto cleanup2
__1713:
	goto __1710
__1710:
	;
__1704:
	;
__1699:
	;
	goto __1696
__1696:
	if 0 != 0 {
		goto __1695
	}
	goto __1697
__1697:
	;

__236:
	cmd = XTcl_GetCommandFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
__1714:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1717
	}
	XTclAllocateFreeObjects(tls)
__1717:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1715
__1715:
	if 0 != 0 {
		goto __1714
	}
	goto __1716
__1716:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	if !(cmd != uintptr(0)) {
		goto __1718
	}
	XTcl_GetCommandFullName(tls, interp, cmd, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
__1718:
	;

__1719:
	;
	if !(1 == 0) {
		goto __1722
	}
	if !(1 != 0) {
		goto __1724
	}
	if !(1 > 0) {
		goto __1725
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1726
__1725:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1726:
	;
__1724:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1723
__1722:
	if !(1 != 0) {
		goto __1727
	}
	if !(1 > 0) {
		goto __1729
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1729:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1731
	case 2:
		goto __1732
	case 0:
		goto __1733
	}
	goto __1730
__1731:
	goto cleanup1_pushObjResultPtr
__1732:
	goto cleanup2_pushObjResultPtr
__1733:
	goto __1730
__1730:
	;
	goto __1728
__1727:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1735
	case 2:
		goto __1736
	case 0:
		goto __1737
	}
	goto __1734
__1735:
	goto cleanup1
__1736:
	goto cleanup2
__1737:
	goto __1734
__1734:
	;
__1728:
	;
__1723:
	;
	goto __1720
__1720:
	if 0 != 0 {
		goto __1719
	}
	goto __1721
__1721:
	;

__237:
	;
	cmd = XTcl_GetCommandFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
	if !(cmd == uintptr(0)) {
		goto __1738
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+8371, libc.VaList(bp+240, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
		}())))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+248, ts+4178, ts+7699, ts+7857,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
		}(), uintptr(0)))
	checkInterp = 1

	goto gotError
__1738:
	;
	origCmd = XTclGetOriginalCommand(tls, cmd)
	if !(origCmd == uintptr(0)) {
		goto __1739
	}
	origCmd = cmd
__1739:
	;
__1740:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1743
	}
	XTclAllocateFreeObjects(tls)
__1743:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1741
__1741:
	if 0 != 0 {
		goto __1740
	}
	goto __1742
__1742:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	XTcl_GetCommandFullName(tls, interp, origCmd, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))

__1744:
	;
	if !(1 == 0) {
		goto __1747
	}
	if !(1 != 0) {
		goto __1749
	}
	if !(1 > 0) {
		goto __1750
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1751
__1750:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1751:
	;
__1749:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1748
__1747:
	if !(1 != 0) {
		goto __1752
	}
	if !(1 > 0) {
		goto __1754
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1754:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1756
	case 2:
		goto __1757
	case 0:
		goto __1758
	}
	goto __1755
__1756:
	goto cleanup1_pushObjResultPtr
__1757:
	goto cleanup2_pushObjResultPtr
__1758:
	goto __1755
__1755:
	;
	goto __1753
__1752:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1760
	case 2:
		goto __1761
	case 0:
		goto __1762
	}
	goto __1759
__1760:
	goto cleanup1
__1761:
	goto cleanup2
__1762:
	goto __1759
__1759:
	;
__1753:
	;
__1748:
	;
	goto __1745
__1745:
	if 0 != 0 {
		goto __1744
	}
	goto __1746
__1746:
	;

	/*
	 * -----------------------------------------------------------------
	 *	   Start of TclOO support instructions.
	 */

__238:
	framePtr2 = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	if !(framePtr2 == uintptr(0) || !((*CallFrame)(unsafe.Pointer(framePtr2)).FisProcCallFrame&FRAME_IS_METHOD != 0)) {
		goto __1763
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+29086,
		-1))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+288, ts+4178, ts+29131, ts+29134, uintptr(0)))
	checkInterp = 1
	goto gotError
__1763:
	;
	contextPtr = (*CallFrame)(unsafe.Pointer(framePtr2)).FclientData

	// Call out to get the name; it's expensive to compute but cached.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclOOObjectName(tls, interp, (*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)

__1764:
	;
	if !(0 == 0) {
		goto __1767
	}
	if !(1 != 0) {
		goto __1769
	}
	if !(1 > 0) {
		goto __1770
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1771
__1770:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1771:
	;
__1769:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1768
__1767:
	if !(1 != 0) {
		goto __1772
	}
	if !(1 > 0) {
		goto __1774
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1774:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __1776
	case 2:
		goto __1777
	case 0:
		goto __1778
	}
	goto __1775
__1776:
	goto cleanup1_pushObjResultPtr
__1777:
	goto cleanup2_pushObjResultPtr
__1778:
	goto __1775
__1775:
	;
	goto __1773
__1772:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __1780
	case 2:
		goto __1781
	case 0:
		goto __1782
	}
	goto __1779
__1780:
	goto cleanup1
__1781:
	goto cleanup2
__1782:
	goto __1779
__1779:
	;
__1773:
	;
__1768:
	;
	goto __1765
__1765:
	if 0 != 0 {
		goto __1764
	}
	goto __1766
__1766:
	;

__239:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	framePtr2 = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(opnd-2)*8))
	*(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)) = tosPtr - uintptr(opnd-1)*8
	skip = 2

	if !(framePtr2 == uintptr(0) || !((*CallFrame)(unsafe.Pointer(framePtr2)).FisProcCallFrame&FRAME_IS_METHOD != 0)) {
		goto __1783
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+29151,
		-1))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+320, ts+4178, ts+29131, ts+29134, uintptr(0)))
	checkInterp = 1
	goto gotError
__1783:
	;
	contextPtr = (*CallFrame)(unsafe.Pointer(framePtr2)).FclientData

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	if !(oPtr == uintptr(0)) {
		goto __1784
	}

	goto gotError
	goto __1785
__1784:
	classPtr = (*Object)(unsafe.Pointer(oPtr)).FclassPtr

	if !(classPtr == uintptr(0)) {
		goto __1786
	}

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26049, libc.VaList(bp+352, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 944)))
		}())))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+360, ts+4178, ts+29131, ts+29198, uintptr(0)))
	checkInterp = 1
	goto gotError
__1786:
	;

	i3 = (*CallContext)(unsafe.Pointer(contextPtr)).Findex + 1
__1787:
	if !(i3 < (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain) {
		goto __1789
	}
	miPtr = (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr(i3)*24
	if !(!((*MInvoke)(unsafe.Pointer(miPtr)).FisFilter != 0) && (*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FdeclaringClassPtr == classPtr) {
		goto __1790
	}
	newDepth = i3
	goto doInvokeNext
__1790:
	;
	goto __1788
__1788:
	i3++
	goto __1787
	goto __1789
__1789:
	;

	if !((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&CONSTRUCTOR != 0) {
		goto __1791
	}
	methodType = ts + 26491 /* "constructor" */
	goto __1792
__1791:
	if !((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&DESTRUCTOR != 0) {
		goto __1793
	}
	methodType = ts + 26503 /* "destructor" */
	goto __1794
__1793:
	methodType = ts + 26521 /* "method" */
__1794:
	;
__1792:
	;

	i3 = (*CallContext)(unsafe.Pointer(contextPtr)).Findex
__1795:
	if !(i3 >= 0) {
		goto __1797
	}
	miPtr = (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr(i3)*24
	if !((*MInvoke)(unsafe.Pointer(miPtr)).FisFilter != 0 ||
		(*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FdeclaringClassPtr != classPtr) {
		goto __1798
	}
	goto __1796
__1798:
	;
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+29213,
		libc.VaList(bp+392, methodType, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 944)))
		}())))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+408, ts+4178, ts+29131, ts+29263,
		uintptr(0)))
	checkInterp = 1
	goto gotError
	goto __1796
__1796:
	i3--
	goto __1795
	goto __1797
__1797:
	;
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+29283,
		libc.VaList(bp+440, methodType, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 944)))
		}())))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+456, ts+4178, ts+29131, ts+29327, uintptr(0)))
	checkInterp = 1
	goto gotError
__1785:
	;

__240:
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))))
	*(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)) = tosPtr - uintptr(opnd-1)*8
	framePtr2 = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	skip = 1

	if !(framePtr2 == uintptr(0) || !((*CallFrame)(unsafe.Pointer(framePtr2)).FisProcCallFrame&FRAME_IS_METHOD != 0)) {
		goto __1799
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+29343,
		-1))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+488, ts+4178, ts+29131, ts+29134, uintptr(0)))
	checkInterp = 1
	goto gotError
__1799:
	;
	contextPtr = (*CallFrame)(unsafe.Pointer(framePtr2)).FclientData

	newDepth = (*CallContext)(unsafe.Pointer(contextPtr)).Findex + 1
	if !(newDepth >= (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain) {
		goto __1800
	}

	if !((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&CONSTRUCTOR != 0) {
		goto __1801
	}
	methodType1 = ts + 26491 /* "constructor" */
	goto __1802
__1801:
	if !((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&DESTRUCTOR != 0) {
		goto __1803
	}
	methodType1 = ts + 26503 /* "destructor" */
	goto __1804
__1803:
	methodType1 = ts + 26521 /* "method" */
__1804:
	;
__1802:
	;

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+29388, libc.VaList(bp+520, methodType1)))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+528, ts+4178, ts+29131, ts+29414, uintptr(0)))
	checkInterp = 1
	goto gotError
__1800:
	;

doInvokeNext:
	*(*uintptr)(unsafe.Pointer(TD + 24 + 40 + 8 /* &.pc */)) = pc
	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = TD + 24

	if !((*Interp)(unsafe.Pointer(interp)).Fflags&INTERP_DEBUG_FRAME != 0) {
		goto __1805
	}
	sArgumentBCEnter(tls, interp, (*TEBCdata)(unsafe.Pointer(TD)).FcodePtr, TD, pc, opnd, *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)))
__1805:
	;

	pcAdjustment = 2
	cleanup = opnd
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = (*CallFrame)(unsafe.Pointer(framePtr2)).FcallerVarPtr
	pc += uintptr(pcAdjustment)
__1806:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
__1809:
__1812:
	;
__1815:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1818
	}
	XTclAllocateFreeObjects(tls)
__1818:
	;
	_objPtr29 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1816
__1816:
	if 0 != 0 {
		goto __1815
	}
	goto __1817
__1817:
	;
	_callbackPtr8 = _objPtr29
	goto __1813
__1813:
	if 0 != 0 {
		goto __1812
	}
	goto __1814
__1814:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr8)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTEBCresume}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr8 + 8)) = TD
	*(*ClientData)(unsafe.Pointer(_callbackPtr8 + 8 + 1*8)) = pc
	*(*ClientData)(unsafe.Pointer(_callbackPtr8 + 8 + 2*8)) = uintptr(Intptr_t(cleanup))
	*(*ClientData)(unsafe.Pointer(_callbackPtr8 + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr8)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr8
	goto __1810
__1810:
	if 0 != 0 {
		goto __1809
	}
	goto __1811
__1811:
	;
	goto __1807
__1807:
	if 0 != 0 {
		goto __1806
	}
	goto __1808
__1808:
	;

	XTclPushTailcallPoint(tls, interp)
	oPtr = (*CallContext)(unsafe.Pointer(contextPtr)).FoPtr
	if !((*Object)(unsafe.Pointer(oPtr)).Fflags&FILTER_HANDLING != 0) {
		goto __1819
	}
__1821:
__1824:
	;
__1827:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1830
	}
	XTclAllocateFreeObjects(tls)
__1830:
	;
	_objPtr30 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1828
__1828:
	if 0 != 0 {
		goto __1827
	}
	goto __1829
__1829:
	;
	_callbackPtr9 = _objPtr30
	goto __1825
__1825:
	if 0 != 0 {
		goto __1824
	}
	goto __1826
__1826:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr9)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sFinalizeOONextFilter}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr9 + 8)) = framePtr2
	*(*ClientData)(unsafe.Pointer(_callbackPtr9 + 8 + 1*8)) = contextPtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr9 + 8 + 2*8)) = uintptr(Intptr_t((*CallContext)(unsafe.Pointer(contextPtr)).Findex))
	*(*ClientData)(unsafe.Pointer(_callbackPtr9 + 8 + 3*8)) = uintptr(Intptr_t((*CallContext)(unsafe.Pointer(contextPtr)).Fskip))
	(*NRE_callback)(unsafe.Pointer(_callbackPtr9)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr9
	goto __1822
__1822:
	if 0 != 0 {
		goto __1821
	}
	goto __1823
__1823:
	;
	goto __1820
__1819:
__1831:
__1834:
	;
__1837:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1840
	}
	XTclAllocateFreeObjects(tls)
__1840:
	;
	_objPtr31 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1838
__1838:
	if 0 != 0 {
		goto __1837
	}
	goto __1839
__1839:
	;
	_callbackPtr10 = _objPtr31
	goto __1835
__1835:
	if 0 != 0 {
		goto __1834
	}
	goto __1836
__1836:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr10)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sFinalizeOONext}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr10 + 8)) = framePtr2
	*(*ClientData)(unsafe.Pointer(_callbackPtr10 + 8 + 1*8)) = contextPtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr10 + 8 + 2*8)) = uintptr(Intptr_t((*CallContext)(unsafe.Pointer(contextPtr)).Findex))
	*(*ClientData)(unsafe.Pointer(_callbackPtr10 + 8 + 3*8)) = uintptr(Intptr_t((*CallContext)(unsafe.Pointer(contextPtr)).Fskip))
	(*NRE_callback)(unsafe.Pointer(_callbackPtr10)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr10
	goto __1832
__1832:
	if 0 != 0 {
		goto __1831
	}
	goto __1833
__1833:
	;
__1820:
	;
	(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = skip
	(*CallContext)(unsafe.Pointer(contextPtr)).Findex = newDepth
	if !((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr(newDepth)*24)).FisFilter != 0 ||
		(*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&FILTER_HANDLING != 0) {
		goto __1841
	}
	*(*int32)(unsafe.Pointer(oPtr + 92)) |= FILTER_HANDLING
	goto __1842
__1841:
	*(*int32)(unsafe.Pointer(oPtr + 92)) &= libc.CplInt32(FILTER_HANDLING)
__1842:
	;

	mPtr =
		(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr(newDepth)*24)).FmPtr

	return (*struct {
		f func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FcallProc})).f(tls, (*Method)(unsafe.Pointer(mPtr)).FclientData, interp,
		contextPtr, opnd, *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)))

__241:
	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(func() int32 {
		if oPtr != uintptr(0) {
			return 1
		}
		return 0
	}())*8))

__1843:
	;
	if !(1 == 0) {
		goto __1846
	}
	if !(1 != 0) {
		goto __1848
	}
	if !(1 > 0) {
		goto __1849
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1850
__1849:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1850:
	;
__1848:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1847
__1846:
	if !(1 != 0) {
		goto __1851
	}
	if !(1 > 0) {
		goto __1853
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1853:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1855
	case 2:
		goto __1856
	case 0:
		goto __1857
	}
	goto __1854
__1855:
	goto cleanup1_pushObjResultPtr
__1856:
	goto cleanup2_pushObjResultPtr
__1857:
	goto __1854
__1854:
	;
	goto __1852
__1851:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1859
	case 2:
		goto __1860
	case 0:
		goto __1861
	}
	goto __1858
__1859:
	goto cleanup1
__1860:
	goto cleanup2
__1861:
	goto __1858
__1858:
	;
__1852:
	;
__1847:
	;
	goto __1844
__1844:
	if 0 != 0 {
		goto __1843
	}
	goto __1845
__1845:
	;
__242:
	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
	if !(oPtr == uintptr(0)) {
		goto __1862
	}

	goto gotError
__1862:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclOOObjectName(tls, interp, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FthisPtr)

__1863:
	;
	if !(1 == 0) {
		goto __1866
	}
	if !(1 != 0) {
		goto __1868
	}
	if !(1 > 0) {
		goto __1869
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1870
__1869:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1870:
	;
__1868:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1867
__1866:
	if !(1 != 0) {
		goto __1871
	}
	if !(1 > 0) {
		goto __1873
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1873:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1875
	case 2:
		goto __1876
	case 0:
		goto __1877
	}
	goto __1874
__1875:
	goto cleanup1_pushObjResultPtr
__1876:
	goto cleanup2_pushObjResultPtr
__1877:
	goto __1874
__1874:
	;
	goto __1872
__1871:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1879
	case 2:
		goto __1880
	case 0:
		goto __1881
	}
	goto __1878
__1879:
	goto cleanup1
__1880:
	goto cleanup2
__1881:
	goto __1878
__1878:
	;
__1872:
	;
__1867:
	;
	goto __1864
__1864:
	if 0 != 0 {
		goto __1863
	}
	goto __1865
__1865:
	;
__243:
	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)))
	if !(oPtr == uintptr(0)) {
		goto __1882
	}

	goto gotError
__1882:
	;

	// TclOO objects *never* have the global namespace as their NS.

__1883:
	;
__1886:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1889
	}
	XTclAllocateFreeObjects(tls)
__1889:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1887
__1887:
	if 0 != 0 {
		goto __1886
	}
	goto __1888
__1888:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	if !(libc.Xstrlen(tls, (*Tcl_Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).FfullName) == uint64(0)) {
		goto __1890
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	goto __1891
__1890:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XTcl_Alloc(tls, uint32(libc.Xstrlen(tls, (*Tcl_Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).FfullName)+uint64(1)))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes, (*Tcl_Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).FfullName, libc.Xstrlen(tls, (*Tcl_Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).FfullName))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes + uintptr(libc.Xstrlen(tls, (*Tcl_Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).FfullName)))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = int32(libc.Xstrlen(tls, (*Tcl_Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).FfullName))
__1891:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	goto __1884
__1884:
	if 0 != 0 {
		goto __1883
	}
	goto __1885
__1885:
	;

__1892:
	;
	if !(1 == 0) {
		goto __1895
	}
	if !(1 != 0) {
		goto __1897
	}
	if !(1 > 0) {
		goto __1898
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1899
__1898:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1899:
	;
__1897:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1896
__1895:
	if !(1 != 0) {
		goto __1900
	}
	if !(1 > 0) {
		goto __1902
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1902:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1904
	case 2:
		goto __1905
	case 0:
		goto __1906
	}
	goto __1903
__1904:
	goto cleanup1_pushObjResultPtr
__1905:
	goto cleanup2_pushObjResultPtr
__1906:
	goto __1903
__1903:
	;
	goto __1901
__1900:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1908
	case 2:
		goto __1909
	case 0:
		goto __1910
	}
	goto __1907
__1908:
	goto cleanup1
__1909:
	goto cleanup2
__1910:
	goto __1907
__1907:
	;
__1901:
	;
__1896:
	;
	goto __1893
__1893:
	if 0 != 0 {
		goto __1892
	}
	goto __1894
__1894:
	;

	/*
	 *     End of TclOO support instructions.
	 * -----------------------------------------------------------------
	 *	   Start of INST_LIST and related instructions.
	 */

__244:
	// Pop the opnd (objc) top stack elements into a new list obj and then
	// decrement their ref counts.

	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewListObj(tls, opnd, tosPtr-uintptr(opnd-1)*8)

__1911:
	pc += uintptr(5)
	cleanup = opnd
	if !(1 != 0) {
		goto __1914
	}
	if !(1 > 0) {
		goto __1916
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1916:
	;
	goto cleanupV_pushObjResultPtr
	goto __1915
__1914:
	goto cleanupV
__1915:
	;
	goto __1912
__1912:
	if 0 != 0 {
		goto __1911
	}
	goto __1913
__1913:
	;

__245:
	;
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), bp+704)
	}() != TCL_OK) {
		goto __1917
	}

	goto gotError
__1917:
	;
__1918:
	;
__1921:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1924
	}
	XTclAllocateFreeObjects(tls)
__1924:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1922
__1922:
	if 0 != 0 {
		goto __1921
	}
	goto __1923
__1923:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = int32(*(*int32)(unsafe.Pointer(bp + 704)))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __1919
__1919:
	if 0 != 0 {
		goto __1918
	}
	goto __1920
__1920:
	;

__1925:
	;
	if !(1 == 0) {
		goto __1928
	}
	if !(1 != 0) {
		goto __1930
	}
	if !(1 > 0) {
		goto __1931
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1932
__1931:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1932:
	;
__1930:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1929
__1928:
	if !(1 != 0) {
		goto __1933
	}
	if !(1 > 0) {
		goto __1935
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1935:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1937
	case 2:
		goto __1938
	case 0:
		goto __1939
	}
	goto __1936
__1937:
	goto cleanup1_pushObjResultPtr
__1938:
	goto cleanup2_pushObjResultPtr
__1939:
	goto __1936
__1936:
	;
	goto __1934
__1933:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __1941
	case 2:
		goto __1942
	case 0:
		goto __1943
	}
	goto __1940
__1941:
	goto cleanup1
__1942:
	goto cleanup2
__1943:
	goto __1940
__1940:
	;
__1934:
	;
__1929:
	;
	goto __1926
__1926:
	if 0 != 0 {
		goto __1925
	}
	goto __1927
__1927:
	;

__246: // lindex with objc == 3
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	// Extract the desired list element.

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+720, bp+712)
	}() == TCL_OK &&
		(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) &&
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 800)) = int32(*(*int32)(unsafe.Pointer(value2Ptr + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, uintptr(0), value2Ptr, *(*int32)(unsafe.Pointer(bp + 720))-1, bp+800)
		}() == TCL_OK) {
		goto __1944
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FrefCount, 1) > 1) {
		goto __1945
	}
	goto __1946
__1945:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __1947
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __1949
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes)
__1949:
	;
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength = -1
__1950:
	;
	*(*uintptr)(unsafe.Pointer(value2Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value2Ptr
	goto __1951
__1951:
	if 0 != 0 {
		goto __1950
	}
	goto __1952
__1952:
	;
	goto __1948
__1947:
	XTclFreeObj(tls, value2Ptr)
__1948:
	;
__1946:
	;

	tosPtr -= 8
	pcAdjustment = 1
	goto lindexFastPath
__1944:
	;

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclLindexList(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), value2Ptr)
	if !!(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __1953
	}

	goto gotError
__1953:
	;

	// Stash the list element on the stack.

__1954:
	;
	if !(2 == 0) {
		goto __1957
	}
	if !(-1 != 0) {
		goto __1959
	}
	if !(-1 > 0) {
		goto __1960
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1961
__1960:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1961:
	;
__1959:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __1958
__1957:
	if !(-1 != 0) {
		goto __1962
	}
	if !(-1 > 0) {
		goto __1964
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1964:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __1966
	case 2:
		goto __1967
	case 0:
		goto __1968
	}
	goto __1965
__1966:
	goto cleanup1_pushObjResultPtr
__1967:
	goto cleanup2_pushObjResultPtr
__1968:
	goto __1965
__1965:
	;
	goto __1963
__1962:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __1970
	case 2:
		goto __1971
	case 0:
		goto __1972
	}
	goto __1969
__1970:
	goto cleanup1
__1971:
	goto cleanup2
__1972:
	goto __1969
__1969:
	;
__1963:
	;
__1958:
	;
	goto __1955
__1955:
	if 0 != 0 {
		goto __1954
	}
	goto __1956
__1956:
	; // Already has the correct refCount

__247: // lindex with objc==3 and index in bytecode
	// stream

	// Pop the list and get the index.

	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3))))

	// Get the contents of the list, making sure that it really is a list
	// in the process.

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+720, bp+712)
	}() != TCL_OK) {
		goto __1973
	}

	goto gotError
__1973:
	;

	// Decode end-offset index values.

	*(*int32)(unsafe.Pointer(bp + 800 /* index */)) = XTclIndexDecode(tls, opnd, *(*int32)(unsafe.Pointer(bp + 720))-1)
	pcAdjustment = 5

lindexFastPath:
	if !(*(*int32)(unsafe.Pointer(bp + 800)) >= 0 && *(*int32)(unsafe.Pointer(bp + 800)) < *(*int32)(unsafe.Pointer(bp + 720))) {
		goto __1974
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)) + uintptr(*(*int32)(unsafe.Pointer(bp + 800 /* index */)))*8))
	goto __1975
__1974:
	;
__1976:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __1979
	}
	XTclAllocateFreeObjects(tls)
__1979:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __1977
__1977:
	if 0 != 0 {
		goto __1976
	}
	goto __1978
__1978:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

__1975:
	;

__1980:
	;
	if !(1 == 0) {
		goto __1983
	}
	if !(1 != 0) {
		goto __1985
	}
	if !(1 > 0) {
		goto __1986
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __1987
__1986:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__1987:
	;
__1985:
	;
	pc += uintptr(pcAdjustment)
	goto cleanup0
	goto __1984
__1983:
	if !(1 != 0) {
		goto __1988
	}
	if !(1 > 0) {
		goto __1990
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__1990:
	;
	pc += uintptr(pcAdjustment)
	switch 1 {
	case 1:
		goto __1992
	case 2:
		goto __1993
	case 0:
		goto __1994
	}
	goto __1991
__1992:
	goto cleanup1_pushObjResultPtr
__1993:
	goto cleanup2_pushObjResultPtr
__1994:
	goto __1991
__1991:
	;
	goto __1989
__1988:
	pc += uintptr(pcAdjustment)
	switch 1 {
	case 1:
		goto __1996
	case 2:
		goto __1997
	case 0:
		goto __1998
	}
	goto __1995
__1996:
	goto cleanup1
__1997:
	goto cleanup2
__1998:
	goto __1995
__1995:
	;
__1989:
	;
__1984:
	;
	goto __1981
__1981:
	if 0 != 0 {
		goto __1980
	}
	goto __1982
__1982:
	;

__248: // 'lindex' with multiple index args
	// Determine the count of index args.

	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	numIndices = opnd - 1

	// Do the 'lindex' operation.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclLindexFlat(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(numIndices)*8)),
		numIndices, tosPtr-uintptr(numIndices-1)*8)
	if !!(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __1999
	}

	goto gotError
__1999:
	;

	// Set result.

__2000:
	pc += uintptr(5)
	cleanup = opnd
	if !(-1 != 0) {
		goto __2003
	}
	if !(-1 > 0) {
		goto __2005
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2005:
	;
	goto cleanupV_pushObjResultPtr
	goto __2004
__2003:
	goto cleanupV
__2004:
	;
	goto __2001
__2001:
	if 0 != 0 {
		goto __2000
	}
	goto __2002
__2002:
	;

__249:
	// Lset with 3, 5, or more args. Get the number of index args.

	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	numIndices = opnd - 2

	// Get the old value of variable, and remove the stack ref. This is
	// safe because the variable still references the object; the ref
	// count will never go zero here - we can use the smaller macro
	// Tcl_DecrRefCount.

	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
__2006:
	_objPtr32 = *(*uintptr)(unsafe.Pointer(bp + 944))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr32)).FrefCount, 1) <= 1) {
		goto __2009
	}
	XTclFreeObj(tls, _objPtr32)
__2009:
	;
	goto __2007
__2007:
	if 0 != 0 {
		goto __2006
	}
	goto __2008
__2008:
	; // This one should be done here

	// Compute the new variable value.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclLsetFlat(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), numIndices,
		tosPtr-uintptr(numIndices)*8, *(*uintptr)(unsafe.Pointer(tosPtr)))
	if !!(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __2010
	}

	goto gotError
__2010:
	;

	// Set result.

__2011:
	pc += uintptr(5)
	cleanup = numIndices + 1
	if !(-1 != 0) {
		goto __2014
	}
	if !(-1 > 0) {
		goto __2016
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2016:
	;
	goto cleanupV_pushObjResultPtr
	goto __2015
__2014:
	goto cleanupV
__2015:
	;
	goto __2012
__2012:
	if 0 != 0 {
		goto __2011
	}
	goto __2013
__2013:
	;

__250: // 'lset' with 4 args
	// Get the old value of variable, and remove the stack ref. This is
	// safe because the variable still references the object; the ref
	// count will never go zero here - we can use the smaller macro
	// Tcl_DecrRefCount.

	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
__2017:
	_objPtr33 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr33)).FrefCount, 1) <= 1) {
		goto __2020
	}
	XTclFreeObj(tls, _objPtr33)
__2020:
	;
	goto __2018
__2018:
	if 0 != 0 {
		goto __2017
	}
	goto __2019
__2019:
	; // This one should be done here.

	// Get the new element value, and the index list.

	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	// Compute the new variable value.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclLsetList(tls, interp, objPtr, value2Ptr, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	if !!(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __2021
	}

	goto gotError
__2021:
	;

	// Set result.

__2022:
	;
	if !(2 == 0) {
		goto __2025
	}
	if !(-1 != 0) {
		goto __2027
	}
	if !(-1 > 0) {
		goto __2028
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2029
__2028:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2029:
	;
__2027:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2026
__2025:
	if !(-1 != 0) {
		goto __2030
	}
	if !(-1 > 0) {
		goto __2032
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2032:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2034
	case 2:
		goto __2035
	case 0:
		goto __2036
	}
	goto __2033
__2034:
	goto cleanup1_pushObjResultPtr
__2035:
	goto cleanup2_pushObjResultPtr
__2036:
	goto __2033
__2033:
	;
	goto __2031
__2030:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2038
	case 2:
		goto __2039
	case 0:
		goto __2040
	}
	goto __2037
__2038:
	goto cleanup1
__2039:
	goto cleanup2
__2040:
	goto __2037
__2037:
	;
__2031:
	;
__2026:
	;
	goto __2023
__2023:
	if 0 != 0 {
		goto __2022
	}
	goto __2024
__2024:
	;

__251: // lrange with objc==4 and both indices in
	// bytecode stream

	// Pop the list and get the indices.

	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3))))
	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(5))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(3))))

	// Get the contents of the list, making sure that it really is a list
	// in the process.

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+720, bp+712)
	}() != TCL_OK) {
		goto __2041
	}

	goto gotError
__2041:
	;

	// Skip a lot of work if we're about to throw the result away (common
	// with uses of [lassign]).

	if !(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(9)))) == INST_POP) {
		goto __2042
	}
__2043:
	;
	if !(1 == 0) {
		goto __2046
	}
	if !(0 != 0) {
		goto __2048
	}
	if !(0 > 0) {
		goto __2049
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2050
__2049:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2050:
	;
__2048:
	;
	pc += uintptr(10)
	goto cleanup0
	goto __2047
__2046:
	if !(0 != 0) {
		goto __2051
	}
	if !(0 > 0) {
		goto __2053
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2053:
	;
	pc += uintptr(10)
	switch 1 {
	case 1:
		goto __2055
	case 2:
		goto __2056
	case 0:
		goto __2057
	}
	goto __2054
__2055:
	goto cleanup1_pushObjResultPtr
__2056:
	goto cleanup2_pushObjResultPtr
__2057:
	goto __2054
__2054:
	;
	goto __2052
__2051:
	pc += uintptr(10)
	switch 1 {
	case 1:
		goto __2059
	case 2:
		goto __2060
	case 0:
		goto __2061
	}
	goto __2058
__2059:
	goto cleanup1
__2060:
	goto cleanup2
__2061:
	goto __2058
__2058:
	;
__2052:
	;
__2047:
	;
	goto __2044
__2044:
	if 0 != 0 {
		goto __2043
	}
	goto __2045
__2045:
	;
__2042:
	;

	// Every range of an empty list is an empty list
	if !(*(*int32)(unsafe.Pointer(bp + 720)) == 0) {
		goto __2062
	}
	// avoid return of not canonical list (e. g. spaces in string repr.)
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes) != 0) || !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength != 0)) {
		goto __2063
	}

__2064:
	;
	if !(0 == 0) {
		goto __2067
	}
	if !(0 != 0) {
		goto __2069
	}
	if !(0 > 0) {
		goto __2070
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2071
__2070:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2071:
	;
__2069:
	;
	pc += uintptr(9)
	goto cleanup0
	goto __2068
__2067:
	if !(0 != 0) {
		goto __2072
	}
	if !(0 > 0) {
		goto __2074
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2074:
	;
	pc += uintptr(9)
	switch 0 {
	case 1:
		goto __2076
	case 2:
		goto __2077
	case 0:
		goto __2078
	}
	goto __2075
__2076:
	goto cleanup1_pushObjResultPtr
__2077:
	goto cleanup2_pushObjResultPtr
__2078:
	goto __2075
__2075:
	;
	goto __2073
__2072:
	pc += uintptr(9)
	switch 0 {
	case 1:
		goto __2080
	case 2:
		goto __2081
	case 0:
		goto __2082
	}
	goto __2079
__2080:
	goto cleanup1
__2081:
	goto cleanup2
__2082:
	goto __2079
__2079:
	;
__2073:
	;
__2068:
	;
	goto __2065
__2065:
	if 0 != 0 {
		goto __2064
	}
	goto __2066
__2066:
	;
__2063:
	;
	goto emptyList
__2062:
	;

	// Decode index value operands.

	//
	// 	assert ( toIdx != TCL_INDEX_AFTER);
	// 	 *
	// 	 * Extra safety for legacy bytecodes:
	//
	if !(*(*int32)(unsafe.Pointer(bp + 832)) == 0x7fffffff) {
		goto __2083
	}
	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = -2
__2083:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 832)) == -1 || *(*int32)(unsafe.Pointer(bp + 828)) == 0x7fffffff) {
		goto __2084
	}
	goto emptyList
__2084:
	;
	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = XTclIndexDecode(tls, *(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)), *(*int32)(unsafe.Pointer(bp + 720))-1)
	if !(*(*int32)(unsafe.Pointer(bp + 832)) < 0) {
		goto __2085
	}
	goto emptyList
	goto __2086
__2085:
	if !(*(*int32)(unsafe.Pointer(bp + 832)) >= *(*int32)(unsafe.Pointer(bp + 720))) {
		goto __2087
	}
	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = *(*int32)(unsafe.Pointer(bp + 720)) - 1
__2087:
	;
__2086:
	;

	//
	// 	assert ( fromIdx != TCL_INDEX_BEFORE );
	// 	 *
	// 	 * Extra safety for legacy bytecodes:
	//
	if !(*(*int32)(unsafe.Pointer(bp + 828)) == -1) {
		goto __2088
	}
	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = 0
__2088:
	;

	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = XTclIndexDecode(tls, *(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)), *(*int32)(unsafe.Pointer(bp + 720))-1)
	if !(*(*int32)(unsafe.Pointer(bp + 828)) < 0) {
		goto __2089
	}
	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = 0
__2089:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 828)) <= *(*int32)(unsafe.Pointer(bp + 832))) {
		goto __2090
	}
	// Construct the subsquence list
	// unshared optimization
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __2092
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewListObj(tls, *(*int32)(unsafe.Pointer(bp + 832))-*(*int32)(unsafe.Pointer(bp + 828))+1, *(*uintptr)(unsafe.Pointer(bp + 712))+uintptr(*(*int32)(unsafe.Pointer(bp + 828)))*8)
	goto __2093
__2092:
	if !(*(*int32)(unsafe.Pointer(bp + 832)) != *(*int32)(unsafe.Pointer(bp + 720))-1) {
		goto __2094
	}
	XTcl_ListObjReplace(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), *(*int32)(unsafe.Pointer(bp + 832))+1, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))),
		0, uintptr(0))
__2094:
	;
	XTcl_ListObjReplace(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), 0, *(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)), 0, uintptr(0))

__2095:
	;
	if !(0 == 0) {
		goto __2098
	}
	if !(0 != 0) {
		goto __2100
	}
	if !(0 > 0) {
		goto __2101
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2102
__2101:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2102:
	;
__2100:
	;
	pc += uintptr(9)
	goto cleanup0
	goto __2099
__2098:
	if !(0 != 0) {
		goto __2103
	}
	if !(0 > 0) {
		goto __2105
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2105:
	;
	pc += uintptr(9)
	switch 0 {
	case 1:
		goto __2107
	case 2:
		goto __2108
	case 0:
		goto __2109
	}
	goto __2106
__2107:
	goto cleanup1_pushObjResultPtr
__2108:
	goto cleanup2_pushObjResultPtr
__2109:
	goto __2106
__2106:
	;
	goto __2104
__2103:
	pc += uintptr(9)
	switch 0 {
	case 1:
		goto __2111
	case 2:
		goto __2112
	case 0:
		goto __2113
	}
	goto __2110
__2111:
	goto cleanup1
__2112:
	goto cleanup2
__2113:
	goto __2110
__2110:
	;
__2104:
	;
__2099:
	;
	goto __2096
__2096:
	if 0 != 0 {
		goto __2095
	}
	goto __2097
__2097:
	;
__2093:
	;
	goto __2091
__2090:
emptyList:
	;
__2114:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2117
	}
	XTclAllocateFreeObjects(tls)
__2117:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2115
__2115:
	if 0 != 0 {
		goto __2114
	}
	goto __2116
__2116:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

__2091:
	;

__2118:
	;
	if !(1 == 0) {
		goto __2121
	}
	if !(1 != 0) {
		goto __2123
	}
	if !(1 > 0) {
		goto __2124
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2125
__2124:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2125:
	;
__2123:
	;
	pc += uintptr(9)
	goto cleanup0
	goto __2122
__2121:
	if !(1 != 0) {
		goto __2126
	}
	if !(1 > 0) {
		goto __2128
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2128:
	;
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __2130
	case 2:
		goto __2131
	case 0:
		goto __2132
	}
	goto __2129
__2130:
	goto cleanup1_pushObjResultPtr
__2131:
	goto cleanup2_pushObjResultPtr
__2132:
	goto __2129
__2129:
	;
	goto __2127
__2126:
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __2134
	case 2:
		goto __2135
	case 0:
		goto __2136
	}
	goto __2133
__2134:
	goto cleanup1
__2135:
	goto cleanup2
__2136:
	goto __2133
__2133:
	;
__2127:
	;
__2122:
	;
	goto __2119
__2119:
	if 0 != 0 {
		goto __2118
	}
	goto __2120
__2120:
	;

__252:
__253: // Basic list containment operators.
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	s1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 804)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+804)
	}()

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(value2Ptr + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, value2Ptr, bp+704)
	}() != TCL_OK) {
		goto __2137
	}

	goto gotError
__2137:
	;
	match = 0
	if !(*(*int32)(unsafe.Pointer(bp + 704)) > 0) {
		goto __2138
	}
	i4 = 0

	// An empty list doesn't match anything.

__2139:
	XTcl_ListObjIndex(tls, uintptr(0), value2Ptr, i4, bp+808)
	if !(*(*uintptr)(unsafe.Pointer(bp + 808)) != uintptr(0)) {
		goto __2142
	}
	s2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 808)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 816)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 808)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 808)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 808)), bp+816)
	}()
	goto __2143
__2142:
	s2 = ts + 2631 /* "" */
	*(*int32)(unsafe.Pointer(bp + 816 /* s2len */)) = 0
__2143:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 804)) == *(*int32)(unsafe.Pointer(bp + 816))) {
		goto __2144
	}
	match = libc.Bool32(libc.Xmemcmp(tls, s1, s2, uint64(*(*int32)(unsafe.Pointer(bp + 804)))) == 0)
__2144:
	;
	i4++
	goto __2140
__2140:
	if i4 < *(*int32)(unsafe.Pointer(bp + 704)) && match == 0 {
		goto __2139
	}
	goto __2141
__2141:
	;
__2138:
	;

	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_LIST_NOT_IN) {
		goto __2145
	}
	match = libc.BoolInt32(!(match != 0))
__2145:
	;

	// Peep-hole optimisation: if you're about to jump, do jump from here.
	// We're saving the effort of pushing a boolean value only to pop it
	// for branching.

__2146:
	pc += uintptr(1)
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_JUMP_FALSE1:
		goto __2150
	case INST_JUMP_TRUE1:
		goto __2151
	case INST_JUMP_FALSE4:
		goto __2152
	case INST_JUMP_TRUE4:
		goto __2153
	default:
		goto __2154
	}
	goto __2149
__2150:
__2155:
	;
	if !(2 == 0) {
		goto __2158
	}
	if !(0 != 0) {
		goto __2160
	}
	if !(0 > 0) {
		goto __2161
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2162
__2161:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2162:
	;
__2160:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	goto cleanup0
	goto __2159
__2158:
	if !(0 != 0) {
		goto __2163
	}
	if !(0 > 0) {
		goto __2165
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2165:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __2167
	case 2:
		goto __2168
	case 0:
		goto __2169
	}
	goto __2166
__2167:
	goto cleanup1_pushObjResultPtr
__2168:
	goto cleanup2_pushObjResultPtr
__2169:
	goto __2166
__2166:
	;
	goto __2164
__2163:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __2171
	case 2:
		goto __2172
	case 0:
		goto __2173
	}
	goto __2170
__2171:
	goto cleanup1
__2172:
	goto cleanup2
__2173:
	goto __2170
__2170:
	;
__2164:
	;
__2159:
	;
	goto __2156
__2156:
	if 0 != 0 {
		goto __2155
	}
	goto __2157
__2157:
	;
	goto __2149
__2151:
__2174:
	;
	if !(2 == 0) {
		goto __2177
	}
	if !(0 != 0) {
		goto __2179
	}
	if !(0 > 0) {
		goto __2180
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2181
__2180:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2181:
	;
__2179:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	goto cleanup0
	goto __2178
__2177:
	if !(0 != 0) {
		goto __2182
	}
	if !(0 > 0) {
		goto __2184
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2184:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __2186
	case 2:
		goto __2187
	case 0:
		goto __2188
	}
	goto __2185
__2186:
	goto cleanup1_pushObjResultPtr
__2187:
	goto cleanup2_pushObjResultPtr
__2188:
	goto __2185
__2185:
	;
	goto __2183
__2182:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __2190
	case 2:
		goto __2191
	case 0:
		goto __2192
	}
	goto __2189
__2190:
	goto cleanup1
__2191:
	goto cleanup2
__2192:
	goto __2189
__2189:
	;
__2183:
	;
__2178:
	;
	goto __2175
__2175:
	if 0 != 0 {
		goto __2174
	}
	goto __2176
__2176:
	;
	goto __2149
__2152:
__2193:
	;
	if !(2 == 0) {
		goto __2196
	}
	if !(0 != 0) {
		goto __2198
	}
	if !(0 > 0) {
		goto __2199
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2200
__2199:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2200:
	;
__2198:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	goto cleanup0
	goto __2197
__2196:
	if !(0 != 0) {
		goto __2201
	}
	if !(0 > 0) {
		goto __2203
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2203:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __2205
	case 2:
		goto __2206
	case 0:
		goto __2207
	}
	goto __2204
__2205:
	goto cleanup1_pushObjResultPtr
__2206:
	goto cleanup2_pushObjResultPtr
__2207:
	goto __2204
__2204:
	;
	goto __2202
__2201:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __2209
	case 2:
		goto __2210
	case 0:
		goto __2211
	}
	goto __2208
__2209:
	goto cleanup1
__2210:
	goto cleanup2
__2211:
	goto __2208
__2208:
	;
__2202:
	;
__2197:
	;
	goto __2194
__2194:
	if 0 != 0 {
		goto __2193
	}
	goto __2195
__2195:
	;
	goto __2149
__2153:
__2212:
	;
	if !(2 == 0) {
		goto __2215
	}
	if !(0 != 0) {
		goto __2217
	}
	if !(0 > 0) {
		goto __2218
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2219
__2218:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2219:
	;
__2217:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	goto cleanup0
	goto __2216
__2215:
	if !(0 != 0) {
		goto __2220
	}
	if !(0 > 0) {
		goto __2222
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2222:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __2224
	case 2:
		goto __2225
	case 0:
		goto __2226
	}
	goto __2223
__2224:
	goto cleanup1_pushObjResultPtr
__2225:
	goto cleanup2_pushObjResultPtr
__2226:
	goto __2223
__2223:
	;
	goto __2221
__2220:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __2228
	case 2:
		goto __2229
	case 0:
		goto __2230
	}
	goto __2227
__2228:
	goto cleanup1
__2229:
	goto cleanup2
__2230:
	goto __2227
__2227:
	;
__2221:
	;
__2216:
	;
	goto __2213
__2213:
	if 0 != 0 {
		goto __2212
	}
	goto __2214
__2214:
	;
	goto __2149
__2154:
	if !(match < 0) {
		goto __2231
	}
__2233:
	;
__2236:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2239
	}
	XTclAllocateFreeObjects(tls)
__2239:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2237
__2237:
	if 0 != 0 {
		goto __2236
	}
	goto __2238
__2238:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __2234
__2234:
	if 0 != 0 {
		goto __2233
	}
	goto __2235
__2235:
	;
	goto __2232
__2231:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.Bool32(match > 0))*8))
__2232:
	;
__2240:
	;
	if !(2 == 0) {
		goto __2243
	}
	if !(1 != 0) {
		goto __2245
	}
	if !(1 > 0) {
		goto __2246
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2247
__2246:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2247:
	;
__2245:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __2244
__2243:
	if !(1 != 0) {
		goto __2248
	}
	if !(1 > 0) {
		goto __2250
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2250:
	;
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __2252
	case 2:
		goto __2253
	case 0:
		goto __2254
	}
	goto __2251
__2252:
	goto cleanup1_pushObjResultPtr
__2253:
	goto cleanup2_pushObjResultPtr
__2254:
	goto __2251
__2251:
	;
	goto __2249
__2248:
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __2256
	case 2:
		goto __2257
	case 0:
		goto __2258
	}
	goto __2255
__2256:
	goto cleanup1
__2257:
	goto cleanup2
__2258:
	goto __2255
__2255:
	;
__2249:
	;
__2244:
	;
	goto __2241
__2241:
	if 0 != 0 {
		goto __2240
	}
	goto __2242
__2242:
	;
	goto __2149
__2149:
	;
	goto __2147
__2147:
	if 0 != 0 {
		goto __2146
	}
	goto __2148
__2148:
	;

__254:
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __2259
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	if !(XTcl_ListObjAppendList(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 936)),
		value2Ptr) != TCL_OK) {
		goto __2261
	}

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount, 1) > 1) {
		goto __2262
	}
	goto __2263
__2262:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __2264
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != XtclEmptyStringRep) {
		goto __2266
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes)
__2266:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = -1
__2267:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 936))
	goto __2268
__2268:
	if 0 != 0 {
		goto __2267
	}
	goto __2269
__2269:
	;
	goto __2265
__2264:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
__2265:
	;
__2263:
	;

	goto gotError
__2261:
	;

__2270:
	;
	if !(2 == 0) {
		goto __2273
	}
	if !(1 != 0) {
		goto __2275
	}
	if !(1 > 0) {
		goto __2276
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2277
__2276:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2277:
	;
__2275:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2274
__2273:
	if !(1 != 0) {
		goto __2278
	}
	if !(1 > 0) {
		goto __2280
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2280:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2282
	case 2:
		goto __2283
	case 0:
		goto __2284
	}
	goto __2281
__2282:
	goto cleanup1_pushObjResultPtr
__2283:
	goto cleanup2_pushObjResultPtr
__2284:
	goto __2281
__2281:
	;
	goto __2279
__2278:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2286
	case 2:
		goto __2287
	case 0:
		goto __2288
	}
	goto __2285
__2286:
	goto cleanup1
__2287:
	goto cleanup2
__2288:
	goto __2285
__2285:
	;
__2279:
	;
__2274:
	;
	goto __2271
__2271:
	if 0 != 0 {
		goto __2270
	}
	goto __2272
__2272:
	;
	goto __2260
__2259:
	if !(XTcl_ListObjAppendList(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)), value2Ptr) != TCL_OK) {
		goto __2289
	}

	goto gotError
__2289:
	;

__2290:
	;
	if !(1 == 0) {
		goto __2293
	}
	if !(0 != 0) {
		goto __2295
	}
	if !(0 > 0) {
		goto __2296
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2297
__2296:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2297:
	;
__2295:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2294
__2293:
	if !(0 != 0) {
		goto __2298
	}
	if !(0 > 0) {
		goto __2300
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2300:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2302
	case 2:
		goto __2303
	case 0:
		goto __2304
	}
	goto __2301
__2302:
	goto cleanup1_pushObjResultPtr
__2303:
	goto cleanup2_pushObjResultPtr
__2304:
	goto __2301
__2301:
	;
	goto __2299
__2298:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2306
	case 2:
		goto __2307
	case 0:
		goto __2308
	}
	goto __2305
__2306:
	goto cleanup1
__2307:
	goto cleanup2
__2308:
	goto __2305
__2305:
	;
__2299:
	;
__2294:
	;
	goto __2291
__2291:
	if 0 != 0 {
		goto __2290
	}
	goto __2292
__2292:
	;
__2260:
	;

	//	   End of INST_LIST and related instructions.
	// -----------------------------------------------------------------
	//	   Start of string-related instructions.

__255:
__256: // String (in)equality check
__257: // String compare.
stringCompare:
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	checkEq = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_EQ || int32(*(*uint8)(unsafe.Pointer(pc))) == INST_NEQ ||
		int32(*(*uint8)(unsafe.Pointer(pc))) == INST_STR_EQ || int32(*(*uint8)(unsafe.Pointer(pc))) == INST_STR_NEQ)
	match = XTclStringCmp(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), value2Ptr, checkEq, 0, -1)

	// Make sure only -1,0,1 is returned
	// TODO: consider peephole opt.

	if !(int32(*(*uint8)(unsafe.Pointer(pc))) != INST_STR_CMP) {
		goto __2309
	}
	// Take care of the opcodes that goto'ed into here.

	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_STR_EQ:
		goto __2311
	case INST_EQ:
		goto __2312
	case INST_STR_NEQ:
		goto __2313
	case INST_NEQ:
		goto __2314
	case INST_LT:
		goto __2315
	case INST_GT:
		goto __2316
	case INST_LE:
		goto __2317
	case INST_GE:
		goto __2318
	}
	goto __2310
__2311:
__2312:
	match = libc.Bool32(match == 0)
	goto __2310
__2313:
__2314:
	match = libc.Bool32(match != 0)
	goto __2310
__2315:
	match = libc.Bool32(match < 0)
	goto __2310
__2316:
	match = libc.Bool32(match > 0)
	goto __2310
__2317:
	match = libc.Bool32(match <= 0)
	goto __2310
__2318:
	match = libc.Bool32(match >= 0)
	goto __2310
__2310:
	;
__2309:
	;

__2319:
	pc += uintptr(1)
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_JUMP_FALSE1:
		goto __2323
	case INST_JUMP_TRUE1:
		goto __2324
	case INST_JUMP_FALSE4:
		goto __2325
	case INST_JUMP_TRUE4:
		goto __2326
	default:
		goto __2327
	}
	goto __2322
__2323:
__2328:
	;
	if !(2 == 0) {
		goto __2331
	}
	if !(0 != 0) {
		goto __2333
	}
	if !(0 > 0) {
		goto __2334
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2335
__2334:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2335:
	;
__2333:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	goto cleanup0
	goto __2332
__2331:
	if !(0 != 0) {
		goto __2336
	}
	if !(0 > 0) {
		goto __2338
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2338:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __2340
	case 2:
		goto __2341
	case 0:
		goto __2342
	}
	goto __2339
__2340:
	goto cleanup1_pushObjResultPtr
__2341:
	goto cleanup2_pushObjResultPtr
__2342:
	goto __2339
__2339:
	;
	goto __2337
__2336:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __2344
	case 2:
		goto __2345
	case 0:
		goto __2346
	}
	goto __2343
__2344:
	goto cleanup1
__2345:
	goto cleanup2
__2346:
	goto __2343
__2343:
	;
__2337:
	;
__2332:
	;
	goto __2329
__2329:
	if 0 != 0 {
		goto __2328
	}
	goto __2330
__2330:
	;
	goto __2322
__2324:
__2347:
	;
	if !(2 == 0) {
		goto __2350
	}
	if !(0 != 0) {
		goto __2352
	}
	if !(0 > 0) {
		goto __2353
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2354
__2353:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2354:
	;
__2352:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	goto cleanup0
	goto __2351
__2350:
	if !(0 != 0) {
		goto __2355
	}
	if !(0 > 0) {
		goto __2357
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2357:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __2359
	case 2:
		goto __2360
	case 0:
		goto __2361
	}
	goto __2358
__2359:
	goto cleanup1_pushObjResultPtr
__2360:
	goto cleanup2_pushObjResultPtr
__2361:
	goto __2358
__2358:
	;
	goto __2356
__2355:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __2363
	case 2:
		goto __2364
	case 0:
		goto __2365
	}
	goto __2362
__2363:
	goto cleanup1
__2364:
	goto cleanup2
__2365:
	goto __2362
__2362:
	;
__2356:
	;
__2351:
	;
	goto __2348
__2348:
	if 0 != 0 {
		goto __2347
	}
	goto __2349
__2349:
	;
	goto __2322
__2325:
__2366:
	;
	if !(2 == 0) {
		goto __2369
	}
	if !(0 != 0) {
		goto __2371
	}
	if !(0 > 0) {
		goto __2372
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2373
__2372:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2373:
	;
__2371:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	goto cleanup0
	goto __2370
__2369:
	if !(0 != 0) {
		goto __2374
	}
	if !(0 > 0) {
		goto __2376
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2376:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __2378
	case 2:
		goto __2379
	case 0:
		goto __2380
	}
	goto __2377
__2378:
	goto cleanup1_pushObjResultPtr
__2379:
	goto cleanup2_pushObjResultPtr
__2380:
	goto __2377
__2377:
	;
	goto __2375
__2374:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __2382
	case 2:
		goto __2383
	case 0:
		goto __2384
	}
	goto __2381
__2382:
	goto cleanup1
__2383:
	goto cleanup2
__2384:
	goto __2381
__2381:
	;
__2375:
	;
__2370:
	;
	goto __2367
__2367:
	if 0 != 0 {
		goto __2366
	}
	goto __2368
__2368:
	;
	goto __2322
__2326:
__2385:
	;
	if !(2 == 0) {
		goto __2388
	}
	if !(0 != 0) {
		goto __2390
	}
	if !(0 > 0) {
		goto __2391
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2392
__2391:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2392:
	;
__2390:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	goto cleanup0
	goto __2389
__2388:
	if !(0 != 0) {
		goto __2393
	}
	if !(0 > 0) {
		goto __2395
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2395:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __2397
	case 2:
		goto __2398
	case 0:
		goto __2399
	}
	goto __2396
__2397:
	goto cleanup1_pushObjResultPtr
__2398:
	goto cleanup2_pushObjResultPtr
__2399:
	goto __2396
__2396:
	;
	goto __2394
__2393:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __2401
	case 2:
		goto __2402
	case 0:
		goto __2403
	}
	goto __2400
__2401:
	goto cleanup1
__2402:
	goto cleanup2
__2403:
	goto __2400
__2400:
	;
__2394:
	;
__2389:
	;
	goto __2386
__2386:
	if 0 != 0 {
		goto __2385
	}
	goto __2387
__2387:
	;
	goto __2322
__2327:
	if !(match < 0) {
		goto __2404
	}
__2406:
	;
__2409:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2412
	}
	XTclAllocateFreeObjects(tls)
__2412:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2410
__2410:
	if 0 != 0 {
		goto __2409
	}
	goto __2411
__2411:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __2407
__2407:
	if 0 != 0 {
		goto __2406
	}
	goto __2408
__2408:
	;
	goto __2405
__2404:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.Bool32(match > 0))*8))
__2405:
	;
__2413:
	;
	if !(2 == 0) {
		goto __2416
	}
	if !(1 != 0) {
		goto __2418
	}
	if !(1 > 0) {
		goto __2419
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2420
__2419:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2420:
	;
__2418:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __2417
__2416:
	if !(1 != 0) {
		goto __2421
	}
	if !(1 > 0) {
		goto __2423
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2423:
	;
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __2425
	case 2:
		goto __2426
	case 0:
		goto __2427
	}
	goto __2424
__2425:
	goto cleanup1_pushObjResultPtr
__2426:
	goto cleanup2_pushObjResultPtr
__2427:
	goto __2424
__2424:
	;
	goto __2422
__2421:
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __2429
	case 2:
		goto __2430
	case 0:
		goto __2431
	}
	goto __2428
__2429:
	goto cleanup1
__2430:
	goto cleanup2
__2431:
	goto __2428
__2428:
	;
__2422:
	;
__2417:
	;
	goto __2414
__2414:
	if 0 != 0 {
		goto __2413
	}
	goto __2415
__2415:
	;
	goto __2322
__2322:
	;
	goto __2320
__2320:
	if 0 != 0 {
		goto __2319
	}
	goto __2321
__2321:
	;

__258:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__2432:
	;
__2435:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2438
	}
	XTclAllocateFreeObjects(tls)
__2438:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2436
__2436:
	if 0 != 0 {
		goto __2435
	}
	goto __2437
__2437:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = int32(*(*int32)(unsafe.Pointer(bp + 704)))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __2433
__2433:
	if 0 != 0 {
		goto __2432
	}
	goto __2434
__2434:
	;

__2439:
	;
	if !(1 == 0) {
		goto __2442
	}
	if !(1 != 0) {
		goto __2444
	}
	if !(1 > 0) {
		goto __2445
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2446
__2445:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2446:
	;
__2444:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2443
__2442:
	if !(1 != 0) {
		goto __2447
	}
	if !(1 > 0) {
		goto __2449
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2449:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2451
	case 2:
		goto __2452
	case 0:
		goto __2453
	}
	goto __2450
__2451:
	goto cleanup1_pushObjResultPtr
__2452:
	goto cleanup2_pushObjResultPtr
__2453:
	goto __2450
__2450:
	;
	goto __2448
__2447:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2455
	case 2:
		goto __2456
	case 0:
		goto __2457
	}
	goto __2454
__2455:
	goto cleanup1
__2456:
	goto cleanup2
__2457:
	goto __2454
__2454:
	;
__2448:
	;
__2443:
	;
	goto __2440
__2440:
	if 0 != 0 {
		goto __2439
	}
	goto __2441
__2441:
	;

__259:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __2458
	}
	s1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+704)
	}()
__2460:
	;
__2463:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2466
	}
	XTclAllocateFreeObjects(tls)
__2466:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2464
__2464:
	if 0 != 0 {
		goto __2463
	}
	goto __2465
__2465:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	if !(*(*int32)(unsafe.Pointer(bp + 704)) == 0) {
		goto __2467
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	goto __2468
__2467:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 704))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes, s1, uint64(*(*int32)(unsafe.Pointer(bp + 704))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes + uintptr(*(*int32)(unsafe.Pointer(bp + 704))))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = *(*int32)(unsafe.Pointer(bp + 704))
__2468:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	goto __2461
__2461:
	if 0 != 0 {
		goto __2460
	}
	goto __2462
__2462:
	;
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_UtfToUpper(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 936)))
	}())
	XTcl_SetObjLength(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), *(*int32)(unsafe.Pointer(bp + 704 /* length */)))

__2469:
	;
	if !(1 == 0) {
		goto __2472
	}
	if !(1 != 0) {
		goto __2474
	}
	if !(1 > 0) {
		goto __2475
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2476
__2475:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2476:
	;
__2474:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2473
__2472:
	if !(1 != 0) {
		goto __2477
	}
	if !(1 > 0) {
		goto __2479
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2479:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2481
	case 2:
		goto __2482
	case 0:
		goto __2483
	}
	goto __2480
__2481:
	goto cleanup1_pushObjResultPtr
__2482:
	goto cleanup2_pushObjResultPtr
__2483:
	goto __2480
__2480:
	;
	goto __2478
__2477:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2485
	case 2:
		goto __2486
	case 0:
		goto __2487
	}
	goto __2484
__2485:
	goto cleanup1
__2486:
	goto cleanup2
__2487:
	goto __2484
__2484:
	;
__2478:
	;
__2473:
	;
	goto __2470
__2470:
	if 0 != 0 {
		goto __2469
	}
	goto __2471
__2471:
	;
	goto __2459
__2458:
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_UtfToUpper(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 944)))
	}())
	XTcl_SetObjLength(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), *(*int32)(unsafe.Pointer(bp + 704 /* length */)))
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr != uintptr(0)) {
		goto __2488
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __2489
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__2489:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr = uintptr(0)
__2488:
	;

__2490:
	;
	if !(0 == 0) {
		goto __2493
	}
	if !(0 != 0) {
		goto __2495
	}
	if !(0 > 0) {
		goto __2496
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2497
__2496:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2497:
	;
__2495:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2494
__2493:
	if !(0 != 0) {
		goto __2498
	}
	if !(0 > 0) {
		goto __2500
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2500:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2502
	case 2:
		goto __2503
	case 0:
		goto __2504
	}
	goto __2501
__2502:
	goto cleanup1_pushObjResultPtr
__2503:
	goto cleanup2_pushObjResultPtr
__2504:
	goto __2501
__2501:
	;
	goto __2499
__2498:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2506
	case 2:
		goto __2507
	case 0:
		goto __2508
	}
	goto __2505
__2506:
	goto cleanup1
__2507:
	goto cleanup2
__2508:
	goto __2505
__2505:
	;
__2499:
	;
__2494:
	;
	goto __2491
__2491:
	if 0 != 0 {
		goto __2490
	}
	goto __2492
__2492:
	;
__2459:
	;
__260:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __2509
	}
	s1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+704)
	}()
__2511:
	;
__2514:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2517
	}
	XTclAllocateFreeObjects(tls)
__2517:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2515
__2515:
	if 0 != 0 {
		goto __2514
	}
	goto __2516
__2516:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	if !(*(*int32)(unsafe.Pointer(bp + 704)) == 0) {
		goto __2518
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	goto __2519
__2518:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 704))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes, s1, uint64(*(*int32)(unsafe.Pointer(bp + 704))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes + uintptr(*(*int32)(unsafe.Pointer(bp + 704))))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = *(*int32)(unsafe.Pointer(bp + 704))
__2519:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	goto __2512
__2512:
	if 0 != 0 {
		goto __2511
	}
	goto __2513
__2513:
	;
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_UtfToLower(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 936)))
	}())
	XTcl_SetObjLength(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), *(*int32)(unsafe.Pointer(bp + 704 /* length */)))

__2520:
	;
	if !(1 == 0) {
		goto __2523
	}
	if !(1 != 0) {
		goto __2525
	}
	if !(1 > 0) {
		goto __2526
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2527
__2526:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2527:
	;
__2525:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2524
__2523:
	if !(1 != 0) {
		goto __2528
	}
	if !(1 > 0) {
		goto __2530
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2530:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2532
	case 2:
		goto __2533
	case 0:
		goto __2534
	}
	goto __2531
__2532:
	goto cleanup1_pushObjResultPtr
__2533:
	goto cleanup2_pushObjResultPtr
__2534:
	goto __2531
__2531:
	;
	goto __2529
__2528:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2536
	case 2:
		goto __2537
	case 0:
		goto __2538
	}
	goto __2535
__2536:
	goto cleanup1
__2537:
	goto cleanup2
__2538:
	goto __2535
__2535:
	;
__2529:
	;
__2524:
	;
	goto __2521
__2521:
	if 0 != 0 {
		goto __2520
	}
	goto __2522
__2522:
	;
	goto __2510
__2509:
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_UtfToLower(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 944)))
	}())
	XTcl_SetObjLength(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), *(*int32)(unsafe.Pointer(bp + 704 /* length */)))
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr != uintptr(0)) {
		goto __2539
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __2540
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__2540:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr = uintptr(0)
__2539:
	;

__2541:
	;
	if !(0 == 0) {
		goto __2544
	}
	if !(0 != 0) {
		goto __2546
	}
	if !(0 > 0) {
		goto __2547
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2548
__2547:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2548:
	;
__2546:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2545
__2544:
	if !(0 != 0) {
		goto __2549
	}
	if !(0 > 0) {
		goto __2551
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2551:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2553
	case 2:
		goto __2554
	case 0:
		goto __2555
	}
	goto __2552
__2553:
	goto cleanup1_pushObjResultPtr
__2554:
	goto cleanup2_pushObjResultPtr
__2555:
	goto __2552
__2552:
	;
	goto __2550
__2549:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2557
	case 2:
		goto __2558
	case 0:
		goto __2559
	}
	goto __2556
__2557:
	goto cleanup1
__2558:
	goto cleanup2
__2559:
	goto __2556
__2556:
	;
__2550:
	;
__2545:
	;
	goto __2542
__2542:
	if 0 != 0 {
		goto __2541
	}
	goto __2543
__2543:
	;
__2510:
	;
__261:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __2560
	}
	s1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+704)
	}()
__2562:
	;
__2565:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2568
	}
	XTclAllocateFreeObjects(tls)
__2568:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2566
__2566:
	if 0 != 0 {
		goto __2565
	}
	goto __2567
__2567:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	if !(*(*int32)(unsafe.Pointer(bp + 704)) == 0) {
		goto __2569
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	goto __2570
__2569:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 704))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes, s1, uint64(*(*int32)(unsafe.Pointer(bp + 704))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes + uintptr(*(*int32)(unsafe.Pointer(bp + 704))))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = *(*int32)(unsafe.Pointer(bp + 704))
__2570:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	goto __2563
__2563:
	if 0 != 0 {
		goto __2562
	}
	goto __2564
__2564:
	;
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_UtfToTitle(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 936)))
	}())
	XTcl_SetObjLength(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), *(*int32)(unsafe.Pointer(bp + 704 /* length */)))

__2571:
	;
	if !(1 == 0) {
		goto __2574
	}
	if !(1 != 0) {
		goto __2576
	}
	if !(1 > 0) {
		goto __2577
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2578
__2577:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2578:
	;
__2576:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2575
__2574:
	if !(1 != 0) {
		goto __2579
	}
	if !(1 > 0) {
		goto __2581
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2581:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2583
	case 2:
		goto __2584
	case 0:
		goto __2585
	}
	goto __2582
__2583:
	goto cleanup1_pushObjResultPtr
__2584:
	goto cleanup2_pushObjResultPtr
__2585:
	goto __2582
__2582:
	;
	goto __2580
__2579:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2587
	case 2:
		goto __2588
	case 0:
		goto __2589
	}
	goto __2586
__2587:
	goto cleanup1
__2588:
	goto cleanup2
__2589:
	goto __2586
__2586:
	;
__2580:
	;
__2575:
	;
	goto __2572
__2572:
	if 0 != 0 {
		goto __2571
	}
	goto __2573
__2573:
	;
	goto __2561
__2560:
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_UtfToTitle(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 944)))
	}())
	XTcl_SetObjLength(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), *(*int32)(unsafe.Pointer(bp + 704 /* length */)))
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr != uintptr(0)) {
		goto __2590
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __2591
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__2591:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr = uintptr(0)
__2590:
	;

__2592:
	;
	if !(0 == 0) {
		goto __2595
	}
	if !(0 != 0) {
		goto __2597
	}
	if !(0 > 0) {
		goto __2598
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2599
__2598:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2599:
	;
__2597:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2596
__2595:
	if !(0 != 0) {
		goto __2600
	}
	if !(0 > 0) {
		goto __2602
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2602:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2604
	case 2:
		goto __2605
	case 0:
		goto __2606
	}
	goto __2603
__2604:
	goto cleanup1_pushObjResultPtr
__2605:
	goto cleanup2_pushObjResultPtr
__2606:
	goto __2603
__2603:
	;
	goto __2601
__2600:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2608
	case 2:
		goto __2609
	case 0:
		goto __2610
	}
	goto __2607
__2608:
	goto cleanup1
__2609:
	goto cleanup2
__2610:
	goto __2607
__2607:
	;
__2601:
	;
__2596:
	;
	goto __2593
__2593:
	if 0 != 0 {
		goto __2592
	}
	goto __2594
__2594:
	;
__2561:
	;

__262:
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	// Get char length to calulate what 'end' means.

	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 800)) = int32(*(*int32)(unsafe.Pointer(value2Ptr + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, value2Ptr, *(*int32)(unsafe.Pointer(bp + 704))-1, bp+800)
	}() != TCL_OK) {
		goto __2611
	}

	goto gotError
__2611:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 800)) < 0 || *(*int32)(unsafe.Pointer(bp + 800)) >= *(*int32)(unsafe.Pointer(bp + 704))) {
		goto __2612
	}
__2614:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2617
	}
	XTclAllocateFreeObjects(tls)
__2617:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2615
__2615:
	if 0 != 0 {
		goto __2614
	}
	goto __2616
__2616:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

	goto __2613
__2612:
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes == uintptr(0)) {
		goto __2618
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewByteArrayObj(tls,
		XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944)), uintptr(0))+uintptr(*(*int32)(unsafe.Pointer(bp + 800))), 1)
	goto __2619
__2618:
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 && *(*int32)(unsafe.Pointer(bp + 704)) == (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength) {
		goto __2620
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewStringObj(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes+uintptr(*(*int32)(unsafe.Pointer(bp + 800))), 1)
	goto __2621
__2620:
	*(*[8]int8)(unsafe.Pointer(bp + 820 /* buf */)) = *(*[8]int8)(unsafe.Pointer(ts + 10347))
	ch = int32(XTcl_GetUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), *(*int32)(unsafe.Pointer(bp + 800 /* index */))))

	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTclUCS4ToUtf(tls, ch, bp+820)
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewStringObj(tls, bp+820, *(*int32)(unsafe.Pointer(bp + 704 /* length */)))
__2621:
	;
__2619:
	;
__2613:
	;

__2622:
	;
	if !(2 == 0) {
		goto __2625
	}
	if !(1 != 0) {
		goto __2627
	}
	if !(1 > 0) {
		goto __2628
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2629
__2628:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2629:
	;
__2627:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2626
__2625:
	if !(1 != 0) {
		goto __2630
	}
	if !(1 > 0) {
		goto __2632
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2632:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2634
	case 2:
		goto __2635
	case 0:
		goto __2636
	}
	goto __2633
__2634:
	goto cleanup1_pushObjResultPtr
__2635:
	goto cleanup2_pushObjResultPtr
__2636:
	goto __2633
__2633:
	;
	goto __2631
__2630:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2638
	case 2:
		goto __2639
	case 0:
		goto __2640
	}
	goto __2637
__2638:
	goto cleanup1
__2639:
	goto cleanup2
__2640:
	goto __2637
__2637:
	;
__2631:
	;
__2626:
	;
	goto __2623
__2623:
	if 0 != 0 {
		goto __2622
	}
	goto __2624
__2624:
	;

__263:
	;
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(2)*8))) - 1
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 828)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)), *(*int32)(unsafe.Pointer(bp + 704)), bp+828)
	}() != TCL_OK ||
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 832)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), *(*int32)(unsafe.Pointer(bp + 704)), bp+832)
		}() != TCL_OK) {
		goto __2641
	}

	goto gotError
__2641:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 828)) < 0) {
		goto __2642
	}
	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = 0
__2642:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 832)) >= *(*int32)(unsafe.Pointer(bp + 704))) {
		goto __2643
	}
	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = *(*int32)(unsafe.Pointer(bp + 704 /* length */))
__2643:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 832)) >= *(*int32)(unsafe.Pointer(bp + 828))) {
		goto __2644
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_GetRange(tls, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(2)*8)), *(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)), *(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)))
	goto __2645
__2644:
	;
__2646:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2649
	}
	XTclAllocateFreeObjects(tls)
__2649:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2647
__2647:
	if 0 != 0 {
		goto __2646
	}
	goto __2648
__2648:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

__2645:
	;

__2650:
	pc += uintptr(1)
	cleanup = 3
	if !(1 != 0) {
		goto __2653
	}
	if !(1 > 0) {
		goto __2655
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2655:
	;
	goto cleanupV_pushObjResultPtr
	goto __2654
__2653:
	goto cleanupV
__2654:
	;
	goto __2651
__2651:
	if 0 != 0 {
		goto __2650
	}
	goto __2652
__2652:
	;

__264:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3))))
	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(5))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(3))))
	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))

	// Every range of an empty value is an empty value
	if !(*(*int32)(unsafe.Pointer(bp + 704)) == 0) {
		goto __2656
	}

__2657:
	;
	if !(0 == 0) {
		goto __2660
	}
	if !(0 != 0) {
		goto __2662
	}
	if !(0 > 0) {
		goto __2663
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2664
__2663:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2664:
	;
__2662:
	;
	pc += uintptr(9)
	goto cleanup0
	goto __2661
__2660:
	if !(0 != 0) {
		goto __2665
	}
	if !(0 > 0) {
		goto __2667
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2667:
	;
	pc += uintptr(9)
	switch 0 {
	case 1:
		goto __2669
	case 2:
		goto __2670
	case 0:
		goto __2671
	}
	goto __2668
__2669:
	goto cleanup1_pushObjResultPtr
__2670:
	goto cleanup2_pushObjResultPtr
__2671:
	goto __2668
__2668:
	;
	goto __2666
__2665:
	pc += uintptr(9)
	switch 0 {
	case 1:
		goto __2673
	case 2:
		goto __2674
	case 0:
		goto __2675
	}
	goto __2672
__2673:
	goto cleanup1
__2674:
	goto cleanup2
__2675:
	goto __2672
__2672:
	;
__2666:
	;
__2661:
	;
	goto __2658
__2658:
	if 0 != 0 {
		goto __2657
	}
	goto __2659
__2659:
	;
__2656:
	;

	// Decode index operands.

	//
	// 	assert ( toIdx != TCL_INDEX_BEFORE );
	// 	assert ( toIdx != TCL_INDEX_AFTER);
	// 	 *
	// 	 * Extra safety for legacy bytecodes:
	//
	if !(*(*int32)(unsafe.Pointer(bp + 832)) == -1) {
		goto __2676
	}
	goto emptyRange
__2676:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 832)) == 0x7fffffff) {
		goto __2677
	}
	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = -2
__2677:
	;

	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = XTclIndexDecode(tls, *(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)), *(*int32)(unsafe.Pointer(bp + 704))-1)
	if !(*(*int32)(unsafe.Pointer(bp + 832)) < 0) {
		goto __2678
	}
	goto emptyRange
	goto __2679
__2678:
	if !(*(*int32)(unsafe.Pointer(bp + 832)) >= *(*int32)(unsafe.Pointer(bp + 704))) {
		goto __2680
	}
	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = *(*int32)(unsafe.Pointer(bp + 704)) - 1
__2680:
	;
__2679:
	;

	//
	// 	assert ( fromIdx != TCL_INDEX_BEFORE );
	// 	assert ( fromIdx != TCL_INDEX_AFTER);
	// 	 *
	// 	 * Extra safety for legacy bytecodes:
	//
	if !(*(*int32)(unsafe.Pointer(bp + 828)) == -1) {
		goto __2681
	}
	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = 0
__2681:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 828)) == 0x7fffffff) {
		goto __2682
	}
	goto emptyRange
__2682:
	;

	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = XTclIndexDecode(tls, *(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)), *(*int32)(unsafe.Pointer(bp + 704))-1)
	if !(*(*int32)(unsafe.Pointer(bp + 828)) < 0) {
		goto __2683
	}
	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = 0
__2683:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 828)) <= *(*int32)(unsafe.Pointer(bp + 832))) {
		goto __2684
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_GetRange(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), *(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)), *(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)))
	goto __2685
__2684:
emptyRange:
	;
__2686:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2689
	}
	XTclAllocateFreeObjects(tls)
__2689:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2687
__2687:
	if 0 != 0 {
		goto __2686
	}
	goto __2688
__2688:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(0)

__2685:
	;

__2690:
	;
	if !(1 == 0) {
		goto __2693
	}
	if !(1 != 0) {
		goto __2695
	}
	if !(1 > 0) {
		goto __2696
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2697
__2696:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2697:
	;
__2695:
	;
	pc += uintptr(9)
	goto cleanup0
	goto __2694
__2693:
	if !(1 != 0) {
		goto __2698
	}
	if !(1 > 0) {
		goto __2700
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2700:
	;
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __2702
	case 2:
		goto __2703
	case 0:
		goto __2704
	}
	goto __2701
__2702:
	goto cleanup1_pushObjResultPtr
__2703:
	goto cleanup2_pushObjResultPtr
__2704:
	goto __2701
__2701:
	;
	goto __2699
__2698:
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __2706
	case 2:
		goto __2707
	case 0:
		goto __2708
	}
	goto __2705
__2706:
	goto cleanup1
__2707:
	goto cleanup2
__2708:
	goto __2705
__2705:
	;
__2699:
	;
__2694:
	;
	goto __2691
__2691:
	if 0 != 0 {
		goto __2690
	}
	goto __2692
__2692:
	;

__265:
	value3Ptr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(2)*8))
	endIdx = XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(bp + 944))) - 1

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 828)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)), endIdx, bp+828)
	}() != TCL_OK ||
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 832)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), endIdx, bp+832)
		}() != TCL_OK) {
		goto __2709
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FrefCount, 1) > 1) {
		goto __2710
	}
	goto __2711
__2710:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __2712
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __2714
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes)
__2714:
	;
	(*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Flength = -1
__2715:
	;
	*(*uintptr)(unsafe.Pointer(value3Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value3Ptr
	goto __2716
__2716:
	if 0 != 0 {
		goto __2715
	}
	goto __2717
__2717:
	;
	goto __2713
__2712:
	XTclFreeObj(tls, value3Ptr)
__2713:
	;
__2711:
	;

	goto gotError
__2709:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FrefCount, 1) > 1) {
		goto __2718
	}
	goto __2719
__2718:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __2720
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != XtclEmptyStringRep) {
		goto __2722
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes)
__2722:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Flength = -1
__2723:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(tosPtr))
	goto __2724
__2724:
	if 0 != 0 {
		goto __2723
	}
	goto __2725
__2725:
	;
	goto __2721
__2720:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
__2721:
	;
__2719:
	;

	_ = *(*byte)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FrefCount, 1) > 1) {
		goto __2726
	}
	goto __2727
__2726:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __2728
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != XtclEmptyStringRep) {
		goto __2730
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes)
__2730:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Flength = -1
__2731:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(tosPtr))
	goto __2732
__2732:
	if 0 != 0 {
		goto __2731
	}
	goto __2733
__2733:
	;
	goto __2729
__2728:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
__2729:
	;
__2727:
	;

	_ = *(*byte)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))

	if !(*(*int32)(unsafe.Pointer(bp + 832)) < 0 || *(*int32)(unsafe.Pointer(bp + 828)) > endIdx || *(*int32)(unsafe.Pointer(bp + 832)) < *(*int32)(unsafe.Pointer(bp + 828))) {
		goto __2734
	}

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FrefCount, 1) > 1) {
		goto __2735
	}
	goto __2736
__2735:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __2737
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __2739
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes)
__2739:
	;
	(*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Flength = -1
__2740:
	;
	*(*uintptr)(unsafe.Pointer(value3Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value3Ptr
	goto __2741
__2741:
	if 0 != 0 {
		goto __2740
	}
	goto __2742
__2742:
	;
	goto __2738
__2737:
	XTclFreeObj(tls, value3Ptr)
__2738:
	;
__2736:
	;

__2743:
	;
	if !(0 == 0) {
		goto __2746
	}
	if !(0 != 0) {
		goto __2748
	}
	if !(0 > 0) {
		goto __2749
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2750
__2749:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2750:
	;
__2748:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2747
__2746:
	if !(0 != 0) {
		goto __2751
	}
	if !(0 > 0) {
		goto __2753
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2753:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2755
	case 2:
		goto __2756
	case 0:
		goto __2757
	}
	goto __2754
__2755:
	goto cleanup1_pushObjResultPtr
__2756:
	goto cleanup2_pushObjResultPtr
__2757:
	goto __2754
__2754:
	;
	goto __2752
__2751:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2759
	case 2:
		goto __2760
	case 0:
		goto __2761
	}
	goto __2758
__2759:
	goto cleanup1
__2760:
	goto cleanup2
__2761:
	goto __2758
__2758:
	;
__2752:
	;
__2747:
	;
	goto __2744
__2744:
	if 0 != 0 {
		goto __2743
	}
	goto __2745
__2745:
	;
__2734:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 828)) < 0) {
		goto __2762
	}
	*(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)) = 0
__2762:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 832)) > endIdx) {
		goto __2763
	}
	*(*int32)(unsafe.Pointer(bp + 832 /* toIdx */)) = endIdx
__2763:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 828)) == 0 && *(*int32)(unsafe.Pointer(bp + 832)) == endIdx) {
		goto __2764
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FrefCount, 1) > 1) {
		goto __2765
	}
	goto __2766
__2765:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __2767
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != XtclEmptyStringRep) {
		goto __2769
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes)
__2769:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Flength = -1
__2770:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(tosPtr))
	goto __2771
__2771:
	if 0 != 0 {
		goto __2770
	}
	goto __2772
__2772:
	;
	goto __2768
__2767:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
__2768:
	;
__2766:
	;

	*(*uintptr)(unsafe.Pointer(tosPtr)) = value3Ptr

__2773:
	;
	if !(0 == 0) {
		goto __2776
	}
	if !(0 != 0) {
		goto __2778
	}
	if !(0 > 0) {
		goto __2779
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2780
__2779:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2780:
	;
__2778:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2777
__2776:
	if !(0 != 0) {
		goto __2781
	}
	if !(0 > 0) {
		goto __2783
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2783:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2785
	case 2:
		goto __2786
	case 0:
		goto __2787
	}
	goto __2784
__2785:
	goto cleanup1_pushObjResultPtr
__2786:
	goto cleanup2_pushObjResultPtr
__2787:
	goto __2784
__2784:
	;
	goto __2782
__2781:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2789
	case 2:
		goto __2790
	case 0:
		goto __2791
	}
	goto __2788
__2789:
	goto cleanup1
__2790:
	goto cleanup2
__2791:
	goto __2788
__2788:
	;
__2782:
	;
__2777:
	;
	goto __2774
__2774:
	if 0 != 0 {
		goto __2773
	}
	goto __2775
__2775:
	;
__2764:
	;

	*(*int32)(unsafe.Pointer(bp + 840 /* length3 */)) = XTcl_GetCharLength(tls, value3Ptr)

	// See if we can splice in place. This happens when the number of
	// characters being replaced is the same as the number of characters
	// in the string to be inserted.

	if !(*(*int32)(unsafe.Pointer(bp + 840))-1 == *(*int32)(unsafe.Pointer(bp + 832))-*(*int32)(unsafe.Pointer(bp + 828))) {
		goto __2792
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __2793
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	goto __2794
__2793:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))
__2794:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes == uintptr(0) &&
		((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes == uintptr(0))) {
		goto __2795
	}
	bytes1 = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), uintptr(0))
	bytes2 = XTcl_GetByteArrayFromObj(tls, value3Ptr, uintptr(0))
	libc.Xmemcpy(tls, bytes1+uintptr(*(*int32)(unsafe.Pointer(bp + 828))), bytes2, uint64(*(*int32)(unsafe.Pointer(bp + 840 /* length3 */))))
	goto __2796
__2795:
	ustring1 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), uintptr(0))
	ustring2 = XTcl_GetUnicodeFromObj(tls, value3Ptr, uintptr(0))
	libc.Xmemcpy(tls, ustring1+uintptr(*(*int32)(unsafe.Pointer(bp + 828)))*2, ustring2,
		uint64(*(*int32)(unsafe.Pointer(bp + 840)))*uint64(unsafe.Sizeof(Tcl_UniChar(0))))
__2796:
	;
	XTcl_InvalidateStringRep(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FrefCount, 1) > 1) {
		goto __2797
	}
	goto __2798
__2797:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __2799
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __2801
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes)
__2801:
	;
	(*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Flength = -1
__2802:
	;
	*(*uintptr)(unsafe.Pointer(value3Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value3Ptr
	goto __2803
__2803:
	if 0 != 0 {
		goto __2802
	}
	goto __2804
__2804:
	;
	goto __2800
__2799:
	XTclFreeObj(tls, value3Ptr)
__2800:
	;
__2798:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == *(*uintptr)(unsafe.Pointer(bp + 944))) {
		goto __2805
	}
__2807:
	;
	if !(0 == 0) {
		goto __2810
	}
	if !(0 != 0) {
		goto __2812
	}
	if !(0 > 0) {
		goto __2813
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2814
__2813:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2814:
	;
__2812:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2811
__2810:
	if !(0 != 0) {
		goto __2815
	}
	if !(0 > 0) {
		goto __2817
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2817:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2819
	case 2:
		goto __2820
	case 0:
		goto __2821
	}
	goto __2818
__2819:
	goto cleanup1_pushObjResultPtr
__2820:
	goto cleanup2_pushObjResultPtr
__2821:
	goto __2818
__2818:
	;
	goto __2816
__2815:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2823
	case 2:
		goto __2824
	case 0:
		goto __2825
	}
	goto __2822
__2823:
	goto cleanup1
__2824:
	goto cleanup2
__2825:
	goto __2822
__2822:
	;
__2816:
	;
__2811:
	;
	goto __2808
__2808:
	if 0 != 0 {
		goto __2807
	}
	goto __2809
__2809:
	;
	goto __2806
__2805:
__2826:
	;
	if !(1 == 0) {
		goto __2829
	}
	if !(1 != 0) {
		goto __2831
	}
	if !(1 > 0) {
		goto __2832
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2833
__2832:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2833:
	;
__2831:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2830
__2829:
	if !(1 != 0) {
		goto __2834
	}
	if !(1 > 0) {
		goto __2836
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2836:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2838
	case 2:
		goto __2839
	case 0:
		goto __2840
	}
	goto __2837
__2838:
	goto cleanup1_pushObjResultPtr
__2839:
	goto cleanup2_pushObjResultPtr
__2840:
	goto __2837
__2837:
	;
	goto __2835
__2834:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2842
	case 2:
		goto __2843
	case 0:
		goto __2844
	}
	goto __2841
__2842:
	goto cleanup1
__2843:
	goto cleanup2
__2844:
	goto __2841
__2841:
	;
__2835:
	;
__2830:
	;
	goto __2827
__2827:
	if 0 != 0 {
		goto __2826
	}
	goto __2828
__2828:
	;
__2806:
	;
__2792:
	;

	// Get the unicode representation; this is where we guarantee to lose
	// bytearrays.

	ustring1 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), bp+704)
	*(*int32)(unsafe.Pointer(bp + 704 /* length */))--

	// Remove substring using copying.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = uintptr(0)
	if !(*(*int32)(unsafe.Pointer(bp + 828)) > 0) {
		goto __2845
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewUnicodeObj(tls, ustring1, *(*int32)(unsafe.Pointer(bp + 828 /* fromIdx */)))
__2845:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 840)) > 0) {
		goto __2846
	}
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __2847
	}
	XTcl_AppendObjToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), value3Ptr)
	goto __2848
__2847:
	if !((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FrefCount > 1) {
		goto __2849
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_DuplicateObj(tls, value3Ptr)
	goto __2850
__2849:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = value3Ptr
__2850:
	;
__2848:
	;
__2846:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 832)) < *(*int32)(unsafe.Pointer(bp + 704))) {
		goto __2851
	}
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __2852
	}
	XTcl_AppendUnicodeToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), ustring1+uintptr(*(*int32)(unsafe.Pointer(bp + 832)))*2+uintptr(1)*2,
		*(*int32)(unsafe.Pointer(bp + 704))-*(*int32)(unsafe.Pointer(bp + 832)))
	goto __2853
__2852:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewUnicodeObj(tls, ustring1+uintptr(*(*int32)(unsafe.Pointer(bp + 832)))*2+uintptr(1)*2,
		*(*int32)(unsafe.Pointer(bp + 704))-*(*int32)(unsafe.Pointer(bp + 832)))
__2853:
	;
__2851:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == uintptr(0)) {
		goto __2854
	}
	// This has to be the case [string replace $s 0 end {}]
	// which has result {} which is same as value3Ptr.
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = value3Ptr
__2854:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == value3Ptr) {
		goto __2855
	}
	// See [Bug 82e7f67325]
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FrefCount, 1) > 1) {
		goto __2856
	}
	goto __2857
__2856:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __2858
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != XtclEmptyStringRep) {
		goto __2860
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes)
__2860:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Flength = -1
__2861:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(tosPtr))
	goto __2862
__2862:
	if 0 != 0 {
		goto __2861
	}
	goto __2863
__2863:
	;
	goto __2859
__2858:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
__2859:
	;
__2857:
	;

	*(*uintptr)(unsafe.Pointer(tosPtr)) = value3Ptr

__2864:
	;
	if !(0 == 0) {
		goto __2867
	}
	if !(0 != 0) {
		goto __2869
	}
	if !(0 > 0) {
		goto __2870
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2871
__2870:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2871:
	;
__2869:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2868
__2867:
	if !(0 != 0) {
		goto __2872
	}
	if !(0 > 0) {
		goto __2874
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2874:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2876
	case 2:
		goto __2877
	case 0:
		goto __2878
	}
	goto __2875
__2876:
	goto cleanup1_pushObjResultPtr
__2877:
	goto cleanup2_pushObjResultPtr
__2878:
	goto __2875
__2875:
	;
	goto __2873
__2872:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __2880
	case 2:
		goto __2881
	case 0:
		goto __2882
	}
	goto __2879
__2880:
	goto cleanup1
__2881:
	goto cleanup2
__2882:
	goto __2879
__2879:
	;
__2873:
	;
__2868:
	;
	goto __2865
__2865:
	if 0 != 0 {
		goto __2864
	}
	goto __2866
__2866:
	;
__2855:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FrefCount, 1) > 1) {
		goto __2883
	}
	goto __2884
__2883:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __2885
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __2887
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Fbytes)
__2887:
	;
	(*Tcl_Obj)(unsafe.Pointer(value3Ptr)).Flength = -1
__2888:
	;
	*(*uintptr)(unsafe.Pointer(value3Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value3Ptr
	goto __2889
__2889:
	if 0 != 0 {
		goto __2888
	}
	goto __2890
__2890:
	;
	goto __2886
__2885:
	XTclFreeObj(tls, value3Ptr)
__2886:
	;
__2884:
	;

__2891:
	;
	if !(1 == 0) {
		goto __2894
	}
	if !(1 != 0) {
		goto __2896
	}
	if !(1 > 0) {
		goto __2897
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2898
__2897:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2898:
	;
__2896:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2895
__2894:
	if !(1 != 0) {
		goto __2899
	}
	if !(1 > 0) {
		goto __2901
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2901:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2903
	case 2:
		goto __2904
	case 0:
		goto __2905
	}
	goto __2902
__2903:
	goto cleanup1_pushObjResultPtr
__2904:
	goto cleanup2_pushObjResultPtr
__2905:
	goto __2902
__2902:
	;
	goto __2900
__2899:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __2907
	case 2:
		goto __2908
	case 0:
		goto __2909
	}
	goto __2906
__2907:
	goto cleanup1
__2908:
	goto cleanup2
__2909:
	goto __2906
__2906:
	;
__2900:
	;
__2895:
	;
	goto __2892
__2892:
	if 0 != 0 {
		goto __2891
	}
	goto __2893
__2893:
	;

__266:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr)) // "Main" string.
	value3Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))                             // "Target" string.
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(2)*8))                             // "Source" string.
	if !(value3Ptr == value2Ptr) {
		goto __2910
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))
	goto doneStringMap
	goto __2911
__2910:
	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) == value2Ptr) {
		goto __2912
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = value3Ptr
	goto doneStringMap
__2912:
	;
__2911:
	;
	ustring1 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), bp+704)
	if !(*(*int32)(unsafe.Pointer(bp + 704)) == 0) {
		goto __2913
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))
	goto doneStringMap
__2913:
	;
	ustring2 = XTcl_GetUnicodeFromObj(tls, value2Ptr, bp+836)
	if !(*(*int32)(unsafe.Pointer(bp + 836)) > *(*int32)(unsafe.Pointer(bp + 704)) || *(*int32)(unsafe.Pointer(bp + 836)) == 0) {
		goto __2914
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))
	goto doneStringMap
	goto __2915
__2914:
	if !(*(*int32)(unsafe.Pointer(bp + 836)) == *(*int32)(unsafe.Pointer(bp + 704))) {
		goto __2916
	}
	if !(libc.Xmemcmp(tls, ustring1, ustring2, uint64(unsafe.Sizeof(Tcl_UniChar(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 704)))) != 0) {
		goto __2917
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))
	goto __2918
__2917:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = value3Ptr
__2918:
	;
	goto doneStringMap
__2916:
	;
__2915:
	;
	ustring3 = XTcl_GetUnicodeFromObj(tls, value3Ptr, bp+840)

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewUnicodeObj(tls, ustring1, 0)
	p1 = ustring1
	end = ustring1 + uintptr(*(*int32)(unsafe.Pointer(bp + 704)))*2
__2919:
	if !(ustring1 < end) {
		goto __2921
	}
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring1))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring2))) && (*(*int32)(unsafe.Pointer(bp + 836)) == 1 || libc.Xmemcmp(tls, ustring1, ustring2, uint64(unsafe.Sizeof(Tcl_UniChar(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 836)))) ==
		0)) {
		goto __2922
	}
	if !(p1 != ustring1) {
		goto __2923
	}
	XTcl_AppendUnicodeToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), p1, int32((int64(ustring1)-int64(p1))/2))
	p1 = ustring1 + uintptr(*(*int32)(unsafe.Pointer(bp + 836)))*2
	goto __2924
__2923:
	p1 += 2 * uintptr(*(*int32)(unsafe.Pointer(bp + 836)))
__2924:
	;
	ustring1 = p1 - uintptr(1)*2

	XTcl_AppendUnicodeToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), ustring3, *(*int32)(unsafe.Pointer(bp + 840 /* length3 */)))
__2922:
	;
	goto __2920
__2920:
	ustring1 += 2
	goto __2919
	goto __2921
__2921:
	;
	if !(p1 != ustring1) {
		goto __2925
	}
	// Put the rest of the unmapped chars onto result.

	XTcl_AppendUnicodeToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)), p1, int32((int64(ustring1)-int64(p1))/2))
__2925:
	;
doneStringMap:
	;
__2926:
	pc += uintptr(1)
	cleanup = 3
	if !(1 != 0) {
		goto __2929
	}
	if !(1 > 0) {
		goto __2931
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2931:
	;
	goto cleanupV_pushObjResultPtr
	goto __2930
__2929:
	goto cleanupV
__2930:
	;
	goto __2927
__2927:
	if 0 != 0 {
		goto __2926
	}
	goto __2928
__2928:
	;

__267:
	ustring1 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(tosPtr)), bp+704)                               // Haystack
	ustring2 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)), bp+836 /* &length2 */) // Needle

	match = -1
	if !(*(*int32)(unsafe.Pointer(bp + 836)) > 0 && *(*int32)(unsafe.Pointer(bp + 836)) <= *(*int32)(unsafe.Pointer(bp + 704))) {
		goto __2932
	}
	end = ustring1 + uintptr(*(*int32)(unsafe.Pointer(bp + 704)))*2 - uintptr(*(*int32)(unsafe.Pointer(bp + 836)))*2 + uintptr(1)*2
	p1 = ustring1
__2933:
	if !(p1 < end) {
		goto __2935
	}
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(p1))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring2))) && libc.Xmemcmp(tls, ustring2, p1, uint64(unsafe.Sizeof(Tcl_UniChar(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 836)))) == 0) {
		goto __2936
	}
	match = int32((int64(p1) - int64(ustring1)) / 2)
	goto __2935
__2936:
	;
	goto __2934
__2934:
	p1 += 2
	goto __2933
	goto __2935
__2935:
	;
__2932:
	;

__2937:
	;
__2940:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2943
	}
	XTclAllocateFreeObjects(tls)
__2943:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2941
__2941:
	if 0 != 0 {
		goto __2940
	}
	goto __2942
__2942:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = int32(match)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __2938
__2938:
	if 0 != 0 {
		goto __2937
	}
	goto __2939
__2939:
	;
__2944:
	;
	if !(2 == 0) {
		goto __2947
	}
	if !(1 != 0) {
		goto __2949
	}
	if !(1 > 0) {
		goto __2950
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2951
__2950:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2951:
	;
__2949:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2948
__2947:
	if !(1 != 0) {
		goto __2952
	}
	if !(1 > 0) {
		goto __2954
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2954:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2956
	case 2:
		goto __2957
	case 0:
		goto __2958
	}
	goto __2955
__2956:
	goto cleanup1_pushObjResultPtr
__2957:
	goto cleanup2_pushObjResultPtr
__2958:
	goto __2955
__2955:
	;
	goto __2953
__2952:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2960
	case 2:
		goto __2961
	case 0:
		goto __2962
	}
	goto __2959
__2960:
	goto cleanup1
__2961:
	goto cleanup2
__2962:
	goto __2959
__2959:
	;
__2953:
	;
__2948:
	;
	goto __2945
__2945:
	if 0 != 0 {
		goto __2944
	}
	goto __2946
__2946:
	;

__268:
	ustring1 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(tosPtr)), bp+704)                               // Haystack
	ustring2 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)), bp+836 /* &length2 */) // Needle

	match = -1
	if !(*(*int32)(unsafe.Pointer(bp + 836)) > 0 && *(*int32)(unsafe.Pointer(bp + 836)) <= *(*int32)(unsafe.Pointer(bp + 704))) {
		goto __2963
	}
	p1 = ustring1 + uintptr(*(*int32)(unsafe.Pointer(bp + 704)))*2 - uintptr(*(*int32)(unsafe.Pointer(bp + 836)))*2
__2964:
	if !(p1 >= ustring1) {
		goto __2966
	}
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(p1))) == int32(*(*Tcl_UniChar)(unsafe.Pointer(ustring2))) && libc.Xmemcmp(tls, ustring2, p1, uint64(unsafe.Sizeof(Tcl_UniChar(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 836)))) == 0) {
		goto __2967
	}
	match = int32((int64(p1) - int64(ustring1)) / 2)
	goto __2966
__2967:
	;
	goto __2965
__2965:
	p1 -= 2
	goto __2964
	goto __2966
__2966:
	;
__2963:
	;

__2968:
	;
__2971:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __2974
	}
	XTclAllocateFreeObjects(tls)
__2974:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2972
__2972:
	if 0 != 0 {
		goto __2971
	}
	goto __2973
__2973:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = int32(match)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __2969
__2969:
	if 0 != 0 {
		goto __2968
	}
	goto __2970
__2970:
	;
__2975:
	;
	if !(2 == 0) {
		goto __2978
	}
	if !(1 != 0) {
		goto __2980
	}
	if !(1 > 0) {
		goto __2981
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __2982
__2981:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__2982:
	;
__2980:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __2979
__2978:
	if !(1 != 0) {
		goto __2983
	}
	if !(1 > 0) {
		goto __2985
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__2985:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2987
	case 2:
		goto __2988
	case 0:
		goto __2989
	}
	goto __2986
__2987:
	goto cleanup1_pushObjResultPtr
__2988:
	goto cleanup2_pushObjResultPtr
__2989:
	goto __2986
__2986:
	;
	goto __2984
__2983:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __2991
	case 2:
		goto __2992
	case 0:
		goto __2993
	}
	goto __2990
__2991:
	goto cleanup1
__2992:
	goto cleanup2
__2993:
	goto __2990
__2990:
	;
__2984:
	;
__2979:
	;
	goto __2976
__2976:
	if 0 != 0 {
		goto __2975
	}
	goto __2977
__2977:
	;

__269:
	opnd = int32(*(*int8)(unsafe.Pointer(pc + uintptr(1))))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

	ustring1 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), bp+704)
	match = 1
	if !(*(*int32)(unsafe.Pointer(bp + 704)) > 0) {
		goto __2994
	}
	end = ustring1 + uintptr(*(*int32)(unsafe.Pointer(bp + 704)))*2
	p1 = ustring1
__2995:
	if !(p1 < end) {
		goto __2997
	}
	p1 += 2 * uintptr(func() int32 {
		*(*int32)(unsafe.Pointer(bp + 844)) = int32(*(*Tcl_UniChar)(unsafe.Pointer(p1)))
		return 1
	}())
	if !!((*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{XtclStringClassTable[opnd].Fcomparator})).f(tls, *(*int32)(unsafe.Pointer(bp + 844))) != 0) {
		goto __2998
	}
	match = 0
	goto __2997
__2998:
	;
	goto __2996
__2996:
	;
	goto __2995
	goto __2997
__2997:
	;
__2994:
	;

__2999:
	pc += uintptr(2)
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_JUMP_FALSE1:
		goto __3003
	case INST_JUMP_TRUE1:
		goto __3004
	case INST_JUMP_FALSE4:
		goto __3005
	case INST_JUMP_TRUE4:
		goto __3006
	default:
		goto __3007
	}
	goto __3002
__3003:
__3008:
	;
	if !(1 == 0) {
		goto __3011
	}
	if !(0 != 0) {
		goto __3013
	}
	if !(0 > 0) {
		goto __3014
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3015
__3014:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3015:
	;
__3013:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	goto cleanup0
	goto __3012
__3011:
	if !(0 != 0) {
		goto __3016
	}
	if !(0 > 0) {
		goto __3018
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3018:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 1 {
	case 1:
		goto __3020
	case 2:
		goto __3021
	case 0:
		goto __3022
	}
	goto __3019
__3020:
	goto cleanup1_pushObjResultPtr
__3021:
	goto cleanup2_pushObjResultPtr
__3022:
	goto __3019
__3019:
	;
	goto __3017
__3016:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 1 {
	case 1:
		goto __3024
	case 2:
		goto __3025
	case 0:
		goto __3026
	}
	goto __3023
__3024:
	goto cleanup1
__3025:
	goto cleanup2
__3026:
	goto __3023
__3023:
	;
__3017:
	;
__3012:
	;
	goto __3009
__3009:
	if 0 != 0 {
		goto __3008
	}
	goto __3010
__3010:
	;
	goto __3002
__3004:
__3027:
	;
	if !(1 == 0) {
		goto __3030
	}
	if !(0 != 0) {
		goto __3032
	}
	if !(0 > 0) {
		goto __3033
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3034
__3033:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3034:
	;
__3032:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	goto cleanup0
	goto __3031
__3030:
	if !(0 != 0) {
		goto __3035
	}
	if !(0 > 0) {
		goto __3037
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3037:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 1 {
	case 1:
		goto __3039
	case 2:
		goto __3040
	case 0:
		goto __3041
	}
	goto __3038
__3039:
	goto cleanup1_pushObjResultPtr
__3040:
	goto cleanup2_pushObjResultPtr
__3041:
	goto __3038
__3038:
	;
	goto __3036
__3035:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 1 {
	case 1:
		goto __3043
	case 2:
		goto __3044
	case 0:
		goto __3045
	}
	goto __3042
__3043:
	goto cleanup1
__3044:
	goto cleanup2
__3045:
	goto __3042
__3042:
	;
__3036:
	;
__3031:
	;
	goto __3028
__3028:
	if 0 != 0 {
		goto __3027
	}
	goto __3029
__3029:
	;
	goto __3002
__3005:
__3046:
	;
	if !(1 == 0) {
		goto __3049
	}
	if !(0 != 0) {
		goto __3051
	}
	if !(0 > 0) {
		goto __3052
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3053
__3052:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3053:
	;
__3051:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	goto cleanup0
	goto __3050
__3049:
	if !(0 != 0) {
		goto __3054
	}
	if !(0 > 0) {
		goto __3056
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3056:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 1 {
	case 1:
		goto __3058
	case 2:
		goto __3059
	case 0:
		goto __3060
	}
	goto __3057
__3058:
	goto cleanup1_pushObjResultPtr
__3059:
	goto cleanup2_pushObjResultPtr
__3060:
	goto __3057
__3057:
	;
	goto __3055
__3054:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 1 {
	case 1:
		goto __3062
	case 2:
		goto __3063
	case 0:
		goto __3064
	}
	goto __3061
__3062:
	goto cleanup1
__3063:
	goto cleanup2
__3064:
	goto __3061
__3061:
	;
__3055:
	;
__3050:
	;
	goto __3047
__3047:
	if 0 != 0 {
		goto __3046
	}
	goto __3048
__3048:
	;
	goto __3002
__3006:
__3065:
	;
	if !(1 == 0) {
		goto __3068
	}
	if !(0 != 0) {
		goto __3070
	}
	if !(0 > 0) {
		goto __3071
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3072
__3071:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3072:
	;
__3070:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	goto cleanup0
	goto __3069
__3068:
	if !(0 != 0) {
		goto __3073
	}
	if !(0 > 0) {
		goto __3075
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3075:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 1 {
	case 1:
		goto __3077
	case 2:
		goto __3078
	case 0:
		goto __3079
	}
	goto __3076
__3077:
	goto cleanup1_pushObjResultPtr
__3078:
	goto cleanup2_pushObjResultPtr
__3079:
	goto __3076
__3076:
	;
	goto __3074
__3073:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 1 {
	case 1:
		goto __3081
	case 2:
		goto __3082
	case 0:
		goto __3083
	}
	goto __3080
__3081:
	goto cleanup1
__3082:
	goto cleanup2
__3083:
	goto __3080
__3080:
	;
__3074:
	;
__3069:
	;
	goto __3066
__3066:
	if 0 != 0 {
		goto __3065
	}
	goto __3067
__3067:
	;
	goto __3002
__3007:
	if !(match < 0) {
		goto __3084
	}
__3086:
	;
__3089:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __3092
	}
	XTclAllocateFreeObjects(tls)
__3092:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3090
__3090:
	if 0 != 0 {
		goto __3089
	}
	goto __3091
__3091:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __3087
__3087:
	if 0 != 0 {
		goto __3086
	}
	goto __3088
__3088:
	;
	goto __3085
__3084:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.Bool32(match > 0))*8))
__3085:
	;
__3093:
	;
	if !(1 == 0) {
		goto __3096
	}
	if !(1 != 0) {
		goto __3098
	}
	if !(1 > 0) {
		goto __3099
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3100
__3099:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3100:
	;
__3098:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __3097
__3096:
	if !(1 != 0) {
		goto __3101
	}
	if !(1 > 0) {
		goto __3103
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3103:
	;
	pc += uintptr(0)
	switch 1 {
	case 1:
		goto __3105
	case 2:
		goto __3106
	case 0:
		goto __3107
	}
	goto __3104
__3105:
	goto cleanup1_pushObjResultPtr
__3106:
	goto cleanup2_pushObjResultPtr
__3107:
	goto __3104
__3104:
	;
	goto __3102
__3101:
	pc += uintptr(0)
	switch 1 {
	case 1:
		goto __3109
	case 2:
		goto __3110
	case 0:
		goto __3111
	}
	goto __3108
__3109:
	goto cleanup1
__3110:
	goto cleanup2
__3111:
	goto __3108
__3108:
	;
__3102:
	;
__3097:
	;
	goto __3094
__3094:
	if 0 != 0 {
		goto __3093
	}
	goto __3095
__3095:
	;
	goto __3002
__3002:
	;
	goto __3000
__3000:
	if 0 != 0 {
		goto __2999
	}
	goto __3001
__3001:
	;

__270:
	nocase = int32(*(*int8)(unsafe.Pointer(pc + uintptr(1))))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr)) // String
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))                             // Pattern

	// Check that at least one of the objects is Unicode before promoting
	// both.

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclStringType)) ||
		(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclStringType))) {
		goto __3112
	}

	ustring11 = XTcl_GetUnicodeFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), bp+704)
	ustring21 = XTcl_GetUnicodeFromObj(tls, value2Ptr, bp+836)
	match = XTclUniCharMatch(tls, ustring11, *(*int32)(unsafe.Pointer(bp + 704 /* length */)), ustring21, *(*int32)(unsafe.Pointer(bp + 836 /* length2 */)),
		nocase)
	goto __3113
__3112:
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes == uintptr(0) && !(nocase != 0)) {
		goto __3114
	}

	bytes11 = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), bp+704)
	bytes21 = XTcl_GetByteArrayFromObj(tls, value2Ptr, bp+836)
	match = XTclByteArrayMatch(tls, bytes11, *(*int32)(unsafe.Pointer(bp + 704 /* length */)), bytes21, *(*int32)(unsafe.Pointer(bp + 836 /* length2 */)), 0)
	goto __3115
__3114:
	match = XTcl_StringCaseMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 944)))
	}(),
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes
			}
			return XTcl_GetString(tls, value2Ptr)
		}(), nocase)
__3115:
	;
__3113:
	;

	// Reuse value2Ptr object already on stack if possible. Adjustment is
	// 2 due to the nocase byte

	// Peep-hole optimisation: if you're about to jump, do jump from here.

__3116:
	pc += uintptr(2)
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_JUMP_FALSE1:
		goto __3120
	case INST_JUMP_TRUE1:
		goto __3121
	case INST_JUMP_FALSE4:
		goto __3122
	case INST_JUMP_TRUE4:
		goto __3123
	default:
		goto __3124
	}
	goto __3119
__3120:
__3125:
	;
	if !(2 == 0) {
		goto __3128
	}
	if !(0 != 0) {
		goto __3130
	}
	if !(0 > 0) {
		goto __3131
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3132
__3131:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3132:
	;
__3130:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	goto cleanup0
	goto __3129
__3128:
	if !(0 != 0) {
		goto __3133
	}
	if !(0 > 0) {
		goto __3135
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3135:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __3137
	case 2:
		goto __3138
	case 0:
		goto __3139
	}
	goto __3136
__3137:
	goto cleanup1_pushObjResultPtr
__3138:
	goto cleanup2_pushObjResultPtr
__3139:
	goto __3136
__3136:
	;
	goto __3134
__3133:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __3141
	case 2:
		goto __3142
	case 0:
		goto __3143
	}
	goto __3140
__3141:
	goto cleanup1
__3142:
	goto cleanup2
__3143:
	goto __3140
__3140:
	;
__3134:
	;
__3129:
	;
	goto __3126
__3126:
	if 0 != 0 {
		goto __3125
	}
	goto __3127
__3127:
	;
	goto __3119
__3121:
__3144:
	;
	if !(2 == 0) {
		goto __3147
	}
	if !(0 != 0) {
		goto __3149
	}
	if !(0 > 0) {
		goto __3150
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3151
__3150:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3151:
	;
__3149:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	goto cleanup0
	goto __3148
__3147:
	if !(0 != 0) {
		goto __3152
	}
	if !(0 > 0) {
		goto __3154
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3154:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __3156
	case 2:
		goto __3157
	case 0:
		goto __3158
	}
	goto __3155
__3156:
	goto cleanup1_pushObjResultPtr
__3157:
	goto cleanup2_pushObjResultPtr
__3158:
	goto __3155
__3155:
	;
	goto __3153
__3152:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __3160
	case 2:
		goto __3161
	case 0:
		goto __3162
	}
	goto __3159
__3160:
	goto cleanup1
__3161:
	goto cleanup2
__3162:
	goto __3159
__3159:
	;
__3153:
	;
__3148:
	;
	goto __3145
__3145:
	if 0 != 0 {
		goto __3144
	}
	goto __3146
__3146:
	;
	goto __3119
__3122:
__3163:
	;
	if !(2 == 0) {
		goto __3166
	}
	if !(0 != 0) {
		goto __3168
	}
	if !(0 > 0) {
		goto __3169
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3170
__3169:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3170:
	;
__3168:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	goto cleanup0
	goto __3167
__3166:
	if !(0 != 0) {
		goto __3171
	}
	if !(0 > 0) {
		goto __3173
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3173:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __3175
	case 2:
		goto __3176
	case 0:
		goto __3177
	}
	goto __3174
__3175:
	goto cleanup1_pushObjResultPtr
__3176:
	goto cleanup2_pushObjResultPtr
__3177:
	goto __3174
__3174:
	;
	goto __3172
__3171:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __3179
	case 2:
		goto __3180
	case 0:
		goto __3181
	}
	goto __3178
__3179:
	goto cleanup1
__3180:
	goto cleanup2
__3181:
	goto __3178
__3178:
	;
__3172:
	;
__3167:
	;
	goto __3164
__3164:
	if 0 != 0 {
		goto __3163
	}
	goto __3165
__3165:
	;
	goto __3119
__3123:
__3182:
	;
	if !(2 == 0) {
		goto __3185
	}
	if !(0 != 0) {
		goto __3187
	}
	if !(0 > 0) {
		goto __3188
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3189
__3188:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3189:
	;
__3187:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	goto cleanup0
	goto __3186
__3185:
	if !(0 != 0) {
		goto __3190
	}
	if !(0 > 0) {
		goto __3192
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3192:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __3194
	case 2:
		goto __3195
	case 0:
		goto __3196
	}
	goto __3193
__3194:
	goto cleanup1_pushObjResultPtr
__3195:
	goto cleanup2_pushObjResultPtr
__3196:
	goto __3193
__3193:
	;
	goto __3191
__3190:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __3198
	case 2:
		goto __3199
	case 0:
		goto __3200
	}
	goto __3197
__3198:
	goto cleanup1
__3199:
	goto cleanup2
__3200:
	goto __3197
__3197:
	;
__3191:
	;
__3186:
	;
	goto __3183
__3183:
	if 0 != 0 {
		goto __3182
	}
	goto __3184
__3184:
	;
	goto __3119
__3124:
	if !(match < 0) {
		goto __3201
	}
__3203:
	;
__3206:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __3209
	}
	XTclAllocateFreeObjects(tls)
__3209:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3207
__3207:
	if 0 != 0 {
		goto __3206
	}
	goto __3208
__3208:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __3204
__3204:
	if 0 != 0 {
		goto __3203
	}
	goto __3205
__3205:
	;
	goto __3202
__3201:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.Bool32(match > 0))*8))
__3202:
	;
__3210:
	;
	if !(2 == 0) {
		goto __3213
	}
	if !(1 != 0) {
		goto __3215
	}
	if !(1 > 0) {
		goto __3216
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3217
__3216:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3217:
	;
__3215:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __3214
__3213:
	if !(1 != 0) {
		goto __3218
	}
	if !(1 > 0) {
		goto __3220
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3220:
	;
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __3222
	case 2:
		goto __3223
	case 0:
		goto __3224
	}
	goto __3221
__3222:
	goto cleanup1_pushObjResultPtr
__3223:
	goto cleanup2_pushObjResultPtr
__3224:
	goto __3221
__3221:
	;
	goto __3219
__3218:
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __3226
	case 2:
		goto __3227
	case 0:
		goto __3228
	}
	goto __3225
__3226:
	goto cleanup1
__3227:
	goto cleanup2
__3228:
	goto __3225
__3225:
	;
__3219:
	;
__3214:
	;
	goto __3211
__3211:
	if 0 != 0 {
		goto __3210
	}
	goto __3212
__3212:
	;
	goto __3119
__3119:
	;
	goto __3117
__3117:
	if 0 != 0 {
		goto __3116
	}
	goto __3118
__3118:
	;

__271:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) // String
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))                                                           // TrimSet
	string2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 836)) = (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, value2Ptr, bp+836)
	}()
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+704)
	}()
	trim1 = XTclTrimLeft(tls, string1, *(*int32)(unsafe.Pointer(bp + 704 /* length */)), string2, *(*int32)(unsafe.Pointer(bp + 836 /* length2 */)))
	*(*int32)(unsafe.Pointer(bp + 848 /* trim2 */)) = 0
	goto createTrimmedString
__272:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) // String
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))                                                           // TrimSet
	string2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 836)) = (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, value2Ptr, bp+836)
	}()
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+704)
	}()
	*(*int32)(unsafe.Pointer(bp + 848 /* trim2 */)) = XTclTrimRight(tls, string1, *(*int32)(unsafe.Pointer(bp + 704 /* length */)), string2, *(*int32)(unsafe.Pointer(bp + 836 /* length2 */)))
	trim1 = 0
	goto createTrimmedString
__273:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)) // String
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))                                                           // TrimSet
	string2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 836)) = (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, value2Ptr, bp+836)
	}()
	string1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 704)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944)), bp+704)
	}()
	trim1 = XTclTrim(tls, string1, *(*int32)(unsafe.Pointer(bp + 704 /* length */)), string2, *(*int32)(unsafe.Pointer(bp + 836 /* length2 */)), bp+848)
createTrimmedString:
	// Careful here; trim set often contains non-ASCII characters so we
	// take care when printing. [Bug 971cb4f1db]

	if !(trim1 == 0 && *(*int32)(unsafe.Pointer(bp + 848)) == 0) {
		goto __3229
	}
__3231:
	;
	if !(1 == 0) {
		goto __3234
	}
	if !(0 != 0) {
		goto __3236
	}
	if !(0 > 0) {
		goto __3237
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3238
__3237:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3238:
	;
__3236:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3235
__3234:
	if !(0 != 0) {
		goto __3239
	}
	if !(0 > 0) {
		goto __3241
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3241:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3243
	case 2:
		goto __3244
	case 0:
		goto __3245
	}
	goto __3242
__3243:
	goto cleanup1_pushObjResultPtr
__3244:
	goto cleanup2_pushObjResultPtr
__3245:
	goto __3242
__3242:
	;
	goto __3240
__3239:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3247
	case 2:
		goto __3248
	case 0:
		goto __3249
	}
	goto __3246
__3247:
	goto cleanup1
__3248:
	goto cleanup2
__3249:
	goto __3246
__3246:
	;
__3240:
	;
__3235:
	;
	goto __3232
__3232:
	if 0 != 0 {
		goto __3231
	}
	goto __3233
__3233:
	;
	goto __3230
__3229:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewStringObj(tls, string1+uintptr(trim1), *(*int32)(unsafe.Pointer(bp + 704))-trim1-*(*int32)(unsafe.Pointer(bp + 848)))
__3250:
	;
	if !(2 == 0) {
		goto __3253
	}
	if !(1 != 0) {
		goto __3255
	}
	if !(1 > 0) {
		goto __3256
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3257
__3256:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3257:
	;
__3255:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3254
__3253:
	if !(1 != 0) {
		goto __3258
	}
	if !(1 > 0) {
		goto __3260
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3260:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3262
	case 2:
		goto __3263
	case 0:
		goto __3264
	}
	goto __3261
__3262:
	goto cleanup1_pushObjResultPtr
__3263:
	goto cleanup2_pushObjResultPtr
__3264:
	goto __3261
__3261:
	;
	goto __3259
__3258:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3266
	case 2:
		goto __3267
	case 0:
		goto __3268
	}
	goto __3265
__3266:
	goto cleanup1
__3267:
	goto cleanup2
__3268:
	goto __3265
__3265:
	;
__3259:
	;
__3254:
	;
	goto __3251
__3251:
	if 0 != 0 {
		goto __3250
	}
	goto __3252
__3252:
	;
__3230:
	;

__274:
	cflags = int32(*(*int8)(unsafe.Pointer(pc + uintptr(1))))                                  // RE compile flages like NOCASE
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr)) // String
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))                             // Pattern

	/*
	 * Compile and match the regular expression.
	 */

	regExpr =
		XTcl_GetRegExpFromObj(tls, interp, value2Ptr, cflags)

	if !(regExpr == uintptr(0)) {
		goto __3269
	}

	goto gotError
__3269:
	;
	match = XTcl_RegExpExecObj(tls, interp, regExpr, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), 0, 0, 0)
	if !(match < 0) {
		goto __3270
	}

	goto gotError
__3270:
	;

	// Peep-hole optimisation: if you're about to jump, do jump from here.
	// Adjustment is 2 due to the nocase byte.

__3271:
	pc += uintptr(2)
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_JUMP_FALSE1:
		goto __3275
	case INST_JUMP_TRUE1:
		goto __3276
	case INST_JUMP_FALSE4:
		goto __3277
	case INST_JUMP_TRUE4:
		goto __3278
	default:
		goto __3279
	}
	goto __3274
__3275:
__3280:
	;
	if !(2 == 0) {
		goto __3283
	}
	if !(0 != 0) {
		goto __3285
	}
	if !(0 > 0) {
		goto __3286
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3287
__3286:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3287:
	;
__3285:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	goto cleanup0
	goto __3284
__3283:
	if !(0 != 0) {
		goto __3288
	}
	if !(0 > 0) {
		goto __3290
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3290:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __3292
	case 2:
		goto __3293
	case 0:
		goto __3294
	}
	goto __3291
__3292:
	goto cleanup1_pushObjResultPtr
__3293:
	goto cleanup2_pushObjResultPtr
__3294:
	goto __3291
__3291:
	;
	goto __3289
__3288:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __3296
	case 2:
		goto __3297
	case 0:
		goto __3298
	}
	goto __3295
__3296:
	goto cleanup1
__3297:
	goto cleanup2
__3298:
	goto __3295
__3295:
	;
__3289:
	;
__3284:
	;
	goto __3281
__3281:
	if 0 != 0 {
		goto __3280
	}
	goto __3282
__3282:
	;
	goto __3274
__3276:
__3299:
	;
	if !(2 == 0) {
		goto __3302
	}
	if !(0 != 0) {
		goto __3304
	}
	if !(0 > 0) {
		goto __3305
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3306
__3305:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3306:
	;
__3304:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	goto cleanup0
	goto __3303
__3302:
	if !(0 != 0) {
		goto __3307
	}
	if !(0 > 0) {
		goto __3309
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3309:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __3311
	case 2:
		goto __3312
	case 0:
		goto __3313
	}
	goto __3310
__3311:
	goto cleanup1_pushObjResultPtr
__3312:
	goto cleanup2_pushObjResultPtr
__3313:
	goto __3310
__3310:
	;
	goto __3308
__3307:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __3315
	case 2:
		goto __3316
	case 0:
		goto __3317
	}
	goto __3314
__3315:
	goto cleanup1
__3316:
	goto cleanup2
__3317:
	goto __3314
__3314:
	;
__3308:
	;
__3303:
	;
	goto __3300
__3300:
	if 0 != 0 {
		goto __3299
	}
	goto __3301
__3301:
	;
	goto __3274
__3277:
__3318:
	;
	if !(2 == 0) {
		goto __3321
	}
	if !(0 != 0) {
		goto __3323
	}
	if !(0 > 0) {
		goto __3324
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3325
__3324:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3325:
	;
__3323:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	goto cleanup0
	goto __3322
__3321:
	if !(0 != 0) {
		goto __3326
	}
	if !(0 > 0) {
		goto __3328
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3328:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __3330
	case 2:
		goto __3331
	case 0:
		goto __3332
	}
	goto __3329
__3330:
	goto cleanup1_pushObjResultPtr
__3331:
	goto cleanup2_pushObjResultPtr
__3332:
	goto __3329
__3329:
	;
	goto __3327
__3326:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __3334
	case 2:
		goto __3335
	case 0:
		goto __3336
	}
	goto __3333
__3334:
	goto cleanup1
__3335:
	goto cleanup2
__3336:
	goto __3333
__3333:
	;
__3327:
	;
__3322:
	;
	goto __3319
__3319:
	if 0 != 0 {
		goto __3318
	}
	goto __3320
__3320:
	;
	goto __3274
__3278:
__3337:
	;
	if !(2 == 0) {
		goto __3340
	}
	if !(0 != 0) {
		goto __3342
	}
	if !(0 > 0) {
		goto __3343
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3344
__3343:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3344:
	;
__3342:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	goto cleanup0
	goto __3341
__3340:
	if !(0 != 0) {
		goto __3345
	}
	if !(0 > 0) {
		goto __3347
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3347:
	;
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __3349
	case 2:
		goto __3350
	case 0:
		goto __3351
	}
	goto __3348
__3349:
	goto cleanup1_pushObjResultPtr
__3350:
	goto cleanup2_pushObjResultPtr
__3351:
	goto __3348
__3348:
	;
	goto __3346
__3345:
	pc += func() uintptr {
		if match != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __3353
	case 2:
		goto __3354
	case 0:
		goto __3355
	}
	goto __3352
__3353:
	goto cleanup1
__3354:
	goto cleanup2
__3355:
	goto __3352
__3352:
	;
__3346:
	;
__3341:
	;
	goto __3338
__3338:
	if 0 != 0 {
		goto __3337
	}
	goto __3339
__3339:
	;
	goto __3274
__3279:
	if !(match < 0) {
		goto __3356
	}
__3358:
	;
__3361:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __3364
	}
	XTclAllocateFreeObjects(tls)
__3364:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3362
__3362:
	if 0 != 0 {
		goto __3361
	}
	goto __3363
__3363:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __3359
__3359:
	if 0 != 0 {
		goto __3358
	}
	goto __3360
__3360:
	;
	goto __3357
__3356:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.Bool32(match > 0))*8))
__3357:
	;
__3365:
	;
	if !(2 == 0) {
		goto __3368
	}
	if !(1 != 0) {
		goto __3370
	}
	if !(1 > 0) {
		goto __3371
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3372
__3371:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3372:
	;
__3370:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __3369
__3368:
	if !(1 != 0) {
		goto __3373
	}
	if !(1 > 0) {
		goto __3375
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3375:
	;
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __3377
	case 2:
		goto __3378
	case 0:
		goto __3379
	}
	goto __3376
__3377:
	goto cleanup1_pushObjResultPtr
__3378:
	goto cleanup2_pushObjResultPtr
__3379:
	goto __3376
__3376:
	;
	goto __3374
__3373:
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __3381
	case 2:
		goto __3382
	case 0:
		goto __3383
	}
	goto __3380
__3381:
	goto cleanup1
__3382:
	goto cleanup2
__3383:
	goto __3380
__3380:
	;
__3374:
	;
__3369:
	;
	goto __3366
__3366:
	if 0 != 0 {
		goto __3365
	}
	goto __3367
__3367:
	;
	goto __3274
__3274:
	;
	goto __3272
__3272:
	if 0 != 0 {
		goto __3271
	}
	goto __3273
__3273:
	;

	/*
	 *	   End of string-related instructions.
	 * -----------------------------------------------------------------
	 *	   Start of numeric operator instructions.
	 */

	l1 = 0

__275:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(tosPtr)) + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(tosPtr)) + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(tosPtr)) + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(tosPtr)), bp+856, bp+852)
				}()
			}()
		}()
	}() != TCL_OK) {
		goto __3384
	}
	*(*int32)(unsafe.Pointer(bp + 852 /* type11 */)) = 0
	goto __3385
__3384:
	if !(*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_LONG) {
		goto __3386
	}

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 864)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(tosPtr)), bp+864)
	}() != TCL_OK) {
		goto __3388
	}
	*(*int32)(unsafe.Pointer(bp + 852 /* type11 */)) = TCL_NUMBER_WIDE
__3388:
	;
	goto __3387
__3386:
	if !(*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_WIDE) {
		goto __3389
	}
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 868)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(tosPtr)), bp+868)
	}() == TCL_OK) {
		goto __3391
	}
	*(*int32)(unsafe.Pointer(bp + 852 /* type11 */)) = TCL_NUMBER_LONG
__3391:
	;
	goto __3390
__3389:
	if !(*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_BIG) {
		goto __3392
	}

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 872)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 872)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(tosPtr)), bp+872)
		}()
	}() == TCL_OK) {
		goto __3393
	}
	*(*int32)(unsafe.Pointer(bp + 852 /* type11 */)) = TCL_NUMBER_WIDE
__3393:
	;
__3392:
	;
__3390:
	;
__3387:
	;
__3385:
	;
__3394:
	;
__3397:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __3400
	}
	XTclAllocateFreeObjects(tls)
__3400:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3398
__3398:
	if 0 != 0 {
		goto __3397
	}
	goto __3399
__3399:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = int32(*(*int32)(unsafe.Pointer(bp + 852)))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __3395
__3395:
	if 0 != 0 {
		goto __3394
	}
	goto __3396
__3396:
	;

__3401:
	;
	if !(1 == 0) {
		goto __3404
	}
	if !(1 != 0) {
		goto __3406
	}
	if !(1 > 0) {
		goto __3407
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3408
__3407:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3408:
	;
__3406:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3405
__3404:
	if !(1 != 0) {
		goto __3409
	}
	if !(1 > 0) {
		goto __3411
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3411:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3413
	case 2:
		goto __3414
	case 0:
		goto __3415
	}
	goto __3412
__3413:
	goto cleanup1_pushObjResultPtr
__3414:
	goto cleanup2_pushObjResultPtr
__3415:
	goto __3412
__3412:
	;
	goto __3410
__3409:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3417
	case 2:
		goto __3418
	case 0:
		goto __3419
	}
	goto __3416
__3417:
	goto cleanup1
__3418:
	goto cleanup2
__3419:
	goto __3416
__3416:
	;
__3410:
	;
__3405:
	;
	goto __3402
__3402:
	if 0 != 0 {
		goto __3401
	}
	goto __3403
__3403:
	;

__276:
__277:
__278:
__279:
__280:
__281:
	iResult1 = 0
	compare = 0

	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	//
	// 	    Try to determine, without triggering generation of a string
	// 	    representation, whether one value is not a number.
	//
	if !(XTclCheckEmptyString(tls, *(*uintptr)(unsafe.Pointer(bp + 944))) > 0 || XTclCheckEmptyString(tls, value2Ptr) > 0) {
		goto __3420
	}
	goto stringCompare
__3420:
	;

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944)), bp+856, bp+852)
				}()
			}()
		}()
	}() != TCL_OK ||
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_LONG
					*(*ClientData)(unsafe.Pointer(bp + 888)) = value2Ptr + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
					return func() int32 {
						*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_WIDE
						*(*ClientData)(unsafe.Pointer(bp + 888)) = value2Ptr + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
						return func() int32 {
							if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(value2Ptr + 32))) != 0 {
								*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_NAN
							} else {
								*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_DOUBLE
							}
							*(*ClientData)(unsafe.Pointer(bp + 888)) = value2Ptr + 32
							return TCL_OK
						}()
					}
					return func() int32 {
						if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength == 0 {
							return func() int32 { *(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_LONG; return TCL_ERROR }()
						}
						return XTclGetNumberFromObj(tls, uintptr(0), value2Ptr, bp+888, bp+880)
					}()
				}()
			}()
		}() != TCL_OK) {
		goto __3421
	}
	// At least one non-numeric argument - compare as strings.

	goto stringCompare
__3421:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_NAN || *(*int32)(unsafe.Pointer(bp + 880)) == TCL_NUMBER_NAN) {
		goto __3422
	}
	// NaN arg: NaN != to everything, other compares are false.

	iResult1 = libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_NEQ)
	goto foundResult
__3422:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) == value2Ptr) {
		goto __3423
	}
	compare = MP_EQ
	goto convertComparison
__3423:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_LONG && *(*int32)(unsafe.Pointer(bp + 880)) == TCL_NUMBER_LONG) {
		goto __3424
	}
	l1 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 856))))
	l2 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 888))))
	if l1 < l2 {
		compare = -1
	} else {
		compare = func() int32 {
			if l1 > l2 {
				return MP_GT
			}
			return MP_EQ
		}()
	}
	goto __3425
__3424:
	compare = XTclCompareTwoNumbers(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), value2Ptr)
__3425:
	;

	// Turn comparison outcome into appropriate result for opcode.

convertComparison:
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_EQ:
		goto __3427
	case INST_NEQ:
		goto __3428
	case INST_LT:
		goto __3429
	case INST_GT:
		goto __3430
	case INST_LE:
		goto __3431
	case INST_GE:
		goto __3432
	}
	goto __3426
__3427:
	iResult1 = libc.Bool32(compare == MP_EQ)
	goto __3426
__3428:
	iResult1 = libc.Bool32(compare != MP_EQ)
	goto __3426
__3429:
	iResult1 = libc.Bool32(compare == -1)
	goto __3426
__3430:
	iResult1 = libc.Bool32(compare == MP_GT)
	goto __3426
__3431:
	iResult1 = libc.Bool32(compare != MP_GT)
	goto __3426
__3432:
	iResult1 = libc.Bool32(compare != -1)
	goto __3426
__3426:
	;

	// Peep-hole optimisation: if you're about to jump, do jump from here.

foundResult:
	;
__3433:
	pc += uintptr(1)
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_JUMP_FALSE1:
		goto __3437
	case INST_JUMP_TRUE1:
		goto __3438
	case INST_JUMP_FALSE4:
		goto __3439
	case INST_JUMP_TRUE4:
		goto __3440
	default:
		goto __3441
	}
	goto __3436
__3437:
__3442:
	;
	if !(2 == 0) {
		goto __3445
	}
	if !(0 != 0) {
		goto __3447
	}
	if !(0 > 0) {
		goto __3448
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3449
__3448:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3449:
	;
__3447:
	;
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	goto cleanup0
	goto __3446
__3445:
	if !(0 != 0) {
		goto __3450
	}
	if !(0 > 0) {
		goto __3452
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3452:
	;
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __3454
	case 2:
		goto __3455
	case 0:
		goto __3456
	}
	goto __3453
__3454:
	goto cleanup1_pushObjResultPtr
__3455:
	goto cleanup2_pushObjResultPtr
__3456:
	goto __3453
__3453:
	;
	goto __3451
__3450:
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 2 {
	case 1:
		goto __3458
	case 2:
		goto __3459
	case 0:
		goto __3460
	}
	goto __3457
__3458:
	goto cleanup1
__3459:
	goto cleanup2
__3460:
	goto __3457
__3457:
	;
__3451:
	;
__3446:
	;
	goto __3443
__3443:
	if 0 != 0 {
		goto __3442
	}
	goto __3444
__3444:
	;
	goto __3436
__3438:
__3461:
	;
	if !(2 == 0) {
		goto __3464
	}
	if !(0 != 0) {
		goto __3466
	}
	if !(0 > 0) {
		goto __3467
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3468
__3467:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3468:
	;
__3466:
	;
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	goto cleanup0
	goto __3465
__3464:
	if !(0 != 0) {
		goto __3469
	}
	if !(0 > 0) {
		goto __3471
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3471:
	;
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __3473
	case 2:
		goto __3474
	case 0:
		goto __3475
	}
	goto __3472
__3473:
	goto cleanup1_pushObjResultPtr
__3474:
	goto cleanup2_pushObjResultPtr
__3475:
	goto __3472
__3472:
	;
	goto __3470
__3469:
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 2 {
	case 1:
		goto __3477
	case 2:
		goto __3478
	case 0:
		goto __3479
	}
	goto __3476
__3477:
	goto cleanup1
__3478:
	goto cleanup2
__3479:
	goto __3476
__3476:
	;
__3470:
	;
__3465:
	;
	goto __3462
__3462:
	if 0 != 0 {
		goto __3461
	}
	goto __3463
__3463:
	;
	goto __3436
__3439:
__3480:
	;
	if !(2 == 0) {
		goto __3483
	}
	if !(0 != 0) {
		goto __3485
	}
	if !(0 > 0) {
		goto __3486
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3487
__3486:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3487:
	;
__3485:
	;
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	goto cleanup0
	goto __3484
__3483:
	if !(0 != 0) {
		goto __3488
	}
	if !(0 > 0) {
		goto __3490
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3490:
	;
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __3492
	case 2:
		goto __3493
	case 0:
		goto __3494
	}
	goto __3491
__3492:
	goto cleanup1_pushObjResultPtr
__3493:
	goto cleanup2_pushObjResultPtr
__3494:
	goto __3491
__3491:
	;
	goto __3489
__3488:
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 2 {
	case 1:
		goto __3496
	case 2:
		goto __3497
	case 0:
		goto __3498
	}
	goto __3495
__3496:
	goto cleanup1
__3497:
	goto cleanup2
__3498:
	goto __3495
__3495:
	;
__3489:
	;
__3484:
	;
	goto __3481
__3481:
	if 0 != 0 {
		goto __3480
	}
	goto __3482
__3482:
	;
	goto __3436
__3440:
__3499:
	;
	if !(2 == 0) {
		goto __3502
	}
	if !(0 != 0) {
		goto __3504
	}
	if !(0 > 0) {
		goto __3505
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3506
__3505:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3506:
	;
__3504:
	;
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	goto cleanup0
	goto __3503
__3502:
	if !(0 != 0) {
		goto __3507
	}
	if !(0 > 0) {
		goto __3509
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3509:
	;
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __3511
	case 2:
		goto __3512
	case 0:
		goto __3513
	}
	goto __3510
__3511:
	goto cleanup1_pushObjResultPtr
__3512:
	goto cleanup2_pushObjResultPtr
__3513:
	goto __3510
__3510:
	;
	goto __3508
__3507:
	pc += func() uintptr {
		if iResult1 != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 2 {
	case 1:
		goto __3515
	case 2:
		goto __3516
	case 0:
		goto __3517
	}
	goto __3514
__3515:
	goto cleanup1
__3516:
	goto cleanup2
__3517:
	goto __3514
__3514:
	;
__3508:
	;
__3503:
	;
	goto __3500
__3500:
	if 0 != 0 {
		goto __3499
	}
	goto __3501
__3501:
	;
	goto __3436
__3441:
	if !(iResult1 < 0) {
		goto __3518
	}
__3520:
	;
__3523:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __3526
	}
	XTclAllocateFreeObjects(tls)
__3526:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3524
__3524:
	if 0 != 0 {
		goto __3523
	}
	goto __3525
__3525:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __3521
__3521:
	if 0 != 0 {
		goto __3520
	}
	goto __3522
__3522:
	;
	goto __3519
__3518:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.Bool32(iResult1 > 0))*8))
__3519:
	;
__3527:
	;
	if !(2 == 0) {
		goto __3530
	}
	if !(1 != 0) {
		goto __3532
	}
	if !(1 > 0) {
		goto __3533
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3534
__3533:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3534:
	;
__3532:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __3531
__3530:
	if !(1 != 0) {
		goto __3535
	}
	if !(1 > 0) {
		goto __3537
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3537:
	;
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __3539
	case 2:
		goto __3540
	case 0:
		goto __3541
	}
	goto __3538
__3539:
	goto cleanup1_pushObjResultPtr
__3540:
	goto cleanup2_pushObjResultPtr
__3541:
	goto __3538
__3538:
	;
	goto __3536
__3535:
	pc += uintptr(0)
	switch 2 {
	case 1:
		goto __3543
	case 2:
		goto __3544
	case 0:
		goto __3545
	}
	goto __3542
__3543:
	goto cleanup1
__3544:
	goto cleanup2
__3545:
	goto __3542
__3542:
	;
__3536:
	;
__3531:
	;
	goto __3528
__3528:
	if 0 != 0 {
		goto __3527
	}
	goto __3529
__3529:
	;
	goto __3436
__3436:
	;
	goto __3434
__3434:
	if 0 != 0 {
		goto __3433
	}
	goto __3435
__3435:
	;

__282:
__283:
__284:
__285:
__286:
__287:
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944)), bp+856, bp+852)
				}()
			}()
		}()
	}() != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_DOUBLE || *(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_NAN) {
		goto __3546
	}

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	checkInterp = 1
	goto gotError
__3546:
	;

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 888)) = value2Ptr + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 888)) = value2Ptr + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(value2Ptr + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 888)) = value2Ptr + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), value2Ptr, bp+888, bp+880)
				}()
			}()
		}()
	}() != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp + 880)) == TCL_NUMBER_DOUBLE || *(*int32)(unsafe.Pointer(bp + 880)) == TCL_NUMBER_NAN) {
		goto __3547
	}

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, value2Ptr)
	checkInterp = 1
	goto gotError
__3547:
	;

	// Check for common, simple case.

	if !(*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_LONG && *(*int32)(unsafe.Pointer(bp + 880)) == TCL_NUMBER_LONG) {
		goto __3548
	}
	l1 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 856))))
	l2 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 888))))

	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_MOD:
		goto __3550

	case INST_RSHIFT:
		goto __3551

	case INST_LSHIFT:
		goto __3552

	case INST_BITAND:
		goto __3553
	case INST_BITOR:
		goto __3554
	case INST_BITXOR:
		goto __3555
	}
	goto __3549
__3550:
	if !(l2 == 0) {
		goto __3556
	}

	goto divideByZero
	goto __3557
__3556:
	if !(l2 == 1 || l2 == -1) {
		goto __3558
	}
	// Div. by |1| always yields remainder of 0.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants))

__3560:
	;
	if !(2 == 0) {
		goto __3563
	}
	if !(1 != 0) {
		goto __3565
	}
	if !(1 > 0) {
		goto __3566
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3567
__3566:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3567:
	;
__3565:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3564
__3563:
	if !(1 != 0) {
		goto __3568
	}
	if !(1 > 0) {
		goto __3570
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3570:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3572
	case 2:
		goto __3573
	case 0:
		goto __3574
	}
	goto __3571
__3572:
	goto cleanup1_pushObjResultPtr
__3573:
	goto cleanup2_pushObjResultPtr
__3574:
	goto __3571
__3571:
	;
	goto __3569
__3568:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3576
	case 2:
		goto __3577
	case 0:
		goto __3578
	}
	goto __3575
__3576:
	goto cleanup1
__3577:
	goto cleanup2
__3578:
	goto __3575
__3575:
	;
__3569:
	;
__3564:
	;
	goto __3561
__3561:
	if 0 != 0 {
		goto __3560
	}
	goto __3562
__3562:
	;
	goto __3559
__3558:
	if !(l1 == 0) {
		goto __3579
	}
	// 0 % (non-zero) always yields remainder of 0.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants))

__3581:
	;
	if !(2 == 0) {
		goto __3584
	}
	if !(1 != 0) {
		goto __3586
	}
	if !(1 > 0) {
		goto __3587
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3588
__3587:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3588:
	;
__3586:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3585
__3584:
	if !(1 != 0) {
		goto __3589
	}
	if !(1 > 0) {
		goto __3591
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3591:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3593
	case 2:
		goto __3594
	case 0:
		goto __3595
	}
	goto __3592
__3593:
	goto cleanup1_pushObjResultPtr
__3594:
	goto cleanup2_pushObjResultPtr
__3595:
	goto __3592
__3592:
	;
	goto __3590
__3589:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3597
	case 2:
		goto __3598
	case 0:
		goto __3599
	}
	goto __3596
__3597:
	goto cleanup1
__3598:
	goto cleanup2
__3599:
	goto __3596
__3596:
	;
__3590:
	;
__3585:
	;
	goto __3582
__3582:
	if 0 != 0 {
		goto __3581
	}
	goto __3583
__3583:
	;
	goto __3580
__3579:
	lResult = l1 / l2

	// Force Tcl's integer division rules.
	// TODO: examine for logic simplification

	if !((lResult < 0 || lResult == 0 && (l1 < 0 && l2 > 0 || l1 > 0 && l2 < 0)) && lResult*l2 != l1) {
		goto __3600
	}
	lResult = lResult - 1
__3600:
	;
	lResult = l1 - l2*lResult
	goto longResultOfArithmetic
__3580:
	;
__3559:
	;
__3557:
	;
	goto __3549

__3551:
	if !(l2 < 0) {
		goto __3601
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+29427, -1))
	goto gotError
	goto __3602
__3601:
	if !(l1 == 0) {
		goto __3603
	}

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants))

__3605:
	;
	if !(2 == 0) {
		goto __3608
	}
	if !(1 != 0) {
		goto __3610
	}
	if !(1 > 0) {
		goto __3611
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3612
__3611:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3612:
	;
__3610:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3609
__3608:
	if !(1 != 0) {
		goto __3613
	}
	if !(1 > 0) {
		goto __3615
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3615:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3617
	case 2:
		goto __3618
	case 0:
		goto __3619
	}
	goto __3616
__3617:
	goto cleanup1_pushObjResultPtr
__3618:
	goto cleanup2_pushObjResultPtr
__3619:
	goto __3616
__3616:
	;
	goto __3614
__3613:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3621
	case 2:
		goto __3622
	case 0:
		goto __3623
	}
	goto __3620
__3621:
	goto cleanup1
__3622:
	goto cleanup2
__3623:
	goto __3620
__3620:
	;
__3614:
	;
__3609:
	;
	goto __3606
__3606:
	if 0 != 0 {
		goto __3605
	}
	goto __3607
__3607:
	;
	goto __3604
__3603:
	// Quickly force large right shifts to 0 or -1.

	if !(l2 >= int32(uint64(8)*uint64(unsafe.Sizeof(int32(0))))) {
		goto __3624
	}
	// We assume that INT_MAX is much larger than the
	// number of bits in a long. This is a pretty safe
	// assumption, given that the former is usually around
	// 4e9 and the latter 32 or 64...

	if !(l1 > 0) {
		goto __3625
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants))
	goto __3626
__3625:
__3627:
	;
__3630:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __3633
	}
	XTclAllocateFreeObjects(tls)
__3633:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3631
__3631:
	if 0 != 0 {
		goto __3630
	}
	goto __3632
__3632:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __3628
__3628:
	if 0 != 0 {
		goto __3627
	}
	goto __3629
__3629:
	;
__3626:
	;

__3634:
	;
	if !(2 == 0) {
		goto __3637
	}
	if !(1 != 0) {
		goto __3639
	}
	if !(1 > 0) {
		goto __3640
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3641
__3640:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3641:
	;
__3639:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3638
__3637:
	if !(1 != 0) {
		goto __3642
	}
	if !(1 > 0) {
		goto __3644
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3644:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3646
	case 2:
		goto __3647
	case 0:
		goto __3648
	}
	goto __3645
__3646:
	goto cleanup1_pushObjResultPtr
__3647:
	goto cleanup2_pushObjResultPtr
__3648:
	goto __3645
__3645:
	;
	goto __3643
__3642:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3650
	case 2:
		goto __3651
	case 0:
		goto __3652
	}
	goto __3649
__3650:
	goto cleanup1
__3651:
	goto cleanup2
__3652:
	goto __3649
__3649:
	;
__3643:
	;
__3638:
	;
	goto __3635
__3635:
	if 0 != 0 {
		goto __3634
	}
	goto __3636
__3636:
	;
__3624:
	;

	// Handle shifts within the native long range.

	lResult = l1 >> int32(l2)
	goto longResultOfArithmetic
__3604:
	;
__3602:
	;
	goto __3549

__3552:
	if !(l2 < 0) {
		goto __3653
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+29427, -1))
	goto gotError
	goto __3654
__3653:
	if !(l1 == 0) {
		goto __3655
	}

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants))

__3657:
	;
	if !(2 == 0) {
		goto __3660
	}
	if !(1 != 0) {
		goto __3662
	}
	if !(1 > 0) {
		goto __3663
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3664
__3663:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3664:
	;
__3662:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3661
__3660:
	if !(1 != 0) {
		goto __3665
	}
	if !(1 > 0) {
		goto __3667
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3667:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3669
	case 2:
		goto __3670
	case 0:
		goto __3671
	}
	goto __3668
__3669:
	goto cleanup1_pushObjResultPtr
__3670:
	goto cleanup2_pushObjResultPtr
__3671:
	goto __3668
__3668:
	;
	goto __3666
__3665:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3673
	case 2:
		goto __3674
	case 0:
		goto __3675
	}
	goto __3672
__3673:
	goto cleanup1
__3674:
	goto cleanup2
__3675:
	goto __3672
__3672:
	;
__3666:
	;
__3661:
	;
	goto __3658
__3658:
	if 0 != 0 {
		goto __3657
	}
	goto __3659
__3659:
	;
	goto __3656
__3655:
	if !(l2 > 0x7fffffff) {
		goto __3676
	}
	// Technically, we could hold the value (1 << (INT_MAX+1))
	// in an mp_int, but since we're using mp_mul_2d() to do
	// the work, and it takes only an int argument, that's a
	// good place to draw the line.

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+11084, -1))
	goto gotError
	goto __3677
__3676:
	shift = int32(l2)

	// Handle shifts within the native long range.

	if !(Size_t(shift) < uint64(8)*uint64(unsafe.Sizeof(int32(0))) && l1 != 0 &&
		!(func() int32 {
			if l1 > 0 {
				return l1
			}
			return ^l1
		}()&-(int32(1)<<(uint64(8)*uint64(unsafe.Sizeof(int32(0)))-uint64(1)-uint64(shift))) != 0)) {
		goto __3678
	}
	lResult = l1 << shift
	goto longResultOfArithmetic
__3678:
	;
__3677:
	;
__3656:
	;
__3654:
	;

	// Too large; need to use the broken-out function.

	goto __3549

__3553:
	lResult = l1 & l2
	goto longResultOfArithmetic
__3554:
	lResult = l1 | l2
	goto longResultOfArithmetic
__3555:
	lResult = l1 ^ l2
longResultOfArithmetic:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __3679
	}
__3680:
	;
__3683:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __3686
	}
	XTclAllocateFreeObjects(tls)
__3686:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3684
__3684:
	if 0 != 0 {
		goto __3683
	}
	goto __3685
__3685:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = lResult
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __3681
__3681:
	if 0 != 0 {
		goto __3680
	}
	goto __3682
__3682:
	;

__3687:
	;
	if !(2 == 0) {
		goto __3690
	}
	if !(1 != 0) {
		goto __3692
	}
	if !(1 > 0) {
		goto __3693
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3694
__3693:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3694:
	;
__3692:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3691
__3690:
	if !(1 != 0) {
		goto __3695
	}
	if !(1 > 0) {
		goto __3697
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3697:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3699
	case 2:
		goto __3700
	case 0:
		goto __3701
	}
	goto __3698
__3699:
	goto cleanup1_pushObjResultPtr
__3700:
	goto cleanup2_pushObjResultPtr
__3701:
	goto __3698
__3698:
	;
	goto __3696
__3695:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3703
	case 2:
		goto __3704
	case 0:
		goto __3705
	}
	goto __3702
__3703:
	goto cleanup1
__3704:
	goto cleanup2
__3705:
	goto __3702
__3702:
	;
__3696:
	;
__3691:
	;
	goto __3688
__3688:
	if 0 != 0 {
		goto __3687
	}
	goto __3689
__3689:
	;
__3679:
	;
__3706:
__3709:
	_isobjPtr2 = *(*uintptr)(unsafe.Pointer(bp + 944))
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr2)).Fbytes != uintptr(0)) {
		goto __3712
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr2)).Fbytes != XtclEmptyStringRep) {
		goto __3713
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr2)).Fbytes)
__3713:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr2)).Fbytes = uintptr(0)
__3712:
	;
	goto __3710
__3710:
	if 0 != 0 {
		goto __3709
	}
	goto __3711
__3711:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr != uintptr(0)) {
		goto __3714
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __3715
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__3715:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr = uintptr(0)
__3714:
	;
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) = lResult
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	goto __3707
__3707:
	if 0 != 0 {
		goto __3706
	}
	goto __3708
__3708:
	;

__3716:
	;
	if !(1 == 0) {
		goto __3719
	}
	if !(0 != 0) {
		goto __3721
	}
	if !(0 > 0) {
		goto __3722
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3723
__3722:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3723:
	;
__3721:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3720
__3719:
	if !(0 != 0) {
		goto __3724
	}
	if !(0 > 0) {
		goto __3726
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3726:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3728
	case 2:
		goto __3729
	case 0:
		goto __3730
	}
	goto __3727
__3728:
	goto cleanup1_pushObjResultPtr
__3729:
	goto cleanup2_pushObjResultPtr
__3730:
	goto __3727
__3727:
	;
	goto __3725
__3724:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3732
	case 2:
		goto __3733
	case 0:
		goto __3734
	}
	goto __3731
__3732:
	goto cleanup1
__3733:
	goto cleanup2
__3734:
	goto __3731
__3731:
	;
__3725:
	;
__3720:
	;
	goto __3717
__3717:
	if 0 != 0 {
		goto __3716
	}
	goto __3718
__3718:
	;
__3549:
	;
__3548:
	;

	// DO NOT MERGE THIS WITH THE EQUIVALENT SECTION LATER! That would
	// encourage the compiler to inline ExecuteExtendedBinaryMathOp, which
	// is highly undesirable due to the overall impact on size.

	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = sExecuteExtendedBinaryMathOp(tls, interp, int32(*(*uint8)(unsafe.Pointer(pc))), constants,
		*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), value2Ptr)
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == libc.UintptrFromInt32(-1)) {
		goto __3735
	}

	goto divideByZero
	goto __3736
__3735:
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == libc.UintptrFromInt32(-3)) {
		goto __3737
	}

	goto gotError
	goto __3738
__3737:
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == uintptr(0)) {
		goto __3739
	}

__3741:
	;
	if !(1 == 0) {
		goto __3744
	}
	if !(0 != 0) {
		goto __3746
	}
	if !(0 > 0) {
		goto __3747
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3748
__3747:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3748:
	;
__3746:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3745
__3744:
	if !(0 != 0) {
		goto __3749
	}
	if !(0 > 0) {
		goto __3751
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3751:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3753
	case 2:
		goto __3754
	case 0:
		goto __3755
	}
	goto __3752
__3753:
	goto cleanup1_pushObjResultPtr
__3754:
	goto cleanup2_pushObjResultPtr
__3755:
	goto __3752
__3752:
	;
	goto __3750
__3749:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3757
	case 2:
		goto __3758
	case 0:
		goto __3759
	}
	goto __3756
__3757:
	goto cleanup1
__3758:
	goto cleanup2
__3759:
	goto __3756
__3756:
	;
__3750:
	;
__3745:
	;
	goto __3742
__3742:
	if 0 != 0 {
		goto __3741
	}
	goto __3743
__3743:
	;
	goto __3740
__3739:
	;
__3760:
	;
	if !(2 == 0) {
		goto __3763
	}
	if !(1 != 0) {
		goto __3765
	}
	if !(1 > 0) {
		goto __3766
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3767
__3766:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3767:
	;
__3765:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3764
__3763:
	if !(1 != 0) {
		goto __3768
	}
	if !(1 > 0) {
		goto __3770
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3770:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3772
	case 2:
		goto __3773
	case 0:
		goto __3774
	}
	goto __3771
__3772:
	goto cleanup1_pushObjResultPtr
__3773:
	goto cleanup2_pushObjResultPtr
__3774:
	goto __3771
__3771:
	;
	goto __3769
__3768:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3776
	case 2:
		goto __3777
	case 0:
		goto __3778
	}
	goto __3775
__3776:
	goto cleanup1
__3777:
	goto cleanup2
__3778:
	goto __3775
__3775:
	;
__3769:
	;
__3764:
	;
	goto __3761
__3761:
	if 0 != 0 {
		goto __3760
	}
	goto __3762
__3762:
	;
__3740:
	;
__3738:
	;
__3736:
	;

__288:
__289:
__290:
__291:
__292:
	value2Ptr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944)), bp+856, bp+852)
				}()
			}()
		}()
	}() != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_NAN) {
		goto __3779
	}

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	checkInterp = 1
	goto gotError
__3779:
	;

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 888)) = value2Ptr + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 888)) = value2Ptr + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(value2Ptr + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 888)) = value2Ptr + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 880)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), value2Ptr, bp+888, bp+880)
				}()
			}()
		}()
	}() != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp + 880)) == TCL_NUMBER_NAN) {
		goto __3780
	}

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, value2Ptr)
	checkInterp = 1
	goto gotError
__3780:
	;

	// Handle (long,long) arithmetic as best we can without going out to
	// an external function.

	if !(*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_LONG && *(*int32)(unsafe.Pointer(bp + 880)) == TCL_NUMBER_LONG) {
		goto __3781
	}

	l1 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 856))))
	l2 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 888))))

	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_ADD:
		goto __3783

	case INST_SUB:
		goto __3784

	case INST_DIV:
		goto __3785

	case INST_MULT:
		goto __3786
	}
	goto __3782
__3783:
	w11 = Tcl_WideInt(l1)
	w2 = Tcl_WideInt(l2)
	wResult = w11 + w2
	goto wideResultOfArithmetic

__3784:
	w11 = Tcl_WideInt(l1)
	w2 = Tcl_WideInt(l2)
	wResult = w11 - w2
wideResultOfArithmetic:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __3787
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewWideIntObj(tls, wResult)

__3788:
	;
	if !(2 == 0) {
		goto __3791
	}
	if !(1 != 0) {
		goto __3793
	}
	if !(1 > 0) {
		goto __3794
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3795
__3794:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3795:
	;
__3793:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3792
__3791:
	if !(1 != 0) {
		goto __3796
	}
	if !(1 > 0) {
		goto __3798
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3798:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3800
	case 2:
		goto __3801
	case 0:
		goto __3802
	}
	goto __3799
__3800:
	goto cleanup1_pushObjResultPtr
__3801:
	goto cleanup2_pushObjResultPtr
__3802:
	goto __3799
__3799:
	;
	goto __3797
__3796:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3804
	case 2:
		goto __3805
	case 0:
		goto __3806
	}
	goto __3803
__3804:
	goto cleanup1
__3805:
	goto cleanup2
__3806:
	goto __3803
__3803:
	;
__3797:
	;
__3792:
	;
	goto __3789
__3789:
	if 0 != 0 {
		goto __3788
	}
	goto __3790
__3790:
	;
__3787:
	;
	XTcl_SetWideIntObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), wResult)

__3807:
	;
	if !(1 == 0) {
		goto __3810
	}
	if !(0 != 0) {
		goto __3812
	}
	if !(0 > 0) {
		goto __3813
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3814
__3813:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3814:
	;
__3812:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3811
__3810:
	if !(0 != 0) {
		goto __3815
	}
	if !(0 > 0) {
		goto __3817
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3817:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3819
	case 2:
		goto __3820
	case 0:
		goto __3821
	}
	goto __3818
__3819:
	goto cleanup1_pushObjResultPtr
__3820:
	goto cleanup2_pushObjResultPtr
__3821:
	goto __3818
__3818:
	;
	goto __3816
__3815:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3823
	case 2:
		goto __3824
	case 0:
		goto __3825
	}
	goto __3822
__3823:
	goto cleanup1
__3824:
	goto cleanup2
__3825:
	goto __3822
__3822:
	;
__3816:
	;
__3811:
	;
	goto __3808
__3808:
	if 0 != 0 {
		goto __3807
	}
	goto __3809
__3809:
	;
	goto __3782

__3785:
	if !(l2 == 0) {
		goto __3826
	}

	goto divideByZero
	goto __3827
__3826:
	if !(l1 == -0x7fffffff-1 && l2 == -1) {
		goto __3828
	}
	// Can't represent (-LONG_MIN) as a long.

	goto overflow
__3828:
	;
__3827:
	;
	lResult = l1 / l2

	// Force Tcl's integer division rules.
	// TODO: examine for logic simplification

	if !((lResult < 0 || lResult == 0 && (l1 < 0 && l2 > 0 || l1 > 0 && l2 < 0)) && lResult*l2 != l1) {
		goto __3829
	}
	lResult = lResult - 1
__3829:
	;
	goto longResultOfArithmetic

__3786:
	if !(uint64(unsafe.Sizeof(int32(0))) >= uint64(2)*uint64(unsafe.Sizeof(int32(0))) &&
		l1 <= 0x7fffffff && l1 >= -0x7fffffff-1 &&
		l2 <= 0x7fffffff && l2 >= -0x7fffffff-1 ||
		uint64(unsafe.Sizeof(int32(0))) >= uint64(2)*uint64(unsafe.Sizeof(int16(0))) &&
			l1 <= 0x7fff && l1 >= -0x7fff-1 &&
			l2 <= 0x7fff && l2 >= -0x7fff-1) {
		goto __3830
	}
	lResult = l1 * l2
	goto longResultOfArithmetic
__3830:
	;
__3782:
	;

	// Fall through with INST_EXPON, INST_DIV and large multiplies.
__3781:
	;

overflow:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = sExecuteExtendedBinaryMathOp(tls, interp, int32(*(*uint8)(unsafe.Pointer(pc))), constants,
		*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), value2Ptr)
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == libc.UintptrFromInt32(-1)) {
		goto __3831
	}

	goto divideByZero
	goto __3832
__3831:
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == libc.UintptrFromInt32(-2)) {
		goto __3833
	}

	goto exponOfZero
	goto __3834
__3833:
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == libc.UintptrFromInt32(-3)) {
		goto __3835
	}

	goto gotError
	goto __3836
__3835:
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == uintptr(0)) {
		goto __3837
	}

__3839:
	;
	if !(1 == 0) {
		goto __3842
	}
	if !(0 != 0) {
		goto __3844
	}
	if !(0 > 0) {
		goto __3845
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3846
__3845:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3846:
	;
__3844:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3843
__3842:
	if !(0 != 0) {
		goto __3847
	}
	if !(0 > 0) {
		goto __3849
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3849:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3851
	case 2:
		goto __3852
	case 0:
		goto __3853
	}
	goto __3850
__3851:
	goto cleanup1_pushObjResultPtr
__3852:
	goto cleanup2_pushObjResultPtr
__3853:
	goto __3850
__3850:
	;
	goto __3848
__3847:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3855
	case 2:
		goto __3856
	case 0:
		goto __3857
	}
	goto __3854
__3855:
	goto cleanup1
__3856:
	goto cleanup2
__3857:
	goto __3854
__3854:
	;
__3848:
	;
__3843:
	;
	goto __3840
__3840:
	if 0 != 0 {
		goto __3839
	}
	goto __3841
__3841:
	;
	goto __3838
__3837:
	;
__3858:
	;
	if !(2 == 0) {
		goto __3861
	}
	if !(1 != 0) {
		goto __3863
	}
	if !(1 > 0) {
		goto __3864
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3865
__3864:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3865:
	;
__3863:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3862
__3861:
	if !(1 != 0) {
		goto __3866
	}
	if !(1 > 0) {
		goto __3868
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3868:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3870
	case 2:
		goto __3871
	case 0:
		goto __3872
	}
	goto __3869
__3870:
	goto cleanup1_pushObjResultPtr
__3871:
	goto cleanup2_pushObjResultPtr
__3872:
	goto __3869
__3869:
	;
	goto __3867
__3866:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __3874
	case 2:
		goto __3875
	case 0:
		goto __3876
	}
	goto __3873
__3874:
	goto cleanup1
__3875:
	goto cleanup2
__3876:
	goto __3873
__3873:
	;
__3867:
	;
__3862:
	;
	goto __3859
__3859:
	if 0 != 0 {
		goto __3858
	}
	goto __3860
__3860:
	;
__3838:
	;
__3836:
	;
__3834:
	;
__3832:
	;

__293:

	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

	// TODO - check claim that taking address of b harms performance
	// TODO - consider optimization search for constants
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) || (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclBooleanType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 896)) = libc.Bool32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) != 0)
				return TCL_OK
			}()
		}
		return XTcl_GetBooleanFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944)), bp+896)
	}() != TCL_OK) {
		goto __3877
	}

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	checkInterp = 1
	goto gotError
__3877:
	;
	// TODO: Consider peephole opt.
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.BoolInt32(!(*(*int32)(unsafe.Pointer(bp + 896)) != 0)))*8))

__3878:
	;
	if !(1 == 0) {
		goto __3881
	}
	if !(1 != 0) {
		goto __3883
	}
	if !(1 > 0) {
		goto __3884
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3885
__3884:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3885:
	;
__3883:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3882
__3881:
	if !(1 != 0) {
		goto __3886
	}
	if !(1 > 0) {
		goto __3888
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3888:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3890
	case 2:
		goto __3891
	case 0:
		goto __3892
	}
	goto __3889
__3890:
	goto cleanup1_pushObjResultPtr
__3891:
	goto cleanup2_pushObjResultPtr
__3892:
	goto __3889
__3889:
	;
	goto __3887
__3886:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3894
	case 2:
		goto __3895
	case 0:
		goto __3896
	}
	goto __3893
__3894:
	goto cleanup1
__3895:
	goto cleanup2
__3896:
	goto __3893
__3893:
	;
__3887:
	;
__3882:
	;
	goto __3879
__3879:
	if 0 != 0 {
		goto __3878
	}
	goto __3880
__3880:
	;

__294:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944)), bp+856, bp+852)
				}()
			}()
		}()
	}() != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_NAN || *(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_DOUBLE) {
		goto __3897
	}
	// ... ~$NonInteger => raise an error.

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	checkInterp = 1
	goto gotError
__3897:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_LONG) {
		goto __3898
	}
	l1 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 856))))
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __3899
	}
__3900:
	;
__3903:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __3906
	}
	XTclAllocateFreeObjects(tls)
__3906:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3904
__3904:
	if 0 != 0 {
		goto __3903
	}
	goto __3905
__3905:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = ^l1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __3901
__3901:
	if 0 != 0 {
		goto __3900
	}
	goto __3902
__3902:
	;

__3907:
	;
	if !(1 == 0) {
		goto __3910
	}
	if !(1 != 0) {
		goto __3912
	}
	if !(1 > 0) {
		goto __3913
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3914
__3913:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3914:
	;
__3912:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3911
__3910:
	if !(1 != 0) {
		goto __3915
	}
	if !(1 > 0) {
		goto __3917
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3917:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3919
	case 2:
		goto __3920
	case 0:
		goto __3921
	}
	goto __3918
__3919:
	goto cleanup1_pushObjResultPtr
__3920:
	goto cleanup2_pushObjResultPtr
__3921:
	goto __3918
__3918:
	;
	goto __3916
__3915:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3923
	case 2:
		goto __3924
	case 0:
		goto __3925
	}
	goto __3922
__3923:
	goto cleanup1
__3924:
	goto cleanup2
__3925:
	goto __3922
__3922:
	;
__3916:
	;
__3911:
	;
	goto __3908
__3908:
	if 0 != 0 {
		goto __3907
	}
	goto __3909
__3909:
	;
__3899:
	;
__3926:
__3929:
	_isobjPtr3 = *(*uintptr)(unsafe.Pointer(bp + 944))
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr3)).Fbytes != uintptr(0)) {
		goto __3932
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr3)).Fbytes != XtclEmptyStringRep) {
		goto __3933
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr3)).Fbytes)
__3933:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr3)).Fbytes = uintptr(0)
__3932:
	;
	goto __3930
__3930:
	if 0 != 0 {
		goto __3929
	}
	goto __3931
__3931:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr != uintptr(0)) {
		goto __3934
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __3935
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__3935:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr = uintptr(0)
__3934:
	;
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) = ^l1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	goto __3927
__3927:
	if 0 != 0 {
		goto __3926
	}
	goto __3928
__3928:
	;

__3936:
	;
	if !(0 == 0) {
		goto __3939
	}
	if !(0 != 0) {
		goto __3941
	}
	if !(0 > 0) {
		goto __3942
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3943
__3942:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3943:
	;
__3941:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3940
__3939:
	if !(0 != 0) {
		goto __3944
	}
	if !(0 > 0) {
		goto __3946
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3946:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __3948
	case 2:
		goto __3949
	case 0:
		goto __3950
	}
	goto __3947
__3948:
	goto cleanup1_pushObjResultPtr
__3949:
	goto cleanup2_pushObjResultPtr
__3950:
	goto __3947
__3947:
	;
	goto __3945
__3944:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __3952
	case 2:
		goto __3953
	case 0:
		goto __3954
	}
	goto __3951
__3952:
	goto cleanup1
__3953:
	goto cleanup2
__3954:
	goto __3951
__3951:
	;
__3945:
	;
__3940:
	;
	goto __3937
__3937:
	if 0 != 0 {
		goto __3936
	}
	goto __3938
__3938:
	;
__3898:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = sExecuteExtendedUnaryMathOp(tls, int32(*(*uint8)(unsafe.Pointer(pc))), *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) != uintptr(0)) {
		goto __3955
	}

__3957:
	;
	if !(1 == 0) {
		goto __3960
	}
	if !(1 != 0) {
		goto __3962
	}
	if !(1 > 0) {
		goto __3963
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3964
__3963:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3964:
	;
__3962:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3961
__3960:
	if !(1 != 0) {
		goto __3965
	}
	if !(1 > 0) {
		goto __3967
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3967:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3969
	case 2:
		goto __3970
	case 0:
		goto __3971
	}
	goto __3968
__3969:
	goto cleanup1_pushObjResultPtr
__3970:
	goto cleanup2_pushObjResultPtr
__3971:
	goto __3968
__3968:
	;
	goto __3966
__3965:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __3973
	case 2:
		goto __3974
	case 0:
		goto __3975
	}
	goto __3972
__3973:
	goto cleanup1
__3974:
	goto cleanup2
__3975:
	goto __3972
__3972:
	;
__3966:
	;
__3961:
	;
	goto __3958
__3958:
	if 0 != 0 {
		goto __3957
	}
	goto __3959
__3959:
	;
	goto __3956
__3955:
	;
__3976:
	;
	if !(0 == 0) {
		goto __3979
	}
	if !(0 != 0) {
		goto __3981
	}
	if !(0 > 0) {
		goto __3982
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __3983
__3982:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__3983:
	;
__3981:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __3980
__3979:
	if !(0 != 0) {
		goto __3984
	}
	if !(0 > 0) {
		goto __3986
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__3986:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __3988
	case 2:
		goto __3989
	case 0:
		goto __3990
	}
	goto __3987
__3988:
	goto cleanup1_pushObjResultPtr
__3989:
	goto cleanup2_pushObjResultPtr
__3990:
	goto __3987
__3987:
	;
	goto __3985
__3984:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __3992
	case 2:
		goto __3993
	case 0:
		goto __3994
	}
	goto __3991
__3992:
	goto cleanup1
__3993:
	goto cleanup2
__3994:
	goto __3991
__3991:
	;
__3985:
	;
__3980:
	;
	goto __3977
__3977:
	if 0 != 0 {
		goto __3976
	}
	goto __3978
__3978:
	;
__3956:
	;

__295:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944)), bp+856, bp+852)
				}()
			}()
		}()
	}() != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_NAN) {
		goto __3995
	}

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	checkInterp = 1
	goto gotError
__3995:
	;
	switch *(*int32)(unsafe.Pointer(bp + 852 /* type11 */)) {
	case TCL_NUMBER_NAN:
		goto __3997
	case TCL_NUMBER_LONG:
		goto __3998
	}
	goto __3996
__3997:
	// -NaN => NaN
	;
__3999:
	;
	if !(0 == 0) {
		goto __4002
	}
	if !(0 != 0) {
		goto __4004
	}
	if !(0 > 0) {
		goto __4005
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4006
__4005:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4006:
	;
__4004:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4003
__4002:
	if !(0 != 0) {
		goto __4007
	}
	if !(0 > 0) {
		goto __4009
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4009:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4011
	case 2:
		goto __4012
	case 0:
		goto __4013
	}
	goto __4010
__4011:
	goto cleanup1_pushObjResultPtr
__4012:
	goto cleanup2_pushObjResultPtr
__4013:
	goto __4010
__4010:
	;
	goto __4008
__4007:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4015
	case 2:
		goto __4016
	case 0:
		goto __4017
	}
	goto __4014
__4015:
	goto cleanup1
__4016:
	goto cleanup2
__4017:
	goto __4014
__4014:
	;
__4008:
	;
__4003:
	;
	goto __4000
__4000:
	if 0 != 0 {
		goto __3999
	}
	goto __4001
__4001:
	;
	goto __3996
__3998:
	l1 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 856))))
	if !(l1 != -0x7fffffff-1) {
		goto __4018
	}
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __4019
	}
__4020:
	;
__4023:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4026
	}
	XTclAllocateFreeObjects(tls)
__4026:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4024
__4024:
	if 0 != 0 {
		goto __4023
	}
	goto __4025
__4025:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -l1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __4021
__4021:
	if 0 != 0 {
		goto __4020
	}
	goto __4022
__4022:
	;

__4027:
	;
	if !(1 == 0) {
		goto __4030
	}
	if !(1 != 0) {
		goto __4032
	}
	if !(1 > 0) {
		goto __4033
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4034
__4033:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4034:
	;
__4032:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4031
__4030:
	if !(1 != 0) {
		goto __4035
	}
	if !(1 > 0) {
		goto __4037
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4037:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4039
	case 2:
		goto __4040
	case 0:
		goto __4041
	}
	goto __4038
__4039:
	goto cleanup1_pushObjResultPtr
__4040:
	goto cleanup2_pushObjResultPtr
__4041:
	goto __4038
__4038:
	;
	goto __4036
__4035:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4043
	case 2:
		goto __4044
	case 0:
		goto __4045
	}
	goto __4042
__4043:
	goto cleanup1
__4044:
	goto cleanup2
__4045:
	goto __4042
__4042:
	;
__4036:
	;
__4031:
	;
	goto __4028
__4028:
	if 0 != 0 {
		goto __4027
	}
	goto __4029
__4029:
	;
__4019:
	;
__4046:
__4049:
	_isobjPtr4 = *(*uintptr)(unsafe.Pointer(bp + 944))
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr4)).Fbytes != uintptr(0)) {
		goto __4052
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr4)).Fbytes != XtclEmptyStringRep) {
		goto __4053
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr4)).Fbytes)
__4053:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr4)).Fbytes = uintptr(0)
__4052:
	;
	goto __4050
__4050:
	if 0 != 0 {
		goto __4049
	}
	goto __4051
__4051:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr != uintptr(0)) {
		goto __4054
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __4055
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__4055:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr = uintptr(0)
__4054:
	;
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) = -l1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	goto __4047
__4047:
	if 0 != 0 {
		goto __4046
	}
	goto __4048
__4048:
	;

__4056:
	;
	if !(0 == 0) {
		goto __4059
	}
	if !(0 != 0) {
		goto __4061
	}
	if !(0 > 0) {
		goto __4062
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4063
__4062:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4063:
	;
__4061:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4060
__4059:
	if !(0 != 0) {
		goto __4064
	}
	if !(0 > 0) {
		goto __4066
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4066:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4068
	case 2:
		goto __4069
	case 0:
		goto __4070
	}
	goto __4067
__4068:
	goto cleanup1_pushObjResultPtr
__4069:
	goto cleanup2_pushObjResultPtr
__4070:
	goto __4067
__4067:
	;
	goto __4065
__4064:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4072
	case 2:
		goto __4073
	case 0:
		goto __4074
	}
	goto __4071
__4072:
	goto cleanup1
__4073:
	goto cleanup2
__4074:
	goto __4071
__4071:
	;
__4065:
	;
__4060:
	;
	goto __4057
__4057:
	if 0 != 0 {
		goto __4056
	}
	goto __4058
__4058:
	;
__4018:
	;
	// FALLTHROUGH
__3996:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = sExecuteExtendedUnaryMathOp(tls, int32(*(*uint8)(unsafe.Pointer(pc))), *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) != uintptr(0)) {
		goto __4075
	}

__4077:
	;
	if !(1 == 0) {
		goto __4080
	}
	if !(1 != 0) {
		goto __4082
	}
	if !(1 > 0) {
		goto __4083
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4084
__4083:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4084:
	;
__4082:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4081
__4080:
	if !(1 != 0) {
		goto __4085
	}
	if !(1 > 0) {
		goto __4087
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4087:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4089
	case 2:
		goto __4090
	case 0:
		goto __4091
	}
	goto __4088
__4089:
	goto cleanup1_pushObjResultPtr
__4090:
	goto cleanup2_pushObjResultPtr
__4091:
	goto __4088
__4088:
	;
	goto __4086
__4085:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4093
	case 2:
		goto __4094
	case 0:
		goto __4095
	}
	goto __4092
__4093:
	goto cleanup1
__4094:
	goto cleanup2
__4095:
	goto __4092
__4092:
	;
__4086:
	;
__4081:
	;
	goto __4078
__4078:
	if 0 != 0 {
		goto __4077
	}
	goto __4079
__4079:
	;
	goto __4076
__4075:
	;
__4096:
	;
	if !(0 == 0) {
		goto __4099
	}
	if !(0 != 0) {
		goto __4101
	}
	if !(0 > 0) {
		goto __4102
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4103
__4102:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4103:
	;
__4101:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4100
__4099:
	if !(0 != 0) {
		goto __4104
	}
	if !(0 > 0) {
		goto __4106
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4106:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4108
	case 2:
		goto __4109
	case 0:
		goto __4110
	}
	goto __4107
__4108:
	goto cleanup1_pushObjResultPtr
__4109:
	goto cleanup2_pushObjResultPtr
__4110:
	goto __4107
__4107:
	;
	goto __4105
__4104:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4112
	case 2:
		goto __4113
	case 0:
		goto __4114
	}
	goto __4111
__4112:
	goto cleanup1
__4113:
	goto cleanup2
__4114:
	goto __4111
__4111:
	;
__4105:
	;
__4100:
	;
	goto __4097
__4097:
	if 0 != 0 {
		goto __4096
	}
	goto __4098
__4098:
	;
__4076:
	;

__296:
__297:
	// Try to convert the topmost stack object to numeric object. This is
	// done in order to support [expr]'s policy of interpreting operands
	// if at all possible as numbers first, then strings.

	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 856)) = *(*uintptr)(unsafe.Pointer(bp + 944)) + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 852)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944)), bp+856, bp+852)
				}()
			}()
		}()
	}() != TCL_OK) {
		goto __4115
	}
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_UPLUS) {
		goto __4116
	}
	// ... +$NonNumeric => raise an error.

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	checkInterp = 1
	goto gotError
__4116:
	;

	// ... TryConvertToNumeric($NonNumeric) is acceptable

__4117:
	;
	if !(0 == 0) {
		goto __4120
	}
	if !(0 != 0) {
		goto __4122
	}
	if !(0 > 0) {
		goto __4123
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4124
__4123:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4124:
	;
__4122:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4121
__4120:
	if !(0 != 0) {
		goto __4125
	}
	if !(0 > 0) {
		goto __4127
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4127:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4129
	case 2:
		goto __4130
	case 0:
		goto __4131
	}
	goto __4128
__4129:
	goto cleanup1_pushObjResultPtr
__4130:
	goto cleanup2_pushObjResultPtr
__4131:
	goto __4128
__4128:
	;
	goto __4126
__4125:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4133
	case 2:
		goto __4134
	case 0:
		goto __4135
	}
	goto __4132
__4133:
	goto cleanup1
__4134:
	goto cleanup2
__4135:
	goto __4132
__4132:
	;
__4126:
	;
__4121:
	;
	goto __4118
__4118:
	if 0 != 0 {
		goto __4117
	}
	goto __4119
__4119:
	;
__4115:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 852)) == TCL_NUMBER_NAN) {
		goto __4136
	}
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_UPLUS) {
		goto __4137
	}
	// ... +$NonNumeric => raise an error.

	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	sIllegalExprOperandType(tls, interp, pc, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	checkInterp = 1
	goto __4138
__4137:
	// Numeric conversion of NaN -> error.

	;
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTclExprFloatError(tls, interp, *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 856)))))
	checkInterp = 1
__4138:
	;
	goto gotError
__4136:
	;

	// Ensure that the numeric value has a string rep the same as the
	// formatted version of its internal rep. This is used, e.g., to make
	// sure that "expr {0001}" yields "1", not "0001". We implement this
	// by _discarding_ the string rep since we know it will be
	// regenerated, if needed later, by formatting the internal rep's
	// value.

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes == uintptr(0)) {
		goto __4139
	}

__4140:
	;
	if !(0 == 0) {
		goto __4143
	}
	if !(0 != 0) {
		goto __4145
	}
	if !(0 > 0) {
		goto __4146
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4147
__4146:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4147:
	;
__4145:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4144
__4143:
	if !(0 != 0) {
		goto __4148
	}
	if !(0 > 0) {
		goto __4150
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4150:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4152
	case 2:
		goto __4153
	case 0:
		goto __4154
	}
	goto __4151
__4152:
	goto cleanup1_pushObjResultPtr
__4153:
	goto cleanup2_pushObjResultPtr
__4154:
	goto __4151
__4151:
	;
	goto __4149
__4148:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4156
	case 2:
		goto __4157
	case 0:
		goto __4158
	}
	goto __4155
__4156:
	goto cleanup1
__4157:
	goto cleanup2
__4158:
	goto __4155
__4155:
	;
__4149:
	;
__4144:
	;
	goto __4141
__4141:
	if 0 != 0 {
		goto __4140
	}
	goto __4142
__4142:
	;
__4139:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __4159
	}
	// Here we do some surgery within the Tcl_Obj internals. We want
	// to copy the internalrep, but not the string, so we temporarily hide
	// the string so we do not copy it.

	savedString = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).Fbytes

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).Fbytes = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).Fbytes = savedString

__4160:
	;
	if !(1 == 0) {
		goto __4163
	}
	if !(1 != 0) {
		goto __4165
	}
	if !(1 > 0) {
		goto __4166
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4167
__4166:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4167:
	;
__4165:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4164
__4163:
	if !(1 != 0) {
		goto __4168
	}
	if !(1 > 0) {
		goto __4170
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4170:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4172
	case 2:
		goto __4173
	case 0:
		goto __4174
	}
	goto __4171
__4172:
	goto cleanup1_pushObjResultPtr
__4173:
	goto cleanup2_pushObjResultPtr
__4174:
	goto __4171
__4171:
	;
	goto __4169
__4168:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4176
	case 2:
		goto __4177
	case 0:
		goto __4178
	}
	goto __4175
__4176:
	goto cleanup1
__4177:
	goto cleanup2
__4178:
	goto __4175
__4175:
	;
__4169:
	;
__4164:
	;
	goto __4161
__4161:
	if 0 != 0 {
		goto __4160
	}
	goto __4162
__4162:
	;
__4159:
	;
__4179:
	_isobjPtr5 = *(*uintptr)(unsafe.Pointer(bp + 944))
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr5)).Fbytes != uintptr(0)) {
		goto __4182
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr5)).Fbytes != XtclEmptyStringRep) {
		goto __4183
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr5)).Fbytes)
__4183:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr5)).Fbytes = uintptr(0)
__4182:
	;
	goto __4180
__4180:
	if 0 != 0 {
		goto __4179
	}
	goto __4181
__4181:
	;

__4184:
	;
	if !(0 == 0) {
		goto __4187
	}
	if !(0 != 0) {
		goto __4189
	}
	if !(0 > 0) {
		goto __4190
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4191
__4190:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4191:
	;
__4189:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4188
__4187:
	if !(0 != 0) {
		goto __4192
	}
	if !(0 > 0) {
		goto __4194
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4194:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4196
	case 2:
		goto __4197
	case 0:
		goto __4198
	}
	goto __4195
__4196:
	goto cleanup1_pushObjResultPtr
__4197:
	goto cleanup2_pushObjResultPtr
__4198:
	goto __4195
__4195:
	;
	goto __4193
__4192:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4200
	case 2:
		goto __4201
	case 0:
		goto __4202
	}
	goto __4199
__4200:
	goto cleanup1
__4201:
	goto cleanup2
__4202:
	goto __4199
__4199:
	;
__4193:
	;
__4188:
	;
	goto __4185
__4185:
	if 0 != 0 {
		goto __4184
	}
	goto __4186
__4186:
	;

	goto __141

	//	   End of numeric operator instructions.
	// -----------------------------------------------------------------

__298:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(tosPtr))
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr == uintptr(unsafe.Pointer(&XtclBooleanType))) {
		goto __4203
	}
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + 1*8))
	goto __4204
__4203:
	res = libc.Bool32(XTclSetBooleanFromAny(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 944))) == TCL_OK)
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(res)*8))
__4204:
	;

__4205:
	;
	if !(0 == 0) {
		goto __4208
	}
	if !(1 != 0) {
		goto __4210
	}
	if !(1 > 0) {
		goto __4211
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4212
__4211:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4212:
	;
__4210:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4209
__4208:
	if !(1 != 0) {
		goto __4213
	}
	if !(1 > 0) {
		goto __4215
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4215:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4217
	case 2:
		goto __4218
	case 0:
		goto __4219
	}
	goto __4216
__4217:
	goto cleanup1_pushObjResultPtr
__4218:
	goto cleanup2_pushObjResultPtr
__4219:
	goto __4216
__4216:
	;
	goto __4214
__4213:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4221
	case 2:
		goto __4222
	case 0:
		goto __4223
	}
	goto __4220
__4221:
	goto cleanup1
__4222:
	goto cleanup2
__4223:
	goto __4220
__4220:
	;
__4214:
	;
__4209:
	;
	goto __4206
__4206:
	if 0 != 0 {
		goto __4205
	}
	goto __4207
__4207:
	;
	goto __141

__299:
	//
	// 	DECACHE_STACK_INFO();
	// 	Tcl_ResetResult(interp);
	// 	CACHE_STACK_INFO();
	//
	result = TCL_BREAK
	cleanup = 0

	goto processExceptionReturn

__300:
	//
	// 	DECACHE_STACK_INFO();
	// 	Tcl_ResetResult(interp);
	// 	CACHE_STACK_INFO();
	//
	result = TCL_CONTINUE
	cleanup = 0

	goto processExceptionReturn

__301: // DEPRECATED
	// Initialize the temporary local var that holds the count of the
	// number of iterations of the loop body to -1.

	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	infoPtr = (*AuxData)(unsafe.Pointer((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FauxDataArrayPtr + uintptr(opnd)*16)).FclientData
	iterTmpIndex = (*ForeachInfo)(unsafe.Pointer(infoPtr)).FloopCtTemp
	iterVarPtr = compiledLocals + uintptr(iterTmpIndex)*16
	oldValuePtr = *(*uintptr)(unsafe.Pointer(iterVarPtr + 8))

	if !(oldValuePtr == uintptr(0)) {
		goto __4224
	}
__4226:
	;
__4229:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4232
	}
	XTclAllocateFreeObjects(tls)
__4232:
	;
	*(*uintptr)(unsafe.Pointer(iterVarPtr + 8)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4230
__4230:
	if 0 != 0 {
		goto __4229
	}
	goto __4231
__4231:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(iterVarPtr + 8)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(iterVarPtr + 8)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(iterVarPtr + 8)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(iterVarPtr + 8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __4227
__4227:
	if 0 != 0 {
		goto __4226
	}
	goto __4228
__4228:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(iterVarPtr + 8)))).FrefCount++
	goto __4225
__4224:
__4233:
__4236:
	_isobjPtr6 = oldValuePtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr6)).Fbytes != uintptr(0)) {
		goto __4239
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr6)).Fbytes != XtclEmptyStringRep) {
		goto __4240
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr6)).Fbytes)
__4240:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr6)).Fbytes = uintptr(0)
__4239:
	;
	goto __4237
__4237:
	if 0 != 0 {
		goto __4236
	}
	goto __4238
__4238:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr != uintptr(0)) {
		goto __4241
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __4242
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr)).FfreeIntRepProc})).f(tls, oldValuePtr)
__4242:
	;
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr = uintptr(0)
__4241:
	;
	*(*int32)(unsafe.Pointer(oldValuePtr + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	goto __4234
__4234:
	if 0 != 0 {
		goto __4233
	}
	goto __4235
__4235:
	;
__4225:
	;

	// Remark that the compiler ALWAYS sets INST_FOREACH_STEP4 immediately
	// after INST_FOREACH_START4 - let us just fall through instead of
	// jumping back to the top.

	pc += uintptr(5)
__4243:
	if !(0 != 0) {
		goto __4246
	}
	if !(curInstName != 0) {
		goto __4248
	}

__4248:
	;
	curInstName = XtclInstructionTable[*(*uint8)(unsafe.Pointer(pc))].Fname
	if !(0 != 0) {
		goto __4249
	}

__4249:
	;
	goto __4247
__4246:
	if !(0 != 0) {
		goto __4250
	}

__4250:
	;
__4247:
	;
	goto __4244
__4244:
	if 0 != 0 {
		goto __4243
	}
	goto __4245
__4245:
	;

__302: // DEPRECATED
	// "Step" a foreach loop (i.e., begin its next iteration) by assigning
	// the next value list element to each loop var.

	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))

	infoPtr = (*AuxData)(unsafe.Pointer((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FauxDataArrayPtr + uintptr(opnd)*16)).FclientData
	numLists = (*ForeachInfo)(unsafe.Pointer(infoPtr)).FnumLists

	// Increment the temp holding the loop iteration number.

	iterVarPtr = compiledLocals + uintptr((*ForeachInfo)(unsafe.Pointer(infoPtr)).FloopCtTemp)*16
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(iterVarPtr + 8))
	iterNum = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) + 1)
__4251:
__4254:
	_isobjPtr7 = *(*uintptr)(unsafe.Pointer(bp + 944))
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr7)).Fbytes != uintptr(0)) {
		goto __4257
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr7)).Fbytes != XtclEmptyStringRep) {
		goto __4258
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr7)).Fbytes)
__4258:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr7)).Fbytes = uintptr(0)
__4257:
	;
	goto __4255
__4255:
	if 0 != 0 {
		goto __4254
	}
	goto __4256
__4256:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr != uintptr(0)) {
		goto __4259
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __4260
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__4260:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))).FtypePtr = uintptr(0)
__4259:
	;
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) = int32(iterNum)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	goto __4252
__4252:
	if 0 != 0 {
		goto __4251
	}
	goto __4253
__4253:
	;

	// Check whether all value lists are exhausted and we should stop the
	// loop.

	continueLoop = 0
	listTmpIndex = (*ForeachInfo)(unsafe.Pointer(infoPtr)).FfirstValueTemp
	i7 = 0
__4261:
	if !(i7 < int32(numLists)) {
		goto __4263
	}
	varListPtr = *(*uintptr)(unsafe.Pointer(infoPtr + 16 + uintptr(i7)*8))
	numVars = (*ForeachVarList)(unsafe.Pointer(varListPtr)).FnumVars

	listVarPtr = compiledLocals + uintptr(listTmpIndex)*16
	listPtr1 = *(*uintptr)(unsafe.Pointer(listVarPtr + 8))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(listPtr1)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 900)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listPtr1 + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, listPtr1, bp+900)
	}() != TCL_OK) {
		goto __4264
	}

	goto gotError
__4264:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 900)) > iterNum*numVars) {
		goto __4265
	}
	continueLoop = 1
__4265:
	;
	listTmpIndex++
	goto __4262
__4262:
	i7++
	goto __4261
	goto __4263
__4263:
	;

	// If some var in some var list still has a remaining list element
	// iterate one more time. Assign to var the next element from its
	// value list. We already checked above that each list temp holds a
	// valid list object (by calling Tcl_ListObjLength), but cannot rely
	// on that check remaining valid: one list could have been shimmered
	// as a side effect of setting a traced variable.

	if !(continueLoop != 0) {
		goto __4266
	}
	listTmpIndex = (*ForeachInfo)(unsafe.Pointer(infoPtr)).FfirstValueTemp
	i7 = 0
__4267:
	if !(i7 < int32(numLists)) {
		goto __4269
	}
	varListPtr = *(*uintptr)(unsafe.Pointer(infoPtr + 16 + uintptr(i7)*8))
	numVars = (*ForeachVarList)(unsafe.Pointer(varListPtr)).FnumVars

	listVarPtr = compiledLocals + uintptr(listTmpIndex)*16
	listPtr1 = XTclListObjCopy(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(listVarPtr + 8)))
	if (*Tcl_Obj)(unsafe.Pointer(listPtr1)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 904)) = *(*uintptr)(unsafe.Pointer(listPtr1 + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 900)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listPtr1 + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, interp, listPtr1, bp+900, bp+904)
	}

	valIndex = iterNum * numVars
	j = 0
__4270:
	if !(j < numVars) {
		goto __4272
	}
	if !(valIndex >= *(*int32)(unsafe.Pointer(bp + 900))) {
		goto __4273
	}
__4275:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4278
	}
	XTclAllocateFreeObjects(tls)
__4278:
	;
	*(*uintptr)(unsafe.Pointer(bp + 944)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4276
__4276:
	if 0 != 0 {
		goto __4275
	}
	goto __4277
__4277:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr = uintptr(0)

	goto __4274
__4273:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 904 /* elements */)) + uintptr(valIndex)*8))
__4274:
	;

	varIndex = *(*int32)(unsafe.Pointer(varListPtr + 4 + uintptr(j)*4))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(varIndex)*16
__4279:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __4280
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __4279
__4280:
	;
	if !!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH) != 0) {
		goto __4281
	}
	value2Ptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) != value2Ptr) {
		goto __4283
	}
	if !(value2Ptr != uintptr(0)) {
		goto __4284
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FrefCount, 1) > 1) {
		goto __4285
	}
	goto __4286
__4285:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4287
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __4289
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes)
__4289:
	;
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength = -1
__4290:
	;
	*(*uintptr)(unsafe.Pointer(value2Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value2Ptr
	goto __4291
__4291:
	if 0 != 0 {
		goto __4290
	}
	goto __4292
__4292:
	;
	goto __4288
__4287:
	XTclFreeObj(tls, value2Ptr)
__4288:
	;
__4286:
	;

__4284:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount++
__4283:
	;
	goto __4282
__4281:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	if !(XTclPtrSetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760)), uintptr(0), uintptr(0), uintptr(0),
		*(*uintptr)(unsafe.Pointer(bp + 944)), TCL_LEAVE_ERR_MSG, varIndex) == uintptr(0)) {
		goto __4293
	}
	checkInterp = 1

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(listPtr1)).FrefCount, 1) > 1) {
		goto __4294
	}
	goto __4295
__4294:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(listPtr1)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(listPtr1)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4296
	}

	if !((*Tcl_Obj)(unsafe.Pointer(listPtr1)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(listPtr1)).Fbytes != XtclEmptyStringRep) {
		goto __4298
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(listPtr1)).Fbytes)
__4298:
	;
	(*Tcl_Obj)(unsafe.Pointer(listPtr1)).Flength = -1
__4299:
	;
	*(*uintptr)(unsafe.Pointer(listPtr1 + 32)) = XtclFreeObjList
	XtclFreeObjList = listPtr1
	goto __4300
__4300:
	if 0 != 0 {
		goto __4299
	}
	goto __4301
__4301:
	;
	goto __4297
__4296:
	XTclFreeObj(tls, listPtr1)
__4297:
	;
__4295:
	;

	goto gotError
__4293:
	;
	checkInterp = 1
__4282:
	;
	valIndex++
	goto __4271
__4271:
	j++
	goto __4270
	goto __4272
__4272:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(listPtr1)).FrefCount, 1) > 1) {
		goto __4302
	}
	goto __4303
__4302:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(listPtr1)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(listPtr1)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4304
	}

	if !((*Tcl_Obj)(unsafe.Pointer(listPtr1)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(listPtr1)).Fbytes != XtclEmptyStringRep) {
		goto __4306
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(listPtr1)).Fbytes)
__4306:
	;
	(*Tcl_Obj)(unsafe.Pointer(listPtr1)).Flength = -1
__4307:
	;
	*(*uintptr)(unsafe.Pointer(listPtr1 + 32)) = XtclFreeObjList
	XtclFreeObjList = listPtr1
	goto __4308
__4308:
	if 0 != 0 {
		goto __4307
	}
	goto __4309
__4309:
	;
	goto __4305
__4304:
	XTclFreeObj(tls, listPtr1)
__4305:
	;
__4303:
	;

	listTmpIndex++
	goto __4268
__4268:
	i7++
	goto __4267
	goto __4269
__4269:
	;
__4266:
	;

	// Run-time peep-hole optimisation: the compiler ALWAYS follows
	// INST_FOREACH_STEP4 with an INST_JUMP_FALSE. We just skip that
	// instruction and jump direct from here.

	pc += uintptr(5)
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_JUMP_FALSE1) {
		goto __4310
	}
__4312:
	;
	if !(0 == 0) {
		goto __4315
	}
	if !(0 != 0) {
		goto __4317
	}
	if !(0 > 0) {
		goto __4318
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4319
__4318:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4319:
	;
__4317:
	;
	pc += func() uintptr {
		if continueLoop != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	goto cleanup0
	goto __4316
__4315:
	if !(0 != 0) {
		goto __4320
	}
	if !(0 > 0) {
		goto __4322
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4322:
	;
	pc += func() uintptr {
		if continueLoop != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 0 {
	case 1:
		goto __4324
	case 2:
		goto __4325
	case 0:
		goto __4326
	}
	goto __4323
__4324:
	goto cleanup1_pushObjResultPtr
__4325:
	goto cleanup2_pushObjResultPtr
__4326:
	goto __4323
__4323:
	;
	goto __4321
__4320:
	pc += func() uintptr {
		if continueLoop != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 0 {
	case 1:
		goto __4328
	case 2:
		goto __4329
	case 0:
		goto __4330
	}
	goto __4327
__4328:
	goto cleanup1
__4329:
	goto cleanup2
__4330:
	goto __4327
__4327:
	;
__4321:
	;
__4316:
	;
	goto __4313
__4313:
	if 0 != 0 {
		goto __4312
	}
	goto __4314
__4314:
	;
	goto __4311
__4310:
__4331:
	;
	if !(0 == 0) {
		goto __4334
	}
	if !(0 != 0) {
		goto __4336
	}
	if !(0 > 0) {
		goto __4337
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4338
__4337:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4338:
	;
__4336:
	;
	pc += func() uintptr {
		if continueLoop != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	goto cleanup0
	goto __4335
__4334:
	if !(0 != 0) {
		goto __4339
	}
	if !(0 > 0) {
		goto __4341
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4341:
	;
	pc += func() uintptr {
		if continueLoop != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 0 {
	case 1:
		goto __4343
	case 2:
		goto __4344
	case 0:
		goto __4345
	}
	goto __4342
__4343:
	goto cleanup1_pushObjResultPtr
__4344:
	goto cleanup2_pushObjResultPtr
__4345:
	goto __4342
__4342:
	;
	goto __4340
__4339:
	pc += func() uintptr {
		if continueLoop != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 0 {
	case 1:
		goto __4347
	case 2:
		goto __4348
	case 0:
		goto __4349
	}
	goto __4346
__4347:
	goto cleanup1
__4348:
	goto cleanup2
__4349:
	goto __4346
__4346:
	;
__4340:
	;
__4335:
	;
	goto __4332
__4332:
	if 0 != 0 {
		goto __4331
	}
	goto __4333
__4333:
	;
__4311:
	;

__303:
	// Initialize the data for the looping construct, pushing the
	// corresponding Tcl_Objs to the stack.

	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	infoPtr1 = (*AuxData)(unsafe.Pointer((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FauxDataArrayPtr + uintptr(opnd)*16)).FclientData
	numLists1 = (*ForeachInfo)(unsafe.Pointer(infoPtr1)).FnumLists

	// Compute the number of iterations that will be run: iterMax

	iterMax = 0
	listTmpDepth = numLists1 - 1
	i8 = 0
__4350:
	if !(i8 < int32(numLists1)) {
		goto __4352
	}
	varListPtr1 = *(*uintptr)(unsafe.Pointer(infoPtr1 + 16 + uintptr(i8)*8))
	numVars1 = (*ForeachVarList)(unsafe.Pointer(varListPtr1)).FnumVars
	listPtr2 = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(listTmpDepth)*8))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(listPtr2)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 912)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listPtr2 + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, listPtr2, bp+912)
	}() != TCL_OK) {
		goto __4353
	}

	goto gotError
__4353:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(listPtr2)).FrefCount > 1) {
		goto __4354
	}
	objPtr = XTclListObjCopy(tls, uintptr(0), listPtr2)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
__4355:
	_objPtr34 = listPtr2
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr34)).FrefCount, 1) <= 1) {
		goto __4358
	}
	XTclFreeObj(tls, _objPtr34)
__4358:
	;
	goto __4356
__4356:
	if 0 != 0 {
		goto __4355
	}
	goto __4357
__4357:
	;
	*(*uintptr)(unsafe.Pointer(tosPtr - uintptr(listTmpDepth)*8)) = objPtr
__4354:
	;
	iterTmp = (*(*int32)(unsafe.Pointer(bp + 912)) + (numVars1 - 1)) / numVars1
	if !(iterTmp > iterMax) {
		goto __4359
	}
	iterMax = iterTmp
__4359:
	;
	listTmpDepth--
	goto __4351
__4351:
	i8++
	goto __4350
	goto __4352
__4352:
	;

	// Store the iterNum and iterMax in a single Tcl_Obj; we keep a
	// nul-string obj with the pointer stored in the ptrValue so that the
	// thing is properly garbage collected. THIS OBJ MAKES NO SENSE, but
	// it will never leave this scope and is read-only.

__4360:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4363
	}
	XTclAllocateFreeObjects(tls)
__4363:
	;
	tmpPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4361
__4361:
	if 0 != 0 {
		goto __4360
	}
	goto __4362
__4362:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).FtypePtr = uintptr(0)

	*(*uintptr)(unsafe.Pointer(tmpPtr + 32)) = uintptr(int64(0))
	*(*uintptr)(unsafe.Pointer(tmpPtr + 32 + 8 /* &.ptr2 */)) = uintptr(Intptr_t(iterMax))
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), tmpPtr))).FrefCount++ // iterCounts object

	// Store a pointer to the ForeachInfo struct; same dirty trick
	// as above

__4364:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4367
	}
	XTclAllocateFreeObjects(tls)
__4367:
	;
	tmpPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4365
__4365:
	if 0 != 0 {
		goto __4364
	}
	goto __4366
__4366:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).FtypePtr = uintptr(0)

	*(*uintptr)(unsafe.Pointer(tmpPtr + 32)) = infoPtr1
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), tmpPtr))).FrefCount++ // infoPtr object

	// Jump directly to the INST_FOREACH_STEP instruction; the C code just
	// falls through.

	pc += uintptr(5 - (*ForeachInfo)(unsafe.Pointer(infoPtr1)).FloopCtTemp)

__304:
	// "Step" a foreach loop (i.e., begin its next iteration) by assigning
	// the next value list element to each loop var.

	tmpPtr = *(*uintptr)(unsafe.Pointer(tosPtr))
	infoPtr1 = *(*uintptr)(unsafe.Pointer(tmpPtr + 32))
	numLists1 = (*ForeachInfo)(unsafe.Pointer(infoPtr1)).FnumLists

	tmpPtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	iterNum1 = int32(*(*uintptr)(unsafe.Pointer(tmpPtr + 32)))
	iterMax = int32(*(*uintptr)(unsafe.Pointer(tmpPtr + 32 + 8)))

	// If some list still has a remaining list element iterate one more
	// time. Assign to var the next element from its value list.

	if !(iterNum1 < iterMax) {
		goto __4368
	}
	// Set the variables and jump back to run the body

	*(*uintptr)(unsafe.Pointer(tmpPtr + 32)) = uintptr(Intptr_t(iterNum1 + 1))

	listTmpDepth = numLists1 + 1

	i8 = 0
__4369:
	if !(i8 < int32(numLists1)) {
		goto __4371
	}
	varListPtr1 = *(*uintptr)(unsafe.Pointer(infoPtr1 + 16 + uintptr(i8)*8))
	numVars1 = (*ForeachVarList)(unsafe.Pointer(varListPtr1)).FnumVars

	listPtr2 = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(listTmpDepth)*8))
	if (*Tcl_Obj)(unsafe.Pointer(listPtr2)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 920)) = *(*uintptr)(unsafe.Pointer(listPtr2 + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 912)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listPtr2 + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, interp, listPtr2, bp+912, bp+920)
	}

	valIndex1 = iterNum1 * numVars1
	j1 = 0
__4372:
	if !(j1 < numVars1) {
		goto __4374
	}
	if !(valIndex1 >= *(*int32)(unsafe.Pointer(bp + 912))) {
		goto __4375
	}
__4377:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4380
	}
	XTclAllocateFreeObjects(tls)
__4380:
	;
	*(*uintptr)(unsafe.Pointer(bp + 944)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4378
__4378:
	if 0 != 0 {
		goto __4377
	}
	goto __4379
__4379:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr = uintptr(0)

	goto __4376
__4375:
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 920 /* elements1 */)) + uintptr(valIndex1)*8))
__4376:
	;

	varIndex1 = *(*int32)(unsafe.Pointer(varListPtr1 + 4 + uintptr(j1)*4))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(varIndex1)*16
__4381:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __4382
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __4381
__4382:
	;
	if !!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH) != 0) {
		goto __4383
	}
	value2Ptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) != value2Ptr) {
		goto __4385
	}
	if !(value2Ptr != uintptr(0)) {
		goto __4386
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FrefCount, 1) > 1) {
		goto __4387
	}
	goto __4388
__4387:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4389
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __4391
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes)
__4391:
	;
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength = -1
__4392:
	;
	*(*uintptr)(unsafe.Pointer(value2Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value2Ptr
	goto __4393
__4393:
	if 0 != 0 {
		goto __4392
	}
	goto __4394
__4394:
	;
	goto __4390
__4389:
	XTclFreeObj(tls, value2Ptr)
__4390:
	;
__4388:
	;

__4386:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount++
__4385:
	;
	goto __4384
__4383:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	if !(XTclPtrSetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760)), uintptr(0), uintptr(0), uintptr(0),
		*(*uintptr)(unsafe.Pointer(bp + 944)), TCL_LEAVE_ERR_MSG, varIndex1) == uintptr(0)) {
		goto __4395
	}
	checkInterp = 1

	goto gotError
__4395:
	;
	checkInterp = 1
__4384:
	;
	valIndex1++
	goto __4373
__4373:
	j1++
	goto __4372
	goto __4374
__4374:
	;
	listTmpDepth--
	goto __4370
__4370:
	i8++
	goto __4369
	goto __4371
__4371:
	;

	// loopCtTemp being 'misused' for storing the jump size
__4396:
	;
	if !(0 == 0) {
		goto __4399
	}
	if !(0 != 0) {
		goto __4401
	}
	if !(0 > 0) {
		goto __4402
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4403
__4402:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4403:
	;
__4401:
	;
	pc += uintptr((*ForeachInfo)(unsafe.Pointer(infoPtr1)).FloopCtTemp)
	goto cleanup0
	goto __4400
__4399:
	if !(0 != 0) {
		goto __4404
	}
	if !(0 > 0) {
		goto __4406
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4406:
	;
	pc += uintptr((*ForeachInfo)(unsafe.Pointer(infoPtr1)).FloopCtTemp)
	switch 0 {
	case 1:
		goto __4408
	case 2:
		goto __4409
	case 0:
		goto __4410
	}
	goto __4407
__4408:
	goto cleanup1_pushObjResultPtr
__4409:
	goto cleanup2_pushObjResultPtr
__4410:
	goto __4407
__4407:
	;
	goto __4405
__4404:
	pc += uintptr((*ForeachInfo)(unsafe.Pointer(infoPtr1)).FloopCtTemp)
	switch 0 {
	case 1:
		goto __4412
	case 2:
		goto __4413
	case 0:
		goto __4414
	}
	goto __4411
__4412:
	goto cleanup1
__4413:
	goto cleanup2
__4414:
	goto __4411
__4411:
	;
__4405:
	;
__4400:
	;
	goto __4397
__4397:
	if 0 != 0 {
		goto __4396
	}
	goto __4398
__4398:
	;
__4368:
	;

	// FALL THROUGH
	pc++

__305:
	// THIS INSTRUCTION IS ONLY CALLED AS A BREAK TARGET
	tmpPtr = *(*uintptr)(unsafe.Pointer(tosPtr))
	infoPtr1 = *(*uintptr)(unsafe.Pointer(tmpPtr + 32))
	numLists1 = (*ForeachInfo)(unsafe.Pointer(infoPtr1)).FnumLists

__4415:
	pc += uintptr(1)
	cleanup = numLists1 + 2
	if !(0 != 0) {
		goto __4418
	}
	if !(0 > 0) {
		goto __4420
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4420:
	;
	goto cleanupV_pushObjResultPtr
	goto __4419
__4418:
	goto cleanupV
__4419:
	;
	goto __4416
__4416:
	if 0 != 0 {
		goto __4415
	}
	goto __4417
__4417:
	;

__306:
	// This instruction is only issued by lmap. The stack is:
	//   - result
	//   - infoPtr
	//   - loop counters
	//   - valLists
	//   - collecting obj (unshared)
	// The instruction lappends the result to the collecting obj.

	tmpPtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	infoPtr1 = *(*uintptr)(unsafe.Pointer(tmpPtr + 32))
	numLists1 = (*ForeachInfo)(unsafe.Pointer(infoPtr1)).FnumLists

	objPtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(3+numLists1)*8))
	XTcl_ListObjAppendElement(tls, uintptr(0), objPtr, *(*uintptr)(unsafe.Pointer(tosPtr)))
__4421:
	;
	if !(1 == 0) {
		goto __4424
	}
	if !(0 != 0) {
		goto __4426
	}
	if !(0 > 0) {
		goto __4427
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4428
__4427:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4428:
	;
__4426:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4425
__4424:
	if !(0 != 0) {
		goto __4429
	}
	if !(0 > 0) {
		goto __4431
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4431:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4433
	case 2:
		goto __4434
	case 0:
		goto __4435
	}
	goto __4432
__4433:
	goto cleanup1_pushObjResultPtr
__4434:
	goto cleanup2_pushObjResultPtr
__4435:
	goto __4432
__4432:
	;
	goto __4430
__4429:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4437
	case 2:
		goto __4438
	case 0:
		goto __4439
	}
	goto __4436
__4437:
	goto cleanup1
__4438:
	goto cleanup2
__4439:
	goto __4436
__4436:
	;
__4430:
	;
__4425:
	;
	goto __4422
__4422:
	if 0 != 0 {
		goto __4421
	}
	goto __4423
__4423:
	;

	goto __141

__307:
	// Record start of the catch command with exception range index equal
	// to the operand. Push the current stack depth onto the special catch
	// stack.

	*(*Ptrdiff_t)(unsafe.Pointer(libc.PreIncUintptr(&(*TEBCdata)(unsafe.Pointer(TD)).FcatchTop, 8))) = (int64(tosPtr) - int64(TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8)) / 8

__4440:
	;
	if !(0 == 0) {
		goto __4443
	}
	if !(0 != 0) {
		goto __4445
	}
	if !(0 > 0) {
		goto __4446
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4447
__4446:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4447:
	;
__4445:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __4444
__4443:
	if !(0 != 0) {
		goto __4448
	}
	if !(0 > 0) {
		goto __4450
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4450:
	;
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __4452
	case 2:
		goto __4453
	case 0:
		goto __4454
	}
	goto __4451
__4452:
	goto cleanup1_pushObjResultPtr
__4453:
	goto cleanup2_pushObjResultPtr
__4454:
	goto __4451
__4451:
	;
	goto __4449
__4448:
	pc += uintptr(5)
	switch 0 {
	case 1:
		goto __4456
	case 2:
		goto __4457
	case 0:
		goto __4458
	}
	goto __4455
__4456:
	goto cleanup1
__4457:
	goto cleanup2
__4458:
	goto __4455
__4455:
	;
__4449:
	;
__4444:
	;
	goto __4441
__4441:
	if 0 != 0 {
		goto __4440
	}
	goto __4442
__4442:
	;
	goto __141

__308:
	(*TEBCdata)(unsafe.Pointer(TD)).FcatchTop -= 8
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_ResetResult(tls, interp)
	checkInterp = 1
	result = TCL_OK

__4459:
	;
	if !(0 == 0) {
		goto __4462
	}
	if !(0 != 0) {
		goto __4464
	}
	if !(0 > 0) {
		goto __4465
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4466
__4465:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4466:
	;
__4464:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4463
__4462:
	if !(0 != 0) {
		goto __4467
	}
	if !(0 > 0) {
		goto __4469
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4469:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4471
	case 2:
		goto __4472
	case 0:
		goto __4473
	}
	goto __4470
__4471:
	goto cleanup1_pushObjResultPtr
__4472:
	goto cleanup2_pushObjResultPtr
__4473:
	goto __4470
__4470:
	;
	goto __4468
__4467:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4475
	case 2:
		goto __4476
	case 0:
		goto __4477
	}
	goto __4474
__4475:
	goto cleanup1
__4476:
	goto cleanup2
__4477:
	goto __4474
__4474:
	;
__4468:
	;
__4463:
	;
	goto __4460
__4460:
	if 0 != 0 {
		goto __4459
	}
	goto __4461
__4461:
	;
	goto __141

__309:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_GetObjResult(tls, interp)

	// See the comments at INST_INVOKE_STK

__4478:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4481
	}
	XTclAllocateFreeObjects(tls)
__4481:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4479
__4479:
	if 0 != 0 {
		goto __4478
	}
	goto __4480
__4480:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	(*Interp)(unsafe.Pointer(interp)).FobjResultPtr = objPtr
__4482:
	;
	if !(0 == 0) {
		goto __4485
	}
	if !(-1 != 0) {
		goto __4487
	}
	if !(-1 > 0) {
		goto __4488
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4489
__4488:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4489:
	;
__4487:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4486
__4485:
	if !(-1 != 0) {
		goto __4490
	}
	if !(-1 > 0) {
		goto __4492
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4492:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4494
	case 2:
		goto __4495
	case 0:
		goto __4496
	}
	goto __4493
__4494:
	goto cleanup1_pushObjResultPtr
__4495:
	goto cleanup2_pushObjResultPtr
__4496:
	goto __4493
__4493:
	;
	goto __4491
__4490:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4498
	case 2:
		goto __4499
	case 0:
		goto __4500
	}
	goto __4497
__4498:
	goto cleanup1
__4499:
	goto cleanup2
__4500:
	goto __4497
__4497:
	;
__4491:
	;
__4486:
	;
	goto __4483
__4483:
	if 0 != 0 {
		goto __4482
	}
	goto __4484
__4484:
	;
	goto __141

__310:
__4501:
	;
__4504:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4507
	}
	XTclAllocateFreeObjects(tls)
__4507:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4505
__4505:
	if 0 != 0 {
		goto __4504
	}
	goto __4506
__4506:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = int32(result)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __4502
__4502:
	if 0 != 0 {
		goto __4501
	}
	goto __4503
__4503:
	;

__4508:
	;
	if !(0 == 0) {
		goto __4511
	}
	if !(1 != 0) {
		goto __4513
	}
	if !(1 > 0) {
		goto __4514
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4515
__4514:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4515:
	;
__4513:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4512
__4511:
	if !(1 != 0) {
		goto __4516
	}
	if !(1 > 0) {
		goto __4518
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4518:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4520
	case 2:
		goto __4521
	case 0:
		goto __4522
	}
	goto __4519
__4520:
	goto cleanup1_pushObjResultPtr
__4521:
	goto cleanup2_pushObjResultPtr
__4522:
	goto __4519
__4519:
	;
	goto __4517
__4516:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4524
	case 2:
		goto __4525
	case 0:
		goto __4526
	}
	goto __4523
__4524:
	goto cleanup1
__4525:
	goto cleanup2
__4526:
	goto __4523
__4523:
	;
__4517:
	;
__4512:
	;
	goto __4509
__4509:
	if 0 != 0 {
		goto __4508
	}
	goto __4510
__4510:
	;
	goto __141

__311:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_GetReturnOptions(tls, interp, result)
	checkInterp = 1

__4527:
	;
	if !(0 == 0) {
		goto __4530
	}
	if !(1 != 0) {
		goto __4532
	}
	if !(1 > 0) {
		goto __4533
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4534
__4533:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4534:
	;
__4532:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4531
__4530:
	if !(1 != 0) {
		goto __4535
	}
	if !(1 > 0) {
		goto __4537
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4537:
	;
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4539
	case 2:
		goto __4540
	case 0:
		goto __4541
	}
	goto __4538
__4539:
	goto cleanup1_pushObjResultPtr
__4540:
	goto cleanup2_pushObjResultPtr
__4541:
	goto __4538
__4538:
	;
	goto __4536
__4535:
	pc += uintptr(1)
	switch 0 {
	case 1:
		goto __4543
	case 2:
		goto __4544
	case 0:
		goto __4545
	}
	goto __4542
__4543:
	goto cleanup1
__4544:
	goto cleanup2
__4545:
	goto __4542
__4542:
	;
__4536:
	;
__4531:
	;
	goto __4528
__4528:
	if 0 != 0 {
		goto __4527
	}
	goto __4529
__4529:
	;
	goto __141

__312:

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 928)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(tosPtr)), bp+928)
	}() != TCL_OK) {
		goto __4546
	}
	XTcl_Panic(tls, ts+29451, 0)
__4546:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 928)) == TCL_OK) {
		goto __4547
	}
	XTcl_Panic(tls, ts+29499, 0)
__4547:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 928)) < TCL_ERROR || *(*int32)(unsafe.Pointer(bp + 928)) > TCL_CONTINUE) {
		goto __4548
	}
	*(*int32)(unsafe.Pointer(bp + 928 /* code1 */)) = TCL_CONTINUE + 1
__4548:
	;

__4549:
	;
	if !(1 == 0) {
		goto __4552
	}
	if !(0 != 0) {
		goto __4554
	}
	if !(0 > 0) {
		goto __4555
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4556
__4555:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4556:
	;
__4554:
	;
	pc += uintptr(2**(*int32)(unsafe.Pointer(bp + 928)) - 1)
	goto cleanup0
	goto __4553
__4552:
	if !(0 != 0) {
		goto __4557
	}
	if !(0 > 0) {
		goto __4559
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4559:
	;
	pc += uintptr(2**(*int32)(unsafe.Pointer(bp + 928)) - 1)
	switch 1 {
	case 1:
		goto __4561
	case 2:
		goto __4562
	case 0:
		goto __4563
	}
	goto __4560
__4561:
	goto cleanup1_pushObjResultPtr
__4562:
	goto cleanup2_pushObjResultPtr
__4563:
	goto __4560
__4560:
	;
	goto __4558
__4557:
	pc += uintptr(2**(*int32)(unsafe.Pointer(bp + 928)) - 1)
	switch 1 {
	case 1:
		goto __4565
	case 2:
		goto __4566
	case 0:
		goto __4567
	}
	goto __4564
__4565:
	goto cleanup1
__4566:
	goto cleanup2
__4567:
	goto __4564
__4564:
	;
__4558:
	;
__4553:
	;
	goto __4550
__4550:
	if 0 != 0 {
		goto __4549
	}
	goto __4551
__4551:
	;

	/*
	 * -----------------------------------------------------------------
	 *	   Start of dictionary-related instructions.
	 */

__313:
	dictPtr = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !(XTcl_DictObjSize(tls, interp, dictPtr, bp+932) != TCL_OK) {
		goto __4568
	}

	goto gotError
__4568:
	;

__4569:
	;
	if !(1 == 0) {
		goto __4572
	}
	if !(0 != 0) {
		goto __4574
	}
	if !(0 > 0) {
		goto __4575
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4576
__4575:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4576:
	;
__4574:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __4573
__4572:
	if !(0 != 0) {
		goto __4577
	}
	if !(0 > 0) {
		goto __4579
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4579:
	;
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4581
	case 2:
		goto __4582
	case 0:
		goto __4583
	}
	goto __4580
__4581:
	goto cleanup1_pushObjResultPtr
__4582:
	goto cleanup2_pushObjResultPtr
__4583:
	goto __4580
__4580:
	;
	goto __4578
__4577:
	pc += uintptr(1)
	switch 1 {
	case 1:
		goto __4585
	case 2:
		goto __4586
	case 0:
		goto __4587
	}
	goto __4584
__4585:
	goto cleanup1
__4586:
	goto cleanup2
__4587:
	goto __4584
__4584:
	;
__4578:
	;
__4573:
	;
	goto __4570
__4570:
	if 0 != 0 {
		goto __4569
	}
	goto __4571
__4571:
	;

__314:
__315:
	interp2 = interp

	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))

	dictPtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(opnd)*8))
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_DICT_EXISTS) {
		goto __4588
	}
	interp2 = uintptr(0)
__4588:
	;
	if !(opnd > 1) {
		goto __4589
	}
	dictPtr = XTclTraceDictPath(tls, interp2, dictPtr, opnd-1,
		tosPtr-uintptr(opnd-1)*8, DICT_PATH_READ)
	if !(dictPtr == uintptr(0)) {
		goto __4590
	}
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_DICT_EXISTS) {
		goto __4591
	}
	found1 = 0
	goto afterDictExists
__4591:
	;

	goto gotError
__4590:
	;
__4589:
	;
	if !(XTcl_DictObjGet(tls, interp2, dictPtr, *(*uintptr)(unsafe.Pointer(tosPtr)),
		bp+936) == TCL_OK) {
		goto __4592
	}
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) == INST_DICT_EXISTS) {
		goto __4594
	}
	found1 = func() int32 {
		if *(*uintptr)(unsafe.Pointer(bp + 936)) != 0 {
			return 1
		}
		return 0
	}()
	goto afterDictExists
__4594:
	;
	if !!(*(*uintptr)(unsafe.Pointer(bp + 936)) != 0) {
		goto __4595
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+23835,
		libc.VaList(bp+560, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
		}())))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+568, ts+4178, ts+7699, ts+23868,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(tosPtr)))
		}(), uintptr(0)))
	checkInterp = 1

	goto gotError
__4595:
	;

__4596:
	pc += uintptr(5)
	cleanup = opnd + 1
	if !(1 != 0) {
		goto __4599
	}
	if !(1 > 0) {
		goto __4601
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4601:
	;
	goto cleanupV_pushObjResultPtr
	goto __4600
__4599:
	goto cleanupV
__4600:
	;
	goto __4597
__4597:
	if 0 != 0 {
		goto __4596
	}
	goto __4598
__4598:
	;
	goto __4593
__4592:
	if !(int32(*(*uint8)(unsafe.Pointer(pc))) != INST_DICT_EXISTS) {
		goto __4602
	}

	goto gotError
	goto __4603
__4602:
	found1 = 0
__4603:
	;
__4593:
	;
afterDictExists:
	;

	// The INST_DICT_EXISTS instruction is usually followed by a
	// conditional jump, so we can take advantage of this to do some
	// peephole optimization (note that we're careful to not close out
	// someone doing something else).

__4604:
	pc += uintptr(5)
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_JUMP_FALSE1:
		goto __4608
	case INST_JUMP_TRUE1:
		goto __4609
	case INST_JUMP_FALSE4:
		goto __4610
	case INST_JUMP_TRUE4:
		goto __4611
	default:
		goto __4612
	}
	goto __4607
__4608:
	;
__4613:
	pc += func() uintptr {
		if found1 != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	cleanup = opnd + 1
	if !(0 != 0) {
		goto __4616
	}
	if !(0 > 0) {
		goto __4618
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4618:
	;
	goto cleanupV_pushObjResultPtr
	goto __4617
__4616:
	goto cleanupV
__4617:
	;
	goto __4614
__4614:
	if 0 != 0 {
		goto __4613
	}
	goto __4615
__4615:
	;
	goto __4607
__4609:
	;
__4619:
	pc += func() uintptr {
		if found1 != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	cleanup = opnd + 1
	if !(0 != 0) {
		goto __4622
	}
	if !(0 > 0) {
		goto __4624
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4624:
	;
	goto cleanupV_pushObjResultPtr
	goto __4623
__4622:
	goto cleanupV
__4623:
	;
	goto __4620
__4620:
	if 0 != 0 {
		goto __4619
	}
	goto __4621
__4621:
	;
	goto __4607
__4610:
	;
__4625:
	pc += func() uintptr {
		if found1 != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	cleanup = opnd + 1
	if !(0 != 0) {
		goto __4628
	}
	if !(0 > 0) {
		goto __4630
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4630:
	;
	goto cleanupV_pushObjResultPtr
	goto __4629
__4628:
	goto cleanupV
__4629:
	;
	goto __4626
__4626:
	if 0 != 0 {
		goto __4625
	}
	goto __4627
__4627:
	;
	goto __4607
__4611:
	;
__4631:
	pc += func() uintptr {
		if found1 != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	cleanup = opnd + 1
	if !(0 != 0) {
		goto __4634
	}
	if !(0 > 0) {
		goto __4636
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4636:
	;
	goto cleanupV_pushObjResultPtr
	goto __4635
__4634:
	goto cleanupV
__4635:
	;
	goto __4632
__4632:
	if 0 != 0 {
		goto __4631
	}
	goto __4633
__4633:
	;
	goto __4607
__4612:
	if !(found1 < 0) {
		goto __4637
	}
__4639:
	;
__4642:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4645
	}
	XTclAllocateFreeObjects(tls)
__4645:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4643
__4643:
	if 0 != 0 {
		goto __4642
	}
	goto __4644
__4644:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __4640
__4640:
	if 0 != 0 {
		goto __4639
	}
	goto __4641
__4641:
	;
	goto __4638
__4637:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.Bool32(found1 > 0))*8))
__4638:
	;
__4646:
	pc += uintptr(0)
	cleanup = opnd + 1
	if !(1 != 0) {
		goto __4649
	}
	if !(1 > 0) {
		goto __4651
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4651:
	;
	goto cleanupV_pushObjResultPtr
	goto __4650
__4649:
	goto cleanupV
__4650:
	;
	goto __4647
__4647:
	if 0 != 0 {
		goto __4646
	}
	goto __4648
__4648:
	;
	goto __4607
__4607:
	;
	goto __4605
__4605:
	if 0 != 0 {
		goto __4604
	}
	goto __4606
__4606:
	;

__316:
__317:
__318:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	opnd2 = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(3)))))

	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd2)*16
__4652:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __4653
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __4652
__4653:
	;

	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0) {
		goto __4654
	}
	dictPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __4655
__4654:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	dictPtr = XTclPtrGetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0), uintptr(0), 0,
		opnd2)
	checkInterp = 1
__4655:
	;
	if !(dictPtr == uintptr(0)) {
		goto __4656
	}
__4658:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4661
	}
	XTclAllocateFreeObjects(tls)
__4661:
	;
	dictPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4659
__4659:
	if 0 != 0 {
		goto __4658
	}
	goto __4660
__4660:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr = uintptr(0)

	allocateDict = 1
	goto __4657
__4656:
	allocateDict = libc.Bool32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1)
	if !(allocateDict != 0) {
		goto __4662
	}
	dictPtr = XTcl_DuplicateObj(tls, dictPtr)
__4662:
	;
__4657:
	;

	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_DICT_SET:
		goto __4664
	case INST_DICT_INCR_IMM:
		goto __4665
	case INST_DICT_UNSET:
		goto __4666
	default:
		goto __4667
	}
	goto __4663
__4664:
	cleanup = opnd + 1
	result = XTcl_DictObjPutKeyList(tls, interp, dictPtr, opnd,
		tosPtr-uintptr(opnd)*8, *(*uintptr)(unsafe.Pointer(tosPtr)))
	goto __4663
__4665:
	cleanup = 1
	opnd = int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3))))
	result = XTcl_DictObjGet(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(tosPtr)), bp+944)
	if !(result != TCL_OK) {
		goto __4668
	}
	goto __4663
__4668:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) == uintptr(0)) {
		goto __4669
	}
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(tosPtr)), XTcl_NewIntObj(tls, opnd))
	goto __4670
__4669:
__4671:
	;
__4674:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4677
	}
	XTclAllocateFreeObjects(tls)
__4677:
	;
	value2Ptr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4675
__4675:
	if 0 != 0 {
		goto __4674
	}
	goto __4676
__4676:
	;
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(value2Ptr + 32)) = int32(opnd)
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __4672
__4672:
	if 0 != 0 {
		goto __4671
	}
	goto __4673
__4673:
	;
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FrefCount++
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __4678
	}
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(tosPtr)), *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__4678:
	;
	result = XTclIncrObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), value2Ptr)
	if !(result == TCL_OK) {
		goto __4679
	}
__4680:
	_isobjPtr8 = dictPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr8)).Fbytes != uintptr(0)) {
		goto __4683
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr8)).Fbytes != XtclEmptyStringRep) {
		goto __4684
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr8)).Fbytes)
__4684:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr8)).Fbytes = uintptr(0)
__4683:
	;
	goto __4681
__4681:
	if 0 != 0 {
		goto __4680
	}
	goto __4682
__4682:
	;
__4679:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FrefCount, 1) > 1) {
		goto __4685
	}
	goto __4686
__4685:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4687
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __4689
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes)
__4689:
	;
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength = -1
__4690:
	;
	*(*uintptr)(unsafe.Pointer(value2Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value2Ptr
	goto __4691
__4691:
	if 0 != 0 {
		goto __4690
	}
	goto __4692
__4692:
	;
	goto __4688
__4687:
	XTclFreeObj(tls, value2Ptr)
__4688:
	;
__4686:
	;

__4670:
	;
	goto __4663
__4666:
	cleanup = opnd
	result = XTcl_DictObjRemoveKeyList(tls, interp, dictPtr, opnd,
		tosPtr-uintptr(opnd-1)*8)
	goto __4663
__4667:
	cleanup = 0 // stop compiler warning
	XTcl_Panic(tls, ts+29539, 0)
__4663:
	;

	if !(result != TCL_OK) {
		goto __4693
	}
	if !(allocateDict != 0) {
		goto __4694
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1) {
		goto __4695
	}
	goto __4696
__4695:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4697
	}

	if !((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep) {
		goto __4699
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
__4699:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
__4700:
	;
	*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = dictPtr
	goto __4701
__4701:
	if 0 != 0 {
		goto __4700
	}
	goto __4702
__4702:
	;
	goto __4698
__4697:
	XTclFreeObj(tls, dictPtr)
__4698:
	;
__4696:
	;

__4694:
	;

	goto checkForCatch
__4693:
	;

	if !!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH) != 0) {
		goto __4703
	}
	if !(allocateDict != 0) {
		goto __4705
	}
	value2Ptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount++
	if !(value2Ptr != uintptr(0)) {
		goto __4706
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FrefCount, 1) > 1) {
		goto __4707
	}
	goto __4708
__4707:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4709
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __4711
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes)
__4711:
	;
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength = -1
__4712:
	;
	*(*uintptr)(unsafe.Pointer(value2Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value2Ptr
	goto __4713
__4713:
	if 0 != 0 {
		goto __4712
	}
	goto __4714
__4714:
	;
	goto __4710
__4709:
	XTclFreeObj(tls, value2Ptr)
__4710:
	;
__4708:
	;

__4706:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = dictPtr
__4705:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = dictPtr
	goto __4704
__4703:
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount++
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclPtrSetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0), uintptr(0),
		dictPtr, TCL_LEAVE_ERR_MSG, opnd2)
	checkInterp = 1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1) {
		goto __4715
	}
	goto __4716
__4715:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4717
	}

	if !((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep) {
		goto __4719
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
__4719:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
__4720:
	;
	*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = dictPtr
	goto __4721
__4721:
	if 0 != 0 {
		goto __4720
	}
	goto __4722
__4722:
	;
	goto __4718
__4717:
	XTclFreeObj(tls, dictPtr)
__4718:
	;
__4716:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == uintptr(0)) {
		goto __4723
	}

	goto gotError
__4723:
	;
__4704:
	;
	if !(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(9)))) == INST_POP) {
		goto __4724
	}
__4725:
	pc += uintptr(10)
	cleanup = cleanup
	if !(0 != 0) {
		goto __4728
	}
	if !(0 > 0) {
		goto __4730
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4730:
	;
	goto cleanupV_pushObjResultPtr
	goto __4729
__4728:
	goto cleanupV
__4729:
	;
	goto __4726
__4726:
	if 0 != 0 {
		goto __4725
	}
	goto __4727
__4727:
	;
__4724:
	;

__4731:
	pc += uintptr(9)
	cleanup = cleanup
	if !(1 != 0) {
		goto __4734
	}
	if !(1 > 0) {
		goto __4736
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4736:
	;
	goto cleanupV_pushObjResultPtr
	goto __4735
__4734:
	goto cleanupV
__4735:
	;
	goto __4732
__4732:
	if 0 != 0 {
		goto __4731
	}
	goto __4733
__4733:
	;

__319:
__320:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
__4737:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __4738
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __4737
__4738:
	;

	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0) {
		goto __4739
	}
	dictPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __4740
__4739:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	dictPtr = XTclPtrGetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0), uintptr(0), 0,
		opnd)
	checkInterp = 1
__4740:
	;
	if !(dictPtr == uintptr(0)) {
		goto __4741
	}
__4743:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4746
	}
	XTclAllocateFreeObjects(tls)
__4746:
	;
	dictPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4744
__4744:
	if 0 != 0 {
		goto __4743
	}
	goto __4745
__4745:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr = uintptr(0)

	allocateDict = 1
	goto __4742
__4741:
	allocateDict = libc.Bool32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1)
	if !(allocateDict != 0) {
		goto __4747
	}
	dictPtr = XTcl_DuplicateObj(tls, dictPtr)
__4747:
	;
__4742:
	;

	if !(XTcl_DictObjGet(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)),
		bp+944) != TCL_OK) {
		goto __4748
	}
	if !(allocateDict != 0) {
		goto __4749
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1) {
		goto __4750
	}
	goto __4751
__4750:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4752
	}

	if !((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep) {
		goto __4754
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
__4754:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
__4755:
	;
	*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = dictPtr
	goto __4756
__4756:
	if 0 != 0 {
		goto __4755
	}
	goto __4757
__4757:
	;
	goto __4753
__4752:
	XTclFreeObj(tls, dictPtr)
__4753:
	;
__4751:
	;

__4749:
	;

	goto gotError
__4748:
	;

	// Note that a non-existent key results in a NULL valuePtr, which is a
	// case handled separately below. What we *can* say at this point is
	// that the write-back will always succeed.

	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_DICT_APPEND:
		goto __4759
	case INST_DICT_LAPPEND:
		goto __4760
	default:
		goto __4761
	}
	goto __4758
__4759:
	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) == uintptr(0)) {
		goto __4762
	}
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)), *(*uintptr)(unsafe.Pointer(tosPtr)))
	goto __4763
__4762:
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __4764
	}
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	XTcl_AppendObjToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), *(*uintptr)(unsafe.Pointer(tosPtr)))
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)), *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	goto __4765
__4764:
	XTcl_AppendObjToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)), *(*uintptr)(unsafe.Pointer(tosPtr)))

	// Must invalidate the string representation of dictionary
	// here because we have directly updated the internal
	// representation; if we don't, callers could see the wrong
	// string rep despite the internal version of the dictionary
	// having the correct value. [Bug 3079830]

__4766:
	_isobjPtr9 = dictPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr9)).Fbytes != uintptr(0)) {
		goto __4769
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr9)).Fbytes != XtclEmptyStringRep) {
		goto __4770
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr9)).Fbytes)
__4770:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr9)).Fbytes = uintptr(0)
__4769:
	;
	goto __4767
__4767:
	if 0 != 0 {
		goto __4766
	}
	goto __4768
__4768:
	;
__4765:
	;
__4763:
	;
	goto __4758
__4760:
	// More complex because list-append can fail.

	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) == uintptr(0)) {
		goto __4771
	}
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)),
		XTcl_NewListObj(tls, 1, tosPtr))
	goto __4758
	goto __4772
__4771:
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount > 1) {
		goto __4773
	}
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	if !(XTcl_ListObjAppendElement(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)),
		*(*uintptr)(unsafe.Pointer(tosPtr))) != TCL_OK) {
		goto __4775
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount, 1) > 1) {
		goto __4776
	}
	goto __4777
__4776:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4778
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != XtclEmptyStringRep) {
		goto __4780
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes)
__4780:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength = -1
__4781:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 944))
	goto __4782
__4782:
	if 0 != 0 {
		goto __4781
	}
	goto __4783
__4783:
	;
	goto __4779
__4778:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__4779:
	;
__4777:
	;

	if !(allocateDict != 0) {
		goto __4784
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1) {
		goto __4785
	}
	goto __4786
__4785:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4787
	}

	if !((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep) {
		goto __4789
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
__4789:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
__4790:
	;
	*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = dictPtr
	goto __4791
__4791:
	if 0 != 0 {
		goto __4790
	}
	goto __4792
__4792:
	;
	goto __4788
__4787:
	XTclFreeObj(tls, dictPtr)
__4788:
	;
__4786:
	;

__4784:
	;

	goto gotError
__4775:
	;
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8)), *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
	goto __4774
__4773:
	if !(XTcl_ListObjAppendElement(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 944)),
		*(*uintptr)(unsafe.Pointer(tosPtr))) != TCL_OK) {
		goto __4793
	}
	if !(allocateDict != 0) {
		goto __4794
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1) {
		goto __4795
	}
	goto __4796
__4795:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4797
	}

	if !((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep) {
		goto __4799
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
__4799:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
__4800:
	;
	*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = dictPtr
	goto __4801
__4801:
	if 0 != 0 {
		goto __4800
	}
	goto __4802
__4802:
	;
	goto __4798
__4797:
	XTclFreeObj(tls, dictPtr)
__4798:
	;
__4796:
	;

__4794:
	;

	goto gotError
__4793:
	;

	// Must invalidate the string representation of dictionary
	// here because we have directly updated the internal
	// representation; if we don't, callers could see the wrong
	// string rep despite the internal version of the dictionary
	// having the correct value. [Bug 3079830]

__4803:
	_isobjPtr10 = dictPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr10)).Fbytes != uintptr(0)) {
		goto __4806
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr10)).Fbytes != XtclEmptyStringRep) {
		goto __4807
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr10)).Fbytes)
__4807:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr10)).Fbytes = uintptr(0)
__4806:
	;
	goto __4804
__4804:
	if 0 != 0 {
		goto __4803
	}
	goto __4805
__4805:
	;
__4774:
	;
__4772:
	;
	goto __4758
__4761:
	XTcl_Panic(tls, ts+29539, 0)
__4758:
	;

	if !!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH) != 0) {
		goto __4808
	}
	if !(allocateDict != 0) {
		goto __4810
	}
	value2Ptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount++
	if !(value2Ptr != uintptr(0)) {
		goto __4811
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FrefCount, 1) > 1) {
		goto __4812
	}
	goto __4813
__4812:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4814
	}

	if !((*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != XtclEmptyStringRep) {
		goto __4816
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes)
__4816:
	;
	(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength = -1
__4817:
	;
	*(*uintptr)(unsafe.Pointer(value2Ptr + 32)) = XtclFreeObjList
	XtclFreeObjList = value2Ptr
	goto __4818
__4818:
	if 0 != 0 {
		goto __4817
	}
	goto __4819
__4819:
	;
	goto __4815
__4814:
	XTclFreeObj(tls, value2Ptr)
__4815:
	;
__4813:
	;

__4811:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = dictPtr
__4810:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = dictPtr
	goto __4809
__4808:
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount++
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclPtrSetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0), uintptr(0),
		dictPtr, TCL_LEAVE_ERR_MSG, opnd)
	checkInterp = 1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1) {
		goto __4820
	}
	goto __4821
__4820:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4822
	}

	if !((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep) {
		goto __4824
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
__4824:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
__4825:
	;
	*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = dictPtr
	goto __4826
__4826:
	if 0 != 0 {
		goto __4825
	}
	goto __4827
__4827:
	;
	goto __4823
__4822:
	XTclFreeObj(tls, dictPtr)
__4823:
	;
__4821:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == uintptr(0)) {
		goto __4828
	}

	goto gotError
__4828:
	;
__4809:
	;
	if !(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5)))) == INST_POP) {
		goto __4829
	}
__4830:
	;
	if !(2 == 0) {
		goto __4833
	}
	if !(0 != 0) {
		goto __4835
	}
	if !(0 > 0) {
		goto __4836
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4837
__4836:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4837:
	;
__4835:
	;
	pc += uintptr(6)
	goto cleanup0
	goto __4834
__4833:
	if !(0 != 0) {
		goto __4838
	}
	if !(0 > 0) {
		goto __4840
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4840:
	;
	pc += uintptr(6)
	switch 2 {
	case 1:
		goto __4842
	case 2:
		goto __4843
	case 0:
		goto __4844
	}
	goto __4841
__4842:
	goto cleanup1_pushObjResultPtr
__4843:
	goto cleanup2_pushObjResultPtr
__4844:
	goto __4841
__4841:
	;
	goto __4839
__4838:
	pc += uintptr(6)
	switch 2 {
	case 1:
		goto __4846
	case 2:
		goto __4847
	case 0:
		goto __4848
	}
	goto __4845
__4846:
	goto cleanup1
__4847:
	goto cleanup2
__4848:
	goto __4845
__4845:
	;
__4839:
	;
__4834:
	;
	goto __4831
__4831:
	if 0 != 0 {
		goto __4830
	}
	goto __4832
__4832:
	;
__4829:
	;

__4849:
	;
	if !(2 == 0) {
		goto __4852
	}
	if !(1 != 0) {
		goto __4854
	}
	if !(1 > 0) {
		goto __4855
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4856
__4855:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4856:
	;
__4854:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __4853
__4852:
	if !(1 != 0) {
		goto __4857
	}
	if !(1 > 0) {
		goto __4859
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4859:
	;
	pc += uintptr(5)
	switch 2 {
	case 1:
		goto __4861
	case 2:
		goto __4862
	case 0:
		goto __4863
	}
	goto __4860
__4861:
	goto cleanup1_pushObjResultPtr
__4862:
	goto cleanup2_pushObjResultPtr
__4863:
	goto __4860
__4860:
	;
	goto __4858
__4857:
	pc += uintptr(5)
	switch 2 {
	case 1:
		goto __4865
	case 2:
		goto __4866
	case 0:
		goto __4867
	}
	goto __4864
__4865:
	goto cleanup1
__4866:
	goto cleanup2
__4867:
	goto __4864
__4864:
	;
__4858:
	;
__4853:
	;
	goto __4850
__4850:
	if 0 != 0 {
		goto __4849
	}
	goto __4851
__4851:
	;

__321:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))

	dictPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	searchPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_DictSearch{})))
	if !(XTcl_DictObjFirst(tls, interp, dictPtr, searchPtr, bp+952,
		bp+944, bp+932) != TCL_OK) {
		goto __4868
	}

	// dictPtr is no longer on the stack, and we're not
	// moving it into the internalrep of an iterator.  We need
	// to drop the refcount [Tcl Bug 9b352768e6].

__4869:
	_objPtr35 = dictPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr35)).FrefCount, 1) <= 1) {
		goto __4872
	}
	XTclFreeObj(tls, _objPtr35)
__4872:
	;
	goto __4870
__4870:
	if 0 != 0 {
		goto __4869
	}
	goto __4871
__4871:
	;
	XTclpFree(tls, searchPtr)

	goto gotError
__4868:
	;
__4873:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4876
	}
	XTclAllocateFreeObjects(tls)
__4876:
	;
	statePtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4874
__4874:
	if 0 != 0 {
		goto __4873
	}
	goto __4875
__4875:
	;
	(*Tcl_Obj)(unsafe.Pointer(statePtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(statePtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(statePtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(statePtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(statePtr)).FtypePtr = uintptr(unsafe.Pointer(&dictIteratorType))
	*(*uintptr)(unsafe.Pointer(statePtr + 32)) = searchPtr
	*(*uintptr)(unsafe.Pointer(statePtr + 32 + 8 /* &.ptr2 */)) = dictPtr
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
	if !(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0) {
		goto __4877
	}
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr == uintptr(unsafe.Pointer(&dictIteratorType))) {
		goto __4878
	}
	XTcl_Panic(tls, ts+29558, 0)
__4878:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FrefCount, 1) > 1) {
		goto __4879
	}
	goto __4880
__4879:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __4881
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != XtclEmptyStringRep) {
		goto __4883
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes)
__4883:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Flength = -1
__4884:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __4885
__4885:
	if 0 != 0 {
		goto __4884
	}
	goto __4886
__4886:
	;
	goto __4882
__4881:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))
__4882:
	;
__4880:
	;

__4877:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = statePtr
	(*Tcl_Obj)(unsafe.Pointer(statePtr)).FrefCount++
	goto pushDictIteratorResult

__322:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))

	statePtr = *(*uintptr)(unsafe.Pointer(compiledLocals + uintptr(opnd)*16 + 8))
	if !(statePtr == uintptr(0) || (*Tcl_Obj)(unsafe.Pointer(statePtr)).FtypePtr != uintptr(unsafe.Pointer(&dictIteratorType))) {
		goto __4887
	}
	XTcl_Panic(tls, ts+29580, 0)
__4887:
	;
	searchPtr = *(*uintptr)(unsafe.Pointer(statePtr + 32))
	XTcl_DictObjNext(tls, searchPtr, bp+952, bp+944, bp+932)
pushDictIteratorResult:
	if !(*(*int32)(unsafe.Pointer(bp + 932)) != 0) {
		goto __4888
	}
__4890:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4893
	}
	XTclAllocateFreeObjects(tls)
__4893:
	;
	emptyPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4891
__4891:
	if 0 != 0 {
		goto __4890
	}
	goto __4892
__4892:
	;
	(*Tcl_Obj)(unsafe.Pointer(emptyPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(emptyPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(emptyPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(emptyPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), emptyPtr))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), emptyPtr))).FrefCount++
	goto __4889
__4888:
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 944))))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 952))))).FrefCount++
__4889:
	;

	// The INST_DICT_FIRST and INST_DICT_NEXT instructsions are always
	// followed by a conditional jump, so we can take advantage of this to
	// do some peephole optimization (note that we're careful to not close
	// out someone doing something else).

__4894:
	pc += uintptr(5)
	switch int32(*(*uint8)(unsafe.Pointer(pc))) {
	case INST_JUMP_FALSE1:
		goto __4898
	case INST_JUMP_TRUE1:
		goto __4899
	case INST_JUMP_FALSE4:
		goto __4900
	case INST_JUMP_TRUE4:
		goto __4901
	default:
		goto __4902
	}
	goto __4897
__4898:
__4903:
	;
	if !(0 == 0) {
		goto __4906
	}
	if !(0 != 0) {
		goto __4908
	}
	if !(0 > 0) {
		goto __4909
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4910
__4909:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4910:
	;
__4908:
	;
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	goto cleanup0
	goto __4907
__4906:
	if !(0 != 0) {
		goto __4911
	}
	if !(0 > 0) {
		goto __4913
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4913:
	;
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 0 {
	case 1:
		goto __4915
	case 2:
		goto __4916
	case 0:
		goto __4917
	}
	goto __4914
__4915:
	goto cleanup1_pushObjResultPtr
__4916:
	goto cleanup2_pushObjResultPtr
__4917:
	goto __4914
__4914:
	;
	goto __4912
__4911:
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(2)
		}
		return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
	}()
	switch 0 {
	case 1:
		goto __4919
	case 2:
		goto __4920
	case 0:
		goto __4921
	}
	goto __4918
__4919:
	goto cleanup1
__4920:
	goto cleanup2
__4921:
	goto __4918
__4918:
	;
__4912:
	;
__4907:
	;
	goto __4904
__4904:
	if 0 != 0 {
		goto __4903
	}
	goto __4905
__4905:
	;
	goto __4897
__4899:
__4922:
	;
	if !(0 == 0) {
		goto __4925
	}
	if !(0 != 0) {
		goto __4927
	}
	if !(0 > 0) {
		goto __4928
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4929
__4928:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4929:
	;
__4927:
	;
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	goto cleanup0
	goto __4926
__4925:
	if !(0 != 0) {
		goto __4930
	}
	if !(0 > 0) {
		goto __4932
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4932:
	;
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 0 {
	case 1:
		goto __4934
	case 2:
		goto __4935
	case 0:
		goto __4936
	}
	goto __4933
__4934:
	goto cleanup1_pushObjResultPtr
__4935:
	goto cleanup2_pushObjResultPtr
__4936:
	goto __4933
__4933:
	;
	goto __4931
__4930:
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(int32(*(*int8)(unsafe.Pointer(pc + uintptr(1)))))
		}
		return uintptr(2)
	}()
	switch 0 {
	case 1:
		goto __4938
	case 2:
		goto __4939
	case 0:
		goto __4940
	}
	goto __4937
__4938:
	goto cleanup1
__4939:
	goto cleanup2
__4940:
	goto __4937
__4937:
	;
__4931:
	;
__4926:
	;
	goto __4923
__4923:
	if 0 != 0 {
		goto __4922
	}
	goto __4924
__4924:
	;
	goto __4897
__4900:
__4941:
	;
	if !(0 == 0) {
		goto __4944
	}
	if !(0 != 0) {
		goto __4946
	}
	if !(0 > 0) {
		goto __4947
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4948
__4947:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4948:
	;
__4946:
	;
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	goto cleanup0
	goto __4945
__4944:
	if !(0 != 0) {
		goto __4949
	}
	if !(0 > 0) {
		goto __4951
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4951:
	;
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 0 {
	case 1:
		goto __4953
	case 2:
		goto __4954
	case 0:
		goto __4955
	}
	goto __4952
__4953:
	goto cleanup1_pushObjResultPtr
__4954:
	goto cleanup2_pushObjResultPtr
__4955:
	goto __4952
__4952:
	;
	goto __4950
__4949:
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(5)
		}
		return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	}()
	switch 0 {
	case 1:
		goto __4957
	case 2:
		goto __4958
	case 0:
		goto __4959
	}
	goto __4956
__4957:
	goto cleanup1
__4958:
	goto cleanup2
__4959:
	goto __4956
__4956:
	;
__4950:
	;
__4945:
	;
	goto __4942
__4942:
	if 0 != 0 {
		goto __4941
	}
	goto __4943
__4943:
	;
	goto __4897
__4901:
__4960:
	;
	if !(0 == 0) {
		goto __4963
	}
	if !(0 != 0) {
		goto __4965
	}
	if !(0 > 0) {
		goto __4966
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4967
__4966:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4967:
	;
__4965:
	;
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	goto cleanup0
	goto __4964
__4963:
	if !(0 != 0) {
		goto __4968
	}
	if !(0 > 0) {
		goto __4970
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4970:
	;
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 0 {
	case 1:
		goto __4972
	case 2:
		goto __4973
	case 0:
		goto __4974
	}
	goto __4971
__4972:
	goto cleanup1_pushObjResultPtr
__4973:
	goto cleanup2_pushObjResultPtr
__4974:
	goto __4971
__4971:
	;
	goto __4969
__4968:
	pc += func() uintptr {
		if *(*int32)(unsafe.Pointer(bp + 932)) != 0 {
			return uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
		}
		return uintptr(5)
	}()
	switch 0 {
	case 1:
		goto __4976
	case 2:
		goto __4977
	case 0:
		goto __4978
	}
	goto __4975
__4976:
	goto cleanup1
__4977:
	goto cleanup2
__4978:
	goto __4975
__4975:
	;
__4969:
	;
__4964:
	;
	goto __4961
__4961:
	if 0 != 0 {
		goto __4960
	}
	goto __4962
__4962:
	;
	goto __4897
__4902:
	if !(*(*int32)(unsafe.Pointer(bp + 932)) < 0) {
		goto __4979
	}
__4981:
	;
__4984:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4987
	}
	XTclAllocateFreeObjects(tls)
__4987:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4985
__4985:
	if 0 != 0 {
		goto __4984
	}
	goto __4986
__4986:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)) + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __4982
__4982:
	if 0 != 0 {
		goto __4981
	}
	goto __4983
__4983:
	;
	goto __4980
__4979:
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = *(*uintptr)(unsafe.Pointer(constants + uintptr(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 932)) > 0))*8))
__4980:
	;
__4988:
	;
	if !(0 == 0) {
		goto __4991
	}
	if !(1 != 0) {
		goto __4993
	}
	if !(1 > 0) {
		goto __4994
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __4995
__4994:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__4995:
	;
__4993:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __4992
__4991:
	if !(1 != 0) {
		goto __4996
	}
	if !(1 > 0) {
		goto __4998
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__4998:
	;
	pc += uintptr(0)
	switch 0 {
	case 1:
		goto __5000
	case 2:
		goto __5001
	case 0:
		goto __5002
	}
	goto __4999
__5000:
	goto cleanup1_pushObjResultPtr
__5001:
	goto cleanup2_pushObjResultPtr
__5002:
	goto __4999
__4999:
	;
	goto __4997
__4996:
	pc += uintptr(0)
	switch 0 {
	case 1:
		goto __5004
	case 2:
		goto __5005
	case 0:
		goto __5006
	}
	goto __5003
__5004:
	goto cleanup1
__5005:
	goto cleanup2
__5006:
	goto __5003
__5003:
	;
__4997:
	;
__4992:
	;
	goto __4989
__4989:
	if 0 != 0 {
		goto __4988
	}
	goto __4990
__4990:
	;
	goto __4897
__4897:
	;
	goto __4895
__4895:
	if 0 != 0 {
		goto __4894
	}
	goto __4896
__4896:
	;

__323:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	opnd2 = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(3)))))

	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
	duiPtr = (*AuxData)(unsafe.Pointer((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FauxDataArrayPtr + uintptr(opnd2)*16)).FclientData
__5007:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __5008
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __5007
__5008:
	;
	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0) {
		goto __5009
	}
	dictPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __5010
__5009:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	dictPtr = XTclPtrGetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0), uintptr(0),
		TCL_LEAVE_ERR_MSG, opnd)
	checkInterp = 1
	if !(dictPtr == uintptr(0)) {
		goto __5011
	}

	goto gotError
__5011:
	;
__5010:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount++
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 960)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 704)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), bp+704, bp+960)
	}() != TCL_OK) {
		goto __5012
	}

	goto gotError
__5012:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 704)) != (*DictUpdateInfo)(unsafe.Pointer(duiPtr)).Flength) {
		goto __5013
	}
	XTcl_Panic(tls, ts+29601, 0)
__5013:
	;
	i9 = 0
__5014:
	if !(i9 < *(*int32)(unsafe.Pointer(bp + 704))) {
		goto __5016
	}
	if !(XTcl_DictObjGet(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 960)) + uintptr(i9)*8)),
		bp+944) != TCL_OK) {
		goto __5017
	}

__5018:
	_objPtr36 = dictPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr36)).FrefCount, 1) <= 1) {
		goto __5021
	}
	XTclFreeObj(tls, _objPtr36)
__5021:
	;
	goto __5019
__5019:
	if 0 != 0 {
		goto __5018
	}
	goto __5020
__5020:
	;
	goto gotError
__5017:
	;
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(*(*int32)(unsafe.Pointer(duiPtr + 4 + uintptr(i9)*4)))*16
__5022:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __5023
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __5022
__5023:
	;
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) == uintptr(0)) {
		goto __5024
	}
	XTclObjUnsetVar2(tls, interp,
		*(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FlocalCachePtr + 8 + uintptr(*(*int32)(unsafe.Pointer(duiPtr + 4 + uintptr(i9)*4)))*8)),
		uintptr(0), 0)
	goto __5025
__5024:
	if !(XTclPtrSetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760)), uintptr(0), uintptr(0), uintptr(0),
		*(*uintptr)(unsafe.Pointer(bp + 944)), TCL_LEAVE_ERR_MSG,
		*(*int32)(unsafe.Pointer(duiPtr + 4 + uintptr(i9)*4))) == uintptr(0)) {
		goto __5026
	}
	checkInterp = 1

__5027:
	_objPtr37 = dictPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr37)).FrefCount, 1) <= 1) {
		goto __5030
	}
	XTclFreeObj(tls, _objPtr37)
__5030:
	;
	goto __5028
__5028:
	if 0 != 0 {
		goto __5027
	}
	goto __5029
__5029:
	;
	goto gotError
__5026:
	;
__5025:
	;
	checkInterp = 1
	goto __5015
__5015:
	i9++
	goto __5014
	goto __5016
__5016:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1) {
		goto __5031
	}
	goto __5032
__5031:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __5033
	}

	if !((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep) {
		goto __5035
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
__5035:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
__5036:
	;
	*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = dictPtr
	goto __5037
__5037:
	if 0 != 0 {
		goto __5036
	}
	goto __5038
__5038:
	;
	goto __5034
__5033:
	XTclFreeObj(tls, dictPtr)
__5034:
	;
__5032:
	;

__5039:
	;
	if !(0 == 0) {
		goto __5042
	}
	if !(0 != 0) {
		goto __5044
	}
	if !(0 > 0) {
		goto __5045
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5046
__5045:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5046:
	;
__5044:
	;
	pc += uintptr(9)
	goto cleanup0
	goto __5043
__5042:
	if !(0 != 0) {
		goto __5047
	}
	if !(0 > 0) {
		goto __5049
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5049:
	;
	pc += uintptr(9)
	switch 0 {
	case 1:
		goto __5051
	case 2:
		goto __5052
	case 0:
		goto __5053
	}
	goto __5050
__5051:
	goto cleanup1_pushObjResultPtr
__5052:
	goto cleanup2_pushObjResultPtr
__5053:
	goto __5050
__5050:
	;
	goto __5048
__5047:
	pc += uintptr(9)
	switch 0 {
	case 1:
		goto __5055
	case 2:
		goto __5056
	case 0:
		goto __5057
	}
	goto __5054
__5055:
	goto cleanup1
__5056:
	goto cleanup2
__5057:
	goto __5054
__5054:
	;
__5048:
	;
__5043:
	;
	goto __5040
__5040:
	if 0 != 0 {
		goto __5039
	}
	goto __5041
__5041:
	;

__324:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	opnd2 = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(5) + uintptr(3)))))

	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16
	duiPtr = (*AuxData)(unsafe.Pointer((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FauxDataArrayPtr + uintptr(opnd2)*16)).FclientData
__5058:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __5059
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __5058
__5059:
	;
	if !(!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) != 0) {
		goto __5060
	}
	dictPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __5061
__5060:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	dictPtr = XTclPtrGetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0), uintptr(0), 0,
		opnd)
	checkInterp = 1
__5061:
	;
	if !(dictPtr == uintptr(0)) {
		goto __5062
	}

__5063:
	;
	if !(1 == 0) {
		goto __5066
	}
	if !(0 != 0) {
		goto __5068
	}
	if !(0 > 0) {
		goto __5069
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5070
__5069:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5070:
	;
__5068:
	;
	pc += uintptr(9)
	goto cleanup0
	goto __5067
__5066:
	if !(0 != 0) {
		goto __5071
	}
	if !(0 > 0) {
		goto __5073
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5073:
	;
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __5075
	case 2:
		goto __5076
	case 0:
		goto __5077
	}
	goto __5074
__5075:
	goto cleanup1_pushObjResultPtr
__5076:
	goto cleanup2_pushObjResultPtr
__5077:
	goto __5074
__5074:
	;
	goto __5072
__5071:
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __5079
	case 2:
		goto __5080
	case 0:
		goto __5081
	}
	goto __5078
__5079:
	goto cleanup1
__5080:
	goto cleanup2
__5081:
	goto __5078
__5078:
	;
__5072:
	;
__5067:
	;
	goto __5064
__5064:
	if 0 != 0 {
		goto __5063
	}
	goto __5065
__5065:
	;
__5062:
	;
	if !(XTcl_DictObjSize(tls, interp, dictPtr, bp+704) != TCL_OK ||
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*uintptr)(unsafe.Pointer(bp + 960)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)) + 16
					*(*int32)(unsafe.Pointer(bp + 704)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tosPtr)) + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(tosPtr)), bp+704, bp+960)
		}() != TCL_OK) {
		goto __5082
	}

	goto gotError
__5082:
	;
	allocdict = libc.Bool32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount > 1)
	if !(allocdict != 0) {
		goto __5083
	}
	dictPtr = XTcl_DuplicateObj(tls, dictPtr)
__5083:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 704)) > 0) {
		goto __5084
	}
__5085:
	_isobjPtr11 = dictPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr11)).Fbytes != uintptr(0)) {
		goto __5088
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr11)).Fbytes != XtclEmptyStringRep) {
		goto __5089
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr11)).Fbytes)
__5089:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr11)).Fbytes = uintptr(0)
__5088:
	;
	goto __5086
__5086:
	if 0 != 0 {
		goto __5085
	}
	goto __5087
__5087:
	;
__5084:
	;
	i9 = 0
__5090:
	if !(i9 < *(*int32)(unsafe.Pointer(bp + 704))) {
		goto __5092
	}
	var2Ptr = compiledLocals + uintptr(*(*int32)(unsafe.Pointer(duiPtr + 4 + uintptr(i9)*4)))*16

__5093:
	if !((*Var)(unsafe.Pointer(var2Ptr)).Fflags&VAR_LINK != 0) {
		goto __5094
	}
	var2Ptr = *(*uintptr)(unsafe.Pointer(var2Ptr + 8))
	goto __5093
__5094:
	;
	if !(!((*Var)(unsafe.Pointer(var2Ptr)).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_READ) != 0) && *(*uintptr)(unsafe.Pointer(var2Ptr + 8)) != 0) {
		goto __5095
	}
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(var2Ptr + 8))
	goto __5096
__5095:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = XTclPtrGetVarIdx(tls, interp, var2Ptr, uintptr(0), uintptr(0), uintptr(0),
		0, *(*int32)(unsafe.Pointer(duiPtr + 4 + uintptr(i9)*4)))
	checkInterp = 1
__5096:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 944)) == uintptr(0)) {
		goto __5097
	}
	XTcl_DictObjRemove(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 960 /* keyPtrPtr */)) + uintptr(i9)*8)))
	goto __5098
__5097:
	if !(dictPtr == *(*uintptr)(unsafe.Pointer(bp + 944))) {
		goto __5099
	}
	XTcl_DictObjPut(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 960 /* keyPtrPtr */)) + uintptr(i9)*8)),
		XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */))))
	goto __5100
__5099:
	XTcl_DictObjPut(tls, interp, dictPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 960 /* keyPtrPtr */)) + uintptr(i9)*8)), *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__5100:
	;
__5098:
	;
	goto __5091
__5091:
	i9++
	goto __5090
	goto __5092
__5092:
	;
	if !!((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&(VAR_ARRAY|VAR_LINK|VAR_TRACED_WRITE|VAR_DEAD_HASH) != 0) {
		goto __5101
	}
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount++
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FrefCount, 1) > 1) {
		goto __5103
	}
	goto __5104
__5103:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __5105
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes != XtclEmptyStringRep) {
		goto __5107
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Fbytes)
__5107:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))).Flength = -1
__5108:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __5109
__5109:
	if 0 != 0 {
		goto __5108
	}
	goto __5110
__5110:
	;
	goto __5106
__5105:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)))
__5106:
	;
__5104:
	;

	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8)) = dictPtr
	goto __5102
__5101:
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclPtrSetVarIdx(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0), uintptr(0),
		dictPtr, TCL_LEAVE_ERR_MSG, opnd)
	checkInterp = 1
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == uintptr(0)) {
		goto __5111
	}
	if !(allocdict != 0) {
		goto __5112
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount, 1) > 1) {
		goto __5113
	}
	goto __5114
__5113:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __5115
	}

	if !((*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes != XtclEmptyStringRep) {
		goto __5117
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes)
__5117:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = -1
__5118:
	;
	*(*uintptr)(unsafe.Pointer(dictPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = dictPtr
	goto __5119
__5119:
	if 0 != 0 {
		goto __5118
	}
	goto __5120
__5120:
	;
	goto __5116
__5115:
	XTclFreeObj(tls, dictPtr)
__5116:
	;
__5114:
	;

__5112:
	;

	goto gotError
__5111:
	;
__5102:
	;

__5121:
	;
	if !(1 == 0) {
		goto __5124
	}
	if !(0 != 0) {
		goto __5126
	}
	if !(0 > 0) {
		goto __5127
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5128
__5127:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5128:
	;
__5126:
	;
	pc += uintptr(9)
	goto cleanup0
	goto __5125
__5124:
	if !(0 != 0) {
		goto __5129
	}
	if !(0 > 0) {
		goto __5131
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5131:
	;
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __5133
	case 2:
		goto __5134
	case 0:
		goto __5135
	}
	goto __5132
__5133:
	goto cleanup1_pushObjResultPtr
__5134:
	goto cleanup2_pushObjResultPtr
__5135:
	goto __5132
__5132:
	;
	goto __5130
__5129:
	pc += uintptr(9)
	switch 1 {
	case 1:
		goto __5137
	case 2:
		goto __5138
	case 0:
		goto __5139
	}
	goto __5136
__5137:
	goto cleanup1
__5138:
	goto cleanup2
__5139:
	goto __5136
__5136:
	;
__5130:
	;
__5125:
	;
	goto __5122
__5122:
	if 0 != 0 {
		goto __5121
	}
	goto __5123
__5123:
	;

__325:
	dictPtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	listPtr3 = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(listPtr3)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(listPtr3 + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listPtr3 + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, listPtr3, bp+720, bp+712)
	}() != TCL_OK) {
		goto __5140
	}

	goto gotError
__5140:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTclDictWithInit(tls, interp, dictPtr, *(*int32)(unsafe.Pointer(bp + 720 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)))
	if !(*(*uintptr)(unsafe.Pointer(bp + 936)) == uintptr(0)) {
		goto __5141
	}

	goto gotError
__5141:
	;

__5142:
	;
	if !(2 == 0) {
		goto __5145
	}
	if !(1 != 0) {
		goto __5147
	}
	if !(1 > 0) {
		goto __5148
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5149
__5148:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5149:
	;
__5147:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __5146
__5145:
	if !(1 != 0) {
		goto __5150
	}
	if !(1 > 0) {
		goto __5152
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5152:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __5154
	case 2:
		goto __5155
	case 0:
		goto __5156
	}
	goto __5153
__5154:
	goto cleanup1_pushObjResultPtr
__5155:
	goto cleanup2_pushObjResultPtr
__5156:
	goto __5153
__5153:
	;
	goto __5151
__5150:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __5158
	case 2:
		goto __5159
	case 0:
		goto __5160
	}
	goto __5157
__5158:
	goto cleanup1
__5159:
	goto cleanup2
__5160:
	goto __5157
__5157:
	;
__5151:
	;
__5146:
	;
	goto __5143
__5143:
	if 0 != 0 {
		goto __5142
	}
	goto __5144
__5144:
	;

__326:
	keysPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	varNamePtr = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	listPtr3 = *(*uintptr)(unsafe.Pointer(tosPtr))

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(listPtr3)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(listPtr3 + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listPtr3 + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, listPtr3, bp+720, bp+712)
	}() != TCL_OK) {
		goto __5161
	}

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keysPtr)).FrefCount, 1) > 1) {
		goto __5162
	}
	goto __5163
__5162:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __5164
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != XtclEmptyStringRep) {
		goto __5166
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes)
__5166:
	;
	(*Tcl_Obj)(unsafe.Pointer(keysPtr)).Flength = -1
__5167:
	;
	*(*uintptr)(unsafe.Pointer(keysPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = keysPtr
	goto __5168
__5168:
	if 0 != 0 {
		goto __5167
	}
	goto __5169
__5169:
	;
	goto __5165
__5164:
	XTclFreeObj(tls, keysPtr)
__5165:
	;
__5163:
	;

	goto gotError
__5161:
	;
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = XTclObjLookupVarEx(tls, interp, varNamePtr, uintptr(0),
		TCL_LEAVE_ERR_MSG, ts+5888, 1, 1, bp+728)
	if !(*(*uintptr)(unsafe.Pointer(bp + 760)) == uintptr(0)) {
		goto __5170
	}

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keysPtr)).FrefCount, 1) > 1) {
		goto __5171
	}
	goto __5172
__5171:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __5173
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != XtclEmptyStringRep) {
		goto __5175
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes)
__5175:
	;
	(*Tcl_Obj)(unsafe.Pointer(keysPtr)).Flength = -1
__5176:
	;
	*(*uintptr)(unsafe.Pointer(keysPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = keysPtr
	goto __5177
__5177:
	if 0 != 0 {
		goto __5176
	}
	goto __5178
__5178:
	;
	goto __5174
__5173:
	XTclFreeObj(tls, keysPtr)
__5174:
	;
__5172:
	;

	goto gotError
__5170:
	;
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	result = XTclDictWithFinish(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), *(*uintptr)(unsafe.Pointer(bp + 728 /* arrayPtr */)), varNamePtr, uintptr(0), -1,
		*(*int32)(unsafe.Pointer(bp + 720 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)), keysPtr)
	checkInterp = 1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(keysPtr)).FrefCount, 1) > 1) {
		goto __5179
	}
	goto __5180
__5179:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keysPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __5181
	}

	if !((*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes != XtclEmptyStringRep) {
		goto __5183
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(keysPtr)).Fbytes)
__5183:
	;
	(*Tcl_Obj)(unsafe.Pointer(keysPtr)).Flength = -1
__5184:
	;
	*(*uintptr)(unsafe.Pointer(keysPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = keysPtr
	goto __5185
__5185:
	if 0 != 0 {
		goto __5184
	}
	goto __5186
__5186:
	;
	goto __5182
__5181:
	XTclFreeObj(tls, keysPtr)
__5182:
	;
__5180:
	;

	if !(result != TCL_OK) {
		goto __5187
	}

	goto gotError
__5187:
	;

__5188:
	;
	if !(2 == 0) {
		goto __5191
	}
	if !(0 != 0) {
		goto __5193
	}
	if !(0 > 0) {
		goto __5194
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5195
__5194:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5195:
	;
__5193:
	;
	pc += uintptr(1)
	goto cleanup0
	goto __5192
__5191:
	if !(0 != 0) {
		goto __5196
	}
	if !(0 > 0) {
		goto __5198
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5198:
	;
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __5200
	case 2:
		goto __5201
	case 0:
		goto __5202
	}
	goto __5199
__5200:
	goto cleanup1_pushObjResultPtr
__5201:
	goto cleanup2_pushObjResultPtr
__5202:
	goto __5199
__5199:
	;
	goto __5197
__5196:
	pc += uintptr(1)
	switch 2 {
	case 1:
		goto __5204
	case 2:
		goto __5205
	case 0:
		goto __5206
	}
	goto __5203
__5204:
	goto cleanup1
__5205:
	goto cleanup2
__5206:
	goto __5203
__5203:
	;
__5197:
	;
__5192:
	;
	goto __5189
__5189:
	if 0 != 0 {
		goto __5188
	}
	goto __5190
__5190:
	;

__327:
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	listPtr3 = *(*uintptr)(unsafe.Pointer(tosPtr - uintptr(1)*8))
	keysPtr = *(*uintptr)(unsafe.Pointer(tosPtr))
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = compiledLocals + uintptr(opnd)*16

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(listPtr3)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 712)) = *(*uintptr)(unsafe.Pointer(listPtr3 + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 720)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(listPtr3 + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, listPtr3, bp+720, bp+712)
	}() != TCL_OK) {
		goto __5207
	}

	goto gotError
__5207:
	;
__5208:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)))).Fflags&VAR_LINK != 0) {
		goto __5209
	}
	*(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 760)) + 8))
	goto __5208
__5209:
	;
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	result = XTclDictWithFinish(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 760 /* varPtr */)), uintptr(0), uintptr(0), uintptr(0), opnd,
		*(*int32)(unsafe.Pointer(bp + 720 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 712 /* objv */)), keysPtr)
	checkInterp = 1
	if !(result != TCL_OK) {
		goto __5210
	}

	goto gotError
__5210:
	;

__5211:
	;
	if !(2 == 0) {
		goto __5214
	}
	if !(0 != 0) {
		goto __5216
	}
	if !(0 > 0) {
		goto __5217
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5218
__5217:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5218:
	;
__5216:
	;
	pc += uintptr(5)
	goto cleanup0
	goto __5215
__5214:
	if !(0 != 0) {
		goto __5219
	}
	if !(0 > 0) {
		goto __5221
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5221:
	;
	pc += uintptr(5)
	switch 2 {
	case 1:
		goto __5223
	case 2:
		goto __5224
	case 0:
		goto __5225
	}
	goto __5222
__5223:
	goto cleanup1_pushObjResultPtr
__5224:
	goto cleanup2_pushObjResultPtr
__5225:
	goto __5222
__5222:
	;
	goto __5220
__5219:
	pc += uintptr(5)
	switch 2 {
	case 1:
		goto __5227
	case 2:
		goto __5228
	case 0:
		goto __5229
	}
	goto __5226
__5227:
	goto cleanup1
__5228:
	goto cleanup2
__5229:
	goto __5226
__5226:
	;
__5220:
	;
__5215:
	;
	goto __5212
__5212:
	if 0 != 0 {
		goto __5211
	}
	goto __5213
__5213:
	;

	goto __141

	//	   End of dictionary-related instructions.
	// -----------------------------------------------------------------

__328:

	switch uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1)))) {
	case uint32(0):
		goto __5231
	case uint32(1):
		goto __5232
	case uint32(2):
		goto __5233
	case uint32(3):
		goto __5234
	default:
		goto __5235
	}
	goto __5230
__5231: // clicks
	wval = XTclpGetWideClicks(tls)
	goto __5230
__5232: // microseconds
	XTcl_GetTime(tls, bp+968)
	wval = Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp+968)).Fsec)*int64(1000000) + Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp+968)).Fusec)
	goto __5230
__5233: // milliseconds
	XTcl_GetTime(tls, bp+968)
	wval = Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp+968)).Fsec)*int64(1000) + Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp+968)).Fusec/1000)
	goto __5230
__5234: // seconds
	XTcl_GetTime(tls, bp+968)
	wval = Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp + 968 /* &now */)).Fsec)
	goto __5230
__5235:
	XTcl_Panic(tls, ts+29642, 0)
__5230:
	;
	*(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */)) = XTcl_NewWideIntObj(tls, wval)

__5236:
	;
	if !(0 == 0) {
		goto __5239
	}
	if !(1 != 0) {
		goto __5241
	}
	if !(1 > 0) {
		goto __5242
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5243
__5242:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5243:
	;
__5241:
	;
	pc += uintptr(2)
	goto cleanup0
	goto __5240
__5239:
	if !(1 != 0) {
		goto __5244
	}
	if !(1 > 0) {
		goto __5246
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5246:
	;
	pc += uintptr(2)
	switch 0 {
	case 1:
		goto __5248
	case 2:
		goto __5249
	case 0:
		goto __5250
	}
	goto __5247
__5248:
	goto cleanup1_pushObjResultPtr
__5249:
	goto cleanup2_pushObjResultPtr
__5250:
	goto __5247
__5247:
	;
	goto __5245
__5244:
	pc += uintptr(2)
	switch 0 {
	case 1:
		goto __5252
	case 2:
		goto __5253
	case 0:
		goto __5254
	}
	goto __5251
__5252:
	goto cleanup1
__5253:
	goto cleanup2
__5254:
	goto __5251
__5251:
	;
__5245:
	;
__5240:
	;
	goto __5237
__5237:
	if 0 != 0 {
		goto __5236
	}
	goto __5238
__5238:
	;

	goto __141

__329:
	XTcl_Panic(tls, ts+29684, libc.VaList(bp+608, int32(*(*uint8)(unsafe.Pointer(pc)))))
__141:
	; /* end of switch on opCode */

	/*
	 * Block for variables needed to process exception returns.
	 */

	// An external evaluation (INST_INVOKE or INST_EVAL) returned
	// something different from TCL_OK, or else INST_BREAK or
	// INST_CONTINUE were called.

processExceptionReturn:
	if !(result == TCL_CONTINUE || result == TCL_BREAK) {
		goto __5255
	}
	rangePtr = sGetExceptRangeForPc(tls, pc, result, (*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)
	if !(rangePtr == uintptr(0)) {
		goto __5256
	}

	goto abnormalReturn
__5256:
	;
	if !((*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype == CATCH_EXCEPTION_RANGE) {
		goto __5257
	}

	goto processCatch
__5257:
	;
__5258:
	if !(libc.PostDecInt32(&cleanup, 1) != 0) {
		goto __5259
	}
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount, 1) > 1) {
		goto __5260
	}
	goto __5261
__5260:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __5262
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != XtclEmptyStringRep) {
		goto __5264
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes)
__5264:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength = -1
__5265:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 944))
	goto __5266
__5266:
	if 0 != 0 {
		goto __5265
	}
	goto __5267
__5267:
	;
	goto __5263
__5262:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__5263:
	;
__5261:
	;

	goto __5258
__5259:
	;
	if !(result == TCL_BREAK) {
		goto __5268
	}
	result = TCL_OK
	pc = (*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FcodeStart + uintptr((*ExceptionRange)(unsafe.Pointer(rangePtr)).FbreakOffset)

__5269:
	;
	if !(0 == 0) {
		goto __5272
	}
	if !(0 != 0) {
		goto __5274
	}
	if !(0 > 0) {
		goto __5275
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5276
__5275:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5276:
	;
__5274:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __5273
__5272:
	if !(0 != 0) {
		goto __5277
	}
	if !(0 > 0) {
		goto __5279
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5279:
	;
	pc += uintptr(0)
	switch 0 {
	case 1:
		goto __5281
	case 2:
		goto __5282
	case 0:
		goto __5283
	}
	goto __5280
__5281:
	goto cleanup1_pushObjResultPtr
__5282:
	goto cleanup2_pushObjResultPtr
__5283:
	goto __5280
__5280:
	;
	goto __5278
__5277:
	pc += uintptr(0)
	switch 0 {
	case 1:
		goto __5285
	case 2:
		goto __5286
	case 0:
		goto __5287
	}
	goto __5284
__5285:
	goto cleanup1
__5286:
	goto cleanup2
__5287:
	goto __5284
__5284:
	;
__5278:
	;
__5273:
	;
	goto __5270
__5270:
	if 0 != 0 {
		goto __5269
	}
	goto __5271
__5271:
	;
__5268:
	;
	if !((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset == -1) {
		goto __5288
	}

	goto checkForCatch
__5288:
	;
	result = TCL_OK
	pc = (*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FcodeStart + uintptr((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset)

__5289:
	;
	if !(0 == 0) {
		goto __5292
	}
	if !(0 != 0) {
		goto __5294
	}
	if !(0 > 0) {
		goto __5295
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5296
__5295:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5296:
	;
__5294:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __5293
__5292:
	if !(0 != 0) {
		goto __5297
	}
	if !(0 > 0) {
		goto __5299
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5299:
	;
	pc += uintptr(0)
	switch 0 {
	case 1:
		goto __5301
	case 2:
		goto __5302
	case 0:
		goto __5303
	}
	goto __5300
__5301:
	goto cleanup1_pushObjResultPtr
__5302:
	goto cleanup2_pushObjResultPtr
__5303:
	goto __5300
__5300:
	;
	goto __5298
__5297:
	pc += uintptr(0)
	switch 0 {
	case 1:
		goto __5305
	case 2:
		goto __5306
	case 0:
		goto __5307
	}
	goto __5304
__5305:
	goto cleanup1
__5306:
	goto cleanup2
__5307:
	goto __5304
__5304:
	;
__5298:
	;
__5293:
	;
	goto __5290
__5290:
	if 0 != 0 {
		goto __5289
	}
	goto __5291
__5291:
	;
__5255:
	;
	goto checkForCatch

	// Division by zero in an expression. Control only reaches this point
	// by "goto divideByZero".

divideByZero:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+29729, -1))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+616, ts+8778, ts+29744, ts+29729, uintptr(0)))
	checkInterp = 1
	goto gotError

	// Exponentiation of zero by negative number in an expression. Control
	// only reaches this point by "goto exponOfZero".

exponOfZero:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+29752, -1))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+648, ts+8778, ts+8784,
		ts+29752, uintptr(0)))
	checkInterp = 1

	// Almost all error paths feed through here rather than assigning to
	// result themselves (for a small but consistent saving).

gotError:
	result = TCL_ERROR

	// Execution has generated an "exception" such as TCL_ERROR. If the
	// exception is an error, record information about what was being
	// executed when the error occurred. Find the closest enclosing catch
	// range, if any. If no enclosing catch range is found, stop execution
	// and return the "exception" code.

checkForCatch:
	if !((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).Frewind != 0) {
		goto __5308
	}
	goto abnormalReturn
__5308:
	;
	if !(result == TCL_ERROR && !((*Interp)(unsafe.Pointer(interp)).Fflags&ERR_ALREADY_LOGGED != 0)) {
		goto __5309
	}

	bytes3 = sGetSrcInfoForPc(tls, pc, (*TEBCdata)(unsafe.Pointer(TD)).FcodePtr, bp+704, bp+976, uintptr(0))
	(*ExecStack)(unsafe.Pointer((*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FexecStackPtr)).FtosPtr = tosPtr
	XTclLogCommandInfo(tls, interp, (*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).Fsource, bytes3,
		func() int32 {
			if bytes3 != 0 {
				return *(*int32)(unsafe.Pointer(bp + 704 /* length */))
			}
			return 0
		}(), *(*uintptr)(unsafe.Pointer(bp + 976 /* pcBeg */)), tosPtr)
	checkInterp = 1
__5309:
	;
	*(*int32)(unsafe.Pointer(interp + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED)

	// Clear all expansions that may have started after the last
	// INST_BEGIN_CATCH.

__5310:
	if !((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList != 0) {
		goto __5311
	}
	if !((*TEBCdata)(unsafe.Pointer(TD)).FcatchTop != TD+112-uintptr(1)*8 &&
		*(*Ptrdiff_t)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcatchTop)) > Ptrdiff_t(*(*uintptr)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList + 32 + 8)))) {
		goto __5312
	}
	goto __5311
__5312:
	;
__5313:
	tmpPtr = (*TEBCdata)(unsafe.Pointer(TD)).FauxObjList
	(*TEBCdata)(unsafe.Pointer(TD)).FauxObjList = *(*uintptr)(unsafe.Pointer(tmpPtr + 32))
__5316:
	_objPtr38 = tmpPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr38)).FrefCount, 1) <= 1) {
		goto __5319
	}
	XTclFreeObj(tls, _objPtr38)
__5319:
	;
	goto __5317
__5317:
	if 0 != 0 {
		goto __5316
	}
	goto __5318
__5318:
	;
	goto __5314
__5314:
	if 0 != 0 {
		goto __5313
	}
	goto __5315
__5315:
	;
	goto __5310
__5311:
	;

	// We must not catch if the script in progress has been canceled with
	// the TCL_CANCEL_UNWIND flag. Instead, it blows outwards until we
	// either hit another interpreter (presumably where the script in
	// progress has not been canceled) or we get to the top-level. We do
	// NOT modify the interpreter result here because we know it will
	// already be set prior to vectoring down to this point in the code.

	if !(((*Interp)(unsafe.Pointer(interp)).Fflags&CANCELED != 0 || (*Interp)(unsafe.Pointer(interp)).Fflags&TCL_CANCEL_UNWIND != 0) && XTcl_Canceled(tls, interp, 0) == TCL_ERROR) {
		goto __5320
	}
	goto abnormalReturn
__5320:
	;

	// We must not catch an exceeded limit. Instead, it blows outwards
	// until we either hit another interpreter (presumably where the limit
	// is not exceeded) or we get to the top-level.

	if !((*Interp)(unsafe.Pointer(interp)).Flimit.Fexceeded != 0) {
		goto __5321
	}
	goto abnormalReturn
__5321:
	;
	if !((*TEBCdata)(unsafe.Pointer(TD)).FcatchTop == TD+112-uintptr(1)*8) {
		goto __5322
	}
	goto abnormalReturn
__5322:
	;
	rangePtr = sGetExceptRangeForPc(tls, pc, TCL_ERROR, (*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)
	if !(rangePtr == uintptr(0)) {
		goto __5323
	}
	// This is only possible when compiling a [catch] that sends its
	// script to INST_EVAL. Cannot correct the compiler without
	// breaking compat with previous .tbc compiled scripts.

	goto abnormalReturn
__5323:
	;

	// A catch exception range (rangePtr) was found to handle an
	// "exception". It was found either by checkForCatch just above or by
	// an instruction during break, continue, or error processing. Jump to
	// its catchOffset after unwinding the operand stack to the depth it
	// had when starting to execute the range's catch command.

processCatch:
__5324:
	if !((int64(tosPtr)-int64(TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8))/8 > *(*Ptrdiff_t)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcatchTop))) {
		goto __5325
	}
	*(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)) = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FrefCount, 1) > 1) {
		goto __5326
	}
	goto __5327
__5326:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __5328
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes != XtclEmptyStringRep) {
		goto __5330
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Fbytes)
__5330:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)))).Flength = -1
__5331:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 944)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 944))
	goto __5332
__5332:
	if 0 != 0 {
		goto __5331
	}
	goto __5333
__5333:
	;
	goto __5329
__5328:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 944 /* valuePtr */)))
__5329:
	;
__5327:
	;

	goto __5324
__5325:
	;
	pc = (*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FcodeStart + uintptr((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcatchOffset)
__5334:
	;
	if !(0 == 0) {
		goto __5337
	}
	if !(0 != 0) {
		goto __5339
	}
	if !(0 > 0) {
		goto __5340
	}
	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), *(*uintptr)(unsafe.Pointer(bp + 936))))).FrefCount++
	goto __5341
__5340:
	*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&tosPtr, 8))) = *(*uintptr)(unsafe.Pointer(bp + 936 /* objResultPtr */))
__5341:
	;
__5339:
	;
	pc += uintptr(0)
	goto cleanup0
	goto __5338
__5337:
	if !(0 != 0) {
		goto __5342
	}
	if !(0 > 0) {
		goto __5344
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 936)))).FrefCount++
__5344:
	;
	pc += uintptr(0)
	switch 0 {
	case 1:
		goto __5346
	case 2:
		goto __5347
	case 0:
		goto __5348
	}
	goto __5345
__5346:
	goto cleanup1_pushObjResultPtr
__5347:
	goto cleanup2_pushObjResultPtr
__5348:
	goto __5345
__5345:
	;
	goto __5343
__5342:
	pc += uintptr(0)
	switch 0 {
	case 1:
		goto __5350
	case 2:
		goto __5351
	case 0:
		goto __5352
	}
	goto __5349
__5350:
	goto cleanup1
__5351:
	goto cleanup2
__5352:
	goto __5349
__5349:
	;
__5343:
	;
__5338:
	;
	goto __5335
__5335:
	if 0 != 0 {
		goto __5334
	}
	goto __5336
__5336:
	; // Restart the execution loop at pc.

	// end of infinite loop dispatching on instructions.

	// Done or abnormal return code. Restore the stack to state it had when
	// starting to execute the ByteCode. Panic if the stack is below the
	// initial level.

abnormalReturn:
__5353:
	if !(0 != 0 && curInstName != 0) {
		goto __5356
	}

__5356:
	;
	goto __5354
__5354:
	if 0 != 0 {
		goto __5353
	}
	goto __5355
__5355:
	;

	// Clear all expansions and same-level NR calls.
	//
	// Note that expansion markers have a NULL type; avoid removing other
	// markers.

__5357:
	if !((*TEBCdata)(unsafe.Pointer(TD)).FauxObjList != 0) {
		goto __5358
	}
__5359:
	tmpPtr = (*TEBCdata)(unsafe.Pointer(TD)).FauxObjList
	(*TEBCdata)(unsafe.Pointer(TD)).FauxObjList = *(*uintptr)(unsafe.Pointer(tmpPtr + 32))
__5362:
	_objPtr39 = tmpPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr39)).FrefCount, 1) <= 1) {
		goto __5365
	}
	XTclFreeObj(tls, _objPtr39)
__5365:
	;
	goto __5363
__5363:
	if 0 != 0 {
		goto __5362
	}
	goto __5364
__5364:
	;
	goto __5360
__5360:
	if 0 != 0 {
		goto __5359
	}
	goto __5361
__5361:
	;
	goto __5357
__5358:
	;
__5366:
	if !(tosPtr > TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8) {
		goto __5367
	}
	objPtr = *(*uintptr)(unsafe.Pointer(libc.PostDecUintptr(&tosPtr, 8)))
__5368:
	_objPtr40 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr40)).FrefCount, 1) <= 1) {
		goto __5371
	}
	XTclFreeObj(tls, _objPtr40)
__5371:
	;
	goto __5369
__5369:
	if 0 != 0 {
		goto __5368
	}
	goto __5370
__5370:
	;
	goto __5366
__5367:
	;

	if !(tosPtr < TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8) {
		goto __5372
	}
	libc.Xfprintf(tls, libc.X__acrt_iob_func(tls, uint32(2)),

		ts+29793,
		libc.VaList(bp+680, uint32((int64(pc)-int64((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FcodeStart))/1),
			uint32((int64(tosPtr)-int64(TD+112-uintptr(1)*8+uintptr((*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FmaxExceptDepth)*8))/8), uint32(0)))
	XTcl_Panic(tls, ts+29877, 0)
__5372:
	;

	(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr = (*CmdFrame)(unsafe.Pointer(TD + 24)).FnextPtr
	if !(libc.PostDecInt32(&(*ByteCode)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)).FrefCount, 1) <= 1) {
		goto __5373
	}
	XTclCleanupByteCode(tls, (*TEBCdata)(unsafe.Pointer(TD)).FcodePtr)
__5373:
	;
	XTclStackFree(tls, interp, TD) // free my stack

	return result

	//
	//  INST_START_CMD failure case removed where it doesn't bother that much
	//
	//  Remark that if the interpreter is marked for deletion its
	//  compileEpoch is modified, so that the epoch check also verifies
	//  that the interp is not deleted. If no outside call has been made
	//  since the last check, it is safe to omit the check.
	//
	//      * case INST_START_CMD:
	//

instStartCmdFailed:

	*(*int32)(unsafe.Pointer(bp + 704 /* length */)) = 0

	if !(XTclInterpReady(tls, interp) == TCL_ERROR) {
		goto __5374
	}
	goto gotError
__5374:
	;

	// We used to switch to direct eval; for NRE-awareness we now
	// compile and eval the command so that this evaluation does not
	// add a new TEBC instance. Bug [2910748], bug [fa6bf38d07]
	//
	// TODO: recompile, search this command and eval a code starting from,
	// so that this evaluation does not add a new TEBC instance without
	// NRE-trampoline.

	*(*uint32)(unsafe.Pointer((*TEBCdata)(unsafe.Pointer(TD)).FcodePtr + 32)) |= uint32(TCL_BYTECODE_RECOMPILE)
	bytes4 = sGetSrcInfoForPc(tls, pc, (*TEBCdata)(unsafe.Pointer(TD)).FcodePtr, bp+704, uintptr(0), uintptr(0))
	opnd = int32(uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1))))<<24) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(1))))<<16) | uint32(int32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(2))))<<8) | uint32(*(*uint8)(unsafe.Pointer(pc + uintptr(1) + uintptr(3)))))
	pc += uintptr(opnd - 1)

	(*Tcl_Obj)(unsafe.Pointer(libc.AssignPtrUintptr(libc.PreIncUintptr(&tosPtr, 8), XTcl_NewStringObj(tls, bytes4, *(*int32)(unsafe.Pointer(bp + 704)))))).FrefCount++
	goto instEvalStk

	return int32(0)
}

func sFinalizeOONext(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclExecute.c:8257:1: */
	var iPtr uintptr = interp
	var contextPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	// Reset the variable lookup frame.

	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = *(*ClientData)(unsafe.Pointer(data))

	// Restore the call chain context index as we've finished the inner invoke
	// and want to operate in the outer context again.

	(*CallContext)(unsafe.Pointer(contextPtr)).Findex = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))
	(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = int32(*(*ClientData)(unsafe.Pointer(data + 3*8)))
	*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr + 92)) &= libc.CplInt32(FILTER_HANDLING)
	return result
}

func sFinalizeOONextFilter(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclExecute.c:8283:1: */
	var iPtr uintptr = interp
	var contextPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	// Reset the variable lookup frame.

	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = *(*ClientData)(unsafe.Pointer(data))

	// Restore the call chain context index as we've finished the inner invoke
	// and want to operate in the outer context again.

	(*CallContext)(unsafe.Pointer(contextPtr)).Findex = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))
	(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = int32(*(*ClientData)(unsafe.Pointer(data + 3*8)))
	*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr + 92)) |= FILTER_HANDLING
	return result
}

// LongPwrSmallExpon -- , WidePwrSmallExpon --
//
// Helpers to calculate small powers of integers whose result is long or wide.
func sLongPwrSmallExpon(tls *libc.TLS, l1 int32, exponent int32) int32 { /* tclExecute.c:8315:1: */
	var lResult int32

	lResult = l1 * l1 // b**2
	switch exponent {
	case 2:
		break
	case 3:
		lResult = lResult * l1 // b**3
		break
	case 4:
		lResult = lResult * lResult // b**4
		break
	case 5:
		lResult = lResult * lResult // b**4
		lResult = lResult * l1      // b**5
		break
	case 6:
		lResult = lResult * l1      // b**3
		lResult = lResult * lResult // b**6
		break
	case 7:
		lResult = lResult * l1      // b**3
		lResult = lResult * lResult // b**6
		lResult = lResult * l1      // b**7
		break
	case 8:
		lResult = lResult * lResult // b**4
		lResult = lResult * lResult // b**8
		break
	}
	return lResult
}

func sWidePwrSmallExpon(tls *libc.TLS, w1 Tcl_WideInt, exponent int32) Tcl_WideInt { /* tclExecute.c:8351:1: */
	var wResult Tcl_WideInt

	wResult = w1 * w1 // b**2
	switch exponent {
	case 2:
		break
	case 3:
		wResult = wResult * w1 // b**3
		break
	case 4:
		wResult = wResult * wResult // b**4
		break
	case 5:
		wResult = wResult * wResult // b**4
		wResult = wResult * w1      // b**5
		break
	case 6:
		wResult = wResult * w1      // b**3
		wResult = wResult * wResult // b**6
		break
	case 7:
		wResult = wResult * w1      // b**3
		wResult = wResult * wResult // b**6
		wResult = wResult * w1      // b**7
		break
	case 8:
		wResult = wResult * wResult // b**4
		wResult = wResult * wResult // b**8
		break
	case 9:
		wResult = wResult * wResult // b**4
		wResult = wResult * wResult // b**8
		wResult = wResult * w1      // b**9
		break
	case 10:
		wResult = wResult * wResult // b**4
		wResult = wResult * w1      // b**5
		wResult = wResult * wResult // b**10
		break
	case 11:
		wResult = wResult * wResult // b**4
		wResult = wResult * w1      // b**5
		wResult = wResult * wResult // b**10
		wResult = wResult * w1      // b**11
		break
	case 12:
		wResult = wResult * w1      // b**3
		wResult = wResult * wResult // b**6
		wResult = wResult * wResult // b**12
		break
	case 13:
		wResult = wResult * w1      // b**3
		wResult = wResult * wResult // b**6
		wResult = wResult * wResult // b**12
		wResult = wResult * w1      // b**13
		break
	case 14:
		wResult = wResult * w1      // b**3
		wResult = wResult * wResult // b**6
		wResult = wResult * w1      // b**7
		wResult = wResult * wResult // b**14
		break
	case 15:
		wResult = wResult * w1      // b**3
		wResult = wResult * wResult // b**6
		wResult = wResult * w1      // b**7
		wResult = wResult * wResult // b**14
		wResult = wResult * w1      // b**15
		break
	case 16:
		wResult = wResult * wResult // b**4
		wResult = wResult * wResult // b**8
		wResult = wResult * wResult // b**16
		break
	}
	return wResult
}

//----------------------------------------------------------------------
//
// ExecuteExtendedBinaryMathOp, ExecuteExtendedUnaryMathOp --
//
//	These functions do advanced math for binary and unary operators
//	respectively, so that the main TEBC code does not bear the cost of
//	them.
//
// Results:
//	A Tcl_Obj* result, or a NULL (in which case valuePtr is updated to
//	hold the result value), or one of the special flag values
//	GENERAL_ARITHMETIC_ERROR, EXPONENT_OF_ZERO or DIVIDED_BY_ZERO. The
//	latter two signify a zero value raised to a negative power or a value
//	divided by zero, respectively. With GENERAL_ARITHMETIC_ERROR, all
//	error information will have already been reported in the interpreter
//	result.
//
// Side effects:
//	May update the Tcl_Obj indicated valuePtr if it is unshared. Will
//	return a NULL when that happens.
//
//----------------------------------------------------------------------

func sExecuteExtendedBinaryMathOp(tls *libc.TLS, interp uintptr, opcode int32, constants uintptr, valuePtr uintptr, value2Ptr uintptr) uintptr { /* tclExecute.c:8455:16: */
	bp := tls.Alloc(160)
	defer tls.Free(160)

	// var type1 int32 at bp, 4

	// var type2 int32 at bp+16, 4

	// var ptr1 ClientData at bp+8, 8

	// var ptr2 ClientData at bp+24, 8

	// var d1 float64 at bp+144, 8

	// var d2 float64 at bp+152, 8

	var dResult float64
	var l1 int32
	var l2 int32
	var lResult int32
	// var w1 Tcl_WideInt at bp+136, 8

	// var w2 Tcl_WideInt at bp+32, 8

	var wResult Tcl_WideInt
	// var big1 Mp_int at bp+64, 24

	// var big2 Mp_int at bp+40, 24

	// var bigResult Mp_int at bp+88, 24

	// var bigRemainder Mp_int at bp+112, 24

	var objResultPtr uintptr
	var invalid int32
	var zero int32
	var shift int32
	var wQuotient Tcl_WideInt
	var wRemainder Tcl_WideInt
	var signum int32
	var oddExponent int32
	var negativeExponent int32
	var base uint16

	if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
		*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_LONG
		*(*ClientData)(unsafe.Pointer(bp + 8)) = valuePtr + 32
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_WIDE
			*(*ClientData)(unsafe.Pointer(bp + 8)) = valuePtr + 32
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
				if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(valuePtr + 32))) != 0 {
					*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_NAN
				} else {
					*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_DOUBLE
				}
				*(*ClientData)(unsafe.Pointer(bp + 8)) = valuePtr + 32
			} else {
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength == 0 {
					*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_LONG
				} else {
					XTclGetNumberFromObj(tls, uintptr(0), valuePtr, bp+8, bp)
				}
			}
		}
	}
	if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
		*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_LONG
		*(*ClientData)(unsafe.Pointer(bp + 24)) = value2Ptr + 32
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_WIDE
			*(*ClientData)(unsafe.Pointer(bp + 24)) = value2Ptr + 32
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
				if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(value2Ptr + 32))) != 0 {
					*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_NAN
				} else {
					*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_DOUBLE
				}
				*(*ClientData)(unsafe.Pointer(bp + 24)) = value2Ptr + 32
			} else {
				if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength == 0 {
					*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_LONG
				} else {
					XTclGetNumberFromObj(tls, uintptr(0), value2Ptr, bp+24, bp+16)
				}
			}
		}
	}

	switch opcode {
	case INST_MOD:
		goto __2

	case INST_LSHIFT:
		goto __3
	case INST_RSHIFT:
		goto __4

	case INST_BITOR:
		goto __5
	case INST_BITXOR:
		goto __6
	case INST_BITAND:
		goto __7

	case INST_EXPON:
		goto __8

	case INST_ADD:
		goto __9
	case INST_SUB:
		goto __10
	case INST_MULT:
		goto __11
	case INST_DIV:
		goto __12
	}
	goto __1
__2:
	// TODO: Attempts to re-use unshared operands on stack

	l2 = 0 // silence gcc warning
	if !(*(*int32)(unsafe.Pointer(bp + 16)) == TCL_NUMBER_LONG) {
		goto __13
	}
	l2 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
	if !(l2 == 0) {
		goto __14
	}
	return libc.UintptrFromInt32(-1)
__14:
	;
	if !(l2 == 1 || l2 == -1) {
		goto __15
	}
	// Div. by |1| always yields remainder of 0.

	return *(*uintptr)(unsafe.Pointer(constants))
__15:
	;
__13:
	;
	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_WIDE) {
		goto __16
	}
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* w1 */)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
	if !(*(*int32)(unsafe.Pointer(bp + 16)) != TCL_NUMBER_BIG) {
		goto __17
	}
	if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
		*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = *(*Tcl_WideInt)(unsafe.Pointer(value2Ptr + 32))
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(value2Ptr + 32)))
		} else {
			XTcl_GetWideIntFromObj(tls, uintptr(0), value2Ptr, bp+32)
		}
	}
	wQuotient = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) / *(*Tcl_WideInt)(unsafe.Pointer(bp + 32))

	// Force Tcl's integer division rules.
	// TODO: examine for logic simplification

	if !((wQuotient < int64(0) ||
		wQuotient == int64(0) &&
			(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) < int64(0) && *(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) > int64(0) ||
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) > int64(0) && *(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) < int64(0))) &&
		wQuotient**(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) != *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))) {
		goto __18
	}
	wQuotient = wQuotient - int64(1)
__18:
	;
	wRemainder = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) - *(*Tcl_WideInt)(unsafe.Pointer(bp + 32))*wQuotient
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __19
	}
	return XTcl_NewWideIntObj(tls, wRemainder)
	goto __20
__19:
	XTcl_SetWideIntObj(tls, valuePtr, wRemainder)
	return uintptr(0)
__20:
	;

__17:
	;

	XTcl_TakeBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)

	// TODO: internals intrusion
	if !(libc.Bool32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) > int64(0))^libc.BoolInt32(!(func() int32 {
		if (*Mp_int)(unsafe.Pointer(bp+40)).Fsign != MP_ZPOS {
			return MP_YES
		}
		return MP_NO
	}() != 0)) != 0) {
		goto __21
	}
	// Arguments are opposite sign; remainder is sum.

	XTclBNInitBignumFromWideInt(tls, bp+64, *(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* w1 */)))
	XTclBN_mp_add(tls, bp+40, bp+64, bp+40)
	XTclBN_mp_clear(tls, bp+64)
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __22
	}
	return XTcl_NewBignumObj(tls, bp+40)
	goto __23
__22:
	XTcl_SetBignumObj(tls, valuePtr, bp+40)
	return uintptr(0)
__23:
	;

__21:
	;

	// Arguments are same sign; remainder is first operand.

	XTclBN_mp_clear(tls, bp+40)
	return uintptr(0)
__16:
	;
	XTcl_GetBignumFromObj(tls, uintptr(0), valuePtr, bp+64)
	XTcl_GetBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)
	XTclBN_mp_init(tls, bp+88)
	XTclBN_mp_init(tls, bp+112)
	XTclBN_mp_div(tls, bp+64, bp+40, bp+88, bp+112)
	if !(!(func() int32 {
		if (*Mp_int)(unsafe.Pointer(bp+112)).Fused == 0 {
			return MP_YES
		}
		return MP_NO
	}() != 0) && (*Mp_int)(unsafe.Pointer(bp+112)).Fsign != (*Mp_int)(unsafe.Pointer(bp+40)).Fsign) {
		goto __24
	}
	// Convert to Tcl's integer division rules.

	XTclBN_mp_sub_d(tls, bp+88, uint32(1), bp+88)
	XTclBN_mp_add(tls, bp+112, bp+40, bp+112)
__24:
	;
	XTclBN_mp_copy(tls, bp+112, bp+88)
	XTclBN_mp_clear(tls, bp+112)
	XTclBN_mp_clear(tls, bp+64)
	XTclBN_mp_clear(tls, bp+40)
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __25
	}
	return XTcl_NewBignumObj(tls, bp+88)
	goto __26
__25:
	XTcl_SetBignumObj(tls, valuePtr, bp+88)
	return uintptr(0)
__26:
	;

__3:
__4:
	// Reject negative shift argument.

	switch *(*int32)(unsafe.Pointer(bp + 16 /* type2 */)) {
	case TCL_NUMBER_LONG:
		goto __28
	case TCL_NUMBER_WIDE:
		goto __29
	case TCL_NUMBER_BIG:
		goto __30
	default:
		goto __31
	}
	goto __27
__28:
	invalid = libc.Bool32(*(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24)))) < 0)
	goto __27
__29:
	invalid = libc.Bool32(*(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24)))) < int64(0))
	goto __27
__30:
	XTcl_TakeBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)
	invalid = libc.Bool32(XTclBN_mp_cmp_d(tls, bp+40, uint32(0)) == -1)
	XTclBN_mp_clear(tls, bp+40)
	goto __27
__31:
	// Unused, here to silence compiler warning
	invalid = 0
__27:
	;
	if !(invalid != 0) {
		goto __32
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+29427, -1))
	return libc.UintptrFromInt32(-3)
__32:
	;

	// Zero shifted any number of bits is still zero.

	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_LONG && *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8)))) == 0) {
		goto __33
	}
	return *(*uintptr)(unsafe.Pointer(constants))
__33:
	;

	if !(opcode == INST_LSHIFT) {
		goto __34
	}
	// Large left shifts create integer overflow.
	//
	// BEWARE! Can't use Tcl_GetIntFromObj() here because that
	// converts values in the (unsigned) range to their signed int
	// counterparts, leading to incorrect results.

	if !(*(*int32)(unsafe.Pointer(bp + 16)) != TCL_NUMBER_LONG ||
		*(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24)))) > 0x7fffffff) {
		goto __36
	}
	// Technically, we could hold the value (1 << (INT_MAX+1)) in
	// an mp_int, but since we're using mp_mul_2d() to do the
	// work, and it takes only an int argument, that's a good
	// place to draw the line.

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+11084, -1))
	return libc.UintptrFromInt32(-3)
__36:
	;
	shift = int32(int32(*(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))))

	// Handle shifts within the native wide range.

	if !(*(*int32)(unsafe.Pointer(bp)) != TCL_NUMBER_BIG &&
		Size_t(shift) < uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0)))) {
		goto __37
	}
	if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
		*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) = *(*Tcl_WideInt)(unsafe.Pointer(valuePtr + 32))
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(valuePtr + 32)))
		} else {
			XTcl_GetWideIntFromObj(tls, uintptr(0), valuePtr, bp+136)
		}
	}
	if !!(func() int64 {
		if *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) > int64(0) {
			return *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))
		}
		return ^*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))
	}()&
		-(Tcl_WideInt(int64(1))<<
			(uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0)))-uint64(1)-uint64(shift))) != 0) {
		goto __38
	}
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __39
	}
	return XTcl_NewWideIntObj(tls, *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))<<shift)
	goto __40
__39:
	XTcl_SetWideIntObj(tls, valuePtr, *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))<<shift)
	return uintptr(0)
__40:
	;

__38:
	;
__37:
	;
	goto __35
__34:
	// Quickly force large right shifts to 0 or -1.

	if !(*(*int32)(unsafe.Pointer(bp + 16)) != TCL_NUMBER_LONG ||
		*(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24)))) > 0x7fffffff) {
		goto __41
	}
	// Again, technically, the value to be shifted could be an
	// mp_int so huge that a right shift by (INT_MAX+1) bits could
	// not take us to the result of 0 or -1, but since we're using
	// mp_div_2d to do the work, and it takes only an int
	// argument, we draw the line there.

	switch *(*int32)(unsafe.Pointer(bp /* type1 */)) {
	case TCL_NUMBER_LONG:
		goto __43
	case TCL_NUMBER_WIDE:
		goto __44
	case TCL_NUMBER_BIG:
		goto __45
	default:
		goto __46
	}
	goto __42
__43:
	zero = libc.Bool32(*(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8)))) > 0)
	goto __42
__44:
	zero = libc.Bool32(*(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8)))) > int64(0))
	goto __42
__45:
	XTcl_TakeBignumFromObj(tls, uintptr(0), valuePtr, bp+64)
	zero = libc.Bool32(XTclBN_mp_cmp_d(tls, bp+64, uint32(0)) == MP_GT)
	XTclBN_mp_clear(tls, bp+64)
	goto __42
__46:
	// Unused, here to silence compiler warning.
	zero = 0
__42:
	;
	if !(zero != 0) {
		goto __47
	}
	return *(*uintptr)(unsafe.Pointer(constants))
__47:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __48
	}
__50:
	;
__53:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __56
	}
	XTclAllocateFreeObjects(tls)
__56:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __51
__51:
	if 0 != 0 {
		goto __50
	}
	goto __52
__52:
	;
	return objResultPtr
	goto __49
__48:
	XTcl_SetLongObj(tls, valuePtr, -1)
	return uintptr(0)
__49:
	;

__41:
	;
	shift = int32(int32(*(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))))

	// Handle shifts within the native wide range.

	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_WIDE) {
		goto __57
	}
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* w1 */)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8 /* ptr1 */))))
	if !(Size_t(shift) >= uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0)))) {
		goto __58
	}
	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) >= int64(0)) {
		goto __59
	}
	return *(*uintptr)(unsafe.Pointer(constants))
__59:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __60
	}
__62:
	;
__65:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __68
	}
	XTclAllocateFreeObjects(tls)
__68:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
	return objResultPtr
	goto __61
__60:
	XTcl_SetLongObj(tls, valuePtr, -1)
	return uintptr(0)
__61:
	;

__58:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __69
	}
	return XTcl_NewWideIntObj(tls, *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))>>shift)
	goto __70
__69:
	XTcl_SetWideIntObj(tls, valuePtr, *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))>>shift)
	return uintptr(0)
__70:
	;

__57:
	;
__35:
	;

	XTcl_TakeBignumFromObj(tls, uintptr(0), valuePtr, bp+64)

	XTclBN_mp_init(tls, bp+88)
	if !(opcode == INST_LSHIFT) {
		goto __71
	}
	XTclBN_mp_mul_2d(tls, bp+64, int32(shift), bp+88)
	goto __72
__71:
	XTclBN_mp_signed_rsh(tls, bp+64, int32(shift), bp+88)
__72:
	;
	XTclBN_mp_clear(tls, bp+64)
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __73
	}
	return XTcl_NewBignumObj(tls, bp+88)
	goto __74
__73:
	XTcl_SetBignumObj(tls, valuePtr, bp+88)
	return uintptr(0)
__74:
	;

__5:
__6:
__7:
	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_BIG || *(*int32)(unsafe.Pointer(bp + 16)) == TCL_NUMBER_BIG) {
		goto __75
	}
	XTcl_TakeBignumFromObj(tls, uintptr(0), valuePtr, bp+64)
	XTcl_TakeBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)

	XTclBN_mp_init(tls, bp+88)

	switch opcode {
	case INST_BITAND:
		goto __77

	case INST_BITOR:
		goto __78

	case INST_BITXOR:
		goto __79
	}
	goto __76
__77:
	XTclBN_mp_and(tls, bp+64, bp+40, bp+88)
	goto __76

__78:
	XTclBN_mp_or(tls, bp+64, bp+40, bp+88)
	goto __76

__79:
	XTclBN_mp_xor(tls, bp+64, bp+40, bp+88)
	goto __76
__76:
	;

	XTclBN_mp_clear(tls, bp+64)
	XTclBN_mp_clear(tls, bp+40)
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __80
	}
	return XTcl_NewBignumObj(tls, bp+88)
	goto __81
__80:
	XTcl_SetBignumObj(tls, valuePtr, bp+88)
	return uintptr(0)
__81:
	;

__75:
	;

	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_WIDE || *(*int32)(unsafe.Pointer(bp + 16)) == TCL_NUMBER_WIDE) {
		goto __82
	}
	if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
		*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) = *(*Tcl_WideInt)(unsafe.Pointer(valuePtr + 32))
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(valuePtr + 32)))
		} else {
			XTcl_GetWideIntFromObj(tls, uintptr(0), valuePtr, bp+136)
		}
	}
	if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
		*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = *(*Tcl_WideInt)(unsafe.Pointer(value2Ptr + 32))
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(value2Ptr + 32)))
		} else {
			XTcl_GetWideIntFromObj(tls, uintptr(0), value2Ptr, bp+32)
		}
	}

	switch opcode {
	case INST_BITAND:
		goto __84
	case INST_BITOR:
		goto __85
	case INST_BITXOR:
		goto __86
	default:
		goto __87
	}
	goto __83
__84:
	wResult = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) & *(*Tcl_WideInt)(unsafe.Pointer(bp + 32))
	goto __83
__85:
	wResult = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) | *(*Tcl_WideInt)(unsafe.Pointer(bp + 32))
	goto __83
__86:
	wResult = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) ^ *(*Tcl_WideInt)(unsafe.Pointer(bp + 32))
	goto __83
__87:
	// Unused, here to silence compiler warning.
	wResult = int64(0)
__83:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __88
	}
	return XTcl_NewWideIntObj(tls, wResult)
	goto __89
__88:
	XTcl_SetWideIntObj(tls, valuePtr, wResult)
	return uintptr(0)
__89:
	;

__82:
	;
	l1 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
	l2 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))

	switch opcode {
	case INST_BITAND:
		goto __91
	case INST_BITOR:
		goto __92
	case INST_BITXOR:
		goto __93
	default:
		goto __94
	}
	goto __90
__91:
	lResult = l1 & l2
	goto __90
__92:
	lResult = l1 | l2
	goto __90
__93:
	lResult = l1 ^ l2
	goto __90
__94:
	// Unused, here to silence compiler warning.
	lResult = 0
__90:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __95
	}
__97:
	;
__100:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __103
	}
	XTclAllocateFreeObjects(tls)
__103:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __101
__101:
	if 0 != 0 {
		goto __100
	}
	goto __102
__102:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = lResult
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __98
__98:
	if 0 != 0 {
		goto __97
	}
	goto __99
__99:
	;
	return objResultPtr
	goto __96
__95:
	XTcl_SetLongObj(tls, valuePtr, lResult)
	return uintptr(0)
__96:
	;

__8:
	oddExponent = 0
	negativeExponent = 0

	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_DOUBLE || *(*int32)(unsafe.Pointer(bp + 16)) == TCL_NUMBER_DOUBLE) {
		goto __104
	}
	XTcl_GetDoubleFromObj(tls, uintptr(0), valuePtr, bp+144)
	XTcl_GetDoubleFromObj(tls, uintptr(0), value2Ptr, bp+152)

	if !(*(*float64)(unsafe.Pointer(bp + 144)) == 0.0 && *(*float64)(unsafe.Pointer(bp + 152)) < 0.0) {
		goto __105
	}
	return libc.UintptrFromInt32(-2)
__105:
	;
	dResult = libc.Xpow(tls, *(*float64)(unsafe.Pointer(bp + 144 /* d1 */)), *(*float64)(unsafe.Pointer(bp + 152 /* d2 */)))
	goto doubleResult
__104:
	;
	l1 = libc.AssignInt32(&l2, 0)
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* w1 */)) = libc.AssignPtrInt64(bp+32 /* w2 */, int64(0)) // to silence compiler warning (maybe-uninitialized)
	switch *(*int32)(unsafe.Pointer(bp + 16 /* type2 */)) {
	case TCL_NUMBER_LONG:
		goto __107
	case TCL_NUMBER_WIDE:
		goto __108
	case TCL_NUMBER_BIG:
		goto __109
	}
	goto __106
__107:
	l2 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
pwrLongExpon:
	if !(l2 == 0) {
		goto __110
	}
	// Anything to the zero power is 1.

	return *(*uintptr)(unsafe.Pointer(constants + 1*8))
	goto __111
__110:
	if !(l2 == 1) {
		goto __112
	}
	// Anything to the first power is itself

	return uintptr(0)
__112:
	;
__111:
	;
	negativeExponent = libc.Bool32(l2 < 0)
	oddExponent = int32(l2 & 1)
	goto __106
__108:
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 32 /* w2 */)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
	// check it fits in long
	l2 = int32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 32 /* w2 */)))
	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) == Tcl_WideInt(l2)) {
		goto __113
	}
	*(*int32)(unsafe.Pointer(bp + 16 /* type2 */)) = TCL_NUMBER_LONG
	goto pwrLongExpon
__113:
	;
	negativeExponent = libc.Bool32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) < int64(0))
	oddExponent = int32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) & int64(1))
	goto __106
__109:
	XTcl_TakeBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)
	negativeExponent = libc.Bool32(XTclBN_mp_cmp_d(tls, bp+40, uint32(0)) == -1)
	XTclBN_mp_mod_2d(tls, bp+40, 1, bp+40)
	oddExponent = libc.BoolInt32(!(func() int32 {
		if (*Mp_int)(unsafe.Pointer(bp+40)).Fused == 0 {
			return MP_YES
		}
		return MP_NO
	}() != 0))
	XTclBN_mp_clear(tls, bp+40)
	goto __106
__106:
	;

	switch *(*int32)(unsafe.Pointer(bp /* type1 */)) {
	case TCL_NUMBER_LONG:
		goto __115
	case TCL_NUMBER_WIDE:
		goto __116
	}
	goto __114
__115:
	l1 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
pwrLongBase:
	switch l1 {
	case 0:
		goto __118
	case 1:
		goto __119
	case -1:
		goto __120
	}
	goto __117
__118:
	// Zero to a positive power is zero.
	// Zero to a negative power is div by zero error.

	if !(negativeExponent != 0) {
		return *(*uintptr)(unsafe.Pointer(constants))
	}
	return libc.UintptrFromInt32(-2)
__119:
	// 1 to any power is 1.

	return *(*uintptr)(unsafe.Pointer(constants + 1*8))
__120:
	if !!(negativeExponent != 0) {
		goto __121
	}
	if !!(oddExponent != 0) {
		goto __122
	}
	return *(*uintptr)(unsafe.Pointer(constants + 1*8))
__122:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __123
	}
__125:
	;
__128:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __131
	}
	XTclAllocateFreeObjects(tls)
__131:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __129
__129:
	if 0 != 0 {
		goto __128
	}
	goto __130
__130:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __126
__126:
	if 0 != 0 {
		goto __125
	}
	goto __127
__127:
	;
	return objResultPtr
	goto __124
__123:
	XTcl_SetLongObj(tls, valuePtr, -1)
	return uintptr(0)
__124:
	;

__121:
	;
	// negativeExponent
	if !(oddExponent != 0) {
		goto __132
	}
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __133
	}
__135:
	;
__138:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __141
	}
	XTclAllocateFreeObjects(tls)
__141:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __139
__139:
	if 0 != 0 {
		goto __138
	}
	goto __140
__140:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __136
__136:
	if 0 != 0 {
		goto __135
	}
	goto __137
__137:
	;
	return objResultPtr
	goto __134
__133:
	XTcl_SetLongObj(tls, valuePtr, -1)
	return uintptr(0)
__134:
	;

__132:
	;
	return *(*uintptr)(unsafe.Pointer(constants + 1*8))
__117:
	;
	goto __114
__116:
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* w1 */)) = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
	// check it fits in long
	l1 = int32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* w1 */)))
	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) == Tcl_WideInt(l1)) {
		goto __142
	}
	*(*int32)(unsafe.Pointer(bp /* type1 */)) = TCL_NUMBER_LONG
	goto pwrLongBase
__142:
	;
__114:
	;
	if !(negativeExponent != 0) {
		goto __143
	}

	// Integers with magnitude greater than 1 raise to a negative
	// power yield the answer zero (see TIP 123).
	return *(*uintptr)(unsafe.Pointer(constants))
__143:
	;

	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_BIG) {
		goto __144
	}
	goto overflowExpon
__144:
	;

	// We refuse to accept exponent arguments that exceed one mp_digit
	// which means the max exponent value is 2**28-1 = 0x0FFFFFFF =
	// 268435455, which fits into a signed 32 bit int which is within the
	// range of the long type. This means any numeric Tcl_Obj value
	// not using TCL_NUMBER_LONG type must hold a value larger than we
	// accept.

	if !(*(*int32)(unsafe.Pointer(bp + 16)) != TCL_NUMBER_LONG) {
		goto __145
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+29949, -1))
	return libc.UintptrFromInt32(-3)
__145:
	;

	// From here (up to overflowExpon) exponent is long (l2).

	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_LONG) {
		goto __146
	}
	if !(l1 == 2) {
		goto __147
	}
	// Reduce small powers of 2 to shifts.

	if !(uint64(uint32(l2)) < uint64(8)*uint64(unsafe.Sizeof(int32(0)))-uint64(1)) {
		goto __148
	}
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __149
	}
__151:
	;
__154:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __157
	}
	XTclAllocateFreeObjects(tls)
__157:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __155
__155:
	if 0 != 0 {
		goto __154
	}
	goto __156
__156:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = int32(1) << l2
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __152
__152:
	if 0 != 0 {
		goto __151
	}
	goto __153
__153:
	;
	return objResultPtr
	goto __150
__149:
	XTcl_SetLongObj(tls, valuePtr, int32(1)<<l2)
	return uintptr(0)
__150:
	;

__148:
	;
	if !(uint64(uint32(l2)) < uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0)))-uint64(1)) {
		goto __158
	}
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __159
	}
	return XTcl_NewWideIntObj(tls, Tcl_WideInt(int64(1))<<l2)
	goto __160
__159:
	XTcl_SetWideIntObj(tls, valuePtr, Tcl_WideInt(int64(1))<<l2)
	return uintptr(0)
__160:
	;

__158:
	;
	goto overflowExpon
__147:
	;
	if !(l1 == -2) {
		goto __161
	}
	if oddExponent != 0 {
		signum = -1
	} else {
		signum = 1
	}

	// Reduce small powers of 2 to shifts.

	if !(uint64(uint32(l2)) < uint64(8)*uint64(unsafe.Sizeof(int32(0)))-uint64(1)) {
		goto __162
	}
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __163
	}
__165:
	;
__168:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __171
	}
	XTclAllocateFreeObjects(tls)
__171:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __169
__169:
	if 0 != 0 {
		goto __168
	}
	goto __170
__170:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = int32(signum) * (int32(1) << l2)
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __166
__166:
	if 0 != 0 {
		goto __165
	}
	goto __167
__167:
	;
	return objResultPtr
	goto __164
__163:
	XTcl_SetLongObj(tls, valuePtr, int32(signum)*(int32(1)<<l2))
	return uintptr(0)
__164:
	;

__162:
	;
	if !(uint64(uint32(l2)) < uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0)))-uint64(1)) {
		goto __172
	}
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __173
	}
	return XTcl_NewWideIntObj(tls, Tcl_WideInt(signum)*(Tcl_WideInt(int64(1))<<l2))
	goto __174
__173:
	XTcl_SetWideIntObj(tls, valuePtr, Tcl_WideInt(signum)*(Tcl_WideInt(int64(1))<<l2))
	return uintptr(0)
__174:
	;

__172:
	;
	goto overflowExpon
__161:
	;
	if !(l2-2 < int32(sMaxBase32Size) &&
		l1 <= sMaxBase32[l2-2] &&
		l1 >= -sMaxBase32[l2-2]) {
		goto __175
	}
	// Small powers of 32-bit integers.
	lResult = sLongPwrSmallExpon(tls, l1, l2)

	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __176
	}
__178:
	;
__181:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __184
	}
	XTclAllocateFreeObjects(tls)
__184:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __182
__182:
	if 0 != 0 {
		goto __181
	}
	goto __183
__183:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = lResult
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __179
__179:
	if 0 != 0 {
		goto __178
	}
	goto __180
__180:
	;
	return objResultPtr
	goto __177
__176:
	XTcl_SetLongObj(tls, valuePtr, lResult)
	return uintptr(0)
__177:
	;

__175:
	;

	if !(l1-3 >= 0 && l1-2 < int32(sExp32IndexSize) &&
		l2-2 < int32(sExp32ValueSize+sMaxBase32Size)) {
		goto __185
	}
	base = uint16(int32(sExp32Index[l1-3]) +
		int32(uint16(Size_t(l2-2)-sMaxBase32Size)))
	if !(int32(base) < int32(sExp32Index[l1-2])) {
		goto __186
	}
	// 32-bit number raised to intermediate power, done by
	// table lookup.

	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __187
	}
__189:
	;
__192:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __195
	}
	XTclAllocateFreeObjects(tls)
__195:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __193
__193:
	if 0 != 0 {
		goto __192
	}
	goto __194
__194:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = sExp32Value[base]
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __190
__190:
	if 0 != 0 {
		goto __189
	}
	goto __191
__191:
	;
	return objResultPtr
	goto __188
__187:
	XTcl_SetLongObj(tls, valuePtr, sExp32Value[base])
	return uintptr(0)
__188:
	;

__186:
	;
__185:
	;
	if !(-l1-3 >= 0 && -l1-2 < int32(sExp32IndexSize) &&
		l2-2 < int32(sExp32ValueSize+sMaxBase32Size)) {
		goto __196
	}
	base = uint16(int32(sExp32Index[-l1-3]) +
		int32(uint16(Size_t(l2-2)-sMaxBase32Size)))
	if !(int32(base) < int32(sExp32Index[-l1-2])) {
		goto __197
	}
	// 32-bit number raised to intermediate power, done by
	// table lookup.

	if oddExponent != 0 {
		lResult = -sExp32Value[base]
	} else {
		lResult = sExp32Value[base]
	}
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __198
	}
__200:
	;
__203:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __206
	}
	XTclAllocateFreeObjects(tls)
__206:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __204
__204:
	if 0 != 0 {
		goto __203
	}
	goto __205
__205:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objResultPtr + 32)) = lResult
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __201
__201:
	if 0 != 0 {
		goto __200
	}
	goto __202
__202:
	;
	return objResultPtr
	goto __199
__198:
	XTcl_SetLongObj(tls, valuePtr, lResult)
	return uintptr(0)
__199:
	;

__197:
	;
__196:
	;
	// Code below (up to overflowExpon) works with wide-int base
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* w1 */)) = Tcl_WideInt(l1)
__146:
	;

	// From here (up to overflowExpon) base is wide-int (w1).

	if !(l2-2 < int32(sMaxBase64Size) &&
		*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) <= sMaxBase64[l2-2] &&
		*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) >= -sMaxBase64[l2-2]) {
		goto __207
	}
	// Small powers of integers whose result is wide.
	wResult = sWidePwrSmallExpon(tls, *(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* w1 */)), l2)

	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __208
	}
	return XTcl_NewWideIntObj(tls, wResult)
	goto __209
__208:
	XTcl_SetWideIntObj(tls, valuePtr, wResult)
	return uintptr(0)
__209:
	;

__207:
	;

	// Handle cases of powers > 16 that still fit in a 64-bit word by
	// doing table lookup.

	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))-int64(3) >= int64(0) && *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))-int64(2) < Tcl_WideInt(int32(sExp64IndexSize)) &&
		l2-2 < int32(sExp64ValueSize+sMaxBase64Size)) {
		goto __210
	}
	base = uint16(int32(sExp64Index[*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))-int64(3)]) +
		int32(uint16(Size_t(l2-2)-sMaxBase64Size)))
	if !(int32(base) < int32(sExp64Index[*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))-int64(2)])) {
		goto __211
	}
	// 64-bit number raised to intermediate power, done by
	// table lookup.

	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __212
	}
	return XTcl_NewWideIntObj(tls, sExp64Value[base])
	goto __213
__212:
	XTcl_SetWideIntObj(tls, valuePtr, sExp64Value[base])
	return uintptr(0)
__213:
	;

__211:
	;
__210:
	;

	if !(-*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))-int64(3) >= int64(0) && -*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))-int64(2) < Tcl_WideInt(int32(sExp64IndexSize)) &&
		l2-2 < int32(sExp64ValueSize+sMaxBase64Size)) {
		goto __214
	}
	base = uint16(int32(sExp64Index[-*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))-int64(3)]) +
		int32(uint16(Size_t(l2-2)-sMaxBase64Size)))
	if !(int32(base) < int32(sExp64Index[-*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))-int64(2)])) {
		goto __215
	}
	// 64-bit number raised to intermediate power, done by
	// table lookup.

	if oddExponent != 0 {
		wResult = -sExp64Value[base]
	} else {
		wResult = sExp64Value[base]
	}
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __216
	}
	return XTcl_NewWideIntObj(tls, wResult)
	goto __217
__216:
	XTcl_SetWideIntObj(tls, valuePtr, wResult)
	return uintptr(0)
__217:
	;

__215:
	;
__214:
	;

overflowExpon:

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			return func() int32 {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = *(*Tcl_WideInt)(unsafe.Pointer(value2Ptr + 32))
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(value2Ptr + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetWideIntFromObj(tls, uintptr(0), value2Ptr, bp+32)
		}()
	}() != TCL_OK ||
		(*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr != uintptr(unsafe.Pointer(&XtclIntType)) ||
		Tcl_WideUInt(*(*Tcl_WideInt)(unsafe.Pointer(bp + 32))) >= uint64(int32(1)<<28)) {
		goto __218
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+29949, -1))
	return libc.UintptrFromInt32(-3)
__218:
	;
	XTcl_TakeBignumFromObj(tls, uintptr(0), valuePtr, bp+64)
	XTclBN_mp_init(tls, bp+88)
	XTclBN_mp_expt_d(tls, bp+64, uint32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 32 /* w2 */))), bp+88)
	XTclBN_mp_clear(tls, bp+64)
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __219
	}
	return XTcl_NewBignumObj(tls, bp+88)
	goto __220
__219:
	XTcl_SetBignumObj(tls, valuePtr, bp+88)
	return uintptr(0)
__220:
	;

__9:
__10:
__11:
__12:
	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_DOUBLE || *(*int32)(unsafe.Pointer(bp + 16)) == TCL_NUMBER_DOUBLE) {
		goto __221
	}
	// At least one of the values is floating-point, so perform
	// floating point calculations.

	XTcl_GetDoubleFromObj(tls, uintptr(0), valuePtr, bp+144)
	XTcl_GetDoubleFromObj(tls, uintptr(0), value2Ptr, bp+152)

	switch opcode {
	case INST_ADD:
		goto __223
	case INST_SUB:
		goto __224
	case INST_MULT:
		goto __225
	case INST_DIV:
		goto __226
	default:
		goto __227
	}
	goto __222
__223:
	dResult = *(*float64)(unsafe.Pointer(bp + 144)) + *(*float64)(unsafe.Pointer(bp + 152))
	goto __222
__224:
	dResult = *(*float64)(unsafe.Pointer(bp + 144)) - *(*float64)(unsafe.Pointer(bp + 152))
	goto __222
__225:
	dResult = *(*float64)(unsafe.Pointer(bp + 144)) * *(*float64)(unsafe.Pointer(bp + 152))
	goto __222
__226:
	// We presume that we are running with zero-divide unmasked if
	// we're on an IEEE box. Otherwise, this statement might cause
	// demons to fly out our noses.

	dResult = *(*float64)(unsafe.Pointer(bp + 144)) / *(*float64)(unsafe.Pointer(bp + 152))
	goto __222
__227:
	// Unused, here to silence compiler warning.
	dResult = float64(0)
__222:
	;

doubleResult:
	// Check now for IEEE floating-point error.

	if !(libc.X__isnan(tls, dResult) != 0) {
		goto __228
	}
	XTclExprFloatError(tls, interp, dResult)
	return libc.UintptrFromInt32(-3)
__228:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __229
	}
__231:
	;
__234:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __237
	}
	XTclAllocateFreeObjects(tls)
__237:
	;
	objResultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __235
__235:
	if 0 != 0 {
		goto __234
	}
	goto __236
__236:
	;
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
	*(*float64)(unsafe.Pointer(objResultPtr + 32)) = dResult
	(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDoubleType))

	goto __232
__232:
	if 0 != 0 {
		goto __231
	}
	goto __233
__233:
	;
	return objResultPtr
	goto __230
__229:
	XTcl_SetDoubleObj(tls, valuePtr, dResult)
	return uintptr(0)
__230:
	;

__221:
	;
	if !(*(*int32)(unsafe.Pointer(bp)) != TCL_NUMBER_BIG && *(*int32)(unsafe.Pointer(bp + 16)) != TCL_NUMBER_BIG) {
		goto __238
	}
	if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
		*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) = *(*Tcl_WideInt)(unsafe.Pointer(valuePtr + 32))
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(valuePtr + 32)))
		} else {
			XTcl_GetWideIntFromObj(tls, uintptr(0), valuePtr, bp+136)
		}
	}
	if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
		*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = *(*Tcl_WideInt)(unsafe.Pointer(value2Ptr + 32))
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(value2Ptr + 32)))
		} else {
			XTcl_GetWideIntFromObj(tls, uintptr(0), value2Ptr, bp+32)
		}
	}

	switch opcode {
	case INST_ADD:
		goto __240

	case INST_SUB:
		goto __241

	case INST_MULT:
		goto __242

	case INST_DIV:
		goto __243

	default:
		goto __244
	}
	goto __239
__240:
	wResult = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) + *(*Tcl_WideInt)(unsafe.Pointer(bp + 32))
	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_WIDE || *(*int32)(unsafe.Pointer(bp + 16)) == TCL_NUMBER_WIDE) {
		goto __245
	}

	// Check for overflow.

	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))^wResult < int64(0) && *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))^*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) >= int64(0)) {
		goto __246
	}
	goto overflowBasic
__246:
	;
__245:
	;
	goto __239

__241:
	wResult = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) - *(*Tcl_WideInt)(unsafe.Pointer(bp + 32))
	if !(*(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_WIDE || *(*int32)(unsafe.Pointer(bp + 16)) == TCL_NUMBER_WIDE) {
		goto __247
	}

	// Must check for overflow. The macro tests for overflows
	// in sums by looking at the sign bits. As we have a
	// subtraction here, we are adding -w2. As -w2 could in
	// turn overflow, we test with ~w2 instead: it has the
	// opposite sign bit to w2 so it does the job. Note that
	// the only "bad" case (w2==0) is irrelevant for this
	// macro, as in that case w1 and wResult have the same
	// sign and there is no overflow anyway.

	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))^wResult < int64(0) && *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))^^*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) >= int64(0)) {
		goto __248
	}
	goto overflowBasic
__248:
	;
__247:
	;
	goto __239

__242:
	if !(*(*int32)(unsafe.Pointer(bp)) != TCL_NUMBER_LONG || *(*int32)(unsafe.Pointer(bp + 16)) != TCL_NUMBER_LONG ||
		uint64(unsafe.Sizeof(Tcl_WideInt(0))) < uint64(2)*uint64(unsafe.Sizeof(int32(0)))) {
		goto __249
	}
	goto overflowBasic
__249:
	;
	wResult = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) * *(*Tcl_WideInt)(unsafe.Pointer(bp + 32))
	goto __239

__243:
	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) == int64(0)) {
		goto __250
	}
	return libc.UintptrFromInt32(-1)
__250:
	;

	// Need a bignum to represent (LLONG_MIN / -1)

	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) == -0x7fffffffffffffff-1 && *(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) == int64(-1)) {
		goto __251
	}
	goto overflowBasic
__251:
	;
	wResult = *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) / *(*Tcl_WideInt)(unsafe.Pointer(bp + 32))

	// Force Tcl's integer division rules.
	// TODO: examine for logic simplification

	if !((wResult < int64(0) || wResult == int64(0) && (*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) < int64(0) && *(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) > int64(0) || *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) > int64(0) && *(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) < int64(0))) && wResult**(*Tcl_WideInt)(unsafe.Pointer(bp + 32)) != *(*Tcl_WideInt)(unsafe.Pointer(bp + 136))) {
		goto __252
	}
	wResult = wResult - int64(1)
__252:
	;
	goto __239

__244:
	// Unused, here to silence compiler warning.

	wResult = int64(0)
__239:
	;

	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __253
	}
	return XTcl_NewWideIntObj(tls, wResult)
	goto __254
__253:
	XTcl_SetWideIntObj(tls, valuePtr, wResult)
	return uintptr(0)
__254:
	;

__238:
	;

overflowBasic:
	XTcl_TakeBignumFromObj(tls, uintptr(0), valuePtr, bp+64)
	XTcl_TakeBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)
	XTclBN_mp_init(tls, bp+88)
	switch opcode {
	case INST_ADD:
		goto __256
	case INST_SUB:
		goto __257
	case INST_MULT:
		goto __258
	case INST_DIV:
		goto __259
	}
	goto __255
__256:
	XTclBN_mp_add(tls, bp+64, bp+40, bp+88)
	goto __255
__257:
	XTclBN_mp_sub(tls, bp+64, bp+40, bp+88)
	goto __255
__258:
	XTclBN_mp_mul(tls, bp+64, bp+40, bp+88)
	goto __255
__259:
	if !(func() int32 {
		if (*Mp_int)(unsafe.Pointer(bp+40)).Fused == 0 {
			return MP_YES
		}
		return MP_NO
	}() != 0) {
		goto __260
	}
	XTclBN_mp_clear(tls, bp+64)
	XTclBN_mp_clear(tls, bp+40)
	XTclBN_mp_clear(tls, bp+88)
	return libc.UintptrFromInt32(-1)
__260:
	;
	XTclBN_mp_init(tls, bp+112)
	XTclBN_mp_div(tls, bp+64, bp+40, bp+88, bp+112)
	// TODO: internals intrusion
	if !(!(func() int32 {
		if (*Mp_int)(unsafe.Pointer(bp+112)).Fused == 0 {
			return MP_YES
		}
		return MP_NO
	}() != 0) &&
		(*Mp_int)(unsafe.Pointer(bp+112)).Fsign != (*Mp_int)(unsafe.Pointer(bp+40)).Fsign) {
		goto __261
	}
	// Convert to Tcl's integer division rules.

	XTclBN_mp_sub_d(tls, bp+88, uint32(1), bp+88)
	XTclBN_mp_add(tls, bp+112, bp+40, bp+112)
__261:
	;
	XTclBN_mp_clear(tls, bp+112)
	goto __255
__255:
	;
	XTclBN_mp_clear(tls, bp+64)
	XTclBN_mp_clear(tls, bp+40)
	if !((*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1) {
		goto __262
	}
	return XTcl_NewBignumObj(tls, bp+88)
	goto __263
__262:
	XTcl_SetBignumObj(tls, valuePtr, bp+88)
	return uintptr(0)
__263:
	;

__1:
	;

	XTcl_Panic(tls, ts+22086, 0)
	return uintptr(0)
}

func sExecuteExtendedUnaryMathOp(tls *libc.TLS, opcode int32, valuePtr uintptr) uintptr { /* tclExecute.c:9275:16: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	*(*ClientData)(unsafe.Pointer(bp + 8 /* ptr */)) = uintptr(0)
	// var type1 int32 at bp, 4

	var w Tcl_WideInt
	// var big Mp_int at bp+16, 24

	var objResultPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
		*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_LONG
		*(*ClientData)(unsafe.Pointer(bp + 8)) = valuePtr + 32
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_WIDE
			*(*ClientData)(unsafe.Pointer(bp + 8)) = valuePtr + 32
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
				if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(valuePtr + 32))) != 0 {
					*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_NAN
				} else {
					*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_DOUBLE
				}
				*(*ClientData)(unsafe.Pointer(bp + 8)) = valuePtr + 32
			} else {
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength == 0 {
					*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_LONG
				} else {
					XTclGetNumberFromObj(tls, uintptr(0), valuePtr, bp+8, bp)
				}
			}
		}
	}

	switch opcode {
	case INST_BITNOT:
		if *(*int32)(unsafe.Pointer(bp)) == TCL_NUMBER_WIDE {
			w = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1 {
				return XTcl_NewWideIntObj(tls, ^w)
			} else {
				XTcl_SetWideIntObj(tls, valuePtr, ^w)
				return uintptr(0)
			}

		}
		XTcl_TakeBignumFromObj(tls, uintptr(0), valuePtr, bp+16)
		// ~a = - a - 1
		XTclBN_mp_neg(tls, bp+16, bp+16)
		XTclBN_mp_sub_d(tls, bp+16, uint32(1), bp+16)
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1 {
			return XTcl_NewBignumObj(tls, bp+16)
		} else {
			XTcl_SetBignumObj(tls, valuePtr, bp+16)
			return uintptr(0)
		}

		fallthrough
	case INST_UMINUS:
		switch *(*int32)(unsafe.Pointer(bp /* type1 */)) {
		case TCL_NUMBER_DOUBLE:
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1 {
				for ok := true; ok; ok = 0 != 0 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						objResultPtr = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
					(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = uintptr(0)
					*(*float64)(unsafe.Pointer(objResultPtr + 32)) = -*(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
					(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDoubleType))
					{
					}
				}
				return objResultPtr
			} else {
				XTcl_SetDoubleObj(tls, valuePtr, -*(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8)))))
				return uintptr(0)
			}

			fallthrough
		case TCL_NUMBER_LONG:
			w = Tcl_WideInt(*(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8)))))
			if w != -0x7fffffffffffffff-1 {
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1 {
					return XTcl_NewWideIntObj(tls, -w)
				} else {
					XTcl_SetWideIntObj(tls, valuePtr, -w)
					return uintptr(0)
				}

			}
			XTclBNInitBignumFromLong(tls, bp+16, *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8 /* ptr */)))))
			break
		case TCL_NUMBER_WIDE:
			w = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
			if w != -0x7fffffffffffffff-1 {
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1 {
					return XTcl_NewWideIntObj(tls, -w)
				} else {
					XTcl_SetWideIntObj(tls, valuePtr, -w)
					return uintptr(0)
				}

			}
			XTclBNInitBignumFromWideInt(tls, bp+16, w)
			break
		default:
			XTcl_TakeBignumFromObj(tls, uintptr(0), valuePtr, bp+16)
		}
		XTclBN_mp_neg(tls, bp+16, bp+16)
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount > 1 {
			return XTcl_NewBignumObj(tls, bp+16)
		} else {
			XTcl_SetBignumObj(tls, valuePtr, bp+16)
			return uintptr(0)
		}

	}

	XTcl_Panic(tls, ts+22086, 0)
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// CompareTwoNumbers --
//
//	This function compares a pair of numbers in Tcl_Objs. Each argument
//	must already be known to be numeric and not NaN.
//
// Results:
//	One of MP_LT, MP_EQ or MP_GT, depending on whether valuePtr is less
//	than, equal to, or greater than value2Ptr (respectively).
//
// Side effects:
//	None, provided both values are numeric.
//
//----------------------------------------------------------------------

func XTclCompareTwoNumbers(tls *libc.TLS, valuePtr uintptr, value2Ptr uintptr) int32 { /* tclExecute.c:9355:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	// var type1 int32 at bp, 4

	// var type2 int32 at bp+16, 4

	var compare int32
	// var ptr1 ClientData at bp+8, 8

	// var ptr2 ClientData at bp+24, 8

	// var big1 Mp_int at bp+64, 24

	// var big2 Mp_int at bp+40, 24

	var d1 float64
	var d2 float64
	// var tmp float64 at bp+32, 8

	var l1 int32
	var l2 int32
	var w1 Tcl_WideInt
	var w2 Tcl_WideInt
	*(*int32)(unsafe.Pointer(bp /* type1 */)) = TCL_NUMBER_NAN
	*(*int32)(unsafe.Pointer(bp + 16 /* type2 */)) = TCL_NUMBER_NAN

	if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
		*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_LONG
		*(*ClientData)(unsafe.Pointer(bp + 8)) = valuePtr + 32
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_WIDE
			*(*ClientData)(unsafe.Pointer(bp + 8)) = valuePtr + 32
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
				if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(valuePtr + 32))) != 0 {
					*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_NAN
				} else {
					*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_DOUBLE
				}
				*(*ClientData)(unsafe.Pointer(bp + 8)) = valuePtr + 32
			} else {
				if (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(valuePtr)).Flength == 0 {
					*(*int32)(unsafe.Pointer(bp)) = TCL_NUMBER_LONG
				} else {
					XTclGetNumberFromObj(tls, uintptr(0), valuePtr, bp+8, bp)
				}
			}
		}
	}
	if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
		*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_LONG
		*(*ClientData)(unsafe.Pointer(bp + 24)) = value2Ptr + 32
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_WIDE
			*(*ClientData)(unsafe.Pointer(bp + 24)) = value2Ptr + 32
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
				if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(value2Ptr + 32))) != 0 {
					*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_NAN
				} else {
					*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_DOUBLE
				}
				*(*ClientData)(unsafe.Pointer(bp + 24)) = value2Ptr + 32
			} else {
				if (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(value2Ptr)).Flength == 0 {
					*(*int32)(unsafe.Pointer(bp + 16)) = TCL_NUMBER_LONG
				} else {
					XTclGetNumberFromObj(tls, uintptr(0), value2Ptr, bp+24, bp+16)
				}
			}
		}
	}

	switch *(*int32)(unsafe.Pointer(bp /* type1 */)) {
	case TCL_NUMBER_LONG:
		goto __2

	case TCL_NUMBER_WIDE:
		goto __3

	case TCL_NUMBER_DOUBLE:
		goto __4

	case TCL_NUMBER_BIG:
		goto __5
	default:
		goto __6
	}
	goto __1
__2:
	l1 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
	switch *(*int32)(unsafe.Pointer(bp + 16 /* type2 */)) {
	case TCL_NUMBER_LONG:
		goto __8
	case TCL_NUMBER_WIDE:
		goto __9
	case TCL_NUMBER_DOUBLE:
		goto __10
	case TCL_NUMBER_BIG:
		goto __11
	}
	goto __7
__8:
	l2 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
longCompare:
	if l1 < l2 {
		return -1
	}
	return func() int32 {
		if l1 > l2 {
			return MP_GT
		}
		return MP_EQ
	}()
__9:
	w2 = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
	w1 = Tcl_WideInt(l1)
	goto wideCompare
__10:
	d2 = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
	d1 = float64(l1)

	// If the double has a fractional part, or if the long can be
	// converted to double without loss of precision, then compare as
	// doubles.

	if !(uint64(53) > uint64(8)*uint64(unsafe.Sizeof(int32(0))) || l1 == int32(d1) ||
		libc.Xmodf(tls, d2, bp+32) != 0.0) {
		goto __12
	}
	goto doubleCompare
__12:
	;

	// Otherwise, to make comparision based on full precision, need to
	// convert the double to a suitably sized integer.
	//
	// Need this to get comparsions like
	//	  expr 20000000000000003 < 20000000000000004.0
	// right. Converting the first argument to double will yield two
	// double values that are equivalent within double precision.
	// Converting the double to an integer gets done exactly, then
	// integer comparison can tell the difference.

	if !(d2 < float64(-0x7fffffff-1)) {
		goto __13
	}
	return MP_GT
__13:
	;
	if !(d2 > float64(0x7fffffff)) {
		goto __14
	}
	return -1
__14:
	;
	l2 = int32(d2)
	goto longCompare
__11:
	XTcl_TakeBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)
	if !(XTclBN_mp_cmp_d(tls, bp+40, uint32(0)) == -1) {
		goto __15
	}
	compare = MP_GT
	goto __16
__15:
	compare = -1
__16:
	;
	XTclBN_mp_clear(tls, bp+40)
	return compare
__7:
	;
	goto __1

__3:
	w1 = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
	switch *(*int32)(unsafe.Pointer(bp + 16 /* type2 */)) {
	case TCL_NUMBER_WIDE:
		goto __18
	case TCL_NUMBER_LONG:
		goto __19
	case TCL_NUMBER_DOUBLE:
		goto __20
	case TCL_NUMBER_BIG:
		goto __21
	}
	goto __17
__18:
	w2 = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
wideCompare:
	if w1 < w2 {
		return -1
	}
	return func() int32 {
		if w1 > w2 {
			return MP_GT
		}
		return MP_EQ
	}()
__19:
	l2 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
	w2 = Tcl_WideInt(l2)
	goto wideCompare
__20:
	d2 = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
	d1 = float64(w1)
	if !(uint64(53) > uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0))) ||
		w1 == Tcl_WideInt(d1) || libc.Xmodf(tls, d2, bp+32) != 0.0) {
		goto __22
	}
	goto doubleCompare
__22:
	;
	if !(d2 < float64(-0x7fffffffffffffff-1)) {
		goto __23
	}
	return MP_GT
__23:
	;
	if !(d2 > float64(0x7fffffffffffffff)) {
		goto __24
	}
	return -1
__24:
	;
	w2 = Tcl_WideInt(d2)
	goto wideCompare
__21:
	XTcl_TakeBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)
	if !(func() int32 {
		if (*Mp_int)(unsafe.Pointer(bp+40)).Fsign != MP_ZPOS {
			return MP_YES
		}
		return MP_NO
	}() != 0) {
		goto __25
	}
	compare = MP_GT
	goto __26
__25:
	compare = -1
__26:
	;
	XTclBN_mp_clear(tls, bp+40)
	return compare
__17:
	;
	goto __1

__4:
	d1 = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 8))))
	switch *(*int32)(unsafe.Pointer(bp + 16 /* type2 */)) {
	case TCL_NUMBER_DOUBLE:
		goto __28
	case TCL_NUMBER_LONG:
		goto __29
	case TCL_NUMBER_WIDE:
		goto __30
	case TCL_NUMBER_BIG:
		goto __31
	}
	goto __27
__28:
	d2 = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
doubleCompare:
	if d1 < d2 {
		return -1
	}
	return func() int32 {
		if d1 > d2 {
			return MP_GT
		}
		return MP_EQ
	}()
__29:
	l2 = *(*int32)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
	d2 = float64(l2)
	if !(uint64(53) > uint64(8)*uint64(unsafe.Sizeof(int32(0))) || l2 == int32(d2) ||
		libc.Xmodf(tls, d1, bp+32) != 0.0) {
		goto __32
	}
	goto doubleCompare
__32:
	;
	if !(d1 < float64(-0x7fffffff-1)) {
		goto __33
	}
	return -1
__33:
	;
	if !(d1 > float64(0x7fffffff)) {
		goto __34
	}
	return MP_GT
__34:
	;
	l1 = int32(d1)
	goto longCompare
__30:
	w2 = *(*Tcl_WideInt)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
	d2 = float64(w2)
	if !(uint64(53) > uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0))) ||
		w2 == Tcl_WideInt(d2) || libc.Xmodf(tls, d1, bp+32) != 0.0) {
		goto __35
	}
	goto doubleCompare
__35:
	;
	if !(d1 < float64(-0x7fffffffffffffff-1)) {
		goto __36
	}
	return -1
__36:
	;
	if !(d1 > float64(0x7fffffffffffffff)) {
		goto __37
	}
	return MP_GT
__37:
	;
	w1 = Tcl_WideInt(d1)
	goto wideCompare
__31:
	if !(d1 > 1.79769313486231570814527423731704357e+308 || d1 < -1.79769313486231570814527423731704357e+308) {
		goto __38
	}
	if d1 > 0.0 {
		return MP_GT
	}
	return -1
__38:
	;
	XTcl_TakeBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)
	if !(d1 < float64(0x7fffffff) && d1 > float64(-0x7fffffff-1)) {
		goto __39
	}
	if !(func() int32 {
		if (*Mp_int)(unsafe.Pointer(bp+40)).Fsign != MP_ZPOS {
			return MP_YES
		}
		return MP_NO
	}() != 0) {
		goto __40
	}
	compare = MP_GT
	goto __41
__40:
	compare = -1
__41:
	;
	XTclBN_mp_clear(tls, bp+40)
	return compare
__39:
	;
	if !(uint64(53) > uint64(8)*uint64(unsafe.Sizeof(int32(0))) &&
		libc.Xmodf(tls, d1, bp+32) != 0.0) {
		goto __42
	}
	d2 = XTclBignumToDouble(tls, bp+40)
	XTclBN_mp_clear(tls, bp+40)
	goto doubleCompare
__42:
	;
	XTcl_InitBignumFromDouble(tls, uintptr(0), d1, bp+64)
	goto bigCompare
__27:
	;
	goto __1

__5:
	XTcl_TakeBignumFromObj(tls, uintptr(0), valuePtr, bp+64)
	switch *(*int32)(unsafe.Pointer(bp + 16 /* type2 */)) {
	case TCL_NUMBER_WIDE:
		goto __44
	case TCL_NUMBER_LONG:
		goto __45
	case TCL_NUMBER_DOUBLE:
		goto __46
	case TCL_NUMBER_BIG:
		goto __47
	}
	goto __43
__44:
__45:
	compare = XTclBN_mp_cmp_d(tls, bp+64, uint32(0))
	XTclBN_mp_clear(tls, bp+64)
	return compare
__46:
	d2 = *(*float64)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(bp + 24))))
	if !(d2 > 1.79769313486231570814527423731704357e+308 || d2 < -1.79769313486231570814527423731704357e+308) {
		goto __48
	}
	if d2 > 0.0 {
		compare = -1
	} else {
		compare = MP_GT
	}
	XTclBN_mp_clear(tls, bp+64)
	return compare
__48:
	;
	if !(d2 < float64(0x7fffffff) && d2 > float64(-0x7fffffff-1)) {
		goto __49
	}
	compare = XTclBN_mp_cmp_d(tls, bp+64, uint32(0))
	XTclBN_mp_clear(tls, bp+64)
	return compare
__49:
	;
	if !(uint64(53) > uint64(8)*uint64(unsafe.Sizeof(int32(0))) &&
		libc.Xmodf(tls, d2, bp+32) != 0.0) {
		goto __50
	}
	d1 = XTclBignumToDouble(tls, bp+64)
	XTclBN_mp_clear(tls, bp+64)
	goto doubleCompare
__50:
	;
	XTcl_InitBignumFromDouble(tls, uintptr(0), d2, bp+40)
	goto bigCompare
__47:
	XTcl_TakeBignumFromObj(tls, uintptr(0), value2Ptr, bp+40)
bigCompare:
	compare = XTclBN_mp_cmp(tls, bp+64, bp+40)
	XTclBN_mp_clear(tls, bp+64)
	XTclBN_mp_clear(tls, bp+40)
	return compare
__43:
	;
	goto __1
__6:
	XTcl_Panic(tls, ts+29968, 0)
__1:
	;
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// ValidatePcAndStackTop --
//
//	This procedure is called by TclNRExecuteByteCode when debugging to
//	verify that the program counter and stack top are valid during
//	execution.
//
// Results:
//	None.
//
// Side effects:
//	Prints a message to stderr and panics if either the pc or stack top
//	are invalid.
//
//----------------------------------------------------------------------

//----------------------------------------------------------------------
//
// IllegalExprOperandType --
//
//	Used by TclNRExecuteByteCode to append an error message to the interp
//	result when an illegal operand type is detected by an expression
//	instruction. The argument opndPtr holds the operand object in error.
//
// Results:
//	None.
//
// Side effects:
//	An error message is appended to the interp result.
//
//----------------------------------------------------------------------

func sIllegalExprOperandType(tls *libc.TLS, interp uintptr, pc uintptr, opndPtr uintptr) { /* tclExecute.c:9736:1: */
	bp := tls.Alloc(68)
	defer tls.Free(68)

	// var ptr ClientData at bp+56, 8

	// var type1 int32 at bp+48, 4

	var opcode uint8 = *(*uint8)(unsafe.Pointer(pc))
	var description uintptr
	var op uintptr = ts + 13462 /* "unknown" */

	if int32(opcode) == INST_EXPON {
		op = ts + 6281 /* "**" */
	} else if int32(opcode) <= INST_LNOT {
		op = operatorStrings[int32(opcode)-INST_LOR]
	}

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(opndPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 48)) = TCL_NUMBER_LONG
				*(*ClientData)(unsafe.Pointer(bp + 56)) = opndPtr + 32
				return TCL_OK
			}()
		}
		return func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(opndPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 48)) = TCL_NUMBER_WIDE
					*(*ClientData)(unsafe.Pointer(bp + 56)) = opndPtr + 32
					return TCL_OK
				}()
			}
			return func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(opndPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
					return func() int32 {
						if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(opndPtr + 32))) != 0 {
							*(*int32)(unsafe.Pointer(bp + 48)) = TCL_NUMBER_NAN
						} else {
							*(*int32)(unsafe.Pointer(bp + 48)) = TCL_NUMBER_DOUBLE
						}
						*(*ClientData)(unsafe.Pointer(bp + 56)) = opndPtr + 32
						return TCL_OK
					}()
				}
				return func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(opndPtr)).Fbytes != uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(opndPtr)).Flength == 0 {
						return func() int32 { *(*int32)(unsafe.Pointer(bp + 48)) = TCL_NUMBER_LONG; return TCL_ERROR }()
					}
					return XTclGetNumberFromObj(tls, uintptr(0), opndPtr, bp+56, bp+48)
				}()
			}()
		}()
	}() != TCL_OK {
		// var numBytes int32 at bp+64, 4

		var bytes uintptr = XTcl_GetStringFromObj(tls, opndPtr, bp+64)

		if *(*int32)(unsafe.Pointer(bp + 64)) == 0 {
			description = ts + 29991 /* "empty string" */
		} else if XTclCheckBadOctal(tls, uintptr(0), bytes) != 0 {
			description = ts + 30004 /* "invalid octal nu..." */
		} else {
			description = ts + 30025 /* "non-numeric stri..." */
		}
	} else if *(*int32)(unsafe.Pointer(bp + 48)) == TCL_NUMBER_NAN {
		description = ts + 30044 /* "non-numeric floa..." */
	} else if *(*int32)(unsafe.Pointer(bp + 48)) == TCL_NUMBER_DOUBLE {
		description = ts + 30077 /* "floating-point v..." */
	} else {
		// TODO: No caller needs this. Eliminate?
		description = ts + 30098 /* "(big) integer" */
	}

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+30112, libc.VaList(bp, description, op)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+8778, ts+8784, description, uintptr(0)))
}

//----------------------------------------------------------------------
//
// TclGetSrcInfoForPc, GetSrcInfoForPc, TclGetSourceFromFrame --
//
//	Given a program counter value, finds the closest command in the
//	bytecode code unit's CmdLocation array and returns information about
//	that command's source: a pointer to its first byte and the number of
//	characters.
//
// Results:
//	If a command is found that encloses the program counter value, a
//	pointer to the command's source is returned and the length of the
//	source is stored at *lengthPtr. If multiple commands resulted in code
//	at pc, information about the closest enclosing command is returned. If
//	no matching command is found, NULL is returned and *lengthPtr is
//	unchanged.
//
// Side effects:
//	The CmdFrame at *cfPtr is updated.
//
//----------------------------------------------------------------------

func XTclGetSourceFromFrame(tls *libc.TLS, cfPtr uintptr, objc int32, objv uintptr) uintptr { /* tclExecute.c:9804:9: */
	if cfPtr == uintptr(0) {
		return XTcl_NewListObj(tls, objc, objv)
	}
	if (*CmdFrame)(unsafe.Pointer(cfPtr)).FcmdObj == uintptr(0) {
		if (*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd == uintptr(0) {
			var codePtr uintptr = *(*uintptr)(unsafe.Pointer(cfPtr + 40))

			(*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd = sGetSrcInfoForPc(tls, *(*uintptr)(unsafe.Pointer(cfPtr + 40 + 8 /* &.pc */)), codePtr, cfPtr+72, uintptr(0), uintptr(0))
		}
		if (*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd != 0 {
			(*CmdFrame)(unsafe.Pointer(cfPtr)).FcmdObj = XTcl_NewStringObj(tls, (*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd, (*CmdFrame)(unsafe.Pointer(cfPtr)).Flen)
		} else {
			(*CmdFrame)(unsafe.Pointer(cfPtr)).FcmdObj = XTcl_NewListObj(tls, objc, objv)
		}
		(*Tcl_Obj)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(cfPtr)).FcmdObj)).FrefCount++
	}
	return (*CmdFrame)(unsafe.Pointer(cfPtr)).FcmdObj
}

func XTclGetSrcInfoForPc(tls *libc.TLS, cfPtr uintptr) { /* tclExecute.c:9831:1: */
	var codePtr uintptr = *(*uintptr)(unsafe.Pointer(cfPtr + 40))

	if (*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd == uintptr(0) {

		(*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd = sGetSrcInfoForPc(tls,
			*(*uintptr)(unsafe.Pointer(cfPtr + 40 + 8 /* &.pc */)), codePtr,
			cfPtr+72, uintptr(0), uintptr(0))
	}

	if (*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd != uintptr(0) {
		// We now have the command. We can get the srcOffset back and from
		// there find the list of word locations for this command.

		var eclPtr uintptr
		var locPtr uintptr = uintptr(0)
		var srcOffset int32
		var i int32
		var iPtr uintptr = *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle))
		var hePtr uintptr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlineBCPtr, codePtr)

		if !(hePtr != 0) {
			return
		}

		srcOffset = int32((int64((*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd) - int64((*ByteCode)(unsafe.Pointer(codePtr)).Fsource)) / 1)
		eclPtr = (*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData

		for i = 0; i < (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fnuloc; i++ {
			if (*ECL)(unsafe.Pointer((*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc+uintptr(i)*24)).FsrcOffset == srcOffset {
				locPtr = (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Floc + uintptr(i)*24
				break
			}
		}
		if locPtr == uintptr(0) {
			XTcl_Panic(tls, ts+30144, 0)
		}

		(*CmdFrame)(unsafe.Pointer(cfPtr)).Fline = (*ECL)(unsafe.Pointer(locPtr)).Fline
		(*CmdFrame)(unsafe.Pointer(cfPtr)).Fnline = (*ECL)(unsafe.Pointer(locPtr)).Fnline
		(*CmdFrame)(unsafe.Pointer(cfPtr)).Ftype = (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Ftype

		if (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Ftype == 4 {
			*(*uintptr)(unsafe.Pointer(cfPtr + 40)) = (*ExtCmdLoc)(unsafe.Pointer(eclPtr)).Fpath
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cfPtr + 40)))).FrefCount++
		}

		// Do not set cfPtr->data.eval.path NULL for non-SOURCE. Needed for
		// cfPtr->data.tebc.codePtr.
	}
}

func sGetSrcInfoForPc(tls *libc.TLS, pc uintptr, codePtr uintptr, lengthPtr uintptr, pcBeg uintptr, cmdIdxPtr uintptr) uintptr { /* tclExecute.c:9891:19: */
	var pcOffset int32 = int32((int64(pc) - int64((*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart)) / 1)
	var numCmds int32 = (*ByteCode)(unsafe.Pointer(codePtr)).FnumCommands
	var codeDeltaNext uintptr
	var codeLengthNext uintptr
	var srcDeltaNext uintptr
	var srcLengthNext uintptr
	var codeOffset int32
	var codeLen int32
	var codeEnd int32
	var srcOffset int32
	var srcLen int32
	var delta int32
	var i int32
	var bestDist int32 = 0x7fffffff // Distance of pc to best cmd's start pc.
	var bestSrcOffset int32 = -1    // Initialized to avoid compiler warning.
	var bestSrcLength int32 = -1    // Initialized to avoid compiler warning.
	var bestCmdIdx int32 = -1

	// The pc must point within the bytecode

	// Decode the code and source offset and length for each command. The
	// closest enclosing command is the last one whose code started before
	// pcOffset.

	codeDeltaNext = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeDeltaStart
	codeLengthNext = (*ByteCode)(unsafe.Pointer(codePtr)).FcodeLengthStart
	srcDeltaNext = (*ByteCode)(unsafe.Pointer(codePtr)).FsrcDeltaStart
	srcLengthNext = (*ByteCode)(unsafe.Pointer(codePtr)).FsrcLengthStart
	codeOffset = libc.AssignInt32(&srcOffset, 0)
	for i = 0; i < numCmds; i++ {
		if uint32(*(*uint8)(unsafe.Pointer(codeDeltaNext))) == uint32(0xFF) {
			codeDeltaNext++
			delta = int32(uint32(*(*uint8)(unsafe.Pointer(codeDeltaNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(codeDeltaNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(codeDeltaNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(codeDeltaNext + uintptr(3))))
			codeDeltaNext += uintptr(4)
		} else {
			delta = int32(*(*int8)(unsafe.Pointer(codeDeltaNext)))
			codeDeltaNext++
		}
		codeOffset = codeOffset + delta

		if uint32(*(*uint8)(unsafe.Pointer(codeLengthNext))) == uint32(0xFF) {
			codeLengthNext++
			codeLen = int32(uint32(*(*uint8)(unsafe.Pointer(codeLengthNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(codeLengthNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(codeLengthNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(codeLengthNext + uintptr(3))))
			codeLengthNext += uintptr(4)
		} else {
			codeLen = int32(*(*int8)(unsafe.Pointer(codeLengthNext)))
			codeLengthNext++
		}
		codeEnd = codeOffset + codeLen - 1

		if uint32(*(*uint8)(unsafe.Pointer(srcDeltaNext))) == uint32(0xFF) {
			srcDeltaNext++
			delta = int32(uint32(*(*uint8)(unsafe.Pointer(srcDeltaNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(srcDeltaNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(srcDeltaNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(srcDeltaNext + uintptr(3))))
			srcDeltaNext += uintptr(4)
		} else {
			delta = int32(*(*int8)(unsafe.Pointer(srcDeltaNext)))
			srcDeltaNext++
		}
		srcOffset = srcOffset + delta

		if uint32(*(*uint8)(unsafe.Pointer(srcLengthNext))) == uint32(0xFF) {
			srcLengthNext++
			srcLen = int32(uint32(*(*uint8)(unsafe.Pointer(srcLengthNext)))<<24) | int32(*(*uint8)(unsafe.Pointer(srcLengthNext + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(srcLengthNext + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(srcLengthNext + uintptr(3))))
			srcLengthNext += uintptr(4)
		} else {
			srcLen = int32(*(*int8)(unsafe.Pointer(srcLengthNext)))
			srcLengthNext++
		}

		if codeOffset > pcOffset { // Best cmd already found
			break
		}
		if pcOffset <= codeEnd { // This cmd's code encloses pc
			var dist int32 = pcOffset - codeOffset

			if dist <= bestDist {
				bestDist = dist
				bestSrcOffset = srcOffset
				bestSrcLength = srcLen
				bestCmdIdx = i
			}
		}
	}

	if pcBeg != uintptr(0) {
		var curr uintptr
		var prev uintptr

		// Walk from beginning of command or BC to pc, by complete
		// instructions. Stop when crossing pc; keep previous.

		curr = func() uintptr {
			if bestDist == 0x7fffffff {
				return (*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart
			}
			return pc - uintptr(bestDist)
		}()
		prev = curr
		for curr <= pc {
			prev = curr
			curr += uintptr(XtclInstructionTable[*(*uint8)(unsafe.Pointer(curr))].FnumBytes)
		}
		*(*uintptr)(unsafe.Pointer(pcBeg)) = prev
	}

	if bestDist == 0x7fffffff {
		return uintptr(0)
	}

	if lengthPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(lengthPtr)) = bestSrcLength
	}

	if cmdIdxPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(cmdIdxPtr)) = bestCmdIdx
	}

	return (*ByteCode)(unsafe.Pointer(codePtr)).Fsource + uintptr(bestSrcOffset)
}

//----------------------------------------------------------------------
//
// GetExceptRangeForPc --
//
//	Given a program counter value, return the closest enclosing
//	ExceptionRange.
//
// Results:
//	If the searchMode is TCL_ERROR, this procedure ignores loop exception
//	ranges and returns a pointer to the closest catch range. If the
//	searchMode is TCL_BREAK, this procedure returns a pointer to the most
//	closely enclosing ExceptionRange regardless of whether it is a loop or
//	catch exception range. If the searchMode is TCL_CONTINUE, this
//	procedure returns a pointer to the most closely enclosing
//	ExceptionRange (of any type) skipping only loop exception ranges if
//	they don't have a sensible continueOffset defined. If no matching
//	ExceptionRange is found that encloses pc, a NULL is returned.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetExceptRangeForPc(tls *libc.TLS, pc uintptr, searchMode int32, codePtr uintptr) uintptr { /* tclExecute.c:10045:23: */
	var rangeArrayPtr uintptr
	var numRanges int32 = (*ByteCode)(unsafe.Pointer(codePtr)).FnumExceptRanges
	var rangePtr uintptr
	var pcOffset int32 = int32((int64(pc) - int64((*ByteCode)(unsafe.Pointer(codePtr)).FcodeStart)) / 1)
	var start int32

	if numRanges == 0 {
		return uintptr(0)
	}

	// This exploits peculiarities of our compiler: nested ranges are always
	// *after* their containing ranges, so that by scanning backwards we are
	// sure that the first matching range is indeed the deepest.

	rangeArrayPtr = (*ByteCode)(unsafe.Pointer(codePtr)).FexceptArrayPtr
	rangePtr = rangeArrayPtr + uintptr(numRanges)*28
	for libc.PreDecUintptr(&rangePtr, 28) >= rangeArrayPtr {
		start = (*ExceptionRange)(unsafe.Pointer(rangePtr)).FcodeOffset
		if start <= pcOffset && pcOffset < start+(*ExceptionRange)(unsafe.Pointer(rangePtr)).FnumCodeBytes {
			if (*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype == CATCH_EXCEPTION_RANGE {
				return rangePtr
			}
			if searchMode == TCL_BREAK {
				return rangePtr
			}
			if searchMode == TCL_CONTINUE && (*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset != -1 {
				return rangePtr
			}
		}
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// GetOpcodeName --
//
//	This procedure is called by the TRACE and TRACE_WITH_OBJ macros used
//	in TclNRExecuteByteCode when debugging. It returns the name of the
//	bytecode instruction at a specified instruction pc.
//
// Results:
//	A character string for the instruction.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

//----------------------------------------------------------------------
//
// TclExprFloatError --
//
//	This procedure is called when an error occurs during a floating-point
//	operation. It reads errno and sets interp->objResultPtr accordingly.
//
// Results:
//	interp->objResultPtr is set to hold an error message.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclExprFloatError(tls *libc.TLS, interp uintptr, value float64) { /* tclExecute.c:10144:1: */
	bp := tls.Alloc(136)
	defer tls.Free(136)

	var s uintptr

	if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EDOM || libc.X__isnan(tls, value) != 0 {
		s = ts + 8791 /* "domain error: ar..." */
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, s, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+8778, ts+8784, s, uintptr(0)))
	} else if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == ERANGE || (value > 1.79769313486231570814527423731704357e+308 || value < -1.79769313486231570814527423731704357e+308) {
		if value == 0.0 {
			s = ts + 30162 /* "floating-point v..." */
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, s, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+8778, ts+30206, s, uintptr(0)))
		} else {
			s = ts + 30216 /* "floating-point v..." */
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, s, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+8778, ts+30260, s, uintptr(0)))
		}
	} else {
		var objPtr uintptr = XTcl_ObjPrintf(tls,
			ts+30269, libc.VaList(bp+96, *(*int32)(unsafe.Pointer(libc.X_errno(tls)))))

		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+8778, ts+14800,
			XTcl_GetString(tls, objPtr), uintptr(0)))
		XTcl_SetObjResult(tls, interp, objPtr)
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//---------------------------------------------------------------------------
//
// TclFileRenameCmd
//
//	This function implements the "rename" subcommand of the "file"
//	command. Filename arguments need to be translated to native format
//	before being passed to platform-specific code that implements rename
//	functionality.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//---------------------------------------------------------------------------

func XTclFileRenameCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclFCmd.c:49:1: */
	return sFileCopyRename(tls, interp, objc, objv, 0)
}

//---------------------------------------------------------------------------
//
// TclFileCopyCmd
//
//	This function implements the "copy" subcommand of the "file" command.
//	Filename arguments need to be translated to native format before being
//	passed to platform-specific code that implements copy functionality.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//---------------------------------------------------------------------------

func XTclFileCopyCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclFCmd.c:78:1: */
	return sFileCopyRename(tls, interp, objc, objv, 1)
}

//---------------------------------------------------------------------------
//
// FileCopyRename --
//
//	Performs the work of TclFileRenameCmd and TclFileCopyCmd. See
//	comments for those functions.
//
// Results:
//	See above.
//
// Side effects:
//	See above.
//
//---------------------------------------------------------------------------

func sFileCopyRename(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, copyFlag int32) int32 { /* tclFCmd.c:106:1: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	var i int32
	var result int32
	// var force int32 at bp+16, 4

	// var statBuf Tcl_StatBuf at bp+24, 56

	var target uintptr

	i = sFileForceOption(tls, interp, objc-1, objv+uintptr(1)*8, bp+16)
	if i < 0 {
		return TCL_ERROR
	}
	i++
	if objc-i < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+30310)
		return TCL_ERROR
	}

	// If target doesn't exist or isn't a directory, try the copy/rename. More
	// than 2 arguments is only valid if the target is an existing directory.

	target = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))
	if XTcl_FSConvertToPathType(tls, interp, target) != TCL_OK {
		return TCL_ERROR
	}

	result = TCL_OK

	// Call Tcl_FSStat() so that if target is a symlink that points to a
	// directory we will put the sources in that directory instead of
	// overwriting the symlink.

	if XTcl_FSStat(tls, target, bp+24) != 0 || !(int32((*Tcl_StatBuf)(unsafe.Pointer(bp+24)).Fst_mode)&X_S_IFMT == X_S_IFDIR) {
		if objc-i > 2 {
			*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = ENOTDIR
			XTcl_PosixError(tls, interp)
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+30357,
				libc.VaList(bp, func() uintptr {
					if copyFlag != 0 {
						return ts + 30398 /* "copying" */
					}
					return ts + 30406 /* "renaming" */
				}(), func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes
					}
					return XTcl_GetString(tls, target)
				}())))
			result = TCL_ERROR
		} else {
			// Even though already have target == translated(objv[i+1]), pass
			// the original argument down, so if there's an error, the error
			// message will reflect the original arguments.

			result = sCopyRenameOneFile(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), copyFlag,
				*(*int32)(unsafe.Pointer(bp + 16 /* force */)))
		}
		return result
	}

	// Move each source file into target directory. Extract the basename from
	// each source, and append it to the end of the target path.

	for ; i < objc-1; i++ {
		// var jargv [2]uintptr at bp+80, 16

		var source uintptr
		var newFileName uintptr

		source = sFileBasename(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		if source == uintptr(0) {
			result = TCL_ERROR
			break
		}
		*(*uintptr)(unsafe.Pointer(bp + 80)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))
		*(*uintptr)(unsafe.Pointer(bp + 80 + 1*8)) = source
		newFileName = XTclJoinPath(tls, 2, bp+80, 1)
		(*Tcl_Obj)(unsafe.Pointer(newFileName)).FrefCount++
		result = sCopyRenameOneFile(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), newFileName, copyFlag,
			*(*int32)(unsafe.Pointer(bp + 16 /* force */)))
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = newFileName
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = source
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}

		if result == TCL_ERROR {
			break
		}
	}
	return result
}

//---------------------------------------------------------------------------
//
// TclFileMakeDirsCmd
//
//	This function implements the "mkdir" subcommand of the "file" command.
//	Filename arguments need to be translated to native format before being
//	passed to platform-specific code that implements mkdir functionality.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTclFileMakeDirsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclFCmd.c:216:1: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var errfile uintptr
	var result int32
	var i int32
	var j int32
	// var pobjc int32 at bp+16, 4

	var split uintptr
	var target uintptr
	// var statBuf Tcl_StatBuf at bp+24, 56

	var _objPtr uintptr
	var errCount int32
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	errfile = uintptr(0)
	split = uintptr(0)
	target = uintptr(0)

	result = TCL_OK
	i = 1
__1:
	if !(i < objc) {
		goto __3
	}
	if !(XTcl_FSConvertToPathType(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) != TCL_OK) {
		goto __4
	}
	result = TCL_ERROR
	goto __3
__4:
	;

	split = XTcl_FSSplitPath(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+16)
	(*Tcl_Obj)(unsafe.Pointer(split)).FrefCount++
	if !(*(*int32)(unsafe.Pointer(bp + 16)) == 0) {
		goto __5
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = ENOENT
	errfile = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	goto __3
__5:
	;
	j = 0
__6:
	if !(j < *(*int32)(unsafe.Pointer(bp + 16))) {
		goto __8
	}
	errCount = 2

	target = XTcl_FSJoinPath(tls, split, j+1)
	(*Tcl_Obj)(unsafe.Pointer(target)).FrefCount++

createDir:

	// Call Tcl_FSStat() so that if target is a symlink that points to
	// a directory we will create subdirectories in that directory.

	if !(XTcl_FSStat(tls, target, bp+24) == 0) {
		goto __9
	}
	if !!(int32((*Tcl_StatBuf)(unsafe.Pointer(bp+24)).Fst_mode)&X_S_IFMT == X_S_IFDIR) {
		goto __11
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EEXIST
	errfile = target
	goto done
__11:
	;
	goto __10
__9:
	if !(*(*int32)(unsafe.Pointer(libc.X_errno(tls))) != ENOENT) {
		goto __12
	}
	// If Tcl_FSStat() failed and the error is anything other than
	// non-existence of the target, throw the error.

	errfile = target
	goto done
	goto __13
__12:
	if !(XTcl_FSCreateDirectory(tls, target) != TCL_OK) {
		goto __14
	}
	// Create might have failed because of being in a race
	// condition with another process trying to create the same
	// subdirectory.

	if !(*(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EEXIST) {
		goto __15
	}
	// Be aware other workers could delete it immediately after
	// creation, so give this worker still one chance (repeat once),
	// see [270f78ca95] for description of the race-condition.
	// Don't repeat the create always (to avoid endless loop).
	if !(libc.PreDecInt32(&errCount, 1) > 0) {
		goto __16
	}
	goto createDir
__16:
	;
	// Already tried, with delete in-between directly after
	// creation, so just continue (assume created successful).
	goto nextPart
__15:
	;

	// return with error
	errfile = target
	goto done
__14:
	;
__13:
	;
__10:
	;

nextPart:
	// Forget about this sub-path.

__17:
	_objPtr = target
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __20
	}
	XTclFreeObj(tls, _objPtr)
__20:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
	target = uintptr(0)
	goto __7
__7:
	j++
	goto __6
	goto __8
__8:
	;
__21:
	_objPtr1 = split
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __24
	}
	XTclFreeObj(tls, _objPtr1)
__24:
	;
	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
	split = uintptr(0)
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;

done:
	if !(errfile != uintptr(0)) {
		goto __25
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+30415,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(errfile)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(errfile)).Fbytes
			}
			return XTcl_GetString(tls, errfile)
		}(), XTcl_PosixError(tls, interp))))
	result = TCL_ERROR
__25:
	;
	if !(split != uintptr(0)) {
		goto __26
	}
__27:
	_objPtr2 = split
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __30
	}
	XTclFreeObj(tls, _objPtr2)
__30:
	;
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
__26:
	;
	if !(target != uintptr(0)) {
		goto __31
	}
__32:
	_objPtr3 = target
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __35
	}
	XTclFreeObj(tls, _objPtr3)
__35:
	;
	goto __33
__33:
	if 0 != 0 {
		goto __32
	}
	goto __34
__34:
	;
__31:
	;
	return result
}

//----------------------------------------------------------------------
//
// TclFileDeleteCmd
//
//	This function implements the "delete" subcommand of the "file"
//	command.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTclFileDeleteCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclFCmd.c:340:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	var i int32
	// var force int32 at bp+32, 4

	var result int32
	var errfile uintptr
	// var errorBuffer uintptr at bp+96, 8

	// var statBuf Tcl_StatBuf at bp+40, 56

	var _objPtr uintptr
	*(*uintptr)(unsafe.Pointer(bp + 96 /* errorBuffer */)) = uintptr(0)

	i = sFileForceOption(tls, interp, objc-1, objv+uintptr(1)*8, bp+32)
	if !(i < 0) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	errfile = uintptr(0)
	result = TCL_OK

	i++
__2:
	if !(i < objc) {
		goto __4
	}

	errfile = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	if !(XTcl_FSConvertToPathType(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) != TCL_OK) {
		goto __5
	}
	result = TCL_ERROR
	goto done
__5:
	;

	// Call lstat() to get info so can delete symbolic link itself.

	if !(XTcl_FSLstat(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+40) != 0) {
		goto __6
	}
	result = TCL_ERROR
	goto __7
__6:
	if !(int32((*Tcl_StatBuf)(unsafe.Pointer(bp+40)).Fst_mode)&X_S_IFMT == X_S_IFDIR) {
		goto __8
	}
	// We own a reference count on errorBuffer, if it was set as a
	// result of this call.

	result = XTcl_FSRemoveDirectory(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), *(*int32)(unsafe.Pointer(bp + 32 /* force */)), bp+96)
	if !(result != TCL_OK) {
		goto __10
	}
	if !(*(*int32)(unsafe.Pointer(bp + 32)) == 0 && *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EEXIST) {
		goto __11
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+30447,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}())))
	XTcl_PosixError(tls, interp)
	goto done
__11:
	;

	// If possible, use the untranslated name for the file.

	errfile = *(*uintptr)(unsafe.Pointer(bp + 96 /* errorBuffer */))

	// FS supposed to check between translated objv and errfile.

	if !(XTcl_FSEqualPaths(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), errfile) != 0) {
		goto __12
	}
	errfile = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
__12:
	;
__10:
	;
	goto __9
__8:
	result = XTcl_FSDeleteFile(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
__9:
	;
__7:
	;

	if !(result != TCL_OK) {
		goto __13
	}

	// Avoid possible race condition (file/directory deleted after call
	// of lstat), so bypass ENOENT because not an error, just a no-op
	if !(*(*int32)(unsafe.Pointer(libc.X_errno(tls))) == ENOENT) {
		goto __14
	}
	result = TCL_OK
	goto __3
__14:
	;
	// It is important that we break on error, otherwise we might end
	// up owning reference counts on numerous errorBuffers.
	result = TCL_ERROR
	goto __4
__13:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;
	if !(result != TCL_OK) {
		goto __15
	}
	if !(errfile == uintptr(0)) {
		goto __16
	}
	// We try to accomodate poor error results from our Tcl_FS calls.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+30488,
		libc.VaList(bp+8, XTcl_PosixError(tls, interp))))
	goto __17
__16:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+30520,
		libc.VaList(bp+16, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(errfile)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(errfile)).Fbytes
			}
			return XTcl_GetString(tls, errfile)
		}(), XTcl_PosixError(tls, interp))))
__17:
	;
__15:
	;

done:
	if !(*(*uintptr)(unsafe.Pointer(bp + 96)) != uintptr(0)) {
		goto __18
	}
__19:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp + 96))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __22
	}
	XTclFreeObj(tls, _objPtr)
__22:
	;
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
__18:
	;
	return result
}

//---------------------------------------------------------------------------
//
// CopyRenameOneFile
//
//	Copies or renames specified source file or directory hierarchy to the
//	specified target.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Target is overwritten if the force flag is set. Attempting to
//	copy/rename a file onto a directory or a directory onto a file will
//	always result in an error.
//
//----------------------------------------------------------------------

func sCopyRenameOneFile(tls *libc.TLS, interp uintptr, source uintptr, target uintptr, copyFlag int32, force int32) int32 { /* tclFCmd.c:468:1: */
	bp := tls.Alloc(232)
	defer tls.Free(232)

	var result int32
	var errfile uintptr
	// var errorBuffer uintptr at bp+224, 8

	var actualSource uintptr // If source is a link, then this is the real
	// file/directory.
	// var sourceStatBuf Tcl_StatBuf at bp+104, 56

	// var targetStatBuf Tcl_StatBuf at bp+160, 56

	var _objPtr uintptr
	var perm uintptr
	// var index int32 at bp+216, 4

	var _objPtr1 uintptr
	// The copy failed because we're trying to do a
	// cross-filesystem copy. We do this through our Tcl library.

	var copyCommand uintptr
	var cmdObj uintptr
	var opObj uintptr
	var errorMsg uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	actualSource = uintptr(0)

	if !(XTcl_FSConvertToPathType(tls, interp, source) != TCL_OK) {
		goto __1
	}
	return TCL_ERROR
__1:
	;
	if !(XTcl_FSConvertToPathType(tls, interp, target) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	errfile = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 224 /* errorBuffer */)) = uintptr(0)
	result = TCL_ERROR

	// We want to copy/rename links and not the files they point to, so we use
	// lstat(). If target is a link, we also want to replace the link and not
	// the file it points to, so we also use lstat() on the target.

	if !(XTcl_FSLstat(tls, source, bp+104) != 0) {
		goto __3
	}
	errfile = source
	goto done
__3:
	;
	if !(XTcl_FSLstat(tls, target, bp+160) != 0) {
		goto __4
	}
	if !(*(*int32)(unsafe.Pointer(libc.X_errno(tls))) != ENOENT) {
		goto __6
	}
	errfile = target
	goto done
__6:
	;
	goto __5
__4:
	if !(force == 0) {
		goto __7
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EEXIST
	errfile = target
	goto done
__7:
	;

	// Prevent copying or renaming a file onto itself. On Windows since
	// 8.5 we do get an inode number, however the unsigned short field is
	// insufficient to accept the Win32 API file id so it is truncated to
	// 16 bits and we get collisions. See bug #2015723.

	// Prevent copying/renaming a file onto a directory and vice-versa.
	// This is a policy decision based on the fact that existing
	// implementations of copy and rename on all platforms also prevent
	// this.

	if !(int32((*Tcl_StatBuf)(unsafe.Pointer(bp+104)).Fst_mode)&X_S_IFMT == X_S_IFDIR &&
		!(int32((*Tcl_StatBuf)(unsafe.Pointer(bp+160)).Fst_mode)&X_S_IFMT == X_S_IFDIR)) {
		goto __8
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EISDIR
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+30544,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes
			}
			return XTcl_GetString(tls, target)
		}(), func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(source)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(source)).Fbytes
			}
			return XTcl_GetString(tls, source)
		}())))
	goto done
__8:
	;
	if !(!(int32((*Tcl_StatBuf)(unsafe.Pointer(bp+104)).Fst_mode)&X_S_IFMT == X_S_IFDIR) &&
		int32((*Tcl_StatBuf)(unsafe.Pointer(bp+160)).Fst_mode)&X_S_IFMT == X_S_IFDIR) {
		goto __9
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EISDIR
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+30590,
		libc.VaList(bp+16, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes
			}
			return XTcl_GetString(tls, target)
		}(), func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(source)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(source)).Fbytes
			}
			return XTcl_GetString(tls, source)
		}())))
	goto done
__9:
	;

	/*
	 * The destination exists, but appears to be ok to over-write, and
	 * -force is given. We now try to adjust permissions to ensure the
	 * operation succeeds. If we can't adjust permissions, we'll let the
	 * actual copy/rename return an error later.
	 */

__10:
	;
__13:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __16
	}
	XTclAllocateFreeObjects(tls)
__16:
	;
	perm = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;
	(*Tcl_Obj)(unsafe.Pointer(perm)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0) {
		goto __17
	}
	(*Tcl_Obj)(unsafe.Pointer(perm)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(perm)).Flength = 0
	goto __18
__17:
	(*Tcl_Obj)(unsafe.Pointer(perm)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(perm)).Fbytes, ts+30636, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(perm)).Fbytes + 3)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(perm)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
__18:
	;
	(*Tcl_Obj)(unsafe.Pointer(perm)).FtypePtr = uintptr(0)

	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	(*Tcl_Obj)(unsafe.Pointer(perm)).FrefCount++
	if !(XTclFSFileAttrIndex(tls, target, ts+30640, bp+216) == TCL_OK) {
		goto __19
	}
	XTcl_FSFileAttrsSet(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp + 216 /* index */)), target, perm)
__19:
	;
__20:
	_objPtr = perm
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __23
	}
	XTclFreeObj(tls, _objPtr)
__23:
	;
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;

__5:
	;

	if !(copyFlag == 0) {
		goto __24
	}
	result = XTcl_FSRenameFile(tls, source, target)
	if !(result == TCL_OK) {
		goto __25
	}
	goto done
__25:
	;

	if !(*(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EINVAL) {
		goto __26
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+30653,
		libc.VaList(bp+32, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(source)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(source)).Fbytes
			}
			return XTcl_GetString(tls, source)
		}(), func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes
			}
			return XTcl_GetString(tls, target)
		}())))
	goto done
	goto __27
__26:
	if !(*(*int32)(unsafe.Pointer(libc.X_errno(tls))) != EXDEV) {
		goto __28
	}
	errfile = target
	goto done
__28:
	;
__27:
	;

	// The rename failed because the move was across file systems. Fall
	// through to copy file and then remove original. Note that the
	// low-level Tcl_FSRenameFileProc in the filesystem is allowed to
	// implement cross-filesystem moves itself, if it desires.
__24:
	;

	actualSource = source
	(*Tcl_Obj)(unsafe.Pointer(actualSource)).FrefCount++

	// Activate the following block to copy files instead of links. However
	// Tcl's semantics currently say we should copy links, so any such change
	// should be the subject of careful study on the consequences.
	//
	// Perhaps there could be an optional flag to 'file copy' to dictate which
	// approach to use, with the default being _not_ to have this block
	// active.

	if !(int32((*Tcl_StatBuf)(unsafe.Pointer(bp+104)).Fst_mode)&X_S_IFMT == X_S_IFDIR) {
		goto __29
	}
	result = XTcl_FSCopyDirectory(tls, actualSource, target, bp+224)
	if !(result != TCL_OK) {
		goto __31
	}
	if !(*(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EXDEV) {
		goto __32
	}

__34:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __37
	}
	XTclAllocateFreeObjects(tls)
__37:
	;
	copyCommand = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
	(*Tcl_Obj)(unsafe.Pointer(copyCommand)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(copyCommand)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(copyCommand)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(copyCommand)).FtypePtr = uintptr(0)

__38:
	;
__41:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __44
	}
	XTclAllocateFreeObjects(tls)
__44:
	;
	cmdObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
	(*Tcl_Obj)(unsafe.Pointer(cmdObj)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([21]int8{}))-uint64(1)) == 0) {
		goto __45
	}
	(*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(cmdObj)).Flength = 0
	goto __46
__45:
	(*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([21]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes, ts+30740, uint64(int32(uint64(unsafe.Sizeof([21]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(cmdObj)).Fbytes + 20)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(cmdObj)).Flength = int32(uint64(unsafe.Sizeof([21]int8{})) - uint64(1))
__46:
	;
	(*Tcl_Obj)(unsafe.Pointer(cmdObj)).FtypePtr = uintptr(0)

	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	XTcl_ListObjAppendElement(tls, interp, copyCommand, cmdObj)
	if !(copyFlag != 0) {
		goto __47
	}
__49:
	;
__52:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __55
	}
	XTclAllocateFreeObjects(tls)
__55:
	;
	opObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)) == 0) {
		goto __56
	}
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
	goto __57
__56:
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+30398, uint64(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 7)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([8]int8{})) - uint64(1))
__57:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)

	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
	goto __48
__47:
__58:
	;
__61:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __64
	}
	XTclAllocateFreeObjects(tls)
__64:
	;
	opObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __62
__62:
	if 0 != 0 {
		goto __61
	}
	goto __63
__63:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1)) == 0) {
		goto __65
	}
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
	goto __66
__65:
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+30406, uint64(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 8)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([9]int8{})) - uint64(1))
__66:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)

	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
__48:
	;
	XTcl_ListObjAppendElement(tls, interp, copyCommand, opObj)
	XTcl_ListObjAppendElement(tls, interp, copyCommand, source)
	XTcl_ListObjAppendElement(tls, interp, copyCommand, target)
	(*Tcl_Obj)(unsafe.Pointer(copyCommand)).FrefCount++
	result = XTcl_EvalObjEx(tls, interp, copyCommand,
		TCL_EVAL_GLOBAL|TCL_EVAL_DIRECT)
__67:
	_objPtr1 = copyCommand
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __70
	}
	XTclFreeObj(tls, _objPtr1)
__70:
	;
	goto __68
__68:
	if 0 != 0 {
		goto __67
	}
	goto __69
__69:
	;
	if !(result != TCL_OK) {
		goto __71
	}
	// There was an error in the Tcl-level copy. We will pass
	// on the Tcl error message and can ensure this by setting
	// errfile to NULL

	errfile = uintptr(0)
__71:
	;
	goto __33
__32:
	errfile = *(*uintptr)(unsafe.Pointer(bp + 224 /* errorBuffer */))
	if !(XTcl_FSEqualPaths(tls, errfile, source) != 0) {
		goto __72
	}
	errfile = source
	goto __73
__72:
	if !(XTcl_FSEqualPaths(tls, errfile, target) != 0) {
		goto __74
	}
	errfile = target
__74:
	;
__73:
	;
__33:
	;
__31:
	;
	goto __30
__29:
	result = XTcl_FSCopyFile(tls, actualSource, target)
	if !(result != TCL_OK && *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EXDEV) {
		goto __75
	}
	result = XTclCrossFilesystemCopy(tls, interp, source, target)
__75:
	;
	if !(result != TCL_OK) {
		goto __76
	}
	// We could examine 'errno' to double-check if the problem was
	// with the target, but we checked the source above, so it should
	// be quite clear

	errfile = target
__76:
	;
	// We now need to reset the result, because the above call,
	// may have left set it.  (Ideally we would prefer not to pass
	// an interpreter in above, but the channel IO code used by
	// TclCrossFilesystemCopy currently requires one)
	XTcl_ResetResult(tls, interp)
__30:
	;
	if !(copyFlag == 0 && result == TCL_OK) {
		goto __77
	}
	if !(int32((*Tcl_StatBuf)(unsafe.Pointer(bp+104)).Fst_mode)&X_S_IFMT == X_S_IFDIR) {
		goto __78
	}
	result = XTcl_FSRemoveDirectory(tls, source, 1, bp+224)
	if !(result != TCL_OK) {
		goto __80
	}
	errfile = *(*uintptr)(unsafe.Pointer(bp + 224 /* errorBuffer */))
	if !(XTcl_FSEqualPaths(tls, errfile, source) == 0) {
		goto __81
	}
	errfile = source
__81:
	;
__80:
	;
	goto __79
__78:
	result = XTcl_FSDeleteFile(tls, source)
	if !(result != TCL_OK) {
		goto __82
	}
	errfile = source
__82:
	;
__79:
	;
	if !(result != TCL_OK) {
		goto __83
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+30761,
		libc.VaList(bp+48, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(errfile)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(errfile)).Fbytes
			}
			return XTcl_GetString(tls, errfile)
		}(), XTcl_PosixError(tls, interp))))
	errfile = uintptr(0)
__83:
	;
__77:
	;

done:
	if !(errfile != uintptr(0)) {
		goto __84
	}
	errorMsg = XTcl_ObjPrintf(tls, ts+30783,
		libc.VaList(bp+64, func() uintptr {
			if copyFlag != 0 {
				return ts + 30398 /* "copying" */
			}
			return ts + 30406 /* "renaming" */
		}(), func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(source)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(source)).Fbytes
			}
			return XTcl_GetString(tls, source)
		}()))

	if !(errfile != source) {
		goto __85
	}
	XTcl_AppendPrintfToObj(tls, errorMsg, ts+30797,
		libc.VaList(bp+80, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(target)).Fbytes
			}
			return XTcl_GetString(tls, target)
		}()))
	if !(errfile != target) {
		goto __86
	}
	XTcl_AppendPrintfToObj(tls, errorMsg, ts+30806,
		libc.VaList(bp+88, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(errfile)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(errfile)).Fbytes
			}
			return XTcl_GetString(tls, errfile)
		}()))
__86:
	;
__85:
	;
	XTcl_AppendPrintfToObj(tls, errorMsg, ts+30813, libc.VaList(bp+96, XTcl_PosixError(tls, interp)))
	XTcl_SetObjResult(tls, interp, errorMsg)
__84:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 224)) != uintptr(0)) {
		goto __87
	}
__88:
	_objPtr2 = *(*uintptr)(unsafe.Pointer(bp + 224))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __91
	}
	XTclFreeObj(tls, _objPtr2)
__91:
	;
	goto __89
__89:
	if 0 != 0 {
		goto __88
	}
	goto __90
__90:
	;
__87:
	;
	if !(actualSource != uintptr(0)) {
		goto __92
	}
__93:
	_objPtr3 = actualSource
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __96
	}
	XTclFreeObj(tls, _objPtr3)
__96:
	;
	goto __94
__94:
	if 0 != 0 {
		goto __93
	}
	goto __95
__95:
	;
__92:
	;
	return result
}

//---------------------------------------------------------------------------
//
// FileForceOption --
//
//	Helps parse command line options for file commands that take the
//	"-force" and "--" options.
//
// Results:
//	The return value is how many arguments from argv were consumed by this
//	function, or -1 if there was an error parsing the options. If an error
//	occurred, an error message is left in the interp's result.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sFileForceOption(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, forcePtr uintptr) int32 { /* tclFCmd.c:819:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var force int32
	var i int32
	// var idx int32 at bp, 4

	force = 0
	for i = 0; i < objc; i++ {
		if int32(*(*int8)(unsafe.Pointer(func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}()))) != '-' {
			break
		}
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options7)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp) != TCL_OK {
			return -1
		}
		if *(*int32)(unsafe.Pointer(bp)) == 0 {
			force = 1
		} else { // --
			i++
			break
		}
	}
	*(*int32)(unsafe.Pointer(forcePtr)) = force
	return i
}

var options7 = [3]uintptr{
	ts + 30818, ts + 16430, uintptr(0),
} /* tclFCmd.c:828:23 */

//---------------------------------------------------------------------------
//
// FileBasename --
//
//	Given a path in either tcl format (with / separators), or in the
//	platform-specific format for the current platform, return all the
//	characters in the path after the last directory separator. But, if
//	path is the root directory, returns no characters.
//
// Results:
//	Returns the string object that represents the basename. If there is an
//	error, an error message is left in interp, and NULL is returned.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sFileBasename(tls *libc.TLS, interp uintptr, pathPtr uintptr) uintptr { /* tclFCmd.c:871:16: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var objc int32 at bp, 4

	var splitPtr uintptr
	*(*uintptr)(unsafe.Pointer(bp + 8 /* resultPtr */)) = uintptr(0)

	splitPtr = XTcl_FSSplitPath(tls, pathPtr, bp)
	(*Tcl_Obj)(unsafe.Pointer(splitPtr)).FrefCount++

	if *(*int32)(unsafe.Pointer(bp)) != 0 {
		if *(*int32)(unsafe.Pointer(bp)) == 1 && int32(*(*int8)(unsafe.Pointer(func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
			}
			return XTcl_GetString(tls, pathPtr)
		}()))) == '~' {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = splitPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			if XTcl_FSConvertToPathType(tls, interp, pathPtr) != TCL_OK {
				return uintptr(0)
			}
			splitPtr = XTcl_FSSplitPath(tls, pathPtr, bp)
			(*Tcl_Obj)(unsafe.Pointer(splitPtr)).FrefCount++
		}

		// Return the last component, unless it is the only component, and it
		// is the root of an absolute path.

		if *(*int32)(unsafe.Pointer(bp)) > 0 {
			XTcl_ListObjIndex(tls, uintptr(0), splitPtr, *(*int32)(unsafe.Pointer(bp))-1, bp+8)
			if *(*int32)(unsafe.Pointer(bp)) == 1 && XTcl_FSGetPathType(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) != TCL_PATH_RELATIVE {
				*(*uintptr)(unsafe.Pointer(bp + 8 /* resultPtr */)) = uintptr(0)
			}
		}
	}
	if *(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0) {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(bp + 8)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FtypePtr = uintptr(0)
		{
		}

	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FrefCount++
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = splitPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return *(*uintptr)(unsafe.Pointer(bp + 8 /* resultPtr */))
}

//----------------------------------------------------------------------
//
// TclFileAttrsCmd --
//
//	Sets or gets the platform-specific attributes of a file. The objc-objv
//	points to the file name with the rest of the command line following.
//	This routine uses platform-specific tables of option strings and
//	callbacks. The callback to get the attributes take three parameters:
//	    Tcl_Interp *interp;	    The interp to report errors with. Since
//				    this is an object-based API, the object
//				    form of the result should be used.
//	    const char *fileName;   This is extracted using
//				    Tcl_TranslateFileName.
//	    TclObj **attrObjPtrPtr; A new object to hold the attribute is
//				    allocated and put here.
//	The first two parameters of the callback used to write out the
//	attributes are the same. The third parameter is:
//	    const *attrObjPtr;	    A pointer to the object that has the new
//				    attribute.
//	They both return standard TCL errors; if the routine to get an
//	attribute fails, no object is allocated and *attrObjPtrPtr is
//	unchanged.
//
// Results:
//	Standard TCL error.
//
// Side effects:
//	May set file attributes for the file name.
//
//----------------------------------------------------------------------

func XTclFileAttrsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclFCmd.c:948:1: */
	bp := tls.Alloc(212)
	defer tls.Free(212)

	var result int32
	var attributeStrings uintptr
	var attributeStringsAllocated uintptr
	// var objStrings uintptr at bp+160, 8

	// var numObjStrings int32 at bp+168, 4

	var filePtr uintptr
	var index int32
	// var objPtr uintptr at bp+176, 8

	var objPtr1 uintptr
	// var objPtrAttr uintptr at bp+184, 8

	var _objPtr uintptr
	// Get all attributes.

	var index1 int32
	var res int32
	var nbAtts int32
	var listPtr uintptr
	// Get one attribute.

	// var index2 int32 at bp+192, 4

	// var objPtr2 uintptr at bp+200, 8

	// Set option/value pairs.

	var i int32
	// var index3 int32 at bp+208, 4

	var _objPtr1 uintptr
	attributeStringsAllocated = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 160 /* objStrings */)) = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 168 /* numObjStrings */)) = -1

	if !(objc < 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+30825)
	return TCL_ERROR
__1:
	;

	filePtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if !(XTcl_FSConvertToPathType(tls, interp, filePtr) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	objc = objc - 2
	objv += 8 * uintptr(2)
	result = TCL_ERROR
	XTcl_SetErrno(tls, 0)

	// Get the set of attribute names from the filesystem.

	attributeStrings = XTcl_FSFileAttrStrings(tls, filePtr, bp+160)
	if !(attributeStrings == uintptr(0)) {
		goto __3
	}

	if !(*(*uintptr)(unsafe.Pointer(bp + 160)) == uintptr(0)) {
		goto __5
	}
	if !(XTcl_GetErrno(tls) != 0) {
		goto __6
	}
	// There was an error, probably that the filePtr is not
	// accepted by any filesystem

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+13360,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(filePtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(filePtr)).Fbytes
			}
			return XTcl_GetString(tls, filePtr)
		}(), XTcl_PosixError(tls, interp))))
__6:
	;
	return TCL_ERROR
__5:
	;

	// We own the object now.

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 160)))).FrefCount++

	// Use objStrings as a list object.

	if !(XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 160)), bp+168) != TCL_OK) {
		goto __7
	}
	goto end
__7:
	;
	attributeStringsAllocated = XTclStackAlloc(tls, interp, int32(uint64(1+*(*int32)(unsafe.Pointer(bp + 168)))*uint64(unsafe.Sizeof(uintptr(0)))))
	index = 0
__8:
	if !(index < *(*int32)(unsafe.Pointer(bp + 168))) {
		goto __10
	}
	XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 160 /* objStrings */)), index, bp+176)
	*(*uintptr)(unsafe.Pointer(attributeStringsAllocated + uintptr(index)*8)) = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))
	}()
	goto __9
__9:
	index++
	goto __8
	goto __10
__10:
	;
	*(*uintptr)(unsafe.Pointer(attributeStringsAllocated + uintptr(index)*8)) = uintptr(0)
	attributeStrings = attributeStringsAllocated
	goto __4
__3:
	if !(*(*uintptr)(unsafe.Pointer(bp + 160)) != uintptr(0)) {
		goto __11
	}
	XTcl_Panic(tls, ts+30850, 0)
__11:
	;
__4:
	;

	// Process the attributes to produce a list of all of them, the value of a
	// particular attribute, or to set one or more attributes (depending on
	// the number of arguments).

	if !(objc == 0) {
		goto __12
	}
	res = TCL_OK
	nbAtts = 0

	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	index1 = 0
__14:
	if !(*(*uintptr)(unsafe.Pointer(attributeStrings + uintptr(index1)*8)) != uintptr(0)) {
		goto __16
	}

	if !(res != TCL_OK) {
		goto __17
	}
	// Clear the error from the last iteration.

	XTcl_ResetResult(tls, interp)
__17:
	;

	res = XTcl_FSFileAttrsGet(tls, interp, index1, filePtr, bp+184)
	if !(res == TCL_OK) {
		goto __18
	}
	objPtr1 =
		XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(attributeStrings + uintptr(index1)*8)), -1)

	XTcl_ListObjAppendElement(tls, interp, listPtr, objPtr1)
	XTcl_ListObjAppendElement(tls, interp, listPtr, *(*uintptr)(unsafe.Pointer(bp + 184 /* objPtrAttr */)))
	nbAtts++
__18:
	;
	goto __15
__15:
	index1++
	goto __14
	goto __16
__16:
	;

	if !(index1 > 0 && nbAtts == 0) {
		goto __19
	}
	// Error: no valid attributes found.

__20:
	_objPtr = listPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __23
	}
	XTclFreeObj(tls, _objPtr)
__23:
	;
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	goto end
__19:
	;

	XTcl_SetObjResult(tls, interp, listPtr)
	goto __13
__12:
	if !(objc == 1) {
		goto __24
	}
	*(*uintptr)(unsafe.Pointer(bp + 200 /* objPtr2 */)) = uintptr(0)

	if !(*(*int32)(unsafe.Pointer(bp + 168)) == 0) {
		goto __26
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+30907, libc.VaList(bp+16, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+7949, ts+30972, ts+8740, uintptr(0)))
	goto end
__26:
	;

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), attributeStrings, int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+192) != TCL_OK) {
		goto __27
	}
	goto end
__27:
	;
	if !(attributeStringsAllocated != uintptr(0)) {
		goto __28
	}
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).FtypePtr != uintptr(0)) {
		goto __29
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __30
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(objv)))
__30:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).FtypePtr = uintptr(0)
__29:
	;

__28:
	;
	if !(XTcl_FSFileAttrsGet(tls, interp, *(*int32)(unsafe.Pointer(bp + 192)), filePtr,
		bp+200) != TCL_OK) {
		goto __31
	}
	goto end
__31:
	;
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 200 /* objPtr2 */)))
	goto __25
__24:

	if !(*(*int32)(unsafe.Pointer(bp + 168)) == 0) {
		goto __32
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+30907, libc.VaList(bp+64, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+7949, ts+30972, ts+8740, uintptr(0)))
	goto end
__32:
	;

	i = 0
__33:
	if !(i < objc) {
		goto __35
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), attributeStrings, int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+208) != TCL_OK) {
		goto __36
	}
	goto end
__36:
	;
	if !(attributeStringsAllocated != uintptr(0)) {
		goto __37
	}
	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr != uintptr(0)) {
		goto __38
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __39
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
__39:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr = uintptr(0)
__38:
	;

__37:
	;
	if !(i+1 == objc) {
		goto __40
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+30978, libc.VaList(bp+112, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+120, ts+4178, ts+7949, ts+30972,
		ts+31001, uintptr(0)))
	goto end
__40:
	;
	if !(XTcl_FSFileAttrsSet(tls, interp, *(*int32)(unsafe.Pointer(bp + 208)), filePtr,
		*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))) != TCL_OK) {
		goto __41
	}
	goto end
__41:
	;
	goto __34
__34:
	i = i + 2
	goto __33
	goto __35
__35:
	;
__25:
	;
__13:
	;
	result = TCL_OK

	// Free up the array we allocated and drop our reference to any list of
	// attribute names issued by the filesystem.

end:
	if !(attributeStringsAllocated != uintptr(0)) {
		goto __42
	}
	XTclStackFree(tls, interp, attributeStringsAllocated)
__42:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 160)) != uintptr(0)) {
		goto __43
	}
__44:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp + 160))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __47
	}
	XTclFreeObj(tls, _objPtr1)
__47:
	;
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
__43:
	;
	return result
}

//----------------------------------------------------------------------
//
// TclFileLinkCmd --
//
//	This function is invoked to process the "file link" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May create a new link.
//
//----------------------------------------------------------------------

func XTclFileLinkCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclFCmd.c:1170:1: */
	bp := tls.Alloc(76)
	defer tls.Free(76)

	var contents uintptr
	var index int32

	if objc < 2 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31009)
		return TCL_ERROR
	}

	// Index of the 'source' argument.

	if objc == 4 {
		index = 2
	} else {
		index = 1
	}

	if objc > 2 {
		// var linkAction int32 at bp+72, 4

		if objc == 4 {
			if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&linkTypes)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+72) != TCL_OK {
				return TCL_ERROR
			}
			if *(*int32)(unsafe.Pointer(bp + 72)) == 0 {
				*(*int32)(unsafe.Pointer(bp + 72 /* linkAction */)) = TCL_CREATE_SYMBOLIC_LINK
			} else {
				*(*int32)(unsafe.Pointer(bp + 72 /* linkAction */)) = TCL_CREATE_HARD_LINK
			}
		} else {
			*(*int32)(unsafe.Pointer(bp + 72 /* linkAction */)) = TCL_CREATE_SYMBOLIC_LINK | TCL_CREATE_HARD_LINK
		}
		if XTcl_FSConvertToPathType(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8))) != TCL_OK {
			return TCL_ERROR
		}

		// Create link from source to target.

		contents = XTcl_FSLink(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(index+1)*8)), *(*int32)(unsafe.Pointer(bp + 72 /* linkAction */)))
		if contents == uintptr(0) {
			// We handle three common error cases specially, and for all other
			// errors, we use the standard posix error message.

			if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EEXIST {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

					ts+31039, libc.VaList(bp, func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes
						}
						return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))
					}())))
				XTcl_PosixError(tls, interp)
			} else if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == ENOENT {
				// There are two cases here: either the target doesn't exist,
				// or the directory of the src doesn't exist.

				var access int32
				var dirPtr uintptr = XTclPathPart(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)),
					TCL_PATH_DIRNAME)

				if dirPtr == uintptr(0) {
					return TCL_ERROR
				}
				access = XTcl_FSAccess(tls, dirPtr, F_OK)
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = dirPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				if access != 0 {
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

						ts+31096, libc.VaList(bp+8, func() uintptr {
							if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes != 0 {
								return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes
							}
							return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))
						}())))
					XTcl_PosixError(tls, interp)
				} else {
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

						ts+31154, libc.VaList(bp+16, func() uintptr {
							if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes != 0 {
								return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes
							}
							return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))
						}(),
							func() uintptr {
								if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index+1)*8)))).Fbytes != 0 {
									return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index+1)*8)))).Fbytes
								}
								return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(index+1)*8)))
							}())))
					*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = ENOENT
					XTcl_PosixError(tls, interp)
				}
			} else {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+31212,
					libc.VaList(bp+32, func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes
						}
						return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))
					}(),
						func() uintptr {
							if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index+1)*8)))).Fbytes != 0 {
								return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index+1)*8)))).Fbytes
							}
							return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(index+1)*8)))
						}(), XTcl_PosixError(tls, interp))))
			}
			return TCL_ERROR
		}
	} else {
		if XTcl_FSConvertToPathType(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8))) != TCL_OK {
			return TCL_ERROR
		}

		// Read link

		contents = XTcl_FSLink(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)), uintptr(0), 0)
		if contents == uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+31264,
				libc.VaList(bp+56, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(index)*8)))
				}(), XTcl_PosixError(tls, interp))))
			return TCL_ERROR
		}
	}
	XTcl_SetObjResult(tls, interp, contents)
	if objc == 2 {
		// If we are reading a link, we need to free this result refCount. If
		// we are creating a link, this will just be objv[index+1], and so we
		// don't own it.

		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = contents
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return TCL_OK
}

var linkTypes = [3]uintptr{
	ts + 31293, ts + 31303, uintptr(0),
} /* tclFCmd.c:1202:24 */

//----------------------------------------------------------------------
//
// TclFileReadLinkCmd --
//
//	This function is invoked to process the "file readlink" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFileReadLinkCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclFCmd.c:1321:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var contents uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}

	if XTcl_FSConvertToPathType(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) != TCL_OK {
		return TCL_ERROR
	}

	contents = XTcl_FSLink(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), 0)

	if contents == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+31264,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}(), XTcl_PosixError(tls, interp))))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, contents)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = contents
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

//---------------------------------------------------------------------------
//
// TclFileTemporaryCmd
//
//	This function implements the "tempfile" subcommand of the "file"
//	command.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Creates a temporary file. Opens a channel to that file and puts the
//	name of that channel in the result. *Might* register suitable exit
//	handlers to ensure that the temporary file gets deleted. Might write
//	to a variable, so reentrancy is a potential issue.
//
//---------------------------------------------------------------------------

func XTclFileTemporaryCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclFCmd.c:1372:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var nameVarObj uintptr // Variable to store the name of the temporary
	// file in.
	var nameObj uintptr   // Object that will contain the filename.
	var chan1 Tcl_Channel // The channel opened (RDWR) on the temporary
	// file, or NULL if there's an error.
	var tempDirObj uintptr
	var tempBaseObj uintptr
	var tempExtObj uintptr
	var tailObj uintptr
	// var length int32 at bp+8, 4

	var templateObj uintptr
	var string uintptr
	nameVarObj = uintptr(0)
	nameObj = uintptr(0)
	tempDirObj = uintptr(0)
	tempBaseObj = uintptr(0)
	tempExtObj = uintptr(0)
	// Pieces of template. Each piece is NULL if
	// it is omitted. The platform temporary file
	// engine might ignore some pieces.

	if !(objc < 1 || objc > 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31309)
	return TCL_ERROR
__1:
	;

	if !(objc > 1) {
		goto __2
	}
	nameVarObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
__3:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __6
	}
	XTclAllocateFreeObjects(tls)
__6:
	;
	nameObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4
__4:
	if 0 != 0 {
		goto __3
	}
	goto __5
__5:
	;
	(*Tcl_Obj)(unsafe.Pointer(nameObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(nameObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(nameObj)).FtypePtr = uintptr(0)

__2:
	;
	if !(objc > 2) {
		goto __7
	}
	templateObj = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(templateObj)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 8)) = (*Tcl_Obj)(unsafe.Pointer(templateObj)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(templateObj)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, templateObj, bp+8)
	}()

	// Treat an empty string as if it wasn't there.

	if !(*(*int32)(unsafe.Pointer(bp + 8)) == 0) {
		goto __8
	}
	goto makeTemporary
__8:
	;

	// The template only gives a directory if there is a directory
	// separator in it.

	if !(libc.Xstrchr(tls, string, '/') != uintptr(0) ||
		XtclPlatform == TCL_PLATFORM_WINDOWS &&
			libc.Xstrchr(tls, string, '\\') != uintptr(0)) {
		goto __9
	}
	tempDirObj = XTclPathPart(tls, interp, templateObj, TCL_PATH_DIRNAME)

	// Only allow creation of temporary files in the native filesystem
	// since they are frequently used for integration with external
	// tools or system libraries. [Bug 2388866]

	if !(tempDirObj != uintptr(0) && XTcl_FSGetFileSystemForPath(tls, tempDirObj) !=
		uintptr(unsafe.Pointer(&XtclNativeFilesystem))) {
		goto __10
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tempDirObj)).FrefCount, 1) > 1) {
		goto __11
	}
	goto __12
__11:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tempDirObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tempDirObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __13
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes != XtclEmptyStringRep) {
		goto __15
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes)
__15:
	;
	(*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Flength = -1
__16:
	;
	*(*uintptr)(unsafe.Pointer(tempDirObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tempDirObj
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	goto __14
__13:
	XTclFreeObj(tls, tempDirObj)
__14:
	;
__12:
	;

	tempDirObj = uintptr(0)
__10:
	;
__9:
	;

	// The template only gives the filename if the last character isn't a
	// directory separator.

	if !(int32(*(*int8)(unsafe.Pointer(string + uintptr(*(*int32)(unsafe.Pointer(bp + 8))-1)))) != '/' && (XtclPlatform != TCL_PLATFORM_WINDOWS ||
		int32(*(*int8)(unsafe.Pointer(string + uintptr(*(*int32)(unsafe.Pointer(bp + 8))-1)))) != '\\')) {
		goto __19
	}
	tailObj = XTclPathPart(tls, interp, templateObj,
		TCL_PATH_TAIL)

	if !(tailObj != uintptr(0)) {
		goto __20
	}
	tempBaseObj = XTclPathPart(tls, interp, tailObj, TCL_PATH_ROOT)
	tempExtObj = XTclPathPart(tls, interp, tailObj, TCL_PATH_EXTENSION)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tailObj)).FrefCount, 1) > 1) {
		goto __21
	}
	goto __22
__21:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tailObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tailObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __23
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tailObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tailObj)).Fbytes != XtclEmptyStringRep) {
		goto __25
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tailObj)).Fbytes)
__25:
	;
	(*Tcl_Obj)(unsafe.Pointer(tailObj)).Flength = -1
__26:
	;
	*(*uintptr)(unsafe.Pointer(tailObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tailObj
	goto __27
__27:
	if 0 != 0 {
		goto __26
	}
	goto __28
__28:
	;
	goto __24
__23:
	XTclFreeObj(tls, tailObj)
__24:
	;
__22:
	;

__20:
	;
__19:
	;
__7:
	;

	// Convert empty parts of the template into unspecified parts.

	if !(tempDirObj != 0 && !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes
		}
		return XTcl_GetString(tls, tempDirObj)
	}()))) != 0)) {
		goto __29
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tempDirObj)).FrefCount, 1) > 1) {
		goto __30
	}
	goto __31
__30:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tempDirObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tempDirObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __32
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes != XtclEmptyStringRep) {
		goto __34
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes)
__34:
	;
	(*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Flength = -1
__35:
	;
	*(*uintptr)(unsafe.Pointer(tempDirObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tempDirObj
	goto __36
__36:
	if 0 != 0 {
		goto __35
	}
	goto __37
__37:
	;
	goto __33
__32:
	XTclFreeObj(tls, tempDirObj)
__33:
	;
__31:
	;

	tempDirObj = uintptr(0)
__29:
	;
	if !(tempBaseObj != 0 && !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Fbytes
		}
		return XTcl_GetString(tls, tempBaseObj)
	}()))) != 0)) {
		goto __38
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).FrefCount, 1) > 1) {
		goto __39
	}
	goto __40
__39:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __41
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Fbytes != XtclEmptyStringRep) {
		goto __43
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Fbytes)
__43:
	;
	(*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Flength = -1
__44:
	;
	*(*uintptr)(unsafe.Pointer(tempBaseObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tempBaseObj
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
	goto __42
__41:
	XTclFreeObj(tls, tempBaseObj)
__42:
	;
__40:
	;

	tempBaseObj = uintptr(0)
__38:
	;
	if !(tempExtObj != 0 && !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Fbytes
		}
		return XTcl_GetString(tls, tempExtObj)
	}()))) != 0)) {
		goto __47
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tempExtObj)).FrefCount, 1) > 1) {
		goto __48
	}
	goto __49
__48:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tempExtObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tempExtObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __50
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Fbytes != XtclEmptyStringRep) {
		goto __52
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Fbytes)
__52:
	;
	(*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Flength = -1
__53:
	;
	*(*uintptr)(unsafe.Pointer(tempExtObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tempExtObj
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
	goto __51
__50:
	XTclFreeObj(tls, tempExtObj)
__51:
	;
__49:
	;

	tempExtObj = uintptr(0)
__47:
	;

	// Create and open the temporary file.

makeTemporary:
	chan1 = XTclpOpenTemporaryFile(tls, tempDirObj, tempBaseObj, tempExtObj, nameObj)

	// If we created pieces of template, get rid of them now.

	if !(tempDirObj != 0) {
		goto __56
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tempDirObj)).FrefCount, 1) > 1) {
		goto __57
	}
	goto __58
__57:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tempDirObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tempDirObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __59
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes != XtclEmptyStringRep) {
		goto __61
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Fbytes)
__61:
	;
	(*Tcl_Obj)(unsafe.Pointer(tempDirObj)).Flength = -1
__62:
	;
	*(*uintptr)(unsafe.Pointer(tempDirObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tempDirObj
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
	goto __60
__59:
	XTclFreeObj(tls, tempDirObj)
__60:
	;
__58:
	;

__56:
	;
	if !(tempBaseObj != 0) {
		goto __65
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).FrefCount, 1) > 1) {
		goto __66
	}
	goto __67
__66:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __68
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Fbytes != XtclEmptyStringRep) {
		goto __70
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Fbytes)
__70:
	;
	(*Tcl_Obj)(unsafe.Pointer(tempBaseObj)).Flength = -1
__71:
	;
	*(*uintptr)(unsafe.Pointer(tempBaseObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tempBaseObj
	goto __72
__72:
	if 0 != 0 {
		goto __71
	}
	goto __73
__73:
	;
	goto __69
__68:
	XTclFreeObj(tls, tempBaseObj)
__69:
	;
__67:
	;

__65:
	;
	if !(tempExtObj != 0) {
		goto __74
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tempExtObj)).FrefCount, 1) > 1) {
		goto __75
	}
	goto __76
__75:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tempExtObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tempExtObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __77
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Fbytes != XtclEmptyStringRep) {
		goto __79
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Fbytes)
__79:
	;
	(*Tcl_Obj)(unsafe.Pointer(tempExtObj)).Flength = -1
__80:
	;
	*(*uintptr)(unsafe.Pointer(tempExtObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tempExtObj
	goto __81
__81:
	if 0 != 0 {
		goto __80
	}
	goto __82
__82:
	;
	goto __78
__77:
	XTclFreeObj(tls, tempExtObj)
__78:
	;
__76:
	;

__74:
	;

	// Deal with results.

	if !(chan1 == uintptr(0)) {
		goto __83
	}
	if !(nameVarObj != 0) {
		goto __84
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(nameObj)).FrefCount, 1) > 1) {
		goto __85
	}
	goto __86
__85:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(nameObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nameObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __87
	}

	if !((*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes != XtclEmptyStringRep) {
		goto __89
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes)
__89:
	;
	(*Tcl_Obj)(unsafe.Pointer(nameObj)).Flength = -1
__90:
	;
	*(*uintptr)(unsafe.Pointer(nameObj + 32)) = XtclFreeObjList
	XtclFreeObjList = nameObj
	goto __91
__91:
	if 0 != 0 {
		goto __90
	}
	goto __92
__92:
	;
	goto __88
__87:
	XTclFreeObj(tls, nameObj)
__88:
	;
__86:
	;

__84:
	;
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+31330, libc.VaList(bp, XTcl_PosixError(tls, interp))))
	return TCL_ERROR
__83:
	;
	XTcl_RegisterChannel(tls, interp, chan1)
	if !(nameVarObj != uintptr(0)) {
		goto __93
	}
	if !(XTcl_ObjSetVar2(tls, interp, nameVarObj, uintptr(0), nameObj,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __94
	}
	XTcl_UnregisterChannel(tls, interp, chan1)
	return TCL_ERROR
__94:
	;
__93:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, XTcl_GetChannelName(tls, chan1), -1))
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The following variable is set in the TclPlatformInit call to one of:
// TCL_PLATFORM_UNIX or TCL_PLATFORM_WINDOWS.

var XtclPlatform TclPlatformType = TCL_PLATFORM_UNIX /* tclFileName.c:23:17 */

// When there is no support for getting the block size of a file in a stat()
// call, use this as a guess. Allow it to be overridden in the platform-
// specific files.

//----------------------------------------------------------------------
//
// SetResultLength --
//
//	Resets the result DString for ExtractWinRoot to accommodate
//	any NT extended path prefixes.
//
// Results:
//	None.
//
// Side effects:
//	May modify the Tcl_DString.
//----------------------------------------------------------------------

func sSetResultLength(tls *libc.TLS, resultPtr uintptr, offset int32, extended int32) { /* tclFileName.c:68:1: */
	XTcl_DStringSetLength(tls, resultPtr, offset)
	if extended == 2 {
		XTcl_DStringAppend(tls, resultPtr, ts+31362, int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1)))
	} else if extended == 1 {
		XTcl_DStringAppend(tls, resultPtr, ts+31371, int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)))
	}
}

//----------------------------------------------------------------------
//
// ExtractWinRoot --
//
//	Matches the root portion of a Windows path and appends it to the
//	specified Tcl_DString.
//
// Results:
//	Returns the position in the path immediately after the root including
//	any trailing slashes. Appends a cleaned up version of the root to the
//	Tcl_DString at the specified offest.
//
// Side effects:
//	Modifies the specified Tcl_DString.
//
//----------------------------------------------------------------------

func sExtractWinRoot(tls *libc.TLS, path uintptr, resultPtr uintptr, offset int32, typePtr uintptr) uintptr { /* tclFileName.c:100:19: */
	var extended int32 = 0

	if (int32(*(*int8)(unsafe.Pointer(path))) == '/' || int32(*(*int8)(unsafe.Pointer(path))) == '\\') &&
		(int32(*(*int8)(unsafe.Pointer(path + 1))) == '/' || int32(*(*int8)(unsafe.Pointer(path + 1))) == '\\') &&
		int32(*(*int8)(unsafe.Pointer(path + 2))) == '?' &&
		(int32(*(*int8)(unsafe.Pointer(path + 3))) == '/' || int32(*(*int8)(unsafe.Pointer(path + 3))) == '\\') {
		extended = 1
		path = path + uintptr(4)
		if int32(*(*int8)(unsafe.Pointer(path))) == 'U' && int32(*(*int8)(unsafe.Pointer(path + 1))) == 'N' && int32(*(*int8)(unsafe.Pointer(path + 2))) == 'C' &&
			(int32(*(*int8)(unsafe.Pointer(path + 3))) == '/' || int32(*(*int8)(unsafe.Pointer(path + 3))) == '\\') {
			extended = 2
			path = path + uintptr(4)
		}
	}

	if int32(*(*int8)(unsafe.Pointer(path))) == '/' || int32(*(*int8)(unsafe.Pointer(path))) == '\\' {
		// Might be a UNC or Vol-Relative path.

		var host uintptr
		var share uintptr
		var tail uintptr
		var hlen int32
		var slen int32

		if int32(*(*int8)(unsafe.Pointer(path + 1))) != '/' && int32(*(*int8)(unsafe.Pointer(path + 1))) != '\\' {
			sSetResultLength(tls, resultPtr, offset, extended)
			*(*Tcl_PathType)(unsafe.Pointer(typePtr)) = TCL_PATH_VOLUME_RELATIVE
			XTcl_DStringAppend(tls, resultPtr, ts+6377, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
			return path + 1
		}
		host = path + 2

		// Skip separators.

		for int32(*(*int8)(unsafe.Pointer(host))) == '/' || int32(*(*int8)(unsafe.Pointer(host))) == '\\' {
			host++
		}

		for hlen = 0; *(*int8)(unsafe.Pointer(host + uintptr(hlen))) != 0; hlen++ {
			if int32(*(*int8)(unsafe.Pointer(host + uintptr(hlen)))) == '/' || int32(*(*int8)(unsafe.Pointer(host + uintptr(hlen)))) == '\\' {
				break
			}
		}
		if int32(*(*int8)(unsafe.Pointer(host + uintptr(hlen)))) == 0 || int32(*(*int8)(unsafe.Pointer(host + uintptr(hlen+1)))) == 0 {
			// The path given is simply of the form '/foo', '//foo',
			// '/////foo' or the same with backslashes. If there is exactly
			// one leading '/' the path is volume relative (see filename man
			// page). If there are more than one, we are simply assuming they
			// are superfluous and we trim them away. (An alternative
			// interpretation would be that it is a host name, but we have
			// been documented that that is not the case).

			*(*Tcl_PathType)(unsafe.Pointer(typePtr)) = TCL_PATH_VOLUME_RELATIVE
			XTcl_DStringAppend(tls, resultPtr, ts+6377, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
			return path + 2
		}
		sSetResultLength(tls, resultPtr, offset, extended)
		share = host + uintptr(hlen)

		// Skip separators.

		for int32(*(*int8)(unsafe.Pointer(share))) == '/' || int32(*(*int8)(unsafe.Pointer(share))) == '\\' {
			share++
		}

		for slen = 0; *(*int8)(unsafe.Pointer(share + uintptr(slen))) != 0; slen++ {
			if int32(*(*int8)(unsafe.Pointer(share + uintptr(slen)))) == '/' || int32(*(*int8)(unsafe.Pointer(share + uintptr(slen)))) == '\\' {
				break
			}
		}
		XTcl_DStringAppend(tls, resultPtr, ts+31376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
		XTcl_DStringAppend(tls, resultPtr, host, hlen)
		XTcl_DStringAppend(tls, resultPtr, ts+6377, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
		XTcl_DStringAppend(tls, resultPtr, share, slen)

		tail = share + uintptr(slen)

		// Skip separators.

		for int32(*(*int8)(unsafe.Pointer(tail))) == '/' || int32(*(*int8)(unsafe.Pointer(tail))) == '\\' {
			tail++
		}

		*(*Tcl_PathType)(unsafe.Pointer(typePtr)) = TCL_PATH_ABSOLUTE
		return tail
	} else if *(*int8)(unsafe.Pointer(path)) != 0 && int32(*(*int8)(unsafe.Pointer(path + 1))) == ':' {
		// Might be a drive separator.

		sSetResultLength(tls, resultPtr, offset, extended)

		if int32(*(*int8)(unsafe.Pointer(path + 2))) != '/' && int32(*(*int8)(unsafe.Pointer(path + 2))) != '\\' {
			*(*Tcl_PathType)(unsafe.Pointer(typePtr)) = TCL_PATH_VOLUME_RELATIVE
			XTcl_DStringAppend(tls, resultPtr, path, 2)
			return path + 2
		} else {
			var tail uintptr = path + 3

			// Skip separators.

			for *(*int8)(unsafe.Pointer(tail)) != 0 && (int32(*(*int8)(unsafe.Pointer(tail))) == '/' || int32(*(*int8)(unsafe.Pointer(tail))) == '\\') {
				tail++
			}

			*(*Tcl_PathType)(unsafe.Pointer(typePtr)) = TCL_PATH_ABSOLUTE
			XTcl_DStringAppend(tls, resultPtr, path, 2)
			XTcl_DStringAppend(tls, resultPtr, ts+6377, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))

			return tail
		}
	} else {
		var abs int32 = 0

		// Check for Windows devices.

		if (int32(*(*int8)(unsafe.Pointer(path))) == 'c' || int32(*(*int8)(unsafe.Pointer(path))) == 'C') &&
			(int32(*(*int8)(unsafe.Pointer(path + 1))) == 'o' || int32(*(*int8)(unsafe.Pointer(path + 1))) == 'O') {
			if (int32(*(*int8)(unsafe.Pointer(path + 2))) == 'm' || int32(*(*int8)(unsafe.Pointer(path + 2))) == 'M') &&
				int32(*(*int8)(unsafe.Pointer(path + 3))) >= '1' && int32(*(*int8)(unsafe.Pointer(path + 3))) <= '9' {
				// May have match for 'com[1-9]:?', which is a serial port.

				if int32(*(*int8)(unsafe.Pointer(path + 4))) == 0 {
					abs = 4
				} else if int32(*(*int8)(unsafe.Pointer(path + 4))) == ':' && int32(*(*int8)(unsafe.Pointer(path + 5))) == 0 {
					abs = 5
				}

			} else if (int32(*(*int8)(unsafe.Pointer(path + 2))) == 'n' || int32(*(*int8)(unsafe.Pointer(path + 2))) == 'N') && int32(*(*int8)(unsafe.Pointer(path + 3))) == 0 {
				// Have match for 'con'.

				abs = 3
			}

		} else if (int32(*(*int8)(unsafe.Pointer(path))) == 'l' || int32(*(*int8)(unsafe.Pointer(path))) == 'L') &&
			(int32(*(*int8)(unsafe.Pointer(path + 1))) == 'p' || int32(*(*int8)(unsafe.Pointer(path + 1))) == 'P') &&
			(int32(*(*int8)(unsafe.Pointer(path + 2))) == 't' || int32(*(*int8)(unsafe.Pointer(path + 2))) == 'T') {
			if int32(*(*int8)(unsafe.Pointer(path + 3))) >= '1' && int32(*(*int8)(unsafe.Pointer(path + 3))) <= '9' {
				// May have match for 'lpt[1-9]:?'

				if int32(*(*int8)(unsafe.Pointer(path + 4))) == 0 {
					abs = 4
				} else if int32(*(*int8)(unsafe.Pointer(path + 4))) == ':' && int32(*(*int8)(unsafe.Pointer(path + 5))) == 0 {
					abs = 5
				}
			}

		} else if (int32(*(*int8)(unsafe.Pointer(path))) == 'p' || int32(*(*int8)(unsafe.Pointer(path))) == 'P') &&
			(int32(*(*int8)(unsafe.Pointer(path + 1))) == 'r' || int32(*(*int8)(unsafe.Pointer(path + 1))) == 'R') &&
			(int32(*(*int8)(unsafe.Pointer(path + 2))) == 'n' || int32(*(*int8)(unsafe.Pointer(path + 2))) == 'N') &&
			int32(*(*int8)(unsafe.Pointer(path + 3))) == 0 {
			// Have match for 'prn'.
			abs = 3

		} else if (int32(*(*int8)(unsafe.Pointer(path))) == 'n' || int32(*(*int8)(unsafe.Pointer(path))) == 'N') &&
			(int32(*(*int8)(unsafe.Pointer(path + 1))) == 'u' || int32(*(*int8)(unsafe.Pointer(path + 1))) == 'U') &&
			(int32(*(*int8)(unsafe.Pointer(path + 2))) == 'l' || int32(*(*int8)(unsafe.Pointer(path + 2))) == 'L') &&
			int32(*(*int8)(unsafe.Pointer(path + 3))) == 0 {
			// Have match for 'nul'.

			abs = 3

		} else if (int32(*(*int8)(unsafe.Pointer(path))) == 'a' || int32(*(*int8)(unsafe.Pointer(path))) == 'A') &&
			(int32(*(*int8)(unsafe.Pointer(path + 1))) == 'u' || int32(*(*int8)(unsafe.Pointer(path + 1))) == 'U') &&
			(int32(*(*int8)(unsafe.Pointer(path + 2))) == 'x' || int32(*(*int8)(unsafe.Pointer(path + 2))) == 'X') &&
			int32(*(*int8)(unsafe.Pointer(path + 3))) == 0 {
			// Have match for 'aux'.

			abs = 3
		}

		if abs != 0 {
			*(*Tcl_PathType)(unsafe.Pointer(typePtr)) = TCL_PATH_ABSOLUTE
			sSetResultLength(tls, resultPtr, offset, extended)
			XTcl_DStringAppend(tls, resultPtr, path, abs)
			return path + uintptr(abs)
		}
	}

	// Anything else is treated as relative.

	*(*Tcl_PathType)(unsafe.Pointer(typePtr)) = TCL_PATH_RELATIVE
	return path
}

//----------------------------------------------------------------------
//
// Tcl_GetPathType --
//
//	Determines whether a given path is relative to the current directory,
//	relative to the current volume, or absolute.
//
//	The objectified Tcl_FSGetPathType should be used in preference to this
//	function (as you can see below, this is just a wrapper around that
//	other function).
//
// Results:
//	Returns one of TCL_PATH_ABSOLUTE, TCL_PATH_RELATIVE, or
//	TCL_PATH_VOLUME_RELATIVE.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetPathType(tls *libc.TLS, path uintptr) Tcl_PathType { /* tclFileName.c:341:1: */
	var type1 Tcl_PathType
	var tempObj uintptr = XTcl_NewStringObj(tls, path, -1)

	(*Tcl_Obj)(unsafe.Pointer(tempObj)).FrefCount++
	type1 = XTcl_FSGetPathType(tls, tempObj)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = tempObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return type1
}

//----------------------------------------------------------------------
//
// TclpGetNativePathType --
//
//	Determines whether a given path is relative to the current directory,
//	relative to the current volume, or absolute, but ONLY FOR THE NATIVE
//	FILESYSTEM. This function is called from tclIOUtil.c (but needs to be
//	here due to its dependence on static variables/functions in this
//	file). The exported function Tcl_FSGetPathType should be used by
//	extensions.
//
//	Note that '~' paths are always considered TCL_PATH_ABSOLUTE, even
//	though expanding the '~' could lead to any possible path type. This
//	function should therefore be considered a low-level, string
//	manipulation function only -- it doesn't actually do any expansion in
//	making its determination.
//
// Results:
//	Returns one of TCL_PATH_ABSOLUTE, TCL_PATH_RELATIVE, or
//	TCL_PATH_VOLUME_RELATIVE.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpGetNativePathType(tls *libc.TLS, pathPtr uintptr, driveNameLengthPtr uintptr, driveNameRef uintptr) Tcl_PathType { /* tclFileName.c:382:1: */
	bp := tls.Alloc(228)
	defer tls.Free(228)

	*(*Tcl_PathType)(unsafe.Pointer(bp + 224 /* type1 */)) = TCL_PATH_ABSOLUTE
	// var pathLen int32 at bp, 4

	var path uintptr = XTcl_GetStringFromObj(tls, pathPtr, bp)

	if int32(*(*int8)(unsafe.Pointer(path))) == '~' {
		// This case is common to all platforms. Paths that begin with ~ are
		// absolute.

		if driveNameLengthPtr != uintptr(0) {
			var end uintptr = path + uintptr(1)
			for int32(*(*int8)(unsafe.Pointer(end))) != 0 && int32(*(*int8)(unsafe.Pointer(end))) != '/' {
				end++
			}
			*(*int32)(unsafe.Pointer(driveNameLengthPtr)) = int32((int64(end) - int64(path)) / 1)
		}
	} else {
		switch XtclPlatform {
		case TCL_PLATFORM_UNIX:
			{
				var origPath uintptr = path

				// Paths that begin with / are absolute.

				if int32(*(*int8)(unsafe.Pointer(path))) == '/' {
					path++
					if driveNameLengthPtr != uintptr(0) {
						// We need this addition in case the QNX or Cygwin code was used.

						*(*int32)(unsafe.Pointer(driveNameLengthPtr)) = int32((int64(path) - int64(origPath)) / 1)
					}
				} else {
					*(*Tcl_PathType)(unsafe.Pointer(bp + 224 /* type1 */)) = TCL_PATH_RELATIVE
				}
				break

			}
			fallthrough
		case TCL_PLATFORM_WINDOWS:
			{
				// var ds Tcl_DString at bp+8, 216

				var rootEnd uintptr

				XTcl_DStringInit(tls, bp+8)
				rootEnd = sExtractWinRoot(tls, path, bp+8, 0, bp+224)
				if rootEnd != path && driveNameLengthPtr != uintptr(0) {
					*(*int32)(unsafe.Pointer(driveNameLengthPtr)) = int32((int64(rootEnd) - int64(path)) / 1)
					if driveNameRef != uintptr(0) {
						*(*uintptr)(unsafe.Pointer(driveNameRef)) = XTclDStringToObj(tls, bp+8)
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(driveNameRef)))).FrefCount++
					}
				}
				XTcl_DStringFree(tls, bp+8)
				break

			}
		}
	}
	return *(*Tcl_PathType)(unsafe.Pointer(bp + 224 /* type1 */))
}

//---------------------------------------------------------------------------
//
// TclpNativeSplitPath --
//
//	This function takes the given Tcl_Obj, which should be a valid path,
//	and returns a Tcl List object containing each segment of that path as
//	an element.
//
//	Note this function currently calls the older Split(Plat)Path
//	functions, which require more memory allocation than is desirable.
//
// Results:
//	Returns list object with refCount of zero. If the passed in lenPtr is
//	non-NULL, we use it to return the number of elements in the returned
//	list.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclpNativeSplitPath(tls *libc.TLS, pathPtr uintptr, lenPtr uintptr) uintptr { /* tclFileName.c:494:9: */
	var resultPtr uintptr = uintptr(0) // Needed only to prevent gcc warnings.

	// Perform platform specific splitting.

	switch XtclPlatform {
	case TCL_PLATFORM_UNIX:
		resultPtr = sSplitUnixPath(tls, XTcl_GetString(tls, pathPtr))
		break

	case TCL_PLATFORM_WINDOWS:
		resultPtr = sSplitWinPath(tls, XTcl_GetString(tls, pathPtr))
		break
	}

	// Compute the number of elements in the result.

	if lenPtr != uintptr(0) {
		XTcl_ListObjLength(tls, uintptr(0), resultPtr, lenPtr)
	}
	return resultPtr
}

//----------------------------------------------------------------------
//
// Tcl_SplitPath --
//
//	Split a path into a list of path components. The first element of the
//	list will have the same path type as the original path.
//
// Results:
//	Returns a standard Tcl result. The interpreter result contains a list
//	of path components. *argvPtr will be filled in with the address of an
//	array whose elements point to the elements of path, in order.
//	*argcPtr will get filled in with the number of valid elements in the
//	array. A single block of memory is dynamically allocated to hold both
//	the argv array and a copy of the path elements. The caller must
//	eventually free this memory by calling ckfree() on *argvPtr. Note:
//	*argvPtr and *argcPtr are only modified if the procedure returns
//	normally.
//
// Side effects:
//	Allocates memory.
//
//----------------------------------------------------------------------

func XTcl_SplitPath(tls *libc.TLS, path uintptr, argcPtr uintptr, argvPtr uintptr) { /* tclFileName.c:551:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var resultPtr uintptr = uintptr(0) // Needed only to prevent gcc warnings.
	var tmpPtr uintptr
	// var eltPtr uintptr at bp, 8

	var i int32
	var size int32
	// var len int32 at bp+8, 4

	var p uintptr
	var str uintptr

	// Perform the splitting, using objectified, vfs-aware code.

	tmpPtr = XTcl_NewStringObj(tls, path, -1)
	(*Tcl_Obj)(unsafe.Pointer(tmpPtr)).FrefCount++
	resultPtr = XTcl_FSSplitPath(tls, tmpPtr, argcPtr)
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = tmpPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	// Calculate space required for the result.

	size = 1
	for i = 0; i < *(*int32)(unsafe.Pointer(argcPtr)); i++ {
		XTcl_ListObjIndex(tls, uintptr(0), resultPtr, i, bp)
		XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp /* eltPtr */)), bp+8)
		size = size + (*(*int32)(unsafe.Pointer(bp + 8)) + 1)
	}

	// Allocate a buffer large enough to hold the contents of all of the list
	// plus the argv pointers and the terminating NULL pointer.

	*(*uintptr)(unsafe.Pointer(argvPtr)) = XTcl_Alloc(tls, uint32(uint64(*(*int32)(unsafe.Pointer(argcPtr))+1)*uint64(unsafe.Sizeof(uintptr(0)))+uint64(size)))

	// Position p after the last argv pointer and copy the contents of the
	// list in, piece by piece.

	p = *(*uintptr)(unsafe.Pointer(argvPtr)) + uintptr(*(*int32)(unsafe.Pointer(argcPtr))+1)*8
	for i = 0; i < *(*int32)(unsafe.Pointer(argcPtr)); i++ {
		XTcl_ListObjIndex(tls, uintptr(0), resultPtr, i, bp)
		str = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp /* eltPtr */)), bp+8)
		libc.Xmemcpy(tls, p, str, uint64(*(*int32)(unsafe.Pointer(bp + 8))+1))
		p += uintptr(*(*int32)(unsafe.Pointer(bp + 8)) + 1)
	}

	// Now set up the argv pointers.

	p = *(*uintptr)(unsafe.Pointer(argvPtr)) + uintptr(*(*int32)(unsafe.Pointer(argcPtr))+1)*8

	for i = 0; i < *(*int32)(unsafe.Pointer(argcPtr)); i++ {
		*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argvPtr)) + uintptr(i)*8)) = p
		for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))) != 0 {
		}
	}
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argvPtr)) + uintptr(i)*8)) = uintptr(0)

	// Free the result ptr given to us by Tcl_FSSplitPath

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = resultPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

//----------------------------------------------------------------------
//
// SplitUnixPath --
//
//	This routine is used by Tcl_(FS)SplitPath to handle splitting Unix
//	paths.
//
// Results:
//	Returns a newly allocated Tcl list object.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSplitUnixPath(tls *libc.TLS, path uintptr) uintptr { /* tclFileName.c:642:16: */
	var length int32
	var origPath uintptr = path
	var elementStart uintptr
	var result uintptr

	// Deal with the root directory as a special case.

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		result = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(result)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(result)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(result)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(result)).FtypePtr = uintptr(0)
	{
	}

	if int32(*(*int8)(unsafe.Pointer(path))) == '/' {
		var rootElt uintptr
		path++
		rootElt = XTcl_NewStringObj(tls, origPath, int32((int64(path)-int64(origPath))/1))
		XTcl_ListObjAppendElement(tls, uintptr(0), result, rootElt)
		for int32(*(*int8)(unsafe.Pointer(path))) == '/' {
			path++
		}
	}

	// Split on slashes. Embedded elements that start with tilde will be
	// prefixed with "./" so they are not affected by tilde substitution.

	for {
		elementStart = path
		for int32(*(*int8)(unsafe.Pointer(path))) != 0 && int32(*(*int8)(unsafe.Pointer(path))) != '/' {
			path++
		}
		length = int32((int64(path) - int64(elementStart)) / 1)
		if length > 0 {
			var nextElt uintptr
			if int32(*(*int8)(unsafe.Pointer(elementStart))) == '~' && elementStart != origPath {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						nextElt = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(nextElt)).FrefCount = 0
					if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes, ts+31379, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes + 2)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
					}
					(*Tcl_Obj)(unsafe.Pointer(nextElt)).FtypePtr = uintptr(0)
					{
					}
				}
				XTcl_AppendToObj(tls, nextElt, elementStart, length)
			} else {
				nextElt = XTcl_NewStringObj(tls, elementStart, length)
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), result, nextElt)
		}
		if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&path, 1)))) == 0 {
			break
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// SplitWinPath --
//
//	This routine is used by Tcl_(FS)SplitPath to handle splitting Windows
//	paths.
//
// Results:
//	Returns a newly allocated Tcl list object.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSplitWinPath(tls *libc.TLS, path uintptr) uintptr { /* tclFileName.c:732:16: */
	bp := tls.Alloc(220)
	defer tls.Free(220)

	var length int32
	var p uintptr
	var elementStart uintptr
	*(*Tcl_PathType)(unsafe.Pointer(bp + 216 /* type1 */)) = TCL_PATH_ABSOLUTE
	// var buf Tcl_DString at bp, 216

	var result uintptr
	XTcl_DStringInit(tls, bp)

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		result = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(result)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(result)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(result)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(result)).FtypePtr = uintptr(0)
	{
	}

	p = sExtractWinRoot(tls, path, bp, 0, bp+216)

	// Terminate the root portion, if we matched something.

	if p != path {
		XTcl_ListObjAppendElement(tls, uintptr(0), result, XTclDStringToObj(tls, bp))
	}
	XTcl_DStringFree(tls, bp)

	// Split on slashes. Embedded elements that start with tilde or a drive
	// letter will be prefixed with "./" so they are not affected by tilde
	// substitution.

	for ok1 := true; ok1; ok1 = int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))) != 0 {
		elementStart = p
		for int32(*(*int8)(unsafe.Pointer(p))) != 0 && int32(*(*int8)(unsafe.Pointer(p))) != '/' && int32(*(*int8)(unsafe.Pointer(p))) != '\\' {
			p++
		}
		length = int32((int64(p) - int64(elementStart)) / 1)
		if length > 0 {
			var nextElt uintptr
			if elementStart != path && (int32(*(*int8)(unsafe.Pointer(elementStart))) == '~' ||
				libc.Xisalpha(tls, int32(uint8(*(*int8)(unsafe.Pointer(elementStart))))) != 0 &&
					int32(*(*int8)(unsafe.Pointer(elementStart + 1))) == ':') {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					for ok3 := true; ok3; ok3 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						nextElt = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(nextElt)).FrefCount = 0
					if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes, ts+31379, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes + 2)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
					}
					(*Tcl_Obj)(unsafe.Pointer(nextElt)).FtypePtr = uintptr(0)
					{
					}
				}
				XTcl_AppendToObj(tls, nextElt, elementStart, length)
			} else {
				nextElt = XTcl_NewStringObj(tls, elementStart, length)
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), result, nextElt)
		}
	}

	return result
}

//---------------------------------------------------------------------------
//
// Tcl_FSJoinToPath --
//
//	This function takes the given object, which should usually be a valid
//	path or NULL, and joins onto it the array of paths segments given.
//
//	The objects in the array given will temporarily have their refCount
//	increased by one, and then decreased by one when this function exits
//	(which means if they had zero refCount when we were called, they will
//	be freed).
//
// Results:
//	Returns object owned by the caller (which should increment its
//	refCount) - typically an object with refCount of zero.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_FSJoinToPath(tls *libc.TLS, pathPtr uintptr, objc int32, objv uintptr) uintptr { /* tclFileName.c:807:9: */
	bp := tls.Alloc(24)
	defer tls.Free(24)
	*(*uintptr)(unsafe.Pointer(bp)) = pathPtr

	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
		return XTclJoinPath(tls, objc, objv, 0)
	}
	if objc == 0 {
		return XTclJoinPath(tls, 1, bp, 0)
	}
	if objc == 1 {
		// var pair [2]uintptr at bp+8, 16

		*(*uintptr)(unsafe.Pointer(bp + 8)) = *(*uintptr)(unsafe.Pointer(bp /* pathPtr */))
		*(*uintptr)(unsafe.Pointer(bp + 8 + 1*8)) = *(*uintptr)(unsafe.Pointer(objv))
		return XTclJoinPath(tls, 2, bp+8, 0)
	} else {
		var elemc int32 = objc + 1
		var ret uintptr
		var elemv uintptr = XTcl_Alloc(tls, uint32(uint64(elemc)*uint64(unsafe.Sizeof(uintptr(0)))))

		*(*uintptr)(unsafe.Pointer(elemv)) = *(*uintptr)(unsafe.Pointer(bp /* pathPtr */))
		libc.Xmemcpy(tls, elemv+uintptr(1)*8, objv, uint64(objc)*uint64(unsafe.Sizeof(uintptr(0))))
		ret = XTclJoinPath(tls, elemc, elemv, 0)
		XTclpFree(tls, elemv)
		return ret
	}
	return uintptr(0)
}

//---------------------------------------------------------------------------
//
// TclpNativeJoinPath --
//
//	'prefix' is absolute, 'joining' is relative to prefix.
//
// Results:
//	modifies prefix
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclpNativeJoinPath(tls *libc.TLS, prefix uintptr, joining uintptr) { /* tclFileName.c:854:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var length int32 at bp, 4

	var needsSep int32
	var dest uintptr
	var p uintptr
	var start uintptr

	start = XTcl_GetStringFromObj(tls, prefix, bp)

	// Remove the ./ from tilde prefixed elements, and drive-letter prefixed
	// elements on Windows, unless it is the first component.

	p = joining

	if *(*int32)(unsafe.Pointer(bp)) != 0 {
		if int32(*(*int8)(unsafe.Pointer(p))) == '.' && int32(*(*int8)(unsafe.Pointer(p + 1))) == '/' && (int32(*(*int8)(unsafe.Pointer(p + 2))) == '~' ||
			XtclPlatform == TCL_PLATFORM_WINDOWS && libc.Xisalpha(tls, int32(uint8(*(*int8)(unsafe.Pointer(p + 2))))) != 0 &&
				int32(*(*int8)(unsafe.Pointer(p + 3))) == ':') {
			p += uintptr(2)
		}
	}
	if int32(*(*int8)(unsafe.Pointer(p))) == 0 {
		return
	}

	switch XtclPlatform {
	case TCL_PLATFORM_UNIX:
		// Append a separator if needed.

		if *(*int32)(unsafe.Pointer(bp)) > 0 && int32(*(*int8)(unsafe.Pointer(start + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) != '/' {
			XTcl_AppendToObj(tls, prefix, ts+6377, 1)
			XTcl_GetStringFromObj(tls, prefix, bp)
		}
		needsSep = 0

		// Append the element, eliminating duplicate and trailing slashes.

		XTcl_SetObjLength(tls, prefix, *(*int32)(unsafe.Pointer(bp))+int32(libc.Xstrlen(tls, p)))

		dest = XTcl_GetString(tls, prefix) + uintptr(*(*int32)(unsafe.Pointer(bp)))
		for ; int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
			if int32(*(*int8)(unsafe.Pointer(p))) == '/' {
				for int32(*(*int8)(unsafe.Pointer(p + 1))) == '/' {
					p++
				}
				if int32(*(*int8)(unsafe.Pointer(p + 1))) != 0 && needsSep != 0 {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dest, 1))) = int8('/')
				}
			} else {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dest, 1))) = *(*int8)(unsafe.Pointer(p))
				needsSep = 1
			}
		}
		*(*int32)(unsafe.Pointer(bp /* length */)) = int32((int64(dest) - int64(XTcl_GetString(tls, prefix))) / 1)
		XTcl_SetObjLength(tls, prefix, *(*int32)(unsafe.Pointer(bp /* length */)))
		break

	case TCL_PLATFORM_WINDOWS:
		// Check to see if we need to append a separator.

		if *(*int32)(unsafe.Pointer(bp)) > 0 && int32(*(*int8)(unsafe.Pointer(start + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) != '/' && int32(*(*int8)(unsafe.Pointer(start + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) != ':' {
			XTcl_AppendToObj(tls, prefix, ts+6377, 1)
			XTcl_GetStringFromObj(tls, prefix, bp)
		}
		needsSep = 0

		// Append the element, eliminating duplicate and trailing slashes.

		XTcl_SetObjLength(tls, prefix, *(*int32)(unsafe.Pointer(bp))+int32(libc.Xstrlen(tls, p)))
		dest = XTcl_GetString(tls, prefix) + uintptr(*(*int32)(unsafe.Pointer(bp)))
		for ; int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
			if int32(*(*int8)(unsafe.Pointer(p))) == '/' || int32(*(*int8)(unsafe.Pointer(p))) == '\\' {
				for int32(*(*int8)(unsafe.Pointer(p + 1))) == '/' || int32(*(*int8)(unsafe.Pointer(p + 1))) == '\\' {
					p++
				}
				if int32(*(*int8)(unsafe.Pointer(p + 1))) != 0 && needsSep != 0 {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dest, 1))) = int8('/')
				}
			} else {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dest, 1))) = *(*int8)(unsafe.Pointer(p))
				needsSep = 1
			}
		}
		*(*int32)(unsafe.Pointer(bp /* length */)) = int32((int64(dest) - int64(XTcl_GetString(tls, prefix))) / 1)
		XTcl_SetObjLength(tls, prefix, *(*int32)(unsafe.Pointer(bp /* length */)))
		break
	}
	return
}

//----------------------------------------------------------------------
//
// Tcl_JoinPath --
//
//	Combine a list of paths in a platform specific manner. The function
//	'Tcl_FSJoinPath' should be used in preference where possible.
//
// Results:
//	Appends the joined path to the end of the specified Tcl_DString
//	returning a pointer to the resulting string. Note that the
//	Tcl_DString must already be initialized.
//
// Side effects:
//	Modifies the Tcl_DString.
//
//----------------------------------------------------------------------

func XTcl_JoinPath(tls *libc.TLS, argc int32, argv uintptr, resultPtr uintptr) uintptr { /* tclFileName.c:976:6: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var i int32
	// var len int32 at bp, 4

	var listObj uintptr
	var resultObj uintptr
	var resultStr uintptr

	// Build the list of paths.

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		listObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(listObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(listObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(listObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(listObj)).FtypePtr = uintptr(0)
	{
	}

	for i = 0; i < argc; i++ {
		XTcl_ListObjAppendElement(tls, uintptr(0), listObj,
			XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), -1))
	}

	// Ask the objectified code to join the paths.

	(*Tcl_Obj)(unsafe.Pointer(listObj)).FrefCount++
	resultObj = XTcl_FSJoinPath(tls, listObj, argc)
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount++
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = listObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	// Store the result.

	resultStr = XTcl_GetStringFromObj(tls, resultObj, bp)
	XTcl_DStringAppend(tls, resultPtr, resultStr, *(*int32)(unsafe.Pointer(bp /* len */)))
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = resultObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	// Return a pointer to the result.

	return (*Tcl_DString)(unsafe.Pointer(resultPtr)).Fstring
}

//---------------------------------------------------------------------------
//
// Tcl_TranslateFileName --
//
//	Converts a file name into a form usable by the native system
//	interfaces. If the name starts with a tilde, it will produce a name
//	where the tilde and following characters have been replaced by the
//	home directory location for the named user.
//
// Results:
//	The return value is a pointer to a string containing the name after
//	tilde substitution. If there was no tilde substitution, the return
//	value is a pointer to a copy of the original string. If there was an
//	error in processing the name, then an error message is left in the
//	interp's result (if interp was not NULL) and the return value is NULL.
//	Space for the return value is allocated in bufferPtr; the caller must
//	call Tcl_DStringFree() to free the space if the return value was not
//	NULL.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_TranslateFileName(tls *libc.TLS, interp uintptr, name uintptr, bufferPtr uintptr) uintptr { /* tclFileName.c:1047:6: */
	var path uintptr = XTcl_NewStringObj(tls, name, -1)
	var transPtr uintptr

	(*Tcl_Obj)(unsafe.Pointer(path)).FrefCount++
	transPtr = XTcl_FSGetTranslatedPath(tls, interp, path)
	if transPtr == uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = path
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return uintptr(0)
	}

	XTcl_DStringInit(tls, bufferPtr)
	XTclDStringAppendObj(tls, bufferPtr, transPtr)
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = path
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = transPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	// Convert forward slashes to backslashes in Windows paths because some
	// system interfaces don't accept forward slashes.

	if XtclPlatform == TCL_PLATFORM_WINDOWS {
		var p uintptr
		for p = (*Tcl_DString)(unsafe.Pointer(bufferPtr)).Fstring; int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
			if int32(*(*int8)(unsafe.Pointer(p))) == '/' {
				*(*int8)(unsafe.Pointer(p)) = int8('\\')
			}
		}
	}

	return (*Tcl_DString)(unsafe.Pointer(bufferPtr)).Fstring
}

//----------------------------------------------------------------------
//
// TclGetExtension --
//
//	This function returns a pointer to the beginning of the extension part
//	of a file name.
//
// Results:
//	Returns a pointer into name which indicates where the extension
//	starts. If there is no extension, returns NULL.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetExtension(tls *libc.TLS, name uintptr) uintptr { /* tclFileName.c:1108:12: */
	var p uintptr
	var lastSep uintptr

	// First find the last directory separator.

	lastSep = uintptr(0) // Needed only to prevent gcc warnings.
	switch XtclPlatform {
	case TCL_PLATFORM_UNIX:
		lastSep = libc.Xstrrchr(tls, name, '/')
		break

	case TCL_PLATFORM_WINDOWS:
		lastSep = uintptr(0)
		for p = name; int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
			if libc.Xstrchr(tls, ts+31382, int32(*(*int8)(unsafe.Pointer(p)))) != uintptr(0) {
				lastSep = p
			}
		}
		break
	}
	p = libc.Xstrrchr(tls, name, '.')
	if p != uintptr(0) && lastSep != uintptr(0) && lastSep > p {
		p = uintptr(0)
	}

	// In earlier versions, we used to back up to the first period in a series
	// so that "foo..o" would be split into "foo" and "..o". This is a
	// confusing and usually incorrect behavior, so now we split at the last
	// period in the name.

	return p
}

//----------------------------------------------------------------------
//
// DoTildeSubst --
//
//	Given a string following a tilde, this routine returns the
//	corresponding home directory.
//
// Results:
//	The result is a pointer to a static string containing the home
//	directory in native format. If there was an error in processing the
//	substitution, then an error message is left in the interp's result and
//	the return value is NULL. On success, the results are appended to
//	resultPtr, and the contents of resultPtr are returned.
//
// Side effects:
//	Information may be left in resultPtr.
//
//----------------------------------------------------------------------

func sDoTildeSubst(tls *libc.TLS, interp uintptr, user uintptr, resultPtr uintptr) uintptr { /* tclFileName.c:1169:19: */
	bp := tls.Alloc(304)
	defer tls.Free(304)

	// var dir uintptr at bp+296, 8

	if int32(*(*int8)(unsafe.Pointer(user))) == 0 {
		// var dirString Tcl_DString at bp+80, 216

		*(*uintptr)(unsafe.Pointer(bp + 296 /* dir */)) = XTclGetEnv(tls, ts+27852, bp+80)
		if *(*uintptr)(unsafe.Pointer(bp + 296)) == uintptr(0) {
			if interp != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

					ts+31386, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+31441, ts+31450, uintptr(0)))
			}
			return uintptr(0)
		}
		XTcl_JoinPath(tls, 1, bp+296, resultPtr)
		XTcl_DStringFree(tls, bp+80)
	} else if XTclpGetUserHome(tls, user, resultPtr) == uintptr(0) {
		if interp != 0 {
			XTcl_ResetResult(tls, interp)
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+31458, libc.VaList(bp+32, user)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7699, ts+31482, user, uintptr(0)))
		}
		return uintptr(0)
	}
	return (*Tcl_DString)(unsafe.Pointer(resultPtr)).Fstring
}

//----------------------------------------------------------------------
//
// Tcl_GlobObjCmd --
//
//	This procedure is invoked to process the "glob" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_GlobObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclFileName.c:1225:1: */
	bp := tls.Alloc(1040)
	defer tls.Free(1040)

	// var index int32 at bp+352, 4

	var i int32
	var globFlags int32
	// var length int32 at bp+356, 4

	var join int32
	var dir int32
	var result int32
	var string uintptr
	var separators uintptr
	var typePtr uintptr
	// var look uintptr at bp+800, 8

	var pathOrDir uintptr
	// var prefix Tcl_DString at bp+584, 216

	var globTypes uintptr
	// var pref Tcl_DString at bp+368, 216

	var search uintptr
	var find uintptr
	// var pathlength int32 at bp+360, 4

	var last uintptr
	var first uintptr
	// var item uintptr at bp+816, 8

	// var len int32 at bp+808, 4

	var str uintptr
	// var str1 Tcl_DString at bp+824, 216

	var sep uintptr
	var errorMsg uintptr
	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	pathOrDir = uintptr(0)
	globTypes = uintptr(0)
	_ = dummy

	globFlags = 0
	join = 0
	dir = -1 /* PATH_NONE */
	typePtr = uintptr(0)
	i = 1
__1:
	if !(i < objc) {
		goto __3
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options8)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+352) != TCL_OK) {
		goto __4
	}
	string = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+356)
	if !(int32(*(*int8)(unsafe.Pointer(string))) == '-') {
		goto __5
	}
	// It looks like the command contains an option so signal an
	// error.

	return TCL_ERROR
	goto __6
__5:
	// This clearly isn't an option; assume it's the first glob
	// pattern. We must clear the error.

	XTcl_ResetResult(tls, interp)
	goto __3
__6:
	;
__4:
	;

	switch uint32(*(*int32)(unsafe.Pointer(bp + 352 /* index */))) {
	case uint32(2) /* GLOB_NOCOMPLAIN */ :
		goto __8
	case uint32(0) /* GLOB_DIR */ :
		goto __9
	case uint32(1) /* GLOB_JOIN */ :
		goto __10
	case uint32(4) /* GLOB_TAILS */ :
		goto __11
	case uint32(3) /* GLOB_PATH */ :
		goto __12
	case uint32(5) /* GLOB_TYPE */ :
		goto __13
	case uint32(6) /* GLOB_LAST */ :
		goto __14
	}
	goto __7
__8: // -nocomplain
	globFlags = globFlags | TCL_GLOBMODE_NO_COMPLAIN
	goto __7
__9: // -dir
	if !(i == objc-1) {
		goto __15
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+31487, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+14232, ts+15191, uintptr(0)))
	return TCL_ERROR
__15:
	;
	if !(dir != -1) {
		goto __16
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		func() uintptr {
			if dir == 1 {
				return ts + 31520 /* "\"-directory\" may..." */
			}
			return ts + 31555 /* "\"-directory\" can..." */
		}(),
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+7949, ts+31596,
		ts+31601, uintptr(0)))
	return TCL_ERROR
__16:
	;
	dir = 1 /* PATH_DIR */
	globFlags = globFlags | TCL_GLOBMODE_DIR
	pathOrDir = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	i++
	goto __7
__10: // -join
	join = 1
	goto __7
__11: // -tails
	globFlags = globFlags | TCL_GLOBMODE_TAILS
	goto __7
__12: // -path
	if !(i == objc-1) {
		goto __17
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+31622, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+14232, ts+15191, uintptr(0)))
	return TCL_ERROR
__17:
	;
	if !(dir != -1) {
		goto __18
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		func() uintptr {
			if dir == 0 {
				return ts + 31650 /* "\"-path\" may only..." */
			}
			return ts + 31680 /* "\"-path\" cannot b..." */
		}(),
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+4178, ts+7949, ts+31596,
		ts+31601, uintptr(0)))
	return TCL_ERROR
__18:
	;
	dir = 0 /* PATH_GENERAL */
	pathOrDir = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	i++
	goto __7
__13: // -types
	if !(i == objc-1) {
		goto __19
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+31722, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+144, ts+4178, ts+14232, ts+15191, uintptr(0)))
	return TCL_ERROR
__19:
	;
	typePtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	if !(XTcl_ListObjLength(tls, interp, typePtr, bp+356) != TCL_OK) {
		goto __20
	}
	return TCL_ERROR
__20:
	;
	i++
	goto __7
__14: // --
	i++
	goto endOfForLoop
__7:
	;
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;

endOfForLoop:
	if !(globFlags&TCL_GLOBMODE_TAILS != 0 && pathOrDir == uintptr(0)) {
		goto __21
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+31751, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+176, ts+4178, ts+7949, ts+31596,
		ts+31601, uintptr(0)))
	return TCL_ERROR
__21:
	;

	separators = uintptr(0)
	switch XtclPlatform {
	case TCL_PLATFORM_UNIX:
		goto __23
	case TCL_PLATFORM_WINDOWS:
		goto __24
	}
	goto __22
__23:
	separators = ts + 6377 /* "/" */
	goto __22
__24:
	separators = ts + 31382 /* "/\\:" */
	goto __22
__22:
	;

	if !(dir == 0) {
		goto __25
	}
	first = XTcl_GetStringFromObj(tls, pathOrDir, bp+360)

	// Find the last path separator in the path

	last = first + uintptr(*(*int32)(unsafe.Pointer(bp + 360)))
__26:
	if !(last != first) {
		goto __28
	}
	if !(libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(last - uintptr(1))))) != uintptr(0)) {
		goto __29
	}
	goto __28
__29:
	;
	goto __27
__27:
	last--
	goto __26
	goto __28
__28:
	;

	if !(last == first+uintptr(*(*int32)(unsafe.Pointer(bp + 360)))) {
		goto __30
	}
	// It's really a directory.

	dir = 1 /* PATH_DIR */

	goto __31
__30:
	XTcl_DStringInit(tls, bp+368)
	if !(last == first) {
		goto __32
	}
	// The whole thing is a prefix. This means we must remove any
	// 'tails' flag too, since it is irrelevant now (the same
	// effect will happen without it), but in particular its use
	// in TclGlob requires a non-NULL pathOrDir.

	XTcl_DStringAppend(tls, bp+368, first, -1)
	globFlags = globFlags & libc.CplInt32(TCL_GLOBMODE_TAILS)
	pathOrDir = uintptr(0)
	goto __33
__32:
	// Have to split off the end.

	XTcl_DStringAppend(tls, bp+368, last, int32((int64(first+uintptr(*(*int32)(unsafe.Pointer(bp + 360))))-int64(last))/1))
	pathOrDir = XTcl_NewStringObj(tls, first, int32((int64(last)-int64(first))/1-int64(1)))

	// We must ensure that we haven't cut off too much, and turned
	// a valid path like '/' or 'C:/' into an incorrect path like
	// '' or 'C:'. The way we do this is to add a separator if
	// there are none presently in the prefix.

	if !(libc.Xstrpbrk(tls, XTcl_GetString(tls, pathOrDir), ts+31809) == uintptr(0)) {
		goto __34
	}
	XTcl_AppendToObj(tls, pathOrDir, last-uintptr(1), 1)
__34:
	;
__33:
	;

	// Need to quote 'prefix'.

	XTcl_DStringInit(tls, bp+584)
	search = (*Tcl_DString)(unsafe.Pointer(bp + 368)).Fstring
__35:
	if !(libc.AssignUintptr(&find, libc.Xstrpbrk(tls, search, ts+31812)) != uintptr(0)) {
		goto __36
	}
	XTcl_DStringAppend(tls, bp+584, search, int32((int64(find)-int64(search))/1))
	XTcl_DStringAppend(tls, bp+584, ts+13358, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
	XTcl_DStringAppend(tls, bp+584, find, 1)
	search = find + uintptr(1)
	if !(int32(*(*int8)(unsafe.Pointer(search))) == 0) {
		goto __37
	}
	goto __36
__37:
	;
	goto __35
__36:
	;
	if !(int32(*(*int8)(unsafe.Pointer(search))) != 0) {
		goto __38
	}
	XTcl_DStringAppend(tls, bp+584, search, -1)
__38:
	;
	XTcl_DStringFree(tls, bp+368)
__31:
	;
__25:
	;

	if !(pathOrDir != uintptr(0)) {
		goto __39
	}
	(*Tcl_Obj)(unsafe.Pointer(pathOrDir)).FrefCount++
__39:
	;

	if !(typePtr != uintptr(0)) {
		goto __40
	}
	// The rest of the possible type arguments (except 'd') are platform
	// specific. We don't complain when they are used on an incompatible
	// platform.

	XTcl_ListObjLength(tls, interp, typePtr, bp+356)
	if !(*(*int32)(unsafe.Pointer(bp + 356)) <= 0) {
		goto __41
	}
	goto skipTypes
__41:
	;
	globTypes = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_GlobTypeData{})))
	(*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).Ftype = 0
	(*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).Fperm = 0
	(*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacType = uintptr(0)
	(*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacCreator = uintptr(0)

__42:
	if !(libc.PreDecInt32(&*(*int32)(unsafe.Pointer(bp + 356)), 1) >= 0) {
		goto __43
	}

	XTcl_ListObjIndex(tls, interp, typePtr, *(*int32)(unsafe.Pointer(bp + 356 /* length */)), bp+800)
	str = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 800 /* look */)), bp+808)
	if !(libc.Xstrcmp(tls, ts+31820, str) == 0) {
		goto __44
	}
	*(*int32)(unsafe.Pointer(globTypes + 4)) |= int32(1) << 0
	goto __45
__44:
	if !(libc.Xstrcmp(tls, ts+31829, str) == 0) {
		goto __46
	}
	*(*int32)(unsafe.Pointer(globTypes + 4)) |= int32(1) << 1
	goto __47
__46:
	if !(*(*int32)(unsafe.Pointer(bp + 808)) == 1) {
		goto __48
	}
	switch int32(*(*int8)(unsafe.Pointer(str))) {
	case 'r':
		goto __51
	case 'w':
		goto __52
	case 'x':
		goto __53
	case 'b':
		goto __54
	case 'c':
		goto __55
	case 'd':
		goto __56
	case 'p':
		goto __57
	case 'f':
		goto __58
	case 'l':
		goto __59
	case 's':
		goto __60
	default:
		goto __61
	}
	goto __50
__51:
	*(*int32)(unsafe.Pointer(globTypes + 4)) |= int32(1) << 2
	goto __50
__52:
	*(*int32)(unsafe.Pointer(globTypes + 4)) |= int32(1) << 3
	goto __50
__53:
	*(*int32)(unsafe.Pointer(globTypes + 4)) |= int32(1) << 4
	goto __50
__54:
	*(*int32)(unsafe.Pointer(globTypes)) |= int32(1) << 0
	goto __50
__55:
	*(*int32)(unsafe.Pointer(globTypes)) |= int32(1) << 1
	goto __50
__56:
	*(*int32)(unsafe.Pointer(globTypes)) |= int32(1) << 2
	goto __50
__57:
	*(*int32)(unsafe.Pointer(globTypes)) |= int32(1) << 3
	goto __50
__58:
	*(*int32)(unsafe.Pointer(globTypes)) |= int32(1) << 4
	goto __50
__59:
	*(*int32)(unsafe.Pointer(globTypes)) |= int32(1) << 5
	goto __50
__60:
	*(*int32)(unsafe.Pointer(globTypes)) |= int32(1) << 6
	goto __50
__61:
	goto badTypesArg
__50:
	;

	goto __49
__48:
	if !(*(*int32)(unsafe.Pointer(bp + 808)) == 4) {
		goto __62
	}
	// This is assumed to be a MacOS file type.

	if !((*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacType != uintptr(0)) {
		goto __64
	}
	goto badMacTypesArg
__64:
	;
	(*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacType = *(*uintptr)(unsafe.Pointer(bp + 800 /* look */))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 800)))).FrefCount++

	goto __63
__62:

	if !(XTcl_ListObjLength(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 800)), bp+808) == TCL_OK &&
		*(*int32)(unsafe.Pointer(bp + 808)) == 3) {
		goto __65
	}
	XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 800 /* look */)), 0, bp+816)
	if !!(libc.Xstrcmp(tls, ts+31836, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 816)))) != 0) {
		goto __66
	}
	XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 800 /* look */)), 1, bp+816)
	if !!(libc.Xstrcmp(tls, ts+12847, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 816)))) != 0) {
		goto __67
	}
	XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 800 /* look */)), 2, bp+816)
	if !((*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacType != uintptr(0)) {
		goto __69
	}
	goto badMacTypesArg
__69:
	;
	(*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacType = *(*uintptr)(unsafe.Pointer(bp + 816 /* item */))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 816)))).FrefCount++
	goto __42
	goto __68
__67:
	if !!(libc.Xstrcmp(tls, ts+31846, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 816)))) != 0) {
		goto __70
	}
	XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 800 /* look */)), 2, bp+816)
	if !((*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacCreator != uintptr(0)) {
		goto __71
	}
	goto badMacTypesArg
__71:
	;
	(*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacCreator = *(*uintptr)(unsafe.Pointer(bp + 816 /* item */))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 816)))).FrefCount++
	goto __42
__70:
	;
__68:
	;
__66:
	;
__65:
	;

	// Error cases. We reset the 'join' flag to zero, since we
	// haven't yet made use of it.

badTypesArg:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+31854,
		libc.VaList(bp+216, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 800 /* look */))))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+224, ts+4178, ts+14232, ts+31883, uintptr(0)))
	result = TCL_ERROR
	join = 0
	goto endOfGlob

badMacTypesArg:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+31887, -1))
	result = TCL_ERROR
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+256, ts+4178, ts+14232, ts+31883, uintptr(0)))
	join = 0
	goto endOfGlob
__63:
	;
__49:
	;
__47:
	;
__45:
	;
	goto __42
__43:
	;
__40:
	;

skipTypes:
	// Now we perform the actual glob below. This may involve joining together
	// the pattern arguments, dealing with particular file types etc. We use a
	// 'goto' to ensure we free any memory allocated along the way.

	objc = objc - i
	objv += 8 * uintptr(i)
	result = TCL_OK

	if !(join != 0) {
		goto __72
	}
	if !(dir != 0) {
		goto __74
	}
	XTcl_DStringInit(tls, bp+584)
__74:
	;
	i = 0
__75:
	if !(i < objc) {
		goto __77
	}
	XTclDStringAppendObj(tls, bp+584, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	if !(i != objc-1) {
		goto __78
	}
	XTcl_DStringAppend(tls, bp+584, separators, 1)
__78:
	;
	goto __76
__76:
	i++
	goto __75
	goto __77
__77:
	;
	if !(XTclGlob(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+584)).Fstring, pathOrDir, globFlags,
		globTypes) != TCL_OK) {
		goto __79
	}
	result = TCL_ERROR
	goto endOfGlob
__79:
	;
	goto __73
__72:
	if !(dir == 0) {
		goto __80
	}

	XTcl_DStringInit(tls, bp+824)
	i = 0
__82:
	if !(i < objc) {
		goto __84
	}
	XTcl_DStringSetLength(tls, bp+824, 0)
	if !(dir == 0) {
		goto __85
	}
	XTclDStringAppendDString(tls, bp+824, bp+584)
__85:
	;
	XTclDStringAppendObj(tls, bp+824, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	if !(XTclGlob(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+824)).Fstring, pathOrDir, globFlags,
		globTypes) != TCL_OK) {
		goto __86
	}
	result = TCL_ERROR
	XTcl_DStringFree(tls, bp+824)
	goto endOfGlob
__86:
	;
	goto __83
__83:
	i++
	goto __82
	goto __84
__84:
	;
	XTcl_DStringFree(tls, bp+824)
	goto __81
__80:
	i = 0
__87:
	if !(i < objc) {
		goto __89
	}
	string = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	if !(XTclGlob(tls, interp, string, pathOrDir, globFlags,
		globTypes) != TCL_OK) {
		goto __90
	}
	result = TCL_ERROR
	goto endOfGlob
__90:
	;
	goto __88
__88:
	i++
	goto __87
	goto __89
__89:
	;
__81:
	;
__73:
	;

	if !(globFlags&TCL_GLOBMODE_NO_COMPLAIN == 0) {
		goto __91
	}
	if !(XTcl_ListObjLength(tls, interp, XTcl_GetObjResult(tls, interp),
		bp+356) != TCL_OK) {
		goto __92
	}
	// This should never happen. Maybe we should be more dramatic.

	result = TCL_ERROR
	goto endOfGlob
__92:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 356)) == 0) {
		goto __93
	}
	errorMsg =
		XTcl_ObjPrintf(tls, ts+31947,
			libc.VaList(bp+288, func() uintptr {
				if join != 0 || objc == 1 {
					return ts + 2631 /* "" */
				}
				return ts + 23388 /* "s" */
			}()))

	if !(join != 0) {
		goto __94
	}
	XTcl_AppendToObj(tls, errorMsg, (*Tcl_DString)(unsafe.Pointer(bp+584)).Fstring, -1)
	goto __95
__94:
	sep = ts + 2631 /* "" */

	i = 0
__96:
	if !(i < objc) {
		goto __98
	}
	XTcl_AppendPrintfToObj(tls, errorMsg, ts+31981,
		libc.VaList(bp+296, sep, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))))
	sep = ts + 14901 /* " " */
	goto __97
__97:
	i++
	goto __96
	goto __98
__98:
	;
__95:
	;
	XTcl_AppendToObj(tls, errorMsg, ts+25631, -1)
	XTcl_SetObjResult(tls, interp, errorMsg)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+312, ts+4178, ts+7949, ts+31596, ts+31986,
		uintptr(0)))
	result = TCL_ERROR
__93:
	;
__91:
	;

endOfGlob:
	if !(join != 0 || dir == 0) {
		goto __99
	}
	XTcl_DStringFree(tls, bp+584)
__99:
	;
	if !(pathOrDir != uintptr(0)) {
		goto __100
	}
__101:
	_objPtr = pathOrDir
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __104
	}
	XTclFreeObj(tls, _objPtr)
__104:
	;
	goto __102
__102:
	if 0 != 0 {
		goto __101
	}
	goto __103
__103:
	;
__100:
	;
	if !(globTypes != uintptr(0)) {
		goto __105
	}
	if !((*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacType != uintptr(0)) {
		goto __106
	}
__107:
	_objPtr1 = (*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacType
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __110
	}
	XTclFreeObj(tls, _objPtr1)
__110:
	;
	goto __108
__108:
	if 0 != 0 {
		goto __107
	}
	goto __109
__109:
	;
__106:
	;
	if !((*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacCreator != uintptr(0)) {
		goto __111
	}
__112:
	_objPtr2 = (*Tcl_GlobTypeData)(unsafe.Pointer(globTypes)).FmacCreator
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __115
	}
	XTclFreeObj(tls, _objPtr2)
__115:
	;
	goto __113
__113:
	if 0 != 0 {
		goto __112
	}
	goto __114
__114:
	;
__111:
	;
	XTclStackFree(tls, interp, globTypes)
__105:
	;
	return result
}

var options8 = [8]uintptr{
	ts + 31994, ts + 32005, ts + 19906, ts + 32011, ts + 32017,
	ts + 32024, ts + 16430, uintptr(0),
} /* tclFileName.c:1237:23 */

//----------------------------------------------------------------------
//
// TclGlob --
//
//	Sets the separator string based on the platform, performs tilde
//	substitution, and calls DoGlob.
//
//	The interpreter's result, on entry to this function, must be a valid
//	Tcl list (e.g. it could be empty), since we will lappend any new
//	results to that list. If it is not a valid list, this function will
//	fail to do anything very meaningful.
//
//	Note that if globFlags contains 'TCL_GLOBMODE_TAILS' then pathPrefix
//	cannot be NULL (it is only allowed with -dir or -path).
//
// Results:
//	The return value is a standard Tcl result indicating whether an error
//	occurred in globbing. After a normal return the result in interp (set
//	by DoGlob) holds all of the file names given by the pattern and
//	pathPrefix arguments. After an error the result in interp will hold
//	an error message.
//
// Side effects:
//	The 'pattern' is written to.
//
//----------------------------------------------------------------------

func XTclGlob(tls *libc.TLS, interp uintptr, pattern uintptr, pathPrefix uintptr, globFlags int32, types1 uintptr) int32 { /* tclFileName.c:1718:1: */
	bp := tls.Alloc(280)
	defer tls.Free(280)

	var separators uintptr
	var head uintptr
	var tail uintptr
	var start uintptr
	var result int32
	var filenamesObj uintptr
	var savedResultObj uintptr

	separators = uintptr(0)
	switch XtclPlatform {
	case TCL_PLATFORM_UNIX:
		separators = ts + 6377 /* "/" */
		break
	case TCL_PLATFORM_WINDOWS:
		separators = ts + 31382 /* "/\\:" */
		break
	}

	if pathPrefix == uintptr(0) {
		var c int8
		// var buffer Tcl_DString at bp, 216

		XTcl_DStringInit(tls, bp)

		start = pattern

		// Perform tilde substitution, if needed.

		if int32(*(*int8)(unsafe.Pointer(start))) == '~' {
			// Find the first path separator after the tilde.

			for tail = start; int32(*(*int8)(unsafe.Pointer(tail))) != 0; tail++ {
				if int32(*(*int8)(unsafe.Pointer(tail))) == '\\' {
					if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(tail + 1)))) != uintptr(0) {
						break
					}
				} else if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(tail)))) != uintptr(0) {
					break
				}
			}

			// Determine the home directory for the specified user.

			c = *(*int8)(unsafe.Pointer(tail))
			*(*int8)(unsafe.Pointer(tail)) = int8(0)
			head = sDoTildeSubst(tls, interp, start+uintptr(1), bp)
			*(*int8)(unsafe.Pointer(tail)) = c
			if head == uintptr(0) {
				return TCL_ERROR
			}
			if head != (*Tcl_DString)(unsafe.Pointer(bp)).Fstring {
				XTcl_DStringAppend(tls, bp, head, -1)
			}
			pathPrefix = XTclDStringToObj(tls, bp)
			(*Tcl_Obj)(unsafe.Pointer(pathPrefix)).FrefCount++
			globFlags = globFlags | TCL_GLOBMODE_DIR
			if int32(c) != 0 {
				tail++
			}
			XTcl_DStringFree(tls, bp)
		} else {
			tail = pattern
		}
	} else {
		(*Tcl_Obj)(unsafe.Pointer(pathPrefix)).FrefCount++
		tail = pattern
	}

	// Handling empty path prefixes with glob patterns like 'C:' or
	// 'c:////////' is a pain on Windows if we leave it too late, since these
	// aren't really patterns at all! We therefore check the head of the
	// pattern now for such cases, if we don't have an unquoted prefix yet.
	//
	// Similarly on Unix with '/' at the head of the pattern -- it just
	// indicates the root volume, so we treat it as such.

	if XtclPlatform == TCL_PLATFORM_WINDOWS {
		if pathPrefix == uintptr(0) && int32(*(*int8)(unsafe.Pointer(tail))) != 0 && int32(*(*int8)(unsafe.Pointer(tail + 1))) == ':' {
			var p uintptr = tail + uintptr(1)
			pathPrefix = XTcl_NewStringObj(tls, tail, 1)
			for int32(*(*int8)(unsafe.Pointer(p))) != 0 {
				*(*int8)(unsafe.Pointer(bp + 216 /* c */)) = *(*int8)(unsafe.Pointer(p + 1))
				if int32(*(*int8)(unsafe.Pointer(p))) == '\\' {
					if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(bp + 216)))) != uintptr(0) {
						if int32(*(*int8)(unsafe.Pointer(bp + 216))) == '\\' {
							*(*int8)(unsafe.Pointer(bp + 216 /* c */)) = int8('/')
						}
						XTcl_AppendToObj(tls, pathPrefix, bp+216, 1)
						p++
					} else {
						break
					}
				} else if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(p)))) != uintptr(0) {
					XTcl_AppendToObj(tls, pathPrefix, p, 1)
				} else {
					break
				}
				p++
			}
			tail = p
			(*Tcl_Obj)(unsafe.Pointer(pathPrefix)).FrefCount++
		} else if pathPrefix == uintptr(0) && (int32(*(*int8)(unsafe.Pointer(tail))) == '/' ||
			int32(*(*int8)(unsafe.Pointer(tail))) == '\\' && int32(*(*int8)(unsafe.Pointer(tail + 1))) == '\\') {
			// var driveNameLen int32 at bp+220, 4

			// var driveName uintptr at bp+224, 8

			var temp uintptr = XTcl_NewStringObj(tls, tail, -1)
			(*Tcl_Obj)(unsafe.Pointer(temp)).FrefCount++

			switch XTclGetPathType(tls, temp, uintptr(0), bp+220, bp+224) {
			case TCL_PATH_VOLUME_RELATIVE:
				{
					// Volume relative path which is equivalent to a path in the
					// root of the cwd's volume. We will actually return
					// non-volume-relative paths here. i.e. 'glob /foo*' will
					// return 'C:/foobar'. This is much the same as globbing for a
					// path with '\\' will return one with '/' on Windows.

					var cwd uintptr = XTcl_FSGetCwd(tls, interp)

					if cwd == uintptr(0) {
						for ok := true; ok; ok = 0 != 0 {
							var _objPtr uintptr = temp
							if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
								XTclFreeObj(tls, _objPtr)
							}
						}
						return TCL_ERROR
					}
					pathPrefix = XTcl_NewStringObj(tls, XTcl_GetString(tls, cwd), 3)
					for ok1 := true; ok1; ok1 = 0 != 0 {
						var _objPtr uintptr = cwd
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
					if int32(*(*int8)(unsafe.Pointer(tail))) == '/' {
						tail++
					} else {
						tail += uintptr(2)
					}
					(*Tcl_Obj)(unsafe.Pointer(pathPrefix)).FrefCount++
					break

				}
				fallthrough
			case TCL_PATH_ABSOLUTE:
				// Absolute, possibly network path //Machine/Share. Use that
				// as the path prefix (it already has a refCount).

				pathPrefix = *(*uintptr)(unsafe.Pointer(bp + 224 /* driveName */))
				tail += uintptr(*(*int32)(unsafe.Pointer(bp + 220 /* driveNameLen */)))
				break
				fallthrough
			case TCL_PATH_RELATIVE:
				// Do nothing
				break
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr = temp
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}

		// ':' no longer needed as a separator. It is only relevant to the
		// beginning of the path.

		separators = ts + 32031 /* "/\\" */

	} else if XtclPlatform == TCL_PLATFORM_UNIX {
		if pathPrefix == uintptr(0) && int32(*(*int8)(unsafe.Pointer(tail))) == '/' {
			pathPrefix = XTcl_NewStringObj(tls, tail, 1)
			tail++
			(*Tcl_Obj)(unsafe.Pointer(pathPrefix)).FrefCount++
		}
	}

	// Finally if we still haven't managed to generate a path prefix, check if
	// the path starts with a current volume.

	if pathPrefix == uintptr(0) {
		// var driveNameLen int32 at bp+232, 4

		// var driveName uintptr at bp+240, 8

		if XTclFSNonnativePathType(tls, tail, int32(libc.Xstrlen(tls, tail)), uintptr(0),
			bp+232, bp+240) == TCL_PATH_ABSOLUTE {
			pathPrefix = *(*uintptr)(unsafe.Pointer(bp + 240 /* driveName */))
			tail += uintptr(*(*int32)(unsafe.Pointer(bp + 232 /* driveNameLen */)))
		}
	}

	// To process a [glob] invocation, this function may be called multiple
	// times. Each time, the previously discovered filenames are in the
	// interpreter result. We stash that away here so the result is free for
	// error messsages.

	savedResultObj = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FrefCount++
	XTcl_ResetResult(tls, interp)
	for ok3 := true; ok3; ok3 = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		filenamesObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(filenamesObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(filenamesObj)).FtypePtr = uintptr(0)
	{
	}

	(*Tcl_Obj)(unsafe.Pointer(filenamesObj)).FrefCount++

	// Now we do the actual globbing, adding filenames as we go to buffer in
	// filenamesObj

	if int32(*(*int8)(unsafe.Pointer(tail))) == 0 && pathPrefix != uintptr(0) {
		// An empty pattern. This means 'pathPrefix' is actually a full path
		// of a file/directory we want to simply check for existence and type.

		if types1 == uintptr(0) {
			// We just want to check for existence. In this case we make it
			// easy on Tcl_FSMatchInDirectory and its sub-implementations by
			// not bothering them (even though they should support this
			// situation) and we just use the simple existence check with
			// Tcl_FSAccess.

			if XTcl_FSAccess(tls, pathPrefix, F_OK) == 0 {
				XTcl_ListObjAppendElement(tls, interp, filenamesObj, pathPrefix)
			}
			result = TCL_OK
		} else {
			// We want to check for the correct type. Tcl_FSMatchInDirectory
			// is documented to do this for us, if we give it a NULL pattern.

			result = XTcl_FSMatchInDirectory(tls, interp, filenamesObj, pathPrefix,
				uintptr(0), types1)
		}
	} else {
		result = sDoGlob(tls, interp, filenamesObj, separators, pathPrefix,
			globFlags&TCL_GLOBMODE_DIR, tail, types1)
	}

	// Check for errors...

	if result != TCL_OK {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(filenamesObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(filenamesObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(filenamesObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Flength = -1
				for ok4 := true; ok4; ok4 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(filenamesObj + 32)) = XtclFreeObjList
					XtclFreeObjList = filenamesObj
				}
			} else {
				XTclFreeObj(tls, filenamesObj)
			}
		}

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Flength = -1
				for ok5 := true; ok5; ok5 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(savedResultObj + 32)) = XtclFreeObjList
					XtclFreeObjList = savedResultObj
				}
			} else {
				XTclFreeObj(tls, savedResultObj)
			}
		}

		if pathPrefix != uintptr(0) {
			for ok6 := true; ok6; ok6 = 0 != 0 {
				var _objPtr uintptr = pathPrefix
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		return result
	}

	// If we only want the tails, we must strip off the prefix now. It may
	// seem more efficient to pass the tails flag down into DoGlob,
	// Tcl_FSMatchInDirectory, but those functions are continually adjusting
	// the prefix as the various pieces of the pattern are assimilated, so
	// that would add a lot of complexity to the code. This way is a little
	// slower (when the -tails flag is given), but much simpler to code.
	//
	// We do it by rewriting the result list in-place.

	if globFlags&TCL_GLOBMODE_TAILS != 0 {
		// var objc int32 at bp+252, 4

		var i int32
		// var objv uintptr at bp+256, 8

		// var prefixLen int32 at bp+248, 4

		var pre uintptr

		// If this length has never been set, set it here.

		if pathPrefix == uintptr(0) {
			XTcl_Panic(tls, ts+32034, 0)
		}

		pre = XTcl_GetStringFromObj(tls, pathPrefix, bp+248)
		if *(*int32)(unsafe.Pointer(bp + 248)) > 0 &&
			libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(pre + uintptr(*(*int32)(unsafe.Pointer(bp + 248))-1))))) == uintptr(0) {
			// If we're on Windows and the prefix is a volume relative one
			// like 'C:', then there won't be a path separator in between, so
			// no need to skip it here.

			if XtclPlatform != TCL_PLATFORM_WINDOWS || *(*int32)(unsafe.Pointer(bp + 248)) != 2 ||
				int32(*(*int8)(unsafe.Pointer(pre + 1))) != ':' {
				*(*int32)(unsafe.Pointer(bp + 248 /* prefixLen */))++
			}
		}

		XTcl_ListObjGetElements(tls, uintptr(0), filenamesObj, bp+252, bp+256)
		for i = 0; i < *(*int32)(unsafe.Pointer(bp + 252 /* objc */)); i++ {
			// var len int32 at bp+264, 4

			var oldStr uintptr = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 256 /* objv */)) + uintptr(i)*8)), bp+264)
			// var elem uintptr at bp+272, 8

			if *(*int32)(unsafe.Pointer(bp + 264)) == *(*int32)(unsafe.Pointer(bp + 248)) {
				if int32(*(*int8)(unsafe.Pointer(pattern))) == 0 ||
					libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(pattern)))) == uintptr(0) {
					for ok7 := true; ok7; ok7 = 0 != 0 {
						for ok8 := true; ok8; ok8 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							*(*uintptr)(unsafe.Pointer(bp + 272)) = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Fbytes, ts+32094, uint64(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Fbytes + 1)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Flength = int32(uint64(unsafe.Sizeof([2]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).FtypePtr = uintptr(0)
						{
						}
					}
				} else {
					for ok9 := true; ok9; ok9 = 0 != 0 {
						for ok10 := true; ok10; ok10 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							*(*uintptr)(unsafe.Pointer(bp + 272)) = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Fbytes, ts+6377, uint64(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Fbytes + 1)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).Flength = int32(uint64(unsafe.Sizeof([2]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 272)))).FtypePtr = uintptr(0)
						{
						}
					}
				}
			} else {
				*(*uintptr)(unsafe.Pointer(bp + 272 /* elem */)) = XTcl_NewStringObj(tls, oldStr+uintptr(*(*int32)(unsafe.Pointer(bp + 248))), *(*int32)(unsafe.Pointer(bp + 264))-*(*int32)(unsafe.Pointer(bp + 248)))
			}
			XTcl_ListObjReplace(tls, interp, filenamesObj, i, 1, 1, bp+272)
		}
	}

	// Now we have a list of discovered filenames in filenamesObj and a list
	// of previously discovered (saved earlier from the interpreter result) in
	// savedResultObj. Merge them and put them back in the interpreter result.

	if (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FrefCount > 1 {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Flength = -1
				for ok11 := true; ok11; ok11 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(savedResultObj + 32)) = XtclFreeObjList
					XtclFreeObjList = savedResultObj
				}
			} else {
				XTclFreeObj(tls, savedResultObj)
			}
		}

		savedResultObj = XTcl_DuplicateObj(tls, savedResultObj)
		(*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FrefCount++
	}
	if XTcl_ListObjAppendList(tls, interp, savedResultObj, filenamesObj) != TCL_OK {
		result = TCL_ERROR
	} else {
		XTcl_SetObjResult(tls, interp, savedResultObj)
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(savedResultObj)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(savedResultObj)).Flength = -1
			for ok12 := true; ok12; ok12 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(savedResultObj + 32)) = XtclFreeObjList
				XtclFreeObjList = savedResultObj
			}
		} else {
			XTclFreeObj(tls, savedResultObj)
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(filenamesObj)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(filenamesObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(filenamesObj)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(filenamesObj)).Flength = -1
			for ok13 := true; ok13; ok13 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(filenamesObj + 32)) = XtclFreeObjList
				XtclFreeObjList = filenamesObj
			}
		} else {
			XTclFreeObj(tls, filenamesObj)
		}
	}

	if pathPrefix != uintptr(0) {
		for ok14 := true; ok14; ok14 = 0 != 0 {
			var _objPtr uintptr = pathPrefix
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	return result
}

//----------------------------------------------------------------------
//
// SkipToChar --
//
//	This function traverses a glob pattern looking for the next unquoted
//	occurrence of the specified character at the same braces nesting level.
//
// Results:
//	Updates stringPtr to point to the matching character, or to the end of
//	the string if nothing matched. The return value is 1 if a match was
//	found at the top level, otherwise it is 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSkipToChar(tls *libc.TLS, stringPtr uintptr, match int32) int32 { /* tclFileName.c:2083:1: */
	var quoted int32
	var level int32
	var p uintptr

	quoted = 0
	level = 0

	for p = *(*uintptr)(unsafe.Pointer(stringPtr)); int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
		if quoted != 0 {
			quoted = 0
			continue
		}
		if level == 0 && int32(*(*int8)(unsafe.Pointer(p))) == match {
			*(*uintptr)(unsafe.Pointer(stringPtr)) = p
			return 1
		}
		if int32(*(*int8)(unsafe.Pointer(p))) == '{' {
			level++
		} else if int32(*(*int8)(unsafe.Pointer(p))) == '}' {
			level--
		} else if int32(*(*int8)(unsafe.Pointer(p))) == '\\' {
			quoted = 1
		}
	}
	*(*uintptr)(unsafe.Pointer(stringPtr)) = p
	return 0
}

//----------------------------------------------------------------------
//
// DoGlob --
//
//	This recursive procedure forms the heart of the globbing code. It
//	performs a depth-first traversal of the tree given by the path name to
//	be globbed and the pattern. The directory and remainder are assumed to
//	be native format paths. The prefix contained in 'pathPtr' is either a
//	directory or path from which to start the search (or NULL). If pathPtr
//	is NULL, then the pattern must not start with an absolute path
//	specification (that case should be handled by moving the absolute path
//	prefix into pathPtr before calling DoGlob).
//
// Results:
//	The return value is a standard Tcl result indicating whether an error
//	occurred in globbing. After a normal return the result in interp will
//	be set to hold all of the file names given by the dir and remaining
//	arguments. After an error the result in interp will hold an error
//	message.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sDoGlob(tls *libc.TLS, interp uintptr, matchesObj uintptr, separators uintptr, pathPtr uintptr, flags int32, pattern uintptr, types1 uintptr) int32 { /* tclFileName.c:2142:1: */
	bp := tls.Alloc(580)
	defer tls.Free(580)

	var baseLength int32
	var quoted int32
	var count int32
	var result int32 = TCL_OK
	var name uintptr
	// var p uintptr at bp+80, 8

	var openBrace uintptr
	var closeBrace uintptr
	var firstSpecialChar uintptr
	var joinedPtr uintptr

	// Consume any leading directory separators, leaving pattern pointing just
	// past the last initial separator.

	count = 0
	name = pattern
	for ; int32(*(*int8)(unsafe.Pointer(pattern))) != 0; pattern++ {
		if int32(*(*int8)(unsafe.Pointer(pattern))) == '\\' {
			// If the first character is escaped, either we have a directory
			// separator, or we have any other character. In the latter case
			// the rest is a pattern, and we must break from the loop. This
			// is particularly important on Windows where '\' is both the
			// escaping character and a directory separator.

			if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(pattern + 1)))) != uintptr(0) {
				pattern++
			} else {
				break
			}
		} else if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(pattern)))) == uintptr(0) {
			break
		}
		count++
	}

	// Look for the first matching pair of braces or the first directory
	// separator that is not inside a pair of braces.

	openBrace = libc.AssignUintptr(&closeBrace, uintptr(0))
	quoted = 0
	for *(*uintptr)(unsafe.Pointer(bp + 80 /* p */)) = pattern; int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* p */))))) != 0; *(*uintptr)(unsafe.Pointer(bp + 80 /* p */))++ {
		if quoted != 0 {
			quoted = 0

		} else if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80))))) == '\\' {
			quoted = 1
			if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)) + 1)))) != uintptr(0) {
				// Quoted directory separator.
				break
			}

		} else if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80)))))) != uintptr(0) {
			// Unquoted directory separator.
			break

		} else if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80))))) == '{' {
			openBrace = *(*uintptr)(unsafe.Pointer(bp + 80 /* p */))
			*(*uintptr)(unsafe.Pointer(bp + 80 /* p */))++
			if sSkipToChar(tls, bp+80, '}') != 0 {
				// Balanced braces.

				closeBrace = *(*uintptr)(unsafe.Pointer(bp + 80 /* p */))
				break
			}
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+32096, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+31596, ts+32130,
				uintptr(0)))
			return TCL_ERROR

		} else if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80))))) == '}' {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+32138, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7949, ts+31596, ts+32130,
				uintptr(0)))
			return TCL_ERROR
		}
	}

	// Substitute the alternate patterns from the braces and recurse.

	if openBrace != uintptr(0) {
		var element uintptr
		// var newName Tcl_DString at bp+88, 216

		XTcl_DStringInit(tls, bp+88)

		// For each element within in the outermost pair of braces, append the
		// element and the remainder to the fixed portion before the first
		// brace and recursively call DoGlob.

		XTcl_DStringAppend(tls, bp+88, pattern, int32((int64(openBrace)-int64(pattern))/1))
		baseLength = (*Tcl_DString)(unsafe.Pointer(bp + 88)).Flength
		*(*int8)(unsafe.Pointer(closeBrace)) = int8(0)
		for *(*uintptr)(unsafe.Pointer(bp + 80 /* p */)) = openBrace; *(*uintptr)(unsafe.Pointer(bp + 80 /* p */)) != closeBrace; {
			*(*uintptr)(unsafe.Pointer(bp + 80 /* p */))++
			element = *(*uintptr)(unsafe.Pointer(bp + 80 /* p */))
			sSkipToChar(tls, bp+80, ',')
			XTcl_DStringSetLength(tls, bp+88, baseLength)
			XTcl_DStringAppend(tls, bp+88, element, int32((int64(*(*uintptr)(unsafe.Pointer(bp + 80)))-int64(element))/1))
			XTcl_DStringAppend(tls, bp+88, closeBrace+uintptr(1), -1)
			result = sDoGlob(tls, interp, matchesObj, separators, pathPtr, flags,
				(*Tcl_DString)(unsafe.Pointer(bp+88)).Fstring, types1)
			if result != TCL_OK {
				break
			}
		}
		*(*int8)(unsafe.Pointer(closeBrace)) = int8('}')
		XTcl_DStringFree(tls, bp+88)
		return result
	}

	// At this point, there are no more brace substitutions to perform on this
	// path component. The variable p is pointing at a quoted or unquoted
	// directory separator or the end of the string. So we need to check for
	// special globbing characters in the current pattern. We avoid modifying
	// pattern if p is pointing at the end of the string.
	//
	// If we find any globbing characters, then we must call
	// Tcl_FSMatchInDirectory. If we're at the end of the string, then that's
	// all we need to do. If we're not at the end of the string, then we must
	// recurse, so we do that below.
	//
	// Alternatively, if there are no globbing characters then again there are
	// two cases. If we're at the end of the string, we just need to check for
	// the given path's existence and type. If we're not at the end of the
	// string, we recurse.

	if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80))))) != 0 {
		var savedChar int8 = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* p */))))

		// Note that we are modifying the string in place. This won't work if
		// the string is a static.

		*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* p */)))) = int8(0)
		firstSpecialChar = libc.Xstrpbrk(tls, pattern, ts+32173)
		*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* p */)))) = savedChar
	} else {
		firstSpecialChar = libc.Xstrpbrk(tls, pattern, ts+32173)
	}

	if firstSpecialChar != uintptr(0) {
		var save int8 = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* p */))))
		var subdirsPtr uintptr

		if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80))))) == 0 {
			return XTcl_FSMatchInDirectory(tls, interp, matchesObj, pathPtr,
				pattern, types1)
		}

		// We do the recursion ourselves. This makes implementing
		// Tcl_FSMatchInDirectory for each filesystem much easier.

		*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* p */)))) = int8(0)
		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			subdirsPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).FtypePtr = uintptr(0)
		{
		}

		(*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).FrefCount++
		result = XTcl_FSMatchInDirectory(tls, interp, subdirsPtr, pathPtr,
			pattern, uintptr(unsafe.Pointer(&dirOnly)))
		*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* p */)))) = save
		if result == TCL_OK {
			// var subdirc int32 at bp+304, 4

			var i int32
			*(*int32)(unsafe.Pointer(bp + 320 /* repair */)) = -1
			// var subdirv uintptr at bp+312, 8

			result = XTcl_ListObjGetElements(tls, interp, subdirsPtr,
				bp+304, bp+312)
			for i = 0; result == TCL_OK && i < *(*int32)(unsafe.Pointer(bp + 304 /* subdirc */)); i++ {
				var copy uintptr = uintptr(0)

				if pathPtr == uintptr(0) && int32(*(*int8)(unsafe.Pointer(XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 312)) + uintptr(i)*8)))))) == '~' {
					XTcl_ListObjLength(tls, uintptr(0), matchesObj, bp+320)
					copy = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 312 /* subdirv */)) + uintptr(i)*8))
					*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 312 /* subdirv */)) + uintptr(i)*8)) = XTcl_NewStringObj(tls, ts+31379, 2)
					XTcl_AppendObjToObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 312 /* subdirv */)) + uintptr(i)*8)), copy)
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 312)) + uintptr(i)*8)))).FrefCount++
				}
				result = sDoGlob(tls, interp, matchesObj, separators, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 312 /* subdirv */)) + uintptr(i)*8)),
					1, *(*uintptr)(unsafe.Pointer(bp + 80))+uintptr(1), types1)
				if copy != 0 {
					// var end int32 at bp+324, 4

					for ok1 := true; ok1; ok1 = 0 != 0 {
						var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 312)) + uintptr(i)*8))
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
					*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 312 /* subdirv */)) + uintptr(i)*8)) = copy
					XTcl_ListObjLength(tls, uintptr(0), matchesObj, bp+324)
					for *(*int32)(unsafe.Pointer(bp + 320)) < *(*int32)(unsafe.Pointer(bp + 324)) {
						var bytes uintptr
						// var numBytes int32 at bp+336, 4

						// var fixme uintptr at bp+328, 8

						// var newObj uintptr at bp+344, 8

						XTcl_ListObjIndex(tls, uintptr(0), matchesObj, *(*int32)(unsafe.Pointer(bp + 320 /* repair */)), bp+328)
						bytes = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 328 /* fixme */)), bp+336)
						*(*uintptr)(unsafe.Pointer(bp + 344 /* newObj */)) = XTcl_NewStringObj(tls, bytes+uintptr(2), *(*int32)(unsafe.Pointer(bp + 336))-2)
						XTcl_ListObjReplace(tls, uintptr(0), matchesObj, *(*int32)(unsafe.Pointer(bp + 320 /* repair */)), 1,
							1, bp+344)
						*(*int32)(unsafe.Pointer(bp + 320 /* repair */))++
					}
					*(*int32)(unsafe.Pointer(bp + 320 /* repair */)) = -1
				}
			}
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(subdirsPtr)).Flength = -1
				for ok2 := true; ok2; ok2 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(subdirsPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = subdirsPtr
				}
			} else {
				XTclFreeObj(tls, subdirsPtr)
			}
		}

		return result
	}

	// We reach here with no pattern char in current section

	if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80))))) == 0 {
		// var length int32 at bp+568, 4

		// var append Tcl_DString at bp+352, 216

		// This is the code path reached by a command like 'glob foo'.
		//
		// There are no more wildcards in the pattern and no more unprocessed
		// characters in the pattern, so now we can construct the path, and
		// pass it to Tcl_FSMatchInDirectory with an empty pattern to verify
		// the existence of the file and check it is of the correct type (if a
		// 'types' flag it given -- if no such flag was given, we could just
		// use 'Tcl_FSLStat', but for simplicity we keep to a common
		// approach).

		XTcl_DStringInit(tls, bp+352)
		XTcl_DStringAppend(tls, bp+352, pattern, int32((int64(*(*uintptr)(unsafe.Pointer(bp + 80)))-int64(pattern))/1))

		if pathPtr != uintptr(0) {
			XTcl_GetStringFromObj(tls, pathPtr, bp+568)
		} else {
			*(*int32)(unsafe.Pointer(bp + 568 /* length */)) = 0
		}

		switch XtclPlatform {
		case TCL_PLATFORM_WINDOWS:
			if *(*int32)(unsafe.Pointer(bp + 568)) == 0 && (*Tcl_DString)(unsafe.Pointer(bp+352)).Flength == 0 {
				if int32(*(*int8)(unsafe.Pointer(name))) == '\\' && (int32(*(*int8)(unsafe.Pointer(name + 1))) == '/' || int32(*(*int8)(unsafe.Pointer(name + 1))) == '\\') || int32(*(*int8)(unsafe.Pointer(name))) == '/' {
					XTcl_DStringAppend(tls, bp+352, ts+6377, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
				} else {
					XTcl_DStringAppend(tls, bp+352, ts+32094, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
				}
			}

			break
			fallthrough

		case TCL_PLATFORM_UNIX:
			if *(*int32)(unsafe.Pointer(bp + 568)) == 0 && (*Tcl_DString)(unsafe.Pointer(bp+352)).Flength == 0 {
				if int32(*(*int8)(unsafe.Pointer(name))) == '\\' && int32(*(*int8)(unsafe.Pointer(name + 1))) == '/' || int32(*(*int8)(unsafe.Pointer(name))) == '/' {
					XTcl_DStringAppend(tls, bp+352, ts+6377, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
				} else {
					XTcl_DStringAppend(tls, bp+352, ts+32094, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
				}
			}
			break
		}

		// Common for all platforms.

		if pathPtr == uintptr(0) {
			joinedPtr = XTclDStringToObj(tls, bp+352)
		} else if flags != 0 {
			joinedPtr = XTclNewFSPathObj(tls, pathPtr, (*Tcl_DString)(unsafe.Pointer(bp+352)).Fstring,
				(*Tcl_DString)(unsafe.Pointer(bp+352)).Flength)
		} else {
			joinedPtr = XTcl_DuplicateObj(tls, pathPtr)
			if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(bp + 352)).Fstring)))) == uintptr(0) {
				// The current prefix must end in a separator.

				// var len int32 at bp+572, 4

				var joined uintptr = XTcl_GetStringFromObj(tls, joinedPtr, bp+572)

				if *(*int32)(unsafe.Pointer(bp + 572)) > 0 && libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(joined + uintptr(*(*int32)(unsafe.Pointer(bp + 572))-1))))) == uintptr(0) {
					XTcl_AppendToObj(tls, joinedPtr, ts+6377, 1)
				}
			}
			XTcl_AppendToObj(tls, joinedPtr, (*Tcl_DString)(unsafe.Pointer(bp+352)).Fstring,
				(*Tcl_DString)(unsafe.Pointer(bp+352)).Flength)
		}
		(*Tcl_Obj)(unsafe.Pointer(joinedPtr)).FrefCount++
		XTcl_DStringFree(tls, bp+352)
		result = XTcl_FSMatchInDirectory(tls, interp, matchesObj, joinedPtr, uintptr(0),
			types1)
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = joinedPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return result
	}

	// If it's not the end of the string, we must recurse

	if pathPtr == uintptr(0) {
		joinedPtr = XTcl_NewStringObj(tls, pattern, int32((int64(*(*uintptr)(unsafe.Pointer(bp + 80)))-int64(pattern))/1))
	} else if flags != 0 {
		joinedPtr = XTclNewFSPathObj(tls, pathPtr, pattern, int32((int64(*(*uintptr)(unsafe.Pointer(bp + 80)))-int64(pattern))/1))
	} else {
		joinedPtr = XTcl_DuplicateObj(tls, pathPtr)
		if libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(pattern)))) == uintptr(0) {
			// The current prefix must end in a separator, unless this is a
			// volume-relative path. In particular globbing in Windows shares,
			// when not using -dir or -path, e.g. 'glob [file join
			// //machine/share/subdir *]' requires adding a separator here.
			// This behaviour is not currently tested for in the test suite.

			// var len int32 at bp+576, 4

			var joined uintptr = XTcl_GetStringFromObj(tls, joinedPtr, bp+576)

			if *(*int32)(unsafe.Pointer(bp + 576)) > 0 && libc.Xstrchr(tls, separators, int32(*(*int8)(unsafe.Pointer(joined + uintptr(*(*int32)(unsafe.Pointer(bp + 576))-1))))) == uintptr(0) {
				if XTcl_FSGetPathType(tls, pathPtr) != TCL_PATH_VOLUME_RELATIVE {
					XTcl_AppendToObj(tls, joinedPtr, ts+6377, 1)
				}
			}
		}
		XTcl_AppendToObj(tls, joinedPtr, pattern, int32((int64(*(*uintptr)(unsafe.Pointer(bp + 80)))-int64(pattern))/1))
	}

	(*Tcl_Obj)(unsafe.Pointer(joinedPtr)).FrefCount++
	result = sDoGlob(tls, interp, matchesObj, separators, joinedPtr, 1, *(*uintptr)(unsafe.Pointer(bp + 80 /* p */)), types1)
	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _objPtr uintptr = joinedPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return result
}

var dirOnly = Tcl_GlobTypeData{
	Ftype: int32(1) << 2,
} /* tclFileName.c:2321:26 */

//---------------------------------------------------------------------------
//
// Tcl_AllocStatBuf --
//
//	This procedure allocates a Tcl_StatBuf on the heap. It exists so that
//	extensions may be used unchanged on systems where largefile support is
//	optional.
//
// Results:
//	A pointer to a Tcl_StatBuf which may be deallocated by being passed to
//	ckfree().
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_AllocStatBuf(tls *libc.TLS) uintptr { /* tclFileName.c:2531:13: */
	return XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_StatBuf{})))
}

//---------------------------------------------------------------------------
//
// Access functions for Tcl_StatBuf --
//
//	These functions provide portable read-only access to the portable
//	fields of the Tcl_StatBuf structure (really a 'struct stat', 'struct
//	stat64' or something else related). [TIP #316]
//
// Results:
//	The value from the field being retrieved.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_GetFSDeviceFromStat(tls *libc.TLS, statPtr uintptr) uint32 { /* tclFileName.c:2556:1: */
	return (*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_dev
}

func XTcl_GetFSInodeFromStat(tls *libc.TLS, statPtr uintptr) uint32 { /* tclFileName.c:2563:1: */
	return uint32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_ino)
}

func XTcl_GetModeFromStat(tls *libc.TLS, statPtr uintptr) uint32 { /* tclFileName.c:2570:1: */
	return uint32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_mode)
}

func XTcl_GetLinkCountFromStat(tls *libc.TLS, statPtr uintptr) int32 { /* tclFileName.c:2577:1: */
	return int32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_nlink)
}

func XTcl_GetUserIdFromStat(tls *libc.TLS, statPtr uintptr) int32 { /* tclFileName.c:2584:1: */
	return int32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_uid)
}

func XTcl_GetGroupIdFromStat(tls *libc.TLS, statPtr uintptr) int32 { /* tclFileName.c:2591:1: */
	return int32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_gid)
}

func XTcl_GetDeviceTypeFromStat(tls *libc.TLS, statPtr uintptr) int32 { /* tclFileName.c:2598:1: */
	return int32((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_rdev)
}

func XTcl_GetAccessTimeFromStat(tls *libc.TLS, statPtr uintptr) Tcl_WideInt { /* tclFileName.c:2605:1: */
	return (*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_atime
}

func XTcl_GetModificationTimeFromStat(tls *libc.TLS, statPtr uintptr) Tcl_WideInt { /* tclFileName.c:2612:1: */
	return (*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_mtime
}

func XTcl_GetChangeTimeFromStat(tls *libc.TLS, statPtr uintptr) Tcl_WideInt { /* tclFileName.c:2619:1: */
	return (*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_ctime
}

func XTcl_GetSizeFromStat(tls *libc.TLS, statPtr uintptr) Tcl_WideUInt { /* tclFileName.c:2626:1: */
	return Tcl_WideUInt((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_size)
}

func XTcl_GetBlocksFromStat(tls *libc.TLS, statPtr uintptr) Tcl_WideUInt { /* tclFileName.c:2633:1: */
	var blksize uint32 = XTcl_GetBlockSizeFromStat(tls, statPtr)

	return (Tcl_WideUInt((*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_size) + Tcl_WideUInt(blksize) - uint64(1)) / Tcl_WideUInt(blksize)
}

func XTcl_GetBlockSizeFromStat(tls *libc.TLS, statPtr uintptr) uint32 { /* tclFileName.c:2646:1: */
	// Not a great guess, but will do...

	return uint32(GUESSED_BLOCK_SIZE)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------------
//
// Tcl_GetInt --
//
//	Given a string, produce the corresponding integer value.
//
// Results:
//	The return value is normally TCL_OK; in this case *intPtr will be set
//	to the integer value equivalent to src.  If src is improperly formed
//	then TCL_ERROR is returned and an error message will be left in the
//	interp's result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetInt(tls *libc.TLS, interp uintptr, src uintptr, intPtr uintptr) int32 { /* tclGet.c:37:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var obj Tcl_Obj at bp, 48

	var code int32

	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FrefCount = 1
	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).Fbytes = src
	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).Flength = int32(libc.Xstrlen(tls, src))
	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FtypePtr = uintptr(0)

	code = XTcl_GetIntFromObj(tls, interp, bp, intPtr)
	if (*Tcl_Obj)(unsafe.Pointer(bp)).FrefCount > 1 {
		XTcl_Panic(tls, ts+32179, 0)
	}
	if (*Tcl_Obj)(unsafe.Pointer(bp)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bp)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FtypePtr)).FfreeIntRepProc})).f(tls, bp /* &obj */)
		}
		(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FtypePtr = uintptr(0)
	}

	return code
}

//----------------------------------------------------------------------
//
// Tcl_GetDouble --
//
//	Given a string, produce the corresponding double-precision
//	floating-point value.
//
// Results:
//	The return value is normally TCL_OK; in this case *doublePtr will be
//	set to the double-precision value equivalent to src. If src is
//	improperly formed then TCL_ERROR is returned and an error message will
//	be left in the interp's result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetDouble(tls *libc.TLS, interp uintptr, src uintptr, doublePtr uintptr) int32 { /* tclGet.c:81:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var obj Tcl_Obj at bp, 48

	var code int32

	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FrefCount = 1
	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).Fbytes = src
	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).Flength = int32(libc.Xstrlen(tls, src))
	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FtypePtr = uintptr(0)

	code = XTcl_GetDoubleFromObj(tls, interp, bp, doublePtr)
	if (*Tcl_Obj)(unsafe.Pointer(bp)).FrefCount > 1 {
		XTcl_Panic(tls, ts+32179, 0)
	}
	if (*Tcl_Obj)(unsafe.Pointer(bp)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bp)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FtypePtr)).FfreeIntRepProc})).f(tls, bp /* &obj */)
		}
		(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FtypePtr = uintptr(0)
	}

	return code
}

//----------------------------------------------------------------------
//
// Tcl_GetBoolean --
//
//	Given a string, return a 0/1 boolean value corresponding to the
//	string.
//
// Results:
//	The return value is normally TCL_OK; in this case *boolPtr will be set
//	to the 0/1 value equivalent to src. If src is improperly formed then
//	TCL_ERROR is returned and an error message will be left in the
//	interp's result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetBoolean(tls *libc.TLS, interp uintptr, src uintptr, boolPtr uintptr) int32 { /* tclGet.c:125:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var obj Tcl_Obj at bp, 48

	var code int32

	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FrefCount = 1
	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).Fbytes = src
	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).Flength = int32(libc.Xstrlen(tls, src))
	(*Tcl_Obj)(unsafe.Pointer(bp /* &obj */)).FtypePtr = uintptr(0)

	code = XTclSetBooleanFromAny(tls, interp, bp)
	if (*Tcl_Obj)(unsafe.Pointer(bp)).FrefCount > 1 {
		XTcl_Panic(tls, ts+32179, 0)
	}
	if code == TCL_OK {
		*(*int32)(unsafe.Pointer(boolPtr)) = int32(*(*int32)(unsafe.Pointer(bp + 32)))
	}
	return code
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

var XtclArrayHashKeyType = Tcl_HashKeyType{
	Fversion:         TCL_HASH_KEY_TYPE_VERSION,   // version
	Fflags:           TCL_HASH_KEY_RANDOMIZE_HASH, // flags
	FhashKeyProc:     0,                           // hashKeyProc
	FcompareKeysProc: 0,                           // compareKeysProc
	FallocEntryProc:  0,                           // freeEntryProc
} /* tclHash.c:82:23 */

var XtclOneWordHashKeyType = Tcl_HashKeyType{
	Fversion: TCL_HASH_KEY_TYPE_VERSION, /* FreeOneWordKey, */ // freeEntryProc
} /* tclHash.c:91:23 */

var XtclStringHashKeyType = Tcl_HashKeyType{
	Fversion:         TCL_HASH_KEY_TYPE_VERSION, // flags
	FhashKeyProc:     0,                         // hashKeyProc
	FcompareKeysProc: 0,                         // compareKeysProc
	FallocEntryProc:  0,                         // freeEntryProc
} /* tclHash.c:100:23 */

//----------------------------------------------------------------------
//
// Tcl_InitHashTable --
//
//	Given storage for a hash table, set up the fields to prepare the hash
//	table for use.
//
// Results:
//	None.
//
// Side effects:
//	TablePtr is now ready to be passed to Tcl_FindHashEntry and
//	Tcl_CreateHashEntry.
//
//----------------------------------------------------------------------

func XTcl_InitHashTable(tls *libc.TLS, tablePtr uintptr, keyType int32) { /* tclHash.c:128:1: */
	// Use a special value to inform the extended version that it must not
	// access any of the new fields in the Tcl_HashTable. If an extension is
	// rebuilt then any calls to this function will be redirected to the
	// extended version by a macro.

	XTcl_InitCustomHashTable(tls, tablePtr, keyType, libc.UintptrFromInt32(-1))
}

//----------------------------------------------------------------------
//
// Tcl_InitCustomHashTable --
//
//	Given storage for a hash table, set up the fields to prepare the hash
//	table for use. This is an extended version of Tcl_InitHashTable which
//	supports user defined keys.
//
// Results:
//	None.
//
// Side effects:
//	TablePtr is now ready to be passed to Tcl_FindHashEntry and
//	Tcl_CreateHashEntry.
//
//----------------------------------------------------------------------

func XTcl_InitCustomHashTable(tls *libc.TLS, tablePtr uintptr, keyType int32, typePtr uintptr) { /* tclHash.c:166:1: */

	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets = tablePtr + 8 /* &.staticBuckets */
	*(*uintptr)(unsafe.Pointer(tablePtr + 8)) = libc.AssignPtrUintptr(tablePtr+8+1*8, uintptr(0))
	*(*uintptr)(unsafe.Pointer(tablePtr + 8 + 2*8)) = libc.AssignPtrUintptr(tablePtr+8+3*8, uintptr(0))
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumBuckets = TCL_SMALL_HASH_TABLE
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumEntries = 0
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FrebuildSize = TCL_SMALL_HASH_TABLE * REBUILD_MULTIPLIER
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FdownShift = 28
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask = 3
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType = keyType
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FfindProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	}{sFindHashEntry}))
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	}{sCreateHashEntry}))

	if typePtr == uintptr(0) {
		// The caller has been rebuilt so the hash table is an extended
		// version.
	} else if typePtr != libc.UintptrFromInt32(-1) {
		// The caller is requesting a customized hash table so it must be an
		// extended version.

		(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FtypePtr = typePtr
	} else {
		// The caller has not been rebuilt so the hash table is not extended.
	}
}

//----------------------------------------------------------------------
//
// Tcl_FindHashEntry --
//
//	Given a hash table find the entry with a matching key.
//
// Results:
//	The return value is a token for the matching entry in the hash table,
//	or NULL if there was no matching entry.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FindHashEntry(tls *libc.TLS, tablePtr uintptr, key uintptr) uintptr { /* tclHash.c:230:15: */
	return (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FfindProc})).f(tls, tablePtr, key)
}

func sFindHashEntry(tls *libc.TLS, tablePtr uintptr, key uintptr) uintptr { /* tclHash.c:238:22: */
	return sCreateHashEntry(tls, tablePtr, key, uintptr(0))
}

//----------------------------------------------------------------------
//
// Tcl_CreateHashEntry --
//
//	Given a hash table with string keys, and a string key, find the entry
//	with a matching key. If there is no matching entry, then create a new
//	entry that does match.
//
// Results:
//	The return value is a pointer to the matching entry. If this is a
//	newly-created entry, then *newPtr will be set to a non-zero value;
//	otherwise *newPtr will be set to 0. If this is a new entry the value
//	stored in the entry will initially be 0.
//
// Side effects:
//	A new entry may be added to the hash table.
//
//----------------------------------------------------------------------

func XTcl_CreateHashEntry(tls *libc.TLS, tablePtr uintptr, key uintptr, newPtr uintptr) uintptr { /* tclHash.c:268:15: */
	return (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, key, newPtr)
}

func sCreateHashEntry(tls *libc.TLS, tablePtr uintptr, key uintptr, newPtr uintptr) uintptr { /* tclHash.c:279:22: */
	var hPtr uintptr
	var typePtr uintptr
	var hash uint32
	var index int32

	if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 0 {
		typePtr = uintptr(unsafe.Pointer(&XtclStringHashKeyType))
	} else if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 1 {
		typePtr = uintptr(unsafe.Pointer(&XtclOneWordHashKeyType))
	} else if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -2 ||
		(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -1 {
		typePtr = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FtypePtr
	} else {
		typePtr = uintptr(unsafe.Pointer(&XtclArrayHashKeyType))
	}

	if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FhashKeyProc != 0 {
		hash = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uint32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FhashKeyProc})).f(tls, tablePtr, key)
		if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).Fflags&TCL_HASH_KEY_RANDOMIZE_HASH != 0 {
			index = int32(uint32(hash) * uint32(1103515245) >> (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FdownShift & uint32((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask))
		} else {
			index = int32(hash & uint32((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask))
		}
	} else {
		hash = uint32(key)
		index = int32(uint32(hash) * uint32(1103515245) >> (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FdownShift & uint32((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask))
	}

	// Search all of the entries in the appropriate bucket.

	if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FcompareKeysProc != 0 {
		var compareKeysProc uintptr = (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FcompareKeysProc

		for hPtr = *(*uintptr)(unsafe.Pointer((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(index)*8)); hPtr != uintptr(0); hPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FnextPtr {
			if hash != uint32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).Fhash) {
				continue
			}
			// if keys pointers or values are equal
			if key == *(*uintptr)(unsafe.Pointer(hPtr + 32)) ||
				(*struct {
					f func(*libc.TLS, uintptr, uintptr) int32
				})(unsafe.Pointer(&struct{ uintptr }{compareKeysProc})).f(tls, key, hPtr) != 0 {
				if newPtr != 0 {
					*(*int32)(unsafe.Pointer(newPtr)) = 0
				}
				return hPtr
			}
		}
	} else {
		for hPtr = *(*uintptr)(unsafe.Pointer((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(index)*8)); hPtr != uintptr(0); hPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FnextPtr {
			if hash != uint32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).Fhash) {
				continue
			}
			if key == *(*uintptr)(unsafe.Pointer(hPtr + 32)) {
				if newPtr != 0 {
					*(*int32)(unsafe.Pointer(newPtr)) = 0
				}
				return hPtr
			}
		}
	}

	if !(newPtr != 0) {
		return uintptr(0)
	}

	// Entry not found. Add a new one to the bucket.

	*(*int32)(unsafe.Pointer(newPtr)) = 1
	if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FallocEntryProc != 0 {
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FallocEntryProc})).f(tls, tablePtr, key)
	} else {
		hPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashEntry{})))
		*(*uintptr)(unsafe.Pointer(hPtr + 32)) = key
		(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(0)
	}

	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FtablePtr = tablePtr
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).Fhash = uintptr(Uintptr_t(hash))
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FnextPtr = *(*uintptr)(unsafe.Pointer((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(index)*8))
	*(*uintptr)(unsafe.Pointer((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(index)*8)) = hPtr
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumEntries++

	// If the table has exceeded a decent size, rebuild it with many more
	// buckets.

	if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumEntries >= (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FrebuildSize {
		sRebuildTable(tls, tablePtr)
	}
	return hPtr
}

//----------------------------------------------------------------------
//
// Tcl_DeleteHashEntry --
//
//	Remove a single entry from a hash table.
//
// Results:
//	None.
//
// Side effects:
//	The entry given by entryPtr is deleted from its table and should never
//	again be used by the caller. It is up to the caller to free the
//	clientData field of the entry, if that is relevant.
//
//----------------------------------------------------------------------

func XTcl_DeleteHashEntry(tls *libc.TLS, entryPtr uintptr) { /* tclHash.c:415:1: */
	var prevPtr uintptr
	var typePtr uintptr
	var tablePtr uintptr
	var bucketPtr uintptr
	var index int32

	tablePtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FtablePtr

	if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 0 {
		typePtr = uintptr(unsafe.Pointer(&XtclStringHashKeyType))
	} else if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 1 {
		typePtr = uintptr(unsafe.Pointer(&XtclOneWordHashKeyType))
	} else if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -2 ||
		(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -1 {
		typePtr = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FtypePtr
	} else {
		typePtr = uintptr(unsafe.Pointer(&XtclArrayHashKeyType))
	}

	if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FhashKeyProc == uintptr(0) ||
		(*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).Fflags&TCL_HASH_KEY_RANDOMIZE_HASH != 0 {
		index = int32(int32(int32((*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).Fhash)) * 1103515245 >> (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FdownShift & int32((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask))
	} else {
		index = int32(uint32((*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).Fhash) & uint32((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask))
	}

	bucketPtr = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(index)*8

	if *(*uintptr)(unsafe.Pointer(bucketPtr)) == entryPtr {
		*(*uintptr)(unsafe.Pointer(bucketPtr)) = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FnextPtr
	} else {
		for prevPtr = *(*uintptr)(unsafe.Pointer(bucketPtr)); ; prevPtr = (*Tcl_HashEntry)(unsafe.Pointer(prevPtr)).FnextPtr {
			if prevPtr == uintptr(0) {
				XTcl_Panic(tls, ts+32217, 0)
			}
			if (*Tcl_HashEntry)(unsafe.Pointer(prevPtr)).FnextPtr == entryPtr {
				(*Tcl_HashEntry)(unsafe.Pointer(prevPtr)).FnextPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FnextPtr
				break
			}
		}
	}

	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumEntries--
	if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FfreeEntryProc != 0 {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FfreeEntryProc})).f(tls, entryPtr)
	} else {
		XTclpFree(tls, entryPtr)
	}
}

//----------------------------------------------------------------------
//
// Tcl_DeleteHashTable --
//
//	Free up everything associated with a hash table except for the record
//	for the table itself.
//
// Results:
//	None.
//
// Side effects:
//	The hash table is no longer useable.
//
//----------------------------------------------------------------------

func XTcl_DeleteHashTable(tls *libc.TLS, tablePtr uintptr) { /* tclHash.c:492:1: */
	var hPtr uintptr
	var nextPtr uintptr
	var typePtr uintptr
	var i int32

	if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 0 {
		typePtr = uintptr(unsafe.Pointer(&XtclStringHashKeyType))
	} else if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 1 {
		typePtr = uintptr(unsafe.Pointer(&XtclOneWordHashKeyType))
	} else if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -2 ||
		(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -1 {
		typePtr = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FtypePtr
	} else {
		typePtr = uintptr(unsafe.Pointer(&XtclArrayHashKeyType))
	}

	// Free up all the entries in the table.

	for i = 0; i < (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumBuckets; i++ {
		hPtr = *(*uintptr)(unsafe.Pointer((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(i)*8))
		for hPtr != uintptr(0) {
			nextPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FnextPtr
			if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FfreeEntryProc != 0 {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FfreeEntryProc})).f(tls, hPtr)
			} else {
				XTclpFree(tls, hPtr)
			}
			hPtr = nextPtr
		}
	}

	// Free up the bucket array, if it was dynamically allocated.

	if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets != tablePtr+8 {
		if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).Fflags&TCL_HASH_KEY_SYSTEM_HASH != 0 {
			libc.XHeapFree(tls, libc.XGetProcessHeap(tls), DWORD(0), (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets)
		} else {
			XTclpFree(tls, (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets)
		}
	}

	// Arrange for panics if the table is used again without
	// re-initialization.

	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FfindProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	}{sBogusFind}))
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	}{sBogusCreate}))
}

//----------------------------------------------------------------------
//
// Tcl_FirstHashEntry --
//
//	Locate the first entry in a hash table and set up a record that can be
//	used to step through all the remaining entries of the table.
//
// Results:
//	The return value is a pointer to the first entry in tablePtr, or NULL
//	if tablePtr has no entries in it. The memory at *searchPtr is
//	initialized so that subsequent calls to Tcl_NextHashEntry will return
//	all of the entries in the table, one at a time.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FirstHashEntry(tls *libc.TLS, tablePtr uintptr, searchPtr uintptr) uintptr { /* tclHash.c:568:15: */
	(*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FtablePtr = tablePtr
	(*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FnextIndex = 0
	(*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FnextEntryPtr = uintptr(0)
	return XTcl_NextHashEntry(tls, searchPtr)
}

//----------------------------------------------------------------------
//
// Tcl_NextHashEntry --
//
//	Once a hash table enumeration has been initiated by calling
//	Tcl_FirstHashEntry, this function may be called to return successive
//	elements of the table.
//
// Results:
//	The return value is the next entry in the hash table being enumerated,
//	or NULL if the end of the table is reached.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_NextHashEntry(tls *libc.TLS, searchPtr uintptr) uintptr { /* tclHash.c:599:15: */
	var hPtr uintptr
	var tablePtr uintptr = (*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FtablePtr

	for (*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FnextEntryPtr == uintptr(0) {
		if (*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FnextIndex >= (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumBuckets {
			return uintptr(0)
		}
		(*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FnextEntryPtr = *(*uintptr)(unsafe.Pointer((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr((*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FnextIndex)*8))
		(*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FnextIndex++
	}
	hPtr = (*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FnextEntryPtr
	(*Tcl_HashSearch)(unsafe.Pointer(searchPtr)).FnextEntryPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FnextPtr
	return hPtr
}

//----------------------------------------------------------------------
//
// Tcl_HashStats --
//
//	Return statistics describing the layout of the hash table in its hash
//	buckets.
//
// Results:
//	The return value is a malloc-ed string containing information about
//	tablePtr. It is the caller's responsibility to free this string.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_HashStats(tls *libc.TLS, tablePtr uintptr) uintptr { /* tclHash.c:641:6: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	// var count [10]int32 at bp+56, 40

	var overflow int32
	var i int32
	var j int32
	var average float64
	var tmp float64
	var hPtr uintptr
	var result uintptr
	var p uintptr

	// Compute a histogram of bucket usage.

	for i = 0; i < NUM_COUNTERS; i++ {
		*(*int32)(unsafe.Pointer(bp + 56 + uintptr(i)*4)) = 0
	}
	overflow = 0
	average = 0.0
	for i = 0; i < (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumBuckets; i++ {
		j = 0
		for hPtr = *(*uintptr)(unsafe.Pointer((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(i)*8)); hPtr != uintptr(0); hPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FnextPtr {
			j++
		}
		if j < NUM_COUNTERS {
			*(*int32)(unsafe.Pointer(bp + 56 + uintptr(j)*4))++
		} else {
			overflow++
		}
		tmp = float64(j)
		if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumEntries != 0 {
			average = average + (tmp+1.0)*(tmp/float64((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumEntries))/2.0
		}
	}

	// Print out the histogram and a few other pieces of information.

	result = XTcl_Alloc(tls, uint32(NUM_COUNTERS*60+300))
	libc.Xsprintf(tls, result, ts+32263,
		libc.VaList(bp, (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumEntries, (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumBuckets))
	p = result + uintptr(libc.Xstrlen(tls, result))
	for i = 0; i < NUM_COUNTERS; i++ {
		libc.Xsprintf(tls, p, ts+32296,
			libc.VaList(bp+16, i, *(*int32)(unsafe.Pointer(bp + 56 + uintptr(i)*4))))
		p += uintptr(libc.Xstrlen(tls, p))
	}
	libc.Xsprintf(tls, p, ts+32335,
		libc.VaList(bp+32, NUM_COUNTERS, overflow))
	p += uintptr(libc.Xstrlen(tls, p))
	libc.Xsprintf(tls, p, ts+32382, libc.VaList(bp+48, average))
	return result
}

//----------------------------------------------------------------------
//
// AllocArrayEntry --
//
//	Allocate space for a Tcl_HashEntry containing the array key.
//
// Results:
//	The return value is a pointer to the created entry.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sAllocArrayEntry(tls *libc.TLS, tablePtr uintptr, keyPtr uintptr) uintptr { /* tclHash.c:712:22: */
	var array uintptr = keyPtr
	var iPtr1 uintptr
	var iPtr2 uintptr
	var hPtr uintptr
	var count int32
	var size uint32

	count = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType

	size = uint32(uint64(unsafe.Sizeof(Tcl_HashEntry{})) + uint64(count)*uint64(unsafe.Sizeof(int32(0))) - uint64(unsafe.Sizeof(struct{ FoneWordValue uintptr }{})))
	if uint64(size) < uint64(unsafe.Sizeof(Tcl_HashEntry{})) {
		size = uint32(unsafe.Sizeof(Tcl_HashEntry{}))
	}
	hPtr = XTcl_Alloc(tls, size)

	iPtr1 = array
	iPtr2 = hPtr + 32
__1:
	if !(count > 0) {
		goto __3
	}
	{
		*(*int32)(unsafe.Pointer(iPtr2)) = *(*int32)(unsafe.Pointer(iPtr1))

	}
	goto __2
__2:
	count--
	iPtr1 += 4
	iPtr2 += 4
	goto __1
	goto __3
__3:
	;
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(0)

	return hPtr
}

//----------------------------------------------------------------------
//
// CompareArrayKeys --
//
//	Compares two array keys.
//
// Results:
//	The return value is 0 if they are different and 1 if they are the
//	same.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sCompareArrayKeys(tls *libc.TLS, keyPtr uintptr, hPtr uintptr) int32 { /* tclHash.c:758:1: */
	var iPtr1 uintptr = keyPtr
	var iPtr2 uintptr = hPtr + 32
	var tablePtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FtablePtr
	var count int32

	count = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType
__1:
	;
	{
		if count == 0 {
			return 1
		}
		if *(*int32)(unsafe.Pointer(iPtr1)) != *(*int32)(unsafe.Pointer(iPtr2)) {
			goto __3
		}

	}
	goto __2
__2:
	count--
	iPtr1 += 4
	iPtr2 += 4
	goto __1
	goto __3
__3:
	;
	return 0
}

//----------------------------------------------------------------------
//
// HashArrayKey --
//
//	Compute a one-word summary of an array, which can be used to generate
//	a hash index.
//
// Results:
//	The return value is a one-word summary of the information in
//	string.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sHashArrayKey(tls *libc.TLS, tablePtr uintptr, keyPtr uintptr) uint32 { /* tclHash.c:797:1: */
	var array uintptr = keyPtr
	var result uint32
	var count int32

	result = uint32(0)
	count = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType
__1:
	if !(count > 0) {
		goto __3
	}
	{
		result = result + uint32(*(*int32)(unsafe.Pointer(array)))

	}
	goto __2
__2:
	count--
	array += 4
	goto __1
	goto __3
__3:
	;
	return result
}

//----------------------------------------------------------------------
//
// AllocStringEntry --
//
//	Allocate space for a Tcl_HashEntry containing the string key.
//
// Results:
//	The return value is a pointer to the created entry.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sAllocStringEntry(tls *libc.TLS, tablePtr uintptr, keyPtr uintptr) uintptr { /* tclHash.c:828:22: */
	var string uintptr = keyPtr
	var hPtr uintptr
	var size uint32
	var allocsize uint32

	allocsize = libc.AssignUint32(&size, uint32(libc.Xstrlen(tls, string)+uint64(1)))
	if uint64(size) < uint64(unsafe.Sizeof(struct{ FoneWordValue uintptr }{})) {
		allocsize = uint32(unsafe.Sizeof(struct{ FoneWordValue uintptr }{}))
	}
	hPtr = XTcl_Alloc(tls, uint32(int32(uintptr(0)+32))+allocsize)
	libc.Xmemset(tls, hPtr, 0, uint64(unsafe.Sizeof(Tcl_HashEntry{}))+uint64(allocsize)-uint64(unsafe.Sizeof(struct{ FoneWordValue uintptr }{})))
	libc.Xmemcpy(tls, hPtr+32, string, uint64(size))
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(0)
	return hPtr
}

//----------------------------------------------------------------------
//
// CompareStringKeys --
//
//	Compares two string keys.
//
// Results:
//	The return value is 0 if they are different and 1 if they are the
//	same.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sCompareStringKeys(tls *libc.TLS, keyPtr uintptr, hPtr uintptr) int32 { /* tclHash.c:866:1: */
	var p1 uintptr = keyPtr
	var p2 uintptr = hPtr + 32

	return libc.BoolInt32(!(libc.Xstrcmp(tls, p1, p2) != 0))
}

//----------------------------------------------------------------------
//
// HashStringKey --
//
//	Compute a one-word summary of a text string, which can be used to
//	generate a hash index.
//
// Results:
//	The return value is a one-word summary of the information in string.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sHashStringKey(tls *libc.TLS, tablePtr uintptr, keyPtr uintptr) uint32 { /* tclHash.c:894:1: */
	var string uintptr = keyPtr
	var result uint32
	var c int8

	// I tried a zillion different hash functions and asked many other people
	// for advice. Many people had their own favorite functions, all
	// different, but no-one had much idea why they were good ones. I chose
	// the one below (multiply by 9 and add new character) because of the
	// following reasons:
	//
	// 1. Multiplying by 10 is perfect for keys that are decimal strings, and
	//    multiplying by 9 is just about as good.
	// 2. Times-9 is (shift-left-3) plus (old). This means that each
	//    character's bits hang around in the low-order bits of the hash value
	//    for ever, plus they spread fairly rapidly up to the high-order bits
	//    to fill out the hash value. This seems works well both for decimal
	//    and non-decimal strings, but isn't strong against maliciously-chosen
	//    keys.
	//
	// Note that this function is very weak against malicious strings; it's
	// very easy to generate multiple keys that have the same hashcode. On the
	// other hand, that hardly ever actually occurs and this function *is*
	// very cheap, even by comparison with industry-standard hashes like FNV.
	// If real strength of hash is required though, use a custom hash based on
	// Bob Jenkins's lookup3(), but be aware that it's significantly slower.
	// Since Tcl command and namespace names are usually reasonably-named (the
	// main use for string hashes in modern Tcl) speed is far more important
	// than strength.
	//
	// See also HashString in tclLiteral.c.
	// See also TclObjHashKey in tclObj.c.
	//
	// See [tcl-Feature Request #2958832]

	if libc.AssignUint32(&result, uint32(uint8(*(*int8)(unsafe.Pointer(string))))) != uint32(0) {
		for int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(libc.PreIncUintptr(&string, 1))))) != 0 {
			result = result + (result<<3 + uint32(uint8(c)))
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// BogusFind --
//
//	This function is invoked when an Tcl_FindHashEntry is called on a
//	table that has been deleted.
//
// Results:
//	If Tcl_Panic returns (which it shouldn't) this function returns NULL.
//
// Side effects:
//	Generates a panic.
//
//----------------------------------------------------------------------

// ARGSUSED
func sBogusFind(tls *libc.TLS, tablePtr uintptr, key uintptr) uintptr { /* tclHash.c:960:22: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	XTcl_Panic(tls, ts+32422, libc.VaList(bp, ts+32449))
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// BogusCreate --
//
//	This function is invoked when an Tcl_CreateHashEntry is called on a
//	table that has been deleted.
//
// Results:
//	If panic returns (which it shouldn't) this function returns NULL.
//
// Side effects:
//	Generates a panic.
//
//----------------------------------------------------------------------

// ARGSUSED
func sBogusCreate(tls *libc.TLS, tablePtr uintptr, key uintptr, newPtr uintptr) uintptr { /* tclHash.c:987:22: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	XTcl_Panic(tls, ts+32422, libc.VaList(bp, ts+32467))
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// RebuildTable --
//
//	This function is invoked when the ratio of entries to hash buckets
//	becomes too large. It creates a new table with a larger bucket array
//	and moves all of the entries into the new table.
//
// Results:
//	None.
//
// Side effects:
//	Memory gets reallocated and entries get re-hashed to new buckets.
//
//----------------------------------------------------------------------

func sRebuildTable(tls *libc.TLS, tablePtr uintptr) { /* tclHash.c:1018:1: */
	var count int32
	var index int32
	var oldSize int32 = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumBuckets
	var oldBuckets uintptr = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets
	var oldChainPtr uintptr
	var newChainPtr uintptr
	var hPtr uintptr
	var typePtr uintptr

	// Avoid outgrowing capability of the memory allocators
	if oldSize > int32(uint64(uint32(0x7fffffff)*2+1)/(uint64(4)*uint64(unsafe.Sizeof(uintptr(0))))) {
		(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FrebuildSize = 0x7fffffff
		return
	}

	if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 0 {
		typePtr = uintptr(unsafe.Pointer(&XtclStringHashKeyType))
	} else if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 1 {
		typePtr = uintptr(unsafe.Pointer(&XtclOneWordHashKeyType))
	} else if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -2 ||
		(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -1 {
		typePtr = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FtypePtr
	} else {
		typePtr = uintptr(unsafe.Pointer(&XtclArrayHashKeyType))
	}

	// Allocate and initialize the new bucket array, and set up hashing
	// constants for new array size.

	*(*int32)(unsafe.Pointer(tablePtr + 40)) *= 4
	if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).Fflags&TCL_HASH_KEY_SYSTEM_HASH != 0 {
		(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets = libc.XHeapAlloc(tls, libc.XGetProcessHeap(tls), DWORD(0), uint64(DWORD(uint32(uint64((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumBuckets)*uint64(unsafe.Sizeof(uintptr(0)))))))
	} else {
		(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets = XTcl_Alloc(tls, uint32(uint64((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumBuckets)*uint64(unsafe.Sizeof(uintptr(0)))))
	}
	count = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FnumBuckets
	newChainPtr = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets
__1:
	if !(count > 0) {
		goto __3
	}
	{
		*(*uintptr)(unsafe.Pointer(newChainPtr)) = uintptr(0)

	}
	goto __2
__2:
	count--
	newChainPtr += 8
	goto __1
	goto __3
__3:
	;
	*(*int32)(unsafe.Pointer(tablePtr + 48)) *= 4
	*(*int32)(unsafe.Pointer(tablePtr + 52)) -= 2
	(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask = (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask<<2 + 3

	// Rehash all of the existing entries into the new bucket array.

	oldChainPtr = oldBuckets
__4:
	if !(oldSize > 0) {
		goto __6
	}
	{
		for hPtr = *(*uintptr)(unsafe.Pointer(oldChainPtr)); hPtr != uintptr(0); hPtr = *(*uintptr)(unsafe.Pointer(oldChainPtr)) {
			*(*uintptr)(unsafe.Pointer(oldChainPtr)) = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FnextPtr
			if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).FhashKeyProc == uintptr(0) ||
				(*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).Fflags&TCL_HASH_KEY_RANDOMIZE_HASH != 0 {
				index = int32(int32(int32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).Fhash)) * 1103515245 >> (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FdownShift & int32((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask))
			} else {
				index = int32(uint32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).Fhash) & uint32((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fmask))
			}
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FnextPtr = *(*uintptr)(unsafe.Pointer((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(index)*8))
			*(*uintptr)(unsafe.Pointer((*Tcl_HashTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(index)*8)) = hPtr
		}

	}
	goto __5
__5:
	oldSize--
	oldChainPtr += 8
	goto __4
	goto __6
__6:
	;

	// Free up the old bucket array, if it was dynamically allocated.

	if oldBuckets != tablePtr+8 {
		if (*Tcl_HashKeyType)(unsafe.Pointer(typePtr)).Fflags&TCL_HASH_KEY_SYSTEM_HASH != 0 {
			libc.XHeapFree(tls, libc.XGetProcessHeap(tls), DWORD(0), oldBuckets)
		} else {
			XTclpFree(tls, oldBuckets)
		}
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Type of the assocData structure used to hold the reference to the [history
// add] subcommand, used in Tcl_RecordAndEvalObj.

type HistoryObjs = struct {
	FhistoryObj uintptr
	FaddObj     uintptr
} /* tclHistory.c:26:3 */

//----------------------------------------------------------------------
//
// Tcl_RecordAndEval --
//
//	This procedure adds its command argument to the current list of
//	recorded events and then executes the command by calling Tcl_Eval.
//
// Results:
//	The return value is a standard Tcl return value, the result of
//	executing cmd.
//
// Side effects:
//	The command is recorded and executed.
//
//----------------------------------------------------------------------

func XTcl_RecordAndEval(tls *libc.TLS, interp uintptr, cmd uintptr, flags int32) int32 { /* tclHistory.c:55:1: */
	var cmdPtr uintptr
	var length int32 = int32(libc.Xstrlen(tls, cmd))
	var result int32

	if length > 0 {
		// Call Tcl_RecordAndEvalObj to do the actual work.

		cmdPtr = XTcl_NewStringObj(tls, cmd, length)
		(*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FrefCount++
		result = XTcl_RecordAndEvalObj(tls, interp, cmdPtr, flags)

		// Move the interpreter's object result to the string result, then
		// reset the object result.

		XTcl_GetStringResult(tls, interp)

		// Discard the Tcl object created to hold the command.

		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = cmdPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	} else {
		// An empty string. Just reset the interpreter's result.

		XTcl_ResetResult(tls, interp)
		result = TCL_OK
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_RecordAndEvalObj --
//
//	This procedure adds the command held in its argument object to the
//	current list of recorded events and then executes the command by
//	calling Tcl_EvalObj.
//
// Results:
//	The return value is a standard Tcl return value, the result of
//	executing the command.
//
// Side effects:
//	The command is recorded and executed.
//
//----------------------------------------------------------------------

func XTcl_RecordAndEvalObj(tls *libc.TLS, interp uintptr, cmdPtr uintptr, flags int32) int32 { /* tclHistory.c:120:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var result int32
	var call int32 = 1
	// var info Tcl_CmdInfo at bp, 64

	var histObjsPtr uintptr = XTcl_GetAssocData(tls, interp, ts+32487, uintptr(0))

	// Create the references to the [::history add] command if necessary.

	if histObjsPtr == uintptr(0) {
		histObjsPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(HistoryObjs{})))
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				(*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Fbytes, ts+32506, uint64(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Fbytes + 9)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Flength = int32(uint64(unsafe.Sizeof([10]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).FtypePtr = uintptr(0)
			{
			}
		}
		for ok2 := true; ok2; ok2 = 0 != 0 {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				(*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Fbytes, ts+2662, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Fbytes + 3)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).FtypePtr = uintptr(0)
			{
			}
		}
		(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).FrefCount++
		(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).FrefCount++
		XTcl_SetAssocData(tls, interp, ts+32487, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr)
		}{sDeleteHistoryObjs})),
			histObjsPtr)
	}

	// Do not call [history] if it has been replaced by an empty proc

	result = XTcl_GetCommandInfo(tls, interp, ts+32506, bp)
	if result != 0 && (*Tcl_CmdInfo)(unsafe.Pointer(bp)).FdeleteProc == *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{XTclProcDeleteProc})) {
		var procPtr uintptr = (*Tcl_CmdInfo)(unsafe.Pointer(bp /* &info */)).FobjClientData
		call = libc.Bool32((*Command1)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FcmdPtr)).FcompileProc != *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
		}{XTclCompileNoOp})))
	}

	if call != 0 {
		// var list [3]uintptr at bp+64, 24

		// Do recording by eval'ing a tcl history command: history add $cmd.

		*(*uintptr)(unsafe.Pointer(bp + 64)) = (*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj
		*(*uintptr)(unsafe.Pointer(bp + 64 + 1*8)) = (*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj
		*(*uintptr)(unsafe.Pointer(bp + 64 + 2*8)) = cmdPtr

		(*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FrefCount++
		XTcl_EvalObjv(tls, interp, 3, bp+64, TCL_EVAL_GLOBAL)
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr = cmdPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}

		// One possible failure mode above: exceeding a resource limit.

		if XTcl_LimitExceeded(tls, interp) != 0 {
			return TCL_ERROR
		}
	}

	// Execute the command.

	result = TCL_OK
	if !(flags&TCL_NO_EVAL != 0) {
		result = XTcl_EvalObjEx(tls, interp, cmdPtr, flags&TCL_EVAL_GLOBAL)
	}
	return result
}

//----------------------------------------------------------------------
//
// DeleteHistoryObjs --
//
//	Called to delete the references to the constant words used when adding
//	to the history.
//
// Results:
//	None.
//
// Side effects:
//	The constant words may be deleted.
//
//----------------------------------------------------------------------

func sDeleteHistoryObjs(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclHistory.c:213:1: */
	var histObjsPtr uintptr = clientData

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj + 32)) = XtclFreeObjList
				XtclFreeObjList = (*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj
			}
		} else {
			XTclFreeObj(tls, (*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FhistoryObj)
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)).Flength = -1
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer((*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj + 32)) = XtclFreeObjList
				XtclFreeObjList = (*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj
			}
		} else {
			XTclFreeObj(tls, (*HistoryObjs)(unsafe.Pointer(histObjsPtr)).FaddObj)
		}
	}

	XTclpFree(tls, histObjsPtr)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// tclIO.h --
//
//	This file provides the generic portions (those that are the same on
//	all platforms and for all channel types) of Tcl's IO facilities.
//
// Copyright (c) 1998-2000 Ajuba Solutions
// Copyright (c) 1995-1997 Sun Microsystems, Inc.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// Make sure that both EAGAIN and EWOULDBLOCK are defined. This does not
// compile on systems where neither is defined. We want both defined so that
// we can test safely for both. In the code we still have to test for both
// because there may be systems on which both are defined and have different
// values.

// struct ChannelBuffer:
//
// Buffers data being sent to or from a channel.

type ChannelBuffer1 = struct {
	F__ccgo_pad1 [0]uint64
	FrefCount    int32
	FnextAdded   int32
	FnextRemoved int32
	FbufLength   int32
	FnextPtr     uintptr
} /* tclIO.h:38:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// tclIO.h --
//
//	This file provides the generic portions (those that are the same on
//	all platforms and for all channel types) of Tcl's IO facilities.
//
// Copyright (c) 1998-2000 Ajuba Solutions
// Copyright (c) 1995-1997 Sun Microsystems, Inc.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// Make sure that both EAGAIN and EWOULDBLOCK are defined. This does not
// compile on systems where neither is defined. We want both defined so that
// we can test safely for both. In the code we still have to test for both
// because there may be systems on which both are defined and have different
// values.

// struct ChannelBuffer:
//
// Buffers data being sent to or from a channel.

type ChannelBuffer = ChannelBuffer1 /* tclIO.h:51:3 */

// How much extra space to allocate in buffer to hold bytes from previous
// buffer (when converting to UTF-8) or to hold bytes that will go to next
// buffer (when converting from UTF-8).

// The following defines the *default* buffer size for channels.

// The following structure describes the information saved from a call to
// "fileevent". This is used later when the event being waited for to invoke
// the saved script in the interpreter designed in this record.

type EventScriptRecord1 = struct {
	FchanPtr     uintptr
	FscriptPtr   uintptr
	Finterp      uintptr
	Fmask        int32
	F__ccgo_pad1 [4]byte
	FnextPtr     uintptr
} /* tclIO.h:75:9 */

// How much extra space to allocate in buffer to hold bytes from previous
// buffer (when converting to UTF-8) or to hold bytes that will go to next
// buffer (when converting from UTF-8).

// The following defines the *default* buffer size for channels.

// The following structure describes the information saved from a call to
// "fileevent". This is used later when the event being waited for to invoke
// the saved script in the interpreter designed in this record.

type Channel1 = struct {
	Fstate        uintptr
	FinstanceData ClientData
	FtypePtr      uintptr
	FdownChanPtr  uintptr
	FupChanPtr    uintptr
	FinQueueHead  uintptr
	FinQueueTail  uintptr
	FrefCount     int32
	F__ccgo_pad1  [4]byte
} /* tclIO.h:75:9 */

// How much extra space to allocate in buffer to hold bytes from previous
// buffer (when converting to UTF-8) or to hold bytes that will go to next
// buffer (when converting from UTF-8).

// The following defines the *default* buffer size for channels.

// The following structure describes the information saved from a call to
// "fileevent". This is used later when the event being waited for to invoke
// the saved script in the interpreter designed in this record.

type EventScriptRecord = EventScriptRecord1 /* tclIO.h:86:3 */

// struct Channel:
//
// One of these structures is allocated for each open channel. It contains
// data specific to the channel but which belongs to the generic part of the
// Tcl channel mechanism, and it points at an instance specific (and type
// specific) instance data, and at a channel type structure.

type ChannelState1 = struct {
	FchannelName         uintptr
	Fflags               int32
	F__ccgo_pad1         [4]byte
	Fencoding            Tcl_Encoding
	FinputEncodingState  Tcl_EncodingState
	FinputEncodingFlags  int32
	F__ccgo_pad2         [4]byte
	FoutputEncodingState Tcl_EncodingState
	FoutputEncodingFlags int32
	FinputTranslation    TclEolTranslation
	FoutputTranslation   TclEolTranslation
	FinEofChar           int32
	FoutEofChar          int32
	FunreportedError     int32
	FrefCount            int32
	F__ccgo_pad3         [4]byte
	FcloseCbPtr          uintptr
	FoutputStage         uintptr
	FcurOutPtr           uintptr
	FoutQueueHead        uintptr
	FoutQueueTail        uintptr
	FsaveInBufPtr        uintptr
	FinQueueHead         uintptr
	FinQueueTail         uintptr
	FchPtr               uintptr
	FinterestMask        int32
	F__ccgo_pad4         [4]byte
	FscriptRecordPtr     uintptr
	FbufSize             int32
	F__ccgo_pad5         [4]byte
	Ftimer               Tcl_TimerToken
	FcsPtrR              uintptr
	FcsPtrW              uintptr
	FtopChanPtr          uintptr
	FbottomChanPtr       uintptr
	FnextCSPtr           uintptr
	FmanagingThread      Tcl_ThreadId
	FchanMsg             uintptr
	FunreportedMsg       uintptr
	Fepoch               int32
	F__ccgo_pad6         [4]byte
} /* tclIO.h:75:9 */

// struct Channel:
//
// One of these structures is allocated for each open channel. It contains
// data specific to the channel but which belongs to the generic part of the
// Tcl channel mechanism, and it points at an instance specific (and type
// specific) instance data, and at a channel type structure.

type Channel = Channel1 /* tclIO.h:117:3 */

// struct ChannelState:
//
// One of these structures is allocated for each open channel. It contains
// data specific to the channel but which belongs to the generic part of the
// Tcl channel mechanism, and it points at an instance specific (and type
// specific) instance data, and at a channel type structure.

type CloseCallback1 = struct {
	Fproc       uintptr
	FclientData ClientData
	FnextPtr    uintptr
} /* tclIO.h:75:9 */

// struct ChannelState:
//
// One of these structures is allocated for each open channel. It contains
// data specific to the channel but which belongs to the generic part of the
// Tcl channel mechanism, and it points at an instance specific (and type
// specific) instance data, and at a channel type structure.

type ChannelHandler1 = struct {
	FchanPtr     uintptr
	Fmask        int32
	F__ccgo_pad1 [4]byte
	Fproc        uintptr
	FclientData  ClientData
	FnextPtr     uintptr
} /* tclIO.h:75:9 */

// struct ChannelState:
//
// One of these structures is allocated for each open channel. It contains
// data specific to the channel but which belongs to the generic part of the
// Tcl channel mechanism, and it points at an instance specific (and type
// specific) instance data, and at a channel type structure.

type CopyState1 = struct {
	FreadPtr     uintptr
	FwritePtr    uintptr
	FreadFlags   int32
	FwriteFlags  int32
	FtoRead      Tcl_WideInt
	Ftotal       Tcl_WideInt
	Finterp      uintptr
	FcmdPtr      uintptr
	FbufSize     int32
	Fbuffer      [1]int8
	F__ccgo_pad1 [3]byte
} /* tclIO.h:75:9 */

// struct ChannelState:
//
// One of these structures is allocated for each open channel. It contains
// data specific to the channel but which belongs to the generic part of the
// Tcl channel mechanism, and it points at an instance specific (and type
// specific) instance data, and at a channel type structure.

type ChannelState = ChannelState1 /* tclIO.h:219:3 */

// Static assertion.  Requires support in the compiler.

// For each channel handler registered in a call to Tcl_CreateChannelHandler,
// there is one record of the following type. All of records for a specific
// channel are chained together in a singly linked list which is stored in
// the channel structure.

type ChannelHandler = ChannelHandler1 /* tclIO.c:34:3 */

// This structure keeps track of the current ChannelHandler being invoked in
// the current invocation of Tcl_NotifyChannel. There is a potential
// problem if a ChannelHandler is deleted while it is the current one, since
// Tcl_NotifyChannel needs to look at the nextPtr field. To handle this
// problem, structures of the type below indicate the next handler to be
// processed for any (recursively nested) dispatches in progress. The
// nextHandlerPtr field is updated if the handler being pointed to is deleted.
// The nestedHandlerPtr field is used to chain together all recursive
// invocations, so that Tcl_DeleteChannelHandler can find all the recursively
// nested invocations of Tcl_NotifyChannel and compare the handler being
// deleted against the NEXT handler to be invoked in that invocation; when it
// finds such a situation, Tcl_DeleteChannelHandler updates the nextHandlerPtr
// field of the structure to the next handler.

type NextChannelHandler1 = struct {
	FnextHandlerPtr   uintptr
	FnestedHandlerPtr uintptr
} /* tclIO.c:52:9 */

// This structure keeps track of the current ChannelHandler being invoked in
// the current invocation of Tcl_NotifyChannel. There is a potential
// problem if a ChannelHandler is deleted while it is the current one, since
// Tcl_NotifyChannel needs to look at the nextPtr field. To handle this
// problem, structures of the type below indicate the next handler to be
// processed for any (recursively nested) dispatches in progress. The
// nextHandlerPtr field is updated if the handler being pointed to is deleted.
// The nestedHandlerPtr field is used to chain together all recursive
// invocations, so that Tcl_DeleteChannelHandler can find all the recursively
// nested invocations of Tcl_NotifyChannel and compare the handler being
// deleted against the NEXT handler to be invoked in that invocation; when it
// finds such a situation, Tcl_DeleteChannelHandler updates the nextHandlerPtr
// field of the structure to the next handler.

type NextChannelHandler = NextChannelHandler1 /* tclIO.c:58:3 */

// The following structure is used by Tcl_GetsObj() to encapsulates the
// state for a "gets" operation.

type GetsState1 = struct {
	FobjPtr     uintptr
	FdstPtr     uintptr
	Fencoding   Tcl_Encoding
	FbufPtr     uintptr
	Fstate      Tcl_EncodingState
	FrawRead    int32
	FbytesWrote int32
	FcharsWrote int32
	FtotalChars int32
} /* tclIO.c:65:9 */

// The following structure is used by Tcl_GetsObj() to encapsulates the
// state for a "gets" operation.

type GetsState = GetsState1 /* tclIO.c:88:3 */

// The following structure encapsulates the state for a background channel
// copy.  Note that the data buffer for the copy will be appended to this
// structure.

type CopyState = CopyState1 /* tclIO.c:108:3 */

// All static variables used in this file are collected into a single instance
// of the following structure. For multi-threaded implementations, there is
// one instance of this structure for each thread.
//
// Notice that different structures with the same name appear in other files.
// The structure defined below is used in this file only.

type ThreadSpecificData2 = struct {
	FnestedHandlerPtr  uintptr
	FfirstCSPtr        uintptr
	FstdinChannel      Tcl_Channel
	FstdinInitialized  int32
	F__ccgo_pad1       [4]byte
	FstdoutChannel     Tcl_Channel
	FstdoutInitialized int32
	F__ccgo_pad2       [4]byte
	FstderrChannel     Tcl_Channel
	FstderrInitialized int32
	F__ccgo_pad3       [4]byte
	FbinaryEncoding    Tcl_Encoding
} /* tclIO.c:134:3 */

var dataKey2 Tcl_ThreadDataKey /* tclIO.c:136:26: */

// Structure to record a close callback. One such record exists for
// each close callback registered for a channel.

type CloseCallback = CloseCallback1 /* tclIO.c:148:3 */

// Simplifying helper macros. All may use their argument(s) multiple times.
// The ANSI C "prototypes" for the macros are listed below, together with a
// short description of what the macro does.
//
// --------------------------------------------------------------------------
// int BytesLeft(ChannelBuffer *bufPtr)
//
//	Returns the number of bytes of data remaining in the buffer.
//
// int SpaceLeft(ChannelBuffer *bufPtr)
//
//	Returns the number of bytes of space remaining at the end of the
//	buffer.
//
// int IsBufferReady(ChannelBuffer *bufPtr)
//
//	Returns whether a buffer has bytes available within it.
//
// int IsBufferEmpty(ChannelBuffer *bufPtr)
//
//	Returns whether a buffer is entirely empty. Note that this is not the
//	inverse of the above operation; trying to merge the two seems to lead
//	to occasional crashes...
//
// int IsBufferFull(ChannelBuffer *bufPtr)
//
//	Returns whether more data can be added to a buffer.
//
// int IsBufferOverflowing(ChannelBuffer *bufPtr)
//
//	Returns whether a buffer has more data in it than it should.
//
// char *InsertPoint(ChannelBuffer *bufPtr)
//
//	Returns a pointer to where characters should be added to the buffer.
//
// char *RemovePoint(ChannelBuffer *bufPtr)
//
//	Returns a pointer to where characters should be removed from the
//	buffer.
// --------------------------------------------------------------------------

// For working with channel state flag bits.

// Macro for testing whether a string (in optionName, length len) matches a
// value (prefix matching rules). Arguments are the minimum length to match
// and the value to match against. (Can't use Tcl_GetIndexFromObj as this is
// used in a situation where no objects are available.)

// The ChannelObjType type.  Used to store the result of looking up
// a channel name in the context of an interp.  Saves the lookup
// result and values needed to check its continued validity.

type ResolvedChanName1 = struct {
	FstatePtr uintptr
	Finterp   uintptr
	Fepoch    int32
	FrefCount int32
} /* tclIO.c:319:9 */

// Simplifying helper macros. All may use their argument(s) multiple times.
// The ANSI C "prototypes" for the macros are listed below, together with a
// short description of what the macro does.
//
// --------------------------------------------------------------------------
// int BytesLeft(ChannelBuffer *bufPtr)
//
//	Returns the number of bytes of data remaining in the buffer.
//
// int SpaceLeft(ChannelBuffer *bufPtr)
//
//	Returns the number of bytes of space remaining at the end of the
//	buffer.
//
// int IsBufferReady(ChannelBuffer *bufPtr)
//
//	Returns whether a buffer has bytes available within it.
//
// int IsBufferEmpty(ChannelBuffer *bufPtr)
//
//	Returns whether a buffer is entirely empty. Note that this is not the
//	inverse of the above operation; trying to merge the two seems to lead
//	to occasional crashes...
//
// int IsBufferFull(ChannelBuffer *bufPtr)
//
//	Returns whether more data can be added to a buffer.
//
// int IsBufferOverflowing(ChannelBuffer *bufPtr)
//
//	Returns whether a buffer has more data in it than it should.
//
// char *InsertPoint(ChannelBuffer *bufPtr)
//
//	Returns a pointer to where characters should be added to the buffer.
//
// char *RemovePoint(ChannelBuffer *bufPtr)
//
//	Returns a pointer to where characters should be removed from the
//	buffer.
// --------------------------------------------------------------------------

// For working with channel state flag bits.

// Macro for testing whether a string (in optionName, length len) matches a
// value (prefix matching rules). Arguments are the minimum length to match
// and the value to match against. (Can't use Tcl_GetIndexFromObj as this is
// used in a situation where no objects are available.)

// The ChannelObjType type.  Used to store the result of looking up
// a channel name in the context of an interp.  Saves the lookup
// result and values needed to check its continued validity.

type ResolvedChanName = ResolvedChanName1 /* tclIO.c:325:3 */

var chanObjType = Tcl_ObjType{
	Fname:           ts + 32516,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // setFromAnyProc
} /* tclIO.c:330:26 */

//---------------------------------------------------------------------------
//
// ChanClose, ChanRead, ChanSeek, ChanThreadAction, ChanWatch, ChanWrite --
//
//	Simplify the access to selected channel driver "methods" that are used
//	in multiple places in a stereotypical fashion. These are just thin
//	wrappers around the driver functions.
//
//---------------------------------------------------------------------------

func sChanClose(tls *libc.TLS, chanPtr uintptr, interp uintptr) int32 { /* tclIO.c:357:1: */
	if (*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FcloseProc != uintptr(1) {
		return (*struct {
			f func(*libc.TLS, ClientData, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FcloseProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, interp)
	} else {
		return (*struct {
			f func(*libc.TLS, ClientData, uintptr, int32) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).Fclose2Proc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, interp, 0)
	}
	return int32(0)
}

//---------------------------------------------------------------------------
//
// ChanRead --
//
//	Read up to dstSize bytes using the inputProc of chanPtr, store them at
//	dst, and return the number of bytes stored.
//
// Results:
//	The return value of the driver inputProc,
//	  - number of bytes stored at dst, ot
//	  - -1 on error, with a Posix error code available to the caller by
//	    calling Tcl_GetErrno().
//
// Side effects:
//	The CHANNEL_BLOCKED and CHANNEL_EOF flags of the channel state are set
//	as appropriate.  On EOF, the inputEncodingFlags are set to perform
//	ending operations on decoding.
//
//	TODO - Is this really the right place for that?
//
//---------------------------------------------------------------------------
func sChanRead(tls *libc.TLS, chanPtr uintptr, dst uintptr, dstSize int32) int32 { /* tclIO.c:392:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var bytesRead int32
	// var result int32 at bp, 4

	// If the caller asked for zero bytes, we'd force the inputProc to return
	// zero bytes, and then misinterpret that as EOF.

	// Each read op must set the blocked and eof states anew, not let
	// the effect of prior reads leak through.

	if (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).Fflags&(int32(1)<<9) != 0 {
		*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 32)) |= TCL_ENCODING_START
	}
	*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 8)) &= libc.CplInt32(int32(1)<<11 | int32(1)<<9)
	*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 32)) &= libc.CplInt32(TCL_ENCODING_END)
	if sWillRead(tls, chanPtr) < 0 {
		return -1
	}

	bytesRead = (*struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FinputProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData,
		dst, dstSize, bp /* &result */)

	// Stop any flag leakage through stacked channel levels.

	if (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).Fflags&(int32(1)<<9) != 0 {
		*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 32)) |= TCL_ENCODING_START
	}
	*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 8)) &= libc.CplInt32(int32(1)<<11 | int32(1)<<9)
	*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 32)) &= libc.CplInt32(TCL_ENCODING_END)
	if bytesRead > 0 {
		// If we get a short read, signal up that we may be BLOCKED. We should
		// avoid calling the driver because on some platforms we will block in
		// the low level reading code even though the channel is set into
		// nonblocking mode.

		if bytesRead < dstSize {
			*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 8)) |= int32(1) << 11
		}
	} else if bytesRead == 0 {
		*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 8)) |= int32(1) << 9
		*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 32)) |= TCL_ENCODING_END
	} else if bytesRead < 0 {
		if *(*int32)(unsafe.Pointer(bp)) == EWOULDBLOCK || *(*int32)(unsafe.Pointer(bp)) == EAGAIN {
			*(*int32)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate + 8)) |= int32(1) << 11
			*(*int32)(unsafe.Pointer(bp /* result */)) = EAGAIN
		}
		XTcl_SetErrno(tls, *(*int32)(unsafe.Pointer(bp /* result */)))
	}
	return bytesRead
}

func sChanSeek(tls *libc.TLS, chanPtr uintptr, offset Tcl_WideInt, mode int32, errnoPtr uintptr) Tcl_WideInt { /* tclIO.c:457:1: */
	// Note that we prefer the wideSeekProc if that field is available in the
	// type and non-NULL.

	if XTcl_ChannelWideSeekProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr) != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, ClientData, Tcl_WideInt, int32, uintptr) Tcl_WideInt
		})(unsafe.Pointer(&struct{ uintptr }{XTcl_ChannelWideSeekProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData,
			offset, mode, errnoPtr)
	}

	if offset < Tcl_WideInt(-0x7fffffff-1) || offset > Tcl_WideInt(0x7fffffff) {
		*(*int32)(unsafe.Pointer(errnoPtr)) = EOVERFLOW
		return Tcl_WideInt(-1)
	}

	return Tcl_WideInt(int32((*struct {
		f func(*libc.TLS, ClientData, int32, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{XTcl_ChannelSeekProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, int32(offset), mode, errnoPtr)))
}

func sChanThreadAction(tls *libc.TLS, chanPtr uintptr, action int32) { /* tclIO.c:483:1: */
	var threadActionProc uintptr = XTcl_ChannelThreadActionProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)

	if threadActionProc != uintptr(0) {
		(*struct {
			f func(*libc.TLS, ClientData, int32)
		})(unsafe.Pointer(&struct{ uintptr }{threadActionProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, action)
	}
}

func sChanWatch(tls *libc.TLS, chanPtr uintptr, mask int32) { /* tclIO.c:496:1: */
	(*struct {
		f func(*libc.TLS, ClientData, int32)
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FwatchProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, mask)
}

func sChanWrite(tls *libc.TLS, chanPtr uintptr, src uintptr, srcLen int32, errnoPtr uintptr) int32 { /* tclIO.c:504:1: */
	return (*struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FoutputProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, src, srcLen,
		errnoPtr)
}

//---------------------------------------------------------------------------
//
// TclInitIOSubsystem --
//
//	Initialize all resources used by this subsystem on a per-process
//	basis.
//
// Results:
//	None.
//
// Side effects:
//	Depends on the memory subsystems.
//
//---------------------------------------------------------------------------

func XTclInitIOSubsystem(tls *libc.TLS) { /* tclIO.c:532:1: */
	// By fetching thread local storage we take care of allocating it for each
	// thread.

	XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
}

//-------------------------------------------------------------------------
//
// TclFinalizeIOSubsystem --
//
//	Releases all resources used by this subsystem on a per-process basis.
//	Closes all extant channels that have not already been closed because
//	they were not owned by any interp.
//
// Results:
//	None.
//
// Side effects:
//	Depends on encoding and memory subsystems.
//
//-------------------------------------------------------------------------

// ARGSUSED
func XTclFinalizeIOSubsystem(tls *libc.TLS) { /* tclIO.c:562:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	var chanPtr uintptr = uintptr(0) // Iterates over open channels.
	var statePtr uintptr             // State of channel stack
	var active int32 = 1             // Flag == 1 while there's still work to do
	var doflushnb int32

	/*
	 * Fetch the pre-TIP#398 compatibility flag.
	 */

	{
		var s uintptr
		// var ds Tcl_DString at bp, 216

		s = XTclGetEnv(tls, ts+32524, bp)
		doflushnb = libc.Bool32(s != uintptr(0) && libc.Xstrcmp(tls, s, ts+18935) != 0)
		if s != uintptr(0) {
			XTcl_DStringFree(tls, bp)
		}

	}

	// Walk all channel state structures known to this thread and close
	// corresponding channels.

	for active != 0 {
		// Iterate through the open channel list, and find the first channel
		// that isn't dead. We start from the head of the list each time,
		// because the close action on one channel can close others.

		active = 0
		for statePtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr; statePtr != uintptr(0); statePtr = (*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr {
			chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<13) != 0 {
				continue
			}
			if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<19|int32(1)<<8) != 0) ||
				(*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0 {
				*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 7)
				active = 1
				break
			}
		}

		// We've found a live (or bg-closing) channel. Close it.

		if active != 0 {
			XTclChannelPreserve(tls, chanPtr)

			// TIP #398: by default, we no longer set the channel back into
			// blocking mode.  To restore the old blocking behavior, the
			// environment variable TCL_FLUSH_NONBLOCKING_ON_EXIT must be set
			// and not be "0".

			if doflushnb != 0 {
				// Set the channel back into blocking mode to ensure that we
				// wait for all data to flush out.

				XTcl_SetChannelOption(tls, uintptr(0), chanPtr,
					ts+32554, ts+18764)
			}

			if chanPtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel || chanPtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel || chanPtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel {
				// Decrement the refcount which was earlier artificially
				// bumped up to keep the channel from being closed.

				(*ChannelState)(unsafe.Pointer(statePtr)).FrefCount--
			}

			if (*ChannelState)(unsafe.Pointer(statePtr)).FrefCount <= 0 {
				// Close it only if the refcount indicates that the channel is
				// not referenced from any interpreter. If it is, that
				// interpreter will close the channel when it gets destroyed.

				XTcl_Close(tls, uintptr(0), chanPtr)
			} else {
				// The refcount is greater than zero, so flush the channel.

				XTcl_Flush(tls, chanPtr)

				// Call the device driver to actually close the underlying
				// device for this channel.

				sChanClose(tls, chanPtr, uintptr(0))

				// Finally, we clean up the fields in the channel data
				// structure since all of them have been deleted already. We
				// mark the channel with CHANNEL_DEAD to prevent any further
				// IO operations on it.

				(*Channel)(unsafe.Pointer(chanPtr)).FinstanceData = uintptr(0)
				*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 13
			}
			XTclChannelRelease(tls, chanPtr)
		}
	}

	XTclpFinalizeSockets(tls)
	XTclpFinalizePipes(tls)
}

//----------------------------------------------------------------------
//
// Tcl_SetStdChannel --
//
//	This function is used to change the channels that are used for
//	stdin/stdout/stderr in new interpreters.
//
// Results:
//	None
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_SetStdChannel(tls *libc.TLS, channel Tcl_Channel, type1 int32) { /* tclIO.c:706:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))

	var init1 int32
	if channel != 0 {
		init1 = 1
	} else {
		init1 = -1
	}
	switch type1 {
	case int32(1) << 1:
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinInitialized = init1
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel = channel
		break
	case int32(1) << 2:
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutInitialized = init1
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel = channel
		break
	case int32(1) << 3:
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrInitialized = init1
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel = channel
		break
	}
}

//----------------------------------------------------------------------
//
// Tcl_GetStdChannel --
//
//	Returns the specified standard channel.
//
// Results:
//	Returns the specified standard channel, or NULL.
//
// Side effects:
//	May cause the creation of a standard channel and the underlying file.
//
//----------------------------------------------------------------------

func XTcl_GetStdChannel(tls *libc.TLS, type1 int32) Tcl_Channel { /* tclIO.c:746:1: */
	var channel Tcl_Channel = uintptr(0)
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))

	// If the channels were not created yet, create them now and store them in
	// the static variables.

	switch type1 {
	case int32(1) << 1:
		if !((*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinInitialized != 0) {
			(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinInitialized = -1
			(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel = XTclpGetDefaultStdChannel(tls, int32(1)<<1)

			// Artificially bump the refcount to ensure that the channel is
			// only closed on exit.
			//
			// NOTE: Must only do this if stdinChannel is not NULL. It can be
			// NULL in situations where Tcl is unable to connect to the
			// standard input.

			if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel != uintptr(0) {
				(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinInitialized = 1
				XTcl_RegisterChannel(tls, uintptr(0), (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel)
			}
		}
		channel = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel
		break
	case int32(1) << 2:
		if !((*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutInitialized != 0) {
			(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutInitialized = -1
			(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel = XTclpGetDefaultStdChannel(tls, int32(1)<<2)
			if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel != uintptr(0) {
				(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutInitialized = 1
				XTcl_RegisterChannel(tls, uintptr(0), (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel)
			}
		}
		channel = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel
		break
	case int32(1) << 3:
		if !((*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrInitialized != 0) {
			(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrInitialized = -1
			(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel = XTclpGetDefaultStdChannel(tls, int32(1)<<3)
			if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel != uintptr(0) {
				(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrInitialized = 1
				XTcl_RegisterChannel(tls, uintptr(0), (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel)
			}
		}
		channel = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel
		break
	}
	return channel
}

//----------------------------------------------------------------------
//
// Tcl_CreateCloseHandler
//
//	Creates a close callback which will be called when the channel is
//	closed.
//
// Results:
//	None.
//
// Side effects:
//	Causes the callback to be called in the future when the channel will
//	be closed.
//
//----------------------------------------------------------------------

func XTcl_CreateCloseHandler(tls *libc.TLS, chan1 Tcl_Channel, proc uintptr, clientData ClientData) { /* tclIO.c:824:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	var cbPtr uintptr

	cbPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CloseCallback{})))
	(*CloseCallback)(unsafe.Pointer(cbPtr)).Fproc = proc
	(*CloseCallback)(unsafe.Pointer(cbPtr)).FclientData = clientData

	(*CloseCallback)(unsafe.Pointer(cbPtr)).FnextPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FcloseCbPtr
	(*ChannelState)(unsafe.Pointer(statePtr)).FcloseCbPtr = cbPtr
}

//----------------------------------------------------------------------
//
// Tcl_DeleteCloseHandler --
//
//	Removes a callback that would have been called on closing the channel.
//	If there is no matching callback then this function has no effect.
//
// Results:
//	None.
//
// Side effects:
//	The callback will not be called in the future when the channel is
//	eventually closed.
//
//----------------------------------------------------------------------

func XTcl_DeleteCloseHandler(tls *libc.TLS, chan1 Tcl_Channel, proc uintptr, clientData ClientData) { /* tclIO.c:862:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	var cbPtr uintptr
	var cbPrevPtr uintptr

	cbPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FcloseCbPtr
	cbPrevPtr = uintptr(0)
	for ; cbPtr != uintptr(0); cbPtr = (*CloseCallback)(unsafe.Pointer(cbPtr)).FnextPtr {
		if (*CloseCallback)(unsafe.Pointer(cbPtr)).Fproc == proc && (*CloseCallback)(unsafe.Pointer(cbPtr)).FclientData == clientData {
			if cbPrevPtr == uintptr(0) {
				(*ChannelState)(unsafe.Pointer(statePtr)).FcloseCbPtr = (*CloseCallback)(unsafe.Pointer(cbPtr)).FnextPtr
			} else {
				(*CloseCallback)(unsafe.Pointer(cbPrevPtr)).FnextPtr = (*CloseCallback)(unsafe.Pointer(cbPtr)).FnextPtr
			}
			XTclpFree(tls, cbPtr)
			break
		}
		cbPrevPtr = cbPtr
	}
}

//----------------------------------------------------------------------
//
// GetChannelTable --
//
//	Gets and potentially initializes the channel table for an interpreter.
//	If it is initializing the table it also inserts channels for stdin,
//	stdout and stderr if the interpreter is trusted.
//
// Results:
//	A pointer to the hash table created, for use by the caller.
//
// Side effects:
//	Initializes the channel table for an interpreter. May create channels
//	for stdin, stdout and stderr.
//
//----------------------------------------------------------------------

func sGetChannelTable(tls *libc.TLS, interp uintptr) uintptr { /* tclIO.c:907:22: */
	var hTblPtr uintptr // Hash table of channels.
	var stdinChan Tcl_Channel
	var stdoutChan Tcl_Channel
	var stderrChan Tcl_Channel

	hTblPtr = XTcl_GetAssocData(tls, interp, ts+32564, uintptr(0))
	if hTblPtr == uintptr(0) {
		hTblPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_InitHashTable(tls, hTblPtr, 0)
		XTcl_SetAssocData(tls, interp, ts+32564,
			*(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr)
			}{sDeleteChannelTable})), hTblPtr)

		// If the interpreter is trusted (not "safe"), insert channels for
		// stdin, stdout and stderr (possibly creating them in the process).

		if XTcl_IsSafe(tls, interp) == 0 {
			stdinChan = XTcl_GetStdChannel(tls, int32(1)<<1)
			if stdinChan != uintptr(0) {
				XTcl_RegisterChannel(tls, interp, stdinChan)
			}
			stdoutChan = XTcl_GetStdChannel(tls, int32(1)<<2)
			if stdoutChan != uintptr(0) {
				XTcl_RegisterChannel(tls, interp, stdoutChan)
			}
			stderrChan = XTcl_GetStdChannel(tls, int32(1)<<3)
			if stderrChan != uintptr(0) {
				XTcl_RegisterChannel(tls, interp, stderrChan)
			}
		}
	}
	return hTblPtr
}

//----------------------------------------------------------------------
//
// DeleteChannelTable --
//
//	Deletes the channel table for an interpreter, closing any open
//	channels whose refcount reaches zero. This procedure is invoked when
//	an interpreter is deleted, via the AssocData cleanup mechanism.
//
// Results:
//	None.
//
// Side effects:
//	Deletes the hash table of channels. May close channels. May flush
//	output on closed channels. Removes any channeEvent handlers that were
//	registered in this interpreter.
//
//----------------------------------------------------------------------

func sDeleteChannelTable(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclIO.c:965:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var hTblPtr uintptr // The hash table.
	// var hSearch Tcl_HashSearch at bp, 24
	// Search variable.
	var hPtr uintptr     // Search variable.
	var chanPtr uintptr  // Channel being deleted.
	var statePtr uintptr // State of Channel being deleted.
	var sPtr uintptr
	var prevPtr uintptr
	var nextPtr uintptr
	// Variables to loop over all channel events
	// registered, to delete the ones that refer
	// to the interpreter being deleted.

	// Delete all the registered channels - this will close channels whose
	// refcount reaches zero.

	hTblPtr = clientData
	for hPtr = XTcl_FirstHashEntry(tls, hTblPtr, bp); hPtr != uintptr(0); hPtr = XTcl_FirstHashEntry(tls, hTblPtr, bp) {
		chanPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

		// Remove any fileevents registered in this interpreter.

		sPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr
		prevPtr = uintptr(0)
		for ; sPtr != uintptr(0); sPtr = nextPtr {
			nextPtr = (*EventScriptRecord)(unsafe.Pointer(sPtr)).FnextPtr
			if (*EventScriptRecord)(unsafe.Pointer(sPtr)).Finterp == interp {
				if prevPtr == uintptr(0) {
					(*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr = nextPtr
				} else {
					(*EventScriptRecord)(unsafe.Pointer(prevPtr)).FnextPtr = nextPtr
				}

				XTcl_DeleteChannelHandler(tls, chanPtr,
					*(*uintptr)(unsafe.Pointer(&struct {
						f func(*libc.TLS, ClientData, int32)
					}{XTclChannelEventScriptInvoker})), sPtr)

				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).Flength = -1
						for ok := true; ok; ok = 0 != 0 {
							*(*uintptr)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr + 32)) = XtclFreeObjList
							XtclFreeObjList = (*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr
						}
					} else {
						XTclFreeObj(tls, (*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)
					}
				}

				XTclpFree(tls, sPtr)
			} else {
				prevPtr = sPtr
			}
		}

		// Cannot call Tcl_UnregisterChannel because that procedure calls
		// Tcl_GetAssocData to get the channel table, which might already be
		// inaccessible from the interpreter structure. Instead, we emulate
		// the behavior of Tcl_UnregisterChannel directly here.

		XTcl_DeleteHashEntry(tls, hPtr)
		(*ChannelState)(unsafe.Pointer(statePtr)).Fepoch++
		if libc.PostDecInt32(&(*ChannelState)(unsafe.Pointer(statePtr)).FrefCount, 1) <= 1 {
			if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0) {
				XTcl_Close(tls, interp, chanPtr)
			}
		}

	}
	XTcl_DeleteHashTable(tls, hTblPtr)
	XTclpFree(tls, hTblPtr)
}

//----------------------------------------------------------------------
//
// CheckForStdChannelsBeingClosed --
//
//	Perform special handling for standard channels being closed. When
//	given a standard channel, if the refcount is now 1, it means that the
//	last reference to the standard channel is being explicitly closed. Now
//	bump the refcount artificially down to 0, to ensure the normal
//	handling of channels being closed will occur. Also reset the static
//	pointer to the channel to NULL, to avoid dangling references.
//
// Results:
//	None.
//
// Side effects:
//	Manipulates the refcount on standard channels. May smash the global
//	static pointer to a standard channel.
//
//----------------------------------------------------------------------

func sCheckForStdChannelsBeingClosed(tls *libc.TLS, chan1 Tcl_Channel) { /* tclIO.c:1057:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))

	if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinInitialized == 1 &&
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel != uintptr(0) &&
		statePtr == (*Channel)(unsafe.Pointer((*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel)).Fstate {
		if (*ChannelState)(unsafe.Pointer(statePtr)).FrefCount < 2 {
			(*ChannelState)(unsafe.Pointer(statePtr)).FrefCount = 0
			(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel = uintptr(0)
			return
		}
	} else if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutInitialized == 1 &&
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel != uintptr(0) &&
		statePtr == (*Channel)(unsafe.Pointer((*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel)).Fstate {
		if (*ChannelState)(unsafe.Pointer(statePtr)).FrefCount < 2 {
			(*ChannelState)(unsafe.Pointer(statePtr)).FrefCount = 0
			(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel = uintptr(0)
			return
		}
	} else if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrInitialized == 1 &&
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel != uintptr(0) &&
		statePtr == (*Channel)(unsafe.Pointer((*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel)).Fstate {
		if (*ChannelState)(unsafe.Pointer(statePtr)).FrefCount < 2 {
			(*ChannelState)(unsafe.Pointer(statePtr)).FrefCount = 0
			(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel = uintptr(0)
			return
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_IsStandardChannel --
//
//	Test if the given channel is a standard channel. No attempt is made to
//	check if the channel or the standard channels are initialized or
//	otherwise valid.
//
// Results:
//	Returns 1 if true, 0 if false.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_IsStandardChannel(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:1109:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))

	if chan1 == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel ||
		chan1 == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel ||
		chan1 == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel {
		return 1
	} else {
		return 0
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// Tcl_RegisterChannel --
//
//	Adds an already-open channel to the channel table of an interpreter.
//	If the interpreter passed as argument is NULL, it only increments the
//	channel refCount.
//
// Results:
//	None.
//
// Side effects:
//	May increment the reference count of a channel.
//
//----------------------------------------------------------------------

func XTcl_RegisterChannel(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel) { /* tclIO.c:1142:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var hTblPtr uintptr // Hash table of channels.
	var hPtr uintptr    // Search variable.
	// var isNew int32 at bp, 4
	// Is the hash entry new or does it exist?
	var chanPtr uintptr  // The actual channel.
	var statePtr uintptr // State of the actual channel.

	// Always (un)register bottom-most channel in the stack. This makes
	// management of the channel list easier because no manipulation is
	// necessary during (un)stack operation.

	chanPtr = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chan1)).Fstate)).FbottomChanPtr
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	if (*ChannelState)(unsafe.Pointer(statePtr)).FchannelName == uintptr(0) {
		XTcl_Panic(tls, ts+32570, 0)
	}
	if interp != uintptr(0) {
		hTblPtr = sGetChannelTable(tls, interp)
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FcreateProc})).f(tls, hTblPtr, (*ChannelState)(unsafe.Pointer(statePtr)).FchannelName, bp /* &isNew */)
		if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
			if chan1 == (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData {
				return
			}

			XTcl_Panic(tls, ts+32612, 0)
		}
		(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = chanPtr
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FrefCount++
}

//----------------------------------------------------------------------
//
// Tcl_UnregisterChannel --
//
//	Deletes the hash entry for a channel associated with an interpreter.
//	If the interpreter given as argument is NULL, it only decrements the
//	reference count. (This all happens in the Tcl_DetachChannel helper
//	function).
//
//	Finally, if the reference count of the channel drops to zero, it is
//	deleted.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Calls Tcl_DetachChannel which deletes the hash entry for a channel
//	associated with an interpreter.
//
//	May delete the channel, which can have a variety of consequences,
//	especially if we are forced to close the channel.
//
//----------------------------------------------------------------------

func XTcl_UnregisterChannel(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel) int32 { /* tclIO.c:1207:1: */
	var statePtr uintptr // State of the real channel.

	statePtr = (*Channel)(unsafe.Pointer((*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chan1)).Fstate)).FbottomChanPtr)).Fstate

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<19) != 0 {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

				ts+32657, -1))
		}
		return TCL_ERROR
	}

	if sDetachChannel(tls, interp, chan1) != TCL_OK {
		return TCL_OK
	}

	statePtr = (*Channel)(unsafe.Pointer((*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chan1)).Fstate)).FbottomChanPtr)).Fstate

	// Perform special handling for standard channels being closed. If the
	// refCount is now 1 it means that the last reference to the standard
	// channel is being explicitly closed, so bump the refCount down
	// artificially to 0. This will ensure that the channel is actually
	// closed, below. Also set the static pointer to NULL for the channel.

	sCheckForStdChannelsBeingClosed(tls, chan1)

	// If the refCount reached zero, close the actual channel.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FrefCount <= 0 {
		XTcl_Preserve(tls, statePtr)
		if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0) {
			// We don't want to re-enter Tcl_Close().

			if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<8) != 0) {
				if XTcl_Close(tls, interp, chan1) != TCL_OK {
					*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 8
					XTcl_Release(tls, statePtr)
					return TCL_ERROR
				}
			}
		}
		*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 8
		XTcl_Release(tls, statePtr)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_DetachChannel --
//
//	Deletes the hash entry for a channel associated with an interpreter.
//	If the interpreter given as argument is NULL, it only decrements the
//	reference count. Even if the ref count drops to zero, the channel is
//	NOT closed or cleaned up. This allows a channel to be detached from an
//	interpreter and left in the same state it was in when it was
//	originally returned by 'Tcl_OpenFileChannel', for example.
//
//	This function cannot be used on the standard channels, and will return
//	TCL_ERROR if that is attempted.
//
//	This function should only be necessary for special purposes in which
//	you need to generate a pristine channel from one that has already been
//	used. All ordinary purposes will almost always want to use
//	Tcl_UnregisterChannel instead.
//
//	Provided the channel is not attached to any other interpreter, it can
//	then be closed with Tcl_Close, rather than with Tcl_UnregisterChannel.
//
// Results:
//	A standard Tcl result. If the channel is not currently registered with
//	the given interpreter, TCL_ERROR is returned, otherwise TCL_OK.
//	However no error messages are left in the interp's result.
//
// Side effects:
//	Deletes the hash entry for a channel associated with an interpreter.
//
//----------------------------------------------------------------------

func XTcl_DetachChannel(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel) int32 { /* tclIO.c:1300:1: */
	if XTcl_IsStandardChannel(tls, chan1) != 0 {
		return TCL_ERROR
	}

	return sDetachChannel(tls, interp, chan1)
}

//----------------------------------------------------------------------
//
// DetachChannel --
//
//	Deletes the hash entry for a channel associated with an interpreter.
//	If the interpreter given as argument is NULL, it only decrements the
//	reference count. Even if the ref count drops to zero, the channel is
//	NOT closed or cleaned up. This allows a channel to be detached from an
//	interpreter and left in the same state it was in when it was
//	originally returned by 'Tcl_OpenFileChannel', for example.
//
// Results:
//	A standard Tcl result. If the channel is not currently registered with
//	the given interpreter, TCL_ERROR is returned, otherwise TCL_OK.
//	However no error messages are left in the interp's result.
//
// Side effects:
//	Deletes the hash entry for a channel associated with an interpreter.
//
//----------------------------------------------------------------------

func sDetachChannel(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel) int32 { /* tclIO.c:1335:1: */
	var hTblPtr uintptr  // Hash table of channels.
	var hPtr uintptr     // Search variable.
	var chanPtr uintptr  // The real IO channel.
	var statePtr uintptr // State of the real channel.

	// Always (un)register bottom-most channel in the stack. This makes
	// management of the channel list easier because no manipulation is
	// necessary during (un)stack operation.

	chanPtr = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chan1)).Fstate)).FbottomChanPtr
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	if interp != uintptr(0) {
		hTblPtr = XTcl_GetAssocData(tls, interp, ts+32564, uintptr(0))
		if hTblPtr == uintptr(0) {
			return TCL_ERROR
		}
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FfindProc})).f(tls, hTblPtr, (*ChannelState)(unsafe.Pointer(statePtr)).FchannelName)
		if hPtr == uintptr(0) {
			return TCL_ERROR
		}
		if (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData != chanPtr {
			return TCL_ERROR
		}
		XTcl_DeleteHashEntry(tls, hPtr)
		(*ChannelState)(unsafe.Pointer(statePtr)).Fepoch++

		// Remove channel handlers that refer to this interpreter, so that
		// they will not be present if the actual close is delayed and more
		// events happen on the channel. This may occur if the channel is
		// shared between several interpreters, or if the channel has async
		// flushing active.

		sCleanupChannelHandlers(tls, interp, chanPtr)
	}

	(*ChannelState)(unsafe.Pointer(statePtr)).FrefCount--

	return TCL_OK
}

//---------------------------------------------------------------------------
//
// Tcl_GetChannel --
//
//	Finds an existing Tcl_Channel structure by name in a given
//	interpreter. This function is public because it is used by
//	channel-type-specific functions.
//
// Results:
//	A Tcl_Channel or NULL on failure. If failed, interp's result object
//	contains an error message. *modePtr is filled with the modes in which
//	the channel was opened.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_GetChannel(tls *libc.TLS, interp uintptr, chanName uintptr, modePtr uintptr) Tcl_Channel { /* tclIO.c:1405:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var chanPtr uintptr // The actual channel.
	var hTblPtr uintptr // Hash table of channels.
	var hPtr uintptr    // Search variable.
	var name uintptr    // Translated name.

	// Substitute "stdin", etc. Note that even though we immediately find the
	// channel using Tcl_GetStdChannel, we still need to look it up in the
	// specified interpreter to ensure that it is present in the channel
	// table. Otherwise, safe interpreters would always have access to the
	// standard channels.

	name = chanName
	if int32(*(*int8)(unsafe.Pointer(chanName))) == 's' && int32(*(*int8)(unsafe.Pointer(chanName + 1))) == 't' {
		chanPtr = uintptr(0)
		if libc.Xstrcmp(tls, chanName, ts+32722) == 0 {
			chanPtr = XTcl_GetStdChannel(tls, int32(1)<<1)
		} else if libc.Xstrcmp(tls, chanName, ts+32728) == 0 {
			chanPtr = XTcl_GetStdChannel(tls, int32(1)<<2)
		} else if libc.Xstrcmp(tls, chanName, ts+32735) == 0 {
			chanPtr = XTcl_GetStdChannel(tls, int32(1)<<3)
		}
		if chanPtr != uintptr(0) {
			name = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).FchannelName
		}
	}

	hTblPtr = sGetChannelTable(tls, interp)
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FfindProc})).f(tls, hTblPtr, name)
	if hPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+32742, libc.VaList(bp, chanName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+32774, chanName, uintptr(0)))
		return uintptr(0)
	}

	// Always return bottom-most channel in the stack. This one lives the
	// longest - other channels may go away unnoticed. The other APIs
	// compensate where necessary to retrieve the topmost channel again.

	chanPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	chanPtr = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).FbottomChanPtr
	if modePtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(modePtr)) = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).Fflags & (int32(1)<<1 | int32(1)<<2)
	}

	return chanPtr
}

//---------------------------------------------------------------------------
//
// TclGetChannelFromObj --
//
//	Finds an existing Tcl_Channel structure by name in a given
//	interpreter. This function is public because it is used by
//	channel-type-specific functions.
//
// Results:
//	A Tcl_Channel or NULL on failure. If failed, interp's result object
//	contains an error message. *modePtr is filled with the modes in which
//	the channel was opened.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclGetChannelFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, channelPtr uintptr, modePtr uintptr, flags int32) int32 { /* tclIO.c:1487:1: */
	var statePtr uintptr
	var resPtr uintptr
	var chan1 Tcl_Channel
	resPtr = uintptr(0)
	_ = flags

	if !(interp == uintptr(0)) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&chanObjType))) {
		goto __2
	}
	// Confirm validity of saved lookup results.

	resPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	statePtr = (*ResolvedChanName)(unsafe.Pointer(resPtr)).FstatePtr
	if !((*ResolvedChanName)(unsafe.Pointer(resPtr)).Finterp == interp &&

		(*ResolvedChanName)(unsafe.Pointer(resPtr)).Fepoch == (*ChannelState)(unsafe.Pointer(statePtr)).Fepoch) {
		goto __3
	}
	// Have a valid saved lookup. Jump to end to return it.

	goto valid
__3:
	;
__2:
	;

	chan1 = XTcl_GetChannel(tls, interp, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}(), uintptr(0))

	if !(chan1 == uintptr(0)) {
		goto __4
	}
	if !(resPtr != 0) {
		goto __5
	}
	sFreeChannelInternalRep(tls, objPtr)
__5:
	;
	return TCL_ERROR
__4:
	;

	if !(resPtr != 0 && (*ResolvedChanName)(unsafe.Pointer(resPtr)).FrefCount == 1) {
		goto __6
	}
	// Re-use the ResolvedCmdName struct
	XTcl_Release(tls, (*ResolvedChanName)(unsafe.Pointer(resPtr)).FstatePtr)

	goto __7
__6:
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __8
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __9
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__9:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__8:
	;

	resPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ResolvedChanName{})))
	(*ResolvedChanName)(unsafe.Pointer(resPtr)).FrefCount = 1
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = resPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&chanObjType))
__7:
	;
	statePtr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	(*ResolvedChanName)(unsafe.Pointer(resPtr)).FstatePtr = statePtr
	XTcl_Preserve(tls, statePtr)
	(*ResolvedChanName)(unsafe.Pointer(resPtr)).Finterp = interp
	(*ResolvedChanName)(unsafe.Pointer(resPtr)).Fepoch = (*ChannelState)(unsafe.Pointer(statePtr)).Fepoch

valid:
	*(*Tcl_Channel)(unsafe.Pointer(channelPtr)) = (*ChannelState)(unsafe.Pointer(statePtr)).FbottomChanPtr

	if !(modePtr != uintptr(0)) {
		goto __10
	}
	*(*int32)(unsafe.Pointer(modePtr)) = (*ChannelState)(unsafe.Pointer(statePtr)).Fflags & (int32(1)<<1 | int32(1)<<2)
__10:
	;

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_CreateChannel --
//
//	Creates a new entry in the hash table for a Tcl_Channel record.
//
// Results:
//	Returns the new Tcl_Channel.
//
// Side effects:
//	Creates a new Tcl_Channel instance and inserts it into the hash table.
//
//----------------------------------------------------------------------

func XTcl_CreateChannel(tls *libc.TLS, typePtr uintptr, chanName uintptr, instanceData ClientData, mask int32) Tcl_Channel { /* tclIO.c:1579:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var chanPtr uintptr  // The channel structure newly created.
	var statePtr uintptr // The stack-level independent state info for
	// the channel.
	var name uintptr
	var tmp uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))

	// With the change of the Tcl_ChannelType structure to use a version in
	// 8.3.2+, we have to make sure that our assumption that the structure
	// remains a binary compatible size is true.
	//
	// If this assertion fails on some system, then it can be removed only if
	// the user recompiles code with older channel drivers in the new system
	// as well.

	if uintptr(0) == (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FcloseProc {
		XTcl_Panic(tls, ts+32782, libc.VaList(bp, (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FtypeName))
	}
	if int32(1)<<1&mask != 0 && uintptr(0) == (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FinputProc {
		XTcl_Panic(tls, ts+32820, libc.VaList(bp+8, (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FtypeName))
	}
	if int32(1)<<2&mask != 0 && uintptr(0) == (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FoutputProc {
		XTcl_Panic(tls, ts+32887, libc.VaList(bp+16, (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FtypeName))
	}
	if uintptr(0) == (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FwatchProc {
		XTcl_Panic(tls, ts+32955, libc.VaList(bp+24, (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FtypeName))
	}
	if uintptr(0) != (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FwideSeekProc && uintptr(0) == (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FseekProc {
		XTcl_Panic(tls, ts+32993, libc.VaList(bp+32, (*Tcl_ChannelType)(unsafe.Pointer(typePtr)).FtypeName))
	}

	// JH: We could subsequently memset these to 0 to avoid the numerous
	// assignments to 0/NULL below.

	chanPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Channel{})))
	statePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ChannelState{})))
	(*Channel)(unsafe.Pointer(chanPtr)).Fstate = statePtr

	(*Channel)(unsafe.Pointer(chanPtr)).FinstanceData = instanceData
	(*Channel)(unsafe.Pointer(chanPtr)).FtypePtr = typePtr

	// Set all the bits that are part of the stack-independent state
	// information for the channel.

	if chanName != uintptr(0) {
		var len uint32 = uint32(libc.Xstrlen(tls, chanName) + uint64(1))

		// Make sure we allocate at least 7 bytes, so it fits for "stdout"
		// later.

		tmp = XTcl_Alloc(tls, func() uint32 {
			if len < uint32(7) {
				return uint32(7)
			}
			return len
		}())
		libc.Xstrcpy(tls, tmp, chanName)
	} else {
		tmp = XTcl_Alloc(tls, uint32(7))
		*(*int8)(unsafe.Pointer(tmp)) = int8(0)
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FchannelName = tmp
	(*ChannelState)(unsafe.Pointer(statePtr)).Fflags = mask

	// Set the channel to system default encoding.
	//
	// Note the strange bit of protection taking place here. If the system
	// encoding name is reported back as "binary", something weird is
	// happening. Tcl provides no "binary" encoding, so someone else has
	// provided one. We ignore it so as not to interfere with the "magic"
	// interpretation that Tcl_Channels give to the "-encoding binary" option.

	(*ChannelState)(unsafe.Pointer(statePtr)).Fencoding = uintptr(0)
	name = XTcl_GetEncodingName(tls, uintptr(0))
	if libc.Xstrcmp(tls, name, ts+10063) != 0 {
		(*ChannelState)(unsafe.Pointer(statePtr)).Fencoding = XTcl_GetEncoding(tls, uintptr(0), name)
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags = TCL_ENCODING_START
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutputEncodingState = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutputEncodingFlags = TCL_ENCODING_START

	// Set the channel up initially in AUTO input translation mode to accept
	// "\n", "\r" and "\r\n". Output translation mode is set to a platform
	// specific default value. The eofChar is set to 0 for both input and
	// output, so that Tcl does not look for an in-file EOF indicator (e.g.,
	// ^Z) and does not append an EOF indicator to files.

	(*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation = TCL_TRANSLATE_AUTO
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation = TCL_TRANSLATE_CRLF
	(*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar = 0
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar = 0

	(*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError = 0
	(*ChannelState)(unsafe.Pointer(statePtr)).FrefCount = 0
	(*ChannelState)(unsafe.Pointer(statePtr)).FcloseCbPtr = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueTail = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FchPtr = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FinterestMask = 0
	(*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FbufSize = 1024 * 4
	(*ChannelState)(unsafe.Pointer(statePtr)).Ftimer = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutputStage = uintptr(0)

	// As we are creating the channel, it is obviously the top for now.

	(*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr = chanPtr
	(*ChannelState)(unsafe.Pointer(statePtr)).FbottomChanPtr = chanPtr
	(*Channel)(unsafe.Pointer(chanPtr)).FdownChanPtr = uintptr(0)
	(*Channel)(unsafe.Pointer(chanPtr)).FupChanPtr = uintptr(0)
	(*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead = uintptr(0)
	(*Channel)(unsafe.Pointer(chanPtr)).FinQueueTail = uintptr(0)
	(*Channel)(unsafe.Pointer(chanPtr)).FrefCount = 0

	// TIP #219, Tcl Channel Reflection API

	(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FunreportedMsg = uintptr(0)

	(*ChannelState)(unsafe.Pointer(statePtr)).Fepoch = 0

	// Link the channel into the list of all channels; create an on-exit
	// handler if there is not one already, to close off all the channels in
	// the list on exit.
	//
	// JH: Could call Tcl_SpliceChannel, but need to avoid NULL check.
	//
	// TIP #218.
	// AK: Just initialize the field to NULL before invoking Tcl_SpliceChannel
	//	   We need Tcl_SpliceChannel, for the threadAction calls. There is no
	//	   real reason to duplicate all of this.
	// NOTE: All drivers using thread actions now have to perform their TSD
	//	     manipulation only in their thread action proc. Doing it when
	//	     creating their instance structures will collide with the thread
	//	     action activity and lead to damaged lists.

	(*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr = uintptr(0)
	sSpliceChannel(tls, chanPtr)

	// Install this channel in the first empty standard channel slot, if the
	// channel was previously closed explicitly.

	if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel == uintptr(0) && (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinInitialized == 1 {
		libc.Xstrcpy(tls, tmp, ts+32722)
		XTcl_SetStdChannel(tls, chanPtr, int32(1)<<1)
		XTcl_RegisterChannel(tls, uintptr(0), chanPtr)
	} else if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel == uintptr(0) && (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutInitialized == 1 {
		libc.Xstrcpy(tls, tmp, ts+32728)
		XTcl_SetStdChannel(tls, chanPtr, int32(1)<<2)
		XTcl_RegisterChannel(tls, uintptr(0), chanPtr)
	} else if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel == uintptr(0) && (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrInitialized == 1 {
		libc.Xstrcpy(tls, tmp, ts+32735)
		XTcl_SetStdChannel(tls, chanPtr, int32(1)<<3)
		XTcl_RegisterChannel(tls, uintptr(0), chanPtr)
	}
	return chanPtr
}

//----------------------------------------------------------------------
//
// Tcl_StackChannel --
//
//	Replaces an entry in the hash table for a Tcl_Channel record. The
//	replacement is a new channel with same name, it supercedes the
//	replaced channel. Input and output of the superceded channel is now
//	going through the newly created channel and allows the arbitrary
//	filtering/manipulation of the dataflow.
//
//	Andreas Kupries <a.kupries@westend.com>, 12/13/1998 "Trf-Patch for
//	filtering channels"
//
// Results:
//	Returns the new Tcl_Channel, which actually contains the saved
//	information about prevChan.
//
// Side effects:
//	A new channel structure is allocated and linked below the existing
//	channel. The channel operations and client data of the existing
//	channel are copied down to the newly created channel, and the current
//	channel has its operations replaced by the new typePtr.
//
//----------------------------------------------------------------------

func XTcl_StackChannel(tls *libc.TLS, interp uintptr, typePtr uintptr, instanceData ClientData, mask int32, prevChan Tcl_Channel) Tcl_Channel { /* tclIO.c:1798:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	var chanPtr uintptr
	var prevChanPtr uintptr
	var statePtr uintptr

	// Find the given channel (prevChan) in the list of all channels. If we do
	// not find it, then it was never registered correctly.
	//
	// This operation should occur at the top of a channel stack.

	statePtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr
	prevChanPtr = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(prevChan)).Fstate)).FtopChanPtr

	for statePtr != uintptr(0) && (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr != prevChanPtr {
		statePtr = (*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr
	}

	if statePtr == uintptr(0) {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+33055,
				libc.VaList(bp, XTcl_GetChannelName(tls, prevChan))))
		}
		return uintptr(0)
	}

	// Here we check if the given "mask" matches the "flags" of the already
	// existing channel.
	//
	//	  | - | R | W | RW |
	//	--+---+---+---+----+	<=>  0 != (chan->mask & prevChan->mask)
	//	- |   |   |   |    |
	//	R |   | + |   | +  |	The superceding channel is allowed to restrict
	//	W |   |   | + | +  |	the capabilities of the superceded one!
	//	RW|   | + | + | +  |
	//	--+---+---+---+----+

	if mask&((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<1|int32(1)<<2)) == 0 {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+33092,
				libc.VaList(bp+8, XTcl_GetChannelName(tls, prevChan))))
		}
		return uintptr(0)
	}

	// Flush the buffers. This ensures that any data still in them at this
	// time is not handled by the new transformation. Restrict this to
	// writable channels. Take care to hide a possible bg-copy in progress
	// from Tcl_Flush and the CheckForChannelErrors inside.

	if mask&(int32(1)<<2) != 0 {
		var csPtrR uintptr = (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR
		var csPtrW uintptr = (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW

		(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR = uintptr(0)
		(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW = uintptr(0)

		// TODO: Examine what can go wrong if Tcl_Flush() call disturbs
		// the stacking state of this channel during its operations.
		if XTcl_Flush(tls, prevChanPtr) != TCL_OK {
			(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR = csPtrR
			(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW = csPtrW
			if interp != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+33145,
					libc.VaList(bp+16, XTcl_GetChannelName(tls, prevChan))))
			}
			return uintptr(0)
		}

		(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR = csPtrR
		(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW = csPtrW
	}

	// Discard any input in the buffers. They are not yet read by the user of
	// the channel, so they have to go through the new transformation before
	// reading. As the buffers contain the untransformed form their contents
	// are not only useless but actually distorts our view of the system.
	//
	// To preserve the information without having to read them again and to
	// avoid problems with the location in the channel (seeking might be
	// impossible) we move the buffers from the common state structure into
	// the channel itself. We use the buffers in the channel below the new
	// transformation to hold the data. In the future this allows us to write
	// transformations which pre-read data and push the unused part back when
	// they are going away.

	if mask&(int32(1)<<1) != 0 && (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead != uintptr(0) {
		// When statePtr->inQueueHead is not NULL, we know
		// prevChanPtr->inQueueHead must be NULL.

		(*Channel)(unsafe.Pointer(prevChanPtr)).FinQueueHead = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
		(*Channel)(unsafe.Pointer(prevChanPtr)).FinQueueTail = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail

		(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = uintptr(0)
		(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = uintptr(0)
	}

	chanPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Channel{})))

	// Save some of the current state into the new structure, reinitialize the
	// parts which will stay with the transformation.
	//
	// Remarks:

	(*Channel)(unsafe.Pointer(chanPtr)).Fstate = statePtr
	(*Channel)(unsafe.Pointer(chanPtr)).FinstanceData = instanceData
	(*Channel)(unsafe.Pointer(chanPtr)).FtypePtr = typePtr
	(*Channel)(unsafe.Pointer(chanPtr)).FdownChanPtr = prevChanPtr
	(*Channel)(unsafe.Pointer(chanPtr)).FupChanPtr = uintptr(0)
	(*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead = uintptr(0)
	(*Channel)(unsafe.Pointer(chanPtr)).FinQueueTail = uintptr(0)
	(*Channel)(unsafe.Pointer(chanPtr)).FrefCount = 0

	// Place new block at the head of a possibly existing list of previously
	// stacked channels.

	(*Channel)(unsafe.Pointer(prevChanPtr)).FupChanPtr = chanPtr
	(*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr = chanPtr

	// TIP #218, Channel Thread Actions.
	//
	// We call the thread actions for the new channel directly. We _cannot_
	// use SpliceChannel, because the (thread-)global list of all channels
	// always contains the _ChannelState_ for a stack of channels, not the
	// individual channels. And SpliceChannel would not only call the thread
	// actions, but also add the shared ChannelState to this list a second
	// time, mangling it.

	sChanThreadAction(tls, chanPtr, 0)

	return chanPtr
}

func XTclChannelPreserve(tls *libc.TLS, chan1 Tcl_Channel) { /* tclIO.c:1965:1: */
	(*Channel)(unsafe.Pointer(chan1)).FrefCount++
}

func XTclChannelRelease(tls *libc.TLS, chan1 Tcl_Channel) { /* tclIO.c:1972:1: */
	var chanPtr uintptr = chan1

	if (*Channel)(unsafe.Pointer(chanPtr)).FrefCount == 0 {
		XTcl_Panic(tls, ts+33174, 0)
	}
	if libc.PreDecInt32(&(*Channel)(unsafe.Pointer(chanPtr)).FrefCount, 1) != 0 {
		return
	}
	if (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr == uintptr(0) {
		XTclpFree(tls, chanPtr)
	}
}

func sChannelFree(tls *libc.TLS, chanPtr uintptr) { /* tclIO.c:1989:1: */
	if (*Channel)(unsafe.Pointer(chanPtr)).FrefCount == 0 {
		XTclpFree(tls, chanPtr)
		return
	}
	(*Channel)(unsafe.Pointer(chanPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_UnstackChannel --
//
//	Unstacks an entry in the hash table for a Tcl_Channel record. This is
//	the reverse to 'Tcl_StackChannel'.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	If TCL_ERROR is returned, the posix error code will be set with
//	Tcl_SetErrno. May leave a message in interp result as well.
//
//----------------------------------------------------------------------

func XTcl_UnstackChannel(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel) int32 { /* tclIO.c:2018:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var chanPtr uintptr = chan1
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	var result int32 = 0

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	if (*Channel)(unsafe.Pointer(chanPtr)).FdownChanPtr != uintptr(0) {
		// Instead of manipulating the per-thread / per-interp list/hashtable
		// of registered channels we wind down the state of the
		// transformation, and then restore the state of underlying channel
		// into the old structure.
		//
		// TODO: Figure out how to handle the situation where the chan
		// operations called below by this unstacking operation cause
		// another unstacking recursively.  In that case the downChanPtr
		// value we're holding on to will not be the right thing.

		var downChanPtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).FdownChanPtr

		// Flush the buffers. This ensures that any data still in them at this
		// time _is_ handled by the transformation we are unstacking right
		// now. Restrict this to writable channels. Take care to hide a
		// possible bg-copy in progress from Tcl_Flush and the
		// CheckForChannelErrors inside.

		if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<2) != 0 {
			var csPtrR uintptr = (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR
			var csPtrW uintptr = (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW

			(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR = uintptr(0)
			(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW = uintptr(0)

			if XTcl_Flush(tls, chanPtr) != TCL_OK {
				(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR = csPtrR
				(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW = csPtrW

				// TIP #219, Tcl Channel Reflection API.
				// Move error messages put by the driver into the chan/ip
				// bypass area into the regular interpreter result. Fall back
				// to the regular message if nothing was found in the
				// bypasses.

				if !(XTclChanCaughtErrorBypass(tls, interp, chan1) != 0) && interp != 0 {
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
						ts+33145,
						libc.VaList(bp, XTcl_GetChannelName(tls, chanPtr))))
				}
				return TCL_ERROR
			}

			(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR = csPtrR
			(*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW = csPtrW
		}

		// Anything in the input queue and the push-back buffers of the
		// transformation going away is transformed data, but not yet read. As
		// unstacking means that the caller does not want to see transformed
		// data any more we have to discard these bytes. To avoid writing an
		// analogue to 'DiscardInputQueued' we move the information in the
		// push back buffers to the input queue and then call
		// 'DiscardInputQueued' on that.

		if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<1) != 0 && ((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead != uintptr(0) || (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead != uintptr(0)) {
			if (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead != uintptr(0) && (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead != uintptr(0) {
				(*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail)).FnextPtr = (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead
				(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = (*Channel)(unsafe.Pointer(chanPtr)).FinQueueTail
				(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail
			} else if (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead != uintptr(0) {
				(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead
				(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = (*Channel)(unsafe.Pointer(chanPtr)).FinQueueTail
			}

			(*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead = uintptr(0)
			(*Channel)(unsafe.Pointer(chanPtr)).FinQueueTail = uintptr(0)

			sDiscardInputQueued(tls, statePtr, 0)
		}

		// TIP #218, Channel Thread Actions.
		//
		// We call the thread actions for the new channel directly. We
		// _cannot_ use CutChannel, because the (thread-)global list of all
		// channels always contains the _ChannelState_ for a stack of
		// channels, not the individual channels. And SpliceChannel would not
		// only call the thread actions, but also remove the shared
		// ChannelState from this list despite there being more channels for
		// the state which are still active.

		sChanThreadAction(tls, chanPtr, 1)

		(*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr = downChanPtr
		(*Channel)(unsafe.Pointer(downChanPtr)).FupChanPtr = uintptr(0)

		// Leave this link intact for closeproc
		//  chanPtr->downChanPtr = NULL;

		// Close and free the channel driver state.

		result = sChanClose(tls, chanPtr, interp)
		sChannelFree(tls, chanPtr)

		sUpdateInterest(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr)

		if result != 0 {
			XTcl_SetErrno(tls, result)

			// TIP #219, Tcl Channel Reflection API.
			// Move error messages put by the driver into the chan/ip bypass
			// area into the regular interpreter result.

			XTclChanCaughtErrorBypass(tls, interp, chan1)
			return TCL_ERROR
		}
	} else {
		// This channel does not cover another one. Simply do a close, if
		// necessary.

		if (*ChannelState)(unsafe.Pointer(statePtr)).FrefCount <= 0 {
			if XTcl_Close(tls, interp, chan1) != TCL_OK {
				// TIP #219, Tcl Channel Reflection API.
				// "TclChanCaughtErrorBypass" is not required here, it was
				// done already by "Tcl_Close".

				return TCL_ERROR
			}
		}

		// TIP #218, Channel Thread Actions.
		// Not required in this branch, this is done by Tcl_Close. If
		// Tcl_Close is not called then the ChannelState is still active in
		// the thread and no action has to be taken either.
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetStackedChannel --
//
//	Determines whether the specified channel is stacked upon another.
//
// Results:
//	NULL if the channel is not stacked upon another one, or a reference to
//	the channel it is stacked upon. This reference can be used in queries,
//	but modification is not allowed.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetStackedChannel(tls *libc.TLS, chan1 Tcl_Channel) Tcl_Channel { /* tclIO.c:2206:1: */
	var chanPtr uintptr = chan1
	// The actual channel.

	return (*Channel)(unsafe.Pointer(chanPtr)).FdownChanPtr
}

//----------------------------------------------------------------------
//
// Tcl_GetTopChannel --
//
//	Returns the top channel of a channel stack.
//
// Results:
//	NULL if the channel is not stacked upon another one, or a reference to
//	the channel it is stacked upon. This reference can be used in queries,
//	but modification is not allowed.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetTopChannel(tls *libc.TLS, chan1 Tcl_Channel) Tcl_Channel { /* tclIO.c:2234:1: */
	var chanPtr uintptr = chan1
	// The actual channel.

	return (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).FtopChanPtr
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelInstanceData --
//
//	Returns the client data associated with a channel.
//
// Results:
//	The client data.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetChannelInstanceData(tls *libc.TLS, chan1 Tcl_Channel) ClientData { /* tclIO.c:2260:1: */
	var chanPtr uintptr = chan1
	// The actual channel.

	return (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelThread --
//
//	Given a channel structure, returns the thread managing it. TIP #10
//
// Results:
//	Returns the id of the thread managing the channel.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetChannelThread(tls *libc.TLS, chan1 Tcl_Channel) Tcl_ThreadId { /* tclIO.c:2286:1: */
	var chanPtr uintptr = chan1
	// The actual channel.

	return (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).FmanagingThread
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelType --
//
//	Given a channel structure, returns the channel type structure.
//
// Results:
//	Returns a pointer to the channel type structure.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetChannelType(tls *libc.TLS, chan1 Tcl_Channel) uintptr { /* tclIO.c:2312:23: */
	var chanPtr uintptr = chan1
	// The actual channel.

	return (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelMode --
//
//	Computes a mask indicating whether the channel is open for reading and
//	writing.
//
// Results:
//	An OR-ed combination of TCL_READABLE and TCL_WRITABLE.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetChannelMode(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:2340:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	// State of actual channel.

	return (*ChannelState)(unsafe.Pointer(statePtr)).Fflags & (int32(1)<<1 | int32(1)<<2)
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelName --
//
//	Returns the string identifying the channel name.
//
// Results:
//	The string containing the channel name. This memory is owned by the
//	generic layer and should not be modified by the caller.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetChannelName(tls *libc.TLS, chan1 Tcl_Channel) uintptr { /* tclIO.c:2367:12: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	// State of actual channel.

	return (*ChannelState)(unsafe.Pointer(statePtr)).FchannelName
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelHandle --
//
//	Returns an OS handle associated with a channel.
//
// Results:
//	Returns TCL_OK and places the handle in handlePtr, or returns
//	TCL_ERROR on failure.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetChannelHandle(tls *libc.TLS, chan1 Tcl_Channel, direction int32, handlePtr uintptr) int32 { /* tclIO.c:2395:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var chanPtr uintptr // The actual channel.
	// var handle ClientData at bp+8, 8

	var result int32

	chanPtr = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chan1)).Fstate)).FbottomChanPtr
	if !(int32((*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FgetHandleProc) != 0) {
		XTcl_SetChannelError(tls, chan1, XTcl_ObjPrintf(tls,
			ts+33211,
			libc.VaList(bp, XTcl_GetChannelName(tls, chan1))))
		return TCL_ERROR
	}
	result = (*struct {
		f func(*libc.TLS, ClientData, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FgetHandleProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, direction,
		bp+8)
	if handlePtr != 0 {
		*(*ClientData)(unsafe.Pointer(handlePtr)) = *(*ClientData)(unsafe.Pointer(bp + 8 /* handle */))
	}
	return result
}

//---------------------------------------------------------------------------
//
// AllocChannelBuffer --
//
//	A channel buffer has BUFFER_PADDING bytes extra at beginning to hold
//	any bytes of a native-encoding character that got split by the end of
//	the previous buffer and need to be moved to the beginning of the next
//	buffer to make a contiguous string so it can be converted to UTF-8.
//
//	A channel buffer has BUFFER_PADDING bytes extra at the end to hold any
//	bytes of a native-encoding character (generated from a UTF-8
//	character) that overflow past the end of the buffer and need to be
//	moved to the next buffer.
//
// Results:
//	A newly allocated channel buffer.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sAllocChannelBuffer(tls *libc.TLS, length int32) uintptr { /* tclIO.c:2443:22: */
	var bufPtr uintptr
	var n int32

	n = length + int32(uintptr(0)+24) + BUFFER_PADDING + BUFFER_PADDING
	bufPtr = XTcl_Alloc(tls, uint32(n))
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded = BUFFER_PADDING
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved = BUFFER_PADDING
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength = length + BUFFER_PADDING
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr = uintptr(0)
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FrefCount = 1
	return bufPtr
}

func sPreserveChannelBuffer(tls *libc.TLS, bufPtr uintptr) { /* tclIO.c:2461:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FrefCount == 0 {
		XTcl_Panic(tls, ts+33252, libc.VaList(bp, bufPtr))
	}
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FrefCount++
}

func sReleaseChannelBuffer(tls *libc.TLS, bufPtr uintptr) { /* tclIO.c:2471:1: */
	if libc.PreDecInt32(&(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FrefCount, 1) != 0 {
		return
	}
	XTclpFree(tls, bufPtr)
}

func sIsShared(tls *libc.TLS, bufPtr uintptr) int32 { /* tclIO.c:2481:1: */
	return libc.Bool32((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FrefCount > 1)
}

//----------------------------------------------------------------------
//
// RecycleBuffer --
//
//	Helper function to recycle input and output buffers. Ensures that two
//	input buffers are saved (one in the input queue and another in the
//	saveInBufPtr field) and that curOutPtr is set to a buffer. Only if
//	these conditions are met is the buffer freed to the OS.
//
// Results:
//	None.
//
// Side effects:
//	May free a buffer to the OS.
//
//----------------------------------------------------------------------

func sRecycleBuffer(tls *libc.TLS, statePtr uintptr, bufPtr uintptr, mustDiscard int32) { /* tclIO.c:2507:1: */
	// Do we have to free the buffer to the OS?

	if !(sIsShared(tls, bufPtr) != 0) {
		goto __1
	}
	mustDiscard = 1
__1:
	;

	if !(mustDiscard != 0) {
		goto __2
	}
	sReleaseChannelBuffer(tls, bufPtr)
	return
__2:
	;

	// Only save buffers which have the requested buffersize for the channel.
	// This is to honor dynamic changes of the buffersize made by the user.

	if !((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength-BUFFER_PADDING != (*ChannelState)(unsafe.Pointer(statePtr)).FbufSize) {
		goto __3
	}
	sReleaseChannelBuffer(tls, bufPtr)
	return
__3:
	;

	// Only save buffers for the input queue if the channel is readable.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<1) != 0) {
		goto __4
	}
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead == uintptr(0)) {
		goto __5
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = bufPtr
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = bufPtr
	goto keepBuffer
__5:
	;
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr == uintptr(0)) {
		goto __6
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr = bufPtr
	goto keepBuffer
__6:
	;
__4:
	;

	// Only save buffers for the output queue if the channel is writable.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<2) != 0) {
		goto __7
	}
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr == uintptr(0)) {
		goto __8
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr = bufPtr
	goto keepBuffer
__8:
	;
__7:
	;

	// If we reached this code we return the buffer to the OS.

	sReleaseChannelBuffer(tls, bufPtr)
	return

keepBuffer:
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved = BUFFER_PADDING
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded = BUFFER_PADDING
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DiscardOutputQueued --
//
//	Discards all output queued in the output queue of a channel.
//
// Results:
//	None.
//
// Side effects:
//	Recycles buffers.
//
//----------------------------------------------------------------------

func sDiscardOutputQueued(tls *libc.TLS, statePtr uintptr) { /* tclIO.c:2593:1: */
	var bufPtr uintptr

	for (*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead != uintptr(0) {
		bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead
		(*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
		sRecycleBuffer(tls, statePtr, bufPtr, 0)
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueTail = uintptr(0)
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr
	if bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded-(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved != 0 {
		(*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr = uintptr(0)
		sRecycleBuffer(tls, statePtr, bufPtr, 0)
	}
}

//----------------------------------------------------------------------
//
// CheckForDeadChannel --
//
//	This function checks is a given channel is Dead (a channel that has
//	been closed but not yet deallocated.)
//
// Results:
//	True (1) if channel is Dead, False (0) if channel is Ok
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func sCheckForDeadChannel(tls *libc.TLS, interp uintptr, statePtr uintptr) int32 { /* tclIO.c:2630:1: */
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<13) != 0) {
		return 0
	}

	XTcl_SetErrno(tls, EINVAL)
	if interp != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+33279, -1))
	}
	return 1
}

//----------------------------------------------------------------------
//
// FlushChannel --
//
//	This function flushes as much of the queued output as is possible now.
//	If calledFromAsyncFlush is nonzero, it is being called in an event
//	handler to flush channel output asynchronously.
//
// Results:
//	0 if successful, else the error code that was returned by the channel
//	type operation. May leave a message in the interp result.
//
// Side effects:
//	May produce output on a channel. May block indefinitely if the channel
//	is synchronous. May schedule an async flush on the channel. May
//	recycle memory for buffers in the output queue.
//
//----------------------------------------------------------------------

func sFlushChannel(tls *libc.TLS, interp uintptr, chanPtr uintptr, calledFromAsyncFlush int32) int32 { /* tclIO.c:2668:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var statePtr uintptr
	// State of the channel stack.
	var bufPtr uintptr // Iterates over buffered output queue.
	var written int32  // Amount of output data actually written in
	// current round.
	// var errorCode int32 at bp, 4
	// Stores POSIX error codes from channel
	// driver operations.
	var wroteSome int32
	// TIP #219, Tcl Channel Reflection API.
	// When defering the error copy a message from the bypass into
	// the unreported area. Or discard it if the new error is to
	// be ignored in favor of an earlier defered error.

	var msg uintptr
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	*(*int32)(unsafe.Pointer(bp /* errorCode */)) = 0
	wroteSome = 0 // Set to one if any data was written to the
	// driver.

	// Prevent writing on a dead channel -- a channel that has been closed but
	// not yet deallocated. This can occur if the exit handler for the channel
	// deallocation runs before all channels are deregistered in all
	// interpreters.

	if !(sCheckForDeadChannel(tls, interp, statePtr) != 0) {
		goto __1
	}
	return -1
__1:
	;

	// Should we shift the current output buffer over to the output queue?
	// First check that there are bytes in it.  If so then...
	//
	// If the output queue is empty, then yes, trusting the caller called us
	// only when written bytes ought to be flushed.
	//
	// If the current output buffer is full, then yes, so we can meet the
	// post-condition that on a successful return to caller we've left space
	// in the current output buffer for more writing (the flush call was to
	// make new room).
	//
	// If the channel is blocking, then yes, so we guarantee that blocking
	// flushes actually flush all pending data.
	//
	// Otherwise, no.  Keep the current output buffer where it is so more
	// can be written to it, possibly filling it, to promote more efficient
	// buffer usage.

	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr
	if !(bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded-(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved != 0 && ((*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead == uintptr(0) || bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded >= (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength ||
		!((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<3) != 0))) {
		goto __2
	}
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead == uintptr(0)) {
		goto __3
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead = bufPtr
	goto __4
__3:
	(*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueTail)).FnextPtr = bufPtr
__4:
	;
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueTail = bufPtr
	(*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr = uintptr(0)
__2:
	;

	// If we are not being called from an async flush and an async flush
	// is active, we just return without producing any output.

	if !(!(calledFromAsyncFlush != 0) && (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0) {
		goto __5
	}
	return 0
__5:
	;

	// Loop over the queued buffers and attempt to flush as much as possible
	// of the queued output to the channel.

	XTclChannelPreserve(tls, chanPtr)
__6:
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead != 0) {
		goto __7
	}
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead

	// Produce the output on the channel.

	sPreserveChannelBuffer(tls, bufPtr)
	written = sChanWrite(tls, chanPtr, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved), (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded-(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved,
		bp)

	// If the write failed completely attempt to start the asynchronous
	// flush mechanism and break out of this loop - do not attempt to
	// write any more output at this time.

	if !(written < 0) {
		goto __8
	}
	// If the last attempt to write was interrupted, simply retry.

	if !(*(*int32)(unsafe.Pointer(bp)) == EINTR) {
		goto __10
	}
	*(*int32)(unsafe.Pointer(bp /* errorCode */)) = 0
	sReleaseChannelBuffer(tls, bufPtr)
	goto __6
__10:
	;

	// If the channel is non-blocking and we would have blocked, start
	// a background flushing handler and break out of the loop.

	if !(*(*int32)(unsafe.Pointer(bp)) == EWOULDBLOCK || *(*int32)(unsafe.Pointer(bp)) == EAGAIN) {
		goto __11
	}
	// This used to check for CHANNEL_NONBLOCKING, and panic if
	// the channel was blocking. However, it appears that setting
	// stdin to -blocking 0 has some effect on the stdout when
	// it's a tty channel (dup'ed underneath)

	if !(!((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0) && !(XTclInExit(tls) != 0)) {
		goto __12
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 7
	sUpdateInterest(tls, chanPtr)
__12:
	;
	*(*int32)(unsafe.Pointer(bp /* errorCode */)) = 0
	sReleaseChannelBuffer(tls, bufPtr)
	goto __7
__11:
	;

	// Decide whether to report the error upwards or defer it.

	if !(calledFromAsyncFlush != 0) {
		goto __13
	}
	// TIP #219, Tcl Channel Reflection API.
	// When defering the error copy a message from the bypass into
	// the unreported area. Or discard it if the new error is to
	// be ignored in favor of an earlier defered error.

	msg = (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg

	if !((*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError == 0) {
		goto __15
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError = *(*int32)(unsafe.Pointer(bp /* errorCode */))
	(*ChannelState)(unsafe.Pointer(statePtr)).FunreportedMsg = msg
	if !(msg != uintptr(0)) {
		goto __17
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount++
__17:
	;
	goto __16
__15:
	// An old unreported error is kept, and this error thrown
	// away.

	(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = uintptr(0)
	if !(msg != uintptr(0)) {
		goto __18
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount, 1) > 1) {
		goto __19
	}
	goto __20
__19:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __21
	}

	if !((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes != XtclEmptyStringRep) {
		goto __23
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes)
__23:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = -1
__24:
	;
	*(*uintptr)(unsafe.Pointer(msg + 32)) = XtclFreeObjList
	XtclFreeObjList = msg
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	goto __22
__21:
	XTclFreeObj(tls, msg)
__22:
	;
__20:
	;

__18:
	;
__16:
	;
	goto __14
__13:
	// TIP #219, Tcl Channel Reflection API.
	// Move error messages put by the driver into the chan bypass
	// area into the regular interpreter result. Fall back to the
	// regular message if nothing was found in the bypasses.

	XTcl_SetErrno(tls, *(*int32)(unsafe.Pointer(bp /* errorCode */)))
	if !(interp != uintptr(0) && !(XTclChanCaughtErrorBypass(tls, interp,
		chanPtr) != 0)) {
		goto __27
	}
	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, XTcl_PosixError(tls, interp), -1))
__27:
	;

	// An unreportable bypassed message is kept, for the caller of
	// Tcl_Seek, Tcl_Write, etc.
__14:
	;

	// When we get an error we throw away all the output currently
	// queued.

	sDiscardOutputQueued(tls, statePtr)
	sReleaseChannelBuffer(tls, bufPtr)
	goto __7
	goto __9
__8:
	// TODO: Consider detecting and reacting to short writes on
	// blocking channels.  Ought not happen.  See iocmd-24.2.

	wroteSome = 1
__9:
	;

	*(*int32)(unsafe.Pointer(bufPtr + 8)) += written

	// If this buffer is now empty, recycle it.

	if !((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded == (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved) {
		goto __28
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead == uintptr(0)) {
		goto __29
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueTail = uintptr(0)
__29:
	;
	sRecycleBuffer(tls, statePtr, bufPtr, 0)
__28:
	;
	sReleaseChannelBuffer(tls, bufPtr)
	goto __6
__7:
	; // Closes "while".

	// If we wrote some data while flushing in the background, we are done.
	// We can't finish the background flush until we run out of data and the
	// channel becomes writable again. This ensures that all of the pending
	// data has been flushed at the system level.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0) {
		goto __30
	}
	if !(wroteSome != 0) {
		goto __31
	}
	goto done
	goto __32
__31:
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead == uintptr(0)) {
		goto __33
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 7)
	sChanWatch(tls, chanPtr, (*ChannelState)(unsafe.Pointer(statePtr)).FinterestMask)
	goto __34
__33:
	//
	//  When we are calledFromAsyncFlush, that means a writable
	//  state on the channel triggered the call, so we should be
	//  able to write something.  Either we did write something
	//  and wroteSome should be set, or there was nothing left to
	//  write in this call, and we've completed the BG flush.
	//  These are the two cases above.  If we get here, that means
	//  there is some kind failure in the writable event machinery.
	//
	//  The tls extension indeed suffers from flaws in its channel
	//  event mgmt.  See https://core.tcl-lang.org/tcl/info/c31ca233ca.
	//  Until that patch is broadly distributed, disable the
	//  assertion checking here, so that programs using Tcl and
	//  tls can be debugged.
	//
	// 	    assert(!calledFromAsyncFlush);
	//
	;
__34:
	;
__32:
	;
__30:
	;

	// If the channel is flagged as closed, delete it when the refCount drops
	// to zero, the output queue is empty and there is no output in the
	// current output buffer.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<8) != 0 && (*ChannelState)(unsafe.Pointer(statePtr)).FrefCount <= 0 && (*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead == uintptr(0) && ((*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr == uintptr(0) || (*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr)).FnextAdded == (*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr)).FnextRemoved)) {
		goto __35
	}
	*(*int32)(unsafe.Pointer(bp /* errorCode */)) = sCloseChannel(tls, interp, chanPtr, *(*int32)(unsafe.Pointer(bp /* errorCode */)))
	goto done
__35:
	;

	// If the write-side of the channel is flagged as closed, delete it when
	// the output queue is empty and there is no output in the current output
	// buffer.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<21) != 0 && (*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead == uintptr(0) && ((*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr == uintptr(0) || (*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr)).FnextAdded == (*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr)).FnextRemoved)) {
		goto __36
	}
	*(*int32)(unsafe.Pointer(bp /* errorCode */)) = sCloseChannelPart(tls, interp, chanPtr, *(*int32)(unsafe.Pointer(bp /* errorCode */)),
		int32(1)<<2)
	goto done
__36:
	;

done:
	XTclChannelRelease(tls, chanPtr)
	return *(*int32)(unsafe.Pointer(bp /* errorCode */))
}

//----------------------------------------------------------------------
//
// CloseChannel --
//
//	Utility procedure to close a channel and free associated resources.
//
//	If the channel was stacked, then the it will copy the necessary
//	elements of the NEXT channel into the TOP channel, in essence
//	unstacking the channel. The NEXT channel will then be freed.
//
//	If the channel was not stacked, then we will free all the bits for the
//	TOP channel, including the data structure itself.
//
// Results:
//	Error code from an unreported error or the driver close operation.
//
// Side effects:
//	May close the actual channel, may free memory, may change the value of
//	errno.
//
//----------------------------------------------------------------------

func sCloseChannel(tls *libc.TLS, interp uintptr, chanPtr uintptr, errorCode int32) int32 { /* tclIO.c:2973:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var result int32 = 0 // Of calling driver close operation.
	var statePtr uintptr // State of the channel stack.
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))

	if chanPtr == uintptr(0) {
		return result
	}
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	// No more input can be consumed so discard any leftover input.

	sDiscardInputQueued(tls, statePtr, 1)

	// Discard a leftover buffer in the current output buffer field.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr != uintptr(0) {
		sReleaseChannelBuffer(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr)
		(*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr = uintptr(0)
	}

	// The caller guarantees that there are no more buffers queued for output.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead != uintptr(0) {
		XTcl_Panic(tls, ts+33321, 0)
	}

	// If the EOF character is set in the channel, append that to the output
	// device.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar != 0 && (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<2) != 0 {
		// var dummy int32 at bp+4, 4

		*(*int8)(unsafe.Pointer(bp /* c */)) = int8((*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar)

		sChanWrite(tls, chanPtr, bp, 1, bp+4)
	}

	// TIP #219, Tcl Channel Reflection API.
	// Move a leftover error message in the channel bypass into the
	// interpreter bypass. Just clear it if there is no interpreter.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg != uintptr(0) {
		if interp != uintptr(0) {
			XTcl_SetChannelErrorInterp(tls, interp, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg + 32)) = XtclFreeObjList
					XtclFreeObjList = (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg
				}
			} else {
				XTclFreeObj(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
			}
		}

		(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = uintptr(0)
	}

	// Remove this channel from of the list of all channels.

	sCutChannel(tls, chanPtr)

	// Close and free the channel driver state.
	// This may leave a TIP #219 error message in the interp.

	result = sChanClose(tls, chanPtr, interp)

	// Some resources can be cleared only if the bottom channel in a stack is
	// closed. All the other channels in the stack are not allowed to remove.

	if chanPtr == (*ChannelState)(unsafe.Pointer(statePtr)).FbottomChanPtr {
		if (*ChannelState)(unsafe.Pointer(statePtr)).FchannelName != uintptr(0) {
			XTclpFree(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FchannelName)
			(*ChannelState)(unsafe.Pointer(statePtr)).FchannelName = uintptr(0)
		}

		XTcl_FreeEncoding(tls, (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding)
	}

	// If we are being called synchronously, report either any latent error on
	// the channel or the current error.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError != 0 {
		errorCode = (*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError

		// TIP #219, Tcl Channel Reflection API.
		// Move an error message found in the unreported area into the regular
		// bypass (interp). This kills any message in the channel bypass area.

		if (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg != uintptr(0) {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg + 32)) = XtclFreeObjList
						XtclFreeObjList = (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg
					}
				} else {
					XTclFreeObj(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
				}
			}

			(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = uintptr(0)
		}
		if interp != 0 {
			XTcl_SetChannelErrorInterp(tls, interp, (*ChannelState)(unsafe.Pointer(statePtr)).FunreportedMsg)
		}
	}
	if errorCode == 0 {
		errorCode = result
		if errorCode != 0 {
			XTcl_SetErrno(tls, errorCode)
		}
	}

	// Cancel any outstanding timer.

	XTcl_DeleteTimerHandler(tls, (*ChannelState)(unsafe.Pointer(statePtr)).Ftimer)

	// Mark the channel as deleted by clearing the type structure.

	if (*Channel)(unsafe.Pointer(chanPtr)).FdownChanPtr != uintptr(0) {
		var downChanPtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).FdownChanPtr

		(*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr = statePtr

		(*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr = downChanPtr
		(*Channel)(unsafe.Pointer(downChanPtr)).FupChanPtr = uintptr(0)

		sChannelFree(tls, chanPtr)

		return XTcl_Close(tls, interp, downChanPtr)
	}

	// There is only the TOP Channel, so we free the remaining pointers we
	// have and then ourselves. Since this is the last of the channels in the
	// stack, make sure to free the ChannelState structure associated with it.

	sChannelFree(tls, chanPtr)

	XTcl_EventuallyFree(tls, statePtr, uintptr(3))

	return errorCode
}

//----------------------------------------------------------------------
//
// Tcl_CutChannel --
// CutChannel --
//
//	Removes a channel from the (thread-)global list of all channels (in
//	that thread). This is actually the statePtr for the stack of channel.
//
// Results:
//	Nothing.
//
// Side effects:
//	Resets the field 'nextCSPtr' of the specified channel state to NULL.
//
// NOTE:
//	The channel to cut out of the list must not be referenced in any
//	interpreter. This is something this procedure cannot check (despite
//	the refcount) because the caller usually wants fiddle with the channel
//	(like transfering it to a different thread) and thus keeps the
//	refcount artifically high to prevent its destruction.
//
//----------------------------------------------------------------------

func sCutChannel(tls *libc.TLS, chan1 Tcl_Channel) { /* tclIO.c:3155:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	var prevCSPtr uintptr // Preceding channel state in list of all
	// states - used to splice a channel out of
	// the list on close.
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	// State of the channel stack.

	// Remove this channel from of the list of all channels (in the current
	// thread).

	if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr != 0 && statePtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr {
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr
	} else {
		for prevCSPtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr; prevCSPtr != 0 && (*ChannelState)(unsafe.Pointer(prevCSPtr)).FnextCSPtr != statePtr; prevCSPtr = (*ChannelState)(unsafe.Pointer(prevCSPtr)).FnextCSPtr {
			// Empty loop body.
		}
		if prevCSPtr == uintptr(0) {
			XTcl_Panic(tls, ts+33366, 0)
		}
		(*ChannelState)(unsafe.Pointer(prevCSPtr)).FnextCSPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr
	}

	(*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr = uintptr(0)

	// TIP #218, Channel Thread Actions

	sChanThreadAction(tls, chan1, 1)

	// Channel is not managed by any thread
	(*ChannelState)(unsafe.Pointer(statePtr)).FmanagingThread = uintptr(0)
}

func XTcl_CutChannel(tls *libc.TLS, chan1 Tcl_Channel) { /* tclIO.c:3198:1: */
	var chanPtr uintptr = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chan1)).Fstate)).FbottomChanPtr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	var prevCSPtr uintptr // Preceding channel state in list of all
	// states - used to splice a channel out of
	// the list on close.
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State of the channel stack.

	// Remove this channel from of the list of all channels (in the current
	// thread).

	if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr != 0 && statePtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr {
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr
	} else {
		for prevCSPtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr; prevCSPtr != 0 && (*ChannelState)(unsafe.Pointer(prevCSPtr)).FnextCSPtr != statePtr; prevCSPtr = (*ChannelState)(unsafe.Pointer(prevCSPtr)).FnextCSPtr {
			// Empty loop body.
		}
		if prevCSPtr == uintptr(0) {
			XTcl_Panic(tls, ts+33366, 0)
		}
		(*ChannelState)(unsafe.Pointer(prevCSPtr)).FnextCSPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr
	}

	(*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr = uintptr(0)

	// TIP #218, Channel Thread Actions
	// For all transformations and the base channel.

	for ; chanPtr != uintptr(0); chanPtr = (*Channel)(unsafe.Pointer(chanPtr)).FupChanPtr {
		sChanThreadAction(tls, chanPtr, 1)
	}

	// Channel is not managed by any thread
	(*ChannelState)(unsafe.Pointer(statePtr)).FmanagingThread = uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_SpliceChannel --
// SpliceChannel --
//
//	Adds a channel to the (thread-)global list of all channels (in that
//	thread). Expects that the field 'nextChanPtr' in the channel is set to
//	NULL.
//
// Results:
//	Nothing.
//
// Side effects:
//	Nothing.
//
// NOTE:
//	The channel to splice into the list must not be referenced in any
//	interpreter. This is something this procedure cannot check (despite
//	the refcount) because the caller usually wants figgle with the channel
//	(like transfering it to a different thread) and thus keeps the
//	refcount artifically high to prevent its destruction.
//
//----------------------------------------------------------------------

func sSpliceChannel(tls *libc.TLS, chan1 Tcl_Channel) { /* tclIO.c:3271:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate

	if (*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr != uintptr(0) {
		XTcl_Panic(tls, ts+33401, 0)
	}

	(*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr
	(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr = statePtr

	// TIP #10. Mark the current thread as the new one managing this channel.
	//		Note: 'Tcl_GetCurrentThread' returns sensible values even for
	//		a non-threaded core.

	(*ChannelState)(unsafe.Pointer(statePtr)).FmanagingThread = XTcl_GetCurrentThread(tls)

	// TIP #218, Channel Thread Actions

	sChanThreadAction(tls, chan1, 0)
}

func XTcl_SpliceChannel(tls *libc.TLS, chan1 Tcl_Channel) { /* tclIO.c:3301:1: */
	var chanPtr uintptr = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chan1)).Fstate)).FbottomChanPtr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	if (*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr != uintptr(0) {
		XTcl_Panic(tls, ts+33401, 0)
	}

	(*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr
	(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr = statePtr

	// TIP #10. Mark the current thread as the new one managing this channel.
	//		Note: 'Tcl_GetCurrentThread' returns sensible values even for
	//		a non-threaded core.

	(*ChannelState)(unsafe.Pointer(statePtr)).FmanagingThread = XTcl_GetCurrentThread(tls)

	// TIP #218, Channel Thread Actions
	// For all transformations and the base channel.

	for ; chanPtr != uintptr(0); chanPtr = (*Channel)(unsafe.Pointer(chanPtr)).FupChanPtr {
		sChanThreadAction(tls, chanPtr, 0)
	}
}

//----------------------------------------------------------------------
//
// Tcl_Close --
//
//	Closes a channel.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Closes the channel if this is the last reference.
//
// NOTE:
//	Tcl_Close removes the channel as far as the user is concerned.
//	However, it may continue to exist for a while longer if it has a
//	background flush scheduled. The device itself is eventually closed and
//	the channel record removed, in CloseChannel, above.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_Close(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel) int32 { /* tclIO.c:3358:1: */
	var cbPtr uintptr // Iterate over close callbacks for this
	// channel.
	var chanPtr uintptr  // The real IO channel.
	var statePtr uintptr // State of real IO channel.
	var result int32 = 0 // Of calling FlushChannel.
	var flushcode int32
	var stickyError int32

	if chan1 == uintptr(0) {
		return TCL_OK
	}

	// Perform special handling for standard channels being closed. If the
	// refCount is now 1 it means that the last reference to the standard
	// channel is being explicitly closed, so bump the refCount down
	// artificially to 0. This will ensure that the channel is actually
	// closed, below. Also set the static pointer to NULL for the channel.

	sCheckForStdChannelsBeingClosed(tls, chan1)

	// This operation should occur at the top of a channel stack.

	chanPtr = chan1
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	if (*ChannelState)(unsafe.Pointer(statePtr)).FrefCount > 0 {
		XTcl_Panic(tls, ts+33461, 0)
	}

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<19) != 0 {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

				ts+32657, -1))
		}
		return TCL_ERROR
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 19

	// When the channel has an escape sequence driven encoding such as
	// iso2022, the terminated escape sequence must write to the buffer.

	stickyError = 0

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<2) != 0 && (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding != uintptr(0) &&
		!((*ChannelState)(unsafe.Pointer(statePtr)).FoutputEncodingFlags&TCL_ENCODING_START != 0) {
		var code int32 = sCheckChannelErrors(tls, statePtr, int32(1)<<2)

		if code == 0 {
			*(*int32)(unsafe.Pointer(statePtr + 48)) |= TCL_ENCODING_END
			code = sWrite(tls, chanPtr, ts+2631, 0, (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).Fencoding)
			*(*int32)(unsafe.Pointer(statePtr + 48)) &= libc.CplInt32(TCL_ENCODING_END)
			*(*int32)(unsafe.Pointer(statePtr + 48)) |= TCL_ENCODING_START
		}
		if code < 0 {
			stickyError = XTcl_GetErrno(tls)
		}

		// TIP #219, Tcl Channel Reflection API.
		// Move an error message found in the channel bypass into the
		// interpreter bypass. Just clear it if there is no interpreter.

		if (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg != uintptr(0) {
			if interp != uintptr(0) {
				XTcl_SetChannelErrorInterp(tls, interp, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
			}
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg + 32)) = XtclFreeObjList
						XtclFreeObjList = (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg
					}
				} else {
					XTclFreeObj(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
				}
			}

			(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = uintptr(0)
		}
	}

	XTcl_ClearChannelHandlers(tls, chan1)

	// Invoke the registered close callbacks and delete their records.

	for (*ChannelState)(unsafe.Pointer(statePtr)).FcloseCbPtr != uintptr(0) {
		cbPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FcloseCbPtr
		(*ChannelState)(unsafe.Pointer(statePtr)).FcloseCbPtr = (*CloseCallback)(unsafe.Pointer(cbPtr)).FnextPtr
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*CloseCallback)(unsafe.Pointer(cbPtr)).Fproc})).f(tls, (*CloseCallback)(unsafe.Pointer(cbPtr)).FclientData)
		XTclpFree(tls, cbPtr)
	}

	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 19)

	// If this channel supports it, close the read side, since we don't need
	// it anymore and this will help avoid deadlocks on some channel types.

	if (*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FcloseProc == uintptr(1) {
		result = (*struct {
			f func(*libc.TLS, ClientData, uintptr, int32) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).Fclose2Proc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, interp,
			int32(1)<<1)
		if result == EINVAL || result == ENOTCONN {
			result = 0
		}
	}

	// The call to FlushChannel will flush any queued output and invoke the
	// close function of the channel driver, or it will set up the channel to
	// be flushed and closed asynchronously.

	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 8

	flushcode = sFlushChannel(tls, interp, chanPtr, 0)

	// TIP #219.
	// Capture error messages put by the driver into the bypass area and put
	// them into the regular interpreter result.
	//
	// Notes: Due to the assertion of CHANNEL_CLOSED in the flags
	// FlushChannel() has called CloseChannel() and thus freed all the channel
	// structures. We must not try to access "chan" anymore, hence the NULL
	// argument in the call below. The only place which may still contain a
	// message is the interpreter itself, and "CloseChannel" made sure to lift
	// any channel message it generated into it.

	if XTclChanCaughtErrorBypass(tls, interp, uintptr(0)) != 0 {
		result = EINVAL
	}

	if stickyError != 0 {
		XTcl_SetErrno(tls, stickyError)
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp,
				XTcl_NewStringObj(tls, XTcl_PosixError(tls, interp), -1))
		}
		return TCL_ERROR
	}

	// Bug 97069ea11a: set error message if a flush code is set and no error
	// message set up to now.

	if flushcode != 0 {
		// flushcode has precedence, if available
		result = flushcode
	}
	if result != 0 && result != TCL_ERROR && interp != uintptr(0) &&
		0 == XTcl_GetCharLength(tls, XTcl_GetObjResult(tls, interp)) {
		XTcl_SetErrno(tls, result)
		XTcl_SetObjResult(tls, interp,
			XTcl_NewStringObj(tls, XTcl_PosixError(tls, interp), -1))
	}
	if result != 0 {
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_CloseEx --
//
//	Closes one side of a channel, read or write.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Closes one direction of the channel.
//
// NOTE:
//	Tcl_CloseEx closes the specified direction of the channel as far as
//	the user is concerned. The channel keeps existing however. You cannot
//	call this function to close the last possible direction of the
//	channel. Use Tcl_Close for that.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_CloseEx(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel, flags int32) int32 { /* tclIO.c:3552:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var chanPtr uintptr  // The real IO channel.
	var statePtr uintptr // State of real IO channel.

	if chan1 == uintptr(0) {
		return TCL_OK
	}

	chanPtr = chan1
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	if flags&(int32(1)<<1|int32(1)<<2) == 0 {
		return XTcl_Close(tls, interp, chan1)
	}
	if flags&(int32(1)<<1|int32(1)<<2) == int32(1)<<1|int32(1)<<2 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+33507,
			libc.VaList(bp, (*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FtypeName)))
		return TCL_ERROR
	}

	// Does the channel support half-close anyway? Error if not.

	if !(int32((*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).Fclose2Proc) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+33553,
			libc.VaList(bp+8, (*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FtypeName)))
		return TCL_ERROR
	}

	// Is the channel unstacked ? If not we fail.

	if chanPtr != (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+33597, -1))
		return TCL_ERROR
	}

	// Check direction against channel mode. It is an error if we try to close
	// a direction not supported by the channel (already closed, or never
	// opened for that direction).

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<1|int32(1)<<2)&flags != 0) {
		var msg uintptr

		if flags&(int32(1)<<1) != 0 {
			msg = ts + 6057 /* "read" */
		} else {
			msg = ts + 33651 /* "write" */
		}
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

			ts+33657, libc.VaList(bp+16, msg)))
		return TCL_ERROR
	}

	// A user may try to call half-close from within a channel close handler.
	// That won't do.

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<19) != 0 {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

				ts+32657, -1))
		}
		return TCL_ERROR
	}

	if flags&(int32(1)<<1) != 0 {
		// Call the finalization code directly. There are no events to handle,
		// there cannot be for the read-side.

		return sCloseChannelPart(tls, interp, chanPtr, 0, flags)
	} else if flags&(int32(1)<<2) != 0 {
		XTcl_Preserve(tls, statePtr)
		if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0) {
			// We don't want to re-enter CloseWrite().

			if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<21) != 0) {
				if sCloseWrite(tls, interp, chanPtr) != TCL_OK {
					*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 21
					XTcl_Release(tls, statePtr)
					return TCL_ERROR
				}
			}
		}
		*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 21
		XTcl_Release(tls, statePtr)
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// CloseWrite --
//
//	Closes the write side a channel.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Closes the write side of the channel.
//
// NOTE:
//	CloseWrite removes the channel as far as the user is concerned.
//	However, the ooutput data structures may continue to exist for a while
//	longer if it has a background flush scheduled. The device itself is
//	eventually closed and the channel structures modified, in
//	CloseChannelPart, below.
//
//----------------------------------------------------------------------

func sCloseWrite(tls *libc.TLS, interp uintptr, chanPtr uintptr) int32 { /* tclIO.c:3686:1: */
	// Notes: clear-channel-handlers - write side only ? or keep around, just
	// not called.
	//
	// No close callbacks are run - channel is still open (read side)

	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State of real IO channel.
	var flushcode int32
	var result int32 = 0

	// The call to FlushChannel will flush any queued output and invoke the
	// close function of the channel driver, or it will set up the channel to
	// be flushed and closed asynchronously.

	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 21

	flushcode = sFlushChannel(tls, interp, chanPtr, 0)

	// TIP #219.
	// Capture error messages put by the driver into the bypass area and put
	// them into the regular interpreter result.
	//
	// Notes: Due to the assertion of CHANNEL_CLOSEDWRITE in the flags
	// FlushChannel() has called CloseChannelPart(). While we can still access
	// "chan" (no structures were freed), the only place which may still
	// contain a message is the interpreter itself, and "CloseChannelPart"
	// made sure to lift any channel message it generated into it. Hence the
	// NULL argument in the call below.

	if XTclChanCaughtErrorBypass(tls, interp, uintptr(0)) != 0 {
		result = EINVAL
	}

	if flushcode != 0 || result != 0 {
		return TCL_ERROR
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// CloseChannelPart --
//
//	Utility procedure to close a channel partially and free associated
//	resources. If the channel was stacked it will never be run (The higher
//	level forbid this). If the channel was not stacked, then we will free
//	all the bits of the chosen side (read, or write) for the TOP channel.
//
// Results:
//	Error code from an unreported error or the driver close2 operation.
//
// Side effects:
//	May free memory, may change the value of errno.
//
//----------------------------------------------------------------------

func sCloseChannelPart(tls *libc.TLS, interp uintptr, chanPtr uintptr, errorCode int32, flags int32) int32 { /* tclIO.c:3758:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var statePtr uintptr // State of real IO channel.
	var result int32     // Of calling the close2proc.

	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	if flags&(int32(1)<<1) != 0 {
		// No more input can be consumed so discard any leftover input.

		sDiscardInputQueued(tls, statePtr, 1)
	} else if flags&(int32(1)<<2) != 0 {
		// The caller guarantees that there are no more buffers queued for
		// output.

		if (*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead != uintptr(0) {
			XTcl_Panic(tls,
				ts+33727, 0)
		}

		// If the EOF character is set in the channel, append that to the
		// output device.

		if (*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar != 0 && (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<2) != 0 {
			// var dummy int32 at bp+4, 4

			*(*int8)(unsafe.Pointer(bp /* c */)) = int8((*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar)

			sChanWrite(tls, chanPtr, bp, 1, bp+4)
		}

		// TIP #219, Tcl Channel Reflection API.
		// Move a leftover error message in the channel bypass into the
		// interpreter bypass. Just clear it if there is no interpreter.

		if (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg != uintptr(0) {
			if interp != uintptr(0) {
				XTcl_SetChannelErrorInterp(tls, interp, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
			}
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg + 32)) = XtclFreeObjList
						XtclFreeObjList = (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg
					}
				} else {
					XTclFreeObj(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
				}
			}

			(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = uintptr(0)
		}
	}

	// Finally do what is asked of us. Close and free the channel driver state
	// for the chosen side of the channel. This may leave a TIP #219 error
	// message in the interp.

	result = (*struct {
		f func(*libc.TLS, ClientData, uintptr, int32) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).Fclose2Proc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, uintptr(0), flags)

	// If we are being called synchronously, report either any latent error on
	// the channel or the current error.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError != 0 {
		errorCode = (*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError

		// TIP #219, Tcl Channel Reflection API.
		// Move an error message found in the unreported area into the regular
		// bypass (interp). This kills any message in the channel bypass area.

		if (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg != uintptr(0) {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg + 32)) = XtclFreeObjList
						XtclFreeObjList = (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg
					}
				} else {
					XTclFreeObj(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
				}
			}

			(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = uintptr(0)
		}
		if interp != 0 {
			XTcl_SetChannelErrorInterp(tls, interp, (*ChannelState)(unsafe.Pointer(statePtr)).FunreportedMsg)
		}
	}
	if errorCode == 0 {
		errorCode = result
		if errorCode != 0 {
			XTcl_SetErrno(tls, errorCode)
		}
	}

	// TIP #219.
	// Capture error messages put by the driver into the bypass area and put
	// them into the regular interpreter result. See also the bottom of
	// CloseWrite().

	if XTclChanCaughtErrorBypass(tls, interp, chanPtr) != 0 {
		result = EINVAL
	}

	if result != 0 {
		return TCL_ERROR
	}

	// Remove the closed side from the channel mode/flags.

	*(*int32)(unsafe.Pointer(statePtr + 8)) &= ^(flags & (int32(1)<<1 | int32(1)<<2))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ClearChannelHandlers --
//
//	Removes all channel handlers and event scripts from the channel,
//	cancels all background copies involving the channel and any interest
//	in events.
//
// Results:
//	None.
//
// Side effects:
//	See above. Deallocates memory.
//
//----------------------------------------------------------------------

func XTcl_ClearChannelHandlers(tls *libc.TLS, channel Tcl_Channel) { /* tclIO.c:3893:1: */
	var chPtr uintptr
	var chNext uintptr // Iterate over channel handlers.
	var ePtr uintptr
	var eNextPtr uintptr // Iterate over eventscript records.
	var chanPtr uintptr  // The real IO channel.
	var statePtr uintptr // State of real IO channel.
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	var nhPtr uintptr

	// This operation should occur at the top of a channel stack.

	chanPtr = channel
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	// Cancel any outstanding timer.

	XTcl_DeleteTimerHandler(tls, (*ChannelState)(unsafe.Pointer(statePtr)).Ftimer)

	// Remove any references to channel handlers for this channel that may be
	// about to be invoked.

	for nhPtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FnestedHandlerPtr; nhPtr != uintptr(0); nhPtr = (*NextChannelHandler)(unsafe.Pointer(nhPtr)).FnestedHandlerPtr {
		if (*NextChannelHandler)(unsafe.Pointer(nhPtr)).FnextHandlerPtr != 0 && (*ChannelHandler)(unsafe.Pointer((*NextChannelHandler)(unsafe.Pointer(nhPtr)).FnextHandlerPtr)).FchanPtr == chanPtr {
			(*NextChannelHandler)(unsafe.Pointer(nhPtr)).FnextHandlerPtr = uintptr(0)
		}
	}

	// Remove all the channel handler records attached to the channel itself.

	for chPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FchPtr; chPtr != uintptr(0); chPtr = chNext {
		chNext = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr
		XTclpFree(tls, chPtr)
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FchPtr = uintptr(0)

	// Cancel any pending copy operation.

	sStopCopy(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR)
	sStopCopy(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW)

	// Must set the interest mask now to 0, otherwise infinite loops will
	// occur if Tcl_DoOneEvent is called before the channel is finally deleted
	// in FlushChannel. This can happen if the channel has a background flush
	// active.

	(*ChannelState)(unsafe.Pointer(statePtr)).FinterestMask = 0

	// Remove any EventScript records for this channel.

	for ePtr = (*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr; ePtr != uintptr(0); ePtr = eNextPtr {
		eNextPtr = (*EventScriptRecord)(unsafe.Pointer(ePtr)).FnextPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = (*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr
				}
			} else {
				XTclFreeObj(tls, (*EventScriptRecord)(unsafe.Pointer(ePtr)).FscriptPtr)
			}
		}

		XTclpFree(tls, ePtr)
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_Write --
//
//	Puts a sequence of bytes into an output buffer, may queue the buffer
//	for output if it gets full, and also remembers whether the current
//	buffer is ready e.g. if it contains a newline and we are in line
//	buffering mode. Compensates stacking, i.e. will redirect the data from
//	the specified channel to the topmost channel in a stack.
//
//	No encoding conversions are applied to the bytes being read.
//
// Results:
//	The number of bytes written or -1 in case of error. If -1,
//	Tcl_GetErrno will return the error code.
//
// Side effects:
//	May buffer up output and may cause output to be produced on the
//	channel.
//
//----------------------------------------------------------------------

func XTcl_Write(tls *libc.TLS, chan1 Tcl_Channel, src uintptr, srcLen int32) int32 { /* tclIO.c:3993:1: */
	// Always use the topmost channel of the stack

	var chanPtr uintptr
	var statePtr uintptr // State info for channel

	statePtr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	if sCheckChannelErrors(tls, statePtr, int32(1)<<2) != 0 {
		return -1
	}

	if srcLen < 0 {
		srcLen = int32(libc.Xstrlen(tls, src))
	}
	if sWrite(tls, chanPtr, src, srcLen, XtclIdentityEncoding) < 0 {
		return -1
	}
	return srcLen
}

//----------------------------------------------------------------------
//
// Tcl_WriteRaw --
//
//	Puts a sequence of bytes into an output buffer, may queue the buffer
//	for output if it gets full, and also remembers whether the current
//	buffer is ready e.g. if it contains a newline and we are in line
//	buffering mode. Writes directly to the driver of the channel, does not
//	compensate for stacking.
//
//	No encoding conversions are applied to the bytes being read.
//
// Results:
//	The number of bytes written or -1 in case of error. If -1,
//	Tcl_GetErrno will return the error code.
//
// Side effects:
//	May buffer up output and may cause output to be produced on the
//	channel.
//
//----------------------------------------------------------------------

func XTcl_WriteRaw(tls *libc.TLS, chan1 Tcl_Channel, src uintptr, srcLen int32) int32 { /* tclIO.c:4047:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var chanPtr uintptr = chan1
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	// var errorCode int32 at bp, 4

	var written int32

	if sCheckChannelErrors(tls, statePtr, int32(1)<<2|int32(1)<<16) != 0 {
		return -1
	}

	if srcLen < 0 {
		srcLen = int32(libc.Xstrlen(tls, src))
	}

	// Go immediately to the driver, do all the error handling by ourselves.
	// The code was stolen from 'FlushChannel'.

	written = sChanWrite(tls, chanPtr, src, srcLen, bp)
	if written < 0 {
		XTcl_SetErrno(tls, *(*int32)(unsafe.Pointer(bp /* errorCode */)))
	}

	return written
}

//---------------------------------------------------------------------------
//
// Tcl_WriteChars --
//
//	Takes a sequence of UTF-8 characters and converts them for output
//	using the channel's current encoding, may queue the buffer for output
//	if it gets full, and also remembers whether the current buffer is
//	ready e.g. if it contains a newline and we are in line buffering
//	mode. Compensates stacking, i.e. will redirect the data from the
//	specified channel to the topmost channel in a stack.
//
// Results:
//	The number of bytes written or -1 in case of error. If -1,
//	Tcl_GetErrno will return the error code.
//
// Side effects:
//	May buffer up output and may cause output to be produced on the
//	channel.
//
//----------------------------------------------------------------------

func XTcl_WriteChars(tls *libc.TLS, chan1 Tcl_Channel, src uintptr, len int32) int32 { /* tclIO.c:4103:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)
	*(*int32)(unsafe.Pointer(bp)) = len

	var chanPtr uintptr = chan1
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate // State info for channel
	var result int32
	var objPtr uintptr

	if sCheckChannelErrors(tls, statePtr, int32(1)<<2) != 0 {
		return -1
	}

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	if *(*int32)(unsafe.Pointer(bp)) < 0 {
		*(*int32)(unsafe.Pointer(bp /* len */)) = int32(libc.Xstrlen(tls, src))
	}
	if (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding != 0 {
		return sWrite(tls, chanPtr, src, *(*int32)(unsafe.Pointer(bp /* len */)), (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).Fencoding)
	}

	// Inefficient way to convert UTF-8 to byte-array, but the code
	// parallels the way it is done for objects.  Special case for 1-byte
	// (used by eg [puts] for the \n) could be extended to more efficient
	// translation of the src string.

	if *(*int32)(unsafe.Pointer(bp)) == 1 && int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0xC0 {
		return sWrite(tls, chanPtr, src, *(*int32)(unsafe.Pointer(bp /* len */)), XtclIdentityEncoding)
	}

	objPtr = XTcl_NewStringObj(tls, src, *(*int32)(unsafe.Pointer(bp /* len */)))
	src = XTcl_GetByteArrayFromObj(tls, objPtr, bp)
	result = sWrite(tls, chanPtr, src, *(*int32)(unsafe.Pointer(bp /* len */)), XtclIdentityEncoding)
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = objPtr
			}
		} else {
			XTclFreeObj(tls, objPtr)
		}
	}

	return result
}

//---------------------------------------------------------------------------
//
// Tcl_WriteObj --
//
//	Takes the Tcl object and queues its contents for output. If the
//	encoding of the channel is NULL, takes the byte-array representation
//	of the object and queues those bytes for output. Otherwise, takes the
//	characters in the UTF-8 (string) representation of the object and
//	converts them for output using the channel's current encoding. May
//	flush internal buffers to output if one becomes full or is ready for
//	some other reason, e.g. if it contains a newline and the channel is in
//	line buffering mode.
//
// Results:
//	The number of bytes written or -1 in case of error. If -1,
//	Tcl_GetErrno() will return the error code.
//
// Side effects:
//	May buffer up output and may cause output to be produced on the
//	channel.
//
//----------------------------------------------------------------------

func XTcl_WriteObj(tls *libc.TLS, chan1 Tcl_Channel, objPtr uintptr) int32 { /* tclIO.c:4172:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// Always use the topmost channel of the stack

	var chanPtr uintptr
	var statePtr uintptr // State info for channel
	var src uintptr
	// var srcLen int32 at bp, 4

	statePtr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	if sCheckChannelErrors(tls, statePtr, int32(1)<<2) != 0 {
		return -1
	}
	if (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding == uintptr(0) {
		src = XTcl_GetByteArrayFromObj(tls, objPtr, bp)
		return sWrite(tls, chanPtr, src, *(*int32)(unsafe.Pointer(bp /* srcLen */)), XtclIdentityEncoding)
	} else {
		src = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, objPtr, bp)
		}()
		return sWrite(tls, chanPtr, src, *(*int32)(unsafe.Pointer(bp /* srcLen */)), (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).Fencoding)
	}
	return int32(0)
}

func sWillWrite(tls *libc.TLS, chanPtr uintptr) { /* tclIO.c:4201:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var inputBuffered int32

	if XTcl_ChannelSeekProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr) != uintptr(0) && libc.AssignInt32(&inputBuffered, XTcl_InputBuffered(tls, chanPtr)) > 0 {
		// var ignore int32 at bp, 4

		sDiscardInputQueued(tls, (*Channel)(unsafe.Pointer(chanPtr)).Fstate, 0)
		sChanSeek(tls, chanPtr, int64(-inputBuffered), SEEK_CUR, bp)
	}
}

func sWillRead(tls *libc.TLS, chanPtr uintptr) int32 { /* tclIO.c:4216:1: */
	if (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr == uintptr(0) {
		// Prevent read attempts on a closed channel.

		sDiscardInputQueued(tls, (*Channel)(unsafe.Pointer(chanPtr)).Fstate, 0)
		XTcl_SetErrno(tls, EINVAL)
		return -1
	}
	if XTcl_ChannelSeekProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr) != uintptr(0) &&
		XTcl_OutputBuffered(tls, chanPtr) > 0 {

		// CAVEAT - The assumption here is that FlushChannel() will push out
		// the bytes of any writes that are in progress.  Since this is a
		// seekable channel, we assume it is not one that can block and force
		// bg flushing.  Channels we know that can do that - sockets, pipes -
		// are not seekable. If the assumption is wrong, more drastic measures
		// may be required here like temporarily setting the channel into
		// blocking mode.

		if sFlushChannel(tls, uintptr(0), chanPtr, 0) != 0 {
			return -1
		}
	}
	return 0
}

//----------------------------------------------------------------------
//
// Write --
//
//	Convert srcLen bytes starting at src according to encoding and write
//	produced bytes into an output buffer, may queue the buffer for output
//	if it gets full, and also remembers whether the current buffer is
//	ready e.g. if it contains a newline and we are in line buffering mode.
//
// Results:
//	The number of bytes written or -1 in case of error. If -1,
//	Tcl_GetErrno will return the error code.
//
// Side effects:
//	May buffer up output and may cause output to be produced on the
//	channel.
//
//----------------------------------------------------------------------

func sWrite(tls *libc.TLS, chanPtr uintptr, src uintptr, srcLen int32, encoding Tcl_Encoding) int32 { /* tclIO.c:4270:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var nextNewLine uintptr = uintptr(0)
	var endEncoding int32
	var saved int32 = 0
	var total int32 = 0
	var flushed int32 = 0
	var needNlFlush int32 = 0
	// var safe [16]int8 at bp, 16

	if srcLen != 0 {
		sWillWrite(tls, chanPtr)
	}

	// Write the terminated escape sequence even if srcLen is 0.

	endEncoding = libc.Bool32((*ChannelState)(unsafe.Pointer(statePtr)).FoutputEncodingFlags&TCL_ENCODING_END != 0)

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<4) != 0 ||
		(*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation != TCL_TRANSLATE_LF {
		nextNewLine = libc.Xmemchr(tls, src, '\n', uint64(srcLen))
	}

	for srcLen+saved+endEncoding > 0 {
		var bufPtr uintptr
		var dst uintptr
		var result int32
		// var srcRead int32 at bp+16, 4

		var dstLen int32
		// var dstWrote int32 at bp+20, 4

		var srcLimit int32 = srcLen

		if nextNewLine != 0 {
			srcLimit = int32((int64(nextNewLine) - int64(src)) / 1)
		}

		// Get space to write into
		bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr
		if bufPtr == uintptr(0) {
			bufPtr = sAllocChannelBuffer(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FbufSize)
			(*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr = bufPtr
		}
		if saved != 0 {
			// Here's some translated bytes left over from the last buffer
			// that we need to stick at the beginning of this buffer.

			libc.Xmemcpy(tls, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded), bp, uint64(saved))
			*(*int32)(unsafe.Pointer(bufPtr + 4)) += saved
			saved = 0
		}
		sPreserveChannelBuffer(tls, bufPtr)
		dst = bufPtr + 24 + uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded)
		dstLen = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded

		result = XTcl_UtfToExternal(tls, uintptr(0), encoding, src, srcLimit,
			(*ChannelState)(unsafe.Pointer(statePtr)).FoutputEncodingFlags,
			statePtr+40, dst,
			dstLen+BUFFER_PADDING, bp+16, bp+20, uintptr(0))

		// See chan-io-1.[89]. Tcl Bug 506297.

		*(*int32)(unsafe.Pointer(statePtr + 48)) &= libc.CplInt32(TCL_ENCODING_START)

		if result != TCL_OK && *(*int32)(unsafe.Pointer(bp + 16))+*(*int32)(unsafe.Pointer(bp + 20)) == 0 {
			// We're reading from invalid/incomplete UTF-8.

			sReleaseChannelBuffer(tls, bufPtr)
			if total == 0 {
				XTcl_SetErrno(tls, EINVAL)
				return -1
			}
			break
		}

		*(*int32)(unsafe.Pointer(bufPtr + 4)) += *(*int32)(unsafe.Pointer(bp + 20))
		src += uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* srcRead */)))
		srcLen = srcLen - *(*int32)(unsafe.Pointer(bp + 16))
		total = total + *(*int32)(unsafe.Pointer(bp + 20))
		dst += uintptr(*(*int32)(unsafe.Pointer(bp + 20 /* dstWrote */)))
		dstLen = dstLen - *(*int32)(unsafe.Pointer(bp + 20))

		if src == nextNewLine && dstLen > 0 {
			var nl uintptr = uintptr(0)
			var nlLen int32 = 0

			switch (*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation {
			case TCL_TRANSLATE_LF:
				nl = uintptr(unsafe.Pointer(&crln)) + uintptr(1)
				nlLen = 1
				break
				fallthrough
			case TCL_TRANSLATE_CR:
				nl = uintptr(unsafe.Pointer(&crln))
				nlLen = 1
				break
				fallthrough
			case TCL_TRANSLATE_CRLF:
				nl = uintptr(unsafe.Pointer(&crln))
				nlLen = 2
				break
				fallthrough
			default:
				XTcl_Panic(tls, ts+33791, 0)
				break
			}

			result = result | XTcl_UtfToExternal(tls, uintptr(0), encoding, nl, nlLen,
				(*ChannelState)(unsafe.Pointer(statePtr)).FoutputEncodingFlags,
				statePtr+40, dst,
				dstLen+BUFFER_PADDING, bp+16, bp+20, uintptr(0))

			*(*int32)(unsafe.Pointer(bufPtr + 4)) += *(*int32)(unsafe.Pointer(bp + 20))
			src++
			srcLen--
			total = total + *(*int32)(unsafe.Pointer(bp + 20))
			dst += uintptr(*(*int32)(unsafe.Pointer(bp + 20 /* dstWrote */)))
			dstLen = dstLen - *(*int32)(unsafe.Pointer(bp + 20))
			nextNewLine = libc.Xmemchr(tls, src, '\n', uint64(srcLen))
			needNlFlush = 1
		}

		if (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded > (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength {
			// When translating from UTF-8 to external encoding, we allowed
			// the translation to produce a character that crossed the end of
			// the output buffer, so that we would get a completely full
			// buffer before flushing it. The extra bytes will be moved to the
			// beginning of the next buffer.

			saved = -((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded)
			libc.Xmemcpy(tls, bp, dst+uintptr(dstLen), uint64(saved))
			(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength
		}

		if srcLen+saved == 0 && result == TCL_OK {
			endEncoding = 0
		}

		if bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded >= (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength {
			if sFlushChannel(tls, uintptr(0), chanPtr, 0) != 0 {
				sReleaseChannelBuffer(tls, bufPtr)
				return -1
			}
			flushed = flushed + (*ChannelState)(unsafe.Pointer(statePtr)).FbufSize

			// We just flushed.  So if we have needNlFlush set to record that
			// we need to flush because theres a (translated) newline in the
			// buffer, that's likely not true any more.  But there is a tricky
			// exception.  If we have saved bytes that did not really get
			// flushed and those bytes came from a translation of a newline as
			// the last thing taken from the src array, then needNlFlush needs
			// to remain set to flag that the next buffer still needs a
			// newline flush.

			if needNlFlush != 0 && (saved == 0 || int32(*(*int8)(unsafe.Pointer(src + libc.UintptrFromInt32(-1)))) != '\n') {
				needNlFlush = 0
			}
		}
		sReleaseChannelBuffer(tls, bufPtr)
	}
	if flushed < total && ((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<5) != 0 || needNlFlush != 0 && (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<4) != 0) {
		if sFlushChannel(tls, uintptr(0), chanPtr, 0) != 0 {
			return -1
		}
	}

	return total
}

var crln = *(*[3]int8)(unsafe.Pointer(ts + 33828)) /* tclIO.c:4358:18 */

//---------------------------------------------------------------------------
//
// Tcl_Gets --
//
//	Reads a complete line of input from the channel into a Tcl_DString.
//
// Results:
//	Length of line read (in characters) or -1 if error, EOF, or blocked.
//	If -1, use Tcl_GetErrno() to retrieve the POSIX error code for the
//	error or condition that occurred.
//
// Side effects:
//	May flush output on the channel. May cause input to be consumed from
//	the channel.
//
//---------------------------------------------------------------------------

func XTcl_Gets(tls *libc.TLS, chan1 Tcl_Channel, lineRead uintptr) int32 { /* tclIO.c:4468:1: */
	var objPtr uintptr
	var charsStored int32

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	charsStored = XTcl_GetsObj(tls, chan1, objPtr)
	if charsStored > 0 {
		XTclDStringAppendObj(tls, lineRead, objPtr)
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = objPtr
			}
		} else {
			XTclFreeObj(tls, objPtr)
		}
	}

	return charsStored
}

//---------------------------------------------------------------------------
//
// Tcl_GetsObj --
//
//	Accumulate input from the input channel until end-of-line or
//	end-of-file has been seen. Bytes read from the input channel are
//	converted to UTF-8 using the encoding specified by the channel.
//
// Results:
//	Number of characters accumulated in the object or -1 if error,
//	blocked, or EOF. If -1, use Tcl_GetErrno() to retrieve the POSIX error
//	code for the error or condition that occurred.
//
// Side effects:
//	Consumes input from the channel.
//
//	On reading EOF, leave channel pointing at EOF char. On reading EOL,
//	leave channel pointing after EOL, but don't return EOL in dst buffer.
//
//---------------------------------------------------------------------------

func XTcl_GetsObj(tls *libc.TLS, chan1 Tcl_Channel, objPtr uintptr) int32 { /* tclIO.c:4511:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	// var gs GetsState at bp+16, 56

	var chanPtr uintptr
	var statePtr uintptr
	// State info for channel
	var bufPtr uintptr
	var inEofChar int32
	var skip int32
	var copiedTotal int32
	// var oldLength int32 at bp, 4

	var oldFlags int32
	var oldRemoved int32
	var encoding Tcl_Encoding
	// var dst uintptr at bp+8, 8

	// var dstEnd uintptr at bp+80, 8

	var eol uintptr
	var eof uintptr
	var oldState Tcl_EncodingState
	var offset int32
	// Skip the raw bytes that make up the '\n'.

	// var rawRead int32 at bp+76, 4

	// var tmp [3]int8 at bp+72, 3

	var offset1 int32
	chanPtr = chan1
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	if !(sCheckChannelErrors(tls, statePtr, int32(1)<<1) != 0) {
		goto __1
	}
	return -1
__1:
	;

	// If we're sitting ready to read the eofchar, there's no need to
	// do it.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<10) != 0) {
		goto __2
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 9

	// TODO: Do we need this?
	sUpdateInterest(tls, chanPtr)
	return -1
__2:
	;

	// A binary version of Tcl_GetsObj. This could also handle encodings that
	// are ascii-7 pure (iso8859, utf-8, ...) with a final encoding conversion
	// done on objPtr.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fencoding == uintptr(0) &&
		((*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation == TCL_TRANSLATE_LF ||
			(*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation == TCL_TRANSLATE_CR)) {
		goto __3
	}
	return sTclGetsObjBinary(tls, chan1, objPtr)
__3:
	;

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
	XTclChannelPreserve(tls, chanPtr)

	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
	encoding = (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding

	// Preserved so we can restore the channel's state in case we don't find a
	// newline in the available input.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
		*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
		_ = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
	} else {
		XTcl_GetStringFromObj(tls, objPtr, bp)
	}
	oldFlags = (*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags
	oldState = (*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState
	oldRemoved = BUFFER_PADDING
	if !(bufPtr != uintptr(0)) {
		goto __4
	}
	oldRemoved = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved
__4:
	;

	// If there is no encoding, use "iso8859-1" -- Tcl_GetsObj() doesn't
	// produce ByteArray objects.

	if !(encoding == uintptr(0)) {
		goto __5
	}
	encoding = sGetBinaryEncoding(tls)
__5:
	;

	// Object used by FilterInputBytes to keep track of how much data has been
	// consumed from the channel buffers.

	(*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).FobjPtr = objPtr
	(*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).FdstPtr = bp + 8 /* &dst */
	(*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).Fencoding = encoding
	(*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).FbufPtr = bufPtr
	(*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).Fstate = oldState
	(*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).FrawRead = 0
	(*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).FbytesWrote = 0
	(*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).FcharsWrote = 0
	(*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).FtotalChars = 0

	*(*uintptr)(unsafe.Pointer(bp + 8 /* dst */)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(*(*int32)(unsafe.Pointer(bp)))
	*(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* dst */))

	skip = 0
	eof = uintptr(0)
	inEofChar = (*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar

	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 11)
__6:
	if !(1 != 0) {
		goto __7
	}
	if !(*(*uintptr)(unsafe.Pointer(bp + 8)) >= *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __8
	}
	if !(sFilterInputBytes(tls, chanPtr, bp+16) != 0) {
		goto __9
	}
	goto restore
__9:
	;
	*(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */)) = *(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr((*GetsState)(unsafe.Pointer(bp+16)).FbytesWrote)
__8:
	;

	// Remember if EOF char is seen, then look for EOL anyhow, because the
	// EOL might be before the EOF char.

	if !(inEofChar != 0) {
		goto __10
	}
	eol = *(*uintptr)(unsafe.Pointer(bp + 8 /* dst */))
__11:
	if !(eol < *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __13
	}
	if !(int32(*(*int8)(unsafe.Pointer(eol))) == inEofChar) {
		goto __14
	}
	*(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */)) = eol
	eof = eol
	goto __13
__14:
	;
	goto __12
__12:
	eol++
	goto __11
	goto __13
__13:
	;
__10:
	;

	// On EOL, leave current file position pointing after the EOL, but
	// don't store the EOL in the output string.

	switch (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation {
	case TCL_TRANSLATE_LF:
		goto __16
	case TCL_TRANSLATE_CR:
		goto __17
	case TCL_TRANSLATE_CRLF:
		goto __18
	case TCL_TRANSLATE_AUTO:
		goto __19
	}
	goto __15
__16:
	eol = *(*uintptr)(unsafe.Pointer(bp + 8 /* dst */))
__20:
	if !(eol < *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __22
	}
	if !(int32(*(*int8)(unsafe.Pointer(eol))) == '\n') {
		goto __23
	}
	skip = 1
	goto gotEOL
__23:
	;
	goto __21
__21:
	eol++
	goto __20
	goto __22
__22:
	;
	goto __15
__17:
	eol = *(*uintptr)(unsafe.Pointer(bp + 8 /* dst */))
__24:
	if !(eol < *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __26
	}
	if !(int32(*(*int8)(unsafe.Pointer(eol))) == '\r') {
		goto __27
	}
	skip = 1
	goto gotEOL
__27:
	;
	goto __25
__25:
	eol++
	goto __24
	goto __26
__26:
	;
	goto __15
__18:
	eol = *(*uintptr)(unsafe.Pointer(bp + 8 /* dst */))
__28:
	if !(eol < *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __30
	}
	if !(int32(*(*int8)(unsafe.Pointer(eol))) == '\r') {
		goto __31
	}
	eol++

	// If a CR is at the end of the buffer, then check for a
	// LF at the begining of the next buffer, unless EOF char
	// was found already.

	if !(eol >= *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __32
	}

	if !(eol != eof) {
		goto __33
	}
	offset = int32((int64(eol) - int64((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)) / 1)
	*(*uintptr)(unsafe.Pointer(bp + 8 /* dst */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */))
	if !(sFilterInputBytes(tls, chanPtr, bp+16) != 0) {
		goto __34
	}
	goto restore
__34:
	;
	*(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */)) = *(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr((*GetsState)(unsafe.Pointer(bp+16)).FbytesWrote)
	eol = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(offset)
__33:
	;
	if !(eol >= *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __35
	}
	skip = 0
	goto gotEOL
__35:
	;
__32:
	;
	if !(int32(*(*int8)(unsafe.Pointer(eol))) == '\n') {
		goto __36
	}
	eol--
	skip = 2
	goto gotEOL
__36:
	;
__31:
	;
	goto __29
__29:
	eol++
	goto __28
	goto __30
__30:
	;
	goto __15
__19:
	eol = *(*uintptr)(unsafe.Pointer(bp + 8 /* dst */))
	skip = 1
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<12) != 0) {
		goto __37
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 12)
	if !(eol < *(*uintptr)(unsafe.Pointer(bp + 80)) && int32(*(*int8)(unsafe.Pointer(eol))) == '\n') {
		goto __38
	}

	bufPtr = (*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).FbufPtr
	XTcl_ExternalToUtf(tls, uintptr(0), (*GetsState)(unsafe.Pointer(bp+16 /* &gs */)).Fencoding, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved),
		(*GetsState)(unsafe.Pointer(bp+16 /* &gs */)).FrawRead, (*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags|
			TCL_ENCODING_NO_TERMINATE, bp+16+32, bp+72,
		int32(unsafe.Sizeof([3]int8{})), bp+76, uintptr(0), uintptr(0))
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += *(*int32)(unsafe.Pointer(bp + 76))
	*(*int32)(unsafe.Pointer(bp + 16 + 40)) -= *(*int32)(unsafe.Pointer(bp + 76))
	(*GetsState)(unsafe.Pointer(bp+16 /* &gs */)).FbytesWrote--
	(*GetsState)(unsafe.Pointer(bp+16 /* &gs */)).FcharsWrote--
	libc.Xmemmove(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* dst */)), *(*uintptr)(unsafe.Pointer(bp + 8))+uintptr(1), uint64((int64(*(*uintptr)(unsafe.Pointer(bp + 80)))-int64(*(*uintptr)(unsafe.Pointer(bp + 8))))/1))
	*(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */))--
__38:
	;
__37:
	;
	eol = *(*uintptr)(unsafe.Pointer(bp + 8 /* dst */))
__39:
	if !(eol < *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __41
	}
	if !(int32(*(*int8)(unsafe.Pointer(eol))) == '\r') {
		goto __42
	}
	eol++
	if !(eol == *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __44
	}
	// If buffer ended on \r, peek ahead to see if a \n is
	// available, unless EOF char was found already.

	if !(eol != eof) {
		goto __45
	}

	offset1 = int32((int64(eol) - int64((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)) / 1)
	*(*uintptr)(unsafe.Pointer(bp + 8 /* dst */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */))
	sPeekAhead(tls, chanPtr, bp+80, bp+16)
	eol = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(offset1)
__45:
	;

	if !(eol >= *(*uintptr)(unsafe.Pointer(bp + 80))) {
		goto __46
	}
	eol--
	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 12
	goto gotEOL
__46:
	;
__44:
	;
	if !(int32(*(*int8)(unsafe.Pointer(eol))) == '\n') {
		goto __47
	}
	skip++
__47:
	;
	eol--
	goto gotEOL
	goto __43
__42:
	if !(int32(*(*int8)(unsafe.Pointer(eol))) == '\n') {
		goto __48
	}
	goto gotEOL
__48:
	;
__43:
	;
	goto __40
__40:
	eol++
	goto __39
	goto __41
__41:
	;
__15:
	;
	if !(eof != uintptr(0)) {
		goto __49
	}
	// EOF character was seen. On EOF, leave current file position
	// pointing at the EOF character, but don't store the EOF
	// character in the output string.

	*(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */)) = eof
	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1)<<9 | int32(1)<<10
	*(*int32)(unsafe.Pointer(statePtr + 32)) |= TCL_ENCODING_END
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<11 | int32(1)<<12)
__49:
	;
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0) {
		goto __50
	}
	skip = 0
	eol = *(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */))
	if !(eol == (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes+uintptr(*(*int32)(unsafe.Pointer(bp)))) {
		goto __51
	}
	// If we didn't append any bytes before encountering EOF,
	// caller needs to see -1.

	XTcl_SetObjLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp /* oldLength */)))
	sCommonGetsCleanup(tls, chanPtr)
	copiedTotal = -1
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 11)
	goto done
__51:
	;
	goto gotEOL
__50:
	;
	*(*uintptr)(unsafe.Pointer(bp + 8 /* dst */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* dstEnd */))
	goto __6
__7:
	;

	// Found EOL or EOF, but the output buffer may now contain too many UTF-8
	// characters. We need to know how many raw bytes correspond to the number
	// of UTF-8 characters we want, plus how many raw bytes correspond to the
	// character(s) making up EOL (if any), so we can remove the correct
	// number of bytes from the channel buffer.

gotEOL:
	// Regenerate the top channel, in case it was changed due to
	// self-modifying reflected transforms.

	if !(chanPtr != (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr) {
		goto __52
	}
	XTclChannelRelease(tls, chanPtr)
	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
	XTclChannelPreserve(tls, chanPtr)
__52:
	;

	bufPtr = (*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).FbufPtr
	if !(bufPtr == uintptr(0)) {
		goto __53
	}
	XTcl_Panic(tls, ts+33831, 0)
__53:
	;
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState = (*GetsState)(unsafe.Pointer(bp + 16 /* &gs */)).Fstate
	XTcl_ExternalToUtf(tls, uintptr(0), (*GetsState)(unsafe.Pointer(bp+16 /* &gs */)).Fencoding, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved), (*GetsState)(unsafe.Pointer(bp+16 /* &gs */)).FrawRead,
		(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags|TCL_ENCODING_NO_TERMINATE,
		statePtr+24, *(*uintptr)(unsafe.Pointer(bp + 8 /* dst */)),
		int32((int64(eol)-int64(*(*uintptr)(unsafe.Pointer(bp + 8))))/1+int64(skip)+int64(TCL_UTF_MAX)-int64(1)), bp+16+40, uintptr(0),
		bp+16+48)
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += (*GetsState)(unsafe.Pointer(bp + 16)).FrawRead

	// Recycle all the emptied buffers.

	XTcl_SetObjLength(tls, objPtr, int32((int64(eol)-int64((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes))/1))
	sCommonGetsCleanup(tls, chanPtr)
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 11)
	copiedTotal = (*GetsState)(unsafe.Pointer(bp+16)).FtotalChars + (*GetsState)(unsafe.Pointer(bp+16)).FcharsWrote - skip
	goto done

	// Couldn't get a complete line. This only happens if we get a error
	// reading from the channel or we are non-blocking and there wasn't an EOL
	// or EOF in the data available.

restore:
	// Regenerate the top channel, in case it was changed due to
	// self-modifying reflected transforms.
	if !(chanPtr != (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr) {
		goto __54
	}
	XTclChannelRelease(tls, chanPtr)
	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
	XTclChannelPreserve(tls, chanPtr)
__54:
	;
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
	if !(bufPtr != uintptr(0)) {
		goto __55
	}
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved = oldRemoved
	bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
__55:
	;

__56:
	if !(bufPtr != uintptr(0)) {
		goto __58
	}
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved = BUFFER_PADDING
	goto __57
__57:
	bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
	goto __56
	goto __58
__58:
	;
	sCommonGetsCleanup(tls, chanPtr)

	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState = oldState
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags = oldFlags
	XTcl_SetObjLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp /* oldLength */)))

	// We didn't get a complete line so we need to indicate to UpdateInterest
	// that the gets blocked. It will wait for more data instead of firing a
	// timer, avoiding a busy wait. This is where we are assuming that the
	// next operation is a gets. No more file events will be delivered on this
	// channel until new data arrives or some operation is performed on the
	// channel (e.g. gets, read, fconfigure) that changes the blocking state.
	// Note that this means a file event will not be delivered even though a
	// read would be able to consume the buffered data.

	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 14
	copiedTotal = -1

	// Update the notifier state so we don't block while there is still data
	// in the buffers.

done:
	;

	// Regenerate the top channel, in case it was changed due to
	// self-modifying reflected transforms.

	if !(chanPtr != (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr) {
		goto __59
	}
	XTclChannelRelease(tls, chanPtr)
	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
	XTclChannelPreserve(tls, chanPtr)
__59:
	;
	sUpdateInterest(tls, chanPtr)
	XTclChannelRelease(tls, chanPtr)
	return copiedTotal
}

//---------------------------------------------------------------------------
//
// TclGetsObjBinary --
//
//	A variation of Tcl_GetsObj that works directly on the buffers until
//	end-of-line or end-of-file has been seen. Bytes read from the input
//	channel return as a ByteArray obj.
//
//	WARNING!  The notion of "binary" used here is different from notions
//	of "binary" used in other places. In particular, this "binary" routine
//	may be called when an -eofchar is set on the channel.
//
// Results:
//	Number of characters accumulated in the object or -1 if error,
//	blocked, or EOF. If -1, use Tcl_GetErrno() to retrieve the POSIX error
//	code for the error or condition that occurred.
//
// Side effects:
//	Consumes input from the channel.
//
//	On reading EOF, leave channel pointing at EOF char. On reading EOL,
//	leave channel pointing after EOL, but don't return EOL in dst buffer.
//
//---------------------------------------------------------------------------

func sTclGetsObjBinary(tls *libc.TLS, chan1 Tcl_Channel, objPtr uintptr) int32 { /* tclIO.c:4927:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var chanPtr uintptr
	var statePtr uintptr
	// State info for channel
	var bufPtr uintptr
	var inEofChar int32
	var skip int32
	var copiedTotal int32
	var oldLength int32
	var oldFlags int32
	var oldRemoved int32
	var rawLen int32
	// var byteLen int32 at bp, 4

	var eolChar int32
	var dst uintptr
	var dstEnd uintptr
	var eol uintptr
	var eof uintptr
	var byteArray uintptr
	chanPtr = chan1
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
	XTclChannelPreserve(tls, chanPtr)

	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead

	// Preserved so we can restore the channel's state in case we don't find a
	// newline in the available input.

	byteArray = XTcl_GetByteArrayFromObj(tls, objPtr, bp)
	oldFlags = (*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags
	oldRemoved = BUFFER_PADDING
	oldLength = *(*int32)(unsafe.Pointer(bp /* byteLen */))
	if !(bufPtr != uintptr(0)) {
		goto __1
	}
	oldRemoved = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved
__1:
	;

	rawLen = 0
	skip = 0
	eof = uintptr(0)
	inEofChar = (*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar

	// Only handle TCL_TRANSLATE_LF and TCL_TRANSLATE_CR.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation == TCL_TRANSLATE_LF {
		eolChar = '\n'
	} else {
		eolChar = '\r'
	}

	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 11)
__2:
	if !(1 != 0) {
		goto __3
	}
	// Subtract the number of bytes that were removed from channel buffer
	// during last call.

	if !(bufPtr != uintptr(0)) {
		goto __4
	}
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += rawLen
	if !!((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded > (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved) {
		goto __5
	}
	bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
__5:
	;
__4:
	;

	if !(bufPtr == uintptr(0) || (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded == BUFFER_PADDING) {
		goto __6
	}
	// All channel buffers were exhausted and the caller still hasn't
	// seen EOL. Need to read more bytes from the channel device. Side
	// effect is to allocate another channel buffer.

	if !(sGetInput(tls, chanPtr) != 0) {
		goto __8
	}
	goto restore
__8:
	;
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail
	if !(bufPtr == uintptr(0)) {
		goto __9
	}
	goto restore
__9:
	;
	goto __7
__6:
	// Incoming CHANNEL_STICKY_EOF is filtered out on entry.  A new
	// CHANNEL_STICKY_EOF set in this routine leads to return before
	// coming back here.  When we are not dealing with
	// CHANNEL_STICKY_EOF, a CHANNEL_EOF implies an empty buffer.
	// Here the buffer is non-empty so we know we're a non-EOF.

	;

__7:
	;

	dst = bufPtr + 24 + uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)
	dstEnd = dst + uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded-(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)

	// Remember if EOF char is seen, then look for EOL anyhow, because the
	// EOL might be before the EOF char.
	// XXX - in the binary case, consider coincident search for eol/eof.

	if !(inEofChar != 0) {
		goto __10
	}
	eol = dst
__11:
	if !(eol < dstEnd) {
		goto __13
	}
	if !(int32(*(*uint8)(unsafe.Pointer(eol))) == inEofChar) {
		goto __14
	}
	dstEnd = eol
	eof = eol
	goto __13
__14:
	;
	goto __12
__12:
	eol++
	goto __11
	goto __13
__13:
	;
__10:
	;

	// On EOL, leave current file position pointing after the EOL, but
	// don't store the EOL in the output string.

	eol = dst
__15:
	if !(eol < dstEnd) {
		goto __17
	}
	if !(int32(*(*uint8)(unsafe.Pointer(eol))) == eolChar) {
		goto __18
	}
	skip = 1
	goto gotEOL
__18:
	;
	goto __16
__16:
	eol++
	goto __15
	goto __17
__17:
	;
	if !(eof != uintptr(0)) {
		goto __19
	}
	// EOF character was seen. On EOF, leave current file position
	// pointing at the EOF character, but don't store the EOF
	// character in the output string.

	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1)<<9 | int32(1)<<10
	*(*int32)(unsafe.Pointer(statePtr + 32)) |= TCL_ENCODING_END
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<11 | int32(1)<<12)
__19:
	;
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0) {
		goto __20
	}
	skip = 0
	eol = dstEnd
	if !(dst == dstEnd && *(*int32)(unsafe.Pointer(bp)) == oldLength) {
		goto __21
	}
	// If we didn't append any bytes before encountering EOF,
	// caller needs to see -1.

	byteArray = XTcl_SetByteArrayLength(tls, objPtr, oldLength)
	sCommonGetsCleanup(tls, chanPtr)
	copiedTotal = -1
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 11)
	goto done
__21:
	;
	goto gotEOL
__20:
	;
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<11|int32(1)<<3) ==
		int32(1)<<11|int32(1)<<3) {
		goto __22
	}
	goto restore
__22:
	;

	// Copy bytes from the channel buffer to the ByteArray. This may
	// realloc space, so keep track of result.

	rawLen = int32((int64(dstEnd) - int64(dst)) / 1)
	byteArray = XTcl_SetByteArrayLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp))+rawLen)
	libc.Xmemcpy(tls, byteArray+uintptr(*(*int32)(unsafe.Pointer(bp))), dst, uint64(rawLen))
	*(*int32)(unsafe.Pointer(bp /* byteLen */)) += rawLen
	goto __2
__3:
	;

	// Found EOL or EOF, but the output buffer may now contain too many bytes.
	// We need to know how many bytes correspond to the number we want, so we
	// can remove the correct number of bytes from the channel buffer.

gotEOL:
	if !(bufPtr == uintptr(0)) {
		goto __23
	}
	XTcl_Panic(tls, ts+33877, 0)
__23:
	;

	rawLen = int32((int64(eol) - int64(dst)) / 1)
	byteArray = XTcl_SetByteArrayLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp))+rawLen)
	libc.Xmemcpy(tls, byteArray+uintptr(*(*int32)(unsafe.Pointer(bp))), dst, uint64(rawLen))
	*(*int32)(unsafe.Pointer(bp /* byteLen */)) += rawLen
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += rawLen + skip

	// Convert the buffer if there was an encoding.
	// XXX - unimplemented.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fencoding != uintptr(0)) {
		goto __24
	}
__24:
	;

	// Recycle all the emptied buffers.

	sCommonGetsCleanup(tls, chanPtr)
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 11)
	copiedTotal = *(*int32)(unsafe.Pointer(bp /* byteLen */))
	goto done

	// Couldn't get a complete line. This only happens if we get a error
	// reading from the channel or we are non-blocking and there wasn't an EOL
	// or EOF in the data available.

restore:
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
	if !(bufPtr != 0) {
		goto __25
	}
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved = oldRemoved
	bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
__25:
	;

__26:
	if !(bufPtr != uintptr(0)) {
		goto __28
	}
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved = BUFFER_PADDING
	goto __27
__27:
	bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
	goto __26
	goto __28
__28:
	;
	sCommonGetsCleanup(tls, chanPtr)

	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags = oldFlags
	byteArray = XTcl_SetByteArrayLength(tls, objPtr, oldLength)

	// We didn't get a complete line so we need to indicate to UpdateInterest
	// that the gets blocked. It will wait for more data instead of firing a
	// timer, avoiding a busy wait. This is where we are assuming that the
	// next operation is a gets. No more file events will be delivered on this
	// channel until new data arrives or some operation is performed on the
	// channel (e.g. gets, read, fconfigure) that changes the blocking state.
	// Note that this means a file event will not be delivered even though a
	// read would be able to consume the buffered data.

	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 14
	copiedTotal = -1

	// Update the notifier state so we don't block while there is still data
	// in the buffers.

done:
	;

	sUpdateInterest(tls, chanPtr)
	XTclChannelRelease(tls, chanPtr)
	return copiedTotal
}

//---------------------------------------------------------------------------
//
// FreeBinaryEncoding --
//
//	Frees any "iso8859-1" Tcl_Encoding created by [gets] on a binary
//	channel in a thread as part of that thread's finalization.
//
// Results:
//	None.
//
//---------------------------------------------------------------------------

func sFreeBinaryEncoding(tls *libc.TLS, dummy ClientData) { /* tclIO.c:5188:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	_ = dummy

	if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FbinaryEncoding != uintptr(0) {
		XTcl_FreeEncoding(tls, (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FbinaryEncoding)
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FbinaryEncoding = uintptr(0)
	}
}

func sGetBinaryEncoding(tls *libc.TLS) Tcl_Encoding { /* tclIO.c:5201:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))

	if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FbinaryEncoding == uintptr(0) {
		(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FbinaryEncoding = XTcl_GetEncoding(tls, uintptr(0), ts+26567)
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFreeBinaryEncoding})), uintptr(0))
	}
	if (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FbinaryEncoding == uintptr(0) {
		XTcl_Panic(tls, ts+33928, 0)
	}
	return (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FbinaryEncoding
}

//---------------------------------------------------------------------------
//
// FilterInputBytes --
//
//	Helper function for Tcl_GetsObj. Produces UTF-8 characters from raw
//	bytes read from the channel.
//
//	Consumes available bytes from channel buffers. When channel buffers
//	are exhausted, reads more bytes from channel device into a new channel
//	buffer. It is the caller's responsibility to free the channel buffers
//	that have been exhausted.
//
// Results:
//	The return value is -1 if there was an error reading from the channel,
//	0 otherwise.
//
// Side effects:
//	Status object keeps track of how much data from channel buffers has
//	been consumed and where UTF-8 bytes should be stored.
//
//---------------------------------------------------------------------------

func sFilterInputBytes(tls *libc.TLS, chanPtr uintptr, gsPtr uintptr) int32 { /* tclIO.c:5240:1: */
	var statePtr uintptr
	// State info for channel
	var bufPtr uintptr
	var raw uintptr
	var dst uintptr
	var offset int32
	var toRead int32
	var dstNeeded int32
	var spaceLeft int32
	var result int32
	var rawLen int32
	var objPtr uintptr
	var length int32
	// The last few bytes in this channel buffer were the start of a
	// multibyte sequence. If this buffer was full, then move them to the
	// next buffer so the bytes will be contiguous.

	var nextPtr uintptr
	var extra int32
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	objPtr = (*GetsState)(unsafe.Pointer(gsPtr)).FobjPtr

	// Subtract the number of bytes that were removed from channel buffer
	// during last call.

	bufPtr = (*GetsState)(unsafe.Pointer(gsPtr)).FbufPtr
	if !(bufPtr != uintptr(0)) {
		goto __1
	}
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += (*GetsState)(unsafe.Pointer(gsPtr)).FrawRead
	if !!((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded > (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved) {
		goto __2
	}
	bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
__2:
	;
__1:
	;
	*(*int32)(unsafe.Pointer(gsPtr + 52)) += (*GetsState)(unsafe.Pointer(gsPtr)).FcharsWrote

	if !(bufPtr == uintptr(0) || (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded == BUFFER_PADDING) {
		goto __3
	}
	// All channel buffers were exhausted and the caller still hasn't seen
	// EOL. Need to read more bytes from the channel device. Side effect
	// is to allocate another channel buffer.

read:
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<3|int32(1)<<11) ==
		int32(1)<<3|int32(1)<<11) {
		goto __5
	}
	(*GetsState)(unsafe.Pointer(gsPtr)).FcharsWrote = 0
	(*GetsState)(unsafe.Pointer(gsPtr)).FrawRead = 0
	return -1
__5:
	;
	if !(sGetInput(tls, chanPtr) != 0) {
		goto __6
	}
	(*GetsState)(unsafe.Pointer(gsPtr)).FcharsWrote = 0
	(*GetsState)(unsafe.Pointer(gsPtr)).FrawRead = 0
	return -1
__6:
	;
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail
	(*GetsState)(unsafe.Pointer(gsPtr)).FbufPtr = bufPtr
	if !(bufPtr == uintptr(0)) {
		goto __7
	}
	(*GetsState)(unsafe.Pointer(gsPtr)).FcharsWrote = 0
	(*GetsState)(unsafe.Pointer(gsPtr)).FrawRead = 0
	return -1
__7:
	;
	goto __4
__3:
	// Incoming CHANNEL_STICKY_EOF is filtered out on entry.  A new
	// CHANNEL_STICKY_EOF set in this routine leads to return before
	// coming back here.  When we are not dealing with CHANNEL_STICKY_EOF,
	// a CHANNEL_EOF implies an empty buffer.  Here the buffer is
	// non-empty so we know we're a non-EOF.

	;

__4:
	;

	// Convert some of the bytes from the channel buffer to UTF-8. Space in
	// objPtr's string rep is used to hold the UTF-8 characters. Grow the
	// string rep if we need more space.

	raw = bufPtr + 24 + uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)
	rawLen = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved

	dst = *(*uintptr)(unsafe.Pointer((*GetsState)(unsafe.Pointer(gsPtr)).FdstPtr))
	offset = int32((int64(dst) - int64((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)) / 1)
	toRead = ENCODING_LINESIZE
	if !(toRead > rawLen) {
		goto __8
	}
	toRead = rawLen
__8:
	;
	dstNeeded = toRead * TCL_UTF_MAX
	spaceLeft = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength - offset
	if !(dstNeeded > spaceLeft) {
		goto __9
	}
	length = offset + func() int32 {
		if offset < dstNeeded {
			return dstNeeded
		}
		return offset
	}()

	if !(XTcl_AttemptSetObjLength(tls, objPtr, length) == 0) {
		goto __10
	}
	length = offset + dstNeeded
	if !(XTcl_AttemptSetObjLength(tls, objPtr, length) == 0) {
		goto __11
	}
	dstNeeded = TCL_UTF_MAX - 1 + toRead
	length = offset + dstNeeded
	XTcl_SetObjLength(tls, objPtr, length)
__11:
	;
__10:
	;
	spaceLeft = length - offset
	dst = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(offset)
	*(*uintptr)(unsafe.Pointer((*GetsState)(unsafe.Pointer(gsPtr)).FdstPtr)) = dst
__9:
	;
	(*GetsState)(unsafe.Pointer(gsPtr)).Fstate = (*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState
	result = XTcl_ExternalToUtf(tls, uintptr(0), (*GetsState)(unsafe.Pointer(gsPtr)).Fencoding, raw, rawLen,
		(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags|TCL_ENCODING_NO_TERMINATE,
		statePtr+24, dst, spaceLeft, gsPtr+40,
		gsPtr+44, gsPtr+48)

	// Make sure that if we go through 'gets', that we reset the
	// TCL_ENCODING_START flag still. [Bug #523988]

	*(*int32)(unsafe.Pointer(statePtr + 32)) &= libc.CplInt32(TCL_ENCODING_START)

	if !(result == -1) {
		goto __12
	}

	nextPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
	if !!(bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded >= (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength) {
		goto __13
	}
	if !((*GetsState)(unsafe.Pointer(gsPtr)).FrawRead > 0) {
		goto __15
	}
	// Some raw bytes were converted to UTF-8. Fall through,
	// returning those UTF-8 characters because a EOL might be
	// present in them.
	goto __16
__15:
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0) {
		goto __17
	}
	// There was a partial character followed by EOF on the
	// device. Fall through, returning that nothing was found.

	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded
	goto __18
__17:
	// There are no more cached raw bytes left. See if we can get
	// some more, but avoid blocking on a non-blocking channel.

	goto read
__18:
	;
__16:
	;
	goto __14
__13:
	if !(nextPtr == uintptr(0)) {
		goto __19
	}
	nextPtr = sAllocChannelBuffer(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FbufSize)
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr = nextPtr
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = nextPtr
__19:
	;
	extra = rawLen - (*GetsState)(unsafe.Pointer(gsPtr)).FrawRead
	libc.Xmemcpy(tls, nextPtr+24+uintptr(BUFFER_PADDING-extra),
		raw+uintptr((*GetsState)(unsafe.Pointer(gsPtr)).FrawRead), Size_t(extra))
	*(*int32)(unsafe.Pointer(nextPtr + 8)) -= extra
	*(*int32)(unsafe.Pointer(bufPtr + 4)) -= extra
__14:
	;
__12:
	;

	(*GetsState)(unsafe.Pointer(gsPtr)).FbufPtr = bufPtr
	return 0
}

//---------------------------------------------------------------------------
//
// PeekAhead --
//
//	Helper function used by Tcl_GetsObj(). Called when we've seen a \r at
//	the end of the UTF-8 string and want to look ahead one character to
//	see if it is a \n.
//
// Results:
//	*gsPtr->dstPtr is filled with a pointer to the start of the range of
//	UTF-8 characters that were found by peeking and *dstEndPtr is filled
//	with a pointer to the bytes just after the end of the range.
//
// Side effects:
//	If no more raw bytes were available in one of the channel buffers,
//	tries to perform a non-blocking read to get more bytes from the
//	channel device.
//
//---------------------------------------------------------------------------

func sPeekAhead(tls *libc.TLS, chanPtr uintptr, dstEndPtr uintptr, gsPtr uintptr) { /* tclIO.c:5431:1: */
	var statePtr uintptr
	// State info for channel
	var bufPtr uintptr
	var blockModeProc uintptr
	var bytesLeft int32
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	bufPtr = (*GetsState)(unsafe.Pointer(gsPtr)).FbufPtr

	// If there's any more raw input that's still buffered, we'll peek into
	// that. Otherwise, only get more data from the channel driver if it looks
	// like there might actually be more data. The assumption is that if the
	// channel buffer is filled right up to the end, then there might be more
	// data to read.

	blockModeProc = uintptr(0)
	if !((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr == uintptr(0)) {
		goto __1
	}
	bytesLeft = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved - (*GetsState)(unsafe.Pointer(gsPtr)).FrawRead
	if !(bytesLeft == 0) {
		goto __2
	}
	if !!(bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded >= (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength) {
		goto __3
	}
	// Don't peek ahead if last read was short read.

	goto cleanup
__3:
	;
	if !!((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<3) != 0) {
		goto __4
	}
	blockModeProc = XTcl_ChannelBlockModeProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)
	if !(blockModeProc == uintptr(0)) {
		goto __5
	}
	// Don't peek ahead if cannot set non-blocking mode.

	goto cleanup
__5:
	;
	sStackSetBlockMode(tls, chanPtr, TCL_MODE_NONBLOCKING)
__4:
	;
__2:
	;
__1:
	;
	if !(sFilterInputBytes(tls, chanPtr, gsPtr) == 0) {
		goto __6
	}
	*(*uintptr)(unsafe.Pointer(dstEndPtr)) = *(*uintptr)(unsafe.Pointer((*GetsState)(unsafe.Pointer(gsPtr)).FdstPtr)) + uintptr((*GetsState)(unsafe.Pointer(gsPtr)).FbytesWrote)
__6:
	;
	if !(blockModeProc != uintptr(0)) {
		goto __7
	}
	sStackSetBlockMode(tls, chanPtr, TCL_MODE_BLOCKING)
__7:
	;
	return

cleanup:
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += (*GetsState)(unsafe.Pointer(gsPtr)).FrawRead
	(*GetsState)(unsafe.Pointer(gsPtr)).FrawRead = 0
	*(*int32)(unsafe.Pointer(gsPtr + 52)) += (*GetsState)(unsafe.Pointer(gsPtr)).FcharsWrote
	(*GetsState)(unsafe.Pointer(gsPtr)).FbytesWrote = 0
	(*GetsState)(unsafe.Pointer(gsPtr)).FcharsWrote = 0
}

//---------------------------------------------------------------------------
//
// CommonGetsCleanup --
//
//	Helper function for Tcl_GetsObj() to restore the channel after a
//	"gets" operation.
//
// Results:
//	None.
//
// Side effects:
//	Encoding may be freed.
//
//---------------------------------------------------------------------------

func sCommonGetsCleanup(tls *libc.TLS, chanPtr uintptr) { /* tclIO.c:5511:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var bufPtr uintptr
	var nextPtr uintptr

	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
	for ; bufPtr != uintptr(0); bufPtr = nextPtr {
		nextPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
		if (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded > (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved {
			break
		}
		sRecycleBuffer(tls, statePtr, bufPtr, 0)
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = bufPtr
	if bufPtr == uintptr(0) {
		(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = uintptr(0)
	} else {
		// If any multi-byte characters were split across channel buffer
		// boundaries, the split-up bytes were moved to the next channel
		// buffer by FilterInputBytes(). Move the bytes back to their original
		// buffer because the caller could change the channel's encoding which
		// could change the interpretation of whether those bytes really made
		// up multi-byte characters after all.

		nextPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
		for ; nextPtr != uintptr(0); nextPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr {
			var extra int32

			extra = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded
			if extra > 0 {
				libc.Xmemcpy(tls, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded),
					nextPtr+24+uintptr(BUFFER_PADDING-extra),
					Size_t(extra))
				*(*int32)(unsafe.Pointer(bufPtr + 4)) += extra
				(*ChannelBuffer)(unsafe.Pointer(nextPtr)).FnextRemoved = BUFFER_PADDING
			}
			bufPtr = nextPtr
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_Read --
//
//	Reads a given number of bytes from a channel. EOL and EOF translation
//	is done on the bytes being read, so the number of bytes consumed from
//	the channel may not be equal to the number of bytes stored in the
//	destination buffer.
//
//	No encoding conversions are applied to the bytes being read.
//
// Results:
//	The number of bytes read, or -1 on error. Use Tcl_GetErrno() to
//	retrieve the error code for the error that occurred.
//
// Side effects:
//	May cause input to be buffered.
//
//----------------------------------------------------------------------

func XTcl_Read(tls *libc.TLS, chan1 Tcl_Channel, dst uintptr, bytesToRead int32) int32 { /* tclIO.c:5579:1: */
	var chanPtr uintptr = chan1
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	if sCheckChannelErrors(tls, statePtr, int32(1)<<1) != 0 {
		return -1
	}

	return sDoRead(tls, chanPtr, dst, bytesToRead, 0)
}

//----------------------------------------------------------------------
//
// Tcl_ReadRaw --
//
//	Reads a given number of bytes from a channel. EOL and EOF translation
//	is done on the bytes being read, so the number of bytes consumed from
//	the channel may not be equal to the number of bytes stored in the
//	destination buffer.
//
//	No encoding conversions are applied to the bytes being read.
//
// Results:
//	The number of bytes read, or -1 on error. Use Tcl_GetErrno() to
//	retrieve the error code for the error that occurred.
//
// Side effects:
//	May cause input to be buffered.
//
//----------------------------------------------------------------------

func XTcl_ReadRaw(tls *libc.TLS, chan1 Tcl_Channel, readBuf uintptr, bytesToRead int32) int32 { /* tclIO.c:5624:1: */
	var chanPtr uintptr = chan1
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var copied int32 = 0

	if sCheckChannelErrors(tls, statePtr, int32(1)<<1|int32(1)<<16) != 0 {
		return -1
	}

	// First read bytes from the push-back buffers.

	for (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead != 0 && bytesToRead > 0 {
		var bufPtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead
		var bytesInBuffer int32 = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved
		var toCopy int32
		if bytesInBuffer < bytesToRead {
			toCopy = bytesInBuffer
		} else {
			toCopy = bytesToRead
		}

		// Copy the current chunk into the read buffer.

		libc.Xmemcpy(tls, readBuf, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved), uint64(toCopy))
		*(*int32)(unsafe.Pointer(bufPtr + 8)) += toCopy
		copied = copied + toCopy
		readBuf += uintptr(toCopy)
		bytesToRead = bytesToRead - toCopy

		// If the current buffer is empty recycle it.

		if (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded == (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved {
			(*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
			if (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead == uintptr(0) {
				(*Channel)(unsafe.Pointer(chanPtr)).FinQueueTail = uintptr(0)
			}
			sRecycleBuffer(tls, (*Channel)(unsafe.Pointer(chanPtr)).Fstate, bufPtr, 0)
		}
	}

	// Go to the driver only if we got nothing from pushback.  Have to do it
	// this way to avoid EOF mis-timings when we consider the ability that EOF
	// may not be a permanent condition in the driver, and in that case we
	// have to synchronize.

	if copied != 0 {
		return copied
	}

	// This test not needed.

	if bytesToRead > 0 {
		var nread int32 = sChanRead(tls, chanPtr, readBuf, bytesToRead)

		if nread > 0 {
			// Successful read (short is OK) - add to bytes copied.

			copied = copied + nread
		} else if nread < 0 {
			// An error signaled.  If CHANNEL_BLOCKED, then the error is not
			// real, but an indication of blocked state.  In that case, retain
			// the flag and let caller receive the short read of copied bytes
			// from the pushback.  HOWEVER, if copied==0 bytes from pushback
			// then repeat signalling the blocked state as an error to caller
			// so there is no false report of an EOF.  When !CHANNEL_BLOCKED,
			// the error is real and passes on to caller.

			if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<11) != 0) || copied == 0 {
				copied = -1
			}
		} else {
			// nread == 0.  Driver is at EOF. Let that state filter up.
		}
	}
	return copied
}

//---------------------------------------------------------------------------
//
// Tcl_ReadChars --
//
//	Reads from the channel until the requested number of characters have
//	been seen, EOF is seen, or the channel would block. EOL and EOF
//	translation is done. If reading binary data, the raw bytes are wrapped
//	in a Tcl byte array object. Otherwise, the raw bytes are converted to
//	UTF-8 using the channel's current encoding and stored in a Tcl string
//	object.
//
// Results:
//	The number of characters read, or -1 on error. Use Tcl_GetErrno() to
//	retrieve the error code for the error that occurred.
//
// Side effects:
//	May cause input to be buffered.
//
//---------------------------------------------------------------------------

func XTcl_ReadChars(tls *libc.TLS, chan1 Tcl_Channel, objPtr uintptr, toRead int32, appendFlag int32) int32 { /* tclIO.c:5742:1: */
	var chanPtr uintptr = chan1
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	if sCheckChannelErrors(tls, statePtr, int32(1)<<1) != 0 {
		// Update the notifier state so we don't block while there is still
		// data in the buffers.

		sUpdateInterest(tls, chanPtr)
		return -1
	}

	return sDoReadChars(tls, chanPtr, objPtr, toRead, appendFlag)
}

//---------------------------------------------------------------------------
//
// DoReadChars --
//
//	Reads from the channel until the requested number of characters have
//	been seen, EOF is seen, or the channel would block. EOL and EOF
//	translation is done. If reading binary data, the raw bytes are wrapped
//	in a Tcl byte array object. Otherwise, the raw bytes are converted to
//	UTF-8 using the channel's current encoding and stored in a Tcl string
//	object.
//
// Results:
//	The number of characters read, or -1 on error. Use Tcl_GetErrno() to
//	retrieve the error code for the error that occurred.
//
// Side effects:
//	May cause input to be buffered.
//
//---------------------------------------------------------------------------

func sDoReadChars(tls *libc.TLS, chanPtr uintptr, objPtr uintptr, toRead int32, appendFlag int32) int32 { /* tclIO.c:5798:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var bufPtr uintptr
	var copied int32
	var copiedNow int32
	var result int32
	var encoding Tcl_Encoding = (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding
	var binaryMode int32
	*(*int32)(unsafe.Pointer(bp /* factor */)) = UTF_EXPANSION_FACTOR

	binaryMode = libc.Bool32(encoding == uintptr(0) &&
		(*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation == TCL_TRANSLATE_LF &&
		(*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar == 0)

	if appendFlag == 0 {
		if binaryMode != 0 {
			XTcl_SetByteArrayLength(tls, objPtr, 0)
		} else {
			XTcl_SetObjLength(tls, objPtr, 0)

			// We're going to access objPtr->bytes directly, so we must ensure
			// that this is actually a string object (otherwise it might have
			// been pure Unicode).
			//
			// Probably not needed anymore.

			if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0) {
				XTcl_GetString(tls, objPtr)
			}
		}
	}

	// Early out when next read will see eofchar.
	//
	// NOTE: See DoRead for argument that it's a bug (one we're keeping) to
	// have this escape before the one for zero-char read request.

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<10) != 0 {
		*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 9

		// TODO: We don't need this call?
		sUpdateInterest(tls, chanPtr)
		return 0
	}

	// Special handling for zero-char read request.
	if toRead == 0 {
		if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0 {
			*(*int32)(unsafe.Pointer(statePtr + 32)) |= TCL_ENCODING_START
		}
		*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<11 | int32(1)<<9)
		*(*int32)(unsafe.Pointer(statePtr + 32)) &= libc.CplInt32(TCL_ENCODING_END)
		// TODO: We don't need this call?
		sUpdateInterest(tls, chanPtr)
		return 0
	}

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
	XTclChannelPreserve(tls, chanPtr)

	// Must clear the BLOCKED|EOF flags here since we check before reading.

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0 {
		*(*int32)(unsafe.Pointer(statePtr + 32)) |= TCL_ENCODING_START
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<11 | int32(1)<<9)
	*(*int32)(unsafe.Pointer(statePtr + 32)) &= libc.CplInt32(TCL_ENCODING_END)
	for copied = 0; uint32(toRead) > uint32(0); {
		copiedNow = -1
		if (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead != uintptr(0) {
			if binaryMode != 0 {
				copiedNow = sReadBytes(tls, statePtr, objPtr, toRead)
			} else {
				copiedNow = sReadChars(tls, statePtr, objPtr, toRead, bp)
			}

			// If the current buffer is empty recycle it.

			bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
			if (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded == (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved {
				var nextPtr uintptr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr

				sRecycleBuffer(tls, statePtr, bufPtr, 0)
				(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = nextPtr
				if nextPtr == uintptr(0) {
					(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = uintptr(0)
				}
			}
		}

		if copiedNow < 0 {
			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0 {
				break
			}
			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<3|int32(1)<<11) ==
				int32(1)<<3|int32(1)<<11 {
				break
			}
			result = sGetInput(tls, chanPtr)
			if chanPtr != (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr {
				XTclChannelRelease(tls, chanPtr)
				chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
				XTclChannelPreserve(tls, chanPtr)
			}
			if result != 0 {
				if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<11) != 0) {
					copied = -1
				}
				break
			}
		} else {
			copied = copied + copiedNow
			toRead = toRead - copiedNow
		}
	}

	// Failure to fill a channel buffer may have left channel reporting a
	// "blocked" state, but so long as we fulfilled the request here, the
	// caller does not consider us blocked.

	if toRead == 0 {
		*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 11)
	}

	// Regenerate the top channel, in case it was changed due to
	// self-modifying reflected transforms.

	if chanPtr != (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr {
		XTclChannelRelease(tls, chanPtr)
		chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
		XTclChannelPreserve(tls, chanPtr)
	}

	// Update the notifier state so we don't block while there is still data
	// in the buffers.

	sUpdateInterest(tls, chanPtr)
	XTclChannelRelease(tls, chanPtr)
	return copied
}

//---------------------------------------------------------------------------
//
// ReadBytes --
//
//	Reads from the channel until the requested number of bytes have been
//	seen, EOF is seen, or the channel would block. Bytes from the channel
//	are stored in objPtr as a ByteArray object. EOL and EOF translation
//	are done.
//
//	'bytesToRead' can safely be a very large number because space is only
//	allocated to hold data read from the channel as needed.
//
// Results:
//	The return value is the number of bytes appended to the object, or
//	-1 to indicate that zero bytes were read due to an EOF.
//
// Side effects:
//	The storage of bytes in objPtr can cause (re-)allocation of memory.
//
//---------------------------------------------------------------------------

func sReadBytes(tls *libc.TLS, statePtr uintptr, objPtr uintptr, bytesToRead int32) int32 { /* tclIO.c:5998:1: */
	var bufPtr uintptr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
	var srcLen int32 = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved
	var toRead int32
	if bytesToRead > srcLen || bytesToRead < 0 {
		toRead = srcLen
	} else {
		toRead = bytesToRead
	}

	XTclAppendBytesToByteArray(tls, objPtr, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved),
		toRead)
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += toRead
	return toRead
}

//---------------------------------------------------------------------------
//
// ReadChars --
//
//	Reads from the channel until the requested number of UTF-8 characters
//	have been seen, EOF is seen, or the channel would block. Raw bytes
//	from the channel are converted to UTF-8 and stored in objPtr. EOL and
//	EOF translation is done.
//
//	'charsToRead' can safely be a very large number because space is only
//	allocated to hold data read from the channel as needed.
//
//	'charsToRead' may *not* be 0.
//
// Results:
//	The return value is the number of characters appended to the object,
//	*offsetPtr is filled with the number of bytes that were appended, and
//	*factorPtr is filled with the expansion factor used to guess how many
//	bytes of UTF-8 to allocate to hold N source bytes.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sReadChars(tls *libc.TLS, statePtr uintptr, objPtr uintptr, charsToRead int32, factorPtr uintptr) int32 { /* tclIO.c:6051:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var encoding Tcl_Encoding
	var savedState Tcl_EncodingState
	var bufPtr uintptr
	var savedIEFlags int32
	var savedFlags int32
	var dst uintptr
	var src uintptr
	// var numBytes int32 at bp, 4

	var srcLen int32

	// One src byte can yield at most one character.  So when the number of
	// src bytes we plan to read is less than the limit on character count to
	// be read, clearly we will remain within that limit, and we can use the
	// value of "srcLen" as a tighter limit for sizing receiving buffers.

	var toRead int32

	// 'factor' is how much we guess that the bytes in the source buffer will
	// expand when converted to UTF-8 chars. This guess comes from analyzing
	// how many characters were produced by the previous pass.

	var factor int32
	var dstLimit int32
	// var size uint32 at bp+4, 4

	// var read int32 at bp+32, 4

	// var decoded int32 at bp+36, 4

	// var count int32 at bp+40, 4

	// var buffer [4]int8 at bp+28, 4

	var nextPtr uintptr
	// var dstDecoded int32 at bp+12, 4

	// var dstRead int32 at bp+24, 4

	// var dstWrote int32 at bp+20, 4

	// var srcRead int32 at bp+8, 4

	// var numChars int32 at bp+16, 4

	var code int32
	var flags int32
	if (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding != 0 {
		encoding = (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding
	} else {
		encoding = sGetBinaryEncoding(tls)
	}
	savedState = (*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
	savedIEFlags = (*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags
	savedFlags = (*ChannelState)(unsafe.Pointer(statePtr)).Fflags
	src = bufPtr + 24 + uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)
	srcLen = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved
	if charsToRead < 0 || charsToRead > srcLen {
		toRead = srcLen
	} else {
		toRead = charsToRead
	}
	factor = *(*int32)(unsafe.Pointer(factorPtr))
	dstLimit = TCL_UTF_MAX - 1 + toRead*factor/UTF_EXPANSION_FACTOR

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
		*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
		_ = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
	} else {
		XTcl_GetStringFromObj(tls, objPtr, bp)
	}
	XTcl_AppendToObj(tls, objPtr, uintptr(0), dstLimit)
	if !(toRead == srcLen) {
		goto __1
	}

	dst = XTclGetStringStorage(tls, objPtr, bp+4) + uintptr(*(*int32)(unsafe.Pointer(bp)))
	dstLimit = int32(*(*uint32)(unsafe.Pointer(bp + 4)) - uint32(*(*int32)(unsafe.Pointer(bp))))
	goto __2
__1:
	dst = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}() + uintptr(*(*int32)(unsafe.Pointer(bp)))
__2:
	;

	// This routine is burdened with satisfying several constraints. It cannot
	// append more than 'charsToRead` chars onto objPtr. This is measured
	// after encoding and translation transformations are completed. There is
	// no precise number of src bytes that can be associated with the limit.
	// Yet, when we are done, we must know precisely the number of src bytes
	// that were consumed to produce the appended chars, so that all
	// subsequent bytes are left in the buffers for future read operations.
	//
	// The consequence is that we have no choice but to implement a "trial and
	// error" approach, where in general we may need to perform
	// transformations and copies multiple times to achieve a consistent set
	// of results.  This takes the shape of a loop.

__3:
	if !(1 != 0) {
		goto __4
	}
	flags = (*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags | TCL_ENCODING_NO_TERMINATE

	if !(charsToRead > 0) {
		goto __5
	}
	flags = flags | TCL_ENCODING_CHAR_LIMIT
	*(*int32)(unsafe.Pointer(bp + 16 /* numChars */)) = charsToRead
__5:
	;

	// Perform the encoding transformation.  Read no more than srcLen
	// bytes, write no more than dstLimit bytes.
	//
	// Some trickiness with encoding flags here.  We do not want the end
	// of a buffer to be treated as the end of all input when the presence
	// of bytes in a next buffer are already known to exist.  This is
	// checked with an assert() because so far no test case causing the
	// assertion to be false has been created.  The normal operations of
	// channel reading appear to cause EOF and TCL_ENCODING_END setting to
	// appear only in situations where there are no further bytes in any
	// buffers.

	code = XTcl_ExternalToUtf(tls, uintptr(0), encoding, src, srcLen,
		flags, statePtr+24,
		dst, dstLimit, bp+8, bp+12, bp+16)

	// Perform the translation transformation in place.  Read no more than
	// the dstDecoded bytes the encoding transformation actually produced.
	// Capture the number of bytes written in dstWrote. Capture the number
	// of bytes actually consumed in dstRead.

	*(*int32)(unsafe.Pointer(bp + 20 /* dstWrote */)) = dstLimit
	*(*int32)(unsafe.Pointer(bp + 24 /* dstRead */)) = *(*int32)(unsafe.Pointer(bp + 12 /* dstDecoded */))
	sTranslateInputEOL(tls, statePtr, dst, dst, bp+20, bp+24)

	if !(*(*int32)(unsafe.Pointer(bp + 24)) < *(*int32)(unsafe.Pointer(bp + 12))) {
		goto __6
	}
	// The encoding transformation produced bytes that the translation
	// transformation did not consume.  Why did this happen?

	if !((*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar != 0 && int32(*(*int8)(unsafe.Pointer(dst + uintptr(*(*int32)(unsafe.Pointer(bp + 24)))))) == (*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar) {
		goto __7
	}
	// 1) There's an eof char set on the channel, and
	//    we saw it and stopped translating at that point.
	//
	// NOTE the bizarre spec of TranslateInputEOL in this case.
	// Clearly the eof char had to be read in order to account for
	// the stopping, but the value of dstRead does not include it.
	//
	// Also rather bizarre, our caller can only notice an EOF
	// condition if we return the value -1 as the number of chars
	// read.  This forces us to perform a 2-call dance where the
	// first call can read all the chars up to the eof char, and
	// the second call is solely for consuming the encoded eof
	// char then pointed at by src so that we can return that
	// magic -1 value.  This seems really wasteful, especially
	// since the first decoding pass of each call is likely to
	// decode many bytes beyond that eof char that's all we care
	// about.

	if !(*(*int32)(unsafe.Pointer(bp + 24)) == 0) {
		goto __8
	}
	// Curious choice in the eof char handling.  We leave the
	// eof char in the buffer. So, no need to compute a proper
	// srcRead value. At this point, there are no chars before
	// the eof char in the buffer.

	XTcl_SetObjLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp /* numBytes */)))
	return -1
__8:
	;

	// There are chars leading the buffer before the eof char.
	// Adjust the dstLimit so we go back and read only those
	// and do not encounter the eof char this time.

	dstLimit = *(*int32)(unsafe.Pointer(bp + 24)) + (TCL_UTF_MAX - 1)
	(*ChannelState)(unsafe.Pointer(statePtr)).Fflags = savedFlags
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags = savedIEFlags
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState = savedState
	goto __3

__7:
	;

	// 2) The other way to read fewer bytes than are decoded is when
	//    the final byte is \r and we're in a CRLF translation mode so
	//    we cannot decide whether to record \r or \n yet.

	if !(*(*int32)(unsafe.Pointer(bp + 20)) > 0) {
		goto __9
	}
	// There are chars we can read before we hit the bare CR.  Go
	// back with a smaller dstLimit so we get them in the next
	// pass, compute a matching srcRead, and don't end up back
	// here in this call.

	dstLimit = *(*int32)(unsafe.Pointer(bp + 24)) + (TCL_UTF_MAX - 1)
	(*ChannelState)(unsafe.Pointer(statePtr)).Fflags = savedFlags
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags = savedIEFlags
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState = savedState
	goto __3
__9:
	;

	// We decoded only the bare CR, and we cannot read a translated
	// char from that alone. We have to know what's next.  So why do
	// we only have the one decoded char?

	if !(code != TCL_OK) {
		goto __10
	}

	// Didn't get everything the buffer could offer

	(*ChannelState)(unsafe.Pointer(statePtr)).Fflags = savedFlags
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags = savedIEFlags
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState = savedState

	XTcl_ExternalToUtf(tls, uintptr(0), encoding, src, srcLen,
		(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags|TCL_ENCODING_NO_TERMINATE,
		statePtr+24, bp+28, int32(unsafe.Sizeof([4]int8{})),
		bp+32, bp+36, bp+40)

	if !(*(*int32)(unsafe.Pointer(bp + 40)) == 2) {
		goto __12
	}
	if !(int32(*(*int8)(unsafe.Pointer(bp + 28 + 1))) == '\n') {
		goto __13
	}
	// \r\n translate to \n
	*(*int8)(unsafe.Pointer(dst)) = int8('\n')
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += *(*int32)(unsafe.Pointer(bp + 32))
	goto __14
__13:
	*(*int8)(unsafe.Pointer(dst)) = int8('\r')
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += *(*int32)(unsafe.Pointer(bp + 8))
__14:
	;

	*(*int32)(unsafe.Pointer(statePtr + 32)) &= libc.CplInt32(TCL_ENCODING_START)

	XTcl_SetObjLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp))+1)
	return 1
__12:
	;

	goto __11
__10:
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0) {
		goto __15
	}
	// The bare \r is the only char and we will never read a
	// subsequent char to make the determination.

	*(*int8)(unsafe.Pointer(dst)) = int8('\r')
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded
	XTcl_SetObjLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp))+1)
	return 1
__15:
	;
__11:
	;

	// Revise the dstRead value so that the numChars calc below
	// correctly computes zero characters read.

	*(*int32)(unsafe.Pointer(bp + 24 /* dstRead */)) = *(*int32)(unsafe.Pointer(bp + 16 /* numChars */))

	// FALL THROUGH - get more data (dstWrote == 0)
__6:
	;

	// The translation transformation can only reduce the number of chars
	// when it converts \r\n into \n. The reduction in the number of chars
	// is the difference in bytes read and written.

	*(*int32)(unsafe.Pointer(bp + 16 /* numChars */)) -= *(*int32)(unsafe.Pointer(bp + 24)) - *(*int32)(unsafe.Pointer(bp + 20))

	if !(charsToRead > 0 && *(*int32)(unsafe.Pointer(bp + 16)) > charsToRead) {
		goto __16
	}

	// TODO: This cannot happen anymore.
	//
	// We read more chars than allowed.  Reset limits to prevent that
	// and try again.  Don't forget the extra padding of TCL_UTF_MAX
	// bytes demanded by the Tcl_ExternalToUtf() call!

	dstLimit = int32((int64(XTcl_UtfAtIndex(tls, dst, charsToRead))-int64(dst))/1 + int64(TCL_UTF_MAX-1))
	(*ChannelState)(unsafe.Pointer(statePtr)).Fflags = savedFlags
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags = savedIEFlags
	(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState = savedState
	goto __3
__16:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 20)) == 0) {
		goto __17
	}

	// We were not able to read any chars.

	// There is one situation where this is the correct final result.
	// If the src buffer contains only a single \n byte, and we are in
	// TCL_TRANSLATE_AUTO mode, and when the translation pass was made
	// the INPUT_SAW_CR flag was set on the channel. In that case, the
	// correct behavior is to consume that \n and produce the empty
	// string.

	if !(*(*int32)(unsafe.Pointer(bp + 24)) == 1 && int32(*(*int8)(unsafe.Pointer(dst))) == '\n') {
		goto __18
	}

	goto consume
__18:
	;

	// Otherwise, reading zero characters indicates there's something
	// incomplete at the end of the src buffer.  Maybe there were not
	// enough src bytes to decode into a char.  Maybe a lone \r could
	// not be translated (crlf mode).  Need to combine any unused src
	// bytes we have in the first buffer with subsequent bytes to try
	// again.

	nextPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr

	if !(nextPtr == uintptr(0)) {
		goto __19
	}
	if !(srcLen > 0) {
		goto __20
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 14
__20:
	;
	XTcl_SetObjLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp /* numBytes */)))
	return -1
__19:
	;

	// Space is made at the beginning of the buffer to copy the
	// previous unused bytes there. Check first if the buffer we are
	// using actually has enough space at its beginning for the data
	// we are copying.  Because if not we will write over the buffer
	// management information, especially the 'nextPtr'.
	//
	// Note that the BUFFER_PADDING (See AllocChannelBuffer) is used
	// to prevent exactly this situation. I.e. it should never happen.
	// Therefore it is ok to panic should it happen despite the
	// precautions.

	if !((*ChannelBuffer)(unsafe.Pointer(nextPtr)).FnextRemoved-srcLen < 0) {
		goto __21
	}
	XTcl_Panic(tls, ts+33961, 0)
__21:
	;

	*(*int32)(unsafe.Pointer(nextPtr + 8)) -= srcLen
	libc.Xmemcpy(tls, nextPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(nextPtr)).FnextRemoved), src, uint64(srcLen))
	sRecycleBuffer(tls, statePtr, bufPtr, 0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = nextPtr
	XTcl_SetObjLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp /* numBytes */)))
	return sReadChars(tls, statePtr, objPtr, charsToRead, factorPtr)
__17:
	;

	*(*int32)(unsafe.Pointer(statePtr + 32)) &= libc.CplInt32(TCL_ENCODING_START)

consume:
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += *(*int32)(unsafe.Pointer(bp + 8))

	// If this read contained multibyte characters, revise factorPtr so
	// the next read will allocate bigger buffers.

	if !(*(*int32)(unsafe.Pointer(bp + 16)) != 0 && *(*int32)(unsafe.Pointer(bp + 16)) < *(*int32)(unsafe.Pointer(bp + 8))) {
		goto __22
	}
	*(*int32)(unsafe.Pointer(factorPtr)) = *(*int32)(unsafe.Pointer(bp + 8)) * UTF_EXPANSION_FACTOR / *(*int32)(unsafe.Pointer(bp + 16))
__22:
	;
	XTcl_SetObjLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp))+*(*int32)(unsafe.Pointer(bp + 20)))
	return *(*int32)(unsafe.Pointer(bp + 16 /* numChars */))
	goto __3
__4:
	;
	return int32(0)
}

//---------------------------------------------------------------------------
//
// TranslateInputEOL --
//
//	Perform input EOL and EOF translation on the source buffer, leaving
//	the translated result in the destination buffer.
//
// Results:
//	The return value is 1 if the EOF character was found when copying
//	bytes to the destination buffer, 0 otherwise.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sTranslateInputEOL(tls *libc.TLS, statePtr uintptr, dstStart uintptr, srcStart uintptr, dstLenPtr uintptr, srcLenPtr uintptr) { /* tclIO.c:6445:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var eof uintptr = uintptr(0)
	var dstLen int32 = *(*int32)(unsafe.Pointer(dstLenPtr))
	var srcLen int32 = *(*int32)(unsafe.Pointer(srcLenPtr))
	var inEofChar int32 = (*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar

	// Depending on the translation mode in use, there's no need to scan more
	// srcLen bytes at srcStart than can possibly transform to dstLen bytes.
	// This keeps the scan for eof char below from being pointlessly long.

	switch (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation {
	case TCL_TRANSLATE_LF:
		fallthrough
	case TCL_TRANSLATE_CR:
		if srcLen > dstLen {
			// In these modes, each src byte become a dst byte.

			srcLen = dstLen
		}
		break
	default:
		// In other modes, at most 2 src bytes become a dst byte.

		if srcLen/2 > dstLen {
			srcLen = 2 * dstLen
		}
		break
	}

	if inEofChar != 0 {
		// Make sure we do not read past any logical end of channel input
		// created by the presence of the input eof char.

		if libc.AssignUintptr(&eof, libc.Xmemchr(tls, srcStart, inEofChar, uint64(srcLen))) != 0 {
			srcLen = int32((int64(eof) - int64(srcStart)) / 1)
		}
	}

	switch (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation {
	case TCL_TRANSLATE_LF:
		fallthrough
	case TCL_TRANSLATE_CR:
		if dstStart != srcStart {
			libc.Xmemcpy(tls, dstStart, srcStart, uint64(srcLen))
		}
		if (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation == TCL_TRANSLATE_CR {
			var dst uintptr = dstStart
			var dstEnd uintptr = dstStart + uintptr(srcLen)

			for libc.AssignUintptr(&dst, libc.Xmemchr(tls, dst, '\r', uint64((int64(dstEnd)-int64(dst))/1))) != 0 {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('\n')
			}
		}
		dstLen = srcLen
		break
	case TCL_TRANSLATE_CRLF:
		{
			var crFound uintptr
			var src uintptr = srcStart
			var dst uintptr = dstStart
			var lesser int32
			if dstLen < srcLen {
				lesser = dstLen
			} else {
				lesser = srcLen
			}

			for libc.AssignUintptr(&crFound, libc.Xmemchr(tls, src, '\r', uint64(lesser))) != 0 {
				var numBytes int32 = int32((int64(crFound) - int64(src)) / 1)
				libc.Xmemmove(tls, dst, src, uint64(numBytes))

				dst += uintptr(numBytes)
				dstLen = dstLen - numBytes
				src += uintptr(numBytes)
				srcLen = srcLen - numBytes
				if srcLen == 1 {
					// valid src bytes end in \r
					if eof != 0 {
						*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('\r')
						src++
						srcLen--
					} else {
						lesser = 0
						break
					}
				} else if int32(*(*int8)(unsafe.Pointer(src + 1))) == '\n' {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('\n')
					src += uintptr(2)
					srcLen = srcLen - 2
				} else {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('\r')
					src++
					srcLen--
				}
				dstLen--
				if dstLen < srcLen {
					lesser = dstLen
				} else {
					lesser = srcLen
				}
			}
			libc.Xmemmove(tls, dst, src, uint64(lesser))
			srcLen = int32((int64(src+uintptr(lesser)) - int64(srcStart)) / 1)
			dstLen = int32((int64(dst+uintptr(lesser)) - int64(dstStart)) / 1)
			break

		}
	case TCL_TRANSLATE_AUTO:
		{
			var crFound uintptr
			var src uintptr = srcStart
			var dst uintptr = dstStart
			var lesser int32

			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<12) != 0 && srcLen != 0 {
				if int32(*(*int8)(unsafe.Pointer(src))) == '\n' {
					src++
					srcLen--
				}
				*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 12)
			}
			if dstLen < srcLen {
				lesser = dstLen
			} else {
				lesser = srcLen
			}
			for libc.AssignUintptr(&crFound, libc.Xmemchr(tls, src, '\r', uint64(lesser))) != 0 {
				var numBytes int32 = int32((int64(crFound) - int64(src)) / 1)
				libc.Xmemmove(tls, dst, src, uint64(numBytes))

				*(*int8)(unsafe.Pointer(dst + uintptr(numBytes))) = int8('\n')
				dst += uintptr(numBytes + 1)
				dstLen = dstLen - (numBytes + 1)
				src += uintptr(numBytes + 1)
				srcLen = srcLen - (numBytes + 1)
				if srcLen == 0 {
					*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 12
				} else if int32(*(*int8)(unsafe.Pointer(src))) == '\n' {
					src++
					srcLen--
				}
				if dstLen < srcLen {
					lesser = dstLen
				} else {
					lesser = srcLen
				}
			}
			libc.Xmemmove(tls, dst, src, uint64(lesser))
			srcLen = int32((int64(src+uintptr(lesser)) - int64(srcStart)) / 1)
			dstLen = int32((int64(dst+uintptr(lesser)) - int64(dstStart)) / 1)
			break

		}
	default:
		XTcl_Panic(tls, ts+34005, libc.VaList(bp, (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation))
	}
	*(*int32)(unsafe.Pointer(dstLenPtr)) = dstLen
	*(*int32)(unsafe.Pointer(srcLenPtr)) = srcLen

	if srcStart+uintptr(srcLen) == eof {
		// EOF character was seen in EOL translated range. Leave current file
		// position pointing at the EOF character, but don't store the EOF
		// character in the output string.

		*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1)<<9 | int32(1)<<10
		*(*int32)(unsafe.Pointer(statePtr + 32)) |= TCL_ENCODING_END
		*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<11 | int32(1)<<12)
	}
}

//----------------------------------------------------------------------
//
// Tcl_Ungets --
//
//	Causes the supplied string to be added to the input queue of the
//	channel, at either the head or tail of the queue.
//
// Results:
//	The number of bytes stored in the channel, or -1 on error.
//
// Side effects:
//	Adds input to the input queue of a channel.
//
//----------------------------------------------------------------------

func XTcl_Ungets(tls *libc.TLS, chan1 Tcl_Channel, str uintptr, len int32, atEnd int32) int32 { /* tclIO.c:6620:1: */
	var chanPtr uintptr  // The real IO channel.
	var statePtr uintptr // State of actual channel.
	var bufPtr uintptr   // Buffer to contain the data.
	var flags int32

	chanPtr = chan1
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	// CheckChannelErrors clears too many flag bits in this one case.

	flags = (*ChannelState)(unsafe.Pointer(statePtr)).Fflags
	if !(sCheckChannelErrors(tls, statePtr, int32(1)<<1) != 0) {
		goto __1
	}
	len = -1
	goto done
__1:
	;
	(*ChannelState)(unsafe.Pointer(statePtr)).Fflags = flags

	// Clear the EOF flags, and clear the BLOCKED bit.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0) {
		goto __2
	}
	*(*int32)(unsafe.Pointer(statePtr + 32)) |= TCL_ENCODING_START
__2:
	;
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<11 | int32(1)<<10 | int32(1)<<9 | int32(1)<<12)
	*(*int32)(unsafe.Pointer(statePtr + 32)) &= libc.CplInt32(TCL_ENCODING_END)

	bufPtr = sAllocChannelBuffer(tls, len)
	libc.Xmemcpy(tls, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded), str, uint64(len))
	*(*int32)(unsafe.Pointer(bufPtr + 4)) += len

	if !((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead == uintptr(0)) {
		goto __3
	}
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = bufPtr
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = bufPtr
	goto __4
__3:
	if !(atEnd != 0) {
		goto __5
	}
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr = uintptr(0)
	(*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail)).FnextPtr = bufPtr
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = bufPtr
	goto __6
__5:
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = bufPtr
__6:
	;
__4:
	;

	// Update the notifier state so we don't block while there is still data
	// in the buffers.

done:
	sUpdateInterest(tls, chanPtr)
	return len
}

//----------------------------------------------------------------------
//
// Tcl_Flush --
//
//	Flushes output data on a channel.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May flush output queued on this channel.
//
//----------------------------------------------------------------------

func XTcl_Flush(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:6707:1: */
	var result int32 // Of calling FlushChannel.
	var chanPtr uintptr = chan1
	// The actual channel.
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State of actual channel.

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	if sCheckChannelErrors(tls, statePtr, int32(1)<<2) != 0 {
		return TCL_ERROR
	}

	result = sFlushChannel(tls, uintptr(0), chanPtr, 0)
	if result != 0 {
		return TCL_ERROR
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// DiscardInputQueued --
//
//	Discards any input read from the channel but not yet consumed by Tcl
//	reading commands.
//
// Results:
//	None.
//
// Side effects:
//	May discard input from the channel. If discardLastBuffer is zero,
//	leaves one buffer in place for back-filling.
//
//----------------------------------------------------------------------

func sDiscardInputQueued(tls *libc.TLS, statePtr uintptr, discardSavedBuffers int32) { /* tclIO.c:6753:1: */
	var bufPtr uintptr
	var nxtPtr uintptr
	// Loop variables.

	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = uintptr(0)
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = uintptr(0)
	for ; bufPtr != uintptr(0); bufPtr = nxtPtr {
		nxtPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
		sRecycleBuffer(tls, statePtr, bufPtr, discardSavedBuffers)
	}

	// If discardSavedBuffers is nonzero, must also discard any previously
	// saved buffer in the saveInBufPtr field.

	if discardSavedBuffers != 0 && (*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr != uintptr(0) {
		sReleaseChannelBuffer(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr)
		(*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr = uintptr(0)
	}
}

//---------------------------------------------------------------------------
//
// GetInput --
//
//	Reads input data from a device into a channel buffer.
//
//	IMPORTANT!  This routine is only called on a chanPtr argument
//	that is the top channel of a stack!
//
// Results:
//	The return value is the Posix error code if an error occurred while
//	reading from the file, or 0 otherwise.
//
// Side effects:
//	Reads from the underlying device.
//
//---------------------------------------------------------------------------

func sGetInput(tls *libc.TLS, chanPtr uintptr) int32 { /* tclIO.c:6802:1: */
	var toRead int32   // How much to read?
	var result int32   // Of calling driver.
	var nread int32    // How much was read from channel?
	var bufPtr uintptr // New buffer to add to input queue.
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel

	// Verify that all callers know better than to call us when
	// it's recorded that the next char waiting to be read is the
	// eofchar.

	// Prevent reading from a dead channel -- a channel that has been closed
	// but not yet deallocated, which can happen if the exit handler for
	// channel cleanup has run but the channel is still registered in some
	// interpreter.

	if sCheckForDeadChannel(tls, uintptr(0), statePtr) != 0 {
		return EINVAL
	}

	// WARNING: There was once a comment here claiming that it was
	// a bad idea to make another call to the inputproc of a channel
	// driver when EOF has already been detected on the channel.  Through
	// much of Tcl's history, this warning was then completely negated
	// by having all (most?) read paths clear the EOF setting before
	// reaching here.  So we had a guard that was never triggered.
	//
	// Don't be tempted to restore the guard.  Even if EOF is set on
	// the channel, continue through and call the inputproc again.  This
	// is the way to enable the ability to [read] again beyond the EOF,
	// which seems a strange thing to do, but for which use cases exist
	// [Tcl Bug 5adc350683] and which may even be essential for channels
	// representing things like ttys or other devices where the stream
	// might take the logical form of a series of 'files' separated by
	// an EOF condition.

	// First check for more buffers in the pushback area of the topmost
	// channel in the stack and use them. They can be the result of a
	// transformation which went away without reading all the information
	// placed in the area when it was stacked.

	if (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead != uintptr(0) {
		// TODO: Tests to cover this.

		(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead
		(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = (*Channel)(unsafe.Pointer(chanPtr)).FinQueueTail
		(*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead = uintptr(0)
		(*Channel)(unsafe.Pointer(chanPtr)).FinQueueTail = uintptr(0)
		return 0
	}

	// Nothing in the pushback area, fall back to the usual handling (driver,
	// etc.)

	// See if we can fill an existing buffer. If we can, read only as much as
	// will fit in it. Otherwise allocate a new buffer, add it to the input
	// queue and attempt to fill it to the max.

	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail

	if bufPtr == uintptr(0) || bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded >= (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength {
		bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr
		(*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr = uintptr(0)

		// Check the actual buffersize against the requested buffersize.
		// Saved buffers of the wrong size are squashed. This is done to honor
		// dynamic changes of the buffersize made by the user.
		//
		// TODO: Tests to cover this.

		if bufPtr != uintptr(0) &&
			(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength-BUFFER_PADDING != (*ChannelState)(unsafe.Pointer(statePtr)).FbufSize {
			sReleaseChannelBuffer(tls, bufPtr)
			bufPtr = uintptr(0)
		}

		if bufPtr == uintptr(0) {
			bufPtr = sAllocChannelBuffer(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FbufSize)
		}
		(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr = uintptr(0)

		toRead = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded

		if (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail == uintptr(0) {
			(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = bufPtr
		} else {
			(*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail)).FnextPtr = bufPtr
		}
		(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = bufPtr
	} else {
		toRead = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded
	}

	sPreserveChannelBuffer(tls, bufPtr)
	nread = sChanRead(tls, chanPtr, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded), toRead)

	if nread < 0 {
		result = XTcl_GetErrno(tls)
	} else {
		result = 0
		*(*int32)(unsafe.Pointer(bufPtr + 4)) += nread
	}

	sReleaseChannelBuffer(tls, bufPtr)
	return result
}

//----------------------------------------------------------------------
//
// Tcl_Seek --
//
//	Implements seeking on Tcl Channels. This is a public function so that
//	other C facilities may be implemented on top of it.
//
// Results:
//	The new access point or -1 on error. If error, use Tcl_GetErrno() to
//	retrieve the POSIX error code for the error that occurred.
//
// Side effects:
//	May flush output on the channel. May discard queued input.
//
//----------------------------------------------------------------------

func XTcl_Seek(tls *libc.TLS, chan1 Tcl_Channel, offset Tcl_WideInt, mode int32) Tcl_WideInt { /* tclIO.c:6949:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var chanPtr uintptr = chan1
	// The real IO channel.
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var inputBuffered int32
	var outputBuffered int32
	// # bytes held in buffers.
	// var result int32 at bp, 4
	// Of device driver operations.
	var curPos Tcl_WideInt // Position on the device.
	var wasAsync int32     // Was the channel nonblocking before the seek
	// operation? If so, must restore to
	// non-blocking mode after the seek.

	if sCheckChannelErrors(tls, statePtr, int32(1)<<2|int32(1)<<1) != 0 {
		return int64(-1)
	}

	// Disallow seek on dead channels - channels that have been closed but not
	// yet been deallocated. Such channels can be found if the exit handler
	// for channel cleanup has run but the channel is still registered in an
	// interpreter.

	if sCheckForDeadChannel(tls, uintptr(0), statePtr) != 0 {
		return int64(-1)
	}

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	// Disallow seek on channels whose type does not have a seek procedure
	// defined. This means that the channel does not support seeking.

	if XTcl_ChannelSeekProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr) == uintptr(0) {
		XTcl_SetErrno(tls, EINVAL)
		return int64(-1)
	}

	// Compute how much input and output is buffered. If both input and output
	// is buffered, cannot compute the current position.

	inputBuffered = XTcl_InputBuffered(tls, chan1)
	outputBuffered = XTcl_OutputBuffered(tls, chan1)

	if inputBuffered != 0 && outputBuffered != 0 {
		XTcl_SetErrno(tls, EFAULT)
		return int64(-1)
	}

	// If we are seeking relative to the current position, compute the
	// corrected offset taking into account the amount of unread input.

	if mode == SEEK_CUR {
		offset = offset - Tcl_WideInt(inputBuffered)
	}

	// Discard any queued input - this input should not be read after the
	// seek.

	sDiscardInputQueued(tls, statePtr, 0)

	// Reset EOF and BLOCKED flags. We invalidate them by moving the access
	// point. Also clear CR related flags.

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0 {
		*(*int32)(unsafe.Pointer(statePtr + 32)) |= TCL_ENCODING_START
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<9 | int32(1)<<10 | int32(1)<<11 | int32(1)<<12)
	*(*int32)(unsafe.Pointer(statePtr + 32)) &= libc.CplInt32(TCL_ENCODING_END)

	// If the channel is in asynchronous output mode, switch it back to
	// synchronous mode and cancel any async flush that may be scheduled.
	// After the flush, the channel will be put back into asynchronous output
	// mode.

	wasAsync = 0
	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<3) != 0 {
		wasAsync = 1
		*(*int32)(unsafe.Pointer(bp /* result */)) = sStackSetBlockMode(tls, chanPtr, TCL_MODE_BLOCKING)
		if *(*int32)(unsafe.Pointer(bp)) != 0 {
			return int64(-1)
		}
		*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 3)
		if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0 {
			*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 7)
		}
	}

	// If the flush fails we cannot recover the original position. In that
	// case the seek is not attempted because we do not know where the access
	// position is - instead we return the error. FlushChannel has already
	// called Tcl_SetErrno() to report the error upwards. If the flush
	// succeeds we do the seek also.

	if sFlushChannel(tls, uintptr(0), chanPtr, 0) != 0 {
		curPos = int64(-1)
	} else {
		// Now seek to the new position in the channel as requested by the
		// caller.

		curPos = sChanSeek(tls, chanPtr, offset, mode, bp)
		if curPos == int64(-1) {
			XTcl_SetErrno(tls, *(*int32)(unsafe.Pointer(bp /* result */)))
		}
	}

	// Restore to nonblocking mode if that was the previous behavior.
	//
	// NOTE: Even if there was an async flush active we do not restore it now
	// because we already flushed all the queued output, above.

	if wasAsync != 0 {
		*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 3
		*(*int32)(unsafe.Pointer(bp /* result */)) = sStackSetBlockMode(tls, chanPtr, TCL_MODE_NONBLOCKING)
		if *(*int32)(unsafe.Pointer(bp)) != 0 {
			return int64(-1)
		}
	}

	return curPos
}

//----------------------------------------------------------------------
//
// Tcl_Tell --
//
//	Returns the position of the next character to be read/written on this
//	channel.
//
// Results:
//	A nonnegative integer on success, -1 on failure. If failed, use
//	Tcl_GetErrno() to retrieve the POSIX error code for the error that
//	occurred.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_Tell(tls *libc.TLS, chan1 Tcl_Channel) Tcl_WideInt { /* tclIO.c:7118:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var chanPtr uintptr = chan1
	// The real IO channel.
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var inputBuffered int32
	var outputBuffered int32
	// # bytes held in buffers.
	// var result int32 at bp, 4
	// Of calling device driver.
	var curPos Tcl_WideInt // Position on device.

	if sCheckChannelErrors(tls, statePtr, int32(1)<<2|int32(1)<<1) != 0 {
		return int64(-1)
	}

	// Disallow tell on dead channels -- channels that have been closed but
	// not yet been deallocated. Such channels can be found if the exit
	// handler for channel cleanup has run but the channel is still registered
	// in an interpreter.

	if sCheckForDeadChannel(tls, uintptr(0), statePtr) != 0 {
		return int64(-1)
	}

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	// Disallow tell on channels whose type does not have a seek procedure
	// defined. This means that the channel does not support seeking.

	if XTcl_ChannelSeekProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr) == uintptr(0) {
		XTcl_SetErrno(tls, EINVAL)
		return int64(-1)
	}

	// Compute how much input and output is buffered. If both input and output
	// is buffered, cannot compute the current position.

	inputBuffered = XTcl_InputBuffered(tls, chan1)
	outputBuffered = XTcl_OutputBuffered(tls, chan1)

	// Get the current position in the device and compute the position where
	// the next character will be read or written. Note that we prefer the
	// wideSeekProc if that is available and non-NULL...

	curPos = sChanSeek(tls, chanPtr, int64(0), SEEK_CUR, bp)
	if curPos == int64(-1) {
		XTcl_SetErrno(tls, *(*int32)(unsafe.Pointer(bp /* result */)))
		return int64(-1)
	}

	if inputBuffered != 0 {
		return curPos - Tcl_WideInt(inputBuffered)
	}
	return curPos + Tcl_WideInt(outputBuffered)
}

//---------------------------------------------------------------------------
//
// Tcl_SeekOld, Tcl_TellOld --
//
//	Backward-compatibility versions of the seek/tell interface that do not
//	support 64-bit offsets. This interface is not documented or expected
//	to be supported indefinitely.
//
// Results:
//	As for Tcl_Seek and Tcl_Tell respectively, except truncated to
//	whatever value will fit in an 'int'.
//
// Side effects:
//	As for Tcl_Seek and Tcl_Tell respectively.
//
//---------------------------------------------------------------------------

func XTcl_SeekOld(tls *libc.TLS, chan1 Tcl_Channel, offset int32, mode int32) int32 { /* tclIO.c:7207:1: */
	var wOffset Tcl_WideInt
	var wResult Tcl_WideInt

	wOffset = Tcl_WideInt(int32(offset))
	wResult = XTcl_Seek(tls, chan1, wOffset, mode)
	return int32(int32(wResult))
}

func XTcl_TellOld(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:7220:1: */
	var wResult Tcl_WideInt = XTcl_Tell(tls, chan1)

	return int32(int32(wResult))
}

//---------------------------------------------------------------------------
//
// Tcl_TruncateChannel --
//
//	Truncate a channel to the given length.
//
// Results:
//	TCL_OK on success, TCL_ERROR if the operation failed (e.g., is not
//	supported by the type of channel, or the underlying OS operation
//	failed in some way).
//
// Side effects:
//	Seeks the channel to the current location. Sets errno on OS error.
//
//---------------------------------------------------------------------------

func XTcl_TruncateChannel(tls *libc.TLS, chan1 Tcl_Channel, length Tcl_WideInt) int32 { /* tclIO.c:7247:1: */
	var chanPtr uintptr = chan1
	var truncateProc uintptr = XTcl_ChannelTruncateProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)
	var result int32

	if truncateProc == uintptr(0) {
		// Feature not supported and it's not emulatable. Pretend it's
		// returned an EINVAL, a very generic error!

		XTcl_SetErrno(tls, EINVAL)
		return TCL_ERROR
	}

	if !((*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).Fflags&(int32(1)<<2) != 0) {
		// We require that the file was opened of writing. Do that check now
		// so that we only flush if we think we're going to succeed.

		XTcl_SetErrno(tls, EINVAL)
		return TCL_ERROR
	}

	// Seek first to force a total flush of all pending buffers and ditch any
	// pre-read input data.

	sWillWrite(tls, chanPtr)

	if sWillRead(tls, chanPtr) < 0 {
		return TCL_ERROR
	}

	// We're all flushed to disk now and we also don't have any unfortunate
	// input baggage around either; can truncate with impunity.

	result = (*struct {
		f func(*libc.TLS, ClientData, Tcl_WideInt) int32
	})(unsafe.Pointer(&struct{ uintptr }{truncateProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, length)
	if result != 0 {
		XTcl_SetErrno(tls, result)
		return TCL_ERROR
	}
	return TCL_OK
}

//---------------------------------------------------------------------------
//
// CheckChannelErrors --
//
//	See if the channel is in an ready state and can perform the desired
//	operation.
//
// Results:
//	The return value is 0 if the channel is OK, otherwise the return value
//	is -1 and errno is set to indicate the error.
//
// Side effects:
//	May clear the EOF and/or BLOCKED bits if reading from channel.
//
//---------------------------------------------------------------------------

func sCheckChannelErrors(tls *libc.TLS, statePtr uintptr, flags int32) int32 { /* tclIO.c:7319:1: */
	var direction int32 = flags & (int32(1)<<1 | int32(1)<<2)

	// Check for unreported error.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError != 0 {
		XTcl_SetErrno(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError)
		(*ChannelState)(unsafe.Pointer(statePtr)).FunreportedError = 0

		// TIP #219, Tcl Channel Reflection API.
		// Move a defered error message back into the channel bypass.

		if (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg != uintptr(0) {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg + 32)) = XtclFreeObjList
						XtclFreeObjList = (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg
					}
				} else {
					XTclFreeObj(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
				}
			}

		}
		(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = (*ChannelState)(unsafe.Pointer(statePtr)).FunreportedMsg
		(*ChannelState)(unsafe.Pointer(statePtr)).FunreportedMsg = uintptr(0)
		return -1
	}

	// Only the raw read and write operations are allowed during close in
	// order to drain data from stacked channels.

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<8) != 0 && !(flags&(int32(1)<<16) != 0) {
		XTcl_SetErrno(tls, EACCES)
		return -1
	}

	// Fail if the channel is not opened for desired operation.

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&direction == 0 {
		XTcl_SetErrno(tls, EACCES)
		return -1
	}

	// Fail if the channel is in the middle of a background copy.
	//
	// Don't do this tests for raw channels here or else the chaining in the
	// transformation drivers will fail with 'file busy' error instead of
	// retrieving and transforming the data to copy.

	if ((*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR != 0 && flags&(int32(1)<<1) != 0 || (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW != 0 && flags&(int32(1)<<2) != 0) && flags&(int32(1)<<16) == 0 {
		XTcl_SetErrno(tls, EBUSY)
		return -1
	}

	if direction == int32(1)<<1 {
		*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 14)
	}

	return 0
}

//----------------------------------------------------------------------
//
// Tcl_Eof --
//
//	Returns 1 if the channel is at EOF, 0 otherwise.
//
// Results:
//	1 or 0, always.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_Eof(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:7405:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	// State of real channel structure.

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0 {
		return 1
	}
	return 0
}

//----------------------------------------------------------------------
//
// Tcl_InputBlocked --
//
//	Returns 1 if input is blocked on this channel, 0 otherwise.
//
// Results:
//	0 or 1, always.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_InputBlocked(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:7431:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	// State of real channel structure.

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<11) != 0 {
		return 1
	}
	return 0
}

//----------------------------------------------------------------------
//
// Tcl_InputBuffered --
//
//	Returns the number of bytes of input currently buffered in the common
//	internal buffer of a channel.
//
// Results:
//	The number of input bytes buffered, or zero if the channel is not open
//	for reading.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_InputBuffered(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:7459:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	// State of real channel structure.
	var bufPtr uintptr
	var bytesBuffered int32

	bytesBuffered = 0
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
	for ; bufPtr != uintptr(0); bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr {
		bytesBuffered = bytesBuffered + ((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)
	}

	// Don't forget the bytes in the topmost pushback area.

	for bufPtr = (*Channel)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr)).FinQueueHead; bufPtr != uintptr(0); bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr {
		bytesBuffered = bytesBuffered + ((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)
	}

	return bytesBuffered
}

//----------------------------------------------------------------------
//
// Tcl_OutputBuffered --
//
//    Returns the number of bytes of output currently buffered in the common
//    internal buffer of a channel.
//
// Results:
//    The number of output bytes buffered, or zero if the channel is not open
//    for writing.
//
// Side effects:
//    None.
//
//----------------------------------------------------------------------

func XTcl_OutputBuffered(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:7503:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	// State of real channel structure.
	var bufPtr uintptr
	var bytesBuffered int32

	bytesBuffered = 0
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FoutQueueHead
	for ; bufPtr != uintptr(0); bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr {
		bytesBuffered = bytesBuffered + ((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)
	}
	if (*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr != uintptr(0) {
		var curOutPtr uintptr = (*ChannelState)(unsafe.Pointer(statePtr)).FcurOutPtr

		if (*ChannelBuffer)(unsafe.Pointer(curOutPtr)).FnextAdded > (*ChannelBuffer)(unsafe.Pointer(curOutPtr)).FnextRemoved {
			bytesBuffered = bytesBuffered + ((*ChannelBuffer)(unsafe.Pointer(curOutPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(curOutPtr)).FnextRemoved)
		}
	}

	return bytesBuffered
}

//----------------------------------------------------------------------
//
// Tcl_ChannelBuffered --
//
//	Returns the number of bytes of input currently buffered in the
//	internal buffer (push back area) of a channel.
//
// Results:
//	The number of input bytes buffered, or zero if the channel is not open
//	for reading.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelBuffered(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:7545:1: */
	var chanPtr uintptr = chan1
	// Real channel structure.
	var bufPtr uintptr
	var bytesBuffered int32 = 0

	for bufPtr = (*Channel)(unsafe.Pointer(chanPtr)).FinQueueHead; bufPtr != uintptr(0); bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr {
		bytesBuffered = bytesBuffered + ((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)
	}

	return bytesBuffered
}

//----------------------------------------------------------------------
//
// Tcl_SetChannelBufferSize --
//
//	Sets the size of buffers to allocate to store input or output in the
//	channel. The size must be between 1 byte and 1 MByte.
//
// Results:
//	None.
//
// Side effects:
//	Sets the size of buffers subsequently allocated for this channel.
//
//----------------------------------------------------------------------

func XTcl_SetChannelBufferSize(tls *libc.TLS, chan1 Tcl_Channel, sz int32) { /* tclIO.c:7579:1: */
	var statePtr uintptr // State of real channel structure.

	// Clip the buffer size to force it into the [1,1M] range

	if sz < 1 {
		sz = 1
	} else if sz > 1024*1024 {
		sz = 1024 * 1024
	}

	statePtr = (*Channel)(unsafe.Pointer(chan1)).Fstate

	if (*ChannelState)(unsafe.Pointer(statePtr)).FbufSize == sz {
		return
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FbufSize = sz

	// If bufsize changes, need to get rid of old utility buffer.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr != uintptr(0) {
		sRecycleBuffer(tls, statePtr, (*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr, 1)
		(*ChannelState)(unsafe.Pointer(statePtr)).FsaveInBufPtr = uintptr(0)
	}
	if (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead != uintptr(0) &&
		(*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead)).FnextPtr == uintptr(0) &&
		(*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead)).FnextAdded == (*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead)).FnextRemoved {
		sRecycleBuffer(tls, statePtr, (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead, 1)
		(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = uintptr(0)
		(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = uintptr(0)
	}
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelBufferSize --
//
//	Retrieves the size of buffers to allocate for this channel.
//
// Results:
//	The size.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetChannelBufferSize(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:7636:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	// State of real channel structure.

	return (*ChannelState)(unsafe.Pointer(statePtr)).FbufSize
}

//
// ----------------------------------------------------------------------
//
//  Tcl_BadChannelOption --
//
// 	This procedure generates a "bad option" error message in an (optional)
// 	interpreter. It is used by channel drivers when a invalid Set/Get
// 	option is requested. Its purpose is to concatenate the generic options
// 	list to the specific ones and factorize the generic options error
// 	message string.
//
//  Results:
// 	TCL_ERROR.
//
//  Side effects:
//
//  *	An error message is generated in interp's result object to indicate
//  *	that a command was invoked with the a bad option. The message has the
//  *	form:
//  *		bad option "blah": should be one of
//  *		<...generic options...>+<...specific options...>
//  *	"blah" is the optionName argument and "<specific options>" is a space
//  *	separated list of specific option words. The function takes good care
//  *	of inserting minus signs before each option, commas after, and an "or"
//  *	before the last option.
//  *
//  *----------------------------------------------------------------------
//

func XTcl_BadChannelOption(tls *libc.TLS, interp uintptr, optionName uintptr, optionList uintptr) int32 { /* tclIO.c:7676:1: */
	bp := tls.Alloc(256)
	defer tls.Free(256)

	if interp != uintptr(0) {
		var genericopt uintptr = ts + 34034 /* "blocking bufferi..." */
		// var argv uintptr at bp+248, 8

		// var argc int32 at bp+240, 4

		var i int32
		// var ds Tcl_DString at bp+24, 216

		var errObj uintptr

		XTcl_DStringInit(tls, bp+24)
		XTcl_DStringAppend(tls, bp+24, genericopt, -1)
		if optionList != 0 && *(*int8)(unsafe.Pointer(optionList)) != 0 {
			XTcl_DStringAppend(tls, bp+24, ts+14901, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
			XTcl_DStringAppend(tls, bp+24, optionList, -1)
		}
		if XTcl_SplitList(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring,
			bp+240, bp+248) != TCL_OK {
			XTcl_Panic(tls, ts+34093, 0)
		}
		XTcl_ResetResult(tls, interp)
		errObj = XTcl_ObjPrintf(tls, ts+34133,
			libc.VaList(bp, func() uintptr {
				if optionName != 0 {
					return optionName
				}
				return ts + 2631 /* "" */
			}()))
		*(*int32)(unsafe.Pointer(bp + 240 /* argc */))--
		for i = 0; i < *(*int32)(unsafe.Pointer(bp + 240 /* argc */)); i++ {
			XTcl_AppendPrintfToObj(tls, errObj, ts+34168, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248 /* argv */)) + uintptr(i)*8))))
		}
		XTcl_AppendPrintfToObj(tls, errObj, ts+34174, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248 /* argv */)) + uintptr(i)*8))))
		XTcl_SetObjResult(tls, interp, errObj)
		XTcl_DStringFree(tls, bp+24)
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 248)))
	}
	XTcl_SetErrno(tls, EINVAL)
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelOption --
//
//	Gets a mode associated with an IO channel. If the optionName arg is
//	non NULL, retrieves the value of that option. If the optionName arg is
//	NULL, retrieves a list of alternating option names and values for the
//	given channel.
//
// Results:
//	A standard Tcl result. Also sets the supplied DString to the string
//	value of the option(s) returned.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetChannelOption(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel, optionName uintptr, dsPtr uintptr) int32 { /* tclIO.c:7738:1: */
	bp := tls.Alloc(152)
	defer tls.Free(152)

	var len Size_t // Length of optionName string.
	// var optionVal [128]int8 at bp+16, 128
	// Buffer for sprintf.
	var chanPtr uintptr = chan1
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var flags int32

	// Disallow options on dead channels -- channels that have been closed but
	// not yet been deallocated. Such channels can be found if the exit
	// handler for channel cleanup has run but the channel is still registered
	// in an interpreter.

	if sCheckForDeadChannel(tls, interp, statePtr) != 0 {
		return TCL_ERROR
	}

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	// If we are in the middle of a background copy, use the saved flags.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR != 0 {
		flags = (*CopyState1)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR)).FreadFlags
	} else if (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW != 0 {
		flags = (*CopyState1)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW)).FwriteFlags
	} else {
		flags = (*ChannelState)(unsafe.Pointer(statePtr)).Fflags
	}

	// If the optionName is NULL it means that we want a list of all options
	// and values.

	if optionName == uintptr(0) {
		len = uint64(0)
	} else {
		len = libc.Xstrlen(tls, optionName)
	}

	if len == uint64(0) || len > uint64(2) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 32554 + 1))) && libc.Xstrncmp(tls, optionName, ts+32554, len) == 0 {
		if len == uint64(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+32554)
		}
		XTcl_DStringAppendElement(tls, dsPtr,
			func() uintptr {
				if flags&(int32(1)<<3) != 0 {
					return ts + 18935 /* "0" */
				}
				return ts + 18937 /* "1" */
			}())
		if len > uint64(0) {
			return TCL_OK
		}
	}
	if len == uint64(0) || len > uint64(7) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 34181 + 1))) && libc.Xstrncmp(tls, optionName, ts+34181, len) == 0 {
		if len == uint64(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+34181)
		}
		if flags&(int32(1)<<4) != 0 {
			XTcl_DStringAppendElement(tls, dsPtr, ts+14319)
		} else if flags&(int32(1)<<5) != 0 {
			XTcl_DStringAppendElement(tls, dsPtr, ts+34192)
		} else {
			XTcl_DStringAppendElement(tls, dsPtr, ts+34197)
		}
		if len > uint64(0) {
			return TCL_OK
		}
	}
	if len == uint64(0) || len > uint64(7) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 34202 + 1))) && libc.Xstrncmp(tls, optionName, ts+34202, len) == 0 {
		if len == uint64(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+34202)
		}
		XTclFormatInt(tls, bp+16, int32((*ChannelState)(unsafe.Pointer(statePtr)).FbufSize))
		XTcl_DStringAppendElement(tls, dsPtr, bp+16)
		if len > uint64(0) {
			return TCL_OK
		}
	}
	if len == uint64(0) || len > uint64(2) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 16536 + 1))) && libc.Xstrncmp(tls, optionName, ts+16536, len) == 0 {
		if len == uint64(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+16536)
		}
		if (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding == uintptr(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+10063)
		} else {
			XTcl_DStringAppendElement(tls, dsPtr,
				XTcl_GetEncodingName(tls, (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding))
		}
		if len > uint64(0) {
			return TCL_OK
		}
	}
	if len == uint64(0) || len > uint64(2) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 34214 + 1))) && libc.Xstrncmp(tls, optionName, ts+34214, len) == 0 {
		if len == uint64(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+34214)
		}
		if flags&(int32(1)<<1|int32(1)<<2) == int32(1)<<1|int32(1)<<2 && len == uint64(0) {
			XTcl_DStringStartSublist(tls, dsPtr)
		}
		if flags&(int32(1)<<1) != 0 {
			if (*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar == 0 {
				XTcl_DStringAppendElement(tls, dsPtr, ts+2631)
			} else {
				// var buf [4]int8 at bp+144, 4

				libc.Xsprintf(tls, bp+144, ts+25665, libc.VaList(bp, (*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar))
				XTcl_DStringAppendElement(tls, dsPtr, bp+144)
			}
		}
		if flags&(int32(1)<<2) != 0 {
			if (*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar == 0 {
				XTcl_DStringAppendElement(tls, dsPtr, ts+2631)
			} else {
				// var buf [4]int8 at bp+148, 4

				libc.Xsprintf(tls, bp+148, ts+25665, libc.VaList(bp+8, (*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar))
				XTcl_DStringAppendElement(tls, dsPtr, bp+148)
			}
		}
		if !(flags&(int32(1)<<1|int32(1)<<2) != 0) {
			// Not readable or writable (e.g. server socket)

			XTcl_DStringAppendElement(tls, dsPtr, ts+2631)
		}
		if flags&(int32(1)<<1|int32(1)<<2) == int32(1)<<1|int32(1)<<2 && len == uint64(0) {
			XTcl_DStringEndSublist(tls, dsPtr)
		}
		if len > uint64(0) {
			return TCL_OK
		}
	}
	if len == uint64(0) || len > uint64(1) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 34223 + 1))) && libc.Xstrncmp(tls, optionName, ts+34223, len) == 0 {
		if len == uint64(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+34223)
		}
		if flags&(int32(1)<<1|int32(1)<<2) == int32(1)<<1|int32(1)<<2 && len == uint64(0) {
			XTcl_DStringStartSublist(tls, dsPtr)
		}
		if flags&(int32(1)<<1) != 0 {
			if (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation == TCL_TRANSLATE_AUTO {
				XTcl_DStringAppendElement(tls, dsPtr, ts+34236)
			} else if (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation == TCL_TRANSLATE_CR {
				XTcl_DStringAppendElement(tls, dsPtr, ts+34241)
			} else if (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation == TCL_TRANSLATE_CRLF {
				XTcl_DStringAppendElement(tls, dsPtr, ts+34244)
			} else {
				XTcl_DStringAppendElement(tls, dsPtr, ts+34249)
			}
		}
		if flags&(int32(1)<<2) != 0 {
			if (*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation == TCL_TRANSLATE_AUTO {
				XTcl_DStringAppendElement(tls, dsPtr, ts+34236)
			} else if (*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation == TCL_TRANSLATE_CR {
				XTcl_DStringAppendElement(tls, dsPtr, ts+34241)
			} else if (*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation == TCL_TRANSLATE_CRLF {
				XTcl_DStringAppendElement(tls, dsPtr, ts+34244)
			} else {
				XTcl_DStringAppendElement(tls, dsPtr, ts+34249)
			}
		}
		if !(flags&(int32(1)<<1|int32(1)<<2) != 0) {
			// Not readable or writable (e.g. server socket)

			XTcl_DStringAppendElement(tls, dsPtr, ts+34236)
		}
		if flags&(int32(1)<<1|int32(1)<<2) == int32(1)<<1|int32(1)<<2 && len == uint64(0) {
			XTcl_DStringEndSublist(tls, dsPtr)
		}
		if len > uint64(0) {
			return TCL_OK
		}
	}

	if (*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FgetOptionProc != uintptr(0) {
		// Let the driver specific handle additional options and result code
		// and message.

		return (*struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FgetOptionProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, interp,
			optionName, dsPtr)
	} else {
		// No driver specific options case.

		if len == uint64(0) {
			return TCL_OK
		}
		return XTcl_BadChannelOption(tls, interp, optionName, uintptr(0))
	}
	return int32(0)
}

//---------------------------------------------------------------------------
//
// Tcl_SetChannelOption --
//
//	Sets an option on a channel.
//
// Results:
//	A standard Tcl result. On error, sets interp's result object if
//	interp is not NULL.
//
// Side effects:
//	May modify an option on a device.
//
//---------------------------------------------------------------------------

func XTcl_SetChannelOption(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel, optionName uintptr, newValue uintptr) int32 { /* tclIO.c:7967:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var chanPtr uintptr = chan1
	// The real IO channel.
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var len Size_t // Length of optionName string.
	// var argc int32 at bp+8, 4

	// var argv uintptr at bp+16, 8

	// If the channel is in the middle of a background copy, fail.

	if (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrR != 0 || (*ChannelState)(unsafe.Pointer(statePtr)).FcsPtrW != 0 {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

				ts+34252, -1))
		}
		return TCL_ERROR
	}

	// Disallow options on dead channels -- channels that have been closed but
	// not yet been deallocated. Such channels can be found if the exit
	// handler for channel cleanup has run but the channel is still registered
	// in an interpreter.

	if sCheckForDeadChannel(tls, uintptr(0), statePtr) != 0 {
		return TCL_ERROR
	}

	// This operation should occur at the top of a channel stack.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr

	len = libc.Xstrlen(tls, optionName)

	if len > uint64(2) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 32554 + 1))) && libc.Xstrncmp(tls, optionName, ts+32554, len) == 0 {
		// var newMode int32 at bp, 4

		if XTcl_GetBoolean(tls, interp, newValue, bp) == TCL_ERROR {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp)) != 0 {
			*(*int32)(unsafe.Pointer(bp /* newMode */)) = TCL_MODE_BLOCKING
		} else {
			*(*int32)(unsafe.Pointer(bp /* newMode */)) = TCL_MODE_NONBLOCKING
		}
		return sSetBlockMode(tls, interp, chanPtr, *(*int32)(unsafe.Pointer(bp /* newMode */)))
	} else if len > uint64(7) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 34181 + 1))) && libc.Xstrncmp(tls, optionName, ts+34181, len) == 0 {
		len = libc.Xstrlen(tls, newValue)
		if int32(*(*int8)(unsafe.Pointer(newValue))) == 'f' && libc.Xstrncmp(tls, newValue, ts+34197, len) == 0 {
			*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<5 | int32(1)<<4)
		} else if int32(*(*int8)(unsafe.Pointer(newValue))) == 'l' && libc.Xstrncmp(tls, newValue, ts+14319, len) == 0 {
			*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 5)
			*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 4
		} else if int32(*(*int8)(unsafe.Pointer(newValue))) == 'n' && libc.Xstrncmp(tls, newValue, ts+34192, len) == 0 {
			*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 4)
			*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 5
		} else if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

				ts+34311, -1))
			return TCL_ERROR
		}
		return TCL_OK
	} else if len > uint64(7) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 34202 + 1))) && libc.Xstrncmp(tls, optionName, ts+34202, len) == 0 {
		// var newBufferSize int32 at bp+4, 4

		if XTcl_GetInt(tls, interp, newValue, bp+4) == TCL_ERROR {
			return TCL_ERROR
		}
		XTcl_SetChannelBufferSize(tls, chan1, *(*int32)(unsafe.Pointer(bp + 4 /* newBufferSize */)))
		return TCL_OK
	} else if len > uint64(2) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 16536 + 1))) && libc.Xstrncmp(tls, optionName, ts+16536, len) == 0 {
		var encoding Tcl_Encoding

		if int32(*(*int8)(unsafe.Pointer(newValue))) == 0 || libc.Xstrcmp(tls, newValue, ts+10063) == 0 {
			encoding = uintptr(0)
		} else {
			encoding = XTcl_GetEncoding(tls, interp, newValue)
			if encoding == uintptr(0) {
				return TCL_ERROR
			}
		}

		// When the channel has an escape sequence driven encoding such as
		// iso2022, the terminated escape sequence must write to the buffer.

		if (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding != uintptr(0) &&
			!((*ChannelState)(unsafe.Pointer(statePtr)).FoutputEncodingFlags&TCL_ENCODING_START != 0) &&
			sCheckChannelErrors(tls, statePtr, int32(1)<<2) == 0 {
			*(*int32)(unsafe.Pointer(statePtr + 48)) |= TCL_ENCODING_END
			sWrite(tls, chanPtr, ts+2631, 0, (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).Fencoding)
		}
		XTcl_FreeEncoding(tls, (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding)
		(*ChannelState)(unsafe.Pointer(statePtr)).Fencoding = encoding
		(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingState = uintptr(0)
		(*ChannelState)(unsafe.Pointer(statePtr)).FinputEncodingFlags = TCL_ENCODING_START
		(*ChannelState)(unsafe.Pointer(statePtr)).FoutputEncodingState = uintptr(0)
		(*ChannelState)(unsafe.Pointer(statePtr)).FoutputEncodingFlags = TCL_ENCODING_START
		*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 14)
		sUpdateInterest(tls, chanPtr)
		return TCL_OK
	} else if len > uint64(2) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 34214 + 1))) && libc.Xstrncmp(tls, optionName, ts+34214, len) == 0 {
		if XTcl_SplitList(tls, interp, newValue, bp+8, bp+16) == TCL_ERROR {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 8)) == 0 {
			(*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar = 0
			(*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar = 0
		} else if *(*int32)(unsafe.Pointer(bp + 8)) == 1 || *(*int32)(unsafe.Pointer(bp + 8)) == 2 {
			var outIndex int32 = *(*int32)(unsafe.Pointer(bp + 8)) - 1
			var inValue int32 = int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* argv */)))))))
			var outValue int32 = int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* argv */)) + uintptr(outIndex)*8)))))

			if inValue&0x80 != 0 || outValue&0x80 != 0 {
				if interp != 0 {
					XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

						ts+34372, -1))
				}
				XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
				return TCL_ERROR
			}
			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<1) != 0 {
				(*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar = inValue
			}
			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<2) != 0 {
				(*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar = outValue
			}
		} else {
			if interp != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

					ts+34428, -1))
			}
			XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
			return TCL_ERROR
		}
		if *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
			XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
		}

		// [Bug 930851] Reset EOF and BLOCKED flags. Changing the character
		// which signals eof can transform a current eof condition into a 'go
		// ahead'. Ditto for blocked.

		if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0 {
			*(*int32)(unsafe.Pointer(statePtr + 32)) |= TCL_ENCODING_START
		}
		*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<9 | int32(1)<<10 | int32(1)<<11)
		*(*int32)(unsafe.Pointer(statePtr + 32)) &= libc.CplInt32(TCL_ENCODING_END)
		return TCL_OK
	} else if len > uint64(1) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == int32(*(*int8)(unsafe.Pointer(ts + 34223 + 1))) && libc.Xstrncmp(tls, optionName, ts+34223, len) == 0 {
		var readMode uintptr
		var writeMode uintptr

		if XTcl_SplitList(tls, interp, newValue, bp+8, bp+16) == TCL_ERROR {
			return TCL_ERROR
		}

		if *(*int32)(unsafe.Pointer(bp + 8)) == 1 {
			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<1) != 0 {
				readMode = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* argv */))))
			} else {
				readMode = uintptr(0)
			}
			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<2) != 0 {
				writeMode = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* argv */))))
			} else {
				writeMode = uintptr(0)
			}
		} else if *(*int32)(unsafe.Pointer(bp + 8)) == 2 {
			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<1) != 0 {
				readMode = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* argv */))))
			} else {
				readMode = uintptr(0)
			}
			if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<2) != 0 {
				writeMode = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* argv */)) + 1*8))
			} else {
				writeMode = uintptr(0)
			}
		} else {
			if interp != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

					ts+34499, -1))
			}
			XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
			return TCL_ERROR
		}

		if readMode != 0 {
			var translation TclEolTranslation

			if int32(*(*int8)(unsafe.Pointer(readMode))) == 0 {
				translation = (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation
			} else if libc.Xstrcmp(tls, readMode, ts+34236) == 0 {
				translation = TCL_TRANSLATE_AUTO
			} else if libc.Xstrcmp(tls, readMode, ts+10063) == 0 {
				translation = TCL_TRANSLATE_LF
				(*ChannelState)(unsafe.Pointer(statePtr)).FinEofChar = 0
				XTcl_FreeEncoding(tls, (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding)
				(*ChannelState)(unsafe.Pointer(statePtr)).Fencoding = uintptr(0)
			} else if libc.Xstrcmp(tls, readMode, ts+34249) == 0 {
				translation = TCL_TRANSLATE_LF
			} else if libc.Xstrcmp(tls, readMode, ts+34241) == 0 {
				translation = TCL_TRANSLATE_CR
			} else if libc.Xstrcmp(tls, readMode, ts+34244) == 0 {
				translation = TCL_TRANSLATE_CRLF
			} else if libc.Xstrcmp(tls, readMode, ts+34561) == 0 {
				translation = TCL_TRANSLATE_CRLF
			} else {
				if interp != 0 {
					XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

						ts+34570, -1))
				}
				XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
				return TCL_ERROR
			}

			// Reset the EOL flags since we need to look at any buffered data
			// to see if the new translation mode allows us to complete the
			// line.

			if translation != (*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation {
				(*ChannelState)(unsafe.Pointer(statePtr)).FinputTranslation = translation
				*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<12 | int32(1)<<14)
				sUpdateInterest(tls, chanPtr)
			}
		}
		if writeMode != 0 {
			if int32(*(*int8)(unsafe.Pointer(writeMode))) == 0 {
				// Do nothing.
			} else if libc.Xstrcmp(tls, writeMode, ts+34236) == 0 {
				// This is a hack to get TCP sockets to produce output in CRLF
				// mode if they are being set into AUTO mode. A better
				// solution for achieving this effect will be coded later.

				if libc.Xstrcmp(tls, XTcl_ChannelName(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr), ts+34653) == 0 {
					(*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation = TCL_TRANSLATE_CRLF
				} else {
					(*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation = TCL_TRANSLATE_CRLF
				}
			} else if libc.Xstrcmp(tls, writeMode, ts+10063) == 0 {
				(*ChannelState)(unsafe.Pointer(statePtr)).FoutEofChar = 0
				(*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation = TCL_TRANSLATE_LF
				XTcl_FreeEncoding(tls, (*ChannelState)(unsafe.Pointer(statePtr)).Fencoding)
				(*ChannelState)(unsafe.Pointer(statePtr)).Fencoding = uintptr(0)
			} else if libc.Xstrcmp(tls, writeMode, ts+34249) == 0 {
				(*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation = TCL_TRANSLATE_LF
			} else if libc.Xstrcmp(tls, writeMode, ts+34241) == 0 {
				(*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation = TCL_TRANSLATE_CR
			} else if libc.Xstrcmp(tls, writeMode, ts+34244) == 0 {
				(*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation = TCL_TRANSLATE_CRLF
			} else if libc.Xstrcmp(tls, writeMode, ts+34561) == 0 {
				(*ChannelState)(unsafe.Pointer(statePtr)).FoutputTranslation = TCL_TRANSLATE_CRLF
			} else {
				if interp != 0 {
					XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

						ts+34570, -1))
				}
				XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
				return TCL_ERROR
			}
		}
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
		return TCL_OK
	} else if (*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FsetOptionProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)).FsetOptionProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, interp,
			optionName, newValue)
	} else {
		return XTcl_BadChannelOption(tls, interp, optionName, uintptr(0))
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// CleanupChannelHandlers --
//
//	Removes channel handlers that refer to the supplied interpreter, so
//	that if the actual channel is not closed now, these handlers will not
//	run on subsequent events on the channel. This would be erroneous,
//	because the interpreter no longer has a reference to this channel.
//
// Results:
//	None.
//
// Side effects:
//	Removes channel handlers.
//
//----------------------------------------------------------------------

func sCleanupChannelHandlers(tls *libc.TLS, interp uintptr, chanPtr uintptr) { /* tclIO.c:8271:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var sPtr uintptr
	var prevPtr uintptr
	var nextPtr uintptr

	// Remove fileevent records on this channel that refer to the given
	// interpreter.

	sPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr
	prevPtr = uintptr(0)
	for ; sPtr != uintptr(0); sPtr = nextPtr {
		nextPtr = (*EventScriptRecord)(unsafe.Pointer(sPtr)).FnextPtr
		if (*EventScriptRecord)(unsafe.Pointer(sPtr)).Finterp == interp {
			if prevPtr == uintptr(0) {
				(*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr = nextPtr
			} else {
				(*EventScriptRecord)(unsafe.Pointer(prevPtr)).FnextPtr = nextPtr
			}

			XTcl_DeleteChannelHandler(tls, chanPtr,
				*(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, int32)
				}{XTclChannelEventScriptInvoker})), sPtr)

			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = (*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr
					}
				} else {
					XTclFreeObj(tls, (*EventScriptRecord)(unsafe.Pointer(sPtr)).FscriptPtr)
				}
			}

			XTclpFree(tls, sPtr)
		} else {
			prevPtr = sPtr
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_NotifyChannel --
//
//	This procedure is called by a channel driver when a driver detects an
//	event on a channel. This procedure is responsible for actually
//	handling the event by invoking any channel handler callbacks.
//
// Results:
//	None.
//
// Side effects:
//	Whatever the channel handler callback procedure does.
//
//----------------------------------------------------------------------

func XTcl_NotifyChannel(tls *libc.TLS, channel Tcl_Channel, mask int32) { /* tclIO.c:8324:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var chanPtr uintptr
	var statePtr uintptr
	// State info for channel
	var chPtr uintptr
	var tsdPtr uintptr
	// var nh NextChannelHandler at bp, 16

	var upChanPtr uintptr
	var upTypePtr uintptr
	var upHandlerProc uintptr
	chanPtr = channel
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))

	// In contrast to the other API functions this procedure walks towards the
	// top of a stack and not down from it.
	//
	// The channel calling this procedure is the one who generated the event,
	// and thus does not take part in handling it. IOW, its HandlerProc is not
	// called, instead we begin with the channel above it.
	//
	// This behaviour also allows the transformation channels to generate
	// their own events and pass them upward.

__1:
	if !(mask != 0 && (*Channel)(unsafe.Pointer(chanPtr)).FupChanPtr != uintptr(0)) {
		goto __2
	}

	upChanPtr = (*Channel)(unsafe.Pointer(chanPtr)).FupChanPtr
	upTypePtr = (*Channel)(unsafe.Pointer(upChanPtr)).FtypePtr
	upHandlerProc = XTcl_ChannelHandlerProc(tls, upTypePtr)
	if !(upHandlerProc != uintptr(0)) {
		goto __3
	}
	mask = (*struct {
		f func(*libc.TLS, ClientData, int32) int32
	})(unsafe.Pointer(&struct{ uintptr }{upHandlerProc})).f(tls, (*Channel)(unsafe.Pointer(upChanPtr)).FinstanceData, mask)
__3:
	;

	// ELSE: Ignore transformations which are unable to handle the event
	// coming from below. Assume that they don't change the mask and pass
	// it on.

	chanPtr = upChanPtr
	goto __1
__2:
	;

	channel = chanPtr

	// Here we have either reached the top of the stack or the mask is empty.
	// We break out of the procedure if it is the latter.

	if !!(mask != 0) {
		goto __4
	}
	return
__4:
	;

	// We are now above the topmost channel in a stack and have events left.
	// Now call the channel handlers as usual.
	//
	// Preserve the channel struct in case the script closes it.

	XTclChannelPreserve(tls, channel)
	XTcl_Preserve(tls, statePtr)

	// Avoid processing if the channel owner has been changed.
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FmanagingThread != XTcl_GetCurrentThread(tls)) {
		goto __5
	}
	goto done
__5:
	;

	// If we are flushing in the background, be sure to call FlushChannel for
	// writable events. Note that we have to discard the writable event so we
	// don't call any write handlers before the flush is complete.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0 && mask&(int32(1)<<2) != 0) {
		goto __6
	}
	if !(0 == sFlushChannel(tls, uintptr(0), chanPtr, 1)) {
		goto __7
	}
	mask = mask & libc.CplInt32(int32(1)<<2)
__7:
	;
__6:
	;

	// Add this invocation to the list of recursive invocations of
	// Tcl_NotifyChannel.

	(*NextChannelHandler)(unsafe.Pointer(bp /* &nh */)).FnextHandlerPtr = uintptr(0)
	(*NextChannelHandler)(unsafe.Pointer(bp /* &nh */)).FnestedHandlerPtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FnestedHandlerPtr
	(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FnestedHandlerPtr = bp /* &nh */

	chPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FchPtr
__8:
	if !(chPtr != uintptr(0)) {
		goto __10
	}
	// If this channel handler is interested in any of the events that
	// have occurred on the channel, invoke its procedure.

	if !((*ChannelHandler)(unsafe.Pointer(chPtr)).Fmask&mask != 0) {
		goto __11
	}
	(*NextChannelHandler)(unsafe.Pointer(bp /* &nh */)).FnextHandlerPtr = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr
	(*struct {
		f func(*libc.TLS, ClientData, int32)
	})(unsafe.Pointer(&struct{ uintptr }{(*ChannelHandler)(unsafe.Pointer(chPtr)).Fproc})).f(tls, (*ChannelHandler)(unsafe.Pointer(chPtr)).FclientData, (*ChannelHandler)(unsafe.Pointer(chPtr)).Fmask&mask)
	chPtr = (*NextChannelHandler)(unsafe.Pointer(bp /* &nh */)).FnextHandlerPtr
	goto __12
__11:
	chPtr = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr
__12:
	;

	// Stop if the channel owner has been changed in-between.
	if !((*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).FmanagingThread != XTcl_GetCurrentThread(tls)) {
		goto __13
	}
	goto done
__13:
	;
	goto __9
__9:
	;
	goto __8
	goto __10
__10:
	;

	// Update the notifier interest, since it may have changed after invoking
	// event handlers. Skip that if the channel was deleted in the call to the
	// channel handler.

	if !((*Channel)(unsafe.Pointer(chanPtr)).FtypePtr != uintptr(0)) {
		goto __14
	}
	// TODO: This call may not be needed.  If a handler induced a
	// change in interest, that handler should have made its own
	// UpdateInterest() call, one would think.
	sUpdateInterest(tls, chanPtr)
__14:
	;

done:
	XTcl_Release(tls, statePtr)
	XTclChannelRelease(tls, channel)

	(*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FnestedHandlerPtr = (*NextChannelHandler)(unsafe.Pointer(bp /* &nh */)).FnestedHandlerPtr
}

//----------------------------------------------------------------------
//
// UpdateInterest --
//
//	Arrange for the notifier to call us back at appropriate times based on
//	the current state of the channel.
//
// Results:
//	None.
//
// Side effects:
//	May schedule a timer or driver handler.
//
//----------------------------------------------------------------------

func sUpdateInterest(tls *libc.TLS, chanPtr uintptr) { /* tclIO.c:8481:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var mask int32 = (*ChannelState)(unsafe.Pointer(statePtr)).FinterestMask

	if (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr == uintptr(0) {
		// Do not update interest on a closed channel
		return
	}

	// If there are flushed buffers waiting to be written, then we need to
	// watch for the channel to become writable.

	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<7) != 0 {
		mask = mask | int32(1)<<2
	}

	// If there is data in the input queue, and we aren't waiting for more
	// data, then we need to schedule a timer so we don't block in the
	// notifier. Also, cancel the read interest so we don't get duplicate
	// events.

	if mask&(int32(1)<<1) != 0 {
		if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<14) != 0) &&
			(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead != uintptr(0) &&
			(*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead)).FnextAdded > (*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead)).FnextRemoved {
			mask = mask & libc.CplInt32(int32(1)<<1)

			// Andreas Kupries, April 11, 2003
			//
			// Some operating systems (Solaris 2.6 and higher (but not Solaris
			// 2.5, go figure)) generate READABLE and EXCEPTION events when
			// select()'ing [*] on a plain file, even if EOF was not yet
			// reached. This is a problem in the following situation:
			//
			// - An extension asks to get both READABLE and EXCEPTION events.
			// - It reads data into a buffer smaller than the buffer used by
			//	 Tcl itself.
			// - It does not process all events in the event queue, but only
			//	 one, at least in some situations.
			//
			// In that case we can get into a situation where
			//
			// - Tcl drops READABLE here, because it has data in its own
			//	 buffers waiting to be read by the extension.
			// - A READABLE event is synthesized via timer.
			// - The OS still reports the EXCEPTION condition on the file.
			// - And the extension gets the EXCEPTION event first, and handles
			//	 this as EOF.
			//
			// End result ==> Premature end of reading from a file.
			//
			// The concrete example is 'Expect', and its [expect] command
			// (and at the C-level, deep in the bowels of Expect,
			// 'exp_get_next_event'. See marker 'SunOS' for commentary in
			// that function too).
			//
			// [*] As the Tcl notifier does. See also for marker 'SunOS' in
			// file 'exp_event.c' of Expect.
			//
			// Our solution here is to drop the interest in the EXCEPTION
			// events too. This compiles on all platforms, and also passes the
			// testsuite on all of them.

			mask = mask & libc.CplInt32(int32(1)<<3)

			if !(int32((*ChannelState)(unsafe.Pointer(statePtr)).Ftimer) != 0) {
				(*ChannelState)(unsafe.Pointer(statePtr)).Ftimer = XTcl_CreateTimerHandler(tls, SYNTHETIC_EVENT_TIME,
					*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sChannelTimerProc})), chanPtr)
			}
		}
	}
	sChanWatch(tls, chanPtr, mask)
}

//----------------------------------------------------------------------
//
// ChannelTimerProc --
//
//	Timer handler scheduled by UpdateInterest to monitor the channel
//	buffers until they are empty.
//
// Results:
//	None.
//
// Side effects:
//	May invoke channel handlers.
//
//----------------------------------------------------------------------

func sChannelTimerProc(tls *libc.TLS, clientData ClientData) { /* tclIO.c:8582:1: */
	var chanPtr uintptr = clientData
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<14) != 0) &&
		(*ChannelState)(unsafe.Pointer(statePtr)).FinterestMask&(int32(1)<<1) != 0 &&
		(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead != uintptr(0) &&
		(*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead)).FnextAdded > (*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead)).FnextRemoved {
		// Restart the timer in case a channel handler reenters the event loop
		// before UpdateInterest gets called by Tcl_NotifyChannel.

		(*ChannelState)(unsafe.Pointer(statePtr)).Ftimer = XTcl_CreateTimerHandler(tls, SYNTHETIC_EVENT_TIME,
			*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sChannelTimerProc})), chanPtr)
		XTcl_Preserve(tls, statePtr)
		XTcl_NotifyChannel(tls, chanPtr, int32(1)<<1)
		XTcl_Release(tls, statePtr)
	} else {
		(*ChannelState)(unsafe.Pointer(statePtr)).Ftimer = uintptr(0)
		sUpdateInterest(tls, chanPtr)
	}
}

//----------------------------------------------------------------------
//
// Tcl_CreateChannelHandler --
//
//	Arrange for a given procedure to be invoked whenever the channel
//	indicated by the chanPtr arg becomes readable or writable.
//
// Results:
//	None.
//
// Side effects:
//	From now on, whenever the I/O channel given by chanPtr becomes ready
//	in the way indicated by mask, proc will be invoked. See the manual
//	entry for details on the calling sequence to proc. If there is already
//	an event handler for chan, proc and clientData, then the mask will be
//	updated.
//
//----------------------------------------------------------------------

func XTcl_CreateChannelHandler(tls *libc.TLS, chan1 Tcl_Channel, mask int32, proc uintptr, clientData ClientData) { /* tclIO.c:8631:1: */
	var chPtr uintptr
	var chanPtr uintptr = chan1
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel

	// Check whether this channel handler is not already registered. If it is
	// not, create a new record, else reuse existing record (smash current
	// values).

	for chPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FchPtr; chPtr != uintptr(0); chPtr = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr {
		if (*ChannelHandler)(unsafe.Pointer(chPtr)).FchanPtr == chanPtr && (*ChannelHandler)(unsafe.Pointer(chPtr)).Fproc == proc && (*ChannelHandler)(unsafe.Pointer(chPtr)).FclientData == clientData {
			break
		}
	}
	if chPtr == uintptr(0) {
		chPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ChannelHandler{})))
		(*ChannelHandler)(unsafe.Pointer(chPtr)).Fmask = 0
		(*ChannelHandler)(unsafe.Pointer(chPtr)).Fproc = proc
		(*ChannelHandler)(unsafe.Pointer(chPtr)).FclientData = clientData
		(*ChannelHandler)(unsafe.Pointer(chPtr)).FchanPtr = chanPtr
		(*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FchPtr
		(*ChannelState)(unsafe.Pointer(statePtr)).FchPtr = chPtr
	}

	// The remainder of the initialization below is done regardless of whether
	// or not this is a new record or a modification of an old one.

	(*ChannelHandler)(unsafe.Pointer(chPtr)).Fmask = mask

	// Recompute the interest mask for the channel - this call may actually be
	// disabling an existing handler.

	(*ChannelState)(unsafe.Pointer(statePtr)).FinterestMask = 0
	for chPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FchPtr; chPtr != uintptr(0); chPtr = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr {
		*(*int32)(unsafe.Pointer(statePtr + 152)) |= (*ChannelHandler)(unsafe.Pointer(chPtr)).Fmask
	}

	sUpdateInterest(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr)
}

//----------------------------------------------------------------------
//
// Tcl_DeleteChannelHandler --
//
//	Cancel a previously arranged callback arrangement for an IO channel.
//
// Results:
//	None.
//
// Side effects:
//	If a callback was previously registered for this chan, proc and
//	clientData, it is removed and the callback will no longer be called
//	when the channel becomes ready for IO.
//
//----------------------------------------------------------------------

func XTcl_DeleteChannelHandler(tls *libc.TLS, chan1 Tcl_Channel, proc uintptr, clientData ClientData) { /* tclIO.c:8708:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	var chPtr uintptr
	var prevChPtr uintptr
	var chanPtr uintptr = chan1
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var nhPtr uintptr

	// Find the entry and the previous one in the list.

	prevChPtr = uintptr(0)
	chPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FchPtr
	for ; chPtr != uintptr(0); chPtr = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr {
		if (*ChannelHandler)(unsafe.Pointer(chPtr)).FchanPtr == chanPtr && (*ChannelHandler)(unsafe.Pointer(chPtr)).FclientData == clientData &&
			(*ChannelHandler)(unsafe.Pointer(chPtr)).Fproc == proc {
			break
		}
		prevChPtr = chPtr
	}

	// If not found, return without doing anything.

	if chPtr == uintptr(0) {
		return
	}

	// If Tcl_NotifyChannel is about to process this handler, tell it to
	// process the next one instead - we are going to delete *this* one.

	for nhPtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FnestedHandlerPtr; nhPtr != uintptr(0); nhPtr = (*NextChannelHandler)(unsafe.Pointer(nhPtr)).FnestedHandlerPtr {
		if (*NextChannelHandler)(unsafe.Pointer(nhPtr)).FnextHandlerPtr == chPtr {
			(*NextChannelHandler)(unsafe.Pointer(nhPtr)).FnextHandlerPtr = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr
		}
	}

	// Splice it out of the list of channel handlers.

	if prevChPtr == uintptr(0) {
		(*ChannelState)(unsafe.Pointer(statePtr)).FchPtr = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr
	} else {
		(*ChannelHandler)(unsafe.Pointer(prevChPtr)).FnextPtr = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr
	}
	XTclpFree(tls, chPtr)

	// Recompute the interest list for the channel, so that infinite loops
	// will not result if Tcl_DeleteChannelHandler is called inside an event.

	(*ChannelState)(unsafe.Pointer(statePtr)).FinterestMask = 0
	for chPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FchPtr; chPtr != uintptr(0); chPtr = (*ChannelHandler)(unsafe.Pointer(chPtr)).FnextPtr {
		*(*int32)(unsafe.Pointer(statePtr + 152)) |= (*ChannelHandler)(unsafe.Pointer(chPtr)).Fmask
	}

	sUpdateInterest(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr)
}

//----------------------------------------------------------------------
//
// DeleteScriptRecord --
//
//	Delete a script record for this combination of channel, interp and
//	mask.
//
// Results:
//	None.
//
// Side effects:
//	Deletes a script record and cancels a channel event handler.
//
//----------------------------------------------------------------------

func sDeleteScriptRecord(tls *libc.TLS, interp uintptr, chanPtr uintptr, mask int32) { /* tclIO.c:8797:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var esPtr uintptr
	var prevEsPtr uintptr

	esPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr
	prevEsPtr = uintptr(0)
__1:
	if !(esPtr != uintptr(0)) {
		goto __3
	}
	{
		if (*EventScriptRecord)(unsafe.Pointer(esPtr)).Finterp == interp && (*EventScriptRecord)(unsafe.Pointer(esPtr)).Fmask == mask {
			if esPtr == (*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr {
				(*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr = (*EventScriptRecord)(unsafe.Pointer(esPtr)).FnextPtr
			} else {

				(*EventScriptRecord)(unsafe.Pointer(prevEsPtr)).FnextPtr = (*EventScriptRecord)(unsafe.Pointer(esPtr)).FnextPtr
			}

			XTcl_DeleteChannelHandler(tls, chanPtr,
				*(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, int32)
				}{XTclChannelEventScriptInvoker})), esPtr)

			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = (*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr
					}
				} else {
					XTclFreeObj(tls, (*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)
				}
			}

			XTclpFree(tls, esPtr)

			goto __3
		}

	}
	goto __2
__2:
	prevEsPtr = esPtr
	esPtr = (*EventScriptRecord)(unsafe.Pointer(esPtr)).FnextPtr
	goto __1
	goto __3
__3:
}

//----------------------------------------------------------------------
//
// CreateScriptRecord --
//
//	Creates a record to store a script to be executed when a specific
//	event fires on a specific channel.
//
// Results:
//	None.
//
// Side effects:
//	Causes the script to be stored for later execution.
//
//----------------------------------------------------------------------

func sCreateScriptRecord(tls *libc.TLS, interp uintptr, chanPtr uintptr, mask int32, scriptPtr uintptr) { /* tclIO.c:8848:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel
	var esPtr uintptr
	var makeCH int32

	for esPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr; esPtr != uintptr(0); esPtr = (*EventScriptRecord)(unsafe.Pointer(esPtr)).FnextPtr {
		if (*EventScriptRecord)(unsafe.Pointer(esPtr)).Finterp == interp && (*EventScriptRecord)(unsafe.Pointer(esPtr)).Fmask == mask {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = (*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr
					}
				} else {
					XTclFreeObj(tls, (*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)
				}
			}

			(*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr = uintptr(0)
			break
		}
	}

	makeCH = libc.Bool32(esPtr == uintptr(0))

	if makeCH != 0 {
		esPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(EventScriptRecord{})))
	}

	// Initialize the structure before calling Tcl_CreateChannelHandler,
	// because a reflected channel calling 'chan postevent' aka
	// 'Tcl_NotifyChannel' in its 'watch'Proc will invoke
	// 'TclChannelEventScriptInvoker' immediately, and we do not wish it to
	// see uninitialized memory and crash. See [Bug 2918110].

	(*EventScriptRecord)(unsafe.Pointer(esPtr)).FchanPtr = chanPtr
	(*EventScriptRecord)(unsafe.Pointer(esPtr)).Finterp = interp
	(*EventScriptRecord)(unsafe.Pointer(esPtr)).Fmask = mask
	(*Tcl_Obj)(unsafe.Pointer(scriptPtr)).FrefCount++
	(*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr = scriptPtr

	if makeCH != 0 {
		(*EventScriptRecord)(unsafe.Pointer(esPtr)).FnextPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr
		(*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr = esPtr

		XTcl_CreateChannelHandler(tls, chanPtr, mask,
			*(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, int32)
			}{XTclChannelEventScriptInvoker})), esPtr)
	}
}

//----------------------------------------------------------------------
//
// TclChannelEventScriptInvoker --
//
//	Invokes a script scheduled by "fileevent" for when the channel becomes
//	ready for IO. This function is invoked by the channel handler which
//	was created by the Tcl "fileevent" command.
//
// Results:
//	None.
//
// Side effects:
//	Whatever the script does.
//
//----------------------------------------------------------------------

func XTclChannelEventScriptInvoker(tls *libc.TLS, clientData ClientData, mask int32) { /* tclIO.c:8917:1: */
	var interp uintptr  // Interpreter in which to eval the script.
	var chanPtr uintptr // The channel for which this handler is
	// registered.
	var esPtr uintptr // The event script + interpreter to eval it
	// in.
	var result int32 // Result of call to eval script.

	esPtr = clientData
	chanPtr = (*EventScriptRecord)(unsafe.Pointer(esPtr)).FchanPtr
	mask = (*EventScriptRecord)(unsafe.Pointer(esPtr)).Fmask
	interp = (*EventScriptRecord)(unsafe.Pointer(esPtr)).Finterp

	// Be sure event executed in managed channel (covering bugs similar [f583715154]).

	// We must preserve the interpreter so we can report errors on it later.
	// Note that we do not need to preserve the channel because that is done
	// by Tcl_NotifyChannel before calling channel handlers.

	XTcl_Preserve(tls, interp)
	XTclChannelPreserve(tls, chanPtr)
	result = XTcl_EvalObjEx(tls, interp, (*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr, TCL_EVAL_GLOBAL)

	// On error, cause a background error and remove the channel handler and
	// the script record.
	//
	// NOTE: Must delete channel handler before causing the background error
	// because the background error may want to reinstall the handler.

	if result != TCL_OK {
		if (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr != uintptr(0) {
			sDeleteScriptRecord(tls, interp, chanPtr, mask)
		}
		XTcl_BackgroundException(tls, interp, result)
	}
	XTclChannelRelease(tls, chanPtr)
	XTcl_Release(tls, interp)
}

//----------------------------------------------------------------------
//
// Tcl_FileEventObjCmd --
//
//	This procedure implements the "fileevent" Tcl command. See the user
//	documentation for details on what it does. This command is based on
//	the Tk command "fileevent" which in turn is based on work contributed
//	by Mark Diekhans.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May create a channel handler for the specified channel.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_FileEventObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIO.c:8987:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var chanPtr uintptr   // The channel to create the handler for.
	var statePtr uintptr  // State info for channel
	var chan1 Tcl_Channel // The opaque type for the channel.
	var chanName uintptr
	// var modeIndex int32 at bp+8, 4
	// Index of mode argument.
	var mask int32
	_ = dummy

	if objc != 3 && objc != 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+34657)
		return TCL_ERROR
	}
	if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&modeOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+34682, 0, bp+8) != TCL_OK {
		return TCL_ERROR
	}
	mask = maskArray[*(*int32)(unsafe.Pointer(bp + 8 /* modeIndex */))]

	chanName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	chan1 = XTcl_GetChannel(tls, interp, chanName, uintptr(0))
	if chan1 == uintptr(0) {
		return TCL_ERROR
	}
	chanPtr = chan1
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	if (*ChannelState)(unsafe.Pointer(statePtr)).Fflags&mask == 0 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+34693,
			libc.VaList(bp, func() uintptr {
				if mask == int32(1)<<1 {
					return ts + 12786 /* "readable" */
				}
				return ts + 12860 /* "writable" */
			}())))
		return TCL_ERROR
	}

	// If we are supposed to return the script, do so.

	if objc == 3 {
		var esPtr uintptr

		for esPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FscriptRecordPtr; esPtr != uintptr(0); esPtr = (*EventScriptRecord)(unsafe.Pointer(esPtr)).FnextPtr {
			if (*EventScriptRecord)(unsafe.Pointer(esPtr)).Finterp == interp && (*EventScriptRecord)(unsafe.Pointer(esPtr)).Fmask == mask {
				XTcl_SetObjResult(tls, interp, (*EventScriptRecord)(unsafe.Pointer(esPtr)).FscriptPtr)
				break
			}
		}
		return TCL_OK
	}

	// If we are supposed to delete a stored script, do so.

	if int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}()))) == 0 {
		sDeleteScriptRecord(tls, interp, chanPtr, mask)
		return TCL_OK
	}

	// Make the script record that will link between the event and the script
	// to invoke. This also creates a channel event handler which will
	// evaluate the script in the supplied interpreter.

	sCreateScriptRecord(tls, interp, chanPtr, mask, *(*uintptr)(unsafe.Pointer(objv + 3*8)))

	return TCL_OK
}

var modeOptions = [3]uintptr{ts + 12786, ts + 12860, uintptr(0)} /* tclIO.c:9000:23 */
var maskArray = [2]int32{int32(1) << 1, int32(1) << 2}           /* tclIO.c:9001:22 */

//----------------------------------------------------------------------
//
// ZeroTransferTimerProc --
//
//	Timer handler scheduled by TclCopyChannel so that -command is
//	called asynchronously even when -size is 0.
//
// Results:
//	None.
//
// Side effects:
//	Calls CopyData for -command invocation.
//
//----------------------------------------------------------------------

func sZeroTransferTimerProc(tls *libc.TLS, clientData ClientData) { /* tclIO.c:9082:1: */
	// calling CopyData with mask==0 still implies immediate invocation of the
	//  -command callback, and completion of the fcopy.
	sCopyData(tls, clientData, 0)
}

//----------------------------------------------------------------------
//
// TclCopyChannel --
//
//	This routine copies data from one channel to another, either
//	synchronously or asynchronously. If a command script is supplied, the
//	operation runs in the background. The script is invoked when the copy
//	completes. Otherwise the function waits until the copy is completed
//	before returning.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May schedule a background copy operation that causes both channels to
//	be marked busy.
//
//----------------------------------------------------------------------

func XTclCopyChannelOld(tls *libc.TLS, interp uintptr, inChan Tcl_Channel, outChan Tcl_Channel, toRead int32, cmdPtr uintptr) int32 { /* tclIO.c:9113:1: */
	return XTclCopyChannel(tls, interp, inChan, outChan, Tcl_WideInt(toRead),
		cmdPtr)
}

func XTclCopyChannel(tls *libc.TLS, interp uintptr, inChan Tcl_Channel, outChan Tcl_Channel, toRead Tcl_WideInt, cmdPtr uintptr) int32 { /* tclIO.c:9125:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var inPtr uintptr = inChan
	var outPtr uintptr = outChan
	var inStatePtr uintptr
	var outStatePtr uintptr
	var readFlags int32
	var writeFlags int32
	var csPtr uintptr
	var nonBlocking int32
	if cmdPtr != 0 {
		nonBlocking = int32(1) << 3
	} else {
		nonBlocking = 0
	}
	var moveBytes int32

	inStatePtr = (*Channel)(unsafe.Pointer(inPtr)).Fstate
	outStatePtr = (*Channel)(unsafe.Pointer(outPtr)).Fstate

	if (*ChannelState)(unsafe.Pointer(inStatePtr)).FcsPtrR != 0 && int32(1)<<1&(int32(1)<<1) != 0 || (*ChannelState)(unsafe.Pointer(inStatePtr)).FcsPtrW != 0 && int32(1)<<1&(int32(1)<<2) != 0 {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+34711, libc.VaList(bp, XTcl_GetChannelName(tls, inChan))))
		}
		return TCL_ERROR
	}
	if (*ChannelState)(unsafe.Pointer(outStatePtr)).FcsPtrR != 0 && int32(1)<<2&(int32(1)<<1) != 0 || (*ChannelState)(unsafe.Pointer(outStatePtr)).FcsPtrW != 0 && int32(1)<<2&(int32(1)<<2) != 0 {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+34711, libc.VaList(bp+8, XTcl_GetChannelName(tls, outChan))))
		}
		return TCL_ERROR
	}

	readFlags = (*ChannelState)(unsafe.Pointer(inStatePtr)).Fflags
	writeFlags = (*ChannelState)(unsafe.Pointer(outStatePtr)).Fflags

	// Set up the blocking mode appropriately. Background copies need
	// non-blocking channels. Foreground copies need blocking channels. If
	// there is an error, restore the old blocking mode.

	if nonBlocking != readFlags&(int32(1)<<3) {
		if sSetBlockMode(tls, interp, inPtr, func() int32 {
			if nonBlocking != 0 {
				return TCL_MODE_NONBLOCKING
			}
			return TCL_MODE_BLOCKING
		}()) != TCL_OK {
			return TCL_ERROR
		}
	}
	if inPtr != outPtr && nonBlocking != writeFlags&(int32(1)<<3) && sSetBlockMode(tls, uintptr(0), outPtr, func() int32 {
		if nonBlocking != 0 {
			return TCL_MODE_NONBLOCKING
		}
		return TCL_MODE_BLOCKING
	}()) != TCL_OK && nonBlocking != readFlags&(int32(1)<<3) {
		sSetBlockMode(tls, uintptr(0), inPtr, func() int32 {
			if readFlags&(int32(1)<<3) != 0 {
				return TCL_MODE_NONBLOCKING
			}
			return TCL_MODE_BLOCKING
		}())
		return TCL_ERROR
	}

	// Make sure the output side is unbuffered.

	(*ChannelState)(unsafe.Pointer(outStatePtr)).Fflags = (*ChannelState)(unsafe.Pointer(outStatePtr)).Fflags&libc.CplInt32(int32(1)<<4) |
		int32(1)<<5

	// Test for conditions where we know we can just move bytes from input
	// channel to output channel with no transformation or even examination
	// of the bytes themselves.

	moveBytes = libc.Bool32((*ChannelState)(unsafe.Pointer(inStatePtr)).FinEofChar == 0 &&
		(*ChannelState)(unsafe.Pointer(inStatePtr)).FinputTranslation == TCL_TRANSLATE_LF &&
		(*ChannelState)(unsafe.Pointer(outStatePtr)).FoutputTranslation == TCL_TRANSLATE_LF &&
		(*ChannelState)(unsafe.Pointer(inStatePtr)).Fencoding == (*ChannelState)(unsafe.Pointer(outStatePtr)).Fencoding)

	// Allocate a new CopyState to maintain info about the current copy in
	// progress. This structure will be deallocated when the copy is
	// completed.

	csPtr = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(CopyState{}))+uint64(libc.BoolInt32(!(moveBytes != 0))*(*ChannelState)(unsafe.Pointer(inStatePtr)).FbufSize)))
	(*CopyState)(unsafe.Pointer(csPtr)).FbufSize = libc.BoolInt32(!(moveBytes != 0)) * (*ChannelState)(unsafe.Pointer(inStatePtr)).FbufSize
	(*CopyState)(unsafe.Pointer(csPtr)).FreadPtr = inPtr
	(*CopyState)(unsafe.Pointer(csPtr)).FwritePtr = outPtr
	(*CopyState)(unsafe.Pointer(csPtr)).FreadFlags = readFlags
	(*CopyState)(unsafe.Pointer(csPtr)).FwriteFlags = writeFlags
	(*CopyState)(unsafe.Pointer(csPtr)).FtoRead = toRead
	(*CopyState)(unsafe.Pointer(csPtr)).Ftotal = int64(0)
	(*CopyState)(unsafe.Pointer(csPtr)).Finterp = interp
	if cmdPtr != 0 {
		(*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FrefCount++
	}
	(*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr = cmdPtr

	(*ChannelState)(unsafe.Pointer(inStatePtr)).FcsPtrR = csPtr
	(*ChannelState)(unsafe.Pointer(outStatePtr)).FcsPtrW = csPtr

	if moveBytes != 0 {
		return sMoveBytes(tls, csPtr)
	}

	// Special handling of -size 0 async transfers, so that the -command is
	// still called asynchronously.

	if nonBlocking == int32(1)<<3 && toRead == int64(0) {
		XTcl_CreateTimerHandler(tls, 0, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sZeroTransferTimerProc})), csPtr)
		return 0
	}

	// Start copying data between the channels.

	return sCopyData(tls, csPtr, 0)
}

//----------------------------------------------------------------------
//
// CopyData --
//
//	This function implements the lowest level of the copying mechanism for
//	TclCopyChannel.
//
// Results:
//	Returns TCL_OK on success, else TCL_ERROR.
//
// Side effects:
//	Moves data between channels, may create channel handlers.
//
//----------------------------------------------------------------------

func sMBCallback(tls *libc.TLS, csPtr uintptr, errObj uintptr) { /* tclIO.c:9262:1: */
	var cmdPtr uintptr = XTcl_DuplicateObj(tls, (*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr)
	var total Tcl_WideInt = (*CopyState)(unsafe.Pointer(csPtr)).Ftotal
	var interp uintptr = (*CopyState)(unsafe.Pointer(csPtr)).Finterp
	var code int32

	(*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FrefCount++
	sStopCopy(tls, csPtr)

	// TODO: What if cmdPtr is not a list?!

	XTcl_ListObjAppendElement(tls, uintptr(0), cmdPtr, XTcl_NewWideIntObj(tls, total))
	if errObj != 0 {
		XTcl_ListObjAppendElement(tls, uintptr(0), cmdPtr, errObj)
	}

	XTcl_Preserve(tls, interp)
	code = XTcl_EvalObjEx(tls, interp, cmdPtr, TCL_EVAL_GLOBAL)
	if code != TCL_OK {
		XTcl_BackgroundException(tls, interp, code)
	}
	XTcl_Release(tls, interp)
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(cmdPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(cmdPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(cmdPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(cmdPtr)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(cmdPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = cmdPtr
			}
		} else {
			XTclFreeObj(tls, cmdPtr)
		}
	}

}

func sMBError(tls *libc.TLS, csPtr uintptr, mask int32, errorCode int32) { /* tclIO.c:9291:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var inChan Tcl_Channel = (*CopyState)(unsafe.Pointer(csPtr)).FreadPtr
	var outChan Tcl_Channel = (*CopyState)(unsafe.Pointer(csPtr)).FwritePtr
	var errObj uintptr

	XTcl_SetErrno(tls, errorCode)

	errObj = XTcl_ObjPrintf(tls, ts+34732,
		libc.VaList(bp, func() uintptr {
			if mask&(int32(1)<<1) != 0 {
				return ts + 6057 /* "read" */
			}
			return ts + 34753 /* "writ" */
		}(),
			XTcl_GetChannelName(tls, func() uintptr {
				if mask&(int32(1)<<1) != 0 {
					return inChan
				}
				return outChan
			}()),
			XTcl_PosixError(tls, (*CopyState)(unsafe.Pointer(csPtr)).Finterp)))

	if (*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr != 0 {
		sMBCallback(tls, csPtr, errObj)
	} else {
		XTcl_SetObjResult(tls, (*CopyState)(unsafe.Pointer(csPtr)).Finterp, errObj)
		sStopCopy(tls, csPtr)
	}
}

func sMBEvent(tls *libc.TLS, clientData ClientData, mask int32) { /* tclIO.c:9316:1: */
	var csPtr uintptr = clientData
	var inChan Tcl_Channel = (*CopyState)(unsafe.Pointer(csPtr)).FreadPtr
	var outChan Tcl_Channel = (*CopyState)(unsafe.Pointer(csPtr)).FwritePtr
	var inStatePtr uintptr = (*Channel1)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FreadPtr)).Fstate

	if mask&(int32(1)<<2) != 0 {
		XTcl_DeleteChannelHandler(tls, inChan, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sMBEvent})), csPtr)
		XTcl_DeleteChannelHandler(tls, outChan, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sMBEvent})), csPtr)
		switch sMBWrite(tls, csPtr) {
		case TCL_OK:
			sMBCallback(tls, csPtr, uintptr(0))
			break
			fallthrough
		case TCL_CONTINUE:
			XTcl_CreateChannelHandler(tls, inChan, int32(1)<<1, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, int32)
			}{sMBEvent})), csPtr)
			break
		}
	} else if mask&(int32(1)<<1) != 0 {
		if TCL_OK == sMBRead(tls, csPtr) {
			// When at least one full buffer is present, stop reading.
			if (*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueHead != 0 && (*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueHead)).FnextAdded >= (*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueHead)).FbufLength ||
				!(XTcl_InputBlocked(tls, inChan) != 0) {
				XTcl_DeleteChannelHandler(tls, inChan, *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, int32)
				}{sMBEvent})), csPtr)
			}

			// Successful read -- set up to write the bytes we read
			XTcl_CreateChannelHandler(tls, outChan, int32(1)<<2, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, int32)
			}{sMBEvent})), csPtr)
		}
	}
}

func sMBRead(tls *libc.TLS, csPtr uintptr) int32 { /* tclIO.c:9351:1: */
	var inStatePtr uintptr = (*Channel1)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FreadPtr)).Fstate
	var bufPtr uintptr = (*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueHead
	var code int32

	if bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded-(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved > 0 {
		return TCL_OK
	}

	code = sGetInput(tls, (*ChannelState)(unsafe.Pointer(inStatePtr)).FtopChanPtr)
	if code == 0 || (*ChannelState)(unsafe.Pointer(inStatePtr)).Fflags&(int32(1)<<11) != 0 {
		return TCL_OK
	} else {
		sMBError(tls, csPtr, int32(1)<<1, code)
		return TCL_ERROR
	}
	return int32(0)
}

func sMBWrite(tls *libc.TLS, csPtr uintptr) int32 { /* tclIO.c:9372:1: */
	var inStatePtr uintptr = (*Channel1)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FreadPtr)).Fstate
	var outStatePtr uintptr = (*Channel1)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FwritePtr)).Fstate
	var bufPtr uintptr = (*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueHead
	var tail uintptr = uintptr(0)
	var code int32
	var inBytes Tcl_WideInt = int64(0)

	// Count up number of bytes waiting in the input queue
	for bufPtr != 0 {
		inBytes = inBytes + Tcl_WideInt((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded-(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)
		tail = bufPtr
		if (*CopyState)(unsafe.Pointer(csPtr)).FtoRead != int64(-1) && (*CopyState)(unsafe.Pointer(csPtr)).FtoRead < inBytes {
			// Queue has enough bytes to complete the copy
			break
		}
		bufPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
	}

	if bufPtr != 0 {
		// Split the overflowing buffer in two
		var extra int32 = int32(inBytes - (*CopyState)(unsafe.Pointer(csPtr)).FtoRead)
		// Note that going with int for extra assumes that inBytes is not too
		// much over toRead to require a wide itself. If that gets violated
		// then the calculations involving extra must be made wide too.
		//
		// Noted with Win32/MSVC debug build treating the warning (possible of
		// data in __int64 to int conversion) as error.

		bufPtr = sAllocChannelBuffer(tls, extra)

		*(*int32)(unsafe.Pointer(tail + 4)) -= extra
		libc.Xmemcpy(tls, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded), tail+24+uintptr((*ChannelBuffer)(unsafe.Pointer(tail)).FnextAdded), uint64(extra))
		*(*int32)(unsafe.Pointer(bufPtr + 4)) += extra
		(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr = (*ChannelBuffer)(unsafe.Pointer(tail)).FnextPtr
		(*ChannelBuffer)(unsafe.Pointer(tail)).FnextPtr = uintptr(0)
		inBytes = (*CopyState)(unsafe.Pointer(csPtr)).FtoRead
	}

	// Update the byte counts
	if (*CopyState)(unsafe.Pointer(csPtr)).FtoRead != int64(-1) {
		*(*Tcl_WideInt)(unsafe.Pointer(csPtr + 24)) -= inBytes
	}
	*(*Tcl_WideInt)(unsafe.Pointer(csPtr + 32)) += inBytes

	// Move buffers from input to output channels
	if (*ChannelState)(unsafe.Pointer(outStatePtr)).FoutQueueTail != 0 {
		(*ChannelBuffer)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(outStatePtr)).FoutQueueTail)).FnextPtr = (*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueHead
	} else {
		(*ChannelState)(unsafe.Pointer(outStatePtr)).FoutQueueHead = (*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueHead
	}
	(*ChannelState)(unsafe.Pointer(outStatePtr)).FoutQueueTail = tail
	(*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueHead = bufPtr
	if (*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueTail == tail {
		(*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueTail = bufPtr
	}
	if bufPtr == uintptr(0) {
		(*ChannelState)(unsafe.Pointer(inStatePtr)).FinQueueTail = uintptr(0)
	}

	code = sFlushChannel(tls, (*CopyState)(unsafe.Pointer(csPtr)).Finterp, (*ChannelState)(unsafe.Pointer(outStatePtr)).FtopChanPtr, 0)
	if code != 0 {
		sMBError(tls, csPtr, int32(1)<<2, code)
		return TCL_ERROR
	}
	if (*CopyState)(unsafe.Pointer(csPtr)).FtoRead == int64(0) || (*ChannelState)(unsafe.Pointer(inStatePtr)).Fflags&(int32(1)<<9) != 0 {
		return TCL_OK
	}
	return TCL_CONTINUE
}

func sMoveBytes(tls *libc.TLS, csPtr uintptr) int32 { /* tclIO.c:9447:1: */
	var outStatePtr uintptr = (*Channel1)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FwritePtr)).Fstate
	var bufPtr uintptr = (*ChannelState)(unsafe.Pointer(outStatePtr)).FcurOutPtr
	var errorCode int32

	if bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded-(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved != 0 {
		// If we start with unflushed bytes in the destination
		// channel, flush them out of the way first.

		errorCode = sFlushChannel(tls, (*CopyState)(unsafe.Pointer(csPtr)).Finterp, (*ChannelState)(unsafe.Pointer(outStatePtr)).FtopChanPtr, 0)
		if errorCode != 0 {
			sMBError(tls, csPtr, int32(1)<<2, errorCode)
			return TCL_ERROR
		}
	}

	if (*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr != 0 {
		var inChan Tcl_Channel = (*CopyState)(unsafe.Pointer(csPtr)).FreadPtr
		XTcl_CreateChannelHandler(tls, inChan, int32(1)<<1, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sMBEvent})), csPtr)
		return TCL_OK
	}

	for 1 != 0 {
		var code int32

		if TCL_ERROR == sMBRead(tls, csPtr) {
			return TCL_ERROR
		}
		code = sMBWrite(tls, csPtr)
		if code == TCL_OK {
			XTcl_SetObjResult(tls, (*CopyState)(unsafe.Pointer(csPtr)).Finterp, XTcl_NewWideIntObj(tls, (*CopyState)(unsafe.Pointer(csPtr)).Ftotal))
			sStopCopy(tls, csPtr)
			return TCL_OK
		}
		if code == TCL_ERROR {
			return TCL_ERROR
		}
		// code == TCL_CONTINUE --> continue the loop
	}
	return TCL_OK // Silence compiler warnings
}

func sCopyData(tls *libc.TLS, csPtr uintptr, mask int32) int32 { /* tclIO.c:9492:1: */
	bp := tls.Alloc(108)
	defer tls.Free(108)

	var interp uintptr
	var cmdPtr uintptr
	var errObj uintptr
	var bufObj uintptr
	// var msg uintptr at bp+96, 8

	var inChan Tcl_Channel
	var outChan Tcl_Channel
	var inStatePtr uintptr
	var outStatePtr uintptr
	var result int32
	var size int32
	// var sizeb int32 at bp+104, 4

	var total Tcl_WideInt
	var buffer uintptr
	var inBinary int32
	var outBinary int32
	var sameEncoding int32
	// Encoding control
	var underflow int32
	var _objPtr uintptr
	var _objPtr1 uintptr
	var code int32
	errObj = uintptr(0)
	bufObj = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 96 /* msg */)) = uintptr(0)
	result = TCL_OK // Input underflow

	inChan = (*CopyState)(unsafe.Pointer(csPtr)).FreadPtr
	outChan = (*CopyState)(unsafe.Pointer(csPtr)).FwritePtr
	inStatePtr = (*Channel1)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FreadPtr)).Fstate
	outStatePtr = (*Channel1)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FwritePtr)).Fstate
	interp = (*CopyState)(unsafe.Pointer(csPtr)).Finterp
	cmdPtr = (*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr

	// Copy the data the slow way, using the translation mechanism.
	//
	// Note: We have make sure that we use the topmost channel in a stack for
	// the copying. The caller uses Tcl_GetChannel to access it, and thus gets
	// the bottom of the stack.

	inBinary = libc.Bool32((*ChannelState)(unsafe.Pointer(inStatePtr)).Fencoding == uintptr(0))
	outBinary = libc.Bool32((*ChannelState)(unsafe.Pointer(outStatePtr)).Fencoding == uintptr(0))
	sameEncoding = libc.Bool32((*ChannelState)(unsafe.Pointer(inStatePtr)).Fencoding == (*ChannelState)(unsafe.Pointer(outStatePtr)).Fencoding)

	if !!(inBinary != 0 || sameEncoding != 0) {
		goto __1
	}
__2:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __5
	}
	XTclAllocateFreeObjects(tls)
__5:
	;
	bufObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3
__3:
	if 0 != 0 {
		goto __2
	}
	goto __4
__4:
	;
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount++
__1:
	;

__6:
	if !((*CopyState)(unsafe.Pointer(csPtr)).FtoRead != int64(0)) {
		goto __7
	}
	// Check for unreported background errors.

	XTcl_GetChannelError(tls, inChan, bp+96)
	if !((*ChannelState)(unsafe.Pointer(inStatePtr)).FunreportedError != 0 || *(*uintptr)(unsafe.Pointer(bp + 96)) != uintptr(0)) {
		goto __8
	}
	XTcl_SetErrno(tls, (*ChannelState)(unsafe.Pointer(inStatePtr)).FunreportedError)
	(*ChannelState)(unsafe.Pointer(inStatePtr)).FunreportedError = 0
	goto readError
__8:
	;
	XTcl_GetChannelError(tls, outChan, bp+96)
	if !((*ChannelState)(unsafe.Pointer(outStatePtr)).FunreportedError != 0 || *(*uintptr)(unsafe.Pointer(bp + 96)) != uintptr(0)) {
		goto __9
	}
	XTcl_SetErrno(tls, (*ChannelState)(unsafe.Pointer(outStatePtr)).FunreportedError)
	(*ChannelState)(unsafe.Pointer(outStatePtr)).FunreportedError = 0
	goto writeError
__9:
	;

	if !(cmdPtr != 0 && mask == 0) {
		goto __10
	}
	// In async mode, we skip reading synchronously and fake an
	// underflow instead to prime the readable fileevent.

	size = 0
	underflow = 1
	goto __11
__10:
	// Read up to bufSize bytes.

	if !((*CopyState)(unsafe.Pointer(csPtr)).FtoRead == int64(-1) ||
		(*CopyState)(unsafe.Pointer(csPtr)).FtoRead > Tcl_WideInt((*CopyState)(unsafe.Pointer(csPtr)).FbufSize)) {
		goto __12
	}
	*(*int32)(unsafe.Pointer(bp + 104 /* sizeb */)) = (*CopyState)(unsafe.Pointer(csPtr)).FbufSize
	goto __13
__12:
	*(*int32)(unsafe.Pointer(bp + 104 /* sizeb */)) = int32((*CopyState)(unsafe.Pointer(csPtr)).FtoRead)
__13:
	;

	if !(inBinary != 0 || sameEncoding != 0) {
		goto __14
	}
	size = sDoRead(tls, (*ChannelState)(unsafe.Pointer(inStatePtr)).FtopChanPtr, csPtr+60, *(*int32)(unsafe.Pointer(bp + 104 /* sizeb */)),
		libc.BoolInt32(!((*ChannelState)(unsafe.Pointer(inStatePtr)).Fflags&(int32(1)<<3) != 0)))
	goto __15
__14:
	size = sDoReadChars(tls, (*ChannelState)(unsafe.Pointer(inStatePtr)).FtopChanPtr, bufObj, *(*int32)(unsafe.Pointer(bp + 104 /* sizeb */)),
		0)
__15:
	;
	underflow = libc.Bool32(size >= 0 && size < *(*int32)(unsafe.Pointer(bp + 104))) // Input underflow
__11:
	;

	if !(size < 0) {
		goto __16
	}
readError:
	if !(interp != 0) {
		goto __18
	}
__19:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __22
	}
	XTclAllocateFreeObjects(tls)
__22:
	;
	errObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
	(*Tcl_Obj)(unsafe.Pointer(errObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(errObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(errObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(errObj)).FtypePtr = uintptr(0)

	XTcl_AppendStringsToObj(tls, errObj, libc.VaList(bp, ts+34758,
		XTcl_GetChannelName(tls, inChan), ts+34774, uintptr(0)))
	if !(*(*uintptr)(unsafe.Pointer(bp + 96)) != uintptr(0)) {
		goto __23
	}
	XTcl_AppendObjToObj(tls, errObj, *(*uintptr)(unsafe.Pointer(bp + 96 /* msg */)))
	goto __24
__23:
	XTcl_AppendStringsToObj(tls, errObj, libc.VaList(bp+32, XTcl_PosixError(tls, interp),
		uintptr(0)))
__24:
	;
__18:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 96)) != uintptr(0)) {
		goto __25
	}
__26:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp + 96))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __29
	}
	XTclFreeObj(tls, _objPtr)
__29:
	;
	goto __27
__27:
	if 0 != 0 {
		goto __26
	}
	goto __28
__28:
	;
__25:
	;
	goto __7
	goto __17
__16:
	if !(underflow != 0) {
		goto __30
	}
	// We had an underflow on the read side. If we are at EOF, and not
	// in the synchronous part of an asynchronous fcopy, then the
	// copying is done, otherwise set up a channel handler to detect
	// when the channel becomes readable again.

	if !(size == 0 && XTcl_Eof(tls, inChan) != 0 && !(cmdPtr != 0 && mask == 0)) {
		goto __31
	}
	goto __7
__31:
	;
	if !(cmdPtr != 0 && (!(XTcl_Eof(tls, inChan) != 0) || mask == 0) && !(mask&(int32(1)<<1) != 0)) {
		goto __32
	}
	if !(mask&(int32(1)<<2) != 0) {
		goto __33
	}
	XTcl_DeleteChannelHandler(tls, outChan, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sCopyEventProc})), csPtr)
__33:
	;
	XTcl_CreateChannelHandler(tls, inChan, int32(1)<<1, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sCopyEventProc})),
		csPtr)
__32:
	;
	if !(size == 0) {
		goto __34
	}
	if !!((*ChannelState)(unsafe.Pointer(inStatePtr)).Fflags&(int32(1)<<3) != 0) {
		goto __35
	}
	// We allowed a short read.  Keep trying.

	goto __6
__35:
	;
	if !(bufObj != uintptr(0)) {
		goto __36
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount, 1) > 1) {
		goto __37
	}
	goto __38
__37:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(bufObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bufObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __39
	}

	if !((*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes != XtclEmptyStringRep) {
		goto __41
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes)
__41:
	;
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).Flength = -1
__42:
	;
	*(*uintptr)(unsafe.Pointer(bufObj + 32)) = XtclFreeObjList
	XtclFreeObjList = bufObj
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
	goto __40
__39:
	XTclFreeObj(tls, bufObj)
__40:
	;
__38:
	;

	bufObj = uintptr(0)
__36:
	;
	return TCL_OK
__34:
	;
__30:
	;
__17:
	;

	// Now write the buffer out.

	if !(inBinary != 0 || sameEncoding != 0) {
		goto __45
	}
	buffer = csPtr + 60 /* &.buffer */
	*(*int32)(unsafe.Pointer(bp + 104 /* sizeb */)) = size
	goto __46
__45:
	buffer = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 104)) = (*Tcl_Obj)(unsafe.Pointer(bufObj)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, bufObj, bp+104)
	}()
__46:
	;

	if !(outBinary != 0 || sameEncoding != 0) {
		goto __47
	}
	*(*int32)(unsafe.Pointer(bp + 104 /* sizeb */)) = sWrite(tls, (*ChannelState)(unsafe.Pointer(outStatePtr)).FtopChanPtr, buffer, *(*int32)(unsafe.Pointer(bp + 104 /* sizeb */)), XtclIdentityEncoding)
	goto __48
__47:
	*(*int32)(unsafe.Pointer(bp + 104 /* sizeb */)) = sWrite(tls, (*ChannelState)(unsafe.Pointer(outStatePtr)).FtopChanPtr, buffer, *(*int32)(unsafe.Pointer(bp + 104 /* sizeb */)), (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(outStatePtr)).FtopChanPtr)).Fstate)).Fencoding)
__48:
	;

	// [Bug 2895565]. At this point 'size' still contains the number of
	// bytes or characters which have been read. We keep this to later to
	// update the totals and toRead information, see marker (UP) below. We
	// must not overwrite it with 'sizeb', which is the number of written
	// bytes or characters, and both EOL translation and encoding
	// conversion may have changed this number unpredictably in relation
	// to 'size' (It can be smaller or larger, in the latter case able to
	// drive toRead below -1, causing infinite looping). Completely
	// unsuitable for updating totals and toRead.

	if !(*(*int32)(unsafe.Pointer(bp + 104)) < 0) {
		goto __49
	}
writeError:
	if !(interp != 0) {
		goto __50
	}
__51:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __54
	}
	XTclAllocateFreeObjects(tls)
__54:
	;
	errObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
	(*Tcl_Obj)(unsafe.Pointer(errObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(errObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(errObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(errObj)).FtypePtr = uintptr(0)

	XTcl_AppendStringsToObj(tls, errObj, libc.VaList(bp+48, ts+34778,
		XTcl_GetChannelName(tls, outChan), ts+34774, uintptr(0)))
	if !(*(*uintptr)(unsafe.Pointer(bp + 96)) != uintptr(0)) {
		goto __55
	}
	XTcl_AppendObjToObj(tls, errObj, *(*uintptr)(unsafe.Pointer(bp + 96 /* msg */)))
	goto __56
__55:
	XTcl_AppendStringsToObj(tls, errObj, libc.VaList(bp+80, XTcl_PosixError(tls, interp),
		uintptr(0)))
__56:
	;
__50:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 96)) != uintptr(0)) {
		goto __57
	}
__58:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp + 96))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __61
	}
	XTclFreeObj(tls, _objPtr1)
__61:
	;
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
__57:
	;
	goto __7
__49:
	;

	// Update the current byte count. Do it now so the count is valid
	// before a return or break takes us out of the loop. The invariant at
	// the top of the loop should be that csPtr->toRead holds the number
	// of bytes left to copy.

	if !((*CopyState)(unsafe.Pointer(csPtr)).FtoRead != int64(-1)) {
		goto __62
	}
	*(*Tcl_WideInt)(unsafe.Pointer(csPtr + 24)) -= Tcl_WideInt(size)
__62:
	;
	*(*Tcl_WideInt)(unsafe.Pointer(csPtr + 32)) += Tcl_WideInt(size)

	// Break loop if EOF && (size>0)

	if !(XTcl_Eof(tls, inChan) != 0) {
		goto __63
	}
	goto __7
__63:
	;

	// Check to see if the write is happening in the background. If so,
	// stop copying and wait for the channel to become writable again.
	// After input underflow we already installed a readable handler
	// therefore we don't need a writable handler.

	if !(!(underflow != 0) && (*ChannelState)(unsafe.Pointer(outStatePtr)).Fflags&(int32(1)<<7) != 0) {
		goto __64
	}
	if !!(mask&(int32(1)<<2) != 0) {
		goto __65
	}
	if !(mask&(int32(1)<<1) != 0) {
		goto __66
	}
	XTcl_DeleteChannelHandler(tls, inChan, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sCopyEventProc})), csPtr)
__66:
	;
	XTcl_CreateChannelHandler(tls, outChan, int32(1)<<2,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sCopyEventProc})), csPtr)
__65:
	;
	if !(bufObj != uintptr(0)) {
		goto __67
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount, 1) > 1) {
		goto __68
	}
	goto __69
__68:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(bufObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bufObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __70
	}

	if !((*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes != XtclEmptyStringRep) {
		goto __72
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes)
__72:
	;
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).Flength = -1
__73:
	;
	*(*uintptr)(unsafe.Pointer(bufObj + 32)) = XtclFreeObjList
	XtclFreeObjList = bufObj
	goto __74
__74:
	if 0 != 0 {
		goto __73
	}
	goto __75
__75:
	;
	goto __71
__70:
	XTclFreeObj(tls, bufObj)
__71:
	;
__69:
	;

	bufObj = uintptr(0)
__67:
	;
	return TCL_OK
__64:
	;

	// For background copies, we only do one buffer per invocation so we
	// don't starve the rest of the system.

	if !(cmdPtr != 0 && (*CopyState)(unsafe.Pointer(csPtr)).FtoRead != int64(0)) {
		goto __76
	}
	// The first time we enter this code, there won't be a channel
	// handler established yet, so do it here.

	if !(mask == 0) {
		goto __77
	}
	XTcl_CreateChannelHandler(tls, outChan, int32(1)<<2, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sCopyEventProc})),
		csPtr)
__77:
	;
	if !(bufObj != uintptr(0)) {
		goto __78
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount, 1) > 1) {
		goto __79
	}
	goto __80
__79:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(bufObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bufObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __81
	}

	if !((*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes != XtclEmptyStringRep) {
		goto __83
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes)
__83:
	;
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).Flength = -1
__84:
	;
	*(*uintptr)(unsafe.Pointer(bufObj + 32)) = XtclFreeObjList
	XtclFreeObjList = bufObj
	goto __85
__85:
	if 0 != 0 {
		goto __84
	}
	goto __86
__86:
	;
	goto __82
__81:
	XTclFreeObj(tls, bufObj)
__82:
	;
__80:
	;

	bufObj = uintptr(0)
__78:
	;
	return TCL_OK
__76:
	;
	goto __6
__7:
	; // while

	if !(bufObj != uintptr(0)) {
		goto __87
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount, 1) > 1) {
		goto __88
	}
	goto __89
__88:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(bufObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bufObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __90
	}

	if !((*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes != XtclEmptyStringRep) {
		goto __92
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(bufObj)).Fbytes)
__92:
	;
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).Flength = -1
__93:
	;
	*(*uintptr)(unsafe.Pointer(bufObj + 32)) = XtclFreeObjList
	XtclFreeObjList = bufObj
	goto __94
__94:
	if 0 != 0 {
		goto __93
	}
	goto __95
__95:
	;
	goto __91
__90:
	XTclFreeObj(tls, bufObj)
__91:
	;
__89:
	;

	bufObj = uintptr(0)
__87:
	;

	// Make the callback or return the number of bytes transferred. The local
	// total is used because StopCopy frees csPtr.

	total = (*CopyState)(unsafe.Pointer(csPtr)).Ftotal
	if !(cmdPtr != 0 && interp != 0) {
		goto __96
	}

	// Get a private copy of the command so we can mutate it by adding
	// arguments. Note that StopCopy frees our saved reference to the
	// original command obj.

	cmdPtr = XTcl_DuplicateObj(tls, cmdPtr)
	(*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FrefCount++
	sStopCopy(tls, csPtr)
	XTcl_Preserve(tls, interp)

	XTcl_ListObjAppendElement(tls, interp, cmdPtr, XTcl_NewWideIntObj(tls, total))
	if !(errObj != 0) {
		goto __98
	}
	XTcl_ListObjAppendElement(tls, interp, cmdPtr, errObj)
__98:
	;
	code = XTcl_EvalObjEx(tls, interp, cmdPtr, TCL_EVAL_GLOBAL)
	if !(code != TCL_OK) {
		goto __99
	}
	XTcl_BackgroundException(tls, interp, code)
	result = TCL_ERROR
__99:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FrefCount, 1) > 1) {
		goto __100
	}
	goto __101
__100:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(cmdPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __102
	}

	if !((*Tcl_Obj)(unsafe.Pointer(cmdPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(cmdPtr)).Fbytes != XtclEmptyStringRep) {
		goto __104
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(cmdPtr)).Fbytes)
__104:
	;
	(*Tcl_Obj)(unsafe.Pointer(cmdPtr)).Flength = -1
__105:
	;
	*(*uintptr)(unsafe.Pointer(cmdPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = cmdPtr
	goto __106
__106:
	if 0 != 0 {
		goto __105
	}
	goto __107
__107:
	;
	goto __103
__102:
	XTclFreeObj(tls, cmdPtr)
__103:
	;
__101:
	;

	XTcl_Release(tls, interp)
	goto __97
__96:
	sStopCopy(tls, csPtr)
	if !(interp != 0) {
		goto __108
	}
	if !(errObj != 0) {
		goto __109
	}
	XTcl_SetObjResult(tls, interp, errObj)
	result = TCL_ERROR
	goto __110
__109:
	XTcl_ResetResult(tls, interp)
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, total))
__110:
	;
__108:
	;
__97:
	;
	return result
}

//----------------------------------------------------------------------
//
// DoRead --
//
//	Stores up to "bytesToRead" bytes in memory pointed to by "dst".
//	These bytes come from reading the channel "chanPtr" and
//	performing the configured translations.  No encoding conversions
//	are applied to the bytes being read.
//
// Results:
//	The number of bytes actually stored (<= bytesToRead),
// 	or -1 if there is an error in reading the channel.  Use
// 	Tcl_GetErrno() to retrieve the error code for the error
//	that occurred.
//
//	The number of bytes stored can be less than the number
// 	requested when
//	  - EOF is reached on the channel; or
//	  - the channel is non-blocking, and we've read all we can
//	    without blocking.
//	  - a channel reading error occurs (and we return -1)
//
// Side effects:
//	May cause input to be buffered.
//
//----------------------------------------------------------------------

func sDoRead(tls *libc.TLS, chanPtr uintptr, dst uintptr, bytesToRead int32, allowShortReads int32) int32 { /* tclIO.c:9825:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var statePtr uintptr
	var p uintptr
	// Not enough bytes in it yet
	// to fill the dst
	var code int32
	// There's a next buffer.  Shift orphan \r to it.

	var nextPtr uintptr
	// Each pass through the loop is intended to process up to one channel
	// buffer.

	// var bytesRead int32 at bp+4, 4

	// var bytesWritten int32 at bp, 4

	var bufPtr uintptr
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	p = dst

	// Early out when we know a read will get the eofchar.
	//
	// NOTE: This seems to be a bug.  The special handling for
	// a zero-char read request ought to come first.  As coded
	// the EOF due to eofchar has distinguishing behavior from
	// the EOF due to reported EOF on the underlying device, and
	// that seems undesirable.  However recent history indicates
	// that new inconsistent behavior in a patchlevel has problems
	// too.  Keep on keeping on for now.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<10) != 0) {
		goto __1
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 9

	// TODO: Don't need this call
	sUpdateInterest(tls, chanPtr)
	return 0
__1:
	;

	// Special handling for zero-char read request.

	if !(bytesToRead == 0) {
		goto __2
	}
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0) {
		goto __3
	}
	*(*int32)(unsafe.Pointer(statePtr + 32)) |= TCL_ENCODING_START
__3:
	;
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<11 | int32(1)<<9)
	*(*int32)(unsafe.Pointer(statePtr + 32)) &= libc.CplInt32(TCL_ENCODING_END)
	// TODO: Don't need this call
	sUpdateInterest(tls, chanPtr)
	return 0
__2:
	;

	XTclChannelPreserve(tls, chanPtr)
__4:
	if !(bytesToRead != 0) {
		goto __5
	}
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead

	// Don't read more data if we have what we need.

__6:
	if !(!(bufPtr != 0) || !(bufPtr != 0 && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded >= (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FbufLength) && (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded-(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved < bytesToRead) {
		goto __7
	}

moreData:
	code = sGetInput(tls, chanPtr)
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9|int32(1)<<11) != 0) {
		goto __8
	}
	// Further reads cannot do any more.

	goto __7
__8:
	;

	if !(code != 0) {
		goto __9
	}
	// Read error

	sUpdateInterest(tls, chanPtr)
	XTclChannelRelease(tls, chanPtr)
	return -1
__9:
	;

	goto __6
__7:
	;

	*(*int32)(unsafe.Pointer(bp + 4 /* bytesRead */)) = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded - (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved
	*(*int32)(unsafe.Pointer(bp /* bytesWritten */)) = bytesToRead

	sTranslateInputEOL(tls, statePtr, p, bufPtr+24+uintptr((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved),
		bp, bp+4)
	*(*int32)(unsafe.Pointer(bufPtr + 8)) += *(*int32)(unsafe.Pointer(bp + 4))
	p += uintptr(*(*int32)(unsafe.Pointer(bp /* bytesWritten */)))
	bytesToRead = bytesToRead - *(*int32)(unsafe.Pointer(bp))

	if !!((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded == (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved) {
		goto __10
	}
	// Buffer is not empty.  How can that be?
	//
	// 0) We stopped early because we got all the bytes we were
	//    seeking. That's fine.

	if !(bytesToRead == 0) {
		goto __11
	}
	goto __5
__11:
	;

	// 1) We're @EOF because we saw eof char.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<10) != 0) {
		goto __12
	}
	goto __5
__12:
	;

	// 2) The buffer holds a \r while in CRLF translation, followed by
	//    the end of the buffer.

	if !((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr == uintptr(0)) {
		goto __13
	}
	// There's no more buffered data...

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0) {
		goto __14
	}
	// ...and there never will be.

	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8('\r')
	bytesToRead--
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved++
	goto __15
__14:
	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<11) != 0) {
		goto __16
	}
	// ...and we cannot get more now.

	*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 14
	goto __5
	goto __17
__16:
	// ...so we need to get some.

	goto moreData
__17:
	;
__15:
	;
__13:
	;

	if !((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr != 0) {
		goto __18
	}
	// There's a next buffer.  Shift orphan \r to it.

	nextPtr = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr

	*(*int32)(unsafe.Pointer(nextPtr + 8)) -= 1
	*(*int8)(unsafe.Pointer(nextPtr + 24 + uintptr((*ChannelBuffer)(unsafe.Pointer(nextPtr)).FnextRemoved))) = int8('\r')
	(*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved++
__18:
	;
__10:
	;

	if !((*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded == (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved) {
		goto __19
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead = (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextPtr
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead == uintptr(0)) {
		goto __20
	}
	(*ChannelState)(unsafe.Pointer(statePtr)).FinQueueTail = uintptr(0)
__20:
	;
	sRecycleBuffer(tls, statePtr, bufPtr, 0)
	bufPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FinQueueHead
__19:
	;

	if !(((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<3) != 0 || allowShortReads != 0) &&
		(*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<11) != 0) {
		goto __21
	}
	goto __5
__21:
	;

	// When there's no buffered data to read, and we're at EOF, escape to
	// the caller.

	if !((*ChannelState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<9) != 0 &&
		(bufPtr == uintptr(0) || (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextAdded == (*ChannelBuffer)(unsafe.Pointer(bufPtr)).FnextRemoved)) {
		goto __22
	}
	goto __5
__22:
	;
	goto __4
__5:
	;
	if !(bytesToRead == 0) {
		goto __23
	}
	*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1) << 11)
__23:
	;

	sUpdateInterest(tls, chanPtr)
	XTclChannelRelease(tls, chanPtr)
	return int32((int64(p) - int64(dst)) / 1)
}

//----------------------------------------------------------------------
//
// CopyEventProc --
//
//	This routine is invoked as a channel event handler for the background
//	copy operation. It is just a trivial wrapper around the CopyData
//	routine.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sCopyEventProc(tls *libc.TLS, clientData ClientData, mask int32) { /* tclIO.c:10060:1: */
	sCopyData(tls, clientData, mask)
}

//----------------------------------------------------------------------
//
// StopCopy --
//
//	This routine halts a copy that is in progress.
//
// Results:
//	None.
//
// Side effects:
//	Removes any pending channel handlers and restores the blocking and
//	buffering modes of the channels. The CopyState is freed.
//
//----------------------------------------------------------------------

func sStopCopy(tls *libc.TLS, csPtr uintptr) { /* tclIO.c:10085:1: */
	var inStatePtr uintptr
	var outStatePtr uintptr
	var inChan Tcl_Channel
	var outChan Tcl_Channel
	var nonBlocking int32

	if !(csPtr != 0) {
		return
	}

	inChan = (*CopyState)(unsafe.Pointer(csPtr)).FreadPtr
	outChan = (*CopyState)(unsafe.Pointer(csPtr)).FwritePtr
	inStatePtr = (*Channel1)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FreadPtr)).Fstate
	outStatePtr = (*Channel1)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FwritePtr)).Fstate

	// Restore the old blocking mode and output buffering mode.

	nonBlocking = (*CopyState)(unsafe.Pointer(csPtr)).FreadFlags & (int32(1) << 3)
	if nonBlocking != (*ChannelState)(unsafe.Pointer(inStatePtr)).Fflags&(int32(1)<<3) {
		sSetBlockMode(tls, uintptr(0), (*CopyState)(unsafe.Pointer(csPtr)).FreadPtr,
			func() int32 {
				if nonBlocking != 0 {
					return TCL_MODE_NONBLOCKING
				}
				return TCL_MODE_BLOCKING
			}())
	}
	if (*CopyState)(unsafe.Pointer(csPtr)).FreadPtr != (*CopyState)(unsafe.Pointer(csPtr)).FwritePtr {
		nonBlocking = (*CopyState)(unsafe.Pointer(csPtr)).FwriteFlags & (int32(1) << 3)
		if nonBlocking != (*ChannelState)(unsafe.Pointer(outStatePtr)).Fflags&(int32(1)<<3) {
			sSetBlockMode(tls, uintptr(0), (*CopyState)(unsafe.Pointer(csPtr)).FwritePtr,
				func() int32 {
					if nonBlocking != 0 {
						return TCL_MODE_NONBLOCKING
					}
					return TCL_MODE_BLOCKING
				}())
		}
	}
	*(*int32)(unsafe.Pointer(outStatePtr + 8)) &= libc.CplInt32(int32(1)<<4 | int32(1)<<5)
	*(*int32)(unsafe.Pointer(outStatePtr + 8)) |= (*CopyState)(unsafe.Pointer(csPtr)).FwriteFlags & (int32(1)<<4 | int32(1)<<5)

	if (*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr != 0 {
		XTcl_DeleteChannelHandler(tls, inChan, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sCopyEventProc})), csPtr)
		if inChan != outChan {
			XTcl_DeleteChannelHandler(tls, outChan, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, int32)
			}{sCopyEventProc})), csPtr)
		}
		XTcl_DeleteChannelHandler(tls, inChan, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sMBEvent})), csPtr)
		XTcl_DeleteChannelHandler(tls, outChan, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sMBEvent})), csPtr)
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer((*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = (*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr
				}
			} else {
				XTclFreeObj(tls, (*CopyState)(unsafe.Pointer(csPtr)).FcmdPtr)
			}
		}

	}
	(*ChannelState)(unsafe.Pointer(inStatePtr)).FcsPtrR = uintptr(0)
	(*ChannelState)(unsafe.Pointer(outStatePtr)).FcsPtrW = uintptr(0)
	XTclpFree(tls, csPtr)
}

//----------------------------------------------------------------------
//
// StackSetBlockMode --
//
//	This function sets the blocking mode for a channel, iterating through
//	each channel in a stack and updates the state flags.
//
// Results:
//	0 if OK, result code from failed blockModeProc otherwise.
//
// Side effects:
//	Modifies the blocking mode of the channel and possibly generates an
//	error.
//
//----------------------------------------------------------------------

func sStackSetBlockMode(tls *libc.TLS, chanPtr uintptr, mode int32) int32 { /* tclIO.c:10155:1: */
	var result int32 = 0
	var blockModeProc uintptr
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	// Start at the top of the channel stack
	// TODO: Examine what can go wrong when blockModeProc calls
	// disturb the stacking state of the channel.

	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
	for chanPtr != uintptr(0) {
		blockModeProc = XTcl_ChannelBlockModeProc(tls, (*Channel)(unsafe.Pointer(chanPtr)).FtypePtr)
		if blockModeProc != uintptr(0) {
			result = (*struct {
				f func(*libc.TLS, ClientData, int32) int32
			})(unsafe.Pointer(&struct{ uintptr }{blockModeProc})).f(tls, (*Channel)(unsafe.Pointer(chanPtr)).FinstanceData, mode)
			if result != 0 {
				XTcl_SetErrno(tls, result)
				return result
			}
		}
		chanPtr = (*Channel)(unsafe.Pointer(chanPtr)).FdownChanPtr
	}
	return 0
}

//----------------------------------------------------------------------
//
// SetBlockMode --
//
//	This function sets the blocking mode for a channel and updates the
//	state flags.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Modifies the blocking mode of the channel and possibly generates an
//	error.
//
//----------------------------------------------------------------------

func sSetBlockMode(tls *libc.TLS, interp uintptr, chanPtr uintptr, mode int32) int32 { /* tclIO.c:10204:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var result int32 = 0
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	// State info for channel

	result = sStackSetBlockMode(tls, chanPtr, mode)
	if result != 0 {
		if interp != uintptr(0) {
			// TIP #219.
			// Move error messages put by the driver into the bypass area and
			// put them into the regular interpreter result. Fall back to the
			// regular message if nothing was found in the bypass.
			//
			// Note that we cannot have a message in the interpreter bypass
			// area, StackSetBlockMode is restricted to the channel bypass.
			// We still need the interp as the destination of the move.

			if !(XTclChanCaughtErrorBypass(tls, interp, chanPtr) != 0) {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+34794,
					libc.VaList(bp, XTcl_PosixError(tls, interp))))
			}
		} else {
			// TIP #219.
			// If we have no interpreter to put a bypass message into we have
			// to clear it, to prevent its propagation and use in other places
			// unrelated to the actual occurence of the problem.

			XTcl_SetChannelError(tls, chanPtr, uintptr(0))
		}
		return TCL_ERROR
	}
	if mode == TCL_MODE_BLOCKING {
		*(*int32)(unsafe.Pointer(statePtr + 8)) &= libc.CplInt32(int32(1)<<3 | int32(1)<<7)
	} else {
		*(*int32)(unsafe.Pointer(statePtr + 8)) |= int32(1) << 3
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelNames --
//
//	Return the names of all open channels in the interp.
//
// Results:
//	TCL_OK or TCL_ERROR.
//
// Side effects:
//	Interp result modified with list of channel names.
//
//----------------------------------------------------------------------

func XTcl_GetChannelNames(tls *libc.TLS, interp uintptr) int32 { /* tclIO.c:10270:1: */
	return XTcl_GetChannelNamesEx(tls, interp, uintptr(0))
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelNamesEx --
//
//	Return the names of open channels in the interp filtered filtered
//	through a pattern. If pattern is NULL, it returns all the open
//	channels.
//
// Results:
//	TCL_OK or TCL_ERROR.
//
// Side effects:
//	Interp result modified with list of channel names.
//
//----------------------------------------------------------------------

func XTcl_GetChannelNamesEx(tls *libc.TLS, interp uintptr, pattern uintptr) int32 { /* tclIO.c:10295:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var tsdPtr uintptr
	var statePtr uintptr
	var name uintptr      // Name for channel
	var resultPtr uintptr // Pointer to result object
	var hTblPtr uintptr   // Hash table of channels.
	var hPtr uintptr      // Search variable.
	// var hSearch Tcl_HashSearch at bp, 24
	tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{}))) // Search variable.

	if !(interp == uintptr(0)) {
		goto __1
	}
	return TCL_OK
__1:
	;

	// Get the channel table that stores the channels registered for this
	// interpreter.

	hTblPtr = sGetChannelTable(tls, interp)
__2:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __5
	}
	XTclAllocateFreeObjects(tls)
__5:
	;
	resultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __3
__3:
	if 0 != 0 {
		goto __2
	}
	goto __4
__4:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)

	if !(pattern != uintptr(0) && libc.Xstrpbrk(tls, pattern, ts+14153) == uintptr(0) &&
		!(int32(*(*int8)(unsafe.Pointer(pattern))) == 's' && int32(*(*int8)(unsafe.Pointer(pattern + 1))) == 't' &&
			int32(*(*int8)(unsafe.Pointer(pattern + 2))) == 'd')) {
		goto __6
	}
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FfindProc})).f(tls, hTblPtr, pattern) != uintptr(0) &&
		XTcl_ListObjAppendElement(tls, interp, resultPtr,
			XTcl_NewStringObj(tls, pattern, -1)) != TCL_OK) {
		goto __7
	}
	goto error
__7:
	;
	goto done
__6:
	;

	hPtr = XTcl_FirstHashEntry(tls, hTblPtr, bp)
__8:
	if !(hPtr != uintptr(0)) {
		goto __10
	}
	statePtr = (*Channel)(unsafe.Pointer((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)).Fstate

	if !((*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel) {
		goto __11
	}
	name = ts + 32722 /* "stdin" */
	goto __12
__11:
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel) {
		goto __13
	}
	name = ts + 32728 /* "stdout" */
	goto __14
__13:
	if !((*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel) {
		goto __15
	}
	name = ts + 32735 /* "stderr" */
	goto __16
__15:
	// This is also stored in Tcl_GetHashKey(hTblPtr, hPtr), but it's
	// simpler to just grab the name from the statePtr.

	name = (*ChannelState)(unsafe.Pointer(statePtr)).FchannelName
__16:
	;
__14:
	;
__12:
	;

	if !((pattern == uintptr(0) || XTcl_StringMatch(tls, name, pattern) != 0) && XTcl_ListObjAppendElement(tls, interp, resultPtr,
		XTcl_NewStringObj(tls, name, -1)) != TCL_OK) {
		goto __17
	}
error:
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount, 1) > 1) {
		goto __18
	}
	goto __19
__18:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __20
	}

	if !((*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != XtclEmptyStringRep) {
		goto __22
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes)
__22:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = -1
__23:
	;
	*(*uintptr)(unsafe.Pointer(resultPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = resultPtr
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
	goto __21
__20:
	XTclFreeObj(tls, resultPtr)
__21:
	;
__19:
	;

	return TCL_ERROR
__17:
	;
	goto __9
__9:
	hPtr = XTcl_NextHashEntry(tls, bp)
	goto __8
	goto __10
__10:
	;

done:
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_IsChannelRegistered --
//
//	Checks whether the channel is associated with the interp. See also
//	Tcl_RegisterChannel and Tcl_UnregisterChannel.
//
// Results:
//	0 if the channel is not registered in the interpreter, 1 else.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_IsChannelRegistered(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel) int32 { /* tclIO.c:10380:1: */
	var hTblPtr uintptr  // Hash table of channels.
	var hPtr uintptr     // Search variable.
	var chanPtr uintptr  // The real IO channel.
	var statePtr uintptr // State of the real channel.

	// Always check bottom-most channel in the stack. This is the one that
	// gets registered.

	chanPtr = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chan1)).Fstate)).FbottomChanPtr
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate

	hTblPtr = XTcl_GetAssocData(tls, interp, ts+32564, uintptr(0))
	if hTblPtr == uintptr(0) {
		return 0
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FfindProc})).f(tls, hTblPtr, (*ChannelState)(unsafe.Pointer(statePtr)).FchannelName)
	if hPtr == uintptr(0) {
		return 0
	}
	if (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData != chanPtr {
		return 0
	}

	return 1
}

//----------------------------------------------------------------------
//
// Tcl_IsChannelShared --
//
//	Checks whether the channel is shared by multiple interpreters.
//
// Results:
//	A boolean value (0 = Not shared, 1 = Shared).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_IsChannelShared(tls *libc.TLS, chan1 Tcl_Channel) int32 { /* tclIO.c:10429:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate
	// State of real channel structure.

	return func() int32 {
		if (*ChannelState)(unsafe.Pointer(statePtr)).FrefCount > 1 {
			return 1
		}
		return 0
	}()
}

//----------------------------------------------------------------------
//
// Tcl_IsChannelExisting --
//
//	Checks whether a channel of the given name exists in the
//	(thread)-global list of all channels. See Tcl_GetChannelNamesEx for
//	function exposed at the Tcl level.
//
// Results:
//	A boolean value (0 = Does not exist, 1 = Does exist).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_IsChannelExisting(tls *libc.TLS, chanName uintptr) int32 { /* tclIO.c:10457:1: */
	var statePtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey2)), int32(unsafe.Sizeof(ThreadSpecificData2{})))
	var name uintptr
	var chanNameLen int32

	chanNameLen = int32(libc.Xstrlen(tls, chanName))
	for statePtr = (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FfirstCSPtr; statePtr != uintptr(0); statePtr = (*ChannelState)(unsafe.Pointer(statePtr)).FnextCSPtr {
		if (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdinChannel {
			name = ts + 32722 /* "stdin" */
		} else if (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstdoutChannel {
			name = ts + 32728 /* "stdout" */
		} else if (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr == (*ThreadSpecificData2)(unsafe.Pointer(tsdPtr)).FstderrChannel {
			name = ts + 32735 /* "stderr" */
		} else {
			name = (*ChannelState)(unsafe.Pointer(statePtr)).FchannelName
		}

		if int32(*(*int8)(unsafe.Pointer(chanName))) == int32(*(*int8)(unsafe.Pointer(name))) && libc.Xmemcmp(tls, name, chanName, uint64(chanNameLen+1)) == 0 {
			return 1
		}
	}

	return 0
}

//----------------------------------------------------------------------
//
// Tcl_ChannelName --
//
//	Return the name of the channel type.
//
// Results:
//	A pointer the name of the channel type.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelName(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10503:12: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FtypeName
}

//----------------------------------------------------------------------
//
// Tcl_ChannelVersion --
//
//	Return the of version of the channel type.
//
// Results:
//	One of the TCL_CHANNEL_VERSION_* constants from tcl.h
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelVersion(tls *libc.TLS, chanTypePtr uintptr) Tcl_ChannelTypeVersion { /* tclIO.c:10527:1: */
	if (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).Fversion < uintptr(0x2) ||
		(*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).Fversion > uintptr(0x5) {
		// In <v2 channel versions, the version field is occupied by the
		// Tcl_DriverBlockModeProc
		return uintptr(0x1)
	}
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).Fversion
}

//
//----------------------------------------------------------------------
//
// Tcl_ChannelBlockModeProc --
//
//	Return the Tcl_DriverBlockModeProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelBlockModeProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10557:25: */
	if XTcl_ChannelVersion(tls, chanTypePtr) < uintptr(0x2) {
		// The v1 structure had the blockModeProc in a different place.
		return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).Fversion
	}

	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FblockModeProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelCloseProc --
//
//	Return the Tcl_DriverCloseProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelCloseProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10588:21: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FcloseProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelClose2Proc --
//
//	Return the Tcl_DriverClose2Proc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelClose2Proc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10612:22: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).Fclose2Proc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelInputProc --
//
//	Return the Tcl_DriverInputProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelInputProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10636:21: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FinputProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelOutputProc --
//
//	Return the Tcl_DriverOutputProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelOutputProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10660:22: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FoutputProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelSeekProc --
//
//	Return the Tcl_DriverSeekProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelSeekProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10684:20: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FseekProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelSetOptionProc --
//
//	Return the Tcl_DriverSetOptionProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelSetOptionProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10708:25: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FsetOptionProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelGetOptionProc --
//
//	Return the Tcl_DriverGetOptionProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelGetOptionProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10732:25: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FgetOptionProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelWatchProc --
//
//	Return the Tcl_DriverWatchProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelWatchProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10756:21: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FwatchProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelGetHandleProc --
//
//	Return the Tcl_DriverGetHandleProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelGetHandleProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10780:25: */
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FgetHandleProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelFlushProc --
//
//	Return the Tcl_DriverFlushProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelFlushProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10804:21: */
	if XTcl_ChannelVersion(tls, chanTypePtr) < uintptr(0x2) {
		return uintptr(0)
	}
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FflushProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelHandlerProc --
//
//	Return the Tcl_DriverHandlerProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelHandlerProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10831:23: */
	if XTcl_ChannelVersion(tls, chanTypePtr) < uintptr(0x2) {
		return uintptr(0)
	}
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FhandlerProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelWideSeekProc --
//
//	Return the Tcl_DriverWideSeekProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelWideSeekProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10858:24: */
	if XTcl_ChannelVersion(tls, chanTypePtr) < uintptr(0x3) {
		return uintptr(0)
	}
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FwideSeekProc
}

//----------------------------------------------------------------------
//
// Tcl_ChannelThreadActionProc --
//
//	TIP #218, Channel Thread Actions. Return the
//	Tcl_DriverThreadActionProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelThreadActionProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:10886:28: */
	if XTcl_ChannelVersion(tls, chanTypePtr) < uintptr(0x4) {
		return uintptr(0)
	}
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FthreadActionProc
}

//----------------------------------------------------------------------
//
// Tcl_SetChannelErrorInterp --
//
//	TIP #219, Tcl Channel Reflection API.
//	Store an error message for the I/O system.
//
// Results:
//	None.
//
// Side effects:
//	Discards a previously stored message.
//
//----------------------------------------------------------------------

func XTcl_SetChannelErrorInterp(tls *libc.TLS, interp uintptr, msg uintptr) { /* tclIO.c:10915:1: */
	var iPtr uintptr = interp

	if (*Interp)(unsafe.Pointer(iPtr)).FchanMsg != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FchanMsg)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FchanMsg)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FchanMsg)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FchanMsg)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FchanMsg)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FchanMsg)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FchanMsg)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FchanMsg + 32)) = XtclFreeObjList
					XtclFreeObjList = (*Interp)(unsafe.Pointer(iPtr)).FchanMsg
				}
			} else {
				XTclFreeObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FchanMsg)
			}
		}

		(*Interp)(unsafe.Pointer(iPtr)).FchanMsg = uintptr(0)
	}

	if msg != uintptr(0) {
		(*Interp)(unsafe.Pointer(iPtr)).FchanMsg = sFixLevelCode(tls, msg)
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FchanMsg)).FrefCount++
	}
	return
}

//----------------------------------------------------------------------
//
// Tcl_SetChannelError --
//
//	TIP #219, Tcl Channel Reflection API.
//	Store an error message for the I/O system.
//
// Results:
//	None.
//
// Side effects:
//	Discards a previously stored message.
//
//----------------------------------------------------------------------

func XTcl_SetChannelError(tls *libc.TLS, chan1 Tcl_Channel, msg uintptr) { /* tclIO.c:10951:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate

	if (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg + 32)) = XtclFreeObjList
					XtclFreeObjList = (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg
				}
			} else {
				XTclFreeObj(tls, (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)
			}
		}

		(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = uintptr(0)
	}

	if msg != uintptr(0) {
		(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = sFixLevelCode(tls, msg)
		(*Tcl_Obj)(unsafe.Pointer((*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg)).FrefCount++
	}
	return
}

//----------------------------------------------------------------------
//
// FixLevelCode --
//
//	TIP #219, Tcl Channel Reflection API.
//	Scans an error message for bad -code / -level directives. Returns a
//	modified copy with such directives corrected, and the input if it had
//	no problems.
//
// Results:
//	A Tcl_Obj*
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFixLevelCode(tls *libc.TLS, msg uintptr) uintptr { /* tclIO.c:10988:16: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var explicitResult int32
	var numOptions int32
	// var lc int32 at bp, 4

	var lcn int32
	// var lv uintptr at bp+8, 8

	var lvn uintptr
	var res int32
	var i int32
	var j int32
	// var val int32 at bp+16, 4

	var lignore int32
	var cignore int32
	var newlevel int32 = -1
	var newcode int32 = -1

	// ASSERT msg != NULL

	// Process the caught message.
	//
	// Syntax = (option value)... ?message?
	//
	// Bad message syntax causes a panic, because the other side uses
	// Tcl_GetReturnOptions and list construction functions to marshall the
	// information. Hence an error means that we've got serious breakage.

	res = XTcl_ListObjGetElements(tls, uintptr(0), msg, bp, bp+8)
	if res != TCL_OK {
		XTcl_Panic(tls, ts+34826, 0)
	}

	explicitResult = libc.Bool32(1 == *(*int32)(unsafe.Pointer(bp))%2)
	numOptions = *(*int32)(unsafe.Pointer(bp)) - explicitResult

	// No options, nothing to do.

	if numOptions == 0 {
		return msg
	}

	// Check for -code x, x != 1|error, and -level x, x != 0

	for i = 0; i < numOptions; i = i + 2 {
		if 0 == libc.Xstrcmp(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))
		}(), ts+27971) {

			res = func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i+1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
					return func() int32 {
						*(*int32)(unsafe.Pointer(bp + 16)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i+1)*8)) + 32)))
						return TCL_OK
					}()
				}
				return XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i+1)*8)), bp+16)
			}()
			if res == TCL_OK && *(*int32)(unsafe.Pointer(bp + 16)) != 1 || res != TCL_OK && 0 != libc.Xstrcmp(tls, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i+1)*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i+1)*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i+1)*8)))
			}(), ts+5721) {
				newcode = 1
			}
		} else if 0 == libc.Xstrcmp(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))
		}(), ts+27933) {

			res = func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i+1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
					return func() int32 {
						*(*int32)(unsafe.Pointer(bp + 16)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i+1)*8)) + 32)))
						return TCL_OK
					}()
				}
				return XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i+1)*8)), bp+16)
			}()
			if res != TCL_OK || *(*int32)(unsafe.Pointer(bp + 16)) != 0 {
				newlevel = 0
			}
		}
	}

	// -code, -level are either not present or ok. Nothing to do.

	if newlevel < 0 && newcode < 0 {
		return msg
	}

	lcn = numOptions
	if explicitResult != 0 {
		lcn++
	}
	if newlevel >= 0 {
		lcn = lcn + 2
	}
	if newcode >= 0 {
		lcn = lcn + 2
	}

	lvn = XTcl_Alloc(tls, uint32(uint64(lcn)*uint64(unsafe.Sizeof(uintptr(0)))))

	// New level/code information is spliced into the first occurence of
	// -level, -code, further occurences are ignored. The options cannot be
	// not present, we would not come here. Options which are ok are simply
	// copied over.

	lignore = libc.AssignInt32(&cignore, 0)
	i = 0
	j = 0
	for ; i < numOptions; i = i + 2 {
		if 0 == libc.Xstrcmp(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))
		}(), ts+27933) {
			if newlevel >= 0 {
				*(*uintptr)(unsafe.Pointer(lvn + uintptr(libc.PostIncInt32(&j, 1))*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* lv */)) + uintptr(i)*8))
				*(*uintptr)(unsafe.Pointer(lvn + uintptr(libc.PostIncInt32(&j, 1))*8)) = XTcl_NewIntObj(tls, newlevel)
				newlevel = -1
				lignore = 1
				continue
			} else if lignore != 0 {
				continue
			}
		} else if 0 == libc.Xstrcmp(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(i)*8)))
		}(), ts+27971) {
			if newcode >= 0 {
				*(*uintptr)(unsafe.Pointer(lvn + uintptr(libc.PostIncInt32(&j, 1))*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* lv */)) + uintptr(i)*8))
				*(*uintptr)(unsafe.Pointer(lvn + uintptr(libc.PostIncInt32(&j, 1))*8)) = XTcl_NewIntObj(tls, newcode)
				newcode = -1
				cignore = 1
				continue
			} else if cignore != 0 {
				continue
			}
		}

		// Keep everything else, possibly copied down.

		*(*uintptr)(unsafe.Pointer(lvn + uintptr(libc.PostIncInt32(&j, 1))*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* lv */)) + uintptr(i)*8))
		*(*uintptr)(unsafe.Pointer(lvn + uintptr(libc.PostIncInt32(&j, 1))*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* lv */)) + uintptr(i+1)*8))
	}
	if newlevel >= 0 {
		XTcl_Panic(tls, ts+34869, 0)
	}
	if newcode >= 0 {
		XTcl_Panic(tls, ts+34906, 0)
	}

	if explicitResult != 0 {
		*(*uintptr)(unsafe.Pointer(lvn + uintptr(libc.PostIncInt32(&j, 1))*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* lv */)) + uintptr(i)*8))
	}

	msg = XTcl_NewListObj(tls, j, lvn)

	XTclpFree(tls, lvn)
	return msg
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelErrorInterp --
//
//	TIP #219, Tcl Channel Reflection API.
//	Return the message stored by the channel driver.
//
// Results:
//	Tcl error message object.
//
// Side effects:
//	Resets the stored data to NULL.
//
//----------------------------------------------------------------------

func XTcl_GetChannelErrorInterp(tls *libc.TLS, interp uintptr, msg uintptr) { /* tclIO.c:11146:1: */
	var iPtr uintptr = interp

	*(*uintptr)(unsafe.Pointer(msg)) = (*Interp)(unsafe.Pointer(iPtr)).FchanMsg
	(*Interp)(unsafe.Pointer(iPtr)).FchanMsg = uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_GetChannelError --
//
//	TIP #219, Tcl Channel Reflection API.
//	Return the message stored by the channel driver.
//
// Results:
//	Tcl error message object.
//
// Side effects:
//	Resets the stored data to NULL.
//
//----------------------------------------------------------------------

func XTcl_GetChannelError(tls *libc.TLS, chan1 Tcl_Channel, msg uintptr) { /* tclIO.c:11174:1: */
	var statePtr uintptr = (*Channel)(unsafe.Pointer(chan1)).Fstate

	*(*uintptr)(unsafe.Pointer(msg)) = (*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg
	(*ChannelState)(unsafe.Pointer(statePtr)).FchanMsg = uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_ChannelTruncateProc --
//
//	TIP #208 (subsection relating to truncation, based on TIP #206).
//	Return the Tcl_DriverTruncateProc of the channel type.
//
// Results:
//	A pointer to the proc.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ChannelTruncateProc(tls *libc.TLS, chanTypePtr uintptr) uintptr { /* tclIO.c:11201:24: */
	if XTcl_ChannelVersion(tls, chanTypePtr) < uintptr(0x5) {
		return uintptr(0)
	}
	return (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FtruncateProc
}

//----------------------------------------------------------------------
//
// DupChannelInternalRep --
//
//	Initialize the internal representation of a new Tcl_Obj to a copy of
//	the internal representation of an existing string object.
//
// Results:
//	None.
//
// Side effects:
//	copyPtr's internal rep is set to a copy of srcPtr's internal
//	representation.
//
//----------------------------------------------------------------------

func sDupChannelInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclIO.c:11231:1: */
	var resPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))

	(*ResolvedChanName)(unsafe.Pointer(resPtr)).FrefCount++
	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = resPtr
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = (*Tcl_Obj)(unsafe.Pointer(srcPtr)).FtypePtr
}

//----------------------------------------------------------------------
//
// FreeChannelInternalRep --
//
//	Release statePtr storage.
//
// Results:
//	None.
//
// Side effects:
//	May cause state to be freed.
//
//----------------------------------------------------------------------

func sFreeChannelInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclIO.c:11261:1: */
	var resPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	if libc.PreDecInt32(&(*ResolvedChanName)(unsafe.Pointer(resPtr)).FrefCount, 1) != 0 {
		return
	}
	XTcl_Release(tls, (*ResolvedChanName)(unsafe.Pointer(resPtr)).FstatePtr)
	XTclpFree(tls, resPtr)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// indent-tabs-mode: nil
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Callback structure for accept callback in a TCP server.

type AcceptCallback1 = struct {
	Fscript uintptr
	Finterp uintptr
} /* tclIOCmd.c:18:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Callback structure for accept callback in a TCP server.

type AcceptCallback = AcceptCallback1 /* tclIOCmd.c:21:3 */

// Thread local storage used to maintain a per-thread stdout channel obj.
// It must be per-thread because of std channel limitations.

type ThreadSpecificData3 = struct {
	Finitialized  int32
	F__ccgo_pad1  [4]byte
	FstdoutObjPtr uintptr
} /* tclIOCmd.c:31:3 */

var dataKey3 Tcl_ThreadDataKey /* tclIOCmd.c:33:26: */

//----------------------------------------------------------------------
//
// FinalizeIOCmdTSD --
//
//	Release the storage associated with the per-thread cache.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFinalizeIOCmdTSD(tls *libc.TLS, clientData ClientData) { /* tclIOCmd.c:74:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey3)), int32(unsafe.Sizeof(ThreadSpecificData3{})))

	if (*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr = uintptr(0)
	}
	(*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).Finitialized = 0
}

//----------------------------------------------------------------------
//
// Tcl_PutsObjCmd --
//
//	This function is invoked to process the "puts" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Produces output on a channel.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_PutsObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:105:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	// var chan1 Tcl_Channel at bp+24, 8
	// The channel to puts on.
	var string uintptr     // String to write.
	var chanObjPtr uintptr // channel object.
	var newline int32      // Add a newline at end?
	var result int32       // Result of puts operation.
	// var mode int32 at bp+32, 4
	// Mode in which channel is opened.
	var tsdPtr uintptr
	chanObjPtr = uintptr(0)

	switch objc {
	case 2:
		goto __2

	case 3:
		goto __3

	case 4:
		goto __4
		// Fall through
	default:
		goto __5
	}
	goto __1
__2: // [puts $x]
	string = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	newline = 1
	goto __1

__3: // [puts -nonewline $x] or [puts $chan $x]
	if !(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}(), ts+34942) == 0) {
		goto __6
	}
	newline = 0
	goto __7
__6:
	newline = 1
	chanObjPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
__7:
	;
	string = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	goto __1

__4: // [puts -nonewline $chan $x] or
	// [puts $chan $x nonewline]
	newline = 0
	if !(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}(), ts+34942) == 0) {
		goto __8
	}
	chanObjPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	string = *(*uintptr)(unsafe.Pointer(objv + 3*8))
	goto __1
	goto __9
__8:
	if !(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}(), ts+34953) == 0) {
		goto __10
	}
	// The code below provides backwards compatibility with an old
	// form of the command that is no longer recommended or
	// documented. See also [Bug #3151675]. Will be removed in Tcl 9,
	// maybe even earlier.

	chanObjPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	string = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	goto __1
__10:
	;
__9:
	;
	// Fall through
__5: // [puts] or
	// [puts some bad number of arguments...]
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+34963)
	return TCL_ERROR
__1:
	;

	if !(chanObjPtr == uintptr(0)) {
		goto __11
	}
	tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey3)), int32(unsafe.Sizeof(ThreadSpecificData3{})))

	if !!((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).Finitialized != 0) {
		goto __12
	}
	(*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).Finitialized = 1
__13:
	;
__16:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __19
	}
	XTclAllocateFreeObjects(tls)
__19:
	;
	(*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)) == 0) {
		goto __20
	}
	(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr)).Flength = 0
	goto __21
__20:
	(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr)).Fbytes, ts+32728, uint64(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr)).Fbytes + 6)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr)).Flength = int32(uint64(unsafe.Sizeof([7]int8{})) - uint64(1))
__21:
	;
	(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr)).FtypePtr = uintptr(0)

	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;
	(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr)).FrefCount++
	XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFinalizeIOCmdTSD})), uintptr(0))
__12:
	;
	chanObjPtr = (*ThreadSpecificData3)(unsafe.Pointer(tsdPtr)).FstdoutObjPtr
__11:
	;
	if !(XTclGetChannelFromObj(tls, interp, chanObjPtr, bp+24, bp+32, 0) != TCL_OK) {
		goto __22
	}
	return TCL_ERROR
__22:
	;
	if !!(*(*int32)(unsafe.Pointer(bp + 32))&(int32(1)<<2) != 0) {
		goto __23
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+34995,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes
			}
			return XTcl_GetString(tls, chanObjPtr)
		}())))
	return TCL_ERROR
__23:
	;

	XTclChannelPreserve(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)))
	result = XTcl_WriteObj(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)), string)
	if !(result < 0) {
		goto __24
	}
	goto error
__24:
	;
	if !(newline != 0) {
		goto __25
	}
	result = XTcl_WriteChars(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)), ts+935, 1)
	if !(result < 0) {
		goto __26
	}
	goto error
__26:
	;
__25:
	;
	XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)))
	return TCL_OK

	// TIP #219.
	// Capture error messages put by the driver into the bypass area and put
	// them into the regular interpreter result. Fall back to the regular
	// message if nothing was found in the bypass.

error:
	if !!(XTclChanCaughtErrorBypass(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp + 24))) != 0) {
		goto __27
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+35034,
		libc.VaList(bp+8, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes
			}
			return XTcl_GetString(tls, chanObjPtr)
		}(), XTcl_PosixError(tls, interp))))
__27:
	;
	XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_FlushObjCmd --
//
//	This function is called to process the Tcl "flush" command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May cause output to appear on the specified channel.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_FlushObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:233:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var chanObjPtr uintptr
	// var chan1 Tcl_Channel at bp+24, 8
	// The channel to flush on.
	// var mode int32 at bp+32, 4

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35057)
		return TCL_ERROR
	}
	chanObjPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if XTclGetChannelFromObj(tls, interp, chanObjPtr, bp+24, bp+32, 0) != TCL_OK {
		return TCL_ERROR
	}
	if !(*(*int32)(unsafe.Pointer(bp + 32))&(int32(1)<<2) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+34995,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes
				}
				return XTcl_GetString(tls, chanObjPtr)
			}())))
		return TCL_ERROR
	}

	XTclChannelPreserve(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)))
	if XTcl_Flush(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24))) != TCL_OK {
		// TIP #219.
		// Capture error messages put by the driver into the bypass area and
		// put them into the regular interpreter result. Fall back to the
		// regular message if nothing was found in the bypass.

		if !(XTclChanCaughtErrorBypass(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp + 24))) != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+35067,
				libc.VaList(bp+8, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes
					}
					return XTcl_GetString(tls, chanObjPtr)
				}(), XTcl_PosixError(tls, interp))))
		}
		XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)))
		return TCL_ERROR
	}
	XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetsObjCmd --
//
//	This function is called to process the Tcl "gets" command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May consume input from channel.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_GetsObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:298:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	// var chan1 Tcl_Channel at bp+24, 8
	// The channel to read from.
	var lineLen int32 // Length of line just read.
	// var mode int32 at bp+32, 4
	// Mode in which channel is opened.
	var linePtr uintptr
	var chanObjPtr uintptr
	var code int32
	var _objPtr uintptr
	code = TCL_OK

	if !(objc != 2 && objc != 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35091)
	return TCL_ERROR
__1:
	;
	chanObjPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if !(XTclGetChannelFromObj(tls, interp, chanObjPtr, bp+24, bp+32, 0) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;
	if !!(*(*int32)(unsafe.Pointer(bp + 32))&(int32(1)<<1) != 0) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+35111,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes
			}
			return XTcl_GetString(tls, chanObjPtr)
		}())))
	return TCL_ERROR
__3:
	;

	XTclChannelPreserve(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)))
	linePtr = XTcl_NewObj(tls)
	lineLen = XTcl_GetsObj(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)), linePtr)
	if !(lineLen < 0) {
		goto __4
	}
	if !(!(XTcl_Eof(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24))) != 0) && !(XTcl_InputBlocked(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24))) != 0)) {
		goto __5
	}
__6:
	_objPtr = linePtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __9
	}
	XTclFreeObj(tls, _objPtr)
__9:
	;
	goto __7
__7:
	if 0 != 0 {
		goto __6
	}
	goto __8
__8:
	;

	// TIP #219.
	// Capture error messages put by the driver into the bypass area
	// and put them into the regular interpreter result. Fall back to
	// the regular message if nothing was found in the bypass.

	if !!(XTclChanCaughtErrorBypass(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp + 24))) != 0) {
		goto __10
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+35150,
		libc.VaList(bp+8, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes
			}
			return XTcl_GetString(tls, chanObjPtr)
		}(), XTcl_PosixError(tls, interp))))
__10:
	;
	code = TCL_ERROR
	goto done
__5:
	;
	lineLen = -1
__4:
	;
	if !(objc == 3) {
		goto __11
	}
	if !(XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0), linePtr,
		TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __13
	}
	code = TCL_ERROR
	goto done
__13:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, lineLen))
	goto __12
__11:
	XTcl_SetObjResult(tls, interp, linePtr)
__12:
	;
done:
	XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 24 /* chan1 */)))
	return code
}

//----------------------------------------------------------------------
//
// Tcl_ReadObjCmd --
//
//	This function is invoked to process the Tcl "read" command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May consume input from channel.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ReadObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:383:1: */
	bp := tls.Alloc(84)
	defer tls.Free(84)

	// var chan1 Tcl_Channel at bp+64, 8
	// The channel to read from.
	var newline int32
	var i int32 // Discard newline at end?
	// var toRead int32 at bp+76, 4
	// How many bytes to read?
	var charactersRead int32 // How many characters were read?
	// var mode int32 at bp+72, 4
	// Mode in which channel is opened.
	var resultPtr uintptr
	var chanObjPtr uintptr
	var iPtr uintptr
	var _objPtr uintptr
	var result uintptr
	// var length int32 at bp+80, 4

	var _objPtr1 uintptr

	if !(objc != 2 && objc != 3) {
		goto __1
	}

argerror:
	iPtr = interp
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35173)

	// Do not append directly; that makes ensembles using this command as
	// a subcommand produce the wrong message.

	*(*int32)(unsafe.Pointer(iPtr + 424)) |= INTERP_ALTERNATE_WRONG_ARGS
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35194)
	return TCL_ERROR
__1:
	;

	i = 1
	newline = 0
	if !(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}(), ts+34942) == 0) {
		goto __2
	}
	newline = 1
	i++
__2:
	;

	if !(i == objc) {
		goto __3
	}
	goto argerror
__3:
	;

	chanObjPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	if !(XTclGetChannelFromObj(tls, interp, chanObjPtr, bp+64, bp+72, 0) != TCL_OK) {
		goto __4
	}
	return TCL_ERROR
__4:
	;
	if !!(*(*int32)(unsafe.Pointer(bp + 72))&(int32(1)<<1) != 0) {
		goto __5
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+35111,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes
			}
			return XTcl_GetString(tls, chanObjPtr)
		}())))
	return TCL_ERROR
__5:
	;
	i++ // Consumed channel name.

	// Compute how many bytes to read.

	*(*int32)(unsafe.Pointer(bp + 76 /* toRead */)) = -1
	if !(i < objc) {
		goto __6
	}
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 76)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+76)
	}() != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp + 76)) < 0) {
		goto __7
	}
	// The code below provides backwards compatibility with an old
	// form of the command that is no longer recommended or
	// documented. See also [Bug #3151675]. Will be removed in Tcl 9,
	// maybe even earlier.

	if !(libc.Xstrcmp(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}(), ts+34953) != 0) {
		goto __8
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+35217,
		libc.VaList(bp+8, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+7444, ts+35260, uintptr(0)))
	return TCL_ERROR
__8:
	;
	newline = 1
__7:
	;
__6:
	;

	resultPtr = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	XTclChannelPreserve(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 64 /* chan1 */)))
	charactersRead = XTcl_ReadChars(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 64 /* chan1 */)), resultPtr, *(*int32)(unsafe.Pointer(bp + 76 /* toRead */)), 0)
	if !(charactersRead < 0) {
		goto __9
	}
	// TIP #219.
	// Capture error messages put by the driver into the bypass area and
	// put them into the regular interpreter result. Fall back to the
	// regular message if nothing was found in the bypass.

	if !!(XTclChanCaughtErrorBypass(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp + 64))) != 0) {
		goto __10
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+35150,
		libc.VaList(bp+48, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(chanObjPtr)).Fbytes
			}
			return XTcl_GetString(tls, chanObjPtr)
		}(), XTcl_PosixError(tls, interp))))
__10:
	;
	XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 64 /* chan1 */)))
__11:
	_objPtr = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __14
	}
	XTclFreeObj(tls, _objPtr)
__14:
	;
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	return TCL_ERROR
__9:
	;

	// If requested, remove the last newline in the channel if at EOF.

	if !(charactersRead > 0 && newline != 0) {
		goto __15
	}

	result = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 80)) = (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, resultPtr, bp+80)
	}()
	if !(int32(*(*int8)(unsafe.Pointer(result + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-1)))) == '\n') {
		goto __16
	}
	XTcl_SetObjLength(tls, resultPtr, *(*int32)(unsafe.Pointer(bp + 80))-1)
__16:
	;
__15:
	;
	XTcl_SetObjResult(tls, interp, resultPtr)
	XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 64 /* chan1 */)))
__17:
	_objPtr1 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __20
	}
	XTclFreeObj(tls, _objPtr1)
__20:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_SeekObjCmd --
//
//	This function is invoked to process the Tcl "seek" command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Moves the position of the access point on the specified channel.  May
//	flush queued output.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_SeekObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:527:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	// var chan1 Tcl_Channel at bp+16, 8
	// The channel to tell on.
	// var offset Tcl_WideInt at bp+24, 8
	// Where to seek?
	var mode int32         // How to seek?
	var result Tcl_WideInt // Of calling Tcl_Seek.
	// var optionIndex int32 at bp+32, 4

	if objc != 3 && objc != 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35267)
		return TCL_ERROR
	}
	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16, uintptr(0), 0) != TCL_OK {
		return TCL_ERROR
	}
	if XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+24) != TCL_OK {
		return TCL_ERROR
	}
	mode = SEEK_SET
	if objc == 4 {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(unsafe.Pointer(&originOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+35293, 0, bp+32) != TCL_OK {
			return TCL_ERROR
		}
		mode = modeArray[*(*int32)(unsafe.Pointer(bp + 32 /* optionIndex */))]
	}

	XTclChannelPreserve(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 16 /* chan1 */)))
	result = XTcl_Seek(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 16 /* chan1 */)), *(*Tcl_WideInt)(unsafe.Pointer(bp + 24 /* offset */)), mode)
	if result == Tcl_WideInt(-1) {
		// TIP #219.
		// Capture error messages put by the driver into the bypass area and
		// put them into the regular interpreter result. Fall back to the
		// regular message if nothing was found in the bypass.

		if !(XTclChanCaughtErrorBypass(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp + 16))) != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+35300,
				libc.VaList(bp, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
				}(), XTcl_PosixError(tls, interp))))
		}
		XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 16 /* chan1 */)))
		return TCL_ERROR
	}
	XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 16 /* chan1 */)))
	return TCL_OK
}

var originOptions = [4]uintptr{
	ts + 35330, ts + 35336, ts + 19372, uintptr(0),
}                                                      /* tclIOCmd.c:538:23 */
var modeArray = [3]int32{SEEK_SET, SEEK_CUR, SEEK_END} /* tclIOCmd.c:541:22 */

//----------------------------------------------------------------------
//
// Tcl_TellObjCmd --
//
//	This function is invoked to process the Tcl "tell" command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_TellObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:603:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var chan1 Tcl_Channel at bp, 8
	// The channel to tell on.
	var newLoc Tcl_WideInt
	var code int32

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35057)
		return TCL_ERROR
	}

	// Try to find a channel with the right name and permissions in the IO
	// channel table of this interpreter.

	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, uintptr(0), 0) != TCL_OK {
		return TCL_ERROR
	}

	XTclChannelPreserve(tls, *(*Tcl_Channel)(unsafe.Pointer(bp /* chan1 */)))
	newLoc = XTcl_Tell(tls, *(*Tcl_Channel)(unsafe.Pointer(bp /* chan1 */)))

	// TIP #219.
	// Capture error messages put by the driver into the bypass area and put
	// them into the regular interpreter result.

	code = XTclChanCaughtErrorBypass(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp /* chan1 */)))
	XTclChannelRelease(tls, *(*Tcl_Channel)(unsafe.Pointer(bp /* chan1 */)))
	if code != 0 {
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, newLoc))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_CloseObjCmd --
//
//	This function is invoked to process the Tcl "close" command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May discard queued input; may flush queued output.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_CloseObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:666:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var chan1 Tcl_Channel at bp+8, 8

	if objc != 2 && objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35344)
		return TCL_ERROR
	}

	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8, uintptr(0), 0) != TCL_OK {
		return TCL_ERROR
	}

	if objc == 3 {
		// var index int32 at bp+16, 4

		var dir int32

		// Get direction requested to close, and check syntax.

		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&dirOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+35366, 0, bp+16) != TCL_OK {
			return TCL_ERROR
		}
		dir = dirArray[*(*int32)(unsafe.Pointer(bp + 16 /* index */))]

		// Check direction against channel mode. It is an error if we try to
		// close a direction not supported by the channel (already closed, or
		// never opened for that direction).

		if !(dir&XTcl_GetChannelMode(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 8))) != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

				ts+33657, libc.VaList(bp, dirOptions[*(*int32)(unsafe.Pointer(bp + 16 /* index */))])))
			return TCL_ERROR
		}

		// Special handling is needed if and only if the channel mode supports
		// more than the direction to close. Because if the close the last
		// direction supported we can and will go through the regular
		// process.

		if XTcl_GetChannelMode(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 8)))&(int32(1)<<1|int32(1)<<2) != dir {
			return XTcl_CloseEx(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp + 8 /* chan1 */)), dir)
		}
	}

	if XTcl_UnregisterChannel(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp + 8))) != TCL_OK {
		// If there is an error message and it ends with a newline, remove the
		// newline. This is done for command pipeline channels where the error
		// output from the subprocesses is stored in interp's result.
		//
		// NOTE: This is likely to not have any effect on regular error
		// messages produced by drivers during the closing of a channel,
		// because the Tcl convention is that such error messages do not have
		// a terminating newline.

		var resultPtr uintptr = XTcl_GetObjResult(tls, interp)
		var string uintptr
		// var len int32 at bp+20, 4

		if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount > 1 {
			resultPtr = XTcl_DuplicateObj(tls, resultPtr)
			XTcl_SetObjResult(tls, interp, resultPtr)
		}
		string = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 20)) = (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, resultPtr, bp+20)
		}()
		if *(*int32)(unsafe.Pointer(bp + 20)) > 0 && int32(*(*int8)(unsafe.Pointer(string + uintptr(*(*int32)(unsafe.Pointer(bp + 20))-1)))) == '\n' {
			XTcl_SetObjLength(tls, resultPtr, *(*int32)(unsafe.Pointer(bp + 20))-1)
		}
		return TCL_ERROR
	}

	return TCL_OK
}

var dirOptions = [3]uintptr{
	ts + 6057, ts + 33651, uintptr(0),
}                                                     /* tclIOCmd.c:673:23 */
var dirArray = [2]int32{int32(1) << 1, int32(1) << 2} /* tclIOCmd.c:676:22 */

//----------------------------------------------------------------------
//
// Tcl_FconfigureObjCmd --
//
//	This function is invoked to process the Tcl "fconfigure" command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May modify the behavior of an IO channel.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_FconfigureObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:775:1: */
	bp := tls.Alloc(440)
	defer tls.Free(440)

	var optionName uintptr
	var valueName uintptr
	// var chan1 Tcl_Channel at bp, 8
	// The channel to set a mode on.
	var i int32 // Iterate over arg-value pairs.

	if objc < 2 || objc%2 == 1 && objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35376)
		return TCL_ERROR
	}

	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, uintptr(0), 0) != TCL_OK {
		return TCL_ERROR
	}

	if objc == 2 {
		// var ds Tcl_DString at bp+8, 216
		// DString to hold result of calling
		// Tcl_GetChannelOption.

		XTcl_DStringInit(tls, bp+8)
		if XTcl_GetChannelOption(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp)), uintptr(0), bp+8) != TCL_OK {
			XTcl_DStringFree(tls, bp+8)
			return TCL_ERROR
		}
		XTcl_DStringResult(tls, interp, bp+8)
		return TCL_OK
	} else if objc == 3 {
		// var ds Tcl_DString at bp+224, 216
		// DString to hold result of calling
		// Tcl_GetChannelOption.

		XTcl_DStringInit(tls, bp+224)
		optionName = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}()
		if XTcl_GetChannelOption(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp)), optionName, bp+224) != TCL_OK {
			XTcl_DStringFree(tls, bp+224)
			return TCL_ERROR
		}
		XTcl_DStringResult(tls, interp, bp+224)
		return TCL_OK
	}

	for i = 3; i < objc; i = i + 2 {
		optionName = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i-1)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i-1)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i-1)*8)))
		}()
		valueName = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}()
		if XTcl_SetChannelOption(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp)), optionName, valueName) !=
			TCL_OK {
			return TCL_ERROR
		}
	}

	return TCL_OK
}

//---------------------------------------------------------------------------
//
// Tcl_EofObjCmd --
//
//	This function is invoked to process the Tcl "eof" command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Sets interp's result to boolean true or false depending on whether the
//	specified channel has an EOF condition.
//
//---------------------------------------------------------------------------

// ARGSUSED
func XTcl_EofObjCmd(tls *libc.TLS, unused ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:851:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var chan1 Tcl_Channel at bp, 8

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35057)
		return TCL_ERROR
	}

	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, uintptr(0), 0) != TCL_OK {
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(XTcl_Eof(tls, *(*Tcl_Channel)(unsafe.Pointer(bp))) != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ExecObjCmd --
//
//	This function is invoked to process the "exec" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ExecObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:891:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var resultPtr uintptr
	var argv uintptr // An array for the string arguments. Stored
	// on the _Tcl_ stack.
	var string uintptr
	var chan1 Tcl_Channel
	var argc int32
	var background int32
	var i int32
	// var index int32 at bp+8, 4

	var keepNewline int32
	var result int32
	var skip int32
	// var length int32 at bp+12, 4

	var ignoreStderr int32

	// Check for any leading option arguments.

	keepNewline = 0
	ignoreStderr = 0
	for skip = 1; skip < objc; skip++ {
		string = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))
		}()
		if int32(*(*int8)(unsafe.Pointer(string))) != '-' {
			break
		}
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)), uintptr(unsafe.Pointer(&options9)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp+8) != TCL_OK {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 8)) == 1 {
			keepNewline = 1
		} else if *(*int32)(unsafe.Pointer(bp + 8)) == 0 {
			ignoreStderr = 1
		} else {
			skip++
			break
		}
	}
	if objc <= skip {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35406)
		return TCL_ERROR
	}

	// See if the command is to be run in background.

	background = 0
	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
	}()
	if int32(*(*int8)(unsafe.Pointer(string))) == '&' && int32(*(*int8)(unsafe.Pointer(string + 1))) == 0 {
		objc--
		background = 1
	}

	// Create the string argument array "argv". Make sure argv is large enough
	// to hold the argc arguments plus 1 extra for the zero end-of-argv word.

	argc = objc - skip
	argv = XTclStackAlloc(tls, interp, int32(uint64(uint32(argc+1))*uint64(unsafe.Sizeof(uintptr(0)))))

	// Copy the string conversions of each (post option) object into the
	// argument vector.

	for i = 0; i < argc; i++ {
		*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+skip)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+skip)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+skip)*8)))
		}()
	}
	*(*uintptr)(unsafe.Pointer(argv + uintptr(argc)*8)) = uintptr(0)
	chan1 = XTcl_OpenCommandChannel(tls, interp, argc, argv, func() int32 {
		if background != 0 {
			return 0
		}
		return func() int32 {
			if ignoreStderr != 0 {
				return int32(1) << 2
			}
			return int32(1)<<2 | int32(1)<<3
		}()
	}())

	// Free the argv array.

	XTclStackFree(tls, interp, argv)

	if chan1 == uintptr(0) {
		return TCL_ERROR
	}

	if background != 0 {
		// Store the list of PIDs from the pipeline in interp's result and
		// detach the PIDs (instead of waiting for them).

		XTclGetAndDetachPids(tls, interp, chan1)
		if XTcl_Close(tls, interp, chan1) != TCL_OK {
			return TCL_ERROR
		}
		return TCL_OK
	}

	resultPtr = XTcl_NewObj(tls)
	if XTcl_GetChannelHandle(tls, chan1, int32(1)<<1, uintptr(0)) == TCL_OK {
		if XTcl_ReadChars(tls, chan1, resultPtr, -1, 0) < 0 {
			// TIP #219.
			// Capture error messages put by the driver into the bypass area
			// and put them into the regular interpreter result. Fall back to
			// the regular message if nothing was found in the bypass.

			if !(XTclChanCaughtErrorBypass(tls, interp, chan1) != 0) {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+35434,
					libc.VaList(bp, XTcl_PosixError(tls, interp))))
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = resultPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
			return TCL_ERROR
		}
	}

	// If the process produced anything on stderr, it will have been returned
	// in the interpreter result. It needs to be appended to the result
	// string.

	result = XTcl_Close(tls, interp, chan1)
	XTcl_AppendObjToObj(tls, resultPtr, XTcl_GetObjResult(tls, interp))

	// If the last character of the result is a newline, then remove the
	// newline character.

	if keepNewline == 0 {
		string = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 12)) = (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, resultPtr, bp+12)
		}()
		if *(*int32)(unsafe.Pointer(bp + 12)) > 0 && int32(*(*int8)(unsafe.Pointer(string + uintptr(*(*int32)(unsafe.Pointer(bp + 12))-1)))) == '\n' {
			XTcl_SetObjLength(tls, resultPtr, *(*int32)(unsafe.Pointer(bp + 12))-1)
		}
	}
	XTcl_SetObjResult(tls, interp, resultPtr)

	return result
}

var options9 = [4]uintptr{
	ts + 35472, ts + 35486, ts + 16430, uintptr(0),
} /* tclIOCmd.c:904:23 */

//---------------------------------------------------------------------------
//
// Tcl_FblockedObjCmd --
//
//	This function is invoked to process the Tcl "fblocked" command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Sets interp's result to boolean true or false depending on whether the
//	preceeding input operation on the channel would have blocked.
//
//---------------------------------------------------------------------------

// ARGSUSED
func XTcl_FblockedObjCmd(tls *libc.TLS, unused ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:1059:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	// var chan1 Tcl_Channel at bp+8, 8

	// var mode int32 at bp+16, 4

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35057)
		return TCL_ERROR
	}

	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8, bp+16, 0) != TCL_OK {
		return TCL_ERROR
	}
	if !(*(*int32)(unsafe.Pointer(bp + 16))&(int32(1)<<1) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+35111,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}())))
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(XTcl_InputBlocked(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 8))) != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_OpenObjCmd --
//
//	This function is invoked to process the "open" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_OpenObjCmd(tls *libc.TLS, notUsed ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:1106:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var pipeline int32
	// var prot int32 at bp, 4

	var modeString uintptr
	var what uintptr
	var chan1 Tcl_Channel

	if objc < 2 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35499)
		return TCL_ERROR
	}
	*(*int32)(unsafe.Pointer(bp /* prot */)) = 0666
	if objc == 2 {
		modeString = ts + 23386 /* "r" */
	} else {
		modeString = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}()
		if objc == 4 {
			var permString uintptr = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
			}()
			var code int32 = TCL_ERROR
			var scanned int32 = XTclParseAllWhiteSpace(tls, permString, -1)

			// Support legacy octal numbers.

			if int32(*(*int8)(unsafe.Pointer(permString + uintptr(scanned)))) == '0' &&
				int32(*(*int8)(unsafe.Pointer(permString + uintptr(scanned+1)))) >= '0' &&
				int32(*(*int8)(unsafe.Pointer(permString + uintptr(scanned+1)))) <= '7' {
				var permObj uintptr

				for ok := true; ok; ok = 0 != 0 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						permObj = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(permObj)).FrefCount = 0
					if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer(permObj)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(permObj)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(permObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(permObj)).Fbytes, ts+35531, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(permObj)).Fbytes + 2)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(permObj)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
					}
					(*Tcl_Obj)(unsafe.Pointer(permObj)).FtypePtr = uintptr(0)
					{
					}
				}
				XTcl_AppendToObj(tls, permObj, permString+uintptr(scanned)+uintptr(1), -1)
				code = func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(permObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
						return func() int32 {
							*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(permObj + 32)))
							return TCL_OK
						}()
					}
					return XTcl_GetIntFromObj(tls, uintptr(0), permObj, bp)
				}()
				for ok2 := true; ok2; ok2 = 0 != 0 {
					var _objPtr uintptr = permObj
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}

			if code == TCL_ERROR &&
				func() int32 {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
						return func() int32 {
							*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)) + 32)))
							return TCL_OK
						}()
					}
					return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp)
				}() != TCL_OK {
				return TCL_ERROR
			}
		}
	}

	pipeline = 0
	what = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	if int32(*(*int8)(unsafe.Pointer(what))) == '|' {
		pipeline = 1
	}

	// Open the file or create a process pipeline.

	if !(pipeline != 0) {
		chan1 = XTcl_FSOpenFileChannel(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), modeString, *(*int32)(unsafe.Pointer(bp /* prot */)))
	} else {
		var mode int32
		// var seekFlag int32 at bp+16, 4

		// var cmdObjc int32 at bp+4, 4

		// var binary int32 at bp+20, 4

		// var cmdArgv uintptr at bp+8, 8

		if XTcl_SplitList(tls, interp, what+uintptr(1), bp+4, bp+8) != TCL_OK {
			return TCL_ERROR
		}

		mode = XTclGetOpenModeEx(tls, interp, modeString, bp+16, bp+20)
		if mode == -1 {
			chan1 = uintptr(0)
		} else {
			var flags int32 = int32(1)<<3 | int32(1)<<4

			switch mode & (X_O_RDONLY | X_O_WRONLY | X_O_RDWR) {
			case X_O_RDONLY:
				flags = flags | int32(1)<<2
				break
				fallthrough
			case X_O_WRONLY:
				flags = flags | int32(1)<<1
				break
				fallthrough
			case X_O_RDWR:
				flags = flags | (int32(1)<<1 | int32(1)<<2)
				break
				fallthrough
			default:
				XTcl_Panic(tls, ts+35534, 0)
				break
			}
			chan1 = XTcl_OpenCommandChannel(tls, interp, *(*int32)(unsafe.Pointer(bp + 4 /* cmdObjc */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* cmdArgv */)), flags)
			if *(*int32)(unsafe.Pointer(bp + 20)) != 0 && chan1 != 0 {
				XTcl_SetChannelOption(tls, interp, chan1, ts+34223, ts+10063)
			}
		}
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 8)))
	}
	if chan1 == uintptr(0) {
		return TCL_ERROR
	}
	XTcl_RegisterChannel(tls, interp, chan1)
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, XTcl_GetChannelName(tls, chan1), -1))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TcpAcceptCallbacksDeleteProc --
//
//	Assocdata cleanup routine called when an interpreter is being deleted
//	to set the interp field of all the accept callback records registered
//	with the interpreter to NULL. This will prevent the interpreter from
//	being used in the future to eval accept scripts.
//
// Results:
//	None.
//
// Side effects:
//	Deallocates memory and sets the interp field of all the accept
//	callback records to NULL to prevent this interpreter from being used
//	subsequently to eval accept scripts.
//
//----------------------------------------------------------------------

// ARGSUSED
func sTcpAcceptCallbacksDeleteProc(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclIOCmd.c:1230:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var hTblPtr uintptr = clientData
	var hPtr uintptr
	// var hSearch Tcl_HashSearch at bp, 24

	for hPtr = XTcl_FirstHashEntry(tls, hTblPtr, bp); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
		var acceptCallbackPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		(*AcceptCallback)(unsafe.Pointer(acceptCallbackPtr)).Finterp = uintptr(0)
	}
	XTcl_DeleteHashTable(tls, hTblPtr)
	XTclpFree(tls, hTblPtr)
}

//----------------------------------------------------------------------
//
// RegisterTcpServerInterpCleanup --
//
//	Registers an accept callback record to have its interp field set to
//	NULL when the interpreter is deleted.
//
// Results:
//	None.
//
// Side effects:
//	When, in the future, the interpreter is deleted, the interp field of
//	the accept callback data structure will be set to NULL. This will
//	prevent attempts to eval the accept script in a deleted interpreter.
//
//----------------------------------------------------------------------

func sRegisterTcpServerInterpCleanup(tls *libc.TLS, interp uintptr, acceptCallbackPtr uintptr) { /* tclIOCmd.c:1269:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var hTblPtr uintptr // Hash table for accept callback records to
	// smash when the interpreter will be
	// deleted.
	var hPtr uintptr // Entry for this record.
	// var isNew int32 at bp, 4
	// Is the entry new?

	hTblPtr = XTcl_GetAssocData(tls, interp, ts+35566, uintptr(0))

	if hTblPtr == uintptr(0) {
		hTblPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_InitHashTable(tls, hTblPtr, 1)
		XTcl_SetAssocData(tls, interp, ts+35566,
			*(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr)
			}{sTcpAcceptCallbacksDeleteProc})), hTblPtr)
	}

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FcreateProc})).f(tls, hTblPtr, acceptCallbackPtr, bp /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
		XTcl_Panic(tls, ts+35588, 0)
	}
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = acceptCallbackPtr
}

//----------------------------------------------------------------------
//
// UnregisterTcpServerInterpCleanupProc --
//
//	Unregister a previously registered accept callback record. The interp
//	field of this record will no longer be set to NULL in the future when
//	the interpreter is deleted.
//
// Results:
//	None.
//
// Side effects:
//	Prevents the interp field of the accept callback record from being set
//	to NULL in the future when the interpreter is deleted.
//
//----------------------------------------------------------------------

func sUnregisterTcpServerInterpCleanupProc(tls *libc.TLS, interp uintptr, acceptCallbackPtr uintptr) { /* tclIOCmd.c:1319:1: */
	var hTblPtr uintptr
	var hPtr uintptr

	hTblPtr = XTcl_GetAssocData(tls, interp, ts+35566, uintptr(0))
	if hTblPtr == uintptr(0) {
		return
	}

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FfindProc})).f(tls, hTblPtr, acceptCallbackPtr)
	if hPtr != uintptr(0) {
		XTcl_DeleteHashEntry(tls, hPtr)
	}
}

//----------------------------------------------------------------------
//
// AcceptCallbackProc --
//
//	This callback is invoked by the TCP channel driver when it accepts a
//	new connection from a client on a server socket.
//
// Results:
//	None.
//
// Side effects:
//	Whatever the script does.
//
//----------------------------------------------------------------------

func sAcceptCallbackProc(tls *libc.TLS, callbackData ClientData, chan1 Tcl_Channel, address uintptr, port int32) { /* tclIOCmd.c:1358:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var acceptCallbackPtr uintptr = callbackData

	// Check if the callback is still valid; the interpreter may have gone
	// away, this is signalled by setting the interp field of the callback
	// data to NULL.

	if (*AcceptCallback)(unsafe.Pointer(acceptCallbackPtr)).Finterp != uintptr(0) {
		// var portBuf [24]int8 at bp+64, 24

		var script uintptr = (*AcceptCallback)(unsafe.Pointer(acceptCallbackPtr)).Fscript
		var interp uintptr = (*AcceptCallback)(unsafe.Pointer(acceptCallbackPtr)).Finterp
		var result int32

		XTcl_Preserve(tls, script)
		XTcl_Preserve(tls, interp)

		XTclFormatInt(tls, bp+64, int32(port))
		XTcl_RegisterChannel(tls, interp, chan1)

		// Artificially bump the refcount to protect the channel from being
		// deleted while the script is being evaluated.

		XTcl_RegisterChannel(tls, uintptr(0), chan1)

		result = XTcl_VarEval(tls, interp, libc.VaList(bp, script, ts+14901, XTcl_GetChannelName(tls, chan1),
			ts+14901, address, ts+14901, bp+64, uintptr(0)))
		if result != TCL_OK {
			XTcl_BackgroundException(tls, interp, result)
			XTcl_UnregisterChannel(tls, interp, chan1)
		}

		// Decrement the artificially bumped refcount. After this it is not
		// safe anymore to use "chan", because it may now be deleted.

		XTcl_UnregisterChannel(tls, uintptr(0), chan1)

		XTcl_Release(tls, interp)
		XTcl_Release(tls, script)
	} else {
		// The interpreter has been deleted, so there is no useful way to use
		// the client socket - just close it.

		XTcl_Close(tls, uintptr(0), chan1)
	}
}

//----------------------------------------------------------------------
//
// TcpServerCloseProc --
//
//	This callback is called when the TCP server channel for which it was
//	registered is being closed. It informs the interpreter in which the
//	accept script is evaluated (if that interpreter still exists) that
//	this channel no longer needs to be informed if the interpreter is
//	deleted.
//
// Results:
//	None.
//
// Side effects:
//	In the future, if the interpreter is deleted this channel will no
//	longer be informed.
//
//----------------------------------------------------------------------

func sTcpServerCloseProc(tls *libc.TLS, callbackData ClientData) { /* tclIOCmd.c:1442:1: */
	var acceptCallbackPtr uintptr = callbackData
	// The actual data.

	if (*AcceptCallback)(unsafe.Pointer(acceptCallbackPtr)).Finterp != uintptr(0) {
		sUnregisterTcpServerInterpCleanupProc(tls, (*AcceptCallback)(unsafe.Pointer(acceptCallbackPtr)).Finterp,
			acceptCallbackPtr)
	}
	XTcl_EventuallyFree(tls, (*AcceptCallback)(unsafe.Pointer(acceptCallbackPtr)).Fscript, uintptr(3))
	XTclpFree(tls, acceptCallbackPtr)
}

//----------------------------------------------------------------------
//
// Tcl_SocketObjCmd --
//
//	This function is invoked to process the "socket" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Creates a socket based channel.
//
//----------------------------------------------------------------------

func XTcl_SocketObjCmd(tls *libc.TLS, notUsed ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:1475:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var optionIndex int32 at bp, 4

	var a int32
	var server int32
	// var port int32 at bp+8, 4

	// var myport int32 at bp+4, 4

	var async int32
	var host uintptr
	var script uintptr
	var myaddr uintptr
	var chan1 Tcl_Channel
	var myPortName uintptr
	var arg uintptr
	var iPtr uintptr
	var acceptCallbackPtr uintptr
	var len uint32
	var copyScript uintptr
	server = 0
	*(*int32)(unsafe.Pointer(bp + 4 /* myport */)) = 0
	async = 0
	script = uintptr(0)
	myaddr = uintptr(0)

	if !(XTclpHasSockets(tls, interp) != TCL_OK) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	a = 1
__2:
	if !(a < objc) {
		goto __4
	}
	arg = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))

	if !(int32(*(*int8)(unsafe.Pointer(arg))) != '-') {
		goto __5
	}
	goto __4
__5:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)), uintptr(unsafe.Pointer(&socketOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, TCL_EXACT, bp) != TCL_OK) {
		goto __6
	}
	return TCL_ERROR
__6:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp /* optionIndex */))) {
	case uint32(0) /* SKT_ASYNC */ :
		goto __8
	case uint32(1) /* SKT_MYADDR */ :
		goto __9
	case uint32(2) /* SKT_MYPORT */ :
		goto __10
	case uint32(3) /* SKT_SERVER */ :
		goto __11
	default:
		goto __12
	}
	goto __7
__8:
	if !(server == 1) {
		goto __13
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+35642, -1))
	return TCL_ERROR
__13:
	;
	async = 1
	goto __7
__9:
	a++
	if !(a >= objc) {
		goto __14
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+35686, -1))
	return TCL_ERROR
__14:
	;
	myaddr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))
	}()
	goto __7
__10:

	a++
	if !(a >= objc) {
		goto __15
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+35723, -1))
	return TCL_ERROR
__15:
	;
	myPortName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))
	}()
	if !(XTclSockGetPort(tls, interp, myPortName, ts+34653, bp+4) != TCL_OK) {
		goto __16
	}
	return TCL_ERROR
__16:
	;
	goto __7

__11:
	if !(async == 1) {
		goto __17
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+35642, -1))
	return TCL_ERROR
__17:
	;
	server = 1
	a++
	if !(a >= objc) {
		goto __18
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+35760, -1))
	return TCL_ERROR
__18:
	;
	script = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))
	}()
	goto __7
__12:
	XTcl_Panic(tls, ts+35797, 0)
__7:
	;
	goto __3
__3:
	a++
	goto __2
	goto __4
__4:
	;
	if !(server != 0) {
		goto __19
	}
	host = myaddr // NULL implies INADDR_ANY
	if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) {
		goto __21
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+35849, -1))
	return TCL_ERROR
__21:
	;
	goto __20
__19:
	if !(a < objc) {
		goto __22
	}
	host = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))
	}()
	a++
	goto __23
__22:

wrongNumArgs:
	iPtr = interp
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+35889)
	*(*int32)(unsafe.Pointer(iPtr + 424)) |= INTERP_ALTERNATE_WRONG_ARGS
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+35940)
	return TCL_ERROR
__23:
	;
__20:
	;

	if !(a == objc-1) {
		goto __24
	}
	if !(XTclSockGetPort(tls, interp, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(a)*8)))
	}(), ts+34653,
		bp+8) != TCL_OK) {
		goto __26
	}
	return TCL_ERROR
__26:
	;
	goto __25
__24:
	goto wrongNumArgs
__25:
	;

	if !(server != 0) {
		goto __27
	}
	acceptCallbackPtr =
		XTcl_Alloc(tls, uint32(unsafe.Sizeof(AcceptCallback{})))
	len = uint32(libc.Xstrlen(tls, script) + uint64(1))
	copyScript = XTcl_Alloc(tls, len)

	libc.Xmemcpy(tls, copyScript, script, uint64(len))
	(*AcceptCallback)(unsafe.Pointer(acceptCallbackPtr)).Fscript = copyScript
	(*AcceptCallback)(unsafe.Pointer(acceptCallbackPtr)).Finterp = interp
	chan1 = XTcl_OpenTcpServer(tls, interp, *(*int32)(unsafe.Pointer(bp + 8 /* port */)), host, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, Tcl_Channel, uintptr, int32)
	}{sAcceptCallbackProc})),
		acceptCallbackPtr)
	if !(chan1 == uintptr(0)) {
		goto __29
	}
	XTclpFree(tls, copyScript)
	XTclpFree(tls, acceptCallbackPtr)
	return TCL_ERROR
__29:
	;

	// Register with the interpreter to let us know when the interpreter
	// is deleted (by having the callback set the interp field of the
	// acceptCallbackPtr's structure to NULL). This is to avoid trying to
	// eval the script in a deleted interpreter.

	sRegisterTcpServerInterpCleanup(tls, interp, acceptCallbackPtr)

	// Register a close callback. This callback will inform the
	// interpreter (if it still exists) that this channel does not need to
	// be informed when the interpreter is deleted.

	XTcl_CreateCloseHandler(tls, chan1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sTcpServerCloseProc})), acceptCallbackPtr)
	goto __28
__27:
	chan1 = XTcl_OpenTcpClient(tls, interp, *(*int32)(unsafe.Pointer(bp + 8 /* port */)), host, myaddr, *(*int32)(unsafe.Pointer(bp + 4 /* myport */)), async)
	if !(chan1 == uintptr(0)) {
		goto __30
	}
	return TCL_ERROR
__30:
	;
__28:
	;

	XTcl_RegisterChannel(tls, interp, chan1)
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, XTcl_GetChannelName(tls, chan1), -1))
	return TCL_OK
}

var socketOptions = [5]uintptr{
	ts + 35976, ts + 35983, ts + 35991, ts + 35999, uintptr(0),
} /* tclIOCmd.c:1481:23 */

//----------------------------------------------------------------------
//
// Tcl_FcopyObjCmd --
//
//	This function is invoked to process the "fcopy" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Moves data between two channels and possibly sets up a background copy
//	handler.
//
//----------------------------------------------------------------------

func XTcl_FcopyObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:1653:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var inChan Tcl_Channel at bp+16, 8

	// var outChan Tcl_Channel at bp+32, 8

	// var mode int32 at bp+24, 4

	var i int32
	// var index int32 at bp+40, 4

	// var toRead Tcl_WideInt at bp+48, 8

	var cmdPtr uintptr

	if objc < 3 || objc > 7 || objc == 4 || objc == 6 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+36007)
		return TCL_ERROR
	}

	// Parse the channel arguments and verify that they are readable or
	// writable, as appropriate.

	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16, bp+24, 0) != TCL_OK {
		return TCL_ERROR
	}
	if !(*(*int32)(unsafe.Pointer(bp + 24))&(int32(1)<<1) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+35111,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}())))
		return TCL_ERROR
	}
	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+32, bp+24, 0) != TCL_OK {
		return TCL_ERROR
	}
	if !(*(*int32)(unsafe.Pointer(bp + 24))&(int32(1)<<2) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+34995,
			libc.VaList(bp+8, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
			}())))
		return TCL_ERROR
	}

	*(*Tcl_WideInt)(unsafe.Pointer(bp + 48 /* toRead */)) = int64(-1)
	cmdPtr = uintptr(0)
	for i = 3; i < objc; i = i + 2 {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&switches1)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+40) != TCL_OK {
			return TCL_ERROR
		}
		switch *(*int32)(unsafe.Pointer(bp + 40 /* index */)) {
		case 0 /* FcopySize */ :
			if XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+48) != TCL_OK {
				return TCL_ERROR
			}
			if *(*Tcl_WideInt)(unsafe.Pointer(bp + 48)) < int64(0) {
				// Handle all negative sizes like -1, meaning 'copy all'. By
				// resetting toRead we avoid changes in the core copying
				// functions (which explicitly check for -1 and crash on any
				// other negative value).

				*(*Tcl_WideInt)(unsafe.Pointer(bp + 48 /* toRead */)) = int64(-1)
			}
			break
		case 1 /* FcopyCommand */ :
			cmdPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
			break
		}
	}

	return XTclCopyChannel(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(bp + 16 /* inChan */)), *(*Tcl_Channel)(unsafe.Pointer(bp + 32 /* outChan */)), *(*Tcl_WideInt)(unsafe.Pointer(bp + 48 /* toRead */)), cmdPtr)
}

var switches1 = [3]uintptr{ts + 36053, ts + 16010, uintptr(0)} /* tclIOCmd.c:1663:23 */

//---------------------------------------------------------------------------
//
// ChanPendingObjCmd --
//
//	This function is invoked to process the Tcl "chan pending" command
//	(TIP #287). See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Sets interp's result to the number of bytes of buffered input or
//	output (depending on whether the first argument is "input" or
//	"output"), or -1 if the channel wasn't opened for that mode.
//
//---------------------------------------------------------------------------

// ARGSUSED
func sChanPendingObjCmd(tls *libc.TLS, unused ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:1749:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	// var chan1 Tcl_Channel at bp+8, 8

	// var index int32 at bp, 4

	// var mode int32 at bp+16, 4

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+36059)
		return TCL_ERROR
	}

	if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&options10)), int32(unsafe.Sizeof(uintptr(0))), ts+13412, 0, bp) != TCL_OK {
		return TCL_ERROR
	}

	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+8, bp+16, 0) != TCL_OK {
		return TCL_ERROR
	}

	switch uint32(*(*int32)(unsafe.Pointer(bp /* index */))) {
	case uint32(0) /* PENDING_INPUT */ :
		if !(*(*int32)(unsafe.Pointer(bp + 16))&(int32(1)<<1) != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, -1))
		} else {
			XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, XTcl_InputBuffered(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 8 /* chan1 */)))))
		}
		break
	case uint32(1) /* PENDING_OUTPUT */ :
		if !(*(*int32)(unsafe.Pointer(bp + 16))&(int32(1)<<2) != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, -1))
		} else {
			XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, XTcl_OutputBuffered(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 8 /* chan1 */)))))
		}
		break
	}
	return TCL_OK
}

var options10 = [3]uintptr{ts + 36074, ts + 36080, uintptr(0)} /* tclIOCmd.c:1757:23 */

//----------------------------------------------------------------------
//
// ChanTruncateObjCmd --
//
//	This function is invoked to process the "chan truncate" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Truncates a channel (or rather a file underlying a channel).
//
//----------------------------------------------------------------------

func sChanTruncateObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:1811:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var chan1 Tcl_Channel at bp+32, 8

	// var length Tcl_WideInt at bp+40, 8

	if objc < 2 || objc > 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+36087)
		return TCL_ERROR
	}
	if XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+32, uintptr(0), 0) != TCL_OK {
		return TCL_ERROR
	}

	if objc == 3 {
		// User is supplying an explicit length.

		if XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+40) != TCL_OK {
			return TCL_ERROR
		}
		if *(*Tcl_WideInt)(unsafe.Pointer(bp + 40)) < int64(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+36106, -1))
			return TCL_ERROR
		}
	} else {
		// User wants to truncate to the current file position.

		*(*Tcl_WideInt)(unsafe.Pointer(bp + 40 /* length */)) = XTcl_Tell(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 32 /* chan1 */)))
		if *(*Tcl_WideInt)(unsafe.Pointer(bp + 40)) == Tcl_WideInt(int32(int64(-1))) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+36149,
				libc.VaList(bp, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
				}(), XTcl_PosixError(tls, interp))))
			return TCL_ERROR
		}
	}

	if XTcl_TruncateChannel(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 32)), *(*Tcl_WideInt)(unsafe.Pointer(bp + 40))) != TCL_OK {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+36198,
			libc.VaList(bp+16, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}(), XTcl_PosixError(tls, interp))))
		return TCL_ERROR
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// ChanPipeObjCmd --
//
//	This function is invoked to process the "chan pipe" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Creates a pair of Tcl channels wrapping both ends of a new
//	anonymous pipe.
//
//----------------------------------------------------------------------

func sChanPipeObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:1884:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var rchan Tcl_Channel at bp, 8

	// var wchan Tcl_Channel at bp+8, 8

	// var channelNames [2]uintptr at bp+16, 16

	var resultPtr uintptr

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2631)
		return TCL_ERROR
	}

	if XTcl_CreatePipe(tls, interp, bp, bp+8, 0) != TCL_OK {
		return TCL_ERROR
	}

	*(*uintptr)(unsafe.Pointer(bp + 16)) = XTcl_GetChannelName(tls, *(*Tcl_Channel)(unsafe.Pointer(bp /* rchan */)))
	*(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = XTcl_GetChannelName(tls, *(*Tcl_Channel)(unsafe.Pointer(bp + 8 /* wchan */)))

	resultPtr = XTcl_NewObj(tls)
	XTcl_ListObjAppendElement(tls, uintptr(0), resultPtr,
		XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), -1))
	XTcl_ListObjAppendElement(tls, uintptr(0), resultPtr,
		XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)), -1))
	XTcl_SetObjResult(tls, interp, resultPtr)

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclChannelNamesCmd --
//
//	This function is invoked to process the "chan names" and "file
//	channels" Tcl commands.  See the user documentation for details on
//	what they do.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclChannelNamesCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIOCmd.c:1935:1: */
	if objc < 1 || objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14143)
		return TCL_ERROR
	}
	return XTcl_GetChannelNamesEx(tls, interp,
		func() uintptr {
			if objc == 1 {
				return uintptr(0)
			}
			return func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}()
		}())
}

//----------------------------------------------------------------------
//
// TclInitChanCmd --
//
//	This function is invoked to create the "chan" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A Tcl command handle.
//
// Side effects:
//	None (since nothing is byte-compiled).
//
//----------------------------------------------------------------------

func XTclInitChanCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclIOCmd.c:1967:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var ensemble Tcl_Command
	// var mapObj uintptr at bp, 8

	var i int32

	ensemble = XTclMakeEnsemble(tls, interp, ts+36232, uintptr(unsafe.Pointer(&initMap1)))
	XTcl_GetEnsembleMappingDict(tls, uintptr(0), ensemble, bp)
	for i = 0; extras[i] != 0; i = i + 2 {
		// Can assume that reference counts are all incremented.

		XTcl_DictObjPut(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* mapObj */)), XTcl_NewStringObj(tls, extras[i], -1),
			XTcl_NewStringObj(tls, extras[i+1], -1))
	}
	XTcl_SetEnsembleMappingDict(tls, interp, ensemble, *(*uintptr)(unsafe.Pointer(bp /* mapObj */)))
	return ensemble
}

var initMap1 = [20]EnsembleImplMap{
	{Fname: ts + 36237, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 5967, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12667, Fproc: 0},
	{Fname: ts + 23746, Fproc: 0, FcompileProc: 0}, // TIP #219
	{Fname: ts + 5973, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 36245, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 6023, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 6029, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12227, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 36251, Fproc: 0, FcompileProc: 0}, // TIP #287
	{Fname: ts + 36259, Fproc: 0, FcompileProc: 0}, // TIP #304
	{Fname: ts + 3586, Fproc: 0, FcompileProc: 0},  // TIP #230
	{Fname: ts + 36264, Fproc: 0, FcompileProc: 0}, // TIP #219
	{Fname: ts + 2657, Fproc: 0, FcompileProc: 0},  // TIP #230
	{Fname: ts + 6048, Fproc: 0},
	{Fname: ts + 6057, Fproc: 0},
	{Fname: ts + 6062, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 6081, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 36274, Fproc: 0, FcompileProc: 0}, // TIP #208
	{},
} /* tclIOCmd.c:1977:34 */
var extras = [3]uintptr{
	ts + 26712, ts + 36283,
	uintptr(0),
} /* tclIOCmd.c:1999:23 */

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Forward declarations of internal procedures. Third, helper procedures
// encapsulating essential tasks.

type TransformChannelData1 = struct {
	Fself          Tcl_Channel
	FreadIsFlushed int32
	FeofPending    int32
	Fflags         int32
	FwatchMask     int32
	Fmode          int32
	F__ccgo_pad1   [4]byte
	Ftimer         Tcl_TimerToken
	FmaxRead       int32
	F__ccgo_pad2   [4]byte
	Finterp        uintptr
	Fcommand       uintptr
	Fresult        ResultBuffer
	FrefCount      int32
	F__ccgo_pad3   [4]byte
} /* tclIOGT.c:59:9 */

// Forward declarations of internal procedures. Third, helper procedures
// encapsulating essential tasks.

type TransformChannelData = TransformChannelData1 /* tclIOGT.c:59:37 */

// Action codes to give to 'ExecuteCallback' (argument 'transmit'), telling
// the procedure what to do with the result of the script it calls.

// Codes for 'preserve' of 'ExecuteCallback'.

// Strings for the action codes delivered to the script implementing a
// transformation. Argument 'op' of 'ExecuteCallback'.

// Management of a simple buffer.

type ResultBuffer2 = struct {
	Fbuf       uintptr
	Fallocated Size_t
	Fused      Size_t
} /* tclIOGT.c:59:9 */

// Action codes to give to 'ExecuteCallback' (argument 'transmit'), telling
// the procedure what to do with the result of the script it calls.

// Codes for 'preserve' of 'ExecuteCallback'.

// Strings for the action codes delivered to the script implementing a
// transformation. Argument 'op' of 'ExecuteCallback'.

// Management of a simple buffer.

type ResultBuffer = ResultBuffer2 /* tclIOGT.c:106:29 */

// This structure describes the channel type structure for Tcl-based
// transformations.

var transformChannelType = Tcl_ChannelType{
	FtypeName:      ts + 36296,
	Fversion:       uintptr(0x5),
	FcloseProc:     0, // Close proc.
	FinputProc:     0, // Input proc.
	FoutputProc:    0, // Output proc.
	FseekProc:      0, // Seek proc.
	FsetOptionProc: 0, // Set option proc.
	FgetOptionProc: 0, // Get option proc.
	FwatchProc:     0, // Initialize notifier.
	FgetHandleProc: 0, // Get OS handles out of channel.
	Fclose2Proc:    0, // close2proc
	FblockModeProc: 0, // Flush proc.
	FhandlerProc:   0, // Handling of events bubbling up.
	FwideSeekProc:  0, // Truncate.
} /* tclIOGT.c:121:30 */

func sPreserveData(tls *libc.TLS, dataPtr uintptr) { /* tclIOGT.c:220:1: */
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).FrefCount++
}

func sReleaseData(tls *libc.TLS, dataPtr uintptr) { /* tclIOGT.c:227:1: */
	if libc.PreDecInt32(&(*TransformChannelData)(unsafe.Pointer(dataPtr)).FrefCount, 1) != 0 {
		return
	}
	sResultClear(tls, dataPtr+64)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fcommand
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTclpFree(tls, dataPtr)
}

//----------------------------------------------------------------------
//
// TclChannelTransform --
//
//	Implements the Tcl "testchannel transform" debugging command. This is
//	part of the testing environment. This sets up a tcl script (cmdObjPtr)
//	to be used as a transform on the channel.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTclChannelTransform(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel, cmdObjPtr uintptr) int32 { /* tclIOGT.c:258:1: */
	bp := tls.Alloc(232)
	defer tls.Free(232)

	var chanPtr uintptr  // The actual channel.
	var statePtr uintptr // State info for channel.
	var mode int32       // Read/write mode of the channel.
	// var objc int32 at bp+8, 4

	var dataPtr uintptr
	// var ds Tcl_DString at bp+16, 216

	if chan1 == uintptr(0) {
		return TCL_ERROR
	}

	if TCL_OK != XTcl_ListObjLength(tls, interp, cmdObjPtr, bp+8) {
		XTcl_SetObjResult(tls, interp,
			XTcl_NewStringObj(tls, ts+36306, -1))
		return TCL_ERROR
	}

	chanPtr = chan1
	statePtr = (*Channel)(unsafe.Pointer(chanPtr)).Fstate
	chanPtr = (*ChannelState)(unsafe.Pointer(statePtr)).FtopChanPtr
	chan1 = chanPtr
	mode = (*ChannelState)(unsafe.Pointer(statePtr)).Fflags & (int32(1)<<1 | int32(1)<<2)

	// Now initialize the transformation state and stack it upon the specified
	// channel. One of the necessary things to do is to retrieve the blocking
	// regime of the underlying channel and to use the same for us too.

	dataPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TransformChannelData{})))

	(*TransformChannelData)(unsafe.Pointer(dataPtr)).FrefCount = 1
	XTcl_DStringInit(tls, bp+16)
	XTcl_GetChannelOption(tls, interp, chan1, ts+32554, bp+16)
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).FreadIsFlushed = 0
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).FeofPending = 0
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).Fflags = 0
	if int32(*(*int8)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(bp + 16)).Fstring))) == '0' {
		*(*int32)(unsafe.Pointer(dataPtr + 16)) |= int32(1) << 0
	}
	XTcl_DStringFree(tls, bp+16)

	(*TransformChannelData)(unsafe.Pointer(dataPtr)).FwatchMask = 0
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode = mode
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer = uintptr(0)
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).FmaxRead = 4096 // Initial value not relevant.
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).Finterp = interp
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).Fcommand = cmdObjPtr
	(*Tcl_Obj)(unsafe.Pointer((*TransformChannelData)(unsafe.Pointer(dataPtr)).Fcommand)).FrefCount++

	sResultInit(tls, dataPtr+64)

	(*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself = XTcl_StackChannel(tls, interp, uintptr(unsafe.Pointer(&transformChannelType)), dataPtr,
		mode, chan1)
	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself == uintptr(0) {
		XTcl_AppendPrintfToObj(tls, XTcl_GetObjResult(tls, interp),
			ts+36335, libc.VaList(bp, XTcl_GetChannelName(tls, chan1)))
		sReleaseData(tls, dataPtr)
		return TCL_ERROR
	}
	XTcl_Preserve(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself)

	// At last initialize the transformation at the script level.

	sPreserveData(tls, dataPtr)
	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<2) != 0 && sExecuteCallback(tls, dataPtr, uintptr(0),
		ts+36365, uintptr(0), 0, TRANSMIT_DONT, P_NO_PRESERVE) != TCL_OK {
		XTcl_UnstackChannel(tls, interp, chan1)
		sReleaseData(tls, dataPtr)
		return TCL_ERROR
	}

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<1) != 0 && sExecuteCallback(tls, dataPtr, uintptr(0),
		ts+36378, uintptr(0), 0, TRANSMIT_DONT, P_NO_PRESERVE) != TCL_OK {
		sExecuteCallback(tls, dataPtr, uintptr(0), ts+36390, uintptr(0), 0, TRANSMIT_DONT,
			P_NO_PRESERVE)
		XTcl_UnstackChannel(tls, interp, chan1)
		sReleaseData(tls, dataPtr)
		return TCL_ERROR
	}

	sReleaseData(tls, dataPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ExecuteCallback --
//
//	Executes the defined callback for buffer and operation.
//
// Side effects:
//	As of the executed tcl script.
//
// Result:
//	A standard TCL error code. In case of an error a message is left in
//	the result area of the specified interpreter.
//
//----------------------------------------------------------------------

func sExecuteCallback(tls *libc.TLS, dataPtr uintptr, interp uintptr, op uintptr, buf uintptr, bufLen int32, transmit int32, preserve int32) int32 { /* tclIOGT.c:368:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var resObj uintptr // See below, switch (transmit).
	// var resLen int32 at bp, 4

	var resBuf uintptr
	var state Tcl_InterpState = uintptr(0)
	var res int32 = TCL_OK
	var command uintptr = XTclListObjCopy(tls, uintptr(0), (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fcommand)
	var eval uintptr = (*TransformChannelData)(unsafe.Pointer(dataPtr)).Finterp

	XTcl_Preserve(tls, eval)

	// Step 1, create the complete command to execute. Do this by appending
	// operation and buffer to operate upon to a copy of the callback
	// definition. We *cannot* create a list containing 3 objects and then use
	// 'Tcl_EvalObjv', because the command may contain additional prefixed
	// arguments. Feather's curried commands would come in handy here.

	if preserve == P_PRESERVE {
		state = XTcl_SaveInterpState(tls, eval, res)
	}

	(*Tcl_Obj)(unsafe.Pointer(command)).FrefCount++
	XTcl_ListObjAppendElement(tls, uintptr(0), command, XTcl_NewStringObj(tls, op, -1))

	// Use a byte-array to prevent the misinterpretation of binary data coming
	// through as UTF while at the tcl level.

	XTcl_ListObjAppendElement(tls, uintptr(0), command, XTcl_NewByteArrayObj(tls, buf, bufLen))

	// Step 2, execute the command at the global level of the interpreter used
	// to create the transformation. Destroy the command afterward. If an
	// error occured and the current interpreter is defined and not equal to
	// the interpreter for the callback, then copy the error message into
	// current interpreter. Don't copy if in preservation mode.

	res = XTcl_EvalObjEx(tls, eval, command, TCL_EVAL_GLOBAL)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = command
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	command = uintptr(0)

	if res != TCL_OK && interp != uintptr(0) && eval != interp &&
		preserve == P_NO_PRESERVE {
		XTcl_SetObjResult(tls, interp, XTcl_GetObjResult(tls, eval))
		XTcl_Release(tls, eval)
		return res
	}

	// Step 3, transmit a possible conversion result to the underlying
	// channel, or ourselves.

	switch transmit {
	case TRANSMIT_DONT:
		// nothing to do
		break

	case TRANSMIT_DOWN:
		if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself == uintptr(0) {
			break
		}
		resObj = XTcl_GetObjResult(tls, eval)
		resBuf = XTcl_GetByteArrayFromObj(tls, resObj, bp)
		XTcl_WriteRaw(tls, XTcl_GetStackedChannel(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself), resBuf,
			*(*int32)(unsafe.Pointer(bp /* resLen */)))
		break

	case TRANSMIT_SELF:
		if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself == uintptr(0) {
			break
		}
		resObj = XTcl_GetObjResult(tls, eval)
		resBuf = XTcl_GetByteArrayFromObj(tls, resObj, bp)
		XTcl_WriteRaw(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself, resBuf, *(*int32)(unsafe.Pointer(bp /* resLen */)))
		break

	case TRANSMIT_IBUF:
		resObj = XTcl_GetObjResult(tls, eval)
		resBuf = XTcl_GetByteArrayFromObj(tls, resObj, bp)
		sResultAdd(tls, dataPtr+64, resBuf, uint64(*(*int32)(unsafe.Pointer(bp /* resLen */))))
		break

	case TRANSMIT_NUM:
		// Interpret result as integer number.

		resObj = XTcl_GetObjResult(tls, eval)
		if (*Tcl_Obj)(unsafe.Pointer(resObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*int32)(unsafe.Pointer(dataPtr + 40)) = int32(*(*int32)(unsafe.Pointer(resObj + 32)))
		} else {
			XTcl_GetIntFromObj(tls, eval, resObj, dataPtr+40)
		}
		break
	}

	XTcl_ResetResult(tls, eval)
	if preserve == P_PRESERVE {
		XTcl_RestoreInterpState(tls, eval, state)
	}
	XTcl_Release(tls, eval)
	return res
}

//----------------------------------------------------------------------
//
// TransformBlockModeProc --
//
//	Trap handler. Called by the generic IO system during option processing
//	to change the blocking mode of the channel.
//
// Side effects:
//	Forwards the request to the underlying channel.
//
// Result:
//	0 if successful, errno when failed.
//
//----------------------------------------------------------------------

func sTransformBlockModeProc(tls *libc.TLS, instanceData ClientData, mode int32) int32 { /* tclIOGT.c:504:1: */
	var dataPtr uintptr = instanceData

	if mode == TCL_MODE_NONBLOCKING {
		*(*int32)(unsafe.Pointer(dataPtr + 16)) |= int32(1) << 0
	} else {
		*(*int32)(unsafe.Pointer(dataPtr + 16)) &= libc.CplInt32(int32(1) << 0)
	}
	return 0
}

//----------------------------------------------------------------------
//
// TransformCloseProc/TransformClose2Proc --
//
//	Trap handler. Called by the generic IO system during destruction of
//	the transformation channel.
//
// Side effects:
//	Releases the memory allocated in 'Tcl_TransformObjCmd'.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sTransformCloseProc(tls *libc.TLS, instanceData ClientData, interp uintptr) int32 { /* tclIOGT.c:536:1: */
	var dataPtr uintptr = instanceData

	// Important: In this procedure 'dataPtr->self' already points to the
	// underlying channel.
	//
	// There is no need to cancel an existing channel handler, this is already
	// done. Either by 'Tcl_UnstackChannel' or by the general cleanup in
	// 'Tcl_Close'.
	//
	// But we have to cancel an active timer to prevent it from firing on the
	// removed channel.

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer != uintptr(0) {
		XTcl_DeleteTimerHandler(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer)
		(*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer = uintptr(0)
	}

	// Now flush data waiting in internal buffers to output and input. The
	// input must be done despite the fact that there is no real receiver for
	// it anymore. But the scripts might have sideeffects other parts of the
	// system rely on (f.e. signaling the close to interested parties).

	sPreserveData(tls, dataPtr)
	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<2) != 0 {
		sExecuteCallback(tls, dataPtr, interp, ts+36403, uintptr(0), 0,
			TRANSMIT_DOWN, P_PRESERVE)
	}

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<1) != 0 && !((*TransformChannelData)(unsafe.Pointer(dataPtr)).FreadIsFlushed != 0) {
		(*TransformChannelData)(unsafe.Pointer(dataPtr)).FreadIsFlushed = 1
		sExecuteCallback(tls, dataPtr, interp, ts+36415, uintptr(0), 0, TRANSMIT_IBUF,
			P_PRESERVE)
	}

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<2) != 0 {
		sExecuteCallback(tls, dataPtr, interp, ts+36390, uintptr(0), 0,
			TRANSMIT_DONT, P_PRESERVE)
	}
	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<1) != 0 {
		sExecuteCallback(tls, dataPtr, interp, ts+36426, uintptr(0), 0,
			TRANSMIT_DONT, P_PRESERVE)
	}
	sReleaseData(tls, dataPtr)

	// General cleanup.

	XTcl_Release(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself)
	(*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself = uintptr(0)
	sReleaseData(tls, dataPtr)
	return TCL_OK
}

func sTransformClose2Proc(tls *libc.TLS, instanceData ClientData, interp uintptr, flags int32) int32 { /* tclIOGT.c:599:1: */
	if flags&(int32(1)<<1|int32(1)<<2) == 0 {
		return sTransformCloseProc(tls, instanceData, interp)
	}
	return EINVAL
}

//----------------------------------------------------------------------
//
// TransformInputProc --
//
//	Called by the generic IO system to convert read data.
//
// Side effects:
//	As defined by the conversion.
//
// Result:
//	A transformed buffer.
//
//----------------------------------------------------------------------

func sTransformInputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, toRead int32, errorCodePtr uintptr) int32 { /* tclIOGT.c:627:1: */
	var dataPtr uintptr = instanceData
	var gotBytes int32
	var read int32
	var copied int32
	var downChan Tcl_Channel

	// Should assert(dataPtr->mode & TCL_READABLE);

	if toRead == 0 || (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself == uintptr(0) {
		// Catch a no-op. TODO: Is this a panic()?
		return 0
	}

	gotBytes = 0
	downChan = XTcl_GetStackedChannel(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself)

	sPreserveData(tls, dataPtr)
	for toRead > 0 {
		// Loop until the request is satisfied (or no data is available from
		// below, possibly EOF).

		copied = sResultCopy(tls, dataPtr+64, buf, uint64(toRead))
		toRead = toRead - copied
		buf += uintptr(copied)
		gotBytes = gotBytes + copied

		if toRead == 0 {
			// The request was completely satisfied from our buffers. We can
			// break out of the loop and return to the caller.

			break
		}

		// Length (dataPtr->result) == 0, toRead > 0 here. Use the incoming
		// 'buf'! as target to store the intermediary information read from
		// the underlying channel.
		//
		// Ask the tcl level how much data it allows us to read from the
		// underlying channel. This feature allows the transform to signal EOF
		// upstream although there is none downstream. Useful to control an
		// unbounded 'fcopy', either through counting bytes, or by pattern
		// matching.

		sExecuteCallback(tls, dataPtr, uintptr(0), ts+36438, uintptr(0), 0,
			TRANSMIT_NUM, P_PRESERVE)

		if (*TransformChannelData)(unsafe.Pointer(dataPtr)).FmaxRead >= 0 {
			if (*TransformChannelData)(unsafe.Pointer(dataPtr)).FmaxRead < toRead {
				toRead = (*TransformChannelData)(unsafe.Pointer(dataPtr)).FmaxRead
			}
		} // else: 'maxRead < 0' == Accept the current value of toRead.
		if toRead <= 0 {
			break
		}
		if (*TransformChannelData)(unsafe.Pointer(dataPtr)).FeofPending != 0 {
			// Already saw EOF from downChan; don't ask again.
			// NOTE: Could move this up to avoid the last maxRead
			// execution.  Believe this would still be correct behavior,
			// but the test suite tests the whole command callback
			// sequence, so leave it unchanged for now.

			break
		}

		// Get bytes from the underlying channel.

		read = XTcl_ReadRaw(tls, downChan, buf, toRead)
		if read < 0 {
			if XTcl_InputBlocked(tls, downChan) != 0 && gotBytes > 0 {
				// Zero bytes available from downChan because blocked.
				// But nonzero bytes already copied, so total is a
				// valid blocked short read. Return to caller.

				break
			}

			// Either downChan is not blocked (there's a real error).
			// or it is and there are no bytes copied yet.  In either
			// case we want to pass the "error" along to the caller,
			// either to report an error, or to signal to the caller
			// that zero bytes are available because blocked.

			*(*int32)(unsafe.Pointer(errorCodePtr)) = XTcl_GetErrno(tls)
			gotBytes = -1
			break
		} else if read == 0 {

			// Zero returned from Tcl_ReadRaw() always indicates EOF
			// on the down channel.

			(*TransformChannelData)(unsafe.Pointer(dataPtr)).FeofPending = 1
			(*TransformChannelData)(unsafe.Pointer(dataPtr)).FreadIsFlushed = 1
			sExecuteCallback(tls, dataPtr, uintptr(0), ts+36415, uintptr(0), 0,
				TRANSMIT_IBUF, P_PRESERVE)

			if sResultEmpty(tls, dataPtr+64) != 0 {
				// We had nothing to flush.

				break
			}

			continue // at: while (toRead > 0)
		} // read == 0

		// Transform the read chunk and add the result to our read buffer
		// (dataPtr->result).

		if sExecuteCallback(tls, dataPtr, uintptr(0), ts+6057, buf, read,
			TRANSMIT_IBUF, P_PRESERVE) != TCL_OK {
			*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
			gotBytes = -1
			break
		}
	} // while toRead > 0

	if gotBytes == 0 {
		(*TransformChannelData)(unsafe.Pointer(dataPtr)).FeofPending = 0
	}
	sReleaseData(tls, dataPtr)
	return gotBytes
}

//----------------------------------------------------------------------
//
// TransformOutputProc --
//
//	Called by the generic IO system to convert data waiting to be written.
//
// Side effects:
//	As defined by the transformation.
//
// Result:
//	A transformed buffer.
//
//----------------------------------------------------------------------

func sTransformOutputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, toWrite int32, errorCodePtr uintptr) int32 { /* tclIOGT.c:794:1: */
	var dataPtr uintptr = instanceData

	// Should assert(dataPtr->mode & TCL_WRITABLE);

	if toWrite == 0 {
		// Catch a no-op.

		return 0
	}

	sPreserveData(tls, dataPtr)
	if sExecuteCallback(tls, dataPtr, uintptr(0), ts+33651, buf, toWrite,
		TRANSMIT_DOWN, P_NO_PRESERVE) != TCL_OK {
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
		toWrite = -1
	}
	sReleaseData(tls, dataPtr)

	return toWrite
}

//----------------------------------------------------------------------
//
// TransformSeekProc --
//
//	This procedure is called by the generic IO level to move the access
//	point in a channel.
//
// Side effects:
//	Moves the location at which the channel will be accessed in future
//	operations. Flushes all transformation buffers, then forwards it to
//	the underlying channel.
//
// Result:
//	-1 if failed, the new position if successful. An output argument
//	contains the POSIX error code if an error occurred, or zero.
//
//----------------------------------------------------------------------

func sTransformSeekProc(tls *libc.TLS, instanceData ClientData, offset int32, mode int32, errorCodePtr uintptr) int32 { /* tclIOGT.c:846:1: */
	var dataPtr uintptr = instanceData
	var parent Tcl_Channel = XTcl_GetStackedChannel(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself)
	var parentType uintptr = XTcl_GetChannelType(tls, parent)
	var parentSeekProc uintptr = XTcl_ChannelSeekProc(tls, parentType)

	if offset == 0 && mode == SEEK_CUR {
		// This is no seek but a request to tell the caller the current
		// location. Simply pass the request down.

		return (*struct {
			f func(*libc.TLS, ClientData, int32, int32, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{parentSeekProc})).f(tls, XTcl_GetChannelInstanceData(tls, parent), offset,
			mode, errorCodePtr)
	}

	// It is a real request to change the position. Flush all data waiting for
	// output and discard everything in the input buffers. Then pass the
	// request down, unchanged.

	sPreserveData(tls, dataPtr)
	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<2) != 0 {
		sExecuteCallback(tls, dataPtr, uintptr(0), ts+36403, uintptr(0), 0, TRANSMIT_DOWN,
			P_NO_PRESERVE)
	}

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<1) != 0 {
		sExecuteCallback(tls, dataPtr, uintptr(0), ts+36452, uintptr(0), 0, TRANSMIT_DONT,
			P_NO_PRESERVE)
		sResultClear(tls, dataPtr+64)
		(*TransformChannelData)(unsafe.Pointer(dataPtr)).FreadIsFlushed = 0
		(*TransformChannelData)(unsafe.Pointer(dataPtr)).FeofPending = 0
	}
	sReleaseData(tls, dataPtr)

	return (*struct {
		f func(*libc.TLS, ClientData, int32, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{parentSeekProc})).f(tls, XTcl_GetChannelInstanceData(tls, parent), offset, mode,
		errorCodePtr)
}

//----------------------------------------------------------------------
//
// TransformWideSeekProc --
//
//	This procedure is called by the generic IO level to move the access
//	point in a channel, with a (potentially) 64-bit offset.
//
// Side effects:
//	Moves the location at which the channel will be accessed in future
//	operations. Flushes all transformation buffers, then forwards it to
//	the underlying channel.
//
// Result:
//	-1 if failed, the new position if successful. An output argument
//	contains the POSIX error code if an error occurred, or zero.
//
//----------------------------------------------------------------------

func sTransformWideSeekProc(tls *libc.TLS, instanceData ClientData, offset Tcl_WideInt, mode int32, errorCodePtr uintptr) Tcl_WideInt { /* tclIOGT.c:913:1: */
	var dataPtr uintptr = instanceData
	var parent Tcl_Channel = XTcl_GetStackedChannel(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself)
	var parentType uintptr = XTcl_GetChannelType(tls, parent)
	var parentSeekProc uintptr = XTcl_ChannelSeekProc(tls, parentType)
	var parentWideSeekProc uintptr = XTcl_ChannelWideSeekProc(tls, parentType)
	var parentData ClientData = XTcl_GetChannelInstanceData(tls, parent)

	if offset == int64(0) && mode == SEEK_CUR {
		// This is no seek but a request to tell the caller the current
		// location. Simply pass the request down.

		if parentWideSeekProc != uintptr(0) {
			return (*struct {
				f func(*libc.TLS, ClientData, Tcl_WideInt, int32, uintptr) Tcl_WideInt
			})(unsafe.Pointer(&struct{ uintptr }{parentWideSeekProc})).f(tls, parentData, offset, mode, errorCodePtr)
		}

		return Tcl_WideInt(int32((*struct {
			f func(*libc.TLS, ClientData, int32, int32, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{parentSeekProc})).f(tls, parentData, 0, mode, errorCodePtr)))
	}

	// It is a real request to change the position. Flush all data waiting for
	// output and discard everything in the input buffers. Then pass the
	// request down, unchanged.

	sPreserveData(tls, dataPtr)
	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<2) != 0 {
		sExecuteCallback(tls, dataPtr, uintptr(0), ts+36403, uintptr(0), 0, TRANSMIT_DOWN,
			P_NO_PRESERVE)
	}

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fmode&(int32(1)<<1) != 0 {
		sExecuteCallback(tls, dataPtr, uintptr(0), ts+36452, uintptr(0), 0, TRANSMIT_DONT,
			P_NO_PRESERVE)
		sResultClear(tls, dataPtr+64)
		(*TransformChannelData)(unsafe.Pointer(dataPtr)).FreadIsFlushed = 0
		(*TransformChannelData)(unsafe.Pointer(dataPtr)).FeofPending = 0
	}
	sReleaseData(tls, dataPtr)

	// If we have a wide seek capability, we should stick with that.

	if parentWideSeekProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, ClientData, Tcl_WideInt, int32, uintptr) Tcl_WideInt
		})(unsafe.Pointer(&struct{ uintptr }{parentWideSeekProc})).f(tls, parentData, offset, mode, errorCodePtr)
	}

	// We're transferring to narrow seeks at this point; this is a bit complex
	// because we have to check whether the seek is possible first (i.e.
	// whether we are losing information in truncating the bits of the
	// offset). Luckily, there's a defined error for what happens when trying
	// to go out of the representable range.

	if offset < Tcl_WideInt(-0x7fffffff-1) || offset > Tcl_WideInt(0x7fffffff) {
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EOVERFLOW
		return Tcl_WideInt(-1)
	}

	return Tcl_WideInt(int32((*struct {
		f func(*libc.TLS, ClientData, int32, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{parentSeekProc})).f(tls, parentData, int32(offset), mode, errorCodePtr)))
}

//----------------------------------------------------------------------
//
// TransformSetOptionProc --
//
//	Called by generic layer to handle the reconfiguration of channel
//	specific options. As this channel type does not have such, it simply
//	passes all requests downstream.
//
// Side effects:
//	As defined by the channel downstream.
//
// Result:
//	A standard TCL error code.
//
//----------------------------------------------------------------------

func sTransformSetOptionProc(tls *libc.TLS, instanceData ClientData, interp uintptr, optionName uintptr, value uintptr) int32 { /* tclIOGT.c:1006:1: */
	var dataPtr uintptr = instanceData
	var downChan Tcl_Channel = XTcl_GetStackedChannel(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself)
	var setOptionProc uintptr

	setOptionProc = XTcl_ChannelSetOptionProc(tls, XTcl_GetChannelType(tls, downChan))
	if setOptionProc == uintptr(0) {
		return TCL_ERROR
	}

	return (*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{setOptionProc})).f(tls, XTcl_GetChannelInstanceData(tls, downChan), interp,
		optionName, value)
}

//----------------------------------------------------------------------
//
// TransformGetOptionProc --
//
//	Called by generic layer to handle requests for the values of channel
//	specific options. As this channel type does not have such, it simply
//	passes all requests downstream.
//
// Side effects:
//	As defined by the channel downstream.
//
// Result:
//	A standard TCL error code.
//
//----------------------------------------------------------------------

func sTransformGetOptionProc(tls *libc.TLS, instanceData ClientData, interp uintptr, optionName uintptr, dsPtr uintptr) int32 { /* tclIOGT.c:1044:1: */
	var dataPtr uintptr = instanceData
	var downChan Tcl_Channel = XTcl_GetStackedChannel(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself)
	var getOptionProc uintptr

	getOptionProc = XTcl_ChannelGetOptionProc(tls, XTcl_GetChannelType(tls, downChan))
	if getOptionProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{getOptionProc})).f(tls, XTcl_GetChannelInstanceData(tls, downChan), interp,
			optionName, dsPtr)
	} else if optionName == uintptr(0) {
		// Request is query for all options, this is ok.

		return TCL_OK
	}

	// Request for a specific option has to fail, since we don't have any.

	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TransformWatchProc --
//
//	Initialize the notifier to watch for events from this channel.
//
// Side effects:
//	Sets up the notifier so that a future event on the channel will be
//	seen by Tcl.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

// ARGSUSED
func sTransformWatchProc(tls *libc.TLS, instanceData ClientData, mask int32) { /* tclIOGT.c:1092:1: */
	var dataPtr uintptr = instanceData
	var downChan Tcl_Channel

	// The caller expressed interest in events occuring for this channel. We
	// are forwarding the call to the underlying channel now.

	(*TransformChannelData)(unsafe.Pointer(dataPtr)).FwatchMask = mask

	// No channel handlers any more. We will be notified automatically about
	// events on the channel below via a call to our 'TransformNotifyProc'.
	// But we have to pass the interest down now. We are allowed to add
	// additional 'interest' to the mask if we want to. But this
	// transformation has no such interest. It just passes the request down,
	// unchanged.

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself == uintptr(0) {
		return
	}
	downChan = XTcl_GetStackedChannel(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself)

	(*struct {
		f func(*libc.TLS, ClientData, int32)
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ChannelType)(unsafe.Pointer(XTcl_GetChannelType(tls, downChan))).FwatchProc})).f(tls,
		XTcl_GetChannelInstanceData(tls, downChan), mask)

	// Management of the internal timer.

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer != uintptr(0) && (!(mask&(int32(1)<<1) != 0) || sResultEmpty(tls, dataPtr+64) != 0) {
		// A pending timer exists, but either is there no (more) interest in
		// the events it generates or nothing is available for reading, so
		// remove it.

		XTcl_DeleteTimerHandler(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer)
		(*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer = uintptr(0)
	}

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer == uintptr(0) && mask&(int32(1)<<1) != 0 &&
		!(sResultEmpty(tls, dataPtr+64) != 0) {
		// There is no pending timer, but there is interest in readable events
		// and we actually have data waiting, so generate a timer to flush
		// that.

		(*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer = XTcl_CreateTimerHandler(tls, FLUSH_DELAY,
			*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sTransformChannelHandlerTimer})), dataPtr)
	}
}

//----------------------------------------------------------------------
//
// TransformGetFileHandleProc --
//
//	Called from Tcl_GetChannelHandle to retrieve OS specific file handle
//	from inside this channel.
//
// Side effects:
//	None.
//
// Result:
//	The appropriate Tcl_File or NULL if not present.
//
//----------------------------------------------------------------------

func sTransformGetFileHandleProc(tls *libc.TLS, instanceData ClientData, direction int32, handlePtr uintptr) int32 { /* tclIOGT.c:1170:1: */
	var dataPtr uintptr = instanceData

	// Return the handle belonging to parent channel. IOW, pass the request
	// down and the result up.

	return XTcl_GetChannelHandle(tls, XTcl_GetStackedChannel(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself),
		direction, handlePtr)
}

//----------------------------------------------------------------------
//
// TransformNotifyProc --
//
//	Handler called by Tcl to inform us of activity on the underlying
//	channel.
//
// Side effects:
//	May process the incoming event by itself.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sTransformNotifyProc(tls *libc.TLS, clientData ClientData, mask int32) int32 { /* tclIOGT.c:1204:1: */
	var dataPtr uintptr = clientData

	// An event occured in the underlying channel. This transformation doesn't
	// process such events thus returns the incoming mask unchanged.

	if (*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer != uintptr(0) {
		// Delete an existing timer. It was not fired, yet we are here, so the
		// channel below generated such an event and we don't have to. The
		// renewal of the interest after the execution of channel handlers
		// will eventually cause us to recreate the timer (in
		// TransformWatchProc).

		XTcl_DeleteTimerHandler(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer)
		(*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer = uintptr(0)
	}
	return mask
}

//----------------------------------------------------------------------
//
// TransformChannelHandlerTimer --
//
//	Called by the notifier (-> timer) to flush out information waiting in
//	the input buffer.
//
// Side effects:
//	As of 'Tcl_NotifyChannel'.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sTransformChannelHandlerTimer(tls *libc.TLS, clientData ClientData) { /* tclIOGT.c:1249:1: */
	var dataPtr uintptr = clientData

	(*TransformChannelData)(unsafe.Pointer(dataPtr)).Ftimer = uintptr(0)
	if !((*TransformChannelData)(unsafe.Pointer(dataPtr)).FwatchMask&(int32(1)<<1) != 0) || sResultEmpty(tls, dataPtr+64) != 0 {
		// The timer fired, but either is there no (more) interest in the
		// events it generates or nothing is available for reading, so ignore
		// it and don't recreate it.

		return
	}
	XTcl_NotifyChannel(tls, (*TransformChannelData)(unsafe.Pointer(dataPtr)).Fself, int32(1)<<1)
}

//----------------------------------------------------------------------
//
// ResultClear --
//
//	Deallocates any memory allocated by 'ResultAdd'.
//
// Side effects:
//	See above.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sResultClear(tls *libc.TLS, r uintptr) { /* tclIOGT.c:1284:1: */
	(*ResultBuffer)(unsafe.Pointer(r)).Fused = uint64(0)

	if (*ResultBuffer)(unsafe.Pointer(r)).Fallocated != 0 {
		XTclpFree(tls, (*ResultBuffer)(unsafe.Pointer(r)).Fbuf)
		(*ResultBuffer)(unsafe.Pointer(r)).Fbuf = uintptr(0)
		(*ResultBuffer)(unsafe.Pointer(r)).Fallocated = uint64(0)
	}
}

//----------------------------------------------------------------------
//
// ResultInit --
//
//	Initializes the specified buffer structure. The structure will contain
//	valid information for an emtpy buffer.
//
// Side effects:
//	See above.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sResultInit(tls *libc.TLS, r uintptr) { /* tclIOGT.c:1314:1: */
	(*ResultBuffer)(unsafe.Pointer(r)).Fused = uint64(0)
	(*ResultBuffer)(unsafe.Pointer(r)).Fallocated = uint64(0)
	(*ResultBuffer)(unsafe.Pointer(r)).Fbuf = uintptr(0)
}

//----------------------------------------------------------------------
//
// ResultEmpty --
//
//	Returns whether the number of bytes stored in the buffer is zero.
//
// Side effects:
//	None.
//
// Result:
//	A boolean.
//
//----------------------------------------------------------------------

func sResultEmpty(tls *libc.TLS, r uintptr) int32 { /* tclIOGT.c:1340:1: */
	return libc.Bool32((*ResultBuffer)(unsafe.Pointer(r)).Fused == uint64(0))
}

//----------------------------------------------------------------------
//
// ResultCopy --
//
//	Copies the requested number of bytes from the buffer into the
//	specified array and removes them from the buffer afterward. Copies
//	less if there is not enough data in the buffer.
//
// Side effects:
//	See above.
//
// Result:
//	The number of actually copied bytes, possibly less than 'toRead'.
//
//----------------------------------------------------------------------

func sResultCopy(tls *libc.TLS, r uintptr, buf uintptr, toRead Size_t) int32 { /* tclIOGT.c:1365:1: */
	if (*ResultBuffer)(unsafe.Pointer(r)).Fused == uint64(0) {
		// Nothing to copy in the case of an empty buffer.

		return 0
	} else if (*ResultBuffer)(unsafe.Pointer(r)).Fused == toRead {
		// We have just enough. Copy everything to the caller.

		libc.Xmemcpy(tls, buf, (*ResultBuffer)(unsafe.Pointer(r)).Fbuf, toRead)
		(*ResultBuffer)(unsafe.Pointer(r)).Fused = uint64(0)
	} else if (*ResultBuffer)(unsafe.Pointer(r)).Fused > toRead {
		// The internal buffer contains more than requested. Copy the
		// requested subset to the caller, and shift the remaining bytes down.

		libc.Xmemcpy(tls, buf, (*ResultBuffer)(unsafe.Pointer(r)).Fbuf, toRead)
		libc.Xmemmove(tls, (*ResultBuffer)(unsafe.Pointer(r)).Fbuf, (*ResultBuffer)(unsafe.Pointer(r)).Fbuf+uintptr(toRead), (*ResultBuffer)(unsafe.Pointer(r)).Fused-toRead)
		*(*Size_t)(unsafe.Pointer(r + 16)) -= toRead
	} else {
		// There is not enough in the buffer to satisfy the caller, so take
		// everything.

		libc.Xmemcpy(tls, buf, (*ResultBuffer)(unsafe.Pointer(r)).Fbuf, (*ResultBuffer)(unsafe.Pointer(r)).Fused)
		toRead = (*ResultBuffer)(unsafe.Pointer(r)).Fused
		(*ResultBuffer)(unsafe.Pointer(r)).Fused = uint64(0)
	}
	return int32(toRead)
}

//----------------------------------------------------------------------
//
// ResultAdd --
//
//	Adds the bytes in the specified array to the buffer, by appending it.
//
// Side effects:
//	See above.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sResultAdd(tls *libc.TLS, r uintptr, buf uintptr, toWrite Size_t) { /* tclIOGT.c:1422:1: */
	if (*ResultBuffer)(unsafe.Pointer(r)).Fused+toWrite > (*ResultBuffer)(unsafe.Pointer(r)).Fallocated {
		// Extension of the internal buffer is required.

		if (*ResultBuffer)(unsafe.Pointer(r)).Fallocated == uint64(0) {
			(*ResultBuffer)(unsafe.Pointer(r)).Fallocated = toWrite + uint64(INCREMENT)
			(*ResultBuffer)(unsafe.Pointer(r)).Fbuf = XTcl_Alloc(tls, uint32((*ResultBuffer)(unsafe.Pointer(r)).Fallocated))
		} else {
			*(*Size_t)(unsafe.Pointer(r + 8)) += toWrite + uint64(INCREMENT)
			(*ResultBuffer)(unsafe.Pointer(r)).Fbuf = XTcl_Realloc(tls, (*ResultBuffer)(unsafe.Pointer(r)).Fbuf, uint32((*ResultBuffer)(unsafe.Pointer(r)).Fallocated))
		}
	}

	// Now we may copy the data.

	libc.Xmemcpy(tls, (*ResultBuffer)(unsafe.Pointer(r)).Fbuf+uintptr((*ResultBuffer)(unsafe.Pointer(r)).Fused), buf, toWrite)
	*(*Size_t)(unsafe.Pointer(r + 16)) += toWrite
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The C layer channel type/driver definition used by the reflection.

var tclRChannelType = Tcl_ChannelType{
	FtypeName:      ts + 36463,
	Fversion:       uintptr(0x5),
	FcloseProc:     0, // Close channel, clean instance data
	FinputProc:     0, // Handle read request
	FoutputProc:    0, // Handle write request
	FseekProc:      0, // Move location of access point.	NULL'able
	FsetOptionProc: 0, // Set options.			NULL'able
	FgetOptionProc: 0, // Get options.			NULL'able
	FwatchProc:     0, // Get OS handle from the channel.	NULL'able
	Fclose2Proc:    0, // No close2 support.		NULL'able
	FblockModeProc: 0, // Handle events.			NULL'able
	FwideSeekProc:  0, // truncate
} /* tclIORChan.c:64:30 */

// Instance data for a reflected channel. ===========================

type ReflectedChannel = struct {
	Fchan        Tcl_Channel
	Finterp      uintptr
	Fcmd         uintptr
	Fmethods     uintptr
	Fname        uintptr
	Fmode        int32
	Finterest    int32
	Fdead        int32
	F__ccgo_pad1 [4]byte
} /* tclIORChan.c:131:3 */

// Structure of the table maping from channel handles to reflected
// channels. Each interpreter which has the handler command for one or more
// reflected channels records them in such a table, so that 'chan postevent'
// is able to find them even if the actual channel was moved to a different
// interpreter and/or thread.
//
// The table is reachable via the standard interpreter AssocData, the key is
// defined below.

type ReflectedChannelMap = struct{ Fmap Tcl_HashTable } /* tclIORChan.c:146:3 */

// Event literals. ==================================================

var eventOptions = [3]uintptr{
	ts + 6057, ts + 33651, uintptr(0),
}                         /* tclIORChan.c:154:19 */
type EventOption = uint32 /* tclIORChan.c:159:3 */

// Method literals. ==================================================

var methodNames = [11]uintptr{
	ts + 36475,
	ts + 36484,
	ts + 36489,
	ts + 26712,
	ts + 36497,
	ts + 36506,
	ts + 6057,
	ts + 6062,
	ts + 36517,
	ts + 33651,
	uintptr(0),
}                        /* tclIORChan.c:165:19 */
type MethodName = uint32 /* tclIORChan.c:189:3 */

// Global constant strings (messages). ==================
// These string are used directly as bypass errors, thus they have to be valid
// Tcl lists where the last element is the message itself. Hence the
// list-quoting to keep the words of the message together. See also [x].

var msg_read_toomuch uintptr = ts + 36523     /* "{read delivered ..." */ /* tclIORChan.c:451:19 */
var msg_write_toomuch uintptr = ts + 36560    /* "{write wrote mor..." */ /* tclIORChan.c:452:19 */
var msg_write_nothing uintptr = ts + 36594    /* "{write wrote not..." */ /* tclIORChan.c:453:19 */
var msg_seek_beforestart uintptr = ts + 36616 /* "{Tried to seek b..." */ /* tclIORChan.c:454:19 */
var msg_send_dstlost uintptr = ts + 36646     /* "{Owner lost}" */        /* tclIORChan.c:458:19 */
var msg_dstlost uintptr = ts + 36659          /* "-code 1 -level 0..." */ /* tclIORChan.c:459:19 */

// Main methods to plug into the 'chan' ensemble'. ==================

//----------------------------------------------------------------------
//
// TclChanCreateObjCmd --
//
//	This function is invoked to process the "chan create" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result. The handle of the new channel is placed in the
//	interp result.
//
// Side effects:
//	Creates a new channel.
//
//----------------------------------------------------------------------

func XTclChanCreateObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIORChan.c:484:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	var rcPtr uintptr // Instance data of the new channel
	var rcId uintptr  // Handle of the new channel
	// var mode int32 at bp+56, 4
	// R/W mode of new channel. Has to match
	// abilities of handler commands
	var cmdObj uintptr // Command prefix, list of words
	// var cmdNameObj uintptr at bp+64, 8
	// Command name
	var chan1 Tcl_Channel // Token for the new channel
	var modeObj uintptr   // mode in obj form for method call
	// var listc int32 at bp+80, 4
	// Result of 'initialize', and of
	// var listv uintptr at bp+88, 8
	// its sublist in the 2nd element
	// var methIndex int32 at bp+96, 4
	// Encoded method name
	var result int32 // Result code for 'initialize'
	// var resObj uintptr at bp+72, 8
	// Result data for 'initialize'
	var methods int32   // Bitmask for supported methods.
	var chanPtr uintptr // 'chan' resolved to internal struct.
	var err uintptr     // Error message
	var rcmPtr uintptr
	// Map of reflected channels with handlers in
	// this interp.
	var hPtr uintptr // Entry in the above map
	// var isNew int32 at bp+100, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	// Some of the nullable methods are not supported. We clone the
	// channel type, null the associated C functions, and use the result
	// as the actual channel type.

	var clonePtr uintptr
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	var _objPtr7 uintptr // Placeholder.
	_ = dummy

	// Syntax:   chan create MODE CMDPREFIX
	//           [0]  [1]    [2]  [3]
	//
	// Actually: rCreate MODE CMDPREFIX
	//           [0]     [1]  [2]

	// Number of arguments...

	if !(objc != 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+36732)
	return TCL_ERROR
__1:
	;

	// First argument is a list of modes. Allowed entries are "read", "write".
	// Expect at least one list element. Abbreviations are ok.

	modeObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if !(sEncodeEventMask(tls, interp, ts+13412, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+56) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	// Second argument is command prefix, i.e. list of words, first word is
	// name of handler command, other words are fixed arguments. Run the
	// 'initialize' method to get the list of supported methods. Validate
	// this.

	cmdObj = *(*uintptr)(unsafe.Pointer(objv + 2*8))

	// Basic check that the command prefix truly is a list.

	if !(XTcl_ListObjIndex(tls, interp, cmdObj, 0, bp+64) != TCL_OK) {
		goto __3
	}
	return TCL_ERROR
__3:
	;

	// Now create the channel.

	rcId = sNextHandle(tls)
	rcPtr = sNewReflectedChannel(tls, interp, cmdObj, *(*int32)(unsafe.Pointer(bp + 56 /* mode */)), rcId)

	// Invoke 'initialize' and validate that the handler is present and ok.
	// Squash the channel if not.
	//
	// Note: The conversion of 'mode' back into a Tcl_Obj ensures that
	// 'initialize' is invoked with canonical mode names, and no
	// abbreviations. Using modeObj directly could feed abbreviations into the
	// handler, and the handler is not specified to handle such.

	modeObj = sDecodeEventMask(tls, *(*int32)(unsafe.Pointer(bp + 56 /* mode */)))
	// assert modeObj.refCount == 1
	result = sInvokeTclMethod(tls, rcPtr, uint32(5) /* METH_INIT */, modeObj, uintptr(0), bp+72)
__4:
	_objPtr = modeObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __7
	}
	XTclFreeObj(tls, _objPtr)
__7:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;

	if !(result != TCL_OK) {
		goto __8
	}
	sUnmarshallErrorResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 72 /* resObj */)))
__9:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp + 72))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __12
	}
	XTclFreeObj(tls, _objPtr1)
__12:
	;
	goto __10
__10:
	if 0 != 0 {
		goto __9
	}
	goto __11
__11:
	; // Remove reference held from invoke
	goto error
__8:
	;

	// Verify the result.
	// - List, of method names. Convert to mask.
	//   Check for non-optionals through the mask.
	//   Compare open mode against optional r/w.

	if !(XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 72)), bp+80, bp+88) != TCL_OK) {
		goto __13
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+36747,
		libc.VaList(bp, XTcl_GetString(tls, cmdObj), XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* resObj */))))))
__14:
	_objPtr2 = *(*uintptr)(unsafe.Pointer(bp + 72))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __17
	}
	XTclFreeObj(tls, _objPtr2)
__17:
	;
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto error
__13:
	;

	methods = 0
__18:
	if !(*(*int32)(unsafe.Pointer(bp + 80)) > 0) {
		goto __19
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)) + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-1)*8)), uintptr(unsafe.Pointer(&methodNames)), int32(unsafe.Sizeof(uintptr(0))), ts+26521, TCL_EXACT, bp+96) != TCL_OK) {
		goto __20
	}
__21:
	;
__24:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __27
	}
	XTclAllocateFreeObjects(tls)
__27:
	;
	err = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	(*Tcl_Obj)(unsafe.Pointer(err)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1)) == 0) {
		goto __28
	}
	(*Tcl_Obj)(unsafe.Pointer(err)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(err)).Flength = 0
	goto __29
__28:
	(*Tcl_Obj)(unsafe.Pointer(err)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(err)).Fbytes, ts+36798, uint64(int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(err)).Fbytes + 14)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(err)).Flength = int32(uint64(unsafe.Sizeof([15]int8{})) - uint64(1))
__29:
	;
	(*Tcl_Obj)(unsafe.Pointer(err)).FtypePtr = uintptr(0)

	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
	XTcl_AppendObjToObj(tls, err, cmdObj)
	XTcl_AppendToObj(tls, err, ts+36813, -1)
	XTcl_AppendObjToObj(tls, err, XTcl_GetObjResult(tls, interp))
	XTcl_SetObjResult(tls, interp, err)
__30:
	_objPtr3 = *(*uintptr)(unsafe.Pointer(bp + 72))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __33
	}
	XTclFreeObj(tls, _objPtr3)
__33:
	;
	goto __31
__31:
	if 0 != 0 {
		goto __30
	}
	goto __32
__32:
	;
	goto error
__20:
	;

	methods = methods | int32(1)<<*(*int32)(unsafe.Pointer(bp + 96))
	*(*int32)(unsafe.Pointer(bp + 80 /* listc */))--
	goto __18
__19:
	;
__34:
	_objPtr4 = *(*uintptr)(unsafe.Pointer(bp + 72))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __37
	}
	XTclFreeObj(tls, _objPtr4)
__37:
	;
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;

	if !((int32(1)<<5|int32(1)<<4|int32(1)<<METH_WATCH)&methods != int32(1)<<5|int32(1)<<4|int32(1)<<METH_WATCH) {
		goto __38
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+36836,
		libc.VaList(bp+16, XTcl_GetString(tls, cmdObj))))
	goto error
__38:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 56))&(int32(1)<<1) != 0 && !(methods&(int32(1)<<METH_READ) != 0)) {
		goto __39
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+36892,
		libc.VaList(bp+24, XTcl_GetString(tls, cmdObj))))
	goto error
__39:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 56))&(int32(1)<<2) != 0 && !(methods&(int32(1)<<9) != 0)) {
		goto __40
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+36932,
		libc.VaList(bp+32, XTcl_GetString(tls, cmdObj))))
	goto error
__40:
	;

	if !!(!(methods&(int32(1)<<METH_CGET) != 0) || methods&(int32(1)<<METH_CGETALL) != 0) {
		goto __41
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+36973,
		libc.VaList(bp+40, XTcl_GetString(tls, cmdObj))))
	goto error
__41:
	;

	if !!(!(methods&(int32(1)<<METH_CGETALL) != 0) || methods&(int32(1)<<METH_CGET) != 0) {
		goto __42
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+37025,
		libc.VaList(bp+48, XTcl_GetString(tls, cmdObj))))
	goto error
__42:
	;

	XTcl_ResetResult(tls, interp)

	// Everything is fine now.

	chan1 = XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&tclRChannelType)), func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(rcId)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(rcId)).Fbytes
		}
		return XTcl_GetString(tls, rcId)
	}(), rcPtr,
		*(*int32)(unsafe.Pointer(bp + 56 /* mode */)))
	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan = chan1
	XTclChannelPreserve(tls, chan1)
	chanPtr = chan1

	if !(methods&(int32(1)<<METH_BLOCKING|int32(1)<<METH_SEEK|int32(1)<<METH_CONFIGURE|int32(1)<<METH_CGET|int32(1)<<METH_CGETALL) != int32(1)<<METH_BLOCKING|int32(1)<<METH_SEEK|int32(1)<<METH_CONFIGURE|int32(1)<<METH_CGET|int32(1)<<METH_CGETALL) {
		goto __43
	}
	// Some of the nullable methods are not supported. We clone the
	// channel type, null the associated C functions, and use the result
	// as the actual channel type.

	clonePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_ChannelType{})))

	libc.Xmemcpy(tls, clonePtr, uintptr(unsafe.Pointer(&tclRChannelType)), uint64(unsafe.Sizeof(Tcl_ChannelType{})))

	if !!(methods&(int32(1)<<METH_CONFIGURE) != 0) {
		goto __44
	}
	(*Tcl_ChannelType)(unsafe.Pointer(clonePtr)).FsetOptionProc = uintptr(0)
__44:
	;

	if !(!(methods&(int32(1)<<METH_CGET) != 0) && !(methods&(int32(1)<<METH_CGETALL) != 0)) {
		goto __45
	}
	(*Tcl_ChannelType)(unsafe.Pointer(clonePtr)).FgetOptionProc = uintptr(0)
__45:
	;
	if !!(methods&(int32(1)<<METH_BLOCKING) != 0) {
		goto __46
	}
	(*Tcl_ChannelType)(unsafe.Pointer(clonePtr)).FblockModeProc = uintptr(0)
__46:
	;
	if !!(methods&(int32(1)<<METH_SEEK) != 0) {
		goto __47
	}
	(*Tcl_ChannelType)(unsafe.Pointer(clonePtr)).FseekProc = uintptr(0)
	(*Tcl_ChannelType)(unsafe.Pointer(clonePtr)).FwideSeekProc = uintptr(0)
__47:
	;

	(*Channel)(unsafe.Pointer(chanPtr)).FtypePtr = clonePtr
__43:
	;

	// Register the channel in the I/O system, and in our our map for 'chan
	// postevent'.

	XTcl_RegisterChannel(tls, interp, chan1)

	rcmPtr = sGetReflectedChannelMap(tls, interp)
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(rcmPtr /* &.map */)).FcreateProc})).f(tls, rcmPtr /* &.map */, (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).FchannelName, bp+100 /* &isNew */)
	if !(!(*(*int32)(unsafe.Pointer(bp + 100)) != 0) && chanPtr != (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData) {
		goto __48
	}
	XTcl_Panic(tls, ts+37077, 0)
__48:
	;
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = chan1

	// Return handle as result of command.

	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(chanPtr)).Fstate)).FchannelName, -1))
	return TCL_OK

error:
__49:
	_objPtr5 = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fname
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __52
	}
	XTclFreeObj(tls, _objPtr5)
__52:
	;
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
__53:
	_objPtr6 = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __56
	}
	XTclFreeObj(tls, _objPtr6)
__56:
	;
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
__57:
	_objPtr7 = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fcmd
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __60
	}
	XTclFreeObj(tls, _objPtr7)
__60:
	;
	goto __58
__58:
	if 0 != 0 {
		goto __57
	}
	goto __59
__59:
	;
	XTclpFree(tls, rcPtr)
	return TCL_ERROR

}

//----------------------------------------------------------------------
//
// TclChanPostEventObjCmd --
//
//	This function is invoked to process the "chan postevent" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Posts events to a reflected channel, invokes event handlers. The
//	latter implies that arbitrary side effects are possible.
//
//----------------------------------------------------------------------

func XTclChanPostEventObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIORChan.c:803:1: */
	bp := tls.Alloc(60)
	defer tls.Free(60)

	// Ensure -> HANDLER thread
	//
	// Syntax:   chan postevent CHANNEL EVENTSPEC
	//           [0]  [1]       [2]     [3]
	//
	// Actually: rPostevent CHANNEL EVENTSPEC
	//           [0]        [1]     [2]
	//
	// where EVENTSPEC = {read write ...} (Abbreviations allowed as well).

	var chanId uintptr    // Tcl level channel handle
	var chan1 Tcl_Channel // Channel associated to the handle
	var chanTypePtr uintptr
	// Its associated driver structure
	var rcPtr uintptr // Associated instance data
	// var events int32 at bp+56, 4
	// Mask of events to post
	var rcmPtr uintptr // Map of reflected channels with handlers in
	// this interp.
	var hPtr uintptr // Entry in the above map
	_ = dummy

	// Number of arguments...

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37122)
		return TCL_ERROR
	}

	// First argument is a channel, a reflected channel, and the call of this
	// command is done from the interp defining the channel handler cmd.

	chanId = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()

	rcmPtr = sGetReflectedChannelMap(tls, interp)
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(rcmPtr /* &.map */)).FfindProc})).f(tls, rcmPtr /* &.map */, chanId)

	if hPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+37140, libc.VaList(bp, chanId)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+32774, chanId, uintptr(0)))
		return TCL_ERROR
	}

	// Note that the search above subsumes several of the older checks,
	// namely:
	//
	// (1) Does the channel handle refer to a reflected channel?
	// (2) Is the post event issued from the interpreter holding the handler
	//     of the reflected channel?
	//
	// A successful search answers yes to both. Because the map holds only
	// handles of reflected channels, and only of such whose handler is
	// defined in this interpreter.
	//
	// We keep the old checks for both, for paranioa, but abort now instead of
	// throwing errors, as failure now means that our internal datastructures
	// have gone seriously haywire.

	chan1 = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	chanTypePtr = XTcl_GetChannelType(tls, chan1)

	// We use a function referenced by the channel type as our cookie to
	// detect calls to non-reflecting channels. The channel type itself is not
	// suitable, as it might not be the static definition in this file, but a
	// clone thereof. And while we have reserved the name of the type nothing
	// in the core checks against violation, so someone else might have
	// created a channel type using our name, clashing with ourselves.

	if (*Tcl_ChannelType)(unsafe.Pointer(chanTypePtr)).FwatchProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sReflectWatch})) {
		XTcl_Panic(tls, ts+37182, 0)
	}

	rcPtr = XTcl_GetChannelInstanceData(tls, chan1)

	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp != interp {
		XTcl_Panic(tls, ts+37241, 0)
	}

	// Second argument is a list of events. Allowed entries are "read",
	// "write". Expect at least one list element. Abbreviations are ok.

	if sEncodeEventMask(tls, interp, ts+36245, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+56) != TCL_OK {
		return TCL_ERROR
	}

	// Check that the channel is actually interested in the provided events.

	if *(*int32)(unsafe.Pointer(bp + 56)) & ^(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterest != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+37318,
			libc.VaList(bp+48, chanId)))
		return TCL_ERROR
	}

	// We have the channel and the events to post.

	XTcl_NotifyChannel(tls, chan1, *(*int32)(unsafe.Pointer(bp + 56 /* events */)))

	// Squash interp results left by the event script.

	XTcl_ResetResult(tls, interp)
	return TCL_OK

}

// Channel error message marshalling utilities.

func sMarshallError(tls *libc.TLS, interp uintptr) uintptr { /* tclIORChan.c:979:16: */
	// Capture the result status of the interpreter into a string. => List of
	// options and values, followed by the error message. The result has
	// refCount 0.

	var returnOpt uintptr = XTcl_GetReturnOptions(tls, interp, TCL_ERROR)

	// => returnOpt.refCount == 0. We can append directly.

	XTcl_ListObjAppendElement(tls, uintptr(0), returnOpt, XTcl_GetObjResult(tls, interp))
	return returnOpt
}

func sUnmarshallErrorResult(tls *libc.TLS, interp uintptr, msgObj uintptr) { /* tclIORChan.c:1000:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var lc int32 at bp, 4

	// var lv uintptr at bp+8, 8

	var explicitResult int32
	var numOptions int32

	// Process the caught message.
	//
	// Syntax = (option value)... ?message?
	//
	// Bad syntax causes a panic. This is OK because the other side uses
	// Tcl_GetReturnOptions and list construction functions to marshall the
	// information; if we panic here, something has gone badly wrong already.

	if XTcl_ListObjGetElements(tls, interp, msgObj, bp, bp+8) != TCL_OK {
		XTcl_Panic(tls, ts+37373, 0)
	}
	if interp == uintptr(0) {
		return
	}

	explicitResult = *(*int32)(unsafe.Pointer(bp)) & 1 // Odd number of values?
	numOptions = *(*int32)(unsafe.Pointer(bp)) - explicitResult

	if explicitResult != 0 {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* lv */)) + uintptr(*(*int32)(unsafe.Pointer(bp))-1)*8)))
	}

	XTcl_SetReturnOptions(tls, interp, XTcl_NewListObj(tls, numOptions, *(*uintptr)(unsafe.Pointer(bp + 8 /* lv */))))
	*(*int32)(unsafe.Pointer(interp + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED)
}

func XTclChanCaughtErrorBypass(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel) int32 { /* tclIORChan.c:1038:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	*(*uintptr)(unsafe.Pointer(bp /* chanMsgObj */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 8 /* interpMsgObj */)) = uintptr(0)
	var msgObj uintptr = uintptr(0)

	// Get a bypassed error message from channel and/or interpreter, save the
	// reference, then kill the returned objects, if there were any. If there
	// are messages in both the channel has preference.

	if chan1 == uintptr(0) && interp == uintptr(0) {
		return 0
	}

	if chan1 != uintptr(0) {
		XTcl_GetChannelError(tls, chan1, bp)
	}
	if interp != uintptr(0) {
		XTcl_GetChannelErrorInterp(tls, interp, bp+8)
	}

	if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
		msgObj = *(*uintptr)(unsafe.Pointer(bp /* chanMsgObj */))
	} else if *(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0) {
		msgObj = *(*uintptr)(unsafe.Pointer(bp + 8 /* interpMsgObj */))
	}
	if msgObj != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer(msgObj)).FrefCount++
	}

	if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if *(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0) {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	// No message returned, nothing caught.

	if msgObj == uintptr(0) {
		return 0
	}

	sUnmarshallErrorResult(tls, interp, msgObj)

	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = msgObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return 1
}

// Driver functions. ================================================

//----------------------------------------------------------------------
//
// ReflectClose/ReflectClose2 --
//
//	This function is invoked when the channel is closed, to delete the
//	driver specific instance data.
//
// Results:
//	A posix error.
//
// Side effects:
//	Releases memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectClose(tls *libc.TLS, clientData ClientData, interp uintptr) int32 { /* tclIORChan.c:1115:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var rcPtr uintptr = clientData
	var result int32 // Result code for 'close'
	// var resObj uintptr at bp, 8
	// Result data for 'close'
	var rcmPtr uintptr // Map of reflected channels with handlers in
	// this interp
	var hPtr uintptr // Entry in the above map
	var tctPtr uintptr

	if XTclInThreadExit(tls) != 0 {
		// This call comes from TclFinalizeIOSystem. There are no
		// interpreters, and therefore we cannot call upon the handler command
		// anymore. Threading is irrelevant as well. We simply clean up all
		// our C level data structures and leave the Tcl level to the other
		// finalization functions.

		// THREADED => Forward this to the origin thread
		//
		// Note: DeleteThreadReflectedChannelMap() is the thread exit handler
		// for the origin thread. Use this to clean up the structure? Except
		// if lost?

		tctPtr = (*Channel)(unsafe.Pointer((*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan)).FtypePtr
		if tctPtr != 0 && tctPtr != uintptr(unsafe.Pointer(&tclRChannelType)) {
			XTclpFree(tls, tctPtr)
			(*Channel)(unsafe.Pointer((*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan)).FtypePtr = uintptr(0)
		}
		XTcl_EventuallyFree(tls, rcPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sFreeReflectedChannel})))
		return EOK
	}

	// Are we in the correct thread?

	result = sInvokeTclMethod(tls, rcPtr, uint32(4) /* METH_FINAL */, uintptr(0), uintptr(0), bp)
	if result != TCL_OK && interp != uintptr(0) {
		XTcl_SetChannelErrorInterp(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
	}

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	} // Remove reference we held from the
	// invoke

	// Remove the channel from the map before releasing the memory, to
	// prevent future accesses (like by 'postevent') from finding and
	// dereferencing a dangling pointer.
	//
	// NOTE: The channel may not be in the map. This is ok, that happens
	// when the channel was created in a different interpreter and/or
	// thread and then was moved here.
	//
	// NOTE: The channel may have been removed from the map already via
	// the per-interp DeleteReflectedChannelMap exit-handler.

	if !((*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fdead != 0) {
		rcmPtr = sGetReflectedChannelMap(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp)
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(rcmPtr /* &.map */)).FfindProc})).f(tls, rcmPtr /* &.map */, XTcl_GetChannelName(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan))
		if hPtr != 0 {
			XTcl_DeleteHashEntry(tls, hPtr)
		}
	}
	tctPtr = (*Channel)(unsafe.Pointer((*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan)).FtypePtr
	if tctPtr != 0 && tctPtr != uintptr(unsafe.Pointer(&tclRChannelType)) {
		XTclpFree(tls, tctPtr)
		(*Channel)(unsafe.Pointer((*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan)).FtypePtr = uintptr(0)
	}
	XTcl_EventuallyFree(tls, rcPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sFreeReflectedChannel})))
	if result == TCL_OK {
		return EOK
	}
	return EINVAL
}

func sReflectClose2(tls *libc.TLS, clientData ClientData, interp uintptr, flags int32) int32 { /* tclIORChan.c:1242:1: */
	if flags&(int32(1)<<1|int32(1)<<2) == 0 {
		return sReflectClose(tls, clientData, interp)
	}
	return EINVAL
}

//----------------------------------------------------------------------
//
// ReflectInput --
//
//	This function is invoked when more data is requested from the channel.
//
// Results:
//	The number of bytes read.
//
// Side effects:
//	Allocates memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectInput(tls *libc.TLS, clientData ClientData, buf uintptr, toRead int32, errorCodePtr uintptr) int32 { /* tclIORChan.c:1270:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var rcPtr uintptr
	var toReadObj uintptr
	// var bytec int32 at bp+8, 4
	// Number of returned bytes
	var bytev uintptr // Array of returned bytes
	// var resObj uintptr at bp, 8

	var code int32
	var _objPtr uintptr
	var _objPtr1 uintptr
	rcPtr = clientData // Result data for 'read'

	// Are we in the correct thread?

	// ASSERT: rcPtr->method & FLAG(METH_READ)
	// ASSERT: rcPtr->mode & TCL_READABLE

	XTcl_Preserve(tls, rcPtr)

__1:
	;
__4:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __7
	}
	XTclAllocateFreeObjects(tls)
__7:
	;
	toReadObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	(*Tcl_Obj)(unsafe.Pointer(toReadObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(toReadObj)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(toReadObj + 32)) = int32(toRead)
	(*Tcl_Obj)(unsafe.Pointer(toReadObj)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __2
__2:
	if 0 != 0 {
		goto __1
	}
	goto __3
__3:
	;
	(*Tcl_Obj)(unsafe.Pointer(toReadObj)).FrefCount++

	if !(sInvokeTclMethod(tls, rcPtr, METH_READ, toReadObj, uintptr(0), bp) != TCL_OK) {
		goto __8
	}
	code = sErrnoReturn(tls, rcPtr, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))

	if !(code < 0) {
		goto __9
	}
	*(*int32)(unsafe.Pointer(errorCodePtr)) = -code
	goto error
__9:
	;

	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
	goto invalid
__8:
	;

	bytev = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp /* resObj */)), bp+8)

	if !(toRead < *(*int32)(unsafe.Pointer(bp + 8))) {
		goto __10
	}
	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, XTcl_NewStringObj(tls, msg_read_toomuch, -1))
	goto invalid
__10:
	;

	*(*int32)(unsafe.Pointer(errorCodePtr)) = EOK

	if !(*(*int32)(unsafe.Pointer(bp + 8)) > 0) {
		goto __11
	}
	libc.Xmemcpy(tls, buf, bytev, uint64(*(*int32)(unsafe.Pointer(bp + 8 /* bytec */))))
__11:
	;

stop:
__12:
	_objPtr = toReadObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __15
	}
	XTclFreeObj(tls, _objPtr)
__15:
	;
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	;
__16:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __19
	}
	XTclFreeObj(tls, _objPtr1)
__19:
	;
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	; // Remove reference held from invoke
	XTcl_Release(tls, rcPtr)
	return *(*int32)(unsafe.Pointer(bp + 8 /* bytec */))
invalid:
	*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
error:
	*(*int32)(unsafe.Pointer(bp + 8 /* bytec */)) = -1
	goto stop
	return int32(0)
}

//----------------------------------------------------------------------
//
// ReflectOutput --
//
//	This function is invoked when data is writen to the channel.
//
// Results:
//	The number of bytes actually written.
//
// Side effects:
//	Allocates memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectOutput(tls *libc.TLS, clientData ClientData, buf uintptr, toWrite int32, errorCodePtr uintptr) int32 { /* tclIORChan.c:1377:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var rcPtr uintptr
	var bufObj uintptr
	// var resObj uintptr at bp, 8
	// Result data for 'write'
	// var written int32 at bp+8, 4

	var code int32
	var _objPtr uintptr
	var _objPtr1 uintptr
	rcPtr = clientData

	// Are we in the correct thread?

	// ASSERT: rcPtr->method & FLAG(METH_WRITE)
	// ASSERT: rcPtr->mode & TCL_WRITABLE

	XTcl_Preserve(tls, rcPtr)
	XTcl_Preserve(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp)

	bufObj = XTcl_NewByteArrayObj(tls, buf, toWrite)
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount++

	if !(sInvokeTclMethod(tls, rcPtr, uint32(9), bufObj, uintptr(0), bp) != TCL_OK) {
		goto __1
	}
	code = sErrnoReturn(tls, rcPtr, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))

	if !(code < 0) {
		goto __2
	}
	*(*int32)(unsafe.Pointer(errorCodePtr)) = -code
	goto error
__2:
	;

	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
	goto invalid
__1:
	;

	if !(XTcl_InterpDeleted(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp) != 0) {
		goto __3
	}
	// The interp was destroyed during InvokeTclMethod().

	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, XTcl_NewStringObj(tls, msg_send_dstlost, -1))
	goto invalid
__3:
	;
	if !(XTcl_GetIntFromObj(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, *(*uintptr)(unsafe.Pointer(bp)), bp+8) != TCL_OK) {
		goto __4
	}
	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, sMarshallError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp))
	goto invalid
__4:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 8)) == 0 && toWrite > 0) {
		goto __5
	}
	// The handler claims to have written nothing of what it was given.
	// That is bad.

	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, XTcl_NewStringObj(tls, msg_write_nothing, -1))
	goto invalid
__5:
	;
	if !(toWrite < *(*int32)(unsafe.Pointer(bp + 8))) {
		goto __6
	}
	// The handler claims to have written more than it was given. That is
	// bad. Note that the I/O core would crash if we were to return this
	// information, trying to write -nnn bytes in the next iteration.

	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, XTcl_NewStringObj(tls, msg_write_toomuch, -1))
	goto invalid
__6:
	;

	*(*int32)(unsafe.Pointer(errorCodePtr)) = EOK
stop:
__7:
	_objPtr = bufObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __10
	}
	XTclFreeObj(tls, _objPtr)
__10:
	;
	goto __8
__8:
	if 0 != 0 {
		goto __7
	}
	goto __9
__9:
	;
__11:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __14
	}
	XTclFreeObj(tls, _objPtr1)
__14:
	;
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	; // Remove reference held from invoke
	XTcl_Release(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp)
	XTcl_Release(tls, rcPtr)
	return *(*int32)(unsafe.Pointer(bp + 8 /* written */))
invalid:
	*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
error:
	*(*int32)(unsafe.Pointer(bp + 8 /* written */)) = -1
	goto stop
	return int32(0)
}

//----------------------------------------------------------------------
//
// ReflectSeekWide / ReflectSeek --
//
//	This function is invoked when the user wishes to seek on the channel.
//
// Results:
//	The new location of the access point.
//
// Side effects:
//	Allocates memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectSeekWide(tls *libc.TLS, clientData ClientData, offset Tcl_WideInt, seekMode int32, errorCodePtr uintptr) Tcl_WideInt { /* tclIORChan.c:1506:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var rcPtr uintptr
	var offObj uintptr
	var baseObj uintptr
	// var resObj uintptr at bp, 8
	// Result for 'seek'
	// var newLoc Tcl_WideInt at bp+8, 8

	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	rcPtr = clientData

	// Are we in the correct thread?

	// ASSERT: rcPtr->method & FLAG(METH_SEEK)

	XTcl_Preserve(tls, rcPtr)

	offObj = XTcl_NewWideIntObj(tls, offset)
	baseObj = XTcl_NewStringObj(tls,
		func() uintptr {
			if seekMode == SEEK_SET {
				return ts + 35330 /* "start" */
			}
			return func() uintptr {
				if seekMode == SEEK_CUR {
					return ts + 35336 /* "current" */
				}
				return ts + 19372 /* "end" */
			}()
		}(), -1)
	(*Tcl_Obj)(unsafe.Pointer(offObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(baseObj)).FrefCount++

	if !(sInvokeTclMethod(tls, rcPtr, METH_SEEK, offObj, baseObj, bp) != TCL_OK) {
		goto __1
	}
	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
	goto invalid
__1:
	;

	if !(XTcl_GetWideIntFromObj(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, *(*uintptr)(unsafe.Pointer(bp)), bp+8) != TCL_OK) {
		goto __2
	}
	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, sMarshallError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp))
	goto invalid
__2:
	;

	if !(*(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) < int64(0)) {
		goto __3
	}
	XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, XTcl_NewStringObj(tls, msg_seek_beforestart, -1))
	goto invalid
__3:
	;

	*(*int32)(unsafe.Pointer(errorCodePtr)) = EOK
stop:
__4:
	_objPtr = offObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __7
	}
	XTclFreeObj(tls, _objPtr)
__7:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
__8:
	_objPtr1 = baseObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __11
	}
	XTclFreeObj(tls, _objPtr1)
__11:
	;
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
__12:
	_objPtr2 = *(*uintptr)(unsafe.Pointer(bp))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __15
	}
	XTclFreeObj(tls, _objPtr2)
__15:
	;
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	; // Remove reference held from invoke
	XTcl_Release(tls, rcPtr)
	return *(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* newLoc */))
invalid:
	*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* newLoc */)) = int64(-1)
	goto stop
	return Tcl_WideInt(0)
}

func sReflectSeek(tls *libc.TLS, clientData ClientData, offset int32, seekMode int32, errorCodePtr uintptr) int32 { /* tclIORChan.c:1582:1: */
	// This function can be invoked from a transformation which is based on
	// standard seeking, i.e. non-wide. Because of this we have to implement
	// it, a dummy is not enough. We simply delegate the call to the wide
	// routine.

	return int32(sReflectSeekWide(tls, clientData, Tcl_WideInt(offset), seekMode,
		errorCodePtr))
}

//----------------------------------------------------------------------
//
// ReflectWatch --
//
//	This function is invoked to tell the channel what events the I/O
//	system is interested in.
//
// Results:
//	None.
//
// Side effects:
//	Allocates memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectWatch(tls *libc.TLS, clientData ClientData, mask int32) { /* tclIORChan.c:1617:1: */
	var rcPtr uintptr = clientData
	var maskObj uintptr

	// We restrict the interest to what the channel can support. IOW there
	// will never be write events for a channel which is not writable.
	// Analoguously for read events and non-readable channels.

	mask = mask & (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmode

	if mask == (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterest {
		// Same old, same old, why should we do something?

		return
	}

	// Are we in the correct thread?

	XTcl_Preserve(tls, rcPtr)

	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterest = mask
	maskObj = sDecodeEventMask(tls, mask)
	// assert maskObj.refCount == 1
	sInvokeTclMethod(tls, rcPtr, METH_WATCH, maskObj, uintptr(0), uintptr(0))
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = maskObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	XTcl_Release(tls, rcPtr)
}

//----------------------------------------------------------------------
//
// ReflectBlock --
//
//	This function is invoked to tell the channel which blocking behaviour
//	is required of it.
//
// Results:
//	A posix error number.
//
// Side effects:
//	Allocates memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectBlock(tls *libc.TLS, clientData ClientData, nonblocking int32) int32 { /* tclIORChan.c:1689:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var rcPtr uintptr = clientData
	var blockObj uintptr
	var errorNum int32 // EINVAL or EOK (success).
	// var resObj uintptr at bp, 8
	// Result data for 'blocking'

	// Are we in the correct thread?

	blockObj = XTcl_NewIntObj(tls, libc.Bool32(libc.BoolInt32(!(nonblocking != 0)) != 0))
	(*Tcl_Obj)(unsafe.Pointer(blockObj)).FrefCount++

	XTcl_Preserve(tls, rcPtr)

	if sInvokeTclMethod(tls, rcPtr, METH_BLOCKING, blockObj, uintptr(0), bp) != TCL_OK {
		XTcl_SetChannelError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
		errorNum = EINVAL
	} else {
		errorNum = EOK
	}

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = blockObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	} // Remove reference held from invoke

	XTcl_Release(tls, rcPtr)
	return errorNum
}

//----------------------------------------------------------------------
//
// ReflectSetOption --
//
//	This function is invoked to configure a channel option.
//
// Results:
//	A standard Tcl result code.
//
// Side effects:
//	Arbitrary, as it calls upon a Tcl script.
//
//----------------------------------------------------------------------

func sReflectSetOption(tls *libc.TLS, clientData ClientData, interp uintptr, optionName uintptr, newValue uintptr) int32 { /* tclIORChan.c:1793:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var rcPtr uintptr = clientData
	var optionObj uintptr
	var valueObj uintptr
	var result int32 // Result code for 'configure'
	// var resObj uintptr at bp, 8
	// Result data for 'configure'

	// Are we in the correct thread?

	XTcl_Preserve(tls, rcPtr)

	optionObj = XTcl_NewStringObj(tls, optionName, -1)
	valueObj = XTcl_NewStringObj(tls, newValue, -1)

	(*Tcl_Obj)(unsafe.Pointer(optionObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(valueObj)).FrefCount++

	result = sInvokeTclMethod(tls, rcPtr, METH_CONFIGURE, optionObj, valueObj, bp)
	if result != TCL_OK {
		sUnmarshallErrorResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
	}

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = optionObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = valueObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	} // Remove reference held from invoke
	XTcl_Release(tls, rcPtr)
	return result
}

//----------------------------------------------------------------------
//
// ReflectGetOption --
//
//	This function is invoked to retrieve all or a channel option.
//
// Results:
//	A standard Tcl result code.
//
// Side effects:
//	Arbitrary, as it calls upon a Tcl script.
//
//----------------------------------------------------------------------

func sReflectGetOption(tls *libc.TLS, clientData ClientData, interp uintptr, optionName uintptr, dsPtr uintptr) int32 { /* tclIORChan.c:1865:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	// This code is special. It has regular passing of Tcl result, and errors.
	// The bypass functions are not required.

	var rcPtr uintptr
	var optionObj uintptr
	// var resObj uintptr at bp+16, 8
	// Result data for 'configure'
	// var listc int32 at bp+24, 4

	var result int32
	// var listv uintptr at bp+32, 8

	var method MethodName
	// var len int32 at bp+40, 4

	var str uintptr
	var _objPtr uintptr
	var _objPtr1 uintptr
	rcPtr = clientData
	result = TCL_OK

	// Are we in the correct thread?

	if !(optionName == uintptr(0)) {
		goto __1
	}
	// Retrieve all options.

	method = METH_CGETALL
	optionObj = uintptr(0)
	goto __2
__1:
	// Retrieve the value of one option.

	method = METH_CGET
	optionObj = XTcl_NewStringObj(tls, optionName, -1)
	(*Tcl_Obj)(unsafe.Pointer(optionObj)).FrefCount++
__2:
	;

	XTcl_Preserve(tls, rcPtr)

	if !(sInvokeTclMethod(tls, rcPtr, method, optionObj, uintptr(0), bp+16) != TCL_OK) {
		goto __3
	}
	sUnmarshallErrorResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 16 /* resObj */)))
	goto error
__3:
	;

	// The result has to go into the 'dsPtr' for propagation to the caller of
	// the driver.

	if !(optionObj != uintptr(0)) {
		goto __4
	}
	XTclDStringAppendObj(tls, dsPtr, *(*uintptr)(unsafe.Pointer(bp + 16 /* resObj */)))
	goto ok
__4:
	;

	// Extract the list and append each item as element.

	// NOTE (4): If we extract the string rep we can assume a properly quoted
	// string. Together with a separating space this way of simply appending
	// the whole string rep might be faster. It also doesn't check if the
	// result is a valid list. Nor that the list has an even number elements.

	if !(XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+24, bp+32) != TCL_OK) {
		goto __5
	}
	goto error
__5:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 24))%2 == 1) {
		goto __6
	}
	// Odd number of elements is wrong.

	XTcl_ResetResult(tls, interp)
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+37427, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 24 /* listc */)),
			func() uintptr {
				if *(*int32)(unsafe.Pointer(bp + 24)) == 1 {
					return ts + 2631 /* "" */
				}
				return ts + 23388 /* "s" */
			}())))
	goto error
	goto __7
__6:
	str = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* resObj */)), bp+40)

	if !(*(*int32)(unsafe.Pointer(bp + 40)) != 0) {
		goto __8
	}
	XTcl_DStringAppend(tls, dsPtr, ts+14901, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
	XTcl_DStringAppend(tls, dsPtr, str, *(*int32)(unsafe.Pointer(bp + 40 /* len */)))
__8:
	;
	goto ok
__7:
	;

ok:
	result = TCL_OK
stop:
	if !(optionObj != 0) {
		goto __9
	}
__10:
	_objPtr = optionObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __13
	}
	XTclFreeObj(tls, _objPtr)
__13:
	;
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
__9:
	;
__14:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp + 16))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __17
	}
	XTclFreeObj(tls, _objPtr1)
__17:
	;
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	; // Remove reference held from invoke
	XTcl_Release(tls, rcPtr)
	return result
error:
	result = TCL_ERROR
	goto stop
	return int32(0)
}

// Helpers. =========================================================

//----------------------------------------------------------------------
//
// EncodeEventMask --
//
//	This function takes a list of event items and constructs the
//	equivalent internal bitmask. The list must contain at least one
//	element. Elements are "read", "write", or any unique abbreviation of
//	them. Note that the bitmask is not changed if problems are
//	encountered.
//
// Results:
//	A standard Tcl error code. A bitmask where TCL_READABLE and/or
//	TCL_WRITABLE can be set.
//
// Side effects:
//	May shimmer 'obj' to a list representation. May place an error message
//	into the interp result.
//
//----------------------------------------------------------------------

func sEncodeEventMask(tls *libc.TLS, interp uintptr, objName uintptr, obj uintptr, mask uintptr) int32 { /* tclIORChan.c:2027:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var events int32 // Mask of events to post
	// var listc int32 at bp+8, 4
	// #elements in eventspec list
	// var listv uintptr at bp+16, 8
	// Elements of eventspec list
	// var evIndex int32 at bp+24, 4
	// Id of event for an element of the eventspec
	// list.

	if XTcl_ListObjGetElements(tls, interp, obj, bp+8, bp+16) != TCL_OK {
		return TCL_ERROR
	}

	if *(*int32)(unsafe.Pointer(bp + 8)) < 1 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+37496, libc.VaList(bp, objName)))
		return TCL_ERROR
	}

	events = 0
	for *(*int32)(unsafe.Pointer(bp + 8)) > 0 {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(*(*int32)(unsafe.Pointer(bp + 8))-1)*8)), uintptr(unsafe.Pointer(&eventOptions)), int32(unsafe.Sizeof(uintptr(0))), objName, 0, bp+24) != TCL_OK {
			return TCL_ERROR
		}
		switch *(*int32)(unsafe.Pointer(bp + 24 /* evIndex */)) {
		case EVENT_READ:
			events = events | int32(1)<<1
			break
		case EVENT_WRITE:
			events = events | int32(1)<<2
			break
		}
		*(*int32)(unsafe.Pointer(bp + 8 /* listc */))--
	}

	*(*int32)(unsafe.Pointer(mask)) = events
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DecodeEventMask --
//
//	This function takes an internal bitmask of events and constructs the
//	equivalent list of event items.
//
// Results, Contract:
//	A Tcl_Obj reference. The object will have a refCount of one. The user
//	has to decrement it to release the object.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sDecodeEventMask(tls *libc.TLS, mask int32) uintptr { /* tclIORChan.c:2088:16: */
	var eventStr uintptr
	var evObj uintptr

	switch mask & (int32(1)<<1 | int32(1)<<2) {
	case int32(1)<<1 | int32(1)<<2:
		eventStr = ts + 37518 /* "read write" */
		break
	case int32(1) << 1:
		eventStr = ts + 6057 /* "read" */
		break
	case int32(1) << 2:
		eventStr = ts + 33651 /* "write" */
		break
	default:
		eventStr = ts + 2631 /* "" */
		break
	}

	evObj = XTcl_NewStringObj(tls, eventStr, -1)
	(*Tcl_Obj)(unsafe.Pointer(evObj)).FrefCount++
	// assert evObj.refCount == 1
	return evObj
}

//----------------------------------------------------------------------
//
// NewReflectedChannel --
//
//	This function is invoked to allocate and initialize the instance data
//	of a new reflected channel.
//
// Results:
//	A heap-allocated channel instance.
//
// Side effects:
//	Allocates memory.
//
//----------------------------------------------------------------------

func sNewReflectedChannel(tls *libc.TLS, interp uintptr, cmdpfxObj uintptr, mode int32, handleObj uintptr) uintptr { /* tclIORChan.c:2133:25: */
	var rcPtr uintptr
	var mn MethodName = METH_BLOCKING

	rcPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ReflectedChannel{})))

	// rcPtr->chan: Assigned by caller. Dummy data here.

	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan = uintptr(0)
	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp = interp
	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fdead = 0
	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmode = mode
	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterest = 0 // Initially no interest registered

	// ASSERT: cmdpfxObj is a Tcl List
	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fcmd = XTclListObjCopy(tls, uintptr(0), cmdpfxObj)
	(*Tcl_Obj)(unsafe.Pointer((*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fcmd)).FrefCount++
	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods = XTcl_NewListObj(tls, 9+1, uintptr(0))
	for mn <= MethodName(9) {
		XTcl_ListObjAppendElement(tls, uintptr(0), (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods,
			XTcl_NewStringObj(tls, methodNames[libc.PostIncUint32(&mn, 1)], -1))
	}
	(*Tcl_Obj)(unsafe.Pointer((*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods)).FrefCount++
	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fname = handleObj
	(*Tcl_Obj)(unsafe.Pointer((*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fname)).FrefCount++
	return rcPtr
}

//----------------------------------------------------------------------
//
// NextHandle --
//
//	This function is invoked to generate a channel handle for a new
//	reflected channel.
//
// Results:
//	A Tcl_Obj containing the string of the new channel handle. The
//	refcount of the returned object is -- zero --.
//
// Side effects:
//	May allocate memory. Mutex protected critical section locks out other
//	threads for a short time.
//
//----------------------------------------------------------------------

func sNextHandle(tls *libc.TLS) uintptr { /* tclIORChan.c:2189:16: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var resObj uintptr

	resObj = XTcl_ObjPrintf(tls, ts+37529, libc.VaList(bp, rcCounter))
	rcCounter++

	return resObj
}

var rcCounter uint32 = uint32(0) /* tclIORChan.c:2201:26 */

func sFreeReflectedChannel(tls *libc.TLS, rcPtr uintptr) { /* tclIORChan.c:2213:1: */
	var chanPtr uintptr = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fchan

	XTclChannelRelease(tls, chanPtr)
	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fname != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fname
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fcmd != 0 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fcmd
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTclpFree(tls, rcPtr)
}

//----------------------------------------------------------------------
//
// InvokeTclMethod --
//
//	This function is used to invoke the Tcl level of a reflected channel.
//	It handles all the command assembly, invokation, and generic state and
//	result mgmt. It does *not* handle thread redirection; that is the
//	responsibility of clients of this function.
//
// Results:
//	Result code and data as returned by the method.
//
// Side effects:
//	Arbitrary, as it calls upon a Tcl script.
//
// Contract:
//	argOneObj.refCount >= 1 on entry and exit, if argOneObj != NULL
//	argTwoObj.refCount >= 1 on entry and exit, if argTwoObj != NULL
//	resObj.refCount in {0, 1, ...}
//
//----------------------------------------------------------------------

func sInvokeTclMethod(tls *libc.TLS, rcPtr uintptr, method MethodName, argOneObj uintptr, argTwoObj uintptr, resultObjPtr uintptr) int32 { /* tclIORChan.c:2256:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	*(*uintptr)(unsafe.Pointer(bp + 16 /* methObj */)) = uintptr(0) // Method name in object form
	var sr Tcl_InterpState                                          // State of handler interp
	var result int32                                                // Result code of method invokation
	var resObj uintptr = uintptr(0)                                 // Result of method invokation.
	var cmd uintptr

	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fdead != 0 {
		// The channel is marked as dead. Bail out immediately, with an
		// appropriate error.

		if resultObjPtr != uintptr(0) {
			resObj = XTcl_NewStringObj(tls, msg_dstlost, -1)
			*(*uintptr)(unsafe.Pointer(resultObjPtr)) = resObj
			(*Tcl_Obj)(unsafe.Pointer(resObj)).FrefCount++
		}

		// Not touching argOneObj, argTwoObj, they have not been used.
		// See the contract as well.

		return TCL_ERROR
	}

	// Insert method into the callback command, after the command prefix,
	// before the channel id.

	cmd = XTclListObjCopy(tls, uintptr(0), (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fcmd)

	XTcl_ListObjIndex(tls, uintptr(0), (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods, int32(method), bp+16)
	XTcl_ListObjAppendElement(tls, uintptr(0), cmd, *(*uintptr)(unsafe.Pointer(bp + 16 /* methObj */)))
	XTcl_ListObjAppendElement(tls, uintptr(0), cmd, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fname)

	// Append the additional argument containing method specific details
	// behind the channel id. If specified.
	//
	// Because of the contract there is no need to increment the refcounts.
	// The objects will survive the Tcl_EvalObjv without change.

	if argOneObj != 0 {
		XTcl_ListObjAppendElement(tls, uintptr(0), cmd, argOneObj)
		if argTwoObj != 0 {
			XTcl_ListObjAppendElement(tls, uintptr(0), cmd, argTwoObj)
		}
	}

	// And run the handler... This is done in auch a manner which leaves any
	// existing state intact.

	(*Tcl_Obj)(unsafe.Pointer(cmd)).FrefCount++
	sr = XTcl_SaveInterpState(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, 0)
	XTcl_Preserve(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp)
	result = XTcl_EvalObjEx(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, cmd, TCL_EVAL_GLOBAL)

	// We do not try to extract the result information if the caller has no
	// interest in it. I.e. there is no need to put effort into creating
	// something which is discarded immediately after.

	if resultObjPtr != 0 {
		if result == TCL_OK {
			// Ok result taken as is, also if the caller requests that there
			// is no capture.

			resObj = XTcl_GetObjResult(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp)
		} else {
			// Non-ok result is always treated as an error. We have to capture
			// the full state of the result, including additional options.
			//
			// This is complex and ugly, and would be completely unnecessary
			// if we only added support for a TCL_FORBID_EXCEPTIONS flag.

			if result != TCL_ERROR {
				// var cmdLen int32 at bp+24, 4

				var cmdString uintptr = XTcl_GetStringFromObj(tls, cmd, bp+24)

				(*Tcl_Obj)(unsafe.Pointer(cmd)).FrefCount++
				XTcl_ResetResult(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp)
				XTcl_SetObjResult(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, XTcl_ObjPrintf(tls,
					ts+37535, libc.VaList(bp, result)))
				XTcl_LogCommandInfo(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, cmdString, cmdString,
					*(*int32)(unsafe.Pointer(bp + 24 /* cmdLen */)))
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = cmd
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				result = TCL_ERROR
			}
			XTcl_AppendObjToErrorInfo(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, XTcl_ObjPrintf(tls,
				ts+37570,
				libc.VaList(bp+8, methodNames[method])))
			resObj = sMarshallError(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp)
		}
		(*Tcl_Obj)(unsafe.Pointer(resObj)).FrefCount++
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = cmd
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTcl_RestoreInterpState(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, sr)
	XTcl_Release(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp)

	// The resObj has a ref count of 1 at this location. This means that the
	// caller of InvokeTclMethod has to dispose of it (but only if it was
	// returned to it).

	if resultObjPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(resultObjPtr)) = resObj
	}

	// There no need to handle the case where nothing is returned, because for
	// that case resObj was not set anyway.

	return result
}

//----------------------------------------------------------------------
//
// ErrnoReturn --
//
//	Checks a method error result if it returned an 'errno'.
//
// Results:
//	The negative errno found in the error result, or 0.
//
// Side effects:
//	None.
//
// Users:
//	ReflectInput/Output(), to enable the signaling of EAGAIN on 0-sized
//	short reads/writes.
//
//----------------------------------------------------------------------

func sErrnoReturn(tls *libc.TLS, rcPtr uintptr, resObj uintptr) int32 { /* tclIORChan.c:2411:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var code int32 at bp, 4

	var sr Tcl_InterpState // State of handler interp

	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fdead != 0 {
		return 0
	}

	sr = XTcl_SaveInterpState(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, 0)
	sUnmarshallErrorResult(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, resObj)

	resObj = XTcl_GetObjResult(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp)

	if XTcl_GetIntFromObj(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, resObj, bp) != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp)) >= 0 {
		if libc.Xstrcmp(tls, ts+37606, XTcl_GetString(tls, resObj)) == 0 {
			*(*int32)(unsafe.Pointer(bp /* code */)) = -EAGAIN
		} else {
			*(*int32)(unsafe.Pointer(bp /* code */)) = 0
		}
	}

	XTcl_RestoreInterpState(tls, (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Finterp, sr)
	return *(*int32)(unsafe.Pointer(bp /* code */))
}

//----------------------------------------------------------------------
//
// GetReflectedChannelMap --
//
//	Gets and potentially initializes the reflected channel map for an
//	interpreter.
//
// Results:
//	A pointer to the map created, for use by the caller.
//
// Side effects:
//	Initializes the reflected channel map for an interpreter.
//
//----------------------------------------------------------------------

func sGetReflectedChannelMap(tls *libc.TLS, interp uintptr) uintptr { /* tclIORChan.c:2457:28: */
	var rcmPtr uintptr = XTcl_GetAssocData(tls, interp, ts+37613, uintptr(0))

	if rcmPtr == uintptr(0) {
		rcmPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ReflectedChannelMap{})))
		XTcl_InitHashTable(tls, rcmPtr, 0)
		XTcl_SetAssocData(tls, interp, ts+37613,
			*(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr)
			}{sDeleteReflectedChannelMap})), rcmPtr)
	}
	return rcmPtr
}

//----------------------------------------------------------------------
//
// DeleteReflectedChannelMap --
//
//	Deletes the channel table for an interpreter, closing any open
//	channels whose refcount reaches zero. This procedure is invoked when
//	an interpreter is deleted, via the AssocData cleanup mechanism.
//
// Results:
//	None.
//
// Side effects:
//	Deletes the hash table of channels. May close channels. May flush
//	output on closed channels. Removes any channeEvent handlers that were
//	registered in this interpreter.
//
//----------------------------------------------------------------------

func sMarkDead(tls *libc.TLS, rcPtr uintptr) { /* tclIORChan.c:2493:1: */
	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fdead != 0 {
		return
	}
	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fname != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fname
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fname = uintptr(0)
	}
	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fmethods = uintptr(0)
	}
	if (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fcmd != 0 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = (*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fcmd
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fcmd = uintptr(0)
	}
	(*ReflectedChannel)(unsafe.Pointer(rcPtr)).Fdead = 1
}

func sDeleteReflectedChannelMap(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclIORChan.c:2515:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var rcmPtr uintptr = clientData
	// The map
	// var hSearch Tcl_HashSearch at bp, 24
	// Search variable.
	var hPtr uintptr // Search variable.
	var rcPtr uintptr
	var chan1 Tcl_Channel

	// Delete all entries. The channels may have been closed already, or will
	// be closed later, by the standard IO finalization of an interpreter
	// under destruction. Except for the channels which were moved to a
	// different interpreter and/or thread. They do not exist from the IO
	// systems point of view and will not get closed. Therefore mark all as
	// dead so that any future access will cause a proper error. For channels
	// in a different thread we actually do the same as
	// DeleteThreadReflectedChannelMap(), just restricted to the channels of
	// this interp.

	for hPtr = XTcl_FirstHashEntry(tls, rcmPtr, bp); hPtr != uintptr(0); hPtr = XTcl_FirstHashEntry(tls, rcmPtr, bp) {
		chan1 = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		rcPtr = XTcl_GetChannelInstanceData(tls, chan1)

		sMarkDead(tls, rcPtr)
		XTcl_DeleteHashEntry(tls, hPtr)
	}
	XTcl_DeleteHashTable(tls, rcmPtr)
	XTclpFree(tls, rcmPtr)

}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// indent-tabs-mode: nil
// End:

// The C layer channel type/driver definition used by the reflection.

var tclRTransformType = Tcl_ChannelType{
	FtypeName:      ts + 37633,
	Fversion:       uintptr(0x5),
	FcloseProc:     0, // Close channel, clean instance data.
	FinputProc:     0, // Handle read request.
	FoutputProc:    0, // Handle write request.
	FseekProc:      0, // Move location of access point.
	FsetOptionProc: 0, // Set options.
	FgetOptionProc: 0, // Get options.
	FwatchProc:     0, // Initialize notifier.
	FgetHandleProc: 0, // Get OS handle from the channel.
	Fclose2Proc:    0, // No close2 support. NULL'able.
	FblockModeProc: 0, // Flush channel. Not used by core.
	// NULL'able.
	FhandlerProc:  0, // Handle events.
	FwideSeekProc: 0, // truncate
} /* tclIORTrans.c:62:30 */

// Structure of the buffer to hold transform results to be consumed by higher
// layers upon reading from the channel, plus the functions to manage such.

type X_ResultBuffer_ = struct {
	Fbuf       uintptr
	Fallocated int32
	Fused      int32
} /* tclIORTrans.c:88:9 */

// Structure of the buffer to hold transform results to be consumed by higher
// layers upon reading from the channel, plus the functions to manage such.

type ResultBuffer1 = X_ResultBuffer_ /* tclIORTrans.c:93:3 */

// Convenience macro to make some casts easier to use.

// Instance data for a reflected transformation. ===========================

type ReflectedTransform = struct {
	Fchan          Tcl_Channel
	Fparent        Tcl_Channel
	Finterp        uintptr
	Fhandle        uintptr
	Ftimer         Tcl_TimerToken
	Fargc          int32
	F__ccgo_pad1   [4]byte
	Fargv          uintptr
	Fmethods       int32
	Fmode          int32
	Fnonblocking   int32
	FreadIsDrained int32
	FeofPending    int32
	Fdead          int32
	Fresult        ResultBuffer1
} /* tclIORTrans.c:166:3 */

// Structure of the table mapping from transform handles to reflected
// transform (channels). Each interpreter which has the handler command for
// one or more reflected transforms records them in such a table, so that we
// are able to find them during interpreter/thread cleanup even if the actual
// channel they belong to was moved to a different interpreter and/or thread.
//
// The table is reachable via the standard interpreter AssocData, the key is
// defined below.

type ReflectedTransformMap = struct{ Fmap Tcl_HashTable } /* tclIORTrans.c:181:3 */

// Method literals. ==================================================

var methodNames1 = [9]uintptr{
	ts + 37647,
	ts + 37653,
	ts + 36497,
	ts + 6023,
	ts + 36506,
	ts + 37659,
	ts + 6057,
	ts + 33651,
	uintptr(0),
} /* tclIORTrans.c:189:19 */

// Global constant strings (messages). ==================
// These string are used directly as bypass errors, thus they have to be valid
// Tcl lists where the last element is the message itself. Hence the
// list-quoting to keep the words of the message together. See also [x].

var msg_read_unsup uintptr = ts + 37666  /* "{read not suppor..." */ /* tclIORTrans.c:437:19 */
var msg_write_unsup uintptr = ts + 37701 /* "{write not suppo..." */ /* tclIORTrans.c:438:19 */
var msg_dstlost1 uintptr = ts + 36659    /* "-code 1 -level 0..." */ /* tclIORTrans.c:443:19 */

// Operation codes for TransformFlush().

// Main methods to plug into the 'chan' ensemble'. ==================

//----------------------------------------------------------------------
//
// TclChanPushObjCmd --
//
//	This function is invoked to process the "chan push" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result. The handle of the new channel is placed in the
//	interp result.
//
// Side effects:
//	Creates a new channel.
//
//----------------------------------------------------------------------

func XTclChanPushObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIORTrans.c:501:1: */
	bp := tls.Alloc(112)
	defer tls.Free(112)

	var rtPtr uintptr // Instance data of the new (transform)
	// channel.
	var chanObj uintptr        // Handle of parent channel
	var parentChan Tcl_Channel // Token of parent channel
	// var mode int32 at bp+64, 4
	// R/W mode of parent, later the new channel.
	// Has to match the abilities of the handler
	// commands
	var cmdObj uintptr // Command prefix, list of words
	// var cmdNameObj uintptr at bp+72, 8
	// Command name
	var rtId uintptr    // Handle of the new transform (channel)
	var modeObj uintptr // mode in obj form for method call
	// var listc int32 at bp+88, 4
	// Result of 'initialize', and of
	// var listv uintptr at bp+96, 8
	// its sublist in the 2nd element
	// var methIndex int32 at bp+104, 4
	// Encoded method name
	var result int32 // Result code for 'initialize'
	// var resObj uintptr at bp+80, 8
	// Result data for 'initialize'
	var methods int32 // Bitmask for supported methods.
	var rtmPtr uintptr
	// Map of reflected transforms with handlers
	// in this interp.
	var hPtr uintptr // Entry in the above map
	// var isNew int32 at bp+108, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var _objPtr4 uintptr // Placeholder.
	_ = dummy

	// Syntax:   chan push CHANNEL CMDPREFIX
	//           [0]  [1]  [2]     [3]
	//
	// Actually: rPush CHANNEL CMDPREFIX
	//           [0]   [1]     [2]

	// Number of arguments...

	if !(objc != 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37737)
	return TCL_ERROR
__1:
	;

	// First argument is a channel handle.

	chanObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	parentChan = XTcl_GetChannel(tls, interp, XTcl_GetString(tls, chanObj), bp+64)
	if !(parentChan == uintptr(0)) {
		goto __2
	}
	return TCL_ERROR
__2:
	;
	parentChan = XTcl_GetTopChannel(tls, parentChan)

	// Second argument is command prefix, i.e. list of words, first word is
	// name of handler command, other words are fixed arguments. Run the
	// 'initialize' method to get the list of supported methods. Validate
	// this.

	cmdObj = *(*uintptr)(unsafe.Pointer(objv + 2*8))

	// Basic check that the command prefix truly is a list.

	if !(XTcl_ListObjIndex(tls, interp, cmdObj, 0, bp+72) != TCL_OK) {
		goto __3
	}
	return TCL_ERROR
__3:
	;

	// Now create the transformation (channel).

	rtId = sNextHandle1(tls)
	rtPtr = sNewReflectedTransform(tls, interp, cmdObj, *(*int32)(unsafe.Pointer(bp + 64 /* mode */)), rtId, parentChan)

	// Invoke 'initialize' and validate that the handler is present and ok.
	// Squash the transformation if not.

	modeObj = sDecodeEventMask1(tls, *(*int32)(unsafe.Pointer(bp + 64 /* mode */)))
	// assert modeObj.refCount == 1
	result = sInvokeTclMethod1(tls, rtPtr, ts+36506, modeObj, uintptr(0), bp+80)
__4:
	_objPtr = modeObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __7
	}
	XTclFreeObj(tls, _objPtr)
__7:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	if !(result != TCL_OK) {
		goto __8
	}
	sUnmarshallErrorResult1(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 80 /* resObj */)))
__9:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp + 80))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __12
	}
	XTclFreeObj(tls, _objPtr1)
__12:
	;
	goto __10
__10:
	if 0 != 0 {
		goto __9
	}
	goto __11
__11:
	; // Remove reference held from invoke
	goto error
__8:
	;

	// Verify the result.
	// - List, of method names. Convert to mask. Check for non-optionals
	//   through the mask. Compare open mode against optional r/w.

	if !(XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 80)), bp+88, bp+96) != TCL_OK) {
		goto __13
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+36747,
		libc.VaList(bp, XTcl_GetString(tls, cmdObj), XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* resObj */))))))
__14:
	_objPtr2 = *(*uintptr)(unsafe.Pointer(bp + 80))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __17
	}
	XTclFreeObj(tls, _objPtr2)
__17:
	;
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto error
__13:
	;

	methods = 0
__18:
	if !(*(*int32)(unsafe.Pointer(bp + 88)) > 0) {
		goto __19
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)) + uintptr(*(*int32)(unsafe.Pointer(bp + 88))-1)*8)), uintptr(unsafe.Pointer(&methodNames1)), int32(unsafe.Sizeof(uintptr(0))), ts+26521, TCL_EXACT, bp+104) != TCL_OK) {
		goto __20
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+37755,
		libc.VaList(bp+16, XTcl_GetString(tls, cmdObj),
			XTcl_GetString(tls, XTcl_GetObjResult(tls, interp)))))
__21:
	_objPtr3 = *(*uintptr)(unsafe.Pointer(bp + 80))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __24
	}
	XTclFreeObj(tls, _objPtr3)
__24:
	;
	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
	goto error
__20:
	;

	methods = methods | int32(1)<<*(*int32)(unsafe.Pointer(bp + 104))
	*(*int32)(unsafe.Pointer(bp + 88 /* listc */))--
	goto __18
__19:
	;
__25:
	_objPtr4 = *(*uintptr)(unsafe.Pointer(bp + 80))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __28
	}
	XTclFreeObj(tls, _objPtr4)
__28:
	;
	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;

	if !((int32(1)<<4|int32(1)<<2)&methods != int32(1)<<4|int32(1)<<2) {
		goto __29
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+36836,
		libc.VaList(bp+32, XTcl_GetString(tls, cmdObj))))
	goto error
__29:
	;

	// Mode tell us what the parent channel supports. The methods tell us what
	// the handler supports. We remove the non-supported bits from the mode
	// and check that the channel is not completely inacessible. Afterward the
	// mode tells us which methods are still required, and these methods will
	// also be supported by the handler, by design of the check.

	if !!(methods&(int32(1)<<METH_READ) != 0) {
		goto __30
	}
	*(*int32)(unsafe.Pointer(bp + 64 /* mode */)) &= libc.CplInt32(int32(1) << 1)
__30:
	;
	if !!(methods&(int32(1)<<7) != 0) {
		goto __31
	}
	*(*int32)(unsafe.Pointer(bp + 64 /* mode */)) &= libc.CplInt32(int32(1) << 2)
__31:
	;

	if !!(*(*int32)(unsafe.Pointer(bp + 64)) != 0) {
		goto __32
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+37796,
		libc.VaList(bp+40, XTcl_GetString(tls, cmdObj))))
	goto error
__32:
	;

	// The mode and support for it is ok, now check the internal constraints.

	if !!(!(methods&(int32(1)<<METH_DRAIN) != 0) || methods&(int32(1)<<METH_READ) != 0) {
		goto __33
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+37845,
		libc.VaList(bp+48, XTcl_GetString(tls, cmdObj))))
	goto error
__33:
	;

	if !!(!(methods&(int32(1)<<METH_FLUSH) != 0) || methods&(int32(1)<<7) != 0) {
		goto __34
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+37895,
		libc.VaList(bp+56, XTcl_GetString(tls, cmdObj))))
	goto error
__34:
	;

	XTcl_ResetResult(tls, interp)

	// Everything is fine now.

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods = methods
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmode = *(*int32)(unsafe.Pointer(bp + 64 /* mode */))
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan = XTcl_StackChannel(tls, interp, uintptr(unsafe.Pointer(&tclRTransformType)), rtPtr, *(*int32)(unsafe.Pointer(bp + 64 /* mode */)),
		(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent)

	// Register the transform in our our map for proper handling of deleted
	// interpreters and/or threads.

	rtmPtr = sGetReflectedTransformMap(tls, interp)
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(rtmPtr /* &.map */)).FcreateProc})).f(tls, rtmPtr /* &.map */, XTcl_GetString(tls, rtId), bp+108 /* &isNew */)
	if !(!(*(*int32)(unsafe.Pointer(bp + 108)) != 0) && rtPtr != (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData) {
		goto __35
	}
	XTcl_Panic(tls, ts+37946, 0)
__35:
	;
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = rtPtr

	// Return the channel as the result of the command.

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		XTcl_GetChannelName(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan), -1))
	return TCL_OK

error:
	// We are not going through ReflectClose as we never had a channel
	// structure.

	XTcl_EventuallyFree(tls, rtPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sFreeReflectedTransform})))
	return TCL_ERROR

}

//----------------------------------------------------------------------
//
// TclChanPopObjCmd --
//
//	This function is invoked to process the "chan pop" Tcl command. See
//	the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Posts events to a reflected channel, invokes event handlers. The
//	latter implies that arbitrary side effects are possible.
//
//----------------------------------------------------------------------

func XTclChanPopObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIORTrans.c:747:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// Syntax:   chan pop CHANNEL
	//           [0]  [1] [2]
	//
	// Actually: rPop CHANNEL
	//           [0]  [1]

	var chanId uintptr    // Tcl level channel handle
	var chan1 Tcl_Channel // Channel associated to the handle
	// var mode int32 at bp, 4
	// Channel r/w mode
	_ = dummy

	// Number of arguments...

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32516)
		return TCL_ERROR
	}

	// First argument is a channel, which may have a (reflected)
	// transformation.

	chanId = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	chan1 = XTcl_GetChannel(tls, interp, chanId, bp)

	if chan1 == uintptr(0) {
		return TCL_ERROR
	}

	// Removing transformations is generic, and not restricted to reflected
	// transformations.

	XTcl_UnstackChannel(tls, interp, chan1)
	return TCL_OK

}

// Channel error message marshalling utilities.

func sMarshallError1(tls *libc.TLS, interp uintptr) uintptr { /* tclIORTrans.c:804:16: */
	// Capture the result status of the interpreter into a string. => List of
	// options and values, followed by the error message. The result has
	// refCount 0.

	var returnOpt uintptr = XTcl_GetReturnOptions(tls, interp, TCL_ERROR)

	// => returnOpt.refCount == 0. We can append directly.

	XTcl_ListObjAppendElement(tls, uintptr(0), returnOpt, XTcl_GetObjResult(tls, interp))
	return returnOpt
}

func sUnmarshallErrorResult1(tls *libc.TLS, interp uintptr, msgObj uintptr) { /* tclIORTrans.c:825:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var lc int32 at bp, 4

	// var lv uintptr at bp+8, 8

	var explicitResult int32
	var numOptions int32

	// Process the caught message.
	//
	// Syntax = (option value)... ?message?
	//
	// Bad syntax causes a panic. This is OK because the other side uses
	// Tcl_GetReturnOptions and list construction functions to marshall the
	// information; if we panic here, something has gone badly wrong already.

	if XTcl_ListObjGetElements(tls, interp, msgObj, bp, bp+8) != TCL_OK {
		XTcl_Panic(tls, ts+37373, 0)
	}
	if interp == uintptr(0) {
		return
	}

	explicitResult = *(*int32)(unsafe.Pointer(bp)) & 1 // Odd number of values?
	numOptions = *(*int32)(unsafe.Pointer(bp)) - explicitResult

	if explicitResult != 0 {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* lv */)) + uintptr(*(*int32)(unsafe.Pointer(bp))-1)*8)))
	}

	XTcl_SetReturnOptions(tls, interp, XTcl_NewListObj(tls, numOptions, *(*uintptr)(unsafe.Pointer(bp + 8 /* lv */))))
	*(*int32)(unsafe.Pointer(interp + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED)
}

// Driver functions. ================================================

//----------------------------------------------------------------------
//
// ReflectClose --
//
//	This function is invoked when the channel is closed, to delete the
//	driver specific instance data.
//
// Results:
//	A posix error.
//
// Side effects:
//	Releases memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectClose1(tls *libc.TLS, clientData ClientData, interp uintptr) int32 { /* tclIORTrans.c:884:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var rtPtr uintptr
	// var errorCode int32 at bp, 4

	var errorCodeSet int32
	var result int32 // Result code for 'close'
	// var resObj uintptr at bp+8, 8
	// Result data for 'close'
	var rtmPtr uintptr
	// Map of reflected transforms with handlers
	// in this interp.
	var hPtr uintptr
	var _objPtr uintptr
	rtPtr = clientData
	errorCodeSet = 0
	result = TCL_OK // Entry in the above map

	if !(XTclInThreadExit(tls) != 0) {
		goto __1
	}
	// This call comes from TclFinalizeIOSystem. There are no
	// interpreters, and therefore we cannot call upon the handler command
	// anymore. Threading is irrelevant as well. We simply clean up all
	// our C level data structures and leave the Tcl level to the other
	// finalization functions.

	// THREADED => Forward this to the origin thread
	//
	// Note: DeleteThreadReflectedTransformMap() is the thread exit handler
	// for the origin thread. Use this to clean up the structure? Except
	// if lost?

	XTcl_EventuallyFree(tls, rtPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sFreeReflectedTransform})))
	return EOK
__1:
	;

	// In the reflected channel implementation a cleaned method mask here
	// implies that the channel creation was aborted, and "finalize" must not
	// be called. for transformations however we are not going through here on
	// such an abort, but directly through FreeReflectedTransform. So for us
	// that check is not necessary. We always go through 'finalize'.

	if !((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_DRAIN) != 0 && !((*ReflectedTransform)(unsafe.Pointer(rtPtr)).FreadIsDrained != 0)) {
		goto __2
	}
	if !!(sTransformDrain(tls, rtPtr, bp) != 0) {
		goto __3
	}
	errorCodeSet = 1
	goto cleanup
__3:
	;
__2:
	;

	if !((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_FLUSH) != 0) {
		goto __4
	}
	if !!(sTransformFlush(tls, rtPtr, bp, FLUSH_WRITE) != 0) {
		goto __5
	}
	errorCodeSet = 1
	goto cleanup
__5:
	;
__4:
	;

	// Are we in the correct thread?

	// Do the actual invokation of "finalize" now; we're in the right thread.

	result = sInvokeTclMethod1(tls, rtPtr, ts+36497, uintptr(0), uintptr(0), bp+8)
	if !(result != TCL_OK && interp != uintptr(0)) {
		goto __6
	}
	XTcl_SetChannelErrorInterp(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 8 /* resObj */)))
__6:
	;

__7:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp + 8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __10
	}
	XTclFreeObj(tls, _objPtr)
__10:
	;
	goto __8
__8:
	if 0 != 0 {
		goto __7
	}
	goto __9
__9:
	; // Remove reference we held from the
	// invoke.

cleanup:

	// Remove the transform from the map before releasing the memory, to
	// prevent future accesses from finding and dereferencing a dangling
	// pointer.
	//
	// NOTE: The transform may not be in the map. This is ok, that happens
	// when the transform was created in a different interpreter and/or thread
	// and then was moved here.
	//
	// NOTE: The channel may have been removed from the map already via
	// the per-interp DeleteReflectedTransformMap exit-handler.

	if !!((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fdead != 0) {
		goto __11
	}
	rtmPtr = sGetReflectedTransformMap(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp)
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(rtmPtr /* &.map */)).FfindProc})).f(tls, rtmPtr /* &.map */, XTcl_GetString(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fhandle))
	if !(hPtr != 0) {
		goto __12
	}
	XTcl_DeleteHashEntry(tls, hPtr)
__12:
	;

	// In a threaded interpreter we manage a per-thread map as well,
	// to allow us to survive if the script level pulls the rug out
	// under a channel by deleting the owning thread.

__11:
	;

	XTcl_EventuallyFree(tls, rtPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sFreeReflectedTransform})))
	if errorCodeSet != 0 {
		return *(*int32)(unsafe.Pointer(bp /* errorCode */))
	}
	return func() int32 {
		if result == TCL_OK {
			return EOK
		}
		return EINVAL
	}()
}

func sReflectClose21(tls *libc.TLS, clientData ClientData, interp uintptr, flags int32) int32 { /* tclIORTrans.c:1042:1: */
	if flags&(int32(1)<<1|int32(1)<<2) == 0 {
		return sReflectClose1(tls, clientData, interp)
	}
	return EINVAL
}

//----------------------------------------------------------------------
//
// ReflectInput --
//
//	This function is invoked when more data is requested from the channel.
//
// Results:
//	The number of bytes read.
//
// Side effects:
//	Allocates memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectInput1(tls *libc.TLS, clientData ClientData, buf uintptr, toRead int32, errorCodePtr uintptr) int32 { /* tclIORTrans.c:1070:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var rtPtr uintptr
	var gotBytes int32
	var copied int32
	var readBytes int32
	var bufObj uintptr
	// var maxRead int32 at bp, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	rtPtr = clientData

	// The following check can be done before thread redirection, because we
	// are reading from an item which is readonly, i.e. will never change
	// during the lifetime of the channel.

	if !!((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_READ) != 0) {
		goto __1
	}
	XTcl_SetChannelError(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan, XTcl_NewStringObj(tls, msg_read_unsup, -1))
	*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
	return -1
__1:
	;

	XTcl_Preserve(tls, rtPtr)

	// TODO: Consider a more appropriate buffer size.
	bufObj = XTcl_NewByteArrayObj(tls, uintptr(0), toRead)
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount++
	gotBytes = 0
	if !((*ReflectedTransform)(unsafe.Pointer(rtPtr)).FeofPending != 0) {
		goto __2
	}
	goto stop
__2:
	;
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).FreadIsDrained = 0
__3:
	if !(toRead > 0) {
		goto __4
	}
	// Loop until the request is satisfied (or no data available from
	// below, possibly EOF).

	copied = sResultCopy1(tls, rtPtr+80, buf, toRead)
	toRead = toRead - copied
	buf += uintptr(copied)
	gotBytes = gotBytes + copied

	if !(toRead == 0) {
		goto __5
	}
	goto stop
__5:
	;

	if !((*ReflectedTransform)(unsafe.Pointer(rtPtr)).FeofPending != 0) {
		goto __6
	}
	goto stop
__6:
	;

	// The buffer is exhausted, but the caller wants even more. We now
	// have to go to the underlying channel, get more bytes and then
	// transform them for delivery. We may not get what we want (full EOF
	// or temporarily out of data).
	//
	// Length (rtPtr->result) == 0, toRead > 0 here. Use 'buf'! as target
	// to store the intermediary information read from the parent channel.
	//
	// Ask the transform how much data it allows us to read from the
	// underlying channel. This feature allows the transform to signal EOF
	// upstream although there is none downstream. Useful to control an
	// unbounded 'fcopy' for example, either through counting bytes, or by
	// pattern matching.

	if !((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_LIMIT) != 0) {
		goto __7
	}
	*(*int32)(unsafe.Pointer(bp /* maxRead */)) = -1

	if !!(sTransformLimit(tls, rtPtr, errorCodePtr, bp) != 0) {
		goto __8
	}
	goto error
__8:
	;
	if !(*(*int32)(unsafe.Pointer(bp)) == 0) {
		goto __9
	}
	goto stop
	goto __10
__9:
	if !(*(*int32)(unsafe.Pointer(bp)) > 0) {
		goto __11
	}
	if !(*(*int32)(unsafe.Pointer(bp)) < toRead) {
		goto __12
	}
	toRead = *(*int32)(unsafe.Pointer(bp /* maxRead */))
__12:
	;
__11:
	;
__10:
	; // else: 'maxRead < 0' == Accept the current value of toRead
__7:
	;

	if !(toRead <= 0) {
		goto __13
	}
	goto stop
__13:
	;

	readBytes = XTcl_ReadRaw(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent,
		XTcl_SetByteArrayLength(tls, bufObj, toRead), toRead)
	if !(readBytes < 0) {
		goto __14
	}
	if !(XTcl_InputBlocked(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent) != 0 && gotBytes > 0) {
		goto __15
	}

	// Down channel is blocked and offers zero additional bytes.
	// The nonzero gotBytes already returned makes the total
	// operation a valid short read.  Return to caller.

	goto stop
__15:
	;

	// Either the down channel is not blocked (a real error)
	// or it is and there are gotBytes==0 byte copied so far.
	// In either case, pass up the error, so we either report
	// any real error, or do not mistakenly signal EOF by
	// returning 0 to the caller.

	*(*int32)(unsafe.Pointer(errorCodePtr)) = XTcl_GetErrno(tls)
	goto error
__14:
	;

	if !(readBytes == 0) {
		goto __16
	}

	// Zero returned from Tcl_ReadRaw() always indicates EOF
	// on the down channel.

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).FeofPending = 1

	// Now this is a bit different. The partial data waiting is
	// converted and returned.

	if !((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_DRAIN) != 0) {
		goto __17
	}
	if !!(sTransformDrain(tls, rtPtr, errorCodePtr) != 0) {
		goto __18
	}
	goto error
__18:
	;
__17:
	;

	if !((*ResultBuffer1)(unsafe.Pointer(rtPtr+80)).Fused == 0) {
		goto __19
	}
	// The drain delivered nothing.

	goto stop
__19:
	;

	goto __3 // at: while (toRead > 0)
__16:
	; // readBytes == 0

	// Transform the read chunk, which was not empty. Anything we got back
	// is a transformation result is put into our buffers, and the next
	// iteration will put it into the result.

	XTcl_SetByteArrayLength(tls, bufObj, readBytes)
	if !!(sTransformRead(tls, rtPtr, errorCodePtr, bufObj) != 0) {
		goto __20
	}
	goto error
__20:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount > 1) {
		goto __21
	}
__22:
	_objPtr = bufObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __25
	}
	XTclFreeObj(tls, _objPtr)
__25:
	;
	goto __23
__23:
	if 0 != 0 {
		goto __22
	}
	goto __24
__24:
	;
	bufObj = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount++
__21:
	;
	XTcl_SetByteArrayLength(tls, bufObj, 0)
	goto __3
__4:
	; // while toRead > 0

stop:
	if !(gotBytes == 0) {
		goto __26
	}
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).FeofPending = 0
__26:
	;
__27:
	_objPtr1 = bufObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __30
	}
	XTclFreeObj(tls, _objPtr1)
__30:
	;
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
	XTcl_Release(tls, rtPtr)
	return gotBytes

error:
	gotBytes = -1
	goto stop
	return int32(0)
}

//----------------------------------------------------------------------
//
// ReflectOutput --
//
//	This function is invoked when data is written to the channel.
//
// Results:
//	The number of bytes actually written.
//
// Side effects:
//	Allocates memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectOutput1(tls *libc.TLS, clientData ClientData, buf uintptr, toWrite int32, errorCodePtr uintptr) int32 { /* tclIORTrans.c:1263:1: */
	var rtPtr uintptr = clientData

	// The following check can be done before thread redirection, because we
	// are reading from an item which is readonly, i.e. will never change
	// during the lifetime of the channel.

	if !((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<7) != 0) {
		XTcl_SetChannelError(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan, XTcl_NewStringObj(tls, msg_write_unsup, -1))
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
		return -1
	}

	if toWrite == 0 {
		// Nothing came in to write, ignore the call

		return 0
	}

	// Discard partial data in the input buffers, i.e. on the read side. Like
	// we do when explicitly seeking as well.

	XTcl_Preserve(tls, rtPtr)

	if (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_CLEAR) != 0 {
		sTransformClear(tls, rtPtr)
	}

	// Hand the data to the transformation itself. Anything it deigned to
	// return to us is a (partial) transformation result and written to the
	// parent channel for further processing.

	if !(sTransformWrite(tls, rtPtr, errorCodePtr, buf, toWrite) != 0) {
		XTcl_Release(tls, rtPtr)
		return -1
	}

	*(*int32)(unsafe.Pointer(errorCodePtr)) = EOK
	XTcl_Release(tls, rtPtr)
	return toWrite
}

//----------------------------------------------------------------------
//
// ReflectSeekWide / ReflectSeek --
//
//	This function is invoked when the user wishes to seek on the channel.
//
// Results:
//	The new location of the access point.
//
// Side effects:
//	Allocates memory. Arbitrary, per the parent channel, and the called
//	scripts.
//
//----------------------------------------------------------------------

func sReflectSeekWide1(tls *libc.TLS, clientData ClientData, offset Tcl_WideInt, seekMode int32, errorCodePtr uintptr) Tcl_WideInt { /* tclIORTrans.c:1336:1: */
	var rtPtr uintptr = clientData
	var parent uintptr = (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent
	var curPos Tcl_WideInt // Position on the device.

	var seekProc uintptr = XTcl_ChannelSeekProc(tls, XTcl_GetChannelType(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent))

	// Fail if the parent channel is not seekable.

	if seekProc == uintptr(0) {
		XTcl_SetErrno(tls, EINVAL)
		return Tcl_WideInt(-1)
	}

	// Check if we can leave out involving the Tcl level, i.e. transformation
	// handler. This is true for tell requests, and transformations which
	// support neither flush, nor drain. For these cases we can pass the
	// request down and the result back up unchanged.

	XTcl_Preserve(tls, rtPtr)

	if (seekMode != SEEK_CUR || offset != int64(0)) &&
		((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_CLEAR) != 0 ||
			(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_FLUSH) != 0) {
		// Neither a tell request, nor clear/flush both not supported. We have
		// to go through the Tcl level to clear and/or flush the
		// transformation.

		if (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_CLEAR) != 0 {
			sTransformClear(tls, rtPtr)
		}

		// When flushing the transform for seeking the generated results are
		// irrelevant. We cannot put them into the channel, this would move
		// the location, throwing it off with regard to where we are and are
		// seeking to.

		if (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods&(int32(1)<<METH_FLUSH) != 0 {
			if !(sTransformFlush(tls, rtPtr, errorCodePtr, FLUSH_DISCARD) != 0) {
				XTcl_Release(tls, rtPtr)
				return int64(-1)
			}
		}
	}

	// Now seek to the new position in the channel as requested by the
	// caller. Note that we prefer the wideSeekProc if that is available and
	// non-NULL...

	if XTcl_ChannelWideSeekProc(tls, (*Channel)(unsafe.Pointer(parent)).FtypePtr) != uintptr(0) {
		curPos = (*struct {
			f func(*libc.TLS, ClientData, Tcl_WideInt, int32, uintptr) Tcl_WideInt
		})(unsafe.Pointer(&struct{ uintptr }{XTcl_ChannelWideSeekProc(tls, (*Channel)(unsafe.Pointer(parent)).FtypePtr)})).f(tls, (*Channel)(unsafe.Pointer(parent)).FinstanceData, offset,
			seekMode, errorCodePtr)
	} else if offset < Tcl_WideInt(-0x7fffffff-1) || offset > Tcl_WideInt(0x7fffffff) {
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EOVERFLOW
		curPos = Tcl_WideInt(-1)
	} else {
		curPos = Tcl_WideInt(int32((*struct {
			f func(*libc.TLS, ClientData, int32, int32, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{XTcl_ChannelSeekProc(tls, (*Channel)(unsafe.Pointer(parent)).FtypePtr)})).f(tls, (*Channel)(unsafe.Pointer(parent)).FinstanceData, int32(offset), seekMode, errorCodePtr)))
	}
	if curPos == int64(-1) {
		XTcl_SetErrno(tls, *(*int32)(unsafe.Pointer(errorCodePtr)))
	}

	*(*int32)(unsafe.Pointer(errorCodePtr)) = EOK
	XTcl_Release(tls, rtPtr)
	return curPos
}

func sReflectSeek1(tls *libc.TLS, clientData ClientData, offset int32, seekMode int32, errorCodePtr uintptr) int32 { /* tclIORTrans.c:1423:1: */
	// This function can be invoked from a transformation which is based on
	// standard seeking, i.e. non-wide. Because of this we have to implement
	// it, a dummy is not enough. We simply delegate the call to the wide
	// routine.

	return int32(sReflectSeekWide1(tls, clientData, Tcl_WideInt(offset), seekMode,
		errorCodePtr))
}

//----------------------------------------------------------------------
//
// ReflectWatch --
//
//	This function is invoked to tell the channel what events the I/O
//	system is interested in.
//
// Results:
//	None.
//
// Side effects:
//	Allocates memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectWatch1(tls *libc.TLS, clientData ClientData, mask int32) { /* tclIORTrans.c:1458:1: */
	var rtPtr uintptr = clientData
	var watchProc uintptr

	watchProc = XTcl_ChannelWatchProc(tls, XTcl_GetChannelType(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent))
	(*struct {
		f func(*libc.TLS, ClientData, int32)
	})(unsafe.Pointer(&struct{ uintptr }{watchProc})).f(tls, XTcl_GetChannelInstanceData(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent), mask)

	// Management of the internal timer.

	if !(mask&(int32(1)<<1) != 0) || (*ResultBuffer1)(unsafe.Pointer(rtPtr+80)).Fused == 0 {
		// A pending timer may exist, but either is there no (more) interest
		// in the events it generates or nothing is available for reading.
		// Remove it, if existing.

		sTimerKill(tls, rtPtr)
	} else {
		// There might be no pending timer, but there is interest in readable
		// events and we actually have data waiting, so generate a timer to
		// flush that if it does not exist.

		sTimerSetup(tls, rtPtr)
	}
}

//----------------------------------------------------------------------
//
// ReflectBlock --
//
//	This function is invoked to tell the channel which blocking behaviour
//	is required of it.
//
// Results:
//	A posix error number.
//
// Side effects:
//	Allocates memory. Arbitrary, as it calls upon a script.
//
//----------------------------------------------------------------------

func sReflectBlock1(tls *libc.TLS, clientData ClientData, nonblocking int32) int32 { /* tclIORTrans.c:1509:1: */
	var rtPtr uintptr = clientData

	// Transformations simply record the blocking mode in their C level
	// structure for use by --> ReflectInput. The Tcl level doesn't see this
	// information or change. As such thread forwarding is not required.

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fnonblocking = nonblocking
	return EOK
}

//----------------------------------------------------------------------
//
// ReflectSetOption --
//
//	This function is invoked to configure a channel option.
//
// Results:
//	A standard Tcl result code.
//
// Side effects:
//	Arbitrary, per the parent channel.
//
//----------------------------------------------------------------------

func sReflectSetOption1(tls *libc.TLS, clientData ClientData, interp uintptr, optionName uintptr, newValue uintptr) int32 { /* tclIORTrans.c:1542:1: */
	var rtPtr uintptr = clientData

	// Transformations have no options. Thus the call is passed down unchanged
	// to the parent channel for processing. Its results are passed back
	// unchanged as well. This all happens in the thread we are in. As the Tcl
	// level is not involved there is no need for thread forwarding.

	var setOptionProc uintptr = XTcl_ChannelSetOptionProc(tls, XTcl_GetChannelType(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent))

	if setOptionProc == uintptr(0) {
		return TCL_ERROR
	}
	return (*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{setOptionProc})).f(tls, XTcl_GetChannelInstanceData(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent), interp,
		optionName, newValue)
}

//----------------------------------------------------------------------
//
// ReflectGetOption --
//
//	This function is invoked to retrieve all or a channel options.
//
// Results:
//	A standard Tcl result code.
//
// Side effects:
//	Arbitrary, per the parent channel.
//
//----------------------------------------------------------------------

func sReflectGetOption1(tls *libc.TLS, clientData ClientData, interp uintptr, optionName uintptr, dsPtr uintptr) int32 { /* tclIORTrans.c:1584:1: */
	var rtPtr uintptr = clientData

	// Transformations have no options. Thus the call is passed down unchanged
	// to the parent channel for processing. Its results are passed back
	// unchanged as well. This all happens in the thread we are in. As the Tcl
	// level is not involved there is no need for thread forwarding.
	//
	// Note that the parent not having a driver for option retrieval is not an
	// immediate error. A query for all options is ok. Only a request for a
	// specific option has to fail.

	var getOptionProc uintptr = XTcl_ChannelGetOptionProc(tls, XTcl_GetChannelType(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent))

	if getOptionProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{getOptionProc})).f(tls, XTcl_GetChannelInstanceData(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent),
			interp, optionName, dsPtr)
	} else if optionName == uintptr(0) {
		return TCL_OK
	} else {
		return TCL_ERROR
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// ReflectHandle --
//
//	This function is invoked to retrieve the associated file handle.
//
// Results:
//	A standard Tcl result code.
//
// Side effects:
//	Arbitrary, per the parent channel.
//
//----------------------------------------------------------------------

func sReflectHandle(tls *libc.TLS, clientData ClientData, direction int32, handlePtr uintptr) int32 { /* tclIORTrans.c:1633:1: */
	var rtPtr uintptr = clientData

	// Transformations have no handle of their own. As such we simply query
	// the parent channel for it. This way the qery will ripple down through
	// all transformations until reaches the base channel. Which then returns
	// its handle, or fails. The former will then ripple up the stack.
	//
	// This all happens in the thread we are in. As the Tcl level is not
	// involved no forwarding is required.

	return XTcl_GetChannelHandle(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent, direction, handlePtr)
}

//----------------------------------------------------------------------
//
// ReflectNotify --
//
//	This function is invoked to reported incoming events.
//
// Results:
//	A standard Tcl result code.
//
// Side effects:
//	Arbitrary, per the parent channel.
//
//----------------------------------------------------------------------

func sReflectNotify(tls *libc.TLS, clientData ClientData, mask int32) int32 { /* tclIORTrans.c:1669:1: */
	var rtPtr uintptr = clientData

	// An event occured in the underlying channel.
	//
	// We delete our timer. It was not fired, yet we are here, so the channel
	// below generated such an event and we don't have to. The renewal of the
	// interest after the execution of channel handlers will eventually cause
	// us to recreate the timer (in ReflectWatch).

	sTimerKill(tls, rtPtr)

	// Pass to higher layers.

	return mask
}

// Helpers. =========================================================

//----------------------------------------------------------------------
//
// DecodeEventMask --
//
//	This function takes an internal bitmask of events and constructs the
//	equivalent list of event items.
//
// Results:
//	A Tcl_Obj reference. The object will have a refCount of one. The user
//	has to decrement it to release the object.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------
// DUPLICATE of 'DecodeEventMask' in tclIORChan.c

func sDecodeEventMask1(tls *libc.TLS, mask int32) uintptr { /* tclIORTrans.c:1717:16: */
	var eventStr uintptr
	var evObj uintptr

	switch mask & (int32(1)<<1 | int32(1)<<2) {
	case int32(1)<<1 | int32(1)<<2:
		eventStr = ts + 37518 /* "read write" */
		break
	case int32(1) << 1:
		eventStr = ts + 6057 /* "read" */
		break
	case int32(1) << 2:
		eventStr = ts + 33651 /* "write" */
		break
	default:
		eventStr = ts + 2631 /* "" */
		break
	}

	evObj = XTcl_NewStringObj(tls, eventStr, -1)
	(*Tcl_Obj)(unsafe.Pointer(evObj)).FrefCount++
	return evObj
}

//----------------------------------------------------------------------
//
// NewReflectedTransform --
//
//	This function is invoked to allocate and initialize the instance data
//	of a new reflected channel.
//
// Results:
//	A heap-allocated channel instance.
//
// Side effects:
//	Allocates memory.
//
//----------------------------------------------------------------------

func sNewReflectedTransform(tls *libc.TLS, interp uintptr, cmdpfxObj uintptr, mode int32, handleObj uintptr, parentChan Tcl_Channel) uintptr { /* tclIORTrans.c:1761:27: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var rtPtr uintptr
	// var listc int32 at bp, 4

	// var listv uintptr at bp+8, 8

	var i int32
	_ = mode

	rtPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ReflectedTransform{})))

	// rtPtr->chan: Assigned by caller. Dummy data here.
	// rtPtr->methods: Assigned by caller. Dummy data here.

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan = uintptr(0)
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmethods = 0
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent = parentChan
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp = interp
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fhandle = handleObj
	(*Tcl_Obj)(unsafe.Pointer(handleObj)).FrefCount++
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Ftimer = uintptr(0)
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fmode = 0
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).FreadIsDrained = 0
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).FeofPending = 0
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fnonblocking = (*ChannelState1)(unsafe.Pointer((*Channel)(unsafe.Pointer(parentChan)).Fstate)).Fflags & (int32(1) << 3)
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fdead = 0

	// Query parent for current blocking mode.

	sResultInit1(tls, rtPtr+80)

	// Method placeholder.

	// ASSERT: cmdpfxObj is a Tcl List

	XTcl_ListObjGetElements(tls, interp, cmdpfxObj, bp, bp+8)

	// See [==] as well.
	// Storage for the command prefix and the additional words required for
	// the invocation of methods in the command handler.
	//
	// listv [0] [listc-1] | [listc]  [listc+1] |
	// argv  [0]   ... [.] | [argc-2] [argc-1]  | [argc]  [argc+2]
	//       cmd   ... pfx | method   chan      | detail1 detail2

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargc = *(*int32)(unsafe.Pointer(bp)) + 2
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp))+4)))

	// Duplicate object references.

	for i = 0; i < *(*int32)(unsafe.Pointer(bp /* listc */)); i++ {
		var word uintptr = libc.AssignPtrUintptr((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv+uintptr(i)*8, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* listv */)) + uintptr(i)*8)))

		(*Tcl_Obj)(unsafe.Pointer(word)).FrefCount++
	}

	i++ // Skip placeholder for method

	// See [x] in FreeReflectedTransform for release
	*(*uintptr)(unsafe.Pointer((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv + uintptr(i)*8)) = handleObj
	(*Tcl_Obj)(unsafe.Pointer(handleObj)).FrefCount++

	// The next two objects are kept empty, varying arguments.

	// Initialization complete.

	return rtPtr
}

//----------------------------------------------------------------------
//
// NextHandle --
//
//	This function is invoked to generate a channel handle for a new
//	reflected channel.
//
// Results:
//	A Tcl_Obj containing the string of the new channel handle. The
//	refcount of the returned object is -- zero --.
//
// Side effects:
//	May allocate memory. Mutex protected critical section locks out other
//	threads for a short time.
//
//----------------------------------------------------------------------

func sNextHandle1(tls *libc.TLS) uintptr { /* tclIORTrans.c:1872:16: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var resObj uintptr

	resObj = XTcl_ObjPrintf(tls, ts+37997, libc.VaList(bp, rtCounter))
	rtCounter++

	return resObj
}

var rtCounter uint32 = uint32(0) /* tclIORTrans.c:1884:26 */

func sFreeReflectedTransformArgs(tls *libc.TLS, rtPtr uintptr) { /* tclIORTrans.c:1896:1: */
	var i int32
	var n int32 = (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargc - 2

	if n < 0 {
		return
	}

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fhandle
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fhandle = uintptr(0)

	for i = 0; i < n; i++ {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv + uintptr(i)*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	// See [x] in NewReflectedTransform for lock
	// n+1 = argc-1.
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv + uintptr(n+1)*8))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargc = 1
}

func sFreeReflectedTransform(tls *libc.TLS, rtPtr uintptr) { /* tclIORTrans.c:1922:1: */
	sTimerKill(tls, rtPtr)
	sResultClear1(tls, rtPtr+80)

	sFreeReflectedTransformArgs(tls, rtPtr)

	XTclpFree(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv)
	XTclpFree(tls, rtPtr)
}

//----------------------------------------------------------------------
//
// InvokeTclMethod --
//
//	This function is used to invoke the Tcl level of a reflected channel.
//	It handles all the command assembly, invokation, and generic state and
//	result mgmt. It does *not* handle thread redirection; that is the
//	responsibility of clients of this function.
//
// Results:
//	Result code and data as returned by the method.
//
// Side effects:
//	Arbitrary, as it calls upon a Tcl script.
//
// Contract:
//	argOneObj.refCount >= 1 on entry and exit, if argOneObj != NULL
//	argTwoObj.refCount >= 1 on entry and exit, if argTwoObj != NULL
//	resObj.refCount in {0, 1, ...}
//
//----------------------------------------------------------------------
// Semi-DUPLICATE of 'InvokeTclMethod' in tclIORChan.c
// - Semi because different structures are used.
// - Still possible to factor out the commonalities into a separate structure.

func sInvokeTclMethod1(tls *libc.TLS, rtPtr uintptr, method uintptr, argOneObj uintptr, argTwoObj uintptr, resultObjPtr uintptr) int32 { /* tclIORTrans.c:1962:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var cmdc int32                   // #words in constructed command
	var methObj uintptr = uintptr(0) // Method name in object form
	var sr Tcl_InterpState           // State of handler interp
	var result int32                 // Result code of method invokation
	var resObj uintptr = uintptr(0)  // Result of method invokation.

	if (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fdead != 0 {
		// The transform is marked as dead. Bail out immediately, with an
		// appropriate error.

		if resultObjPtr != uintptr(0) {
			resObj = XTcl_NewStringObj(tls, msg_dstlost1, -1)
			*(*uintptr)(unsafe.Pointer(resultObjPtr)) = resObj
			(*Tcl_Obj)(unsafe.Pointer(resObj)).FrefCount++
		}
		return TCL_ERROR
	}

	// NOTE (5): Decide impl. issue: Cache objects with method names?
	// Requires TSD data as reflections can be created in many different
	// threads.
	// NO: Caching of command resolutions means storage per channel.

	// Insert method into the pre-allocated area, after the command prefix,
	// before the channel id.

	methObj = XTcl_NewStringObj(tls, method, -1)
	(*Tcl_Obj)(unsafe.Pointer(methObj)).FrefCount++
	*(*uintptr)(unsafe.Pointer((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv + uintptr((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargc-2)*8)) = methObj

	// Append the additional argument containing method specific details
	// behind the channel id. If specified.
	//
	// Because of the contract there is no need to increment the refcounts.
	// The objects will survive the Tcl_EvalObjv without change.

	cmdc = (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargc
	if argOneObj != 0 {
		*(*uintptr)(unsafe.Pointer((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv + uintptr(cmdc)*8)) = argOneObj
		cmdc++
		if argTwoObj != 0 {
			*(*uintptr)(unsafe.Pointer((*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv + uintptr(cmdc)*8)) = argTwoObj
			cmdc++
		}
	}

	// And run the handler... This is done in auch a manner which leaves any
	// existing state intact.

	sr = XTcl_SaveInterpState(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, 0)
	XTcl_Preserve(tls, rtPtr)
	XTcl_Preserve(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp)
	result = XTcl_EvalObjv(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, cmdc, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv, TCL_EVAL_GLOBAL)

	// We do not try to extract the result information if the caller has no
	// interest in it. I.e. there is no need to put effort into creating
	// something which is discarded immediately after.

	if resultObjPtr != 0 {
		if result == TCL_OK {
			// Ok result taken as is, also if the caller requests that there
			// is no capture.

			resObj = XTcl_GetObjResult(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp)
		} else {
			// Non-ok result is always treated as an error. We have to capture
			// the full state of the result, including additional options.
			//
			// This is complex and ugly, and would be completely unnecessary
			// if we only added support for a TCL_FORBID_EXCEPTIONS flag.
			if result != TCL_ERROR {
				var cmd uintptr = XTcl_NewListObj(tls, cmdc, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fargv)
				// var cmdLen int32 at bp+16, 4

				var cmdString uintptr = XTcl_GetStringFromObj(tls, cmd, bp+16)

				(*Tcl_Obj)(unsafe.Pointer(cmd)).FrefCount++
				XTcl_ResetResult(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp)
				XTcl_SetObjResult(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, XTcl_ObjPrintf(tls,
					ts+37535, libc.VaList(bp, result)))
				XTcl_LogCommandInfo(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, cmdString, cmdString, *(*int32)(unsafe.Pointer(bp + 16 /* cmdLen */)))
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = cmd
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				result = TCL_ERROR
			}
			XTcl_AppendObjToErrorInfo(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, XTcl_ObjPrintf(tls,
				ts+37570, libc.VaList(bp+8, method)))
			resObj = sMarshallError1(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp)
		}
		(*Tcl_Obj)(unsafe.Pointer(resObj)).FrefCount++
	}
	XTcl_RestoreInterpState(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, sr)
	XTcl_Release(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp)
	XTcl_Release(tls, rtPtr)

	// Cleanup of the dynamic parts of the command.
	//
	// The detail objects survived the Tcl_EvalObjv without change because of
	// the contract. Therefore there is no need to decrement the refcounts. Only
	// the internal method object has to be disposed of.

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = methObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	// The resObj has a ref count of 1 at this location. This means that the
	// caller of InvokeTclMethod has to dispose of it (but only if it was
	// returned to it).

	if resultObjPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(resultObjPtr)) = resObj
	}

	// There no need to handle the case where nothing is returned, because for
	// that case resObj was not set anyway.

	return result
}

//----------------------------------------------------------------------
//
// GetReflectedTransformMap --
//
//	Gets and potentially initializes the reflected channel map for an
//	interpreter.
//
// Results:
//	A pointer to the map created, for use by the caller.
//
// Side effects:
//	Initializes the reflected channel map for an interpreter.
//
//----------------------------------------------------------------------

func sGetReflectedTransformMap(tls *libc.TLS, interp uintptr) uintptr { /* tclIORTrans.c:2123:30: */
	var rtmPtr uintptr = XTcl_GetAssocData(tls, interp, ts+38003, uintptr(0))

	if rtmPtr == uintptr(0) {
		rtmPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ReflectedTransformMap{})))
		XTcl_InitHashTable(tls, rtmPtr, 0)
		XTcl_SetAssocData(tls, interp, ts+38003,
			*(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr)
			}{sDeleteReflectedTransformMap})), rtmPtr)
	}
	return rtmPtr
}

//----------------------------------------------------------------------
//
// DeleteReflectedTransformMap --
//
//	Deletes the channel table for an interpreter, closing any open
//	channels whose refcount reaches zero. This procedure is invoked when
//	an interpreter is deleted, via the AssocData cleanup mechanism.
//
// Results:
//	None.
//
// Side effects:
//	Deletes the hash table of channels. May close channels. May flush
//	output on closed channels. Removes any channeEvent handlers that were
//	registered in this interpreter.
//
//----------------------------------------------------------------------

func sDeleteReflectedTransformMap(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclIORTrans.c:2159:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var rtmPtr uintptr // The map
	// var hSearch Tcl_HashSearch at bp, 24
	// Search variable.
	var hPtr uintptr // Search variable.
	var rtPtr uintptr

	// Delete all entries. The channels may have been closed already, or will
	// be closed later, by the standard IO finalization of an interpreter
	// under destruction. Except for the channels which were moved to a
	// different interpreter and/or thread. They do not exist from the IO
	// systems point of view and will not get closed. Therefore mark all as
	// dead so that any future access will cause a proper error. For channels
	// in a different thread we actually do the same as
	// DeleteThreadReflectedTransformMap(), just restricted to the channels of
	// this interp.

	rtmPtr = clientData
	for hPtr = XTcl_FirstHashEntry(tls, rtmPtr, bp); hPtr != uintptr(0); hPtr = XTcl_FirstHashEntry(tls, rtmPtr, bp) {
		rtPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fdead = 1
		XTcl_DeleteHashEntry(tls, hPtr)
	}
	XTcl_DeleteHashTable(tls, rtmPtr)
	XTclpFree(tls, rtmPtr)

}

//----------------------------------------------------------------------
//
// TimerKill --
//
//	Timer management. Removes the internal timer if it exists.
//
// Side effects:
//	See above.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sTimerKill(tls *libc.TLS, rtPtr uintptr) { /* tclIORTrans.c:2849:1: */
	if (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Ftimer == uintptr(0) {
		return
	}

	// Delete an existing flush-out timer, prevent it from firing on a
	// removed/dead channel.

	XTcl_DeleteTimerHandler(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Ftimer)
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Ftimer = uintptr(0)
}

//----------------------------------------------------------------------
//
// TimerSetup --
//
//	Timer management. Creates the internal timer if it does not exist.
//
// Side effects:
//	See above.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sTimerSetup(tls *libc.TLS, rtPtr uintptr) { /* tclIORTrans.c:2882:1: */
	if (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Ftimer != uintptr(0) {
		return
	}

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Ftimer = XTcl_CreateTimerHandler(tls, SYNTHETIC_EVENT_TIME,
		*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sTimerRun})), rtPtr)
}

//----------------------------------------------------------------------
//
// TimerRun --
//
//	Called by the notifier (-> timer) to flush out information waiting in
//	channel buffers.
//
// Side effects:
//	As of 'Tcl_NotifyChannel'.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sTimerRun(tls *libc.TLS, clientData ClientData) { /* tclIORTrans.c:2911:1: */
	var rtPtr uintptr = clientData

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).Ftimer = uintptr(0)
	XTcl_NotifyChannel(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan, int32(1)<<1)
}

//----------------------------------------------------------------------
//
// ResultInit --
//
//	Initializes the specified buffer structure. The structure will contain
//	valid information for an emtpy buffer.
//
// Side effects:
//	See above.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sResultInit1(tls *libc.TLS, rPtr uintptr) { /* tclIORTrans.c:2938:1: */
	(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused = 0
	(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fallocated = 0
	(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf = uintptr(0)
}

//----------------------------------------------------------------------
//
// ResultClear --
//
//	Deallocates any memory allocated by 'ResultAdd'.
//
// Side effects:
//	See above.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sResultClear1(tls *libc.TLS, rPtr uintptr) { /* tclIORTrans.c:2963:1: */
	(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused = 0

	if !((*ResultBuffer1)(unsafe.Pointer(rPtr)).Fallocated != 0) {
		return
	}

	XTclpFree(tls, (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf)
	(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf = uintptr(0)
	(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fallocated = 0
}

//----------------------------------------------------------------------
//
// ResultAdd --
//
//	Adds the bytes in the specified array to the buffer, by appending it.
//
// Side effects:
//	See above.
//
// Result:
//	None.
//
//----------------------------------------------------------------------

func sResultAdd1(tls *libc.TLS, rPtr uintptr, buf uintptr, toWrite int32) { /* tclIORTrans.c:2994:1: */
	if (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused+toWrite+1 > (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fallocated {
		// Extension of the internal buffer is required.
		// NOTE: Currently linear. Should be doubling to amortize.

		if (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fallocated == 0 {
			(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fallocated = toWrite + 512
			(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf = XTcl_Alloc(tls, uint32((*ResultBuffer1)(unsafe.Pointer(rPtr)).Fallocated))
		} else {
			*(*int32)(unsafe.Pointer(rPtr + 8)) += toWrite + 512
			(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf = XTcl_Realloc(tls, (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf, uint32((*ResultBuffer1)(unsafe.Pointer(rPtr)).Fallocated))
		}
	}

	// Now copy data.

	libc.Xmemcpy(tls, (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf+uintptr((*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused), buf, uint64(toWrite))
	*(*int32)(unsafe.Pointer(rPtr + 12)) += toWrite
}

//----------------------------------------------------------------------
//
// ResultCopy --
//
//	Copies the requested number of bytes from the buffer into the
//	specified array and removes them from the buffer afterward. Copies
//	less if there is not enough data in the buffer.
//
// Side effects:
//	See above.
//
// Result:
//	The number of actually copied bytes, possibly less than 'toRead'.
//
//----------------------------------------------------------------------

func sResultCopy1(tls *libc.TLS, rPtr uintptr, buf uintptr, toRead int32) int32 { /* tclIORTrans.c:3042:1: */
	var copied int32

	if (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused == 0 {
		// Nothing to copy in the case of an empty buffer.

		copied = 0
	} else if (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused == toRead {
		// We have just enough. Copy everything to the caller.

		libc.Xmemcpy(tls, buf, (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf, uint64(toRead))
		(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused = 0
		copied = toRead
	} else if (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused > toRead {
		// The internal buffer contains more than requested. Copy the
		// requested subset to the caller, and shift the remaining bytes down.

		libc.Xmemcpy(tls, buf, (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf, uint64(toRead))
		libc.Xmemmove(tls, (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf, (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf+uintptr(toRead), uint64((*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused-toRead))

		*(*int32)(unsafe.Pointer(rPtr + 12)) -= toRead
		copied = toRead
	} else {
		// There is not enough in the buffer to satisfy the caller, so take
		// everything.

		libc.Xmemcpy(tls, buf, (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fbuf, uint64((*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused))
		toRead = (*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused
		(*ResultBuffer1)(unsafe.Pointer(rPtr)).Fused = 0
		copied = toRead
	}

	// -- common postwork code -------

	return copied
}

func sTransformRead(tls *libc.TLS, rtPtr uintptr, errorCodePtr uintptr, bufObj uintptr) int32 { /* tclIORTrans.c:3092:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var resObj uintptr at bp, 8

	// var bytec int32 at bp+8, 4
	// Number of returned bytes
	var bytev uintptr // Array of returned bytes

	// Are we in the correct thread?

	// ASSERT: rtPtr->method & FLAG(METH_READ)
	// ASSERT: rtPtr->mode & TCL_READABLE

	if sInvokeTclMethod1(tls, rtPtr, ts+6057, bufObj, uintptr(0), bp) != TCL_OK {
		XTcl_SetChannelError(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		} // Remove reference held from invoke
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
		return 0
	}

	bytev = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp /* resObj */)), bp+8)
	sResultAdd1(tls, rtPtr+80, bytev, *(*int32)(unsafe.Pointer(bp + 8 /* bytec */)))

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	} // Remove reference held from invoke
	return 1
}

func sTransformWrite(tls *libc.TLS, rtPtr uintptr, errorCodePtr uintptr, buf uintptr, toWrite int32) int32 { /* tclIORTrans.c:3145:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var bufObj uintptr
	// var resObj uintptr at bp, 8

	// var bytec int32 at bp+8, 4
	// Number of returned bytes
	var bytev uintptr // Array of returned bytes
	var res int32

	/*
	 * Are we in the correct thread?
	 */

	{
		// ASSERT: rtPtr->method & FLAG(METH_WRITE)
		// ASSERT: rtPtr->mode & TCL_WRITABLE

		bufObj = XTcl_NewByteArrayObj(tls, buf, toWrite)
		(*Tcl_Obj)(unsafe.Pointer(bufObj)).FrefCount++
		if sInvokeTclMethod1(tls, rtPtr, ts+33651, bufObj, uintptr(0), bp) != TCL_OK {
			*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
			XTcl_SetChannelError(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))

			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = bufObj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			} // Remove reference held from invoke
			return 0
		}

		*(*int32)(unsafe.Pointer(errorCodePtr)) = EOK

		bytev = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp /* resObj */)), bp+8)
		res = XTcl_WriteRaw(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent, bytev, *(*int32)(unsafe.Pointer(bp + 8 /* bytec */)))

		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = bufObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		} // Remove reference held from invoke

	}

	if res < 0 {
		*(*int32)(unsafe.Pointer(errorCodePtr)) = XTcl_GetErrno(tls)
		return 0
	}

	return 1
}

func sTransformDrain(tls *libc.TLS, rtPtr uintptr, errorCodePtr uintptr) int32 { /* tclIORTrans.c:3215:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var resObj uintptr at bp, 8

	// var bytec int32 at bp+8, 4
	// Number of returned bytes
	var bytev uintptr /* Array of returned bytes */

	/*
	 * Are we in the correct thread?
	 */

	{
		if sInvokeTclMethod1(tls, rtPtr, ts+37653, uintptr(0), uintptr(0), bp) != TCL_OK {
			XTcl_SetChannelError(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			} // Remove reference held from invoke
			*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
			return 0
		}

		bytev = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp /* resObj */)), bp+8)
		sResultAdd1(tls, rtPtr+80, bytev, *(*int32)(unsafe.Pointer(bp + 8 /* bytec */)))

		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		} // Remove reference held from invoke

	}

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).FreadIsDrained = 1
	return 1
}

func sTransformFlush(tls *libc.TLS, rtPtr uintptr, errorCodePtr uintptr, op int32) int32 { /* tclIORTrans.c:3263:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var resObj uintptr at bp, 8

	// var bytec int32 at bp+8, 4
	// Number of returned bytes
	var bytev uintptr // Array of returned bytes
	var res int32

	/*
	 * Are we in the correct thread?
	 */

	{
		if sInvokeTclMethod1(tls, rtPtr, ts+6023, uintptr(0), uintptr(0), bp) != TCL_OK {
			XTcl_SetChannelError(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			} // Remove reference held from invoke
			*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
			return 0
		}

		if op == FLUSH_WRITE {
			bytev = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp /* resObj */)), bp+8)
			res = XTcl_WriteRaw(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fparent, bytev, *(*int32)(unsafe.Pointer(bp + 8 /* bytec */)))
		} else {
			res = 0
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		} // Remove reference held from invoke

	}

	if res < 0 {
		*(*int32)(unsafe.Pointer(errorCodePtr)) = XTcl_GetErrno(tls)
		return 0
	}

	return 1
}

func sTransformClear(tls *libc.TLS, rtPtr uintptr) { /* tclIORTrans.c:3325:1: */
	// Are we in the correct thread?

	// ASSERT: rtPtr->method & FLAG(METH_READ)
	// ASSERT: rtPtr->mode & TCL_READABLE

	sInvokeTclMethod1(tls, rtPtr, ts+37647, uintptr(0), uintptr(0), uintptr(0))

	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).FreadIsDrained = 0
	(*ReflectedTransform)(unsafe.Pointer(rtPtr)).FeofPending = 0
	sResultClear1(tls, rtPtr+80)
}

func sTransformLimit(tls *libc.TLS, rtPtr uintptr, errorCodePtr uintptr, maxPtr uintptr) int32 { /* tclIORTrans.c:3352:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var resObj uintptr at bp, 8

	var sr Tcl_InterpState // State of handler interp

	// Are we in the correct thread?

	// ASSERT: rtPtr->method & FLAG(METH_WRITE)
	// ASSERT: rtPtr->mode & TCL_WRITABLE

	if sInvokeTclMethod1(tls, rtPtr, ts+37659, uintptr(0), uintptr(0), bp) != TCL_OK {
		XTcl_SetChannelError(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan, *(*uintptr)(unsafe.Pointer(bp /* resObj */)))
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		} // Remove reference held from invoke
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
		return 0
	}

	sr = XTcl_SaveInterpState(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, 0)

	if XTcl_GetIntFromObj(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, *(*uintptr)(unsafe.Pointer(bp)), maxPtr) != TCL_OK {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		} // Remove reference held from invoke
		XTcl_SetChannelError(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Fchan, sMarshallError1(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp))
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL

		XTcl_RestoreInterpState(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, sr)
		return 0
	}

	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	} // Remove reference held from invoke
	XTcl_RestoreInterpState(tls, (*ReflectedTransform)(unsafe.Pointer(rtPtr)).Finterp, sr)
	return 1
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// On Windows, we need to do proper Unicode->UTF-8 conversion.

type ThreadSpecificData4 = struct {
	Finitialized int32
	F__ccgo_pad1 [4]byte
	FerrorMsg    Tcl_DString
}                              /* tclIOSock.c:20:3 */
var dataKey4 Tcl_ThreadDataKey /* tclIOSock.c:21:26: */

func gai_strerror(tls *libc.TLS, code int32) uintptr { /* tclIOSock.c:24:19: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey4)), int32(unsafe.Sizeof(ThreadSpecificData4{})))

	if (*ThreadSpecificData4)(unsafe.Pointer(tsdPtr)).Finitialized != 0 {
		XTcl_DStringFree(tls, tsdPtr+8)
	} else {
		(*ThreadSpecificData4)(unsafe.Pointer(tsdPtr)).Finitialized = 1
	}
	XTcl_WinTCharToUtf(tls, libc.Xgai_strerrorW(tls, code), -1, tsdPtr+8)
	return (*Tcl_DString)(unsafe.Pointer(tsdPtr + 8)).Fstring
}

//---------------------------------------------------------------------------
//
// TclSockGetPort --
//
//	Maps from a string, which could be a service name, to a port. Used by
//	socket creation code to get port numbers and resolve registered
//	service names to port numbers.
//
// Results:
//	A standard Tcl result. On success, the port number is returned in
//	portPtr. On failure, an error message is left in the interp's result.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclSockGetPort(tls *libc.TLS, interp uintptr, string uintptr, proto uintptr, portPtr uintptr) int32 { /* tclIOSock.c:57:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var sp uintptr // Protocol info for named services
	// var ds Tcl_DString at bp, 216

	var native uintptr

	if XTcl_GetInt(tls, uintptr(0), string, portPtr) != TCL_OK {
		// Don't bother translating 'proto' to native.

		native = XTcl_UtfToExternalDString(tls, uintptr(0), string, -1, bp)
		sp = libc.Xgetservbyname(tls, native, proto) // INTL: Native.
		XTcl_DStringFree(tls, bp)
		if sp != uintptr(0) {
			*(*int32)(unsafe.Pointer(portPtr)) = int32(libc.Xntohs(tls, uint16((*Servent)(unsafe.Pointer(sp)).Fs_port)))
			return TCL_OK
		}
	}
	if XTcl_GetInt(tls, interp, string, portPtr) != TCL_OK {
		return TCL_ERROR
	}
	if *(*int32)(unsafe.Pointer(portPtr)) > 0xFFFF {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+38025, -1))
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclSockMinimumBuffers --
//
//	Ensure minimum buffer sizes (non zero).
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Sets SO_SNDBUF and SO_RCVBUF sizes.
//
//----------------------------------------------------------------------

func XTclSockMinimumBuffers(tls *libc.TLS, sock uintptr, size int32) int32 { /* tclIOSock.c:112:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)
	*(*int32)(unsafe.Pointer(bp + 8)) = size

	// var current int32 at bp, 4

	// var len int32 at bp+4, 4

	*(*int32)(unsafe.Pointer(bp + 4 /* len */)) = int32(unsafe.Sizeof(int32(0)))
	libc.Xgetsockopt(tls, SOCKET(sock), SOL_SOCKET, SO_SNDBUF,
		bp, bp+4)
	if *(*int32)(unsafe.Pointer(bp)) < *(*int32)(unsafe.Pointer(bp + 8)) {
		*(*int32)(unsafe.Pointer(bp + 4 /* len */)) = int32(unsafe.Sizeof(int32(0)))
		libc.Xsetsockopt(tls, SOCKET(sock), SOL_SOCKET, SO_SNDBUF,
			bp+8, *(*int32)(unsafe.Pointer(bp + 4 /* len */)))
	}
	*(*int32)(unsafe.Pointer(bp + 4 /* len */)) = int32(unsafe.Sizeof(int32(0)))
	libc.Xgetsockopt(tls, SOCKET(sock), SOL_SOCKET, SO_RCVBUF,
		bp, bp+4)
	if *(*int32)(unsafe.Pointer(bp)) < *(*int32)(unsafe.Pointer(bp + 8)) {
		*(*int32)(unsafe.Pointer(bp + 4 /* len */)) = int32(unsafe.Sizeof(int32(0)))
		libc.Xsetsockopt(tls, SOCKET(sock), SOL_SOCKET, SO_RCVBUF,
			bp+8, *(*int32)(unsafe.Pointer(bp + 4 /* len */)))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCreateSocketAddress --
//
//	This function initializes a sockaddr structure for a host and port.
//
// Results:
//	1 if the host was valid, 0 if the host could not be converted to an IP
//	address.
//
// Side effects:
//	Fills in the *sockaddrPtr structure.
//
//----------------------------------------------------------------------

func XTclCreateSocketAddress(tls *libc.TLS, interp uintptr, addrlist uintptr, host uintptr, port int32, willBind int32, errorMsgPtr uintptr) int32 { /* tclIOSock.c:156:1: */
	bp := tls.Alloc(288)
	defer tls.Free(288)

	// var hints Addrinfo at bp+240, 48

	var p uintptr
	var v4head uintptr = uintptr(0)
	var v4ptr uintptr = uintptr(0)
	var v6head uintptr = uintptr(0)
	var v6ptr uintptr = uintptr(0)
	var native uintptr = uintptr(0)
	// var portbuf [24]int8 at bp+216, 24

	var portstring uintptr
	var family uintptr = uintptr(0)
	// var ds Tcl_DString at bp, 216

	var result int32

	if host != uintptr(0) {
		native = XTcl_UtfToExternalDString(tls, uintptr(0), host, -1, bp)
	}

	// Workaround for OSX's apparent inability to resolve "localhost", "0"
	// when the loopback device is the only available network interface.
	if host != uintptr(0) && port == 0 {
		portstring = uintptr(0)
	} else {
		XTclFormatInt(tls, bp+216, int32(port))
		portstring = bp + 216 /* &portbuf[0] */
	}

	libc.Xmemset(tls, bp+240, 0, uint64(unsafe.Sizeof(Addrinfo{})))
	(*Addrinfo)(unsafe.Pointer(bp + 240 /* &hints */)).Fai_family = AF_UNSPEC

	// Magic variable to enforce a certain address family - to be superseded
	// by a TIP that adds explicit switches to [socket]

	if interp != uintptr(0) {
		family = XTcl_GetVar2(tls, interp, ts+38068, uintptr(0), 0)
		if family != uintptr(0) {
			if libc.Xstrcmp(tls, family, ts+38097) == 0 {
				(*Addrinfo)(unsafe.Pointer(bp + 240 /* &hints */)).Fai_family = AF_INET
			} else if libc.Xstrcmp(tls, family, ts+38102) == 0 {
				(*Addrinfo)(unsafe.Pointer(bp + 240 /* &hints */)).Fai_family = AF_INET6
			}
		}
	}

	(*Addrinfo)(unsafe.Pointer(bp + 240 /* &hints */)).Fai_socktype = SOCK_STREAM

	if willBind != 0 {
		*(*int32)(unsafe.Pointer(bp + 240)) |= AI_PASSIVE
	}

	result = libc.XWspiapiGetAddrInfo(tls, native, portstring, bp+240, addrlist)

	if host != uintptr(0) {
		XTcl_DStringFree(tls, bp)
	}

	if result != 0 {
		*(*uintptr)(unsafe.Pointer(errorMsgPtr)) = gai_strerror(tls, result)
		return 0
	}

	// Put IPv4 addresses before IPv6 addresses to maximize backwards
	// compatibility of [fconfigure -sockname] output.
	//
	// There might be more elegant/efficient ways to do this.
	if willBind != 0 {
		for p = *(*uintptr)(unsafe.Pointer(addrlist)); p != uintptr(0); p = (*Addrinfo)(unsafe.Pointer(p)).Fai_next {
			if (*Addrinfo)(unsafe.Pointer(p)).Fai_family == AF_INET {
				if v4head == uintptr(0) {
					v4head = p
				} else {
					(*Addrinfo)(unsafe.Pointer(v4ptr)).Fai_next = p
				}
				v4ptr = p
			} else {
				if v6head == uintptr(0) {
					v6head = p
				} else {
					(*Addrinfo)(unsafe.Pointer(v6ptr)).Fai_next = p
				}
				v6ptr = p
			}
		}
		*(*uintptr)(unsafe.Pointer(addrlist)) = uintptr(0)
		if v6head != uintptr(0) {
			*(*uintptr)(unsafe.Pointer(addrlist)) = v6head
			(*Addrinfo)(unsafe.Pointer(v6ptr)).Fai_next = uintptr(0)
		}
		if v4head != uintptr(0) {
			(*Addrinfo)(unsafe.Pointer(v4ptr)).Fai_next = *(*uintptr)(unsafe.Pointer(addrlist))
			*(*uintptr)(unsafe.Pointer(addrlist)) = v4head
		}
	}
	return 1
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// struct FilesystemRecord --
//
// A filesystem record is used to keep track of each filesystem currently
// registered with the core, in a linked list.

type FilesystemRecord1 = struct {
	FclientData ClientData
	FfsPtr      uintptr
	FnextPtr    uintptr
	FprevPtr    uintptr
} /* tclIOUtil.c:40:9 */

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// struct FilesystemRecord --
//
// A filesystem record is used to keep track of each filesystem currently
// registered with the core, in a linked list.

type FilesystemRecord = FilesystemRecord1 /* tclIOUtil.c:50:3 */

// This structure holds per-thread private copy of the current directory
// maintained by the global cwdPathPtr. This structure holds per-thread
// private copies of some global data. This way we avoid most of the
// synchronization calls which boosts performance, at cost of having to update
// this information each time the corresponding epoch counter changes.

type ThreadSpecificData5 = struct {
	Finitialized     int32
	F__ccgo_pad1     [4]byte
	FcwdPathEpoch    Size_t
	FfilesystemEpoch Size_t
	FcwdPathPtr      uintptr
	FcwdClientData   ClientData
	FfilesystemList  uintptr
	Fclaims          Size_t
} /* tclIOUtil.c:68:3 */

// Define the native filesystem dispatch table. If necessary, it is ok to make
// this non-static, but it should only be accessed by the functions actually
// listed within it (or perhaps other helper functions of them). Anything
// which is not part of this 'native filesystem implementation' should not be
// delving inside here!

var XtclNativeFilesystem = Tcl_Filesystem{
	FtypeName:                 ts + 38108,
	FstructureLength:          int32(unsafe.Sizeof(Tcl_Filesystem{})),
	Fversion:                  uintptr(0x2),
	FpathInFilesystemProc:     0,
	FdupInternalRepProc:       0,
	FfreeInternalRepProc:      0,
	FinternalToNormalizedProc: 0,
	FcreateInternalRepProc:    0,
	FnormalizePathProc:        0,
	FfilesystemPathTypeProc:   0,
	FfilesystemSeparatorProc:  0,
	FstatProc:                 0,
	FaccessProc:               0,
	FopenFileChannelProc:      0,
	FmatchInDirectoryProc:     0,
	FutimeProc:                0,
	FlinkProc:                 0,
	FlistVolumesProc:          0,
	FfileAttrStringsProc:      0,
	FfileAttrsGetProc:         0,
	FfileAttrsSetProc:         0,
	FcreateDirectoryProc:      0,
	FremoveDirectoryProc:      0,
	FdeleteFileProc:           0,
	FcopyFileProc:             0,
	FrenameFileProc:           0,
	FcopyDirectoryProc:        0,
	FlstatProc:                0,
	// Needs casts since we're using version_2.
	FloadFileProc: 0,
	FgetCwdProc:   0,
	FchdirProc:    0,
} /* tclIOUtil.c:153:22 */

// Define the tail of the linked list. Note that for unconventional uses of
// Tcl without a native filesystem, we may in the future wish to modify the
// current approach of hard-coding the native filesystem in the lookup list
// 'filesystemList' below.
//
// We initialize the record so that it thinks one file uses it. This means it
// will never be freed.

var nativeFilesystemRecord = FilesystemRecord{
	FfsPtr: 0,
} /* tclIOUtil.c:202:25 */

// This is incremented each time we modify the linked list of filesystems. Any
// time it changes, all cached filesystem representations are suspect and must
// be freed. For multithreading builds, change of the filesystem epoch will
// trigger cache cleanup in all threads.

var theFilesystemEpoch Size_t = uint64(1) /* tclIOUtil.c:216:15 */

// Stores the linked list of filesystems. A 1:1 copy of this list is also
// maintained in the TSD for each thread. This is to avoid synchronization
// issues.

var filesystemList uintptr = 0 /* tclIOUtil.c:224:25 */

// Used to implement Tcl_FSGetCwd in a file-system independent way.

var cwdPathPtr uintptr = uintptr(0)       /* tclIOUtil.c:231:16 */
var cwdPathEpoch Size_t = uint64(0)       /* tclIOUtil.c:232:15 */
var cwdClientData ClientData = uintptr(0) /* tclIOUtil.c:233:19 */

var fsDataKey Tcl_ThreadDataKey /* tclIOUtil.c:236:26: */

// One of these structures is used each time we successfully load a file from
// a file system by way of making a temporary copy of the file on the native
// filesystem. We need to store both the actual unloadProc/clientData
// combination which was used, and the original and modified filenames, so
// that we can correctly undo the entire operation when we want to unload the
// code.

type FsDivertLoad1 = struct {
	FloadHandle            Tcl_LoadHandle
	FunloadProcPtr         uintptr
	FdivertedFile          uintptr
	FdivertedFilesystem    uintptr
	FdivertedFileNativeRep ClientData
} /* tclIOUtil.c:247:9 */

// One of these structures is used each time we successfully load a file from
// a file system by way of making a temporary copy of the file on the native
// filesystem. We need to store both the actual unloadProc/clientData
// combination which was used, and the original and modified filenames, so
// that we can correctly undo the entire operation when we want to unload the
// code.

type FsDivertLoad = FsDivertLoad1 /* tclIOUtil.c:253:3 */

// The following functions are obsolete string based APIs, and should be
// removed in a future release (Tcl 9 would be a good time).

// Obsolete
func XTcl_Stat(tls *libc.TLS, path uintptr, oldStyleBuf uintptr) int32 { /* tclIOUtil.c:262:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var ret int32
	// var buf Tcl_StatBuf at bp, 56

	var pathPtr uintptr = XTcl_NewStringObj(tls, path, -1)

	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount++
	ret = XTcl_FSStat(tls, pathPtr, bp)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = pathPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if ret != -1 {
		var tmp1 Tcl_WideInt
		var tmp2 Tcl_WideInt
		var tmp3 Tcl_WideInt = int64(0)

		// Perform the result-buffer overflow check manually.
		//
		// Note that ino_t/ino64_t is unsigned...
		//
		// Workaround gcc warning of "comparison is always false due to
		// limited range of data type" by assigning to tmp var of type
		// Tcl_WideInt.

		tmp1 = Tcl_WideInt((*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_ino)
		tmp2 = (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_size

		if Tcl_WideUInt(tmp1) > uint64(uint32(0x7fffffff)*2+1) || (tmp2 < Tcl_WideInt(-0x7fffffff-1) || tmp2 > Tcl_WideInt(0x7fffffff)) || (tmp3 < Tcl_WideInt(-0x7fffffff-1) || tmp3 > Tcl_WideInt(0x7fffffff)) {
			*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EFBIG
			return -1
		}

		// Copy across all supported fields, with possible type coercions on
		// those fields that change between the normal and lf64 versions of
		// the stat structure (on Solaris at least). This is slow when the
		// structure sizes coincide, but that's what you get for using an
		// obsolete interface.

		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_mode = (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_mode
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_ino = (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_ino
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_dev = (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_dev
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_rdev = (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_rdev
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_nlink = (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_nlink
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_uid = (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_uid
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_gid = (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_gid
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_size = (*Tcl_StatBuf)(unsafe.Pointer(bp /* &buf */)).Fst_size
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_atime = XTcl_GetAccessTimeFromStat(tls, bp)
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_mtime = XTcl_GetModificationTimeFromStat(tls, bp)
		(*X_stat64)(unsafe.Pointer(oldStyleBuf)).Fst_ctime = XTcl_GetChangeTimeFromStat(tls, bp)
	}
	return ret
}

// Obsolete
func XTcl_Access(tls *libc.TLS, path uintptr, mode int32) int32 { /* tclIOUtil.c:349:1: */
	var ret int32
	var pathPtr uintptr = XTcl_NewStringObj(tls, path, -1)

	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount++
	ret = XTcl_FSAccess(tls, pathPtr, mode)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = pathPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return ret
}

// Obsolete
func XTcl_OpenFileChannel(tls *libc.TLS, interp uintptr, path uintptr, modeString uintptr, permissions int32) Tcl_Channel { /* tclIOUtil.c:365:1: */
	var ret Tcl_Channel
	var pathPtr uintptr = XTcl_NewStringObj(tls, path, -1)

	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount++
	ret = XTcl_FSOpenFileChannel(tls, interp, pathPtr, modeString, permissions)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = pathPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return ret
}

// Obsolete
func XTcl_Chdir(tls *libc.TLS, dirName uintptr) int32 { /* tclIOUtil.c:386:1: */
	var ret int32
	var pathPtr uintptr = XTcl_NewStringObj(tls, dirName, -1)
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount++
	ret = XTcl_FSChdir(tls, pathPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = pathPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return ret
}

// Obsolete
func XTcl_GetCwd(tls *libc.TLS, interp uintptr, cwdPtr uintptr) uintptr { /* tclIOUtil.c:398:6: */
	var cwd uintptr = XTcl_FSGetCwd(tls, interp)

	if cwd == uintptr(0) {
		return uintptr(0)
	}
	XTcl_DStringInit(tls, cwdPtr)
	XTclDStringAppendObj(tls, cwdPtr, cwd)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = cwd
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return (*Tcl_DString)(unsafe.Pointer(cwdPtr)).Fstring
}

func XTcl_EvalFile(tls *libc.TLS, interp uintptr, fileName uintptr) int32 { /* tclIOUtil.c:415:1: */
	var ret int32
	var pathPtr uintptr = XTcl_NewStringObj(tls, fileName, -1)

	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount++
	ret = XTcl_FSEvalFile(tls, interp, pathPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = pathPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return ret
}

// Now move on to the basic filesystem implementation.

func sFsThrExitProc(tls *libc.TLS, cd ClientData) { /* tclIOUtil.c:434:1: */
	var tsdPtr uintptr = cd
	var fsRecPtr uintptr = uintptr(0)
	var tmpFsRecPtr uintptr = uintptr(0)

	// Trash the cwd copy.

	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr = uintptr(0)
	}
	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData != uintptr(0) {
		sNativeFreeInternalRep(tls, (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData)
	}

	// Trash the filesystems cache.

	fsRecPtr = (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FfilesystemList
	for fsRecPtr != uintptr(0) {
		tmpFsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
		(*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr = uintptr(0)
		XTclpFree(tls, fsRecPtr)
		fsRecPtr = tmpFsRecPtr
	}
	(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FfilesystemList = uintptr(0)
	(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).Finitialized = 0
}

func XTclFSCwdIsNative(tls *libc.TLS) int32 { /* tclIOUtil.c:468:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))

	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData != uintptr(0) {
		return 1
	} else {
		return 0
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// TclFSCwdPointerEquals --
//
//	Check whether the current working directory is equal to the path
//	given.
//
// Results:
//	1 (equal) or 0 (un-equal) as appropriate.
//
// Side effects:
//	If the paths are equal, but are not the same object, this method will
//	modify the given pathPtrPtr to refer to the same object. In this case
//	the object pointed to by pathPtrPtr will have its refCount
//	decremented, and it will be adjusted to point to the cwd (with a new
//	refCount).
//
//----------------------------------------------------------------------

func XTclFSCwdPointerEquals(tls *libc.TLS, pathPtrPtr uintptr) int32 { /* tclIOUtil.c:501:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))

	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr == uintptr(0) ||
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathEpoch != cwdPathEpoch {
		if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr != uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData != uintptr(0) {
			sNativeFreeInternalRep(tls, (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData)
		}
		if cwdPathPtr == uintptr(0) {
			(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr = uintptr(0)
		} else {
			(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr = XTcl_DuplicateObj(tls, cwdPathPtr)
			(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr)).FrefCount++
		}
		if cwdClientData == uintptr(0) {
			(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData = uintptr(0)
		} else {
			(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData = XTclNativeDupInternalRep(tls, cwdClientData)
		}
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathEpoch = cwdPathEpoch
	}

	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).Finitialized == 0 {
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFsThrExitProc})), tsdPtr)
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).Finitialized = 1
	}

	if pathPtrPtr == uintptr(0) {
		return libc.Bool32((*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr == uintptr(0))
	}

	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr == *(*uintptr)(unsafe.Pointer(pathPtrPtr)) {
		return 1
	} else {
		// var len1 int32 at bp, 4

		// var len2 int32 at bp+4, 4

		var str1 uintptr
		var str2 uintptr

		str1 = XTcl_GetStringFromObj(tls, (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr, bp)
		str2 = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(pathPtrPtr)), bp+4)
		if *(*int32)(unsafe.Pointer(bp)) == *(*int32)(unsafe.Pointer(bp + 4)) && !(libc.Xmemcmp(tls, str1, str2, uint64(*(*int32)(unsafe.Pointer(bp)))) != 0) {
			// They are equal, but different objects. Update so they will be
			// the same object in the future.

			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(pathPtrPtr))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			*(*uintptr)(unsafe.Pointer(pathPtrPtr)) = (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtrPtr)))).FrefCount++
			return 1
		} else {
			return 0
		}
	}
	return int32(0)
}

func sFsRecacheFilesystemList(tls *libc.TLS) { /* tclIOUtil.c:564:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))
	var fsRecPtr uintptr
	var tmpFsRecPtr uintptr = uintptr(0)
	var toFree uintptr = uintptr(0)
	var list uintptr

	// Trash the current cache.

	fsRecPtr = (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FfilesystemList
	for fsRecPtr != uintptr(0) {
		tmpFsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
		(*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr = toFree
		toFree = fsRecPtr
		fsRecPtr = tmpFsRecPtr
	}

	// Locate tail of the global filesystem list.

	fsRecPtr = filesystemList
	for fsRecPtr != uintptr(0) {
		tmpFsRecPtr = fsRecPtr
		fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
	}

	// Refill the cache honouring the order.

	list = uintptr(0)
	fsRecPtr = tmpFsRecPtr
	for fsRecPtr != uintptr(0) {
		tmpFsRecPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FilesystemRecord{})))
		*(*FilesystemRecord)(unsafe.Pointer(tmpFsRecPtr)) = *(*FilesystemRecord)(unsafe.Pointer(fsRecPtr))
		(*FilesystemRecord)(unsafe.Pointer(tmpFsRecPtr)).FnextPtr = list
		(*FilesystemRecord)(unsafe.Pointer(tmpFsRecPtr)).FprevPtr = uintptr(0)
		list = tmpFsRecPtr
		fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FprevPtr
	}
	(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FfilesystemList = list
	(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FfilesystemEpoch = theFilesystemEpoch

	for toFree != 0 {
		var next uintptr = (*FilesystemRecord)(unsafe.Pointer(toFree)).FnextPtr
		(*FilesystemRecord)(unsafe.Pointer(toFree)).FfsPtr = uintptr(0)
		XTclpFree(tls, toFree)
		toFree = next
	}

	// Make sure the above gets released on thread exit.

	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).Finitialized == 0 {
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFsThrExitProc})), tsdPtr)
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).Finitialized = 1
	}
}

func sFsGetFirstFilesystem(tls *libc.TLS) uintptr { /* tclIOUtil.c:627:25: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))
	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FfilesystemList == uintptr(0) || (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).Fclaims == uint64(0) &&
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FfilesystemEpoch != theFilesystemEpoch {
		sFsRecacheFilesystemList(tls)
	}
	return (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FfilesystemList
}

// The epoch can be changed by filesystems being added or removed, by changing
// the "system encoding" and by env(HOME) changing.

func XTclFSEpochOk(tls *libc.TLS, filesystemEpoch Size_t) int32 { /* tclIOUtil.c:644:1: */
	return libc.Bool32(filesystemEpoch == uint64(0) || filesystemEpoch == theFilesystemEpoch)
}

func sClaim(tls *libc.TLS) { /* tclIOUtil.c:651:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))

	(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).Fclaims++
}

func sDisclaim(tls *libc.TLS) { /* tclIOUtil.c:659:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))

	(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).Fclaims--
}

func XTclFSEpoch(tls *libc.TLS) Size_t { /* tclIOUtil.c:667:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))

	return (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FfilesystemEpoch
}

// If non-NULL, clientData is owned by us and must be freed later.

func sFsUpdateCwd(tls *libc.TLS, cwdObj uintptr, clientData ClientData) { /* tclIOUtil.c:680:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var len int32 at bp, 4

	var str uintptr = uintptr(0)
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))

	if cwdObj != uintptr(0) {
		str = XTcl_GetStringFromObj(tls, cwdObj, bp)
	}

	if cwdPathPtr != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = cwdPathPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if cwdClientData != uintptr(0) {
		sNativeFreeInternalRep(tls, cwdClientData)
	}

	if cwdObj == uintptr(0) {
		cwdPathPtr = uintptr(0)
		cwdClientData = uintptr(0)
	} else {
		// This must be stored as string obj!

		cwdPathPtr = XTcl_NewStringObj(tls, str, *(*int32)(unsafe.Pointer(bp /* len */)))
		(*Tcl_Obj)(unsafe.Pointer(cwdPathPtr)).FrefCount++
		cwdClientData = XTclNativeDupInternalRep(tls, clientData)
	}

	if libc.PreIncUint64(&cwdPathEpoch, 1) == uint64(0) {
		cwdPathEpoch++
	}
	(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathEpoch = cwdPathEpoch

	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData != 0 {
		sNativeFreeInternalRep(tls, (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData)
	}

	if cwdObj == uintptr(0) {
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr = uintptr(0)
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData = uintptr(0)
	} else {
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr = XTcl_NewStringObj(tls, str, *(*int32)(unsafe.Pointer(bp /* len */)))
		(*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData = clientData
		(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr)).FrefCount++
	}
}

//----------------------------------------------------------------------
//
// TclFinalizeFilesystem --
//
//	Clean up the filesystem. After this, calls to all Tcl_FS... functions
//	will fail.
//
//	We will later call TclResetFilesystem to restore the FS to a pristine
//	state.
//
// Results:
//	None.
//
// Side effects:
//	Frees any memory allocated by the filesystem.
//
//----------------------------------------------------------------------

func XTclFinalizeFilesystem(tls *libc.TLS) { /* tclIOUtil.c:757:1: */
	var fsRecPtr uintptr

	// Assumption that only one thread is active now. Otherwise we would need
	// to put various mutexes around this code.

	if cwdPathPtr != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = cwdPathPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		cwdPathPtr = uintptr(0)
		cwdPathEpoch = uint64(0)
	}
	if cwdClientData != uintptr(0) {
		sNativeFreeInternalRep(tls, cwdClientData)
		cwdClientData = uintptr(0)
	}

	// Remove all filesystems, freeing any allocated memory that is no longer
	// needed.

	fsRecPtr = filesystemList
	for fsRecPtr != uintptr(0) {
		var tmpFsRecPtr uintptr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr

		// The native filesystem is static, so we don't free it.

		if fsRecPtr != uintptr(unsafe.Pointer(&nativeFilesystemRecord)) {
			XTclpFree(tls, fsRecPtr)
		}
		fsRecPtr = tmpFsRecPtr
	}
	if libc.PreIncUint64(&theFilesystemEpoch, 1) == uint64(0) {
		theFilesystemEpoch++
	}
	filesystemList = uintptr(0)

	// Now filesystemList is NULL. This means that any attempt to use the
	// filesystem is likely to fail.

	XTclWinEncodingsCleanup(tls)
}

//----------------------------------------------------------------------
//
// TclResetFilesystem --
//
//	Restore the filesystem to a pristine state.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclResetFilesystem(tls *libc.TLS) { /* tclIOUtil.c:824:1: */
	filesystemList = uintptr(unsafe.Pointer(&nativeFilesystemRecord))
	if libc.PreIncUint64(&theFilesystemEpoch, 1) == uint64(0) {
		theFilesystemEpoch++
	}

	// Cleans up the win32 API filesystem proc lookup table. This must happen
	// very late in finalization so that deleting of copied dlls can occur.

	XTclWinResetInterfaces(tls)
}

//----------------------------------------------------------------------
//
// Tcl_FSRegister --
//
//	Insert the filesystem function table at the head of the list of
//	functions which are used during calls to all file-system operations.
//	The filesystem will be added even if it is already in the list. (You
//	can use Tcl_FSData to check if it is in the list, provided the
//	ClientData used was not NULL).
//
//	Note that the filesystem handling is head-to-tail of the list. Each
//	filesystem is asked in turn whether it can handle a particular
//	request, until one of them says 'yes'. At that point no further
//	filesystems are asked.
//
//	In particular this means if you want to add a diagnostic filesystem
//	(which simply reports all fs activity), it must be at the head of the
//	list: i.e. it must be the last registered.
//
// Results:
//	Normally TCL_OK; TCL_ERROR if memory for a new node in the list could
//	not be allocated.
//
// Side effects:
//	Memory allocated and modifies the link list for filesystems.
//
//----------------------------------------------------------------------

func XTcl_FSRegister(tls *libc.TLS, clientData ClientData, fsPtr uintptr) int32 { /* tclIOUtil.c:872:1: */
	var newFilesystemPtr uintptr

	if fsPtr == uintptr(0) {
		return TCL_ERROR
	}

	newFilesystemPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FilesystemRecord{})))

	(*FilesystemRecord)(unsafe.Pointer(newFilesystemPtr)).FclientData = clientData
	(*FilesystemRecord)(unsafe.Pointer(newFilesystemPtr)).FfsPtr = fsPtr

	// Is this lock and wait strictly speaking necessary? Since any iterators
	// out there will have grabbed a copy of the head of the list and be
	// iterating away from that, if we add a new element to the head of the
	// list, it can't possibly have any effect on any of their loops. In fact
	// it could be better not to wait, since we are adjusting the filesystem
	// epoch, any cached representations calculated by existing iterators are
	// going to have to be thrown away anyway.
	//
	// However, since registering and unregistering filesystems is a very rare
	// action, this is not a very important point.

	(*FilesystemRecord)(unsafe.Pointer(newFilesystemPtr)).FnextPtr = filesystemList
	(*FilesystemRecord)(unsafe.Pointer(newFilesystemPtr)).FprevPtr = uintptr(0)
	if filesystemList != 0 {
		(*FilesystemRecord)(unsafe.Pointer(filesystemList)).FprevPtr = newFilesystemPtr
	}
	filesystemList = newFilesystemPtr

	// Increment the filesystem epoch counter, since existing paths might
	// conceivably now belong to different filesystems.

	if libc.PreIncUint64(&theFilesystemEpoch, 1) == uint64(0) {
		theFilesystemEpoch++
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_FSUnregister --
//
//	Remove the passed filesystem from the list of filesystem function
//	tables. It also ensures that the built-in (native) filesystem is not
//	removable, although we may wish to change that decision in the future
//	to allow a smaller Tcl core, in which the native filesystem is not
//	used at all (we could, say, initialise Tcl completely over a network
//	connection).
//
// Results:
//	TCL_OK if the function pointer was successfully removed, TCL_ERROR
//	otherwise.
//
// Side effects:
//	Memory may be deallocated (or will be later, once no "path" objects
//	refer to this filesystem), but the list of registered filesystems is
//	updated immediately.
//
//----------------------------------------------------------------------

func XTcl_FSUnregister(tls *libc.TLS, fsPtr uintptr) int32 { /* tclIOUtil.c:947:1: */
	var retVal int32 = TCL_ERROR
	var fsRecPtr uintptr

	// Traverse the 'filesystemList' looking for the particular node whose
	// 'fsPtr' member matches 'fsPtr' and remove that one from the list.
	// Ensure that the "default" node cannot be removed.

	fsRecPtr = filesystemList
	for retVal == TCL_ERROR && fsRecPtr != uintptr(unsafe.Pointer(&nativeFilesystemRecord)) {
		if (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr == fsPtr {
			if (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FprevPtr != 0 {
				(*FilesystemRecord1)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FprevPtr)).FnextPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
			} else {
				filesystemList = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
			}
			if (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr != 0 {
				(*FilesystemRecord1)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr)).FprevPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FprevPtr
			}

			// Increment the filesystem epoch counter, since existing paths
			// might conceivably now belong to different filesystems. This
			// should also ensure that paths which have cached the filesystem
			// which is about to be deleted do not reference that filesystem
			// (which would of course lead to memory exceptions).

			if libc.PreIncUint64(&theFilesystemEpoch, 1) == uint64(0) {
				theFilesystemEpoch++
			}

			XTclpFree(tls, fsRecPtr)

			retVal = TCL_OK
		} else {
			fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
		}
	}

	return retVal
}

//----------------------------------------------------------------------
//
// Tcl_FSMatchInDirectory --
//
//	This routine is used by the globbing code to search a directory for
//	all files which match a given pattern. The appropriate function for
//	the filesystem to which pathPtr belongs will be called. If pathPtr
//	does not belong to any filesystem and if it is NULL or the empty
//	string, then we assume the pattern is to be matched in the current
//	working directory. To avoid have the Tcl_FSMatchInDirectoryProc for
//	each filesystem from having to deal with this issue, we create a
//	pathPtr on the fly (equal to the cwd), and then remove it from the
//	results returned. This makes filesystems easy to write, since they can
//	assume the pathPtr passed to them is an ordinary path. In fact this
//	means we could remove such special case handling from Tcl's native
//	filesystems.
//
//	If 'pattern' is NULL, then pathPtr is assumed to be a fully specified
//	path of a single file/directory which must be checked for existence
//	and correct type.
//
// Results:
//
//	The return value is a standard Tcl result indicating whether an error
//	occurred in globbing. Error messages are placed in interp, but good
//	results are placed in the resultPtr given.
//
//	Recursive searches, e.g.
//		glob -dir $dir -join * pkgIndex.tcl
//	which must recurse through each directory matching '*' are handled
//	internally by Tcl, by passing specific flags in a modified 'types'
//	parameter. This means the actual filesystem only ever sees patterns
//	which match in a single directory.
//
// Side effects:
//	The interpreter may have an error message inserted into it.
//
//----------------------------------------------------------------------

func XTcl_FSMatchInDirectory(tls *libc.TLS, interp uintptr, resultPtr uintptr, pathPtr uintptr, pattern uintptr, types1 uintptr) int32 { /* tclIOUtil.c:1039:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var fsPtr uintptr
	var cwd uintptr
	var tmpResultPtr uintptr
	// var elemsPtr uintptr at bp+8, 8

	// var resLength int32 at bp, 4

	var i int32
	var ret int32 = -1

	if types1 != uintptr(0) && (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype&(int32(1)<<7) != 0 {
		// We don't currently allow querying of mounts by external code (a
		// valuable future step), so since we're the only function that
		// actually knows about mounts, this means we're being called
		// recursively by ourself. Return no matches.

		return TCL_OK
	}

	if pathPtr != uintptr(0) {
		fsPtr = XTcl_FSGetFileSystemForPath(tls, pathPtr)
	} else {
		fsPtr = uintptr(0)
	}

	// Check if we've successfully mapped the path to a filesystem within
	// which to search.

	if fsPtr != uintptr(0) {
		if (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FmatchInDirectoryProc == uintptr(0) {
			XTcl_SetErrno(tls, ENOENT)
			return -1
		}
		ret = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FmatchInDirectoryProc})).f(tls, interp, resultPtr, pathPtr, pattern,
			types1)
		if ret == TCL_OK && pattern != uintptr(0) {
			sFsAddMountsToGlobResult(tls, resultPtr, pathPtr, pattern, types1)
		}
		return ret
	}

	// If the path isn't empty, we have no idea how to match files in a
	// directory which belongs to no known filesystem.

	if pathPtr != uintptr(0) && int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
		}
		return XTcl_GetString(tls, pathPtr)
	}()))) != 0 {
		XTcl_SetErrno(tls, ENOENT)
		return -1
	}

	// We have an empty or NULL path. This is defined to mean we must search
	// for files within the current 'cwd'. We therefore use that, but then
	// since the proc we call will return results which include the cwd we
	// must then trim it off the front of each path in the result. We choose
	// to deal with this here (in the generic code), since if we don't, every
	// single filesystem's implementation of Tcl_FSMatchInDirectory will have
	// to deal with it for us.

	cwd = XTcl_FSGetCwd(tls, uintptr(0))
	if cwd == uintptr(0) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+38115,
				-1))
		}
		return TCL_ERROR
	}

	fsPtr = XTcl_FSGetFileSystemForPath(tls, cwd)
	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FmatchInDirectoryProc != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			tmpResultPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).FtypePtr = uintptr(0)
		{
		}

		(*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).FrefCount++
		ret = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FmatchInDirectoryProc})).f(tls, interp, tmpResultPtr, cwd, pattern,
			types1)
		if ret == TCL_OK {
			sFsAddMountsToGlobResult(tls, tmpResultPtr, cwd, pattern, types1)

			// Note that we know resultPtr and tmpResultPtr are distinct.

			ret = XTcl_ListObjGetElements(tls, interp, tmpResultPtr,
				bp, bp+8)
			for i = 0; ret == TCL_OK && i < *(*int32)(unsafe.Pointer(bp /* resLength */)); i++ {
				ret = XTcl_ListObjAppendElement(tls, interp, resultPtr,
					XTclFSMakePathRelative(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* elemsPtr */)) + uintptr(i)*8)), cwd))
			}
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpResultPtr)).Flength = -1
				for ok1 := true; ok1; ok1 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(tmpResultPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = tmpResultPtr
				}
			} else {
				XTclFreeObj(tls, tmpResultPtr)
			}
		}

	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = cwd
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return ret
}

//----------------------------------------------------------------------
//
// FsAddMountsToGlobResult --
//
//	This routine is used by the globbing code to take the results of a
//	directory listing and add any mounted paths to that listing. This is
//	required so that simple things like 'glob *' merge mounts and listings
//	correctly.
//
// Results:
//	None.
//
// Side effects:
//	Modifies the resultPtr.
//
//----------------------------------------------------------------------

func sFsAddMountsToGlobResult(tls *libc.TLS, resultPtr uintptr, pathPtr uintptr, pattern uintptr, types1 uintptr) { /* tclIOUtil.c:1164:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var mLength int32 at bp, 4

	// var gLength int32 at bp+4, 4

	var i int32
	var dir int32
	var mounts uintptr
	// var gElt uintptr at bp+16, 8

	var path uintptr
	var mount uintptr
	var norm uintptr
	// var len int32 at bp+28, 4

	// var mlen int32 at bp+24, 4

	// var mElt uintptr at bp+8, 8

	var j int32
	var found int32
	var _objPtr uintptr
	dir = libc.Bool32(types1 == uintptr(0) || (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype&(int32(1)<<2) != 0)
	mounts = sFsListMounts(tls, pathPtr, pattern)

	if !(mounts == uintptr(0)) {
		goto __1
	}
	return
__1:
	;

	if !(XTcl_ListObjLength(tls, uintptr(0), mounts, bp) != TCL_OK || *(*int32)(unsafe.Pointer(bp)) == 0) {
		goto __2
	}
	goto endOfMounts
__2:
	;
	if !(XTcl_ListObjLength(tls, uintptr(0), resultPtr, bp+4) != TCL_OK) {
		goto __3
	}
	goto endOfMounts
__3:
	;
	i = 0
__4:
	if !(i < *(*int32)(unsafe.Pointer(bp))) {
		goto __6
	}
	found = 0

	XTcl_ListObjIndex(tls, uintptr(0), mounts, i, bp+8)

	j = 0
__7:
	if !(j < *(*int32)(unsafe.Pointer(bp + 4))) {
		goto __9
	}

	XTcl_ListObjIndex(tls, uintptr(0), resultPtr, j, bp+16)
	if !(XTcl_FSEqualPaths(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), *(*uintptr)(unsafe.Pointer(bp + 16))) != 0) {
		goto __10
	}
	found = 1
	if !!(dir != 0) {
		goto __11
	}
	// We don't want to list this.

	XTcl_ListObjReplace(tls, uintptr(0), resultPtr, j, 1, 0, uintptr(0))
	*(*int32)(unsafe.Pointer(bp + 4 /* gLength */))--
__11:
	;
	goto __9 // Break out of for loop.
__10:
	;
	goto __8
__8:
	j++
	goto __7
	goto __9
__9:
	;
	if !(!(found != 0) && dir != 0) {
		goto __12
	}

	// We know mElt is absolute normalized and lies inside pathPtr, so
	// now we must add to the result the right representation of mElt,
	// i.e. the representation which is relative to pathPtr.

	norm = XTcl_FSGetNormalizedPath(tls, uintptr(0), pathPtr)
	if !(norm != uintptr(0)) {
		goto __13
	}

	mount = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* mElt */)), bp+24)
	path = XTcl_GetStringFromObj(tls, norm, bp+28)
	if !(int32(*(*int8)(unsafe.Pointer(path + uintptr(*(*int32)(unsafe.Pointer(bp + 28))-1)))) == '/') {
		goto __14
	}
	// Deal with the root of the volume.

	*(*int32)(unsafe.Pointer(bp + 28 /* len */))--
__14:
	;
	*(*int32)(unsafe.Pointer(bp + 28 /* len */))++ // account for '/' in the mElt [Bug 1602539]
	*(*uintptr)(unsafe.Pointer(bp + 8 /* mElt */)) = XTclNewFSPathObj(tls, pathPtr, mount+uintptr(*(*int32)(unsafe.Pointer(bp + 28))), *(*int32)(unsafe.Pointer(bp + 24))-*(*int32)(unsafe.Pointer(bp + 28)))
	XTcl_ListObjAppendElement(tls, uintptr(0), resultPtr, *(*uintptr)(unsafe.Pointer(bp + 8 /* mElt */)))
__13:
	;
	// No need to increment gLength, since we don't want to compare
	// mounts against mounts.
__12:
	;
	goto __5
__5:
	i++
	goto __4
	goto __6
__6:
	;

endOfMounts:
__15:
	_objPtr = mounts
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __18
	}
	XTclFreeObj(tls, _objPtr)
__18:
	;
	goto __16
__16:
	if 0 != 0 {
		goto __15
	}
	goto __17
__17:
}

//----------------------------------------------------------------------
//
// Tcl_FSMountsChanged --
//
//	Notify the filesystem that the available mounted filesystems (or
//	within any one filesystem type, the number or location of mount
//	points) have changed.
//
// Results:
//	None.
//
// Side effects:
//	The global filesystem variable 'theFilesystemEpoch' is incremented.
//	The effect of this is to make all cached path representations invalid.
//	Clearly it should only therefore be called when it is really required!
//	There are a few circumstances when it should be called:
//
//	(1) when a new filesystem is registered or unregistered. Strictly
//	speaking this is only necessary if the new filesystem accepts file
//	paths as is (normally the filesystem itself is really a shell which
//	hasn't yet had any mount points established and so its
//	'pathInFilesystem' proc will always fail). However, for safety, Tcl
//	always calls this for you in these circumstances.
//
//	(2) when additional mount points are established inside any existing
//	filesystem (except the native fs)
//
//	(3) when any filesystem (except the native fs) changes the list of
//	available volumes.
//
//	(4) when the mapping from a string representation of a file to a full,
//	normalized path changes. For example, if 'env(HOME)' is modified, then
//	any path containing '~' will map to a different filesystem location.
//	Therefore all such paths need to have their internal representation
//	invalidated.
//
//	Tcl has no control over (2) and (3), so any registered filesystem must
//	make sure it calls this function when those situations occur.
//
//	(Note: the reason for the exception in 2,3 for the native filesystem
//	is that the native filesystem by default claims all unknown files even
//	if it really doesn't understand them or if they don't exist).
//
//----------------------------------------------------------------------

func XTcl_FSMountsChanged(tls *libc.TLS, fsPtr uintptr) { /* tclIOUtil.c:1297:1: */
	// We currently don't do anything with this parameter. We could in the
	// future only invalidate files for this filesystem or otherwise take more
	// advanced action.

	_ = fsPtr

	// Increment the filesystem epoch counter, since existing paths might now
	// belong to different filesystems.

	if libc.PreIncUint64(&theFilesystemEpoch, 1) == uint64(0) {
		theFilesystemEpoch++
	}

}

//----------------------------------------------------------------------
//
// Tcl_FSData --
//
//	Retrieve the clientData field for the filesystem given, or NULL if
//	that filesystem is not registered.
//
// Results:
//	A clientData value, or NULL. Note that if the filesystem was
//	registered with a NULL clientData field, this function will return
//	that NULL value.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FSData(tls *libc.TLS, fsPtr uintptr) ClientData { /* tclIOUtil.c:1340:1: */
	var retVal ClientData = uintptr(0)
	var fsRecPtr uintptr = sFsGetFirstFilesystem(tls)

	// Traverse the list of filesystems look for a particular one. If found,
	// return that filesystem's clientData (originally provided when calling
	// Tcl_FSRegister).

	for retVal == uintptr(0) && fsRecPtr != uintptr(0) {
		if (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr == fsPtr {
			retVal = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FclientData
		}
		fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
	}

	return retVal
}

//---------------------------------------------------------------------------
//
// TclFSNormalizeToUniquePath --
//
//	Takes a path specification containing no ../, ./ sequences, and
//	converts it into a unique path for the given platform. On Unix, this
//	means the path must be free of symbolic links/aliases, and on Windows
//	it means we want the long form, with that long form's case-dependence
//	(which gives us a unique, case-dependent path).
//
// Results:
//	The pathPtr is modified in place. The return value is the last byte
//	offset which was recognised in the path string.
//
// Side effects:
//	None (beyond the memory allocation for the result).
//
// Special notes:
//	If the filesystem-specific normalizePathProcs can re-introduce ../, ./
//	sequences into the path, then this function will not return the
//	correct result. This may be possible with symbolic links on unix.
//
//	Important assumption: if startAt is non-zero, it must point to a
//	directory separator that we know exists and is already normalized (so
//	it is important not to point to the char just after the separator).
//
//---------------------------------------------------------------------------

func XTclFSNormalizeToUniquePath(tls *libc.TLS, interp uintptr, pathPtr uintptr, startAt int32) int32 { /* tclIOUtil.c:1393:1: */
	var fsRecPtr uintptr
	var firstFsRecPtr uintptr

	// Call each of the "normalise path" functions in succession. This is a
	// special case, in which if we have a native filesystem handler, we call
	// it first. This is because the root of Tcl's filesystem is always a
	// native filesystem (i.e. '/' on unix is native).

	firstFsRecPtr = sFsGetFirstFilesystem(tls)

	sClaim(tls)
	for fsRecPtr = firstFsRecPtr; fsRecPtr != uintptr(0); fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr {
		if (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr != uintptr(unsafe.Pointer(&XtclNativeFilesystem)) {
			continue
		}

		// TODO: Assume that we always find the native file system; it should
		// always be there...

		if (*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FnormalizePathProc != uintptr(0) {
			startAt = (*struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FnormalizePathProc})).f(tls, interp, pathPtr,
				startAt)
		}
		break
	}

	for fsRecPtr = firstFsRecPtr; fsRecPtr != uintptr(0); fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr {
		// Skip the native system next time through.

		if (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr == uintptr(unsafe.Pointer(&XtclNativeFilesystem)) {
			continue
		}

		if (*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FnormalizePathProc != uintptr(0) {
			startAt = (*struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FnormalizePathProc})).f(tls, interp, pathPtr,
				startAt)
		}

		// We could add an efficiency check like this:
		//		if (retVal == length-of(pathPtr)) {break;}
		// but there's not much benefit.
	}
	sDisclaim(tls)

	return startAt
}

//---------------------------------------------------------------------------
//
// TclGetOpenMode --
//
//	This routine is an obsolete, limited version of TclGetOpenModeEx()
//	below. It exists only to satisfy any extensions imprudently using it
//	via Tcl's internal stubs table.
//
// Results:
//	Same as TclGetOpenModeEx().
//
// Side effects:
//	Same as TclGetOpenModeEx().
//
//---------------------------------------------------------------------------

func XTclGetOpenMode(tls *libc.TLS, interp uintptr, modeString uintptr, seekFlagPtr uintptr) int32 { /* tclIOUtil.c:1471:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	*(*int32)(unsafe.Pointer(bp /* binary */)) = 0
	return XTclGetOpenModeEx(tls, interp, modeString, seekFlagPtr, bp)
}

//---------------------------------------------------------------------------
//
// TclGetOpenModeEx --
//
//	Computes a POSIX mode mask for opening a file, from a given string,
//	and also sets flags to indicate whether the caller should seek to EOF
//	after opening the file, and whether the caller should configure the
//	channel for binary data.
//
// Results:
//	On success, returns mode to pass to "open". If an error occurs, the
//	return value is -1 and if interp is not NULL, sets interp's result
//	object to an error message.
//
// Side effects:
//	Sets the integer referenced by seekFlagPtr to 1 to tell the caller to
//	seek to EOF after opening the file, or to 0 otherwise. Sets the
//	integer referenced by binaryPtr to 1 to tell the caller to seek to
//	configure the channel for binary data, or to 0 otherwise.
//
// Special note:
//	This code is based on a prototype implementation contributed by Mark
//	Diekhans.
//
//---------------------------------------------------------------------------

func XTclGetOpenModeEx(tls *libc.TLS, interp uintptr, modeString uintptr, seekFlagPtr uintptr, binaryPtr uintptr) int32 { /* tclIOUtil.c:1511:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var mode int32
	// var modeArgc int32 at bp+32, 4

	var c int32
	var i int32
	var gotRW int32
	// var modeArgv uintptr at bp+40, 8

	var flag uintptr

	// Check for the simpler fopen-like access modes (e.g. "r"). They are
	// distinguished from the POSIX access modes by the presence of a
	// lower-case first letter.

	*(*int32)(unsafe.Pointer(seekFlagPtr)) = 0
	*(*int32)(unsafe.Pointer(binaryPtr)) = 0
	mode = 0

	// Guard against international characters before using byte oriented
	// routines.

	if !(!(int32(*(*int8)(unsafe.Pointer(modeString)))&0x80 != 0) &&
		libc.Xislower(tls, int32(uint8(*(*int8)(unsafe.Pointer(modeString))))) != 0) {
		goto __1
	} // INTL: ISO only.
	switch int32(*(*int8)(unsafe.Pointer(modeString))) {
	case 'r':
		goto __3
	case 'w':
		goto __4
	case 'a':
		goto __5
	default:
		goto __6
	}
	goto __2
__3:
	mode = X_O_RDONLY
	goto __2
__4:
	mode = X_O_WRONLY | X_O_CREAT | X_O_TRUNC
	goto __2
__5:
	// Added O_APPEND for proper automatic seek-to-end-on-write by the
	// OS. [Bug 680143]

	mode = X_O_WRONLY | X_O_CREAT | X_O_APPEND
	*(*int32)(unsafe.Pointer(seekFlagPtr)) = 1
	goto __2
__6:
	goto error
__2:
	;
	i = 1
__7:
	if !(i < 3 && *(*int8)(unsafe.Pointer(modeString + uintptr(i))) != 0) {
		goto __8
	}
	if !(int32(*(*int8)(unsafe.Pointer(modeString + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(modeString + uintptr(i-1))))) {
		goto __9
	}
	goto error
__9:
	;
	switch int32(*(*int8)(unsafe.Pointer(modeString + uintptr(libc.PostIncInt32(&i, 1))))) {
	case '+':
		goto __11
	case 'b':
		goto __12
	default:
		goto __13
	}
	goto __10
__11:
	// Must remove the O_APPEND flag so that the seek command
	// works. [Bug 1773127]

	mode = mode & libc.CplInt32(X_O_RDONLY|X_O_WRONLY|X_O_APPEND)
	mode = mode | X_O_RDWR
	goto __10
__12:
	*(*int32)(unsafe.Pointer(binaryPtr)) = 1
	goto __10
__13:
	goto error
__10:
	;
	goto __7
__8:
	;
	if !(int32(*(*int8)(unsafe.Pointer(modeString + uintptr(i)))) != 0) {
		goto __14
	}
	goto error
__14:
	;
	return mode

error:
	*(*int32)(unsafe.Pointer(seekFlagPtr)) = 0
	*(*int32)(unsafe.Pointer(binaryPtr)) = 0
	if !(interp != uintptr(0)) {
		goto __15
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38169, libc.VaList(bp, modeString)))
__15:
	;
	return -1
__1:
	;

	// The access modes are specified using a list of POSIX modes such as
	// O_CREAT.
	//
	// IMPORTANT NOTE: We rely on Tcl_SplitList working correctly when a NULL
	// interpreter is passed in.

	if !(XTcl_SplitList(tls, interp, modeString, bp+32, bp+40) != TCL_OK) {
		goto __16
	}
	if !(interp != uintptr(0)) {
		goto __17
	}
	XTcl_AddErrorInfo(tls, interp,
		ts+38194)
	XTcl_AddErrorInfo(tls, interp, modeString)
	XTcl_AddErrorInfo(tls, interp, ts+25631)
__17:
	;
	return -1
__16:
	;

	gotRW = 0
	i = 0
__18:
	if !(i < *(*int32)(unsafe.Pointer(bp + 32))) {
		goto __20
	}
	flag = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* modeArgv */)) + uintptr(i)*8))
	c = int32(*(*int8)(unsafe.Pointer(flag)))
	if !(c == 'R' && libc.Xstrcmp(tls, flag, ts+38236) == 0) {
		goto __21
	}
	mode = mode&libc.CplInt32(X_O_RDONLY|X_O_WRONLY|X_O_RDWR) | X_O_RDONLY
	gotRW = 1
	goto __22
__21:
	if !(c == 'W' && libc.Xstrcmp(tls, flag, ts+38243) == 0) {
		goto __23
	}
	mode = mode&libc.CplInt32(X_O_RDONLY|X_O_WRONLY|X_O_RDWR) | X_O_WRONLY
	gotRW = 1
	goto __24
__23:
	if !(c == 'R' && libc.Xstrcmp(tls, flag, ts+38250) == 0) {
		goto __25
	}
	mode = mode&libc.CplInt32(X_O_RDONLY|X_O_WRONLY|X_O_RDWR) | X_O_RDWR
	gotRW = 1
	goto __26
__25:
	if !(c == 'A' && libc.Xstrcmp(tls, flag, ts+38255) == 0) {
		goto __27
	}
	mode = mode | X_O_APPEND
	*(*int32)(unsafe.Pointer(seekFlagPtr)) = 1
	goto __28
__27:
	if !(c == 'C' && libc.Xstrcmp(tls, flag, ts+38262) == 0) {
		goto __29
	}
	mode = mode | X_O_CREAT
	goto __30
__29:
	if !(c == 'E' && libc.Xstrcmp(tls, flag, ts+38268) == 0) {
		goto __31
	}
	mode = mode | X_O_EXCL

	goto __32
__31:
	if !(c == 'N' && libc.Xstrcmp(tls, flag, ts+38273) == 0) {
		goto __33
	}
	if !(interp != uintptr(0)) {
		goto __35
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38280,
		libc.VaList(bp+8, flag)))
__35:
	;
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 40)))
	return -1

	goto __34
__33:
	if !(c == 'N' && libc.Xstrcmp(tls, flag, ts+38326) == 0) {
		goto __36
	}
	if !(interp != uintptr(0)) {
		goto __38
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38280,
		libc.VaList(bp+16, flag)))
__38:
	;
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 40)))
	return -1

	goto __37
__36:
	if !(c == 'T' && libc.Xstrcmp(tls, flag, ts+38335) == 0) {
		goto __39
	}
	mode = mode | X_O_TRUNC
	goto __40
__39:
	if !(c == 'B' && libc.Xstrcmp(tls, flag, ts+10526) == 0) {
		goto __41
	}
	*(*int32)(unsafe.Pointer(binaryPtr)) = 1
	goto __42
__41:

	if !(interp != uintptr(0)) {
		goto __43
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+38341, libc.VaList(bp+24, flag)))
__43:
	;
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 40)))
	return -1
__42:
	;
__40:
	;
__37:
	;
__34:
	;
__32:
	;
__30:
	;
__28:
	;
__26:
	;
__24:
	;
__22:
	;
	goto __19
__19:
	i++
	goto __18
	goto __20
__20:
	;

	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 40)))

	if !!(gotRW != 0) {
		goto __44
	}
	if !(interp != uintptr(0)) {
		goto __45
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+38453,
		-1))
__45:
	;
	return -1
__44:
	;
	return mode
}

//----------------------------------------------------------------------
//
// Tcl_FSEvalFile, Tcl_FSEvalFileEx, TclNREvalFile --
//
//	Read in a file and process the entire file as one gigantic Tcl
//	command. Tcl_FSEvalFile is Tcl_FSEvalFileEx without encoding argument.
//	TclNREvalFile is an NRE-enabled version of Tcl_FSEvalFileEx.
//
// Results:
//	A standard Tcl result, which is either the result of executing the
//	file or an error indicating why the file couldn't be read.
//
// Side effects:
//	Depends on the commands in the file. During the evaluation of the
//	contents of the file, iPtr->scriptFile is made to point to pathPtr
//	(the old value is cached and replaced when this function returns).
//
//----------------------------------------------------------------------

func XTcl_FSEvalFile(tls *libc.TLS, interp uintptr, pathPtr uintptr) int32 { /* tclIOUtil.c:1715:1: */
	return XTcl_FSEvalFileEx(tls, interp, pathPtr, uintptr(0))
}

func XTcl_FSEvalFileEx(tls *libc.TLS, interp uintptr, pathPtr uintptr, encodingName uintptr) int32 { /* tclIOUtil.c:1724:1: */
	bp := tls.Alloc(156)
	defer tls.Free(156)

	// var length int32 at bp+152, 4

	var result int32
	// var statBuf Tcl_StatBuf at bp+96, 56

	var oldScriptFile uintptr
	var iPtr uintptr
	var string uintptr
	var chan1 Tcl_Channel
	var objPtr uintptr
	var _objPtr uintptr
	// Record information telling where the error occurred.

	var pathString uintptr
	var limit int32
	var overflow int32
	var _objPtr1 uintptr
	result = TCL_ERROR

	if !(XTcl_FSGetNormalizedPath(tls, interp, pathPtr) == uintptr(0)) {
		goto __1
	}
	return result
__1:
	;

	if !(XTcl_FSStat(tls, pathPtr, bp+96) == -1) {
		goto __2
	}
	XTcl_SetErrno(tls, *(*int32)(unsafe.Pointer(libc.X_errno(tls))))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38509,
		libc.VaList(bp, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
	return result
__2:
	;
	chan1 = XTcl_FSOpenFileChannel(tls, interp, pathPtr, ts+23386, 0644)
	if !(chan1 == uintptr(0)) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38509,
		libc.VaList(bp+16, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
	return result
__3:
	;

	// The eofchar is \32 (^Z). This is the usual on Windows, but we effect
	// this cross-platform to allow for scripted documents. [Bug: 2040]

	XTcl_SetChannelOption(tls, interp, chan1, ts+34214, ts+38537)

	// If the encoding is specified, set it for the channel. Else don't touch
	// it (and use the system encoding) Report error on unknown encoding.

	if !(encodingName != uintptr(0)) {
		goto __4
	}
	if !(XTcl_SetChannelOption(tls, interp, chan1, ts+16536, encodingName) !=
		TCL_OK) {
		goto __5
	}
	XTcl_Close(tls, interp, chan1)
	return result
__5:
	;
__4:
	;

	objPtr = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++

	// Try to read first character of stream, so we can check for utf-8 BOM to
	// be handled especially.

	if !(XTcl_ReadChars(tls, chan1, objPtr, 1, 0) < 0) {
		goto __6
	}
	XTcl_Close(tls, interp, chan1)
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38509,
		libc.VaList(bp+32, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
	goto end
__6:
	;
	string = XTcl_GetString(tls, objPtr)

	// If first character is not a BOM, append the remaining characters,
	// otherwise replace them. [Bug 3466099]

	if !(XTcl_ReadChars(tls, chan1, objPtr, -1,
		libc.Xmemcmp(tls, string, ts+38542, uint64(3))) < 0) {
		goto __7
	}
	XTcl_Close(tls, interp, chan1)
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38509,
		libc.VaList(bp+48, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
	goto end
__7:
	;

	if !(XTcl_Close(tls, interp, chan1) != TCL_OK) {
		goto __8
	}
	goto end
__8:
	;

	iPtr = interp
	oldScriptFile = (*Interp)(unsafe.Pointer(iPtr)).FscriptFile
	(*Interp)(unsafe.Pointer(iPtr)).FscriptFile = pathPtr
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FscriptFile)).FrefCount++
	string = XTcl_GetStringFromObj(tls, objPtr, bp+152)

	// TIP #280 Force the evaluator to open a frame for a sourced file.

	*(*int32)(unsafe.Pointer(iPtr + 324)) |= TCL_EVAL_FILE
	result = XTclEvalEx(tls, interp, string, *(*int32)(unsafe.Pointer(bp + 152 /* length */)), 0, 1, uintptr(0), string)

	// Now we have to be careful; the script may have changed the
	// iPtr->scriptFile value, so we must reset it without assuming it still
	// points to 'pathPtr'.

	if !((*Interp)(unsafe.Pointer(iPtr)).FscriptFile != uintptr(0)) {
		goto __9
	}
__10:
	_objPtr = (*Interp)(unsafe.Pointer(iPtr)).FscriptFile
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __13
	}
	XTclFreeObj(tls, _objPtr)
__13:
	;
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
__9:
	;
	(*Interp)(unsafe.Pointer(iPtr)).FscriptFile = oldScriptFile

	if !(result == TCL_RETURN) {
		goto __14
	}
	result = XTclUpdateReturnInfo(tls, iPtr)
	goto __15
__14:
	if !(result == TCL_ERROR) {
		goto __16
	}
	// Record information telling where the error occurred.

	pathString = XTcl_GetStringFromObj(tls, pathPtr, bp+152)
	limit = 150
	overflow = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 152)) > limit)

	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+38546,
		libc.VaList(bp+64, func() int32 {
			if overflow != 0 {
				return limit
			}
			return *(*int32)(unsafe.Pointer(bp + 152))
		}(), pathString,
			func() uintptr {
				if overflow != 0 {
					return ts + 8420 /* "..." */
				}
				return ts + 2631 /* "" */
			}(), XTcl_GetErrorLine(tls, interp))))
__16:
	;
__15:
	;

end:
__17:
	_objPtr1 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __20
	}
	XTclFreeObj(tls, _objPtr1)
__20:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
	return result
}

func XTclNREvalFile(tls *libc.TLS, interp uintptr, pathPtr uintptr, encodingName uintptr) int32 { /* tclIOUtil.c:1860:1: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	// var statBuf Tcl_StatBuf at bp+64, 56

	var oldScriptFile uintptr
	var objPtr uintptr
	var iPtr uintptr
	var chan1 Tcl_Channel
	var string uintptr

	if XTcl_FSGetNormalizedPath(tls, interp, pathPtr) == uintptr(0) {
		return TCL_ERROR
	}

	if XTcl_FSStat(tls, pathPtr, bp+64) == -1 {
		XTcl_SetErrno(tls, *(*int32)(unsafe.Pointer(libc.X_errno(tls))))
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+38509,
			libc.VaList(bp, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
		return TCL_ERROR
	}
	chan1 = XTcl_FSOpenFileChannel(tls, interp, pathPtr, ts+23386, 0644)
	if chan1 == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+38509,
			libc.VaList(bp+16, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
		return TCL_ERROR
	}

	// The eofchar is \32 (^Z). This is the usual on Windows, but we effect
	// this cross-platform to allow for scripted documents. [Bug: 2040]

	XTcl_SetChannelOption(tls, interp, chan1, ts+34214, ts+38537)

	// If the encoding is specified, set it for the channel. Else don't touch
	// it (and use the system encoding) Report error on unknown encoding.

	if encodingName != uintptr(0) {
		if XTcl_SetChannelOption(tls, interp, chan1, ts+16536, encodingName) !=
			TCL_OK {
			XTcl_Close(tls, interp, chan1)
			return TCL_ERROR
		}
	}

	objPtr = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++

	// Try to read first character of stream, so we can check for utf-8 BOM to
	// be handled especially.

	if XTcl_ReadChars(tls, chan1, objPtr, 1, 0) < 0 {
		XTcl_Close(tls, interp, chan1)
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+38509,
			libc.VaList(bp+32, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return TCL_ERROR
	}
	string = XTcl_GetString(tls, objPtr)

	// If first character is not a BOM, append the remaining characters,
	// otherwise replace them. [Bug 3466099]

	if XTcl_ReadChars(tls, chan1, objPtr, -1,
		libc.Xmemcmp(tls, string, ts+38542, uint64(3))) < 0 {
		XTcl_Close(tls, interp, chan1)
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+38509,
			libc.VaList(bp+48, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return TCL_ERROR
	}

	if XTcl_Close(tls, interp, chan1) != TCL_OK {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return TCL_ERROR
	}

	iPtr = interp
	oldScriptFile = (*Interp)(unsafe.Pointer(iPtr)).FscriptFile
	(*Interp)(unsafe.Pointer(iPtr)).FscriptFile = pathPtr
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FscriptFile)).FrefCount++

	// TIP #280: Force the evaluator to open a frame for a sourced file.

	*(*int32)(unsafe.Pointer(iPtr + 324)) |= TCL_EVAL_FILE
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _callbackPtr uintptr
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sEvalFileCallback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = oldScriptFile
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = pathPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = objPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNREvalObjEx(tls, interp, objPtr, 0, uintptr(0), -0x7fffffff-1)
}

func sEvalFileCallback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclIOUtil.c:1966:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var iPtr uintptr = interp
	var oldScriptFile uintptr = *(*ClientData)(unsafe.Pointer(data))
	var pathPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var objPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))

	// Now we have to be careful; the script may have changed the
	// iPtr->scriptFile value, so we must reset it without assuming it still
	// points to 'pathPtr'.

	if (*Interp)(unsafe.Pointer(iPtr)).FscriptFile != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FscriptFile
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FscriptFile = oldScriptFile

	if result == TCL_RETURN {
		result = XTclUpdateReturnInfo(tls, iPtr)
	} else if result == TCL_ERROR {
		// Record information telling where the error occurred.

		// var length int32 at bp+32, 4

		var pathString uintptr = XTcl_GetStringFromObj(tls, pathPtr, bp+32)
		var limit int32 = 150
		var overflow int32 = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 32)) > limit)

		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+38546,
			libc.VaList(bp, func() int32 {
				if overflow != 0 {
					return limit
				}
				return *(*int32)(unsafe.Pointer(bp + 32))
			}(), pathString,
				func() uintptr {
					if overflow != 0 {
						return ts + 8420 /* "..." */
					}
					return ts + 2631 /* "" */
				}(), XTcl_GetErrorLine(tls, interp))))
	}

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = objPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_GetErrno --
//
//	Gets the current value of the Tcl error code variable. This is
//	currently the global variable "errno" but could in the future change
//	to something else.
//
// Results:
//	The value of the Tcl error code variable.
//
// Side effects:
//	None. Note that the value of the Tcl error code variable is UNDEFINED
//	if a call to Tcl_SetErrno did not precede this call.
//
//----------------------------------------------------------------------

func XTcl_GetErrno(tls *libc.TLS) int32 { /* tclIOUtil.c:2029:1: */
	// On some platforms, errno is really a thread local (implemented by the C
	// library).

	return *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
}

//----------------------------------------------------------------------
//
// Tcl_SetErrno --
//
//	Sets the Tcl error code variable to the supplied value. On some saner
//	platforms this is actually a thread-local (this is implemented in the
//	C library) but this is *really* unsafe to assume!
//
// Results:
//	None.
//
// Side effects:
//	Modifies the value of the Tcl error code variable.
//
//----------------------------------------------------------------------

func XTcl_SetErrno(tls *libc.TLS, err int32) { /* tclIOUtil.c:2058:1: */
	// On some platforms, errno is really a thread local (implemented by the C
	// library).

	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = err
}

//----------------------------------------------------------------------
//
// Tcl_PosixError --
//
//	This function is typically called after UNIX kernel calls return
//	errors. It stores machine-readable information about the error in
//	errorCode field of interp and returns an information string for the
//	caller's use.
//
// Results:
//	The return value is a human-readable string describing the error.
//
// Side effects:
//	The errorCode field of the interp is set.
//
//----------------------------------------------------------------------

func XTcl_PosixError(tls *libc.TLS, interp uintptr) uintptr { /* tclIOUtil.c:2088:12: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var id uintptr
	var msg uintptr

	msg = XTcl_ErrnoMsg(tls, *(*int32)(unsafe.Pointer(libc.X_errno(tls))))
	id = XTcl_ErrnoId(tls)
	if interp != 0 {
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+38575, id, msg, uintptr(0)))
	}
	return msg
}

//----------------------------------------------------------------------
//
// Tcl_FSStat --
//
//	This function replaces the library version of stat and lsat.
//
//	The appropriate function for the filesystem to which pathPtr belongs
//	will be called.
//
// Results:
//	See stat documentation.
//
// Side effects:
//	See stat documentation.
//
//----------------------------------------------------------------------

func XTcl_FSStat(tls *libc.TLS, pathPtr uintptr, buf uintptr) int32 { /* tclIOUtil.c:2123:1: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FstatProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FstatProc})).f(tls, pathPtr, buf)
	}
	XTcl_SetErrno(tls, ENOENT)
	return -1
}

//----------------------------------------------------------------------
//
// Tcl_FSLstat --
//
//	This function replaces the library version of lstat. The appropriate
//	function for the filesystem to which pathPtr belongs will be called.
//	If no 'lstat' function is listed, but a 'stat' function is, then Tcl
//	will fall back on the stat function.
//
// Results:
//	See lstat documentation.
//
// Side effects:
//	See lstat documentation.
//
//----------------------------------------------------------------------

func XTcl_FSLstat(tls *libc.TLS, pathPtr uintptr, buf uintptr) int32 { /* tclIOUtil.c:2156:1: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) {
		if (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FlstatProc != uintptr(0) {
			return (*struct {
				f func(*libc.TLS, uintptr, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FlstatProc})).f(tls, pathPtr, buf)
		}
		if (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FstatProc != uintptr(0) {
			return (*struct {
				f func(*libc.TLS, uintptr, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FstatProc})).f(tls, pathPtr, buf)
		}
	}
	XTcl_SetErrno(tls, ENOENT)
	return -1
}

//----------------------------------------------------------------------
//
// Tcl_FSAccess --
//
//	This function replaces the library version of access. The appropriate
//	function for the filesystem to which pathPtr belongs will be called.
//
// Results:
//	See access documentation.
//
// Side effects:
//	See access documentation.
//
//----------------------------------------------------------------------

func XTcl_FSAccess(tls *libc.TLS, pathPtr uintptr, mode int32) int32 { /* tclIOUtil.c:2192:1: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FaccessProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr, int32) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FaccessProc})).f(tls, pathPtr, mode)
	}
	XTcl_SetErrno(tls, ENOENT)
	return -1
}

//----------------------------------------------------------------------
//
// Tcl_FSOpenFileChannel --
//
//	The appropriate function for the filesystem to which pathPtr belongs
//	will be called.
//
// Results:
//	The new channel or NULL, if the named file could not be opened.
//
// Side effects:
//	May open the channel and may cause creation of a file on the file
//	system.
//
//----------------------------------------------------------------------

func XTcl_FSOpenFileChannel(tls *libc.TLS, interp uintptr, pathPtr uintptr, modeString uintptr, permissions int32) Tcl_Channel { /* tclIOUtil.c:2224:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var fsPtr uintptr
	var retVal Tcl_Channel = uintptr(0)

	// We need this just to ensure we return the correct error messages under
	// some circumstances.

	if XTcl_FSGetNormalizedPath(tls, interp, pathPtr) == uintptr(0) {
		return uintptr(0)
	}

	fsPtr = XTcl_FSGetFileSystemForPath(tls, pathPtr)
	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FopenFileChannelProc != uintptr(0) {
		var mode int32
		// var seekFlag int32 at bp+32, 4

		// var binary int32 at bp+36, 4

		// Parse the mode, picking up whether we want to seek to start with
		// and/or set the channel automatically into binary mode.

		mode = XTclGetOpenModeEx(tls, interp, modeString, bp+32, bp+36)
		if mode == -1 {
			return uintptr(0)
		}

		// Do the actual open() call.

		retVal = (*struct {
			f func(*libc.TLS, uintptr, uintptr, int32, int32) Tcl_Channel
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FopenFileChannelProc})).f(tls, interp, pathPtr, mode,
			permissions)
		if retVal == uintptr(0) {
			return uintptr(0)
		}

		// Apply appropriate flags parsed out above.

		if *(*int32)(unsafe.Pointer(bp + 32)) != 0 && XTcl_Seek(tls, retVal, int64(0), SEEK_END) <
			int64(0) {
			if interp != uintptr(0) {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+38581,
					libc.VaList(bp, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
			}
			XTcl_Close(tls, uintptr(0), retVal)
			return uintptr(0)
		}
		if *(*int32)(unsafe.Pointer(bp + 36)) != 0 {
			XTcl_SetChannelOption(tls, interp, retVal, ts+34223, ts+10063)
		}
		return retVal
	}

	// File doesn't belong to any filesystem that can open it.

	XTcl_SetErrno(tls, ENOENT)
	if interp != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+38634,
			libc.VaList(bp+16, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_FSUtime --
//
//	This function replaces the library version of utime. The appropriate
//	function for the filesystem to which pathPtr belongs will be called.
//
// Results:
//	See utime documentation.
//
// Side effects:
//	See utime documentation.
//
//----------------------------------------------------------------------

func XTcl_FSUtime(tls *libc.TLS, pathPtr uintptr, tval uintptr) int32 { /* tclIOUtil.c:2320:1: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FutimeProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FutimeProc})).f(tls, pathPtr, tval)
	}
	// TODO: set errno here? Tcl_SetErrno(ENOENT);
	return -1
}

//----------------------------------------------------------------------
//
// NativeFileAttrStrings --
//
//	This function implements the platform dependent 'file attributes'
//	subcommand, for the native filesystem, for listing the set of possible
//	attribute strings. This function is part of Tcl's native filesystem
//	support, and is placed here because it is shared by Unix and Windows
//	code.
//
// Results:
//	An array of strings
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sNativeFileAttrStrings(tls *libc.TLS, pathPtr uintptr, objPtrRef uintptr) uintptr { /* tclIOUtil.c:2355:19: */
	return uintptr(unsafe.Pointer(&XtclpFileAttrStrings))
}

//----------------------------------------------------------------------
//
// NativeFileAttrsGet --
//
//	This function implements the platform dependent 'file attributes'
//	subcommand, for the native filesystem, for 'get' operations. This
//	function is part of Tcl's native filesystem support, and is placed
//	here because it is shared by Unix and Windows code.
//
// Results:
//	Standard Tcl return code. The object placed in objPtrRef (if TCL_OK
//	was returned) is likely to have a refCount of zero. Either way we must
//	either store it somewhere (e.g. the Tcl result), or Incr/Decr its
//	refCount to ensure it is properly freed.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sNativeFileAttrsGet(tls *libc.TLS, interp uintptr, index int32, pathPtr uintptr, objPtrRef uintptr) int32 { /* tclIOUtil.c:2386:1: */
	return (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{XtclpFileAttrProcs[index].FgetProc})).f(tls, interp, index, pathPtr, objPtrRef)
}

//----------------------------------------------------------------------
//
// NativeFileAttrsSet --
//
//	This function implements the platform dependent 'file attributes'
//	subcommand, for the native filesystem, for 'set' operations. This
//	function is part of Tcl's native filesystem support, and is placed
//	here because it is shared by Unix and Windows code.
//
// Results:
//	Standard Tcl return code.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sNativeFileAttrsSet(tls *libc.TLS, interp uintptr, index int32, pathPtr uintptr, objPtr uintptr) int32 { /* tclIOUtil.c:2415:1: */
	return (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{XtclpFileAttrProcs[index].FsetProc})).f(tls, interp, index, pathPtr, objPtr)
}

//----------------------------------------------------------------------
//
// Tcl_FSFileAttrStrings --
//
//	This function implements part of the hookable 'file attributes'
//	subcommand. The appropriate function for the filesystem to which
//	pathPtr belongs will be called.
//
// Results:
//	The called function may either return an array of strings, or may
//	instead return NULL and place a Tcl list into the given objPtrRef.
//	Tcl will take that list and first increment its refCount before using
//	it. On completion of that use, Tcl will decrement its refCount. Hence
//	if the list should be disposed of by Tcl when done, it should have a
//	refCount of zero, and if the list should not be disposed of, the
//	filesystem should ensure it retains a refCount on the object.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FSFileAttrStrings(tls *libc.TLS, pathPtr uintptr, objPtrRef uintptr) uintptr { /* tclIOUtil.c:2448:12: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfileAttrStringsProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfileAttrStringsProc})).f(tls, pathPtr, objPtrRef)
	}
	XTcl_SetErrno(tls, ENOENT)
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclFSFileAttrIndex --
//
//	Helper function for converting an attribute name to an index into the
//	attribute table.
//
// Results:
//	Tcl result code, index written to *indexPtr on result==TCL_OK
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFSFileAttrIndex(tls *libc.TLS, pathPtr uintptr, attributeName uintptr, indexPtr uintptr) int32 { /* tclIOUtil.c:2480:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	*(*uintptr)(unsafe.Pointer(bp /* listObj */)) = uintptr(0)
	var attrTable uintptr

	// Get the attribute table for the file.

	attrTable = XTcl_FSFileAttrStrings(tls, pathPtr, bp)
	if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount++
	}

	if attrTable != uintptr(0) {
		// It's a constant attribute table, so use T_GIFO.

		var tmpObj uintptr = XTcl_NewStringObj(tls, attributeName, -1)
		var result int32

		result = XTcl_GetIndexFromObjStruct(tls, uintptr(0), tmpObj, attrTable, int32(unsafe.Sizeof(uintptr(0))), uintptr(0), TCL_EXACT, indexPtr)
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
					XtclFreeObjList = tmpObj
				}
			} else {
				XTclFreeObj(tls, tmpObj)
			}
		}

		if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32)) = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp))
					}
				} else {
					XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp /* listObj */)))
				}
			}

		}
		return result
	} else if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
		// It's a non-constant attribute list, so do a literal search.

		var i int32
		// var objc int32 at bp+8, 4

		// var objv uintptr at bp+16, 8

		if XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp)), bp+8, bp+16) != TCL_OK {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Flength = -1
					for ok2 := true; ok2; ok2 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32)) = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp))
					}
				} else {
					XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp /* listObj */)))
				}
			}

			return TCL_ERROR
		}
		for i = 0; i < *(*int32)(unsafe.Pointer(bp + 8 /* objc */)); i++ {
			if !(libc.Xstrcmp(tls, attributeName, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(i)*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(i)*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(i)*8)))
			}()) != 0) {
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Flength = -1
						for ok3 := true; ok3; ok3 = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32)) = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp))
						}
					} else {
						XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp /* listObj */)))
					}
				}

				*(*int32)(unsafe.Pointer(indexPtr)) = i
				return TCL_OK
			}
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Flength = -1
				for ok4 := true; ok4; ok4 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 32)) = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp))
				}
			} else {
				XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp /* listObj */)))
			}
		}

		return TCL_ERROR
	} else {
		return TCL_ERROR
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// Tcl_FSFileAttrsGet --
//
//	This function implements read access for the hookable 'file
//	attributes' subcommand. The appropriate function for the filesystem to
//	which pathPtr belongs will be called.
//
// Results:
//	Standard Tcl return code. The object placed in objPtrRef (if TCL_OK
//	was returned) is likely to have a refCount of zero. Either way we must
//	either store it somewhere (e.g. the Tcl result), or Incr/Decr its
//	refCount to ensure it is properly freed.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FSFileAttrsGet(tls *libc.TLS, interp uintptr, index int32, pathPtr uintptr, objPtrRef uintptr) int32 { /* tclIOUtil.c:2561:1: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfileAttrsGetProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfileAttrsGetProc})).f(tls, interp, index, pathPtr, objPtrRef)
	}
	XTcl_SetErrno(tls, ENOENT)
	return -1
}

//----------------------------------------------------------------------
//
// Tcl_FSFileAttrsSet --
//
//	This function implements write access for the hookable 'file
//	attributes' subcommand. The appropriate function for the filesystem to
//	which pathPtr belongs will be called.
//
// Results:
//	Standard Tcl return code.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FSFileAttrsSet(tls *libc.TLS, interp uintptr, index int32, pathPtr uintptr, objPtr uintptr) int32 { /* tclIOUtil.c:2595:1: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfileAttrsSetProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfileAttrsSetProc})).f(tls, interp, index, pathPtr, objPtr)
	}
	XTcl_SetErrno(tls, ENOENT)
	return -1
}

//----------------------------------------------------------------------
//
// Tcl_FSGetCwd --
//
//	This function replaces the library version of getcwd().
//
//	Most VFS's will *not* implement a 'cwdProc'. Tcl now maintains its own
//	record (in a Tcl_Obj) of the cwd, and an attempt is made to synch this
//	with the cwd's containing filesystem, if that filesystem provides a
//	cwdProc (e.g. the native filesystem).
//
//	Note that if Tcl's cwd is not in the native filesystem, then of course
//	Tcl's cwd and the native cwd are different: extensions should
//	therefore ensure they only access the cwd through this function to
//	avoid confusion.
//
//	If a global cwdPathPtr already exists, it is cached in the thread's
//	private data structures and reference to the cached copy is returned,
//	subject to a synchronisation attempt in that cwdPathPtr's fs.
//
//	Otherwise, the chain of functions that have been "inserted" into the
//	filesystem will be called in succession until either a value other
//	than NULL is returned, or the entire list is visited.
//
// Results:
//	The result is a pointer to a Tcl_Obj specifying the current directory,
//	or NULL if the current directory could not be determined. If NULL is
//	returned, an error message is left in the interp's result.
//
//	The result already has its refCount incremented for the caller. When
//	it is no longer needed, that refCount should be decremented.
//
// Side effects:
//	Various objects may be freed and allocated.
//
//----------------------------------------------------------------------

func XTcl_FSGetCwd(tls *libc.TLS, interp uintptr) uintptr { /* tclIOUtil.c:2649:9: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var tsdPtr uintptr
	var _objPtr uintptr
	var _objPtr1 uintptr
	var norm uintptr
	var retCd ClientData
	var proc2 uintptr
	var _objPtr2 uintptr
	// We found a cwd, which is now in our global storage. We must
	// make a copy. Norm already has a refCount of 1.
	//
	// Threading issue: note that multiple threads at system
	// startup could in principle call this function
	// simultaneously. They will therefore each set the cwdPathPtr
	// independently. That behaviour is a bit peculiar, but should
	// be fine. Once we have a cwd, we'll always be in the 'else'
	// branch below which is simpler.

	var cd ClientData
	var _objPtr3 uintptr
	var norm1 uintptr
	var fsRecPtr uintptr
	var retVal uintptr
	// New API.

	var proc21 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	// Note that both 'norm' and 'tsdPtr->cwdPathPtr' are normalized
	// paths. Therefore we can be more efficient than calling
	// 'Tcl_FSEqualPaths', and in addition avoid a nasty infinite loop
	// bug when trying to normalize tsdPtr->cwdPathPtr.

	// var len1 int32 at bp+16, 4

	// var len2 int32 at bp+20, 4

	var str1 uintptr
	var str2 uintptr
	var _objPtr6 uintptr
	// We already have a cwd cached, but we want to give the filesystem it
	// is in a chance to check whether that cwd has changed, or is perhaps
	// no longer accessible. This allows an error to be thrown if, say,
	// the permissions on that directory have changed.

	var fsPtr uintptr
	var retCd1 ClientData
	var retVal1 uintptr
	var norm2 uintptr
	tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))

	if !(XTclFSCwdPointerEquals(tls, uintptr(0)) != 0) {
		goto __1
	}
	retVal = uintptr(0)

	// We've never been called before, try to find a cwd. Call each of the
	// "Tcl_GetCwd" function in succession. A non-NULL return value
	// indicates the particular function has succeeded.

	fsRecPtr = sFsGetFirstFilesystem(tls)
	sClaim(tls)
__3:
	if !(retVal == uintptr(0) && fsRecPtr != uintptr(0)) {
		goto __5
	}
	if !((*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FgetCwdProc == uintptr(0)) {
		goto __6
	}
	goto __4
__6:
	;

	if !((*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).Fversion == uintptr(0x1)) {
		goto __7
	}
	retVal = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FgetCwdProc})).f(tls, interp)
	goto __4
__7:
	;

	proc2 = (*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FgetCwdProc
	retCd = (*struct {
		f func(*libc.TLS, ClientData) ClientData
	})(unsafe.Pointer(&struct{ uintptr }{proc2})).f(tls, uintptr(0))
	if !(retCd != uintptr(0)) {
		goto __8
	}

	// Looks like a new current directory.

	retVal = (*struct {
		f func(*libc.TLS, ClientData) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FinternalToNormalizedProc})).f(tls, retCd)
	(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount++
	norm = XTclFSNormalizeAbsolutePath(tls, interp, retVal)
	if !(norm != uintptr(0)) {
		goto __10
	}
	// We found a cwd, which is now in our global storage. We
	// must make a copy. Norm already has a refCount of 1.
	//
	// Threading issue: note that multiple threads at system
	// startup could in principle call this function
	// simultaneously. They will therefore each set the
	// cwdPathPtr independently. That behaviour is a bit
	// peculiar, but should be fine. Once we have a cwd, we'll
	// always be in the 'else' branch below which is simpler.

	sFsUpdateCwd(tls, norm, retCd)
__12:
	_objPtr = norm
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __15
	}
	XTclFreeObj(tls, _objPtr)
__15:
	;
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	;
	goto __11
__10:
	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FfreeInternalRepProc})).f(tls, retCd)
__11:
	;
__16:
	_objPtr1 = retVal
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __19
	}
	XTclFreeObj(tls, _objPtr1)
__19:
	;
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	retVal = uintptr(0)
	sDisclaim(tls)
	goto cdDidNotChange
	goto __9
__8:
	if !(interp != uintptr(0)) {
		goto __20
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38657,
		libc.VaList(bp, XTcl_PosixError(tls, interp))))
__20:
	;
__9:
	;
	goto __4
__4:
	fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
	goto __3
	goto __5
__5:
	;
	sDisclaim(tls)

	// Now the 'cwd' may NOT be normalized, at least on some platforms.
	// For the sake of efficiency, we want a completely normalized cwd at
	// all times.
	//
	// Finally, if retVal is NULL, we do not have a cwd, which could be
	// problematic.

	if !(retVal != uintptr(0)) {
		goto __21
	}
	norm1 = XTclFSNormalizeAbsolutePath(tls, interp, retVal)

	if !(norm1 != uintptr(0)) {
		goto __22
	}
	// We found a cwd, which is now in our global storage. We must
	// make a copy. Norm already has a refCount of 1.
	//
	// Threading issue: note that multiple threads at system
	// startup could in principle call this function
	// simultaneously. They will therefore each set the cwdPathPtr
	// independently. That behaviour is a bit peculiar, but should
	// be fine. Once we have a cwd, we'll always be in the 'else'
	// branch below which is simpler.

	cd = XTcl_FSGetNativePath(tls, norm1)

	sFsUpdateCwd(tls, norm1, XTclNativeDupInternalRep(tls, cd))
__23:
	_objPtr2 = norm1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __26
	}
	XTclFreeObj(tls, _objPtr2)
__26:
	;
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
__22:
	;
__27:
	_objPtr3 = retVal
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __30
	}
	XTclFreeObj(tls, _objPtr3)
__30:
	;
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
__21:
	;
	goto __2
__1:
	fsPtr =
		XTcl_FSGetFileSystemForPath(tls, (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr)
	retCd1 = uintptr(0)

	// If the filesystem couldn't be found, or if no cwd function exists
	// for this filesystem, then we simply assume the cached cwd is ok.
	// If we do call a cwd, we must watch for errors (if the cwd returns
	// NULL). This ensures that, say, on Unix if the permissions of the
	// cwd change, 'pwd' does actually throw the correct error in Tcl.
	// (This is tested for in the test suite on unix).

	if !(fsPtr == uintptr(0) || (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FgetCwdProc == uintptr(0)) {
		goto __31
	}
	goto cdDidNotChange
__31:
	;

	if !((*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).Fversion == uintptr(0x1)) {
		goto __32
	}
	retVal1 = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FgetCwdProc})).f(tls, interp)
	goto __33
__32:
	// New API.

	proc21 = (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FgetCwdProc

	retCd1 = (*struct {
		f func(*libc.TLS, ClientData) ClientData
	})(unsafe.Pointer(&struct{ uintptr }{proc21})).f(tls, (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData)
	if !(retCd1 == uintptr(0) && interp != uintptr(0)) {
		goto __34
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38657,
		libc.VaList(bp+8, XTcl_PosixError(tls, interp))))
__34:
	;

	if !(retCd1 == (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData) {
		goto __35
	}
	goto cdDidNotChange
__35:
	;

	// Looks like a new current directory.

	retVal1 = (*struct {
		f func(*libc.TLS, ClientData) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FinternalToNormalizedProc})).f(tls, retCd1)
	(*Tcl_Obj)(unsafe.Pointer(retVal1)).FrefCount++
__33:
	;

	// Check if the 'cwd' function returned an error; if so, reset the
	// cwd.

	if !(retVal1 == uintptr(0)) {
		goto __36
	}
	sFsUpdateCwd(tls, uintptr(0), uintptr(0))
	goto cdDidNotChange
__36:
	;

	// Normalize the path.

	norm2 = XTclFSNormalizeAbsolutePath(tls, interp, retVal1)

	// Check whether cwd has changed from the value previously stored in
	// cwdPathPtr. Really 'norm' shouldn't be NULL, but we are careful.

	if !(norm2 == uintptr(0)) {
		goto __37
	}
	// Do nothing
	if !(retCd1 != uintptr(0)) {
		goto __39
	}
	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfreeInternalRepProc})).f(tls, retCd1)
__39:
	;
	goto __38
__37:
	if !(norm2 == (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr) {
		goto __40
	}
	goto cdEqual
	goto __41
__40:

	str1 = XTcl_GetStringFromObj(tls, (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr, bp+16)
	str2 = XTcl_GetStringFromObj(tls, norm2, bp+20)
	if !(*(*int32)(unsafe.Pointer(bp + 16)) == *(*int32)(unsafe.Pointer(bp + 20)) && libc.Xstrcmp(tls, str1, str2) == 0) {
		goto __42
	}
	// If the paths were equal, we can be more efficient and
	// retain the old path object which will probably already be
	// shared. In this case we can simply free the normalized path
	// we just calculated.

cdEqual:
__44:
	_objPtr4 = norm2
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __47
	}
	XTclFreeObj(tls, _objPtr4)
__47:
	;
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
	if !(retCd1 != uintptr(0)) {
		goto __48
	}
	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfreeInternalRepProc})).f(tls, retCd1)
__48:
	;
	goto __43
__42:
	sFsUpdateCwd(tls, norm2, retCd1)
__49:
	_objPtr5 = norm2
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __52
	}
	XTclFreeObj(tls, _objPtr5)
__52:
	;
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
__43:
	;
__41:
	;
__38:
	;
__53:
	_objPtr6 = retVal1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __56
	}
	XTclFreeObj(tls, _objPtr6)
__56:
	;
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
__2:
	;

cdDidNotChange:
	if !((*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr != uintptr(0)) {
		goto __57
	}
	(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr)).FrefCount++
__57:
	;

	return (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr
}

//----------------------------------------------------------------------
//
// Tcl_FSChdir --
//
//	This function replaces the library version of chdir().
//
//	The path is normalized and then passed to the filesystem which claims
//	it.
//
// Results:
//	See chdir() documentation. If successful, we keep a record of the
//	successful path in cwdPathPtr for subsequent calls to getcwd.
//
// Side effects:
//	See chdir() documentation. The global cwdPathPtr may change value.
//
//----------------------------------------------------------------------

func XTcl_FSChdir(tls *libc.TLS, pathPtr uintptr) int32 { /* tclIOUtil.c:2899:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var fsPtr uintptr
	var oldFsPtr uintptr = uintptr(0)
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&fsDataKey)), int32(unsafe.Sizeof(ThreadSpecificData5{})))
	var retVal int32 = -1

	if (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr != uintptr(0) {
		oldFsPtr = XTcl_FSGetFileSystemForPath(tls, (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdPathPtr)
	}
	if XTcl_FSGetNormalizedPath(tls, uintptr(0), pathPtr) == uintptr(0) {
		XTcl_SetErrno(tls, ENOENT)
		return retVal
	}

	fsPtr = XTcl_FSGetFileSystemForPath(tls, pathPtr)
	if fsPtr != uintptr(0) {
		if (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FchdirProc != uintptr(0) {
			// If this fails, an appropriate errno will have been stored using
			// 'Tcl_SetErrno()'.

			retVal = (*struct {
				f func(*libc.TLS, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FchdirProc})).f(tls, pathPtr)
		} else {
			// Fallback on stat-based implementation.

			// var buf Tcl_StatBuf at bp, 56

			// If the file can be stat'ed and is a directory and is readable,
			// then we can chdir. If any of these actions fail, then
			// 'Tcl_SetErrno()' should automatically have been called to set
			// an appropriate error code.

			if XTcl_FSStat(tls, pathPtr, bp) == 0 && int32((*Tcl_StatBuf)(unsafe.Pointer(bp)).Fst_mode)&X_S_IFMT == X_S_IFDIR &&
				XTcl_FSAccess(tls, pathPtr, R_OK) == 0 {
				// We allow the chdir.

				retVal = 0
			}
		}
	} else {
		XTcl_SetErrno(tls, ENOENT)
	}

	// The cwd changed, or an error was thrown. If an error was thrown, we can
	// just continue (and that will report the error to the user). If there
	// was no error we must assume that the cwd was actually changed to the
	// normalized value we calculated above, and we must therefore cache that
	// information.
	//
	// If the filesystem in question has a getCwdProc, then the correct logic
	// which performs the part below is already part of the Tcl_FSGetCwd()
	// call, so no need to replicate it again. This will have a side effect
	// though. The private authoritative representation of the current working
	// directory stored in cwdPathPtr in static memory will be out-of-sync
	// with the real OS-maintained value. The first call to Tcl_FSGetCwd will
	// however recalculate the private copy to match the OS-value so
	// everything will work right.
	//
	// However, if there is no getCwdProc, then we _must_ update our private
	// storage of the cwd, since this is the only opportunity to do that!
	//
	// Note: We currently call this block of code irrespective of whether
	// there was a getCwdProc or not, but the code should all in principle
	// work if we only call this block if fsPtr->getCwdProc == NULL.

	if retVal == 0 {
		// Note that this normalized path may be different to what we found
		// above (or at least a different object), if the filesystem epoch
		// changed recently. This can actually happen with scripted documents
		// very easily. Therefore we ask for the normalized path again (the
		// correct value will have been cached as a result of the
		// Tcl_FSGetFileSystemForPath call above anyway).

		var normDirName uintptr = XTcl_FSGetNormalizedPath(tls, uintptr(0), pathPtr)

		if normDirName == uintptr(0) {
			// Not really true, but what else to do?
			XTcl_SetErrno(tls, ENOENT)
			return -1
		}

		if fsPtr == uintptr(unsafe.Pointer(&XtclNativeFilesystem)) {
			// For the native filesystem, we keep a cache of the native
			// representation of the cwd. But, we want to do that for the
			// exact format that is returned by 'getcwd' (so that we can later
			// compare the two representations for equality), which might not
			// be exactly the same char-string as the native representation of
			// the fully normalized path (e.g. on Windows there's a
			// forward-slash vs backslash difference). Hence we ask for this
			// again here. On Unix it might actually be true that we always
			// have the correct form in the native rep in which case we could
			// simply use:
			//		cd = Tcl_FSGetNativePath(pathPtr);
			// instead. This should be examined by someone on Unix.

			var cd ClientData
			var oldcd ClientData = (*ThreadSpecificData5)(unsafe.Pointer(tsdPtr)).FcwdClientData

			// Assumption we are using a filesystem version 2.

			var proc2 uintptr = (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FgetCwdProc

			cd = (*struct {
				f func(*libc.TLS, ClientData) ClientData
			})(unsafe.Pointer(&struct{ uintptr }{proc2})).f(tls, oldcd)
			if cd != oldcd {
				sFsUpdateCwd(tls, normDirName, cd)
			}
		} else {
			sFsUpdateCwd(tls, normDirName, uintptr(0))
		}

		// If the filesystem changed between old and new cwd
		// force filesystem refresh on path objects.
		if oldFsPtr != uintptr(0) && fsPtr != oldFsPtr {
			XTcl_FSMountsChanged(tls, uintptr(0))
		}
	}

	return retVal
}

//----------------------------------------------------------------------
//
// Tcl_FSLoadFile --
//
//	Dynamically loads a binary code file into memory and returns the
//	addresses of two functions within that file, if they are defined. The
//	appropriate function for the filesystem to which pathPtr belongs will
//	be called.
//
//	Note that the native filesystem doesn't actually assume 'pathPtr' is a
//	path. Rather it assumes pathPtr is either a path or just the name
//	(tail) of a file which can be found somewhere in the environment's
//	loadable path. This behaviour is not very compatible with virtual
//	filesystems (and has other problems documented in the load man-page),
//	so it is advised that full paths are always used.
//
// Results:
//	A standard Tcl completion code. If an error occurs, an error message
//	is left in the interp's result.
//
// Side effects:
//	New code suddenly appears in memory. This may later be unloaded by
//	passing the clientData to the unloadProc.
//
//----------------------------------------------------------------------

func XTcl_FSLoadFile(tls *libc.TLS, interp uintptr, pathPtr uintptr, sym1 uintptr, sym2 uintptr, proc1Ptr uintptr, proc2Ptr uintptr, handlePtr uintptr, unloadProcPtr uintptr) int32 { /* tclIOUtil.c:3066:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	// var symbols [3]uintptr at bp, 24

	// var procPtrs [2]uintptr at bp+24, 16

	var res int32

	// Initialize the arrays.

	*(*uintptr)(unsafe.Pointer(bp)) = sym1
	*(*uintptr)(unsafe.Pointer(bp + 1*8)) = sym2
	*(*uintptr)(unsafe.Pointer(bp + 2*8)) = uintptr(0)

	// Perform the load.

	res = XTcl_LoadFile(tls, interp, pathPtr, bp, 0, bp+24, handlePtr)
	if res == TCL_OK {
		*(*uintptr)(unsafe.Pointer(proc1Ptr)) = *(*uintptr)(unsafe.Pointer(bp + 24))
		*(*uintptr)(unsafe.Pointer(proc2Ptr)) = *(*uintptr)(unsafe.Pointer(bp + 24 + 1*8))
	} else {
		*(*uintptr)(unsafe.Pointer(proc1Ptr)) = libc.AssignPtrUintptr(proc2Ptr, uintptr(0))
	}

	return res
}

//----------------------------------------------------------------------
//
// Tcl_LoadFile --
//
//	Dynamically loads a binary code file into memory and returns the
//	addresses of a number of given functions within that file, if they are
//	defined. The appropriate function for the filesystem to which pathPtr
//	belongs will be called.
//
//	Note that the native filesystem doesn't actually assume 'pathPtr' is a
//	path. Rather it assumes pathPtr is either a path or just the name
//	(tail) of a file which can be found somewhere in the environment's
//	loadable path. This behaviour is not very compatible with virtual
//	filesystems (and has other problems documented in the load man-page),
//	so it is advised that full paths are always used.
//
// Results:
//	A standard Tcl completion code. If an error occurs, an error message
//	is left in the interp's result.
//
// Side effects:
//	New code suddenly appears in memory. This may later be unloaded by
//	calling TclFS_UnloadFile.
//
//----------------------------------------------------------------------

// Workaround for issue with modern HPUX which do allow the unlink (no ETXTBSY
// error) yet somehow trash some internal data structures which prevents the
// second and further shared libraries from getting properly loaded. Only the
// first is ok. We try to get around the issue by not unlinking,
// i.e. emulating the behaviour of the older HPUX which denied removal.
//
// Doing the unlink is also an issue within docker containers, whose AUFS
// bungles this as well, see
//     https://github.com/dotcloud/docker/issues/1911
//
// For these situations the change below makes the execution of the unlink
// semi-controllable at runtime.
//
//     An AUFS filesystem (if it can be detected) will force avoidance of
//     unlink. The env variable TCL_TEMPLOAD_NO_UNLINK allows detection of a
//     users general request (unlink and not.
//
// By default the unlink is done (if not in AUFS). However if the variable is
// present and set to true (any integer > 0) then the unlink is skipped.

func skipUnlink(tls *libc.TLS, shlibFile uintptr) int32 { /* tclIOUtil.c:3169:1: */
	// Order of testing:
	// 1. On hpux we generally want to skip unlink in general
	//
	// Outside of hpux then:
	// 2. For a general user request   (TCL_TEMPLOAD_NO_UNLINK present, non-empty, => int)
	// 3. For general AUFS environment (statfs, if available).
	//
	// Ad 2: This variable can disable/override the AUFS detection, i.e. for
	// testing if a newer AUFS does not have the bug any more.
	//
	// Ad 3: This is conditionally compiled in. Condition currently must be set manually.
	//       This part needs proper tests in the configure(.in).

	var skipstr uintptr

	skipstr = libc.X_wgetenv(tls, wtext+112)
	if skipstr != 0 && int32(*(*WCHAR)(unsafe.Pointer(skipstr))) != 0 {
		return libc.X_wtoi(tls, skipstr)
	}

	// Fallback: !hpux, no EV override, no AUFS (detection, nor detected):
	// Don't skip
	return 0
}

func XTcl_LoadFile(tls *libc.TLS, interp uintptr, pathPtr uintptr, symbols uintptr, flags int32, procVPtrs uintptr, handlePtr uintptr) int32 { /* tclIOUtil.c:3223:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var procPtrs uintptr
	var fsPtr uintptr
	var copyFsPtr uintptr
	// var unloadProcPtr uintptr at bp+16, 8

	var copyToPtr uintptr
	// var newLoadHandle Tcl_LoadHandle at bp+24, 8

	var divertedLoadHandle Tcl_LoadHandle
	var newUnloadProcPtr uintptr
	var tvdlPtr uintptr
	var retVal int32
	var i int32
	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	procPtrs = procVPtrs
	fsPtr = XTcl_FSGetFileSystemForPath(tls, pathPtr)
	*(*Tcl_LoadHandle)(unsafe.Pointer(bp + 24 /* newLoadHandle */)) = uintptr(0)
	divertedLoadHandle = uintptr(0)
	newUnloadProcPtr = uintptr(0)

	if !(fsPtr == uintptr(0)) {
		goto __1
	}
	XTcl_SetErrno(tls, ENOENT)
	return TCL_ERROR
__1:
	;

	if !((*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FloadFileProc != uintptr(0)) {
		goto __2
	}
	retVal = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(fsPtr + 224)))(tls, interp, pathPtr, handlePtr, bp+16, flags)

	if !(retVal == TCL_OK) {
		goto __3
	}
	if !(*(*Tcl_LoadHandle)(unsafe.Pointer(handlePtr)) == uintptr(0)) {
		goto __4
	}
	return TCL_ERROR
__4:
	;
	if !(interp != 0) {
		goto __5
	}
	XTcl_ResetResult(tls, interp)
__5:
	;
	goto resolveSymbols
__3:
	;
	if !(XTcl_GetErrno(tls) != EXDEV) {
		goto __6
	}
	return retVal
__6:
	;
__2:
	;

	// The filesystem doesn't support 'load', so we fall back on the following
	// technique:
	//
	// First check if it is readable -- and exists!

	if !(XTcl_FSAccess(tls, pathPtr, R_OK) != 0) {
		goto __7
	}
	if !(interp != 0) {
		goto __8
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+38698,
		libc.VaList(bp, XTcl_GetString(tls, pathPtr), XTcl_PosixError(tls, interp))))
__8:
	;
	return TCL_ERROR
__7:
	;

	// Get a temporary filename to use, first to copy the file into, and then
	// to load.

	copyToPtr = XTclpTempFileNameForLibrary(tls, interp, pathPtr)
	if !(copyToPtr == uintptr(0)) {
		goto __9
	}
	return TCL_ERROR
__9:
	;
	(*Tcl_Obj)(unsafe.Pointer(copyToPtr)).FrefCount++

	copyFsPtr = XTcl_FSGetFileSystemForPath(tls, copyToPtr)
	if !(copyFsPtr == uintptr(0) || copyFsPtr == fsPtr) {
		goto __10
	}
	// We already know we can't use Tcl_FSLoadFile from this filesystem,
	// and we must avoid a possible infinite loop. Try to delete the file
	// we probably created, and then exit.

	XTcl_FSDeleteFile(tls, copyToPtr)
__11:
	_objPtr = copyToPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __14
	}
	XTclFreeObj(tls, _objPtr)
__14:
	;
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	if !(interp != 0) {
		goto __15
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+38729, -1))
__15:
	;
	return TCL_ERROR
__10:
	;

	if !(XTclCrossFilesystemCopy(tls, interp, pathPtr, copyToPtr) != TCL_OK) {
		goto __16
	}
	// Cross-platform copy failed.

	XTcl_FSDeleteFile(tls, copyToPtr)
__17:
	_objPtr1 = copyToPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __20
	}
	XTclFreeObj(tls, _objPtr1)
__20:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
	return TCL_ERROR
__16:
	;

	// We need to reset the result now, because the cross-filesystem copy may
	// have stored the number of bytes in the result.

	if !(interp != 0) {
		goto __21
	}
	XTcl_ResetResult(tls, interp)
__21:
	;

	retVal = XTcl_LoadFile(tls, interp, copyToPtr, symbols, flags, procPtrs,
		bp+24)
	if !(retVal != TCL_OK) {
		goto __22
	}
	// The file didn't load successfully.

	XTcl_FSDeleteFile(tls, copyToPtr)
__23:
	_objPtr2 = copyToPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __26
	}
	XTclFreeObj(tls, _objPtr2)
__26:
	;
	goto __24
__24:
	if 0 != 0 {
		goto __23
	}
	goto __25
__25:
	;
	return retVal
__22:
	;

	// Try to delete the file immediately - this is possible in some OSes, and
	// avoids any worries about leaving the copy laying around on exit.

	if !(!(skipUnlink(tls, copyToPtr) != 0) && XTcl_FSDeleteFile(tls, copyToPtr) == TCL_OK) {
		goto __27
	}
__28:
	_objPtr3 = copyToPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __31
	}
	XTclFreeObj(tls, _objPtr3)
__31:
	;
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;

	// We tell our caller about the real shared library which was loaded.
	// Note that this does mean that the package list maintained by 'load'
	// will store the original (vfs) path alongside the temporary load
	// handle and unload proc ptr.

	*(*Tcl_LoadHandle)(unsafe.Pointer(handlePtr)) = *(*Tcl_LoadHandle)(unsafe.Pointer(bp + 24 /* newLoadHandle */))
	if !(interp != 0) {
		goto __32
	}
	XTcl_ResetResult(tls, interp)
__32:
	;
	return TCL_OK
__27:
	;

	// When we unload this file, we need to divert the unloading so we can
	// unload and cleanup the temporary file correctly.

	tvdlPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FsDivertLoad{})))

	// Remember three pieces of information. This allows us to cleanup the
	// diverted load completely, on platforms which allow proper unloading of
	// code.

	(*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FloadHandle = *(*Tcl_LoadHandle)(unsafe.Pointer(bp + 24 /* newLoadHandle */))
	(*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FunloadProcPtr = newUnloadProcPtr

	if !(copyFsPtr != uintptr(unsafe.Pointer(&XtclNativeFilesystem))) {
		goto __33
	}
	// copyToPtr is already incremented for this reference.

	(*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFile = copyToPtr

	// This is the filesystem we loaded it into. Since we have a reference
	// to 'copyToPtr', we already have a refCount on this filesystem, so
	// we don't need to worry about it disappearing on us.

	(*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFilesystem = copyFsPtr
	(*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFileNativeRep = uintptr(0)
	goto __34
__33:
	// We need the native rep.

	(*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFileNativeRep = XTclNativeDupInternalRep(tls,
		XTcl_FSGetInternalRep(tls, copyToPtr, copyFsPtr))

	// We don't need or want references to the copied Tcl_Obj or the
	// filesystem if it is the native one.

	(*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFile = uintptr(0)
	(*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFilesystem = uintptr(0)
__35:
	_objPtr4 = copyToPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __38
	}
	XTclFreeObj(tls, _objPtr4)
__38:
	;
	goto __36
__36:
	if 0 != 0 {
		goto __35
	}
	goto __37
__37:
	;
__34:
	;

	copyToPtr = uintptr(0)

	divertedLoadHandle = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_LoadHandle_{})))
	(*Tcl_LoadHandle_)(unsafe.Pointer(divertedLoadHandle)).FclientData = tvdlPtr
	(*Tcl_LoadHandle_)(unsafe.Pointer(divertedLoadHandle)).FfindSymbolProcPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, Tcl_LoadHandle, uintptr) uintptr
	}{sDivertFindSymbol}))
	(*Tcl_LoadHandle_)(unsafe.Pointer(divertedLoadHandle)).FunloadFileProcPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, Tcl_LoadHandle)
	}{sDivertUnloadFile}))
	*(*Tcl_LoadHandle)(unsafe.Pointer(handlePtr)) = divertedLoadHandle

	if !(interp != 0) {
		goto __39
	}
	XTcl_ResetResult(tls, interp)
__39:
	;
	return retVal

resolveSymbols:
	// At this point, *handlePtr is already set up to the handle for the
	// loaded library. We now try to resolve the symbols.

	if !(symbols != uintptr(0)) {
		goto __40
	}
	i = 0
__41:
	if !(*(*uintptr)(unsafe.Pointer(symbols + uintptr(i)*8)) != uintptr(0)) {
		goto __43
	}
	*(*uintptr)(unsafe.Pointer(procPtrs + uintptr(i)*8)) = XTcl_FindSymbol(tls, interp, *(*Tcl_LoadHandle)(unsafe.Pointer(handlePtr)), *(*uintptr)(unsafe.Pointer(symbols + uintptr(i)*8)))
	if !(*(*uintptr)(unsafe.Pointer(procPtrs + uintptr(i)*8)) == uintptr(0)) {
		goto __44
	}
	// At least one symbol in the list was not found.  Unload the
	// file, and report the problem back to the caller.
	// (Tcl_FindSymbol should already have left an appropriate
	// error message.)

	(*struct {
		f func(*libc.TLS, Tcl_LoadHandle)
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_LoadHandle_)(unsafe.Pointer(*(*Tcl_LoadHandle)(unsafe.Pointer(handlePtr)))).FunloadFileProcPtr})).f(tls, *(*Tcl_LoadHandle)(unsafe.Pointer(handlePtr)))
	*(*Tcl_LoadHandle)(unsafe.Pointer(handlePtr)) = uintptr(0)
	return TCL_ERROR
__44:
	;
	goto __42
__42:
	i++
	goto __41
	goto __43
__43:
	;
__40:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DivertFindSymbol --
//
//	Find a symbol in a shared library loaded by copy-from-VFS.
//
//----------------------------------------------------------------------

func sDivertFindSymbol(tls *libc.TLS, interp uintptr, loadHandle Tcl_LoadHandle, symbol uintptr) uintptr { /* tclIOUtil.c:3539:13: */
	var tvdlPtr uintptr = (*Tcl_LoadHandle_)(unsafe.Pointer(loadHandle)).FclientData
	var originalHandle Tcl_LoadHandle = (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FloadHandle

	return (*struct {
		f func(*libc.TLS, uintptr, Tcl_LoadHandle, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_LoadHandle_)(unsafe.Pointer(originalHandle)).FfindSymbolProcPtr})).f(tls, interp, originalHandle, symbol)
}

//----------------------------------------------------------------------
//
// DivertUnloadFile --
//
//	Unloads a file that has been loaded by copying from VFS to the native
//	filesystem.
//
// Parameters:
//	loadHandle -- Handle of the file to unload
//
//----------------------------------------------------------------------

func sDivertUnloadFile(tls *libc.TLS, loadHandle Tcl_LoadHandle) { /* tclIOUtil.c:3566:1: */
	var tvdlPtr uintptr = (*Tcl_LoadHandle_)(unsafe.Pointer(loadHandle)).FclientData
	var originalHandle Tcl_LoadHandle

	// This test should never trigger, since we give the client data in the
	// function above.

	if tvdlPtr == uintptr(0) {
		return
	}
	originalHandle = (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FloadHandle

	// Call the real 'unloadfile' proc we actually used. It is very important
	// that we call this first, so that the shared library is actually
	// unloaded by the OS. Otherwise, the following 'delete' may well fail
	// because the shared library is still in use.

	(*struct {
		f func(*libc.TLS, Tcl_LoadHandle)
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_LoadHandle_)(unsafe.Pointer(originalHandle)).FunloadFileProcPtr})).f(tls, originalHandle)

	// What filesystem contains the temp copy of the library?

	if (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFilesystem == uintptr(0) {
		// It was the native filesystem, and we have a special function
		// available just for this purpose, which we know works even at this
		// late stage.

		XTclpDeleteFile(tls, (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFileNativeRep)
		sNativeFreeInternalRep(tls, (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFileNativeRep)
	} else {
		// Remove the temporary file we created. Note, we may crash here
		// because encodings have been taken down already.

		if (*struct {
			f func(*libc.TLS, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFilesystem)).FdeleteFileProc})).f(tls, (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFile) !=
			TCL_OK {
			// The above may have failed because the filesystem, or something
			// it depends upon (e.g. encodings) have been taken down because
			// Tcl is exiting.
			//
			// We may need to work out how to delete this file more robustly
			// (or give the filesystem the information it needs to delete the
			// file more robustly).
			//
			// In particular, one problem might be that the filesystem cannot
			// extract the information it needs from the above path object
			// because Tcl's entire filesystem apparatus (the code in this
			// file) has been finalized, and it refuses to pass the internal
			// representation to the filesystem.
		}

		// And free up the allocations. This will also of course remove a
		// refCount from the Tcl_Filesystem to which this file belongs, which
		// could then free up the filesystem if we are exiting.

		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFile
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	XTclpFree(tls, tvdlPtr)
	XTclpFree(tls, loadHandle)
}

//----------------------------------------------------------------------
//
// Tcl_FindSymbol --
//
//	Find a symbol in a loaded library
//
// Results:
//	Returns a pointer to the symbol if found. If not found, returns NULL
//	and leaves an error message in the interpreter result.
//
// This function was once filesystem-specific, but has been made portable by
// having TclpDlopen return a structure that includes procedure pointers.
//
//----------------------------------------------------------------------

func XTcl_FindSymbol(tls *libc.TLS, interp uintptr, loadHandle Tcl_LoadHandle, symbol uintptr) uintptr { /* tclIOUtil.c:3659:6: */
	return (*struct {
		f func(*libc.TLS, uintptr, Tcl_LoadHandle, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_LoadHandle_)(unsafe.Pointer(loadHandle)).FfindSymbolProcPtr})).f(tls, interp, loadHandle, symbol)
}

//----------------------------------------------------------------------
//
// Tcl_FSUnloadFile --
//
//	Unloads a library given its handle. Checks first that the library
//	supports unloading.
//
//----------------------------------------------------------------------

func XTcl_FSUnloadFile(tls *libc.TLS, interp uintptr, handle Tcl_LoadHandle) int32 { /* tclIOUtil.c:3680:1: */
	if (*Tcl_LoadHandle_)(unsafe.Pointer(handle)).FunloadFileProcPtr == uintptr(0) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+38767,
				-1))
		}
		return TCL_ERROR
	}
	if (*Tcl_LoadHandle_)(unsafe.Pointer(handle)).FunloadFileProcPtr != uintptr(0) {
		(*struct {
			f func(*libc.TLS, Tcl_LoadHandle)
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_LoadHandle_)(unsafe.Pointer(handle)).FunloadFileProcPtr})).f(tls, handle)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclFSUnloadTempFile --
//
//	This function is called when we loaded a library of code via an
//	intermediate temporary file. This function ensures the library is
//	correctly unloaded and the temporary file is correctly deleted.
//
// Results:
//	None.
//
// Side effects:
//	The effects of the 'unload' function called, and of course the
//	temporary file will be deleted.
//
//----------------------------------------------------------------------

func XTclFSUnloadTempFile(tls *libc.TLS, loadHandle Tcl_LoadHandle) { /* tclIOUtil.c:3718:1: */
	var tvdlPtr uintptr = loadHandle

	// This test should never trigger, since we give the client data in the
	// function above.

	if tvdlPtr == uintptr(0) {
		return
	}

	// Call the real 'unloadfile' proc we actually used. It is very important
	// that we call this first, so that the shared library is actually
	// unloaded by the OS. Otherwise, the following 'delete' may well fail
	// because the shared library is still in use.

	if (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FunloadProcPtr != uintptr(0) {
		(*struct {
			f func(*libc.TLS, Tcl_LoadHandle)
		})(unsafe.Pointer(&struct{ uintptr }{(*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FunloadProcPtr})).f(tls, (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FloadHandle)
	}

	if (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFilesystem == uintptr(0) {
		// It was the native filesystem, and we have a special function
		// available just for this purpose, which we know works even at this
		// late stage.

		XTclpDeleteFile(tls, (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFileNativeRep)
		sNativeFreeInternalRep(tls, (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFileNativeRep)
	} else {
		// Remove the temporary file we created. Note, we may crash here
		// because encodings have been taken down already.

		if (*struct {
			f func(*libc.TLS, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFilesystem)).FdeleteFileProc})).f(tls, (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFile) !=
			TCL_OK {
			// The above may have failed because the filesystem, or something
			// it depends upon (e.g. encodings) have been taken down because
			// Tcl is exiting.
			//
			// We may need to work out how to delete this file more robustly
			// (or give the filesystem the information it needs to delete the
			// file more robustly).
			//
			// In particular, one problem might be that the filesystem cannot
			// extract the information it needs from the above path object
			// because Tcl's entire filesystem apparatus (the code in this
			// file) has been finalized, and it refuses to pass the internal
			// representation to the filesystem.
		}

		// And free up the allocations. This will also of course remove a
		// refCount from the Tcl_Filesystem to which this file belongs, which
		// could then free up the filesystem if we are exiting.

		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*FsDivertLoad)(unsafe.Pointer(tvdlPtr)).FdivertedFile
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	XTclpFree(tls, tvdlPtr)
}

//---------------------------------------------------------------------------
//
// Tcl_FSLink --
//
//	This function replaces the library version of readlink() and can also
//	be used to make links. The appropriate function for the filesystem to
//	which pathPtr belongs will be called.
//
// Results:
//	If toPtr is NULL, then the result is a Tcl_Obj specifying the contents
//	of the symbolic link given by 'pathPtr', or NULL if the symbolic link
//	could not be read. The result is owned by the caller, which should
//	call Tcl_DecrRefCount when the result is no longer needed.
//
//	If toPtr is non-NULL, then the result is toPtr if the link action was
//	successful, or NULL if not. In this case the result has no additional
//	reference count, and need not be freed. The actual action to perform
//	is given by the 'linkAction' flags, which is an or'd combination of:
//
//		TCL_CREATE_SYMBOLIC_LINK
//		TCL_CREATE_HARD_LINK
//
//	Note that most filesystems will not support linking across to
//	different filesystems, so this function will usually fail unless toPtr
//	is in the same FS as pathPtr.
//
// Side effects:
//	See readlink() documentation. A new filesystem link object may appear.
//
//---------------------------------------------------------------------------

func XTcl_FSLink(tls *libc.TLS, pathPtr uintptr, toPtr uintptr, linkAction int32) uintptr { /* tclIOUtil.c:3824:9: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FlinkProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FlinkProc})).f(tls, pathPtr, toPtr, linkAction)
	}

	// If S_IFLNK isn't defined it means that the machine doesn't support
	// symbolic links, so the file can't possibly be a symbolic link. Generate
	// an EINVAL error, which is what happens on machines that do support
	// symbolic links when you invoke readlink on a file that isn't a symbolic
	// link.

	XTcl_SetErrno(tls, ENOENT)
	return uintptr(0)
}

//---------------------------------------------------------------------------
//
// Tcl_FSListVolumes --
//
//	Lists the currently mounted volumes. The chain of functions that have
//	been "inserted" into the filesystem will be called in succession; each
//	may return a list of volumes, all of which are added to the result
//	until all mounted file systems are listed.
//
//	Notice that we assume the lists returned by each filesystem (if non
//	NULL) have been given a refCount for us already. However, we are NOT
//	allowed to hang on to the list itself (it belongs to the filesystem we
//	called). Therefore we quite naturally add its contents to the result
//	we are building, and then decrement the refCount.
//
// Results:
//	The list of volumes, in an object which has refCount 0.
//
// Side effects:
//	None
//
//---------------------------------------------------------------------------

func XTcl_FSListVolumes(tls *libc.TLS) uintptr { /* tclIOUtil.c:3877:9: */
	var fsRecPtr uintptr
	var resultPtr uintptr = XTcl_NewObj(tls)

	// Call each of the "listVolumes" function in succession. A non-NULL
	// return value indicates the particular function has succeeded. We call
	// all the functions registered, since we want a list of all drives from
	// all filesystems.

	fsRecPtr = sFsGetFirstFilesystem(tls)
	sClaim(tls)
	for fsRecPtr != uintptr(0) {
		if (*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FlistVolumesProc != uintptr(0) {
			var thisFsVolumes uintptr = (*struct{ f func(*libc.TLS) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FlistVolumesProc})).f(tls)

			if thisFsVolumes != uintptr(0) {
				XTcl_ListObjAppendList(tls, uintptr(0), resultPtr, thisFsVolumes)
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = thisFsVolumes
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
		}
		fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
	}
	sDisclaim(tls)

	return resultPtr
}

//---------------------------------------------------------------------------
//
// FsListMounts --
//
//	List all mounts within the given directory, which match the given
//	pattern.
//
// Results:
//	The list of mounts, in a list object which has refCount 0, or NULL if
//	we didn't even find any filesystems to try to list mounts.
//
// Side effects:
//	None
//
//---------------------------------------------------------------------------

func sFsListMounts(tls *libc.TLS, pathPtr uintptr, pattern uintptr) uintptr { /* tclIOUtil.c:3926:16: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var fsRecPtr uintptr
	*(*Tcl_GlobTypeData)(unsafe.Pointer(bp /* mountsOnly */)) = Tcl_GlobTypeData{Ftype: int32(1) << 7}
	var resultPtr uintptr = uintptr(0)

	// Call each of the "matchInDirectory" functions in succession, with the
	// specific type information 'mountsOnly'. A non-NULL return value
	// indicates the particular function has succeeded. We call all the
	// functions registered, since we want a list from each filesystems.

	fsRecPtr = sFsGetFirstFilesystem(tls)
	sClaim(tls)
	for fsRecPtr != uintptr(0) {
		if (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr != uintptr(unsafe.Pointer(&XtclNativeFilesystem)) && (*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FmatchInDirectoryProc != uintptr(0) {
			if resultPtr == uintptr(0) {
				resultPtr = XTcl_NewObj(tls)
			}
			(*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FmatchInDirectoryProc})).f(tls, uintptr(0), resultPtr, pathPtr,
				pattern, bp /* &mountsOnly */)
		}
		fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
	}
	sDisclaim(tls)

	return resultPtr
}

//---------------------------------------------------------------------------
//
// Tcl_FSSplitPath --
//
//	This function takes the given Tcl_Obj, which should be a valid path,
//	and returns a Tcl List object containing each segment of that path as
//	an element.
//
// Results:
//	Returns list object with refCount of zero. If the passed in lenPtr is
//	non-NULL, we use it to return the number of elements in the returned
//	list.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_FSSplitPath(tls *libc.TLS, pathPtr uintptr, lenPtr uintptr) uintptr { /* tclIOUtil.c:3980:9: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var result uintptr = uintptr(0) // Needed only to prevent gcc warnings.
	// var fsPtr uintptr at bp, 8

	var separator int8 = int8('/')
	// var driveNameLength int32 at bp+8, 4

	var p uintptr

	// Perform platform specific splitting.

	if XTclFSGetPathType(tls, pathPtr, bp,
		bp+8) == TCL_PATH_ABSOLUTE {
		if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(unsafe.Pointer(&XtclNativeFilesystem)) {
			return XTclpNativeSplitPath(tls, pathPtr, lenPtr)
		}
	} else {
		return XTclpNativeSplitPath(tls, pathPtr, lenPtr)
	}

	// We assume separators are single characters.

	if (*Tcl_Filesystem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FfilesystemSeparatorProc != uintptr(0) {
		var sep uintptr = (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* fsPtr */)))).FfilesystemSeparatorProc})).f(tls, pathPtr)

		if sep != uintptr(0) {
			(*Tcl_Obj)(unsafe.Pointer(sep)).FrefCount++
			separator = *(*int8)(unsafe.Pointer(XTcl_GetString(tls, sep)))
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = sep
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
	}

	// Place the drive name as first element of the result list. The drive
	// name may contain strange characters, like colons and multiple forward
	// slashes (for example 'ftp://' is a valid vfs drive name)

	result = XTcl_NewObj(tls)
	p = XTcl_GetString(tls, pathPtr)
	XTcl_ListObjAppendElement(tls, uintptr(0), result,
		XTcl_NewStringObj(tls, p, *(*int32)(unsafe.Pointer(bp + 8 /* driveNameLength */))))
	p += uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* driveNameLength */)))

	// Add the remaining path elements to the list.

	for {
		var elementStart uintptr = p
		var length int32

		for int32(*(*int8)(unsafe.Pointer(p))) != 0 && int32(*(*int8)(unsafe.Pointer(p))) != int32(separator) {
			p++
		}
		length = int32((int64(p) - int64(elementStart)) / 1)
		if length > 0 {
			var nextElt uintptr

			if int32(*(*int8)(unsafe.Pointer(elementStart))) == '~' {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						nextElt = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(nextElt)).FrefCount = 0
					if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes, ts+31379, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nextElt)).Fbytes + 2)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(nextElt)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
					}
					(*Tcl_Obj)(unsafe.Pointer(nextElt)).FtypePtr = uintptr(0)
					{
					}
				}
				XTcl_AppendToObj(tls, nextElt, elementStart, length)
			} else {
				nextElt = XTcl_NewStringObj(tls, elementStart, length)
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), result, nextElt)
		}
		if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))) == 0 {
			break
		}
	}

	// Compute the number of elements in the result.

	if lenPtr != uintptr(0) {
		if (*Tcl_Obj)(unsafe.Pointer(result)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			*(*int32)(unsafe.Pointer(lenPtr)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(result + 32)))).FelemCount
		} else {
			XTcl_ListObjLength(tls, uintptr(0), result, lenPtr)
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// TclGetPathType --
//
//	Helper function used by FSGetPathType.
//
// Results:
//	Returns one of TCL_PATH_ABSOLUTE, TCL_PATH_RELATIVE, or
//	TCL_PATH_VOLUME_RELATIVE. The filesystem reference will be set if and
//	only if it is non-NULL and the function's return value is
//	TCL_PATH_ABSOLUTE.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetPathType(tls *libc.TLS, pathPtr uintptr, filesystemPtrPtr uintptr, driveNameLengthPtr uintptr, driveNameRef uintptr) Tcl_PathType { /* tclIOUtil.c:4087:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var pathLen int32 at bp, 4

	var path uintptr = XTcl_GetStringFromObj(tls, pathPtr, bp)
	var type1 Tcl_PathType

	type1 = XTclFSNonnativePathType(tls, path, *(*int32)(unsafe.Pointer(bp /* pathLen */)), filesystemPtrPtr,
		driveNameLengthPtr, driveNameRef)

	if type1 != TCL_PATH_ABSOLUTE {
		type1 = XTclpGetNativePathType(tls, pathPtr, driveNameLengthPtr,
			driveNameRef)
		if type1 == TCL_PATH_ABSOLUTE && filesystemPtrPtr != uintptr(0) {
			*(*uintptr)(unsafe.Pointer(filesystemPtrPtr)) = uintptr(unsafe.Pointer(&XtclNativeFilesystem))
		}
	}
	return type1
}

//----------------------------------------------------------------------
//
// TclFSNonnativePathType --
//
//	Helper function used by TclGetPathType. Its purpose is to check
//	whether the given path starts with a string which corresponds to a
//	file volume in any registered filesystem except the native one. For
//	speed and historical reasons the native filesystem has special
//	hard-coded checks dotted here and there in the filesystem code.
//
// Results:
//	Returns one of TCL_PATH_ABSOLUTE or TCL_PATH_RELATIVE. The filesystem
//	reference will be set if and only if it is non-NULL and the function's
//	return value is TCL_PATH_ABSOLUTE.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFSNonnativePathType(tls *libc.TLS, path uintptr, pathLen int32, filesystemPtrPtr uintptr, driveNameLengthPtr uintptr, driveNameRef uintptr) Tcl_PathType { /* tclIOUtil.c:4142:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var fsRecPtr uintptr
	var type1 Tcl_PathType = TCL_PATH_RELATIVE

	// Call each of the "listVolumes" function in succession, checking whether
	// the given path is an absolute path on any of the volumes returned (this
	// is done by checking whether the path's prefix matches).

	fsRecPtr = sFsGetFirstFilesystem(tls)
	sClaim(tls)
	for fsRecPtr != uintptr(0) {
		// We want to skip the native filesystem in this loop because
		// otherwise we won't necessarily pass all the Tcl testsuite - this is
		// because some of the tests artificially change the current platform
		// (between win, unix) but the list of volumes we get by calling
		// fsRecPtr->fsPtr->listVolumesProc will reflect the current (real)
		// platform only and this may cause some tests to fail. In particular,
		// on Unix '/' will match the beginning of certain absolute Windows
		// paths starting '//' and those tests will go wrong.
		//
		// Besides these test-suite issues, there is one other reason to skip
		// the native filesystem - since the tclFilename.c code has nice fast
		// 'absolute path' checkers, we don't want to waste time repeating
		// that effort here, and this function is actually called quite often,
		// so if we can save the overhead of the native filesystem returning
		// us a list of volumes all the time, it is better.

		if (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr != uintptr(unsafe.Pointer(&XtclNativeFilesystem)) &&
			(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FlistVolumesProc != uintptr(0) {
			// var numVolumes int32 at bp, 4

			var thisFsVolumes uintptr = (*struct{ f func(*libc.TLS) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FlistVolumesProc})).f(tls)

			if thisFsVolumes != uintptr(0) {
				if XTcl_ListObjLength(tls, uintptr(0), thisFsVolumes, bp) !=
					TCL_OK {
					// This is VERY bad; the listVolumesProc didn't return a
					// valid list. Set numVolumes to -1 so that we skip the
					// while loop below and just return with the current value
					// of 'type'.
					//
					// It would be better if we could signal an error here
					// (but Tcl_Panic seems a bit excessive).

					*(*int32)(unsafe.Pointer(bp /* numVolumes */)) = -1
				}
				for *(*int32)(unsafe.Pointer(bp)) > 0 {
					// var vol uintptr at bp+8, 8

					// var len int32 at bp+16, 4

					var strVol uintptr

					*(*int32)(unsafe.Pointer(bp /* numVolumes */))--
					XTcl_ListObjIndex(tls, uintptr(0), thisFsVolumes, *(*int32)(unsafe.Pointer(bp /* numVolumes */)), bp+8)
					strVol = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* vol */)), bp+16)
					if pathLen < *(*int32)(unsafe.Pointer(bp + 16)) {
						continue
					}
					if libc.Xstrncmp(tls, strVol, path, uint64(*(*int32)(unsafe.Pointer(bp + 16)))) == 0 {
						type1 = TCL_PATH_ABSOLUTE
						if filesystemPtrPtr != uintptr(0) {
							*(*uintptr)(unsafe.Pointer(filesystemPtrPtr)) = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr
						}
						if driveNameLengthPtr != uintptr(0) {
							*(*int32)(unsafe.Pointer(driveNameLengthPtr)) = *(*int32)(unsafe.Pointer(bp + 16 /* len */))
						}
						if driveNameRef != uintptr(0) {
							*(*uintptr)(unsafe.Pointer(driveNameRef)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* vol */))
							(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FrefCount++
						}
						break
					}
				}
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = thisFsVolumes
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				if type1 == TCL_PATH_ABSOLUTE {
					// We don't need to examine any more filesystems.

					break
				}
			}
		}
		fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr
	}
	sDisclaim(tls)
	return type1
}

//---------------------------------------------------------------------------
//
// Tcl_FSRenameFile --
//
//	If the two paths given belong to the same filesystem, we call that
//	filesystems rename function. Otherwise we simply return the POSIX
//	error 'EXDEV', and -1.
//
// Results:
//	Standard Tcl error code if a function was called.
//
// Side effects:
//	A file may be renamed.
//
//---------------------------------------------------------------------------

func XTcl_FSRenameFile(tls *libc.TLS, srcPathPtr uintptr, destPathPtr uintptr) int32 { /* tclIOUtil.c:4269:1: */
	var retVal int32 = -1
	var fsPtr uintptr
	var fsPtr2 uintptr

	fsPtr = XTcl_FSGetFileSystemForPath(tls, srcPathPtr)
	fsPtr2 = XTcl_FSGetFileSystemForPath(tls, destPathPtr)

	if fsPtr == fsPtr2 && fsPtr != uintptr(0) &&
		(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FrenameFileProc != uintptr(0) {
		retVal = (*struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FrenameFileProc})).f(tls, srcPathPtr, destPathPtr)
	}
	if retVal == -1 {
		XTcl_SetErrno(tls, EXDEV)
	}
	return retVal
}

//---------------------------------------------------------------------------
//
// Tcl_FSCopyFile --
//
//	If the two paths given belong to the same filesystem, we call that
//	filesystem's copy function. Otherwise we simply return the POSIX error
//	'EXDEV', and -1.
//
//	Note that in the native filesystems, 'copyFileProc' is defined to copy
//	soft links (i.e. it copies the links themselves, not the things they
//	point to).
//
// Results:
//	Standard Tcl error code if a function was called.
//
// Side effects:
//	A file may be copied.
//
//---------------------------------------------------------------------------

func XTcl_FSCopyFile(tls *libc.TLS, srcPathPtr uintptr, destPathPtr uintptr) int32 { /* tclIOUtil.c:4314:1: */
	var retVal int32 = -1
	var fsPtr uintptr
	var fsPtr2 uintptr

	fsPtr = XTcl_FSGetFileSystemForPath(tls, srcPathPtr)
	fsPtr2 = XTcl_FSGetFileSystemForPath(tls, destPathPtr)

	if fsPtr == fsPtr2 && fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FcopyFileProc != uintptr(0) {
		retVal = (*struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FcopyFileProc})).f(tls, srcPathPtr, destPathPtr)
	}
	if retVal == -1 {
		XTcl_SetErrno(tls, EXDEV)
	}
	return retVal
}

//---------------------------------------------------------------------------
//
// TclCrossFilesystemCopy --
//
//	Helper for above function, and for Tcl_FSLoadFile, to copy files from
//	one filesystem to another. This function will overwrite the target
//	file if it already exists.
//
// Results:
//	Standard Tcl error code.
//
// Side effects:
//	A file may be created.
//
//---------------------------------------------------------------------------

func XTclCrossFilesystemCopy(tls *libc.TLS, interp uintptr, source uintptr, target uintptr) int32 { /* tclIOUtil.c:4352:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var result int32
	var prot int32
	var in Tcl_Channel
	var out Tcl_Channel
	// var sourceStatBuf Tcl_StatBuf at bp, 56

	// var tval Utimbuf at bp+56, 16
	result = TCL_ERROR
	prot = 0666

	out = XTcl_FSOpenFileChannel(tls, interp, target, ts+38820, prot)
	if !(out == uintptr(0)) {
		goto __1
	}
	// It looks like we cannot copy it over. Bail out...
	goto done
__1:
	;

	in = XTcl_FSOpenFileChannel(tls, interp, source, ts+38823, prot)
	if !(in == uintptr(0)) {
		goto __2
	}
	// This is very strange, caller should have checked this...

	XTcl_Close(tls, interp, out)
	goto done
__2:
	;

	// Copy it synchronously. We might wish to add an asynchronous option to
	// support vfs's which are slow (e.g. network sockets).

	if !(XTclCopyChannel(tls, interp, in, out, int64(-1), uintptr(0)) == TCL_OK) {
		goto __3
	}
	result = TCL_OK
__3:
	;

	// If the copy failed, assume that copy channel left a good error message.

	XTcl_Close(tls, interp, in)
	XTcl_Close(tls, interp, out)

	// Set modification date of copied file.

	if !(XTcl_FSLstat(tls, source, bp) == 0) {
		goto __4
	}
	(*Utimbuf)(unsafe.Pointer(bp + 56 /* &tval */)).Factime = XTcl_GetAccessTimeFromStat(tls, bp)
	(*Utimbuf)(unsafe.Pointer(bp + 56 /* &tval */)).Fmodtime = XTcl_GetModificationTimeFromStat(tls, bp)
	XTcl_FSUtime(tls, target, bp+56)
__4:
	;

done:
	return result
}

//---------------------------------------------------------------------------
//
// Tcl_FSDeleteFile --
//
//	The appropriate function for the filesystem to which pathPtr belongs
//	will be called.
//
// Results:
//	Standard Tcl error code.
//
// Side effects:
//	A file may be deleted.
//
//---------------------------------------------------------------------------

func XTcl_FSDeleteFile(tls *libc.TLS, pathPtr uintptr) int32 { /* tclIOUtil.c:4429:1: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FdeleteFileProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FdeleteFileProc})).f(tls, pathPtr)
	}
	XTcl_SetErrno(tls, ENOENT)
	return -1
}

//---------------------------------------------------------------------------
//
// Tcl_FSCreateDirectory --
//
//	The appropriate function for the filesystem to which pathPtr belongs
//	will be called.
//
// Results:
//	Standard Tcl error code.
//
// Side effects:
//	A directory may be created.
//
//---------------------------------------------------------------------------

func XTcl_FSCreateDirectory(tls *libc.TLS, pathPtr uintptr) int32 { /* tclIOUtil.c:4459:1: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FcreateDirectoryProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FcreateDirectoryProc})).f(tls, pathPtr)
	}
	XTcl_SetErrno(tls, ENOENT)
	return -1
}

//---------------------------------------------------------------------------
//
// Tcl_FSCopyDirectory --
//
//	If the two paths given belong to the same filesystem, we call that
//	filesystems copy-directory function. Otherwise we simply return the
//	POSIX error 'EXDEV', and -1.
//
// Results:
//	Standard Tcl error code if a function was called.
//
// Side effects:
//	A directory may be copied.
//
//---------------------------------------------------------------------------

func XTcl_FSCopyDirectory(tls *libc.TLS, srcPathPtr uintptr, destPathPtr uintptr, errorPtr uintptr) int32 { /* tclIOUtil.c:4490:1: */
	var retVal int32 = -1
	var fsPtr uintptr
	var fsPtr2 uintptr

	fsPtr = XTcl_FSGetFileSystemForPath(tls, srcPathPtr)
	fsPtr2 = XTcl_FSGetFileSystemForPath(tls, destPathPtr)

	if fsPtr == fsPtr2 && fsPtr != uintptr(0) && (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FcopyDirectoryProc != uintptr(0) {
		retVal = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FcopyDirectoryProc})).f(tls, srcPathPtr, destPathPtr, errorPtr)
	}
	if retVal == -1 {
		XTcl_SetErrno(tls, EXDEV)
	}
	return retVal
}

//---------------------------------------------------------------------------
//
// Tcl_FSRemoveDirectory --
//
//	The appropriate function for the filesystem to which pathPtr belongs
//	will be called.
//
// Results:
//	Standard Tcl error code.
//
// Side effects:
//	A directory may be deleted.
//
//---------------------------------------------------------------------------

func XTcl_FSRemoveDirectory(tls *libc.TLS, pathPtr uintptr, recursive int32, errorPtr uintptr) int32 { /* tclIOUtil.c:4531:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr == uintptr(0) || (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FremoveDirectoryProc == uintptr(0) {
		XTcl_SetErrno(tls, ENOENT)
		return -1
	}

	// When working recursively, we check whether the cwd lies inside this
	// directory and move it if it does.

	if recursive != 0 {
		var cwdPtr uintptr = XTcl_FSGetCwd(tls, uintptr(0))

		if cwdPtr != uintptr(0) {
			var cwdStr uintptr
			var normPathStr uintptr
			// var cwdLen int32 at bp+4, 4

			// var normLen int32 at bp, 4

			var normPath uintptr = XTcl_FSGetNormalizedPath(tls, uintptr(0), pathPtr)

			if normPath != uintptr(0) {
				normPathStr = XTcl_GetStringFromObj(tls, normPath, bp)
				cwdStr = XTcl_GetStringFromObj(tls, cwdPtr, bp+4)
				if *(*int32)(unsafe.Pointer(bp + 4)) >= *(*int32)(unsafe.Pointer(bp)) && libc.Xstrncmp(tls, normPathStr, cwdStr,
					Size_t(*(*int32)(unsafe.Pointer(bp)))) == 0 {
					// The cwd is inside the directory, so we perform a 'cd
					// [file dirname $path]'.

					var dirPtr uintptr = XTclPathPart(tls, uintptr(0), pathPtr,
						TCL_PATH_DIRNAME)

					XTcl_FSChdir(tls, dirPtr)
					for ok := true; ok; ok = 0 != 0 {
						var _objPtr uintptr = dirPtr
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
				}
			}
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = cwdPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
	}
	return (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FremoveDirectoryProc})).f(tls, pathPtr, recursive, errorPtr)
}

//---------------------------------------------------------------------------
//
// Tcl_FSGetFileSystemForPath --
//
//	This function determines which filesystem to use for a particular path
//	object, and returns the filesystem which accepts this file. If no
//	filesystem will accept this object as a valid file path, then NULL is
//	returned.
//
// Results:
//	NULL or a filesystem which will accept this path.
//
// Side effects:
//	The object may be converted to a path type.
//
//---------------------------------------------------------------------------

func XTcl_FSGetFileSystemForPath(tls *libc.TLS, pathPtr uintptr) uintptr { /* tclIOUtil.c:4603:22: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var fsRecPtr uintptr
	*(*uintptr)(unsafe.Pointer(bp /* retVal */)) = uintptr(0)

	if pathPtr == uintptr(0) {
		XTcl_Panic(tls, ts+38826, 0)
		return uintptr(0)
	}

	// If the object has a refCount of zero, we reject it. This is to avoid
	// possible segfaults or nondeterministic memory leaks (i.e. the user
	// doesn't know if they should decrement the ref count on return or not).

	if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount == 0 {
		XTcl_Panic(tls, ts+38877, 0)
		return uintptr(0)
	}

	// Check if the filesystem has changed in some way since this object's
	// internal representation was calculated. Before doing that, assure we
	// have the most up-to-date copy of the first filesystem. This is
	// accomplished by the FsGetFirstFilesystem() call.

	fsRecPtr = sFsGetFirstFilesystem(tls)
	sClaim(tls)

	if XTclFSEnsureEpochOk(tls, pathPtr, bp) != TCL_OK {
		sDisclaim(tls)
		return uintptr(0)
	} else if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) {
		// TODO: Can this happen?
		sDisclaim(tls)
		return *(*uintptr)(unsafe.Pointer(bp /* retVal */))
	}

	// Call each of the "pathInFilesystem" functions in succession. A
	// non-return value of -1 indicates the particular function has succeeded.

	for ; fsRecPtr != uintptr(0); fsRecPtr = (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FnextPtr {
		*(*ClientData)(unsafe.Pointer(bp + 8 /* clientData */)) = uintptr(0)

		if (*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FpathInFilesystemProc == uintptr(0) {
			continue
		}

		if (*struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer((*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr)).FpathInFilesystemProc})).f(tls, pathPtr, bp+8) != -1 {

			XTclFSSetPathDetails(tls, pathPtr, (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr, *(*ClientData)(unsafe.Pointer(bp + 8 /* clientData */)))
			sDisclaim(tls)
			return (*FilesystemRecord)(unsafe.Pointer(fsRecPtr)).FfsPtr
		}
	}
	sDisclaim(tls)

	return uintptr(0)
}

//---------------------------------------------------------------------------
//
// Tcl_FSGetNativePath --
//
//	This function is for use by the Win/Unix native filesystems, so that
//	they can easily retrieve the native (char* or WCHAR*) representation
//	of a path. Other filesystems will probably want to implement similar
//	functions. They basically act as a safety net around
//	Tcl_FSGetInternalRep. Normally your file-system functions will always
//	be called with path objects already converted to the correct
//	filesystem, but if for some reason they are called directly (i.e. by
//	functions not in this file), then one cannot necessarily guarantee
//	that the path object pointer is from the correct filesystem.
//
//	Note: in the future it might be desirable to have separate versions
//	of this function with different signatures, for example
//	Tcl_FSGetNativeWinPath, Tcl_FSGetNativeUnixPath etc. Right now, since
//	native paths are all string based, we use just one function.
//
// Results:
//	NULL or a valid native path.
//
// Side effects:
//	See Tcl_FSGetInternalRep.
//
//---------------------------------------------------------------------------

func XTcl_FSGetNativePath(tls *libc.TLS, pathPtr uintptr) uintptr { /* tclIOUtil.c:4702:12: */
	return XTcl_FSGetInternalRep(tls, pathPtr, uintptr(unsafe.Pointer(&XtclNativeFilesystem)))
}

//---------------------------------------------------------------------------
//
// NativeFreeInternalRep --
//
//	Free a native internal representation, which will be non-NULL.
//
// Results:
//	None.
//
// Side effects:
//	Memory is released.
//
//---------------------------------------------------------------------------

func sNativeFreeInternalRep(tls *libc.TLS, clientData ClientData) { /* tclIOUtil.c:4726:1: */
	XTclpFree(tls, clientData)
}

//---------------------------------------------------------------------------
//
// Tcl_FSFileSystemInfo --
//
//	This function returns a list of two elements. The first element is the
//	name of the filesystem (e.g. "native" or "vfs"), and the second is the
//	particular type of the given path within that filesystem.
//
// Results:
//	A list of two elements.
//
// Side effects:
//	The object may be converted to a path type.
//
//---------------------------------------------------------------------------

func XTcl_FSFileSystemInfo(tls *libc.TLS, pathPtr uintptr) uintptr { /* tclIOUtil.c:4750:9: */
	var resPtr uintptr
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

	if fsPtr == uintptr(0) {
		return uintptr(0)
	}

	resPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	XTcl_ListObjAppendElement(tls, uintptr(0), resPtr,
		XTcl_NewStringObj(tls, (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FtypeName, -1))

	if (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfilesystemPathTypeProc != uintptr(0) {
		var typePtr uintptr = (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfilesystemPathTypeProc})).f(tls, pathPtr)

		if typePtr != uintptr(0) {
			XTcl_ListObjAppendElement(tls, uintptr(0), resPtr, typePtr)
		}
	}

	return resPtr
}

//---------------------------------------------------------------------------
//
// Tcl_FSPathSeparator --
//
//	This function returns the separator to be used for a given path. The
//	object returned should have a refCount of zero
//
// Results:
//	A Tcl object, with a refCount of zero. If the caller needs to retain a
//	reference to the object, it should call Tcl_IncrRefCount, and should
//	otherwise free the object.
//
// Side effects:
//	The path object may be converted to a path type.
//
//---------------------------------------------------------------------------

func XTcl_FSPathSeparator(tls *libc.TLS, pathPtr uintptr) uintptr { /* tclIOUtil.c:4795:9: */
	var fsPtr uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)
	var resultObj uintptr

	if fsPtr == uintptr(0) {
		return uintptr(0)
	}

	if (*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfilesystemSeparatorProc != uintptr(0) {
		return (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fsPtr)).FfilesystemSeparatorProc})).f(tls, pathPtr)
	}

	// Allow filesystems not to provide a filesystemSeparatorProc if they wish
	// to use the standard forward slash.

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			resultObj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes, ts+6377, uint64(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes + 1)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = int32(uint64(unsafe.Sizeof([2]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)
		{
		}
	}
	return resultObj
}

//---------------------------------------------------------------------------
//
// NativeFilesystemSeparator --
//
//	This function is part of the native filesystem support, and returns
//	the separator for the given path.
//
// Results:
//	String object containing the separator character.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sNativeFilesystemSeparator(tls *libc.TLS, pathPtr uintptr) uintptr { /* tclIOUtil.c:4836:16: */
	var separator uintptr = uintptr(0) // lint

	switch XtclPlatform {
	case TCL_PLATFORM_UNIX:
		separator = ts + 6377 /* "/" */
		break
	case TCL_PLATFORM_WINDOWS:
		separator = ts + 13358 /* "\\" */
		break
	}
	return XTcl_NewStringObj(tls, separator, 1)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The structure below defines the index Tcl object type by means of functions
// that can be invoked by generic object code.

var indexType = Tcl_ObjType{
	Fname:             ts + 17232,
	FfreeIntRepProc:   0, // freeIntRepProc
	FdupIntRepProc:    0, // dupIntRepProc
	FupdateStringProc: 0, // setFromAnyProc
} /* tclIndexObj.c:45:26 */

// The definition of the internal representation of the "index" object; The
// internalRep.twoPtrValue.ptr1 field of an object of "index" type will be a
// pointer to one of these structures.
//
// Keep this structure declaration in sync with tclTestObj.c

type IndexRep = struct {
	FtablePtr uintptr
	Foffset   int32
	Findex    int32
} /* tclIndexObj.c:65:3 */

// The following macros greatly simplify moving through a table...

//----------------------------------------------------------------------
//
// Tcl_GetIndexFromObj --
//
//	This function looks up an object's value in a table of strings and
//	returns the index of the matching string, if any.
//
// Results:
//	If the value of objPtr is identical to or a unique abbreviation for
//	one of the entries in tablePtr, then the return value is TCL_OK and the
//	index of the matching entry is stored at *indexPtr. If there isn't a
//	proper match, then TCL_ERROR is returned and an error message is left
//	in interp's result (unless interp is NULL). The msg argument is used
//	in the error message; for example, if msg has the value "option" then
//	the error message will say something flag 'bad option "foo": must be
//	...'
//
// Side effects:
//	The result of the lookup is cached as the internal rep of objPtr, so
//	that repeated lookups can be done quickly.
//
//----------------------------------------------------------------------

func XTcl_GetIndexFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, tablePtr uintptr, msg uintptr, flags int32, indexPtr uintptr) int32 { /* tclIndexObj.c:105:1: */

	// See if there is a valid cached result from a previous lookup (doing the
	// check here saves the overhead of calling Tcl_GetIndexFromObjStruct in
	// the common case where the result is cached).

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&indexType)) {
		var indexRep uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

		// Here's hoping we don't get hit by unfortunate packing constraints
		// on odd platforms like a Cray PVP...

		if (*IndexRep)(unsafe.Pointer(indexRep)).FtablePtr == tablePtr &&
			uint64((*IndexRep)(unsafe.Pointer(indexRep)).Foffset) == uint64(unsafe.Sizeof(uintptr(0))) {
			*(*int32)(unsafe.Pointer(indexPtr)) = (*IndexRep)(unsafe.Pointer(indexRep)).Findex
			return TCL_OK
		}
	}
	return XTcl_GetIndexFromObjStruct(tls, interp, objPtr, tablePtr, int32(unsafe.Sizeof(uintptr(0))),
		msg, flags, indexPtr)
}

//----------------------------------------------------------------------
//
// GetIndexFromObjList --
//
//	This procedure looks up an object's value in a table of strings and
//	returns the index of the matching string, if any.
//
// Results:
//	If the value of objPtr is identical to or a unique abbreviation for
//	one of the entries in tableObjPtr, then the return value is TCL_OK and
//	the index of the matching entry is stored at *indexPtr. If there isn't
//	a proper match, then TCL_ERROR is returned and an error message is
//	left in interp's result (unless interp is NULL). The msg argument is
//	used in the error message; for example, if msg has the value "option"
//	then the error message will say something flag 'bad option "foo": must
//	be ...'
//
// Side effects:
//	Removes any internal representation that the object might have. (TODO:
//	find a way to cache the lookup.)
//
//----------------------------------------------------------------------

func XGetIndexFromObjList(tls *libc.TLS, interp uintptr, objPtr uintptr, tableObjPtr uintptr, msg uintptr, flags int32, indexPtr uintptr) int32 { /* tclIndexObj.c:167:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var objc int32 at bp, 4

	var result int32
	var t int32
	// var objv uintptr at bp+8, 8

	var tablePtr uintptr

	// Use Tcl_GetIndexFromObjStruct to do the work to avoid duplicating most
	// of the code there. This is a bit ineffiecient but simpler.

	result = XTcl_ListObjGetElements(tls, interp, tableObjPtr, bp, bp+8)
	if result != TCL_OK {
		return result
	}

	// Build a string table from the list.

	tablePtr = XTcl_Alloc(tls, uint32(uint64(*(*int32)(unsafe.Pointer(bp))+1)*uint64(unsafe.Sizeof(uintptr(0)))))
	for t = 0; t < *(*int32)(unsafe.Pointer(bp /* objc */)); t++ {
		if *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(t)*8)) == objPtr {
			// An exact match is always chosen, so we can stop here.

			XTclpFree(tls, tablePtr)
			*(*int32)(unsafe.Pointer(indexPtr)) = t
			return TCL_OK
		}

		*(*uintptr)(unsafe.Pointer(tablePtr + uintptr(t)*8)) = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)) + uintptr(t)*8)))
	}
	*(*uintptr)(unsafe.Pointer(tablePtr + uintptr(*(*int32)(unsafe.Pointer(bp /* objc */)))*8)) = uintptr(0)

	result = XTcl_GetIndexFromObjStruct(tls, interp, objPtr, tablePtr,
		int32(unsafe.Sizeof(uintptr(0))), msg, flags, indexPtr)

	// The internal rep must be cleared since tablePtr will go away.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	XTclpFree(tls, tablePtr)

	return result
}

//----------------------------------------------------------------------
//
// Tcl_GetIndexFromObjStruct --
//
//	This function looks up an object's value given a starting string and
//	an offset for the amount of space between strings. This is useful when
//	the strings are embedded in some other kind of array.
//
// Results:
//	If the value of objPtr is identical to or a unique abbreviation for
//	one of the entries in tablePtr, then the return value is TCL_OK and
//	the index of the matching entry is stored at *indexPtr. If there isn't
//	a proper match, then TCL_ERROR is returned and an error message is
//	left in interp's result (unless interp is NULL). The msg argument is
//	used in the error message; for example, if msg has the value "option"
//	then the error message will say something like 'bad option "foo": must
//	be ...'
//
// Side effects:
//	The result of the lookup is cached as the internal rep of objPtr, so
//	that repeated lookups can be done quickly.
//
//----------------------------------------------------------------------

func XTcl_GetIndexFromObjStruct(tls *libc.TLS, interp uintptr, objPtr uintptr, tablePtr uintptr, offset int32, msg uintptr, flags int32, indexPtr uintptr) int32 { /* tclIndexObj.c:252:1: */
	bp := tls.Alloc(184)
	defer tls.Free(184)

	var index int32
	var idx int32
	var numAbbrev int32
	var key uintptr
	var p1 uintptr
	var p2 uintptr
	var entryPtr uintptr
	var resultPtr uintptr
	var indexRep uintptr
	// Produce a fancy error message.

	var count int32

	// Protect against invalid values, like -1 or 0.
	if !(offset < int32(unsafe.Sizeof(uintptr(0)))) {
		goto __1
	}
	offset = int32(unsafe.Sizeof(uintptr(0)))
__1:
	;
	// See if there is a valid cached result from a previous lookup.

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&indexType))) {
		goto __2
	}
	indexRep = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	if !((*IndexRep)(unsafe.Pointer(indexRep)).FtablePtr == tablePtr && (*IndexRep)(unsafe.Pointer(indexRep)).Foffset == offset) {
		goto __3
	}
	*(*int32)(unsafe.Pointer(indexPtr)) = (*IndexRep)(unsafe.Pointer(indexRep)).Findex
	return TCL_OK
__3:
	;
__2:
	;

	// Lookup the value of the object in the table. Accept unique
	// abbreviations unless TCL_EXACT is set in flags.

	key = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()
	index = -1
	numAbbrev = 0

	// Scan the table looking for one of:
	//  - An exact match (always preferred)
	//  - A single abbreviation (allowed depending on flags)
	//  - Several abbreviations (never allowed, but overridden by exact match)

	entryPtr = tablePtr
	idx = 0
__4:
	if !(*(*uintptr)(unsafe.Pointer(entryPtr)) != uintptr(0)) {
		goto __6
	}
	p1 = key
	p2 = *(*uintptr)(unsafe.Pointer(entryPtr))
__7:
	if !(int32(*(*int8)(unsafe.Pointer(p1))) == int32(*(*int8)(unsafe.Pointer(p2)))) {
		goto __9
	}
	if !(int32(*(*int8)(unsafe.Pointer(p1))) == 0) {
		goto __10
	}
	index = idx
	goto done
__10:
	;
	goto __8
__8:
	p1++
	p2++
	goto __7
	goto __9
__9:
	;
	if !(int32(*(*int8)(unsafe.Pointer(p1))) == 0) {
		goto __11
	}
	// The value is an abbreviation for this entry. Continue checking
	// other entries to make sure it's unique. If we get more than one
	// unique abbreviation, keep searching to see if there is an exact
	// match, but remember the number of unique abbreviations and
	// don't allow either.

	numAbbrev++
	index = idx
__11:
	;
	goto __5
__5:
	entryPtr = entryPtr + uintptr(offset)
	idx++
	goto __4
	goto __6
__6:
	;

	// Check if we were instructed to disallow abbreviations.

	if !(flags&TCL_EXACT != 0 || int32(*(*int8)(unsafe.Pointer(key))) == 0 || numAbbrev != 1) {
		goto __12
	}
	goto error
__12:
	;

done:
	// Cache the found representation. Note that we want to avoid allocating a
	// new internal-rep if at all possible since that is potentially a slow
	// operation.

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&indexType))) {
		goto __13
	}
	indexRep = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	goto __14
__13:
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __15
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __16
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__16:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__15:
	;

	indexRep = XTcl_Alloc(tls, uint32(unsafe.Sizeof(IndexRep{})))
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = indexRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&indexType))
__14:
	;
	(*IndexRep)(unsafe.Pointer(indexRep)).FtablePtr = tablePtr
	(*IndexRep)(unsafe.Pointer(indexRep)).Foffset = offset
	(*IndexRep)(unsafe.Pointer(indexRep)).Findex = index

	*(*int32)(unsafe.Pointer(indexPtr)) = index
	return TCL_OK

error:
	if !(interp != uintptr(0)) {
		goto __17
	}
	// Produce a fancy error message.

	count = 0

__18:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __21
	}
	XTclAllocateFreeObjects(tls)
__21:
	;
	resultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)

	entryPtr = tablePtr
__22:
	if !(*(*uintptr)(unsafe.Pointer(entryPtr)) != uintptr(0) && !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(entryPtr))))) != 0)) {
		goto __23
	}
	entryPtr = entryPtr + uintptr(offset)
	goto __22
__23:
	;
	XTcl_AppendStringsToObj(tls, resultPtr,
		libc.VaList(bp, func() uintptr {
			if numAbbrev > 1 && !(flags&TCL_EXACT != 0) {
				return ts + 38942 /* "ambiguous " */
			}
			return ts + 38953 /* "bad " */
		}(),
			msg, ts+38958, key, uintptr(0)))
	if !(*(*uintptr)(unsafe.Pointer(entryPtr)) == uintptr(0)) {
		goto __24
	}
	XTcl_AppendStringsToObj(tls, resultPtr, libc.VaList(bp+40, ts+38961, uintptr(0)))
	goto __25
__24:
	XTcl_AppendStringsToObj(tls, resultPtr, libc.VaList(bp+56, ts+38981,
		*(*uintptr)(unsafe.Pointer(entryPtr)), uintptr(0)))
	entryPtr = entryPtr + uintptr(offset)
__26:
	if !(*(*uintptr)(unsafe.Pointer(entryPtr)) != uintptr(0)) {
		goto __27
	}
	if !(*(*uintptr)(unsafe.Pointer(entryPtr + uintptr(offset))) == uintptr(0)) {
		goto __28
	}
	XTcl_AppendStringsToObj(tls, resultPtr, libc.VaList(bp+80, func() uintptr {
		if count > 0 {
			return ts + 19193 /* "," */
		}
		return ts + 2631 /* "" */
	}(),
		ts+38993, *(*uintptr)(unsafe.Pointer(entryPtr)), uintptr(0)))
	goto __29
__28:
	if !(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(entryPtr)))) != 0) {
		goto __30
	}
	XTcl_AppendStringsToObj(tls, resultPtr, libc.VaList(bp+112, ts+19153, *(*uintptr)(unsafe.Pointer(entryPtr)), uintptr(0)))
	count++
__30:
	;
__29:
	;
	entryPtr = entryPtr + uintptr(offset)
	goto __26
__27:
	;
__25:
	;
	XTcl_SetObjResult(tls, interp, resultPtr)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+136, ts+4178, ts+7699, ts+16812, msg, key, uintptr(0)))
__17:
	;
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// UpdateStringOfIndex --
//
//	This function is called to convert a Tcl object from index internal
//	form to its string form. No abbreviation is ever generated.
//
// Results:
//	None.
//
// Side effects:
//	The string representation of the object is updated.
//
//----------------------------------------------------------------------

func sUpdateStringOfIndex(tls *libc.TLS, objPtr uintptr) { /* tclIndexObj.c:414:1: */
	var indexRep uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	var buf uintptr
	var len uint32
	var indexStr uintptr = *(*uintptr)(unsafe.Pointer((*IndexRep)(unsafe.Pointer(indexRep)).FtablePtr + uintptr((*IndexRep)(unsafe.Pointer(indexRep)).Foffset*(*IndexRep)(unsafe.Pointer(indexRep)).Findex)))

	len = uint32(libc.Xstrlen(tls, indexStr))
	buf = XTcl_Alloc(tls, len+uint32(1))
	libc.Xmemcpy(tls, buf, indexStr, uint64(len+uint32(1)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = buf
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32(len)
}

//----------------------------------------------------------------------
//
// DupIndex --
//
//	This function is called to copy the internal rep of an index Tcl
//	object from to another object.
//
// Results:
//	None.
//
// Side effects:
//	The internal representation of the target object is updated and the
//	type is set.
//
//----------------------------------------------------------------------

func sDupIndex(tls *libc.TLS, srcPtr uintptr, dupPtr uintptr) { /* tclIndexObj.c:448:1: */
	var srcIndexRep uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))
	var dupIndexRep uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(IndexRep{})))

	libc.Xmemcpy(tls, dupIndexRep, srcIndexRep, uint64(unsafe.Sizeof(IndexRep{})))
	*(*uintptr)(unsafe.Pointer(dupPtr + 32)) = dupIndexRep
	(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr = uintptr(unsafe.Pointer(&indexType))
}

//----------------------------------------------------------------------
//
// FreeIndex --
//
//	This function is called to delete the internal rep of an index Tcl
//	object.
//
// Results:
//	None.
//
// Side effects:
//	The internal representation of the target object is deleted.
//
//----------------------------------------------------------------------

func sFreeIndex(tls *libc.TLS, objPtr uintptr) { /* tclIndexObj.c:478:1: */
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(objPtr + 32)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// TclInitPrefixCmd --
//
//	This procedure creates the "prefix" Tcl command. See the user
//	documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTclInitPrefixCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclIndexObj.c:503:1: */
	var prefixCmd Tcl_Command

	prefixCmd = XTclMakeEnsemble(tls, interp, ts+38998, uintptr(unsafe.Pointer(&prefixImplMap)))
	XTcl_Export(tls, interp, XTcl_FindNamespace(tls, interp, ts+21479, uintptr(0), 0),
		ts+39012, 0)
	return prefixCmd
}

var prefixImplMap = [4]EnsembleImplMap{
	{Fname: ts + 39019, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 39023, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 17257, Fproc: 0, FcompileProc: 0},
	{},
} /* tclIndexObj.c:506:34 */

// ----------------------------------------------------------------------
//
// PrefixMatchObjCmd --
//
//	This function implements the 'prefix match' Tcl command. Refer to the
//	user documentation for details on what it does.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPrefixMatchObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIndexObj.c:537:1: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	var flags int32 = 0
	var result int32
	// var index int32 at bp+96, 4

	// var dummyLength int32 at bp+104, 4

	var i int32
	// var errorLength int32 at bp+100, 4

	var errorPtr uintptr = uintptr(0)
	var message uintptr = ts + 10473 /* "option" */
	var tablePtr uintptr
	var objPtr uintptr
	// var resultPtr uintptr at bp+112, 8

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+39031)
		return TCL_ERROR
	}

	for i = 1; i < objc-2; i++ {
		if XTcl_GetIndexFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&matchOptions)), ts+10473, 0,
			bp+96) != TCL_OK {
			return TCL_ERROR
		}
		switch uint32(*(*int32)(unsafe.Pointer(bp + 96 /* index */))) {
		case uint32(1) /* PRFMATCH_EXACT */ :
			flags = flags | TCL_EXACT
			break
		case uint32(2) /* PRFMATCH_MESSAGE */ :
			if i > objc-4 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+39054, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+39081, uintptr(0)))
				return TCL_ERROR
			}
			i++
			message = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
			break
		case uint32(0) /* PRFMATCH_ERROR */ :
			if i > objc-4 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+39087, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+7949, ts+39081, uintptr(0)))
				return TCL_ERROR
			}
			i++
			result = XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+100)
			if result != TCL_OK {
				return TCL_ERROR
			}
			if *(*int32)(unsafe.Pointer(bp + 100))%2 != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+39112,
					-1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+7444, ts+23824, uintptr(0)))
				return TCL_ERROR
			}
			errorPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
			break
		}
	}

	tablePtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-2)*8))
	objPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))

	// Check that table is a valid list first, since we want to handle that
	// error case regardless of level.

	result = XTcl_ListObjLength(tls, interp, tablePtr, bp+104)
	if result != TCL_OK {
		return result
	}

	result = XGetIndexFromObjList(tls, interp, objPtr, tablePtr, message, flags,
		bp+96)
	if result != TCL_OK {
		if errorPtr != uintptr(0) && *(*int32)(unsafe.Pointer(bp + 100)) == 0 {
			XTcl_ResetResult(tls, interp)
			return TCL_OK
		} else if errorPtr == uintptr(0) {
			return TCL_ERROR
		}

		if (*Tcl_Obj)(unsafe.Pointer(errorPtr)).FrefCount > 1 {
			errorPtr = XTcl_DuplicateObj(tls, errorPtr)
		}
		XTcl_ListObjAppendElement(tls, interp, errorPtr,
			XTcl_NewStringObj(tls, ts+27971, 5))
		XTcl_ListObjAppendElement(tls, interp, errorPtr, XTcl_NewIntObj(tls, result))

		return XTcl_SetReturnOptions(tls, interp, errorPtr)
	}

	result = XTcl_ListObjIndex(tls, interp, tablePtr, *(*int32)(unsafe.Pointer(bp + 96 /* index */)), bp+112)
	if result != TCL_OK {
		return result
	}
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 112 /* resultPtr */)))
	return TCL_OK
}

var matchOptions = [4]uintptr{
	ts + 39163, ts + 15508, ts + 39170, uintptr(0),
} /* tclIndexObj.c:548:23 */

// ----------------------------------------------------------------------
//
// PrefixAllObjCmd --
//
//	This function implements the 'prefix all' Tcl command. Refer to the
//	user documentation for details on what it does.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPrefixAllObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIndexObj.c:661:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var tableObjc int32 at bp, 4

	var result int32
	var t int32
	// var length int32 at bp+16, 4

	// var elemLength int32 at bp+20, 4

	var string uintptr
	var elemString uintptr
	// var tableObjv uintptr at bp+8, 8

	var resultPtr uintptr

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+39179)
		return TCL_ERROR
	}

	result = XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, bp+8)
	if result != TCL_OK {
		return result
	}
	resultPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	string = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+16)

	for t = 0; t < *(*int32)(unsafe.Pointer(bp /* tableObjc */)); t++ {
		elemString = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* tableObjv */)) + uintptr(t)*8)), bp+20 /* &elemLength */)

		// A prefix cannot match if it is longest.

		if *(*int32)(unsafe.Pointer(bp + 16)) <= *(*int32)(unsafe.Pointer(bp + 20)) {
			if XTclpUtfNcmp2(tls, elemString, string, uint32(*(*int32)(unsafe.Pointer(bp + 16)))) == 0 {
				XTcl_ListObjAppendElement(tls, interp, resultPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* tableObjv */)) + uintptr(t)*8)))
			}
		}
	}

	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// PrefixLongestObjCmd --
//
//	This function implements the 'prefix longest' Tcl command. Refer to
//	the user documentation for details on what it does.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPrefixLongestObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclIndexObj.c:718:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var tableObjc int32 at bp, 4

	var result int32
	var i int32
	var t int32
	// var length int32 at bp+16, 4

	// var elemLength int32 at bp+20, 4

	var resultLength int32
	var string uintptr
	var elemString uintptr
	var resultString uintptr
	// var tableObjv uintptr at bp+8, 8

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+39179)
		return TCL_ERROR
	}

	result = XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, bp+8)
	if result != TCL_OK {
		return result
	}
	string = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+16)

	resultString = uintptr(0)
	resultLength = 0

	for t = 0; t < *(*int32)(unsafe.Pointer(bp /* tableObjc */)); t++ {
		elemString = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* tableObjv */)) + uintptr(t)*8)), bp+20 /* &elemLength */)

		// First check if the prefix string matches the element. A prefix
		// cannot match if it is longest.

		if *(*int32)(unsafe.Pointer(bp + 16)) > *(*int32)(unsafe.Pointer(bp + 20)) || XTclpUtfNcmp2(tls, elemString, string, uint32(*(*int32)(unsafe.Pointer(bp + 16)))) != 0 {
			continue
		}

		if resultString == uintptr(0) {
			// If this is the first match, the longest common substring this
			// far is the complete string. The result is part of this string
			// so we only need to adjust the length later.

			resultString = elemString
			resultLength = *(*int32)(unsafe.Pointer(bp + 20 /* elemLength */))
		} else {
			// Longest common substring cannot be longer than shortest string.

			if *(*int32)(unsafe.Pointer(bp + 20)) < resultLength {
				resultLength = *(*int32)(unsafe.Pointer(bp + 20 /* elemLength */))
			}

			// Compare strings.

			for i = 0; i < resultLength; i++ {
				if int32(*(*int8)(unsafe.Pointer(resultString + uintptr(i)))) != int32(*(*int8)(unsafe.Pointer(elemString + uintptr(i)))) {
					// Adjust in case we stopped in the middle of a UTF char.

					resultLength = int32((func() int64 {
						if resultString+uintptr(i+1) < resultString+uintptr(2) {
							return int64(resultString)
						}
						return func() int64 {
							if int32(uint8(*(*int8)(unsafe.Pointer(resultString + uintptr(i+1) - uintptr(1))))) < 0x80 {
								return int64(resultString + uintptr(i+1) - uintptr(1))
							}
							return int64(XTcl_UtfPrev(tls, resultString+uintptr(i+1), resultString))
						}()
					}() - int64(resultString)) / 1)
					break
				}
			}
		}
	}
	if resultLength > 0 {
		XTcl_SetObjResult(tls, interp,
			XTcl_NewStringObj(tls, resultString, resultLength))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_WrongNumArgs --
//
//	This function generates a "wrong # args" error message in an
//	interpreter. It is used as a utility function by many command
//	functions, including the function that implements procedures.
//
// Results:
//	None.
//
// Side effects:
//	An error message is generated in interp's result object to indicate
//	that a command was invoked with the wrong number of arguments. The
//	message has the form
//		wrong # args: should be "foo bar additional stuff"
//	where "foo" and "bar" are the initial objects in objv (objc determines
//	how many of these are printed) and "additional stuff" is the contents
//	of the message argument.
//
//	The message printed is modified somewhat if the command is wrapped
//	inside an ensemble. In that case, the error message generated is
//	rewritten in such a way that it appears to be generated from the
//	user-visible command and not how that command is actually implemented,
//	giving a better overall user experience.
//
//	Internally, the Tcl core may set the flag INTERP_ALTERNATE_WRONG_ARGS
//	in the interpreter to generate complex multi-part messages by calling
//	this function repeatedly. This allows the code that knows how to
//	handle ensemble-related error messages to be kept here while still
//	generating suitable error messages for commands like [read] and
//	[socket]. Ideally, this would be done through an extra flags argument,
//	but that wouldn't be source-compatible with the existing API and it's
//	a fairly rare requirement anyway.
//
//----------------------------------------------------------------------

func XTcl_WrongNumArgs(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, message uintptr) { /* tclIndexObj.c:837:1: */
	bp := tls.Alloc(109)
	defer tls.Free(109)

	var objPtr uintptr
	var i int32
	var len int32
	// var elemLen int32 at bp+104, 4

	// var flags int8 at bp+108, 1

	var iPtr uintptr
	var elementStr uintptr

	// [incr Tcl] does something fairly horrific when generating error
	// messages for its ensembles; it passes the whole set of ensemble
	// arguments as a list in the first argument. This means that this code
	// causes a problem in iTcl if it attempts to correctly quote all
	// arguments, which would be the correct thing to do. We work around this
	// nasty behaviour for now, and hope that we can remove it all in the
	// future...

	var isFirst int32
	var indexRep uintptr
	var quotedElementStr uintptr
	var toSkip int32
	var toPrint int32
	var origObjv uintptr
	var indexRep1 uintptr
	var quotedElementStr1 uintptr
	iPtr = interp
	isFirst = 1 // Special flag used to inhibit the treating
	// of the first word as a list element so the
	// hacky way Itcl generates error messages for
	// its ensembles will still work. [Bug
	// 1066837]

__1:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4
	}
	XTclAllocateFreeObjects(tls)
__4:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2
__2:
	if 0 != 0 {
		goto __1
	}
	goto __3
__3:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

	if !((*Interp)(unsafe.Pointer(iPtr)).Fflags&INTERP_ALTERNATE_WRONG_ARGS != 0) {
		goto __5
	}
	*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(INTERP_ALTERNATE_WRONG_ARGS)
	XTcl_AppendObjToObj(tls, objPtr, XTcl_GetObjResult(tls, interp))
	XTcl_AppendToObj(tls, objPtr, ts+39192, -1)
	goto __6
__5:
	XTcl_AppendToObj(tls, objPtr, ts+39198, -1)
__6:
	;

	// If processing an an ensemble implementation, rewrite the results in
	// terms of how the ensemble was invoked.

	if !((*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FsourceObjs != uintptr(0)) {
		goto __7
	}
	toSkip = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumInsertedObjs
	toPrint = (*Interp)(unsafe.Pointer(iPtr)).FensembleRewrite.FnumRemovedObjs
	origObjv = XTclEnsembleGetRewriteValues(tls, interp)

	// Only do rewrite the command if all the replaced objects are
	// actually arguments (in objv) to this function. Otherwise it just
	// gets too complicated and it's to just give a slightly
	// confusing error message...

	if !(objc < toSkip) {
		goto __8
	}
	goto addNormalArgumentsToMessage
__8:
	;

	// Strip out the actual arguments that the ensemble inserted.

	objv += 8 * uintptr(toSkip)
	objc = objc - toSkip

	// We assume no object is of index type.

	i = 0
__9:
	if !(i < toPrint) {
		goto __11
	}
	// Add the element, quoting it if necessary.

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(origObjv + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&indexType))) {
		goto __12
	}
	indexRep =
		*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(origObjv + uintptr(i)*8)) + 32))

	elementStr = *(*uintptr)(unsafe.Pointer((*IndexRep)(unsafe.Pointer(indexRep)).FtablePtr + uintptr((*IndexRep)(unsafe.Pointer(indexRep)).Foffset*(*IndexRep)(unsafe.Pointer(indexRep)).Findex)))
	*(*int32)(unsafe.Pointer(bp + 104 /* elemLen */)) = int32(libc.Xstrlen(tls, elementStr))
	goto __13
__12:
	elementStr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(origObjv + uintptr(i)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 104)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(origObjv + uintptr(i)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(origObjv + uintptr(i)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(origObjv + uintptr(i)*8)), bp+104)
	}()
__13:
	;
	*(*int8)(unsafe.Pointer(bp + 108 /* flags */)) = int8(0)
	len = XTclScanElement(tls, elementStr, *(*int32)(unsafe.Pointer(bp + 104 /* elemLen */)), bp+108)

	if !(!(isFirst != 0) && len != *(*int32)(unsafe.Pointer(bp + 104))) {
		goto __14
	}
	quotedElementStr = XTclStackAlloc(tls, interp,
		int32(uint32(len)+uint32(1)))

	len = XTclConvertElement(tls, elementStr, *(*int32)(unsafe.Pointer(bp + 104 /* elemLen */)),
		quotedElementStr, int32(*(*int8)(unsafe.Pointer(bp + 108 /* flags */))))
	XTcl_AppendToObj(tls, objPtr, quotedElementStr, len)
	XTclStackFree(tls, interp, quotedElementStr)
	goto __15
__14:
	XTcl_AppendToObj(tls, objPtr, elementStr, *(*int32)(unsafe.Pointer(bp + 104 /* elemLen */)))
__15:
	;

	isFirst = 0

	// Add a space if the word is not the last one (which has a
	// moderately complex condition here).

	if !(i < toPrint-1 || objc != 0 || message != uintptr(0)) {
		goto __16
	}
	XTcl_AppendStringsToObj(tls, objPtr, libc.VaList(bp, ts+14901, uintptr(0)))
__16:
	;
	goto __10
__10:
	i++
	goto __9
	goto __11
__11:
	;
__7:
	;

	// Now add the arguments (other than those rewritten) that the caller took
	// from its calling context.

addNormalArgumentsToMessage:
	i = 0
__17:
	if !(i < objc) {
		goto __19
	}
	// If the object is an index type use the index table which allows for
	// the correct error message even if the subcommand was abbreviated.
	// Otherwise, just use the string rep.

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&indexType))) {
		goto __20
	}
	indexRep1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) + 32))

	XTcl_AppendStringsToObj(tls, objPtr, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer((*IndexRep)(unsafe.Pointer(indexRep1)).FtablePtr + uintptr((*IndexRep)(unsafe.Pointer(indexRep1)).Foffset*(*IndexRep)(unsafe.Pointer(indexRep1)).Findex))), uintptr(0)))
	goto __21
__20:
	// Quote the argument if it contains spaces (Bug 942757).

	elementStr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 104)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+104)
	}()
	*(*int8)(unsafe.Pointer(bp + 108 /* flags */)) = int8(0)
	len = XTclScanElement(tls, elementStr, *(*int32)(unsafe.Pointer(bp + 104 /* elemLen */)), bp+108)

	if !(!(isFirst != 0) && len != *(*int32)(unsafe.Pointer(bp + 104))) {
		goto __22
	}
	quotedElementStr1 = XTclStackAlloc(tls, interp,
		int32(uint32(len)+uint32(1)))

	len = XTclConvertElement(tls, elementStr, *(*int32)(unsafe.Pointer(bp + 104 /* elemLen */)),
		quotedElementStr1, int32(*(*int8)(unsafe.Pointer(bp + 108 /* flags */))))
	XTcl_AppendToObj(tls, objPtr, quotedElementStr1, len)
	XTclStackFree(tls, interp, quotedElementStr1)
	goto __23
__22:
	XTcl_AppendToObj(tls, objPtr, elementStr, *(*int32)(unsafe.Pointer(bp + 104 /* elemLen */)))
__23:
	;
__21:
	;

	isFirst = 0

	// Append a space character (" ") if there is more text to follow
	// (either another element from objv, or the message string).

	if !(i < objc-1 || message != uintptr(0)) {
		goto __24
	}
	XTcl_AppendStringsToObj(tls, objPtr, libc.VaList(bp+32, ts+14901, uintptr(0)))
__24:
	;
	goto __18
__18:
	i++
	goto __17
	goto __19
__19:
	;

	// Add any trailing message bits and set the resulting string as the
	// interpreter result. Caller is responsible for reporting this as an
	// actual error.

	if !(message != uintptr(0)) {
		goto __25
	}
	XTcl_AppendStringsToObj(tls, objPtr, libc.VaList(bp+48, message, uintptr(0)))
__25:
	;
	XTcl_AppendStringsToObj(tls, objPtr, libc.VaList(bp+64, ts+25631, uintptr(0)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+8889, uintptr(0)))
	XTcl_SetObjResult(tls, interp, objPtr)
}

//----------------------------------------------------------------------
//
// Tcl_ParseArgsObjv --
//
//	Process an objv array according to a table of expected command-line
//	options. See the manual page for more details.
//
// Results:
//	The return value is a standard Tcl return value. If an error occurs
//	then an error message is left in the interp's result. Under normal
//	conditions, both *objcPtr and *objv are modified to return the
//	arguments that couldn't be processed here (they didn't match the
//	option table, or followed an TCL_ARGV_REST argument).
//
// Side effects:
//	Variables may be modified, or procedures may be called. It all depends
//	on the arguments and their entries in argTable. See the user
//	documentation for details.
//
//----------------------------------------------------------------------

func XTcl_ParseArgsObjv(tls *libc.TLS, interp uintptr, argTable uintptr, objcPtr uintptr, objv uintptr, remObjv uintptr) int32 { /* tclIndexObj.c:1049:1: */
	bp := tls.Alloc(68)
	defer tls.Free(68)

	var leftovers uintptr // Array to write back to remObjv on
	// successful exit. Will include the name of
	// the command.
	var nrem int32 // Size of leftovers.
	var infoPtr uintptr
	// Pointer to the current entry in the table
	// of argument descriptions.
	var matchPtr uintptr
	// Descriptor that matches current argument
	var curArg uintptr // Current argument
	var str uintptr
	var c int8 // Second character of current arg (used for
	// quick check for matching; use 2nd char.
	// because first char. will almost always be
	// '-').
	var srcIndex int32 // Location from which to read next argument
	// from objv.
	var dstIndex int32 // Used to keep track of current arguments
	// being processed, primarily for error
	// reporting.
	var objc int32 // # arguments in objv still to process.
	// var length int32 at bp+64, 4

	var handlerProc uintptr
	var argObj uintptr
	var handlerProc1 uintptr
	str = uintptr(0) // Number of characters in current argument

	if !(remObjv != uintptr(0)) {
		goto __1
	}
	// Then we should copy the name of the command (0th argument). The
	// upper bound on the number of elements is known, and (undocumented,
	// but historically true) there should be a NULL argument after the
	// last result. [Bug 3413857]

	nrem = 1
	leftovers = XTcl_Alloc(tls, uint32(uint64(1+*(*int32)(unsafe.Pointer(objcPtr)))*uint64(unsafe.Sizeof(uintptr(0)))))
	*(*uintptr)(unsafe.Pointer(leftovers)) = *(*uintptr)(unsafe.Pointer(objv))
	goto __2
__1:
	nrem = 0
	leftovers = uintptr(0)
__2:
	;

	// OK, now start processing from the second element (1st argument).

	srcIndex = libc.AssignInt32(&dstIndex, 1)
	objc = *(*int32)(unsafe.Pointer(objcPtr)) - 1

__3:
	if !(objc > 0) {
		goto __4
	}
	curArg = *(*uintptr)(unsafe.Pointer(objv + uintptr(srcIndex)*8))
	srcIndex++
	objc--
	str = XTcl_GetStringFromObj(tls, curArg, bp+64)
	if !(*(*int32)(unsafe.Pointer(bp + 64)) > 0) {
		goto __5
	}
	c = *(*int8)(unsafe.Pointer(str + 1))
	goto __6
__5:
	c = int8(0)
__6:
	;

	// Loop throught the argument descriptors searching for one with the
	// matching key string. If found, leave a pointer to it in matchPtr.

	matchPtr = uintptr(0)
	infoPtr = argTable
__7:
	if !(infoPtr != uintptr(0) && (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).Ftype != TCL_ARGV_END) {
		goto __9
	}
	if !((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr == uintptr(0)) {
		goto __10
	}
	goto __8
__10:
	;
	if !(int32(*(*int8)(unsafe.Pointer((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr + 1))) != int32(c) ||
		libc.Xstrncmp(tls, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr, str, uint64(*(*int32)(unsafe.Pointer(bp + 64)))) != 0) {
		goto __11
	}
	goto __8
__11:
	;
	if !(int32(*(*int8)(unsafe.Pointer((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr + uintptr(*(*int32)(unsafe.Pointer(bp + 64)))))) == 0) {
		goto __12
	}
	matchPtr = infoPtr
	goto gotMatch
__12:
	;
	if !(matchPtr != uintptr(0)) {
		goto __13
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+39224, libc.VaList(bp, str)))
	goto error
__13:
	;
	matchPtr = infoPtr
	goto __8
__8:
	infoPtr += 48
	goto __7
	goto __9
__9:
	;
	if !(matchPtr == uintptr(0)) {
		goto __14
	}
	// Unrecognized argument. Just copy it down, unless the caller
	// prefers an error to be registered.

	if !(remObjv == uintptr(0)) {
		goto __15
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+39246, libc.VaList(bp+8, str)))
	goto error
__15:
	;

	dstIndex++ // This argument is now handled
	*(*uintptr)(unsafe.Pointer(leftovers + uintptr(libc.PostIncInt32(&nrem, 1))*8)) = curArg
	goto __3
__14:
	;

	// Take the appropriate action based on the option type

gotMatch:
	infoPtr = matchPtr
	switch (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).Ftype {
	case TCL_ARGV_CONSTANT:
		goto __17
	case TCL_ARGV_INT:
		goto __18
	case TCL_ARGV_STRING:
		goto __19
	case TCL_ARGV_REST:
		goto __20
	case TCL_ARGV_FLOAT:
		goto __21
	case TCL_ARGV_FUNC:
		goto __22
	case TCL_ARGV_GENFUNC:
		goto __23
	case TCL_ARGV_HELP:
		goto __24
	default:
		goto __25
	}
	goto __16
__17:
	*(*int32)(unsafe.Pointer((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr)) = int32((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FsrcPtr)
	goto __16
__18:
	if !(objc == 0) {
		goto __26
	}
	goto missingArg
__26:
	;
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(srcIndex)*8)),
		(*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr) == TCL_ERROR) {
		goto __27
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+39273,
		libc.VaList(bp+16, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(srcIndex)*8))))))
	goto error
__27:
	;
	srcIndex++
	objc--
	goto __16
__19:
	if !(objc == 0) {
		goto __28
	}
	goto missingArg
__28:
	;
	*(*uintptr)(unsafe.Pointer((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr)) = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(srcIndex)*8)))
	srcIndex++
	objc--
	goto __16
__20:
	// Only store the point where we got to if it's not to be written
	// to NULL, so that TCL_ARGV_AUTO_REST works.

	if !((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr != uintptr(0)) {
		goto __29
	}
	*(*int32)(unsafe.Pointer((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr)) = dstIndex
__29:
	;
	goto argsDone
__21:
	if !(objc == 0) {
		goto __30
	}
	goto missingArg
__30:
	;
	if !(XTcl_GetDoubleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(srcIndex)*8)),
		(*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr) == TCL_ERROR) {
		goto __31
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+39321,
		libc.VaList(bp+32, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(srcIndex)*8))))))
	goto error
__31:
	;
	srcIndex++
	objc--
	goto __16
__22:
	handlerProc = (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FsrcPtr

	if !(objc == 0) {
		goto __32
	}
	argObj = uintptr(0)
	goto __33
__32:
	argObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(srcIndex)*8))
__33:
	;
	if !((*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{handlerProc})).f(tls, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FclientData, argObj, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr) != 0) {
		goto __34
	}
	srcIndex++
	objc--
__34:
	;
	goto __16

__23:
	handlerProc1 = (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FsrcPtr

	objc = (*struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{handlerProc1})).f(tls, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FclientData, interp, objc,
		objv+uintptr(srcIndex)*8, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr)
	if !(objc < 0) {
		goto __35
	}
	goto error
__35:
	;
	goto __16

__24:
	sPrintUsage(tls, interp, argTable)
	goto error
__25:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+39376, libc.VaList(bp+48, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).Ftype)))
	goto error
__16:
	;
	goto __3
__4:
	;

	// If we broke out of the loop because of an OPT_REST argument, copy the
	// remaining arguments down. Note that there is always at least one
	// argument left over - the command name - so we always have a result if
	// our caller is willing to receive it. [Bug 3413857]

argsDone:
	if !(remObjv == uintptr(0)) {
		goto __36
	}
	// Nothing to do.

	return TCL_OK
__36:
	;

	if !(objc > 0) {
		goto __37
	}
	libc.Xmemcpy(tls, leftovers+uintptr(nrem)*8, objv+uintptr(srcIndex)*8, uint64(objc)*uint64(unsafe.Sizeof(uintptr(0))))
	nrem = nrem + objc
__37:
	;
	*(*uintptr)(unsafe.Pointer(leftovers + uintptr(nrem)*8)) = uintptr(0)
	*(*int32)(unsafe.Pointer(objcPtr)) = libc.PostIncInt32(&nrem, 1)
	*(*uintptr)(unsafe.Pointer(remObjv)) = XTcl_Realloc(tls, leftovers, uint32(uint64(nrem)*uint64(unsafe.Sizeof(uintptr(0)))))
	return TCL_OK

	// Make sure to handle freeing any temporary space we've allocated on the
	// way to an error.

missingArg:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+39413, libc.VaList(bp+56, str)))
error:
	if !(leftovers != uintptr(0)) {
		goto __38
	}
	XTclpFree(tls, leftovers)
__38:
	;
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// PrintUsage --
//
//	Generate a help string describing command-line options.
//
// Results:
//	The interp's result will be modified to hold a help string describing
//	all the options in argTable.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPrintUsage(tls *libc.TLS, interp uintptr, argTable uintptr) { /* tclIndexObj.c:1312:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var infoPtr uintptr
	var width int32
	var numSpaces int32
	var msg uintptr

	// First, compute the width of the widest option key, so that we can make
	// everything line up.

	width = 4
	for infoPtr = argTable; (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).Ftype != TCL_ARGV_END; infoPtr += 48 {
		var length int32

		if (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr == uintptr(0) {
			continue
		}
		length = int32(libc.Xstrlen(tls, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr))
		if length > width {
			width = length
		}
	}

	// Now add the option information, with pretty-printing.

	msg = XTcl_NewStringObj(tls, ts+39457, -1)
	for infoPtr = argTable; (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).Ftype != TCL_ARGV_END; infoPtr += 48 {
		if (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).Ftype == TCL_ARGV_HELP && (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr == uintptr(0) {
			XTcl_AppendPrintfToObj(tls, msg, ts+39483, libc.VaList(bp, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FhelpStr))
			continue
		}
		XTcl_AppendPrintfToObj(tls, msg, ts+39487, libc.VaList(bp+8, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr))
		numSpaces = int32(Size_t(width+1) - libc.Xstrlen(tls, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FkeyStr))
		for numSpaces > 0 {
			if numSpaces >= NUM_SPACES {
				XTcl_AppendToObj(tls, msg, uintptr(unsafe.Pointer(&spaces)), NUM_SPACES)
			} else {
				XTcl_AppendToObj(tls, msg, uintptr(unsafe.Pointer(&spaces)), numSpaces)
			}
			numSpaces = numSpaces - NUM_SPACES
		}
		XTcl_AppendToObj(tls, msg, (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FhelpStr, -1)
		switch (*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).Ftype {
		case TCL_ARGV_INT:
			XTcl_AppendPrintfToObj(tls, msg, ts+39493,
				libc.VaList(bp+16, *(*int32)(unsafe.Pointer((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr))))
			break
		case TCL_ARGV_FLOAT:
			XTcl_AppendPrintfToObj(tls, msg, ts+39514,
				libc.VaList(bp+24, *(*float64)(unsafe.Pointer((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr))))
			break
		case TCL_ARGV_STRING:
			{
				var string uintptr = *(*uintptr)(unsafe.Pointer((*Tcl_ArgvInfo)(unsafe.Pointer(infoPtr)).FdstPtr))

				if string != uintptr(0) {
					XTcl_AppendPrintfToObj(tls, msg, ts+39535,
						libc.VaList(bp+32, string))
				}
				break

			}
		default:
			break
		}
	}
	XTcl_SetObjResult(tls, interp, msg)
}

var spaces = *(*[21]int8)(unsafe.Pointer(ts + 39558)) /* tclIndexObj.c:1322:23 */

//----------------------------------------------------------------------
//
// TclGetCompletionCodeFromObj --
//
//	Parses Completion code Code
//
// Results:
//	Returns TCL_ERROR if the value is an invalid completion code.
//	Otherwise, returns TCL_OK, and writes the completion code to the
//	pointer provided.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetCompletionCodeFromObj(tls *libc.TLS, interp uintptr, value uintptr, codePtr uintptr) int32 { /* tclIndexObj.c:1408:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	if (*Tcl_Obj)(unsafe.Pointer(value)).FtypePtr != uintptr(unsafe.Pointer(&indexType)) &&
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(value)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(codePtr)) = int32(*(*int32)(unsafe.Pointer(value + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, uintptr(0), value, codePtr)
		}() == TCL_OK {
		return TCL_OK
	}
	if XTcl_GetIndexFromObj(tls, uintptr(0), value, uintptr(unsafe.Pointer(&returnCodes)), uintptr(0), TCL_EXACT,
		codePtr) == TCL_OK {
		return TCL_OK
	}

	// Value is not a legal completion code.

	if interp != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

			ts+39579,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(value)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(value)).Fbytes
				}
				return XTcl_GetString(tls, value)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+39663, ts+39670, uintptr(0)))
	}
	return TCL_ERROR
}

var returnCodes = [6]uintptr{
	ts + 39683, ts + 5721, ts + 5876, ts + 5685, ts + 5702, uintptr(0),
} /* tclIndexObj.c:1413:23 */

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Forward declaration of the TIP#143 limit handler structure.

type LimitHandler = LimitHandler1 /* tclInt.h:1729:29 */ // Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// A pointer to a string that holds an initialization script that if non-NULL
// is evaluated in Tcl_Init() prior to the built-in initialization script
// above. This variable can be modified by the function below.

var tclPreInitScript uintptr = uintptr(0) /* tclInterp.c:22:19 */

// Forward declaration
type Target1 = struct {
	FchildCmd    Tcl_Command
	FchildInterp uintptr
	FnextPtr     uintptr
	FprevPtr     uintptr
} /* tclInterp.c:25:1 */

// struct Alias:
//
// Stores information about an alias. Is stored in the child interpreter and
// used by the source command to find the target command in the parent when
// the source command is invoked.

type Alias1 = struct {
	Ftoken         uintptr
	FtargetInterp  uintptr
	FchildCmd      Tcl_Command
	FaliasEntryPtr uintptr
	FtargetPtr     uintptr
	Fobjc          int32
	F__ccgo_pad1   [4]byte
	FobjPtr        uintptr
} /* tclInterp.c:35:9 */

// struct Alias:
//
// Stores information about an alias. Is stored in the child interpreter and
// used by the source command to find the target command in the parent when
// the source command is invoked.

type Alias = Alias1 /* tclInterp.c:65:3 */

//
// struct Child:
//
// Used by the "interp" command to record and find information about child
// interpreters. Maps from a command name in the parent to information about a
// child interpreter, e.g. what aliases are defined in it.

type Child1 = struct {
	FparentInterp  uintptr
	FchildEntryPtr uintptr
	FchildInterp   uintptr
	FinterpCmd     Tcl_Command
	FaliasTable    Tcl_HashTable
} /* tclInterp.c:76:9 */

//
// struct Child:
//
// Used by the "interp" command to record and find information about child
// interpreters. Maps from a command name in the parent to information about a
// child interpreter, e.g. what aliases are defined in it.

type Child = Child1 /* tclInterp.c:89:3 */

// struct Target:
//
// Maps from parent interpreter commands back to the source commands in child
// interpreters. This is needed because aliases can be created between sibling
// interpreters and must be deleted when the target interpreter is deleted. In
// case they would not be deleted the source interpreter would be left with a
// "dangling pointer". One such record is stored in the Parent record of the
// parent interpreter with the parent for each alias which directs to a
// command in the parent. These records are used to remove the source command
// for an from a child if/when the parent is deleted. They are organized in a
// doubly-linked list attached to the parent interpreter.

type Target = Target1 /* tclInterp.c:112:3 */

// struct Parent:
//
// This record is used for two purposes: First, childTable (a hashtable) maps
// from names of commands to child interpreters. This hashtable is used to
// store information about child interpreters of this interpreter, to map over
// all children, etc. The second purpose is to store information about all
// aliases in children (or siblings) which direct to target commands in this
// interpreter (using the targetsPtr doubly-linked list).
//
// NB: the flags field in the interp structure, used with SAFE_INTERP mask
// denotes whether the interpreter is safe or not. Safe interpreters have
// restricted functionality, can only create safe interpreters and can
// only load safe extensions.

type Parent1 = struct {
	FchildTable Tcl_HashTable
	FtargetsPtr uintptr
} /* tclInterp.c:130:9 */

// struct Parent:
//
// This record is used for two purposes: First, childTable (a hashtable) maps
// from names of commands to child interpreters. This hashtable is used to
// store information about child interpreters of this interpreter, to map over
// all children, etc. The second purpose is to store information about all
// aliases in children (or siblings) which direct to target commands in this
// interpreter (using the targetsPtr doubly-linked list).
//
// NB: the flags field in the interp structure, used with SAFE_INTERP mask
// denotes whether the interpreter is safe or not. Safe interpreters have
// restricted functionality, can only create safe interpreters and can
// only load safe extensions.

type Parent = Parent1 /* tclInterp.c:140:3 */

// The following structure keeps track of all the Parent and Child information
// on a per-interp basis.

type InterpInfo1 = struct {
	Fparent Parent
	Fchild  Child
} /* tclInterp.c:147:9 */

// The following structure keeps track of all the Parent and Child information
// on a per-interp basis.

type InterpInfo = InterpInfo1 /* tclInterp.c:152:3 */

// Limit callbacks handled by scripts are modelled as structures which are
// stored in hashes indexed by a two-word key. Note that the type of the
// 'type' field in the key is not int; this is to make sure that things are
// likely to work properly on 64-bit architectures.

type ScriptLimitCallback1 = struct {
	Finterp      uintptr
	FscriptObj   uintptr
	Ftype        int32
	F__ccgo_pad1 [4]byte
	FentryPtr    uintptr
} /* tclInterp.c:161:9 */

// Limit callbacks handled by scripts are modelled as structures which are
// stored in hashes indexed by a two-word key. Note that the type of the
// 'type' field in the key is not int; this is to make sure that things are
// likely to work properly on 64-bit architectures.

type ScriptLimitCallback = ScriptLimitCallback1 /* tclInterp.c:172:3 */

type ScriptLimitCallbackKey1 = struct {
	Finterp      uintptr
	Ftype        int32
	F__ccgo_pad1 [4]byte
} /* tclInterp.c:174:9 */

type ScriptLimitCallbackKey = ScriptLimitCallbackKey1 /* tclInterp.c:179:3 */

//----------------------------------------------------------------------
//
// TclSetPreInitScript --
//
//	This routine is used to change the value of the internal variable,
//	tclPreInitScript.
//
// Results:
//	Returns the current value of tclPreInitScript.
//
// Side effects:
//	Changes the way Tcl_Init() routine behaves.
//
//----------------------------------------------------------------------

func XTclSetPreInitScript(tls *libc.TLS, string uintptr) uintptr { /* tclInterp.c:306:12: */
	var prevString uintptr = tclPreInitScript
	tclPreInitScript = string
	return prevString
}

//----------------------------------------------------------------------
//
// Tcl_Init --
//
//	This function is typically invoked by Tcl_AppInit functions to find
//	and source the "init.tcl" script, which should exist somewhere on the
//	Tcl library path.
//
// Results:
//	Returns a standard Tcl completion code and sets the interp's result if
//	there is an error.
//
// Side effects:
//	Depends on what's in the init.tcl script.
//
//----------------------------------------------------------------------

func XTcl_Init(tls *libc.TLS, interp uintptr) int32 { /* tclInterp.c:335:1: */
	if tclPreInitScript != uintptr(0) {
		if XTcl_Eval(tls, interp, tclPreInitScript) == TCL_ERROR {
			return TCL_ERROR
		}
	}

	// In order to find init.tcl during initialization, the following script
	// is invoked by Tcl_Init(). It looks in several different directories:
	//
	//	$tcl_library		- can specify a primary location, if set, no
	//				  other locations will be checked. This is the
	//				  recommended way for a program that embeds
	//				  Tcl to specifically tell Tcl where to find
	//				  an init.tcl file.
	//
	//	$env(TCL_LIBRARY)	- highest priority so user can always override
	//				  the search path unless the application has
	//				  specified an exact directory above
	//
	//	$tclDefaultLibrary	- INTERNAL: This variable is set by Tcl on
	//				  those platforms where it can determine at
	//				  runtime the directory where it expects the
	//				  init.tcl file to be. After [tclInit] reads
	//				  and uses this value, it [unset]s it.
	//				  External users of Tcl should not make use of
	//				  the variable to customize [tclInit].
	//
	//	$tcl_libPath		- OBSOLETE: This variable is no longer set by
	//				  Tcl itself, but [tclInit] examines it in
	//				  case some program that embeds Tcl is
	//				  customizing [tclInit] by setting this
	//				  variable to a list of directories in which
	//				  to search.
	//
	//	[tcl::pkgconfig get scriptdir,runtime]
	//				- the directory determined by configure to be
	//				  the place where Tcl's script library is to
	//				  be installed.
	//
	// The first directory on this path that contains a valid init.tcl script
	// will be set as the value of tcl_library.
	//
	// Note that this entire search mechanism can be bypassed by defining an
	// alternate tclInit command before calling Tcl_Init().

	return XTcl_Eval(tls, interp,

		ts+39686)
}

//---------------------------------------------------------------------------
//
// TclInterpInit --
//
//	Initializes the invoking interpreter for using the parent, child and
//	safe interp facilities. This is called from inside Tcl_CreateInterp().
//
// Results:
//	Always returns TCL_OK for backwards compatibility.
//
// Side effects:
//	Adds the "interp" command to an interpreter and initializes the
//	interpInfoPtr field of the invoking interpreter.
//
//---------------------------------------------------------------------------

func XTclInterpInit(tls *libc.TLS, interp uintptr) int32 { /* tclInterp.c:469:1: */
	var interpInfoPtr uintptr
	var parentPtr uintptr
	var childPtr uintptr

	interpInfoPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(InterpInfo{})))
	(*Interp)(unsafe.Pointer(interp)).FinterpInfo = interpInfoPtr

	parentPtr = interpInfoPtr
	XTcl_InitHashTable(tls, parentPtr, 0)
	(*Parent)(unsafe.Pointer(parentPtr)).FtargetsPtr = uintptr(0)

	childPtr = interpInfoPtr + 96
	(*Child)(unsafe.Pointer(childPtr)).FparentInterp = uintptr(0)
	(*Child)(unsafe.Pointer(childPtr)).FchildEntryPtr = uintptr(0)
	(*Child)(unsafe.Pointer(childPtr)).FchildInterp = interp
	(*Child)(unsafe.Pointer(childPtr)).FinterpCmd = uintptr(0)
	XTcl_InitHashTable(tls, childPtr+32, 0)

	XTcl_NRCreateCommand(tls, interp, ts+41749, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTcl_InterpObjCmd})), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNRInterpCmd})),
		uintptr(0), uintptr(0))

	XTcl_CallWhenDeleted(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr)
	}{sInterpInfoDeleteProc})), uintptr(0))
	return TCL_OK
}

//---------------------------------------------------------------------------
//
// InterpInfoDeleteProc --
//
//	Invoked when an interpreter is being deleted. It releases all storage
//	used by the parent/child/safe interpreter facilities.
//
// Results:
//	None.
//
// Side effects:
//	Cleans up storage. Sets the interpInfoPtr field of the interp to NULL.
//
//---------------------------------------------------------------------------

func sInterpInfoDeleteProc(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclInterp.c:515:1: */
	var interpInfoPtr uintptr
	var childPtr uintptr
	var parentPtr uintptr
	var targetPtr uintptr

	interpInfoPtr = (*Interp)(unsafe.Pointer(interp)).FinterpInfo

	// There shouldn't be any commands left.

	parentPtr = interpInfoPtr
	if (*Parent)(unsafe.Pointer(parentPtr)).FchildTable.FnumEntries != 0 {
		XTcl_Panic(tls, ts+41756, 0)
	}
	XTcl_DeleteHashTable(tls, parentPtr)

	// Tell any interps that have aliases to this interp that they should
	// delete those aliases. If the other interp was already dead, it would
	// have removed the target record already.

	for targetPtr = (*Parent)(unsafe.Pointer(parentPtr)).FtargetsPtr; targetPtr != uintptr(0); {
		var tmpPtr uintptr = (*Target)(unsafe.Pointer(targetPtr)).FnextPtr
		XTcl_DeleteCommandFromToken(tls, (*Target)(unsafe.Pointer(targetPtr)).FchildInterp,
			(*Target)(unsafe.Pointer(targetPtr)).FchildCmd)
		targetPtr = tmpPtr
	}

	childPtr = interpInfoPtr + 96
	if (*Child)(unsafe.Pointer(childPtr)).FinterpCmd != uintptr(0) {
		// Tcl_DeleteInterp() was called on this interpreter, rather "interp
		// delete" or the equivalent deletion of the command in the parent.
		// First ensure that the cleanup callback doesn't try to delete the
		// interp again.

		(*Child)(unsafe.Pointer(childPtr)).FchildInterp = uintptr(0)
		XTcl_DeleteCommandFromToken(tls, (*Child)(unsafe.Pointer(childPtr)).FparentInterp,
			(*Child)(unsafe.Pointer(childPtr)).FinterpCmd)
	}

	// There shouldn't be any aliases left.

	if (*Child)(unsafe.Pointer(childPtr)).FaliasTable.FnumEntries != 0 {
		XTcl_Panic(tls, ts+41799, 0)
	}
	XTcl_DeleteHashTable(tls, childPtr+32)

	XTclpFree(tls, interpInfoPtr)
}

//----------------------------------------------------------------------
//
// Tcl_InterpObjCmd --
//
//	This function is invoked to process the "interp" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------
// ARGSUSED
func XTcl_InterpObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:594:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNRInterpCmd})), clientData, objc, objv)
}

func sNRInterpCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:604:1: */
	bp := tls.Alloc(304)
	defer tls.Free(304)

	var childInterp uintptr
	// var index int32 at bp+160, 4

	var parentInterp uintptr
	var i int32
	var flags int32
	var resultObjPtr uintptr
	// var cmdInfo Tcl_CmdInfo at bp+208, 64

	var _objPtr uintptr
	var i1 int32
	var last int32
	var safe int32
	var childPtr uintptr
	// var buf [40]int8 at bp+164, 40

	var i2 int32
	var iiPtr uintptr
	var exists int32
	var i3 int32
	var namespaceName uintptr
	// var limitType int32 at bp+272, 4

	var iiPtr1 uintptr
	var resultPtr uintptr
	var hPtr uintptr
	// var hashSearch Tcl_HashSearch at bp+280, 24

	var string uintptr
	var parentInterp1 uintptr // The parent of the child.
	var chan1 Tcl_Channel
	var iiPtr2 uintptr
	var hPtr1 uintptr
	var aliasPtr uintptr
	var aliasName uintptr

	if !(objc < 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+41841)
	return TCL_ERROR
__1:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&options11)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+160) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 160 /* index */))) {
	case uint32(0) /* OPT_ALIAS */ :
		goto __4
	case uint32(1) /* OPT_ALIASES */ :
		goto __5
	case uint32(2) /* OPT_BGERROR */ :
		goto __6
	case uint32(3) /* OPT_CANCEL */ :
		goto __7
	case uint32(5) /* OPT_CREATE */ :
		goto __8
	case uint32(6) /* OPT_DEBUG */ :
		goto __9
	case uint32(7) /* OPT_DELETE */ :
		goto __10
	case uint32(8) /* OPT_EVAL */ :
		goto __11
	case uint32(9) /* OPT_EXISTS */ :
		goto __12
	case uint32(10) /* OPT_EXPOSE */ :
		goto __13
	case uint32(11) /* OPT_HIDE */ :
		goto __14
	case uint32(12) /* OPT_HIDDEN */ :
		goto __15
	case uint32(13) /* OPT_ISSAFE */ :
		goto __16
	case uint32(14) /* OPT_INVOKEHID */ :
		goto __17
	case uint32(15) /* OPT_LIMIT */ :
		goto __18
	case uint32(16) /* OPT_MARKTRUSTED */ :
		goto __19
	case uint32(17) /* OPT_RECLIMIT */ :
		goto __20
	case uint32(4) /* OPT_CHILDREN */ :
		goto __21
	case uint32(18) /* OPT_SLAVES */ :
		goto __22
	case uint32(21) /* OPT_TRANSFER */ :
		goto __23
	case uint32(19) /* OPT_SHARE */ :
		goto __24
	case uint32(20) /* OPT_TARGET */ :
		goto __25
	}
	goto __3
__4:

	if !(objc < 4) {
		goto __26
	}
aliasArgs:
	XTcl_WrongNumArgs(tls, interp, 2, objv,
		ts+41855)
	return TCL_ERROR
__26:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __27
	}
	return TCL_ERROR
__27:
	;
	if !(objc == 4) {
		goto __28
	}
	return sAliasDescribe(tls, interp, childInterp, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
__28:
	;
	if !(objc == 5 && int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 4*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 4*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8)))
	}()))) == 0) {
		goto __29
	}
	return sAliasDelete(tls, interp, childInterp, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
__29:
	;
	if !(objc > 5) {
		goto __30
	}
	parentInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)))
	if !(parentInterp == uintptr(0)) {
		goto __31
	}
	return TCL_ERROR
__31:
	;

	return sAliasCreate(tls, interp, childInterp, parentInterp, *(*uintptr)(unsafe.Pointer(objv + 3*8)),
		*(*uintptr)(unsafe.Pointer(objv + 5*8)), objc-6, objv+uintptr(6)*8)
__30:
	;
	goto aliasArgs

__5:
	childInterp = sGetInterp2(tls, interp, objc, objv)
	if !(childInterp == uintptr(0)) {
		goto __32
	}
	return TCL_ERROR
__32:
	;
	return sAliasList(tls, interp, childInterp)
__6:
	if !(objc != 3 && objc != 4) {
		goto __33
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+41907)
	return TCL_ERROR
__33:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __34
	}
	return TCL_ERROR
__34:
	;
	return sChildBgerror(tls, interp, childInterp, objc-3, objv+uintptr(3)*8)
__7:

	flags = 0

	i = 2
__35:
	if !(i < objc) {
		goto __37
	}
	if !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}()))) != '-') {
		goto __38
	}
	goto __37
__38:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&cancelOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+160) != TCL_OK) {
		goto __39
	}
	return TCL_ERROR
__39:
	;

	switch uint32(*(*int32)(unsafe.Pointer(bp + 160 /* index */))) {
	case uint32(0) /* OPT_UNWIND */ :
		goto __41
	case uint32(1) /* OPT_LAST */ :
		goto __42
	}
	goto __40
__41:
	// The evaluation stack in the target interp is to be unwound.

	flags = flags | TCL_CANCEL_UNWIND
	goto __40
__42:
	i++
	goto endOfForLoop
__40:
	;
	goto __36
__36:
	i++
	goto __35
	goto __37
__37:
	;

endOfForLoop:
	if !(i < objc-2) {
		goto __43
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv,
		ts+41924)
	return TCL_ERROR
__43:
	;

	// Did they specify a child interp to cancel the script in progress
	// in?  If not, use the current interp.

	if !(i < objc) {
		goto __44
	}
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	if !(childInterp == uintptr(0)) {
		goto __46
	}
	return TCL_ERROR
__46:
	;
	i++
	goto __45
__44:
	childInterp = interp
__45:
	;

	if !(i < objc) {
		goto __47
	}
	resultObjPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))

	// Tcl_CancelEval removes this reference.

	(*Tcl_Obj)(unsafe.Pointer(resultObjPtr)).FrefCount++
	i++
	goto __48
__47:
	resultObjPtr = uintptr(0)
__48:
	;

	return XTcl_CancelEval(tls, childInterp, resultObjPtr, uintptr(0), flags)

__8:

	safe = XTcl_IsSafe(tls, interp)

	// Weird historical rules: "-safe" is accepted at the end, too.

	childPtr = uintptr(0)
	last = 0
	i1 = 2
__49:
	if !(i1 < objc) {
		goto __51
	}
	if !(last == 0 && int32(*(*int8)(unsafe.Pointer(XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i1)*8)))))) == '-') {
		goto __52
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i1)*8)), uintptr(unsafe.Pointer(&createOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+160) != TCL_OK) {
		goto __53
	}
	return TCL_ERROR
__53:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 160)) == 0) {
		goto __54
	}
	safe = 1
	goto __50
__54:
	;
	i1++
	last = 1
__52:
	;
	if !(childPtr != uintptr(0)) {
		goto __55
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+41955)
	return TCL_ERROR
__55:
	;
	if !(i1 < objc) {
		goto __56
	}
	childPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i1)*8))
__56:
	;
	goto __50
__50:
	i1++
	goto __49
	goto __51
__51:
	;
	*(*int8)(unsafe.Pointer(bp + 164)) = int8(0)
	if !(childPtr == uintptr(0)) {
		goto __57
	}
	// Create an anonymous interpreter -- we choose its name and the
	// name of the command. We check that the command name that we use
	// for the interpreter does not collide with an existing command
	// in the parent interpreter.

	i1 = 0
__58:
	;

	libc.Xsprintf(tls, bp+164, ts+41975, libc.VaList(bp, i1))
	if !(XTcl_GetCommandInfo(tls, interp, bp+164, bp+208) == 0) {
		goto __61
	}
	goto __60
__61:
	;
	goto __59
__59:
	i1++
	goto __58
	goto __60
__60:
	;
	childPtr = XTcl_NewStringObj(tls, bp+164, -1)
__57:
	;
	if !(sChildCreate(tls, interp, childPtr, safe) == uintptr(0)) {
		goto __62
	}
	if !(int32(*(*int8)(unsafe.Pointer(bp + 164))) != 0) {
		goto __63
	}
__64:
	_objPtr = childPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __67
	}
	XTclFreeObj(tls, _objPtr)
__67:
	;
	goto __65
__65:
	if 0 != 0 {
		goto __64
	}
	goto __66
__66:
	;
__63:
	;
	return TCL_ERROR
__62:
	;
	XTcl_SetObjResult(tls, interp, childPtr)
	return TCL_OK

__9: // TIP #378
	// Currently only -frame supported, otherwise ?-option ?value??

	if !(objc < 3 || objc > 5) {
		goto __68
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+41984)
	return TCL_ERROR
__68:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __69
	}
	return TCL_ERROR
__69:
	;
	return sChildDebugCmd(tls, interp, childInterp, objc-3, objv+uintptr(3)*8)
__10:

	i2 = 2
__70:
	if !(i2 < objc) {
		goto __72
	}
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i2)*8)))
	if !(childInterp == uintptr(0)) {
		goto __73
	}
	return TCL_ERROR
	goto __74
__73:
	if !(childInterp == interp) {
		goto __75
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+42005, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7949, ts+42043,
		ts+42050, uintptr(0)))
	return TCL_ERROR
__75:
	;
__74:
	;
	iiPtr = (*Interp)(unsafe.Pointer(childInterp)).FinterpInfo
	XTcl_DeleteCommandFromToken(tls, (*InterpInfo)(unsafe.Pointer(iiPtr)).Fchild.FparentInterp,
		(*InterpInfo)(unsafe.Pointer(iiPtr)).Fchild.FinterpCmd)
	goto __71
__71:
	i2++
	goto __70
	goto __72
__72:
	;
	return TCL_OK

__11:
	if !(objc < 4) {
		goto __76
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42061)
	return TCL_ERROR
__76:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __77
	}
	return TCL_ERROR
__77:
	;
	return sChildEval(tls, interp, childInterp, objc-3, objv+uintptr(3)*8)
__12:
	exists = 1

	childInterp = sGetInterp2(tls, interp, objc, objv)
	if !(childInterp == uintptr(0)) {
		goto __78
	}
	if !(objc > 3) {
		goto __79
	}
	return TCL_ERROR
__79:
	;
	XTcl_ResetResult(tls, interp)
	exists = 0
__78:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(exists != 0)))
	return TCL_OK

__13:
	if !(objc < 4 || objc > 5) {
		goto __80
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42080)
	return TCL_ERROR
__80:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __81
	}
	return TCL_ERROR
__81:
	;
	return sChildExpose(tls, interp, childInterp, objc-3, objv+uintptr(3)*8)
__14:
	if !(objc < 4 || objc > 5) {
		goto __82
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42109)
	return TCL_ERROR
__82:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __83
	}
	return TCL_ERROR
__83:
	;
	return sChildHide(tls, interp, childInterp, objc-3, objv+uintptr(3)*8)
__15:
	childInterp = sGetInterp2(tls, interp, objc, objv)
	if !(childInterp == uintptr(0)) {
		goto __84
	}
	return TCL_ERROR
__84:
	;
	return sChildHidden(tls, interp, childInterp)
__16:
	childInterp = sGetInterp2(tls, interp, objc, objv)
	if !(childInterp == uintptr(0)) {
		goto __85
	}
	return TCL_ERROR
__85:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(XTcl_IsSafe(tls, childInterp) != 0)))
	return TCL_OK
__17:

	namespaceName = uintptr(0)
	i3 = 3
__86:
	if !(i3 < objc) {
		goto __88
	}
	if !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8)))
	}()))) != '-') {
		goto __89
	}
	goto __88
__89:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8)), uintptr(unsafe.Pointer(&hiddenOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+160) != TCL_OK) {
		goto __90
	}
	return TCL_ERROR
__90:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 160)) == 0) {
		goto __91
	}
	namespaceName = ts + 7376 /* "::" */
	goto __92
__91:
	if !(*(*int32)(unsafe.Pointer(bp + 160)) == 1) {
		goto __93
	}
	if !(libc.PreIncInt32(&i3, 1) == objc) {
		goto __95
	} // There must be more arguments.
	goto __88
	goto __96
__95:
	namespaceName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8)))
	}()
__96:
	;
	goto __94
__93:
	i3++
	goto __88
__94:
	;
__92:
	;
	goto __87
__87:
	i3++
	goto __86
	goto __88
__88:
	;
	if !(objc-i3 < 1) {
		goto __97
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv,
		ts+42138)
	return TCL_ERROR
__97:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __98
	}
	return TCL_ERROR
__98:
	;
	return sChildInvokeHidden(tls, interp, childInterp, namespaceName, objc-i3,
		objv+uintptr(i3)*8)

__18:

	if !(objc < 4) {
		goto __99
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv,
		ts+42187)
	return TCL_ERROR
__99:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __100
	}
	return TCL_ERROR
__100:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(unsafe.Pointer(&limitTypes)), int32(unsafe.Sizeof(uintptr(0))), ts+42222, 0, bp+272) != TCL_OK) {
		goto __101
	}
	return TCL_ERROR
__101:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 272 /* limitType */))) {
	case uint32(0) /* LIMIT_TYPE_COMMANDS */ :
		goto __103
	case uint32(1) /* LIMIT_TYPE_TIME */ :
		goto __104
	}
	goto __102
__103:
	return sChildCommandLimitCmd(tls, interp, childInterp, 4, objc, objv)
__104:
	return sChildTimeLimitCmd(tls, interp, childInterp, 4, objc, objv)
__102:
	;

	goto __3
__19:
	if !(objc != 3) {
		goto __105
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42233)
	return TCL_ERROR
__105:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __106
	}
	return TCL_ERROR
__106:
	;
	return sChildMarkTrusted(tls, interp, childInterp)
__20:
	if !(objc != 3 && objc != 4) {
		goto __107
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42238)
	return TCL_ERROR
__107:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __108
	}
	return TCL_ERROR
__108:
	;
	return sChildRecursionLimit(tls, interp, childInterp, objc-3, objv+uintptr(3)*8)
__21:
__22:

	childInterp = sGetInterp2(tls, interp, objc, objv)
	if !(childInterp == uintptr(0)) {
		goto __109
	}
	return TCL_ERROR
__109:
	;
	iiPtr1 = (*Interp)(unsafe.Pointer(childInterp)).FinterpInfo
	resultPtr = XTcl_NewObj(tls)
	hPtr = XTcl_FirstHashEntry(tls, iiPtr1, bp+280)
__110:
	if !(hPtr != uintptr(0)) {
		goto __112
	}
	string = func() uintptr {
		if (*Tcl_HashTable)(unsafe.Pointer(iiPtr1)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(iiPtr1)).FkeyType == -1 {
			return *(*uintptr)(unsafe.Pointer(hPtr + 32))
		}
		return hPtr + 32
	}()
	XTcl_ListObjAppendElement(tls, uintptr(0), resultPtr,
		XTcl_NewStringObj(tls, string, -1))
	goto __111
__111:
	hPtr = XTcl_NextHashEntry(tls, bp+280)
	goto __110
	goto __112
__112:
	;
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK

__23:
__24:

	if !(objc != 5) {
		goto __113
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42254)
	return TCL_ERROR
__113:
	;
	parentInterp1 = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(parentInterp1 == uintptr(0)) {
		goto __114
	}
	return TCL_ERROR
__114:
	;
	chan1 = XTcl_GetChannel(tls, parentInterp1, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}(), uintptr(0))
	if !(chan1 == uintptr(0)) {
		goto __115
	}
	XTcl_TransferResult(tls, parentInterp1, TCL_OK, interp)
	return TCL_ERROR
__115:
	;
	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)))
	if !(childInterp == uintptr(0)) {
		goto __116
	}
	return TCL_ERROR
__116:
	;
	XTcl_RegisterChannel(tls, childInterp, chan1)
	if !(*(*int32)(unsafe.Pointer(bp + 160)) == 21) {
		goto __117
	}
	// When transferring, as opposed to sharing, we must unhitch the
	// channel from the interpreter where it started.

	if !(XTcl_UnregisterChannel(tls, parentInterp1, chan1) != TCL_OK) {
		goto __118
	}
	XTcl_TransferResult(tls, parentInterp1, TCL_OK, interp)
	return TCL_ERROR
__118:
	;
__117:
	;
	return TCL_OK

__25:

	if !(objc != 4) {
		goto __119
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42281)
	return TCL_ERROR
__119:
	;

	childInterp = sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(childInterp == uintptr(0)) {
		goto __120
	}
	return TCL_ERROR
__120:
	;

	aliasName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}()

	iiPtr2 = (*Interp)(unsafe.Pointer(childInterp)).FinterpInfo
	hPtr1 = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iiPtr2 + 96 /* &.child */ + 32 /* &.aliasTable */)).FfindProc})).f(tls, iiPtr2+96 /* &.child */ +32 /* &.aliasTable */, aliasName)
	if !(hPtr1 == uintptr(0)) {
		goto __121
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+42292,
		libc.VaList(bp+48, aliasName, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+7699, ts+42326, aliasName,
		uintptr(0)))
	return TCL_ERROR
__121:
	;
	aliasPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr1)).FclientData
	if !(XTcl_GetInterpPath(tls, interp, (*Alias)(unsafe.Pointer(aliasPtr)).FtargetInterp) != TCL_OK) {
		goto __122
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+42332, libc.VaList(bp+104, aliasName, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8))))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+120, ts+4178, ts+7949, ts+42043,
		ts+42400, uintptr(0)))
	return TCL_ERROR
__122:
	;
	return TCL_OK

__3:
	;
	return TCL_OK
}

var options11 = [23]uintptr{
	ts + 42415, ts + 42421, ts + 28007, ts + 42429,
	ts + 42436, ts + 23746, ts + 42445, ts + 7850,
	ts + 2994, ts + 12691, ts + 42451,
	ts + 42458, ts + 31829, ts + 42463,
	ts + 42470, ts + 42483, ts + 42489, ts + 42501,
	ts + 42516, ts + 42523, ts + 42529, ts + 42536,
	uintptr(0),
} /* tclInterp.c:612:23 */
var cancelOptions = [3]uintptr{
	ts + 42545, ts + 16430, uintptr(0),
} /* tclInterp.c:688:20 */
var createOptions = [3]uintptr{
	ts + 42553, ts + 16430, uintptr(0),
} /* tclInterp.c:761:20 */
var hiddenOptions = [4]uintptr{
	ts + 42559, ts + 26771, ts + 16430, uintptr(0),
} /* tclInterp.c:920:20 */
var limitTypes = [3]uintptr{
	ts + 13742, ts + 6086, uintptr(0),
} /* tclInterp.c:962:20 */

//---------------------------------------------------------------------------
//
// GetInterp2 --
//
//	Helper function for Tcl_InterpObjCmd() to convert the interp name
//	potentially specified on the command line to an Tcl_Interp.
//
// Results:
//	The return value is the interp specified on the command line, or the
//	interp argument itself if no interp was specified on the command line.
//	If the interp could not be found or the wrong number of arguments was
//	specified on the command line, the return value is NULL and an error
//	message is left in the interp's result.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sGetInterp2(tls *libc.TLS, interp uintptr, objc int32, objv uintptr) uintptr { /* tclInterp.c:1134:19: */
	if objc == 2 {
		return interp
	} else if objc == 3 {
		return sGetInterp(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	} else {
		XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42567)
		return uintptr(0)
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_CreateAlias --
//
//	Creates an alias between two interpreters.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Creates a new alias, manipulates the result field of childInterp.
//
//----------------------------------------------------------------------

func XTcl_CreateAlias(tls *libc.TLS, childInterp uintptr, childCmd uintptr, targetInterp uintptr, targetCmd uintptr, argc int32, argv uintptr) int32 { /* tclInterp.c:1168:1: */
	var childObjPtr uintptr
	var targetObjPtr uintptr
	var objv uintptr
	var i int32
	var result int32

	objv = XTclStackAlloc(tls, childInterp, int32(uint32(unsafe.Sizeof(uintptr(0)))*uint32(argc)))
	for i = 0; i < argc; i++ {
		*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) = XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), -1)
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FrefCount++
	}

	childObjPtr = XTcl_NewStringObj(tls, childCmd, -1)
	(*Tcl_Obj)(unsafe.Pointer(childObjPtr)).FrefCount++

	targetObjPtr = XTcl_NewStringObj(tls, targetCmd, -1)
	(*Tcl_Obj)(unsafe.Pointer(targetObjPtr)).FrefCount++

	result = sAliasCreate(tls, childInterp, childInterp, targetInterp, childObjPtr,
		targetObjPtr, argc, objv)

	for i = 0; i < argc; i++ {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTclStackFree(tls, childInterp, objv)
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = targetObjPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = childObjPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return result
}

//----------------------------------------------------------------------
//
// Tcl_CreateAliasObj --
//
//	Object version: Creates an alias between two interpreters.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Creates a new alias.
//
//----------------------------------------------------------------------

func XTcl_CreateAliasObj(tls *libc.TLS, childInterp uintptr, childCmd uintptr, targetInterp uintptr, targetCmd uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:1223:1: */
	var childObjPtr uintptr
	var targetObjPtr uintptr
	var result int32

	childObjPtr = XTcl_NewStringObj(tls, childCmd, -1)
	(*Tcl_Obj)(unsafe.Pointer(childObjPtr)).FrefCount++

	targetObjPtr = XTcl_NewStringObj(tls, targetCmd, -1)
	(*Tcl_Obj)(unsafe.Pointer(targetObjPtr)).FrefCount++

	result = sAliasCreate(tls, childInterp, childInterp, targetInterp, childObjPtr,
		targetObjPtr, objc, objv)

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = childObjPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = targetObjPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_GetAlias --
//
//	Gets information about an alias.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetAlias(tls *libc.TLS, interp uintptr, aliasName uintptr, targetInterpPtr uintptr, targetNamePtr uintptr, argcPtr uintptr, argvPtr uintptr) int32 { /* tclInterp.c:1265:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var iiPtr uintptr = (*Interp)(unsafe.Pointer(interp)).FinterpInfo
	var hPtr uintptr
	var aliasPtr uintptr
	var i int32
	var objc int32
	var objv uintptr

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iiPtr + 96 /* &.child */ + 32 /* &.aliasTable */)).FfindProc})).f(tls, iiPtr+96 /* &.child */ +32 /* &.aliasTable */, aliasName)
	if hPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+42574, libc.VaList(bp, aliasName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+42326, aliasName, uintptr(0)))
		return TCL_ERROR
	}
	aliasPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	objc = (*Alias)(unsafe.Pointer(aliasPtr)).Fobjc
	objv = aliasPtr + 48

	if targetInterpPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(targetInterpPtr)) = (*Alias)(unsafe.Pointer(aliasPtr)).FtargetInterp
	}
	if targetNamePtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(targetNamePtr)) = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
		}()
	}
	if argcPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(argcPtr)) = objc - 1
	}
	if argvPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(argvPtr)) = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(objc-1)))
		for i = 1; i < objc; i++ {
			*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argvPtr)) + uintptr(i-1)*8)) = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
			}()
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetAliasObj --
//
//	Object version: Gets information about an alias.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetAliasObj(tls *libc.TLS, interp uintptr, aliasName uintptr, targetInterpPtr uintptr, targetNamePtr uintptr, objcPtr uintptr, objvPtr uintptr) int32 { /* tclInterp.c:1327:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var iiPtr uintptr = (*Interp)(unsafe.Pointer(interp)).FinterpInfo
	var hPtr uintptr
	var aliasPtr uintptr
	var objc int32
	var objv uintptr

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iiPtr + 96 /* &.child */ + 32 /* &.aliasTable */)).FfindProc})).f(tls, iiPtr+96 /* &.child */ +32 /* &.aliasTable */, aliasName)
	if hPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+42574, libc.VaList(bp, aliasName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+42326, aliasName, uintptr(0)))
		return TCL_ERROR
	}
	aliasPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	objc = (*Alias)(unsafe.Pointer(aliasPtr)).Fobjc
	objv = aliasPtr + 48

	if targetInterpPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(targetInterpPtr)) = (*Alias)(unsafe.Pointer(aliasPtr)).FtargetInterp
	}
	if targetNamePtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(targetNamePtr)) = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
		}()
	}
	if objcPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(objcPtr)) = objc - 1
	}
	if objvPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(objvPtr)) = objv + uintptr(1)*8
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclPreventAliasLoop --
//
//	When defining an alias or renaming a command, prevent an alias loop
//	from being formed.
//
// Results:
//	A standard Tcl object result.
//
// Side effects:
//	If TCL_ERROR is returned, the function also stores an error message in
//	the interpreter's result object.
//
// NOTE:
//	This function is public internal (instead of being static to this
//	file) because it is also used from TclRenameCommand.
//
//----------------------------------------------------------------------

func XTclPreventAliasLoop(tls *libc.TLS, interp uintptr, cmdInterp uintptr, cmd Tcl_Command) int32 { /* tclInterp.c:1391:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var cmdPtr uintptr = cmd
	var aliasPtr uintptr
	var nextAliasPtr uintptr
	var aliasCmd Tcl_Command
	var aliasCmdPtr uintptr

	// If we are not creating or renaming an alias, then it is always OK to
	// create or rename the command.

	if (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sAliasObjCmd})) {
		return TCL_OK
	}

	// OK, we are dealing with an alias, so traverse the chain of aliases. If
	// we encounter the alias we are defining (or renaming to) any in the
	// chain then we have a loop.

	aliasPtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	nextAliasPtr = aliasPtr
	for 1 != 0 {
		var cmdNamePtr uintptr

		// If the target of the next alias in the chain is the same as the
		// source alias, we have a loop.

		if XTcl_InterpDeleted(tls, (*Alias)(unsafe.Pointer(nextAliasPtr)).FtargetInterp) != 0 {
			// The child interpreter can be deleted while creating the alias.
			// [Bug #641195]

			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+42595,
				libc.VaList(bp, XTcl_GetCommandName(tls, cmdInterp, cmd))))
			return TCL_ERROR
		}
		cmdNamePtr = (*Alias)(unsafe.Pointer(nextAliasPtr)).FobjPtr
		aliasCmd = XTcl_FindCommand(tls, (*Alias)(unsafe.Pointer(nextAliasPtr)).FtargetInterp,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(cmdNamePtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(cmdNamePtr)).Fbytes
				}
				return XTcl_GetString(tls, cmdNamePtr)
			}(),
			XTcl_GetGlobalNamespace(tls, (*Alias)(unsafe.Pointer(nextAliasPtr)).FtargetInterp),
			/*flags*/ 0)
		if aliasCmd == uintptr(0) {
			return TCL_OK
		}
		aliasCmdPtr = aliasCmd
		if aliasCmdPtr == cmdPtr {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+42651,
				libc.VaList(bp+8, XTcl_GetCommandName(tls, cmdInterp, cmd))))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+7949, ts+42043,
				ts+42707, uintptr(0)))
			return TCL_ERROR
		}

		// Otherwise, follow the chain one step further. See if the target
		// command is an alias - if so, follow the loop to its target command.
		// Otherwise we do not have a loop.

		if (*Command)(unsafe.Pointer(aliasCmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sAliasObjCmd})) {
			return TCL_OK
		}
		nextAliasPtr = (*Command)(unsafe.Pointer(aliasCmdPtr)).FobjClientData
	}
	return int32(0)

	// NOTREACHED
}

//----------------------------------------------------------------------
//
// AliasCreate --
//
//	Helper function to do the work to actually create an alias.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	An alias command is created and entered into the alias table for the
//	child interpreter.
//
//----------------------------------------------------------------------

func sAliasCreate(tls *libc.TLS, interp uintptr, childInterp uintptr, parentInterp uintptr, namePtr uintptr, targetNamePtr uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:1489:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var aliasPtr uintptr
	var hPtr uintptr
	var targetPtr uintptr
	var childPtr uintptr
	var parentPtr uintptr
	var prefv uintptr
	// var isNew int32 at bp, 4

	var i int32

	aliasPtr = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(Alias{}))+uint64(objc)*uint64(unsafe.Sizeof(uintptr(0)))))
	(*Alias)(unsafe.Pointer(aliasPtr)).Ftoken = namePtr
	(*Tcl_Obj)(unsafe.Pointer((*Alias)(unsafe.Pointer(aliasPtr)).Ftoken)).FrefCount++
	(*Alias)(unsafe.Pointer(aliasPtr)).FtargetInterp = parentInterp

	(*Alias)(unsafe.Pointer(aliasPtr)).Fobjc = objc + 1
	prefv = aliasPtr + 48

	*(*uintptr)(unsafe.Pointer(prefv)) = targetNamePtr
	(*Tcl_Obj)(unsafe.Pointer(targetNamePtr)).FrefCount++
	for i = 0; i < objc; i++ {
		*(*uintptr)(unsafe.Pointer(libc.PreIncUintptr(&prefv, 8))) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FrefCount++
	}

	XTcl_Preserve(tls, childInterp)
	XTcl_Preserve(tls, parentInterp)

	if childInterp == parentInterp {
		(*Alias)(unsafe.Pointer(aliasPtr)).FchildCmd = XTcl_NRCreateCommand(tls, childInterp,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes
				}
				return XTcl_GetString(tls, namePtr)
			}(), *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{sAliasObjCmd})), *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{sAliasNRCmd})), aliasPtr,
			*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sAliasObjCmdDeleteProc})))
	} else {
		(*Alias)(unsafe.Pointer(aliasPtr)).FchildCmd = XTcl_CreateObjCommand(tls, childInterp,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes
				}
				return XTcl_GetString(tls, namePtr)
			}(), *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{sAliasObjCmd})), aliasPtr,
			*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sAliasObjCmdDeleteProc})))
	}

	if XTclPreventAliasLoop(tls, interp, childInterp,
		(*Alias)(unsafe.Pointer(aliasPtr)).FchildCmd) != TCL_OK {
		// Found an alias loop! The last call to Tcl_CreateObjCommand made the
		// alias point to itself. Delete the command and its alias record. Be
		// careful to wipe out its client data first, so the command doesn't
		// try to delete itself.

		var cmdPtr uintptr

		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Alias)(unsafe.Pointer(aliasPtr)).Ftoken
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = targetNamePtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for i = 0; i < objc; i++ {
			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}

		cmdPtr = (*Alias)(unsafe.Pointer(aliasPtr)).FchildCmd
		(*Command)(unsafe.Pointer(cmdPtr)).FclientData = uintptr(0)
		(*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc = uintptr(0)
		(*Command)(unsafe.Pointer(cmdPtr)).FdeleteData = uintptr(0)
		XTcl_DeleteCommandFromToken(tls, childInterp, (*Alias)(unsafe.Pointer(aliasPtr)).FchildCmd)

		XTclpFree(tls, aliasPtr)

		// The result was already set by TclPreventAliasLoop.

		XTcl_Release(tls, childInterp)
		XTcl_Release(tls, parentInterp)
		return TCL_ERROR
	}

	// Make an entry in the alias table. If it already exists, retry.

	childPtr = (*Interp)(unsafe.Pointer(childInterp)).FinterpInfo + 96
	for 1 != 0 {
		var newToken uintptr
		var string uintptr

		string = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer((*Alias)(unsafe.Pointer(aliasPtr)).Ftoken)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer((*Alias)(unsafe.Pointer(aliasPtr)).Ftoken)).Fbytes
			}
			return XTcl_GetString(tls, (*Alias)(unsafe.Pointer(aliasPtr)).Ftoken)
		}()
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(childPtr + 32 /* &.aliasTable */)).FcreateProc})).f(tls, childPtr+32 /* &.aliasTable */, string, bp /* &isNew */)
		if *(*int32)(unsafe.Pointer(bp)) != 0 {
			break
		}

		// The alias name cannot be used as unique token, it is already taken.
		// We can produce a unique token by prepending "::" repeatedly. This
		// algorithm is a stop-gap to try to maintain the command name as
		// token for most use cases, fearful of possible backwards compat
		// problems. A better algorithm would produce unique tokens that need
		// not be related to the command name.
		//
		// ATTENTION: the tests in interp.test and possibly safe.test depend
		// on the precise definition of these tokens.

		for ok3 := true; ok3; ok3 = 0 != 0 {
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				newToken = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(newToken)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(newToken)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(newToken)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(newToken)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(newToken)).Fbytes, ts+7376, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(newToken)).Fbytes + 2)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(newToken)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(newToken)).FtypePtr = uintptr(0)
			{
			}
		}
		XTcl_AppendObjToObj(tls, newToken, (*Alias)(unsafe.Pointer(aliasPtr)).Ftoken)
		for ok5 := true; ok5; ok5 = 0 != 0 {
			var _objPtr uintptr = (*Alias)(unsafe.Pointer(aliasPtr)).Ftoken
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Alias)(unsafe.Pointer(aliasPtr)).Ftoken = newToken
		(*Tcl_Obj)(unsafe.Pointer((*Alias)(unsafe.Pointer(aliasPtr)).Ftoken)).FrefCount++
	}

	(*Alias)(unsafe.Pointer(aliasPtr)).FaliasEntryPtr = hPtr
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = aliasPtr

	// Create the new command. We must do it after deleting any old command,
	// because the alias may be pointing at a renamed alias, as in:
	//
	// interp alias {} foo {} bar		# Create an alias "foo"
	// rename foo zop				# Now rename the alias
	// interp alias {} foo {} zop		# Now recreate "foo"...

	targetPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Target{})))
	(*Target)(unsafe.Pointer(targetPtr)).FchildCmd = (*Alias)(unsafe.Pointer(aliasPtr)).FchildCmd
	(*Target)(unsafe.Pointer(targetPtr)).FchildInterp = childInterp

	parentPtr = (*Interp)(unsafe.Pointer(parentInterp)).FinterpInfo
	(*Target)(unsafe.Pointer(targetPtr)).FnextPtr = (*Parent)(unsafe.Pointer(parentPtr)).FtargetsPtr
	(*Target)(unsafe.Pointer(targetPtr)).FprevPtr = uintptr(0)
	if (*Parent)(unsafe.Pointer(parentPtr)).FtargetsPtr != uintptr(0) {
		(*Target)(unsafe.Pointer((*Parent)(unsafe.Pointer(parentPtr)).FtargetsPtr)).FprevPtr = targetPtr
	}
	(*Parent)(unsafe.Pointer(parentPtr)).FtargetsPtr = targetPtr
	(*Alias)(unsafe.Pointer(aliasPtr)).FtargetPtr = targetPtr

	XTcl_SetObjResult(tls, interp, (*Alias)(unsafe.Pointer(aliasPtr)).Ftoken)

	XTcl_Release(tls, childInterp)
	XTcl_Release(tls, parentInterp)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// AliasDelete --
//
//	Deletes the given alias from the child interpreter given.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Deletes the alias from the child interpreter.
//
//----------------------------------------------------------------------

func sAliasDelete(tls *libc.TLS, interp uintptr, childInterp uintptr, namePtr uintptr) int32 { /* tclInterp.c:1653:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var childPtr uintptr
	var aliasPtr uintptr
	var hPtr uintptr

	// If the alias has been renamed in the child, the parent can still use
	// the original name (with which it was created) to find the alias to
	// delete it.

	childPtr = (*Interp)(unsafe.Pointer(childInterp)).FinterpInfo + 96
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(childPtr + 32 /* &.aliasTable */)).FfindProc})).f(tls, childPtr+32 /* &.aliasTable */, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes
		}
		return XTcl_GetString(tls, namePtr)
	}())
	if hPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+42574, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes
				}
				return XTcl_GetString(tls, namePtr)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+42326,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes
				}
				return XTcl_GetString(tls, namePtr)
			}(), uintptr(0)))
		return TCL_ERROR
	}
	aliasPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	XTcl_DeleteCommandFromToken(tls, childInterp, (*Alias)(unsafe.Pointer(aliasPtr)).FchildCmd)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// AliasDescribe --
//
//	Sets the interpreter's result object to a Tcl list describing the
//	given alias in the given interpreter: its target command and the
//	additional arguments to prepend to any invocation of the alias.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sAliasDescribe(tls *libc.TLS, interp uintptr, childInterp uintptr, namePtr uintptr) int32 { /* tclInterp.c:1701:1: */
	var childPtr uintptr
	var hPtr uintptr
	var aliasPtr uintptr
	var prefixPtr uintptr

	// If the alias has been renamed in the child, the parent can still use
	// the original name (with which it was created) to find the alias to
	// describe it.

	childPtr = (*Interp)(unsafe.Pointer(childInterp)).FinterpInfo + 96
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(childPtr + 32 /* &.aliasTable */)).FfindProc})).f(tls, childPtr+32 /* &.aliasTable */, XTcl_GetString(tls, namePtr))
	if hPtr == uintptr(0) {
		return TCL_OK
	}
	aliasPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	prefixPtr = XTcl_NewListObj(tls, (*Alias)(unsafe.Pointer(aliasPtr)).Fobjc, aliasPtr+48)
	XTcl_SetObjResult(tls, interp, prefixPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// AliasList --
//
//	Computes a list of aliases defined in a child interpreter.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sAliasList(tls *libc.TLS, interp uintptr, childInterp uintptr) int32 { /* tclInterp.c:1745:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var entryPtr uintptr
	// var hashSearch Tcl_HashSearch at bp, 24

	var resultPtr uintptr = XTcl_NewObj(tls)
	var aliasPtr uintptr
	var childPtr uintptr

	childPtr = (*Interp)(unsafe.Pointer(childInterp)).FinterpInfo + 96

	entryPtr = XTcl_FirstHashEntry(tls, childPtr+32, bp)
	for ; entryPtr != uintptr(0); entryPtr = XTcl_NextHashEntry(tls, bp) {
		aliasPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
		XTcl_ListObjAppendElement(tls, uintptr(0), resultPtr, (*Alias)(unsafe.Pointer(aliasPtr)).Ftoken)
	}
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// AliasObjCmd --
//
//	This is the function that services invocations of aliases in a child
//	interpreter. One such command exists for each alias. When invoked,
//	this function redirects the invocation to the target command in the
//	parent interpreter as designated by the Alias record associated with
//	this command.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Causes forwarding of the invocation; all possible side effects may
//	occur as a result of invoking the command to which the invocation is
//	forwarded.
//
//----------------------------------------------------------------------

func sAliasNRCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:1789:1: */
	var aliasPtr uintptr = clientData
	var prefc int32
	var cmdc int32
	var i int32
	var prefv uintptr
	var cmdv uintptr
	var listPtr uintptr
	var listRep uintptr
	var flags int32 = TCL_EVAL_INVOKE

	// Append the arguments to the command prefix and invoke the command in
	// the target interp's global namespace.

	prefc = (*Alias)(unsafe.Pointer(aliasPtr)).Fobjc
	prefv = aliasPtr + 48
	cmdc = prefc + objc - 1

	listPtr = XTcl_NewListObj(tls, cmdc, uintptr(0))
	listRep = *(*uintptr)(unsafe.Pointer(listPtr + 32))
	(*List)(unsafe.Pointer(listRep)).FelemCount = cmdc
	cmdv = listRep + 16

	prefv = aliasPtr + 48
	libc.Xmemcpy(tls, cmdv, prefv, uint64(prefc)*uint64(unsafe.Sizeof(uintptr(0))))
	libc.Xmemcpy(tls, cmdv+uintptr(prefc)*8, objv+uintptr(1)*8, uint64(objc-1)*uint64(unsafe.Sizeof(uintptr(0))))

	for i = 0; i < cmdc; i++ {
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cmdv + uintptr(i)*8)))).FrefCount++
	}

	// Use the ensemble rewriting machinery to ensure correct error messages:
	// only the source command should show, not the full target prefix.

	if XTclInitRewriteEnsemble(tls, interp, 1, prefc, objv) != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{XTclClearRootEnsemble}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}
	XTclSkipTailcall(tls, interp)
	return XTcl_NREvalObj(tls, interp, listPtr, flags)
}

func sAliasObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:1837:1: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var aliasPtr uintptr = clientData
	var targetInterp uintptr = (*Alias)(unsafe.Pointer(aliasPtr)).FtargetInterp
	var result int32
	var prefc int32
	var cmdc int32
	var i int32
	var prefv uintptr
	var cmdv uintptr
	// var cmdArr [10]uintptr at bp, 80

	var tPtr uintptr = targetInterp
	var isRootEnsemble int32

	// Append the arguments to the command prefix and invoke the command in
	// the target interp's global namespace.

	prefc = (*Alias)(unsafe.Pointer(aliasPtr)).Fobjc
	prefv = aliasPtr + 48
	cmdc = prefc + objc - 1
	if cmdc <= 10 {
		cmdv = bp /* &cmdArr[0] */
	} else {
		cmdv = XTclStackAlloc(tls, interp, int32(uint64(cmdc)*uint64(unsafe.Sizeof(uintptr(0)))))
	}

	libc.Xmemcpy(tls, cmdv, prefv, uint64(prefc)*uint64(unsafe.Sizeof(uintptr(0))))
	libc.Xmemcpy(tls, cmdv+uintptr(prefc)*8, objv+uintptr(1)*8, uint64(objc-1)*uint64(unsafe.Sizeof(uintptr(0))))

	XTcl_ResetResult(tls, targetInterp)

	for i = 0; i < cmdc; i++ {
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cmdv + uintptr(i)*8)))).FrefCount++
	}

	// Use the ensemble rewriting machinery to ensure correct error messages:
	// only the source command should show, not the full target prefix.

	isRootEnsemble = XTclInitRewriteEnsemble(tls, tPtr, 1, prefc, objv)

	// Protect the target interpreter if it isn't the same as the source
	// interpreter so that we can continue to work with it after the target
	// command completes.

	if targetInterp != interp {
		XTcl_Preserve(tls, targetInterp)
	}

	// Execute the target command in the target interpreter.

	result = XTcl_EvalObjv(tls, targetInterp, cmdc, cmdv, TCL_EVAL_INVOKE)

	// Clean up the ensemble rewrite info if we set it in the first place.

	if isRootEnsemble != 0 {
		XTclResetRewriteEnsemble(tls, tPtr, 1)
	}

	// If it was a cross-interpreter alias, we need to transfer the result
	// back to the source interpreter and release the lock we previously set
	// on the target interpreter.

	if targetInterp != interp {
		XTcl_TransferResult(tls, targetInterp, result, interp)
		XTcl_Release(tls, targetInterp)
	}

	for i = 0; i < cmdc; i++ {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(cmdv + uintptr(i)*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if cmdv != bp {
		XTclStackFree(tls, interp, cmdv)
	}
	return result
}

//----------------------------------------------------------------------
//
// AliasObjCmdDeleteProc --
//
//	Is invoked when an alias command is deleted in a child. Cleans up all
//	storage associated with this alias.
//
// Results:
//	None.
//
// Side effects:
//	Deletes the alias record and its entry in the alias table for the
//	interpreter.
//
//----------------------------------------------------------------------

func sAliasObjCmdDeleteProc(tls *libc.TLS, clientData ClientData) { /* tclInterp.c:1946:1: */
	var aliasPtr uintptr = clientData
	var targetPtr uintptr
	var i int32
	var objv uintptr

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*Alias)(unsafe.Pointer(aliasPtr)).Ftoken
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	objv = aliasPtr + 48
	for i = 0; i < (*Alias)(unsafe.Pointer(aliasPtr)).Fobjc; i++ {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTcl_DeleteHashEntry(tls, (*Alias)(unsafe.Pointer(aliasPtr)).FaliasEntryPtr)

	// Splice the target record out of the target interpreter's parent list.

	targetPtr = (*Alias)(unsafe.Pointer(aliasPtr)).FtargetPtr
	if (*Target)(unsafe.Pointer(targetPtr)).FprevPtr != uintptr(0) {
		(*Target1)(unsafe.Pointer((*Target)(unsafe.Pointer(targetPtr)).FprevPtr)).FnextPtr = (*Target)(unsafe.Pointer(targetPtr)).FnextPtr
	} else {
		var parentPtr uintptr = (*Interp)(unsafe.Pointer((*Alias)(unsafe.Pointer(aliasPtr)).FtargetInterp)).FinterpInfo

		(*Parent)(unsafe.Pointer(parentPtr)).FtargetsPtr = (*Target)(unsafe.Pointer(targetPtr)).FnextPtr
	}
	if (*Target)(unsafe.Pointer(targetPtr)).FnextPtr != uintptr(0) {
		(*Target1)(unsafe.Pointer((*Target)(unsafe.Pointer(targetPtr)).FnextPtr)).FprevPtr = (*Target)(unsafe.Pointer(targetPtr)).FprevPtr
	}

	XTclpFree(tls, targetPtr)
	XTclpFree(tls, aliasPtr)
}

//----------------------------------------------------------------------
//
// Tcl_CreateChild --
//
//	Creates a child interpreter. The childPath argument denotes the name
//	of the new child relative to the current interpreter; the child is a
//	direct descendant of the one-before-last component of the path,
//	e.g. it is a descendant of the current interpreter if the childPath
//	argument contains only one component. Optionally makes the child
//	interpreter safe.
//
// Results:
//	Returns the interpreter structure created, or NULL if an error
//	occurred.
//
// Side effects:
//	Creates a new interpreter and a new interpreter object command in the
//	interpreter indicated by the childPath argument.
//
//----------------------------------------------------------------------

func XTcl_CreateSlave(tls *libc.TLS, interp uintptr, childPath uintptr, isSafe int32) uintptr { /* tclInterp.c:2005:12: */
	var pathPtr uintptr
	var childInterp uintptr

	pathPtr = XTcl_NewStringObj(tls, childPath, -1)
	childInterp = sChildCreate(tls, interp, pathPtr, isSafe)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = pathPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return childInterp
}

//----------------------------------------------------------------------
//
// Tcl_GetChild --
//
//	Finds a child interpreter by its path name.
//
// Results:
//	Returns a Tcl_Interp * for the named interpreter or NULL if not found.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetSlave(tls *libc.TLS, interp uintptr, childPath uintptr) uintptr { /* tclInterp.c:2037:12: */
	var pathPtr uintptr
	var childInterp uintptr

	pathPtr = XTcl_NewStringObj(tls, childPath, -1)
	childInterp = sGetInterp(tls, interp, pathPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = pathPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return childInterp
}

//----------------------------------------------------------------------
//
// Tcl_GetParent --
//
//	Finds the parent interpreter of a child interpreter.
//
// Results:
//	Returns a Tcl_Interp * for the parent interpreter or NULL if none.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetMaster(tls *libc.TLS, interp uintptr) uintptr { /* tclInterp.c:2068:12: */
	var childPtr uintptr // Child record of this interpreter.

	if interp == uintptr(0) {
		return uintptr(0)
	}
	childPtr = (*Interp)(unsafe.Pointer(interp)).FinterpInfo + 96
	return (*Child)(unsafe.Pointer(childPtr)).FparentInterp
}

//----------------------------------------------------------------------
//
// TclSetChildCancelFlags --
//
//	This function marks all child interpreters belonging to a given
//	interpreter as being canceled or not canceled, depending on the
//	provided flags.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclSetSlaveCancelFlags(tls *libc.TLS, interp uintptr, flags int32, force int32) { /* tclInterp.c:2100:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var parentPtr uintptr // Parent record of given interpreter.
	var hPtr uintptr      // Search element.
	// var hashSearch Tcl_HashSearch at bp, 24
	// Search variable.
	var childPtr uintptr // Child record of interpreter.
	var iPtr uintptr

	if interp == uintptr(0) {
		return
	}

	flags = flags & (CANCELED | TCL_CANCEL_UNWIND)

	parentPtr = (*Interp)(unsafe.Pointer(interp)).FinterpInfo

	hPtr = XTcl_FirstHashEntry(tls, parentPtr, bp)
	for ; hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
		childPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		iPtr = (*Child)(unsafe.Pointer(childPtr)).FchildInterp

		if iPtr == uintptr(0) {
			continue
		}

		if flags == 0 {
			XTclResetCancellation(tls, iPtr, force)
		} else {
			*(*int32)(unsafe.Pointer(iPtr + 424)) |= CANCELED
			if flags&TCL_CANCEL_UNWIND != 0 {
				*(*int32)(unsafe.Pointer(iPtr + 424)) |= TCL_CANCEL_UNWIND
			}

		}

		// Now, recursively handle this for the children of this child
		// interpreter.

		XTclSetSlaveCancelFlags(tls, iPtr, flags, force)
	}
}

//----------------------------------------------------------------------
//
// Tcl_GetInterpPath --
//
//	Sets the result of the asking interpreter to a proper Tcl list
//	containing the names of interpreters between the asking and target
//	interpreters. The target interpreter must be either the same as the
//	asking interpreter or one of its children (including recursively).
//
// Results:
//	TCL_OK if the target interpreter is the same as, or a descendant of,
//	the asking interpreter; TCL_ERROR else. This way one can distinguish
//	between the case where the asking and target interps are the same (an
//	empty list is the result, and TCL_OK is returned) and when the target
//	is not a descendant of the asking interpreter (in which case the Tcl
//	result is an error message and the function returns TCL_ERROR).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetInterpPath(tls *libc.TLS, interp uintptr, targetInterp uintptr) int32 { /* tclInterp.c:2172:1: */
	var iiPtr uintptr

	if targetInterp == interp {
		XTcl_SetObjResult(tls, interp, XTcl_NewObj(tls))
		return TCL_OK
	}
	if targetInterp == uintptr(0) {
		return TCL_ERROR
	}
	iiPtr = (*Interp)(unsafe.Pointer(targetInterp)).FinterpInfo
	if XTcl_GetInterpPath(tls, interp, (*InterpInfo)(unsafe.Pointer(iiPtr)).Fchild.FparentInterp) != TCL_OK {
		return TCL_ERROR
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), XTcl_GetObjResult(tls, interp),
		XTcl_NewStringObj(tls, func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(iiPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(iiPtr)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer((*InterpInfo)(unsafe.Pointer(iiPtr)).Fchild.FchildEntryPtr + 32))
			}
			return (*InterpInfo)(unsafe.Pointer(iiPtr)).Fchild.FchildEntryPtr + 32
		}(), -1))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// GetInterp --
//
//	Helper function to find a child interpreter given a pathname.
//
// Results:
//	Returns the child interpreter known by that name in the calling
//	interpreter, or NULL if no interpreter known by that name exists.
//
// Side effects:
//	Assigns to the pointer variable passed in, if not NULL.
//
//----------------------------------------------------------------------

func sGetInterp(tls *libc.TLS, interp uintptr, pathPtr uintptr) uintptr { /* tclInterp.c:2212:19: */
	bp := tls.Alloc(60)
	defer tls.Free(60)

	var hPtr uintptr     // Search element.
	var childPtr uintptr // Interim child record.
	// var objv uintptr at bp+48, 8

	// var objc int32 at bp+56, 4

	var i int32
	var searchInterp uintptr // Interim storage for interp. to find.
	var parentInfoPtr uintptr

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 48)) = *(*uintptr)(unsafe.Pointer(pathPtr + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 56)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, pathPtr, bp+56, bp+48)
	}() != TCL_OK {
		return uintptr(0)
	}

	searchInterp = interp
	for i = 0; i < *(*int32)(unsafe.Pointer(bp + 56 /* objc */)); i++ {
		parentInfoPtr = (*Interp)(unsafe.Pointer(searchInterp)).FinterpInfo
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(parentInfoPtr /* &.parent */ /* &.childTable */)).FfindProc})).f(tls, parentInfoPtr /* &.parent */ /* &.childTable */, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* objv */)) + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* objv */)) + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* objv */)) + uintptr(i)*8)))
		}())
		if hPtr == uintptr(0) {
			searchInterp = uintptr(0)
			break
		}
		childPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		searchInterp = (*Child)(unsafe.Pointer(childPtr)).FchildInterp
		if searchInterp == uintptr(0) {
			break
		}
	}
	if searchInterp == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+42717, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
				}
				return XTcl_GetString(tls, pathPtr)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+42043,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
				}
				return XTcl_GetString(tls, pathPtr)
			}(), uintptr(0)))
	}
	return searchInterp
}

//----------------------------------------------------------------------
//
// ChildBgerror --
//
//	Helper function to set/query the background error handling command
//	prefix of an interp
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	When (objc == 1), childInterp will be set to a new background handler
//	of objv[0].
//
//----------------------------------------------------------------------

func sChildBgerror(tls *libc.TLS, interp uintptr, childInterp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:2272:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	if objc != 0 {
		// var length int32 at bp+40, 4

		if TCL_ERROR == func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 40)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)) + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjLength(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv)), bp+40)
		}() ||
			*(*int32)(unsafe.Pointer(bp + 40)) < 1 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+42749, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+42043,
				ts+42787, uintptr(0)))
			return TCL_ERROR
		}
		XTclSetBgErrorHandler(tls, childInterp, *(*uintptr)(unsafe.Pointer(objv)))
	}
	XTcl_SetObjResult(tls, interp, XTclGetBgErrorHandler(tls, childInterp))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ChildCreate --
//
//	Helper function to do the actual work of creating a child interp and
//	new object command. Also optionally makes the new child interpreter
//	"safe".
//
// Results:
//	Returns the new Tcl_Interp * if successful or NULL if not. If failed,
//	the result of the invoking interpreter contains an error message.
//
// Side effects:
//	Creates a new child interpreter and a new object command.
//
//----------------------------------------------------------------------

func sChildCreate(tls *libc.TLS, interp uintptr, pathPtr uintptr, safe int32) uintptr { /* tclInterp.c:2314:19: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var parentInterp uintptr
	var childInterp uintptr
	var childPtr uintptr
	var parentInfoPtr uintptr
	var hPtr uintptr
	var path uintptr
	// var isNew int32 at bp+24, 4

	// var objc int32 at bp+8, 4

	// var objv uintptr at bp+16, 8

	var _objPtr uintptr
	var objPtr uintptr
	var _objPtr1 uintptr
	var clockObj uintptr
	var status int32

	if !(XTcl_ListObjGetElements(tls, interp, pathPtr, bp+8, bp+16) != TCL_OK) {
		goto __1
	}
	return uintptr(0)
__1:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 8)) < 2) {
		goto __2
	}
	parentInterp = interp
	path = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
		}
		return XTcl_GetString(tls, pathPtr)
	}()
	goto __3
__2:

	objPtr = XTcl_NewListObj(tls, *(*int32)(unsafe.Pointer(bp + 8))-1, *(*uintptr)(unsafe.Pointer(bp + 16 /* objv */)))
	parentInterp = sGetInterp(tls, interp, objPtr)
__4:
	_objPtr = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __7
	}
	XTclFreeObj(tls, _objPtr)
__7:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	if !(parentInterp == uintptr(0)) {
		goto __8
	}
	return uintptr(0)
__8:
	;
	path = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(*(*int32)(unsafe.Pointer(bp + 8))-1)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(*(*int32)(unsafe.Pointer(bp + 8))-1)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + uintptr(*(*int32)(unsafe.Pointer(bp + 8))-1)*8)))
	}()
__3:
	;
	if !(safe == 0) {
		goto __9
	}
	safe = XTcl_IsSafe(tls, parentInterp)
__9:
	;

	parentInfoPtr = (*Interp)(unsafe.Pointer(parentInterp)).FinterpInfo
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(parentInfoPtr /* &.parent */ /* &.childTable */)).FcreateProc})).f(tls, parentInfoPtr /* &.parent */ /* &.childTable */, path, bp+24 /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp + 24)) == 0) {
		goto __10
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+42801,
		libc.VaList(bp, path)))
	return uintptr(0)
__10:
	;

	childInterp = XTcl_CreateInterp(tls)
	childPtr = (*Interp)(unsafe.Pointer(childInterp)).FinterpInfo + 96
	(*Child)(unsafe.Pointer(childPtr)).FparentInterp = parentInterp
	(*Child)(unsafe.Pointer(childPtr)).FchildEntryPtr = hPtr
	(*Child)(unsafe.Pointer(childPtr)).FchildInterp = childInterp
	(*Child)(unsafe.Pointer(childPtr)).FinterpCmd = XTcl_NRCreateCommand(tls, parentInterp, path,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sChildObjCmd})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sNRChildCmd})), childInterp, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sChildObjCmdDeleteProc})))
	XTcl_InitHashTable(tls, childPtr+32, 0)
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = childPtr
	XTcl_SetVar2(tls, childInterp, ts+42854, uintptr(0), ts+18935, TCL_GLOBAL_ONLY)

	// Inherit the recursion limit.

	(*Interp)(unsafe.Pointer(childInterp)).FmaxNestingDepth = (*Interp)(unsafe.Pointer(parentInterp)).FmaxNestingDepth

	if !(safe != 0) {
		goto __11
	}
	if !(XTcl_MakeSafe(tls, childInterp) == TCL_ERROR) {
		goto __13
	}
	goto error
__13:
	;
	goto __12
__11:
	if !(XTcl_Init(tls, childInterp) == TCL_ERROR) {
		goto __14
	}
	goto error
__14:
	;

	// This will create the "memory" command in child interpreters if we
	// compiled with TCL_MEM_DEBUG, otherwise it does nothing.

__12:
	;

	// Inherit the TIP#143 limits.

	sInheritLimitsFromParent(tls, childInterp, parentInterp)

	// The [clock] command presents a safe API, but uses unsafe features in
	// its implementation. This means it has to be implemented in safe interps
	// as an alias to a version in the (trusted) parent.

	if !(safe != 0) {
		goto __15
	}

__16:
	;
__19:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __22
	}
	XTclAllocateFreeObjects(tls)
__22:
	;
	clockObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
	(*Tcl_Obj)(unsafe.Pointer(clockObj)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0) {
		goto __23
	}
	(*Tcl_Obj)(unsafe.Pointer(clockObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(clockObj)).Flength = 0
	goto __24
__23:
	(*Tcl_Obj)(unsafe.Pointer(clockObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(clockObj)).Fbytes, ts+11344, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(clockObj)).Fbytes + 5)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(clockObj)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
__24:
	;
	(*Tcl_Obj)(unsafe.Pointer(clockObj)).FtypePtr = uintptr(0)

	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	(*Tcl_Obj)(unsafe.Pointer(clockObj)).FrefCount++
	status = sAliasCreate(tls, interp, childInterp, parentInterp, clockObj,
		clockObj, 0, uintptr(0))
__25:
	_objPtr1 = clockObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __28
	}
	XTclFreeObj(tls, _objPtr1)
__28:
	;
	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	if !(status != TCL_OK) {
		goto __29
	}
	goto error2
__29:
	;
__15:
	;

	return childInterp

error:
	XTcl_TransferResult(tls, childInterp, TCL_ERROR, interp)
error2:
	XTcl_DeleteInterp(tls, childInterp)

	return uintptr(0)
}

//----------------------------------------------------------------------
//
// ChildObjCmd --
//
//	Command to manipulate an interpreter, e.g. to send commands to it to
//	be evaluated. One such command exists for each child interpreter.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See user documentation for details.
//
//----------------------------------------------------------------------

func sChildObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:2448:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNRChildCmd})), clientData, objc, objv)
}

func sNRChildCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:2458:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var childInterp uintptr = clientData
	// var index int32 at bp, 4

	if childInterp == uintptr(0) {
		XTcl_Panic(tls, ts+42870, 0)
	}

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+41841)
		return TCL_ERROR
	}
	if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&options12)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK {
		return TCL_ERROR
	}

	switch uint32(*(*int32)(unsafe.Pointer(bp /* index */))) {
	case uint32(0) /* OPT_ALIAS */ :
		if objc > 2 {
			if objc == 3 {
				return sAliasDescribe(tls, interp, childInterp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
			}
			if int32(*(*int8)(unsafe.Pointer(func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
			}()))) == 0 {
				if objc == 4 {
					return sAliasDelete(tls, interp, childInterp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
				}
			} else {
				return sAliasCreate(tls, interp, childInterp, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)),
					*(*uintptr)(unsafe.Pointer(objv + 3*8)), objc-4, objv+uintptr(4)*8)
			}
		}
		XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42912)
		return TCL_ERROR
	case uint32(1) /* OPT_ALIASES */ :
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		return sAliasList(tls, interp, childInterp)
	case uint32(2) /* OPT_BGERROR */ :
		if objc != 2 && objc != 3 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42945)
			return TCL_ERROR
		}
		return sChildBgerror(tls, interp, childInterp, objc-2, objv+uintptr(2)*8)
	case uint32(3) /* OPT_DEBUG */ :
		// TIP #378
		// Currently only -frame supported, otherwise ?-option ?value? ...?
		if objc > 4 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42957)
			return TCL_ERROR
		}
		return sChildDebugCmd(tls, interp, childInterp, objc-2, objv+uintptr(2)*8)
	case uint32(4) /* OPT_EVAL */ :
		if objc < 3 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+12609)
			return TCL_ERROR
		}
		return sChildEval(tls, interp, childInterp, objc-2, objv+uintptr(2)*8)
	case uint32(5) /* OPT_EXPOSE */ :
		if objc < 3 || objc > 4 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42973)
			return TCL_ERROR
		}
		return sChildExpose(tls, interp, childInterp, objc-2, objv+uintptr(2)*8)
	case uint32(6) /* OPT_HIDE */ :
		if objc < 3 || objc > 4 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+42997)
			return TCL_ERROR
		}
		return sChildHide(tls, interp, childInterp, objc-2, objv+uintptr(2)*8)
	case uint32(7) /* OPT_HIDDEN */ :
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		return sChildHidden(tls, interp, childInterp)
	case uint32(8) /* OPT_ISSAFE */ :
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(XTcl_IsSafe(tls, childInterp) != 0)))
		return TCL_OK
	case uint32(9) /* OPT_INVOKEHIDDEN */ :
		{
			var i int32
			var namespaceName uintptr

			namespaceName = uintptr(0)
			for i = 2; i < objc; i++ {
				if int32(*(*int8)(unsafe.Pointer(func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
				}()))) != '-' {
					break
				}
				if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&hiddenOptions1)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK {
					return TCL_ERROR
				}
				if *(*int32)(unsafe.Pointer(bp)) == 0 {
					namespaceName = ts + 7376 /* "::" */
				} else if *(*int32)(unsafe.Pointer(bp)) == 1 {
					if libc.PreIncInt32(&i, 1) == objc { // There must be more arguments.
						break
					} else {
						namespaceName = func() uintptr {
							if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
								return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
							}
							return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
						}()
					}
				} else {
					i++
					break
				}
			}
			if objc-i < 1 {
				XTcl_WrongNumArgs(tls, interp, 2, objv,
					ts+43021)
				return TCL_ERROR
			}
			return sChildInvokeHidden(tls, interp, childInterp, namespaceName,
				objc-i, objv+uintptr(i)*8)

		}
	case uint32(10) /* OPT_LIMIT */ :
		{
			// var limitType int32 at bp+4, 4

			if objc < 3 {
				XTcl_WrongNumArgs(tls, interp, 2, objv, ts+43065)
				return TCL_ERROR
			}
			if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&limitTypes1)), int32(unsafe.Sizeof(uintptr(0))), ts+42222, 0, bp+4) != TCL_OK {
				return TCL_ERROR
			}
			switch uint32(*(*int32)(unsafe.Pointer(bp + 4 /* limitType */))) {
			case uint32(0) /* LIMIT_TYPE_COMMANDS */ :
				return sChildCommandLimitCmd(tls, interp, childInterp, 3, objc, objv)
			case uint32(1) /* LIMIT_TYPE_TIME */ :
				return sChildTimeLimitCmd(tls, interp, childInterp, 3, objc, objv)
			}

		}
		break
	case uint32(11) /* OPT_MARKTRUSTED */ :
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		return sChildMarkTrusted(tls, interp, childInterp)
	case uint32(12) /* OPT_RECLIMIT */ :
		if objc != 2 && objc != 3 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+43095)
			return TCL_ERROR
		}
		return sChildRecursionLimit(tls, interp, childInterp, objc-2, objv+uintptr(2)*8)
	}

	return TCL_ERROR
}

var options12 = [14]uintptr{
	ts + 42415, ts + 42421, ts + 28007, ts + 42445,
	ts + 2994, ts + 42451, ts + 42458, ts + 31829,
	ts + 42463, ts + 42470, ts + 42483, ts + 42489,
	ts + 42501, uintptr(0),
} /* tclInterp.c:2466:23 */
var hiddenOptions1 = [4]uintptr{
	ts + 42559, ts + 26771, ts + 16430, uintptr(0),
} /* tclInterp.c:2565:20 */
var limitTypes1 = [3]uintptr{
	ts + 13742, ts + 6086, uintptr(0),
} /* tclInterp.c:2603:20 */

//----------------------------------------------------------------------
//
// ChildObjCmdDeleteProc --
//
//	Invoked when an object command for a child interpreter is deleted;
//	cleans up all state associated with the child interpreter and destroys
//	the child interpreter.
//
// Results:
//	None.
//
// Side effects:
//	Cleans up all state associated with the child interpreter and destroys
//	the child interpreter.
//
//----------------------------------------------------------------------

func sChildObjCmdDeleteProc(tls *libc.TLS, clientData ClientData) { /* tclInterp.c:2664:1: */
	var childPtr uintptr // Interim storage for Child record.
	var childInterp uintptr = clientData
	// And for a child interp.

	childPtr = (*Interp)(unsafe.Pointer(childInterp)).FinterpInfo + 96

	// Unlink the child from its parent interpreter.

	XTcl_DeleteHashEntry(tls, (*Child)(unsafe.Pointer(childPtr)).FchildEntryPtr)

	// Set to NULL so that when the InterpInfo is cleaned up in the child it
	// does not try to delete the command causing all sorts of grief. See
	// ChildRecordDeleteProc().

	(*Child)(unsafe.Pointer(childPtr)).FinterpCmd = uintptr(0)

	if (*Child)(unsafe.Pointer(childPtr)).FchildInterp != uintptr(0) {
		XTcl_DeleteInterp(tls, (*Child)(unsafe.Pointer(childPtr)).FchildInterp)
	}
}

//----------------------------------------------------------------------
//
// ChildDebugCmd -- TIP #378
//
//	Helper function to handle 'debug' command in a child interpreter.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May modify INTERP_DEBUG_FRAME flag in the child.
//
//----------------------------------------------------------------------

func sChildDebugCmd(tls *libc.TLS, interp uintptr, childInterp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:2709:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var debugType int32 at bp, 4

	var iPtr uintptr
	var resultPtr uintptr

	iPtr = childInterp
	if objc == 0 {
		resultPtr = XTcl_NewObj(tls)
		XTcl_ListObjAppendElement(tls, uintptr(0), resultPtr,
			XTcl_NewStringObj(tls, ts+43106, -1))
		XTcl_ListObjAppendElement(tls, uintptr(0), resultPtr,
			XTcl_NewIntObj(tls, libc.Bool32((*Interp)(unsafe.Pointer(iPtr)).Fflags&INTERP_DEBUG_FRAME != 0)))
		XTcl_SetObjResult(tls, interp, resultPtr)
	} else {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), uintptr(unsafe.Pointer(&debugTypes)), int32(unsafe.Sizeof(uintptr(0))), ts+43113, 0, bp) != TCL_OK {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp)) == 0 {
			if objc == 2 { // set
				if XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) !=
					TCL_OK {
					return TCL_ERROR
				}

				// Quietly ignore attempts to disable interp debugging.  This
				// is a one-way switch as frame debug info is maintained in a
				// stack that must be consistent once turned on.

				if *(*int32)(unsafe.Pointer(bp)) != 0 {
					*(*int32)(unsafe.Pointer(iPtr + 424)) |= INTERP_DEBUG_FRAME
				}
			}
			XTcl_SetObjResult(tls, interp,
				XTcl_NewIntObj(tls, libc.Bool32((*Interp)(unsafe.Pointer(iPtr)).Fflags&INTERP_DEBUG_FRAME != 0)))
		}
	}
	return TCL_OK
}

var debugTypes = [2]uintptr{
	ts + 43106, uintptr(0),
} /* tclInterp.c:2716:23 */

//----------------------------------------------------------------------
//
// ChildEval --
//
//	Helper function to evaluate a command in a child interpreter.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Whatever the command does.
//
//----------------------------------------------------------------------

func sChildEval(tls *libc.TLS, interp uintptr, childInterp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:2780:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var result int32

	// TIP #285: If necessary, reset the cancellation flags for the child
	// interpreter now; otherwise, canceling a script in a parent interpreter
	// can result in a situation where a child interpreter can no longer
	// evaluate any scripts unless somebody calls the TclResetCancellation
	// function for that particular Tcl_Interp.

	XTclSetSlaveCancelFlags(tls, childInterp, 0, 0)

	XTcl_Preserve(tls, childInterp)
	XTcl_AllowExceptions(tls, childInterp)

	if objc == 1 {
		// TIP #280: Make actual argument location available to eval'd script.

		var iPtr uintptr = interp
		*(*uintptr)(unsafe.Pointer(bp /* invoker */)) = (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr
		*(*int32)(unsafe.Pointer(bp + 8 /* word */)) = 0

		XTclArgumentGet(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp, bp+8)

		result = XTclEvalObjEx(tls, childInterp, *(*uintptr)(unsafe.Pointer(objv)), 0, *(*uintptr)(unsafe.Pointer(bp /* invoker */)), *(*int32)(unsafe.Pointer(bp + 8 /* word */)))
	} else {
		var objPtr uintptr = XTcl_ConcatObj(tls, objc, objv)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
		result = XTcl_EvalObjEx(tls, childInterp, objPtr, 0)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTcl_TransferResult(tls, childInterp, result, interp)

	XTcl_Release(tls, childInterp)
	return result
}

//----------------------------------------------------------------------
//
// ChildExpose --
//
//	Helper function to expose a command in a child interpreter.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	After this call scripts in the child will be able to invoke the newly
//	exposed command.
//
//----------------------------------------------------------------------

func sChildExpose(tls *libc.TLS, interp uintptr, childInterp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:2844:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var name uintptr

	if XTcl_IsSafe(tls, interp) != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+43126,
			-1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+42043, ts+43185,
			uintptr(0)))
		return TCL_ERROR
	}

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(func() int32 {
			if objc == 1 {
				return 0
			}
			return 1
		}())*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(func() int32 {
				if objc == 1 {
					return 0
				}
				return 1
			}())*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(func() int32 {
			if objc == 1 {
				return 0
			}
			return 1
		}())*8)))
	}()
	if XTcl_ExposeCommand(tls, childInterp, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
	}(),
		name) != TCL_OK {
		XTcl_TransferResult(tls, childInterp, TCL_ERROR, interp)
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ChildRecursionLimit --
//
//	Helper function to set/query the Recursion limit of an interp
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	When (objc == 1), childInterp will be set to a new recursion limit of
//	objv[0].
//
//----------------------------------------------------------------------

func sChildRecursionLimit(tls *libc.TLS, interp uintptr, childInterp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:2888:1: */
	bp := tls.Alloc(108)
	defer tls.Free(108)

	var iPtr uintptr
	// var limit int32 at bp+104, 4

	if objc != 0 {
		if XTcl_IsSafe(tls, interp) != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+43192, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+42043, ts+43185,
				uintptr(0)))
			return TCL_ERROR
		}
		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 104)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)) + 32)))
					return TCL_OK
				}()
			}
			return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp+104)
		}() == TCL_ERROR {
			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp + 104)) <= 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+43259, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7949, ts+42043, ts+43287,
				uintptr(0)))
			return TCL_ERROR
		}
		XTcl_SetRecursionLimit(tls, childInterp, *(*int32)(unsafe.Pointer(bp + 104 /* limit */)))
		iPtr = childInterp
		if interp == childInterp && (*Interp)(unsafe.Pointer(iPtr)).FnumLevels > *(*int32)(unsafe.Pointer(bp + 104)) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+43296, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+43336, uintptr(0)))
			return TCL_ERROR
		}
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv)))
		return TCL_OK
	} else {
		*(*int32)(unsafe.Pointer(bp + 104 /* limit */)) = XTcl_SetRecursionLimit(tls, childInterp, 0)
		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 104 /* limit */))))
		return TCL_OK
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// ChildHide --
//
//	Helper function to hide a command in a child interpreter.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	After this call scripts in the child will no longer be able to invoke
//	the named command.
//
//----------------------------------------------------------------------

func sChildHide(tls *libc.TLS, interp uintptr, childInterp uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:2950:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var name uintptr

	if XTcl_IsSafe(tls, interp) != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+43346,
			-1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+42043, ts+43185,
			uintptr(0)))
		return TCL_ERROR
	}

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(func() int32 {
			if objc == 1 {
				return 0
			}
			return 1
		}())*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(func() int32 {
				if objc == 1 {
					return 0
				}
				return 1
			}())*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(func() int32 {
			if objc == 1 {
				return 0
			}
			return 1
		}())*8)))
	}()
	if XTcl_HideCommand(tls, childInterp, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
	}(), name) != TCL_OK {
		XTcl_TransferResult(tls, childInterp, TCL_ERROR, interp)
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ChildHidden --
//
//	Helper function to compute list of hidden commands in a child
//	interpreter.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sChildHidden(tls *libc.TLS, interp uintptr, childInterp uintptr) int32 { /* tclInterp.c:2993:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var listObjPtr uintptr = XTcl_NewObj(tls) // Local object pointer.
	var hTblPtr uintptr                       // For local searches.
	var hPtr uintptr                          // For local searches.
	// var hSearch Tcl_HashSearch at bp, 24
	// For local searches.

	hTblPtr = (*Interp)(unsafe.Pointer(childInterp)).FhiddenCmdTablePtr
	if hTblPtr != uintptr(0) {
		for hPtr = XTcl_FirstHashEntry(tls, hTblPtr, bp); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
			XTcl_ListObjAppendElement(tls, uintptr(0), listObjPtr,
				XTcl_NewStringObj(tls, func() uintptr {
					if (*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(hTblPtr)).FkeyType == -1 {
						return *(*uintptr)(unsafe.Pointer(hPtr + 32))
					}
					return hPtr + 32
				}(), -1))
		}
	}
	XTcl_SetObjResult(tls, interp, listObjPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ChildInvokeHidden --
//
//	Helper function to invoke a hidden command in a child interpreter.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Whatever the hidden command does.
//
//----------------------------------------------------------------------

func sChildInvokeHidden(tls *libc.TLS, interp uintptr, childInterp uintptr, namespaceName uintptr, objc int32, objv uintptr) int32 { /* tclInterp.c:3032:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var result int32

	if XTcl_IsSafe(tls, interp) != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+43403,
			-1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+42043, ts+43185,
			uintptr(0)))
		return TCL_ERROR
	}

	XTcl_Preserve(tls, childInterp)
	XTcl_AllowExceptions(tls, childInterp)

	if namespaceName == uintptr(0) {
		var rootPtr uintptr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(childInterp)).FexecEnvPtr)).FcallbackPtr

		XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sNRPostInvokeHidden})), childInterp,
			rootPtr, uintptr(0), uintptr(0))
		return XTclNRInvoke(tls, uintptr(0), childInterp, objc, objv)
	} else {
		// var nsPtr uintptr at bp+40, 8

		// var dummy1 uintptr at bp+48, 8

		// var dummy2 uintptr at bp+56, 8

		// var tail uintptr at bp+64, 8

		result = XTclGetNamespaceForQualName(tls, childInterp, namespaceName, uintptr(0),
			TCL_FIND_ONLY_NS|TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG|
				TCL_CREATE_NS_IF_UNKNOWN, bp+40, bp+48, bp+56, bp+64)
		if result == TCL_OK {
			result = XTclObjInvokeNamespace(tls, childInterp, objc, objv,
				*(*uintptr)(unsafe.Pointer(bp + 40 /* nsPtr */)), int32(1)<<0)
		}
	}

	XTcl_TransferResult(tls, childInterp, result, interp)

	XTcl_Release(tls, childInterp)
	return result
}

func sNRPostInvokeHidden(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclInterp.c:3080:1: */
	var childInterp uintptr = *(*ClientData)(unsafe.Pointer(data))
	var rootPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	if interp != childInterp {
		result = XTclNRRunCallbacks(tls, childInterp, result, rootPtr)
		XTcl_TransferResult(tls, childInterp, result, interp)
	}
	XTcl_Release(tls, childInterp)
	return result
}

//----------------------------------------------------------------------
//
// ChildMarkTrusted --
//
//	Helper function to mark a child interpreter as trusted (unsafe).
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	After this call the hard-wired security checks in the core no longer
//	prevent the child from performing certain operations.
//
//----------------------------------------------------------------------

func sChildMarkTrusted(tls *libc.TLS, interp uintptr, childInterp uintptr) int32 { /* tclInterp.c:3114:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	if XTcl_IsSafe(tls, interp) != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+43463,
			-1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+42043, ts+43185,
			uintptr(0)))
		return TCL_ERROR
	}
	*(*int32)(unsafe.Pointer(childInterp + 424)) &= libc.CplInt32(SAFE_INTERP)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_IsSafe --
//
//	Determines whether an interpreter is safe
//
// Results:
//	1 if it is safe, 0 if it is not.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_IsSafe(tls *libc.TLS, interp uintptr) int32 { /* tclInterp.c:3148:1: */
	var iPtr uintptr = interp

	if iPtr == uintptr(0) {
		return 0
	}
	if (*Interp)(unsafe.Pointer(iPtr)).Fflags&SAFE_INTERP != 0 {
		return 1
	}
	return 0
}

//----------------------------------------------------------------------
//
// Tcl_MakeSafe --
//
//	Makes its argument interpreter contain only functionality that is
//	defined to be part of Safe Tcl. Unsafe commands are hidden, the env
//	array is unset, and the standard channels are removed.
//
// Results:
//	None.
//
// Side effects:
//	Hides commands in its argument interpreter, and removes settings and
//	channels.
//
//----------------------------------------------------------------------

func XTcl_MakeSafe(tls *libc.TLS, interp uintptr) int32 { /* tclInterp.c:3179:1: */
	var chan1 Tcl_Channel // Channel to remove from safe interpreter.
	var iPtr uintptr = interp
	var parent uintptr = (*InterpInfo)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FinterpInfo)).Fchild.FparentInterp

	XTclHideUnsafeCommands(tls, interp)

	if parent != uintptr(0) {
		// Alias these function implementations in the child to those in the
		// parent; the overall implementations are safe, but they're normally
		// defined by init.tcl which is not sourced by safe interpreters.
		// Assume these functions all work. [Bug 2895741]

		XTcl_Eval(tls, interp,
			ts+43519)
		XTcl_CreateAlias(tls, interp, ts+43569, parent,
			ts+43569, 0, uintptr(0))
		XTcl_CreateAlias(tls, interp, ts+43590, parent,
			ts+43590, 0, uintptr(0))
	}

	*(*int32)(unsafe.Pointer(iPtr + 424)) |= SAFE_INTERP

	// Unsetting variables : (which should not have been set in the first
	// place, but...)

	// No env array in a safe interpreter.

	XTcl_UnsetVar2(tls, interp, ts+27835, uintptr(0), TCL_GLOBAL_ONLY)

	// Remove unsafe parts of tcl_platform

	XTcl_UnsetVar2(tls, interp, ts+7016, ts+43611, TCL_GLOBAL_ONLY)
	XTcl_UnsetVar2(tls, interp, ts+7016, ts+43614, TCL_GLOBAL_ONLY)
	XTcl_UnsetVar2(tls, interp, ts+7016, ts+43624, TCL_GLOBAL_ONLY)
	XTcl_UnsetVar2(tls, interp, ts+7016, ts+43632, TCL_GLOBAL_ONLY)

	// Unset path informations variables (the only one remaining is [info
	// nameofexecutable])

	XTcl_UnsetVar2(tls, interp, ts+43637, uintptr(0), TCL_GLOBAL_ONLY)
	XTcl_UnsetVar2(tls, interp, ts+14808, uintptr(0), TCL_GLOBAL_ONLY)
	XTcl_UnsetVar2(tls, interp, ts+43655, uintptr(0), TCL_GLOBAL_ONLY)

	// Remove the standard channels from the interpreter; safe interpreters do
	// not ordinarily have access to stdin, stdout and stderr.
	//
	// NOTE: These channels are not added to the interpreter by the
	// Tcl_CreateInterp call, but may be added later, by another I/O
	// operation. We want to ensure that the interpreter does not have these
	// channels even if it is being made safe after being used for some time..

	chan1 = XTcl_GetStdChannel(tls, int32(1)<<1)
	if chan1 != uintptr(0) {
		XTcl_UnregisterChannel(tls, interp, chan1)
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<2)
	if chan1 != uintptr(0) {
		XTcl_UnregisterChannel(tls, interp, chan1)
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)
	if chan1 != uintptr(0) {
		XTcl_UnregisterChannel(tls, interp, chan1)
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LimitExceeded --
//
//	Tests whether any limit has been exceeded in the given interpreter
//	(i.e. whether the interpreter is currently unable to process further
//	scripts).
//
// Results:
//	A boolean value.
//
// Side effects:
//	None.
//
// Notes:
//	If you change this function, you MUST also update TclLimitExceeded() in
//	tclInt.h.
//----------------------------------------------------------------------

func XTcl_LimitExceeded(tls *libc.TLS, interp uintptr) int32 { /* tclInterp.c:3283:1: */
	var iPtr uintptr = interp

	return libc.Bool32((*Interp)(unsafe.Pointer(iPtr)).Flimit.Fexceeded != 0)
}

//----------------------------------------------------------------------
//
// Tcl_LimitReady --
//
//	Find out whether any limit has been set on the interpreter, and if so
//	check whether the granularity of that limit is such that the full
//	limit check should be carried out.
//
// Results:
//	A boolean value that indicates whether to call Tcl_LimitCheck.
//
// Side effects:
//	Increments the limit granularity counter.
//
// Notes:
//	If you change this function, you MUST also update TclLimitReady() in
//	tclInt.h.
//
//----------------------------------------------------------------------

func XTcl_LimitReady(tls *libc.TLS, interp uintptr) int32 { /* tclInterp.c:3314:1: */
	var iPtr uintptr = interp

	if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive != 0 {
		var ticker int32 = libc.PreIncInt32(&(*Interp)(unsafe.Pointer(iPtr)).Flimit.FgranularityTicker, 1)

		if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive&TCL_LIMIT_COMMANDS != 0 && ((*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdGranularity == 1 || ticker%(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdGranularity == 0) {
			return 1
		}
		if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive&TCL_LIMIT_TIME != 0 && ((*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeGranularity == 1 || ticker%(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeGranularity == 0) {
			return 1
		}
	}
	return 0
}

//----------------------------------------------------------------------
//
// Tcl_LimitCheck --
//
//	Check all currently set limits in the interpreter (where permitted by
//	granularity). If a limit is exceeded, call its callbacks and, if the
//	limit is still exceeded after the callbacks have run, make the
//	interpreter generate an error that cannot be caught within the limited
//	interpreter.
//
// Results:
//	A Tcl result value (TCL_OK if no limit is exceeded, and TCL_ERROR if a
//	limit has been exceeded).
//
// Side effects:
//	May invoke system calls. May invoke other interpreters. May be
//	reentrant. May put the interpreter into a state where it can no longer
//	execute commands without outside intervention.
//
//----------------------------------------------------------------------

func XTcl_LimitCheck(tls *libc.TLS, interp uintptr) int32 { /* tclInterp.c:3360:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var iPtr uintptr = interp
	var ticker int32 = (*Interp)(unsafe.Pointer(iPtr)).Flimit.FgranularityTicker

	if XTcl_InterpDeleted(tls, interp) != 0 {
		return TCL_OK
	}

	if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive&TCL_LIMIT_COMMANDS != 0 && ((*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdGranularity == 1 || ticker%(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdGranularity == 0) && (*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdCount < (*Interp)(unsafe.Pointer(iPtr)).FcmdCount {
		*(*int32)(unsafe.Pointer(iPtr + 760 + 8)) |= TCL_LIMIT_COMMANDS
		XTcl_Preserve(tls, interp)
		sRunLimitHandlers(tls, (*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdHandlers, interp)
		if (*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdCount >= (*Interp)(unsafe.Pointer(iPtr)).FcmdCount {
			*(*int32)(unsafe.Pointer(iPtr + 760 + 8)) &= libc.CplInt32(TCL_LIMIT_COMMANDS)
		} else if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Fexceeded&TCL_LIMIT_COMMANDS != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+43667, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+8199, ts+43696, uintptr(0)))
			XTcl_Release(tls, interp)
			return TCL_ERROR
		}
		XTcl_Release(tls, interp)
	}

	if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive&TCL_LIMIT_TIME != 0 && ((*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeGranularity == 1 || ticker%(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeGranularity == 0) {
		// var now Tcl_Time at bp+64, 8

		XTcl_GetTime(tls, bp+64)
		if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fsec < (*Tcl_Time)(unsafe.Pointer(bp+64)).Fsec || (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fsec == (*Tcl_Time)(unsafe.Pointer(bp+64)).Fsec && (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fusec < (*Tcl_Time)(unsafe.Pointer(bp+64)).Fusec {
			*(*int32)(unsafe.Pointer(iPtr + 760 + 8)) |= TCL_LIMIT_TIME
			XTcl_Preserve(tls, interp)
			sRunLimitHandlers(tls, (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeHandlers, interp)
			if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fsec > (*Tcl_Time)(unsafe.Pointer(bp+64)).Fsec || (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fsec == (*Tcl_Time)(unsafe.Pointer(bp+64)).Fsec && (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fusec >= (*Tcl_Time)(unsafe.Pointer(bp+64)).Fusec {
				*(*int32)(unsafe.Pointer(iPtr + 760 + 8)) &= libc.CplInt32(TCL_LIMIT_TIME)
			} else if (*Interp)(unsafe.Pointer(iPtr)).Flimit.Fexceeded&TCL_LIMIT_TIME != 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+43705, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+8199, ts+43725, uintptr(0)))
				XTcl_Release(tls, interp)
				return TCL_ERROR
			}
			XTcl_Release(tls, interp)
		}
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// RunLimitHandlers --
//
//	Invoke all the limit handlers in a list (for a particular limit).
//	Note that no particular limit handler callback will be invoked
//	reentrantly.
//
// Results:
//	None.
//
// Side effects:
//	Depends on the limit handlers.
//
//----------------------------------------------------------------------

func sRunLimitHandlers(tls *libc.TLS, handlerPtr uintptr, interp uintptr) { /* tclInterp.c:3438:1: */
	var nextPtr uintptr
	for ; handlerPtr != uintptr(0); handlerPtr = nextPtr {
		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).Fflags&(LIMIT_HANDLER_DELETED|LIMIT_HANDLER_ACTIVE) != 0 {
			// Reentrant call or something seriously strange in the delete
			// code.

			nextPtr = (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr
			continue
		}

		// Set the ACTIVE flag while running the limit handler itself so we
		// cannot reentrantly call this handler and know to use the alternate
		// method of deletion if necessary.

		*(*int32)(unsafe.Pointer(handlerPtr)) |= LIMIT_HANDLER_ACTIVE
		(*struct {
			f func(*libc.TLS, ClientData, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*LimitHandler)(unsafe.Pointer(handlerPtr)).FhandlerProc})).f(tls, (*LimitHandler)(unsafe.Pointer(handlerPtr)).FclientData, interp)
		*(*int32)(unsafe.Pointer(handlerPtr)) &= libc.CplInt32(LIMIT_HANDLER_ACTIVE)

		// Rediscover this value; it might have changed during the processing
		// of a limit handler. We have to record it here because we might
		// delete the structure below, and reading a value out of a deleted
		// structure is unsafe (even if actually legal with some
		// malloc()/free() implementations.)

		nextPtr = (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr

		// If we deleted the current handler while we were executing it, we
		// will have spliced it out of the list and set the
		// LIMIT_HANDLER_DELETED flag.

		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).Fflags&LIMIT_HANDLER_DELETED != 0 {
			if (*LimitHandler)(unsafe.Pointer(handlerPtr)).FdeleteProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*LimitHandler)(unsafe.Pointer(handlerPtr)).FdeleteProc})).f(tls, (*LimitHandler)(unsafe.Pointer(handlerPtr)).FclientData)
			}
			XTclpFree(tls, handlerPtr)
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_LimitAddHandler --
//
//	Add a callback handler for a particular resource limit.
//
// Results:
//	None.
//
// Side effects:
//	Extends the internal linked list of handlers for a limit.
//
//----------------------------------------------------------------------

func XTcl_LimitAddHandler(tls *libc.TLS, interp uintptr, type1 int32, handlerProc uintptr, clientData ClientData, deleteProc uintptr) { /* tclInterp.c:3506:1: */
	var iPtr uintptr = interp
	var handlerPtr uintptr

	// Convert everything into a real deletion callback.

	if deleteProc == uintptr(3) {
		deleteProc = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{XTcl_Free}))
	}
	if deleteProc == uintptr(0) {
		deleteProc = uintptr(0)
	}

	// Allocate a handler record.

	handlerPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(LimitHandler{})))
	(*LimitHandler)(unsafe.Pointer(handlerPtr)).Fflags = 0
	(*LimitHandler)(unsafe.Pointer(handlerPtr)).FhandlerProc = handlerProc
	(*LimitHandler)(unsafe.Pointer(handlerPtr)).FclientData = clientData
	(*LimitHandler)(unsafe.Pointer(handlerPtr)).FdeleteProc = deleteProc
	(*LimitHandler)(unsafe.Pointer(handlerPtr)).FprevPtr = uintptr(0)

	// Prepend onto the front of the correct linked list.

	switch type1 {
	case TCL_LIMIT_COMMANDS:
		(*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdHandlers
		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr != uintptr(0) {
			(*LimitHandler)(unsafe.Pointer((*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr)).FprevPtr = handlerPtr
		}
		(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdHandlers = handlerPtr
		return

	case TCL_LIMIT_TIME:
		(*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeHandlers
		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr != uintptr(0) {
			(*LimitHandler)(unsafe.Pointer((*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr)).FprevPtr = handlerPtr
		}
		(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeHandlers = handlerPtr
		return
	}

	XTcl_Panic(tls, ts+43730, 0)
}

//----------------------------------------------------------------------
//
// Tcl_LimitRemoveHandler --
//
//	Remove a callback handler for a particular resource limit.
//
// Results:
//	None.
//
// Side effects:
//	The handler is spliced out of the internal linked list for the limit,
//	and if not currently being invoked, deleted. Otherwise it is just
//	marked for deletion and removed when the limit handler has finished
//	executing.
//
//----------------------------------------------------------------------

func XTcl_LimitRemoveHandler(tls *libc.TLS, interp uintptr, type1 int32, handlerProc uintptr, clientData ClientData) { /* tclInterp.c:3583:1: */
	var iPtr uintptr = interp
	var handlerPtr uintptr

	switch type1 {
	case TCL_LIMIT_COMMANDS:
		handlerPtr = (*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdHandlers
		break
	case TCL_LIMIT_TIME:
		handlerPtr = (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeHandlers
		break
	default:
		XTcl_Panic(tls, ts+43730, 0)
		return
	}

	for ; handlerPtr != uintptr(0); handlerPtr = (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr {
		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).FhandlerProc != handlerProc || (*LimitHandler)(unsafe.Pointer(handlerPtr)).FclientData != clientData {
			continue
		}

		// We've found the handler to delete; mark it as doomed if not already
		// so marked (which shouldn't actually happen).

		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).Fflags&LIMIT_HANDLER_DELETED != 0 {
			return
		}
		*(*int32)(unsafe.Pointer(handlerPtr)) |= LIMIT_HANDLER_DELETED

		// Splice the handler out of the doubly-linked list.

		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).FprevPtr == uintptr(0) {
			switch type1 {
			case TCL_LIMIT_COMMANDS:
				(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdHandlers = (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr
				break
				fallthrough
			case TCL_LIMIT_TIME:
				(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeHandlers = (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr
				break
			}
		} else {
			(*LimitHandler)(unsafe.Pointer((*LimitHandler)(unsafe.Pointer(handlerPtr)).FprevPtr)).FnextPtr = (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr
		}
		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr != uintptr(0) {
			(*LimitHandler)(unsafe.Pointer((*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr)).FprevPtr = (*LimitHandler)(unsafe.Pointer(handlerPtr)).FprevPtr
		}

		// If nothing is currently executing the handler, delete its client
		// data and the overall handler structure now. Otherwise it will all
		// go away when the handler returns.

		if !((*LimitHandler)(unsafe.Pointer(handlerPtr)).Fflags&LIMIT_HANDLER_ACTIVE != 0) {
			if (*LimitHandler)(unsafe.Pointer(handlerPtr)).FdeleteProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*LimitHandler)(unsafe.Pointer(handlerPtr)).FdeleteProc})).f(tls, (*LimitHandler)(unsafe.Pointer(handlerPtr)).FclientData)
			}
			XTclpFree(tls, handlerPtr)
		}
		return
	}
}

//----------------------------------------------------------------------
//
// TclLimitRemoveAllHandlers --
//
//	Remove all limit callback handlers for an interpreter. This is invoked
//	as part of deleting the interpreter.
//
// Results:
//	None.
//
// Side effects:
//	Limit handlers are deleted or marked for deletion (as with
//	Tcl_LimitRemoveHandler).
//
//----------------------------------------------------------------------

func XTclLimitRemoveAllHandlers(tls *libc.TLS, interp uintptr) { /* tclInterp.c:3675:1: */
	var iPtr uintptr = interp
	var handlerPtr uintptr
	var nextHandlerPtr uintptr

	// Delete all command-limit handlers.

	handlerPtr = (*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdHandlers
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdHandlers = uintptr(0)
	for ; handlerPtr != uintptr(0); handlerPtr = nextHandlerPtr {
		nextHandlerPtr = (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr

		// Do not delete here if it has already been marked for deletion.

		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).Fflags&LIMIT_HANDLER_DELETED != 0 {
			continue
		}
		*(*int32)(unsafe.Pointer(handlerPtr)) |= LIMIT_HANDLER_DELETED
		(*LimitHandler)(unsafe.Pointer(handlerPtr)).FprevPtr = uintptr(0)
		(*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr = uintptr(0)

		// If nothing is currently executing the handler, delete its client
		// data and the overall handler structure now. Otherwise it will all
		// go away when the handler returns.

		if !((*LimitHandler)(unsafe.Pointer(handlerPtr)).Fflags&LIMIT_HANDLER_ACTIVE != 0) {
			if (*LimitHandler)(unsafe.Pointer(handlerPtr)).FdeleteProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*LimitHandler)(unsafe.Pointer(handlerPtr)).FdeleteProc})).f(tls, (*LimitHandler)(unsafe.Pointer(handlerPtr)).FclientData)
			}
			XTclpFree(tls, handlerPtr)
		}
	}

	// Delete all time-limit handlers.

	handlerPtr = (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeHandlers
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeHandlers = uintptr(0)
	for ; handlerPtr != uintptr(0); handlerPtr = nextHandlerPtr {
		nextHandlerPtr = (*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr

		// Do not delete here if it has already been marked for deletion.

		if (*LimitHandler)(unsafe.Pointer(handlerPtr)).Fflags&LIMIT_HANDLER_DELETED != 0 {
			continue
		}
		*(*int32)(unsafe.Pointer(handlerPtr)) |= LIMIT_HANDLER_DELETED
		(*LimitHandler)(unsafe.Pointer(handlerPtr)).FprevPtr = uintptr(0)
		(*LimitHandler)(unsafe.Pointer(handlerPtr)).FnextPtr = uintptr(0)

		// If nothing is currently executing the handler, delete its client
		// data and the overall handler structure now. Otherwise it will all
		// go away when the handler returns.

		if !((*LimitHandler)(unsafe.Pointer(handlerPtr)).Fflags&LIMIT_HANDLER_ACTIVE != 0) {
			if (*LimitHandler)(unsafe.Pointer(handlerPtr)).FdeleteProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*LimitHandler)(unsafe.Pointer(handlerPtr)).FdeleteProc})).f(tls, (*LimitHandler)(unsafe.Pointer(handlerPtr)).FclientData)
			}
			XTclpFree(tls, handlerPtr)
		}
	}

	// Delete the timer callback that is used to trap limits that occur in
	// [vwait]s...

	if (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent != uintptr(0) {
		XTcl_DeleteTimerHandler(tls, (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent)
		(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent = uintptr(0)
	}
}

//----------------------------------------------------------------------
//
// Tcl_LimitTypeEnabled --
//
//	Check whether a particular limit has been enabled for an interpreter.
//
// Results:
//	A boolean value.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_LimitTypeEnabled(tls *libc.TLS, interp uintptr, type1 int32) int32 { /* tclInterp.c:3775:1: */
	var iPtr uintptr = interp

	return libc.Bool32((*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive&type1 != 0)
}

//----------------------------------------------------------------------
//
// Tcl_LimitTypeExceeded --
//
//	Check whether a particular limit has been exceeded for an interpreter.
//
// Results:
//	A boolean value (note that Tcl_LimitExceeded will always return
//	non-zero when this function returns non-zero).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_LimitTypeExceeded(tls *libc.TLS, interp uintptr, type1 int32) int32 { /* tclInterp.c:3802:1: */
	var iPtr uintptr = interp

	return libc.Bool32((*Interp)(unsafe.Pointer(iPtr)).Flimit.Fexceeded&type1 != 0)
}

//----------------------------------------------------------------------
//
// Tcl_LimitTypeSet --
//
//	Enable a particular limit for an interpreter.
//
// Results:
//	None.
//
// Side effects:
//	The limit is turned on and will be checked in future at an interval
//	determined by the frequency of calling of Tcl_LimitReady and the
//	granularity of the limit in question.
//
//----------------------------------------------------------------------

func XTcl_LimitTypeSet(tls *libc.TLS, interp uintptr, type1 int32) { /* tclInterp.c:3830:1: */
	var iPtr uintptr = interp

	*(*int32)(unsafe.Pointer(iPtr + 760)) |= type1
}

//----------------------------------------------------------------------
//
// Tcl_LimitTypeReset --
//
//	Disable a particular limit for an interpreter.
//
// Results:
//	None.
//
// Side effects:
//	The limit is disabled. If the limit was exceeded when this function
//	was called, the limit will no longer be exceeded afterwards and the
//	interpreter will be free to execute further scripts (assuming it isn't
//	also deleted, of course).
//
//----------------------------------------------------------------------

func XTcl_LimitTypeReset(tls *libc.TLS, interp uintptr, type1 int32) { /* tclInterp.c:3859:1: */
	var iPtr uintptr = interp

	*(*int32)(unsafe.Pointer(iPtr + 760)) &= ^type1
	*(*int32)(unsafe.Pointer(iPtr + 760 + 8)) &= ^type1
}

//----------------------------------------------------------------------
//
// Tcl_LimitSetCommands --
//
//	Set the command limit for an interpreter.
//
// Results:
//	None.
//
// Side effects:
//	Also resets whether the command limit was exceeded. This might permit
//	a small amount of further execution in the interpreter even if the
//	limit itself is theoretically exceeded.
//
//----------------------------------------------------------------------

func XTcl_LimitSetCommands(tls *libc.TLS, interp uintptr, commandLimit int32) { /* tclInterp.c:3888:1: */
	var iPtr uintptr = interp

	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdCount = commandLimit
	*(*int32)(unsafe.Pointer(iPtr + 760 + 8)) &= libc.CplInt32(TCL_LIMIT_COMMANDS)
}

//----------------------------------------------------------------------
//
// Tcl_LimitGetCommands --
//
//	Get the number of commands that may be executed in the interpreter
//	before the command-limit is reached.
//
// Results:
//	An upper bound on the number of commands.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_LimitGetCommands(tls *libc.TLS, interp uintptr) int32 { /* tclInterp.c:3916:1: */
	var iPtr uintptr = interp

	return (*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdCount
}

//----------------------------------------------------------------------
//
// Tcl_LimitSetTime --
//
//	Set the time limit for an interpreter by copying it from the value
//	pointed to by the timeLimitPtr argument.
//
// Results:
//	None.
//
// Side effects:
//	Also resets whether the time limit was exceeded. This might permit a
//	small amount of further execution in the interpreter even if the limit
//	itself is theoretically exceeded.
//
//----------------------------------------------------------------------

func XTcl_LimitSetTime(tls *libc.TLS, interp uintptr, timeLimitPtr uintptr) { /* tclInterp.c:3944:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var iPtr uintptr = interp
	// var nextMoment Tcl_Time at bp, 8

	libc.Xmemcpy(tls, iPtr+760+28, timeLimitPtr, uint64(unsafe.Sizeof(Tcl_Time{})))
	if (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent != uintptr(0) {
		XTcl_DeleteTimerHandler(tls, (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent)
	}
	(*Tcl_Time)(unsafe.Pointer(bp /* &nextMoment */)).Fsec = (*Tcl_Time)(unsafe.Pointer(timeLimitPtr)).Fsec
	(*Tcl_Time)(unsafe.Pointer(bp /* &nextMoment */)).Fusec = (*Tcl_Time)(unsafe.Pointer(timeLimitPtr)).Fusec + 10
	if (*Tcl_Time)(unsafe.Pointer(bp)).Fusec >= 1000000 {
		(*Tcl_Time)(unsafe.Pointer(bp /* &nextMoment */)).Fsec++
		*(*int32)(unsafe.Pointer(bp + 4)) -= 1000000
	}
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent = XTclCreateAbsoluteTimerHandler(tls, bp,
		*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sTimeLimitCallback})), interp)
	*(*int32)(unsafe.Pointer(iPtr + 760 + 8)) &= libc.CplInt32(TCL_LIMIT_TIME)
}

//----------------------------------------------------------------------
//
// TimeLimitCallback --
//
//	Callback that allows time limits to be enforced even when doing a
//	blocking wait for events.
//
// Results:
//	None.
//
// Side effects:
//	May put the interpreter into a state where it can no longer execute
//	commands. May make callbacks into other interpreters.
//
//----------------------------------------------------------------------

func sTimeLimitCallback(tls *libc.TLS, clientData ClientData) { /* tclInterp.c:3985:1: */
	var interp uintptr = clientData
	var iPtr uintptr = clientData
	var code int32

	XTcl_Preserve(tls, interp)
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent = uintptr(0)

	// Must reset the granularity ticker here to force an immediate full
	// check. This is OK because we're swallowing the cost in the overall cost
	// of the event loop. [Bug 2891362]

	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FgranularityTicker = 0

	code = XTcl_LimitCheck(tls, interp)
	if code != TCL_OK {
		XTcl_AddErrorInfo(tls, interp, ts+43761)
		XTcl_BackgroundException(tls, interp, code)
	}
	XTcl_Release(tls, interp)
}

//----------------------------------------------------------------------
//
// Tcl_LimitGetTime --
//
//	Get the current time limit.
//
// Results:
//	The time limit (by it being copied into the variable pointed to by the
//	timeLimitPtr).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_LimitGetTime(tls *libc.TLS, interp uintptr, timeLimitPtr uintptr) { /* tclInterp.c:4029:1: */
	var iPtr uintptr = interp

	libc.Xmemcpy(tls, timeLimitPtr, iPtr+760+28, uint64(unsafe.Sizeof(Tcl_Time{})))
}

//----------------------------------------------------------------------
//
// Tcl_LimitSetGranularity --
//
//	Set the granularity divisor (which must be positive) for a particular
//	limit.
//
// Results:
//	None.
//
// Side effects:
//	The granularity is updated.
//
//----------------------------------------------------------------------

func XTcl_LimitSetGranularity(tls *libc.TLS, interp uintptr, type1 int32, granularity int32) { /* tclInterp.c:4056:1: */
	var iPtr uintptr = interp
	if granularity < 1 {
		XTcl_Panic(tls, ts+43792, 0)
	}

	switch type1 {
	case TCL_LIMIT_COMMANDS:
		(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdGranularity = granularity
		return
	case TCL_LIMIT_TIME:
		(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeGranularity = granularity
		return
	}
	XTcl_Panic(tls, ts+43730, 0)
}

//----------------------------------------------------------------------
//
// Tcl_LimitGetGranularity --
//
//	Get the granularity divisor for a particular limit.
//
// Results:
//	The granularity divisor for the given limit.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_LimitGetGranularity(tls *libc.TLS, interp uintptr, type1 int32) int32 { /* tclInterp.c:4094:1: */
	var iPtr uintptr = interp

	switch type1 {
	case TCL_LIMIT_COMMANDS:
		return (*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdGranularity
	case TCL_LIMIT_TIME:
		return (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeGranularity
	}
	XTcl_Panic(tls, ts+43730, 0)
	return -1 // NOT REACHED
}

//----------------------------------------------------------------------
//
// DeleteScriptLimitCallback --
//
//	Callback for when a script limit (a limit callback implemented as a
//	Tcl script in a parent interpreter, as set up from Tcl) is deleted.
//
// Results:
//	None.
//
// Side effects:
//	The reference to the script callback from the controlling interpreter
//	is removed.
//
//----------------------------------------------------------------------

func sDeleteScriptLimitCallback(tls *libc.TLS, clientData ClientData) { /* tclInterp.c:4129:1: */
	var limitCBPtr uintptr = clientData

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FentryPtr != uintptr(0) {
		XTcl_DeleteHashEntry(tls, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FentryPtr)
	}
	XTclpFree(tls, limitCBPtr)
}

//----------------------------------------------------------------------
//
// CallScriptLimitCallback --
//
//	Invoke a script limit callback. Used to implement limit callbacks set
//	at the Tcl level on child interpreters.
//
// Results:
//	None.
//
// Side effects:
//	Depends on the callback script. Errors are reported as background
//	errors.
//
//----------------------------------------------------------------------

func sCallScriptLimitCallback(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclInterp.c:4160:1: */
	var limitCBPtr uintptr = clientData
	var code int32

	if XTcl_InterpDeleted(tls, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).Finterp) != 0 {
		return
	}
	XTcl_Preserve(tls, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).Finterp)
	code = XTcl_EvalObjEx(tls, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).Finterp, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj,
		TCL_EVAL_GLOBAL)
	if code != TCL_OK && !(XTcl_InterpDeleted(tls, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).Finterp) != 0) {
		XTcl_BackgroundException(tls, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).Finterp, code)
	}
	XTcl_Release(tls, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).Finterp)
}

//----------------------------------------------------------------------
//
// SetScriptLimitCallback --
//
//	Install (or remove, if scriptObj is NULL) a limit callback script that
//	is called when the target interpreter exceeds the type of limit
//	specified. Each interpreter may only have one callback set on another
//	interpreter through this mechanism (though as many interpreters may be
//	limited as the programmer chooses overall).
//
// Results:
//	None.
//
// Side effects:
//	A limit callback implemented as an invokation of a Tcl script in
//	another interpreter is either installed or removed.
//
//----------------------------------------------------------------------

func sSetScriptLimitCallback(tls *libc.TLS, interp uintptr, type1 int32, targetInterp uintptr, scriptObj uintptr) { /* tclInterp.c:4201:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var limitCBPtr uintptr
	var hashPtr uintptr
	// var isNew int32 at bp+16, 4

	// var key ScriptLimitCallbackKey at bp, 16

	var iPtr uintptr = interp

	if interp == targetInterp {
		XTcl_Panic(tls, ts+43827, 0)
	}

	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp /* &key */)).Finterp = targetInterp
	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp /* &key */)).Ftype = int32(type1)

	if scriptObj == uintptr(0) {
		hashPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 760 /* &.limit */ + 64 /* &.callbacks */)).FfindProc})).f(tls, iPtr+760 /* &.limit */ +64 /* &.callbacks */, bp /* &key */)
		if hashPtr != uintptr(0) {
			XTcl_LimitRemoveHandler(tls, targetInterp, type1, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr)
			}{sCallScriptLimitCallback})),
				(*Tcl_HashEntry)(unsafe.Pointer(hashPtr)).FclientData)
		}
		return
	}

	hashPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 760 /* &.limit */ + 64 /* &.callbacks */)).FcreateProc})).f(tls, iPtr+760 /* &.limit */ +64 /* &.callbacks */, bp /* &key */, bp+16 /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp + 16)) != 0) {
		limitCBPtr = (*Tcl_HashEntry)(unsafe.Pointer(hashPtr)).FclientData
		(*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FentryPtr = uintptr(0)
		XTcl_LimitRemoveHandler(tls, targetInterp, type1, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr)
		}{sCallScriptLimitCallback})),
			limitCBPtr)
	}

	limitCBPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ScriptLimitCallback{})))
	(*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).Finterp = interp
	(*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj = scriptObj
	(*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FentryPtr = hashPtr
	(*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).Ftype = type1
	(*Tcl_Obj)(unsafe.Pointer(scriptObj)).FrefCount++

	XTcl_LimitAddHandler(tls, targetInterp, type1, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr)
	}{sCallScriptLimitCallback})),
		limitCBPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteScriptLimitCallback})))
	(*Tcl_HashEntry)(unsafe.Pointer(hashPtr)).FclientData = limitCBPtr
}

//----------------------------------------------------------------------
//
// TclRemoveScriptLimitCallbacks --
//
//	Remove all script-implemented limit callbacks that make calls back
//	into the given interpreter. This invoked as part of deleting an
//	interpreter.
//
// Results:
//	None.
//
// Side effects:
//	The script limit callbacks are removed or marked for later removal.
//
//----------------------------------------------------------------------

func XTclRemoveScriptLimitCallbacks(tls *libc.TLS, interp uintptr) { /* tclInterp.c:4269:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var iPtr uintptr = interp
	var hashPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	var keyPtr uintptr

	hashPtr = XTcl_FirstHashEntry(tls, iPtr+760+64, bp)
	for hashPtr != uintptr(0) {
		keyPtr = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(iPtr+760+64)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(iPtr+760+64)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(hashPtr + 32))
			}
			return hashPtr + 32
		}()
		XTcl_LimitRemoveHandler(tls, (*ScriptLimitCallbackKey)(unsafe.Pointer(keyPtr)).Finterp, int32((*ScriptLimitCallbackKey)(unsafe.Pointer(keyPtr)).Ftype),
			*(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr)
			}{sCallScriptLimitCallback})), (*Tcl_HashEntry)(unsafe.Pointer(hashPtr)).FclientData)
		hashPtr = XTcl_NextHashEntry(tls, bp)
	}
	XTcl_DeleteHashTable(tls, iPtr+760+64)
}

//----------------------------------------------------------------------
//
// TclInitLimitSupport --
//
//	Initialise all the parts of the interpreter relating to resource limit
//	management. This allows an interpreter to both have limits set upon
//	itself and set limits upon other interpreters.
//
// Results:
//	None.
//
// Side effects:
//	The resource limit subsystem is initialised for the interpreter.
//
//----------------------------------------------------------------------

func XTclInitLimitSupport(tls *libc.TLS, interp uintptr) { /* tclInterp.c:4307:1: */
	var iPtr uintptr = interp

	(*Interp)(unsafe.Pointer(iPtr)).Flimit.Factive = 0
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FgranularityTicker = 0
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.Fexceeded = 0
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdCount = 0
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdHandlers = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FcmdGranularity = 1
	libc.Xmemset(tls, iPtr+760+28, 0, uint64(unsafe.Sizeof(Tcl_Time{})))
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeHandlers = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent = uintptr(0)
	(*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeGranularity = 10
	XTcl_InitHashTable(tls, iPtr+760+64,
		int32(uint64(unsafe.Sizeof(ScriptLimitCallbackKey{}))/uint64(unsafe.Sizeof(int32(0)))))
}

//----------------------------------------------------------------------
//
// InheritLimitsFromParent --
//
//	Derive the interpreter limit configuration for a child interpreter
//	from the limit config for the parent.
//
// Results:
//	None.
//
// Side effects:
//	The child interpreter limits are set so that if the parent has a
//	limit, it may not exceed it by handing off work to child interpreters.
//	Note that this does not transfer limit callbacks from the parent to
//	the child.
//
//----------------------------------------------------------------------

func sInheritLimitsFromParent(tls *libc.TLS, childInterp uintptr, parentInterp uintptr) { /* tclInterp.c:4347:1: */
	var childPtr uintptr = childInterp
	var parentPtr uintptr = parentInterp

	if (*Interp)(unsafe.Pointer(parentPtr)).Flimit.Factive&TCL_LIMIT_COMMANDS != 0 {
		*(*int32)(unsafe.Pointer(childPtr + 760)) |= TCL_LIMIT_COMMANDS
		(*Interp)(unsafe.Pointer(childPtr)).Flimit.FcmdCount = 0
		(*Interp)(unsafe.Pointer(childPtr)).Flimit.FcmdGranularity = (*Interp)(unsafe.Pointer(parentPtr)).Flimit.FcmdGranularity
	}
	if (*Interp)(unsafe.Pointer(parentPtr)).Flimit.Factive&TCL_LIMIT_TIME != 0 {
		*(*int32)(unsafe.Pointer(childPtr + 760)) |= TCL_LIMIT_TIME
		libc.Xmemcpy(tls, childPtr+760+28, parentPtr+760+28,
			uint64(unsafe.Sizeof(Tcl_Time{})))
		(*Interp)(unsafe.Pointer(childPtr)).Flimit.FtimeGranularity = (*Interp)(unsafe.Pointer(parentPtr)).Flimit.FtimeGranularity
	}
}

//----------------------------------------------------------------------
//
// ChildCommandLimitCmd --
//
//	Implementation of the [interp limit $i commands] and [$i limit
//	commands] subcommands. See the interp manual page for a full
//	description.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Depends on the arguments.
//
//----------------------------------------------------------------------

func sChildCommandLimitCmd(tls *libc.TLS, interp uintptr, childInterp uintptr, consumedObjc int32, objc int32, objv uintptr) int32 { /* tclInterp.c:4386:1: */
	bp := tls.Alloc(156)
	defer tls.Free(156)

	var iPtr uintptr
	// var index int32 at bp+136, 4

	// var key ScriptLimitCallbackKey at bp+120, 16

	var limitCBPtr uintptr
	var hPtr uintptr
	var empty uintptr
	var empty1 uintptr
	var dictPtr uintptr
	var i int32
	// var scriptLen int32 at bp+140, 4

	// var limitLen int32 at bp+148, 4

	var scriptObj uintptr
	var granObj uintptr
	var limitObj uintptr
	// var gran int32 at bp+144, 4

	// var limit int32 at bp+152, 4
	iPtr = interp

	// First, ensure that we are not reading or writing the calling
	// interpreter's limits; it may only manipulate its children. Note that
	// the low level API enforces this with Tcl_Panic, which we want to
	// avoid. [Bug 3398794]

	if !(interp == childInterp) {
		goto __1
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+43880, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+42043, ts+43923, uintptr(0)))
	return TCL_ERROR
__1:
	;

	if !(objc == consumedObjc) {
		goto __2
	}

__4:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __7
	}
	XTclAllocateFreeObjects(tls)
__7:
	;
	dictPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr = uintptr(0)

	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp + 120 /* &key */)).Finterp = childInterp
	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp + 120 /* &key */)).Ftype = TCL_LIMIT_COMMANDS
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 760 /* &.limit */ + 64 /* &.callbacks */)).FfindProc})).f(tls, iPtr+760 /* &.limit */ +64 /* &.callbacks */, bp+120 /* &key */)
	if !(hPtr != uintptr(0)) {
		goto __8
	}
	limitCBPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !(limitCBPtr != uintptr(0) && (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj != uintptr(0)) {
		goto __10
	}
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, XTcl_NewStringObj(tls, options13[0], -1),
		(*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj)
	goto __11
__10:
	goto putEmptyCommandInDict
__11:
	;
	goto __9
__8:

putEmptyCommandInDict:
	;
__12:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __15
	}
	XTclAllocateFreeObjects(tls)
__15:
	;
	empty = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	;
	(*Tcl_Obj)(unsafe.Pointer(empty)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(empty)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(empty)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(empty)).FtypePtr = uintptr(0)

	XTcl_DictObjPut(tls, uintptr(0), dictPtr,
		XTcl_NewStringObj(tls, options13[0], -1), empty)
__9:
	;
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, XTcl_NewStringObj(tls, options13[1], -1),
		XTcl_NewIntObj(tls, XTcl_LimitGetGranularity(tls, childInterp,
			TCL_LIMIT_COMMANDS)))

	if !(XTcl_LimitTypeEnabled(tls, childInterp, TCL_LIMIT_COMMANDS) != 0) {
		goto __16
	}
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, XTcl_NewStringObj(tls, options13[2], -1),
		XTcl_NewIntObj(tls, XTcl_LimitGetCommands(tls, childInterp)))
	goto __17
__16:
	;
__18:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __21
	}
	XTclAllocateFreeObjects(tls)
__21:
	;
	empty1 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
	(*Tcl_Obj)(unsafe.Pointer(empty1)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(empty1)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(empty1)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(empty1)).FtypePtr = uintptr(0)

	XTcl_DictObjPut(tls, uintptr(0), dictPtr,
		XTcl_NewStringObj(tls, options13[2], -1), empty1)
__17:
	;
	XTcl_SetObjResult(tls, interp, dictPtr)
	return TCL_OK
	goto __3
__2:
	if !(objc == consumedObjc+1) {
		goto __22
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(consumedObjc)*8)), uintptr(unsafe.Pointer(&options13)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+136) != TCL_OK) {
		goto __24
	}
	return TCL_ERROR
__24:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 136 /* index */))) {
	case uint32(0) /* OPT_CMD */ :
		goto __26
	case uint32(1) /* OPT_GRAN */ :
		goto __27
	case uint32(2) /* OPT_VAL */ :
		goto __28
	}
	goto __25
__26:
	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp + 120 /* &key */)).Finterp = childInterp
	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp + 120 /* &key */)).Ftype = TCL_LIMIT_COMMANDS
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 760 /* &.limit */ + 64 /* &.callbacks */)).FfindProc})).f(tls, iPtr+760 /* &.limit */ +64 /* &.callbacks */, bp+120 /* &key */)
	if !(hPtr != uintptr(0)) {
		goto __29
	}
	limitCBPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !(limitCBPtr != uintptr(0) && (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj != uintptr(0)) {
		goto __30
	}
	XTcl_SetObjResult(tls, interp, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj)
__30:
	;
__29:
	;
	goto __25
__27:
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls,
		XTcl_LimitGetGranularity(tls, childInterp, TCL_LIMIT_COMMANDS)))
	goto __25
__28:
	if !(XTcl_LimitTypeEnabled(tls, childInterp, TCL_LIMIT_COMMANDS) != 0) {
		goto __31
	}
	XTcl_SetObjResult(tls, interp,
		XTcl_NewIntObj(tls, XTcl_LimitGetCommands(tls, childInterp)))
__31:
	;
	goto __25
__25:
	;
	return TCL_OK
	goto __23
__22:
	if !((objc-consumedObjc)&1 != 0) {
		goto __32
	}
	XTcl_WrongNumArgs(tls, interp, consumedObjc, objv, ts+43928)
	return TCL_ERROR
	goto __33
__32:
	*(*int32)(unsafe.Pointer(bp + 140 /* scriptLen */)) = 0
	*(*int32)(unsafe.Pointer(bp + 148 /* limitLen */)) = 0
	scriptObj = uintptr(0)
	granObj = uintptr(0)
	limitObj = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 144 /* gran */)) = 0
	*(*int32)(unsafe.Pointer(bp + 152 /* limit */)) = 0

	i = consumedObjc
__34:
	if !(i < objc) {
		goto __36
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options13)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+136) != TCL_OK) {
		goto __37
	}
	return TCL_ERROR
__37:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 136 /* index */))) {
	case uint32(0) /* OPT_CMD */ :
		goto __39
	case uint32(1) /* OPT_GRAN */ :
		goto __40
	case uint32(2) /* OPT_VAL */ :
		goto __41
	}
	goto __38
__39:
	scriptObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+140)
	goto __38
__40:
	granObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 144)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+144)
	}() != TCL_OK) {
		goto __42
	}
	return TCL_ERROR
__42:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 144)) < 1) {
		goto __43
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+43948, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7949, ts+42043,
		ts+43979, uintptr(0)))
	return TCL_ERROR
__43:
	;
	goto __38
__41:
	limitObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+148)
	if !(*(*int32)(unsafe.Pointer(bp + 148)) == 0) {
		goto __44
	}
	goto __38
__44:
	;
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 152)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+152)
	}() != TCL_OK) {
		goto __45
	}
	return TCL_ERROR
__45:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 152)) < 0) {
		goto __46
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+43988, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+7949, ts+42043,
		ts+43979, uintptr(0)))
	return TCL_ERROR
__46:
	;
	goto __38
__38:
	;
	goto __35
__35:
	i = i + 2
	goto __34
	goto __36
__36:
	;
	if !(scriptObj != uintptr(0)) {
		goto __47
	}
	sSetScriptLimitCallback(tls, interp, TCL_LIMIT_COMMANDS, childInterp,
		func() uintptr {
			if *(*int32)(unsafe.Pointer(bp + 140)) > 0 {
				return scriptObj
			}
			return uintptr(0)
		}())
__47:
	;
	if !(granObj != uintptr(0)) {
		goto __48
	}
	XTcl_LimitSetGranularity(tls, childInterp, TCL_LIMIT_COMMANDS, *(*int32)(unsafe.Pointer(bp + 144 /* gran */)))
__48:
	;
	if !(limitObj != uintptr(0)) {
		goto __49
	}
	if !(*(*int32)(unsafe.Pointer(bp + 148)) > 0) {
		goto __50
	}
	XTcl_LimitSetCommands(tls, childInterp, *(*int32)(unsafe.Pointer(bp + 152 /* limit */)))
	XTcl_LimitTypeSet(tls, childInterp, TCL_LIMIT_COMMANDS)
	goto __51
__50:
	XTcl_LimitTypeReset(tls, childInterp, TCL_LIMIT_COMMANDS)
__51:
	;
__49:
	;
	return TCL_OK
__33:
	;
__23:
	;
__3:
	;
	return int32(0)
}

var options13 = [4]uintptr{
	ts + 16010, ts + 44027, ts + 44040, uintptr(0),
} /* tclInterp.c:4393:23 */

//----------------------------------------------------------------------
//
// ChildTimeLimitCmd --
//
//	Implementation of the [interp limit $i time] and [$i limit time]
//	subcommands. See the interp manual page for a full description.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Depends on the arguments.
//
//----------------------------------------------------------------------

func sChildTimeLimitCmd(tls *libc.TLS, interp uintptr, childInterp uintptr, consumedObjc int32, objc int32, objv uintptr) int32 { /* tclInterp.c:4574:1: */
	bp := tls.Alloc(312)
	defer tls.Free(312)

	var iPtr uintptr
	// var index int32 at bp+264, 4

	// var key ScriptLimitCallbackKey at bp+240, 16

	var limitCBPtr uintptr
	var hPtr uintptr
	var empty uintptr
	// var limitMoment Tcl_Time at bp+256, 8

	var empty1 uintptr
	var dictPtr uintptr
	// var limitMoment1 Tcl_Time at bp+268, 8

	// var limitMoment2 Tcl_Time at bp+276, 8

	var i int32
	// var scriptLen int32 at bp+292, 4

	// var milliLen int32 at bp+300, 4

	// var secLen int32 at bp+308, 4

	var scriptObj uintptr
	var granObj uintptr
	var milliObj uintptr
	var secObj uintptr
	// var gran int32 at bp+296, 4

	// var limitMoment3 Tcl_Time at bp+284, 8

	// var tmp int32 at bp+304, 4
	iPtr = interp

	// First, ensure that we are not reading or writing the calling
	// interpreter's limits; it may only manipulate its children. Note that
	// the low level API enforces this with Tcl_Panic, which we want to
	// avoid. [Bug 3398794]

	if !(interp == childInterp) {
		goto __1
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+43880, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+42043, ts+43923, uintptr(0)))
	return TCL_ERROR
__1:
	;

	if !(objc == consumedObjc) {
		goto __2
	}

__4:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __7
	}
	XTclAllocateFreeObjects(tls)
__7:
	;
	dictPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(dictPtr)).FtypePtr = uintptr(0)

	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp + 240 /* &key */)).Finterp = childInterp
	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp + 240 /* &key */)).Ftype = TCL_LIMIT_TIME
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 760 /* &.limit */ + 64 /* &.callbacks */)).FfindProc})).f(tls, iPtr+760 /* &.limit */ +64 /* &.callbacks */, bp+240 /* &key */)
	if !(hPtr != uintptr(0)) {
		goto __8
	}
	limitCBPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !(limitCBPtr != uintptr(0) && (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj != uintptr(0)) {
		goto __10
	}
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, XTcl_NewStringObj(tls, options14[0], -1),
		(*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj)
	goto __11
__10:
	goto putEmptyCommandInDict
__11:
	;
	goto __9
__8:
putEmptyCommandInDict:
	;
__12:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __15
	}
	XTclAllocateFreeObjects(tls)
__15:
	;
	empty = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	;
	(*Tcl_Obj)(unsafe.Pointer(empty)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(empty)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(empty)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(empty)).FtypePtr = uintptr(0)

	XTcl_DictObjPut(tls, uintptr(0), dictPtr,
		XTcl_NewStringObj(tls, options14[0], -1), empty)
__9:
	;
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, XTcl_NewStringObj(tls, options14[1], -1),
		XTcl_NewIntObj(tls, XTcl_LimitGetGranularity(tls, childInterp,
			TCL_LIMIT_TIME)))

	if !(XTcl_LimitTypeEnabled(tls, childInterp, TCL_LIMIT_TIME) != 0) {
		goto __16
	}

	XTcl_LimitGetTime(tls, childInterp, bp+256)
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, XTcl_NewStringObj(tls, options14[2], -1),
		XTcl_NewLongObj(tls, (*Tcl_Time)(unsafe.Pointer(bp+256)).Fusec/1000))
	XTcl_DictObjPut(tls, uintptr(0), dictPtr, XTcl_NewStringObj(tls, options14[3], -1),
		XTcl_NewLongObj(tls, (*Tcl_Time)(unsafe.Pointer(bp+256 /* &limitMoment */)).Fsec))
	goto __17
__16:
	;
__18:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __21
	}
	XTclAllocateFreeObjects(tls)
__21:
	;
	empty1 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __19
__19:
	if 0 != 0 {
		goto __18
	}
	goto __20
__20:
	;
	(*Tcl_Obj)(unsafe.Pointer(empty1)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(empty1)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(empty1)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(empty1)).FtypePtr = uintptr(0)

	XTcl_DictObjPut(tls, uintptr(0), dictPtr,
		XTcl_NewStringObj(tls, options14[2], -1), empty1)
	XTcl_DictObjPut(tls, uintptr(0), dictPtr,
		XTcl_NewStringObj(tls, options14[3], -1), empty1)
__17:
	;
	XTcl_SetObjResult(tls, interp, dictPtr)
	return TCL_OK
	goto __3
__2:
	if !(objc == consumedObjc+1) {
		goto __22
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(consumedObjc)*8)), uintptr(unsafe.Pointer(&options14)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+264) != TCL_OK) {
		goto __24
	}
	return TCL_ERROR
__24:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 264 /* index */))) {
	case uint32(0) /* OPT_CMD */ :
		goto __26
	case uint32(1) /* OPT_GRAN */ :
		goto __27
	case uint32(2) /* OPT_MILLI */ :
		goto __28
	case uint32(3) /* OPT_SEC */ :
		goto __29
	}
	goto __25
__26:
	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp + 240 /* &key */)).Finterp = childInterp
	(*ScriptLimitCallbackKey)(unsafe.Pointer(bp + 240 /* &key */)).Ftype = TCL_LIMIT_TIME
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 760 /* &.limit */ + 64 /* &.callbacks */)).FfindProc})).f(tls, iPtr+760 /* &.limit */ +64 /* &.callbacks */, bp+240 /* &key */)
	if !(hPtr != uintptr(0)) {
		goto __30
	}
	limitCBPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !(limitCBPtr != uintptr(0) && (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj != uintptr(0)) {
		goto __31
	}
	XTcl_SetObjResult(tls, interp, (*ScriptLimitCallback)(unsafe.Pointer(limitCBPtr)).FscriptObj)
__31:
	;
__30:
	;
	goto __25
__27:
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls,
		XTcl_LimitGetGranularity(tls, childInterp, TCL_LIMIT_TIME)))
	goto __25
__28:
	if !(XTcl_LimitTypeEnabled(tls, childInterp, TCL_LIMIT_TIME) != 0) {
		goto __32
	}

	XTcl_LimitGetTime(tls, childInterp, bp+268)
	XTcl_SetObjResult(tls, interp,
		XTcl_NewLongObj(tls, (*Tcl_Time)(unsafe.Pointer(bp+268)).Fusec/1000))
__32:
	;
	goto __25
__29:
	if !(XTcl_LimitTypeEnabled(tls, childInterp, TCL_LIMIT_TIME) != 0) {
		goto __33
	}

	XTcl_LimitGetTime(tls, childInterp, bp+276)
	XTcl_SetObjResult(tls, interp, XTcl_NewLongObj(tls, (*Tcl_Time)(unsafe.Pointer(bp+276 /* &limitMoment2 */)).Fsec))
__33:
	;
	goto __25
__25:
	;
	return TCL_OK
	goto __23
__22:
	if !((objc-consumedObjc)&1 != 0) {
		goto __34
	}
	XTcl_WrongNumArgs(tls, interp, consumedObjc, objv, ts+43928)
	return TCL_ERROR
	goto __35
__34:
	*(*int32)(unsafe.Pointer(bp + 292 /* scriptLen */)) = 0
	*(*int32)(unsafe.Pointer(bp + 300 /* milliLen */)) = 0
	*(*int32)(unsafe.Pointer(bp + 308 /* secLen */)) = 0
	scriptObj = uintptr(0)
	granObj = uintptr(0)
	milliObj = uintptr(0)
	secObj = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 296 /* gran */)) = 0

	XTcl_LimitGetTime(tls, childInterp, bp+284)
	i = consumedObjc
__36:
	if !(i < objc) {
		goto __38
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options14)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+264) != TCL_OK) {
		goto __39
	}
	return TCL_ERROR
__39:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 264 /* index */))) {
	case uint32(0) /* OPT_CMD */ :
		goto __41
	case uint32(1) /* OPT_GRAN */ :
		goto __42
	case uint32(2) /* OPT_MILLI */ :
		goto __43
	case uint32(3) /* OPT_SEC */ :
		goto __44
	}
	goto __40
__41:
	scriptObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+292)
	goto __40
__42:
	granObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 296)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+296)
	}() != TCL_OK) {
		goto __45
	}
	return TCL_ERROR
__45:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 296)) < 1) {
		goto __46
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+43948, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7949, ts+42043,
		ts+43979, uintptr(0)))
	return TCL_ERROR
__46:
	;
	goto __40
__43:
	milliObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+300)
	if !(*(*int32)(unsafe.Pointer(bp + 300)) == 0) {
		goto __47
	}
	goto __40
__47:
	;
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 304)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+304)
	}() != TCL_OK) {
		goto __48
	}
	return TCL_ERROR
__48:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 304)) < 0) {
		goto __49
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+44047, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+7949, ts+42043,
		ts+43979, uintptr(0)))
	return TCL_ERROR
__49:
	;
	(*Tcl_Time)(unsafe.Pointer(bp + 284 /* &limitMoment3 */)).Fusec = int32(*(*int32)(unsafe.Pointer(bp + 304))) * 1000
	goto __40
__44:
	secObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+308)
	if !(*(*int32)(unsafe.Pointer(bp + 308)) == 0) {
		goto __50
	}
	goto __40
__50:
	;
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 304)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)), bp+304)
	}() != TCL_OK) {
		goto __51
	}
	return TCL_ERROR
__51:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 304)) < 0) {
		goto __52
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+44079, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+120, ts+4178, ts+7949, ts+42043,
		ts+43979, uintptr(0)))
	return TCL_ERROR
__52:
	;
	(*Tcl_Time)(unsafe.Pointer(bp + 284 /* &limitMoment3 */)).Fsec = int32(*(*int32)(unsafe.Pointer(bp + 304 /* tmp */)))
	goto __40
__40:
	;
	goto __37
__37:
	i = i + 2
	goto __36
	goto __38
__38:
	;
	if !(milliObj != uintptr(0) || secObj != uintptr(0)) {
		goto __53
	}
	if !(milliObj != uintptr(0)) {
		goto __54
	}
	// Setting -milliseconds but clearing -seconds, or resetting
	// -milliseconds but not resetting -seconds? Bad voodoo!

	if !(secObj != uintptr(0) && *(*int32)(unsafe.Pointer(bp + 308)) == 0 && *(*int32)(unsafe.Pointer(bp + 300)) > 0) {
		goto __55
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+44106, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+160, ts+4178, ts+7949, ts+42043,
		ts+44169, uintptr(0)))
	return TCL_ERROR
__55:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 300)) == 0 && (secObj == uintptr(0) || *(*int32)(unsafe.Pointer(bp + 308)) > 0)) {
		goto __56
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+44178, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+200, ts+4178, ts+7949, ts+42043,
		ts+44169, uintptr(0)))
	return TCL_ERROR
__56:
	;
__54:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 300)) > 0 || *(*int32)(unsafe.Pointer(bp + 308)) > 0) {
		goto __57
	}
	// Force usec to be in range [0..1000000), possibly
	// incrementing sec in the process. This makes it much easier
	// for people to write scripts that do small time increments.

	*(*int32)(unsafe.Pointer(bp + 284)) += (*Tcl_Time)(unsafe.Pointer(bp+284)).Fusec / 1000000
	*(*int32)(unsafe.Pointer(bp + 284 + 4)) %= 1000000

	XTcl_LimitSetTime(tls, childInterp, bp+284)
	XTcl_LimitTypeSet(tls, childInterp, TCL_LIMIT_TIME)
	goto __58
__57:
	XTcl_LimitTypeReset(tls, childInterp, TCL_LIMIT_TIME)
__58:
	;
__53:
	;
	if !(scriptObj != uintptr(0)) {
		goto __59
	}
	sSetScriptLimitCallback(tls, interp, TCL_LIMIT_TIME, childInterp,
		func() uintptr {
			if *(*int32)(unsafe.Pointer(bp + 292)) > 0 {
				return scriptObj
			}
			return uintptr(0)
		}())
__59:
	;
	if !(granObj != uintptr(0)) {
		goto __60
	}
	XTcl_LimitSetGranularity(tls, childInterp, TCL_LIMIT_TIME, *(*int32)(unsafe.Pointer(bp + 296 /* gran */)))
__60:
	;
	return TCL_OK
__35:
	;
__23:
	;
__3:
	;
	return int32(0)
}

var options14 = [5]uintptr{
	ts + 16010, ts + 44027, ts + 11769, ts + 44239, uintptr(0),
} /* tclInterp.c:4581:23 */

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// For each linked variable there is a data structure of the following type,
// which describes the link and is the clientData for the trace set on the Tcl
// variable.

type Link1 = struct {
	Finterp      uintptr
	FnsPtr       uintptr
	FvarName     uintptr
	Faddr        uintptr
	Ftype        int32
	F__ccgo_pad1 [4]byte
	FlastValue   struct {
		F__ccgo_pad1 [0]uint64
		Fc           int8
		F__ccgo_pad2 [7]byte
	}
	Fflags       int32
	F__ccgo_pad2 [4]byte
} /* tclLink.c:24:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// For each linked variable there is a data structure of the following type,
// which describes the link and is the clientData for the trace set on the Tcl
// variable.

type Link = Link1 /* tclLink.c:50:3 */

// Convenience macro for accessing the value of the C variable pointed to by a
// link. Note that this macro produces something that may be regarded as an
// lvalue or rvalue; it may be assigned to as well as read. Also note that
// this macro assumes the name of the variable being accessed (linkPtr); this
// is not strictly a good thing, but it keeps the code much shorter and
// cleaner.

//----------------------------------------------------------------------
//
// Tcl_LinkVar --
//
//	Link a C variable to a Tcl variable so that changes to either one
//	causes the other to change.
//
// Results:
//	The return value is TCL_OK if everything went well or TCL_ERROR if an
//	error occurred (the interp's result is also set after errors).
//
// Side effects:
//	The value at *addr is linked to the Tcl variable "varName", using
//	"type" to convert between string values for Tcl and binary values for
//	*addr.
//
//----------------------------------------------------------------------

func XTcl_LinkVar(tls *libc.TLS, interp uintptr, varName uintptr, addr uintptr, type1 int32) int32 { /* tclLink.c:107:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var objPtr uintptr
	var linkPtr uintptr
	// var dummy uintptr at bp+8, 8

	// var name uintptr at bp+16, 8

	var code int32

	linkPtr = XTcl_VarTraceInfo2(tls, interp, varName, uintptr(0),
		TCL_GLOBAL_ONLY, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sLinkTraceProc})), uintptr(0))
	if linkPtr != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+44248, libc.VaList(bp, varName)))
		return TCL_ERROR
	}

	linkPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Link{})))
	(*Link)(unsafe.Pointer(linkPtr)).Finterp = interp
	(*Link)(unsafe.Pointer(linkPtr)).FnsPtr = uintptr(0)
	(*Link)(unsafe.Pointer(linkPtr)).FvarName = XTcl_NewStringObj(tls, varName, -1)
	(*Tcl_Obj)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).FvarName)).FrefCount++
	(*Link)(unsafe.Pointer(linkPtr)).Faddr = addr
	(*Link)(unsafe.Pointer(linkPtr)).Ftype = type1 & libc.CplInt32(TCL_LINK_READ_ONLY)
	if type1&TCL_LINK_READ_ONLY != 0 {
		(*Link)(unsafe.Pointer(linkPtr)).Fflags = LINK_READ_ONLY
	} else {
		(*Link)(unsafe.Pointer(linkPtr)).Fflags = 0
	}
	objPtr = sObjValue(tls, linkPtr)
	if XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), objPtr,
		TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Link)(unsafe.Pointer(linkPtr)).FvarName
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		XTclpFree(tls, linkPtr)
		return TCL_ERROR
	}

	XTclGetNamespaceForQualName(tls, interp, varName, uintptr(0), TCL_GLOBAL_ONLY,
		linkPtr+8, bp+8, bp+8, bp+16)
	(*Namespace)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).FnsPtr)).FrefCount++

	code = XTcl_TraceVar2(tls, interp, varName, uintptr(0),
		TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sLinkTraceProc})), linkPtr)
	if code != TCL_OK {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*Link)(unsafe.Pointer(linkPtr)).FvarName
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		XTclNsDecrRefCount(tls, (*Link)(unsafe.Pointer(linkPtr)).FnsPtr)
		XTclpFree(tls, linkPtr)
	}
	return code
}

//----------------------------------------------------------------------
//
// Tcl_UnlinkVar --
//
//	Destroy the link between a Tcl variable and a C variable.
//
// Results:
//	None.
//
// Side effects:
//	If "varName" was previously linked to a C variable, the link is broken
//	to make the variable independent. If there was no previous link for
//	"varName" then nothing happens.
//
//----------------------------------------------------------------------

func XTcl_UnlinkVar(tls *libc.TLS, interp uintptr, varName uintptr) { /* tclLink.c:183:1: */
	var linkPtr uintptr = XTcl_VarTraceInfo2(tls, interp, varName, uintptr(0),
		TCL_GLOBAL_ONLY, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sLinkTraceProc})), uintptr(0))

	if linkPtr == uintptr(0) {
		return
	}
	XTcl_UntraceVar2(tls, interp, varName, uintptr(0),
		TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sLinkTraceProc})), linkPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*Link)(unsafe.Pointer(linkPtr)).FvarName
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if (*Link)(unsafe.Pointer(linkPtr)).FnsPtr != 0 {
		XTclNsDecrRefCount(tls, (*Link)(unsafe.Pointer(linkPtr)).FnsPtr)
	}
	XTclpFree(tls, linkPtr)
}

//----------------------------------------------------------------------
//
// Tcl_UpdateLinkedVar --
//
//	This function is invoked after a linked variable has been changed by C
//	code. It updates the Tcl variable so that traces on the variable will
//	trigger.
//
// Results:
//	None.
//
// Side effects:
//	The Tcl variable "varName" is updated from its C value, causing traces
//	on the variable to trigger.
//
//----------------------------------------------------------------------

func XTcl_UpdateLinkedVar(tls *libc.TLS, interp uintptr, varName uintptr) { /* tclLink.c:223:1: */
	var linkPtr uintptr = XTcl_VarTraceInfo2(tls, interp, varName, uintptr(0),
		TCL_GLOBAL_ONLY, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sLinkTraceProc})), uintptr(0))
	var savedFlag int32

	if linkPtr == uintptr(0) {
		return
	}
	savedFlag = (*Link)(unsafe.Pointer(linkPtr)).Fflags & LINK_BEING_UPDATED
	*(*int32)(unsafe.Pointer(linkPtr + 48)) |= LINK_BEING_UPDATED
	XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
		TCL_GLOBAL_ONLY)
	// Callback may have unlinked the variable. [Bug 1740631]
	linkPtr = XTcl_VarTraceInfo2(tls, interp, varName, uintptr(0),
		TCL_GLOBAL_ONLY, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sLinkTraceProc})), uintptr(0))
	if linkPtr != uintptr(0) {
		(*Link)(unsafe.Pointer(linkPtr)).Fflags = (*Link)(unsafe.Pointer(linkPtr)).Fflags&libc.CplInt32(LINK_BEING_UPDATED) | savedFlag
	}
}

//----------------------------------------------------------------------
//
// LinkTraceProc --
//
//	This function is invoked when a linked Tcl variable is read, written,
//	or unset from Tcl. It's responsible for keeping the C variable in sync
//	with the Tcl variable.
//
// Results:
//	If all goes well, NULL is returned; otherwise an error message is
//	returned.
//
// Side effects:
//	The C variable may be updated to make it consistent with the Tcl
//	variable, or the Tcl variable may be overwritten to reject a
//	modification.
//
//----------------------------------------------------------------------

func sLinkTraceProc(tls *libc.TLS, clientData ClientData, interp uintptr, name1 uintptr, name2 uintptr, flags int32) uintptr { /* tclLink.c:269:13: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var linkPtr uintptr = clientData
	var changed int32
	var valueLength Size_t
	var value uintptr
	var pp uintptr
	var valueObj uintptr
	// var valueInt int32 at bp, 4

	// var valueWide Tcl_WideInt at bp+8, 8

	// var valueDouble float64 at bp+16, 8

	// If the variable is being unset, then just re-create it (with a trace)
	// unless the whole interpreter is going away.

	if flags&TCL_TRACE_UNSETS != 0 {
		if XTcl_InterpDeleted(tls, interp) != 0 || XTclNamespaceDeleted(tls, (*Link)(unsafe.Pointer(linkPtr)).FnsPtr) != 0 {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*Link)(unsafe.Pointer(linkPtr)).FvarName
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			if (*Link)(unsafe.Pointer(linkPtr)).FnsPtr != 0 {
				XTclNsDecrRefCount(tls, (*Link)(unsafe.Pointer(linkPtr)).FnsPtr)
			}
			XTclpFree(tls, linkPtr)
		} else if flags&TCL_TRACE_DESTROYED != 0 {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			XTcl_TraceVar2(tls, interp, XTcl_GetString(tls, (*Link)(unsafe.Pointer(linkPtr)).FvarName), uintptr(0),
				TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|
					TCL_TRACE_UNSETS, *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
				}{sLinkTraceProc})), linkPtr)
		}
		return uintptr(0)
	}

	// If we were invoked because of a call to Tcl_UpdateLinkedVar, then don't
	// do anything at all. In particular, we don't want to get upset that the
	// variable is being modified, even if it is supposed to be read-only.

	if (*Link)(unsafe.Pointer(linkPtr)).Fflags&LINK_BEING_UPDATED != 0 {
		return uintptr(0)
	}

	// For read accesses, update the Tcl variable if the C variable has
	// changed since the last time we updated the Tcl variable.

	if flags&TCL_TRACE_READS != 0 {
		switch (*Link)(unsafe.Pointer(linkPtr)).Ftype {
		case TCL_LINK_INT:
			fallthrough
		case TCL_LINK_BOOLEAN:
			changed = libc.Bool32(*(*int32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) != *(*int32)(unsafe.Pointer(linkPtr + 40)))
			break
			fallthrough
		case TCL_LINK_DOUBLE:
			changed = libc.Bool32(*(*float64)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) != *(*float64)(unsafe.Pointer(linkPtr + 40)))
			break
			fallthrough
		case TCL_LINK_WIDE_INT:
			changed = libc.Bool32(*(*Tcl_WideInt)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) != *(*Tcl_WideInt)(unsafe.Pointer(linkPtr + 40)))
			break
			fallthrough
		case TCL_LINK_WIDE_UINT:
			changed = libc.Bool32(*(*Tcl_WideUInt)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) != *(*Tcl_WideUInt)(unsafe.Pointer(linkPtr + 40)))
			break
			fallthrough
		case TCL_LINK_CHAR:
			changed = libc.Bool32(int32(*(*int8)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))) != int32(*(*int8)(unsafe.Pointer(linkPtr + 40))))
			break
			fallthrough
		case TCL_LINK_UCHAR:
			changed = libc.Bool32(int32(*(*uint8)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))) != int32(*(*uint8)(unsafe.Pointer(linkPtr + 40))))
			break
			fallthrough
		case TCL_LINK_SHORT:
			changed = libc.Bool32(int32(*(*int16)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))) != int32(*(*int16)(unsafe.Pointer(linkPtr + 40))))
			break
			fallthrough
		case TCL_LINK_USHORT:
			changed = libc.Bool32(int32(*(*uint16)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))) != int32(*(*uint16)(unsafe.Pointer(linkPtr + 40))))
			break
			fallthrough
		case TCL_LINK_UINT:
			changed = libc.Bool32(*(*uint32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) != *(*uint32)(unsafe.Pointer(linkPtr + 40)))
			break
			fallthrough
		case TCL_LINK_LONG:
			changed = libc.Bool32(*(*int32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) != *(*int32)(unsafe.Pointer(linkPtr + 40)))
			break
			fallthrough
		case TCL_LINK_ULONG:
			changed = libc.Bool32(*(*uint32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) != *(*uint32)(unsafe.Pointer(linkPtr + 40)))
			break
			fallthrough
		case TCL_LINK_FLOAT:
			changed = libc.Bool32(*(*float32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) != *(*float32)(unsafe.Pointer(linkPtr + 40)))
			break
			fallthrough
		case TCL_LINK_STRING:
			changed = 1
			break
			fallthrough
		default:
			return ts + 44280 /* "internal error: ..." */
		}
		if changed != 0 {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
		}
		return uintptr(0)
	}

	// For writes, first make sure that the variable is writable. Then convert
	// the Tcl value to C if possible. If the variable isn't writable or can't
	// be converted, then restore the varaible's old value and return an
	// error. Another tricky thing: we have to save and restore the interp's
	// result, since the variable access could occur when the result has been
	// partially set.

	if (*Link)(unsafe.Pointer(linkPtr)).Fflags&LINK_READ_ONLY != 0 {
		XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
			TCL_GLOBAL_ONLY)
		return ts + 44321 /* "linked variable ..." */
	}
	valueObj = XTcl_ObjGetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), TCL_GLOBAL_ONLY)
	if valueObj == uintptr(0) {
		// This shouldn't ever happen.

		return ts + 44350 /* "internal error: ..." */
	}

	switch (*Link)(unsafe.Pointer(linkPtr)).Ftype {
	case TCL_LINK_INT:
		if XTcl_GetIntFromObj(tls, uintptr(0), valueObj, linkPtr+40) != TCL_OK &&
			XGetInvalidIntFromObj(tls, valueObj, linkPtr+40) != TCL_OK {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44399 /* "variable must ha..." */
		}
		*(*int32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = *(*int32)(unsafe.Pointer(linkPtr + 40))
		break

	case TCL_LINK_WIDE_INT:
		if XTcl_GetWideIntFromObj(tls, uintptr(0), valueObj, linkPtr+40) != TCL_OK &&
			XGetInvalidWideFromObj(tls, valueObj, linkPtr+40) != TCL_OK {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44399 /* "variable must ha..." */
		}
		*(*Tcl_WideInt)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = *(*Tcl_WideInt)(unsafe.Pointer(linkPtr + 40))
		break

	case TCL_LINK_DOUBLE:
		if XTcl_GetDoubleFromObj(tls, uintptr(0), valueObj, linkPtr+40) != TCL_OK {
			if XGetInvalidDoubleFromObj(tls, valueObj, linkPtr+40) != TCL_OK {
				XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
					TCL_GLOBAL_ONLY)
				return ts + 44432 /* "variable must ha..." */
			}
		}
		*(*float64)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = *(*float64)(unsafe.Pointer(linkPtr + 40))
		break

	case TCL_LINK_BOOLEAN:
		if XTcl_GetBooleanFromObj(tls, uintptr(0), valueObj, linkPtr+40) != TCL_OK {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44462 /* "variable must ha..." */
		}
		*(*int32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = *(*int32)(unsafe.Pointer(linkPtr + 40))
		break

	case TCL_LINK_CHAR:
		if XTcl_GetIntFromObj(tls, uintptr(0), valueObj, bp) != TCL_OK &&
			XGetInvalidIntFromObj(tls, valueObj, bp) != TCL_OK ||
			*(*int32)(unsafe.Pointer(bp)) < -0x7f-1 || *(*int32)(unsafe.Pointer(bp)) > 0x7f {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44495 /* "variable must ha..." */
		}
		*(*int8)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = libc.AssignPtrInt8(linkPtr+40, int8(*(*int32)(unsafe.Pointer(bp /* valueInt */))))
		break

	case TCL_LINK_UCHAR:
		if XTcl_GetIntFromObj(tls, uintptr(0), valueObj, bp) != TCL_OK &&
			XGetInvalidIntFromObj(tls, valueObj, bp) != TCL_OK ||
			*(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 0x7f*2+1 {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44525 /* "variable must ha..." */
		}
		*(*uint8)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = libc.AssignPtrUint8(linkPtr+40, uint8(*(*int32)(unsafe.Pointer(bp /* valueInt */))))
		break

	case TCL_LINK_SHORT:
		if XTcl_GetIntFromObj(tls, uintptr(0), valueObj, bp) != TCL_OK &&
			XGetInvalidIntFromObj(tls, valueObj, bp) != TCL_OK ||
			*(*int32)(unsafe.Pointer(bp)) < -0x7fff-1 || *(*int32)(unsafe.Pointer(bp)) > 0x7fff {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44564 /* "variable must ha..." */
		}
		*(*int16)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = libc.AssignPtrInt16(linkPtr+40, int16(*(*int32)(unsafe.Pointer(bp /* valueInt */))))
		break

	case TCL_LINK_USHORT:
		if XTcl_GetIntFromObj(tls, uintptr(0), valueObj, bp) != TCL_OK &&
			XGetInvalidIntFromObj(tls, valueObj, bp) != TCL_OK ||
			*(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 0x7fff*2+1 {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44595 /* "variable must ha..." */
		}
		*(*uint16)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = libc.AssignPtrUint16(linkPtr+40, uint16(*(*int32)(unsafe.Pointer(bp /* valueInt */))))
		break

	case TCL_LINK_UINT:
		if XTcl_GetWideIntFromObj(tls, uintptr(0), valueObj, bp+8) != TCL_OK &&
			XGetInvalidWideFromObj(tls, valueObj, bp+8) != TCL_OK ||
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) < int64(0) || *(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) > int64(uint32(0x7fffffff)*2+1) {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44635 /* "variable must ha..." */
		}
		*(*uint32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = libc.AssignPtrUint32(linkPtr+40, uint32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* valueWide */))))
		break

	case TCL_LINK_LONG:
		if XTcl_GetWideIntFromObj(tls, uintptr(0), valueObj, bp+8) != TCL_OK &&
			XGetInvalidWideFromObj(tls, valueObj, bp+8) != TCL_OK ||
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) < int64(-0x7fffffff-1) || *(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) > int64(0x7fffffff) {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44673 /* "variable must ha..." */
		}
		*(*int32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = libc.AssignPtrInt32(linkPtr+40, int32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* valueWide */))))
		break

	case TCL_LINK_ULONG:
		if XTcl_GetWideIntFromObj(tls, uintptr(0), valueObj, bp+8) != TCL_OK &&
			XGetInvalidWideFromObj(tls, valueObj, bp+8) != TCL_OK ||
			*(*Tcl_WideInt)(unsafe.Pointer(bp + 8)) < int64(0) || Tcl_WideUInt(*(*Tcl_WideInt)(unsafe.Pointer(bp + 8))) > uint64(uint32(0x7fffffff)*2+1) {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44703 /* "variable must ha..." */
		}
		*(*uint32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = libc.AssignPtrUint32(linkPtr+40, uint32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* valueWide */))))
		break

	case TCL_LINK_WIDE_UINT:
		// FIXME: represent as a bignum.
		if XTcl_GetWideIntFromObj(tls, uintptr(0), valueObj, bp+8) != TCL_OK &&
			XGetInvalidWideFromObj(tls, valueObj, bp+8) != TCL_OK {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44742 /* "variable must ha..." */
		}
		*(*Tcl_WideUInt)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = libc.AssignPtrUint64(linkPtr+40, Tcl_WideUInt(*(*Tcl_WideInt)(unsafe.Pointer(bp + 8 /* valueWide */))))
		break

	case TCL_LINK_FLOAT:
		if XTcl_GetDoubleFromObj(tls, uintptr(0), valueObj, bp+16) != TCL_OK &&
			XGetInvalidDoubleFromObj(tls, valueObj, bp+16) != TCL_OK ||
			*(*float64)(unsafe.Pointer(bp + 16)) < float64(-3.40282346638528859811704183484516925e+38) || *(*float64)(unsafe.Pointer(bp + 16)) > 3.40282346638528859811704183484516925e+38 {
			XTcl_ObjSetVar2(tls, interp, (*Link)(unsafe.Pointer(linkPtr)).FvarName, uintptr(0), sObjValue(tls, linkPtr),
				TCL_GLOBAL_ONLY)
			return ts + 44785 /* "variable must ha..." */
		}
		*(*float32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr)) = libc.AssignPtrFloat32(linkPtr+40, float32(*(*float64)(unsafe.Pointer(bp + 16 /* valueDouble */))))
		break

	case TCL_LINK_STRING:
		value = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(valueObj)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(valueObj)).Fbytes
			}
			return XTcl_GetString(tls, valueObj)
		}()
		valueLength = Size_t((*Tcl_Obj)(unsafe.Pointer(valueObj)).Flength + 1)
		pp = (*Link)(unsafe.Pointer(linkPtr)).Faddr

		*(*uintptr)(unsafe.Pointer(pp)) = XTcl_Realloc(tls, *(*uintptr)(unsafe.Pointer(pp)), uint32(valueLength))
		libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(pp)), value, valueLength)
		break

	default:
		return ts + 44280 /* "internal error: ..." */
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// ObjValue --
//
//	Converts the value of a C variable to a Tcl_Obj* for use in a Tcl
//	variable to which it is linked.
//
// Results:
//	The return value is a pointer to a Tcl_Obj that represents the value
//	of the C variable given by linkPtr.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sObjValue(tls *libc.TLS, linkPtr uintptr) uintptr { /* tclLink.c:581:16: */
	var p uintptr
	var resultObj uintptr

	switch (*Link)(unsafe.Pointer(linkPtr)).Ftype {
	case TCL_LINK_INT:
		*(*int32)(unsafe.Pointer(linkPtr + 40)) = *(*int32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(linkPtr + 40)))
	case TCL_LINK_WIDE_INT:
		*(*Tcl_WideInt)(unsafe.Pointer(linkPtr + 40)) = *(*Tcl_WideInt)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewWideIntObj(tls, *(*Tcl_WideInt)(unsafe.Pointer(linkPtr + 40)))
	case TCL_LINK_DOUBLE:
		*(*float64)(unsafe.Pointer(linkPtr + 40)) = *(*float64)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewDoubleObj(tls, *(*float64)(unsafe.Pointer(linkPtr + 40)))
	case TCL_LINK_BOOLEAN:
		*(*int32)(unsafe.Pointer(linkPtr + 40)) = *(*int32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewIntObj(tls, libc.Bool32(libc.Bool32(*(*int32)(unsafe.Pointer(linkPtr + 40)) != 0) != 0))
	case TCL_LINK_CHAR:
		*(*int8)(unsafe.Pointer(linkPtr + 40)) = *(*int8)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewIntObj(tls, int32(*(*int8)(unsafe.Pointer(linkPtr + 40))))
	case TCL_LINK_UCHAR:
		*(*uint8)(unsafe.Pointer(linkPtr + 40)) = *(*uint8)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewIntObj(tls, int32(*(*uint8)(unsafe.Pointer(linkPtr + 40))))
	case TCL_LINK_SHORT:
		*(*int16)(unsafe.Pointer(linkPtr + 40)) = *(*int16)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewIntObj(tls, int32(*(*int16)(unsafe.Pointer(linkPtr + 40))))
	case TCL_LINK_USHORT:
		*(*uint16)(unsafe.Pointer(linkPtr + 40)) = *(*uint16)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewIntObj(tls, int32(*(*uint16)(unsafe.Pointer(linkPtr + 40))))
	case TCL_LINK_UINT:
		*(*uint32)(unsafe.Pointer(linkPtr + 40)) = *(*uint32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewWideIntObj(tls, Tcl_WideInt(*(*uint32)(unsafe.Pointer(linkPtr + 40))))
	case TCL_LINK_LONG:
		*(*int32)(unsafe.Pointer(linkPtr + 40)) = *(*int32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewWideIntObj(tls, Tcl_WideInt(*(*int32)(unsafe.Pointer(linkPtr + 40))))
	case TCL_LINK_ULONG:
		*(*uint32)(unsafe.Pointer(linkPtr + 40)) = *(*uint32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewWideIntObj(tls, Tcl_WideInt(*(*uint32)(unsafe.Pointer(linkPtr + 40))))
	case TCL_LINK_FLOAT:
		*(*float32)(unsafe.Pointer(linkPtr + 40)) = *(*float32)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		return XTcl_NewDoubleObj(tls, float64(*(*float32)(unsafe.Pointer(linkPtr + 40))))
	case TCL_LINK_WIDE_UINT:
		*(*Tcl_WideUInt)(unsafe.Pointer(linkPtr + 40)) = *(*Tcl_WideUInt)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		// FIXME: represent as a bignum.
		return XTcl_NewWideIntObj(tls, Tcl_WideInt(*(*Tcl_WideUInt)(unsafe.Pointer(linkPtr + 40))))
	case TCL_LINK_STRING:
		p = *(*uintptr)(unsafe.Pointer((*Link)(unsafe.Pointer(linkPtr)).Faddr))
		if p == uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					resultObj = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
				if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
					(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes, ts+44816, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes + 4)) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
				}
				(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)
				{
				}
			}
			return resultObj
		}
		return XTcl_NewStringObj(tls, p, -1)

	// This code only gets executed if the link type is unknown (shouldn't
	// ever happen).

	default:
		for ok2 := true; ok2; ok2 = 0 != 0 {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				resultObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes, ts+44821, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes + 2)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)
			{
			}
		}
		return resultObj
	}
	return uintptr(0)
}

var invalidRealType = Tcl_ObjType{
	Fname: ts + 44824,
} /* tclLink.c:652:20 */

func sSetInvalidRealFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclLink.c:661:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var length int32 at bp, 4

	var str uintptr
	// var endPtr uintptr at bp+8, 8

	str = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp)
	}()
	if *(*int32)(unsafe.Pointer(bp)) == 1 && int32(*(*int8)(unsafe.Pointer(str))) == '.' {
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&invalidRealType))
		*(*float64)(unsafe.Pointer(objPtr + 32)) = 0.0
		return TCL_OK
	}
	if XTclParseNumber(tls, uintptr(0), objPtr, uintptr(0), str, *(*int32)(unsafe.Pointer(bp)), bp+8,
		TCL_PARSE_DECIMAL_ONLY) == TCL_OK {
		// If number is followed by [eE][+-]?, then it is an invalid
		// double, but it could be the start of a valid double.
		if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == 'e' || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == 'E' {
			*(*uintptr)(unsafe.Pointer(bp + 8 /* endPtr */))++
			if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == '+' || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == '-' {
				*(*uintptr)(unsafe.Pointer(bp + 8 /* endPtr */))++
			}
			if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == 0 {
				*(*float64)(unsafe.Pointer(bp + 16 /* doubleValue */)) = 0.0
				XTcl_GetDoubleFromObj(tls, uintptr(0), objPtr, bp+16)
				if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != 0 {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
				}
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&invalidRealType))
				*(*float64)(unsafe.Pointer(objPtr + 32)) = *(*float64)(unsafe.Pointer(bp + 16 /* doubleValue */))
				return TCL_OK
			}
		}
	}
	return TCL_ERROR
}

// This function checks for integer representations, which are valid
// when linking with C variables, but which are invalid in other
// contexts in Tcl. Handled are "+", "-", "", "0x", "0b" and "0o"
// (upperand lowercase). See bug [39f6304c2e].
func XGetInvalidIntFromObj(tls *libc.TLS, objPtr uintptr, intPtr uintptr) int32 { /* tclLink.c:700:1: */
	var str uintptr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == 0 || (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == 2 && int32(*(*int8)(unsafe.Pointer(str))) == '0' && libc.Xstrchr(tls, ts+44836, int32(*(*int8)(unsafe.Pointer(str + 1)))) != 0 {
		*(*int32)(unsafe.Pointer(intPtr)) = 0
		return TCL_OK
	} else if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == 1 && libc.Xstrchr(tls, ts+44843, int32(*(*int8)(unsafe.Pointer(str)))) != 0 {
		*(*int32)(unsafe.Pointer(intPtr)) = libc.Bool32(int32(*(*int8)(unsafe.Pointer(str))) == '+')
		return TCL_OK
	}
	return TCL_ERROR
}

func XGetInvalidWideFromObj(tls *libc.TLS, objPtr uintptr, widePtr uintptr) int32 { /* tclLink.c:717:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var intValue int32 at bp, 4

	if XGetInvalidIntFromObj(tls, objPtr, bp) != TCL_OK {
		return TCL_ERROR
	}
	*(*Tcl_WideInt)(unsafe.Pointer(widePtr)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(bp /* intValue */)))
	return TCL_OK
}

// This function checks for double representations, which are valid
// when linking with C variables, but which are invalid in other
// contexts in Tcl. Handled are "+", "-", "", ".", "0x", "0b" and "0o"
// (upper- and lowercase) and sequences like "1e-". See bug [39f6304c2e].
func XGetInvalidDoubleFromObj(tls *libc.TLS, objPtr uintptr, doublePtr uintptr) int32 { /* tclLink.c:735:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var intValue int32 at bp, 4

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&invalidRealType))) {
		goto __1
	}
	goto gotdouble
__1:
	;
	if !(XGetInvalidIntFromObj(tls, objPtr, bp) == TCL_OK) {
		goto __2
	}
	*(*float64)(unsafe.Pointer(doublePtr)) = float64(*(*int32)(unsafe.Pointer(bp /* intValue */)))
	return TCL_OK
__2:
	;
	if !(sSetInvalidRealFromAny(tls, uintptr(0), objPtr) == TCL_OK) {
		goto __3
	}
gotdouble:
	*(*float64)(unsafe.Pointer(doublePtr)) = *(*float64)(unsafe.Pointer(objPtr + 32))
	return TCL_OK
__3:
	;
	return TCL_ERROR
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The structure below defines the list Tcl object type by means of functions
// that can be invoked by generic object code.
//
// The internal representation of a list object is a two-pointer
// representation. The first pointer designates a List structure that contains
// an array of pointers to the element objects, together with integers that
// represent the current element count and the allocated size of the array.
// The second pointer is normally NULL; during execution of functions in this
// file that operate on nested sublists, it is occasionally used as working
// storage to avoid an auxiliary stack.

var XtclListType = Tcl_ObjType{
	Fname:             ts + 3395,
	FfreeIntRepProc:   0, // freeIntRepProc
	FdupIntRepProc:    0, // dupIntRepProc
	FupdateStringProc: 0, // updateStringProc
	FsetFromAnyProc:   0, // setFromAnyProc
} /* tclListObj.c:41:19 */

// Macros to manipulate the List internal rep

//----------------------------------------------------------------------
//
// NewListInternalRep --
//
//	Creates a 'List' structure with space for 'objc' elements.  'objc' must
//	be > 0.  If 'objv' is not NULL, The list is initialized with first
//	'objc' values in that array.  Otherwise the list is initialized to have
//	0 elements, with space to add 'objc' more.  Flag value 'p' indicates
//	how to behave on failure.
//
// Value
//
//	A new 'List' structure with refCount 0. If some failure
//	prevents this NULL is returned if 'p' is 0 , and 'Tcl_Panic'
//	is called if it is not.
//
// Effect
//
//	The refCount of each value in 'objv' is incremented as it is added
//	to the list.
//
//----------------------------------------------------------------------

func sNewListInternalRep(tls *libc.TLS, objc int32, objv uintptr, p int32) uintptr { /* tclListObj.c:87:13: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var listRepPtr uintptr

	if objc <= 0 {
		XTcl_Panic(tls, ts+44846, 0)
	}

	// First check to see if we'd overflow and try to allocate an object
	// larger than our memory allocator allows. Note that this is actually a
	// fairly small value when you're on a serious 64-bit machine, but that
	// requires API changes to fix. See [Bug 219196] for a discussion.

	if Size_t(objc) > uint64(1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0))))) {
		if p != 0 {
			XTcl_Panic(tls, ts+15050,
				libc.VaList(bp, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0))))))
		}
		return uintptr(0)
	}

	listRepPtr = XTclpAlloc(tls, uint32(uint64(unsafe.Sizeof(List{}))+uint64(objc-1)*uint64(unsafe.Sizeof(uintptr(0)))))
	if listRepPtr == uintptr(0) {
		if p != 0 {
			XTcl_Panic(tls, ts+44896,
				libc.VaList(bp+8, uint32(uint64(unsafe.Sizeof(List{}))+uint64(objc-1)*uint64(unsafe.Sizeof(uintptr(0))))))
		}
		return uintptr(0)
	}

	(*List)(unsafe.Pointer(listRepPtr)).FcanonicalFlag = 0
	(*List)(unsafe.Pointer(listRepPtr)).FrefCount = 0
	(*List)(unsafe.Pointer(listRepPtr)).FmaxElemCount = objc

	if objv != 0 {
		var elemPtrs uintptr
		var i int32

		(*List)(unsafe.Pointer(listRepPtr)).FelemCount = objc
		elemPtrs = listRepPtr + 16
		for i = 0; i < objc; i++ {
			*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)))).FrefCount++
		}
	} else {
		(*List)(unsafe.Pointer(listRepPtr)).FelemCount = 0
	}
	return listRepPtr
}

//----------------------------------------------------------------------
//
//  AttemptNewList --
//
//	Like NewListInternalRep, but additionally sets an error message on failure.
//
//----------------------------------------------------------------------

func sAttemptNewList(tls *libc.TLS, interp uintptr, objc int32, objv uintptr) uintptr { /* tclListObj.c:153:13: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var listRepPtr uintptr = sNewListInternalRep(tls, objc, objv, 0)

	if interp != uintptr(0) && listRepPtr == uintptr(0) {
		if objc > 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+15050,
				libc.VaList(bp, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))))))
		} else {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+44896,
				libc.VaList(bp+8, uint32(uint64(unsafe.Sizeof(List{}))+uint64(objc-1)*uint64(unsafe.Sizeof(uintptr(0)))))))
		}
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+15098, uintptr(0)))
	}
	return listRepPtr
}

//----------------------------------------------------------------------
//
// Tcl_NewListObj --
//
//	Creates a new list object and adds values to it. When TCL_MEM_DEBUG is
//	defined, 'Tcl_DbNewListObj' is called instead.
//
// Value
//
//	A new list 'Tcl_Obj' to which is appended values from 'objv', or if
//	'objc' is less than or equal to zero, a list 'Tcl_Obj' having no
//	elements.  The string representation of the new 'Tcl_Obj' is set to
//	NULL.  The refCount of the list is 0.
//
// Effect
//
//	The refCount of each elements in 'objv' is incremented as it is added
//	to the list.
//
//----------------------------------------------------------------------

func XTcl_NewListObj(tls *libc.TLS, objc int32, objv uintptr) uintptr { /* tclListObj.c:212:9: */
	var listRepPtr uintptr
	var listPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		listPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr = uintptr(0)
	{
	}

	if objc <= 0 {
		return listPtr
	}

	// Create the internal rep.

	listRepPtr = sNewListInternalRep(tls, objc, objv, 1)

	// Now create the object.

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _isobjPtr uintptr = listPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	*(*uintptr)(unsafe.Pointer(listPtr + 32)) = listRepPtr
	*(*uintptr)(unsafe.Pointer(listPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	(*List)(unsafe.Pointer(listRepPtr)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclListType))
	return listPtr
}

//----------------------------------------------------------------------
//
//  Tcl_DbNewListObj --
//
//	Like 'Tcl_NewListObj', but it calls Tcl_DbCkalloc directly with the
//	file name and line number from its caller.  This simplifies debugging
//	since the [memory active] command will report the correct file
//	name and line number when reporting objects that haven't been freed.
//
//	When TCL_MEM_DEBUG is not defined, 'Tcl_NewListObj' is called instead.
//
//----------------------------------------------------------------------

func XTcl_DbNewListObj(tls *libc.TLS, objc int32, objv uintptr, file uintptr, line int32) uintptr { /* tclListObj.c:295:9: */
	return XTcl_NewListObj(tls, objc, objv)
}

//----------------------------------------------------------------------
//
// Tcl_SetListObj --
//
//	Like 'Tcl_NewListObj', but operates on an existing 'Tcl_Obj'instead of
//	creating a new one.
//
//----------------------------------------------------------------------

func XTcl_SetListObj(tls *libc.TLS, objPtr uintptr, objc int32, objv uintptr) { /* tclListObj.c:320:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var listRepPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+44943))
	}

	// Free any old string rep and any internal rep for the old type.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}

	// Set the object's type to "list" and initialize the internal rep.
	// However, if there are no elements to put in the list, just give the
	// object an empty string rep and a NULL type.

	if objc > 0 {
		listRepPtr = sNewListInternalRep(tls, objc, objv, 1)
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = listRepPtr
		*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
		(*List)(unsafe.Pointer(listRepPtr)).FrefCount++
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclListType))
	} else {
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	}
}

//----------------------------------------------------------------------
//
// TclListObjCopy --
//
//	Creates a new 'Tcl_Obj' which is a pure copy of a list value. This
//	provides for the C level a counterpart of the [lrange $list 0 end]
//	command, while using internals details to be as efficient as possible.
//
// Value
//
//	The address of the new 'Tcl_Obj' which shares its internal
//	representation with 'listPtr', and whose refCount is 0.  If 'listPtr'
//	is not actually a list, the value is NULL, and an error message is left
//	in 'interp' if it is not NULL.
//
// Effect
//
//	'listPtr' is converted to a list if it isn't one already.
//
//----------------------------------------------------------------------

func XTclListObjCopy(tls *libc.TLS, interp uintptr, listPtr uintptr) uintptr { /* tclListObj.c:376:9: */
	var copyPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) {
		if sSetListFromAny(tls, interp, listPtr) != TCL_OK {
			return uintptr(0)
		}
	}

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		copyPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(0)
	{
	}

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _isobjPtr uintptr = copyPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	sDupListInternalRep(tls, listPtr, copyPtr)
	return copyPtr
}

//----------------------------------------------------------------------
//
// Tcl_ListObjGetElements --
//
//	Retreive the elements in a list 'Tcl_Obj'.
//
// Value
//
//	TCL_OK
//
//	    A count of list elements is stored, 'objcPtr', And a pointer to the
//	    array of elements in the list is stored in 'objvPtr'.
//
//	    The elements accessible via 'objvPtr' should be treated as readonly
//	    and the refCount for each object is _not_ incremented; the caller
//	    must do that if it holds on to a reference. Furthermore, the
//	    pointer and length returned by this function may change as soon as
//	    any function is called on the list object. Be careful about
//	    retaining the pointer in a local data structure.
//
//	TCL_ERROR
//
//	    'listPtr' is not a valid list. An error message is left in the
//	    interpreter's result if 'interp' is not NULL.
//
// Effect
//
//	'listPtr' is converted to a list object if it isn't one already.
//
//----------------------------------------------------------------------

func XTcl_ListObjGetElements(tls *libc.TLS, interp uintptr, listPtr uintptr, objcPtr uintptr, objvPtr uintptr) int32 { /* tclListObj.c:430:1: */
	var listRepPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) {
		var result int32

		if (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes == XtclEmptyStringRep {
			*(*int32)(unsafe.Pointer(objcPtr)) = 0
			*(*uintptr)(unsafe.Pointer(objvPtr)) = uintptr(0)
			return TCL_OK
		}
		result = sSetListFromAny(tls, interp, listPtr)
		if result != TCL_OK {
			return result
		}
	}
	listRepPtr = *(*uintptr)(unsafe.Pointer(listPtr + 32))
	*(*int32)(unsafe.Pointer(objcPtr)) = (*List)(unsafe.Pointer(listRepPtr)).FelemCount
	*(*uintptr)(unsafe.Pointer(objvPtr)) = listRepPtr + 16
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ListObjAppendList --
//
//	Appends the elements of elemListPtr to those of listPtr.
//
// Value
//
//	TCL_OK
//
//	    Success.
//
//	TCL_ERROR
//
//	    'listPtr' or 'elemListPtr' are not valid lists.  An error
//	    message is left in the interpreter's result if 'interp' is not NULL.
//
// Effect
//
//	The reference count of each element of 'elemListPtr' as it is added to
//	'listPtr'. 'listPtr' and 'elemListPtr' are converted to 'tclListType'
//	if they are not already. Appending the new elements may cause the
//	array of element pointers in 'listObj' to grow.  If any objects are
//	appended to 'listPtr'. Any preexisting string representation of
//	'listPtr' is invalidated.
//
//----------------------------------------------------------------------

func XTcl_ListObjAppendList(tls *libc.TLS, interp uintptr, listPtr uintptr, elemListPtr uintptr) int32 { /* tclListObj.c:491:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	// var objc int32 at bp+16, 4

	// var objv uintptr at bp+8, 8

	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+44958))
	}

	// Pull the elements to append from elemListPtr.

	if TCL_OK != func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(elemListPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 8)) = *(*uintptr)(unsafe.Pointer(elemListPtr + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 16)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemListPtr + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, elemListPtr, bp+16, bp+8)
	}() {
		return TCL_ERROR
	}

	// Insert the new elements starting after the lists's last element.
	// Delete zero existing elements.

	return XTcl_ListObjReplace(tls, interp, listPtr, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))), 0, *(*int32)(unsafe.Pointer(bp + 16 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)))
}

//----------------------------------------------------------------------
//
// Tcl_ListObjAppendElement --
//
//	Like 'Tcl_ListObjAppendList', but Appends a single value to a list.
//
// Value
//
//	TCL_OK
//
//	    'objPtr' is appended to the elements of 'listPtr'.
//
//	TCL_ERROR
//
//	    listPtr does not refer to a list object and the object can not be
//	    converted to one. An error message will be left in the
//	    interpreter's result if interp is not NULL.
//
// Effect
//
//	If 'listPtr' is not already of type 'tclListType', it is converted.
//	The 'refCount' of 'objPtr' is incremented as it is added to 'listPtr'.
//	Appending the new element may cause the the array of element pointers
//	in 'listObj' to grow.  Any preexisting string representation of
//	'listPtr' is invalidated.
//
//----------------------------------------------------------------------

func XTcl_ListObjAppendElement(tls *libc.TLS, interp uintptr, listPtr uintptr, objPtr uintptr) int32 { /* tclListObj.c:550:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)
	*(*uintptr)(unsafe.Pointer(bp + 40)) = objPtr

	var listRepPtr uintptr
	var newPtr uintptr = uintptr(0)
	var numElems int32
	var numRequired int32
	var needGrow int32
	var isShared int32
	var attempt int32

	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+44980))
	}
	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) {
		var result int32

		if (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes == XtclEmptyStringRep {
			XTcl_SetListObj(tls, listPtr, 1, bp+40)
			return TCL_OK
		}
		result = sSetListFromAny(tls, interp, listPtr)
		if result != TCL_OK {
			return result
		}
	}

	listRepPtr = *(*uintptr)(unsafe.Pointer(listPtr + 32))
	numElems = (*List)(unsafe.Pointer(listRepPtr)).FelemCount
	numRequired = numElems + 1
	needGrow = libc.Bool32(numRequired > (*List)(unsafe.Pointer(listRepPtr)).FmaxElemCount)
	isShared = libc.Bool32((*List)(unsafe.Pointer(listRepPtr)).FrefCount > 1)

	if numRequired > 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+15050,
				libc.VaList(bp+8, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))))))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+15098, uintptr(0)))
		}
		return TCL_ERROR
	}

	if needGrow != 0 && !(isShared != 0) {
		// Need to grow + unshared internalrep => try to realloc

		attempt = 2 * numRequired
		if attempt <= 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))) {
			newPtr = XTclpRealloc(tls, listRepPtr, uint32(uint64(unsafe.Sizeof(List{}))+uint64(attempt-1)*uint64(unsafe.Sizeof(uintptr(0)))))
		}
		if newPtr == uintptr(0) {
			attempt = int32(uint64(numRequired+1) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(uintptr(0))))
			if attempt > 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))) {
				attempt = 1 + int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0))))
			}
			newPtr = XTclpRealloc(tls, listRepPtr, uint32(uint64(unsafe.Sizeof(List{}))+uint64(attempt-1)*uint64(unsafe.Sizeof(uintptr(0)))))
		}
		if newPtr == uintptr(0) {
			attempt = numRequired
			newPtr = XTclpRealloc(tls, listRepPtr, uint32(uint64(unsafe.Sizeof(List{}))+uint64(attempt-1)*uint64(unsafe.Sizeof(uintptr(0)))))
		}
		if newPtr != 0 {
			listRepPtr = newPtr
			(*List)(unsafe.Pointer(listRepPtr)).FmaxElemCount = attempt
			needGrow = 0
		}
	}
	if isShared != 0 || needGrow != 0 {
		var dst uintptr
		var src uintptr = listRepPtr + 16

		// Either we have a shared internalrep and we must copy to write, or we
		// need to grow and realloc attempts failed.  Attempt internalrep copy.

		attempt = 2 * numRequired
		newPtr = sAttemptNewList(tls, uintptr(0), attempt, uintptr(0))
		if newPtr == uintptr(0) {
			attempt = int32(uint64(numRequired+1) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(uintptr(0))))
			if attempt > 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))) {
				attempt = 1 + int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0))))
			}
			newPtr = sAttemptNewList(tls, uintptr(0), attempt, uintptr(0))
		}
		if newPtr == uintptr(0) {
			attempt = numRequired
			newPtr = sAttemptNewList(tls, interp, attempt, uintptr(0))
		}
		if newPtr == uintptr(0) {
			// All growth attempts failed; throw the error.

			return TCL_ERROR
		}

		dst = newPtr + 16
		(*List)(unsafe.Pointer(newPtr)).FrefCount++
		(*List)(unsafe.Pointer(newPtr)).FcanonicalFlag = (*List)(unsafe.Pointer(listRepPtr)).FcanonicalFlag
		(*List)(unsafe.Pointer(newPtr)).FelemCount = (*List)(unsafe.Pointer(listRepPtr)).FelemCount

		if isShared != 0 {
			// The original internalrep must remain undisturbed.  Copy into the new
			// one and bump refcounts
			for libc.PostDecInt32(&numElems, 1) != 0 {
				*(*uintptr)(unsafe.Pointer(dst)) = *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&src, 8)))
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&dst, 8))))).FrefCount++
			}
			(*List)(unsafe.Pointer(listRepPtr)).FrefCount--
		} else {
			// Old internalrep to be freed, re-use refCounts.

			libc.Xmemcpy(tls, dst, src, uint64(numElems)*uint64(unsafe.Sizeof(uintptr(0))))
			XTclpFree(tls, listRepPtr)
		}
		listRepPtr = newPtr
	}
	*(*uintptr)(unsafe.Pointer(listPtr + 32)) = listRepPtr

	// Add objPtr to the end of listPtr's array of element pointers. Increment
	// the ref count for the (now shared) objPtr.

	*(*uintptr)(unsafe.Pointer(listRepPtr + 16 + uintptr((*List)(unsafe.Pointer(listRepPtr)).FelemCount)*8)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* objPtr */))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount++
	(*List)(unsafe.Pointer(listRepPtr)).FelemCount++

	// Invalidate any old string representation since the list's internal
	// representation has changed.

	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = listPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ListObjIndex --
//
// 	Retrieve a pointer to the element of 'listPtr' at 'index'.  The index
// 	of the first element is 0.
//
// Value
//
// 	TCL_OK
//
//	    A pointer to the element at 'index' is stored in 'objPtrPtr'.  If
//	    'index' is out of range, NULL is stored in 'objPtrPtr'.  This
//	    object should be treated as readonly and its 'refCount' is _not_
//	    incremented. The caller must do that if it holds on to the
//	    reference.
//
// 	TCL_ERROR
//
// 	    'listPtr' is not a valid list. An an error message is left in the
// 	    interpreter's result if 'interp' is not NULL.
//
//  Effect
//
// 	If 'listPtr' is not already of type 'tclListType', it is converted.
//
//----------------------------------------------------------------------

func XTcl_ListObjIndex(tls *libc.TLS, interp uintptr, listPtr uintptr, index int32, objPtrPtr uintptr) int32 { /* tclListObj.c:721:1: */
	var listRepPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) {
		var result int32

		if (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes == XtclEmptyStringRep {
			*(*uintptr)(unsafe.Pointer(objPtrPtr)) = uintptr(0)
			return TCL_OK
		}
		result = sSetListFromAny(tls, interp, listPtr)
		if result != TCL_OK {
			return result
		}
	}

	listRepPtr = *(*uintptr)(unsafe.Pointer(listPtr + 32))
	if index < 0 || index >= (*List)(unsafe.Pointer(listRepPtr)).FelemCount {
		*(*uintptr)(unsafe.Pointer(objPtrPtr)) = uintptr(0)
	} else {
		*(*uintptr)(unsafe.Pointer(objPtrPtr)) = *(*uintptr)(unsafe.Pointer(listRepPtr + 16 + uintptr(index)*8))
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ListObjLength --
//
// 	Retrieve the number of elements in a list.
//
// Value
//
//	TCL_OK
//
//	    A count of list elements is stored at the address provided by
//	    'intPtr'. If 'listPtr' is not already of type 'tclListPtr', it is
//	    converted.
//
//	TCL_ERROR
//
//	    'listPtr' is not a valid list.  An error message will be left in
//	    the interpreter's result if 'interp' is not NULL.
//
//----------------------------------------------------------------------

func XTcl_ListObjLength(tls *libc.TLS, interp uintptr, listPtr uintptr, intPtr uintptr) int32 { /* tclListObj.c:776:1: */
	var listRepPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) {
		var result int32

		if (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes == XtclEmptyStringRep {
			*(*int32)(unsafe.Pointer(intPtr)) = 0
			return TCL_OK
		}
		result = sSetListFromAny(tls, interp, listPtr)
		if result != TCL_OK {
			return result
		}
	}

	listRepPtr = *(*uintptr)(unsafe.Pointer(listPtr + 32))
	*(*int32)(unsafe.Pointer(intPtr)) = (*List)(unsafe.Pointer(listRepPtr)).FelemCount
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ListObjReplace --
//
//	Replace values in a list.
//
//	If 'first' is zero or negative, it refers to the first element. If
//	'first' outside the range of elements in the list, no elements are
//	deleted.
//
//	If 'count' is zero or negative no elements are deleted, and any new
//	elements are inserted at the beginning of the list.
//
// Value
//
//	TCL_OK
//
//	    The first 'objc' values of 'objv' replaced 'count' elements in 'listPtr'
//	    starting at 'first'.  If 'objc' 0, no new elements are added.
//
//	TCL_ERROR
//
//	    'listPtr' is not a valid list.   An error message is left in the
//	    interpreter's result if 'interp' is not NULL.
//
// Effect
//
//	If 'listPtr' is not of type 'tclListType', it is converted if possible.
//
//	The 'refCount' of each element appended to the list is incremented.
//	Similarly, the 'refCount' for each replaced element is decremented.
//
//	If 'listPtr' is modified, any previous string representation is
//	invalidated.
//
//----------------------------------------------------------------------

func XTcl_ListObjReplace(tls *libc.TLS, interp uintptr, listPtr uintptr, first int32, count int32, objc int32, objv uintptr) int32 { /* tclListObj.c:841:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var listRepPtr uintptr
	var elemPtrs uintptr
	var needGrow int32
	var numElems int32
	var numRequired int32
	var numAfterLast int32
	var start int32
	var i int32
	var j int32
	var isShared int32

	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+45005))
	}
	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) {
		if (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes == XtclEmptyStringRep {
			if !(objc != 0) {
				return TCL_OK
			}
			XTcl_SetListObj(tls, listPtr, objc, uintptr(0))
		} else {
			var result int32 = sSetListFromAny(tls, interp, listPtr)

			if result != TCL_OK {
				return result
			}
		}
	}

	// Note that when count == 0 and objc == 0, this routine is logically a
	// no-op, removing and adding no elements to the list. However, by flowing
	// through this routine anyway, we get the important side effect that the
	// resulting listPtr is a list in canoncial form. This is important.
	// Resist any temptation to optimize this case.

	listRepPtr = *(*uintptr)(unsafe.Pointer(listPtr + 32))
	elemPtrs = listRepPtr + 16
	numElems = (*List)(unsafe.Pointer(listRepPtr)).FelemCount

	if first < 0 {
		first = 0
	}
	if first >= numElems {
		first = numElems // So we'll insert after last element.
	}
	if count < 0 {
		count = 0
	} else if first > 0x7fffffff-count ||
		numElems < first+count {

		count = numElems - first
	}

	if objc > 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0))))-(numElems-count) {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+15050,
				libc.VaList(bp+8, 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))))))
		}
		return TCL_ERROR
	}
	isShared = libc.Bool32((*List)(unsafe.Pointer(listRepPtr)).FrefCount > 1)
	numRequired = numElems - count + objc // Known <= LIST_MAX
	needGrow = libc.Bool32(numRequired > (*List)(unsafe.Pointer(listRepPtr)).FmaxElemCount)

	for i = 0; i < objc; i++ {
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FrefCount++
	}

	if needGrow != 0 && !(isShared != 0) {
		// Try to use realloc
		var newPtr uintptr = uintptr(0)
		var attempt int32 = 2 * numRequired
		if attempt <= 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))) {
			newPtr = XTclpRealloc(tls, listRepPtr, uint32(uint64(unsafe.Sizeof(List{}))+uint64(attempt-1)*uint64(unsafe.Sizeof(uintptr(0)))))
		}
		if newPtr == uintptr(0) {
			attempt = int32(uint64(numRequired+1) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(uintptr(0))))
			if attempt > 1+int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))) {
				attempt = 1 + int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0))))
			}
			newPtr = XTclpRealloc(tls, listRepPtr, uint32(uint64(unsafe.Sizeof(List{}))+uint64(attempt-1)*uint64(unsafe.Sizeof(uintptr(0)))))
		}
		if newPtr == uintptr(0) {
			attempt = numRequired
			newPtr = XTclpRealloc(tls, listRepPtr, uint32(uint64(unsafe.Sizeof(List{}))+uint64(attempt-1)*uint64(unsafe.Sizeof(uintptr(0)))))
		}
		if newPtr != 0 {
			listRepPtr = newPtr
			*(*uintptr)(unsafe.Pointer(listPtr + 32)) = listRepPtr
			elemPtrs = listRepPtr + 16
			(*List)(unsafe.Pointer(listRepPtr)).FmaxElemCount = attempt
			needGrow = libc.Bool32(numRequired > (*List)(unsafe.Pointer(listRepPtr)).FmaxElemCount)
		}
	}
	if !(needGrow != 0) && !(isShared != 0) {
		var shift int32

		// Can use the current List struct. First "delete" count elements
		// starting at first.

		for j = first; j < first+count; j++ {
			var victimPtr uintptr = *(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(j)*8))

			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(victimPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(victimPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(victimPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(victimPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(victimPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(victimPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(victimPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(victimPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = victimPtr
					}
				} else {
					XTclFreeObj(tls, victimPtr)
				}
			}

		}

		// Shift the elements after the last one removed to their new
		// locations.

		start = first + count
		numAfterLast = numElems - start
		shift = objc - count // numNewElems - numDeleted
		if numAfterLast > 0 && shift != 0 {
			var src uintptr = elemPtrs + uintptr(start)*8

			libc.Xmemmove(tls, src+uintptr(shift)*8, src, uint64(numAfterLast)*uint64(unsafe.Sizeof(uintptr(0))))
		}
	} else {
		// Cannot use the current List struct; it is shared, too small, or
		// both. Allocate a new struct and insert elements into it.

		var oldListRepPtr uintptr = listRepPtr
		var oldPtrs uintptr = elemPtrs
		var newMax int32

		if needGrow != 0 {
			newMax = 2 * numRequired
		} else {
			newMax = (*List)(unsafe.Pointer(listRepPtr)).FmaxElemCount
		}

		listRepPtr = sAttemptNewList(tls, uintptr(0), newMax, uintptr(0))
		if listRepPtr == uintptr(0) {
			var limit uint32 = uint32(1 + int32((uint64(uint32(0x7fffffff)*2+1)-Size_t(unsafe.Sizeof(List{})))/Size_t(unsafe.Sizeof(uintptr(0)))) - numRequired)
			var extra uint32 = uint32(uint64(numRequired-numElems) +
				uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(uintptr(0))))
			var growth int32 = func() int32 {
				if extra > limit {
					return int32(limit)
				}
				return int32(extra)
			}()

			listRepPtr = sAttemptNewList(tls, uintptr(0), numRequired+growth, uintptr(0))
			if listRepPtr == uintptr(0) {
				listRepPtr = sAttemptNewList(tls, interp, numRequired, uintptr(0))
				if listRepPtr == uintptr(0) {
					for i = 0; i < objc; i++ {
						// See bug 3598580
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FrefCount--
					}
					return TCL_ERROR
				}
			}
		}

		*(*uintptr)(unsafe.Pointer(listPtr + 32)) = listRepPtr
		(*List)(unsafe.Pointer(listRepPtr)).FrefCount++

		elemPtrs = listRepPtr + 16

		if isShared != 0 {
			// The old struct will remain in place; need new refCounts for the
			// new List struct references. Copy over only the surviving
			// elements.

			for i = 0; i < first; i++ {
				*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(oldPtrs + uintptr(i)*8))
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)))).FrefCount++
			}
			i = first + count
			j = first + objc
		__1:
			if !(j < numRequired) {
				goto __3
			}
			{
				*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(j)*8)) = *(*uintptr)(unsafe.Pointer(oldPtrs + uintptr(i)*8))
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(j)*8)))).FrefCount++

			}
			goto __2
		__2:
			i++
			j++
			goto __1
			goto __3
		__3:
			;

			(*List)(unsafe.Pointer(oldListRepPtr)).FrefCount--
		} else {
			// The old struct will be removed; use its inherited refCounts.

			if first > 0 {
				libc.Xmemcpy(tls, elemPtrs, oldPtrs, uint64(first)*uint64(unsafe.Sizeof(uintptr(0))))
			}

			// "Delete" count elements starting at first.

			for j = first; j < first+count; j++ {
				var victimPtr uintptr = *(*uintptr)(unsafe.Pointer(oldPtrs + uintptr(j)*8))

				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(victimPtr)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(victimPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(victimPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(victimPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(victimPtr)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(victimPtr)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(victimPtr)).Flength = -1
						for ok1 := true; ok1; ok1 = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(victimPtr + 32)) = XtclFreeObjList
							XtclFreeObjList = victimPtr
						}
					} else {
						XTclFreeObj(tls, victimPtr)
					}
				}

			}

			// Copy the elements after the last one removed, shifted to their
			// new locations.

			start = first + count
			numAfterLast = numElems - start
			if numAfterLast > 0 {
				libc.Xmemcpy(tls, elemPtrs+uintptr(first)*8+uintptr(objc)*8, oldPtrs+uintptr(start)*8,
					Size_t(numAfterLast)*Size_t(unsafe.Sizeof(uintptr(0))))
			}

			XTclpFree(tls, oldListRepPtr)
		}
	}

	// Insert the new elements into elemPtrs before "first".

	i = 0
	j = first
__4:
	if !(i < objc) {
		goto __6
	}
	{
		*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(j)*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))

	}
	goto __5
__5:
	i++
	j++
	goto __4
	goto __6
__6:
	;

	// Update the count of elements.

	(*List)(unsafe.Pointer(listRepPtr)).FelemCount = numRequired

	// Invalidate and free any old string representation since it no longer
	// reflects the list's internal representation.

	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _isobjPtr uintptr = listPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclLindexList --
//
//	Implements the 'lindex' command when objc==3.
//
//	Implemented entirely as a wrapper around 'TclLindexFlat'. Reconfigures
//	the argument format into required form while taking care to manage
//	shimmering so as to tend to keep the most useful internalreps
//	and/or avoid the most expensive conversions.
//
// Value
//
//	A pointer to the specified element, with its 'refCount' incremented, or
//	NULL if an error occurred.
//
// Notes
//
//----------------------------------------------------------------------

func XTclLindexList(tls *libc.TLS, interp uintptr, listPtr uintptr, argPtr uintptr) uintptr { /* tclListObj.c:1110:9: */
	bp := tls.Alloc(28)
	defer tls.Free(28)
	*(*uintptr)(unsafe.Pointer(bp + 8)) = argPtr

	// var index int32 at bp, 4
	// Index into the list.
	var indexListCopy uintptr

	// Determine whether argPtr designates a list or a single index. We have
	// to be careful about the order of the checks to avoid repeated
	// shimmering; see TIP#22 and TIP#33 for the details.

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) &&
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 8)), 0, bp)
		}() == TCL_OK {
		// argPtr designates a single index.

		return XTclLindexFlat(tls, interp, listPtr, 1, bp+8)
	}

	// Here we make a private copy of the index list argument to avoid any
	// shimmering issues that might invalidate the indices array below while
	// we are still using it. This is probably unnecessary. It does not appear
	// that any damaging shimmering is possible, and no test has been devised
	// to show any error when this private copy is not made. But it's cheap,
	// and it offers some future-proofing insurance in case the TclLindexFlat
	// implementation changes in some unexpected way, or some new form of
	// trace or callback permits things to happen that the current
	// implementation does not.

	indexListCopy = XTclListObjCopy(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 8 /* argPtr */)))
	if indexListCopy == uintptr(0) {
		// argPtr designates something that is neither an index nor a
		// well-formed list. Report the error via TclLindexFlat.

		return XTclLindexFlat(tls, interp, listPtr, 1, bp+8)
	}

	{
		*(*int32)(unsafe.Pointer(bp + 24 /* indexCount */)) = -1        // Size of the array of list indices.
		*(*uintptr)(unsafe.Pointer(bp + 16 /* indices */)) = uintptr(0) // Array of list indices.

		if (*Tcl_Obj)(unsafe.Pointer(indexListCopy)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			*(*uintptr)(unsafe.Pointer(bp + 16)) = *(*uintptr)(unsafe.Pointer(indexListCopy + 32)) + 16
			*(*int32)(unsafe.Pointer(bp + 24)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(indexListCopy + 32)))).FelemCount
		} else {
			XTcl_ListObjGetElements(tls, uintptr(0), indexListCopy, bp+24, bp+16)
		}
		listPtr = XTclLindexFlat(tls, interp, listPtr, *(*int32)(unsafe.Pointer(bp + 24 /* indexCount */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* indices */)))

	}
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = indexListCopy
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return listPtr
}

//----------------------------------------------------------------------
//
//  TclLindexFlat --
//
// 	The core of the 'lindex' command, with all index
// 	arguments presented as a flat list.
//
//  Value
//
//	A pointer to the object extracted, with its 'refCount' incremented,  or
//	NULL if an error occurred.  Thus, the calling code will usually do
//	something like:
//
// 		Tcl_SetObjResult(interp, result);
// 		Tcl_DecrRefCount(result);
//
//
//----------------------------------------------------------------------

func XTclLindexFlat(tls *libc.TLS, interp uintptr, listPtr uintptr, indexCount int32, indexArray uintptr) uintptr { /* tclListObj.c:1189:9: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var i int32

	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount++

	for i = 0; i < indexCount && listPtr != 0; i++ {
		// var index int32 at bp+12, 4

		*(*int32)(unsafe.Pointer(bp + 8 /* listLen */)) = 0
		*(*uintptr)(unsafe.Pointer(bp /* elemPtrs */)) = uintptr(0)
		var sublistCopy uintptr

		// Here we make a private copy of the current sublist, so we avoid any
		// shimmering issues that might invalidate the elemPtr array below
		// while we are still using it. See test lindex-8.4.

		sublistCopy = XTclListObjCopy(tls, interp, listPtr)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = listPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		listPtr = uintptr(0)

		if sublistCopy == uintptr(0) {
			// The sublist is not a list at all => error.

			break
		}
		if (*Tcl_Obj)(unsafe.Pointer(sublistCopy)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(sublistCopy + 32)) + 16
			*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(sublistCopy + 32)))).FelemCount
		} else {
			XTcl_ListObjGetElements(tls, uintptr(0), sublistCopy, bp+8, bp)
		}

		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(indexArray + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 12)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(indexArray + uintptr(i)*8)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(indexArray + uintptr(i)*8)), *(*int32)(unsafe.Pointer(bp + 8))-1, bp+12)
		}() == TCL_OK {
			if *(*int32)(unsafe.Pointer(bp + 12)) < 0 || *(*int32)(unsafe.Pointer(bp + 12)) >= *(*int32)(unsafe.Pointer(bp + 8)) {
				// Index is out of range. Break out of loop with empty result.
				// First check remaining indices for validity

				for libc.PreIncInt32(&i, 1) < indexCount {
					if func() int32 {
						if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(indexArray + uintptr(i)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
							return func() int32 {
								*(*int32)(unsafe.Pointer(bp + 12)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(indexArray + uintptr(i)*8)) + 32)))
								return TCL_OK
							}()
						}
						return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(indexArray + uintptr(i)*8)), -1, bp+12)
					}() !=
						TCL_OK {
						for ok1 := true; ok1; ok1 = 0 != 0 {
							var _objPtr uintptr = sublistCopy
							if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
								XTclFreeObj(tls, _objPtr)
							}
						}
						return uintptr(0)
					}
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					listPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount = 0
				(*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(listPtr)).Flength = 0
				(*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr = uintptr(0)
				{
				}

			} else {
				// Extract the pointer to the appropriate element.

				listPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* elemPtrs */)) + uintptr(*(*int32)(unsafe.Pointer(bp + 12 /* index */)))*8))
			}
			(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount++
		}
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = sublistCopy
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	return listPtr
}

//----------------------------------------------------------------------
//
// TclLsetList --
//
//	The core of [lset] when objc == 4. Objv[2] may be either a
//	scalar index or a list of indices.
//
//	Implemented entirely as a wrapper around 'TclLindexFlat', as described
//	for 'TclLindexList'.
//
// Value
//
//	The new list, with the 'refCount' of 'valuPtr' incremented, or NULL if
//	there was an error.
//
//----------------------------------------------------------------------

func XTclLsetList(tls *libc.TLS, interp uintptr, listPtr uintptr, indexArgPtr uintptr, valuePtr uintptr) uintptr { /* tclListObj.c:1274:9: */
	bp := tls.Alloc(28)
	defer tls.Free(28)
	*(*uintptr)(unsafe.Pointer(bp + 8)) = indexArgPtr

	*(*int32)(unsafe.Pointer(bp + 24 /* indexCount */)) = 0         // Number of indices in the index list.
	*(*uintptr)(unsafe.Pointer(bp + 16 /* indices */)) = uintptr(0) // Vector of indices in the index list.
	var retValuePtr uintptr                                         // Pointer to the list to be returned.
	// var index int32 at bp, 4
	// Current index in the list - discarded.
	var indexListCopy uintptr

	// Determine whether the index arg designates a list or a single index.
	// We have to be careful about the order of the checks to avoid repeated
	// shimmering; see TIP #22 and #23 for details.

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) &&
		func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 8)), 0, bp)
		}() == TCL_OK {
		// indexArgPtr designates a single index.

		return XTclLsetFlat(tls, interp, listPtr, 1, bp+8, valuePtr)

	}

	indexListCopy = XTclListObjCopy(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 8 /* indexArgPtr */)))
	if indexListCopy == uintptr(0) {
		// indexArgPtr designates something that is neither an index nor a
		// well formed list. Report the error via TclLsetFlat.

		return XTclLsetFlat(tls, interp, listPtr, 1, bp+8, valuePtr)
	}
	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 16)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 24)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)) + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 8)), bp+24, bp+16)
	}

	// Let TclLsetFlat handle the actual lset'ting.

	retValuePtr = XTclLsetFlat(tls, interp, listPtr, *(*int32)(unsafe.Pointer(bp + 24 /* indexCount */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* indices */)), valuePtr)

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = indexListCopy
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return retValuePtr
}

//----------------------------------------------------------------------
//
// TclLsetFlat --
//
//	Core engine of the 'lset' command.
//
// Value
//
//	The resulting list
//
//	    The 'refCount' of 'valuePtr' is incremented.  If 'listPtr' was not
//	    duplicated, its 'refCount' is incremented.  The reference count of
//	    an unduplicated object is therefore 2 (one for the returned pointer
//	    and one for the variable that holds it).  The reference count of a
//	    duplicate object is 1, reflecting that result is the only active
//	    reference. The caller is expected to store the result in the
//	    variable and decrement its reference count. (INST_STORE_* does
//	    exactly this.)
//
//	NULL
//
//	    An error occurred.  If 'listPtr' was duplicated, the reference
//	    count on the duplicate is decremented so that it is 0, causing any
//	    memory allocated by this function to be freed.
//
//
// Effect
//
//	On entry, the reference count of 'listPtr' does not reflect any
//	references held on the stack. The first action of this function is to
//	determine whether 'listPtr' is shared and to create a duplicate
//	unshared copy if it is.  The reference count of the duplicate is
//	incremented. At this point, the reference count is 1 in either case so
//	that the object is considered unshared.
//
//	The unshared list is altered directly to produce the result.
//	'TclLsetFlat' maintains a linked list of 'Tcl_Obj' values whose string
//	representations must be spoilt by threading via 'ptr2' of the
//	two-pointer internal representation. On entry to 'TclLsetFlat', the
//	values of 'ptr2' are immaterial; on exit, the 'ptr2' field of any
//	Tcl_Obj that has been modified is set to NULL.
//
//----------------------------------------------------------------------

func XTclLsetFlat(tls *libc.TLS, interp uintptr, listPtr uintptr, indexCount int32, indexArray uintptr, valuePtr uintptr) uintptr { /* tclListObj.c:1370:9: */
	bp := tls.Alloc(60)
	defer tls.Free(60)

	// var index int32 at bp+52, 4

	var result int32
	// var len int32 at bp+56, 4

	var subListPtr uintptr
	var retValuePtr uintptr
	var chainPtr uintptr

	// If there are no indices, simply return the new value.  (Without
	// indices, [lset] is a synonym for [set].

	if indexCount == 0 {
		(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount++
		return valuePtr
	}

	// If the list is shared, make a copy we can modify (copy-on-write).  We
	// use Tcl_DuplicateObj() instead of TclListObjCopy() for a few reasons:
	// 1) we have not yet confirmed listPtr is actually a list; 2) We make a
	// verbatim copy of any existing string rep, and when we combine that with
	// the delayed invalidation of string reps of modified Tcl_Obj's
	// implemented below, the outcome is that any error condition that causes
	// this routine to return NULL, will leave the string rep of listPtr and
	// all elements to be unchanged.

	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount > 1 {
		subListPtr = XTcl_DuplicateObj(tls, listPtr)
	} else {
		subListPtr = listPtr
	}

	// Anchor the linked list of Tcl_Obj's whose string reps must be
	// invalidated if the operation succeeds.

	retValuePtr = subListPtr
	chainPtr = uintptr(0)
	result = TCL_OK

	// Loop through all the index arguments, and for each one dive into the
	// appropriate sublist.

	for ok := true; ok; ok = indexCount > 0 {
		// var elemCount int32 at bp+48, 4

		var parentList uintptr
		// var elemPtrs uintptr at bp+40, 8

		// Check for the possible error conditions...

		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(subListPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(subListPtr + 32)) + 16
					*(*int32)(unsafe.Pointer(bp + 48)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(subListPtr + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjGetElements(tls, interp, subListPtr, bp+48, bp+40)
		}() !=
			TCL_OK {
			// ...the sublist we're indexing into isn't a list at all.
			result = TCL_ERROR
			break
		}

		// WARNING: the macro TclGetIntForIndexM is not safe for
		// post-increments, avoid '*indexArray++' here.

		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(indexArray)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp + 52)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(indexArray)) + 32)))
					return TCL_OK
				}()
			}
			return XTclGetIntForIndex(tls, interp, *(*uintptr)(unsafe.Pointer(indexArray)), *(*int32)(unsafe.Pointer(bp + 48))-1, bp+52)
		}() !=
			TCL_OK {
			// ...the index we're trying to use isn't an index at all.
			result = TCL_ERROR
			indexArray += 8
			break
		}
		indexArray += 8

		if *(*int32)(unsafe.Pointer(bp + 52)) < 0 || *(*int32)(unsafe.Pointer(bp + 52)) > *(*int32)(unsafe.Pointer(bp + 48)) {
			// ...the index points outside the sublist.
			if interp != uintptr(0) {
				XTcl_SetObjResult(tls, interp,
					XTcl_NewStringObj(tls, ts+45024, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+45048,
					ts+15955, uintptr(0)))
			}
			result = TCL_ERROR
			break
		}

		// No error conditions.  As long as we're not yet on the last index,
		// determine the next sublist for the next pass through the loop, and
		// take steps to make sure it is an unshared copy, as we intend to
		// modify it.

		if libc.PreDecInt32(&indexCount, 1) != 0 {
			parentList = subListPtr
			if *(*int32)(unsafe.Pointer(bp + 52)) == *(*int32)(unsafe.Pointer(bp + 48)) {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					subListPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(subListPtr)).FrefCount = 0
				(*Tcl_Obj)(unsafe.Pointer(subListPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(subListPtr)).Flength = 0
				(*Tcl_Obj)(unsafe.Pointer(subListPtr)).FtypePtr = uintptr(0)
				{
				}

			} else {
				subListPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* elemPtrs */)) + uintptr(*(*int32)(unsafe.Pointer(bp + 52 /* index */)))*8))
			}
			if (*Tcl_Obj)(unsafe.Pointer(subListPtr)).FrefCount > 1 {
				subListPtr = XTcl_DuplicateObj(tls, subListPtr)
			}

			// Replace the original elemPtr[index] in parentList with a copy
			// we know to be unshared.  This call will also deal with the
			// situation where parentList shares its internalrep with other
			// Tcl_Obj's.  Dealing with the shared internalrep case can cause
			// subListPtr to become shared again, so detect that case and make
			// and store another copy.

			if *(*int32)(unsafe.Pointer(bp + 52)) == *(*int32)(unsafe.Pointer(bp + 48)) {
				XTcl_ListObjAppendElement(tls, uintptr(0), parentList, subListPtr)
			} else {
				XTclListObjSetElement(tls, uintptr(0), parentList, *(*int32)(unsafe.Pointer(bp + 52 /* index */)), subListPtr)
			}
			if (*Tcl_Obj)(unsafe.Pointer(subListPtr)).FrefCount > 1 {
				subListPtr = XTcl_DuplicateObj(tls, subListPtr)
				XTclListObjSetElement(tls, uintptr(0), parentList, *(*int32)(unsafe.Pointer(bp + 52 /* index */)), subListPtr)
			}

			// The TclListObjSetElement() calls do not spoil the string rep of
			// parentList, and that's fine for now, since all we've done so
			// far is replace a list element with an unshared copy.  The list
			// value remains the same, so the string rep. is still valid, and
			// unchanged, which is good because if this whole routine returns
			// NULL, we'd like to leave no change to the value of the lset
			// variable.  Later on, when we set valuePtr in its proper place,
			// then all containing lists will have their values changed, and
			// will need their string reps spoiled.  We maintain a list of all
			// those Tcl_Obj's (via a little internalrep surgery) so we can spoil
			// them at that time.

			*(*uintptr)(unsafe.Pointer(parentList + 32 + 8 /* &.ptr2 */)) = chainPtr
			chainPtr = parentList
		}
	}

	// Either we've detected and error condition, and exited the loop with
	// result == TCL_ERROR, or we've successfully reached the last index, and
	// we're ready to store valuePtr.  In either case, we need to clean up our
	// string spoiling list of Tcl_Obj's.

	for chainPtr != 0 {
		var objPtr uintptr = chainPtr

		if result == TCL_OK {
			// We're going to store valuePtr, so spoil string reps of all
			// containing lists.

			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _isobjPtr uintptr = objPtr
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
					if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
				}
			}
		}

		// Clear away our internalrep surgery mess.

		chainPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */))
		*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	}

	if result != TCL_OK {
		// Error return; message is already in interp. Clean up any excess
		// memory.

		if retValuePtr != listPtr {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				var _objPtr uintptr = retValuePtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		return uintptr(0)
	}

	// Store valuePtr in proper sublist and return. The -1 is to avoid a
	// compiler warning (not a problem because we checked that we have a
	// proper list - or something convertible to one - above).

	*(*int32)(unsafe.Pointer(bp + 56 /* len */)) = -1
	if (*Tcl_Obj)(unsafe.Pointer(subListPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*int32)(unsafe.Pointer(bp + 56)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(subListPtr + 32)))).FelemCount
	} else {
		XTcl_ListObjLength(tls, uintptr(0), subListPtr, bp+56)
	}
	if *(*int32)(unsafe.Pointer(bp + 52)) == *(*int32)(unsafe.Pointer(bp + 56)) {
		XTcl_ListObjAppendElement(tls, uintptr(0), subListPtr, valuePtr)
	} else {
		XTclListObjSetElement(tls, uintptr(0), subListPtr, *(*int32)(unsafe.Pointer(bp + 52 /* index */)), valuePtr)
	}
	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _isobjPtr uintptr = subListPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(retValuePtr)).FrefCount++
	return retValuePtr
}

//----------------------------------------------------------------------
//
// TclListObjSetElement --
//
//	Set a single element of a list to a specified value.
//
//	It is the caller's responsibility to invalidate the string
//	representation of the 'listPtr'.
//
// Value
//
// 	TCL_OK
//
//	    Success.
//
//	TCL_ERROR
//
//	    'listPtr' does not refer to a list object and cannot be converted
//	    to one.  An error message will be left in the interpreter result if
//	    interp is not NULL.
//
//	TCL_ERROR
//
//	    An index designates an element outside the range [0..listLength-1],
//	    where 'listLength' is the count of elements in the list object
//	    designated by 'listPtr'.  An error message is left in the
//	    interpreter result.
//
// Effect
//
//	If 'listPtr' designates a shared object, 'Tcl_Panic' is called.  If
//	'listPtr' is not already of type 'tclListType', it is converted and the
//	internal representation is unshared. The 'refCount' of the element at
//	'index' is decremented and replaced in the list with the 'valuePtr',
//	whose 'refCount' in turn is incremented.
//
//
//----------------------------------------------------------------------

func XTclListObjSetElement(tls *libc.TLS, interp uintptr, listPtr uintptr, index int32, valuePtr uintptr) int32 { /* tclListObj.c:1615:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var listRepPtr uintptr // Internal representation of the list being
	// modified.
	var elemPtrs uintptr // Pointers to elements of the list.
	var elemCount int32  // Number of elements in the list.

	// Ensure that the listPtr parameter designates an unshared list.

	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+45053))
	}
	if (*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclListType)) {
		var result int32

		if (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes == XtclEmptyStringRep {
			if interp != uintptr(0) {
				XTcl_SetObjResult(tls, interp,
					XTcl_NewStringObj(tls, ts+45024, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7949, ts+45048,
					ts+15955, uintptr(0)))
			}
			return TCL_ERROR
		}
		result = sSetListFromAny(tls, interp, listPtr)
		if result != TCL_OK {
			return result
		}
	}

	listRepPtr = *(*uintptr)(unsafe.Pointer(listPtr + 32))
	elemCount = (*List)(unsafe.Pointer(listRepPtr)).FelemCount

	// Ensure that the index is in bounds.

	if index < 0 || index >= elemCount {
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp,
				XTcl_NewStringObj(tls, ts+45024, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7949, ts+45048, ts+15955,
				uintptr(0)))
		}
		return TCL_ERROR
	}

	// If the internal rep is shared, replace it with an unshared copy.

	if (*List)(unsafe.Pointer(listRepPtr)).FrefCount > 1 {
		var dst uintptr
		var src uintptr = listRepPtr + 16
		var newPtr uintptr = sAttemptNewList(tls, uintptr(0), (*List)(unsafe.Pointer(listRepPtr)).FmaxElemCount, uintptr(0))

		if newPtr == uintptr(0) {
			newPtr = sAttemptNewList(tls, interp, elemCount, uintptr(0))
			if newPtr == uintptr(0) {
				return TCL_ERROR
			}
		}
		(*List)(unsafe.Pointer(newPtr)).FrefCount++
		(*List)(unsafe.Pointer(newPtr)).FelemCount = elemCount
		(*List)(unsafe.Pointer(newPtr)).FcanonicalFlag = (*List)(unsafe.Pointer(listRepPtr)).FcanonicalFlag

		dst = newPtr + 16
		for libc.PostDecInt32(&elemCount, 1) != 0 {
			*(*uintptr)(unsafe.Pointer(dst)) = *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&src, 8)))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&dst, 8))))).FrefCount++
		}

		(*List)(unsafe.Pointer(listRepPtr)).FrefCount--

		*(*uintptr)(unsafe.Pointer(listPtr + 32)) = libc.AssignUintptr(&listRepPtr, newPtr)
	}
	elemPtrs = listRepPtr + 16

	// Add a reference to the new list element.

	(*Tcl_Obj)(unsafe.Pointer(valuePtr)).FrefCount++

	// Remove a reference from the old list element.

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(index)*8))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	// Stash the new object in the list.

	*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(index)*8)) = valuePtr

	return TCL_OK
}

//----------------------------------------------------------------------
//
// FreeListInternalRep --
//
//	Deallocate the storage associated with the internal representation of a
//	a list object.
//
// Effect
//
//	The storage for the internal 'List' pointer of 'listPtr' is freed, the
//	'internalRep.twoPtrValue.ptr1' of 'listPtr' is set to NULL, and the 'refCount'
//	of each element of the list is decremented.
//
//----------------------------------------------------------------------

func sFreeListInternalRep(tls *libc.TLS, listPtr uintptr) { /* tclListObj.c:1740:1: */
	var listRepPtr uintptr = *(*uintptr)(unsafe.Pointer(listPtr + 32))

	if libc.PostDecInt32(&(*List)(unsafe.Pointer(listRepPtr)).FrefCount, 1) <= 1 {
		var elemPtrs uintptr = listRepPtr + 16
		var i int32
		var numElems int32 = (*List)(unsafe.Pointer(listRepPtr)).FelemCount

		for i = 0; i < numElems; i++ {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		XTclpFree(tls, listRepPtr)
	}

	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DupListInternalRep --
//
//	Initialize the internal representation of a list 'Tcl_Obj' to share the
//	internal representation of an existing list object.
//
// Effect
//
//	The 'refCount' of the List internal rep is incremented.
//
//----------------------------------------------------------------------

func sDupListInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclListObj.c:1774:1: */
	var listRepPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))

	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = listRepPtr
	*(*uintptr)(unsafe.Pointer(copyPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	(*List)(unsafe.Pointer(listRepPtr)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclListType))
}

//----------------------------------------------------------------------
//
// SetListFromAny --
//
//	Convert any object to a list.
//
// Value
//
//    TCL_OK
//
//	Success.  The internal representation of 'objPtr' is set, and the type
//	of 'objPtr' is 'tclListType'.
//
//    TCL_ERROR
//
//	An error occured during conversion. An error message is left in the
//	interpreter's result if 'interp' is not NULL.
//
//
//----------------------------------------------------------------------

func sSetListFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclListObj.c:1807:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var listRepPtr uintptr
	var elemPtrs uintptr

	// Dictionaries are a special case; they have a string representation such
	// that *all* valid dictionaries are valid lists. Hence we can convert
	// more directly. Only do this when there's no existing string rep; if
	// there is, it is the string rep that's authoritative (because it could
	// describe duplicate keys).

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDictType)) && !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes) != 0) {
		// var keyPtr uintptr at bp+32, 8

		// var valuePtr uintptr at bp+40, 8

		// var search Tcl_DictSearch at bp+8, 24

		// var done int32 at bp+48, 4

		// var size int32 at bp, 4

		// Create the new list representation. Note that we do not need to do
		// anything with the string representation as the transformation (and
		// the reverse back to a dictionary) are both order-preserving. Also
		// note that since we know we've got a valid dictionary (by
		// representation) we also know that fetching the size of the
		// dictionary or iterating over it will not fail.

		XTcl_DictObjSize(tls, uintptr(0), objPtr, bp)
		listRepPtr = sAttemptNewList(tls, interp, func() int32 {
			if *(*int32)(unsafe.Pointer(bp)) > 0 {
				return 2 * *(*int32)(unsafe.Pointer(bp))
			}
			return 1
		}(), uintptr(0))
		if !(listRepPtr != 0) {
			return TCL_ERROR
		}
		(*List)(unsafe.Pointer(listRepPtr)).FelemCount = 2 * *(*int32)(unsafe.Pointer(bp))

		// Populate the list representation.

		elemPtrs = listRepPtr + 16
		XTcl_DictObjFirst(tls, uintptr(0), objPtr, bp+8, bp+32, bp+40, bp+48)
		for !(*(*int32)(unsafe.Pointer(bp + 48)) != 0) {
			*(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&elemPtrs, 8))) = *(*uintptr)(unsafe.Pointer(bp + 32 /* keyPtr */))
			*(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&elemPtrs, 8))) = *(*uintptr)(unsafe.Pointer(bp + 40 /* valuePtr */))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).FrefCount++
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount++
			XTcl_DictObjNext(tls, bp+8, bp+32, bp+40, bp+48)
		}
	} else {
		var estCount int32
		// var length int32 at bp+52, 4

		// var limit uintptr at bp+56, 8

		*(*uintptr)(unsafe.Pointer(bp + 72 /* nextElem */)) = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 52)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, objPtr, bp+52)
		}()

		// Allocate enough space to hold a (Tcl_Obj *) for each
		// (possible) list element.

		estCount = XTclMaxListLength(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* nextElem */)), *(*int32)(unsafe.Pointer(bp + 52 /* length */)), bp+56)
		estCount = estCount + libc.Bool32(estCount == 0) // Smallest list struct holds 1
		// element.
		listRepPtr = sAttemptNewList(tls, interp, estCount, uintptr(0))
		if listRepPtr == uintptr(0) {
			return TCL_ERROR
		}
		elemPtrs = listRepPtr + 16

		// Each iteration, parse and store a list element.

		for *(*uintptr)(unsafe.Pointer(bp + 72)) < *(*uintptr)(unsafe.Pointer(bp + 56)) {
			// var elemStart uintptr at bp+64, 8

			// var elemSize int32 at bp+80, 4

			// var literal int32 at bp+84, 4

			if TCL_OK != XTclFindElement(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 72)), int32((int64(*(*uintptr)(unsafe.Pointer(bp + 56)))-int64(*(*uintptr)(unsafe.Pointer(bp + 72))))/1),
				bp+64, bp+72, bp+80, bp+84) {
				for libc.PreDecUintptr(&elemPtrs, 8) >= listRepPtr+16 {
					for ok := true; ok; ok = 0 != 0 {
						var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(elemPtrs))
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
				}
				XTclpFree(tls, listRepPtr)
				return TCL_ERROR
			}
			if *(*uintptr)(unsafe.Pointer(bp + 64)) == *(*uintptr)(unsafe.Pointer(bp + 56)) {
				break
			}

			// TODO: replace panic with error on alloc failure?
			if *(*int32)(unsafe.Pointer(bp + 84)) != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						*(*uintptr)(unsafe.Pointer(elemPtrs)) = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).FrefCount = 0
					if *(*int32)(unsafe.Pointer(bp + 80)) == 0 {
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 80))+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Fbytes, *(*uintptr)(unsafe.Pointer(bp + 64)), uint64(*(*int32)(unsafe.Pointer(bp + 80))))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Fbytes + uintptr(*(*int32)(unsafe.Pointer(bp + 80))))) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Flength = *(*int32)(unsafe.Pointer(bp + 80))
					}
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).FtypePtr = uintptr(0)
					{
					}
				}
			} else {
				for ok3 := true; ok3; ok3 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					*(*uintptr)(unsafe.Pointer(elemPtrs)) = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).FrefCount = 0
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Flength = 0
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).FtypePtr = uintptr(0)
				{
				}

				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 80)))+uint32(1))
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Flength = XTclCopyAndCollapse(tls, *(*int32)(unsafe.Pointer(bp + 80 /* elemSize */)), *(*uintptr)(unsafe.Pointer(bp + 64 /* elemStart */)),
					(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs)))).Fbytes)
			}

			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&elemPtrs, 8))))).FrefCount++ // Since list now holds ref to it.
		}

		(*List)(unsafe.Pointer(listRepPtr)).FelemCount = int32((int64(elemPtrs) - int64(listRepPtr+16)) / 8)
	}

	// Free the old internalRep before setting the new one. We do this as late
	// as possible to allow the conversion code, in particular
	// Tcl_GetStringFromObj, to use that old internalRep.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = listRepPtr
	*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	(*List)(unsafe.Pointer(listRepPtr)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclListType))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// UpdateStringOfList --
//
//	Update the string representation for a list object.
//
//	Any previously-exising string representation is not invalidated, so
//	storage is lost if this has not been taken care of.
//
// Effect
//
//	The string representation of 'listPtr' is set to the resulting string.
//	This string will be empty if the list has no elements. It is assumed
//	that the list internal representation is not NULL.
//
//----------------------------------------------------------------------

func sUpdateStringOfList(tls *libc.TLS, listPtr uintptr) { /* tclListObj.c:1941:1: */
	bp := tls.Alloc(84)
	defer tls.Free(84)

	// var localFlags [64]int8 at bp+16, 64

	var flagPtr uintptr = uintptr(0)
	var listRepPtr uintptr = *(*uintptr)(unsafe.Pointer(listPtr + 32))
	var numElems int32 = (*List)(unsafe.Pointer(listRepPtr)).FelemCount
	var i int32
	// var length int32 at bp+80, 4

	var bytesNeeded int32 = 0
	var elem uintptr
	var dst uintptr
	var elemPtrs uintptr

	// Mark the list as being canonical; although it will now have a string
	// rep, it is one we derived through proper "canonical" quoting and so
	// it's known to be free from nasties relating to [concat] and [eval].

	(*List)(unsafe.Pointer(listRepPtr)).FcanonicalFlag = 1

	// Handle empty list case first, so rest of the routine is simpler.

	if numElems == 0 {
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).Flength = 0
		return
	}

	// Pass 1: estimate space, gather flags.

	if numElems <= LOCAL_SIZE {
		flagPtr = bp + 16 /* &localFlags[0] */
	} else {
		// We know numElems <= LIST_MAX, so this is safe.

		flagPtr = XTcl_Alloc(tls, uint32(numElems))
	}
	elemPtrs = listRepPtr + 16
	for i = 0; i < numElems; i++ {
		*(*int8)(unsafe.Pointer(flagPtr + uintptr(i))) = func() int8 {
			if i != 0 {
				return int8(TCL_DONT_QUOTE_HASH)
			}
			return int8(0)
		}()
		elem = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 80)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)), bp+80)
		}()
		bytesNeeded = bytesNeeded + XTclScanElement(tls, elem, *(*int32)(unsafe.Pointer(bp + 80)), flagPtr+uintptr(i))
		if bytesNeeded < 0 {
			XTcl_Panic(tls, ts+9934, libc.VaList(bp, 0x7fffffff))
		}
	}
	if bytesNeeded > 0x7fffffff-numElems+1 {
		XTcl_Panic(tls, ts+9934, libc.VaList(bp+8, 0x7fffffff))
	}
	bytesNeeded = bytesNeeded + numElems

	// Pass 2: copy into string rep buffer.

	//
	//  We used to set the string length here, relying on a presumed
	//  guarantee that the number of bytes TclScanElement() calls reported
	//  to be needed was a precise count and not an over-estimate, so long
	//  as the same flag values were passed to TclConvertElement().
	//
	//  Then we saw [35a8f1c04a], where a bug in TclScanElement() caused
	//  that guarantee to fail. Rather than trust there are no more bugs,
	//  we set the length after the loop based on what was actually written,
	//  an not on what was predicted.
	//
	//     listPtr->length = bytesNeeded - 1;
	//      *
	//

	(*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes = XTcl_Alloc(tls, uint32(bytesNeeded))
	dst = (*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes
	for i = 0; i < numElems; i++ {
		*(*int8)(unsafe.Pointer(flagPtr + uintptr(i))) |= int8(func() int32 {
			if i != 0 {
				return TCL_DONT_QUOTE_HASH
			}
			return 0
		}())
		elem = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 80)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(elemPtrs + uintptr(i)*8)), bp+80)
		}()
		dst += uintptr(XTclConvertElement(tls, elem, *(*int32)(unsafe.Pointer(bp + 80 /* length */)), dst, int32(*(*int8)(unsafe.Pointer(flagPtr + uintptr(i))))))
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(' ')
	}
	*(*int8)(unsafe.Pointer(dst + libc.UintptrFromInt32(-1))) = int8(0)

	// Here is the safe setting of the string length.
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).Flength = int32((int64(dst-uintptr(1)) - int64((*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes)) / 1)

	if flagPtr != bp+16 {
		XTclpFree(tls, flagPtr)
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------------
//
// TclInitLiteralTable --
//
//	This function is called to initialize the fields of a literal table
//	structure for either an interpreter or a compilation's CompileEnv
//	structure.
//
// Results:
//	None.
//
// Side effects:
//	The literal table is made ready for use.
//
//----------------------------------------------------------------------

func XTclInitLiteralTable(tls *libc.TLS, tablePtr uintptr) { /* tclLiteral.c:60:1: */

	(*LiteralTable)(unsafe.Pointer(tablePtr)).Fbuckets = tablePtr + 8 /* &.staticBuckets */
	*(*uintptr)(unsafe.Pointer(tablePtr + 8)) = libc.AssignPtrUintptr(tablePtr+8+1*8, uintptr(0))
	*(*uintptr)(unsafe.Pointer(tablePtr + 8 + 2*8)) = libc.AssignPtrUintptr(tablePtr+8+3*8, uintptr(0))
	(*LiteralTable)(unsafe.Pointer(tablePtr)).FnumBuckets = TCL_SMALL_HASH_TABLE
	(*LiteralTable)(unsafe.Pointer(tablePtr)).FnumEntries = 0
	(*LiteralTable)(unsafe.Pointer(tablePtr)).FrebuildSize = TCL_SMALL_HASH_TABLE * REBUILD_MULTIPLIER
	(*LiteralTable)(unsafe.Pointer(tablePtr)).Fmask = 3
}

//----------------------------------------------------------------------
//
// TclDeleteLiteralTable --
//
//	This function frees up everything associated with a literal table
//	except for the table's structure itself. It is called when the
//	interpreter is deleted.
//
// Results:
//	None.
//
// Side effects:
//	Each literal in the table is released: i.e., its reference count in
//	the global literal table is decremented and, if it becomes zero, the
//	literal is freed. In addition, the table's bucket array is freed.
//
//----------------------------------------------------------------------

func XTclDeleteLiteralTable(tls *libc.TLS, interp uintptr, tablePtr uintptr) { /* tclLiteral.c:100:1: */
	var entryPtr uintptr
	var nextPtr uintptr
	var objPtr uintptr
	var i int32

	// Release remaining literals in the table. Note that releasing a literal
	// might release other literals, modifying the table, so we restart the
	// search from the bucket chain we last found an entry.

	// We used to call TclReleaseLiteral for each literal in the table, which
	// is rather inefficient as it causes one lookup-by-hash for each
	// reference to the literal. We now rely at interp-deletion on each
	// bytecode object to release its references to the literal Tcl_Obj
	// without requiring that it updates the global table itself, and deal
	// here only with the table.

	for i = 0; i < (*LiteralTable)(unsafe.Pointer(tablePtr)).FnumBuckets; i++ {
		entryPtr = *(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(i)*8))
		for entryPtr != uintptr(0) {
			objPtr = (*LiteralEntry)(unsafe.Pointer(entryPtr)).FobjPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = objPtr
					}
				} else {
					XTclFreeObj(tls, objPtr)
				}
			}

			nextPtr = (*LiteralEntry)(unsafe.Pointer(entryPtr)).FnextPtr
			XTclpFree(tls, entryPtr)
			entryPtr = nextPtr
		}
	}

	// Free up the table's bucket array if it was dynamically allocated.

	if (*LiteralTable)(unsafe.Pointer(tablePtr)).Fbuckets != tablePtr+8 {
		XTclpFree(tls, (*LiteralTable)(unsafe.Pointer(tablePtr)).Fbuckets)
	}
}

//----------------------------------------------------------------------
//
// TclCreateLiteral --
//
//	Find, or if necessary create, an object in the interpreter's literal
//	table that has a string representation matching the argument
//	string. If nsPtr!=NULL then only literals stored for the namespace are
//	considered.
//
// Results:
//	The literal object. If it was created in this call *newPtr is set to
//	1, else 0. NULL is returned if newPtr==NULL and no literal is found.
//
// Side effects:
//	Increments the ref count of the global LiteralEntry since the caller
//	now holds a reference. If LITERAL_ON_HEAP is set in flags, this
//	function is given ownership of the string: if an object is created
//	then its string representation is set directly from string, otherwise
//	the string is freed. Typically, a caller sets LITERAL_ON_HEAP if
//	"string" is an already heap-allocated buffer holding the result of
//	backslash substitutions.
//
//----------------------------------------------------------------------

func XTclCreateLiteral(tls *libc.TLS, iPtr uintptr, bytes uintptr, length int32, hash uint32, newPtr uintptr, nsPtr uintptr, flags int32, globalPtrPtr uintptr) uintptr { /* tclLiteral.c:174:9: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var globalTablePtr uintptr = iPtr + 336
	var globalPtr uintptr
	var globalHash int32
	var objPtr uintptr

	// Is it in the interpreter's global literal table?

	if hash == libc.Uint32(libc.Uint32FromInt32(-1)) {
		hash = sHashString(tls, bytes, length)
	}
	globalHash = int32(hash & uint32((*LiteralTable)(unsafe.Pointer(globalTablePtr)).Fmask))
	for globalPtr = *(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(globalTablePtr)).Fbuckets + uintptr(globalHash)*8)); globalPtr != uintptr(0); globalPtr = (*LiteralEntry)(unsafe.Pointer(globalPtr)).FnextPtr {
		objPtr = (*LiteralEntry)(unsafe.Pointer(globalPtr)).FobjPtr
		if (*LiteralEntry)(unsafe.Pointer(globalPtr)).FnsPtr == nsPtr {
			// Literals should always have UTF-8 representations... but this
			// is not guaranteed so we need to be careful anyway.
			//
			// https://stackoverflow.com/q/54337750/301832

			// var objLength int32 at bp, 4

			var objBytes uintptr = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
					return func() uintptr {
						*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
						return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
					}()
				}
				return XTcl_GetStringFromObj(tls, objPtr, bp)
			}()

			if *(*int32)(unsafe.Pointer(bp)) == length && (length == 0 ||
				int32(*(*int8)(unsafe.Pointer(objBytes))) == int32(*(*int8)(unsafe.Pointer(bytes))) &&
					libc.Xmemcmp(tls, objBytes, bytes, uint64(length)) == 0) {
				// A literal was found: return it

				if newPtr != 0 {
					*(*int32)(unsafe.Pointer(newPtr)) = 0
				}
				if globalPtrPtr != 0 {
					*(*uintptr)(unsafe.Pointer(globalPtrPtr)) = globalPtr
				}
				if flags&LITERAL_ON_HEAP != 0 {
					XTclpFree(tls, bytes)
				}
				(*LiteralEntry)(unsafe.Pointer(globalPtr)).FrefCount++
				return objPtr
			}
		}
	}
	if !(newPtr != 0) {
		if flags&LITERAL_ON_HEAP != 0 {
			XTclpFree(tls, bytes)
		}
		return uintptr(0)
	}

	// The literal is new to the interpreter. Add it to the global literal
	// table.

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	if flags&LITERAL_ON_HEAP != 0 {
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = bytes
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = length
	} else {
		if length == 0 {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(length+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, bytes, uint64(length))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(length))) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = length
		}

	}

	if flags&LITERAL_UNSHARED != 0 {
		// Make clear, that no global value is returned
		if globalPtrPtr != uintptr(0) {
			*(*uintptr)(unsafe.Pointer(globalPtrPtr)) = uintptr(0)
		}
		return objPtr
	}

	globalPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(LiteralEntry{})))
	(*LiteralEntry)(unsafe.Pointer(globalPtr)).FobjPtr = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	(*LiteralEntry)(unsafe.Pointer(globalPtr)).FrefCount = 1
	(*LiteralEntry)(unsafe.Pointer(globalPtr)).FnsPtr = nsPtr
	(*LiteralEntry)(unsafe.Pointer(globalPtr)).FnextPtr = *(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(globalTablePtr)).Fbuckets + uintptr(globalHash)*8))
	*(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(globalTablePtr)).Fbuckets + uintptr(globalHash)*8)) = globalPtr
	(*LiteralTable)(unsafe.Pointer(globalTablePtr)).FnumEntries++

	// If the global literal table has exceeded a decent size, rebuild it with
	// more buckets.

	if (*LiteralTable)(unsafe.Pointer(globalTablePtr)).FnumEntries >= (*LiteralTable)(unsafe.Pointer(globalTablePtr)).FrebuildSize {
		sRebuildLiteralTable(tls, globalTablePtr)
	}

	if globalPtrPtr != 0 {
		*(*uintptr)(unsafe.Pointer(globalPtrPtr)) = globalPtr
	}
	*(*int32)(unsafe.Pointer(newPtr)) = 1
	return objPtr
}

//----------------------------------------------------------------------
//
// TclFetchLiteral --
//
//	Fetch from a CompileEnv the literal value identified by an index
//	value, as returned by a prior call to TclRegisterLiteral().
//
// Results:
//	The literal value, or NULL if the index is out of range.
//
//----------------------------------------------------------------------

func XTclFetchLiteral(tls *libc.TLS, envPtr uintptr, index uint32) uintptr { /* tclLiteral.c:340:9: */
	if index >= uint32((*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayNext) {
		return uintptr(0)
	}
	return (*LiteralEntry)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayPtr + uintptr(index)*32)).FobjPtr
}

//----------------------------------------------------------------------
//
// TclRegisterLiteral --
//
//	Find, or if necessary create, an object in a CompileEnv literal array
//	that has a string representation matching the argument string.
//
// Results:
//	The index in the CompileEnv's literal array that references a shared
//	literal matching the string. The object is created if necessary.
//
// Side effects:
//	To maximize sharing, we look up the string in the interpreter's global
//	literal table. If not found, we create a new shared literal in the
//	global table. We then add a reference to the shared literal in the
//	CompileEnv's literal array.
//
//	If LITERAL_ON_HEAP is set in flags, this function is given ownership
//	of the string: if an object is created then its string representation
//	is set directly from string, otherwise the string is freed. Typically,
//	a caller sets LITERAL_ON_HEAP if "string" is an already heap-allocated
//	buffer holding the result of backslash substitutions.
//
//----------------------------------------------------------------------

func XTclRegisterLiteral(tls *libc.TLS, ePtr uintptr, bytes uintptr, length int32, flags int32) int32 { /* tclLiteral.c:381:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var envPtr uintptr = ePtr
	var iPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FiPtr
	var localTablePtr uintptr = envPtr + 56
	// var globalPtr uintptr at bp+8, 8

	var localPtr uintptr
	var objPtr uintptr
	var hash uint32
	var localHash int32
	var objIndex int32
	// var new int32 at bp, 4

	var nsPtr uintptr

	if length < 0 {
		length = func() int32 {
			if bytes != 0 {
				return int32(libc.Xstrlen(tls, bytes))
			}
			return 0
		}()
	}
	hash = sHashString(tls, bytes, length)

	// Is the literal already in the CompileEnv's local literal array? If so,
	// just return its index.

	localHash = int32(hash & uint32((*LiteralTable)(unsafe.Pointer(localTablePtr)).Fmask))
	for localPtr = *(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(localTablePtr)).Fbuckets + uintptr(localHash)*8)); localPtr != uintptr(0); localPtr = (*LiteralEntry)(unsafe.Pointer(localPtr)).FnextPtr {
		objPtr = (*LiteralEntry)(unsafe.Pointer(localPtr)).FobjPtr
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == length && (length == 0 ||
			int32(*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes))) == int32(*(*int8)(unsafe.Pointer(bytes))) &&
				libc.Xmemcmp(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, bytes, uint64(length)) == 0) {
			if flags&LITERAL_ON_HEAP != 0 {
				XTclpFree(tls, bytes)
			}
			objIndex = int32((int64(localPtr) - int64((*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayPtr)) / 32)

			return objIndex
		}
	}

	// The literal is new to this CompileEnv. If it is a command name, avoid
	// sharing it accross namespaces, and try not to share it with non-cmd
	// literals. Note that FQ command names can be shared, so that we register
	// the namespace as the interp's global NS.

	if flags&LITERAL_CMD_NAME != 0 {
		if length >= 2 && int32(*(*int8)(unsafe.Pointer(bytes))) == ':' && int32(*(*int8)(unsafe.Pointer(bytes + 1))) == ':' {
			nsPtr = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
		} else {
			nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr
		}
	} else {
		nsPtr = uintptr(0)
	}

	// Is it in the interpreter's global literal table? If not, create it.

	*(*uintptr)(unsafe.Pointer(bp + 8 /* globalPtr */)) = uintptr(0)
	objPtr = XTclCreateLiteral(tls, iPtr, bytes, length, hash, bp, nsPtr, flags,
		bp+8)
	objIndex = sAddLocalLiteralEntry(tls, envPtr, objPtr, localHash)

	return objIndex
}

//----------------------------------------------------------------------
//
// TclHideLiteral --
//
//	Remove a literal entry from the literal hash tables, leaving it in the
//	literal array so existing references continue to function. This makes
//	it possible to turn a shared literal into a private literal that
//	cannot be shared.
//
// Results:
//	None.
//
// Side effects:
//	Removes the literal from the local hash table and decrements the
//	global hash entry's reference count.
//
//----------------------------------------------------------------------

func XTclHideLiteral(tls *libc.TLS, interp uintptr, envPtr uintptr, index int32) { /* tclLiteral.c:536:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var nextPtrPtr uintptr
	var entryPtr uintptr
	var lPtr uintptr
	var localTablePtr uintptr = envPtr + 56
	var localHash int32
	// var length int32 at bp, 4

	var bytes uintptr
	var newObjPtr uintptr

	lPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayPtr + uintptr(index)*32

	// To avoid unwanted sharing we need to copy the object and remove it from
	// the local and global literal tables. It still has a slot in the literal
	// array so it can be referred to by byte codes, but it will not be
	// matched by literal searches.

	newObjPtr = XTcl_DuplicateObj(tls, (*LiteralEntry)(unsafe.Pointer(lPtr)).FobjPtr)
	(*Tcl_Obj)(unsafe.Pointer(newObjPtr)).FrefCount++
	XTclReleaseLiteral(tls, interp, (*LiteralEntry)(unsafe.Pointer(lPtr)).FobjPtr)
	(*LiteralEntry)(unsafe.Pointer(lPtr)).FobjPtr = newObjPtr

	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, newObjPtr, bp)
	}()
	localHash = int32(sHashString(tls, bytes, *(*int32)(unsafe.Pointer(bp))) & uint32((*LiteralTable)(unsafe.Pointer(localTablePtr)).Fmask))
	nextPtrPtr = (*LiteralTable)(unsafe.Pointer(localTablePtr)).Fbuckets + uintptr(localHash)*8

	for entryPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr)); entryPtr != uintptr(0); entryPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr)) {
		if entryPtr == lPtr {
			*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*LiteralEntry)(unsafe.Pointer(lPtr)).FnextPtr
			(*LiteralEntry)(unsafe.Pointer(lPtr)).FnextPtr = uintptr(0)
			(*LiteralTable)(unsafe.Pointer(localTablePtr)).FnumEntries--
			break
		}
		nextPtrPtr = entryPtr
	}
}

//----------------------------------------------------------------------
//
// TclAddLiteralObj --
//
//	Add a single literal object to the literal array. This function does
//	not add the literal to the local or global literal tables. The caller
//	is expected to add the entry to whatever tables are appropriate.
//
// Results:
//	The index in the CompileEnv's literal array that references the
//	literal. Stores the pointer to the new literal entry in the location
//	referenced by the localPtrPtr argument.
//
// Side effects:
//	Expands the literal array if necessary. Increments the refcount on the
//	literal object.
//
//----------------------------------------------------------------------

func XTclAddLiteralObj(tls *libc.TLS, envPtr uintptr, objPtr uintptr, litPtrPtr uintptr) int32 { /* tclLiteral.c:601:1: */
	var lPtr uintptr
	var objIndex int32

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayNext >= (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayEnd {
		sExpandLocalLiteralArray(tls, envPtr)
	}
	objIndex = (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayNext
	(*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayNext++

	lPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayPtr + uintptr(objIndex)*32
	(*LiteralEntry)(unsafe.Pointer(lPtr)).FobjPtr = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	(*LiteralEntry)(unsafe.Pointer(lPtr)).FrefCount = -1 // i.e., unused
	(*LiteralEntry)(unsafe.Pointer(lPtr)).FnextPtr = uintptr(0)

	if litPtrPtr != 0 {
		*(*uintptr)(unsafe.Pointer(litPtrPtr)) = lPtr
	}

	return objIndex
}

//----------------------------------------------------------------------
//
// AddLocalLiteralEntry --
//
//	Insert a new literal into a CompileEnv's local literal array.
//
// Results:
//	The index in the CompileEnv's literal array that references the
//	literal.
//
// Side effects:
//	Expands the literal array if necessary. May rebuild the hash bucket
//	array of the CompileEnv's literal array if it becomes too large.
//
//----------------------------------------------------------------------

func sAddLocalLiteralEntry(tls *libc.TLS, envPtr uintptr, objPtr uintptr, localHash int32) int32 { /* tclLiteral.c:650:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var localTablePtr uintptr = envPtr + 56
	// var localPtr uintptr at bp, 8

	var objIndex int32

	objIndex = XTclAddLiteralObj(tls, envPtr, objPtr, bp)

	// Add the literal to the local table.

	(*LiteralEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* localPtr */)))).FnextPtr = *(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(localTablePtr)).Fbuckets + uintptr(localHash)*8))
	*(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(localTablePtr)).Fbuckets + uintptr(localHash)*8)) = *(*uintptr)(unsafe.Pointer(bp /* localPtr */))
	(*LiteralTable)(unsafe.Pointer(localTablePtr)).FnumEntries++

	// If the CompileEnv's local literal table has exceeded a decent size,
	// rebuild it with more buckets.

	if (*LiteralTable)(unsafe.Pointer(localTablePtr)).FnumEntries >= (*LiteralTable)(unsafe.Pointer(localTablePtr)).FrebuildSize {
		sRebuildLiteralTable(tls, localTablePtr)
	}

	return objIndex
}

//----------------------------------------------------------------------
//
// ExpandLocalLiteralArray --
//
//	Function that uses malloc to allocate more storage for a CompileEnv's
//	local literal array.
//
// Results:
//	None.
//
// Side effects:
//	The literal array in *envPtr is reallocated to a new array of double
//	the size, and if envPtr->mallocedLiteralArray is non-zero the old
//	array is freed. Entries are copied from the old array to the new one.
//	The local literal table is updated to refer to the new entries.
//
//----------------------------------------------------------------------

func sExpandLocalLiteralArray(tls *libc.TLS, envPtr uintptr) { /* tclLiteral.c:727:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// The current allocated local literal entries are stored between elements
	// 0 and (envPtr->literalArrayNext - 1) [inclusive].

	var localTablePtr uintptr = envPtr + 56
	var currElems int32 = (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayNext
	var currBytes Size_t = uint64(currElems) * uint64(unsafe.Sizeof(LiteralEntry{}))
	var currArrayPtr uintptr = (*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayPtr
	var newArrayPtr uintptr
	var i int32
	var newSize uint32
	if currBytes <= uint64((uint32(0x7fffffff)*2+1)/uint32(2)) {
		newSize = uint32(uint64(2) * currBytes)
	} else {
		newSize = uint32(0x7fffffff)*2 + 1
	}

	if currBytes == Size_t(newSize) {
		XTcl_Panic(tls, ts+45074,
			libc.VaList(bp, currElems))
	}

	if (*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedLiteralArray != 0 {
		newArrayPtr = XTcl_Realloc(tls, currArrayPtr, newSize)
	} else {
		// envPtr->literalArrayPtr isn't a ckalloc'd pointer, so we must
		// code a ckrealloc equivalent for ourselves.

		newArrayPtr = XTcl_Alloc(tls, newSize)
		libc.Xmemcpy(tls, newArrayPtr, currArrayPtr, currBytes)
		(*CompileEnv)(unsafe.Pointer(envPtr)).FmallocedLiteralArray = 1
	}

	// Update the local literal table's bucket array.

	if currArrayPtr != newArrayPtr {
		for i = 0; i < currElems; i++ {
			if (*LiteralEntry)(unsafe.Pointer(newArrayPtr+uintptr(i)*32)).FnextPtr != uintptr(0) {
				(*LiteralEntry)(unsafe.Pointer(newArrayPtr + uintptr(i)*32)).FnextPtr = newArrayPtr +
					uintptr((int64((*LiteralEntry)(unsafe.Pointer(newArrayPtr+uintptr(i)*32)).FnextPtr)-int64(currArrayPtr))/32)*32
			}
		}
		for i = 0; i < (*LiteralTable)(unsafe.Pointer(localTablePtr)).FnumBuckets; i++ {
			if *(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(localTablePtr)).Fbuckets + uintptr(i)*8)) != uintptr(0) {
				*(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(localTablePtr)).Fbuckets + uintptr(i)*8)) = newArrayPtr +
					uintptr((int64(*(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(localTablePtr)).Fbuckets + uintptr(i)*8)))-int64(currArrayPtr))/32)*32
			}
		}
	}

	(*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayPtr = newArrayPtr
	(*CompileEnv)(unsafe.Pointer(envPtr)).FliteralArrayEnd = int32(uint64(newSize) / uint64(unsafe.Sizeof(LiteralEntry{})))
}

//----------------------------------------------------------------------
//
// TclReleaseLiteral --
//
//	This function releases a reference to one of the shared Tcl objects
//	that hold literals. It is called to release the literals referenced by
//	a ByteCode that is being destroyed, and it is also called by
//	TclDeleteLiteralTable.
//
// Results:
//	None.
//
// Side effects:
//	The reference count for the global LiteralTable entry that corresponds
//	to the literal is decremented. If no other reference to a global
//	literal object remains, it is freed.
//
//----------------------------------------------------------------------

func XTclReleaseLiteral(tls *libc.TLS, interp uintptr, objPtr uintptr) { /* tclLiteral.c:807:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr
	var globalTablePtr uintptr
	var entryPtr uintptr
	var prevPtr uintptr
	var bytes uintptr
	// var length int32 at bp, 4

	var index int32
	var _objPtr uintptr
	iPtr = interp

	if !(iPtr == uintptr(0)) {
		goto __1
	}
	goto done
__1:
	;

	globalTablePtr = iPtr + 336
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp)
	}()
	index = int32(sHashString(tls, bytes, *(*int32)(unsafe.Pointer(bp))) & uint32((*LiteralTable)(unsafe.Pointer(globalTablePtr)).Fmask))

	// Check to see if the object is in the global literal table and remove
	// this reference. The object may not be in the table if it is a hidden
	// local literal.

	prevPtr = uintptr(0)
	entryPtr = *(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(globalTablePtr)).Fbuckets + uintptr(index)*8))
__2:
	if !(entryPtr != uintptr(0)) {
		goto __4
	}
	if !((*LiteralEntry)(unsafe.Pointer(entryPtr)).FobjPtr == objPtr) {
		goto __5
	}
	(*LiteralEntry)(unsafe.Pointer(entryPtr)).FrefCount--

	// If the literal is no longer being used by any ByteCode, delete
	// the entry then remove the reference corresponding to the global
	// literal table entry (decrement the ref count of the object).

	if !((*LiteralEntry)(unsafe.Pointer(entryPtr)).FrefCount == 0) {
		goto __6
	}
	if !(prevPtr == uintptr(0)) {
		goto __7
	}
	*(*uintptr)(unsafe.Pointer((*LiteralTable)(unsafe.Pointer(globalTablePtr)).Fbuckets + uintptr(index)*8)) = (*LiteralEntry)(unsafe.Pointer(entryPtr)).FnextPtr
	goto __8
__7:
	(*LiteralEntry)(unsafe.Pointer(prevPtr)).FnextPtr = (*LiteralEntry)(unsafe.Pointer(entryPtr)).FnextPtr
__8:
	;
	XTclpFree(tls, entryPtr)
	(*LiteralTable)(unsafe.Pointer(globalTablePtr)).FnumEntries--

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1) {
		goto __9
	}
	goto __10
__9:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __11
	}

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep) {
		goto __13
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
__13:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
__14:
	;
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = objPtr
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	goto __12
__11:
	XTclFreeObj(tls, objPtr)
__12:
	;
__10:
	;

__6:
	;
	goto __4
__5:
	;
	goto __3
__3:
	prevPtr = entryPtr
	entryPtr = (*LiteralEntry)(unsafe.Pointer(entryPtr)).FnextPtr
	goto __2
	goto __4
__4:
	;

	// Remove the reference corresponding to the local literal table entry.

done:
__17:
	_objPtr = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __20
	}
	XTclFreeObj(tls, _objPtr)
__20:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
}

//----------------------------------------------------------------------
//
// HashString --
//
//	Compute a one-word summary of a text string, which can be used to
//	generate a hash index.
//
// Results:
//	The return value is a one-word summary of the information in string.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sHashString(tls *libc.TLS, string uintptr, length int32) uint32 { /* tclLiteral.c:890:1: */
	var result uint32 = uint32(0)

	// I tried a zillion different hash functions and asked many other people
	// for advice. Many people had their own favorite functions, all
	// different, but no-one had much idea why they were good ones. I chose
	// the one below (multiply by 9 and add new character) because of the
	// following reasons:
	//
	// 1. Multiplying by 10 is perfect for keys that are decimal strings, and
	//    multiplying by 9 is just about as good.
	// 2. Times-9 is (shift-left-3) plus (old). This means that each
	//    character's bits hang around in the low-order bits of the hash value
	//    for ever, plus they spread fairly rapidly up to the high-order bits
	//    to fill out the hash value. This seems works well both for decimal
	//    and non-decimal strings.
	//
	// Note that this function is very weak against malicious strings; it's
	// very easy to generate multiple keys that have the same hashcode. On the
	// other hand, that hardly ever actually occurs and this function *is*
	// very cheap, even by comparison with industry-standard hashes like FNV.
	// If real strength of hash is required though, use a custom hash based on
	// Bob Jenkins's lookup3(), but be aware that it's significantly slower.
	// Tcl scripts tend to not have a big issue in this area, and literals
	// mostly aren't looked up by name anyway.
	//
	// See also HashStringKey in tclHash.c.
	// See also TclObjHashKey in tclObj.c.
	//
	// See [tcl-Feature Request #2958832]

	if length > 0 {
		result = uint32(uint8(*(*int8)(unsafe.Pointer(string))))
		for libc.PreDecInt32(&length, 1) != 0 {
			result = result + (result<<3 + uint32(uint8(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&string, 1))))))
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// RebuildLiteralTable --
//
//	This function is invoked when the ratio of entries to hash buckets
//	becomes too large in a local or global literal table. It allocates a
//	larger bucket array and moves the entries into the new buckets.
//
// Results:
//	None.
//
// Side effects:
//	Memory gets reallocated and entries get rehashed into new buckets.
//
//----------------------------------------------------------------------

func sRebuildLiteralTable(tls *libc.TLS, tablePtr uintptr) { /* tclLiteral.c:954:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var oldBuckets uintptr
	var oldChainPtr uintptr
	var newChainPtr uintptr
	var entryPtr uintptr
	var bucketPtr uintptr
	var bytes uintptr
	var oldSize uint32
	var count int32
	var index int32
	// var length int32 at bp, 4

	oldSize = uint32((*LiteralTable)(unsafe.Pointer(tablePtr)).FnumBuckets)
	oldBuckets = (*LiteralTable)(unsafe.Pointer(tablePtr)).Fbuckets

	// Allocate and initialize the new bucket array, and set up hashing
	// constants for new array size.

	if uint64(oldSize) > uint64(uint32(0x7fffffff)*2+1)/(uint64(4)*uint64(unsafe.Sizeof(uintptr(0)))) {
		// Memory allocator limitations will not let us create the
		// next larger table size.  Best option is to limp along
		// with what we have.

		return
	}

	*(*int32)(unsafe.Pointer(tablePtr + 40)) *= 4
	(*LiteralTable)(unsafe.Pointer(tablePtr)).Fbuckets = XTcl_Alloc(tls, uint32(uint64((*LiteralTable)(unsafe.Pointer(tablePtr)).FnumBuckets)*uint64(unsafe.Sizeof(uintptr(0)))))
	count = (*LiteralTable)(unsafe.Pointer(tablePtr)).FnumBuckets
	newChainPtr = (*LiteralTable)(unsafe.Pointer(tablePtr)).Fbuckets
__1:
	if !(count > 0) {
		goto __3
	}
	{
		*(*uintptr)(unsafe.Pointer(newChainPtr)) = uintptr(0)

	}
	goto __2
__2:
	count--
	newChainPtr += 8
	goto __1
	goto __3
__3:
	;
	*(*int32)(unsafe.Pointer(tablePtr + 48)) *= 4
	(*LiteralTable)(unsafe.Pointer(tablePtr)).Fmask = (*LiteralTable)(unsafe.Pointer(tablePtr)).Fmask<<2 + 3

	// Rehash all of the existing entries into the new bucket array.

	oldChainPtr = oldBuckets
__4:
	if !(oldSize > uint32(0)) {
		goto __6
	}
	{
		for entryPtr = *(*uintptr)(unsafe.Pointer(oldChainPtr)); entryPtr != uintptr(0); entryPtr = *(*uintptr)(unsafe.Pointer(oldChainPtr)) {
			bytes = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer((*LiteralEntry)(unsafe.Pointer(entryPtr)).FobjPtr)).Fbytes != 0 {
					return func() uintptr {
						*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer((*LiteralEntry)(unsafe.Pointer(entryPtr)).FobjPtr)).Flength
						return (*Tcl_Obj)(unsafe.Pointer((*LiteralEntry)(unsafe.Pointer(entryPtr)).FobjPtr)).Fbytes
					}()
				}
				return XTcl_GetStringFromObj(tls, (*LiteralEntry)(unsafe.Pointer(entryPtr)).FobjPtr, bp)
			}()
			index = int32(sHashString(tls, bytes, *(*int32)(unsafe.Pointer(bp))) & uint32((*LiteralTable)(unsafe.Pointer(tablePtr)).Fmask))

			*(*uintptr)(unsafe.Pointer(oldChainPtr)) = (*LiteralEntry)(unsafe.Pointer(entryPtr)).FnextPtr
			bucketPtr = (*LiteralTable)(unsafe.Pointer(tablePtr)).Fbuckets + uintptr(index)*8
			(*LiteralEntry)(unsafe.Pointer(entryPtr)).FnextPtr = *(*uintptr)(unsafe.Pointer(bucketPtr))
			*(*uintptr)(unsafe.Pointer(bucketPtr)) = entryPtr
		}

	}
	goto __5
__5:
	oldSize--
	oldChainPtr += 8
	goto __4
	goto __6
__6:
	;

	// Free up the old bucket array, if it was dynamically allocated.

	if oldBuckets != tablePtr+8 {
		XTclpFree(tls, oldBuckets)
	}
}

//----------------------------------------------------------------------
//
// TclInvalidateCmdLiteral --
//
//	Invalidate a command literal entry, if present in the literal hash
//	tables, by resetting its internal representation. This invalidation
//	leaves it in the literal tables and in existing literal arrays. As a
//	result, existing references continue to work but we force a fresh
//	command look-up upon the next use (see, in particular,
//	TclSetCmdNameObj()).
//
// Results:
//	None.
//
// Side effects:
//	Resets the internal representation of the CmdName Tcl_Obj
//	using TclFreeIntRep().
//
//----------------------------------------------------------------------

func XTclInvalidateCmdLiteral(tls *libc.TLS, interp uintptr, name uintptr, nsPtr uintptr) { /* tclLiteral.c:1042:1: */
	var iPtr uintptr = interp
	var literalObjPtr uintptr = XTclCreateLiteral(tls, iPtr, name,
		int32(libc.Xstrlen(tls, name)), libc.Uint32FromInt32(-1), uintptr(0), nsPtr, 0, uintptr(0))

	if literalObjPtr != uintptr(0) {
		if (*Tcl_Obj)(unsafe.Pointer(literalObjPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclCmdNameType)) {
			if (*Tcl_Obj)(unsafe.Pointer(literalObjPtr)).FtypePtr != uintptr(0) {
				if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(literalObjPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(literalObjPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, literalObjPtr)
				}
				(*Tcl_Obj)(unsafe.Pointer(literalObjPtr)).FtypePtr = uintptr(0)
			}

		}
		// Balance the refcount effects of TclCreateLiteral() above
		(*Tcl_Obj)(unsafe.Pointer(literalObjPtr)).FrefCount++
		XTclReleaseLiteral(tls, interp, literalObjPtr)
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The following structure describes a package that has been loaded either
// dynamically (with the "load" command) or statically (as indicated by a call
// to TclGetLoadedPackages). All such packages are linked together into a
// single list for the process. Packages are never unloaded, until the
// application exits, when TclFinalizeLoad is called, and these structures are
// freed.

type LoadedPackage1 = struct {
	FfileName           uintptr
	FpackageName        uintptr
	FloadHandle         Tcl_LoadHandle
	FinitProc           uintptr
	FsafeInitProc       uintptr
	FunloadProc         uintptr
	FsafeUnloadProc     uintptr
	FinterpRefCount     int32
	FsafeInterpRefCount int32
	FnextPtr            uintptr
} /* tclLoad.c:24:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The following structure describes a package that has been loaded either
// dynamically (with the "load" command) or statically (as indicated by a call
// to TclGetLoadedPackages). All such packages are linked together into a
// single list for the process. Packages are never unloaded, until the
// application exits, when TclFinalizeLoad is called, and these structures are
// freed.

type LoadedPackage = LoadedPackage1 /* tclLoad.c:62:3 */

// TCL_THREADS
// There is a global list of packages that is anchored at firstPackagePtr.
// Access to this list is governed by a mutex.

var firstPackagePtr uintptr = uintptr(0) /* tclLoad.c:70:22 */
// First in list of all packages loaded into
// this process.

// The following structure represents a particular package that has been
// incorporated into a particular interpreter (by calling its initialization
// function). There is a list of these structures for each interpreter, with
// an AssocData value (key "load") for the interpreter that points to the
// first package (if any).

type InterpPackage1 = struct {
	FpkgPtr  uintptr
	FnextPtr uintptr
} /* tclLoad.c:84:9 */

// First in list of all packages loaded into
// this process.

// The following structure represents a particular package that has been
// incorporated into a particular interpreter (by calling its initialization
// function). There is a list of these structures for each interpreter, with
// an AssocData value (key "load") for the interpreter that points to the
// first package (if any).

type InterpPackage = InterpPackage1 /* tclLoad.c:90:3 */

//----------------------------------------------------------------------
//
// Tcl_LoadObjCmd --
//
//	This function is invoked to process the "load" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_LoadObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclLoad.c:117:1: */
	bp := tls.Alloc(1648)
	defer tls.Free(1648)

	var target uintptr
	var pkgPtr uintptr
	var defaultPtr uintptr
	// var prefix Tcl_DString at bp+296, 216

	// var tmp Tcl_DString at bp+1376, 216

	// var initName Tcl_DString at bp+512, 216

	// var safeInitName Tcl_DString at bp+728, 216

	// var unloadName Tcl_DString at bp+944, 216

	// var safeUnloadName Tcl_DString at bp+1160, 216

	var ipFirstPtr uintptr
	var ipPtr uintptr
	var code int32
	var namesMatch int32
	var filesMatch int32
	var offset int32
	// var symbols [2]uintptr at bp+1616, 16

	// var initProc uintptr at bp+1632, 8

	var p uintptr
	var fullFileName uintptr
	var packageName uintptr
	// var loadHandle Tcl_LoadHandle at bp+1640, 8

	// var ch Tcl_UniChar at bp+1608, 2

	var len uint32
	// var index int32 at bp+288, 4

	var flags int32
	var savedobjv uintptr
	var childIntName uintptr
	var _objPtr uintptr
	var _objPtr1 uintptr
	var splitPtr uintptr
	// var pkgGuessPtr uintptr at bp+1600, 8

	// var pElements int32 at bp+1592, 4

	var pkgGuess uintptr
	var retc int32
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 1608 /* ch */)) = Tcl_UniChar(0)
	flags = 0
	savedobjv = objv

__1:
	if !(objc > 2) {
		goto __2
	}
	if !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()))) != '-') {
		goto __3
	}
	goto __2
__3:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&options15)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+288) != TCL_OK) {
		goto __4
	}
	return TCL_ERROR
__4:
	;
	objv += 8
	objc--
	if !(0 == int32(uint32(*(*int32)(unsafe.Pointer(bp + 288))))) {
		goto __5
	}
	flags = flags | TCL_LOAD_GLOBAL
	goto __6
__5:
	if !(1 == int32(uint32(*(*int32)(unsafe.Pointer(bp + 288))))) {
		goto __7
	}
	flags = flags | TCL_LOAD_LAZY
	goto __8
__7:
	goto __2
__8:
	;
__6:
	;
	goto __1
__2:
	;
	if !(objc < 2 || objc > 4) {
		goto __9
	}
	XTcl_WrongNumArgs(tls, interp, 1, savedobjv, ts+45127)
	return TCL_ERROR
__9:
	;
	if !(XTcl_FSConvertToPathType(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8))) != TCL_OK) {
		goto __10
	}
	return TCL_ERROR
__10:
	;
	fullFileName = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))

	XTcl_DStringInit(tls, bp+296)
	XTcl_DStringInit(tls, bp+512)
	XTcl_DStringInit(tls, bp+728)
	XTcl_DStringInit(tls, bp+944)
	XTcl_DStringInit(tls, bp+1160)
	XTcl_DStringInit(tls, bp+1376)

	packageName = uintptr(0)
	if !(objc >= 3) {
		goto __11
	}
	packageName = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(int32(*(*int8)(unsafe.Pointer(packageName))) == 0) {
		goto __12
	}
	packageName = uintptr(0)
__12:
	;
__11:
	;
	if !(int32(*(*int8)(unsafe.Pointer(fullFileName))) == 0 && packageName == uintptr(0)) {
		goto __13
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+45182, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+45228, ts+45233,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__13:
	;

	// Figure out which interpreter we're going to load the package into.

	target = interp
	if !(objc == 4) {
		goto __14
	}
	childIntName = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))

	target = XTcl_GetSlave(tls, interp, childIntName)
	if !(target == uintptr(0)) {
		goto __15
	}
	code = TCL_ERROR
	goto done
__15:
	;
__14:
	;

	// Scan through the packages that are currently loaded to see if the
	// package we want is already loaded. We'll use a loaded package if it
	// meets any of the following conditions:
	//  - Its name and file match the once we're looking for.
	//  - Its file matches, and we weren't given a name.
	//  - Its name matches, the file name was specified as empty, and there is
	//	  only no statically loaded package with the same name.

	defaultPtr = uintptr(0)
	pkgPtr = firstPackagePtr
__16:
	if !(pkgPtr != uintptr(0)) {
		goto __18
	}
	if !(packageName == uintptr(0)) {
		goto __19
	}
	namesMatch = 0
	goto __20
__19:
	XTcl_DStringSetLength(tls, bp+296, 0)
	XTcl_DStringAppend(tls, bp+296, packageName, -1)
	XTcl_DStringSetLength(tls, bp+1376, 0)
	XTcl_DStringAppend(tls, bp+1376, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName, -1)
	XTcl_UtfToLower(tls, (*Tcl_DString)(unsafe.Pointer(bp+296)).Fstring)
	XTcl_UtfToLower(tls, (*Tcl_DString)(unsafe.Pointer(bp+1376)).Fstring)
	if !(libc.Xstrcmp(tls, (*Tcl_DString)(unsafe.Pointer(bp+1376)).Fstring,
		(*Tcl_DString)(unsafe.Pointer(bp+296)).Fstring) == 0) {
		goto __21
	}
	namesMatch = 1
	goto __22
__21:
	namesMatch = 0
__22:
	;
__20:
	;
	XTcl_DStringSetLength(tls, bp+296, 0)

	filesMatch = libc.Bool32(libc.Xstrcmp(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName, fullFileName) == 0)
	if !(filesMatch != 0 && (namesMatch != 0 || packageName == uintptr(0))) {
		goto __23
	}
	goto __18
__23:
	;
	if !(namesMatch != 0 && int32(*(*int8)(unsafe.Pointer(fullFileName))) == 0) {
		goto __24
	}
	defaultPtr = pkgPtr
__24:
	;
	if !(filesMatch != 0 && !(namesMatch != 0) && int32(*(*int8)(unsafe.Pointer(fullFileName))) != 0) {
		goto __25
	}
	// Can't have two different packages loaded from the same file.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+45243,
		libc.VaList(bp+40, fullFileName, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+4178, ts+7949, ts+45228,
		ts+45288, uintptr(0)))
	code = TCL_ERROR

	goto done
__25:
	;
	goto __17
__17:
	pkgPtr = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr
	goto __16
	goto __18
__18:
	;

	if !(pkgPtr == uintptr(0)) {
		goto __26
	}
	pkgPtr = defaultPtr
__26:
	;

	// Scan through the list of packages already loaded in the target
	// interpreter. If the package we want is already loaded there, then
	// there's nothing for us to do.

	if !(pkgPtr != uintptr(0)) {
		goto __27
	}
	ipFirstPtr = XTcl_GetAssocData(tls, target, ts+45305, uintptr(0))
	ipPtr = ipFirstPtr
__28:
	if !(ipPtr != uintptr(0)) {
		goto __30
	}
	if !((*InterpPackage)(unsafe.Pointer(ipPtr)).FpkgPtr == pkgPtr) {
		goto __31
	}
	code = TCL_OK
	goto done
__31:
	;
	goto __29
__29:
	ipPtr = (*InterpPackage)(unsafe.Pointer(ipPtr)).FnextPtr
	goto __28
	goto __30
__30:
	;
__27:
	;

	if !(pkgPtr == uintptr(0)) {
		goto __32
	}
	// The desired file isn't currently loaded, so load it. It's an error
	// if the desired package is a static one.

	if !(int32(*(*int8)(unsafe.Pointer(fullFileName))) == 0) {
		goto __33
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+45313, libc.VaList(bp+96, packageName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+4178, ts+7949, ts+45228, ts+45350,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__33:
	;

	// Figure out the module name if it wasn't provided explicitly.

	if !(packageName != uintptr(0)) {
		goto __34
	}
	XTcl_DStringAppend(tls, bp+296, packageName, -1)
	goto __35
__34:

	// Threading note - this call used to be protected by a mutex.

	retc = XTclGuessPackageName(tls, fullFileName, bp+296)
	if !!(retc != 0) {
		goto __36
	}

	// The platform-specific code couldn't figure out the module
	// name. Make a guess by taking the last element of the file
	// name, stripping off any leading "lib", and then using all
	// of the alphabetic and underline characters that follow
	// that.

	splitPtr = XTcl_FSSplitPath(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+1592)
	XTcl_ListObjIndex(tls, uintptr(0), splitPtr, *(*int32)(unsafe.Pointer(bp + 1592))-1, bp+1600)
	pkgGuess = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 1600 /* pkgGuessPtr */)))
	if !(int32(*(*int8)(unsafe.Pointer(pkgGuess))) == 'l' && int32(*(*int8)(unsafe.Pointer(pkgGuess + 1))) == 'i' &&
		int32(*(*int8)(unsafe.Pointer(pkgGuess + 2))) == 'b') {
		goto __37
	}
	pkgGuess += uintptr(3)
__37:
	;
	p = pkgGuess
__38:
	if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) {
		goto __40
	}
	offset = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(p)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 1608)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(p))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, p, bp+1608)
	}()
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 1608))) > 0x100 ||
		!(libc.Xisalpha(tls, int32(uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 1608))))) != 0 ||
			int32(uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 1608)))) == '_')) {
		goto __41
	}
	goto __40
__41:
	;
	goto __39
__39:
	p += uintptr(offset)
	goto __38
	goto __40
__40:
	;
	if !(p == pkgGuess) {
		goto __42
	}
__43:
	_objPtr = splitPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __46
	}
	XTclFreeObj(tls, _objPtr)
__46:
	;
	goto __44
__44:
	if 0 != 0 {
		goto __43
	}
	goto __45
__45:
	;
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+45360,
		libc.VaList(bp+144, fullFileName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+152, ts+4178, ts+7949, ts+45228,
		ts+45400, uintptr(0)))
	code = TCL_ERROR
	goto done
__42:
	;
	XTcl_DStringAppend(tls, bp+296, pkgGuess, int32((int64(p)-int64(pkgGuess))/1))
__47:
	_objPtr1 = splitPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __50
	}
	XTclFreeObj(tls, _objPtr1)
__50:
	;
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
__36:
	;
__35:
	;

	// Fix the capitalization in the package name so that the first
	// character is in caps (or title case) but the others are all
	// lower-case.

	XTcl_DStringSetLength(tls, bp+296,
		XTcl_UtfToTitle(tls, (*Tcl_DString)(unsafe.Pointer(bp+296)).Fstring))

	// Compute the names of the two initialization functions, based on the
	// package name.

	XTclDStringAppendDString(tls, bp+512, bp+296)
	XTcl_DStringAppend(tls, bp+512, ts+45412, int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)))
	XTclDStringAppendDString(tls, bp+728, bp+296)
	XTcl_DStringAppend(tls, bp+728, ts+45418, int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1)))
	XTclDStringAppendDString(tls, bp+944, bp+296)
	XTcl_DStringAppend(tls, bp+944, ts+45428, int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)))
	XTclDStringAppendDString(tls, bp+1160, bp+296)
	XTcl_DStringAppend(tls, bp+1160, ts+45436, int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1)))

	// Call platform-specific code to load the package and find the two
	// initialization functions.

	*(*uintptr)(unsafe.Pointer(bp + 1616)) = (*Tcl_DString)(unsafe.Pointer(bp + 512)).Fstring
	*(*uintptr)(unsafe.Pointer(bp + 1616 + 1*8)) = uintptr(0)

	code = XTcl_LoadFile(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+1616, flags, bp+1632,
		bp+1640)

	if !(code != TCL_OK) {
		goto __51
	}
	goto done
__51:
	;

	// Create a new record to describe this package.

	pkgPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(LoadedPackage{})))
	len = uint32(libc.Xstrlen(tls, fullFileName) + uint64(1))
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName = XTcl_Alloc(tls, len)
	libc.Xmemcpy(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName, fullFileName, uint64(len))
	len = uint32((*Tcl_DString)(unsafe.Pointer(bp+296)).Flength) + uint32(1)
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName = XTcl_Alloc(tls, len)
	libc.Xmemcpy(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName, (*Tcl_DString)(unsafe.Pointer(bp+296)).Fstring, uint64(len))
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FloadHandle = *(*Tcl_LoadHandle)(unsafe.Pointer(bp + 1640 /* loadHandle */))
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinitProc = *(*uintptr)(unsafe.Pointer(bp + 1632 /* initProc */))
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInitProc = XTcl_FindSymbol(tls, interp, *(*Tcl_LoadHandle)(unsafe.Pointer(bp + 1640 /* loadHandle */)),
		(*Tcl_DString)(unsafe.Pointer(bp+728)).Fstring)
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FunloadProc = XTcl_FindSymbol(tls, interp, *(*Tcl_LoadHandle)(unsafe.Pointer(bp + 1640 /* loadHandle */)),
		(*Tcl_DString)(unsafe.Pointer(bp+944)).Fstring)
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeUnloadProc = XTcl_FindSymbol(tls, interp, *(*Tcl_LoadHandle)(unsafe.Pointer(bp + 1640 /* loadHandle */)),
		(*Tcl_DString)(unsafe.Pointer(bp+1160)).Fstring)
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinterpRefCount = 0
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInterpRefCount = 0

	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr = firstPackagePtr
	firstPackagePtr = pkgPtr

	// The Tcl_FindSymbol calls may have left a spurious error message in
	// the interpreter result.

	XTcl_ResetResult(tls, interp)
__32:
	;

	// Invoke the package's initialization function (either the normal one or
	// the safe one, depending on whether or not the interpreter is safe).

	if !(XTcl_IsSafe(tls, target) != 0) {
		goto __52
	}
	if !((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInitProc == uintptr(0)) {
		goto __54
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+45448, libc.VaList(bp+192, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+200, ts+4178, ts+7949, ts+45228, ts+43185,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__54:
	;
	code = (*struct {
		f func(*libc.TLS, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInitProc})).f(tls, target)
	goto __53
__52:
	if !((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinitProc == uintptr(0)) {
		goto __55
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+45514,
		libc.VaList(bp+240, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+248, ts+4178, ts+7949, ts+45228, ts+45572,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__55:
	;
	code = (*struct {
		f func(*libc.TLS, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinitProc})).f(tls, target)
__53:
	;

	// Test for whether the initialization failed. If so, transfer the error
	// from the target interpreter to the originating one.

	if !(code != TCL_OK) {
		goto __56
	}
	XTcl_TransferResult(tls, target, code, interp)
	goto done
__56:
	;

	// Record the fact that the package has been loaded in the target
	// interpreter.
	//
	// Update the proper reference count.

	if !(XTcl_IsSafe(tls, target) != 0) {
		goto __57
	}
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInterpRefCount++
	goto __58
__57:
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinterpRefCount++
__58:
	;

	// Refetch ipFirstPtr: loading the package may have introduced additional
	// static packages at the head of the linked list!

	ipFirstPtr = XTcl_GetAssocData(tls, target, ts+45305, uintptr(0))
	ipPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(InterpPackage{})))
	(*InterpPackage)(unsafe.Pointer(ipPtr)).FpkgPtr = pkgPtr
	(*InterpPackage)(unsafe.Pointer(ipPtr)).FnextPtr = ipFirstPtr
	XTcl_SetAssocData(tls, target, ts+45305, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr)
	}{sLoadCleanupProc})), ipPtr)

done:
	XTcl_DStringFree(tls, bp+296)
	XTcl_DStringFree(tls, bp+512)
	XTcl_DStringFree(tls, bp+728)
	XTcl_DStringFree(tls, bp+944)
	XTcl_DStringFree(tls, bp+1160)
	XTcl_DStringFree(tls, bp+1376)
	return code
}

var options15 = [4]uintptr{
	ts + 42559, ts + 45583, ts + 16430, uintptr(0),
} /* tclLoad.c:137:23 */

//----------------------------------------------------------------------
//
// Tcl_UnloadObjCmd --
//
//	This function is invoked to process the "unload" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_UnloadObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclLoad.c:531:1: */
	bp := tls.Alloc(720)
	defer tls.Free(720)

	var target uintptr // Which interpreter to unload from.
	var pkgPtr uintptr
	var defaultPtr uintptr
	// var prefix Tcl_DString at bp+288, 216

	// var tmp Tcl_DString at bp+504, 216

	var unloadProc uintptr
	var ipFirstPtr uintptr
	var ipPtr uintptr
	var i int32
	// var index int32 at bp+280, 4

	var code int32
	var complain int32
	var keepLibrary int32
	var trustedRefCount int32
	var safeRefCount int32
	var fullFileName uintptr
	var packageName uintptr
	var childIntName uintptr
	var namesMatch int32
	var filesMatch int32
	var ipPrevPtr uintptr
	complain = 1
	keepLibrary = 0
	trustedRefCount = -1
	safeRefCount = -1
	fullFileName = ts + 2631 /* "" */

	i = 1
__1:
	if !(i < objc) {
		goto __3
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options16)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+280) != TCL_OK) {
		goto __4
	}
	fullFileName = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	if !(int32(*(*int8)(unsafe.Pointer(fullFileName))) == '-') {
		goto __5
	}
	// It looks like the command contains an option so signal an
	// error

	return TCL_ERROR
	goto __6
__5:
	// This clearly isn't an option; assume it's the filename. We
	// must clear the error.

	XTcl_ResetResult(tls, interp)
	goto __3
__6:
	;
__4:
	;
	switch *(*int32)(unsafe.Pointer(bp + 280 /* index */)) {
	case 0 /* UNLOAD_NOCOMPLAIN */ :
		goto __8
	case 1 /* UNLOAD_KEEPLIB */ :
		goto __9
	case 2 /* UNLOAD_LAST */ :
		goto __10
	}
	goto __7
__8: // -nocomplain
	complain = 0
	goto __7
__9: // -keeplibrary
	keepLibrary = 1
	goto __7
__10: // --
	i++
	goto endOfForLoop
__7:
	;
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;
endOfForLoop:
	if !(objc-i < 1 || objc-i > 3) {
		goto __11
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+45589)
	return TCL_ERROR
__11:
	;
	if !(XTcl_FSConvertToPathType(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) != TCL_OK) {
		goto __12
	}
	return TCL_ERROR
__12:
	;

	fullFileName = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	XTcl_DStringInit(tls, bp+288)
	XTcl_DStringInit(tls, bp+504)

	packageName = uintptr(0)
	if !(objc-i >= 2) {
		goto __13
	}
	packageName = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)))
	if !(int32(*(*int8)(unsafe.Pointer(packageName))) == 0) {
		goto __14
	}
	packageName = uintptr(0)
__14:
	;
__13:
	;
	if !(int32(*(*int8)(unsafe.Pointer(fullFileName))) == 0 && packageName == uintptr(0)) {
		goto __15
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+45182, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+45635, ts+45233,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__15:
	;

	// Figure out which interpreter we're going to load the package into.

	target = interp
	if !(objc-i == 3) {
		goto __16
	}
	childIntName = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+2)*8)))

	target = XTcl_GetSlave(tls, interp, childIntName)
	if !(target == uintptr(0)) {
		goto __17
	}
	return TCL_ERROR
__17:
	;
__16:
	;

	// Scan through the packages that are currently loaded to see if the
	// package we want is already loaded. We'll use a loaded package if it
	// meets any of the following conditions:
	//  - Its name and file match the once we're looking for.
	//  - Its file matches, and we weren't given a name.
	//  - Its name matches, the file name was specified as empty, and there is
	//	  only no statically loaded package with the same name.

	defaultPtr = uintptr(0)
	pkgPtr = firstPackagePtr
__18:
	if !(pkgPtr != uintptr(0)) {
		goto __20
	}

	if !(packageName == uintptr(0)) {
		goto __21
	}
	namesMatch = 0
	goto __22
__21:
	XTcl_DStringSetLength(tls, bp+288, 0)
	XTcl_DStringAppend(tls, bp+288, packageName, -1)
	XTcl_DStringSetLength(tls, bp+504, 0)
	XTcl_DStringAppend(tls, bp+504, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName, -1)
	XTcl_UtfToLower(tls, (*Tcl_DString)(unsafe.Pointer(bp+288)).Fstring)
	XTcl_UtfToLower(tls, (*Tcl_DString)(unsafe.Pointer(bp+504)).Fstring)
	if !(libc.Xstrcmp(tls, (*Tcl_DString)(unsafe.Pointer(bp+504)).Fstring,
		(*Tcl_DString)(unsafe.Pointer(bp+288)).Fstring) == 0) {
		goto __23
	}
	namesMatch = 1
	goto __24
__23:
	namesMatch = 0
__24:
	;
__22:
	;
	XTcl_DStringSetLength(tls, bp+288, 0)

	filesMatch = libc.Bool32(libc.Xstrcmp(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName, fullFileName) == 0)
	if !(filesMatch != 0 && (namesMatch != 0 || packageName == uintptr(0))) {
		goto __25
	}
	goto __20
__25:
	;
	if !(namesMatch != 0 && int32(*(*int8)(unsafe.Pointer(fullFileName))) == 0) {
		goto __26
	}
	defaultPtr = pkgPtr
__26:
	;
	if !(filesMatch != 0 && !(namesMatch != 0) && int32(*(*int8)(unsafe.Pointer(fullFileName))) != 0) {
		goto __27
	}
	goto __20
__27:
	;
	goto __19
__19:
	pkgPtr = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr
	goto __18
	goto __20
__20:
	;

	if !(int32(*(*int8)(unsafe.Pointer(fullFileName))) == 0) {
		goto __28
	}
	// It's an error to try unload a static package.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+45642,
		libc.VaList(bp+40, packageName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7949, ts+45635, ts+45699,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__28:
	;
	if !(pkgPtr == uintptr(0)) {
		goto __29
	}
	// The DLL pointed by the provided filename has never been loaded.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+45706, libc.VaList(bp+88, fullFileName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+7949, ts+45635, ts+45738,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__29:
	;

	// Scan through the list of packages already loaded in the target
	// interpreter. If the package we want is already loaded there, then we
	// should proceed with unloading.

	code = TCL_ERROR
	if !(pkgPtr != uintptr(0)) {
		goto __30
	}
	ipFirstPtr = XTcl_GetAssocData(tls, target, ts+45305, uintptr(0))
	ipPtr = ipFirstPtr
__31:
	if !(ipPtr != uintptr(0)) {
		goto __33
	}
	if !((*InterpPackage)(unsafe.Pointer(ipPtr)).FpkgPtr == pkgPtr) {
		goto __34
	}
	code = TCL_OK
	goto __33
__34:
	;
	goto __32
__32:
	ipPtr = (*InterpPackage)(unsafe.Pointer(ipPtr)).FnextPtr
	goto __31
	goto __33
__33:
	;
__30:
	;
	if !(code != TCL_OK) {
		goto __35
	}
	// The package has not been loaded in this interpreter.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+45750,
		libc.VaList(bp+136, fullFileName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+144, ts+4178, ts+7949, ts+45635, ts+45738,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__35:
	;

	// Ensure that the DLL can be unloaded. If it is a trusted interpreter,
	// pkgPtr->unloadProc must not be NULL for the DLL to be unloadable. If
	// the interpreter is a safe one, pkgPtr->safeUnloadProc must be non-NULL.

	if !(XTcl_IsSafe(tls, target) != 0) {
		goto __36
	}
	if !((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeUnloadProc == uintptr(0)) {
		goto __38
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+45802,
		libc.VaList(bp+184, fullFileName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+192, ts+4178, ts+7949, ts+45635, ts+45856,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__38:
	;
	unloadProc = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeUnloadProc
	goto __37
__36:
	if !((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FunloadProc == uintptr(0)) {
		goto __39
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+45863,
		libc.VaList(bp+232, fullFileName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+240, ts+4178, ts+7949, ts+45635, ts+45856,
		uintptr(0)))
	code = TCL_ERROR
	goto done
__39:
	;
	unloadProc = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FunloadProc
__37:
	;

	// We are ready to unload the package. First, evaluate the unload
	// function. If this fails, we cannot proceed with unload. Also, we must
	// specify the proper flag to pass to the unload callback.
	// TCL_UNLOAD_DETACH_FROM_INTERPRETER is defined when the callback should
	// only remove itself from the interpreter; the library will be unloaded
	// in a future call of unload. In case the library will be unloaded just
	// after the callback returns, TCL_UNLOAD_DETACH_FROM_PROCESS is passed.

	code = int32(1) << 0
	if !!(keepLibrary != 0) {
		goto __40
	}

	trustedRefCount = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinterpRefCount
	safeRefCount = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInterpRefCount

	if !(XTcl_IsSafe(tls, target) != 0) {
		goto __41
	}
	safeRefCount--
	goto __42
__41:
	trustedRefCount--
__42:
	;

	if !(safeRefCount <= 0 && trustedRefCount <= 0) {
		goto __43
	}
	code = int32(1) << 1
__43:
	;
__40:
	;
	code = (*struct {
		f func(*libc.TLS, uintptr, int32) int32
	})(unsafe.Pointer(&struct{ uintptr }{unloadProc})).f(tls, target, code)
	if !(code != TCL_OK) {
		goto __44
	}
	XTcl_TransferResult(tls, target, code, interp)
	goto done
__44:
	;

	// The unload function executed fine. Examine the reference count to see
	// if we unload the DLL.

	if !(XTcl_IsSafe(tls, target) != 0) {
		goto __45
	}
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInterpRefCount--

	// Do not let counter get negative.

	if !((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInterpRefCount < 0) {
		goto __47
	}
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInterpRefCount = 0
__47:
	;
	goto __46
__45:
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinterpRefCount--

	// Do not let counter get negative.

	if !((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinterpRefCount < 0) {
		goto __48
	}
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinterpRefCount = 0
__48:
	;
__46:
	;
	trustedRefCount = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinterpRefCount
	safeRefCount = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInterpRefCount

	code = TCL_OK
	if !((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInterpRefCount <= 0 && (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinterpRefCount <= 0 &&
		!(keepLibrary != 0)) {
		goto __49
	}
	// Unload the shared library from the application memory...

	// Some Unix dlls are poorly behaved - registering things like atexit
	// calls that can't be unregistered. If you unload such dlls, you get
	// a core on exit because it wants to call a function in the dll after
	// it's been unloaded.

	if !(int32(*(*int8)(unsafe.Pointer((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName))) != 0) {
		goto __50
	}

	if !(XTcl_FSUnloadFile(tls, interp, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FloadHandle) == TCL_OK) {
		goto __51
	}
	// Remove this library from the loaded library cache.

	defaultPtr = pkgPtr
	if !(defaultPtr == firstPackagePtr) {
		goto __53
	}
	firstPackagePtr = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr
	goto __54
__53:
	pkgPtr = firstPackagePtr
__55:
	if !(pkgPtr != uintptr(0)) {
		goto __57
	}
	if !((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr == defaultPtr) {
		goto __58
	}
	(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr = (*LoadedPackage)(unsafe.Pointer(defaultPtr)).FnextPtr
	goto __57
__58:
	;
	goto __56
__56:
	pkgPtr = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr
	goto __55
	goto __57
__57:
	;
__54:
	;

	// Remove this library from the interpreter's library cache.

	ipFirstPtr = XTcl_GetAssocData(tls, target, ts+45305, uintptr(0))
	ipPtr = ipFirstPtr
	if !((*InterpPackage)(unsafe.Pointer(ipPtr)).FpkgPtr == defaultPtr) {
		goto __59
	}
	ipFirstPtr = (*InterpPackage)(unsafe.Pointer(ipFirstPtr)).FnextPtr
	goto __60
__59:

	ipPrevPtr = ipPtr
__61:
	if !(ipPtr != uintptr(0)) {
		goto __63
	}
	if !((*InterpPackage)(unsafe.Pointer(ipPtr)).FpkgPtr == defaultPtr) {
		goto __64
	}
	(*InterpPackage)(unsafe.Pointer(ipPrevPtr)).FnextPtr = (*InterpPackage)(unsafe.Pointer(ipPtr)).FnextPtr
	goto __63
__64:
	;
	goto __62
__62:
	ipPrevPtr = ipPtr
	ipPtr = (*InterpPackage)(unsafe.Pointer(ipPtr)).FnextPtr
	goto __61
	goto __63
__63:
	;
__60:
	;
	XTcl_SetAssocData(tls, target, ts+45305, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr)
	}{sLoadCleanupProc})),
		ipFirstPtr)
	XTclpFree(tls, (*LoadedPackage)(unsafe.Pointer(defaultPtr)).FfileName)
	XTclpFree(tls, (*LoadedPackage)(unsafe.Pointer(defaultPtr)).FpackageName)
	XTclpFree(tls, defaultPtr)
	XTclpFree(tls, ipPtr)

	goto __52
__51:
	code = TCL_ERROR
__52:
	;
__50:
	;
__49:
	;

done:
	XTcl_DStringFree(tls, bp+288)
	XTcl_DStringFree(tls, bp+504)
	if !(!(complain != 0) && code != TCL_OK) {
		goto __65
	}
	code = TCL_OK
	XTcl_ResetResult(tls, interp)
__65:
	;
	return code
}

var options16 = [4]uintptr{
	ts + 19906, ts + 45920, ts + 16430, uintptr(0),
} /* tclLoad.c:546:23 */

//----------------------------------------------------------------------
//
// Tcl_StaticPackage --
//
//	This function is invoked to indicate that a particular package has
//	been linked statically with an application.
//
// Results:
//	None.
//
// Side effects:
//	Once this function completes, the package becomes loadable via the
//	"load" command with an empty file name.
//
//----------------------------------------------------------------------

func XTcl_StaticPackage(tls *libc.TLS, interp uintptr, prefix uintptr, initProc uintptr, safeInitProc uintptr) { /* tclLoad.c:930:1: */
	var pkgPtr uintptr
	var ipPtr uintptr
	var ipFirstPtr uintptr

	// Check to see if someone else has already reported this package as
	// statically loaded in the process.

	for pkgPtr = firstPackagePtr; pkgPtr != uintptr(0); pkgPtr = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr {
		if (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinitProc == initProc &&
			(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInitProc == safeInitProc &&
			libc.Xstrcmp(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName, prefix) == 0 {
			break
		}
	}

	// If the package is not yet recorded as being loaded statically, add it
	// to the list now.

	if pkgPtr == uintptr(0) {
		pkgPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(LoadedPackage{})))
		(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName = XTcl_Alloc(tls, uint32(1))
		*(*int8)(unsafe.Pointer((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName)) = int8(0)
		(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName = XTcl_Alloc(tls, uint32(libc.Xstrlen(tls, prefix)+uint64(1)))
		libc.Xstrcpy(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName, prefix)
		(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FloadHandle = uintptr(0)
		(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FinitProc = initProc
		(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FsafeInitProc = safeInitProc

		(*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr = firstPackagePtr
		firstPackagePtr = pkgPtr

	}

	if interp != uintptr(0) {

		// If we're loading the package into an interpreter, determine whether
		// it's already loaded.

		ipFirstPtr = XTcl_GetAssocData(tls, interp, ts+45305, uintptr(0))
		for ipPtr = ipFirstPtr; ipPtr != uintptr(0); ipPtr = (*InterpPackage)(unsafe.Pointer(ipPtr)).FnextPtr {
			if (*InterpPackage)(unsafe.Pointer(ipPtr)).FpkgPtr == pkgPtr {
				return
			}
		}

		// Package isn't loade in the current interp yet. Mark it as now being
		// loaded.

		ipPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(InterpPackage{})))
		(*InterpPackage)(unsafe.Pointer(ipPtr)).FpkgPtr = pkgPtr
		(*InterpPackage)(unsafe.Pointer(ipPtr)).FnextPtr = ipFirstPtr
		XTcl_SetAssocData(tls, interp, ts+45305, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr)
		}{sLoadCleanupProc})), ipPtr)
	}
}

//----------------------------------------------------------------------
//
// TclGetLoadedPackages --
//
//	This function returns information about all of the files that are
//	loaded (either in a particular intepreter, or for all interpreters).
//
// Results:
//	The return value is a standard Tcl completion code. If successful, a
//	list of lists is placed in the interp's result. Each sublist
//	corresponds to one loaded file; its first element is the name of the
//	file (or an empty string for something that's statically loaded) and
//	the second element is the name of the package in that file.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetLoadedPackages(tls *libc.TLS, interp uintptr, targetName uintptr) int32 { /* tclLoad.c:1034:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var target uintptr
	var pkgPtr uintptr
	var ipPtr uintptr
	var resultObj uintptr
	// var pkgDesc [2]uintptr at bp, 16

	if targetName == uintptr(0) {
		// Return information about all of the available packages.

		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			resultObj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)
		{
		}

		for pkgPtr = firstPackagePtr; pkgPtr != uintptr(0); pkgPtr = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr {
			*(*uintptr)(unsafe.Pointer(bp)) = XTcl_NewStringObj(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName, -1)
			*(*uintptr)(unsafe.Pointer(bp + 1*8)) = XTcl_NewStringObj(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName, -1)
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
				XTcl_NewListObj(tls, 2, bp))
		}

		XTcl_SetObjResult(tls, interp, resultObj)
		return TCL_OK
	}

	// Return information about only the packages that are loaded in a given
	// interpreter.

	target = XTcl_GetSlave(tls, interp, targetName)
	if target == uintptr(0) {
		return TCL_ERROR
	}
	ipPtr = XTcl_GetAssocData(tls, target, ts+45305, uintptr(0))
	for ok1 := true; ok1; ok1 = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)
	{
	}

	for ; ipPtr != uintptr(0); ipPtr = (*InterpPackage)(unsafe.Pointer(ipPtr)).FnextPtr {
		pkgPtr = (*InterpPackage)(unsafe.Pointer(ipPtr)).FpkgPtr
		*(*uintptr)(unsafe.Pointer(bp)) = XTcl_NewStringObj(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName, -1)
		*(*uintptr)(unsafe.Pointer(bp + 1*8)) = XTcl_NewStringObj(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName, -1)
		XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, XTcl_NewListObj(tls, 2, bp))
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// LoadCleanupProc --
//
//	This function is called to delete all of the InterpPackage structures
//	for an interpreter when the interpreter is deleted. It gets invoked
//	via the Tcl AssocData mechanism.
//
// Results:
//	None.
//
// Side effects:
//	Storage for all of the InterpPackage functions for interp get deleted.
//
//----------------------------------------------------------------------

func sLoadCleanupProc(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclLoad.c:1106:1: */
	var ipPtr uintptr
	var nextPtr uintptr

	ipPtr = clientData
	for ipPtr != uintptr(0) {
		nextPtr = (*InterpPackage)(unsafe.Pointer(ipPtr)).FnextPtr
		XTclpFree(tls, ipPtr)
		ipPtr = nextPtr
	}
}

//----------------------------------------------------------------------
//
// TclFinalizeLoad --
//
//	This function is invoked just before the application exits. It frees
//	all of the LoadedPackage structures.
//
// Results:
//	None.
//
// Side effects:
//	Memory is freed.
//
//----------------------------------------------------------------------

func XTclFinalizeLoad(tls *libc.TLS) { /* tclLoad.c:1139:1: */
	var pkgPtr uintptr

	// No synchronization here because there should just be one thread alive
	// at this point. Logically, packageMutex should be grabbed at this point,
	// but the Mutexes get finalized before the call to this routine. The only
	// subsystem left alive at this point is the memory allocator.

	for firstPackagePtr != uintptr(0) {
		pkgPtr = firstPackagePtr
		firstPackagePtr = (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FnextPtr

		// Some Unix dlls are poorly behaved - registering things like atexit
		// calls that can't be unregistered. If you unload such dlls, you get
		// a core on exit because it wants to call a function in the dll after
		// it has been unloaded.

		if int32(*(*int8)(unsafe.Pointer((*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName))) != 0 {
			XTcl_FSUnloadFile(tls, uintptr(0), (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FloadHandle)
		}

		XTclpFree(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FfileName)
		XTclpFree(tls, (*LoadedPackage)(unsafe.Pointer(pkgPtr)).FpackageName)
		XTclpFree(tls, pkgPtr)
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The default prompt used when the user has not overridden it.

// This file can be compiled on Windows in UNICODE mode, as well as on all
// other platforms using the native encoding. This is done by using the normal
// Windows functions like _tcscmp, but on platforms which don't have <tchar.h>
// we have to translate that to strcmp here.

func sNewNativeObj(tls *libc.TLS, string uintptr) uintptr { /* tclMain.c:46:23: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var ds Tcl_DString at bp, 216

	XTcl_ExternalToUtfDString(tls, uintptr(0), string, -1, bp)
	return XTclDStringToObj(tls, bp)
}

// Declarations for various library functions and variables (don't want to
// include tclPort.h here, because people might copy this file out of the Tcl
// source directory to make their own modified versions).

// The thread-local variables for this file's functions.

type ThreadSpecificData6 = struct {
	Fpath         uintptr
	Fencoding     uintptr
	FmainLoopProc uintptr
} /* tclMain.c:84:3 */

// Structure definition for information used to keep the state of an
// interactive command processor that reads lines from standard input and
// writes prompts and results to standard output.

type PromptType = uint32 /* tclMain.c:96:3 */

type InteractiveState1 = struct {
	Finput       Tcl_Channel
	Ftty         int32
	F__ccgo_pad1 [4]byte
	FcommandPtr  uintptr
	Fprompt      PromptType
	F__ccgo_pad2 [4]byte
	Finterp      uintptr
} /* tclMain.c:98:9 */

type InteractiveState = InteractiveState1 /* tclMain.c:109:3 */

// ----------------------------------------------------------------------
//
// Tcl_Main, Tcl_MainEx --
//
//	Main program for tclsh and most other Tcl-based applications.
//
// Results:
//	None. This function never returns (it exits the process when it's
//	done).
//
// Side effects:
//	This function initializes the Tcl world and then starts interpreting
//	commands; almost anything could happen, depending on the script being
//	interpreted.
//
//----------------------------------------------------------------------

func XTcl_MainEx(tls *libc.TLS, argc int32, argv uintptr, appInitProc uintptr, interp uintptr) { /* tclMain.c:286:1: */
	bp := tls.Alloc(68)
	defer tls.Free(68)

	var path uintptr
	var resultPtr uintptr
	var argvPtr uintptr
	var appName uintptr
	// var encodingName uintptr at bp+8, 8

	var code int32
	var exitCode int32
	var mainLoopProc uintptr
	var chan1 Tcl_Channel
	// var is InteractiveState at bp+24, 40

	var _objPtr uintptr
	var value uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var options uintptr
	var keyPtr uintptr
	// var valuePtr uintptr at bp+16, 8

	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	// var length int32 at bp+64, 4

	var _objPtr7 uintptr
	var _objPtr8 uintptr
	var cmd uintptr
	*(*uintptr)(unsafe.Pointer(bp + 8 /* encodingName */)) = uintptr(0)
	exitCode = 0

	XTclpSetInitialEncodings(tls)
	XTclpFindExecutable(tls, *(*uintptr)(unsafe.Pointer(argv)))

	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finterp = interp
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Fprompt = PROMPT_START
__1:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4
	}
	XTclAllocateFreeObjects(tls)
__4:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2
__2:
	if 0 != 0 {
		goto __1
	}
	goto __3
__3:
	;
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).FtypePtr = uintptr(0)

	// If the application has not already set a startup script, parse the
	// first few command line arguments to determine the script path and
	// encoding.

	if !(uintptr(0) == XTcl_GetStartupScript(tls, uintptr(0))) {
		goto __5
	}
	// Check whether first 3 args (argv[1] - argv[3]) look like
	//  -encoding ENCODING FILENAME
	// or like
	//  FILENAME

	if !(argc > 3 && 0 == libc.Xstrcmp(tls, ts+16536, *(*uintptr)(unsafe.Pointer(argv + 1*8))) &&
		'-' != int32(*(*TCHAR)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 3*8)))))) {
		goto __6
	}
	value = sNewNativeObj(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))
	XTcl_SetStartupScript(tls, sNewNativeObj(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))),
		XTcl_GetString(tls, value))
__8:
	_objPtr = value
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __11
	}
	XTclFreeObj(tls, _objPtr)
__11:
	;
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	argc = argc - 3
	argv += 8 * uintptr(3)
	goto __7
__6:
	if !(argc > 1 && '-' != int32(*(*TCHAR)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 1*8)))))) {
		goto __12
	}
	XTcl_SetStartupScript(tls, sNewNativeObj(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))), uintptr(0))
	argc--
	argv += 8
__12:
	;
__7:
	;
__5:
	;

	path = XTcl_GetStartupScript(tls, bp+8)
	if !(path == uintptr(0)) {
		goto __13
	}
	appName = sNewNativeObj(tls, *(*uintptr)(unsafe.Pointer(argv)))
	goto __14
__13:
	appName = path
__14:
	;
	XTcl_SetVar2Ex(tls, interp, ts+45933, uintptr(0), appName, TCL_GLOBAL_ONLY)
	argc--
	argv += 8

	XTcl_SetVar2Ex(tls, interp, ts+45939, uintptr(0), XTcl_NewIntObj(tls, argc), TCL_GLOBAL_ONLY)

	argvPtr = XTcl_NewListObj(tls, 0, uintptr(0))
__15:
	if !(libc.PostDecInt32(&argc, 1) != 0) {
		goto __16
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), argvPtr, sNewNativeObj(tls, *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&argv, 8)))))
	goto __15
__16:
	;
	XTcl_SetVar2Ex(tls, interp, ts+45944, uintptr(0), argvPtr, TCL_GLOBAL_ONLY)

	// Set the "tcl_interactive" variable.

	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Ftty = libc.Xisatty(tls, 0)
	XTcl_SetVar2Ex(tls, interp, ts+42854, uintptr(0),
		XTcl_NewIntObj(tls, libc.Bool32(!(path != 0) && (*InteractiveState)(unsafe.Pointer(bp+24)).Ftty != 0)), TCL_GLOBAL_ONLY)

	// Invoke application-specific initialization.

	XTcl_Preserve(tls, interp)
	if !((*struct {
		f func(*libc.TLS, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{appInitProc})).f(tls, interp) != TCL_OK) {
		goto __17
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)
	if !(chan1 != 0) {
		goto __18
	}
	XTcl_WriteChars(tls, chan1,
		ts+45949, -1)
	XTcl_WriteObj(tls, chan1, XTcl_GetObjResult(tls, interp))
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__18:
	;
__17:
	;
	if !(XTcl_InterpDeleted(tls, interp) != 0) {
		goto __19
	}
	goto done
__19:
	;
	if !(XTcl_LimitExceeded(tls, interp) != 0) {
		goto __20
	}
	goto done
__20:
	;
	if !(XTclFullFinalizationRequested(tls) != 0) {
		goto __21
	}
	// Arrange for final deletion of the main interp

	// ARGH Munchhausen effect
	XTcl_CreateExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFreeMainInterp})), interp)
__21:
	;

	// Invoke the script specified on the command line, if any. Must fetch it
	// again, as the appInitProc might have reset it.

	path = XTcl_GetStartupScript(tls, bp+8)
	if !(path != uintptr(0)) {
		goto __22
	}
	XTcl_ResetResult(tls, interp)
	code = XTcl_FSEvalFileEx(tls, interp, path, *(*uintptr)(unsafe.Pointer(bp + 8 /* encodingName */)))
	if !(code != TCL_OK) {
		goto __23
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)
	if !(chan1 != 0) {
		goto __24
	}
	options = XTcl_GetReturnOptions(tls, interp, code)

__25:
	;
__28:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __31
	}
	XTclAllocateFreeObjects(tls)
__31:
	;
	keyPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0) {
		goto __32
	}
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = 0
	goto __33
__32:
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes, ts+12560, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes + 10)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
__33:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr = uintptr(0)

	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount++
	XTcl_DictObjGet(tls, uintptr(0), options, keyPtr, bp+16)
__34:
	_objPtr1 = keyPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __37
	}
	XTclFreeObj(tls, _objPtr1)
__37:
	;
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) {
		goto __38
	}
	XTcl_WriteObj(tls, chan1, *(*uintptr)(unsafe.Pointer(bp + 16 /* valuePtr */)))
__38:
	;
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__39:
	_objPtr2 = options
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __42
	}
	XTclFreeObj(tls, _objPtr2)
__42:
	;
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
__24:
	;
	exitCode = 1
__23:
	;
	goto done
__22:
	;

	// We're running interactively. Source a user-specific startup file if the
	// application specified one and if the file exists.

	XTcl_SourceRCFile(tls, interp)
	if !(XTcl_LimitExceeded(tls, interp) != 0) {
		goto __43
	}
	goto done
__43:
	;

	// Process commands from stdin until there's an end-of-file. Note that we
	// need to fetch the standard channels again after every eval, since they
	// may have been changed.

	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount++

	// Get a new value for tty if anyone writes to ::tcl_interactive

	XTcl_LinkVar(tls, interp, ts+42854, bp+24+8, TCL_LINK_BOOLEAN)
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finput = XTcl_GetStdChannel(tls, int32(1)<<1)
__44:
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Finput != uintptr(0) && !(XTcl_InterpDeleted(tls, interp) != 0)) {
		goto __45
	}
	mainLoopProc = XTclGetMainLoop(tls)
	if !(mainLoopProc == uintptr(0)) {
		goto __46
	}

	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Ftty != 0) {
		goto __48
	}
	sPrompt(tls, interp, bp+24)
	if !(XTcl_InterpDeleted(tls, interp) != 0) {
		goto __49
	}
	goto __45
__49:
	;
	if !(XTcl_LimitExceeded(tls, interp) != 0) {
		goto __50
	}
	goto __45
__50:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finput = XTcl_GetStdChannel(tls, int32(1)<<1)
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Finput == uintptr(0)) {
		goto __51
	}
	goto __45
__51:
	;
__48:
	;
	if !((*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount > 1) {
		goto __52
	}
__53:
	_objPtr3 = (*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __56
	}
	XTclFreeObj(tls, _objPtr3)
__56:
	;
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).FcommandPtr = XTcl_DuplicateObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr)
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount++
__52:
	;
	*(*int32)(unsafe.Pointer(bp + 64 /* length */)) = XTcl_GetsObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).Finput, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr)
	if !(*(*int32)(unsafe.Pointer(bp + 64)) < 0) {
		goto __57
	}
	if !(XTcl_InputBlocked(tls, (*InteractiveState)(unsafe.Pointer(bp+24)).Finput) != 0) {
		goto __58
	}
	// This can only happen if stdin has been set to
	// non-blocking. In that case cycle back and try again.
	// This sets up a tight polling loop (since we have no
	// event loop running). If this causes bad CPU hogging, we
	// might try toggling the blocking on stdin instead.

	goto __44
__58:
	;

	// Either EOF, or an error on stdin; we're done

	goto __45
__57:
	;

	// Add the newline removed by Tcl_GetsObj back to the string. Have
	// to add it back before testing completeness, because it can make
	// a difference. [Bug 1775878]

	if !((*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount > 1) {
		goto __59
	}
__60:
	_objPtr4 = (*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __63
	}
	XTclFreeObj(tls, _objPtr4)
__63:
	;
	goto __61
__61:
	if 0 != 0 {
		goto __60
	}
	goto __62
__62:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).FcommandPtr = XTcl_DuplicateObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr)
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount++
__59:
	;
	XTcl_AppendToObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr, ts+935, 1)
	if !!(XTclObjCommandComplete(tls, (*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr) != 0) {
		goto __64
	}
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Fprompt = PROMPT_CONTINUE
	goto __44
__64:
	;

	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Fprompt = PROMPT_START

	// The final newline is syntactically redundant, and causes some
	// error messages troubles deeper in, so lop it back off.

	XTcl_GetStringFromObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr, bp+64)
	XTcl_SetObjLength(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr, libc.PreDecInt32(&*(*int32)(unsafe.Pointer(bp + 64 /* length */)), 1))
	code = XTcl_RecordAndEvalObj(tls, interp, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr,
		TCL_EVAL_GLOBAL)
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finput = XTcl_GetStdChannel(tls, int32(1)<<1)
__65:
	_objPtr5 = (*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __68
	}
	XTclFreeObj(tls, _objPtr5)
__68:
	;
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
__69:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __72
	}
	XTclAllocateFreeObjects(tls)
__72:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __70
__70:
	if 0 != 0 {
		goto __69
	}
	goto __71
__71:
	;
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount++
	if !(code != TCL_OK) {
		goto __73
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)
	if !(chan1 != 0) {
		goto __75
	}
	XTcl_WriteObj(tls, chan1, XTcl_GetObjResult(tls, interp))
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__75:
	;
	goto __74
__73:
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Ftty != 0) {
		goto __76
	}
	resultPtr = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	XTcl_GetStringFromObj(tls, resultPtr, bp+64)
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<2)
	if !(*(*int32)(unsafe.Pointer(bp + 64)) > 0 && chan1 != 0) {
		goto __77
	}
	XTcl_WriteObj(tls, chan1, resultPtr)
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__77:
	;
__78:
	_objPtr6 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __81
	}
	XTclFreeObj(tls, _objPtr6)
__81:
	;
	goto __79
__79:
	if 0 != 0 {
		goto __78
	}
	goto __80
__80:
	;
__76:
	;
__74:
	;
	goto __47
__46: // (mainLoopProc != NULL)
	// If a main loop has been defined while running interactively, we
	// want to start a fileevent based prompt by establishing a
	// channel handler for stdin.

	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Finput != 0) {
		goto __82
	}
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Ftty != 0) {
		goto __83
	}
	sPrompt(tls, interp, bp+24)
__83:
	;

	XTcl_CreateChannelHandler(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).Finput, int32(1)<<1,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sStdinProc})), bp+24 /* &is */)
__82:
	;

	(*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{mainLoopProc})).f(tls)
	XTcl_SetMainLoop(tls, uintptr(0))

	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Finput != 0) {
		goto __84
	}
	XTcl_DeleteChannelHandler(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).Finput, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sStdinProc})), bp+24 /* &is */)
__84:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finput = XTcl_GetStdChannel(tls, int32(1)<<1)
__47:
	;

	// This code here only for the (unsupported and deprecated) [checkmem]
	// command.

	goto __44
__45:
	;

done:
	mainLoopProc = XTclGetMainLoop(tls)
	if !(exitCode == 0 && mainLoopProc != 0 && !(XTcl_LimitExceeded(tls, interp) != 0)) {
		goto __85
	}
	// If everything has gone OK so far, call the main loop proc, if it
	// exists. Packages (like Tk) can set it to start processing events at
	// this point.

	(*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{mainLoopProc})).f(tls)
	XTcl_SetMainLoop(tls, uintptr(0))
__85:
	;
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr != uintptr(0)) {
		goto __86
	}
__87:
	_objPtr7 = (*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __90
	}
	XTclFreeObj(tls, _objPtr7)
__90:
	;
	goto __88
__88:
	if 0 != 0 {
		goto __87
	}
	goto __89
__89:
	;
__86:
	;

	// Rather than calling exit, invoke the "exit" command so that users can
	// replace "exit" with some other command to do additional cleanup on
	// exit. The Tcl_EvalObjEx call should never return.

	if !(!(XTcl_InterpDeleted(tls, interp) != 0) && !(XTcl_LimitExceeded(tls, interp) != 0)) {
		goto __91
	}
	cmd = XTcl_ObjPrintf(tls, ts+45994, libc.VaList(bp, exitCode))

	(*Tcl_Obj)(unsafe.Pointer(cmd)).FrefCount++
	XTcl_EvalObjEx(tls, interp, cmd, TCL_EVAL_GLOBAL)
__92:
	_objPtr8 = cmd
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr8)).FrefCount, 1) <= 1) {
		goto __95
	}
	XTclFreeObj(tls, _objPtr8)
__95:
	;
	goto __93
__93:
	if 0 != 0 {
		goto __92
	}
	goto __94
__94:
	;
__91:
	;

	// If Tcl_EvalObjEx returns, trying to eval [exit], something unusual is
	// happening. Maybe interp has been deleted; maybe [exit] was redefined,
	// maybe we've blown up because of an exceeded limit. We still want to
	// cleanup and exit.

	XTcl_Exit(tls, exitCode)
}

func XTcl_Main(tls *libc.TLS, argc int32, argv uintptr, appInitProc uintptr) { /* tclMain.c:624:1: */
	XTcl_MainEx(tls, argc, argv, appInitProc, XTcl_CreateInterp(tls))
}

//----------------------------------------------------------------------
//
// StdinProc --
//
//	This function is invoked by the event dispatcher whenever standard
//	input becomes readable. It grabs the next line of input characters,
//	adds them to a command being assembled, and executes the command if
//	it's complete.
//
// Results:
//	None.
//
// Side effects:
//	Could be almost arbitrary, depending on the command that's typed.
//
//----------------------------------------------------------------------

// ARGSUSED
func sStdinProc(tls *libc.TLS, clientData ClientData, mask int32) { /* tclMain.c:750:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var code int32
	// var length int32 at bp, 4

	var isPtr uintptr
	var chan1 Tcl_Channel
	var commandPtr uintptr
	var interp uintptr
	var _objPtr uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var resultPtr uintptr
	isPtr = clientData
	chan1 = (*InteractiveState)(unsafe.Pointer(isPtr)).Finput
	commandPtr = (*InteractiveState)(unsafe.Pointer(isPtr)).FcommandPtr
	interp = (*InteractiveState)(unsafe.Pointer(isPtr)).Finterp

	if !((*Tcl_Obj)(unsafe.Pointer(commandPtr)).FrefCount > 1) {
		goto __1
	}
__2:
	_objPtr = commandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __5
	}
	XTclFreeObj(tls, _objPtr)
__5:
	;
	goto __3
__3:
	if 0 != 0 {
		goto __2
	}
	goto __4
__4:
	;
	commandPtr = XTcl_DuplicateObj(tls, commandPtr)
	(*Tcl_Obj)(unsafe.Pointer(commandPtr)).FrefCount++
__1:
	;
	*(*int32)(unsafe.Pointer(bp /* length */)) = XTcl_GetsObj(tls, chan1, commandPtr)
	if !(*(*int32)(unsafe.Pointer(bp)) < 0) {
		goto __6
	}
	if !(XTcl_InputBlocked(tls, chan1) != 0) {
		goto __7
	}
	return
__7:
	;
	if !((*InteractiveState)(unsafe.Pointer(isPtr)).Ftty != 0) {
		goto __8
	}
	// Would be better to find a way to exit the mainLoop? Or perhaps
	// evaluate [exit]? Leaving as is for now due to compatibility
	// concerns.

	XTcl_Exit(tls, 0)
__8:
	;
	XTcl_DeleteChannelHandler(tls, chan1, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sStdinProc})), isPtr)
	return
__6:
	;

	if !((*Tcl_Obj)(unsafe.Pointer(commandPtr)).FrefCount > 1) {
		goto __9
	}
__10:
	_objPtr1 = commandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __13
	}
	XTclFreeObj(tls, _objPtr1)
__13:
	;
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	commandPtr = XTcl_DuplicateObj(tls, commandPtr)
	(*Tcl_Obj)(unsafe.Pointer(commandPtr)).FrefCount++
__9:
	;
	XTcl_AppendToObj(tls, commandPtr, ts+935, 1)
	if !!(XTclObjCommandComplete(tls, commandPtr) != 0) {
		goto __14
	}
	(*InteractiveState)(unsafe.Pointer(isPtr)).Fprompt = PROMPT_CONTINUE
	goto prompt
__14:
	;
	(*InteractiveState)(unsafe.Pointer(isPtr)).Fprompt = PROMPT_START
	XTcl_GetStringFromObj(tls, commandPtr, bp)
	XTcl_SetObjLength(tls, commandPtr, libc.PreDecInt32(&*(*int32)(unsafe.Pointer(bp /* length */)), 1))

	// Disable the stdin channel handler while evaluating the command;
	// otherwise if the command re-enters the event loop we might process
	// commands from stdin before the current command is finished. Among other
	// things, this will trash the text of the command being evaluated.

	XTcl_CreateChannelHandler(tls, chan1, 0, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sStdinProc})), isPtr)
	code = XTcl_RecordAndEvalObj(tls, interp, commandPtr, TCL_EVAL_GLOBAL)
	(*InteractiveState)(unsafe.Pointer(isPtr)).Finput = libc.AssignUintptr(&chan1, XTcl_GetStdChannel(tls, int32(1)<<1))
__15:
	_objPtr2 = commandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __18
	}
	XTclFreeObj(tls, _objPtr2)
__18:
	;
	goto __16
__16:
	if 0 != 0 {
		goto __15
	}
	goto __17
__17:
	;
__19:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __22
	}
	XTclAllocateFreeObjects(tls)
__22:
	;
	commandPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
	(*Tcl_Obj)(unsafe.Pointer(commandPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(commandPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(commandPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(commandPtr)).FtypePtr = uintptr(0)

	(*InteractiveState)(unsafe.Pointer(isPtr)).FcommandPtr = commandPtr
	(*Tcl_Obj)(unsafe.Pointer(commandPtr)).FrefCount++
	if !(chan1 != uintptr(0)) {
		goto __23
	}
	XTcl_CreateChannelHandler(tls, chan1, int32(1)<<1, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sStdinProc})), isPtr)
__23:
	;
	if !(code != TCL_OK) {
		goto __24
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)

	if !(chan1 != uintptr(0)) {
		goto __26
	}
	XTcl_WriteObj(tls, chan1, XTcl_GetObjResult(tls, interp))
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__26:
	;
	goto __25
__24:
	if !((*InteractiveState)(unsafe.Pointer(isPtr)).Ftty != 0) {
		goto __27
	}
	resultPtr = XTcl_GetObjResult(tls, interp)
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<2)

	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	XTcl_GetStringFromObj(tls, resultPtr, bp)
	if !(*(*int32)(unsafe.Pointer(bp)) > 0 && chan1 != uintptr(0)) {
		goto __28
	}
	XTcl_WriteObj(tls, chan1, resultPtr)
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__28:
	;
__29:
	_objPtr3 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __32
	}
	XTclFreeObj(tls, _objPtr3)
__32:
	;
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
__27:
	;
__25:
	;

	// If a tty stdin is still around, output a prompt.

prompt:
	if !((*InteractiveState)(unsafe.Pointer(isPtr)).Ftty != 0 && (*InteractiveState)(unsafe.Pointer(isPtr)).Finput != uintptr(0)) {
		goto __33
	}
	sPrompt(tls, interp, isPtr)
	(*InteractiveState)(unsafe.Pointer(isPtr)).Finput = XTcl_GetStdChannel(tls, int32(1)<<1)
__33:
}

//----------------------------------------------------------------------
//
// Prompt --
//
//	Issue a prompt on standard output, or invoke a script to issue the
//	prompt.
//
// Results:
//	None.
//
// Side effects:
//	A prompt gets output, and a Tcl script may be evaluated in interp.
//
//----------------------------------------------------------------------

func sPrompt(tls *libc.TLS, interp uintptr, isPtr uintptr) { /* tclMain.c:863:1: */
	var promptCmdPtr uintptr
	var code int32
	var chan1 Tcl_Channel

	if !((*InteractiveState)(unsafe.Pointer(isPtr)).Fprompt == PROMPT_NONE) {
		goto __1
	}
	return
__1:
	;

	promptCmdPtr = XTcl_GetVar2Ex(tls, interp,
		func() uintptr {
			if (*InteractiveState)(unsafe.Pointer(isPtr)).Fprompt == PROMPT_CONTINUE {
				return ts + 46002 /* "tcl_prompt2" */
			}
			return ts + 46014 /* "tcl_prompt1" */
		}(),
		uintptr(0), TCL_GLOBAL_ONLY)

	if !(XTcl_InterpDeleted(tls, interp) != 0) {
		goto __2
	}
	return
__2:
	;
	if !(promptCmdPtr == uintptr(0)) {
		goto __3
	}
defaultPrompt:
	if !((*InteractiveState)(unsafe.Pointer(isPtr)).Fprompt == PROMPT_START) {
		goto __5
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<2)
	if !(chan1 != uintptr(0)) {
		goto __6
	}
	XTcl_WriteChars(tls, chan1, ts+46026,
		int32(libc.Xstrlen(tls, ts+46026)))
__6:
	;
__5:
	;
	goto __4
__3:
	code = XTcl_EvalObjEx(tls, interp, promptCmdPtr, TCL_EVAL_GLOBAL)
	if !(code != TCL_OK) {
		goto __7
	}
	XTcl_AddErrorInfo(tls, interp,
		ts+46029)
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)
	if !(chan1 != uintptr(0)) {
		goto __8
	}
	XTcl_WriteObj(tls, chan1, XTcl_GetObjResult(tls, interp))
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__8:
	;
	goto defaultPrompt
__7:
	;
__4:
	;

	chan1 = XTcl_GetStdChannel(tls, int32(1)<<2)
	if !(chan1 != uintptr(0)) {
		goto __9
	}
	XTcl_Flush(tls, chan1)
__9:
	;
	(*InteractiveState)(unsafe.Pointer(isPtr)).Fprompt = PROMPT_NONE
}

//----------------------------------------------------------------------
//
// FreeMainInterp --
//
//	Exit handler used to cleanup the main interpreter and ancillary
//	startup script storage at exit.
//
//----------------------------------------------------------------------

func sFreeMainInterp(tls *libc.TLS, clientData ClientData) { /* tclMain.c:925:1: */
	var interp uintptr = clientData

	//if (TclInExit()) return;

	if !(XTcl_InterpDeleted(tls, interp) != 0) {
		XTcl_DeleteInterp(tls, interp)
	}
	XTcl_SetStartupScript(tls, uintptr(0), uintptr(0))
	XTcl_Release(tls, interp)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

type TCHAR1 = WCHAR    /* winnt.h:349:17 */
type PTCHAR1 = uintptr /* winnt.h:349:24 */
type TBYTE1 = WCHAR    /* winnt.h:350:17 */
type PTBYTE1 = uintptr /* winnt.h:350:24 */

type LPTCH1 = LPWSTR        /* winnt.h:353:18 */
type PTCH1 = LPWSTR         /* winnt.h:353:24 */
type PTSTR1 = LPWSTR        /* winnt.h:354:18 */
type LPTSTR1 = LPWSTR       /* winnt.h:354:24 */
type PCTSTR1 = LPCWSTR      /* winnt.h:355:19 */
type LPCTSTR1 = LPCWSTR     /* winnt.h:355:26 */
type PUTSTR1 = LPUWSTR      /* winnt.h:356:19 */
type LPUTSTR1 = LPUWSTR     /* winnt.h:356:26 */
type PCUTSTR1 = LPCUWSTR    /* winnt.h:357:20 */
type LPCUTSTR1 = LPCUWSTR   /* winnt.h:357:28 */
type LP = LPWSTR            /* winnt.h:358:18 */
type PZZTSTR1 = PZZWSTR     /* winnt.h:359:19 */
type PCZZTSTR1 = PCZZWSTR   /* winnt.h:360:20 */
type PUZZTSTR1 = PUZZWSTR   /* winnt.h:361:20 */
type PCUZZTSTR1 = PCUZZWSTR /* winnt.h:362:21 */
type PZPTSTR1 = PZPWSTR     /* winnt.h:363:19 */
type PNZTCH1 = PNZWCH       /* winnt.h:364:18 */
type PCNZTCH1 = PCNZWCH     /* winnt.h:365:19 */
type PUNZTCH1 = PUNZWCH     /* winnt.h:366:19 */
type PCUNZTCH1 = PCUNZWCH   /* winnt.h:367:20 */

type OSVERSIONINFO1 = OSVERSIONINFOW     /* winnt.h:7950:5 */
type POSVERSIONINFO1 = POSVERSIONINFOW   /* winnt.h:7951:5 */
type LPOSVERSIONINFO1 = LPOSVERSIONINFOW /* winnt.h:7952:5 */

type OSVERSIONINFOEX1 = OSVERSIONINFOEXW     /* winnt.h:7982:5 */
type POSVERSIONINFOEX1 = POSVERSIONINFOEXW   /* winnt.h:7983:5 */
type LPOSVERSIONINFOEX1 = LPOSVERSIONINFOEXW /* winnt.h:7984:5 */

type WIN32_FIND_DATA1 = WIN32_FIND_DATAW     /* minwinbase.h:97:3 */
type PWIN32_FIND_DATA1 = PWIN32_FIND_DATAW   /* minwinbase.h:98:3 */
type LPWIN32_FIND_DATA1 = LPWIN32_FIND_DATAW /* minwinbase.h:99:3 */

type STARTUPINFO1 = STARTUPINFOW     /* processthreadsapi.h:93:3 */
type LPSTARTUPINFO1 = LPSTARTUPINFOW /* processthreadsapi.h:94:3 */

type HW_PROFILE_INFO1 = HW_PROFILE_INFOW     /* winbase.h:2490:3 */
type LPHW_PROFILE_INFO1 = LPHW_PROFILE_INFOW /* winbase.h:2491:3 */

type ACTCTX1 = ACTCTXW   /* winbase.h:2673:3 */
type PACTCTX1 = PACTCTXW /* winbase.h:2674:3 */

type PCACTCTX1 = PCACTCTXW /* winbase.h:2679:3 */

type LOGCOLORSPACE1 = LOGCOLORSPACEW     /* wingdi.h:578:3 */
type LPLOGCOLORSPACE1 = LPLOGCOLORSPACEW /* wingdi.h:579:3 */

type BCHAR1 = WCHAR /* wingdi.h:807:17 */

type TEXTMETRIC1 = TEXTMETRICW     /* wingdi.h:864:3 */
type PTEXTMETRIC1 = PTEXTMETRICW   /* wingdi.h:865:3 */
type NPTEXTMETRIC1 = NPTEXTMETRICW /* wingdi.h:866:3 */
type LPTEXTMETRIC1 = LPTEXTMETRICW /* wingdi.h:867:3 */

type NEWTEXTMETRIC1 = NEWTEXTMETRICW     /* wingdi.h:939:3 */
type PNEWTEXTMETRIC1 = PNEWTEXTMETRICW   /* wingdi.h:940:3 */
type NPNEWTEXTMETRIC1 = NPNEWTEXTMETRICW /* wingdi.h:941:3 */
type LPNEWTEXTMETRIC1 = LPNEWTEXTMETRICW /* wingdi.h:942:3 */

type NEWTEXTMETRICEX1 = NEWTEXTMETRICEXW /* wingdi.h:956:3 */

type LOGFONT1 = LOGFONTW     /* wingdi.h:1077:3 */
type PLOGFONT1 = PLOGFONTW   /* wingdi.h:1078:3 */
type NPLOGFONT1 = NPLOGFONTW /* wingdi.h:1079:3 */
type LPLOGFONT1 = LPLOGFONTW /* wingdi.h:1080:3 */

type ENUMLOGFONT1 = ENUMLOGFONTW     /* wingdi.h:1098:3 */
type LPENUMLOGFONT1 = LPENUMLOGFONTW /* wingdi.h:1099:3 */

type ENUMLOGFONTEX1 = ENUMLOGFONTEXW     /* wingdi.h:1115:3 */
type LPENUMLOGFONTEX1 = LPENUMLOGFONTEXW /* wingdi.h:1116:3 */

type EXTLOGFONT1 = EXTLOGFONTW     /* wingdi.h:1384:3 */
type PEXTLOGFONT1 = PEXTLOGFONTW   /* wingdi.h:1385:3 */
type NPEXTLOGFONT1 = NPEXTLOGFONTW /* wingdi.h:1386:3 */
type LPEXTLOGFONT1 = LPEXTLOGFONTW /* wingdi.h:1387:3 */

type DEVMODE1 = DEVMODEW     /* wingdi.h:1769:3 */
type PDEVMODE1 = PDEVMODEW   /* wingdi.h:1770:3 */
type NPDEVMODE1 = NPDEVMODEW /* wingdi.h:1771:3 */
type LPDEVMODE1 = LPDEVMODEW /* wingdi.h:1772:3 */

type DISPLAY_DEVICE1 = DISPLAY_DEVICEW     /* wingdi.h:2041:3 */
type PDISPLAY_DEVICE1 = PDISPLAY_DEVICEW   /* wingdi.h:2042:3 */
type LPDISPLAY_DEVICE1 = LPDISPLAY_DEVICEW /* wingdi.h:2043:3 */

type OUTLINETEXTMETRIC1 = OUTLINETEXTMETRICW     /* wingdi.h:2525:3 */
type POUTLINETEXTMETRIC1 = POUTLINETEXTMETRICW   /* wingdi.h:2526:3 */
type NPOUTLINETEXTMETRIC1 = NPOUTLINETEXTMETRICW /* wingdi.h:2527:3 */
type LPOUTLINETEXTMETRIC1 = LPOUTLINETEXTMETRICW /* wingdi.h:2528:3 */

type POLYTEXT1 = POLYTEXTW     /* wingdi.h:2553:3 */
type PPOLYTEXT1 = PPOLYTEXTW   /* wingdi.h:2554:3 */
type NPPOLYTEXT1 = NPPOLYTEXTW /* wingdi.h:2555:3 */
type LPPOLYTEXT1 = LPPOLYTEXTW /* wingdi.h:2556:3 */

type GCP_RESULTS1 = GCP_RESULTSW     /* wingdi.h:2679:3 */
type LPGCP_RESULTS1 = LPGCP_RESULTSW /* wingdi.h:2680:3 */

type FONTENUMPROC1 = FONTENUMPROCW /* wingdi.h:2767:3 */

type AXISINFO1 = AXISINFOW     /* wingdi.h:3079:3 */
type PAXISINFO1 = PAXISINFOW   /* wingdi.h:3080:3 */
type LPAXISINFO1 = LPAXISINFOW /* wingdi.h:3081:3 */

type AXESLIST1 = AXESLISTW     /* wingdi.h:3095:3 */
type PAXESLIST1 = PAXESLISTW   /* wingdi.h:3096:3 */
type LPAXESLIST1 = LPAXESLISTW /* wingdi.h:3097:3 */

type ENUMLOGFONTEXDV1 = ENUMLOGFONTEXDVW     /* wingdi.h:3109:3 */
type PENUMLOGFONTEXDV1 = PENUMLOGFONTEXDVW   /* wingdi.h:3110:3 */
type LPENUMLOGFONTEXDV1 = LPENUMLOGFONTEXDVW /* wingdi.h:3111:3 */

type ENUMTEXTMETRIC1 = ENUMTEXTMETRICW     /* wingdi.h:3129:3 */
type PENUMTEXTMETRIC1 = PENUMTEXTMETRICW   /* wingdi.h:3130:3 */
type LPENUMTEXTMETRIC1 = LPENUMTEXTMETRICW /* wingdi.h:3131:3 */

type DOCINFO1 = DOCINFOW     /* wingdi.h:3416:3 */
type LPDOCINFO1 = LPDOCINFOW /* wingdi.h:3417:3 */

type PROPENUMPROC1 = PROPENUMPROCW           /* winuser.h:93:3 */
type PROPENUMPROCEX1 = PROPENUMPROCEXW       /* winuser.h:94:3 */
type EDITWORDBREAKPROC1 = EDITWORDBREAKPROCW /* winuser.h:95:3 */

type WINSTAENUMPROC1 = WINSTAENUMPROCW   /* winuser.h:113:3 */
type DESKTOPENUMPROC1 = DESKTOPENUMPROCW /* winuser.h:114:3 */

type CBT_CREATEWND1 = CBT_CREATEWNDW     /* winuser.h:504:3 */
type LPCBT_CREATEWND1 = LPCBT_CREATEWNDW /* winuser.h:505:3 */

type WNDCLASSEX1 = WNDCLASSEXW     /* winuser.h:913:3 */
type PWNDCLASSEX1 = PWNDCLASSEXW   /* winuser.h:914:3 */
type NPWNDCLASSEX1 = NPWNDCLASSEXW /* winuser.h:915:3 */
type LPWNDCLASSEX1 = LPWNDCLASSEXW /* winuser.h:916:3 */

type WNDCLASS1 = WNDCLASSW     /* winuser.h:944:3 */
type PWNDCLASS1 = PWNDCLASSW   /* winuser.h:945:3 */
type NPWNDCLASS1 = NPWNDCLASSW /* winuser.h:946:3 */
type LPWNDCLASS1 = LPWNDCLASSW /* winuser.h:947:3 */

type CREATESTRUCT1 = CREATESTRUCTW     /* winuser.h:1862:3 */
type LPCREATESTRUCT1 = LPCREATESTRUCTW /* winuser.h:1863:3 */

type MENUITEMINFO1 = MENUITEMINFOW     /* winuser.h:3357:3 */
type LPMENUITEMINFO1 = LPMENUITEMINFOW /* winuser.h:3358:3 */

type LPCMENUITEMINFO1 = LPCMENUITEMINFOW /* winuser.h:3363:3 */

type MSGBOXPARAMS1 = MSGBOXPARAMSW     /* winuser.h:3744:3 */
type PMSGBOXPARAMS1 = PMSGBOXPARAMSW   /* winuser.h:3745:3 */
type LPMSGBOXPARAMS1 = LPMSGBOXPARAMSW /* winuser.h:3746:3 */

type MDICREATESTRUCT1 = MDICREATESTRUCTW     /* winuser.h:4933:3 */
type LPMDICREATESTRUCT1 = LPMDICREATESTRUCTW /* winuser.h:4934:3 */

type MULTIKEYHELP1 = MULTIKEYHELPW     /* winuser.h:4979:3 */
type PMULTIKEYHELP1 = PMULTIKEYHELPW   /* winuser.h:4980:3 */
type LPMULTIKEYHELP1 = LPMULTIKEYHELPW /* winuser.h:4981:3 */

type HELPWININFO1 = HELPWININFOW     /* winuser.h:5003:3 */
type PHELPWININFO1 = PHELPWININFOW   /* winuser.h:5004:3 */
type LPHELPWININFO1 = LPHELPWININFOW /* winuser.h:5005:3 */

type NONCLIENTMETRICS1 = NONCLIENTMETRICSW     /* winuser.h:5450:3 */
type PNONCLIENTMETRICS1 = PNONCLIENTMETRICSW   /* winuser.h:5451:3 */
type LPNONCLIENTMETRICS1 = LPNONCLIENTMETRICSW /* winuser.h:5452:3 */

type ICONMETRICS1 = ICONMETRICSW     /* winuser.h:5498:3 */
type PICONMETRICS1 = PICONMETRICSW   /* winuser.h:5499:3 */
type LPICONMETRICS1 = LPICONMETRICSW /* winuser.h:5500:3 */

type SERIALKEYS1 = SERIALKEYSW     /* winuser.h:5529:3 */
type LPSERIALKEYS1 = LPSERIALKEYSW /* winuser.h:5530:3 */

type HIGHCONTRAST1 = HIGHCONTRASTW     /* winuser.h:5544:3 */
type LPHIGHCONTRAST1 = LPHIGHCONTRASTW /* winuser.h:5545:3 */

type SOUNDSENTRY1 = SOUNDSENTRYW     /* winuser.h:5774:3 */
type LPSOUNDSENTRY1 = LPSOUNDSENTRYW /* winuser.h:5775:3 */

type MONITORINFOEX1 = MONITORINFOEXW     /* winuser.h:5839:3 */
type LPMONITORINFOEX1 = LPMONITORINFOEXW /* winuser.h:5840:3 */

type CPINFOEX1 = CPINFOEXW     /* winnls.h:672:3 */
type LPCPINFOEX1 = LPCPINFOEXW /* winnls.h:673:3 */

type NUMBERFMT1 = NUMBERFMTW     /* winnls.h:692:3 */
type LPNUMBERFMT1 = LPNUMBERFMTW /* winnls.h:693:3 */

type CURRENCYFMT1 = CURRENCYFMTW     /* winnls.h:717:3 */
type LPCURRENCYFMT1 = LPCURRENCYFMTW /* winnls.h:718:3 */

type PVALUE1 = PVALUEW   /* winreg.h:84:3 */
type PPVALUE1 = PPVALUEW /* winreg.h:85:3 */

type VALENT1 = VALENTW   /* winreg.h:116:3 */
type PVALENT1 = PVALENTW /* winreg.h:117:3 */

type NETRESOURCE1 = NETRESOURCEW     /* winnetwk.h:74:3 */
type LPNETRESOURCE1 = LPNETRESOURCEW /* winnetwk.h:75:3 */

type CONNECTDLGSTRUCT1 = CONNECTDLGSTRUCTW     /* winnetwk.h:145:3 */
type LPCONNECTDLGSTRUCT1 = LPCONNECTDLGSTRUCTW /* winnetwk.h:146:3 */

type DISCDLGSTRUCT1 = DISCDLGSTRUCTW     /* winnetwk.h:177:3 */
type LPDISCDLGSTRUCT1 = LPDISCDLGSTRUCTW /* winnetwk.h:178:3 */

type UNIVERSAL_NAME_INFO1 = UNIVERSAL_NAME_INFOW     /* winnetwk.h:212:3 */
type LPUNIVERSAL_NAME_INFO1 = LPUNIVERSAL_NAME_INFOW /* winnetwk.h:213:3 */

type REMOTE_NAME_INFO1 = REMOTE_NAME_INFOW     /* winnetwk.h:227:3 */
type LPREMOTE_NAME_INFO1 = LPREMOTE_NAME_INFOW /* winnetwk.h:228:3 */

type SERVICE_DESCRIPTION1 = SERVICE_DESCRIPTIONW     /* winsvc.h:103:3 */
type LPSERVICE_DESCRIPTION1 = LPSERVICE_DESCRIPTIONW /* winsvc.h:104:3 */

type SERVICE_FAILURE_ACTIONS1 = SERVICE_FAILURE_ACTIONSW     /* winsvc.h:131:3 */
type LPSERVICE_FAILURE_ACTIONS1 = LPSERVICE_FAILURE_ACTIONSW /* winsvc.h:132:3 */

type ENUM_SERVICE_STATUS1 = ENUM_SERVICE_STATUSW     /* winsvc.h:181:3 */
type LPENUM_SERVICE_STATUS1 = LPENUM_SERVICE_STATUSW /* winsvc.h:182:3 */

type ENUM_SERVICE_STATUS_PROCESS1 = ENUM_SERVICE_STATUS_PROCESSW     /* winsvc.h:196:3 */
type LPENUM_SERVICE_STATUS_PROCESS1 = LPENUM_SERVICE_STATUS_PROCESSW /* winsvc.h:197:3 */

type QUERY_SERVICE_LOCK_STATUS1 = QUERY_SERVICE_LOCK_STATUSW     /* winsvc.h:213:3 */
type LPQUERY_SERVICE_LOCK_STATUS1 = LPQUERY_SERVICE_LOCK_STATUSW /* winsvc.h:214:3 */

type QUERY_SERVICE_CONFIG1 = QUERY_SERVICE_CONFIGW     /* winsvc.h:240:3 */
type LPQUERY_SERVICE_CONFIG1 = LPQUERY_SERVICE_CONFIGW /* winsvc.h:241:3 */

type SERVICE_TABLE_ENTRY1 = SERVICE_TABLE_ENTRYW     /* winsvc.h:258:3 */
type LPSERVICE_TABLE_ENTRY1 = LPSERVICE_TABLE_ENTRYW /* winsvc.h:259:3 */

type REGISTERWORD1 = REGISTERWORDW     /* imm.h:60:3 */
type PREGISTERWORD1 = PREGISTERWORDW   /* imm.h:61:3 */
type NPREGISTERWORD1 = NPREGISTERWORDW /* imm.h:62:3 */
type LPREGISTERWORD1 = LPREGISTERWORDW /* imm.h:63:3 */

type STYLEBUF1 = STYLEBUFW     /* imm.h:88:3 */
type PSTYLEBUF1 = PSTYLEBUFW   /* imm.h:89:3 */
type NPSTYLEBUF1 = NPSTYLEBUFW /* imm.h:90:3 */
type LPSTYLEBUF1 = LPSTYLEBUFW /* imm.h:91:3 */

type IMEMENUITEMINFO1 = IMEMENUITEMINFOW     /* imm.h:119:3 */
type PIMEMENUITEMINFO1 = PIMEMENUITEMINFOW   /* imm.h:120:3 */
type NPIMEMENUITEMINFO1 = NPIMEMENUITEMINFOW /* imm.h:121:3 */
type LPIMEMENUITEMINFO1 = LPIMEMENUITEMINFOW /* imm.h:122:3 */

type WSAPROTOCOL_INFO1 = WSAPROTOCOL_INFOW     /* winsock2.h:480:3 */
type LPWSAPROTOCOL_INFO1 = LPWSAPROTOCOL_INFOW /* winsock2.h:481:3 */

type WSAQUERYSET1 = WSAQUERYSETW     /* winsock2.h:755:3 */
type PWSAQUERYSET1 = PWSAQUERYSETW   /* winsock2.h:756:3 */
type LPWSAQUERYSET1 = LPWSAQUERYSETW /* winsock2.h:757:3 */

type WSANSCLASSINFO1 = WSANSCLASSINFOW     /* winsock2.h:821:3 */
type PWSANSCLASSINFO1 = PWSANSCLASSINFOW   /* winsock2.h:822:3 */
type LPWSANSCLASSINFO1 = LPWSANSCLASSINFOW /* winsock2.h:823:3 */

type WSASERVICECLASSINFO1 = WSASERVICECLASSINFOW     /* winsock2.h:839:3 */
type PWSASERVICECLASSINFO1 = PWSASERVICECLASSINFOW   /* winsock2.h:840:3 */
type LPWSASERVICECLASSINFO1 = LPWSASERVICECLASSINFOW /* winsock2.h:841:3 */

type WSANAMESPACE_INFO1 = WSANAMESPACE_INFOW     /* winsock2.h:859:3 */
type PWSANAMESPACE_INFO1 = PWSANAMESPACE_INFOW   /* winsock2.h:860:3 */
type LPWSANAMESPACE_INFO1 = LPWSANAMESPACE_INFOW /* winsock2.h:861:3 */

type ADDRINFOT1 = ADDRINFOW /* ws2tcpip.h:218:35 */
type PADDRINFOT1 = uintptr  /* ws2tcpip.h:218:45 */

type X_TCHAR1 = Wchar_t  /* tchar.h:110:19 */
type X_TSCHAR1 = Wchar_t /* tchar.h:111:19 */
type X_TUCHAR1 = Wchar_t /* tchar.h:112:19 */
type X_TXCHAR1 = Wchar_t /* tchar.h:113:19 */
type X_TINT1 = Wint_t    /* tchar.h:114:18 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The default prompt used when the user has not overridden it.

// This file can be compiled on Windows in UNICODE mode, as well as on all
// other platforms using the native encoding. This is done by using the normal
// Windows functions like _tcscmp, but on platforms which don't have <tchar.h>
// we have to translate that to strcmp here.

func sNewNativeObj1(tls *libc.TLS, string uintptr) uintptr { /* tclMain.c:46:23: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var ds Tcl_DString at bp, 216

	XTcl_WinTCharToUtf(tls, string, -1, bp)
	return XTclDStringToObj(tls, bp)
}

var dataKey5 Tcl_ThreadDataKey /* tclMain.c:121:26: */

//----------------------------------------------------------------------
//
// Tcl_SetStartupScript --
//
//	Sets the path and encoding of the startup script to be evaluated by
//	Tcl_Main, used to override the command line processing.
//
// Results:
//	None.
//
// Side effects:
//
//----------------------------------------------------------------------

func XTcl_SetStartupScript(tls *libc.TLS, path uintptr, encoding uintptr) { /* tclMain.c:140:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey5)), int32(unsafe.Sizeof(ThreadSpecificData6{})))
	var newEncoding uintptr = uintptr(0)

	if encoding != uintptr(0) {
		newEncoding = XTcl_NewStringObj(tls, encoding, -1)
	}

	if (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fpath != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fpath
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fpath = path
	if (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fpath != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fpath)).FrefCount++
	}

	if (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fencoding != uintptr(0) {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fencoding
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fencoding = newEncoding
	if (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fencoding != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer((*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fencoding)).FrefCount++
	}
}

//----------------------------------------------------------------------
//
// Tcl_GetStartupScript --
//
//	Gets the path and encoding of the startup script to be evaluated by
//	Tcl_Main.
//
// Results:
//	The path of the startup script; NULL if none has been set.
//
// Side effects:
//	If encodingPtr is not NULL, stores a (const char *) in it pointing to
//	the encoding name registered for the startup script. Tcl retains
//	ownership of the string, and may free it. Caller should make a copy
//	for long-term use.
//
//----------------------------------------------------------------------

func XTcl_GetStartupScript(tls *libc.TLS, encodingPtr uintptr) uintptr { /* tclMain.c:188:9: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey5)), int32(unsafe.Sizeof(ThreadSpecificData6{})))

	if encodingPtr != uintptr(0) {
		if (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fencoding == uintptr(0) {
			*(*uintptr)(unsafe.Pointer(encodingPtr)) = uintptr(0)
		} else {
			*(*uintptr)(unsafe.Pointer(encodingPtr)) = XTcl_GetString(tls, (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fencoding)
		}
	}
	return (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).Fpath
}

// ----------------------------------------------------------------------
//
// Tcl_SourceRCFile --
//
//	This function is typically invoked by Tcl_Main of Tk_Main function to
//	source an application specific rc file into the interpreter at startup
//	time.
//
// Results:
//	None.
//
// Side effects:
//	Depends on what's in the rc script.
//
//----------------------------------------------------------------------

func XTcl_SourceRCFile(tls *libc.TLS, interp uintptr) { /* tclMain.c:225:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var temp Tcl_DString at bp, 216

	var fileName uintptr
	var chan1 Tcl_Channel

	fileName = XTcl_GetVar2(tls, interp, ts+46065, uintptr(0), TCL_GLOBAL_ONLY)
	if fileName != uintptr(0) {
		var c Tcl_Channel
		var fullName uintptr

		XTcl_DStringInit(tls, bp)
		fullName = XTcl_TranslateFileName(tls, interp, fileName, bp)
		if fullName == uintptr(0) {
			// Couldn't translate the file name (e.g. it referred to a bogus
			// user or there was no HOME environment variable). Just do
			// nothing.
		} else {
			// Test for the existence of the rc file before trying to read it.

			c = XTcl_OpenFileChannel(tls, uintptr(0), fullName, ts+23386, 0)
			if c != uintptr(0) {
				XTcl_Close(tls, uintptr(0), c)
				if XTcl_EvalFile(tls, interp, fullName) != TCL_OK {
					chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)
					if chan1 != 0 {
						XTcl_WriteObj(tls, chan1, XTcl_GetObjResult(tls, interp))
						XTcl_WriteChars(tls, chan1, ts+935, 1)
					}
				}
			}
		}
		XTcl_DStringFree(tls, bp)
	}
}

// ----------------------------------------------------------------------
//
// Tcl_Main, Tcl_MainEx --
//
//	Main program for tclsh and most other Tcl-based applications.
//
// Results:
//	None. This function never returns (it exits the process when it's
//	done).
//
// Side effects:
//	This function initializes the Tcl world and then starts interpreting
//	commands; almost anything could happen, depending on the script being
//	interpreted.
//
//----------------------------------------------------------------------

func XTcl_MainExW(tls *libc.TLS, argc int32, argv uintptr, appInitProc uintptr, interp uintptr) { /* tclMain.c:286:1: */
	bp := tls.Alloc(68)
	defer tls.Free(68)

	var path uintptr
	var resultPtr uintptr
	var argvPtr uintptr
	var appName uintptr
	// var encodingName uintptr at bp+8, 8

	var code int32
	var exitCode int32
	var mainLoopProc uintptr
	var chan1 Tcl_Channel
	// var is InteractiveState at bp+24, 40

	var _objPtr uintptr
	var value uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var options uintptr
	var keyPtr uintptr
	// var valuePtr uintptr at bp+16, 8

	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	// var length int32 at bp+64, 4

	var _objPtr7 uintptr
	var _objPtr8 uintptr
	var cmd uintptr
	*(*uintptr)(unsafe.Pointer(bp + 8 /* encodingName */)) = uintptr(0)
	exitCode = 0

	XTclpSetInitialEncodings(tls)
	XTclpFindExecutable(tls, *(*uintptr)(unsafe.Pointer(argv)))

	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finterp = interp
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Fprompt = PROMPT_START
__1:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __4
	}
	XTclAllocateFreeObjects(tls)
__4:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __2
__2:
	if 0 != 0 {
		goto __1
	}
	goto __3
__3:
	;
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).FtypePtr = uintptr(0)

	// If the application has not already set a startup script, parse the
	// first few command line arguments to determine the script path and
	// encoding.

	if !(uintptr(0) == XTcl_GetStartupScript(tls, uintptr(0))) {
		goto __5
	}
	// Check whether first 3 args (argv[1] - argv[3]) look like
	//  -encoding ENCODING FILENAME
	// or like
	//  FILENAME

	if !(argc > 3 && 0 == libc.Xwcscmp(tls, wtext+158, *(*uintptr)(unsafe.Pointer(argv + 1*8))) &&
		'-' != int32(*(*TCHAR1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 3*8)))))) {
		goto __6
	}
	value = sNewNativeObj1(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))
	XTcl_SetStartupScript(tls, sNewNativeObj1(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))),
		XTcl_GetString(tls, value))
__8:
	_objPtr = value
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __11
	}
	XTclFreeObj(tls, _objPtr)
__11:
	;
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	argc = argc - 3
	argv += 8 * uintptr(3)
	goto __7
__6:
	if !(argc > 1 && '-' != int32(*(*TCHAR1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 1*8)))))) {
		goto __12
	}
	XTcl_SetStartupScript(tls, sNewNativeObj1(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))), uintptr(0))
	argc--
	argv += 8
__12:
	;
__7:
	;
__5:
	;

	path = XTcl_GetStartupScript(tls, bp+8)
	if !(path == uintptr(0)) {
		goto __13
	}
	appName = sNewNativeObj1(tls, *(*uintptr)(unsafe.Pointer(argv)))
	goto __14
__13:
	appName = path
__14:
	;
	XTcl_SetVar2Ex(tls, interp, ts+45933, uintptr(0), appName, TCL_GLOBAL_ONLY)
	argc--
	argv += 8

	XTcl_SetVar2Ex(tls, interp, ts+45939, uintptr(0), XTcl_NewIntObj(tls, argc), TCL_GLOBAL_ONLY)

	argvPtr = XTcl_NewListObj(tls, 0, uintptr(0))
__15:
	if !(libc.PostDecInt32(&argc, 1) != 0) {
		goto __16
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), argvPtr, sNewNativeObj1(tls, *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&argv, 8)))))
	goto __15
__16:
	;
	XTcl_SetVar2Ex(tls, interp, ts+45944, uintptr(0), argvPtr, TCL_GLOBAL_ONLY)

	// Set the "tcl_interactive" variable.

	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Ftty = libc.Xisatty(tls, 0)
	XTcl_SetVar2Ex(tls, interp, ts+42854, uintptr(0),
		XTcl_NewIntObj(tls, libc.Bool32(!(path != 0) && (*InteractiveState)(unsafe.Pointer(bp+24)).Ftty != 0)), TCL_GLOBAL_ONLY)

	// Invoke application-specific initialization.

	XTcl_Preserve(tls, interp)
	if !((*struct {
		f func(*libc.TLS, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{appInitProc})).f(tls, interp) != TCL_OK) {
		goto __17
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)
	if !(chan1 != 0) {
		goto __18
	}
	XTcl_WriteChars(tls, chan1,
		ts+45949, -1)
	XTcl_WriteObj(tls, chan1, XTcl_GetObjResult(tls, interp))
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__18:
	;
__17:
	;
	if !(XTcl_InterpDeleted(tls, interp) != 0) {
		goto __19
	}
	goto done
__19:
	;
	if !(XTcl_LimitExceeded(tls, interp) != 0) {
		goto __20
	}
	goto done
__20:
	;
	if !(XTclFullFinalizationRequested(tls) != 0) {
		goto __21
	}
	// Arrange for final deletion of the main interp

	// ARGH Munchhausen effect
	XTcl_CreateExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFreeMainInterp})), interp)
__21:
	;

	// Invoke the script specified on the command line, if any. Must fetch it
	// again, as the appInitProc might have reset it.

	path = XTcl_GetStartupScript(tls, bp+8)
	if !(path != uintptr(0)) {
		goto __22
	}
	XTcl_ResetResult(tls, interp)
	code = XTcl_FSEvalFileEx(tls, interp, path, *(*uintptr)(unsafe.Pointer(bp + 8 /* encodingName */)))
	if !(code != TCL_OK) {
		goto __23
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)
	if !(chan1 != 0) {
		goto __24
	}
	options = XTcl_GetReturnOptions(tls, interp, code)

__25:
	;
__28:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __31
	}
	XTclAllocateFreeObjects(tls)
__31:
	;
	keyPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0) {
		goto __32
	}
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = 0
	goto __33
__32:
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes, ts+12560, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(keyPtr)).Fbytes + 10)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
__33:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FtypePtr = uintptr(0)

	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount++
	XTcl_DictObjGet(tls, uintptr(0), options, keyPtr, bp+16)
__34:
	_objPtr1 = keyPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __37
	}
	XTclFreeObj(tls, _objPtr1)
__37:
	;
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) {
		goto __38
	}
	XTcl_WriteObj(tls, chan1, *(*uintptr)(unsafe.Pointer(bp + 16 /* valuePtr */)))
__38:
	;
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__39:
	_objPtr2 = options
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __42
	}
	XTclFreeObj(tls, _objPtr2)
__42:
	;
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
__24:
	;
	exitCode = 1
__23:
	;
	goto done
__22:
	;

	// We're running interactively. Source a user-specific startup file if the
	// application specified one and if the file exists.

	XTcl_SourceRCFile(tls, interp)
	if !(XTcl_LimitExceeded(tls, interp) != 0) {
		goto __43
	}
	goto done
__43:
	;

	// Process commands from stdin until there's an end-of-file. Note that we
	// need to fetch the standard channels again after every eval, since they
	// may have been changed.

	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount++

	// Get a new value for tty if anyone writes to ::tcl_interactive

	XTcl_LinkVar(tls, interp, ts+42854, bp+24+8, TCL_LINK_BOOLEAN)
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finput = XTcl_GetStdChannel(tls, int32(1)<<1)
__44:
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Finput != uintptr(0) && !(XTcl_InterpDeleted(tls, interp) != 0)) {
		goto __45
	}
	mainLoopProc = XTclGetMainLoop(tls)
	if !(mainLoopProc == uintptr(0)) {
		goto __46
	}

	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Ftty != 0) {
		goto __48
	}
	sPrompt(tls, interp, bp+24)
	if !(XTcl_InterpDeleted(tls, interp) != 0) {
		goto __49
	}
	goto __45
__49:
	;
	if !(XTcl_LimitExceeded(tls, interp) != 0) {
		goto __50
	}
	goto __45
__50:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finput = XTcl_GetStdChannel(tls, int32(1)<<1)
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Finput == uintptr(0)) {
		goto __51
	}
	goto __45
__51:
	;
__48:
	;
	if !((*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount > 1) {
		goto __52
	}
__53:
	_objPtr3 = (*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __56
	}
	XTclFreeObj(tls, _objPtr3)
__56:
	;
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).FcommandPtr = XTcl_DuplicateObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr)
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount++
__52:
	;
	*(*int32)(unsafe.Pointer(bp + 64 /* length */)) = XTcl_GetsObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).Finput, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr)
	if !(*(*int32)(unsafe.Pointer(bp + 64)) < 0) {
		goto __57
	}
	if !(XTcl_InputBlocked(tls, (*InteractiveState)(unsafe.Pointer(bp+24)).Finput) != 0) {
		goto __58
	}
	// This can only happen if stdin has been set to
	// non-blocking. In that case cycle back and try again.
	// This sets up a tight polling loop (since we have no
	// event loop running). If this causes bad CPU hogging, we
	// might try toggling the blocking on stdin instead.

	goto __44
__58:
	;

	// Either EOF, or an error on stdin; we're done

	goto __45
__57:
	;

	// Add the newline removed by Tcl_GetsObj back to the string. Have
	// to add it back before testing completeness, because it can make
	// a difference. [Bug 1775878]

	if !((*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount > 1) {
		goto __59
	}
__60:
	_objPtr4 = (*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __63
	}
	XTclFreeObj(tls, _objPtr4)
__63:
	;
	goto __61
__61:
	if 0 != 0 {
		goto __60
	}
	goto __62
__62:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).FcommandPtr = XTcl_DuplicateObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr)
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount++
__59:
	;
	XTcl_AppendToObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr, ts+935, 1)
	if !!(XTclObjCommandComplete(tls, (*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr) != 0) {
		goto __64
	}
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Fprompt = PROMPT_CONTINUE
	goto __44
__64:
	;

	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Fprompt = PROMPT_START

	// The final newline is syntactically redundant, and causes some
	// error messages troubles deeper in, so lop it back off.

	XTcl_GetStringFromObj(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr, bp+64)
	XTcl_SetObjLength(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr, libc.PreDecInt32(&*(*int32)(unsafe.Pointer(bp + 64 /* length */)), 1))
	code = XTcl_RecordAndEvalObj(tls, interp, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).FcommandPtr,
		TCL_EVAL_GLOBAL)
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finput = XTcl_GetStdChannel(tls, int32(1)<<1)
__65:
	_objPtr5 = (*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __68
	}
	XTclFreeObj(tls, _objPtr5)
__68:
	;
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
__69:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __72
	}
	XTclAllocateFreeObjects(tls)
__72:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __70
__70:
	if 0 != 0 {
		goto __69
	}
	goto __71
__71:
	;
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr)).FrefCount++
	if !(code != TCL_OK) {
		goto __73
	}
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<3)
	if !(chan1 != 0) {
		goto __75
	}
	XTcl_WriteObj(tls, chan1, XTcl_GetObjResult(tls, interp))
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__75:
	;
	goto __74
__73:
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Ftty != 0) {
		goto __76
	}
	resultPtr = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	XTcl_GetStringFromObj(tls, resultPtr, bp+64)
	chan1 = XTcl_GetStdChannel(tls, int32(1)<<2)
	if !(*(*int32)(unsafe.Pointer(bp + 64)) > 0 && chan1 != 0) {
		goto __77
	}
	XTcl_WriteObj(tls, chan1, resultPtr)
	XTcl_WriteChars(tls, chan1, ts+935, 1)
__77:
	;
__78:
	_objPtr6 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __81
	}
	XTclFreeObj(tls, _objPtr6)
__81:
	;
	goto __79
__79:
	if 0 != 0 {
		goto __78
	}
	goto __80
__80:
	;
__76:
	;
__74:
	;
	goto __47
__46: // (mainLoopProc != NULL)
	// If a main loop has been defined while running interactively, we
	// want to start a fileevent based prompt by establishing a
	// channel handler for stdin.

	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Finput != 0) {
		goto __82
	}
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Ftty != 0) {
		goto __83
	}
	sPrompt(tls, interp, bp+24)
__83:
	;

	XTcl_CreateChannelHandler(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).Finput, int32(1)<<1,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sStdinProc})), bp+24 /* &is */)
__82:
	;

	(*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{mainLoopProc})).f(tls)
	XTcl_SetMainLoop(tls, uintptr(0))

	if !((*InteractiveState)(unsafe.Pointer(bp+24)).Finput != 0) {
		goto __84
	}
	XTcl_DeleteChannelHandler(tls, (*InteractiveState)(unsafe.Pointer(bp+24 /* &is */)).Finput, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sStdinProc})), bp+24 /* &is */)
__84:
	;
	(*InteractiveState)(unsafe.Pointer(bp + 24 /* &is */)).Finput = XTcl_GetStdChannel(tls, int32(1)<<1)
__47:
	;

	// This code here only for the (unsupported and deprecated) [checkmem]
	// command.

	goto __44
__45:
	;

done:
	mainLoopProc = XTclGetMainLoop(tls)
	if !(exitCode == 0 && mainLoopProc != 0 && !(XTcl_LimitExceeded(tls, interp) != 0)) {
		goto __85
	}
	// If everything has gone OK so far, call the main loop proc, if it
	// exists. Packages (like Tk) can set it to start processing events at
	// this point.

	(*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{mainLoopProc})).f(tls)
	XTcl_SetMainLoop(tls, uintptr(0))
__85:
	;
	if !((*InteractiveState)(unsafe.Pointer(bp+24)).FcommandPtr != uintptr(0)) {
		goto __86
	}
__87:
	_objPtr7 = (*InteractiveState)(unsafe.Pointer(bp + 24)).FcommandPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr7)).FrefCount, 1) <= 1) {
		goto __90
	}
	XTclFreeObj(tls, _objPtr7)
__90:
	;
	goto __88
__88:
	if 0 != 0 {
		goto __87
	}
	goto __89
__89:
	;
__86:
	;

	// Rather than calling exit, invoke the "exit" command so that users can
	// replace "exit" with some other command to do additional cleanup on
	// exit. The Tcl_EvalObjEx call should never return.

	if !(!(XTcl_InterpDeleted(tls, interp) != 0) && !(XTcl_LimitExceeded(tls, interp) != 0)) {
		goto __91
	}
	cmd = XTcl_ObjPrintf(tls, ts+45994, libc.VaList(bp, exitCode))

	(*Tcl_Obj)(unsafe.Pointer(cmd)).FrefCount++
	XTcl_EvalObjEx(tls, interp, cmd, TCL_EVAL_GLOBAL)
__92:
	_objPtr8 = cmd
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr8)).FrefCount, 1) <= 1) {
		goto __95
	}
	XTclFreeObj(tls, _objPtr8)
__95:
	;
	goto __93
__93:
	if 0 != 0 {
		goto __92
	}
	goto __94
__94:
	;
__91:
	;

	// If Tcl_EvalObjEx returns, trying to eval [exit], something unusual is
	// happening. Maybe interp has been deleted; maybe [exit] was redefined,
	// maybe we've blown up because of an exceeded limit. We still want to
	// cleanup and exit.

	XTcl_Exit(tls, exitCode)
}

//---------------------------------------------------------------
//
// Tcl_SetMainLoop --
//
//	Sets an alternative main loop function.
//
// Results:
//	None.
//
// Side effects:
//	This function will be called before Tcl exits, allowing for the
//	creation of an event loop.
//
//---------------------------------------------------------------

func XTcl_SetMainLoop(tls *libc.TLS, proc uintptr) { /* tclMain.c:656:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey5)), int32(unsafe.Sizeof(ThreadSpecificData6{})))

	(*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).FmainLoopProc = proc
}

//---------------------------------------------------------------
//
// TclGetMainLoop --
//
//	Returns the current alternative main loop function.
//
// Results:
//	Returns the previously defined main loop function, or NULL to indicate
//	that no such function has been installed and standard tclsh behaviour
//	(i.e., exit once the script is evaluated if not interactive) is
//	requested..
//
// Side effects:
//	None (other than possible creation of this file's TSD block).
//
//---------------------------------------------------------------

func XTclGetMainLoop(tls *libc.TLS) uintptr { /* tclMain.c:683:18: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey5)), int32(unsafe.Sizeof(ThreadSpecificData6{})))

	return (*ThreadSpecificData6)(unsafe.Pointer(tsdPtr)).FmainLoopProc
}

//----------------------------------------------------------------------
//
// TclFullFinalizationRequested --
//
//	This function returns true when either -DPURIFY is specified, or the
//	environment variable TCL_FINALIZE_ON_EXIT is set and not "0". This
//	predicate is called at places affecting the exit sequence, so that the
//	default behavior is a fast and deadlock-free exit, and the modified
//	behavior is a more thorough finalization for debugging purposes (leak
//	hunting etc).
//
// Results:
//	A boolean.
//
//----------------------------------------------------------------------

func XTclFullFinalizationRequested(tls *libc.TLS) int32 { /* tclMain.c:710:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var fin uintptr
	// var ds Tcl_DString at bp, 216

	var finalize int32 = 0

	fin = XTclGetEnv(tls, ts+46080, bp)
	finalize = libc.Bool32(fin != uintptr(0) && libc.Xstrcmp(tls, fin, ts+18935) != 0)
	if fin != uintptr(0) {
		XTcl_DStringFree(tls, bp)
	}
	return finalize
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

type TCHAR2 = int8     /* winnt.h:373:16 */
type PTCHAR2 = uintptr /* winnt.h:373:23 */
type TBYTE2 = uint8    /* winnt.h:374:25 */
type PTBYTE2 = uintptr /* winnt.h:374:32 */

type LPTCH2 = LPSTR       /* winnt.h:377:17 */
type PTCH2 = LPSTR        /* winnt.h:377:23 */
type PTSTR2 = LPSTR       /* winnt.h:379:17 */
type LPTSTR2 = LPSTR      /* winnt.h:379:23 */
type PUTSTR2 = LPSTR      /* winnt.h:379:30 */
type LPUTSTR2 = LPSTR     /* winnt.h:379:37 */
type PCTSTR2 = LPCSTR     /* winnt.h:380:18 */
type LPCTSTR2 = LPCSTR    /* winnt.h:380:25 */
type PCUTSTR2 = LPCSTR    /* winnt.h:380:33 */
type LPCUTSTR2 = LPCSTR   /* winnt.h:380:41 */
type PZZTSTR2 = PZZSTR    /* winnt.h:381:18 */
type PUZZTSTR2 = PZZSTR   /* winnt.h:381:27 */
type PCZZTSTR2 = PCZZSTR  /* winnt.h:382:19 */
type PCUZZTSTR2 = PCZZSTR /* winnt.h:382:29 */
type PZPTSTR2 = PZPSTR    /* winnt.h:383:18 */
type PNZTCH2 = PNZCH      /* winnt.h:384:17 */
type PUNZTCH2 = PNZCH     /* winnt.h:384:25 */
type PCNZTCH2 = PCNZCH    /* winnt.h:385:18 */
type PCUNZTCH2 = PCNZCH   /* winnt.h:385:27 */

type OSVERSIONINFO2 = OSVERSIONINFOA     /* winnt.h:7950:5 */
type POSVERSIONINFO2 = POSVERSIONINFOA   /* winnt.h:7951:5 */
type LPOSVERSIONINFO2 = LPOSVERSIONINFOA /* winnt.h:7952:5 */

type OSVERSIONINFOEX2 = OSVERSIONINFOEXA     /* winnt.h:7982:5 */
type POSVERSIONINFOEX2 = POSVERSIONINFOEXA   /* winnt.h:7983:5 */
type LPOSVERSIONINFOEX2 = LPOSVERSIONINFOEXA /* winnt.h:7984:5 */

type WIN32_FIND_DATA2 = WIN32_FIND_DATAA     /* minwinbase.h:97:3 */
type PWIN32_FIND_DATA2 = PWIN32_FIND_DATAA   /* minwinbase.h:98:3 */
type LPWIN32_FIND_DATA2 = LPWIN32_FIND_DATAA /* minwinbase.h:99:3 */

type STARTUPINFO2 = STARTUPINFOA     /* processthreadsapi.h:93:3 */
type LPSTARTUPINFO2 = LPSTARTUPINFOA /* processthreadsapi.h:94:3 */

type HW_PROFILE_INFO2 = HW_PROFILE_INFOA     /* winbase.h:2490:3 */
type LPHW_PROFILE_INFO2 = LPHW_PROFILE_INFOA /* winbase.h:2491:3 */

type ACTCTX2 = ACTCTXA   /* winbase.h:2673:3 */
type PACTCTX2 = PACTCTXA /* winbase.h:2674:3 */

type PCACTCTX2 = PCACTCTXA /* winbase.h:2679:3 */

type LOGCOLORSPACE2 = LOGCOLORSPACEA     /* wingdi.h:578:3 */
type LPLOGCOLORSPACE2 = LPLOGCOLORSPACEA /* wingdi.h:579:3 */

type BCHAR2 = BYTE /* wingdi.h:809:16 */

type TEXTMETRIC2 = TEXTMETRICA     /* wingdi.h:864:3 */
type PTEXTMETRIC2 = PTEXTMETRICA   /* wingdi.h:865:3 */
type NPTEXTMETRIC2 = NPTEXTMETRICA /* wingdi.h:866:3 */
type LPTEXTMETRIC2 = LPTEXTMETRICA /* wingdi.h:867:3 */

type NEWTEXTMETRIC2 = NEWTEXTMETRICA     /* wingdi.h:939:3 */
type PNEWTEXTMETRIC2 = PNEWTEXTMETRICA   /* wingdi.h:940:3 */
type NPNEWTEXTMETRIC2 = NPNEWTEXTMETRICA /* wingdi.h:941:3 */
type LPNEWTEXTMETRIC2 = LPNEWTEXTMETRICA /* wingdi.h:942:3 */

type NEWTEXTMETRICEX2 = NEWTEXTMETRICEXA /* wingdi.h:956:3 */

type LOGFONT2 = LOGFONTA     /* wingdi.h:1077:3 */
type PLOGFONT2 = PLOGFONTA   /* wingdi.h:1078:3 */
type NPLOGFONT2 = NPLOGFONTA /* wingdi.h:1079:3 */
type LPLOGFONT2 = LPLOGFONTA /* wingdi.h:1080:3 */

type ENUMLOGFONT2 = ENUMLOGFONTA     /* wingdi.h:1098:3 */
type LPENUMLOGFONT2 = LPENUMLOGFONTA /* wingdi.h:1099:3 */

type ENUMLOGFONTEX2 = ENUMLOGFONTEXA     /* wingdi.h:1115:3 */
type LPENUMLOGFONTEX2 = LPENUMLOGFONTEXA /* wingdi.h:1116:3 */

type EXTLOGFONT2 = EXTLOGFONTA     /* wingdi.h:1384:3 */
type PEXTLOGFONT2 = PEXTLOGFONTA   /* wingdi.h:1385:3 */
type NPEXTLOGFONT2 = NPEXTLOGFONTA /* wingdi.h:1386:3 */
type LPEXTLOGFONT2 = LPEXTLOGFONTA /* wingdi.h:1387:3 */

type DEVMODE2 = DEVMODEA     /* wingdi.h:1769:3 */
type PDEVMODE2 = PDEVMODEA   /* wingdi.h:1770:3 */
type NPDEVMODE2 = NPDEVMODEA /* wingdi.h:1771:3 */
type LPDEVMODE2 = LPDEVMODEA /* wingdi.h:1772:3 */

type DISPLAY_DEVICE2 = DISPLAY_DEVICEA     /* wingdi.h:2041:3 */
type PDISPLAY_DEVICE2 = PDISPLAY_DEVICEA   /* wingdi.h:2042:3 */
type LPDISPLAY_DEVICE2 = LPDISPLAY_DEVICEA /* wingdi.h:2043:3 */

type OUTLINETEXTMETRIC2 = OUTLINETEXTMETRICA     /* wingdi.h:2525:3 */
type POUTLINETEXTMETRIC2 = POUTLINETEXTMETRICA   /* wingdi.h:2526:3 */
type NPOUTLINETEXTMETRIC2 = NPOUTLINETEXTMETRICA /* wingdi.h:2527:3 */
type LPOUTLINETEXTMETRIC2 = LPOUTLINETEXTMETRICA /* wingdi.h:2528:3 */

type POLYTEXT2 = POLYTEXTA     /* wingdi.h:2553:3 */
type PPOLYTEXT2 = PPOLYTEXTA   /* wingdi.h:2554:3 */
type NPPOLYTEXT2 = NPPOLYTEXTA /* wingdi.h:2555:3 */
type LPPOLYTEXT2 = LPPOLYTEXTA /* wingdi.h:2556:3 */

type GCP_RESULTS2 = GCP_RESULTSA     /* wingdi.h:2679:3 */
type LPGCP_RESULTS2 = LPGCP_RESULTSA /* wingdi.h:2680:3 */

type FONTENUMPROC2 = FONTENUMPROCA /* wingdi.h:2767:3 */

type AXISINFO2 = AXISINFOA     /* wingdi.h:3079:3 */
type PAXISINFO2 = PAXISINFOA   /* wingdi.h:3080:3 */
type LPAXISINFO2 = LPAXISINFOA /* wingdi.h:3081:3 */

type AXESLIST2 = AXESLISTA     /* wingdi.h:3095:3 */
type PAXESLIST2 = PAXESLISTA   /* wingdi.h:3096:3 */
type LPAXESLIST2 = LPAXESLISTA /* wingdi.h:3097:3 */

type ENUMLOGFONTEXDV2 = ENUMLOGFONTEXDVA     /* wingdi.h:3109:3 */
type PENUMLOGFONTEXDV2 = PENUMLOGFONTEXDVA   /* wingdi.h:3110:3 */
type LPENUMLOGFONTEXDV2 = LPENUMLOGFONTEXDVA /* wingdi.h:3111:3 */

type ENUMTEXTMETRIC2 = ENUMTEXTMETRICA     /* wingdi.h:3129:3 */
type PENUMTEXTMETRIC2 = PENUMTEXTMETRICA   /* wingdi.h:3130:3 */
type LPENUMTEXTMETRIC2 = LPENUMTEXTMETRICA /* wingdi.h:3131:3 */

type DOCINFO2 = DOCINFOA     /* wingdi.h:3416:3 */
type LPDOCINFO2 = LPDOCINFOA /* wingdi.h:3417:3 */

type PROPENUMPROC2 = PROPENUMPROCA           /* winuser.h:93:3 */
type PROPENUMPROCEX2 = PROPENUMPROCEXA       /* winuser.h:94:3 */
type EDITWORDBREAKPROC2 = EDITWORDBREAKPROCA /* winuser.h:95:3 */

type WINSTAENUMPROC2 = WINSTAENUMPROCA   /* winuser.h:113:3 */
type DESKTOPENUMPROC2 = DESKTOPENUMPROCA /* winuser.h:114:3 */

type CBT_CREATEWND2 = CBT_CREATEWNDA     /* winuser.h:504:3 */
type LPCBT_CREATEWND2 = LPCBT_CREATEWNDA /* winuser.h:505:3 */

type WNDCLASSEX2 = WNDCLASSEXA     /* winuser.h:913:3 */
type PWNDCLASSEX2 = PWNDCLASSEXA   /* winuser.h:914:3 */
type NPWNDCLASSEX2 = NPWNDCLASSEXA /* winuser.h:915:3 */
type LPWNDCLASSEX2 = LPWNDCLASSEXA /* winuser.h:916:3 */

type WNDCLASS2 = WNDCLASSA     /* winuser.h:944:3 */
type PWNDCLASS2 = PWNDCLASSA   /* winuser.h:945:3 */
type NPWNDCLASS2 = NPWNDCLASSA /* winuser.h:946:3 */
type LPWNDCLASS2 = LPWNDCLASSA /* winuser.h:947:3 */

type CREATESTRUCT2 = CREATESTRUCTA     /* winuser.h:1862:3 */
type LPCREATESTRUCT2 = LPCREATESTRUCTA /* winuser.h:1863:3 */

type MENUITEMINFO2 = MENUITEMINFOA     /* winuser.h:3357:3 */
type LPMENUITEMINFO2 = LPMENUITEMINFOA /* winuser.h:3358:3 */

type LPCMENUITEMINFO2 = LPCMENUITEMINFOA /* winuser.h:3363:3 */

type MSGBOXPARAMS2 = MSGBOXPARAMSA     /* winuser.h:3744:3 */
type PMSGBOXPARAMS2 = PMSGBOXPARAMSA   /* winuser.h:3745:3 */
type LPMSGBOXPARAMS2 = LPMSGBOXPARAMSA /* winuser.h:3746:3 */

type MDICREATESTRUCT2 = MDICREATESTRUCTA     /* winuser.h:4933:3 */
type LPMDICREATESTRUCT2 = LPMDICREATESTRUCTA /* winuser.h:4934:3 */

type MULTIKEYHELP2 = MULTIKEYHELPA     /* winuser.h:4979:3 */
type PMULTIKEYHELP2 = PMULTIKEYHELPA   /* winuser.h:4980:3 */
type LPMULTIKEYHELP2 = LPMULTIKEYHELPA /* winuser.h:4981:3 */

type HELPWININFO2 = HELPWININFOA     /* winuser.h:5003:3 */
type PHELPWININFO2 = PHELPWININFOA   /* winuser.h:5004:3 */
type LPHELPWININFO2 = LPHELPWININFOA /* winuser.h:5005:3 */

type NONCLIENTMETRICS2 = NONCLIENTMETRICSA     /* winuser.h:5450:3 */
type PNONCLIENTMETRICS2 = PNONCLIENTMETRICSA   /* winuser.h:5451:3 */
type LPNONCLIENTMETRICS2 = LPNONCLIENTMETRICSA /* winuser.h:5452:3 */

type ICONMETRICS2 = ICONMETRICSA     /* winuser.h:5498:3 */
type PICONMETRICS2 = PICONMETRICSA   /* winuser.h:5499:3 */
type LPICONMETRICS2 = LPICONMETRICSA /* winuser.h:5500:3 */

type SERIALKEYS2 = SERIALKEYSA     /* winuser.h:5529:3 */
type LPSERIALKEYS2 = LPSERIALKEYSA /* winuser.h:5530:3 */

type HIGHCONTRAST2 = HIGHCONTRASTA     /* winuser.h:5544:3 */
type LPHIGHCONTRAST2 = LPHIGHCONTRASTA /* winuser.h:5545:3 */

type SOUNDSENTRY2 = SOUNDSENTRYA     /* winuser.h:5774:3 */
type LPSOUNDSENTRY2 = LPSOUNDSENTRYA /* winuser.h:5775:3 */

type MONITORINFOEX2 = MONITORINFOEXA     /* winuser.h:5839:3 */
type LPMONITORINFOEX2 = LPMONITORINFOEXA /* winuser.h:5840:3 */

type CPINFOEX2 = CPINFOEXA     /* winnls.h:672:3 */
type LPCPINFOEX2 = LPCPINFOEXA /* winnls.h:673:3 */

type NUMBERFMT2 = NUMBERFMTA     /* winnls.h:692:3 */
type LPNUMBERFMT2 = LPNUMBERFMTA /* winnls.h:693:3 */

type CURRENCYFMT2 = CURRENCYFMTA     /* winnls.h:717:3 */
type LPCURRENCYFMT2 = LPCURRENCYFMTA /* winnls.h:718:3 */

type PVALUE2 = PVALUEA   /* winreg.h:84:3 */
type PPVALUE2 = PPVALUEA /* winreg.h:85:3 */

type VALENT2 = VALENTA   /* winreg.h:116:3 */
type PVALENT2 = PVALENTA /* winreg.h:117:3 */

type NETRESOURCE2 = NETRESOURCEA     /* winnetwk.h:74:3 */
type LPNETRESOURCE2 = LPNETRESOURCEA /* winnetwk.h:75:3 */

type CONNECTDLGSTRUCT2 = CONNECTDLGSTRUCTA     /* winnetwk.h:145:3 */
type LPCONNECTDLGSTRUCT2 = LPCONNECTDLGSTRUCTA /* winnetwk.h:146:3 */

type DISCDLGSTRUCT2 = DISCDLGSTRUCTA     /* winnetwk.h:177:3 */
type LPDISCDLGSTRUCT2 = LPDISCDLGSTRUCTA /* winnetwk.h:178:3 */

type UNIVERSAL_NAME_INFO2 = UNIVERSAL_NAME_INFOA     /* winnetwk.h:212:3 */
type LPUNIVERSAL_NAME_INFO2 = LPUNIVERSAL_NAME_INFOA /* winnetwk.h:213:3 */

type REMOTE_NAME_INFO2 = REMOTE_NAME_INFOA     /* winnetwk.h:227:3 */
type LPREMOTE_NAME_INFO2 = LPREMOTE_NAME_INFOA /* winnetwk.h:228:3 */

type SERVICE_DESCRIPTION2 = SERVICE_DESCRIPTIONA     /* winsvc.h:103:3 */
type LPSERVICE_DESCRIPTION2 = LPSERVICE_DESCRIPTIONA /* winsvc.h:104:3 */

type SERVICE_FAILURE_ACTIONS2 = SERVICE_FAILURE_ACTIONSA     /* winsvc.h:131:3 */
type LPSERVICE_FAILURE_ACTIONS2 = LPSERVICE_FAILURE_ACTIONSA /* winsvc.h:132:3 */

type ENUM_SERVICE_STATUS2 = ENUM_SERVICE_STATUSA     /* winsvc.h:181:3 */
type LPENUM_SERVICE_STATUS2 = LPENUM_SERVICE_STATUSA /* winsvc.h:182:3 */

type ENUM_SERVICE_STATUS_PROCESS2 = ENUM_SERVICE_STATUS_PROCESSA     /* winsvc.h:196:3 */
type LPENUM_SERVICE_STATUS_PROCESS2 = LPENUM_SERVICE_STATUS_PROCESSA /* winsvc.h:197:3 */

type QUERY_SERVICE_LOCK_STATUS2 = QUERY_SERVICE_LOCK_STATUSA     /* winsvc.h:213:3 */
type LPQUERY_SERVICE_LOCK_STATUS2 = LPQUERY_SERVICE_LOCK_STATUSA /* winsvc.h:214:3 */

type QUERY_SERVICE_CONFIG2 = QUERY_SERVICE_CONFIGA     /* winsvc.h:240:3 */
type LPQUERY_SERVICE_CONFIG2 = LPQUERY_SERVICE_CONFIGA /* winsvc.h:241:3 */

type SERVICE_TABLE_ENTRY2 = SERVICE_TABLE_ENTRYA     /* winsvc.h:258:3 */
type LPSERVICE_TABLE_ENTRY2 = LPSERVICE_TABLE_ENTRYA /* winsvc.h:259:3 */

type REGISTERWORD2 = REGISTERWORDA     /* imm.h:60:3 */
type PREGISTERWORD2 = PREGISTERWORDA   /* imm.h:61:3 */
type NPREGISTERWORD2 = NPREGISTERWORDA /* imm.h:62:3 */
type LPREGISTERWORD2 = LPREGISTERWORDA /* imm.h:63:3 */

type STYLEBUF2 = STYLEBUFA     /* imm.h:88:3 */
type PSTYLEBUF2 = PSTYLEBUFA   /* imm.h:89:3 */
type NPSTYLEBUF2 = NPSTYLEBUFA /* imm.h:90:3 */
type LPSTYLEBUF2 = LPSTYLEBUFA /* imm.h:91:3 */

type IMEMENUITEMINFO2 = IMEMENUITEMINFOA     /* imm.h:119:3 */
type PIMEMENUITEMINFO2 = PIMEMENUITEMINFOA   /* imm.h:120:3 */
type NPIMEMENUITEMINFO2 = NPIMEMENUITEMINFOA /* imm.h:121:3 */
type LPIMEMENUITEMINFO2 = LPIMEMENUITEMINFOA /* imm.h:122:3 */

type WSAPROTOCOL_INFO2 = WSAPROTOCOL_INFOA     /* winsock2.h:480:3 */
type LPWSAPROTOCOL_INFO2 = LPWSAPROTOCOL_INFOA /* winsock2.h:481:3 */

type WSAQUERYSET2 = WSAQUERYSETA     /* winsock2.h:755:3 */
type PWSAQUERYSET2 = PWSAQUERYSETA   /* winsock2.h:756:3 */
type LPWSAQUERYSET2 = LPWSAQUERYSETA /* winsock2.h:757:3 */

type WSANSCLASSINFO2 = WSANSCLASSINFOA     /* winsock2.h:821:3 */
type PWSANSCLASSINFO2 = PWSANSCLASSINFOA   /* winsock2.h:822:3 */
type LPWSANSCLASSINFO2 = LPWSANSCLASSINFOA /* winsock2.h:823:3 */

type WSASERVICECLASSINFO2 = WSASERVICECLASSINFOA     /* winsock2.h:839:3 */
type PWSASERVICECLASSINFO2 = PWSASERVICECLASSINFOA   /* winsock2.h:840:3 */
type LPWSASERVICECLASSINFO2 = LPWSASERVICECLASSINFOA /* winsock2.h:841:3 */

type WSANAMESPACE_INFO2 = WSANAMESPACE_INFOA     /* winsock2.h:859:3 */
type PWSANAMESPACE_INFO2 = PWSANAMESPACE_INFOA   /* winsock2.h:860:3 */
type LPWSANAMESPACE_INFO2 = LPWSANAMESPACE_INFOA /* winsock2.h:861:3 */

type ADDRINFOT2 = ADDRINFOA /* ws2tcpip.h:218:35 */
type PADDRINFOT2 = uintptr  /* ws2tcpip.h:218:45 */

//  Pull in the typedef of TCHAR for windows.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_TCHAR2 = int8   /* tchar.h:967:16 */
type X_TSCHAR2 = int8  /* tchar.h:968:23 */
type X_TUCHAR2 = uint8 /* tchar.h:969:25 */
type X_TXCHAR2 = int8  /* tchar.h:970:16 */
type X_TINT2 = int32   /* tchar.h:971:15 */

//----------------------------------------------------------------
// Macros and flag values used by Tcl bytecode compilation and execution
// modules inside the Tcl core but not used outside.
//----------------------------------------------------------------

// Simplified form to access AuxData.
//
// ClientData TclFetchAuxData(CompileEng *envPtr, int index);

// Form of TclRegisterLiteral with flags == 0. In that case, it is safe to
// cast away constness, and it is cleanest to do that here, all in one place.
//
// int TclRegisterNewLiteral(CompileEnv *envPtr, const char *bytes,
//			     int length);

// Form of TclRegisterLiteral with flags == LITERAL_CMD_NAME. In that case, it
// is safe to cast away constness, and it is cleanest to do that here, all in
// one place.
//
// int TclRegisterNewNSLiteral(CompileEnv *envPtr, const char *bytes,
//			       int length);

// Macro used to manually adjust the stack requirements; used in cases where
// the stack effect cannot be computed from the opcode and its operands, but
// is still known at compile time.
//
// void TclAdjustStackDepth(int delta, CompileEnv *envPtr);

// Macro used to update the stack requirements. It is called by the macros
// TclEmitOpCode, TclEmitInst1 and TclEmitInst4.
// Remark that the very last instruction of a bytecode always reduces the
// stack level: INST_DONE or INST_POP, so that the maxStackdepth is always
// updated.
//
// void TclUpdateStackReqs(unsigned char op, int i, CompileEnv *envPtr);

// Macros used to update the flag that indicates if we are at the start of a
// command, based on whether the opcode is INST_START_COMMAND.
//
// void TclUpdateAtCmdStart(unsigned char op, CompileEnv *envPtr);

// Macro to emit an opcode byte into a CompileEnv's code array. The ANSI C
// "prototype" for this macro is:
//
// void TclEmitOpcode(unsigned char op, CompileEnv *envPtr);

// Macros to emit an integer operand. The ANSI C "prototype" for these macros
// are:
//
// void TclEmitInt1(int i, CompileEnv *envPtr);
// void TclEmitInt4(int i, CompileEnv *envPtr);

// Macros to emit an instruction with signed or unsigned integer operands.
// Four byte integers are stored in "big-endian" order with the high order
// byte stored at the lowest address. The ANSI C "prototypes" for these macros
// are:
//
// void TclEmitInstInt1(unsigned char op, int i, CompileEnv *envPtr);
// void TclEmitInstInt4(unsigned char op, int i, CompileEnv *envPtr);

// Macro to push a Tcl object onto the Tcl evaluation stack. It emits the
// object's one or four byte array index into the CompileEnv's code array.
// These support, respectively, a maximum of 256 (2**8) and 2**32 objects in a
// CompileEnv. The ANSI C "prototype" for this macro is:
//
// void	TclEmitPush(int objIndex, CompileEnv *envPtr);

// Macros to update a (signed or unsigned) integer starting at a pointer. The
// two variants depend on the number of bytes. The ANSI C "prototypes" for
// these macros are:
//
// void TclStoreInt1AtPtr(int i, unsigned char *p);
// void TclStoreInt4AtPtr(int i, unsigned char *p);

// Macros to update instructions at a particular pc with a new op code and a
// (signed or unsigned) int operand. The ANSI C "prototypes" for these macros
// are:
//
// void TclUpdateInstInt1AtPc(unsigned char op, int i, unsigned char *pc);
// void TclUpdateInstInt4AtPc(unsigned char op, int i, unsigned char *pc);

// Macro to fix up a forward jump to point to the current code-generation
// position in the bytecode being created (the most common case). The ANSI C
// "prototypes" for this macro is:
//
// int TclFixupForwardJumpToHere(CompileEnv *envPtr, JumpFixup *fixupPtr,
//				 int threshold);

// Macros to get a signed integer (GET_INT{1,2}) or an unsigned int
// (GET_UINT{1,2}) from a pointer. There are two variants for each return type
// that depend on the number of bytes fetched. The ANSI C "prototypes" for
// these macros are:
//
// int TclGetInt1AtPtr(unsigned char *p);
// int TclGetInt4AtPtr(unsigned char *p);
// unsigned int TclGetUInt1AtPtr(unsigned char *p);
// unsigned int TclGetUInt4AtPtr(unsigned char *p);

// The TclGetInt1AtPtr macro is tricky because we want to do sign extension on
// the 1-byte value. Unfortunately the "char" type isn't signed on all
// platforms so sign-extension doesn't always happen automatically. Sometimes
// we can explicitly declare the pointer to be signed, but other times we have
// to explicitly sign-extend the value in software.

// Macros used to compute the minimum and maximum of two integers. The ANSI C
// "prototypes" for these macros are:
//
// int TclMin(int i, int j);
// int TclMax(int i, int j);

// Convenience macros for use when compiling bodies of commands. The ANSI C
// "prototype" for these macros are:
//
// static void		BODY(Tcl_Token *tokenPtr, int word);

// Convenience macro for use when compiling tokens to be pushed. The ANSI C
// "prototype" for this macro is:
//
// static void		CompileTokens(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp);

// Convenience macros for use when pushing literals. The ANSI C "prototype" for
// these macros are:
//
// static void		PushLiteral(CompileEnv *envPtr,
//			    const char *string, int length);
// static void		PushStringLiteral(CompileEnv *envPtr,
//			    const char *string);

// Macro to advance to the next token; it is more mnemonic than the address
// arithmetic that it replaces. The ANSI C "prototype" for this macro is:
//
// static Tcl_Token *	TokenAfter(Tcl_Token *tokenPtr);

// Macro to get the offset to the next instruction to be issued. The ANSI C
// "prototype" for this macro is:
//
// static int	CurrentOffset(CompileEnv *envPtr);

// Note: the exceptDepth is a bit of a misnomer: TEBC only needs the
// maximal depth of nested CATCH ranges in order to alloc runtime
// memory. These macros should compute precisely that? OTOH, the nesting depth
// of LOOP ranges is an interesting datum for debugging purposes, and that is
// what we compute now.
//
// static int	ExceptionRangeStarts(CompileEnv *envPtr, int index);
// static void	ExceptionRangeEnds(CompileEnv *envPtr, int index);
// static void	ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL);

// Check if there is an LVT for compiled locals

// Macros for making it easier to deal with tokens and DStrings.

// Macro that encapsulates an efficiency trick that avoids a function call for
// the simplest of compiles. The ANSI C "prototype" for this macro is:
//
// static void		CompileWord(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp, int word);

// TIP #280: Remember the per-word line information of the current command. An
// index is used instead of a pointer as recursive compilation may reallocate,
// i.e. move, the array. This is also the reason to save the nuloc now, it may
// change during the course of the function.
//
// Macro to encapsulate the variable definition and setup.

// Often want to issue one of two versions of an instruction based on whether
// the argument will fit in a single byte or not. This makes it much clearer.

// How to get an anonymous local variable (used for holding temporary values
// off the stack) or a local simple scalar.

// Flags bits used by TclPushVarName.

// DTrace probe macros (NOPs if DTrace support is not enabled).

// Define the following macros to enable debug logging of the DTrace proc,
// cmd, and inst probes. Note that this does _not_ require a platform with
// DTrace, it simply logs all probe output to /tmp/tclDTraceDebug-[pid].log.
//
// If the second macro is defined, logging to file starts immediately,
// otherwise only after the first call to [tcl::dtrace]. Note that the debug
// probe data is always computed, even when it is not logged to file.
//
// Defining the third macro enables debug logging of inst probes (disabled
// by default due to the significant performance impact).

//
// #define TCL_DTRACE_DEBUG 1
// #define TCL_DTRACE_DEBUG_LOG_ENABLED 1
// #define TCL_DTRACE_DEBUG_INST_PROBES 1

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Thread-local storage used to avoid having a global lock on data that is not
// limited to a single interpreter.

type ThreadSpecificData7 = struct{ FnumNsCreated int32 } /* tclNamesp.c:44:3 */

var dataKey6 Tcl_ThreadDataKey /* tclNamesp.c:46:26: */

// This structure contains a cached pointer to a namespace that is the result
// of resolving the namespace's name in some other namespace. It is the
// internal representation for a nsName object. It contains the pointer along
// with some information that is used to check the cached pointer's validity.

type ResolvedNsName1 = struct {
	FnsPtr       uintptr
	FrefNsPtr    uintptr
	FrefCount    int32
	F__ccgo_pad1 [4]byte
} /* tclNamesp.c:55:9 */

// This structure contains a cached pointer to a namespace that is the result
// of resolving the namespace's name in some other namespace. It is the
// internal representation for a nsName object. It contains the pointer along
// with some information that is used to check the cached pointer's validity.

type ResolvedNsName = ResolvedNsName1 /* tclNamesp.c:67:3 */

// This structure defines a Tcl object type that contains a namespace
// reference. It is used in commands that take the name of a namespace as an
// argument. The namespace reference is resolved, and the result in cached in
// the object.

var nsNameType = Tcl_ObjType{
	Fname:           ts + 46101,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // updateStringProc
	FsetFromAnyProc: 0, // setFromAnyProc
} /* tclNamesp.c:149:26 */

// Array of values describing how to implement each standard subcommand of the
// "namespace" command.

var defaultNamespaceMap = [20]EnsembleImplMap{
	{Fname: ts + 42436, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 46108, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 35336, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 7850, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 46113, Fproc: 0},
	{Fname: ts + 2994, Fproc: 0, FnreProc: 0},
	{Fname: ts + 12691, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 46122, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 46129, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 46136, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 19360, Fproc: 0, FnreProc: 0},
	{Fname: ts + 35293, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 46143, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 42233, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 46150, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12833, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13462, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 4011, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 46161, Fproc: 0, FcompileProc: 0},
	{},
} /* tclNamesp.c:162:30 */

//----------------------------------------------------------------------
//
// TclInitNamespaceSubsystem --
//
//	This function is called to initialize all the structures that are used
//	by namespaces on a per-process basis.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclInitNamespaceSubsystem(tls *libc.TLS) { /* tclNamesp.c:203:1: */
	// Does nothing for now.
}

//----------------------------------------------------------------------
//
// Tcl_GetCurrentNamespace --
//
//	Returns a pointer to an interpreter's currently active namespace.
//
// Results:
//	Returns a pointer to the interpreter's current namespace.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetCurrentNamespace(tls *libc.TLS, interp uintptr) uintptr { /* tclNamesp.c:226:15: */
	return (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
}

//----------------------------------------------------------------------
//
// Tcl_GetGlobalNamespace --
//
//	Returns a pointer to an interpreter's global :: namespace.
//
// Results:
//	Returns a pointer to the specified interpreter's global namespace.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetGlobalNamespace(tls *libc.TLS, interp uintptr) uintptr { /* tclNamesp.c:250:15: */
	return (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr
}

//----------------------------------------------------------------------
//
// Tcl_PushCallFrame --
//
//	Pushes a new call frame onto the interpreter's Tcl call stack. Called
//	when executing a Tcl procedure or a "namespace eval" or "namespace
//	inscope" command.
//
// Results:
//	Returns TCL_OK if successful, or TCL_ERROR (along with an error
//	message in the interpreter's result object) if something goes wrong.
//
// Side effects:
//	Modifies the interpreter's Tcl call stack.
//
//----------------------------------------------------------------------

func XTcl_PushCallFrame(tls *libc.TLS, interp uintptr, callFramePtr uintptr, namespacePtr uintptr, isProcCallFrame int32) int32 { /* tclNamesp.c:278:1: */
	var iPtr uintptr = interp
	var framePtr uintptr = callFramePtr
	var nsPtr uintptr

	if namespacePtr == uintptr(0) {
		nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	} else {
		nsPtr = namespacePtr

		// TODO: Examine whether it would be better to guard based on NS_DYING
		// or NS_KILLED. It appears that these are not tested because they can
		// be set in a global interp that has been [namespace delete]d, but
		// which never really completely goes away because of lingering global
		// things like ::errorInfo and [::unknown] and hidden commands.
		// Review of those designs might permit stricter checking here.

		if (*Namespace)(unsafe.Pointer(nsPtr)).Fflags&NS_DEAD != 0 {
			XTcl_Panic(tls, ts+46167, 0)
			//NOTREACHED
		}
	}

	(*Namespace)(unsafe.Pointer(nsPtr)).FactivationCount++
	(*CallFrame)(unsafe.Pointer(framePtr)).FnsPtr = nsPtr
	(*CallFrame)(unsafe.Pointer(framePtr)).FisProcCallFrame = isProcCallFrame
	(*CallFrame)(unsafe.Pointer(framePtr)).Fobjc = 0
	(*CallFrame)(unsafe.Pointer(framePtr)).Fobjv = uintptr(0)
	(*CallFrame)(unsafe.Pointer(framePtr)).FcallerPtr = (*Interp)(unsafe.Pointer(iPtr)).FframePtr
	(*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	if (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr != uintptr(0) {
		(*CallFrame)(unsafe.Pointer(framePtr)).Flevel = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Flevel + 1
	} else {
		(*CallFrame)(unsafe.Pointer(framePtr)).Flevel = 0
	}
	(*CallFrame)(unsafe.Pointer(framePtr)).FprocPtr = uintptr(0)     // no called procedure
	(*CallFrame)(unsafe.Pointer(framePtr)).FvarTablePtr = uintptr(0) // and no local variables
	(*CallFrame)(unsafe.Pointer(framePtr)).FnumCompiledLocals = 0
	(*CallFrame)(unsafe.Pointer(framePtr)).FcompiledLocals = uintptr(0)
	(*CallFrame)(unsafe.Pointer(framePtr)).FclientData = uintptr(0)
	(*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr = uintptr(0)
	(*CallFrame)(unsafe.Pointer(framePtr)).FtailcallPtr = uintptr(0)

	// Push the new call frame onto the interpreter's stack of procedure call
	// frames making it the current frame.

	(*Interp)(unsafe.Pointer(iPtr)).FframePtr = framePtr
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = framePtr

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_PopCallFrame --
//
//	Removes a call frame from the Tcl call stack for the interpreter.
//	Called to remove a frame previously pushed by Tcl_PushCallFrame.
//
// Results:
//	None.
//
// Side effects:
//	Modifies the call stack of the interpreter. Resets various fields of
//	the popped call frame. If a namespace has been deleted and has no more
//	activations on the call stack, the namespace is destroyed.
//
//----------------------------------------------------------------------

func XTcl_PopCallFrame(tls *libc.TLS, interp uintptr) { /* tclNamesp.c:378:1: */
	var iPtr uintptr = interp
	var framePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FframePtr
	var nsPtr uintptr

	// It's important to remove the call frame from the interpreter's stack of
	// call frames before deleting local variables, so that traces invoked by
	// the variable deletion don't see the partially-deleted frame.

	if (*CallFrame)(unsafe.Pointer(framePtr)).FcallerPtr != 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FframePtr = (*CallFrame)(unsafe.Pointer(framePtr)).FcallerPtr
		(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = (*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr
	} else {
		// Tcl_PopCallFrame: trying to pop rootCallFrame!
	}

	if (*CallFrame)(unsafe.Pointer(framePtr)).FvarTablePtr != uintptr(0) {
		XTclDeleteVars(tls, iPtr, (*CallFrame)(unsafe.Pointer(framePtr)).FvarTablePtr)
		XTclpFree(tls, (*CallFrame)(unsafe.Pointer(framePtr)).FvarTablePtr)
		(*CallFrame)(unsafe.Pointer(framePtr)).FvarTablePtr = uintptr(0)
	}
	if (*CallFrame)(unsafe.Pointer(framePtr)).FnumCompiledLocals > 0 {
		XTclDeleteCompiledLocalVars(tls, iPtr, framePtr)
		if libc.PreDecInt32(&(*LocalCache)(unsafe.Pointer((*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr)).FrefCount, 1) == 0 {
			XTclFreeLocalCache(tls, interp, (*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr)
		}
		(*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr = uintptr(0)
	}

	// Decrement the namespace's count of active call frames. If the namespace
	// is "dying" and there are no more active call frames, call
	// Tcl_DeleteNamespace to destroy it.

	nsPtr = (*CallFrame)(unsafe.Pointer(framePtr)).FnsPtr
	(*Namespace)(unsafe.Pointer(nsPtr)).FactivationCount--
	if (*Namespace)(unsafe.Pointer(nsPtr)).Fflags&NS_DYING != 0 &&
		(*Namespace)(unsafe.Pointer(nsPtr)).FactivationCount-libc.Bool32(nsPtr == (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr) == 0 {
		XTcl_DeleteNamespace(tls, nsPtr)
	}
	(*CallFrame)(unsafe.Pointer(framePtr)).FnsPtr = uintptr(0)

	if (*CallFrame)(unsafe.Pointer(framePtr)).FtailcallPtr != 0 {
		XTclSetTailcall(tls, interp, (*CallFrame)(unsafe.Pointer(framePtr)).FtailcallPtr)
	}
}

//----------------------------------------------------------------------
//
// TclPushStackFrame --
//
//	Allocates a new call frame in the interpreter's execution stack, then
//	pushes it onto the interpreter's Tcl call stack. Called when executing
//	a Tcl procedure or a "namespace eval" or "namespace inscope" command.
//
// Results:
//	Returns TCL_OK if successful, or TCL_ERROR (along with an error
//	message in the interpreter's result object) if something goes wrong.
//
// Side effects:
//	Modifies the interpreter's Tcl call stack.
//
//----------------------------------------------------------------------

func XTclPushStackFrame(tls *libc.TLS, interp uintptr, framePtrPtr uintptr, namespacePtr uintptr, isProcCallFrame int32) int32 { /* tclNamesp.c:450:1: */
	*(*uintptr)(unsafe.Pointer(framePtrPtr)) = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CallFrame{})))
	return XTcl_PushCallFrame(tls, interp, *(*uintptr)(unsafe.Pointer(framePtrPtr)), namespacePtr,
		isProcCallFrame)
}

func XTclPopStackFrame(tls *libc.TLS, interp uintptr) { /* tclNamesp.c:474:1: */
	var freePtr uintptr = (*Interp)(unsafe.Pointer(interp)).FframePtr

	XTcl_PopCallFrame(tls, interp)
	XTclStackFree(tls, interp, freePtr)
}

//----------------------------------------------------------------------
//
// EstablishErrorCodeTraces --
//
//	Creates traces on the ::errorCode variable to keep its value
//	consistent with the expectations of legacy code.
//
// Results:
//	None.
//
// Side effects:
//	Read and unset traces are established on ::errorCode.
//
//----------------------------------------------------------------------

func sEstablishErrorCodeTraces(tls *libc.TLS, clientData ClientData, interp uintptr, name1 uintptr, name2 uintptr, flags int32) uintptr { /* tclNamesp.c:500:13: */
	XTcl_TraceVar2(tls, interp, ts+46212, uintptr(0), TCL_GLOBAL_ONLY|TCL_TRACE_READS,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sErrorCodeRead})), uintptr(0))
	XTcl_TraceVar2(tls, interp, ts+46212, uintptr(0), TCL_GLOBAL_ONLY|TCL_TRACE_UNSETS,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sEstablishErrorCodeTraces})), uintptr(0))
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// ErrorCodeRead --
//
//	Called when the ::errorCode variable is read. Copies the current value
//	of the interp's errorCode field into ::errorCode.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sErrorCodeRead(tls *libc.TLS, clientData ClientData, interp uintptr, name1 uintptr, name2 uintptr, flags int32) uintptr { /* tclNamesp.c:532:13: */
	var iPtr uintptr = interp

	if XTcl_InterpDeleted(tls, interp) != 0 || !((*Interp)(unsafe.Pointer(iPtr)).Fflags&ERR_LEGACY_COPY != 0) {
		return uintptr(0)
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorCode != 0 {
		XTcl_ObjSetVar2(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FecVar, uintptr(0),
			(*Interp)(unsafe.Pointer(iPtr)).FerrorCode, TCL_GLOBAL_ONLY)
		return uintptr(0)
	}
	if uintptr(0) == XTcl_ObjGetVar2(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FecVar, uintptr(0), TCL_GLOBAL_ONLY) {
		XTcl_ObjSetVar2(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FecVar, uintptr(0),
			XTcl_NewObj(tls), TCL_GLOBAL_ONLY)
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// EstablishErrorInfoTraces --
//
//	Creates traces on the ::errorInfo variable to keep its value
//	consistent with the expectations of legacy code.
//
// Results:
//	None.
//
// Side effects:
//	Read and unset traces are established on ::errorInfo.
//
//----------------------------------------------------------------------

func sEstablishErrorInfoTraces(tls *libc.TLS, clientData ClientData, interp uintptr, name1 uintptr, name2 uintptr, flags int32) uintptr { /* tclNamesp.c:574:13: */
	XTcl_TraceVar2(tls, interp, ts+28015, uintptr(0), TCL_GLOBAL_ONLY|TCL_TRACE_READS,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sErrorInfoRead})), uintptr(0))
	XTcl_TraceVar2(tls, interp, ts+28015, uintptr(0), TCL_GLOBAL_ONLY|TCL_TRACE_UNSETS,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
		}{sEstablishErrorInfoTraces})), uintptr(0))
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// ErrorInfoRead --
//
//	Called when the ::errorInfo variable is read. Copies the current value
//	of the interp's errorInfo field into ::errorInfo.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sErrorInfoRead(tls *libc.TLS, clientData ClientData, interp uintptr, name1 uintptr, name2 uintptr, flags int32) uintptr { /* tclNamesp.c:606:13: */
	var iPtr uintptr = interp

	if XTcl_InterpDeleted(tls, interp) != 0 || !((*Interp)(unsafe.Pointer(iPtr)).Fflags&ERR_LEGACY_COPY != 0) {
		return uintptr(0)
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo != 0 {
		XTcl_ObjSetVar2(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FeiVar, uintptr(0),
			(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo, TCL_GLOBAL_ONLY)
		return uintptr(0)
	}
	if uintptr(0) == XTcl_ObjGetVar2(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FeiVar, uintptr(0), TCL_GLOBAL_ONLY) {
		XTcl_ObjSetVar2(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FeiVar, uintptr(0),
			XTcl_NewObj(tls), TCL_GLOBAL_ONLY)
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_CreateNamespace --
//
//	Creates a new namespace with the given name. If there is no active
//	namespace (i.e., the interpreter is being initialized), the global ::
//	namespace is created and returned.
//
// Results:
//	Returns a pointer to the new namespace if successful. If the namespace
//	already exists or if another error occurs, this routine returns NULL,
//	along with an error message in the interpreter's result object.
//
// Side effects:
//	If the name contains "::" qualifiers and a parent namespace does not
//	already exist, it is automatically created.
//
//----------------------------------------------------------------------

func XTcl_CreateNamespace(tls *libc.TLS, interp uintptr, name uintptr, clientData ClientData, deleteProc uintptr) uintptr { /* tclNamesp.c:652:15: */
	bp := tls.Alloc(776)
	defer tls.Free(776)

	var iPtr uintptr
	var nsPtr uintptr
	var ancestorPtr uintptr
	// var parentPtr uintptr at bp+304, 8

	// var dummy1Ptr uintptr at bp+312, 8

	// var dummy2Ptr uintptr at bp+320, 8

	var globalNsPtr uintptr
	// var simpleName uintptr at bp+328, 8

	var entryPtr uintptr
	// var buffer1 Tcl_DString at bp+344, 216

	// var buffer2 Tcl_DString at bp+560, 216

	var namePtr uintptr
	var buffPtr uintptr
	// var newEntry int32 at bp+336, 4

	var nameLen int32
	var tsdPtr uintptr
	var nameStr uintptr
	// var tmpBuffer Tcl_DString at bp+88, 216

	var tempPtr uintptr
	iPtr = interp
	globalNsPtr = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
	tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey6)), int32(unsafe.Sizeof(ThreadSpecificData7{})))

	XTcl_DStringInit(tls, bp+88)

	// If there is no active namespace, the interpreter is being initialized.

	if !(globalNsPtr == uintptr(0) && (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr == uintptr(0)) {
		goto __1
	}
	// Treat this namespace as the global namespace, and avoid looking for
	// a parent.

	*(*uintptr)(unsafe.Pointer(bp + 304 /* parentPtr */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 328 /* simpleName */)) = ts + 2631 /* "" */
	goto doCreate
__1:
	;

	// Ensure that there are no trailing colons as that causes chaos when a
	// deleteProc is specified. [Bug d614d63989]

	if !(deleteProc != uintptr(0)) {
		goto __2
	}
	nameStr = name + uintptr(libc.Xstrlen(tls, name)) - uintptr(2)
	if !(nameStr >= name && int32(*(*int8)(unsafe.Pointer(nameStr + 1))) == ':' && int32(*(*int8)(unsafe.Pointer(nameStr))) == ':') {
		goto __3
	}
	XTcl_DStringAppend(tls, bp+88, name, -1)
__4:
	if !(libc.AssignInt32(&nameLen, (*Tcl_DString)(unsafe.Pointer(bp+88)).Flength) > 0 &&
		int32(*(*int8)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(bp+88)).Fstring + uintptr(nameLen-1)))) == ':') {
		goto __5
	}
	XTcl_DStringSetLength(tls, bp+88, nameLen-1)
	goto __4
__5:
	;
	name = (*Tcl_DString)(unsafe.Pointer(bp + 88)).Fstring
__3:
	;
__2:
	;

	// If we've ended up with an empty string now, we're attempting to create
	// the global namespace despite the global namespace existing. That's
	// naughty!

	if !(int32(*(*int8)(unsafe.Pointer(name))) == 0) {
		goto __6
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+46222, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+9760,
		ts+46291, uintptr(0)))
	XTcl_DStringFree(tls, bp+88)
	return uintptr(0)
__6:
	;

	// Find the parent for the new namespace.

	XTclGetNamespaceForQualName(tls, interp, name, uintptr(0), TCL_CREATE_NS_IF_UNKNOWN,
		bp+304, bp+312, bp+320, bp+328)

	// If the unqualified name at the end is empty, there were trailing "::"s
	// after the namespace's name which we ignore. The new namespace was
	// already (recursively) created and is pointed to by parentPtr.

	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 328))))) == 0) {
		goto __7
	}
	XTcl_DStringFree(tls, bp+88)
	return *(*uintptr)(unsafe.Pointer(bp + 304 /* parentPtr */))
__7:
	;

	// Check for a bad namespace name and make sure that the name does not
	// already exist in the parent namespace.

	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 304)) + 40)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 304))+40, *(*uintptr)(unsafe.Pointer(bp + 328))) != uintptr(0)) {
		goto __8
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+46304, libc.VaList(bp+40, name)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7949, ts+9760,
		ts+46348, uintptr(0)))
	XTcl_DStringFree(tls, bp+88)
	return uintptr(0)
__8:
	;

	// Create the new namespace and root it in its parent. Increment the count
	// of namespaces created.

doCreate:
	nsPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Namespace{})))
	nameLen = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 328))) + uint64(1))
	(*Namespace)(unsafe.Pointer(nsPtr)).Fname = XTcl_Alloc(tls, uint32(nameLen))
	libc.Xmemcpy(tls, (*Namespace)(unsafe.Pointer(nsPtr)).Fname, *(*uintptr)(unsafe.Pointer(bp + 328 /* simpleName */)), uint64(nameLen))
	(*Namespace)(unsafe.Pointer(nsPtr)).FfullName = uintptr(0) // Set below.
	(*Namespace)(unsafe.Pointer(nsPtr)).FclientData = clientData
	(*Namespace)(unsafe.Pointer(nsPtr)).FdeleteProc = deleteProc
	(*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr = *(*uintptr)(unsafe.Pointer(bp + 304 /* parentPtr */))
	XTcl_InitHashTable(tls, nsPtr+40, 0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FnsId = libc.PreIncInt32(&(*ThreadSpecificData7)(unsafe.Pointer(tsdPtr)).FnumNsCreated, 1)
	(*Namespace)(unsafe.Pointer(nsPtr)).Finterp = interp
	(*Namespace)(unsafe.Pointer(nsPtr)).Fflags = 0
	(*Namespace)(unsafe.Pointer(nsPtr)).FactivationCount = 0
	(*Namespace)(unsafe.Pointer(nsPtr)).FrefCount = 0
	XTcl_InitHashTable(tls, nsPtr+160, 0)
	XTclInitVarHashTable(tls, nsPtr+248, nsPtr)
	(*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr = uintptr(0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns = 0
	(*Namespace)(unsafe.Pointer(nsPtr)).FmaxExportPatterns = 0
	(*Namespace)(unsafe.Pointer(nsPtr)).FcmdRefEpoch = 0
	(*Namespace)(unsafe.Pointer(nsPtr)).FresolverEpoch = 0
	(*Namespace)(unsafe.Pointer(nsPtr)).FcmdResProc = uintptr(0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FvarResProc = uintptr(0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FcompiledVarResProc = uintptr(0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FexportLookupEpoch = 0
	(*Namespace)(unsafe.Pointer(nsPtr)).Fensembles = uintptr(0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FunknownHandlerPtr = uintptr(0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength = 0
	(*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathArray = uintptr(0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathSourceList = uintptr(0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FearlyDeleteProc = uintptr(0)

	if !(*(*uintptr)(unsafe.Pointer(bp + 304)) != uintptr(0)) {
		goto __9
	}
	entryPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(XTclGetNamespaceChildTable(tls, *(*uintptr)(unsafe.Pointer(bp + 304 /* parentPtr */))))).FcreateProc})).f(tls, XTclGetNamespaceChildTable(tls, *(*uintptr)(unsafe.Pointer(bp + 304 /* parentPtr */))), *(*uintptr)(unsafe.Pointer(bp + 328 /* simpleName */)), bp+336 /* &newEntry */)
	(*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData = nsPtr
	goto __10
__9:
	// In the global namespace create traces to maintain the ::errorInfo
	// and ::errorCode variables.

	(*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr = nsPtr
	sEstablishErrorInfoTraces(tls, uintptr(0), interp, uintptr(0), uintptr(0), 0)
	sEstablishErrorCodeTraces(tls, uintptr(0), interp, uintptr(0), uintptr(0), 0)
__10:
	;

	// Build the fully qualified name for this namespace.

	XTcl_DStringInit(tls, bp+344)
	XTcl_DStringInit(tls, bp+560)
	namePtr = bp + 344 /* &buffer1 */
	buffPtr = bp + 560 /* &buffer2 */
	ancestorPtr = nsPtr
__11:
	if !(ancestorPtr != uintptr(0)) {
		goto __13
	}
	if !(ancestorPtr != globalNsPtr) {
		goto __14
	}
	tempPtr = namePtr

	XTcl_DStringAppend(tls, buffPtr, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
	XTcl_DStringAppend(tls, buffPtr, (*Namespace)(unsafe.Pointer(ancestorPtr)).Fname, -1)
	XTclDStringAppendDString(tls, buffPtr, namePtr)

	// Clear the unwanted buffer or we end up appending to previous
	// results, making the namespace fullNames of nested namespaces
	// very wrong (and strange).

	XTcl_DStringSetLength(tls, namePtr, 0)

	// Now swap the buffer pointers so that we build in the other
	// buffer. This is faster than repeated copying back and forth
	// between buffers.

	namePtr = buffPtr
	buffPtr = tempPtr
__14:
	;
	goto __12
__12:
	ancestorPtr = (*Namespace)(unsafe.Pointer(ancestorPtr)).FparentPtr
	goto __11
	goto __13
__13:
	;

	name = (*Tcl_DString)(unsafe.Pointer(namePtr)).Fstring
	nameLen = (*Tcl_DString)(unsafe.Pointer(namePtr)).Flength
	(*Namespace)(unsafe.Pointer(nsPtr)).FfullName = XTcl_Alloc(tls, uint32(nameLen+1))
	libc.Xmemcpy(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName, name, uint64(nameLen+1))

	XTcl_DStringFree(tls, bp+344)
	XTcl_DStringFree(tls, bp+560)
	XTcl_DStringFree(tls, bp+88)

	// If compilation of commands originating from the parent NS is
	// suppressed, suppress it for commands originating in this one too.

	if !((*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr != uintptr(0) && (*Namespace1)(unsafe.Pointer((*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr)).Fflags&NS_SUPPRESS_COMPILATION != 0) {
		goto __15
	}
	*(*int32)(unsafe.Pointer(nsPtr + 144)) |= NS_SUPPRESS_COMPILATION
__15:
	;

	// Return a pointer to the new namespace.

	return nsPtr
}

//----------------------------------------------------------------------
//
// Tcl_DeleteNamespace --
//
//	Deletes a namespace and all of the commands, variables, and other
//	namespaces within it.
//
// Results:
//	None.
//
// Side effects:
//	When a namespace is deleted, it is automatically removed as a child of
//	its parent namespace. Also, all its commands, variables and child
//	namespaces are deleted.
//
//----------------------------------------------------------------------

func XTcl_DeleteNamespace(tls *libc.TLS, namespacePtr uintptr) { /* tclNamesp.c:907:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var nsPtr uintptr = namespacePtr
	var iPtr uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).Finterp
	var globalNsPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
	var entryPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	var cmdPtr uintptr

	// Ensure that this namespace doesn't get deallocated in the meantime.
	(*Namespace)(unsafe.Pointer(nsPtr)).FrefCount++

	// Give anyone interested - notably TclOO - a chance to use this namespace
	// normally despite the fact that the namespace is going to go. Allows the
	// calling of destructors. Will only be called once (unless re-established
	// by the called function). [Bug 2950259]
	//
	// Note that setting this field requires access to the internal definition
	// of namespaces, so it should only be accessed by code that knows about
	// being careful with reentrancy.

	if (*Namespace)(unsafe.Pointer(nsPtr)).FearlyDeleteProc != uintptr(0) {
		var earlyDeleteProc uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).FearlyDeleteProc

		(*Namespace)(unsafe.Pointer(nsPtr)).FearlyDeleteProc = uintptr(0)
		(*Namespace)(unsafe.Pointer(nsPtr)).FactivationCount++
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{earlyDeleteProc})).f(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FclientData)
		(*Namespace)(unsafe.Pointer(nsPtr)).FactivationCount--
	}

	// Delete all coroutine commands now: break the circular ref cycle between
	// the namespace and the coroutine command [Bug 2724403]. This code is
	// essentially duplicated in TclTeardownNamespace() for all other
	// commands. Don't optimize to Tcl_NextHashEntry() because of traces.
	//
	// NOTE: we could avoid traversing the ns's command list by keeping a
	// separate list of coros.

	for entryPtr = XTcl_FirstHashEntry(tls, nsPtr+160, bp); entryPtr != uintptr(0); {
		cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
		if (*Command)(unsafe.Pointer(cmdPtr)).FnreProc == *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclNRInterpCoroutine})) {
			XTcl_DeleteCommandFromToken(tls, iPtr,
				cmdPtr)
			entryPtr = XTcl_FirstHashEntry(tls, nsPtr+160, bp)
		} else {
			entryPtr = XTcl_NextHashEntry(tls, bp)
		}
	}

	// If the namespace has associated ensemble commands, delete them first.
	// This leaves the actual contents of the namespace alone (unless they are
	// linked ensemble commands, of course). Note that this code is actually
	// reentrant so command delete traces won't purturb things badly.

	for (*Namespace)(unsafe.Pointer(nsPtr)).Fensembles != uintptr(0) {
		var ensemblePtr uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).Fensembles

		// Splice out and link to indicate that we've already been killed.

		(*Namespace)(unsafe.Pointer(nsPtr)).Fensembles = (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fnext
		(*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Fnext = ensemblePtr
		XTcl_DeleteCommandFromToken(tls, (*Namespace)(unsafe.Pointer(nsPtr)).Finterp, (*EnsembleConfig)(unsafe.Pointer(ensemblePtr)).Ftoken)
	}

	// If the namespace has a registered unknown handler (TIP 181), then free
	// it here.

	if (*Namespace)(unsafe.Pointer(nsPtr)).FunknownHandlerPtr != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).FunknownHandlerPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Namespace)(unsafe.Pointer(nsPtr)).FunknownHandlerPtr = uintptr(0)
	}

	// If the namespace is on the call frame stack, it is marked as "dying"
	// (NS_DYING is OR'd into its flags): the namespace can't be looked up by
	// name but its commands and variables are still usable by those active
	// call frames. When all active call frames referring to the namespace
	// have been popped from the Tcl stack, Tcl_PopCallFrame will call this
	// function again to delete everything in the namespace. If no nsName
	// objects refer to the namespace (i.e., if its refCount is zero), its
	// commands and variables are deleted and the storage for its namespace
	// structure is freed. Otherwise, if its refCount is nonzero, the
	// namespace's commands and variables are deleted but the structure isn't
	// freed. Instead, NS_DEAD is OR'd into the structure's flags to allow the
	// namespace resolution code to recognize that the namespace is "deleted".
	// The structure's storage is freed by FreeNsNameInternalRep when its
	// refCount reaches 0.

	if (*Namespace)(unsafe.Pointer(nsPtr)).FactivationCount-libc.Bool32(nsPtr == globalNsPtr) > 0 {
		*(*int32)(unsafe.Pointer(nsPtr + 144)) |= NS_DYING
		if (*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr != uintptr(0) {
			entryPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(XTclGetNamespaceChildTable(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr))).FfindProc})).f(tls, XTclGetNamespaceChildTable(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr), (*Namespace)(unsafe.Pointer(nsPtr)).Fname)
			if entryPtr != uintptr(0) {
				XTcl_DeleteHashEntry(tls, entryPtr)
			}
		}
		(*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr = uintptr(0)
	} else if !((*Namespace)(unsafe.Pointer(nsPtr)).Fflags&NS_KILLED != 0) {
		// Delete the namespace and everything in it. If this is the global
		// namespace, then clear it but don't free its storage unless the
		// interpreter is being torn down. Set the NS_KILLED flag to avoid
		// recursive calls here - if the namespace is really in the process of
		// being deleted, ignore any second call.

		*(*int32)(unsafe.Pointer(nsPtr + 144)) |= NS_DYING | NS_KILLED

		XTclTeardownNamespace(tls, nsPtr)

		if nsPtr != globalNsPtr || (*Interp)(unsafe.Pointer(iPtr)).Fflags&DELETED != 0 {
			// If this is the global namespace, then it may have residual
			// "errorInfo" and "errorCode" variables for errors that occurred
			// while it was being torn down. Try to clear the variable list
			// one last time.

			XTclDeleteNamespaceVars(tls, nsPtr)

			XTcl_DeleteHashTable(tls, nsPtr+40)
			XTcl_DeleteHashTable(tls, nsPtr+160)

			*(*int32)(unsafe.Pointer(nsPtr + 144)) |= NS_DEAD
		} else {
			// Restore the ::errorInfo and ::errorCode traces.

			sEstablishErrorInfoTraces(tls, uintptr(0), (*Namespace)(unsafe.Pointer(nsPtr)).Finterp, uintptr(0), uintptr(0), 0)
			sEstablishErrorCodeTraces(tls, uintptr(0), (*Namespace)(unsafe.Pointer(nsPtr)).Finterp, uintptr(0), uintptr(0), 0)

			// We didn't really kill it, so remove the KILLED marks, so it can
			// get killed later, avoiding mem leaks.

			*(*int32)(unsafe.Pointer(nsPtr + 144)) &= libc.CplInt32(NS_DYING | NS_KILLED)
		}
	}
	XTclNsDecrRefCount(tls, nsPtr)
}

func XTclNamespaceDeleted(tls *libc.TLS, nsPtr uintptr) int32 { /* tclNamesp.c:1076:1: */
	if (*Namespace)(unsafe.Pointer(nsPtr)).Fflags&NS_DYING != 0 {
		return 1
	}
	return 0
}

//----------------------------------------------------------------------
//
// TclTeardownNamespace --
//
//	Used internally to dismantle and unlink a namespace when it is
//	deleted. Divorces the namespace from its parent, and deletes all
//	commands, variables, and child namespaces.
//
//	This is kept separate from Tcl_DeleteNamespace so that the global
//	namespace can be handled specially.
//
// Results:
//	None.
//
// Side effects:
//	Removes this namespace from its parent's child namespace hashtable.
//	Deletes all commands, variables and namespaces in this namespace.
//
//----------------------------------------------------------------------

func XTclTeardownNamespace(tls *libc.TLS, nsPtr uintptr) { /* tclNamesp.c:1105:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var iPtr uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).Finterp
	var entryPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	var i int32

	// Start by destroying the namespace's variable table, since variables
	// might trigger traces. Variable table should be cleared but not freed!
	// TclDeleteNamespaceVars frees it, so we reinitialize it afterwards.

	XTclDeleteNamespaceVars(tls, nsPtr)
	XTclInitVarHashTable(tls, nsPtr+248, nsPtr)

	// Delete all commands in this namespace. Be careful when traversing the
	// hash table: when each command is deleted, it removes itself from the
	// command table. Because of traces (and the desire to avoid the quadratic
	// problems of just using Tcl_FirstHashEntry over and over, [Bug
	// f97d4ee020]) we copy to a temporary array and then delete all those
	// commands.

	for (*Namespace)(unsafe.Pointer(nsPtr)).FcmdTable.FnumEntries > 0 {
		var length int32 = (*Namespace)(unsafe.Pointer(nsPtr)).FcmdTable.FnumEntries
		var cmds uintptr = XTclStackAlloc(tls, iPtr,
			int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(length)))

		i = 0
		for entryPtr = XTcl_FirstHashEntry(tls, nsPtr+160, bp); entryPtr != uintptr(0); entryPtr = XTcl_NextHashEntry(tls, bp) {
			*(*uintptr)(unsafe.Pointer(cmds + uintptr(i)*8)) = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
			(*Command)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cmds + uintptr(i)*8)))).FrefCount++
			i++
		}
		for i = 0; i < length; i++ {
			XTcl_DeleteCommandFromToken(tls, iPtr,
				*(*uintptr)(unsafe.Pointer(cmds + uintptr(i)*8)))
			if libc.PostDecInt32(&(*Command)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cmds + uintptr(i)*8)))).FrefCount, 1) <= 1 {
				XTclpFree(tls, *(*uintptr)(unsafe.Pointer(cmds + uintptr(i)*8)))
			}

		}
		XTclStackFree(tls, iPtr, cmds)
	}
	XTcl_DeleteHashTable(tls, nsPtr+160)
	XTcl_InitHashTable(tls, nsPtr+160, 0)

	// Remove the namespace from its parent's child hashtable.

	if (*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr != uintptr(0) {
		entryPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(XTclGetNamespaceChildTable(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr))).FfindProc})).f(tls, XTclGetNamespaceChildTable(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr), (*Namespace)(unsafe.Pointer(nsPtr)).Fname)
		if entryPtr != uintptr(0) {
			XTcl_DeleteHashEntry(tls, entryPtr)
		}
	}
	(*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr = uintptr(0)

	// Delete the namespace path if one is installed.

	if (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength != 0 {
		sUnlinkNsPath(tls, nsPtr)
		(*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength = 0
	}
	if (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathSourceList != uintptr(0) {
		var nsPathPtr uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathSourceList

		for ok := true; ok; ok = nsPathPtr != uintptr(0) {
			if (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnsPtr != uintptr(0) && (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FcreatorNsPtr != uintptr(0) {
				(*Namespace)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FcreatorNsPtr)).FcmdRefEpoch++
			}
			(*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnsPtr = uintptr(0)
			nsPathPtr = (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnextPtr
		}
		(*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathSourceList = uintptr(0)
	}

	// Delete all the child namespaces.
	//
	// BE CAREFUL: When each child is deleted, it will divorce itself from its
	// parent. You can't traverse a hash table properly if its elements are
	// being deleted.  Because of traces (and the desire to avoid the
	// quadratic problems of just using Tcl_FirstHashEntry over and over, [Bug
	// f97d4ee020]) we copy to a temporary array and then delete all those
	// namespaces.
	//
	// Important: leave the hash table itself still live.

	for (*Namespace)(unsafe.Pointer(nsPtr)).FchildTable.FnumEntries > 0 {
		var length int32 = (*Namespace)(unsafe.Pointer(nsPtr)).FchildTable.FnumEntries
		var children uintptr = XTclStackAlloc(tls, iPtr,
			int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(length)))

		i = 0
		for entryPtr = XTcl_FirstHashEntry(tls, nsPtr+40, bp); entryPtr != uintptr(0); entryPtr = XTcl_NextHashEntry(tls, bp) {
			*(*uintptr)(unsafe.Pointer(children + uintptr(i)*8)) = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
			(*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(children + uintptr(i)*8)))).FrefCount++
			i++
		}
		for i = 0; i < length; i++ {
			XTcl_DeleteNamespace(tls, *(*uintptr)(unsafe.Pointer(children + uintptr(i)*8)))
			XTclNsDecrRefCount(tls, *(*uintptr)(unsafe.Pointer(children + uintptr(i)*8)))
		}
		XTclStackFree(tls, iPtr, children)
	}

	// Free the namespace's export pattern array.

	if (*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr != uintptr(0) {
		for i = 0; i < (*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns; i++ {
			XTclpFree(tls, *(*uintptr)(unsafe.Pointer((*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr + uintptr(i)*8)))
		}
		XTclpFree(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr)
		(*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr = uintptr(0)
		(*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns = 0
		(*Namespace)(unsafe.Pointer(nsPtr)).FmaxExportPatterns = 0
	}

	// Free any client data associated with the namespace.

	if (*Namespace)(unsafe.Pointer(nsPtr)).FdeleteProc != uintptr(0) {
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Namespace)(unsafe.Pointer(nsPtr)).FdeleteProc})).f(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FclientData)
	}
	(*Namespace)(unsafe.Pointer(nsPtr)).FdeleteProc = uintptr(0)
	(*Namespace)(unsafe.Pointer(nsPtr)).FclientData = uintptr(0)

	// Reset the namespace's id field to ensure that this namespace won't be
	// interpreted as valid by, e.g., the cache validation code for cached
	// command references in Tcl_GetCommandFromObj.

	(*Namespace)(unsafe.Pointer(nsPtr)).FnsId = 0
}

//----------------------------------------------------------------------
//
// NamespaceFree --
//
//	Called after a namespace has been deleted, when its reference count
//	reaches 0. Frees the data structure representing the namespace.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sNamespaceFree(tls *libc.TLS, nsPtr uintptr) { /* tclNamesp.c:1298:1: */
	// Most of the namespace's contents are freed when the namespace is
	// deleted by Tcl_DeleteNamespace. All that remains is to free its names
	// (for error messages), and the structure itself.

	XTclpFree(tls, (*Namespace)(unsafe.Pointer(nsPtr)).Fname)
	XTclpFree(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName)
	XTclpFree(tls, nsPtr)
}

//----------------------------------------------------------------------
//
// TclNsDecrRefCount --
//
//	Drops a reference to a namespace and frees it if the namespace has
//	been deleted and the last reference has just been dropped.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclNsDecrRefCount(tls *libc.TLS, nsPtr uintptr) { /* tclNamesp.c:1330:1: */
	(*Namespace)(unsafe.Pointer(nsPtr)).FrefCount--
	if (*Namespace)(unsafe.Pointer(nsPtr)).FrefCount == 0 && (*Namespace)(unsafe.Pointer(nsPtr)).Fflags&NS_DEAD != 0 {
		sNamespaceFree(tls, nsPtr)
	}
}

//----------------------------------------------------------------------
//
// Tcl_Export --
//
//	Makes all the commands matching a pattern available to later be
//	imported from the namespace specified by namespacePtr (or the current
//	namespace if namespacePtr is NULL). The specified pattern is appended
//	onto the namespace's export pattern list, which is optionally cleared
//	beforehand.
//
// Results:
//	Returns TCL_OK if successful, or TCL_ERROR (along with an error
//	message in the interpreter's result) if something goes wrong.
//
// Side effects:
//	Appends the export pattern onto the namespace's export list.
//	Optionally reset the namespace's export pattern list.
//
//----------------------------------------------------------------------

func XTcl_Export(tls *libc.TLS, interp uintptr, namespacePtr uintptr, pattern uintptr, resetListFirst int32) int32 { /* tclNamesp.c:1362:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	var nsPtr uintptr
	// var exportNsPtr uintptr at bp+40, 8

	// var dummyPtr uintptr at bp+48, 8

	var currNsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	// var simplePattern uintptr at bp+56, 8

	var patternCpy uintptr
	var neededElems int32
	var len int32
	var i int32

	// If the specified namespace is NULL, use the current namespace.

	if namespacePtr == uintptr(0) {
		nsPtr = currNsPtr
	} else {
		nsPtr = namespacePtr
	}

	// If resetListFirst is true (nonzero), clear the namespace's export
	// pattern list.

	if resetListFirst != 0 {
		if (*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr != uintptr(0) {
			for i = 0; i < (*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns; i++ {
				XTclpFree(tls, *(*uintptr)(unsafe.Pointer((*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr + uintptr(i)*8)))
			}
			XTclpFree(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr)
			(*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr = uintptr(0)
			if (*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns != 0 {
				(*Namespace)(unsafe.Pointer(nsPtr)).FexportLookupEpoch++
			}
			if (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength != 0 {
				(*Namespace)(unsafe.Pointer(nsPtr)).FcmdRefEpoch++
			}

			(*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns = 0
			(*Namespace)(unsafe.Pointer(nsPtr)).FmaxExportPatterns = 0
		}
	}

	// Check that the pattern doesn't have namespace qualifiers.

	XTclGetNamespaceForQualName(tls, interp, pattern, nsPtr, TCL_NAMESPACE_ONLY,
		bp+40, bp+48, bp+48, bp+56)

	if *(*uintptr)(unsafe.Pointer(bp + 40)) != nsPtr || libc.Xstrcmp(tls, pattern, *(*uintptr)(unsafe.Pointer(bp + 56))) != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+46363, libc.VaList(bp, pattern)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+46426, ts+10540, uintptr(0)))
		return TCL_ERROR
	}

	// Make sure that we don't already have the pattern in the array

	if (*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr != uintptr(0) {
		for i = 0; i < (*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns; i++ {
			if libc.Xstrcmp(tls, pattern, *(*uintptr)(unsafe.Pointer((*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr + uintptr(i)*8))) == 0 {
				// The pattern already exists in the list.

				return TCL_OK
			}
		}
	}

	// Make sure there is room in the namespace's pattern array for the new
	// pattern.

	neededElems = (*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns + 1
	if neededElems > (*Namespace)(unsafe.Pointer(nsPtr)).FmaxExportPatterns {
		(*Namespace)(unsafe.Pointer(nsPtr)).FmaxExportPatterns = func() int32 {
			if (*Namespace)(unsafe.Pointer(nsPtr)).FmaxExportPatterns != 0 {
				return 2 * (*Namespace)(unsafe.Pointer(nsPtr)).FmaxExportPatterns
			}
			return 5
		}()
		(*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr = XTcl_Realloc(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Namespace)(unsafe.Pointer(nsPtr)).FmaxExportPatterns)))
	}

	// Add the pattern to the namespace's array of export patterns.

	len = int32(libc.Xstrlen(tls, pattern))
	patternCpy = XTcl_Alloc(tls, uint32(len+1))
	libc.Xmemcpy(tls, patternCpy, pattern, uint64(len+1))

	*(*uintptr)(unsafe.Pointer((*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr + uintptr((*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns)*8)) = patternCpy
	(*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns++

	// The list of commands actually exported from the namespace might have
	// changed (probably will have!) However, we do not need to recompute this
	// just yet; next time we need the info will be soon enough.

	if (*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns != 0 {
		(*Namespace)(unsafe.Pointer(nsPtr)).FexportLookupEpoch++
	}
	if (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength != 0 {
		(*Namespace)(unsafe.Pointer(nsPtr)).FcmdRefEpoch++
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_AppendExportList --
//
//	Appends onto the argument object the list of export patterns for the
//	specified namespace.
//
// Results:
//	The return value is normally TCL_OK; in this case the object
//	referenced by objPtr has each export pattern appended to it. If an
//	error occurs, TCL_ERROR is returned and the interpreter's result holds
//	an error message.
//
// Side effects:
//	If necessary, the object referenced by objPtr is converted into a list
//	object.
//
//----------------------------------------------------------------------

func XTcl_AppendExportList(tls *libc.TLS, interp uintptr, namespacePtr uintptr, objPtr uintptr) int32 { /* tclNamesp.c:1497:1: */
	var nsPtr uintptr
	var i int32
	var result int32

	// If the specified namespace is NULL, use the current namespace.

	if namespacePtr == uintptr(0) {
		nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	} else {
		nsPtr = namespacePtr
	}

	// Append the export pattern list onto objPtr.

	for i = 0; i < (*Namespace)(unsafe.Pointer(nsPtr)).FnumExportPatterns; i++ {
		result = XTcl_ListObjAppendElement(tls, interp, objPtr,
			XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer((*Namespace)(unsafe.Pointer(nsPtr)).FexportArrayPtr + uintptr(i)*8)), -1))
		if result != TCL_OK {
			return result
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_Import --
//
//	Imports all of the commands matching a pattern into the namespace
//	specified by namespacePtr (or the current namespace if contextNsPtr is
//	NULL). This is done by creating a new command (the "imported command")
//	that points to the real command in its original namespace.
//
//	If matching commands are on the autoload path but haven't been loaded
//	yet, this command forces them to be loaded, then creates the links to
//	them.
//
// Results:
//	Returns TCL_OK if successful, or TCL_ERROR (along with an error
//	message in the interpreter's result) if something goes wrong.
//
// Side effects:
//	Creates new commands in the importing namespace. These indirect calls
//	back to the real command and are deleted if the real commands are
//	deleted.
//
//----------------------------------------------------------------------

func XTcl_Import(tls *libc.TLS, interp uintptr, namespacePtr uintptr, pattern uintptr, allowOverwrite int32) int32 { /* tclNamesp.c:1559:1: */
	bp := tls.Alloc(232)
	defer tls.Free(232)

	var nsPtr uintptr
	// var importNsPtr uintptr at bp+184, 8

	// var dummyPtr uintptr at bp+192, 8

	// var simplePattern uintptr at bp+200, 8

	var hPtr uintptr
	// var search Tcl_HashSearch at bp+208, 24

	// If the specified namespace is NULL, use the current namespace.

	if namespacePtr == uintptr(0) {
		nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	} else {
		nsPtr = namespacePtr
	}

	// First, invoke the "auto_import" command with the pattern being
	// imported. This command is part of the Tcl library. It looks for
	// imported commands in autoloaded libraries and loads them in. That way,
	// they will be found when we try to create links below.
	//
	// Note that we don't just call Tcl_EvalObjv() directly because we do not
	// want absence of the command to be a failure case.

	if XTcl_FindCommand(tls, interp, ts+46433, uintptr(0), TCL_GLOBAL_ONLY) != uintptr(0) {
		// var objv [2]uintptr at bp+168, 16

		var result int32

		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 168)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).Fbytes, ts+46433, uint64(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).Fbytes + 11)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).Flength = int32(uint64(unsafe.Sizeof([12]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + 168 + 1*8)) = XTcl_NewStringObj(tls, pattern, -1)

		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168)))).FrefCount++
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 168 + 1*8)))).FrefCount++
		result = XTcl_EvalObjv(tls, interp, 2, bp+168, TCL_GLOBAL_ONLY)
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 168))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 168 + 1*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}

		if result != TCL_OK {
			return TCL_ERROR
		}
		XTcl_ResetResult(tls, interp)
	}

	// From the pattern, find the namespace from which we are importing and
	// get the simple pattern (no namespace qualifiers or ::'s) at the end.

	if libc.Xstrlen(tls, pattern) == uint64(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+46445, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+46466, ts+20340, uintptr(0)))
		return TCL_ERROR
	}
	XTclGetNamespaceForQualName(tls, interp, pattern, nsPtr, TCL_NAMESPACE_ONLY,
		bp+184, bp+192, bp+192, bp+200)

	if *(*uintptr)(unsafe.Pointer(bp + 184)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+46473, libc.VaList(bp+32, pattern)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7699, ts+9760, pattern, uintptr(0)))
		return TCL_ERROR
	}
	if *(*uintptr)(unsafe.Pointer(bp + 184)) == nsPtr {
		if pattern == *(*uintptr)(unsafe.Pointer(bp + 200)) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+46514,
				libc.VaList(bp+80, pattern)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+88, ts+4178, ts+46466, ts+46560, uintptr(0)))
		} else {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

				ts+46567, libc.VaList(bp+120, pattern, (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 184 /* importNsPtr */)))).Fname)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+136, ts+4178, ts+46466, ts+43923, uintptr(0)))
		}
		return TCL_ERROR
	}

	// Scan through the command table in the source namespace and look for
	// exported commands that match the string pattern. Create an "imported
	// command" in the current namespace for each imported command; these
	// commands redirect their invocations to the "real" command.

	if *(*uintptr)(unsafe.Pointer(bp + 200)) != uintptr(0) && libc.Xstrpbrk(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), ts+14153) == uintptr(0) {
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 184 /* importNsPtr */)) + 160 /* &.cmdTable */)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 184 /* importNsPtr */))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 200 /* simplePattern */)))
		if hPtr == uintptr(0) {
			return TCL_OK
		}
		return sDoImport(tls, interp, nsPtr, hPtr, *(*uintptr)(unsafe.Pointer(bp + 200 /* simplePattern */)), pattern,
			*(*uintptr)(unsafe.Pointer(bp + 184 /* importNsPtr */)), allowOverwrite)
	}
	for hPtr = XTcl_FirstHashEntry(tls, *(*uintptr)(unsafe.Pointer(bp + 184))+160, bp+208); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp+208) {
		var cmdName uintptr = func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 184))+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 184))+160)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(hPtr + 32))
			}
			return hPtr + 32
		}()

		if XTcl_StringMatch(tls, cmdName, *(*uintptr)(unsafe.Pointer(bp + 200))) != 0 && sDoImport(tls, interp, nsPtr, hPtr, cmdName, pattern, *(*uintptr)(unsafe.Pointer(bp + 184)),
			allowOverwrite) == TCL_ERROR {
			return TCL_ERROR
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DoImport --
//
//	Import a particular command from one namespace into another. Helper
//	for Tcl_Import().
//
// Results:
//	Standard Tcl result code. If TCL_ERROR, appends an error message to
//	the interpreter result.
//
// Side effects:
//	A new command is created in the target namespace unless this is a
//	reimport of exactly the same command as before.
//
//----------------------------------------------------------------------

func sDoImport(tls *libc.TLS, interp uintptr, nsPtr uintptr, hPtr uintptr, cmdName uintptr, pattern uintptr, importNsPtr uintptr, allowOverwrite int32) int32 { /* tclNamesp.c:1699:1: */
	bp := tls.Alloc(304)
	defer tls.Free(304)

	var i int32 = 0
	var exported int32 = 0
	var found uintptr

	// The command cmdName in the source namespace matches the pattern. Check
	// whether it was exported. If it wasn't, we ignore it.

	for !(exported != 0) && i < (*Namespace)(unsafe.Pointer(importNsPtr)).FnumExportPatterns {
		exported = exported | XTcl_StringMatch(tls, cmdName,
			*(*uintptr)(unsafe.Pointer((*Namespace)(unsafe.Pointer(importNsPtr)).FexportArrayPtr + uintptr(libc.PostIncInt32(&i, 1))*8)))
	}
	if !(exported != 0) {
		return TCL_OK
	}

	// Unless there is a name clash, create an imported command in the current
	// namespace that refers to cmdPtr.

	found = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(nsPtr + 160 /* &.cmdTable */)).FfindProc})).f(tls, nsPtr+160 /* &.cmdTable */, cmdName)
	if found == uintptr(0) || allowOverwrite != 0 {
		// Create the imported command and its client data. To create the new
		// command in the current namespace, generate a fully qualified name
		// for it.

		// var ds Tcl_DString at bp+88, 216

		var importedCmd Tcl_Command
		var dataPtr uintptr
		var cmdPtr uintptr
		var refPtr uintptr

		XTcl_DStringInit(tls, bp+88)
		XTcl_DStringAppend(tls, bp+88, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName, -1)
		if nsPtr != (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr {
			XTcl_DStringAppend(tls, bp+88, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
		}
		XTcl_DStringAppend(tls, bp+88, cmdName, -1)

		// Check whether creating the new imported command in the current
		// namespace would create a cycle of imported command references.

		cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		if found != uintptr(0) && (*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc == *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteImportedCmd})) {
			var overwrite uintptr = (*Tcl_HashEntry)(unsafe.Pointer(found)).FclientData
			var linkCmd uintptr = cmdPtr

			for (*Command)(unsafe.Pointer(linkCmd)).FdeleteProc == *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteImportedCmd})) {
				dataPtr = (*Command)(unsafe.Pointer(linkCmd)).FobjClientData
				linkCmd = (*ImportedCmdData)(unsafe.Pointer(dataPtr)).FrealCmdPtr
				if overwrite == linkCmd {
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

						ts+46635,
						libc.VaList(bp, pattern, (*Tcl_DString)(unsafe.Pointer(bp+88)).Fstring)))
					XTcl_DStringFree(tls, bp+88)
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+46466, ts+46699, uintptr(0)))
					return TCL_ERROR
				}
			}
		}

		dataPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ImportedCmdData{})))
		importedCmd = XTcl_NRCreateCommand(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+88)).Fstring,
			*(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{sInvokeImportedCmd})), *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{sInvokeImportedNRCmd})), dataPtr,
			*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteImportedCmd})))
		(*ImportedCmdData)(unsafe.Pointer(dataPtr)).FrealCmdPtr = cmdPtr
		(*ImportedCmdData)(unsafe.Pointer(dataPtr)).FselfPtr = importedCmd
		(*Command1)(unsafe.Pointer((*ImportedCmdData)(unsafe.Pointer(dataPtr)).FselfPtr)).FcompileProc = (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc
		XTcl_DStringFree(tls, bp+88)

		// Create an ImportRef structure describing this new import command
		// and add it to the import ref list in the "real" command.

		refPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ImportRef{})))
		(*ImportRef)(unsafe.Pointer(refPtr)).FimportedCmdPtr = importedCmd
		(*ImportRef)(unsafe.Pointer(refPtr)).FnextPtr = (*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr
		(*Command)(unsafe.Pointer(cmdPtr)).FimportRefPtr = refPtr
	} else {
		var overwrite uintptr = (*Tcl_HashEntry)(unsafe.Pointer(found)).FclientData

		if (*Command)(unsafe.Pointer(overwrite)).FdeleteProc == *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteImportedCmd})) {
			var dataPtr uintptr = (*Command)(unsafe.Pointer(overwrite)).FobjClientData

			if (*ImportedCmdData)(unsafe.Pointer(dataPtr)).FrealCmdPtr == (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData {
				// Repeated import of same command is acceptable.

				return TCL_OK
			}
		}
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+46704, libc.VaList(bp+48, cmdName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+4178, ts+46466, ts+46746, uintptr(0)))
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ForgetImport --
//
//	Deletes commands previously imported into the namespace indicated.
//	The by namespacePtr, or the current namespace of interp, when
//	namespacePtr is NULL. The pattern controls which imported commands are
//	deleted. A simple pattern, one without namespace separators, matches
//	the current command names of imported commands in the namespace.
//	Matching imported commands are deleted. A qualified pattern is
//	interpreted as deletion selection on the basis of where the command is
//	imported from. The original command and "first link" command for each
//	imported command are determined, and they are matched against the
//	pattern. A match leads to deletion of the imported command.
//
// Results:
//	Returns TCL_ERROR and records an error message in the interp result if
//	a namespace qualified pattern refers to a namespace that does not
//	exist. Otherwise, returns TCL_OK.
//
// Side effects:
//	May delete commands.
//
//----------------------------------------------------------------------

func XTcl_ForgetImport(tls *libc.TLS, interp uintptr, namespacePtr uintptr, pattern uintptr) int32 { /* tclNamesp.c:1843:1: */
	bp := tls.Alloc(160)
	defer tls.Free(160)

	var nsPtr uintptr
	// var sourceNsPtr uintptr at bp+48, 8

	// var dummyPtr uintptr at bp+56, 8

	// var simplePattern uintptr at bp+64, 8

	var cmdName uintptr
	var hPtr uintptr
	// var search Tcl_HashSearch at bp+72, 24

	// If the specified namespace is NULL, use the current namespace.

	if namespacePtr == uintptr(0) {
		nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	} else {
		nsPtr = namespacePtr
	}

	// Parse the pattern into its namespace-qualification (if any) and the
	// simple pattern.

	XTclGetNamespaceForQualName(tls, interp, pattern, nsPtr, TCL_NAMESPACE_ONLY,
		bp+48, bp+56, bp+56, bp+64)

	if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+46756,
			libc.VaList(bp, pattern)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+9760, pattern, uintptr(0)))
		return TCL_ERROR
	}

	if libc.Xstrcmp(tls, pattern, *(*uintptr)(unsafe.Pointer(bp + 64))) == 0 {
		// The pattern is simple. Delete any imported commands that match it.

		if libc.Xstrpbrk(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), ts+14153) == uintptr(0) {
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(nsPtr + 160 /* &.cmdTable */)).FfindProc})).f(tls, nsPtr+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 64 /* simplePattern */)))
			if hPtr != uintptr(0) {
				var cmdPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

				if cmdPtr != 0 && (*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc == *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteImportedCmd})) {
					XTcl_DeleteCommandFromToken(tls, interp, cmdPtr)
				}
			}
			return TCL_OK
		}
		for hPtr = XTcl_FirstHashEntry(tls, nsPtr+160, bp+72); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp+72) {
			var cmdPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

			if (*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc != *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteImportedCmd})) {
				continue
			}
			cmdName = func() uintptr {
				if (*Tcl_HashTable)(unsafe.Pointer(nsPtr+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(nsPtr+160)).FkeyType == -1 {
					return *(*uintptr)(unsafe.Pointer(hPtr + 32))
				}
				return hPtr + 32
			}()
			if XTcl_StringMatch(tls, cmdName, *(*uintptr)(unsafe.Pointer(bp + 64))) != 0 {
				XTcl_DeleteCommandFromToken(tls, interp, cmdPtr)
			}
		}
		return TCL_OK
	}

	// The pattern was namespace-qualified.

	for hPtr = XTcl_FirstHashEntry(tls, nsPtr+160, bp+72); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp+72) {
		// var info Tcl_CmdInfo at bp+96, 64

		var token Tcl_Command = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		var origin Tcl_Command = XTclGetOriginalCommand(tls, token)

		if XTcl_GetCommandInfoFromToken(tls, origin, bp+96) == 0 {
			continue // Not an imported command.
		}
		if (*Tcl_CmdInfo)(unsafe.Pointer(bp+96)).FnamespacePtr != *(*uintptr)(unsafe.Pointer(bp + 48)) {
			// Original not in namespace we're matching. Check the first link
			// in the import chain.

			var cmdPtr uintptr = token
			var dataPtr uintptr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
			var firstToken Tcl_Command = (*ImportedCmdData)(unsafe.Pointer(dataPtr)).FrealCmdPtr

			if firstToken == origin {
				continue
			}
			XTcl_GetCommandInfoFromToken(tls, firstToken, bp+96)
			if (*Tcl_CmdInfo)(unsafe.Pointer(bp+96)).FnamespacePtr != *(*uintptr)(unsafe.Pointer(bp + 48)) {
				continue
			}
			origin = firstToken
		}
		if XTcl_StringMatch(tls, XTcl_GetCommandName(tls, uintptr(0), origin), *(*uintptr)(unsafe.Pointer(bp + 64))) != 0 {
			XTcl_DeleteCommandFromToken(tls, interp, token)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclGetOriginalCommand --
//
//	An imported command is created in an namespace when a "real" command
//	is imported from another namespace. If the specified command is an
//	imported command, this function returns the original command it refers
//	to.
//
// Results:
//	If the command was imported into a sequence of namespaces a, b,...,n
//	where each successive namespace just imports the command from the
//	previous namespace, this function returns the Tcl_Command token in the
//	first namespace, a. Otherwise, if the specified command is not an
//	imported command, the function returns NULL.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetOriginalCommand(tls *libc.TLS, command Tcl_Command) Tcl_Command { /* tclNamesp.c:1977:1: */
	var cmdPtr uintptr = command
	var dataPtr uintptr

	if (*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc != *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteImportedCmd})) {
		return uintptr(0)
	}

	for (*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc == *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteImportedCmd})) {
		dataPtr = (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
		cmdPtr = (*ImportedCmdData)(unsafe.Pointer(dataPtr)).FrealCmdPtr
	}
	return cmdPtr
}

//----------------------------------------------------------------------
//
// InvokeImportedCmd --
//
//	Invoked by Tcl whenever the user calls an imported command that was
//	created by Tcl_Import. Finds the "real" command (in another
//	namespace), and passes control to it.
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns a result in the interpreter's result object. If anything goes
//	wrong, the result object is set to an error message.
//
//----------------------------------------------------------------------

func sInvokeImportedNRCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:2015:1: */
	var dataPtr uintptr = clientData
	var realCmdPtr uintptr = (*ImportedCmdData)(unsafe.Pointer(dataPtr)).FrealCmdPtr

	XTclSkipTailcall(tls, interp)
	return XTclNREvalObjv(tls, interp, objc, objv, TCL_EVAL_NOERR, realCmdPtr)
}

func sInvokeImportedCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:2030:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sInvokeImportedNRCmd})), clientData,
		objc, objv)
}

//----------------------------------------------------------------------
//
// DeleteImportedCmd --
//
//	Invoked by Tcl whenever an imported command is deleted. The "real"
//	command keeps a list of all the imported commands that refer to it, so
//	those imported commands can be deleted when the real command is
//	deleted. This function removes the imported command reference from the
//	real command's list, and frees up the memory associated with the
//	imported command.
//
// Results:
//	None.
//
// Side effects:
//	Removes the imported command from the real command's import list.
//
//----------------------------------------------------------------------

func sDeleteImportedCmd(tls *libc.TLS, clientData ClientData) { /* tclNamesp.c:2063:1: */
	var dataPtr uintptr = clientData
	var realCmdPtr uintptr = (*ImportedCmdData)(unsafe.Pointer(dataPtr)).FrealCmdPtr
	var selfPtr uintptr = (*ImportedCmdData)(unsafe.Pointer(dataPtr)).FselfPtr
	var refPtr uintptr
	var prevPtr uintptr

	prevPtr = uintptr(0)
	for refPtr = (*Command)(unsafe.Pointer(realCmdPtr)).FimportRefPtr; refPtr != uintptr(0); refPtr = (*ImportRef)(unsafe.Pointer(refPtr)).FnextPtr {
		if (*ImportRef)(unsafe.Pointer(refPtr)).FimportedCmdPtr == selfPtr {
			// Remove *refPtr from real command's list of imported commands
			// that refer to it.

			if prevPtr == uintptr(0) { // refPtr is first in list.
				(*Command)(unsafe.Pointer(realCmdPtr)).FimportRefPtr = (*ImportRef)(unsafe.Pointer(refPtr)).FnextPtr
			} else {
				(*ImportRef)(unsafe.Pointer(prevPtr)).FnextPtr = (*ImportRef)(unsafe.Pointer(refPtr)).FnextPtr
			}
			XTclpFree(tls, refPtr)
			XTclpFree(tls, dataPtr)
			return
		}
		prevPtr = refPtr
	}

	XTcl_Panic(tls, ts+46807, 0)
}

//----------------------------------------------------------------------
//
// TclGetNamespaceForQualName --
//
//	Given a qualified name specifying a command, variable, or namespace,
//	and a namespace in which to resolve the name, this function returns a
//	pointer to the namespace that contains the item. A qualified name
//	consists of the "simple" name of an item qualified by the names of an
//	arbitrary number of containing namespace separated by "::"s. If the
//	qualified name starts with "::", it is interpreted absolutely from the
//	global namespace. Otherwise, it is interpreted relative to the
//	namespace specified by cxtNsPtr if it is non-NULL. If cxtNsPtr is
//	NULL, the name is interpreted relative to the current namespace.
//
//	A relative name like "foo::bar::x" can be found starting in either the
//	current namespace or in the global namespace. So each search usually
//	follows two tracks, and two possible namespaces are returned. If the
//	function sets either *nsPtrPtr or *altNsPtrPtr to NULL, then that path
//	failed.
//
//	If "flags" contains TCL_GLOBAL_ONLY, the relative qualified name is
//	sought only in the global :: namespace. The alternate search (also)
//	starting from the global namespace is ignored and *altNsPtrPtr is set
//	NULL.
//
//	If "flags" contains TCL_NAMESPACE_ONLY, the relative qualified name is
//	sought only in the namespace specified by cxtNsPtr. The alternate
//	search starting from the global namespace is ignored and *altNsPtrPtr
//	is set NULL. If both TCL_GLOBAL_ONLY and TCL_NAMESPACE_ONLY are
//	specified, TCL_GLOBAL_ONLY is ignored and the search starts from the
//	namespace specified by cxtNsPtr.
//
//	If "flags" contains TCL_CREATE_NS_IF_UNKNOWN, all namespace components
//	of the qualified name that cannot be found are automatically created
//	within their specified parent. This makes sure that functions like
//	Tcl_CreateCommand always succeed. There is no alternate search path,
//	so *altNsPtrPtr is set NULL.
//
//	If "flags" contains TCL_FIND_ONLY_NS, the qualified name is treated as
//	a reference to a namespace, and the entire qualified name is followed.
//	If the name is relative, the namespace is looked up only in the
//	current namespace. A pointer to the namespace is stored in *nsPtrPtr
//	and NULL is stored in *simpleNamePtr. Otherwise, if TCL_FIND_ONLY_NS
//	is not specified, only the leading components are treated as namespace
//	names, and a pointer to the simple name of the final component is
//	stored in *simpleNamePtr.
//
// Results:
//	It sets *nsPtrPtr and *altNsPtrPtr to point to the two possible
//	namespaces which represent the last (containing) namespace in the
//	qualified name. If the function sets either *nsPtrPtr or *altNsPtrPtr
//	to NULL, then the search along that path failed. The function also
//	stores a pointer to the simple name of the final component in
//	*simpleNamePtr. If the qualified name is "::" or was treated as a
//	namespace reference (TCL_FIND_ONLY_NS), the function stores a pointer
//	to the namespace in *nsPtrPtr, NULL in *altNsPtrPtr, and sets
//	*simpleNamePtr to point to an empty string.
//
//	If there is an error, this function returns TCL_ERROR. If "flags"
//	contains TCL_LEAVE_ERR_MSG, an error message is returned in the
//	interpreter's result object. Otherwise, the interpreter's result
//	object is left unchanged.
//
//	*actualCxtPtrPtr is set to the actual context namespace. It is set to
//	the input context namespace pointer in cxtNsPtr. If cxtNsPtr is NULL,
//	it is set to the current namespace context.
//
//	For backwards compatibility with the TclPro byte code loader, this
//	function always returns TCL_OK.
//
// Side effects:
//	If "flags" contains TCL_CREATE_NS_IF_UNKNOWN, new namespaces may be
//	created.
//
//----------------------------------------------------------------------

func XTclGetNamespaceForQualName(tls *libc.TLS, interp uintptr, qualName uintptr, cxtNsPtr uintptr, flags int32, nsPtrPtr uintptr, altNsPtrPtr uintptr, actualCxtPtrPtr uintptr, simpleNamePtr uintptr) int32 { /* tclNamesp.c:2175:1: */
	bp := tls.Alloc(232)
	defer tls.Free(232)

	var iPtr uintptr = interp
	var nsPtr uintptr = cxtNsPtr
	var altNsPtr uintptr
	var globalNsPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
	var start uintptr
	var end uintptr
	var nsName uintptr
	var entryPtr uintptr
	// var buffer Tcl_DString at bp+8, 216

	var len int32

	// Determine the context namespace nsPtr in which to start the primary
	// search. If the qualName name starts with a "::" or TCL_GLOBAL_ONLY was
	// specified, search from the global namespace. Otherwise, use the
	// namespace given in cxtNsPtr, or if that is NULL, use the current
	// namespace context. Note that we always treat two or more adjacent ":"s
	// as a namespace separator.

	if flags&TCL_GLOBAL_ONLY != 0 {
		nsPtr = globalNsPtr
	} else if nsPtr == uintptr(0) {
		nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr
	}

	start = qualName // Points to start of qualifying
	// namespace.
	if int32(*(*int8)(unsafe.Pointer(qualName))) == ':' && int32(*(*int8)(unsafe.Pointer(qualName + uintptr(1)))) == ':' {
		start = qualName + uintptr(2) // Skip over the initial ::
		for int32(*(*int8)(unsafe.Pointer(start))) == ':' {
			start++ // Skip over a subsequent :
		}
		nsPtr = globalNsPtr
		if int32(*(*int8)(unsafe.Pointer(start))) == 0 { // qualName is just two or more
			// ":"s.
			*(*uintptr)(unsafe.Pointer(nsPtrPtr)) = globalNsPtr
			*(*uintptr)(unsafe.Pointer(altNsPtrPtr)) = uintptr(0)
			*(*uintptr)(unsafe.Pointer(actualCxtPtrPtr)) = globalNsPtr
			*(*uintptr)(unsafe.Pointer(simpleNamePtr)) = start // Points to empty string.
			return TCL_OK
		}
	}
	*(*uintptr)(unsafe.Pointer(actualCxtPtrPtr)) = nsPtr

	// Start an alternate search path starting with the global namespace.
	// However, if the starting context is the global namespace, or if the
	// flag is set to search only the namespace *cxtNsPtr, ignore the
	// alternate search path.

	altNsPtr = globalNsPtr
	if nsPtr == globalNsPtr ||
		flags&(TCL_NAMESPACE_ONLY|TCL_FIND_ONLY_NS) != 0 {
		altNsPtr = uintptr(0)
	}

	// Loop to resolve each namespace qualifier in qualName.

	XTcl_DStringInit(tls, bp+8)
	end = start
	for int32(*(*int8)(unsafe.Pointer(start))) != 0 {
		// Find the next namespace qualifier (i.e., a name ending in "::") or
		// the end of the qualified name (i.e., a name ending in "\0"). Set
		// len to the number of characters, starting from start, in the name;
		// set end to point after the "::"s or at the "\0".

		len = 0
		for end = start; int32(*(*int8)(unsafe.Pointer(end))) != 0; end++ {
			if int32(*(*int8)(unsafe.Pointer(end))) == ':' && int32(*(*int8)(unsafe.Pointer(end + uintptr(1)))) == ':' {
				end += uintptr(2) // Skip over the initial ::
				for int32(*(*int8)(unsafe.Pointer(end))) == ':' {
					end++ // Skip over the subsequent :
				}
				break // Exit for loop; end is after ::'s
			}
			len++
		}

		if int32(*(*int8)(unsafe.Pointer(end))) == 0 && !((int64(end)-int64(start))/1 >= int64(2) && int32(*(*int8)(unsafe.Pointer(end - uintptr(1)))) == ':' && int32(*(*int8)(unsafe.Pointer(end - uintptr(2)))) == ':') {
			// qualName ended with a simple name at start. If TCL_FIND_ONLY_NS
			// was specified, look this up as a namespace. Otherwise, start is
			// the name of a cmd or var and we are done.

			if flags&TCL_FIND_ONLY_NS != 0 {
				nsName = start
			} else {
				*(*uintptr)(unsafe.Pointer(nsPtrPtr)) = nsPtr
				*(*uintptr)(unsafe.Pointer(altNsPtrPtr)) = altNsPtr
				*(*uintptr)(unsafe.Pointer(simpleNamePtr)) = start
				XTcl_DStringFree(tls, bp+8)
				return TCL_OK
			}
		} else {
			// start points to the beginning of a namespace qualifier ending
			// in "::". end points to the start of a name in that namespace
			// that might be empty. Copy the namespace qualifier to a buffer
			// so it can be null terminated. We can't modify the incoming
			// qualName since it may be a string constant.

			XTcl_DStringSetLength(tls, bp+8, 0)
			XTcl_DStringAppend(tls, bp+8, start, len)
			nsName = (*Tcl_DString)(unsafe.Pointer(bp + 8)).Fstring
		}

		// Look up the namespace qualifier nsName in the current namespace
		// context. If it isn't found but TCL_CREATE_NS_IF_UNKNOWN is set,
		// create that qualifying namespace. This is needed for functions like
		// Tcl_CreateCommand that cannot fail.

		if nsPtr != uintptr(0) {
			entryPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(nsPtr + 40 /* &.childTable */)).FfindProc})).f(tls, nsPtr+40 /* &.childTable */, nsName)
			if entryPtr != uintptr(0) {
				nsPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
			} else if flags&TCL_CREATE_NS_IF_UNKNOWN != 0 {
				// var framePtr uintptr at bp+224, 8

				XTclPushStackFrame(tls, interp, bp+224,
					nsPtr /*isProcCallFrame*/, 0)

				nsPtr = XTcl_CreateNamespace(tls, interp, nsName, uintptr(0), uintptr(0))
				XTclPopStackFrame(tls, interp)

				if nsPtr == uintptr(0) {
					XTcl_Panic(tls, ts+46883, libc.VaList(bp, nsName))
				}
			} else { // Namespace not found and was not
				// created.
				nsPtr = uintptr(0)
			}
		}

		// Look up the namespace qualifier in the alternate search path too.

		if altNsPtr != uintptr(0) {
			entryPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(altNsPtr + 40 /* &.childTable */)).FfindProc})).f(tls, altNsPtr+40 /* &.childTable */, nsName)
			if entryPtr != uintptr(0) {
				altNsPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
			} else {
				altNsPtr = uintptr(0)
			}
		}

		// If both search paths have failed, return NULL results.

		if nsPtr == uintptr(0) && altNsPtr == uintptr(0) {
			*(*uintptr)(unsafe.Pointer(nsPtrPtr)) = uintptr(0)
			*(*uintptr)(unsafe.Pointer(altNsPtrPtr)) = uintptr(0)
			*(*uintptr)(unsafe.Pointer(simpleNamePtr)) = uintptr(0)
			XTcl_DStringFree(tls, bp+8)
			return TCL_OK
		}

		start = end
	}

	// We ignore trailing "::"s in a namespace name, but in a command or
	// variable name, trailing "::"s refer to the cmd or var named {}.

	if flags&TCL_FIND_ONLY_NS != 0 || end > start && int32(*(*int8)(unsafe.Pointer(end - uintptr(1)))) != ':' {
		*(*uintptr)(unsafe.Pointer(simpleNamePtr)) = uintptr(0) // Found namespace name.
	} else {
		*(*uintptr)(unsafe.Pointer(simpleNamePtr)) = end // Found cmd/var: points to empty
		// string.
	}

	// As a special case, if we are looking for a namespace and qualName is ""
	// and the current active namespace (nsPtr) is not the global namespace,
	// return NULL (no namespace was found). This is because namespaces can
	// not have empty names except for the global namespace.

	if flags&TCL_FIND_ONLY_NS != 0 && int32(*(*int8)(unsafe.Pointer(qualName))) == 0 &&
		nsPtr != globalNsPtr {
		nsPtr = uintptr(0)
	}

	*(*uintptr)(unsafe.Pointer(nsPtrPtr)) = nsPtr
	*(*uintptr)(unsafe.Pointer(altNsPtrPtr)) = altNsPtr
	XTcl_DStringFree(tls, bp+8)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclEnsureNamespace --
//
//	Provide a namespace that is not deleted.
//
// Value
//
//	namespacePtr, if it is not scheduled for deletion, or a pointer to a
//	new namespace with the same name otherwise.
//
// Effect
//	None.
//
//----------------------------------------------------------------------
func XTclEnsureNamespace(tls *libc.TLS, interp uintptr, namespacePtr uintptr) uintptr { /* tclNamesp.c:2446:15: */
	var nsPtr uintptr = namespacePtr
	if !((*Namespace)(unsafe.Pointer(nsPtr)).Fflags&NS_DYING != 0) {
		return namespacePtr
	}
	return XTcl_CreateNamespace(tls, interp, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName, uintptr(0), uintptr(0))
}

//----------------------------------------------------------------------
//
// Tcl_FindNamespace --
//
//	Searches for a namespace.
//
// Results:
//	Returns a pointer to the namespace if it is found. Otherwise, returns
//	NULL and leaves an error message in the interpreter's result object if
//	"flags" contains TCL_LEAVE_ERR_MSG.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FindNamespace(tls *libc.TLS, interp uintptr, name uintptr, contextNsPtr uintptr, flags int32) uintptr { /* tclNamesp.c:2476:15: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	// var nsPtr uintptr at bp+48, 8

	// var dummy1Ptr uintptr at bp+56, 8

	// var dummy2Ptr uintptr at bp+64, 8

	// var dummy uintptr at bp+72, 8

	// Find the namespace(s) that contain the specified namespace name. Add
	// the TCL_FIND_ONLY_NS flag to resolve the name all the way down to its
	// last component, a namespace.

	XTclGetNamespaceForQualName(tls, interp, name, contextNsPtr,
		flags|TCL_FIND_ONLY_NS, bp+48, bp+56, bp+64, bp+72)

	if *(*uintptr)(unsafe.Pointer(bp + 48)) != uintptr(0) {
		return *(*uintptr)(unsafe.Pointer(bp + 48 /* nsPtr */))
	}

	if flags&TCL_LEAVE_ERR_MSG != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+46915, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+9760, name, uintptr(0)))
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_FindCommand --
//
//	Searches for a command.
//
// Results:
//	Returns a token for the command if it is found. Otherwise, if it can't
//	be found or there is an error, returns NULL and leaves an error
//	message in the interpreter's result object if "flags" contains
//	TCL_LEAVE_ERR_MSG.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FindCommand(tls *libc.TLS, interp uintptr, name uintptr, contextNsPtr uintptr, flags int32) Tcl_Command { /* tclNamesp.c:2538:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	var iPtr uintptr = interp
	// var cxtNsPtr uintptr at bp+96, 8

	var entryPtr uintptr
	var cmdPtr uintptr
	// var simpleName uintptr at bp+72, 8

	var result int32

	// If this namespace has a command resolver, then give it first crack at
	// the command resolution. If the interpreter has any command resolvers,
	// consult them next. The command resolver functions may return a
	// Tcl_Command value, they may signal to continue onward, or they may
	// signal an error.

	if flags&TCL_GLOBAL_ONLY != 0 || !(libc.Xstrncmp(tls, name, ts+7376, uint64(2)) != 0) {
		*(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)) = (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr
	} else if contextNsPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)) = contextNsPtr
	} else {
		*(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)) = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	}

	if (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FcmdResProc != uintptr(0) || (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr != uintptr(0) {
		var resPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr
		// var cmd Tcl_Command at bp+48, 8

		if (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FcmdResProc != 0 {
			result = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)))).FcmdResProc})).f(tls, interp, name,
				*(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)), flags, bp+48)
		} else {
			result = TCL_CONTINUE
		}

		for result == TCL_CONTINUE && resPtr != 0 {
			if (*ResolverScheme)(unsafe.Pointer(resPtr)).FcmdResProc != 0 {
				result = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
				})(unsafe.Pointer(&struct{ uintptr }{(*ResolverScheme)(unsafe.Pointer(resPtr)).FcmdResProc})).f(tls, interp, name,
					*(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)), flags, bp+48 /* &cmd */)
			}
			resPtr = (*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr
		}

		if result == TCL_OK {
			*(*int32)(unsafe.Pointer(*(*Tcl_Command)(unsafe.Pointer(bp + 48)) + 80)) |= CMD_VIA_RESOLVER
			return *(*Tcl_Command)(unsafe.Pointer(bp + 48 /* cmd */))

		} else if result != TCL_CONTINUE {
			return uintptr(0)
		}
	}

	// Find the namespace(s) that contain the command.

	cmdPtr = uintptr(0)
	if (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FcommandPathLength != 0 && libc.Xstrncmp(tls, name, ts+7376, uint64(2)) != 0 &&
		!(flags&TCL_NAMESPACE_ONLY != 0) {
		var i int32
		var pathNsPtr uintptr
		// var realNsPtr uintptr at bp+56, 8

		// var dummyNsPtr uintptr at bp+64, 8

		XTclGetNamespaceForQualName(tls, interp, name, *(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)),
			TCL_NAMESPACE_ONLY, bp+56, bp+64, bp+64,
			bp+72)
		if *(*uintptr)(unsafe.Pointer(bp + 56)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(bp + 72)) != uintptr(0) {
			if *(*uintptr)(unsafe.Pointer(bp + 96)) == *(*uintptr)(unsafe.Pointer(bp + 56)) ||
				!((*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)))).Fflags&NS_DYING != 0) {
				entryPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* realNsPtr */)) + 160 /* &.cmdTable */)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* realNsPtr */))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 72 /* simpleName */)))
				if entryPtr != uintptr(0) {
					cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
				}
			}
		}

		// Next, check along the path.

		for i = 0; i < (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)))).FcommandPathLength && cmdPtr == uintptr(0); i++ {
			pathNsPtr = (*NamespacePathEntry)(unsafe.Pointer((*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)))).FcommandPathArray + uintptr(i)*32)).FnsPtr
			if pathNsPtr == uintptr(0) {
				continue
			}
			XTclGetNamespaceForQualName(tls, interp, name, pathNsPtr,
				TCL_NAMESPACE_ONLY, bp+56, bp+64, bp+64,
				bp+72)
			if *(*uintptr)(unsafe.Pointer(bp + 56)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(bp + 72)) != uintptr(0) &&
				!((*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)))).Fflags&NS_DYING != 0) {
				entryPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* realNsPtr */)) + 160 /* &.cmdTable */)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* realNsPtr */))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 72 /* simpleName */)))
				if entryPtr != uintptr(0) {
					cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
				}
			}
		}

		// If we've still not found the command, look in the global namespace
		// as a last resort.

		if cmdPtr == uintptr(0) {
			XTclGetNamespaceForQualName(tls, interp, name, uintptr(0),
				TCL_GLOBAL_ONLY, bp+56, bp+64, bp+64,
				bp+72)
			if *(*uintptr)(unsafe.Pointer(bp + 56)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(bp + 72)) != uintptr(0) &&
				!((*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56)))).Fflags&NS_DYING != 0) {
				entryPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* realNsPtr */)) + 160 /* &.cmdTable */)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* realNsPtr */))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 72 /* simpleName */)))
				if entryPtr != uintptr(0) {
					cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
				}
			}
		}
	} else {
		// var nsPtr [2]uintptr at bp+80, 16

		var search int32

		XTclGetNamespaceForQualName(tls, interp, name, *(*uintptr)(unsafe.Pointer(bp + 96 /* cxtNsPtr */)),
			flags, bp+80, bp+80+1*8, bp+96, bp+72)

		// Look for the command in the command table of its namespace. Be sure
		// to check both possible search paths: from the specified namespace
		// context and from the global namespace.

		for search = 0; search < 2 && cmdPtr == uintptr(0); search++ {
			if *(*uintptr)(unsafe.Pointer(bp + 80 + uintptr(search)*8)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(bp + 72)) != uintptr(0) {
				entryPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* &nsPtr[0] */ + uintptr(search)*8)) + 160 /* &.cmdTable */)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* &nsPtr[0] */ + uintptr(search)*8))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 72 /* simpleName */)))
				if entryPtr != uintptr(0) {
					cmdPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
				}
			}
		}
	}

	if cmdPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(cmdPtr + 80)) &= libc.CplInt32(CMD_VIA_RESOLVER)
		return cmdPtr
	}

	if flags&TCL_LEAVE_ERR_MSG != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+46938, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+7857, name, uintptr(0)))
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclResetShadowedCmdRefs --
//
//	Called when a command is added to a namespace to check for existing
//	command references that the new command may invalidate. Consider the
//	following cases that could happen when you add a command "foo" to a
//	namespace "b":
//	   1. It could shadow a command named "foo" at the global scope. If
//	      it does, all command references in the namespace "b" are
//	      suspect.
//	   2. Suppose the namespace "b" resides in a namespace "a". Then to
//	      "a" the new command "b::foo" could shadow another command
//	      "b::foo" in the global namespace. If so, then all command
//	      references in "a" * are suspect.
//	The same checks are applied to all parent namespaces, until we reach
//	the global :: namespace.
//
// Results:
//	None.
//
// Side effects:
//	If the new command shadows an existing command, the cmdRefEpoch
//	counter is incremented in each namespace that sees the shadow. This
//	invalidates all command references that were previously cached in that
//	namespace. The next time the commands are used, they are resolved from
//	scratch.
//
//----------------------------------------------------------------------

func XTclResetShadowedCmdRefs(tls *libc.TLS, interp uintptr, newCmdPtr uintptr) { /* tclNamesp.c:2741:1: */
	var cmdName uintptr
	var hPtr uintptr
	var nsPtr uintptr
	var trailNsPtr uintptr
	var shadowNsPtr uintptr
	var globalNsPtr uintptr = (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr
	var found int32
	var i int32
	var trailFront int32 = -1
	var trailSize int32 = 5 // Formerly NUM_TRAIL_ELEMS.
	var trailPtr uintptr = XTclStackAlloc(tls, interp,
		int32(uint64(trailSize)*uint64(unsafe.Sizeof(uintptr(0)))))

	// Start at the namespace containing the new command, and work up through
	// the list of parents. Stop just before the global namespace, since the
	// global namespace can't "shadow" its own entries.
	//
	// The namespace "trail" list we build consists of the names of each
	// namespace that encloses the new command, in order from outermost to
	// innermost: for example, "a" then "b". Each iteration of this loop
	// eventually extends the trail upwards by one namespace, nsPtr. We use
	// this trail list to see if nsPtr (e.g. "a" in 2. above) could have
	// now-invalid cached command references. This will happen if nsPtr
	// (e.g. "a") contains a sequence of child namespaces (e.g. "b") such that
	// there is a identically-named sequence of child namespaces starting from
	// :: (e.g. "::b") whose tail namespace contains a command also named
	// cmdName.

	cmdName = func() uintptr {
		if (*Tcl_HashTable)(unsafe.Pointer((*Tcl_HashEntry)(unsafe.Pointer((*Command)(unsafe.Pointer(newCmdPtr)).FhPtr)).FtablePtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Tcl_HashEntry)(unsafe.Pointer((*Command)(unsafe.Pointer(newCmdPtr)).FhPtr)).FtablePtr)).FkeyType == -1 {
			return *(*uintptr)(unsafe.Pointer((*Command)(unsafe.Pointer(newCmdPtr)).FhPtr + 32))
		}
		return (*Command)(unsafe.Pointer(newCmdPtr)).FhPtr + 32
	}()
	for nsPtr = (*Command)(unsafe.Pointer(newCmdPtr)).FnsPtr; nsPtr != uintptr(0) && nsPtr != globalNsPtr; nsPtr = (*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr {
		// Find the maximal sequence of child namespaces contained in nsPtr
		// such that there is a identically-named sequence of child namespaces
		// starting from ::. shadowNsPtr will be the tail of this sequence, or
		// the deepest namespace under :: that might contain a command now
		// shadowed by cmdName. We check below if shadowNsPtr actually
		// contains a command cmdName.

		found = 1
		shadowNsPtr = globalNsPtr

		for i = trailFront; i >= 0; i-- {
			trailNsPtr = *(*uintptr)(unsafe.Pointer(trailPtr + uintptr(i)*8))
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(shadowNsPtr + 40 /* &.childTable */)).FfindProc})).f(tls, shadowNsPtr+40 /* &.childTable */, (*Namespace)(unsafe.Pointer(trailNsPtr)).Fname)
			if hPtr != uintptr(0) {
				shadowNsPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
			} else {
				found = 0
				break
			}
		}

		// If shadowNsPtr contains a command named cmdName, we invalidate all
		// of the command refs cached in nsPtr. As a boundary case,
		// shadowNsPtr is initially :: and we check for case 1. above.

		if found != 0 {
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(shadowNsPtr + 160 /* &.cmdTable */)).FfindProc})).f(tls, shadowNsPtr+160 /* &.cmdTable */, cmdName)
			if hPtr != uintptr(0) {
				(*Namespace)(unsafe.Pointer(nsPtr)).FcmdRefEpoch++
				XTclInvalidateNsPath(tls, nsPtr)

				// If the shadowed command was compiled to bytecodes, we
				// invalidate all the bytecodes in nsPtr, to force a new
				// compilation. We use the resolverEpoch to signal the need
				// for a fresh compilation of every bytecode.

				if (*Command)(unsafe.Pointer((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)).FcompileProc != uintptr(0) {
					(*Namespace)(unsafe.Pointer(nsPtr)).FresolverEpoch++
				}
			}
		}

		// Insert nsPtr at the front of the trail list: i.e., at the end of
		// the trailPtr array.

		trailFront++
		if trailFront == trailSize {
			var newSize int32 = 2 * trailSize

			trailPtr = XTclStackRealloc(tls, interp, trailPtr,
				int32(uint64(newSize)*uint64(unsafe.Sizeof(uintptr(0)))))
			trailSize = newSize
		}
		*(*uintptr)(unsafe.Pointer(trailPtr + uintptr(trailFront)*8)) = nsPtr
	}
	XTclStackFree(tls, interp, trailPtr)
}

//----------------------------------------------------------------------
//
// TclGetNamespaceFromObj, GetNamespaceFromObj --
//
//	Gets the namespace specified by the name in a Tcl_Obj.
//
// Results:
//	Returns TCL_OK if the namespace was resolved successfully, and stores
//	a pointer to the namespace in the location specified by nsPtrPtr. If
//	the namespace can't be found, or anything else goes wrong, this
//	function returns TCL_ERROR and writes an error message to interp,
//	if non-NULL.
//
// Side effects:
//	May update the internal representation for the object, caching the
//	namespace reference. The next time this function is called, the
//	namespace value can be found quickly.
//
//----------------------------------------------------------------------

func XTclGetNamespaceFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, nsPtrPtr uintptr) int32 { /* tclNamesp.c:2875:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	if sGetNamespaceFromObj(tls, interp, objPtr, nsPtrPtr) == TCL_ERROR {
		var name uintptr = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}
			return XTcl_GetString(tls, objPtr)
		}()

		if int32(*(*int8)(unsafe.Pointer(name))) == ':' && int32(*(*int8)(unsafe.Pointer(name + 1))) == ':' {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+46959, libc.VaList(bp, name)))
		} else {
			// Get the current namespace name.

			sNamespaceCurrentCmd(tls, uintptr(0), interp, 1, uintptr(0))
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+46984, libc.VaList(bp+8, name,
					XTcl_GetStringResult(tls, interp))))
		}
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+7699, ts+9760, name, uintptr(0)))
		return TCL_ERROR
	}
	return TCL_OK
}

func sGetNamespaceFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, nsPtrPtr uintptr) int32 { /* tclNamesp.c:2904:1: */
	var resNamePtr uintptr
	var nsPtr uintptr
	var refNsPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&nsNameType)) {
		// Check that the ResolvedNsName is still valid; avoid letting the ref
		// cross interps.

		resNamePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		nsPtr = (*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FnsPtr
		refNsPtr = (*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FrefNsPtr
		if !((*Namespace)(unsafe.Pointer(nsPtr)).Fflags&NS_DYING != 0) && interp == (*Namespace)(unsafe.Pointer(nsPtr)).Finterp && (!(refNsPtr != 0) || interp == (*Namespace)(unsafe.Pointer(refNsPtr)).Finterp && refNsPtr == XTcl_GetCurrentNamespace(tls, interp)) {
			*(*uintptr)(unsafe.Pointer(nsPtrPtr)) = nsPtr
			return TCL_OK
		}
	}
	if sSetNsNameFromAny(tls, interp, objPtr) == TCL_OK {
		resNamePtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		*(*uintptr)(unsafe.Pointer(nsPtrPtr)) = (*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FnsPtr
		return TCL_OK
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclInitNamespaceCmd --
//
//	This function is called to create the "namespace" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	Handle for the namespace command, or NULL on failure.
//
// Side effects:
//	none
//
//----------------------------------------------------------------------

func XTclInitNamespaceCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclNamesp.c:2955:1: */
	return XTclMakeEnsemble(tls, interp, ts+19385, uintptr(unsafe.Pointer(&defaultNamespaceMap)))
}

//----------------------------------------------------------------------
//
// NamespaceChildrenCmd --
//
//	Invoked to implement the "namespace children" command that returns a
//	list containing the fully-qualified names of the child namespaces of a
//	given namespace. Handles the following syntax:
//
//	    namespace children ?name? ?pattern?
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns a result in the interpreter's result object. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceChildrenCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:2983:1: */
	bp := tls.Alloc(248)
	defer tls.Free(248)

	// var namespacePtr uintptr at bp, 8

	var nsPtr uintptr
	var childNsPtr uintptr
	var globalNsPtr uintptr
	var pattern uintptr
	// var buffer Tcl_DString at bp+8, 216

	var entryPtr uintptr
	// var search Tcl_HashSearch at bp+224, 24

	var listPtr uintptr
	var elemPtr uintptr
	var name uintptr
	var length uint32
	globalNsPtr = (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr
	pattern = uintptr(0)

	// Get a pointer to the specified namespace, or the current namespace.

	if !(objc == 1) {
		goto __1
	}
	nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	goto __2
__1:
	if !(objc == 2 || objc == 3) {
		goto __3
	}
	if !(XTclGetNamespaceFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) != TCL_OK) {
		goto __5
	}
	return TCL_ERROR
__5:
	;
	nsPtr = *(*uintptr)(unsafe.Pointer(bp /* namespacePtr */))
	goto __4
__3:
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47017)
	return TCL_ERROR
__4:
	;
__2:
	;

	// Get the glob-style pattern, if any, used to narrow the search.

	XTcl_DStringInit(tls, bp+8)
	if !(objc == 3) {
		goto __6
	}
	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()

	if !(int32(*(*int8)(unsafe.Pointer(name))) == ':' && int32(*(*int8)(unsafe.Pointer(name + uintptr(1)))) == ':') {
		goto __7
	}
	pattern = name
	goto __8
__7:
	XTcl_DStringAppend(tls, bp+8, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName, -1)
	if !(nsPtr != globalNsPtr) {
		goto __9
	}
	XTcl_DStringAppend(tls, bp+8, ts+7376, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
__9:
	;
	XTcl_DStringAppend(tls, bp+8, name, -1)
	pattern = (*Tcl_DString)(unsafe.Pointer(bp + 8)).Fstring
__8:
	;
__6:
	;

	// Create a list containing the full names of all child namespaces whose
	// names match the specified pattern, if any.

	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	if !(pattern != uintptr(0) && libc.Xstrpbrk(tls, pattern, ts+14153) == uintptr(0)) {
		goto __10
	}
	length = uint32(libc.Xstrlen(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName))

	if !(libc.Xstrncmp(tls, pattern, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName, uint64(length)) != 0) {
		goto __11
	}
	goto searchDone
__11:
	;
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(nsPtr + 40)).FfindProc})).f(tls, nsPtr+40, pattern+uintptr(length)) != uintptr(0)) {
		goto __12
	}
	XTcl_ListObjAppendElement(tls, interp, listPtr,
		XTcl_NewStringObj(tls, pattern, -1))
__12:
	;
	goto searchDone
__10:
	;
	entryPtr = XTcl_FirstHashEntry(tls, nsPtr+40, bp+224)
__13:
	if !(entryPtr != uintptr(0)) {
		goto __14
	}
	childNsPtr = (*Tcl_HashEntry)(unsafe.Pointer(entryPtr)).FclientData
	if !(pattern == uintptr(0) ||
		XTcl_StringMatch(tls, (*Namespace)(unsafe.Pointer(childNsPtr)).FfullName, pattern) != 0) {
		goto __15
	}
	elemPtr = XTcl_NewStringObj(tls, (*Namespace)(unsafe.Pointer(childNsPtr)).FfullName, -1)
	XTcl_ListObjAppendElement(tls, interp, listPtr, elemPtr)
__15:
	;
	entryPtr = XTcl_NextHashEntry(tls, bp+224)
	goto __13
__14:
	;

searchDone:
	XTcl_SetObjResult(tls, interp, listPtr)
	XTcl_DStringFree(tls, bp+8)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceCodeCmd --
//
//	Invoked to implement the "namespace code" command to capture the
//	namespace context of a command. Handles the following syntax:
//
//	    namespace code arg
//
//	Here "arg" can be a list. "namespace code arg" produces a result
//	equivalent to that produced by the command
//
//	    list ::namespace inscope [namespace current] $arg
//
//	However, if "arg" is itself a scoped value starting with "::namespace
//	inscope", then the result is just "arg".
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	If anything goes wrong, this function returns an error message as the
//	result in the interpreter's result object.
//
//----------------------------------------------------------------------

func sNamespaceCodeCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3112:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var currNsPtr uintptr
	var listPtr uintptr
	var objPtr uintptr
	var arg uintptr
	// var length int32 at bp, 4

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25681)
		return TCL_ERROR
	}

	//
	//  If "arg" is already a scoped value, then return it directly.
	//  Take care to only check for scoping in precisely the style that
	//  [::namespace code] generates it.  Anything more forgiving can have
	//  the effect of failing in namespaces that contain their own custom
	//      " "namespace" command.  [Bug 3202171].
	//

	arg = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	}()
	if int32(*(*int8)(unsafe.Pointer(arg))) == ':' && *(*int32)(unsafe.Pointer(bp)) > 20 &&
		libc.Xstrncmp(tls, arg, ts+19327, uint64(20)) == 0 {
		XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		return TCL_OK
	}

	// Otherwise, construct a scoped command by building a list with
	// "namespace inscope", the full name of the current namespace, and the
	// argument "arg". By constructing a list, we ensure that scoped commands
	// are interpreted properly when they are executed later, by the
	// "namespace inscope" command.

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		listPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr = uintptr(0)
	{
	}

	for ok1 := true; ok1; ok1 = 0 != 0 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, ts+19348, uint64(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + 11)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32(uint64(unsafe.Sizeof([12]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		{
		}
	}
	XTcl_ListObjAppendElement(tls, interp, listPtr, objPtr)
	for ok3 := true; ok3; ok3 = 0 != 0 {
		for ok4 := true; ok4; ok4 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, ts+19360, uint64(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + 7)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32(uint64(unsafe.Sizeof([8]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		{
		}
	}
	XTcl_ListObjAppendElement(tls, interp, listPtr, objPtr)

	currNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	if currNsPtr == (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr {
		for ok5 := true; ok5; ok5 = 0 != 0 {
			for ok6 := true; ok6; ok6 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, ts+7376, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + 2)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
			{
			}
		}
	} else {
		objPtr = XTcl_NewStringObj(tls, (*Namespace)(unsafe.Pointer(currNsPtr)).FfullName, -1)
	}
	XTcl_ListObjAppendElement(tls, interp, listPtr, objPtr)

	XTcl_ListObjAppendElement(tls, interp, listPtr, *(*uintptr)(unsafe.Pointer(objv + 1*8)))

	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceCurrentCmd --
//
//	Invoked to implement the "namespace current" command which returns the
//	fully-qualified name of the current namespace. Handles the following
//	syntax:
//
//	    namespace current
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns a result in the interpreter's result object. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceCurrentCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3193:1: */
	var currNsPtr uintptr

	if objc != 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, uintptr(0))
		return TCL_ERROR
	}

	// The "real" name of the global namespace ("::") is the null string, but
	// we return "::" for it as a convenience to programmers. Note that "" and
	// "::" are treated as synonyms by the namespace code so that it is still
	// easy to do things like:
	//
	//    namespace [namespace current]::bar { ... }

	currNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	if currNsPtr == (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+7376, 2))
	} else {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, (*Namespace)(unsafe.Pointer(currNsPtr)).FfullName, -1))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceDeleteCmd --
//
//	Invoked to implement the "namespace delete" command to delete
//	namespace(s). Handles the following syntax:
//
//	    namespace delete ?name name...?
//
//	Each name identifies a namespace. It may include a sequence of
//	namespace qualifiers separated by "::"s. If a namespace is found, it
//	is deleted: all variables and procedures contained in that namespace
//	are deleted. If that namespace is being used on the call stack, it is
//	kept alive (but logically deleted) until it is removed from the call
//	stack: that is, it can no longer be referenced by name but any
//	currently executing procedure that refers to it is allowed to do so
//	until the procedure returns. If the namespace can't be found, this
//	function returns an error. If no namespaces are specified, this
//	command does nothing.
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Deletes the specified namespaces. If anything goes wrong, this
//	function returns an error message in the interpreter's result object.
//
//----------------------------------------------------------------------

func sNamespaceDeleteCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3256:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var namespacePtr uintptr
	var name uintptr
	var i int32

	if objc < 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47034)
		return TCL_ERROR
	}

	// Destroying one namespace may cause another to be destroyed. Break this
	// into two passes: first check to make sure that all namespaces on the
	// command line are valid, and report any errors.

	for i = 1; i < objc; i++ {
		name = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}()
		namespacePtr = XTcl_FindNamespace(tls, interp, name, uintptr(0), 0)
		if namespacePtr == uintptr(0) ||
			(*Namespace)(unsafe.Pointer(namespacePtr)).Fflags&NS_KILLED != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+47049,
				libc.VaList(bp, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
				}())))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+9760,
				func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
				}(), uintptr(0)))
			return TCL_ERROR
		}
	}

	// Okay, now delete each namespace.

	for i = 1; i < objc; i++ {
		name = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}()
		namespacePtr = XTcl_FindNamespace(tls, interp, name, uintptr(0), 0)
		if namespacePtr != 0 {
			XTcl_DeleteNamespace(tls, namespacePtr)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceEvalCmd --
//
//	Invoked to implement the "namespace eval" command. Executes commands
//	in a namespace. If the namespace does not already exist, it is
//	created. Handles the following syntax:
//
//	    namespace eval name arg ?arg...?
//
//	If more than one arg argument is specified, the command that is
//	executed is the result of concatenating the arguments together with a
//	space between each argument.
//
// Results:
//	Returns TCL_OK if the namespace is found and the commands are executed
//	successfully. Returns TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns the result of the command in the interpreter's result object.
//	If anything goes wrong, this function returns an error message as the
//	result.
//
//----------------------------------------------------------------------

func sNamespaceEvalCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3333:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNRNamespaceEvalCmd})), clientData, objc,
		objv)
}

func sNRNamespaceEvalCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3344:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var iPtr uintptr = interp
	// var invoker uintptr at bp+16, 8

	// var word int32 at bp+24, 4

	// var namespacePtr uintptr at bp, 8

	// var framePtr uintptr at bp+8, 8

	var framePtrPtr uintptr
	var objPtr uintptr
	var result int32

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47100)
		return TCL_ERROR
	}

	// Try to resolve the namespace reference, caching the result in the
	// namespace object along the way.

	result = sGetNamespaceFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)

	// If the namespace wasn't found, try to create it.

	if result == TCL_ERROR {
		var name uintptr = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}()

		*(*uintptr)(unsafe.Pointer(bp /* namespacePtr */)) = XTcl_CreateNamespace(tls, interp, name, uintptr(0), uintptr(0))
		if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
			return TCL_ERROR
		}
	}

	// Make the specified namespace the current namespace and evaluate the
	// command(s).

	// This is needed to satisfy GCC 3.3's strict aliasing rules
	framePtrPtr = bp + 8 /* &framePtr */
	XTclPushStackFrame(tls, interp, framePtrPtr,
		*(*uintptr)(unsafe.Pointer(bp /* namespacePtr */)) /*isProcCallFrame*/, 0)

	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* framePtr */)))).Fobjv = XTclFetchEnsembleRoot(tls, interp, objv, objc, *(*uintptr)(unsafe.Pointer(bp + 8))+12)

	if objc == 3 {
		// TIP #280: Make actual argument location available to eval'd script.

		objPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
		*(*uintptr)(unsafe.Pointer(bp + 16 /* invoker */)) = (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr
		*(*int32)(unsafe.Pointer(bp + 24 /* word */)) = 3
		XTclArgumentGet(tls, interp, objPtr, bp+16, bp+24)
	} else {
		// More than one argument: concatenate them together with spaces
		// between, then evaluate the result. Tcl_EvalObjEx will delete the
		// object when it decrements its refcount after eval'ing it.

		objPtr = XTcl_ConcatObj(tls, objc-2, objv+uintptr(2)*8)
		*(*uintptr)(unsafe.Pointer(bp + 16 /* invoker */)) = uintptr(0)
		*(*int32)(unsafe.Pointer(bp + 24 /* word */)) = 0
	}

	// TIP #280: Make invoking context available to eval'd script.

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sNsEval_Callback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = *(*uintptr)(unsafe.Pointer(bp))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = ts + 2994
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNREvalObjEx(tls, interp, objPtr, 0, *(*uintptr)(unsafe.Pointer(bp + 16 /* invoker */)), *(*int32)(unsafe.Pointer(bp + 24 /* word */)))
}

func sNsEval_Callback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclNamesp.c:3426:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var namespacePtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	if result == TCL_ERROR {
		var length int32 = int32(libc.Xstrlen(tls, (*Tcl_Namespace)(unsafe.Pointer(namespacePtr)).FfullName))
		var limit int32 = 200
		var overflow int32 = libc.Bool32(length > limit)
		var cmd uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+47118,
			libc.VaList(bp, cmd,
				func() int32 {
					if overflow != 0 {
						return limit
					}
					return length
				}(), (*Tcl_Namespace)(unsafe.Pointer(namespacePtr)).FfullName,
				func() uintptr {
					if overflow != 0 {
						return ts + 8420 /* "..." */
					}
					return ts + 2631 /* "" */
				}(), XTcl_GetErrorLine(tls, interp))))
	}

	// Restore the previous "current" namespace.

	XTclPopStackFrame(tls, interp)
	return result
}

//----------------------------------------------------------------------
//
// NamespaceExistsCmd --
//
//	Invoked to implement the "namespace exists" command that returns true
//	if the given namespace currently exists, and false otherwise. Handles
//	the following syntax:
//
//	    namespace exists name
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns a result in the interpreter's result object. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceExistsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3476:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var namespacePtr uintptr at bp, 8

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(libc.Bool32(sGetNamespaceFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) == TCL_OK) != 0)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceExportCmd --
//
//	Invoked to implement the "namespace export" command that specifies
//	which commands are exported from a namespace. The exported commands
//	are those that can be imported into another namespace using "namespace
//	import". Both commands defined in a namespace and commands the
//	namespace has imported can be exported by a namespace. This command
//	has the following syntax:
//
//	    namespace export ?-clear? ?pattern pattern...?
//
//	Each pattern may contain "string match"-style pattern matching special
//	characters, but the pattern may not include any namespace qualifiers:
//	that is, the pattern must specify commands in the current (exporting)
//	namespace. The specified patterns are appended onto the namespace's
//	list of export patterns.
//
//	To reset the namespace's export pattern list, specify the "-clear"
//	flag.
//
//	If there are no export patterns and the "-clear" flag isn't given,
//	this command returns the namespace's current export list.
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns a result in the interpreter's result object. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceExportCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3531:1: */
	var firstArg int32
	var i int32

	if objc < 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47165)
		return TCL_ERROR
	}

	// If no pattern arguments are given, and "-clear" isn't specified, return
	// the namespace's current export pattern list.

	if objc == 1 {
		var listPtr uintptr

		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			listPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr = uintptr(0)
		{
		}

		XTcl_AppendExportList(tls, interp, uintptr(0), listPtr)
		XTcl_SetObjResult(tls, interp, listPtr)
		return TCL_OK
	}

	// Process the optional "-clear" argument.

	firstArg = 1
	if libc.Xstrcmp(tls, ts+47195, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg)*8)))) == 0 {
		XTcl_Export(tls, interp, uintptr(0), ts+7376, 1)
		XTcl_ResetResult(tls, interp)
		firstArg++
	}

	// Add each pattern to the namespace's export pattern list.

	for i = firstArg; i < objc; i++ {
		var result int32 = XTcl_Export(tls, interp, uintptr(0), XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))), 0)
		if result != TCL_OK {
			return result
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceForgetCmd --
//
//	Invoked to implement the "namespace forget" command to remove imported
//	commands from a namespace. Handles the following syntax:
//
//	    namespace forget ?pattern pattern...?
//
//	Each pattern is a name like "foo::*" or "a::b::x*". That is, the
//	pattern may include the special pattern matching characters recognized
//	by the "string match" command, but only in the command name at the end
//	of the qualified name; the special pattern characters may not appear
//	in a namespace name. All of the commands that match that pattern are
//	checked to see if they have an imported command in the current
//	namespace that refers to the matched command. If there is an alias, it
//	is removed.
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Imported commands are removed from the current namespace. If anything
//	goes wrong, this function returns an error message in the
//	interpreter's result object.
//
//----------------------------------------------------------------------

func sNamespaceForgetCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3613:1: */
	var pattern uintptr
	var i int32
	var result int32

	if objc < 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47202)
		return TCL_ERROR
	}

	for i = 1; i < objc; i++ {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}()
		result = XTcl_ForgetImport(tls, interp, uintptr(0), pattern)
		if result != TCL_OK {
			return result
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceImportCmd --
//
//	Invoked to implement the "namespace import" command that imports
//	commands into a namespace. Handles the following syntax:
//
//	    namespace import ?-force? ?pattern pattern...?
//
//	Each pattern is a namespace-qualified name like "foo::*", "a::b::x*",
//	or "bar::p". That is, the pattern may include the special pattern
//	matching characters recognized by the "string match" command, but only
//	in the command name at the end of the qualified name; the special
//	pattern characters may not appear in a namespace name. All of the
//	commands that match the pattern and which are exported from their
//	namespace are made accessible from the current namespace context. This
//	is done by creating a new "imported command" in the current namespace
//	that points to the real command in its original namespace; when the
//	imported command is called, it invokes the real command.
//
//	If an imported command conflicts with an existing command, it is
//	treated as an error. But if the "-force" option is included, then
//	existing commands are overwritten by the imported commands.
//
//	If there are no pattern arguments and the "-force" flag isn't given,
//	this command returns the list of commands currently imported in
//	the current namespace.
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Adds imported commands to the current namespace. If anything goes
//	wrong, this function returns an error message in the interpreter's
//	result object.
//
//----------------------------------------------------------------------

func sNamespaceImportCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3678:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var allowOverwrite int32 = 0
	var string uintptr
	var pattern uintptr
	var i int32
	var result int32
	var firstArg int32

	if objc < 1 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47223)
		return TCL_ERROR
	}

	// Skip over the optional "-force" as the first argument.

	firstArg = 1
	if firstArg < objc {
		string = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg)*8)))
		}()
		if int32(*(*int8)(unsafe.Pointer(string))) == '-' && libc.Xstrcmp(tls, string, ts+30818) == 0 {
			allowOverwrite = 1
			firstArg++
		}
	} else {
		// When objc == 1, command is just [namespace import]. Introspection
		// form to return list of imported commands.

		var hPtr uintptr
		// var search Tcl_HashSearch at bp, 24

		var nsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
		var listPtr uintptr

		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			listPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(listPtr)).FtypePtr = uintptr(0)
		{
		}

		for hPtr = XTcl_FirstHashEntry(tls, nsPtr+160, bp); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
			var cmdPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

			if (*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc == *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeleteImportedCmd})) {
				XTcl_ListObjAppendElement(tls, uintptr(0), listPtr, XTcl_NewStringObj(tls,
					func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer(nsPtr+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(nsPtr+160)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}(), -1))
			}
		}
		XTcl_SetObjResult(tls, interp, listPtr)
		return TCL_OK
	}

	// Handle the imports for each of the patterns.

	for i = firstArg; i < objc; i++ {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}()
		result = XTcl_Import(tls, interp, uintptr(0), pattern, allowOverwrite)
		if result != TCL_OK {
			return result
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceInscopeCmd --
//
//	Invoked to implement the "namespace inscope" command that executes a
//	script in the context of a particular namespace. This command is not
//	expected to be used directly by programmers; calls to it are generated
//	implicitly when programs use "namespace code" commands to register
//	callback scripts. Handles the following syntax:
//
//	    namespace inscope name arg ?arg...?
//
//	The "namespace inscope" command is much like the "namespace eval"
//	command except that it has lappend semantics and the namespace must
//	already exist. It treats the first argument as a list, and appends any
//	arguments after the first onto the end as proper list elements. For
//	example,
//
//	    namespace inscope ::foo {a b} c d e
//
//	is equivalent to
//
//	    namespace eval ::foo [concat {a b} [list c d e]]
//
//	This lappend semantics is important because many callback scripts are
//	actually prefixes.
//
// Results:
//	Returns TCL_OK to indicate success, or TCL_ERROR to indicate failure.
//
// Side effects:
//	Returns a result in the Tcl interpreter's result object.
//
//----------------------------------------------------------------------

func sNamespaceInscopeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3782:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sNRNamespaceInscopeCmd})), clientData, objc,
		objv)
}

func sNRNamespaceInscopeCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3793:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var namespacePtr uintptr at bp, 8

	// var framePtr uintptr at bp+8, 8

	var framePtrPtr uintptr
	var i int32
	var cmdObjPtr uintptr

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47100)
		return TCL_ERROR
	}

	// Resolve the namespace reference.

	if XTclGetNamespaceFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) != TCL_OK {
		return TCL_ERROR
	}

	// Make the specified namespace the current namespace.

	framePtrPtr = bp + 8 /* &framePtr */ // This is needed to satisfy GCC's
	// strict aliasing rules.
	XTclPushStackFrame(tls, interp, framePtrPtr,
		*(*uintptr)(unsafe.Pointer(bp /* namespacePtr */)) /*isProcCallFrame*/, 0)

	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* framePtr */)))).Fobjv = XTclFetchEnsembleRoot(tls, interp, objv, objc, *(*uintptr)(unsafe.Pointer(bp + 8))+12)

	// Execute the command. If there is just one argument, just treat it as a
	// script and evaluate it. Otherwise, create a list from the arguments
	// after the first one, then concatenate the first argument and the list
	// of extra arguments to form the command to evaluate.

	if objc == 3 {
		cmdObjPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	} else {
		// var concatObjv [2]uintptr at bp+16, 16

		var listPtr uintptr

		listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
		for i = 3; i < objc; i++ {
			if XTcl_ListObjAppendElement(tls, interp, listPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) != TCL_OK {
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = listPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				} // Free unneeded obj.
				return TCL_ERROR
			}
		}

		*(*uintptr)(unsafe.Pointer(bp + 16)) = *(*uintptr)(unsafe.Pointer(objv + 2*8))
		*(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = listPtr
		cmdObjPtr = XTcl_ConcatObj(tls, 2, bp+16)
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = listPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		} // We're done with the list object.
	}

	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _callbackPtr uintptr
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok4 := true; ok4; ok4 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sNsEval_Callback}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = *(*uintptr)(unsafe.Pointer(bp))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = ts + 19360
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNREvalObjEx(tls, interp, cmdObjPtr, 0, uintptr(0), 0)
}

//----------------------------------------------------------------------
//
// NamespaceOriginCmd --
//
//	Invoked to implement the "namespace origin" command to return the
//	fully-qualified name of the "real" command to which the specified
//	"imported command" refers. Handles the following syntax:
//
//	    namespace origin name
//
// Results:
//	An imported command is created in an namespace when that namespace
//	imports a command from another namespace. If a command is imported
//	into a sequence of namespaces a, b,...,n where each successive
//	namespace just imports the command from the previous namespace, this
//	command returns the fully-qualified name of the original command in
//	the first namespace, a. If "name" does not refer to an alias, its
//	fully-qualified name is returned. The returned name is stored in the
//	interpreter's result object. This function returns TCL_OK if
//	successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	If anything goes wrong, this function returns an error message in the
//	interpreter's result object.
//
//----------------------------------------------------------------------

func sNamespaceOriginCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3890:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var command Tcl_Command
	var origCommand Tcl_Command
	var resultPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4245)
		return TCL_ERROR
	}

	command = XTcl_GetCommandFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if command == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+8371, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+7857,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}
	origCommand = XTclGetOriginalCommand(tls, command)
	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)
	{
	}

	if origCommand == uintptr(0) {
		// The specified command isn't an imported command. Return the
		// command's name qualified by the full name of the namespace it was
		// defined in.

		XTcl_GetCommandFullName(tls, interp, command, resultPtr)
	} else {
		XTcl_GetCommandFullName(tls, interp, origCommand, resultPtr)
	}
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceParentCmd --
//
//	Invoked to implement the "namespace parent" command that returns the
//	fully-qualified name of the parent namespace for a specified
//	namespace. Handles the following syntax:
//
//	    namespace parent ?name?
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns a result in the interpreter's result object. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceParentCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:3951:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var nsPtr uintptr at bp, 8

	if objc == 1 {
		*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)) = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	} else if objc == 2 {
		if XTclGetNamespaceFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) != TCL_OK {
			return TCL_ERROR
		}
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13351)
		return TCL_ERROR
	}

	// Report the parent of the specified namespace.

	if (*Tcl_Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FparentPtr != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			(*Tcl_Namespace1)(unsafe.Pointer((*Tcl_Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)))).FparentPtr)).FfullName, -1))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespacePathCmd --
//
//	Invoked to implement the "namespace path" command that reads and
//	writes the current namespace's command resolution path. Has one
//	optional argument: if present, it is a list of named namespaces to set
//	the path to, and if absent, the current path should be returned.
//	Handles the following syntax:
//
//	    namespace path ?nsList?
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong
//	(most notably if the namespace list contains the name of something
//	other than a namespace). In the successful-exit case, may set the
//	interpreter result to the list of names of the namespaces on the
//	current namespace's path.
//
// Side effects:
//	May update the namespace path (triggering a recomputing of all command
//	names that depend on the namespace for resolution).
//
//----------------------------------------------------------------------

func sNamespacePathCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:4009:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var nsPtr uintptr
	var i int32
	// var nsObjc int32 at bp+8, 4

	var result int32
	// var nsObjv uintptr at bp, 8

	var namespaceList uintptr
	var resultObj uintptr
	nsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	result = TCL_ERROR
	namespaceList = uintptr(0)

	if !(objc > 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47253)
	return TCL_ERROR
__1:
	;

	// If no path is given, return the current path.

	if !(objc == 1) {
		goto __2
	}

__3:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __6
	}
	XTclAllocateFreeObjects(tls)
__6:
	;
	resultObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __4
__4:
	if 0 != 0 {
		goto __3
	}
	goto __5
__5:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)

	i = 0
__7:
	if !(i < (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength) {
		goto __9
	}
	if !((*NamespacePathEntry)(unsafe.Pointer((*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathArray+uintptr(i)*32)).FnsPtr != uintptr(0)) {
		goto __10
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, XTcl_NewStringObj(tls,
		(*Namespace)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer((*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathArray+uintptr(i)*32)).FnsPtr)).FfullName, -1))
__10:
	;
	goto __8
__8:
	i++
	goto __7
	goto __9
__9:
	;
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
__2:
	;

	// There is a path given, so parse it into an array of namespace pointers.

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 8)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8, bp)
	}() != TCL_OK) {
		goto __11
	}
	goto badNamespace
__11:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		goto __12
	}
	namespaceList = XTclStackAlloc(tls, interp,
		int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 8)))))

	i = 0
__13:
	if !(i < *(*int32)(unsafe.Pointer(bp + 8))) {
		goto __15
	}
	if !(XTclGetNamespaceFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + uintptr(i)*8)),
		namespaceList+uintptr(i)*8) != TCL_OK) {
		goto __16
	}
	goto badNamespace
__16:
	;
	goto __14
__14:
	i++
	goto __13
	goto __15
__15:
	;
__12:
	;

	// Now we have the list of valid namespaces, install it as the path.

	XTclSetNsPath(tls, nsPtr, *(*int32)(unsafe.Pointer(bp + 8 /* nsObjc */)), namespaceList)

	result = TCL_OK
badNamespace:
	if !(namespaceList != uintptr(0)) {
		goto __17
	}
	XTclStackFree(tls, interp, namespaceList)
__17:
	;
	return result
}

//----------------------------------------------------------------------
//
// TclSetNsPath --
//
//	Sets the namespace command name resolution path to the given list of
//	namespaces. If the list is empty (of zero length) the path is set to
//	empty and the default old-style behaviour of command name resolution
//	is used.
//
// Results:
//	nothing
//
// Side effects:
//	Invalidates the command name resolution caches for any command
//	resolved in the given namespace.
//
//----------------------------------------------------------------------

func XTclSetNsPath(tls *libc.TLS, nsPtr uintptr, pathLength int32, pathAry uintptr) { /* tclNamesp.c:4097:1: */
	if pathLength != 0 {
		var tmpPathArray uintptr = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(NamespacePathEntry{}))*uint64(pathLength)))
		var i int32

		for i = 0; i < pathLength; i++ {
			(*NamespacePathEntry)(unsafe.Pointer(tmpPathArray + uintptr(i)*32)).FnsPtr = *(*uintptr)(unsafe.Pointer(pathAry + uintptr(i)*8))
			(*NamespacePathEntry)(unsafe.Pointer(tmpPathArray + uintptr(i)*32)).FcreatorNsPtr = nsPtr
			(*NamespacePathEntry)(unsafe.Pointer(tmpPathArray + uintptr(i)*32)).FprevPtr = uintptr(0)
			(*NamespacePathEntry)(unsafe.Pointer(tmpPathArray + uintptr(i)*32)).FnextPtr = (*Namespace)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer(tmpPathArray + uintptr(i)*32)).FnsPtr)).FcommandPathSourceList
			if (*NamespacePathEntry)(unsafe.Pointer(tmpPathArray+uintptr(i)*32)).FnextPtr != uintptr(0) {
				(*NamespacePathEntry)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer(tmpPathArray + uintptr(i)*32)).FnextPtr)).FprevPtr = tmpPathArray + uintptr(i)*32
			}
			(*Namespace)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer(tmpPathArray + uintptr(i)*32)).FnsPtr)).FcommandPathSourceList = tmpPathArray + uintptr(i)*32
		}
		if (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength != 0 {
			sUnlinkNsPath(tls, nsPtr)
		}
		(*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathArray = tmpPathArray
	} else {
		if (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength != 0 {
			sUnlinkNsPath(tls, nsPtr)
		}
	}

	(*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength = pathLength
	(*Namespace)(unsafe.Pointer(nsPtr)).FcmdRefEpoch++
	(*Namespace)(unsafe.Pointer(nsPtr)).FresolverEpoch++
}

//----------------------------------------------------------------------
//
// UnlinkNsPath --
//
//	Delete the given namespace's command name resolution path. Only call
//	if the path is non-empty. Caller must reset the counter containing the
//	path size.
//
// Results:
//	nothing
//
// Side effects:
//	Deletes the array of path entries and unlinks those path entries from
//	the target namespace's list of interested namespaces.
//
//----------------------------------------------------------------------

func sUnlinkNsPath(tls *libc.TLS, nsPtr uintptr) { /* tclNamesp.c:4153:1: */
	var i int32
	for i = 0; i < (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathLength; i++ {
		var nsPathPtr uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathArray + uintptr(i)*32

		if (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FprevPtr != uintptr(0) {
			(*NamespacePathEntry)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FprevPtr)).FnextPtr = (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnextPtr
		}
		if (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnextPtr != uintptr(0) {
			(*NamespacePathEntry)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnextPtr)).FprevPtr = (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FprevPtr
		}
		if (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnsPtr != uintptr(0) {
			if (*Namespace)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnsPtr)).FcommandPathSourceList == nsPathPtr {
				(*Namespace)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnsPtr)).FcommandPathSourceList = (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnextPtr
			}
		}
	}
	XTclpFree(tls, (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathArray)
}

//----------------------------------------------------------------------
//
// TclInvalidateNsPath --
//
//	Invalidate the name resolution caches for all names looked up in
//	namespaces whose name path includes the given namespace.
//
// Results:
//	nothing
//
// Side effects:
//	Increments the command reference epoch in each namespace whose path
//	includes the given namespace. This causes any cached resolved names
//	whose root cacheing context starts at that namespace to be recomputed
//	the next time they are used.
//
//----------------------------------------------------------------------

func XTclInvalidateNsPath(tls *libc.TLS, nsPtr uintptr) { /* tclNamesp.c:4196:1: */
	var nsPathPtr uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).FcommandPathSourceList

	for nsPathPtr != uintptr(0) {
		if (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnsPtr != uintptr(0) {
			(*Namespace)(unsafe.Pointer((*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FcreatorNsPtr)).FcmdRefEpoch++
		}
		nsPathPtr = (*NamespacePathEntry)(unsafe.Pointer(nsPathPtr)).FnextPtr
	}
}

//----------------------------------------------------------------------
//
// NamespaceQualifiersCmd --
//
//	Invoked to implement the "namespace qualifiers" command that returns
//	any leading namespace qualifiers in a string. These qualifiers are
//	namespace names separated by "::"s. For example, for "::foo::p" this
//	command returns "::foo", and for "::" it returns "". This command is
//	the complement of the "namespace tail" command. Note that this command
//	does not check whether the "namespace" names are, in fact, the names
//	of currently defined namespaces. Handles the following syntax:
//
//	    namespace qualifiers string
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns a result in the interpreter's result object. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceQualifiersCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:4235:1: */
	var name uintptr
	var p uintptr
	var length int32

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17048)
		return TCL_ERROR
	}

	// Find the end of the string, then work backward and find the start of
	// the last "::" qualifier.

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	for p = name; int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
		// empty body
	}
	for libc.PreDecUintptr(&p, 1) >= name {
		if int32(*(*int8)(unsafe.Pointer(p))) == ':' && p > name && int32(*(*int8)(unsafe.Pointer(p - uintptr(1)))) == ':' {
			p -= uintptr(2) // Back up over the ::
			for p >= name && int32(*(*int8)(unsafe.Pointer(p))) == ':' {
				p-- // Back up over the preceeding :
			}
			break
		}
	}

	if p >= name {
		length = int32((int64(p)-int64(name))/1 + int64(1))
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, name, length))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceUnknownCmd --
//
//	Invoked to implement the "namespace unknown" command (TIP 181) that
//	sets or queries a per-namespace unknown command handler. This handler
//	is called when command lookup fails (current and global ns). The
//	default handler for the global namespace is ::unknown. The default
//	handler for other namespaces is to call the global namespace unknown
//	handler. Passing an empty list results in resetting the handler to its
//	default.
//
//	    namespace unknown ?handler?
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	If no handler is specified, returns a result in the interpreter's
//	result object, otherwise it sets the unknown handler pointer in the
//	current namespace to the script fragment provided. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceUnknownCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:4303:1: */
	var currNsPtr uintptr
	var resultPtr uintptr
	var rc int32

	if objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47264)
		return TCL_ERROR
	}

	currNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr

	if objc == 1 {
		// Introspection - return the current namespace handler.

		resultPtr = XTcl_GetNamespaceUnknownHandler(tls, interp, currNsPtr)
		if resultPtr == uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				resultPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
			(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)
			{
			}

		}
		XTcl_SetObjResult(tls, interp, resultPtr)
	} else {
		rc = XTcl_SetNamespaceUnknownHandler(tls, interp, currNsPtr, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		if rc == TCL_OK {
			XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}
		return rc
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetNamespaceUnknownHandler --
//
//	Returns the unknown command handler registered for the given
//	namespace.
//
// Results:
//	Returns the current unknown command handler, or NULL if none exists
//	for the namespace.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetNamespaceUnknownHandler(tls *libc.TLS, interp uintptr, nsPtr uintptr) uintptr { /* tclNamesp.c:4358:9: */
	var currNsPtr uintptr = nsPtr

	if (*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr == uintptr(0) && currNsPtr == (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr {
		// Default handler for global namespace is "::unknown". For all other
		// namespaces, it is NULL (which falls back on the global unknown
		// handler).

		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				(*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Fbytes, ts+8361, uint64(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Fbytes + 9)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).Flength = int32(uint64(unsafe.Sizeof([10]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).FtypePtr = uintptr(0)
			{
			}
		}
		(*Tcl_Obj)(unsafe.Pointer((*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr)).FrefCount++
	}
	return (*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr
}

//----------------------------------------------------------------------
//
// Tcl_SetNamespaceUnknownHandler --
//
//	Sets the unknown command handler for the given namespace to the
//	command prefix passed.
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Sets the namespace unknown command handler. If the passed in handler
//	is NULL or an empty list, then the handler is reset to its default. If
//	an error occurs, then an error message is left in the interpreter
//	result.
//
//----------------------------------------------------------------------

func XTcl_SetNamespaceUnknownHandler(tls *libc.TLS, interp uintptr, nsPtr uintptr, handlerPtr uintptr) int32 { /* tclNamesp.c:4401:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	*(*int32)(unsafe.Pointer(bp /* lstlen */)) = 0
	var currNsPtr uintptr = nsPtr

	// Ensure that we check for errors *first* before we change anything.

	if handlerPtr != uintptr(0) {
		if func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(handlerPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(handlerPtr + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjLength(tls, interp, handlerPtr, bp)
		}() != TCL_OK {
			// Not a list.

			return TCL_ERROR
		}
		if *(*int32)(unsafe.Pointer(bp)) > 0 {
			// We are going to be saving this handler. Increment the reference
			// count before decrementing the refcount on the previous handler,
			// so that nothing strange can happen if we are told to set the
			// handler to the previous value.

			(*Tcl_Obj)(unsafe.Pointer(handlerPtr)).FrefCount++
		}
	}

	// Remove old handler next.

	if (*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	// Install the new handler.

	if *(*int32)(unsafe.Pointer(bp)) > 0 {
		// Just store the handler. It already has the correct reference count.

		(*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr = handlerPtr
	} else {
		// If NULL or an empty list is passed, this resets to the default
		// handler.

		(*Namespace)(unsafe.Pointer(currNsPtr)).FunknownHandlerPtr = uintptr(0)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceTailCmd --
//
//	Invoked to implement the "namespace tail" command that returns the
//	trailing name at the end of a string with "::" namespace qualifiers.
//	These qualifiers are namespace names separated by "::"s. For example,
//	for "::foo::p" this command returns "p", and for "::" it returns "".
//	This command is the complement of the "namespace qualifiers" command.
//	Note that this command does not check whether the "namespace" names
//	are, in fact, the names of currently defined namespaces. Handles the
//	following syntax:
//
//	    namespace tail string
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns a result in the interpreter's result object. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceTailCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:4490:1: */
	var name uintptr
	var p uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+17048)
		return TCL_ERROR
	}

	// Find the end of the string, then work backward and find the last "::"
	// qualifier.

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	for p = name; int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
		// empty body
	}
	for libc.PreDecUintptr(&p, 1) > name {
		if int32(*(*int8)(unsafe.Pointer(p))) == ':' && int32(*(*int8)(unsafe.Pointer(p - uintptr(1)))) == ':' {
			p++ // Just after the last "::"
			break
		}
	}

	if p >= name {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, p, -1))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceUpvarCmd --
//
//	Invoked to implement the "namespace upvar" command, that creates
//	variables in the current scope linked to variables in another
//	namespace. Handles the following syntax:
//
//	    namespace upvar ns otherVar myVar ?otherVar myVar ...?
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Creates new variables in the current scope, linked to the
//	corresponding variables in the stipulated nmamespace. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceUpvarCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:4548:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var iPtr uintptr = interp
	// var nsPtr uintptr at bp, 8

	var savedNsPtr uintptr
	var otherPtr uintptr
	// var arrayPtr uintptr at bp+8, 8

	var myName uintptr

	if objc < 2 || objc&1 != 0 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47273)
		return TCL_ERROR
	}

	if XTclGetNamespaceFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp) != TCL_OK {
		return TCL_ERROR
	}

	objc = objc - 2
	objv += 8 * uintptr(2)

__1:
	if !(objc > 0) {
		goto __3
	}
	{
		// Locate the other variable.

		savedNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr
		(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr = *(*uintptr)(unsafe.Pointer(bp /* nsPtr */))
		otherPtr = XTclObjLookupVarEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), uintptr(0),
			TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG|TCL_AVOID_RESOLVERS,
			ts+29024, 1 /*createPart2*/, 1, bp+8)
		(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr = savedNsPtr
		if otherPtr == uintptr(0) {
			return TCL_ERROR
		}

		// Create the new variable and link it to otherPtr.

		myName = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}()
		if XTclPtrMakeUpvar(tls, interp, otherPtr, myName, 0, -1) != TCL_OK {
			return TCL_ERROR
		}

	}
	goto __2
__2:
	objc = objc - 2
	objv += 8 * uintptr(2)
	goto __1
	goto __3
__3:
	;

	return TCL_OK
}

//----------------------------------------------------------------------
//
// NamespaceWhichCmd --
//
//	Invoked to implement the "namespace which" command that returns the
//	fully-qualified name of a command or variable. If the specified
//	command or variable does not exist, it returns "". Handles the
//	following syntax:
//
//	    namespace which ?-command? ?-variable? name
//
// Results:
//	Returns TCL_OK if successful, and TCL_ERROR if anything goes wrong.
//
// Side effects:
//	Returns a result in the interpreter's result object. If anything goes
//	wrong, the result is an error message.
//
//----------------------------------------------------------------------

func sNamespaceWhichCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclNamesp.c:4622:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var lookupType int32 at bp, 4

	var resultPtr uintptr // -command
	var cmd Tcl_Command   // -variable
	var var1 Tcl_Var
	*(*int32)(unsafe.Pointer(bp /* lookupType */)) = 0

	if !(objc < 2 || objc > 3) {
		goto __1
	}
badArgs:
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+47297)
	return TCL_ERROR
	goto __2
__1:
	if !(objc == 3) {
		goto __3
	}
	// Look for a flag controlling the lookup.

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&opts)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK) {
		goto __4
	}
	// Preserve old style of error message!

	XTcl_ResetResult(tls, interp)
	goto badArgs
__4:
	;
__3:
	;
__2:
	;

__5:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __8
	}
	XTclAllocateFreeObjects(tls)
__8:
	;
	resultPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __6
__6:
	if 0 != 0 {
		goto __5
	}
	goto __7
__7:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)

	switch *(*int32)(unsafe.Pointer(bp /* lookupType */)) {
	case 0:
		goto __10
	case 1:
		goto __11
	}
	goto __9
__10: // -command
	cmd = XTcl_GetCommandFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))

	if !(cmd != uintptr(0)) {
		goto __12
	}
	XTcl_GetCommandFullName(tls, interp, cmd, resultPtr)
__12:
	;
	goto __9

__11: // -variable
	var1 = XTcl_FindNamespaceVar(tls, interp,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)))
		}(), uintptr(0), 0)

	if !(var1 != uintptr(0)) {
		goto __13
	}
	XTcl_GetVariableFullName(tls, interp, var1, resultPtr)
__13:
	;
	goto __9

__9:
	;
	XTcl_SetObjResult(tls, interp, resultPtr)
	return TCL_OK
}

var opts = [3]uintptr{
	ts + 16010, ts + 47325, uintptr(0),
} /* tclNamesp.c:4628:23 */

//----------------------------------------------------------------------
//
// FreeNsNameInternalRep --
//
//	Frees the resources associated with a nsName object's internal
//	representation.
//
// Results:
//	None.
//
// Side effects:
//	Decrements the ref count of any Namespace structure pointed to by the
//	nsName's internal representation. If there are no more references to
//	the namespace, it's structure will be freed.
//
//----------------------------------------------------------------------

func sFreeNsNameInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclNamesp.c:4698:1: */
	var resNamePtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	// Decrement the reference count of the namespace. If there are no more
	// references, free it up.

	(*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FrefCount--
	if (*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FrefCount == 0 {
		// Decrement the reference count for the cached namespace. If the
		// namespace is dead, and there are no more references to it, free
		// it.

		XTclNsDecrRefCount(tls, (*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FnsPtr)
		XTclpFree(tls, resNamePtr)
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DupNsNameInternalRep --
//
//	Initializes the internal representation of a nsName object to a copy
//	of the internal representation of another nsName object.
//
// Results:
//	None.
//
// Side effects:
//	copyPtr's internal rep is set to refer to the same namespace
//	referenced by srcPtr's internal rep. Increments the ref count of the
//	ResolvedNsName structure used to hold the namespace reference.
//
//----------------------------------------------------------------------

func sDupNsNameInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclNamesp.c:4743:1: */
	var resNamePtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))

	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = resNamePtr
	(*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&nsNameType))
}

//----------------------------------------------------------------------
//
// SetNsNameFromAny --
//
//	Attempt to generate a nsName internal representation for a Tcl object.
//
// Results:
//	Returns TCL_OK if the value could be converted to a proper namespace
//	reference. Otherwise, it returns TCL_ERROR, along with an error
//	message in the interpreter's result object.
//
// Side effects:
//	If successful, the object is made a nsName object. Its internal rep is
//	set to point to a ResolvedNsName, which contains a cached pointer to
//	the Namespace. Reference counts are kept on both the ResolvedNsName
//	and the Namespace, so we can keep track of their usage and free them
//	when appropriate.
//
//----------------------------------------------------------------------

func sSetNsNameFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclNamesp.c:4777:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var dummy uintptr at bp+24, 8

	// var nsPtr uintptr at bp, 8

	// var dummy1Ptr uintptr at bp+8, 8

	// var dummy2Ptr uintptr at bp+16, 8

	var resNamePtr uintptr
	var name uintptr

	if interp == uintptr(0) {
		return TCL_ERROR
	}

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()
	XTclGetNamespaceForQualName(tls, interp, name, uintptr(0), TCL_FIND_ONLY_NS,
		bp, bp+8, bp+16, bp+24)

	// If we found a namespace, then create a new ResolvedNsName structure
	// that holds a reference to it.

	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) || (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags&NS_DYING != 0 {
		// Our failed lookup proves any previously cached nsName internalrep is no
		// longer valid. Get rid of it so we no longer waste memory storing
		// it, nor time determining its invalidity again and again.

		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&nsNameType)) {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
				if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
				}
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
			}

		}
		return TCL_ERROR
	}

	(*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)))).FrefCount++
	resNamePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ResolvedNsName{})))
	(*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FnsPtr = *(*uintptr)(unsafe.Pointer(bp /* nsPtr */))
	if int32(*(*int8)(unsafe.Pointer(name))) == ':' && int32(*(*int8)(unsafe.Pointer(name + 1))) == ':' {
		(*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FrefNsPtr = uintptr(0)
	} else {
		(*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FrefNsPtr = XTcl_GetCurrentNamespace(tls, interp)
	}
	(*ResolvedNsName)(unsafe.Pointer(resNamePtr)).FrefCount = 1
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = resNamePtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&nsNameType))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclGetNamespaceCommandTable --
//
//	Returns the hash table of commands.
//
// Results:
//	Pointer to the hash table.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetNamespaceCommandTable(tls *libc.TLS, nsPtr uintptr) uintptr { /* tclNamesp.c:4845:15: */
	return nsPtr + 160
}

//----------------------------------------------------------------------
//
// TclGetNamespaceChildTable --
//
//	Returns the hash table of child namespaces.
//
// Results:
//	Pointer to the hash table.
//
// Side effects:
//	Might allocate memory.
//
//----------------------------------------------------------------------

func XTclGetNamespaceChildTable(tls *libc.TLS, nsPtr uintptr) uintptr { /* tclNamesp.c:4868:15: */
	var nPtr uintptr = nsPtr
	return nPtr + 40
}

//----------------------------------------------------------------------
//
// TclLogCommandInfo --
//
//	This function is invoked after an error occurs in an interpreter. It
//	adds information to iPtr->errorInfo/errorStack fields to describe the
//	command that was being executed when the error occurred. When pc and
//	tosPtr are non-NULL, conveying a bytecode execution "inner context",
//	and the offending instruction is suitable, that inner context is
//	recorded in errorStack.
//
// Results:
//	None.
//
// Side effects:
//	Information about the command is added to errorInfo/errorStack and the
//	line number stored internally in the interpreter is set.
//
//----------------------------------------------------------------------

func XTclLogCommandInfo(tls *libc.TLS, interp uintptr, script uintptr, command uintptr, length int32, pc uintptr, tosPtr uintptr) { /* tclNamesp.c:4907:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var p uintptr
	var iPtr uintptr = interp
	var overflow int32
	var limit int32 = 150
	var varPtr uintptr
	// var arrayPtr uintptr at bp+32, 8

	if (*Interp)(unsafe.Pointer(iPtr)).Fflags&ERR_ALREADY_LOGGED != 0 {
		// Someone else has already logged error information for this command;
		// we shouldn't add anything more.

		return
	}

	if command != uintptr(0) {
		// Compute the line number where the error occurred.

		(*Interp)(unsafe.Pointer(iPtr)).FerrorLine = 1
		for p = script; p != command; p++ {
			if int32(*(*int8)(unsafe.Pointer(p))) == '\n' {
				(*Interp)(unsafe.Pointer(iPtr)).FerrorLine++
			}
		}

		if length < 0 {
			length = int32(libc.Xstrlen(tls, command))
		}
		overflow = libc.Bool32(length > limit)
		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+47335, libc.VaList(bp, func() uintptr {
				if (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo == uintptr(0) {
					return ts + 47352 /* "while executing" */
				}
				return ts + 47368 /* "invoked from wit..." */
			}(),
				func() int32 {
					if overflow != 0 {
						return limit
					}
					return length
				}(), command,
				func() uintptr {
					if overflow != 0 {
						return ts + 8420 /* "..." */
					}
					return ts + 2631 /* "" */
				}())))

		varPtr = XTclObjLookupVarEx(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FeiVar, uintptr(0), TCL_GLOBAL_ONLY,
			uintptr(0), 0, 0, bp+32)
		if varPtr == uintptr(0) || !((*Var)(unsafe.Pointer(varPtr)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0) {
			// Should not happen.

			return
		} else {
			var hPtr uintptr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FfindProc})).f(tls, iPtr+1008 /* &.varTraces */, varPtr)
			var tracePtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

			if (*VarTrace)(unsafe.Pointer(tracePtr)).FtraceProc != *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
			}{sEstablishErrorInfoTraces})) {
				// The most recent trace set on ::errorInfo is not the one the
				// core itself puts on last. This means some other code is
				// tracing the variable, and the additional trace(s) might be
				// write traces that expect the timing of writes to
				// ::errorInfo that existed Tcl releases before 8.5. To
				// satisfy that compatibility need, we write the current
				// -errorinfo value to the ::errorInfo variable.

				XTcl_ObjSetVar2(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FeiVar, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo,
					TCL_GLOBAL_ONLY)
			}
		}
	}

	// TIP #348

	if (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorStack)).FrefCount > 1 {
		var newObj uintptr

		newObj = XTcl_DuplicateObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorStack
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Tcl_Obj)(unsafe.Pointer(newObj)).FrefCount++
		(*Interp)(unsafe.Pointer(iPtr)).FerrorStack = newObj
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FresetErrorStack != 0 {
		// var len int32 at bp+40, 4

		(*Interp)(unsafe.Pointer(iPtr)).FresetErrorStack = 0
		XTcl_ListObjLength(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, bp+40)

		// Reset while keeping the list internalrep as much as possible.

		XTcl_ListObjReplace(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, 0, *(*int32)(unsafe.Pointer(bp + 40 /* len */)), 0, uintptr(0))
		if pc != uintptr(0) {
			var innerContext uintptr

			innerContext = XTclGetInnerContext(tls, interp, pc, tosPtr)
			if innerContext != uintptr(0) {
				XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack,
					(*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)
				XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, innerContext)
			}
		} else if command != uintptr(0) {
			XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack,
				(*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)
			XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack,
				XTcl_NewStringObj(tls, command, length))
		}
	}

	if !((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FframePtr)).Fobjc != 0) {
		// Special frame, nothing to report.
	} else if (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr != (*Interp)(unsafe.Pointer(iPtr)).FframePtr {
		// uplevel case, [lappend errorstack UP $relativelevel]

		XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, (*Interp)(unsafe.Pointer(iPtr)).FupLiteral)
		XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, XTcl_NewIntObj(tls,
			(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FframePtr)).Flevel-(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Flevel))
	} else if (*Interp)(unsafe.Pointer(iPtr)).FframePtr != (*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr {
		// normal case, [lappend errorstack CALL [info level 0]]

		XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, (*Interp)(unsafe.Pointer(iPtr)).FcallLiteral)
		XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, XTcl_NewListObj(tls,
			(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FframePtr)).Fobjc, (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FframePtr)).Fobjv))
	}
}

//----------------------------------------------------------------------
//
// TclErrorStackResetIf --
//
//	The TIP 348 reset/no-bc part of TLCI, for specific use by
//	TclCompileSyntaxError.
//
// Results:
//	None.
//
// Side effects:
//	Reset errorstack if it needs be, and in that case remember the
//	passed-in error message as inner context.
//
//----------------------------------------------------------------------

func XTclErrorStackResetIf(tls *libc.TLS, interp uintptr, msg uintptr, length int32) { /* tclNamesp.c:5067:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp

	if (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorStack)).FrefCount > 1 {
		var newObj uintptr

		newObj = XTcl_DuplicateObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorStack
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Tcl_Obj)(unsafe.Pointer(newObj)).FrefCount++
		(*Interp)(unsafe.Pointer(iPtr)).FerrorStack = newObj
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FresetErrorStack != 0 {
		// var len int32 at bp, 4

		(*Interp)(unsafe.Pointer(iPtr)).FresetErrorStack = 0
		XTcl_ListObjLength(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, bp)

		// Reset while keeping the list internalrep as much as possible.

		XTcl_ListObjReplace(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, 0, *(*int32)(unsafe.Pointer(bp /* len */)), 0, uintptr(0))
		XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, (*Interp)(unsafe.Pointer(iPtr)).FinnerLiteral)
		XTcl_ListObjAppendElement(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack,
			XTcl_NewStringObj(tls, msg, length))
	}
}

//----------------------------------------------------------------------
//
// Tcl_LogCommandInfo --
//
//	This function is invoked after an error occurs in an interpreter. It
//	adds information to iPtr->errorInfo/errorStack fields to describe the
//	command that was being executed when the error occurred.
//
// Results:
//	None.
//
// Side effects:
//	Information about the command is added to errorInfo/errorStack and the
//	line number stored internally in the interpreter is set.
//
//----------------------------------------------------------------------

func XTcl_LogCommandInfo(tls *libc.TLS, interp uintptr, script uintptr, command uintptr, length int32) { /* tclNamesp.c:5119:1: */
	XTclLogCommandInfo(tls, interp, script, command, length, uintptr(0), uintptr(0))
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Module-scope struct of notifier hooks that are checked in the default
// notifier functions (for overriding via Tcl_SetNotifier).

var XtclNotifierHooks = Tcl_NotifierProcs{} /* tclNotify.c:25:19 */

// For each event source (created with Tcl_CreateEventSource) there is a
// structure of the following type:

type EventSource1 = struct {
	FsetupProc  uintptr
	FcheckProc  uintptr
	FclientData ClientData
	FnextPtr    uintptr
} /* tclNotify.c:34:9 */

// For each event source (created with Tcl_CreateEventSource) there is a
// structure of the following type:

type EventSource = EventSource1 /* tclNotify.c:39:3 */

// The following structure keeps track of the state of the notifier on a
// per-thread basis. The first three elements keep track of the event queue.
// In addition to the first (next to be serviced) and last events in the
// queue, we keep track of a "marker" event. This provides a simple priority
// mechanism whereby events can be inserted at the front of the queue but
// behind all other high-priority events already in the queue (this is used
// for things like a sequence of Enter and Leave events generated during a
// grab in Tk). These elements are protected by the queueMutex so that any
// thread can queue an event on any notifier. Note that all of the values in
// this structure will be initialized to 0.

type ThreadSpecificData8 = struct {
	FfirstEventPtr       uintptr
	FlastEventPtr        uintptr
	FmarkerEventPtr      uintptr
	FqueueMutex          Tcl_Mutex
	FserviceMode         int32
	FblockTimeSet        int32
	FblockTime           Tcl_Time
	FinTraversal         int32
	F__ccgo_pad1         [4]byte
	FfirstEventSourcePtr uintptr
	FthreadId            Tcl_ThreadId
	FclientData          ClientData
	Finitialized         int32
	F__ccgo_pad2         [4]byte
	FnextPtr             uintptr
} /* tclNotify.c:80:3 */

var dataKey7 Tcl_ThreadDataKey /* tclNotify.c:82:26: */

// Global list of notifiers. Access to this list is controlled by the listLock
// mutex. If this becomes a performance bottleneck, this could be replaced
// with a hashtable.

var firstNotifierPtr uintptr = uintptr(0) /* tclNotify.c:90:27 */

//----------------------------------------------------------------------
//
// TclInitNotifier --
//
//	Initialize the thread local data structures for the notifier
//	subsystem.
//
// Results:
//	None.
//
// Side effects:
//	Adds the current thread to the global list of notifiers.
//
//----------------------------------------------------------------------

func XTclInitNotifier(tls *libc.TLS) { /* tclNotify.c:118:1: */
	var tsdPtr uintptr
	var threadId Tcl_ThreadId = XTcl_GetCurrentThread(tls)

	for tsdPtr = firstNotifierPtr; tsdPtr != 0 && (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FthreadId != threadId; tsdPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FnextPtr {
		// Empty loop body.
	}

	if uintptr(0) == tsdPtr {
		// Notifier not yet initialized in this thread.

		tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))
		(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FthreadId = threadId
		(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FclientData = XTcl_InitNotifier(tls)
		(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).Finitialized = 1
		(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FnextPtr = firstNotifierPtr
		firstNotifierPtr = tsdPtr
	}

}

//----------------------------------------------------------------------
//
// TclFinalizeNotifier --
//
//	Finalize the thread local data structures for the notifier subsystem.
//
// Results:
//	None.
//
// Side effects:
//	Removes the notifier associated with the current thread from the
//	global notifier list. This is done only if the notifier was
//	initialized for this thread by call to TclInitNotifier(). This is
//	always true for threads which have been seeded with an Tcl
//	interpreter, since the call to Tcl_CreateInterp will, among other
//	things, call TclInitializeSubsystems() and this one will, in turn,
//	call the TclInitNotifier() for the thread. For threads created without
//	the Tcl interpreter, though, nobody is explicitly nor implicitly
//	calling the TclInitNotifier hence, TclFinalizeNotifier should not be
//	performed at all.
//
//----------------------------------------------------------------------

func XTclFinalizeNotifier(tls *libc.TLS) { /* tclNotify.c:170:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))
	var prevPtrPtr uintptr
	var evPtr uintptr
	var hold uintptr

	if !((*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).Finitialized != 0) {
		return // Notifier not initialized for the current thread
	}

	for evPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr; evPtr != uintptr(0); {
		hold = evPtr
		evPtr = (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr
		XTclpFree(tls, hold)
	}
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr = uintptr(0)
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FlastEventPtr = uintptr(0)

	XTcl_FinalizeNotifier(tls, (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FclientData)

	for prevPtrPtr = uintptr(unsafe.Pointer(&firstNotifierPtr)); *(*uintptr)(unsafe.Pointer(prevPtrPtr)) != uintptr(0); prevPtrPtr = *(*uintptr)(unsafe.Pointer(prevPtrPtr)) + 88 {
		if *(*uintptr)(unsafe.Pointer(prevPtrPtr)) == tsdPtr {
			*(*uintptr)(unsafe.Pointer(prevPtrPtr)) = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FnextPtr
			break
		}
	}
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).Finitialized = 0

}

//----------------------------------------------------------------------
//
// Tcl_SetNotifier --
//
//	Install a set of alternate functions for use with the notifier. In
//	particular, this can be used to install the Xt-based notifier for use
//	with the Browser plugin.
//
// Results:
//	None.
//
// Side effects:
//	Set the tclNotifierHooks global, which is checked in the default
//	notifier functions.
//
//----------------------------------------------------------------------

func XTcl_SetNotifier(tls *libc.TLS, notifierProcPtr uintptr) { /* tclNotify.c:226:1: */
	XtclNotifierHooks = *(*Tcl_NotifierProcs)(unsafe.Pointer(notifierProcPtr))
}

//----------------------------------------------------------------------
//
// Tcl_CreateEventSource --
//
//	This function is invoked to create a new source of events. The source
//	is identified by a function that gets invoked during Tcl_DoOneEvent to
//	check for events on that source and queue them.
//
//
// Results:
//	None.
//
// Side effects:
//	SetupProc and checkProc will be invoked each time that Tcl_DoOneEvent
//	runs out of things to do. SetupProc will be invoked before
//	Tcl_DoOneEvent calls select or whatever else it uses to wait for
//	events. SetupProc typically calls functions like Tcl_SetMaxBlockTime
//	to indicate what to wait for.
//
//	CheckProc is called after select or whatever operation was actually
//	used to wait. It figures out whether anything interesting actually
//	happened (e.g. by calling Tcl_AsyncReady), and then calls
//	Tcl_QueueEvent to queue any events that are ready.
//
//	Each of these functions is passed two arguments, e.g.
//		(*checkProc)(ClientData clientData, int flags));
//	ClientData is the same as the clientData argument here, and flags is a
//	combination of things like TCL_FILE_EVENTS that indicates what events
//	are of interest: setupProc and checkProc use flags to figure out
//	whether their events are relevant or not.
//
//----------------------------------------------------------------------

func XTcl_CreateEventSource(tls *libc.TLS, setupProc uintptr, checkProc uintptr, clientData ClientData) { /* tclNotify.c:268:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))
	var sourcePtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(EventSource{})))

	(*EventSource)(unsafe.Pointer(sourcePtr)).FsetupProc = setupProc
	(*EventSource)(unsafe.Pointer(sourcePtr)).FcheckProc = checkProc
	(*EventSource)(unsafe.Pointer(sourcePtr)).FclientData = clientData
	(*EventSource)(unsafe.Pointer(sourcePtr)).FnextPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventSourcePtr
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventSourcePtr = sourcePtr
}

//----------------------------------------------------------------------
//
// Tcl_DeleteEventSource --
//
//	This function is invoked to delete the source of events given by proc
//	and clientData.
//
// Results:
//	None.
//
// Side effects:
//	The given event source is canceled, so its function will never again
//	be called. If no such source exists, nothing happens.
//
//----------------------------------------------------------------------

func XTcl_DeleteEventSource(tls *libc.TLS, setupProc uintptr, checkProc uintptr, clientData ClientData) { /* tclNotify.c:307:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))
	var sourcePtr uintptr
	var prevPtr uintptr

	sourcePtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventSourcePtr
	prevPtr = uintptr(0)
__1:
	if !(sourcePtr != uintptr(0)) {
		goto __3
	}
	{
		if (*EventSource)(unsafe.Pointer(sourcePtr)).FsetupProc != setupProc ||
			(*EventSource)(unsafe.Pointer(sourcePtr)).FcheckProc != checkProc ||
			(*EventSource)(unsafe.Pointer(sourcePtr)).FclientData != clientData {
			goto __2
		}
		if prevPtr == uintptr(0) {
			(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventSourcePtr = (*EventSource)(unsafe.Pointer(sourcePtr)).FnextPtr
		} else {
			(*EventSource)(unsafe.Pointer(prevPtr)).FnextPtr = (*EventSource)(unsafe.Pointer(sourcePtr)).FnextPtr
		}
		XTclpFree(tls, sourcePtr)
		return

	}
	goto __2
__2:
	prevPtr = sourcePtr
	sourcePtr = (*EventSource)(unsafe.Pointer(sourcePtr)).FnextPtr
	goto __1
	goto __3
__3:
}

//----------------------------------------------------------------------
//
// Tcl_QueueEvent --
//
//	Queue an event on the event queue associated with the current thread.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_QueueEvent(tls *libc.TLS, evPtr uintptr, position Tcl_QueuePosition) { /* tclNotify.c:355:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))

	sQueueEvent(tls, tsdPtr, evPtr, position)
}

//----------------------------------------------------------------------
//
// Tcl_ThreadQueueEvent --
//
//	Queue an event on the specified thread's event queue.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ThreadQueueEvent(tls *libc.TLS, threadId Tcl_ThreadId, evPtr uintptr, position Tcl_QueuePosition) { /* tclNotify.c:386:1: */
	var tsdPtr uintptr

	// Find the notifier associated with the specified thread.

	for tsdPtr = firstNotifierPtr; tsdPtr != 0 && (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FthreadId != threadId; tsdPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FnextPtr {
		// Empty loop body.
	}

	// Queue the event if there was a notifier associated with the thread.

	if tsdPtr != 0 {
		sQueueEvent(tls, tsdPtr, evPtr, position)
	} else {
		XTclpFree(tls, evPtr)
	}

}

//----------------------------------------------------------------------
//
// QueueEvent --
//
//	Insert an event into the specified thread's event queue at one of
//	three positions: the head, the tail, or before a floating marker.
//	Events inserted before the marker will be processed in first-in-
//	first-out order, but before any events inserted at the tail of the
//	queue. Events inserted at the head of the queue will be processed in
//	last-in-first-out order.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sQueueEvent(tls *libc.TLS, tsdPtr uintptr, evPtr uintptr, position Tcl_QueuePosition) { /* tclNotify.c:442:1: */

	if position == TCL_QUEUE_TAIL {
		// Append the event on the end of the queue.

		(*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr = uintptr(0)
		if (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr == uintptr(0) {
			(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr = evPtr
		} else {
			(*Tcl_Event)(unsafe.Pointer((*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FlastEventPtr)).FnextPtr = evPtr
		}
		(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FlastEventPtr = evPtr
	} else if position == TCL_QUEUE_HEAD {
		// Push the event on the head of the queue.

		(*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr
		if (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr == uintptr(0) {
			(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FlastEventPtr = evPtr
		}
		(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr = evPtr
	} else if position == TCL_QUEUE_MARK {
		// Insert the event after the current marker event and advance the
		// marker to the new event.

		if (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr == uintptr(0) {
			(*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr
			(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr = evPtr
		} else {
			(*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr = (*Tcl_Event)(unsafe.Pointer((*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr)).FnextPtr
			(*Tcl_Event)(unsafe.Pointer((*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr)).FnextPtr = evPtr
		}
		(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr = evPtr
		if (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr == uintptr(0) {
			(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FlastEventPtr = evPtr
		}
	}

}

//----------------------------------------------------------------------
//
// Tcl_DeleteEvents --
//
//	Calls a function for each event in the queue and deletes those for
//	which the function returns 1. Events for which the function returns 0
//	are left in the queue. Operates on the queue associated with the
//	current thread.
//
// Results:
//	None.
//
// Side effects:
//	Potentially removes one or more events from the event queue.
//
//----------------------------------------------------------------------

func XTcl_DeleteEvents(tls *libc.TLS, proc uintptr, clientData ClientData) { /* tclNotify.c:517:1: */
	var evPtr uintptr   // Pointer to the event being examined
	var prevPtr uintptr // Pointer to evPtr's predecessor, or NULL if
	// evPtr designates the first event in the
	// queue for the thread.
	var hold uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))

	// Walk the queue of events for the thread, applying 'proc' to each to
	// decide whether to eliminate the event.

	prevPtr = uintptr(0)
	evPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr
	for evPtr != uintptr(0) {
		if (*struct {
			f func(*libc.TLS, uintptr, ClientData) int32
		})(unsafe.Pointer(&struct{ uintptr }{proc})).f(tls, evPtr, clientData) == 1 {
			// This event should be deleted. Unlink it.

			if prevPtr == uintptr(0) {
				(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr = (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr
			} else {
				(*Tcl_Event)(unsafe.Pointer(prevPtr)).FnextPtr = (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr
			}

			// Update 'last' and 'marker' events if either has been deleted.

			if (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr == uintptr(0) {
				(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FlastEventPtr = prevPtr
			}
			if (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr == evPtr {
				(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr = prevPtr
			}

			// Delete the event data structure.

			hold = evPtr
			evPtr = (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr
			XTclpFree(tls, hold)
		} else {
			// Event is to be retained.

			prevPtr = evPtr
			evPtr = (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr
		}
	}

}

//----------------------------------------------------------------------
//
// Tcl_ServiceEvent --
//
//	Process one event from the event queue, or invoke an asynchronous
//	event handler. Operates on event queue for current thread.
//
// Results:
//	The return value is 1 if the function actually found an event to
//	process. If no processing occurred, then 0 is returned.
//
// Side effects:
//	Invokes all of the event handlers for the highest priority event in
//	the event queue. May collapse some events into a single event or
//	discard stale events.
//
//----------------------------------------------------------------------

func XTcl_ServiceEvent(tls *libc.TLS, flags int32) int32 { /* tclNotify.c:600:1: */
	var evPtr uintptr
	var prevPtr uintptr
	var proc uintptr
	var result int32
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))

	// Asynchronous event handlers are considered to be the highest priority
	// events, and so must be invoked before we process events on the event
	// queue.

	if XTcl_AsyncReady(tls) != 0 {
		XTcl_AsyncInvoke(tls, uintptr(0), 0)
		return 1
	}

	// No event flags is equivalent to TCL_ALL_EVENTS.

	if flags&libc.CplInt32(int32(1)<<1) == 0 {
		flags = flags | libc.CplInt32(int32(1)<<1)
	}

	// Loop through all the events in the queue until we find one that can
	// actually be handled.

	for evPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr; evPtr != uintptr(0); evPtr = (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr {
		// Call the handler for the event. If it actually handles the event
		// then free the storage for the event. There are two tricky things
		// here, both stemming from the fact that the event code may be
		// re-entered while servicing the event:
		//
		// 1. Set the "proc" field to NULL.  This is a signal to ourselves
		//    that we shouldn't reexecute the handler if the event loop is
		//    re-entered.
		// 2. When freeing the event, must search the queue again from the
		//    front to find it. This is because the event queue could change
		//    almost arbitrarily while handling the event, so we can't depend
		//    on pointers found now still being valid when the handler
		//    returns.

		proc = (*Tcl_Event)(unsafe.Pointer(evPtr)).Fproc
		if proc == uintptr(0) {
			continue
		}
		(*Tcl_Event)(unsafe.Pointer(evPtr)).Fproc = uintptr(0)

		// Release the lock before calling the event function. This allows
		// other threads to post events if we enter a recursive event loop in
		// this thread. Note that we are making the assumption that if the
		// proc returns 0, the event is still in the list.

		result = (*struct {
			f func(*libc.TLS, uintptr, int32) int32
		})(unsafe.Pointer(&struct{ uintptr }{proc})).f(tls, evPtr, flags)

		if result != 0 {
			// The event was processed, so remove it from the queue.

			if (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr == evPtr {
				(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr = (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr
				if (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr == uintptr(0) {
					(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FlastEventPtr = uintptr(0)
				}
				if (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr == evPtr {
					(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr = uintptr(0)
				}
			} else {
				for prevPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventPtr; prevPtr != 0 && (*Tcl_Event)(unsafe.Pointer(prevPtr)).FnextPtr != evPtr; prevPtr = (*Tcl_Event)(unsafe.Pointer(prevPtr)).FnextPtr {
					// Empty loop body.
				}
				if prevPtr != 0 {
					(*Tcl_Event)(unsafe.Pointer(prevPtr)).FnextPtr = (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr
					if (*Tcl_Event)(unsafe.Pointer(evPtr)).FnextPtr == uintptr(0) {
						(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FlastEventPtr = prevPtr
					}
					if (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr == evPtr {
						(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FmarkerEventPtr = prevPtr
					}
				} else {
					evPtr = uintptr(0)
				}
			}
			if evPtr != 0 {
				XTclpFree(tls, evPtr)
			}

			return 1
		} else {
			// The event wasn't actually handled, so we have to restore the
			// proc field to allow the event to be attempted again.

			(*Tcl_Event)(unsafe.Pointer(evPtr)).Fproc = proc
		}
	}

	return 0
}

//----------------------------------------------------------------------
//
// Tcl_GetServiceMode --
//
//	This routine returns the current service mode of the notifier.
//
// Results:
//	Returns either TCL_SERVICE_ALL or TCL_SERVICE_NONE.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetServiceMode(tls *libc.TLS) int32 { /* tclNotify.c:739:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))

	return (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FserviceMode
}

//----------------------------------------------------------------------
//
// Tcl_SetServiceMode --
//
//	This routine sets the current service mode of the tsdPtr->
//
// Results:
//	Returns the previous service mode.
//
// Side effects:
//	Invokes the notifier service mode hook function.
//
//----------------------------------------------------------------------

func XTcl_SetServiceMode(tls *libc.TLS, mode int32) int32 { /* tclNotify.c:763:1: */
	var oldMode int32
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))

	oldMode = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FserviceMode
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FserviceMode = mode
	XTcl_ServiceModeHook(tls, mode)
	return oldMode
}

//----------------------------------------------------------------------
//
// Tcl_SetMaxBlockTime --
//
//	This function is invoked by event sources to tell the notifier how
//	long it may block the next time it blocks. The timePtr argument gives
//	a maximum time; the actual time may be less if some other event source
//	requested a smaller time.
//
// Results:
//	None.
//
// Side effects:
//	May reduce the length of the next sleep in the tsdPtr->
//
//----------------------------------------------------------------------

func XTcl_SetMaxBlockTime(tls *libc.TLS, timePtr uintptr) { /* tclNotify.c:796:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))

	if !((*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTimeSet != 0) || (*Tcl_Time)(unsafe.Pointer(timePtr)).Fsec < (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTime.Fsec ||
		(*Tcl_Time)(unsafe.Pointer(timePtr)).Fsec == (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTime.Fsec &&
			(*Tcl_Time)(unsafe.Pointer(timePtr)).Fusec < (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTime.Fusec {
		(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTime = *(*Tcl_Time)(unsafe.Pointer(timePtr))
		(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTimeSet = 1
	}

	// If we are called outside an event source traversal, set the timeout
	// immediately.

	if !((*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FinTraversal != 0) {
		XTcl_SetTimer(tls, tsdPtr+40)
	}
}

//----------------------------------------------------------------------
//
// Tcl_DoOneEvent --
//
//	Process a single event of some sort. If there's no work to do, wait
//	for an event to occur, then process it.
//
// Results:
//	The return value is 1 if the function actually found an event to
//	process. If no processing occurred, then 0 is returned (this can
//	happen if the TCL_DONT_WAIT flag is set or if there are no event
//	handlers to wait for in the set specified by flags).
//
// Side effects:
//	May delay execution of process while waiting for an event, unless
//	TCL_DONT_WAIT is set in the flags argument. Event sources are invoked
//	to check for and queue events. Event handlers may produce arbitrary
//	side effects.
//
//----------------------------------------------------------------------

func XTcl_DoOneEvent(tls *libc.TLS, flags int32) int32 { /* tclNotify.c:844:1: */
	var result int32
	var oldMode int32
	var sourcePtr uintptr
	var timePtr uintptr
	var tsdPtr uintptr
	result = 0
	tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))

	// The first thing we do is to service any asynchronous event handlers.

	if !(XTcl_AsyncReady(tls) != 0) {
		goto __1
	}
	XTcl_AsyncInvoke(tls, uintptr(0), 0)
	return 1
__1:
	;

	// No event flags is equivalent to TCL_ALL_EVENTS.

	if !(flags&libc.CplInt32(int32(1)<<1) == 0) {
		goto __2
	}
	flags = flags | libc.CplInt32(int32(1)<<1)
__2:
	;

	// Set the service mode to none so notifier event routines won't try to
	// service events recursively.

	oldMode = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FserviceMode
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FserviceMode = TCL_SERVICE_NONE

	// The core of this function is an infinite loop, even though we only
	// service one event. The reason for this is that we may be processing
	// events that don't do anything inside of Tcl.

__3:
	if !(1 != 0) {
		goto __4
	}
	// If idle events are the only things to service, skip the main part
	// of the loop and go directly to handle idle events (i.e. don't wait
	// even if TCL_DONT_WAIT isn't set).

	if !(flags&libc.CplInt32(int32(1)<<1) == int32(1)<<5) {
		goto __5
	}
	flags = int32(1)<<5 | int32(1)<<1
	goto idleEvents
__5:
	;

	// Ask Tcl to service a queued event, if there are any.

	if !(XTcl_ServiceEvent(tls, flags) != 0) {
		goto __6
	}
	result = 1
	goto __4
__6:
	;

	// If TCL_DONT_WAIT is set, be sure to poll rather than blocking,
	// otherwise reset the block time to infinity.

	if !(flags&(int32(1)<<1) != 0) {
		goto __7
	}
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTime.Fsec = 0
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTime.Fusec = 0
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTimeSet = 1
	goto __8
__7:
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTimeSet = 0
__8:
	;

	// Set up all the event sources for new events. This will cause the
	// block time to be updated if necessary.

	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FinTraversal = 1
	sourcePtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventSourcePtr
__9:
	if !(sourcePtr != uintptr(0)) {
		goto __11
	}
	if !((*EventSource)(unsafe.Pointer(sourcePtr)).FsetupProc != 0) {
		goto __12
	}
	(*struct {
		f func(*libc.TLS, ClientData, int32)
	})(unsafe.Pointer(&struct{ uintptr }{(*EventSource)(unsafe.Pointer(sourcePtr)).FsetupProc})).f(tls, (*EventSource)(unsafe.Pointer(sourcePtr)).FclientData, flags)
__12:
	;
	goto __10
__10:
	sourcePtr = (*EventSource)(unsafe.Pointer(sourcePtr)).FnextPtr
	goto __9
	goto __11
__11:
	;
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FinTraversal = 0

	if !(flags&(int32(1)<<1) != 0 || (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTimeSet != 0) {
		goto __13
	}
	timePtr = tsdPtr + 40
	goto __14
__13:
	timePtr = uintptr(0)
__14:
	;

	// Wait for a new event or a timeout. If Tcl_WaitForEvent returns -1,
	// we should abort Tcl_DoOneEvent.

	result = XTcl_WaitForEvent(tls, timePtr)
	if !(result < 0) {
		goto __15
	}
	result = 0
	goto __4
__15:
	;

	// Check all the event sources for new events.

	sourcePtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventSourcePtr
__16:
	if !(sourcePtr != uintptr(0)) {
		goto __18
	}
	if !((*EventSource)(unsafe.Pointer(sourcePtr)).FcheckProc != 0) {
		goto __19
	}
	(*struct {
		f func(*libc.TLS, ClientData, int32)
	})(unsafe.Pointer(&struct{ uintptr }{(*EventSource)(unsafe.Pointer(sourcePtr)).FcheckProc})).f(tls, (*EventSource)(unsafe.Pointer(sourcePtr)).FclientData, flags)
__19:
	;
	goto __17
__17:
	sourcePtr = (*EventSource)(unsafe.Pointer(sourcePtr)).FnextPtr
	goto __16
	goto __18
__18:
	;

	// Check for events queued by the notifier or event sources.

	if !(XTcl_ServiceEvent(tls, flags) != 0) {
		goto __20
	}
	result = 1
	goto __4
__20:
	;

	// We've tried everything at this point, but nobody we know about had
	// anything to do. Check for idle events. If none, either quit or go
	// back to the top and try again.

idleEvents:
	if !(flags&(int32(1)<<5) != 0) {
		goto __21
	}
	if !(XTclServiceIdle(tls) != 0) {
		goto __22
	}
	result = 1
	goto __4
__22:
	;
__21:
	;
	if !(flags&(int32(1)<<1) != 0) {
		goto __23
	}
	goto __4
__23:
	;

	// If Tcl_WaitForEvent has returned 1, indicating that one system
	// event has been dispatched (and thus that some Tcl code might have
	// been indirectly executed), we break out of the loop. We do this to
	// give VwaitCmd for instance a chance to check if that system event
	// had the side effect of changing the variable (so the vwait can
	// return and unwind properly).
	//
	// NB: We will process idle events if any first, because otherwise we
	//     might never do the idle events if the notifier always gets
	//     system events.

	if !(result != 0) {
		goto __24
	}
	goto __4
__24:
	;
	goto __3
__4:
	;

	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FserviceMode = oldMode
	return result
}

//----------------------------------------------------------------------
//
// Tcl_ServiceAll --
//
//	This routine checks all of the event sources, processes events that
//	are on the Tcl event queue, and then calls the any idle handlers.
//	Platform specific notifier callbacks that generate events should call
//	this routine before returning to the system in order to ensure that
//	Tcl gets a chance to process the new events.
//
// Results:
//	Returns 1 if an event or idle handler was invoked, else 0.
//
// Side effects:
//	Anything that an event or idle handler may do.
//
//----------------------------------------------------------------------

func XTcl_ServiceAll(tls *libc.TLS) int32 { /* tclNotify.c:1032:1: */
	var result int32 = 0
	var sourcePtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey7)), int32(unsafe.Sizeof(ThreadSpecificData8{})))

	if (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FserviceMode == TCL_SERVICE_NONE {
		return result
	}

	// We need to turn off event servicing like we to in Tcl_DoOneEvent, to
	// avoid recursive calls.

	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FserviceMode = TCL_SERVICE_NONE

	// Check async handlers first.

	if XTcl_AsyncReady(tls) != 0 {
		XTcl_AsyncInvoke(tls, uintptr(0), 0)
	}

	// Make a single pass through all event sources, queued events, and idle
	// handlers. Note that we wait to update the notifier timer until the end
	// so we can avoid multiple changes.

	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FinTraversal = 1
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTimeSet = 0

	for sourcePtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventSourcePtr; sourcePtr != uintptr(0); sourcePtr = (*EventSource)(unsafe.Pointer(sourcePtr)).FnextPtr {
		if (*EventSource)(unsafe.Pointer(sourcePtr)).FsetupProc != 0 {
			(*struct {
				f func(*libc.TLS, ClientData, int32)
			})(unsafe.Pointer(&struct{ uintptr }{(*EventSource)(unsafe.Pointer(sourcePtr)).FsetupProc})).f(tls, (*EventSource)(unsafe.Pointer(sourcePtr)).FclientData, libc.CplInt32(int32(1)<<1))
		}
	}
	for sourcePtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FfirstEventSourcePtr; sourcePtr != uintptr(0); sourcePtr = (*EventSource)(unsafe.Pointer(sourcePtr)).FnextPtr {
		if (*EventSource)(unsafe.Pointer(sourcePtr)).FcheckProc != 0 {
			(*struct {
				f func(*libc.TLS, ClientData, int32)
			})(unsafe.Pointer(&struct{ uintptr }{(*EventSource)(unsafe.Pointer(sourcePtr)).FcheckProc})).f(tls, (*EventSource)(unsafe.Pointer(sourcePtr)).FclientData, libc.CplInt32(int32(1)<<1))
		}
	}

	for XTcl_ServiceEvent(tls, 0) != 0 {
		result = 1
	}
	if XTclServiceIdle(tls) != 0 {
		result = 1
	}

	if !((*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FblockTimeSet != 0) {
		XTcl_SetTimer(tls, uintptr(0))
	} else {
		XTcl_SetTimer(tls, tsdPtr+40)
	}
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FinTraversal = 0
	(*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FserviceMode = TCL_SERVICE_ALL
	return result
}

//----------------------------------------------------------------------
//
// Tcl_ThreadAlert --
//
//	This function wakes up the notifier associated with the specified
//	thread (if there is one).
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ThreadAlert(tls *libc.TLS, threadId Tcl_ThreadId) { /* tclNotify.c:1114:1: */
	var tsdPtr uintptr

	// Find the notifier associated with the specified thread. Note that we
	// need to hold the listLock while calling Tcl_AlertNotifier to avoid a
	// race condition where the specified thread might destroy its notifier.

	for tsdPtr = firstNotifierPtr; tsdPtr != 0; tsdPtr = (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FnextPtr {
		if (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FthreadId == threadId {
			XTcl_AlertNotifier(tls, (*ThreadSpecificData8)(unsafe.Pointer(tsdPtr)).FclientData)
			break
		}
	}

}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// !END!: Do not edit above this line.

// Alternatives to Tcl_Preserve/Tcl_EventuallyFree/Tcl_Release.

// A convenience macro for iterating through the lists used in the internal
// memory management of objects.
// REQUIRES DECLARATION: int i;

// Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS
// sets up the declarations needed for the main macro, FOREACH_HASH, which
// does the actual iteration. FOREACH_HASH_VALUE is a restricted version that
// only iterates over values.

// Convenience macro for duplicating a list. Needs no external declaration,
// but all arguments are used multiple times and so must have no side effects.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Commands in oo::define.

var defineCmds = [10]struct {
	Fname        uintptr
	FobjProc     uintptr
	Fflag        int32
	F__ccgo_pad1 [4]byte
}{
	{Fname: ts + 26491 /* "constructor" */, FobjProc: 0},
	{Fname: ts + 47388 /* "deletemethod" */, FobjProc: 0},
	{Fname: ts + 26503 /* "destructor" */, FobjProc: 0},
	{Fname: ts + 46122 /* "export" */, FobjProc: 0},
	{Fname: ts + 47401 /* "forward" */, FobjProc: 0},
	{Fname: ts + 26521 /* "method" */, FobjProc: 0},
	{Fname: ts + 47409 /* "renamemethod" */, FobjProc: 0},
	{Fname: ts + 47422 /* "self" */, FobjProc: 0},
	{Fname: ts + 47427 /* "unexport" */, FobjProc: 0},
	{},
} /* tclOO.c:27:3 */
var objdefCmds = [8]struct {
	Fname        uintptr
	FobjProc     uintptr
	Fflag        int32
	F__ccgo_pad1 [4]byte
}{
	{Fname: ts + 16666 /* "class" */, FobjProc: 0, Fflag: 1},
	{Fname: ts + 47388 /* "deletemethod" */, FobjProc: 0, Fflag: 1},
	{Fname: ts + 46122 /* "export" */, FobjProc: 0, Fflag: 1},
	{Fname: ts + 47401 /* "forward" */, FobjProc: 0, Fflag: 1},
	{Fname: ts + 26521 /* "method" */, FobjProc: 0, Fflag: 1},
	{Fname: ts + 47409 /* "renamemethod" */, FobjProc: 0, Fflag: 1},
	{Fname: ts + 47427 /* "unexport" */, FobjProc: 0, Fflag: 1},
	{},
} /* tclOO.c:38:4 */

// Methods in the oo::object and oo::class classes. First, we define a helper
// macro that makes building the method type declaration structure a lot
// easier. No point in making life harder than it has to be!
//
// Note that the core methods don't need clone or free proc callbacks.

var objMethods = [6]DeclaredClassMethod{
	{Fname: ts + 47436, FisPublic: 1, Fdefinition: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 47444, FcallProc: 0}},
	{Fname: ts + 2994, Fdefinition: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 47467, FcallProc: 0}},
	{Fname: ts + 13462, Fdefinition: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 47487, FcallProc: 0}},
	{Fname: ts + 4017, Fdefinition: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 47510, FcallProc: 0}},
	{Fname: ts + 4281, Fdefinition: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 47534, FcallProc: 0}},
	{}} /* tclOO.c:110:34 */
var clsMethods = [4]DeclaredClassMethod{
	{Fname: ts + 23746, FisPublic: 1, Fdefinition: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 47557, FcallProc: 0}},
	{Fname: ts + 47579, FisPublic: 1, Fdefinition: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 47583, FcallProc: 0}},
	{Fname: ts + 47602, Fdefinition: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 47622, FcallProc: 0}},
	{}} /* tclOO.c:117:4 */

// And for the oo::class constructor...

var classConstructor = Tcl_MethodType{
	Fversion:  TCL_OO_METHOD_VERSION_CURRENT,
	Fname:     ts + 47657,
	FcallProc: 0,
} /* tclOO.c:128:29 */

// Scripted parts of TclOO. First, the main script (cannot be outside this
// file).

var initScript uintptr = ts + 47679 /* "package ifneeded..." */ /* tclOO.c:139:19 */
// "tcl_findLibrary tcloo $oo::version $oo::version"
// " tcloo.tcl OO_LIBRARY oo::library;";

// The scripted part of the definitions of slots.

var slotScript uintptr = ts + 47831 /* "::oo::define ::o..." */ /* tclOO.c:150:19 */

// The body of the <cloned> method of oo::object.

var clonedBody uintptr = ts + 48914 /* "foreach p [info ..." */ /* tclOO.c:183:19 */

// Convenience macro for getting the foundation from an interpreter.

// Macros to make inspecting into the guts of an object cleaner.
//
// The ocPtr parameter (only in these macros) is assumed to work fine with
// either an oPtr or a classPtr. Note that the roots oo::object and oo::class
// have _both_ their object and class flags tagged with ROOT_OBJECT and
// ROOT_CLASS respectively.

// ----------------------------------------------------------------------
//
// TclOOInit --
//
//	Called to initialise the OO system within an interpreter.
//
// Result:
//	TCL_OK if the setup succeeded. Currently assumed to always work.
//
// Side effects:
//	Creates namespaces, commands, several classes and a number of
//	callbacks. Upon return, the OO system is ready for use.
//
// ----------------------------------------------------------------------

func XTclOOInit(tls *libc.TLS, interp uintptr) int32 { /* tclOO.c:258:1: */
	// Build the core of the OO system.

	if sInitFoundation(tls, interp) != TCL_OK {
		return TCL_ERROR
	}

	// Run our initialization script and, if that works, declare the package
	// to be fully provided.

	if XTcl_Eval(tls, interp, initScript) != TCL_OK {
		return TCL_ERROR
	}

	return XTcl_PkgProvideEx(tls, interp, ts+49550, ts+49556,
		uintptr(unsafe.Pointer(&XtclOOStubs)))
}

// ----------------------------------------------------------------------
//
// TclOOGetFoundation --
//
//	Get a reference to the OO core class system.
//
// ----------------------------------------------------------------------

func XTclOOGetFoundation(tls *libc.TLS, interp uintptr) uintptr { /* tclOO.c:292:12: */
	return (*Interp)(unsafe.Pointer(interp)).FobjectFoundation
}

// ----------------------------------------------------------------------
//
// InitFoundation --
//
//	Set up the core of the OO core class system. This is a structure
//	holding references to the magical bits that need to be known about in
//	other places, plus the oo::object and oo::class classes.
//
// ----------------------------------------------------------------------

func sInitFoundation(tls *libc.TLS, interp uintptr) int32 { /* tclOO.c:312:1: */
	bp := tls.Alloc(632)
	defer tls.Free(632)

	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&tsdKey)), int32(unsafe.Sizeof(ThreadLocalData{})))
	var fPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Foundation{})))
	var namePtr uintptr
	var argsPtr uintptr
	var bodyPtr uintptr
	// var fakeCls Class at bp+216, 264

	// var fakeObject Object at bp+480, 152

	// var buffer Tcl_DString at bp, 216

	var cmdPtr uintptr
	var i int32

	// Initialize the structure that holds the OO system core. This is
	// attached to the interpreter via an assocData entry; not very efficient,
	// but the best we can do without hacking the core more.

	libc.Xmemset(tls, fPtr, 0, uint64(unsafe.Sizeof(Foundation{})))
	(*Interp)(unsafe.Pointer(interp)).FobjectFoundation = fPtr
	(*Foundation)(unsafe.Pointer(fPtr)).Finterp = interp
	(*Foundation)(unsafe.Pointer(fPtr)).FooNs = XTcl_CreateNamespace(tls, interp, ts+49562, fPtr, uintptr(0))
	XTcl_Export(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FooNs, ts+49567, 1)
	(*Foundation)(unsafe.Pointer(fPtr)).FdefineNs = XTcl_CreateNamespace(tls, interp, ts+49574, fPtr,
		*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeletedDefineNamespace})))
	(*Foundation)(unsafe.Pointer(fPtr)).FobjdefNs = XTcl_CreateNamespace(tls, interp, ts+49587, fPtr,
		*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeletedObjdefNamespace})))
	(*Foundation)(unsafe.Pointer(fPtr)).FhelpersNs = XTcl_CreateNamespace(tls, interp, ts+49603, fPtr,
		*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sDeletedHelpersNamespace})))
	(*Foundation)(unsafe.Pointer(fPtr)).Fepoch = 0
	(*Foundation)(unsafe.Pointer(fPtr)).FtsdPtr = tsdPtr
	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Fbytes, ts+13462, uint64(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Fbytes + 7)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Flength = int32(uint64(unsafe.Sizeof([8]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).FtypePtr = uintptr(0)
		{
		}
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Foundation)(unsafe.Pointer(fPtr)).FconstructorName = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([14]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([14]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Fbytes, ts+49617, uint64(int32(uint64(unsafe.Sizeof([14]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Fbytes + 13)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Flength = int32(uint64(unsafe.Sizeof([14]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).FtypePtr = uintptr(0)
		{
		}
	}
	for ok4 := true; ok4; ok4 = 0 != 0 {
		for ok5 := true; ok5; ok5 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Foundation)(unsafe.Pointer(fPtr)).FdestructorName = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Fbytes, ts+49631, uint64(int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Fbytes + 12)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Flength = int32(uint64(unsafe.Sizeof([13]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).FtypePtr = uintptr(0)
		{
		}
	}
	for ok6 := true; ok6; ok6 = 0 != 0 {
		for ok7 := true; ok7; ok7 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Foundation)(unsafe.Pointer(fPtr)).FclonedName = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Fbytes, ts+49644, uint64(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Fbytes + 8)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Flength = int32(uint64(unsafe.Sizeof([9]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).FtypePtr = uintptr(0)
		{
		}
	}
	for ok8 := true; ok8; ok8 = 0 != 0 {
		for ok9 := true; ok9; ok9 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			(*Foundation)(unsafe.Pointer(fPtr)).FdefineName = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Fbytes, ts+49574, uint64(int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Fbytes + 12)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Flength = int32(uint64(unsafe.Sizeof([13]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).FrefCount++
	XTcl_CreateObjCommand(tls, interp, ts+49653,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclOOUnknownDefinition})), uintptr(0), uintptr(0))
	for ok10 := true; ok10; ok10 = 0 != 0 {
		for ok11 := true; ok11; ok11 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			namePtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(namePtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([24]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(namePtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([24]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes, ts+49653, uint64(int32(uint64(unsafe.Sizeof([24]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes + 23)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(namePtr)).Flength = int32(uint64(unsafe.Sizeof([24]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(namePtr)).FtypePtr = uintptr(0)
		{
		}
	}
	XTcl_SetNamespaceUnknownHandler(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FdefineNs, namePtr)
	XTcl_SetNamespaceUnknownHandler(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FobjdefNs, namePtr)

	// Create the subcommands in the oo::define and oo::objdefine spaces.

	XTcl_DStringInit(tls, bp)
	for i = 0; defineCmds[i].Fname != 0; i++ {
		XTcl_DStringAppend(tls, bp, ts+49677, int32(uint64(unsafe.Sizeof([15]int8{}))-uint64(1)))
		XTcl_DStringAppend(tls, bp, defineCmds[i].Fname, -1)
		XTcl_CreateObjCommand(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring,
			defineCmds[i].FobjProc, uintptr(Intptr_t(defineCmds[i].Fflag)), uintptr(0))
		XTcl_DStringFree(tls, bp)
	}
	for i = 0; objdefCmds[i].Fname != 0; i++ {
		XTcl_DStringAppend(tls, bp, ts+49692, int32(uint64(unsafe.Sizeof([18]int8{}))-uint64(1)))
		XTcl_DStringAppend(tls, bp, objdefCmds[i].Fname, -1)
		XTcl_CreateObjCommand(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring,
			objdefCmds[i].FobjProc, uintptr(Intptr_t(objdefCmds[i].Fflag)), uintptr(0))
		XTcl_DStringFree(tls, bp)
	}

	XTcl_CallWhenDeleted(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr)
	}{sKillFoundation})), uintptr(0))

	// Create the objects at the core of the object system. These need to be
	// spliced manually.

	// Stand up a phony class for bootstrapping.

	(*Foundation)(unsafe.Pointer(fPtr)).FobjectCls = bp + 216 /* &fakeCls */

	// Referenced in TclOOAllocClass to increment the refCount.

	(*Class)(unsafe.Pointer(bp + 216 /* &fakeCls */)).FthisPtr = bp + 480 /* &fakeObject */

	(*Foundation)(unsafe.Pointer(fPtr)).FobjectCls = XTclOOAllocClass(tls, interp,
		sAllocObject(tls, interp, ts+19320, (*Foundation)(unsafe.Pointer(fPtr)).FooNs, uintptr(0)))
	// Corresponding TclOODecrRefCount in KillFoudation.

	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).FthisPtr)).FrefCount++

	// This is why it is unnecessary in this routine to replace the
	// incremented reference count of fPtr->objectCls that was swallowed by
	// fakeObject.

	(*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).Fsuperclasses.Fnum = 0
	XTclpFree(tls, (*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).Fsuperclasses.Flist)
	(*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).Fsuperclasses.Flist = uintptr(0)

	// Special initialization for the primordial objects.

	*(*int32)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).FthisPtr + 92)) |= ROOT_OBJECT
	*(*int32)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls + 8)) |= ROOT_OBJECT

	(*Foundation)(unsafe.Pointer(fPtr)).FclassCls = XTclOOAllocClass(tls, interp,
		sAllocObject(tls, interp, ts+16666, (*Foundation)(unsafe.Pointer(fPtr)).FooNs, uintptr(0)))

	// Corresponding TclOODecrRefCount in KillFoudation.

	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr)).FrefCount++

	// Increment reference counts for each reference because these
	// relationships can be dynamically changed.
	//
	// Corresponding TclOODecrRefCount for all incremented refcounts is in
	// KillFoundation.

	// Rewire bootstrapped objects.

	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).FthisPtr)).FselfCls = (*Foundation)(unsafe.Pointer(fPtr)).FclassCls
	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr)).FrefCount++
	XTclOOAddToInstances(tls, (*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).FthisPtr, (*Foundation)(unsafe.Pointer(fPtr)).FclassCls)

	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr)).FselfCls = (*Foundation)(unsafe.Pointer(fPtr)).FclassCls
	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr)).FrefCount++
	XTclOOAddToInstances(tls, (*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr, (*Foundation)(unsafe.Pointer(fPtr)).FclassCls)

	*(*int32)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr + 92)) |= ROOT_CLASS
	*(*int32)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls + 8)) |= ROOT_CLASS

	// Standard initialization for new Objects.

	XTclOOAddToSubclasses(tls, (*Foundation)(unsafe.Pointer(fPtr)).FclassCls, (*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)

	// Basic method declarations for the core classes.

	for i = 0; objMethods[i].Fname != 0; i++ {
		XTclOONewBasicMethod(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FobjectCls, uintptr(unsafe.Pointer(&objMethods))+uintptr(i)*56)
	}
	for i = 0; clsMethods[i].Fname != 0; i++ {
		XTclOONewBasicMethod(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FclassCls, uintptr(unsafe.Pointer(&clsMethods))+uintptr(i)*56)
	}

	// Create the default <cloned> method implementation, used when 'oo::copy'
	// is called to finish the copying of one object to another.

	for ok12 := true; ok12; ok12 = 0 != 0 {
		for ok13 := true; ok13; ok13 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			argsPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(argsPtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(argsPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(argsPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(argsPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(argsPtr)).Fbytes, ts+49710, uint64(int32(uint64(unsafe.Sizeof([13]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(argsPtr)).Fbytes + 12)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(argsPtr)).Flength = int32(uint64(unsafe.Sizeof([13]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(argsPtr)).FtypePtr = uintptr(0)
		{
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(argsPtr)).FrefCount++
	bodyPtr = XTcl_NewStringObj(tls, clonedBody, -1)
	XTclOONewProcMethod(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FobjectCls, 0, (*Foundation)(unsafe.Pointer(fPtr)).FclonedName, argsPtr,
		bodyPtr, uintptr(0))
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(argsPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(argsPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(argsPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(argsPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(argsPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(argsPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(argsPtr)).Flength = -1
			for ok14 := true; ok14; ok14 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(argsPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = argsPtr
			}
		} else {
			XTclFreeObj(tls, argsPtr)
		}
	}

	// Finish setting up the class of classes by marking the 'new' method as
	// private; classes, unlike general objects, must have explicit names. We
	// also need to create the constructor for classes.

	for ok15 := true; ok15; ok15 = 0 != 0 {
		for ok16 := true; ok16; ok16 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			namePtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(namePtr)).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(namePtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes, ts+47579, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes + 3)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(namePtr)).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(namePtr)).FtypePtr = uintptr(0)
		{
		}
	}
	XTcl_NewInstanceMethod(tls, interp, (*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr,
		namePtr, 0, uintptr(0), uintptr(0))
	(*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FconstructorPtr = XTcl_NewMethod(tls, interp,
		(*Foundation)(unsafe.Pointer(fPtr)).FclassCls, uintptr(0), 0, uintptr(unsafe.Pointer(&classConstructor)), uintptr(0))

	// Create non-object commands and plug ourselves into the Tcl [info]
	// ensemble.

	cmdPtr = XTcl_NRCreateCommand(tls, interp, ts+49723,
		uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclOONextObjCmd})), uintptr(0), uintptr(0))
	(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
	}{XTclCompileObjectNextCmd}))
	cmdPtr = XTcl_NRCreateCommand(tls, interp, ts+49743,
		uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclOONextToObjCmd})), uintptr(0), uintptr(0))
	(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
	}{XTclCompileObjectNextToCmd}))
	cmdPtr = XTcl_CreateObjCommand(tls, interp, ts+49765,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclOOSelfObjCmd})), uintptr(0), uintptr(0))
	(*Command)(unsafe.Pointer(cmdPtr)).FcompileProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
	}{XTclCompileObjectSelfCmd}))
	XTcl_CreateObjCommand(tls, interp, ts+49574, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclOODefineObjCmd})), uintptr(0),
		uintptr(0))
	XTcl_CreateObjCommand(tls, interp, ts+49587, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclOOObjDefObjCmd})), uintptr(0),
		uintptr(0))
	XTcl_CreateObjCommand(tls, interp, ts+49785, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclOOCopyObjectCmd})), uintptr(0), uintptr(0))
	XTclOOInitInfo(tls, interp)

	// Now make the class of slots.

	if XTclOODefineSlots(tls, fPtr) != TCL_OK {
		return TCL_ERROR
	}
	return XTcl_Eval(tls, interp, slotScript)
}

var tsdKey Tcl_ThreadDataKey /* tclOO.c:315:30: */

// ----------------------------------------------------------------------
//
// DeletedDefineNamespace, DeletedObjdefNamespace, DeletedHelpersNamespace --
//
//	Simple helpers used to clear fields of the foundation when they no
//	longer hold useful information.
//
// ----------------------------------------------------------------------

func sDeletedDefineNamespace(tls *libc.TLS, clientData ClientData) { /* tclOO.c:543:1: */
	var fPtr uintptr = clientData

	(*Foundation)(unsafe.Pointer(fPtr)).FdefineNs = uintptr(0)
}

func sDeletedObjdefNamespace(tls *libc.TLS, clientData ClientData) { /* tclOO.c:552:1: */
	var fPtr uintptr = clientData

	(*Foundation)(unsafe.Pointer(fPtr)).FobjdefNs = uintptr(0)
}

func sDeletedHelpersNamespace(tls *libc.TLS, clientData ClientData) { /* tclOO.c:561:1: */
	var fPtr uintptr = clientData

	(*Foundation)(unsafe.Pointer(fPtr)).FhelpersNs = uintptr(0)
}

// ----------------------------------------------------------------------
//
// KillFoundation --
//
//	Delete those parts of the OO core that are not deleted automatically
//	when the objects and classes themselves are destroyed.
//
// ----------------------------------------------------------------------

func sKillFoundation(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclOO.c:581:1: */
	var fPtr uintptr = (*Interp)(unsafe.Pointer(interp)).FobjectFoundation

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj + 32)) = XtclFreeObjList
				XtclFreeObjList = (*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj
			}
		} else {
			XTclFreeObj(tls, (*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj)
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)).Flength = -1
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FconstructorName + 32)) = XtclFreeObjList
				XtclFreeObjList = (*Foundation)(unsafe.Pointer(fPtr)).FconstructorName
			}
		} else {
			XTclFreeObj(tls, (*Foundation)(unsafe.Pointer(fPtr)).FconstructorName)
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)).Flength = -1
			for ok2 := true; ok2; ok2 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdestructorName + 32)) = XtclFreeObjList
				XtclFreeObjList = (*Foundation)(unsafe.Pointer(fPtr)).FdestructorName
			}
		} else {
			XTclFreeObj(tls, (*Foundation)(unsafe.Pointer(fPtr)).FdestructorName)
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName)).Flength = -1
			for ok3 := true; ok3; ok3 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclonedName + 32)) = XtclFreeObjList
				XtclFreeObjList = (*Foundation)(unsafe.Pointer(fPtr)).FclonedName
			}
		} else {
			XTclFreeObj(tls, (*Foundation)(unsafe.Pointer(fPtr)).FclonedName)
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName)).Flength = -1
			for ok4 := true; ok4; ok4 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FdefineName + 32)) = XtclFreeObjList
				XtclFreeObjList = (*Foundation)(unsafe.Pointer(fPtr)).FdefineName
			}
		} else {
			XTclFreeObj(tls, (*Foundation)(unsafe.Pointer(fPtr)).FdefineName)
		}
	}

	XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).FthisPtr)
	XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr)

	XTclpFree(tls, fPtr)
}

// ----------------------------------------------------------------------
//
// AllocObject --
//
//	Allocate an object of basic type. Does not splice the object into its
//	class's instance list.  The caller must set the classPtr on the object
//	to either a class or NULL, call TclOOAddToInstances to add the object
//	to the class's instance list, and if the object itself is a class, use
//	call TclOOAddToSubclasses() to add it to the right class's list of
//	subclasses.
//
// ----------------------------------------------------------------------

func sAllocObject(tls *libc.TLS, interp uintptr, nameStr uintptr, nsPtr uintptr, nsNameStr uintptr) uintptr { /* tclOO.c:615:15: */
	bp := tls.Alloc(42)
	defer tls.Free(42)

	var fPtr uintptr
	var oPtr uintptr
	var cmdPtr uintptr
	var tracePtr uintptr
	var creationEpoch int32
	// var objName [34]int8 at bp+8, 34
	fPtr = (*Interp)(unsafe.Pointer(interp)).FobjectFoundation

	oPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Object{})))
	libc.Xmemset(tls, oPtr, 0, uint64(unsafe.Sizeof(Object{})))

	// Every object has a namespace; make one. Note that this also normally
	// computes the creation epoch value for the object, a sequence number
	// that is unique to the object (and which allows us to manage method
	// caching without comparing pointers).
	//
	// When creating a namespace, we first check to see if the caller
	// specified the name for the namespace. If not, we generate namespace
	// names using the epoch until such time as a new namespace is actually
	// created.

	if !(nsNameStr != uintptr(0)) {
		goto __1
	}
	(*Object)(unsafe.Pointer(oPtr)).FnamespacePtr = XTcl_CreateNamespace(tls, interp, nsNameStr, oPtr, uintptr(0))
	if !((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr != uintptr(0)) {
		goto __2
	}
	creationEpoch = libc.PreIncInt32(&(*ThreadLocalData)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FtsdPtr)).FnsCount, 1)
	goto configNamespace
__2:
	;
	XTcl_ResetResult(tls, interp)
__1:
	;

__3:
	if !(1 != 0) {
		goto __4
	}

	libc.Xsprintf(tls, bp+8, ts+49796, libc.VaList(bp, libc.PreIncInt32(&(*ThreadLocalData)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FtsdPtr)).FnsCount, 1)))
	(*Object)(unsafe.Pointer(oPtr)).FnamespacePtr = XTcl_CreateNamespace(tls, interp, bp+8, oPtr, uintptr(0))
	if !((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr != uintptr(0)) {
		goto __5
	}
	creationEpoch = (*ThreadLocalData)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FtsdPtr)).FnsCount
	goto __4
__5:
	;

	// Could not make that namespace, so we make another. But first we
	// have to get rid of the error message from Tcl_CreateNamespace,
	// since that's something that should not be exposed to the user.

	XTcl_ResetResult(tls, interp)
	goto __3
__4:
	;

configNamespace:
	(*Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).FrefCount++

	// Make the namespace know about the helper commands. This grants access
	// to the [self] and [next] commands.

	if !((*Foundation)(unsafe.Pointer(fPtr)).FhelpersNs != uintptr(0)) {
		goto __6
	}
	XTclSetNsPath(tls, (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr, 1, fPtr+48)
__6:
	;
	XTclOOSetupVariableResolver(tls, (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)

	// Suppress use of compiled versions of the commands in this object's
	// namespace and its children; causes wrong behaviour without expensive
	// recompilation. [Bug 2037727]

	*(*int32)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr + 144)) |= NS_SUPPRESS_COMPILATION

	// Set up a callback to get notification of the deletion of a namespace
	// when enough of the namespace still remains to execute commands and
	// access variables in it. [Bug 2950259]

	(*Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).FearlyDeleteProc = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sObjectNamespaceDeleted}))

	// Fill in the rest of the non-zero/NULL parts of the structure.

	(*Object)(unsafe.Pointer(oPtr)).FfPtr = fPtr
	(*Object)(unsafe.Pointer(oPtr)).FcreationEpoch = creationEpoch

	// An object starts life with a refCount of 2 to mark the two stages of
	// destruction it occur:  A call to ObjectRenamedTrace(), and a call to
	// ObjectNamespaceDeleted().
	(*Object)(unsafe.Pointer(oPtr)).FrefCount = 2

	(*Object)(unsafe.Pointer(oPtr)).Fflags = USE_CLASS_CACHE

	// Finally, create the object commands and initialize the trace on the
	// public command (so that the object structures are deleted when the
	// command is deleted).

	if !!(nameStr != 0) {
		goto __7
	}
	nameStr = (*Tcl_Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).Fname
	nsPtr = (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr
	if !((*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr != uintptr(0)) {
		goto __8
	}
	nsPtr = (*Namespace)(unsafe.Pointer(nsPtr)).FparentPtr
__8:
	;

__7:
	;
	(*Object)(unsafe.Pointer(oPtr)).Fcommand = XTclCreateObjCommandInNs(tls, interp, nameStr,
		nsPtr, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sPublicObjectCmd})), oPtr, uintptr(0))

	// Add the NRE command and trace directly. While this breaks a number of
	// abstractions, it is faster and we're inside Tcl here so we're allowed.

	cmdPtr = (*Object)(unsafe.Pointer(oPtr)).Fcommand
	(*Command)(unsafe.Pointer(cmdPtr)).FnreProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sPublicNRObjectCmd}))
	(*Command)(unsafe.Pointer(cmdPtr)).FtracePtr = libc.AssignUintptr(&tracePtr, XTcl_Alloc(tls, uint32(unsafe.Sizeof(CommandTrace{}))))
	(*CommandTrace)(unsafe.Pointer(tracePtr)).FtraceProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
	}{sObjectRenamedTrace}))
	(*CommandTrace)(unsafe.Pointer(tracePtr)).FclientData = oPtr
	(*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags = TCL_TRACE_RENAME | TCL_TRACE_DELETE
	(*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr = uintptr(0)
	(*CommandTrace)(unsafe.Pointer(tracePtr)).FrefCount = 1

	(*Object)(unsafe.Pointer(oPtr)).FmyCommand = XTclNRCreateCommandInNs(tls, interp, ts+49808, (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sPrivateObjectCmd})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sPrivateNRObjectCmd})), oPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sMyDeleted})))
	return oPtr
}

// ----------------------------------------------------------------------
//
// SquelchCachedName --
//
//	Encapsulates how to throw away a cached object name. Called from
//	object rename traces and at object destruction.
//
// ----------------------------------------------------------------------

func sSquelchCachedName(tls *libc.TLS, oPtr uintptr) { /* tclOO.c:773:1: */
	if (*Object)(unsafe.Pointer(oPtr)).FcachedNameObj != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Object)(unsafe.Pointer(oPtr)).FcachedNameObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Object)(unsafe.Pointer(oPtr)).FcachedNameObj = uintptr(0)
	}
}

// ----------------------------------------------------------------------
//
// MyDeleted --
//
//	This callback is triggered when the object's [my] command is deleted
//	by any mechanism. It just marks the object as not having a [my]
//	command, and so prevents cleanup of that when the object itself is
//	deleted.
//
// ----------------------------------------------------------------------

func sMyDeleted(tls *libc.TLS, clientData ClientData) { /* tclOO.c:796:1: */
	var oPtr uintptr = clientData

	(*Object)(unsafe.Pointer(oPtr)).FmyCommand = uintptr(0)
}

// ----------------------------------------------------------------------
//
// ObjectRenamedTrace --
//
//	This callback is triggered when the object is deleted by any
//	mechanism. It runs the destructors and arranges for the actual cleanup
//	of the object's namespace, which in turn triggers cleansing of the
//	object data structures.
//
// ----------------------------------------------------------------------

func sObjectRenamedTrace(tls *libc.TLS, clientData ClientData, interp uintptr, oldName uintptr, newName uintptr, flags int32) { /* tclOO.c:819:1: */
	var oPtr uintptr = clientData
	// If this is a rename and not a delete of the object, we just flush the
	// cache of the object name.

	if flags&TCL_TRACE_RENAME != 0 {
		sSquelchCachedName(tls, oPtr)
		return
	}

	// The namespace is only deleted if it hasn't already been deleted. [Bug
	// 2950259].

	if !((*Object)(unsafe.Pointer(oPtr)).Fflags&OBJECT_DESTRUCTING != 0) {
		XTcl_DeleteNamespace(tls, (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)
	}
	(*Object)(unsafe.Pointer(oPtr)).Fcommand = uintptr(0)
	XTclOODecrRefCount(tls, oPtr)
	return
}

// ----------------------------------------------------------------------
//
// TclOODeleteDescendants --
//
//	Delete all descendants of a particular class.
//
// ----------------------------------------------------------------------

func XTclOODeleteDescendants(tls *libc.TLS, interp uintptr, oPtr uintptr) { /* tclOO.c:861:1: */
	var clsPtr uintptr = (*Object)(unsafe.Pointer(oPtr)).FclassPtr
	var subclassPtr uintptr
	var mixinSubclassPtr uintptr
	var instancePtr uintptr

	// Squelch classes that this class has been mixed into.

	if (*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Fnum > 0 {
		for (*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Fnum > 0 {
			mixinSubclassPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Flist + uintptr((*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Fnum-1)*8))

			// This condition also covers the case where mixinSubclassPtr ==
			// clsPtr

			if !((*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(mixinSubclassPtr)).FthisPtr)).Fflags&OBJECT_DESTRUCTING != 0) &&
				!((*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(mixinSubclassPtr)).FthisPtr)).Fflags&DONT_DELETE != 0) {
				XTcl_DeleteCommandFromToken(tls, interp,
					(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(mixinSubclassPtr)).FthisPtr)).Fcommand)
			}
			XTclOORemoveFromMixinSubs(tls, mixinSubclassPtr, clsPtr)
		}
	}
	if (*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Fsize > 0 {
		XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Flist)
		(*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Fsize = 0
	}
	// Squelch subclasses of this class.

	if (*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Fnum > 0 {
		for (*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Fnum > 0 {
			subclassPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Flist + uintptr((*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Fnum-1)*8))
			if !((*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(subclassPtr)).FthisPtr)).Fflags&OBJECT_DESTRUCTING != 0) && !((*Class)(unsafe.Pointer(subclassPtr)).Fflags&(ROOT_OBJECT|ROOT_CLASS) != 0) &&
				!((*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(subclassPtr)).FthisPtr)).Fflags&DONT_DELETE != 0) {
				XTcl_DeleteCommandFromToken(tls, interp,
					(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(subclassPtr)).FthisPtr)).Fcommand)
			}
			XTclOORemoveFromSubclasses(tls, subclassPtr, clsPtr)
		}
	}
	if (*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Fsize > 0 {
		XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Flist)
		(*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Flist = uintptr(0)
		(*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Fsize = 0
	}

	// Squelch instances of this class (includes objects we're mixed into).

	if (*Class)(unsafe.Pointer(clsPtr)).Finstances.Fnum > 0 {
		for (*Class)(unsafe.Pointer(clsPtr)).Finstances.Fnum > 0 {
			instancePtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist + uintptr((*Class)(unsafe.Pointer(clsPtr)).Finstances.Fnum-1)*8))

			// This condition also covers the case where instancePtr == oPtr

			if !((*Object)(unsafe.Pointer(instancePtr)).Fflags&OBJECT_DESTRUCTING != 0) && !((*Object)(unsafe.Pointer(instancePtr)).Fflags&(ROOT_OBJECT|ROOT_CLASS) != 0) && !((*Object)(unsafe.Pointer(instancePtr)).Fflags&DONT_DELETE != 0) {
				XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(instancePtr)).Fcommand)
			}
			XTclOORemoveFromInstances(tls, instancePtr, clsPtr)
		}
	}
	if (*Class)(unsafe.Pointer(clsPtr)).Finstances.Fsize > 0 {
		XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist)
		(*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist = uintptr(0)
		(*Class)(unsafe.Pointer(clsPtr)).Finstances.Fsize = 0
	}
}

// ----------------------------------------------------------------------
//
// TclOOReleaseClassContents --
//
//	Tear down the special class data structure, including deleting all
//	dependent classes and objects.
//
// ----------------------------------------------------------------------

func XTclOOReleaseClassContents(tls *libc.TLS, interp uintptr, oPtr uintptr) { /* tclOO.c:953:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var hPtr uintptr
	// var search Tcl_HashSearch at bp+16, 24

	var i int32
	var clsPtr uintptr = (*Object)(unsafe.Pointer(oPtr)).FclassPtr
	var tmpClsPtr uintptr
	var mPtr uintptr
	var fPtr uintptr = (*Object)(unsafe.Pointer(oPtr)).FfPtr
	var variableObj uintptr

	// Sanity check!

	if !((*Object)(unsafe.Pointer(oPtr)).Fflags&OBJECT_DESTRUCTING != 0) {
		if (*Object)(unsafe.Pointer(oPtr)).Fflags&ROOT_CLASS != 0 {
			XTcl_Panic(tls, ts+49811,
				libc.VaList(bp, ts+49855))
		} else if (*Object)(unsafe.Pointer(oPtr)).Fflags&ROOT_OBJECT != 0 {
			XTcl_Panic(tls, ts+49811,
				libc.VaList(bp+8, ts+49867))
		}
	}

	// Squelch method implementation chain caches.

	if (*Class)(unsafe.Pointer(clsPtr)).FconstructorChainPtr != 0 {
		XTclOODeleteChain(tls, (*Class)(unsafe.Pointer(clsPtr)).FconstructorChainPtr)
		(*Class)(unsafe.Pointer(clsPtr)).FconstructorChainPtr = uintptr(0)
	}
	if (*Class)(unsafe.Pointer(clsPtr)).FdestructorChainPtr != 0 {
		XTclOODeleteChain(tls, (*Class)(unsafe.Pointer(clsPtr)).FdestructorChainPtr)
		(*Class)(unsafe.Pointer(clsPtr)).FdestructorChainPtr = uintptr(0)
	}
	if (*Class)(unsafe.Pointer(clsPtr)).FclassChainCache != 0 {
		var callPtr uintptr

		for hPtr = XTcl_FirstHashEntry(tls, (*Class)(unsafe.Pointer(clsPtr)).FclassChainCache, bp+16); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 { callPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData; return 1 }()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+16) {
			XTclOODeleteChain(tls, callPtr)
		}
		XTcl_DeleteHashTable(tls, (*Class)(unsafe.Pointer(clsPtr)).FclassChainCache)
		XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).FclassChainCache)
		(*Class)(unsafe.Pointer(clsPtr)).FclassChainCache = uintptr(0)
	}

	// Squelch our filter list.

	if (*Class)(unsafe.Pointer(clsPtr)).Ffilters.Fnum != 0 {
		var filterObj uintptr

		for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Ffilters.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				filterObj = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Ffilters.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(filterObj)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(filterObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(filterObj)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(filterObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(filterObj)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(filterObj)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(filterObj)).Flength = -1
						for ok := true; ok; ok = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(filterObj + 32)) = XtclFreeObjList
							XtclFreeObjList = filterObj
						}
					} else {
						XTclFreeObj(tls, filterObj)
					}
				}

			}
		}
		XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).Ffilters.Flist)
		(*Class)(unsafe.Pointer(clsPtr)).Ffilters.Flist = uintptr(0)
		(*Class)(unsafe.Pointer(clsPtr)).Ffilters.Fnum = 0
	}

	// Squelch our metadata.

	if (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr != uintptr(0) {
		var metadataTypePtr uintptr
		var value ClientData

		for hPtr = XTcl_FirstHashEntry(tls, (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr, bp+16); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					metadataTypePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					value = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+16) {
			(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjectMetadataType)(unsafe.Pointer(metadataTypePtr)).FdeleteProc})).f(tls, value)
		}
		XTcl_DeleteHashTable(tls, (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr)
		XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr)
		(*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr = uintptr(0)
	}

	if (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Fnum != 0 {
		for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				tmpClsPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				XTclOORemoveFromMixinSubs(tls, clsPtr, tmpClsPtr)
				XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(tmpClsPtr)).FthisPtr)
			}
		}
		XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist)
		(*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist = uintptr(0)
		(*Class)(unsafe.Pointer(clsPtr)).Fmixins.Fnum = 0
	}

	if (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum > 0 {
		for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				tmpClsPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				XTclOORemoveFromSubclasses(tls, clsPtr, tmpClsPtr)
				XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(tmpClsPtr)).FthisPtr)
			}
		}
		XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist)
		(*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum = 0
		(*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist = uintptr(0)
	}

	for hPtr = XTcl_FirstHashEntry(tls, clsPtr+112, bp+16); func() int32 {
		if hPtr != uintptr(0) {
			return func() int32 { mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData; return 1 }()
		}
		return 0
	}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+16) {
		XTclOODelMethodRef(tls, mPtr)
	}
	XTcl_DeleteHashTable(tls, clsPtr+112)
	XTclOODelMethodRef(tls, (*Class)(unsafe.Pointer(clsPtr)).FconstructorPtr)
	XTclOODelMethodRef(tls, (*Class)(unsafe.Pointer(clsPtr)).FdestructorPtr)

	for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Fvariables.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			variableObj = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fvariables.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(variableObj)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(variableObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(variableObj)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(variableObj)).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(variableObj + 32)) = XtclFreeObjList
						XtclFreeObjList = variableObj
					}
				} else {
					XTclFreeObj(tls, variableObj)
				}
			}

		}
	}
	if i != 0 {
		XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).Fvariables.Flist)
	}

	if (*Object)(unsafe.Pointer(oPtr)).Fflags&ROOT_CLASS != 0 && !((*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).FthisPtr)).Fflags&OBJECT_DESTRUCTING != 0) {
		XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).FthisPtr)).Fcommand)
	}
}

// ----------------------------------------------------------------------
//
// ObjectNamespaceDeleted --
//
//	Callback when the object's namespace is deleted. Used to clean up the
//	data structures associated with the object. The complicated bit is
//	that this can sometimes happen before the object's command is deleted
//	(interpreter teardown is complex!)
//
// ----------------------------------------------------------------------

func sObjectNamespaceDeleted(tls *libc.TLS, clientData ClientData) { /* tclOO.c:1085:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var oPtr uintptr = clientData
	var fPtr uintptr = (*Object)(unsafe.Pointer(oPtr)).FfPtr
	var hPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	var mixinPtr uintptr
	var mPtr uintptr
	var filterObj uintptr
	var variableObj uintptr
	var interp uintptr = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Finterp
	var i int32

	if (*Object)(unsafe.Pointer(oPtr)).Fflags&OBJECT_DESTRUCTING != 0 {
		// TODO:  Can ObjectNamespaceDeleted ever be called twice?  If not,
		// this guard could be removed.
		return
	}

	// One rule for the teardown routines is that if an object is in the
	// process of being deleted, nothing else may modify its bookeeping
	// records.  This is the flag that
	*(*int32)(unsafe.Pointer(oPtr + 92)) |= OBJECT_DESTRUCTING

	// Let the dominoes fall!

	if (*Object)(unsafe.Pointer(oPtr)).FclassPtr != 0 {
		XTclOODeleteDescendants(tls, interp, oPtr)
	}

	// We do not run destructors on the core class objects when the
	// interpreter is being deleted; their incestuous nature causes problems
	// in that case when the destructor is partially deleted before the uses
	// of it have gone. [Bug 2949397]

	if !(XTcl_InterpDeleted(tls, interp) != 0) && !((*Object)(unsafe.Pointer(oPtr)).Fflags&DESTRUCTOR_CALLED != 0) {
		var contextPtr uintptr = XTclOOGetCallContext(tls, oPtr, uintptr(0), DESTRUCTOR, uintptr(0))
		var result int32
		var state Tcl_InterpState

		*(*int32)(unsafe.Pointer(oPtr + 92)) |= DESTRUCTOR_CALLED

		if contextPtr != uintptr(0) {
			*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr + 12)) |= DESTRUCTOR
			(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = 0
			state = XTcl_SaveInterpState(tls, interp, TCL_OK)
			result = XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{XTclOOInvokeContext})),
				contextPtr, 0, uintptr(0))
			if result != TCL_OK {
				XTcl_BackgroundException(tls, interp, result)
			}
			XTcl_RestoreInterpState(tls, interp, state)
			XTclOODeleteContext(tls, contextPtr)
		}
	}

	// Instruct everyone to no longer use any allocated fields of the object.
	// Also delete the command that refers to the object at this point (if it
	// still exists) because otherwise its pointer to the object points into
	// freed memory.

	if (*Command)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fcommand)).Fflags != 0 && 0x01 != 0 {
		// Something has already started the command deletion process. We can
		// go ahead and clean up the the namespace,
	} else {
		// The namespace must have been deleted directly.  Delete the command
		// as well.

		XTcl_DeleteCommandFromToken(tls, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Finterp, (*Object)(unsafe.Pointer(oPtr)).Fcommand)
	}

	if (*Object)(unsafe.Pointer(oPtr)).FmyCommand != 0 {
		XTcl_DeleteCommandFromToken(tls, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Finterp, (*Object)(unsafe.Pointer(oPtr)).FmyCommand)
	}

	// Splice the object out of its context. After this, we must *not* call
	// methods on the object.

	// TODO: Should this be protected with a !IsRoot() condition?
	XTclOORemoveFromInstances(tls, oPtr, (*Object)(unsafe.Pointer(oPtr)).FselfCls)

	if (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum > 0 {
		for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				XTclOORemoveFromInstances(tls, oPtr, mixinPtr)
				XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)
			}
		}
		if (*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist != uintptr(0) {
			XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist)
		}
	}

	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			filterObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(filterObj)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(filterObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(filterObj)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(filterObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(filterObj)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(filterObj)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(filterObj)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(filterObj + 32)) = XtclFreeObjList
						XtclFreeObjList = filterObj
					}
				} else {
					XTclFreeObj(tls, filterObj)
				}
			}

		}
	}
	if i != 0 {
		XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist)
	}

	if (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr != 0 {
		for hPtr = XTcl_FirstHashEntry(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, bp); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 { mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData; return 1 }()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp) {
			XTclOODelMethodRef(tls, mPtr)
		}
		XTcl_DeleteHashTable(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)
		XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)
	}

	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fvariables.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			variableObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(variableObj)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(variableObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(variableObj)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(variableObj)).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(variableObj + 32)) = XtclFreeObjList
						XtclFreeObjList = variableObj
					}
				} else {
					XTclFreeObj(tls, variableObj)
				}
			}

		}
	}
	if i != 0 {
		XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist)
	}

	if (*Object)(unsafe.Pointer(oPtr)).FchainCache != 0 {
		XTclOODeleteChainCache(tls, (*Object)(unsafe.Pointer(oPtr)).FchainCache)
	}

	sSquelchCachedName(tls, oPtr)

	if (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr != uintptr(0) {
		var metadataTypePtr uintptr
		var value ClientData

		for hPtr = XTcl_FirstHashEntry(tls, (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr, bp); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					metadataTypePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmetadataPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmetadataPtr)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					value = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp) {
			(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjectMetadataType)(unsafe.Pointer(metadataTypePtr)).FdeleteProc})).f(tls, value)
		}
		XTcl_DeleteHashTable(tls, (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr)
		XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr)
		(*Object)(unsafe.Pointer(oPtr)).FmetadataPtr = uintptr(0)
	}

	// Because an object can be a class that is an instance of itself, the
	// class object's class structure should only be cleaned after most of
	// the cleanup on the object is done.
	//
	// The class of objects needs some special care; if it is deleted (and
	// we're not killing the whole interpreter) we force the delete of the
	// class of classes now as well. Due to the incestuous nature of those two
	// classes, if one goes the other must too and yet the tangle can
	// sometimes not go away automatically; we force it here. [Bug 2962664]

	if (*Object)(unsafe.Pointer(oPtr)).Fflags&ROOT_OBJECT != 0 && !((*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr)).Fflags&OBJECT_DESTRUCTING != 0) &&
		!(XTcl_InterpDeleted(tls, interp) != 0) {

		XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FclassCls)).FthisPtr)).Fcommand)
	}

	if (*Object)(unsafe.Pointer(oPtr)).FclassPtr != uintptr(0) {
		XTclOOReleaseClassContents(tls, interp, oPtr)
	}

	// Delete the object structure itself.

	XTclNsDecrRefCount(tls, (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)
	(*Object)(unsafe.Pointer(oPtr)).FnamespacePtr = uintptr(0)
	XTclOODecrRefCount(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FthisPtr)
	(*Object)(unsafe.Pointer(oPtr)).FselfCls = uintptr(0)
	XTclOODecrRefCount(tls, oPtr)
	return
}

// ----------------------------------------------------------------------
//
// TclOODecrRef --
//
//	Decrement the refcount of an object and deallocate storage then object
//	is no longer referenced.  Returns 1 if storage was deallocated, and 0
//	otherwise.
//
// ----------------------------------------------------------------------
func XTclOODecrRefCount(tls *libc.TLS, oPtr uintptr) int32 { /* tclOO.c:1278:5: */
	if libc.PostDecInt32(&(*Object)(unsafe.Pointer(oPtr)).FrefCount, 1) <= 1 {
		if (*Object)(unsafe.Pointer(oPtr)).FclassPtr != uintptr(0) {
			XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr)
		}
		XTclpFree(tls, oPtr)
		return 1
	}
	return 0
}

// ----------------------------------------------------------------------
//
// TclOOObjectDestroyed --
//
//	Returns TCL_OK if an object is entirely deleted, i.e. the destruction
//	sequence has completed.
//
// ----------------------------------------------------------------------
func XTclOOObjectDestroyed(tls *libc.TLS, oPtr uintptr) int32 { /* tclOO.c:1299:5: */
	return libc.Bool32((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr == uintptr(0))
}

// Setting the "empty" location to NULL makes debugging a little easier.

func XRemoveClass(tls *libc.TLS, list uintptr, num int32, idx int32) { /* tclOO.c:1314:6: */
	for ; idx < num-1; idx++ {
		*(*uintptr)(unsafe.Pointer(list + uintptr(idx)*8)) = *(*uintptr)(unsafe.Pointer(list + uintptr(idx+1)*8))
	}
	*(*uintptr)(unsafe.Pointer(list + uintptr(idx)*8)) = uintptr(0)
	return
}

func XRemoveObject(tls *libc.TLS, list uintptr, num int32, idx int32) { /* tclOO.c:1316:6: */
	for ; idx < num-1; idx++ {
		*(*uintptr)(unsafe.Pointer(list + uintptr(idx)*8)) = *(*uintptr)(unsafe.Pointer(list + uintptr(idx+1)*8))
	}
	*(*uintptr)(unsafe.Pointer(list + uintptr(idx)*8)) = uintptr(0)
	return
}

// ----------------------------------------------------------------------
//
// TclOORemoveFromInstances --
//
//	Utility function to remove an object from the list of instances within
//	a class.
//
// ----------------------------------------------------------------------

func XTclOORemoveFromInstances(tls *libc.TLS, oPtr uintptr, clsPtr uintptr) int32 { /* tclOO.c:1330:1: */
	var i int32
	var res int32 = 0
	var instPtr uintptr

	for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Finstances.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			instPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if oPtr == instPtr {
				for ok := true; ok; ok = 0 != 0 {
					XRemoveObject(tls, (*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist, (*Class)(unsafe.Pointer(clsPtr)).Finstances.Fnum, i)
					(*Class)(unsafe.Pointer(clsPtr)).Finstances.Fnum--
				}
				XTclOODecrRefCount(tls, oPtr)
				res++
				break
			}
		}
	}
	return res
}

// ----------------------------------------------------------------------
//
// TclOOAddToInstances --
//
//	Utility function to add an object to the list of instances within a
//	class.
//
// ----------------------------------------------------------------------

func XTclOOAddToInstances(tls *libc.TLS, oPtr uintptr, clsPtr uintptr) { /* tclOO.c:1361:1: */
	if (*Class)(unsafe.Pointer(clsPtr)).Finstances.Fnum >= (*Class)(unsafe.Pointer(clsPtr)).Finstances.Fsize {
		*(*int32)(unsafe.Pointer(clsPtr + 48 + 4)) += ALLOC_CHUNK
		if (*Class)(unsafe.Pointer(clsPtr)).Finstances.Fsize == ALLOC_CHUNK {
			(*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(ALLOC_CHUNK)))
		} else {
			(*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist = XTcl_Realloc(tls, (*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Class)(unsafe.Pointer(clsPtr)).Finstances.Fsize)))
		}
	}
	*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist + uintptr(libc.PostIncInt32(&(*Class)(unsafe.Pointer(clsPtr)).Finstances.Fnum, 1))*8)) = oPtr
	(*Object)(unsafe.Pointer(oPtr)).FrefCount++
}

// ----------------------------------------------------------------------
//
// TclOORemoveFromMixins --
//
//	Utility function to remove a class from the list of mixins within an
//	object.
//
// ----------------------------------------------------------------------

func XTclOORemoveFromMixins(tls *libc.TLS, mixinPtr uintptr, oPtr uintptr) int32 { /* tclOO.c:1392:1: */
	var i int32
	var res int32 = 0
	var mixPtr uintptr

	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			mixPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if mixinPtr == mixPtr {
				for ok := true; ok; ok = 0 != 0 {
					XRemoveClass(tls, (*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist, (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum, i)
					(*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum--
				}
				XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(mixPtr)).FthisPtr)
				res++
				break
			}
		}
	}
	if (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum == 0 {
		XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist)
		(*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist = uintptr(0)
	}
	return res
}

// ----------------------------------------------------------------------
//
// TclOORemoveFromSubclasses --
//
//	Utility function to remove a class from the list of subclasses within
//	another class. Returns the number of removals performed.
//
// ----------------------------------------------------------------------

func XTclOORemoveFromSubclasses(tls *libc.TLS, subPtr uintptr, superPtr uintptr) int32 { /* tclOO.c:1427:1: */
	var i int32
	var res int32 = 0
	var subclsPtr uintptr

	for i = 0; i < (*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			subclsPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if subPtr == subclsPtr {
				for ok := true; ok; ok = 0 != 0 {
					XRemoveClass(tls, (*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Flist, (*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Fnum, i)
					(*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Fnum--
				}
				XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(subPtr)).FthisPtr)
				res++
			}
		}
	}
	return res
}

// ----------------------------------------------------------------------
//
// TclOOAddToSubclasses --
//
//	Utility function to add a class to the list of subclasses within
//	another class.
//
// ----------------------------------------------------------------------

func XTclOOAddToSubclasses(tls *libc.TLS, subPtr uintptr, superPtr uintptr) { /* tclOO.c:1457:1: */
	if (*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(superPtr)).FthisPtr)).Fflags&OBJECT_DESTRUCTING != 0 {
		return
	}
	if (*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Fnum >= (*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Fsize {
		*(*int32)(unsafe.Pointer(superPtr + 32 + 4)) += ALLOC_CHUNK
		if (*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Fsize == ALLOC_CHUNK {
			(*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Flist = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(ALLOC_CHUNK)))
		} else {
			(*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Flist = XTcl_Realloc(tls, (*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Fsize)))
		}
	}
	*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Flist + uintptr(libc.PostIncInt32(&(*Class)(unsafe.Pointer(superPtr)).Fsubclasses.Fnum, 1))*8)) = subPtr
	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(subPtr)).FthisPtr)).FrefCount++
}

// ----------------------------------------------------------------------
//
// TclOORemoveFromMixinSubs --
//
//	Utility function to remove a class from the list of mixinSubs within
//	another class.
//
// ----------------------------------------------------------------------

func XTclOORemoveFromMixinSubs(tls *libc.TLS, subPtr uintptr, superPtr uintptr) int32 { /* tclOO.c:1491:1: */
	var i int32
	var res int32 = 0
	var subclsPtr uintptr

	for i = 0; i < (*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			subclsPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if subPtr == subclsPtr {
				for ok := true; ok; ok = 0 != 0 {
					XRemoveClass(tls, (*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Flist, (*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Fnum, i)
					(*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Fnum--
				}
				XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(subPtr)).FthisPtr)
				res++
				break
			}
		}
	}
	return res
}

// ----------------------------------------------------------------------
//
// TclOOAddToMixinSubs --
//
//	Utility function to add a class to the list of mixinSubs within
//	another class.
//
// ----------------------------------------------------------------------

func XTclOOAddToMixinSubs(tls *libc.TLS, subPtr uintptr, superPtr uintptr) { /* tclOO.c:1522:1: */
	if (*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(superPtr)).FthisPtr)).Fflags&OBJECT_DESTRUCTING != 0 {
		return
	}
	if (*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Fnum >= (*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Fsize {
		*(*int32)(unsafe.Pointer(superPtr + 96 + 4)) += ALLOC_CHUNK
		if (*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Fsize == ALLOC_CHUNK {
			(*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Flist = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(ALLOC_CHUNK)))
		} else {
			(*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Flist = XTcl_Realloc(tls, (*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Fsize)))
		}
	}
	*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Flist + uintptr(libc.PostIncInt32(&(*Class)(unsafe.Pointer(superPtr)).FmixinSubs.Fnum, 1))*8)) = subPtr
	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(subPtr)).FthisPtr)).FrefCount++
}

// ----------------------------------------------------------------------
//
// TclOOAllocClass --
//
//	Allocate a basic class. Does not add class to its class's instance
//	list.
//
// ----------------------------------------------------------------------

func XTclOOAllocClass(tls *libc.TLS, interp uintptr, useThisObj uintptr) uintptr { /* tclOO.c:1555:7: */
	var fPtr uintptr = (*Interp)(unsafe.Pointer(interp)).FobjectFoundation
	var clsPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Class{})))

	libc.Xmemset(tls, clsPtr, 0, uint64(unsafe.Sizeof(Class{})))
	(*Class)(unsafe.Pointer(clsPtr)).FthisPtr = useThisObj

	// Configure the namespace path for the class's object.
	initClassPath(tls, interp, clsPtr)

	// Classes are subclasses of oo::object, i.e. the objects they create are
	// objects.

	(*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum = 1
	(*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist = XTcl_Alloc(tls, uint32(unsafe.Sizeof(uintptr(0))))
	*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist)) = (*Foundation)(unsafe.Pointer(fPtr)).FobjectCls
	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)).FthisPtr)).FrefCount++

	// Finish connecting the class structure to the object structure.

	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FthisPtr)).FclassPtr = clsPtr

	// That's the complicated bit. Now fill in the rest of the non-zero/NULL
	// fields.

	XTcl_InitObjHashTable(tls, clsPtr+112)
	return clsPtr
}

func initClassPath(tls *libc.TLS, interp uintptr, clsPtr uintptr) { /* tclOO.c:1598:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var fPtr uintptr = (*Interp)(unsafe.Pointer(interp)).FobjectFoundation
	if (*Foundation)(unsafe.Pointer(fPtr)).FhelpersNs != uintptr(0) {
		// var path [2]uintptr at bp, 16

		*(*uintptr)(unsafe.Pointer(bp)) = (*Foundation)(unsafe.Pointer(fPtr)).FhelpersNs
		*(*uintptr)(unsafe.Pointer(bp + 1*8)) = (*Foundation)(unsafe.Pointer(fPtr)).FooNs
		XTclSetNsPath(tls, (*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FthisPtr)).FnamespacePtr, 2, bp)
	} else {
		XTclSetNsPath(tls, (*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FthisPtr)).FnamespacePtr, 1,
			fPtr+24)
	}
}

// ----------------------------------------------------------------------
//
// Tcl_NewObjectInstance --
//
//	Allocate a new instance of an object.
//
// ----------------------------------------------------------------------
func XTcl_NewObjectInstance(tls *libc.TLS, interp uintptr, cls Tcl_Class, nameStr uintptr, nsNameStr uintptr, objc int32, objv uintptr, skip int32) Tcl_Object { /* tclOO.c:1621:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var classPtr uintptr = cls
	// var oPtr uintptr at bp+32, 8

	// var clientData [4]ClientData at bp, 32

	*(*uintptr)(unsafe.Pointer(bp + 32 /* oPtr */)) = XTclNewObjectInstanceCommon(tls, interp, classPtr, nameStr, nsNameStr)
	if *(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0) {
		return uintptr(0)
	}

	// Run constructors, except when objc < 0, which is a special flag case
	// used for object cloning only.

	if objc >= 0 {
		var contextPtr uintptr = XTclOOGetCallContext(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* oPtr */)), uintptr(0), CONSTRUCTOR, uintptr(0))

		if contextPtr != uintptr(0) {
			var isRoot int32
			var result int32
			var state Tcl_InterpState

			state = XTcl_SaveInterpState(tls, interp, TCL_OK)
			*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr + 12)) |= CONSTRUCTOR
			(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = skip

			// Adjust the ensemble tracking record if necessary. [Bug 3514761]

			isRoot = XTclInitRewriteEnsemble(tls, interp, skip, skip, objv)
			result = XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
			}{XTclOOInvokeContext})), contextPtr,
				objc, objv)

			if isRoot != 0 {
				XTclResetRewriteEnsemble(tls, interp, 1)
			}

			*(*ClientData)(unsafe.Pointer(bp)) = contextPtr
			*(*ClientData)(unsafe.Pointer(bp + 1*8)) = *(*uintptr)(unsafe.Pointer(bp + 32 /* oPtr */))
			*(*ClientData)(unsafe.Pointer(bp + 2*8)) = state
			*(*ClientData)(unsafe.Pointer(bp + 3*8)) = bp + 32 /* &oPtr */

			result = sFinalizeAlloc(tls, bp, interp, result)
			if result != TCL_OK {
				return uintptr(0)
			}
		}
	}

	return *(*uintptr)(unsafe.Pointer(bp + 32 /* oPtr */))
}

func XTclNRNewObjectInstance(tls *libc.TLS, interp uintptr, cls Tcl_Class, nameStr uintptr, nsNameStr uintptr, objc int32, objv uintptr, skip int32, objectPtr uintptr) int32 { /* tclOO.c:1687:1: */
	var classPtr uintptr = cls
	var contextPtr uintptr
	var state Tcl_InterpState
	var oPtr uintptr

	oPtr = XTclNewObjectInstanceCommon(tls, interp, classPtr, nameStr, nsNameStr)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Run constructors, except when objc < 0 (a special flag case used for
	// object cloning only). If there aren't any constructors, we do nothing.

	if objc < 0 {
		*(*Tcl_Object)(unsafe.Pointer(objectPtr)) = oPtr
		return TCL_OK
	}
	contextPtr = XTclOOGetCallContext(tls, oPtr, uintptr(0), CONSTRUCTOR, uintptr(0))
	if contextPtr == uintptr(0) {
		*(*Tcl_Object)(unsafe.Pointer(objectPtr)) = oPtr
		return TCL_OK
	}

	state = XTcl_SaveInterpState(tls, interp, TCL_OK)
	*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr + 12)) |= CONSTRUCTOR
	(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = skip

	// Adjust the ensemble tracking record if necessary. [Bug 3514761]

	if XTclInitRewriteEnsemble(tls, interp, skip, skip, objv) != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{XTclClearRootEnsemble}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}

	// Fire off the constructors non-recursively.

	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _callbackPtr uintptr
		for ok4 := true; ok4; ok4 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sFinalizeAlloc}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = contextPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = oPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = state
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = objectPtr
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	XTclPushTailcallPoint(tls, interp)
	return XTclOOInvokeContext(tls, contextPtr, interp, objc, objv)
}

func XTclNewObjectInstanceCommon(tls *libc.TLS, interp uintptr, classPtr uintptr, nameStr uintptr, nsNameStr uintptr) uintptr { /* tclOO.c:1748:8: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	var hPtr uintptr
	var fPtr uintptr = (*Interp)(unsafe.Pointer(interp)).FobjectFoundation
	var oPtr uintptr
	*(*uintptr)(unsafe.Pointer(bp + 56 /* simpleName */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 40 /* nsPtr */)) = uintptr(0)
	// var dummy uintptr at bp+48, 8

	var inNsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr

	if nameStr != 0 {
		XTclGetNamespaceForQualName(tls, interp, nameStr, inNsPtr,
			TCL_CREATE_NS_IF_UNKNOWN, bp+40, bp+48, bp+48, bp+56)

		// Disallow creation of an object over an existing command.

		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* nsPtr */)) + 160 /* &.cmdTable */)).FfindProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* nsPtr */))+160 /* &.cmdTable */, *(*uintptr)(unsafe.Pointer(bp + 56 /* simpleName */)))
		if hPtr != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

				ts+49880, libc.VaList(bp, nameStr)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+29131, ts+49944, uintptr(0)))
			return uintptr(0)
		}
	}

	// Create the object.

	oPtr = sAllocObject(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 56 /* simpleName */)), *(*uintptr)(unsafe.Pointer(bp + 40 /* nsPtr */)), nsNameStr)
	(*Object)(unsafe.Pointer(oPtr)).FselfCls = classPtr
	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).FthisPtr)).FrefCount++
	XTclOOAddToInstances(tls, oPtr, classPtr)

	// Check to see if we're really creating a class. If so, allocate the
	// class structure as well.

	if XTclOOIsReachable(tls, (*Foundation)(unsafe.Pointer(fPtr)).FclassCls, classPtr) != 0 {
		// Is a class, so attach a class structure. Note that the
		// TclOOAllocClass function splices the structure into the object, so
		// we don't have to. Once that's done, we need to repatch the object
		// to have the right class since TclOOAllocClass interferes with that.

		XTclOOAllocClass(tls, interp, oPtr)
		XTclOOAddToSubclasses(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, (*Foundation)(unsafe.Pointer(fPtr)).FobjectCls)
	} else {
		(*Object)(unsafe.Pointer(oPtr)).FclassPtr = uintptr(0)
	}
	return oPtr
}

func sFinalizeAlloc(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOO.c:1811:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var contextPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var oPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var state Tcl_InterpState = *(*ClientData)(unsafe.Pointer(data + 2*8))
	var objectPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 3*8))

	// Ensure an error if the object was deleted in the constructor.
	// Don't want to lose errors by accident. [Bug 2903011]

	if result != TCL_ERROR && (*Object)(unsafe.Pointer(oPtr)).Fflags&OBJECT_DESTRUCTING != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+49961, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+49991, uintptr(0)))
		result = TCL_ERROR
	}
	if result != TCL_OK {
		XTcl_DiscardInterpState(tls, state)

		// Take care to not delete a deleted object; that would be bad. [Bug
		// 2903011] Also take care to make sure that we have the name of the
		// command before we delete it. [Bug 9dd1bd7a74]

		if !((*Object)(unsafe.Pointer(oPtr)).Fflags&OBJECT_DESTRUCTING != 0) {
			XTclOOObjectName(tls, interp, oPtr)
			XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(oPtr)).Fcommand)
		}

		// This decrements the refcount of oPtr.

		XTclOODeleteContext(tls, contextPtr)
		return TCL_ERROR
	}
	XTcl_RestoreInterpState(tls, interp, state)
	*(*Tcl_Object)(unsafe.Pointer(objectPtr)) = oPtr

	// This decrements the refcount of oPtr.

	XTclOODeleteContext(tls, contextPtr)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// Tcl_CopyObjectInstance --
//
//	Creates a copy of an object. Does not copy the backing namespace,
//	since the correct way to do that (e.g., shallow/deep) depends on the
//	object/class's own policies.
//
// ----------------------------------------------------------------------

func XTcl_CopyObjectInstance(tls *libc.TLS, interp uintptr, sourceObject Tcl_Object, targetName uintptr, targetNamespaceName uintptr) Tcl_Object { /* tclOO.c:1877:1: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	var oPtr uintptr = sourceObject
	var o2Ptr uintptr
	var hPtr uintptr
	// var search Tcl_HashSearch at bp+32, 24

	var mPtr uintptr
	var mixinPtr uintptr
	var contextPtr uintptr
	var keyPtr uintptr
	var filterObj uintptr
	var variableObj uintptr
	// var args [3]uintptr at bp+72, 24

	var i int32
	var result int32

	// Sanity check.

	if (*Object)(unsafe.Pointer(oPtr)).Fflags&ROOT_CLASS != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+50001, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+50036, uintptr(0)))
		return uintptr(0)
	}

	// Build the instance. Note that this does not run any constructors.

	o2Ptr = XTcl_NewObjectInstance(tls, interp,
		(*Object)(unsafe.Pointer(oPtr)).FselfCls, targetName, targetNamespaceName, -1,
		uintptr(0), -1)
	if o2Ptr == uintptr(0) {
		return uintptr(0)
	}

	// Copy the object-local methods to the new object.

	if (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr != 0 {
		for hPtr = XTcl_FirstHashEntry(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, bp+32); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					keyPtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+32) {
			if sCloneObjectMethod(tls, interp, o2Ptr, mPtr, keyPtr) != TCL_OK {
				XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(o2Ptr)).Fcommand)
				return uintptr(0)
			}
		}
	}

	// Copy the object's mixin references to the new object.

	if (*Object)(unsafe.Pointer(o2Ptr)).Fmixins.Fnum != 0 {
		for i = 0; i < (*Object)(unsafe.Pointer(o2Ptr)).Fmixins.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(o2Ptr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(o2Ptr)).Fmixins.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				if mixinPtr != 0 && mixinPtr != (*Object)(unsafe.Pointer(o2Ptr)).FselfCls {
					XTclOORemoveFromInstances(tls, o2Ptr, mixinPtr)
				}
				XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)
			}
		}
		XTclpFree(tls, (*Object)(unsafe.Pointer(o2Ptr)).Fmixins.Flist)
	}
	for ok := true; ok; ok = 0 != 0 {
		var len Size_t = uint64(unsafe.Sizeof(uintptr(0))) * uint64(libc.AssignPtrInt32(o2Ptr+48, (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum))
		if len != uint64(0) {
			libc.Xmemcpy(tls, libc.AssignPtrUintptr(o2Ptr+48+8, XTcl_Alloc(tls, uint32(len))), (*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist, len)
		} else {
			(*Object)(unsafe.Pointer(o2Ptr)).Fmixins.Flist = uintptr(0)
		}
	}
	for i = 0; i < (*Object)(unsafe.Pointer(o2Ptr)).Fmixins.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(o2Ptr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(o2Ptr)).Fmixins.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if mixinPtr != 0 && mixinPtr != (*Object)(unsafe.Pointer(o2Ptr)).FselfCls {
				XTclOOAddToInstances(tls, o2Ptr, mixinPtr)
			}

			// For the reference just created in DUPLICATE.

			(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)).FrefCount++
		}
	}

	// Copy the object's filter list to the new object.

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var len Size_t = uint64(unsafe.Sizeof(uintptr(0))) * uint64(libc.AssignPtrInt32(o2Ptr+64, (*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum))
		if len != uint64(0) {
			libc.Xmemcpy(tls, libc.AssignPtrUintptr(o2Ptr+64+8, XTcl_Alloc(tls, uint32(len))), (*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist, len)
		} else {
			(*Object)(unsafe.Pointer(o2Ptr)).Ffilters.Flist = uintptr(0)
		}
	}
	for i = 0; i < (*Object)(unsafe.Pointer(o2Ptr)).Ffilters.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(o2Ptr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			filterObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(o2Ptr)).Ffilters.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			(*Tcl_Obj)(unsafe.Pointer(filterObj)).FrefCount++
		}
	}

	// Copy the object's variable resolution list to the new object.

	for ok2 := true; ok2; ok2 = 0 != 0 {
		var len Size_t = uint64(unsafe.Sizeof(uintptr(0))) * uint64(libc.AssignPtrInt32(o2Ptr+136, (*Object)(unsafe.Pointer(oPtr)).Fvariables.Fnum))
		if len != uint64(0) {
			libc.Xmemcpy(tls, libc.AssignPtrUintptr(o2Ptr+136+8, XTcl_Alloc(tls, uint32(len))), (*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist, len)
		} else {
			(*Object)(unsafe.Pointer(o2Ptr)).Fvariables.Flist = uintptr(0)
		}
	}
	for i = 0; i < (*Object)(unsafe.Pointer(o2Ptr)).Fvariables.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(o2Ptr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			variableObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(o2Ptr)).Fvariables.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			(*Tcl_Obj)(unsafe.Pointer(variableObj)).FrefCount++
		}
	}

	// Copy the object's flags to the new object, clearing those that must be
	// kept object-local. The duplicate is never deleted at this point, nor is
	// it the root of the object system or in the midst of processing a filter
	// call.

	(*Object)(unsafe.Pointer(o2Ptr)).Fflags = (*Object)(unsafe.Pointer(oPtr)).Fflags & libc.CplInt32(OBJECT_DESTRUCTING|ROOT_OBJECT|ROOT_CLASS|FILTER_HANDLING)

	// Copy the object's metadata.

	if (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr != uintptr(0) {
		var metadataTypePtr uintptr
		var value ClientData
		// var duplicate ClientData at bp+56, 8

		for hPtr = XTcl_FirstHashEntry(tls, (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr, bp+32); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					metadataTypePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmetadataPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmetadataPtr)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					value = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+32) {
			if (*Tcl_ObjectMetadataType)(unsafe.Pointer(metadataTypePtr)).FcloneProc == uintptr(0) {
				*(*ClientData)(unsafe.Pointer(bp + 56 /* duplicate */)) = value
			} else {
				if (*struct {
					f func(*libc.TLS, uintptr, ClientData, uintptr) int32
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjectMetadataType)(unsafe.Pointer(metadataTypePtr)).FcloneProc})).f(tls, interp, value,
					bp+56) != TCL_OK {
					XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(o2Ptr)).Fcommand)
					return uintptr(0)
				}
			}
			if *(*ClientData)(unsafe.Pointer(bp + 56)) != uintptr(0) {
				XTcl_ObjectSetMetadata(tls, o2Ptr, metadataTypePtr,
					*(*ClientData)(unsafe.Pointer(bp + 56 /* duplicate */)))
			}
		}
	}

	// Copy the class, if present. Note that if there is a class present in
	// the source object, there must also be one in the copy.

	if (*Object)(unsafe.Pointer(oPtr)).FclassPtr != uintptr(0) {
		var clsPtr uintptr = (*Object)(unsafe.Pointer(oPtr)).FclassPtr
		var cls2Ptr uintptr = (*Object)(unsafe.Pointer(o2Ptr)).FclassPtr
		var superPtr uintptr

		// Copy the class flags across.

		(*Class)(unsafe.Pointer(cls2Ptr)).Fflags = (*Class)(unsafe.Pointer(clsPtr)).Fflags

		// Ensure that the new class's superclass structure is the same as the
		// old class's.

		for i = 0; i < (*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				superPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				XTclOORemoveFromSubclasses(tls, cls2Ptr, superPtr)
				XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(superPtr)).FthisPtr)
			}
		}
		if (*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Fnum != 0 {
			(*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Flist = XTcl_Realloc(tls, (*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum)))
		} else {
			(*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Flist = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum)))
		}
		libc.Xmemcpy(tls, (*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Flist, (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist,
			uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum))
		(*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Fnum = (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum
		for i = 0; i < (*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				superPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fsuperclasses.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				XTclOOAddToSubclasses(tls, cls2Ptr, superPtr)

				// For the new item in cls2Ptr->superclasses that memcpy just
				// created.

				(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(superPtr)).FthisPtr)).FrefCount++
			}
		}

		// Duplicate the source class's filters.

		for ok3 := true; ok3; ok3 = 0 != 0 {
			var len Size_t = uint64(unsafe.Sizeof(uintptr(0))) * uint64(libc.AssignPtrInt32(cls2Ptr+64, (*Class)(unsafe.Pointer(clsPtr)).Ffilters.Fnum))
			if len != uint64(0) {
				libc.Xmemcpy(tls, libc.AssignPtrUintptr(cls2Ptr+64+8, XTcl_Alloc(tls, uint32(len))), (*Class)(unsafe.Pointer(clsPtr)).Ffilters.Flist, len)
			} else {
				(*Class)(unsafe.Pointer(cls2Ptr)).Ffilters.Flist = uintptr(0)
			}
		}
		for i = 0; i < (*Class)(unsafe.Pointer(cls2Ptr)).Ffilters.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				filterObj = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Ffilters.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				(*Tcl_Obj)(unsafe.Pointer(filterObj)).FrefCount++
			}
		}

		// Copy the source class's variable resolution list.

		for ok4 := true; ok4; ok4 = 0 != 0 {
			var len Size_t = uint64(unsafe.Sizeof(uintptr(0))) * uint64(libc.AssignPtrInt32(cls2Ptr+248, (*Class)(unsafe.Pointer(clsPtr)).Fvariables.Fnum))
			if len != uint64(0) {
				libc.Xmemcpy(tls, libc.AssignPtrUintptr(cls2Ptr+248+8, XTcl_Alloc(tls, uint32(len))), (*Class)(unsafe.Pointer(clsPtr)).Fvariables.Flist, len)
			} else {
				(*Class)(unsafe.Pointer(cls2Ptr)).Fvariables.Flist = uintptr(0)
			}
		}
		for i = 0; i < (*Class)(unsafe.Pointer(cls2Ptr)).Fvariables.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				variableObj = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fvariables.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				(*Tcl_Obj)(unsafe.Pointer(variableObj)).FrefCount++
			}
		}

		// Duplicate the source class's mixins (which cannot be circular
		// references to the duplicate).

		if (*Class)(unsafe.Pointer(cls2Ptr)).Fmixins.Fnum != 0 {
			for i = 0; i < (*Class)(unsafe.Pointer(cls2Ptr)).Fmixins.Fnum; i++ {
				if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
					continue
				} else if func() bool {
					mixinPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fmixins.Flist + uintptr(i)*8))
					return 1 != 0
				}() {
					XTclOORemoveFromMixinSubs(tls, cls2Ptr, mixinPtr)
					XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)
				}
			}
			XTclpFree(tls, (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist)
		}
		for ok5 := true; ok5; ok5 = 0 != 0 {
			var len Size_t = uint64(unsafe.Sizeof(uintptr(0))) * uint64(libc.AssignPtrInt32(cls2Ptr+80, (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Fnum))
			if len != uint64(0) {
				libc.Xmemcpy(tls, libc.AssignPtrUintptr(cls2Ptr+80+8, XTcl_Alloc(tls, uint32(len))), (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist, len)
			} else {
				(*Class)(unsafe.Pointer(cls2Ptr)).Fmixins.Flist = uintptr(0)
			}
		}
		for i = 0; i < (*Class)(unsafe.Pointer(cls2Ptr)).Fmixins.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				mixinPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(cls2Ptr)).Fmixins.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				XTclOOAddToMixinSubs(tls, cls2Ptr, mixinPtr)

				// For the copy just created in DUPLICATE.

				(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)).FrefCount++
			}
		}

		// Duplicate the source class's methods, constructor and destructor.

		for hPtr = XTcl_FirstHashEntry(tls, clsPtr+112, bp+32); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					keyPtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer(clsPtr+112)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(clsPtr+112)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+32) {
			if sCloneClassMethod(tls, interp, cls2Ptr, mPtr, keyPtr,
				uintptr(0)) != TCL_OK {
				XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(o2Ptr)).Fcommand)
				return uintptr(0)
			}
		}
		if (*Class)(unsafe.Pointer(clsPtr)).FconstructorPtr != 0 {
			if sCloneClassMethod(tls, interp, cls2Ptr, (*Class)(unsafe.Pointer(clsPtr)).FconstructorPtr,
				uintptr(0), cls2Ptr+200) != TCL_OK {
				XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(o2Ptr)).Fcommand)
				return uintptr(0)
			}
		}
		if (*Class)(unsafe.Pointer(clsPtr)).FdestructorPtr != 0 {
			if sCloneClassMethod(tls, interp, cls2Ptr, (*Class)(unsafe.Pointer(clsPtr)).FdestructorPtr, uintptr(0),
				cls2Ptr+208) != TCL_OK {
				XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(o2Ptr)).Fcommand)
				return uintptr(0)
			}
		}

		// Duplicate the class's metadata.

		if (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr != uintptr(0) {
			var metadataTypePtr uintptr
			var value ClientData
			// var duplicate ClientData at bp+64, 8

			for hPtr = XTcl_FirstHashEntry(tls, (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr, bp+32); func() int32 {
				if hPtr != uintptr(0) {
					return func() int32 {
						metadataTypePtr = func() uintptr {
							if (*Tcl_HashTable)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr)).FkeyType == -1 {
								return *(*uintptr)(unsafe.Pointer(hPtr + 32))
							}
							return hPtr + 32
						}()
						value = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
						return 1
					}()
				}
				return 0
			}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+32) {
				if (*Tcl_ObjectMetadataType)(unsafe.Pointer(metadataTypePtr)).FcloneProc == uintptr(0) {
					*(*ClientData)(unsafe.Pointer(bp + 64 /* duplicate */)) = value
				} else {
					if (*struct {
						f func(*libc.TLS, uintptr, ClientData, uintptr) int32
					})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjectMetadataType)(unsafe.Pointer(metadataTypePtr)).FcloneProc})).f(tls, interp, value,
						bp+64) != TCL_OK {
						XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(o2Ptr)).Fcommand)
						return uintptr(0)
					}
				}
				if *(*ClientData)(unsafe.Pointer(bp + 64)) != uintptr(0) {
					XTcl_ClassSetMetadata(tls, cls2Ptr, metadataTypePtr,
						*(*ClientData)(unsafe.Pointer(bp + 64 /* duplicate */)))
				}
			}
		}
	}

	XTclResetRewriteEnsemble(tls, interp, 1)
	contextPtr = XTclOOGetCallContext(tls, o2Ptr, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FclonedName, 0, uintptr(0))
	if contextPtr != 0 {
		*(*uintptr)(unsafe.Pointer(bp + 72)) = XTclOOObjectName(tls, interp, o2Ptr)
		*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)) = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FclonedName
		*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)) = XTclOOObjectName(tls, interp, oPtr)
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FrefCount++
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)))).FrefCount++
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)))).FrefCount++
		result = XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclOOInvokeContext})), contextPtr, 3,
			bp+72)
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Flength = -1
				for ok6 := true; ok6; ok6 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)) + 32)) = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 72))
				}
			} else {
				XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 72)))
			}
		}

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)))).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)))).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)))).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)))).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)))).Flength = -1
				for ok7 := true; ok7; ok7 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)) + 32)) = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 72 + 1*8))
				}
			} else {
				XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 72 + 1*8)))
			}
		}

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)))).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)))).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)))).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)))).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)))).Flength = -1
				for ok8 := true; ok8; ok8 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)) + 32)) = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 72 + 2*8))
				}
			} else {
				XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 72 + 2*8)))
			}
		}

		XTclOODeleteContext(tls, contextPtr)
		if result == TCL_ERROR {
			XTcl_AddErrorInfo(tls, interp,
				ts+50050)
		}
		if result != TCL_OK {
			XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(o2Ptr)).Fcommand)
			return uintptr(0)
		}
	}

	return o2Ptr
}

// ----------------------------------------------------------------------
//
// CloneObjectMethod, CloneClassMethod --
//
//	Helper functions used for cloning methods. They work identically to
//	each other, except for the difference between them in how they
//	register the cloned method on a successful clone.
//
// ----------------------------------------------------------------------

func sCloneObjectMethod(tls *libc.TLS, interp uintptr, oPtr uintptr, mPtr uintptr, namePtr uintptr) int32 { /* tclOO.c:2185:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(0) {
		XTcl_NewInstanceMethod(tls, interp, oPtr, namePtr,
			(*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD, uintptr(0), uintptr(0))
	} else if (*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FcloneProc != 0 {
		// var newClientData ClientData at bp, 8

		if (*struct {
			f func(*libc.TLS, uintptr, ClientData, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FcloneProc})).f(tls, interp, (*Method)(unsafe.Pointer(mPtr)).FclientData,
			bp) != TCL_OK {
			return TCL_ERROR
		}
		XTcl_NewInstanceMethod(tls, interp, oPtr, namePtr,
			(*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD, (*Method)(unsafe.Pointer(mPtr)).FtypePtr, *(*ClientData)(unsafe.Pointer(bp /* newClientData */)))
	} else {
		XTcl_NewInstanceMethod(tls, interp, oPtr, namePtr,
			(*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD, (*Method)(unsafe.Pointer(mPtr)).FtypePtr, (*Method)(unsafe.Pointer(mPtr)).FclientData)
	}
	return TCL_OK
}

func sCloneClassMethod(tls *libc.TLS, interp uintptr, clsPtr uintptr, mPtr uintptr, namePtr uintptr, m2PtrPtr uintptr) int32 { /* tclOO.c:2211:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var m2Ptr uintptr

	if (*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(0) {
		m2Ptr = XTcl_NewMethod(tls, interp, clsPtr,
			namePtr, (*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD, uintptr(0), uintptr(0))
	} else if (*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FcloneProc != 0 {
		// var newClientData ClientData at bp, 8

		if (*struct {
			f func(*libc.TLS, uintptr, ClientData, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FcloneProc})).f(tls, interp, (*Method)(unsafe.Pointer(mPtr)).FclientData,
			bp) != TCL_OK {
			return TCL_ERROR
		}
		m2Ptr = XTcl_NewMethod(tls, interp, clsPtr,
			namePtr, (*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD, (*Method)(unsafe.Pointer(mPtr)).FtypePtr,
			*(*ClientData)(unsafe.Pointer(bp /* newClientData */)))
	} else {
		m2Ptr = XTcl_NewMethod(tls, interp, clsPtr,
			namePtr, (*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD, (*Method)(unsafe.Pointer(mPtr)).FtypePtr,
			(*Method)(unsafe.Pointer(mPtr)).FclientData)
	}
	if m2PtrPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(m2PtrPtr)) = m2Ptr
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// Tcl_ClassGetMetadata, Tcl_ClassSetMetadata, Tcl_ObjectGetMetadata,
// Tcl_ObjectSetMetadata --
//
//	Metadata management API. The metadata system allows code in extensions
//	to attach arbitrary non-NULL pointers to objects and classes without
//	the different things that might be interested being able to interfere
//	with each other. Apart from non-NULL-ness, these routines attach no
//	interpretation to the meaning of the metadata pointers.
//
//	The Tcl_*GetMetadata routines get the metadata pointer attached that
//	has been related with a particular type, or NULL if no metadata
//	associated with the given type has been attached.
//
//	The Tcl_*SetMetadata routines set or delete the metadata pointer that
//	is related to a particular type. The value associated with the type is
//	deleted (if present; no-op otherwise) if the value is NULL, and
//	attached (replacing the previous value, which is deleted if present)
//	otherwise. This means it is impossible to attach a NULL value for any
//	metadata type.
//
// ----------------------------------------------------------------------

func XTcl_ClassGetMetadata(tls *libc.TLS, clazz Tcl_Class, typePtr uintptr) ClientData { /* tclOO.c:2271:1: */
	var clsPtr uintptr = clazz
	var hPtr uintptr

	// If there's no metadata store attached, the type in question has
	// definitely not been attached either!

	if (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr == uintptr(0) {
		return uintptr(0)
	}

	// There is a metadata store, so look in it for the given type.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr)).FfindProc})).f(tls, (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr, typePtr)

	// Return the metadata value if we found it, otherwise NULL.

	if hPtr == uintptr(0) {
		return uintptr(0)
	}
	return (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
}

func XTcl_ClassSetMetadata(tls *libc.TLS, clazz Tcl_Class, typePtr uintptr, metadata ClientData) { /* tclOO.c:2304:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var clsPtr uintptr = clazz
	var hPtr uintptr
	// var isNew int32 at bp, 4

	// Attach the metadata store if not done already.

	if (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr == uintptr(0) {
		if metadata == uintptr(0) {
			return
		}
		(*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_InitHashTable(tls, (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr, 1)
	}

	// If the metadata is NULL, we're deleting the metadata for the type.

	if metadata == uintptr(0) {
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr)).FfindProc})).f(tls, (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr, typePtr)
		if hPtr != uintptr(0) {
			(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjectMetadataType)(unsafe.Pointer(typePtr)).FdeleteProc})).f(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
			XTcl_DeleteHashEntry(tls, hPtr)
		}
		return
	}

	// Otherwise we're attaching the metadata. Note that if there was already
	// some metadata attached of this type, we delete that first.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr)).FcreateProc})).f(tls, (*Class)(unsafe.Pointer(clsPtr)).FmetadataPtr, typePtr, bp /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjectMetadataType)(unsafe.Pointer(typePtr)).FdeleteProc})).f(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	}
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = metadata
}

func XTcl_ObjectGetMetadata(tls *libc.TLS, object Tcl_Object, typePtr uintptr) ClientData { /* tclOO.c:2351:1: */
	var oPtr uintptr = object
	var hPtr uintptr

	// If there's no metadata store attached, the type in question has
	// definitely not been attached either!

	if (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr == uintptr(0) {
		return uintptr(0)
	}

	// There is a metadata store, so look in it for the given type.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmetadataPtr)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr, typePtr)

	// Return the metadata value if we found it, otherwise NULL.

	if hPtr == uintptr(0) {
		return uintptr(0)
	}
	return (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
}

func XTcl_ObjectSetMetadata(tls *libc.TLS, object Tcl_Object, typePtr uintptr, metadata ClientData) { /* tclOO.c:2384:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var oPtr uintptr = object
	var hPtr uintptr
	// var isNew int32 at bp, 4

	// Attach the metadata store if not done already.

	if (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr == uintptr(0) {
		if metadata == uintptr(0) {
			return
		}
		(*Object)(unsafe.Pointer(oPtr)).FmetadataPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_InitHashTable(tls, (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr, 1)
	}

	// If the metadata is NULL, we're deleting the metadata for the type.

	if metadata == uintptr(0) {
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmetadataPtr)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr, typePtr)
		if hPtr != uintptr(0) {
			(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjectMetadataType)(unsafe.Pointer(typePtr)).FdeleteProc})).f(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
			XTcl_DeleteHashEntry(tls, hPtr)
		}
		return
	}

	// Otherwise we're attaching the metadata. Note that if there was already
	// some metadata attached of this type, we delete that first.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmetadataPtr)).FcreateProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmetadataPtr, typePtr, bp /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjectMetadataType)(unsafe.Pointer(typePtr)).FdeleteProc})).f(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	}
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = metadata
}

// ----------------------------------------------------------------------
//
// PublicObjectCmd, PrivateObjectCmd, TclOOInvokeObject --
//
//	Main entry point for object invocations. The Public* and Private*
//	wrapper functions (implementations of both object instance commands
//	and [my]) are just thin wrappers round the main TclOOObjectCmdCore
//	function. Note that the core is function is NRE-aware.
//
// ----------------------------------------------------------------------

func sPublicObjectCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOO.c:2444:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sPublicNRObjectCmd})), clientData, objc, objv)
}

func sPublicNRObjectCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOO.c:2454:1: */
	return XTclOOObjectCmdCore(tls, clientData, interp, objc, objv, PUBLIC_METHOD,
		uintptr(0))
}

func sPrivateObjectCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOO.c:2465:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sPrivateNRObjectCmd})), clientData, objc, objv)
}

func sPrivateNRObjectCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOO.c:2475:1: */
	return XTclOOObjectCmdCore(tls, clientData, interp, objc, objv, 0, uintptr(0))
}

func XTclOOInvokeObject(tls *libc.TLS, interp uintptr, object Tcl_Object, startCls Tcl_Class, publicPrivate int32, objc int32, objv uintptr) int32 { /* tclOO.c:2485:1: */
	switch publicPrivate {
	case PUBLIC_METHOD:
		return XTclOOObjectCmdCore(tls, object, interp, objc, objv,
			PUBLIC_METHOD, startCls)
	case PRIVATE_METHOD:
		return XTclOOObjectCmdCore(tls, object, interp, objc, objv,
			PRIVATE_METHOD, startCls)
	default:
		return XTclOOObjectCmdCore(tls, object, interp, objc, objv, 0,
			startCls)
	}
	return int32(0)
}

// ----------------------------------------------------------------------
//
// TclOOObjectCmdCore, FinalizeObjectCall --
//
//	Main function for object invocations. Does call chain creation,
//	management and invocation. The function FinalizeObjectCall exists to
//	clean up after the non-recursive processing of TclOOObjectCmdCore.
//
// ----------------------------------------------------------------------

func XTclOOObjectCmdCore(tls *libc.TLS, oPtr uintptr, interp uintptr, objc int32, objv uintptr, flags int32, startCls uintptr) int32 { /* tclOO.c:2528:1: */
	bp := tls.Alloc(144)
	defer tls.Free(144)
	*(*uintptr)(unsafe.Pointer(bp + 136)) = startCls

	var contextPtr uintptr
	var methodNamePtr uintptr
	var result int32
	var startClsPtr uintptr
	var mappedMethodName uintptr
	var miPtr uintptr
	var _objPtr uintptr
	var _callbackPtr uintptr

	// If we've no method name, throw this directly into the unknown
	// processing.

	if !(objc < 2) {
		goto __1
	}
	flags = flags | FORCE_UNKNOWN
	methodNamePtr = uintptr(0)
	goto noMapping
__1:
	;

	// Give plugged in code a chance to remap the method name.

	methodNamePtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if !((*Object)(unsafe.Pointer(oPtr)).FmapMethodNameProc != uintptr(0)) {
		goto __2
	}
	startClsPtr = bp + 136 /* &startCls */
	mappedMethodName = XTcl_DuplicateObj(tls, methodNamePtr)

	result = (*struct {
		f func(*libc.TLS, uintptr, Tcl_Object, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Object)(unsafe.Pointer(oPtr)).FmapMethodNameProc})).f(tls, interp, oPtr,
		startClsPtr, mappedMethodName)
	if !(result != TCL_OK) {
		goto __4
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).FrefCount, 1) > 1) {
		goto __5
	}
	goto __6
__5:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __7
	}

	if !((*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).Fbytes != XtclEmptyStringRep) {
		goto __9
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).Fbytes)
__9:
	;
	(*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).Flength = -1
__10:
	;
	*(*uintptr)(unsafe.Pointer(mappedMethodName + 32)) = XtclFreeObjList
	XtclFreeObjList = mappedMethodName
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	goto __8
__7:
	XTclFreeObj(tls, mappedMethodName)
__8:
	;
__6:
	;

	if !(result == TCL_BREAK) {
		goto __13
	}
	goto noMapping
	goto __14
__13:
	if !(result == TCL_ERROR) {
		goto __15
	}
	XTcl_AddErrorInfo(tls, interp, ts+50093)
__15:
	;
__14:
	;
	return result
__4:
	;

	// Get the call chain for the remapped name.

	(*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).FrefCount++
	contextPtr = XTclOOGetCallContext(tls, oPtr, mappedMethodName,
		flags|(*Object)(unsafe.Pointer(oPtr)).Fflags&FILTER_HANDLING, methodNamePtr)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).FrefCount, 1) > 1) {
		goto __16
	}
	goto __17
__16:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __18
	}

	if !((*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).Fbytes != XtclEmptyStringRep) {
		goto __20
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).Fbytes)
__20:
	;
	(*Tcl_Obj)(unsafe.Pointer(mappedMethodName)).Flength = -1
__21:
	;
	*(*uintptr)(unsafe.Pointer(mappedMethodName + 32)) = XtclFreeObjList
	XtclFreeObjList = mappedMethodName
	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
	goto __19
__18:
	XTclFreeObj(tls, mappedMethodName)
__19:
	;
__17:
	;

	if !(contextPtr == uintptr(0)) {
		goto __24
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+50126, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes
			}
			return XTcl_GetString(tls, methodNamePtr)
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+50196,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes
			}
			return XTcl_GetString(tls, methodNamePtr)
		}(), uintptr(0)))
	return TCL_ERROR
__24:
	;
	goto __3
__2:
	// Get the call chain.

noMapping:
	contextPtr = XTclOOGetCallContext(tls, oPtr, methodNamePtr,
		flags|(*Object)(unsafe.Pointer(oPtr)).Fflags&FILTER_HANDLING, uintptr(0))
	if !(contextPtr == uintptr(0)) {
		goto __25
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+50126, libc.VaList(bp+48, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes
			}
			return XTcl_GetString(tls, methodNamePtr)
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes
			}
			return XTcl_GetString(tls, methodNamePtr)
		}(), uintptr(0)))
	return TCL_ERROR
__25:
	;
__3:
	;

	// Check to see if we need to apply magical tricks to start part way
	// through the call chain.

	if !(*(*uintptr)(unsafe.Pointer(bp + 136)) != uintptr(0)) {
		goto __26
	}
__27:
	if !((*CallContext)(unsafe.Pointer(contextPtr)).Findex < (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain) {
		goto __29
	}
	miPtr =
		(*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24

	if !((*MInvoke)(unsafe.Pointer(miPtr)).FisFilter != 0) {
		goto __30
	}
	goto __28
__30:
	;
	if !((*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FdeclaringClassPtr == *(*uintptr)(unsafe.Pointer(bp + 136))) {
		goto __31
	}
	goto __29
__31:
	;
	goto __28
__28:
	(*CallContext)(unsafe.Pointer(contextPtr)).Findex++
	goto __27
	goto __29
__29:
	;
	if !((*CallContext)(unsafe.Pointer(contextPtr)).Findex >= (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain) {
		goto __32
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+50210, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(methodNamePtr)).Fbytes
			}
			return XTcl_GetString(tls, methodNamePtr)
		}(), uintptr(0)))
	XTclOODeleteContext(tls, contextPtr)
	return TCL_ERROR
__32:
	;
__26:
	;

	// Invoke the call chain, locking the object structure against deletion
	// for the duration.

__33:
__36:
	;
__39:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __42
	}
	XTclAllocateFreeObjects(tls)
__42:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
	_callbackPtr = _objPtr
	goto __37
__37:
	if 0 != 0 {
		goto __36
	}
	goto __38
__38:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sFinalizeObjectCall}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = contextPtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
	return XTclOOInvokeContext(tls, contextPtr, interp, objc, objv)
}

func sFinalizeObjectCall(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOO.c:2648:1: */
	// Dispose of the call chain, which drops the lock on the object's
	// structure.

	XTclOODeleteContext(tls, *(*ClientData)(unsafe.Pointer(data)))
	return result
}

// ----------------------------------------------------------------------
//
// Tcl_ObjectContextInvokeNext, TclNRObjectContextInvokeNext, FinalizeNext --
//
//	Invokes the next stage of the call chain described in an object
//	context. This is the core of the implementation of the [next] command.
//	Does not do management of the call-frame stack. Available in public
//	(standard API) and private (NRE-aware) forms. FinalizeNext is a
//	private function used to clean up in the NRE case.
//
// ----------------------------------------------------------------------

func XTcl_ObjectContextInvokeNext(tls *libc.TLS, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr, skip int32) int32 { /* tclOO.c:2677:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var contextPtr uintptr = context
	var savedIndex int32 = (*CallContext)(unsafe.Pointer(contextPtr)).Findex
	var savedSkip int32 = (*CallContext)(unsafe.Pointer(contextPtr)).Fskip
	var result int32

	if (*CallContext)(unsafe.Pointer(contextPtr)).Findex+1 >= (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain {
		// We're at the end of the chain; generate an error message unless the
		// interpreter is being torn down, in which case we might be getting
		// here because of methods/destructors doing a [next] (or equivalent)
		// unexpectedly.

		var methodType uintptr

		if XTcl_InterpDeleted(tls, interp) != 0 {
			return TCL_OK
		}

		if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&CONSTRUCTOR != 0 {
			methodType = ts + 26491 /* "constructor" */
		} else if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&DESTRUCTOR != 0 {
			methodType = ts + 26503 /* "destructor" */
		} else {
			methodType = ts + 26521 /* "method" */
		}

		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+29388, libc.VaList(bp, methodType)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+29131, ts+29414, uintptr(0)))
		return TCL_ERROR
	}

	// Advance to the next method implementation in the chain in the method
	// call context while we process the body. However, need to adjust the
	// argument-skip control because we're guaranteed to have a single prefix
	// arg (i.e., 'next') and not the variable amount that can happen because
	// method invocations (i.e., '$obj meth' and 'my meth'), constructors
	// (i.e., '$cls new' and '$cls create obj') and destructors (no args at
	// all) come through the same code.

	(*CallContext)(unsafe.Pointer(contextPtr)).Findex++
	(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = skip

	// Invoke the (advanced) method call context in the caller context.

	result = XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclOOInvokeContext})), contextPtr, objc,
		objv)

	// Restore the call chain context index as we've finished the inner invoke
	// and want to operate in the outer context again.

	(*CallContext)(unsafe.Pointer(contextPtr)).Findex = savedIndex
	(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = savedSkip

	return result
}

func XTclNRObjectContextInvokeNext(tls *libc.TLS, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr, skip int32) int32 { /* tclOO.c:2749:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var contextPtr uintptr = context

	if (*CallContext)(unsafe.Pointer(contextPtr)).Findex+1 >= (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain {
		// We're at the end of the chain; generate an error message unless the
		// interpreter is being torn down, in which case we might be getting
		// here because of methods/destructors doing a [next] (or equivalent)
		// unexpectedly.

		var methodType uintptr

		if XTcl_InterpDeleted(tls, interp) != 0 {
			return TCL_OK
		}

		if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&CONSTRUCTOR != 0 {
			methodType = ts + 26491 /* "constructor" */
		} else if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&DESTRUCTOR != 0 {
			methodType = ts + 26503 /* "destructor" */
		} else {
			methodType = ts + 26521 /* "method" */
		}

		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+29388, libc.VaList(bp, methodType)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+29131, ts+29414, uintptr(0)))
		return TCL_ERROR
	}

	// Advance to the next method implementation in the chain in the method
	// call context while we process the body. However, need to adjust the
	// argument-skip control because we're guaranteed to have a single prefix
	// arg (i.e., 'next') and not the variable amount that can happen because
	// method invocations (i.e., '$obj meth' and 'my meth'), constructors
	// (i.e., '$cls new' and '$cls create obj') and destructors (no args at
	// all) come through the same code.

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sFinalizeNext}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = contextPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(Intptr_t((*CallContext)(unsafe.Pointer(contextPtr)).Findex))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(Intptr_t((*CallContext)(unsafe.Pointer(contextPtr)).Fskip))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	(*CallContext)(unsafe.Pointer(contextPtr)).Findex++
	(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = skip

	// Invoke the (advanced) method call context in the caller context.

	return XTclOOInvokeContext(tls, contextPtr, interp, objc, objv)
}

func sFinalizeNext(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOO.c:2809:1: */
	var contextPtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	// Restore the call chain context index as we've finished the inner invoke
	// and want to operate in the outer context again.

	(*CallContext)(unsafe.Pointer(contextPtr)).Findex = int32(*(*ClientData)(unsafe.Pointer(data + 1*8)))
	(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))
	return result
}

// ----------------------------------------------------------------------
//
// Tcl_GetObjectFromObj --
//
//	Utility function to get an object from a Tcl_Obj containing its name.
//
// ----------------------------------------------------------------------

func XTcl_GetObjectFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr) Tcl_Object { /* tclOO.c:2837:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var cmdPtr uintptr
	cmdPtr = XTcl_GetCommandFromObj(tls, interp, objPtr)

	if !(cmdPtr == uintptr(0)) {
		goto __1
	}
	goto notAnObject
__1:
	;
	if !((*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sPublicObjectCmd}))) {
		goto __2
	}
	cmdPtr = XTclGetOriginalCommand(tls, cmdPtr)
	if !(cmdPtr == uintptr(0) || (*Command)(unsafe.Pointer(cmdPtr)).FobjProc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sPublicObjectCmd}))) {
		goto __3
	}
	goto notAnObject
__3:
	;
__2:
	;
	return (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData

notAnObject:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+50241, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}
			return XTcl_GetString(tls, objPtr)
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+50272, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}(),
		uintptr(0)))
	return uintptr(0)
}

// ----------------------------------------------------------------------
//
// TclOOIsReachable --
//
//	Utility function that tests whether a class is a subclass (whether
//	directly or indirectly) of another class.
//
// ----------------------------------------------------------------------

func XTclOOIsReachable(tls *libc.TLS, targetPtr uintptr, startPtr uintptr) int32 { /* tclOO.c:2877:1: */
	var i int32
	var superPtr uintptr

tailRecurse:
	if !(startPtr == targetPtr) {
		goto __1
	}
	return 1
__1:
	;
	if !((*Class)(unsafe.Pointer(startPtr)).Fsuperclasses.Fnum == 1 && (*Class)(unsafe.Pointer(startPtr)).Fmixins.Fnum == 0) {
		goto __2
	}
	startPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(startPtr)).Fsuperclasses.Flist))
	goto tailRecurse
__2:
	;
	i = 0
__3:
	if !(i < (*Class)(unsafe.Pointer(startPtr)).Fsuperclasses.Fnum) {
		goto __5
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(startPtr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __6
	}
	goto __4
	goto __7
__6:
	if !func() bool {
		superPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(startPtr)).Fsuperclasses.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __8
	}
	if !(XTclOOIsReachable(tls, targetPtr, superPtr) != 0) {
		goto __9
	}
	return 1
__9:
	;
__8:
	;
__7:
	;
	goto __4
__4:
	i++
	goto __3
	goto __5
__5:
	;
	i = 0
__10:
	if !(i < (*Class)(unsafe.Pointer(startPtr)).Fmixins.Fnum) {
		goto __12
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(startPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __13
	}
	goto __11
	goto __14
__13:
	if !func() bool {
		superPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(startPtr)).Fmixins.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __15
	}
	if !(XTclOOIsReachable(tls, targetPtr, superPtr) != 0) {
		goto __16
	}
	return 1
__16:
	;
__15:
	;
__14:
	;
	goto __11
__11:
	i++
	goto __10
	goto __12
__12:
	;
	return 0
}

// ----------------------------------------------------------------------
//
// TclOOObjectName, Tcl_GetObjectName --
//
//	Utility function that returns the name of the object. Note that this
//	simplifies cache management by keeping the code to do it in one place
//	and not sprayed all over. The value returned always has a reference
//	count of at least one.
//
// ----------------------------------------------------------------------

func XTclOOObjectName(tls *libc.TLS, interp uintptr, oPtr uintptr) uintptr { /* tclOO.c:2918:9: */
	var namePtr uintptr

	if (*Object)(unsafe.Pointer(oPtr)).FcachedNameObj != 0 {
		return (*Object)(unsafe.Pointer(oPtr)).FcachedNameObj
	}
	namePtr = XTcl_NewObj(tls)
	XTcl_GetCommandFullName(tls, interp, (*Object)(unsafe.Pointer(oPtr)).Fcommand, namePtr)
	(*Tcl_Obj)(unsafe.Pointer(namePtr)).FrefCount++
	(*Object)(unsafe.Pointer(oPtr)).FcachedNameObj = namePtr
	return namePtr
}

func XTcl_GetObjectName(tls *libc.TLS, interp uintptr, object Tcl_Object) uintptr { /* tclOO.c:2935:9: */
	return XTclOOObjectName(tls, interp, object)
}

// ----------------------------------------------------------------------
//
// assorted trivial 'getter' functions
//
// ----------------------------------------------------------------------

func XTcl_ObjectContextMethod(tls *libc.TLS, context Tcl_ObjectContext) Tcl_Method { /* tclOO.c:2952:1: */
	var contextPtr uintptr = context
	return (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr
}

func XTcl_ObjectContextIsFiltering(tls *libc.TLS, context Tcl_ObjectContext) int32 { /* tclOO.c:2960:1: */
	var contextPtr uintptr = context
	return (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FisFilter
}

func XTcl_ObjectContextObject(tls *libc.TLS, context Tcl_ObjectContext) Tcl_Object { /* tclOO.c:2968:1: */
	return (*CallContext)(unsafe.Pointer(context)).FoPtr
}

func XTcl_ObjectContextSkippedArgs(tls *libc.TLS, context Tcl_ObjectContext) int32 { /* tclOO.c:2975:1: */
	return (*CallContext)(unsafe.Pointer(context)).Fskip
}

func XTcl_GetObjectNamespace(tls *libc.TLS, object Tcl_Object) uintptr { /* tclOO.c:2981:15: */
	return (*Object)(unsafe.Pointer(object)).FnamespacePtr
}

func XTcl_GetObjectCommand(tls *libc.TLS, object Tcl_Object) Tcl_Command { /* tclOO.c:2989:1: */
	return (*Object)(unsafe.Pointer(object)).Fcommand
}

func XTcl_GetObjectAsClass(tls *libc.TLS, object Tcl_Object) Tcl_Class { /* tclOO.c:2996:1: */
	return (*Object)(unsafe.Pointer(object)).FclassPtr
}

func XTcl_ObjectDeleted(tls *libc.TLS, object Tcl_Object) int32 { /* tclOO.c:3003:1: */
	return libc.Bool32((*Object)(unsafe.Pointer(object)).Fcommand == uintptr(0))
}

func XTcl_GetClassAsObject(tls *libc.TLS, clazz Tcl_Class) Tcl_Object { /* tclOO.c:3010:1: */
	return (*Class)(unsafe.Pointer(clazz)).FthisPtr
}

func XTcl_ObjectGetMethodNameMapper(tls *libc.TLS, object Tcl_Object) uintptr { /* tclOO.c:3016:29: */
	return (*Object)(unsafe.Pointer(object)).FmapMethodNameProc
}

func XTcl_ObjectSetMethodNameMapper(tls *libc.TLS, object Tcl_Object, mapMethodNameProc uintptr) { /* tclOO.c:3024:1: */
	(*Object)(unsafe.Pointer(object)).FmapMethodNameProc = mapMethodNameProc
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// ----------------------------------------------------------------------
//
// AddCreateCallback, FinalizeConstruction --
//
//	Special version of TclNRAddCallback that allows the caller to splice
//	the object created later on. Always calls FinalizeConstruction, which
//	converts the object into its name and stores that in the interpreter
//	result. This is shared by all the construction methods (create,
//	createWithNamespace, new).
//
//	Note that this is the only code in this file (or, indeed, the whole of
//	TclOO) that uses NRE internals; it is the only code that does
//	non-standard poking in the NRE guts.
//
// ----------------------------------------------------------------------

func sAddConstructionFinalizer(tls *libc.TLS, interp uintptr) uintptr { /* tclOOBasic.c:44:26: */
	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sFinalizeConstruction}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr + 8
}

func sFinalizeConstruction(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOBasic.c:53:1: */
	var oPtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	if result != TCL_OK {
		return result
	}
	XTcl_SetObjResult(tls, interp, XTclOOObjectName(tls, interp, oPtr))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOO_Class_Constructor --
//
//	Implementation for oo::class constructor.
//
// ----------------------------------------------------------------------

func XTclOO_Class_Constructor(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOBasic.c:78:1: */
	var oPtr uintptr = XTcl_ObjectContextObject(tls, context)
	var invoke uintptr

	if objc-1 > XTcl_ObjectContextSkippedArgs(tls, context) {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+50279)
		return TCL_ERROR
	} else if objc == XTcl_ObjectContextSkippedArgs(tls, context) {
		return TCL_OK
	}

	// Delegate to [oo::define] to do the work.

	invoke = XTcl_Alloc(tls, uint32(uint64(3)*uint64(unsafe.Sizeof(uintptr(0)))))
	*(*uintptr)(unsafe.Pointer(invoke)) = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FdefineName
	*(*uintptr)(unsafe.Pointer(invoke + 1*8)) = XTclOOObjectName(tls, interp, oPtr)
	*(*uintptr)(unsafe.Pointer(invoke + 2*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))

	// Must add references or errors in configuration script will cause
	// trouble.

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke)))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 1*8)))).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 2*8)))).FrefCount++
	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sDecrRefsPostClassConstructor}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = invoke
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}

	// Tricky point: do not want the extra reported level in the Tcl stack
	// trace, so use TCL_EVAL_NOERR.

	return XTclNREvalObjv(tls, interp, 3, invoke, TCL_EVAL_NOERR, uintptr(0))
}

func sDecrRefsPostClassConstructor(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOBasic.c:125:1: */
	var invoke uintptr = *(*ClientData)(unsafe.Pointer(data))

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke)))).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke)))).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke)))).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke)))).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke)))).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke)) + 32)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(invoke))
			}
		} else {
			XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(invoke)))
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 1*8)))).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 1*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 1*8)))).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 1*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 1*8)))).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 1*8)))).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 1*8)))).Flength = -1
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 1*8)) + 32)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(invoke + 1*8))
			}
		} else {
			XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(invoke + 1*8)))
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 2*8)))).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 2*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 2*8)))).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 2*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 2*8)))).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 2*8)))).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 2*8)))).Flength = -1
			for ok2 := true; ok2; ok2 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(invoke + 2*8)) + 32)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(invoke + 2*8))
			}
		} else {
			XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(invoke + 2*8)))
		}
	}

	XTclpFree(tls, invoke)
	return result
}

// ----------------------------------------------------------------------
//
// TclOO_Class_Create --
//
//	Implementation for oo::class->create method.
//
// ----------------------------------------------------------------------

func XTclOO_Class_Create(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOBasic.c:150:1: */
	bp := tls.Alloc(76)
	defer tls.Free(76)

	var oPtr uintptr = XTcl_ObjectContextObject(tls, context)
	var objName uintptr
	// var len int32 at bp+72, 4

	// Sanity check; should not be possible to invoke this method on a
	// non-class.

	if (*Object)(unsafe.Pointer(oPtr)).FclassPtr == uintptr(0) {
		var cmdnameObj uintptr = XTclOOObjectName(tls, interp, oPtr)

		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+50298, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(cmdnameObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(cmdnameObj)).Fbytes
				}
				return XTcl_GetString(tls, cmdnameObj)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+29131, ts+50325, uintptr(0)))
		return TCL_ERROR
	}

	// Check we have the right number of (sensible) arguments.

	if objc-XTcl_ObjectContextSkippedArgs(tls, context) < 1 {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+50346)
		return TCL_ERROR
	}
	objName = XTcl_GetStringFromObj(tls,
		*(*uintptr)(unsafe.Pointer(objv + uintptr(XTcl_ObjectContextSkippedArgs(tls, context))*8)), bp+72)
	if *(*int32)(unsafe.Pointer(bp + 72)) == 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+50367, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+29131, ts+50397, uintptr(0)))
		return TCL_ERROR
	}

	// Make the object and return its name.

	return XTclNRNewObjectInstance(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr,
		objName, uintptr(0), objc, objv,
		XTcl_ObjectContextSkippedArgs(tls, context)+1,
		sAddConstructionFinalizer(tls, interp))
}

// ----------------------------------------------------------------------
//
// TclOO_Class_CreateNs --
//
//	Implementation for oo::class->createWithNamespace method.
//
// ----------------------------------------------------------------------

func XTclOO_Class_CreateNs(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOBasic.c:215:1: */
	bp := tls.Alloc(108)
	defer tls.Free(108)

	var oPtr uintptr = XTcl_ObjectContextObject(tls, context)
	var objName uintptr
	var nsName uintptr
	// var len int32 at bp+104, 4

	// Sanity check; should not be possible to invoke this method on a
	// non-class.

	if (*Object)(unsafe.Pointer(oPtr)).FclassPtr == uintptr(0) {
		var cmdnameObj uintptr = XTclOOObjectName(tls, interp, oPtr)

		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+50298, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(cmdnameObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(cmdnameObj)).Fbytes
				}
				return XTcl_GetString(tls, cmdnameObj)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+29131, ts+50325, uintptr(0)))
		return TCL_ERROR
	}

	// Check we have the right number of (sensible) arguments.

	if objc-XTcl_ObjectContextSkippedArgs(tls, context) < 2 {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+50408)
		return TCL_ERROR
	}
	objName = XTcl_GetStringFromObj(tls,
		*(*uintptr)(unsafe.Pointer(objv + uintptr(XTcl_ObjectContextSkippedArgs(tls, context))*8)), bp+104)
	if *(*int32)(unsafe.Pointer(bp + 104)) == 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+50367, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+29131, ts+50397, uintptr(0)))
		return TCL_ERROR
	}
	nsName = XTcl_GetStringFromObj(tls,
		*(*uintptr)(unsafe.Pointer(objv + uintptr(XTcl_ObjectContextSkippedArgs(tls, context)+1)*8)), bp+104)
	if *(*int32)(unsafe.Pointer(bp + 104)) == 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+50443, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+29131, ts+50397, uintptr(0)))
		return TCL_ERROR
	}

	// Make the object and return its name.

	return XTclNRNewObjectInstance(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr,
		objName, nsName, objc, objv,
		XTcl_ObjectContextSkippedArgs(tls, context)+2,
		sAddConstructionFinalizer(tls, interp))
}

// ----------------------------------------------------------------------
//
// TclOO_Class_New --
//
//	Implementation for oo::class->new method.
//
// ----------------------------------------------------------------------

func XTclOO_Class_New(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOBasic.c:288:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var oPtr uintptr = XTcl_ObjectContextObject(tls, context)

	// Sanity check; should not be possible to invoke this method on a
	// non-class.

	if (*Object)(unsafe.Pointer(oPtr)).FclassPtr == uintptr(0) {
		var cmdnameObj uintptr = XTclOOObjectName(tls, interp, oPtr)

		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+50298, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(cmdnameObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(cmdnameObj)).Fbytes
				}
				return XTcl_GetString(tls, cmdnameObj)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+29131, ts+50325, uintptr(0)))
		return TCL_ERROR
	}

	// Make the object and return its name.

	return XTclNRNewObjectInstance(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr,
		uintptr(0), uintptr(0), objc, objv, XTcl_ObjectContextSkippedArgs(tls, context),
		sAddConstructionFinalizer(tls, interp))
}

// ----------------------------------------------------------------------
//
// TclOO_Object_Destroy --
//
//	Implementation for oo::object->destroy method.
//
// ----------------------------------------------------------------------

func XTclOO_Object_Destroy(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOBasic.c:332:1: */
	var oPtr uintptr = XTcl_ObjectContextObject(tls, context)
	var contextPtr uintptr

	if objc != XTcl_ObjectContextSkippedArgs(tls, context) {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			uintptr(0))
		return TCL_ERROR
	}
	if !((*Object)(unsafe.Pointer(oPtr)).Fflags&DESTRUCTOR_CALLED != 0) {
		*(*int32)(unsafe.Pointer(oPtr + 92)) |= DESTRUCTOR_CALLED
		contextPtr = XTclOOGetCallContext(tls, oPtr, uintptr(0), DESTRUCTOR, uintptr(0))
		if contextPtr != uintptr(0) {
			*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr + 12)) |= DESTRUCTOR
			(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = 0
			for ok := true; ok; ok = 0 != 0 {
				var _callbackPtr uintptr
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _objPtr uintptr
					{
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						_objPtr = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					_callbackPtr = _objPtr
				}
				(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, uintptr, uintptr, int32) int32
				}{sAfterNRDestructor}))
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = contextPtr
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
				(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
				(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
			}
			XTclPushTailcallPoint(tls, interp)
			return XTclOOInvokeContext(tls, contextPtr, interp, 0, uintptr(0))
		}
	}
	if (*Object)(unsafe.Pointer(oPtr)).Fcommand != 0 {
		XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer(oPtr)).Fcommand)
	}
	return TCL_OK
}

func sAfterNRDestructor(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOBasic.c:367:1: */
	var contextPtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	if (*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).Fcommand != 0 {
		XTcl_DeleteCommandFromToken(tls, interp, (*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).Fcommand)
	}
	XTclOODeleteContext(tls, contextPtr)
	return result
}

// ----------------------------------------------------------------------
//
// TclOO_Object_Eval --
//
//	Implementation for oo::object->eval method.
//
// ----------------------------------------------------------------------

func XTclOO_Object_Eval(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOBasic.c:392:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var contextPtr uintptr = context
	var object Tcl_Object = XTcl_ObjectContextObject(tls, context)
	var skip int32 = XTcl_ObjectContextSkippedArgs(tls, context)
	// var framePtr uintptr at bp, 8

	var framePtrPtr uintptr = bp /* &framePtr */
	var scriptPtr uintptr
	var invoker uintptr

	if objc-1 < skip {
		XTcl_WrongNumArgs(tls, interp, skip, objv, ts+12609)
		return TCL_ERROR
	}

	// Make the object's namespace the current namespace and evaluate the
	// command(s).

	XTclPushStackFrame(tls, interp, framePtrPtr,
		XTcl_GetObjectNamespace(tls, object), 0)
	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* framePtr */)))).Fobjc = objc
	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* framePtr */)))).Fobjv = objv // Reference counts do not need to be
	// incremented here.

	if !((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&PUBLIC_METHOD != 0) {
		object = uintptr(0) // Now just for error mesage printing.
	}

	// Work out what script we are actually going to evaluate.
	//
	// When there's more than one argument, we concatenate them together with
	// spaces between, then evaluate the result. Tcl_EvalObjEx will delete the
	// object when it decrements its refcount after eval'ing it.

	if objc != skip+1 {
		scriptPtr = XTcl_ConcatObj(tls, objc-skip, objv+uintptr(skip)*8)
		invoker = uintptr(0)
	} else {
		scriptPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8))
		invoker = (*Interp)(unsafe.Pointer(interp)).FcmdFramePtr
	}

	// Evaluate the script now, with FinalizeEval to do the processing after
	// the script completes.

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sFinalizeEval}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = object
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNREvalObjEx(tls, interp, scriptPtr, 0, invoker, skip)
}

func sFinalizeEval(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOBasic.c:453:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	if result == TCL_ERROR {
		var oPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
		var namePtr uintptr

		if oPtr != 0 {
			namePtr = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(XTclOOObjectName(tls, interp, oPtr))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(XTclOOObjectName(tls, interp, oPtr))).Fbytes
				}
				return XTcl_GetString(tls, XTclOOObjectName(tls, interp, oPtr))
			}()
		} else {
			namePtr = ts + 49808 /* "my" */
		}

		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+50476,
			libc.VaList(bp, namePtr, XTcl_GetErrorLine(tls, interp))))
	}

	// Restore the previous "current" namespace.

	XTclPopStackFrame(tls, interp)
	return result
}

// ----------------------------------------------------------------------
//
// TclOO_Object_Unknown --
//
//	Default unknown method handler method (defined in oo::object). This
//	just creates a suitable error message.
//
// ----------------------------------------------------------------------

func XTclOO_Object_Unknown(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOBasic.c:493:1: */
	bp := tls.Alloc(112)
	defer tls.Free(112)

	var contextPtr uintptr = context
	var oPtr uintptr = (*CallContext)(unsafe.Pointer(contextPtr)).FoPtr
	// var methodNames uintptr at bp+104, 8

	var numMethodNames int32
	var i int32
	var skip int32 = XTcl_ObjectContextSkippedArgs(tls, context)
	var errorMsg uintptr

	// If no method name, generate an error asking for a method name. (Only by
	// overriding *this* method can an object handle the absence of a method
	// name without an error).

	if objc < skip+1 {
		XTcl_WrongNumArgs(tls, interp, skip, objv, ts+50511)
		return TCL_ERROR
	}

	// Get the list of methods that we want to know about.

	numMethodNames = XTclOOGetSortedMethodList(tls, oPtr,
		(*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&PUBLIC_METHOD, bp+104)

	// Special message when there are no visible methods at all.

	if numMethodNames == 0 {
		var tmpBuf uintptr = XTclOOObjectName(tls, interp, oPtr)
		var piece uintptr

		if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&PUBLIC_METHOD != 0 {
			piece = ts + 50528 /* "visible methods" */
		} else {
			piece = ts + 50544 /* "methods" */
		}
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+50552, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(tmpBuf)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(tmpBuf)).Fbytes
				}
				return XTcl_GetString(tls, tmpBuf)
			}(), piece)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+7699, ts+26379,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}

	errorMsg = XTcl_ObjPrintf(tls, ts+50574,
		libc.VaList(bp+56, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))
		}()))
	for i = 0; i < numMethodNames-1; i++ {
		if i != 0 {
			XTcl_AppendToObj(tls, errorMsg, ts+19153, -1)
		}
		XTcl_AppendToObj(tls, errorMsg, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* methodNames */)) + uintptr(i)*8)), -1)
	}
	if i != 0 {
		XTcl_AppendToObj(tls, errorMsg, ts+38993, -1)
	}
	XTcl_AppendToObj(tls, errorMsg, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* methodNames */)) + uintptr(i)*8)), -1)
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 104)))
	XTcl_SetObjResult(tls, interp, errorMsg)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(skip)*8)))
		}(), uintptr(0)))
	return TCL_ERROR
}

// ----------------------------------------------------------------------
//
// TclOO_Object_LinkVar --
//
//	Implementation of oo::object->variable method.
//
// ----------------------------------------------------------------------

func XTclOO_Object_LinkVar(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOBasic.c:575:1: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var iPtr uintptr = interp
	var object Tcl_Object = XTcl_ObjectContextObject(tls, context)
	var savedNsPtr uintptr
	var i int32

	if objc-XTcl_ObjectContextSkippedArgs(tls, context) < 0 {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+50604)
		return TCL_ERROR
	}

	// A sanity check. Shouldn't ever happen. (This is all that remains of a
	// more complex check inherited from [global] after we have applied the
	// fix for [Bug 2903811]; note that the fix involved *removing* code.)

	if (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr == uintptr(0) {
		return TCL_OK
	}

	for i = XTcl_ObjectContextSkippedArgs(tls, context); i < objc; i++ {
		var varPtr uintptr
		// var aryPtr uintptr at bp+72, 8

		var varName uintptr = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
		}()

		// The variable name must not contain a '::' since that's illegal in
		// local names.

		if libc.Xstrstr(tls, varName, ts+7376) != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

				ts+50618, libc.VaList(bp, varName)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+50683, ts+50689, uintptr(0)))
			return TCL_ERROR
		}

		// Switch to the object's namespace for the duration of this call.
		// Like this, the variable is looked up in the namespace of the
		// object, and not in the namespace of the caller. Otherwise this
		// would only work if the caller was a method of the object itself,
		// which might not be true if the method was exported. This is a bit
		// of a hack, but the simplest way to do this (pushing a stack frame
		// would be horribly expensive by comparison).

		savedNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr
		(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr = XTcl_GetObjectNamespace(tls, object)
		varPtr = XTclObjLookupVar(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(0), TCL_NAMESPACE_ONLY,
			ts+50698, 1, 0, bp+72)
		(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr = savedNsPtr

		if varPtr == uintptr(0) || *(*uintptr)(unsafe.Pointer(bp + 72)) != uintptr(0) {
			// Variable cannot be an element in an array. If aryPtr is not
			// NULL, it is an element, so throw up an error and return.

			XTclVarErrMsg(tls, interp, varName, uintptr(0), ts+50698,
				ts+50705)
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+50683, ts+50743, uintptr(0)))
			return TCL_ERROR
		}

		// Arrange for the lifetime of the variable to be correctly managed.
		// This is copied out of Tcl_VariableObjCmd...

		if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_NAMESPACE_VAR != 0) {
			if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_NAMESPACE_VAR != 0) {
				*(*int32)(unsafe.Pointer(varPtr)) |= VAR_NAMESPACE_VAR
				if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
					(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount++
				}
			}

		}

		if XTclPtrMakeUpvar(tls, interp, varPtr, varName, 0, -1) != TCL_OK {
			return TCL_ERROR
		}
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOO_Object_VarName --
//
//	Implementation of the oo::object->varname method.
//
// ----------------------------------------------------------------------

func XTclOO_Object_VarName(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOBasic.c:677:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var varPtr uintptr
	// var aryVar uintptr at bp+40, 8

	var varNamePtr uintptr
	var argPtr uintptr
	var arg uintptr

	if XTcl_ObjectContextSkippedArgs(tls, context)+1 != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+14250)
		return TCL_ERROR
	}
	argPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))
	arg = XTcl_GetString(tls, argPtr)

	// Convert the variable name to fully-qualified form if it wasn't already.
	// This has to be done prior to lookup because we can run into problems
	// with resolvers otherwise. [Bug 3603695]
	//
	// We still need to do the lookup; the variable could be linked to another
	// variable and we want the target's name.

	if int32(*(*int8)(unsafe.Pointer(arg))) == ':' && int32(*(*int8)(unsafe.Pointer(arg + 1))) == ':' {
		varNamePtr = argPtr
	} else {
		var namespacePtr uintptr = XTcl_GetObjectNamespace(tls, XTcl_ObjectContextObject(tls, context))

		varNamePtr = XTcl_NewStringObj(tls, (*Tcl_Namespace)(unsafe.Pointer(namespacePtr)).FfullName, -1)
		XTcl_AppendToObj(tls, varNamePtr, ts+7376, 2)
		XTcl_AppendObjToObj(tls, varNamePtr, argPtr)
	}
	(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FrefCount++
	varPtr = XTclObjLookupVar(tls, interp, varNamePtr, uintptr(0),
		TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG, ts+50757, 1, 1, bp+40)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = varNamePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if varPtr == uintptr(0) {
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+14858, arg, uintptr(0)))
		return TCL_ERROR
	}

	// Now that we've pinned down what variable we're really talking about
	// (including traversing variable links), convert back to a name.

	varNamePtr = XTcl_NewObj(tls)
	if *(*uintptr)(unsafe.Pointer(bp + 40)) != uintptr(0) {
		var hPtr uintptr
		// var search Tcl_HashSearch at bp+48, 24

		XTcl_GetVariableFullName(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 40 /* aryVar */)), varNamePtr)

		// WARNING! This code pokes inside the implementation of hash tables!

		hPtr = XTcl_FirstHashEntry(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)) + 8)),
			bp+48)
		for hPtr != uintptr(0) {
			if varPtr == (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData {
				XTcl_AppendToObj(tls, varNamePtr, ts+50766, -1)
				XTcl_AppendObjToObj(tls, varNamePtr, *(*uintptr)(unsafe.Pointer(hPtr + 32)))
				XTcl_AppendToObj(tls, varNamePtr, ts+4078, -1)
				break
			}
			hPtr = XTcl_NextHashEntry(tls, bp+48)
		}
	} else {
		XTcl_GetVariableFullName(tls, interp, varPtr, varNamePtr)
	}
	XTcl_SetObjResult(tls, interp, varNamePtr)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOONextObjCmd, TclOONextToObjCmd --
//
//	Implementation of the [next] and [nextto] commands. Note that these
//	commands are only ever to be used inside the body of a procedure-like
//	method.
//
// ----------------------------------------------------------------------

func XTclOONextObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOBasic.c:772:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var iPtr uintptr = interp
	var framePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	var context Tcl_ObjectContext

	// Start with sanity checks on the calling context to make sure that we
	// are invoked from a suitable method context. If so, we can safely
	// retrieve the handle to the object call context.

	if framePtr == uintptr(0) || !((*CallFrame)(unsafe.Pointer(framePtr)).FisProcCallFrame&FRAME_IS_METHOD != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+50768,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+29131, ts+29134, uintptr(0)))
		return TCL_ERROR
	}
	context = (*CallFrame)(unsafe.Pointer(framePtr)).FclientData

	// Invoke the (advanced) method call context in the caller context. Note
	// that this is like [uplevel 1] and not [eval].

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sNextRestoreFrame}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = framePtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = (*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr
	return XTclNRObjectContextInvokeNext(tls, interp, context, objc, objv, 1)
}

func XTclOONextToObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOBasic.c:808:1: */
	bp := tls.Alloc(176)
	defer tls.Free(176)

	var iPtr uintptr = interp
	var framePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	var classPtr uintptr
	var contextPtr uintptr
	var i int32
	var object Tcl_Object
	var methodType uintptr

	// Start with sanity checks on the calling context to make sure that we
	// are invoked from a suitable method context. If so, we can safely
	// retrieve the handle to the object call context.

	if framePtr == uintptr(0) || !((*CallFrame)(unsafe.Pointer(framePtr)).FisProcCallFrame&FRAME_IS_METHOD != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+50768,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+29131, ts+29134, uintptr(0)))
		return TCL_ERROR
	}
	contextPtr = (*CallFrame)(unsafe.Pointer(framePtr)).FclientData

	// Sanity check the arguments; we need the first one to refer to a class.

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+50811)
		return TCL_ERROR
	}
	object = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if object == uintptr(0) {
		return TCL_ERROR
	}
	classPtr = (*Object)(unsafe.Pointer(object)).FclassPtr
	if classPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+26049, libc.VaList(bp+40, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+29131, ts+29198, uintptr(0)))
		return TCL_ERROR
	}

	// Search for an implementation of a method associated with the current
	// call on the call chain past the point where we currently are. Do not
	// allow jumping backwards!

	for i = (*CallContext)(unsafe.Pointer(contextPtr)).Findex + 1; i < (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain; i++ {
		var miPtr uintptr = (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr(i)*24

		if !((*MInvoke)(unsafe.Pointer(miPtr)).FisFilter != 0) && (*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FdeclaringClassPtr == classPtr {
			// Invoke the (advanced) method call context in the caller
			// context. Note that this is like [uplevel 1] and not [eval].

			for ok := true; ok; ok = 0 != 0 {
				var _callbackPtr uintptr
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _objPtr uintptr
					{
					}
					for ok2 := true; ok2; ok2 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						_objPtr = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					_callbackPtr = _objPtr
				}
				(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, uintptr, uintptr, int32) int32
				}{sNextRestoreFrame}))
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = framePtr
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = contextPtr
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(Intptr_t((*CallContext)(unsafe.Pointer(contextPtr)).Findex))
				*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
				(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
				(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
			}
			(*CallContext)(unsafe.Pointer(contextPtr)).Findex = i - 1
			(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = (*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr
			return XTclNRObjectContextInvokeNext(tls, interp,
				contextPtr, objc, objv, 2)
		}
	}

	// Generate an appropriate error message, depending on whether the value
	// is on the chain but unreachable, or not on the chain at all.

	if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&CONSTRUCTOR != 0 {
		methodType = ts + 26491 /* "constructor" */
	} else if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&DESTRUCTOR != 0 {
		methodType = ts + 26503 /* "destructor" */
	} else {
		methodType = ts + 26521 /* "method" */
	}

	for i = (*CallContext)(unsafe.Pointer(contextPtr)).Findex; i >= 0; i-- {
		var miPtr uintptr = (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr(i)*24

		if !((*MInvoke)(unsafe.Pointer(miPtr)).FisFilter != 0) && (*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FdeclaringClassPtr == classPtr {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+29213,
				libc.VaList(bp+80, methodType, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
					}
					return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
				}())))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+29131, ts+29263,
				uintptr(0)))
			return TCL_ERROR
		}
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+29283,
		libc.VaList(bp+128, methodType, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+144, ts+4178, ts+29131, ts+29327, uintptr(0)))
	return TCL_ERROR
}

func sNextRestoreFrame(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOBasic.c:914:1: */
	var iPtr uintptr = interp
	var contextPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 1*8))

	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = *(*ClientData)(unsafe.Pointer(data))
	if contextPtr != uintptr(0) {
		(*CallContext)(unsafe.Pointer(contextPtr)).Findex = int32(*(*ClientData)(unsafe.Pointer(data + 2*8)))
	}
	return result
}

// ----------------------------------------------------------------------
//
// TclOOSelfObjCmd --
//
//	Implementation of the [self] command, which provides introspection of
//	the call context.
//
// ----------------------------------------------------------------------

func XTclOOSelfObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOBasic.c:941:1: */
	bp := tls.Alloc(200)
	defer tls.Free(200)

	var iPtr uintptr = interp
	var framePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	var contextPtr uintptr
	// var result [3]uintptr at bp+176, 24

	// var index int32 at bp+168, 4

	// Start with sanity checks on the calling context and the method context.

	if framePtr == uintptr(0) || !((*CallFrame)(unsafe.Pointer(framePtr)).FisProcCallFrame&FRAME_IS_METHOD != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+50768,
			libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+29131, ts+29134, uintptr(0)))
		return TCL_ERROR
	}

	contextPtr = (*CallFrame)(unsafe.Pointer(framePtr)).FclientData

	// Now we do "conventional" argument parsing for a while. Note that no
	// subcommand takes arguments.

	if objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22501)
		return TCL_ERROR
	} else if objc == 1 {
		*(*int32)(unsafe.Pointer(bp + 168 /* index */)) = 7 /* SELF_OBJECT */
	} else if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&subcmds)), int32(unsafe.Sizeof(uintptr(0))), ts+22501, 0, bp+168) != TCL_OK {
		return TCL_ERROR
	}

	switch uint32(*(*int32)(unsafe.Pointer(bp + 168 /* index */))) {
	case uint32(7) /* SELF_OBJECT */ :
		XTcl_SetObjResult(tls, interp, XTclOOObjectName(tls, interp, (*CallContext)(unsafe.Pointer(contextPtr)).FoPtr))
		return TCL_OK
	case uint32(5) /* SELF_NS */ :
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			(*Tcl_Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).FnamespacePtr)).FfullName, -1))
		return TCL_OK
	case uint32(2) /* SELF_CLASS */ :
		{
			var clsPtr uintptr = (*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr)).FdeclaringClassPtr

			if clsPtr == uintptr(0) {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+50826, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+29131, ts+50856, uintptr(0)))
				return TCL_ERROR
			}

			XTcl_SetObjResult(tls, interp, XTclOOObjectName(tls, interp, (*Class)(unsafe.Pointer(clsPtr)).FthisPtr))
			return TCL_OK

		}
	case uint32(4) /* SELF_METHOD */ :
		if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&CONSTRUCTOR != 0 {
			XTcl_SetObjResult(tls, interp, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).FfPtr)).FconstructorName)
		} else if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&DESTRUCTOR != 0 {
			XTcl_SetObjResult(tls, interp, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).FfPtr)).FdestructorName)
		} else {
			XTcl_SetObjResult(tls, interp,
				(*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr)).FnamePtr)
		}
		return TCL_OK
	case uint32(3) /* SELF_FILTER */ :
		if !((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FisFilter != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+50874, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+29131, ts+50856, uintptr(0)))
			return TCL_ERROR
		} else {
			var miPtr uintptr = (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24
			var oPtr uintptr
			var type1 uintptr

			if (*MInvoke)(unsafe.Pointer(miPtr)).FfilterDeclarer != uintptr(0) {
				oPtr = (*Class)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FfilterDeclarer)).FthisPtr
				type1 = ts + 16666 /* "class" */
			} else {
				oPtr = (*CallContext)(unsafe.Pointer(contextPtr)).FoPtr
				type1 = ts + 19320 /* "object" */
			}

			*(*uintptr)(unsafe.Pointer(bp + 176)) = XTclOOObjectName(tls, interp, oPtr)
			*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)) = XTcl_NewStringObj(tls, type1, -1)
			*(*uintptr)(unsafe.Pointer(bp + 176 + 2*8)) = (*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FnamePtr
			XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 3, bp+176))
			return TCL_OK
		}
		fallthrough
	case uint32(1) /* SELF_CALLER */ :
		if (*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr == uintptr(0) || !((*CallFrame1)(unsafe.Pointer((*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr)).FisProcCallFrame&FRAME_IS_METHOD != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+50905, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+4178, ts+29131, ts+29134, uintptr(0)))
			return TCL_ERROR
		} else {
			var callerPtr uintptr = (*CallFrame1)(unsafe.Pointer((*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr)).FclientData
			var mPtr uintptr = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(callerPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(callerPtr)).Findex)*24)).FmPtr
			var declarerPtr uintptr

			if (*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr != uintptr(0) {
				declarerPtr = (*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).FthisPtr
			} else if (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr != uintptr(0) {
				declarerPtr = (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr
			} else {
				// This should be unreachable code.

				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+50929, -1))
				return TCL_ERROR
			}

			*(*uintptr)(unsafe.Pointer(bp + 176)) = XTclOOObjectName(tls, interp, declarerPtr)
			*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)) = XTclOOObjectName(tls, interp, (*CallContext)(unsafe.Pointer(callerPtr)).FoPtr)
			if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(callerPtr)).FcallPtr)).Fflags&CONSTRUCTOR != 0 {
				*(*uintptr)(unsafe.Pointer(bp + 176 + 2*8)) = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(declarerPtr)).FfPtr)).FconstructorName
			} else if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(callerPtr)).FcallPtr)).Fflags&DESTRUCTOR != 0 {
				*(*uintptr)(unsafe.Pointer(bp + 176 + 2*8)) = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(declarerPtr)).FfPtr)).FdestructorName
			} else {
				*(*uintptr)(unsafe.Pointer(bp + 176 + 2*8)) = (*Method)(unsafe.Pointer(mPtr)).FnamePtr
			}
			XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 3, bp+176))
			return TCL_OK
		}
		fallthrough
	case uint32(6) /* SELF_NEXT */ :
		if (*CallContext)(unsafe.Pointer(contextPtr)).Findex < (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain-1 {
			var mPtr uintptr = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex+1)*24)).FmPtr
			var declarerPtr uintptr

			if (*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr != uintptr(0) {
				declarerPtr = (*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).FthisPtr
			} else if (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr != uintptr(0) {
				declarerPtr = (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr
			} else {
				// This should be unreachable code.

				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+50929, -1))
				return TCL_ERROR
			}

			*(*uintptr)(unsafe.Pointer(bp + 176)) = XTclOOObjectName(tls, interp, declarerPtr)
			if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&CONSTRUCTOR != 0 {
				*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)) = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(declarerPtr)).FfPtr)).FconstructorName
			} else if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&DESTRUCTOR != 0 {
				*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)) = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(declarerPtr)).FfPtr)).FdestructorName
			} else {
				*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)) = (*Method)(unsafe.Pointer(mPtr)).FnamePtr
			}
			XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 2, bp+176))
		}
		return TCL_OK
	case uint32(8) /* SELF_TARGET */ :
		if !((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FisFilter != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+50874, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+136, ts+4178, ts+29131, ts+50856, uintptr(0)))
			return TCL_ERROR
		} else {
			var mPtr uintptr
			var declarerPtr uintptr
			var i int32

			for i = (*CallContext)(unsafe.Pointer(contextPtr)).Findex; i < (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain; i++ {
				if !((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr(i)*24)).FisFilter != 0) {
					break
				}
			}
			if i == (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain {
				XTcl_Panic(tls, ts+50954, 0)
			}
			mPtr = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr(i)*24)).FmPtr
			if (*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr != uintptr(0) {
				declarerPtr = (*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).FthisPtr
			} else if (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr != uintptr(0) {
				declarerPtr = (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr
			} else {
				// This should be unreachable code.

				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+50929, -1))
				return TCL_ERROR
			}
			*(*uintptr)(unsafe.Pointer(bp + 176)) = XTclOOObjectName(tls, interp, declarerPtr)
			*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)) = (*Method)(unsafe.Pointer(mPtr)).FnamePtr
			XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 2, bp+176))
			return TCL_OK
		}
		fallthrough
	case uint32(0) /* SELF_CALL */ :
		*(*uintptr)(unsafe.Pointer(bp + 176)) = XTclOORenderCallChain(tls, interp, (*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)))).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)))).Fbytes = uintptr(0)
			*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)) + 32)) = int32((*CallContext)(unsafe.Pointer(contextPtr)).Findex)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176 + 1*8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
			{
			}
		}
		XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 2, bp+176))
		return TCL_OK
	}
	return TCL_ERROR
}

var subcmds = [10]uintptr{
	ts + 51003, ts + 51008, ts + 16666, ts + 23753, ts + 26521, ts + 19385, ts + 23074,
	ts + 19320, ts + 42529, uintptr(0),
} /* tclOOBasic.c:947:23 */

// ----------------------------------------------------------------------
//
// CopyObjectCmd --
//
//	Implementation of the [oo::copy] command, which clones an object (but
//	not its namespace). Note that no constructors are called during this
//	process.
//
// ----------------------------------------------------------------------

func XTclOOCopyObjectCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOBasic.c:1178:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var oPtr Tcl_Object
	var o2Ptr Tcl_Object

	if objc < 2 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+51015)
		return TCL_ERROR
	}

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Create a cloned object of the correct class. Note that constructors are
	// not called. Also note that we must resolve the object name ourselves
	// because we do not want to create the object in the current namespace,
	// but rather in the context of the namespace of the caller of the overall
	// [oo::define] command.

	if objc == 2 {
		o2Ptr = XTcl_CopyObjectInstance(tls, interp, oPtr, uintptr(0), uintptr(0))
	} else {
		var name uintptr
		var namespaceName uintptr

		name = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}()
		if int32(*(*int8)(unsafe.Pointer(name))) == 0 {
			name = uintptr(0)
		}

		// Choose a unique namespace name if the user didn't supply one.

		namespaceName = uintptr(0)
		if objc == 4 {
			namespaceName = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
			}()

			if int32(*(*int8)(unsafe.Pointer(namespaceName))) == 0 {
				namespaceName = uintptr(0)
			} else if XTcl_FindNamespace(tls, interp, namespaceName, uintptr(0),
				0) != uintptr(0) {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+51057, libc.VaList(bp, namespaceName)))
				return TCL_ERROR
			}
		}

		o2Ptr = XTcl_CopyObjectInstance(tls, interp, oPtr, name, namespaceName)
	}

	if o2Ptr == uintptr(0) {
		return TCL_ERROR
	}

	// Return the name of the cloned object.

	XTcl_SetObjResult(tls, interp, XTclOOObjectName(tls, interp, o2Ptr))
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// !END!: Do not edit above this line.

// Alternatives to Tcl_Preserve/Tcl_EventuallyFree/Tcl_Release.

// A convenience macro for iterating through the lists used in the internal
// memory management of objects.
// REQUIRES DECLARATION: int i;

// Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS
// sets up the declarations needed for the main macro, FOREACH_HASH, which
// does the actual iteration. FOREACH_HASH_VALUE is a restricted version that
// only iterates over values.

// Convenience macro for duplicating a list. Needs no external declaration,
// but all arguments are used multiple times and so must have no side effects.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Structure containing a CallContext and any other values needed only during
// the construction of the CallContext.

type ChainBuilder = struct {
	FcallChainPtr uintptr
	FfilterLength int32
	F__ccgo_pad1  [4]byte
	FoPtr         uintptr
} /* tclOOCall.c:24:1 */

// Object type used to manage type caches attached to method names.

var methodNameType = Tcl_ObjType{
	Fname:           ts + 51092,
	FfreeIntRepProc: 0,
	FdupIntRepProc:  0,
} /* tclOOCall.c:86:26 */

// ----------------------------------------------------------------------
//
// TclOODeleteContext --
//
//	Destroys a method call-chain context, which should not be in use.
//
// ----------------------------------------------------------------------

func XTclOODeleteContext(tls *libc.TLS, contextPtr uintptr) { /* tclOOCall.c:105:1: */
	var oPtr uintptr = (*CallContext)(unsafe.Pointer(contextPtr)).FoPtr

	XTclOODeleteChain(tls, (*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)
	if oPtr != uintptr(0) {
		XTclStackFree(tls, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Finterp, contextPtr)

		// Corresponding AddRef() in TclOO.c/TclOOObjectCmdCore

		XTclOODecrRefCount(tls, oPtr)
	}
}

// ----------------------------------------------------------------------
//
// TclOODeleteChainCache --
//
//	Destroy the cache of method call-chains.
//
// ----------------------------------------------------------------------

func XTclOODeleteChainCache(tls *libc.TLS, tablePtr uintptr) { /* tclOOCall.c:133:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var hPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	var callPtr uintptr

	for hPtr = XTcl_FirstHashEntry(tls, tablePtr, bp); func() int32 {
		if hPtr != uintptr(0) {
			return func() int32 { callPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData; return 1 }()
		}
		return 0
	}() != 0; hPtr = XTcl_NextHashEntry(tls, bp) {
		if callPtr != 0 {
			XTclOODeleteChain(tls, callPtr)
		}
	}
	XTcl_DeleteHashTable(tls, tablePtr)
	XTclpFree(tls, tablePtr)
}

// ----------------------------------------------------------------------
//
// TclOODeleteChain --
//
//	Destroys a method call-chain.
//
// ----------------------------------------------------------------------

func XTclOODeleteChain(tls *libc.TLS, callPtr uintptr) { /* tclOOCall.c:159:1: */
	if callPtr == uintptr(0) || libc.PostDecInt32(&(*CallChain)(unsafe.Pointer(callPtr)).FrefCount, 1) > 1 {
		return
	}
	if (*CallChain)(unsafe.Pointer(callPtr)).Fchain != callPtr+32 {
		XTclpFree(tls, (*CallChain)(unsafe.Pointer(callPtr)).Fchain)
	}
	XTclpFree(tls, callPtr)
}

// ----------------------------------------------------------------------
//
// TclOOStashContext --
//
//	Saves a reference to a method call context in a Tcl_Obj's internal
//	representation.
//
// ----------------------------------------------------------------------

func sStashCallChain(tls *libc.TLS, objPtr uintptr, callPtr uintptr) { /* tclOOCall.c:183:1: */
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0) {
		XTcl_GetString(tls, objPtr)
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&methodNameType))
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = callPtr
}

func XTclOOStashContext(tls *libc.TLS, objPtr uintptr, contextPtr uintptr) { /* tclOOCall.c:195:1: */
	sStashCallChain(tls, objPtr, (*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)
}

// ----------------------------------------------------------------------
//
// DupMethodNameRep, FreeMethodNameRep --
//
//	Functions to implement the required parts of the Tcl_Obj guts needed
//	for caching of method contexts in Tcl_Objs.
//
// ----------------------------------------------------------------------

func sDupMethodNameRep(tls *libc.TLS, srcPtr uintptr, dstPtr uintptr) { /* tclOOCall.c:214:1: */
	var callPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))

	(*Tcl_Obj)(unsafe.Pointer(dstPtr)).FtypePtr = uintptr(unsafe.Pointer(&methodNameType))
	*(*uintptr)(unsafe.Pointer(dstPtr + 32)) = callPtr
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
}

func sFreeMethodNameRep(tls *libc.TLS, objPtr uintptr) { /* tclOOCall.c:226:1: */
	var callPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	XTclOODeleteChain(tls, callPtr)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

// ----------------------------------------------------------------------
//
// TclOOInvokeContext --
//
//	Invokes a single step along a method call-chain context. Note that the
//	invocation of a step along the chain can cause further steps along the
//	chain to be invoked. Note that this function is written to be as light
//	in stack usage as possible.
//
// ----------------------------------------------------------------------

func XTclOOInvokeContext(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOCall.c:249:1: */
	var contextPtr uintptr = clientData
	var mPtr uintptr = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr
	var isFilter int32 = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FisFilter

	// If this is the first step along the chain, we preserve the method
	// entries in the chain so that they do not get deleted out from under our
	// feet.

	if (*CallContext)(unsafe.Pointer(contextPtr)).Findex == 0 {
		var i int32

		for i = 0; i < (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain; i++ {
			(*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr(i)*24)).FmPtr)).FrefCount++
		}

		// Ensure that the method name itself is part of the arguments when
		// we're doing unknown processing.

		if (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&OO_UNKNOWN_METHOD != 0 {
			(*CallContext)(unsafe.Pointer(contextPtr)).Fskip--
		}

		// Add a callback to ensure that method references are dropped once
		// this call is finished.

		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sFinalizeMethodRefs}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = contextPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}

	// Save whether we were in a filter and set up whether we are now.

	if (*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).Fflags&FILTER_HANDLING != 0 {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _callbackPtr uintptr
			for ok4 := true; ok4; ok4 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok5 := true; ok5; ok5 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sSetFilterFlags}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = contextPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	} else {
		for ok6 := true; ok6; ok6 = 0 != 0 {
			var _callbackPtr uintptr
			for ok7 := true; ok7; ok7 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok8 := true; ok8; ok8 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sResetFilterFlags}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = contextPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}
	if isFilter != 0 || (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&FILTER_HANDLING != 0 {
		*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr + 92)) |= FILTER_HANDLING
	} else {
		*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr + 92)) &= libc.CplInt32(FILTER_HANDLING)
	}

	// Run the method implementation.

	return (*struct {
		f func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FcallProc})).f(tls, (*Method)(unsafe.Pointer(mPtr)).FclientData, interp,
		contextPtr, objc, objv)
}

func sSetFilterFlags(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOCall.c:318:1: */
	var contextPtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr + 92)) |= FILTER_HANDLING
	return result
}

func sResetFilterFlags(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOCall.c:330:1: */
	var contextPtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	*(*int32)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr + 92)) &= libc.CplInt32(FILTER_HANDLING)
	return result
}

func sFinalizeMethodRefs(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOCall.c:342:1: */
	var contextPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var i int32

	for i = 0; i < (*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).FnumChain; i++ {
		XTclOODelMethodRef(tls, (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr(i)*24)).FmPtr)
	}
	return result
}

// ----------------------------------------------------------------------
//
// TclOOGetSortedMethodList, TclOOGetSortedClassMethodList --
//
//	Discovers the list of method names supported by an object or class.
//
// ----------------------------------------------------------------------

func XTclOOGetSortedMethodList(tls *libc.TLS, oPtr uintptr, flags int32, stringsPtr uintptr) int32 { /* tclOOCall.c:367:1: */
	bp := tls.Alloc(208)
	defer tls.Free(208)

	// var names Tcl_HashTable at bp, 88
	// Tcl_Obj* method name to "wanted in list"
	// mapping.
	// var examinedClasses Tcl_HashTable at bp+88, 88

	// Used to track what classes have been looked
	// at. Is set-like in nature and keyed by
	// pointer to class.
	var hPtr uintptr
	// var search Tcl_HashSearch at bp+176, 24

	var i int32
	var mixinPtr uintptr
	var namePtr uintptr
	var mPtr uintptr
	var isWantedIn int32
	var isWanted uintptr

	XTcl_InitObjHashTable(tls, bp)
	XTcl_InitHashTable(tls, bp+88, 1)

	// Name the bits used in the names table values.

	// Process method names due to the object.

	if (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr != 0 {
		for hPtr = XTcl_FirstHashEntry(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, bp+176); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					namePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+176) {
			// var isNew int32 at bp+200, 4

			if (*Method)(unsafe.Pointer(mPtr)).Fflags&PRIVATE_METHOD != 0 && !(flags&PRIVATE_METHOD != 0) {
				continue
			}
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &names */)).FcreateProc})).f(tls, bp /* &names */, namePtr, bp+200 /* &isNew */)
			if *(*int32)(unsafe.Pointer(bp + 200)) != 0 {
				isWantedIn = func() int32 {
					if !(flags&PUBLIC_METHOD != 0) ||
						(*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD != 0 {
						return 1
					}
					return 0
				}()
				isWantedIn = isWantedIn | func() int32 {
					if (*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(0) {
						return NO_IMPLEMENTATION
					}
					return 0
				}()
				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(Intptr_t(isWantedIn))
			}
		}
	}

	// Process method names due to private methods on the object's class.

	if flags&PRIVATE_METHOD != 0 {
		for hPtr = XTcl_FirstHashEntry(tls, (*Object)(unsafe.Pointer(oPtr)).FselfCls+112, bp+176); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					namePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls+112)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls+112)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+176) {
			if (*Method)(unsafe.Pointer(mPtr)).Fflags&PRIVATE_METHOD != 0 {
				// var isNew int32 at bp+204, 4

				hPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &names */)).FcreateProc})).f(tls, bp /* &names */, namePtr, bp+204 /* &isNew */)
				if *(*int32)(unsafe.Pointer(bp + 204)) != 0 {
					isWantedIn = /* IN_LIST */ 1
					if (*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(0) {
						isWantedIn = isWantedIn | NO_IMPLEMENTATION
					}
					(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(Intptr_t(isWantedIn))
				} else if (*Method)(unsafe.Pointer(mPtr)).FtypePtr != uintptr(0) {
					isWantedIn = int32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
					if isWantedIn&NO_IMPLEMENTATION != 0 {
						isWantedIn = isWantedIn & libc.CplInt32(NO_IMPLEMENTATION)
						(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(Intptr_t(isWantedIn))
					}
				}
			}
		}
	}

	// Process (normal) method names from the class hierarchy and the mixin
	// hierarchy.

	sAddClassMethodNames(tls, (*Object)(unsafe.Pointer(oPtr)).FselfCls, flags, bp, bp+88)
	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			sAddClassMethodNames(tls, mixinPtr, flags|TRAVERSED_MIXIN, bp,
				bp+88)
		}
	}

	XTcl_DeleteHashTable(tls, bp+88)

	// See how many (visible) method names there are. If none, we do not (and
	// should not) try to sort the list of them.

	i = 0
	if (*Tcl_HashTable)(unsafe.Pointer(bp)).FnumEntries != 0 {
		var strings uintptr

		// We need to build the list of methods to sort. We will be using
		// qsort() for this, because it is very unlikely that the list will be
		// heavily sorted when it is long enough to matter.

		strings = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Tcl_HashTable)(unsafe.Pointer(bp)).FnumEntries)))
		for hPtr = XTcl_FirstHashEntry(tls, bp, bp+176); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					namePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer(bp)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(bp)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					isWanted = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+176) {
			if !(flags&PUBLIC_METHOD != 0) || int32(isWanted)&1 != 0 {
				if int32(isWanted)&NO_IMPLEMENTATION != 0 {
					continue
				}
				*(*uintptr)(unsafe.Pointer(strings + uintptr(libc.PostIncInt32(&i, 1))*8)) = func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes
					}
					return XTcl_GetString(tls, namePtr)
				}()
			}
		}

		// Note that 'i' may well be less than names.numEntries when we are
		// dealing with public method names.

		if i > 0 {
			if i > 1 {
				libc.Xqsort(tls, strings, uint64(i), uint64(unsafe.Sizeof(uintptr(0))), *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, uintptr, uintptr) int32
				}{sCmpStr})))
			}
			*(*uintptr)(unsafe.Pointer(stringsPtr)) = strings
		} else {
			XTclpFree(tls, strings)
		}
	}

	XTcl_DeleteHashTable(tls, bp)
	return i
}

func XTclOOGetSortedClassMethodList(tls *libc.TLS, clsPtr uintptr, flags int32, stringsPtr uintptr) int32 { /* tclOOCall.c:503:1: */
	bp := tls.Alloc(200)
	defer tls.Free(200)

	// var names Tcl_HashTable at bp, 88
	// Tcl_Obj* method name to "wanted in list"
	// mapping.
	// var examinedClasses Tcl_HashTable at bp+88, 88

	// Used to track what classes have been looked
	// at. Is set-like in nature and keyed by
	// pointer to class.
	var hPtr uintptr
	// var search Tcl_HashSearch at bp+176, 24

	var i int32
	var namePtr uintptr
	var isWanted uintptr

	XTcl_InitObjHashTable(tls, bp)
	XTcl_InitHashTable(tls, bp+88, 1)

	// Process method names from the class hierarchy and the mixin hierarchy.

	sAddClassMethodNames(tls, clsPtr, flags, bp, bp+88)
	XTcl_DeleteHashTable(tls, bp+88)

	// See how many (visible) method names there are. If none, we do not (and
	// should not) try to sort the list of them.

	i = 0
	if (*Tcl_HashTable)(unsafe.Pointer(bp)).FnumEntries != 0 {
		var strings uintptr

		// We need to build the list of methods to sort. We will be using
		// qsort() for this, because it is very unlikely that the list will be
		// heavily sorted when it is long enough to matter.

		strings = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Tcl_HashTable)(unsafe.Pointer(bp)).FnumEntries)))
		for hPtr = XTcl_FirstHashEntry(tls, bp, bp+176); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					namePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer(bp)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(bp)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					isWanted = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+176) {
			if !(flags&PUBLIC_METHOD != 0) || int32(isWanted)&1 != 0 {
				if int32(isWanted)&NO_IMPLEMENTATION != 0 {
					continue
				}
				*(*uintptr)(unsafe.Pointer(strings + uintptr(libc.PostIncInt32(&i, 1))*8)) = func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes
					}
					return XTcl_GetString(tls, namePtr)
				}()
			}
		}

		// Note that 'i' may well be less than names.numEntries when we are
		// dealing with public method names.

		if i > 0 {
			if i > 1 {
				libc.Xqsort(tls, strings, uint64(i), uint64(unsafe.Sizeof(uintptr(0))), *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, uintptr, uintptr) int32
				}{sCmpStr})))
			}
			*(*uintptr)(unsafe.Pointer(stringsPtr)) = strings
		} else {
			XTclpFree(tls, strings)
		}
	}

	XTcl_DeleteHashTable(tls, bp)
	return i
}

// Comparator for GetSortedMethodList

func sCmpStr(tls *libc.TLS, ptr1 uintptr, ptr2 uintptr) int32 { /* tclOOCall.c:580:1: */
	var strPtr1 uintptr = ptr1
	var strPtr2 uintptr = ptr2

	return XTclpUtfNcmp2(tls, *(*uintptr)(unsafe.Pointer(strPtr1)), *(*uintptr)(unsafe.Pointer(strPtr2)), uint32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(strPtr1)))+uint64(1)))
}

// ----------------------------------------------------------------------
//
// AddClassMethodNames --
//
//	Adds the method names defined by a class (or its superclasses) to the
//	collection being built. The collection is built in a hash table to
//	ensure that duplicates are excluded. Helper for GetSortedMethodList().
//
// ----------------------------------------------------------------------

func sAddClassMethodNames(tls *libc.TLS, clsPtr uintptr, flags int32, namesPtr uintptr, examinedClassesPtr uintptr) { /* tclOOCall.c:603:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// If we've already started looking at this class, stop working on it now
	// to prevent repeated work.

	if (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(examinedClassesPtr)).FfindProc})).f(tls, examinedClassesPtr, clsPtr) != 0 {
		return
	}

	// Scope all declarations so that the compiler can stand a good chance of
	// making the recursive step highly efficient. We also hand-implement the
	// tail-recursive case using a while loop; C compilers typically cannot do
	// tail-recursion optimization usefully.

	for 1 != 0 {
		var hPtr uintptr
		// var search Tcl_HashSearch at bp+8, 24

		var namePtr uintptr
		var mPtr uintptr
		// var isNew int32 at bp, 4

		(*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(examinedClassesPtr)).FcreateProc})).f(tls, examinedClassesPtr, clsPtr, bp /* &isNew */)
		if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
			break
		}

		if (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Fnum != 0 {
			var mixinPtr uintptr
			var i int32

			for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Fnum; i++ {
				if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
					continue
				} else if func() bool {
					mixinPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist + uintptr(i)*8))
					return 1 != 0
				}() {
					if mixinPtr != clsPtr {
						sAddClassMethodNames(tls, mixinPtr, flags|TRAVERSED_MIXIN,
							namesPtr, examinedClassesPtr)
					}
				}
			}
		}

		for hPtr = XTcl_FirstHashEntry(tls, clsPtr+112, bp+8); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					namePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer(clsPtr+112)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(clsPtr+112)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+8) {
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(namesPtr)).FcreateProc})).f(tls, namesPtr, namePtr, bp /* &isNew */)
			if *(*int32)(unsafe.Pointer(bp)) != 0 {
				var isWanted int32
				if !(flags&PUBLIC_METHOD != 0) ||
					(*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD != 0 {
					isWanted = /* IN_LIST */ 1
				} else {
					isWanted = 0
				}

				isWanted = isWanted | func() int32 {
					if (*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(0) {
						return NO_IMPLEMENTATION
					}
					return 0
				}()
				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(Intptr_t(isWanted))
			} else if int32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)&NO_IMPLEMENTATION != 0 &&
				(*Method)(unsafe.Pointer(mPtr)).FtypePtr != uintptr(0) {
				var isWanted int32 = int32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)

				isWanted = isWanted & libc.CplInt32(NO_IMPLEMENTATION)
				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(Intptr_t(isWanted))
			}
		}

		if (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum != 1 {
			break
		}
		clsPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist))
	}
	if (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum != 0 {
		var superPtr uintptr
		var i int32

		for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				superPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				sAddClassMethodNames(tls, superPtr, flags, namesPtr,
					examinedClassesPtr)
			}
		}
	}
}

// ----------------------------------------------------------------------
//
// AddSimpleChainToCallContext --
//
//	The core of the call-chain construction engine, this handles calling a
//	particular method on a particular object. Note that filters and
//	unknown handling are already handled by the logic that uses this
//	function.
//
// ----------------------------------------------------------------------

func sAddSimpleChainToCallContext(tls *libc.TLS, oPtr uintptr, methodNameObj uintptr, cbPtr uintptr, doneFilters uintptr, flags int32, filterDecl uintptr) { /* tclOOCall.c:707:1: */
	var i int32

	if !(flags&(DEFINITE_PROTECTED|DEFINITE_PUBLIC|(CONSTRUCTOR|DESTRUCTOR|FORCE_UNKNOWN)) != 0) && (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr != 0 {
		var hPtr uintptr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, methodNameObj)

		if hPtr != uintptr(0) {
			var mPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

			if flags&PUBLIC_METHOD != 0 {
				if !((*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD != 0) {
					return
				} else {
					flags = flags | DEFINITE_PUBLIC
				}
			} else {
				flags = flags | DEFINITE_PROTECTED
			}
		}
	}
	if !(flags&(CONSTRUCTOR|DESTRUCTOR|FORCE_UNKNOWN) != 0) {
		var hPtr uintptr
		var mixinPtr uintptr

		for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				sAddSimpleClassChainToCallContext(tls, mixinPtr, methodNameObj, cbPtr,
					doneFilters, flags|TRAVERSED_MIXIN, filterDecl)
			}
		}
		if (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr != 0 {
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, methodNameObj)
			if hPtr != uintptr(0) {
				sAddMethodToCallChain(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData, cbPtr,
					doneFilters, filterDecl, flags)
			}
		}
	}
	sAddSimpleClassChainToCallContext(tls, (*Object)(unsafe.Pointer(oPtr)).FselfCls, methodNameObj, cbPtr,
		doneFilters, flags, filterDecl)
}

// ----------------------------------------------------------------------
//
// AddMethodToCallChain --
//
//	Utility method that manages the adding of a particular method
//	implementation to a call-chain.
//
// ----------------------------------------------------------------------

func sAddMethodToCallChain(tls *libc.TLS, mPtr uintptr, cbPtr uintptr, doneFilters uintptr, filterDecl uintptr, flags int32) { /* tclOOCall.c:774:1: */
	var callPtr uintptr = (*ChainBuilder)(unsafe.Pointer(cbPtr)).FcallChainPtr
	var i int32

	// Return if this is just an entry used to record whether this is a public
	// method. If so, there's nothing real to call and so nothing to add to
	// the call chain.
	//
	// This is also where we enforce mixin-consistency.

	if mPtr == uintptr(0) || (*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(0) || !(flags&OBJECT_MIXIN != 0 || libc.BoolInt32(!(flags&BUILDING_MIXINS != 0)) == libc.BoolInt32(!(flags&TRAVERSED_MIXIN != 0))) {
		return
	}

	// Enforce real private method handling here. We will skip adding this
	// method IF
	//  1) we are not allowing private methods, AND
	//  2) this is a private method, AND
	//  3) this is a class method, AND
	//  4) this method was not declared by the class of the current object.
	//
	// This does mean that only classes really handle private methods. This
	// should be sufficient for [incr Tcl] support though.

	if !((*CallChain)(unsafe.Pointer(callPtr)).Fflags&PRIVATE_METHOD != 0) &&
		(*Method)(unsafe.Pointer(mPtr)).Fflags&PRIVATE_METHOD != 0 &&
		(*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr != uintptr(0) &&
		(*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr != (*Object)(unsafe.Pointer((*ChainBuilder)(unsafe.Pointer(cbPtr)).FoPtr)).FselfCls {
		return
	}

	// First test whether the method is already in the call chain. Skip over
	// any leading filters.

	for i = (*ChainBuilder)(unsafe.Pointer(cbPtr)).FfilterLength; i < (*CallChain)(unsafe.Pointer(callPtr)).FnumChain; i++ {
		if (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain+uintptr(i)*24)).FmPtr == mPtr && (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain+uintptr(i)*24)).FisFilter == libc.Bool32(doneFilters != uintptr(0)) {
			// Call chain semantics states that methods come as *late* in the
			// call chain as possible. This is done by copying down the
			// following methods. Note that this does not change the number of
			// method invocations in the call chain; it just rearranges them.

			var declCls uintptr = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i)*24)).FfilterDeclarer

			for ; i+1 < (*CallChain)(unsafe.Pointer(callPtr)).FnumChain; i++ {
				*(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i)*24)) = *(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i+1)*24))
			}
			(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i)*24)).FmPtr = mPtr
			(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i)*24)).FisFilter = libc.Bool32(doneFilters != uintptr(0))
			(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i)*24)).FfilterDeclarer = declCls
			return
		}
	}

	// Need to really add the method. This is made a bit more complex by the
	// fact that we are using some "static" space initially, and only start
	// realloc-ing if the chain gets long.

	if (*CallChain)(unsafe.Pointer(callPtr)).FnumChain == CALL_CHAIN_STATIC_SIZE {
		(*CallChain)(unsafe.Pointer(callPtr)).Fchain = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(MInvoke{}))*uint64((*CallChain)(unsafe.Pointer(callPtr)).FnumChain+1)))
		libc.Xmemcpy(tls, (*CallChain)(unsafe.Pointer(callPtr)).Fchain, callPtr+32,
			uint64(unsafe.Sizeof(MInvoke{}))*uint64((*CallChain)(unsafe.Pointer(callPtr)).FnumChain))
	} else if (*CallChain)(unsafe.Pointer(callPtr)).FnumChain > CALL_CHAIN_STATIC_SIZE {
		(*CallChain)(unsafe.Pointer(callPtr)).Fchain = XTcl_Realloc(tls, (*CallChain)(unsafe.Pointer(callPtr)).Fchain, uint32(uint64(unsafe.Sizeof(MInvoke{}))*uint64((*CallChain)(unsafe.Pointer(callPtr)).FnumChain+1)))
	}
	(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i)*24)).FmPtr = mPtr
	(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i)*24)).FisFilter = libc.Bool32(doneFilters != uintptr(0))
	(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i)*24)).FfilterDeclarer = filterDecl
	(*CallChain)(unsafe.Pointer(callPtr)).FnumChain++
}

// ----------------------------------------------------------------------
//
// InitCallChain --
//	Encoding of the policy of how to set up a call chain. Doesn't populate
//	the chain with the method implementation data.
//
// ----------------------------------------------------------------------

func sInitCallChain(tls *libc.TLS, callPtr uintptr, oPtr uintptr, flags int32) { /* tclOOCall.c:888:1: */
	(*CallChain)(unsafe.Pointer(callPtr)).Fflags = flags & (PUBLIC_METHOD | PRIVATE_METHOD | (CONSTRUCTOR | DESTRUCTOR | FORCE_UNKNOWN) | FILTER_HANDLING)
	if (*Object)(unsafe.Pointer(oPtr)).Fflags&USE_CLASS_CACHE != 0 {
		oPtr = (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FthisPtr
		*(*int32)(unsafe.Pointer(callPtr + 12)) |= USE_CLASS_CACHE
	}
	(*CallChain)(unsafe.Pointer(callPtr)).Fepoch = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Fepoch
	(*CallChain)(unsafe.Pointer(callPtr)).FobjectCreationEpoch = (*Object)(unsafe.Pointer(oPtr)).FcreationEpoch
	(*CallChain)(unsafe.Pointer(callPtr)).FobjectEpoch = (*Object)(unsafe.Pointer(oPtr)).Fepoch
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount = 1
	(*CallChain)(unsafe.Pointer(callPtr)).FnumChain = 0
	(*CallChain)(unsafe.Pointer(callPtr)).Fchain = callPtr + 32 /* &.staticChain */
}

// ----------------------------------------------------------------------
//
// IsStillValid --
//	Calculates whether the given call chain can be used for executing a
//	method for the given object. The condition on a chain from a cached
//	location being reusable is:
//	- Refers to the same object (same creation epoch), and
//	- Still across the same class structure (same global epoch), and
//	- Still across the same object strucutre (same local epoch), and
//	- No public/private/filter magic leakage (same flags, modulo the fact
//	  that a public chain will satisfy a non-public call).
//
// ----------------------------------------------------------------------

func sIsStillValid(tls *libc.TLS, callPtr uintptr, oPtr uintptr, flags int32, mask int32) int32 { /* tclOOCall.c:924:1: */
	if (*Object)(unsafe.Pointer(oPtr)).Fflags&USE_CLASS_CACHE != 0 {
		oPtr = (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FthisPtr
		flags = flags | USE_CLASS_CACHE
	}
	return libc.Bool32((*CallChain)(unsafe.Pointer(callPtr)).FobjectCreationEpoch == (*Object)(unsafe.Pointer(oPtr)).FcreationEpoch &&
		(*CallChain)(unsafe.Pointer(callPtr)).Fepoch == (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Fepoch &&
		(*CallChain)(unsafe.Pointer(callPtr)).FobjectEpoch == (*Object)(unsafe.Pointer(oPtr)).Fepoch &&
		(*CallChain)(unsafe.Pointer(callPtr)).Fflags&mask == flags&mask)
}

// ----------------------------------------------------------------------
//
// TclOOGetCallContext --
//
//	Responsible for constructing the call context, an ordered list of all
//	method implementations to be called as part of a method invocation.
//	This method is central to the whole operation of the OO system.
//
// ----------------------------------------------------------------------

func XTclOOGetCallContext(tls *libc.TLS, oPtr uintptr, methodNameObj uintptr, flags int32, cacheInThisObj uintptr) uintptr { /* tclOOCall.c:952:13: */
	bp := tls.Alloc(116)
	defer tls.Free(116)

	var contextPtr uintptr
	var callPtr uintptr
	// var cb ChainBuilder at bp, 24

	// var i int32 at bp+112, 4

	var count int32
	var doFilters int32
	var hPtr uintptr
	// var doneFilters Tcl_HashTable at bp+24, 88

	// Check if we can get the chain out of the Tcl_Obj method name or out
	// of the cache. This is made a bit more complex by the fact that
	// there are multiple different layers of cache (in the Tcl_Obj, in
	// the object, and in the class).

	var reuseMask int32
	var filterObj uintptr
	var mixinPtr uintptr

	if !(cacheInThisObj == uintptr(0)) {
		goto __1
	}
	cacheInThisObj = methodNameObj
__1:
	;
	if !(flags&(CONSTRUCTOR|DESTRUCTOR|FORCE_UNKNOWN|FILTER_HANDLING) != 0 || (*Object)(unsafe.Pointer(oPtr)).Fflags&FILTER_HANDLING != 0) {
		goto __2
	}
	hPtr = uintptr(0)
	doFilters = 0

	// Check if we have a cached valid constructor or destructor.

	if !(flags&CONSTRUCTOR != 0) {
		goto __4
	}
	callPtr = (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FconstructorChainPtr
	if !(callPtr != uintptr(0) &&
		(*CallChain)(unsafe.Pointer(callPtr)).FobjectEpoch == (*Object)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FthisPtr)).Fepoch &&
		(*CallChain)(unsafe.Pointer(callPtr)).Fepoch == (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Fepoch) {
		goto __6
	}
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
	goto returnContext
__6:
	;
	goto __5
__4:
	if !(flags&DESTRUCTOR != 0) {
		goto __7
	}
	callPtr = (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FdestructorChainPtr
	if !((*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum == 0 && callPtr != uintptr(0) &&
		(*CallChain)(unsafe.Pointer(callPtr)).FobjectEpoch == (*Object)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FthisPtr)).Fepoch &&
		(*CallChain)(unsafe.Pointer(callPtr)).Fepoch == (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Fepoch) {
		goto __8
	}
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
	goto returnContext
__8:
	;
__7:
	;
__5:
	;
	goto __3
__2:
	// Check if we can get the chain out of the Tcl_Obj method name or out
	// of the cache. This is made a bit more complex by the fact that
	// there are multiple different layers of cache (in the Tcl_Obj, in
	// the object, and in the class).

	reuseMask = func() int32 {
		if flags&PUBLIC_METHOD != 0 {
			return libc.CplInt32(0)
		}
		return libc.CplInt32(PUBLIC_METHOD)
	}()

	if !((*Tcl_Obj)(unsafe.Pointer(cacheInThisObj)).FtypePtr == uintptr(unsafe.Pointer(&methodNameType))) {
		goto __9
	}
	callPtr = *(*uintptr)(unsafe.Pointer(cacheInThisObj + 32))
	if !(sIsStillValid(tls, callPtr, oPtr, flags, reuseMask) != 0) {
		goto __10
	}
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
	goto returnContext
__10:
	;
	sFreeMethodNameRep(tls, cacheInThisObj)
__9:
	;

	if !((*Object)(unsafe.Pointer(oPtr)).Fflags&USE_CLASS_CACHE != 0) {
		goto __11
	}
	if !((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FclassChainCache != uintptr(0)) {
		goto __13
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FclassChainCache)).FfindProc})).f(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FclassChainCache, methodNameObj)
	goto __14
__13:
	hPtr = uintptr(0)
__14:
	;
	goto __12
__11:
	if !((*Object)(unsafe.Pointer(oPtr)).FchainCache != uintptr(0)) {
		goto __15
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FchainCache)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FchainCache, methodNameObj)
	goto __16
__15:
	hPtr = uintptr(0)
__16:
	;
__12:
	;

	if !(hPtr != uintptr(0) && (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData != uintptr(0)) {
		goto __17
	}
	callPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !(sIsStillValid(tls, callPtr, oPtr, flags, reuseMask) != 0) {
		goto __18
	}
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
	goto returnContext
__18:
	;
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(0)
	XTclOODeleteChain(tls, callPtr)
__17:
	;

	doFilters = 1
__3:
	;

	callPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CallChain{})))
	sInitCallChain(tls, callPtr, oPtr, flags)

	(*ChainBuilder)(unsafe.Pointer(bp /* &cb */)).FcallChainPtr = callPtr
	(*ChainBuilder)(unsafe.Pointer(bp /* &cb */)).FfilterLength = 0
	(*ChainBuilder)(unsafe.Pointer(bp /* &cb */)).FoPtr = oPtr

	// If we're working with a forced use of unknown, do that now.

	if !(flags&FORCE_UNKNOWN != 0) {
		goto __19
	}
	sAddSimpleChainToCallContext(tls, oPtr, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FunknownMethodNameObj,
		bp, uintptr(0), BUILDING_MIXINS, uintptr(0))
	sAddSimpleChainToCallContext(tls, oPtr, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FunknownMethodNameObj,
		bp, uintptr(0), 0, uintptr(0))
	*(*int32)(unsafe.Pointer(callPtr + 12)) |= OO_UNKNOWN_METHOD
	(*CallChain)(unsafe.Pointer(callPtr)).Fepoch = -1
	if !((*CallChain)(unsafe.Pointer(callPtr)).FnumChain == 0) {
		goto __20
	}
	XTclOODeleteChain(tls, callPtr)
	return uintptr(0)
__20:
	;
	goto returnContext
__19:
	;

	// Add all defined filters (if any, and if we're going to be processing
	// them; they're not processed for constructors, destructors or when we're
	// in the middle of processing a filter).

	if !(doFilters != 0) {
		goto __21
	}

	doFilters = 1
	XTcl_InitObjHashTable(tls, bp+24)
	*(*int32)(unsafe.Pointer(bp + 112 /* i */)) = 0
__22:
	if !(*(*int32)(unsafe.Pointer(bp + 112)) < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum) {
		goto __24
	}
	if !(*(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(*(*int32)(unsafe.Pointer(bp + 112)))*8)) == uintptr(0)) {
		goto __25
	}
	goto __23
	goto __26
__25:
	if !func() bool {
		mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(*(*int32)(unsafe.Pointer(bp + 112)))*8))
		return 1 != 0
	}() {
		goto __27
	}
	sAddClassFiltersToCallContext(tls, oPtr, mixinPtr, bp, bp+24,
		TRAVERSED_MIXIN|BUILDING_MIXINS|OBJECT_MIXIN)
	sAddClassFiltersToCallContext(tls, oPtr, mixinPtr, bp, bp+24,
		OBJECT_MIXIN)
__27:
	;
__26:
	;
	goto __23
__23:
	*(*int32)(unsafe.Pointer(bp + 112 /* i */))++
	goto __22
	goto __24
__24:
	;
	*(*int32)(unsafe.Pointer(bp + 112 /* i */)) = 0
__28:
	if !(*(*int32)(unsafe.Pointer(bp + 112)) < (*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum) {
		goto __30
	}
	if !(*(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(*(*int32)(unsafe.Pointer(bp + 112)))*8)) == uintptr(0)) {
		goto __31
	}
	goto __29
	goto __32
__31:
	if !func() bool {
		filterObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(*(*int32)(unsafe.Pointer(bp + 112)))*8))
		return 1 != 0
	}() {
		goto __33
	}
	sAddSimpleChainToCallContext(tls, oPtr, filterObj, bp, bp+24,
		BUILDING_MIXINS, uintptr(0))
	sAddSimpleChainToCallContext(tls, oPtr, filterObj, bp, bp+24, 0,
		uintptr(0))
__33:
	;
__32:
	;
	goto __29
__29:
	*(*int32)(unsafe.Pointer(bp + 112 /* i */))++
	goto __28
	goto __30
__30:
	;
	sAddClassFiltersToCallContext(tls, oPtr, (*Object)(unsafe.Pointer(oPtr)).FselfCls, bp, bp+24,
		BUILDING_MIXINS)
	sAddClassFiltersToCallContext(tls, oPtr, (*Object)(unsafe.Pointer(oPtr)).FselfCls, bp, bp+24,
		0)
	XTcl_DeleteHashTable(tls, bp+24)
__21:
	;
	count = libc.AssignPtrInt32(bp+8, (*CallChain)(unsafe.Pointer(callPtr)).FnumChain)

	// Add the actual method implementations. We have to do this twice to
	// handle class mixins right.

	sAddSimpleChainToCallContext(tls, oPtr, methodNameObj, bp, uintptr(0),
		flags|BUILDING_MIXINS, uintptr(0))
	sAddSimpleChainToCallContext(tls, oPtr, methodNameObj, bp, uintptr(0), flags, uintptr(0))

	// Check to see if the method has no implementation. If so, we probably
	// need to add in a call to the unknown method. Otherwise, set up the
	// cacheing of the method implementation (if relevant).

	if !(count == (*CallChain)(unsafe.Pointer(callPtr)).FnumChain) {
		goto __34
	}
	// Method does not actually exist. If we're dealing with constructors
	// or destructors, this isn't a problem.

	if !(flags&(CONSTRUCTOR|DESTRUCTOR|FORCE_UNKNOWN) != 0) {
		goto __36
	}
	XTclOODeleteChain(tls, callPtr)
	return uintptr(0)
__36:
	;
	sAddSimpleChainToCallContext(tls, oPtr, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FunknownMethodNameObj,
		bp, uintptr(0), BUILDING_MIXINS, uintptr(0))
	sAddSimpleChainToCallContext(tls, oPtr, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FunknownMethodNameObj,
		bp, uintptr(0), 0, uintptr(0))
	*(*int32)(unsafe.Pointer(callPtr + 12)) |= OO_UNKNOWN_METHOD
	(*CallChain)(unsafe.Pointer(callPtr)).Fepoch = -1
	if !(count == (*CallChain)(unsafe.Pointer(callPtr)).FnumChain) {
		goto __37
	}
	XTclOODeleteChain(tls, callPtr)
	return uintptr(0)
__37:
	;
	goto __35
__34:
	if !(doFilters != 0) {
		goto __38
	}
	if !(hPtr == uintptr(0)) {
		goto __40
	}
	if !((*Object)(unsafe.Pointer(oPtr)).Fflags&USE_CLASS_CACHE != 0) {
		goto __41
	}
	if !((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FclassChainCache == uintptr(0)) {
		goto __43
	}
	(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FclassChainCache = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))

	XTcl_InitObjHashTable(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FclassChainCache)
__43:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FclassChainCache)).FcreateProc})).f(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FclassChainCache, methodNameObj, bp+112 /* &i */)
	goto __42
__41:
	if !((*Object)(unsafe.Pointer(oPtr)).FchainCache == uintptr(0)) {
		goto __44
	}
	(*Object)(unsafe.Pointer(oPtr)).FchainCache = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))

	XTcl_InitObjHashTable(tls, (*Object)(unsafe.Pointer(oPtr)).FchainCache)
__44:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FchainCache)).FcreateProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FchainCache, methodNameObj, bp+112 /* &i */)
__42:
	;
__40:
	;
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = callPtr
	sStashCallChain(tls, cacheInThisObj, callPtr)
	goto __39
__38:
	if !(flags&CONSTRUCTOR != 0) {
		goto __45
	}
	if !((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FconstructorChainPtr != 0) {
		goto __47
	}
	XTclOODeleteChain(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FconstructorChainPtr)
__47:
	;
	(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FconstructorChainPtr = callPtr
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
	goto __46
__45:
	if !(flags&DESTRUCTOR != 0 && (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum == 0) {
		goto __48
	}
	if !((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FdestructorChainPtr != 0) {
		goto __49
	}
	XTclOODeleteChain(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FdestructorChainPtr)
__49:
	;
	(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FdestructorChainPtr = callPtr
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
__48:
	;
__46:
	;
__39:
	;
__35:
	;

returnContext:
	contextPtr = XTclStackAlloc(tls, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Finterp, int32(unsafe.Sizeof(CallContext{})))
	(*CallContext)(unsafe.Pointer(contextPtr)).FoPtr = oPtr

	// Corresponding TclOODecrRefCount() in TclOODeleteContext

	(*Object)(unsafe.Pointer(oPtr)).FrefCount++
	(*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr = callPtr
	(*CallContext)(unsafe.Pointer(contextPtr)).Fskip = 2
	(*CallContext)(unsafe.Pointer(contextPtr)).Findex = 0
	return contextPtr
}

// ----------------------------------------------------------------------
//
// TclOOGetStereotypeCallChain --
//
//	Construct a call-chain for a method that would be used by a
//	stereotypical instance of the given class (i.e., where the object has
//	no definitions special to itself).
//
// ----------------------------------------------------------------------

func XTclOOGetStereotypeCallChain(tls *libc.TLS, clsPtr uintptr, methodNameObj uintptr, flags int32) uintptr { /* tclOOCall.c:1206:11: */
	bp := tls.Alloc(268)
	defer tls.Free(268)

	var callPtr uintptr
	// var cb ChainBuilder at bp+240, 24

	// var i int32 at bp+264, 4

	var count int32
	var fPtr uintptr = (*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FthisPtr)).FfPtr
	var hPtr uintptr
	// var doneFilters Tcl_HashTable at bp+152, 88

	// var obj Object at bp, 152

	// Synthesize a temporary stereotypical object so that we can use existing
	// machinery to produce the stereotypical call chain.

	libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Object{})))
	(*Object)(unsafe.Pointer(bp /* &obj */)).FfPtr = fPtr
	(*Object)(unsafe.Pointer(bp /* &obj */)).FselfCls = clsPtr
	(*Object)(unsafe.Pointer(bp /* &obj */)).FrefCount = 1
	(*Object)(unsafe.Pointer(bp /* &obj */)).Fflags = USE_CLASS_CACHE

	// Check if we can get the chain out of the Tcl_Obj method name or out of
	// the cache. This is made a bit more complex by the fact that there are
	// multiple different layers of cache (in the Tcl_Obj, in the object, and
	// in the class).

	if (*Class)(unsafe.Pointer(clsPtr)).FclassChainCache != uintptr(0) {
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FclassChainCache)).FfindProc})).f(tls, (*Class)(unsafe.Pointer(clsPtr)).FclassChainCache, methodNameObj)
		if hPtr != uintptr(0) && (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData != uintptr(0) {
			var reuseMask int32 = func() int32 {
				if flags&PUBLIC_METHOD != 0 {
					return libc.CplInt32(0)
				}
				return libc.CplInt32(PUBLIC_METHOD)
			}()

			callPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
			if sIsStillValid(tls, callPtr, bp, flags, reuseMask) != 0 {
				(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
				return callPtr
			}
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(0)
			XTclOODeleteChain(tls, callPtr)
		}
	} else {
		hPtr = uintptr(0)
	}

	callPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CallChain{})))
	libc.Xmemset(tls, callPtr, 0, uint64(unsafe.Sizeof(CallChain{})))
	(*CallChain)(unsafe.Pointer(callPtr)).Fflags = flags & (PUBLIC_METHOD | PRIVATE_METHOD | FILTER_HANDLING)
	(*CallChain)(unsafe.Pointer(callPtr)).Fepoch = (*Foundation)(unsafe.Pointer(fPtr)).Fepoch
	(*CallChain)(unsafe.Pointer(callPtr)).FobjectCreationEpoch = (*ThreadLocalData)(unsafe.Pointer((*Foundation)(unsafe.Pointer(fPtr)).FtsdPtr)).FnsCount
	(*CallChain)(unsafe.Pointer(callPtr)).FobjectEpoch = (*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FthisPtr)).Fepoch
	(*CallChain)(unsafe.Pointer(callPtr)).FrefCount = 1
	(*CallChain)(unsafe.Pointer(callPtr)).Fchain = callPtr + 32 /* &.staticChain */

	(*ChainBuilder)(unsafe.Pointer(bp + 240 /* &cb */)).FcallChainPtr = callPtr
	(*ChainBuilder)(unsafe.Pointer(bp + 240 /* &cb */)).FfilterLength = 0
	(*ChainBuilder)(unsafe.Pointer(bp + 240 /* &cb */)).FoPtr = bp /* &obj */

	// Add all defined filters (if any, and if we're going to be processing
	// them; they're not processed for constructors, destructors or when we're
	// in the middle of processing a filter).

	XTcl_InitObjHashTable(tls, bp+152)
	sAddClassFiltersToCallContext(tls, bp, clsPtr, bp+240, bp+152,
		BUILDING_MIXINS)
	sAddClassFiltersToCallContext(tls, bp, clsPtr, bp+240, bp+152, 0)
	XTcl_DeleteHashTable(tls, bp+152)
	count = libc.AssignPtrInt32(bp+240+8, (*CallChain)(unsafe.Pointer(callPtr)).FnumChain)

	// Add the actual method implementations.

	sAddSimpleChainToCallContext(tls, bp, methodNameObj, bp+240, uintptr(0),
		flags|BUILDING_MIXINS, uintptr(0))
	sAddSimpleChainToCallContext(tls, bp, methodNameObj, bp+240, uintptr(0), flags, uintptr(0))

	// Check to see if the method has no implementation. If so, we probably
	// need to add in a call to the unknown method. Otherwise, set up the
	// cacheing of the method implementation (if relevant).

	if count == (*CallChain)(unsafe.Pointer(callPtr)).FnumChain {
		sAddSimpleChainToCallContext(tls, bp, (*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj, bp+240,
			uintptr(0), BUILDING_MIXINS, uintptr(0))
		sAddSimpleChainToCallContext(tls, bp, (*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj, bp+240,
			uintptr(0), 0, uintptr(0))
		*(*int32)(unsafe.Pointer(callPtr + 12)) |= OO_UNKNOWN_METHOD
		(*CallChain)(unsafe.Pointer(callPtr)).Fepoch = -1
		if count == (*CallChain)(unsafe.Pointer(callPtr)).FnumChain {
			XTclOODeleteChain(tls, callPtr)
			return uintptr(0)
		}
	} else {
		if hPtr == uintptr(0) {
			if (*Class)(unsafe.Pointer(clsPtr)).FclassChainCache == uintptr(0) {
				(*Class)(unsafe.Pointer(clsPtr)).FclassChainCache = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
				XTcl_InitObjHashTable(tls, (*Class)(unsafe.Pointer(clsPtr)).FclassChainCache)
			}
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FclassChainCache)).FcreateProc})).f(tls, (*Class)(unsafe.Pointer(clsPtr)).FclassChainCache, methodNameObj, bp+264 /* &i */)
		}
		(*CallChain)(unsafe.Pointer(callPtr)).FrefCount++
		(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = callPtr
		sStashCallChain(tls, methodNameObj, callPtr)
	}
	return callPtr
}

// ----------------------------------------------------------------------
//
// AddClassFiltersToCallContext --
//
//	Logic to make extracting all the filters from the class context much
//	easier.
//
// ----------------------------------------------------------------------

func sAddClassFiltersToCallContext(tls *libc.TLS, oPtr uintptr, clsPtr uintptr, cbPtr uintptr, doneFilters uintptr, flags int32) { /* tclOOCall.c:1341:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var i int32
	var clearedFlags int32
	var superPtr uintptr
	var mixinPtr uintptr
	var filterObj uintptr
	// var isNew int32 at bp, 4
	clearedFlags =
		flags & libc.CplInt32(TRAVERSED_MIXIN|OBJECT_MIXIN|BUILDING_MIXINS)

tailRecurse:
	if !(clsPtr == uintptr(0)) {
		goto __1
	}
	return
__1:
	;

	// Add all the filters defined by classes mixed into the main class
	// hierarchy.

	i = 0
__2:
	if !(i < (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Fnum) {
		goto __4
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __5
	}
	goto __3
	goto __6
__5:
	if !func() bool {
		mixinPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __7
	}
	sAddClassFiltersToCallContext(tls, oPtr, mixinPtr, cbPtr, doneFilters,
		flags|TRAVERSED_MIXIN)
__7:
	;
__6:
	;
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;

	// Add all the class filters from the current class. Note that the filters
	// are added starting at the object root, as this allows the object to
	// override how filters work to extend their behaviour.

	if !(flags&OBJECT_MIXIN != 0 || libc.BoolInt32(!(flags&BUILDING_MIXINS != 0)) == libc.BoolInt32(!(flags&TRAVERSED_MIXIN != 0))) {
		goto __8
	}
	i = 0
__9:
	if !(i < (*Class)(unsafe.Pointer(clsPtr)).Ffilters.Fnum) {
		goto __11
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __12
	}
	goto __10
	goto __13
__12:
	if !func() bool {
		filterObj = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Ffilters.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __14
	}

	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(doneFilters)).FcreateProc})).f(tls, doneFilters, filterObj, bp /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
		goto __15
	}
	sAddSimpleChainToCallContext(tls, oPtr, filterObj, cbPtr,
		doneFilters, clearedFlags|BUILDING_MIXINS, clsPtr)
	sAddSimpleChainToCallContext(tls, oPtr, filterObj, cbPtr,
		doneFilters, clearedFlags, clsPtr)
__15:
	;
__14:
	;
__13:
	;
	goto __10
__10:
	i++
	goto __9
	goto __11
__11:
	;
__8:
	;

	// Now process the recursive case. Notice the tail-call optimization.

	switch (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum {
	case 1:
		goto __17
	default:
		goto __18
	case 0:
		goto __19
	}
	goto __16
__17:
	clsPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist))
	goto tailRecurse
__18:
	i = 0
__20:
	if !(i < (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum) {
		goto __22
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __23
	}
	goto __21
	goto __24
__23:
	if !func() bool {
		superPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __25
	}
	sAddClassFiltersToCallContext(tls, oPtr, superPtr, cbPtr, doneFilters,
		flags)
__25:
	;
__24:
	;
	goto __21
__21:
	i++
	goto __20
	goto __22
__22:
	;
__19:
	return
__16:
}

// ----------------------------------------------------------------------
//
// AddSimpleClassChainToCallContext --
//
//	Construct a call-chain from a class hierarchy.
//
// ----------------------------------------------------------------------

func sAddSimpleClassChainToCallContext(tls *libc.TLS, classPtr uintptr, methodNameObj uintptr, cbPtr uintptr, doneFilters uintptr, flags int32, filterDecl uintptr) { /* tclOOCall.c:1423:1: */
	var i int32
	var superPtr uintptr
	var mPtr uintptr
	var hPtr uintptr

	// We hard-code the tail-recursive form. It's by far the most common case
	// *and* it is much more gentle on the stack.
	//
	// Note that mixins must be processed before the main class hierarchy.
	// [Bug 1998221]

tailRecurse:
	i = 0
__1:
	if !(i < (*Class)(unsafe.Pointer(classPtr)).Fmixins.Fnum) {
		goto __3
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __4
	}
	goto __2
	goto __5
__4:
	if !func() bool {
		superPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __6
	}
	sAddSimpleClassChainToCallContext(tls, superPtr, methodNameObj, cbPtr,
		doneFilters, flags|TRAVERSED_MIXIN, filterDecl)
__6:
	;
__5:
	;
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;

	if !(flags&CONSTRUCTOR != 0) {
		goto __7
	}
	sAddMethodToCallChain(tls, (*Class)(unsafe.Pointer(classPtr)).FconstructorPtr, cbPtr, doneFilters,
		filterDecl, flags)
	goto __8
__7:
	if !(flags&DESTRUCTOR != 0) {
		goto __9
	}
	sAddMethodToCallChain(tls, (*Class)(unsafe.Pointer(classPtr)).FdestructorPtr, cbPtr, doneFilters,
		filterDecl, flags)
	goto __10
__9:
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(classPtr + 112 /* &.classMethods */)).FfindProc})).f(tls, classPtr+112 /* &.classMethods */, methodNameObj)

	if !(hPtr != uintptr(0)) {
		goto __11
	}
	mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

	if !!(flags&(DEFINITE_PROTECTED|DEFINITE_PUBLIC) != 0) {
		goto __12
	}
	if !(flags&PUBLIC_METHOD != 0) {
		goto __13
	}
	if !((*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD != 0) {
		goto __15
	}
	flags = flags | DEFINITE_PUBLIC
	goto __16
__15:
	return
__16:
	;
	goto __14
__13:
	flags = flags | DEFINITE_PROTECTED
__14:
	;
__12:
	;
	sAddMethodToCallChain(tls, mPtr, cbPtr, doneFilters, filterDecl, flags)
__11:
	;
__10:
	;
__8:
	;

	switch (*Class)(unsafe.Pointer(classPtr)).Fsuperclasses.Fnum {
	case 1:
		goto __18
	default:
		goto __19
	case 0:
		goto __20
	}
	goto __17
__18:
	classPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fsuperclasses.Flist))
	goto tailRecurse
__19:
	i = 0
__21:
	if !(i < (*Class)(unsafe.Pointer(classPtr)).Fsuperclasses.Fnum) {
		goto __23
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __24
	}
	goto __22
	goto __25
__24:
	if !func() bool {
		superPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fsuperclasses.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __26
	}
	sAddSimpleClassChainToCallContext(tls, superPtr, methodNameObj, cbPtr,
		doneFilters, flags, filterDecl)
__26:
	;
__25:
	;
	goto __22
__22:
	i++
	goto __21
	goto __23
__23:
	;
__20:
	return
__17:
}

// ----------------------------------------------------------------------
//
// TclOORenderCallChain --
//
//	Create a description of a call chain. Used in [info object call],
//	[info class call], and [self call].
//
// ----------------------------------------------------------------------

func XTclOORenderCallChain(tls *libc.TLS, interp uintptr, callPtr uintptr) uintptr { /* tclOOCall.c:1508:9: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var filterLiteral uintptr
	var methodLiteral uintptr
	var objectLiteral uintptr
	var resultObj uintptr
	// var descObjs [4]uintptr at bp, 32

	var objv uintptr
	var fPtr uintptr = XTclOOGetFoundation(tls, interp)
	var i int32

	// Allocate the literals (potentially) used in our description.

	filterLiteral = XTcl_NewStringObj(tls, ts+23753, -1)
	(*Tcl_Obj)(unsafe.Pointer(filterLiteral)).FrefCount++
	methodLiteral = XTcl_NewStringObj(tls, ts+26521, -1)
	(*Tcl_Obj)(unsafe.Pointer(methodLiteral)).FrefCount++
	objectLiteral = XTcl_NewStringObj(tls, ts+19320, -1)
	(*Tcl_Obj)(unsafe.Pointer(objectLiteral)).FrefCount++

	// Do the actual construction of the descriptions. They consist of a list
	// of triples that describe the details of how a method is understood. For
	// each triple, the first word is the type of invocation ("method" is
	// normal, "unknown" is special because it adds the method name as an
	// extra argument when handled by some method types, and "filter" is
	// special because it's a filter method). The second word is the name of
	// the method in question (which differs for "unknown" and "filter" types)
	// and the third word is the full name of the class that declares the
	// method (or "object" if it is declared on the instance).

	objv = XTclStackAlloc(tls, interp, int32(uint64((*CallChain)(unsafe.Pointer(callPtr)).FnumChain)*uint64(unsafe.Sizeof(uintptr(0)))))
	for i = 0; i < (*CallChain)(unsafe.Pointer(callPtr)).FnumChain; i++ {
		var miPtr uintptr = (*CallChain)(unsafe.Pointer(callPtr)).Fchain + uintptr(i)*24

		*(*uintptr)(unsafe.Pointer(bp)) = func() uintptr {
			if (*MInvoke)(unsafe.Pointer(miPtr)).FisFilter != 0 {
				return filterLiteral
			}
			return func() uintptr {
				if (*CallChain)(unsafe.Pointer(callPtr)).Fflags&OO_UNKNOWN_METHOD != 0 {
					return (*Foundation)(unsafe.Pointer(fPtr)).FunknownMethodNameObj
				}
				return methodLiteral
			}()
		}()
		*(*uintptr)(unsafe.Pointer(bp + 1*8)) = func() uintptr {
			if (*CallChain)(unsafe.Pointer(callPtr)).Fflags&CONSTRUCTOR != 0 {
				return (*Foundation)(unsafe.Pointer(fPtr)).FconstructorName
			}
			return func() uintptr {
				if (*CallChain)(unsafe.Pointer(callPtr)).Fflags&DESTRUCTOR != 0 {
					return (*Foundation)(unsafe.Pointer(fPtr)).FdestructorName
				}
				return (*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FnamePtr
			}()
		}()
		*(*uintptr)(unsafe.Pointer(bp + 2*8)) = func() uintptr {
			if (*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FdeclaringClassPtr != 0 {
				return XTcl_GetObjectName(tls, interp,
					(*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FdeclaringClassPtr)).FthisPtr)
			}
			return objectLiteral
		}()
		*(*uintptr)(unsafe.Pointer(bp + 3*8)) = XTcl_NewStringObj(tls, (*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer(miPtr)).FmPtr)).FtypePtr)).Fname, -1)

		*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)) = XTcl_NewListObj(tls, 4, bp)
	}

	// Drop the local references to the literals; if they're actually used,
	// they'll live on the description itself.

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = filterLiteral
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = methodLiteral
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = objectLiteral
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	// Finish building the description and return it.

	resultObj = XTcl_NewListObj(tls, (*CallChain)(unsafe.Pointer(callPtr)).FnumChain, objv)
	XTclStackFree(tls, interp, objv)
	return resultObj
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// !END!: Do not edit above this line.

// Alternatives to Tcl_Preserve/Tcl_EventuallyFree/Tcl_Release.

// A convenience macro for iterating through the lists used in the internal
// memory management of objects.
// REQUIRES DECLARATION: int i;

// Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS
// sets up the declarations needed for the main macro, FOREACH_HASH, which
// does the actual iteration. FOREACH_HASH_VALUE is a restricted version that
// only iterates over values.

// Convenience macro for duplicating a list. Needs no external declaration,
// but all arguments are used multiple times and so must have no side effects.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The maximum length of fully-qualified object name to use in an errorinfo
// message. Longer than this will be curtailed.

// Some things that make it easier to declare a slot.

type DeclaredSlot = struct {
	Fname       uintptr
	FgetterType Tcl_MethodType
	FsetterType Tcl_MethodType
} /* tclOODefineCmds.c:30:1 */

// Now define the slots used in declarations.

var slots = [8]DeclaredSlot{
	{Fname: ts + 51110, FgetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51131, FcallProc: 0}, FsetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51166, FcallProc: 0}},
	{Fname: ts + 51201, FgetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51221, FcallProc: 0}, FsetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51255, FcallProc: 0}},
	{Fname: ts + 51289, FgetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51314, FcallProc: 0}, FsetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51353, FcallProc: 0}},
	{Fname: ts + 51392, FgetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51415, FcallProc: 0}, FsetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51452, FcallProc: 0}},
	{Fname: ts + 51489, FgetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51513, FcallProc: 0}, FsetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51551, FcallProc: 0}},
	{Fname: ts + 51589, FgetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51612, FcallProc: 0}, FsetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51649, FcallProc: 0}},
	{Fname: ts + 51686, FgetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51712, FcallProc: 0}, FsetterType: Tcl_MethodType{Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 51752, FcallProc: 0}},
	{}} /* tclOODefineCmds.c:117:34 */

// ----------------------------------------------------------------------
//
// BumpGlobalEpoch --
//	Utility that ensures that call chains that are invalid will get thrown
//	away at an appropriate time. Note that exactly which epoch gets
//	advanced will depend on exactly what the class is tangled up in; in
//	the worst case, the simplest option is to advance the global epoch,
//	causing *everything* to be thrown away on next usage.
//
// ----------------------------------------------------------------------

func sBumpGlobalEpoch(tls *libc.TLS, interp uintptr, classPtr uintptr) { /* tclOODefineCmds.c:142:1: */
	if classPtr != uintptr(0) &&
		(*Class)(unsafe.Pointer(classPtr)).Fsubclasses.Fnum == 0 &&
		(*Class)(unsafe.Pointer(classPtr)).Finstances.Fnum == 0 &&
		(*Class)(unsafe.Pointer(classPtr)).FmixinSubs.Fnum == 0 {
		// If a class has no subclasses or instances, and is not mixed into
		// anything, a change to its structure does not require us to
		// invalidate any call chains. Note that we still bump our object's
		// epoch if it has any mixins; the relation between a class and its
		// representative object is special. But it won't hurt.

		if (*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).FthisPtr)).Fmixins.Fnum > 0 {
			(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).FthisPtr)).Fepoch++
		}
		return
	}

	// Either there's no class (?!) or we're reconfiguring something that is
	// in use. Force regeneration of call chains.

	(*Foundation)(unsafe.Pointer(XTclOOGetFoundation(tls, interp))).Fepoch++
}

// ----------------------------------------------------------------------
//
// RecomputeClassCacheFlag --
//	Determine whether the object is prototypical of its class, and hence
//	able to use the class's method chain cache.
//
// ----------------------------------------------------------------------

func sRecomputeClassCacheFlag(tls *libc.TLS, oPtr uintptr) { /* tclOODefineCmds.c:183:1: */
	if ((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr == uintptr(0) || (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FnumEntries == 0) &&
		(*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum == 0 && (*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum == 0 {
		*(*int32)(unsafe.Pointer(oPtr + 92)) |= USE_CLASS_CACHE
	} else {
		*(*int32)(unsafe.Pointer(oPtr + 92)) &= libc.CplInt32(USE_CLASS_CACHE)
	}
}

// ----------------------------------------------------------------------
//
// TclOOObjectSetFilters --
//	Install a list of filter method names into an object.
//
// ----------------------------------------------------------------------

func XTclOOObjectSetFilters(tls *libc.TLS, oPtr uintptr, numFilters int32, filters uintptr) { /* tclOODefineCmds.c:204:1: */
	var i int32

	if (*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum != 0 {
		var filterObj uintptr

		for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				filterObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = filterObj
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
		}
	}

	if numFilters == 0 {
		// No list of filters was supplied, so we're deleting filters.

		XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist)
		(*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist = uintptr(0)
		(*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum = 0
		sRecomputeClassCacheFlag(tls, oPtr)
	} else {
		// We've got a list of filters, so we're creating filters.

		var filtersList uintptr
		var size int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64(numFilters)) // should be size_t

		if (*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum == 0 {
			filtersList = XTcl_Alloc(tls, uint32(size))
		} else {
			filtersList = XTcl_Realloc(tls, (*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist, uint32(size))
		}
		for i = 0; i < numFilters; i++ {
			*(*uintptr)(unsafe.Pointer(filtersList + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(filters + uintptr(i)*8))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(filters + uintptr(i)*8)))).FrefCount++
		}
		(*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist = filtersList
		(*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum = numFilters
		*(*int32)(unsafe.Pointer(oPtr + 92)) &= libc.CplInt32(USE_CLASS_CACHE)
	}
	(*Object)(unsafe.Pointer(oPtr)).Fepoch++ // Only this object can be affected.
}

// ----------------------------------------------------------------------
//
// TclOOClassSetFilters --
//	Install a list of filter method names into a class.
//
// ----------------------------------------------------------------------

func XTclOOClassSetFilters(tls *libc.TLS, interp uintptr, classPtr uintptr, numFilters int32, filters uintptr) { /* tclOODefineCmds.c:262:1: */
	var i int32

	if (*Class)(unsafe.Pointer(classPtr)).Ffilters.Fnum != 0 {
		var filterObj uintptr

		for i = 0; i < (*Class)(unsafe.Pointer(classPtr)).Ffilters.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				filterObj = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Ffilters.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = filterObj
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
		}
	}

	if numFilters == 0 {
		// No list of filters was supplied, so we're deleting filters.

		XTclpFree(tls, (*Class)(unsafe.Pointer(classPtr)).Ffilters.Flist)
		(*Class)(unsafe.Pointer(classPtr)).Ffilters.Flist = uintptr(0)
		(*Class)(unsafe.Pointer(classPtr)).Ffilters.Fnum = 0
	} else {
		// We've got a list of filters, so we're creating filters.

		var filtersList uintptr
		var size int32 = int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64(numFilters)) // should be size_t

		if (*Class)(unsafe.Pointer(classPtr)).Ffilters.Fnum == 0 {
			filtersList = XTcl_Alloc(tls, uint32(size))
		} else {
			filtersList = XTcl_Realloc(tls, (*Class)(unsafe.Pointer(classPtr)).Ffilters.Flist, uint32(size))
		}
		for i = 0; i < numFilters; i++ {
			*(*uintptr)(unsafe.Pointer(filtersList + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(filters + uintptr(i)*8))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(filters + uintptr(i)*8)))).FrefCount++
		}
		(*Class)(unsafe.Pointer(classPtr)).Ffilters.Flist = filtersList
		(*Class)(unsafe.Pointer(classPtr)).Ffilters.Fnum = numFilters
	}

	// There may be many objects affected, so bump the global epoch.

	sBumpGlobalEpoch(tls, interp, classPtr)
}

// ----------------------------------------------------------------------
//
// TclOOObjectSetMixins --
//	Install a list of mixin classes into an object.
//
// ----------------------------------------------------------------------

func XTclOOObjectSetMixins(tls *libc.TLS, oPtr uintptr, numMixins int32, mixins uintptr) { /* tclOODefineCmds.c:324:1: */
	var mixinPtr uintptr
	var i int32

	if numMixins == 0 {
		if (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum != 0 {
			for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
				if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
					continue
				} else if func() bool {
					mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
					return 1 != 0
				}() {
					XTclOORemoveFromInstances(tls, oPtr, mixinPtr)
					XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)
				}
			}
			XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist)
			(*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum = 0
		}
		sRecomputeClassCacheFlag(tls, oPtr)
	} else {
		if (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum != 0 {
			for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
				if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
					continue
				} else if func() bool {
					mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
					return 1 != 0
				}() {
					if mixinPtr != 0 && mixinPtr != (*Object)(unsafe.Pointer(oPtr)).FselfCls {
						XTclOORemoveFromInstances(tls, oPtr, mixinPtr)
					}
					XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)
				}
			}
			(*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist = XTcl_Realloc(tls, (*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(numMixins)))
		} else {
			(*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(numMixins)))
			*(*int32)(unsafe.Pointer(oPtr + 92)) &= libc.CplInt32(USE_CLASS_CACHE)
		}
		(*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum = numMixins
		libc.Xmemcpy(tls, (*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist, mixins, uint64(unsafe.Sizeof(uintptr(0)))*uint64(numMixins))
		for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				if mixinPtr != (*Object)(unsafe.Pointer(oPtr)).FselfCls {
					XTclOOAddToInstances(tls, oPtr, mixinPtr)

					// For the new copy created by memcpy().

					(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)).FrefCount++
				}
			}
		}
	}
	(*Object)(unsafe.Pointer(oPtr)).Fepoch++
}

// ----------------------------------------------------------------------
//
// TclOOClassSetMixins --
//	Install a list of mixin classes into a class.
//
// ----------------------------------------------------------------------

func XTclOOClassSetMixins(tls *libc.TLS, interp uintptr, classPtr uintptr, numMixins int32, mixins uintptr) { /* tclOODefineCmds.c:383:1: */
	var mixinPtr uintptr
	var i int32

	if numMixins == 0 {
		if (*Class)(unsafe.Pointer(classPtr)).Fmixins.Fnum != 0 {
			for i = 0; i < (*Class)(unsafe.Pointer(classPtr)).Fmixins.Fnum; i++ {
				if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
					continue
				} else if func() bool {
					mixinPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist + uintptr(i)*8))
					return 1 != 0
				}() {
					XTclOORemoveFromMixinSubs(tls, classPtr, mixinPtr)
					XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)
				}
			}
			XTclpFree(tls, (*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist)
			(*Class)(unsafe.Pointer(classPtr)).Fmixins.Fnum = 0
		}
	} else {
		if (*Class)(unsafe.Pointer(classPtr)).Fmixins.Fnum != 0 {
			for i = 0; i < (*Class)(unsafe.Pointer(classPtr)).Fmixins.Fnum; i++ {
				if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
					continue
				} else if func() bool {
					mixinPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist + uintptr(i)*8))
					return 1 != 0
				}() {
					XTclOORemoveFromMixinSubs(tls, classPtr, mixinPtr)
					XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)
				}
			}
			(*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist = XTcl_Realloc(tls, (*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(numMixins)))
		} else {
			(*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(numMixins)))
		}
		(*Class)(unsafe.Pointer(classPtr)).Fmixins.Fnum = numMixins
		libc.Xmemcpy(tls, (*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist, mixins, uint64(unsafe.Sizeof(uintptr(0)))*uint64(numMixins))
		for i = 0; i < (*Class)(unsafe.Pointer(classPtr)).Fmixins.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				mixinPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(classPtr)).Fmixins.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				XTclOOAddToMixinSubs(tls, classPtr, mixinPtr)

				// For the new copy created by memcpy.

				(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(mixinPtr)).FthisPtr)).FrefCount++
			}
		}
	}
	sBumpGlobalEpoch(tls, interp, classPtr)
}

// ----------------------------------------------------------------------
//
// RenameDeleteMethod --
//	Core of the code to rename and delete methods.
//
// ----------------------------------------------------------------------

func sRenameDeleteMethod(tls *libc.TLS, interp uintptr, oPtr uintptr, useClass int32, fromPtr uintptr, toPtr uintptr) int32 { /* tclOODefineCmds.c:437:1: */
	bp := tls.Alloc(124)
	defer tls.Free(124)

	var hPtr uintptr
	var newHPtr uintptr
	var mPtr uintptr
	// var isNew int32 at bp+120, 4

	var _objPtr uintptr
	newHPtr = uintptr(0)

	if !!(useClass != 0) {
		goto __1
	}
	if !!(int32((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr) != 0) {
		goto __3
	}
noSuchMethod:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+51792, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(fromPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(fromPtr)).Fbytes
			}
			return XTcl_GetString(tls, fromPtr)
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(fromPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(fromPtr)).Fbytes
			}
			return XTcl_GetString(tls, fromPtr)
		}(), uintptr(0)))
	return TCL_ERROR
__3:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, fromPtr)
	if !(hPtr == uintptr(0)) {
		goto __4
	}
	goto noSuchMethod
__4:
	;
	if !(toPtr != 0) {
		goto __5
	}
	newHPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FcreateProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, toPtr, bp+120 /* &isNew */)
	if !(hPtr == newHPtr) {
		goto __6
	}
renameToSelf:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+51817, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+29131, ts+51848, uintptr(0)))
	return TCL_ERROR
	goto __7
__6:
	if !!(*(*int32)(unsafe.Pointer(bp + 120)) != 0) {
		goto __8
	}
renameToExisting:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+51863,
		libc.VaList(bp+80, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(toPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(toPtr)).Fbytes
			}
			return XTcl_GetString(tls, toPtr)
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+88, ts+4178, ts+29131, ts+51895, uintptr(0)))
	return TCL_ERROR
__8:
	;
__7:
	;
__5:
	;
	goto __2
__1:
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr + 112 /* &.classMethods */)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr+112 /* &.classMethods */, fromPtr)
	if !(hPtr == uintptr(0)) {
		goto __9
	}
	goto noSuchMethod
__9:
	;
	if !(toPtr != 0) {
		goto __10
	}
	newHPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr + 112 /* &.classMethods */)).FcreateProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr+112 /* &.classMethods */, toPtr, bp+120 /* &isNew */)
	if !(hPtr == newHPtr) {
		goto __11
	}
	goto renameToSelf
	goto __12
__11:
	if !!(*(*int32)(unsafe.Pointer(bp + 120)) != 0) {
		goto __13
	}
	goto renameToExisting
__13:
	;
__12:
	;
__10:
	;
__2:
	;

	// Complete the splicing by changing the method's name.

	mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !(toPtr != 0) {
		goto __14
	}
	(*Tcl_Obj)(unsafe.Pointer(toPtr)).FrefCount++
__16:
	_objPtr = (*Method)(unsafe.Pointer(mPtr)).FnamePtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __19
	}
	XTclFreeObj(tls, _objPtr)
__19:
	;
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	(*Method)(unsafe.Pointer(mPtr)).FnamePtr = toPtr
	(*Tcl_HashEntry)(unsafe.Pointer(newHPtr)).FclientData = mPtr
	goto __15
__14:
	if !!(useClass != 0) {
		goto __20
	}
	sRecomputeClassCacheFlag(tls, oPtr)
__20:
	;
	XTclOODelMethodRef(tls, mPtr)
__15:
	;
	XTcl_DeleteHashEntry(tls, hPtr)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOOUnknownDefinition --
//	Handles what happens when an unknown command is encountered during the
//	processing of a definition script. Works by finding a command in the
//	operating definition namespace that the requested command is a unique
//	prefix of.
//
// ----------------------------------------------------------------------

func XTclOOUnknownDefinition(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:529:1: */
	bp := tls.Alloc(112)
	defer tls.Free(112)

	var nsPtr uintptr
	// var search Tcl_HashSearch at bp+88, 24

	var hPtr uintptr
	// var soughtLen int32 at bp+80, 4

	var soughtStr uintptr
	var matchedStr uintptr
	var nameStr uintptr
	var _objPtr uintptr
	// Got one match, and only one match!

	var newObjv uintptr
	var result int32
	nsPtr = XTcl_GetCurrentNamespace(tls, interp)
	matchedStr = uintptr(0)

	if !(objc < 2) {
		goto __1
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+51907, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+51935, uintptr(0)))
	return TCL_ERROR
__1:
	;
	if !(XTclOOGetDefineCmdContext(tls, interp) == uintptr(0)) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	soughtStr = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+80)
	if !(*(*int32)(unsafe.Pointer(bp + 80)) == 0) {
		goto __3
	}
	goto noMatch
__3:
	;
	hPtr = XTcl_FirstHashEntry(tls, nsPtr+160, bp+88)
__4:
	if !(hPtr != uintptr(0)) {
		goto __5
	}
	nameStr = func() uintptr {
		if (*Tcl_HashTable)(unsafe.Pointer(nsPtr+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(nsPtr+160)).FkeyType == -1 {
			return *(*uintptr)(unsafe.Pointer(hPtr + 32))
		}
		return hPtr + 32
	}()

	if !(libc.Xstrncmp(tls, soughtStr, nameStr, uint64(*(*int32)(unsafe.Pointer(bp + 80)))) == 0) {
		goto __6
	}
	if !(matchedStr != uintptr(0)) {
		goto __7
	}
	goto noMatch
__7:
	;
	matchedStr = nameStr
__6:
	;
	hPtr = XTcl_NextHashEntry(tls, bp+88)
	goto __4
__5:
	;

	if !(matchedStr != uintptr(0)) {
		goto __8
	}
	// Got one match, and only one match!

	newObjv =
		XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(objc-1)))

	*(*uintptr)(unsafe.Pointer(newObjv)) = XTcl_NewStringObj(tls, matchedStr, -1)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(newObjv)))).FrefCount++
	if !(objc > 2) {
		goto __9
	}
	libc.Xmemcpy(tls, newObjv+uintptr(1)*8, objv+uintptr(2)*8, uint64(unsafe.Sizeof(uintptr(0)))*uint64(objc-2))
__9:
	;
	result = XTcl_EvalObjv(tls, interp, objc-1, newObjv, 0)
__10:
	_objPtr = *(*uintptr)(unsafe.Pointer(newObjv))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __13
	}
	XTclFreeObj(tls, _objPtr)
__13:
	;
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	XTclStackFree(tls, interp, newObjv)
	return result
__8:
	;

noMatch:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+8371, libc.VaList(bp+32, soughtStr)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7699, ts+7857, soughtStr, uintptr(0)))
	return TCL_ERROR
}

// ----------------------------------------------------------------------
//
// FindCommand --
//	Specialized version of Tcl_FindCommand that handles command prefixes
//	and disallows namespace magic.
//
// ----------------------------------------------------------------------

func sFindCommand(tls *libc.TLS, interp uintptr, stringObj uintptr, namespacePtr uintptr) Tcl_Command { /* tclOODefineCmds.c:606:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var length int32 at bp, 4

	var nameStr uintptr
	var string uintptr = XTcl_GetStringFromObj(tls, stringObj, bp)
	var nsPtr uintptr = namespacePtr
	var hPtr uintptr
	// var search Tcl_HashSearch at bp+8, 24

	var cmd Tcl_Command
	var cmd2 Tcl_Command

	// If someone is playing games, we stop playing right now.

	if int32(*(*int8)(unsafe.Pointer(string))) == 0 || libc.Xstrstr(tls, string, ts+7376) != uintptr(0) {
		return uintptr(0)
	}

	// Do the exact lookup first.

	cmd = XTcl_FindCommand(tls, interp, string, namespacePtr, TCL_NAMESPACE_ONLY)
	if cmd != uintptr(0) {
		return cmd
	}

	// Bother, need to perform an approximate match. Iterate across the hash
	// table of commands in the namespace.

	for hPtr = XTcl_FirstHashEntry(tls, nsPtr+160, bp+8); func() int32 {
		if hPtr != uintptr(0) {
			return func() int32 {
				nameStr = func() uintptr {
					if (*Tcl_HashTable)(unsafe.Pointer(nsPtr+160)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(nsPtr+160)).FkeyType == -1 {
						return *(*uintptr)(unsafe.Pointer(hPtr + 32))
					}
					return hPtr + 32
				}()
				cmd2 = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
				return 1
			}()
		}
		return 0
	}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+8) {
		if libc.Xstrncmp(tls, string, nameStr, uint64(*(*int32)(unsafe.Pointer(bp)))) == 0 {
			if cmd != uintptr(0) {
				return uintptr(0)
			}
			cmd = cmd2
		}
	}

	// Either we found one thing or we found nothing. Either way, return it.

	return cmd
}

// ----------------------------------------------------------------------
//
// InitDefineContext --
//	Does the magic incantations necessary to push the special stack frame
//	used when processing object definitions. It is up to the caller to
//	dispose of the frame (with TclPopStackFrame) when finished.
//
// ----------------------------------------------------------------------

func sInitDefineContext(tls *libc.TLS, interp uintptr, namespacePtr uintptr, oPtr uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:667:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	// var framePtr uintptr at bp+32, 8

	var framePtrPtr uintptr = bp + 32 /* &framePtr */

	if namespacePtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+51947,
			-1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	// framePtrPtr is needed to satisfy GCC 3.3's strict aliasing rules.

	XTclPushStackFrame(tls, interp, framePtrPtr,
		namespacePtr, FRAME_IS_OO_DEFINE)
	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* framePtr */)))).FclientData = oPtr
	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* framePtr */)))).Fobjc = objc
	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* framePtr */)))).Fobjv = objv // Reference counts do not need to be
	// incremented here.
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOOGetDefineCmdContext --
//	Extracts the magic token from the current stack frame, or returns NULL
//	(and leaves an error message) otherwise.
//
// ----------------------------------------------------------------------

func XTclOOGetDefineCmdContext(tls *libc.TLS, interp uintptr) Tcl_Object { /* tclOODefineCmds.c:708:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	var iPtr uintptr = interp
	var object Tcl_Object

	if (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr == uintptr(0) ||
		(*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame != FRAME_IS_OO_DEFINE {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

			ts+52017, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return uintptr(0)
	}
	object = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FclientData
	if XTcl_ObjectDeleted(tls, object) != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

			ts+52119, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return uintptr(0)
	}
	return object
}

// ----------------------------------------------------------------------
//
// GetClassInOuterContext --
//	Wrapper round Tcl_GetObjectFromObj to perform the lookup in the
//	context that called oo::define (or equivalent). Note that this may
//	have to go up multiple levels to get the level that we started doing
//	definitions at.
//
// ----------------------------------------------------------------------

func sGetClassInOuterContext(tls *libc.TLS, interp uintptr, className uintptr, errMsg uintptr) uintptr { /* tclOODefineCmds.c:745:21: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var iPtr uintptr = interp
	var oPtr uintptr
	var savedFramePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr

	for (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame == FRAME_IS_OO_DEFINE {
		if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FcallerVarPtr == uintptr(0) {
			XTcl_Panic(tls, ts+52182, 0)
		}
		(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FcallerVarPtr
	}
	oPtr = XTcl_GetObjectFromObj(tls, interp, className)
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = savedFramePtr
	if oPtr == uintptr(0) {
		return uintptr(0)
	}
	if (*Object)(unsafe.Pointer(oPtr)).FclassPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, errMsg, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+26069,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(className)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(className)).Fbytes
				}
				return XTcl_GetString(tls, className)
			}(), uintptr(0)))
		return uintptr(0)
	}
	return (*Object)(unsafe.Pointer(oPtr)).FclassPtr
}

// ----------------------------------------------------------------------
//
// GenerateErrorInfo --
//	Factored out code to generate part of the error trace messages.
//
// ----------------------------------------------------------------------

func sGenerateErrorInfo(tls *libc.TLS, interp uintptr, oPtr uintptr, savedNameObj uintptr, typeOfSubject uintptr) { /* tclOODefineCmds.c:785:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	// var length int32 at bp+40, 4

	var realNameObj uintptr
	if XTcl_ObjectDeleted(tls, oPtr) != 0 {
		realNameObj = savedNameObj
	} else {
		realNameObj = XTclOOObjectName(tls, interp, oPtr)
	}
	var objName uintptr = XTcl_GetStringFromObj(tls, realNameObj, bp+40)
	var limit int32 = OBJNAME_LENGTH_IN_ERRORINFO_LIMIT
	var overflow int32 = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 40)) > limit)

	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+52235,
		libc.VaList(bp, typeOfSubject, func() int32 {
			if overflow != 0 {
				return limit
			}
			return *(*int32)(unsafe.Pointer(bp + 40))
		}(), objName,
			func() uintptr {
				if overflow != 0 {
					return ts + 8420 /* "..." */
				}
				return ts + 2631 /* "" */
			}(), XTcl_GetErrorLine(tls, interp))))
}

// ----------------------------------------------------------------------
//
// MagicDefinitionInvoke --
//	Part of the implementation of the "oo::define" and "oo::objdefine"
//	commands that is used to implement the more-than-one-argument case,
//	applying ensemble-like tricks with dispatch so that error messages are
//	clearer. Doesn't handle the management of the stack frame.
//
// ----------------------------------------------------------------------

func sMagicDefinitionInvoke(tls *libc.TLS, interp uintptr, nsPtr uintptr, cmdIndex int32, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:826:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var objPtr uintptr
	var obj2Ptr uintptr
	// var objs uintptr at bp+8, 8

	var cmd Tcl_Command
	var isRoot int32
	// var dummy int32 at bp, 4

	var result int32
	var offset int32 = cmdIndex + 1

	// More than one argument: fire them through the ensemble processing
	// engine so that everything appears to be good and proper in error
	// messages. Note that we cannot just concatenate and send through
	// Tcl_EvalObjEx, as that doesn't do ensemble processing, and we cannot go
	// through Tcl_EvalObjv without the extra work to pre-find the command, as
	// that finds command names in the wrong namespace at the moment. Ugly!

	isRoot = XTclInitRewriteEnsemble(tls, interp, offset, 1, objv)

	// Build the list of arguments using a Tcl_Obj as a workspace. See
	// comments above for why these contortions are necessary.

	objPtr = XTcl_NewObj(tls)
	obj2Ptr = XTcl_NewObj(tls)
	cmd = sFindCommand(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(cmdIndex)*8)), nsPtr)
	if cmd == uintptr(0) {
		// Punt this case!

		XTcl_AppendObjToObj(tls, obj2Ptr, *(*uintptr)(unsafe.Pointer(objv + uintptr(cmdIndex)*8)))
	} else {
		XTcl_GetCommandFullName(tls, interp, cmd, obj2Ptr)
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), objPtr, obj2Ptr)
	// TODO: overflow?
	XTcl_ListObjReplace(tls, uintptr(0), objPtr, 1, 0, objc-offset, objv+uintptr(offset)*8)
	XTcl_ListObjGetElements(tls, uintptr(0), objPtr, bp, bp+8)

	result = XTcl_EvalObjv(tls, interp, objc-cmdIndex, *(*uintptr)(unsafe.Pointer(bp + 8 /* objs */)), TCL_EVAL_INVOKE)
	if isRoot != 0 {
		XTclResetRewriteEnsemble(tls, interp, 1)
	}
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = objPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return result
}

// ----------------------------------------------------------------------
//
// TclOODefineObjCmd --
//	Implementation of the "oo::define" command. Works by effectively doing
//	the same as 'namespace eval', but with extra magic applied so that the
//	object to be modified is known to the commands in the target
//	namespace. Also does ensemble-like tricks with dispatch so that error
//	messages are clearer.
//
// ----------------------------------------------------------------------

func XTclOODefineObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:893:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var fPtr uintptr = XTclOOGetFoundation(tls, interp)
	var oPtr uintptr
	var result int32

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+52287)
		return TCL_ERROR
	}

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	if (*Object)(unsafe.Pointer(oPtr)).FclassPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+52311, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26069,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}

	// Make the oo::define namespace the current namespace and evaluate the
	// command(s).

	if sInitDefineContext(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FdefineNs, oPtr, objc, objv) != TCL_OK {
		return TCL_ERROR
	}

	(*Object)(unsafe.Pointer(oPtr)).FrefCount++
	if objc == 3 {
		var objNameObj uintptr = XTclOOObjectName(tls, interp, oPtr)

		(*Tcl_Obj)(unsafe.Pointer(objNameObj)).FrefCount++
		result = XTclEvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), 0,
			(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr, 2)
		if result == TCL_ERROR {
			sGenerateErrorInfo(tls, interp, oPtr, objNameObj, ts+16666)
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objNameObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(objNameObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objNameObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(objNameObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objNameObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objNameObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(objNameObj)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(objNameObj + 32)) = XtclFreeObjList
					XtclFreeObjList = objNameObj
				}
			} else {
				XTclFreeObj(tls, objNameObj)
			}
		}

	} else {
		result = sMagicDefinitionInvoke(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FdefineNs, 2, objc, objv)
	}
	XTclOODecrRefCount(tls, oPtr)

	// Restore the previous "current" namespace.

	XTclPopStackFrame(tls, interp)
	return result
}

// ----------------------------------------------------------------------
//
// TclOOObjDefObjCmd --
//	Implementation of the "oo::objdefine" command. Works by effectively
//	doing the same as 'namespace eval', but with extra magic applied so
//	that the object to be modified is known to the commands in the target
//	namespace. Also does ensemble-like tricks with dispatch so that error
//	messages are clearer.
//
// ----------------------------------------------------------------------

func XTclOOObjDefObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:967:1: */
	var fPtr uintptr = XTclOOGetFoundation(tls, interp)
	var oPtr uintptr
	var result int32

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+52340)
		return TCL_ERROR
	}

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Make the oo::objdefine namespace the current namespace and evaluate the
	// command(s).

	if sInitDefineContext(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FobjdefNs, oPtr, objc, objv) != TCL_OK {
		return TCL_ERROR
	}

	(*Object)(unsafe.Pointer(oPtr)).FrefCount++
	if objc == 3 {
		var objNameObj uintptr = XTclOOObjectName(tls, interp, oPtr)

		(*Tcl_Obj)(unsafe.Pointer(objNameObj)).FrefCount++
		result = XTclEvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), 0,
			(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr, 2)
		if result == TCL_ERROR {
			sGenerateErrorInfo(tls, interp, oPtr, objNameObj, ts+19320)
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objNameObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(objNameObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objNameObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(objNameObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objNameObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objNameObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(objNameObj)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(objNameObj + 32)) = XtclFreeObjList
					XtclFreeObjList = objNameObj
				}
			} else {
				XTclFreeObj(tls, objNameObj)
			}
		}

	} else {
		result = sMagicDefinitionInvoke(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FobjdefNs, 2, objc, objv)
	}
	XTclOODecrRefCount(tls, oPtr)

	// Restore the previous "current" namespace.

	XTclPopStackFrame(tls, interp)
	return result
}

// ----------------------------------------------------------------------
//
// TclOODefineSelfObjCmd --
//	Implementation of the "self" subcommand of the "oo::define" command.
//	Works by effectively doing the same as 'namespace eval', but with
//	extra magic applied so that the object to be modified is known to the
//	commands in the target namespace. Also does ensemble-like tricks with
//	dispatch so that error messages are clearer.
//
// ----------------------------------------------------------------------

func XTclOODefineSelfObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1034:1: */
	var fPtr uintptr = XTclOOGetFoundation(tls, interp)
	var oPtr uintptr
	var result int32

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12609)
		return TCL_ERROR
	}

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Make the oo::objdefine namespace the current namespace and evaluate the
	// command(s).

	if sInitDefineContext(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FobjdefNs, oPtr, objc, objv) != TCL_OK {
		return TCL_ERROR
	}

	(*Object)(unsafe.Pointer(oPtr)).FrefCount++
	if objc == 2 {
		var objNameObj uintptr = XTclOOObjectName(tls, interp, oPtr)

		(*Tcl_Obj)(unsafe.Pointer(objNameObj)).FrefCount++
		result = XTclEvalObjEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), 0,
			(*Interp)(unsafe.Pointer(interp)).FcmdFramePtr, 2)
		if result == TCL_ERROR {
			sGenerateErrorInfo(tls, interp, oPtr, objNameObj, ts+52365)
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objNameObj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(objNameObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objNameObj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(objNameObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objNameObj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objNameObj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(objNameObj)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(objNameObj + 32)) = XtclFreeObjList
					XtclFreeObjList = objNameObj
				}
			} else {
				XTclFreeObj(tls, objNameObj)
			}
		}

	} else {
		result = sMagicDefinitionInvoke(tls, interp, (*Foundation)(unsafe.Pointer(fPtr)).FobjdefNs, 1, objc, objv)
	}
	XTclOODecrRefCount(tls, oPtr)

	// Restore the previous "current" namespace.

	XTclPopStackFrame(tls, interp)
	return result
}

// ----------------------------------------------------------------------
//
// TclOODefineClassObjCmd --
//	Implementation of the "class" subcommand of the "oo::objdefine"
//	command.
//
// ----------------------------------------------------------------------

func XTclOODefineClassObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1098:1: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	var oPtr uintptr
	var clsPtr uintptr
	var fPtr uintptr = XTclOOGetFoundation(tls, interp)
	var wasClass int32
	var willBeClass int32

	// Parse the context to get the object to operate on.

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	if (*Object)(unsafe.Pointer(oPtr)).Fflags&ROOT_OBJECT != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52378, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}
	if (*Object)(unsafe.Pointer(oPtr)).Fflags&ROOT_CLASS != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52428, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	// Parse the argument to get the class to set the object's class to.

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26039)
		return TCL_ERROR
	}
	clsPtr = sGetClassInOuterContext(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)),
		ts+52477)
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}
	if oPtr == (*Class)(unsafe.Pointer(clsPtr)).FthisPtr {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52516, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	// Set the object's class.

	wasClass = libc.Bool32((*Object)(unsafe.Pointer(oPtr)).FclassPtr != uintptr(0))
	willBeClass = XTclOOIsReachable(tls, (*Foundation)(unsafe.Pointer(fPtr)).FclassCls, clsPtr)

	if (*Object)(unsafe.Pointer(oPtr)).FselfCls != clsPtr {
		XTclOORemoveFromInstances(tls, oPtr, (*Object)(unsafe.Pointer(oPtr)).FselfCls)
		XTclOODecrRefCount(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FthisPtr)
		(*Object)(unsafe.Pointer(oPtr)).FselfCls = clsPtr
		(*Object)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FthisPtr)).FrefCount++
		XTclOOAddToInstances(tls, oPtr, (*Object)(unsafe.Pointer(oPtr)).FselfCls)

		// Create or delete the class guts if necessary.

		if wasClass != 0 && !(willBeClass != 0) {
			// This is the most global of all epochs. Bump it! No cache can be
			// trusted!

			XTclOORemoveFromMixins(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, oPtr)
			(*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).Fepoch++
			*(*int32)(unsafe.Pointer(oPtr + 92)) |= DONT_DELETE
			XTclOODeleteDescendants(tls, interp, oPtr)
			*(*int32)(unsafe.Pointer(oPtr + 92)) &= libc.CplInt32(DONT_DELETE)
			XTclOOReleaseClassContents(tls, interp, oPtr)
			XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr)
			(*Object)(unsafe.Pointer(oPtr)).FclassPtr = uintptr(0)
		} else if !(wasClass != 0) && willBeClass != 0 {
			XTclOOAllocClass(tls, interp, oPtr)
		}

		if (*Object)(unsafe.Pointer(oPtr)).FclassPtr != uintptr(0) {
			sBumpGlobalEpoch(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr)
		} else {
			(*Object)(unsafe.Pointer(oPtr)).Fepoch++
		}
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOODefineConstructorObjCmd --
//	Implementation of the "constructor" subcommand of the "oo::define"
//	command.
//
// ----------------------------------------------------------------------

func XTclOODefineConstructorObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1206:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var oPtr uintptr
	var clsPtr uintptr
	var method Tcl_Method
	// var bodyLength int32 at bp, 4

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+52570)
		return TCL_ERROR
	}

	// Extract and validate the context, which is the class that we wish to
	// modify.

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	clsPtr = (*Object)(unsafe.Pointer(oPtr)).FclassPtr

	XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp)
	if *(*int32)(unsafe.Pointer(bp)) > 0 {
		// Create the method structure.

		method = XTclOONewProcMethod(tls, interp, clsPtr,
			PUBLIC_METHOD, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(0))
		if method == uintptr(0) {
			return TCL_ERROR
		}
	} else {
		// Delete the constructor method record and set the field in the
		// class record to NULL.

		method = uintptr(0)
	}

	// Place the method structure in the class record. Note that we might not
	// immediately delete the constructor as this might be being done during
	// execution of the constructor itself.

	XTcl_ClassSetConstructor(tls, interp, clsPtr, method)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOODefineDeleteMethodObjCmd --
//	Implementation of the "deletemethod" subcommand of the "oo::define"
//	and "oo::objdefine" commands.
//
// ----------------------------------------------------------------------

func XTclOODefineDeleteMethodObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1274:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var isInstanceDeleteMethod int32 = libc.Bool32(clientData != uintptr(0))
	var oPtr uintptr
	var i int32

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13236)
		return TCL_ERROR
	}

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	if !(isInstanceDeleteMethod != 0) && !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	for i = 1; i < objc; i++ {
		// Delete the method structure from the appropriate hash table.

		if sRenameDeleteMethod(tls, interp, oPtr, libc.BoolInt32(!(isInstanceDeleteMethod != 0)),
			*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(0)) != TCL_OK {
			return TCL_ERROR
		}
	}

	if isInstanceDeleteMethod != 0 {
		(*Object)(unsafe.Pointer(oPtr)).Fepoch++
	} else {
		sBumpGlobalEpoch(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr)
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOODefineDestructorObjCmd --
//	Implementation of the "destructor" subcommand of the "oo::define"
//	command.
//
// ----------------------------------------------------------------------

func XTclOODefineDestructorObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1330:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var oPtr uintptr
	var clsPtr uintptr
	var method Tcl_Method
	// var bodyLength int32 at bp, 4

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13728)
		return TCL_ERROR
	}

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	clsPtr = (*Object)(unsafe.Pointer(oPtr)).FclassPtr

	XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	if *(*int32)(unsafe.Pointer(bp)) > 0 {
		// Create the method structure.

		method = XTclOONewProcMethod(tls, interp, clsPtr,
			PUBLIC_METHOD, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0))
		if method == uintptr(0) {
			return TCL_ERROR
		}
	} else {
		// Delete the destructor method record and set the field in the class
		// record to NULL.

		method = uintptr(0)
	}

	// Place the method structure in the class record. Note that we might not
	// immediately delete the destructor as this might be being done during
	// execution of the destructor itself. Also note that setting a
	// destructor during a destructor is fairly dumb anyway.

	XTcl_ClassSetDestructor(tls, interp, clsPtr, method)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOODefineExportObjCmd --
//	Implementation of the "export" subcommand of the "oo::define" and
//	"oo::objdefine" commands.
//
// ----------------------------------------------------------------------

func XTclOODefineExportObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1394:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var isInstanceExport int32 = libc.Bool32(clientData != uintptr(0))
	var oPtr uintptr
	var mPtr uintptr
	var hPtr uintptr
	var clsPtr uintptr
	var i int32
	// var isNew int32 at bp+32, 4

	var changed int32 = 0

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13236)
		return TCL_ERROR
	}

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	clsPtr = (*Object)(unsafe.Pointer(oPtr)).FclassPtr
	if !(isInstanceExport != 0) && !(clsPtr != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	for i = 1; i < objc; i++ {
		// Exporting is done by adding the PUBLIC_METHOD flag to the method
		// record. If there is no such method in this object or class (i.e.
		// the method comes from something inherited from or that we're an
		// instance of) then we put in a blank record with that flag; such
		// records are skipped over by the call chain engine *except* for
		// their flags member.

		if isInstanceExport != 0 {
			if !(int32((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr) != 0) {
				(*Object)(unsafe.Pointer(oPtr)).FmethodsPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
				XTcl_InitObjHashTable(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)
				*(*int32)(unsafe.Pointer(oPtr + 92)) &= libc.CplInt32(USE_CLASS_CACHE)
			}
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FcreateProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+32 /* &isNew */)
		} else {
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(clsPtr + 112 /* &.classMethods */)).FcreateProc})).f(tls, clsPtr+112 /* &.classMethods */, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+32 /* &isNew */)
		}

		if *(*int32)(unsafe.Pointer(bp + 32)) != 0 {
			mPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Method{})))
			libc.Xmemset(tls, mPtr, 0, uint64(unsafe.Sizeof(Method{})))
			(*Method)(unsafe.Pointer(mPtr)).FrefCount = 1
			(*Method)(unsafe.Pointer(mPtr)).FnamePtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FrefCount++
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = mPtr
		} else {
			mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		}
		if *(*int32)(unsafe.Pointer(bp + 32)) != 0 || !((*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD != 0) {
			*(*int32)(unsafe.Pointer(mPtr + 48)) |= PUBLIC_METHOD
			changed = 1
		}
	}

	// Bump the right epoch if we actually changed anything.

	if changed != 0 {
		if isInstanceExport != 0 {
			(*Object)(unsafe.Pointer(oPtr)).Fepoch++
		} else {
			sBumpGlobalEpoch(tls, interp, clsPtr)
		}
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOODefineForwardObjCmd --
//	Implementation of the "forward" subcommand of the "oo::define" and
//	"oo::objdefine" commands.
//
// ----------------------------------------------------------------------

func XTclOODefineForwardObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1488:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var isInstanceForward int32 = libc.Bool32(clientData != uintptr(0))
	var oPtr uintptr
	var mPtr uintptr
	var isPublic int32
	var prefixObj uintptr

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+52607)
		return TCL_ERROR
	}

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	if !(isInstanceForward != 0) && !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}
	if XTcl_StringMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}(), ts+49567) != 0 {
		isPublic = PUBLIC_METHOD
	} else {
		isPublic = 0
	}

	// Create the method structure.

	prefixObj = XTcl_NewListObj(tls, objc-2, objv+uintptr(2)*8)
	if isInstanceForward != 0 {
		mPtr = XTclOONewForwardInstanceMethod(tls, interp, oPtr, isPublic, *(*uintptr)(unsafe.Pointer(objv + 1*8)),
			prefixObj)
	} else {
		mPtr = XTclOONewForwardMethod(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, isPublic,
			*(*uintptr)(unsafe.Pointer(objv + 1*8)), prefixObj)
	}
	if mPtr == uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = prefixObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return TCL_ERROR
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOODefineMethodObjCmd --
//	Implementation of the "method" subcommand of the "oo::define" and
//	"oo::objdefine" commands.
//
// ----------------------------------------------------------------------

func XTclOODefineMethodObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1548:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var isInstanceMethod int32 = libc.Bool32(clientData != uintptr(0))
	var oPtr uintptr
	var isPublic int32

	if objc != 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+52630)
		return TCL_ERROR
	}

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	if !(isInstanceMethod != 0) && !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}
	if XTcl_StringMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}(), ts+49567) != 0 {
		isPublic = PUBLIC_METHOD
	} else {
		isPublic = 0
	}

	// Create the method by using the right back-end API.

	if isInstanceMethod != 0 {
		if XTclOONewProcInstanceMethod(tls, interp, oPtr, isPublic, *(*uintptr)(unsafe.Pointer(objv + 1*8)),
			*(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(0)) == uintptr(0) {
			return TCL_ERROR
		}
	} else {
		if XTclOONewProcMethod(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, isPublic, *(*uintptr)(unsafe.Pointer(objv + 1*8)),
			*(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*uintptr)(unsafe.Pointer(objv + 3*8)), uintptr(0)) == uintptr(0) {
			return TCL_ERROR
		}
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOODefineRenameMethodObjCmd --
//	Implementation of the "renamemethod" subcommand of the "oo::define"
//	and "oo::objdefine" commands.
//
// ----------------------------------------------------------------------

func XTclOODefineRenameMethodObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1605:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var isInstanceRenameMethod int32 = libc.Bool32(clientData != uintptr(0))
	var oPtr uintptr

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16494)
		return TCL_ERROR
	}

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	if !(isInstanceRenameMethod != 0) && !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	// Delete the method entry from the appropriate hash table, and transfer
	// the thing it points to to its new entry. To do this, we first need to
	// get the entries from the appropriate hash tables (this can generate a
	// range of errors...)

	if sRenameDeleteMethod(tls, interp, oPtr, libc.BoolInt32(!(isInstanceRenameMethod != 0)),
		*(*uintptr)(unsafe.Pointer(objv + 1*8)), *(*uintptr)(unsafe.Pointer(objv + 2*8))) != TCL_OK {
		return TCL_ERROR
	}

	if isInstanceRenameMethod != 0 {
		(*Object)(unsafe.Pointer(oPtr)).Fepoch++
	} else {
		sBumpGlobalEpoch(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr)
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOODefineUnexportObjCmd --
//	Implementation of the "unexport" subcommand of the "oo::define" and
//	"oo::objdefine" commands.
//
// ----------------------------------------------------------------------

func XTclOODefineUnexportObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1661:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var isInstanceUnexport int32 = libc.Bool32(clientData != uintptr(0))
	var oPtr uintptr
	var mPtr uintptr
	var hPtr uintptr
	var clsPtr uintptr
	var i int32
	// var isNew int32 at bp+32, 4

	var changed int32 = 0

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13236)
		return TCL_ERROR
	}

	oPtr = XTclOOGetDefineCmdContext(tls, interp)
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	clsPtr = (*Object)(unsafe.Pointer(oPtr)).FclassPtr
	if !(isInstanceUnexport != 0) && !(clsPtr != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	for i = 1; i < objc; i++ {
		// Unexporting is done by removing the PUBLIC_METHOD flag from the
		// method record. If there is no such method in this object or class
		// (i.e. the method comes from something inherited from or that we're
		// an instance of) then we put in a blank record without that flag;
		// such records are skipped over by the call chain engine *except* for
		// their flags member.

		if isInstanceUnexport != 0 {
			if !(int32((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr) != 0) {
				(*Object)(unsafe.Pointer(oPtr)).FmethodsPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
				XTcl_InitObjHashTable(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)
				*(*int32)(unsafe.Pointer(oPtr + 92)) &= libc.CplInt32(USE_CLASS_CACHE)
			}
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FcreateProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+32 /* &isNew */)
		} else {
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(clsPtr + 112 /* &.classMethods */)).FcreateProc})).f(tls, clsPtr+112 /* &.classMethods */, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+32 /* &isNew */)
		}

		if *(*int32)(unsafe.Pointer(bp + 32)) != 0 {
			mPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Method{})))
			libc.Xmemset(tls, mPtr, 0, uint64(unsafe.Sizeof(Method{})))
			(*Method)(unsafe.Pointer(mPtr)).FrefCount = 1
			(*Method)(unsafe.Pointer(mPtr)).FnamePtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).FrefCount++
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = mPtr
		} else {
			mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		}
		if *(*int32)(unsafe.Pointer(bp + 32)) != 0 || (*Method)(unsafe.Pointer(mPtr)).Fflags&PUBLIC_METHOD != 0 {
			*(*int32)(unsafe.Pointer(mPtr + 48)) &= libc.CplInt32(PUBLIC_METHOD)
			changed = 1
		}
	}

	// Bump the right epoch if we actually changed anything.

	if changed != 0 {
		if isInstanceUnexport != 0 {
			(*Object)(unsafe.Pointer(oPtr)).Fepoch++
		} else {
			sBumpGlobalEpoch(tls, interp, clsPtr)
		}
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// Tcl_ClassSetConstructor, Tcl_ClassSetDestructor --
//	How to install a constructor or destructor into a class; API to call
//	from C.
//
// ----------------------------------------------------------------------

func XTcl_ClassSetConstructor(tls *libc.TLS, interp uintptr, clazz Tcl_Class, method Tcl_Method) { /* tclOODefineCmds.c:1755:1: */
	var clsPtr uintptr = clazz

	if method != (*Class)(unsafe.Pointer(clsPtr)).FconstructorPtr {
		XTclOODelMethodRef(tls, (*Class)(unsafe.Pointer(clsPtr)).FconstructorPtr)
		(*Class)(unsafe.Pointer(clsPtr)).FconstructorPtr = method

		// Remember to invalidate the cached constructor chain for this class.
		// [Bug 2531577]

		if (*Class)(unsafe.Pointer(clsPtr)).FconstructorChainPtr != 0 {
			XTclOODeleteChain(tls, (*Class)(unsafe.Pointer(clsPtr)).FconstructorChainPtr)
			(*Class)(unsafe.Pointer(clsPtr)).FconstructorChainPtr = uintptr(0)
		}
		sBumpGlobalEpoch(tls, interp, clsPtr)
	}
}

func XTcl_ClassSetDestructor(tls *libc.TLS, interp uintptr, clazz Tcl_Class, method Tcl_Method) { /* tclOODefineCmds.c:1780:1: */
	var clsPtr uintptr = clazz

	if method != (*Class)(unsafe.Pointer(clsPtr)).FdestructorPtr {
		XTclOODelMethodRef(tls, (*Class)(unsafe.Pointer(clsPtr)).FdestructorPtr)
		(*Class)(unsafe.Pointer(clsPtr)).FdestructorPtr = method
		if (*Class)(unsafe.Pointer(clsPtr)).FdestructorChainPtr != 0 {
			XTclOODeleteChain(tls, (*Class)(unsafe.Pointer(clsPtr)).FdestructorChainPtr)
			(*Class)(unsafe.Pointer(clsPtr)).FdestructorChainPtr = uintptr(0)
		}
		sBumpGlobalEpoch(tls, interp, clsPtr)
	}
}

// ----------------------------------------------------------------------
//
// TclOODefineSlots --
//	Create the "::oo::Slot" class and its standard instances. Class
//	definition is empty at the stage (added by scripting).
//
// ----------------------------------------------------------------------

func XTclOODefineSlots(tls *libc.TLS, fPtr uintptr) int32 { /* tclOODefineCmds.c:1809:1: */
	var slotInfoPtr uintptr
	var getName uintptr = XTcl_NewStringObj(tls, ts+52645, -1)
	var setName uintptr = XTcl_NewStringObj(tls, ts+52649, -1)
	var slotCls uintptr

	slotCls = (*Object)(unsafe.Pointer(XTcl_NewObjectInstance(tls, (*Foundation)(unsafe.Pointer(fPtr)).Finterp, (*Foundation)(unsafe.Pointer(fPtr)).FclassCls, ts+52653, uintptr(0), -1, uintptr(0), 0))).FclassPtr
	if slotCls == uintptr(0) {
		return TCL_ERROR
	}
	(*Tcl_Obj)(unsafe.Pointer(getName)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(setName)).FrefCount++
	for slotInfoPtr = uintptr(unsafe.Pointer(&slots)); (*DeclaredSlot)(unsafe.Pointer(slotInfoPtr)).Fname != 0; slotInfoPtr += 88 {
		var slotObject Tcl_Object = XTcl_NewObjectInstance(tls, (*Foundation)(unsafe.Pointer(fPtr)).Finterp,
			slotCls, (*DeclaredSlot)(unsafe.Pointer(slotInfoPtr)).Fname, uintptr(0), -1, uintptr(0), 0)

		if slotObject == uintptr(0) {
			continue
		}
		XTcl_NewInstanceMethod(tls, (*Foundation)(unsafe.Pointer(fPtr)).Finterp, slotObject, getName, 0,
			slotInfoPtr+8, uintptr(0))
		XTcl_NewInstanceMethod(tls, (*Foundation)(unsafe.Pointer(fPtr)).Finterp, slotObject, setName, 0,
			slotInfoPtr+48, uintptr(0))
	}
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = getName
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = setName
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// ClassFilterGet, ClassFilterSet --
//	Implementation of the "filter" slot accessors of the "oo::define"
//	command.
//
// ----------------------------------------------------------------------

func sClassFilterGet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1852:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	var resultObj uintptr
	var filterObj uintptr
	var i int32

	if XTcl_ObjectContextSkippedArgs(tls, context) != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			uintptr(0))
		return TCL_ERROR
	}
	if oPtr == uintptr(0) {
		return TCL_ERROR
	} else if !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Ffilters.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			filterObj = *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Ffilters.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, filterObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

func sClassFilterSet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1886:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	// var filterc int32 at bp+32, 4

	// var filterv uintptr at bp+40, 8

	if XTcl_ObjectContextSkippedArgs(tls, context)+1 != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+52664)
		return TCL_ERROR
	}
	objv += 8 * uintptr(XTcl_ObjectContextSkippedArgs(tls, context))

	if oPtr == uintptr(0) {
		return TCL_ERROR
	} else if !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	} else if XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp+32,
		bp+40) != TCL_OK {
		return TCL_ERROR
	}

	XTclOOClassSetFilters(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, *(*int32)(unsafe.Pointer(bp + 32 /* filterc */)), *(*uintptr)(unsafe.Pointer(bp + 40 /* filterv */)))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// ClassMixinGet, ClassMixinSet --
//	Implementation of the "mixin" slot accessors of the "oo::define"
//	command.
//
// ----------------------------------------------------------------------

func sClassMixinGet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1931:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	var resultObj uintptr
	var mixinPtr uintptr
	var i int32

	if XTcl_ObjectContextSkippedArgs(tls, context) != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			uintptr(0))
		return TCL_ERROR
	}
	if oPtr == uintptr(0) {
		return TCL_ERROR
	} else if !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fmixins.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			mixinPtr = *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fmixins.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
				XTclOOObjectName(tls, interp, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr))
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK

}

func sClassMixinSet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:1968:1: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var oPtr uintptr
	// var mixinc int32 at bp+64, 4

	var i int32
	// var mixinv uintptr at bp+72, 8

	var mixins uintptr
	oPtr = XTclOOGetDefineCmdContext(tls, interp)

	if !(XTcl_ObjectContextSkippedArgs(tls, context)+1 != objc) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
		ts+52675)
	return TCL_ERROR
__1:
	;
	objv += 8 * uintptr(XTcl_ObjectContextSkippedArgs(tls, context))

	if !(oPtr == uintptr(0)) {
		goto __2
	}
	return TCL_ERROR
	goto __3
__2:
	if !!(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		goto __4
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+52585, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
	return TCL_ERROR
	goto __5
__4:
	if !(XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp+64,
		bp+72) != TCL_OK) {
		goto __6
	}
	return TCL_ERROR
__6:
	;
__5:
	;
__3:
	;

	mixins = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 64)))))

	i = 0
__7:
	if !(i < *(*int32)(unsafe.Pointer(bp + 64))) {
		goto __9
	}
	*(*uintptr)(unsafe.Pointer(mixins + uintptr(i)*8)) = sGetClassInOuterContext(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 /* mixinv */)) + uintptr(i)*8)),
		ts+52685)
	if !(*(*uintptr)(unsafe.Pointer(mixins + uintptr(i)*8)) == uintptr(0)) {
		goto __10
	}
	i--
	goto freeAndError
__10:
	;
	if !(XTclOOIsReachable(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, *(*uintptr)(unsafe.Pointer(mixins + uintptr(i)*8))) != 0) {
		goto __11
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+52709, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+29131, ts+52741, uintptr(0)))
	goto freeAndError
__11:
	;
	goto __8
__8:
	i++
	goto __7
	goto __9
__9:
	;

	XTclOOClassSetMixins(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, *(*int32)(unsafe.Pointer(bp + 64 /* mixinc */)), mixins)
	XTclStackFree(tls, interp, mixins)
	return TCL_OK

freeAndError:
	XTclStackFree(tls, interp, mixins)
	return TCL_ERROR
}

// ----------------------------------------------------------------------
//
// ClassSuperGet, ClassSuperSet --
//	Implementation of the "superclass" slot accessors of the "oo::define"
//	command.
//
// ----------------------------------------------------------------------

func sClassSuperGet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2036:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	var resultObj uintptr
	var superPtr uintptr
	var i int32

	if XTcl_ObjectContextSkippedArgs(tls, context) != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			uintptr(0))
		return TCL_ERROR
	}
	if oPtr == uintptr(0) {
		return TCL_ERROR
	} else if !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			superPtr = *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
				XTclOOObjectName(tls, interp, (*Class)(unsafe.Pointer(superPtr)).FthisPtr))
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

func sClassSuperSet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2072:1: */
	bp := tls.Alloc(144)
	defer tls.Free(144)

	var oPtr uintptr
	// var superc int32 at bp+128, 4

	var i int32
	var j int32
	// var superv uintptr at bp+136, 8

	var superclasses uintptr
	var superPtr uintptr
	oPtr = XTclOOGetDefineCmdContext(tls, interp)

	if !(XTcl_ObjectContextSkippedArgs(tls, context)+1 != objc) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
		ts+52752)
	return TCL_ERROR
__1:
	;
	objv += 8 * uintptr(XTcl_ObjectContextSkippedArgs(tls, context))

	if !(oPtr == uintptr(0)) {
		goto __2
	}
	return TCL_ERROR
	goto __3
__2:
	if !!(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		goto __4
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+52585, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
	return TCL_ERROR
	goto __5
__4:
	if !(oPtr == (*Class)(unsafe.Pointer((*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FobjectCls)).FthisPtr) {
		goto __6
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+52767, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+29131, ts+52001, uintptr(0)))
	return TCL_ERROR
	goto __7
__6:
	if !(XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp+128,
		bp+136) != TCL_OK) {
		goto __8
	}
	return TCL_ERROR
__8:
	;
__7:
	;
__5:
	;
__3:
	;

	// Allocate some working space.

	superclasses = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 128)))))

	// Parse the arguments to get the class to use as superclasses.
	//
	// Note that zero classes is special, as it is equivalent to just the
	// class of objects. [Bug 9d61624b3d]

	if !(*(*int32)(unsafe.Pointer(bp + 128)) == 0) {
		goto __9
	}
	superclasses = XTcl_Realloc(tls, superclasses, uint32(unsafe.Sizeof(uintptr(0))))
	if !(XTclOOIsReachable(tls, (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FclassCls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		goto __11
	}
	*(*uintptr)(unsafe.Pointer(superclasses)) = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FclassCls
	goto __12
__11:
	*(*uintptr)(unsafe.Pointer(superclasses)) = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FfPtr)).FobjectCls
__12:
	;
	*(*int32)(unsafe.Pointer(bp + 128 /* superc */)) = 1
	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(superclasses)))).FthisPtr)).FrefCount++
	goto __10
__9:
	i = 0
__13:
	if !(i < *(*int32)(unsafe.Pointer(bp + 128))) {
		goto __15
	}
	*(*uintptr)(unsafe.Pointer(superclasses + uintptr(i)*8)) = sGetClassInOuterContext(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 136 /* superv */)) + uintptr(i)*8)),
		ts+52816)
	if !(*(*uintptr)(unsafe.Pointer(superclasses + uintptr(i)*8)) == uintptr(0)) {
		goto __16
	}
	goto failedAfterAlloc
__16:
	;
	j = 0
__17:
	if !(j < i) {
		goto __19
	}
	if !(*(*uintptr)(unsafe.Pointer(superclasses + uintptr(j)*8)) == *(*uintptr)(unsafe.Pointer(superclasses + uintptr(i)*8))) {
		goto __20
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+52849,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+29131, ts+52895, uintptr(0)))
	goto failedAfterAlloc
__20:
	;
	goto __18
__18:
	j++
	goto __17
	goto __19
__19:
	;
	if !(XTclOOIsReachable(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, *(*uintptr)(unsafe.Pointer(superclasses + uintptr(i)*8))) != 0) {
		goto __21
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+52907, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+29131, ts+52949, uintptr(0)))
failedAfterAlloc:
	;
__22:
	if !(libc.PostDecInt32(&i, 1) > 0) {
		goto __24
	}
	XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(superclasses + uintptr(i)*8)))).FthisPtr)
	goto __23
__23:
	;
	goto __22
	goto __24
__24:
	;
	XTclpFree(tls, superclasses)
	return TCL_ERROR
__21:
	;

	// Corresponding TclOODecrRefCount() is near the end of this
	// function.

	(*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(superclasses + uintptr(i)*8)))).FthisPtr)).FrefCount++
	goto __14
__14:
	i++
	goto __13
	goto __15
__15:
	;
__10:
	;

	// Install the list of superclasses into the class. Note that this also
	// involves splicing the class out of the superclasses' subclass list that
	// it used to be a member of and splicing it into the new superclasses'
	// subclass list.

	if !((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Fnum != 0) {
		goto __25
	}
	i = 0
__26:
	if !(i < (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Fnum) {
		goto __28
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __29
	}
	goto __27
	goto __30
__29:
	if !func() bool {
		superPtr = *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __31
	}
	XTclOORemoveFromSubclasses(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, superPtr)
	XTclOODecrRefCount(tls, (*Class)(unsafe.Pointer(superPtr)).FthisPtr)
__31:
	;
__30:
	;
	goto __27
__27:
	i++
	goto __26
	goto __28
__28:
	;
	XTclpFree(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Flist)
__25:
	;
	(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Flist = superclasses
	(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Fnum = *(*int32)(unsafe.Pointer(bp + 128 /* superc */))
	i = 0
__32:
	if !(i < (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Fnum) {
		goto __34
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __35
	}
	goto __33
	goto __36
__35:
	if !func() bool {
		superPtr = *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fsuperclasses.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __37
	}
	XTclOOAddToSubclasses(tls, (*Object)(unsafe.Pointer(oPtr)).FclassPtr, superPtr)
__37:
	;
__36:
	;
	goto __33
__33:
	i++
	goto __32
	goto __34
__34:
	;
	sBumpGlobalEpoch(tls, interp, (*Object)(unsafe.Pointer(oPtr)).FclassPtr)

	return TCL_OK
}

// ----------------------------------------------------------------------
//
// ClassVarsGet, ClassVarsSet --
//	Implementation of the "variable" slot accessors of the "oo::define"
//	command.
//
// ----------------------------------------------------------------------

func sClassVarsGet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2202:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	var resultObj uintptr
	var variableObj uintptr
	var i int32

	if XTcl_ObjectContextSkippedArgs(tls, context) != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			uintptr(0))
		return TCL_ERROR
	}
	if oPtr == uintptr(0) {
		return TCL_ERROR
	} else if !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			variableObj = *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, variableObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

func sClassVarsSet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2236:1: */
	bp := tls.Alloc(236)
	defer tls.Free(236)

	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	// var varc int32 at bp+128, 4

	// var varv uintptr at bp+136, 8

	var variableObj uintptr
	var i int32

	if XTcl_ObjectContextSkippedArgs(tls, context)+1 != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+52664)
		return TCL_ERROR
	}
	objv += 8 * uintptr(XTcl_ObjectContextSkippedArgs(tls, context))

	if oPtr == uintptr(0) {
		return TCL_ERROR
	} else if !(int32((*Object)(unsafe.Pointer(oPtr)).FclassPtr) != 0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+52585, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+52001, uintptr(0)))
		return TCL_ERROR
	} else if XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp+128,
		bp+136) != TCL_OK {
		return TCL_ERROR
	}

	for i = 0; i < *(*int32)(unsafe.Pointer(bp + 128 /* varc */)); i++ {
		var varName uintptr = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 136 /* varv */)) + uintptr(i)*8)))

		if libc.Xstrstr(tls, varName, ts+7376) != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+52961,
				libc.VaList(bp+32, varName, ts+53010)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+29131, ts+53039, uintptr(0)))
			return TCL_ERROR
		}
		if XTcl_StringMatch(tls, varName, ts+53051) != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+52961,
				libc.VaList(bp+80, varName, ts+53056)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+29131, ts+53039, uintptr(0)))
			return TCL_ERROR
		}
	}

	for i = 0; i < *(*int32)(unsafe.Pointer(bp + 128 /* varc */)); i++ {
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 136)) + uintptr(i)*8)))).FrefCount++
	}
	for i = 0; i < (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			variableObj = *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = variableObj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
	}
	if i != *(*int32)(unsafe.Pointer(bp + 128)) {
		if *(*int32)(unsafe.Pointer(bp + 128)) == 0 {
			XTclpFree(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist)
		} else if i != 0 {
			(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist = XTcl_Realloc(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 128)))))
		} else {
			(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 128)))))
		}
	}

	(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Fnum = 0
	if *(*int32)(unsafe.Pointer(bp + 128)) > 0 {
		// var created int32 at bp+232, 4

		var n int32
		// var uniqueTable Tcl_HashTable at bp+144, 88

		XTcl_InitObjHashTable(tls, bp+144)
		for i = libc.AssignInt32(&n, 0); i < *(*int32)(unsafe.Pointer(bp + 128 /* varc */)); i++ {
			(*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp + 144 /* &uniqueTable */)).FcreateProc})).f(tls, bp+144 /* &uniqueTable */, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 136 /* varv */)) + uintptr(i)*8)), bp+232 /* &created */)
			if *(*int32)(unsafe.Pointer(bp + 232)) != 0 {
				*(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist + uintptr(libc.PostIncInt32(&n, 1))*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 136 /* varv */)) + uintptr(i)*8))
			} else {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 136)) + uintptr(i)*8))
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
		}
		(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Fnum = n

		// Shouldn't be necessary, but maintain num/list invariant.

		(*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist = XTcl_Realloc(tls, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FclassPtr)).Fvariables.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(n)))
		XTcl_DeleteHashTable(tls, bp+144)
	}
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// ObjectFilterGet, ObjectFilterSet --
//	Implementation of the "filter" slot accessors of the "oo::objdefine"
//	command.
//
// ----------------------------------------------------------------------

func sObjFilterGet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2344:1: */
	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	var resultObj uintptr
	var filterObj uintptr
	var i int32

	if XTcl_ObjectContextSkippedArgs(tls, context) != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			uintptr(0))
		return TCL_ERROR
	} else if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			filterObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, filterObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

func sObjFilterSet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2372:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	// var filterc int32 at bp, 4

	// var filterv uintptr at bp+8, 8

	if XTcl_ObjectContextSkippedArgs(tls, context)+1 != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+52664)
		return TCL_ERROR
	} else if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	objv += 8 * uintptr(XTcl_ObjectContextSkippedArgs(tls, context))
	if XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp,
		bp+8) != TCL_OK {
		return TCL_ERROR
	}

	XTclOOObjectSetFilters(tls, oPtr, *(*int32)(unsafe.Pointer(bp /* filterc */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* filterv */)))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// ObjectMixinGet, ObjectMixinSet --
//	Implementation of the "mixin" slot accessors of the "oo::objdefine"
//	command.
//
// ----------------------------------------------------------------------

func sObjMixinGet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2411:1: */
	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	var resultObj uintptr
	var mixinPtr uintptr
	var i int32

	if XTcl_ObjectContextSkippedArgs(tls, context) != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			uintptr(0))
		return TCL_ERROR
	} else if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if mixinPtr != 0 {
				XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
					XTclOOObjectName(tls, interp, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr))
			}
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

func sObjMixinSet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2443:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	// var mixinc int32 at bp, 4

	// var mixinv uintptr at bp+8, 8

	var mixins uintptr
	var i int32

	if XTcl_ObjectContextSkippedArgs(tls, context)+1 != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+52675)
		return TCL_ERROR
	} else if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	objv += 8 * uintptr(XTcl_ObjectContextSkippedArgs(tls, context))
	if XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp,
		bp+8) != TCL_OK {
		return TCL_ERROR
	}

	mixins = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp)))))

	for i = 0; i < *(*int32)(unsafe.Pointer(bp /* mixinc */)); i++ {
		*(*uintptr)(unsafe.Pointer(mixins + uintptr(i)*8)) = sGetClassInOuterContext(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* mixinv */)) + uintptr(i)*8)),
			ts+52685)
		if *(*uintptr)(unsafe.Pointer(mixins + uintptr(i)*8)) == uintptr(0) {
			XTclStackFree(tls, interp, mixins)
			return TCL_ERROR
		}
	}

	XTclOOObjectSetMixins(tls, oPtr, *(*int32)(unsafe.Pointer(bp /* mixinc */)), mixins)
	XTclStackFree(tls, interp, mixins)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// ObjectVarsGet, ObjectVarsSet --
//	Implementation of the "variable" slot accessors of the "oo::objdefine"
//	command.
//
// ----------------------------------------------------------------------

func sObjVarsGet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2496:1: */
	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	var resultObj uintptr
	var variableObj uintptr
	var i int32

	if XTcl_ObjectContextSkippedArgs(tls, context) != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			uintptr(0))
		return TCL_ERROR
	} else if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fvariables.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			variableObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, variableObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

func sObjVarsSet(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOODefineCmds.c:2524:1: */
	bp := tls.Alloc(204)
	defer tls.Free(204)

	var oPtr uintptr = XTclOOGetDefineCmdContext(tls, interp)
	// var varc int32 at bp+96, 4

	var i int32
	// var varv uintptr at bp+104, 8

	var variableObj uintptr

	if XTcl_ObjectContextSkippedArgs(tls, context)+1 != objc {
		XTcl_WrongNumArgs(tls, interp, XTcl_ObjectContextSkippedArgs(tls, context), objv,
			ts+53082)
		return TCL_ERROR
	} else if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	objv += 8 * uintptr(XTcl_ObjectContextSkippedArgs(tls, context))
	if XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp+96,
		bp+104) != TCL_OK {
		return TCL_ERROR
	}

	for i = 0; i < *(*int32)(unsafe.Pointer(bp + 96 /* varc */)); i++ {
		var varName uintptr = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* varv */)) + uintptr(i)*8)))

		if libc.Xstrstr(tls, varName, ts+7376) != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+52961,
				libc.VaList(bp, varName, ts+53010)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+29131, ts+53039, uintptr(0)))
			return TCL_ERROR
		}
		if XTcl_StringMatch(tls, varName, ts+53051) != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+52961,
				libc.VaList(bp+48, varName, ts+53056)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+29131, ts+53039, uintptr(0)))
			return TCL_ERROR
		}
	}
	for i = 0; i < *(*int32)(unsafe.Pointer(bp + 96 /* varc */)); i++ {
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104)) + uintptr(i)*8)))).FrefCount++
	}

	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fvariables.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			variableObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = variableObj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
	}
	if i != *(*int32)(unsafe.Pointer(bp + 96)) {
		if *(*int32)(unsafe.Pointer(bp + 96)) == 0 {
			XTclpFree(tls, (*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist)
		} else if i != 0 {
			(*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist = XTcl_Realloc(tls, (*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 96)))))
		} else {
			(*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp + 96)))))
		}
	}
	(*Object)(unsafe.Pointer(oPtr)).Fvariables.Fnum = 0
	if *(*int32)(unsafe.Pointer(bp + 96)) > 0 {
		// var created int32 at bp+200, 4

		var n int32
		// var uniqueTable Tcl_HashTable at bp+112, 88

		XTcl_InitObjHashTable(tls, bp+112)
		for i = libc.AssignInt32(&n, 0); i < *(*int32)(unsafe.Pointer(bp + 96 /* varc */)); i++ {
			(*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp + 112 /* &uniqueTable */)).FcreateProc})).f(tls, bp+112 /* &uniqueTable */, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* varv */)) + uintptr(i)*8)), bp+200 /* &created */)
			if *(*int32)(unsafe.Pointer(bp + 200)) != 0 {
				*(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist + uintptr(libc.PostIncInt32(&n, 1))*8)) = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104 /* varv */)) + uintptr(i)*8))
			} else {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104)) + uintptr(i)*8))
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
		}
		(*Object)(unsafe.Pointer(oPtr)).Fvariables.Fnum = n

		// Shouldn't be necessary, but maintain num/list invariant.

		(*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist = XTcl_Realloc(tls, (*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(n)))
		XTcl_DeleteHashTable(tls, bp+112)
	}
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// List of commands that are used to implement the [info object] subcommands.

var infoObjectCmds = [13]EnsembleImplMap{
	{Fname: ts + 51003, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 16666, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53095, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53106, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 47401, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53114, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 50544, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53118, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53129, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 19385, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 19162, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 13896, Fproc: 0, FcompileProc: 0},
	{},
} /* tclOOInfo.c:50:30 */

// List of commands that are used to implement the [info class] subcommands.

var infoClassCmds = [14]EnsembleImplMap{
	{Fname: ts + 51003, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 26491, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53095, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 26503, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53106, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 47401, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53136, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 50544, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53118, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53129, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53146, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 53157, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 19162, Fproc: 0, FcompileProc: 0},
	{},
} /* tclOOInfo.c:70:30 */

// ----------------------------------------------------------------------
//
// TclOOInitInfo --
//
//	Adjusts the Tcl core [info] command to contain subcommands ("object"
//	and "class") for introspection of objects and classes.
//
// ----------------------------------------------------------------------

func XTclOOInitInfo(tls *libc.TLS, interp uintptr) { /* tclOOInfo.c:99:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var infoCmd Tcl_Command
	// var mapDict uintptr at bp, 8

	// Build the ensembles used to implement [info object] and [info class].

	XTclMakeEnsemble(tls, interp, ts+53170, uintptr(unsafe.Pointer(&infoObjectCmds)))
	XTclMakeEnsemble(tls, interp, ts+53187, uintptr(unsafe.Pointer(&infoClassCmds)))

	// Install into the [info] ensemble.

	infoCmd = XTcl_FindCommand(tls, interp, ts+14096, uintptr(0), TCL_GLOBAL_ONLY)
	if infoCmd != 0 {
		XTcl_GetEnsembleMappingDict(tls, uintptr(0), infoCmd, bp)
		XTcl_DictObjPut(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* mapDict */)), XTcl_NewStringObj(tls, ts+19320, -1),
			XTcl_NewStringObj(tls, ts+53170, -1))
		XTcl_DictObjPut(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* mapDict */)), XTcl_NewStringObj(tls, ts+16666, -1),
			XTcl_NewStringObj(tls, ts+53187, -1))
		XTcl_SetEnsembleMappingDict(tls, interp, infoCmd, *(*uintptr)(unsafe.Pointer(bp /* mapDict */)))
	}
}

// ----------------------------------------------------------------------
//
// GetClassFromObj --
//
//	How to correctly get a class from a Tcl_Obj. Just a wrapper round
//	Tcl_GetObjectFromObj, but this is an idiom that was used heavily.
//
// ----------------------------------------------------------------------

func sGetClassFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr) uintptr { /* tclOOInfo.c:138:21: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var oPtr uintptr = XTcl_GetObjectFromObj(tls, interp, objPtr)

	if oPtr == uintptr(0) {
		return uintptr(0)
	}
	if (*Object)(unsafe.Pointer(oPtr)).FclassPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+26049, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				}
				return XTcl_GetString(tls, objPtr)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26069,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				}
				return XTcl_GetString(tls, objPtr)
			}(), uintptr(0)))
		return uintptr(0)
	}
	return (*Object)(unsafe.Pointer(oPtr)).FclassPtr
}

// ----------------------------------------------------------------------
//
// InfoObjectClassCmd --
//
//	Implements [info object class $objName ?$className?]
//
// ----------------------------------------------------------------------

func sInfoObjectClassCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:169:1: */
	var oPtr uintptr

	if objc != 2 && objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53203)
		return TCL_ERROR
	}

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	if objc == 2 {
		XTcl_SetObjResult(tls, interp,
			XTclOOObjectName(tls, interp, (*Class1)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FselfCls)).FthisPtr))
		return TCL_OK
	} else {
		var mixinPtr uintptr
		var o2clsPtr uintptr
		var i int32

		o2clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		if o2clsPtr == uintptr(0) {
			return TCL_ERROR
		}

		for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
				continue
			} else if func() bool {
				mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
				return 1 != 0
			}() {
				if !(mixinPtr != 0) {
					continue
				}
				if XTclOOIsReachable(tls, o2clsPtr, mixinPtr) != 0 {
					XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, 1))
					return TCL_OK
				}
			}
		}
		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls,
			XTclOOIsReachable(tls, o2clsPtr, (*Object)(unsafe.Pointer(oPtr)).FselfCls)))
		return TCL_OK
	}
	return int32(0)
}

// ----------------------------------------------------------------------
//
// InfoObjectDefnCmd --
//
//	Implements [info object definition $objName $methodName]
//
// ----------------------------------------------------------------------

func sInfoObjectDefnCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:226:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	var oPtr uintptr
	var hPtr uintptr
	var procPtr uintptr
	var localPtr uintptr
	// var resultObjs [2]uintptr at bp+88, 16

	var argObj uintptr

	if !(objc != 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53223)
	return TCL_ERROR
__1:
	;

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if !(oPtr == uintptr(0)) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	if !!(int32((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr) != 0) {
		goto __3
	}
	goto unknownMethod
__3:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(hPtr == uintptr(0)) {
		goto __4
	}
unknownMethod:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26359, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__4:
	;
	procPtr = XTclOOGetProcFromMethod(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	if !(procPtr == uintptr(0)) {
		goto __5
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+53242, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__5:
	;

	*(*uintptr)(unsafe.Pointer(bp + 88)) = XTcl_NewObj(tls)
	localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr
__6:
	if !(localPtr != uintptr(0)) {
		goto __8
	}
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARGUMENT != 0) {
		goto __9
	}

	argObj = XTcl_NewObj(tls)
	XTcl_ListObjAppendElement(tls, uintptr(0), argObj,
		XTcl_NewStringObj(tls, localPtr+40, -1))
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr != uintptr(0)) {
		goto __10
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), argObj, (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr)
__10:
	;
	XTcl_ListObjAppendElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 88)), argObj)
__9:
	;
	goto __7
__7:
	localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
	goto __6
	goto __8
__8:
	;
	*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)) = XTclOOGetMethodBody(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 2, bp+88))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoObjectFiltersCmd --
//
//	Implements [info object filters $objName]
//
// ----------------------------------------------------------------------

func sInfoObjectFiltersCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:300:1: */
	var i int32
	var filterObj uintptr
	var resultObj uintptr
	var oPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53291)
		return TCL_ERROR
	}

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	resultObj = XTcl_NewObj(tls)

	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Ffilters.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			filterObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Ffilters.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, filterObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoObjectForwardCmd --
//
//	Implements [info object forward $objName $methodName]
//
// ----------------------------------------------------------------------

func sInfoObjectForwardCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:339:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var oPtr uintptr
	var hPtr uintptr
	var prefixObj uintptr

	if !(objc != 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53223)
	return TCL_ERROR
__1:
	;

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if !(oPtr == uintptr(0)) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	if !!(int32((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr) != 0) {
		goto __3
	}
	goto unknownMethod
__3:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(hPtr == uintptr(0)) {
		goto __4
	}
unknownMethod:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26359, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__4:
	;
	prefixObj = XTclOOGetFwdFromMethod(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	if !(prefixObj == uintptr(0)) {
		goto __5
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+53299,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__5:
	;

	XTcl_SetObjResult(tls, interp, prefixObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoObjectIsACmd --
//
//	Implements [info object isa $category $objName ...]
//
// ----------------------------------------------------------------------

func sInfoObjectIsACmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:396:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var oPtr uintptr
	var o2Ptr uintptr
	// var idx int32 at bp, 4

	var i int32
	var result int32
	var mixinPtr uintptr
	result = 0

	if !(objc < 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53358)
	return TCL_ERROR
__1:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&categories)), int32(unsafe.Sizeof(uintptr(0))), ts+53385, 0, bp) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	// Now we know what test we are doing, we can check we've got the right
	// number of arguments.

	switch uint32(*(*int32)(unsafe.Pointer(bp /* idx */))) {
	case uint32(3) /* IsObject */ :
		goto __4
	case uint32(0) /* IsClass */ :
		goto __5
	case uint32(1) /* IsMetaclass */ :
		goto __6
	case uint32(2) /* IsMixin */ :
		goto __7
	case uint32(4) /* IsType */ :
		goto __8
	}
	goto __3
__4:
__5:
__6:
	if !(objc != 3) {
		goto __9
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+53291)
	return TCL_ERROR
__9:
	;
	goto __3
__7:
__8:
	if !(objc != 4) {
		goto __10
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+53394)
	return TCL_ERROR
__10:
	;
	goto __3
__3:
	;

	// Perform the check. Note that we can guarantee that we will not fail
	// from here on; "failures" result in a false-TCL_OK result.

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(oPtr == uintptr(0)) {
		goto __11
	}
	goto failPrecondition
__11:
	;

	switch uint32(*(*int32)(unsafe.Pointer(bp /* idx */))) {
	case uint32(3) /* IsObject */ :
		goto __13
	case uint32(0) /* IsClass */ :
		goto __14
	case uint32(1) /* IsMetaclass */ :
		goto __15
	case uint32(2) /* IsMixin */ :
		goto __16
	case uint32(4) /* IsType */ :
		goto __17
	}
	goto __12
__13:
	result = 1
	goto __12
__14:
	result = libc.Bool32((*Object)(unsafe.Pointer(oPtr)).FclassPtr != uintptr(0))
	goto __12
__15:
	if !((*Object)(unsafe.Pointer(oPtr)).FclassPtr != uintptr(0)) {
		goto __18
	}
	result = XTclOOIsReachable(tls, (*Foundation)(unsafe.Pointer(XTclOOGetFoundation(tls, interp))).FclassCls,
		(*Object)(unsafe.Pointer(oPtr)).FclassPtr)
__18:
	;
	goto __12
__16:
	o2Ptr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	if !(o2Ptr == uintptr(0)) {
		goto __19
	}
	goto failPrecondition
__19:
	;
	if !((*Object)(unsafe.Pointer(o2Ptr)).FclassPtr != uintptr(0)) {
		goto __20
	}

	i = 0
__21:
	if !(i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum) {
		goto __23
	}
	if !(*(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __24
	}
	goto __22
	goto __25
__24:
	if !func() bool {
		mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __26
	}
	if !!(mixinPtr != 0) {
		goto __27
	}
	goto __22
__27:
	;
	if !(XTclOOIsReachable(tls, (*Object)(unsafe.Pointer(o2Ptr)).FclassPtr, mixinPtr) != 0) {
		goto __28
	}
	result = 1
	goto __23
__28:
	;
__26:
	;
__25:
	;
	goto __22
__22:
	i++
	goto __21
	goto __23
__23:
	;
__20:
	;
	goto __12
__17:
	o2Ptr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	if !(o2Ptr == uintptr(0)) {
		goto __29
	}
	goto failPrecondition
__29:
	;
	if !((*Object)(unsafe.Pointer(o2Ptr)).FclassPtr != uintptr(0)) {
		goto __30
	}
	result = XTclOOIsReachable(tls, (*Object)(unsafe.Pointer(o2Ptr)).FclassPtr, (*Object)(unsafe.Pointer(oPtr)).FselfCls)
__30:
	;
	goto __12
__12:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(result != 0)))
	return TCL_OK

failPrecondition:
	XTcl_ResetResult(tls, interp)
	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(0 != 0)))
	return TCL_OK
}

var categories = [6]uintptr{
	ts + 16666, ts + 53412, ts + 53422, ts + 19320, ts + 53428, uintptr(0),
} /* tclOOInfo.c:402:23 */

// ----------------------------------------------------------------------
//
// InfoObjectMethodsCmd --
//
//	Implements [info object methods $objName ?$option ...?]
//
// ----------------------------------------------------------------------

func sInfoObjectMethodsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:515:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var oPtr uintptr
	var flag int32 = PUBLIC_METHOD
	var recurse int32 = 0
	var hPtr uintptr
	// var search Tcl_HashSearch at bp+16, 24

	var namePtr uintptr
	var resultObj uintptr
	var mPtr uintptr

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53435)
		return TCL_ERROR
	}
	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	if objc != 2 {
		var i int32
		// var idx int32 at bp, 4

		for i = 2; i < objc; i++ {
			if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options17)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK {
				return TCL_ERROR
			}
			switch uint32(*(*int32)(unsafe.Pointer(bp /* idx */))) {
			case uint32(0) /* OPT_ALL */ :
				recurse = 1
				break
				fallthrough
			case uint32(1) /* OPT_LOCALPRIVATE */ :
				flag = PRIVATE_METHOD
				break
				fallthrough
			case uint32(2) /* OPT_PRIVATE */ :
				flag = 0
				break
			}
		}
	}

	resultObj = XTcl_NewObj(tls)
	if recurse != 0 {
		// var names uintptr at bp+8, 8

		var i int32
		var numNames int32 = XTclOOGetSortedMethodList(tls, oPtr, flag, bp+8)

		for i = 0; i < numNames; i++ {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
				XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* names */)) + uintptr(i)*8)), -1))
		}
		if numNames > 0 {
			XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 8)))
		}
	} else if (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr != 0 {
		for hPtr = XTcl_FirstHashEntry(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, bp+16); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					namePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+16) {
			if (*Method)(unsafe.Pointer(mPtr)).FtypePtr != uintptr(0) && (*Method)(unsafe.Pointer(mPtr)).Fflags&flag == flag {
				XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, namePtr)
			}
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

var options17 = [4]uintptr{
	ts + 15464, ts + 53463, ts + 53477, uintptr(0),
} /* tclOOInfo.c:526:23 */

// ----------------------------------------------------------------------
//
// InfoObjectMethodTypeCmd --
//
//	Implements [info object methodtype $objName $methodName]
//
// ----------------------------------------------------------------------

func sInfoObjectMethodTypeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:597:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var oPtr uintptr
	var hPtr uintptr
	var mPtr uintptr

	if !(objc != 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53223)
	return TCL_ERROR
__1:
	;

	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if !(oPtr == uintptr(0)) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	if !!(int32((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr) != 0) {
		goto __3
	}
	goto unknownMethod
__3:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FfindProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(hPtr == uintptr(0)) {
		goto __4
	}
unknownMethod:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26359, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__4:
	;
	mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !((*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(0)) {
		goto __5
	}
	// Special entry for visibility control: pretend the method doesnt
	// exist.

	goto unknownMethod
__5:
	;

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, (*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).Fname, -1))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoObjectMixinsCmd --
//
//	Implements [info object mixins $objName]
//
// ----------------------------------------------------------------------

func sInfoObjectMixinsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:654:1: */
	var mixinPtr uintptr
	var oPtr uintptr
	var resultObj uintptr
	var i int32

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53291)
		return TCL_ERROR
	}
	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fmixins.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			mixinPtr = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fmixins.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if !(mixinPtr != 0) {
				continue
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
				XTclOOObjectName(tls, interp, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr))
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoObjectNsCmd --
//
//	Implements [info object namespace $objName]
//
// ----------------------------------------------------------------------

func sInfoObjectNsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:697:1: */
	var oPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53291)
		return TCL_ERROR
	}
	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, (*Tcl_Namespace)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FnamespacePtr)).FfullName, -1))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoObjectVariablesCmd --
//
//	Implements [info object variables $objName]
//
// ----------------------------------------------------------------------

func sInfoObjectVariablesCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:730:1: */
	var oPtr uintptr
	var variableObj uintptr
	var resultObj uintptr
	var i int32

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53291)
		return TCL_ERROR
	}
	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Object)(unsafe.Pointer(oPtr)).Fvariables.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			variableObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).Fvariables.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, variableObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoObjectVarsCmd --
//
//	Implements [info object vars $objName ?$pattern?]
//
// ----------------------------------------------------------------------

func sInfoObjectVarsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:768:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var oPtr uintptr
	var pattern uintptr = uintptr(0)
	var hPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	var vihPtr uintptr
	var nameObj uintptr
	var resultObj uintptr

	if objc != 2 && objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53486)
		return TCL_ERROR
	}
	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}
	if objc == 3 {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}()
	}
	resultObj = XTcl_NewObj(tls)

	// Extract the information we need from the object's namespace's table of
	// variables. Note that this involves horrific knowledge of the guts of
	// tclVar.c, so we can't leverage our hash-iteration macros properly.

	for hPtr = XTcl_FirstHashEntry(tls, (*Object)(unsafe.Pointer(oPtr)).FnamespacePtr+248, bp); func() int32 {
		if hPtr != uintptr(0) {
			return func() int32 { vihPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData; return 1 }()
		}
		return 0
	}() != 0; hPtr = XTcl_NextHashEntry(tls, bp) {
		nameObj = *(*uintptr)(unsafe.Pointer(vihPtr + 24 + 32))

		if *(*uintptr)(unsafe.Pointer(vihPtr + 8)) == uintptr(0) ||
			!((*Var)(unsafe.Pointer(vihPtr)).Fflags&VAR_NAMESPACE_VAR != 0) {
			continue
		}
		if pattern != uintptr(0) &&
			!(XTcl_StringMatch(tls, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes
				}
				return XTcl_GetString(tls, nameObj)
			}(), pattern) != 0) {
			continue
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, nameObj)
	}

	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassConstrCmd --
//
//	Implements [info class constructor $clsName]
//
// ----------------------------------------------------------------------

func sInfoClassConstrCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:829:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var procPtr uintptr
	var localPtr uintptr
	// var resultObjs [2]uintptr at bp+32, 16

	var clsPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26039)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}
	if (*Class)(unsafe.Pointer(clsPtr)).FconstructorPtr == uintptr(0) {
		return TCL_OK
	}
	procPtr = XTclOOGetProcFromMethod(tls, (*Class)(unsafe.Pointer(clsPtr)).FconstructorPtr)
	if procPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+53242, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+53504, uintptr(0)))
		return TCL_ERROR
	}

	*(*uintptr)(unsafe.Pointer(bp + 32)) = XTcl_NewObj(tls)
	for localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr; localPtr != uintptr(0); localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr {
		if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARGUMENT != 0 {
			var argObj uintptr

			argObj = XTcl_NewObj(tls)
			XTcl_ListObjAppendElement(tls, uintptr(0), argObj,
				XTcl_NewStringObj(tls, localPtr+40, -1))
			if (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr != uintptr(0) {
				XTcl_ListObjAppendElement(tls, uintptr(0), argObj, (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr)
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 32)), argObj)
		}
	}
	*(*uintptr)(unsafe.Pointer(bp + 32 + 1*8)) = XTclOOGetMethodBody(tls, (*Class)(unsafe.Pointer(clsPtr)).FconstructorPtr)
	XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 2, bp+32))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassDefnCmd --
//
//	Implements [info class definition $clsName $methodName]
//
// ----------------------------------------------------------------------

func sInfoClassDefnCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:890:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	var hPtr uintptr
	var procPtr uintptr
	var localPtr uintptr
	// var resultObjs [2]uintptr at bp+88, 16

	var clsPtr uintptr

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26316)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(clsPtr + 112 /* &.classMethods */)).FfindProc})).f(tls, clsPtr+112 /* &.classMethods */, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if hPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+26359, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26379,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}
	procPtr = XTclOOGetProcFromMethod(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	if procPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+53242, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7699, ts+26379,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}

	*(*uintptr)(unsafe.Pointer(bp + 88)) = XTcl_NewObj(tls)
	for localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr; localPtr != uintptr(0); localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr {
		if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARGUMENT != 0 {
			var argObj uintptr

			argObj = XTcl_NewObj(tls)
			XTcl_ListObjAppendElement(tls, uintptr(0), argObj,
				XTcl_NewStringObj(tls, localPtr+40, -1))
			if (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr != uintptr(0) {
				XTcl_ListObjAppendElement(tls, uintptr(0), argObj, (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr)
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 88)), argObj)
		}
	}
	*(*uintptr)(unsafe.Pointer(bp + 88 + 1*8)) = XTclOOGetMethodBody(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	XTcl_SetObjResult(tls, interp, XTcl_NewListObj(tls, 2, bp+88))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassDestrCmd --
//
//	Implements [info class destructor $clsName]
//
// ----------------------------------------------------------------------

func sInfoClassDestrCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:958:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var procPtr uintptr
	var clsPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26039)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}

	if (*Class)(unsafe.Pointer(clsPtr)).FdestructorPtr == uintptr(0) {
		return TCL_OK
	}
	procPtr = XTclOOGetProcFromMethod(tls, (*Class)(unsafe.Pointer(clsPtr)).FdestructorPtr)
	if procPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+53242, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+53504, uintptr(0)))
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, XTclOOGetMethodBody(tls, (*Class)(unsafe.Pointer(clsPtr)).FdestructorPtr))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassFiltersCmd --
//
//	Implements [info class filters $clsName]
//
// ----------------------------------------------------------------------

func sInfoClassFiltersCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1002:1: */
	var i int32
	var filterObj uintptr
	var resultObj uintptr
	var clsPtr uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26039)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Ffilters.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Ffilters.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			filterObj = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Ffilters.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, filterObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassForwardCmd --
//
//	Implements [info class forward $clsName $methodName]
//
// ----------------------------------------------------------------------

func sInfoClassForwardCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1040:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var hPtr uintptr
	var prefixObj uintptr
	var clsPtr uintptr

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26316)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(clsPtr + 112 /* &.classMethods */)).FfindProc})).f(tls, clsPtr+112 /* &.classMethods */, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if hPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+26359, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26379,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}
	prefixObj = XTclOOGetFwdFromMethod(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	if prefixObj == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+53299,
			-1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7699, ts+26379,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
			}(), uintptr(0)))
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, prefixObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassInstancesCmd --
//
//	Implements [info class instances $clsName ?$pattern?]
//
// ----------------------------------------------------------------------

func sInfoClassInstancesCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1091:1: */
	var oPtr uintptr
	var clsPtr uintptr
	var i int32
	var pattern uintptr = uintptr(0)
	var resultObj uintptr

	if objc != 2 && objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53516)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}
	if objc == 3 {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}()
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Finstances.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			oPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Finstances.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			var tmpObj uintptr = XTclOOObjectName(tls, interp, oPtr)

			if pattern != 0 && !(XTcl_StringMatch(tls, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes
				}
				return XTcl_GetString(tls, tmpObj)
			}(), pattern) != 0) {
				continue
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, tmpObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassMethodsCmd --
//
//	Implements [info class methods $clsName ?-private?]
//
// ----------------------------------------------------------------------

func sInfoClassMethodsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1139:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var flag int32 = PUBLIC_METHOD
	var recurse int32 = 0
	var namePtr uintptr
	var resultObj uintptr
	var mPtr uintptr
	var clsPtr uintptr

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53536)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}
	if objc != 2 {
		var i int32
		// var idx int32 at bp, 4

		for i = 2; i < objc; i++ {
			if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&options18)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK {
				return TCL_ERROR
			}
			switch uint32(*(*int32)(unsafe.Pointer(bp /* idx */))) {
			case uint32(0) /* OPT_ALL */ :
				recurse = 1
				break
				fallthrough
			case uint32(1) /* OPT_LOCALPRIVATE */ :
				flag = PRIVATE_METHOD
				break
				fallthrough
			case uint32(2) /* OPT_PRIVATE */ :
				flag = 0
				break
			}
		}
	}

	resultObj = XTcl_NewObj(tls)
	if recurse != 0 {
		// var names uintptr at bp+8, 8

		var i int32
		var numNames int32 = XTclOOGetSortedClassMethodList(tls, clsPtr, flag, bp+8)

		for i = 0; i < numNames; i++ {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
				XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* names */)) + uintptr(i)*8)), -1))
		}
		if numNames > 0 {
			XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 8)))
		}
	} else {
		var hPtr uintptr
		// var search Tcl_HashSearch at bp+16, 24

		for hPtr = XTcl_FirstHashEntry(tls, clsPtr+112, bp+16); func() int32 {
			if hPtr != uintptr(0) {
				return func() int32 {
					namePtr = func() uintptr {
						if (*Tcl_HashTable)(unsafe.Pointer(clsPtr+112)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(clsPtr+112)).FkeyType == -1 {
							return *(*uintptr)(unsafe.Pointer(hPtr + 32))
						}
						return hPtr + 32
					}()
					mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
					return 1
				}()
			}
			return 0
		}() != 0; hPtr = XTcl_NextHashEntry(tls, bp+16) {
			if (*Method)(unsafe.Pointer(mPtr)).FtypePtr != uintptr(0) && (*Method)(unsafe.Pointer(mPtr)).Fflags&flag == flag {
				XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, namePtr)
			}
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

var options18 = [4]uintptr{
	ts + 15464, ts + 53463, ts + 53477, uintptr(0),
} /* tclOOInfo.c:1149:23 */

// ----------------------------------------------------------------------
//
// InfoClassMethodTypeCmd --
//
//	Implements [info class methodtype $clsName $methodName]
//
// ----------------------------------------------------------------------

func sInfoClassMethodTypeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1222:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var hPtr uintptr
	var mPtr uintptr
	var clsPtr uintptr

	if !(objc != 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26316)
	return TCL_ERROR
__1:
	;
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if !(clsPtr == uintptr(0)) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(clsPtr + 112 /* &.classMethods */)).FfindProc})).f(tls, clsPtr+112 /* &.classMethods */, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	if !(hPtr == uintptr(0)) {
		goto __3
	}
unknownMethod:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+26359, libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+26379,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}(), uintptr(0)))
	return TCL_ERROR
__3:
	;
	mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !((*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(0)) {
		goto __4
	}
	// Special entry for visibility control: pretend the method doesnt
	// exist.

	goto unknownMethod
__4:
	;
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, (*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).Fname, -1))
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassMixinsCmd --
//
//	Implements [info class mixins $clsName]
//
// ----------------------------------------------------------------------

func sInfoClassMixinsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1274:1: */
	var clsPtr uintptr
	var mixinPtr uintptr
	var resultObj uintptr
	var i int32

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26039)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Fmixins.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			mixinPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fmixins.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			if !(mixinPtr != 0) {
				continue
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
				XTclOOObjectName(tls, interp, (*Class)(unsafe.Pointer(mixinPtr)).FthisPtr))
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassSubsCmd --
//
//	Implements [info class subclasses $clsName ?$pattern?]
//
// ----------------------------------------------------------------------

func sInfoClassSubsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1316:1: */
	var clsPtr uintptr
	var subclassPtr uintptr
	var resultObj uintptr
	var i int32
	var pattern uintptr = uintptr(0)

	if objc != 2 && objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53516)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}
	if objc == 3 {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		}()
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			subclassPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsubclasses.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			var tmpObj uintptr = XTclOOObjectName(tls, interp, (*Class)(unsafe.Pointer(subclassPtr)).FthisPtr)

			if pattern != 0 && !(XTcl_StringMatch(tls, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes
				}
				return XTcl_GetString(tls, tmpObj)
			}(), pattern) != 0) {
				continue
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, tmpObj)
		}
	}
	for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			subclassPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FmixinSubs.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			var tmpObj uintptr = XTclOOObjectName(tls, interp, (*Class)(unsafe.Pointer(subclassPtr)).FthisPtr)

			if pattern != 0 && !(XTcl_StringMatch(tls, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes
				}
				return XTcl_GetString(tls, tmpObj)
			}(), pattern) != 0) {
				continue
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, tmpObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassSupersCmd --
//
//	Implements [info class superclasses $clsName]
//
// ----------------------------------------------------------------------

func sInfoClassSupersCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1371:1: */
	var clsPtr uintptr
	var superPtr uintptr
	var resultObj uintptr
	var i int32

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26039)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			superPtr = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fsuperclasses.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
				XTclOOObjectName(tls, interp, (*Class)(unsafe.Pointer(superPtr)).FthisPtr))
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassVariablesCmd --
//
//	Implements [info class variables $clsName]
//
// ----------------------------------------------------------------------

func sInfoClassVariablesCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1410:1: */
	var clsPtr uintptr
	var variableObj uintptr
	var resultObj uintptr
	var i int32

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26039)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}

	resultObj = XTcl_NewObj(tls)
	for i = 0; i < (*Class)(unsafe.Pointer(clsPtr)).Fvariables.Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0) {
			continue
		} else if func() bool {
			variableObj = *(*uintptr)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).Fvariables.Flist + uintptr(i)*8))
			return 1 != 0
		}() {
			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, variableObj)
		}
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoObjectCallCmd --
//
//	Implements [info object call $objName $methodName]
//
// ----------------------------------------------------------------------

func sInfoObjectCallCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1448:1: */
	var oPtr uintptr
	var contextPtr uintptr

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+53223)
		return TCL_ERROR
	}
	oPtr = XTcl_GetObjectFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if oPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Get the call context and render its call chain.

	contextPtr = XTclOOGetCallContext(tls, oPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), PUBLIC_METHOD, uintptr(0))
	if contextPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+53566, -1))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp,
		XTclOORenderCallChain(tls, interp, (*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr))
	XTclOODeleteContext(tls, contextPtr)
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// InfoClassCallCmd --
//
//	Implements [info class call $clsName $methodName]
//
// ----------------------------------------------------------------------

func sInfoClassCallCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclOOInfo.c:1493:1: */
	var clsPtr uintptr
	var callPtr uintptr

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+26316)
		return TCL_ERROR
	}
	clsPtr = sGetClassFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	if clsPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Get an render the stereotypical call chain.

	callPtr = XTclOOGetStereotypeCallChain(tls, clsPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)), PUBLIC_METHOD)
	if callPtr == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+53566, -1))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTclOORenderCallChain(tls, interp, callPtr))
	XTclOODeleteChain(tls, callPtr)
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------
// Macros and flag values used by Tcl bytecode compilation and execution
// modules inside the Tcl core but not used outside.
//----------------------------------------------------------------

// Simplified form to access AuxData.
//
// ClientData TclFetchAuxData(CompileEng *envPtr, int index);

// Form of TclRegisterLiteral with flags == 0. In that case, it is safe to
// cast away constness, and it is cleanest to do that here, all in one place.
//
// int TclRegisterNewLiteral(CompileEnv *envPtr, const char *bytes,
//			     int length);

// Form of TclRegisterLiteral with flags == LITERAL_CMD_NAME. In that case, it
// is safe to cast away constness, and it is cleanest to do that here, all in
// one place.
//
// int TclRegisterNewNSLiteral(CompileEnv *envPtr, const char *bytes,
//			       int length);

// Macro used to manually adjust the stack requirements; used in cases where
// the stack effect cannot be computed from the opcode and its operands, but
// is still known at compile time.
//
// void TclAdjustStackDepth(int delta, CompileEnv *envPtr);

// Macro used to update the stack requirements. It is called by the macros
// TclEmitOpCode, TclEmitInst1 and TclEmitInst4.
// Remark that the very last instruction of a bytecode always reduces the
// stack level: INST_DONE or INST_POP, so that the maxStackdepth is always
// updated.
//
// void TclUpdateStackReqs(unsigned char op, int i, CompileEnv *envPtr);

// Macros used to update the flag that indicates if we are at the start of a
// command, based on whether the opcode is INST_START_COMMAND.
//
// void TclUpdateAtCmdStart(unsigned char op, CompileEnv *envPtr);

// Macro to emit an opcode byte into a CompileEnv's code array. The ANSI C
// "prototype" for this macro is:
//
// void TclEmitOpcode(unsigned char op, CompileEnv *envPtr);

// Macros to emit an integer operand. The ANSI C "prototype" for these macros
// are:
//
// void TclEmitInt1(int i, CompileEnv *envPtr);
// void TclEmitInt4(int i, CompileEnv *envPtr);

// Macros to emit an instruction with signed or unsigned integer operands.
// Four byte integers are stored in "big-endian" order with the high order
// byte stored at the lowest address. The ANSI C "prototypes" for these macros
// are:
//
// void TclEmitInstInt1(unsigned char op, int i, CompileEnv *envPtr);
// void TclEmitInstInt4(unsigned char op, int i, CompileEnv *envPtr);

// Macro to push a Tcl object onto the Tcl evaluation stack. It emits the
// object's one or four byte array index into the CompileEnv's code array.
// These support, respectively, a maximum of 256 (2**8) and 2**32 objects in a
// CompileEnv. The ANSI C "prototype" for this macro is:
//
// void	TclEmitPush(int objIndex, CompileEnv *envPtr);

// Macros to update a (signed or unsigned) integer starting at a pointer. The
// two variants depend on the number of bytes. The ANSI C "prototypes" for
// these macros are:
//
// void TclStoreInt1AtPtr(int i, unsigned char *p);
// void TclStoreInt4AtPtr(int i, unsigned char *p);

// Macros to update instructions at a particular pc with a new op code and a
// (signed or unsigned) int operand. The ANSI C "prototypes" for these macros
// are:
//
// void TclUpdateInstInt1AtPc(unsigned char op, int i, unsigned char *pc);
// void TclUpdateInstInt4AtPc(unsigned char op, int i, unsigned char *pc);

// Macro to fix up a forward jump to point to the current code-generation
// position in the bytecode being created (the most common case). The ANSI C
// "prototypes" for this macro is:
//
// int TclFixupForwardJumpToHere(CompileEnv *envPtr, JumpFixup *fixupPtr,
//				 int threshold);

// Macros to get a signed integer (GET_INT{1,2}) or an unsigned int
// (GET_UINT{1,2}) from a pointer. There are two variants for each return type
// that depend on the number of bytes fetched. The ANSI C "prototypes" for
// these macros are:
//
// int TclGetInt1AtPtr(unsigned char *p);
// int TclGetInt4AtPtr(unsigned char *p);
// unsigned int TclGetUInt1AtPtr(unsigned char *p);
// unsigned int TclGetUInt4AtPtr(unsigned char *p);

// The TclGetInt1AtPtr macro is tricky because we want to do sign extension on
// the 1-byte value. Unfortunately the "char" type isn't signed on all
// platforms so sign-extension doesn't always happen automatically. Sometimes
// we can explicitly declare the pointer to be signed, but other times we have
// to explicitly sign-extend the value in software.

// Macros used to compute the minimum and maximum of two integers. The ANSI C
// "prototypes" for these macros are:
//
// int TclMin(int i, int j);
// int TclMax(int i, int j);

// Convenience macros for use when compiling bodies of commands. The ANSI C
// "prototype" for these macros are:
//
// static void		BODY(Tcl_Token *tokenPtr, int word);

// Convenience macro for use when compiling tokens to be pushed. The ANSI C
// "prototype" for this macro is:
//
// static void		CompileTokens(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp);

// Convenience macros for use when pushing literals. The ANSI C "prototype" for
// these macros are:
//
// static void		PushLiteral(CompileEnv *envPtr,
//			    const char *string, int length);
// static void		PushStringLiteral(CompileEnv *envPtr,
//			    const char *string);

// Macro to advance to the next token; it is more mnemonic than the address
// arithmetic that it replaces. The ANSI C "prototype" for this macro is:
//
// static Tcl_Token *	TokenAfter(Tcl_Token *tokenPtr);

// Macro to get the offset to the next instruction to be issued. The ANSI C
// "prototype" for this macro is:
//
// static int	CurrentOffset(CompileEnv *envPtr);

// Note: the exceptDepth is a bit of a misnomer: TEBC only needs the
// maximal depth of nested CATCH ranges in order to alloc runtime
// memory. These macros should compute precisely that? OTOH, the nesting depth
// of LOOP ranges is an interesting datum for debugging purposes, and that is
// what we compute now.
//
// static int	ExceptionRangeStarts(CompileEnv *envPtr, int index);
// static void	ExceptionRangeEnds(CompileEnv *envPtr, int index);
// static void	ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL);

// Check if there is an LVT for compiled locals

// Macros for making it easier to deal with tokens and DStrings.

// Macro that encapsulates an efficiency trick that avoids a function call for
// the simplest of compiles. The ANSI C "prototype" for this macro is:
//
// static void		CompileWord(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp, int word);

// TIP #280: Remember the per-word line information of the current command. An
// index is used instead of a pointer as recursive compilation may reallocate,
// i.e. move, the array. This is also the reason to save the nuloc now, it may
// change during the course of the function.
//
// Macro to encapsulate the variable definition and setup.

// Often want to issue one of two versions of an instruction based on whether
// the argument will fit in a single byte or not. This makes it much clearer.

// How to get an anonymous local variable (used for holding temporary values
// off the stack) or a local simple scalar.

// Flags bits used by TclPushVarName.

// DTrace probe macros (NOPs if DTrace support is not enabled).

// Define the following macros to enable debug logging of the DTrace proc,
// cmd, and inst probes. Note that this does _not_ require a platform with
// DTrace, it simply logs all probe output to /tmp/tclDTraceDebug-[pid].log.
//
// If the second macro is defined, logging to file starts immediately,
// otherwise only after the first call to [tcl::dtrace]. Note that the debug
// probe data is always computed, even when it is not logged to file.
//
// Defining the third macro enables debug logging of inst probes (disabled
// by default due to the significant performance impact).

//
// #define TCL_DTRACE_DEBUG 1
// #define TCL_DTRACE_DEBUG_LOG_ENABLED 1
// #define TCL_DTRACE_DEBUG_INST_PROBES 1

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Structure used to help delay computing names of objects or classes for
// [info frame] until needed, making invokation faster in the normal case.

type PNI = struct {
	Finterp uintptr
	Fmethod Tcl_Method
} /* tclOOMethod.c:24:1 */

// Structure used to contain all the information needed about a call frame
// used in a procedure-like method.

type PMFrameData = struct {
	FframePtr  uintptr
	FerrProc   uintptr
	FnameObj   uintptr
	Fcmd       Command
	Fefi       ExtraFrameInfo
	FoldCmdPtr uintptr
	Fpni       PNI
} /* tclOOMethod.c:46:3 */

// Structure used to pass information about variable resolution to the
// on-the-ground resolvers used when working with resolved compiled variables.

type OOResVarInfo = struct {
	Finfo            Tcl_ResolvedVarInfo
	FvariableObj     uintptr
	FcachedObjectVar Tcl_Var
} /* tclOOMethod.c:60:3 */

// The types of methods defined by the core OO system.

var procMethodType = Tcl_MethodType{
	Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 26521,
	FcallProc: 0, FdeleteProc: 0, FcloneProc: 0,
} /* tclOOMethod.c:108:29 */
var fwdMethodType = Tcl_MethodType{
	Fversion: TCL_OO_METHOD_VERSION_CURRENT, Fname: ts + 47401,
	FcallProc: 0, FdeleteProc: 0, FcloneProc: 0,
} /* tclOOMethod.c:112:29 */

// Helper macros (derived from things private to tclVar.c)

// ----------------------------------------------------------------------
//
// Tcl_NewInstanceMethod --
//
//	Attach a method to an object instance.
//
// ----------------------------------------------------------------------

func XTcl_NewInstanceMethod(tls *libc.TLS, interp uintptr, object Tcl_Object, nameObj uintptr, flags int32, typePtr uintptr, clientData ClientData) Tcl_Method { /* tclOOMethod.c:137:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var oPtr uintptr
	var mPtr uintptr
	var hPtr uintptr
	// var isNew int32 at bp, 4
	oPtr = object

	if !(nameObj == uintptr(0)) {
		goto __1
	}
	mPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Method{})))
	(*Method)(unsafe.Pointer(mPtr)).FnamePtr = uintptr(0)
	(*Method)(unsafe.Pointer(mPtr)).FrefCount = 1
	goto populate
__1:
	;
	if !!(int32((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr) != 0) {
		goto __2
	}
	(*Object)(unsafe.Pointer(oPtr)).FmethodsPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
	XTcl_InitObjHashTable(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)
	*(*int32)(unsafe.Pointer(oPtr + 92)) &= libc.CplInt32(USE_CLASS_CACHE)
__2:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer(oPtr)).FmethodsPtr)).FcreateProc})).f(tls, (*Object)(unsafe.Pointer(oPtr)).FmethodsPtr, nameObj, bp /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
		goto __3
	}
	mPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Method{})))
	(*Method)(unsafe.Pointer(mPtr)).FnamePtr = nameObj
	(*Method)(unsafe.Pointer(mPtr)).FrefCount = 1
	(*Tcl_Obj)(unsafe.Pointer(nameObj)).FrefCount++
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = mPtr
	goto __4
__3:
	mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !((*Method)(unsafe.Pointer(mPtr)).FtypePtr != uintptr(0) && (*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FdeleteProc != uintptr(0)) {
		goto __5
	}
	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FdeleteProc})).f(tls, (*Method)(unsafe.Pointer(mPtr)).FclientData)
__5:
	;
__4:
	;

populate:
	(*Method)(unsafe.Pointer(mPtr)).FtypePtr = typePtr
	(*Method)(unsafe.Pointer(mPtr)).FclientData = clientData
	(*Method)(unsafe.Pointer(mPtr)).Fflags = 0
	(*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr = oPtr
	(*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr = uintptr(0)
	if !(flags != 0) {
		goto __6
	}
	*(*int32)(unsafe.Pointer(mPtr + 48)) |= flags & (PUBLIC_METHOD | PRIVATE_METHOD)
__6:
	;
	(*Object)(unsafe.Pointer(oPtr)).Fepoch++
	return mPtr
}

// ----------------------------------------------------------------------
//
// Tcl_NewMethod --
//
//	Attach a method to a class.
//
// ----------------------------------------------------------------------

func XTcl_NewMethod(tls *libc.TLS, interp uintptr, cls Tcl_Class, nameObj uintptr, flags int32, typePtr uintptr, clientData ClientData) Tcl_Method { /* tclOOMethod.c:206:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var clsPtr uintptr
	var mPtr uintptr
	var hPtr uintptr
	// var isNew int32 at bp, 4
	clsPtr = cls

	if !(nameObj == uintptr(0)) {
		goto __1
	}
	mPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Method{})))
	(*Method)(unsafe.Pointer(mPtr)).FnamePtr = uintptr(0)
	(*Method)(unsafe.Pointer(mPtr)).FrefCount = 1
	goto populate
__1:
	;
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(clsPtr + 112 /* &.classMethods */)).FcreateProc})).f(tls, clsPtr+112 /* &.classMethods */, nameObj, bp /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
		goto __2
	}
	mPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Method{})))
	(*Method)(unsafe.Pointer(mPtr)).FrefCount = 1
	(*Method)(unsafe.Pointer(mPtr)).FnamePtr = nameObj
	(*Tcl_Obj)(unsafe.Pointer(nameObj)).FrefCount++
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = mPtr
	goto __3
__2:
	mPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !((*Method)(unsafe.Pointer(mPtr)).FtypePtr != uintptr(0) && (*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FdeleteProc != uintptr(0)) {
		goto __4
	}
	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FdeleteProc})).f(tls, (*Method)(unsafe.Pointer(mPtr)).FclientData)
__4:
	;
__3:
	;

populate:
	(*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer((*Class)(unsafe.Pointer(clsPtr)).FthisPtr)).FfPtr)).Fepoch++
	(*Method)(unsafe.Pointer(mPtr)).FtypePtr = typePtr
	(*Method)(unsafe.Pointer(mPtr)).FclientData = clientData
	(*Method)(unsafe.Pointer(mPtr)).Fflags = 0
	(*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr = uintptr(0)
	(*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr = clsPtr
	if !(flags != 0) {
		goto __5
	}
	*(*int32)(unsafe.Pointer(mPtr + 48)) |= flags & (PUBLIC_METHOD | PRIVATE_METHOD)
__5:
	;

	return mPtr
}

// ----------------------------------------------------------------------
//
// TclOODelMethodRef --
//
//	How to delete a method.
//
// ----------------------------------------------------------------------

func XTclOODelMethodRef(tls *libc.TLS, mPtr uintptr) { /* tclOOMethod.c:270:1: */
	if mPtr != uintptr(0) && libc.PostDecInt32(&(*Method)(unsafe.Pointer(mPtr)).FrefCount, 1) <= 1 {
		if (*Method)(unsafe.Pointer(mPtr)).FtypePtr != uintptr(0) && (*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FdeleteProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_MethodType)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FtypePtr)).FdeleteProc})).f(tls, (*Method)(unsafe.Pointer(mPtr)).FclientData)
		}
		if (*Method)(unsafe.Pointer(mPtr)).FnamePtr != uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*Method)(unsafe.Pointer(mPtr)).FnamePtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}

		XTclpFree(tls, mPtr)
	}
}

// ----------------------------------------------------------------------
//
// TclOONewBasicMethod --
//
//	Helper that makes it cleaner to create very simple methods during
//	basic system initialization. Not suitable for general use.
//
// ----------------------------------------------------------------------

func XTclOONewBasicMethod(tls *libc.TLS, interp uintptr, clsPtr uintptr, dcm uintptr) { /* tclOOMethod.c:297:1: */
	var namePtr uintptr = XTcl_NewStringObj(tls, (*DeclaredClassMethod)(unsafe.Pointer(dcm)).Fname, -1)

	(*Tcl_Obj)(unsafe.Pointer(namePtr)).FrefCount++
	XTcl_NewMethod(tls, interp, clsPtr, namePtr,
		func() int32 {
			if (*DeclaredClassMethod)(unsafe.Pointer(dcm)).FisPublic != 0 {
				return PUBLIC_METHOD
			}
			return 0
		}(), dcm+16, uintptr(0))
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = namePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

// ----------------------------------------------------------------------
//
// TclOONewProcInstanceMethod --
//
//	Create a new procedure-like method for an object.
//
// ----------------------------------------------------------------------

func XTclOONewProcInstanceMethod(tls *libc.TLS, interp uintptr, oPtr uintptr, flags int32, nameObj uintptr, argsObj uintptr, bodyObj uintptr, pmPtrPtr uintptr) uintptr { /* tclOOMethod.c:322:8: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var argsLen int32 at bp, 4

	var pmPtr uintptr
	var method Tcl_Method

	if XTcl_ListObjLength(tls, interp, argsObj, bp) != TCL_OK {
		return uintptr(0)
	}
	pmPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ProcedureMethod{})))
	libc.Xmemset(tls, pmPtr, 0, uint64(unsafe.Sizeof(ProcedureMethod{})))
	(*ProcedureMethod)(unsafe.Pointer(pmPtr)).Fversion = TCLOO_PROCEDURE_METHOD_VERSION
	(*ProcedureMethod)(unsafe.Pointer(pmPtr)).Fflags = flags & USE_DECLARER_NS
	(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FrefCount = 1

	method = XTclOOMakeProcInstanceMethod(tls, interp, oPtr, flags, nameObj,
		argsObj, bodyObj, uintptr(unsafe.Pointer(&procMethodType)), pmPtr, pmPtr+8)
	if method == uintptr(0) {
		XTclpFree(tls, pmPtr)
	} else if pmPtrPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(pmPtrPtr)) = pmPtr
	}
	return method
}

// ----------------------------------------------------------------------
//
// TclOONewProcMethod --
//
//	Create a new procedure-like method for a class.
//
// ----------------------------------------------------------------------

func XTclOONewProcMethod(tls *libc.TLS, interp uintptr, clsPtr uintptr, flags int32, nameObj uintptr, argsObj uintptr, bodyObj uintptr, pmPtrPtr uintptr) uintptr { /* tclOOMethod.c:371:8: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var argsLen int32 at bp, 4
	// -1 => delete argsObj before exit
	var pmPtr uintptr
	var procName uintptr
	var method Tcl_Method

	if argsObj == uintptr(0) {
		*(*int32)(unsafe.Pointer(bp /* argsLen */)) = -1
		argsObj = XTcl_NewObj(tls)
		(*Tcl_Obj)(unsafe.Pointer(argsObj)).FrefCount++
		procName = ts + 49631 /* "<destructor>" */
	} else if XTcl_ListObjLength(tls, interp, argsObj, bp) != TCL_OK {
		return uintptr(0)
	} else {
		procName = func() uintptr {
			if nameObj == uintptr(0) {
				return ts + 49617
			}
			return func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes
				}
				return XTcl_GetString(tls, nameObj)
			}()
		}()
	}

	pmPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ProcedureMethod{})))
	libc.Xmemset(tls, pmPtr, 0, uint64(unsafe.Sizeof(ProcedureMethod{})))
	(*ProcedureMethod)(unsafe.Pointer(pmPtr)).Fversion = TCLOO_PROCEDURE_METHOD_VERSION
	(*ProcedureMethod)(unsafe.Pointer(pmPtr)).Fflags = flags & USE_DECLARER_NS
	(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FrefCount = 1

	method = XTclOOMakeProcMethod(tls, interp, clsPtr, flags, nameObj, procName,
		argsObj, bodyObj, uintptr(unsafe.Pointer(&procMethodType)), pmPtr, pmPtr+8)

	if *(*int32)(unsafe.Pointer(bp)) == -1 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = argsObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if method == uintptr(0) {
		XTclpFree(tls, pmPtr)
	} else if pmPtrPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(pmPtrPtr)) = pmPtr
	}

	return method
}

// ----------------------------------------------------------------------
//
// TclOOMakeProcInstanceMethod --
//
//	The guts of the code to make a procedure-like method for an object.
//	Split apart so that it is easier for other extensions to reuse (in
//	particular, it frees them from having to pry so deeply into Tcl's
//	guts).
//
// ----------------------------------------------------------------------

func XTclOOMakeProcInstanceMethod(tls *libc.TLS, interp uintptr, oPtr uintptr, flags int32, nameObj uintptr, argsObj uintptr, bodyObj uintptr, typePtr uintptr, clientData ClientData, procPtrPtr uintptr) Tcl_Method { /* tclOOMethod.c:441:1: */
	bp := tls.Alloc(92)
	defer tls.Free(92)

	var iPtr uintptr = interp
	var procPtr uintptr

	if XTclCreateProc(tls, interp, uintptr(0), func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes
		}
		return XTcl_GetString(tls, nameObj)
	}(), argsObj, bodyObj,
		procPtrPtr) != TCL_OK {
		return uintptr(0)
	}
	procPtr = *(*uintptr)(unsafe.Pointer(procPtrPtr))
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = uintptr(0)

	if (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr != 0 {
		*(*CmdFrame)(unsafe.Pointer(bp /* context */)) = *(*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr))

		if (*CmdFrame)(unsafe.Pointer(bp)).Ftype == 2 {
			// Retrieve source information from the bytecode, if possible. If
			// the information is retrieved successfully, context.type will be
			// TCL_LOCATION_SOURCE and the reference held by
			// context.data.eval.path will be counted.

			XTclGetSrcInfoForPc(tls, bp)
		} else if (*CmdFrame)(unsafe.Pointer(bp)).Ftype == 4 {
			// The copy into 'context' up above has created another reference
			// to 'context.data.eval.path'; account for it.

			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount++
		}

		if (*CmdFrame)(unsafe.Pointer(bp)).Ftype == 4 {
			// We can account for source location within a proc only if the
			// proc body was not created by substitution.
			// (FIXME: check that this is sane and correct!)

			if (*CmdFrame)(unsafe.Pointer(bp)).Fline != 0 &&
				(*CmdFrame)(unsafe.Pointer(bp)).Fnline >= 4 && *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(bp)).Fline + 3*4)) >= 0 {
				// var isNew int32 at bp+88, 4

				var cfPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CmdFrame{})))
				var hPtr uintptr

				(*CmdFrame)(unsafe.Pointer(cfPtr)).Flevel = -1
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Ftype = (*CmdFrame)(unsafe.Pointer(bp /* &context */)).Ftype
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Fline = XTcl_Alloc(tls, uint32(unsafe.Sizeof(int32(0))))
				*(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(cfPtr)).Fline)) = *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(bp /* &context */)).Fline + 3*4))
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Fnline = 1
				(*CmdFrame)(unsafe.Pointer(cfPtr)).FframePtr = uintptr(0)
				(*CmdFrame)(unsafe.Pointer(cfPtr)).FnextPtr = uintptr(0)

				*(*uintptr)(unsafe.Pointer(cfPtr + 40)) = *(*uintptr)(unsafe.Pointer(bp + 40))
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cfPtr + 40)))).FrefCount++

				(*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd = uintptr(0)
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Flen = 0

				hPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr, procPtr, bp+88 /* &isNew */)
				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cfPtr
			}

			// 'context' is going out of scope; account for the reference that
			// it's holding to the path name.

			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 40))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			*(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0)
		}
	}

	return XTcl_NewInstanceMethod(tls, interp, oPtr, nameObj, flags,
		typePtr, clientData)
}

// ----------------------------------------------------------------------
//
// TclOOMakeProcMethod --
//
//	The guts of the code to make a procedure-like method for a class.
//	Split apart so that it is easier for other extensions to reuse (in
//	particular, it frees them from having to pry so deeply into Tcl's
//	guts).
//
// ----------------------------------------------------------------------

func XTclOOMakeProcMethod(tls *libc.TLS, interp uintptr, clsPtr uintptr, flags int32, nameObj uintptr, namePtr uintptr, argsObj uintptr, bodyObj uintptr, typePtr uintptr, clientData ClientData, procPtrPtr uintptr) Tcl_Method { /* tclOOMethod.c:550:1: */
	bp := tls.Alloc(92)
	defer tls.Free(92)

	var iPtr uintptr = interp
	var procPtr uintptr

	if XTclCreateProc(tls, interp, uintptr(0), namePtr, argsObj, bodyObj,
		procPtrPtr) != TCL_OK {
		return uintptr(0)
	}
	procPtr = *(*uintptr)(unsafe.Pointer(procPtrPtr))
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = uintptr(0)

	if (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr != 0 {
		*(*CmdFrame)(unsafe.Pointer(bp /* context */)) = *(*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr))

		if (*CmdFrame)(unsafe.Pointer(bp)).Ftype == 2 {
			// Retrieve source information from the bytecode, if possible. If
			// the information is retrieved successfully, context.type will be
			// TCL_LOCATION_SOURCE and the reference held by
			// context.data.eval.path will be counted.

			XTclGetSrcInfoForPc(tls, bp)
		} else if (*CmdFrame)(unsafe.Pointer(bp)).Ftype == 4 {
			// The copy into 'context' up above has created another reference
			// to 'context.data.eval.path'; account for it.

			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount++
		}

		if (*CmdFrame)(unsafe.Pointer(bp)).Ftype == 4 {
			// We can account for source location within a proc only if the
			// proc body was not created by substitution.
			// (FIXME: check that this is sane and correct!)

			if (*CmdFrame)(unsafe.Pointer(bp)).Fline != 0 &&
				(*CmdFrame)(unsafe.Pointer(bp)).Fnline >= 4 && *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(bp)).Fline + 3*4)) >= 0 {
				// var isNew int32 at bp+88, 4

				var cfPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CmdFrame{})))
				var hPtr uintptr

				(*CmdFrame)(unsafe.Pointer(cfPtr)).Flevel = -1
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Ftype = (*CmdFrame)(unsafe.Pointer(bp /* &context */)).Ftype
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Fline = XTcl_Alloc(tls, uint32(unsafe.Sizeof(int32(0))))
				*(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(cfPtr)).Fline)) = *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(bp /* &context */)).Fline + 3*4))
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Fnline = 1
				(*CmdFrame)(unsafe.Pointer(cfPtr)).FframePtr = uintptr(0)
				(*CmdFrame)(unsafe.Pointer(cfPtr)).FnextPtr = uintptr(0)

				*(*uintptr)(unsafe.Pointer(cfPtr + 40)) = *(*uintptr)(unsafe.Pointer(bp + 40))
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cfPtr + 40)))).FrefCount++

				(*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd = uintptr(0)
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Flen = 0

				hPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr, procPtr, bp+88 /* &isNew */)
				(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = cfPtr
			}

			// 'context' is going out of scope; account for the reference that
			// it's holding to the path name.

			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 40))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			*(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0)
		}
	}

	return XTcl_NewMethod(tls, interp, clsPtr, nameObj, flags, typePtr,
		clientData)
}

// ----------------------------------------------------------------------
//
// InvokeProcedureMethod, PushMethodCallFrame --
//
//	How to invoke a procedure-like method.
//
// ----------------------------------------------------------------------

func sInvokeProcedureMethod(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOMethod.c:660:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var pmPtr uintptr = clientData
	var result int32
	var fdPtr uintptr // Important data that has to have a lifetime
	// matched by this function (or rather, by the
	// call frame's lifetime).

	// If the object namespace (or interpreter) were deleted, we just skip to
	// the next thing in the chain.

	if XTclOOObjectDestroyed(tls, (*CallContext)(unsafe.Pointer(context)).FoPtr) != 0 || XTcl_InterpDeleted(tls, interp) != 0 {
		return XTclNRObjectContextInvokeNext(tls, interp, context, objc, objv,
			XTcl_ObjectContextSkippedArgs(tls, context))
	}

	// Allocate the special frame data.

	fdPtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(PMFrameData{})))

	// Create a call frame for this method.

	result = sPushMethodCallFrame(tls, interp, context, pmPtr,
		objc, objv, fdPtr)
	if result != TCL_OK {
		XTclStackFree(tls, interp, fdPtr)
		return result
	}
	(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FrefCount++

	// Give the pre-call callback a chance to do some setup and, possibly,
	// veto the call.

	if (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FpreCallProc != uintptr(0) {
		// var isFinished int32 at bp, 4

		result = (*struct {
			f func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FpreCallProc})).f(tls, (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FclientData, interp, context,
			(*PMFrameData)(unsafe.Pointer(fdPtr)).FframePtr, bp)
		if *(*int32)(unsafe.Pointer(bp)) != 0 || result != TCL_OK {
			// Restore the old cmdPtr so that a subsequent use of [info frame]
			// won't crash on us. [Bug 3001438]

			(*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FcmdPtr = (*PMFrameData)(unsafe.Pointer(fdPtr)).FoldCmdPtr

			XTcl_PopCallFrame(tls, interp)
			XTclStackFree(tls, interp, (*PMFrameData)(unsafe.Pointer(fdPtr)).FframePtr)
			if libc.PostDecInt32(&(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FrefCount, 1) <= 1 {
				sDeleteProcedureMethodRecord(tls, pmPtr)
			}
			XTclStackFree(tls, interp, fdPtr)
			return result
		}
	}

	// Now invoke the body of the method.

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sFinalizePMCall}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = pmPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = context
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = fdPtr
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNRInterpProcCore(tls, interp, (*PMFrameData)(unsafe.Pointer(fdPtr)).FnameObj,
		XTcl_ObjectContextSkippedArgs(tls, context), (*PMFrameData)(unsafe.Pointer(fdPtr)).FerrProc)
}

func sFinalizePMCall(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOMethod.c:741:1: */
	var pmPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var context Tcl_ObjectContext = *(*ClientData)(unsafe.Pointer(data + 1*8))
	var fdPtr uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))

	// Give the post-call callback a chance to do some cleanup. Note that at
	// this point the call frame itself is invalid; it's already been popped.

	if (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FpostCallProc != 0 {
		result = (*struct {
			f func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, uintptr, int32) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FpostCallProc})).f(tls, (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FclientData, interp, context,
			XTcl_GetObjectNamespace(tls, XTcl_ObjectContextObject(tls, context)),
			result)
	}

	// Restore the old cmdPtr so that a subsequent use of [info frame] won't
	// crash on us. [Bug 3001438]

	(*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FcmdPtr = (*PMFrameData)(unsafe.Pointer(fdPtr)).FoldCmdPtr

	// Scrap the special frame data now that we're done with it. Note that we
	// are inlining DeleteProcedureMethod() here; this location is highly
	// sensitive when it comes to performance!

	if libc.PostDecInt32(&(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FrefCount, 1) <= 1 {
		sDeleteProcedureMethodRecord(tls, pmPtr)
	}
	XTclStackFree(tls, interp, fdPtr)
	return result
}

func sPushMethodCallFrame(tls *libc.TLS, interp uintptr, contextPtr uintptr, pmPtr uintptr, objc int32, objv uintptr, fdPtr uintptr) int32 { /* tclOOMethod.c:782:1: */
	var nsPtr uintptr
	var result int32
	var namePtr uintptr
	var framePtrPtr uintptr
	var mPtr uintptr
	var codePtr uintptr
	var method Tcl_Method
	nsPtr = (*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).FnamespacePtr
	framePtrPtr = fdPtr

	// Compute basic information on the basis of the type of method it is.

	if !((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&CONSTRUCTOR != 0) {
		goto __1
	}
	namePtr = ts + 49617 /* "<constructor>" */
	(*PMFrameData)(unsafe.Pointer(fdPtr)).FnameObj = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).FfPtr)).FconstructorName
	(*PMFrameData)(unsafe.Pointer(fdPtr)).FerrProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr)
	}{sConstructorErrorHandler}))
	goto __2
__1:
	if !((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fflags&DESTRUCTOR != 0) {
		goto __3
	}
	namePtr = ts + 49631 /* "<destructor>" */
	(*PMFrameData)(unsafe.Pointer(fdPtr)).FnameObj = (*Foundation1)(unsafe.Pointer((*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).FfPtr)).FdestructorName
	(*PMFrameData)(unsafe.Pointer(fdPtr)).FerrProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr)
	}{sDestructorErrorHandler}))
	goto __4
__3:
	(*PMFrameData)(unsafe.Pointer(fdPtr)).FnameObj = XTcl_MethodName(tls,
		XTcl_ObjectContextMethod(tls, contextPtr))
	namePtr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer((*PMFrameData)(unsafe.Pointer(fdPtr)).FnameObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer((*PMFrameData)(unsafe.Pointer(fdPtr)).FnameObj)).Fbytes
		}
		return XTcl_GetString(tls, (*PMFrameData)(unsafe.Pointer(fdPtr)).FnameObj)
	}()
	(*PMFrameData)(unsafe.Pointer(fdPtr)).FerrProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr)
	}{sMethodErrorHandler}))
__4:
	;
__2:
	;
	if !((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FerrProc != uintptr(0)) {
		goto __5
	}
	(*PMFrameData)(unsafe.Pointer(fdPtr)).FerrProc = (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FerrProc
__5:
	;

	// Magic to enable things like [incr Tcl], which wants methods to run in
	// their class's namespace.

	if !((*ProcedureMethod)(unsafe.Pointer(pmPtr)).Fflags&USE_DECLARER_NS != 0) {
		goto __6
	}
	mPtr =
		(*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr

	if !((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr != uintptr(0)) {
		goto __7
	}
	nsPtr = (*Object)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).FthisPtr)).FnamespacePtr
	goto __8
__7:
	nsPtr = (*Object1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr)).FnamespacePtr
__8:
	;
__6:
	;

	// Save the old cmdPtr so that when this recursive call returns, we can
	// restore it. To do otherwise causes crashes in [info frame] after we
	// return from a recursive call. [Bug 3001438]

	(*PMFrameData)(unsafe.Pointer(fdPtr)).FoldCmdPtr = (*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FcmdPtr

	// Compile the body. This operation may fail.

	(*PMFrameData)(unsafe.Pointer(fdPtr)).Fefi.Flength = 2
	libc.Xmemset(tls, fdPtr+24, 0, uint64(unsafe.Sizeof(Command{})))
	(*PMFrameData)(unsafe.Pointer(fdPtr)).Fcmd.FnsPtr = nsPtr
	(*PMFrameData)(unsafe.Pointer(fdPtr)).Fcmd.FclientData = fdPtr + 136
	(*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FcmdPtr = fdPtr + 24

	// [Bug 2037727] Always call TclProcCompileProc so that we check not only
	// that we have bytecode, but also that it remains valid. Note that we set
	// the namespace of the code here directly; this is a hack, but the
	// alternative is *so* slow...

	if !((*Tcl_Obj)(unsafe.Pointer((*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FbodyPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteCodeType))) {
		goto __9
	}
	codePtr =
		*(*uintptr)(unsafe.Pointer((*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FbodyPtr + 32))

	(*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr = nsPtr
__9:
	;
	result = XTclProcCompileProc(tls, interp, (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr,
		(*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FbodyPtr, nsPtr, ts+26429, namePtr)
	if !(result != TCL_OK) {
		goto __10
	}
	goto failureReturn
__10:
	;

	// Make the stack frame and fill it out with information about this call.
	// This operation may fail.

	XTclPushStackFrame(tls, interp, framePtrPtr,
		nsPtr, FRAME_IS_PROC|FRAME_IS_METHOD)

	(*CallFrame)(unsafe.Pointer((*PMFrameData)(unsafe.Pointer(fdPtr)).FframePtr)).FclientData = contextPtr
	(*CallFrame)(unsafe.Pointer((*PMFrameData)(unsafe.Pointer(fdPtr)).FframePtr)).Fobjc = objc
	(*CallFrame)(unsafe.Pointer((*PMFrameData)(unsafe.Pointer(fdPtr)).FframePtr)).Fobjv = objv
	(*CallFrame)(unsafe.Pointer((*PMFrameData)(unsafe.Pointer(fdPtr)).FframePtr)).FprocPtr = (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr

	// Finish filling out the extra frame info so that [info frame] works.

	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8)).Fname = ts + 26521 /* "method" */
	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8)).Fproc = uintptr(0)
	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8)).FclientData = (*PMFrameData)(unsafe.Pointer(fdPtr)).FnameObj
	if !((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FgfivProc != uintptr(0)) {
		goto __11
	}
	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8 + 1*24)).Fname = ts + 2631 /* "" */
	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8 + 1*24)).Fproc = (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FgfivProc
	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8 + 1*24)).FclientData = pmPtr
	goto __12
__11:
	method =
		XTcl_ObjectContextMethod(tls, contextPtr)

	if !(XTcl_MethodDeclarerObject(tls, method) != uintptr(0)) {
		goto __13
	}
	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8 + 1*24)).Fname = ts + 19320 /* "object" */
	goto __14
__13:
	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8 + 1*24)).Fname = ts + 16666 /* "class" */
__14:
	;
	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8 + 1*24)).Fproc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData) uintptr
	}{sRenderDeclarerName}))
	(*ExtraFrameInfoField)(unsafe.Pointer(fdPtr + 136 + 8 + 1*24)).FclientData = fdPtr + 200
	(*PMFrameData)(unsafe.Pointer(fdPtr)).Fpni.Finterp = interp
	(*PMFrameData)(unsafe.Pointer(fdPtr)).Fpni.Fmethod = method
__12:
	;

	return TCL_OK

	// Restore the old cmdPtr so that a subsequent use of [info frame] won't
	// crash on us. [Bug 3001438]

failureReturn:
	(*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FcmdPtr = (*PMFrameData)(unsafe.Pointer(fdPtr)).FoldCmdPtr
	return result
}

// ----------------------------------------------------------------------
//
// TclOOSetupVariableResolver, etc. --
//
//	Variable resolution engine used to connect declared variables to local
//	variables used in methods. The compiled variable resolver is more
//	important, but both are needed as it is possible to have a variable
//	that is only referred to in ways that aren't compilable and we can't
//	force LVT presence. [TIP #320]
//
// ----------------------------------------------------------------------

func XTclOOSetupVariableResolver(tls *libc.TLS, nsPtr uintptr) { /* tclOOMethod.c:939:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var info Tcl_ResolverInfo at bp, 24

	XTcl_GetNamespaceResolvers(tls, nsPtr, bp)
	if (*Tcl_ResolverInfo)(unsafe.Pointer(bp)).FcompiledVarResProc == uintptr(0) {
		XTcl_SetNamespaceResolvers(tls, nsPtr, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
		}{sProcedureMethodVarResolver})),
			*(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32
			}{sProcedureMethodCompiledVarResolver})))
	}
}

func sProcedureMethodVarResolver(tls *libc.TLS, interp uintptr, varName uintptr, contextNs uintptr, flags int32, varPtr uintptr) int32 { /* tclOOMethod.c:952:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var result int32
	*(*uintptr)(unsafe.Pointer(bp /* rPtr */)) = uintptr(0)

	result = sProcedureMethodCompiledVarResolver(tls, interp, varName,
		int32(libc.Xstrlen(tls, varName)), contextNs, bp)

	if result != TCL_OK {
		return result
	}

	*(*Tcl_Var)(unsafe.Pointer(varPtr)) = (*struct {
		f func(*libc.TLS, uintptr, uintptr) Tcl_Var
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ResolvedVarInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* rPtr */)))).FfetchProc})).f(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* rPtr */)))

	// Must not retain reference to resolved information. [Bug 3105999]

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ResolvedVarInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* rPtr */)))).FdeleteProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp /* rPtr */)))
	return func() int32 {
		if *(*Tcl_Var)(unsafe.Pointer(varPtr)) != 0 {
			return TCL_OK
		}
		return TCL_CONTINUE
	}()
}

func sProcedureMethodCompiledVarConnect(tls *libc.TLS, interp uintptr, rPtr uintptr) Tcl_Var { /* tclOOMethod.c:980:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var infoPtr uintptr
	var iPtr uintptr
	var framePtr uintptr
	var contextPtr uintptr
	var variableObj uintptr
	var hPtr uintptr
	var i int32
	// var isNew int32 at bp+8, 4

	var cacheIt int32
	// var varLen int32 at bp, 4

	// var len int32 at bp+4, 4

	var match uintptr
	var varName uintptr
	infoPtr = rPtr
	iPtr = interp
	framePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr

	// Check that the variable is being requested in a context that is also a
	// method call; if not (i.e. we're evaluating in the object's namespace or
	// in a procedure of that namespace) then we do nothing.

	if !(framePtr == uintptr(0) || !((*CallFrame)(unsafe.Pointer(framePtr)).FisProcCallFrame&FRAME_IS_METHOD != 0)) {
		goto __1
	}
	return uintptr(0)
__1:
	;
	contextPtr = (*CallFrame)(unsafe.Pointer(framePtr)).FclientData

	// If we've done the work before (in a comparable context) then reuse that
	// rather than performing resolution ourselves.

	if !((*OOResVarInfo)(unsafe.Pointer(infoPtr)).FcachedObjectVar != 0) {
		goto __2
	}
	return (*OOResVarInfo)(unsafe.Pointer(infoPtr)).FcachedObjectVar
__2:
	;

	// Check if the variable is one we want to resolve at all (i.e. whether it
	// is in the list provided by the user). If not, we mustn't do anything
	// either.

	varName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer((*OOResVarInfo)(unsafe.Pointer(infoPtr)).FvariableObj)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer((*OOResVarInfo)(unsafe.Pointer(infoPtr)).FvariableObj)).Flength
				return (*Tcl_Obj)(unsafe.Pointer((*OOResVarInfo)(unsafe.Pointer(infoPtr)).FvariableObj)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, (*OOResVarInfo)(unsafe.Pointer(infoPtr)).FvariableObj, bp)
	}()
	if !((*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr)).FdeclaringClassPtr != uintptr(0)) {
		goto __3
	}
	i = 0
__5:
	if !(i < (*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr)).FdeclaringClassPtr)).Fvariables.Fnum) {
		goto __7
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr)).FdeclaringClassPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __8
	}
	goto __6
	goto __9
__8:
	if !func() bool {
		variableObj = *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer((*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain+uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr)).FdeclaringClassPtr)).Fvariables.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __10
	}
	match = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(variableObj)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, variableObj, bp+4)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 4)) == *(*int32)(unsafe.Pointer(bp)) && !(libc.Xmemcmp(tls, match, varName, uint64(*(*int32)(unsafe.Pointer(bp + 4)))) != 0)) {
		goto __11
	}
	cacheIt = 0
	goto gotMatch
__11:
	;
__10:
	;
__9:
	;
	goto __6
__6:
	i++
	goto __5
	goto __7
__7:
	;
	goto __4
__3:
	i = 0
__12:
	if !(i < (*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).Fvariables.Fnum) {
		goto __14
	}
	if !(*(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __15
	}
	goto __13
	goto __16
__15:
	if !func() bool {
		variableObj = *(*uintptr)(unsafe.Pointer((*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).Fvariables.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __17
	}
	match = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(variableObj)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(variableObj)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, variableObj, bp+4)
	}()
	if !(*(*int32)(unsafe.Pointer(bp + 4)) == *(*int32)(unsafe.Pointer(bp)) && !(libc.Xmemcmp(tls, match, varName, uint64(*(*int32)(unsafe.Pointer(bp + 4)))) != 0)) {
		goto __18
	}
	cacheIt = 1
	goto gotMatch
__18:
	;
__17:
	;
__16:
	;
	goto __13
__13:
	i++
	goto __12
	goto __14
__14:
	;
__4:
	;
	return uintptr(0)

	// It is a variable we want to resolve, so resolve it.

gotMatch:
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).FnamespacePtr + 248 /* &.varTable */)).FcreateProc})).f(tls, (*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).FnamespacePtr+248 /* &.varTable */, variableObj, bp+8 /* &isNew */)
	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		goto __19
	}
	if !!((*Var)(unsafe.Pointer(hPtr-uintptr(int32(uintptr(0)+24)))).Fflags&VAR_NAMESPACE_VAR != 0) {
		goto __20
	}
	*(*int32)(unsafe.Pointer(hPtr - uintptr(int32(uintptr(0)+24)))) |= VAR_NAMESPACE_VAR
	if !((*Var)(unsafe.Pointer(hPtr-uintptr(int32(uintptr(0)+24)))).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __21
	}
	(*VarInHash)(unsafe.Pointer(hPtr-uintptr(int32(uintptr(0)+24)))).FrefCount++
__21:
	;
__20:
	;

__19:
	;
	if !(cacheIt != 0) {
		goto __22
	}
	(*OOResVarInfo)(unsafe.Pointer(infoPtr)).FcachedObjectVar = hPtr - uintptr(int32(uintptr(0)+24))

	// We must keep a reference to the variable so everything will
	// continue to work correctly even if it is unset; being unset does
	// not end the life of the variable at this level. [Bug 3185009]

	(*VarInHash)(unsafe.Pointer((*OOResVarInfo)(unsafe.Pointer(infoPtr)).FcachedObjectVar)).FrefCount++
__22:
	;
	return hPtr - uintptr(int32(uintptr(0)+24))
}

func sProcedureMethodCompiledVarDelete(tls *libc.TLS, rPtr uintptr) { /* tclOOMethod.c:1066:1: */
	var infoPtr uintptr = rPtr

	// Release the reference to the variable if we were holding it.

	if (*OOResVarInfo)(unsafe.Pointer(infoPtr)).FcachedObjectVar != 0 {
		(*VarInHash)(unsafe.Pointer((*OOResVarInfo)(unsafe.Pointer(infoPtr)).FcachedObjectVar)).FrefCount--
		XTclCleanupVar(tls, (*OOResVarInfo)(unsafe.Pointer(infoPtr)).FcachedObjectVar, uintptr(0))
	}
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*OOResVarInfo)(unsafe.Pointer(infoPtr)).FvariableObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTclpFree(tls, infoPtr)
}

func sProcedureMethodCompiledVarResolver(tls *libc.TLS, interp uintptr, varName uintptr, length int32, contextNs uintptr, rPtrPtr uintptr) int32 { /* tclOOMethod.c:1084:1: */
	var infoPtr uintptr
	var variableObj uintptr = XTcl_NewStringObj(tls, varName, length)

	// Do not create resolvers for cases that contain namespace separators or
	// which look like array accesses. Both will lead us astray.

	if libc.Xstrstr(tls, XTcl_GetString(tls, variableObj), ts+7376) != uintptr(0) || XTcl_StringMatch(tls, XTcl_GetString(tls, variableObj), ts+53051) != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = variableObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return TCL_CONTINUE
	}

	infoPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(OOResVarInfo{})))
	(*OOResVarInfo)(unsafe.Pointer(infoPtr)).Finfo.FfetchProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr) Tcl_Var
	}{sProcedureMethodCompiledVarConnect}))
	(*OOResVarInfo)(unsafe.Pointer(infoPtr)).Finfo.FdeleteProc = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sProcedureMethodCompiledVarDelete}))
	(*OOResVarInfo)(unsafe.Pointer(infoPtr)).FcachedObjectVar = uintptr(0)
	(*OOResVarInfo)(unsafe.Pointer(infoPtr)).FvariableObj = variableObj
	(*Tcl_Obj)(unsafe.Pointer(variableObj)).FrefCount++
	*(*uintptr)(unsafe.Pointer(rPtrPtr)) = infoPtr
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// RenderDeclarerName --
//
//	Returns the name of the entity (object or class) which declared a
//	method. Used for producing information for [info frame] in such a way
//	that the expensive part of this (generating the object or class name
//	itself) isn't done until it is needed.
//
// ----------------------------------------------------------------------

func sRenderDeclarerName(tls *libc.TLS, clientData ClientData) uintptr { /* tclOOMethod.c:1128:16: */
	var pni uintptr = clientData
	var object Tcl_Object = XTcl_MethodDeclarerObject(tls, (*PNI)(unsafe.Pointer(pni)).Fmethod)

	if object == uintptr(0) {
		object = XTcl_GetClassAsObject(tls, XTcl_MethodDeclarerClass(tls, (*PNI)(unsafe.Pointer(pni)).Fmethod))
	}
	return XTclOOObjectName(tls, (*PNI)(unsafe.Pointer(pni)).Finterp, object)
}

// ----------------------------------------------------------------------
//
// MethodErrorHandler, ConstructorErrorHandler, DestructorErrorHandler --
//
//	How to fill in the stack trace correctly upon error in various forms
//	of procedure-like methods. LIMIT is how long the inserted strings in
//	the error traces should get before being converted to have ellipses,
//	and ELLIPSIFY is a macro to do the conversion (with the help of a
//	%.*s%s format field). Note that ELLIPSIFY is only safe for use in
//	suitable formatting contexts.
//
// ----------------------------------------------------------------------

func sMethodErrorHandler(tls *libc.TLS, interp uintptr, methodNameObj uintptr) { /* tclOOMethod.c:1161:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	// var nameLen int32 at bp+64, 4

	// var objectNameLen int32 at bp+68, 4

	var contextPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FclientData
	var mPtr uintptr = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr
	var objectName uintptr
	var kindName uintptr
	var methodName uintptr = XTcl_GetStringFromObj(tls, (*Method)(unsafe.Pointer(mPtr)).FnamePtr, bp+64)
	var declarerPtr uintptr

	if (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr != uintptr(0) {
		declarerPtr = (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr
		kindName = ts + 19320 /* "object" */
	} else {
		if (*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr == uintptr(0) {
			XTcl_Panic(tls, ts+53598, 0)
		}
		declarerPtr = (*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).FthisPtr
		kindName = ts + 16666 /* "class" */
	}

	objectName = XTcl_GetStringFromObj(tls, XTclOOObjectName(tls, interp, declarerPtr),
		bp+68)
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+53637,
		libc.VaList(bp, kindName, func() int32 {
			if *(*int32)(unsafe.Pointer(bp + 68)) > LIMIT {
				return LIMIT
			}
			return *(*int32)(unsafe.Pointer(bp + 68))
		}(), objectName, func() uintptr {
			if *(*int32)(unsafe.Pointer(bp + 68)) > LIMIT {
				return ts + 8420 /* "..." */
			}
			return ts + 2631 /* "" */
		}(),
			func() int32 {
				if *(*int32)(unsafe.Pointer(bp + 64)) > LIMIT {
					return LIMIT
				}
				return *(*int32)(unsafe.Pointer(bp + 64))
			}(), methodName, func() uintptr {
				if *(*int32)(unsafe.Pointer(bp + 64)) > LIMIT {
					return ts + 8420 /* "..." */
				}
				return ts + 2631 /* "" */
			}(), XTcl_GetErrorLine(tls, interp))))
}

func sConstructorErrorHandler(tls *libc.TLS, interp uintptr, methodNameObj uintptr) { /* tclOOMethod.c:1192:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var contextPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FclientData
	var mPtr uintptr = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr
	var declarerPtr uintptr
	var objectName uintptr
	var kindName uintptr
	// var objectNameLen int32 at bp+40, 4

	if (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr != uintptr(0) {
		declarerPtr = (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr
		kindName = ts + 19320 /* "object" */
	} else {
		if (*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr == uintptr(0) {
			XTcl_Panic(tls, ts+53598, 0)
		}
		declarerPtr = (*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).FthisPtr
		kindName = ts + 16666 /* "class" */
	}

	objectName = XTcl_GetStringFromObj(tls, XTclOOObjectName(tls, interp, declarerPtr),
		bp+40)
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+53680, libc.VaList(bp, kindName,
			func() int32 {
				if *(*int32)(unsafe.Pointer(bp + 40)) > LIMIT {
					return LIMIT
				}
				return *(*int32)(unsafe.Pointer(bp + 40))
			}(), objectName, func() uintptr {
				if *(*int32)(unsafe.Pointer(bp + 40)) > LIMIT {
					return ts + 8420 /* "..." */
				}
				return ts + 2631 /* "" */
			}(), XTcl_GetErrorLine(tls, interp))))
}

func sDestructorErrorHandler(tls *libc.TLS, interp uintptr, methodNameObj uintptr) { /* tclOOMethod.c:1221:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var contextPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FclientData
	var mPtr uintptr = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr
	var declarerPtr uintptr
	var objectName uintptr
	var kindName uintptr
	// var objectNameLen int32 at bp+40, 4

	if (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr != uintptr(0) {
		declarerPtr = (*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr
		kindName = ts + 19320 /* "object" */
	} else {
		if (*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr == uintptr(0) {
			XTcl_Panic(tls, ts+53598, 0)
		}
		declarerPtr = (*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).FthisPtr
		kindName = ts + 16666 /* "class" */
	}

	objectName = XTcl_GetStringFromObj(tls, XTclOOObjectName(tls, interp, declarerPtr),
		bp+40)
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+53719, libc.VaList(bp, kindName,
			func() int32 {
				if *(*int32)(unsafe.Pointer(bp + 40)) > LIMIT {
					return LIMIT
				}
				return *(*int32)(unsafe.Pointer(bp + 40))
			}(), objectName, func() uintptr {
				if *(*int32)(unsafe.Pointer(bp + 40)) > LIMIT {
					return ts + 8420 /* "..." */
				}
				return ts + 2631 /* "" */
			}(), XTcl_GetErrorLine(tls, interp))))
}

// ----------------------------------------------------------------------
//
// DeleteProcedureMethod, CloneProcedureMethod --
//
//	How to delete and clone procedure-like methods.
//
// ----------------------------------------------------------------------

func sDeleteProcedureMethodRecord(tls *libc.TLS, pmPtr uintptr) { /* tclOOMethod.c:1260:1: */
	XTclProcDeleteProc(tls, (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)
	if (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FdeleteClientdataProc != 0 {
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FdeleteClientdataProc})).f(tls, (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FclientData)
	}
	XTclpFree(tls, pmPtr)
}

func sDeleteProcedureMethod(tls *libc.TLS, clientData ClientData) { /* tclOOMethod.c:1271:1: */
	var pmPtr uintptr = clientData

	if libc.PostDecInt32(&(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FrefCount, 1) <= 1 {
		sDeleteProcedureMethodRecord(tls, pmPtr)
	}
}

func sCloneProcedureMethod(tls *libc.TLS, interp uintptr, clientData ClientData, newClientData uintptr) int32 { /* tclOOMethod.c:1282:1: */
	var pmPtr uintptr = clientData
	var pm2Ptr uintptr
	var bodyObj uintptr
	var argsObj uintptr
	var localPtr uintptr

	// Copy the argument list.

	argsObj = XTcl_NewObj(tls)
	for localPtr = (*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FfirstLocalPtr; localPtr != uintptr(0); localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr {
		if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARGUMENT != 0 {
			var argObj uintptr = XTcl_NewObj(tls)

			XTcl_ListObjAppendElement(tls, uintptr(0), argObj,
				XTcl_NewStringObj(tls, localPtr+40, -1))
			if (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr != uintptr(0) {
				XTcl_ListObjAppendElement(tls, uintptr(0), argObj, (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr)
			}
			XTcl_ListObjAppendElement(tls, uintptr(0), argsObj, argObj)
		}
	}

	// Must strip the internal representation in order to ensure that any
	// bound references to instance variables are removed. [Bug 3609693]

	bodyObj = XTcl_DuplicateObj(tls, (*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FbodyPtr)
	XTcl_GetString(tls, bodyObj)
	if (*Tcl_Obj)(unsafe.Pointer(bodyObj)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bodyObj)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bodyObj)).FtypePtr)).FfreeIntRepProc})).f(tls, bodyObj)
		}
		(*Tcl_Obj)(unsafe.Pointer(bodyObj)).FtypePtr = uintptr(0)
	}

	// Create the actual copy of the method record, manufacturing a new proc
	// record.

	pm2Ptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ProcedureMethod{})))
	libc.Xmemcpy(tls, pm2Ptr, pmPtr, uint64(unsafe.Sizeof(ProcedureMethod{})))
	(*ProcedureMethod)(unsafe.Pointer(pm2Ptr)).FrefCount = 1
	(*Tcl_Obj)(unsafe.Pointer(argsObj)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(bodyObj)).FrefCount++
	if XTclCreateProc(tls, interp, uintptr(0), ts+2631, argsObj, bodyObj,
		pm2Ptr+8) != TCL_OK {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = argsObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = bodyObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		XTclpFree(tls, pm2Ptr)
		return TCL_ERROR
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = argsObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok3 := true; ok3; ok3 = 0 != 0 {
		var _objPtr uintptr = bodyObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	if (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FcloneClientdataProc != 0 {
		(*ProcedureMethod)(unsafe.Pointer(pm2Ptr)).FclientData = (*struct {
			f func(*libc.TLS, ClientData) ClientData
		})(unsafe.Pointer(&struct{ uintptr }{(*ProcedureMethod)(unsafe.Pointer(pmPtr)).FcloneClientdataProc})).f(tls, (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FclientData)
	}
	*(*ClientData)(unsafe.Pointer(newClientData)) = pm2Ptr
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOONewForwardInstanceMethod --
//
//	Create a forwarded method for an object.
//
// ----------------------------------------------------------------------

func XTclOONewForwardInstanceMethod(tls *libc.TLS, interp uintptr, oPtr uintptr, flags int32, nameObj uintptr, prefixObj uintptr) uintptr { /* tclOOMethod.c:1357:8: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	// var prefixLen int32 at bp+32, 4

	var fmPtr uintptr

	if XTcl_ListObjLength(tls, interp, prefixObj, bp+32) != TCL_OK {
		return uintptr(0)
	}
	if *(*int32)(unsafe.Pointer(bp + 32)) < 1 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+53757, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+53797, uintptr(0)))
		return uintptr(0)
	}

	fmPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ForwardMethod{})))
	(*ForwardMethod)(unsafe.Pointer(fmPtr)).FprefixObj = prefixObj
	(*Tcl_Obj)(unsafe.Pointer(prefixObj)).FrefCount++
	return XTcl_NewInstanceMethod(tls, interp, oPtr,
		nameObj, flags, uintptr(unsafe.Pointer(&fwdMethodType)), fmPtr)
}

// ----------------------------------------------------------------------
//
// TclOONewForwardMethod --
//
//	Create a new forwarded method for a class.
//
// ----------------------------------------------------------------------

func XTclOONewForwardMethod(tls *libc.TLS, interp uintptr, clsPtr uintptr, flags int32, nameObj uintptr, prefixObj uintptr) uintptr { /* tclOOMethod.c:1396:8: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	// var prefixLen int32 at bp+32, 4

	var fmPtr uintptr

	if XTcl_ListObjLength(tls, interp, prefixObj, bp+32) != TCL_OK {
		return uintptr(0)
	}
	if *(*int32)(unsafe.Pointer(bp + 32)) < 1 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+53757, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+29131, ts+53797, uintptr(0)))
		return uintptr(0)
	}

	fmPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ForwardMethod{})))
	(*ForwardMethod)(unsafe.Pointer(fmPtr)).FprefixObj = prefixObj
	(*Tcl_Obj)(unsafe.Pointer(prefixObj)).FrefCount++
	return XTcl_NewMethod(tls, interp, clsPtr, nameObj,
		flags, uintptr(unsafe.Pointer(&fwdMethodType)), fmPtr)
}

// ----------------------------------------------------------------------
//
// InvokeForwardMethod --
//
//	How to invoke a forwarded method. Works by doing some ensemble-like
//	command rearranging and then invokes some other Tcl command.
//
// ----------------------------------------------------------------------

func sInvokeForwardMethod(tls *libc.TLS, clientData ClientData, interp uintptr, context Tcl_ObjectContext, objc int32, objv uintptr) int32 { /* tclOOMethod.c:1437:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var contextPtr uintptr = context
	var fmPtr uintptr = clientData
	var argObjs uintptr
	// var prefixObjs uintptr at bp+8, 8

	// var numPrefixes int32 at bp, 4

	// var len int32 at bp+16, 4

	var skip int32 = (*CallContext)(unsafe.Pointer(contextPtr)).Fskip

	// Build the real list of arguments to use. Note that we know that the
	// prefixObj field of the ForwardMethod structure holds a reference to a
	// non-empty list, so there's a whole class of failures ("not a list") we
	// can ignore here.

	XTcl_ListObjGetElements(tls, uintptr(0), (*ForwardMethod)(unsafe.Pointer(fmPtr)).FprefixObj, bp, bp+8)
	argObjs = sInitEnsembleRewrite(tls, interp, objc, objv, skip,
		*(*int32)(unsafe.Pointer(bp /* numPrefixes */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* prefixObjs */)), bp+16)
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sFinalizeForwardCall})), argObjs, uintptr(0), uintptr(0), uintptr(0))
	// NOTE: The combination of direct set of iPtr->lookupNsPtr and the use
	// of the TCL_EVAL_NOERR flag results in an evaluation configuration
	// very much like TCL_EVAL_INVOKE.
	(*Interp)(unsafe.Pointer(interp)).FlookupNsPtr = (*Object)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FoPtr)).FnamespacePtr
	return XTclNREvalObjv(tls, interp, *(*int32)(unsafe.Pointer(bp + 16 /* len */)), argObjs, TCL_EVAL_NOERR, uintptr(0))
}

func sFinalizeForwardCall(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclOOMethod.c:1471:1: */
	var argObjs uintptr = *(*ClientData)(unsafe.Pointer(data))

	XTclStackFree(tls, interp, argObjs)
	return result
}

// ----------------------------------------------------------------------
//
// DeleteForwardMethod, CloneForwardMethod --
//
//	How to delete and clone forwarded methods.
//
// ----------------------------------------------------------------------

func sDeleteForwardMethod(tls *libc.TLS, clientData ClientData) { /* tclOOMethod.c:1493:1: */
	var fmPtr uintptr = clientData

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*ForwardMethod)(unsafe.Pointer(fmPtr)).FprefixObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTclpFree(tls, fmPtr)
}

func sCloneForwardMethod(tls *libc.TLS, interp uintptr, clientData ClientData, newClientData uintptr) int32 { /* tclOOMethod.c:1503:1: */
	var fmPtr uintptr = clientData
	var fm2Ptr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ForwardMethod{})))

	(*ForwardMethod)(unsafe.Pointer(fm2Ptr)).FprefixObj = (*ForwardMethod)(unsafe.Pointer(fmPtr)).FprefixObj
	(*Tcl_Obj)(unsafe.Pointer((*ForwardMethod)(unsafe.Pointer(fm2Ptr)).FprefixObj)).FrefCount++
	*(*ClientData)(unsafe.Pointer(newClientData)) = fm2Ptr
	return TCL_OK
}

// ----------------------------------------------------------------------
//
// TclOOGetProcFromMethod, TclOOGetFwdFromMethod --
//
//	Utility functions used for procedure-like and forwarding method
//	introspection.
//
// ----------------------------------------------------------------------

func XTclOOGetProcFromMethod(tls *libc.TLS, mPtr uintptr) uintptr { /* tclOOMethod.c:1528:6: */
	if (*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(unsafe.Pointer(&procMethodType)) {
		var pmPtr uintptr = (*Method)(unsafe.Pointer(mPtr)).FclientData

		return (*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr
	}
	return uintptr(0)
}

func XTclOOGetMethodBody(tls *libc.TLS, mPtr uintptr) uintptr { /* tclOOMethod.c:1540:9: */
	if (*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(unsafe.Pointer(&procMethodType)) {
		var pmPtr uintptr = (*Method)(unsafe.Pointer(mPtr)).FclientData

		if (*Tcl_Obj)(unsafe.Pointer((*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FbodyPtr)).Fbytes == uintptr(0) {
			XTcl_GetString(tls, (*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FbodyPtr)
		}
		return (*Proc)(unsafe.Pointer((*ProcedureMethod)(unsafe.Pointer(pmPtr)).FprocPtr)).FbodyPtr
	}
	return uintptr(0)
}

func XTclOOGetFwdFromMethod(tls *libc.TLS, mPtr uintptr) uintptr { /* tclOOMethod.c:1555:9: */
	if (*Method)(unsafe.Pointer(mPtr)).FtypePtr == uintptr(unsafe.Pointer(&fwdMethodType)) {
		var fwPtr uintptr = (*Method)(unsafe.Pointer(mPtr)).FclientData

		return (*ForwardMethod)(unsafe.Pointer(fwPtr)).FprefixObj
	}
	return uintptr(0)
}

// ----------------------------------------------------------------------
//
// InitEnsembleRewrite --
//
//	Utility function that wraps up a lot of the complexity involved in
//	doing ensemble-like command forwarding. Here is a picture of memory
//	management plan:
//
//                    <-----------------objc---------------------->
//      objv:        |=============|===============================|
//                    <-toRewrite->           |
//                                              *                    <-rewriteLength->          *      rewriteObjs: |=================|          *                           |                    |
//                           V                    V
//      argObjs:     |=================|===============================|
//                    <------------------*lengthPtr------------------->
//
// ----------------------------------------------------------------------

func sInitEnsembleRewrite(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, toRewrite int32, rewriteLength int32, rewriteObjs uintptr, lengthPtr uintptr) uintptr { /* tclOOMethod.c:1590:16: */
	var len uint32 = uint32(rewriteLength + objc - toRewrite)
	var argObjs uintptr = XTclStackAlloc(tls, interp, int32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(len)))

	libc.Xmemcpy(tls, argObjs, rewriteObjs, uint64(rewriteLength)*uint64(unsafe.Sizeof(uintptr(0))))
	libc.Xmemcpy(tls, argObjs+uintptr(rewriteLength)*8, objv+uintptr(toRewrite)*8,
		uint64(unsafe.Sizeof(uintptr(0)))*uint64(objc-toRewrite))

	// Now plumb this into the core ensemble rewrite logging system so that
	// Tcl_WrongNumArgs() can rewrite its result appropriately. The rules for
	// how to store the rewrite rules get complex solely because of the case
	// where an ensemble rewrites itself out of the picture; when that
	// happens, the quality of the error message rewrite falls drastically
	// (and unavoidably).

	if XTclInitRewriteEnsemble(tls, interp, toRewrite, rewriteLength, objv) != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{XTclClearRootEnsemble}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
	}
	*(*int32)(unsafe.Pointer(lengthPtr)) = int32(len)
	return argObjs
}

// ----------------------------------------------------------------------
//
// assorted trivial 'getter' functions
//
// ----------------------------------------------------------------------

func XTcl_MethodDeclarerObject(tls *libc.TLS, method Tcl_Method) Tcl_Object { /* tclOOMethod.c:1633:1: */
	return (*Method)(unsafe.Pointer(method)).FdeclaringObjectPtr
}

func XTcl_MethodDeclarerClass(tls *libc.TLS, method Tcl_Method) Tcl_Class { /* tclOOMethod.c:1640:1: */
	return (*Method)(unsafe.Pointer(method)).FdeclaringClassPtr
}

func XTcl_MethodName(tls *libc.TLS, method Tcl_Method) uintptr { /* tclOOMethod.c:1646:9: */
	return (*Method)(unsafe.Pointer(method)).FnamePtr
}

func XTcl_MethodIsType(tls *libc.TLS, method Tcl_Method, typePtr uintptr, clientDataPtr uintptr) int32 { /* tclOOMethod.c:1654:1: */
	var mPtr uintptr = method

	if (*Method)(unsafe.Pointer(mPtr)).FtypePtr == typePtr {
		if clientDataPtr != uintptr(0) {
			*(*ClientData)(unsafe.Pointer(clientDataPtr)) = (*Method)(unsafe.Pointer(mPtr)).FclientData
		}
		return 1
	}
	return 0
}

func XTcl_MethodIsPublic(tls *libc.TLS, method Tcl_Method) int32 { /* tclOOMethod.c:1671:1: */
	if (*Method)(unsafe.Pointer(method)).Fflags&PUBLIC_METHOD != 0 {
		return 1
	}
	return 0
}

// Extended method construction for itcl-ng.

func XTclOONewProcInstanceMethodEx(tls *libc.TLS, interp uintptr, oPtr Tcl_Object, preCallPtr uintptr, postCallPtr uintptr, errProc uintptr, clientData ClientData, nameObj uintptr, argsObj uintptr, bodyObj uintptr, flags int32, internalTokenPtr uintptr) Tcl_Method { /* tclOOMethod.c:1682:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var pmPtr uintptr at bp, 8

	var method Tcl_Method = XTclOONewProcInstanceMethod(tls, interp,
		oPtr, flags, nameObj, argsObj, bodyObj, bp)

	if method == uintptr(0) {
		return uintptr(0)
	}
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).Fflags = flags & USE_DECLARER_NS
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).FpreCallProc = preCallPtr
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).FpostCallProc = postCallPtr
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).FerrProc = errProc
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).FclientData = clientData
	if internalTokenPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(internalTokenPtr)) = *(*uintptr)(unsafe.Pointer(bp /* pmPtr */))
	}
	return method
}

func XTclOONewProcMethodEx(tls *libc.TLS, interp uintptr, clsPtr Tcl_Class, preCallPtr uintptr, postCallPtr uintptr, errProc uintptr, clientData ClientData, nameObj uintptr, argsObj uintptr, bodyObj uintptr, flags int32, internalTokenPtr uintptr) Tcl_Method { /* tclOOMethod.c:1719:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var pmPtr uintptr at bp, 8

	var method Tcl_Method = XTclOONewProcMethod(tls, interp,
		clsPtr, flags, nameObj, argsObj, bodyObj, bp)

	if method == uintptr(0) {
		return uintptr(0)
	}
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).Fflags = flags & USE_DECLARER_NS
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).FpreCallProc = preCallPtr
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).FpostCallProc = postCallPtr
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).FerrProc = errProc
	(*ProcedureMethod)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pmPtr */)))).FclientData = clientData
	if internalTokenPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(internalTokenPtr)) = *(*uintptr)(unsafe.Pointer(bp /* pmPtr */))
	}
	return method
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// !BEGIN!: Do not edit below this line.

var tclOOIntStubs = TclOOIntStubs{
	Fmagic:                         libc.Int32FromUint32(0xFCA3BACF),
	FtclOOGetDefineCmdContext:      0, // 0
	FtclOOMakeProcInstanceMethod:   0, // 1
	FtclOOMakeProcMethod:           0, // 2
	FtclOONewProcInstanceMethod:    0, // 3
	FtclOONewProcMethod:            0, // 4
	FtclOOObjectCmdCore:            0, // 5
	FtclOOIsReachable:              0, // 6
	FtclOONewForwardMethod:         0, // 7
	FtclOONewForwardInstanceMethod: 0, // 8
	FtclOONewProcInstanceMethodEx:  0, // 9
	FtclOONewProcMethodEx:          0, // 10
	FtclOOInvokeObject:             0, // 11
	FtclOOObjectSetFilters:         0, // 12
	FtclOOClassSetFilters:          0, // 13
	FtclOOObjectSetMixins:          0, // 14
	FtclOOClassSetMixins:           0, // 15
} /* tclOOStubInit.c:21:28 */

var tclOOStubHooks = TclOOStubHooks{
	FtclOOIntStubs: 0,
} /* tclOOStubInit.c:42:29 */

var XtclOOStubs = TclOOStubs{
	Fmagic:                         libc.Int32FromUint32(0xFCA3BACF),
	Fhooks:                         0,
	Ftcl_CopyObjectInstance:        0, // 0
	Ftcl_GetClassAsObject:          0, // 1
	Ftcl_GetObjectAsClass:          0, // 2
	Ftcl_GetObjectCommand:          0, // 3
	Ftcl_GetObjectFromObj:          0, // 4
	Ftcl_GetObjectNamespace:        0, // 5
	Ftcl_MethodDeclarerClass:       0, // 6
	Ftcl_MethodDeclarerObject:      0, // 7
	Ftcl_MethodIsPublic:            0, // 8
	Ftcl_MethodIsType:              0, // 9
	Ftcl_MethodName:                0, // 10
	Ftcl_NewInstanceMethod:         0, // 11
	Ftcl_NewMethod:                 0, // 12
	Ftcl_NewObjectInstance:         0, // 13
	Ftcl_ObjectDeleted:             0, // 14
	Ftcl_ObjectContextIsFiltering:  0, // 15
	Ftcl_ObjectContextMethod:       0, // 16
	Ftcl_ObjectContextObject:       0, // 17
	Ftcl_ObjectContextSkippedArgs:  0, // 18
	Ftcl_ClassGetMetadata:          0, // 19
	Ftcl_ClassSetMetadata:          0, // 20
	Ftcl_ObjectGetMetadata:         0, // 21
	Ftcl_ObjectSetMetadata:         0, // 22
	Ftcl_ObjectContextInvokeNext:   0, // 23
	Ftcl_ObjectGetMethodNameMapper: 0, // 24
	Ftcl_ObjectSetMethodNameMapper: 0, // 25
	Ftcl_ClassSetConstructor:       0, // 26
	Ftcl_ClassSetDestructor:        0, // 27
	Ftcl_GetObjectName:             0, // 31
} /* tclOOStubInit.c:46:18 */

// !END!: Do not edit above this line.

var XtclOOStubsPtr uintptr = uintptr(0)    /* tclOOStubLib.c:10:18 */
var XtclOOIntStubsPtr uintptr = uintptr(0) /* tclOOStubLib.c:11:21 */

//----------------------------------------------------------------------
//
// TclOOInitializeStubs --
//	Load the tclOO package, initialize stub table pointer. Do not call
//	this function directly, use Tcl_OOInitStubs() macro instead.
//
// Results:
//	The actual version of the package that satisfies the request, or NULL
//	to indicate that an error occurred.
//
// Side effects:
//	Sets the stub table pointers.
//
//----------------------------------------------------------------------

func XTclOOInitializeStubs(tls *libc.TLS, interp uintptr, version uintptr) uintptr { /* tclOOStubLib.c:32:25: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var exact int32 = 0
	var packageName uintptr = ts + 49550 /* "TclOO" */
	var errMsg uintptr = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 72 /* stubsPtr */)) = uintptr(0)
	var actualVersion uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_PkgRequireEx})).f(tls, interp,
		packageName, version, exact, bp+72 /* &stubsPtr */)

	if actualVersion == uintptr(0) {
		return uintptr(0)
	}
	if *(*uintptr)(unsafe.Pointer(bp + 72)) == uintptr(0) {
		errMsg = ts + 53809 /* "missing stub tab..." */
	} else {
		XtclOOStubsPtr = *(*uintptr)(unsafe.Pointer(bp + 72 /* stubsPtr */))
		if (*TclOOStubs)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).Fhooks != 0 {
			XtclOOIntStubsPtr = (*TclOOStubHooks)(unsafe.Pointer((*TclOOStubs)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 /* stubsPtr */)))).Fhooks)).FtclOOIntStubs
		} else {
			XtclOOIntStubsPtr = uintptr(0)
		}
		return actualVersion
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_AppendResult})).f(tls, interp, libc.VaList(bp, ts+53836 /* "Error loading " */, packageName,
		ts+53851, version, ts+53872,
		actualVersion, ts+53890, errMsg, uintptr(0)))
	return uintptr(0)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Documentation on decimal float math
//    http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=8cf166fedd1aa110VgnVCM100000a360ea10RCRD
//

// Table of all object types.

var typeTable Tcl_HashTable        /* tclObj.c:25:22: */
var typeTableInitialized int32 = 0 /* tclObj.c:26:12 */ // 0 means not yet initialized.

// Head of the list of free Tcl_Obj structs we maintain.

var XtclFreeObjList uintptr = uintptr(0) /* tclObj.c:33:9 */

// The object allocator is single threaded. This mutex is referenced by the
// TclNewObj macro, however, so must be visible.

// Pointer to a heap-allocated string of length zero that the Tcl core uses as
// the value of an empty string representation for an object. This value is
// shared by all new objects allocated by Tcl_NewObj.

var XtclEmptyString int8 = int8(0) /* tclObj.c:51:6 */
var XtclEmptyStringRep uintptr = 0 /* tclObj.c:52:6 */

// All static variables used in this file are collected into a single instance
// of the following structure.  For multi-threaded implementations, there is
// one instance of this structure for each thread.
//
// Notice that different structures with the same name appear in other files.
// The structure defined below is used in this file only.

type ThreadSpecificData9 = struct{ FlineCLPtr uintptr } /* tclObj.c:96:3 */

var dataKey8 Tcl_ThreadDataKey /* tclObj.c:98:26: */

// Nested Tcl_Obj deletion management support
//
// All context references used in the object freeing code are pointers to this
// structure; every thread will have its own structure instance. The purpose
// of this structure is to allow deeply nested collections of Tcl_Objs to be
// freed without taking a vast depth of C stack (which could cause all sorts
// of breakage.)

type PendingObjData1 = struct {
	FdeletionCount int32
	F__ccgo_pad1   [4]byte
	FdeletionStack uintptr
} /* tclObj.c:113:9 */

// Nested Tcl_Obj deletion management support
//
// All context references used in the object freeing code are pointers to this
// structure; every thread will have its own structure instance. The purpose
// of this structure is to allow deeply nested collections of Tcl_Objs to be
// freed without taking a vast depth of C stack (which could cause all sorts
// of breakage.)

type PendingObjData = PendingObjData1 /* tclObj.c:138:3 */

// These are separated out so that some semantic content is attached
// to them.

// Macro to set up the local reference to the deletion context.
var pendingObjData PendingObjData /* tclObj.c:161:23: */

// The structures below defines the Tcl object types defined in this file by
// means of functions that can be invoked by generic object code. See also
// tclStringObj.c, tclListObj.c, tclByteCode.c for other type manager
// implementations.

var oldBooleanType = Tcl_ObjType{
	Fname:           ts + 4126,
	FsetFromAnyProc: 0, // setFromAnyProc
} /* tclObj.c:246:26 */
var XtclBooleanType = Tcl_ObjType{
	Fname:           ts + 53894,
	FsetFromAnyProc: 0, // setFromAnyProc
} /* tclObj.c:253:19 */
var XtclDoubleType = Tcl_ObjType{
	Fname:             ts + 6155,
	FupdateStringProc: 0, // updateStringProc
	FsetFromAnyProc:   0, // setFromAnyProc
} /* tclObj.c:260:19 */
var XtclIntType = Tcl_ObjType{
	Fname:             ts + 6190,
	FupdateStringProc: 0, // updateStringProc
	FsetFromAnyProc:   0, // setFromAnyProc
} /* tclObj.c:267:19 */
var XtclWideIntType = Tcl_ObjType{
	Fname:             ts + 53908,
	FupdateStringProc: 0, // updateStringProc
	FsetFromAnyProc:   0, // setFromAnyProc
} /* tclObj.c:275:19 */
var XtclBignumType = Tcl_ObjType{
	Fname:             ts + 53916,
	FfreeIntRepProc:   0, // freeIntRepProc
	FdupIntRepProc:    0, // dupIntRepProc
	FupdateStringProc: 0, // setFromAnyProc
} /* tclObj.c:283:19 */

// The structure below defines the Tcl obj hash key type.

var XtclObjHashKeyType = Tcl_HashKeyType{
	Fversion:         TCL_HASH_KEY_TYPE_VERSION, // flags
	FhashKeyProc:     0,                         // hashKeyProc
	FcompareKeysProc: 0,                         // compareKeysProc
	FallocEntryProc:  0,                         // allocEntryProc
	FfreeEntryProc:   0,                         // freeEntryProc
} /* tclObj.c:295:23 */

// The structure below defines the command name Tcl object type by means of
// functions that can be invoked by generic object code. Objects of this type
// cache the Command pointer that results from looking up command names in the
// command hashtable. Such objects appear as the zeroth ("command name")
// argument in a Tcl command.
//
// NOTE: the ResolvedCmdName that gets cached is stored in the
// twoPtrValue.ptr1 field, and the twoPtrValue.ptr2 field is unused. You might
// think you could use the simpler otherValuePtr field to store the single
// ResolvedCmdName pointer, but DO NOT DO THIS. It seems that some extensions
// use the second internal pointer field of the twoPtrValue field for their
// own purposes.
//
// TRICKY POINT! Some extensions update this structure! (Notably, these
// include TclBlend and TCom). This is highly ill-advised on their part, but
// does allow them to delete a command when references to it are gone, which
// is fragile but useful given their somewhat-OO style. Because of this, this
// structure MUST NOT be const so that the C compiler puts the data in
// writable memory. [Bug 2558422] [Bug 07d13d99b0a9]
// TODO: Provide a better API for those extensions so that they can coexist...

var XtclCmdNameType = Tcl_ObjType{
	Fname:           ts + 53923,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // updateStringProc
	FsetFromAnyProc: 0, // setFromAnyProc
} /* tclObj.c:327:13 */

// Structure containing a cached pointer to a command that is the result of
// resolving the command's name in some namespace. It is the internal
// representation for a cmdName object. It contains the pointer along with
// some information that is used to check the pointer's validity.

type ResolvedCmdName1 = struct {
	FcmdPtr        uintptr
	FrefNsPtr      uintptr
	FrefNsId       int32
	FrefNsCmdEpoch int32
	FcmdEpoch      int32
	FrefCount      int32
} /* tclObj.c:342:9 */

// Structure containing a cached pointer to a command that is the result of
// resolving the command's name in some namespace. It is the internal
// representation for a cmdName object. It contains the pointer along with
// some information that is used to check the pointer's validity.

type ResolvedCmdName = ResolvedCmdName1 /* tclObj.c:369:3 */

//-------------------------------------------------------------------------
//
// TclInitObjectSubsystem --
//
//	This function is invoked to perform once-only initialization of the
//	type table. It also registers the object types defined in this file.
//
// Results:
//	None.
//
// Side effects:
//	Initializes the table of defined object types "typeTable" with builtin
//	object types defined in this file.
//
//-------------------------------------------------------------------------

func XTclInitObjSubsystem(tls *libc.TLS) { /* tclObj.c:390:1: */

	typeTableInitialized = 1
	XTcl_InitHashTable(tls, uintptr(unsafe.Pointer(&typeTable)), 0)

	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclByteArrayType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclDoubleType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclEndOffsetType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclIntType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclStringType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclListType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclDictType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclByteCodeType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclArraySearchType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclCmdNameType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclRegexpType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclProcBodyType)))

	// For backward compatibility only ...
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&oldBooleanType)))
	XTcl_RegisterObjType(tls, uintptr(unsafe.Pointer(&XtclWideIntType)))

}

//----------------------------------------------------------------------
//
// TclFinalizeThreadObjects --
//
//	This function is called by Tcl_FinalizeThread to clean up thread
//	specific Tcl_Obj information.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFinalizeThreadObjects(tls *libc.TLS) { /* tclObj.c:449:1: */
}

//----------------------------------------------------------------------
//
// TclFinalizeObjects --
//
//	This function is called by Tcl_Finalize to clean up all registered
//	Tcl_ObjType's and to reset the tclFreeObjList.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFinalizeObjects(tls *libc.TLS) { /* tclObj.c:492:1: */

	if typeTableInitialized != 0 {
		XTcl_DeleteHashTable(tls, uintptr(unsafe.Pointer(&typeTable)))
		typeTableInitialized = 0
	}

	// All we do here is reset the head pointer of the linked list of free
	// Tcl_Obj's to NULL; the memory finalization will take care of releasing
	// memory for us.

	XtclFreeObjList = uintptr(0)

}

//----------------------------------------------------------------------
//
// TclGetContLineTable --
//
//	This procedure is a helper which returns the thread-specific
//	hash-table used to track continuation line information associated with
//	Tcl_Obj*, and the objThreadMap, etc.
//
// Results:
//	A reference to the thread-data.
//
// Side effects:
//	May allocate memory for the thread-data.
//
// TIP #280
//----------------------------------------------------------------------

func sTclGetContLineTable(tls *libc.TLS) uintptr { /* tclObj.c:530:27: */
	// Initialize the hashtable tracking invisible continuation lines.  For
	// the release we use a thread exit handler to ensure that this is done
	// before TSD blocks are made invalid. The TclFinalizeObjects() which
	// would be the natural place for this is invoked afterwards, meaning that
	// we try to operate on a data structure already gone.

	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey8)), int32(unsafe.Sizeof(ThreadSpecificData9{})))

	if !(int32((*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr) != 0) {
		(*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_InitHashTable(tls, (*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr, 1)
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sTclThreadFinalizeContLines})), uintptr(0))
	}
	return tsdPtr
}

//----------------------------------------------------------------------
//
// TclContinuationsEnter --
//
//	This procedure is a helper which saves the continuation line
//	information associated with a Tcl_Obj*.
//
// Results:
//	A reference to the newly created continuation line location table.
//
// Side effects:
//	Allocates memory for the table of continuation line locations.
//
// TIP #280
//----------------------------------------------------------------------

func XTclContinuationsEnter(tls *libc.TLS, objPtr uintptr, num int32, loc uintptr) uintptr { /* tclObj.c:569:13: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var newEntry int32 at bp, 4

	var tsdPtr uintptr = sTclGetContLineTable(tls)
	var hPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr)).FcreateProc})).f(tls, (*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr, objPtr, bp /* &newEntry */)
	var clLocPtr uintptr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+4))+uint64(num+1)*uint64(unsafe.Sizeof(int32(0)))))

	if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
		// We're entering ContLineLoc data for the same value more than one
		// time. Taking care not to leak the old entry.
		//
		// This can happen when literals in a proc body are shared. See for
		// example test info-30.19 where the action (code) for all branches of
		// the switch command is identical, mapping them all to the same
		// literal. An interesting result of this is that the number and
		// locations (offset) of invisible continuation lines in the literal
		// are the same for all occurences.
		//
		// Note that while reusing the existing entry is possible it requires
		// the same actions as for a new entry because we have to copy the
		// incoming num/loc data even so. Because we are called from
		// TclContinuationsEnterDerived for this case, which modified the
		// stored locations (Rebased to the proper relative offset). Just
		// returning the stored entry would rebase them a second time, or
		// more, hosing the data. It is easier to simply replace, as we are
		// doing.

		XTclpFree(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
	}

	(*ContLineLoc)(unsafe.Pointer(clLocPtr)).Fnum = num
	libc.Xmemcpy(tls, clLocPtr+4, loc, uint64(num)*uint64(unsafe.Sizeof(int32(0))))
	*(*int32)(unsafe.Pointer(clLocPtr + 4 + uintptr(num)*4)) = -1 // Sentinel
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = clLocPtr

	return clLocPtr
}

//----------------------------------------------------------------------
//
// TclContinuationsEnterDerived --
//
//	This procedure is a helper which computes the continuation line
//	information associated with a Tcl_Obj* cut from the middle of a
//	script.
//
// Results:
//	None.
//
// Side effects:
//	Allocates memory for the table of continuation line locations.
//
// TIP #280
//----------------------------------------------------------------------

func XTclContinuationsEnterDerived(tls *libc.TLS, objPtr uintptr, start int32, clNext uintptr) { /* tclObj.c:634:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var length int32 at bp, 4

	var end int32
	var num int32
	var wordCLLast uintptr = clNext

	// We have to handle invisible continuations lines here as well, despite
	// the code we have in TclSubstTokens (TST) for that. Why ?  Nesting. If
	// our script is the sole argument to an 'eval' command, for example, the
	// scriptCLLocPtr we are using was generated by a previous call to TST,
	// and while the words we have here may contain continuation lines they
	// are invisible already, and the inner call to TST had no bs+nl sequences
	// to trigger its code.
	//
	// Luckily for us, the table we have to create here for the current word
	// has to be a slice of the table currently in use, with the locations
	// suitably modified to be relative to the start of the word instead of
	// relative to the script.
	//
	// That is what we are doing now. Determine the slice we need, and if not
	// empty, wrap it into a new table, and save the result into our
	// thread-global hashtable, as usual.

	// First compute the range of the word within the script. (Is there a
	// better way which doesn't shimmer?)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
		*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
		_ = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
	} else {
		XTcl_GetStringFromObj(tls, objPtr, bp)
	}
	end = start + *(*int32)(unsafe.Pointer(bp)) // First char after the word

	// Then compute the table slice covering the range of the word.

	for *(*int32)(unsafe.Pointer(wordCLLast)) >= 0 && *(*int32)(unsafe.Pointer(wordCLLast)) < end {
		wordCLLast += 4
	}

	// And generate the table from the slice, if it was not empty.

	num = int32((int64(wordCLLast) - int64(clNext)) / 4)
	if num != 0 {
		var i int32
		var clLocPtr uintptr = XTclContinuationsEnter(tls, objPtr, num, clNext)

		// Re-base the locations.

		for i = 0; i < num; i++ {
			*(*int32)(unsafe.Pointer(clLocPtr + 4 + uintptr(i)*4)) -= start

			// Continuation lines coming before the string and affecting us
			// should not happen, due to the proper maintenance of clNext
			// during compilation.

			if *(*int32)(unsafe.Pointer(clLocPtr + 4 + uintptr(i)*4)) < 0 {
				XTcl_Panic(tls, ts+53931, 0)
			}
		}
	}
}

//----------------------------------------------------------------------
//
// TclContinuationsCopy --
//
//	This procedure is a helper which copies the continuation line
//	information associated with a Tcl_Obj* to another Tcl_Obj*. It is
//	assumed that both contain the same string/script. Use this when a
//	script is duplicated because it was shared.
//
// Results:
//	None.
//
// Side effects:
//	Allocates memory for the table of continuation line locations.
//
// TIP #280
//----------------------------------------------------------------------

func XTclContinuationsCopy(tls *libc.TLS, objPtr uintptr, originObjPtr uintptr) { /* tclObj.c:727:1: */
	var tsdPtr uintptr = sTclGetContLineTable(tls)
	var hPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr)).FfindProc})).f(tls, (*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr, originObjPtr)

	if hPtr != 0 {
		var clLocPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		XTclContinuationsEnter(tls, objPtr, (*ContLineLoc)(unsafe.Pointer(clLocPtr)).Fnum, clLocPtr+4)
	}
}

//----------------------------------------------------------------------
//
// TclContinuationsGet --
//
//	This procedure is a helper which retrieves the continuation line
//	information associated with a Tcl_Obj*, if it has any.
//
// Results:
//	A reference to the continuation line location table, or NULL if the
//	Tcl_Obj* has no such information associated with it.
//
// Side effects:
//	None.
//
// TIP #280
//----------------------------------------------------------------------

func XTclContinuationsGet(tls *libc.TLS, objPtr uintptr) uintptr { /* tclObj.c:761:13: */
	var tsdPtr uintptr = sTclGetContLineTable(tls)
	var hPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr)).FfindProc})).f(tls, (*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr, objPtr)

	if !(hPtr != 0) {
		return uintptr(0)
	}
	return (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
}

//----------------------------------------------------------------------
//
// TclThreadFinalizeContLines --
//
//	This procedure is a helper which releases all continuation line
//	information currently known. It is run as a thread exit handler.
//
// Results:
//	None.
//
// Side effects:
//	Releases memory.
//
// TIP #280
//----------------------------------------------------------------------

func sTclThreadFinalizeContLines(tls *libc.TLS, clientData ClientData) { /* tclObj.c:794:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// Release the hashtable tracking invisible continuation lines.

	var tsdPtr uintptr = sTclGetContLineTable(tls)
	var hPtr uintptr
	// var hSearch Tcl_HashSearch at bp, 24

	for hPtr = XTcl_FirstHashEntry(tls, (*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr, bp); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
		XTclpFree(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
		XTcl_DeleteHashEntry(tls, hPtr)
	}
	XTcl_DeleteHashTable(tls, (*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr)
	XTclpFree(tls, (*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr)
	(*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr = uintptr(0)
}

//--------------------------------------------------------------
//
// Tcl_RegisterObjType --
//
//	This function is called to register a new Tcl object type in the table
//	of all object types supported by Tcl.
//
// Results:
//	None.
//
// Side effects:
//	The type is registered in the Tcl type table. If there was already a
//	type with the same name as in typePtr, it is replaced with the new
//	type.
//
//--------------------------------------------------------------

func XTcl_RegisterObjType(tls *libc.TLS, typePtr uintptr) { /* tclObj.c:835:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var isNew int32 at bp, 4

	(*Tcl_HashEntry)(unsafe.Pointer((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(uintptr(unsafe.Pointer(&typeTable)))).FcreateProc})).f(tls, uintptr(unsafe.Pointer(&typeTable)), (*Tcl_ObjType)(unsafe.Pointer(typePtr)).Fname, bp))).FclientData = typePtr

}

//----------------------------------------------------------------------
//
// Tcl_AppendAllObjTypes --
//
//	This function appends onto the argument object the name of each object
//	type as a list element. This includes the builtin object types (e.g.
//	int, list) as well as those added using Tcl_NewObj. These names can be
//	used, for example, with Tcl_GetObjType to get pointers to the
//	corresponding Tcl_ObjType structures.
//
// Results:
//	The return value is normally TCL_OK; in this case the object
//	referenced by objPtr has each type name appended to it. If an error
//	occurs, TCL_ERROR is returned and the interpreter's result holds an
//	error message.
//
// Side effects:
//	If necessary, the object referenced by objPtr is converted into a list
//	object.
//
//----------------------------------------------------------------------

func XTcl_AppendAllObjTypes(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclObj.c:873:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var hPtr uintptr
	// var search Tcl_HashSearch at bp+8, 24

	// var numElems int32 at bp, 4

	// Get the test for a valid list out of the way first.

	if func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjLength(tls, interp, objPtr, bp)
	}() != TCL_OK {
		return TCL_ERROR
	}

	// Type names are NUL-terminated, not counted strings. This code relies on
	// that.

	for hPtr = XTcl_FirstHashEntry(tls, uintptr(unsafe.Pointer(&typeTable)), bp+8); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp+8) {
		XTcl_ListObjAppendElement(tls, uintptr(0), objPtr,
			XTcl_NewStringObj(tls, func() uintptr {
				if (*Tcl_HashTable)(unsafe.Pointer(uintptr(unsafe.Pointer(&typeTable)))).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(uintptr(unsafe.Pointer(&typeTable)))).FkeyType == -1 {
					return *(*uintptr)(unsafe.Pointer(hPtr + 32))
				}
				return hPtr + 32
			}(), -1))
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_GetObjType --
//
//	This function looks up an object type by name.
//
// Results:
//	If an object type with name matching "typeName" is found, a pointer to
//	its Tcl_ObjType structure is returned; otherwise, NULL is returned.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetObjType(tls *libc.TLS, typeName uintptr) uintptr { /* tclObj.c:923:19: */
	var hPtr uintptr
	var typePtr uintptr = uintptr(0)

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(uintptr(unsafe.Pointer(&typeTable)))).FfindProc})).f(tls, uintptr(unsafe.Pointer(&typeTable)), typeName)
	if hPtr != uintptr(0) {
		typePtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	}

	return typePtr
}

//----------------------------------------------------------------------
//
// Tcl_ConvertToType --
//
//	Convert the Tcl object "objPtr" to have type "typePtr" if possible.
//
// Results:
//	The return value is TCL_OK on success and TCL_ERROR on failure. If
//	TCL_ERROR is returned, then the interpreter's result contains an error
//	message unless "interp" is NULL. Passing a NULL "interp" allows this
//	function to be used as a test whether the conversion could be done
//	(and in fact was done).
//
// Side effects:
//	Any internal representation for the old type is freed.
//
//----------------------------------------------------------------------

func XTcl_ConvertToType(tls *libc.TLS, interp uintptr, objPtr uintptr, typePtr uintptr) int32 { /* tclObj.c:960:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == typePtr {
		return TCL_OK
	}

	// Use the target type's Tcl_SetFromAnyProc to set "objPtr"s internal form
	// as appropriate for the target type. This frees the old internal
	// representation.

	if (*Tcl_ObjType)(unsafe.Pointer(typePtr)).FsetFromAnyProc == uintptr(0) {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+53996, libc.VaList(bp, (*Tcl_ObjType)(unsafe.Pointer(typePtr)).Fname)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+54027, uintptr(0)))
		}
		return TCL_ERROR
	}

	return (*struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer(typePtr)).FsetFromAnyProc})).f(tls, interp, objPtr)
}

//--------------------------------------------------------------
//
// TclDbDumpActiveObjects --
//
//	This function is called to dump all of the active Tcl_Obj structs this
//	allocator knows about.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//--------------------------------------------------------------

func XTclDbDumpActiveObjects(tls *libc.TLS, outFile uintptr) { /* tclObj.c:1005:1: */
}

//----------------------------------------------------------------------
//
// TclDbInitNewObj --
//
//	Called via the TclNewObj or TclDbNewObj macros when TCL_MEM_DEBUG is
//	enabled. This function will initialize the members of a Tcl_Obj
//	struct. Initilization would be done inline via the TclNewObj macro
//	when compiling without TCL_MEM_DEBUG.
//
// Results:
//	The Tcl_Obj struct members are initialized.
//
// Side effects:
//	None.
//----------------------------------------------------------------------

//----------------------------------------------------------------------
//
// Tcl_NewObj --
//
//	This function is normally called when not debugging: i.e., when
//	TCL_MEM_DEBUG is not defined. It creates new Tcl objects that denote
//	the empty string. These objects have a NULL object type and NULL
//	string representation byte pointer. Type managers call this routine to
//	allocate new objects that they further initialize.
//
//	When TCL_MEM_DEBUG is defined, this function just returns the result
//	of calling the debugging version Tcl_DbNewObj.
//
// Results:
//	The result is a newly allocated object that represents the empty
//	string. The new object's typePtr is set NULL and its ref count is set
//	to 0.
//
// Side effects:
//	If compiling with TCL_COMPILE_STATS, this function increments the
//	global count of allocated objects (tclObjsAlloced).
//
//----------------------------------------------------------------------

func XTcl_NewObj(tls *libc.TLS) uintptr { /* tclObj.c:1142:9: */
	var objPtr uintptr

	// Use the macro defined in tclInt.h - it will use the correct allocator.

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_DbNewObj --
//
//	This function is normally called when debugging: i.e., when
//	TCL_MEM_DEBUG is defined. It creates new Tcl objects that denote the
//	empty string. It is the same as the Tcl_NewObj function above except
//	that it calls Tcl_DbCkalloc directly with the file name and line
//	number from its caller. This simplifies debugging since then the
//	[memory active] command will report the correct file name and line
//	number when reporting objects that haven't been freed.
//
//	When TCL_MEM_DEBUG is not defined, this function just returns the
//	result of calling Tcl_NewObj.
//
// Results:
//	The result is a newly allocated that represents the empty string. The
//	new object's typePtr is set NULL and its ref count is set to 0.
//
// Side effects:
//	If compiling with TCL_COMPILE_STATS, this function increments the
//	global count of allocated objects (tclObjsAlloced).
//
//----------------------------------------------------------------------

func XTcl_DbNewObj(tls *libc.TLS, file uintptr, line int32) uintptr { /* tclObj.c:1203:9: */
	return XTcl_NewObj(tls)
}

//----------------------------------------------------------------------
//
// TclAllocateFreeObjects --
//
//	Function to allocate a number of free Tcl_Objs. This is done using a
//	single ckalloc to reduce the overhead for Tcl_Obj allocation.
//
//	Assumes mutex is held.
//
// Results:
//	None.
//
// Side effects:
//	tclFreeObjList, the head of the list of free Tcl_Objs, is set to the
//	first of a number of free Tcl_Obj's linked together by their
//	internalRep.twoPtrValue.ptr1's.
//
//----------------------------------------------------------------------

func XTclAllocateFreeObjects(tls *libc.TLS) { /* tclObj.c:1238:1: */
	var bytesToAlloc Size_t = uint64(100) * uint64(unsafe.Sizeof(Tcl_Obj{}))
	var basePtr uintptr
	var prevPtr uintptr
	var objPtr uintptr
	var i int32

	// This has been noted by Purify to be a potential leak. The problem is
	// that Tcl, when not TCL_MEM_DEBUG compiled, keeps around all allocated
	// Tcl_Obj's, pointed to by tclFreeObjList, when freed instead of actually
	// freeing the memory. TclFinalizeObjects() does not ckfree() this memory,
	// but leaves it to Tcl's memory subsystem finalization to release it.
	// Purify apparently can't figure that out, and fires a false alarm.

	basePtr = XTcl_Alloc(tls, uint32(bytesToAlloc))

	prevPtr = uintptr(0)
	objPtr = basePtr
	for i = 0; i < 100; i++ {
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = prevPtr
		prevPtr = objPtr
		objPtr += 48
	}
	XtclFreeObjList = prevPtr
}

//----------------------------------------------------------------------
//
// TclFreeObj --
//
//	This function frees the memory associated with the argument object.
//	It is called by the tcl.h macro Tcl_DecrRefCount when an object's ref
//	count is zero. It is only "public" since it must be callable by that
//	macro wherever the macro is used. It should not be directly called by
//	clients.
//
// Results:
//	None.
//
// Side effects:
//	Deallocates the storage for the object's Tcl_Obj structure after
//	deallocating the string representation and calling the type-specific
//	Tcl_FreeInternalRepProc to deallocate the object's internal
//	representation. If compiling with TCL_COMPILE_STATS, this function
//	increments the global count of freed objects (tclObjsFreed).
//
//----------------------------------------------------------------------

func XTclFreeObj(tls *libc.TLS, objPtr uintptr) { /* tclObj.c:1418:1: */
	// Invalidate the string rep first so we can use the bytes value for our
	// pointer chain, and signal an obj deletion (as opposed to shimmering)
	// with 'length == -1'.

	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1

	if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
		/*
		 * objPtr can be freed safely, as it will not attempt to free any
		 * other objects: it will not cause recursive calls to this function.
		 */

		{
		}

		for ok1 := true; ok1; ok1 = 0 != 0 {
			*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
			XtclFreeObjList = objPtr
		}

	} else {
		// This macro declares a variable, so must come here...

		var context uintptr = uintptr(unsafe.Pointer(&pendingObjData))

		if (*PendingObjData)(unsafe.Pointer(context)).FdeletionCount > 0 {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = (*PendingObjData)(unsafe.Pointer(context)).FdeletionStack
			(*PendingObjData)(unsafe.Pointer(context)).FdeletionStack = objPtr
		} else {
			/*
			 * Note that the contents of the while loop assume that the string
			 * rep has already been freed and we don't want to do anything
			 * fancy with adding to the queue inside ourselves. Must take care
			 * to unstack the object first since freeing the internal rep can
			 * add further objects to the stack. The code assumes that it is
			 * the first thing in a block; all current usages in the core
			 * satisfy this.
			 */

			{
			}

			(*PendingObjData)(unsafe.Pointer(context)).FdeletionCount++
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			(*PendingObjData)(unsafe.Pointer(context)).FdeletionCount--

			for ok2 := true; ok2; ok2 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = objPtr
			}

			(*PendingObjData)(unsafe.Pointer(context)).FdeletionCount++
			for (*PendingObjData)(unsafe.Pointer(context)).FdeletionStack != uintptr(0) {
				var objToFree uintptr

				objToFree = (*PendingObjData)(unsafe.Pointer(context)).FdeletionStack
				(*PendingObjData)(unsafe.Pointer(context)).FdeletionStack = (*Tcl_Obj)(unsafe.Pointer(objToFree)).Fbytes
				{
				}

				if (*Tcl_Obj)(unsafe.Pointer(objToFree)).FtypePtr != uintptr(0) &&
					(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objToFree)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objToFree)).FtypePtr)).FfreeIntRepProc})).f(tls, objToFree)
				}
				for ok3 := true; ok3; ok3 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(objToFree + 32)) = XtclFreeObjList
					XtclFreeObjList = objToFree
				}

			}
			(*PendingObjData)(unsafe.Pointer(context)).FdeletionCount--
		}
	}

	/*
	 * We cannot use TclGetContinuationTable() here, because that may
	 * re-initialize the thread-data for calls coming after the finalization.
	 * We have to access it using the low-level call and then check for
	 * validity. This function can be called after TclFinalizeThreadData() has
	 * already killed the thread-global data structures. Performing
	 * TCL_TSD_INIT will leave us with an un-initialized memory block upon
	 * which we crash (if we where to access the uninitialized hashtable).
	 */

	{
		var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey8)), int32(unsafe.Sizeof(ThreadSpecificData9{})))
		var hPtr uintptr

		if (*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr != 0 {
			hPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr)).FfindProc})).f(tls, (*ThreadSpecificData9)(unsafe.Pointer(tsdPtr)).FlineCLPtr, objPtr)
			if hPtr != 0 {
				XTclpFree(tls, (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)
				XTcl_DeleteHashEntry(tls, hPtr)
			}
		}

	}
}

//----------------------------------------------------------------------
//
// TclObjBeingDeleted --
//
//	This function returns 1 when the Tcl_Obj is being deleted. It is
//	provided for the rare cases where the reason for the loss of an
//	internal rep might be relevant. [FR 1512138]
//
// Results:
//	1 if being deleted, 0 otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclObjBeingDeleted(tls *libc.TLS, objPtr uintptr) int32 { /* tclObj.c:1527:1: */
	return libc.Bool32((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == -1)
}

//----------------------------------------------------------------------
//
// Tcl_DuplicateObj --
//
//	Create and return a new object that is a duplicate of the argument
//	object.
//
// Results:
//	The return value is a pointer to a newly created Tcl_Obj. This object
//	has reference count 0 and the same type, if any, as the source object
//	objPtr. Also:
//	  1) If the source object has a valid string rep, we copy it;
//	     otherwise, the duplicate's string rep is set NULL to mark it
//	     invalid.
//	  2) If the source object has an internal representation (i.e. its
//	     typePtr is non-NULL), the new object's internal rep is set to a
//	     copy; otherwise the new internal rep is marked invalid.
//
// Side effects:
//	What constitutes "copying" the internal representation depends on the
//	type. For example, if the argument object is a list, the element
//	objects it points to will not actually be copied but will be shared
//	with the duplicate list. That is, the ref counts of the element
//	objects will be incremented.
//
//----------------------------------------------------------------------

func XTcl_DuplicateObj(tls *libc.TLS, objPtr uintptr) uintptr { /* tclObj.c:1581:9: */
	var dupPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		dupPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr = uintptr(0)
	{
	}

	{
		var typePtr uintptr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr
		var bytes uintptr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		if bytes != 0 {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == 0 {
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes = XTcl_Alloc(tls, uint32((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes, bytes, uint64((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes + uintptr((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength))) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Flength = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
			}
		} else {
			(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes = uintptr(0)
		}
		if typePtr != 0 {
			if (*Tcl_ObjType)(unsafe.Pointer(typePtr)).FdupIntRepProc != 0 {
				(*struct {
					f func(*libc.TLS, uintptr, uintptr)
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer(typePtr)).FdupIntRepProc})).f(tls, objPtr, dupPtr)
			} else {
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FinternalRep = (*Tcl_Obj)(unsafe.Pointer(objPtr)).FinternalRep
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr = typePtr
			}
		}
	}

	return dupPtr
}

func XTclSetDuplicateObj(tls *libc.TLS, dupPtr uintptr, objPtr uintptr) { /* tclObj.c:1593:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Tcl_Obj)(unsafe.Pointer(dupPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+54037))
	}
	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = dupPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	if (*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, dupPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr = uintptr(0)
	}

	{
		var typePtr uintptr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr
		var bytes uintptr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		if bytes != 0 {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == 0 {
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes = XTcl_Alloc(tls, uint32((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes, bytes, uint64((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes + uintptr((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength))) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Flength = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
			}
		} else {
			(*Tcl_Obj)(unsafe.Pointer(dupPtr)).Fbytes = uintptr(0)
		}
		if typePtr != 0 {
			if (*Tcl_ObjType)(unsafe.Pointer(typePtr)).FdupIntRepProc != 0 {
				(*struct {
					f func(*libc.TLS, uintptr, uintptr)
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer(typePtr)).FdupIntRepProc})).f(tls, objPtr, dupPtr)
			} else {
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FinternalRep = (*Tcl_Obj)(unsafe.Pointer(objPtr)).FinternalRep
				(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr = typePtr
			}
		}
	}

}

//----------------------------------------------------------------------
//
// Tcl_GetString --
//
//	Returns the string representation byte array pointer for an object.
//
// Results:
//	Returns a pointer to the string representation of objPtr. The byte
//	array referenced by the returned pointer must not be modified by the
//	caller. Furthermore, the caller must copy the bytes if they need to
//	retain them since the object's string rep can change as a result of
//	other operations.
//
// Side effects:
//	May call the object's updateStringProc to update the string
//	representation from the internal representation.
//
//----------------------------------------------------------------------

func XTcl_GetString(tls *libc.TLS, objPtr uintptr) uintptr { /* tclObj.c:1626:6: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != uintptr(0) {
		return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
	}

	// Note we do not check for objPtr->typePtr == NULL.  An invariant of
	// a properly maintained Tcl_Obj is that at least  one of objPtr->bytes
	// and objPtr->typePtr must not be NULL.  If broken extensions fail to
	// maintain that invariant, we can crash here.

	if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FupdateStringProc == uintptr(0) {
		// Those Tcl_ObjTypes which choose not to define an updateStringProc
		// must be written in such a way that (objPtr->bytes) never becomes
		// NULL.  This panic was added in Tcl 8.1.

		XTcl_Panic(tls, ts+54056,
			libc.VaList(bp, (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).Fname))
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FupdateStringProc})).f(tls, objPtr)
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) || (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength < 0 ||
		int32(*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength)))) != 0 {
		XTcl_Panic(tls,
			ts+54107, libc.VaList(bp+8, (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).Fname))
	}
	return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
}

//----------------------------------------------------------------------
//
// Tcl_GetStringFromObj --
//
//	Returns the string representation's byte array pointer and length for
//	an object.
//
// Results:
//	Returns a pointer to the string representation of objPtr. If lengthPtr
//	isn't NULL, the length of the string representation is stored at
//	*lengthPtr. The byte array referenced by the returned pointer must not
//	be modified by the caller. Furthermore, the caller must copy the bytes
//	if they need to retain them since the object's string rep can change
//	as a result of other operations.
//
// Side effects:
//	May call the object's updateStringProc to update the string
//	representation from the internal representation.
//
//----------------------------------------------------------------------

func XTcl_GetStringFromObj(tls *libc.TLS, objPtr uintptr, lengthPtr uintptr) uintptr { /* tclObj.c:1684:6: */
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0) {
		XTcl_GetString(tls, objPtr)
	}

	if lengthPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(lengthPtr)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
	}
	return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
}

//----------------------------------------------------------------------
//
// Tcl_InvalidateStringRep --
//
//	This function is called to invalidate an object's string
//	representation.
//
// Results:
//	None.
//
// Side effects:
//	Deallocates the storage for any old string representation, then sets
//	the string representation NULL to mark it invalid.
//
//----------------------------------------------------------------------

func XTcl_InvalidateStringRep(tls *libc.TLS, objPtr uintptr) { /* tclObj.c:1719:1: */
	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_NewBooleanObj --
//
//	This function is normally called when not debugging: i.e., when
//	TCL_MEM_DEBUG is not defined. It creates a new Tcl_Obj and
//	initializes it from the argument boolean value. A nonzero "boolValue"
//	is coerced to 1.
//
//	When TCL_MEM_DEBUG is defined, this function just returns the result
//	of calling the debugging version Tcl_DbNewBooleanObj.
//
// Results:
//	The newly created object is returned. This object will have an invalid
//	string representation. The returned object has ref count 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_NewBooleanObj(tls *libc.TLS, boolValue int32) uintptr { /* tclObj.c:1761:9: */
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
		*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(libc.Bool32(boolValue != 0))
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
		{
		}
	}
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_DbNewBooleanObj --
//
//	This function is normally called when debugging: i.e., when
//	TCL_MEM_DEBUG is defined. It creates new boolean objects. It is the
//	same as the Tcl_NewBooleanObj function above except that it calls
//	Tcl_DbCkalloc directly with the file name and line number from its
//	caller. This simplifies debugging since then the [memory active]
//	command will report the correct file name and line number when
//	reporting objects that haven't been freed.
//
//	When TCL_MEM_DEBUG is not defined, this function just returns the
//	result of calling Tcl_NewBooleanObj.
//
// Results:
//	The newly created object is returned. This object will have an invalid
//	string representation. The returned object has ref count 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_DbNewBooleanObj(tls *libc.TLS, boolValue int32, file uintptr, line int32) uintptr { /* tclObj.c:1821:9: */
	return XTcl_NewBooleanObj(tls, boolValue)
}

//----------------------------------------------------------------------
//
// Tcl_SetBooleanObj --
//
//	Modify an object to be a boolean object and to have the specified
//	boolean value. A nonzero "boolValue" is coerced to 1.
//
// Results:
//	None.
//
// Side effects:
//	The object's old string rep, if any, is freed. Also, any old internal
//	rep is freed.
//
//----------------------------------------------------------------------

func XTcl_SetBooleanObj(tls *libc.TLS, objPtr uintptr, boolValue int32) { /* tclObj.c:1853:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+54174))
	}

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _isobjPtr uintptr = objPtr
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}
		*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(libc.Bool32(boolValue != 0))
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	}

}

//----------------------------------------------------------------------
//
// Tcl_GetBooleanFromObj --
//
//	Attempt to return a boolean from the Tcl object "objPtr". This
//	includes conversion from any of Tcl's numeric types.
//
// Results:
//	The return value is a standard Tcl object result. If an error occurs
//	during conversion, an error message is left in the interpreter's
//	result unless "interp" is NULL.
//
// Side effects:
//	The internalrep of *objPtr may be changed.
//
//----------------------------------------------------------------------

func XTcl_GetBooleanFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, boolPtr uintptr) int32 { /* tclObj.c:1884:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	for ok := true; ok; ok = sParseBoolean(tls, objPtr) == TCL_OK || TCL_OK == XTclParseNumber(tls, interp, objPtr, ts+54192, uintptr(0), -1, uintptr(0), 0) {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*int32)(unsafe.Pointer(boolPtr)) = libc.Bool32(*(*int32)(unsafe.Pointer(objPtr + 32)) != 0)
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBooleanType)) {
			*(*int32)(unsafe.Pointer(boolPtr)) = int32(*(*int32)(unsafe.Pointer(objPtr + 32)))
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
			// Caution: Don't be tempted to check directly for the "double"
			// Tcl_ObjType and then compare the internalrep to 0.0. This isn't
			// reliable because a "double" Tcl_ObjType can hold the NaN value.
			// Use the API Tcl_GetDoubleFromObj, which does the checking and
			// sets the proper error message for us.

			// var d float64 at bp, 8

			if XTcl_GetDoubleFromObj(tls, interp, objPtr, bp) != TCL_OK {
				return TCL_ERROR
			}
			*(*int32)(unsafe.Pointer(boolPtr)) = libc.Bool32(*(*float64)(unsafe.Pointer(bp)) != 0.0)
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType)) {
			*(*int32)(unsafe.Pointer(boolPtr)) = 1
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*int32)(unsafe.Pointer(boolPtr)) = libc.Bool32(*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)) != int64(0))
			return TCL_OK
		}
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclSetBooleanFromAny --
//
//	Attempt to generate a boolean internal form for the Tcl object
//	"objPtr".
//
// Results:
//	The return value is a standard Tcl result. If an error occurs during
//	conversion, an error message is left in the interpreter's result
//	unless "interp" is NULL.
//
// Side effects:
//	If no error occurs, an integer 1 or 0 is stored as "objPtr"s internal
//	representation and the type of "objPtr" is set to boolean.
//
//----------------------------------------------------------------------

func XTclSetBooleanFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclObj.c:1951:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	// var length int32 at bp+32, 4

	var str uintptr
	var msg uintptr
	// For some "pure" numeric Tcl_ObjTypes (no string rep), we can determine
	// whether a boolean conversion is possible without generating the string
	// rep.

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0)) {
		goto __1
	}
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType))) {
		goto __2
	}
	switch *(*int32)(unsafe.Pointer(objPtr + 32)) {
	case 0:
		goto __4
	case 1:
		goto __5
	}
	goto __3
__4:
__5:
	return TCL_OK
__3:
	;
	goto badBoolean
__2:
	;

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType))) {
		goto __6
	}
	goto badBoolean
__6:
	;

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType))) {
		goto __7
	}
	goto badBoolean
__7:
	;

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType))) {
		goto __8
	}
	goto badBoolean
__8:
	;
__1:
	;

	if !(sParseBoolean(tls, objPtr) == TCL_OK) {
		goto __9
	}
	return TCL_OK
__9:
	;

badBoolean:
	if !(interp != uintptr(0)) {
		goto __10
	}
	str = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 32)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+32)
	}()

__11:
	;
__14:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __17
	}
	XTclAllocateFreeObjects(tls)
__17:
	;
	msg = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([33]int8{}))-uint64(1)) == 0) {
		goto __18
	}
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = 0
	goto __19
__18:
	(*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([33]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes, ts+54206, uint64(int32(uint64(unsafe.Sizeof([33]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(msg)).Fbytes + 32)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(msg)).Flength = int32(uint64(unsafe.Sizeof([33]int8{})) - uint64(1))
__19:
	;
	(*Tcl_Obj)(unsafe.Pointer(msg)).FtypePtr = uintptr(0)

	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	XTcl_AppendLimitedToObj(tls, msg, str, *(*int32)(unsafe.Pointer(bp + 32 /* length */)), 50, ts+2631)
	XTcl_AppendToObj(tls, msg, ts+25631, -1)
	XTcl_SetObjResult(tls, interp, msg)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+54239, uintptr(0)))
__10:
	;
	return TCL_ERROR
}

func sParseBoolean(tls *libc.TLS, objPtr uintptr) int32 { /* tclObj.c:2005:1: */
	bp := tls.Alloc(10)
	defer tls.Free(10)

	var i int32
	// var length int32 at bp, 4

	var newBool int32
	// var lowerCase [6]int8 at bp+4, 6

	var str uintptr
	var c int8
	str = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp)
	}()

	if !(*(*int32)(unsafe.Pointer(bp)) == 0 || *(*int32)(unsafe.Pointer(bp)) > 5) {
		goto __1
	}
	// Longest valid boolean string rep. is "false".

	return TCL_ERROR
__1:
	;

	switch int32(*(*int8)(unsafe.Pointer(str))) {
	case '0':
		goto __3
	case '1':
		goto __4
	}
	goto __2
__3:
	if !(*(*int32)(unsafe.Pointer(bp)) == 1) {
		goto __5
	}
	newBool = 0
	goto numericBoolean
__5:
	;
	return TCL_ERROR
__4:
	if !(*(*int32)(unsafe.Pointer(bp)) == 1) {
		goto __6
	}
	newBool = 1
	goto numericBoolean
__6:
	;
	return TCL_ERROR
__2:
	;

	// Force to lower case for case-insensitive detection. Filter out known
	// invalid characters at the same time.

	i = 0
__7:
	if !(i < *(*int32)(unsafe.Pointer(bp))) {
		goto __9
	}
	c = *(*int8)(unsafe.Pointer(str + uintptr(i)))

	switch int32(c) {
	case 'A':
		goto __11
	case 'E':
		goto __12
	case 'F':
		goto __13
	case 'L':
		goto __14
	case 'N':
		goto __15
	case 'O':
		goto __16
	case 'R':
		goto __17
	case 'S':
		goto __18
	case 'T':
		goto __19
	case 'U':
		goto __20
	case 'Y':
		goto __21
	case 'a':
		goto __22
	case 'e':
		goto __23
	case 'f':
		goto __24
	case 'l':
		goto __25
	case 'n':
		goto __26
	case 'o':
		goto __27
	case 'r':
		goto __28
	case 's':
		goto __29
	case 't':
		goto __30
	case 'u':
		goto __31
	case 'y':
		goto __32
	default:
		goto __33
	}
	goto __10
__11:
__12:
__13:
__14:
__15:
__16:
__17:
__18:
__19:
__20:
__21:
	*(*int8)(unsafe.Pointer(bp + 4 + uintptr(i))) = int8(int32(c) + int32(int8('a'-'A')))
	goto __10
__22:
__23:
__24:
__25:
__26:
__27:
__28:
__29:
__30:
__31:
__32:
	*(*int8)(unsafe.Pointer(bp + 4 + uintptr(i))) = c
	goto __10
__33:
	return TCL_ERROR
__10:
	;
	goto __8
__8:
	i++
	goto __7
	goto __9
__9:
	;
	*(*int8)(unsafe.Pointer(bp + 4 + uintptr(*(*int32)(unsafe.Pointer(bp /* length */))))) = int8(0)
	switch int32(*(*int8)(unsafe.Pointer(bp + 4))) {
	case 'y':
		goto __35
	case 'n':
		goto __36
	case 't':
		goto __37
	case 'f':
		goto __38
	case 'o':
		goto __39
	default:
		goto __40
	}
	goto __34
__35:
	// Checking the 'y' is redundant, but makes the code clearer.
	if !(libc.Xstrncmp(tls, bp+4, ts+54247, uint64(*(*int32)(unsafe.Pointer(bp)))) == 0) {
		goto __41
	}
	newBool = 1
	goto goodBoolean
__41:
	;
	return TCL_ERROR
__36:
	if !(libc.Xstrncmp(tls, bp+4, ts+54251, uint64(*(*int32)(unsafe.Pointer(bp)))) == 0) {
		goto __42
	}
	newBool = 0
	goto goodBoolean
__42:
	;
	return TCL_ERROR
__37:
	if !(libc.Xstrncmp(tls, bp+4, ts+16717, uint64(*(*int32)(unsafe.Pointer(bp)))) == 0) {
		goto __43
	}
	newBool = 1
	goto goodBoolean
__43:
	;
	return TCL_ERROR
__38:
	if !(libc.Xstrncmp(tls, bp+4, ts+16711, uint64(*(*int32)(unsafe.Pointer(bp)))) == 0) {
		goto __44
	}
	newBool = 0
	goto goodBoolean
__44:
	;
	return TCL_ERROR
__39:
	if !(*(*int32)(unsafe.Pointer(bp)) < 2) {
		goto __45
	}
	return TCL_ERROR
__45:
	;
	if !(libc.Xstrncmp(tls, bp+4, ts+18764, uint64(*(*int32)(unsafe.Pointer(bp)))) == 0) {
		goto __46
	}
	newBool = 1
	goto goodBoolean
	goto __47
__46:
	if !(libc.Xstrncmp(tls, bp+4, ts+54254, uint64(*(*int32)(unsafe.Pointer(bp)))) == 0) {
		goto __48
	}
	newBool = 0
	goto goodBoolean
__48:
	;
__47:
	;
	return TCL_ERROR
__40:
	return TCL_ERROR
__34:
	;

	// Free the old internalRep before setting the new one. We do this as late
	// as possible to allow the conversion code, in particular
	// Tcl_GetStringFromObj, to use that old internalRep.

goodBoolean:
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __49
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __50
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__50:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__49:
	;

	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(newBool)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclBooleanType))
	return TCL_OK

numericBoolean:
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __51
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __52
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__52:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__51:
	;

	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(newBool)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_NewDoubleObj --
//
//	This function is normally called when not debugging: i.e., when
//	TCL_MEM_DEBUG is not defined. It creates a new double object and
//	initializes it from the argument double value.
//
//	When TCL_MEM_DEBUG is defined, this function just returns the result
//	of calling the debugging version Tcl_DbNewDoubleObj.
//
// Results:
//	The newly created object is returned. This object will have an
//	invalid string representation. The returned object has ref count 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_NewDoubleObj(tls *libc.TLS, dblValue float64) uintptr { /* tclObj.c:2154:9: */
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
		*(*float64)(unsafe.Pointer(objPtr + 32)) = dblValue
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDoubleType))
		{
		}
	}
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_DbNewDoubleObj --
//
//	This function is normally called when debugging: i.e., when
//	TCL_MEM_DEBUG is defined. It creates new double objects. It is the
//	same as the Tcl_NewDoubleObj function above except that it calls
//	Tcl_DbCkalloc directly with the file name and line number from its
//	caller. This simplifies debugging since then the [memory active]
//	command will report the correct file name and line number when
//	reporting objects that haven't been freed.
//
//	When TCL_MEM_DEBUG is not defined, this function just returns the
//	result of calling Tcl_NewDoubleObj.
//
// Results:
//	The newly created object is returned. This object will have an invalid
//	string representation. The returned object has ref count 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_DbNewDoubleObj(tls *libc.TLS, dblValue float64, file uintptr, line int32) uintptr { /* tclObj.c:2213:9: */
	return XTcl_NewDoubleObj(tls, dblValue)
}

//----------------------------------------------------------------------
//
// Tcl_SetDoubleObj --
//
//	Modify an object to be a double object and to have the specified
//	double value.
//
// Results:
//	None.
//
// Side effects:
//	The object's old string rep, if any, is freed. Also, any old internal
//	rep is freed.
//
//----------------------------------------------------------------------

func XTcl_SetDoubleObj(tls *libc.TLS, objPtr uintptr, dblValue float64) { /* tclObj.c:2244:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+54258))
	}

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _isobjPtr uintptr = objPtr
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}
		*(*float64)(unsafe.Pointer(objPtr + 32)) = dblValue
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDoubleType))
	}
}

//----------------------------------------------------------------------
//
// Tcl_GetDoubleFromObj --
//
//	Attempt to return a double from the Tcl object "objPtr". If the object
//	is not already a double, an attempt will be made to convert it to one.
//
// Results:
//	The return value is a standard Tcl object result. If an error occurs
//	during conversion, an error message is left in the interpreter's
//	result unless "interp" is NULL.
//
// Side effects:
//	If the object is not already a double, the conversion will free any
//	old internal representation.
//
//----------------------------------------------------------------------

func XTcl_GetDoubleFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, dblPtr uintptr) int32 { /* tclObj.c:2276:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	for ok := true; ok; ok = sSetDoubleFromAny(tls, interp, objPtr) == TCL_OK {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
			if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(objPtr + 32))) != 0 {
				if interp != uintptr(0) {
					XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
						ts+54275, -1))
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+54312, ts+54319,
						uintptr(0)))
				}
				return TCL_ERROR
			}
			*(*float64)(unsafe.Pointer(dblPtr)) = *(*float64)(unsafe.Pointer(objPtr + 32))
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*float64)(unsafe.Pointer(dblPtr)) = float64(*(*int32)(unsafe.Pointer(objPtr + 32)))
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType)) {
			// var big Mp_int at bp+40, 24

			if *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8)) == libc.UintptrFromInt64(int64(-1)) {
				*(*Mp_int)(unsafe.Pointer(bp + 40)) = *(*Mp_int)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32))))
			} else {
				(*Mp_int)(unsafe.Pointer(bp + 40 /* &big */)).Fdp = *(*uintptr)(unsafe.Pointer(objPtr + 32))
				(*Mp_int)(unsafe.Pointer(bp + 40 /* &big */)).Fsign = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 30
				(*Mp_int)(unsafe.Pointer(bp + 40 /* &big */)).Falloc = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 15 & 0x7FFF
				(*Mp_int)(unsafe.Pointer(bp + 40 /* &big */)).Fused = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) & 0x7FFF
			}

			*(*float64)(unsafe.Pointer(dblPtr)) = XTclBignumToDouble(tls, bp+40)
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*float64)(unsafe.Pointer(dblPtr)) = float64(*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)))
			return TCL_OK
		}
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// SetDoubleFromAny --
//
//	Attempt to generate an double-precision floating point internal form
//	for the Tcl object "objPtr".
//
// Results:
//	The return value is a standard Tcl object result. If an error occurs
//	during conversion, an error message is left in the interpreter's
//	result unless "interp" is NULL.
//
// Side effects:
//	If no error occurs, a double is stored as "objPtr"s internal
//	representation.
//
//----------------------------------------------------------------------

func sSetDoubleFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclObj.c:2337:1: */
	return XTclParseNumber(tls, interp, objPtr, ts+54323, uintptr(0), -1,
		uintptr(0), 0)
}

//----------------------------------------------------------------------
//
// UpdateStringOfDouble --
//
//	Update the string representation for a double-precision floating point
//	object. This must obey the current tcl_precision value for
//	double-to-string conversions. Note: This function does not free an
//	existing old string rep so storage will be lost if this has not
//	already been done.
//
// Results:
//	None.
//
// Side effects:
//	The object's string is set to a valid string that results from the
//	double-to-string conversion.
//
//----------------------------------------------------------------------

func sUpdateStringOfDouble(tls *libc.TLS, objPtr uintptr) { /* tclObj.c:2367:1: */
	bp := tls.Alloc(27)
	defer tls.Free(27)

	// var buffer [27]int8 at bp, 27

	var len int32

	XTcl_PrintDouble(tls, uintptr(0), *(*float64)(unsafe.Pointer(objPtr + 32)), bp)
	len = int32(libc.Xstrlen(tls, bp))

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(len+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, bp, uint64(len+1))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = len
}

//----------------------------------------------------------------------
//
// Tcl_NewIntObj --
//
//	If a client is compiled with TCL_MEM_DEBUG defined, calls to
//	Tcl_NewIntObj to create a new integer object end up calling the
//	debugging function Tcl_DbNewLongObj instead.
//
//	Otherwise, if the client is compiled without TCL_MEM_DEBUG defined,
//	calls to Tcl_NewIntObj result in a call to one of the two
//	Tcl_NewIntObj implementations below. We provide two implementations so
//	that the Tcl core can be compiled to do memory debugging of the core
//	even if a client does not request it for itself.
//
//	Integer and long integer objects share the same "integer" type
//	implementation. We store all integers as longs and Tcl_GetIntFromObj
//	checks whether the current value of the long can be represented by an
//	int.
//
// Results:
//	The newly created object is returned. This object will have an invalid
//	string representation. The returned object has ref count 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_NewIntObj(tls *libc.TLS, intValue int32) uintptr { /* tclObj.c:2423:9: */
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
		*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(intValue)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
		{
		}
	}
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_SetIntObj --
//
//	Modify an object to be an integer and to have the specified integer
//	value.
//
// Results:
//	None.
//
// Side effects:
//	The object's old string rep, if any, is freed. Also, any old internal
//	rep is freed.
//
//----------------------------------------------------------------------

func XTcl_SetIntObj(tls *libc.TLS, objPtr uintptr, intValue int32) { /* tclObj.c:2454:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+54345))
	}

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _isobjPtr uintptr = objPtr
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}
		*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(intValue)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	}
}

//----------------------------------------------------------------------
//
// Tcl_GetIntFromObj --
//
//	Retrieve the integer value of 'objPtr'.
//
// Value
//
//	TCL_OK
//
//	    Success.
//
//	TCL_ERROR
//
//	    An error occurred during conversion or the integral value can not
//	    be represented as an integer (it might be too large). An error
//	    message is left in the interpreter's result if 'interp' is not
//	    NULL.
//
// Effect
//
//	'objPtr' is converted to an integer if necessary if it is not one
//	already.  The conversion frees any previously-existing internal
//	representation.
//
//----------------------------------------------------------------------

func XTcl_GetIntFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, intPtr uintptr) int32 { /* tclObj.c:2495:1: */
	return func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(intPtr)) = *(*int32)(unsafe.Pointer(objPtr + 32))
				return TCL_OK
			}()
		}
		return XTcl_GetLongFromObj(tls, interp, objPtr, intPtr)
	}()
}

//----------------------------------------------------------------------
//
// SetIntFromAny --
//
//	Attempts to force the internal representation for a Tcl object to
//	tclIntType, specifically.
//
// Results:
//	The return value is a standard object Tcl result. If an error occurs
//	during conversion, an error message is left in the interpreter's
//	result unless "interp" is NULL.
//
//----------------------------------------------------------------------

func sSetIntFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclObj.c:2539:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var l int32 at bp, 4

	return func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 { *(*int32)(unsafe.Pointer(bp)) = *(*int32)(unsafe.Pointer(objPtr + 32)); return TCL_OK }()
		}
		return XTcl_GetLongFromObj(tls, interp, objPtr, bp)
	}()
}

//----------------------------------------------------------------------
//
// UpdateStringOfInt --
//
//	Update the string representation for an integer object. Note: This
//	function does not free an existing old string rep so storage will be
//	lost if this has not already been done.
//
// Results:
//	None.
//
// Side effects:
//	The object's string is set to a valid string that results from the
//	int-to-string conversion.
//
//----------------------------------------------------------------------

func sUpdateStringOfInt(tls *libc.TLS, objPtr uintptr) { /* tclObj.c:2568:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var buffer [24]int8 at bp, 24

	var len int32

	len = XTclFormatInt(tls, bp, *(*int32)(unsafe.Pointer(objPtr + 32)))

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(len+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, bp, uint64(len+1))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = len
}

//----------------------------------------------------------------------
//
// Tcl_NewLongObj --
//
//	If a client is compiled with TCL_MEM_DEBUG defined, calls to
//	Tcl_NewLongObj to create a new long integer object end up calling the
//	debugging function Tcl_DbNewLongObj instead.
//
//	Otherwise, if the client is compiled without TCL_MEM_DEBUG defined,
//	calls to Tcl_NewLongObj result in a call to one of the two
//	Tcl_NewLongObj implementations below. We provide two implementations
//	so that the Tcl core can be compiled to do memory debugging of the
//	core even if a client does not request it for itself.
//
//	Integer and long integer objects share the same "integer" type
//	implementation. We store all integers as longs and Tcl_GetIntFromObj
//	checks whether the current value of the long can be represented by an
//	int.
//
// Results:
//	The newly created object is returned. This object will have an invalid
//	string representation. The returned object has ref count 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_NewLongObj(tls *libc.TLS, longValue int32) uintptr { /* tclObj.c:2624:9: */
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
		*(*int32)(unsafe.Pointer(objPtr + 32)) = longValue
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
		{
		}
	}
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_DbNewLongObj --
//
//	If a client is compiled with TCL_MEM_DEBUG defined, calls to
//	Tcl_NewIntObj and Tcl_NewLongObj to create new integer or long integer
//	objects end up calling the debugging function Tcl_DbNewLongObj
//	instead. We provide two implementations of Tcl_DbNewLongObj so that
//	whether the Tcl core is compiled to do memory debugging of the core is
//	independent of whether a client requests debugging for itself.
//
//	When the core is compiled with TCL_MEM_DEBUG defined, Tcl_DbNewLongObj
//	calls Tcl_DbCkalloc directly with the file name and line number from
//	its caller. This simplifies debugging since then the [memory active]
//	command will report the caller's file name and line number when
//	reporting objects that haven't been freed.
//
//	Otherwise, when the core is compiled without TCL_MEM_DEBUG defined,
//	this function just returns the result of calling Tcl_NewLongObj.
//
// Results:
//	The newly created long integer object is returned. This object will
//	have an invalid string representation. The returned object has ref
//	count 0.
//
// Side effects:
//	Allocates memory.
//
//----------------------------------------------------------------------

func XTcl_DbNewLongObj(tls *libc.TLS, longValue int32, file uintptr, line int32) uintptr { /* tclObj.c:2691:9: */
	return XTcl_NewLongObj(tls, longValue)
}

//----------------------------------------------------------------------
//
// Tcl_SetLongObj --
//
//	Modify an object to be an integer object and to have the specified
//	long integer value.
//
// Results:
//	None.
//
// Side effects:
//	The object's old string rep, if any, is freed. Also, any old internal
//	rep is freed.
//
//----------------------------------------------------------------------

func XTcl_SetLongObj(tls *libc.TLS, objPtr uintptr, longValue int32) { /* tclObj.c:2723:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+54359))
	}

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _isobjPtr uintptr = objPtr
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
			}
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}
		*(*int32)(unsafe.Pointer(objPtr + 32)) = longValue
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	}
}

//----------------------------------------------------------------------
//
// Tcl_GetLongFromObj --
//
//	Attempt to return an long integer from the Tcl object "objPtr". If the
//	object is not already an int object, an attempt will be made to
//	convert it to one.
//
// Results:
//	The return value is a standard Tcl object result. If an error occurs
//	during conversion, an error message is left in the interpreter's
//	result unless "interp" is NULL.
//
// Side effects:
//	If the object is not already an int object, the conversion will free
//	any old internal representation.
//
//----------------------------------------------------------------------

func XTcl_GetLongFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, longPtr uintptr) int32 { /* tclObj.c:2757:1: */
	bp := tls.Alloc(112)
	defer tls.Free(112)

	// We return any integer in the range -ULONG_MAX to ULONG_MAX
	// converted to a long, ignoring overflow. The rule preserves
	// existing semantics for conversion of integers on input, but
	// avoids inadvertent demotion of wide integers to 32-bit ones in
	// the internal rep.

	var w Tcl_WideInt
	var value uint32
	// var numBytes Size_t at bp+104, 8

	// var scratch int32 at bp+72, 4

	var bytes uintptr
	var s uintptr
	var msg uintptr
	// Must check for those bignum values that can fit in a long, even
	// when auto-narrowing is enabled. Only those values in the signed
	// long range get auto-narrowed to tclIntType, while all the
	// values in the unsigned long range will fit in a long.

	// var big Mp_int at bp+80, 24

__1:
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType))) {
		goto __4
	}
	*(*int32)(unsafe.Pointer(longPtr)) = *(*int32)(unsafe.Pointer(objPtr + 32))
	return TCL_OK
__4:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType))) {
		goto __5
	}
	// We return any integer in the range -ULONG_MAX to ULONG_MAX
	// converted to a long, ignoring overflow. The rule preserves
	// existing semantics for conversion of integers on input, but
	// avoids inadvertent demotion of wide integers to 32-bit ones in
	// the internal rep.

	w = *(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32))

	if !(w >= -int64(uint32(0x7fffffff)*2+1) &&
		w <= int64(uint32(0x7fffffff)*2+1)) {
		goto __6
	}
	*(*int32)(unsafe.Pointer(longPtr)) = int32(w)
	return TCL_OK
__6:
	;
	goto tooLarge
__5:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType))) {
		goto __7
	}
	if !(interp != uintptr(0)) {
		goto __8
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+54374,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}
			return XTcl_GetString(tls, objPtr)
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+54404, uintptr(0)))
__8:
	;
	return TCL_ERROR
__7:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType))) {
		goto __9
	}

	if !(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8)) == libc.UintptrFromInt64(int64(-1))) {
		goto __10
	}
	*(*Mp_int)(unsafe.Pointer(bp + 80)) = *(*Mp_int)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32))))
	goto __11
__10:
	(*Mp_int)(unsafe.Pointer(bp + 80 /* &big */)).Fdp = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	(*Mp_int)(unsafe.Pointer(bp + 80 /* &big */)).Fsign = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 30
	(*Mp_int)(unsafe.Pointer(bp + 80 /* &big */)).Falloc = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 15 & 0x7FFF
	(*Mp_int)(unsafe.Pointer(bp + 80 /* &big */)).Fused = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) & 0x7FFF
__11:
	;

	if !(Size_t((*Mp_int)(unsafe.Pointer(bp+80)).Fused) <= (uint64(8)*uint64(unsafe.Sizeof(int32(0)))+uint64(MP_DIGIT_BIT)-uint64(1))/
		uint64(MP_DIGIT_BIT)) {
		goto __12
	}
	value = uint32(0)
	bytes = bp + 72 /* &scratch */

	if !(XTclBN_mp_to_ubin(tls, bp+80, bytes, uint64(unsafe.Sizeof(int32(0))), bp+104) == MP_OKAY) {
		goto __13
	}
__14:
	if !(libc.PostDecUint64(&*(*Size_t)(unsafe.Pointer(bp + 104)), 1) > uint64(0)) {
		goto __15
	}
	value = value<<8 | uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bytes, 1))))
	goto __14
__15:
	;
	if !((*Mp_int)(unsafe.Pointer(bp+80)).Fsign != 0) {
		goto __16
	}
	*(*int32)(unsafe.Pointer(longPtr)) = -int32(value)
	goto __17
__16:
	*(*int32)(unsafe.Pointer(longPtr)) = int32(value)
__17:
	;
	return TCL_OK
__13:
	;
__12:
	;
tooLarge:
	if !(interp != uintptr(0)) {
		goto __18
	}
	s = ts + 11084 /* "integer value to..." */
	msg = XTcl_NewStringObj(tls, s, -1)

	XTcl_SetObjResult(tls, interp, msg)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+8778, ts+54412, s, uintptr(0)))
__18:
	;
	return TCL_ERROR
__9:
	;
	goto __2
__2:
	if XTclParseNumber(tls, interp, objPtr, ts+6261, uintptr(0), -1, uintptr(0),
		TCL_PARSE_INTEGER_ONLY) == TCL_OK {
		goto __1
	}
	goto __3
__3:
	;
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// UpdateStringOfWideInt --
//
//	Update the string representation for a wide integer object. Note: this
//	function does not free an existing old string rep so storage will be
//	lost if this has not already been done.
//
// Results:
//	None.
//
// Side effects:
//	The object's string is set to a valid string that results from the
//	wideInt-to-string conversion.
//
//----------------------------------------------------------------------

func sUpdateStringOfWideInt(tls *libc.TLS, objPtr uintptr) { /* tclObj.c:2864:1: */
	bp := tls.Alloc(34)
	defer tls.Free(34)

	// var buffer [26]int8 at bp+8, 26

	var len uint32
	var wideVal Tcl_WideInt = *(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32))

	// Note that sprintf will generate a compiler warning under Mingw claiming
	// %I64 is an unknown format specifier. Just ignore this warning. We can't
	// use %L as the format specifier since that gets printed as a 32 bit
	// value.

	libc.Xsprintf(tls, bp+8, ts+54422, libc.VaList(bp, wideVal))
	len = uint32(libc.Xstrlen(tls, bp+8))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, len+uint32(1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, bp+8, uint64(len+uint32(1)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32(len)
}

//----------------------------------------------------------------------
//
// Tcl_NewWideIntObj --
//
//	If a client is compiled with TCL_MEM_DEBUG defined, calls to
//	Tcl_NewWideIntObj to create a new 64-bit integer object end up calling
//	the debugging function Tcl_DbNewWideIntObj instead.
//
//	Otherwise, if the client is compiled without TCL_MEM_DEBUG defined,
//	calls to Tcl_NewWideIntObj result in a call to one of the two
//	Tcl_NewWideIntObj implementations below. We provide two
//	implementations so that the Tcl core can be compiled to do memory
//	debugging of the core even if a client does not request it for itself.
//
// Results:
//	The newly created object is returned. This object will have an invalid
//	string representation. The returned object has ref count 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_NewWideIntObj(tls *libc.TLS, wideValue Tcl_WideInt) uintptr { /* tclObj.c:2925:9: */
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	XTcl_SetWideIntObj(tls, objPtr, wideValue)
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_DbNewWideIntObj --
//
//	If a client is compiled with TCL_MEM_DEBUG defined, calls to
//	Tcl_NewWideIntObj to create new wide integer end up calling the
//	debugging function Tcl_DbNewWideIntObj instead. We provide two
//	implementations of Tcl_DbNewWideIntObj so that whether the Tcl core is
//	compiled to do memory debugging of the core is independent of whether
//	a client requests debugging for itself.
//
//	When the core is compiled with TCL_MEM_DEBUG defined,
//	Tcl_DbNewWideIntObj calls Tcl_DbCkalloc directly with the file name
//	and line number from its caller. This simplifies debugging since then
//	the checkmem command will report the caller's file name and line
//	number when reporting objects that haven't been freed.
//
//	Otherwise, when the core is compiled without TCL_MEM_DEBUG defined,
//	this function just returns the result of calling Tcl_NewWideIntObj.
//
// Results:
//	The newly created wide integer object is returned. This object will
//	have an invalid string representation. The returned object has ref
//	count 0.
//
// Side effects:
//	Allocates memory.
//
//----------------------------------------------------------------------

func XTcl_DbNewWideIntObj(tls *libc.TLS, wideValue Tcl_WideInt, file uintptr, line int32) uintptr { /* tclObj.c:2992:9: */
	return XTcl_NewWideIntObj(tls, wideValue)
}

//----------------------------------------------------------------------
//
// Tcl_SetWideIntObj --
//
//	Modify an object to be a wide integer object and to have the specified
//	wide integer value.
//
// Results:
//	None.
//
// Side effects:
//	The object's old string rep, if any, is freed. Also, any old internal
//	rep is freed.
//
//----------------------------------------------------------------------

func XTcl_SetWideIntObj(tls *libc.TLS, objPtr uintptr, wideValue Tcl_WideInt) { /* tclObj.c:3025:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+54428))
	}

	if wideValue >= int64(-0x7fffffff-1) &&
		wideValue <= int64(0x7fffffff) {
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _isobjPtr uintptr = objPtr
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
					if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
				}
			}
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
				if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
				}
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
			}
			*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(wideValue)
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
		}
	} else {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				var _isobjPtr uintptr = objPtr
				if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
					if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
				}
			}
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
				if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
				}
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
			}
			*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)) = wideValue
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclWideIntType))
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_GetWideIntFromObj --
//
//	Attempt to return a wide integer from the Tcl object "objPtr". If the
//	object is not already a wide int object, an attempt will be made to
//	convert it to one.
//
// Results:
//	The return value is a standard Tcl object result. If an error occurs
//	during conversion, an error message is left in the interpreter's
//	result unless "interp" is NULL.
//
// Side effects:
//	If the object is not already an int object, the conversion will free
//	any old internal representation.
//
//----------------------------------------------------------------------

func XTcl_GetWideIntFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, wideIntPtr uintptr) int32 { /* tclObj.c:3072:1: */
	bp := tls.Alloc(112)
	defer tls.Free(112)

	for ok := true; ok; ok = XTclParseNumber(tls, interp, objPtr, ts+6261, uintptr(0), -1, uintptr(0),
		TCL_PARSE_INTEGER_ONLY) == TCL_OK {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(wideIntPtr)) = *(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32))
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*Tcl_WideInt)(unsafe.Pointer(wideIntPtr)) = Tcl_WideInt(*(*int32)(unsafe.Pointer(objPtr + 32)))
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
			if interp != uintptr(0) {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+54374,
					libc.VaList(bp, func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
						}
						return XTcl_GetString(tls, objPtr)
					}())))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+54404, uintptr(0)))
			}
			return TCL_ERROR
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType)) {
			// Must check for those bignum values that can fit in a
			// Tcl_WideInt, even when auto-narrowing is enabled.

			// var big Mp_int at bp+80, 24

			if *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8)) == libc.UintptrFromInt64(int64(-1)) {
				*(*Mp_int)(unsafe.Pointer(bp + 80)) = *(*Mp_int)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32))))
			} else {
				(*Mp_int)(unsafe.Pointer(bp + 80 /* &big */)).Fdp = *(*uintptr)(unsafe.Pointer(objPtr + 32))
				(*Mp_int)(unsafe.Pointer(bp + 80 /* &big */)).Fsign = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 30
				(*Mp_int)(unsafe.Pointer(bp + 80 /* &big */)).Falloc = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 15 & 0x7FFF
				(*Mp_int)(unsafe.Pointer(bp + 80 /* &big */)).Fused = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) & 0x7FFF
			}

			if Size_t((*Mp_int)(unsafe.Pointer(bp+80)).Fused) <= (uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0)))+
				uint64(MP_DIGIT_BIT)-uint64(1))/uint64(MP_DIGIT_BIT) {
				var value Tcl_WideUInt = uint64(0)
				// var numBytes Size_t at bp+104, 8

				// var scratch Tcl_WideInt at bp+72, 8

				var bytes uintptr = bp + 72 /* &scratch */

				if XTclBN_mp_to_ubin(tls, bp+80, bytes, uint64(unsafe.Sizeof(Tcl_WideInt(0))), bp+104) == MP_OKAY {
					for libc.PostDecUint64(&*(*Size_t)(unsafe.Pointer(bp + 104)), 1) > uint64(0) {
						value = value<<8 | Tcl_WideUInt(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bytes, 1))))
					}
					if (*Mp_int)(unsafe.Pointer(bp+80)).Fsign != 0 {
						*(*Tcl_WideInt)(unsafe.Pointer(wideIntPtr)) = -Tcl_WideInt(value)
					} else {
						*(*Tcl_WideInt)(unsafe.Pointer(wideIntPtr)) = Tcl_WideInt(value)
					}
					return TCL_OK
				}
			}
			if interp != uintptr(0) {
				var s uintptr = ts + 11084 /* "integer value to..." */
				var msg uintptr = XTcl_NewStringObj(tls, s, -1)

				XTcl_SetObjResult(tls, interp, msg)
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+8778, ts+54412, s, uintptr(0)))
			}
			return TCL_ERROR
		}
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// SetWideIntFromAny --
//
//	Attempts to force the internal representation for a Tcl object to
//	tclWideIntType, specifically.
//
// Results:
//	The return value is a standard object Tcl result. If an error occurs
//	during conversion, an error message is left in the interpreter's
//	result unless "interp" is NULL.
//
//----------------------------------------------------------------------

func sSetWideIntFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclObj.c:3158:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var w Tcl_WideInt at bp, 8

	return XTcl_GetWideIntFromObj(tls, interp, objPtr, bp)
}

//----------------------------------------------------------------------
//
// FreeBignum --
//
//	This function frees the internal rep of a bignum.
//
// Results:
//	None.
//
//----------------------------------------------------------------------

func sFreeBignum(tls *libc.TLS, objPtr uintptr) { /* tclObj.c:3181:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var toFree Mp_int at bp, 24
	// Bignum to free

	if *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8)) == libc.UintptrFromInt64(int64(-1)) {
		*(*Mp_int)(unsafe.Pointer(bp)) = *(*Mp_int)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32))))
	} else {
		(*Mp_int)(unsafe.Pointer(bp /* &toFree */)).Fdp = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		(*Mp_int)(unsafe.Pointer(bp /* &toFree */)).Fsign = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 30
		(*Mp_int)(unsafe.Pointer(bp /* &toFree */)).Falloc = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 15 & 0x7FFF
		(*Mp_int)(unsafe.Pointer(bp /* &toFree */)).Fused = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) & 0x7FFF
	}

	XTclBN_mp_clear(tls, bp)
	if int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) < 0 {
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(objPtr + 32)))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DupBignum --
//
//	This function duplicates the internal rep of a bignum.
//
// Results:
//	None.
//
// Side effects:
//	The destination object receies a copy of the source object
//
//----------------------------------------------------------------------

func sDupBignum(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclObj.c:3211:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var bignumVal Mp_int at bp+24, 24

	// var bignumCopy Mp_int at bp, 24

	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclBignumType))
	if *(*uintptr)(unsafe.Pointer(srcPtr + 32 + 8)) == libc.UintptrFromInt64(int64(-1)) {
		*(*Mp_int)(unsafe.Pointer(bp + 24)) = *(*Mp_int)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(srcPtr + 32))))
	} else {
		(*Mp_int)(unsafe.Pointer(bp + 24 /* &bignumVal */)).Fdp = *(*uintptr)(unsafe.Pointer(srcPtr + 32))
		(*Mp_int)(unsafe.Pointer(bp + 24 /* &bignumVal */)).Fsign = int32(*(*uintptr)(unsafe.Pointer(srcPtr + 32 + 8))) >> 30
		(*Mp_int)(unsafe.Pointer(bp + 24 /* &bignumVal */)).Falloc = int32(*(*uintptr)(unsafe.Pointer(srcPtr + 32 + 8))) >> 15 & 0x7FFF
		(*Mp_int)(unsafe.Pointer(bp + 24 /* &bignumVal */)).Fused = int32(*(*uintptr)(unsafe.Pointer(srcPtr + 32 + 8))) & 0x7FFF
	}

	if XTclBN_mp_init_copy(tls, bp, bp+24) != MP_OKAY {
		XTcl_Panic(tls, ts+54446, 0)
	}
	if (*Mp_int)(unsafe.Pointer(bp)).Fused > 0x7FFF {
		var temp uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Mp_int{})))
		*(*Mp_int)(unsafe.Pointer(temp)) = *(*Mp_int)(unsafe.Pointer(bp /* bignumCopy */))
		*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = temp
		*(*uintptr)(unsafe.Pointer(copyPtr + 32 + 8 /* &.ptr2 */)) = libc.UintptrFromInt64(int64(-1))
	} else {
		if (*Mp_int)(unsafe.Pointer(bp)).Falloc > 0x7FFF {
			XTclBN_mp_shrink(tls, bp)
		}
		*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = (*Mp_int)(unsafe.Pointer(bp /* &bignumCopy */)).Fdp
		*(*uintptr)(unsafe.Pointer(copyPtr + 32 + 8 /* &.ptr2 */)) = uintptr(Intptr_t((*Mp_int)(unsafe.Pointer(bp)).Fsign<<30 | (*Mp_int)(unsafe.Pointer(bp)).Falloc<<15 | (*Mp_int)(unsafe.Pointer(bp)).Fused))
	}

}

//----------------------------------------------------------------------
//
// UpdateStringOfBignum --
//
//	This function updates the string representation of a bignum object.
//
// Results:
//	None.
//
// Side effects:
//	The object's string is set to whatever results from the bignum-
//	to-string conversion.
//
// The object's existing string representation is NOT freed; memory will leak
// if the string rep is still valid at the time this function is called.
//
//----------------------------------------------------------------------

func sUpdateStringOfBignum(tls *libc.TLS, objPtr uintptr) { /* tclObj.c:3247:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	// var bignumVal Mp_int at bp, 24

	// var size int32 at bp+24, 4

	var status int32
	var stringVal uintptr

	if *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8)) == libc.UintptrFromInt64(int64(-1)) {
		*(*Mp_int)(unsafe.Pointer(bp)) = *(*Mp_int)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32))))
	} else {
		(*Mp_int)(unsafe.Pointer(bp /* &bignumVal */)).Fdp = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		(*Mp_int)(unsafe.Pointer(bp /* &bignumVal */)).Fsign = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 30
		(*Mp_int)(unsafe.Pointer(bp /* &bignumVal */)).Falloc = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 15 & 0x7FFF
		(*Mp_int)(unsafe.Pointer(bp /* &bignumVal */)).Fused = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) & 0x7FFF
	}

	status = XTclBN_mp_radix_size(tls, bp, 10, bp+24)
	if status != MP_OKAY {
		XTcl_Panic(tls, ts+54482, 0)
	}
	if *(*int32)(unsafe.Pointer(bp + 24)) < 2 {
		// mp_radix_size() returns < 2 when more than INT_MAX bytes would be
		// needed to hold the string rep (because mp_radix_size ignores
		// integer overflow issues).
		//
		// Note that so long as we enforce our bignums to the size that fits
		// in a packed bignum, this branch will never be taken.

		XTcl_Panic(tls, ts+54525, 0)
	}
	stringVal = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 24))))
	status = XTclBN_mp_to_radix(tls, bp, stringVal, uint64(*(*int32)(unsafe.Pointer(bp + 24 /* size */))), uintptr(0), 10)
	if status != MP_OKAY {
		XTcl_Panic(tls, ts+54576, 0)
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = stringVal
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = *(*int32)(unsafe.Pointer(bp + 24)) - 1 // size includes a trailing NUL byte.
}

//----------------------------------------------------------------------
//
// Tcl_NewBignumObj --
//
//	Creates an initializes a bignum object.
//
// Results:
//	Returns the newly created object.
//
// Side effects:
//	The bignum value is cleared, since ownership has transferred to Tcl.
//
//----------------------------------------------------------------------

func XTcl_NewBignumObj(tls *libc.TLS, bignumValue uintptr) uintptr { /* tclObj.c:3307:9: */
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	XTcl_SetBignumObj(tls, objPtr, bignumValue)
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_DbNewBignumObj --
//
//	This function is normally called when debugging: that is, when
//	TCL_MEM_DEBUG is defined. It constructs a bignum object, recording the
//	creation point so that [memory active] can report it.
//
// Results:
//	Returns the newly created object.
//
// Side effects:
//	The bignum value is cleared, since ownership has transferred to Tcl.
//
//----------------------------------------------------------------------

func XTcl_DbNewBignumObj(tls *libc.TLS, bignumValue uintptr, file uintptr, line int32) uintptr { /* tclObj.c:3351:9: */
	return XTcl_NewBignumObj(tls, bignumValue)
}

//----------------------------------------------------------------------
//
// GetBignumFromObj --
//
//	This function retrieves a 'bignum' value from a Tcl object, converting
//	the object if necessary. Either copies or transfers the mp_int value
//	depending on the copy flag value passed in.
//
// Results:
//	Returns TCL_OK if the conversion is successful, TCL_ERROR otherwise.
//
// Side effects:
//	A copy of bignum is stored in *bignumValue, which is expected to be
//	uninitialized or cleared. If conversion fails, and the 'interp'
//	argument is not NULL, an error message is stored in the interpreter
//	result.
//
//----------------------------------------------------------------------

func sGetBignumFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, copy int32, bignumValue uintptr) int32 { /* tclObj.c:3383:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	for ok := true; ok; ok = XTclParseNumber(tls, interp, objPtr, ts+6261, uintptr(0), -1, uintptr(0),
		TCL_PARSE_INTEGER_ONLY) == TCL_OK {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType)) {
			if copy != 0 || (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
				// var temp Mp_int at bp+64, 24

				if *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8)) == libc.UintptrFromInt64(int64(-1)) {
					*(*Mp_int)(unsafe.Pointer(bp + 64)) = *(*Mp_int)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32))))
				} else {
					(*Mp_int)(unsafe.Pointer(bp + 64 /* &temp */)).Fdp = *(*uintptr)(unsafe.Pointer(objPtr + 32))
					(*Mp_int)(unsafe.Pointer(bp + 64 /* &temp */)).Fsign = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 30
					(*Mp_int)(unsafe.Pointer(bp + 64 /* &temp */)).Falloc = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 15 & 0x7FFF
					(*Mp_int)(unsafe.Pointer(bp + 64 /* &temp */)).Fused = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) & 0x7FFF
				}

				if XTclBN_mp_init_copy(tls, bignumValue, bp+64) != MP_OKAY {
					if interp != uintptr(0) {
						XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
							ts+54619, -1))
						XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+15098, uintptr(0)))
					}
					return TCL_ERROR
				}
			} else {
				if *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8)) == libc.UintptrFromInt64(int64(-1)) {
					*(*Mp_int)(unsafe.Pointer(bignumValue)) = *(*Mp_int)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32))))
				} else {
					(*(*Mp_int)(unsafe.Pointer(bignumValue))).Fdp = *(*uintptr)(unsafe.Pointer(objPtr + 32))
					(*(*Mp_int)(unsafe.Pointer(bignumValue))).Fsign = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 30
					(*(*Mp_int)(unsafe.Pointer(bignumValue))).Falloc = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 15 & 0x7FFF
					(*(*Mp_int)(unsafe.Pointer(bignumValue))).Fused = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) & 0x7FFF
				}

				*(*uintptr)(unsafe.Pointer(objPtr + 32)) = uintptr(0)
				*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
				if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) {
					if 0 == 0 {
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
					} else {
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(0+1))
						libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, XtclEmptyStringRep, uint64(0))
						*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)) = int8(0)
						(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
					}

				}
			}
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			XTclBNInitBignumFromLong(tls, bignumValue, *(*int32)(unsafe.Pointer(objPtr + 32)))
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			XTclBNInitBignumFromWideInt(tls, bignumValue,
				*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)))
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
			if interp != uintptr(0) {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+54374,
					libc.VaList(bp+24, func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
						}
						return XTcl_GetString(tls, objPtr)
					}())))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+7444, ts+54404, uintptr(0)))
			}
			return TCL_ERROR
		}
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_GetBignumFromObj --
//
//	This function retrieves a 'bignum' value from a Tcl object, converting
//	the object if necessary.
//
// Results:
//	Returns TCL_OK if the conversion is successful, TCL_ERROR otherwise.
//
// Side effects:
//	A copy of bignum is stored in *bignumValue, which is expected to be
//	uninitialized or cleared. If conversion fails, an the 'interp'
//	argument is not NULL, an error message is stored in the interpreter
//	result.
//
//	It is expected that the caller will NOT have invoked mp_init on the
//	bignum value before passing it in. Tcl will initialize the mp_int as
//	it sets the value. The value is a copy of the value in objPtr, so it
//	becomes the responsibility of the caller to call mp_clear on it.
//
//----------------------------------------------------------------------

func XTcl_GetBignumFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, bignumValue uintptr) int32 { /* tclObj.c:3465:1: */
	return sGetBignumFromObj(tls, interp, objPtr, 1, bignumValue)
}

//----------------------------------------------------------------------
//
// Tcl_TakeBignumFromObj --
//
//	This function retrieves a 'bignum' value from a Tcl object, converting
//	the object if necessary.
//
// Results:
//	Returns TCL_OK if the conversion is successful, TCL_ERROR otherwise.
//
// Side effects:
//	A copy of bignum is stored in *bignumValue, which is expected to be
//	uninitialized or cleared. If conversion fails, an the 'interp'
//	argument is not NULL, an error message is stored in the interpreter
//	result.
//
//	It is expected that the caller will NOT have invoked mp_init on the
//	bignum value before passing it in. Tcl will initialize the mp_int as
//	it sets the value. The value is transferred from the internals of
//	objPtr to the caller, passing responsibility of the caller to call
//	mp_clear on it. The objPtr is cleared to hold an empty value.
//
//----------------------------------------------------------------------

func XTcl_TakeBignumFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, bignumValue uintptr) int32 { /* tclObj.c:3500:1: */
	return sGetBignumFromObj(tls, interp, objPtr, 0, bignumValue)
}

//----------------------------------------------------------------------
//
// Tcl_SetBignumObj --
//
//	This function sets the value of a Tcl_Obj to a large integer.
//
// Results:
//	None.
//
// Side effects:
//	Object value is stored. The bignum value is cleared, since ownership
//	has transferred to Tcl.
//
//----------------------------------------------------------------------

func XTcl_SetBignumObj(tls *libc.TLS, objPtr uintptr, bignumValue uintptr) { /* tclObj.c:3526:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var _isobjPtr uintptr
	var _isobjPtr1 uintptr
	var value uint32
	// var numBytes Size_t at bp+16, 8

	// var scratch int32 at bp+8, 4

	var bytes uintptr
	var _isobjPtr2 uintptr
	var _isobjPtr3 uintptr
	var value1 Tcl_WideUInt
	// var numBytes1 Size_t at bp+32, 8

	// var scratch1 Tcl_WideInt at bp+24, 8

	var bytes1 uintptr
	var _isobjPtr4 uintptr
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1) {
		goto __1
	}
	XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+54656))
__1:
	;
	if !(Size_t((*Mp_int)(unsafe.Pointer(bignumValue)).Fused) <=
		(uint64(8)*uint64(unsafe.Sizeof(int32(0)))+uint64(MP_DIGIT_BIT)-uint64(1))/uint64(MP_DIGIT_BIT)) {
		goto __2
	}
	value = uint32(0)
	bytes = bp + 8 /* &scratch */

	if !(XTclBN_mp_to_ubin(tls, bignumValue, bytes, uint64(unsafe.Sizeof(int32(0))), bp+16) != MP_OKAY) {
		goto __3
	}
	goto tooLargeForLong
__3:
	;
__4:
	if !(libc.PostDecUint64(&*(*Size_t)(unsafe.Pointer(bp + 16)), 1) > uint64(0)) {
		goto __5
	}
	value = value<<8 | uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bytes, 1))))
	goto __4
__5:
	;
	if !(value > uint32(libc.CplUint32(uint32(0)))>>1+uint32((*Mp_int)(unsafe.Pointer(bignumValue)).Fsign)) {
		goto __6
	}
	goto tooLargeForLong
__6:
	;
	if !((*Mp_int)(unsafe.Pointer(bignumValue)).Fsign != 0) {
		goto __7
	}
__9:
__12:
	_isobjPtr = objPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0)) {
		goto __15
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep) {
		goto __16
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
__16:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
__15:
	;
	goto __13
__13:
	if 0 != 0 {
		goto __12
	}
	goto __14
__14:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __17
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __18
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__18:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__17:
	;
	*(*int32)(unsafe.Pointer(objPtr + 32)) = -int32(value)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	goto __10
__10:
	if 0 != 0 {
		goto __9
	}
	goto __11
__11:
	;
	goto __8
__7:
__19:
__22:
	_isobjPtr1 = objPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr1)).Fbytes != uintptr(0)) {
		goto __25
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr1)).Fbytes != XtclEmptyStringRep) {
		goto __26
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr1)).Fbytes)
__26:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr1)).Fbytes = uintptr(0)
__25:
	;
	goto __23
__23:
	if 0 != 0 {
		goto __22
	}
	goto __24
__24:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __27
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __28
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__28:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__27:
	;
	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(value)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	goto __20
__20:
	if 0 != 0 {
		goto __19
	}
	goto __21
__21:
	;
__8:
	;
	XTclBN_mp_clear(tls, bignumValue)
	return
__2:
	;
tooLargeForLong:
	if !(Size_t((*Mp_int)(unsafe.Pointer(bignumValue)).Fused) <=
		(uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0)))+uint64(MP_DIGIT_BIT)-uint64(1))/uint64(MP_DIGIT_BIT)) {
		goto __29
	}
	value1 = uint64(0)
	bytes1 = bp + 24 /* &scratch1 */

	if !(XTclBN_mp_to_ubin(tls, bignumValue, bytes1, uint64(unsafe.Sizeof(Tcl_WideInt(0))), bp+32) != MP_OKAY) {
		goto __30
	}
	goto tooLargeForWide
__30:
	;
__31:
	if !(libc.PostDecUint64(&*(*Size_t)(unsafe.Pointer(bp + 32)), 1) > uint64(0)) {
		goto __32
	}
	value1 = value1<<8 | Tcl_WideUInt(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bytes1, 1))))
	goto __31
__32:
	;
	if !(value1 > Tcl_WideUInt(libc.CplUint64(uint64(0)))>>1+Tcl_WideUInt((*Mp_int)(unsafe.Pointer(bignumValue)).Fsign)) {
		goto __33
	}
	goto tooLargeForWide
__33:
	;
	if !((*Mp_int)(unsafe.Pointer(bignumValue)).Fsign != 0) {
		goto __34
	}
__36:
__39:
	_isobjPtr2 = objPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr2)).Fbytes != uintptr(0)) {
		goto __42
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr2)).Fbytes != XtclEmptyStringRep) {
		goto __43
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr2)).Fbytes)
__43:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr2)).Fbytes = uintptr(0)
__42:
	;
	goto __40
__40:
	if 0 != 0 {
		goto __39
	}
	goto __41
__41:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __44
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __45
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__45:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__44:
	;
	*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)) = -Tcl_WideInt(value1)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclWideIntType))
	goto __37
__37:
	if 0 != 0 {
		goto __36
	}
	goto __38
__38:
	;
	goto __35
__34:
__46:
__49:
	_isobjPtr3 = objPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr3)).Fbytes != uintptr(0)) {
		goto __52
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr3)).Fbytes != XtclEmptyStringRep) {
		goto __53
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr3)).Fbytes)
__53:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr3)).Fbytes = uintptr(0)
__52:
	;
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __54
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __55
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__55:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__54:
	;
	*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)) = Tcl_WideInt(value1)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclWideIntType))
	goto __47
__47:
	if 0 != 0 {
		goto __46
	}
	goto __48
__48:
	;
__35:
	;
	XTclBN_mp_clear(tls, bignumValue)
	return
__29:
	;
tooLargeForWide:
__56:
	_isobjPtr4 = objPtr
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr4)).Fbytes != uintptr(0)) {
		goto __59
	}
	if !((*Tcl_Obj)(unsafe.Pointer(_isobjPtr4)).Fbytes != XtclEmptyStringRep) {
		goto __60
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr4)).Fbytes)
__60:
	;
	(*Tcl_Obj)(unsafe.Pointer(_isobjPtr4)).Fbytes = uintptr(0)
__59:
	;
	goto __57
__57:
	if 0 != 0 {
		goto __56
	}
	goto __58
__58:
	;
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __61
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __62
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__62:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__61:
	;

	XTclSetBignumInternalRep(tls, objPtr, bignumValue)
}

//----------------------------------------------------------------------
//
// TclSetBignumInternalRep --
//
//	Install a bignum into the internal representation of an object.
//
// Results:
//	None.
//
// Side effects:
//	Object internal representation is updated and object type is set. The
//	bignum value is cleared, since ownership has transferred to the
//	object.
//
//----------------------------------------------------------------------

func XTclSetBignumInternalRep(tls *libc.TLS, objPtr uintptr, bignumValue uintptr) { /* tclObj.c:3609:1: */
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclBignumType))
	if (*(*Mp_int)(unsafe.Pointer(bignumValue))).Fused > 0x7FFF {
		var temp uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Mp_int{})))
		*(*Mp_int)(unsafe.Pointer(temp)) = *(*Mp_int)(unsafe.Pointer(bignumValue))
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = temp
		*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = libc.UintptrFromInt64(int64(-1))
	} else {
		if (*(*Mp_int)(unsafe.Pointer(bignumValue))).Falloc > 0x7FFF {
			XTclBN_mp_shrink(tls, bignumValue)
		}
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = (*(*Mp_int)(unsafe.Pointer(bignumValue))).Fdp
		*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(Intptr_t((*(*Mp_int)(unsafe.Pointer(bignumValue))).Fsign<<30 | (*(*Mp_int)(unsafe.Pointer(bignumValue))).Falloc<<15 | (*(*Mp_int)(unsafe.Pointer(bignumValue))).Fused))
	}

	// Clear the mp_int value.
	//
	// Don't call mp_clear() because it would free the digit array we just
	// packed into the Tcl_Obj.

	(*Mp_int)(unsafe.Pointer(bignumValue)).Fdp = uintptr(0)
	(*Mp_int)(unsafe.Pointer(bignumValue)).Falloc = libc.AssignPtrInt32(bignumValue, 0)
	(*Mp_int)(unsafe.Pointer(bignumValue)).Fsign = MP_NEG
}

//----------------------------------------------------------------------
//
// TclGetNumberFromObj --
//
//      Extracts a number (of any possible numeric type) from an object.
//
// Results:
//      Whether the extraction worked. The type is stored in the variable
//      referred to by the typePtr argument, and a pointer to the
//      representation is stored in the variable referred to by the
//      clientDataPtr.
//
// Side effects:
//      Can allocate thread-specific data for handling the copy-out space for
//      bignums; this space is shared within a thread.
//
//----------------------------------------------------------------------

func XTclGetNumberFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, clientDataPtr uintptr, typePtr uintptr) int32 { /* tclObj.c:3649:1: */
	for ok := true; ok; ok = TCL_OK == XTclParseNumber(tls, interp, objPtr, ts+54673, uintptr(0), -1, uintptr(0), 0) {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
			if libc.X__isnan(tls, *(*float64)(unsafe.Pointer(objPtr + 32))) != 0 {
				*(*int32)(unsafe.Pointer(typePtr)) = TCL_NUMBER_NAN
			} else {
				*(*int32)(unsafe.Pointer(typePtr)) = TCL_NUMBER_DOUBLE
			}
			*(*ClientData)(unsafe.Pointer(clientDataPtr)) = objPtr + 32
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			*(*int32)(unsafe.Pointer(typePtr)) = TCL_NUMBER_LONG
			*(*ClientData)(unsafe.Pointer(clientDataPtr)) = objPtr + 32
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) {
			*(*int32)(unsafe.Pointer(typePtr)) = TCL_NUMBER_WIDE
			*(*ClientData)(unsafe.Pointer(clientDataPtr)) = objPtr + 32
			return TCL_OK
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType)) {
			var bigPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&bignumKey)),
				int32(unsafe.Sizeof(Mp_int{})))

			if *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8)) == libc.UintptrFromInt64(int64(-1)) {
				*(*Mp_int)(unsafe.Pointer(bigPtr)) = *(*Mp_int)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32))))
			} else {
				(*(*Mp_int)(unsafe.Pointer(bigPtr))).Fdp = *(*uintptr)(unsafe.Pointer(objPtr + 32))
				(*(*Mp_int)(unsafe.Pointer(bigPtr))).Fsign = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 30
				(*(*Mp_int)(unsafe.Pointer(bigPtr))).Falloc = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) >> 15 & 0x7FFF
				(*(*Mp_int)(unsafe.Pointer(bigPtr))).Fused = int32(*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8))) & 0x7FFF
			}

			*(*int32)(unsafe.Pointer(typePtr)) = TCL_NUMBER_BIG
			*(*ClientData)(unsafe.Pointer(clientDataPtr)) = bigPtr
			return TCL_OK
		}
	}
	return TCL_ERROR
}

var bignumKey Tcl_ThreadDataKey /* tclObj.c:3678:31: */

//----------------------------------------------------------------------
//
// Tcl_DbIncrRefCount --
//
//	This function is normally called when debugging: i.e., when
//	TCL_MEM_DEBUG is defined. This checks to see whether or not the memory
//	has been freed before incrementing the ref count.
//
//	When TCL_MEM_DEBUG is not defined, this function just increments the
//	reference count of the object.
//
// Results:
//	None.
//
// Side effects:
//	The object's ref count is incremented.
//
//----------------------------------------------------------------------

func XTcl_DbIncrRefCount(tls *libc.TLS, objPtr uintptr, file uintptr, line int32) { /* tclObj.c:3714:1: */
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
}

//----------------------------------------------------------------------
//
// Tcl_DbDecrRefCount --
//
//	This function is normally called when debugging: i.e., when
//	TCL_MEM_DEBUG is defined. This checks to see whether or not the memory
//	has been freed before decrementing the ref count.
//
//	When TCL_MEM_DEBUG is not defined, this function just decrements the
//	reference count of the object.
//
// Results:
//	None.
//
// Side effects:
//	The object's ref count is incremented.
//
//----------------------------------------------------------------------

func XTcl_DbDecrRefCount(tls *libc.TLS, objPtr uintptr, file uintptr, line int32) { /* tclObj.c:3777:1: */

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) <= 1 {
		XTclFreeObj(tls, objPtr)
	}
}

//----------------------------------------------------------------------
//
// Tcl_DbIsShared --
//
//	This function is normally called when debugging: i.e., when
//	TCL_MEM_DEBUG is defined. It tests whether the object has a ref count
//	greater than one.
//
//	When TCL_MEM_DEBUG is not defined, this function just tests if the
//	object has a ref count greater than one.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_DbIsShared(tls *libc.TLS, objPtr uintptr, file uintptr, line int32) int32 { /* tclObj.c:3843:1: */

	return libc.Bool32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1)
}

//----------------------------------------------------------------------
//
// Tcl_InitObjHashTable --
//
//	Given storage for a hash table, set up the fields to prepare the hash
//	table for use, the keys are Tcl_Obj *.
//
// Results:
//	None.
//
// Side effects:
//	TablePtr is now ready to be passed to Tcl_FindHashEntry and
//	Tcl_CreateHashEntry.
//
//----------------------------------------------------------------------

func XTcl_InitObjHashTable(tls *libc.TLS, tablePtr uintptr) { /* tclObj.c:3915:1: */
	XTcl_InitCustomHashTable(tls, tablePtr, -1,
		uintptr(unsafe.Pointer(&XtclObjHashKeyType)))
}

//----------------------------------------------------------------------
//
// AllocObjEntry --
//
//	Allocate space for a Tcl_HashEntry containing the Tcl_Obj * key.
//
// Results:
//	The return value is a pointer to the created entry.
//
// Side effects:
//	Increments the reference count on the object.
//
//----------------------------------------------------------------------

func sAllocObjEntry(tls *libc.TLS, tablePtr uintptr, keyPtr uintptr) uintptr { /* tclObj.c:3940:22: */
	var objPtr uintptr = keyPtr
	var hPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashEntry{})))

	*(*uintptr)(unsafe.Pointer(hPtr + 32)) = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = uintptr(0)

	return hPtr
}

//----------------------------------------------------------------------
//
// TclCompareObjKeys --
//
//	Compares two Tcl_Obj * keys.
//
// Results:
//	The return value is 0 if they are different and 1 if they are the
//	same.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclCompareObjKeys(tls *libc.TLS, keyPtr uintptr, hPtr uintptr) int32 { /* tclObj.c:3973:1: */
	var objPtr1 uintptr = keyPtr
	var objPtr2 uintptr = *(*uintptr)(unsafe.Pointer(hPtr + 32))
	var p1 uintptr
	var p2 uintptr
	var l1 Size_t
	var l2 Size_t

	//
	//  If the object pointers are the same then they match.
	//  OPT: this comparison was moved to the caller
	//
	//        if (objPtr1 == objPtr2) return 1;
	//

	// Don't use Tcl_GetStringFromObj as it would prevent l1 and l2 being
	// in a register.

	p1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr1)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr1)).Fbytes
		}
		return XTcl_GetString(tls, objPtr1)
	}()
	l1 = Size_t((*Tcl_Obj)(unsafe.Pointer(objPtr1)).Flength)
	p2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr2)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr2)).Fbytes
		}
		return XTcl_GetString(tls, objPtr2)
	}()
	l2 = Size_t((*Tcl_Obj)(unsafe.Pointer(objPtr2)).Flength)

	// Only compare if the string representations are of the same length.

	if l1 == l2 {
	__1:
		;
		{
			if int32(*(*int8)(unsafe.Pointer(p1))) != int32(*(*int8)(unsafe.Pointer(p2))) {
				goto __3
			}
			if l1 == uint64(0) {
				return 1
			}

		}
		goto __2
	__2:
		p1++
		p2++
		l1--
		goto __1
		goto __3
	__3:
	}

	return 0
}

//----------------------------------------------------------------------
//
// TclFreeObjEntry --
//
//	Frees space for a Tcl_HashEntry containing the Tcl_Obj * key.
//
// Results:
//	The return value is a pointer to the created entry.
//
// Side effects:
//	Decrements the reference count of the object.
//
//----------------------------------------------------------------------

func XTclFreeObjEntry(tls *libc.TLS, hPtr uintptr) { /* tclObj.c:4034:1: */
	var objPtr uintptr = *(*uintptr)(unsafe.Pointer(hPtr + 32))

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = objPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTclpFree(tls, hPtr)
}

//----------------------------------------------------------------------
//
// TclHashObjKey --
//
//	Compute a one-word summary of the string representation of the
//	Tcl_Obj, which can be used to generate a hash index.
//
// Results:
//	The return value is a one-word summary of the information in the
//	string representation of the Tcl_Obj.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclHashObjKey(tls *libc.TLS, tablePtr uintptr, keyPtr uintptr) uint32 { /* tclObj.c:4062:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var objPtr uintptr = keyPtr
	// var length int32 at bp, 4

	var string uintptr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp)
	}()
	var result uint32 = uint32(0)

	// I tried a zillion different hash functions and asked many other people
	// for advice. Many people had their own favorite functions, all
	// different, but no-one had much idea why they were good ones. I chose
	// the one below (multiply by 9 and add new character) because of the
	// following reasons:
	//
	// 1. Multiplying by 10 is perfect for keys that are decimal strings, and
	//    multiplying by 9 is just about as good.
	// 2. Times-9 is (shift-left-3) plus (old). This means that each
	//    character's bits hang around in the low-order bits of the hash value
	//    for ever, plus they spread fairly rapidly up to the high-order bits
	//    to fill out the hash value. This seems works well both for decimal
	//    and non-decimal strings.
	//
	// Note that this function is very weak against malicious strings; it's
	// very easy to generate multiple keys that have the same hashcode. On the
	// other hand, that hardly ever actually occurs and this function *is*
	// very cheap, even by comparison with industry-standard hashes like FNV.
	// If real strength of hash is required though, use a custom hash based on
	// Bob Jenkins's lookup3(), but be aware that it's significantly slower.
	// Tcl does not use that level of strength because it typically does not
	// need it (and some of the aspects of that strength are genuinely
	// unnecessary given the rest of Tcl's hash machinery, and the fact that
	// we do not either transfer hashes to another machine, use them as a true
	// substitute for equality, or attempt to minimize work in rebuilding the
	// hash table).
	//
	// See also HashStringKey in tclHash.c.
	// See also HashString in tclLiteral.c.
	//
	// See [tcl-Feature Request #2958832]

	if *(*int32)(unsafe.Pointer(bp)) > 0 {
		result = uint32(uint8(*(*int8)(unsafe.Pointer(string))))
		for libc.PreDecInt32(&*(*int32)(unsafe.Pointer(bp)), 1) != 0 {
			result = result + (result<<3 + uint32(uint8(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&string, 1))))))
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_GetCommandFromObj --
//
//	Returns the command specified by the name in a Tcl_Obj.
//
// Results:
//	Returns a token for the command if it is found. Otherwise, if it can't
//	be found or there is an error, returns NULL.
//
// Side effects:
//	May update the internal representation for the object, caching the
//	command reference so that the next time this function is called with
//	the same object, the command can be found quickly.
//
//----------------------------------------------------------------------

func XTcl_GetCommandFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr) Tcl_Command { /* tclObj.c:4134:1: */
	var resPtr uintptr

	// Get the internal representation, converting to a command type if
	// needed. The internal representation is a ResolvedCmdName that points to
	// the actual command.
	//
	// Check the context namespace and the namespace epoch of the resolved
	// symbol to make sure that it is fresh. Note that we verify that the
	// namespace id of the context namespace is the same as the one we cached;
	// this insures that the namespace wasn't deleted and a new one created at
	// the same address with the same command epoch. Note that fully qualified
	// names have a NULL refNsPtr, these checks needn't be made.
	//
	// Check also that the command's epoch is up to date, and that the command
	// is not deleted.
	//
	// If any check fails, then force another conversion to the command type,
	// to discard the old rep and create a new one.

	resPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclCmdNameType)) && resPtr != uintptr(0) {
		var cmdPtr uintptr = (*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdPtr

		if (*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch == (*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdEpoch &&
			!((*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_IS_DELETED != 0) &&
			interp == (*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).Finterp &&
			!((*Namespace)(unsafe.Pointer((*Command)(unsafe.Pointer(cmdPtr)).FnsPtr)).Fflags&NS_DYING != 0) {
			var refNsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr

			if (*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsPtr == uintptr(0) ||
				refNsPtr == (*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsPtr &&
					(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsId == (*Namespace)(unsafe.Pointer(refNsPtr)).FnsId &&
					(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsCmdEpoch == (*Namespace)(unsafe.Pointer(refNsPtr)).FcmdRefEpoch {
				return cmdPtr
			}
		}
	}

	// OK, must create a new internal representation (or fail) as any cache we
	// had is invalid one way or another.

	// See [] why we cannot call SetCmdNameFromAny() directly here.
	if (*struct {
		f func(*libc.TLS, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{XtclCmdNameType.FsetFromAnyProc})).f(tls, interp, objPtr) != TCL_OK {
		return uintptr(0)
	}
	resPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	return func() uintptr {
		if resPtr != 0 {
			return (*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdPtr
		}
		return uintptr(0)
	}()
}

//----------------------------------------------------------------------
//
// TclSetCmdNameObj --
//
//	Modify an object to be an CmdName object that refers to the argument
//	Command structure.
//
// Results:
//	None.
//
// Side effects:
//	The object's old internal rep is freed. It's string rep is not
//	changed. The refcount in the Command structure is incremented to keep
//	it from being freed if the command is later deleted until
//	TclNRExecuteByteCode has a chance to recognize that it was deleted.
//
//----------------------------------------------------------------------

func XTclSetCmdNameObj(tls *libc.TLS, interp uintptr, objPtr uintptr, cmdPtr uintptr) { /* tclObj.c:4218:1: */
	var iPtr uintptr = interp
	var resPtr uintptr
	var currNsPtr uintptr
	var name uintptr

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclCmdNameType)) {
		resPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		if resPtr != uintptr(0) && (*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdPtr == cmdPtr {
			return
		}
	}

	(*Command)(unsafe.Pointer(cmdPtr)).FrefCount++
	resPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ResolvedCmdName{})))
	(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdPtr = cmdPtr
	(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdEpoch = (*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch
	(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefCount = 1

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()
	if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&name, 1)))) == ':' && int32(*(*int8)(unsafe.Pointer(name))) == ':' {
		// The name is fully qualified: set the referring namespace to
		// NULL.

		(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsPtr = uintptr(0)
	} else {
		// Get the current namespace.

		currNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr

		(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsPtr = currNsPtr
		(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsId = (*Namespace)(unsafe.Pointer(currNsPtr)).FnsId
		(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsCmdEpoch = (*Namespace)(unsafe.Pointer(currNsPtr)).FcmdRefEpoch
	}

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = resPtr
	*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclCmdNameType))
}

//----------------------------------------------------------------------
//
// FreeCmdNameInternalRep --
//
//	Frees the resources associated with a cmdName object's internal
//	representation.
//
// Results:
//	None.
//
// Side effects:
//	Decrements the ref count of any cached ResolvedCmdName structure
//	pointed to by the cmdName's internal representation. If this is the
//	last use of the ResolvedCmdName, it is freed. This in turn decrements
//	the ref count of the Command structure pointed to by the
//	ResolvedSymbol, which may free the Command structure.
//
//----------------------------------------------------------------------

func sFreeCmdNameInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclObj.c:4292:1: */
	var resPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if resPtr != uintptr(0) {
		// Decrement the reference count of the ResolvedCmdName structure. If
		// there are no more uses, free the ResolvedCmdName structure.

		if libc.PostDecInt32(&(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefCount, 1) == 1 {
			// Now free the cached command, unless it is still in its hash
			// table or if there are other references to it from other cmdName
			// objects.

			var cmdPtr uintptr = (*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdPtr

			if libc.PostDecInt32(&(*Command)(unsafe.Pointer(cmdPtr)).FrefCount, 1) <= 1 {
				XTclpFree(tls, cmdPtr)
			}

			XTclpFree(tls, resPtr)
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DupCmdNameInternalRep --
//
//	Initialize the internal representation of an cmdName Tcl_Obj to a copy
//	of the internal representation of an existing cmdName object.
//
// Results:
//	None.
//
// Side effects:
//	"copyPtr"s internal rep is set to point to the ResolvedCmdName
//	structure corresponding to "srcPtr"s internal rep. Increments the ref
//	count of the ResolvedCmdName structure pointed to by the cmdName's
//	internal representation.
//
//----------------------------------------------------------------------

func sDupCmdNameInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclObj.c:4341:1: */
	var resPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))

	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = resPtr
	*(*uintptr)(unsafe.Pointer(copyPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	if resPtr != uintptr(0) {
		(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefCount++
	}
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclCmdNameType))
}

//----------------------------------------------------------------------
//
// SetCmdNameFromAny --
//
//	Generate an cmdName internal form for the Tcl object "objPtr".
//
// Results:
//	The return value is a standard Tcl result. The conversion always
//	succeeds and TCL_OK is returned.
//
// Side effects:
//	A pointer to a ResolvedCmdName structure that holds a cached pointer
//	to the command with a name that matches objPtr's string rep is stored
//	as objPtr's internal representation. This ResolvedCmdName pointer will
//	be NULL if no matching command was found. The ref count of the cached
//	Command's structure (if any) is also incremented.
//
//----------------------------------------------------------------------

func sSetCmdNameFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclObj.c:4377:1: */
	var iPtr uintptr = interp
	var name uintptr
	var cmdPtr uintptr
	var currNsPtr uintptr
	var resPtr uintptr

	if interp == uintptr(0) {
		return TCL_ERROR
	}

	// Find the Command structure, if any, that describes the command called
	// "name". Build a ResolvedCmdName that holds a cached pointer to this
	// Command, and bump the reference count in the referenced Command
	// structure. A Command structure will not be deleted as long as it is
	// referenced from a CmdName object.

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()
	cmdPtr = XTcl_FindCommand(tls, interp, name /*ns*/, uintptr(0), 0)

	// Free the old internalRep before setting the new one. Do this after
	// getting the string rep to allow the conversion code (in particular,
	// Tcl_GetStringFromObj) to use that old internalRep.

	if cmdPtr != 0 {
		(*Command)(unsafe.Pointer(cmdPtr)).FrefCount++
		resPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclCmdNameType)) &&
			resPtr != 0 && (*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefCount == 1 {
			// Reuse the old ResolvedCmdName struct instead of freeing it

			var oldCmdPtr uintptr = (*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdPtr

			if libc.PreDecInt32(&(*Command)(unsafe.Pointer(oldCmdPtr)).FrefCount, 1) == 0 {
				if libc.PostDecInt32(&(*Command)(unsafe.Pointer(oldCmdPtr)).FrefCount, 1) <= 1 {
					XTclpFree(tls, oldCmdPtr)
				}

			}
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
				if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
				}
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
			}

			resPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ResolvedCmdName{})))
			(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefCount = 1
			*(*uintptr)(unsafe.Pointer(objPtr + 32)) = resPtr
			*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclCmdNameType))
		}
		(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdPtr = cmdPtr
		(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FcmdEpoch = (*Command)(unsafe.Pointer(cmdPtr)).FcmdEpoch
		if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&name, 1)))) == ':' && int32(*(*int8)(unsafe.Pointer(name))) == ':' {
			// The name is fully qualified: set the referring namespace to
			// NULL.

			(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsPtr = uintptr(0)
		} else {
			// Get the current namespace.

			currNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr

			(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsPtr = currNsPtr
			(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsId = (*Namespace)(unsafe.Pointer(currNsPtr)).FnsId
			(*ResolvedCmdName)(unsafe.Pointer(resPtr)).FrefNsCmdEpoch = (*Namespace)(unsafe.Pointer(currNsPtr)).FcmdRefEpoch
		}
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}

		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = uintptr(0)
		*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclCmdNameType))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_RepresentationCmd --
//
//	Implementation of the "tcl::unsupported::representation" command.
//
// Results:
//	Reports the current representation (Tcl_Obj type) of its argument.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_RepresentationCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclObj.c:4477:1: */
	bp := tls.Alloc(110)
	defer tls.Free(110)

	// var ptrBuffer [54]int8 at bp+56, 54

	var descObj uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+4120)
		return TCL_ERROR
	}

	// Value is a bignum with a refcount of 14, object pointer at 0x12345678,
	// internal representation 0x45671234:0x98765432, string representation
	// "1872361827361287"

	libc.Xsprintf(tls, bp+56, ts+944, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(objv + 1*8))))
	descObj = XTcl_ObjPrintf(tls,
		ts+54680,
		libc.VaList(bp+8, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr != 0 {
				return (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr)).Fname
			}
			return ts + 54738 /* "pure string" */
		}(),
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FrefCount, bp+56 /* &ptrBuffer[0] */))

	// This is a workaround to silence reports from `make valgrind`
	// on 64-bit systems.  The problem is that the test suite
	// includes calling the [represenation] command on values of
	// &tclDoubleType.  When these values are created, the "doubleValue"
	// is set, but when the "twoPtrValue" is examined, its "ptr2"
	// field has never been initialized.  Since [representation]
	// presents the value of the ptr2 value in its output, valgrind
	// alerts about the read of uninitialized memory.
	//
	// The general problem with [representation], that it can read
	// and report uninitialized fields, is still present.  This is
	// just the minimal workaround to silence one particular test.

	if uint64(unsafe.Sizeof(uintptr(0))) > uint64(4) && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclDoubleType)) {
		*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32 + 8 /* &.ptr2 */)) = uintptr(0)
	}
	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr != 0 {
		libc.Xsprintf(tls, bp+56, ts+54750,
			libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32)),
				*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)) + 32 + 8 /* &.ptr2 */))))
		XTcl_AppendPrintfToObj(tls, descObj, ts+54756,
			libc.VaList(bp+48, bp+56))
	}

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
		XTcl_AppendToObj(tls, descObj, ts+54785, -1)
		XTcl_AppendLimitedToObj(tls, descObj, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength,
			16, ts+8420)
		XTcl_AppendToObj(tls, descObj, ts+25631, -1)
	} else {
		XTcl_AppendToObj(tls, descObj, ts+54811, -1)
	}

	XTcl_SetObjResult(tls, interp, descObj)
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// indent-tabs-mode: nil
// End:

// Helper macros.

// ----------------------------------------------------------------------
//
// LocateTargetAddresses --
//
//	Populate a hash table with places that we need to be careful around
//	because they're the targets of various kinds of jumps and other
//	non-local behavior.
//
// ----------------------------------------------------------------------

func sLocateTargetAddresses(tls *libc.TLS, envPtr uintptr, tablePtr uintptr) { /* tclOptimize.c:52:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var currentInstPtr uintptr
	var targetInstPtr uintptr
	// var isNew int32 at bp, 4

	var i int32
	var hPtr uintptr
	// var hSearch Tcl_HashSearch at bp+8, 24

	var rangePtr uintptr

	XTcl_InitHashTable(tls, tablePtr, 1)

	// The starts of commands represent target addresses.

	i = 0
__1:
	if !(i < (*CompileEnv)(unsafe.Pointer(envPtr)).FnumCommands) {
		goto __3
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart+uintptr((*CmdLocation)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FcmdMapPtr+uintptr(i)*16)).FcodeOffset), bp /* &isNew */)
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;

	// Find places where we should be careful about replacing instructions
	// because they are the targets of various types of jumps.

	currentInstPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart
__4:
	if !(currentInstPtr < (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext) {
		goto __6
	}
	switch int32(*(*uint8)(unsafe.Pointer(currentInstPtr))) {
	case INST_JUMP1:
		goto __8
	case INST_JUMP_TRUE1:
		goto __9
	case INST_JUMP_FALSE1:
		goto __10
	case INST_JUMP4:
		goto __11
	case INST_JUMP_TRUE4:
		goto __12
	case INST_JUMP_FALSE4:
		goto __13
	case INST_START_CMD:
		goto __14
	case INST_BEGIN_CATCH4:
		goto __15
	case INST_JUMP_TABLE:
		goto __16
	case INST_RETURN_CODE_BRANCH:
		goto __17
	}
	goto __7
__8:
__9:
__10:
	targetInstPtr = currentInstPtr + uintptr(int32(*(*int8)(unsafe.Pointer(currentInstPtr + uintptr(1)))))
	goto storeTarget
__11:
__12:
__13:
__14:
	targetInstPtr = currentInstPtr + uintptr(int32(uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1))))<<24)|int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(1))))<<16|int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(2))))<<8|int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(3)))))
	goto storeTarget
__15:
	targetInstPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*ExceptionRange)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr+uintptr(uint32(int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1))))<<24)|uint32(int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(1))))<<16)|uint32(int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(2))))<<8)|uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(3)))))*28)).FcodeOffset)
storeTarget:
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, targetInstPtr, bp /* &isNew */)
	goto __7
__16:
	hPtr = XTcl_FirstHashEntry(tls,
		(*AuxData)(unsafe.Pointer((*CompileEnv)(unsafe.Pointer(envPtr)).FauxDataArrayPtr+uintptr(uint32(int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1))))<<24)|uint32(int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(1))))<<16)|uint32(int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(2))))<<8)|uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(3)))))*16)).FclientData,
		bp+8)
__18:
	if !(hPtr != 0) {
		goto __20
	}
	targetInstPtr = currentInstPtr + uintptr(int32((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, targetInstPtr, bp /* &isNew */)
	goto __19
__19:
	hPtr = XTcl_NextHashEntry(tls, bp+8)
	goto __18
	goto __20
__20:
	;
	goto __7
__17:
	i = TCL_ERROR
__21:
	if !(i < TCL_CONTINUE+1) {
		goto __23
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, currentInstPtr+uintptr(2*i)-uintptr(1), bp /* &isNew */)
	goto __22
__22:
	i++
	goto __21
	goto __23
__23:
	;
	goto __7
__7:
	;
	goto __5
__5:
	currentInstPtr += uintptr(XtclInstructionTable[*(*uint8)(unsafe.Pointer(currentInstPtr))].FnumBytes)
	goto __4
	goto __6
__6:
	;

	// Add a marker *after* the last bytecode instruction. WARNING: points to
	// one past the end!

	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, currentInstPtr, bp /* &isNew */)

	// Enter in the targets of exception ranges.

	i = 0
__24:
	if !(i < (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayNext) {
		goto __26
	}
	rangePtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FexceptArrayPtr + uintptr(i)*28

	if !((*ExceptionRange)(unsafe.Pointer(rangePtr)).Ftype == CATCH_EXCEPTION_RANGE) {
		goto __27
	}
	targetInstPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcatchOffset)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, targetInstPtr, bp /* &isNew */)
	goto __28
__27:
	targetInstPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*ExceptionRange)(unsafe.Pointer(rangePtr)).FbreakOffset)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, targetInstPtr, bp /* &isNew */)
	if !((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset >= 0) {
		goto __29
	}
	targetInstPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart + uintptr((*ExceptionRange)(unsafe.Pointer(rangePtr)).FcontinueOffset)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, targetInstPtr, bp /* &isNew */)
__29:
	;
__28:
	;
	goto __25
__25:
	i++
	goto __24
	goto __26
__26:
}

// ----------------------------------------------------------------------
//
// TrimUnreachable --
//
//	Converts code that provably can't be executed into NOPs and reduces
//	the overall reported length of the bytecode where that is possible.
//
// ----------------------------------------------------------------------

func sTrimUnreachable(tls *libc.TLS, envPtr uintptr) { /* tclOptimize.c:156:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var currentInstPtr uintptr
	// var targets Tcl_HashTable at bp, 88

	sLocateTargetAddresses(tls, envPtr, bp)

	for currentInstPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart; currentInstPtr < (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext-uintptr(1); currentInstPtr += uintptr(XtclInstructionTable[*(*uint8)(unsafe.Pointer(currentInstPtr))].FnumBytes) {
		var clear int32 = 0

		if int32(*(*uint8)(unsafe.Pointer(currentInstPtr))) != INST_DONE {
			continue
		}

		for !((*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp)).FfindProc})).f(tls, bp, currentInstPtr+uintptr(1)+uintptr(clear)) != uintptr(0)) {
			clear = clear + XtclInstructionTable[*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(clear)))].FnumBytes
		}
		if currentInstPtr+uintptr(1)+uintptr(clear) == (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext {
			*(*uintptr)(unsafe.Pointer(envPtr + 120)) -= uintptr(clear)
		} else {
			for libc.PostDecInt32(&clear, 1) > 0 {
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(clear))) = uint8(INST_NOP)
			}
		}
	}

	XTcl_DeleteHashTable(tls, bp)
}

// ----------------------------------------------------------------------
//
// ConvertZeroEffectToNOP --
//
//	Replace PUSH/POP sequences (when non-hazardous) with NOPs. Also
//	replace PUSH empty/STR_CONCAT and TRY_CVT_NUMERIC (when followed by an
//	operation that guarantees the check for arithmeticity) and eliminate
//	LNOT when we can invert the following JUMP condition.
//
// ----------------------------------------------------------------------

func sConvertZeroEffectToNOP(tls *libc.TLS, envPtr uintptr) { /* tclOptimize.c:202:1: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	var currentInstPtr uintptr
	var size int32
	// var targets Tcl_HashTable at bp, 88

	sLocateTargetAddresses(tls, envPtr, bp)
	for currentInstPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart; currentInstPtr < (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext; currentInstPtr += uintptr(size) {
		var blank int32 = 0
		var i int32
		var nextInst int32

		size = XtclInstructionTable[*(*uint8)(unsafe.Pointer(currentInstPtr))].FnumBytes
		for currentInstPtr+uintptr(size) < (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext &&
			int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(size)))) == INST_NOP {
			if (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp)).FfindProc})).f(tls, bp, currentInstPtr+uintptr(size)) != uintptr(0) {
				break
			}
			size = size + XtclInstructionTable[uint8(INST_NOP)].FnumBytes
		}
		if (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp)).FfindProc})).f(tls, bp, currentInstPtr+uintptr(size)) != uintptr(0) {
			continue
		}
		nextInst = int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(size))))
		switch int32(*(*uint8)(unsafe.Pointer(currentInstPtr))) {
		case INST_PUSH1:
			if nextInst == INST_POP {
				blank = size + XtclInstructionTable[uint8(nextInst)].FnumBytes
			} else if nextInst == INST_STR_CONCAT1 &&
				uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(size) + uintptr(1)))) == uint32(2) {
				var litPtr uintptr = XTclFetchLiteral(tls, envPtr,
					uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1)))))
				// var numBytes int32 at bp+88, 4

				XTcl_GetStringFromObj(tls, litPtr, bp+88)
				if *(*int32)(unsafe.Pointer(bp + 88)) == 0 {
					blank = size + XtclInstructionTable[uint8(nextInst)].FnumBytes
				}
			}
			break
		case INST_PUSH4:
			if nextInst == INST_POP {
				blank = size + 1
			} else if nextInst == INST_STR_CONCAT1 &&
				uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(size) + uintptr(1)))) == uint32(2) {
				var litPtr uintptr = XTclFetchLiteral(tls, envPtr,
					uint32(int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1))))<<24)|uint32(int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(1))))<<16)|uint32(int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(2))))<<8)|uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(3)))))
				// var numBytes int32 at bp+92, 4

				XTcl_GetStringFromObj(tls, litPtr, bp+92)
				if *(*int32)(unsafe.Pointer(bp + 92)) == 0 {
					blank = size + XtclInstructionTable[uint8(nextInst)].FnumBytes
				}
			}
			break

		case INST_LNOT:
			switch nextInst {
			case INST_JUMP_TRUE1:
				blank = size
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(size))) = uint8(INST_JUMP_FALSE1)
				break
			case INST_JUMP_FALSE1:
				blank = size
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(size))) = uint8(INST_JUMP_TRUE1)
				break
			case INST_JUMP_TRUE4:
				blank = size
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(size))) = uint8(INST_JUMP_FALSE4)
				break
			case INST_JUMP_FALSE4:
				blank = size
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(size))) = uint8(INST_JUMP_TRUE4)
				break
			}
			break

		case INST_TRY_CVT_TO_NUMERIC:
			switch nextInst {
			case INST_JUMP_TRUE1:
				fallthrough
			case INST_JUMP_TRUE4:
				fallthrough
			case INST_JUMP_FALSE1:
				fallthrough
			case INST_JUMP_FALSE4:
				fallthrough
			case INST_INCR_SCALAR1:
				fallthrough
			case INST_INCR_ARRAY1:
				fallthrough
			case INST_INCR_ARRAY_STK:
				fallthrough
			case INST_INCR_SCALAR_STK:
				fallthrough
			case INST_INCR_STK:
				fallthrough
			case INST_LOR:
				fallthrough
			case INST_LAND:
				fallthrough
			case INST_EQ:
				fallthrough
			case INST_NEQ:
				fallthrough
			case INST_LT:
				fallthrough
			case INST_LE:
				fallthrough
			case INST_GT:
				fallthrough
			case INST_GE:
				fallthrough
			case INST_MOD:
				fallthrough
			case INST_LSHIFT:
				fallthrough
			case INST_RSHIFT:
				fallthrough
			case INST_BITOR:
				fallthrough
			case INST_BITXOR:
				fallthrough
			case INST_BITAND:
				fallthrough
			case INST_EXPON:
				fallthrough
			case INST_ADD:
				fallthrough
			case INST_SUB:
				fallthrough
			case INST_DIV:
				fallthrough
			case INST_MULT:
				fallthrough
			case INST_LNOT:
				fallthrough
			case INST_BITNOT:
				fallthrough
			case INST_UMINUS:
				fallthrough
			case INST_UPLUS:
				fallthrough
			case INST_TRY_CVT_TO_NUMERIC:
				blank = size
				break
			}
			break
		}

		if blank > 0 {
			for i = 0; i < blank; i++ {
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(i))) = uint8(INST_NOP)
			}
			size = blank
		}
	}
	XTcl_DeleteHashTable(tls, bp)
}

// ----------------------------------------------------------------------
//
// AdvanceJumps --
//
//	Advance jumps past NOPs and chained JUMPs. After this runs, the only
//	JUMPs that jump to a NOP or a JUMP will be length-1 ones that run out
//	of room in their opcode to be targeted to where they really belong.
//
// ----------------------------------------------------------------------

func sAdvanceJumps(tls *libc.TLS, envPtr uintptr) { /* tclOptimize.c:343:1: */
	bp := tls.Alloc(92)
	defer tls.Free(92)

	var currentInstPtr uintptr
	// var jumps Tcl_HashTable at bp, 88

	for currentInstPtr = (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeStart; currentInstPtr < (*CompileEnv)(unsafe.Pointer(envPtr)).FcodeNext-uintptr(1); currentInstPtr += uintptr(XtclInstructionTable[*(*uint8)(unsafe.Pointer(currentInstPtr))].FnumBytes) {
		var offset int32
		var delta int32
		// var isNew int32 at bp+88, 4

		switch int32(*(*uint8)(unsafe.Pointer(currentInstPtr))) {
		case INST_JUMP1:
			fallthrough
		case INST_JUMP_TRUE1:
			fallthrough
		case INST_JUMP_FALSE1:
			offset = int32(*(*int8)(unsafe.Pointer(currentInstPtr + uintptr(1))))
			XTcl_InitHashTable(tls, bp, 1)
			for delta = 0; offset+delta != 0; {
				if offset+delta < -128 || offset+delta > 127 {
					break
				}
				(*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &jumps */)).FcreateProc})).f(tls, bp /* &jumps */, uintptr(Intptr_t(offset)), bp+88 /* &isNew */)
				if !(*(*int32)(unsafe.Pointer(bp + 88)) != 0) {
					offset = int32(*(*int8)(unsafe.Pointer(currentInstPtr + uintptr(1))))
					break
				}
				offset = offset + delta
				switch int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset)))) {
				case INST_NOP:
					delta = XtclInstructionTable[uint8(INST_NOP)].FnumBytes
					continue
				case INST_JUMP1:
					delta = int32(*(*int8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1))))
					continue
				case INST_JUMP4:
					delta = int32(uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1) + uintptr(3))))
					continue
				}
				break
			}
			XTcl_DeleteHashTable(tls, bp)
			*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1))) = uint8(uint32(offset))
			continue

		case INST_JUMP4:
			fallthrough
		case INST_JUMP_TRUE4:
			fallthrough
		case INST_JUMP_FALSE4:
			XTcl_InitHashTable(tls, bp, 1)
			(*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &jumps */)).FcreateProc})).f(tls, bp /* &jumps */, uintptr(int64(0)), bp+88 /* &isNew */)
			for offset = int32(uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(3)))); offset != 0; {
				(*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &jumps */)).FcreateProc})).f(tls, bp /* &jumps */, uintptr(Intptr_t(offset)), bp+88 /* &isNew */)
				if !(*(*int32)(unsafe.Pointer(bp + 88)) != 0) {
					offset = int32(uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(3))))
					break
				}
				switch int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset)))) {
				case INST_NOP:
					offset = offset + XtclInstructionTable[uint8(INST_NOP)].FnumBytes
					continue
				case INST_JUMP1:
					offset = offset + int32(*(*int8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1))))
					continue
				case INST_JUMP4:
					offset = offset + (int32(uint32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1))))<<24) | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1) + uintptr(1))))<<16 | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1) + uintptr(2))))<<8 | int32(*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(offset) + uintptr(1) + uintptr(3)))))
					continue
				}
				break
			}
			XTcl_DeleteHashTable(tls, bp)
			for ok := true; ok; ok = 0 != 0 {
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1))) = uint8(uint32(offset) >> 24)
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(1))) = uint8(uint32(offset) >> 16)
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(2))) = uint8(uint32(offset) >> 8)
				*(*uint8)(unsafe.Pointer(currentInstPtr + uintptr(1) + uintptr(3))) = uint8(uint32(offset))
			}
			continue
		}
	}
}

// ----------------------------------------------------------------------
//
// TclOptimizeBytecode --
//
//	A very simple peephole optimizer for bytecode.
//
// ----------------------------------------------------------------------

func XTclOptimizeBytecode(tls *libc.TLS, envPtr uintptr) { /* tclOptimize.c:429:1: */
	sConvertZeroEffectToNOP(tls, envPtr)
	sAdvanceJumps(tls, envPtr)
	sTrimUnreachable(tls, envPtr)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// End:

// The panicProc variable contains a pointer to an application specific panic
// procedure.

var panicProc uintptr = uintptr(0) /* tclPanic.c:29:36 */

//----------------------------------------------------------------------
//
// Tcl_SetPanicProc --
//
//	Replace the default panic behavior with the specified function.
//
// Results:
//	None.
//
// Side effects:
//	Sets the panicProc variable.
//
//----------------------------------------------------------------------

func XTcl_SetPanicProc(tls *libc.TLS, proc uintptr) { /* tclPanic.c:49:1: */
	// tclWinDebugPanic only installs if there is no panicProc yet.
	if proc != *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr)
	}{XtclWinDebugPanic})) || panicProc == uintptr(0) {
		panicProc = proc
	}
}

//----------------------------------------------------------------------
//
// Tcl_PanicVA --
//
//	Print an error message and kill the process.
//
// Results:
//	None.
//
// Side effects:
//	The process dies, entering the debugger if possible.
//
//----------------------------------------------------------------------

func XTcl_PanicVA(tls *libc.TLS, format uintptr, argList Va_list) { /* tclPanic.c:80:1: */
	bp := tls.Alloc(192)
	defer tls.Free(192)

	var arg1 uintptr
	var arg2 uintptr
	var arg3 uintptr // Additional arguments (variable in number)
	// to pass to fprintf.
	var arg4 uintptr
	var arg5 uintptr
	var arg6 uintptr
	var arg7 uintptr
	var arg8 uintptr

	arg1 = libc.VaUintptr(&argList)
	arg2 = libc.VaUintptr(&argList)
	arg3 = libc.VaUintptr(&argList)
	arg4 = libc.VaUintptr(&argList)
	arg5 = libc.VaUintptr(&argList)
	arg6 = libc.VaUintptr(&argList)
	arg7 = libc.VaUintptr(&argList)
	arg8 = libc.VaUintptr(&argList)

	if panicProc != uintptr(0) {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{panicProc})).f(tls, format, libc.VaList(bp, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8))
	} else if libc.XIsDebuggerPresent(tls) != 0 {
		XtclWinDebugPanic(tls, format, libc.VaList(bp+64, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8))
	} else {
		libc.Xfprintf(tls, libc.X__acrt_iob_func(tls, uint32(2)), format, libc.VaList(bp+128, arg1, arg2, arg3, arg4, arg5, arg6, arg7,
			arg8))
		libc.Xfprintf(tls, libc.X__acrt_iob_func(tls, uint32(2)), ts+935, 0)
		libc.Xfflush(tls, libc.X__acrt_iob_func(tls, uint32(2)))
		libc.X__builtin_trap(tls)
		libc.XExitProcess(tls, uint32(1))
	}
}

//----------------------------------------------------------------------
//
// Tcl_Panic --
//
//	Print an error message and kill the process.
//
// Results:
//	None.
//
// Side effects:
//	The process dies, entering the debugger if possible.
//
//----------------------------------------------------------------------

// ARGSUSED

// The following comment is here so that Coverity's static analizer knows that
// a Tcl_Panic() call can never return and avoids lots of false positives.

// coverity[+kill]
func XTcl_Panic(tls *libc.TLS, format uintptr, va uintptr) { /* tclPanic.c:153:1: */
	var argList Va_list
	_ = argList

	argList = va
	XTcl_PanicVA(tls, format, argList)
	_ = argList
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Static assertion.  Requires support in the compiler.

// The following table provides parsing information about each possible 8-bit
// character. The table is designed to be referenced with either signed or
// unsigned characters, so it has 384 entries. The first 128 entries
// correspond to negative character values, the next 256 correspond to
// positive character values. The last 128 entries are identical to the first
// 128. The table is always indexed with a 128-byte offset (the 128th entry
// corresponds to a character value of 0).
//
// The macro CHAR_TYPE is used to index into the table and return information
// about its character argument. The following return values are defined.
//
// TYPE_NORMAL -	All characters that don't have special significance to
//			the Tcl parser.
// TYPE_SPACE -		The character is a whitespace character other than
//			newline.
// TYPE_COMMAND_END -	Character is newline or semicolon.
// TYPE_SUBS -		Character begins a substitution or has other special
//			meaning in ParseTokens: backslash, dollar sign, or
//			open bracket.
// TYPE_QUOTE -		Character is a double quote.
// TYPE_CLOSE_PAREN -	Character is a right parenthesis.
// TYPE_CLOSE_BRACK -	Character is a right square bracket.
// TYPE_BRACE -		Character is a curly brace (either left or right).

var XtclCharTypeTable = [384]int8{
	// Negative character values, from -128 to -1:

	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),

	// Positive character values, from 0-127:

	int8(TYPE_SUBS), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_SPACE), int8(TYPE_COMMAND_END), int8(TYPE_SPACE),
	int8(TYPE_SPACE), int8(TYPE_SPACE), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_SPACE), int8(TYPE_NORMAL), int8(TYPE_QUOTE), int8(TYPE_NORMAL),
	int8(TYPE_SUBS), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_CLOSE_PAREN), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_COMMAND_END),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_SUBS),
	int8(TYPE_SUBS), int8(TYPE_CLOSE_BRACK), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_BRACE),
	int8(TYPE_NORMAL), int8(TYPE_BRACE), int8(TYPE_NORMAL), int8(TYPE_NORMAL),

	// Large unsigned character values, from 128-255:

	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
	int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL), int8(TYPE_NORMAL),
} /* tclParse.c:46:12 */

//----------------------------------------------------------------------
//
// TclParseInit --
//
//	Initialize the fields of a Tcl_Parse struct.
//
// Results:
//	None.
//
// Side effects:
//	The Tcl_Parse struct pointed to by parsePtr gets initialized.
//
//----------------------------------------------------------------------

func XTclParseInit(tls *libc.TLS, interp uintptr, start uintptr, numBytes int32, parsePtr uintptr) { /* tclParse.c:190:1: */
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords = 0
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = parsePtr + 96 /* &.staticTokens */
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens = 0
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = NUM_STATIC_TOKENS
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fstring = start
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend = start + uintptr(numBytes)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp = interp
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 0
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_SUCCESS
}

//----------------------------------------------------------------------
//
// Tcl_ParseCommand --
//
//	Given a string, this function parses the first Tcl command in the
//	string and returns information about the structure of the command.
//
// Results:
//	The return value is TCL_OK if the command was parsed successfully and
//	TCL_ERROR otherwise. If an error occurs and interp isn't NULL then an
//	error message is left in its result. On a successful return, parsePtr
//	is filled in with information about the command that was parsed.
//
// Side effects:
//	If there is insufficient space in parsePtr to hold all the information
//	about the command, then additional space is malloc-ed. If the function
//	returns TCL_OK then the caller must eventually invoke Tcl_FreeParse to
//	release any additional space that was allocated.
//
//----------------------------------------------------------------------

func XTcl_ParseCommand(tls *libc.TLS, interp uintptr, start uintptr, numBytes int32, nested int32, parsePtr uintptr) int32 { /* tclParse.c:234:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var src uintptr // Points to current character in the
	// command.
	// var type1 int8 at bp+16, 1
	// Result returned by CHAR_TYPE(*src).
	var tokenPtr uintptr  // Pointer to token being filled in.
	var wordIndex int32   // Index of word token for current word.
	var terminators int32 // CHAR_TYPE bits that indicate the end of a
	// command.
	// var termPtr uintptr at bp+24, 8
	// Set by Tcl_ParseBraces/QuotedString to
	// point to char after terminating one.
	var scanned int32
	var allocated int32
	var oldPtr uintptr
	var newPtr uintptr
	var _needed int32
	var expIdx int32
	var expPtr uintptr
	// var size int32 at bp+48, 4

	var allocated1 int32
	var oldPtr1 uintptr
	var newPtr1 uintptr
	var _needed1 int32
	var quoted int32
	// Recalculate the number of Tcl_Tokens needed to store
	// tokens representing the expanded list.

	var listStart uintptr
	var growthNeeded int32
	var elemCount int32
	var code int32
	// var literal int32 at bp+52, 4

	// var nextElem uintptr at bp+40, 8

	var listEnd uintptr
	// var elemStart uintptr at bp+32, 8

	var i int32
	var isLiteral int32
	var expandWord int32

	if !(numBytes < 0 && start != 0) {
		goto __1
	}
	numBytes = int32(libc.Xstrlen(tls, start))
__1:
	;
	XTclParseInit(tls, interp, start, numBytes, parsePtr)
	if !(start == uintptr(0) && numBytes != 0) {
		goto __2
	}
	if !(interp != uintptr(0)) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+54838, -1))
__3:
	;
	return TCL_ERROR
__2:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommentStart = uintptr(0)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommentSize = 0
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart = uintptr(0)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize = 0
	if !(nested != 0) {
		goto __4
	}
	terminators = TYPE_COMMAND_END | TYPE_CLOSE_BRACK
	goto __5
__4:
	terminators = TYPE_COMMAND_END
__5:
	;

	// Parse any leading space and comments before the first word of the
	// command.

	scanned = sParseComment(tls, start, numBytes, parsePtr)
	src = start + uintptr(scanned)
	numBytes = numBytes - scanned
	if !(numBytes == 0) {
		goto __6
	}
	if !(nested != 0) {
		goto __7
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = nested
__7:
	;
__6:
	;

	// The following loop parses the words of the command, one word in each
	// iteration through the loop.

	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart = src
__8:
	if !(1 != 0) {
		goto __9
	}
	expandWord = 0

	// Create the token for the word.

__10:
	_needed = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 1
	if !(_needed > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __13
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__13:
	;
	if !(_needed > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __14
	}
	allocated = 2 * _needed
	oldPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr == parsePtr+96) {
		goto __15
	}
	oldPtr = uintptr(0)
__15:
	;
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __16
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__16:
	;
	newPtr = XTclpRealloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr == uintptr(0)) {
		goto __17
	}
	allocated = int32(uint64(_needed+1) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __18
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__18:
	;
	newPtr = XTcl_Realloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__17:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated
	if !(oldPtr == uintptr(0)) {
		goto __19
	}
	libc.Xmemcpy(tls, newPtr, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__19:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr
__14:
	;
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	wordIndex = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(wordIndex)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_WORD

	// Skip white space before the word. Also skip a backslash-newline
	// sequence: it should be treated just like white space.

	scanned = sParseWhiteSpace(tls, src, numBytes, parsePtr+88, bp+16)
	src += uintptr(scanned)
	numBytes = numBytes - scanned
	if !(numBytes == 0) {
		goto __20
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = src
	goto __9
__20:
	;
	if !(int32(*(*int8)(unsafe.Pointer(bp + 16)))&terminators != 0) {
		goto __21
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = src
	src++
	goto __9
__21:
	;
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords++

	// At this point the word can have one of four forms: something
	// enclosed in quotes, something enclosed in braces, and expanding
	// word, or an unquoted word (anything else).

parseWord:
	if !(int32(*(*int8)(unsafe.Pointer(src))) == '"') {
		goto __22
	}
	if !(XTcl_ParseQuotedString(tls, interp, src, numBytes, parsePtr, 1,
		bp+24) != TCL_OK) {
		goto __24
	}
	goto error
__24:
	;
	src = *(*uintptr)(unsafe.Pointer(bp + 24 /* termPtr */))
	numBytes = int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend) - int64(src)) / 1)
	goto __23
__22:
	if !(int32(*(*int8)(unsafe.Pointer(src))) == '{') {
		goto __25
	}
	expIdx = wordIndex + 1

	if !(XTcl_ParseBraces(tls, interp, src, numBytes, parsePtr, 1,
		bp+24) != TCL_OK) {
		goto __27
	}
	goto error
__27:
	;
	src = *(*uintptr)(unsafe.Pointer(bp + 24 /* termPtr */))
	numBytes = int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend) - int64(src)) / 1)

	// Check whether the braces contained the word expansion prefix
	// {*}

	expPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(expIdx)*24
	if !(0 == expandWord &&

		1 == (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens-expIdx &&

		(uint64(1) == Size_t((*Tcl_Token)(unsafe.Pointer(expPtr)).Fsize) &&

			int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(expPtr)).Fstart))) == '*') &&

		numBytes > 0 && 0 == sParseWhiteSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 24)),
		numBytes, parsePtr+88, bp+16) &&
		int32(*(*int8)(unsafe.Pointer(bp + 16))) != TYPE_COMMAND_END) {
		goto __28
	}
	expandWord = 1
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens--
	goto parseWord
__28:
	;
	goto __26
__25:
	// This is an unquoted word. Call ParseTokens and let it do all of
	// the work.

	if !(sParseTokens(tls, src, numBytes, TYPE_SPACE|terminators,
		TCL_SUBST_ALL, parsePtr) != TCL_OK) {
		goto __29
	}
	goto error
__29:
	;
	src = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm
	numBytes = int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend) - int64(src)) / 1)
__26:
	;
__23:
	;

	// Finish filling in the token for the word and check for the special
	// case of a word consisting of a single range of literal text.

	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(wordIndex)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = int32((int64(src) - int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)) / 1)
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens - (wordIndex + 1)
	if !(expandWord != 0) {
		goto __30
	}
	isLiteral = 1

	// When a command includes a word that is an expanded literal; for
	// example, {*}{1 2 3}, the parser performs that expansion
	// immediately, generating several TCL_TOKEN_SIMPLE_WORDs instead
	// of a single TCL_TOKEN_EXPAND_WORD that the Tcl_ParseCommand()
	// caller might have to expand. This notably makes it simpler for
	// those callers that wish to track line endings, such as those
	// that implement key parts of TIP 280.
	//
	// First check whether the thing to be expanded is a literal,
	// in the sense of being composed entirely of TCL_TOKEN_TEXT
	// tokens.

	i = 1
__32:
	if !(i <= (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents) {
		goto __34
	}
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr+uintptr(i)*24)).Ftype != TCL_TOKEN_TEXT) {
		goto __35
	}
	isLiteral = 0
	goto __34
__35:
	;
	goto __33
__33:
	i++
	goto __32
	goto __34
__34:
	;

	if !(isLiteral != 0) {
		goto __36
	}
	elemCount = 0
	code = TCL_OK
	*(*int32)(unsafe.Pointer(bp + 52 /* literal */)) = 1

	// The word to be expanded is a literal, so determine the
	// boundaries of the literal string to be treated as a list
	// and expanded. That literal string starts at
	// tokenPtr[1].start, and includes all bytes up to, but not
	// including (tokenPtr[tokenPtr->numComponents].start +
	// tokenPtr[tokenPtr->numComponents].size)

	listEnd = (*Tcl_Token)(unsafe.Pointer(tokenPtr+uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents)*24)).Fstart + uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr+uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents)*24)).Fsize)
	*(*uintptr)(unsafe.Pointer(bp + 40 /* nextElem */)) = (*Tcl_Token)(unsafe.Pointer(tokenPtr + 1*24)).Fstart

	// Step through the literal string, parsing and counting list
	// elements.

__38:
	if !(*(*uintptr)(unsafe.Pointer(bp + 40)) < listEnd) {
		goto __39
	}

	code = XTclFindElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 40 /* nextElem */)), int32((int64(listEnd)-int64(*(*uintptr)(unsafe.Pointer(bp + 40))))/1),
		bp+32, bp+40, bp+48, bp+52)
	if !(code != TCL_OK || !(*(*int32)(unsafe.Pointer(bp + 52)) != 0)) {
		goto __40
	}
	goto __39
__40:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 32)) < listEnd) {
		goto __41
	}
	elemCount++
__41:
	;
	goto __38
__39:
	;

	if !(code != TCL_OK || !(*(*int32)(unsafe.Pointer(bp + 52)) != 0)) {
		goto __42
	}
	// Some list element could not be parsed, or is not
	// present as a literal substring of the script.  The
	// compiler cannot handle list elements that get generated
	// by a call to TclCopyAndCollapse(). Defer  the
	// handling of  this to  compile/eval time, where  code is
	// already  in place to  report the  "attempt to  expand a
	// non-list" error or expand lists that require
	// substitution.

	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_EXPAND_WORD
	goto __43
__42:
	if !(elemCount == 0) {
		goto __44
	}
	// We are expanding a literal empty list. This means that
	// the expanding word completely disappears, leaving no
	// word generated this pass through the loop. Adjust
	// accounting appropriately.

	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumWords--
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens = wordIndex
	goto __45
__44:
	growthNeeded = wordIndex + 2*elemCount -
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens

	*(*int32)(unsafe.Pointer(parsePtr + 28)) += elemCount - 1
	if !(growthNeeded > 0) {
		goto __46
	}
__47:
	_needed1 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + growthNeeded
	if !(_needed1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __50
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp+8, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__50:
	;
	if !(_needed1 > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __51
	}
	allocated1 = 2 * _needed1
	oldPtr1 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr1 == parsePtr+96) {
		goto __52
	}
	oldPtr1 = uintptr(0)
__52:
	;
	if !(allocated1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __53
	}
	allocated1 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__53:
	;
	newPtr1 = XTclpRealloc(tls, oldPtr1, uint32(uint64(allocated1)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr1 == uintptr(0)) {
		goto __54
	}
	allocated1 = int32(uint64(_needed1+growthNeeded) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __55
	}
	allocated1 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__55:
	;
	newPtr1 = XTcl_Realloc(tls, oldPtr1, uint32(uint64(allocated1)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__54:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated1
	if !(oldPtr1 == uintptr(0)) {
		goto __56
	}
	libc.Xmemcpy(tls, newPtr1, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__56:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr1
__51:
	;
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(wordIndex)*24
__46:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens = wordIndex + 2*elemCount

	// Generate a TCL_TOKEN_SIMPLE_WORD token sequence for
	// each element of the literal list we are expanding in
	// place. Take care with the start and size fields of each
	// token so they point to the right literal characters in
	// the original script to represent the right expanded
	// word value.

	listStart = libc.AssignPtrUintptr(bp+40 /* nextElem */, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart)
__57:
	if !(*(*uintptr)(unsafe.Pointer(bp + 40)) < listEnd) {
		goto __58
	}

	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_SIMPLE_WORD
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 1

	tokenPtr += 24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0
	XTclFindElement(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 40 /* nextElem */)), int32((int64(listEnd)-int64(*(*uintptr)(unsafe.Pointer(bp + 40))))/1),
		tokenPtr+8, bp+40,
		tokenPtr+16, uintptr(0))

	quoted = libc.Bool32((int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart + libc.UintptrFromInt32(-1)))) == '{' ||
		int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart + libc.UintptrFromInt32(-1)))) == '"') &&
		(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart > listStart)
	(*Tcl_Token)(unsafe.Pointer(tokenPtr + libc.UintptrFromInt32(-1)*24)).Fstart = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart - uintptr(quoted)
	(*Tcl_Token)(unsafe.Pointer(tokenPtr + libc.UintptrFromInt32(-1)*24)).Fsize = int32((int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart+uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize))-
		int64((*Tcl_Token)(unsafe.Pointer(tokenPtr+libc.UintptrFromInt32(-1)*24)).Fstart))/1 + int64(quoted))

	tokenPtr += 24
	goto __57
__58:
	;
__45:
	;
__43:
	;
	goto __37
__36:
	// The word to be expanded is not a literal, so defer
	// expansion to compile/eval time by marking with a
	// TCL_TOKEN_EXPAND_WORD token.

	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_EXPAND_WORD
__37:
	;
	goto __31
__30:
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents == 1 &&
		(*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Ftype == TCL_TOKEN_TEXT) {
		goto __59
	}
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_SIMPLE_WORD
__59:
	;
__31:
	;

	// Do two additional checks: (a) make sure we're really at the end of
	// a word (there might have been garbage left after a quoted or braced
	// word), and (b) check for the end of the command.

	scanned = sParseWhiteSpace(tls, src, numBytes, parsePtr+88, bp+16)
	if !(scanned != 0) {
		goto __60
	}
	src += uintptr(scanned)
	numBytes = numBytes - scanned
	goto __8
__60:
	;

	if !(numBytes == 0) {
		goto __61
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = src
	goto __9
__61:
	;
	if !(int32(*(*int8)(unsafe.Pointer(bp + 16)))&terminators != 0) {
		goto __62
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = src
	src++
	goto __9
__62:
	;
	if !(int32(*(*int8)(unsafe.Pointer(src + libc.UintptrFromInt32(-1)))) == '"') {
		goto __63
	}
	if !(interp != uintptr(0)) {
		goto __65
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+54865, -1))
__65:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_QUOTE_EXTRA
	goto __64
__63:
	if !(interp != uintptr(0)) {
		goto __66
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+54900, -1))
__66:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_BRACE_EXTRA
__64:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = src
	goto error
	goto __8
__9:
	;

	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize = int32((int64(src) - int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)) / 1)
	return TCL_OK

error:
	XTcl_FreeParse(tls, parsePtr)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandSize = int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend) - int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommandStart)) / 1)
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclIsSpaceProc --
//
//	Report whether byte is in the set of whitespace characters used by
//	Tcl to separate words in scripts or elements in lists.
//
// Results:
//	Returns 1, if byte is in the set, 0 otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclIsSpaceProc(tls *libc.TLS, byte int32) int32 { /* tclParse.c:617:1: */
	return libc.Bool32(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCharTypeTable)) + uintptr(128) + uintptr(uint8(byte)))))&TYPE_SPACE != 0 || byte == '\n')
}

//----------------------------------------------------------------------
//
// TclIsBareword--
//
//	Report whether byte is one that can be part of a "bareword".
//	This concept is named in expression parsing, where it determines
//	what can be a legal function name, but is the same definition used
//	in determining what variable names can be parsed as variable
//	substitutions without the benefit of enclosing braces.  The set of
//	ASCII chars that are accepted are the numeric chars ('0'-'9'),
//	the alphabetic chars ('a'-'z', 'A'-'Z')	and underscore ('_').
//
// Results:
//	Returns 1, if byte is in the accepted set of chars, 0 otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclIsBareword(tls *libc.TLS, byte int32) int32 { /* tclParse.c:646:1: */
	if byte < '0' || byte > 'z' {
		return 0
	}
	if byte <= '9' || byte >= 'a' {
		return 1
	}
	if byte == '_' {
		return 1
	}
	if byte < 'A' || byte > 'Z' {
		return 0
	}
	return 1
}

//----------------------------------------------------------------------
//
// ParseWhiteSpace --
//
//	Scans up to numBytes bytes starting at src, consuming white space
//	between words as defined by Tcl's parsing rules.
//
// Results:
//	Returns the number of bytes recognized as white space. Records at
//	parsePtr, information about the parse. Records at typePtr the
//	character type of the non-whitespace character that terminated the
//	scan.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sParseWhiteSpace(tls *libc.TLS, src uintptr, numBytes int32, incompletePtr uintptr, typePtr uintptr) int32 { /* tclParse.c:685:1: */
	var type1 int8 = int8(TYPE_NORMAL)
	var p uintptr = src

	for 1 != 0 {
		for numBytes != 0 && int32(libc.AssignInt8(&type1, *(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCharTypeTable)) + uintptr(128) + uintptr(uint8(*(*int8)(unsafe.Pointer(p))))))))&TYPE_SPACE != 0 {
			numBytes--
			p++
		}
		if numBytes != 0 && int32(type1)&TYPE_SUBS != 0 {
			if int32(*(*int8)(unsafe.Pointer(p))) != '\\' {
				break
			}
			if libc.PreDecInt32(&numBytes, 1) == 0 {
				break
			}
			if int32(*(*int8)(unsafe.Pointer(p + 1))) != '\n' {
				break
			}
			p += uintptr(2)
			if libc.PreDecInt32(&numBytes, 1) == 0 {
				*(*int32)(unsafe.Pointer(incompletePtr)) = 1
				break
			}
			continue
		}
		break
	}
	*(*int8)(unsafe.Pointer(typePtr)) = type1
	return int32((int64(p) - int64(src)) / 1)
}

//----------------------------------------------------------------------
//
// TclParseAllWhiteSpace --
//
//	Scans up to numBytes bytes starting at src, consuming all white space
//	including the command-terminating newline characters.
//
// Results:
//	Returns the number of bytes recognized as white space.
//
//----------------------------------------------------------------------

func XTclParseAllWhiteSpace(tls *libc.TLS, src uintptr, numBytes int32) int32 { /* tclParse.c:739:1: */
	bp := tls.Alloc(5)
	defer tls.Free(5)

	// var dummy int32 at bp, 4

	// var type1 int8 at bp+4, 1

	var p uintptr = src

	for ok := true; ok; ok = numBytes != 0 && int32(*(*int8)(unsafe.Pointer(p))) == '\n' && func() bool { p++; return libc.PreDecInt32(&numBytes, 1) != 0 }() {
		var scanned int32 = sParseWhiteSpace(tls, p, numBytes, bp, bp+4)

		p += uintptr(scanned)
		numBytes = numBytes - scanned
	}
	return int32((int64(p) - int64(src)) / 1)
}

//----------------------------------------------------------------------
//
// ParseHex --
//
//	Scans a hexadecimal number as a Tcl_UniChar value (e.g., for parsing
//	\x and \u escape sequences). At most numBytes bytes are scanned.
//
// Results:
//	The numeric value is stored in *resultPtr. Returns the number of bytes
//	consumed.
//
// Notes:
//	Relies on the following properties of the ASCII character set, with
//	which UTF-8 is compatible:
//
//	The digits '0' .. '9' and the letters 'A' .. 'Z' and 'a' .. 'z' occupy
//	consecutive code points, and '0' < 'A' < 'a'.
//
//----------------------------------------------------------------------

func XParseHex(tls *libc.TLS, src uintptr, numBytes int32, resultPtr uintptr) int32 { /* tclParse.c:779:1: */
	var result int32 = 0
	var p uintptr = src

	for libc.PostDecInt32(&numBytes, 1) != 0 {
		var digit uint8 = uint8(*(*int8)(unsafe.Pointer(p)))

		if !(libc.Xisxdigit(tls, int32(digit)) != 0) || result > 0x10FFF {
			break
		}

		p++
		result <<= 4

		if int32(digit) >= 'a' {
			result = result | (10 + int32(digit) - 'a')
		} else if int32(digit) >= 'A' {
			result = result | (10 + int32(digit) - 'A')
		} else {
			result = result | (int32(digit) - '0')
		}
	}

	*(*int32)(unsafe.Pointer(resultPtr)) = result
	return int32((int64(p) - int64(src)) / 1)
}

//----------------------------------------------------------------------
//
// TclParseBackslash --
//
//	Scans up to numBytes bytes starting at src, consuming a backslash
//	sequence as defined by Tcl's parsing rules.
//
// Results:
//	Records at readPtr the number of bytes making up the backslash
//	sequence. Records at dst the UTF-8 encoded equivalent of that
//	backslash sequence. Returns the number of bytes written to dst, at
//	most TCL_UTF_MAX. Either readPtr or dst may be NULL, if the results
//	are not needed, but the return value is the same either way.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclParseBackslash(tls *libc.TLS, src uintptr, numBytes int32, readPtr uintptr, dst uintptr) int32 { /* tclParse.c:834:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var p uintptr
	// var result int32 at bp+4, 4

	var count int32
	// var buf [3]int8 at bp, 3

	// var utfBytes [8]int8 at bp+8, 8
	p = src + uintptr(1)
	*(*[3]int8)(unsafe.Pointer(bp /* buf */)) = *(*[3]int8)(unsafe.Pointer(ts + 19416))

	if !(numBytes == 0) {
		goto __1
	}
	if !(readPtr != uintptr(0)) {
		goto __2
	}
	*(*int32)(unsafe.Pointer(readPtr)) = 0
__2:
	;
	return 0
__1:
	;

	if !(dst == uintptr(0)) {
		goto __3
	}
	dst = bp /* &buf[0] */
__3:
	;

	if !(numBytes == 1) {
		goto __4
	}
	// Can only scan the backslash, so return it.

	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = '\\'
	count = 1
	goto done
__4:
	;

	count = 2
	switch int32(*(*int8)(unsafe.Pointer(p))) {
	// Note: in the conversions below, use absolute values (e.g., 0xA)
	// rather than symbolic values (e.g. \n) that get converted by the
	// compiler. It's possible that compilers on some platforms will do
	// the symbolic conversions differently, which could result in
	// non-portable Tcl scripts.

	case 'a':
		goto __6
	case 'b':
		goto __7
	case 'f':
		goto __8
	case 'n':
		goto __9
	case 'r':
		goto __10
	case 't':
		goto __11
	case 'v':
		goto __12
	case 'x':
		goto __13
	case 'u':
		goto __14
	case 'U':
		goto __15
	case '\n':
		goto __16
	case 0:
		goto __17
	default:
		goto __18
	}
	goto __5
	// Note: in the conversions below, use absolute values (e.g., 0xA)
	// rather than symbolic values (e.g. \n) that get converted by the
	// compiler. It's possible that compilers on some platforms will do
	// the symbolic conversions differently, which could result in
	// non-portable Tcl scripts.

__6:
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 0x7
	goto __5
__7:
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 0x8
	goto __5
__8:
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 0xC
	goto __5
__9:
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 0xA
	goto __5
__10:
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 0xD
	goto __5
__11:
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 0x9
	goto __5
__12:
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 0xB
	goto __5
__13:
	count = count + XParseHex(tls, p+uintptr(1), func() int32 {
		if numBytes > 3 {
			return 2
		}
		return numBytes - 2
	}(), bp+4)
	if !(count == 2) {
		goto __19
	}
	// No hexdigits -> This is just "x".

	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 'x'
	goto __20
__19:
	// Keep only the last byte (2 hex digits).
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = int32(uint8(*(*int32)(unsafe.Pointer(bp + 4))))
__20:
	;
	goto __5
__14:
	count = count + XParseHex(tls, p+uintptr(1), func() int32 {
		if numBytes > 5 {
			return 4
		}
		return numBytes - 2
	}(), bp+4)
	if !(count == 2) {
		goto __21
	}
	// No hexdigits -> This is just "u".
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 'u'
__21:
	;
	goto __5
__15:
	count = count + XParseHex(tls, p+uintptr(1), func() int32 {
		if numBytes > 9 {
			return 8
		}
		return numBytes - 2
	}(), bp+4)
	if !(count == 2) {
		goto __22
	}
	// No hexdigits -> This is just "U".
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 'U'
__22:
	;
	goto __5
__16:
	count--
__23:
	p++
	count++
	goto __24
__24:
	if count < numBytes && (int32(*(*int8)(unsafe.Pointer(p))) == ' ' || int32(*(*int8)(unsafe.Pointer(p))) == '\t') {
		goto __23
	}
	goto __25
__25:
	;
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = ' '
	goto __5
__17:
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = '\\'
	count = 1
	goto __5
__18:
	// Check for an octal number \oo?o?

	if !(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(p))))) != 0 && int32(uint8(*(*int8)(unsafe.Pointer(p)))) < '8') {
		goto __26
	} // INTL: digit
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = int32(*(*int8)(unsafe.Pointer(p))) - '0'
	p++
	if !(numBytes == 2 || !(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(p))))) != 0) ||
		int32(uint8(*(*int8)(unsafe.Pointer(p)))) >= '8') {
		goto __27
	}
	goto __5
__27:
	;
	count = 3
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = *(*int32)(unsafe.Pointer(bp + 4))<<3 + (int32(*(*int8)(unsafe.Pointer(p))) - '0')
	p++
	if !(numBytes == 3 || !(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(p))))) != 0) ||
		int32(uint8(*(*int8)(unsafe.Pointer(p)))) >= '8' || *(*int32)(unsafe.Pointer(bp + 4)) >= 0x20) {
		goto __28
	}
	goto __5
__28:
	;
	count = 4
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = int32(uint8(*(*int32)(unsafe.Pointer(bp + 4))<<3 + (int32(*(*int8)(unsafe.Pointer(p))) - '0')))
	goto __5
__26:
	;

	// We have to convert here in case the user has put a backslash in
	// front of a multi-byte utf-8 character. While this means nothing
	// special, we shouldn't break up a correct utf-8 character. [Bug
	// #217987] test subst-3.2

	if !(func() int32 {
		if uint32(int32(uint8(*(*int8)(unsafe.Pointer(p))))-0xF0) < uint32(5) {
			return libc.Bool32(numBytes-1 >= 4)
		}
		return func() int32 {
			if int32(uint8(*(*int8)(unsafe.Pointer(p)))) == 0xED {
				return libc.Bool32(numBytes-1 >= 6)
			}
			return XTcl_UtfCharComplete(tls, p, numBytes-1)
		}()
	}() != 0) {
		goto __29
	}
	count = XTclUtfToUCS4(tls, p, bp+4) + 1 // +1 for '\'
	goto __30
__29:

	libc.Xmemcpy(tls, bp+8, p, uint64(numBytes-1))
	*(*int8)(unsafe.Pointer(bp + 8 + uintptr(numBytes-1))) = int8(0)
	count = XTclUtfToUCS4(tls, bp+8, bp+4) + 1
__30:
	;
	goto __5
__5:
	;

done:
	if !(readPtr != uintptr(0)) {
		goto __31
	}
	*(*int32)(unsafe.Pointer(readPtr)) = count
__31:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 4)) > 0xFFFF) {
		goto __32
	}
	*(*int32)(unsafe.Pointer(bp + 4 /* result */)) = 0xFFFD
__32:
	;
	return XTclUCS4ToUtf(tls, *(*int32)(unsafe.Pointer(bp + 4 /* result */)), dst)
}

//----------------------------------------------------------------------
//
// ParseComment --
//
//	Scans up to numBytes bytes starting at src, consuming a Tcl comment as
//	defined by Tcl's parsing rules.
//
// Results:
//	Records in parsePtr information about the parse. Returns the number of
//	bytes consumed.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sParseComment(tls *libc.TLS, src uintptr, numBytes int32, parsePtr uintptr) int32 { /* tclParse.c:1038:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var p uintptr = src

	for numBytes != 0 {
		// var type1 int8 at bp, 1

		// var scanned int32 at bp+4, 4

		for ok := true; ok; ok = numBytes != 0 && int32(*(*int8)(unsafe.Pointer(p))) == '\n' && func() bool { p++; return libc.PostDecInt32(&numBytes, 1) != 0 }() {
			*(*int32)(unsafe.Pointer(bp + 4 /* scanned */)) = sParseWhiteSpace(tls, p, numBytes,
				parsePtr+88, bp)
			p += uintptr(*(*int32)(unsafe.Pointer(bp + 4 /* scanned */)))
			numBytes = numBytes - *(*int32)(unsafe.Pointer(bp + 4))
		}

		if numBytes == 0 || int32(*(*int8)(unsafe.Pointer(p))) != '#' {
			break
		}
		if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommentStart == uintptr(0) {
			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommentStart = p
		}

		for numBytes != 0 {
			if int32(*(*int8)(unsafe.Pointer(p))) == '\\' {
				*(*int32)(unsafe.Pointer(bp + 4 /* scanned */)) = sParseWhiteSpace(tls, p, numBytes, parsePtr+88,
					bp)
				if *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
					p += uintptr(*(*int32)(unsafe.Pointer(bp + 4 /* scanned */)))
					numBytes = numBytes - *(*int32)(unsafe.Pointer(bp + 4))
				} else {
					// General backslash substitution in comments isn't part
					// of the formal spec, but test parse-15.47 and history
					// indicate that it has been the de facto rule. Don't
					// change it now.

					XTclParseBackslash(tls, p, numBytes, bp+4, uintptr(0))
					p += uintptr(*(*int32)(unsafe.Pointer(bp + 4 /* scanned */)))
					numBytes = numBytes - *(*int32)(unsafe.Pointer(bp + 4))
				}
			} else {
				p++
				numBytes--
				if int32(*(*int8)(unsafe.Pointer(p + libc.UintptrFromInt32(-1)))) == '\n' {
					break
				}
			}
		}
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommentSize = int32((int64(p) - int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FcommentStart)) / 1)
	}
	return int32((int64(p) - int64(src)) / 1)
}

//----------------------------------------------------------------------
//
// ParseTokens --
//
//	This function forms the heart of the Tcl parser. It parses one or more
//	tokens from a string, up to a termination point specified by the
//	caller. This function is used to parse unquoted command words (those
//	not in quotes or braces), words in quotes, and array indices for
//	variables. No more than numBytes bytes will be scanned.
//
// Results:
//	Tokens are added to parsePtr and parsePtr->term is filled in with the
//	address of the character that terminated the parse (the first one
//	whose CHAR_TYPE matched mask or the character at parsePtr->end). The
//	return value is TCL_OK if the parse completed successfully and
//	TCL_ERROR otherwise. If a parse error occurs and parsePtr->interp is
//	not NULL, then an error message is left in the interpreter's result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sParseTokens(tls *libc.TLS, src uintptr, numBytes int32, mask int32, flags int32, parsePtr uintptr) int32 { /* tclParse.c:1123:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var type1 int8
	var originalTokens int32
	var noSubstCmds int32
	var noSubstVars int32
	var noSubstBS int32
	var tokenPtr uintptr
	var allocated int32
	var oldPtr uintptr
	var newPtr uintptr
	var _needed int32
	var varToken int32
	var curEnd uintptr
	var nestedPtr uintptr
	var allocated1 int32
	var oldPtr1 uintptr
	var newPtr1 uintptr
	var _needed1 int32
	noSubstCmds = libc.BoolInt32(!(flags&TCL_SUBST_COMMANDS != 0))
	noSubstVars = libc.BoolInt32(!(flags&TCL_SUBST_VARIABLES != 0))
	noSubstBS = libc.BoolInt32(!(flags&TCL_SUBST_BACKSLASHES != 0))

	// Each iteration through the following loop adds one token of type
	// TCL_TOKEN_TEXT, TCL_TOKEN_BS, TCL_TOKEN_COMMAND, or TCL_TOKEN_VARIABLE
	// to parsePtr. For TCL_TOKEN_VARIABLE tokens, additional tokens are added
	// for the parsed variable name.

	originalTokens = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens
__1:
	if !(numBytes != 0 && !(int32(libc.AssignInt8(&type1, *(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCharTypeTable)) + uintptr(128) + uintptr(uint8(*(*int8)(unsafe.Pointer(src))))))))&mask != 0)) {
		goto __2
	}
__3:
	_needed = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 1
	if !(_needed > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __6
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__6:
	;
	if !(_needed > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __7
	}
	allocated = 2 * _needed
	oldPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr == parsePtr+96) {
		goto __8
	}
	oldPtr = uintptr(0)
__8:
	;
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __9
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__9:
	;
	newPtr = XTclpRealloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr == uintptr(0)) {
		goto __10
	}
	allocated = int32(uint64(_needed+1) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __11
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__11:
	;
	newPtr = XTcl_Realloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__10:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated
	if !(oldPtr == uintptr(0)) {
		goto __12
	}
	libc.Xmemcpy(tls, newPtr, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__12:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr
__7:
	;
	goto __4
__4:
	if 0 != 0 {
		goto __3
	}
	goto __5
__5:
	;
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0

	if !(int32(type1)&TYPE_SUBS == 0) {
		goto __13
	}
	// This is a simple range of characters. Scan to find the end of
	// the range.

__15:
	if !(func() bool { src++; return libc.PreDecInt32(&numBytes, 1) != 0 }() &&
		!(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCharTypeTable)) + uintptr(128) + uintptr(uint8(*(*int8)(unsafe.Pointer(src)))))))&(mask|TYPE_SUBS) != 0)) {
		goto __16
	}
	// empty loop
	goto __15
__16:
	;
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = int32((int64(src) - int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)) / 1)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	goto __14
__13:
	if !(int32(*(*int8)(unsafe.Pointer(src))) == '$') {
		goto __17
	}

	if !(noSubstVars != 0) {
		goto __19
	}
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = 1
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	src++
	numBytes--
	goto __1
__19:
	;

	// This is a variable reference. Call Tcl_ParseVarName to do all
	// the dirty work of parsing the name.

	varToken = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens
	if !(XTcl_ParseVarName(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, src, numBytes, parsePtr,
		1) != TCL_OK) {
		goto __20
	}
	return TCL_ERROR
__20:
	;
	src += uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(varToken)*24)).Fsize)
	numBytes = numBytes - (*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr+uintptr(varToken)*24)).Fsize
	goto __18
__17:
	if !(int32(*(*int8)(unsafe.Pointer(src))) == '[') {
		goto __21
	}

	if !(noSubstCmds != 0) {
		goto __23
	}
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = 1
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	src++
	numBytes--
	goto __1
__23:
	;

	// Command substitution. Call Tcl_ParseCommand recursively (and
	// repeatedly) to parse the nested command(s), then throw away the
	// parse information.

	src++
	numBytes--
	nestedPtr = XTclStackAlloc(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, int32(unsafe.Sizeof(Tcl_Parse{})))
__24:
	if !(1 != 0) {
		goto __25
	}

	if !(XTcl_ParseCommand(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, src, numBytes, 1,
		nestedPtr) != TCL_OK) {
		goto __26
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).FerrorType
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fincomplete
	XTclStackFree(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, nestedPtr)
	return TCL_ERROR
__26:
	;
	curEnd = src + uintptr(numBytes)
	src = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).FcommandStart + uintptr((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).FcommandSize)
	numBytes = int32((int64(curEnd) - int64(src)) / 1)
	XTcl_FreeParse(tls, nestedPtr)

	// Check for the closing ']' that ends the command
	// substitution. It must have been the last character of the
	// parsed command.

	if !((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm < (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend &&
		int32(*(*int8)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm))) == ']' &&
		!((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fincomplete != 0)) {
		goto __27
	}
	goto __25
__27:
	;
	if !(numBytes == 0) {
		goto __28
	}
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp != uintptr(0)) {
		goto __29
	}
	XTcl_SetObjResult(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, XTcl_NewStringObj(tls,
		ts+20292, -1))
__29:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_MISSING_BRACKET
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 1
	XTclStackFree(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, nestedPtr)
	return TCL_ERROR
__28:
	;
	goto __24
__25:
	;
	XTclStackFree(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, nestedPtr)
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_COMMAND
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = int32((int64(src) - int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)) / 1)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	goto __22
__21:
	if !(int32(*(*int8)(unsafe.Pointer(src))) == '\\') {
		goto __30
	}
	if !(noSubstBS != 0) {
		goto __32
	}
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = 1
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	src++
	numBytes--
	goto __1
__32:
	;

	// Backslash substitution.

	XTclParseBackslash(tls, src, numBytes, tokenPtr+16, uintptr(0))

	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize == 1) {
		goto __33
	}
	// Just a backslash, due to end of string.

	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	src++
	numBytes--
	goto __1
__33:
	;

	if !(int32(*(*int8)(unsafe.Pointer(src + 1))) == '\n') {
		goto __34
	}
	if !(numBytes == 2) {
		goto __35
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 1
__35:
	;

	// Note: backslash-newline is special in that it is treated
	// the same as a space character would be. This means that it
	// could terminate the token.

	if !(mask&TYPE_SPACE != 0) {
		goto __36
	}
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens == originalTokens) {
		goto __37
	}
	goto finishToken
__37:
	;
	goto __2
__36:
	;
__34:
	;

	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_BS
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	src += uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize)
	numBytes = numBytes - (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize
	goto __31
__30:
	if !(int32(*(*int8)(unsafe.Pointer(src))) == 0) {
		goto __38
	}
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = 1
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	src++
	numBytes--
	goto __39
__38:
	XTcl_Panic(tls, ts+54935, 0)
__39:
	;
__31:
	;
__22:
	;
__18:
	;
__14:
	;
	goto __1
__2:
	;
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens == originalTokens) {
		goto __40
	}
	// There was nothing in this range of text. Add an empty token for the
	// empty range, so that there is always at least one token added.

__41:
	_needed1 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 1
	if !(_needed1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __44
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp+8, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__44:
	;
	if !(_needed1 > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __45
	}
	allocated1 = 2 * _needed1
	oldPtr1 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr1 == parsePtr+96) {
		goto __46
	}
	oldPtr1 = uintptr(0)
__46:
	;
	if !(allocated1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __47
	}
	allocated1 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__47:
	;
	newPtr1 = XTclpRealloc(tls, oldPtr1, uint32(uint64(allocated1)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr1 == uintptr(0)) {
		goto __48
	}
	allocated1 = int32(uint64(_needed1+1) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __49
	}
	allocated1 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__49:
	;
	newPtr1 = XTcl_Realloc(tls, oldPtr1, uint32(uint64(allocated1)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__48:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated1
	if !(oldPtr1 == uintptr(0)) {
		goto __50
	}
	libc.Xmemcpy(tls, newPtr1, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__50:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr1
__45:
	;
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0

finishToken:
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = 0
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
__40:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = src
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_FreeParse --
//
//	This function is invoked to free any dynamic storage that may have
//	been allocated by a previous call to Tcl_ParseCommand.
//
// Results:
//	None.
//
// Side effects:
//	If there is any dynamically allocated memory in *parsePtr, it is
//	freed.
//
//----------------------------------------------------------------------

func XTcl_FreeParse(tls *libc.TLS, parsePtr uintptr) { /* tclParse.c:1360:1: */
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr != parsePtr+96 {
		XTclpFree(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = parsePtr + 96 /* &.staticTokens */
	}
}

//----------------------------------------------------------------------
//
// Tcl_ParseVarName --
//
//	Given a string starting with a $ sign, parse off a variable name and
//	return information about the parse. No more than numBytes bytes will
//	be scanned.
//
// Results:
//	The return value is TCL_OK if the command was parsed successfully and
//	TCL_ERROR otherwise. If an error occurs and interp isn't NULL then an
//	error message is left in its result. On a successful return, tokenPtr
//	and numTokens fields of parsePtr are filled in with information about
//	the variable name that was parsed. The "size" field of the first new
//	token gives the total number of bytes in the variable name. Other
//	fields in parsePtr are undefined.
//
// Side effects:
//	If there is insufficient space in parsePtr to hold all the information
//	about the command, then additional space is malloc-ed. If the function
//	returns TCL_OK then the caller must eventually invoke Tcl_FreeParse to
//	release any additional space that was allocated.
//
//----------------------------------------------------------------------

func XTcl_ParseVarName(tls *libc.TLS, interp uintptr, start uintptr, numBytes int32, parsePtr uintptr, append int32) int32 { /* tclParse.c:1398:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var tokenPtr uintptr
	var src uintptr
	var varIndex int32
	var array uint32
	var allocated int32
	var oldPtr uintptr
	var newPtr uintptr
	var _needed int32

	if !(numBytes < 0 && start != 0) {
		goto __1
	}
	numBytes = int32(libc.Xstrlen(tls, start))
__1:
	;
	if !!(append != 0) {
		goto __2
	}
	XTclParseInit(tls, interp, start, numBytes, parsePtr)
__2:
	;
	if !(numBytes == 0 || start == uintptr(0)) {
		goto __3
	}
	return TCL_ERROR
__3:
	;

	// Generate one token for the variable, an additional token for the name,
	// plus any number of additional tokens for the index, if there is one.

	src = start
__4:
	_needed = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 2
	if !(_needed > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __7
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__7:
	;
	if !(_needed > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __8
	}
	allocated = 2 * _needed
	oldPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr == parsePtr+96) {
		goto __9
	}
	oldPtr = uintptr(0)
__9:
	;
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __10
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__10:
	;
	newPtr = XTclpRealloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr == uintptr(0)) {
		goto __11
	}
	allocated = int32(uint64(_needed+2) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __12
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__12:
	;
	newPtr = XTcl_Realloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__11:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated
	if !(oldPtr == uintptr(0)) {
		goto __13
	}
	libc.Xmemcpy(tls, newPtr, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__13:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr
__8:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_VARIABLE
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src
	varIndex = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	tokenPtr += 24
	src++
	numBytes--
	if !(numBytes == 0) {
		goto __14
	}
	goto justADollarSign
__14:
	;
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0

	// The name of the variable can have three forms:
	// 1. The $ sign is followed by an open curly brace. Then the variable
	//	  name is everything up to the next close curly brace, and the
	//	  variable is a scalar variable.
	// 2. The $ sign is not followed by an open curly brace. Then the variable
	//	  name is everything up to the next character that isn't a letter,
	//	  digit, or underscore. :: sequences are also considered part of the
	//	  variable name, in order to support namespaces. If the following
	//	  character is an open parenthesis, then the information between
	//	  parentheses is the array element name.
	// 3. The $ sign is followed by something that isn't a letter, digit, or
	//	  underscore: in this case, there is no variable name and the token is
	//	  just "$".

	if !(int32(*(*int8)(unsafe.Pointer(src))) == '{') {
		goto __15
	}
	src++
	numBytes--
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0

__17:
	if !(numBytes != 0 && int32(*(*int8)(unsafe.Pointer(src))) != '}') {
		goto __18
	}
	numBytes--
	src++
	goto __17
__18:
	;
	if !(numBytes == 0) {
		goto __19
	}
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp != uintptr(0)) {
		goto __20
	}
	XTcl_SetObjResult(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, XTcl_NewStringObj(tls,
		ts+54977, -1))
__20:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_MISSING_VAR_BRACE
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart - uintptr(1)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 1
	goto error
__19:
	;
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = int32((int64(src) - int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)) / 1)
	(*Tcl_Token)(unsafe.Pointer(tokenPtr + libc.UintptrFromInt32(-1)*24)).Fsize = int32((int64(src) - int64((*Tcl_Token)(unsafe.Pointer(tokenPtr+libc.UintptrFromInt32(-1)*24)).Fstart)) / 1)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	src++
	goto __16
__15:
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0

__21:
	if !(numBytes != 0) {
		goto __22
	}
	if !(XTclIsBareword(tls, int32(*(*int8)(unsafe.Pointer(src)))) != 0) {
		goto __23
	}
	src += uintptr(1)
	numBytes = numBytes - 1
	goto __21
__23:
	;
	if !(int32(*(*int8)(unsafe.Pointer(src))) == ':' && numBytes != 1 && int32(*(*int8)(unsafe.Pointer(src + 1))) == ':') {
		goto __24
	}
	src += uintptr(2)
	numBytes = numBytes - 2
__25:
	if !(numBytes != 0 && int32(*(*int8)(unsafe.Pointer(src))) == ':') {
		goto __26
	}
	src++
	numBytes--
	goto __25
__26:
	;
	goto __21
__24:
	;
	goto __22
	goto __21
__22:
	;

	// Support for empty array names here.

	array = uint32(libc.Bool32(numBytes != 0 && int32(*(*int8)(unsafe.Pointer(src))) == '('))
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = int32((int64(src) - int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)) / 1)
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize == 0 && !(array != 0)) {
		goto __27
	}
	goto justADollarSign
__27:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
	if !(array != 0) {
		goto __28
	}
	// This is a reference to an array element. Call ParseTokens
	// recursively to parse the element name, since it could contain
	// any number of substitutions.

	if !(TCL_OK != sParseTokens(tls, src+uintptr(1), numBytes-1, TYPE_CLOSE_PAREN,
		TCL_SUBST_ALL, parsePtr)) {
		goto __29
	}
	goto error
__29:
	;
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm == src+uintptr(numBytes) || int32(*(*int8)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm))) != ')') {
		goto __30
	}
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp != uintptr(0)) {
		goto __31
	}
	XTcl_SetObjResult(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, XTcl_NewStringObj(tls,
		ts+55015, -1))
__31:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_MISSING_PAREN
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = src
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 1
	goto error
__30:
	;
	src = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm + uintptr(1)
__28:
	;
__16:
	;
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(varIndex)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = int32((int64(src) - int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)) / 1)
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens - (varIndex + 1)
	return TCL_OK

	// The dollar sign isn't followed by a variable name. Replace the
	// TCL_TOKEN_VARIABLE token with a TCL_TOKEN_TEXT token for the dollar
	// sign.

justADollarSign:
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(varIndex)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = 1
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0
	return TCL_OK

error:
	XTcl_FreeParse(tls, parsePtr)
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_ParseVar --
//
//	Given a string starting with a $ sign, parse off a variable name and
//	return its value.
//
// Results:
//	The return value is the contents of the variable given by the leading
//	characters of string. If termPtr isn't NULL, *termPtr gets filled in
//	with the address of the character just after the last one in the
//	variable specifier. If the variable doesn't exist, then the return
//	value is NULL and an error message will be left in interp's result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ParseVar(tls *libc.TLS, interp uintptr, start uintptr, termPtr uintptr) uintptr { /* tclParse.c:1592:12: */
	var objPtr uintptr
	var code int32
	var parsePtr uintptr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_Parse{})))

	if XTcl_ParseVarName(tls, interp, start, -1, parsePtr, 0) != TCL_OK {
		XTclStackFree(tls, interp, parsePtr)
		return uintptr(0)
	}

	if termPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(termPtr)) = start + uintptr((*Tcl_Token)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr)).Fsize)
	}
	if (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens == 1 {
		// There isn't a variable name after all: the $ is just a $.

		XTclStackFree(tls, interp, parsePtr)
		return ts + 55025 /* "$" */
	}

	code = XTclSubstTokens(tls, interp, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens,
		uintptr(0), 1, uintptr(0), uintptr(0))
	XTcl_FreeParse(tls, parsePtr)
	XTclStackFree(tls, interp, parsePtr)
	if code != TCL_OK {
		return uintptr(0)
	}
	objPtr = XTcl_GetObjResult(tls, interp)

	// At this point we should have an object containing the value of a
	// variable. Just return the string from that object.
	//
	// Since TclSubstTokens above returned TCL_OK, we know that objPtr
	// is shared.  It is in both the interp result and the value of the
	// variable.  Returning the string relies on that to be true.

	XTcl_ResetResult(tls, interp)
	return func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()
}

//----------------------------------------------------------------------
//
// Tcl_ParseBraces --
//
//	Given a string in braces such as a Tcl command argument or a string
//	value in a Tcl expression, this function parses the string and returns
//	information about the parse. No more than numBytes bytes will be
//	scanned.
//
// Results:
//	The return value is TCL_OK if the string was parsed successfully and
//	TCL_ERROR otherwise. If an error occurs and interp isn't NULL then an
//	error message is left in its result. On a successful return, tokenPtr
//	and numTokens fields of parsePtr are filled in with information about
//	the string that was parsed. Other fields in parsePtr are undefined.
//	termPtr is set to point to the character just after the last one in
//	the braced string.
//
// Side effects:
//	If there is insufficient space in parsePtr to hold all the information
//	about the command, then additional space is malloc-ed. If the function
//	returns TCL_OK then the caller must eventually invoke Tcl_FreeParse to
//	release any additional space that was allocated.
//
//----------------------------------------------------------------------

func XTcl_ParseBraces(tls *libc.TLS, interp uintptr, start uintptr, numBytes int32, parsePtr uintptr, append int32, termPtr uintptr) int32 { /* tclParse.c:1675:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var tokenPtr uintptr
	var src uintptr
	var startIndex int32
	var level int32
	// var length int32 at bp+16, 4

	var allocated int32
	var oldPtr uintptr
	var newPtr uintptr
	var _needed int32
	var allocated1 int32
	var oldPtr1 uintptr
	var newPtr1 uintptr
	var _needed1 int32
	var openBrace int32

	if !(numBytes < 0 && start != 0) {
		goto __1
	}
	numBytes = int32(libc.Xstrlen(tls, start))
__1:
	;
	if !!(append != 0) {
		goto __2
	}
	XTclParseInit(tls, interp, start, numBytes, parsePtr)
__2:
	;
	if !(numBytes == 0 || start == uintptr(0)) {
		goto __3
	}
	return TCL_ERROR
__3:
	;

	src = start
	startIndex = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens

__4:
	_needed = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 1
	if !(_needed > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __7
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__7:
	;
	if !(_needed > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __8
	}
	allocated = 2 * _needed
	oldPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr == parsePtr+96) {
		goto __9
	}
	oldPtr = uintptr(0)
__9:
	;
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __10
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__10:
	;
	newPtr = XTclpRealloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr == uintptr(0)) {
		goto __11
	}
	allocated = int32(uint64(_needed+1) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __12
	}
	allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__12:
	;
	newPtr = XTcl_Realloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__11:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated
	if !(oldPtr == uintptr(0)) {
		goto __13
	}
	libc.Xmemcpy(tls, newPtr, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__13:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr
__8:
	;
	goto __5
__5:
	if 0 != 0 {
		goto __4
	}
	goto __6
__6:
	;
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr(startIndex)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src + uintptr(1)
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0
	level = 1
__14:
	if !(1 != 0) {
		goto __15
	}
__16:
	if !func() bool { src++; return libc.PreDecInt32(&numBytes, 1) != 0 }() {
		goto __17
	}
	if !(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCharTypeTable)) + uintptr(128) + uintptr(uint8(*(*int8)(unsafe.Pointer(src))))))) != TYPE_NORMAL) {
		goto __18
	}
	goto __17
__18:
	;
	goto __16
__17:
	;
	if !(numBytes == 0) {
		goto __19
	}
	goto missingBraceError
__19:
	;

	switch int32(*(*int8)(unsafe.Pointer(src))) {
	case '{':
		goto __21
	case '}':
		goto __22
	case '\\':
		goto __23
	}
	goto __20
__21:
	level++
	goto __20
__22:
	if !(libc.PreDecInt32(&level, 1) == 0) {
		goto __24
	}
	// Decide if we need to finish emitting a partially-finished
	// token. There are 3 cases:
	//     {abc \newline xyz} or {xyz}
	//		- finish emitting "xyz" token
	//     {abc \newline}
	//		- don't emit token after \newline
	//     {}	- finish emitting zero-sized token
	//
	// The last case ensures that there is a token (even if empty)
	// that describes the braced string.

	if !(src != (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart ||
		(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens == startIndex) {
		goto __25
	}
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = int32((int64(src) - int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)) / 1)
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
__25:
	;
	if !(termPtr != uintptr(0)) {
		goto __26
	}
	*(*uintptr)(unsafe.Pointer(termPtr)) = src + uintptr(1)
__26:
	;
	return TCL_OK
__24:
	;
	goto __20
__23:
	XTclParseBackslash(tls, src, numBytes, bp+16, uintptr(0))
	if !(*(*int32)(unsafe.Pointer(bp + 16)) > 1 && int32(*(*int8)(unsafe.Pointer(src + 1))) == '\n') {
		goto __27
	}
	// A backslash-newline sequence must be collapsed, even inside
	// braces, so we have to split the word into multiple tokens
	// so that the backslash-newline can be represented
	// explicitly.

	if !(numBytes == 2) {
		goto __29
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 1
__29:
	;
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = int32((int64(src) - int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)) / 1)
	if !((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize != 0) {
		goto __30
	}
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
__30:
	;
__31:
	_needed1 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 2
	if !(_needed1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __34
	}
	XTcl_Panic(tls, ts+20224, libc.VaList(bp+8, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
__34:
	;
	if !(_needed1 > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable) {
		goto __35
	}
	allocated1 = 2 * _needed1
	oldPtr1 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
	if !(oldPtr1 == parsePtr+96) {
		goto __36
	}
	oldPtr1 = uintptr(0)
__36:
	;
	if !(allocated1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __37
	}
	allocated1 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__37:
	;
	newPtr1 = XTclpRealloc(tls, oldPtr1, uint32(uint64(allocated1)*uint64(unsafe.Sizeof(Tcl_Token{}))))
	if !(newPtr1 == uintptr(0)) {
		goto __38
	}
	allocated1 = int32(uint64(_needed1+2) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
	if !(allocated1 > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))) {
		goto __39
	}
	allocated1 = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
__39:
	;
	newPtr1 = XTcl_Realloc(tls, oldPtr1, uint32(uint64(allocated1)*uint64(unsafe.Sizeof(Tcl_Token{}))))
__38:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated1
	if !(oldPtr1 == uintptr(0)) {
		goto __40
	}
	libc.Xmemcpy(tls, newPtr1, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
__40:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr1
__35:
	;
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
	tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_BS
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = *(*int32)(unsafe.Pointer(bp + 16 /* length */))
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++

	src += uintptr(*(*int32)(unsafe.Pointer(bp + 16)) - 1)
	numBytes = numBytes - (*(*int32)(unsafe.Pointer(bp + 16)) - 1)
	tokenPtr += 24
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_TEXT
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = src + uintptr(1)
	(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0
	goto __28
__27:
	src += uintptr(*(*int32)(unsafe.Pointer(bp + 16)) - 1)
	numBytes = numBytes - (*(*int32)(unsafe.Pointer(bp + 16)) - 1)
__28:
	;
	goto __20
__20:
	;
	goto __14
__15:
	;

missingBraceError:
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_MISSING_BRACE
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = start
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 1
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp == uintptr(0)) {
		goto __41
	}
	// Skip straight to the exit code since we have no interpreter to put
	// error message in.

	goto error
__41:
	;

	XTcl_SetObjResult(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, XTcl_NewStringObj(tls,
		ts+55027, -1))

	/*
	 * Guess if the problem is due to comments by searching the source string
	 * for a possible open brace within the context of a comment. Since we
	 * aren't performing a full Tcl parse, just look for an open brace
	 * preceded by a '<whitespace>#' on the same line.
	 */

	openBrace = 0

__42:
	if !(libc.PreDecUintptr(&src, 1) > start) {
		goto __43
	}
	switch int32(*(*int8)(unsafe.Pointer(src))) {
	case '{':
		goto __45
	case '\n':
		goto __46
	case '#':
		goto __47
	}
	goto __44
__45:
	openBrace = 1
	goto __44
__46:
	openBrace = 0
	goto __44
__47:
	if !(openBrace != 0 && func() int32 {
		if int32(*(*int8)(unsafe.Pointer(src + libc.UintptrFromInt32(-1)))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(src + libc.UintptrFromInt32(-1)))))
	}() != 0) {
		goto __48
	}
	XTcl_AppendToObj(tls, XTcl_GetObjResult(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp),
		ts+55047, -1)
	goto error
__48:
	;
	goto __44
__44:
	;
	goto __42
__43:
	;

error:
	XTcl_FreeParse(tls, parsePtr)
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_ParseQuotedString --
//
//	Given a double-quoted string such as a quoted Tcl command argument or
//	a quoted value in a Tcl expression, this function parses the string
//	and returns information about the parse. No more than numBytes bytes
//	will be scanned.
//
// Results:
//	The return value is TCL_OK if the string was parsed successfully and
//	TCL_ERROR otherwise. If an error occurs and interp isn't NULL then an
//	error message is left in its result. On a successful return, tokenPtr
//	and numTokens fields of parsePtr are filled in with information about
//	the string that was parsed. Other fields in parsePtr are undefined.
//	termPtr is set to point to the character just after the quoted
//	string's terminating close-quote.
//
// Side effects:
//	If there is insufficient space in parsePtr to hold all the information
//	about the command, then additional space is malloc-ed. If the function
//	returns TCL_OK then the caller must eventually invoke Tcl_FreeParse to
//	release any additional space that was allocated.
//
//----------------------------------------------------------------------

func XTcl_ParseQuotedString(tls *libc.TLS, interp uintptr, start uintptr, numBytes int32, parsePtr uintptr, append int32, termPtr uintptr) int32 { /* tclParse.c:1876:1: */
	if !(numBytes < 0 && start != 0) {
		goto __1
	}
	numBytes = int32(libc.Xstrlen(tls, start))
__1:
	;
	if !!(append != 0) {
		goto __2
	}
	XTclParseInit(tls, interp, start, numBytes, parsePtr)
__2:
	;
	if !(numBytes == 0 || start == uintptr(0)) {
		goto __3
	}
	return TCL_ERROR
__3:
	;

	if !(TCL_OK != sParseTokens(tls, start+uintptr(1), numBytes-1, TYPE_QUOTE, TCL_SUBST_ALL,
		parsePtr)) {
		goto __4
	}
	goto error
__4:
	;
	if !(int32(*(*int8)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm))) != '"') {
		goto __5
	}
	if !((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp != uintptr(0)) {
		goto __6
	}
	XTcl_SetObjResult(tls, (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Finterp, XTcl_NewStringObj(tls,
		ts+55086, -1))
__6:
	;
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_MISSING_QUOTE
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm = start
	(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 1
	goto error
__5:
	;
	if !(termPtr != uintptr(0)) {
		goto __7
	}
	*(*uintptr)(unsafe.Pointer(termPtr)) = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm + uintptr(1)
__7:
	;
	return TCL_OK

error:
	XTcl_FreeParse(tls, parsePtr)
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclSubstParse --
//
//	Token parser used by the [subst] command. Parses the string made up of
//	'numBytes' bytes starting at 'bytes'. Parsing is controlled by the
//	flags argument to provide support for the -nobackslashes, -nocommands,
//	and -novariables options, as represented by the flag values
//	TCL_SUBST_BACKSLASHES, TCL_SUBST_COMMANDS, TCL_SUBST_VARIABLES.
//
// Results:
//	None.
//
// Side effects:
//	The Tcl_Parse struct '*parsePtr' is filled with parse results.
//	The caller is expected to eventually call Tcl_FreeParse() to properly
//	cleanup the value written there.
//
//	If a parse error occurs, the Tcl_InterpState value '*statePtr' is
//	filled with the state created by that error. When *statePtr is written
//	to, the caller is expected to make the required calls to either
//	Tcl_RestoreInterpState() or Tcl_DiscardInterpState() to dispose of the
//	value written there.
//
//----------------------------------------------------------------------

func XTclSubstParse(tls *libc.TLS, interp uintptr, bytes uintptr, numBytes int32, flags int32, parsePtr uintptr, statePtr uintptr) { /* tclParse.c:1959:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var length int32 = numBytes
	var p uintptr = bytes

	XTclParseInit(tls, interp, p, length, parsePtr)

	// First parse the string rep of objPtr, as if it were enclosed as a
	// "-quoted word in a normal Tcl command. Honor flags that selectively
	// inhibit types of substitution.

	if TCL_OK != sParseTokens(tls, p, length, 0, flags, parsePtr) {
		// There was a parse error. Save the interpreter state for possible
		// error reporting later.

		*(*Tcl_InterpState)(unsafe.Pointer(statePtr)) = XTcl_SaveInterpState(tls, interp, TCL_ERROR)

		// We need to re-parse to get the portion of the string we can [subst]
		// before the parse error. Sadly, all the Tcl_Token's created by the
		// first parse attempt are gone, freed according to the public spec
		// for the Tcl_Parse* routines. The only clue we have is parse.term,
		// which points to either the unmatched opener, or to characters that
		// follow a close brace or close quote.
		//
		// Call ParseTokens again, working on the string up to parse.term.
		// Keep repeating until we get a good parse on a prefix.

		for ok := true; ok; ok = TCL_OK != sParseTokens(tls, p, int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend)-int64(p))/1), 0, flags, parsePtr) {
			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens = 0
			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = NUM_STATIC_TOKENS
			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm
			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fincomplete = 0
			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FerrorType = TCL_PARSE_SUCCESS
		}

		// The good parse will have to be followed by {, (, or [.

		switch int32(*(*int8)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm))) {
		case '{':
			// Parse error was a missing } in a ${varname} variable
			// substitution at the toplevel. We will subst everything up to
			// that broken variable substitution before reporting the parse
			// error. Substituting the leftover '$' will have no side-effects,
			// so the current token stream is fine.
			break
			fallthrough

		case '(':
			// Parse error was during the parsing of the index part of an
			// array variable substitution at the toplevel.

			if int32(*(*int8)(unsafe.Pointer((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm - uintptr(1)))) == '$' {
				// Special case where removing the array index left us with
				// just a dollar sign (array variable with name the empty
				// string as its name), instead of with a scalar variable
				// reference.
				//
				// As in the previous case, existing token stream is OK.
			} else {
				// The current parse includes a successful parse of a scalar
				// variable substitution where there should have been an array
				// variable substitution. We remove that mistaken part of the
				// parse before moving on. A scalar variable substitution is
				// two tokens.

				var varTokenPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24 - uintptr(2)*24

				if (*Tcl_Token)(unsafe.Pointer(varTokenPtr)).Ftype != TCL_TOKEN_VARIABLE {
					XTcl_Panic(tls, ts+55096, 0)
				}
				if (*Tcl_Token)(unsafe.Pointer(varTokenPtr+1*24)).Ftype != TCL_TOKEN_TEXT {
					XTcl_Panic(tls, ts+55096, 0)
				}
				*(*int32)(unsafe.Pointer(parsePtr + 40)) -= 2
			}
			break
			fallthrough
		case '[':
			// Parse error occurred during parsing of a toplevel command
			// substitution.

			(*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend = p + uintptr(length)
			p = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm + uintptr(1)
			length = int32((int64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fend) - int64(p)) / 1)
			if length == 0 {
				// No commands, just an unmatched [. As in previous cases,
				// existing token stream is OK.
			} else {
				// We want to add the parsing of as many commands as we can
				// within that substitution until we reach the actual parse
				// error. We'll do additional parsing to determine what length
				// to claim for the final TCL_TOKEN_COMMAND token.

				var tokenPtr uintptr
				var lastTerm uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm
				var nestedPtr uintptr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(Tcl_Parse{})))

				for TCL_OK == XTcl_ParseCommand(tls, uintptr(0), p, length, 0, nestedPtr) {
					XTcl_FreeParse(tls, nestedPtr)
					p = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm + uintptr(libc.Bool32((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm < (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fend))
					length = int32((int64((*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fend) - int64(p)) / 1)
					if length == 0 && (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm == (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fend {
						// If we run out of string, blame the missing close
						// bracket on the last command, and do not evaluate it
						// during substitution.

						break
					}
					lastTerm = (*Tcl_Parse)(unsafe.Pointer(nestedPtr)).Fterm
				}
				XTclStackFree(tls, interp, nestedPtr)

				if lastTerm == (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm {
					// Parse error in first command. No commands to subst, add
					// no more tokens.
					break
				}

				// Create a command substitution token for whatever commands
				// got parsed.

				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _needed int32 = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens + 1
					if _needed > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{}))) {
						XTcl_Panic(tls, ts+20224, libc.VaList(bp, int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{})))))
					}
					if _needed > (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable {
						var allocated int32 = 2 * _needed
						var oldPtr uintptr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr
						var newPtr uintptr
						if oldPtr == parsePtr+96 {
							oldPtr = uintptr(0)
						}
						if allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{}))) {
							allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
						}
						newPtr = XTclpRealloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
						if newPtr == uintptr(0) {
							allocated = int32(uint64(_needed+1) + uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_Token{})))
							if allocated > int32(uint64(uint32(0x7fffffff)*2+1)/uint64(unsafe.Sizeof(Tcl_Token{}))) {
								allocated = int32(uint64(uint32(0x7fffffff)*2+1) / uint64(unsafe.Sizeof(Tcl_Token{})))
							}
							newPtr = XTcl_Realloc(tls, oldPtr, uint32(uint64(allocated)*uint64(unsafe.Sizeof(Tcl_Token{}))))
						}
						(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokensAvailable = allocated
						if oldPtr == uintptr(0) {
							libc.Xmemcpy(tls, newPtr, parsePtr+96, uint64((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*uint64(unsafe.Sizeof(Tcl_Token{})))
						}
						(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr = newPtr
					}
				}
				tokenPtr = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).FtokenPtr + uintptr((*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens)*24
				(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart = (*Tcl_Parse)(unsafe.Pointer(parsePtr)).Fterm
				(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents = 0
				(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype = TCL_TOKEN_COMMAND
				(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize = int32((int64(lastTerm)-int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart))/1 + int64(1))
				(*Tcl_Parse)(unsafe.Pointer(parsePtr)).FnumTokens++
			}
			break
			fallthrough

		default:
			XTcl_Panic(tls, ts+55129, libc.VaList(bp+8, int32(*(*int8)(unsafe.Pointer(p + uintptr(length))))))
		}
	}
}

//----------------------------------------------------------------------
//
// TclSubstTokens --
//
//	Accepts an array of count Tcl_Token's, and creates a result value in
//	the interp from concatenating the results of performing Tcl
//	substitution on each Tcl_Token. Substitution is interrupted if any
//	non-TCL_OK completion code arises.
//
// Results:
//	The return value is a standard Tcl completion code. The result in
//	interp is the substituted value, or an error message if TCL_ERROR is
//	returned. If tokensLeftPtr is not NULL, then it points to an int where
//	the number of tokens remaining to be processed is written.
//
// Side effects:
//	Can be anything, depending on the types of substitution done.
//
//----------------------------------------------------------------------

func XTclSubstTokens(tls *libc.TLS, interp uintptr, tokenPtr uintptr, count int32, tokensLeftPtr uintptr, line int32, clNextOuter uintptr, outerScript uintptr) int32 { /* tclParse.c:2155:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)
	*(*int32)(unsafe.Pointer(bp + 16)) = line
	*(*uintptr)(unsafe.Pointer(bp + 24)) = clNextOuter

	var result uintptr
	var code int32 = TCL_OK
	var isLiteral int32
	var maxNumCL int32
	var numCL int32
	var i int32
	var adjust int32
	var clPosition uintptr = uintptr(0)
	var iPtr uintptr = interp
	var inFile int32 = (*Interp)(unsafe.Pointer(iPtr)).FevalFlags & TCL_EVAL_FILE

	// Each pass through this loop will substitute one token, and its
	// components, if any. The only thing tricky here is that we go to some
	// effort to pass Tcl_Obj's through untouched, to avoid string copying and
	// Tcl_Obj creation if possible, to aid performance and limit shimmering.
	//
	// Further optimization opportunities might be to check for the equivalent
	// of Tcl_SetObjResult(interp, Tcl_GetObjResult(interp)) and omit them.

	// For the handling of continuation lines in literals we first check if
	// this is actually a literal. For if not we can forego the additional
	// processing. Otherwise we pre-allocate a small table to store the
	// locations of all continuation lines we find in this literal, if any.
	// The table is extended if needed.

	numCL = 0
	maxNumCL = 0
	isLiteral = 1
	for i = 0; i < count; i++ {
		if (*Tcl_Token)(unsafe.Pointer(tokenPtr+uintptr(i)*24)).Ftype != TCL_TOKEN_TEXT &&
			(*Tcl_Token)(unsafe.Pointer(tokenPtr+uintptr(i)*24)).Ftype != TCL_TOKEN_BS {
			isLiteral = 0
			break
		}
	}

	if isLiteral != 0 {
		maxNumCL = NUM_STATIC_POS
		clPosition = XTcl_Alloc(tls, uint32(uint64(maxNumCL)*uint64(unsafe.Sizeof(int32(0)))))
	}

	adjust = 0
	result = uintptr(0)
__1:
	if !(count > 0 && code == TCL_OK) {
		goto __3
	}
	{
		var appendObj uintptr = uintptr(0)
		var append uintptr = uintptr(0)
		var appendByteLength int32 = 0
		*(*[3]int8)(unsafe.Pointer(bp + 8 /* utfCharBytes */)) = *(*[3]int8)(unsafe.Pointer(ts + 19416))

		switch (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype {
		case TCL_TOKEN_TEXT:
			append = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart
			appendByteLength = (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize
			break

		case TCL_TOKEN_BS:
			appendByteLength = XTclParseBackslash(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart,
				(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize, uintptr(0), bp+8)
			append = bp + 8 /* &utfCharBytes[0] */

			// If the backslash sequence we found is in a literal, and
			// represented a continuation line, we compute and store its
			// location (as char offset to the beginning of the _result_
			// script). We may have to extend the table of locations.
			//
			// Note that the continuation line information is relevant even if
			// the word we are processing is not a literal, as it can affect
			// nested commands. See the branch for TCL_TOKEN_COMMAND below,
			// where the adjustment we are tracking here is taken into
			// account. The good thing is that we do not need a table of
			// everything, just the number of lines we have to add as
			// correction.

			if appendByteLength == 1 && int32(*(*int8)(unsafe.Pointer(bp + 8))) == ' ' &&
				int32(*(*int8)(unsafe.Pointer((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart + 1))) == '\n' {
				if isLiteral != 0 {
					// var clPos int32 at bp+12, 4

					if result == uintptr(0) {
						*(*int32)(unsafe.Pointer(bp + 12 /* clPos */)) = 0
					} else {
						XTcl_GetStringFromObj(tls, result, bp+12)
					}

					if numCL >= maxNumCL {
						maxNumCL = maxNumCL * 2
						clPosition = XTcl_Realloc(tls, clPosition, uint32(uint64(maxNumCL)*uint64(unsafe.Sizeof(int32(0)))))
					}
					*(*int32)(unsafe.Pointer(clPosition + uintptr(numCL)*4)) = *(*int32)(unsafe.Pointer(bp + 12 /* clPos */))
					numCL++
				}
				adjust++
			}
			break

		case TCL_TOKEN_COMMAND:
			{
				// TIP #280: Transfer line information to nested command
				(*Interp)(unsafe.Pointer(iPtr)).FnumLevels++
				code = XTclInterpReady(tls, interp)
				if code == TCL_OK {
					// Test cases: info-30.{6,8,9}

					var theline int32

					XTclAdvanceContinuations(tls, bp+16, bp+24,
						int32((int64((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart)-int64(outerScript))/1))
					theline = *(*int32)(unsafe.Pointer(bp + 16)) + adjust
					code = XTclEvalEx(tls, interp, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart+uintptr(1), (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize-2,
						0, theline, *(*uintptr)(unsafe.Pointer(bp + 24 /* clNextOuter */)), outerScript)

					XTclAdvanceLines(tls, bp+16, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart+uintptr(1),
						(*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fstart+uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).Fsize)-uintptr(1))

					// Restore flag reset by nested eval for future bracketed
					// commands and their cmdframe setup

					if inFile != 0 {
						*(*int32)(unsafe.Pointer(iPtr + 324)) |= TCL_EVAL_FILE
					}
				}
				(*Interp)(unsafe.Pointer(iPtr)).FnumLevels--
				XTclResetCancellation(tls, interp, 0)
				appendObj = XTcl_GetObjResult(tls, interp)
				break

			}

		case TCL_TOKEN_VARIABLE:
			{
				var arrayIndex uintptr = uintptr(0)
				var varName uintptr = uintptr(0)

				if (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents > 1 {
					// Subst the index part of an array variable reference.

					code = XTclSubstTokens(tls, interp, tokenPtr+uintptr(2)*24,
						(*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents-1, uintptr(0), *(*int32)(unsafe.Pointer(bp + 16 /* line */)), uintptr(0), uintptr(0))
					arrayIndex = XTcl_GetObjResult(tls, interp)
					(*Tcl_Obj)(unsafe.Pointer(arrayIndex)).FrefCount++
				}

				if code == TCL_OK {
					varName = XTcl_NewStringObj(tls, (*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fstart,
						(*Tcl_Token)(unsafe.Pointer(tokenPtr+1*24)).Fsize)
					appendObj = XTcl_ObjGetVar2(tls, interp, varName, arrayIndex,
						TCL_LEAVE_ERR_MSG)
					for ok := true; ok; ok = 0 != 0 {
						var _objPtr uintptr = varName
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
					if appendObj == uintptr(0) {
						code = TCL_ERROR
					}
				}

				switch code {
				case TCL_OK:
					fallthrough // Got value
				case TCL_ERROR:
					fallthrough // Already have error message
				case TCL_BREAK:
					fallthrough // Will not substitute anyway
				case TCL_CONTINUE: // Will not substitute anyway
					break
				default:
					// All other return codes, we will subst the result from the
					// code-throwing evaluation.

					appendObj = XTcl_GetObjResult(tls, interp)
				}

				if arrayIndex != uintptr(0) {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						var _objPtr uintptr = arrayIndex
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
				}
				count = count - (*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents
				tokenPtr += 24 * uintptr((*Tcl_Token)(unsafe.Pointer(tokenPtr)).FnumComponents)
				break

			}

		default:
			XTcl_Panic(tls, ts+55160,
				libc.VaList(bp, (*Tcl_Token)(unsafe.Pointer(tokenPtr)).Ftype))
		}

		if code == TCL_BREAK || code == TCL_CONTINUE {
			// Inhibit substitution.
			goto __2
		}

		if result == uintptr(0) {
			// First pass through. If we have a Tcl_Obj, just use it. If not,
			// create one from our string.

			if appendObj != uintptr(0) {
				result = appendObj
			} else {
				result = XTcl_NewStringObj(tls, append, appendByteLength)
			}
			(*Tcl_Obj)(unsafe.Pointer(result)).FrefCount++
		} else {
			// Subsequent passes. Append to result.

			if (*Tcl_Obj)(unsafe.Pointer(result)).FrefCount > 1 {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					var _objPtr uintptr = result
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				result = XTcl_DuplicateObj(tls, result)
				(*Tcl_Obj)(unsafe.Pointer(result)).FrefCount++
			}
			if appendObj != uintptr(0) {
				XTcl_AppendObjToObj(tls, result, appendObj)
			} else {
				XTcl_AppendToObj(tls, result, append, appendByteLength)
			}
		}

	}
	goto __2
__2:
	count--
	tokenPtr += 24
	goto __1
	goto __3
__3:
	;

	if code != TCL_ERROR { // Keep error message in result!
		if result != uintptr(0) {
			XTcl_SetObjResult(tls, interp, result)

			// If the code found continuation lines (which implies that this
			// word is a literal), then we store the accumulated table of
			// locations in the thread-global data structure for the bytecode
			// compiler to find later, assuming that the literal is a script
			// which will be compiled.

			if numCL != 0 {
				XTclContinuationsEnter(tls, result, numCL, clPosition)
			}

			// Release the temp table we used to collect the locations of
			// continuation lines, if any.

			if maxNumCL != 0 {
				XTclpFree(tls, clPosition)
			}
		} else {
			XTcl_ResetResult(tls, interp)
		}
	}
	if tokensLeftPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(tokensLeftPtr)) = count
	}
	if result != uintptr(0) {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = result
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return code
}

//----------------------------------------------------------------------
//
// CommandComplete --
//
//	This function is shared by TclCommandComplete and
//	Tcl_ObjCommandComplete; it does all the real work of seeing whether a
//	script is complete
//
// Results:
//	1 is returned if the script is complete, 0 if there are open
//	delimiters such as " or (. 1 is also returned if there is a parse
//	error in the script other than unmatched delimiters.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sCommandComplete(tls *libc.TLS, script uintptr, numBytes int32) int32 { /* tclParse.c:2468:1: */
	bp := tls.Alloc(576)
	defer tls.Free(576)

	// var parse Tcl_Parse at bp, 576

	var p uintptr
	var end uintptr
	var result int32

	p = script
	end = p + uintptr(numBytes)
	for XTcl_ParseCommand(tls, uintptr(0), p, int32((int64(end)-int64(p))/1), 0, bp) == TCL_OK {
		p = (*Tcl_Parse)(unsafe.Pointer(bp)).FcommandStart + uintptr((*Tcl_Parse)(unsafe.Pointer(bp)).FcommandSize)
		if p >= end {
			break
		}
		XTcl_FreeParse(tls, bp)
	}
	if (*Tcl_Parse)(unsafe.Pointer(bp)).Fincomplete != 0 {
		result = 0
	} else {
		result = 1
	}
	XTcl_FreeParse(tls, bp)
	return result
}

//----------------------------------------------------------------------
//
// Tcl_CommandComplete --
//
//	Given a partial or complete Tcl script, this function determines
//	whether the script is complete in the sense of having matched braces
//	and quotes and brackets.
//
// Results:
//	1 is returned if the script is complete, 0 otherwise. 1 is also
//	returned if there is a parse error in the script other than unmatched
//	delimiters.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_CommandComplete(tls *libc.TLS, script uintptr) int32 { /* tclParse.c:2515:1: */
	return sCommandComplete(tls, script, int32(libc.Xstrlen(tls, script)))
}

//----------------------------------------------------------------------
//
// TclObjCommandComplete --
//
//	Given a partial or complete Tcl command in a Tcl object, this function
//	determines whether the command is complete in the sense of having
//	matched braces and quotes and brackets.
//
// Results:
//	1 is returned if the command is complete, 0 otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclObjCommandComplete(tls *libc.TLS, objPtr uintptr) int32 { /* tclParse.c:2540:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var length int32 at bp, 4

	var script uintptr = XTcl_GetStringFromObj(tls, objPtr, bp)

	return sCommandComplete(tls, script, *(*int32)(unsafe.Pointer(bp /* length */)))
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Define the 'path' object type, which Tcl uses to represent file paths
// internally.

var tclFsPathType = Tcl_ObjType{
	Fname:             ts + 42233,
	FfreeIntRepProc:   0, // freeIntRepProc
	FdupIntRepProc:    0, // dupIntRepProc
	FupdateStringProc: 0, // updateStringProc
	FsetFromAnyProc:   0, // setFromAnyProc
} /* tclPathObj.c:39:26 */

// struct FsPath --
//
// Internal representation of a Tcl_Obj of "path" type. This can be used to
// represent relative or absolute paths, and has certain optimisations when
// used to represent paths which are already normalized and absolute.
//
// Note that both 'translatedPathPtr' and 'normPathPtr' can be a circular
// reference to the container Tcl_Obj of this FsPath.
//
// There are two cases, with the first being the most common:
//
// (i) flags == 0, => Ordinary path.
//
// translatedPathPtr contains the translated path (which may be a circular
// reference to the object itself). If it is NULL then the path is pure
// normalized (and the normPathPtr will be a circular reference). cwdPtr is
// null for an absolute path, and non-null for a relative path (unless the cwd
// has never been set, in which case the cwdPtr may also be null for a
// relative path).
//
// (ii) flags != 0, => Special path, see TclNewFSPathObj
//
// Now, this is a path like 'file join $dir $tail' where, cwdPtr is the $dir
// and normPathPtr is the $tail.
//

type FsPath1 = struct {
	FtranslatedPathPtr uintptr
	FnormPathPtr       uintptr
	FcwdPtr            uintptr
	Fflags             int32
	F__ccgo_pad1       [4]byte
	FnativePathPtr     ClientData
	FfilesystemEpoch   int32
	F__ccgo_pad2       [4]byte
	FfsPtr             uintptr
} /* tclPathObj.c:75:9 */

// struct FsPath --
//
// Internal representation of a Tcl_Obj of "path" type. This can be used to
// represent relative or absolute paths, and has certain optimisations when
// used to represent paths which are already normalized and absolute.
//
// Note that both 'translatedPathPtr' and 'normPathPtr' can be a circular
// reference to the container Tcl_Obj of this FsPath.
//
// There are two cases, with the first being the most common:
//
// (i) flags == 0, => Ordinary path.
//
// translatedPathPtr contains the translated path (which may be a circular
// reference to the object itself). If it is NULL then the path is pure
// normalized (and the normPathPtr will be a circular reference). cwdPtr is
// null for an absolute path, and non-null for a relative path (unless the cwd
// has never been set, in which case the cwdPtr may also be null for a
// relative path).
//
// (ii) flags != 0, => Special path, see TclNewFSPathObj
//
// Now, this is a path like 'file join $dir $tail' where, cwdPtr is the $dir
// and normPathPtr is the $tail.
//

type FsPath = FsPath1 /* tclPathObj.c:99:3 */

// Flag values for FsPath->flags.

// Define some macros to give us convenient access to path-object specific
// fields.

//---------------------------------------------------------------------------
//
// TclFSNormalizeAbsolutePath --
//
//	Takes an absolute path specification and computes a 'normalized' path
//	from it.
//
//	A normalized path is one which has all '../', './' removed. Also it is
//	one which is in the 'standard' format for the native platform. On
//	Unix, this means the path must be free of symbolic links/aliases, and
//	on Windows it means we want the long form, with that long form's
//	case-dependence (which gives us a unique, case-dependent path).
//
//	The behaviour of this function if passed a non-absolute path is NOT
//	defined.
//
//	pathPtr may have a refCount of zero, or may be a shared object.
//
// Results:
//	The result is returned in a Tcl_Obj with a refCount of 1, which is
//	therefore owned by the caller. It must be freed (with
//	Tcl_DecrRefCount) by the caller when no longer needed.
//
// Side effects:
//	None (beyond the memory allocation for the result).
//
// Special note:
//	This code was originally based on code from Matt Newman and
//	Jean-Claude Wippler, but has since been totally rewritten by Vince
//	Darley to deal with symbolic links.
//
//---------------------------------------------------------------------------

func XTclFSNormalizeAbsolutePath(tls *libc.TLS, interp uintptr, pathPtr uintptr) uintptr { /* tclPathObj.c:153:9: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var dirSep uintptr
	var oldDirSep uintptr
	var first int32 // Set to zero once we've passed the first
	// directory separator - we can't use '..' to
	// remove the volume in a path.
	var retVal uintptr
	var path uintptr
	// Need to skip '.' in the path.
	// var curLen int32 at bp, 4

	var path1 uintptr
	// We need to follow this link which is relative
	// to retVal's directory. This means concatenating
	// the link onto the directory of the path so far.

	var path2 uintptr
	var i int32
	var linkObj uintptr
	// var curLen1 int32 at bp+4, 4

	var linkStr uintptr
	// var len int32 at bp+8, 4

	var path3 uintptr
	first = 1
	retVal = uintptr(0)
	dirSep = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
		}
		return XTcl_GetString(tls, pathPtr)
	}()

	if !(XtclPlatform == TCL_PLATFORM_WINDOWS) {
		goto __1
	}
	if !((int32(*(*int8)(unsafe.Pointer(dirSep))) == '/' || int32(*(*int8)(unsafe.Pointer(dirSep))) == '\\') &&
		(int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == '/' || int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == '\\') &&
		int32(*(*int8)(unsafe.Pointer(dirSep + 2))) == '?' &&
		(int32(*(*int8)(unsafe.Pointer(dirSep + 3))) == '/' || int32(*(*int8)(unsafe.Pointer(dirSep + 3))) == '\\')) {
		goto __2
	}
	// NT extended path
	dirSep += uintptr(4)

	if !((int32(*(*int8)(unsafe.Pointer(dirSep))) == 'U' || int32(*(*int8)(unsafe.Pointer(dirSep))) == 'u') &&
		(int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == 'N' || int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == 'n') &&
		(int32(*(*int8)(unsafe.Pointer(dirSep + 2))) == 'C' || int32(*(*int8)(unsafe.Pointer(dirSep + 2))) == 'c') &&
		(int32(*(*int8)(unsafe.Pointer(dirSep + 3))) == '/' || int32(*(*int8)(unsafe.Pointer(dirSep + 3))) == '\\')) {
		goto __3
	}
	// NT extended UNC path
	dirSep += uintptr(4)
__3:
	;
__2:
	;
	if !(int32(*(*int8)(unsafe.Pointer(dirSep))) != 0 && int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == ':' && (int32(*(*int8)(unsafe.Pointer(dirSep + 2))) == '/' || int32(*(*int8)(unsafe.Pointer(dirSep + 2))) == '\\')) {
		goto __4
	}
	// Do nothing
	goto __5
__4:
	if !((int32(*(*int8)(unsafe.Pointer(dirSep))) == '/' || int32(*(*int8)(unsafe.Pointer(dirSep))) == '\\') &&
		(int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == '/' || int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == '\\')) {
		goto __6
	}
	// UNC style path, where we must skip over the first separator,
	// since the first two segments are actually inseparable.

	dirSep += uintptr(2)
	dirSep += uintptr(sFindSplitPos(tls, dirSep, '/'))
	if !(int32(*(*int8)(unsafe.Pointer(dirSep))) != 0) {
		goto __7
	}
	dirSep++
__7:
	;
__6:
	;
__5:
	;
__1:
	;

	// Scan forward from one directory separator to the next, checking for
	// '..' and '.' sequences which must be handled specially. In particular
	// handling of '..' can be complicated if the directory before is a link,
	// since we will have to expand the link to be able to back up one level.

__8:
	if !(int32(*(*int8)(unsafe.Pointer(dirSep))) != 0) {
		goto __9
	}
	oldDirSep = dirSep
	if !!(first != 0) {
		goto __10
	}
	dirSep++
__10:
	;
	dirSep += uintptr(sFindSplitPos(tls, dirSep, '/'))
	if !(int32(*(*int8)(unsafe.Pointer(dirSep))) == 0 || int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == 0) {
		goto __11
	}
	if !(retVal != uintptr(0)) {
		goto __12
	}
	XTcl_AppendToObj(tls, retVal, oldDirSep, int32((int64(dirSep)-int64(oldDirSep))/1))
__12:
	;
	goto __9
__11:
	;
	if !(int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == '.') {
		goto __13
	}
	if !(retVal != uintptr(0)) {
		goto __14
	}
	XTcl_AppendToObj(tls, retVal, oldDirSep, int32((int64(dirSep)-int64(oldDirSep))/1))
	oldDirSep = dirSep
__14:
	;
again:
	if !(sIsSeparatorOrNull(tls, int32(*(*int8)(unsafe.Pointer(dirSep + 2)))) != 0) {
		goto __15
	}

	if !(retVal == uintptr(0)) {
		goto __16
	}
	path = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
		}
		return XTcl_GetString(tls, pathPtr)
	}()
	retVal = XTcl_NewStringObj(tls, path, int32((int64(dirSep)-int64(path))/1))
	(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount++
__16:
	;
	XTcl_GetStringFromObj(tls, retVal, bp)
	if !(*(*int32)(unsafe.Pointer(bp)) == 0) {
		goto __17
	}
	XTcl_AppendToObj(tls, retVal, dirSep, 1)
__17:
	;
	dirSep += uintptr(2)
	oldDirSep = dirSep
	if !(int32(*(*int8)(unsafe.Pointer(dirSep))) != 0 && int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == '.') {
		goto __18
	}
	goto again
__18:
	;
	goto __8
__15:
	;
	if !(int32(*(*int8)(unsafe.Pointer(dirSep + 2))) == '.' && sIsSeparatorOrNull(tls, int32(*(*int8)(unsafe.Pointer(dirSep + 3)))) != 0) {
		goto __19
	}

	// Have '..' so need to skip previous directory.

	if !(retVal == uintptr(0)) {
		goto __20
	}
	path1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
		}
		return XTcl_GetString(tls, pathPtr)
	}()

	retVal = XTcl_NewStringObj(tls, path1, int32((int64(dirSep)-int64(path1))/1))
	(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount++
__20:
	;
	XTcl_GetStringFromObj(tls, retVal, bp+4)
	if !(*(*int32)(unsafe.Pointer(bp + 4)) == 0) {
		goto __21
	}
	XTcl_AppendToObj(tls, retVal, dirSep, 1)
__21:
	;
	if !(!(first != 0) || XtclPlatform == TCL_PLATFORM_UNIX) {
		goto __22
	}
	linkObj = XTcl_FSLink(tls, retVal, uintptr(0), 0)

	// Safety check in case driver caused sharing
	if !((*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount > 1) {
		goto __23
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount, 1) > 1) {
		goto __24
	}
	goto __25
__24:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(retVal)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(retVal)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __26
	}

	if !((*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes != XtclEmptyStringRep) {
		goto __28
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes)
__28:
	;
	(*Tcl_Obj)(unsafe.Pointer(retVal)).Flength = -1
__29:
	;
	*(*uintptr)(unsafe.Pointer(retVal + 32)) = XtclFreeObjList
	XtclFreeObjList = retVal
	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
	goto __27
__26:
	XTclFreeObj(tls, retVal)
__27:
	;
__25:
	;

	retVal = XTcl_DuplicateObj(tls, retVal)
	(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount++
__23:
	;

	if !(linkObj != uintptr(0)) {
		goto __32
	}
	// Got a link. Need to check if the link is relative
	// or absolute, for those platforms where relative
	// links exist.

	if !(XtclPlatform != TCL_PLATFORM_WINDOWS &&
		XTcl_FSGetPathType(tls, linkObj) ==
			TCL_PATH_RELATIVE) {
		goto __34
	}
	// We need to follow this link which is relative
	// to retVal's directory. This means concatenating
	// the link onto the directory of the path so far.

	path2 =
		XTcl_GetStringFromObj(tls, retVal, bp+4)

__36:
	if !(libc.PreDecInt32(&*(*int32)(unsafe.Pointer(bp + 4)), 1) >= 0) {
		goto __37
	}
	if !(sIsSeparatorOrNull(tls, int32(*(*int8)(unsafe.Pointer(path2 + uintptr(*(*int32)(unsafe.Pointer(bp + 4))))))) != 0) {
		goto __38
	}
	goto __37
__38:
	;
	goto __36
__37:
	;

	// We want the trailing slash.

	XTcl_SetObjLength(tls, retVal, *(*int32)(unsafe.Pointer(bp + 4))+1)
	XTcl_AppendObjToObj(tls, retVal, linkObj)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(linkObj)).FrefCount, 1) > 1) {
		goto __39
	}
	goto __40
__39:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(linkObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(linkObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __41
	}

	if !((*Tcl_Obj)(unsafe.Pointer(linkObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(linkObj)).Fbytes != XtclEmptyStringRep) {
		goto __43
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(linkObj)).Fbytes)
__43:
	;
	(*Tcl_Obj)(unsafe.Pointer(linkObj)).Flength = -1
__44:
	;
	*(*uintptr)(unsafe.Pointer(linkObj + 32)) = XtclFreeObjList
	XtclFreeObjList = linkObj
	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
	goto __42
__41:
	XTclFreeObj(tls, linkObj)
__42:
	;
__40:
	;

	linkStr = XTcl_GetStringFromObj(tls, retVal, bp+4)
	goto __35
__34:
	// Absolute link.

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount, 1) > 1) {
		goto __47
	}
	goto __48
__47:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(retVal)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(retVal)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __49
	}

	if !((*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes != XtclEmptyStringRep) {
		goto __51
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes)
__51:
	;
	(*Tcl_Obj)(unsafe.Pointer(retVal)).Flength = -1
__52:
	;
	*(*uintptr)(unsafe.Pointer(retVal + 32)) = XtclFreeObjList
	XtclFreeObjList = retVal
	goto __53
__53:
	if 0 != 0 {
		goto __52
	}
	goto __54
__54:
	;
	goto __50
__49:
	XTclFreeObj(tls, retVal)
__50:
	;
__48:
	;

	if !((*Tcl_Obj)(unsafe.Pointer(linkObj)).FrefCount > 1) {
		goto __55
	}
	retVal = XTcl_DuplicateObj(tls, linkObj)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(linkObj)).FrefCount, 1) > 1) {
		goto __57
	}
	goto __58
__57:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(linkObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(linkObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __59
	}

	if !((*Tcl_Obj)(unsafe.Pointer(linkObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(linkObj)).Fbytes != XtclEmptyStringRep) {
		goto __61
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(linkObj)).Fbytes)
__61:
	;
	(*Tcl_Obj)(unsafe.Pointer(linkObj)).Flength = -1
__62:
	;
	*(*uintptr)(unsafe.Pointer(linkObj + 32)) = XtclFreeObjList
	XtclFreeObjList = linkObj
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
	goto __60
__59:
	XTclFreeObj(tls, linkObj)
__60:
	;
__58:
	;

	goto __56
__55:
	retVal = linkObj
__56:
	;
	linkStr = XTcl_GetStringFromObj(tls, retVal, bp+4)

	// Convert to forward-slashes on windows.

	if !(XtclPlatform == TCL_PLATFORM_WINDOWS) {
		goto __65
	}

	i = 0
__66:
	if !(i < *(*int32)(unsafe.Pointer(bp + 4))) {
		goto __68
	}
	if !(int32(*(*int8)(unsafe.Pointer(linkStr + uintptr(i)))) == '\\') {
		goto __69
	}
	*(*int8)(unsafe.Pointer(linkStr + uintptr(i))) = int8('/')
__69:
	;
	goto __67
__67:
	i++
	goto __66
	goto __68
__68:
	;
__65:
	;
__35:
	;
	goto __33
__32:
	linkStr = XTcl_GetStringFromObj(tls, retVal, bp+4)
__33:
	;

	// Either way, we now remove the last path element (but
	// not the first character of the path).

__70:
	if !(libc.PreDecInt32(&*(*int32)(unsafe.Pointer(bp + 4)), 1) >= 0) {
		goto __71
	}
	if !(sIsSeparatorOrNull(tls, int32(*(*int8)(unsafe.Pointer(linkStr + uintptr(*(*int32)(unsafe.Pointer(bp + 4))))))) != 0) {
		goto __72
	}
	if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) {
		goto __73
	}
	XTcl_SetObjLength(tls, retVal, *(*int32)(unsafe.Pointer(bp + 4 /* curLen1 */)))
	goto __74
__73:
	XTcl_SetObjLength(tls, retVal, 1)
__74:
	;
	goto __71
__72:
	;
	goto __70
__71:
	;
__22:
	;
	dirSep += uintptr(3)
	oldDirSep = dirSep

	if !(*(*int32)(unsafe.Pointer(bp + 4)) == 0 && int32(*(*int8)(unsafe.Pointer(dirSep))) != 0) {
		goto __75
	}
	XTcl_SetObjLength(tls, retVal, 0)
__75:
	;

	if !(int32(*(*int8)(unsafe.Pointer(dirSep))) != 0 && int32(*(*int8)(unsafe.Pointer(dirSep + 1))) == '.') {
		goto __76
	}
	goto again
__76:
	;
	goto __8
__19:
	;
__13:
	;
	first = 0
	if !(retVal != uintptr(0)) {
		goto __77
	}
	XTcl_AppendToObj(tls, retVal, oldDirSep, int32((int64(dirSep)-int64(oldDirSep))/1))
__77:
	;
	goto __8
__9:
	;

	// If we didn't make any changes, just use the input path.

	if !(retVal == uintptr(0)) {
		goto __78
	}
	retVal = pathPtr
	(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount++

	if !((*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount > 1) {
		goto __79
	}
	// Unfortunately, the platform-specific normalization code which
	// will be called below has no way of dealing with the case where
	// an object is shared. It is expecting to modify an object in
	// place. So, we must duplicate this here to ensure an object with
	// a single ref-count.
	//
	// If that changes in the future (e.g. the normalize proc is given
	// one object and is able to return a different one), then we
	// could remove this code.

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount, 1) > 1) {
		goto __80
	}
	goto __81
__80:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(retVal)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(retVal)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __82
	}

	if !((*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes != XtclEmptyStringRep) {
		goto __84
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes)
__84:
	;
	(*Tcl_Obj)(unsafe.Pointer(retVal)).Flength = -1
__85:
	;
	*(*uintptr)(unsafe.Pointer(retVal + 32)) = XtclFreeObjList
	XtclFreeObjList = retVal
	goto __86
__86:
	if 0 != 0 {
		goto __85
	}
	goto __87
__87:
	;
	goto __83
__82:
	XTclFreeObj(tls, retVal)
__83:
	;
__81:
	;

	retVal = XTcl_DuplicateObj(tls, pathPtr)
	(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount++
__79:
	;
__78:
	;

	// Ensure a windows drive like C:/ has a trailing separator.

	if !(XtclPlatform == TCL_PLATFORM_WINDOWS) {
		goto __88
	}
	path3 = XTcl_GetStringFromObj(tls, retVal, bp+8)

	if !(*(*int32)(unsafe.Pointer(bp + 8)) == 2 && int32(*(*int8)(unsafe.Pointer(path3))) != 0 && int32(*(*int8)(unsafe.Pointer(path3 + 1))) == ':') {
		goto __89
	}
	if !((*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount > 1) {
		goto __90
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount, 1) > 1) {
		goto __91
	}
	goto __92
__91:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(retVal)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(retVal)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __93
	}

	if !((*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes != XtclEmptyStringRep) {
		goto __95
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(retVal)).Fbytes)
__95:
	;
	(*Tcl_Obj)(unsafe.Pointer(retVal)).Flength = -1
__96:
	;
	*(*uintptr)(unsafe.Pointer(retVal + 32)) = XtclFreeObjList
	XtclFreeObjList = retVal
	goto __97
__97:
	if 0 != 0 {
		goto __96
	}
	goto __98
__98:
	;
	goto __94
__93:
	XTclFreeObj(tls, retVal)
__94:
	;
__92:
	;

	retVal = XTcl_DuplicateObj(tls, retVal)
	(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount++
__90:
	;
	XTcl_AppendToObj(tls, retVal, ts+6377, 1)
__89:
	;
__88:
	;

	// Now we have an absolute path, with no '..', '.' sequences, but it still
	// may not be in 'unique' form, depending on the platform. For instance,
	// Unix is case-sensitive, so the path is ok. Windows is case-insensitive,
	// and also has the weird 'longname/shortname' thing (e.g. C:/Program
	// Files/ and C:/Progra~1/ are equivalent).
	//
	// Virtual file systems which may be registered may have other criteria
	// for normalizing a path.

	XTclFSNormalizeToUniquePath(tls, interp, retVal, 0)

	// Since we know it is a normalized path, we can actually convert this
	// object into an FsPath for greater efficiency

	sMakePathFromNormalized(tls, interp, retVal)

	// This has a refCount of 1 for the caller, unlike many Tcl_Obj APIs.

	return retVal
}

//----------------------------------------------------------------------
//
// Tcl_FSGetPathType --
//
//	Determines whether a given path is relative to the current directory,
//	relative to the current volume, or absolute.
//
// Results:
//	Returns one of TCL_PATH_ABSOLUTE, TCL_PATH_RELATIVE, or
//	TCL_PATH_VOLUME_RELATIVE.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FSGetPathType(tls *libc.TLS, pathPtr uintptr) Tcl_PathType { /* tclPathObj.c:466:1: */
	return XTclFSGetPathType(tls, pathPtr, uintptr(0), uintptr(0))
}

//----------------------------------------------------------------------
//
// TclFSGetPathType --
//
//	Determines whether a given path is relative to the current directory,
//	relative to the current volume, or absolute. If the caller wishes to
//	know which filesystem claimed the path (in the case for which the path
//	is absolute), then a reference to a filesystem pointer can be passed
//	in (but passing NULL is acceptable).
//
// Results:
//	Returns one of TCL_PATH_ABSOLUTE, TCL_PATH_RELATIVE, or
//	TCL_PATH_VOLUME_RELATIVE. The filesystem reference will be set if and
//	only if it is non-NULL and the function's return value is
//	TCL_PATH_ABSOLUTE.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFSGetPathType(tls *libc.TLS, pathPtr uintptr, filesystemPtrPtr uintptr, driveNameLengthPtr uintptr) Tcl_PathType { /* tclPathObj.c:496:1: */
	var fsPathPtr uintptr

	if XTcl_FSConvertToPathType(tls, uintptr(0), pathPtr) != TCL_OK {
		return XTclGetPathType(tls, pathPtr, filesystemPtrPtr, driveNameLengthPtr,
			uintptr(0))
	}

	fsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))
	if (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr == uintptr(0) {
		return XTclGetPathType(tls, pathPtr, filesystemPtrPtr, driveNameLengthPtr,
			uintptr(0))
	}

	if (*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags == 0 {
		// The path is not absolute...
		// ... on Windows we must make another call to determine whether
		// it's relative or volumerelative [Bug 2571597].
		return XTclGetPathType(tls, pathPtr, filesystemPtrPtr, driveNameLengthPtr,
			uintptr(0))
	}
	return XTclFSGetPathType(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr, filesystemPtrPtr,
		driveNameLengthPtr)
}

//---------------------------------------------------------------------------
//
// TclPathPart
//
//	This function calculates the requested part of the given path, which
//	can be:
//
//	- the directory above ('file dirname')
//	- the tail            ('file tail')
//	- the extension       ('file extension')
//	- the root            ('file root')
//
//	The 'portion' parameter dictates which of these to calculate. There
//	are a number of special cases both to be more efficient, and because
//	the behaviour when given a path with only a single element is defined
//	to require the expansion of that single element, where possible.
//
//	Should look into integrating 'FileBasename' in tclFCmd.c into this
//	function.
//
// Results:
//	NULL if an error occurred, otherwise a Tcl_Obj owned by the caller
//	(i.e. most likely with refCount 1).
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclPathPart(tls *libc.TLS, interp uintptr, pathPtr uintptr, portion Tcl_PathPart) uintptr { /* tclPathObj.c:561:9: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// Check if the joined-on bit has any directory delimiters in
	// it. If so, the 'dirname' would be a joining of the main
	// part with the dirname of the joined-on bit. We could handle
	// that special case here, but we don't, and instead just use
	// the standardPath code.

	// var numBytes int32 at bp, 4

	var rest uintptr
	// Check if the joined-on bit has any directory delimiters in
	// it. If so, the 'tail' would be only the part following the
	// last delimiter. We could handle that special case here, but
	// we don't, and instead just use the standardPath code.

	// var numBytes1 int32 at bp+4, 4

	var rest1 uintptr
	// Need to return the whole path with the extension
	// suffix removed.  Do that by joining our "head" to
	// our "tail" with the extension suffix removed from
	// the tail.

	var resultPtr uintptr
	var fileName uintptr
	var extension uintptr
	// var length int32 at bp+8, 4

	var fsPathPtr uintptr
	var root uintptr
	// var length1 int32 at bp+12, 4

	var fileName1 uintptr
	var extension1 uintptr
	var norm uintptr
	// var splitElements int32 at bp+16, 4

	var splitPtr uintptr
	// var resultPtr1 uintptr at bp+24, 8

	if !((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr == uintptr(unsafe.Pointer(&tclFsPathType))) {
		goto __1
	}
	fsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))

	if !((*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags != 0) {
		goto __3
	}
	switch portion {
	case TCL_PATH_DIRNAME:
		goto __6
	case TCL_PATH_TAIL:
		goto __7
	case TCL_PATH_EXTENSION:
		goto __8
	case TCL_PATH_ROOT:
		goto __9
	default:
		goto __10
	}
	goto __5
__6:
	rest =
		XTcl_GetStringFromObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr, bp)

	if !(libc.Xstrchr(tls, rest, '/') != uintptr(0)) {
		goto __11
	}
	goto standardPath
__11:
	;
	// If the joined-on bit is empty, then [file dirname] is
	// documented to return all but the last non-empty element
	// of the path, so we need to split apart the main part to
	// get the right answer.  We could do that here, but it's
	// simpler to fall back to the standardPath code.
	// [Bug 2710920]
	if !(*(*int32)(unsafe.Pointer(bp)) == 0) {
		goto __12
	}
	goto standardPath
__12:
	;
	if !(XtclPlatform == TCL_PLATFORM_WINDOWS &&
		libc.Xstrchr(tls, rest, '\\') != uintptr(0)) {
		goto __13
	}
	goto standardPath
__13:
	;

	// The joined-on path is simple, so we can just return here.

	(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).FrefCount++
	return (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr

__7:
	rest1 =
		XTcl_GetStringFromObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr, bp+4)

	if !(libc.Xstrchr(tls, rest1, '/') != uintptr(0)) {
		goto __14
	}
	goto standardPath
__14:
	;
	// If the joined-on bit is empty, then [file tail] is
	// documented to return the last non-empty element
	// of the path, so we need to split off the last element
	// of the main part to get the right answer.  We could do
	// that here, but it's simpler to fall back to the
	// standardPath code.  [Bug 2710920]
	if !(*(*int32)(unsafe.Pointer(bp + 4)) == 0) {
		goto __15
	}
	goto standardPath
__15:
	;
	if !(XtclPlatform == TCL_PLATFORM_WINDOWS &&
		libc.Xstrchr(tls, rest1, '\\') != uintptr(0)) {
		goto __16
	}
	goto standardPath
__16:
	;
	(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FrefCount++
	return (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr

__8:
	return sGetExtension(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)
__9:

	fileName = XTcl_GetStringFromObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr,
		bp+8)
	extension = XTclGetExtension(tls, fileName)
	if !(extension == uintptr(0)) {
		goto __17
	}
	// There is no extension so the root is the same as the
	// path we were given.

	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount++
	return pathPtr
	goto __18
__17:
	// Need to return the whole path with the extension
	// suffix removed.  Do that by joining our "head" to
	// our "tail" with the extension suffix removed from
	// the tail.

	resultPtr =
		XTclNewFSPathObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr, fileName,
			int32(Size_t(*(*int32)(unsafe.Pointer(bp + 8)))-libc.Xstrlen(tls, extension)))

	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	return resultPtr
__18:
	;

__10:
	// We should never get here
	XTcl_Panic(tls, ts+55204, 0)
	// For less clever compilers
	return uintptr(0)
__5:
	;
	goto __4
__3:
	if !((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr != uintptr(0)) {
		goto __19
	}
	// Relative path
	goto standardPath
	goto __20
__19:
	// Absolute path
	goto standardPath
__20:
	;
__4:
	;
	goto __2
__1:

standardPath:
	*(*uintptr)(unsafe.Pointer(bp + 24 /* resultPtr1 */)) = uintptr(0)
	if !(portion == TCL_PATH_EXTENSION) {
		goto __21
	}
	return sGetExtension(tls, pathPtr)
	goto __22
__21:
	if !(portion == TCL_PATH_ROOT) {
		goto __23
	}

	fileName1 = XTcl_GetStringFromObj(tls, pathPtr, bp+12)
	extension1 = XTclGetExtension(tls, fileName1)
	if !(extension1 == uintptr(0)) {
		goto __24
	}
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount++
	return pathPtr
	goto __25
__24:
	root = XTcl_NewStringObj(tls, fileName1,
		int32(Size_t(*(*int32)(unsafe.Pointer(bp + 12)))-libc.Xstrlen(tls, extension1)))

	(*Tcl_Obj)(unsafe.Pointer(root)).FrefCount++
	return root
__25:
	;
__23:
	;
__22:
	;

	// The behaviour we want here is slightly different to the standard
	// Tcl_FSSplitPath in the handling of home directories;
	// Tcl_FSSplitPath preserves the "~" while this code computes the
	// actual full path name, if we had just a single component.

	splitPtr = XTcl_FSSplitPath(tls, pathPtr, bp+16)
	(*Tcl_Obj)(unsafe.Pointer(splitPtr)).FrefCount++
	if !(*(*int32)(unsafe.Pointer(bp + 16)) == 1 && int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
		}
		return XTcl_GetString(tls, pathPtr)
	}()))) == '~') {
		goto __26
	}

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(splitPtr)).FrefCount, 1) > 1) {
		goto __27
	}
	goto __28
__27:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(splitPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(splitPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __29
	}

	if !((*Tcl_Obj)(unsafe.Pointer(splitPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(splitPtr)).Fbytes != XtclEmptyStringRep) {
		goto __31
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(splitPtr)).Fbytes)
__31:
	;
	(*Tcl_Obj)(unsafe.Pointer(splitPtr)).Flength = -1
__32:
	;
	*(*uintptr)(unsafe.Pointer(splitPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = splitPtr
	goto __33
__33:
	if 0 != 0 {
		goto __32
	}
	goto __34
__34:
	;
	goto __30
__29:
	XTclFreeObj(tls, splitPtr)
__30:
	;
__28:
	;

	norm = XTcl_FSGetNormalizedPath(tls, interp, pathPtr)
	if !(norm == uintptr(0)) {
		goto __35
	}
	return uintptr(0)
__35:
	;
	splitPtr = XTcl_FSSplitPath(tls, norm, bp+16)
	(*Tcl_Obj)(unsafe.Pointer(splitPtr)).FrefCount++
__26:
	;
	if !(portion == TCL_PATH_TAIL) {
		goto __36
	}
	// Return the last component, unless it is the only component, and
	// it is the root of an absolute path.

	if !(*(*int32)(unsafe.Pointer(bp + 16)) > 0 && (*(*int32)(unsafe.Pointer(bp + 16)) > 1 || XTcl_FSGetPathType(tls, pathPtr) == TCL_PATH_RELATIVE)) {
		goto __38
	}
	XTcl_ListObjIndex(tls, uintptr(0), splitPtr, *(*int32)(unsafe.Pointer(bp + 16))-1, bp+24)
	goto __39
__38:
	*(*uintptr)(unsafe.Pointer(bp + 24 /* resultPtr1 */)) = XTcl_NewObj(tls)
__39:
	;
	goto __37
__36:
	// Return all but the last component. If there is only one
	// component, return it if the path was non-relative, otherwise
	// return the current directory.

	if !(*(*int32)(unsafe.Pointer(bp + 16)) > 1) {
		goto __40
	}
	*(*uintptr)(unsafe.Pointer(bp + 24 /* resultPtr1 */)) = XTcl_FSJoinPath(tls, splitPtr, *(*int32)(unsafe.Pointer(bp + 16))-1)
	goto __41
__40:
	if !(*(*int32)(unsafe.Pointer(bp + 16)) == 0 || XTcl_FSGetPathType(tls, pathPtr) == TCL_PATH_RELATIVE) {
		goto __42
	}
__44:
	;
__47:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __50
	}
	XTclAllocateFreeObjects(tls)
__50:
	;
	*(*uintptr)(unsafe.Pointer(bp + 24)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __48
__48:
	if 0 != 0 {
		goto __47
	}
	goto __49
__49:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)) == 0) {
		goto __51
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Flength = 0
	goto __52
__51:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fbytes, ts+32094, uint64(int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fbytes + 1)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Flength = int32(uint64(unsafe.Sizeof([2]int8{})) - uint64(1))
__52:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).FtypePtr = uintptr(0)

	goto __45
__45:
	if 0 != 0 {
		goto __44
	}
	goto __46
__46:
	;
	goto __43
__42:
	XTcl_ListObjIndex(tls, uintptr(0), splitPtr, 0, bp+24)
__43:
	;
__41:
	;
__37:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).FrefCount++
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(splitPtr)).FrefCount, 1) > 1) {
		goto __53
	}
	goto __54
__53:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(splitPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(splitPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __55
	}

	if !((*Tcl_Obj)(unsafe.Pointer(splitPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(splitPtr)).Fbytes != XtclEmptyStringRep) {
		goto __57
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(splitPtr)).Fbytes)
__57:
	;
	(*Tcl_Obj)(unsafe.Pointer(splitPtr)).Flength = -1
__58:
	;
	*(*uintptr)(unsafe.Pointer(splitPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = splitPtr
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
	goto __56
__55:
	XTclFreeObj(tls, splitPtr)
__56:
	;
__54:
	;

	return *(*uintptr)(unsafe.Pointer(bp + 24 /* resultPtr1 */))
__2:
	;
	return uintptr(0)
}

// Simple helper function

func sGetExtension(tls *libc.TLS, pathPtr uintptr) uintptr { /* tclPathObj.c:774:16: */
	var tail uintptr
	var extension uintptr
	var ret uintptr

	tail = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
		}
		return XTcl_GetString(tls, pathPtr)
	}()
	extension = XTclGetExtension(tls, tail)
	if extension == uintptr(0) {
		ret = XTcl_NewObj(tls)
	} else {
		ret = XTcl_NewStringObj(tls, extension, -1)
	}
	(*Tcl_Obj)(unsafe.Pointer(ret)).FrefCount++
	return ret
}

//---------------------------------------------------------------------------
//
// Tcl_FSJoinPath --
//
//	This function takes the given Tcl_Obj, which should be a valid list,
//	and returns the path object given by considering the first 'elements'
//	elements as valid path segments (each path segment may be a complete
//	path, a partial path or just a single possible directory or file
//	name). If any path segment is actually an absolute path, then all
//	prior path segments are discarded.
//
//	If elements < 0, we use the entire list that was given.
//
//	It is possible that the returned object is actually an element of the
//	given list, so the caller should be careful to store a refCount to it
//	before freeing the list.
//
// Results:
//	Returns object with refCount of zero, (or if non-zero, it has
//	references elsewhere in Tcl). Either way, the caller must increment
//	its refCount before use. Note that in the case where the caller has
//	asked to join zero elements of the list, the return value will be an
//	empty-string Tcl_Obj.
//
//	If the given listObj was invalid, then the calling routine has a bug,
//	and this function will just return NULL.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_FSJoinPath(tls *libc.TLS, listObj uintptr, elements int32) uintptr { /* tclPathObj.c:826:9: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var res uintptr
	// var objc int32 at bp, 4

	// var objv uintptr at bp+8, 8

	if XTcl_ListObjLength(tls, uintptr(0), listObj, bp) != TCL_OK {
		return uintptr(0)
	}

	if elements >= 0 && elements <= *(*int32)(unsafe.Pointer(bp)) {
		elements = elements
	} else {
		elements = *(*int32)(unsafe.Pointer(bp /* objc */))
	}
	XTcl_ListObjGetElements(tls, uintptr(0), listObj, bp, bp+8)
	res = XTclJoinPath(tls, elements, *(*uintptr)(unsafe.Pointer(bp + 8 /* objv */)), 0)
	return res
}

func XTclJoinPath(tls *libc.TLS, elements int32, objv uintptr, forceRelative int32) uintptr { /* tclPathObj.c:846:9: */
	bp := tls.Alloc(37)
	defer tls.Free(37)

	var res uintptr
	var i int32
	// var fsPtr uintptr at bp+8, 8

	var str uintptr
	// var len int32 at bp, 4

	var str1 uintptr
	var tailObj uintptr
	var type1 Tcl_PathType
	var elt uintptr
	var _objPtr uintptr
	var _objPtr1 uintptr
	var sep uintptr
	// var separator int8 at bp+36, 1

	var needsSep int32
	// var driveNameLength int32 at bp+16, 4

	// var strEltLen int32 at bp+4, 4

	// var length int32 at bp+32, 4

	var type2 Tcl_PathType
	var strElt uintptr
	var ptr uintptr
	// var driveName uintptr at bp+24, 8

	var elt1 uintptr
	res = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 8 /* fsPtr */)) = uintptr(0)

	if !(elements == 0) {
		goto __1
	}
	return XTcl_NewObj(tls)
__1:
	;

	if !(elements == 2) {
		goto __2
	}
	elt = *(*uintptr)(unsafe.Pointer(objv))

	// This is a special case where we can be much more efficient, where
	// we are joining a single relative path onto an object that is
	// already of path type. The 'TclNewFSPathObj' call below creates an
	// object which can be normalized more efficiently. Currently we only
	// use the special case when we have exactly two elements, but we
	// could expand that in the future.
	//
	// Bugfix [a47641a0]. TclNewFSPathObj requires first argument
	// to be an absolute path. Added a check for that elt is absolute.

	if !((*Tcl_Obj)(unsafe.Pointer(elt)).FtypePtr == uintptr(unsafe.Pointer(&tclFsPathType)) &&
		!((*Tcl_Obj)(unsafe.Pointer(elt)).Fbytes != uintptr(0) && int32(*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(elt)).Fbytes))) == 0) &&
		XTclGetPathType(tls, elt, uintptr(0), uintptr(0), uintptr(0)) == TCL_PATH_ABSOLUTE) {
		goto __3
	}
	tailObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))

	// if forceRelative - second path is relative
	if forceRelative != 0 {
		type1 = TCL_PATH_RELATIVE
	} else {
		type1 = XTclGetPathType(tls, tailObj, uintptr(0), uintptr(0), uintptr(0))
	}
	if !(type1 == TCL_PATH_RELATIVE) {
		goto __4
	}

	str = XTcl_GetStringFromObj(tls, tailObj, bp)
	if !(*(*int32)(unsafe.Pointer(bp)) == 0) {
		goto __6
	}
	// This happens if we try to handle the root volume '/'.
	// There's no need to return a special path object, when
	// the base itself is just fine!

	return elt
__6:
	;

	// If it doesn't begin with '.' and is a unix path or it a
	// windows path without backslashes, then we can be very
	// efficient here. (In fact even a windows path with
	// backslashes can be joined efficiently, but the path object
	// would not have forward slashes only, and this would
	// therefore contradict our 'file join' documentation).

	if !(int32(*(*int8)(unsafe.Pointer(str))) != '.' && (XtclPlatform != TCL_PLATFORM_WINDOWS ||
		libc.Xstrchr(tls, str, '\\') == uintptr(0))) {
		goto __7
	}
	// Finally, on Windows, 'file join' is defined to convert
	// all backslashes to forward slashes, so the base part
	// cannot have backslashes either.

	if !(XtclPlatform != TCL_PLATFORM_WINDOWS ||
		libc.Xstrchr(tls, XTcl_GetString(tls, elt), '\\') == uintptr(0)) {
		goto __8
	}

	if !((*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elt + 32)))).Fflags != 0) {
		goto __9
	}
	return XTclNewFSPathObj(tls, elt, str, *(*int32)(unsafe.Pointer(bp /* len */)))
__9:
	;
	if !(TCL_PATH_ABSOLUTE != XTcl_FSGetPathType(tls, elt)) {
		goto __10
	}
	return XTclNewFSPathObj(tls, elt, str, *(*int32)(unsafe.Pointer(bp /* len */)))
__10:
	;
	XTcl_FSGetNormalizedPath(tls, uintptr(0), elt)
	if !(elt == (*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(elt + 32)))).FnormPathPtr) {
		goto __11
	}
	return XTclNewFSPathObj(tls, elt, str, *(*int32)(unsafe.Pointer(bp /* len */)))
__11:
	;
__8:
	;
__7:
	;

	// Otherwise we don't have an easy join, and we must let the
	// more general code below handle things.
	goto __5
__4:
	if !(XtclPlatform == TCL_PLATFORM_UNIX) {
		goto __12
	}
	return tailObj
	goto __13
__12:
	str1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(tailObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(tailObj)).Fbytes
		}
		return XTcl_GetString(tls, tailObj)
	}()

	if !(XtclPlatform == TCL_PLATFORM_WINDOWS) {
		goto __14
	}
	if !(libc.Xstrchr(tls, str1, '\\') == uintptr(0)) {
		goto __15
	}
	return tailObj
__15:
	;
__14:
	;
__13:
	;
__5:
	;
__3:
	;
__2:
	;

	i = 0
__16:
	if !(i < elements) {
		goto __18
	}
	*(*uintptr)(unsafe.Pointer(bp + 24 /* driveName */)) = uintptr(0)
	elt1 = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))

	strElt = XTcl_GetStringFromObj(tls, elt1, bp+4)
	*(*int32)(unsafe.Pointer(bp + 16 /* driveNameLength */)) = 0
	// if forceRelative - all paths excepting first one are relative
	if forceRelative != 0 && i > 0 {
		type2 = TCL_PATH_RELATIVE
	} else {
		type2 = XTclGetPathType(tls, elt1, bp+8, bp+16, bp+24)
	}
	if !(type2 != TCL_PATH_RELATIVE) {
		goto __19
	}
	// Zero out the current result.

	if !(res != uintptr(0)) {
		goto __21
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(res)).FrefCount, 1) > 1) {
		goto __22
	}
	goto __23
__22:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(res)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(res)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __24
	}

	if !((*Tcl_Obj)(unsafe.Pointer(res)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(res)).Fbytes != XtclEmptyStringRep) {
		goto __26
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(res)).Fbytes)
__26:
	;
	(*Tcl_Obj)(unsafe.Pointer(res)).Flength = -1
__27:
	;
	*(*uintptr)(unsafe.Pointer(res + 32)) = XtclFreeObjList
	XtclFreeObjList = res
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
	goto __25
__24:
	XTclFreeObj(tls, res)
__25:
	;
__23:
	;

__21:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp + 24)) != uintptr(0)) {
		goto __30
	}
	// We've been given a separate drive-name object, because the
	// prefix in 'elt' is not in a suitable format for us (e.g. it
	// may contain irrelevant multiple separators, like
	// C://///foo).

	res = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* driveName */)))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).FrefCount, 1) > 1) {
		goto __32
	}
	goto __33
__32:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __34
	}

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fbytes != XtclEmptyStringRep) {
		goto __36
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fbytes)
__36:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Flength = -1
__37:
	;
	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)) + 32)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 24))
	goto __38
__38:
	if 0 != 0 {
		goto __37
	}
	goto __39
__39:
	;
	goto __35
__34:
	XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* driveName */)))
__35:
	;
__33:
	;

	// Do not set driveName to NULL, because we will check its
	// value below (but we won't access the contents, since those
	// have been cleaned-up).
	goto __31
__30:
	res = XTcl_NewStringObj(tls, strElt, *(*int32)(unsafe.Pointer(bp + 16 /* driveNameLength */)))
__31:
	;
	strElt += uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* driveNameLength */)))
	goto __20
__19:
	if !(*(*uintptr)(unsafe.Pointer(bp + 24)) != uintptr(0)) {
		goto __40
	}
__41:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp + 24))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __44
	}
	XTclFreeObj(tls, _objPtr)
__44:
	;
	goto __42
__42:
	if 0 != 0 {
		goto __41
	}
	goto __43
__43:
	;
__40:
	;
__20:
	;

	// Optimisation block: if this is the last element to be examined, and
	// it is absolute or the only element, and the drive-prefix was ok (if
	// there is one), it might be that the path is already in a suitable
	// form to be returned. Then we can short-cut the rest of this
	// function.

	if !(*(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) && i == elements-1 &&
		(type2 != TCL_PATH_RELATIVE || res == uintptr(0))) {
		goto __45
	}
	// It's the last path segment. Perform a quick check if the path
	// is already in a suitable form.

	if !(XtclPlatform == TCL_PLATFORM_WINDOWS) {
		goto __46
	}
	if !(libc.Xstrchr(tls, strElt, '\\') != uintptr(0)) {
		goto __47
	}
	goto noQuickReturn
__47:
	;
__46:
	;
	ptr = strElt
	// [Bug f34cf83dd0]
	if !(*(*int32)(unsafe.Pointer(bp + 16)) > 0) {
		goto __48
	}
	if !(int32(*(*int8)(unsafe.Pointer(ptr))) == '/' && int32(*(*int8)(unsafe.Pointer(ptr + libc.UintptrFromInt32(-1)))) == '/') {
		goto __49
	}
	goto noQuickReturn
__49:
	;
__48:
	;
__50:
	if !(int32(*(*int8)(unsafe.Pointer(ptr))) != 0) {
		goto __51
	}
	if !(int32(*(*int8)(unsafe.Pointer(ptr))) == '/' && (int32(*(*int8)(unsafe.Pointer(ptr + 1))) == '/' || int32(*(*int8)(unsafe.Pointer(ptr + 1))) == 0)) {
		goto __52
	}
	// We have a repeated file separator, which means the path
	// is not in normalized form

	goto noQuickReturn
__52:
	;
	ptr++
	goto __50
__51:
	;
	if !(res != uintptr(0)) {
		goto __53
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(res)).FrefCount, 1) > 1) {
		goto __54
	}
	goto __55
__54:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(res)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(res)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __56
	}

	if !((*Tcl_Obj)(unsafe.Pointer(res)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(res)).Fbytes != XtclEmptyStringRep) {
		goto __58
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(res)).Fbytes)
__58:
	;
	(*Tcl_Obj)(unsafe.Pointer(res)).Flength = -1
__59:
	;
	*(*uintptr)(unsafe.Pointer(res + 32)) = XtclFreeObjList
	XtclFreeObjList = res
	goto __60
__60:
	if 0 != 0 {
		goto __59
	}
	goto __61
__61:
	;
	goto __57
__56:
	XTclFreeObj(tls, res)
__57:
	;
__55:
	;

__53:
	;

	// This element is just what we want to return already; no further
	// manipulation is requred.

	return elt1
__45:
	;

	// The path element was not of a suitable form to be returned as is.
	// We need to perform a more complex operation here.

noQuickReturn:
	if !(res == uintptr(0)) {
		goto __62
	}
	res = XTcl_NewObj(tls)
	ptr = XTcl_GetStringFromObj(tls, res, bp+32)
	goto __63
__62:
	ptr = XTcl_GetStringFromObj(tls, res, bp+32)
__63:
	;

	// Strip off any './' before a tilde, unless this is the beginning of
	// the path.

	if !(*(*int32)(unsafe.Pointer(bp + 32)) > 0 && *(*int32)(unsafe.Pointer(bp + 4)) > 0 && int32(*(*int8)(unsafe.Pointer(strElt))) == '.' && int32(*(*int8)(unsafe.Pointer(strElt + 1))) == '/' && int32(*(*int8)(unsafe.Pointer(strElt + 2))) == '~') {
		goto __64
	}
	strElt += uintptr(2)
__64:
	;

	// A NULL value for fsPtr at this stage basically means we're trying
	// to join a relative path onto something which is also relative (or
	// empty). There's nothing particularly wrong with that.

	if !(int32(*(*int8)(unsafe.Pointer(strElt))) == 0) {
		goto __65
	}
	goto __17
__65:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(unsafe.Pointer(&XtclNativeFilesystem)) || *(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0)) {
		goto __66
	}
	XTclpNativeJoinPath(tls, res, strElt)
	goto __67
__66:
	*(*int8)(unsafe.Pointer(bp + 36 /* separator */)) = int8('/')
	needsSep = 0

	if !((*Tcl_Filesystem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FfilesystemSeparatorProc != uintptr(0)) {
		goto __68
	}
	sep = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* fsPtr */)))).FfilesystemSeparatorProc})).f(tls, res)

	if !(sep != uintptr(0)) {
		goto __69
	}
	*(*int8)(unsafe.Pointer(bp + 36 /* separator */)) = *(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(sep)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(sep)).Fbytes
		}
		return XTcl_GetString(tls, sep)
	}()))
__70:
	_objPtr1 = sep
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __73
	}
	XTclFreeObj(tls, _objPtr1)
__73:
	;
	goto __71
__71:
	if 0 != 0 {
		goto __70
	}
	goto __72
__72:
	;
__69:
	;
	// Safety check in case the VFS driver caused sharing
	if !((*Tcl_Obj)(unsafe.Pointer(res)).FrefCount > 1) {
		goto __74
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(res)).FrefCount, 1) > 1) {
		goto __75
	}
	goto __76
__75:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(res)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(res)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __77
	}

	if !((*Tcl_Obj)(unsafe.Pointer(res)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(res)).Fbytes != XtclEmptyStringRep) {
		goto __79
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(res)).Fbytes)
__79:
	;
	(*Tcl_Obj)(unsafe.Pointer(res)).Flength = -1
__80:
	;
	*(*uintptr)(unsafe.Pointer(res + 32)) = XtclFreeObjList
	XtclFreeObjList = res
	goto __81
__81:
	if 0 != 0 {
		goto __80
	}
	goto __82
__82:
	;
	goto __78
__77:
	XTclFreeObj(tls, res)
__78:
	;
__76:
	;

	res = XTcl_DuplicateObj(tls, res)
	(*Tcl_Obj)(unsafe.Pointer(res)).FrefCount++
__74:
	;
__68:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 32)) > 0 && int32(*(*int8)(unsafe.Pointer(ptr + uintptr(*(*int32)(unsafe.Pointer(bp + 32))-1)))) != '/') {
		goto __83
	}
	XTcl_AppendToObj(tls, res, bp+36, 1)
	XTcl_GetStringFromObj(tls, res, bp+32)
__83:
	;
	XTcl_SetObjLength(tls, res, *(*int32)(unsafe.Pointer(bp + 32))+int32(libc.Xstrlen(tls, strElt)))

	ptr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(res)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(res)).Fbytes
		}
		return XTcl_GetString(tls, res)
	}() + uintptr(*(*int32)(unsafe.Pointer(bp + 32)))
__84:
	if !(int32(*(*int8)(unsafe.Pointer(strElt))) != 0) {
		goto __86
	}
	if !(int32(*(*int8)(unsafe.Pointer(strElt))) == int32(*(*int8)(unsafe.Pointer(bp + 36)))) {
		goto __87
	}
__89:
	if !(int32(*(*int8)(unsafe.Pointer(strElt + 1))) == int32(*(*int8)(unsafe.Pointer(bp + 36)))) {
		goto __90
	}
	strElt++
	goto __89
__90:
	;
	if !(int32(*(*int8)(unsafe.Pointer(strElt + 1))) != 0) {
		goto __91
	}
	if !(needsSep != 0) {
		goto __92
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ptr, 1))) = *(*int8)(unsafe.Pointer(bp + 36 /* separator */))
__92:
	;
__91:
	;
	goto __88
__87:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ptr, 1))) = *(*int8)(unsafe.Pointer(strElt))
	needsSep = 1
__88:
	;
	goto __85
__85:
	strElt++
	goto __84
	goto __86
__86:
	;
	*(*int32)(unsafe.Pointer(bp + 32 /* length */)) = int32((int64(ptr) - func() int64 {
		if (*Tcl_Obj)(unsafe.Pointer(res)).Fbytes != 0 {
			return int64((*Tcl_Obj)(unsafe.Pointer(res)).Fbytes)
		}
		return int64(XTcl_GetString(tls, res))
	}()) / 1)
	XTcl_SetObjLength(tls, res, *(*int32)(unsafe.Pointer(bp + 32 /* length */)))
__67:
	;
	goto __17
__17:
	i++
	goto __16
	goto __18
__18:
	;

	return res
}

//---------------------------------------------------------------------------
//
// Tcl_FSConvertToPathType --
//
//	This function tries to convert the given Tcl_Obj to a valid Tcl path
//	type, taking account of the fact that the cwd may have changed even if
//	this object is already supposedly of the correct type.
//
//	The filename may begin with "~" (to indicate current user's home
//	directory) or "~<user>" (to indicate any user's home directory).
//
// Results:
//	Standard Tcl error code.
//
// Side effects:
//	The old representation may be freed, and new memory allocated.
//
//---------------------------------------------------------------------------

func XTcl_FSConvertToPathType(tls *libc.TLS, interp uintptr, pathPtr uintptr) int32 { /* tclPathObj.c:1158:1: */
	// While it is bad practice to examine an object's type directly, this is
	// actually the best thing to do here. The reason is that if we are
	// converting this object to FsPath type for the first time, we don't need
	// to worry whether the 'cwd' has changed. On the other hand, if this
	// object is already of FsPath type, and is a relative path, we do have to
	// worry about the cwd. If the cwd has changed, we must recompute the
	// path.

	if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr == uintptr(unsafe.Pointer(&tclFsPathType)) {
		if XTclFSEpochOk(tls, uint64((*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).FfilesystemEpoch)) != 0 {
			return TCL_OK
		}

		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes == uintptr(0) {
			sUpdateStringOfFsPath(tls, pathPtr)
		}
		sFreeFsPathInternalRep(tls, pathPtr)
	}

	return sSetFsPathFromAny(tls, interp, pathPtr)

	// We used to have more complex code here:
	//
	// FsPath *fsPathPtr = PATHOBJ(pathPtr);
	// if (fsPathPtr->cwdPtr == NULL || PATHFLAGS(pathPtr) != 0) {
	//     return TCL_OK;
	// } else {
	//     if (TclFSCwdPointerEquals(&fsPathPtr->cwdPtr)) {
	//         return TCL_OK;
	//     } else {
	//         if (pathPtr->bytes == NULL) {
	//             UpdateStringOfFsPath(pathPtr);
	//         }
	//         FreeFsPathInternalRep(pathPtr);
	//         return Tcl_ConvertToType(interp, pathPtr, &tclFsPathType);
	//     }
	// }
	//
	// But we no longer believe this is necessary.
}

// Helper function for normalization.

func sIsSeparatorOrNull(tls *libc.TLS, ch int32) int32 { /* tclPathObj.c:1214:1: */
	if ch == 0 {
		return 1
	}
	switch XtclPlatform {
	case TCL_PLATFORM_UNIX:
		return func() int32 {
			if ch == '/' {
				return 1
			}
			return 0
		}()
	case TCL_PLATFORM_WINDOWS:
		return func() int32 {
			if ch == '/' || ch == '\\' {
				return 1
			}
			return 0
		}()
	}
	return 0
}

// Helper function for SetFsPathFromAny. Returns position of first directory
// delimiter in the path. If no separator is found, then returns the position
// of the end of the string.

func sFindSplitPos(tls *libc.TLS, path uintptr, separator int32) int32 { /* tclPathObj.c:1236:1: */
	var count int32 = 0
	switch XtclPlatform {
	case TCL_PLATFORM_UNIX:
		for int32(*(*int8)(unsafe.Pointer(path + uintptr(count)))) != 0 {
			if int32(*(*int8)(unsafe.Pointer(path + uintptr(count)))) == separator {
				return count
			}
			count++
		}
		break

	case TCL_PLATFORM_WINDOWS:
		for int32(*(*int8)(unsafe.Pointer(path + uintptr(count)))) != 0 {
			if int32(*(*int8)(unsafe.Pointer(path + uintptr(count)))) == separator || int32(*(*int8)(unsafe.Pointer(path + uintptr(count)))) == '\\' {
				return count
			}
			count++
		}
		break
	}
	return count
}

//---------------------------------------------------------------------------
//
// TclNewFSPathObj --
//
//	Creates a path object whose string representation is '[file join
//	dirPtr addStrRep]', but does so in a way that allows for more
//	efficient creation and caching of normalized paths, and more efficient
//	'file dirname', 'file tail', etc.
//
// Assumptions:
//	'dirPtr' must be an absolute path. 'len' may not be zero.
//
// Results:
//	The new Tcl object, with refCount zero.
//
// Side effects:
//	Memory is allocated. 'dirPtr' gets an additional refCount.
//
//---------------------------------------------------------------------------

func XTclNewFSPathObj(tls *libc.TLS, dirPtr uintptr, addStrRep uintptr, len int32) uintptr { /* tclPathObj.c:1285:9: */
	var fsPathPtr uintptr
	var pathPtr uintptr
	var p uintptr
	var state int32 = 0
	var count int32 = 0

	// [Bug 2806250] - this is only a partial solution of the problem.
	// The PATHFLAGS != 0 representation assumes in many places that
	// the "tail" part stored in the normPathPtr field is itself a
	// relative path.  Strings that begin with "~" are not relative paths,
	// so we must prevent their storage in the normPathPtr field.
	//
	// More generally we ought to be testing "addStrRep" for any value
	// that is not a relative path, but in an unconstrained VFS world
	// that could be just about anything, and testing could be expensive.
	// Since this routine plays a big role in [glob], anything that slows
	// it down would be unwelcome.  For now, continue the risk of further
	// bugs when some Tcl_Filesystem uses otherwise relative path strings
	// as absolute path strings.  Sensible Tcl_Filesystems will avoid
	// that by mounting on path prefixes like foo:// which cannot be the
	// name of a file or directory read from a native [glob] operation.
	if int32(*(*int8)(unsafe.Pointer(addStrRep))) == '~' {
		var tail uintptr = XTcl_NewStringObj(tls, addStrRep, len)

		pathPtr = sAppendPath(tls, dirPtr, tail)
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = tail
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return pathPtr
	}

	pathPtr = XTcl_NewObj(tls)
	fsPathPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FsPath{})))

	// Set up the path.

	(*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr = uintptr(0)
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = XTcl_NewStringObj(tls, addStrRep, len)
	(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FrefCount++
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr = dirPtr
	(*Tcl_Obj)(unsafe.Pointer(dirPtr)).FrefCount++
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FnativePathPtr = uintptr(0)
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FfsPtr = uintptr(0)
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FfilesystemEpoch = 0

	*(*uintptr)(unsafe.Pointer(pathPtr + 32)) = fsPathPtr
	(*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags = TCLPATH_APPENDED
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr = uintptr(unsafe.Pointer(&tclFsPathType))
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes = uintptr(0)
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).Flength = 0

	// Look for path components made up of only "."
	// This is overly conservative analysis to keep simple. It may mark some
	// things as needing more aggressive normalization that don't actually
	// need it. No harm done.
	p = addStrRep
__1:
	if !(len > 0) {
		goto __3
	}
	{
		switch state {
		case 0: // So far only "." since last dirsep or start
			switch int32(*(*int8)(unsafe.Pointer(p))) {
			case '.':
				count++
				break
			case '/':
				fallthrough
			case '\\':
				fallthrough
			case ':':
				if count != 0 {
					*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)) + 24)) |= TCLPATH_NEEDNORM
					len = 0
				}
				break
			default:
				count = 0
				state = 1
			}
			break
		case 1: // Scanning for next dirsep
			switch int32(*(*int8)(unsafe.Pointer(p))) {
			case '/':
				fallthrough
			case '\\':
				fallthrough
			case ':':
				state = 0
				break
			}
		}

	}
	goto __2
__2:
	p++
	len--
	goto __1
	goto __3
__3:
	;
	if len == 0 && count != 0 {
		*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)) + 24)) |= TCLPATH_NEEDNORM
	}

	return pathPtr
}

func sAppendPath(tls *libc.TLS, head uintptr, tail uintptr) uintptr { /* tclPathObj.c:1385:16: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var numBytes int32 at bp, 4

	var bytes uintptr
	var copy uintptr = XTcl_DuplicateObj(tls, head)

	// This is likely buggy when dealing with virtual filesystem drivers
	// that use some character other than "/" as a path separator.  I know
	// of no evidence that such a foolish thing exists.  This solution was
	// chosen so that "JoinPath" operations that pass through either path
	// internalrep produce the same results; that is, bugward compatibility.  If
	// we need to fix that bug here, it needs fixing in TclJoinPath() too.
	bytes = XTcl_GetStringFromObj(tls, tail, bp)
	if *(*int32)(unsafe.Pointer(bp)) == 0 {
		XTcl_AppendToObj(tls, copy, ts+6377, 1)
	} else {
		XTclpNativeJoinPath(tls, copy, bytes)
	}
	return copy
}

//---------------------------------------------------------------------------
//
// TclFSMakePathRelative --
//
//	Only for internal use.
//
//	Takes a path and a directory, where we _assume_ both path and
//	directory are absolute, normalized and that the path lies inside the
//	directory. Returns a Tcl_Obj representing filename of the path
//	relative to the directory.
//
// Results:
//	NULL on error, otherwise a valid object, typically with refCount of
//	zero, which it is assumed the caller will increment.
//
// Side effects:
//	The old representation may be freed, and new memory allocated.
//
//---------------------------------------------------------------------------

func XTclFSMakePathRelative(tls *libc.TLS, interp uintptr, pathPtr uintptr, cwdPtr uintptr) uintptr { /* tclPathObj.c:1433:9: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var cwdLen int32 at bp, 4

	// var len int32 at bp+4, 4

	var tempStr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr == uintptr(unsafe.Pointer(&tclFsPathType)) {
		var fsPathPtr uintptr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))

		if (*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags != 0 && (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr == cwdPtr {
			return (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr
		}
	}

	// We know the cwd is a normalised object which does not end in a
	// directory delimiter, unless the cwd is the name of a volume, in which
	// case it will end in a delimiter! We handle this situation here. A
	// better test than the '!= sep' might be to simply check if 'cwd' is a
	// root volume.
	//
	// Note that if we get this wrong, we will strip off either too much or
	// too little below, leading to wrong answers returned by glob.

	tempStr = XTcl_GetStringFromObj(tls, cwdPtr, bp)

	// Should we perhaps use 'Tcl_FSPathSeparator'? But then what about the
	// Windows special case? Perhaps we should just check if cwd is a root
	// volume.

	switch XtclPlatform {
	case TCL_PLATFORM_UNIX:
		if int32(*(*int8)(unsafe.Pointer(tempStr + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) != '/' {
			*(*int32)(unsafe.Pointer(bp /* cwdLen */))++
		}
		break
	case TCL_PLATFORM_WINDOWS:
		if int32(*(*int8)(unsafe.Pointer(tempStr + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) != '/' && int32(*(*int8)(unsafe.Pointer(tempStr + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) != '\\' {
			*(*int32)(unsafe.Pointer(bp /* cwdLen */))++
		}
		break
	}
	tempStr = XTcl_GetStringFromObj(tls, pathPtr, bp+4)

	return XTcl_NewStringObj(tls, tempStr+uintptr(*(*int32)(unsafe.Pointer(bp))), *(*int32)(unsafe.Pointer(bp + 4))-*(*int32)(unsafe.Pointer(bp)))
}

//---------------------------------------------------------------------------
//
// MakePathFromNormalized --
//
//	Like SetFsPathFromAny, but assumes the given object is an absolute
//	normalized path. Only for internal use.
//
// Results:
//	Standard Tcl error code.
//
// Side effects:
//	The old representation may be freed, and new memory allocated.
//
//---------------------------------------------------------------------------

func sMakePathFromNormalized(tls *libc.TLS, interp uintptr, pathPtr uintptr) int32 { /* tclPathObj.c:1504:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var fsPathPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr == uintptr(unsafe.Pointer(&tclFsPathType)) {
		return TCL_OK
	}

	// Free old representation

	if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes == uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr)).FupdateStringProc == uintptr(0) {
				if interp != uintptr(0) {
					XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
						ts+55231, -1))
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+27839, ts+55271,
						uintptr(0)))
				}
				return TCL_ERROR
			}
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr)).FupdateStringProc})).f(tls, pathPtr)
		}
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, pathPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr = uintptr(0)
		}

	}

	fsPathPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FsPath{})))

	// It's a pure normalized absolute path.

	(*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr = uintptr(0)

	// Circular reference by design.

	(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = pathPtr
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr = uintptr(0)
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FnativePathPtr = uintptr(0)
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FfsPtr = uintptr(0)
	// Remember the epoch under which we decided pathPtr was normalized
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FfilesystemEpoch = int32(XTclFSEpoch(tls))

	*(*uintptr)(unsafe.Pointer(pathPtr + 32)) = fsPathPtr
	(*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags = 0
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr = uintptr(unsafe.Pointer(&tclFsPathType))

	return TCL_OK
}

//---------------------------------------------------------------------------
//
// Tcl_FSNewNativePath --
//
//	This function performs the something like the reverse of the usual
//	obj->path->nativerep conversions. If some code retrieves a path in
//	native form (from, e.g. readlink or a native dialog), and that path is
//	to be used at the Tcl level, then calling this function is an
//	efficient way of creating the appropriate path object type.
//
//	Any memory which is allocated for 'clientData' should be retained
//	until clientData is passed to the filesystem's freeInternalRepProc
//	when it can be freed. The built in platform-specific filesystems use
//	'ckalloc' to allocate clientData, and ckfree to free it.
//
// Results:
//	NULL or a valid path object pointer, with refCount zero.
//
// Side effects:
//	New memory may be allocated.
//
//---------------------------------------------------------------------------

func XTcl_FSNewNativePath(tls *libc.TLS, fromFilesystem uintptr, clientData ClientData) uintptr { /* tclPathObj.c:1585:9: */
	var pathPtr uintptr = uintptr(0)
	var fsPathPtr uintptr

	if (*Tcl_Filesystem)(unsafe.Pointer(fromFilesystem)).FinternalToNormalizedProc != uintptr(0) {
		pathPtr = (*struct {
			f func(*libc.TLS, ClientData) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_Filesystem)(unsafe.Pointer(fromFilesystem)).FinternalToNormalizedProc})).f(tls, clientData)
	}
	if pathPtr == uintptr(0) {
		return uintptr(0)
	}

	// Free old representation; shouldn't normally be any, but best to be
	// safe.

	if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes == uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr)).FupdateStringProc == uintptr(0) {
				return uintptr(0)
			}
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr)).FupdateStringProc})).f(tls, pathPtr)
		}
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, pathPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr = uintptr(0)
		}

	}

	fsPathPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FsPath{})))

	(*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr = uintptr(0)

	// Circular reference, by design.

	(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = pathPtr
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr = uintptr(0)
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FnativePathPtr = clientData
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FfsPtr = fromFilesystem
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FfilesystemEpoch = int32(XTclFSEpoch(tls))

	*(*uintptr)(unsafe.Pointer(pathPtr + 32)) = fsPathPtr
	(*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags = 0
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr = uintptr(unsafe.Pointer(&tclFsPathType))

	return pathPtr
}

//---------------------------------------------------------------------------
//
// Tcl_FSGetTranslatedPath --
//
//	This function attempts to extract the translated path from the given
//	Tcl_Obj. If the translation succeeds (i.e. the object is a valid
//	path), then it is returned. Otherwise NULL will be returned, and an
//	error message may be left in the interpreter (if it is non-NULL)
//
// Results:
//	NULL or a valid Tcl_Obj pointer.
//
// Side effects:
//	Only those of 'Tcl_FSConvertToPathType'
//
//---------------------------------------------------------------------------

func XTcl_FSGetTranslatedPath(tls *libc.TLS, interp uintptr, pathPtr uintptr) uintptr { /* tclPathObj.c:1656:9: */
	var retObj uintptr = uintptr(0)
	var srcFsPathPtr uintptr

	if XTcl_FSConvertToPathType(tls, interp, pathPtr) != TCL_OK {
		return uintptr(0)
	}
	srcFsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))
	if (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FtranslatedPathPtr == uintptr(0) {
		if (*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags != 0 {
			// We lack a translated path result, but we have a directory
			// (cwdPtr) and a tail (normPathPtr), and if we join the
			// translated version of cwdPtr to normPathPtr, we'll get the
			// translated result we need, and can store it for future use.

			var translatedCwdPtr uintptr = XTcl_FSGetTranslatedPath(tls, interp,
				(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FcwdPtr)
			if translatedCwdPtr == uintptr(0) {
				return uintptr(0)
			}

			retObj = XTcl_FSJoinToPath(tls, translatedCwdPtr, 1,
				srcFsPathPtr+8)
			(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FtranslatedPathPtr = retObj
			if (*Tcl_Obj)(unsafe.Pointer(translatedCwdPtr)).FtypePtr == uintptr(unsafe.Pointer(&tclFsPathType)) {
				(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfilesystemEpoch = (*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(translatedCwdPtr + 32)))).FfilesystemEpoch
			} else {
				(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfilesystemEpoch = 0
			}
			(*Tcl_Obj)(unsafe.Pointer(retObj)).FrefCount++
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = translatedCwdPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		} else {
			// It is a pure absolute, normalized path object. This is
			// something like being a 'pure list'. The object's string,
			// translatedPath and normalizedPath are all identical.

			retObj = (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FnormPathPtr
		}
	} else {
		// It is an ordinary path object.

		retObj = (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FtranslatedPathPtr
	}

	if retObj != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer(retObj)).FrefCount++
	}
	return retObj
}

//---------------------------------------------------------------------------
//
// Tcl_FSGetTranslatedStringPath --
//
//	This function attempts to extract the translated path from the given
//	Tcl_Obj. If the translation succeeds (i.e. the object is a valid
//	path), then the path is returned. Otherwise NULL will be returned, and
//	an error message may be left in the interpreter (if it is non-NULL)
//
// Results:
//	NULL or a valid string.
//
// Side effects:
//	Only those of 'Tcl_FSConvertToPathType'
//
//---------------------------------------------------------------------------

func XTcl_FSGetTranslatedStringPath(tls *libc.TLS, interp uintptr, pathPtr uintptr) uintptr { /* tclPathObj.c:1736:12: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var transPtr uintptr = XTcl_FSGetTranslatedPath(tls, interp, pathPtr)

	if transPtr != uintptr(0) {
		// var len int32 at bp, 4

		var orig uintptr = XTcl_GetStringFromObj(tls, transPtr, bp)
		var result uintptr = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp))+1))

		libc.Xmemcpy(tls, result, orig, uint64(*(*int32)(unsafe.Pointer(bp))+1))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(transPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(transPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(transPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(transPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(transPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(transPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(transPtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(transPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = transPtr
				}
			} else {
				XTclFreeObj(tls, transPtr)
			}
		}

		return result
	}

	return uintptr(0)
}

//---------------------------------------------------------------------------
//
// Tcl_FSGetNormalizedPath --
//
//	This important function attempts to extract from the given Tcl_Obj a
//	unique normalised path representation, whose string value can be used
//	as a unique identifier for the file.
//
// Results:
//	NULL or a valid path object pointer.
//
// Side effects:
//	New memory may be allocated. The Tcl 'errno' may be modified in the
//	process of trying to examine various path possibilities.
//
//---------------------------------------------------------------------------

func XTcl_FSGetNormalizedPath(tls *libc.TLS, interp uintptr, pathPtr uintptr) uintptr { /* tclPathObj.c:1775:9: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var fsPathPtr uintptr

	if XTcl_FSConvertToPathType(tls, interp, pathPtr) != TCL_OK {
		return uintptr(0)
	}
	fsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))

	if (*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags != 0 {
		// This is a special path object which is the result of something like
		// 'file join'

		var dir uintptr
		var copy uintptr
		// var tailLen int32 at bp, 4

		// var cwdLen int32 at bp+4, 4

		var pathType int32

		pathType = int32(XTcl_FSGetPathType(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr))
		dir = XTcl_FSGetNormalizedPath(tls, interp, (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)
		if dir == uintptr(0) {
			return uintptr(0)
		}
		// TODO: Figure out why this is needed.
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes == uintptr(0) {
			sUpdateStringOfFsPath(tls, pathPtr)
		}

		XTcl_GetStringFromObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr, bp)
		if *(*int32)(unsafe.Pointer(bp)) != 0 {
			copy = sAppendPath(tls, dir, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)
		} else {
			copy = XTcl_DuplicateObj(tls, dir)
		}
		(*Tcl_Obj)(unsafe.Pointer(dir)).FrefCount++
		(*Tcl_Obj)(unsafe.Pointer(copy)).FrefCount++

		// We now own a reference on both 'dir' and 'copy'

		XTcl_GetStringFromObj(tls, dir, bp+4)

		// Normalize the combined string.

		if (*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags&TCLPATH_NEEDNORM != 0 {
			// If the "tail" part has components (like /../) that cause the
			// combined path to need more complete normalizing, call on the
			// more powerful routine to accomplish that so we avoid [Bug
			// 2385549] ...

			var newCopy uintptr = XTclFSNormalizeAbsolutePath(tls, interp, copy)

			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = copy
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			copy = newCopy
		} else {
			// ... but in most cases where we join a trouble free tail to a
			// normalized head, we can more efficiently normalize the combined
			// path by passing over only the unnormalized tail portion. When
			// this is sufficient, prior developers claim this should be much
			// faster. We use 'cwdLen' so that we are already pointing at
			// the dir-separator that we know about. The normalization code
			// will actually start off directly after that separator.

			XTclFSNormalizeToUniquePath(tls, interp, copy, *(*int32)(unsafe.Pointer(bp + 4 /* cwdLen */)))
		}

		// Now we need to construct the new path object.

		if pathType == TCL_PATH_RELATIVE {
			var origDir uintptr = (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr

			// NOTE: here we are (dangerously?) assuming that origDir points
			// to a Tcl_Obj with Tcl_ObjType == &tclFsPathType. The
			//     pathType = Tcl_FSGetPathType(fsPathPtr->cwdPtr);
			// above that set the pathType value should have established that,
			// but it's far less clear on what basis we know there's been no
			// shimmering since then.

			var origDirFsPathPtr uintptr = *(*uintptr)(unsafe.Pointer(origDir + 32))

			(*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr = (*FsPath)(unsafe.Pointer(origDirFsPathPtr)).FcwdPtr
			(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).FrefCount++

			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr
					}
				} else {
					XTclFreeObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)
				}
			}

			(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = copy

			// That's our reference to copy used.

			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dir)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(dir)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dir)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(dir)).Flength = -1
					for ok2 := true; ok2; ok2 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(dir + 32)) = XtclFreeObjList
						XtclFreeObjList = dir
					}
				} else {
					XTclFreeObj(tls, dir)
				}
			}

			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(origDir)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(origDir)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(origDir)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(origDir)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(origDir)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(origDir)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(origDir)).Flength = -1
					for ok3 := true; ok3; ok3 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(origDir + 32)) = XtclFreeObjList
						XtclFreeObjList = origDir
					}
				} else {
					XTclFreeObj(tls, origDir)
				}
			}

		} else {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).Flength = -1
					for ok4 := true; ok4; ok4 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr
					}
				} else {
					XTclFreeObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)
				}
			}

			(*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr = uintptr(0)
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Flength = -1
					for ok5 := true; ok5; ok5 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr
					}
				} else {
					XTclFreeObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)
				}
			}

			(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = copy

			// That's our reference to copy used.

			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(dir)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(dir)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(dir)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(dir)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(dir)).Flength = -1
					for ok6 := true; ok6; ok6 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(dir + 32)) = XtclFreeObjList
						XtclFreeObjList = dir
					}
				} else {
					XTclFreeObj(tls, dir)
				}
			}

		}
		(*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags = 0
	}

	// Ensure cwd hasn't changed.

	if (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr != uintptr(0) {
		if !(XTclFSCwdPointerEquals(tls, fsPathPtr+16) != 0) {
			if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes == uintptr(0) {
				sUpdateStringOfFsPath(tls, pathPtr)
			}
			sFreeFsPathInternalRep(tls, pathPtr)
			if sSetFsPathFromAny(tls, interp, pathPtr) != TCL_OK {
				return uintptr(0)
			}
			fsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))
		} else if (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr == uintptr(0) {
			// var cwdLen int32 at bp+8, 4

			var copy uintptr

			copy = sAppendPath(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr, pathPtr)

			XTcl_GetStringFromObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr, bp+8)
			*(*int32)(unsafe.Pointer(bp + 8 /* cwdLen */)) += libc.Bool32(int32(*(*int8)(unsafe.Pointer(XTcl_GetString(tls, copy) + uintptr(*(*int32)(unsafe.Pointer(bp + 8)))))) == '/')

			// Normalize the combined string, but only starting after the end
			// of the previously normalized 'dir'. This should be much faster!

			XTclFSNormalizeToUniquePath(tls, interp, copy, *(*int32)(unsafe.Pointer(bp + 8))-1)
			(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = copy
			(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FrefCount++
		}
	}
	if (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr == uintptr(0) {
		*(*uintptr)(unsafe.Pointer(bp + 24 /* useThisCwd */)) = uintptr(0)
		var pureNormalized int32 = 1

		// Since normPathPtr is NULL, but this is a valid path object, we know
		// that the translatedPathPtr cannot be NULL.

		*(*uintptr)(unsafe.Pointer(bp + 16 /* absolutePath */)) = (*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr
		var path uintptr = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
		}()

		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount++

		// We have to be a little bit careful here to avoid infinite loops
		// we're asking Tcl_FSGetPathType to return the path's type, but that
		// call can actually result in a lot of other filesystem action, which
		// might loop back through here.

		if int32(*(*int8)(unsafe.Pointer(path))) == 0 {
			// Special handling for the empty string value. This one is very
			// weird with [file normalize {}] => {}. (The reasoning supporting
			// this is unknown to DGP, but he fears changing it.) Attempt here
			// to keep the expectations of other parts of Tcl_Filesystem code
			// about state of the FsPath fields satisfied.
			//
			// In particular, capture the cwd value and save so it can be
			// stored in the cwdPtr field below.

			*(*uintptr)(unsafe.Pointer(bp + 24 /* useThisCwd */)) = XTcl_FSGetCwd(tls, interp)
		} else {
			// We don't ask for the type of 'pathPtr' here, because that is
			// not correct for our purposes when we have a path like '~'. Tcl
			// has a bit of a contradiction in that '~' paths are defined as
			// 'absolute', but in reality can be just about anything,
			// depending on how env(HOME) is set.

			var type1 Tcl_PathType = XTcl_FSGetPathType(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* absolutePath */)))

			if type1 == TCL_PATH_RELATIVE {
				*(*uintptr)(unsafe.Pointer(bp + 24 /* useThisCwd */)) = XTcl_FSGetCwd(tls, interp)

				if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) {
					return uintptr(0)
				}

				pureNormalized = 0
				for ok7 := true; ok7; ok7 = 0 != 0 {
					var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 16))
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				*(*uintptr)(unsafe.Pointer(bp + 16 /* absolutePath */)) = XTcl_FSJoinToPath(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* useThisCwd */)), 1, bp+16)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount++

				// We have a refCount on the cwd.
			} else if type1 == TCL_PATH_VOLUME_RELATIVE {
				// Only Windows has volume-relative paths.

				for ok8 := true; ok8; ok8 = 0 != 0 {
					var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 16))
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				*(*uintptr)(unsafe.Pointer(bp + 16 /* absolutePath */)) = XTclWinVolumeRelativeNormalize(tls, interp,
					path, bp+24)
				if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) {
					return uintptr(0)
				}
				pureNormalized = 0
			}
		}

		// Already has refCount incremented.

		(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = XTclFSNormalizeAbsolutePath(tls, interp,
			*(*uintptr)(unsafe.Pointer(bp + 16 /* absolutePath */)))

		// Check if path is pure normalized (this can only be the case if it
		// is an absolute path).

		if pureNormalized != 0 {
			// var normPathLen int32 at bp+36, 4

			// var pathLen int32 at bp+32, 4

			var normPath uintptr

			path = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
					return func() uintptr {
						*(*int32)(unsafe.Pointer(bp + 32)) = (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Flength
						return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
					}()
				}
				return XTcl_GetStringFromObj(tls, pathPtr, bp+32)
			}()
			normPath = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes != 0 {
					return func() uintptr {
						*(*int32)(unsafe.Pointer(bp + 36)) = (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Flength
						return (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes
					}()
				}
				return XTcl_GetStringFromObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr, bp+36)
			}()
			if *(*int32)(unsafe.Pointer(bp + 32)) == *(*int32)(unsafe.Pointer(bp + 36)) && !(libc.Xmemcmp(tls, path, normPath, uint64(*(*int32)(unsafe.Pointer(bp + 32)))) != 0) {
				// The path was already normalized. Get rid of the duplicate.

				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Flength = -1
						for ok9 := true; ok9; ok9 = 0 != 0 {
							*(*uintptr)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr + 32)) = XtclFreeObjList
							XtclFreeObjList = (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr
						}
					} else {
						XTclFreeObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)
					}
				}

				// We do *not* increment the refCount for this circular
				// reference.

				(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = pathPtr
			}
		}
		if *(*uintptr)(unsafe.Pointer(bp + 24)) != uintptr(0) {
			// We just need to free an object we allocated above for relative
			// paths (this was returned by Tcl_FSJoinToPath above), and then
			// of course store the cwd.

			(*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr = *(*uintptr)(unsafe.Pointer(bp + 24 /* useThisCwd */))
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Flength = -1
				for ok10 := true; ok10; ok10 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 32)) = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 16))
				}
			} else {
				XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* absolutePath */)))
			}
		}

	}

	return (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr
}

//---------------------------------------------------------------------------
//
// Tcl_FSGetInternalRep --
//
//	Extract the internal representation of a given path object, in the
//	given filesystem. If the path object belongs to a different
//	filesystem, we return NULL.
//
//	If the internal representation is currently NULL, we attempt to
//	generate it, by calling the filesystem's
//	'Tcl_FSCreateInternalRepProc'.
//
// Results:
//	NULL or a valid internal representation.
//
// Side effects:
//	An attempt may be made to convert the object.
//
//---------------------------------------------------------------------------

func XTcl_FSGetInternalRep(tls *libc.TLS, pathPtr uintptr, fsPtr uintptr) ClientData { /* tclPathObj.c:2073:1: */
	var srcFsPathPtr uintptr

	if XTcl_FSConvertToPathType(tls, uintptr(0), pathPtr) != TCL_OK {
		return uintptr(0)
	}
	srcFsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))

	// We will only return the native representation for the caller's
	// filesystem. Otherwise we will simply return NULL. This means that there
	// must be a unique bi-directional mapping between paths and filesystems,
	// and that this mapping will not allow 'remapped' files -- files which
	// are in one filesystem but mapped into another. Another way of putting
	// this is that 'stacked' filesystems are not allowed. We recognise that
	// this is a potentially useful feature for the future.
	//
	// Even something simple like a 'pass through' filesystem which logs all
	// activity and passes the calls onto the native system would be nice, but
	// not easily achievable with the current implementation.

	if (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr == uintptr(0) {
		// This only usually happens in wrappers like TclpStat which create a
		// string object and pass it to TclpObjStat. Code which calls the
		// Tcl_FS.. functions should always have a filesystem already set.
		// Whether this code path is legal or not depends on whether we decide
		// to allow external code to call the native filesystem directly. It
		// is at least safer to allow this sub-optimal routing.

		XTcl_FSGetFileSystemForPath(tls, pathPtr)

		// If we fail through here, then the path is probably not a valid path
		// in the filesystsem, and is most likely to be a use of the empty
		// path "" via a direct call to one of the objectified interfaces
		// (e.g. from the Tcl testsuite).

		srcFsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))
		if (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr == uintptr(0) {
			return uintptr(0)
		}
	}

	// There is still one possibility we should consider; if the file belongs
	// to a different filesystem, perhaps it is actually linked through to a
	// file in our own filesystem which we do care about. The way we can check
	// for this is we ask what filesystem this path belongs to.

	if fsPtr != (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr {
		var actualFs uintptr = XTcl_FSGetFileSystemForPath(tls, pathPtr)

		if actualFs == fsPtr {
			return XTcl_FSGetInternalRep(tls, pathPtr, fsPtr)
		}
		return uintptr(0)
	}

	if (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FnativePathPtr == uintptr(0) {
		var proc uintptr
		var nativePathPtr uintptr

		proc = (*Tcl_Filesystem)(unsafe.Pointer((*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr)).FcreateInternalRepProc
		if proc == uintptr(0) {
			return uintptr(0)
		}

		nativePathPtr = (*struct {
			f func(*libc.TLS, uintptr) ClientData
		})(unsafe.Pointer(&struct{ uintptr }{proc})).f(tls, pathPtr)
		srcFsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))
		(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FnativePathPtr = nativePathPtr
		(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfilesystemEpoch = int32(XTclFSEpoch(tls))
	}

	return (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FnativePathPtr
}

//---------------------------------------------------------------------------
//
// TclFSEnsureEpochOk --
//
//	This will ensure the pathPtr is up to date and can be converted into a
//	"path" type, and that we are able to generate a complete normalized
//	path which is used to determine the filesystem match.
//
// Results:
//	Standard Tcl return code.
//
// Side effects:
//	An attempt may be made to convert the object.
//
//---------------------------------------------------------------------------

func XTclFSEnsureEpochOk(tls *libc.TLS, pathPtr uintptr, fsPtrPtr uintptr) int32 { /* tclPathObj.c:2176:1: */
	var srcFsPathPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr != uintptr(unsafe.Pointer(&tclFsPathType)) {
		return TCL_OK
	}

	srcFsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))

	// Check if the filesystem has changed in some way since this object's
	// internal representation was calculated.

	if !(XTclFSEpochOk(tls, uint64((*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfilesystemEpoch)) != 0) {
		// We have to discard the stale representation and recalculate it.

		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes == uintptr(0) {
			sUpdateStringOfFsPath(tls, pathPtr)
		}
		sFreeFsPathInternalRep(tls, pathPtr)
		if sSetFsPathFromAny(tls, uintptr(0), pathPtr) != TCL_OK {
			return TCL_ERROR
		}
		srcFsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))
	}

	// Check whether the object is already assigned to a fs.

	if (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(fsPtrPtr)) = (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr
	}
	return TCL_OK
}

//---------------------------------------------------------------------------
//
// TclFSSetPathDetails --
//
//	???
//
// Results:
//	None
//
// Side effects:
//	???
//
//---------------------------------------------------------------------------

func XTclFSSetPathDetails(tls *libc.TLS, pathPtr uintptr, fsPtr uintptr, clientData ClientData) { /* tclPathObj.c:2235:1: */
	var srcFsPathPtr uintptr

	// Make sure pathPtr is of the correct type.

	if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr != uintptr(unsafe.Pointer(&tclFsPathType)) {
		if sSetFsPathFromAny(tls, uintptr(0), pathPtr) != TCL_OK {
			return
		}
	}

	srcFsPathPtr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))
	(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr = fsPtr
	(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FnativePathPtr = clientData
	(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfilesystemEpoch = int32(XTclFSEpoch(tls))
}

//---------------------------------------------------------------------------
//
// Tcl_FSEqualPaths --
//
//	This function tests whether the two paths given are equal path
//	objects. If either or both is NULL, 0 is always returned.
//
// Results:
//	1 or 0.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_FSEqualPaths(tls *libc.TLS, firstPtr uintptr, secondPtr uintptr) int32 { /* tclPathObj.c:2276:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var firstStr uintptr
	var secondStr uintptr
	// var firstLen int32 at bp, 4

	// var secondLen int32 at bp+4, 4

	var tempErrno int32

	if firstPtr == secondPtr {
		return 1
	}

	if firstPtr == uintptr(0) || secondPtr == uintptr(0) {
		return 0
	}
	firstStr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(firstPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(firstPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(firstPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, firstPtr, bp)
	}()
	secondStr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(secondPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(secondPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(secondPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, secondPtr, bp+4)
	}()
	if *(*int32)(unsafe.Pointer(bp)) == *(*int32)(unsafe.Pointer(bp + 4)) && !(libc.Xmemcmp(tls, firstStr, secondStr, uint64(*(*int32)(unsafe.Pointer(bp)))) != 0) {
		return 1
	}

	// Try the most thorough, correct method of comparing fully normalized
	// paths.

	tempErrno = XTcl_GetErrno(tls)
	firstPtr = XTcl_FSGetNormalizedPath(tls, uintptr(0), firstPtr)
	secondPtr = XTcl_FSGetNormalizedPath(tls, uintptr(0), secondPtr)
	XTcl_SetErrno(tls, tempErrno)

	if firstPtr == uintptr(0) || secondPtr == uintptr(0) {
		return 0
	}

	firstStr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(firstPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(firstPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(firstPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, firstPtr, bp)
	}()
	secondStr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(secondPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 4)) = (*Tcl_Obj)(unsafe.Pointer(secondPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(secondPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, secondPtr, bp+4)
	}()
	return libc.Bool32(*(*int32)(unsafe.Pointer(bp)) == *(*int32)(unsafe.Pointer(bp + 4)) && !(libc.Xmemcmp(tls, firstStr, secondStr, uint64(*(*int32)(unsafe.Pointer(bp)))) != 0))
}

//---------------------------------------------------------------------------
//
// SetFsPathFromAny --
//
//	This function tries to convert the given Tcl_Obj to a valid Tcl path
//	type.
//
//	The filename may begin with "~" (to indicate current user's home
//	directory) or "~<user>" (to indicate any user's home directory).
//
// Results:
//	Standard Tcl error code.
//
// Side effects:
//	The old representation may be freed, and new memory allocated.
//
//---------------------------------------------------------------------------

func sSetFsPathFromAny(tls *libc.TLS, interp uintptr, pathPtr uintptr) int32 { /* tclPathObj.c:2336:1: */
	bp := tls.Alloc(792)
	defer tls.Free(792)
	*(*uintptr)(unsafe.Pointer(bp + 784)) = pathPtr

	// var len int32 at bp+88, 4

	var fsPathPtr uintptr
	var transPtr uintptr
	var name uintptr

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 784)))).FtypePtr == uintptr(unsafe.Pointer(&tclFsPathType)) {
		return TCL_OK
	}

	// First step is to translate the filename. This is similar to
	// Tcl_TranslateFilename, but shouldn't convert everything to windows
	// backslashes on that platform. The current implementation of this piece
	// is a slightly optimised version of the various Tilde/Split/Join stuff
	// to avoid multiple split/join operations.
	//
	// We remove any trailing directory separator.
	//
	// However, the split/join routines are quite complex, and one has to make
	// sure not to break anything on Unix or Win (fCmd.test, fileName.test and
	// cmdAH.test exercise most of the code).

	name = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 784 /* pathPtr */)), bp+88)

	// Handle tilde substitutions, if needed.

	if *(*int32)(unsafe.Pointer(bp + 88)) != 0 && int32(*(*int8)(unsafe.Pointer(name))) == '~' {
		// var temp Tcl_DString at bp+312, 216

		var split int32
		var separator int8 = int8('/')

		// We have multiple cases '~/foo/bar...', '~user/foo/bar...', etc.
		// split becomes value 1 for '~/...' as well as for '~'.
		split = sFindSplitPos(tls, name, int32(separator))

		// Do some tilde substitution.

		if split == 1 {
			// We have just '~' (or '~/...')

			// var dir uintptr at bp+528, 8

			// var dirString Tcl_DString at bp+96, 216

			*(*uintptr)(unsafe.Pointer(bp + 528 /* dir */)) = XTclGetEnv(tls, ts+27852, bp+96)
			if *(*uintptr)(unsafe.Pointer(bp + 528)) == uintptr(0) {
				if interp != 0 {
					XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

						ts+31386, -1))
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+27839,
						ts+55275, uintptr(0)))
				}
				return TCL_ERROR
			}
			XTcl_DStringInit(tls, bp+312)
			XTcl_JoinPath(tls, 1, bp+528, bp+312)
			XTcl_DStringFree(tls, bp+96)
		} else {
			// We have a user name '~user'

			var expandedUser uintptr
			// var userName Tcl_DString at bp+536, 216

			XTcl_DStringInit(tls, bp+536)
			XTcl_DStringAppend(tls, bp+536, name+uintptr(1), split-1)
			expandedUser = (*Tcl_DString)(unsafe.Pointer(bp + 536)).Fstring

			XTcl_DStringInit(tls, bp+312)
			if XTclpGetUserHome(tls, expandedUser, bp+312) == uintptr(0) {
				if interp != uintptr(0) {
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
						ts+31458, libc.VaList(bp+40, expandedUser)))
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7444, ts+27839, ts+55284,
						uintptr(0)))
				}
				XTcl_DStringFree(tls, bp+536)
				XTcl_DStringFree(tls, bp+312)
				return TCL_ERROR
			}
			XTcl_DStringFree(tls, bp+536)
		}

		transPtr = XTclDStringToObj(tls, bp+312)

		if split != *(*int32)(unsafe.Pointer(bp + 88)) {
			// Join up the tilde substitution with the rest.

			if int32(*(*int8)(unsafe.Pointer(name + uintptr(split+1)))) == int32(separator) {
				// Somewhat tricky case like ~//foo/bar. Make use of
				// Split/Join machinery to get it right. Assumes all paths
				// beginning with ~ are part of the native filesystem.

				// var objc int32 at bp+752, 4

				// var objv uintptr at bp+760, 8

				var parts uintptr = XTclpNativeSplitPath(tls, *(*uintptr)(unsafe.Pointer(bp + 784 /* pathPtr */)), uintptr(0))

				XTcl_ListObjGetElements(tls, uintptr(0), parts, bp+752, bp+760)

				// Skip '~'. It's replaced by its expansion.

				*(*int32)(unsafe.Pointer(bp + 752 /* objc */))--
				*(*uintptr)(unsafe.Pointer(bp + 760 /* objv */)) += 8
				for libc.PostDecInt32(&*(*int32)(unsafe.Pointer(bp + 752)), 1) != 0 {
					XTclpNativeJoinPath(tls, transPtr, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 760 /* objv */)), 8)))))
				}
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(parts)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(parts)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(parts)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(parts)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(parts)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(parts)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(parts)).Flength = -1
						for ok := true; ok; ok = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(parts + 32)) = XtclFreeObjList
							XtclFreeObjList = parts
						}
					} else {
						XTclFreeObj(tls, parts)
					}
				}

			} else {
				// var pair [2]uintptr at bp+768, 16

				*(*uintptr)(unsafe.Pointer(bp + 768)) = transPtr
				*(*uintptr)(unsafe.Pointer(bp + 768 + 1*8)) = XTcl_NewStringObj(tls, name+uintptr(split)+uintptr(1), -1)
				transPtr = XTclJoinPath(tls, 2, bp+768, 1)
				if transPtr != *(*uintptr)(unsafe.Pointer(bp + 768)) {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 768))
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
				}
				if transPtr != *(*uintptr)(unsafe.Pointer(bp + 768 + 1*8)) {
					for ok2 := true; ok2; ok2 = 0 != 0 {
						var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 768 + 1*8))
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
				}
			}
		}
	} else {
		transPtr = XTclJoinPath(tls, 1, bp+784, 1)
	}

	// Now we have a translated filename in 'transPtr'. This will have forward
	// slashes on Windows, and will not contain any ~user sequences.

	fsPathPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FsPath{})))

	(*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr = transPtr
	if transPtr != *(*uintptr)(unsafe.Pointer(bp + 784)) {
		(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr)).FrefCount++
		// Redo translation when $env(HOME) changes
		(*FsPath)(unsafe.Pointer(fsPathPtr)).FfilesystemEpoch = int32(XTclFSEpoch(tls))
	} else {
		(*FsPath)(unsafe.Pointer(fsPathPtr)).FfilesystemEpoch = 0
	}
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = uintptr(0)
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr = uintptr(0)
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FnativePathPtr = uintptr(0)
	(*FsPath)(unsafe.Pointer(fsPathPtr)).FfsPtr = uintptr(0)

	// Free old representation before installing our new one.

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 784)))).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 784)))).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 784 /* pathPtr */)))).FtypePtr)).FfreeIntRepProc})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 784 /* pathPtr */)))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 784 /* pathPtr */)))).FtypePtr = uintptr(0)
	}

	*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 784)) + 32)) = fsPathPtr
	(*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 784)) + 32)))).Fflags = 0
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 784 /* pathPtr */)))).FtypePtr = uintptr(unsafe.Pointer(&tclFsPathType))
	return TCL_OK
}

func sFreeFsPathInternalRep(tls *libc.TLS, pathPtr uintptr) { /* tclPathObj.c:2512:1: */
	var fsPathPtr uintptr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))

	if (*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr != uintptr(0) {
		if (*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr != pathPtr {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = (*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr
					}
				} else {
					XTclFreeObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FtranslatedPathPtr)
				}
			}

		}
	}
	if (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr != uintptr(0) {
		if (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr != pathPtr {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr
					}
				} else {
					XTclFreeObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)
				}
			}

		}
		(*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr = uintptr(0)
	}
	if (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)).Flength = -1
				for ok2 := true; ok2; ok2 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr
				}
			} else {
				XTclFreeObj(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr)
			}
		}

	}
	if (*FsPath)(unsafe.Pointer(fsPathPtr)).FnativePathPtr != uintptr(0) && (*FsPath)(unsafe.Pointer(fsPathPtr)).FfsPtr != uintptr(0) {
		var freeProc uintptr = (*Tcl_Filesystem)(unsafe.Pointer((*FsPath)(unsafe.Pointer(fsPathPtr)).FfsPtr)).FfreeInternalRepProc

		if freeProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{freeProc})).f(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnativePathPtr)
			(*FsPath)(unsafe.Pointer(fsPathPtr)).FnativePathPtr = uintptr(0)
		}
	}

	XTclpFree(tls, fsPathPtr)
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr = uintptr(0)
}

func sDupFsPathInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclPathObj.c:2546:1: */
	var srcFsPathPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))
	var copyFsPathPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FsPath{})))

	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = copyFsPathPtr

	if (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FtranslatedPathPtr == srcPtr {
		// Cycle in src -> make cycle in copy.
		(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FtranslatedPathPtr = copyPtr
	} else {
		(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FtranslatedPathPtr = (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FtranslatedPathPtr
		if (*FsPath)(unsafe.Pointer(copyFsPathPtr)).FtranslatedPathPtr != uintptr(0) {
			(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(copyFsPathPtr)).FtranslatedPathPtr)).FrefCount++
		}
	}

	if (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FnormPathPtr == srcPtr {
		// Cycle in src -> make cycle in copy.
		(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FnormPathPtr = copyPtr
	} else {
		(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FnormPathPtr = (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FnormPathPtr
		if (*FsPath)(unsafe.Pointer(copyFsPathPtr)).FnormPathPtr != uintptr(0) {
			(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(copyFsPathPtr)).FnormPathPtr)).FrefCount++
		}
	}

	(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FcwdPtr = (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FcwdPtr
	if (*FsPath)(unsafe.Pointer(copyFsPathPtr)).FcwdPtr != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer((*FsPath)(unsafe.Pointer(copyFsPathPtr)).FcwdPtr)).FrefCount++
	}

	(*FsPath)(unsafe.Pointer(copyFsPathPtr)).Fflags = (*FsPath)(unsafe.Pointer(srcFsPathPtr)).Fflags

	if (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr != uintptr(0) &&
		(*FsPath)(unsafe.Pointer(srcFsPathPtr)).FnativePathPtr != uintptr(0) {
		var dupProc uintptr = (*Tcl_Filesystem)(unsafe.Pointer((*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr)).FdupInternalRepProc

		if dupProc != uintptr(0) {
			(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FnativePathPtr = (*struct {
				f func(*libc.TLS, ClientData) ClientData
			})(unsafe.Pointer(&struct{ uintptr }{dupProc})).f(tls, (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FnativePathPtr)
		} else {
			(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FnativePathPtr = uintptr(0)
		}
	} else {
		(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FnativePathPtr = uintptr(0)
	}
	(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FfsPtr = (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfsPtr
	(*FsPath)(unsafe.Pointer(copyFsPathPtr)).FfilesystemEpoch = (*FsPath)(unsafe.Pointer(srcFsPathPtr)).FfilesystemEpoch

	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&tclFsPathType))
}

//---------------------------------------------------------------------------
//
// UpdateStringOfFsPath --
//
//	Gives an object a valid string rep.
//
// Results:
//	None.
//
// Side effects:
//	Memory may be allocated.
//
//---------------------------------------------------------------------------

func sUpdateStringOfFsPath(tls *libc.TLS, pathPtr uintptr) { /* tclPathObj.c:2619:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var fsPathPtr uintptr = *(*uintptr)(unsafe.Pointer(pathPtr + 32))
	// var cwdLen int32 at bp, 4

	var copy uintptr

	if (*FsPath)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pathPtr + 32)))).Fflags == 0 || (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr == uintptr(0) {
		XTcl_Panic(tls, ts+55291, 0)
	}

	copy = sAppendPath(tls, (*FsPath)(unsafe.Pointer(fsPathPtr)).FcwdPtr, (*FsPath)(unsafe.Pointer(fsPathPtr)).FnormPathPtr)

	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes = XTcl_GetStringFromObj(tls, copy, bp)
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).Flength = *(*int32)(unsafe.Pointer(bp /* cwdLen */))
	(*Tcl_Obj)(unsafe.Pointer(copy)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(copy)).Flength = 0
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(copy)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(copy)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(copy)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(copy)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(copy)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(copy)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(copy)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(copy + 32)) = XtclFreeObjList
				XtclFreeObjList = copy
			}
		} else {
			XTclFreeObj(tls, copy)
		}
	}

}

//---------------------------------------------------------------------------
//
// TclNativePathInFilesystem --
//
//	Any path object is acceptable to the native filesystem, by default (we
//	will throw errors when illegal paths are actually tried to be used).
//
//	However, this behavior means the native filesystem must be the last
//	filesystem in the lookup list (otherwise it will claim all files
//	belong to it, and other filesystems will never get a look in).
//
// Results:
//	TCL_OK, to indicate 'yes', -1 to indicate no.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclNativePathInFilesystem(tls *libc.TLS, pathPtr uintptr, clientDataPtr uintptr) int32 { /* tclPathObj.c:2661:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// A special case is required to handle the empty path "". This is a valid
	// path (i.e. the user should be able to do 'file exists ""' without
	// throwing an error), but equally the path doesn't exist. Those are the
	// semantics of Tcl (at present anyway), so we have to abide by them here.

	if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr == uintptr(unsafe.Pointer(&tclFsPathType)) {
		if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != uintptr(0) && int32(*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes))) == 0 {
			// We reject the empty path "".

			return -1
		}

		// Otherwise there is no way this path can be empty.
	} else {
		// It is somewhat unusual to reach this code path without the object
		// being of tclFsPathType. However, we do our best to deal with the
		// situation.

		// var len int32 at bp, 4

		XTcl_GetStringFromObj(tls, pathPtr, bp)
		if *(*int32)(unsafe.Pointer(bp)) == 0 {
			// We reject the empty path "".

			return -1
		}
	}

	// Path is of correct type, or is of non-zero length, so we accept it.

	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// A linked list of the following structures is used to keep track of child
// processes that have been detached but haven't exited yet, so we can make
// sure that they're properly "reaped" (officially waited for) and don't lie
// around as zombies cluttering the system.

type Detached1 = struct {
	Fpid     Tcl_Pid
	FnextPtr uintptr
} /* tclPipe.c:22:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// A linked list of the following structures is used to keep track of child
// processes that have been detached but haven't exited yet, so we can make
// sure that they're properly "reaped" (officially waited for) and don't lie
// around as zombies cluttering the system.

type Detached = Detached1 /* tclPipe.c:26:3 */

var detList uintptr = uintptr(0) /* tclPipe.c:28:17 */

//----------------------------------------------------------------------
//
// FileForRedirect --
//
//	This function does much of the work of parsing redirection operators.
//	It handles "@" if specified and allowed, and a file name, and opens
//	the file if necessary.
//
// Results:
//	The return value is the descriptor number for the file. If an error
//	occurs then NULL is returned and an error message is left in the
//	interp's result. Several arguments are side-effected; see the argument
//	list below for details.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileForRedirect(tls *libc.TLS, interp uintptr, spec uintptr, atOK int32, arg uintptr, nextArg uintptr, flags int32, skipPtr uintptr, closePtr uintptr, releasePtr uintptr) TclFile { /* tclPipe.c:62:1: */
	bp := tls.Alloc(352)
	defer tls.Free(352)

	var writing int32
	var chan1 Tcl_Channel
	var file TclFile
	// var msg uintptr at bp+128, 8

	var name uintptr
	// var nameString Tcl_DString at bp+136, 216
	writing = flags & X_O_WRONLY

	*(*int32)(unsafe.Pointer(skipPtr)) = 1
	if !(atOK != 0 && int32(*(*int8)(unsafe.Pointer(spec))) == '@') {
		goto __1
	}
	spec++
	if !(int32(*(*int8)(unsafe.Pointer(spec))) == 0) {
		goto __3
	}
	spec = nextArg
	if !(spec == uintptr(0)) {
		goto __4
	}
	goto badLastArg
__4:
	;
	*(*int32)(unsafe.Pointer(skipPtr)) = 2
__3:
	;
	chan1 = XTcl_GetChannel(tls, interp, spec, uintptr(0))
	if !(chan1 == uintptr(0)) {
		goto __5
	}
	return uintptr(0)
__5:
	;
	file = XTclpMakeFile(tls, chan1, func() int32 {
		if writing != 0 {
			return int32(1) << 2
		}
		return int32(1) << 1
	}())
	if !(file == uintptr(0)) {
		goto __6
	}

	XTcl_GetChannelError(tls, chan1, bp+128)
	if !(*(*uintptr)(unsafe.Pointer(bp + 128)) != 0) {
		goto __7
	}
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 128 /* msg */)))
	goto __8
__7:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+55339,
		libc.VaList(bp, XTcl_GetChannelName(tls, chan1),
			func() uintptr {
				if writing != 0 {
					return ts + 55373 /* "writing" */
				}
				return ts + 55381 /* "reading" */
			}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+7949, ts+55389,
		ts+55394, uintptr(0)))
__8:
	;
	return uintptr(0)
__6:
	;
	*(*int32)(unsafe.Pointer(releasePtr)) = 1
	if !(writing != 0) {
		goto __9
	}
	// Be sure to flush output to the file, so that anything written
	// by the child appears after stuff we've already written.

	XTcl_Flush(tls, chan1)
__9:
	;
	goto __2
__1:

	if !(int32(*(*int8)(unsafe.Pointer(spec))) == 0) {
		goto __10
	}
	spec = nextArg
	if !(spec == uintptr(0)) {
		goto __11
	}
	goto badLastArg
__11:
	;
	*(*int32)(unsafe.Pointer(skipPtr)) = 2
__10:
	;
	name = XTcl_TranslateFileName(tls, interp, spec, bp+136)
	if !(name == uintptr(0)) {
		goto __12
	}
	return uintptr(0)
__12:
	;
	file = XTclpOpenFile(tls, name, flags)
	XTcl_DStringFree(tls, bp+136)
	if !(file == uintptr(0)) {
		goto __13
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+55402,
		libc.VaList(bp+56, func() uintptr {
			if writing != 0 {
				return ts + 33651 /* "write" */
			}
			return ts + 6057 /* "read" */
		}(), spec,
			XTcl_PosixError(tls, interp))))
	return uintptr(0)
__13:
	;
	*(*int32)(unsafe.Pointer(closePtr)) = 1
__2:
	;
	return file

badLastArg:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+55428, libc.VaList(bp+80, arg)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+88, ts+4178, ts+7949, ts+55389, ts+24312, uintptr(0)))
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_DetachPids --
//
//	This function is called to indicate that one or more child processes
//	have been placed in background and will never be waited for; they
//	should eventually be reaped by Tcl_ReapDetachedProcs.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_DetachPids(tls *libc.TLS, numPids int32, pidPtr uintptr) { /* tclPipe.c:181:1: */
	var detPtr uintptr
	var i int32

	for i = 0; i < numPids; i++ {
		detPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Detached{})))
		(*Detached)(unsafe.Pointer(detPtr)).Fpid = *(*Tcl_Pid)(unsafe.Pointer(pidPtr + uintptr(i)*8))
		(*Detached)(unsafe.Pointer(detPtr)).FnextPtr = detList
		detList = detPtr
	}

}

//----------------------------------------------------------------------
//
// Tcl_ReapDetachedProcs --
//
//	This function checks to see if any detached processes have exited and,
//	if so, it "reaps" them by officially waiting on them. It should be
//	called "occasionally" to make sure that all detached processes are
//	eventually reaped.
//
// Results:
//	None.
//
// Side effects:
//	Processes are waited on, so that they can be reaped by the system.
//
//----------------------------------------------------------------------

func XTcl_ReapDetachedProcs(tls *libc.TLS) { /* tclPipe.c:220:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var detPtr uintptr
	var nextPtr uintptr
	var prevPtr uintptr
	// var status int32 at bp, 4

	var pid Tcl_Pid

	detPtr = detList
	prevPtr = uintptr(0)
	for detPtr != uintptr(0) {
		pid = XTcl_WaitPid(tls, (*Detached)(unsafe.Pointer(detPtr)).Fpid, bp, WNOHANG)
		if pid == uintptr(0) || pid == libc.UintptrFromInt32(-1) && *(*int32)(unsafe.Pointer(libc.X_errno(tls))) != ECHILD {
			prevPtr = detPtr
			detPtr = (*Detached)(unsafe.Pointer(detPtr)).FnextPtr
			continue
		}
		nextPtr = (*Detached)(unsafe.Pointer(detPtr)).FnextPtr
		if prevPtr == uintptr(0) {
			detList = (*Detached)(unsafe.Pointer(detPtr)).FnextPtr
		} else {
			(*Detached)(unsafe.Pointer(prevPtr)).FnextPtr = (*Detached)(unsafe.Pointer(detPtr)).FnextPtr
		}
		XTclpFree(tls, detPtr)
		detPtr = nextPtr
	}

}

//----------------------------------------------------------------------
//
// TclCleanupChildren --
//
//	This is a utility function used to wait for child processes to exit,
//	record information about abnormal exits, and then collect any stderr
//	output generated by them.
//
// Results:
//	The return value is a standard Tcl result. If anything at weird
//	happened with the child processes, TCL_ERROR is returned and a message
//	is left in the interp's result.
//
// Side effects:
//	If the last character of the interp's result is a newline, then it is
//	removed unless keepNewline is non-zero. File errorId gets closed, and
//	pidPtr is freed back to the storage allocator.
//
//----------------------------------------------------------------------

func XTclCleanupChildren(tls *libc.TLS, interp uintptr, numPids int32, pidPtr uintptr, errorChan Tcl_Channel) int32 { /* tclPipe.c:270:1: */
	bp := tls.Alloc(260)
	defer tls.Free(260)

	var result int32 = TCL_OK
	var i int32
	var abnormalExit int32
	var anyErrorInfo int32
	var pid Tcl_Pid
	// var waitStatus int32 at bp+208, 4

	var msg uintptr
	var resolvedPid uint32

	abnormalExit = 0
	for i = 0; i < numPids; i++ {
		// We need to get the resolved pid before we wait on it as the windows
		// implementation of Tcl_WaitPid deletes the information such that any
		// following calls to TclpGetPid fail.

		resolvedPid = uint32(XTclpGetPid(tls, *(*Tcl_Pid)(unsafe.Pointer(pidPtr + uintptr(i)*8))))
		pid = XTcl_WaitPid(tls, *(*Tcl_Pid)(unsafe.Pointer(pidPtr + uintptr(i)*8)), bp+208, 0)
		if pid == libc.UintptrFromInt32(-1) {
			result = TCL_ERROR
			if interp != uintptr(0) {
				msg = XTcl_PosixError(tls, interp)
				if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == ECHILD {
					// This changeup in message suggested by Mark Diekhans to
					// remind people that ECHILD errors can occur on some
					// systems if SIGCHLD isn't in its default state.

					msg = ts + 55471 /* "child process lo..." */
				}
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+55523, libc.VaList(bp, msg)))
			}
			continue
		}

		// Create error messages for unusual process exits. An extra newline
		// gets appended to each error message, but it gets removed below (in
		// the same fashion that an extra newline in the command's output is
		// removed).

		if !(uint32(*(*int32)(unsafe.Pointer(bp + 208)))&0xC0000000 == uint32(0)) || *(*int32)(unsafe.Pointer(bp + 208)) != 0 {
			// var msg1 [24]int8 at bp+212, 24

			// var msg2 [24]int8 at bp+236, 24

			result = TCL_ERROR
			libc.Xsprintf(tls, bp+212, ts+55561, libc.VaList(bp+8, resolvedPid))
			if uint32(*(*int32)(unsafe.Pointer(bp + 208)))&0xC0000000 == uint32(0) {
				if interp != uintptr(0) {
					libc.Xsprintf(tls, bp+236, ts+55565, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(bp + 208))))
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+55568, bp+212, bp+236, uintptr(0)))
				}
				abnormalExit = 1
			} else if interp != uintptr(0) {
				var p uintptr

				if uint32(*(*int32)(unsafe.Pointer(bp + 208)))&0xC0000000 != 0 {
					p = XTcl_SignalMsg(tls, *(*int32)(unsafe.Pointer(bp + 208))&0x7F)
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+55580, bp+212,
						XTcl_SignalId(tls, *(*int32)(unsafe.Pointer(bp + 208))&0x7F), p, uintptr(0)))
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
						ts+55592, libc.VaList(bp+96, p)))
				} else if 0 != 0 {
					p = XTcl_SignalMsg(tls, *(*int32)(unsafe.Pointer(bp + 208))>>8&0xFF)
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+55610, bp+212,
						XTcl_SignalId(tls, *(*int32)(unsafe.Pointer(bp + 208))>>8&0xFF), p, uintptr(0)))
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
						ts+55620, libc.VaList(bp+144, p)))
				} else {
					XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
						ts+55641, -1))
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp+152, ts+4178, ts+7949, ts+55389,
						ts+55678, bp+212, uintptr(0)))
				}
			}
		}
	}

	// Read the standard error file. If there's anything there, then return an
	// error and add the file's contents to the result string.

	anyErrorInfo = 0
	if errorChan != uintptr(0) {
		// Make sure we start at the beginning of the file.

		if interp != uintptr(0) {
			var count int32
			var objPtr uintptr

			XTcl_Seek(tls, errorChan, int64(0), SEEK_SET)
			objPtr = XTcl_NewObj(tls)
			count = XTcl_ReadChars(tls, errorChan, objPtr, -1, 0)
			if count < 0 {
				result = TCL_ERROR
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = objPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				XTcl_ResetResult(tls, interp)
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+55692,
					libc.VaList(bp+200, XTcl_PosixError(tls, interp))))
			} else if count > 0 {
				anyErrorInfo = 1
				XTcl_SetObjResult(tls, interp, objPtr)
				result = TCL_ERROR
			} else {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _objPtr uintptr = objPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
		}
		XTcl_Close(tls, uintptr(0), errorChan)
	}

	// If a child exited abnormally but didn't output any error information at
	// all, generate an error message here.

	if abnormalExit != 0 && anyErrorInfo == 0 && interp != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+55729, -1))
	}
	return result
}

//----------------------------------------------------------------------
//
// TclCreatePipeline --
//
//	Given an argc/argv array, instantiate a pipeline of processes as
//	described by the argv.
//
//	This function is unofficially exported for use by BLT.
//
// Results:
//	The return value is a count of the number of new processes created, or
//	-1 if an error occurred while creating the pipeline. *pidArrayPtr is
//	filled in with the address of a dynamically allocated array giving the
//	ids of all of the processes. It is up to the caller to free this array
//	when it isn't needed anymore. If inPipePtr is non-NULL, *inPipePtr is
//	filled in with the file id for the input pipe for the pipeline (if
//	any): the caller must eventually close this file. If outPipePtr isn't
//	NULL, then *outPipePtr is filled in with the file id for the output
//	pipe from the pipeline: the caller must close this file. If errFilePtr
//	isn't NULL, then *errFilePtr is filled with a file id that may be used
//	to read error output after the pipeline completes.
//
// Side effects:
//	Processes and pipes are created.
//
//----------------------------------------------------------------------

func XTclCreatePipeline(tls *libc.TLS, interp uintptr, argc int32, argv uintptr, pidArrayPtr uintptr, inPipePtr uintptr, outPipePtr uintptr, errFilePtr uintptr) int32 { /* tclPipe.c:436:1: */
	bp := tls.Alloc(504)
	defer tls.Free(504)

	var pidPtr uintptr // Points to malloc-ed array holding all the
	// pids of child processes.
	var numPids int32 // Actual number of processes that exist at
	// *pidPtr right now.
	var cmdCount int32 // Count of number of distinct commands found
	// in argc/argv.
	var inputLiteral uintptr
	// If non-null, then this points to a string
	// containing input data (specified via <<) to
	// be piped to the first process in the
	// pipeline.
	// var inputFile TclFile at bp+464, 8
	// If != NULL, gives file to use as input for
	// first process in pipeline (specified via <
	// or <@).
	// var inputClose int32 at bp+436, 4
	// If non-zero, then inputFile should be
	// closed when cleaning up.
	// var inputRelease int32 at bp+440, 4

	// var outputFile TclFile at bp+472, 8
	// Writable file for output from last command
	// in pipeline (could be file or pipe). NULL
	// means use stdout.
	// var outputClose int32 at bp+444, 4
	// If non-zero, then outputFile should be
	// closed when cleaning up.
	// var outputRelease int32 at bp+448, 4

	var errorFile TclFile // Writable file for error output from all
	// commands in pipeline. NULL means use
	// stderr.
	// var errorClose int32 at bp+452, 4
	// If non-zero, then errorFile should be
	// closed when cleaning up.
	// var errorRelease int32 at bp+456, 4

	var p uintptr
	var nextArg uintptr
	// var skip int32 at bp+432, 4

	var lastBar int32
	var lastArg int32
	var i int32
	var j int32
	var atOK int32
	var flags int32
	var needCmd int32
	var errorToOutput int32
	// var execBuffer Tcl_DString at bp+216, 216

	// var pipeIn TclFile at bp+480, 8

	var curInFile TclFile
	// var curOutFile TclFile at bp+488, 8

	var curErrFile TclFile
	var channel Tcl_Channel
	var result int32
	var joinThisError int32
	// var pid Tcl_Pid at bp+496, 8

	var oldName uintptr
	pidPtr = uintptr(0)
	inputLiteral = uintptr(0)
	*(*TclFile)(unsafe.Pointer(bp + 464 /* inputFile */)) = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 436 /* inputClose */)) = 0
	*(*int32)(unsafe.Pointer(bp + 440 /* inputRelease */)) = 0
	*(*TclFile)(unsafe.Pointer(bp + 472 /* outputFile */)) = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 444 /* outputClose */)) = 0
	*(*int32)(unsafe.Pointer(bp + 448 /* outputRelease */)) = 0
	errorFile = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 452 /* errorClose */)) = 0
	*(*int32)(unsafe.Pointer(bp + 456 /* errorRelease */)) = 0
	errorToOutput = 0

	if !(inPipePtr != uintptr(0)) {
		goto __1
	}
	*(*TclFile)(unsafe.Pointer(inPipePtr)) = uintptr(0)
__1:
	;
	if !(outPipePtr != uintptr(0)) {
		goto __2
	}
	*(*TclFile)(unsafe.Pointer(outPipePtr)) = uintptr(0)
__2:
	;
	if !(errFilePtr != uintptr(0)) {
		goto __3
	}
	*(*TclFile)(unsafe.Pointer(errFilePtr)) = uintptr(0)
__3:
	;

	XTcl_DStringInit(tls, bp+216)

	*(*TclFile)(unsafe.Pointer(bp + 480 /* pipeIn */)) = uintptr(0)
	curInFile = uintptr(0)
	*(*TclFile)(unsafe.Pointer(bp + 488 /* curOutFile */)) = uintptr(0)
	numPids = 0

	// First, scan through all the arguments to figure out the structure of
	// the pipeline. Process all of the input and output redirection arguments
	// and remove them from the argument list in the pipeline. Count the
	// number of distinct processes (it's the number of "|" arguments plus
	// one) but don't remove the "|" arguments because they'll be used in the
	// second pass to seperate the individual child processes. Cannot start
	// the child processes in this pass because the redirection symbols may
	// appear anywhere in the command line - e.g., the '<' that specifies the
	// input to the entire pipe may appear at the very end of the argument
	// list.

	lastBar = -1
	cmdCount = 1
	needCmd = 1
	i = 0
__4:
	if !(i < argc) {
		goto __6
	}
	errorToOutput = 0
	*(*int32)(unsafe.Pointer(bp + 432 /* skip */)) = 0
	p = *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))
	switch int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))) {
	case '|':
		goto __8

	case '<':
		goto __9

	case '>':
		goto __10

	case '2':
		goto __11

	default:
		goto __12
	}
	goto __7
__8:
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '&') {
		goto __13
	}
	p++
__13:
	;
	if !(int32(*(*int8)(unsafe.Pointer(p))) == 0) {
		goto __14
	}
	if !(i == lastBar+1 || i == argc-1) {
		goto __15
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+55761, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+55389,
		ts+55795, uintptr(0)))
	goto error
__15:
	;
__14:
	;
	lastBar = i
	cmdCount++
	needCmd = 1
	goto __7

__9:
	if !(*(*int32)(unsafe.Pointer(bp + 436)) != 0) {
		goto __16
	}
	*(*int32)(unsafe.Pointer(bp + 436 /* inputClose */)) = 0
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 464 /* inputFile */)))
__16:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 440)) != 0) {
		goto __17
	}
	*(*int32)(unsafe.Pointer(bp + 440 /* inputRelease */)) = 0
	XTclpFree(tls, *(*TclFile)(unsafe.Pointer(bp + 464)))
__17:
	;
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '<') {
		goto __18
	}
	*(*TclFile)(unsafe.Pointer(bp + 464 /* inputFile */)) = uintptr(0)
	inputLiteral = p + uintptr(1)
	*(*int32)(unsafe.Pointer(bp + 432 /* skip */)) = 1
	if !(int32(*(*int8)(unsafe.Pointer(inputLiteral))) == 0) {
		goto __20
	}
	if i+1 == argc {
		inputLiteral = uintptr(0)
	} else {
		inputLiteral = *(*uintptr)(unsafe.Pointer(argv + uintptr(i+1)*8))
	}
	if !(inputLiteral == uintptr(0)) {
		goto __21
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+55428,
		libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7949, ts+55389,
		ts+55795, uintptr(0)))
	goto error
__21:
	;
	*(*int32)(unsafe.Pointer(bp + 432 /* skip */)) = 2
__20:
	;
	goto __19
__18:
	if i+1 == argc {
		nextArg = uintptr(0)
	} else {
		nextArg = *(*uintptr)(unsafe.Pointer(argv + uintptr(i+1)*8))
	}
	inputLiteral = uintptr(0)
	*(*TclFile)(unsafe.Pointer(bp + 464 /* inputFile */)) = sFileForRedirect(tls, interp, p, 1, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), nextArg,
		X_O_RDONLY, bp+432, bp+436, bp+440)
	if !(*(*TclFile)(unsafe.Pointer(bp + 464)) == uintptr(0)) {
		goto __22
	}
	goto error
__22:
	;
__19:
	;
	goto __7

__10:
	atOK = 1
	flags = X_O_WRONLY | X_O_CREAT | X_O_TRUNC
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '>') {
		goto __23
	}
	p++
	atOK = 0

	// Note that the O_APPEND flag only has an effect on POSIX
	// platforms. On Windows, we just have to carry on regardless.

	flags = X_O_WRONLY | X_O_CREAT | X_O_APPEND
__23:
	;
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '&') {
		goto __24
	}
	if !(*(*int32)(unsafe.Pointer(bp + 452)) != 0) {
		goto __25
	}
	*(*int32)(unsafe.Pointer(bp + 452 /* errorClose */)) = 0
	XTclpCloseFile(tls, errorFile)
__25:
	;
	errorToOutput = 1
	p++
__24:
	;

	// Close the old output file, but only if the error file is not
	// also using it.

	if !(*(*int32)(unsafe.Pointer(bp + 444)) != 0) {
		goto __26
	}
	*(*int32)(unsafe.Pointer(bp + 444 /* outputClose */)) = 0
	if !(errorFile == *(*TclFile)(unsafe.Pointer(bp + 472))) {
		goto __27
	}
	*(*int32)(unsafe.Pointer(bp + 452 /* errorClose */)) = 1
	goto __28
__27:
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 472 /* outputFile */)))
__28:
	;
__26:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 448)) != 0) {
		goto __29
	}
	*(*int32)(unsafe.Pointer(bp + 448 /* outputRelease */)) = 0
	if !(errorFile == *(*TclFile)(unsafe.Pointer(bp + 472))) {
		goto __30
	}
	*(*int32)(unsafe.Pointer(bp + 456 /* errorRelease */)) = 1
	goto __31
__30:
	XTclpFree(tls, *(*TclFile)(unsafe.Pointer(bp + 472)))
__31:
	;
__29:
	;
	if i+1 == argc {
		nextArg = uintptr(0)
	} else {
		nextArg = *(*uintptr)(unsafe.Pointer(argv + uintptr(i+1)*8))
	}
	*(*TclFile)(unsafe.Pointer(bp + 472 /* outputFile */)) = sFileForRedirect(tls, interp, p, atOK, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), nextArg,
		flags, bp+432, bp+444, bp+448)
	if !(*(*TclFile)(unsafe.Pointer(bp + 472)) == uintptr(0)) {
		goto __32
	}
	goto error
__32:
	;
	if !(errorToOutput != 0) {
		goto __33
	}
	if !(*(*int32)(unsafe.Pointer(bp + 452)) != 0) {
		goto __34
	}
	*(*int32)(unsafe.Pointer(bp + 452 /* errorClose */)) = 0
	XTclpCloseFile(tls, errorFile)
__34:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 456)) != 0) {
		goto __35
	}
	*(*int32)(unsafe.Pointer(bp + 456 /* errorRelease */)) = 0
	XTclpFree(tls, errorFile)
__35:
	;
	errorFile = *(*TclFile)(unsafe.Pointer(bp + 472 /* outputFile */))
__33:
	;
	goto __7

__11:
	if !(int32(*(*int8)(unsafe.Pointer(p))) != '>') {
		goto __36
	}
	goto __7
__36:
	;
	p++
	atOK = 1
	flags = X_O_WRONLY | X_O_CREAT | X_O_TRUNC
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '>') {
		goto __37
	}
	p++
	atOK = 0

	// Note that the O_APPEND flag only has an effect on POSIX
	// platforms. On Windows, we just have to carry on regardless.

	flags = X_O_WRONLY | X_O_CREAT | X_O_APPEND
__37:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 452)) != 0) {
		goto __38
	}
	*(*int32)(unsafe.Pointer(bp + 452 /* errorClose */)) = 0
	XTclpCloseFile(tls, errorFile)
__38:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 456)) != 0) {
		goto __39
	}
	*(*int32)(unsafe.Pointer(bp + 456 /* errorRelease */)) = 0
	XTclpFree(tls, errorFile)
__39:
	;
	if !(atOK != 0 && int32(*(*int8)(unsafe.Pointer(p))) == '@' && int32(*(*int8)(unsafe.Pointer(p + 1))) == '1' && int32(*(*int8)(unsafe.Pointer(p + 2))) == 0) {
		goto __40
	}
	// Special case handling of 2>@1 to redirect stderr to the
	// exec/open output pipe as well. This is meant for the end of
	// the command string, otherwise use |& between commands.

	if !(i != argc-1) {
		goto __42
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+55806,
		libc.VaList(bp+88, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+7949, ts+55389,
		ts+55795, uintptr(0)))
	goto error
__42:
	;
	errorFile = *(*TclFile)(unsafe.Pointer(bp + 472 /* outputFile */))
	errorToOutput = 2
	*(*int32)(unsafe.Pointer(bp + 432 /* skip */)) = 1
	goto __41
__40:
	if i+1 == argc {
		nextArg = uintptr(0)
	} else {
		nextArg = *(*uintptr)(unsafe.Pointer(argv + uintptr(i+1)*8))
	}
	errorFile = sFileForRedirect(tls, interp, p, atOK, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)),
		nextArg, flags, bp+432, bp+452, bp+456)
	if !(errorFile == uintptr(0)) {
		goto __43
	}
	goto error
__43:
	;
__41:
	;
	goto __7

__12:
	// Got a command word, not a redirection.

	needCmd = 0
	goto __7
__7:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 432)) != 0) {
		goto __44
	}
	j = i + *(*int32)(unsafe.Pointer(bp + 432))
__45:
	if !(j < argc) {
		goto __47
	}
	*(*uintptr)(unsafe.Pointer(argv + uintptr(j-*(*int32)(unsafe.Pointer(bp + 432)))*8)) = *(*uintptr)(unsafe.Pointer(argv + uintptr(j)*8))
	goto __46
__46:
	j++
	goto __45
	goto __47
__47:
	;
	argc = argc - *(*int32)(unsafe.Pointer(bp + 432))
	i = i - 1
__44:
	;
	goto __5
__5:
	i++
	goto __4
	goto __6
__6:
	;

	if !(needCmd != 0) {
		goto __48
	}
	// We had a bar followed only by redirections.

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+55761, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+136, ts+4178, ts+7949, ts+55389, ts+55795,
		uintptr(0)))
	goto error
__48:
	;

	if !(*(*TclFile)(unsafe.Pointer(bp + 464)) == uintptr(0)) {
		goto __49
	}
	if !(inputLiteral != uintptr(0)) {
		goto __50
	}
	// The input for the first process is immediate data coming from
	// Tcl. Create a temporary file for it and put the data into the
	// file.

	*(*TclFile)(unsafe.Pointer(bp + 464 /* inputFile */)) = XTclpCreateTempFile(tls, inputLiteral)
	if !(*(*TclFile)(unsafe.Pointer(bp + 464)) == uintptr(0)) {
		goto __52
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+55848,
		libc.VaList(bp+176, XTcl_PosixError(tls, interp))))
	goto error
__52:
	;
	*(*int32)(unsafe.Pointer(bp + 436 /* inputClose */)) = 1
	goto __51
__50:
	if !(inPipePtr != uintptr(0)) {
		goto __53
	}
	// The input for the first process in the pipeline is to come from
	// a pipe that can be written from by the caller.

	if !(XTclpCreatePipe(tls, bp+464, inPipePtr) == 0) {
		goto __55
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+55891,
		libc.VaList(bp+184, XTcl_PosixError(tls, interp))))
	goto error
__55:
	;
	*(*int32)(unsafe.Pointer(bp + 436 /* inputClose */)) = 1
	goto __54
__53:
	// The input for the first process comes from stdin.

	channel = XTcl_GetStdChannel(tls, int32(1)<<1)
	if !(channel != uintptr(0)) {
		goto __56
	}
	*(*TclFile)(unsafe.Pointer(bp + 464 /* inputFile */)) = XTclpMakeFile(tls, channel, int32(1)<<1)
	if !(*(*TclFile)(unsafe.Pointer(bp + 464)) != uintptr(0)) {
		goto __57
	}
	*(*int32)(unsafe.Pointer(bp + 440 /* inputRelease */)) = 1
__57:
	;
__56:
	;
__54:
	;
__51:
	;
__49:
	;

	if !(*(*TclFile)(unsafe.Pointer(bp + 472)) == uintptr(0)) {
		goto __58
	}
	if !(outPipePtr != uintptr(0)) {
		goto __59
	}
	// Output from the last process in the pipeline is to go to a pipe
	// that can be read by the caller.

	if !(XTclpCreatePipe(tls, outPipePtr, bp+472) == 0) {
		goto __61
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+55934,
		libc.VaList(bp+192, XTcl_PosixError(tls, interp))))
	goto error
__61:
	;
	*(*int32)(unsafe.Pointer(bp + 444 /* outputClose */)) = 1
	goto __60
__59:
	// The output for the last process goes to stdout.

	channel = XTcl_GetStdChannel(tls, int32(1)<<2)
	if !(channel != 0) {
		goto __62
	}
	*(*TclFile)(unsafe.Pointer(bp + 472 /* outputFile */)) = XTclpMakeFile(tls, channel, int32(1)<<2)
	if !(*(*TclFile)(unsafe.Pointer(bp + 472)) != uintptr(0)) {
		goto __63
	}
	*(*int32)(unsafe.Pointer(bp + 448 /* outputRelease */)) = 1
__63:
	;
__62:
	;
__60:
	;
__58:
	;

	if !(errorFile == uintptr(0)) {
		goto __64
	}
	if !(errorToOutput == 2) {
		goto __65
	}
	// Handle 2>@1 special case at end of cmd line.

	errorFile = *(*TclFile)(unsafe.Pointer(bp + 472 /* outputFile */))
	goto __66
__65:
	if !(errFilePtr != uintptr(0)) {
		goto __67
	}
	// Set up the standard error output sink for the pipeline, if
	// requested. Use a temporary file which is opened, then deleted.
	// Could potentially just use pipe, but if it filled up it could
	// cause the pipeline to deadlock: we'd be waiting for processes
	// to complete before reading stderr, and processes couldn't
	// complete because stderr was backed up.

	errorFile = XTclpCreateTempFile(tls, uintptr(0))
	if !(errorFile == uintptr(0)) {
		goto __69
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+55978,
		libc.VaList(bp+200, XTcl_PosixError(tls, interp))))
	goto error
__69:
	;
	*(*TclFile)(unsafe.Pointer(errFilePtr)) = errorFile
	goto __68
__67:
	// Errors from the pipeline go to stderr.

	channel = XTcl_GetStdChannel(tls, int32(1)<<3)
	if !(channel != 0) {
		goto __70
	}
	errorFile = XTclpMakeFile(tls, channel, int32(1)<<2)
	if !(errorFile != uintptr(0)) {
		goto __71
	}
	*(*int32)(unsafe.Pointer(bp + 456 /* errorRelease */)) = 1
__71:
	;
__70:
	;
__68:
	;
__66:
	;
__64:
	;

	// Scan through the argc array, creating a process for each group of
	// arguments between the "|" characters.

	XTcl_ReapDetachedProcs(tls)
	pidPtr = XTcl_Alloc(tls, uint32(uint64(cmdCount)*uint64(unsafe.Sizeof(Tcl_Pid(0)))))

	curInFile = *(*TclFile)(unsafe.Pointer(bp + 464 /* inputFile */))

	i = 0
__72:
	if !(i < argc) {
		goto __74
	}

	// Convert the program name into native form.

	if !(XTcl_TranslateFileName(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), bp+216) == uintptr(0)) {
		goto __75
	}
	goto error
__75:
	;

	// Find the end of the current segment of the pipeline.

	joinThisError = 0
	lastArg = i
__76:
	if !(lastArg < argc) {
		goto __78
	}
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(lastArg)*8))))) != '|') {
		goto __79
	}
	goto __77
__79:
	;
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(lastArg)*8)) + 1))) == 0) {
		goto __80
	}
	goto __78
__80:
	;
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(lastArg)*8)) + 1))) == '&' && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(lastArg)*8)) + 2))) == 0) {
		goto __81
	}
	joinThisError = 1
	goto __78
__81:
	;
	goto __77
__77:
	lastArg++
	goto __76
	goto __78
__78:
	;

	// If this is the last segment, use the specified outputFile.
	// Otherwise create an intermediate pipe. pipeIn will become the
	// curInFile for the next segment of the pipe.

	if !(lastArg == argc) {
		goto __82
	}
	*(*TclFile)(unsafe.Pointer(bp + 488 /* curOutFile */)) = *(*TclFile)(unsafe.Pointer(bp + 472 /* outputFile */))
	goto __83
__82:
	*(*uintptr)(unsafe.Pointer(argv + uintptr(lastArg)*8)) = uintptr(0)
	if !(XTclpCreatePipe(tls, bp+480, bp+488) == 0) {
		goto __84
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+56021, libc.VaList(bp+208, XTcl_PosixError(tls, interp))))
	goto error
__84:
	;
__83:
	;

	if !(joinThisError != 0) {
		goto __85
	}
	curErrFile = *(*TclFile)(unsafe.Pointer(bp + 488 /* curOutFile */))
	goto __86
__85:
	curErrFile = errorFile
__86:
	;

	// Restore argv[i], since a caller wouldn't expect the contents of
	// argv to be modified.

	oldName = *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))
	*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) = (*Tcl_DString)(unsafe.Pointer(bp + 216)).Fstring
	result = XTclpCreateProcess(tls, interp, lastArg-i, argv+uintptr(i)*8,
		curInFile, *(*TclFile)(unsafe.Pointer(bp + 488 /* curOutFile */)), curErrFile, bp+496)
	*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) = oldName
	if !(result != TCL_OK) {
		goto __87
	}
	goto error
__87:
	;
	XTcl_DStringFree(tls, bp+216)

	*(*Tcl_Pid)(unsafe.Pointer(pidPtr + uintptr(numPids)*8)) = *(*Tcl_Pid)(unsafe.Pointer(bp + 496 /* pid */))
	numPids++

	// Close off our copies of file descriptors that were set up for this
	// child, then set up the input for the next child.

	if !(curInFile != uintptr(0) && curInFile != *(*TclFile)(unsafe.Pointer(bp + 464))) {
		goto __88
	}
	XTclpCloseFile(tls, curInFile)
__88:
	;
	curInFile = *(*TclFile)(unsafe.Pointer(bp + 480 /* pipeIn */))
	*(*TclFile)(unsafe.Pointer(bp + 480 /* pipeIn */)) = uintptr(0)

	if !(*(*TclFile)(unsafe.Pointer(bp + 488)) != uintptr(0) && *(*TclFile)(unsafe.Pointer(bp + 488)) != *(*TclFile)(unsafe.Pointer(bp + 472))) {
		goto __89
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 488 /* curOutFile */)))
__89:
	;
	*(*TclFile)(unsafe.Pointer(bp + 488 /* curOutFile */)) = uintptr(0)
	goto __73
__73:
	i = lastArg + 1
	goto __72
	goto __74
__74:
	;

	*(*uintptr)(unsafe.Pointer(pidArrayPtr)) = pidPtr

	// All done. Cleanup open files lying around and then return.

cleanup:
	XTcl_DStringFree(tls, bp+216)

	if !(*(*int32)(unsafe.Pointer(bp + 436)) != 0) {
		goto __90
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 464 /* inputFile */)))
	goto __91
__90:
	if !(*(*int32)(unsafe.Pointer(bp + 440)) != 0) {
		goto __92
	}
	XTclpFree(tls, *(*TclFile)(unsafe.Pointer(bp + 464)))
__92:
	;
__91:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 444)) != 0) {
		goto __93
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 472 /* outputFile */)))
	goto __94
__93:
	if !(*(*int32)(unsafe.Pointer(bp + 448)) != 0) {
		goto __95
	}
	XTclpFree(tls, *(*TclFile)(unsafe.Pointer(bp + 472)))
__95:
	;
__94:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 452)) != 0) {
		goto __96
	}
	XTclpCloseFile(tls, errorFile)
	goto __97
__96:
	if !(*(*int32)(unsafe.Pointer(bp + 456)) != 0) {
		goto __98
	}
	XTclpFree(tls, errorFile)
__98:
	;
__97:
	;
	return numPids

	// An error occurred. There could have been extra files open, such as
	// pipes between children. Clean them all up. Detach any child processes
	// that have been created.

error:
	if !(*(*TclFile)(unsafe.Pointer(bp + 480)) != uintptr(0)) {
		goto __99
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 480 /* pipeIn */)))
__99:
	;
	if !(*(*TclFile)(unsafe.Pointer(bp + 488)) != uintptr(0) && *(*TclFile)(unsafe.Pointer(bp + 488)) != *(*TclFile)(unsafe.Pointer(bp + 472))) {
		goto __100
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 488 /* curOutFile */)))
__100:
	;
	if !(curInFile != uintptr(0) && curInFile != *(*TclFile)(unsafe.Pointer(bp + 464))) {
		goto __101
	}
	XTclpCloseFile(tls, curInFile)
__101:
	;
	if !(inPipePtr != uintptr(0) && *(*TclFile)(unsafe.Pointer(inPipePtr)) != uintptr(0)) {
		goto __102
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(inPipePtr)))
	*(*TclFile)(unsafe.Pointer(inPipePtr)) = uintptr(0)
__102:
	;
	if !(outPipePtr != uintptr(0) && *(*TclFile)(unsafe.Pointer(outPipePtr)) != uintptr(0)) {
		goto __103
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(outPipePtr)))
	*(*TclFile)(unsafe.Pointer(outPipePtr)) = uintptr(0)
__103:
	;
	if !(errFilePtr != uintptr(0) && *(*TclFile)(unsafe.Pointer(errFilePtr)) != uintptr(0)) {
		goto __104
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(errFilePtr)))
	*(*TclFile)(unsafe.Pointer(errFilePtr)) = uintptr(0)
__104:
	;
	if !(pidPtr != uintptr(0)) {
		goto __105
	}
	i = 0
__106:
	if !(i < numPids) {
		goto __108
	}
	if !(*(*Tcl_Pid)(unsafe.Pointer(pidPtr + uintptr(i)*8)) != libc.UintptrFromInt32(-1)) {
		goto __109
	}
	XTcl_DetachPids(tls, 1, pidPtr+uintptr(i)*8)
__109:
	;
	goto __107
__107:
	i++
	goto __106
	goto __108
__108:
	;
	XTclpFree(tls, pidPtr)
__105:
	;
	numPids = -1
	goto cleanup
	return int32(0)
}

//----------------------------------------------------------------------
//
// Tcl_OpenCommandChannel --
//
//	Opens an I/O channel to one or more subprocesses specified by argc and
//	argv. The flags argument determines the disposition of the stdio
//	handles. If the TCL_STDIN flag is set then the standard input for the
//	first subprocess will be tied to the channel: writing to the channel
//	will provide input to the subprocess. If TCL_STDIN is not set, then
//	standard input for the first subprocess will be the same as this
//	application's standard input. If TCL_STDOUT is set then standard
//	output from the last subprocess can be read from the channel;
//	otherwise it goes to this application's standard output. If TCL_STDERR
//	is set, standard error output for all subprocesses is returned to the
//	channel and results in an error when the channel is closed; otherwise
//	it goes to this application's standard error. If TCL_ENFORCE_MODE is
//	not set, then argc and argv can redirect the stdio handles to override
//	TCL_STDIN, TCL_STDOUT, and TCL_STDERR; if it is set, then it is an
//	error for argc and argv to override stdio channels for which
//	TCL_STDIN, TCL_STDOUT, and TCL_STDERR have been set.
//
// Results:
//	A new command channel, or NULL on failure with an error message left
//	in interp.
//
// Side effects:
//	Creates processes, opens pipes.
//
//----------------------------------------------------------------------

func XTcl_OpenCommandChannel(tls *libc.TLS, interp uintptr, argc int32, argv uintptr, flags int32) Tcl_Channel { /* tclPipe.c:1056:1: */
	bp := tls.Alloc(152)
	defer tls.Free(152)

	var inPipePtr uintptr
	var outPipePtr uintptr
	var errFilePtr uintptr
	// var inPipe TclFile at bp+120, 8

	// var outPipe TclFile at bp+128, 8

	// var errFile TclFile at bp+136, 8

	var numPids int32
	// var pidPtr uintptr at bp+144, 8

	var channel Tcl_Channel

	*(*TclFile)(unsafe.Pointer(bp + 120 /* inPipe */)) = libc.AssignPtrUintptr(bp+128 /* outPipe */, libc.AssignPtrUintptr(bp+136 /* errFile */, uintptr(0)))

	if flags&(int32(1)<<1) != 0 {
		inPipePtr = bp + 120 /* &inPipe */
	} else {
		inPipePtr = uintptr(0)
	}
	if flags&(int32(1)<<2) != 0 {
		outPipePtr = bp + 128 /* &outPipe */
	} else {
		outPipePtr = uintptr(0)
	}
	if flags&(int32(1)<<3) != 0 {
		errFilePtr = bp + 136 /* &errFile */
	} else {
		errFilePtr = uintptr(0)
	}

	numPids = XTclCreatePipeline(tls, interp, argc, argv, bp+144, inPipePtr,
		outPipePtr, errFilePtr)

	if !(numPids < 0) {
		goto __1
	}
	goto error
__1:
	;

	// Verify that the pipes that were created satisfy the readable/writable
	// constraints.

	if !(flags&(int32(1)<<4) != 0) {
		goto __2
	}
	if !(flags&(int32(1)<<2) != 0 && *(*TclFile)(unsafe.Pointer(bp + 128)) == uintptr(0)) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+56046, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+55389,
		ts+56109, uintptr(0)))
	goto error
__3:
	;
	if !(flags&(int32(1)<<1) != 0 && *(*TclFile)(unsafe.Pointer(bp + 120)) == uintptr(0)) {
		goto __4
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+56121, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7949, ts+55389,
		ts+56109, uintptr(0)))
	goto error
__4:
	;
__2:
	;

	channel = XTclpCreateCommandChannel(tls, *(*TclFile)(unsafe.Pointer(bp + 128 /* outPipe */)), *(*TclFile)(unsafe.Pointer(bp + 120 /* inPipe */)), *(*TclFile)(unsafe.Pointer(bp + 136 /* errFile */)),
		numPids, *(*uintptr)(unsafe.Pointer(bp + 144 /* pidPtr */)))

	if !(channel == uintptr(0)) {
		goto __5
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+56181, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+7949, ts+55389, ts+56219, uintptr(0)))
	goto error
__5:
	;
	return channel

error:
	if !(numPids > 0) {
		goto __6
	}
	XTcl_DetachPids(tls, numPids, *(*uintptr)(unsafe.Pointer(bp + 144 /* pidPtr */)))
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 144)))
__6:
	;
	if !(*(*TclFile)(unsafe.Pointer(bp + 120)) != uintptr(0)) {
		goto __7
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 120 /* inPipe */)))
__7:
	;
	if !(*(*TclFile)(unsafe.Pointer(bp + 128)) != uintptr(0)) {
		goto __8
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 128 /* outPipe */)))
__8:
	;
	if !(*(*TclFile)(unsafe.Pointer(bp + 136)) != uintptr(0)) {
		goto __9
	}
	XTclpCloseFile(tls, *(*TclFile)(unsafe.Pointer(bp + 136 /* errFile */)))
__9:
	;
	return uintptr(0)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Each invocation of the "package ifneeded" command creates a structure of
// the following type, which is used to load the package into the interpreter
// if it is requested with a "package require" command.

type PkgAvail1 = struct {
	Fversion uintptr
	Fscript  uintptr
	FnextPtr uintptr
} /* tclPkg.c:26:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Each invocation of the "package ifneeded" command creates a structure of
// the following type, which is used to load the package into the interpreter
// if it is requested with a "package require" command.

type PkgAvail = PkgAvail1 /* tclPkg.c:33:3 */

// For each package that is known in any way to an interpreter, there is one
// record of the following type. These records are stored in the
// "packageTable" hash table in the interpreter, keyed by package name such as
// "Tk" (no version number).

type Package1 = struct {
	Fversion    uintptr
	FavailPtr   uintptr
	FclientData uintptr
} /* tclPkg.c:42:9 */

// For each package that is known in any way to an interpreter, there is one
// record of the following type. These records are stored in the
// "packageTable" hash table in the interpreter, keyed by package name such as
// "Tk" (no version number).

type Package = Package1 /* tclPkg.c:47:3 */

type Require1 = struct {
	FclientDataPtr    uintptr
	Fname             uintptr
	FpkgPtr           uintptr
	FversionToProvide uintptr
} /* tclPkg.c:49:9 */

type Require = Require1 /* tclPkg.c:54:3 */

type RequireProcArgs1 = struct {
	Fname          uintptr
	FclientDataPtr uintptr
} /* tclPkg.c:56:9 */

type RequireProcArgs = RequireProcArgs1 /* tclPkg.c:59:3 */

// Helper macros.

//----------------------------------------------------------------------
//
// Tcl_PkgProvide / Tcl_PkgProvideEx --
//
//	This function is invoked to declare that a particular version of a
//	particular package is now present in an interpreter. There must not be
//	any other version of this package already provided in the interpreter.
//
// Results:
//	Normally returns TCL_OK; if there is already another version of the
//	package loaded then TCL_ERROR is returned and an error message is left
//	in the interp's result.
//
// Side effects:
//	The interpreter remembers that this package is available, so that no
//	other version of the package may be provided for the interpreter.
//
//----------------------------------------------------------------------

func XTcl_PkgProvide(tls *libc.TLS, interp uintptr, name uintptr, version uintptr) int32 { /* tclPkg.c:126:1: */
	return XTcl_PkgProvideEx(tls, interp, name, version, uintptr(0))
}

func XTcl_PkgProvideEx(tls *libc.TLS, interp uintptr, name uintptr, version uintptr, clientData uintptr) int32 { /* tclPkg.c:136:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var pkgPtr uintptr
	// var pvi uintptr at bp+56, 8

	// var vi uintptr at bp+64, 8

	var res int32

	pkgPtr = sFindPackage(tls, interp, name)
	if (*Package)(unsafe.Pointer(pkgPtr)).Fversion == uintptr(0) {
		(*Package)(unsafe.Pointer(pkgPtr)).Fversion = XTcl_NewStringObj(tls, version, -1)
		(*Tcl_Obj)(unsafe.Pointer((*Package)(unsafe.Pointer(pkgPtr)).Fversion)).FrefCount++
		(*Package)(unsafe.Pointer(pkgPtr)).FclientData = clientData
		return TCL_OK
	}

	if sCheckVersionAndConvert(tls, interp, XTcl_GetString(tls, (*Package)(unsafe.Pointer(pkgPtr)).Fversion), bp+56,
		uintptr(0)) != TCL_OK {
		return TCL_ERROR
	} else if sCheckVersionAndConvert(tls, interp, version, bp+64, uintptr(0)) != TCL_OK {
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56)))
		return TCL_ERROR
	}

	res = sCompareVersions(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pvi */)), *(*uintptr)(unsafe.Pointer(bp + 64 /* vi */)), uintptr(0))
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56)))
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64)))

	if res == 0 {
		if clientData != uintptr(0) {
			(*Package)(unsafe.Pointer(pkgPtr)).FclientData = clientData
		}
		return TCL_OK
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+56226,
		libc.VaList(bp, name, XTcl_GetString(tls, (*Package)(unsafe.Pointer(pkgPtr)).Fversion), version)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+56286, ts+56294, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_PkgRequire / Tcl_PkgRequireEx / Tcl_PkgRequireProc --
//
//	This function is called by code that depends on a particular version
//	of a particular package. If the package is not already provided in the
//	interpreter, this function invokes a Tcl script to provide it. If the
//	package is already provided, this function makes sure that the
//	caller's needs don't conflict with the version that is present.
//
// Results:
//	If successful, returns the version string for the currently provided
//	version of the package, which may be different from the "version"
//	argument. If the caller's requirements cannot be met (e.g. the version
//	requested conflicts with a currently provided version, or the required
//	version cannot be found, or the script to provide the required version
//	generates an error), NULL is returned and an error message is left in
//	the interp's result.
//
// Side effects:
//	The script from some previous "package ifneeded" command may be
//	invoked to provide the package.
//
//----------------------------------------------------------------------

func XTcl_PkgRequire(tls *libc.TLS, interp uintptr, name uintptr, version uintptr, exact int32) uintptr { /* tclPkg.c:209:12: */
	return XTcl_PkgRequireEx(tls, interp, name, version, exact, uintptr(0))
}

func XTcl_PkgRequireEx(tls *libc.TLS, interp uintptr, name uintptr, version uintptr, exact int32, clientDataPtr uintptr) uintptr { /* tclPkg.c:223:12: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	// var ov uintptr at bp+64, 8

	var result uintptr = uintptr(0)

	// If an attempt is being made to load this into a standalone executable
	// on a platform where backlinking is not supported then this must be a
	// shared version of Tcl (Otherwise the load would have failed). Detect
	// this situation by checking that this library has been correctly
	// initialised. If it has not been then return immediately as nothing will
	// work.

	if XtclEmptyStringRep == uintptr(0) {
		// OK, so what's going on here?
		//
		// First, what are we doing? We are performing a check on behalf of
		// one particular caller, Tcl_InitStubs(). When a package is stub-
		// enabled, it is statically linked to libtclstub.a, which contains a
		// copy of Tcl_InitStubs(). When a stub-enabled package is loaded, its
		// *_Init() function is supposed to call Tcl_InitStubs() before
		// calling any other functions in the Tcl library. The first Tcl
		// function called by Tcl_InitStubs() through the stub table is
		// Tcl_PkgRequireEx(), so this code right here is the first code that
		// is part of the original Tcl library in the executable that gets
		// executed on behalf of a newly loaded stub-enabled package.
		//
		// One easy error for the developer/builder of a stub-enabled package
		// to make is to forget to define USE_TCL_STUBS when compiling the
		// package. When that happens, the package will contain symbols that
		// are references to the Tcl library, rather than function pointers
		// referencing the stub table. On platforms that lack backlinking,
		// those unresolved references may cause the loading of the package to
		// also load a second copy of the Tcl library, leading to all kinds of
		// trouble. We would like to catch that error and report a useful
		// message back to the user. That's what we're doing.
		//
		// Second, how does this work? If we reach this point, then the global
		// variable tclEmptyStringRep has the value NULL. Compare that with
		// the definition of tclEmptyStringRep near the top of the file
		// generic/tclObj.c. It clearly should not have the value NULL; it
		// should point to the char tclEmptyString. If we see it having the
		// value NULL, then somehow we are seeing a Tcl library that isn't
		// completely initialized, and that's an indicator for the error
		// condition described above. (Further explanation is welcome.)
		//
		// Third, so what do we do about it? This situation indicates the
		// package we just loaded wasn't properly compiled to be stub-enabled,
		// yet it thinks it is stub-enabled (it called Tcl_InitStubs()). We
		// want to report that the package just loaded is broken, so we want
		// to place an error message in the interpreter result and return NULL
		// to indicate failure to Tcl_InitStubs() so that it will also fail.
		// (Further explanation why we don't want to Tcl_Panic() is welcome.
		// After all, two Tcl libraries can't be a good thing!)
		//
		// Trouble is that's going to be tricky. We're now using a Tcl library
		// that's not fully initialized. In particular, it doesn't have a
		// proper value for tclEmptyStringRep. The Tcl_Obj system heavily
		// depends on the value of tclEmptyStringRep and all of Tcl depends
		// (increasingly) on the Tcl_Obj system, we need to correct that flaw
		// before making the calls to set the interpreter result to the error
		// message. That's the only flaw corrected; other problems with
		// initialization of the Tcl library are not remedied, so be very
		// careful about adding any other calls here without checking how they
		// behave when initialization is incomplete.

		XtclEmptyStringRep = uintptr(unsafe.Pointer(&XtclEmptyString))
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

			ts+56310, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+56286, ts+56408, uintptr(0)))
		return uintptr(0)
	}

	// Translate between old and new API, and defer to the new function.

	if version == uintptr(0) {
		if XTcl_PkgRequireProc(tls, interp, name, 0, uintptr(0), clientDataPtr) == TCL_OK {
			result = XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))
			XTcl_ResetResult(tls, interp)
		}
	} else {
		if exact != 0 && TCL_OK !=
			sCheckVersionAndConvert(tls, interp, version, uintptr(0), uintptr(0)) {
			return uintptr(0)
		}
		*(*uintptr)(unsafe.Pointer(bp + 64 /* ov */)) = XTcl_NewStringObj(tls, version, -1)
		if exact != 0 {
			XTcl_AppendStringsToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* ov */)), libc.VaList(bp+40, ts+6357, version, uintptr(0)))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount++
		if XTcl_PkgRequireProc(tls, interp, name, 1, bp+64, clientDataPtr) == TCL_OK {
			result = XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))
			XTcl_ResetResult(tls, interp)
		}
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)) + 32)) = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(bp + 64))
				}
			} else {
				XTclFreeObj(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* ov */)))
			}
		}

	}
	return result
}

func XTcl_PkgRequireProc(tls *libc.TLS, interp uintptr, name uintptr, reqc int32, reqv uintptr, clientDataPtr uintptr) int32 { /* tclPkg.c:342:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var args RequireProcArgs at bp, 16

	(*RequireProcArgs)(unsafe.Pointer(bp /* &args */)).Fname = name
	(*RequireProcArgs)(unsafe.Pointer(bp /* &args */)).FclientDataPtr = clientDataPtr
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sTclNRPkgRequireProc})), bp /* &args */, reqc, reqv)
}

func sTclNRPkgRequireProc(tls *libc.TLS, clientData ClientData, interp uintptr, reqc int32, reqv uintptr) int32 { /* tclPkg.c:359:1: */
	var args uintptr = clientData
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sPkgRequireCore})), (*RequireProcArgs)(unsafe.Pointer(args)).Fname, uintptr(Intptr_t(reqc)), reqv, (*RequireProcArgs)(unsafe.Pointer(args)).FclientDataPtr)
	return TCL_OK
}

func sPkgRequireCore(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclPkg.c:370:1: */
	var name uintptr = *(*ClientData)(unsafe.Pointer(data))
	var reqc int32 = int32(*(*ClientData)(unsafe.Pointer(data + 1*8)))
	var reqv uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))
	var code int32 = sCheckAllRequirements(tls, interp, reqc, reqv)
	var reqPtr uintptr
	if code != TCL_OK {
		return code
	}
	reqPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Require{})))
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sPkgRequireCoreCleanup})), reqPtr, uintptr(0), uintptr(0), uintptr(0))
	(*Require)(unsafe.Pointer(reqPtr)).FclientDataPtr = *(*ClientData)(unsafe.Pointer(data + 3*8))
	(*Require)(unsafe.Pointer(reqPtr)).Fname = name
	(*Require)(unsafe.Pointer(reqPtr)).FpkgPtr = sFindPackage(tls, interp, name)
	if (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion == uintptr(0) {
		XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sSelectPackage})), reqPtr, uintptr(Intptr_t(reqc)), reqv, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sPkgRequireCoreStep1})))
	} else {
		XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sPkgRequireCoreFinal})), reqPtr, uintptr(Intptr_t(reqc)), reqv, uintptr(0))
	}
	return TCL_OK
}

func sPkgRequireCoreStep1(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclPkg.c:394:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var command Tcl_DString at bp, 216

	var script uintptr
	var reqPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var reqc int32 = int32(*(*ClientData)(unsafe.Pointer(data + 1*8)))
	var reqv uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))
	var name uintptr = (*Require)(unsafe.Pointer(reqPtr)).Fname
	if (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion == uintptr(0) {
		// The package is not in the database. If there is a "package unknown"
		// command, invoke it.

		script = (*Interp)(unsafe.Pointer(interp)).FpackageUnknown
		if script == uintptr(0) {
			XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sPkgRequireCoreFinal})), reqPtr, uintptr(Intptr_t(reqc)), reqv, uintptr(0))
		} else {
			XTcl_DStringInit(tls, bp)
			XTcl_DStringAppend(tls, bp, script, -1)
			XTcl_DStringAppendElement(tls, bp, name)
			sAddRequirementsToDString(tls, bp, reqc, reqv)

			XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sPkgRequireCoreStep2})), reqPtr, uintptr(Intptr_t(reqc)), reqv, uintptr(0))
			XTcl_NREvalObj(tls, interp,
				XTcl_NewStringObj(tls, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring, (*Tcl_DString)(unsafe.Pointer(bp)).Flength),
				TCL_EVAL_GLOBAL)
			XTcl_DStringFree(tls, bp)
		}
		return TCL_OK
	} else {
		XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sPkgRequireCoreFinal})), reqPtr, uintptr(Intptr_t(reqc)), reqv, uintptr(0))
	}
	return TCL_OK
}

func sPkgRequireCoreStep2(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclPkg.c:431:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var reqPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var reqc int32 = int32(*(*ClientData)(unsafe.Pointer(data + 1*8)))
	var reqv uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))
	var name uintptr = (*Require)(unsafe.Pointer(reqPtr)).Fname
	if result != TCL_OK && result != TCL_ERROR {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+56418, libc.VaList(bp, result)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+56286, ts+56438, uintptr(0)))
		result = TCL_ERROR
	}
	if result == TCL_ERROR {
		XTcl_AddErrorInfo(tls, interp,
			ts+56448)
		return result
	}
	XTcl_ResetResult(tls, interp)
	// pkgPtr may now be invalid, so refresh it.
	(*Require)(unsafe.Pointer(reqPtr)).FpkgPtr = sFindPackage(tls, interp, name)
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sSelectPackage})), reqPtr, uintptr(Intptr_t(reqc)), reqv, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sPkgRequireCoreFinal})))
	return TCL_OK
}

func sPkgRequireCoreFinal(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclPkg.c:455:1: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	var reqPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var reqc int32 = int32(*(*ClientData)(unsafe.Pointer(data + 1*8)))
	var satisfies int32
	var reqv uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))
	// var pkgVersionI uintptr at bp+88, 8

	var clientDataPtr uintptr = (*Require)(unsafe.Pointer(reqPtr)).FclientDataPtr
	var name uintptr = (*Require)(unsafe.Pointer(reqPtr)).Fname
	if (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+56480, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+56286, ts+56502, uintptr(0)))
		sAddRequirementsToResult(tls, interp, reqc, reqv)
		return TCL_ERROR
	}

	// Ensure that the provided version meets the current requirements.

	if reqc != 0 {
		sCheckVersionAndConvert(tls, interp, XTcl_GetString(tls, (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion),
			bp+88, uintptr(0))
		satisfies = sSomeRequirementSatisfied(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* pkgVersionI */)), reqc, reqv)

		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 88)))

		if !(satisfies != 0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+56510,
				libc.VaList(bp+40, name, XTcl_GetString(tls, (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion))))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+4178, ts+56286, ts+56294,
				uintptr(0)))
			sAddRequirementsToResult(tls, interp, reqc, reqv)
			return TCL_ERROR
		}
	}

	if clientDataPtr != 0 {
		var ptr uintptr = clientDataPtr

		*(*uintptr)(unsafe.Pointer(ptr)) = (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).FclientData
	}
	XTcl_SetObjResult(tls, interp, (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion)
	return TCL_OK
}

func sPkgRequireCoreCleanup(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclPkg.c:502:1: */
	XTclpFree(tls, *(*ClientData)(unsafe.Pointer(data)))
	return result
}

func sSelectPackage(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclPkg.c:509:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var availPtr uintptr
	var bestPtr uintptr
	var bestStablePtr uintptr
	// var availVersion uintptr at bp+56, 8

	// var bestVersion uintptr at bp+72, 8

	// var bestStableVersion uintptr at bp+80, 8

	// Internal rep. of versions
	// var availStable int32 at bp+64, 4

	var satisfies int32
	var reqPtr uintptr
	var reqc int32
	var reqv uintptr
	var name uintptr
	var pkgPtr uintptr
	var iPtr uintptr
	var res int32
	var res1 int32
	// We found an ifneeded script for the package. Be careful while
	// executing it: this could cause reentrancy, so (a) protect the
	// script itself from deletion and (b) don't assume that bestPtr
	// will still exist when the script completes.

	var versionToProvide uintptr
	reqPtr = *(*ClientData)(unsafe.Pointer(data))
	reqc = int32(*(*ClientData)(unsafe.Pointer(data + 1*8)))
	reqv = *(*ClientData)(unsafe.Pointer(data + 2*8))
	name = (*Require)(unsafe.Pointer(reqPtr)).Fname
	pkgPtr = (*Require)(unsafe.Pointer(reqPtr)).FpkgPtr
	iPtr = interp

	// Check whether we're already attempting to load some version of this
	// package (circular dependency detection).

	if !((*Package)(unsafe.Pointer(pkgPtr)).FclientData != uintptr(0)) {
		goto __1
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+56559,
		libc.VaList(bp, name, (*Package)(unsafe.Pointer(pkgPtr)).FclientData, name)))
	sAddRequirementsToResult(tls, interp, reqc, reqv)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+56286, ts+52949, uintptr(0)))
	return TCL_ERROR
__1:
	;

	// The package isn't yet present. Search the list of available
	// versions and invoke the script for the best available version. We
	// are actually locating the best, and the best stable version. One of
	// them is then chosen based on the selection mode.

	bestPtr = uintptr(0)
	bestStablePtr = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 72 /* bestVersion */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 80 /* bestStableVersion */)) = uintptr(0)

	availPtr = (*Package)(unsafe.Pointer(pkgPtr)).FavailPtr
__2:
	if !(availPtr != uintptr(0)) {
		goto __4
	}
	if !(sCheckVersionAndConvert(tls, interp, (*PkgAvail)(unsafe.Pointer(availPtr)).Fversion,
		bp+56, bp+64) != TCL_OK) {
		goto __5
	}
	// The provided version number has invalid syntax. This
	// should not happen. This should have been caught by the
	// 'package ifneeded' registering the package.

	goto __3
__5:
	;

	// Check satisfaction of requirements before considering the current version further.
	if !(reqc > 0) {
		goto __6
	}
	satisfies = sSomeRequirementSatisfied(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* availVersion */)), reqc, reqv)
	if !!(satisfies != 0) {
		goto __7
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56)))
	*(*uintptr)(unsafe.Pointer(bp + 56 /* availVersion */)) = uintptr(0)
	goto __3
__7:
	;
__6:
	;

	if !(bestPtr != uintptr(0)) {
		goto __8
	}
	res = sCompareVersions(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* availVersion */)), *(*uintptr)(unsafe.Pointer(bp + 72 /* bestVersion */)), uintptr(0))

	// Note: Used internal reps in the comparison!

	if !(res > 0) {
		goto __10
	}
	// The version of the package sought is better than the
	// currently selected version.
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 72)))
	*(*uintptr)(unsafe.Pointer(bp + 72 /* bestVersion */)) = uintptr(0)
	goto newbest
__10:
	;
	goto __9
__8:
newbest:
	// We have found a version which is better than our max.

	bestPtr = availPtr
	sCheckVersionAndConvert(tls, interp, (*PkgAvail)(unsafe.Pointer(bestPtr)).Fversion, bp+72, uintptr(0))
__9:
	;

	if !!(*(*int32)(unsafe.Pointer(bp + 64)) != 0) {
		goto __11
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56)))
	*(*uintptr)(unsafe.Pointer(bp + 56 /* availVersion */)) = uintptr(0)
	goto __3
__11:
	;

	if !(bestStablePtr != uintptr(0)) {
		goto __12
	}
	res1 = sCompareVersions(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* availVersion */)), *(*uintptr)(unsafe.Pointer(bp + 80 /* bestStableVersion */)), uintptr(0))

	// Note: Used internal reps in the comparison!

	if !(res1 > 0) {
		goto __14
	}
	// This stable version of the package sought is better
	// than the currently selected stable version.
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 80)))
	*(*uintptr)(unsafe.Pointer(bp + 80 /* bestStableVersion */)) = uintptr(0)
	goto newstable
__14:
	;
	goto __13
__12:
newstable:
	// We have found a stable version which is better than our max stable.
	bestStablePtr = availPtr
	sCheckVersionAndConvert(tls, interp, (*PkgAvail)(unsafe.Pointer(bestStablePtr)).Fversion, bp+80, uintptr(0))
__13:
	;

	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56)))
	*(*uintptr)(unsafe.Pointer(bp + 56 /* availVersion */)) = uintptr(0)
	goto __3
__3:
	availPtr = (*PkgAvail)(unsafe.Pointer(availPtr)).FnextPtr
	goto __2
	goto __4
__4:
	; // end for

	// Clean up memorized internal reps, if any.

	if !(*(*uintptr)(unsafe.Pointer(bp + 72)) != uintptr(0)) {
		goto __15
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 72)))
	*(*uintptr)(unsafe.Pointer(bp + 72 /* bestVersion */)) = uintptr(0)
__15:
	;

	if !(*(*uintptr)(unsafe.Pointer(bp + 80)) != uintptr(0)) {
		goto __16
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 80)))
	*(*uintptr)(unsafe.Pointer(bp + 80 /* bestStableVersion */)) = uintptr(0)
__16:
	;

	// Now choose a version among the two best. For 'latest' we simply
	// take (actually keep) the best. For 'stable' we take the best
	// stable, if there is any, or the best if there is nothing stable.

	if !((*Interp)(unsafe.Pointer(iPtr)).FpackagePrefer == PKG_PREFER_STABLE &&
		bestStablePtr != uintptr(0)) {
		goto __17
	}
	bestPtr = bestStablePtr
__17:
	;

	if !(bestPtr == uintptr(0)) {
		goto __18
	}
	XTcl_NRAddCallback(tls, interp, *(*ClientData)(unsafe.Pointer(data + 3*8)), reqPtr, uintptr(Intptr_t(reqc)), reqv, uintptr(0))
	goto __19
__18:
	// We found an ifneeded script for the package. Be careful while
	// executing it: this could cause reentrancy, so (a) protect the
	// script itself from deletion and (b) don't assume that bestPtr
	// will still exist when the script completes.

	versionToProvide = (*PkgAvail)(unsafe.Pointer(bestPtr)).Fversion

	(*Package)(unsafe.Pointer(pkgPtr)).FclientData = versionToProvide
	XTcl_Preserve(tls, versionToProvide)
	(*Require)(unsafe.Pointer(reqPtr)).FversionToProvide = versionToProvide
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sSelectPackageFinal})), reqPtr, uintptr(Intptr_t(reqc)), reqv, *(*ClientData)(unsafe.Pointer(data + 3*8)))
	XTcl_NREvalObj(tls, interp, XTcl_NewStringObj(tls, (*PkgAvail)(unsafe.Pointer(bestPtr)).Fscript, -1), TCL_EVAL_GLOBAL)
__19:
	;
	return TCL_OK
}

func sSelectPackageFinal(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclPkg.c:675:1: */
	bp := tls.Alloc(208)
	defer tls.Free(208)

	var reqPtr uintptr = *(*ClientData)(unsafe.Pointer(data))
	var reqc int32 = int32(*(*ClientData)(unsafe.Pointer(data + 1*8)))
	var reqv uintptr = *(*ClientData)(unsafe.Pointer(data + 2*8))
	var name uintptr = (*Require)(unsafe.Pointer(reqPtr)).Fname
	var versionToProvide uintptr = (*Require)(unsafe.Pointer(reqPtr)).FversionToProvide

	(*Require)(unsafe.Pointer(reqPtr)).FpkgPtr = sFindPackage(tls, interp, name)
	if result == TCL_OK {
		XTcl_ResetResult(tls, interp)
		if (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion == uintptr(0) {
			result = TCL_ERROR
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

				ts+56625,
				libc.VaList(bp, name, versionToProvide, name)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+56286, ts+56700,
				uintptr(0)))
		} else {
			// var pvi uintptr at bp+192, 8

			// var vi uintptr at bp+200, 8

			if TCL_OK != sCheckVersionAndConvert(tls, interp,
				XTcl_GetString(tls, (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion), bp+192, uintptr(0)) {
				result = TCL_ERROR
			} else if sCheckVersionAndConvert(tls, interp,
				versionToProvide, bp+200, uintptr(0)) != TCL_OK {
				XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 192)))
				result = TCL_ERROR
			} else {
				var res int32 = sCompareVersions(tls, *(*uintptr)(unsafe.Pointer(bp + 192 /* pvi */)), *(*uintptr)(unsafe.Pointer(bp + 200 /* vi */)), uintptr(0))

				XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 192)))
				XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 200)))
				if res != 0 {
					result = TCL_ERROR
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

						ts+56711,
						libc.VaList(bp+56, name, versionToProvide,
							name, XTcl_GetString(tls, (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion))))
					XTcl_SetErrorCode(tls, interp, libc.VaList(bp+88, ts+4178, ts+56286,
						ts+56783, uintptr(0)))
				}
			}
		}
	} else if result != TCL_ERROR {
		var codePtr uintptr

		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				codePtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(codePtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(codePtr)).Fbytes = uintptr(0)
			*(*int32)(unsafe.Pointer(codePtr + 32)) = int32(result)
			(*Tcl_Obj)(unsafe.Pointer(codePtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
			{
			}
		}
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

			ts+56796,
			libc.VaList(bp+120, name, versionToProvide, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(codePtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(codePtr)).Fbytes
				}
				return XTcl_GetString(tls, codePtr)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+144, ts+4178, ts+56286, ts+56438, uintptr(0)))
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(codePtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(codePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(codePtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(codePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(codePtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(codePtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(codePtr)).Flength = -1
				for ok2 := true; ok2; ok2 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(codePtr + 32)) = XtclFreeObjList
					XtclFreeObjList = codePtr
				}
			} else {
				XTclFreeObj(tls, codePtr)
			}
		}

		result = TCL_ERROR
	}

	if result == TCL_ERROR {
		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+56857,
			libc.VaList(bp+176, name, versionToProvide)))
	}
	XTcl_Release(tls, versionToProvide)

	if result != TCL_OK {
		// Take a non-TCL_OK code from the script as an indication the
		// package wasn't loaded properly, so the package system
		// should not remember an improper load.
		//
		// This is consistent with our returning NULL. If we're not
		// willing to tell our caller we got a particular version, we
		// shouldn't store that version for telling future callers
		// either.

		if (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion != uintptr(0) {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				var _objPtr uintptr = (*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			(*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).Fversion = uintptr(0)
		}
		(*Package)(unsafe.Pointer((*Require)(unsafe.Pointer(reqPtr)).FpkgPtr)).FclientData = uintptr(0)
		return result
	}

	XTcl_NRAddCallback(tls, interp, *(*ClientData)(unsafe.Pointer(data + 3*8)), reqPtr, uintptr(Intptr_t(reqc)), reqv, uintptr(0))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_PkgPresent / Tcl_PkgPresentEx --
//
//	Checks to see whether the specified package is present. If it is not
//	then no additional action is taken.
//
// Results:
//	If successful, returns the version string for the currently provided
//	version of the package, which may be different from the "version"
//	argument. If the caller's requirements cannot be met (e.g. the version
//	requested conflicts with a currently provided version), NULL is
//	returned and an error message is left in interp->result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_PkgPresent(tls *libc.TLS, interp uintptr, name uintptr, version uintptr, exact int32) uintptr { /* tclPkg.c:786:12: */
	return XTcl_PkgPresentEx(tls, interp, name, version, exact, uintptr(0))
}

func XTcl_PkgPresentEx(tls *libc.TLS, interp uintptr, name uintptr, version uintptr, exact int32, clientDataPtr uintptr) uintptr { /* tclPkg.c:800:12: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	var iPtr uintptr = interp
	var hPtr uintptr
	var pkgPtr uintptr

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 224 /* &.packageTable */)).FfindProc})).f(tls, iPtr+224 /* &.packageTable */, name)
	if hPtr != 0 {
		pkgPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		if (*Package)(unsafe.Pointer(pkgPtr)).Fversion != uintptr(0) {
			// At this point we know that the package is present. Make sure
			// that the provided version meets the current requirement by
			// calling Tcl_PkgRequireEx() to check for us.

			var foundVersion uintptr = XTcl_PkgRequireEx(tls, interp, name, version,
				exact, clientDataPtr)

			if foundVersion == uintptr(0) {
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+56286, name,
					uintptr(0)))
			}
			return foundVersion
		}
	}

	if version != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+56896, libc.VaList(bp+40, name, version)))
	} else {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+56925, libc.VaList(bp+56, name)))
	}
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+7699, ts+56286, name, uintptr(0)))
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_PackageObjCmd --
//
//	This function is invoked to process the "package" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------
func XTcl_PackageObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclPkg.c:868:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRPackageObjCmd})), uintptr(0), objc, objv)
}

// ARGSUSED
func XTclNRPackageObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclPkg.c:879:1: */
	bp := tls.Alloc(128)
	defer tls.Free(128)

	var iPtr uintptr
	// var optionIndex int32 at bp+24, 4

	var exact int32
	var i int32
	// var newobjc int32 at bp+80, 4

	var satisfies int32
	var availPtr uintptr
	var prevPtr uintptr
	var pkgPtr uintptr
	var hPtr uintptr
	// var search Tcl_HashSearch at bp+56, 24

	var tablePtr uintptr
	var version uintptr
	var argv2 uintptr
	var argv3 uintptr
	var argv4 uintptr
	// var iva uintptr at bp+104, 8

	// var ivb uintptr at bp+112, 8

	var objvListPtr uintptr
	// var newObjvPtr uintptr at bp+88, 8

	var _objPtr uintptr
	var keyString uintptr
	// var length int32 at bp+40, 4

	var res int32
	// var argv3i uintptr at bp+32, 8

	// var avi uintptr at bp+48, 8

	var resultObj uintptr
	var name uintptr
	var ov uintptr
	var newobjv uintptr
	// var length1 int32 at bp+96, 4

	// Seting the value.

	// var newPref int32 at bp+100, 4

	var resultObj1 uintptr
	// var argv2i uintptr at bp+120, 8
	iPtr = interp
	*(*uintptr)(unsafe.Pointer(bp + 104 /* iva */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 112 /* ivb */)) = uintptr(0)

	if !(objc < 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+56951)
	return TCL_ERROR
__1:
	;

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&pkgOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+24) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 24 /* optionIndex */))) {
	case uint32(0) /* PKG_FORGET */ :
		goto __4
	case uint32(1) /* PKG_IFNEEDED */ :
		goto __5
	case uint32(2) /* PKG_NAMES */ :
		goto __6
	case uint32(4) /* PKG_PRESENT */ :
		goto __7
	case uint32(5) /* PKG_PROVIDE */ :
		goto __8
	case uint32(6) /* PKG_REQUIRE */ :
		goto __9
	case uint32(7) /* PKG_UNKNOWN */ :
		goto __10
	case uint32(3) /* PKG_PREFER */ :
		goto __11
	case uint32(8) /* PKG_VCOMPARE */ :
		goto __12
	case uint32(9) /* PKG_VERSIONS */ :
		goto __13
	case uint32(10) /* PKG_VSATISFIES */ :
		goto __14
	default:
		goto __15
	}
	goto __3
__4:

	i = 2
__16:
	if !(i < objc) {
		goto __18
	}
	keyString = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}()
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 224 /* &.packageTable */)).FfindProc})).f(tls, iPtr+224 /* &.packageTable */, keyString)
	if !(hPtr == uintptr(0)) {
		goto __19
	}
	goto __17
__19:
	;
	pkgPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	XTcl_DeleteHashEntry(tls, hPtr)
	if !((*Package)(unsafe.Pointer(pkgPtr)).Fversion != uintptr(0)) {
		goto __20
	}
__21:
	_objPtr = (*Package)(unsafe.Pointer(pkgPtr)).Fversion
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __24
	}
	XTclFreeObj(tls, _objPtr)
__24:
	;
	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
__20:
	;
__25:
	if !((*Package)(unsafe.Pointer(pkgPtr)).FavailPtr != uintptr(0)) {
		goto __26
	}
	availPtr = (*Package)(unsafe.Pointer(pkgPtr)).FavailPtr
	(*Package)(unsafe.Pointer(pkgPtr)).FavailPtr = (*PkgAvail)(unsafe.Pointer(availPtr)).FnextPtr
	XTcl_EventuallyFree(tls, (*PkgAvail)(unsafe.Pointer(availPtr)).Fversion, uintptr(3))
	XTcl_EventuallyFree(tls, (*PkgAvail)(unsafe.Pointer(availPtr)).Fscript, uintptr(3))
	XTclpFree(tls, availPtr)
	goto __25
__26:
	;
	XTclpFree(tls, pkgPtr)
	goto __17
__17:
	i++
	goto __16
	goto __18
__18:
	;
	goto __3

__5:

	if !(objc != 4 && objc != 5) {
		goto __27
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+56968)
	return TCL_ERROR
__27:
	;
	argv3 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}()
	if !(sCheckVersionAndConvert(tls, interp, argv3, bp+32, uintptr(0)) != TCL_OK) {
		goto __28
	}
	return TCL_ERROR
__28:
	;
	argv2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	if !(objc == 4) {
		goto __29
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 224 /* &.packageTable */)).FfindProc})).f(tls, iPtr+224 /* &.packageTable */, argv2)
	if !(hPtr == uintptr(0)) {
		goto __31
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 32)))
	return TCL_OK
__31:
	;
	pkgPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	goto __30
__29:
	pkgPtr = sFindPackage(tls, interp, argv2)
__30:
	;
	argv3 = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+40)

	availPtr = (*Package)(unsafe.Pointer(pkgPtr)).FavailPtr
	prevPtr = uintptr(0)
__32:
	if !(availPtr != uintptr(0)) {
		goto __34
	}
	if !(sCheckVersionAndConvert(tls, interp, (*PkgAvail)(unsafe.Pointer(availPtr)).Fversion, bp+48,
		uintptr(0)) != TCL_OK) {
		goto __35
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 32)))
	return TCL_ERROR
__35:
	;

	res = sCompareVersions(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* avi */)), *(*uintptr)(unsafe.Pointer(bp + 32 /* argv3i */)), uintptr(0))
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 48)))

	if !(res == 0) {
		goto __36
	}
	if !(objc == 4) {
		goto __37
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 32)))
	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, (*PkgAvail)(unsafe.Pointer(availPtr)).Fscript, -1))
	return TCL_OK
__37:
	;
	XTcl_EventuallyFree(tls, (*PkgAvail)(unsafe.Pointer(availPtr)).Fscript, uintptr(3))
	goto __34
__36:
	;
	goto __33
__33:
	prevPtr = availPtr
	availPtr = (*PkgAvail)(unsafe.Pointer(availPtr)).FnextPtr
	goto __32
	goto __34
__34:
	;
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 32)))

	if !(objc == 4) {
		goto __38
	}
	return TCL_OK
__38:
	;
	if !(availPtr == uintptr(0)) {
		goto __39
	}
	availPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(PkgAvail{})))
	(*PkgAvail)(unsafe.Pointer(availPtr)).Fversion = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 40)))+uint32(1))
	libc.Xmemcpy(tls, (*PkgAvail)(unsafe.Pointer(availPtr)).Fversion, argv3, uint64(uint32(*(*int32)(unsafe.Pointer(bp + 40)))+uint32(1)))

	if !(prevPtr == uintptr(0)) {
		goto __40
	}
	(*PkgAvail)(unsafe.Pointer(availPtr)).FnextPtr = (*Package)(unsafe.Pointer(pkgPtr)).FavailPtr
	(*Package)(unsafe.Pointer(pkgPtr)).FavailPtr = availPtr
	goto __41
__40:
	(*PkgAvail)(unsafe.Pointer(availPtr)).FnextPtr = (*PkgAvail)(unsafe.Pointer(prevPtr)).FnextPtr
	(*PkgAvail)(unsafe.Pointer(prevPtr)).FnextPtr = availPtr
__41:
	;
__39:
	;
	argv4 = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+40)
	(*PkgAvail)(unsafe.Pointer(availPtr)).Fscript = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 40)))+uint32(1))
	libc.Xmemcpy(tls, (*PkgAvail)(unsafe.Pointer(availPtr)).Fscript, argv4, uint64(uint32(*(*int32)(unsafe.Pointer(bp + 40)))+uint32(1)))
	goto __3

__6:
	if !(objc != 2) {
		goto __42
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
	return TCL_ERROR
	goto __43
__42:

	resultObj = XTcl_NewObj(tls)
	tablePtr = iPtr + 224
	hPtr = XTcl_FirstHashEntry(tls, tablePtr, bp+56)
__44:
	if !(hPtr != uintptr(0)) {
		goto __46
	}
	pkgPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !((*Package)(unsafe.Pointer(pkgPtr)).Fversion != uintptr(0) || (*Package)(unsafe.Pointer(pkgPtr)).FavailPtr != uintptr(0)) {
		goto __47
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, XTcl_NewStringObj(tls,
		func() uintptr {
			if (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == 1 || (*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FkeyType == -1 {
				return *(*uintptr)(unsafe.Pointer(hPtr + 32))
			}
			return hPtr + 32
		}(), -1))
__47:
	;
	goto __45
__45:
	hPtr = XTcl_NextHashEntry(tls, bp+56)
	goto __44
	goto __46
__46:
	;
	XTcl_SetObjResult(tls, interp, resultObj)
__43:
	;
	goto __3
__7:

	if !(objc < 3) {
		goto __48
	}
	goto require
__48:
	;
	argv2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	if !(int32(*(*int8)(unsafe.Pointer(argv2))) == '-' && libc.Xstrcmp(tls, argv2, ts+15508) == 0) {
		goto __49
	}
	if !(objc != 5) {
		goto __51
	}
	goto requireSyntax
__51:
	;
	exact = 1
	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}()
	goto __50
__49:
	exact = 0
	name = argv2
__50:
	;

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 224 /* &.packageTable */)).FfindProc})).f(tls, iPtr+224 /* &.packageTable */, name)
	if !(hPtr != uintptr(0)) {
		goto __52
	}
	pkgPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !((*Package)(unsafe.Pointer(pkgPtr)).Fversion != uintptr(0)) {
		goto __53
	}
	goto require
__53:
	;
__52:
	;

	version = uintptr(0)
	if !(exact != 0) {
		goto __54
	}
	version = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 4*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 4*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8)))
	}()
	if !(sCheckVersionAndConvert(tls, interp, version, uintptr(0),
		uintptr(0)) != TCL_OK) {
		goto __56
	}
	return TCL_ERROR
__56:
	;
	goto __55
__54:
	if !(sCheckAllRequirements(tls, interp, objc-3, objv+uintptr(3)*8) != TCL_OK) {
		goto __57
	}
	return TCL_ERROR
__57:
	;
	if !(objc > 3 && sCheckVersionAndConvert(tls, interp,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
		}(), uintptr(0), uintptr(0)) == TCL_OK) {
		goto __58
	}
	version = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}()
__58:
	;
__55:
	;
	XTcl_PkgPresentEx(tls, interp, name, version, exact, uintptr(0))
	return TCL_ERROR
	goto __3

__8:
	if !(objc != 3 && objc != 4) {
		goto __59
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+56993)
	return TCL_ERROR
__59:
	;
	argv2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	if !(objc == 3) {
		goto __60
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 224 /* &.packageTable */)).FfindProc})).f(tls, iPtr+224 /* &.packageTable */, argv2)
	if !(hPtr != uintptr(0)) {
		goto __61
	}
	pkgPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	if !((*Package)(unsafe.Pointer(pkgPtr)).Fversion != uintptr(0)) {
		goto __62
	}
	XTcl_SetObjResult(tls, interp, (*Package)(unsafe.Pointer(pkgPtr)).Fversion)
__62:
	;
__61:
	;
	return TCL_OK
__60:
	;
	argv3 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}()
	if !(sCheckVersionAndConvert(tls, interp, argv3, uintptr(0), uintptr(0)) != TCL_OK) {
		goto __63
	}
	return TCL_ERROR
__63:
	;
	return XTcl_PkgProvideEx(tls, interp, argv2, argv3, uintptr(0))
__9:
require:
	if !(objc < 3) {
		goto __64
	}
requireSyntax:
	XTcl_WrongNumArgs(tls, interp, 2, objv,
		ts+57011)
	return TCL_ERROR
__64:
	;

	version = uintptr(0)

	argv2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	if !(int32(*(*int8)(unsafe.Pointer(argv2))) == '-' && libc.Xstrcmp(tls, argv2, ts+15508) == 0) {
		goto __65
	}

	if !(objc != 5) {
		goto __67
	}
	goto requireSyntax
__67:
	;

	version = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 4*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 4*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 4*8)))
	}()
	if !(sCheckVersionAndConvert(tls, interp, version, uintptr(0),
		uintptr(0)) != TCL_OK) {
		goto __68
	}
	return TCL_ERROR
__68:
	;

	// Create a new-style requirement for the exact version.

	ov = XTcl_NewStringObj(tls, version, -1)
	XTcl_AppendStringsToObj(tls, ov, libc.VaList(bp, ts+6357, version, uintptr(0)))
	version = uintptr(0)
	argv3 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}()
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FrefCount++

	objvListPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	(*Tcl_Obj)(unsafe.Pointer(objvListPtr)).FrefCount++
	XTcl_ListObjAppendElement(tls, interp, objvListPtr, ov)
	XTcl_ListObjGetElements(tls, interp, objvListPtr, bp+80, bp+88)

	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTclNRPackageObjCmdCleanup})), *(*uintptr)(unsafe.Pointer(objv + 3*8)), objvListPtr, uintptr(0), uintptr(0))
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sPkgRequireCore})), argv3, uintptr(Intptr_t(*(*int32)(unsafe.Pointer(bp + 80 /* newobjc */)))), *(*uintptr)(unsafe.Pointer(bp + 88 /* newObjvPtr */)), uintptr(0))
	return TCL_OK
	goto __66
__65:
	newobjv = objv + uintptr(3)*8
	*(*int32)(unsafe.Pointer(bp + 80 /* newobjc */)) = objc - 3

	if !(sCheckAllRequirements(tls, interp, objc-3, objv+uintptr(3)*8) != TCL_OK) {
		goto __69
	}
	return TCL_ERROR
__69:
	;
	objvListPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	(*Tcl_Obj)(unsafe.Pointer(objvListPtr)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).FrefCount++
	i = 0
__70:
	if !(i < *(*int32)(unsafe.Pointer(bp + 80))) {
		goto __72
	}

	// Tcl_Obj structures may have come from another interpreter,
	// so duplicate them.

	XTcl_ListObjAppendElement(tls, interp, objvListPtr, XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(newobjv + uintptr(i)*8))))
	goto __71
__71:
	i++
	goto __70
	goto __72
__72:
	;
	XTcl_ListObjGetElements(tls, interp, objvListPtr, bp+80, bp+88)
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sTclNRPackageObjCmdCleanup})), *(*uintptr)(unsafe.Pointer(objv + 2*8)), objvListPtr, uintptr(0), uintptr(0))
	XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sPkgRequireCore})), argv2, uintptr(Intptr_t(*(*int32)(unsafe.Pointer(bp + 80 /* newobjc */)))), *(*uintptr)(unsafe.Pointer(bp + 88 /* newObjvPtr */)), uintptr(0))
	return TCL_OK
__66:
	;
	goto __3
__10:

	if !(objc == 2) {
		goto __73
	}
	if !((*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown != uintptr(0)) {
		goto __75
	}
	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown, -1))
__75:
	;
	goto __74
__73:
	if !(objc == 3) {
		goto __76
	}
	if !((*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown != uintptr(0)) {
		goto __78
	}
	XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown)
__78:
	;
	argv2 = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+96)
	if !(int32(*(*int8)(unsafe.Pointer(argv2))) == 0) {
		goto __79
	}
	(*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown = uintptr(0)
	goto __80
__79:
	(*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 96)))+uint32(1))
	libc.Xmemcpy(tls, (*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown, argv2, uint64(uint32(*(*int32)(unsafe.Pointer(bp + 96)))+uint32(1)))
__80:
	;
	goto __77
__76:
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+57046)
	return TCL_ERROR
__77:
	;
__74:
	;
	goto __3

__11:

	// See tclInt.h for the enum, just before Interp.

	if !(objc > 3) {
		goto __81
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+57056)
	return TCL_ERROR
	goto __82
__81:
	if !(objc == 3) {
		goto __83
	}

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&pkgPreferOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+57072, 0, bp+100) != TCL_OK) {
		goto __84
	}
	return TCL_ERROR
__84:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 100)) < (*Interp)(unsafe.Pointer(iPtr)).FpackagePrefer) {
		goto __85
	}
	(*Interp)(unsafe.Pointer(iPtr)).FpackagePrefer = *(*int32)(unsafe.Pointer(bp + 100 /* newPref */))
__85:
	;
__83:
	;
__82:
	;

	// Always return current value.

	XTcl_SetObjResult(tls, interp,
		XTcl_NewStringObj(tls, pkgPreferOptions[(*Interp)(unsafe.Pointer(iPtr)).FpackagePrefer], -1))
	goto __3

__12:
	if !(objc != 4) {
		goto __86
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+57083)
	return TCL_ERROR
__86:
	;
	argv3 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	}()
	argv2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	if !(sCheckVersionAndConvert(tls, interp, argv2, bp+104, uintptr(0)) != TCL_OK || sCheckVersionAndConvert(tls, interp, argv3, bp+112, uintptr(0)) != TCL_OK) {
		goto __87
	}
	if !(*(*uintptr)(unsafe.Pointer(bp + 104)) != uintptr(0)) {
		goto __88
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 104)))
__88:
	;

	// ivb cannot be set in this branch.

	return TCL_ERROR
__87:
	;

	// Comparison is done on the internal representation.

	XTcl_SetObjResult(tls, interp,
		XTcl_NewIntObj(tls, sCompareVersions(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* iva */)), *(*uintptr)(unsafe.Pointer(bp + 112 /* ivb */)), uintptr(0))))
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 104)))
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 112)))
	goto __3
__13:
	if !(objc != 3) {
		goto __89
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+5849)
	return TCL_ERROR
	goto __90
__89:
	resultObj1 = XTcl_NewObj(tls)

	argv2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 224 /* &.packageTable */)).FfindProc})).f(tls, iPtr+224 /* &.packageTable */, argv2)
	if !(hPtr != uintptr(0)) {
		goto __91
	}
	pkgPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	availPtr = (*Package)(unsafe.Pointer(pkgPtr)).FavailPtr
__92:
	if !(availPtr != uintptr(0)) {
		goto __94
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj1,
		XTcl_NewStringObj(tls, (*PkgAvail)(unsafe.Pointer(availPtr)).Fversion, -1))
	goto __93
__93:
	availPtr = (*PkgAvail)(unsafe.Pointer(availPtr)).FnextPtr
	goto __92
	goto __94
__94:
	;
__91:
	;
	XTcl_SetObjResult(tls, interp, resultObj1)
__90:
	;
	goto __3
__14:
	*(*uintptr)(unsafe.Pointer(bp + 120 /* argv2i */)) = uintptr(0)

	if !(objc < 4) {
		goto __95
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+57101)
	return TCL_ERROR
__95:
	;

	argv2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()
	if !(sCheckVersionAndConvert(tls, interp, argv2, bp+120, uintptr(0)) != TCL_OK) {
		goto __96
	}
	return TCL_ERROR
	goto __97
__96:
	if !(sCheckAllRequirements(tls, interp, objc-3, objv+uintptr(3)*8) != TCL_OK) {
		goto __98
	}
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 120)))
	return TCL_ERROR
__98:
	;
__97:
	;

	satisfies = sSomeRequirementSatisfied(tls, *(*uintptr)(unsafe.Pointer(bp + 120 /* argv2i */)), objc-3, objv+uintptr(3)*8)
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 120)))

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, libc.Bool32(satisfies != 0)))
	goto __3

__15:
	XTcl_Panic(tls, ts+57127, 0)
__3:
	;
	return TCL_OK
}

var pkgOptions = [12]uintptr{
	ts + 46129, ts + 57177, ts + 12227, ts + 57186, ts + 57193,
	ts + 57201, ts + 57209, ts + 13462, ts + 57217, ts + 57226,
	ts + 57235, uintptr(0),
} /* tclPkg.c:885:23 */
var pkgPreferOptions = [3]uintptr{
	ts + 57246, ts + 57253, uintptr(0),
} /* tclPkg.c:1190:20 */

func sTclNRPackageObjCmdCleanup(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclPkg.c:1304:1: */
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data)))).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data)))).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data)))).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data)))).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data)))).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data)) + 32)) = XtclFreeObjList
				XtclFreeObjList = *(*ClientData)(unsafe.Pointer(data))
			}
		} else {
			XTclFreeObj(tls, *(*ClientData)(unsafe.Pointer(data)))
		}
	}

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data + 1*8)))).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data + 1*8)))).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data + 1*8)))).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data + 1*8)))).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data + 1*8)))).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data + 1*8)))).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data + 1*8)))).Flength = -1
			for ok1 := true; ok1; ok1 = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(*(*ClientData)(unsafe.Pointer(data + 1*8)) + 32)) = XtclFreeObjList
				XtclFreeObjList = *(*ClientData)(unsafe.Pointer(data + 1*8))
			}
		} else {
			XTclFreeObj(tls, *(*ClientData)(unsafe.Pointer(data + 1*8)))
		}
	}

	return result
}

//----------------------------------------------------------------------
//
// FindPackage --
//
//	This function finds the Package record for a particular package in a
//	particular interpreter, creating a record if one doesn't already
//	exist.
//
// Results:
//	The return value is a pointer to the Package record for the package.
//
// Side effects:
//	A new Package record may be created.
//
//----------------------------------------------------------------------

func sFindPackage(tls *libc.TLS, interp uintptr, name uintptr) uintptr { /* tclPkg.c:1328:16: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	var hPtr uintptr
	// var isNew int32 at bp, 4

	var pkgPtr uintptr

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 224 /* &.packageTable */)).FcreateProc})).f(tls, iPtr+224 /* &.packageTable */, name, bp /* &isNew */)
	if *(*int32)(unsafe.Pointer(bp)) != 0 {
		pkgPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Package{})))
		(*Package)(unsafe.Pointer(pkgPtr)).Fversion = uintptr(0)
		(*Package)(unsafe.Pointer(pkgPtr)).FavailPtr = uintptr(0)
		(*Package)(unsafe.Pointer(pkgPtr)).FclientData = uintptr(0)
		(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = pkgPtr
	} else {
		pkgPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	}
	return pkgPtr
}

//----------------------------------------------------------------------
//
// TclFreePackageInfo --
//
//	This function is called during interpreter deletion to free all of the
//	package-related information for the interpreter.
//
// Results:
//	None.
//
// Side effects:
//	Memory is freed.
//
//----------------------------------------------------------------------

func XTclFreePackageInfo(tls *libc.TLS, iPtr uintptr) { /* tclPkg.c:1369:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var pkgPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	var hPtr uintptr
	var availPtr uintptr

	for hPtr = XTcl_FirstHashEntry(tls, iPtr+224, bp); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
		pkgPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
		if (*Package)(unsafe.Pointer(pkgPtr)).Fversion != uintptr(0) {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*Package)(unsafe.Pointer(pkgPtr)).Fversion
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		for (*Package)(unsafe.Pointer(pkgPtr)).FavailPtr != uintptr(0) {
			availPtr = (*Package)(unsafe.Pointer(pkgPtr)).FavailPtr
			(*Package)(unsafe.Pointer(pkgPtr)).FavailPtr = (*PkgAvail)(unsafe.Pointer(availPtr)).FnextPtr
			XTcl_EventuallyFree(tls, (*PkgAvail)(unsafe.Pointer(availPtr)).Fversion, uintptr(3))
			XTcl_EventuallyFree(tls, (*PkgAvail)(unsafe.Pointer(availPtr)).Fscript, uintptr(3))
			XTclpFree(tls, availPtr)
		}
		XTclpFree(tls, pkgPtr)
	}
	XTcl_DeleteHashTable(tls, iPtr+224)
	if (*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown != uintptr(0) {
		XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FpackageUnknown)
	}
}

//----------------------------------------------------------------------
//
// CheckVersionAndConvert --
//
//	This function checks to see whether a version number has valid syntax.
//	It also generates a semi-internal representation (string rep of a list
//	of numbers).
//
// Results:
//	If string is a properly formed version number the TCL_OK is returned.
//	Otherwise TCL_ERROR is returned and an error message is left in the
//	interp's result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sCheckVersionAndConvert(tls *libc.TLS, interp uintptr, string uintptr, internal uintptr, stable uintptr) int32 { /* tclPkg.c:1419:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var p uintptr
	var prevChar int8
	var hasunstable int32
	// 4* assuming that each char is a separator (a,b become ' -x ').
	// 4+ to have spce for an additional -2 at the end
	var ibuf uintptr
	var ip uintptr
	p = string
	hasunstable = 0
	ibuf = XTcl_Alloc(tls, uint32(uint64(4)+uint64(4)*libc.Xstrlen(tls, string)))
	ip = ibuf

	// Basic rules
	// (1) First character has to be a digit.
	// (2) All other characters have to be a digit or '.'
	// (3) Two '.'s may not follow each other.
	//
	// TIP 268, Modified rules
	// (1) s.a.
	// (2) All other characters have to be a digit, 'a', 'b', or '.'
	// (3) s.a.
	// (4) Only one of 'a' or 'b' may occur.
	// (5) Neither 'a', nor 'b' may occur before or after a '.'

	if !!(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(p))))) != 0) {
		goto __1
	} // INTL: digit
	goto error
__1:
	;

	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = *(*int8)(unsafe.Pointer(p))

	prevChar = *(*int8)(unsafe.Pointer(p))
	p++
__2:
	if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) {
		goto __4
	}
	if !(!(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(p))))) != 0) && (int32(*(*int8)(unsafe.Pointer(p))) != '.' && int32(*(*int8)(unsafe.Pointer(p))) != 'a' && int32(*(*int8)(unsafe.Pointer(p))) != 'b' || (hasunstable != 0 && (int32(*(*int8)(unsafe.Pointer(p))) == 'a' || int32(*(*int8)(unsafe.Pointer(p))) == 'b') || (int32(prevChar) == 'a' || int32(prevChar) == 'b' || int32(prevChar) == '.') &&
		int32(*(*int8)(unsafe.Pointer(p))) == '.' || (int32(*(*int8)(unsafe.Pointer(p))) == 'a' || int32(*(*int8)(unsafe.Pointer(p))) == 'b' || int32(*(*int8)(unsafe.Pointer(p))) == '.') && int32(prevChar) == '.'))) {
		goto __5
	}
	goto error
__5:
	;

	if !(int32(*(*int8)(unsafe.Pointer(p))) == 'a' || int32(*(*int8)(unsafe.Pointer(p))) == 'b') {
		goto __6
	}
	hasunstable = 1
__6:
	;

	// Translation to the internal rep. Regular version chars are copied
	// as is. The separators are translated to numerics. The new separator
	// for all parts is space.

	if !(int32(*(*int8)(unsafe.Pointer(p))) == '.') {
		goto __7
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8(' ')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8('0')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8(' ')
	goto __8
__7:
	if !(int32(*(*int8)(unsafe.Pointer(p))) == 'a') {
		goto __9
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8(' ')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8('-')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8('2')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8(' ')
	goto __10
__9:
	if !(int32(*(*int8)(unsafe.Pointer(p))) == 'b') {
		goto __11
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8(' ')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8('-')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8('1')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = int8(' ')
	goto __12
__11:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&ip, 1))) = *(*int8)(unsafe.Pointer(p))
__12:
	;
__10:
	;
__8:
	;

	prevChar = *(*int8)(unsafe.Pointer(p))
	goto __3
__3:
	p++
	goto __2
	goto __4
__4:
	;
	if !(int32(prevChar) != '.' && int32(prevChar) != 'a' && int32(prevChar) != 'b') {
		goto __13
	}
	*(*int8)(unsafe.Pointer(ip)) = int8(0)
	if !(internal != uintptr(0)) {
		goto __14
	}
	*(*uintptr)(unsafe.Pointer(internal)) = ibuf
	goto __15
__14:
	XTclpFree(tls, ibuf)
__15:
	;
	if !(stable != uintptr(0)) {
		goto __16
	}
	*(*int32)(unsafe.Pointer(stable)) = libc.BoolInt32(!(hasunstable != 0))
__16:
	;
	return TCL_OK
__13:
	;

error:
	XTclpFree(tls, ibuf)
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+57260, libc.VaList(bp, string)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+57297, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// CompareVersions --
//
//	This function compares two version numbers (in internal rep).
//
// Results:
//	The return value is -1 if v1 is less than v2, 0 if the two version
//	numbers are the same, and 1 if v1 is greater than v2. If *satPtr is
//	non-NULL, the word it points to is filled in with 1 if v2 >= v1 and
//	both numbers have the same major number or 0 otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sCompareVersions(tls *libc.TLS, v1 uintptr, v2 uintptr, isMajorPtr uintptr) int32 { /* tclPkg.c:1538:1: */
	var thisIsMajor int32
	var res int32
	var flip int32
	var s1 uintptr
	var e1 uintptr
	var s2 uintptr
	var e2 uintptr
	var o1 int8
	var o2 int8

	// Each iteration of the following loop processes one number from each
	// string, terminated by a " " (space). If those numbers don't match then
	// the comparison is over; otherwise, we loop back for the next number.
	//
	// TIP 268.
	// This is identical the function 'ComparePkgVersion', but using the new
	// space separator as used by the internal rep of version numbers. The
	// special separators 'a' and 'b' have already been dealt with in
	// 'CheckVersionAndConvert', they were translated into numbers as well.
	// This keeps the comparison sane. Otherwise we would have to compare
	// numerics, the separators, and also deal with the special case of
	// end-of-string compared to separators. The semi-list rep we get here is
	// much easier to handle, as it is still regular.
	//
	// Rewritten to not compute a numeric value for the extracted version
	// number, but do string comparison. Skip any leading zeros for that to
	// work. This change breaks through the 32bit-limit on version numbers.

	thisIsMajor = 1
	s1 = v1
	s2 = v2

	for 1 != 0 {
		// Parse one decimal number from the front of each string. Skip
		// leading zeros. Terminate found number for upcoming string-wise
		// comparison, if needed.

		for int32(*(*int8)(unsafe.Pointer(s1))) != 0 && int32(*(*int8)(unsafe.Pointer(s1))) == '0' {
			s1++
		}
		for int32(*(*int8)(unsafe.Pointer(s2))) != 0 && int32(*(*int8)(unsafe.Pointer(s2))) == '0' {
			s2++
		}

		// s1, s2 now point to the beginnings of the numbers to compare. Test
		// for their signs first, as shortcut to the result (different signs),
		// or determines if result has to be flipped (both negative). If there
		// is no shortcut we have to insert terminators later to limit the
		// strcmp.

		if int32(*(*int8)(unsafe.Pointer(s1))) == '-' && int32(*(*int8)(unsafe.Pointer(s2))) != '-' {
			// s1 < 0, s2 >= 0 => s1 < s2
			res = -1
			break
		}
		if int32(*(*int8)(unsafe.Pointer(s1))) != '-' && int32(*(*int8)(unsafe.Pointer(s2))) == '-' {
			// s1 >= 0, s2 < 0 => s1 > s2
			res = 1
			break
		}

		if int32(*(*int8)(unsafe.Pointer(s1))) == '-' && int32(*(*int8)(unsafe.Pointer(s2))) == '-' {
			// a < b => -a > -b, etc.
			s1++
			s2++
			flip = 1
		} else {
			flip = 0
		}

		// The string comparison is needed, so now we determine where the
		// numbers end.

		e1 = s1
		for int32(*(*int8)(unsafe.Pointer(e1))) != 0 && int32(*(*int8)(unsafe.Pointer(e1))) != ' ' {
			e1++
		}
		e2 = s2
		for int32(*(*int8)(unsafe.Pointer(e2))) != 0 && int32(*(*int8)(unsafe.Pointer(e2))) != ' ' {
			e2++
		}

		// s1 .. e1 and s2 .. e2 now bracket the numbers to compare. Insert
		// terminators, compare, and restore actual contents. First however
		// another shortcut. Compare lengths. Shorter string is smaller
		// number! Thus we strcmp only strings of identical length.

		if (int64(e1)-int64(s1))/1 < (int64(e2)-int64(s2))/1 {
			res = -1
		} else if (int64(e2)-int64(s2))/1 < (int64(e1)-int64(s1))/1 {
			res = 1
		} else {
			o1 = *(*int8)(unsafe.Pointer(e1))
			*(*int8)(unsafe.Pointer(e1)) = int8(0)
			o2 = *(*int8)(unsafe.Pointer(e2))
			*(*int8)(unsafe.Pointer(e2)) = int8(0)

			res = libc.Xstrcmp(tls, s1, s2)
			if res < 0 {
				res = -1
			} else {
				res = func() int32 {
					if res != 0 {
						return 1
					}
					return 0
				}()
			}

			*(*int8)(unsafe.Pointer(e1)) = o1
			*(*int8)(unsafe.Pointer(e2)) = o2
		}

		// Stop comparing segments when a difference has been found. Here we
		// may have to flip the result to account for signs.

		if res != 0 {
			if flip != 0 {
				res = -res
			}
			break
		}

		// Go on to the next version number if the current numbers match.
		// However stop processing if the end of both numbers has been
		// reached.

		s1 = e1
		s2 = e2

		if int32(*(*int8)(unsafe.Pointer(s1))) != 0 {
			s1++
		} else if int32(*(*int8)(unsafe.Pointer(s2))) == 0 {
			// s1, s2 both at the end => identical

			res = 0
			break
		}
		if int32(*(*int8)(unsafe.Pointer(s2))) != 0 {
			s2++
		}
		thisIsMajor = 0
	}

	if isMajorPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(isMajorPtr)) = thisIsMajor
	}

	return res
}

//----------------------------------------------------------------------
//
// CheckAllRequirements --
//
//	This function checks to see whether all requirements in a set have
//	valid syntax.
//
// Results:
//	TCL_OK is returned if all requirements are valid. Otherwise TCL_ERROR
//	is returned and an error message is left in the interp's result.
//
// Side effects:
//	May modify the interpreter result.
//
//----------------------------------------------------------------------

func sCheckAllRequirements(tls *libc.TLS, interp uintptr, reqc int32, reqv uintptr) int32 { /* tclPkg.c:1715:1: */
	var i int32

	for i = 0; i < reqc; i++ {
		if sCheckRequirement(tls, interp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(reqv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(reqv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(reqv + uintptr(i)*8)))
		}()) != TCL_OK {
			return TCL_ERROR
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// CheckRequirement --
//
//	This function checks to see whether a requirement has valid syntax.
//
// Results:
//	If string is a properly formed requirement then TCL_OK is returned.
//	Otherwise TCL_ERROR is returned and an error message is left in the
//	interp's result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sCheckRequirement(tls *libc.TLS, interp uintptr, string uintptr) int32 { /* tclPkg.c:1749:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	// Syntax of requirement = version
	//			     = version-version
	//			     = version-

	var dash uintptr = uintptr(0)
	var buf uintptr

	dash = libc.Xstrchr(tls, string, '-')
	if dash == uintptr(0) {
		// No dash found, has to be a simple version.

		return sCheckVersionAndConvert(tls, interp, string, uintptr(0), uintptr(0))
	}

	if libc.Xstrchr(tls, dash+uintptr(1), '-') != uintptr(0) {
		// More dashes found after the first. This is wrong.

		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+57305, libc.VaList(bp, string)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+57349, uintptr(0)))
		return TCL_ERROR
	}

	// Exactly one dash is present. Copy the string, split at the location of
	// dash and check that both parts are versions. Note that the max part can
	// be empty. Also note that the string allocated with strdup() must be
	// freed with free() and not ckfree().

	for ok := true; ok; ok = 0 != 0 {
		var local__len uint32 = uint32(libc.Xstrlen(tls, string) + uint64(1))
		buf = XTcl_Alloc(tls, local__len)
		libc.Xmemcpy(tls, buf, string, uint64(local__len))
	}
	dash = buf + uintptr((int64(dash)-int64(string))/1)
	*(*int8)(unsafe.Pointer(dash)) = int8(0) // buf now <=> min part
	dash++                                   // dash now <=> max part

	if sCheckVersionAndConvert(tls, interp, buf, uintptr(0), uintptr(0)) != TCL_OK || int32(*(*int8)(unsafe.Pointer(dash))) != 0 && sCheckVersionAndConvert(tls, interp, dash, uintptr(0), uintptr(0)) != TCL_OK {
		XTclpFree(tls, buf)
		return TCL_ERROR
	}

	XTclpFree(tls, buf)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// AddRequirementsToResult --
//
//	This function accumulates requirements in the interpreter result.
//
// Results:
//	None.
//
// Side effects:
//	The interpreter result is extended.
//
//----------------------------------------------------------------------

func sAddRequirementsToResult(tls *libc.TLS, interp uintptr, reqc int32, reqv uintptr) { /* tclPkg.c:1821:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var result uintptr = XTcl_GetObjResult(tls, interp)
	var i int32
	// var length int32 at bp+16, 4

	for i = 0; i < reqc; i++ {
		var v uintptr = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(reqv + uintptr(i)*8)), bp+16)

		if *(*int32)(unsafe.Pointer(bp + 16))&0x1 != 0 && int32(*(*int8)(unsafe.Pointer(v + uintptr(*(*int32)(unsafe.Pointer(bp + 16))/2)))) == '-' &&
			libc.Xstrncmp(tls, v, v+uintptr((*(*int32)(unsafe.Pointer(bp + 16))+1)/2), uint64(*(*int32)(unsafe.Pointer(bp + 16))/2)) == 0 {
			XTcl_AppendPrintfToObj(tls, result, ts+57362, libc.VaList(bp, v+uintptr((*(*int32)(unsafe.Pointer(bp + 16))+1)/2)))
		} else {
			XTcl_AppendPrintfToObj(tls, result, ts+57374, libc.VaList(bp+8, v))
		}
	}
}

//----------------------------------------------------------------------
//
// AddRequirementsToDString --
//
//	This function accumulates requirements in a DString.
//
// Results:
//	None.
//
// Side effects:
//	The DString argument is extended.
//
//----------------------------------------------------------------------

func sAddRequirementsToDString(tls *libc.TLS, dsPtr uintptr, reqc int32, reqv uintptr) { /* tclPkg.c:1860:1: */
	var i int32

	if reqc > 0 {
		for i = 0; i < reqc; i++ {
			XTcl_DStringAppend(tls, dsPtr, ts+14901, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
			XTclDStringAppendObj(tls, dsPtr, *(*uintptr)(unsafe.Pointer(reqv + uintptr(i)*8)))
		}
	} else {
		XTcl_DStringAppend(tls, dsPtr, ts+57378, int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)))
	}
}

//----------------------------------------------------------------------
//
// SomeRequirementSatisfied --
//
//	This function checks to see whether a version satisfies at least one
//	of a set of requirements.
//
// Results:
//	If the requirements are satisfied 1 is returned. Otherwise 0 is
//	returned. The function assumes that all pieces have valid syntax. And
//	is allowed to make that assumption.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSomeRequirementSatisfied(tls *libc.TLS, availVersionI uintptr, reqc int32, reqv uintptr) int32 { /* tclPkg.c:1899:1: */
	var i int32

	for i = 0; i < reqc; i++ {
		if sRequirementSatisfied(tls, availVersionI, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(reqv + uintptr(i)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(reqv + uintptr(i)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(reqv + uintptr(i)*8)))
		}()) != 0 {
			return 1
		}
	}
	return 0
}

//----------------------------------------------------------------------
//
// RequirementSatisfied --
//
//	This function checks to see whether a version satisfies a requirement.
//
// Results:
//	If the requirement is satisfied 1 is returned. Otherwise 0 is
//	returned. The function assumes that all pieces have valid syntax, and
//	is allowed to make that assumption.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sRequirementSatisfied(tls *libc.TLS, havei uintptr, req uintptr) int32 { /* tclPkg.c:1936:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// The have candidate is already in internal rep.

	var satisfied int32
	var res int32
	var dash uintptr = uintptr(0)
	var buf uintptr
	// var min uintptr at bp+16, 8

	// var max uintptr at bp+24, 8

	dash = libc.Xstrchr(tls, req, '-')
	if dash == uintptr(0) {
		// No dash found, is a simple version, fallback to regular check. The
		// 'CheckVersionAndConvert' cannot fail. We pad the requirement with
		// 'a0', i.e '-2' before doing the comparison to properly accept
		// unstables as well.

		*(*uintptr)(unsafe.Pointer(bp /* reqi */)) = uintptr(0)
		// var thisIsMajor int32 at bp+8, 4

		sCheckVersionAndConvert(tls, uintptr(0), req, bp, uintptr(0))
		libc.Xstrcat(tls, *(*uintptr)(unsafe.Pointer(bp /* reqi */)), ts+57382)
		res = sCompareVersions(tls, havei, *(*uintptr)(unsafe.Pointer(bp /* reqi */)), bp+8)
		satisfied = libc.Bool32(res == 0 || res == 1 && !(*(*int32)(unsafe.Pointer(bp + 8)) != 0))
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp)))
		return satisfied
	}

	// Exactly one dash is present (Assumption of valid syntax). Copy the req,
	// split at the location of dash and check that both parts are versions.
	// Note that the max part can be empty.

	for ok := true; ok; ok = 0 != 0 {
		var local__len uint32 = uint32(libc.Xstrlen(tls, req) + uint64(1))
		buf = XTcl_Alloc(tls, local__len)
		libc.Xmemcpy(tls, buf, req, uint64(local__len))
	}
	dash = buf + uintptr((int64(dash)-int64(req))/1)
	*(*int8)(unsafe.Pointer(dash)) = int8(0) // buf now <=> min part
	dash++                                   // dash now <=> max part

	if int32(*(*int8)(unsafe.Pointer(dash))) == 0 {
		// We have a min, but no max. For the comparison we generate the
		// internal rep, padded with 'a0' i.e. '-2'.

		sCheckVersionAndConvert(tls, uintptr(0), buf, bp+16, uintptr(0))
		libc.Xstrcat(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* min */)), ts+57382)
		satisfied = libc.Bool32(sCompareVersions(tls, havei, *(*uintptr)(unsafe.Pointer(bp + 16)), uintptr(0)) >= 0)
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
		XTclpFree(tls, buf)
		return satisfied
	}

	// We have both min and max, and generate their internal reps. When
	// identical we compare as is, otherwise we pad with 'a0' to ove the range
	// a bit.

	sCheckVersionAndConvert(tls, uintptr(0), buf, bp+16, uintptr(0))
	sCheckVersionAndConvert(tls, uintptr(0), dash, bp+24, uintptr(0))

	if sCompareVersions(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), *(*uintptr)(unsafe.Pointer(bp + 24)), uintptr(0)) == 0 {
		satisfied = libc.Bool32(sCompareVersions(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), havei, uintptr(0)) == 0)
	} else {
		libc.Xstrcat(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* min */)), ts+57382)
		libc.Xstrcat(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* max */)), ts+57382)
		satisfied = libc.Bool32(sCompareVersions(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), havei, uintptr(0)) <= 0 && sCompareVersions(tls, havei, *(*uintptr)(unsafe.Pointer(bp + 24)), uintptr(0)) < 0)
	}

	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 24)))
	XTclpFree(tls, buf)
	return satisfied
}

//----------------------------------------------------------------------
//
// Tcl_PkgInitStubsCheck --
//
//	This is a replacement routine for Tcl_InitStubs() that is called
//	from code where -DUSE_TCL_STUBS has not been enabled.
//
// Results:
//	Returns the version of a conforming stubs table, or NULL, if
//	the table version doesn't satisfy the requested requirements,
//	according to historical practice.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_PkgInitStubsCheck(tls *libc.TLS, interp uintptr, version uintptr, exact int32) uintptr { /* tclPkg.c:2037:12: */
	var actualVersion uintptr = XTcl_PkgPresent(tls, interp, ts+7036, version, 0)

	if exact != 0 && actualVersion != 0 {
		var p uintptr = version
		var count int32 = 0

		for *(*int8)(unsafe.Pointer(p)) != 0 {
			count = count + libc.BoolInt32(!(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))))) != 0))
		}
		if count == 1 {
			if 0 != libc.Xstrncmp(tls, version, actualVersion, libc.Xstrlen(tls, version)) {
				// Construct error message
				XTcl_PkgPresent(tls, interp, ts+7036, version, 1)
				return uintptr(0)
			}
		} else {
			return XTcl_PkgPresent(tls, interp, ts+7036, version, 1)
		}
	}
	return actualVersion
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Use C preprocessor statements to define the various values for the embedded
// configuration information.

var cfg = [19]Tcl_Config{
	{Fkey: ts + 42445, Fvalue: ts + 18935},
	{Fkey: ts + 57386, Fvalue: ts + 18935},
	{Fkey: ts + 57395, Fvalue: ts + 18935},
	{Fkey: ts + 57404, Fvalue: ts + 18937},
	{Fkey: ts + 57410, Fvalue: ts + 18937},
	{Fkey: ts + 57420, Fvalue: ts + 18935},
	{Fkey: ts + 57430, Fvalue: ts + 18935},
	{Fkey: ts + 57444, Fvalue: ts + 18935},

	// Runtime paths to various stuff

	{Fkey: ts + 57458, Fvalue: ts + 57473},
	{Fkey: ts + 57488, Fvalue: ts + 57503},
	{Fkey: ts + 57518, Fvalue: ts + 57536},
	{Fkey: ts + 57558, Fvalue: ts + 57577},
	{Fkey: ts + 57596, Fvalue: ts + 57611},

	// Installation paths to various stuff

	{Fkey: ts + 57626, Fvalue: ts + 2631},
	{Fkey: ts + 57641, Fvalue: ts + 2631},
	{Fkey: ts + 57656, Fvalue: ts + 57536},
	{Fkey: ts + 57674, Fvalue: ts + 57577},
	{Fkey: ts + 57693, Fvalue: ts + 57611},

	// Last entry, closes the array
	{},
} /* tclPkgConfig.c:99:25 */

func XTclInitEmbeddedConfigurationInformation(tls *libc.TLS, interp uintptr) { /* tclPkgConfig.c:130:1: */
	XTcl_RegisterConfig(tls, interp, ts+57708, uintptr(unsafe.Pointer(&cfg)), ts+57712)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------------
//
// Tcl_ErrnoId --
//
//	Return a textual identifier for the current errno value.
//
// Results:
//	This procedure returns a machine-readable textual identifier that
//	corresponds to the current errno value (e.g. "EPERM"). The identifier
//	is the same as the #define name in errno.h.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ErrnoId(tls *libc.TLS) uintptr { /* tclPosixStr.c:34:12: */
	switch *(*int32)(unsafe.Pointer(libc.X_errno(tls))) {
	case E2BIG:
		return ts + 57719 /* "E2BIG" */
	case EACCES:
		return ts + 57725 /* "EACCES" */
	case EADDRINUSE:
		return ts + 57732 /* "EADDRINUSE" */
	case EADDRNOTAVAIL:
		return ts + 57743 /* "EADDRNOTAVAIL" */
	case EAFNOSUPPORT:
		return ts + 57757 /* "EAFNOSUPPORT" */
	case EAGAIN:
		return ts + 37606 /* "EAGAIN" */
	case EALREADY:
		return ts + 57770 /* "EALREADY" */
	case EBADF:
		return ts + 57779 /* "EBADF" */
	case EBADMSG:
		return ts + 57785 /* "EBADMSG" */
	case ECANCELED:
		return ts + 57793 /* "ECANCELED" */
	case EBUSY:
		return ts + 57803 /* "EBUSY" */
	case ECHILD:
		return ts + 57809 /* "ECHILD" */
	case ECONNABORTED:
		return ts + 57816 /* "ECONNABORTED" */
	case ECONNREFUSED:
		return ts + 57829 /* "ECONNREFUSED" */
	case ECONNRESET:
		return ts + 57842 /* "ECONNRESET" */
	case EDEADLK:
		return ts + 57853 /* "EDEADLK" */
	case EDESTADDRREQ:
		return ts + 57861 /* "EDESTADDRREQ" */
	case EDOM:
		return ts + 57874 /* "EDOM" */
	case EDQUOT:
		return ts + 57879 /* "EDQUOT" */
	case EEXIST:
		return ts + 57886 /* "EEXIST" */
	case EFAULT:
		return ts + 57893 /* "EFAULT" */
	case EFBIG:
		return ts + 57900 /* "EFBIG" */
	case EHOSTDOWN:
		return ts + 57906 /* "EHOSTDOWN" */
	case EHOSTUNREACH:
		return ts + 57916 /* "EHOSTUNREACH" */
	case EIDRM:
		return ts + 57929 /* "EIDRM" */
	case EILSEQ:
		return ts + 57935 /* "EILSEQ" */
	case EINPROGRESS:
		return ts + 57942 /* "EINPROGRESS" */
	case EINTR:
		return ts + 57954 /* "EINTR" */
	case EINVAL:
		return ts + 57960 /* "EINVAL" */
	case EIO:
		return ts + 57967 /* "EIO" */
	case EISCONN:
		return ts + 57971 /* "EISCONN" */
	case EISDIR:
		return ts + 57979 /* "EISDIR" */
	case ELOOP:
		return ts + 57986 /* "ELOOP" */
	case EMFILE:
		return ts + 57992 /* "EMFILE" */
	case EMLINK:
		return ts + 57999 /* "EMLINK" */
	case EMSGSIZE:
		return ts + 58006 /* "EMSGSIZE" */
	case ENAMETOOLONG:
		return ts + 58015 /* "ENAMETOOLONG" */
	case ENETDOWN:
		return ts + 58028 /* "ENETDOWN" */
	case ENETRESET:
		return ts + 58037 /* "ENETRESET" */
	case ENETUNREACH:
		return ts + 58047 /* "ENETUNREACH" */
	case ENFILE:
		return ts + 58059 /* "ENFILE" */
	case ENOBUFS:
		return ts + 58066 /* "ENOBUFS" */
	case ENODATA:
		return ts + 58074 /* "ENODATA" */
	case ENODEV:
		return ts + 58082 /* "ENODEV" */
	case ENOENT:
		return ts + 58089 /* "ENOENT" */
	case ENOEXEC:
		return ts + 58096 /* "ENOEXEC" */
	case ENOLCK:
		return ts + 58104 /* "ENOLCK" */
	case ENOLINK:
		return ts + 58111 /* "ENOLINK" */
	case ENOMEM:
		return ts + 58119 /* "ENOMEM" */
	case ENOMSG:
		return ts + 58126 /* "ENOMSG" */
	case ENOPROTOOPT:
		return ts + 58133 /* "ENOPROTOOPT" */
	case ENOSPC:
		return ts + 58145 /* "ENOSPC" */
	case ENOSR:
		return ts + 58152 /* "ENOSR" */
	case ENOSTR:
		return ts + 58158 /* "ENOSTR" */
	case ENOSYS:
		return ts + 58165 /* "ENOSYS" */
	case ENOTCONN:
		return ts + 58172 /* "ENOTCONN" */
	case ENOTRECOVERABLE:
		return ts + 58181 /* "ENOTRECOVERABLE" */
	case ENOTDIR:
		return ts + 58197 /* "ENOTDIR" */
	case ENOTEMPTY:
		return ts + 58205 /* "ENOTEMPTY" */
	case ENOTSOCK:
		return ts + 58215 /* "ENOTSOCK" */
	case ENOTSUP:
		return ts + 58224 /* "ENOTSUP" */
	case ENOTTY:
		return ts + 58232 /* "ENOTTY" */
	case ENXIO:
		return ts + 58239 /* "ENXIO" */
	case EOPNOTSUPP:
		return ts + 58245 /* "EOPNOTSUPP" */
	case EOTHER:
		return ts + 58256 /* "EOTHER" */
	case EOVERFLOW:
		return ts + 58263 /* "EOVERFLOW" */
	case EOWNERDEAD:
		return ts + 58273 /* "EOWNERDEAD" */
	case EPERM:
		return ts + 58284 /* "EPERM" */
	case EPFNOSUPPORT:
		return ts + 58290 /* "EPFNOSUPPORT" */
	case EPIPE:
		return ts + 58303 /* "EPIPE" */
	case EPROTO:
		return ts + 58309 /* "EPROTO" */
	case EPROTONOSUPPORT:
		return ts + 58316 /* "EPROTONOSUPPORT" */
	case EPROTOTYPE:
		return ts + 58332 /* "EPROTOTYPE" */
	case ERANGE:
		return ts + 58343 /* "ERANGE" */
	case EREMOTE:
		return ts + 58350 /* "EREMOTE" */
	case EROFS:
		return ts + 58358 /* "EROFS" */
	case ESHUTDOWN:
		return ts + 58364 /* "ESHUTDOWN" */
	case ESOCKTNOSUPPORT:
		return ts + 58374 /* "ESOCKTNOSUPPORT" */
	case ESPIPE:
		return ts + 58390 /* "ESPIPE" */
	case ESRCH:
		return ts + 58397 /* "ESRCH" */
	case ESTALE:
		return ts + 58403 /* "ESTALE" */
	case ETIME:
		return ts + 58410 /* "ETIME" */
	case ETIMEDOUT:
		return ts + 58416 /* "ETIMEDOUT" */
	case ETOOMANYREFS:
		return ts + 58426 /* "ETOOMANYREFS" */
	case ETXTBSY:
		return ts + 58439 /* "ETXTBSY" */
	case EUSERS:
		return ts + 58447 /* "EUSERS" */
	case EWOULDBLOCK:
		return ts + 58454 /* "EWOULDBLOCK" */
	case EXDEV:
		return ts + 58466 /* "EXDEV" */
	}
	return ts + 58472 /* "unknown error" */
}

//----------------------------------------------------------------------
//
// Tcl_ErrnoMsg --
//
//	Return a human-readable message corresponding to a given errno value.
//
// Results:
//	The return value is the standard POSIX error message for errno.  This
//	procedure is used instead of strerror because strerror returns
//	slightly different values on different machines (e.g. different
//	capitalizations), which cause problems for things such as regression
//	tests. This procedure provides messages for most standard errors, then
//	it calls strerror for things it doesn't understand.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ErrnoMsg(tls *libc.TLS, err int32) uintptr { /* tclPosixStr.c:495:12: */
	switch err {
	case E2BIG:
		return ts + 58486 /* "argument list to..." */
	case EACCES:
		return ts + 58509 /* "permission denie..." */
	case EADDRINUSE:
		return ts + 58527 /* "address already ..." */
	case EADDRNOTAVAIL:
		return ts + 58550 /* "cannot assign re..." */
	case EAFNOSUPPORT:
		return ts + 58582 /* "address family n..." */
	case EAGAIN:
		return ts + 58623 /* "resource tempora..." */
	case EALREADY:
		return ts + 58656 /* "operation alread..." */
	case EBADF:
		return ts + 58686 /* "bad file number" */
	case EBADMSG:
		return ts + 58702 /* "not a data messa..." */
	case ECANCELED:
		return ts + 58721 /* "operation cancel..." */
	case EBUSY:
		return ts + 58740 /* "file busy" */
	case ECHILD:
		return ts + 58750 /* "no children" */
	case ECONNABORTED:
		return ts + 58762 /* "software caused ..." */
	case ECONNREFUSED:
		return ts + 58795 /* "connection refus..." */
	case ECONNRESET:
		return ts + 58814 /* "connection reset..." */
	case EDEADLK:
		return ts + 58839 /* "resource deadloc..." */
	case EDESTADDRREQ:
		return ts + 58865 /* "destination addr..." */
	case EDOM:
		return ts + 58894 /* "math argument ou..." */
	case EDQUOT:
		return ts + 58921 /* "disk quota excee..." */
	case EEXIST:
		return ts + 58941 /* "file already exi..." */
	case EFAULT:
		return ts + 58961 /* "bad address in s..." */
	case EFBIG:
		return ts + 58997 /* "file too large" */
	case EHOSTDOWN:
		return ts + 59012 /* "host is down" */
	case EHOSTUNREACH:
		return ts + 59025 /* "host is unreacha..." */
	case EIDRM:
		return ts + 59045 /* "identifier remov..." */
	case EILSEQ:
		return ts + 59064 /* "illegal byte seq..." */
	case EINPROGRESS:
		return ts + 59086 /* "operation now in..." */
	case EINTR:
		return ts + 59112 /* "interrupted syst..." */
	case EINVAL:
		return ts + 59136 /* "invalid argument" */
	case EIO:
		return ts + 59153 /* "I/O error" */
	case EISCONN:
		return ts + 59163 /* "socket is alread..." */
	case EISDIR:
		return ts + 59191 /* "illegal operatio..." */
	case ELOOP:
		return ts + 59224 /* "too many levels ..." */
	case EMFILE:
		return ts + 59258 /* "too many open fi..." */
	case EMLINK:
		return ts + 59278 /* "too many links" */
	case EMSGSIZE:
		return ts + 59293 /* "message too long" */
	case ENAMETOOLONG:
		return ts + 59310 /* "file name too lo..." */
	case ENETDOWN:
		return ts + 59329 /* "network is down" */
	case ENETRESET:
		return ts + 59345 /* "network dropped ..." */
	case ENETUNREACH:
		return ts + 59381 /* "network is unrea..." */
	case ENFILE:
		return ts + 59404 /* "file table overf..." */
	case ENOBUFS:
		return ts + 59424 /* "no buffer space ..." */
	case ENODATA:
		return ts + 59450 /* "no data availabl..." */
	case ENODEV:
		return ts + 59468 /* "no such device" */
	case ENOENT:
		return ts + 59483 /* "no such file or ..." */
	case ENOEXEC:
		return ts + 59509 /* "exec format erro..." */
	case ENOLCK:
		return ts + 59527 /* "no locks availab..." */
	case ENOLINK:
		return ts + 59546 /* "link has been se..." */
	case ENOMEM:
		return ts + 59568 /* "not enough memor..." */
	case ENOMSG:
		return ts + 59586 /* "no message of de..." */
	case ENOPROTOOPT:
		return ts + 59613 /* "bad protocol opt..." */
	case ENOSPC:
		return ts + 59633 /* "no space left on..." */
	case ENOSR:
		return ts + 59657 /* "out of stream re..." */
	case ENOSTR:
		return ts + 59681 /* "not a stream dev..." */
	case ENOSYS:
		return ts + 59701 /* "function not imp..." */
	case ENOTCONN:
		return ts + 59726 /* "socket is not co..." */
	case ENOTRECOVERABLE:
		return ts + 59750 /* "state not recove..." */
	case ENOTDIR:
		return ts + 59772 /* "not a directory" */
	case ENOTEMPTY:
		return ts + 59788 /* "directory not em..." */
	case ENOTSOCK:
		return ts + 59808 /* "socket operation..." */
	case ENOTSUP:
		return ts + 59839 /* "operation not su..." */
	case ENOTTY:
		return ts + 59863 /* "inappropriate de..." */
	case ENXIO:
		return ts + 59894 /* "no such device o..." */
	case EOPNOTSUPP:
		return ts + 59920 /* "operation not su..." */
	case EOTHER:
		return ts + 59954 /* "other error" */
	case EOVERFLOW:
		return ts + 59966 /* "file too big" */
	case EOWNERDEAD:
		return ts + 59979 /* "owner died" */
	case EPERM:
		return ts + 59990 /* "not owner" */
	case EPFNOSUPPORT:
		return ts + 60000 /* "protocol family ..." */
	case EPIPE:
		return ts + 60030 /* "broken pipe" */
	case EPROTO:
		return ts + 60042 /* "protocol error" */
	case EPROTONOSUPPORT:
		return ts + 60057 /* "protocol not sup..." */
	case EPROTOTYPE:
		return ts + 60080 /* "protocol wrong t..." */
	case ERANGE:
		return ts + 60111 /* "math result unre..." */
	case EREMOTE:
		return ts + 60139 /* "pathname hit rem..." */
	case EROFS:
		return ts + 60171 /* "read-only file s..." */
	case ESHUTDOWN:
		return ts + 60193 /* "cannot send afte..." */
	case ESOCKTNOSUPPORT:
		return ts + 60227 /* "socket type not ..." */
	case ESPIPE:
		return ts + 60253 /* "invalid seek" */
	case ESRCH:
		return ts + 60266 /* "no such process" */
	case ESTALE:
		return ts + 60282 /* "stale remote fil..." */
	case ETIME:
		return ts + 60307 /* "timer expired" */
	case ETIMEDOUT:
		return ts + 60321 /* "connection timed..." */
	case ETOOMANYREFS:
		return ts + 60342 /* "too many referen..." */
	case ETXTBSY:
		return ts + 60377 /* "text file or pse..." */
	case EUSERS:
		return ts + 60409 /* "too many users" */
	case EWOULDBLOCK:
		return ts + 60424 /* "operation would ..." */
	case EXDEV:
		return ts + 60446 /* "cross-domain lin..." */
	default:
		return libc.Xstrerror(tls, err)
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_SignalId --
//
//	Return a textual identifier for a signal number.
//
// Results:
//	This procedure returns a machine-readable textual identifier that
//	corresponds to sig.  The identifier is the same as the #define name in
//	signal.h.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_SignalId(tls *libc.TLS, sig int32) uintptr { /* tclPosixStr.c:960:12: */
	switch sig {
	case SIGABRT:
		return ts + 60464 /* "SIGABRT" */
	case SIGBUS:
		return ts + 60472 /* "SIGBUS" */
	case SIGFPE:
		return ts + 60479 /* "SIGFPE" */
	case SIGILL:
		return ts + 60486 /* "SIGILL" */
	case SIGINT:
		return ts + 60493 /* "SIGINT" */
	case SIGSEGV:
		return ts + 60500 /* "SIGSEGV" */
	case SIGTERM:
		return ts + 60508 /* "SIGTERM" */
	case SIGTRAP:
		return ts + 60516 /* "SIGTRAP" */
	}
	return ts + 60524 /* "unknown signal" */
}

//----------------------------------------------------------------------
//
// Tcl_SignalMsg --
//
//	Return a human-readable message describing a signal.
//
// Results:
//	This procedure returns a string describing sig that should make sense
//	to a human.  It may not be easy for a machine to parse.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_SignalMsg(tls *libc.TLS, sig int32) uintptr { /* tclPosixStr.c:1094:12: */
	switch sig {
	case SIGABRT:
		return ts + 60464 /* "SIGABRT" */
	case SIGBUS:
		return ts + 60539 /* "bus error" */
	case SIGFPE:
		return ts + 60549 /* "floating-point e..." */
	case SIGILL:
		return ts + 60574 /* "illegal instruct..." */
	case SIGINT:
		return ts + 60594 /* "interrupt" */
	case SIGSEGV:
		return ts + 60604 /* "segmentation vio..." */
	case SIGTERM:
		return ts + 60627 /* "software termina..." */
	case SIGTRAP:
		return ts + 60655 /* "trace trap" */
	}
	return ts + 60524 /* "unknown signal" */
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The following data structure is used to keep track of all the Tcl_Preserve
// calls that are still in effect. It grows as needed to accommodate any
// number of calls in effect.

type Reference = struct {
	FclientData ClientData
	FrefCount   int32
	FmustFree   int32
	FfreeProc   uintptr
} /* tclPreserve.c:32:3 */

// Global data structures used to hold the list of preserved data references.
// These variables are protected by "preserveMutex".

var refArray uintptr = uintptr(0) /* tclPreserve.c:39:18 */ // First in array of references.
var spaceAvl int32 = 0            /* tclPreserve.c:40:12 */ // Total number of structures available at
// *firstRefPtr.
var inUse int32 = 0 /* tclPreserve.c:42:12 */ // Count of structures currently in use in
// refArray.
// To protect the above statics

// The following data structure is used to keep track of whether an arbitrary
// block of memory has been deleted. This is used by the TclHandle code to
// avoid the more time-expensive algorithm of Tcl_Preserve(). This mechanism
// is mainly used when we have lots of references to a few big, expensive
// objects that we don't want to live any longer than necessary.

type HandleStruct1 = struct {
	Fptr         uintptr
	FrefCount    int32
	F__ccgo_pad1 [4]byte
} /* tclPreserve.c:56:9 */

// Count of structures currently in use in
// refArray.
// To protect the above statics

// The following data structure is used to keep track of whether an arbitrary
// block of memory has been deleted. This is used by the TclHandle code to
// avoid the more time-expensive algorithm of Tcl_Preserve(). This mechanism
// is mainly used when we have lots of references to a few big, expensive
// objects that we don't want to live any longer than necessary.

type HandleStruct = HandleStruct1 /* tclPreserve.c:68:3 */

//----------------------------------------------------------------------
//
// TclFinalizePreserve --
//
//	Called during exit processing to clean up the reference array.
//
// Results:
//	None.
//
// Side effects:
//	Frees the storage of the reference array.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTclFinalizePreserve(tls *libc.TLS) { /* tclPreserve.c:88:1: */

	if spaceAvl != 0 {
		XTclpFree(tls, refArray)
		refArray = uintptr(0)
		inUse = 0
		spaceAvl = 0
	}

}

//----------------------------------------------------------------------
//
// Tcl_Preserve --
//
//	This function is used by a function to declare its interest in a
//	particular block of memory, so that the block will not be reallocated
//	until a matching call to Tcl_Release has been made.
//
// Results:
//	None.
//
// Side effects:
//	Information is retained so that the block of memory will not be freed
//	until at least the matching call to Tcl_Release.
//
//----------------------------------------------------------------------

func XTcl_Preserve(tls *libc.TLS, clientData ClientData) { /* tclPreserve.c:120:1: */
	var refPtr uintptr
	var i int32

	// See if there is already a reference for this pointer. If so, just
	// increment its reference count.

	i = 0
	refPtr = refArray
__1:
	if !(i < inUse) {
		goto __3
	}
	{
		if (*Reference)(unsafe.Pointer(refPtr)).FclientData == clientData {
			(*Reference)(unsafe.Pointer(refPtr)).FrefCount++

			return
		}

	}
	goto __2
__2:
	i++
	refPtr += 24
	goto __1
	goto __3
__3:
	;

	// Make a reference array if it doesn't already exist, or make it bigger
	// if it is full.

	if inUse == spaceAvl {
		if spaceAvl != 0 {
			spaceAvl = 2 * spaceAvl
		} else {
			spaceAvl = INITIAL_SIZE
		}
		refArray = XTcl_Realloc(tls, refArray, uint32(uint64(spaceAvl)*uint64(unsafe.Sizeof(Reference{}))))
	}

	// Make a new entry for the new reference.

	refPtr = refArray + uintptr(inUse)*24
	(*Reference)(unsafe.Pointer(refPtr)).FclientData = clientData
	(*Reference)(unsafe.Pointer(refPtr)).FrefCount = 1
	(*Reference)(unsafe.Pointer(refPtr)).FmustFree = 0
	(*Reference)(unsafe.Pointer(refPtr)).FfreeProc = uintptr(0)
	inUse = inUse + 1

}

//----------------------------------------------------------------------
//
// Tcl_Release --
//
//	This function is called to cancel a previous call to Tcl_Preserve,
//	thereby allowing a block of memory to be freed (if no one else cares
//	about it).
//
// Results:
//	None.
//
// Side effects:
//	If Tcl_EventuallyFree has been called for clientData, and if no other
//	call to Tcl_Preserve is still in effect, the block of memory is freed.
//
//----------------------------------------------------------------------

func XTcl_Release(tls *libc.TLS, clientData ClientData) { /* tclPreserve.c:183:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var refPtr uintptr
	var i int32

	i = 0
	refPtr = refArray
__1:
	if !(i < inUse) {
		goto __3
	}
	{
		var mustFree int32
		var freeProc uintptr

		if (*Reference)(unsafe.Pointer(refPtr)).FclientData != clientData {
			goto __2
		}

		if libc.PreDecInt32(&(*Reference)(unsafe.Pointer(refPtr)).FrefCount, 1) != 0 {

			return
		}

		// Must remove information from the slot before calling freeProc to
		// avoid reentrancy problems if the freeProc calls Tcl_Preserve on the
		// same clientData. Copy down the last reference in the array to
		// overwrite the current slot.

		freeProc = (*Reference)(unsafe.Pointer(refPtr)).FfreeProc
		mustFree = (*Reference)(unsafe.Pointer(refPtr)).FmustFree
		inUse--
		if i < inUse {
			*(*Reference)(unsafe.Pointer(refArray + uintptr(i)*24)) = *(*Reference)(unsafe.Pointer(refArray + uintptr(inUse)*24))
		}

		// Now committed to disposing the data. But first, we've patched up
		// all the global data structures so we should release the mutex now.
		// Only then should we dabble around with potentially-slow memory
		// managers...

		if mustFree != 0 {
			if freeProc == uintptr(3) {
				XTclpFree(tls, clientData)
			} else {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{freeProc})).f(tls, clientData)
			}
		}
		return

	}
	goto __2
__2:
	i++
	refPtr += 24
	goto __1
	goto __3
__3:
	;

	// Reference not found. This is a bug in the caller.

	XTcl_Panic(tls, ts+60666, libc.VaList(bp, clientData))
}

//----------------------------------------------------------------------
//
// Tcl_EventuallyFree --
//
//	Free up a block of memory, unless a call to Tcl_Preserve is in effect
//	for that block. In this case, defer the free until all calls to
//	Tcl_Preserve have been undone by matching calls to Tcl_Release.
//
// Results:
//	None.
//
// Side effects:
//	Ptr may be released by calling free().
//
//----------------------------------------------------------------------

func XTcl_EventuallyFree(tls *libc.TLS, clientData ClientData, freeProc uintptr) { /* tclPreserve.c:262:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var refPtr uintptr
	var i int32

	// See if there is a reference for this pointer. If so, set its "mustFree"
	// flag (the flag had better not be set already!).

	i = 0
	refPtr = refArray
__1:
	if !(i < inUse) {
		goto __3
	}
	{
		if (*Reference)(unsafe.Pointer(refPtr)).FclientData != clientData {
			goto __2
		}
		if (*Reference)(unsafe.Pointer(refPtr)).FmustFree != 0 {
			XTcl_Panic(tls, ts+60709, libc.VaList(bp, clientData))
		}
		(*Reference)(unsafe.Pointer(refPtr)).FmustFree = 1
		(*Reference)(unsafe.Pointer(refPtr)).FfreeProc = freeProc

		return

	}
	goto __2
__2:
	i++
	refPtr += 24
	goto __1
	goto __3
__3:
	;

	// No reference for this block.  Free it now.

	if freeProc == uintptr(3) {
		XTclpFree(tls, clientData)
	} else {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{freeProc})).f(tls, clientData)
	}
}

//---------------------------------------------------------------------------
//
// TclHandleCreate --
//
//	Allocate a handle that contains enough information to determine if an
//	arbitrary malloc'd block has been deleted. This is used to avoid the
//	more time-expensive algorithm of Tcl_Preserve().
//
// Results:
//	The return value is a TclHandle that refers to the given malloc'd
//	block. Doubly dereferencing the returned handle will give back the
//	pointer to the block, or will give NULL if the block has been deleted.
//
// Side effects:
//	The caller must keep track of this handle (generally by storing it in
//	a field in the malloc'd block) and call TclHandleFree() on this handle
//	when the block is deleted. Everything else that wishes to keep track
//	of whether the malloc'd block has been deleted should use calls to
//	TclHandlePreserve() and TclHandleRelease() on the associated handle.
//
//---------------------------------------------------------------------------

func XTclHandleCreate(tls *libc.TLS, ptr uintptr) TclHandle { /* tclPreserve.c:325:1: */
	var handlePtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(HandleStruct{})))

	(*HandleStruct)(unsafe.Pointer(handlePtr)).Fptr = ptr
	(*HandleStruct)(unsafe.Pointer(handlePtr)).FrefCount = 0
	return handlePtr
}

//---------------------------------------------------------------------------
//
// TclHandleFree --
//
//	Called when the arbitrary malloc'd block associated with the handle is
//	being deleted. Modifies the handle so that doubly dereferencing it
//	will give NULL. This informs any user of the handle that the block of
//	memory formerly referenced by the handle has been freed.
//
// Results:
//	None.
//
// Side effects:
//	If nothing is referring to the handle, the handle will be reclaimed.
//
//---------------------------------------------------------------------------

func XTclHandleFree(tls *libc.TLS, handle TclHandle) { /* tclPreserve.c:360:1: */
	var handlePtr uintptr

	handlePtr = handle
	(*HandleStruct)(unsafe.Pointer(handlePtr)).Fptr = uintptr(0)
	if (*HandleStruct)(unsafe.Pointer(handlePtr)).FrefCount == 0 {
		XTclpFree(tls, handlePtr)
	}
}

//---------------------------------------------------------------------------
//
// TclHandlePreserve --
//
//	Declare an interest in the arbitrary malloc'd block associated with
//	the handle.
//
// Results:
//	The return value is the handle argument, with its ref count
//	incremented.
//
// Side effects:
//	For each call to TclHandlePreserve(), there should be a matching call
//	to TclHandleRelease() when the caller is no longer interested in the
//	malloc'd block associated with the handle.
//
//---------------------------------------------------------------------------

func XTclHandlePreserve(tls *libc.TLS, handle TclHandle) TclHandle { /* tclPreserve.c:405:1: */
	var handlePtr uintptr

	handlePtr = handle
	(*HandleStruct)(unsafe.Pointer(handlePtr)).FrefCount++

	return handle
}

//---------------------------------------------------------------------------
//
// TclHandleRelease --
//
//	This function is called to release an interest in the malloc'd block
//	associated with the handle.
//
// Results:
//	None.
//
// Side effects:
//	The ref count of the handle is decremented. If the malloc'd block has
//	been freed and if no one is using the handle any more, the handle will
//	be reclaimed.
//
//---------------------------------------------------------------------------

func XTclHandleRelease(tls *libc.TLS, handle TclHandle) { /* tclPreserve.c:446:1: */
	var handlePtr uintptr

	handlePtr = handle
	if libc.PreDecInt32(&(*HandleStruct)(unsafe.Pointer(handlePtr)).FrefCount, 1) == 0 && (*HandleStruct)(unsafe.Pointer(handlePtr)).Fptr == uintptr(0) {
		XTclpFree(tls, handlePtr)
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------
// Macros and flag values used by Tcl bytecode compilation and execution
// modules inside the Tcl core but not used outside.
//----------------------------------------------------------------

// Simplified form to access AuxData.
//
// ClientData TclFetchAuxData(CompileEng *envPtr, int index);

// Form of TclRegisterLiteral with flags == 0. In that case, it is safe to
// cast away constness, and it is cleanest to do that here, all in one place.
//
// int TclRegisterNewLiteral(CompileEnv *envPtr, const char *bytes,
//			     int length);

// Form of TclRegisterLiteral with flags == LITERAL_CMD_NAME. In that case, it
// is safe to cast away constness, and it is cleanest to do that here, all in
// one place.
//
// int TclRegisterNewNSLiteral(CompileEnv *envPtr, const char *bytes,
//			       int length);

// Macro used to manually adjust the stack requirements; used in cases where
// the stack effect cannot be computed from the opcode and its operands, but
// is still known at compile time.
//
// void TclAdjustStackDepth(int delta, CompileEnv *envPtr);

// Macro used to update the stack requirements. It is called by the macros
// TclEmitOpCode, TclEmitInst1 and TclEmitInst4.
// Remark that the very last instruction of a bytecode always reduces the
// stack level: INST_DONE or INST_POP, so that the maxStackdepth is always
// updated.
//
// void TclUpdateStackReqs(unsigned char op, int i, CompileEnv *envPtr);

// Macros used to update the flag that indicates if we are at the start of a
// command, based on whether the opcode is INST_START_COMMAND.
//
// void TclUpdateAtCmdStart(unsigned char op, CompileEnv *envPtr);

// Macro to emit an opcode byte into a CompileEnv's code array. The ANSI C
// "prototype" for this macro is:
//
// void TclEmitOpcode(unsigned char op, CompileEnv *envPtr);

// Macros to emit an integer operand. The ANSI C "prototype" for these macros
// are:
//
// void TclEmitInt1(int i, CompileEnv *envPtr);
// void TclEmitInt4(int i, CompileEnv *envPtr);

// Macros to emit an instruction with signed or unsigned integer operands.
// Four byte integers are stored in "big-endian" order with the high order
// byte stored at the lowest address. The ANSI C "prototypes" for these macros
// are:
//
// void TclEmitInstInt1(unsigned char op, int i, CompileEnv *envPtr);
// void TclEmitInstInt4(unsigned char op, int i, CompileEnv *envPtr);

// Macro to push a Tcl object onto the Tcl evaluation stack. It emits the
// object's one or four byte array index into the CompileEnv's code array.
// These support, respectively, a maximum of 256 (2**8) and 2**32 objects in a
// CompileEnv. The ANSI C "prototype" for this macro is:
//
// void	TclEmitPush(int objIndex, CompileEnv *envPtr);

// Macros to update a (signed or unsigned) integer starting at a pointer. The
// two variants depend on the number of bytes. The ANSI C "prototypes" for
// these macros are:
//
// void TclStoreInt1AtPtr(int i, unsigned char *p);
// void TclStoreInt4AtPtr(int i, unsigned char *p);

// Macros to update instructions at a particular pc with a new op code and a
// (signed or unsigned) int operand. The ANSI C "prototypes" for these macros
// are:
//
// void TclUpdateInstInt1AtPc(unsigned char op, int i, unsigned char *pc);
// void TclUpdateInstInt4AtPc(unsigned char op, int i, unsigned char *pc);

// Macro to fix up a forward jump to point to the current code-generation
// position in the bytecode being created (the most common case). The ANSI C
// "prototypes" for this macro is:
//
// int TclFixupForwardJumpToHere(CompileEnv *envPtr, JumpFixup *fixupPtr,
//				 int threshold);

// Macros to get a signed integer (GET_INT{1,2}) or an unsigned int
// (GET_UINT{1,2}) from a pointer. There are two variants for each return type
// that depend on the number of bytes fetched. The ANSI C "prototypes" for
// these macros are:
//
// int TclGetInt1AtPtr(unsigned char *p);
// int TclGetInt4AtPtr(unsigned char *p);
// unsigned int TclGetUInt1AtPtr(unsigned char *p);
// unsigned int TclGetUInt4AtPtr(unsigned char *p);

// The TclGetInt1AtPtr macro is tricky because we want to do sign extension on
// the 1-byte value. Unfortunately the "char" type isn't signed on all
// platforms so sign-extension doesn't always happen automatically. Sometimes
// we can explicitly declare the pointer to be signed, but other times we have
// to explicitly sign-extend the value in software.

// Macros used to compute the minimum and maximum of two integers. The ANSI C
// "prototypes" for these macros are:
//
// int TclMin(int i, int j);
// int TclMax(int i, int j);

// Convenience macros for use when compiling bodies of commands. The ANSI C
// "prototype" for these macros are:
//
// static void		BODY(Tcl_Token *tokenPtr, int word);

// Convenience macro for use when compiling tokens to be pushed. The ANSI C
// "prototype" for this macro is:
//
// static void		CompileTokens(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp);

// Convenience macros for use when pushing literals. The ANSI C "prototype" for
// these macros are:
//
// static void		PushLiteral(CompileEnv *envPtr,
//			    const char *string, int length);
// static void		PushStringLiteral(CompileEnv *envPtr,
//			    const char *string);

// Macro to advance to the next token; it is more mnemonic than the address
// arithmetic that it replaces. The ANSI C "prototype" for this macro is:
//
// static Tcl_Token *	TokenAfter(Tcl_Token *tokenPtr);

// Macro to get the offset to the next instruction to be issued. The ANSI C
// "prototype" for this macro is:
//
// static int	CurrentOffset(CompileEnv *envPtr);

// Note: the exceptDepth is a bit of a misnomer: TEBC only needs the
// maximal depth of nested CATCH ranges in order to alloc runtime
// memory. These macros should compute precisely that? OTOH, the nesting depth
// of LOOP ranges is an interesting datum for debugging purposes, and that is
// what we compute now.
//
// static int	ExceptionRangeStarts(CompileEnv *envPtr, int index);
// static void	ExceptionRangeEnds(CompileEnv *envPtr, int index);
// static void	ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL);

// Check if there is an LVT for compiled locals

// Macros for making it easier to deal with tokens and DStrings.

// Macro that encapsulates an efficiency trick that avoids a function call for
// the simplest of compiles. The ANSI C "prototype" for this macro is:
//
// static void		CompileWord(CompileEnv *envPtr, Tcl_Token *tokenPtr,
//			    Tcl_Interp *interp, int word);

// TIP #280: Remember the per-word line information of the current command. An
// index is used instead of a pointer as recursive compilation may reallocate,
// i.e. move, the array. This is also the reason to save the nuloc now, it may
// change during the course of the function.
//
// Macro to encapsulate the variable definition and setup.

// Often want to issue one of two versions of an instruction based on whether
// the argument will fit in a single byte or not. This makes it much clearer.

// How to get an anonymous local variable (used for holding temporary values
// off the stack) or a local simple scalar.

// Flags bits used by TclPushVarName.

// DTrace probe macros (NOPs if DTrace support is not enabled).

// Define the following macros to enable debug logging of the DTrace proc,
// cmd, and inst probes. Note that this does _not_ require a platform with
// DTrace, it simply logs all probe output to /tmp/tclDTraceDebug-[pid].log.
//
// If the second macro is defined, logging to file starts immediately,
// otherwise only after the first call to [tcl::dtrace]. Note that the debug
// probe data is always computed, even when it is not logged to file.
//
// Defining the third macro enables debug logging of inst probes (disabled
// by default due to the significant performance impact).

//
// #define TCL_DTRACE_DEBUG 1
// #define TCL_DTRACE_DEBUG_LOG_ENABLED 1
// #define TCL_DTRACE_DEBUG_INST_PROBES 1

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Variables that are part of the [apply] command implementation and which
// have to be passed to the other side of the NRE call.

type ApplyExtraData = struct {
	Fcmd Command
	Fefi ExtraFrameInfo
} /* tclProc.c:27:3 */

// The ProcBodyObjType type

var XtclProcBodyType = Tcl_ObjType{
	Fname:           ts + 60748,
	FfreeIntRepProc: 0, // FreeInternalRep function
	FdupIntRepProc:  0, // SetFromAny function; Tcl_ConvertToType
	// should panic instead.
} /* tclProc.c:59:19 */

// The [upvar]/[uplevel] level reference type. Uses the longValue field
// to remember the integer value of a parsed #<integer> format.
//
// Uses the default behaviour throughout, and never disposes of the string
// rep; it's just a cache type.

var levelReferenceType = Tcl_ObjType{
	Fname: ts + 60757,
} /* tclProc.c:78:26 */

// The type of lambdas. Note that every lambda will *always* have a string
// representation.
//
// Internally, ptr1 is a pointer to a Proc instance that is not bound to a
// command name, and ptr2 is a pointer to the namespace that the Proc instance
// will execute within. IF YOU CHANGE THIS, CHECK IN tclDisassemble.c TOO.

var XtclLambdaType = Tcl_ObjType{
	Fname:           ts + 60772,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // updateStringProc
	FsetFromAnyProc: 0, // setFromAnyProc
} /* tclProc.c:92:19 */

//----------------------------------------------------------------------
//
// Tcl_ProcObjCmd --
//
//	This object-based function is invoked to process the "proc" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	A new procedure gets created.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ProcObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclProc.c:119:1: */
	bp := tls.Alloc(128)
	defer tls.Free(128)

	var iPtr uintptr
	// var procPtr uintptr at bp+112, 8

	var procName uintptr
	// var simpleName uintptr at bp+104, 8

	var procArgs uintptr
	var procBody uintptr
	// var nsPtr uintptr at bp+80, 8

	// var altNsPtr uintptr at bp+88, 8

	// var cxtNsPtr uintptr at bp+96, 8

	var cmd Tcl_Command
	var _objPtr uintptr
	// Get the old command frame and release it. See also
	// TclProcCleanupProc in this file. Currently it seems as
	// if only the procbodytest::proc command of the testsuite
	// is able to trigger this situation.

	var cfOldPtr uintptr
	// var isNew int32 at bp+120, 4

	var hePtr uintptr
	var cfPtr uintptr
	var _objPtr1 uintptr
	var contextPtr uintptr
	// var numBytes int32 at bp+124, 4
	iPtr = interp

	if !(objc != 4) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+52630)
	return TCL_ERROR
__1:
	;

	// Determine the namespace where the procedure should reside. Unless the
	// command name includes namespace qualifiers, this will be the current
	// namespace.

	procName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	XTclGetNamespaceForQualName(tls, interp, procName, uintptr(0), 0,
		bp+80, bp+88, bp+96, bp+104)

	if !(*(*uintptr)(unsafe.Pointer(bp + 80)) == uintptr(0)) {
		goto __2
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+9713,
		libc.VaList(bp, procName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+7857, uintptr(0)))
	return TCL_ERROR
__2:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 104)) == uintptr(0)) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+9770,
		libc.VaList(bp+40, procName)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7444, ts+7857, uintptr(0)))
	return TCL_ERROR
__3:
	;

	// Create the data structure to represent the procedure.

	if !(XTclCreateProc(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 80)), *(*uintptr)(unsafe.Pointer(bp + 104)), *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*uintptr)(unsafe.Pointer(objv + 3*8)),
		bp+112) != TCL_OK) {
		goto __4
	}
	XTcl_AddErrorInfo(tls, interp, ts+60783)
	XTcl_AddErrorInfo(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 104 /* simpleName */)))
	XTcl_AddErrorInfo(tls, interp, ts+8424)
	return TCL_ERROR
__4:
	;

	cmd = XTclNRCreateCommandInNs(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 104 /* simpleName */)), *(*uintptr)(unsafe.Pointer(bp + 80 /* nsPtr */)),
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclObjInterpProc})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{XTclNRInterpProc})), *(*uintptr)(unsafe.Pointer(bp + 112 /* procPtr */)), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{XTclProcDeleteProc})))

	// Now initialize the new procedure's cmdPtr field. This will be used
	// later when the procedure is called to determine what namespace the
	// procedure will run in. This will be different than the current
	// namespace if the proc was renamed into a different namespace.

	(*Proc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112 /* procPtr */)))).FcmdPtr = cmd

	// TIP #280: Remember the line the procedure body is starting on. In a
	// bytecode context we ask the engine to provide us with the necessary
	// information. This is for the initialization of the byte code compiler
	// when the body is used for the first time.
	//
	// This code is nearly identical to the #280 code in SetLambdaFromAny, see
	// this file. The differences are the different index of the body in the
	// line array of the context, and the lambda code requires some special
	// processing. Find a way to factor the common elements into a single
	// function.

	if !((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr != 0) {
		goto __5
	}
	contextPtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CmdFrame{})))

	*(*CmdFrame)(unsafe.Pointer(contextPtr)) = *(*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr))

	if !((*CmdFrame)(unsafe.Pointer(contextPtr)).Ftype == 2) {
		goto __6
	}
	// Retrieve source information from the bytecode, if possible. If
	// the information is retrieved successfully, context.type will be
	// TCL_LOCATION_SOURCE and the reference held by
	// context.data.eval.path will be counted.

	XTclGetSrcInfoForPc(tls, contextPtr)
	goto __7
__6:
	if !((*CmdFrame)(unsafe.Pointer(contextPtr)).Ftype == 4) {
		goto __8
	}
	// The copy into 'context' up above has created another reference
	// to 'context.data.eval.path'; account for it.

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(contextPtr + 40)))).FrefCount++
__8:
	;
__7:
	;

	if !((*CmdFrame)(unsafe.Pointer(contextPtr)).Ftype == 4) {
		goto __9
	}
	// We can account for source location within a proc only if the
	// proc body was not created by substitution.

	if !((*CmdFrame)(unsafe.Pointer(contextPtr)).Fline != 0 &&
		(*CmdFrame)(unsafe.Pointer(contextPtr)).Fnline >= 4 && *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(contextPtr)).Fline + 3*4)) >= 0) {
		goto __10
	}
	cfPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CmdFrame{})))

	(*CmdFrame)(unsafe.Pointer(cfPtr)).Flevel = -1
	(*CmdFrame)(unsafe.Pointer(cfPtr)).Ftype = (*CmdFrame)(unsafe.Pointer(contextPtr)).Ftype
	(*CmdFrame)(unsafe.Pointer(cfPtr)).Fline = XTcl_Alloc(tls, uint32(unsafe.Sizeof(int32(0))))
	*(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(cfPtr)).Fline)) = *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(contextPtr)).Fline + 3*4))
	(*CmdFrame)(unsafe.Pointer(cfPtr)).Fnline = 1
	(*CmdFrame)(unsafe.Pointer(cfPtr)).FframePtr = uintptr(0)
	(*CmdFrame)(unsafe.Pointer(cfPtr)).FnextPtr = uintptr(0)

	*(*uintptr)(unsafe.Pointer(cfPtr + 40)) = *(*uintptr)(unsafe.Pointer(contextPtr + 40))
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cfPtr + 40)))).FrefCount++

	(*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd = uintptr(0)
	(*CmdFrame)(unsafe.Pointer(cfPtr)).Flen = 0

	hePtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr, *(*uintptr)(unsafe.Pointer(bp + 112 /* procPtr */)), bp+120 /* &isNew */)
	if !!(*(*int32)(unsafe.Pointer(bp + 120)) != 0) {
		goto __11
	}
	// Get the old command frame and release it. See also
	// TclProcCleanupProc in this file. Currently it seems as
	// if only the procbodytest::proc command of the testsuite
	// is able to trigger this situation.

	cfOldPtr = (*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData

	if !((*CmdFrame)(unsafe.Pointer(cfOldPtr)).Ftype == 4) {
		goto __12
	}
__13:
	_objPtr = *(*uintptr)(unsafe.Pointer(cfOldPtr + 40))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __16
	}
	XTclFreeObj(tls, _objPtr)
__16:
	;
	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;
	*(*uintptr)(unsafe.Pointer(cfOldPtr + 40)) = uintptr(0)
__12:
	;
	XTclpFree(tls, (*CmdFrame)(unsafe.Pointer(cfOldPtr)).Fline)
	(*CmdFrame)(unsafe.Pointer(cfOldPtr)).Fline = uintptr(0)
	XTclpFree(tls, cfOldPtr)
__11:
	;
	(*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData = cfPtr
__10:
	;

	// 'contextPtr' is going out of scope; account for the reference
	// that it's holding to the path name.

__17:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(contextPtr + 40))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __20
	}
	XTclFreeObj(tls, _objPtr1)
__20:
	;
	goto __18
__18:
	if 0 != 0 {
		goto __17
	}
	goto __19
__19:
	;
	*(*uintptr)(unsafe.Pointer(contextPtr + 40)) = uintptr(0)
__9:
	;
	XTclStackFree(tls, interp, contextPtr)
__5:
	;

	// Optimize for no-op procs: if the body is not precompiled (like a TclPro
	// procbody), and the argument list is just "args" and the body is empty,
	// define a compileProc to compile a no-op.
	//
	// Notes:
	//	 - cannot be done for any argument list without having different
	//	   compiled/not-compiled behaviour in the "wrong argument #" case, or
	//	   making this code much more complicated. In any case, it doesn't
	//	   seem to make a lot of sense to verify the number of arguments we
	//	   are about to ignore ...
	//	 - could be enhanced to handle also non-empty bodies that contain only
	//	   comments; however, parsing the body will slow down the compilation
	//	   of all procs whose argument list is just _args_

	if !((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 3*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclProcBodyType))) {
		goto __21
	}
	goto done
__21:
	;

	procArgs = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	}()

__22:
	if !(int32(*(*int8)(unsafe.Pointer(procArgs))) == ' ') {
		goto __23
	}
	procArgs++
	goto __22
__23:
	;

	if !(int32(*(*int8)(unsafe.Pointer(procArgs))) == 'a' && libc.Xstrncmp(tls, procArgs, ts+13723, uint64(4)) == 0) {
		goto __24
	}

	procArgs += uintptr(4)
__25:
	if !(int32(*(*int8)(unsafe.Pointer(procArgs))) != 0) {
		goto __26
	}
	if !(int32(*(*int8)(unsafe.Pointer(procArgs))) != ' ') {
		goto __27
	}
	goto done
__27:
	;
	procArgs++
	goto __25
__26:
	;

	// The argument list is just "args"; check the body

	procBody = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+124)
	if !(XTclParseAllWhiteSpace(tls, procBody, *(*int32)(unsafe.Pointer(bp + 124))) < *(*int32)(unsafe.Pointer(bp + 124))) {
		goto __28
	}
	goto done
__28:
	;

	// The body is just spaces: link the compileProc

	(*Command)(unsafe.Pointer(cmd)).FcompileProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
	}{XTclCompileNoOp}))
__24:
	;

done:
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCreateProc --
//
//	Creates the data associated with a Tcl procedure definition. This
//	function knows how to handle two types of body objects: strings and
//	procbody. Strings are the traditional (and common) value for bodies,
//	procbody are values created by extensions that have loaded a
//	previously compiled script.
//
// Results:
//	Returns TCL_OK on success, along with a pointer to a Tcl procedure
//	definition in procPtrPtr where the cmdPtr field is not initialised.
//	This definition should be freed by calling TclProcCleanupProc() when
//	it is no longer needed. Returns TCL_ERROR if anything goes wrong.
//
// Side effects:
//	If anything goes wrong, this function returns an error message in the
//	interpreter.
//
//----------------------------------------------------------------------

func XTclCreateProc(tls *libc.TLS, interp uintptr, nsPtr uintptr, procName uintptr, argsPtr uintptr, bodyPtr uintptr, procPtrPtr uintptr) int32 { /* tclProc.c:364:1: */
	bp := tls.Alloc(380)
	defer tls.Free(380)

	var iPtr uintptr
	var procPtr uintptr
	var i int32
	var result int32
	// var numArgs int32 at bp+340, 4

	var localPtr uintptr
	// var argArray uintptr at bp+344, 8

	var precompiled int32
	var bytes uintptr
	// var length int32 at bp+336, 4

	var sharedBodyPtr uintptr
	var errorObj uintptr
	var errorObj1 uintptr
	var errorObj2 uintptr
	// var tmpLength int32 at bp+372, 4

	// var valueLength int32 at bp+376, 4

	var tmpPtr uintptr
	var value uintptr
	var argname uintptr
	var p uintptr
	var last uintptr
	// var fieldCount int32 at bp+352, 4

	// var nameLength int32 at bp+368, 4

	// var fieldValues uintptr at bp+360, 8

	var _objPtr uintptr
	var _objPtr1 uintptr
	iPtr = interp
	localPtr = uintptr(0)
	precompiled = 0

	if !((*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclProcBodyType))) {
		goto __1
	}
	// Because the body is a TclProProcBody, the actual body is already
	// compiled, and it is not shared with anyone else, so it's OK not to
	// unshare it (as a matter of fact, it is bad to unshare it, because
	// there may be no source code).
	//
	// We don't create and initialize a Proc structure for the procedure;
	// rather, we use what is in the body object. We increment the ref
	// count of the Proc struct since the command (soon to be created)
	// will be holding a reference to it.

	procPtr = *(*uintptr)(unsafe.Pointer(bodyPtr + 32))
	(*Proc)(unsafe.Pointer(procPtr)).FiPtr = iPtr
	(*Proc)(unsafe.Pointer(procPtr)).FrefCount++
	precompiled = 1
	goto __2
__1:
	// If the procedure's body object is shared because its string value
	// is identical to, e.g., the body of another procedure, we must
	// create a private copy for this procedure to use. Such sharing of
	// procedure bodies is rare but can cause problems. A procedure body
	// is compiled in a context that includes the number of "slots"
	// allocated by the compiler for local variables. There is a local
	// variable slot for each formal parameter (the
	// "procPtr->numCompiledLocals = numArgs" assignment below). This
	// means that the same code can not be shared by two procedures that
	// have a different number of arguments, even if their bodies are
	// identical. Note that we don't use Tcl_DuplicateObj since we would
	// not want any bytecode internal representation.

	if !((*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FrefCount > 1) {
		goto __3
	}
	sharedBodyPtr = bodyPtr

	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 336)) = (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, bodyPtr, bp+336)
	}()
	bodyPtr = XTcl_NewStringObj(tls, bytes, *(*int32)(unsafe.Pointer(bp + 336 /* length */)))

	// TIP #280.
	// Ensure that the continuation line data for the original body is
	// not lost and applies to the new body as well.

	XTclContinuationsCopy(tls, bodyPtr, sharedBodyPtr)
__3:
	;

	// Create and initialize a Proc structure for the procedure. We
	// increment the ref count of the procedure's body object since there
	// will be a reference to it in the Proc structure.

	(*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FrefCount++

	procPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Proc{})))
	(*Proc)(unsafe.Pointer(procPtr)).FiPtr = iPtr
	(*Proc)(unsafe.Pointer(procPtr)).FrefCount = 1
	(*Proc)(unsafe.Pointer(procPtr)).FbodyPtr = bodyPtr
	(*Proc)(unsafe.Pointer(procPtr)).FnumArgs = 0 // Actual argument count is set below.
	(*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals = 0
	(*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr = uintptr(0)
	(*Proc)(unsafe.Pointer(procPtr)).FlastLocalPtr = uintptr(0)
__2:
	;

	// Break up the argument list into argument specifiers, then process each
	// argument specifier. If the body is precompiled, processing is limited
	// to checking that the parsed argument is consistent with the one stored
	// in the Proc.

	result = XTcl_ListObjGetElements(tls, interp, argsPtr, bp+340, bp+344)
	if !(result != TCL_OK) {
		goto __4
	}
	goto procError
__4:
	;

	if !(precompiled != 0) {
		goto __5
	}
	if !(*(*int32)(unsafe.Pointer(bp + 340)) > (*Proc)(unsafe.Pointer(procPtr)).FnumArgs) {
		goto __7
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+60805, libc.VaList(bp, procName, *(*int32)(unsafe.Pointer(bp + 340 /* numArgs */)),
			(*Proc)(unsafe.Pointer(procPtr)).FnumArgs)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+7949, ts+26034,
		ts+60881, uintptr(0)))
	goto procError
__7:
	;
	localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr
	goto __6
__5:
	(*Proc)(unsafe.Pointer(procPtr)).FnumArgs = *(*int32)(unsafe.Pointer(bp + 340 /* numArgs */))
	(*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals = *(*int32)(unsafe.Pointer(bp + 340 /* numArgs */))
__6:
	;

	i = 0
__8:
	if !(i < *(*int32)(unsafe.Pointer(bp + 340))) {
		goto __10
	}

	// Now divide the specifier up into name and default.

	result = XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 344 /* argArray */)) + uintptr(i)*8)), bp+352,
		bp+360)
	if !(result != TCL_OK) {
		goto __11
	}
	goto procError
__11:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 352)) > 2) {
		goto __12
	}
	errorObj = XTcl_NewStringObj(tls,
		ts+60894, -1)
	XTcl_AppendObjToObj(tls, errorObj, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 344 /* argArray */)) + uintptr(i)*8)))
	XTcl_AppendToObj(tls, errorObj, ts+25631, -1)
	XTcl_SetObjResult(tls, interp, errorObj)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+7949, ts+26034,
		ts+60934, uintptr(0)))
	goto procError
__12:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 352)) == 0 || XTcl_GetCharLength(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360))))) == 0) {
		goto __13
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+60955, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+4178, ts+7949, ts+26034,
		ts+60934, uintptr(0)))
	goto procError
__13:
	;

	// Check that the formal parameter name is a scalar.

	p = libc.AssignUintptr(&argname, XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360 /* fieldValues */)))), bp+368))
	last = argname + uintptr(*(*int32)(unsafe.Pointer(bp + 368)))
__14:
	if !(p < last) {
		goto __15
	}
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '(') {
		goto __16
	}
	if !(int32(*(*int8)(unsafe.Pointer(last + libc.UintptrFromInt32(-1)))) == ')') {
		goto __18
	} // We have an array element.
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+60977,
		libc.VaList(bp+144, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360 /* fieldValues */))))))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+152, ts+4178, ts+7949, ts+26034,
		ts+60934, uintptr(0)))
	goto procError
__18:
	;
	goto __17
__16:
	if !(int32(*(*int8)(unsafe.Pointer(p))) == ':' && int32(*(*int8)(unsafe.Pointer(p + 1))) == ':') {
		goto __19
	}
	errorObj1 = XTcl_NewStringObj(tls,
		ts+61019, -1)
	XTcl_AppendObjToObj(tls, errorObj1, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360 /* fieldValues */)))))
	XTcl_AppendToObj(tls, errorObj1, ts+61038, -1)
	XTcl_SetObjResult(tls, interp, errorObj1)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+192, ts+4178, ts+7949, ts+26034,
		ts+60934, uintptr(0)))
	goto procError
__19:
	;
__17:
	;
	p++
	goto __14
__15:
	;

	if !(precompiled != 0) {
		goto __20
	}
	// Compare the parsed argument with the stored one. Note that the
	// only flag value that makes sense at this point is VAR_ARGUMENT
	// (its value was kept the same as pre VarReform to simplify
	// tbcload's processing of older byetcodes).
	//
	// The only other flag vlaue that is important to retrieve from
	// precompiled procs is VAR_TEMPORARY (also unchanged). It is
	// needed later when retrieving the variable names.

	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).FnameLength != *(*int32)(unsafe.Pointer(bp + 368)) ||
		libc.Xmemcmp(tls, localPtr+40, argname, uint64(*(*int32)(unsafe.Pointer(bp + 368)))) != 0 ||
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FframeIndex != i ||
		!((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_ARGUMENT != 0) ||
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr == uintptr(0) && *(*int32)(unsafe.Pointer(bp + 352)) == 2 ||
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr != uintptr(0) && *(*int32)(unsafe.Pointer(bp + 352)) != 2) {
		goto __22
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+61061, libc.VaList(bp+232, procName, i)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+248, ts+4178, ts+7949, ts+26034,
		ts+60881, uintptr(0)))
	goto procError
__22:
	;

	// Compare the default value if any.

	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr != uintptr(0)) {
		goto __23
	}
	tmpPtr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer((*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 372)) = (*Tcl_Obj)(unsafe.Pointer((*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer((*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr, bp+372)
	}()
	value = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)) + 1*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 376)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)) + 1*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)) + 1*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)) + 1*8)), bp+376)
	}()

	if !(*(*int32)(unsafe.Pointer(bp + 376)) != *(*int32)(unsafe.Pointer(bp + 372)) ||
		libc.Xmemcmp(tls, value, tmpPtr, uint64(*(*int32)(unsafe.Pointer(bp + 372)))) != 0) {
		goto __24
	}
	errorObj2 = XTcl_ObjPrintf(tls,
		ts+61135, libc.VaList(bp+288, procName))
	XTcl_AppendObjToObj(tls, errorObj2, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360 /* fieldValues */)))))
	XTcl_AppendToObj(tls, errorObj2,
		ts+61170, -1)
	XTcl_SetObjResult(tls, interp, errorObj2)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+296, ts+4178, ts+7949, ts+26034,
		ts+60881, uintptr(0)))
	goto procError
__24:
	;
__23:
	;
	if !(i == *(*int32)(unsafe.Pointer(bp + 340))-1 &&
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FnameLength == 4 &&
		int32(*(*int8)(unsafe.Pointer(localPtr + 40))) == 'a' &&
		libc.Xstrcmp(tls, localPtr+40, ts+13723) == 0) {
		goto __25
	}
	*(*int32)(unsafe.Pointer(localPtr + 16)) |= VAR_IS_ARGS
__25:
	;

	localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
	goto __21
__20:
	// Allocate an entry in the runtime procedure frame's array of
	// local variables for the argument.

	localPtr = XTcl_Alloc(tls, uint32(int32(uintptr(0)+40)+(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))))).Flength+1))
	if !((*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr == uintptr(0)) {
		goto __26
	}
	(*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr = libc.AssignPtrUintptr(procPtr+48, localPtr)
	goto __27
__26:
	(*CompiledLocal)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FlastLocalPtr)).FnextPtr = localPtr
	(*Proc)(unsafe.Pointer(procPtr)).FlastLocalPtr = localPtr
__27:
	;
	(*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr = uintptr(0)
	(*CompiledLocal)(unsafe.Pointer(localPtr)).FnameLength = *(*int32)(unsafe.Pointer(bp + 368 /* nameLength */))
	(*CompiledLocal)(unsafe.Pointer(localPtr)).FframeIndex = i
	(*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags = VAR_ARGUMENT
	(*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo = uintptr(0)

	if !(*(*int32)(unsafe.Pointer(bp + 352)) == 2) {
		goto __28
	}
	(*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360 /* fieldValues */)) + 1*8))
	(*Tcl_Obj)(unsafe.Pointer((*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr)).FrefCount++
	goto __29
__28:
	(*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr = uintptr(0)
__29:
	;
	libc.Xmemcpy(tls, localPtr+40, argname, uint64((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 360)))))).Flength+1))
	if !(i == *(*int32)(unsafe.Pointer(bp + 340))-1 &&
		(*CompiledLocal)(unsafe.Pointer(localPtr)).FnameLength == 4 &&
		int32(*(*int8)(unsafe.Pointer(localPtr + 40))) == 'a' &&
		libc.Xmemcmp(tls, localPtr+40, ts+13723, uint64(4)) == 0) {
		goto __30
	}
	*(*int32)(unsafe.Pointer(localPtr + 16)) |= VAR_IS_ARGS
__30:
	;
__21:
	;
	goto __9
__9:
	i++
	goto __8
	goto __10
__10:
	;

	*(*uintptr)(unsafe.Pointer(procPtrPtr)) = procPtr
	return TCL_OK

procError:
	if !(precompiled != 0) {
		goto __31
	}
	(*Proc)(unsafe.Pointer(procPtr)).FrefCount--
	goto __32
__31:
__33:
	_objPtr = bodyPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __36
	}
	XTclFreeObj(tls, _objPtr)
__36:
	;
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
__37:
	if !((*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr != uintptr(0)) {
		goto __38
	}
	localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr
	(*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr

	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr != uintptr(0)) {
		goto __39
	}
__40:
	_objPtr1 = (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __43
	}
	XTclFreeObj(tls, _objPtr1)
__43:
	;
	goto __41
__41:
	if 0 != 0 {
		goto __40
	}
	goto __42
__42:
	;
__39:
	;

	XTclpFree(tls, localPtr)
	goto __37
__38:
	;
	XTclpFree(tls, procPtr)
__32:
	;
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclGetFrame --
//
//	Given a description of a procedure frame, such as the first argument
//	to an "uplevel" or "upvar" command, locate the call frame for the
//	appropriate level of procedure.
//
// Results:
//	The return value is -1 if an error occurred in finding the frame (in
//	this case an error message is left in the interp's result). 1 is
//	returned if string was either a number or a number preceded by "#" and
//	it specified a valid frame. 0 is returned if string isn't one of the
//	two things above (in this case, the lookup acts as if string were
//	"1"). The variable pointed to by framePtrPtr is filled in with the
//	address of the desired frame (unless an error occurs, in which case it
//	isn't modified).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetFrame(tls *libc.TLS, interp uintptr, name uintptr, framePtrPtr uintptr) int32 { /* tclProc.c:681:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var iPtr uintptr
	var curLevel int32
	// var level int32 at bp+40, 4

	var result int32
	var framePtr uintptr
	iPtr = interp

	// Parse string to figure out which level number to go to.

	result = 1
	curLevel = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Flevel
	if !(int32(*(*int8)(unsafe.Pointer(name))) == '#') {
		goto __1
	}
	if !(XTcl_GetInt(tls, uintptr(0), name+uintptr(1), bp+40) != TCL_OK || *(*int32)(unsafe.Pointer(bp + 40)) < 0) {
		goto __3
	}
	goto levelError
__3:
	;
	goto __2
__1:
	if !(libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(name))))) != 0) {
		goto __4
	} // INTL: digit
	if !(XTcl_GetInt(tls, uintptr(0), name, bp+40) != TCL_OK) {
		goto __6
	}
	goto levelError
__6:
	;
	*(*int32)(unsafe.Pointer(bp + 40 /* level */)) = curLevel - *(*int32)(unsafe.Pointer(bp + 40))
	goto __5
__4:
	// (historical, TODO) If name does not contain a level (#0 or 1),
	// TclGetFrame and Tcl_UpVar2 uses current level - 1
	*(*int32)(unsafe.Pointer(bp + 40 /* level */)) = curLevel - 1
	result = 0
	name = ts + 18937 /* "1" */ // be more consistent with TclObjGetFrame (error at top - 1)
__5:
	;
__2:
	;

	// Figure out which frame to use, and return it to the caller.

	framePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
__7:
	if !(framePtr != uintptr(0)) {
		goto __9
	}
	if !((*CallFrame)(unsafe.Pointer(framePtr)).Flevel == *(*int32)(unsafe.Pointer(bp + 40))) {
		goto __10
	}
	goto __9
__10:
	;
	goto __8
__8:
	framePtr = (*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr
	goto __7
	goto __9
__9:
	;
	if !(framePtr == uintptr(0)) {
		goto __11
	}
	goto levelError
__11:
	;

	*(*uintptr)(unsafe.Pointer(framePtrPtr)) = framePtr
	return result

levelError:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+14298, libc.VaList(bp, name)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+61225, uintptr(0)))
	return -1
}

//----------------------------------------------------------------------
//
// TclObjGetFrame --
//
//	Given a description of a procedure frame, such as the first argument
//	to an "uplevel" or "upvar" command, locate the call frame for the
//	appropriate level of procedure.
//
// Results:
//	The return value is -1 if an error occurred in finding the frame (in
//	this case an error message is left in the interp's result). 1 is
//	returned if objPtr was either an int or an int preceded by "#" and
//	it specified a valid frame. 0 is returned if objPtr isn't one of the
//	two things above (in this case, the lookup acts as if objPtr were
//	"1"). The variable pointed to by framePtrPtr is filled in with the
//	address of the desired frame (unless an error occurs, in which case it
//	isn't modified).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclObjGetFrame(tls *libc.TLS, interp uintptr, objPtr uintptr, framePtrPtr uintptr) int32 { /* tclProc.c:765:1: */
	bp := tls.Alloc(52)
	defer tls.Free(52)

	var iPtr uintptr = interp
	var curLevel int32
	// var level int32 at bp+48, 4

	var result int32
	var name uintptr = uintptr(0)

	// Parse object to figure out which level number to go to.

	result = 0
	curLevel = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Flevel

	// Check for integer first, since that has potential to spare us
	// a generation of a stringrep.

	if objPtr == uintptr(0) {
		// Do nothing
	} else if TCL_OK == XTcl_GetIntFromObj(tls, uintptr(0), objPtr, bp+48) &&
		*(*int32)(unsafe.Pointer(bp + 48)) >= 0 {
		*(*int32)(unsafe.Pointer(bp + 48 /* level */)) = curLevel - *(*int32)(unsafe.Pointer(bp + 48))
		result = 1
	} else if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&levelReferenceType)) {
		*(*int32)(unsafe.Pointer(bp + 48 /* level */)) = int32(*(*int32)(unsafe.Pointer(objPtr + 32)))
		result = 1
	} else {
		name = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}
			return XTcl_GetString(tls, objPtr)
		}()
		if int32(*(*int8)(unsafe.Pointer(name))) == '#' {
			if TCL_OK == XTcl_GetInt(tls, uintptr(0), name+uintptr(1), bp+48) && *(*int32)(unsafe.Pointer(bp + 48)) >= 0 {
				if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
					if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
						(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
					}
					(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
				}

				(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&levelReferenceType))
				*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(*(*int32)(unsafe.Pointer(bp + 48 /* level */)))
				result = 1
			} else {
				result = -1
			}
		} else if libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(name))))) != 0 { // INTL: digit
			// If this were an integer, we'd have succeeded already.
			// Docs say we have to treat this as a 'bad level'  error.
			result = -1
		}
	}

	if result == 0 {
		*(*int32)(unsafe.Pointer(bp + 48 /* level */)) = curLevel - 1
		name = ts + 18937 /* "1" */
	}
	if result != -1 {
		if *(*int32)(unsafe.Pointer(bp + 48)) >= 0 {
			var framePtr uintptr
			for framePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr; framePtr != uintptr(0); framePtr = (*CallFrame)(unsafe.Pointer(framePtr)).FcallerVarPtr {
				if (*CallFrame)(unsafe.Pointer(framePtr)).Flevel == *(*int32)(unsafe.Pointer(bp + 48)) {
					*(*uintptr)(unsafe.Pointer(framePtrPtr)) = framePtr
					return result
				}
			}
		}
		if name == uintptr(0) {
			name = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				}
				return XTcl_GetString(tls, objPtr)
			}()
		}
	}

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+14298, libc.VaList(bp, name)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+14313, name, uintptr(0)))
	return -1
}

//----------------------------------------------------------------------
//
// Tcl_UplevelObjCmd --
//
//	This object function is invoked to process the "uplevel" Tcl command.
//	See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sUplevel_Callback(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclProc.c:859:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var savedVarFramePtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	if result == TCL_ERROR {
		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+61236, libc.VaList(bp, XTcl_GetErrorLine(tls, interp))))
	}

	// Restore the variable frame, and return.

	(*Interp)(unsafe.Pointer(interp)).FvarFramePtr = savedVarFramePtr
	return result
}

// ARGSUSED
func XTcl_UplevelObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclProc.c:881:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRUplevelObjCmd})), dummy, objc, objv)
}

func XTclNRUplevelObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclProc.c:891:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var iPtr uintptr
	// var invoker uintptr at bp+16, 8

	// var word int32 at bp+24, 4

	var result int32
	var savedVarFramePtr uintptr
	// var framePtr uintptr at bp+8, 8

	var objPtr uintptr
	var status int32
	// var llength int32 at bp, 4

	var _objPtr uintptr
	var _callbackPtr uintptr
	iPtr = interp
	*(*uintptr)(unsafe.Pointer(bp + 16 /* invoker */)) = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 24 /* word */)) = 0

	if !(objc < 2) {
		goto __1
	}
	// to do
	//    simplify things by interpreting the argument as a command when there
	//    is only one argument.  This requires a TIP since currently a single
	//    argument is interpreted as a level indicator if possible.
uplevelSyntax:
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+61266)
	return TCL_ERROR
	goto __2
__1:
	if !(!((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != uintptr(0)) && objc == 2) {
		goto __3
	}
	status = XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp)
	if !(status == TCL_OK && *(*int32)(unsafe.Pointer(bp)) > 1) {
		goto __4
	}
	// the first argument can't interpreted as a level. Avoid
	// generating a string representation of the script.
	result = XTclGetFrame(tls, interp, ts+18937, bp+8)
	if !(result == -1) {
		goto __5
	}
	return TCL_ERROR
__5:
	;
	objc = objc - 1
	objv += 8 * uintptr(1)
	goto havelevel
__4:
	;
__3:
	;
__2:
	;

	// Find the level to use for executing the command.

	result = XTclObjGetFrame(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+8)
	if !(result == -1) {
		goto __6
	}
	return TCL_ERROR
__6:
	;
	objc = objc - (result + 1)
	if !(objc == 0) {
		goto __7
	}
	goto uplevelSyntax
__7:
	;
	objv += 8 * uintptr(result+1)

havelevel:

	// Modify the interpreter state to execute in the given frame.

	savedVarFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = *(*uintptr)(unsafe.Pointer(bp + 8 /* framePtr */))

	// Execute the residual arguments as a command.

	if !(objc == 1) {
		goto __8
	}
	// TIP #280. Make actual argument location available to eval'd script

	XTclArgumentGet(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), bp+16, bp+24)
	objPtr = *(*uintptr)(unsafe.Pointer(objv))

	goto __9
__8:
	// More than one argument: concatenate them together with spaces
	// between, then evaluate the result. Tcl_EvalObjEx will delete the
	// object when it decrements its refcount after eval'ing it.

	objPtr = XTcl_ConcatObj(tls, objc, objv)
__9:
	;

__10:
__13:
	;
__16:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __19
	}
	XTclAllocateFreeObjects(tls)
__19:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	_callbackPtr = _objPtr
	goto __14
__14:
	if 0 != 0 {
		goto __13
	}
	goto __15
__15:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{sUplevel_Callback}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = savedVarFramePtr
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __11
__11:
	if 0 != 0 {
		goto __10
	}
	goto __12
__12:
	;
	return XTclNREvalObjEx(tls, interp, objPtr, 0, *(*uintptr)(unsafe.Pointer(bp + 16 /* invoker */)), *(*int32)(unsafe.Pointer(bp + 24 /* word */)))
}

//----------------------------------------------------------------------
//
// TclFindProc --
//
//	Given the name of a procedure, return a pointer to the record
//	describing the procedure. The procedure will be looked up using the
//	usual rules: first in the current namespace and then in the global
//	namespace.
//
// Results:
//	NULL is returned if the name doesn't correspond to any procedure.
//	Otherwise, the return value is a pointer to the procedure's record. If
//	the name is found but refers to an imported command that points to a
//	"real" procedure defined in another namespace, a pointer to that
//	"real" procedure's structure is returned.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFindProc(tls *libc.TLS, iPtr uintptr, procName uintptr) uintptr { /* tclProc.c:1003:6: */
	var cmd Tcl_Command
	var cmdPtr uintptr

	cmd = XTcl_FindCommand(tls, iPtr, procName, uintptr(0), 0)
	if cmd == uintptr(0) {
		return uintptr(0)
	}
	cmdPtr = cmd

	return XTclIsProc(tls, cmdPtr)
}

//----------------------------------------------------------------------
//
// TclIsProc --
//
//	Tells whether a command is a Tcl procedure or not.
//
// Results:
//	If the given command is actually a Tcl procedure, the return value is
//	the address of the record describing the procedure. Otherwise the
//	return value is 0.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclIsProc(tls *libc.TLS, cmdPtr uintptr) uintptr { /* tclProc.c:1038:6: */
	var origCmd Tcl_Command = XTclGetOriginalCommand(tls, cmdPtr)

	if origCmd != uintptr(0) {
		cmdPtr = origCmd
	}
	if (*Command)(unsafe.Pointer(cmdPtr)).FdeleteProc == *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{XTclProcDeleteProc})) {
		return (*Command)(unsafe.Pointer(cmdPtr)).FobjClientData
	}
	return uintptr(0)
}

func sProcWrongNumArgs(tls *libc.TLS, interp uintptr, skip int32) int32 { /* tclProc.c:1054:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var framePtr uintptr = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	var procPtr uintptr = (*CallFrame)(unsafe.Pointer(framePtr)).FprocPtr
	var localCt int32 = (*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals
	var numArgs int32
	var i int32
	var desiredObjs uintptr
	var final uintptr = uintptr(0)

	// Build up desired argument list for Tcl_WrongNumArgs

	numArgs = (*Proc)(unsafe.Pointer((*CallFrame)(unsafe.Pointer(framePtr)).FprocPtr)).FnumArgs
	desiredObjs = XTclStackAlloc(tls, interp,
		int32(unsafe.Sizeof(uintptr(0)))*(numArgs+1))

	if (*CallFrame)(unsafe.Pointer(framePtr)).FisProcCallFrame&FRAME_IS_LAMBDA != 0 {
		*(*uintptr)(unsafe.Pointer(desiredObjs)) = XTcl_NewStringObj(tls, ts+60772, -1)
	} else {
		*(*uintptr)(unsafe.Pointer(desiredObjs)) = XTcl_NewListObj(tls, 1, (*CallFrame)(unsafe.Pointer(framePtr)).Fobjv+uintptr(skip)*8-uintptr(1)*8)
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(desiredObjs)))).FrefCount++

	if localCt > 0 {
		var defPtr uintptr = (*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr + 8 + uintptr(localCt)*8

		i = 1
	__1:
		if !(i <= numArgs) {
			goto __3
		}
		{
			var argObj uintptr
			var namePtr uintptr = *(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr + 8 + uintptr(i-1)*8))

			if *(*uintptr)(unsafe.Pointer(defPtr + 8)) != uintptr(0) {
				for ok := true; ok; ok = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					argObj = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(argObj)).FrefCount = 0
				(*Tcl_Obj)(unsafe.Pointer(argObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(argObj)).Flength = 0
				(*Tcl_Obj)(unsafe.Pointer(argObj)).FtypePtr = uintptr(0)
				{
				}

				XTcl_AppendStringsToObj(tls, argObj, libc.VaList(bp, ts+61292, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes
					}
					return XTcl_GetString(tls, namePtr)
				}(), ts+61292, uintptr(0)))
			} else if (*Var)(unsafe.Pointer(defPtr)).Fflags&VAR_IS_ARGS != 0 {
				numArgs--
				final = ts + 61294 /* "?arg ...?" */
				goto __3
			} else {
				argObj = namePtr
				(*Tcl_Obj)(unsafe.Pointer(namePtr)).FrefCount++
			}
			*(*uintptr)(unsafe.Pointer(desiredObjs + uintptr(i)*8)) = argObj

		}
		goto __2
	__2:
		i++
		defPtr += 16
		goto __1
		goto __3
	__3:
	}

	XTcl_ResetResult(tls, interp)
	XTcl_WrongNumArgs(tls, interp, numArgs+1, desiredObjs, final)

	for i = 0; i <= numArgs; i++ {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(desiredObjs + uintptr(i)*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTclStackFree(tls, interp, desiredObjs)
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclInitCompiledLocals --
//
//	This routine is invoked in order to initialize the compiled locals
//	table for a new call frame.
//
//	DEPRECATED: functionality has been inlined elsewhere; this function
//	remains to insure binary compatibility with Itcl.
//
// Results:
//	None.
//
// Side effects:
//	May invoke various name resolvers in order to determine which
//	variables are being referenced at runtime.
//
//----------------------------------------------------------------------

func XTclInitCompiledLocals(tls *libc.TLS, interp uintptr, framePtr uintptr, nsPtr uintptr) { /* tclProc.c:1137:1: */
	var varPtr uintptr = (*CallFrame)(unsafe.Pointer(framePtr)).FcompiledLocals
	var bodyPtr uintptr
	var codePtr uintptr

	bodyPtr = (*Proc)(unsafe.Pointer((*CallFrame)(unsafe.Pointer(framePtr)).FprocPtr)).FbodyPtr
	if (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclByteCodeType)) {
		XTcl_Panic(tls, ts+61304, 0)
	}
	codePtr = *(*uintptr)(unsafe.Pointer(bodyPtr + 32))

	if (*CallFrame)(unsafe.Pointer(framePtr)).FnumCompiledLocals != 0 {
		if !(int32((*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr) != 0) {
			sInitLocalCache(tls, (*CallFrame)(unsafe.Pointer(framePtr)).FprocPtr)
		}
		(*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr = (*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr
		(*LocalCache)(unsafe.Pointer((*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr)).FrefCount++
	}

	sInitResolvedLocals(tls, interp, codePtr, varPtr, nsPtr)
}

//----------------------------------------------------------------------
//
// InitResolvedLocals --
//
//	This routine is invoked in order to initialize the compiled locals
//	table for a new call frame.
//
// Results:
//	None.
//
// Side effects:
//	May invoke various name resolvers in order to determine which
//	variables are being referenced at runtime.
//
//----------------------------------------------------------------------

func sInitResolvedLocals(tls *libc.TLS, interp uintptr, codePtr uintptr, varPtr uintptr, nsPtr uintptr) { /* tclProc.c:1182:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var iPtr uintptr
	var haveResolvers int32
	var firstLocalPtr uintptr
	var localPtr uintptr
	var varNum int32
	var resVarInfo uintptr
	var resPtr uintptr
	// var vinfo uintptr at bp, 8

	var result int32
	var resolvedVarPtr uintptr
	iPtr = interp
	haveResolvers = libc.Bool32((*Namespace)(unsafe.Pointer(nsPtr)).FcompiledVarResProc != 0 || (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr != 0)

	// Find the localPtr corresponding to varPtr

	varNum = int32((int64(varPtr) - int64((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FframePtr)).FcompiledLocals)) / 16)
	localPtr = (*Proc)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FframePtr)).FprocPtr)).FfirstLocalPtr
__1:
	if !(libc.PostDecInt32(&varNum, 1) != 0) {
		goto __2
	}
	localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
	goto __1
__2:
	;

	if !!(haveResolvers != 0 && (*ByteCode)(unsafe.Pointer(codePtr)).Fflags&uint32(TCL_BYTECODE_RESOLVE_VARS) != 0) {
		goto __3
	}
	goto doInitResolvedLocals
__3:
	;

	// This is the first run after a recompile, or else the resolver epoch
	// has changed: update the resolver cache.

	firstLocalPtr = localPtr
__4:
	if !(localPtr != uintptr(0)) {
		goto __6
	}
	if !((*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo != 0) {
		goto __7
	}
	if !((*Tcl_ResolvedVarInfo)(unsafe.Pointer((*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo)).FdeleteProc != 0) {
		goto __8
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ResolvedVarInfo)(unsafe.Pointer((*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo)).FdeleteProc})).f(tls, (*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo)
	goto __9
__8:
	XTclpFree(tls, (*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo)
__9:
	;
	(*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo = uintptr(0)
__7:
	;
	*(*int32)(unsafe.Pointer(localPtr + 16)) &= libc.CplInt32(VAR_RESOLVED)

	if !(haveResolvers != 0 && !((*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&(VAR_ARGUMENT|VAR_TEMPORARY) != 0)) {
		goto __10
	}
	resPtr = (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr

	if !((*Namespace)(unsafe.Pointer(nsPtr)).FcompiledVarResProc != 0) {
		goto __11
	}
	result = (*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Namespace)(unsafe.Pointer(nsPtr)).FcompiledVarResProc})).f(tls, (*Namespace)(unsafe.Pointer(nsPtr)).Finterp,
		localPtr+40, (*CompiledLocal)(unsafe.Pointer(localPtr)).FnameLength,
		nsPtr, bp)
	goto __12
__11:
	result = TCL_CONTINUE
__12:
	;

__13:
	if !(result == TCL_CONTINUE && resPtr != 0) {
		goto __14
	}
	if !((*ResolverScheme)(unsafe.Pointer(resPtr)).FcompiledVarResProc != 0) {
		goto __15
	}
	result = (*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*ResolverScheme)(unsafe.Pointer(resPtr)).FcompiledVarResProc})).f(tls, (*Namespace)(unsafe.Pointer(nsPtr)).Finterp,
		localPtr+40, (*CompiledLocal)(unsafe.Pointer(localPtr)).FnameLength,
		nsPtr, bp)
__15:
	;
	resPtr = (*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr
	goto __13
__14:
	;
	if !(result == TCL_OK) {
		goto __16
	}
	(*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo = *(*uintptr)(unsafe.Pointer(bp /* vinfo */))
	*(*int32)(unsafe.Pointer(localPtr + 16)) |= VAR_RESOLVED
__16:
	;
__10:
	;
	goto __5
__5:
	localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
	goto __4
	goto __6
__6:
	;
	localPtr = firstLocalPtr
	*(*uint32)(unsafe.Pointer(codePtr + 32)) &= libc.Uint32FromInt32(libc.CplInt32(TCL_BYTECODE_RESOLVE_VARS))

	// Initialize the array of local variables stored in the call frame. Some
	// variables may have special resolution rules. In that case, we call
	// their "resolver" procs to get our hands on the variable, and we make
	// the compiled local a link to the real variable.

doInitResolvedLocals:
	;
__17:
	if !(localPtr != uintptr(0)) {
		goto __19
	}
	(*Var)(unsafe.Pointer(varPtr)).Fflags = 0
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = uintptr(0)

	// Now invoke the resolvers to determine the exact variables that
	// should be used.

	resVarInfo = (*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo
	if !(resVarInfo != 0 && (*Tcl_ResolvedVarInfo)(unsafe.Pointer(resVarInfo)).FfetchProc != 0) {
		goto __20
	}
	resolvedVarPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) Tcl_Var
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ResolvedVarInfo)(unsafe.Pointer(resVarInfo)).FfetchProc})).f(tls, interp, resVarInfo)

	if !(resolvedVarPtr != 0) {
		goto __21
	}
	if !((*Var)(unsafe.Pointer(resolvedVarPtr)).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __22
	}
	(*VarInHash)(unsafe.Pointer(resolvedVarPtr)).FrefCount++
__22:
	;
	(*Var)(unsafe.Pointer(varPtr)).Fflags = VAR_LINK
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = resolvedVarPtr
__21:
	;
__20:
	;
	goto __18
__18:
	varPtr += 16
	localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
	goto __17
	goto __19
__19:
}

func XTclFreeLocalCache(tls *libc.TLS, interp uintptr, localCachePtr uintptr) { /* tclProc.c:1290:1: */
	var i int32
	var namePtrPtr uintptr = localCachePtr + 8

	i = 0
__1:
	if !(i < (*LocalCache)(unsafe.Pointer(localCachePtr)).FnumVars) {
		goto __3
	}
	{
		var objPtr uintptr = *(*uintptr)(unsafe.Pointer(namePtrPtr))

		if objPtr != 0 {
			// TclReleaseLiteral calls Tcl_DecrRefCount for us
			XTclReleaseLiteral(tls, interp, objPtr)
		}

	}
	goto __2
__2:
	i++
	namePtrPtr += 8
	goto __1
	goto __3
__3:
	;
	XTclpFree(tls, localCachePtr)
}

func sInitLocalCache(tls *libc.TLS, procPtr uintptr) { /* tclProc.c:1309:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = (*Proc)(unsafe.Pointer(procPtr)).FiPtr
	var codePtr uintptr = *(*uintptr)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FbodyPtr + 32))
	var localCt int32 = (*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals
	var numArgs int32 = (*Proc)(unsafe.Pointer(procPtr)).FnumArgs
	var i int32 = 0
	var namePtr uintptr
	var varPtr uintptr
	var localCachePtr uintptr
	var localPtr uintptr
	// var new int32 at bp, 4

	// Cache the names and initial values of local variables; store the
	// cache in both the framePtr for this execution and in the codePtr
	// for future calls.

	localCachePtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+8))+uint64(localCt)*uint64(unsafe.Sizeof(uintptr(0)))+uint64(numArgs)*uint64(unsafe.Sizeof(Var{}))))

	namePtr = localCachePtr + 8
	varPtr = namePtr + uintptr(localCt)*8
	localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr
	for localPtr != 0 {
		if (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags&VAR_TEMPORARY != 0 {
			*(*uintptr)(unsafe.Pointer(namePtr)) = uintptr(0)
		} else {
			*(*uintptr)(unsafe.Pointer(namePtr)) = XTclCreateLiteral(tls, iPtr, localPtr+40,
				(*CompiledLocal)(unsafe.Pointer(localPtr)).FnameLength /* hash */, libc.Uint32(libc.Uint32FromInt32(-1)),
				bp, uintptr(0), 0, uintptr(0))
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(namePtr)))).FrefCount++
		}

		if i < numArgs {
			(*Var)(unsafe.Pointer(varPtr)).Fflags = (*CompiledLocal)(unsafe.Pointer(localPtr)).Fflags & VAR_IS_ARGS
			*(*uintptr)(unsafe.Pointer(varPtr + 8)) = (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr
			varPtr += 16
			i++
		}
		namePtr += 8
		localPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr
	}
	(*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr = localCachePtr
	(*LocalCache)(unsafe.Pointer(localCachePtr)).FrefCount = 1
	(*LocalCache)(unsafe.Pointer(localCachePtr)).FnumVars = localCt
}

//----------------------------------------------------------------------
//
// InitArgsAndLocals --
//
//	This routine is invoked in order to initialize the arguments and other
//	compiled locals table for a new call frame.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Allocates memory on the stack for the compiled local variables, the
//	caller is responsible for freeing them. Initialises all variables. May
//	invoke various name resolvers in order to determine which variables
//	are being referenced at runtime.
//
//----------------------------------------------------------------------

func sInitArgsAndLocals(tls *libc.TLS, interp uintptr, procNameObj uintptr, skip int32) int32 { /* tclProc.c:1381:1: */
	var framePtr uintptr
	var procPtr uintptr
	var codePtr uintptr
	var varPtr uintptr
	var defPtr uintptr
	var localCt int32
	var numArgs int32
	var argCt int32
	var i int32
	var imax int32
	var argObjs uintptr
	// "Normal" arguments; last formal is special, depends on it being
	// 'args'.

	var objPtr uintptr
	// This loop is entered if argCt < (numArgs-1). Set default values;
	// last formal is special.

	var objPtr1 uintptr
	var listPtr uintptr
	var objPtr2 uintptr
	var objPtr3 uintptr
	var _objPtr uintptr
	var _callbackPtr uintptr
	framePtr = (*Interp)(unsafe.Pointer(interp)).FvarFramePtr
	procPtr = (*CallFrame)(unsafe.Pointer(framePtr)).FprocPtr
	codePtr = *(*uintptr)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FbodyPtr + 32))
	localCt = (*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals

	// Make sure that the local cache of variable names and initial values has
	// been initialised properly .

	if !(localCt != 0) {
		goto __1
	}
	if !!(int32((*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr) != 0) {
		goto __3
	}
	sInitLocalCache(tls, procPtr)
__3:
	;
	(*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr = (*ByteCode)(unsafe.Pointer(codePtr)).FlocalCachePtr
	(*LocalCache)(unsafe.Pointer((*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr)).FrefCount++
	defPtr = (*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr + 8 + uintptr(localCt)*8
	goto __2
__1:
	defPtr = uintptr(0)
__2:
	;

	// Create the "compiledLocals" array. Make sure it is large enough to hold
	// all the procedure's compiled local variables, including its formal
	// parameters.

	varPtr = XTclStackAlloc(tls, interp, int32(uint64(localCt)*uint64(unsafe.Sizeof(Var{}))))
	(*CallFrame)(unsafe.Pointer(framePtr)).FcompiledLocals = varPtr
	(*CallFrame)(unsafe.Pointer(framePtr)).FnumCompiledLocals = localCt

	// Match and assign the call's actual parameters to the procedure's formal
	// arguments. The formal arguments are described by the first numArgs
	// entries in both the Proc structure's local variable list and the call
	// frame's local variable array.

	numArgs = (*Proc)(unsafe.Pointer(procPtr)).FnumArgs
	argCt = (*CallFrame)(unsafe.Pointer(framePtr)).Fobjc - skip // Set it to the number of args to the
	// procedure.
	argObjs = (*CallFrame)(unsafe.Pointer(framePtr)).Fobjv + uintptr(skip)*8
	if !(numArgs == 0) {
		goto __4
	}
	if !(argCt != 0) {
		goto __5
	}
	goto incorrectArgs
	goto __6
__5:
	goto correctArgs
__6:
	;
__4:
	;
	imax = func() int32 {
		if argCt < numArgs-1 {
			return argCt
		}
		return numArgs - 1
	}()
	i = 0
__7:
	if !(i < imax) {
		goto __9
	}
	// "Normal" arguments; last formal is special, depends on it being
	// 'args'.

	objPtr = *(*uintptr)(unsafe.Pointer(argObjs + uintptr(i)*8))

	(*Var)(unsafe.Pointer(varPtr)).Fflags = 0
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++ // Local var is a reference.
	goto __8
__8:
	i++
	varPtr += 16
	if defPtr != 0 {
		defPtr += 16
	} else {
		_ = defPtr
	}
	goto __7
	goto __9
__9:
	;
__10:
	if !(i < numArgs-1) {
		goto __12
	}
	// This loop is entered if argCt < (numArgs-1). Set default values;
	// last formal is special.

	if defPtr != 0 {
		objPtr1 = *(*uintptr)(unsafe.Pointer(defPtr + 8))
	} else {
		objPtr1 = uintptr(0)
	}

	if !!(objPtr1 != 0) {
		goto __13
	}
	goto incorrectArgs
__13:
	;
	(*Var)(unsafe.Pointer(varPtr)).Fflags = 0
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = objPtr1
	(*Tcl_Obj)(unsafe.Pointer(objPtr1)).FrefCount++ // Local var reference.
	goto __11
__11:
	i++
	varPtr += 16
	if defPtr != 0 {
		defPtr += 16
	} else {
		_ = defPtr
	}
	goto __10
	goto __12
__12:
	;

	// When we get here, the last formal argument remains to be defined:
	// defPtr and varPtr point to the last argument to be initialized.

	(*Var)(unsafe.Pointer(varPtr)).Fflags = 0
	if !(defPtr != 0 && (*Var)(unsafe.Pointer(defPtr)).Fflags&VAR_IS_ARGS != 0) {
		goto __14
	}
	listPtr = XTcl_NewListObj(tls, argCt-i, argObjs+uintptr(i)*8)

	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = listPtr
	(*Tcl_Obj)(unsafe.Pointer(listPtr)).FrefCount++ // Local var is a reference.
	goto __15
__14:
	if !(argCt == numArgs) {
		goto __16
	}
	objPtr2 = *(*uintptr)(unsafe.Pointer(argObjs + uintptr(i)*8))

	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = objPtr2
	(*Tcl_Obj)(unsafe.Pointer(objPtr2)).FrefCount++ // Local var is a reference.
	goto __17
__16:
	if !(argCt < numArgs && defPtr != 0 && *(*uintptr)(unsafe.Pointer(defPtr + 8)) != 0) {
		goto __18
	}
	objPtr3 = *(*uintptr)(unsafe.Pointer(defPtr + 8))

	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = objPtr3
	(*Tcl_Obj)(unsafe.Pointer(objPtr3)).FrefCount++ // Local var is a reference.
	goto __19
__18:
	goto incorrectArgs
__19:
	;
__17:
	;
__15:
	;
	varPtr += 16

	// Initialise and resolve the remaining compiledLocals. In the absence of
	// resolvers, they are undefined local vars: (flags=0, value=NULL).

correctArgs:
	if !(numArgs < localCt) {
		goto __20
	}
	if !(!(int32((*Namespace)(unsafe.Pointer((*CallFrame)(unsafe.Pointer(framePtr)).FnsPtr)).FcompiledVarResProc) != 0) &&
		!(int32((*Interp)(unsafe.Pointer(interp)).FresolverPtr) != 0)) {
		goto __21
	}
	libc.Xmemset(tls, varPtr, 0, uint64(localCt-numArgs)*uint64(unsafe.Sizeof(Var{})))
	goto __22
__21:
	sInitResolvedLocals(tls, interp, codePtr, varPtr, (*CallFrame)(unsafe.Pointer(framePtr)).FnsPtr)
__22:
	;
__20:
	;

	return TCL_OK

	// Initialise all compiled locals to avoid problems at DeleteLocalVars.

incorrectArgs:
	if !(skip != 1 && XTclInitRewriteEnsemble(tls, interp, skip-1, 0, (*CallFrame)(unsafe.Pointer(framePtr)).Fobjv) != 0) {
		goto __23
	}
__24:
__27:
	;
__30:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __33
	}
	XTclAllocateFreeObjects(tls)
__33:
	;
	_objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __31
__31:
	if 0 != 0 {
		goto __30
	}
	goto __32
__32:
	;
	_callbackPtr = _objPtr
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	}{XTclClearRootEnsemble}))
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
	*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
	(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
	(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
__23:
	;
	libc.Xmemset(tls, varPtr, 0,
		uint64((int64((*CallFrame)(unsafe.Pointer(framePtr)).FcompiledLocals+uintptr(localCt)*16)-int64(varPtr))/16)*uint64(unsafe.Sizeof(Var{})))
	return sProcWrongNumArgs(tls, interp, skip)
}

//----------------------------------------------------------------------
//
// TclPushProcCallFrame --
//
//	Compiles a proc body if necessary, then pushes a CallFrame suitable
//	for executing it.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	The proc's body may be recompiled. A CallFrame is pushed, it will have
//	to be popped by the caller.
//
//----------------------------------------------------------------------

func XTclPushProcCallFrame(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr, isLambda int32) int32 { /* tclProc.c:1544:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var procPtr uintptr
	var nsPtr uintptr
	// var framePtr uintptr at bp, 8

	var framePtrPtr uintptr
	var result int32
	var codePtr uintptr
	var iPtr uintptr
	procPtr = clientData
	nsPtr = (*Command1)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FcmdPtr)).FnsPtr

	// If necessary (i.e. if we haven't got a suitable compilation already
	// cached) compile the procedure's body. The compiler will allocate frame
	// slots for the procedure's non-argument local variables. Note that
	// compiling the body might increase procPtr->numCompiledLocals if new
	// local variables are found while compiling.

	if !((*Tcl_Obj)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FbodyPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteCodeType))) {
		goto __1
	}
	iPtr = interp

	// When we've got bytecode, this is the check for validity. That is,
	// the bytecode must be for the right interpreter (no cross-leaks!),
	// the code must be from the current epoch (so subcommand compilation
	// is up-to-date), the namespace must match (so variable handling
	// is right) and the resolverEpoch must match (so that new shadowed
	// commands and/or resolver changes are considered).

	codePtr = *(*uintptr)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FbodyPtr + 32))
	if !(*(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle)) != iPtr ||
		(*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch != (*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch ||
		(*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr != nsPtr ||
		(*ByteCode)(unsafe.Pointer(codePtr)).FnsEpoch != (*Namespace)(unsafe.Pointer(nsPtr)).FresolverEpoch) {
		goto __3
	}
	goto doCompilation
__3:
	;
	goto __2
__1:
doCompilation:
	result = XTclProcCompileProc(tls, interp, procPtr, (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr, nsPtr,
		func() uintptr {
			if isLambda != 0 {
				return ts + 61367 /* "body of lambda t..." */
			}
			return ts + 61387 /* "body of proc" */
		}(),
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(isLambda)*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(isLambda)*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(isLambda)*8)))
		}())
	if !(result != TCL_OK) {
		goto __4
	}
	return result
__4:
	;
__2:
	;

	// Set up and push a new call frame for the new procedure invocation.
	// This call frame will execute in the proc's namespace, which might be
	// different than the current namespace. The proc's namespace is that of
	// its command, which can change if the command is renamed from one
	// namespace to another.

	framePtrPtr = bp /* &framePtr */
	XTclPushStackFrame(tls, interp, framePtrPtr,
		nsPtr,
		func() int32 {
			if isLambda != 0 {
				return FRAME_IS_PROC | FRAME_IS_LAMBDA
			}
			return FRAME_IS_PROC
		}())

	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* framePtr */)))).Fobjc = objc
	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* framePtr */)))).Fobjv = objv
	(*CallFrame)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* framePtr */)))).FprocPtr = procPtr

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclObjInterpProc --
//
//	When a Tcl procedure gets invoked during bytecode evaluation, this
//	object-based routine gets invoked to interpret the procedure.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	Depends on the commands in the procedure.
//
//----------------------------------------------------------------------

func XTclObjInterpProc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclProc.c:1636:1: */
	// Not used much in the core; external interface for iTcl

	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRInterpProc})), clientData, objc, objv)
}

func XTclNRInterpProc(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclProc.c:1653:1: */
	var result int32 = XTclPushProcCallFrame(tls, clientData, interp, objc, objv,
		/*isLambda*/ 0)

	if result != TCL_OK {
		return TCL_ERROR
	}
	return XTclNRInterpProcCore(tls, interp, *(*uintptr)(unsafe.Pointer(objv)), 1, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr)
	}{sMakeProcError})))
}

//----------------------------------------------------------------------
//
// TclNRInterpProcCore --
//
//	When a Tcl procedure, lambda term or anything else that works like a
//	procedure gets invoked during bytecode evaluation, this object-based
//	routine gets invoked to interpret the body.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	Nearly anything; depends on the commands in the procedure body.
//
//----------------------------------------------------------------------

func XTclNRInterpProcCore(tls *libc.TLS, interp uintptr, procNameObj uintptr, skip int32, errorProc uintptr) int32 { /* tclProc.c:1690:1: */
	var iPtr uintptr = interp
	var procPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FprocPtr
	var result int32
	var freePtr uintptr
	var codePtr uintptr

	result = sInitArgsAndLocals(tls, interp, procNameObj, skip)
	if result != TCL_OK {
		freePtr = (*Interp)(unsafe.Pointer(iPtr)).FframePtr
		XTcl_PopCallFrame(tls, interp) // Pop but do not free.
		XTclStackFree(tls, interp, (*CallFrame)(unsafe.Pointer(freePtr)).FcompiledLocals)
		// Free compiledLocals.
		XTclStackFree(tls, interp, freePtr) // Free CallFrame.
		return TCL_ERROR
	}

	// Invoke the commands in the procedure's body.

	(*Proc)(unsafe.Pointer(procPtr)).FrefCount++
	codePtr = *(*uintptr)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FbodyPtr + 32))

	for ok := true; ok; ok = 0 != 0 {
		var _callbackPtr uintptr
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr
			{
			}
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				_objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			_callbackPtr = _objPtr
		}
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		}{sInterpProcNR2}))
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = procNameObj
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = errorProc
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
		*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
		(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
		(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
	}
	return XTclNRExecuteByteCode(tls, interp, codePtr)
}

func sInterpProcNR2(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclProc.c:1787:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var iPtr uintptr
	var procPtr uintptr
	var freePtr uintptr
	var procNameObj uintptr
	var errorProc uintptr
	var l int32
	var l1 int32
	var r uintptr
	iPtr = interp
	procPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FprocPtr
	procNameObj = *(*ClientData)(unsafe.Pointer(data))
	errorProc = *(*ClientData)(unsafe.Pointer(data + 1*8))

	if !(0 != 0) {
		goto __1
	}
	if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame&FRAME_IS_LAMBDA != 0 {
		l = 1
	} else {
		l = 0
	}

	if !(func() uintptr {
		if l < (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Fobjc {
			return func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Fobjv + uintptr(l)*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Fobjv + uintptr(l)*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Fobjv + uintptr(l)*8)))
			}()
		}
		return uintptr(0)
	}() != 0) {
		goto __2
	}
__2:
	;

__1:
	;
	if !(libc.PostDecInt32(&(*Proc)(unsafe.Pointer(procPtr)).FrefCount, 1) <= 1) {
		goto __3
	}
	XTclProcCleanupProc(tls, procPtr)
__3:
	;

	// Free the stack-allocated compiled locals and CallFrame. It is important
	// to pop the call frame without freeing it first: the compiledLocals
	// cannot be freed before the frame is popped, as the local variables must
	// be deleted. But the compiledLocals must be freed first, as they were
	// allocated later on the stack.

	if !(result != TCL_OK) {
		goto __4
	}
	goto process
__4:
	;

done:
	if !(0 != 0) {
		goto __5
	}
	if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame&FRAME_IS_LAMBDA != 0 {
		l1 = 1
	} else {
		l1 = 0
	}
	r = XTcl_GetObjResult(tls, interp)

	if !(func() uintptr {
		if l1 < (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Fobjc {
			return func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Fobjv + uintptr(l1)*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Fobjv + uintptr(l1)*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Fobjv + uintptr(l1)*8)))
			}()
		}
		return uintptr(0)
	}() != 0) {
		goto __6
	}
__6:
	;
	if !(r != 0) {
		goto __7
	}
__7:
	;

__5:
	;

	freePtr = (*Interp)(unsafe.Pointer(iPtr)).FframePtr
	XTcl_PopCallFrame(tls, interp) // Pop but do not free.
	XTclStackFree(tls, interp, (*CallFrame)(unsafe.Pointer(freePtr)).FcompiledLocals)
	// Free compiledLocals.
	XTclStackFree(tls, interp, freePtr) // Free CallFrame.
	return result

	// Process any non-TCL_OK result code.

process:
	switch result {
	case TCL_RETURN:
		goto __9

	case TCL_CONTINUE:
		goto __10
	case TCL_BREAK:
		goto __11

		// FALLTHRU

	case TCL_ERROR:
		goto __12
	}
	goto __8
__9:
	// If it is a 'return', do the TIP#90 processing now.

	result = XTclUpdateReturnInfo(tls, interp)
	goto __8

__10:
__11:
	// It's an error to get to this point from a 'break' or 'continue', so
	// transform to an error now.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+61400,
		libc.VaList(bp, func() uintptr {
			if result == TCL_BREAK {
				return ts + 5685 /* "break" */
			}
			return ts + 5702 /* "continue" */
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+39663, ts+61431, uintptr(0)))
	result = TCL_ERROR

	// FALLTHRU

__12:
	// Now it _must_ be an error, so we need to log it as such. This means
	// filling out the error trace. Luckily, we just hand this off to the
	// function handed to us as an argument.

	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{errorProc})).f(tls, interp, procNameObj)
__8:
	;
	goto done
	return int32(0)
}

//----------------------------------------------------------------------
//
// TclProcCompileProc --
//
//	Called just before a procedure is executed to compile the body to byte
//	codes. If the type of the body is not "byte code" or if the compile
//	conditions have changed (namespace context, epoch counters, etc.) then
//	the body is recompiled. Otherwise, this function does nothing.
//
// Results:
//	None.
//
// Side effects:
//	May change the internal representation of the body object to compiled
//	code.
//
//----------------------------------------------------------------------

func XTclProcCompileProc(tls *libc.TLS, interp uintptr, procPtr uintptr, bodyPtr uintptr, nsPtr uintptr, description uintptr, procName uintptr) int32 { /* tclProc.c:1899:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var iPtr uintptr = interp
	// var framePtr uintptr at bp+40, 8

	var codePtr uintptr = *(*uintptr)(unsafe.Pointer(bodyPtr + 32))

	// If necessary, compile the procedure's body. The compiler will allocate
	// frame slots for the procedure's non-argument local variables. If the
	// ByteCode already exists, make sure it hasn't been invalidated by
	// someone redefining a core command (this might make the compiled code
	// wrong). Also, if the code was compiled in/for a different interpreter,
	// we recompile it. Note that compiling the body might increase
	// procPtr->numCompiledLocals if new local variables are found while
	// compiling.
	//
	// Precompiled procedure bodies, however, are immutable and therefore they
	// are not recompiled, even if things have changed.

	if (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteCodeType)) {
		if *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle)) == iPtr &&
			(*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch == (*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch &&
			(*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr == nsPtr &&
			(*ByteCode)(unsafe.Pointer(codePtr)).FnsEpoch == (*Namespace)(unsafe.Pointer(nsPtr)).FresolverEpoch {
			return TCL_OK
		}

		if (*ByteCode)(unsafe.Pointer(codePtr)).Fflags&uint32(TCL_BYTECODE_PRECOMPILED) != 0 {
			if *(*uintptr)(unsafe.Pointer((*ByteCode)(unsafe.Pointer(codePtr)).FinterpHandle)) != iPtr {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+61442, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+26034,
					ts+61478, uintptr(0)))
				return TCL_ERROR
			}
			(*ByteCode)(unsafe.Pointer(codePtr)).FcompileEpoch = (*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch
			(*ByteCode)(unsafe.Pointer(codePtr)).FnsPtr = nsPtr
		} else {
			if (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FtypePtr != uintptr(0) {
				if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, bodyPtr)
				}
				(*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FtypePtr = uintptr(0)
			}

		}
	}

	if (*Tcl_Obj)(unsafe.Pointer(bodyPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclByteCodeType)) {
		var hePtr uintptr

		// Plug the current procPtr into the interpreter and coerce the code
		// body to byte codes. The interpreter needs to know which proc it's
		// compiling so that it can access its list of compiled locals.
		//
		// TRICKY NOTE: Be careful to push a call frame with the proper
		//   namespace context, so that the byte codes are compiled in the
		//   appropriate class context.

		(*Interp)(unsafe.Pointer(iPtr)).FcompiledProcPtr = procPtr

		if (*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals > (*Proc)(unsafe.Pointer(procPtr)).FnumArgs {
			var clPtr uintptr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr
			var lastPtr uintptr = uintptr(0)
			var i int32
			var numArgs int32 = (*Proc)(unsafe.Pointer(procPtr)).FnumArgs

			for i = 0; i < numArgs; i++ {
				lastPtr = clPtr
				clPtr = (*CompiledLocal)(unsafe.Pointer(clPtr)).FnextPtr
			}

			if lastPtr != 0 {
				(*CompiledLocal)(unsafe.Pointer(lastPtr)).FnextPtr = uintptr(0)
			} else {
				(*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr = uintptr(0)
			}
			(*Proc)(unsafe.Pointer(procPtr)).FlastLocalPtr = lastPtr
			for clPtr != 0 {
				var toFree uintptr = clPtr

				clPtr = (*CompiledLocal)(unsafe.Pointer(clPtr)).FnextPtr
				if (*CompiledLocal)(unsafe.Pointer(toFree)).FresolveInfo != 0 {
					if (*Tcl_ResolvedVarInfo)(unsafe.Pointer((*CompiledLocal)(unsafe.Pointer(toFree)).FresolveInfo)).FdeleteProc != 0 {
						(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ResolvedVarInfo)(unsafe.Pointer((*CompiledLocal)(unsafe.Pointer(toFree)).FresolveInfo)).FdeleteProc})).f(tls, (*CompiledLocal)(unsafe.Pointer(toFree)).FresolveInfo)
					} else {
						XTclpFree(tls, (*CompiledLocal)(unsafe.Pointer(toFree)).FresolveInfo)
					}
				}
				XTclpFree(tls, toFree)
			}
			(*Proc)(unsafe.Pointer(procPtr)).FnumCompiledLocals = (*Proc)(unsafe.Pointer(procPtr)).FnumArgs
		}

		XTclPushStackFrame(tls, interp, bp+40, nsPtr,
			/* isProcCallFrame */ 0)

		// TIP #280: We get the invoking context from the cmdFrame which
		// was saved by 'Tcl_ProcObjCmd' (using linePBodyPtr).

		hePtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr, procPtr)

		// Constructed saved frame has body as word 0. See Tcl_ProcObjCmd.

		(*Interp)(unsafe.Pointer(iPtr)).FinvokeWord = 0
		(*Interp)(unsafe.Pointer(iPtr)).FinvokeCmdFramePtr = func() uintptr {
			if hePtr != 0 {
				return (*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData
			}
			return uintptr(0)
		}()
		XTclSetByteCodeFromAny(tls, interp, bodyPtr, uintptr(0), uintptr(0))
		(*Interp)(unsafe.Pointer(iPtr)).FinvokeCmdFramePtr = uintptr(0)
		XTclPopStackFrame(tls, interp)
	} else if (*ByteCode)(unsafe.Pointer(codePtr)).FnsEpoch != (*Namespace)(unsafe.Pointer(nsPtr)).FresolverEpoch {
		// The resolver epoch has changed, but we only need to invalidate the
		// resolver cache.

		(*ByteCode)(unsafe.Pointer(codePtr)).FnsEpoch = (*Namespace)(unsafe.Pointer(nsPtr)).FresolverEpoch
		*(*uint32)(unsafe.Pointer(codePtr + 32)) |= uint32(TCL_BYTECODE_RESOLVE_VARS)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// MakeProcError --
//
//	Function called by TclObjInterpProc to create the stack information
//	upon an error from a procedure.
//
// Results:
//	The interpreter's error info trace is set to a value that supplements
//	the error code.
//
// Side effects:
//	none.
//
//----------------------------------------------------------------------

func sMakeProcError(tls *libc.TLS, interp uintptr, procNameObj uintptr) { /* tclProc.c:2065:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var overflow int32
	var limit int32 = 60
	// var nameLen int32 at bp+32, 4

	var procName uintptr = XTcl_GetStringFromObj(tls, procNameObj, bp+32)

	overflow = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 32)) > limit)
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+61498,
		libc.VaList(bp, func() int32 {
			if overflow != 0 {
				return limit
			}
			return *(*int32)(unsafe.Pointer(bp + 32))
		}(), procName,
			func() uintptr {
				if overflow != 0 {
					return ts + 8420 /* "..." */
				}
				return ts + 2631 /* "" */
			}(), XTcl_GetErrorLine(tls, interp))))
}

//----------------------------------------------------------------------
//
// TclProcDeleteProc --
//
//	This function is invoked just before a command procedure is removed
//	from an interpreter. Its job is to release all the resources allocated
//	to the procedure.
//
// Results:
//	None.
//
// Side effects:
//	Memory gets freed, unless the procedure is actively being executed.
//	In this case the cleanup is delayed until the last call to the current
//	procedure completes.
//
//----------------------------------------------------------------------

func XTclProcDeleteProc(tls *libc.TLS, clientData ClientData) { /* tclProc.c:2102:1: */
	var procPtr uintptr = clientData

	if libc.PostDecInt32(&(*Proc)(unsafe.Pointer(procPtr)).FrefCount, 1) <= 1 {
		XTclProcCleanupProc(tls, procPtr)
	}
}

//----------------------------------------------------------------------
//
// TclProcCleanupProc --
//
//	This function does all the real work of freeing up a Proc structure.
//	It's called only when the structure's reference count becomes zero.
//
// Results:
//	None.
//
// Side effects:
//	Memory gets freed.
//
//----------------------------------------------------------------------

func XTclProcCleanupProc(tls *libc.TLS, procPtr uintptr) { /* tclProc.c:2130:1: */
	var localPtr uintptr
	var bodyPtr uintptr = (*Proc)(unsafe.Pointer(procPtr)).FbodyPtr
	var defPtr uintptr
	var resVarInfo uintptr
	var hePtr uintptr = uintptr(0)
	var cfPtr uintptr = uintptr(0)
	var iPtr uintptr = (*Proc)(unsafe.Pointer(procPtr)).FiPtr

	if bodyPtr != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = bodyPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	for localPtr = (*Proc)(unsafe.Pointer(procPtr)).FfirstLocalPtr; localPtr != uintptr(0); {
		var nextPtr uintptr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FnextPtr

		resVarInfo = (*CompiledLocal)(unsafe.Pointer(localPtr)).FresolveInfo
		if resVarInfo != 0 {
			if (*Tcl_ResolvedVarInfo)(unsafe.Pointer(resVarInfo)).FdeleteProc != 0 {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ResolvedVarInfo)(unsafe.Pointer(resVarInfo)).FdeleteProc})).f(tls, resVarInfo)
			} else {
				XTclpFree(tls, resVarInfo)
			}
		}

		if (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr != uintptr(0) {
			defPtr = (*CompiledLocal)(unsafe.Pointer(localPtr)).FdefValuePtr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = defPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		XTclpFree(tls, localPtr)
		localPtr = nextPtr
	}
	XTclpFree(tls, procPtr)

	// TIP #280: Release the location data associated with this Proc
	// structure, if any. The interpreter may not exist (For example for
	// procbody structures created by tbcload.

	if iPtr == uintptr(0) {
		return
	}

	hePtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)).FfindProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr, procPtr)
	if !(hePtr != 0) {
		return
	}

	cfPtr = (*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData

	if cfPtr != 0 {
		if (*CmdFrame)(unsafe.Pointer(cfPtr)).Ftype == 4 {
			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(cfPtr + 40))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			*(*uintptr)(unsafe.Pointer(cfPtr + 40)) = uintptr(0)
		}
		XTclpFree(tls, (*CmdFrame)(unsafe.Pointer(cfPtr)).Fline)
		(*CmdFrame)(unsafe.Pointer(cfPtr)).Fline = uintptr(0)
		XTclpFree(tls, cfPtr)
	}
	XTcl_DeleteHashEntry(tls, hePtr)
}

//----------------------------------------------------------------------
//
// TclUpdateReturnInfo --
//
//	This function is called when procedures return, and at other points
//	where the TCL_RETURN code is used. It examines the returnLevel and
//	returnCode to determine the real return status.
//
// Results:
//	The return value is the true completion code to use for the procedure
//	or script, instead of TCL_RETURN.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclUpdateReturnInfo(tls *libc.TLS, iPtr uintptr) int32 { /* tclProc.c:2214:1: */
	var code int32 = TCL_RETURN

	(*Interp)(unsafe.Pointer(iPtr)).FreturnLevel--
	if (*Interp)(unsafe.Pointer(iPtr)).FreturnLevel < 0 {
		XTcl_Panic(tls, ts+61532, 0)
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FreturnLevel == 0 {
		// Now we've reached the level to return the requested -code.
		// Since iPtr->returnLevel and iPtr->returnCode have completed
		// their task, we now reset them to default values so that any
		// bare "return TCL_RETURN" that may follow will work [Bug 2152286].

		code = (*Interp)(unsafe.Pointer(iPtr)).FreturnCode
		(*Interp)(unsafe.Pointer(iPtr)).FreturnLevel = 1
		(*Interp)(unsafe.Pointer(iPtr)).FreturnCode = TCL_OK
		if code == TCL_ERROR {
			*(*int32)(unsafe.Pointer(iPtr + 424)) |= ERR_LEGACY_COPY
		}
	}
	return code
}

//----------------------------------------------------------------------
//
// TclGetObjInterpProc --
//
//	Returns a pointer to the TclObjInterpProc function; this is different
//	from the value obtained from the TclObjInterpProc reference on systems
//	like Windows where import and export versions of a function exported
//	by a DLL exist.
//
// Results:
//	Returns the internal address of the TclObjInterpProc function.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetObjInterpProc(tls *libc.TLS) TclObjCmdProcType { /* tclProc.c:2262:1: */
	return *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclObjInterpProc}))
}

//----------------------------------------------------------------------
//
// TclNewProcBodyObj --
//
//	Creates a new object, of type "procbody", whose internal
//	representation is the given Proc struct. The newly created object's
//	reference count is 0.
//
// Results:
//	Returns a pointer to a newly allocated Tcl_Obj, NULL on error.
//
// Side effects:
//	The reference count in the ByteCode attached to the Proc is bumped up
//	by one, since the internal rep stores a pointer to it.
//
//----------------------------------------------------------------------

func XTclNewProcBodyObj(tls *libc.TLS, procPtr uintptr) uintptr { /* tclProc.c:2286:9: */
	var objPtr uintptr

	if !(procPtr != 0) {
		return uintptr(0)
	}

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	if objPtr != 0 {
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclProcBodyType))
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = procPtr

		(*Proc)(unsafe.Pointer(procPtr)).FrefCount++
	}

	return objPtr
}

//----------------------------------------------------------------------
//
// ProcBodyDup --
//
//	Tcl_ObjType's Dup function for the proc body object. Bumps the
//	reference count on the Proc stored in the internal representation.
//
// Results:
//	None.
//
// Side effects:
//	Sets up the object in dupPtr to be a duplicate of the one in srcPtr.
//
//----------------------------------------------------------------------

func sProcBodyDup(tls *libc.TLS, srcPtr uintptr, dupPtr uintptr) { /* tclProc.c:2326:1: */
	var procPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))

	(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclProcBodyType))
	*(*uintptr)(unsafe.Pointer(dupPtr + 32)) = procPtr
	(*Proc)(unsafe.Pointer(procPtr)).FrefCount++
}

//----------------------------------------------------------------------
//
// ProcBodyFree --
//
//	Tcl_ObjType's Free function for the proc body object. The reference
//	count on its Proc struct is decreased by 1; if the count reaches 0,
//	the proc is freed.
//
// Results:
//	None.
//
// Side effects:
//	If the reference count on the Proc struct reaches 0, the struct is
//	freed.
//
//----------------------------------------------------------------------

func sProcBodyFree(tls *libc.TLS, objPtr uintptr) { /* tclProc.c:2357:1: */
	var procPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if libc.PostDecInt32(&(*Proc)(unsafe.Pointer(procPtr)).FrefCount, 1) <= 1 {
		XTclProcCleanupProc(tls, procPtr)
	}
}

//----------------------------------------------------------------------
//
// DupLambdaInternalRep, FreeLambdaInternalRep, SetLambdaFromAny --
//
//	How to manage the internal representations of lambda term objects.
//	Syntactically they look like a two- or three-element list, where the
//	first element is the formal arguments, the second is the the body, and
//	the (optional) third is the namespace to execute the lambda term
//	within (the global namespace is assumed if it is absent).
//
//----------------------------------------------------------------------

func sDupLambdaInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclProc.c:2382:1: */
	var procPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))
	var nsObjPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32 + 8 /* &.ptr2 */))

	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = procPtr
	*(*uintptr)(unsafe.Pointer(copyPtr + 32 + 8 /* &.ptr2 */)) = nsObjPtr

	(*Proc)(unsafe.Pointer(procPtr)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).FrefCount++
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclLambdaType))
}

func sFreeLambdaInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclProc.c:2398:1: */
	var procPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	var nsObjPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */))

	if libc.PostDecInt32(&(*Proc)(unsafe.Pointer(procPtr)).FrefCount, 1) == 1 {
		XTclProcCleanupProc(tls, procPtr)
	}
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(nsObjPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = nsObjPtr
			}
		} else {
			XTclFreeObj(tls, nsObjPtr)
		}
	}

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

func sSetLambdaFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclProc.c:2413:1: */
	bp := tls.Alloc(84)
	defer tls.Free(84)

	var iPtr uintptr = interp
	var name uintptr
	var argsPtr uintptr
	var bodyPtr uintptr
	var nsObjPtr uintptr
	// var objv uintptr at bp+48, 8

	// var isNew int32 at bp+80, 4

	// var objc int32 at bp+56, 4

	var result int32
	var cfPtr uintptr = uintptr(0)
	// var procPtr uintptr at bp+64, 8

	if interp == uintptr(0) {
		return TCL_ERROR
	}

	// Convert objPtr to list type first; if it cannot be converted, or if its
	// length is not 2, then it cannot be converted to tclLambdaType.

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 48)) = *(*uintptr)(unsafe.Pointer(objPtr + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 56)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, uintptr(0), objPtr, bp+56, bp+48)
	}()
	if result != TCL_OK || *(*int32)(unsafe.Pointer(bp + 56)) != 2 && *(*int32)(unsafe.Pointer(bp + 56)) != 3 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+61575,
			libc.VaList(bp, XTcl_GetString(tls, objPtr))))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+61619, uintptr(0)))
		return TCL_ERROR
	}

	argsPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* objv */))))
	bodyPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* objv */)) + 1*8))

	// Create and initialize the Proc struct. The cmdPtr field is set to NULL
	// to signal that this is an anonymous function.

	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()

	if XTclCreateProc(tls, interp, uintptr(0), name, argsPtr, bodyPtr,
		bp+64) != TCL_OK {
		XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
			ts+61626, libc.VaList(bp+40, name)))
		return TCL_ERROR
	}

	// CAREFUL: TclCreateProc returns refCount==1! [Bug 1578454]
	// procPtr->refCount = 1;

	(*Proc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64 /* procPtr */)))).FcmdPtr = uintptr(0)

	// TIP #280: Remember the line the apply body is starting on. In a Byte
	// code context we ask the engine to provide us with the necessary
	// information. This is for the initialization of the byte code compiler
	// when the body is used for the first time.
	//
	// NOTE: The body is the second word in the 'objPtr'. Its location,
	// accessible through 'context.line[1]' (see below) is therefore only the
	// first approximation of the actual line the body is on. We have to use
	// the string rep of the 'objPtr' to determine the exact line. This is
	// available already through 'name'. Use 'TclListLines', see 'switch'
	// (tclCmdMZ.c).
	//
	// This code is nearly identical to the #280 code in Tcl_ProcObjCmd, see
	// this file. The differences are the different index of the body in the
	// line array of the context, and the special processing mentioned in the
	// previous paragraph to track into the list. Find a way to factor the
	// common elements into a single function.

	if (*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr != 0 {
		var contextPtr uintptr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(CmdFrame{})))

		*(*CmdFrame)(unsafe.Pointer(contextPtr)) = *(*CmdFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FcmdFramePtr))
		if (*CmdFrame)(unsafe.Pointer(contextPtr)).Ftype == 2 {
			// Retrieve the source context from the bytecode. This call
			// accounts for the reference to the source file, if any, held in
			// 'context.data.eval.path'.

			XTclGetSrcInfoForPc(tls, contextPtr)
		} else if (*CmdFrame)(unsafe.Pointer(contextPtr)).Ftype == 4 {
			// We created a new reference to the source file path name when we
			// created 'context' above. Account for the reference.

			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(contextPtr + 40)))).FrefCount++

		}

		if (*CmdFrame)(unsafe.Pointer(contextPtr)).Ftype == 4 {
			// We can record source location within a lambda only if the body
			// was not created by substitution.

			if (*CmdFrame)(unsafe.Pointer(contextPtr)).Fline != 0 &&
				(*CmdFrame)(unsafe.Pointer(contextPtr)).Fnline >= 2 && *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(contextPtr)).Fline + 1*4)) >= 0 {
				// var buf [2]int32 at bp+72, 8

				// Move from approximation (line of list cmd word) to actual
				// location (line of 2nd list element).

				cfPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CmdFrame{})))
				XTclListLines(tls, objPtr, *(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(contextPtr)).Fline + 1*4)), 2, bp+72, uintptr(0))

				(*CmdFrame)(unsafe.Pointer(cfPtr)).Flevel = -1
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Ftype = (*CmdFrame)(unsafe.Pointer(contextPtr)).Ftype
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Fline = XTcl_Alloc(tls, uint32(unsafe.Sizeof(int32(0))))
				*(*int32)(unsafe.Pointer((*CmdFrame)(unsafe.Pointer(cfPtr)).Fline)) = *(*int32)(unsafe.Pointer(bp + 72 + 1*4))
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Fnline = 1
				(*CmdFrame)(unsafe.Pointer(cfPtr)).FframePtr = uintptr(0)
				(*CmdFrame)(unsafe.Pointer(cfPtr)).FnextPtr = uintptr(0)

				*(*uintptr)(unsafe.Pointer(cfPtr + 40)) = *(*uintptr)(unsafe.Pointer(contextPtr + 40))
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(cfPtr + 40)))).FrefCount++

				(*CmdFrame)(unsafe.Pointer(cfPtr)).Fcmd = uintptr(0)
				(*CmdFrame)(unsafe.Pointer(cfPtr)).Flen = 0
			}

			// 'contextPtr' is going out of scope. Release the reference that
			// it's holding to the source file path

			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(contextPtr + 40))
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		XTclStackFree(tls, interp, contextPtr)
	}
	(*Tcl_HashEntry)(unsafe.Pointer((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr)).FcreateProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FlinePBodyPtr, *(*uintptr)(unsafe.Pointer(bp + 64)), bp+80))).FclientData = cfPtr

	// Set the namespace for this lambda: given by objv[2] understood as a
	// global reference, or else global per default.

	if *(*int32)(unsafe.Pointer(bp + 56)) == 2 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			for ok2 := true; ok2; ok2 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				nsObjPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes, ts+7376, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes + 2)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).FtypePtr = uintptr(0)
			{
			}
		}
	} else {
		var nsName uintptr = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)) + 2*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)) + 2*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)) + 2*8)))
		}()

		if int32(*(*int8)(unsafe.Pointer(nsName))) != ':' || int32(*(*int8)(unsafe.Pointer(nsName + uintptr(1)))) != ':' {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				for ok4 := true; ok4; ok4 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					nsObjPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).FrefCount = 0
				if int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0 {
					(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes, ts+7376, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Fbytes + 2)) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
				}
				(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).FtypePtr = uintptr(0)
				{
				}
			}
			XTcl_AppendObjToObj(tls, nsObjPtr, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* objv */)) + 2*8)))
		} else {
			nsObjPtr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* objv */)) + 2*8))
		}
	}

	(*Tcl_Obj)(unsafe.Pointer(nsObjPtr)).FrefCount++

	// Free the list internalrep of objPtr - this will free argsPtr, but
	// bodyPtr retains a reference from the Proc structure. Then finish the
	// conversion to tclLambdaType.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = *(*uintptr)(unsafe.Pointer(bp + 64 /* procPtr */))
	*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = nsObjPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclLambdaType))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ApplyObjCmd --
//
//	This object-based function is invoked to process the "apply" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	Depends on the content of the lambda term (i.e., objv[1]).
//
//----------------------------------------------------------------------

func XTcl_ApplyObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclProc.c:2605:1: */
	return XTcl_NRCallObjProc(tls, interp, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{XTclNRApplyObjCmd})), dummy, objc, objv)
}

func XTclNRApplyObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclProc.c:2615:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var iPtr uintptr = interp
	var procPtr uintptr = uintptr(0)
	var lambdaPtr uintptr
	var nsObjPtr uintptr
	var result int32
	// var nsPtr uintptr at bp, 8

	var extraPtr uintptr

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+61664)
		return TCL_ERROR
	}

	// Set lambdaPtr, convert it to tclLambdaType in the current interp if
	// necessary.

	lambdaPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	if (*Tcl_Obj)(unsafe.Pointer(lambdaPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclLambdaType)) {
		procPtr = *(*uintptr)(unsafe.Pointer(lambdaPtr + 32))
	}

	// Note: this code is NOT FUNCTIONAL due to the NR implementation; DO NOT
	// ENABLE! Leaving here as reminder to (a) TIP the suggestion, and (b) adapt
	// the code. (MS)

	if procPtr == uintptr(0) || (*Proc)(unsafe.Pointer(procPtr)).FiPtr != iPtr {
		result = sSetLambdaFromAny(tls, interp, lambdaPtr)
		if result != TCL_OK {
			return result
		}
		procPtr = *(*uintptr)(unsafe.Pointer(lambdaPtr + 32))
	}

	// Find the namespace where this lambda should run, and push a call frame
	// for that namespace. Note that TclObjInterpProc() will pop it.

	nsObjPtr = *(*uintptr)(unsafe.Pointer(lambdaPtr + 32 + 8 /* &.ptr2 */))
	result = XTclGetNamespaceFromObj(tls, interp, nsObjPtr, bp)
	if result != TCL_OK {
		return TCL_ERROR
	}

	extraPtr = XTclStackAlloc(tls, interp, int32(unsafe.Sizeof(ApplyExtraData{})))
	libc.Xmemset(tls, extraPtr, 0, uint64(unsafe.Sizeof(Command{})))
	(*Proc)(unsafe.Pointer(procPtr)).FcmdPtr = extraPtr
	(*ApplyExtraData)(unsafe.Pointer(extraPtr)).Fcmd.FnsPtr = *(*uintptr)(unsafe.Pointer(bp /* nsPtr */))

	// TIP#280 (semi-)HACK!
	//
	// Using cmd.clientData to tell [info frame] how to render the lambdaPtr.
	// The InfoFrameCmd will detect this case by testing cmd.hPtr for NULL.
	// This condition holds here because of the memset() above, and nowhere
	// else (in the core). Regular commands always have a valid hPtr, and
	// lambda's never.

	(*ApplyExtraData)(unsafe.Pointer(extraPtr)).Fefi.Flength = 1
	(*ExtraFrameInfoField)(unsafe.Pointer(extraPtr + 112 + 8)).Fname = ts + 26514 /* "lambda" */
	(*ExtraFrameInfoField)(unsafe.Pointer(extraPtr + 112 + 8)).Fproc = uintptr(0)
	(*ExtraFrameInfoField)(unsafe.Pointer(extraPtr + 112 + 8)).FclientData = lambdaPtr
	(*ApplyExtraData)(unsafe.Pointer(extraPtr)).Fcmd.FclientData = extraPtr + 112

	result = XTclPushProcCallFrame(tls, procPtr, interp, objc, objv, 1)
	if result == TCL_OK {
		for ok := true; ok; ok = 0 != 0 {
			var _callbackPtr uintptr
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr
				{
				}
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					_objPtr = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				_callbackPtr = _objPtr
			}
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FprocPtr = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, uintptr, int32) int32
			}{sApplyNR2}))
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8)) = extraPtr
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 1*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 2*8)) = uintptr(0)
			*(*ClientData)(unsafe.Pointer(_callbackPtr + 8 + 3*8)) = uintptr(0)
			(*NRE_callback)(unsafe.Pointer(_callbackPtr)).FnextPtr = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr
			(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).FcallbackPtr = _callbackPtr
		}
		result = XTclNRInterpProcCore(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), 2, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr)
		}{sMakeLambdaError})))
	}
	return result
}

func sApplyNR2(tls *libc.TLS, data uintptr, interp uintptr, result int32) int32 { /* tclProc.c:2716:1: */
	var extraPtr uintptr = *(*ClientData)(unsafe.Pointer(data))

	XTclStackFree(tls, interp, extraPtr)
	return result
}

//----------------------------------------------------------------------
//
// MakeLambdaError --
//
//	Function called by TclObjInterpProc to create the stack information
//	upon an error from a lambda term.
//
// Results:
//	The interpreter's error info trace is set to a value that supplements
//	the error code.
//
// Side effects:
//	none.
//
//----------------------------------------------------------------------

func sMakeLambdaError(tls *libc.TLS, interp uintptr, procNameObj uintptr) { /* tclProc.c:2746:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var overflow int32
	var limit int32 = 60
	// var nameLen int32 at bp+32, 4

	var procName uintptr = XTcl_GetStringFromObj(tls, procNameObj, bp+32)

	overflow = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 32)) > limit)
	XTcl_AppendObjToErrorInfo(tls, interp, XTcl_ObjPrintf(tls,
		ts+61685,
		libc.VaList(bp, func() int32 {
			if overflow != 0 {
				return limit
			}
			return *(*int32)(unsafe.Pointer(bp + 32))
		}(), procName,
			func() uintptr {
				if overflow != 0 {
					return ts + 8420 /* "..." */
				}
				return ts + 2631 /* "" */
			}(), XTcl_GetErrorLine(tls, interp))))
}

//----------------------------------------------------------------------
//
// TclGetCmdFrameForProcedure --
//
//	How to get the CmdFrame information for a procedure.
//
// Results:
//	A pointer to the CmdFrame (only guaranteed to be valid until the next
//	Tcl command is processed or the interpreter's state is otherwise
//	modified) or a NULL if the information is not available.
//
// Side effects:
//	none.
//
//----------------------------------------------------------------------

func XTclGetCmdFrameForProcedure(tls *libc.TLS, procPtr uintptr) uintptr { /* tclProc.c:2780:10: */
	var hePtr uintptr

	if procPtr == uintptr(0) || (*Proc)(unsafe.Pointer(procPtr)).FiPtr == uintptr(0) {
		return uintptr(0)
	}
	hePtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer((*Interp1)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FiPtr)).FlinePBodyPtr)).FfindProc})).f(tls, (*Interp1)(unsafe.Pointer((*Proc)(unsafe.Pointer(procPtr)).FiPtr)).FlinePBodyPtr, procPtr)
	if hePtr == uintptr(0) {
		return uintptr(0)
	}
	return (*Tcl_HashEntry)(unsafe.Pointer(hePtr)).FclientData
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------------
// The routines in this file use Henry Spencer's regular expression package
// contained in the following additional source files:
//
//	regc_color.c	regc_cvec.c	regc_lex.c
//	regc_nfa.c	regcomp.c	regcustom.h
//	rege_dfa.c	regerror.c	regerrs.h
//	regex.h		regexec.c	regfree.c
//	regfronts.c	regguts.h
//
// Copyright (c) 1998 Henry Spencer.  All rights reserved.
//
// Development of this software was funded, in part, by Cray Research Inc.,
// UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
// Corporation, none of whom are responsible for the results. The author
// thanks all of them.
//
// Redistribution and use in source and binary forms -- with or without
// modification -- are permitted for any purpose, provided that
// redistributions in source form retain this entire copyright notice and
// indicate the origin and nature of any modifications.
//
// I'd appreciate being given credit for this package in the documentation of
// software which uses it, but that is not a requirement.
//
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// *** NOTE: this code has been altered slightly for use in Tcl: ***
// *** 1. Names have been changed, e.g. from re_comp to		 ***
// ***    TclRegComp, to avoid clashes with other		 ***
// ***    regexp implementations used by applications.		 ***

// Thread local storage used to maintain a per-thread cache of compiled
// regular expressions.

type ThreadSpecificData10 = struct {
	Finitialized int32
	F__ccgo_pad1 [4]byte
	Fpatterns    [30]uintptr
	FpatLengths  [30]int32
	Fregexps     [30]uintptr
} /* tclRegexp.c:78:3 */

var dataKey9 Tcl_ThreadDataKey /* tclRegexp.c:80:26: */

// The regular expression Tcl object type. This serves as a cache of the
// compiled form of the regular expression.

var XtclRegexpType = Tcl_ObjType{
	Fname:           ts + 3631,
	FfreeIntRepProc: 0, // freeIntRepProc
	FdupIntRepProc:  0, // updateStringProc
	FsetFromAnyProc: 0, // setFromAnyProc
} /* tclRegexp.c:103:19 */

//----------------------------------------------------------------------
//
// Tcl_RegExpCompile --
//
//	Compile a regular expression into a form suitable for fast matching.
//	This function is DEPRECATED in favor of the object version of the
//	command.
//
// Results:
//	The return value is a pointer to the compiled form of string, suitable
//	for passing to Tcl_RegExpExec. This compiled form is only valid up
//	until the next call to this function, so don't keep these around for a
//	long time! If an error occurred while compiling the pattern, then NULL
//	is returned and an error message is left in the interp's result.
//
// Side effects:
//	Updates the cache of compiled regexps.
//
//----------------------------------------------------------------------

func XTcl_RegExpCompile(tls *libc.TLS, interp uintptr, pattern uintptr) Tcl_RegExp { /* tclRegexp.c:134:1: */
	return sCompileRegexp(tls, interp, pattern, int32(libc.Xstrlen(tls, pattern)),
		REG_ADVANCED)
}

//----------------------------------------------------------------------
//
// Tcl_RegExpExec --
//
//	Execute the regular expression matcher using a compiled form of a
//	regular expression and save information about any match that is found.
//
// Results:
//	If an error occurs during the matching operation then -1 is returned
//	and the interp's result contains an error message. Otherwise the
//	return value is 1 if a matching range is found and 0 if there is no
//	matching range.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_RegExpExec(tls *libc.TLS, interp uintptr, re Tcl_RegExp, text uintptr, start uintptr) int32 { /* tclRegexp.c:165:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var flags int32
	var result int32
	var numChars int32
	var regexp uintptr = re
	// var ds Tcl_DString at bp, 216

	var ustr uintptr

	// If the starting point is offset from the beginning of the buffer, then
	// we need to tell the regexp engine not to match "^".

	if text > start {
		flags = REG_NOTBOL
	} else {
		flags = 0
	}

	// Remember the string for use by Tcl_RegExpRange().

	(*TclRegexp)(unsafe.Pointer(regexp)).Fstring = text
	(*TclRegexp)(unsafe.Pointer(regexp)).FobjPtr = uintptr(0)

	// Convert the string to Unicode and perform the match.

	XTcl_DStringInit(tls, bp)
	ustr = XTcl_UtfToUniCharDString(tls, text, -1, bp)
	numChars = int32(uint64((*Tcl_DString)(unsafe.Pointer(bp)).Flength) / uint64(unsafe.Sizeof(Tcl_UniChar(0))))
	result = sRegExpExecUniChar(tls, interp, re, ustr, numChars, -1,
		flags)
	XTcl_DStringFree(tls, bp)

	return result
}

//---------------------------------------------------------------------------
//
// Tcl_RegExpRange --
//
//	Returns pointers describing the range of a regular expression match,
//	or one of the subranges within the match.
//
// Results:
//	The variables at *startPtr and *endPtr are modified to hold the
//	addresses of the endpoints of the range given by index. If the
//	specified range doesn't exist then NULLs are returned.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_RegExpRange(tls *libc.TLS, re Tcl_RegExp, index int32, startPtr uintptr, endPtr uintptr) { /* tclRegexp.c:232:1: */
	var regexpPtr uintptr = re
	var string uintptr

	if Size_t(index) > (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fre.Fre_nsub {
		*(*uintptr)(unsafe.Pointer(startPtr)) = libc.AssignPtrUintptr(endPtr, uintptr(0))
	} else if (*Regmatch_t)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches+uintptr(index)*8)).Frm_so == -1 {
		*(*uintptr)(unsafe.Pointer(startPtr)) = libc.AssignPtrUintptr(endPtr, uintptr(0))
	} else {
		if (*TclRegexp)(unsafe.Pointer(regexpPtr)).FobjPtr != 0 {
			string = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FobjPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FobjPtr)).Fbytes
				}
				return XTcl_GetString(tls, (*TclRegexp)(unsafe.Pointer(regexpPtr)).FobjPtr)
			}()
		} else {
			string = (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fstring
		}
		*(*uintptr)(unsafe.Pointer(startPtr)) = XTcl_UtfAtIndex(tls, string, int32((*Regmatch_t)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches+uintptr(index)*8)).Frm_so))
		*(*uintptr)(unsafe.Pointer(endPtr)) = XTcl_UtfAtIndex(tls, string, int32((*Regmatch_t)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches+uintptr(index)*8)).Frm_eo))
	}
}

//---------------------------------------------------------------------------
//
// RegExpExecUniChar --
//
//	Execute the regular expression matcher using a compiled form of a
//	regular expression and save information about any match that is found.
//
// Results:
//	If an error occurs during the matching operation then -1 is returned
//	and an error message is left in interp's result. Otherwise the return
//	value is 1 if a matching range was found or 0 if there was no matching
//	range.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sRegExpExecUniChar(tls *libc.TLS, interp uintptr, re Tcl_RegExp, wString uintptr, numChars int32, nmatches int32, flags int32) int32 { /* tclRegexp.c:282:1: */
	var status int32
	var regexpPtr uintptr = re
	var last Size_t = (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fre.Fre_nsub + uint64(1)
	var nm Size_t = last

	if nmatches >= 0 && Size_t(nmatches) < nm {
		nm = Size_t(nmatches)
	}

	status = XTclReExec(tls, regexpPtr+8, wString, Size_t(numChars),
		regexpPtr+88, nm, (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches, flags)

	// Check for errors.

	if status != REG_OKAY {
		if status == REG_NOMATCH {
			return 0
		}
		if interp != uintptr(0) {
			XTclRegError(tls, interp, ts+61721,
				status)
		}
		return -1
	}
	return 1
}

//---------------------------------------------------------------------------
//
// TclRegExpRangeUniChar --
//
//	Returns pointers describing the range of a regular expression match,
//	or one of the subranges within the match, or the hypothetical range
//	represented by the rm_extend field of the rm_detail_t.
//
// Results:
//	The variables at *startPtr and *endPtr are modified to hold the
//	offsets of the endpoints of the range given by index. If the specified
//	range doesn't exist then -1s are supplied.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclRegExpRangeUniChar(tls *libc.TLS, re Tcl_RegExp, index int32, startPtr uintptr, endPtr uintptr) { /* tclRegexp.c:344:1: */
	var regexpPtr uintptr = re

	if (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fflags&REG_EXPECT != 0 && index == -1 {
		*(*int32)(unsafe.Pointer(startPtr)) = int32((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fdetails.Frm_extend.Frm_so)
		*(*int32)(unsafe.Pointer(endPtr)) = int32((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fdetails.Frm_extend.Frm_eo)
	} else if Size_t(index) > (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fre.Fre_nsub {
		*(*int32)(unsafe.Pointer(startPtr)) = -1
		*(*int32)(unsafe.Pointer(endPtr)) = -1
	} else {
		*(*int32)(unsafe.Pointer(startPtr)) = int32((*Regmatch_t)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches + uintptr(index)*8)).Frm_so)
		*(*int32)(unsafe.Pointer(endPtr)) = int32((*Regmatch_t)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches + uintptr(index)*8)).Frm_eo)
	}
}

//----------------------------------------------------------------------
//
// Tcl_RegExpMatch --
//
//	See if a string matches a regular expression.
//
// Results:
//	If an error occurs during the matching operation then -1 is returned
//	and the interp's result contains an error message. Otherwise the
//	return value is 1 if "text" matches "pattern" and 0 otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_RegExpMatch(tls *libc.TLS, interp uintptr, text uintptr, pattern uintptr) int32 { /* tclRegexp.c:389:1: */
	var re Tcl_RegExp = XTcl_RegExpCompile(tls, interp, pattern)

	if re == uintptr(0) {
		return -1
	}
	return XTcl_RegExpExec(tls, interp, re, text, text)
}

//----------------------------------------------------------------------
//
// Tcl_RegExpExecObj --
//
//	Execute a precompiled regexp against the given object.
//
// Results:
//	If an error occurs during the matching operation then -1 is returned
//	and the interp's result contains an error message. Otherwise the
//	return value is 1 if "string" matches "pattern" and 0 otherwise.
//
// Side effects:
//	Converts the object to a Unicode object.
//
//----------------------------------------------------------------------

func XTcl_RegExpExecObj(tls *libc.TLS, interp uintptr, re Tcl_RegExp, textObj uintptr, offset int32, nmatches int32, flags int32) int32 { /* tclRegexp.c:421:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var regexpPtr uintptr = re
	var udata uintptr
	// var length int32 at bp, 4

	var reflags int32 = (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fflags

	// Take advantage of the equivalent glob pattern, if one exists.
	// This is possible based only on the right mix of incoming flags (0)
	// and regexp compile flags.
	if offset == 0 && nmatches == 0 && flags == 0 &&
		!(reflags&libc.CplInt32(TCL_REG_ADVANCED|TCL_REG_NOSUB|TCL_REG_NOCASE) != 0) &&
		(*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr != uintptr(0) {
		var nocase int32
		if reflags&TCL_REG_NOCASE != 0 {
			nocase = int32(1) << 0
		} else {
			nocase = 0
		}

		// Pass to TclStringMatchObj for obj-specific handling.
		// XXX: Currently doesn't take advantage of exact-ness that
		// XXX: TclReToGlob tells us about

		return XTclStringMatchObj(tls, textObj, (*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr, nocase)
	}

	// Save the target object so we can extract strings from it later.

	(*TclRegexp)(unsafe.Pointer(regexpPtr)).Fstring = uintptr(0)
	(*TclRegexp)(unsafe.Pointer(regexpPtr)).FobjPtr = textObj

	udata = XTcl_GetUnicodeFromObj(tls, textObj, bp)

	if offset > *(*int32)(unsafe.Pointer(bp)) {
		offset = *(*int32)(unsafe.Pointer(bp /* length */))
	}
	udata += 2 * uintptr(offset)
	*(*int32)(unsafe.Pointer(bp /* length */)) -= offset

	return sRegExpExecUniChar(tls, interp, re, udata, *(*int32)(unsafe.Pointer(bp /* length */)), nmatches, flags)
}

//----------------------------------------------------------------------
//
// Tcl_RegExpMatchObj --
//
//	See if an object matches a regular expression.
//
// Results:
//	If an error occurs during the matching operation then -1 is returned
//	and the interp's result contains an error message. Otherwise the
//	return value is 1 if "text" matches "pattern" and 0 otherwise.
//
// Side effects:
//	Changes the internal rep of the pattern and string objects.
//
//----------------------------------------------------------------------

func XTcl_RegExpMatchObj(tls *libc.TLS, interp uintptr, textObj uintptr, patternObj uintptr) int32 { /* tclRegexp.c:497:1: */
	var re Tcl_RegExp

	// For performance reasons, first try compiling the RE without support for
	// subexpressions. On failure, try again without TCL_REG_NOSUB in case the
	// RE has backreferences in it. Closely related to [Bug 1366683]. If this
	// still fails, an error message will be left in the interpreter.

	if !(int32(libc.AssignUintptr(&re, XTcl_GetRegExpFromObj(tls, interp, patternObj,
		TCL_REG_ADVANCED|TCL_REG_NOSUB))) != 0) &&
		!(int32(libc.AssignUintptr(&re, XTcl_GetRegExpFromObj(tls, interp, patternObj, TCL_REG_ADVANCED))) != 0) {
		return -1
	}
	return XTcl_RegExpExecObj(tls, interp, re, textObj, 0,
		0, 0)
}

//----------------------------------------------------------------------
//
// Tcl_RegExpGetInfo --
//
//	Retrieve information about the current match.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_RegExpGetInfo(tls *libc.TLS, regexp Tcl_RegExp, infoPtr uintptr) { /* tclRegexp.c:538:1: */
	var regexpPtr uintptr = regexp

	(*Tcl_RegExpInfo)(unsafe.Pointer(infoPtr)).Fnsubs = int32((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fre.Fre_nsub)
	(*Tcl_RegExpInfo)(unsafe.Pointer(infoPtr)).Fmatches = (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches
	(*Tcl_RegExpInfo)(unsafe.Pointer(infoPtr)).FextendStart = (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fdetails.Frm_extend.Frm_so
}

//----------------------------------------------------------------------
//
// Tcl_GetRegExpFromObj --
//
//	Compile a regular expression into a form suitable for fast matching.
//	This function caches the result in a Tcl_Obj.
//
// Results:
//	The return value is a pointer to the compiled form of string, suitable
//	for passing to Tcl_RegExpExec. If an error occurred while compiling
//	the pattern, then NULL is returned and an error message is left in the
//	interp's result.
//
// Side effects:
//	Updates the native rep of the Tcl_Obj.
//
//----------------------------------------------------------------------

func XTcl_GetRegExpFromObj(tls *libc.TLS, interp uintptr, objPtr uintptr, flags int32) Tcl_RegExp { /* tclRegexp.c:570:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var length int32 at bp, 4

	var regexpPtr uintptr
	var pattern uintptr

	// This is OK because we only actually interpret this value properly as a
	// TclRegexp* when the type is tclRegexpType.

	regexpPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclRegexpType)) || (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fflags != flags {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, objPtr, bp)
		}()

		regexpPtr = sCompileRegexp(tls, interp, pattern, *(*int32)(unsafe.Pointer(bp /* length */)), flags)
		if regexpPtr == uintptr(0) {
			return uintptr(0)
		}

		// Add a reference to the regexp so it will persist even if it is
		// pushed out of the current thread's regexp cache. This reference
		// will be removed when the object's internal rep is freed.

		(*TclRegexp)(unsafe.Pointer(regexpPtr)).FrefCount++

		// Free the old representation and set our type.

		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}

		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = regexpPtr
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclRegexpType))
	}
	return regexpPtr
}

//----------------------------------------------------------------------
//
// TclRegAbout --
//
//	Return information about a compiled regular expression.
//
// Results:
//	The return value is -1 for failure, 0 for success, although at the
//	moment there's nothing that could fail. On success, a list is left in
//	the interp's result: first element is the subexpression count, second
//	is a list of re_info bit names.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclRegAbout(tls *libc.TLS, interp uintptr, re Tcl_RegExp) int32 { /* tclRegexp.c:637:1: */
	var regexpPtr uintptr = re
	var inf uintptr
	var infoObj uintptr
	var resultObj uintptr

	// The reset here guarantees that the interpreter result is empty and
	// unshared. This means that we can use Tcl_ListObjAppendElement on the
	// result object quite safely.

	XTcl_ResetResult(tls, interp)

	// Assume that there will never be more than INT_MAX subexpressions. This
	// is a pretty reasonable assumption; the RE engine doesn't scale _that_
	// well and Tcl has other limits that constrain things as well...

	resultObj = XTcl_NewObj(tls)
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj,
		XTcl_NewIntObj(tls, int32((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fre.Fre_nsub)))

	// Now append a list of all the bit-flags set for the RE.

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		infoObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(infoObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(infoObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(infoObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(infoObj)).FtypePtr = uintptr(0)
	{
	}

	for inf = uintptr(unsafe.Pointer(&infonames)); (*Infoname)(unsafe.Pointer(inf)).Fbit != 0; inf += 16 {
		if (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fre.Fre_info&int32((*Infoname)(unsafe.Pointer(inf)).Fbit) != 0 {
			XTcl_ListObjAppendElement(tls, uintptr(0), infoObj,
				XTcl_NewStringObj(tls, (*Infoname)(unsafe.Pointer(inf)).Ftext, -1))
		}
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, infoObj)
	XTcl_SetObjResult(tls, interp, resultObj)

	return 0
}

type Infoname = struct {
	Fbit         int32
	F__ccgo_pad1 [4]byte
	Ftext        uintptr
} /* tclRegexp.c:642:5 */

var infonames = [15]Infoname{
	{Fbit: REG_UBACKREF, Ftext: ts + 61763},
	{Fbit: REG_ULOOKAHEAD, Ftext: ts + 61776},
	{Fbit: REG_UBOUNDS, Ftext: ts + 61791},
	{Fbit: REG_UBRACES, Ftext: ts + 61803},
	{Fbit: REG_UBSALNUM, Ftext: ts + 61815},
	{Fbit: REG_UPBOTCH, Ftext: ts + 61828},
	{Fbit: REG_UBBS, Ftext: ts + 61840},
	{Fbit: REG_UNONPOSIX, Ftext: ts + 61849},
	{Fbit: REG_UUNSPEC, Ftext: ts + 61863},
	{Fbit: REG_UUNPORT, Ftext: ts + 61875},
	{Fbit: REG_ULOCALE, Ftext: ts + 61887},
	{Fbit: REG_UEMPTYMATCH, Ftext: ts + 61899},
	{Fbit: REG_UIMPOSSIBLE, Ftext: ts + 61915},
	{Fbit: REG_USHORTEST, Ftext: ts + 61931},
	{},
} /* tclRegexp.c:646:34 */

//----------------------------------------------------------------------
//
// TclRegError --
//
//	Generate an error message based on the regexp status code.
//
// Results:
//	Places an error in the interpreter.
//
// Side effects:
//	Sets errorCode as well.
//
//----------------------------------------------------------------------

func XTclRegError(tls *libc.TLS, interp uintptr, msg uintptr, status int32) { /* tclRegexp.c:718:1: */
	bp := tls.Alloc(188)
	defer tls.Free(188)

	// var buf [100]int8 at bp+64, 100
	// ample in practice
	// var cbuf [24]int8 at bp+164, 24

	var n Size_t
	var p uintptr

	XTcl_ResetResult(tls, interp)
	n = XTclReError(tls, status, bp+64, uint64(unsafe.Sizeof([100]int8{})))
	if n > Size_t(unsafe.Sizeof([100]int8{})) {
		p = ts + 8420 /* "..." */
	} else {
		p = ts + 2631 /* "" */
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+61945, libc.VaList(bp, msg, bp+64, p)))

	libc.Xsprintf(tls, bp+164, ts+909, libc.VaList(bp+24, status))
	XTclReError(tls, REG_ITOA, bp+164, uint64(unsafe.Sizeof([24]int8{})))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+16363, bp+164, bp+64, uintptr(0)))
}

//----------------------------------------------------------------------
//
// FreeRegexpInternalRep --
//
//	Deallocate the storage associated with a regexp object's internal
//	representation.
//
// Results:
//	None.
//
// Side effects:
//	Frees the compiled regular expression.
//
//----------------------------------------------------------------------

func sFreeRegexpInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclRegexp.c:756:1: */
	var regexpRepPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	// If this is the last reference to the regexp, free it.

	if libc.PostDecInt32(&(*TclRegexp)(unsafe.Pointer(regexpRepPtr)).FrefCount, 1) <= 1 {
		sFreeRegexp(tls, regexpRepPtr)
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

//----------------------------------------------------------------------
//
// DupRegexpInternalRep --
//
//	We copy the reference to the compiled regexp and bump its reference
//	count.
//
// Results:
//	None.
//
// Side effects:
//	Increments the reference count of the regexp.
//
//----------------------------------------------------------------------

func sDupRegexpInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclRegexp.c:789:1: */
	var regexpPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))

	(*TclRegexp)(unsafe.Pointer(regexpPtr)).FrefCount++
	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = *(*uintptr)(unsafe.Pointer(srcPtr + 32))
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclRegexpType))
}

//----------------------------------------------------------------------
//
// SetRegexpFromAny --
//
//	Attempt to generate a compiled regular expression for the Tcl object
//	"objPtr".
//
// Results:
//	The return value is TCL_OK or TCL_ERROR. If an error occurs during
//	conversion, an error message is left in the interpreter's result
//	unless "interp" is NULL.
//
// Side effects:
//	If no error occurs, a regular expression is stored as "objPtr"s
//	internal representation.
//
//----------------------------------------------------------------------

func sSetRegexpFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclRegexp.c:821:1: */
	if XTcl_GetRegExpFromObj(tls, interp, objPtr, REG_ADVANCED) == uintptr(0) {
		return TCL_ERROR
	}
	return TCL_OK
}

//---------------------------------------------------------------------------
//
// CompileRegexp --
//
//	Attempt to compile the given regexp pattern. If the compiled regular
//	expression can be found in the per-thread cache, it will be used
//	instead of compiling a new copy.
//
// Results:
//	The return value is a pointer to a newly allocated TclRegexp that
//	represents the compiled pattern, or NULL if the pattern could not be
//	compiled. If NULL is returned, an error message is left in the
//	interp's result.
//
// Side effects:
//	The thread-local regexp cache is updated and a new TclRegexp may be
//	allocated.
//
//----------------------------------------------------------------------

func sCompileRegexp(tls *libc.TLS, interp uintptr, string uintptr, length int32, flags int32) uintptr { /* tclRegexp.c:853:18: */
	bp := tls.Alloc(220)
	defer tls.Free(220)

	var regexpPtr uintptr
	var uniString uintptr
	var numChars int32
	var status int32
	var i int32
	// var exact int32 at bp+216, 4

	// var stringBuf Tcl_DString at bp, 216

	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey9)), int32(unsafe.Sizeof(ThreadSpecificData10{})))

	if !((*ThreadSpecificData10)(unsafe.Pointer(tsdPtr)).Finitialized != 0) {
		(*ThreadSpecificData10)(unsafe.Pointer(tsdPtr)).Finitialized = 1
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFinalizeRegexp})), uintptr(0))
	}

	// This routine maintains a second-level regular expression cache in
	// addition to the per-object regexp cache. The per-thread cache is needed
	// to handle the case where for various reasons the object is lost between
	// invocations of the regexp command, but the literal pattern is the same.

	// Check the per-thread compiled regexp cache. We can only reuse a regexp
	// if it has the same pattern and the same flags.

	for i = 0; i < NUM_REGEXPS && *(*uintptr)(unsafe.Pointer(tsdPtr + 8 /* &.patterns */ + uintptr(i)*8)) != uintptr(0); i++ {
		if length == *(*int32)(unsafe.Pointer(tsdPtr + 248 + uintptr(i)*4)) &&
			(*TclRegexp1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tsdPtr + 368 + uintptr(i)*8)))).Fflags == flags &&
			libc.Xstrcmp(tls, string, *(*uintptr)(unsafe.Pointer(tsdPtr + 8 + uintptr(i)*8))) == 0 {
			// Move the matched pattern to the first slot in the cache and
			// shift the other patterns down one position.

			if i != 0 {
				var j int32
				var cachedString uintptr

				cachedString = *(*uintptr)(unsafe.Pointer(tsdPtr + 8 + uintptr(i)*8))
				regexpPtr = *(*uintptr)(unsafe.Pointer(tsdPtr + 368 + uintptr(i)*8))
				for j = i - 1; j >= 0; j-- {
					*(*uintptr)(unsafe.Pointer(tsdPtr + 8 + uintptr(j+1)*8)) = *(*uintptr)(unsafe.Pointer(tsdPtr + 8 + uintptr(j)*8))
					*(*int32)(unsafe.Pointer(tsdPtr + 248 + uintptr(j+1)*4)) = *(*int32)(unsafe.Pointer(tsdPtr + 248 + uintptr(j)*4))
					*(*uintptr)(unsafe.Pointer(tsdPtr + 368 + uintptr(j+1)*8)) = *(*uintptr)(unsafe.Pointer(tsdPtr + 368 + uintptr(j)*8))
				}
				*(*uintptr)(unsafe.Pointer(tsdPtr + 8)) = cachedString
				*(*int32)(unsafe.Pointer(tsdPtr + 248)) = length
				*(*uintptr)(unsafe.Pointer(tsdPtr + 368)) = regexpPtr
			}
			return *(*uintptr)(unsafe.Pointer(tsdPtr + 368))
		}
	}

	// This is a new expression, so compile it and add it to the cache.

	regexpPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TclRegexp{})))
	(*TclRegexp)(unsafe.Pointer(regexpPtr)).FobjPtr = uintptr(0)
	(*TclRegexp)(unsafe.Pointer(regexpPtr)).Fstring = uintptr(0)
	(*TclRegexp)(unsafe.Pointer(regexpPtr)).Fdetails.Frm_extend.Frm_so = -1
	(*TclRegexp)(unsafe.Pointer(regexpPtr)).Fdetails.Frm_extend.Frm_eo = -1

	// Get the up-to-date string representation and map to unicode.

	XTcl_DStringInit(tls, bp)
	uniString = XTcl_UtfToUniCharDString(tls, string, length, bp)
	numChars = int32(uint64((*Tcl_DString)(unsafe.Pointer(bp)).Flength) / uint64(unsafe.Sizeof(Tcl_UniChar(0))))

	// Compile the string and check for errors.

	(*TclRegexp)(unsafe.Pointer(regexpPtr)).Fflags = flags
	status = XTclReComp(tls, regexpPtr+8, uniString, Size_t(numChars), flags)
	XTcl_DStringFree(tls, bp)

	if status != REG_OKAY {
		// Clean up and report errors in the interpreter, if possible.

		XTclpFree(tls, regexpPtr)
		if interp != 0 {
			XTclRegError(tls, interp,
				ts+61952, status)
		}
		return uintptr(0)
	}

	// Convert RE to a glob pattern equivalent, if any, and cache it.  If this
	// is not possible, then globObjPtr will be NULL.  This is used by
	// Tcl_RegExpExecObj to optionally do a fast match (avoids RE engine).

	if XTclReToGlob(tls, uintptr(0), string, length, bp, bp+216,
		uintptr(0)) == TCL_OK {
		(*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr = XTclDStringToObj(tls, bp)
		(*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr)).FrefCount++
	} else {
		(*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr = uintptr(0)
	}

	// Allocate enough space for all of the subexpressions, plus one extra for
	// the entire pattern.

	(*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(Regmatch_t{}))*((*TclRegexp)(unsafe.Pointer(regexpPtr)).Fre.Fre_nsub+uint64(1))))

	// Initialize the refcount to one initially, since it is in the cache.

	(*TclRegexp)(unsafe.Pointer(regexpPtr)).FrefCount = 1

	// Free the last regexp, if necessary, and make room at the head of the
	// list for the new regexp.

	if *(*uintptr)(unsafe.Pointer(tsdPtr + 8 + 29*8)) != uintptr(0) {
		var oldRegexpPtr uintptr = *(*uintptr)(unsafe.Pointer(tsdPtr + 368 + 29*8))

		if libc.PostDecInt32(&(*TclRegexp)(unsafe.Pointer(oldRegexpPtr)).FrefCount, 1) <= 1 {
			sFreeRegexp(tls, oldRegexpPtr)
		}
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(tsdPtr + 8 + 29*8)))
	}
	for i = NUM_REGEXPS - 2; i >= 0; i-- {
		*(*uintptr)(unsafe.Pointer(tsdPtr + 8 + uintptr(i+1)*8)) = *(*uintptr)(unsafe.Pointer(tsdPtr + 8 + uintptr(i)*8))
		*(*int32)(unsafe.Pointer(tsdPtr + 248 + uintptr(i+1)*4)) = *(*int32)(unsafe.Pointer(tsdPtr + 248 + uintptr(i)*4))
		*(*uintptr)(unsafe.Pointer(tsdPtr + 368 + uintptr(i+1)*8)) = *(*uintptr)(unsafe.Pointer(tsdPtr + 368 + uintptr(i)*8))
	}
	*(*uintptr)(unsafe.Pointer(tsdPtr + 8)) = XTcl_Alloc(tls, uint32(length+1))
	libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(tsdPtr + 8)), string, uint64(length+1))
	*(*int32)(unsafe.Pointer(tsdPtr + 248)) = length
	*(*uintptr)(unsafe.Pointer(tsdPtr + 368)) = regexpPtr

	return regexpPtr
}

//----------------------------------------------------------------------
//
// FreeRegexp --
//
//	Release the storage associated with a TclRegexp.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFreeRegexp(tls *libc.TLS, regexpPtr uintptr) { /* tclRegexp.c:1021:1: */
	XTclReFree(tls, regexpPtr+8)
	if (*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr != 0 {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer((*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = (*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr
				}
			} else {
				XTclFreeObj(tls, (*TclRegexp)(unsafe.Pointer(regexpPtr)).FglobObjPtr)
			}
		}

	}
	if (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches != 0 {
		XTclpFree(tls, (*TclRegexp)(unsafe.Pointer(regexpPtr)).Fmatches)
	}
	XTclpFree(tls, regexpPtr)
}

//----------------------------------------------------------------------
//
// FinalizeRegexp --
//
//	Release the storage associated with the per-thread regexp cache.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFinalizeRegexp(tls *libc.TLS, clientData ClientData) { /* tclRegexp.c:1051:1: */
	var i int32
	var regexpPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey9)), int32(unsafe.Sizeof(ThreadSpecificData10{})))

	for i = 0; i < NUM_REGEXPS && *(*uintptr)(unsafe.Pointer(tsdPtr + 8 /* &.patterns */ + uintptr(i)*8)) != uintptr(0); i++ {
		regexpPtr = *(*uintptr)(unsafe.Pointer(tsdPtr + 368 + uintptr(i)*8))
		if libc.PostDecInt32(&(*TclRegexp)(unsafe.Pointer(regexpPtr)).FrefCount, 1) <= 1 {
			sFreeRegexp(tls, regexpPtr)
		}
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(tsdPtr + 8 + uintptr(i)*8)))
		*(*uintptr)(unsafe.Pointer(tsdPtr + 8 + uintptr(i)*8)) = uintptr(0)
	}

	// We may find ourselves reinitialized if another finalization routine
	// invokes regexps.

	(*ThreadSpecificData10)(unsafe.Pointer(tsdPtr)).Finitialized = 0
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

//----------------------------------------------------------------------
//
// Tcl_AddInterpResolvers --
//
//	Adds a set of command/variable resolution functions to an interpreter.
//	These functions are consulted when commands are resolved in
//	Tcl_FindCommand, and when variables are resolved in TclLookupVar and
//	LookupCompiledLocal. Each namespace may also have its own set of
//	resolution functions which take precedence over those for the
//	interpreter.
//
//	When a name is resolved, it is handled as follows. First, the name is
//	passed to the resolution functions for the namespace. If not resolved,
//	the name is passed to each of the resolution functions added to the
//	interpreter. Finally, if still not resolved, the name is handled using
//	the default Tcl rules for name resolution.
//
// Results:
//	Returns pointers to the current name resolution functions in the
//	cmdProcPtr, varProcPtr and compiledVarProcPtr arguments.
//
// Side effects:
//	If a compiledVarProc is specified, this function bumps the
//	compileEpoch for the interpreter, forcing all code to be recompiled.
//	If a cmdProc is specified, this function bumps the cmdRefEpoch in all
//	namespaces, forcing commands to be resolved again using the new rules.
//
//----------------------------------------------------------------------

func XTcl_AddInterpResolvers(tls *libc.TLS, interp uintptr, name uintptr, cmdProc uintptr, varProc uintptr, compiledVarProc uintptr) { /* tclResolve.c:55:1: */
	var iPtr uintptr = interp
	var resPtr uintptr
	var len uint32

	// Since we're adding a new name resolution scheme, we must force all code
	// to be recompiled to use the new scheme. If there are new compiled
	// variable resolution rules, bump the compiler epoch to invalidate
	// compiled code. If there are new command resolution rules, bump the
	// cmdRefEpoch in all namespaces.

	if compiledVarProc != 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
	}
	if cmdProc != 0 {
		sBumpCmdRefEpochs(tls, (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr)
	}

	// Look for an existing scheme with the given name. If found, then replace
	// its rules.

	for resPtr = (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr; resPtr != uintptr(0); resPtr = (*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr {
		if int32(*(*int8)(unsafe.Pointer(name))) == int32(*(*int8)(unsafe.Pointer((*ResolverScheme)(unsafe.Pointer(resPtr)).Fname))) && libc.Xstrcmp(tls, name, (*ResolverScheme)(unsafe.Pointer(resPtr)).Fname) == 0 {
			(*ResolverScheme)(unsafe.Pointer(resPtr)).FcmdResProc = cmdProc
			(*ResolverScheme)(unsafe.Pointer(resPtr)).FvarResProc = varProc
			(*ResolverScheme)(unsafe.Pointer(resPtr)).FcompiledVarResProc = compiledVarProc
			return
		}
	}

	// Otherwise, this is a new scheme. Add it to the FRONT of the linked
	// list, so that it overrides existing schemes.

	resPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ResolverScheme{})))
	len = uint32(libc.Xstrlen(tls, name) + uint64(1))
	(*ResolverScheme)(unsafe.Pointer(resPtr)).Fname = XTcl_Alloc(tls, len)
	libc.Xmemcpy(tls, (*ResolverScheme)(unsafe.Pointer(resPtr)).Fname, name, uint64(len))
	(*ResolverScheme)(unsafe.Pointer(resPtr)).FcmdResProc = cmdProc
	(*ResolverScheme)(unsafe.Pointer(resPtr)).FvarResProc = varProc
	(*ResolverScheme)(unsafe.Pointer(resPtr)).FcompiledVarResProc = compiledVarProc
	(*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr
	(*Interp)(unsafe.Pointer(iPtr)).FresolverPtr = resPtr
}

//----------------------------------------------------------------------
//
// Tcl_GetInterpResolvers --
//
//	Looks for a set of command/variable resolution functions with the
//	given name in an interpreter. These functions are registered by
//	calling Tcl_AddInterpResolvers.
//
// Results:
//	If the name is recognized, this function returns non-zero, along with
//	pointers to the name resolution functions in the Tcl_ResolverInfo
//	structure. If the name is not recognized, this function returns zero.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetInterpResolvers(tls *libc.TLS, interp uintptr, name uintptr, resInfoPtr uintptr) int32 { /* tclResolve.c:136:1: */
	var iPtr uintptr = interp
	var resPtr uintptr

	// Look for an existing scheme with the given name. If found, then return
	// pointers to its functions.

	for resPtr = (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr; resPtr != uintptr(0); resPtr = (*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr {
		if int32(*(*int8)(unsafe.Pointer(name))) == int32(*(*int8)(unsafe.Pointer((*ResolverScheme)(unsafe.Pointer(resPtr)).Fname))) && libc.Xstrcmp(tls, name, (*ResolverScheme)(unsafe.Pointer(resPtr)).Fname) == 0 {
			(*Tcl_ResolverInfo)(unsafe.Pointer(resInfoPtr)).FcmdResProc = (*ResolverScheme)(unsafe.Pointer(resPtr)).FcmdResProc
			(*Tcl_ResolverInfo)(unsafe.Pointer(resInfoPtr)).FvarResProc = (*ResolverScheme)(unsafe.Pointer(resPtr)).FvarResProc
			(*Tcl_ResolverInfo)(unsafe.Pointer(resInfoPtr)).FcompiledVarResProc = (*ResolverScheme)(unsafe.Pointer(resPtr)).FcompiledVarResProc
			return 1
		}
	}

	return 0
}

//----------------------------------------------------------------------
//
// Tcl_RemoveInterpResolvers --
//
//	Removes a set of command/variable resolution functions previously
//	added by Tcl_AddInterpResolvers. The next time a command/variable name
//	is resolved, these functions won't be consulted.
//
// Results:
//	Returns non-zero if the name was recognized and the resolution scheme
//	was deleted. Returns zero otherwise.
//
// Side effects:
//	If a scheme with a compiledVarProc was deleted, this function bumps
//	the compileEpoch for the interpreter, forcing all code to be
//	recompiled. If a scheme with a cmdProc was deleted, this function
//	bumps the cmdRefEpoch in all namespaces, forcing commands to be
//	resolved again using the new rules.
//
//----------------------------------------------------------------------

func XTcl_RemoveInterpResolvers(tls *libc.TLS, interp uintptr, name uintptr) int32 { /* tclResolve.c:188:1: */
	var iPtr uintptr = interp
	var prevPtrPtr uintptr
	var resPtr uintptr

	// Look for an existing scheme with the given name.

	prevPtrPtr = iPtr + 408
	for resPtr = (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr; resPtr != uintptr(0); resPtr = (*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr {
		if int32(*(*int8)(unsafe.Pointer(name))) == int32(*(*int8)(unsafe.Pointer((*ResolverScheme)(unsafe.Pointer(resPtr)).Fname))) && libc.Xstrcmp(tls, name, (*ResolverScheme)(unsafe.Pointer(resPtr)).Fname) == 0 {
			break
		}
		prevPtrPtr = resPtr + 32
	}

	// If we found the scheme, delete it.

	if resPtr != 0 {
		// If we're deleting a scheme with compiled variable resolution rules,
		// bump the compiler epoch to invalidate compiled code. If we're
		// deleting a scheme with command resolution rules, bump the
		// cmdRefEpoch in all namespaces.

		if (*ResolverScheme)(unsafe.Pointer(resPtr)).FcompiledVarResProc != 0 {
			(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
		}
		if (*ResolverScheme)(unsafe.Pointer(resPtr)).FcmdResProc != 0 {
			sBumpCmdRefEpochs(tls, (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr)
		}

		*(*uintptr)(unsafe.Pointer(prevPtrPtr)) = (*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr
		XTclpFree(tls, (*ResolverScheme)(unsafe.Pointer(resPtr)).Fname)
		XTclpFree(tls, resPtr)

		return 1
	}
	return 0
}

//----------------------------------------------------------------------
//
// BumpCmdRefEpochs --
//
//	This function is used to bump the cmdRefEpoch counters in the
//	specified namespace and all of its child namespaces. It is used
//	whenever name resolution schemes are added/removed from an
//	interpreter, to invalidate all command references.
//
// Results:
//	None.
//
// Side effects:
//	Bumps the cmdRefEpoch in the specified namespace and its children,
//	recursively.
//
//----------------------------------------------------------------------

func sBumpCmdRefEpochs(tls *libc.TLS, nsPtr uintptr) { /* tclResolve.c:257:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var entry uintptr
	// var search Tcl_HashSearch at bp, 24

	(*Namespace)(unsafe.Pointer(nsPtr)).FcmdRefEpoch++

	for entry = XTcl_FirstHashEntry(tls, nsPtr+40, bp); entry != uintptr(0); entry = XTcl_NextHashEntry(tls, bp) {
		var childNsPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(entry)).FclientData

		sBumpCmdRefEpochs(tls, childNsPtr)
	}
	XTclInvalidateNsPath(tls, nsPtr)
}

//----------------------------------------------------------------------
//
// Tcl_SetNamespaceResolvers --
//
//	Sets the command/variable resolution functions for a namespace,
//	thereby changing the way that command/variable names are interpreted.
//	This allows extension writers to support different name resolution
//	schemes, such as those for object-oriented packages.
//
//	Command resolution is handled by a function of the following type:
//
//	  typedef int (Tcl_ResolveCmdProc)(Tcl_Interp *interp,
//		  const char *name, Tcl_Namespace *context,
//		  int flags, Tcl_Command *rPtr);
//
//	Whenever a command is executed or Tcl_FindCommand is invoked within
//	the namespace, this function is called to resolve the command name. If
//	this function is able to resolve the name, it should return the status
//	code TCL_OK, along with the corresponding Tcl_Command in the rPtr
//	argument. Otherwise, the function can return TCL_CONTINUE, and the
//	command will be treated under the usual name resolution rules. Or, it
//	can return TCL_ERROR, and the command will be considered invalid.
//
//	Variable resolution is handled by two functions. The first is called
//	whenever a variable needs to be resolved at compile time:
//
//	  typedef int (Tcl_ResolveCompiledVarProc)(Tcl_Interp *interp,
//		  const char *name, Tcl_Namespace *context,
//		  Tcl_ResolvedVarInfo *rPtr);
//
//	If this function is able to resolve the name, it should return the
//	status code TCL_OK, along with variable resolution info in the rPtr
//	argument; this info will be used to set up compiled locals in the call
//	frame at runtime. The function may also return TCL_CONTINUE, and the
//	variable will be treated under the usual name resolution rules. Or, it
//	can return TCL_ERROR, and the variable will be considered invalid.
//
//	Another function is used whenever a variable needs to be resolved at
//	runtime but it is not recognized as a compiled local. (For example,
//	the variable may be requested via Tcl_FindNamespaceVar.) This function
//	has the following type:
//
//	  typedef int (Tcl_ResolveVarProc)(Tcl_Interp *interp,
//		  const char *name, Tcl_Namespace *context,
//		  int flags, Tcl_Var *rPtr);
//
//	This function is quite similar to the compile-time version. It returns
//	the same status codes, but if variable resolution succeeds, this
//	function returns a Tcl_Var directly via the rPtr argument.
//
// Results:
//	Nothing.
//
// Side effects:
//	Bumps the command epoch counter for the namespace, invalidating all
//	command references in that namespace. Also bumps the resolver epoch
//	counter for the namespace, forcing all code in the namespace to be
//	recompiled.
//
//----------------------------------------------------------------------

func XTcl_SetNamespaceResolvers(tls *libc.TLS, namespacePtr uintptr, cmdProc uintptr, varProc uintptr, compiledVarProc uintptr) { /* tclResolve.c:349:1: */
	var nsPtr uintptr = namespacePtr

	// Plug in the new command resolver, and bump the epoch counters so that
	// all code will have to be recompiled and all commands will have to be
	// resolved again using the new policy.

	(*Namespace)(unsafe.Pointer(nsPtr)).FcmdResProc = cmdProc
	(*Namespace)(unsafe.Pointer(nsPtr)).FvarResProc = varProc
	(*Namespace)(unsafe.Pointer(nsPtr)).FcompiledVarResProc = compiledVarProc

	(*Namespace)(unsafe.Pointer(nsPtr)).FcmdRefEpoch++
	(*Namespace)(unsafe.Pointer(nsPtr)).FresolverEpoch++
	XTclInvalidateNsPath(tls, nsPtr)
}

//----------------------------------------------------------------------
//
// Tcl_GetNamespaceResolvers --
//
//	Returns the current command/variable resolution functions for a
//	namespace. By default, these functions are NULL. New functions can be
//	installed by calling Tcl_SetNamespaceResolvers, to provide new name
//	resolution rules.
//
// Results:
//	Returns non-zero if any name resolution functions have been assigned
//	to this namespace; also returns pointers to the functions in the
//	Tcl_ResolverInfo structure. Returns zero otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetNamespaceResolvers(tls *libc.TLS, namespacePtr uintptr, resInfoPtr uintptr) int32 { /* tclResolve.c:398:1: */
	var nsPtr uintptr = namespacePtr

	(*Tcl_ResolverInfo)(unsafe.Pointer(resInfoPtr)).FcmdResProc = (*Namespace)(unsafe.Pointer(nsPtr)).FcmdResProc
	(*Tcl_ResolverInfo)(unsafe.Pointer(resInfoPtr)).FvarResProc = (*Namespace)(unsafe.Pointer(nsPtr)).FvarResProc
	(*Tcl_ResolverInfo)(unsafe.Pointer(resInfoPtr)).FcompiledVarResProc = (*Namespace)(unsafe.Pointer(nsPtr)).FcompiledVarResProc

	if (*Namespace)(unsafe.Pointer(nsPtr)).FcmdResProc != uintptr(0) || (*Namespace)(unsafe.Pointer(nsPtr)).FvarResProc != uintptr(0) || (*Namespace)(unsafe.Pointer(nsPtr)).FcompiledVarResProc != uintptr(0) {
		return 1
	}
	return 0
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// This structure is used to take a snapshot of the interpreter state in
// Tcl_SaveInterpState. You can snapshot the state, execute a command, and
// then back up to the result or the error that was previously in progress.

type InterpState1 = struct {
	Fstatus          int32
	Fflags           int32
	FreturnLevel     int32
	FreturnCode      int32
	FerrorInfo       uintptr
	FerrorCode       uintptr
	FreturnOpts      uintptr
	FobjResult       uintptr
	FerrorStack      uintptr
	FresetErrorStack int32
	F__ccgo_pad1     [4]byte
} /* tclResult.c:38:9 */

// This structure is used to take a snapshot of the interpreter state in
// Tcl_SaveInterpState. You can snapshot the state, execute a command, and
// then back up to the result or the error that was previously in progress.

type InterpState = InterpState1 /* tclResult.c:49:3 */

//----------------------------------------------------------------------
//
// Tcl_SaveInterpState --
//
//	Fills a token with a snapshot of the current state of the interpreter.
//	The snapshot can be restored at any point by TclRestoreInterpState.
//
//	The token returned must be eventally passed to one of the routines
//	TclRestoreInterpState or TclDiscardInterpState, or there will be a
//	memory leak.
//
// Results:
//	Returns a token representing the interp state.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_SaveInterpState(tls *libc.TLS, interp uintptr, status int32) Tcl_InterpState { /* tclResult.c:73:1: */
	var iPtr uintptr = interp
	var statePtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(InterpState{})))

	(*InterpState)(unsafe.Pointer(statePtr)).Fstatus = status
	(*InterpState)(unsafe.Pointer(statePtr)).Fflags = (*Interp)(unsafe.Pointer(iPtr)).Fflags & ERR_ALREADY_LOGGED
	(*InterpState)(unsafe.Pointer(statePtr)).FreturnLevel = (*Interp)(unsafe.Pointer(iPtr)).FreturnLevel
	(*InterpState)(unsafe.Pointer(statePtr)).FreturnCode = (*Interp)(unsafe.Pointer(iPtr)).FreturnCode
	(*InterpState)(unsafe.Pointer(statePtr)).FerrorInfo = (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo
	(*InterpState)(unsafe.Pointer(statePtr)).FerrorStack = (*Interp)(unsafe.Pointer(iPtr)).FerrorStack
	(*InterpState)(unsafe.Pointer(statePtr)).FresetErrorStack = (*Interp)(unsafe.Pointer(iPtr)).FresetErrorStack
	if (*InterpState)(unsafe.Pointer(statePtr)).FerrorInfo != 0 {
		(*Tcl_Obj)(unsafe.Pointer((*InterpState)(unsafe.Pointer(statePtr)).FerrorInfo)).FrefCount++
	}
	(*InterpState)(unsafe.Pointer(statePtr)).FerrorCode = (*Interp)(unsafe.Pointer(iPtr)).FerrorCode
	if (*InterpState)(unsafe.Pointer(statePtr)).FerrorCode != 0 {
		(*Tcl_Obj)(unsafe.Pointer((*InterpState)(unsafe.Pointer(statePtr)).FerrorCode)).FrefCount++
	}
	(*InterpState)(unsafe.Pointer(statePtr)).FreturnOpts = (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts
	if (*InterpState)(unsafe.Pointer(statePtr)).FreturnOpts != 0 {
		(*Tcl_Obj)(unsafe.Pointer((*InterpState)(unsafe.Pointer(statePtr)).FreturnOpts)).FrefCount++
	}
	if (*InterpState)(unsafe.Pointer(statePtr)).FerrorStack != 0 {
		(*Tcl_Obj)(unsafe.Pointer((*InterpState)(unsafe.Pointer(statePtr)).FerrorStack)).FrefCount++
	}
	(*InterpState)(unsafe.Pointer(statePtr)).FobjResult = XTcl_GetObjResult(tls, interp)
	(*Tcl_Obj)(unsafe.Pointer((*InterpState)(unsafe.Pointer(statePtr)).FobjResult)).FrefCount++
	return statePtr
}

//----------------------------------------------------------------------
//
// Tcl_RestoreInterpState --
//
//	Accepts an interp and a token previously returned by
//	Tcl_SaveInterpState. Restore the state of the interp to what it was at
//	the time of the Tcl_SaveInterpState call.
//
// Results:
//	Returns the status value originally passed in to Tcl_SaveInterpState.
//
// Side effects:
//	Restores the interp state and frees memory held by token.
//
//----------------------------------------------------------------------

func XTcl_RestoreInterpState(tls *libc.TLS, interp uintptr, state Tcl_InterpState) int32 { /* tclResult.c:125:1: */
	var iPtr uintptr = interp
	var statePtr uintptr = state
	var status int32 = (*InterpState)(unsafe.Pointer(statePtr)).Fstatus

	*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED)
	*(*int32)(unsafe.Pointer(iPtr + 424)) |= (*InterpState)(unsafe.Pointer(statePtr)).Fflags & ERR_ALREADY_LOGGED

	(*Interp)(unsafe.Pointer(iPtr)).FreturnLevel = (*InterpState)(unsafe.Pointer(statePtr)).FreturnLevel
	(*Interp)(unsafe.Pointer(iPtr)).FreturnCode = (*InterpState)(unsafe.Pointer(statePtr)).FreturnCode
	(*Interp)(unsafe.Pointer(iPtr)).FresetErrorStack = (*InterpState)(unsafe.Pointer(statePtr)).FresetErrorStack
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo = (*InterpState)(unsafe.Pointer(statePtr)).FerrorInfo
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo != 0 {
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorInfo)).FrefCount++
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorCode != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorCode
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FerrorCode = (*InterpState)(unsafe.Pointer(statePtr)).FerrorCode
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorCode != 0 {
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorCode)).FrefCount++
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorStack != 0 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorStack
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FerrorStack = (*InterpState)(unsafe.Pointer(statePtr)).FerrorStack
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorStack != 0 {
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorStack)).FrefCount++
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts != 0 {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FreturnOpts = (*InterpState)(unsafe.Pointer(statePtr)).FreturnOpts
	if (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts != 0 {
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FreturnOpts)).FrefCount++
	}
	XTcl_SetObjResult(tls, interp, (*InterpState)(unsafe.Pointer(statePtr)).FobjResult)
	XTcl_DiscardInterpState(tls, state)
	return status
}

//----------------------------------------------------------------------
//
// Tcl_DiscardInterpState --
//
//	Accepts a token previously returned by Tcl_SaveInterpState. Frees the
//	memory it uses.
//
// Results:
//	None.
//
// Side effects:
//	Frees memory.
//
//----------------------------------------------------------------------

func XTcl_DiscardInterpState(tls *libc.TLS, state Tcl_InterpState) { /* tclResult.c:190:1: */
	var statePtr uintptr = state

	if (*InterpState)(unsafe.Pointer(statePtr)).FerrorInfo != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*InterpState)(unsafe.Pointer(statePtr)).FerrorInfo
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*InterpState)(unsafe.Pointer(statePtr)).FerrorCode != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*InterpState)(unsafe.Pointer(statePtr)).FerrorCode
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*InterpState)(unsafe.Pointer(statePtr)).FreturnOpts != 0 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = (*InterpState)(unsafe.Pointer(statePtr)).FreturnOpts
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*InterpState)(unsafe.Pointer(statePtr)).FerrorStack != 0 {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = (*InterpState)(unsafe.Pointer(statePtr)).FerrorStack
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	for ok4 := true; ok4; ok4 = 0 != 0 {
		var _objPtr uintptr = (*InterpState)(unsafe.Pointer(statePtr)).FobjResult
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTclpFree(tls, statePtr)
}

//----------------------------------------------------------------------
//
// Tcl_SaveResult --
//
//	Takes a snapshot of the current result state of the interpreter. The
//	snapshot can be restored at any point by Tcl_RestoreResult. Note that
//	this routine does not preserve the errorCode, errorInfo, or flags
//	fields so it should not be used if an error is in progress.
//
//	Once a snapshot is saved, it must be restored by calling
//	Tcl_RestoreResult, or discarded by calling Tcl_DiscardResult.
//
// Results:
//	None.
//
// Side effects:
//	Resets the interpreter result.
//
//----------------------------------------------------------------------

func XTcl_SaveResult(tls *libc.TLS, interp uintptr, statePtr uintptr) { /* tclResult.c:235:1: */
	var iPtr uintptr = interp

	// Move the result object into the save state. Note that we don't need to
	// change its refcount because we're moving it, not adding a new
	// reference. Put an empty object into the interpreter.

	(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr = (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr
	(*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr = XTcl_NewObj(tls)
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).FrefCount++

	// Save the string result.

	(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FfreeProc = (*Interp)(unsafe.Pointer(iPtr)).FfreeProc
	if (*Interp)(unsafe.Pointer(iPtr)).Fresult == iPtr+464 {
		// Copy the static string data out of the interp buffer.

		(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult = statePtr + 40 /* &.resultSpace */
		libc.Xstrcpy(tls, (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
		(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendResult = uintptr(0)
	} else if (*Interp)(unsafe.Pointer(iPtr)).Fresult == (*Interp)(unsafe.Pointer(iPtr)).FappendResult {
		// Move the append buffer out of the interp.

		(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendResult = (*Interp)(unsafe.Pointer(iPtr)).FappendResult
		(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendAvl = (*Interp)(unsafe.Pointer(iPtr)).FappendAvl
		(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendUsed = (*Interp)(unsafe.Pointer(iPtr)).FappendUsed
		(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult = (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendResult
		(*Interp)(unsafe.Pointer(iPtr)).FappendResult = uintptr(0)
		(*Interp)(unsafe.Pointer(iPtr)).FappendAvl = 0
		(*Interp)(unsafe.Pointer(iPtr)).FappendUsed = 0
	} else {
		// Move the dynamic or static string out of the interpreter.

		(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult = (*Interp)(unsafe.Pointer(iPtr)).Fresult
		(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendResult = uintptr(0)
	}

	(*Interp)(unsafe.Pointer(iPtr)).Fresult = iPtr + 464 /* &.resultSpace */
	*(*int8)(unsafe.Pointer(iPtr + 464)) = int8(0)
	(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_RestoreResult --
//
//	Restores the state of the interpreter to a snapshot taken by
//	Tcl_SaveResult. After this call, the token for the interpreter state
//	is no longer valid.
//
// Results:
//	None.
//
// Side effects:
//	Restores the interpreter result.
//
//----------------------------------------------------------------------

func XTcl_RestoreResult(tls *libc.TLS, interp uintptr, statePtr uintptr) { /* tclResult.c:310:1: */
	var iPtr uintptr = interp

	XTcl_ResetResult(tls, interp)

	// Restore the string result.

	(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FfreeProc
	if (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult == statePtr+40 {
		// Copy the static string data into the interp buffer.

		(*Interp)(unsafe.Pointer(iPtr)).Fresult = iPtr + 464 /* &.resultSpace */
		libc.Xstrcpy(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult, (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult)
	} else if (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult == (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendResult {
		// Move the append buffer back into the interp.

		if (*Interp)(unsafe.Pointer(iPtr)).FappendResult != uintptr(0) {
			XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FappendResult)
		}

		(*Interp)(unsafe.Pointer(iPtr)).FappendResult = (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendResult
		(*Interp)(unsafe.Pointer(iPtr)).FappendAvl = (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendAvl
		(*Interp)(unsafe.Pointer(iPtr)).FappendUsed = (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendUsed
		(*Interp)(unsafe.Pointer(iPtr)).Fresult = (*Interp)(unsafe.Pointer(iPtr)).FappendResult
	} else {
		// Move the dynamic or static string back into the interpreter.

		(*Interp)(unsafe.Pointer(iPtr)).Fresult = (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult
	}

	// Restore the object result.

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr = (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr
}

//----------------------------------------------------------------------
//
// Tcl_DiscardResult --
//
//	Frees the memory associated with an interpreter snapshot taken by
//	Tcl_SaveResult. If the snapshot is not restored, this function must be
//	called to discard it, or the memory will be lost.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_DiscardResult(tls *libc.TLS, statePtr uintptr) { /* tclResult.c:379:1: */
	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer((*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer((*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer((*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer((*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr + 32)) = XtclFreeObjList
				XtclFreeObjList = (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr
			}
		} else {
			XTclFreeObj(tls, (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FobjResultPtr)
		}
	}

	if (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult == (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendResult {
		XTclpFree(tls, (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FappendResult)
	} else if (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FfreeProc == uintptr(3) {
		XTclpFree(tls, (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult)
	} else if (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FfreeProc != 0 {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_SavedResult)(unsafe.Pointer(statePtr)).FfreeProc})).f(tls, (*Tcl_SavedResult)(unsafe.Pointer(statePtr)).Fresult)
	}
}

//----------------------------------------------------------------------
//
// Tcl_SetResult --
//
//	Arrange for "result" to be the Tcl return value.
//
// Results:
//	None.
//
// Side effects:
//	interp->result is left pointing either to "result" or to a copy of it.
//	Also, the object result is reset.
//
//----------------------------------------------------------------------

func XTcl_SetResult(tls *libc.TLS, interp uintptr, result uintptr, freeProc uintptr) { /* tclResult.c:411:1: */
	var iPtr uintptr = interp
	var oldFreeProc uintptr = (*Interp)(unsafe.Pointer(iPtr)).FfreeProc
	var oldResult uintptr = (*Interp)(unsafe.Pointer(iPtr)).Fresult

	if result == uintptr(0) {
		*(*int8)(unsafe.Pointer(iPtr + 464)) = int8(0)
		(*Interp)(unsafe.Pointer(iPtr)).Fresult = iPtr + 464 /* &.resultSpace */
		(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
	} else if freeProc == uintptr(1) {
		var length int32 = int32(libc.Xstrlen(tls, result))

		if length > TCL_RESULT_SIZE {
			(*Interp)(unsafe.Pointer(iPtr)).Fresult = XTcl_Alloc(tls, uint32(length+1))
			(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(3)
		} else {
			(*Interp)(unsafe.Pointer(iPtr)).Fresult = iPtr + 464 /* &.resultSpace */
			(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
		}
		libc.Xmemcpy(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult, result, uint64(length+1))
	} else {
		(*Interp)(unsafe.Pointer(iPtr)).Fresult = result
		(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = freeProc
	}

	// If the old result was dynamically-allocated, free it up. Do it here,
	// rather than at the beginning, in case the new result value was part of
	// the old result value.

	if oldFreeProc != uintptr(0) {
		if oldFreeProc == uintptr(3) {
			XTclpFree(tls, oldResult)
		} else {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{oldFreeProc})).f(tls, oldResult)
		}
	}

	// Reset the object result since we just set the string result.

	sResetObjResult(tls, iPtr)
}

//----------------------------------------------------------------------
//
// Tcl_GetStringResult --
//
//	Returns an interpreter's result value as a string.
//
// Results:
//	The interpreter's result as a string.
//
// Side effects:
//	If the string result is empty, the object result is moved to the
//	string result, then the object result is reset.
//
//----------------------------------------------------------------------

func XTcl_GetStringResult(tls *libc.TLS, interp uintptr) uintptr { /* tclResult.c:482:12: */
	// If the string result is empty, move the object result to the string
	// result, then reset the object result.

	var iPtr uintptr = interp

	if int32(*(*int8)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).Fresult))) == 0 {
		XTcl_SetResult(tls, interp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(XTcl_GetObjResult(tls, interp))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(XTcl_GetObjResult(tls, interp))).Fbytes
			}
			return XTcl_GetString(tls, XTcl_GetObjResult(tls, interp))
		}(),
			uintptr(1))
	}
	return (*Interp)(unsafe.Pointer(iPtr)).Fresult
}

//----------------------------------------------------------------------
//
// Tcl_SetObjResult --
//
//	Arrange for objPtr to be an interpreter's result value.
//
// Results:
//	None.
//
// Side effects:
//	interp->objResultPtr is left pointing to the object referenced by
//	objPtr. The object's reference count is incremented since there is now
//	a new reference to it. The reference count for any old objResultPtr
//	value is decremented. Also, the string result is reset.
//
//----------------------------------------------------------------------

func XTcl_SetObjResult(tls *libc.TLS, interp uintptr, objPtr uintptr) { /* tclResult.c:520:1: */
	var iPtr uintptr = interp
	var oldObjResult uintptr = (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr

	(*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++ // since interp result is a reference

	// We wait until the end to release the old object result, in case we are
	// setting the result to itself.

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldObjResult)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(oldObjResult)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldObjResult)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(oldObjResult)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldObjResult)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldObjResult)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(oldObjResult)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(oldObjResult + 32)) = XtclFreeObjList
				XtclFreeObjList = oldObjResult
			}
		} else {
			XTclFreeObj(tls, oldObjResult)
		}
	}

	// Reset the string result since we just set the result object.

	if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc != uintptr(0) {
		if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc == uintptr(3) {
			XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
		} else {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Interp)(unsafe.Pointer(iPtr)).FfreeProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
		}
		(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
	}
	(*Interp)(unsafe.Pointer(iPtr)).Fresult = iPtr + 464 /* &.resultSpace */
	*(*int8)(unsafe.Pointer(iPtr + 464)) = int8(0)
}

//----------------------------------------------------------------------
//
// Tcl_GetObjResult --
//
//	Returns an interpreter's result value as a Tcl object. The object's
//	reference count is not modified; the caller must do that if it needs
//	to hold on to a long-term reference to it.
//
// Results:
//	The interpreter's result as an object.
//
// Side effects:
//	If the interpreter has a non-empty string result, the result object is
//	either empty or stale because some function set interp->result
//	directly. If so, the string result is moved to the result object then
//	the string result is reset.
//
//----------------------------------------------------------------------

func XTcl_GetObjResult(tls *libc.TLS, interp uintptr) uintptr { /* tclResult.c:576:9: */
	var iPtr uintptr = interp
	var objResultPtr uintptr
	var length int32

	// If the string result is non-empty, move the string result to the object
	// result, then reset the string result.

	if int32(*(*int8)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).Fresult))) != 0 {
		sResetObjResult(tls, iPtr)

		objResultPtr = (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr
		length = int32(libc.Xstrlen(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult))
		if length == 0 {
			(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = XTcl_Alloc(tls, uint32(length+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes, (*Interp)(unsafe.Pointer(iPtr)).Fresult, uint64(length))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes + uintptr(length))) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Flength = length
		}

		if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc != uintptr(0) {
			if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc == uintptr(3) {
				XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
			} else {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Interp)(unsafe.Pointer(iPtr)).FfreeProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
			}
			(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
		}
		(*Interp)(unsafe.Pointer(iPtr)).Fresult = iPtr + 464 /* &.resultSpace */
		*(*int8)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).Fresult)) = int8(0)
	}
	return (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr
}

//----------------------------------------------------------------------
//
// Tcl_AppendResultVA --
//
//	Append a variable number of strings onto the interpreter's result.
//
// Results:
//	None.
//
// Side effects:
//	The result of the interpreter given by the first argument is extended
//	by the strings in the va_list (up to a terminating NULL argument).
//
//	If the string result is non-empty, the object result forced to be a
//	duplicate of it first. There will be a string result afterwards.
//
//----------------------------------------------------------------------

func XTcl_AppendResultVA(tls *libc.TLS, interp uintptr, argList Va_list) { /* tclResult.c:631:1: */
	var objPtr uintptr = XTcl_GetObjResult(tls, interp)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		objPtr = XTcl_DuplicateObj(tls, objPtr)
	}
	XTcl_AppendStringsToObjVA(tls, objPtr, argList)
	XTcl_SetObjResult(tls, interp, objPtr)

	// Strictly we should call Tcl_GetStringResult(interp) here to make sure
	// that interp->result is correct according to the old contract, but that
	// makes the performance of much code (e.g. in Tk) absolutely awful. So we
	// leave it out; code that really wants interp->result can just insert the
	// calls to Tcl_GetStringResult() itself. [Patch 1041072 discussion]

}

//----------------------------------------------------------------------
//
// Tcl_AppendResult --
//
//	Append a variable number of strings onto the interpreter's result.
//
// Results:
//	None.
//
// Side effects:
//	The result of the interpreter given by the first argument is extended
//	by the strings given by the second and following arguments (up to a
//	terminating NULL argument).
//
//	If the string result is non-empty, the object result forced to be a
//	duplicate of it first. There will be a string result afterwards.
//
//----------------------------------------------------------------------

func XTcl_AppendResult(tls *libc.TLS, interp uintptr, va uintptr) { /* tclResult.c:684:1: */
	var argList Va_list
	_ = argList

	argList = va
	XTcl_AppendResultVA(tls, interp, argList)
	_ = argList
}

//----------------------------------------------------------------------
//
// Tcl_AppendElement --
//
//	Convert a string to a valid Tcl list element and append it to the
//	result (which is ostensibly a list).
//
// Results:
//	None.
//
// Side effects:
//	The result in the interpreter given by the first argument is extended
//	with a list element converted from string. A separator space is added
//	before the converted list element unless the current result is empty,
//	contains the single character "{", or ends in " {".
//
//	If the string result is empty, the object result is moved to the
//	string result, then the object result is reset.
//
//----------------------------------------------------------------------

func XTcl_AppendElement(tls *libc.TLS, interp uintptr, element uintptr) { /* tclResult.c:718:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	var dst uintptr
	var size int32
	// var flags int32 at bp, 4

	var quoteHash int32 = 1

	// If the string result is empty, move the object result to the string
	// result, then reset the object result.

	XTcl_GetStringResult(tls, interp)

	// See how much space is needed, and grow the append buffer if needed to
	// accommodate the list element.

	size = XTcl_ScanElement(tls, element, bp) + 1
	if (*Interp)(unsafe.Pointer(iPtr)).Fresult != (*Interp)(unsafe.Pointer(iPtr)).FappendResult ||
		int32(*(*int8)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FappendResult + uintptr((*Interp)(unsafe.Pointer(iPtr)).FappendUsed)))) != 0 ||
		size+(*Interp)(unsafe.Pointer(iPtr)).FappendUsed >= (*Interp)(unsafe.Pointer(iPtr)).FappendAvl {
		sSetupAppendBuffer(tls, iPtr, size+(*Interp)(unsafe.Pointer(iPtr)).FappendUsed)
	}

	// Convert the string into a list element and copy it to the buffer that's
	// forming, with a space separator if needed.

	dst = (*Interp)(unsafe.Pointer(iPtr)).FappendResult + uintptr((*Interp)(unsafe.Pointer(iPtr)).FappendUsed)
	if XTclNeedSpace(tls, (*Interp)(unsafe.Pointer(iPtr)).FappendResult, dst) != 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FappendUsed++
		*(*int8)(unsafe.Pointer(dst)) = int8(' ')
		dst++

		// If we need a space to separate this element from preceding stuff,
		// then this element will not lead a list, and need not have it's
		// leading '#' quoted.
		quoteHash = 0
	} else {
		for libc.PreDecUintptr(&dst, 1) >= (*Interp)(unsafe.Pointer(iPtr)).FappendResult && func() int32 {
			if int32(*(*int8)(unsafe.Pointer(dst))) > 0x20 {
				return 0
			}
			return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(dst))))
		}() != 0 {
		}
		quoteHash = libc.BoolInt32(!(XTclNeedSpace(tls, (*Interp)(unsafe.Pointer(iPtr)).FappendResult, dst+uintptr(1)) != 0))
	}
	dst = (*Interp)(unsafe.Pointer(iPtr)).FappendResult + uintptr((*Interp)(unsafe.Pointer(iPtr)).FappendUsed)
	if !(quoteHash != 0) {
		*(*int32)(unsafe.Pointer(bp /* flags */)) |= TCL_DONT_QUOTE_HASH
	}

	*(*int32)(unsafe.Pointer(iPtr + 220)) += XTcl_ConvertElement(tls, element, dst, *(*int32)(unsafe.Pointer(bp)))
}

//----------------------------------------------------------------------
//
// SetupAppendBuffer --
//
//	This function makes sure that there is an append buffer properly
//	initialized, if necessary, from the interpreter's result, and that it
//	has at least enough room to accommodate newSpace new bytes of
//	information.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSetupAppendBuffer(tls *libc.TLS, iPtr uintptr, newSpace int32) { /* tclResult.c:799:1: */
	var totalSpace int32

	// Make the append buffer larger, if that's necessary, then copy the
	// result into the append buffer and make the append buffer the official
	// Tcl result.

	if (*Interp)(unsafe.Pointer(iPtr)).Fresult != (*Interp)(unsafe.Pointer(iPtr)).FappendResult {
		// If an oversized buffer was used recently, then free it up so we go
		// back to a smaller buffer. This avoids tying up memory forever after
		// a large operation.

		if (*Interp)(unsafe.Pointer(iPtr)).FappendAvl > 500 {
			XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FappendResult)
			(*Interp)(unsafe.Pointer(iPtr)).FappendResult = uintptr(0)
			(*Interp)(unsafe.Pointer(iPtr)).FappendAvl = 0
		}
		(*Interp)(unsafe.Pointer(iPtr)).FappendUsed = int32(libc.Xstrlen(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult))
	} else if int32(*(*int8)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).Fresult + uintptr((*Interp)(unsafe.Pointer(iPtr)).FappendUsed)))) != 0 {
		// Most likely someone has modified a result created by
		// Tcl_AppendResult et al. so that it has a different size. Just
		// recompute the size.

		(*Interp)(unsafe.Pointer(iPtr)).FappendUsed = int32(libc.Xstrlen(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult))
	}

	totalSpace = newSpace + (*Interp)(unsafe.Pointer(iPtr)).FappendUsed
	if totalSpace >= (*Interp)(unsafe.Pointer(iPtr)).FappendAvl {
		var new uintptr

		if totalSpace < 100 {
			totalSpace = 200
		} else {
			totalSpace = totalSpace * 2
		}
		new = XTcl_Alloc(tls, uint32(totalSpace))
		libc.Xstrcpy(tls, new, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
		if (*Interp)(unsafe.Pointer(iPtr)).FappendResult != uintptr(0) {
			XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).FappendResult)
		}
		(*Interp)(unsafe.Pointer(iPtr)).FappendResult = new
		(*Interp)(unsafe.Pointer(iPtr)).FappendAvl = totalSpace
	} else if (*Interp)(unsafe.Pointer(iPtr)).Fresult != (*Interp)(unsafe.Pointer(iPtr)).FappendResult {
		libc.Xstrcpy(tls, (*Interp)(unsafe.Pointer(iPtr)).FappendResult, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
	}

	XTcl_FreeResult(tls, iPtr)
	(*Interp)(unsafe.Pointer(iPtr)).Fresult = (*Interp)(unsafe.Pointer(iPtr)).FappendResult
}

//----------------------------------------------------------------------
//
// Tcl_FreeResult --
//
//	This function frees up the memory associated with an interpreter's
//	string result. It also resets the interpreter's result object.
//	Tcl_FreeResult is most commonly used when a function is about to
//	replace one result value with another.
//
// Results:
//	None.
//
// Side effects:
//	Frees the memory associated with interp's string result and sets
//	interp->freeProc to zero, but does not change interp->result or clear
//	error state. Resets interp's result object to an unshared empty
//	object.
//
//----------------------------------------------------------------------

func XTcl_FreeResult(tls *libc.TLS, interp uintptr) { /* tclResult.c:882:1: */
	var iPtr uintptr = interp

	if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc != uintptr(0) {
		if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc == uintptr(3) {
			XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
		} else {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Interp)(unsafe.Pointer(iPtr)).FfreeProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
		}
		(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
	}

	sResetObjResult(tls, iPtr)
}

//----------------------------------------------------------------------
//
// Tcl_ResetResult --
//
//	This function resets both the interpreter's string and object results.
//
// Results:
//	None.
//
// Side effects:
//	It resets the result object to an unshared empty object. It then
//	restores the interpreter's string result area to its default
//	initialized state, freeing up any memory that may have been allocated.
//	It also clears any error information for the interpreter.
//
//----------------------------------------------------------------------

func XTcl_ResetResult(tls *libc.TLS, interp uintptr) { /* tclResult.c:919:1: */
	var iPtr uintptr = interp

	sResetObjResult(tls, iPtr)
	if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc != uintptr(0) {
		if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc == uintptr(3) {
			XTclpFree(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
		} else {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Interp)(unsafe.Pointer(iPtr)).FfreeProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
		}
		(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
	}
	(*Interp)(unsafe.Pointer(iPtr)).Fresult = iPtr + 464 /* &.resultSpace */
	*(*int8)(unsafe.Pointer(iPtr + 464)) = int8(0)
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorCode != 0 {
		// Legacy support
		if (*Interp)(unsafe.Pointer(iPtr)).Fflags&ERR_LEGACY_COPY != 0 {
			XTcl_ObjSetVar2(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FecVar, uintptr(0),
				(*Interp)(unsafe.Pointer(iPtr)).FerrorCode, TCL_GLOBAL_ONLY)
		}
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorCode
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FerrorCode = uintptr(0)
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo != 0 {
		// Legacy support
		if (*Interp)(unsafe.Pointer(iPtr)).Fflags&ERR_LEGACY_COPY != 0 {
			XTcl_ObjSetVar2(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FeiVar, uintptr(0),
				(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo, TCL_GLOBAL_ONLY)
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo = uintptr(0)
	}
	(*Interp)(unsafe.Pointer(iPtr)).FresetErrorStack = 1
	(*Interp)(unsafe.Pointer(iPtr)).FreturnLevel = 1
	(*Interp)(unsafe.Pointer(iPtr)).FreturnCode = TCL_OK
	if (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts != 0 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FreturnOpts = uintptr(0)
	}
	*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED | ERR_LEGACY_COPY)
}

//----------------------------------------------------------------------
//
// ResetObjResult --
//
//	Function used to reset an interpreter's Tcl result object.
//
// Results:
//	None.
//
// Side effects:
//	Resets the interpreter's result object to an unshared empty string
//	object with ref count one. It does not clear any error information in
//	the interpreter.
//
//----------------------------------------------------------------------

func sResetObjResult(tls *libc.TLS, iPtr uintptr) { /* tclResult.c:982:1: */
	var objResultPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr

	if (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount > 1 {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(objResultPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = objResultPtr
				}
			} else {
				XTclFreeObj(tls, objResultPtr)
			}
		}

		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			objResultPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(0)
		{
		}

		(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FrefCount++
		(*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr = objResultPtr
	} else {
		if (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes != XtclEmptyStringRep {
			if (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes != 0 {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).Flength = 0
		}
		if (*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objResultPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objResultPtr)).FtypePtr = uintptr(0)
		}

	}
}

//----------------------------------------------------------------------
//
// Tcl_SetErrorCodeVA --
//
//	This function is called to record machine-readable information about
//	an error that is about to be returned.
//
// Results:
//	None.
//
// Side effects:
//	The errorCode field of the interp is modified to hold all of the
//	arguments to this function, in a list form with each argument becoming
//	one element of the list.
//
//----------------------------------------------------------------------

func XTcl_SetErrorCodeVA(tls *libc.TLS, interp uintptr, argList Va_list) { /* tclResult.c:1025:1: */
	var errorObj uintptr = XTcl_NewObj(tls)

	// Scan through the arguments one at a time, appending them to the
	// errorCode field as list elements.

	for 1 != 0 {
		var elem uintptr = libc.VaUintptr(&argList)

		if elem == uintptr(0) {
			break
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), errorObj, XTcl_NewStringObj(tls, elem, -1))
	}
	XTcl_SetObjErrorCode(tls, interp, errorObj)
}

//----------------------------------------------------------------------
//
// Tcl_SetErrorCode --
//
//	This function is called to record machine-readable information about
//	an error that is about to be returned.
//
// Results:
//	None.
//
// Side effects:
//	The errorCode field of the interp is modified to hold all of the
//	arguments to this function, in a list form with each argument becoming
//	one element of the list.
//
//----------------------------------------------------------------------

func XTcl_SetErrorCode(tls *libc.TLS, interp uintptr, va uintptr) { /* tclResult.c:1067:1: */
	var argList Va_list
	_ = argList

	// Scan through the arguments one at a time, appending them to the
	// errorCode field as list elements.

	argList = va
	XTcl_SetErrorCodeVA(tls, interp, argList)
	_ = argList
}

//----------------------------------------------------------------------
//
// Tcl_SetObjErrorCode --
//
//	This function is called to record machine-readable information about
//	an error that is about to be returned. The caller should build a list
//	object up and pass it to this routine.
//
// Results:
//	None.
//
// Side effects:
//	The errorCode field of the interp is set to the new value.
//
//----------------------------------------------------------------------

func XTcl_SetObjErrorCode(tls *libc.TLS, interp uintptr, errorObjPtr uintptr) { /* tclResult.c:1101:1: */
	var iPtr uintptr = interp

	if (*Interp)(unsafe.Pointer(iPtr)).FerrorCode != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorCode
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FerrorCode = errorObjPtr
	(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorCode)).FrefCount++
}

//----------------------------------------------------------------------
//
// Tcl_GetErrorLine --
//
//      Returns the line number associated with the current error.
//
//----------------------------------------------------------------------

func XTcl_GetErrorLine(tls *libc.TLS, interp uintptr) int32 { /* tclResult.c:1126:1: */
	return (*Interp)(unsafe.Pointer(interp)).FerrorLine
}

//----------------------------------------------------------------------
//
// Tcl_SetErrorLine --
//
//      Sets the line number associated with the current error.
//
//----------------------------------------------------------------------

func XTcl_SetErrorLine(tls *libc.TLS, interp uintptr, value int32) { /* tclResult.c:1144:1: */
	(*Interp)(unsafe.Pointer(interp)).FerrorLine = value
}

//----------------------------------------------------------------------
//
// GetKeys --
//
//	Returns a Tcl_Obj * array of the standard keys used in the return
//	options dictionary.
//
//	Broadly sharing one copy of these key values helps with both memory
//	efficiency and dictionary lookup times.
//
// Results:
//	A Tcl_Obj * array.
//
// Side effects:
//	First time called in a thread, creates the keys (allocating memory)
//	and arranges for their cleanup at thread exit.
//
//----------------------------------------------------------------------

func sGetKeys(tls *libc.TLS) uintptr { /* tclResult.c:1172:16: */
	var keys uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&returnKeysKey)),
		int32(KEY_LAST*uint64(unsafe.Sizeof(uintptr(0)))))

	if *(*uintptr)(unsafe.Pointer(keys)) == uintptr(0) {
		// First call in this thread, create the keys...

		var i int32

		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(keys)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys)))).Fbytes, ts+27971, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys)))).Fbytes + 5)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys)))).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys)))).FtypePtr = uintptr(0)
			{
			}
		}
		for ok2 := true; ok2; ok2 = 0 != 0 {
			for ok3 := true; ok3; ok3 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(keys + 1*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 1*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 1*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 1*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 1*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 1*8)))).Fbytes, ts+12571, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 1*8)))).Fbytes + 10)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 1*8)))).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 1*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		for ok4 := true; ok4; ok4 = 0 != 0 {
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(keys + 2*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 2*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 2*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 2*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 2*8)))).Fbytes, ts+12560, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 2*8)))).Fbytes + 10)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 2*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		for ok6 := true; ok6; ok6 = 0 != 0 {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(keys + 3*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 3*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 3*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 3*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 3*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 3*8)))).Fbytes, ts+61998, uint64(int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 3*8)))).Fbytes + 10)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 3*8)))).Flength = int32(uint64(unsafe.Sizeof([11]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 3*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		for ok8 := true; ok8; ok8 = 0 != 0 {
			for ok9 := true; ok9; ok9 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(keys + 6*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 6*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 6*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 6*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 6*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 6*8)))).Fbytes, ts+62009, uint64(int32(uint64(unsafe.Sizeof([12]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 6*8)))).Fbytes + 11)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 6*8)))).Flength = int32(uint64(unsafe.Sizeof([12]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 6*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		for ok10 := true; ok10; ok10 = 0 != 0 {
			for ok11 := true; ok11; ok11 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(keys + 4*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 4*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 4*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 4*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 4*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 4*8)))).Fbytes, ts+27933, uint64(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 4*8)))).Fbytes + 6)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 4*8)))).Flength = int32(uint64(unsafe.Sizeof([7]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 4*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		for ok12 := true; ok12; ok12 = 0 != 0 {
			for ok13 := true; ok13; ok13 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(keys + 5*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).Fbytes, ts+19376, uint64(int32(uint64(unsafe.Sizeof([9]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).Fbytes + 8)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).Flength = int32(uint64(unsafe.Sizeof([9]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).FtypePtr = uintptr(0)
			{
			}
		}

		for i = KEY_CODE; i < KEY_LAST; i++ {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + uintptr(i)*8)))).FrefCount++
		}

		// ... and arrange for their clenaup.

		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sReleaseKeys})), keys)
	}
	return keys
}

var returnKeysKey Tcl_ThreadDataKey /* tclResult.c:1175:30: */

//----------------------------------------------------------------------
//
// ReleaseKeys --
//
//	Called as a thread exit handler to cleanup return options dictionary
//	keys.
//
// Results:
//	None.
//
// Side effects:
//	Frees memory.
//
//----------------------------------------------------------------------

func sReleaseKeys(tls *libc.TLS, clientData ClientData) { /* tclResult.c:1225:1: */
	var keys uintptr = clientData
	var i int32

	for i = KEY_CODE; i < KEY_LAST; i++ {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = *(*uintptr)(unsafe.Pointer(keys + uintptr(i)*8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		*(*uintptr)(unsafe.Pointer(keys + uintptr(i)*8)) = uintptr(0)
	}
}

//----------------------------------------------------------------------
//
// TclProcessReturn --
//
//	Does the work of the [return] command based on the code, level, and
//	returnOpts arguments. Note that the code argument must agree with the
//	-code entry in returnOpts and the level argument must agree with the
//	-level entry in returnOpts, as is the case for values returned from
//	TclMergeReturnOptions.
//
// Results:
//	Returns the return code the [return] command should return.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclProcessReturn(tls *libc.TLS, interp uintptr, code int32, level int32, returnOpts uintptr) int32 { /* tclResult.c:1258:1: */
	bp := tls.Alloc(44)
	defer tls.Free(44)

	var iPtr uintptr = interp
	// var valuePtr uintptr at bp+16, 8

	var keys uintptr = sGetKeys(tls)

	// Store the merged return options.

	if (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts != returnOpts {
		if (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts != 0 {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		(*Interp)(unsafe.Pointer(iPtr)).FreturnOpts = returnOpts
		(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FreturnOpts)).FrefCount++
	}

	if code == TCL_ERROR {
		if (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo = uintptr(0)
		}
		XTcl_DictObjGet(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts, *(*uintptr)(unsafe.Pointer(keys + 2*8)),
			bp+16)
		if *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
			// var infoLen int32 at bp+24, 4

			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes != 0 {
				*(*int32)(unsafe.Pointer(bp + 24)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Flength
				_ = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fbytes
			} else {
				XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+24)
			}
			if *(*int32)(unsafe.Pointer(bp + 24)) != 0 {
				(*Interp)(unsafe.Pointer(iPtr)).FerrorInfo = *(*uintptr)(unsafe.Pointer(bp + 16 /* valuePtr */))
				(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorInfo)).FrefCount++
				*(*int32)(unsafe.Pointer(iPtr + 424)) |= ERR_ALREADY_LOGGED
			}
		}
		XTcl_DictObjGet(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts, *(*uintptr)(unsafe.Pointer(keys + 6*8)),
			bp+16)
		if *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
			// var len int32 at bp+40, 4

			// var valueObjc int32 at bp+28, 4

			// var valueObjv uintptr at bp+32, 8

			if (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FerrorStack)).FrefCount > 1 {
				var newObj uintptr

				newObj = XTcl_DuplicateObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack)
				for ok2 := true; ok2; ok2 = 0 != 0 {
					var _objPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FerrorStack
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				(*Tcl_Obj)(unsafe.Pointer(newObj)).FrefCount++
				(*Interp)(unsafe.Pointer(iPtr)).FerrorStack = newObj
			}

			// List extraction done after duplication to avoid moving the rug
			// if someone does [return -errorstack [info errorstack]]

			if XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+28,
				bp+32) == TCL_ERROR {
				return TCL_ERROR
			}
			(*Interp)(unsafe.Pointer(iPtr)).FresetErrorStack = 0
			XTcl_ListObjLength(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, bp+40)

			// Reset while keeping the list internalrep as much as possible.

			XTcl_ListObjReplace(tls, interp, (*Interp)(unsafe.Pointer(iPtr)).FerrorStack, 0, *(*int32)(unsafe.Pointer(bp + 40 /* len */)), *(*int32)(unsafe.Pointer(bp + 28 /* valueObjc */)),
				*(*uintptr)(unsafe.Pointer(bp + 32 /* valueObjv */)))
		}
		XTcl_DictObjGet(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts, *(*uintptr)(unsafe.Pointer(keys + 1*8)),
			bp+16)
		if *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
			XTcl_SetObjErrorCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 16 /* valuePtr */)))
		} else {
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+8740, uintptr(0)))
		}

		XTcl_DictObjGet(tls, uintptr(0), (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts, *(*uintptr)(unsafe.Pointer(keys + 3*8)),
			bp+16)
		if *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
				*(*int32)(unsafe.Pointer(iPtr + 16)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 32)))
			} else {
				XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 16)), iPtr+16)
			}
		}
	}
	if level != 0 {
		(*Interp)(unsafe.Pointer(iPtr)).FreturnLevel = level
		(*Interp)(unsafe.Pointer(iPtr)).FreturnCode = code
		return TCL_RETURN
	}
	if code == TCL_ERROR {
		*(*int32)(unsafe.Pointer(iPtr + 424)) |= ERR_LEGACY_COPY
	}
	return code
}

//----------------------------------------------------------------------
//
// TclMergeReturnOptions --
//
//	Parses, checks, and stores the options to the [return] command.
//
// Results:
//	Returns TCL_ERROR if any of the option values are invalid. Otherwise,
//	returns TCL_OK, and writes the returnOpts, code, and level values to
//	the pointers provided.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclMergeReturnOptions(tls *libc.TLS, interp uintptr, objc int32, objv uintptr, optionsPtrPtr uintptr, codePtr uintptr, levelPtr uintptr) int32 { /* tclResult.c:1375:1: */
	bp := tls.Alloc(276)
	defer tls.Free(276)

	// var code int32 at bp+260, 4

	// var level int32 at bp+264, 4

	// var valuePtr uintptr at bp+248, 8

	var returnOpts uintptr
	var keys uintptr
	// var search Tcl_DictSearch at bp+216, 24

	// var done int32 at bp+256, 4

	// var keyPtr uintptr at bp+240, 8

	var dict uintptr
	// var optLen int32 at bp+208, 4

	var opt uintptr
	// var compareLen int32 at bp+212, 4

	var compare uintptr
	// var length int32 at bp+268, 4

	// var length1 int32 at bp+272, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	*(*int32)(unsafe.Pointer(bp + 260 /* code */)) = TCL_OK
	*(*int32)(unsafe.Pointer(bp + 264 /* level */)) = 1
	returnOpts = XTcl_NewObj(tls)
	keys = sGetKeys(tls)

__1:
	if !(objc > 1) {
		goto __3
	}
	opt = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 208)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv)), bp+208)
	}()
	compare =
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(bp + 212)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).Flength
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keys + 5*8)))).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(keys + 5*8)), bp+212)
		}()

	if !(*(*int32)(unsafe.Pointer(bp + 208)) == *(*int32)(unsafe.Pointer(bp + 212)) && libc.Xmemcmp(tls, opt, compare, uint64(*(*int32)(unsafe.Pointer(bp + 208)))) == 0) {
		goto __4
	}
	*(*int32)(unsafe.Pointer(bp + 256 /* done */)) = 0
	dict = *(*uintptr)(unsafe.Pointer(objv + 1*8))

nestedOptions:
	if !(TCL_ERROR == XTcl_DictObjFirst(tls, uintptr(0), dict, bp+216,
		bp+240, bp+248, bp+256)) {
		goto __6
	}
	// Value is not a legal dictionary.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+62021,
		libc.VaList(bp, compare, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+39663, ts+62068,
		uintptr(0)))
	goto error
__6:
	;

__7:
	if !!(*(*int32)(unsafe.Pointer(bp + 256)) != 0) {
		goto __8
	}
	XTcl_DictObjPut(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(bp + 240 /* keyPtr */)), *(*uintptr)(unsafe.Pointer(bp + 248 /* valuePtr */)))
	XTcl_DictObjNext(tls, bp+216, bp+240, bp+248, bp+256)
	goto __7
__8:
	;

	XTcl_DictObjGet(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(keys + 5*8)), bp+248)
	if !(*(*uintptr)(unsafe.Pointer(bp + 248)) != uintptr(0)) {
		goto __9
	}
	dict = *(*uintptr)(unsafe.Pointer(bp + 248 /* valuePtr */))
	XTcl_DictObjRemove(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(keys + 5*8)))
	goto nestedOptions
__9:
	;

	goto __5
__4:
	XTcl_DictObjPut(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(objv)), *(*uintptr)(unsafe.Pointer(objv + 1*8)))
__5:
	;
	goto __2
__2:
	objv += 8 * uintptr(2)
	objc = objc - 2
	goto __1
	goto __3
__3:
	;

	// Check for bogus -code value.

	XTcl_DictObjGet(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(keys)), bp+248)
	if !(*(*uintptr)(unsafe.Pointer(bp + 248)) != uintptr(0)) {
		goto __10
	}
	if !(XTclGetCompletionCodeFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 248)),
		bp+260) == TCL_ERROR) {
		goto __11
	}
	goto error
__11:
	;
	XTcl_DictObjRemove(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(keys)))
__10:
	;

	// Check for bogus -level value.

	XTcl_DictObjGet(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(keys + 4*8)), bp+248)
	if !(*(*uintptr)(unsafe.Pointer(bp + 248)) != uintptr(0)) {
		goto __12
	}
	if !(TCL_ERROR == func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 264)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 248)), bp+264)
	}() ||
		*(*int32)(unsafe.Pointer(bp + 264)) < 0) {
		goto __13
	}
	// Value is not a legal level.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+62084, libc.VaList(bp+48, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 248)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+4178, ts+39663, ts+62145, uintptr(0)))
	goto error
__13:
	;
	XTcl_DictObjRemove(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(keys + 4*8)))
__12:
	;

	// Check for bogus -errorcode value.

	XTcl_DictObjGet(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(keys + 1*8)), bp+248)
	if !(*(*uintptr)(unsafe.Pointer(bp + 248)) != uintptr(0)) {
		goto __14
	}

	if !(TCL_ERROR == XTcl_ListObjLength(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 248)), bp+268)) {
		goto __15
	}
	// Value is not a list, which is illegal for -errorcode.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+62159,
		libc.VaList(bp+88, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 248)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+39663, ts+62210,
		uintptr(0)))
	goto error
__15:
	;
__14:
	;

	// Check for bogus -errorstack value.

	XTcl_DictObjGet(tls, uintptr(0), returnOpts, *(*uintptr)(unsafe.Pointer(keys + 6*8)), bp+248)
	if !(*(*uintptr)(unsafe.Pointer(bp + 248)) != uintptr(0)) {
		goto __16
	}

	if !(TCL_ERROR == XTcl_ListObjLength(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 248)), bp+272)) {
		goto __17
	}
	// Value is not a list, which is illegal for -errorstack.

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+62228,
		libc.VaList(bp+128, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 248)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+136, ts+4178, ts+39663, ts+62280,
		uintptr(0)))
	goto error
__17:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 272))%2 != 0) {
		goto __18
	}
	// Errorstack must always be an even-sized list

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+62299,
		libc.VaList(bp+168, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 248)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 248)))
		}())))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+176, ts+4178, ts+39663,
		ts+62346, uintptr(0)))
	goto error
__18:
	;
__16:
	;

	// Convert [return -code return -level X] to [return -code ok -level X+1]

	if !(*(*int32)(unsafe.Pointer(bp + 260)) == TCL_RETURN) {
		goto __19
	}
	*(*int32)(unsafe.Pointer(bp + 264 /* level */))++
	*(*int32)(unsafe.Pointer(bp + 260 /* code */)) = TCL_OK
__19:
	;

	if !(codePtr != uintptr(0)) {
		goto __20
	}
	*(*int32)(unsafe.Pointer(codePtr)) = *(*int32)(unsafe.Pointer(bp + 260 /* code */))
__20:
	;
	if !(levelPtr != uintptr(0)) {
		goto __21
	}
	*(*int32)(unsafe.Pointer(levelPtr)) = *(*int32)(unsafe.Pointer(bp + 264 /* level */))
__21:
	;

	if !(optionsPtrPtr == uintptr(0)) {
		goto __22
	}
	// Not passing back the options (?!), so clean them up.

__24:
	_objPtr = returnOpts
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __27
	}
	XTclFreeObj(tls, _objPtr)
__27:
	;
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	goto __23
__22:
	*(*uintptr)(unsafe.Pointer(optionsPtrPtr)) = returnOpts
__23:
	;
	return TCL_OK

error:
__28:
	_objPtr1 = returnOpts
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __31
	}
	XTclFreeObj(tls, _objPtr1)
__31:
	;
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	return TCL_ERROR
}

//-------------------------------------------------------------------------
//
// Tcl_GetReturnOptions --
//
//	Packs up the interp state into a dictionary of return options.
//
// Results:
//	A dictionary of return options.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func XTcl_GetReturnOptions(tls *libc.TLS, interp uintptr, result int32) uintptr { /* tclResult.c:1576:9: */
	var iPtr uintptr = interp
	var options uintptr
	var keys uintptr = sGetKeys(tls)

	if (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts != 0 {
		options = XTcl_DuplicateObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FreturnOpts)
	} else {
		options = XTcl_NewObj(tls)
	}

	if result == TCL_RETURN {
		XTcl_DictObjPut(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(keys)),
			XTcl_NewIntObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FreturnCode))
		XTcl_DictObjPut(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(keys + 4*8)),
			XTcl_NewIntObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FreturnLevel))
	} else {
		XTcl_DictObjPut(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(keys)),
			XTcl_NewIntObj(tls, result))
		XTcl_DictObjPut(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(keys + 4*8)),
			XTcl_NewIntObj(tls, 0))
	}

	if result == TCL_ERROR {
		XTcl_AddErrorInfo(tls, interp, ts+2631)
		XTcl_DictObjPut(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(keys + 6*8)), (*Interp)(unsafe.Pointer(iPtr)).FerrorStack)
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorCode != 0 {
		XTcl_DictObjPut(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(keys + 1*8)), (*Interp)(unsafe.Pointer(iPtr)).FerrorCode)
	}
	if (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo != 0 {
		XTcl_DictObjPut(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(keys + 2*8)), (*Interp)(unsafe.Pointer(iPtr)).FerrorInfo)
		XTcl_DictObjPut(tls, uintptr(0), options, *(*uintptr)(unsafe.Pointer(keys + 3*8)),
			XTcl_NewIntObj(tls, (*Interp)(unsafe.Pointer(iPtr)).FerrorLine))
	}
	return options
}

//-------------------------------------------------------------------------
//
// TclNoErrorStack --
//
//	Removes the -errorstack entry from an options dict to avoid reference
//	cycles.
//
// Results:
//	The (unshared) argument options dict, modified in -place.
//
//-------------------------------------------------------------------------

func XTclNoErrorStack(tls *libc.TLS, interp uintptr, options uintptr) uintptr { /* tclResult.c:1632:9: */
	var keys uintptr = sGetKeys(tls)

	XTcl_DictObjRemove(tls, interp, options, *(*uintptr)(unsafe.Pointer(keys + 6*8)))
	return options
}

//-------------------------------------------------------------------------
//
// Tcl_SetReturnOptions --
//
//	Accepts an interp and a dictionary of return options, and sets the
//	return options of the interp to match the dictionary.
//
// Results:
//	A standard status code. Usually TCL_OK, but TCL_ERROR if an invalid
//	option value was found in the dictionary. If a -level value of 0 is in
//	the dictionary, then the -code value in the dictionary will be
//	returned (TCL_OK default).
//
// Side effects:
//	Sets the state of the interp.
//
//-------------------------------------------------------------------------

func XTcl_SetReturnOptions(tls *libc.TLS, interp uintptr, options uintptr) int32 { /* tclResult.c:1664:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	// var objc int32 at bp+48, 4

	// var level int32 at bp+68, 4

	// var code int32 at bp+64, 4

	// var objv uintptr at bp+40, 8

	// var mergedOpts uintptr at bp+56, 8

	(*Tcl_Obj)(unsafe.Pointer(options)).FrefCount++
	if TCL_ERROR == func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(options)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(options + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 48)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(options + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, options, bp+48, bp+40)
	}() ||
		*(*int32)(unsafe.Pointer(bp + 48))%2 != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+62370, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(options)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(options)).Fbytes
				}
				return XTcl_GetString(tls, options)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+39663, ts+62068, uintptr(0)))
		*(*int32)(unsafe.Pointer(bp + 64 /* code */)) = TCL_ERROR
	} else if TCL_ERROR == XTclMergeReturnOptions(tls, interp, *(*int32)(unsafe.Pointer(bp + 48)), *(*uintptr)(unsafe.Pointer(bp + 40)),
		bp+56, bp+64, bp+68) {
		*(*int32)(unsafe.Pointer(bp + 64 /* code */)) = TCL_ERROR
	} else {
		*(*int32)(unsafe.Pointer(bp + 64 /* code */)) = XTclProcessReturn(tls, interp, *(*int32)(unsafe.Pointer(bp + 64 /* code */)), *(*int32)(unsafe.Pointer(bp + 68 /* level */)), *(*uintptr)(unsafe.Pointer(bp + 56 /* mergedOpts */)))
	}

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = options
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return *(*int32)(unsafe.Pointer(bp + 64 /* code */))
}

//-------------------------------------------------------------------------
//
// Tcl_TransferResult --
//
//	Transfer the result (and error information) from one interp to another.
//	Used when one interp has caused another interp to evaluate a script
//	and then wants to transfer the results back to itself.
//
// Results:
//	The result of targetInterp is set to the result read from sourceInterp.
//	The return options dictionary of sourceInterp is transferred to
//	targetInterp as appropriate for the return code value code.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func XTcl_TransferResult(tls *libc.TLS, sourceInterp uintptr, code int32, targetInterp uintptr) { /* tclResult.c:1710:1: */
	var tiPtr uintptr = targetInterp
	var siPtr uintptr = sourceInterp

	if sourceInterp == targetInterp {
		return
	}

	if code == TCL_OK && (*Interp)(unsafe.Pointer(siPtr)).FreturnOpts == uintptr(0) {
		// Special optimization for the common case of normal command return
		// code and no explicit return options.

		if (*Interp)(unsafe.Pointer(tiPtr)).FreturnOpts != 0 {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = (*Interp)(unsafe.Pointer(tiPtr)).FreturnOpts
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			(*Interp)(unsafe.Pointer(tiPtr)).FreturnOpts = uintptr(0)
		}
	} else {
		XTcl_SetReturnOptions(tls, targetInterp,
			XTcl_GetReturnOptions(tls, sourceInterp, code))
		*(*int32)(unsafe.Pointer(tiPtr + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED)
	}
	XTcl_SetObjResult(tls, targetInterp, XTcl_GetObjResult(tls, sourceInterp))
	XTcl_ResetResult(tls, sourceInterp)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// indent-tabs-mode: nil
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Flag values used by Tcl_ScanObjCmd.

// The following structure contains the information associated with a
// character set.

type CharSet1 = struct {
	Fexclude     int32
	Fnchars      int32
	Fchars       uintptr
	Fnranges     int32
	F__ccgo_pad1 [4]byte
	Franges      uintptr
} /* tclScan.c:31:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Flag values used by Tcl_ScanObjCmd.

// The following structure contains the information associated with a
// character set.

type Range = struct {
	Fstart Tcl_UniChar
	Fend   Tcl_UniChar
} /* tclScan.c:31:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Flag values used by Tcl_ScanObjCmd.

// The following structure contains the information associated with a
// character set.

type CharSet = CharSet1 /* tclScan.c:40:3 */

//----------------------------------------------------------------------
//
// BuildCharSet --
//
//	This function examines a character set format specification and builds
//	a CharSet containing the individual characters and character ranges
//	specified.
//
// Results:
//	Returns the next format position.
//
// Side effects:
//	Initializes the charset.
//
//----------------------------------------------------------------------

func sBuildCharSet(tls *libc.TLS, cset uintptr, format uintptr) uintptr { /* tclScan.c:70:19: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar(0)
	var start Tcl_UniChar
	var offset int32
	var nranges int32
	var end uintptr

	libc.Xmemset(tls, cset, 0, uint64(unsafe.Sizeof(CharSet{})))

	offset = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp)
	}()
	if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) == '^' {
		(*CharSet)(unsafe.Pointer(cset)).Fexclude = 1
		format += uintptr(offset)
		offset = func() int32 {
			if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
				return func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
					return 1
				}()
			}
			return XTcl_UtfToUniChar(tls, format, bp)
		}()
	}
	end = format + uintptr(offset)

	// Find the close bracket so we can overallocate the set.

	if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) == ']' {
		end += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(end)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(end))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, end, bp))
		}()
	}
	nranges = 0
	for int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) != ']' {
		if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) == '-' {
			nranges++
		}
		end += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(end)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(end))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, end, bp))
		}()
	}

	(*CharSet)(unsafe.Pointer(cset)).Fchars = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(Tcl_UniChar(0)))*uint64((int64(end)-int64(format))/1-int64(1))))
	if nranges > 0 {
		(*CharSet)(unsafe.Pointer(cset)).Franges = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(Range{}))*uint64(nranges)))
	} else {
		(*CharSet)(unsafe.Pointer(cset)).Franges = uintptr(0)
	}

	// Now build the character set.

	(*CharSet)(unsafe.Pointer(cset)).Fnchars = libc.AssignPtrInt32(cset+16, 0)
	format += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, format, bp))
	}()
	start = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
	if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) == ']' || int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) == '-' {
		*(*Tcl_UniChar)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Fchars + uintptr(libc.PostIncInt32(&(*CharSet)(unsafe.Pointer(cset)).Fnchars, 1))*2)) = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
		format += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, format, bp))
		}()
	}
	for int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) != ']' {
		if int32(*(*int8)(unsafe.Pointer(format))) == '-' {
			// This may be the first character of a range, so don't add it
			// yet.

			start = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
		} else if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) == '-' {
			// Check to see if this is the last character in the set, in which
			// case it is not a range and we should add the previous character
			// as well as the dash.

			if int32(*(*int8)(unsafe.Pointer(format))) == ']' || !(int32((*CharSet)(unsafe.Pointer(cset)).Franges) != 0) {
				*(*Tcl_UniChar)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Fchars + uintptr(libc.PostIncInt32(&(*CharSet)(unsafe.Pointer(cset)).Fnchars, 1))*2)) = start
				*(*Tcl_UniChar)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Fchars + uintptr(libc.PostIncInt32(&(*CharSet)(unsafe.Pointer(cset)).Fnchars, 1))*2)) = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
			} else {
				format += func() uintptr {
					if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
						return uintptr(func() int32 {
							*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
							return 1
						}())
					}
					return uintptr(XTcl_UtfToUniChar(tls, format, bp))
				}()

				// Check to see if the range is in reverse order.

				if int32(start) < int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) {
					(*Range)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Franges + uintptr((*CharSet)(unsafe.Pointer(cset)).Fnranges)*4)).Fstart = start
					(*Range)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Franges + uintptr((*CharSet)(unsafe.Pointer(cset)).Fnranges)*4)).Fend = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
				} else {
					(*Range)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Franges + uintptr((*CharSet)(unsafe.Pointer(cset)).Fnranges)*4)).Fstart = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
					(*Range)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Franges + uintptr((*CharSet)(unsafe.Pointer(cset)).Fnranges)*4)).Fend = start
				}
				(*CharSet)(unsafe.Pointer(cset)).Fnranges++
			}
		} else {
			*(*Tcl_UniChar)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Fchars + uintptr(libc.PostIncInt32(&(*CharSet)(unsafe.Pointer(cset)).Fnchars, 1))*2)) = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
		}
		format += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, format, bp))
		}()
	}
	return format
}

//----------------------------------------------------------------------
//
// CharInSet --
//
//	Check to see if a character matches the given set.
//
// Results:
//	Returns non-zero if the character matches the given set.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sCharInSet(tls *libc.TLS, cset uintptr, c int32) int32 { /* tclScan.c:181:1: */
	var ch Tcl_UniChar = Tcl_UniChar(c)
	var i int32
	var match int32 = 0

	for i = 0; i < (*CharSet)(unsafe.Pointer(cset)).Fnchars; i++ {
		if int32(*(*Tcl_UniChar)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Fchars + uintptr(i)*2))) == int32(ch) {
			match = 1
			break
		}
	}
	if !(match != 0) {
		for i = 0; i < (*CharSet)(unsafe.Pointer(cset)).Fnranges; i++ {
			if int32((*Range)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Franges+uintptr(i)*4)).Fstart) <= int32(ch) && int32(ch) <= int32((*Range)(unsafe.Pointer((*CharSet)(unsafe.Pointer(cset)).Franges+uintptr(i)*4)).Fend) {
				match = 1
				break
			}
		}
	}
	return func() int32 {
		if (*CharSet)(unsafe.Pointer(cset)).Fexclude != 0 {
			return libc.BoolInt32(!(match != 0))
		}
		return match
	}()
}

//----------------------------------------------------------------------
//
// ReleaseCharSet --
//
//	Free the storage associated with a character set.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sReleaseCharSet(tls *libc.TLS, cset uintptr) { /* tclScan.c:223:1: */
	XTclpFree(tls, (*CharSet)(unsafe.Pointer(cset)).Fchars)
	if (*CharSet)(unsafe.Pointer(cset)).Franges != 0 {
		XTclpFree(tls, (*CharSet)(unsafe.Pointer(cset)).Franges)
	}
}

//----------------------------------------------------------------------
//
// ValidateFormat --
//
//	Parse the format string and verify that it is properly formed and that
//	there are exactly enough variables on the command line.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	May place an error in the interpreter result.
//
//----------------------------------------------------------------------

func sValidateFormat(tls *libc.TLS, interp uintptr, format uintptr, numVars int32, totalSubs uintptr) int32 { /* tclScan.c:250:1: */
	bp := tls.Alloc(348)
	defer tls.Free(348)
	*(*uintptr)(unsafe.Pointer(bp + 336)) = format

	var gotXpg int32
	var gotSequential int32
	var value int32
	var i int32
	var flags int32
	// var end uintptr at bp+328, 8

	// var ch Tcl_UniChar at bp+320, 2

	var objIndex int32
	var xpgSize int32
	var nspace int32
	var nassign uintptr
	// var buf [4]int8 at bp+344, 4

	var errorMsg uintptr
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 320 /* ch */)) = Tcl_UniChar(0)
	nspace = numVars
	nassign = XTclStackAlloc(tls, interp, int32(uint64(nspace)*uint64(unsafe.Sizeof(int32(0)))))
	*(*[4]int8)(unsafe.Pointer(bp + 344 /* buf */)) = *(*[4]int8)(unsafe.Pointer(ts + 62397)) // Place to build an error messages. Note that
	// these are messy operations because we do
	// not want to use the formatting engine;
	// we're inside there!

	// Initialize an array that records the number of times a variable is
	// assigned to by the format string. We use this to detect if a variable
	// is multiply assigned or left unassigned.

	i = 0
__1:
	if !(i < nspace) {
		goto __3
	}
	*(*int32)(unsafe.Pointer(nassign + uintptr(i)*4)) = 0
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;

	xpgSize = libc.AssignInt32(&objIndex, libc.AssignInt32(&gotXpg, libc.AssignInt32(&gotSequential, 0)))

__4:
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))) != 0) {
		goto __5
	}
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()

	flags = 0

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))) != '%') {
		goto __6
	}
	goto __4
__6:
	;
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))) == '%') {
		goto __7
	}
	goto __4
__7:
	;
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))) == '*') {
		goto __8
	}
	flags = flags | SCAN_SUPPRESS
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
	goto xpgCheckDone
__8:
	;

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))) < 0x80 && libc.Xisdigit(tls, int32(uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))))) != 0) {
		goto __9
	} // INTL: "C" locale.
	// Check for an XPG3-style %n$ specification. Note: there must
	// not be a mixture of XPG3 specs and non-XPG3 specs in the same
	// format string.

	value = int32(libc.Xstrtoul(tls, *(*uintptr)(unsafe.Pointer(bp + 336))-uintptr(1), bp+328, 10)) // INTL: "C" locale.
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 328))))) != '$') {
		goto __10
	}
	goto notXpg
__10:
	;
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) = *(*uintptr)(unsafe.Pointer(bp + 328)) + uintptr(1)
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
	gotXpg = 1
	if !(gotSequential != 0) {
		goto __11
	}
	goto mixedXPG
__11:
	;
	objIndex = value - 1
	if !(objIndex < 0 || numVars != 0 && objIndex >= numVars) {
		goto __12
	}
	goto badIndex
	goto __13
__12:
	if !(numVars == 0) {
		goto __14
	}
	// In the case where no vars are specified, the user can
	// specify %9999$ legally, so we have to consider special
	// rules for growing the assign array. 'value' is guaranteed
	// to be > 0.
	if xpgSize > value {
		xpgSize = xpgSize
	} else {
		xpgSize = value
	}
__14:
	;
__13:
	;
	goto xpgCheckDone
__9:
	;

notXpg:
	gotSequential = 1
	if !(gotXpg != 0) {
		goto __15
	}
mixedXPG:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+62401,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+62448, ts+62455, uintptr(0)))
	goto error
__15:
	;

xpgCheckDone:
	// Parse any width specifier.

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))) < 0x80 && libc.Xisdigit(tls, int32(uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))))) != 0) {
		goto __16
	} // INTL: "C" locale.
	value = int32(libc.Xstrtoul(tls, *(*uintptr)(unsafe.Pointer(bp + 336))-uintptr(1), bp+336, 10)) // INTL: "C" locale.
	flags = flags | SCAN_WIDTH
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
__16:
	;

	// Handle any size specifier.

	switch int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320 /* ch */))) {
	case 'l':
		goto __18
		// FALLTHRU
	case 'L':
		goto __19
		// FALLTHRU
	case 'h':
		goto __20
	}
	goto __17
__18:
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))) == 'l') {
		goto __21
	}
	flags = flags | SCAN_BIG
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += uintptr(1)
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
	goto __17
__21:
	;
	// FALLTHRU
__19:
	flags = flags | SCAN_LONGER
	// FALLTHRU
__20:
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
__17:
	;

	if !(!(flags&SCAN_SUPPRESS != 0) && numVars != 0 && objIndex >= numVars) {
		goto __22
	}
	goto badIndex
__22:
	;

	// Handle the various field types.

	switch int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320 /* ch */))) {
	case 'c':
		goto __24
		// FALLTHRU
	case 'n':
		goto __25
	case 's':
		goto __26
		// Fall through!
	case 'd':
		goto __27
	case 'e':
		goto __28
	case 'E':
		goto __29
	case 'f':
		goto __30
	case 'g':
		goto __31
	case 'G':
		goto __32
	case 'i':
		goto __33
	case 'o':
		goto __34
	case 'x':
		goto __35
	case 'X':
		goto __36
	case 'b':
		goto __37
	case 'u':
		goto __38
		// Bracket terms need special checking
	case '[':
		goto __39
	default:
		goto __40
	}
	goto __23
__24:
	if !(flags&SCAN_WIDTH != 0) {
		goto __41
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+62470,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+62448, ts+62520, uintptr(0)))
	goto error
__41:
	;
	// FALLTHRU
__25:
__26:
	if !(flags&(SCAN_LONGER|SCAN_BIG) != 0) {
		goto __42
	}
invalidFieldSize:
	*(*int8)(unsafe.Pointer(bp + 344 + uintptr(XTcl_UniCharToUtf(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320 /* ch */))), bp+344)))) = int8(0)
	errorMsg = XTcl_NewStringObj(tls,
		ts+62529, -1)
	XTcl_AppendToObj(tls, errorMsg, bp+344, -1)
	XTcl_AppendToObj(tls, errorMsg, ts+62575, -1)
	XTcl_SetObjResult(tls, interp, errorMsg)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+62448, ts+62587, uintptr(0)))
	goto error
__42:
	;
	// Fall through!
__27:
__28:
__29:
__30:
__31:
__32:
__33:
__34:
__35:
__36:
__37:
	goto __23
__38:
	if !(flags&SCAN_BIG != 0) {
		goto __43
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+62595, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+62448, ts+62629, uintptr(0)))
	goto error
__43:
	;
	goto __23
	// Bracket terms need special checking
__39:
	if !(flags&(SCAN_LONGER|SCAN_BIG) != 0) {
		goto __44
	}
	goto invalidFieldSize
__44:
	;
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))) == 0) {
		goto __45
	}
	goto badSet
__45:
	;
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))) == '^') {
		goto __46
	}
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))) == 0) {
		goto __47
	}
	goto badSet
__47:
	;
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
__46:
	;
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))) == ']') {
		goto __48
	}
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))) == 0) {
		goto __49
	}
	goto badSet
__49:
	;
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
__48:
	;
__50:
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320))) != ']') {
		goto __51
	}
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))) == 0) {
		goto __52
	}
	goto badSet
__52:
	;
	*(*uintptr)(unsafe.Pointer(bp + 336 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 320)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 336))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 336)), bp+320))
	}()
	goto __50
__51:
	;
	goto __23
badSet:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+62641, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+128, ts+4178, ts+62448, ts+62670, uintptr(0)))
	goto error
__40:
	*(*int8)(unsafe.Pointer(bp + 344 + uintptr(XTcl_UniCharToUtf(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 320 /* ch */))), bp+344)))) = int8(0)
	errorMsg = XTcl_NewStringObj(tls,
		ts+62678, -1)
	XTcl_AppendToObj(tls, errorMsg, bp+344, -1)
	XTcl_AppendToObj(tls, errorMsg, ts+25631, -1)
	XTcl_SetObjResult(tls, interp, errorMsg)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+160, ts+4178, ts+62448, ts+62710, uintptr(0)))
	goto error
__23:
	;
	if !!(flags&SCAN_SUPPRESS != 0) {
		goto __53
	}
	if !(objIndex >= nspace) {
		goto __54
	}
	// Expand the nassign buffer. If we are using XPG specifiers,
	// make sure that we grow to a large enough size. xpgSize is
	// guaranteed to be at least one larger than objIndex.

	value = nspace
	if !(xpgSize != 0) {
		goto __55
	}
	nspace = xpgSize
	goto __56
__55:
	nspace = nspace + 16 // formerly STATIC_LIST_SIZE
__56:
	;
	nassign = XTclStackRealloc(tls, interp, nassign,
		int32(uint64(nspace)*uint64(unsafe.Sizeof(int32(0)))))
	i = value
__57:
	if !(i < nspace) {
		goto __59
	}
	*(*int32)(unsafe.Pointer(nassign + uintptr(i)*4)) = 0
	goto __58
__58:
	i++
	goto __57
	goto __59
__59:
	;
__54:
	;
	*(*int32)(unsafe.Pointer(nassign + uintptr(objIndex)*4))++
	objIndex++
__53:
	;
	goto __4
__5:
	;

	// Verify that all of the variable were assigned exactly once.

	if !(numVars == 0) {
		goto __60
	}
	if !(xpgSize != 0) {
		goto __61
	}
	numVars = xpgSize
	goto __62
__61:
	numVars = objIndex
__62:
	;
__60:
	;
	if !(totalSubs != 0) {
		goto __63
	}
	*(*int32)(unsafe.Pointer(totalSubs)) = numVars
__63:
	;
	i = 0
__64:
	if !(i < numVars) {
		goto __66
	}
	if !(*(*int32)(unsafe.Pointer(nassign + uintptr(i)*4)) > 1) {
		goto __67
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+62718,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+192, ts+4178, ts+62448, ts+62779, uintptr(0)))
	goto error
	goto __68
__67:
	if !(!(xpgSize != 0) && *(*int32)(unsafe.Pointer(nassign + uintptr(i)*4)) == 0) {
		goto __69
	}
	// If the space is empty, and xpgSize is 0 (means XPG wasn't used,
	// and/or numVars != 0), then too many vars were given

	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+62792,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+224, ts+4178, ts+62448, ts+62846, uintptr(0)))
	goto error
__69:
	;
__68:
	;
	goto __65
__65:
	i++
	goto __64
	goto __66
__66:
	;

	XTclStackFree(tls, interp, nassign)
	return TCL_OK

badIndex:
	if !(gotXpg != 0) {
		goto __70
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+62857, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+256, ts+4178, ts+62448, ts+62891, uintptr(0)))
	goto __71
__70:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+62902,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+288, ts+4178, ts+62448, ts+62959, uintptr(0)))
__71:
	;

error:
	XTclStackFree(tls, interp, nassign)
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_ScanObjCmd --
//
//	This function is invoked to process the "scan" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_ScanObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclScan.c:571:1: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	// var format uintptr at bp+16, 8

	var numVars int32
	var nconversions int32
	// var totalVars int32 at bp, 4

	var objIndex int32
	var offset int32
	// var i int32 at bp+56, 4

	var result int32
	var code int32
	// var value int32 at bp+104, 4

	var string uintptr
	// var end uintptr at bp+64, 8

	var baseString uintptr
	var op int8
	var width int32
	var underflow int32
	// var wideValue Tcl_WideInt at bp+72, 8

	// var ch Tcl_UniChar at bp+4, 2

	// var sch Tcl_UniChar at bp+6, 2

	var objs uintptr
	var objPtr uintptr
	var flags int32 // INTL: "C" locale.
	// var formatEnd uintptr at bp+8, 8

	// var cset CharSet at bp+24, 32

	var _objPtr uintptr
	var _objPtr1 uintptr
	// var big Mp_int at bp+80, 24

	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	// var dvalue float64 at bp+112, 8

	var parseFlag int32
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	*(*int32)(unsafe.Pointer(bp /* totalVars */)) = -1
	op = int8(0)
	underflow = 0
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */)) = Tcl_UniChar(0)
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 6 /* sch */)) = Tcl_UniChar(0)
	objs = uintptr(0)
	objPtr = uintptr(0)

	if !(objc < 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv,
		ts+62976)
	return TCL_ERROR
__1:
	;

	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	numVars = objc - 3

	// Check for errors in the format string.

	if !(sValidateFormat(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 16)), numVars, bp) == TCL_ERROR) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	// Allocate space for the result objects.

	if !(*(*int32)(unsafe.Pointer(bp)) > 0) {
		goto __3
	}
	objs = XTcl_Alloc(tls, uint32(uint64(unsafe.Sizeof(uintptr(0)))*uint64(*(*int32)(unsafe.Pointer(bp)))))
	*(*int32)(unsafe.Pointer(bp + 56 /* i */)) = 0
__4:
	if !(*(*int32)(unsafe.Pointer(bp + 56)) < *(*int32)(unsafe.Pointer(bp))) {
		goto __6
	}
	*(*uintptr)(unsafe.Pointer(objs + uintptr(*(*int32)(unsafe.Pointer(bp + 56 /* i */)))*8)) = uintptr(0)
	goto __5
__5:
	*(*int32)(unsafe.Pointer(bp + 56 /* i */))++
	goto __4
	goto __6
__6:
	;
__3:
	;

	string = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	baseString = string

	// Iterate over the format string filling in the result objects until we
	// reach the end of input, the end of the format string, or there is a
	// mismatch.

	objIndex = 0
	nconversions = 0
__7:
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) != 0) {
		goto __8
	}
	parseFlag = TCL_PARSE_NO_WHITESPACE
	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+4))
	}()

	flags = 0

	// If we see whitespace in the format, skip whitespace in the string.

	if !(XTcl_UniCharIsSpace(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)))) != 0) {
		goto __9
	}
	offset = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(string)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(string))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, string, bp+6)
	}()
__10:
	if !(XTcl_UniCharIsSpace(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)))) != 0) {
		goto __11
	}
	if !(int32(*(*int8)(unsafe.Pointer(string))) == 0) {
		goto __12
	}
	goto done
__12:
	;
	string += uintptr(offset)
	offset = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(string)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(string))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, string, bp+6)
	}()
	goto __10
__11:
	;
	goto __7
__9:
	;

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4))) != '%') {
		goto __13
	}
literal:
	if !(int32(*(*int8)(unsafe.Pointer(string))) == 0) {
		goto __14
	}
	underflow = 1
	goto done
__14:
	;
	string += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(string)))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(string))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, string, bp+6))
	}()
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)))) {
		goto __15
	}
	goto done
__15:
	;
	goto __7
__13:
	;

	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+4))
	}()
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4))) == '%') {
		goto __16
	}
	goto literal
__16:
	;

	// Check for assignment suppression ('*') or an XPG3-style assignment
	// ('%n$').

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4))) == '*') {
		goto __17
	}
	flags = flags | SCAN_SUPPRESS
	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+4))
	}()
	goto __18
__17:
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4))) < 0x80 && libc.Xisdigit(tls, int32(uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4))))) != 0) {
		goto __19
	}
	*(*int32)(unsafe.Pointer(bp + 104 /* value */)) = int32(libc.Xstrtoul(tls, *(*uintptr)(unsafe.Pointer(bp + 16))-uintptr(1), bp+8, 10)) // INTL: "C" locale.
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == '$') {
		goto __20
	}
	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) = *(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(1)
	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+4))
	}()
	objIndex = int32(*(*int32)(unsafe.Pointer(bp + 104))) - 1
__20:
	;
__19:
	;
__18:
	;

	// Parse any width specifier.

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4))) < 0x80 && libc.Xisdigit(tls, int32(uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4))))) != 0) {
		goto __21
	} // INTL: "C" locale.
	width = int32(libc.Xstrtoul(tls, *(*uintptr)(unsafe.Pointer(bp + 16))-uintptr(1), bp+16, 10)) // INTL: "C" locale.
	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+4))
	}()
	goto __22
__21:
	width = 0
__22:
	;

	// Handle any size specifier.

	switch int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */))) {
	case 'l':
		goto __24
		// FALLTHRU
	case 'L':
		goto __25
		// FALLTHRU
	case 'h':
		goto __26
	}
	goto __23
__24:
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))) == 'l') {
		goto __27
	}
	flags = flags | SCAN_BIG
	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) += uintptr(1)
	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+4))
	}()
	goto __23
__27:
	;
	// FALLTHRU
__25:
	flags = flags | SCAN_LONGER
	// FALLTHRU
__26:
	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) += func() uintptr {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))))) < 0x80 {
			return uintptr(func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16))))))
				return 1
			}())
		}
		return uintptr(XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), bp+4))
	}()
__23:
	;

	// Handle the various field types.

	switch int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */))) {
	case 'n':
		goto __29

	case 'd':
		goto __30
	case 'i':
		goto __31
	case 'o':
		goto __32
	case 'x':
		goto __33
	case 'X':
		goto __34
	case 'b':
		goto __35
	case 'u':
		goto __36

	case 'f':
		goto __37
	case 'e':
		goto __38
	case 'E':
		goto __39
	case 'g':
		goto __40
	case 'G':
		goto __41

	case 's':
		goto __42

	case 'c':
		goto __43
	case '[':
		goto __44
	}
	goto __28
__29:
	if !!(flags&SCAN_SUPPRESS != 0) {
		goto __45
	}
__46:
	;
__49:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __52
	}
	XTclAllocateFreeObjects(tls)
__52:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __50
__50:
	if 0 != 0 {
		goto __49
	}
	goto __51
__51:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32((int64(string) - int64(baseString)) / 1)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __47
__47:
	if 0 != 0 {
		goto __46
	}
	goto __48
__48:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++

	*(*uintptr)(unsafe.Pointer(objs + uintptr(libc.PostIncInt32(&objIndex, 1))*8)) = objPtr
__45:
	;
	nconversions++
	goto __7

__30:
	op = int8('i')
	parseFlag = parseFlag | TCL_PARSE_DECIMAL_ONLY
	goto __28
__31:
	op = int8('i')
	parseFlag = parseFlag | TCL_PARSE_SCAN_PREFIXES
	goto __28
__32:
	op = int8('i')
	parseFlag = parseFlag | (TCL_PARSE_OCTAL_ONLY | TCL_PARSE_SCAN_PREFIXES)
	goto __28
__33:
__34:
	op = int8('i')
	parseFlag = parseFlag | TCL_PARSE_HEXADECIMAL_ONLY
	goto __28
__35:
	op = int8('i')
	parseFlag = parseFlag | TCL_PARSE_BINARY_ONLY
	goto __28
__36:
	op = int8('i')
	parseFlag = parseFlag | TCL_PARSE_DECIMAL_ONLY
	flags = flags | SCAN_UNSIGNED
	goto __28

__37:
__38:
__39:
__40:
__41:
	op = int8('f')
	goto __28

__42:
	op = int8('s')
	goto __28

__43:
	op = int8('c')
	flags = flags | SCAN_NOSKIP
	goto __28
__44:
	op = int8('[')
	flags = flags | SCAN_NOSKIP
	goto __28
__28:
	;

	// At this point, we will need additional characters from the string
	// to proceed.

	if !(int32(*(*int8)(unsafe.Pointer(string))) == 0) {
		goto __53
	}
	underflow = 1
	goto done
__53:
	;

	// Skip any leading whitespace at the beginning of a field unless the
	// format suppresses this behavior.

	if !!(flags&SCAN_NOSKIP != 0) {
		goto __54
	}
__55:
	if !(int32(*(*int8)(unsafe.Pointer(string))) != 0) {
		goto __56
	}
	offset = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(string)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(string))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, string, bp+6)
	}()
	if !!(XTcl_UniCharIsSpace(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)))) != 0) {
		goto __57
	}
	goto __56
__57:
	;
	string += uintptr(offset)
	goto __55
__56:
	;
	if !(int32(*(*int8)(unsafe.Pointer(string))) == 0) {
		goto __58
	}
	underflow = 1
	goto done
__58:
	;
__54:
	;

	// Perform the requested scanning operation.

	switch int32(op) {
	case 's':
		goto __60

	case '[':
		goto __61
	case 'c':
		goto __62

	case 'i':
		goto __63

	case 'f':
		goto __64
	}
	goto __59
__60:
	// Scan a string up to width characters or whitespace.

	if !(width == 0) {
		goto __65
	}
	width = libc.CplInt32(0)
__65:
	;
	*(*uintptr)(unsafe.Pointer(bp + 64 /* end */)) = string
__66:
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64))))) != 0) {
		goto __67
	}
	offset = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64))))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), bp+6)
	}()
	if !(XTcl_UniCharIsSpace(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)))) != 0) {
		goto __68
	}
	goto __67
__68:
	;
	*(*uintptr)(unsafe.Pointer(bp + 64 /* end */)) += uintptr(offset)
	if !(libc.PreDecInt32(&width, 1) == 0) {
		goto __69
	}
	goto __67
__69:
	;
	goto __66
__67:
	;
	if !!(flags&SCAN_SUPPRESS != 0) {
		goto __70
	}
	objPtr = XTcl_NewStringObj(tls, string, int32((int64(*(*uintptr)(unsafe.Pointer(bp + 64)))-int64(string))/1))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++

	*(*uintptr)(unsafe.Pointer(objs + uintptr(libc.PostIncInt32(&objIndex, 1))*8)) = objPtr
__70:
	;
	string = *(*uintptr)(unsafe.Pointer(bp + 64 /* end */))
	goto __59

__61:

	if !(width == 0) {
		goto __71
	}
	width = libc.CplInt32(0)
__71:
	;
	*(*uintptr)(unsafe.Pointer(bp + 64 /* end */)) = string

	*(*uintptr)(unsafe.Pointer(bp + 16 /* format */)) = sBuildCharSet(tls, bp+24, *(*uintptr)(unsafe.Pointer(bp + 16 /* format */)))
__72:
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64))))) != 0) {
		goto __73
	}
	offset = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64)))))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64))))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), bp+6)
	}()
	if !!(sCharInSet(tls, bp+24, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 6)))) != 0) {
		goto __74
	}
	goto __73
__74:
	;
	*(*uintptr)(unsafe.Pointer(bp + 64 /* end */)) += uintptr(offset)
	if !(libc.PreDecInt32(&width, 1) == 0) {
		goto __75
	}
	goto __73
__75:
	;
	goto __72
__73:
	;
	sReleaseCharSet(tls, bp+24)

	if !(string == *(*uintptr)(unsafe.Pointer(bp + 64))) {
		goto __76
	}
	// Nothing matched the range, stop processing.
	goto done
__76:
	;
	if !!(flags&SCAN_SUPPRESS != 0) {
		goto __77
	}
	objPtr = XTcl_NewStringObj(tls, string, int32((int64(*(*uintptr)(unsafe.Pointer(bp + 64)))-int64(string))/1))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	*(*uintptr)(unsafe.Pointer(objs + uintptr(libc.PostIncInt32(&objIndex, 1))*8)) = objPtr
__77:
	;
	string = *(*uintptr)(unsafe.Pointer(bp + 64 /* end */))

	goto __59

__62:
	// Scan a single Unicode character.

	offset = XTclUtfToUCS4(tls, string, bp+56)
	string += uintptr(offset)
	if !!(flags&SCAN_SUPPRESS != 0) {
		goto __78
	}
__79:
	;
__82:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __85
	}
	XTclAllocateFreeObjects(tls)
__85:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __83
__83:
	if 0 != 0 {
		goto __82
	}
	goto __84
__84:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(*(*int32)(unsafe.Pointer(bp + 56)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __80
__80:
	if 0 != 0 {
		goto __79
	}
	goto __81
__81:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++

	*(*uintptr)(unsafe.Pointer(objs + uintptr(libc.PostIncInt32(&objIndex, 1))*8)) = objPtr
__78:
	;
	goto __59

__63:
	// Scan an unsigned or signed integer.
	objPtr = XTcl_NewLongObj(tls, 0)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	if !(width == 0) {
		goto __86
	}
	width = libc.CplInt32(0)
__86:
	;
	if !(TCL_OK != XTclParseNumber(tls, uintptr(0), objPtr, uintptr(0), string, width,
		bp+64, TCL_PARSE_INTEGER_ONLY|parseFlag)) {
		goto __87
	}
__88:
	_objPtr = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __91
	}
	XTclFreeObj(tls, _objPtr)
__91:
	;
	goto __89
__89:
	if 0 != 0 {
		goto __88
	}
	goto __90
__90:
	;
	if !(width < 0) {
		goto __92
	}
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64))))) == 0) {
		goto __94
	}
	underflow = 1
__94:
	;
	goto __93
__92:
	if !(*(*uintptr)(unsafe.Pointer(bp + 64)) == string+uintptr(width)) {
		goto __95
	}
	underflow = 1
__95:
	;
__93:
	;
	goto done
__87:
	;
	string = *(*uintptr)(unsafe.Pointer(bp + 64 /* end */))
	if !(flags&SCAN_SUPPRESS != 0) {
		goto __96
	}
__97:
	_objPtr1 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __100
	}
	XTclFreeObj(tls, _objPtr1)
__100:
	;
	goto __98
__98:
	if 0 != 0 {
		goto __97
	}
	goto __99
__99:
	;
	goto __59
__96:
	;
	if !(flags&SCAN_LONGER != 0) {
		goto __101
	}
	if !(XTcl_GetWideIntFromObj(tls, uintptr(0), objPtr, bp+72) != TCL_OK) {
		goto __103
	}
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 72 /* wideValue */)) = int64(Tcl_WideUInt(libc.CplUint64(uint64(0))) >> 1) // WIDE_MAX
	if !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()))) == '-') {
		goto __104
	}
	*(*Tcl_WideInt)(unsafe.Pointer(bp + 72 /* wideValue */))++ // WIDE_MAX + 1 = WIDE_MIN
__104:
	;
__103:
	;
	if !(flags&SCAN_UNSIGNED != 0 && *(*Tcl_WideInt)(unsafe.Pointer(bp + 72)) < int64(0)) {
		goto __105
	}
	XTclBNInitBignumFromWideUInt(tls, bp+80, Tcl_WideUInt(*(*Tcl_WideInt)(unsafe.Pointer(bp + 72 /* wideValue */))))
	XTcl_SetBignumObj(tls, objPtr, bp+80)
	goto __106
__105:
	XTcl_SetWideIntObj(tls, objPtr, *(*Tcl_WideInt)(unsafe.Pointer(bp + 72 /* wideValue */)))
__106:
	;
	goto __102
__101:
	if !!(flags&SCAN_BIG != 0) {
		goto __107
	}
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 104)) = *(*int32)(unsafe.Pointer(objPtr + 32))
				return TCL_OK
			}()
		}
		return XTcl_GetLongFromObj(tls, uintptr(0), objPtr, bp+104)
	}() != TCL_OK) {
		goto __108
	}
	if !(int32(*(*int8)(unsafe.Pointer(func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()))) == '-') {
		goto __109
	}
	*(*int32)(unsafe.Pointer(bp + 104 /* value */)) = -0x7fffffff - 1
	goto __110
__109:
	*(*int32)(unsafe.Pointer(bp + 104 /* value */)) = 0x7fffffff
__110:
	;
__108:
	;
	if !(flags&SCAN_UNSIGNED != 0 && *(*int32)(unsafe.Pointer(bp + 104)) < 0) {
		goto __111
	}
	XTcl_SetWideIntObj(tls, objPtr, int64(uint32(*(*int32)(unsafe.Pointer(bp + 104 /* value */)))))
	goto __112
__111:
	XTcl_SetLongObj(tls, objPtr, *(*int32)(unsafe.Pointer(bp + 104 /* value */)))
__112:
	;
__107:
	;
__102:
	;
	*(*uintptr)(unsafe.Pointer(objs + uintptr(libc.PostIncInt32(&objIndex, 1))*8)) = objPtr
	goto __59

__64:
	// Scan a floating point number

	objPtr = XTcl_NewDoubleObj(tls, 0.0)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	if !(width == 0) {
		goto __113
	}
	width = libc.CplInt32(0)
__113:
	;
	if !(TCL_OK != XTclParseNumber(tls, uintptr(0), objPtr, uintptr(0), string, width,
		bp+64, TCL_PARSE_DECIMAL_ONLY|TCL_PARSE_NO_WHITESPACE)) {
		goto __114
	}
__116:
	_objPtr2 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __119
	}
	XTclFreeObj(tls, _objPtr2)
__119:
	;
	goto __117
__117:
	if 0 != 0 {
		goto __116
	}
	goto __118
__118:
	;
	if !(width < 0) {
		goto __120
	}
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 64))))) == 0) {
		goto __122
	}
	underflow = 1
__122:
	;
	goto __121
__120:
	if !(*(*uintptr)(unsafe.Pointer(bp + 64)) == string+uintptr(width)) {
		goto __123
	}
	underflow = 1
__123:
	;
__121:
	;
	goto done
	goto __115
__114:
	if !(flags&SCAN_SUPPRESS != 0) {
		goto __124
	}
__126:
	_objPtr3 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __129
	}
	XTclFreeObj(tls, _objPtr3)
__129:
	;
	goto __127
__127:
	if 0 != 0 {
		goto __126
	}
	goto __128
__128:
	;
	string = *(*uintptr)(unsafe.Pointer(bp + 64 /* end */))
	goto __125
__124:
	if !(XTcl_GetDoubleFromObj(tls, uintptr(0), objPtr, bp+112) != TCL_OK) {
		goto __130
	}

__131:
	_objPtr4 = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __134
	}
	XTclFreeObj(tls, _objPtr4)
__134:
	;
	goto __132
__132:
	if 0 != 0 {
		goto __131
	}
	goto __133
__133:
	;
	goto done

__130:
	;
	XTcl_SetDoubleObj(tls, objPtr, *(*float64)(unsafe.Pointer(bp + 112 /* dvalue */)))

	*(*uintptr)(unsafe.Pointer(objs + uintptr(libc.PostIncInt32(&objIndex, 1))*8)) = objPtr
	string = *(*uintptr)(unsafe.Pointer(bp + 64 /* end */))
__125:
	;
__115:
	;
__59:
	;
	nconversions++
	goto __7
__8:
	;

done:
	result = 0
	code = TCL_OK

	if !(numVars != 0) {
		goto __135
	}
	// In this case, variables were specified (classic scan).

	*(*int32)(unsafe.Pointer(bp + 56 /* i */)) = 0
__137:
	if !(*(*int32)(unsafe.Pointer(bp + 56)) < *(*int32)(unsafe.Pointer(bp))) {
		goto __139
	}
	if !(*(*uintptr)(unsafe.Pointer(objs + uintptr(*(*int32)(unsafe.Pointer(bp + 56)))*8)) == uintptr(0)) {
		goto __140
	}
	goto __138
__140:
	;
	result++

	// In case of multiple errors in setting variables, just report
	// the first one.

	if !(XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(*(*int32)(unsafe.Pointer(bp + 56))+3)*8)), uintptr(0), *(*uintptr)(unsafe.Pointer(objs + uintptr(*(*int32)(unsafe.Pointer(bp + 56)))*8)),
		func() int32 {
			if code == TCL_OK {
				return TCL_LEAVE_ERR_MSG
			}
			return 0
		}()) == uintptr(0)) {
		goto __141
	}
	code = TCL_ERROR
__141:
	;
__142:
	_objPtr5 = *(*uintptr)(unsafe.Pointer(objs + uintptr(*(*int32)(unsafe.Pointer(bp + 56)))*8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __145
	}
	XTclFreeObj(tls, _objPtr5)
__145:
	;
	goto __143
__143:
	if 0 != 0 {
		goto __142
	}
	goto __144
__144:
	;
	goto __138
__138:
	*(*int32)(unsafe.Pointer(bp + 56 /* i */))++
	goto __137
	goto __139
__139:
	;
	goto __136
__135:
	// Here no vars were specified, we want a list returned (inline scan)

	;
__146:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __149
	}
	XTclAllocateFreeObjects(tls)
__149:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __147
__147:
	if 0 != 0 {
		goto __146
	}
	goto __148
__148:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

	*(*int32)(unsafe.Pointer(bp + 56 /* i */)) = 0
__150:
	if !(*(*int32)(unsafe.Pointer(bp + 56)) < *(*int32)(unsafe.Pointer(bp))) {
		goto __152
	}
	if !(*(*uintptr)(unsafe.Pointer(objs + uintptr(*(*int32)(unsafe.Pointer(bp + 56)))*8)) != uintptr(0)) {
		goto __153
	}
	XTcl_ListObjAppendElement(tls, uintptr(0), objPtr, *(*uintptr)(unsafe.Pointer(objs + uintptr(*(*int32)(unsafe.Pointer(bp + 56 /* i */)))*8)))
__155:
	_objPtr6 = *(*uintptr)(unsafe.Pointer(objs + uintptr(*(*int32)(unsafe.Pointer(bp + 56)))*8))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __158
	}
	XTclFreeObj(tls, _objPtr6)
__158:
	;
	goto __156
__156:
	if 0 != 0 {
		goto __155
	}
	goto __157
__157:
	;
	goto __154
__153:
	// More %-specifiers than matching chars, so we just spit out
	// empty strings for these.

	XTcl_ListObjAppendElement(tls, uintptr(0), objPtr, XTcl_NewObj(tls))
__154:
	;
	goto __151
__151:
	*(*int32)(unsafe.Pointer(bp + 56 /* i */))++
	goto __150
	goto __152
__152:
	;
__136:
	;
	if !(objs != uintptr(0)) {
		goto __159
	}
	XTclpFree(tls, objs)
__159:
	;
	if !(code == TCL_OK) {
		goto __160
	}
	if !(underflow != 0 && nconversions == 0) {
		goto __161
	}
	if !(numVars != 0) {
		goto __163
	}
__165:
	;
__168:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __171
	}
	XTclAllocateFreeObjects(tls)
__171:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __169
__169:
	if 0 != 0 {
		goto __168
	}
	goto __170
__170:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objPtr + 32)) = -1
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __166
__166:
	if 0 != 0 {
		goto __165
	}
	goto __167
__167:
	;
	goto __164
__163:
	if !(objPtr != 0) {
		goto __172
	}
	XTcl_SetListObj(tls, objPtr, 0, uintptr(0))
	goto __173
__172:
	;
__174:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __177
	}
	XTclAllocateFreeObjects(tls)
__177:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __175
__175:
	if 0 != 0 {
		goto __174
	}
	goto __176
__176:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)

__173:
	;
__164:
	;
	goto __162
__161:
	if !(numVars != 0) {
		goto __178
	}
__179:
	;
__182:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __185
	}
	XTclAllocateFreeObjects(tls)
__185:
	;
	objPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __183
__183:
	if 0 != 0 {
		goto __182
	}
	goto __184
__184:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(result)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __180
__180:
	if 0 != 0 {
		goto __179
	}
	goto __181
__181:
	;
__178:
	;
__162:
	;
	XTcl_SetObjResult(tls, interp, objPtr)
__160:
	;
	return code
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Documentation on decimal float math
//    http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=8cf166fedd1aa110VgnVCM100000a360ea10RCRD
//

// Define KILL_OCTAL to suppress interpretation of numbers with leading zero
// as octal. (Ceterum censeo: numeros octonarios delendos esse.)

// This code supports (at least hypothetically), IBM, Cray, VAX and IEEE-754
// floating point; of these, only IEEE-754 can represent NaN. IEEE-754 can be
// uniquely determined by radix and by the widths of significand and exponent.

// Rounding controls. (Thanks a lot, Intel!)

// MIPS floating-point units need special settings in control registers to use
// gradual underflow as we expect.  This fix is for the MIPSpro compiler.

// HP's PA_RISC architecture uses 7ff4000000000000 to represent a quiet NaN.
// Everyone else uses 7ff8000000000000. (Why, HP, why?)

// Constants used by this file (most of which are only ever calculated at
// runtime).

// Magic constants

// Definitions of the parts of an IEEE754-format floating point number.

// Mask for the sign bit in the first word of
// a double.
// Mask for the exponent field in the first
// word of a double.
// Hidden 1 bit for the significand.
// Mask for the high-order part of the
// significand in the first word of a
// double.
// Mask for the 52-bit significand.

// Derived quantities.

// Union used to dismantle floating point numbers.

type Double1 = struct {
	F__ccgo_pad1 [0]uint64
	Fw           struct {
		Fword1 int32
		Fword0 int32
	}
} /* tclStrToD.c:166:9 */

// Documentation on decimal float math
//    http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=8cf166fedd1aa110VgnVCM100000a360ea10RCRD
//

// Define KILL_OCTAL to suppress interpretation of numbers with leading zero
// as octal. (Ceterum censeo: numeros octonarios delendos esse.)

// This code supports (at least hypothetically), IBM, Cray, VAX and IEEE-754
// floating point; of these, only IEEE-754 can represent NaN. IEEE-754 can be
// uniquely determined by radix and by the widths of significand and exponent.

// Rounding controls. (Thanks a lot, Intel!)

// MIPS floating-point units need special settings in control registers to use
// gradual underflow as we expect.  This fix is for the MIPSpro compiler.

// HP's PA_RISC architecture uses 7ff4000000000000 to represent a quiet NaN.
// Everyone else uses 7ff8000000000000. (Why, HP, why?)

// Constants used by this file (most of which are only ever calculated at
// runtime).

// Magic constants

// Definitions of the parts of an IEEE754-format floating point number.

// Mask for the sign bit in the first word of
// a double.
// Mask for the exponent field in the first
// word of a double.
// Hidden 1 bit for the significand.
// Mask for the high-order part of the
// significand in the first word of a
// double.
// Mask for the 52-bit significand.

// Derived quantities.

// Union used to dismantle floating point numbers.

type Double = Double1 /* tclStrToD.c:178:3 */

var maxpow10_wide int32 /* tclStrToD.c:180:12: */ // The powers of ten that can be represented
// exactly as wide integers.
var pow10_wide uintptr    /* tclStrToD.c:182:21: */
var pow10vals [23]float64 /* tclStrToD.c:184:15: */
// The powers of ten that can be represented
// exactly as IEEE754 doubles.
var mmaxpow int32 /* tclStrToD.c:187:12: */ // Largest power of ten that can be
// represented exactly in a 'double'.
var log10_DIGIT_MAX int32 /* tclStrToD.c:189:12: */ // The number of decimal digits that fit in an
// mp_digit.
var log2FLT_RADIX int32 /* tclStrToD.c:191:12: */ // Logarithm of the floating point radix.
var mantBits int32      /* tclStrToD.c:192:12: */ // Number of bits in a double's significand
var pow5 [9]Mp_int      /* tclStrToD.c:193:15: */ // Table of powers of 5**(2**n), up to
// 5**256
var tiny float64 = 0.0 /* tclStrToD.c:195:15 */  // The smallest representable double.
var maxDigits int32    /* tclStrToD.c:196:12: */ // The maximum number of digits to the left of
// the decimal point of a double.
var minDigits int32 /* tclStrToD.c:198:12: */ // The maximum number of digits to the right
// of the decimal point in a double.
var pow_10_2_n = [9]float64{ // Inexact higher powers of ten.
	1.0,
	100.0,
	10000.0,
	1.0e+8,
	1.0e+16,
	1.0e+32,
	1.0e+64,
	1.0e+128,
	1.0e+256,
} /* tclStrToD.c:200:21 */

var n770_fp int32 /* tclStrToD.c:212:12: */ // Flag is 1 on Nokia N770 floating point.
// Nokia's floating point has the words
// reversed: if big-endian is 7654 3210,
// and little-endian is       0123 4567,
// then Nokia's FP is         4567 0123;
// little-endian within the 32-bit words but
// big-endian between them.

// Table of powers of 5 that are small enough to fit in an mp_digit.

var dpow5 = [13]Mp_digit{
	Mp_digit(1), Mp_digit(5), Mp_digit(25), Mp_digit(125),
	Mp_digit(625), Mp_digit(3125), Mp_digit(15625), Mp_digit(78125),
	Mp_digit(390625), Mp_digit(1953125), Mp_digit(9765625), Mp_digit(48828125),
	Mp_digit(244140625),
} /* tclStrToD.c:224:23 */

// Table of powers: pow5_13[n] = 5**(13*2**(n+1))

var pow5_13 [5]Mp_int /* tclStrToD.c:235:15: */ // Table of powers: 5**13, 5**26, 5**52,
// 5**104, 5**208
var tens = [23]float64{
	1e00, 1e01, 1e02, 1e03, 1e04, 1e05, 1e06, 1e07, 1e08, 1e09,
	1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
	1e20, 1e21, 1e22,
} /* tclStrToD.c:237:21 */

var itens = [9]int32{
	1,
	10,
	100,
	1000,
	10000,
	100000,
	1000000,
	10000000,
	100000000,
} /* tclStrToD.c:243:18 */

var bigtens = [5]float64{
	1e016, 1e032, 1e064, 1e128, 1e256,
} /* tclStrToD.c:255:21 */

var log2pow5 = [27]int32{
	01, 3, 5, 7, 10, 12, 14, 17, 19, 21,
	24, 26, 28, 31, 33, 35, 38, 40, 42, 45,
	47, 49, 52, 54, 56, 59, 61,
} /* tclStrToD.c:260:18 */

var wuipow5 = [27]Tcl_WideUInt{
	uint64(1), // 5**0
	uint64(5),
	uint64(25),
	uint64(125),
	uint64(625),
	uint64(3125), // 5**5
	uint64(3125) * uint64(5),
	uint64(3125) * uint64(25),
	uint64(3125) * uint64(125),
	uint64(3125) * uint64(625),
	uint64(3125) * uint64(3125),
	uint64(3125) * uint64(3125) * uint64(5),
	uint64(3125) * uint64(3125) * uint64(25),
	uint64(3125) * uint64(3125) * uint64(125),
	uint64(3125) * uint64(3125) * uint64(625),
	uint64(3125) * uint64(3125) * uint64(3125),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(5),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(25),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(125),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(625),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(3125),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(3125) * uint64(5),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(3125) * uint64(25),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(3125) * uint64(125),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(3125) * uint64(625),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(3125) * uint64(3125),
	uint64(3125) * uint64(3125) * uint64(3125) * uint64(3125) * uint64(3125) * uint64(5),
} /* tclStrToD.c:267:27 */

//----------------------------------------------------------------------
//
// TclParseNumber --
//
//	Scans bytes, interpreted as characters in Tcl's internal encoding, and
//	parses the longest prefix that is the string representation of a
//	number in a format recognized by Tcl.
//
//	The arguments bytes, numBytes, and objPtr are the inputs which
//	determine the string to be parsed. If bytes is non-NULL, it points to
//	the first byte to be scanned. If bytes is NULL, then objPtr must be
//	non-NULL, and the string representation of objPtr will be scanned
//	(generated first, if necessary). The numBytes argument determines the
//	number of bytes to be scanned. If numBytes is negative, the first NUL
//	byte encountered will terminate the scan. If numBytes is non-negative,
//	then no more than numBytes bytes will be scanned.
//
//	The argument flags is an input that controls the numeric formats
//	recognized by the parser. The flag bits are:
//
//	- TCL_PARSE_INTEGER_ONLY:	accept only integer values; reject
//		strings that denote floating point values (or accept only the
//		leading portion of them that are integer values).
//	- TCL_PARSE_SCAN_PREFIXES:	ignore the prefixes 0b and 0o that are
//		not part of the [scan] command's vocabulary. Use only in
//		combination with TCL_PARSE_INTEGER_ONLY.
//	- TCL_PARSE_BINARY_ONLY:	parse only in the binary format, whether
//		or not a prefix is present that would lead to binary parsing.
//		Use only in combination with TCL_PARSE_INTEGER_ONLY.
//	- TCL_PARSE_OCTAL_ONLY:		parse only in the octal format, whether
//		or not a prefix is present that would lead to octal parsing.
//		Use only in combination with TCL_PARSE_INTEGER_ONLY.
//	- TCL_PARSE_HEXADECIMAL_ONLY:	parse only in the hexadecimal format,
//		whether or not a prefix is present that would lead to
//		hexadecimal parsing. Use only in combination with
//		TCL_PARSE_INTEGER_ONLY.
//	- TCL_PARSE_DECIMAL_ONLY:	parse only in the decimal format, no
//		matter whether a 0 prefix would normally force a different
//		base.
//	- TCL_PARSE_NO_WHITESPACE:	reject any leading/trailing whitespace
//
//	The arguments interp and expected are inputs that control error
//	message generation. If interp is NULL, no error message will be
//	generated. If interp is non-NULL, then expected must also be non-NULL.
//	When TCL_ERROR is returned, an error message will be left in the
//	result of interp, and the expected argument will appear in the error
//	message as the thing TclParseNumber expected, but failed to find in
//	the string.
//
//	The arguments objPtr and endPtrPtr as well as the return code are the
//	outputs.
//
//	When the parser cannot find any prefix of the string that matches a
//	format it is looking for, TCL_ERROR is returned and an error message
//	may be generated and returned as described above. The contents of
//	objPtr will not be changed. If endPtrPtr is non-NULL, a pointer to the
//	character in the string that terminated the scan will be written to
//	*endPtrPtr.
//
//	When the parser determines that the entire string matches a format it
//	is looking for, TCL_OK is returned, and if objPtr is non-NULL, then
//	the internal rep and Tcl_ObjType of objPtr are set to the "canonical"
//	numeric value that matches the scanned string. If endPtrPtr is not
//	NULL, a pointer to the end of the string will be written to *endPtrPtr
//	(that is, either bytes+numBytes or a pointer to a terminating NUL
//	byte).
//
//	When the parser determines that a partial string matches a format it
//	is looking for, the value of endPtrPtr determines what happens:
//
//	- If endPtrPtr is NULL, then TCL_ERROR is returned, with error message
//		generation as above.
//
//	- If endPtrPtr is non-NULL, then TCL_OK is returned and objPtr
//		internals are set as above. Also, a pointer to the first
//		character following the parsed numeric string is written to
//		*endPtrPtr.
//
//	In some cases where the string being scanned is the string rep of
//	objPtr, this routine can leave objPtr in an inconsistent state where
//	its string rep and its internal rep do not agree. In these cases the
//	internal rep will be in agreement with only some substring of the
//	string rep. This might happen if the caller passes in a non-NULL bytes
//	value that points somewhere into the string rep. It might happen if
//	the caller passes in a numBytes value that limits the scan to only a
//	prefix of the string rep. Or it might happen if a non-NULL value of
//	endPtrPtr permits a TCL_OK return from only a partial string match. It
//	is the responsibility of the caller to detect and correct such
//	inconsistencies when they can and do arise.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	The string representaton of objPtr may be generated.
//
//	The internal representation and Tcl_ObjType of objPtr may be changed.
//	This may involve allocation and/or freeing of memory.
//
//----------------------------------------------------------------------

func XTclParseNumber(tls *libc.TLS, interp uintptr, objPtr uintptr, expected uintptr, bytes uintptr, numBytes int32, endPtrPtr uintptr, flags int32) int32 { /* tclStrToD.c:481:1: */
	bp := tls.Alloc(112)
	defer tls.Free(112)

	var state uint32
	var acceptState uint32
	var signum int32 // Sign of the number being parsed.
	// var significandWide Tcl_WideUInt at bp+56, 8

	// Significand of the number being parsed (if
	// no overflow).
	// var significandBig Mp_int at bp+64, 24
	// Significand of the number being parsed (if
	// it overflows significandWide).
	var significandOverflow int32 // Flag==1 iff significandBig is used.
	var octalSignificandWide Tcl_WideUInt
	// Significand of an octal number; needed
	// because we don't know whether a number with
	// a leading zero is octal or decimal until
	// we've scanned forward to a '.' or 'e'.
	// var octalSignificandBig Mp_int at bp+88, 24
	// Significand of octal number once
	// octalSignificandWide overflows.
	var octalSignificandOverflow int32
	// Flag==1 if octalSignificandBig is used.
	var numSigDigs int32 // Number of significant digits in the decimal
	// significand.
	var numTrailZeros int32 // Number of trailing zeroes at the current
	// point in the parse.
	var numDigitsAfterDp int32 // Number of digits scanned after the decimal
	// point.
	var exponentSignum int32 // Signum of the exponent of a floating point
	// number.
	var exponent int32      // Exponent of a floating point number.
	var p uintptr           // Pointer to next character to scan.
	var len Size_t          // Number of characters remaining after p.
	var acceptPoint uintptr // Pointer to position after last character in
	// an acceptable number.
	var acceptLen Size_t // Number of characters following that
	// point.
	var status int32 // Status to return to caller.
	var d int8       // Last hexadecimal digit scanned; initialized
	// to avoid a compiler warning.
	var shift int32 // Amount to shift when accumulating binary
	var explicitOctal int32
	var c int8
	var msg uintptr
	state = uint32(0)       /* INITIAL */
	acceptState = uint32(0) /* INITIAL */
	signum = 0
	*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)) = uint64(0)
	significandOverflow = 0
	octalSignificandWide = uint64(0)
	octalSignificandOverflow = 0
	numSigDigs = 0
	numTrailZeros = 0
	numDigitsAfterDp = 0
	exponentSignum = 0
	exponent = 0
	status = TCL_OK
	d = int8(0)
	shift = 0
	explicitOctal = 0

	// Initialize bytes to start of the object's string rep if the caller
	// didn't pass anything else.

	if !(bytes == uintptr(0)) {
		goto __1
	}
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()
__1:
	;

	p = bytes
	len = Size_t(numBytes)
	acceptPoint = p
	acceptLen = len
__2:
	if !(1 != 0) {
		goto __3
	}
	if len != 0 {
		c = *(*int8)(unsafe.Pointer(p))
	} else {
		c = int8(0)
	}
	switch state {

	case uint32(0) /* INITIAL */ :
		goto __5
		// FALLTHROUGH

	case uint32(1) /* SIGNUM */ :
		goto __6

	case uint32(2) /* ZERO */ :
		goto __7
		// FALLTHROUGH

	case uint32(8) /* OCTAL */ :
		goto __8
		// FALLTHROUGH
	case uint32(4) /* ZERO_O */ :
		goto __9
		// FALLTHROUGH

	case uint32(9) /* BAD_OCTAL */ :
		goto __10

		// Scanned 0x. If state is HEXADECIMAL, scanned at least one
		// character following the 0x. The only acceptable inputs are
		// hexadecimal digits.

	case uint32(7) /* HEXADECIMAL */ :
		goto __11
		// FALLTHROUGH

	case uint32(3) /* ZERO_X */ :
		goto __12

	case uint32(6) /* BINARY */ :
		goto __13
		// FALLTHRU
	case uint32(5) /* ZERO_B */ :
		goto __14

	case uint32(10) /* DECIMAL */ :
		goto __15

		// Found a decimal point. If no digits have yet been scanned, E is
		// not allowed; otherwise, it introduces the exponent. If at least
		// one digit has been found, we have a possible complete number.

	case uint32(12) /* FRACTION */ :
		goto __16
		// FALLTHROUGH

	case uint32(11) /* LEADING_RADIX_POINT */ :
		goto __17

	case uint32(13) /* EXPONENT_START */ :
		goto __18
		// FALLTHROUGH

	case uint32(14) /* EXPONENT_SIGNUM */ :
		goto __19

	case uint32(15) /* EXPONENT */ :
		goto __20

		// Parse out INFINITY by simply spelling it out. INF is accepted
		// as an abbreviation; other prefices are not.

	case uint32(16) /* sI */ :
		goto __21
	case uint32(17) /* sIN */ :
		goto __22
	case uint32(18) /* sINF */ :
		goto __23
	case uint32(19) /* sINFI */ :
		goto __24
	case uint32(20) /* sINFIN */ :
		goto __25
	case uint32(21) /* sINFINI */ :
		goto __26
	case uint32(22) /* sINFINIT */ :
		goto __27

		// Parse NaN's.
	case uint32(24) /* sN */ :
		goto __28
	case uint32(25) /* sNA */ :
		goto __29
	case uint32(26) /* sNAN */ :
		goto __30

		// Parse NaN(hexdigits)
	case uint32(28) /* sNANHEX */ :
		goto __31
		// FALLTHROUGH
	case uint32(27) /* sNANPAREN */ :
		goto __32
	case uint32(29) /* sNANFINISH */ :
		goto __33

	case uint32(23) /* sINFINITY */ :
		goto __34
	}
	goto __4

__5:
	// Initial state. Acceptable characters are +, -, digits, period,
	// I, N, and whitespace.

	if !(func() int32 {
		if int32(c) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(c))
	}() != 0) {
		goto __35
	}
	if !(flags&TCL_PARSE_NO_WHITESPACE != 0) {
		goto __37
	}
	goto endgame
__37:
	;
	goto __4
	goto __36
__35:
	if !(int32(c) == '+') {
		goto __38
	}
	state = uint32(1) /* SIGNUM */
	goto __4
	goto __39
__38:
	if !(int32(c) == '-') {
		goto __40
	}
	signum = 1
	state = uint32(1) /* SIGNUM */
	goto __4
__40:
	;
__39:
	;
__36:
	;
	// FALLTHROUGH

__6:
	// Scanned a leading + or -. Acceptable characters are digits,
	// period, I, and N.

	if !(int32(c) == '0') {
		goto __41
	}
	if !(flags&TCL_PARSE_DECIMAL_ONLY != 0) {
		goto __43
	}
	state = uint32(10) /* DECIMAL */
	goto __44
__43:
	state = uint32(2) /* ZERO */
__44:
	;
	goto __4
	goto __42
__41:
	if !(flags&TCL_PARSE_HEXADECIMAL_ONLY != 0) {
		goto __45
	}
	goto zerox
	goto __46
__45:
	if !(flags&TCL_PARSE_BINARY_ONLY != 0) {
		goto __47
	}
	goto zerob
	goto __48
__47:
	if !(flags&TCL_PARSE_OCTAL_ONLY != 0) {
		goto __49
	}
	goto zeroo
	goto __50
__49:
	if !(libc.Xisdigit(tls, int32(uint8(c))) != 0) {
		goto __51
	}
	*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)) = Tcl_WideUInt(int32(c) - '0')
	numSigDigs = 1
	state = uint32(10) /* DECIMAL */
	goto __4
	goto __52
__51:
	if !(flags&TCL_PARSE_INTEGER_ONLY != 0) {
		goto __53
	}
	goto endgame
	goto __54
__53:
	if !(int32(c) == '.') {
		goto __55
	}
	state = uint32(11) /* LEADING_RADIX_POINT */
	goto __4
	goto __56
__55:
	if !(int32(c) == 'I' || int32(c) == 'i') {
		goto __57
	}
	state = uint32(16) /* sI */
	goto __4
	goto __58
__57:
	if !(int32(c) == 'N' || int32(c) == 'n') {
		goto __59
	}
	state = uint32(24) /* sN */
	goto __4
__59:
	;
__58:
	;
__56:
	;
__54:
	;
__52:
	;
__50:
	;
__48:
	;
__46:
	;
__42:
	;
	goto endgame

__7:
	// Scanned a leading zero (perhaps with a + or -). Acceptable
	// inputs are digits, period, X, b, and E. If 8 or 9 is
	// encountered, the number can't be octal. This state and the
	// OCTAL state differ only in whether they recognize 'X' and 'b'.

	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	if !(int32(c) == 'x' || int32(c) == 'X') {
		goto __60
	}
	if !(flags&(TCL_PARSE_OCTAL_ONLY|TCL_PARSE_BINARY_ONLY) != 0) {
		goto __61
	}
	goto endgame
__61:
	;
	state = uint32(3) /* ZERO_X */
	goto __4
__60:
	;
	if !(flags&TCL_PARSE_HEXADECIMAL_ONLY != 0) {
		goto __62
	}
	goto zerox
__62:
	;
	if !(flags&TCL_PARSE_SCAN_PREFIXES != 0) {
		goto __63
	}
	goto zeroo
__63:
	;
	if !(int32(c) == 'b' || int32(c) == 'B') {
		goto __64
	}
	if !(flags&TCL_PARSE_OCTAL_ONLY != 0) {
		goto __65
	}
	goto endgame
__65:
	;
	state = uint32(5) /* ZERO_B */
	goto __4
__64:
	;
	if !(flags&TCL_PARSE_BINARY_ONLY != 0) {
		goto __66
	}
	goto zerob
__66:
	;
	if !(int32(c) == 'o' || int32(c) == 'O') {
		goto __67
	}
	explicitOctal = 1
	state = uint32(4) /* ZERO_O */
	goto __4
__67:
	;
	// FALLTHROUGH

__8:
	// Scanned an optional + or -, followed by a string of octal
	// digits. Acceptable inputs are more digits, period, or E. If 8
	// or 9 is encountered, commit to floating point.

	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	// FALLTHROUGH
__9:
zeroo:
	if !(int32(c) == '0') {
		goto __68
	}
	numTrailZeros++
	state = uint32(8) /* OCTAL */
	goto __4
	goto __69
__68:
	if !(int32(c) >= '1' && int32(c) <= '7') {
		goto __70
	}
	if !(objPtr != uintptr(0)) {
		goto __71
	}
	shift = 3 * (numTrailZeros + 1)
	significandOverflow = sAccumulateDecimalDigit(tls,
		uint32(int32(c)-'0'), numTrailZeros,
		bp+56, bp+64,
		significandOverflow)

	if !!(octalSignificandOverflow != 0) {
		goto __72
	}
	// Shifting by more bits than are in the value being
	// shifted is at least de facto nonportable. Check for
	// too large shifts first.

	if !(octalSignificandWide != uint64(0) &&
		(Size_t(shift) >= uint64(8)*uint64(unsafe.Sizeof(Tcl_WideUInt(0))) ||
			octalSignificandWide > Tcl_WideUInt(libc.CplUint64(uint64(0)))>>shift)) {
		goto __73
	}
	octalSignificandOverflow = 1
	XTclBNInitBignumFromWideUInt(tls, bp+88,
		octalSignificandWide)
__73:
	;
__72:
	;
	if !!(octalSignificandOverflow != 0) {
		goto __74
	}
	octalSignificandWide = octalSignificandWide<<shift + Tcl_WideUInt(int32(c)-'0')
	goto __75
__74:
	XTclBN_mp_mul_2d(tls, bp+88, shift,
		bp+88)
	XTclBN_mp_add_d(tls, bp+88, Mp_digit(int32(c)-'0'),
		bp+88)
__75:
	;
__71:
	;
	if !(numSigDigs != 0) {
		goto __76
	}
	numSigDigs = numSigDigs + (numTrailZeros + 1)
	goto __77
__76:
	numSigDigs = 1
__77:
	;
	numTrailZeros = 0
	state = uint32(8) /* OCTAL */
	goto __4
__70:
	;
__69:
	;
	// FALLTHROUGH

__10:
	if !(explicitOctal != 0) {
		goto __78
	}
	// No forgiveness for bad digits in explicitly octal numbers.

	goto endgame
__78:
	;
	if !(flags&TCL_PARSE_INTEGER_ONLY != 0) {
		goto __79
	}
	// No seeking floating point when parsing only integer.

	goto endgame
__79:
	;

	// Scanned a number with a leading zero that contains an 8, 9,
	// radix point or E. This is an invalid octal number, but might
	// still be floating point.

	if !(int32(c) == '0') {
		goto __80
	}
	numTrailZeros++
	state = uint32(9) /* BAD_OCTAL */
	goto __4
	goto __81
__80:
	if !(libc.Xisdigit(tls, int32(uint8(c))) != 0) {
		goto __82
	}
	if !(objPtr != uintptr(0)) {
		goto __84
	}
	significandOverflow = sAccumulateDecimalDigit(tls,
		uint32(int32(c)-'0'), numTrailZeros,
		bp+56, bp+64,
		significandOverflow)
__84:
	;
	if !(numSigDigs != 0) {
		goto __85
	}
	numSigDigs = numSigDigs + (numTrailZeros + 1)
	goto __86
__85:
	numSigDigs = 1
__86:
	;
	numTrailZeros = 0
	state = uint32(9) /* BAD_OCTAL */
	goto __4
	goto __83
__82:
	if !(int32(c) == '.') {
		goto __87
	}
	state = uint32(12) /* FRACTION */
	goto __4
	goto __88
__87:
	if !(int32(c) == 'E' || int32(c) == 'e') {
		goto __89
	}
	state = uint32(13) /* EXPONENT_START */
	goto __4
__89:
	;
__88:
	;
__83:
	;
__81:
	;
	goto endgame

	// Scanned 0x. If state is HEXADECIMAL, scanned at least one
	// character following the 0x. The only acceptable inputs are
	// hexadecimal digits.

__11:
	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	// FALLTHROUGH

__12:
zerox:
	if !(int32(c) == '0') {
		goto __90
	}
	numTrailZeros++
	state = uint32(7) /* HEXADECIMAL */
	goto __4
	goto __91
__90:
	if !(libc.Xisdigit(tls, int32(uint8(c))) != 0) {
		goto __92
	}
	d = int8(int32(c) - '0')
	goto __93
__92:
	if !(int32(c) >= 'A' && int32(c) <= 'F') {
		goto __94
	}
	d = int8(int32(c) - 'A' + 10)
	goto __95
__94:
	if !(int32(c) >= 'a' && int32(c) <= 'f') {
		goto __96
	}
	d = int8(int32(c) - 'a' + 10)
	goto __97
__96:
	goto endgame
__97:
	;
__95:
	;
__93:
	;
__91:
	;
	if !(objPtr != uintptr(0)) {
		goto __98
	}
	shift = 4 * (numTrailZeros + 1)
	if !!(significandOverflow != 0) {
		goto __99
	}
	// Shifting by more bits than are in the value being
	// shifted is at least de facto nonportable. Check for too
	// large shifts first.

	if !(*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) != uint64(0) && (Size_t(shift) >= uint64(8)*uint64(unsafe.Sizeof(Tcl_WideUInt(0))) || *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) > Tcl_WideUInt(libc.CplUint64(uint64(0)))>>shift)) {
		goto __100
	}
	significandOverflow = 1
	XTclBNInitBignumFromWideUInt(tls, bp+64,
		*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
__100:
	;
__99:
	;
	if !!(significandOverflow != 0) {
		goto __101
	}
	*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)) = *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56))<<shift + Tcl_WideUInt(d)
	goto __102
__101:
	XTclBN_mp_mul_2d(tls, bp+64, shift, bp+64)
	XTclBN_mp_add_d(tls, bp+64, Mp_digit(d), bp+64)
__102:
	;
__98:
	;
	numTrailZeros = 0
	state = uint32(7) /* HEXADECIMAL */
	goto __4

__13:
	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	// FALLTHRU
__14:
zerob:
	if !(int32(c) == '0') {
		goto __103
	}
	numTrailZeros++
	state = uint32(6) /* BINARY */
	goto __4
	goto __104
__103:
	if !(int32(c) != '1') {
		goto __105
	}
	goto endgame
__105:
	;
__104:
	;
	if !(objPtr != uintptr(0)) {
		goto __106
	}
	shift = numTrailZeros + 1
	if !!(significandOverflow != 0) {
		goto __107
	}
	// Shifting by more bits than are in the value being
	// shifted is at least de facto nonportable. Check for too
	// large shifts first.

	if !(*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) != uint64(0) && (Size_t(shift) >= uint64(8)*uint64(unsafe.Sizeof(Tcl_WideUInt(0))) || *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) > Tcl_WideUInt(libc.CplUint64(uint64(0)))>>shift)) {
		goto __108
	}
	significandOverflow = 1
	XTclBNInitBignumFromWideUInt(tls, bp+64,
		*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
__108:
	;
__107:
	;
	if !!(significandOverflow != 0) {
		goto __109
	}
	*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)) = *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56))<<shift + uint64(1)
	goto __110
__109:
	XTclBN_mp_mul_2d(tls, bp+64, shift, bp+64)
	XTclBN_mp_add_d(tls, bp+64, Mp_digit(1), bp+64)
__110:
	;
__106:
	;
	numTrailZeros = 0
	state = uint32(6) /* BINARY */
	goto __4

__15:
	// Scanned an optional + or - followed by a string of decimal
	// digits.

	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	if !(int32(c) == '0') {
		goto __111
	}
	numTrailZeros++
	state = uint32(10) /* DECIMAL */
	goto __4
	goto __112
__111:
	if !(libc.Xisdigit(tls, int32(uint8(c))) != 0) {
		goto __113
	}
	if !(objPtr != uintptr(0)) {
		goto __115
	}
	significandOverflow = sAccumulateDecimalDigit(tls,
		uint32(int32(c)-'0'), numTrailZeros,
		bp+56, bp+64,
		significandOverflow)
__115:
	;
	numSigDigs = numSigDigs + (numTrailZeros + 1)
	numTrailZeros = 0
	state = uint32(10) /* DECIMAL */
	goto __4
	goto __114
__113:
	if !(flags&TCL_PARSE_INTEGER_ONLY != 0) {
		goto __116
	}
	goto endgame
	goto __117
__116:
	if !(int32(c) == '.') {
		goto __118
	}
	state = uint32(12) /* FRACTION */
	goto __4
	goto __119
__118:
	if !(int32(c) == 'E' || int32(c) == 'e') {
		goto __120
	}
	state = uint32(13) /* EXPONENT_START */
	goto __4
__120:
	;
__119:
	;
__117:
	;
__114:
	;
__112:
	;
	goto endgame

	// Found a decimal point. If no digits have yet been scanned, E is
	// not allowed; otherwise, it introduces the exponent. If at least
	// one digit has been found, we have a possible complete number.

__16:
	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	if !(int32(c) == 'E' || int32(c) == 'e') {
		goto __121
	}
	state = uint32(13) /* EXPONENT_START */
	goto __4
__121:
	;
	// FALLTHROUGH

__17:
	if !(int32(c) == '0') {
		goto __122
	}
	numDigitsAfterDp++
	numTrailZeros++
	state = uint32(12) /* FRACTION */
	goto __4
	goto __123
__122:
	if !(libc.Xisdigit(tls, int32(uint8(c))) != 0) {
		goto __124
	}
	numDigitsAfterDp++
	if !(objPtr != uintptr(0)) {
		goto __125
	}
	significandOverflow = sAccumulateDecimalDigit(tls,
		uint32(int32(c)-'0'), numTrailZeros,
		bp+56, bp+64,
		significandOverflow)
__125:
	;
	if !(numSigDigs != 0) {
		goto __126
	}
	numSigDigs = numSigDigs + (numTrailZeros + 1)
	goto __127
__126:
	numSigDigs = 1
__127:
	;
	numTrailZeros = 0
	state = uint32(12) /* FRACTION */
	goto __4
__124:
	;
__123:
	;
	goto endgame

__18:
	// Scanned the E at the start of an exponent. Make sure a legal
	// character follows before using the C library strtol routine,
	// which allows whitespace.

	if !(int32(c) == '+') {
		goto __128
	}
	state = uint32(14) /* EXPONENT_SIGNUM */
	goto __4
	goto __129
__128:
	if !(int32(c) == '-') {
		goto __130
	}
	exponentSignum = 1
	state = uint32(14) /* EXPONENT_SIGNUM */
	goto __4
__130:
	;
__129:
	;
	// FALLTHROUGH

__19:
	// Found the E at the start of the exponent, followed by a sign
	// character.

	if !(libc.Xisdigit(tls, int32(uint8(c))) != 0) {
		goto __131
	}
	exponent = int32(int32(c) - '0')
	state = uint32(15) /* EXPONENT */
	goto __4
__131:
	;
	goto endgame

__20:
	// Found an exponent with at least one digit. Accumulate it,
	// making sure to hard-pin it to LONG_MAX on overflow.

	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	if !(libc.Xisdigit(tls, int32(uint8(c))) != 0) {
		goto __132
	}
	if !(exponent < (0x7fffffff-9)/10) {
		goto __133
	}
	exponent = 10*exponent + int32(int32(c)-'0')
	goto __134
__133:
	exponent = 0x7fffffff
__134:
	;
	state = uint32(15) /* EXPONENT */
	goto __4
__132:
	;
	goto endgame

	// Parse out INFINITY by simply spelling it out. INF is accepted
	// as an abbreviation; other prefices are not.

__21:
	if !(int32(c) == 'n' || int32(c) == 'N') {
		goto __135
	}
	state = uint32(17) /* sIN */
	goto __4
__135:
	;
	goto endgame
__22:
	if !(int32(c) == 'f' || int32(c) == 'F') {
		goto __136
	}
	state = uint32(18) /* sINF */
	goto __4
__136:
	;
	goto endgame
__23:
	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	if !(int32(c) == 'i' || int32(c) == 'I') {
		goto __137
	}
	state = uint32(19) /* sINFI */
	goto __4
__137:
	;
	goto endgame
__24:
	if !(int32(c) == 'n' || int32(c) == 'N') {
		goto __138
	}
	state = uint32(20) /* sINFIN */
	goto __4
__138:
	;
	goto endgame
__25:
	if !(int32(c) == 'i' || int32(c) == 'I') {
		goto __139
	}
	state = uint32(21) /* sINFINI */
	goto __4
__139:
	;
	goto endgame
__26:
	if !(int32(c) == 't' || int32(c) == 'T') {
		goto __140
	}
	state = uint32(22) /* sINFINIT */
	goto __4
__140:
	;
	goto endgame
__27:
	if !(int32(c) == 'y' || int32(c) == 'Y') {
		goto __141
	}
	state = uint32(23) /* sINFINITY */
	goto __4
__141:
	;
	goto endgame

	// Parse NaN's.
__28:
	if !(int32(c) == 'a' || int32(c) == 'A') {
		goto __142
	}
	state = uint32(25) /* sNA */
	goto __4
__142:
	;
	goto endgame
__29:
	if !(int32(c) == 'n' || int32(c) == 'N') {
		goto __143
	}
	state = uint32(26) /* sNAN */
	goto __4
__143:
	;
	goto endgame
__30:
	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	if !(int32(c) == '(') {
		goto __144
	}
	state = uint32(27) /* sNANPAREN */
	goto __4
__144:
	;
	goto endgame

	// Parse NaN(hexdigits)
__31:
	if !(int32(c) == ')') {
		goto __145
	}
	state = uint32(29) /* sNANFINISH */
	goto __4
__145:
	;
	// FALLTHROUGH
__32:
	if !(func() int32 {
		if int32(c) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(c))
	}() != 0) {
		goto __146
	}
	goto __4
__146:
	;
	if !(numSigDigs < 13) {
		goto __147
	}
	if !(int32(c) >= '0' && int32(c) <= '9') {
		goto __148
	}
	d = int8(int32(c) - '0')
	goto __149
__148:
	if !(int32(c) >= 'a' && int32(c) <= 'f') {
		goto __150
	}
	d = int8(10 + int32(c) - 'a')
	goto __151
__150:
	if !(int32(c) >= 'A' && int32(c) <= 'F') {
		goto __152
	}
	d = int8(10 + int32(c) - 'A')
	goto __153
__152:
	goto endgame
__153:
	;
__151:
	;
__149:
	;
	numSigDigs++
	*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)) = *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56))<<4 + Tcl_WideUInt(d)
	state = uint32(28) /* sNANHEX */
	goto __4
__147:
	;
	goto endgame
__33:

__34:
	acceptState = uint32(state)
	acceptPoint = p
	acceptLen = len
	goto endgame
__4:
	;
	p++
	len--
	goto __2
__3:
	;

endgame:
	if !(int32(acceptState) == 0) {
		goto __154
	}
	// No numeric string at all found.

	status = TCL_ERROR
	if !(endPtrPtr != uintptr(0)) {
		goto __156
	}
	*(*uintptr)(unsafe.Pointer(endPtrPtr)) = p
__156:
	;
	goto __155
__154:
	// Back up to the last accepting state in the lexer.

	p = acceptPoint
	len = acceptLen
	if !!(flags&TCL_PARSE_NO_WHITESPACE != 0) {
		goto __157
	}
	// Accept trailing whitespace.

__158:
	if !(len != uint64(0) && func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0) {
		goto __159
	}
	p++
	len--
	goto __158
__159:
	;
__157:
	;
	if !(endPtrPtr == uintptr(0)) {
		goto __160
	}
	if !(len != uint64(0) && (numBytes > 0 || int32(*(*int8)(unsafe.Pointer(p))) != 0)) {
		goto __162
	}
	status = TCL_ERROR
__162:
	;
	goto __161
__160:
	*(*uintptr)(unsafe.Pointer(endPtrPtr)) = p
__161:
	;
__155:
	;

	// Generate and store the appropriate internal rep.

	if !(status == TCL_OK && objPtr != uintptr(0)) {
		goto __163
	}
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __164
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __165
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__165:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__164:
	;

	switch acceptState {
	case uint32(1) /* SIGNUM */ :
		goto __167
	case uint32(9) /* BAD_OCTAL */ :
		goto __168
	case uint32(3) /* ZERO_X */ :
		goto __169
	case uint32(4) /* ZERO_O */ :
		goto __170
	case uint32(5) /* ZERO_B */ :
		goto __171
	case uint32(11) /* LEADING_RADIX_POINT */ :
		goto __172
	case uint32(13) /* EXPONENT_START */ :
		goto __173
	case uint32(14) /* EXPONENT_SIGNUM */ :
		goto __174
	case uint32(16) /* sI */ :
		goto __175
	case uint32(17) /* sIN */ :
		goto __176
	case uint32(19) /* sINFI */ :
		goto __177
	case uint32(20) /* sINFIN */ :
		goto __178
	case uint32(21) /* sINFINI */ :
		goto __179
	case uint32(22) /* sINFINIT */ :
		goto __180
	case uint32(24) /* sN */ :
		goto __181
	case uint32(25) /* sNA */ :
		goto __182
	case uint32(27) /* sNANPAREN */ :
		goto __183
	case uint32(28) /* sNANHEX */ :
		goto __184
	case uint32(6) /* BINARY */ :
		goto __185

	case uint32(7) /* HEXADECIMAL */ :
		goto __186

	case uint32(8) /* OCTAL */ :
		goto __187

	case uint32(2) /* ZERO */ :
		goto __188
	case uint32(10) /* DECIMAL */ :
		goto __189

	case uint32(12) /* FRACTION */ :
		goto __190
	case uint32(15) /* EXPONENT */ :
		goto __191

	case uint32(18) /* sINF */ :
		goto __192
	case uint32(23) /* sINFINITY */ :
		goto __193

	case uint32(26) /* sNAN */ :
		goto __194
	case uint32(29) /* sNANFINISH */ :
		goto __195
	case uint32(0) /* INITIAL */ :
		goto __196
	}
	goto __166
__167:
__168:
__169:
__170:
__171:
__172:
__173:
__174:
__175:
__176:
__177:
__178:
__179:
__180:
__181:
__182:
__183:
__184:
	XTcl_Panic(tls, ts+63004,
		libc.VaList(bp, acceptState, bytes))
__185:
	shift = numTrailZeros
	if !(!(significandOverflow != 0) && *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) != uint64(0) && (Size_t(shift) >= uint64(8)*uint64(unsafe.Sizeof(Tcl_WideUInt(0))) || *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) > (Tcl_WideUInt(libc.CplUint64(uint64(0)))>>1+Tcl_WideUInt(signum))>>shift)) {
		goto __197
	}
	significandOverflow = 1
	XTclBNInitBignumFromWideUInt(tls, bp+64, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
__197:
	;
	if !(shift != 0) {
		goto __198
	}
	if !!(significandOverflow != 0) {
		goto __199
	}
	*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)) <<= shift
	goto __200
__199:
	XTclBN_mp_mul_2d(tls, bp+64, shift, bp+64)
__200:
	;
__198:
	;
	goto returnInteger

__186:
	// Returning a hex integer. Final scaling step.

	shift = 4 * numTrailZeros
	if !(!(significandOverflow != 0) && *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) != uint64(0) && (Size_t(shift) >= uint64(8)*uint64(unsafe.Sizeof(Tcl_WideUInt(0))) || *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) > (Tcl_WideUInt(libc.CplUint64(uint64(0)))>>1+Tcl_WideUInt(signum))>>shift)) {
		goto __201
	}
	significandOverflow = 1
	XTclBNInitBignumFromWideUInt(tls, bp+64, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
__201:
	;
	if !(shift != 0) {
		goto __202
	}
	if !!(significandOverflow != 0) {
		goto __203
	}
	*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)) <<= shift
	goto __204
__203:
	XTclBN_mp_mul_2d(tls, bp+64, shift, bp+64)
__204:
	;
__202:
	;
	goto returnInteger

__187:
	// Returning an octal integer. Final scaling step.

	shift = 3 * numTrailZeros
	if !(!(octalSignificandOverflow != 0) && octalSignificandWide != uint64(0) && (Size_t(shift) >= uint64(8)*uint64(unsafe.Sizeof(Tcl_WideUInt(0))) || octalSignificandWide > (Tcl_WideUInt(libc.CplUint64(uint64(0)))>>1+Tcl_WideUInt(signum))>>shift)) {
		goto __205
	}
	octalSignificandOverflow = 1
	XTclBNInitBignumFromWideUInt(tls, bp+88,
		octalSignificandWide)
__205:
	;
	if !(shift != 0) {
		goto __206
	}
	if !!(octalSignificandOverflow != 0) {
		goto __207
	}
	octalSignificandWide <<= shift
	goto __208
__207:
	XTclBN_mp_mul_2d(tls, bp+88, shift,
		bp+88)
__208:
	;
__206:
	;
	if !!(octalSignificandOverflow != 0) {
		goto __209
	}
	if !(octalSignificandWide > Tcl_WideUInt(uint32(libc.CplUint32(uint32(0)))>>1+uint32(signum))) {
		goto __210
	}
	if !(octalSignificandWide <= Tcl_WideUInt(libc.CplUint64(uint64(0)))>>1+Tcl_WideUInt(signum)) {
		goto __212
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclWideIntType))
	if !(signum != 0) {
		goto __213
	}
	*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)) = -Tcl_WideInt(octalSignificandWide)
	goto __214
__213:
	*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)) = Tcl_WideInt(octalSignificandWide)
__214:
	;
	goto __166
__212:
	;
	XTclBNInitBignumFromWideUInt(tls, bp+88,
		octalSignificandWide)
	octalSignificandOverflow = 1
	goto __211
__210:
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	if !(signum != 0) {
		goto __215
	}
	*(*int32)(unsafe.Pointer(objPtr + 32)) = -int32(octalSignificandWide)
	goto __216
__215:
	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(octalSignificandWide)
__216:
	;
__211:
	;
__209:
	;
	if !(octalSignificandOverflow != 0) {
		goto __217
	}
	if !(signum != 0) {
		goto __218
	}
	XTclBN_mp_neg(tls, bp+88, bp+88)
__218:
	;
	XTclSetBignumInternalRep(tls, objPtr, bp+88)
__217:
	;
	goto __166

__188:
__189:
	significandOverflow = sAccumulateDecimalDigit(tls, uint32(0), numTrailZeros-1,
		bp+56, bp+64, significandOverflow)
	if !(!(significandOverflow != 0) && *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) > Tcl_WideUInt(libc.CplUint64(uint64(0)))>>1+Tcl_WideUInt(signum)) {
		goto __219
	}
	significandOverflow = 1
	XTclBNInitBignumFromWideUInt(tls, bp+64, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
__219:
	;
returnInteger:
	if !!(significandOverflow != 0) {
		goto __220
	}
	if !(*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) > Tcl_WideUInt(uint32(libc.CplUint32(uint32(0)))>>1+uint32(signum))) {
		goto __221
	}
	if !(*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56)) <= Tcl_WideUInt(libc.CplUint64(uint64(0)))>>1+Tcl_WideUInt(signum)) {
		goto __223
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclWideIntType))
	if !(signum != 0) {
		goto __224
	}
	*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)) = -Tcl_WideInt(*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
	goto __225
__224:
	*(*Tcl_WideInt)(unsafe.Pointer(objPtr + 32)) = Tcl_WideInt(*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
__225:
	;
	goto __166
__223:
	;
	XTclBNInitBignumFromWideUInt(tls, bp+64,
		*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
	significandOverflow = 1
	goto __222
__221:
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
	if !(signum != 0) {
		goto __226
	}
	*(*int32)(unsafe.Pointer(objPtr + 32)) = -int32(*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
	goto __227
__226:
	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(*(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
__227:
	;
__222:
	;
__220:
	;
	if !(significandOverflow != 0) {
		goto __228
	}
	if !(signum != 0) {
		goto __229
	}
	XTclBN_mp_neg(tls, bp+64, bp+64)
__229:
	;
	XTclSetBignumInternalRep(tls, objPtr, bp+64)
__228:
	;
	goto __166

__190:
__191:

	// Here, we're parsing a floating-point number. 'significandWide'
	// or 'significandBig' contains the exact significand, according
	// to whether 'significandOverflow' is set. The desired floating
	// point value is significand * 10**k, where
	// k = numTrailZeros+exponent-numDigitsAfterDp.

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDoubleType))
	if !(exponentSignum != 0) {
		goto __230
	}
	// At this point exponent>=0, so the following calculation
	// cannot underflow.
	exponent = -exponent
__230:
	;

	// Adjust the exponent for the number of trailing zeros that
	// have not been accumulated, and the number of digits after
	// the decimal point. Pin any overflow to LONG_MAX/LONG_MIN
	// respectively.

	if !(exponent >= 0) {
		goto __231
	}
	if !(exponent-int32(numDigitsAfterDp) > 0x7fffffff-int32(numTrailZeros)) {
		goto __233
	}
	exponent = 0x7fffffff
	goto __234
__233:
	exponent = exponent - int32(numDigitsAfterDp) + int32(numTrailZeros)
__234:
	;
	goto __232
__231:
	if !(exponent+int32(numTrailZeros) < -0x7fffffff-1+int32(numDigitsAfterDp)) {
		goto __235
	}
	exponent = -0x7fffffff - 1
	goto __236
__235:
	exponent = exponent + int32(numTrailZeros) - int32(numDigitsAfterDp)
__236:
	;
__232:
	;

	// The desired number is now significandWide * 10**exponent
	// or significandBig * 10**exponent, depending on whether
	// the significand has overflowed a wide int.
	if !!(significandOverflow != 0) {
		goto __237
	}
	*(*float64)(unsafe.Pointer(objPtr + 32)) = sMakeLowPrecisionDouble(tls,
		signum, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)), numSigDigs, exponent)
	goto __238
__237:
	*(*float64)(unsafe.Pointer(objPtr + 32)) = sMakeHighPrecisionDouble(tls,
		signum, bp+64, numSigDigs, exponent)
__238:
	;
	goto __166

__192:
__193:
	if !(signum != 0) {
		goto __239
	}
	*(*float64)(unsafe.Pointer(objPtr + 32)) = -libc.X__builtin_huge_val(tls)
	goto __240
__239:
	*(*float64)(unsafe.Pointer(objPtr + 32)) = libc.X__builtin_huge_val(tls)
__240:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDoubleType))
	goto __166

__194:
__195:
	*(*float64)(unsafe.Pointer(objPtr + 32)) = sMakeNaN(tls, signum, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 56 /* significandWide */)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclDoubleType))
	goto __166
__196:
	// This case only to silence compiler warning.
	XTcl_Panic(tls, ts+63052, 0)
__166:
	;
__163:
	;

	// Format an error message when an invalid number is encountered.

	if !(status != TCL_OK) {
		goto __241
	}
	if !(interp != uintptr(0)) {
		goto __242
	}
	msg = XTcl_ObjPrintf(tls, ts+63100,
		libc.VaList(bp+16, expected))

	XTcl_AppendLimitedToObj(tls, msg, bytes, numBytes, 50, ts+2631)
	XTcl_AppendToObj(tls, msg, ts+25631, -1)
	if !(state == uint32(9)) {
		goto __243
	}
	XTcl_AppendToObj(tls, msg, ts+63122, -1)
__243:
	;
	XTcl_SetObjResult(tls, interp, msg)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+7444, ts+35260, uintptr(0)))
__242:
	;
__241:
	;

	// Free memory.

	if !(octalSignificandOverflow != 0) {
		goto __244
	}
	XTclBN_mp_clear(tls, bp+88)
__244:
	;
	if !(significandOverflow != 0) {
		goto __245
	}
	XTclBN_mp_clear(tls, bp+64)
__245:
	;
	return status
}

//----------------------------------------------------------------------
//
// AccumulateDecimalDigit --
//
//	Consume a decimal digit in a number being scanned.
//
// Results:
//	Returns 1 if the number has overflowed to a bignum, 0 if it still fits
//	in a wide integer.
//
// Side effects:
//	Updates either the wide or bignum representation.
//
//----------------------------------------------------------------------

func sAccumulateDecimalDigit(tls *libc.TLS, digit uint32, numZeros int32, wideRepPtr uintptr, bignumRepPtr uintptr, bignumFlag int32) int32 { /* tclStrToD.c:1467:1: */
	var i int32
	var n int32
	var w Tcl_WideUInt

	// Try wide multiplication first.

	if !(bignumFlag != 0) {
		w = *(*Tcl_WideUInt)(unsafe.Pointer(wideRepPtr))
		if w == uint64(0) {
			// There's no need to multiply if the multiplicand is zero.

			*(*Tcl_WideUInt)(unsafe.Pointer(wideRepPtr)) = Tcl_WideUInt(digit)
			return 0
		} else if numZeros >= maxpow10_wide ||
			w > (libc.CplUint64(uint64(0))-Tcl_WideUInt(digit)) / *(*Tcl_WideUInt)(unsafe.Pointer(pow10_wide + uintptr(numZeros+1)*8)) {
			// Wide multiplication will overflow.  Expand the number to a
			// bignum and fall through into the bignum case.

			XTclBNInitBignumFromWideUInt(tls, bignumRepPtr, w)
		} else {
			// Wide multiplication.

			*(*Tcl_WideUInt)(unsafe.Pointer(wideRepPtr)) = w**(*Tcl_WideUInt)(unsafe.Pointer(pow10_wide + uintptr(numZeros+1)*8)) + Tcl_WideUInt(digit)
			return 0
		}
	}

	// Bignum multiplication.

	if numZeros < log10_DIGIT_MAX {
		// Up to about 8 zeros - single digit multiplication.

		XTclBN_mp_mul_d(tls, bignumRepPtr, Mp_digit(*(*Tcl_WideUInt)(unsafe.Pointer(pow10_wide + uintptr(numZeros+1)*8))),
			bignumRepPtr)
		XTclBN_mp_add_d(tls, bignumRepPtr, digit, bignumRepPtr)
	} else {
		// More than single digit multiplication. Multiply by the appropriate
		// small powers of 5, and then shift. Large strings of zeroes are
		// eaten 256 at a time; this is less efficient than it could be, but
		// seems implausible. We presume that MP_DIGIT_BIT is at least 27. The
		// first multiplication, by up to 10**7, is done with a one-DIGIT
		// multiply (this presumes that MP_DIGIT_BIT >= 24).

		n = numZeros + 1
		XTclBN_mp_mul_d(tls, bignumRepPtr, Mp_digit(*(*Tcl_WideUInt)(unsafe.Pointer(pow10_wide + uintptr(n&0x7)*8))), bignumRepPtr)
		for i = 3; i <= 7; i++ {
			if n&(int32(1)<<i) != 0 {
				XTclBN_mp_mul(tls, bignumRepPtr, uintptr(unsafe.Pointer(&pow5))+uintptr(i)*24, bignumRepPtr)
			}
		}
		for n >= 256 {
			XTclBN_mp_mul(tls, bignumRepPtr, uintptr(unsafe.Pointer(&pow5))+uintptr(8)*24, bignumRepPtr)
			n = n - 256
		}
		XTclBN_mp_mul_2d(tls, bignumRepPtr, (numZeros+1)&libc.CplInt32(0x7), bignumRepPtr)
		XTclBN_mp_add_d(tls, bignumRepPtr, digit, bignumRepPtr)
	}

	return 1
}

//----------------------------------------------------------------------
//
// MakeLowPrecisionDouble --
//
//	Makes the double precision number, signum*significand*10**exponent.
//
// Results:
//	Returns the constructed number.
//
//	Common cases, where there are few enough digits that the number can be
//	represented with at most roundoff, are handled specially here. If the
//	number requires more than one rounded operation to compute, the code
//	promotes the significand to a bignum and calls MakeHighPrecisionDouble
//	to do it instead.
//
//----------------------------------------------------------------------

func sMakeLowPrecisionDouble(tls *libc.TLS, signum int32, significand Tcl_WideUInt, numSigDigs int32, exponent int32) float64 { /* tclStrToD.c:1572:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var retval float64 // Value of the number.
	// var significandBig Mp_int at bp, 24

	// 10**exponent is not an exact integer, but
	// 10**(exponent-diff) is exact, and so is
	// significand*10**diff, so we can still compute the value
	// with only one roundoff.

	var factor float64
	var diff int32 // Significand expressed as a bignum.

	// With gcc on x86, the floating point rounding mode is double-extended.
	// This causes the result of double-precision calculations to be rounded
	// twice: once to the precision of double-extended and then again to the
	// precision of double. Double-rounding introduces gratuitous errors of 1
	// ulp, so we need to change rounding mode to 53-bits.

	// Test for the easy cases.

	if !(significand == uint64(0)) {
		goto __1
	}
	return libc.X_copysign(tls, 0.0, float64(-signum))
__1:
	;
	if !(numSigDigs <= QUICK_MAX) {
		goto __2
	}
	if !(exponent >= 0) {
		goto __3
	}
	if !(exponent <= int32(mmaxpow)) {
		goto __5
	}
	// The significand is an exact integer, and so is
	// 10**exponent. The product will be correct to within 1/2 ulp
	// without special handling.

	retval = float64(Tcl_WideInt(significand)) * pow10vals[exponent]
	goto returnValue
	goto __6
__5:
	diff = QUICK_MAX - numSigDigs

	if !(exponent-int32(diff) <= int32(mmaxpow)) {
		goto __7
	}
	// 10**exponent is not an exact integer, but
	// 10**(exponent-diff) is exact, and so is
	// significand*10**diff, so we can still compute the value
	// with only one roundoff.

	factor = float64(Tcl_WideInt(significand)) * pow10vals[diff]
	retval = factor * pow10vals[exponent-int32(diff)]
	goto returnValue
__7:
	;
__6:
	;
	goto __4
__3:
	if !(exponent >= int32(-mmaxpow)) {
		goto __8
	}
	// 10**-exponent is an exact integer, and so is the
	// significand. Compute the result by one division, again with
	// only one rounding.

	retval = float64(Tcl_WideInt(significand)) / pow10vals[-exponent]
	goto returnValue
__8:
	;
__4:
	;
__2:
	;

	// All the easy cases have failed. Promote ths significand to bignum and
	// call MakeHighPrecisionDouble to do it the hard way.

	XTclBNInitBignumFromWideUInt(tls, bp, significand)
	retval = sMakeHighPrecisionDouble(tls, 0, bp, numSigDigs,
		exponent)
	XTclBN_mp_clear(tls, bp)

	// Come here to return the computed value.

returnValue:
	if !(signum != 0) {
		goto __9
	}
	retval = -retval
__9:
	;

	// On gcc on x86, restore the floating point mode word.

	return retval
}

//----------------------------------------------------------------------
//
// MakeHighPrecisionDouble --
//
//	Makes the double precision number, signum*significand*10**exponent.
//
// Results:
//	Returns the constructed number.
//
//	MakeHighPrecisionDouble is used when arbitrary-precision arithmetic is
//	needed to ensure correct rounding. It begins by calculating a
//	low-precision approximation to the desired number, and then refines
//	the answer in high precision.
//
//----------------------------------------------------------------------

func sMakeHighPrecisionDouble(tls *libc.TLS, signum int32, significand uintptr, numSigDigs int32, exponent int32) float64 { /* tclStrToD.c:1689:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var retval float64
	// var machexp int32 at bp, 4
	// Machine exponent of a power of 10.

	// With gcc on x86, the floating point rounding mode is double-extended.
	// This causes the result of double-precision calculations to be rounded
	// twice: once to the precision of double-extended and then again to the
	// precision of double. Double-rounding introduces gratuitous errors of 1
	// ulp, so we need to change rounding mode to 53-bits.

	// Quick checks for zero, and over/underflow. Be careful to avoid
	// integer overflow when calculating with 'exponent'.

	if !(func() int32 {
		if (*Mp_int)(unsafe.Pointer(significand)).Fused == 0 {
			return MP_YES
		}
		return MP_NO
	}() != 0) {
		goto __1
	}
	return libc.X_copysign(tls, 0.0, float64(-signum))
__1:
	;
	if !(exponent >= 0 && exponent-1 > int32(maxDigits-numSigDigs)) {
		goto __2
	}
	retval = libc.X__builtin_huge_val(tls)
	goto returnValue
	goto __3
__2:
	if !(exponent < 0 && int32(numSigDigs)+exponent < int32(minDigits+1)) {
		goto __4
	}
	retval = 0.0
	goto returnValue
__4:
	;
__3:
	;

	// Develop a first approximation to the significand. It is tempting simply
	// to force bignum to double, but that will overflow on input numbers like
	// 1.[string repeat 0 1000]1; while this is a not terribly likely
	// scenario, we still have to deal with it. Use fraction and exponent
	// instead. Once we have the significand, multiply by 10**exponent. Test
	// for overflow. Convert back to a double, and test for underflow.

	retval = sBignumToBiasedFrExp(tls, significand, bp)
	retval = sPow10TimesFrExp(tls, int32(exponent), retval, bp)
	if !(*(*int32)(unsafe.Pointer(bp)) > 1024*log2FLT_RADIX) {
		goto __5
	}
	retval = libc.X__builtin_huge_val(tls)
	goto returnValue
__5:
	;
	retval = sSafeLdExp(tls, retval, *(*int32)(unsafe.Pointer(bp /* machexp */)))
	if !(tiny == 0.0) {
		goto __6
	}
	tiny = sSafeLdExp(tls, 1.0, -1021*log2FLT_RADIX-mantBits)
__6:
	;
	if !(retval < tiny) {
		goto __7
	}
	retval = tiny
__7:
	;

	// Refine the result twice. (The second refinement should be necessary
	// only if the best approximation is a power of 2 minus 1/2 ulp).

	retval = sRefineApproximation(tls, retval, significand, int32(exponent))
	retval = sRefineApproximation(tls, retval, significand, int32(exponent))

	// Come here to return the computed value.

returnValue:
	if !(signum != 0) {
		goto __8
	}
	retval = -retval
__8:
	;

	// On gcc on x86, restore the floating point mode word.

	return retval
}

//----------------------------------------------------------------------
//
// MakeNaN --
//
//	Makes a "Not a Number" given a set of bits to put in the tag bits
//
//	Note that a signalling NaN is never returned.
//
//----------------------------------------------------------------------

func sMakeNaN(tls *libc.TLS, signum int32, tags Tcl_WideUInt) float64 { /* tclStrToD.c:1787:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var theNaN struct {Fiv Tcl_WideUInt;} at bp, 8

	*(*Tcl_WideUInt)(unsafe.Pointer(bp)) = tags
	*(*Tcl_WideUInt)(unsafe.Pointer(bp)) &= Tcl_WideUInt(uint64(1))<<51 - uint64(1)
	if signum != 0 {
		*(*Tcl_WideUInt)(unsafe.Pointer(bp)) |= Tcl_WideUInt(uint64(0x8000|NAN_START)) << 48
	} else {
		*(*Tcl_WideUInt)(unsafe.Pointer(bp)) |= Tcl_WideUInt(uint64(NAN_START)) << 48
	}
	if n770_fp != 0 {
		*(*Tcl_WideUInt)(unsafe.Pointer(bp)) = sNokia770Twiddle(tls, *(*Tcl_WideUInt)(unsafe.Pointer(bp)))
	}
	return *(*float64)(unsafe.Pointer(bp))
}

//----------------------------------------------------------------------
//
// RefineApproximation --
//
//	Given a poor approximation to a floating point number, returns a
//	better one. (The better approximation is correct to within 1 ulp, and
//	is entirely correct if the poor approximation is correct to 1 ulp.)
//
// Results:
//	Returns the improved result.
//
//----------------------------------------------------------------------

func sRefineApproximation(tls *libc.TLS, approxResult float64, exactSignificand uintptr, exponent int32) float64 { /* tclStrToD.c:1826:1: */
	bp := tls.Alloc(60)
	defer tls.Free(60)

	var M2 int32
	var M5 int32 // Powers of 2 and of 5 needed to put the
	// decimal and binary numbers over a common
	// denominator.
	var significand float64 // Sigificand of the binary number.
	// var binExponent int32 at bp, 4
	// Exponent of the binary number.
	var msb int32 // Most significant bit position of an
	// intermediate result.
	var nDigits int32 // Number of mp_digit's in an intermediate
	// result.
	// var twoMv Mp_int at bp+8, 24
	// Approx binary value expressed as an exact
	// integer scaled by the multiplier 2M.
	// var twoMd Mp_int at bp+32, 24
	// Exact decimal value expressed as an exact
	// integer scaled by the multiplier 2M.
	var scale int32      // Scale factor for M.
	var multiplier int32 // Power of two to scale M.
	var num float64
	var den float64 // Numerator and denominator of the correction
	// term.
	var quot float64    // Correction term.
	var minincr float64 // Lower bound on the absolute value of the
	// correction term.
	var roundToEven int32 = 0 // Flag == TRUE if we need to invoke
	// "round to even" functionality
	var rteSignificand float64 // Significand of the round-to-even result
	// var rteExponent int32 at bp+56, 4
	// Exponent of the round-to-even result
	var shift int32 // Shift count for converting numerator
	// and denominator of corrector to floating
	// point
	var rteSigWide Tcl_WideInt // Wide integer version of the significand
	// for testing evenness
	var i int32

	// The first approximation is always low. If we find that it's HUGE_VAL,
	// we're done.

	if approxResult == libc.X__builtin_huge_val(tls) {
		return approxResult
	}
	significand = libc.Xfrexp(tls, approxResult, bp)

	// We are trying to compute a corrector term that, when added to the
	// approximate result, will yield close to the exact result.
	// The exact result is exactSignificand * 10**exponent.
	// The approximate result is significand * 2**binExponent
	// If exponent<0, we need to multiply the exact value by 10**-exponent
	// to make it an integer, plus another factor of 2 to decide on rounding.
	//  Similarly if binExponent<FP_PRECISION, we need
	// to multiply by 2**FP_PRECISION to make the approximate value an integer.
	//
	// Let M = 2**M2 * 5**M5 be the least common multiple of these two
	// multipliers.

	i = mantBits - *(*int32)(unsafe.Pointer(bp))
	if i < 0 {
		M2 = 0
	} else {
		M2 = i
	}
	if exponent > 0 {
		M5 = 0
	} else {
		M5 = -exponent
		if M5-1 > M2 {
			M2 = M5 - 1
		}
	}

	// Compute twoMv as 2*M*v, where v is the approximate value.
	// This is done by bit-whacking to calculate 2**(M2+1)*significand,
	// and then multiplying by 5**M5.

	msb = *(*int32)(unsafe.Pointer(bp)) + M2 // 1008
	nDigits = msb/MP_DIGIT_BIT + 1
	XTclBN_mp_init_size(tls, bp+8, nDigits)
	i = msb%MP_DIGIT_BIT + 1
	(*Mp_int)(unsafe.Pointer(bp + 8 /* &twoMv */)).Fused = nDigits
	significand = significand * sSafeLdExp(tls, 1.0, i)
	for libc.PreDecInt32(&nDigits, 1) >= 0 {
		*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+8 /* &twoMv */)).Fdp + uintptr(nDigits)*4)) = Mp_digit(significand)
		significand = significand - float64(Mp_digit(significand))
		significand = sSafeLdExp(tls, significand, MP_DIGIT_BIT)
	}
	for i = 0; i <= 8; i++ {
		if M5&(int32(1)<<i) != 0 {
			XTclBN_mp_mul(tls, bp+8, uintptr(unsafe.Pointer(&pow5))+uintptr(i)*24, bp+8)
		}
	}

	// Compute twoMd as 2*M*d, where d is the exact value.
	// This is done by multiplying by 5**(M5+exponent) and then multiplying
	// by 2**(M5+exponent+1), which is, of couse, a left shift.

	XTclBN_mp_init_copy(tls, bp+32, exactSignificand)
	for i = 0; i <= 8; i++ {
		if (M5+exponent)&(int32(1)<<i) != 0 {
			XTclBN_mp_mul(tls, bp+32, uintptr(unsafe.Pointer(&pow5))+uintptr(i)*24, bp+32)
		}
	}
	XTclBN_mp_mul_2d(tls, bp+32, M2+exponent+1, bp+32)

	// Now let twoMd = twoMd - twoMv, the difference between the exact and
	// approximate values.

	XTclBN_mp_sub(tls, bp+32, bp+8, bp+32)

	// The result, 2Mv-2Md, needs to be divided by 2M to yield a correction
	// term. Because 2M may well overflow a double, we need to scale the
	// denominator by a factor of 2**binExponent-mantBits. Place that factor
	// times 1/2 ULP into twoMd.

	scale = *(*int32)(unsafe.Pointer(bp)) - mantBits - 1
	XTclBN_mp_set(tls, bp+8, uint32(1))
	for i = 0; i <= 8; i++ {
		if M5&(int32(1)<<i) != 0 {
			XTclBN_mp_mul(tls, bp+8, uintptr(unsafe.Pointer(&pow5))+uintptr(i)*24, bp+8)
		}
	}
	multiplier = M2 + scale + 1
	if multiplier > 0 {
		XTclBN_mp_mul_2d(tls, bp+8, multiplier, bp+8)
	} else if multiplier < 0 {
		XTclBN_mp_div_2d(tls, bp+8, -multiplier, bp+8, uintptr(0))
	}

	// Will the eventual correction term be less than, equal to, or
	// greater than 1/2 ULP?

	switch XTclBN_mp_cmp_mag(tls, bp+32, bp+8) {
	case -1:
		// If the error is less than 1/2 ULP, there's no correction to make.
		XTclBN_mp_clear(tls, bp+32)
		XTclBN_mp_clear(tls, bp+8)
		return approxResult
	case MP_EQ:
		// If the error is exactly 1/2 ULP, we need to round to even.
		roundToEven = 1
		break
	case MP_GT:
		// We need to correct the result if the error exceeds 1/2 ULP.
		break
	}

	// If we're in the 'round to even' case, and the significand is already
	// even, we're done. Return the approximate result.
	if roundToEven != 0 {
		rteSignificand = libc.Xfrexp(tls, approxResult, bp+56)
		rteSigWide = libc.Int64FromFloat64(libc.Xldexp(tls, rteSignificand, FP_PRECISION))
		if rteSigWide&int64(1) == int64(0) {
			XTclBN_mp_clear(tls, bp+32)
			XTclBN_mp_clear(tls, bp+8)
			return approxResult
		}
	}

	// Reduce the numerator and denominator of the corrector term so that
	// they will fit in the floating point precision.
	shift = XTclBN_mp_count_bits(tls, bp+8) - FP_PRECISION - 1
	if shift > 0 {
		XTclBN_mp_div_2d(tls, bp+8, shift, bp+8, uintptr(0))
		XTclBN_mp_div_2d(tls, bp+32, shift, bp+32, uintptr(0))
	}

	// Convert the numerator and denominator of the corrector term accurately
	// to floating point numbers.

	num = XTclBignumToDouble(tls, bp+32)
	den = XTclBignumToDouble(tls, bp+8)

	quot = sSafeLdExp(tls, num/den, scale)
	minincr = sSafeLdExp(tls, 1.0, *(*int32)(unsafe.Pointer(bp))-mantBits)

	if quot < 0. && quot > -minincr {
		quot = -minincr
	} else if quot > 0. && quot < minincr {
		quot = minincr
	}

	XTclBN_mp_clear(tls, bp+32)
	XTclBN_mp_clear(tls, bp+8)

	return approxResult + quot
}

//----------------------------------------------------------------------
//
// MultPow5 --
//
//	Multiply a bignum by a power of 5.
//
// Side effects:
//	Stores base*5**n in result.
//
//----------------------------------------------------------------------

func sMulPow5(tls *libc.TLS, base uintptr, n uint32, result uintptr) { /* tclStrToD.c:2053:1: */
	var p uintptr = base
	var n13 int32 = int32(n / uint32(13))
	var r int32 = int32(n % uint32(13))

	if r != 0 {
		XTclBN_mp_mul_d(tls, p, dpow5[r], result)
		p = result
	}
	r = 0
	for n13 != 0 {
		if n13&1 != 0 {
			XTclBN_mp_mul(tls, p, uintptr(unsafe.Pointer(&pow5_13))+uintptr(r)*24, result)
			p = result
		}
		n13 >>= 1
		r++
	}
	if p != result {
		XTclBN_mp_copy(tls, p, result)
	}
}

//----------------------------------------------------------------------
//
// NormalizeRightward --
//
//	Shifts a number rightward until it is odd (that is, until the least
//	significant bit is nonzero.
//
// Results:
//	Returns the number of bit positions by which the number was shifted.
//
// Side effects:
//	Shifts the number in place; *wPtr is replaced by the shifted number.
//
//----------------------------------------------------------------------

func sNormalizeRightward(tls *libc.TLS, wPtr uintptr) int32 { /* tclStrToD.c:2098:1: */
	var rv int32 = 0
	var w Tcl_WideUInt = *(*Tcl_WideUInt)(unsafe.Pointer(wPtr))

	if !(w&uint64(0xFFFFFFFF) != 0) {
		w >>= 32
		rv = rv + 32
	}
	if !(w&uint64(0xFFFF) != 0) {
		w >>= 16
		rv = rv + 16
	}
	if !(w&uint64(0xFF) != 0) {
		w >>= 8
		rv = rv + 8
	}
	if !(w&uint64(0xF) != 0) {
		w >>= 4
		rv = rv + 4
	}
	if !(w&uint64(0x3) != 0) {
		w >>= 2
		rv = rv + 2
	}
	if !(w&uint64(0x1) != 0) {
		w >>= 1
		rv++
	}
	*(*Tcl_WideUInt)(unsafe.Pointer(wPtr)) = w
	return rv
}

//----------------------------------------------------------------------
//
// RequiredPrecision --
//
//	Determines the number of bits needed to hold an intger.
//
// Results:
//	Returns the position of the most significant bit (0 - 63).  Returns 0
//	if the number is zero.
//
//----------------------------------------------------------------------

func sRequiredPrecision(tls *libc.TLS, w Tcl_WideUInt) int32 { /* tclStrToD.c:2141:1: */
	var rv int32
	var wi uint32

	if w&(Tcl_WideUInt(uint64(0xFFFFFFFF))<<32) != 0 {
		wi = uint32(w >> 32)
		rv = 32
	} else {
		wi = uint32(w)
		rv = 0
	}
	if wi&0xFFFF0000 != 0 {
		wi >>= 16
		rv = rv + 16
	}
	if wi&uint32(0xFF00) != 0 {
		wi >>= 8
		rv = rv + 8
	}
	if wi&uint32(0xF0) != 0 {
		wi >>= 4
		rv = rv + 4
	}
	if wi&uint32(0xC) != 0 {
		wi >>= 2
		rv = rv + 2
	}
	if wi&uint32(0x2) != 0 {
		wi >>= 1
		rv++
	}
	if wi&uint32(0x1) != 0 {
		rv++
	}
	return rv
}

//----------------------------------------------------------------------
//
// DoubleToExpAndSig --
//
//	Separates a 'double' into exponent and significand.
//
// Side effects:
//	Stores the significand in '*significand' and the exponent in '*expon'
//	so that dv == significand * 2.0**expon, and significand is odd.  Also
//	stores the position of the leftmost 1-bit in 'significand' in 'bits'.
//
//----------------------------------------------------------------------

func sDoubleToExpAndSig(tls *libc.TLS, dv float64, significand uintptr, expon uintptr, bits uintptr) { /* tclStrToD.c:2189:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var d Double at bp, 8
	// Number being converted.
	// var z Tcl_WideUInt at bp+8, 8
	// Significand under construction.
	var de int32 // Exponent of the number.
	var k int32  // Bit count.

	*(*float64)(unsafe.Pointer(bp)) = dv

	// Extract exponent and significand.

	de = *(*int32)(unsafe.Pointer(bp + 4)) & EXP_MASK >> EXP_SHIFT
	*(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* z */)) = *(*Tcl_WideUInt)(unsafe.Pointer(bp)) & (Tcl_WideUInt(uint64(HI_ORDER_SIG_MASK))<<32 | uint64(0xFFFFFFFF))
	if de != 0 {
		*(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* z */)) |= Tcl_WideUInt(uint64(0x00100000)) << 32
		k = sNormalizeRightward(tls, bp+8)
		*(*int32)(unsafe.Pointer(bits)) = FP_PRECISION - k
		*(*int32)(unsafe.Pointer(expon)) = k + (de - EXPONENT_BIAS) - (FP_PRECISION - 1)
	} else {
		k = sNormalizeRightward(tls, bp+8)
		*(*int32)(unsafe.Pointer(expon)) = k + (de - EXPONENT_BIAS) - (FP_PRECISION - 1) + 1
		*(*int32)(unsafe.Pointer(bits)) = sRequiredPrecision(tls, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* z */)))
	}
	*(*Tcl_WideUInt)(unsafe.Pointer(significand)) = *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* z */))
}

//----------------------------------------------------------------------
//
// TakeAbsoluteValue --
//
//	Takes the absolute value of a 'double' including 0, Inf and NaN
//
// Side effects:
//	The 'double' in *d is replaced with its absolute value. The signum is
//	stored in 'sign': 1 for negative, 0 for nonnegative.
//
//----------------------------------------------------------------------

func sTakeAbsoluteValue(tls *libc.TLS, d uintptr, sign uintptr) { /* tclStrToD.c:2237:1: */
	if uint32(*(*int32)(unsafe.Pointer(d + 4)))&SIGN_BIT != 0 {
		*(*int32)(unsafe.Pointer(sign)) = 1
		*(*int32)(unsafe.Pointer(d + 4)) &= int32(libc.CplUint32(SIGN_BIT))
	} else {
		*(*int32)(unsafe.Pointer(sign)) = 0
	}
}

//----------------------------------------------------------------------
//
// FormatInfAndNaN --
//
//	Bailout for formatting infinities and Not-A-Number.
//
// Results:
//	Returns one of the strings 'Infinity' and 'NaN'.  The string returned
//	must be freed by the caller using 'ckfree'.
//
// Side effects:
//	Stores 9999 in *decpt, and sets '*endPtr' to designate the terminating
//	NUL byte of the string if 'endPtr' is not NULL.
//
//----------------------------------------------------------------------

func sFormatInfAndNaN(tls *libc.TLS, d uintptr, decpt uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:2267:20: */
	var retval uintptr

	*(*int32)(unsafe.Pointer(decpt)) = 9999
	if !(*(*int32)(unsafe.Pointer(d)) != 0) && !(*(*int32)(unsafe.Pointer(d + 4))&HI_ORDER_SIG_MASK != 0) {
		retval = XTcl_Alloc(tls, uint32(9))
		libc.Xstrcpy(tls, retval, ts+63157)
		if endPtr != 0 {
			*(*uintptr)(unsafe.Pointer(endPtr)) = retval + uintptr(8)
		}
	} else {
		retval = XTcl_Alloc(tls, uint32(4))
		libc.Xstrcpy(tls, retval, ts+63166)
		if endPtr != 0 {
			*(*uintptr)(unsafe.Pointer(endPtr)) = retval + uintptr(3)
		}
	}
	return retval
}

//----------------------------------------------------------------------
//
// FormatZero --
//
//	Bailout to format a zero floating-point number.
//
// Results:
//	Returns the constant string "0"
//
// Side effects:
//	Stores 1 in '*decpt' and puts a pointer to the NUL byte terminating
//	the string in '*endPtr' if 'endPtr' is not NULL.
//
//----------------------------------------------------------------------

func sFormatZero(tls *libc.TLS, decpt uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:2309:20: */
	var retval uintptr = XTcl_Alloc(tls, uint32(2))

	libc.Xstrcpy(tls, retval, ts+18935)
	if endPtr != 0 {
		*(*uintptr)(unsafe.Pointer(endPtr)) = retval + uintptr(1)
	}
	*(*int32)(unsafe.Pointer(decpt)) = 0
	return retval
}

//----------------------------------------------------------------------
//
// ApproximateLog10 --
//
//	Computes a two-term Taylor series approximation to the common log of a
//	number, and computes the number's binary log.
//
// Results:
//	Return an approximation to floor(log10(bw*2**be)) that is either exact
//	or 1 too high.
//
//----------------------------------------------------------------------

func sApproximateLog10(tls *libc.TLS, bw Tcl_WideUInt, be int32, bbits int32) int32 { /* tclStrToD.c:2340:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var i int32    // Log base 2 of the number.
	var k int32    // Floor(Log base 10 of the number)
	var ds float64 // Mantissa of the number.
	// var d2 Double at bp, 8

	// Compute i and d2 such that d = d2*2**i, and 1 < d2 < 2.
	// Compute an approximation to log10(d),
	//   log10(d) ~ log10(2) * i + log10(1.5)
	//            + (significand-1.5)/(1.5 * log(10))

	*(*Tcl_WideUInt)(unsafe.Pointer(bp)) = bw << (FP_PRECISION - bbits) & (Tcl_WideUInt(uint64(HI_ORDER_SIG_MASK))<<32 | uint64(0xFFFFFFFF))
	*(*int32)(unsafe.Pointer(bp + 4)) |= int32(EXPONENT_BIAS) << EXP_SHIFT
	i = be + bbits - 1
	ds = (*(*float64)(unsafe.Pointer(bp))-1.5)*0.28952965460216784 +
		0.1760912590558 + 0.3010299956639812*float64(i)
	k = int32(ds)
	if float64(k) > ds {
		k--
	}
	return k
}

//----------------------------------------------------------------------
//
// BetterLog10 --
//
//	Improves the result of ApproximateLog10 for numbers in the range
//	1 .. 10**(TEN_PMAX)-1
//
// Side effects:
//	Sets k_check to 0 if the new result is known to be exact, and to 1 if
//	it may still be one too high.
//
// Results:
//	Returns the improved approximation to log10(d).
//
//----------------------------------------------------------------------

func sBetterLog10(tls *libc.TLS, d float64, k int32, k_check uintptr) int32 { /* tclStrToD.c:2388:1: */
	// Performance hack. If k is in the range 0..TEN_PMAX, then we can use a
	// powers-of-ten table to check it.

	if k >= 0 && k <= TEN_PMAX {
		if d < tens[k] {
			k--
		}
		*(*int32)(unsafe.Pointer(k_check)) = 0
	} else {
		*(*int32)(unsafe.Pointer(k_check)) = 1
	}
	return k
}

//----------------------------------------------------------------------
//
// ComputeScale --
//
//	Prepares to format a floating-point number as decimal.
//
// Parameters:
//	floor(log10*x) is k (or possibly k-1).  floor(log2(x) is i.  The
//	significand of x requires bbits bits to represent.
//
// Results:
//	Determines integers b2, b5, s2, s5 so that sig*2**b2*5**b5/2**s2*2**s5
//	exactly represents the value of the x/10**k. This value will lie in
//	the range [1 .. 10), and allows for computing successive digits by
//	multiplying sig%10 by 10.
//
//----------------------------------------------------------------------

func sComputeScale(tls *libc.TLS, be int32, k int32, b2 uintptr, b5 uintptr, s2 uintptr, s5 uintptr) { /* tclStrToD.c:2431:1: */
	// Scale numerator and denominator powers of 2 so that the input binary
	// number is the ratio of integers.

	if be <= 0 {
		*(*int32)(unsafe.Pointer(b2)) = 0
		*(*int32)(unsafe.Pointer(s2)) = -be
	} else {
		*(*int32)(unsafe.Pointer(b2)) = be
		*(*int32)(unsafe.Pointer(s2)) = 0
	}

	// Scale numerator and denominator so that the output decimal number is
	// the ratio of integers.

	if k >= 0 {
		*(*int32)(unsafe.Pointer(b5)) = 0
		*(*int32)(unsafe.Pointer(s5)) = k
		*(*int32)(unsafe.Pointer(s2)) += k
	} else {
		*(*int32)(unsafe.Pointer(b2)) -= k
		*(*int32)(unsafe.Pointer(b5)) = -k
		*(*int32)(unsafe.Pointer(s5)) = 0
	}
}

//----------------------------------------------------------------------
//
// SetPrecisionLimits --
//
//	Determines how many digits of significance should be computed (and,
//	hence, how much memory need be allocated) for formatting a floating
//	point number.
//
// Given that 'k' is floor(log10(x)):
// if 'shortest' format is used, there will be at most 18 digits in the
// result.
// if 'F' format is used, there will be at most 'ndigits' + k + 1 digits
// if 'E' format is used, there will be exactly 'ndigits' digits.
//
// Side effects:
//	Adjusts '*ndigitsPtr' to have a valid value. Stores the maximum memory
//	allocation needed in *iPtr.  Sets '*iLimPtr' to the limiting number of
//	digits to convert if k has been guessed correctly, and '*iLim1Ptr' to
//	the limiting number of digits to convert if k has been guessed to be
//	one too high.
//
//----------------------------------------------------------------------

func sSetPrecisionLimits(tls *libc.TLS, convType int32, k int32, ndigitsPtr uintptr, iPtr uintptr, iLimPtr uintptr, iLim1Ptr uintptr) { /* tclStrToD.c:2494:1: */
	switch convType {
	case TCL_DD_SHORTEST0:
		fallthrough
	case TCL_DD_STEELE0:
		*(*int32)(unsafe.Pointer(iLimPtr)) = libc.AssignPtrInt32(iLim1Ptr, -1)
		*(*int32)(unsafe.Pointer(iPtr)) = 18
		*(*int32)(unsafe.Pointer(ndigitsPtr)) = 0
		break
	case TCL_DD_E_FORMAT:
		if *(*int32)(unsafe.Pointer(ndigitsPtr)) <= 0 {
			*(*int32)(unsafe.Pointer(ndigitsPtr)) = 1
		}
		*(*int32)(unsafe.Pointer(iLimPtr)) = libc.AssignPtrInt32(iLim1Ptr, libc.AssignPtrInt32(iPtr, *(*int32)(unsafe.Pointer(ndigitsPtr))))
		break
	case TCL_DD_F_FORMAT:
		*(*int32)(unsafe.Pointer(iPtr)) = *(*int32)(unsafe.Pointer(ndigitsPtr)) + k + 1
		*(*int32)(unsafe.Pointer(iLimPtr)) = *(*int32)(unsafe.Pointer(iPtr))
		*(*int32)(unsafe.Pointer(iLim1Ptr)) = *(*int32)(unsafe.Pointer(iPtr)) - 1
		if *(*int32)(unsafe.Pointer(iPtr)) <= 0 {
			*(*int32)(unsafe.Pointer(iPtr)) = 1
		}
		break
	default:
		*(*int32)(unsafe.Pointer(iPtr)) = -1
		*(*int32)(unsafe.Pointer(iLimPtr)) = -1
		*(*int32)(unsafe.Pointer(iLim1Ptr)) = -1
		XTcl_Panic(tls, ts+63170, 0)
	}
}

//----------------------------------------------------------------------
//
// BumpUp --
//
//	Increases a string of digits ending in a series of nines to designate
//	the next higher number.  xxxxb9999... -> xxxx(b+1)0000...
//
// Results:
//	Returns a pointer to the end of the adjusted string.
//
// Side effects:
//	In the case that the string consists solely of '999999', sets it to
//	"1" and moves the decimal point (*kPtr) one place to the right.
//
//----------------------------------------------------------------------

func sBumpUp(tls *libc.TLS, s uintptr, retval uintptr, kPtr uintptr) uintptr { /* tclStrToD.c:2554:20: */
	for int32(*(*int8)(unsafe.Pointer(libc.PreDecUintptr(&s, 1)))) == '9' {
		if s == retval {
			*(*int32)(unsafe.Pointer(kPtr))++
			*(*int8)(unsafe.Pointer(s)) = int8('1')
			return s + uintptr(1)
		}
	}
	*(*int8)(unsafe.Pointer(s))++
	s++
	return s
}

//----------------------------------------------------------------------
//
// AdjustRange --
//
//	Rescales a 'double' in preparation for formatting it using the 'quick'
//	double-to-string method.
//
// Results:
//	Returns the precision that has been lost in the prescaling as a count
//	of units in the least significant place.
//
//----------------------------------------------------------------------

func sAdjustRange(tls *libc.TLS, dPtr uintptr, k int32) int32 { /* tclStrToD.c:2589:1: */
	var ieps int32 // Number of roundoff errors that have
	// accumulated.
	var d float64 = *(*float64)(unsafe.Pointer(dPtr)) // Number to adjust.
	var ds float64
	var i int32
	var j int32
	var j1 int32

	ieps = 2

	if k > 0 {
		// The number must be reduced to bring it into range.

		ds = tens[k&0xF]
		j = k >> 4
		if j&BLETCH != 0 {
			j = j & (BLETCH - 1)
			d = d / bigtens[N_BIGTENS-1]
			ieps++
		}
		i = 0
		for ; j != 0; j >>= 1 {
			if j&1 != 0 {
				ds = ds * bigtens[i]
				ieps++
			}
			i++
		}
		d = d / ds
	} else if libc.AssignInt32(&j1, -k) != 0 {
		// The number must be increased to bring it into range.

		d = d * tens[j1&0xF]
		i = 0
		for j = j1 >> 4; j != 0; j >>= 1 {
			if j&1 != 0 {
				ieps++
				d = d * bigtens[i]
			}
			i++
		}
	}

	*(*float64)(unsafe.Pointer(dPtr)) = d
	return ieps
}

//----------------------------------------------------------------------
//
// ShorteningQuickFormat --
//
//	Returns a 'quick' format of a double precision number to a string of
//	digits, preferring a shorter string of digits if the shorter string is
//	still within 1/2 ulp of the number.
//
// Results:
//	Returns the string of digits. Returns NULL if the 'quick' method fails
//	and the bignum method must be used.
//
// Side effects:
//	Stores the position of the decimal point at '*kPtr'.
//
//----------------------------------------------------------------------

func sShorteningQuickFormat(tls *libc.TLS, d float64, k int32, ilim int32, eps float64, retval uintptr, kPtr uintptr) uintptr { /* tclStrToD.c:2661:20: */
	var s uintptr = retval // Cursor in the return value.
	var digit int32        // Current digit.
	var i int32

	eps = 0.5/tens[ilim-1] - eps
	i = 0
	for {
		// Convert a digit.

		digit = int32(d)
		d = d - float64(digit)
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)

		// Truncate the conversion if the string of digits is within 1/2 ulp
		// of the actual value.

		if d < eps {
			*(*int32)(unsafe.Pointer(kPtr)) = k
			return s
		}
		if 1.-d < eps {
			*(*int32)(unsafe.Pointer(kPtr)) = k
			return sBumpUp(tls, s, retval, kPtr)
		}

		// Bail out if the conversion fails to converge to a sufficiently
		// precise value.

		if libc.PreIncInt32(&i, 1) >= ilim {
			return uintptr(0)
		}

		// Bring the next digit to the integer part.

		eps = eps * float64(10)
		d = d * 10.0
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// StrictQuickFormat --
//
//	Convert a double precision number of a string of a precise number of
//	digits, using the 'quick' double precision method.
//
// Results:
//	Returns the digit string, or NULL if the bignum method must be used to
//	do the formatting.
//
// Side effects:
//	Stores the position of the decimal point in '*kPtr'.
//
//----------------------------------------------------------------------

func sStrictQuickFormat(tls *libc.TLS, d float64, k int32, ilim int32, eps float64, retval uintptr, kPtr uintptr) uintptr { /* tclStrToD.c:2736:20: */
	var s uintptr = retval // Cursor in the return value.
	var digit int32        // Current digit of the answer.
	var i int32

	eps = eps * tens[ilim-1]
	i = 1
	for {
		// Extract a digit.

		digit = int32(d)
		d = d - float64(digit)
		if d == 0.0 {
			ilim = i
		}
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)

		// When the given digit count is reached, handle trailing strings of 0
		// and 9.

		if i == ilim {
			if d > 0.5+eps {
				*(*int32)(unsafe.Pointer(kPtr)) = k
				return sBumpUp(tls, s, retval, kPtr)
			} else if d < 0.5-eps {
				for int32(*(*int8)(unsafe.Pointer(libc.PreDecUintptr(&s, 1)))) == '0' {
					// do nothing
				}
				s++
				*(*int32)(unsafe.Pointer(kPtr)) = k
				return s
			} else {
				return uintptr(0)
			}
		}

		// Advance to the next digit.

		i++
		d = d * 10.0
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// QuickConversion --
//
//	Converts a floating point number the 'quick' way, when only a limited
//	number of digits is required and floating point arithmetic can
//	therefore be used for the intermediate results.
//
// Results:
//	Returns the converted string, or NULL if the bignum method must be
//	used.
//
//----------------------------------------------------------------------

func sQuickConversion(tls *libc.TLS, e float64, k int32, k_check int32, flags int32, len int32, ilim int32, ilim1 int32, decpt uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:2810:20: */
	bp := tls.Alloc(16)
	defer tls.Free(16)
	*(*float64)(unsafe.Pointer(bp)) = e

	var ieps int32 // Number of 1-ulp roundoff errors that have
	// accumulated in the calculation.
	// var eps Double at bp+8, 8
	// Estimated roundoff error.
	var retval uintptr // Returned string.
	var end uintptr    // Pointer to the terminal null byte in the
	// returned string.
	var d float64 // Workaround for a bug in mingw gcc 3.4.5

	// Bring d into the range [1 .. 10).

	ieps = sAdjustRange(tls, bp, k)
	libc.AtomicStoreFloat64(&d, float64(*(*float64)(unsafe.Pointer(bp /* e */))))

	// If the guessed value of k didn't get d into range, adjust it by one. If
	// that leaves us outside the range in which quick format is accurate,
	// bail out.

	if k_check != 0 && d < 1. && ilim > 0 {
		if ilim1 < 0 {
			return uintptr(0)
		}
		ilim = ilim1
		k--
		libc.AtomicStoreFloat64(&d, float64(d*10.0))
		ieps++
	}

	// Compute estimated roundoff error.

	*(*float64)(unsafe.Pointer(bp + 8)) = float64(ieps)*d + 7.
	*(*int32)(unsafe.Pointer(bp + 8 + 4)) -= int32(FP_PRECISION-1) << EXP_SHIFT

	// Handle the peculiar case where the result has no significant digits.

	retval = XTcl_Alloc(tls, uint32(len+1))
	if ilim == 0 {
		libc.AtomicStoreFloat64(&d, float64(d-5.))
		if d > *(*float64)(unsafe.Pointer(bp + 8)) {
			*(*int8)(unsafe.Pointer(retval)) = int8('1')
			*(*int32)(unsafe.Pointer(decpt)) = k
			return retval
		} else if d < -*(*float64)(unsafe.Pointer(bp + 8)) {
			*(*int32)(unsafe.Pointer(decpt)) = k
			return retval
		} else {
			XTclpFree(tls, retval)
			return uintptr(0)
		}
	}

	// Format the digit string.

	if flags&TCL_DD_SHORTEN_FLAG != 0 {
		end = sShorteningQuickFormat(tls, d, k, ilim, *(*float64)(unsafe.Pointer(bp + 8)), retval, decpt)
	} else {
		end = sStrictQuickFormat(tls, d, k, ilim, *(*float64)(unsafe.Pointer(bp + 8)), retval, decpt)
	}
	if end == uintptr(0) {
		XTclpFree(tls, retval)
		return uintptr(0)
	}
	*(*int8)(unsafe.Pointer(end)) = int8(0)
	if endPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(endPtr)) = end
	}
	return retval
}

//----------------------------------------------------------------------
//
// CastOutPowersOf2 --
//
//	Adjust the factors 'b2', 'm2', and 's2' to cast out common powers of 2
//	from numerator and denominator in preparation for the 'bignum' method
//	of floating point conversion.
//
//----------------------------------------------------------------------

func sCastOutPowersOf2(tls *libc.TLS, b2 uintptr, m2 uintptr, s2 uintptr) { /* tclStrToD.c:2916:1: */
	var i int32

	if *(*int32)(unsafe.Pointer(m2)) > 0 && *(*int32)(unsafe.Pointer(s2)) > 0 { // Find the smallest power of 2 in the
		// numerator.
		if *(*int32)(unsafe.Pointer(m2)) < *(*int32)(unsafe.Pointer(s2)) { // Find the lowest common denominator.
			i = *(*int32)(unsafe.Pointer(m2))
		} else {
			i = *(*int32)(unsafe.Pointer(s2))
		}
		*(*int32)(unsafe.Pointer(b2)) -= i // Reduce to lowest terms.
		*(*int32)(unsafe.Pointer(m2)) -= i
		*(*int32)(unsafe.Pointer(s2)) -= i
	}
}

//----------------------------------------------------------------------
//
// ShorteningInt64Conversion --
//
//	Converts a double-precision number to the shortest string of digits
//	that reconverts exactly to the given number, or to 'ilim' digits if
//	that will yield a shorter result. The numerator and denominator in
//	David Gay's conversion algorithm are known to fit in Tcl_WideUInt,
//	giving considerably faster arithmetic than mp_int's.
//
// Results:
//	Returns the string of significant decimal digits, in newly allocated
//	memory
//
// Side effects:
//	Stores the location of the decimal point in '*decpt' and the location
//	of the terminal null byte in '*endPtr'.
//
//----------------------------------------------------------------------

func sShorteningInt64Conversion(tls *libc.TLS, dPtr uintptr, convType int32, bw Tcl_WideUInt, b2 int32, b5 int32, m2plus int32, m2minus int32, m5 int32, s2 int32, s5 int32, k int32, len int32, ilim int32, ilim1 int32, decpt uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:2959:20: */
	bp := tls.Alloc(4)
	defer tls.Free(4)
	*(*int32)(unsafe.Pointer(bp)) = k

	var retval uintptr = XTcl_Alloc(tls, uint32(len+1))
	// Output buffer.
	var b Tcl_WideUInt = bw * wuipow5[b5] << b2
	// Numerator of the fraction being
	// converted.
	var S Tcl_WideUInt = wuipow5[s5] << s2
	// Denominator of the fraction being
	// converted.
	var mplus Tcl_WideUInt
	var mminus Tcl_WideUInt // Ranges for testing whether the result is
	// within roundoff of being exact.
	var digit int32        // Current output digit.
	var s uintptr = retval // Cursor in the output buffer.
	var i int32            // Current position in the output buffer.

	// Adjust if the logarithm was guessed wrong.

	if b < S {
		b = uint64(10) * b
		m2plus++
		m2minus++
		m5++
		ilim = ilim1
		*(*int32)(unsafe.Pointer(bp /* k */))--
	}

	// Compute roundoff ranges.

	mplus = wuipow5[m5] << m2plus
	mminus = wuipow5[m5] << m2minus

	// Loop through the digits.

	i = 1
	for {
		digit = int32(b / S)
		if digit > 10 {
			XTcl_Panic(tls, ts+63216, 0)
		}
		b = b % S

		// Does the current digit put us on the low side of the exact value
		// but within within roundoff of being exact?

		if b < mplus || b == mplus &&
			convType != TCL_DD_STEELE0 && *(*int32)(unsafe.Pointer(dPtr))&1 == 0 {
			// Make sure we shouldn't be rounding *up* instead, in case the
			// next number above is closer.

			if uint64(2)*b > S || uint64(2)*b == S && digit&1 != 0 {
				digit++
				if digit == 10 {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('9')
					s = sBumpUp(tls, s, retval, bp)
					break
				}
			}

			// Stash the current digit.

			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)
			break
		}

		// Does one plus the current digit put us within roundoff of the
		// number?

		if b > S-mminus || b == S-mminus &&
			convType != TCL_DD_STEELE0 && *(*int32)(unsafe.Pointer(dPtr))&1 == 0 {
			if digit == 9 {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('9')
				s = sBumpUp(tls, s, retval, bp)
				break
			}
			digit++
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)
			break
		}

		// Have we converted all the requested digits?

		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)
		if i == ilim {
			if uint64(2)*b > S || uint64(2)*b == S && digit&1 != 0 {
				s = sBumpUp(tls, s, retval, bp)
			}
			break
		}

		// Advance to the next digit.

		b = uint64(10) * b
		mplus = uint64(10) * mplus
		mminus = uint64(10) * mminus
		i++
	}

	// Endgame - store the location of the decimal point and the end of the
	// string.

	*(*int8)(unsafe.Pointer(s)) = int8(0)
	*(*int32)(unsafe.Pointer(decpt)) = *(*int32)(unsafe.Pointer(bp /* k */))
	if endPtr != 0 {
		*(*uintptr)(unsafe.Pointer(endPtr)) = s
	}
	return retval
}

//----------------------------------------------------------------------
//
// StrictInt64Conversion --
//
//	Converts a double-precision number to a fixed-length string of 'ilim'
//	digits that reconverts exactly to the given number.  ('ilim' should be
//	replaced with 'ilim1' in the case where log10(d) has been
//	overestimated).  The numerator and denominator in David Gay's
//	conversion algorithm are known to fit in Tcl_WideUInt, giving
//	considerably faster arithmetic than mp_int's.
//
// Results:
//	Returns the string of significant decimal digits, in newly allocated
//	memory
//
// Side effects:
//	Stores the location of the decimal point in '*decpt' and the location
//	of the terminal null byte in '*endPtr'.
//
//----------------------------------------------------------------------

func sStrictInt64Conversion(tls *libc.TLS, dPtr uintptr, convType int32, bw Tcl_WideUInt, b2 int32, b5 int32, s2 int32, s5 int32, k int32, len int32, ilim int32, ilim1 int32, decpt uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:3128:20: */
	bp := tls.Alloc(4)
	defer tls.Free(4)
	*(*int32)(unsafe.Pointer(bp)) = k

	var retval uintptr = XTcl_Alloc(tls, uint32(len+1))
	// Output buffer.
	var b Tcl_WideUInt = bw * wuipow5[b5] << b2
	// Numerator of the fraction being
	// converted.
	var S Tcl_WideUInt = wuipow5[s5] << s2
	// Denominator of the fraction being
	// converted.
	var digit int32        // Current output digit.
	var s uintptr = retval // Cursor in the output buffer.
	var i int32            // Current position in the output buffer.

	// Adjust if the logarithm was guessed wrong.

	if b < S {
		b = uint64(10) * b
		ilim = ilim1
		*(*int32)(unsafe.Pointer(bp /* k */))--
	}

	// Loop through the digits.

	i = 1
	for {
		digit = int32(b / S)
		if digit > 10 {
			XTcl_Panic(tls, ts+63216, 0)
		}
		b = b % S

		// Have we converted all the requested digits?

		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)
		if i == ilim {
			if uint64(2)*b > S || uint64(2)*b == S && digit&1 != 0 {
				s = sBumpUp(tls, s, retval, bp)
			} else {
				for int32(*(*int8)(unsafe.Pointer(libc.PreDecUintptr(&s, 1)))) == '0' {
					// do nothing
				}
				s++
			}
			break
		}

		// Advance to the next digit.

		b = uint64(10) * b
		i++
	}

	// Endgame - store the location of the decimal point and the end of the
	// string.

	*(*int8)(unsafe.Pointer(s)) = int8(0)
	*(*int32)(unsafe.Pointer(decpt)) = *(*int32)(unsafe.Pointer(bp /* k */))
	if endPtr != 0 {
		*(*uintptr)(unsafe.Pointer(endPtr)) = s
	}
	return retval
}

//----------------------------------------------------------------------
//
// ShouldBankerRoundUpPowD --
//
//	Test whether bankers' rounding should round a digit up. Assumption is
//	made that the denominator of the fraction being tested is a power of
//	2**MP_DIGIT_BIT.
//
// Results:
//	Returns 1 iff the fraction is more than 1/2, or if the fraction is
//	exactly 1/2 and the digit is odd.
//
//----------------------------------------------------------------------

func sShouldBankerRoundUpPowD(tls *libc.TLS, b uintptr, sd int32, isodd int32) int32 { /* tclStrToD.c:3235:1: */
	var i int32

	if (*Mp_int)(unsafe.Pointer(b)).Fused < sd || *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(sd-1)*4))&topbit == Mp_digit(0) {
		return 0
	}
	if *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(sd-1)*4)) != topbit {
		return 1
	}
	for i = sd - 2; i >= 0; i-- {
		if *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(b)).Fdp + uintptr(i)*4)) != Mp_digit(0) {
			return 1
		}
	}
	return isodd
}

var topbit Mp_digit = Mp_digit(Mp_digit(1)) << (MP_DIGIT_BIT - 1) /* tclStrToD.c:3241:27 */

//----------------------------------------------------------------------
//
// ShouldBankerRoundUpToNextPowD --
//
//	Tests whether bankers' rounding will round down in the "denominator is
//	a power of 2**MP_DIGIT" case.
//
// Results:
//	Returns 1 if the rounding will be performed - which increases the
//	digit by one - and 0 otherwise.
//
//----------------------------------------------------------------------

func sShouldBankerRoundUpToNextPowD(tls *libc.TLS, b uintptr, m uintptr, sd int32, convType int32, isodd int32, temp uintptr) int32 { /* tclStrToD.c:3273:1: */
	var i int32

	// Compare B and S-m - which is the same as comparing B+m and S - which we
	// do by computing b+m and doing a bitwhack compare against
	// 2**(MP_DIGIT_BIT*sd)

	XTclBN_mp_add(tls, b, m, temp)
	if (*Mp_int)(unsafe.Pointer(temp)).Fused <= sd { // Too few digits to be > s
		return 0
	}
	if (*Mp_int)(unsafe.Pointer(temp)).Fused > sd+1 || *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(temp)).Fdp + uintptr(sd)*4)) > Mp_digit(1) {
		// >= 2s
		return 1
	}
	for i = sd - 1; i >= 0; i-- {
		// Check for ==s
		if *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(temp)).Fdp + uintptr(i)*4)) != Mp_digit(0) { // > s
			return 1
		}
	}
	if convType == TCL_DD_STEELE0 {
		// Biased rounding.
		return 0
	}
	return isodd
}

//----------------------------------------------------------------------
//
// ShorteningBignumConversionPowD --
//
//	Converts a double-precision number to the shortest string of digits
//	that reconverts exactly to the given number, or to 'ilim' digits if
//	that will yield a shorter result. The denominator in David Gay's
//	conversion algorithm is known to be a power of 2**MP_DIGIT_BIT, and hence
//	the division in the main loop may be replaced by a digit shift and
//	mask.
//
// Results:
//	Returns the string of significant decimal digits, in newly allocated
//	memory
//
// Side effects:
//	Stores the location of the decimal point in '*decpt' and the location
//	of the terminal null byte in '*endPtr'.
//
//----------------------------------------------------------------------

func sShorteningBignumConversionPowD(tls *libc.TLS, dPtr uintptr, convType int32, bw Tcl_WideUInt, b2 int32, b5 int32, m2plus int32, m2minus int32, m5 int32, sd int32, k int32, len int32, ilim int32, ilim1 int32, decpt uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:3335:20: */
	bp := tls.Alloc(124)
	defer tls.Free(124)
	*(*int32)(unsafe.Pointer(bp + 120)) = k

	var retval uintptr = XTcl_Alloc(tls, uint32(len+1))
	// Output buffer.
	// var b Mp_int at bp+24, 24
	// Numerator of the fraction being
	// converted.
	// var mplus Mp_int at bp+72, 24

	// var mminus Mp_int at bp+48, 24
	// Bounds for roundoff.
	var digit Mp_digit     // Current output digit.
	var s uintptr = retval // Cursor in the output buffer.
	var i int32            // Index in the output buffer.
	// var temp Mp_int at bp+96, 24

	var r1 int32

	// b = bw * 2**b2 * 5**b5
	// mminus = 5**m5

	XTclBNInitBignumFromWideUInt(tls, bp+24, bw)
	XTclBN_mp_init_set(tls, bp+48, uint32(1))
	sMulPow5(tls, bp+24, uint32(b5), bp+24)
	XTclBN_mp_mul_2d(tls, bp+24, b2, bp+24)

	// Adjust if the logarithm was guessed wrong.

	if (*Mp_int)(unsafe.Pointer(bp+24)).Fused <= sd {
		XTclBN_mp_mul_d(tls, bp+24, uint32(10), bp+24)
		m2plus++
		m2minus++
		m5++
		ilim = ilim1
		*(*int32)(unsafe.Pointer(bp + 120 /* k */))--
	}

	// mminus = 5**m5 * 2**m2minus
	// mplus = 5**m5 * 2**m2plus

	XTclBN_mp_mul_2d(tls, bp+48, m2minus, bp+48)
	sMulPow5(tls, bp+48, uint32(m5), bp+48)
	if m2plus > m2minus {
		XTclBN_mp_init_copy(tls, bp+72, bp+48)
		XTclBN_mp_mul_2d(tls, bp+72, m2plus-m2minus, bp+72)
	}
	XTclBN_mp_init(tls, bp+96)

	// Loop through the digits. Do division and mod by s == 2**(sd*MP_DIGIT_BIT)
	// by mp_digit extraction.

	i = 0
	for {
		if (*Mp_int)(unsafe.Pointer(bp+24)).Fused <= sd {
			digit = Mp_digit(0)
		} else {
			digit = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+24 /* &b */)).Fdp + uintptr(sd)*4))
			if (*Mp_int)(unsafe.Pointer(bp+24)).Fused > sd+1 || digit >= Mp_digit(10) {
				XTcl_Panic(tls, ts+63216, 0)
			}
			(*Mp_int)(unsafe.Pointer(bp+24 /* &b */)).Fused--
			XTclBN_mp_clamp(tls, bp+24)
		}

		// Does the current digit put us on the low side of the exact value
		// but within within roundoff of being exact?

		r1 = XTclBN_mp_cmp_mag(tls, bp+24, func() uintptr {
			if m2plus > m2minus {
				return bp + 72 /* &mplus */
			}
			return bp + 48 /* &mminus */
		}())
		if r1 == -1 || r1 == MP_EQ &&
			convType != TCL_DD_STEELE0 && *(*int32)(unsafe.Pointer(dPtr))&1 == 0 {
			// Make sure we shouldn't be rounding *up* instead, in case the
			// next number above is closer.

			if sShouldBankerRoundUpPowD(tls, bp+24, sd, int32(digit&Mp_digit(1))) != 0 {
				digit++
				if digit == Mp_digit(10) {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('9')
					s = sBumpUp(tls, s, retval, bp+120)
					break
				}
			}

			// Stash the last digit.

			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8(Mp_digit('0') + digit)
			break
		}

		// Does one plus the current digit put us within roundoff of the
		// number?

		if sShouldBankerRoundUpToNextPowD(tls, bp+24, bp+48, sd, convType,
			*(*int32)(unsafe.Pointer(dPtr))&1, bp+96) != 0 {
			if digit == Mp_digit(9) {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('9')
				s = sBumpUp(tls, s, retval, bp+120)
				break
			}
			digit++
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8(Mp_digit('0') + digit)
			break
		}

		// Have we converted all the requested digits?

		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8(Mp_digit('0') + digit)
		if i == ilim {
			if sShouldBankerRoundUpPowD(tls, bp+24, sd, int32(digit&Mp_digit(1))) != 0 {
				s = sBumpUp(tls, s, retval, bp+120)
			}
			break
		}

		// Advance to the next digit.

		XTclBN_mp_mul_d(tls, bp+24, uint32(10), bp+24)
		XTclBN_mp_mul_d(tls, bp+48, uint32(10), bp+48)
		if m2plus > m2minus {
			XTclBN_mp_mul_2d(tls, bp+48, m2plus-m2minus, bp+72)
		}
		i++
	}

	// Endgame - store the location of the decimal point and the end of the
	// string.

	if m2plus > m2minus {
		XTclBN_mp_clear(tls, bp+72)
	}
	XTclBN_mp_clear_multi(tls, bp+24, libc.VaList(bp, bp+48, bp+96, uintptr(0)))
	*(*int8)(unsafe.Pointer(s)) = int8(0)
	*(*int32)(unsafe.Pointer(decpt)) = *(*int32)(unsafe.Pointer(bp + 120 /* k */))
	if endPtr != 0 {
		*(*uintptr)(unsafe.Pointer(endPtr)) = s
	}
	return retval
}

//----------------------------------------------------------------------
//
// StrictBignumConversionPowD --
//
//	Converts a double-precision number to a fixed-lengt string of 'ilim'
//	digits (or 'ilim1' if log10(d) has been overestimated).  The
//	denominator in David Gay's conversion algorithm is known to be a power
//	of 2**MP_DIGIT_BIT, and hence the division in the main loop may be
//	replaced by a digit shift and mask.
//
// Results:
//	Returns the string of significant decimal digits, in newly allocated
//	memory.
//
// Side effects:
//	Stores the location of the decimal point in '*decpt' and the location
//	of the terminal null byte in '*endPtr'.
//
//----------------------------------------------------------------------

func sStrictBignumConversionPowD(tls *libc.TLS, dPtr uintptr, convType int32, bw Tcl_WideUInt, b2 int32, b5 int32, sd int32, k int32, len int32, ilim int32, ilim1 int32, decpt uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:3528:20: */
	bp := tls.Alloc(68)
	defer tls.Free(68)
	*(*int32)(unsafe.Pointer(bp + 64)) = k

	var retval uintptr = XTcl_Alloc(tls, uint32(len+1))
	// Output buffer.
	// var b Mp_int at bp+16, 24
	// Numerator of the fraction being
	// converted.
	var digit Mp_digit     // Current output digit.
	var s uintptr = retval // Cursor in the output buffer.
	var i int32            // Index in the output buffer.
	// var temp Mp_int at bp+40, 24

	// b = bw * 2**b2 * 5**b5

	XTclBNInitBignumFromWideUInt(tls, bp+16, bw)
	sMulPow5(tls, bp+16, uint32(b5), bp+16)
	XTclBN_mp_mul_2d(tls, bp+16, b2, bp+16)

	// Adjust if the logarithm was guessed wrong.

	if (*Mp_int)(unsafe.Pointer(bp+16)).Fused <= sd {
		XTclBN_mp_mul_d(tls, bp+16, uint32(10), bp+16)
		ilim = ilim1
		*(*int32)(unsafe.Pointer(bp + 64 /* k */))--
	}
	XTclBN_mp_init(tls, bp+40)

	// Loop through the digits. Do division and mod by s == 2**(sd*MP_DIGIT_BIT)
	// by mp_digit extraction.

	i = 1
	for {
		if (*Mp_int)(unsafe.Pointer(bp+16)).Fused <= sd {
			digit = Mp_digit(0)
		} else {
			digit = *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+16 /* &b */)).Fdp + uintptr(sd)*4))
			if (*Mp_int)(unsafe.Pointer(bp+16)).Fused > sd+1 || digit >= Mp_digit(10) {
				XTcl_Panic(tls, ts+63216, 0)
			}
			(*Mp_int)(unsafe.Pointer(bp+16 /* &b */)).Fused--
			XTclBN_mp_clamp(tls, bp+16)
		}

		// Have we converted all the requested digits?

		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8(Mp_digit('0') + digit)
		if i == ilim {
			if sShouldBankerRoundUpPowD(tls, bp+16, sd, int32(digit&Mp_digit(1))) != 0 {
				s = sBumpUp(tls, s, retval, bp+64)
			}
			for int32(*(*int8)(unsafe.Pointer(libc.PreDecUintptr(&s, 1)))) == '0' {
				// do nothing
			}
			s++
			break
		}

		// Advance to the next digit.

		XTclBN_mp_mul_d(tls, bp+16, uint32(10), bp+16)
		i++
	}

	// Endgame - store the location of the decimal point and the end of the
	// string.

	XTclBN_mp_clear_multi(tls, bp+16, libc.VaList(bp, bp+40, uintptr(0)))
	*(*int8)(unsafe.Pointer(s)) = int8(0)
	*(*int32)(unsafe.Pointer(decpt)) = *(*int32)(unsafe.Pointer(bp + 64 /* k */))
	if endPtr != 0 {
		*(*uintptr)(unsafe.Pointer(endPtr)) = s
	}
	return retval
}

//----------------------------------------------------------------------
//
// ShouldBankerRoundUp --
//
//	Tests whether a digit should be rounded up or down when finishing
//	bignum-based floating point conversion.
//
// Results:
//	Returns 1 if the number needs to be rounded up, 0 otherwise.
//
//----------------------------------------------------------------------

func sShouldBankerRoundUp(tls *libc.TLS, twor uintptr, S uintptr, isodd int32) int32 { /* tclStrToD.c:3645:1: */
	var r int32 = XTclBN_mp_cmp_mag(tls, twor, S)

	switch r {
	case -1:
		return 0
	case MP_EQ:
		return isodd
	case MP_GT:
		return 1
	}
	XTcl_Panic(tls, ts+63229, 0)
	return 0
}

//----------------------------------------------------------------------
//
// ShouldBankerRoundUpToNext --
//
//	Tests whether the remainder is great enough to force rounding to the
//	next higher digit.
//
// Results:
//	Returns 1 if the number should be rounded up, 0 otherwise.
//
//----------------------------------------------------------------------

func sShouldBankerRoundUpToNext(tls *libc.TLS, b uintptr, m uintptr, S uintptr, convType int32, isodd int32, temp uintptr) int32 { /* tclStrToD.c:3680:1: */
	var r int32

	// Compare b and S-m: this is the same as comparing B+m and S.

	XTclBN_mp_add(tls, b, m, temp)
	r = XTclBN_mp_cmp_mag(tls, temp, S)
	switch r {
	case -1:
		return 0
	case MP_EQ:
		if convType == TCL_DD_STEELE0 {
			return 0
		} else {
			return isodd
		}
		fallthrough
	case MP_GT:
		return 1
	}
	XTcl_Panic(tls, ts+63271, 0)
	return 0
}

//----------------------------------------------------------------------
//
// ShorteningBignumConversion --
//
//	Convert a floating point number to a variable-length digit string
//	using the multiprecision method.
//
// Results:
//	Returns the string of digits.
//
// Side effects:
//	Stores the position of the decimal point in *decpt.  Stores a pointer
//	to the end of the number in *endPtr.
//
//----------------------------------------------------------------------

func sShorteningBignumConversion(tls *libc.TLS, dPtr uintptr, convType int32, bw Tcl_WideUInt, b2 int32, m2plus int32, m2minus int32, s2 int32, s5 int32, k int32, len int32, ilim int32, ilim1 int32, decpt uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:3733:20: */
	bp := tls.Alloc(188)
	defer tls.Free(188)
	*(*int32)(unsafe.Pointer(bp + 184)) = k

	var retval uintptr = XTcl_Alloc(tls, uint32(len+1))
	// Buffer of digits to return.
	var s uintptr = retval // Cursor in the return value.
	// var b Mp_int at bp+40, 24
	// Numerator of the result.
	// var mminus Mp_int at bp+88, 24
	// 1/2 ulp below the result.
	// var mplus Mp_int at bp+112, 24
	// 1/2 ulp above the result.
	// var S Mp_int at bp+64, 24
	// Denominator of the result.
	// var dig Mp_int at bp+160, 24
	// Current digit of the result.
	var digit int32 // Current digit of the result.
	// var temp Mp_int at bp+136, 24
	// Work area.
	var minit int32 = 1 // Fudge factor for when we misguess k.
	var i int32
	var r1 int32

	// b = bw * 2**b2 * 5**b5
	// S = 2**s2 * 5*s5

	XTclBNInitBignumFromWideUInt(tls, bp+40, bw)
	XTclBN_mp_mul_2d(tls, bp+40, b2, bp+40)
	XTclBN_mp_init_set(tls, bp+64, uint32(1))
	sMulPow5(tls, bp+64, uint32(s5), bp+64)
	XTclBN_mp_mul_2d(tls, bp+64, s2, bp+64)

	// Handle the case where we guess the position of the decimal point wrong.

	if XTclBN_mp_cmp_mag(tls, bp+40, bp+64) == -1 {
		XTclBN_mp_mul_d(tls, bp+40, uint32(10), bp+40)
		minit = 10
		ilim = ilim1
		*(*int32)(unsafe.Pointer(bp + 184 /* k */))--
	}

	// mminus = 2**m2minus * 5**m5

	XTclBN_mp_init_set(tls, bp+88, uint32(minit))
	XTclBN_mp_mul_2d(tls, bp+88, m2minus, bp+88)
	if m2plus > m2minus {
		XTclBN_mp_init_copy(tls, bp+112, bp+88)
		XTclBN_mp_mul_2d(tls, bp+112, m2plus-m2minus, bp+112)
	}
	XTclBN_mp_init(tls, bp+136)

	// Loop through the digits.

	XTclBN_mp_init(tls, bp+160)
	i = 1
	for {
		XTclBN_mp_div(tls, bp+40, bp+64, bp+160, bp+40)
		if (*Mp_int)(unsafe.Pointer(bp+160)).Fused > 1 || *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp + 160)).Fdp)) >= Mp_digit(10) {
			XTcl_Panic(tls, ts+63216, 0)
		}
		digit = int32(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp + 160 /* &dig */)).Fdp)))

		// Does the current digit leave us with a remainder small enough to
		// round to it?

		r1 = XTclBN_mp_cmp_mag(tls, bp+40, func() uintptr {
			if m2plus > m2minus {
				return bp + 112 /* &mplus */
			}
			return bp + 88 /* &mminus */
		}())
		if r1 == -1 || r1 == MP_EQ &&
			convType != TCL_DD_STEELE0 && *(*int32)(unsafe.Pointer(dPtr))&1 == 0 {
			XTclBN_mp_mul_2d(tls, bp+40, 1, bp+40)
			if sShouldBankerRoundUp(tls, bp+40, bp+64, digit&1) != 0 {
				digit++
				if digit == 10 {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('9')
					s = sBumpUp(tls, s, retval, bp+184)
					break
				}
			}
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)
			break
		}

		// Does the current digit leave us with a remainder large enough to
		// commit to rounding up to the next higher digit?

		if sShouldBankerRoundUpToNext(tls, bp+40, bp+88, bp+64, convType,
			*(*int32)(unsafe.Pointer(dPtr))&1, bp+136) != 0 {
			digit++
			if digit == 10 {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('9')
				s = sBumpUp(tls, s, retval, bp+184)
				break
			}
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)
			break
		}

		// Have we converted all the requested digits?

		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)
		if i == ilim {
			XTclBN_mp_mul_2d(tls, bp+40, 1, bp+40)
			if sShouldBankerRoundUp(tls, bp+40, bp+64, digit&1) != 0 {
				s = sBumpUp(tls, s, retval, bp+184)
			}
			break
		}

		// Advance to the next digit.

		if s5 > 0 {
			// Can possibly shorten the denominator.

			XTclBN_mp_mul_2d(tls, bp+40, 1, bp+40)
			XTclBN_mp_mul_2d(tls, bp+88, 1, bp+88)
			if m2plus > m2minus {
				XTclBN_mp_mul_2d(tls, bp+112, 1, bp+112)
			}
			XTclBN_mp_div_d(tls, bp+64, uint32(5), bp+64, uintptr(0))
			s5--

			// IDEA: It might possibly be a win to fall back to int64_t
			//       arithmetic here if S < 2**64/10. But it's a win only for
			//       a fairly narrow range of magnitudes so perhaps not worth
			//       bothering.  We already know that we shorten the
			//       denominator by at least 1 mp_digit, perhaps 2, as we do
			//       the conversion for 17 digits of significance.
			// Possible savings:
			// 10**26   1 trip through loop before fallback possible
			// 10**27   1 trip
			// 10**28   2 trips
			// 10**29   3 trips
			// 10**30   4 trips
			// 10**31   5 trips
			// 10**32   6 trips
			// 10**33   7 trips
			// 10**34   8 trips
			// 10**35   9 trips
			// 10**36  10 trips
			// 10**37  11 trips
			// 10**38  12 trips
			// 10**39  13 trips
			// 10**40  14 trips
			// 10**41  15 trips
			// 10**42  16 trips
			// thereafter no gain.
		} else {
			XTclBN_mp_mul_d(tls, bp+40, uint32(10), bp+40)
			XTclBN_mp_mul_d(tls, bp+88, uint32(10), bp+88)
			if m2plus > m2minus {
				XTclBN_mp_mul_2d(tls, bp+112, 10, bp+112)
			}
		}

		i++
	}

	// Endgame - store the location of the decimal point and the end of the
	// string.

	if m2plus > m2minus {
		XTclBN_mp_clear(tls, bp+112)
	}
	XTclBN_mp_clear_multi(tls, bp+40, libc.VaList(bp, bp+88, bp+136, bp+160, bp+64, uintptr(0)))
	*(*int8)(unsafe.Pointer(s)) = int8(0)
	*(*int32)(unsafe.Pointer(decpt)) = *(*int32)(unsafe.Pointer(bp + 184 /* k */))
	if endPtr != 0 {
		*(*uintptr)(unsafe.Pointer(endPtr)) = s
	}
	return retval
}

//----------------------------------------------------------------------
//
// StrictBignumConversion --
//
//	Convert a floating point number to a fixed-length digit string using
//	the multiprecision method.
//
// Results:
//	Returns the string of digits.
//
// Side effects:
//	Stores the position of the decimal point in *decpt.  Stores a pointer
//	to the end of the number in *endPtr.
//
//----------------------------------------------------------------------

func sStrictBignumConversion(tls *libc.TLS, dPtr uintptr, convType int32, bw Tcl_WideUInt, b2 int32, s2 int32, s5 int32, k int32, len int32, ilim int32, ilim1 int32, decpt uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:3949:20: */
	bp := tls.Alloc(148)
	defer tls.Free(148)
	*(*int32)(unsafe.Pointer(bp + 144)) = k

	var retval uintptr = XTcl_Alloc(tls, uint32(len+1))
	// Buffer of digits to return.
	var s uintptr = retval // Cursor in the return value.
	// var b Mp_int at bp+96, 24
	// Numerator of the result.
	// var S Mp_int at bp+120, 24
	// Denominator of the result.
	// var dig Mp_int at bp+72, 24
	// Current digit of the result.
	var digit int32 // Current digit of the result.
	// var temp Mp_int at bp+48, 24
	// Work area.
	var g int32 // Size of the current digit ground.
	var i int32
	var j int32

	// b = bw * 2**b2 * 5**b5
	// S = 2**s2 * 5*s5

	XTclBN_mp_init_multi(tls, bp+48, libc.VaList(bp, bp+72, uintptr(0)))
	XTclBNInitBignumFromWideUInt(tls, bp+96, bw)
	XTclBN_mp_mul_2d(tls, bp+96, b2, bp+96)
	XTclBN_mp_init_set(tls, bp+120, uint32(1))
	sMulPow5(tls, bp+120, uint32(s5), bp+120)
	XTclBN_mp_mul_2d(tls, bp+120, s2, bp+120)

	// Handle the case where we guess the position of the decimal point wrong.

	if XTclBN_mp_cmp_mag(tls, bp+96, bp+120) == -1 {
		XTclBN_mp_mul_d(tls, bp+96, uint32(10), bp+96)
		ilim = ilim1
		*(*int32)(unsafe.Pointer(bp + 144 /* k */))--
	}

	// Convert the leading digit.

	i = 0
	XTclBN_mp_div(tls, bp+96, bp+120, bp+72, bp+96)
	if (*Mp_int)(unsafe.Pointer(bp+72)).Fused > 1 || *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp + 72)).Fdp)) >= Mp_digit(10) {
		XTcl_Panic(tls, ts+63216, 0)
	}
	digit = int32(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp + 72 /* &dig */)).Fdp)))

	// Is a single digit all that was requested?

	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8('0' + digit)
	if libc.PreIncInt32(&i, 1) >= ilim {
		XTclBN_mp_mul_2d(tls, bp+96, 1, bp+96)
		if sShouldBankerRoundUp(tls, bp+96, bp+120, digit&1) != 0 {
			s = sBumpUp(tls, s, retval, bp+144)
		}
	} else {
		for {
			// Shift by a group of digits.

			g = ilim - i
			if g > DIGIT_GROUP {
				g = DIGIT_GROUP
			}
			if s5 >= g {
				XTclBN_mp_div_d(tls, bp+120, dpow5[g], bp+120, uintptr(0))
				s5 = s5 - g
			} else if s5 > 0 {
				XTclBN_mp_div_d(tls, bp+120, dpow5[s5], bp+120, uintptr(0))
				XTclBN_mp_mul_d(tls, bp+96, dpow5[g-s5], bp+96)
				s5 = 0
			} else {
				XTclBN_mp_mul_d(tls, bp+96, dpow5[g], bp+96)
			}
			XTclBN_mp_mul_2d(tls, bp+96, g, bp+96)

			// As with the shortening bignum conversion, it's possible at this
			// point that we will have reduced the denominator to less than
			// 2**64/10, at which point it would be possible to fall back to
			// to int64_t arithmetic. But the potential payoff is tremendously
			// less - unless we're working in F format - because we know that
			// three groups of digits will always suffice for %#.17e, the
			// longest format that doesn't introduce empty precision.
			//
			// Extract the next group of digits.

			XTclBN_mp_div(tls, bp+96, bp+120, bp+72, bp+96)
			if (*Mp_int)(unsafe.Pointer(bp+72)).Fused > 1 {
				XTcl_Panic(tls, ts+63216, 0)
			}
			digit = int32(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp + 72 /* &dig */)).Fdp)))
			for j = g - 1; j >= 0; j-- {
				var t int32 = itens[j]

				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&s, 1))) = int8(digit/t + '0')
				digit = digit % t
			}
			i = i + g

			// Have we converted all the requested digits?

			if i == ilim {
				XTclBN_mp_mul_2d(tls, bp+96, 1, bp+96)
				if sShouldBankerRoundUp(tls, bp+96, bp+120, digit&1) != 0 {
					s = sBumpUp(tls, s, retval, bp+144)
				}
				break
			}
		}
	}
	for int32(*(*int8)(unsafe.Pointer(libc.PreDecUintptr(&s, 1)))) == '0' {
		// do nothing
	}
	s++

	// Endgame - store the location of the decimal point and the end of the
	// string.

	XTclBN_mp_clear_multi(tls, bp+96, libc.VaList(bp+16, bp+120, bp+48, bp+72, uintptr(0)))
	*(*int8)(unsafe.Pointer(s)) = int8(0)
	*(*int32)(unsafe.Pointer(decpt)) = *(*int32)(unsafe.Pointer(bp + 144 /* k */))
	if endPtr != 0 {
		*(*uintptr)(unsafe.Pointer(endPtr)) = s
	}
	return retval
}

//----------------------------------------------------------------------
//
// TclDoubleDigits --
//
//	Core of Tcl's conversion of double-precision floating point numbers to
//	decimal.
//
// Results:
//	Returns a newly-allocated string of digits.
//
// Side effects:
//	Sets *decpt to the index of the character in the string before the
//	place that the decimal point should go. If 'endPtr' is not NULL, sets
//	endPtr to point to the terminating '\0' byte of the string. Sets *sign
//	to 1 if a minus sign should be printed with the number, or 0 if a plus
//	sign (or no sign) should appear.
//
// This function is a service routine that produces the string of digits for
// floating-point-to-decimal conversion. It can do a number of things
// according to the 'flags' argument. Valid values for 'flags' include:
//	TCL_DD_SHORTEST - This is the default for floating point conversion if
//		::tcl_precision is 0. It constructs the shortest string of
//		digits that will reconvert to the given number when scanned.
//		For floating point numbers that are exactly between two
//		decimal numbers, it resolves using the 'round to even' rule.
//		With this value, the 'ndigits' parameter is ignored.
//	TCL_DD_STEELE - This value is not recommended and may be removed in
//		the future. It follows the conversion algorithm outlined in
//		"How to Print Floating-Point Numbers Accurately" by Guy
//		L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90,
//		pp. 112-126]. This rule has the effect of rendering 1e23 as
//		9.9999999999999999e22 - which is a 'better' approximation in
//		the sense that it will reconvert correctly even if a
//		subsequent input conversion is 'round up' or 'round down'
//		rather than 'round to nearest', but is surprising otherwise.
//	TCL_DD_E_FORMAT - This value is used to prepare numbers for %e format
//		conversion (or for default floating->string if tcl_precision
//		is not 0). It constructs a string of at most 'ndigits' digits,
//		choosing the one that is closest to the given number (and
//		resolving ties with 'round to even').  It is allowed to return
//		fewer than 'ndigits' if the number converts exactly; if the
//		TCL_DD_E_FORMAT|TCL_DD_SHORTEN_FLAG is supplied instead, it
//		also returns fewer digits if the shorter string will still
//		reconvert without loss to the given input number. In any case,
//		strings of trailing zeroes are suppressed.
//	TCL_DD_F_FORMAT - This value is used to prepare numbers for %f format
//		conversion. It requests that conversion proceed until
//		'ndigits' digits after the decimal point have been converted.
//		It is possible for this format to result in a zero-length
//		string if the number is sufficiently small. Again, it is
//		permissible for TCL_DD_F_FORMAT to return fewer digits for a
//		number that converts exactly, and changing the argument to
//		TCL_DD_F_FORMAT|TCL_DD_SHORTEN_FLAG will allow the routine
//		also to return fewer digits if the shorter string will still
//		reconvert without loss to the given input number. Strings of
//		trailing zeroes are suppressed.
//
//	To any of these flags may be OR'ed TCL_DD_NO_QUICK; this flag requires
//	all calculations to be done in exact arithmetic. Normally, E and F
//	format with fewer than about 14 digits will be done with a quick
//	floating point approximation and fall back on the exact arithmetic
//	only if the input number is close enough to the midpoint between two
//	decimal strings that more precision is needed to resolve which string
//	is correct.
//
// The value stored in the 'decpt' argument on return may be negative
// (indicating that the decimal point falls to the left of the string) or
// greater than the length of the string. In addition, the value -9999 is used
// as a sentinel to indicate that the string is one of the special values
// "Infinity" and "NaN", and that no decimal point should be inserted.
//
//----------------------------------------------------------------------

func XTclDoubleDigits(tls *libc.TLS, dv float64, ndigits int32, flags int32, decpt uintptr, sign uintptr, endPtr uintptr) uintptr { /* tclStrToD.c:4170:6: */
	bp := tls.Alloc(64)
	defer tls.Free(64)
	*(*int32)(unsafe.Pointer(bp + 44)) = ndigits

	var convType int32 = flags & TCL_DD_CONVERSION_TYPE_MASK
	// Type of conversion being performed:
	// TCL_DD_SHORTEST0, TCL_DD_STEELE0,
	// TCL_DD_E_FORMAT, or TCL_DD_F_FORMAT.
	// var d Double at bp, 8
	// Union for deconstructing doubles.
	// var bw Tcl_WideUInt at bp+8, 8
	// Integer significand.
	// var be int32 at bp+16, 4
	// Power of 2 by which b must be multiplied
	// var bbits int32 at bp+20, 4
	// Number of bits needed to represent b.
	var denorm int32 // Flag == 1 iff the input number was
	// denormalized.
	var k int32 // Estimate of floor(log10(d)).
	// var k_check int32 at bp+24, 4
	// Flag == 1 if d is near enough to a power of
	// ten that k must be checked.
	// var b2 int32 at bp+28, 4

	// var b5 int32 at bp+32, 4

	// var s2 int32 at bp+36, 4

	// var s5 int32 at bp+40, 4
	// Powers of 2 and 5 in the numerator and
	// denominator of intermediate results.
	*(*int32)(unsafe.Pointer(bp + 52 /* ilim */)) = -1
	*(*int32)(unsafe.Pointer(bp + 56 /* ilim1 */)) = -1 // Number of digits to convert, and number to
	// convert if log10(d) has been
	// overestimated.
	var retval uintptr // Return value from this function.
	*(*int32)(unsafe.Pointer(bp + 48 /* i */)) = -1

	// Put the input number into a union for bit-whacking.

	*(*float64)(unsafe.Pointer(bp)) = dv

	// Handle the cases of negative numbers (by taking the absolute value:
	// this includes -Inf and -NaN!), infinity, Not a Number, and zero.

	sTakeAbsoluteValue(tls, bp, sign)
	if *(*int32)(unsafe.Pointer(bp + 4))&EXP_MASK == EXP_MASK {
		return sFormatInfAndNaN(tls, bp, decpt, endPtr)
	}
	if *(*float64)(unsafe.Pointer(bp)) == 0.0 {
		return sFormatZero(tls, decpt, endPtr)
	}

	// Unpack the floating point into a wide integer and an exponent.
	// Determine the number of bits that the big integer requires, and compute
	// a quick approximation (which may be one too high) of ceil(log10(d.d)).

	denorm = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 4))&EXP_MASK == 0)
	sDoubleToExpAndSig(tls, *(*float64)(unsafe.Pointer(bp)), bp+8, bp+16, bp+20)
	k = sApproximateLog10(tls, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* bw */)), *(*int32)(unsafe.Pointer(bp + 16 /* be */)), *(*int32)(unsafe.Pointer(bp + 20 /* bbits */)))
	k = sBetterLog10(tls, *(*float64)(unsafe.Pointer(bp)), k, bp+24)

	// At this point, we have:
	//	  d is the number to convert.
	//    bw are significand and exponent: d == bw*2**be,
	//    bbits is the length of bw: 2**bbits-1 <= bw < 2**bbits
	//	  k is either ceil(log10(d)) or ceil(log10(d))+1. k_check is 0 if we
	//      know that k is exactly ceil(log10(d)) and 1 if we need to check.
	//    We want a rational number
	//      r = b * 10**(1-k) = bw * 2**b2 * 5**b5 / (2**s2 / 5**s5),
	//    with b2, b5, s2, s5 >= 0.  Note that the most significant decimal
	//    digit is floor(r) and that successive digits can be obtained by
	//    setting r <- 10*floor(r) (or b <= 10 * (b % S)).  Find appropriate
	//    b2, b5, s2, s5.

	sComputeScale(tls, *(*int32)(unsafe.Pointer(bp + 16 /* be */)), k, bp+28, bp+32, bp+36, bp+40)

	// Correct an incorrect caller-supplied 'ndigits'.  Also determine:
	//	i = The maximum number of decimal digits that will be returned in the
	//      formatted string.  This is k + 1 + ndigits for F format, 18 for
	//      shortest and Steele, and ndigits for E format.
	//  ilim = The number of significant digits to convert if k has been
	//         guessed correctly. This is -1 for shortest and Steele (which
	//         stop when all significance has been lost), 'ndigits' for E
	//         format, and 'k + 1 + ndigits' for F format.
	//  ilim1 = The minimum number of significant digits to convert if k has
	//	        been guessed 1 too high. This, too, is -1 for shortest and
	//	        Steele, and 'ndigits' for E format, but it's 'ndigits-1' for F
	//	        format.

	sSetPrecisionLimits(tls, convType, k, bp+44, bp+48, bp+52, bp+56)

	// Try to do low-precision conversion in floating point rather than
	// resorting to expensive multiprecision arithmetic.

	if *(*int32)(unsafe.Pointer(bp + 52)) >= 0 && *(*int32)(unsafe.Pointer(bp + 52)) <= QUICK_MAX && !(flags&TCL_DD_NO_QUICK != 0) {
		retval = sQuickConversion(tls, *(*float64)(unsafe.Pointer(bp)), k, *(*int32)(unsafe.Pointer(bp + 24 /* k_check */)), flags, *(*int32)(unsafe.Pointer(bp + 48 /* i */)), *(*int32)(unsafe.Pointer(bp + 52 /* ilim */)), *(*int32)(unsafe.Pointer(bp + 56 /* ilim1 */)),
			decpt, endPtr)
		if retval != uintptr(0) {
			return retval
		}
	}

	// For shortening conversions, determine the upper and lower bounds for
	// the remainder at which we can stop.
	//   m+ = (2**m2plus * 5**m5) / (2**s2 * 5**s5) is the limit on the high
	//        side, and
	//   m- = (2**m2minus * 5**m5) / (2**s2 * 5**s5) is the limit on the low
	//        side.
	// We may need to increase s2 to put m2plus, m2minus, b2 over a common
	// denominator.

	if flags&TCL_DD_SHORTEN_FLAG != 0 {
		*(*int32)(unsafe.Pointer(bp + 60 /* m2minus */)) = *(*int32)(unsafe.Pointer(bp + 28 /* b2 */))
		var m2plus int32
		var m5 int32 = *(*int32)(unsafe.Pointer(bp + 32 /* b5 */))
		var len int32 = *(*int32)(unsafe.Pointer(bp + 48 /* i */))

		// Find the quantity i so that (2**i*5**b5)/(2**s2*5**s5) is 1/2 unit
		// in the least significant place of the floating point number.

		if denorm != 0 {
			*(*int32)(unsafe.Pointer(bp + 48 /* i */)) = *(*int32)(unsafe.Pointer(bp + 16)) + EXPONENT_BIAS + (FP_PRECISION - 1)
		} else {
			*(*int32)(unsafe.Pointer(bp + 48 /* i */)) = 1 + FP_PRECISION - *(*int32)(unsafe.Pointer(bp + 20))
		}
		*(*int32)(unsafe.Pointer(bp + 28 /* b2 */)) += *(*int32)(unsafe.Pointer(bp + 48 /* i */))
		*(*int32)(unsafe.Pointer(bp + 36 /* s2 */)) += *(*int32)(unsafe.Pointer(bp + 48 /* i */))

		// Reduce the fractions to lowest terms, since the above calculation
		// may have left excess powers of 2 in numerator and denominator.

		sCastOutPowersOf2(tls, bp+28, bp+60, bp+36)

		// In the special case where bw==1, the nearest floating point number
		// to it on the low side is 1/4 ulp below it. Adjust accordingly.

		m2plus = *(*int32)(unsafe.Pointer(bp + 60 /* m2minus */))
		if !(denorm != 0) && *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8)) == uint64(1) {
			*(*int32)(unsafe.Pointer(bp + 28 /* b2 */))++
			*(*int32)(unsafe.Pointer(bp + 36 /* s2 */))++
			m2plus++
		}

		if *(*int32)(unsafe.Pointer(bp + 40))+1 < N_LOG2POW5 && *(*int32)(unsafe.Pointer(bp + 36))+1+log2pow5[*(*int32)(unsafe.Pointer(bp + 40))+1] <= 64 {
			// If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
			// then all our intermediate calculations can be done using exact
			// 64-bit arithmetic with no need for expensive multiprecision
			// operations. (This will be true for all numbers in the range
			// [1.0e-3 .. 1.0e+24]).

			return sShorteningInt64Conversion(tls, bp, convType, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* bw */)), *(*int32)(unsafe.Pointer(bp + 28 /* b2 */)), *(*int32)(unsafe.Pointer(bp + 32 /* b5 */)), m2plus,
				*(*int32)(unsafe.Pointer(bp + 60 /* m2minus */)), m5, *(*int32)(unsafe.Pointer(bp + 36 /* s2 */)), *(*int32)(unsafe.Pointer(bp + 40 /* s5 */)), k, len, *(*int32)(unsafe.Pointer(bp + 52 /* ilim */)), *(*int32)(unsafe.Pointer(bp + 56 /* ilim1 */)), decpt, endPtr)
		} else if *(*int32)(unsafe.Pointer(bp + 40)) == 0 {
			// The denominator is a power of 2, so we can replace division by
			// digit shifts. First we round up s2 to a multiple of MP_DIGIT_BIT,
			// and adjust m2 and b2 accordingly. Then we launch into a version
			// of the comparison that's specialized for the 'power of mp_digit
			// in the denominator' case.

			if *(*int32)(unsafe.Pointer(bp + 36))%MP_DIGIT_BIT != 0 {
				var delta int32 = MP_DIGIT_BIT - *(*int32)(unsafe.Pointer(bp + 36))%MP_DIGIT_BIT

				*(*int32)(unsafe.Pointer(bp + 28 /* b2 */)) += delta
				m2plus = m2plus + delta
				*(*int32)(unsafe.Pointer(bp + 60 /* m2minus */)) += delta
				*(*int32)(unsafe.Pointer(bp + 36 /* s2 */)) += delta
			}
			return sShorteningBignumConversionPowD(tls, bp, convType, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* bw */)), *(*int32)(unsafe.Pointer(bp + 28 /* b2 */)), *(*int32)(unsafe.Pointer(bp + 32 /* b5 */)),
				m2plus, *(*int32)(unsafe.Pointer(bp + 60 /* m2minus */)), m5, *(*int32)(unsafe.Pointer(bp + 36))/MP_DIGIT_BIT, k, len, *(*int32)(unsafe.Pointer(bp + 52 /* ilim */)), *(*int32)(unsafe.Pointer(bp + 56 /* ilim1 */)),
				decpt, endPtr)
		} else {
			// Alas, there's no helpful special case; use full-up bignum
			// arithmetic for the conversion.

			return sShorteningBignumConversion(tls, bp, convType, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* bw */)), *(*int32)(unsafe.Pointer(bp + 28 /* b2 */)), m2plus,
				*(*int32)(unsafe.Pointer(bp + 60 /* m2minus */)), *(*int32)(unsafe.Pointer(bp + 36 /* s2 */)), *(*int32)(unsafe.Pointer(bp + 40 /* s5 */)), k, len, *(*int32)(unsafe.Pointer(bp + 52 /* ilim */)), *(*int32)(unsafe.Pointer(bp + 56 /* ilim1 */)), decpt, endPtr)
		}
	} else {
		// Non-shortening conversion.

		var len int32 = *(*int32)(unsafe.Pointer(bp + 48 /* i */))

		// Reduce numerator and denominator to lowest terms.

		if *(*int32)(unsafe.Pointer(bp + 28)) >= *(*int32)(unsafe.Pointer(bp + 36)) && *(*int32)(unsafe.Pointer(bp + 36)) > 0 {
			*(*int32)(unsafe.Pointer(bp + 28 /* b2 */)) -= *(*int32)(unsafe.Pointer(bp + 36 /* s2 */))
			*(*int32)(unsafe.Pointer(bp + 36 /* s2 */)) = 0
		} else if *(*int32)(unsafe.Pointer(bp + 36)) >= *(*int32)(unsafe.Pointer(bp + 28)) && *(*int32)(unsafe.Pointer(bp + 28)) > 0 {
			*(*int32)(unsafe.Pointer(bp + 36 /* s2 */)) -= *(*int32)(unsafe.Pointer(bp + 28 /* b2 */))
			*(*int32)(unsafe.Pointer(bp + 28 /* b2 */)) = 0
		}

		if *(*int32)(unsafe.Pointer(bp + 40))+1 < N_LOG2POW5 && *(*int32)(unsafe.Pointer(bp + 36))+1+log2pow5[*(*int32)(unsafe.Pointer(bp + 40))+1] <= 64 {
			// If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
			// then all our intermediate calculations can be done using exact
			// 64-bit arithmetic with no need for expensive multiprecision
			// operations.

			return sStrictInt64Conversion(tls, bp, convType, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* bw */)), *(*int32)(unsafe.Pointer(bp + 28 /* b2 */)), *(*int32)(unsafe.Pointer(bp + 32 /* b5 */)), *(*int32)(unsafe.Pointer(bp + 36 /* s2 */)), *(*int32)(unsafe.Pointer(bp + 40 /* s5 */)), k,
				len, *(*int32)(unsafe.Pointer(bp + 52 /* ilim */)), *(*int32)(unsafe.Pointer(bp + 56 /* ilim1 */)), decpt, endPtr)
		} else if *(*int32)(unsafe.Pointer(bp + 40)) == 0 {
			// The denominator is a power of 2, so we can replace division by
			// digit shifts. First we round up s2 to a multiple of MP_DIGIT_BIT,
			// and adjust m2 and b2 accordingly. Then we launch into a version
			// of the comparison that's specialized for the 'power of mp_digit
			// in the denominator' case.

			if *(*int32)(unsafe.Pointer(bp + 36))%MP_DIGIT_BIT != 0 {
				var delta int32 = MP_DIGIT_BIT - *(*int32)(unsafe.Pointer(bp + 36))%MP_DIGIT_BIT

				*(*int32)(unsafe.Pointer(bp + 28 /* b2 */)) += delta
				*(*int32)(unsafe.Pointer(bp + 36 /* s2 */)) += delta
			}
			return sStrictBignumConversionPowD(tls, bp, convType, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* bw */)), *(*int32)(unsafe.Pointer(bp + 28 /* b2 */)), *(*int32)(unsafe.Pointer(bp + 32 /* b5 */)),
				*(*int32)(unsafe.Pointer(bp + 36))/MP_DIGIT_BIT, k, len, *(*int32)(unsafe.Pointer(bp + 52 /* ilim */)), *(*int32)(unsafe.Pointer(bp + 56 /* ilim1 */)), decpt, endPtr)
		} else {
			// There are no helpful special cases, but at least we know in
			// advance how many digits we will convert. We can run the
			// conversion in steps of DIGIT_GROUP digits, so as to have many
			// fewer mp_int divisions.

			return sStrictBignumConversion(tls, bp, convType, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8 /* bw */)), *(*int32)(unsafe.Pointer(bp + 28 /* b2 */)), *(*int32)(unsafe.Pointer(bp + 36 /* s2 */)), *(*int32)(unsafe.Pointer(bp + 40 /* s5 */)), k,
				len, *(*int32)(unsafe.Pointer(bp + 52 /* ilim */)), *(*int32)(unsafe.Pointer(bp + 56 /* ilim1 */)), decpt, endPtr)
		}
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclInitDoubleConversion --
//
//	Initializes constants that are needed for conversions to and from
//	'double'
//
// Results:
//	None.
//
// Side effects:
//	The log base 2 of the floating point radix, the number of bits in a
//	double mantissa, and a table of the powers of five and ten are
//	computed and stored.
//
//----------------------------------------------------------------------

func XTclInitDoubleConversion(tls *libc.TLS) { /* tclStrToD.c:4445:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var i int32
	var x int32
	var u Tcl_WideUInt
	var d float64
	// var bitwhack struct {Fdv float64;} at bp, 8

	// Initialize table of powers of 10 expressed as wide integers.

	maxpow10_wide = libc.Int32FromFloat64(libc.Xfloor(tls, float64(uint64(unsafe.Sizeof(Tcl_WideUInt(0)))*uint64(8))*libc.Xlog(tls, 2.)/libc.Xlog(tls, 10.)))
	pow10_wide = XTcl_Alloc(tls, uint32(uint64(maxpow10_wide+1)*uint64(unsafe.Sizeof(Tcl_WideUInt(0)))))
	u = uint64(1)
	for i = 0; i < maxpow10_wide; i++ {
		*(*Tcl_WideUInt)(unsafe.Pointer(pow10_wide + uintptr(i)*8)) = u
		u = u * uint64(10)
	}
	*(*Tcl_WideUInt)(unsafe.Pointer(pow10_wide + uintptr(i)*8)) = u

	// Determine how many bits of precision a double has, and how many decimal
	// digits that represents.

	if libc.Xfrexp(tls, float64(2), uintptr(unsafe.Pointer(&log2FLT_RADIX))) != 0.5 {
		XTcl_Panic(tls, ts+63319, 0)
	}
	log2FLT_RADIX--
	mantBits = 53 * log2FLT_RADIX
	d = 1.0

	// Initialize a table of powers of ten that can be exactly represented in
	// a double.

	x = libc.Int32FromFloat64(float64(53) * libc.Xlog(tls, float64(2)) / libc.Xlog(tls, 5.0))
	if x < MAXPOW {
		mmaxpow = x
	} else {
		mmaxpow = MAXPOW
	}
	for i = 0; i <= mmaxpow; i++ {
		pow10vals[i] = d
		d = d * 10.0
	}

	// Initialize a table of large powers of five.

	for i = 0; i < 9; i++ {
		XTclBN_mp_init(tls, uintptr(unsafe.Pointer(&pow5))+uintptr(i)*24)
	}
	XTclBN_mp_set(tls, uintptr(unsafe.Pointer(&pow5)), uint32(5))
	for i = 0; i < 8; i++ {
		XTclBN_mp_sqr(tls, uintptr(unsafe.Pointer(&pow5))+uintptr(i)*24, uintptr(unsafe.Pointer(&pow5))+uintptr(i)*24+uintptr(1)*24)
	}
	XTclBN_mp_init_set_int(tls, uintptr(unsafe.Pointer(&pow5_13)), uint32(1220703125))
	for i = 1; i < 5; i++ {
		XTclBN_mp_init(tls, uintptr(unsafe.Pointer(&pow5_13))+uintptr(i)*24)
		XTclBN_mp_sqr(tls, uintptr(unsafe.Pointer(&pow5_13))+uintptr(i)*24-uintptr(1)*24, uintptr(unsafe.Pointer(&pow5_13))+uintptr(i)*24)
	}

	// Determine the number of decimal digits to the left and right of the
	// decimal point in the largest and smallest double, the smallest double
	// that differs from zero, and the number of mp_digits needed to represent
	// the significand of a double.

	maxDigits = libc.Int32FromFloat64((float64(1024)*libc.Xlog(tls, float64(2)) +
		0.5*libc.Xlog(tls, 10.)) / libc.Xlog(tls, 10.))
	minDigits = libc.Int32FromFloat64(libc.Xfloor(tls, float64(-1021-53)*
		libc.Xlog(tls, float64(2))/libc.Xlog(tls, 10.)))
	log10_DIGIT_MAX = libc.Int32FromFloat64(libc.Xfloor(tls, float64(MP_DIGIT_BIT)*libc.Xlog(tls, 2.)/libc.Xlog(tls, 10.)))

	// Nokia 770's software-emulated floating point is "middle endian": the
	// bytes within a 32-bit word are little-endian (like the native
	// integers), but the two words of a 'double' are presented most
	// significant word first.

	*(*float64)(unsafe.Pointer(bp)) = 1.000000238418579
	// 3ff0 0000 4000 0000
	if *(*Tcl_WideUInt)(unsafe.Pointer(bp))>>32 == uint64(0x3FF00000) {
		n770_fp = 0
	} else if *(*Tcl_WideUInt)(unsafe.Pointer(bp))&uint64(0xFFFFFFFF) == uint64(0x3FF00000) {
		n770_fp = 1
	} else {
		XTcl_Panic(tls, ts+63364, 0)
	}
}

//----------------------------------------------------------------------
//
// TclFinalizeDoubleConversion --
//
//	Cleans up this file on exit.
//
// Results:
//	None
//
// Side effects:
//	Memory allocated by TclInitDoubleConversion is freed.
//
//----------------------------------------------------------------------

func XTclFinalizeDoubleConversion(tls *libc.TLS) { /* tclStrToD.c:4575:1: */
	var i int32

	XTclpFree(tls, pow10_wide)
	for i = 0; i < 9; i++ {
		XTclBN_mp_clear(tls, uintptr(unsafe.Pointer(&pow5))+uintptr(i)*24)
	}
	for i = 0; i < 5; i++ {
		XTclBN_mp_clear(tls, uintptr(unsafe.Pointer(&pow5_13))+uintptr(i)*24)
	}
}

//----------------------------------------------------------------------
//
// Tcl_InitBignumFromDouble --
//
//	Extracts the integer part of a double and converts it to an arbitrary
//	precision integer.
//
// Results:
//	None.
//
// Side effects:
//	Initializes the bignum supplied, and stores the converted number in
//	it.
//
//----------------------------------------------------------------------

func XTcl_InitBignumFromDouble(tls *libc.TLS, interp uintptr, d float64, b uintptr) int32 { /* tclStrToD.c:4607:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var fract float64
	// var expt int32 at bp+32, 4

	// Infinite values can't convert to bignum.

	if d > 1.79769313486231570814527423731704357e+308 || d < -1.79769313486231570814527423731704357e+308 {
		if interp != uintptr(0) {
			var s uintptr = ts + 11084 /* "integer value to..." */

			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, s, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+8778, ts+54412, s, uintptr(0)))
		}
		return TCL_ERROR
	}

	fract = libc.Xfrexp(tls, d, bp+32)
	if *(*int32)(unsafe.Pointer(bp + 32)) <= 0 {
		XTclBN_mp_init(tls, b)
		XTclBN_mp_zero(tls, b)
	} else {
		var w Tcl_WideInt = libc.Int64FromFloat64(libc.Xldexp(tls, fract, mantBits))
		var shift int32 = *(*int32)(unsafe.Pointer(bp + 32)) - mantBits

		XTclBNInitBignumFromWideInt(tls, b, w)
		if shift < 0 {
			XTclBN_mp_div_2d(tls, b, -shift, b, uintptr(0))
		} else if shift > 0 {
			XTclBN_mp_mul_2d(tls, b, shift, b)
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclBignumToDouble --
//
//	Convert an arbitrary-precision integer to a native floating point
//	number.
//
// Results:
//	Returns the converted number. Sets errno to ERANGE if the number is
//	too large to convert.
//
//----------------------------------------------------------------------

func XTclBignumToDouble(tls *libc.TLS, a uintptr) float64 { /* tclStrToD.c:4663:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var b Mp_int at bp, 24

	var bits int32
	var shift int32
	var i int32
	var lsb int32
	var r float64

	// We need a 'mantBits'-bit significand.  Determine what shift will
	// give us that.

	bits = XTclBN_mp_count_bits(tls, a)
	if bits > 1024*log2FLT_RADIX {
		*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = ERANGE
		if func() int32 {
			if (*Mp_int)(unsafe.Pointer(a)).Fsign != MP_ZPOS {
				return MP_YES
			}
			return MP_NO
		}() != 0 {
			return -libc.X__builtin_huge_val(tls)
		} else {
			return libc.X__builtin_huge_val(tls)
		}
	}
	shift = mantBits - bits

	// If shift > 0, shift the significand left by the requisite number of
	// bits.  If shift == 0, the significand is already exactly 'mantBits'
	// in length.  If shift < 0, we will need to shift the significand right
	// by the requisite number of bits, and round it. If the '1-shift'
	// least significant bits are 0, but the 'shift'th bit is nonzero,
	// then the significand lies exactly between two values and must be
	// 'rounded to even'.

	XTclBN_mp_init(tls, bp)
	if shift == 0 {
		XTclBN_mp_copy(tls, a, bp)
	} else if shift > 0 {
		XTclBN_mp_mul_2d(tls, a, shift, bp)
	} else if shift < 0 {
		lsb = XTclBN_mp_cnt_lsb(tls, a)
		if lsb == -1-shift {

			// Round to even

			XTclBN_mp_div_2d(tls, a, -shift, bp, uintptr(0))
			if func() int32 {
				if (*Mp_int)(unsafe.Pointer(bp)).Fused != 0 && *(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp))&Mp_digit(1) == Mp_digit(1) {
					return MP_YES
				}
				return MP_NO
			}() != 0 {
				if func() int32 {
					if (*Mp_int)(unsafe.Pointer(bp)).Fsign != MP_ZPOS {
						return MP_YES
					}
					return MP_NO
				}() != 0 {
					XTclBN_mp_sub_d(tls, bp, uint32(1), bp)
				} else {
					XTclBN_mp_add_d(tls, bp, uint32(1), bp)
				}
			}
		} else {

			// Ordinary rounding

			XTclBN_mp_div_2d(tls, a, -1-shift, bp, uintptr(0))
			if func() int32 {
				if (*Mp_int)(unsafe.Pointer(bp)).Fsign != MP_ZPOS {
					return MP_YES
				}
				return MP_NO
			}() != 0 {
				XTclBN_mp_sub_d(tls, bp, uint32(1), bp)
			} else {
				XTclBN_mp_add_d(tls, bp, uint32(1), bp)
			}
			XTclBN_mp_div_2d(tls, bp, 1, bp, uintptr(0))
		}
	}

	// Accumulate the result, one mp_digit at a time.

	r = 0.0
	for i = (*Mp_int)(unsafe.Pointer(bp)).Fused - 1; i >= 0; i-- {
		r = libc.Xldexp(tls, r, MP_DIGIT_BIT) + float64(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(i)*4)))
	}
	XTclBN_mp_clear(tls, bp)

	// Scale the result to the correct number of bits.

	r = libc.Xldexp(tls, r, bits-mantBits)

	// Return the result with the appropriate sign.

	if func() int32 {
		if (*Mp_int)(unsafe.Pointer(a)).Fsign != MP_ZPOS {
			return MP_YES
		}
		return MP_NO
	}() != 0 {
		return -r
	} else {
		return r
	}
	return float64(0)
}

//----------------------------------------------------------------------
//
// TclCeil --
//
//	Computes the smallest floating point number that is at least the
//	mp_int argument.
//
// Results:
//	Returns the floating point number.
//
//----------------------------------------------------------------------

func XTclCeil(tls *libc.TLS, a uintptr) float64 { /* tclStrToD.c:4776:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var r float64 = 0.0
	// var b Mp_int at bp, 24

	XTclBN_mp_init(tls, bp)
	if XTclBN_mp_cmp_d(tls, a, uint32(0)) == -1 {
		XTclBN_mp_neg(tls, a, bp)
		r = -XTclFloor(tls, bp)
	} else {
		var bits int32 = XTclBN_mp_count_bits(tls, a)

		if bits > 1024*log2FLT_RADIX {
			r = libc.X__builtin_huge_val(tls)
		} else {
			var i int32
			var exact int32 = 1
			var shift int32 = mantBits - bits

			if shift > 0 {
				XTclBN_mp_mul_2d(tls, a, shift, bp)
			} else if shift < 0 {
				// var d Mp_int at bp+24, 24

				XTclBN_mp_init(tls, bp+24)
				XTclBN_mp_div_2d(tls, a, -shift, bp, bp+24)
				exact = func() int32 {
					if (*Mp_int)(unsafe.Pointer(bp+24)).Fused == 0 {
						return MP_YES
					}
					return MP_NO
				}()
				XTclBN_mp_clear(tls, bp+24)
			} else {
				XTclBN_mp_copy(tls, a, bp)
			}
			if !(exact != 0) {
				XTclBN_mp_add_d(tls, bp, uint32(1), bp)
			}
			for i = (*Mp_int)(unsafe.Pointer(bp)).Fused - 1; i >= 0; i-- {
				r = libc.Xldexp(tls, r, MP_DIGIT_BIT) + float64(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(i)*4)))
			}
			r = libc.Xldexp(tls, r, bits-mantBits)
		}
	}
	XTclBN_mp_clear(tls, bp)
	return r
}

//----------------------------------------------------------------------
//
// TclFloor --
//
//	Computes the largest floating point number less than or equal to the
//	mp_int argument.
//
// Results:
//	Returns the floating point value.
//
//----------------------------------------------------------------------

func XTclFloor(tls *libc.TLS, a uintptr) float64 { /* tclStrToD.c:4833:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var r float64 = 0.0
	// var b Mp_int at bp, 24

	XTclBN_mp_init(tls, bp)
	if XTclBN_mp_cmp_d(tls, a, uint32(0)) == -1 {
		XTclBN_mp_neg(tls, a, bp)
		r = -XTclCeil(tls, bp)
	} else {
		var bits int32 = XTclBN_mp_count_bits(tls, a)

		if bits > 1024*log2FLT_RADIX {
			r = 1.79769313486231570814527423731704357e+308
		} else {
			var i int32
			var shift int32 = mantBits - bits

			if shift > 0 {
				XTclBN_mp_mul_2d(tls, a, shift, bp)
			} else if shift < 0 {
				XTclBN_mp_div_2d(tls, a, -shift, bp, uintptr(0))
			} else {
				XTclBN_mp_copy(tls, a, bp)
			}
			for i = (*Mp_int)(unsafe.Pointer(bp)).Fused - 1; i >= 0; i-- {
				r = libc.Xldexp(tls, r, MP_DIGIT_BIT) + float64(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(i)*4)))
			}
			r = libc.Xldexp(tls, r, bits-mantBits)
		}
	}
	XTclBN_mp_clear(tls, bp)
	return r
}

//----------------------------------------------------------------------
//
// BignumToBiasedFrExp --
//
//	Convert an arbitrary-precision integer to a native floating point
//	number in the range [0.5,1) times a power of two. NOTE: Intentionally
//	converts to a number that's a few ulp too small, so that
//	RefineApproximation will not overflow near the high end of the
//	machine's arithmetic range.
//
// Results:
//	Returns the converted number.
//
// Side effects:
//	Stores the exponent of two in 'machexp'.
//
//----------------------------------------------------------------------

func sBignumToBiasedFrExp(tls *libc.TLS, a uintptr, machexp uintptr) float64 { /* tclStrToD.c:4889:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var b Mp_int at bp, 24

	var bits int32
	var shift int32
	var i int32
	var r float64

	// Determine how many bits we need, and extract that many from the input.
	// Round to nearest unit in the last place.

	bits = XTclBN_mp_count_bits(tls, a)
	shift = mantBits - 2 - bits
	XTclBN_mp_init(tls, bp)
	if shift > 0 {
		XTclBN_mp_mul_2d(tls, a, shift, bp)
	} else if shift < 0 {
		XTclBN_mp_div_2d(tls, a, -shift, bp, uintptr(0))
	} else {
		XTclBN_mp_copy(tls, a, bp)
	}

	// Accumulate the result, one mp_digit at a time.

	r = 0.0
	for i = (*Mp_int)(unsafe.Pointer(bp)).Fused - 1; i >= 0; i-- {
		r = libc.Xldexp(tls, r, MP_DIGIT_BIT) + float64(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp)).Fdp + uintptr(i)*4)))
	}
	XTclBN_mp_clear(tls, bp)

	// Return the result with the appropriate sign.

	*(*int32)(unsafe.Pointer(machexp)) = bits - mantBits + 2
	return func() float64 {
		if func() int32 {
			if (*Mp_int)(unsafe.Pointer(a)).Fsign != MP_ZPOS {
				return MP_YES
			}
			return MP_NO
		}() != 0 {
			return -r
		}
		return r
	}()
}

//----------------------------------------------------------------------
//
// Pow10TimesFrExp --
//
//	Multiply a power of ten by a number expressed as fraction and
//	exponent.
//
// Results:
//	Returns the significand of the result.
//
// Side effects:
//	Overwrites the 'machexp' parameter with the exponent of the result.
//
// Assumes that 'exponent' is such that 10**exponent would be a double, even
// though 'fraction*10**(machexp+exponent)' might overflow.
//
//----------------------------------------------------------------------

func sPow10TimesFrExp(tls *libc.TLS, exponent int32, fraction float64, machexp uintptr) float64 { /* tclStrToD.c:4954:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var i int32
	// var j int32 at bp, 4

	var expt int32 = *(*int32)(unsafe.Pointer(machexp))
	var retval float64 = fraction

	if exponent > 0 {
		// Multiply by 10**exponent.

		retval = libc.Xfrexp(tls, retval*pow10vals[exponent&0xF], bp)
		expt = expt + *(*int32)(unsafe.Pointer(bp))
		for i = 4; i < 9; i++ {
			if exponent&(int32(1)<<i) != 0 {
				retval = libc.Xfrexp(tls, retval*pow_10_2_n[i], bp)
				expt = expt + *(*int32)(unsafe.Pointer(bp))
			}
		}
	} else if exponent < 0 {
		// Divide by 10**-exponent.

		retval = libc.Xfrexp(tls, retval/pow10vals[-exponent&0xF], bp)
		expt = expt + *(*int32)(unsafe.Pointer(bp))
		for i = 4; i < 9; i++ {
			if -exponent&(int32(1)<<i) != 0 {
				retval = libc.Xfrexp(tls, retval/pow_10_2_n[i], bp)
				expt = expt + *(*int32)(unsafe.Pointer(bp))
			}
		}
	}

	*(*int32)(unsafe.Pointer(machexp)) = expt
	return retval
}

//----------------------------------------------------------------------
//
// SafeLdExp --
//
//	Do an 'ldexp' operation, but handle denormals gracefully.
//
// Results:
//	Returns the appropriately scaled value.
//
//	On some platforms, 'ldexp' fails when presented with a number too
//	small to represent as a normalized double. This routine does 'ldexp'
//	in two steps for those numbers, to return correctly denormalized
//	values.
//
//----------------------------------------------------------------------

func sSafeLdExp(tls *libc.TLS, fract float64, expt int32) float64 { /* tclStrToD.c:5015:1: */
	var minexpt int32 = -1021 * log2FLT_RADIX
	var a float64
	var b float64
	var retval float64

	if expt < minexpt {
		libc.AtomicStoreFloat64(&a, float64(libc.Xldexp(tls, fract, expt-mantBits-minexpt)))
		libc.AtomicStoreFloat64(&b, float64(libc.Xldexp(tls, 1.0, mantBits+minexpt)))
		libc.AtomicStoreFloat64(&retval, float64(a*b))
	} else {
		libc.AtomicStoreFloat64(&retval, float64(libc.Xldexp(tls, fract, expt)))
	}
	return retval
}

//----------------------------------------------------------------------
//
// TclFormatNaN --
//
//	Makes the string representation of a "Not a Number"
//
// Results:
//	None.
//
// Side effects:
//	Stores the string representation in the supplied buffer, which must be
//	at least TCL_DOUBLE_SPACE characters.
//
//----------------------------------------------------------------------

func XTclFormatNaN(tls *libc.TLS, value float64, buffer uintptr) { /* tclStrToD.c:5050:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var bitwhack struct {Fdv float64;} at bp+8, 8

	*(*float64)(unsafe.Pointer(bp + 8)) = value
	if n770_fp != 0 {
		*(*Tcl_WideUInt)(unsafe.Pointer(bp + 8)) = sNokia770Twiddle(tls, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8)))
	}
	if *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8))&(Tcl_WideUInt(uint64(1))<<63) != 0 {
		*(*Tcl_WideUInt)(unsafe.Pointer(bp + 8)) &= libc.CplUint64(Tcl_WideUInt(uint64(1)) << 63)
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&buffer, 1))) = int8('-')
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&buffer, 1))) = int8('N')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&buffer, 1))) = int8('a')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&buffer, 1))) = int8('N')
	*(*Tcl_WideUInt)(unsafe.Pointer(bp + 8)) &= Tcl_WideUInt(uint64(1))<<51 - uint64(1)
	if *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8)) != uint64(0) {
		libc.Xsprintf(tls, buffer, ts+63414, libc.VaList(bp, *(*Tcl_WideUInt)(unsafe.Pointer(bp + 8))))
	} else {
		*(*int8)(unsafe.Pointer(buffer)) = int8(0)
	}
}

//----------------------------------------------------------------------
//
// Nokia770Twiddle --
//
//	Transpose the two words of a number for Nokia 770 floating point
//	handling.
//
//----------------------------------------------------------------------
func sNokia770Twiddle(tls *libc.TLS, w Tcl_WideUInt) Tcl_WideUInt { /* tclStrToD.c:5095:1: */
	return w>>32&uint64(0xFFFFFFFF) | w<<32
}

//----------------------------------------------------------------------
//
// TclNokia770Doubles --
//
//	Transpose the two words of a number for Nokia 770 floating point
//	handling.
//
//----------------------------------------------------------------------

func XTclNokia770Doubles(tls *libc.TLS) int32 { /* tclStrToD.c:5114:1: */
	return n770_fp
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// tclInt.h --
//
//	Declarations of things used internally by the Tcl interpreter.
//
// Copyright (c) 1987-1993 The Regents of the University of California.
// Copyright (c) 1993-1997 Lucent Technologies.
// Copyright (c) 1994-1998 Sun Microsystems, Inc.
// Copyright (c) 1998-1999 by Scriptics Corporation.
// Copyright (c) 2001, 2002 by Kevin B. Kenny.  All rights reserved.
// Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
// Copyright (c) 2006-2008 by Joe Mistachkin.  All rights reserved.
// Copyright (c) 2008 by Miguel Sofer. All rights reserved.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// tclStringRep.h --
//
//	This file contains the definition of the Unicode string internal
//	representation and macros to access it.
//
//	A Unicode string is an internationalized string. Conceptually, a
//	Unicode string is an array of 16-bit quantities organized as a
//	sequence of properly formed UTF-8 characters. There is a one-to-one
//	map between Unicode and UTF characters. Because Unicode characters
//	have a fixed width, operations such as indexing operate on Unicode
//	data. The String object is optimized for the case where each UTF char
//	in a string is only one byte. In this case, we store the value of
//	numChars, but we don't store the Unicode data (unless Tcl_GetUnicode
//	is explicitly called).
//
//	The String object type stores one or both formats. The default
//	behavior is to store UTF. Once Unicode is calculated by a function, it
//	is stored in the internal rep for future access (without an additional
//	O(n) cost).
//
//	To allow many appends to be done to an object without constantly
//	reallocating the space for the string or Unicode representation, we
//	allocate double the space for the string or Unicode and use the
//	internal representation to keep track of how much space is used vs.
//	allocated.
//
// Copyright (c) 1995-1997 Sun Microsystems, Inc.
// Copyright (c) 1999 by Scriptics Corporation.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// The following structure is the internal rep for a String object. It keeps
// track of how much memory has been used and how much has been allocated for
// the Unicode and UTF string to enable growing and shrinking of the UTF and
// Unicode reps of the String object with fewer mallocs. To optimize string
// length and indexing operations, this structure also stores the number of
// characters (same of UTF and Unicode!) once that value has been computed.
//
// Under normal configurations, what Tcl calls "Unicode" is actually UTF-16
// restricted to the Basic Multilingual Plane (i.e. U+00000 to U+0FFFF). This
// can be officially modified by altering the definition of Tcl_UniChar in
// tcl.h, but do not do that unless you are sure what you're doing!

type String1 = struct {
	F__ccgo_pad1 [0]uint32
	FnumChars    int32
	Fallocated   int32
	FmaxChars    int32
	FhasUnicode  int32
} /* tclStringRep.h:49:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// tclInt.h --
//
//	Declarations of things used internally by the Tcl interpreter.
//
// Copyright (c) 1987-1993 The Regents of the University of California.
// Copyright (c) 1993-1997 Lucent Technologies.
// Copyright (c) 1994-1998 Sun Microsystems, Inc.
// Copyright (c) 1998-1999 by Scriptics Corporation.
// Copyright (c) 2001, 2002 by Kevin B. Kenny.  All rights reserved.
// Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
// Copyright (c) 2006-2008 by Joe Mistachkin.  All rights reserved.
// Copyright (c) 2008 by Miguel Sofer. All rights reserved.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// super class file for PK algos

// default ... include all MPI

// RSA only (does not support DH/DSA/ECC)
// #define SC_RSA_1
// #define SC_RSA_1_WITH_TESTS

// For reference.... On an Athlon64 optimizing for speed...
//
//    LTM's mpi.o with all functions [striped] is 142KiB in size.
//

// Works for RSA only, mpi.o is 68KiB
// LibTomMath, multiple-precision integer library -- Tom St Denis
// SPDX-License-Identifier: Unlicense

// tclStringRep.h --
//
//	This file contains the definition of the Unicode string internal
//	representation and macros to access it.
//
//	A Unicode string is an internationalized string. Conceptually, a
//	Unicode string is an array of 16-bit quantities organized as a
//	sequence of properly formed UTF-8 characters. There is a one-to-one
//	map between Unicode and UTF characters. Because Unicode characters
//	have a fixed width, operations such as indexing operate on Unicode
//	data. The String object is optimized for the case where each UTF char
//	in a string is only one byte. In this case, we store the value of
//	numChars, but we don't store the Unicode data (unless Tcl_GetUnicode
//	is explicitly called).
//
//	The String object type stores one or both formats. The default
//	behavior is to store UTF. Once Unicode is calculated by a function, it
//	is stored in the internal rep for future access (without an additional
//	O(n) cost).
//
//	To allow many appends to be done to an object without constantly
//	reallocating the space for the string or Unicode representation, we
//	allocate double the space for the string or Unicode and use the
//	internal representation to keep track of how much space is used vs.
//	allocated.
//
// Copyright (c) 1995-1997 Sun Microsystems, Inc.
// Copyright (c) 1999 by Scriptics Corporation.
//
// See the file "license.terms" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.

// The following structure is the internal rep for a String object. It keeps
// track of how much memory has been used and how much has been allocated for
// the Unicode and UTF string to enable growing and shrinking of the UTF and
// Unicode reps of the String object with fewer mallocs. To optimize string
// length and indexing operations, this structure also stores the number of
// characters (same of UTF and Unicode!) once that value has been computed.
//
// Under normal configurations, what Tcl calls "Unicode" is actually UTF-16
// restricted to the Basic Multilingual Plane (i.e. U+00000 to U+0FFFF). This
// can be officially modified by altering the definition of Tcl_UniChar in
// tcl.h, but do not do that unless you are sure what you're doing!

type String = String1 /* tclStringRep.h:65:3 */

// The structure below defines the string Tcl object type by means of
// functions that can be invoked by generic object code.

var XtclStringType = Tcl_ObjType{
	Fname:             ts + 17048,
	FfreeIntRepProc:   0, // freeIntRepPro
	FdupIntRepProc:    0, // dupIntRepProc
	FupdateStringProc: 0, // updateStringProc
	FsetFromAnyProc:   0, // setFromAnyProc
} /* tclStringObj.c:86:19 */

// TCL STRING GROWTH ALGORITHM
//
// When growing strings (during an append, for example), the following growth
// algorithm is used:
//
//   Attempt to allocate 2 * (originalLength + appendLength)
//   On failure:
//	attempt to allocate originalLength + 2*appendLength + TCL_MIN_GROWTH
//
// This algorithm allows very good performance, as it rapidly increases the
// memory allocated for a given string, which minimizes the number of
// reallocations that must be performed. However, using only the doubling
// algorithm can lead to a significant waste of memory. In particular, it may
// fail even when there is sufficient memory available to complete the append
// request (but there is not 2*totalLength memory available). So when the
// doubling fails (because there is not enough memory available), the
// algorithm requests a smaller amount of memory, which is still enough to
// cover the request, but which hopefully will be less than the total
// available memory.
//
// The addition of TCL_MIN_GROWTH allows for efficient handling of very
// small appends. Without this extra slush factor, a sequence of several small
// appends would cause several memory allocations. As long as
// TCL_MIN_GROWTH is a reasonable size, we can avoid that behavior.
//
// The growth algorithm can be tuned by adjusting the following parameters:
//
// TCL_MIN_GROWTH		Additional space, in bytes, to allocate when
//				the double allocation has failed. Default is
//				1024 (1 kilobyte).  See tclInt.h.

func sGrowStringBuffer(tls *libc.TLS, objPtr uintptr, needed int32, flag int32) { /* tclStringObj.c:132:1: */
	// Pre-conditions:
	//	objPtr->typePtr == &tclStringType
	//	needed > stringPtr->allocated
	//	flag || objPtr->bytes != NULL

	var stringPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	var ptr uintptr = uintptr(0)
	var attempt int32

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == XtclEmptyStringRep {
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = uintptr(0)
	}
	if flag == 0 || (*String)(unsafe.Pointer(stringPtr)).Fallocated > 0 {
		if needed <= 0x7fffffff/2 {
			attempt = 2 * needed
			ptr = XTclpRealloc(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, uint32(attempt+1))
		}
		if ptr == uintptr(0) {
			// Take care computing the amount of modest growth to avoid
			// overflow into invalid argument values for attempt.

			var limit uint32 = uint32(0x7fffffff - needed)
			var extra uint32 = uint32(needed - (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength + TCL_MIN_GROWTH)
			var growth int32 = func() int32 {
				if extra > limit {
					return int32(limit)
				}
				return int32(extra)
			}()

			attempt = needed + growth
			ptr = XTclpRealloc(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, uint32(attempt+1))
		}
	}
	if ptr == uintptr(0) {
		// First allocation - just big enough; or last chance fallback.

		attempt = needed
		ptr = XTcl_Realloc(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, uint32(attempt+1))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = ptr
	(*String)(unsafe.Pointer(stringPtr)).Fallocated = attempt
}

func sGrowUnicodeBuffer(tls *libc.TLS, objPtr uintptr, needed int32) { /* tclStringObj.c:183:1: */
	// Pre-conditions:
	//	objPtr->typePtr == &tclStringType
	//	needed > stringPtr->maxChars
	//	needed < STRING_MAXCHARS

	var ptr uintptr = uintptr(0)
	var stringPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	var attempt int32

	if (*String)(unsafe.Pointer(stringPtr)).FmaxChars > 0 {
		// Subsequent appends - apply the growth algorithm.

		if needed <= int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0))))/2 {
			attempt = 2 * needed
			ptr = XTclpRealloc(tls, stringPtr, uint32(uint64(int32(uintptr(0)+16))+uint64(attempt+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
		}
		if ptr == uintptr(0) {
			// Take care computing the amount of modest growth to avoid
			// overflow into invalid argument values for attempt.

			var limit uint32 = uint32(int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0)))) - needed)
			var extra uint32 = uint32(uint64(needed-(*String)(unsafe.Pointer(stringPtr)).FnumChars) +
				uint64(TCL_MIN_GROWTH)/uint64(unsafe.Sizeof(Tcl_UniChar(0))))
			var growth int32 = func() int32 {
				if extra > limit {
					return int32(limit)
				}
				return int32(extra)
			}()

			attempt = needed + growth
			ptr = XTclpRealloc(tls, stringPtr, uint32(uint64(int32(uintptr(0)+16))+uint64(attempt+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
		}
	}
	if ptr == uintptr(0) {
		// First allocation - just big enough; or last chance fallback.

		attempt = needed
		ptr = XTcl_Realloc(tls, stringPtr, uint32(uint64(int32(uintptr(0)+16))+uint64(attempt+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
	}
	stringPtr = ptr
	(*String)(unsafe.Pointer(stringPtr)).FmaxChars = attempt
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = stringPtr
}

//----------------------------------------------------------------------
//
// Tcl_NewStringObj --
//
//	This function is normally called when not debugging: i.e., when
//	TCL_MEM_DEBUG is not defined. It creates a new string object and
//	initializes it from the byte pointer and length arguments.
//
//	When TCL_MEM_DEBUG is defined, this function just returns the result
//	of calling the debugging version Tcl_DbNewStringObj.
//
// Results:
//	A newly created string object is returned that has ref count zero.
//
// Side effects:
//	The new object's internal string representation will be set to a copy
//	of the length bytes starting at "bytes". If "length" is negative, use
//	bytes up to the first NUL byte; i.e., assume "bytes" points to a
//	C-style NUL-terminated string. The object's type is set to NULL. An
//	extra NUL is added to the end of the new object's byte array.
//
//----------------------------------------------------------------------

func XTcl_NewStringObj(tls *libc.TLS, bytes uintptr, length int32) uintptr { /* tclStringObj.c:273:9: */
	var objPtr uintptr

	if length < 0 {
		length = func() int32 {
			if bytes != 0 {
				return int32(libc.Xstrlen(tls, bytes))
			}
			return 0
		}()
	}
	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
		if length == 0 {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(length+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, bytes, uint64(length))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(length))) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = length
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		{
		}
	}
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_DbNewStringObj --
//
//	This function is normally called when debugging: i.e., when
//	TCL_MEM_DEBUG is defined. It creates new string objects. It is the
//	same as the Tcl_NewStringObj function above except that it calls
//	Tcl_DbCkalloc directly with the file name and line number from its
//	caller. This simplifies debugging since then the [memory active]
//	command will report the correct file name and line number when
//	reporting objects that haven't been freed.
//
//	When TCL_MEM_DEBUG is not defined, this function just returns the
//	result of calling Tcl_NewStringObj.
//
// Results:
//	A newly created string object is returned that has ref count zero.
//
// Side effects:
//	The new object's internal string representation will be set to a copy
//	of the length bytes starting at "bytes". If "length" is negative, use
//	bytes up to the first NUL byte; i.e., assume "bytes" points to a
//	C-style NUL-terminated string. The object's type is set to NULL. An
//	extra NUL is added to the end of the new object's byte array.
//
//----------------------------------------------------------------------

func XTcl_DbNewStringObj(tls *libc.TLS, bytes uintptr, length int32, file uintptr, line int32) uintptr { /* tclStringObj.c:345:9: */
	return XTcl_NewStringObj(tls, bytes, length)
}

//---------------------------------------------------------------------------
//
// Tcl_NewUnicodeObj --
//
//	This function is creates a new String object and initializes it from
//	the given Unicode String. If the Utf String is the same size as the
//	Unicode string, don't duplicate the data.
//
// Results:
//	The newly created object is returned. This object will have no initial
//	string representation. The returned object has a ref count of 0.
//
// Side effects:
//	Memory allocated for new object and copy of Unicode argument.
//
//---------------------------------------------------------------------------

func XTcl_NewUnicodeObj(tls *libc.TLS, unicode uintptr, numChars int32) uintptr { /* tclStringObj.c:381:9: */
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	sSetUnicodeObj(tls, objPtr, unicode, numChars)
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_GetCharLength --
//
//	Get the length of the Unicode string from the Tcl object.
//
// Results:
//	Pointer to unicode string representing the unicode object.
//
// Side effects:
//	Frees old internal rep. Allocates memory for new "String" internal
//	rep.
//
//----------------------------------------------------------------------

func XTcl_GetCharLength(tls *libc.TLS, objPtr uintptr) int32 { /* tclStringObj.c:413:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var stringPtr uintptr
	var numChars int32

	// Quick, no-shimmer return for short string reps.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength < 2 {
		// 0 bytes -> 0 chars; 1 byte -> 1 char
		return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
	}

	// Optimize the case where we're really dealing with a bytearray object;
	// we don't need to convert to a string to perform the get-length operation.
	//
	// NOTE that we do not need the bytearray to be "pure".  A ByteArray value
	// with a string rep cannot be trusted to represent the same value as the
	// string rep, but it *can* be trusted to have the same character length
	// as the string rep, which is all this routine cares about.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) {
		// var length int32 at bp, 4

		XTcl_GetByteArrayFromObj(tls, objPtr, bp)
		return *(*int32)(unsafe.Pointer(bp /* length */))
	}

	// OK, need to work with the object as a string.

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	numChars = (*String)(unsafe.Pointer(stringPtr)).FnumChars

	// If numChars is unknown, compute it.

	if numChars == -1 {
		for ok := true; ok; ok = 0 != 0 {
			var _count int32
			var _i int32 = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
			var _str uintptr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			for _i != 0 && int32(*(*uint8)(unsafe.Pointer(_str))) < 0xC0 {
				_i--
				_str++
			}
			_count = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength - _i
			if _i != 0 {
				_count = _count + XTcl_NumUtfChars(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes+uintptr(_count), _i)
			}
			numChars = _count
		}

		(*String)(unsafe.Pointer(stringPtr)).FnumChars = numChars

	}
	return numChars
}

//----------------------------------------------------------------------
//
// TclCheckEmptyString --
//
//	Determine whether the string value of an object is or would be the
//	empty string, without generating a string representation.
//
// Results:
//	Returns 1 if empty, 0 if not, and -1 if unknown.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------
func XTclCheckEmptyString(tls *libc.TLS, objPtr uintptr) int32 { /* tclStringObj.c:494:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	*(*int32)(unsafe.Pointer(bp /* length */)) = -1

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == XtclEmptyStringRep {
		return TCL_EMPTYSTRING_YES
	}

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		XTcl_ListObjLength(tls, uintptr(0), objPtr, bp)
		return libc.Bool32(*(*int32)(unsafe.Pointer(bp)) == 0)
	}

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) && (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclDictType)) {
		XTcl_DictObjSize(tls, uintptr(0), objPtr, bp)
		return libc.Bool32(*(*int32)(unsafe.Pointer(bp)) == 0)
	}

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) {
		return TCL_EMPTYSTRING_UNKNOWN
	}
	return libc.Bool32((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == 0)
}

//----------------------------------------------------------------------
//
// Tcl_GetUniChar/TclGetUCS4 --
//
//	Get the index'th Unicode character from the String object. If index
//	is out of range, the result = 0xFFFD (Tcl_GetUniChar) resp. -1 (TclGetUCS4)
//
// Results:
//	Returns the index'th Unicode character in the Object.
//
// Side effects:
//	Fills unichar with the index'th Unicode character.
//
//----------------------------------------------------------------------

func XTcl_GetUniChar(tls *libc.TLS, objPtr uintptr, index int32) Tcl_UniChar { /* tclStringObj.c:537:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var stringPtr uintptr
	// var length int32 at bp, 4

	if index < 0 {
		return Tcl_UniChar(0xFFFD)
	}

	// Optimize the case where we're really dealing with a bytearray object
	// we don't need to convert to a string to perform the indexing operation.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) {
		var bytes uintptr = XTcl_GetByteArrayFromObj(tls, objPtr, bp)
		if index >= *(*int32)(unsafe.Pointer(bp)) {
			return Tcl_UniChar(0xFFFD)
		}

		return Tcl_UniChar(*(*uint8)(unsafe.Pointer(bytes + uintptr(index))))
	}

	// OK, need to work with the object as a string.

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if (*String)(unsafe.Pointer(stringPtr)).FhasUnicode == 0 {
		// If numChars is unknown, compute it.

		if (*String)(unsafe.Pointer(stringPtr)).FnumChars == -1 {
			for ok := true; ok; ok = 0 != 0 {
				var _count int32
				var _i int32 = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				var _str uintptr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				for _i != 0 && int32(*(*uint8)(unsafe.Pointer(_str))) < 0xC0 {
					_i--
					_str++
				}
				_count = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength - _i
				if _i != 0 {
					_count = _count + XTcl_NumUtfChars(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes+uintptr(_count), _i)
				}
				(*String)(unsafe.Pointer(stringPtr)).FnumChars = _count
			}

		}
		if (*String)(unsafe.Pointer(stringPtr)).FnumChars == (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength {
			return Tcl_UniChar(*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(index))))
		}
		sFillUnicodeRep(tls, objPtr)
		stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	}

	if index >= (*String)(unsafe.Pointer(stringPtr)).FnumChars {
		return Tcl_UniChar(0xFFFD)
	}
	return *(*Tcl_UniChar)(unsafe.Pointer(stringPtr + 16 + uintptr(index)*2))
}

//----------------------------------------------------------------------
//
// Tcl_GetUnicode --
//
//	Get the Unicode form of the String object. If the object is not
//	already a String object, it will be converted to one. If the String
//	object does not have a Unicode rep, then one is created from the UTF
//	string format.
//
// Results:
//	Returns a pointer to the object's internal Unicode string.
//
// Side effects:
//	Converts the object to have the String internal rep.
//
//----------------------------------------------------------------------

func XTcl_GetUnicode(tls *libc.TLS, objPtr uintptr) uintptr { /* tclStringObj.c:684:13: */
	return XTcl_GetUnicodeFromObj(tls, objPtr, uintptr(0))
}

//----------------------------------------------------------------------
//
// Tcl_GetUnicodeFromObj --
//
//	Get the Unicode form of the String object with length. If the object
//	is not already a String object, it will be converted to one. If the
//	String object does not have a Unicode rep, then one is create from the
//	UTF string format.
//
// Results:
//	Returns a pointer to the object's internal Unicode string.
//
// Side effects:
//	Converts the object to have the String internal rep.
//
//----------------------------------------------------------------------

func XTcl_GetUnicodeFromObj(tls *libc.TLS, objPtr uintptr, lengthPtr uintptr) uintptr { /* tclStringObj.c:711:13: */
	var stringPtr uintptr

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if (*String)(unsafe.Pointer(stringPtr)).FhasUnicode == 0 {
		sFillUnicodeRep(tls, objPtr)
		stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	}

	if lengthPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(lengthPtr)) = (*String)(unsafe.Pointer(stringPtr)).FnumChars
	}
	return stringPtr + 16 /* &.unicode */
}

//----------------------------------------------------------------------
//
// Tcl_GetRange --
//
//	Create a Tcl Object that contains the chars between first and last of
//	the object indicated by "objPtr". If the object is not already a
//	String object, convert it to one. The first and last indices are
//	assumed to be in the appropriate range.
//
// Results:
//	Returns a new Tcl Object of the String type.
//
// Side effects:
//	Changes the internal rep of "objPtr" to the String type.
//
//----------------------------------------------------------------------

func XTcl_GetRange(tls *libc.TLS, objPtr uintptr, first int32, last int32) uintptr { /* tclStringObj.c:754:9: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var newObjPtr uintptr // The Tcl object to find the range of.
	var stringPtr uintptr
	// var length int32 at bp, 4

	if first < 0 {
		first = 0
	}

	// Optimize the case where we're really dealing with a bytearray object
	// we don't need to convert to a string to perform the substring operation.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) {
		var bytes uintptr = XTcl_GetByteArrayFromObj(tls, objPtr, bp)

		if last >= *(*int32)(unsafe.Pointer(bp)) {
			last = *(*int32)(unsafe.Pointer(bp)) - 1
		}
		if last < first {
			return XTcl_NewObj(tls)
		}
		return XTcl_NewByteArrayObj(tls, bytes+uintptr(first), last-first+1)
	}

	// OK, need to work with the object as a string.

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if (*String)(unsafe.Pointer(stringPtr)).FhasUnicode == 0 {
		// If numChars is unknown, compute it.

		if (*String)(unsafe.Pointer(stringPtr)).FnumChars == -1 {
			for ok := true; ok; ok = 0 != 0 {
				var _count int32
				var _i int32 = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				var _str uintptr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				for _i != 0 && int32(*(*uint8)(unsafe.Pointer(_str))) < 0xC0 {
					_i--
					_str++
				}
				_count = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength - _i
				if _i != 0 {
					_count = _count + XTcl_NumUtfChars(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes+uintptr(_count), _i)
				}
				(*String)(unsafe.Pointer(stringPtr)).FnumChars = _count
			}

		}
		if (*String)(unsafe.Pointer(stringPtr)).FnumChars == (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength {
			if last >= (*String)(unsafe.Pointer(stringPtr)).FnumChars {
				last = (*String)(unsafe.Pointer(stringPtr)).FnumChars - 1
			}
			if last < first {
				return XTcl_NewObj(tls)
			}
			newObjPtr = XTcl_NewStringObj(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes+uintptr(first), last-first+1)

			// Since we know the char length of the result, store it.

			sSetStringFromAny(tls, uintptr(0), newObjPtr)
			stringPtr = *(*uintptr)(unsafe.Pointer(newObjPtr + 32))
			(*String)(unsafe.Pointer(stringPtr)).FnumChars = (*Tcl_Obj)(unsafe.Pointer(newObjPtr)).Flength
			return newObjPtr
		}
		sFillUnicodeRep(tls, objPtr)
		stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	}
	if last > (*String)(unsafe.Pointer(stringPtr)).FnumChars {
		last = (*String)(unsafe.Pointer(stringPtr)).FnumChars
	}
	if last < first {
		return XTcl_NewObj(tls)
	}
	return XTcl_NewUnicodeObj(tls, stringPtr+16+uintptr(first)*2, last-first+1)
}

//----------------------------------------------------------------------
//
// Tcl_SetStringObj --
//
//	Modify an object to hold a string that is a copy of the bytes
//	indicated by the byte pointer and length arguments.
//
// Results:
//	None.
//
// Side effects:
//	The object's string representation will be set to a copy of the
//	"length" bytes starting at "bytes". If "length" is negative, use bytes
//	up to the first NUL byte; i.e., assume "bytes" points to a C-style
//	NUL-terminated string. The object's old string and internal
//	representations are freed and the object's type is set NULL.
//
//----------------------------------------------------------------------

func XTcl_SetStringObj(tls *libc.TLS, objPtr uintptr, bytes uintptr, length int32) { /* tclStringObj.c:864:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+63422))
	}

	// Set the type to NULL and free any internal rep for the old type.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	// Free any old string rep, then set the string rep to a copy of the
	// length bytes starting at "bytes".

	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	if length < 0 {
		length = func() int32 {
			if bytes != 0 {
				return int32(libc.Xstrlen(tls, bytes))
			}
			return 0
		}()
	}
	if length == 0 {
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	} else {
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(length+1))
		libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, bytes, uint64(length))
		*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(length))) = int8(0)
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = length
	}

}

//----------------------------------------------------------------------
//
// Tcl_SetObjLength --
//
//	This function changes the length of the string representation of an
//	object.
//
// Results:
//	None.
//
// Side effects:
//	If the size of objPtr's string representation is greater than length,
//	then it is reduced to length and a new terminating null byte is stored
//	in the strength. If the length of the string representation is greater
//	than length, the storage space is reallocated to the given length; a
//	null byte is stored at the end, but other bytes past the end of the
//	original string representation are undefined. The object's internal
//	representation is changed to "expendable string".
//
//----------------------------------------------------------------------

func XTcl_SetObjLength(tls *libc.TLS, objPtr uintptr, length int32) { /* tclStringObj.c:918:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var stringPtr uintptr

	if length < 0 {
		// Setting to a negative length is nonsense. This is probably the
		// result of overflowing the signed integer range.

		XTcl_Panic(tls,
			ts+63439, libc.VaList(bp, length))
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp+8, ts+63507))
	}

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == length {
		return
	}

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != uintptr(0) {
		// Change length of an existing string rep.
		if length > (*String)(unsafe.Pointer(stringPtr)).Fallocated {
			// Need to enlarge the buffer.
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == XtclEmptyStringRep {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(length+1))
			} else {
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Realloc(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, uint32(length+1))
			}
			(*String)(unsafe.Pointer(stringPtr)).Fallocated = length
		}

		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = length
		*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(length))) = int8(0)

		// Invalidate the unicode data.

		(*String)(unsafe.Pointer(stringPtr)).FnumChars = -1
		(*String)(unsafe.Pointer(stringPtr)).FhasUnicode = 0
	} else {
		// Changing length of pure unicode string.

		for ok := true; ok; ok = 0 != 0 {
			if length < 0 || length > int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0)))) {
				XTcl_Panic(tls, ts+63524, libc.VaList(bp+16, int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0))))))
			}
		}
		if length > (*String)(unsafe.Pointer(stringPtr)).FmaxChars {
			stringPtr = XTcl_Realloc(tls, stringPtr, uint32(uint64(int32(uintptr(0)+16))+uint64(length+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
			*(*uintptr)(unsafe.Pointer(objPtr + 32)) = stringPtr
			(*String)(unsafe.Pointer(stringPtr)).FmaxChars = length
		}

		// Mark the new end of the unicode string

		(*String)(unsafe.Pointer(stringPtr)).FnumChars = length
		*(*Tcl_UniChar)(unsafe.Pointer(stringPtr + 16 + uintptr(length)*2)) = Tcl_UniChar(0)
		(*String)(unsafe.Pointer(stringPtr)).FhasUnicode = 1

		// Can only get here when objPtr->bytes == NULL. No need to invalidate
		// the string rep.
	}
}

//----------------------------------------------------------------------
//
// Tcl_AttemptSetObjLength --
//
//	This function changes the length of the string representation of an
//	object. It uses the attempt* (non-panic'ing) memory allocators.
//
// Results:
//	1 if the requested memory was allocated, 0 otherwise.
//
// Side effects:
//	If the size of objPtr's string representation is greater than length,
//	then it is reduced to length and a new terminating null byte is stored
//	in the strength. If the length of the string representation is greater
//	than length, the storage space is reallocated to the given length; a
//	null byte is stored at the end, but other bytes past the end of the
//	original string representation are undefined. The object's internal
//	representation is changed to "expendable string".
//
//----------------------------------------------------------------------

func XTcl_AttemptSetObjLength(tls *libc.TLS, objPtr uintptr, length int32) int32 { /* tclStringObj.c:1023:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var stringPtr uintptr

	if length < 0 {
		// Setting to a negative length is nonsense. This is probably the
		// result of overflowing the signed integer range.

		return 0
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+63579))
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == length {
		return 1
	}

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != uintptr(0) {
		// Change length of an existing string rep.
		if length > (*String)(unsafe.Pointer(stringPtr)).Fallocated {
			// Need to enlarge the buffer.

			var newBytes uintptr

			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == XtclEmptyStringRep {
				newBytes = XTclpAlloc(tls, uint32(length+1))
			} else {
				newBytes = XTclpRealloc(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, uint32(length+1))
			}
			if newBytes == uintptr(0) {
				return 0
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = newBytes
			(*String)(unsafe.Pointer(stringPtr)).Fallocated = length
		}

		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = length
		*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(length))) = int8(0)

		// Invalidate the unicode data.

		(*String)(unsafe.Pointer(stringPtr)).FnumChars = -1
		(*String)(unsafe.Pointer(stringPtr)).FhasUnicode = 0
	} else {
		// Changing length of pure unicode string.

		if length > int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0)))) {
			return 0
		}
		if length > (*String)(unsafe.Pointer(stringPtr)).FmaxChars {
			stringPtr = XTclpRealloc(tls, stringPtr, uint32(uint64(int32(uintptr(0)+16))+uint64(length+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
			if stringPtr == uintptr(0) {
				return 0
			}
			*(*uintptr)(unsafe.Pointer(objPtr + 32)) = stringPtr
			(*String)(unsafe.Pointer(stringPtr)).FmaxChars = length
		}

		// Mark the new end of the unicode string.

		*(*Tcl_UniChar)(unsafe.Pointer(stringPtr + 16 + uintptr(length)*2)) = Tcl_UniChar(0)
		(*String)(unsafe.Pointer(stringPtr)).FnumChars = length
		(*String)(unsafe.Pointer(stringPtr)).FhasUnicode = 1

		// Can only get here when objPtr->bytes == NULL. No need to invalidate
		// the string rep.
	}
	return 1
}

//---------------------------------------------------------------------------
//
// Tcl_SetUnicodeObj --
//
//	Modify an object to hold the Unicode string indicated by "unicode".
//
// Results:
//	None.
//
// Side effects:
//	Memory allocated for new "String" internal rep.
//
//---------------------------------------------------------------------------

func XTcl_SetUnicodeObj(tls *libc.TLS, objPtr uintptr, unicode uintptr, numChars int32) { /* tclStringObj.c:1132:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+63603))
	}
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
		if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	}

	sSetUnicodeObj(tls, objPtr, unicode, numChars)
}

func sUnicodeLength(tls *libc.TLS, unicode uintptr) int32 { /* tclStringObj.c:1147:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var numChars int32 = 0

	if unicode != 0 {
		for numChars >= 0 && int32(*(*Tcl_UniChar)(unsafe.Pointer(unicode + uintptr(numChars)*2))) != 0 {
			numChars++
		}
	}
	for ok := true; ok; ok = 0 != 0 {
		if numChars < 0 || numChars > int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0)))) {
			XTcl_Panic(tls, ts+63524, libc.VaList(bp, int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0))))))
		}
	}
	return numChars
}

func sSetUnicodeObj(tls *libc.TLS, objPtr uintptr, unicode uintptr, numChars int32) { /* tclStringObj.c:1162:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var stringPtr uintptr

	if numChars < 0 {
		numChars = sUnicodeLength(tls, unicode)
	}

	// Allocate enough space for the String structure + Unicode string.

	for ok := true; ok; ok = 0 != 0 {
		if numChars < 0 || numChars > int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0)))) {
			XTcl_Panic(tls, ts+63524, libc.VaList(bp, int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0))))))
		}
	}
	stringPtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+16))+uint64(numChars+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = stringPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclStringType))

	(*String)(unsafe.Pointer(stringPtr)).FmaxChars = numChars
	libc.Xmemcpy(tls, stringPtr+16, unicode, uint64(numChars)*uint64(unsafe.Sizeof(Tcl_UniChar(0))))
	*(*Tcl_UniChar)(unsafe.Pointer(stringPtr + 16 + uintptr(numChars)*2)) = Tcl_UniChar(0)
	(*String)(unsafe.Pointer(stringPtr)).FnumChars = numChars
	(*String)(unsafe.Pointer(stringPtr)).FhasUnicode = 1

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	(*String)(unsafe.Pointer(stringPtr)).Fallocated = 0
}

//----------------------------------------------------------------------
//
// Tcl_AppendLimitedToObj --
//
//	This function appends a limited number of bytes from a sequence of
//	bytes to an object, marking any limitation with an ellipsis.
//
// Results:
//	None.
//
// Side effects:
//	The bytes at *bytes are appended to the string representation of
//	objPtr.
//
//----------------------------------------------------------------------

func XTcl_AppendLimitedToObj(tls *libc.TLS, objPtr uintptr, bytes uintptr, length int32, limit int32, ellipsis uintptr) { /* tclStringObj.c:1213:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var stringPtr uintptr
	var toCopy int32 = 0
	var eLen int32 = 0

	if length < 0 {
		length = func() int32 {
			if bytes != 0 {
				return int32(libc.Xstrlen(tls, bytes))
			}
			return 0
		}()
	}
	if length == 0 {
		return
	}
	if limit <= 0 {
		return
	}

	if length <= limit {
		toCopy = length
	} else {
		if ellipsis == uintptr(0) {
			ellipsis = ts + 8420 /* "..." */
		}
		eLen = int32(libc.Xstrlen(tls, ellipsis))
		for eLen > limit {
			eLen = int32((func() int64 {
				if ellipsis+uintptr(eLen) < ellipsis+uintptr(2) {
					return int64(ellipsis)
				}
				return func() int64 {
					if int32(uint8(*(*int8)(unsafe.Pointer(ellipsis + uintptr(eLen) - uintptr(1))))) < 0x80 {
						return int64(ellipsis + uintptr(eLen) - uintptr(1))
					}
					return int64(XTcl_UtfPrev(tls, ellipsis+uintptr(eLen), ellipsis))
				}()
			}() - int64(ellipsis)) / 1)
		}

		toCopy = int32((func() int64 {
			if bytes+uintptr(limit)+uintptr(1)-uintptr(eLen) < bytes+uintptr(2) {
				return int64(bytes)
			}
			return func() int64 {
				if int32(uint8(*(*int8)(unsafe.Pointer(bytes + uintptr(limit) + uintptr(1) - uintptr(eLen) - uintptr(1))))) < 0x80 {
					return int64(bytes + uintptr(limit) + uintptr(1) - uintptr(eLen) - uintptr(1))
				}
				return int64(XTcl_UtfPrev(tls, bytes+uintptr(limit)+uintptr(1)-uintptr(eLen), bytes))
			}()
		}() - int64(bytes)) / 1)
	}

	// If objPtr has a valid Unicode rep, then append the Unicode conversion
	// of "bytes" to the objPtr's Unicode rep, otherwise append "bytes" to
	// objPtr's string rep.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+63621))
	}

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if (*String)(unsafe.Pointer(stringPtr)).FhasUnicode != 0 && (*String)(unsafe.Pointer(stringPtr)).FnumChars > 0 {
		sAppendUtfToUnicodeRep(tls, objPtr, bytes, toCopy)
	} else {
		sAppendUtfToUtfRep(tls, objPtr, bytes, toCopy)
	}

	if length <= limit {
		return
	}

	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	if (*String)(unsafe.Pointer(stringPtr)).FhasUnicode != 0 && (*String)(unsafe.Pointer(stringPtr)).FnumChars > 0 {
		sAppendUtfToUnicodeRep(tls, objPtr, ellipsis, eLen)
	} else {
		sAppendUtfToUtfRep(tls, objPtr, ellipsis, eLen)
	}
}

//----------------------------------------------------------------------
//
// Tcl_AppendToObj --
//
//	This function appends a sequence of bytes to an object.
//
// Results:
//	None.
//
// Side effects:
//	The bytes at *bytes are appended to the string representation of
//	objPtr.
//
//----------------------------------------------------------------------

func XTcl_AppendToObj(tls *libc.TLS, objPtr uintptr, bytes uintptr, length int32) { /* tclStringObj.c:1303:1: */
	XTcl_AppendLimitedToObj(tls, objPtr, bytes, length, 0x7fffffff, uintptr(0))
}

//----------------------------------------------------------------------
//
// Tcl_AppendUnicodeToObj --
//
//	This function appends a Unicode string to an object in the most
//	efficient manner possible. Length must be >= 0.
//
// Results:
//	None.
//
// Side effects:
//	Invalidates the string rep and creates a new Unicode string.
//
//----------------------------------------------------------------------

func XTcl_AppendUnicodeToObj(tls *libc.TLS, objPtr uintptr, unicode uintptr, length int32) { /* tclStringObj.c:1332:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var stringPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+63644))
	}

	if length == 0 {
		return
	}

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	// If objPtr has a valid Unicode rep, then append the "unicode" to the
	// objPtr's Unicode rep, otherwise the UTF conversion of "unicode" to
	// objPtr's string rep.

	if (*String)(unsafe.Pointer(stringPtr)).FhasUnicode != 0 {
		sAppendUnicodeToUnicodeRep(tls, objPtr, unicode, length)
	} else {
		sAppendUnicodeToUtfRep(tls, objPtr, unicode, length)
	}
}

//----------------------------------------------------------------------
//
// Tcl_AppendObjToObj --
//
//	This function appends the string rep of one object to another.
//	"objPtr" cannot be a shared object.
//
// Results:
//	None.
//
// Side effects:
//	The string rep of appendObjPtr is appended to the string
//	representation of objPtr.
//	IMPORTANT: This routine does not and MUST NOT shimmer appendObjPtr.
//	Callers are counting on that.
//
//----------------------------------------------------------------------

func XTcl_AppendObjToObj(tls *libc.TLS, objPtr uintptr, appendObjPtr uintptr) { /* tclStringObj.c:1389:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var stringPtr uintptr
	// var length int32 at bp, 4

	// var numChars int32 at bp+8, 4

	var appendNumChars int32 = -1
	var bytes uintptr

	// Special case: second object is standard-empty is fast case. We know
	// that appending nothing to anything leaves that starting anything...

	if (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).Fbytes == XtclEmptyStringRep {
		return
	}

	// Handle append of one bytearray object to another as a special case.
	// Note that we only do this when the objects don't have string reps; if
	// it did, then appending the byte arrays together could well lose
	// information; this is a special-case optimization only.

	if ((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) || (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == XtclEmptyStringRep) &&
		((*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).Fbytes == uintptr(0)) {
		// You might expect the code here to be
		//
		//  bytes = Tcl_GetByteArrayFromObj(appendObjPtr, &length);
		//  TclAppendBytesToByteArray(objPtr, bytes, length);
		//
		// and essentially all of the time that would be fine. However, it
		// would run into trouble in the case where objPtr and appendObjPtr
		// point to the same thing. That may never be a good idea. It seems to
		// violate Copy On Write, and we don't have any tests for the
		// situation, since making any Tcl commands that call
		// Tcl_AppendObjToObj() do that appears impossible (They honor Copy On
		// Write!). For the sake of extensions that go off into that realm,
		// though, here's a more complex approach that can handle all the
		// cases.
		//
		// First, get the lengths.

		// var lengthSrc int32 at bp+4, 4

		XTcl_GetByteArrayFromObj(tls, objPtr, bp)
		XTcl_GetByteArrayFromObj(tls, appendObjPtr, bp+4)

		// Grow buffer enough for the append.

		XTclAppendBytesToByteArray(tls, objPtr, uintptr(0), *(*int32)(unsafe.Pointer(bp + 4 /* lengthSrc */)))

		// Reset objPtr back to the original value.

		XTcl_SetByteArrayLength(tls, objPtr, *(*int32)(unsafe.Pointer(bp /* length */)))

		// Now do the append knowing that buffer growth cannot cause any
		// trouble.

		XTclAppendBytesToByteArray(tls, objPtr,
			XTcl_GetByteArrayFromObj(tls, appendObjPtr, uintptr(0)), *(*int32)(unsafe.Pointer(bp + 4 /* lengthSrc */)))
		return
	}

	// Must append as strings.

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	// If objPtr has a valid Unicode rep, then get a Unicode string from
	// appendObjPtr and append it.

	if (*String)(unsafe.Pointer(stringPtr)).FhasUnicode != 0 {
		// If appendObjPtr is not of the "String" type, don't convert it.

		if (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclStringType)) {
			var unicode uintptr = XTcl_GetUnicodeFromObj(tls, appendObjPtr, bp+8)

			sAppendUnicodeToUnicodeRep(tls, objPtr, unicode, *(*int32)(unsafe.Pointer(bp + 8 /* numChars */)))
		} else {
			bytes = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).Fbytes != 0 {
					return func() uintptr {
						*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).Flength
						return (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).Fbytes
					}()
				}
				return XTcl_GetStringFromObj(tls, appendObjPtr, bp)
			}()
			sAppendUtfToUnicodeRep(tls, objPtr, bytes, *(*int32)(unsafe.Pointer(bp /* length */)))
		}
		return
	}

	// Append to objPtr's UTF string rep. If we know the number of characters
	// in both objects before appending, then set the combined number of
	// characters in the final (appended-to) object.

	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, appendObjPtr, bp)
	}()

	*(*int32)(unsafe.Pointer(bp + 8 /* numChars */)) = (*String)(unsafe.Pointer(stringPtr)).FnumChars
	if *(*int32)(unsafe.Pointer(bp + 8)) >= 0 && (*Tcl_Obj)(unsafe.Pointer(appendObjPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclStringType)) {
		var appendStringPtr uintptr = *(*uintptr)(unsafe.Pointer(appendObjPtr + 32))

		appendNumChars = (*String)(unsafe.Pointer(appendStringPtr)).FnumChars
	}

	sAppendUtfToUtfRep(tls, objPtr, bytes, *(*int32)(unsafe.Pointer(bp /* length */)))

	if *(*int32)(unsafe.Pointer(bp + 8)) >= 0 && appendNumChars >= 0 {
		(*String)(unsafe.Pointer(stringPtr)).FnumChars = *(*int32)(unsafe.Pointer(bp + 8)) + appendNumChars
	}
}

//----------------------------------------------------------------------
//
// AppendUnicodeToUnicodeRep --
//
//	This function appends the contents of "unicode" to the Unicode rep of
//	"objPtr". objPtr must already have a valid Unicode rep.
//
// Results:
//	None.
//
// Side effects:
//	objPtr's internal rep is reallocated.
//
//----------------------------------------------------------------------

func sAppendUnicodeToUnicodeRep(tls *libc.TLS, objPtr uintptr, unicode uintptr, appendNumChars int32) { /* tclStringObj.c:1538:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var stringPtr uintptr
	var numChars int32

	if appendNumChars < 0 {
		appendNumChars = sUnicodeLength(tls, unicode)
	}
	if appendNumChars == 0 {
		return
	}

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	// If not enough space has been allocated for the unicode rep, reallocate
	// the internal rep object with additional space. First try to double the
	// required allocation; if that fails, try a more modest increase. See the
	// "TCL STRING GROWTH ALGORITHM" comment at the top of this file for an
	// explanation of this growth algorithm.

	numChars = (*String)(unsafe.Pointer(stringPtr)).FnumChars + appendNumChars
	for ok := true; ok; ok = 0 != 0 {
		if numChars < 0 || numChars > int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0)))) {
			XTcl_Panic(tls, ts+63524, libc.VaList(bp, int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0))))))
		}
	}

	if numChars > (*String)(unsafe.Pointer(stringPtr)).FmaxChars {
		var offset int32 = -1

		// Protect against case where unicode points into the existing
		// stringPtr->unicode array. Force it to follow any relocations due to
		// the reallocs below.

		if unicode != 0 && unicode >= stringPtr+16 &&
			unicode <= stringPtr+16+uintptr((*String)(unsafe.Pointer(stringPtr)).FmaxChars)*2 {
			offset = int32(int64((unicode - (stringPtr + 16)) / 2))
		}

		sGrowUnicodeBuffer(tls, objPtr, numChars)
		stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

		// Relocate unicode if needed; see above.

		if offset >= 0 {
			unicode = stringPtr + 16 + uintptr(offset)*2
		}
	}

	// Copy the new string onto the end of the old string, then add the
	// trailing null.

	if unicode != 0 {
		libc.Xmemmove(tls, stringPtr+16+uintptr((*String)(unsafe.Pointer(stringPtr)).FnumChars)*2, unicode,
			uint64(appendNumChars)*uint64(unsafe.Sizeof(Tcl_UniChar(0))))
	}
	*(*Tcl_UniChar)(unsafe.Pointer(stringPtr + 16 + uintptr(numChars)*2)) = Tcl_UniChar(0)
	(*String)(unsafe.Pointer(stringPtr)).FnumChars = numChars
	(*String)(unsafe.Pointer(stringPtr)).Fallocated = 0

	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
}

//----------------------------------------------------------------------
//
// AppendUnicodeToUtfRep --
//
//	This function converts the contents of "unicode" to UTF and appends
//	the UTF to the string rep of "objPtr".
//
// Results:
//	None.
//
// Side effects:
//	objPtr's internal rep is reallocated.
//
//----------------------------------------------------------------------

func sAppendUnicodeToUtfRep(tls *libc.TLS, objPtr uintptr, unicode uintptr, numChars int32) { /* tclStringObj.c:1627:1: */
	var stringPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	numChars = sExtendStringRepWithUnicode(tls, objPtr, unicode, numChars)

	if (*String)(unsafe.Pointer(stringPtr)).FnumChars != -1 {
		*(*int32)(unsafe.Pointer(stringPtr)) += numChars
	}

}

//----------------------------------------------------------------------
//
// AppendUtfToUnicodeRep --
//
//	This function converts the contents of "bytes" to Unicode and appends
//	the Unicode to the Unicode rep of "objPtr". objPtr must already have a
//	valid Unicode rep. numBytes must be non-negative.
//
// Results:
//	None.
//
// Side effects:
//	objPtr's internal rep is reallocated.
//
//----------------------------------------------------------------------

func sAppendUtfToUnicodeRep(tls *libc.TLS, objPtr uintptr, bytes uintptr, numBytes int32) { /* tclStringObj.c:1668:1: */
	var stringPtr uintptr

	if numBytes == 0 {
		return
	}

	sExtendUnicodeRepWithString(tls, objPtr, bytes, numBytes, -1)
	for ok := true; ok; ok = 0 != 0 {
		var _isobjPtr uintptr = objPtr
		if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != uintptr(0) {
			if (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(_isobjPtr)).Fbytes = uintptr(0)
		}
	}
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	(*String)(unsafe.Pointer(stringPtr)).Fallocated = 0
}

//----------------------------------------------------------------------
//
// AppendUtfToUtfRep --
//
//	This function appends "numBytes" bytes of "bytes" to the UTF string
//	rep of "objPtr". objPtr must already have a valid String rep.
//	numBytes must be non-negative.
//
// Results:
//	None.
//
// Side effects:
//	objPtr's internal rep is reallocated.
//
//----------------------------------------------------------------------

func sAppendUtfToUtfRep(tls *libc.TLS, objPtr uintptr, bytes uintptr, numBytes int32) { /* tclStringObj.c:1704:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var stringPtr uintptr
	var newLength int32
	var oldLength int32

	if numBytes == 0 {
		return
	}

	// Copy the new string onto the end of the old string, then add the
	// trailing null.

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	}
	oldLength = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
	newLength = numBytes + oldLength
	if newLength < 0 {
		XTcl_Panic(tls, ts+9934, libc.VaList(bp, 0x7fffffff))
	}

	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	if newLength > (*String)(unsafe.Pointer(stringPtr)).Fallocated {
		var offset int32 = -1

		// Protect against case where unicode points into the existing
		// stringPtr->unicode array. Force it to follow any relocations due to
		// the reallocs below.

		if bytes != 0 && bytes >= (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes &&
			bytes <= (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes+uintptr((*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength) {
			offset = int32((int64(bytes) - int64((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)) / 1)
		}

		// TODO: consider passing flag=1: no overalloc on first append. This
		// would make test stringObj-8.1 fail.

		sGrowStringBuffer(tls, objPtr, newLength, 0)

		// Relocate bytes if needed; see above.

		if offset >= 0 {
			bytes = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(offset)
		}
	}

	// Invalidate the unicode data.

	(*String)(unsafe.Pointer(stringPtr)).FnumChars = -1
	(*String)(unsafe.Pointer(stringPtr)).FhasUnicode = 0

	if bytes != 0 {
		libc.Xmemmove(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes+uintptr(oldLength), bytes, uint64(numBytes))
	}
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(newLength))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = newLength
}

//----------------------------------------------------------------------
//
// Tcl_AppendStringsToObjVA --
//
//	This function appends one or more null-terminated strings to an
//	object.
//
// Results:
//	None.
//
// Side effects:
//	The contents of all the string arguments are appended to the string
//	representation of objPtr.
//
//----------------------------------------------------------------------

func XTcl_AppendStringsToObjVA(tls *libc.TLS, objPtr uintptr, argList Va_list) { /* tclStringObj.c:1794:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
		XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+63667))
	}

	for 1 != 0 {
		var bytes uintptr = libc.VaUintptr(&argList)

		if bytes == uintptr(0) {
			break
		}
		XTcl_AppendToObj(tls, objPtr, bytes, -1)
	}
}

//----------------------------------------------------------------------
//
// Tcl_AppendStringsToObj --
//
//	This function appends one or more null-terminated strings to an
//	object.
//
// Results:
//	None.
//
// Side effects:
//	The contents of all the string arguments are appended to the string
//	representation of objPtr.
//
//----------------------------------------------------------------------

func XTcl_AppendStringsToObj(tls *libc.TLS, objPtr uintptr, va uintptr) { /* tclStringObj.c:1831:1: */
	var argList Va_list
	_ = argList

	argList = va
	XTcl_AppendStringsToObjVA(tls, objPtr, argList)
	_ = argList
}

//----------------------------------------------------------------------
//
// Tcl_AppendFormatToObj --
//
//	This function appends a list of Tcl_Obj's to a Tcl_Obj according to
//	the formatting instructions embedded in the format string. The
//	formatting instructions are inspired by sprintf(). Returns TCL_OK when
//	successful. If there's an error in the arguments, TCL_ERROR is
//	returned, and an error message is written to the interp, if non-NULL.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_AppendFormatToObj(tls *libc.TLS, interp uintptr, appendObj uintptr, format uintptr, objc int32, objv uintptr) int32 { /* tclStringObj.c:1863:1: */
	bp := tls.Alloc(252)
	defer tls.Free(252)

	var span uintptr
	var msg uintptr
	var errCode uintptr
	var numBytes int32
	var objIndex int32
	var gotXpg int32
	var gotSequential int32
	// var originalLength int32 at bp+104, 4

	var limit int32
	// var ch Tcl_UniChar at bp+108, 2

	var position int32
	// var buf [4]int8 at bp+132, 4

	// var code int32 at bp+128, 4

	var length int32
	var _objPtr uintptr
	var objPtr uintptr
	var _objPtr1 uintptr
	var objPtr1 uintptr
	var _objPtr2 uintptr
	// var length1 int32 at bp+172, 4

	var pure uintptr
	var bytes uintptr
	var us uint16
	var uw Tcl_WideUInt
	var leftover int32
	var mask Mp_digit
	var ul uint32
	var digitOffset int32
	var _objPtr3 uintptr
	var bits Tcl_WideUInt
	var numDigits Tcl_WideInt
	var length2 int32
	var numBits int32
	var base int32
	var index int32
	var shift int32
	var pure1 uintptr
	var bytes1 uintptr
	var s int16 // Silence compiler warning; only defined and
	// used when useShort is true.
	// var l int32 at bp+168, 4

	// var w Tcl_WideInt at bp+160, 8

	// var big Mp_int at bp+136, 24

	var toAppend int32
	var isNegative int32
	// var spec [57]int8 at bp+176, 57

	var p uintptr
	// var d float64 at bp+240, 8

	var length3 int32
	var bytes2 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	// var end uintptr at bp+112, 8

	var gotMinus int32
	var gotHash int32
	var gotZero int32
	var gotSpace int32
	var gotPlus int32
	// var width int32 at bp+120, 4

	var gotPrecision int32
	// var precision int32 at bp+124, 4

	var sawFlag int32
	var useShort int32
	var useBig int32
	var useWide int32
	var newXpg int32
	var numChars int32
	var allocSegment int32
	var segmentLimit int32
	// var segmentNumBytes int32 at bp+248, 4

	var segment uintptr
	var step int32
	span = format
	numBytes = 0
	objIndex = 0
	gotXpg = 0
	gotSequential = 0
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */)) = Tcl_UniChar(0)

	if !((*Tcl_Obj)(unsafe.Pointer(appendObj)).FrefCount > 1) {
		goto __1
	}
	XTcl_Panic(tls, ts+9862, libc.VaList(bp, ts+63690))
__1:
	;
	if (*Tcl_Obj)(unsafe.Pointer(appendObj)).Fbytes != 0 {
		*(*int32)(unsafe.Pointer(bp + 104)) = (*Tcl_Obj)(unsafe.Pointer(appendObj)).Flength
		_ = (*Tcl_Obj)(unsafe.Pointer(appendObj)).Fbytes
	} else {
		XTcl_GetStringFromObj(tls, appendObj, bp+104)
	}
	limit = 0x7fffffff - *(*int32)(unsafe.Pointer(bp + 104))

	// Format string is NUL-terminated.

__2:
	if !(int32(*(*int8)(unsafe.Pointer(format))) != 0) {
		goto __3
	}
	gotMinus = 0
	gotHash = 0
	gotZero = 0
	gotSpace = 0
	gotPlus = 0
	useShort = 0
	useBig = 0
	useWide = 0
	allocSegment = 0
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()

	format += uintptr(step)
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) != '%') {
		goto __4
	}
	numBytes = numBytes + step
	goto __2
__4:
	;
	if !(numBytes != 0) {
		goto __5
	}
	if !(numBytes > limit) {
		goto __6
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__6:
	;
	XTcl_AppendToObj(tls, appendObj, span, numBytes)
	limit = limit - numBytes
	numBytes = 0
__5:
	;

	// Saw a % : process the format specifier.
	//
	// Step 0. Handle special case of escaped format marker (i.e., %%).

	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == '%') {
		goto __7
	}
	span = format
	numBytes = step
	format += uintptr(step)
	goto __2
__7:
	;

	// Step 1. XPG3 position specifier

	newXpg = 0
	if !(libc.Xisdigit(tls, int32(uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))))) != 0) {
		goto __8
	}
	position = int32(libc.Xstrtoul(tls, format, bp+112, 10))

	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112))))) == '$') {
		goto __9
	}
	newXpg = 1
	objIndex = position - 1
	format = *(*uintptr)(unsafe.Pointer(bp + 112)) + uintptr(1)
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
__9:
	;
__8:
	;
	if !(newXpg != 0) {
		goto __10
	}
	if !(gotSequential != 0) {
		goto __12
	}
	msg = mixedXPG
	errCode = ts + 62455 /* "MIXEDSPECTYPES" */
	goto errorMsg
__12:
	;
	gotXpg = 1
	goto __11
__10:
	if !(gotXpg != 0) {
		goto __13
	}
	msg = mixedXPG
	errCode = ts + 62455 /* "MIXEDSPECTYPES" */
	goto errorMsg
__13:
	;
	gotSequential = 1
__11:
	;
	if !(objIndex < 0 || objIndex >= objc) {
		goto __14
	}
	msg = badIndex[gotXpg]
	if gotXpg != 0 {
		errCode = ts + 62891 /* "INDEXRANGE" */
	} else {
		errCode = ts + 62959 /* "FIELDVARMISMATCH" */
	}
	goto errorMsg
__14:
	;

	// Step 2. Set of flags.

	sawFlag = 1
__15:
	switch int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */))) {
	case '-':
		goto __19
	case '#':
		goto __20
	case '0':
		goto __21
	case ' ':
		goto __22
	case '+':
		goto __23
	default:
		goto __24
	}
	goto __18
__19:
	gotMinus = 1
	goto __18
__20:
	gotHash = 1
	goto __18
__21:
	gotZero = 1
	goto __18
__22:
	gotSpace = 1
	goto __18
__23:
	gotPlus = 1
	goto __18
__24:
	sawFlag = 0
__18:
	;
	if !(sawFlag != 0) {
		goto __25
	}
	format += uintptr(step)
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
__25:
	;
	goto __16
__16:
	if sawFlag != 0 {
		goto __15
	}
	goto __17
__17:
	;

	// Step 3. Minimum field width.

	*(*int32)(unsafe.Pointer(bp + 120 /* width */)) = 0
	if !(libc.Xisdigit(tls, int32(uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))))) != 0) {
		goto __26
	}
	*(*int32)(unsafe.Pointer(bp + 120 /* width */)) = int32(libc.Xstrtoul(tls, format, bp+112, 10))
	if !(*(*int32)(unsafe.Pointer(bp + 120)) < 0) {
		goto __28
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__28:
	;
	format = *(*uintptr)(unsafe.Pointer(bp + 112 /* end */))
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
	goto __27
__26:
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == '*') {
		goto __29
	}
	if !(objIndex >= objc-1) {
		goto __30
	}
	msg = badIndex[gotXpg]
	if gotXpg != 0 {
		errCode = ts + 62891 /* "INDEXRANGE" */
	} else {
		errCode = ts + 62959 /* "FIELDVARMISMATCH" */
	}
	goto errorMsg
__30:
	;
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objIndex)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 120)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objIndex)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objIndex)*8)), bp+120)
	}() != TCL_OK) {
		goto __31
	}
	goto error
__31:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 120)) < 0) {
		goto __32
	}
	*(*int32)(unsafe.Pointer(bp + 120 /* width */)) = -*(*int32)(unsafe.Pointer(bp + 120 /* width */))
	gotMinus = 1
__32:
	;
	objIndex++
	format += uintptr(step)
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
__29:
	;
__27:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 120)) > limit) {
		goto __33
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__33:
	;

	// Step 4. Precision.

	gotPrecision = libc.AssignPtrInt32(bp+124 /* precision */, 0)
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == '.') {
		goto __34
	}
	gotPrecision = 1
	format += uintptr(step)
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
__34:
	;
	if !(libc.Xisdigit(tls, int32(uint8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))))) != 0) {
		goto __35
	}
	*(*int32)(unsafe.Pointer(bp + 124 /* precision */)) = int32(libc.Xstrtoul(tls, format, bp+112, 10))
	format = *(*uintptr)(unsafe.Pointer(bp + 112 /* end */))
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
	goto __36
__35:
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == '*') {
		goto __37
	}
	if !(objIndex >= objc-1) {
		goto __38
	}
	msg = badIndex[gotXpg]
	if gotXpg != 0 {
		errCode = ts + 62891 /* "INDEXRANGE" */
	} else {
		errCode = ts + 62959 /* "FIELDVARMISMATCH" */
	}
	goto errorMsg
__38:
	;
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objIndex)*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 124)) = int32(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(objIndex)*8)) + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(objIndex)*8)), bp+124)
	}() !=
		TCL_OK) {
		goto __39
	}
	goto error
__39:
	;

	// TODO: Check this truncation logic.

	if !(*(*int32)(unsafe.Pointer(bp + 124)) < 0) {
		goto __40
	}
	*(*int32)(unsafe.Pointer(bp + 124 /* precision */)) = 0
__40:
	;
	objIndex++
	format += uintptr(step)
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
__37:
	;
__36:
	;

	// Step 5. Length modifier.

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'h') {
		goto __41
	}
	useShort = 1
	format += uintptr(step)
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
	goto __42
__41:
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'l') {
		goto __43
	}
	format += uintptr(step)
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'l') {
		goto __44
	}
	useBig = 1
	format += uintptr(step)
	step = func() int32 {
		if int32(uint8(*(*int8)(unsafe.Pointer(format)))) < 0x80 {
			return func() int32 {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 108)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(format))))
				return 1
			}()
		}
		return XTcl_UtfToUniChar(tls, format, bp+108)
	}()
	goto __45
__44:
	useWide = 1
__45:
	;
__43:
	;
__42:
	;

	format += uintptr(step)
	span = format

	// Step 6. The actual conversion character.

	segment = *(*uintptr)(unsafe.Pointer(objv + uintptr(objIndex)*8))
	numChars = -1
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'i') {
		goto __46
	}
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */)) = Tcl_UniChar('d')
__46:
	;
	switch int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */))) {
	case 0:
		goto __48
	case 's':
		goto __49
	case 'c':
		goto __50

	case 'u':
		goto __51
		// FALLTHRU
	case 'd':
		goto __52
	case 'o':
		goto __53
	case 'x':
		goto __54
	case 'X':
		goto __55
	case 'b':
		goto __56

	case 'e':
		goto __57
	case 'E':
		goto __58
	case 'f':
		goto __59
	case 'g':
		goto __60
	case 'G':
		goto __61
	default:
		goto __62
	}
	goto __47
__48:
	msg = ts + 63712     /* "format string en..." */
	errCode = ts + 63761 /* "INCOMPLETE" */
	goto errorMsg
__49:
	if !(gotPrecision != 0) {
		goto __63
	}
	numChars = XTcl_GetCharLength(tls, segment)
	if !(*(*int32)(unsafe.Pointer(bp + 124)) < numChars) {
		goto __64
	}
	segment = XTcl_GetRange(tls, segment, 0, *(*int32)(unsafe.Pointer(bp + 124))-1)
	numChars = *(*int32)(unsafe.Pointer(bp + 124 /* precision */))
	(*Tcl_Obj)(unsafe.Pointer(segment)).FrefCount++
	allocSegment = 1
__64:
	;
__63:
	;
	goto __47
__50:
	*(*[4]int8)(unsafe.Pointer(bp + 132 /* buf */)) = *(*[4]int8)(unsafe.Pointer(ts + 62397))

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(segment)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 128)) = int32(*(*int32)(unsafe.Pointer(segment + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, interp, segment, bp+128)
	}() != TCL_OK) {
		goto __65
	}
	goto error
__65:
	;
	length = XTcl_UniCharToUtf(tls, *(*int32)(unsafe.Pointer(bp + 128 /* code */)), bp+132)
	segment = XTcl_NewStringObj(tls, bp+132, length)
	(*Tcl_Obj)(unsafe.Pointer(segment)).FrefCount++
	allocSegment = 1
	goto __47

__51:
	if !(useBig != 0) {
		goto __66
	}
	msg = ts + 63772     /* "unsigned bignum ..." */
	errCode = ts + 62629 /* "BADUNSIGNED" */
	goto errorMsg
__66:
	;
	// FALLTHRU
__52:
__53:
__54:
__55:
__56:
	s = int16(0)
	isNegative = 0

	if !(useBig != 0) {
		goto __67
	}
	if !(XTcl_GetBignumFromObj(tls, interp, segment, bp+136) != TCL_OK) {
		goto __69
	}
	goto error
__69:
	;
	isNegative = libc.Bool32(XTclBN_mp_cmp_d(tls, bp+136, uint32(0)) == -1)
	goto __68
__67:
	if !(useWide != 0) {
		goto __70
	}
	if !(XTcl_GetWideIntFromObj(tls, uintptr(0), segment, bp+160) != TCL_OK) {
		goto __72
	}

	if !(XTcl_GetBignumFromObj(tls, interp, segment, bp+136) != TCL_OK) {
		goto __73
	}
	goto error
__73:
	;
	XTclBN_mp_mod_2d(tls, bp+136, int32(uint64(8)*uint64(unsafe.Sizeof(Tcl_WideInt(0)))), bp+136)
	objPtr = XTcl_NewBignumObj(tls, bp+136)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++
	XTcl_GetWideIntFromObj(tls, uintptr(0), objPtr, bp+160)
__74:
	_objPtr = objPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __77
	}
	XTclFreeObj(tls, _objPtr)
__77:
	;
	goto __75
__75:
	if 0 != 0 {
		goto __74
	}
	goto __76
__76:
	;
__72:
	;
	isNegative = libc.Bool32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 160)) < int64(0))
	goto __71
__70:
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(segment)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp + 168)) = *(*int32)(unsafe.Pointer(segment + 32))
				return TCL_OK
			}()
		}
		return XTcl_GetLongFromObj(tls, uintptr(0), segment, bp+168)
	}() != TCL_OK) {
		goto __78
	}
	if !(XTcl_GetWideIntFromObj(tls, uintptr(0), segment, bp+160) != TCL_OK) {
		goto __80
	}

	if !(XTcl_GetBignumFromObj(tls, interp, segment, bp+136) != TCL_OK) {
		goto __82
	}
	goto error
__82:
	;
	XTclBN_mp_mod_2d(tls, bp+136, int32(uint64(8)*uint64(unsafe.Sizeof(int32(0)))), bp+136)
	objPtr1 = XTcl_NewBignumObj(tls, bp+136)
	(*Tcl_Obj)(unsafe.Pointer(objPtr1)).FrefCount++
	if (*Tcl_Obj)(unsafe.Pointer(objPtr1)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
		*(*int32)(unsafe.Pointer(bp + 168)) = *(*int32)(unsafe.Pointer(objPtr1 + 32))
	} else {
		XTcl_GetLongFromObj(tls, uintptr(0), objPtr1, bp+168)
	}
__83:
	_objPtr1 = objPtr1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __86
	}
	XTclFreeObj(tls, _objPtr1)
__86:
	;
	goto __84
__84:
	if 0 != 0 {
		goto __83
	}
	goto __85
__85:
	;
	goto __81
__80:
	*(*int32)(unsafe.Pointer(bp + 168 /* l */)) = int32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 160)))
__81:
	;
	if !(useShort != 0) {
		goto __87
	}
	s = int16(*(*int32)(unsafe.Pointer(bp + 168 /* l */)))
	isNegative = libc.Bool32(int32(s) < int32(int16(0)))
	goto __88
__87:
	isNegative = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 168)) < 0)
__88:
	;
	goto __79
__78:
	if !(useShort != 0) {
		goto __89
	}
	s = int16(*(*int32)(unsafe.Pointer(bp + 168 /* l */)))
	isNegative = libc.Bool32(int32(s) < int32(int16(0)))
	goto __90
__89:
	isNegative = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 168)) < 0)
__90:
	;
__79:
	;
__71:
	;
__68:
	;

__91:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __94
	}
	XTclAllocateFreeObjects(tls)
__94:
	;
	segment = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __92
__92:
	if 0 != 0 {
		goto __91
	}
	goto __93
__93:
	;
	(*Tcl_Obj)(unsafe.Pointer(segment)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(segment)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(segment)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(segment)).FtypePtr = uintptr(0)

	allocSegment = 1
	segmentLimit = 0x7fffffff
	(*Tcl_Obj)(unsafe.Pointer(segment)).FrefCount++

	if !((isNegative != 0 || gotPlus != 0 || gotSpace != 0) && (useBig != 0 || int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'd')) {
		goto __95
	}
	XTcl_AppendToObj(tls, segment,
		func() uintptr {
			if isNegative != 0 {
				return ts + 6357 /* "-" */
			}
			return func() uintptr {
				if gotPlus != 0 {
					return ts + 6271 /* "+" */
				}
				return ts + 14901 /* " " */
			}()
		}(), 1)
	segmentLimit = segmentLimit - 1
__95:
	;

	if !(gotHash != 0) {
		goto __96
	}
	switch int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */))) {
	case 'o':
		goto __98
	case 'X':
		goto __99
	case 'x':
		goto __100
	case 'b':
		goto __101
	}
	goto __97
__98:
	XTcl_AppendToObj(tls, segment, ts+18935, 1)
	segmentLimit = segmentLimit - 1
	*(*int32)(unsafe.Pointer(bp + 124 /* precision */))--
	goto __97
__99:
	XTcl_AppendToObj(tls, segment, ts+63806, 2)
	segmentLimit = segmentLimit - 2
	goto __97
__100:
	XTcl_AppendToObj(tls, segment, ts+63809, 2)
	segmentLimit = segmentLimit - 2
	goto __97
__101:
	XTcl_AppendToObj(tls, segment, ts+63812, 2)
	segmentLimit = segmentLimit - 2
	goto __97
__97:
	;
__96:
	;

	switch int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */))) {
	case 'd':
		goto __103

	case 'u':
		goto __104
	case 'o':
		goto __105
	case 'x':
		goto __106
	case 'X':
		goto __107
	case 'b':
		goto __108
	}
	goto __102
__103:

	if !(useShort != 0) {
		goto __109
	}
__111:
	;
__114:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __117
	}
	XTclAllocateFreeObjects(tls)
__117:
	;
	pure = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __115
__115:
	if 0 != 0 {
		goto __114
	}
	goto __116
__116:
	;
	(*Tcl_Obj)(unsafe.Pointer(pure)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(pure)).Fbytes = uintptr(0)
	*(*int32)(unsafe.Pointer(pure + 32)) = int32(int32(s))
	(*Tcl_Obj)(unsafe.Pointer(pure)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))

	goto __112
__112:
	if 0 != 0 {
		goto __111
	}
	goto __113
__113:
	;
	goto __110
__109:
	if !(useWide != 0) {
		goto __118
	}
	pure = XTcl_NewWideIntObj(tls, *(*Tcl_WideInt)(unsafe.Pointer(bp + 160 /* w */)))
	goto __119
__118:
	if !(useBig != 0) {
		goto __120
	}
	pure = XTcl_NewBignumObj(tls, bp+136)
	goto __121
__120:
	pure = XTcl_NewLongObj(tls, *(*int32)(unsafe.Pointer(bp + 168 /* l */)))
__121:
	;
__119:
	;
__110:
	;
	(*Tcl_Obj)(unsafe.Pointer(pure)).FrefCount++
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(pure)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 172)) = (*Tcl_Obj)(unsafe.Pointer(pure)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(pure)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, pure, bp+172)
	}()

	// Already did the sign above.

	if !(int32(*(*int8)(unsafe.Pointer(bytes))) == '-') {
		goto __122
	}
	*(*int32)(unsafe.Pointer(bp + 172 /* length1 */))--
	bytes++
__122:
	;
	toAppend = *(*int32)(unsafe.Pointer(bp + 172 /* length1 */))

	// Canonical decimal string reps for integers are composed
	// entirely of one-byte encoded characters, so "length" is the
	// number of chars.

	if !(gotPrecision != 0) {
		goto __123
	}
	if !(*(*int32)(unsafe.Pointer(bp + 172)) < *(*int32)(unsafe.Pointer(bp + 124))) {
		goto __124
	}
	segmentLimit = segmentLimit - (*(*int32)(unsafe.Pointer(bp + 124)) - *(*int32)(unsafe.Pointer(bp + 172)))
__124:
	;
__125:
	if !(*(*int32)(unsafe.Pointer(bp + 172)) < *(*int32)(unsafe.Pointer(bp + 124))) {
		goto __126
	}
	XTcl_AppendToObj(tls, segment, ts+18935, 1)
	*(*int32)(unsafe.Pointer(bp + 172 /* length1 */))++
	goto __125
__126:
	;
	gotZero = 0
__123:
	;
	if !(gotZero != 0) {
		goto __127
	}
	*(*int32)(unsafe.Pointer(bp + 172 /* length1 */)) += XTcl_GetCharLength(tls, segment)
	if !(*(*int32)(unsafe.Pointer(bp + 172)) < *(*int32)(unsafe.Pointer(bp + 120))) {
		goto __128
	}
	segmentLimit = segmentLimit - (*(*int32)(unsafe.Pointer(bp + 120)) - *(*int32)(unsafe.Pointer(bp + 172)))
__128:
	;
__129:
	if !(*(*int32)(unsafe.Pointer(bp + 172)) < *(*int32)(unsafe.Pointer(bp + 120))) {
		goto __130
	}
	XTcl_AppendToObj(tls, segment, ts+18935, 1)
	*(*int32)(unsafe.Pointer(bp + 172 /* length1 */))++
	goto __129
__130:
	;
__127:
	;
	if !(toAppend > segmentLimit) {
		goto __131
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__131:
	;
	XTcl_AppendToObj(tls, segment, bytes, toAppend)
__132:
	_objPtr2 = pure
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __135
	}
	XTclFreeObj(tls, _objPtr2)
__135:
	;
	goto __133
__133:
	if 0 != 0 {
		goto __132
	}
	goto __134
__134:
	;
	goto __102

__104:
__105:
__106:
__107:
__108:
	bits = uint64(0)
	numDigits = int64(0)
	numBits = 4
	base = 16
	index = 0
	shift = 0

	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'u') {
		goto __136
	}
	base = 10
	goto __137
__136:
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'o') {
		goto __138
	}
	base = 8
	numBits = 3
	goto __139
__138:
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'b') {
		goto __140
	}
	base = 2
	numBits = 1
__140:
	;
__139:
	;
__137:
	;
	if !(useShort != 0) {
		goto __141
	}
	us = uint16(s)

	bits = Tcl_WideUInt(us)
__143:
	if !(us != 0) {
		goto __144
	}
	numDigits++
	us = uint16(int32(us) / base)
	goto __143
__144:
	;
	goto __142
__141:
	if !(useWide != 0) {
		goto __145
	}
	uw = Tcl_WideUInt(*(*Tcl_WideInt)(unsafe.Pointer(bp + 160 /* w */)))

	bits = uw
__147:
	if !(uw != 0) {
		goto __148
	}
	numDigits++
	uw = uw / Tcl_WideUInt(base)
	goto __147
__148:
	;
	goto __146
__145:
	if !(useBig != 0 && (*Mp_int)(unsafe.Pointer(bp+136)).Fused != 0) {
		goto __149
	}
	leftover = (*Mp_int)(unsafe.Pointer(bp+136)).Fused * MP_DIGIT_BIT % numBits
	mask = Mp_digit(libc.CplUint32(Mp_digit(0))) << (MP_DIGIT_BIT - leftover)

	numDigits = int64(1) + Tcl_WideInt((*Mp_int)(unsafe.Pointer(bp+136)).Fused)*int64(MP_DIGIT_BIT)/Tcl_WideInt(numBits)
__151:
	if !(mask&*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+136)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(bp+136)).Fused-1)*4)) == Mp_digit(0)) {
		goto __152
	}
	numDigits--
	mask >>= numBits
	goto __151
__152:
	;
	if !(numDigits > int64(0x7fffffff)) {
		goto __153
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__153:
	;
	goto __150
__149:
	if !!(useBig != 0) {
		goto __154
	}
	ul = uint32(*(*int32)(unsafe.Pointer(bp + 168 /* l */)))

	bits = Tcl_WideUInt(ul)
__155:
	if !(ul != 0) {
		goto __156
	}
	numDigits++
	ul = ul / uint32(base)
	goto __155
__156:
	;
__154:
	;
__150:
	;
__146:
	;
__142:
	;

	// Need to be sure zero becomes "0", not "".

	if !(numDigits == int64(0) && !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'o' && gotHash != 0)) {
		goto __157
	}
	numDigits = int64(1)
__157:
	;
__158:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __161
	}
	XTclAllocateFreeObjects(tls)
__161:
	;
	pure1 = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __159
__159:
	if 0 != 0 {
		goto __158
	}
	goto __160
__160:
	;
	(*Tcl_Obj)(unsafe.Pointer(pure1)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(pure1)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(pure1)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(pure1)).FtypePtr = uintptr(0)

	XTcl_SetObjLength(tls, pure1, int32(numDigits))
	bytes1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(pure1)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(pure1)).Fbytes
		}
		return XTcl_GetString(tls, pure1)
	}()
	toAppend = libc.AssignInt32(&length2, int32(numDigits))
__162:
	if !(libc.PostDecInt64(&numDigits, 1) != 0) {
		goto __163
	}

	if !(useBig != 0 && (*Mp_int)(unsafe.Pointer(bp+136)).Fused != 0) {
		goto __164
	}
	if !(index < (*Mp_int)(unsafe.Pointer(bp+136)).Fused && Size_t(shift) < uint64(8)*uint64(unsafe.Sizeof(Tcl_WideUInt(0)))-uint64(MP_DIGIT_BIT)) {
		goto __165
	}
	bits = bits | Tcl_WideUInt(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(bp+136)).Fdp + uintptr(libc.PostIncInt32(&index, 1))*4)))<<shift
	shift = shift + MP_DIGIT_BIT
__165:
	;
	shift = shift - numBits
__164:
	;
	digitOffset = int32(bits % Tcl_WideUInt(base))
	if !(digitOffset > 9) {
		goto __166
	}
	if !(int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108))) == 'X') {
		goto __168
	}
	*(*int8)(unsafe.Pointer(bytes1 + uintptr(numDigits))) = int8('A' + digitOffset - 10)
	goto __169
__168:
	*(*int8)(unsafe.Pointer(bytes1 + uintptr(numDigits))) = int8('a' + digitOffset - 10)
__169:
	;
	goto __167
__166:
	*(*int8)(unsafe.Pointer(bytes1 + uintptr(numDigits))) = int8('0' + digitOffset)
__167:
	;
	bits = bits / Tcl_WideUInt(base)
	goto __162
__163:
	;
	if !(useBig != 0) {
		goto __170
	}
	XTclBN_mp_clear(tls, bp+136)
__170:
	;
	if !(gotPrecision != 0) {
		goto __171
	}
	if !(length2 < *(*int32)(unsafe.Pointer(bp + 124))) {
		goto __172
	}
	segmentLimit = segmentLimit - (*(*int32)(unsafe.Pointer(bp + 124)) - length2)
__172:
	;
__173:
	if !(length2 < *(*int32)(unsafe.Pointer(bp + 124))) {
		goto __174
	}
	XTcl_AppendToObj(tls, segment, ts+18935, 1)
	length2++
	goto __173
__174:
	;
	gotZero = 0
__171:
	;
	if !(gotZero != 0) {
		goto __175
	}
	length2 = length2 + XTcl_GetCharLength(tls, segment)
	if !(length2 < *(*int32)(unsafe.Pointer(bp + 120))) {
		goto __176
	}
	segmentLimit = segmentLimit - (*(*int32)(unsafe.Pointer(bp + 120)) - length2)
__176:
	;
__177:
	if !(length2 < *(*int32)(unsafe.Pointer(bp + 120))) {
		goto __178
	}
	XTcl_AppendToObj(tls, segment, ts+18935, 1)
	length2++
	goto __177
__178:
	;
__175:
	;
	if !(toAppend > segmentLimit) {
		goto __179
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__179:
	;
	XTcl_AppendObjToObj(tls, segment, pure1)
__180:
	_objPtr3 = pure1
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __183
	}
	XTclFreeObj(tls, _objPtr3)
__183:
	;
	goto __181
__181:
	if 0 != 0 {
		goto __180
	}
	goto __182
__182:
	;
	goto __102

__102:
	;
	goto __47

__57:
__58:
__59:
__60:
__61:
	p = bp + 176 /* spec */
	length3 = MAX_FLOAT_SIZE

	if !(XTcl_GetDoubleFromObj(tls, interp, segment, bp+240) != TCL_OK) {
		goto __184
	}
	// TODO: Figure out ACCEPT_NAN here
	goto error
__184:
	;
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8('%')
	if !(gotMinus != 0) {
		goto __185
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8('-')
__185:
	;
	if !(gotHash != 0) {
		goto __186
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8('#')
__186:
	;
	if !(gotZero != 0) {
		goto __187
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8('0')
__187:
	;
	if !(gotSpace != 0) {
		goto __188
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8(' ')
__188:
	;
	if !(gotPlus != 0) {
		goto __189
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8('+')
__189:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 120)) != 0) {
		goto __190
	}
	p += uintptr(libc.Xsprintf(tls, p, ts+909, libc.VaList(bp+8, *(*int32)(unsafe.Pointer(bp + 120 /* width */)))))
	if !(*(*int32)(unsafe.Pointer(bp + 120)) > length3) {
		goto __191
	}
	length3 = *(*int32)(unsafe.Pointer(bp + 120 /* width */))
__191:
	;
__190:
	;
	if !(gotPrecision != 0) {
		goto __192
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8('.')
	p += uintptr(libc.Xsprintf(tls, p, ts+909, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(bp + 124 /* precision */)))))
	if !(*(*int32)(unsafe.Pointer(bp + 124)) > 0x7fffffff-length3) {
		goto __193
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__193:
	;
	length3 = length3 + *(*int32)(unsafe.Pointer(bp + 124))
__192:
	;

	// Don't pass length modifiers!

	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */)))
	*(*int8)(unsafe.Pointer(p)) = int8(0)

__194:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __197
	}
	XTclAllocateFreeObjects(tls)
__197:
	;
	segment = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __195
__195:
	if 0 != 0 {
		goto __194
	}
	goto __196
__196:
	;
	(*Tcl_Obj)(unsafe.Pointer(segment)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(segment)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(segment)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(segment)).FtypePtr = uintptr(0)

	allocSegment = 1
	if !!(XTcl_AttemptSetObjLength(tls, segment, length3) != 0) {
		goto __198
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__198:
	;
	bytes2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(segment)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(segment)).Fbytes
		}
		return XTcl_GetString(tls, segment)
	}()
	if !!(XTcl_AttemptSetObjLength(tls, segment, libc.Xsprintf(tls, bytes2, bp+176, libc.VaList(bp+24, *(*float64)(unsafe.Pointer(bp + 240))))) != 0) {
		goto __199
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__199:
	;
	goto __47

__62:
	if !(interp != uintptr(0)) {
		goto __200
	}
	XTcl_SetObjResult(tls, interp,
		XTcl_ObjPrintf(tls, ts+63815, libc.VaList(bp+32, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 108 /* ch */))))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+62448, ts+62710, uintptr(0)))
__200:
	;
	goto error
__47:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 120)) > 0 && numChars < 0) {
		goto __201
	}
	numChars = XTcl_GetCharLength(tls, segment)
__201:
	;
	if !(!(gotMinus != 0) && *(*int32)(unsafe.Pointer(bp + 120)) > 0) {
		goto __202
	}
	if !(numChars < *(*int32)(unsafe.Pointer(bp + 120))) {
		goto __203
	}
	limit = limit - (*(*int32)(unsafe.Pointer(bp + 120)) - numChars)
__203:
	;
__204:
	if !(numChars < *(*int32)(unsafe.Pointer(bp + 120))) {
		goto __205
	}
	XTcl_AppendToObj(tls, appendObj, func() uintptr {
		if gotZero != 0 {
			return ts + 18935 /* "0" */
		}
		return ts + 14901 /* " " */
	}(), 1)
	numChars++
	goto __204
__205:
	;
__202:
	;

	if (*Tcl_Obj)(unsafe.Pointer(segment)).Fbytes != 0 {
		*(*int32)(unsafe.Pointer(bp + 248)) = (*Tcl_Obj)(unsafe.Pointer(segment)).Flength
		_ = (*Tcl_Obj)(unsafe.Pointer(segment)).Fbytes
	} else {
		XTcl_GetStringFromObj(tls, segment, bp+248)
	}
	if !(*(*int32)(unsafe.Pointer(bp + 248)) > limit) {
		goto __206
	}
	if !(allocSegment != 0) {
		goto __207
	}
__208:
	_objPtr4 = segment
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __211
	}
	XTclFreeObj(tls, _objPtr4)
__211:
	;
	goto __209
__209:
	if 0 != 0 {
		goto __208
	}
	goto __210
__210:
	;
__207:
	;
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__206:
	;
	XTcl_AppendObjToObj(tls, appendObj, segment)
	limit = limit - *(*int32)(unsafe.Pointer(bp + 248))
	if !(allocSegment != 0) {
		goto __212
	}
__213:
	_objPtr5 = segment
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __216
	}
	XTclFreeObj(tls, _objPtr5)
__216:
	;
	goto __214
__214:
	if 0 != 0 {
		goto __213
	}
	goto __215
__215:
	;
__212:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 120)) > 0) {
		goto __217
	}
	if !(numChars < *(*int32)(unsafe.Pointer(bp + 120))) {
		goto __218
	}
	limit = limit - (*(*int32)(unsafe.Pointer(bp + 120)) - numChars)
__218:
	;
__219:
	if !(numChars < *(*int32)(unsafe.Pointer(bp + 120))) {
		goto __220
	}
	XTcl_AppendToObj(tls, appendObj, func() uintptr {
		if gotZero != 0 {
			return ts + 18935 /* "0" */
		}
		return ts + 14901 /* " " */
	}(), 1)
	numChars++
	goto __219
__220:
	;
__217:
	;

	objIndex = objIndex + gotSequential
	goto __2
__3:
	;
	if !(numBytes != 0) {
		goto __221
	}
	if !(numBytes > limit) {
		goto __222
	}
	msg = overflow
	errCode = ts + 30260 /* "OVERFLOW" */
	goto errorMsg
__222:
	;
	XTcl_AppendToObj(tls, appendObj, span, numBytes)
	limit = limit - numBytes
	numBytes = 0
__221:
	;

	return TCL_OK

errorMsg:
	if !(interp != uintptr(0)) {
		goto __223
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, msg, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+62448, errCode, uintptr(0)))
__223:
	;
error:
	XTcl_SetObjLength(tls, appendObj, *(*int32)(unsafe.Pointer(bp + 104 /* originalLength */)))
	return TCL_ERROR
}

var mixedXPG uintptr = ts + 62401 /* "cannot mix \"%\" a..." */ /* tclStringObj.c:1874:23 */
var badIndex = [2]uintptr{
	ts + 10300,
	ts + 62857,
}                                 /* tclStringObj.c:1876:23 */
var overflow uintptr = ts + 63840 /* "max size for a T..." */ /* tclStringObj.c:1880:23 */

//---------------------------------------------------------------------------
//
// Tcl_Format --
//
// Results:
//	A refcount zero Tcl_Obj.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_Format(tls *libc.TLS, interp uintptr, format uintptr, objc int32, objv uintptr) uintptr { /* tclStringObj.c:2600:9: */
	var result int32
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	result = XTcl_AppendFormatToObj(tls, interp, objPtr, format, objc, objv)
	if result != TCL_OK {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return uintptr(0)
	}
	return objPtr
}

//---------------------------------------------------------------------------
//
// AppendPrintfToObjVA --
//
// Results:
//
// Side effects:
//
//---------------------------------------------------------------------------

func sAppendPrintfToObjVA(tls *libc.TLS, objPtr uintptr, format uintptr, argList Va_list) { /* tclStringObj.c:2632:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var code int32
	// var objc int32 at bp+32, 4

	// var objv uintptr at bp+24, 8

	var list uintptr
	var p uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		list = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(list)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(list)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(list)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(list)).FtypePtr = uintptr(0)
	{
	}

	p = format
	(*Tcl_Obj)(unsafe.Pointer(list)).FrefCount++
	for int32(*(*int8)(unsafe.Pointer(p))) != 0 {
		var size int32 = 0
		var seekingConversion int32 = 1
		var gotPrecision int32 = 0
		var lastNum int32 = -1

		if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))) != '%' {
			continue
		}
		if int32(*(*int8)(unsafe.Pointer(p))) == '%' {
			p++
			continue
		}
		for ok1 := true; ok1; ok1 = seekingConversion != 0 {
			switch int32(*(*int8)(unsafe.Pointer(p))) {
			case 0:
				seekingConversion = 0
				break
			case 's':
				{
					var q uintptr
					var end uintptr
					var bytes uintptr = libc.VaUintptr(&argList)
					seekingConversion = 0

					// The buffer to copy characters from starts at bytes and ends
					// at either the first NUL byte, or after lastNum bytes, when
					// caller has indicated a limit.

					end = bytes
					for (!(gotPrecision != 0) || libc.PostDecInt32(&lastNum, 1) != 0) && int32(*(*int8)(unsafe.Pointer(end))) != 0 {
						end++
					}

					// Within that buffer, we trim both ends if needed so that we
					// copy only whole characters, and avoid copying any partial
					// multi-byte characters.

					q = func() uintptr {
						if end < bytes+uintptr(2) {
							return bytes
						}
						return func() uintptr {
							if int32(uint8(*(*int8)(unsafe.Pointer(end - uintptr(1))))) < 0x80 {
								return end - uintptr(1)
							}
							return XTcl_UtfPrev(tls, end, bytes)
						}()
					}()
					if !(XTcl_UtfCharComplete(tls, q, int32((int64(end)-int64(q))/1)) != 0) {
						end = q
					}

					q = bytes + uintptr(TCL_UTF_MAX)
					for bytes < end && bytes < q &&
						int32(*(*int8)(unsafe.Pointer(bytes)))&0xC0 == 0x80 {
						bytes++
					}

					XTcl_ListObjAppendElement(tls, uintptr(0), list,
						XTcl_NewStringObj(tls, bytes, int32((int64(end)-int64(bytes))/1)))

					break

				}
			case 'c':
				fallthrough
			case 'i':
				fallthrough
			case 'u':
				fallthrough
			case 'd':
				fallthrough
			case 'o':
				fallthrough
			case 'x':
				fallthrough
			case 'X':
				seekingConversion = 0
				switch size {
				case -1:
					fallthrough
				case 0:
					XTcl_ListObjAppendElement(tls, uintptr(0), list, XTcl_NewLongObj(tls,
						int32(libc.VaInt32(&argList))))
					break
				case 1:
					XTcl_ListObjAppendElement(tls, uintptr(0), list, XTcl_NewLongObj(tls,
						int32(libc.VaInt32(&argList))))
					break
				}
				break
			case 'e':
				fallthrough
			case 'E':
				fallthrough
			case 'f':
				fallthrough
			case 'g':
				fallthrough
			case 'G':
				XTcl_ListObjAppendElement(tls, uintptr(0), list, XTcl_NewDoubleObj(tls,
					float64(libc.VaFloat64(&argList))))
				seekingConversion = 0
				break
			case '*':
				lastNum = int32(libc.VaInt32(&argList))
				XTcl_ListObjAppendElement(tls, uintptr(0), list, XTcl_NewIntObj(tls, lastNum))
				p++
				break
			case '0':
				fallthrough
			case '1':
				fallthrough
			case '2':
				fallthrough
			case '3':
				fallthrough
			case '4':
				fallthrough
			case '5':
				fallthrough
			case '6':
				fallthrough
			case '7':
				fallthrough
			case '8':
				fallthrough
			case '9':
				{
					// var end uintptr at bp+16, 8

					lastNum = int32(libc.Xstrtoul(tls, p, bp+16, 10))
					p = *(*uintptr)(unsafe.Pointer(bp + 16 /* end */))
					break

				}
			case '.':
				gotPrecision = 1
				p++
				break
			// TODO: support for wide (and bignum?) arguments
			case 'l':
				size = 1
				p++
				break
			case 'h':
				size = -1
				fallthrough
				// FALLTHRU
			default:
				p++
			}
		}
	}
	if (*Tcl_Obj)(unsafe.Pointer(list)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
		*(*uintptr)(unsafe.Pointer(bp + 24)) = *(*uintptr)(unsafe.Pointer(list + 32)) + 16
		*(*int32)(unsafe.Pointer(bp + 32)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(list + 32)))).FelemCount
	} else {
		XTcl_ListObjGetElements(tls, uintptr(0), list, bp+32, bp+24)
	}
	code = XTcl_AppendFormatToObj(tls, uintptr(0), objPtr, format, *(*int32)(unsafe.Pointer(bp + 32 /* objc */)), *(*uintptr)(unsafe.Pointer(bp + 24 /* objv */)))
	if code != TCL_OK {
		XTcl_AppendPrintfToObj(tls, objPtr,
			ts+63874,
			libc.VaList(bp, format, XTcl_GetString(tls, list)))
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		var _objPtr uintptr = list
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

//---------------------------------------------------------------------------
//
// Tcl_AppendPrintfToObj --
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_AppendPrintfToObj(tls *libc.TLS, objPtr uintptr, format uintptr, va uintptr) { /* tclStringObj.c:2781:1: */
	var argList Va_list
	_ = argList

	argList = va
	sAppendPrintfToObjVA(tls, objPtr, format, argList)
	_ = argList
}

//---------------------------------------------------------------------------
//
// Tcl_ObjPrintf --
//
// Results:
//	A refcount zero Tcl_Obj.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_ObjPrintf(tls *libc.TLS, format uintptr, va uintptr) uintptr { /* tclStringObj.c:2807:9: */
	var argList Va_list
	_ = argList
	var objPtr uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	argList = va
	sAppendPrintfToObjVA(tls, objPtr, format, argList)
	_ = argList
	return objPtr
}

//---------------------------------------------------------------------------
//
// TclGetStringStorage --
//
//	Returns the string storage space of a Tcl_Obj.
//
// Results:
//	The pointer value objPtr->bytes is returned and the number of bytes
//	allocated there is written to *sizePtr (if known).
//
// Side effects:
//	May set objPtr->bytes.
//
//---------------------------------------------------------------------------

func XTclGetStringStorage(tls *libc.TLS, objPtr uintptr, sizePtr uintptr) uintptr { /* tclStringObj.c:2839:6: */
	var stringPtr uintptr

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclStringType)) || (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) {
		return func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return func() uintptr {
					*(*int32)(unsafe.Pointer(sizePtr)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
					return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
				}()
			}
			return XTcl_GetStringFromObj(tls, objPtr, sizePtr)
		}()
	}

	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	*(*uint32)(unsafe.Pointer(sizePtr)) = uint32((*String)(unsafe.Pointer(stringPtr)).Fallocated)
	return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
}

//---------------------------------------------------------------------------
//
// TclStringReverse --
//
//	Implements the [string reverse] operation.
//
// Results:
//	An unshared Tcl value which is the [string reverse] of the argument
//	supplied. When sharing rules permit, the returned value might be the
//	argument with modifications done in place.
//
// Side effects:
//	May allocate a new Tcl_Obj.
//
//---------------------------------------------------------------------------

func sReverseBytes(tls *libc.TLS, to uintptr, from uintptr, count int32) { /* tclStringObj.c:2873:1: */
	var src uintptr = from + uintptr(count)

	if to == from {
		// Reversing in place
		for libc.PreDecUintptr(&src, 1) > to {
			var c uint8 = *(*uint8)(unsafe.Pointer(src))

			*(*uint8)(unsafe.Pointer(src)) = *(*uint8)(unsafe.Pointer(to))
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&to, 1))) = c
		}
	} else {
		for libc.PreDecUintptr(&src, 1) >= from {
			*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&to, 1))) = *(*uint8)(unsafe.Pointer(src))
		}
	}
}

func XTclStringReverse(tls *libc.TLS, objPtr uintptr) uintptr { /* tclStringObj.c:2896:9: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var stringPtr uintptr
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */)) = Tcl_UniChar(0)
	var needFlip int32 = 0

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) {
		// var numBytes int32 at bp, 4

		var from uintptr = XTcl_GetByteArrayFromObj(tls, objPtr, bp)

		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
			objPtr = XTcl_NewByteArrayObj(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* numBytes */)))
		}
		sReverseBytes(tls, XTcl_GetByteArrayFromObj(tls, objPtr, uintptr(0)), from, *(*int32)(unsafe.Pointer(bp /* numBytes */)))
		return objPtr
	}

	sSetStringFromAny(tls, uintptr(0), objPtr)
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if (*String)(unsafe.Pointer(stringPtr)).FhasUnicode != 0 {
		var from uintptr = XTcl_GetUnicode(tls, objPtr)
		var src uintptr = from + uintptr((*String)(unsafe.Pointer(stringPtr)).FnumChars)*2
		var to uintptr

		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
			// Create a non-empty, pure unicode value, so we can coax
			// Tcl_SetObjLength into growing the unicode rep buffer.

			objPtr = XTcl_NewUnicodeObj(tls, bp+4, 1)
			XTcl_SetObjLength(tls, objPtr, (*String)(unsafe.Pointer(stringPtr)).FnumChars)
			to = XTcl_GetUnicode(tls, objPtr)
			for libc.PreDecUintptr(&src, 2) >= from {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */)) = *(*Tcl_UniChar)(unsafe.Pointer(src))
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)))&0xF800 == 0xD800 {
					needFlip = 1
				}
				*(*Tcl_UniChar)(unsafe.Pointer(libc.PostIncUintptr(&to, 2))) = *(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */))
			}
		} else {
			// Reversing in place.

			to = src
			for libc.PreDecUintptr(&src, 2) > from {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */)) = *(*Tcl_UniChar)(unsafe.Pointer(src))
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)))&0xF800 == 0xD800 {
					needFlip = 1
				}
				*(*Tcl_UniChar)(unsafe.Pointer(src)) = *(*Tcl_UniChar)(unsafe.Pointer(from))
				*(*Tcl_UniChar)(unsafe.Pointer(libc.PostIncUintptr(&from, 2))) = *(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */))
			}
		}
		if needFlip != 0 {
			// Flip back surrogate pairs.

			from = to - uintptr((*String)(unsafe.Pointer(stringPtr)).FnumChars)*2
			for libc.PreDecUintptr(&to, 2) >= from {
				*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */)) = *(*Tcl_UniChar)(unsafe.Pointer(to))
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)))&0xFC00 == 0xD800 {
					if to-uintptr(1)*2 >= from && int32(*(*Tcl_UniChar)(unsafe.Pointer(to + libc.UintptrFromInt32(-1)*2)))&0xFC00 == 0xDC00 {
						*(*Tcl_UniChar)(unsafe.Pointer(to)) = *(*Tcl_UniChar)(unsafe.Pointer(to + libc.UintptrFromInt32(-1)*2))
						*(*Tcl_UniChar)(unsafe.Pointer(to + libc.UintptrFromInt32(-1)*2)) = *(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */))
						to -= 2
					}
				}
			}
		}
	}

	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
		var numChars int32 = (*String)(unsafe.Pointer(stringPtr)).FnumChars
		var numBytes int32 = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
		var to uintptr
		var from uintptr = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes

		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount > 1 {
			for ok := true; ok; ok = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				objPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
			{
			}

			XTcl_SetObjLength(tls, objPtr, numBytes)
		}
		to = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes

		if numChars < numBytes {
			// Either numChars == -1 and we don't know how many chars are
			// represented by objPtr->bytes and we need Pass 1 just in case,
			// or numChars >= 0 and we know we have fewer chars than bytes, so
			// we know there's a multibyte character needing Pass 1.
			//
			// Pass 1. Reverse the bytes of each multi-byte character.

			var bytesLeft int32 = numBytes
			// var chw int32 at bp+8, 4

			for bytesLeft != 0 {
				// NOTE: We know that the from buffer is NUL-terminated. It's
				// part of the contract for objPtr->bytes values. Thus, we can
				// skip calling Tcl_UtfCharComplete() here.

				var bytesInChar int32 = XTclUtfToUCS4(tls, from, bp+8)

				sReverseBytes(tls, to, from,
					bytesInChar)
				to += uintptr(bytesInChar)
				from += uintptr(bytesInChar)
				bytesLeft = bytesLeft - bytesInChar
			}

			from = libc.AssignUintptr(&to, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
		}
		// Pass 2. Reverse all the bytes.
		sReverseBytes(tls, to, from, numBytes)
	}

	return objPtr
}

//---------------------------------------------------------------------------
//
// FillUnicodeRep --
//
//	Populate the Unicode internal rep with the Unicode form of its string
//	rep. The object must alread have a "String" internal rep.
//
// Results:
//	None.
//
// Side effects:
//	Reallocates the String internal rep.
//
//---------------------------------------------------------------------------

func sFillUnicodeRep(tls *libc.TLS, objPtr uintptr) { /* tclStringObj.c:3052:1: */
	var stringPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	sExtendUnicodeRepWithString(tls, objPtr, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength,
		(*String)(unsafe.Pointer(stringPtr)).FnumChars)
}

func sExtendUnicodeRepWithString(tls *libc.TLS, objPtr uintptr, bytes uintptr, numBytes int32, numAppendChars int32) { /* tclStringObj.c:3063:1: */
	bp := tls.Alloc(10)
	defer tls.Free(10)

	var stringPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	var needed int32
	var numOrigChars int32 = 0
	var dst uintptr
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 8 /* unichar */)) = Tcl_UniChar(0)

	if (*String)(unsafe.Pointer(stringPtr)).FhasUnicode != 0 {
		numOrigChars = (*String)(unsafe.Pointer(stringPtr)).FnumChars
	}
	if numAppendChars == -1 {
		for ok := true; ok; ok = 0 != 0 {
			var _count int32
			var _i int32 = numBytes
			var _str uintptr = bytes
			for _i != 0 && int32(*(*uint8)(unsafe.Pointer(_str))) < 0xC0 {
				_i--
				_str++
			}
			_count = numBytes - _i
			if _i != 0 {
				_count = _count + XTcl_NumUtfChars(tls, bytes+uintptr(_count), _i)
			}
			numAppendChars = _count
		}

	}
	needed = numOrigChars + numAppendChars
	for ok1 := true; ok1; ok1 = 0 != 0 {
		if needed < 0 || needed > int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0)))) {
			XTcl_Panic(tls, ts+63524, libc.VaList(bp, int32((uint64(uint32(0x7fffffff)*2+1)-uint64(1)-Size_t(int32(uintptr(0)+16)))/Size_t(unsafe.Sizeof(Tcl_UniChar(0))))))
		}
	}

	if needed > (*String)(unsafe.Pointer(stringPtr)).FmaxChars {
		sGrowUnicodeBuffer(tls, objPtr, needed)
		stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	}

	(*String)(unsafe.Pointer(stringPtr)).FhasUnicode = 1
	if bytes != 0 {
		(*String)(unsafe.Pointer(stringPtr)).FnumChars = needed
	} else {
		numAppendChars = 0
	}
	for dst = stringPtr + 16 + uintptr(numOrigChars)*2; libc.PostDecInt32(&numAppendChars, 1) > 0; dst += 2 {
		bytes += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(bytes)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp + 8)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(bytes))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, bytes, bp+8))
		}()
		*(*Tcl_UniChar)(unsafe.Pointer(dst)) = *(*Tcl_UniChar)(unsafe.Pointer(bp + 8 /* unichar */))
	}
	*(*Tcl_UniChar)(unsafe.Pointer(dst)) = Tcl_UniChar(0)
}

//----------------------------------------------------------------------
//
// DupStringInternalRep --
//
//	Initialize the internal representation of a new Tcl_Obj to a copy of
//	the internal representation of an existing string object.
//
// Results:
//	None.
//
// Side effects:
//	copyPtr's internal rep is set to a copy of srcPtr's internal
//	representation.
//
//----------------------------------------------------------------------

func sDupStringInternalRep(tls *libc.TLS, srcPtr uintptr, copyPtr uintptr) { /* tclStringObj.c:3119:1: */
	var srcStringPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))
	var copyStringPtr uintptr = uintptr(0)

	if (*String)(unsafe.Pointer(srcStringPtr)).FnumChars == -1 {
		// The String struct in the source value holds zero useful data. Don't
		// bother copying it. Don't even bother allocating space in which to
		// copy it. Just let the copy be untyped.

		return
	}

	if (*String)(unsafe.Pointer(srcStringPtr)).FhasUnicode != 0 {
		var copyMaxChars int32

		if (*String)(unsafe.Pointer(srcStringPtr)).FmaxChars/2 >= (*String)(unsafe.Pointer(srcStringPtr)).FnumChars {
			copyMaxChars = 2 * (*String)(unsafe.Pointer(srcStringPtr)).FnumChars
		} else {
			copyMaxChars = (*String)(unsafe.Pointer(srcStringPtr)).FmaxChars
		}
		copyStringPtr = XTclpAlloc(tls, uint32(uint64(int32(uintptr(0)+16))+uint64(copyMaxChars+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
		if copyStringPtr == uintptr(0) {
			copyMaxChars = (*String)(unsafe.Pointer(srcStringPtr)).FnumChars
			copyStringPtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+16))+uint64(copyMaxChars+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
		}
		(*String)(unsafe.Pointer(copyStringPtr)).FmaxChars = copyMaxChars
		libc.Xmemcpy(tls, copyStringPtr+16, srcStringPtr+16,
			uint64((*String)(unsafe.Pointer(srcStringPtr)).FnumChars)*uint64(unsafe.Sizeof(Tcl_UniChar(0))))
		*(*Tcl_UniChar)(unsafe.Pointer(copyStringPtr + 16 + uintptr((*String)(unsafe.Pointer(srcStringPtr)).FnumChars)*2)) = Tcl_UniChar(0)
	} else {
		copyStringPtr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+16))+uint64(0+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
		(*String)(unsafe.Pointer(copyStringPtr)).FmaxChars = 0
		*(*Tcl_UniChar)(unsafe.Pointer(copyStringPtr + 16)) = Tcl_UniChar(0)
	}
	(*String)(unsafe.Pointer(copyStringPtr)).FhasUnicode = (*String)(unsafe.Pointer(srcStringPtr)).FhasUnicode
	(*String)(unsafe.Pointer(copyStringPtr)).FnumChars = (*String)(unsafe.Pointer(srcStringPtr)).FnumChars

	// Tricky point: the string value was copied by generic object management
	// code, so it doesn't contain any extra bytes that might exist in the
	// source object.

	(*String)(unsafe.Pointer(copyStringPtr)).Fallocated = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(copyPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(copyPtr)).Flength
		}
		return 0
	}()

	*(*uintptr)(unsafe.Pointer(copyPtr + 32)) = copyStringPtr
	(*Tcl_Obj)(unsafe.Pointer(copyPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclStringType))
}

//----------------------------------------------------------------------
//
// SetStringFromAny --
//
//	Create an internal representation of type "String" for an object.
//
// Results:
//	This operation always succeeds and returns TCL_OK.
//
// Side effects:
//	Any old internal reputation for objPtr is freed and the internal
//	representation is set to "String".
//
//----------------------------------------------------------------------

func sSetStringFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclStringObj.c:3229:1: */
	if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(unsafe.Pointer(&XtclStringType)) {
		var stringPtr uintptr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+16))+uint64(0+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))

		// Convert whatever we have into an untyped value. Just A String.

		if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0) {
			XTcl_GetString(tls, objPtr)
		}
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0) {
			if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
			}
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		}

		// Create a basic String internalrep that just points to the UTF-8 string
		// already in place at objPtr->bytes.

		(*String)(unsafe.Pointer(stringPtr)).FnumChars = -1
		(*String)(unsafe.Pointer(stringPtr)).Fallocated = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
		(*String)(unsafe.Pointer(stringPtr)).FmaxChars = 0
		(*String)(unsafe.Pointer(stringPtr)).FhasUnicode = 0
		*(*uintptr)(unsafe.Pointer(objPtr + 32)) = stringPtr
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclStringType))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// UpdateStringOfString --
//
//	Update the string representation for an object whose internal
//	representation is "String".
//
// Results:
//	None.
//
// Side effects:
//	The object's string may be set by converting its Unicode represention
//	to UTF format.
//
//----------------------------------------------------------------------

func sUpdateStringOfString(tls *libc.TLS, objPtr uintptr) { /* tclStringObj.c:3277:1: */
	var stringPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	// This routine is only called when we need to generate the
	// string rep objPtr->bytes because it does not exist -- it is NULL.
	// In that circumstance, any lingering claim about the size of
	// memory pointed to by that NULL pointer is clearly bogus, and
	// needs a reset.

	(*String)(unsafe.Pointer(stringPtr)).Fallocated = 0

	if (*String)(unsafe.Pointer(stringPtr)).FnumChars == 0 {
		if 0 == 0 {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(0+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, XtclEmptyStringRep, uint64(0))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
		}

	} else {
		sExtendStringRepWithUnicode(tls, objPtr, stringPtr+16,
			(*String)(unsafe.Pointer(stringPtr)).FnumChars)
	}
}

func sExtendStringRepWithUnicode(tls *libc.TLS, objPtr uintptr, unicode uintptr, numChars int32) int32 { /* tclStringObj.c:3301:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// Pre-condition: this is the "string" Tcl_ObjType.

	var i int32
	var origLength int32
	var size int32
	var dst uintptr
	// var buf [4]int8 at bp+8, 4

	var stringPtr uintptr
	size = 0
	*(*[4]int8)(unsafe.Pointer(bp + 8 /* buf */)) = *(*[4]int8)(unsafe.Pointer(ts + 62397))
	stringPtr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if !(numChars < 0) {
		goto __1
	}
	numChars = sUnicodeLength(tls, unicode)
__1:
	;

	if !(numChars == 0) {
		goto __2
	}
	return 0
__2:
	;

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0)) {
		goto __3
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
__3:
	;
	size = libc.AssignInt32(&origLength, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength)

	// Quick cheap check in case we have more than enough room.

	if !(numChars <= (0x7fffffff-size)/TCL_UTF_MAX &&
		(*String)(unsafe.Pointer(stringPtr)).Fallocated >= size+numChars*TCL_UTF_MAX) {
		goto __4
	}
	goto copyBytes
__4:
	;

	i = 0
__5:
	if !(i < numChars && size >= 0) {
		goto __7
	}
	size = size + XTcl_UniCharToUtf(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(unicode + uintptr(i)*2))), bp+8)
	goto __6
__6:
	i++
	goto __5
	goto __7
__7:
	;
	if !(size < 0) {
		goto __8
	}
	XTcl_Panic(tls, ts+9934, libc.VaList(bp, 0x7fffffff))
__8:
	;

	// Grow space if needed.

	if !(size > (*String)(unsafe.Pointer(stringPtr)).Fallocated) {
		goto __9
	}
	sGrowStringBuffer(tls, objPtr, size, 1)
__9:
	;

copyBytes:
	dst = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes + uintptr(origLength)
	i = 0
__10:
	if !(i < numChars) {
		goto __12
	}
	dst += uintptr(XTcl_UniCharToUtf(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(unicode + uintptr(i)*2))), dst))
	goto __11
__11:
	i++
	goto __10
	goto __12
__12:
	;
	*(*int8)(unsafe.Pointer(dst)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = int32((int64(dst) - int64((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)) / 1)
	return numChars
}

//----------------------------------------------------------------------
//
// FreeStringInternalRep --
//
//	Deallocate the storage associated with a String data object's internal
//	representation.
//
// Results:
//	None.
//
// Side effects:
//	Frees memory.
//
//----------------------------------------------------------------------

func sFreeStringInternalRep(tls *libc.TLS, objPtr uintptr) { /* tclStringObj.c:3379:1: */
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(objPtr + 32)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// deprecated functions

// code-generating macros

// Remove macros that will interfere with the definitions below.

// See bug 510001: TclSockMinimumBuffers needs plat imp

func XTclBN_mp_set_ull(tls *libc.TLS, a uintptr, b Tcl_WideUInt) { /* tclStubInit.c:74:1: */
	var i int32 = 0
	for b != uint64(0) {
		*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(libc.PostIncInt32(&i, 1))*4)) = Mp_digit(b) & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1))
		if uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideUInt(0))) <= uint64(MP_DIGIT_BIT) {
			break
		}
		b >>= func() int32 {
			if uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideUInt(0))) <= uint64(MP_DIGIT_BIT) {
				return 0
			}
			return MP_DIGIT_BIT
		}()
	}
	(*Mp_int)(unsafe.Pointer(a)).Fused = i
	(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_ZPOS
	for ok := true; ok; ok = 0 != 0 {
		var zd_ int32 = (*Mp_int)(unsafe.Pointer(a)).Falloc - (*Mp_int)(unsafe.Pointer(a)).Fused
		var zm_ uintptr = (*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr((*Mp_int)(unsafe.Pointer(a)).Fused)*4
		for libc.PostDecInt32(&zd_, 1) > 0 {
			*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&zm_, 4))) = Mp_digit(0)
		}
	}
}

func XTclBN_mp_get_mag_ull(tls *libc.TLS, a uintptr) Tcl_WideUInt { /* tclStubInit.c:75:1: */
	var i uint32 = func() uint32 {
		if uint32((*Mp_int)(unsafe.Pointer(a)).Fused) < uint32((uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideUInt(0)))+uint64(MP_DIGIT_BIT)-uint64(1))/uint64(MP_DIGIT_BIT)) {
			return uint32((*Mp_int)(unsafe.Pointer(a)).Fused)
		}
		return uint32((uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideUInt(0))) + uint64(MP_DIGIT_BIT) - uint64(1)) / uint64(MP_DIGIT_BIT))
	}()
	var res Tcl_WideUInt = uint64(0)
	for libc.PostDecUint32(&i, 1) > 0 {
		res <<= func() int32 {
			if uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideUInt(0))) <= uint64(MP_DIGIT_BIT) {
				return 0
			}
			return MP_DIGIT_BIT
		}()
		res = res | Tcl_WideUInt(*(*Mp_digit)(unsafe.Pointer((*Mp_int)(unsafe.Pointer(a)).Fdp + uintptr(i)*4)))
		if uint64(8)*Size_t(unsafe.Sizeof(Tcl_WideUInt(0))) <= uint64(MP_DIGIT_BIT) {
			break
		}
	}
	return res
}

func XTclBN_mp_set_ll(tls *libc.TLS, a uintptr, b Tcl_WideInt) { /* tclStubInit.c:76:1: */
	XTclBN_mp_set_ull(tls, a, func() uint64 {
		if b < int64(0) {
			return -Tcl_WideUInt(b)
		}
		return Tcl_WideUInt(b)
	}())
	if b < int64(0) {
		(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_NEG
	}
}

func XTclBN_mp_set_int(tls *libc.TLS, a uintptr, i uint32) Mp_err { /* tclStubInit.c:79:8: */
	XTclBN_mp_set_ull(tls, a, uint64(i))
	return MP_OKAY
}

func XTclBN_mp_init_set_int(tls *libc.TLS, a uintptr, i uint32) Mp_err { /* tclStubInit.c:85:8: */
	var result Mp_err = XTclBN_mp_init(tls, a)
	if result == MP_OKAY {
		XTclBN_mp_set_ull(tls, a, uint64(i))
	}
	return result
}

func XTclBN_mp_expt_d_ex(tls *libc.TLS, a uintptr, b Mp_digit, c uintptr, fast int32) int32 { /* tclStubInit.c:94:5: */
	return XTclBN_mp_expt_d(tls, a, b, c)
}

func sTclBNMpDivLd(tls *libc.TLS, a uintptr, b Tcl_WideUInt, c uintptr, d uintptr) Mp_err { /* tclStubInit.c:100:15: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var result Mp_err
	// var d2 Mp_digit at bp, 4

	if b|libc.Uint64FromUint32(libc.Uint32FromInt32(-1)) != libc.Uint64FromUint32(libc.Uint32FromInt32(-1)) {
		return -3
	}
	result = XTclBN_mp_div_d(tls, a, Mp_digit(b), c, func() uintptr {
		if d != 0 {
			return bp
		}
		return uintptr(0)
	}())
	if d != 0 {
		*(*Tcl_WideUInt)(unsafe.Pointer(d)) = Tcl_WideUInt(*(*Mp_digit)(unsafe.Pointer(bp /* d2 */)))
	}
	return result
}

func setStartupScriptPath(tls *libc.TLS, path uintptr) { /* tclStubInit.c:115:13: */
	XTcl_SetStartupScript(tls, path, uintptr(0))
}

func getStartupScriptPath(tls *libc.TLS) uintptr { /* tclStubInit.c:120:16: */
	return XTcl_GetStartupScript(tls, uintptr(0))
}

func setStartupScriptFileName(tls *libc.TLS, fileName uintptr) { /* tclStubInit.c:125:13: */
	XTcl_SetStartupScript(tls, XTcl_NewStringObj(tls, fileName, -1), uintptr(0))
}

func getStartupScriptFileName(tls *libc.TLS) uintptr { /* tclStubInit.c:131:19: */
	var path uintptr = XTcl_GetStartupScript(tls, uintptr(0))
	if path == uintptr(0) {
		return uintptr(0)
	}
	return XTcl_GetString(tls, path)
}

func winNToHS(tls *libc.TLS, ns uint16) uint16 { /* tclStubInit.c:143:23: */
	return libc.Xntohs(tls, ns)
}

func XTclBN_mp_to_unsigned_bin(tls *libc.TLS, a uintptr, b uintptr) Mp_err { /* tclStubInit.c:448:8: */
	return XTclBN_mp_to_ubin(tls, a, b, uint64(0x7fffffff), uintptr(0))
}

func XTclBN_mp_to_unsigned_bin_n(tls *libc.TLS, a uintptr, b uintptr, outlen uintptr) Mp_err { /* tclStubInit.c:453:8: */
	var n Size_t = XTclBN_mp_unsigned_bin_size(tls, a)
	if *(*uint32)(unsafe.Pointer(outlen)) < uint32(n) {
		return -3
	}
	*(*uint32)(unsafe.Pointer(outlen)) = uint32(n)
	return XTclBN_mp_to_ubin(tls, a, b, n, uintptr(0))
}

func XTclBN_mp_toradix_n(tls *libc.TLS, a uintptr, str uintptr, radix int32, maxlen int32) Mp_err { /* tclStubInit.c:463:8: */
	if maxlen < 0 {
		return -3
	}
	return XTclBN_mp_to_radix(tls, a, str, uint64(maxlen), uintptr(0), radix)
}

func XTclBN_reverse(tls *libc.TLS, s uintptr, len int32) { /* tclStubInit.c:471:6: */
	if len > 0 {
		XTclBN_s_mp_reverse(tls, s, Size_t(len))
	}
}

// !BEGIN!: Do not edit below this line.

var tclIntStubs = TclIntStubs{
	Fmagic:                        libc.Int32FromUint32(0xFCA3BACF),
	FtclAllocateFreeObjects:       0, // 4
	FtclCleanupChildren:           0, // 5
	FtclCleanupCommand:            0, // 6
	FtclCopyAndCollapse:           0, // 7
	FtclCopyChannelOld:            0, // 8
	FtclCreatePipeline:            0, // 9
	FtclCreateProc:                0, // 10
	FtclDeleteCompiledLocalVars:   0, // 11
	FtclDeleteVars:                0, // 13
	FtclDumpMemoryInfo:            0, // 15
	FtclExprFloatError:            0, // 21
	FtclFindElement:               0, // 22
	FtclFindProc:                  0, // 23
	FtclFormatInt:                 0, // 24
	FtclFreePackageInfo:           0, // 27
	FtclpGetDefaultStdChannel:     0, // 30
	FtclGetExtension:              0, // 31
	FtclGetFrame:                  0, // 33
	FtclGetIntForIndex:            0, // 36
	FtclGetLoadedPackages:         0, // 37
	FtclGetNamespaceForQualName:   0, // 38
	FtclGetObjInterpProc:          0, // 39
	FtclGetOpenMode:               0, // 40
	FtclGetOriginalCommand:        0, // 41
	FtclpGetUserHome:              0, // 43
	FtclGuessPackageName:          0, // 44
	FtclHideUnsafeCommands:        0, // 45
	FtclInExit:                    0, // 49
	FtclInitCompiledLocals:        0, // 50
	FtclInterpInit:                0, // 52
	FtclInvokeObjectCommand:       0, // 53
	FtclInvokeStringCommand:       0, // 54
	FtclIsProc:                    0, // 57
	FtclLookupVar:                 0, // 59
	FtclNeedSpace:                 0, // 60
	FtclNewProcBodyObj:            0, // 61
	FtclObjCommandComplete:        0, // 62
	FtclObjInterpProc:             0, // 63
	FtclObjInvoke:                 0, // 68
	FtclpAlloc:                    0, // 73
	FtclpFree:                     0, // 74
	FtclpGetClicks:                0, // 75
	FtclpGetSeconds:               0, // 76
	FtclpGetTime:                  0, // 80
	FtclpRealloc:                  0, // 87
	FtclPrecTraceProc:             0, // 88
	FtclPreventAliasLoop:          0, // 90
	FtclProcCleanupProc:           0, // 91
	FtclProcCompileProc:           0, // 92
	FtclProcDeleteProc:            0, // 95
	FtclRenameCommand:             0, // 96
	FtclResetShadowedCmdRefs:      0, // 97
	FtclServiceIdle:               0, // 100
	FtclSetPreInitScript:          0, // 101
	FtclSetupEnv:                  0, // 102
	FtclSockGetPort:               0, // 107
	FtclTeardownNamespace:         0, // 108
	FtclUpdateReturnInfo:          0, // 109
	FtclSockMinimumBuffers:        0, // 110
	Ftcl_AddInterpResolvers:       0, // 111
	Ftcl_AppendExportList:         0, // 112
	Ftcl_CreateNamespace:          0, // 113
	Ftcl_DeleteNamespace:          0, // 114
	Ftcl_Export:                   0, // 115
	Ftcl_FindCommand:              0, // 116
	Ftcl_FindNamespace:            0, // 117
	Ftcl_GetInterpResolvers:       0, // 118
	Ftcl_GetNamespaceResolvers:    0, // 119
	Ftcl_FindNamespaceVar:         0, // 120
	Ftcl_ForgetImport:             0, // 121
	Ftcl_GetCommandFromObj:        0, // 122
	Ftcl_GetCommandFullName:       0, // 123
	Ftcl_GetCurrentNamespace:      0, // 124
	Ftcl_GetGlobalNamespace:       0, // 125
	Ftcl_GetVariableFullName:      0, // 126
	Ftcl_Import:                   0, // 127
	Ftcl_PopCallFrame:             0, // 128
	Ftcl_PushCallFrame:            0, // 129
	Ftcl_RemoveInterpResolvers:    0, // 130
	Ftcl_SetNamespaceResolvers:    0, // 131
	FtclpHasSockets:               0, // 132
	FtclpGetDate:                  0, // 137
	FtclGetEnv:                    0, // 140
	FtclpGetCwd:                   0, // 141
	FtclSetByteCodeFromAny:        0, // 142
	FtclAddLiteralObj:             0, // 143
	FtclHideLiteral:               0, // 144
	FtclGetAuxDataType:            0, // 145
	FtclHandleCreate:              0, // 146
	FtclHandleFree:                0, // 147
	FtclHandlePreserve:            0, // 148
	FtclHandleRelease:             0, // 149
	FtclRegAbout:                  0, // 150
	FtclRegExpRangeUniChar:        0, // 151
	FtclSetLibraryPath:            0, // 152
	FtclGetLibraryPath:            0, // 155
	FtclRegError:                  0, // 156
	FtclVarTraceExists:            0, // 157
	FtclSetStartupScriptFileName:  0, // 158
	FtclGetStartupScriptFileName:  0, // 160
	FtclChannelTransform:          0, // 161
	FtclChannelEventScriptInvoker: 0, // 162
	FtclGetInstructionTable:       0, // 163
	FtclExpandCodeArray:           0, // 164
	FtclpSetInitialEncodings:      0, // 165
	FtclListObjSetElement:         0, // 166
	FtclSetStartupScriptPath:      0, // 167
	FtclGetStartupScriptPath:      0, // 168
	FtclpUtfNcmp2:                 0, // 169
	FtclCheckInterpTraces:         0, // 170
	FtclCheckExecutionTraces:      0, // 171
	FtclInThreadExit:              0, // 172
	FtclUniCharMatch:              0, // 174
	FtclCallVarTraces:             0, // 175
	FtclCleanupVar:                0, // 176
	FtclVarErrMsg:                 0, // 177
	Ftcl_SetStartupScript:         0, // 178
	Ftcl_GetStartupScript:         0, // 181
	FtclpLocaltime:                0, // 182
	FtclpGmtime:                   0, // 197
	FtclObjGetFrame:               0, // 199
	FtclpObjRemoveDirectory:       0, // 200
	FtclpObjCopyDirectory:         0, // 201
	FtclpObjCreateDirectory:       0, // 202
	FtclpObjDeleteFile:            0, // 203
	FtclpObjCopyFile:              0, // 204
	FtclpObjRenameFile:            0, // 205
	FtclpObjStat:                  0, // 206
	FtclpObjAccess:                0, // 207
	FtclpOpenFileChannel:          0, // 211
	FtclpFindExecutable:           0, // 212
	FtclGetObjNameOfExecutable:    0, // 213
	FtclSetObjNameOfExecutable:    0, // 214
	FtclStackAlloc:                0, // 215
	FtclStackFree:                 0, // 216
	FtclPushStackFrame:            0, // 217
	FtclPopStackFrame:             0, // 223
	FtclGetPlatform:               0, // 224
	FtclTraceDictPath:             0, // 225
	FtclObjBeingDeleted:           0, // 226
	FtclSetNsPath:                 0, // 228
	FtclPtrMakeUpvar:              0, // 229
	FtclObjLookupVar:              0, // 230
	FtclGetNamespaceFromObj:       0, // 231
	FtclEvalObjEx:                 0, // 232
	FtclGetSrcInfoForPc:           0, // 233
	FtclVarHashCreateVar:          0, // 234
	FtclInitVarHashTable:          0, // 235
	FtclBackgroundException:       0, // 236
	FtclResetCancellation:         0, // 237
	FtclNRInterpProc:              0, // 238
	FtclNRInterpProcCore:          0, // 239
	FtclNRRunCallbacks:            0, // 240
	FtclNREvalObjEx:               0, // 241
	FtclNREvalObjv:                0, // 242
	FtclDbDumpActiveObjects:       0, // 243
	FtclGetNamespaceChildTable:    0, // 244
	FtclGetNamespaceCommandTable:  0, // 245
	FtclInitRewriteEnsemble:       0, // 246
	FtclResetRewriteEnsemble:      0, // 247
	FtclCopyChannel:               0, // 248
	FtclDoubleDigits:              0, // 249
	FtclSetSlaveCancelFlags:       0, // 250
	FtclRegisterLiteral:           0, // 251
	FtclPtrGetVar:                 0, // 252
	FtclPtrSetVar:                 0, // 253
	FtclPtrIncrObjVar:             0, // 254
	FtclPtrObjMakeUpvar:           0, // 255
	FtclPtrUnsetVar:               0, // 256
	FtclStaticPackage:             0, // 260
} /* tclStubInit.c:489:26 */

var tclIntPlatStubs = TclIntPlatStubs{
	Fmagic:                    libc.Int32FromUint32(0xFCA3BACF),
	FtclWinConvertError:       0, // 0
	FtclWinConvertWSAError:    0, // 1
	FtclWinGetServByName:      0, // 2
	FtclWinGetSockOpt:         0, // 3
	FtclWinGetTclInstance:     0, // 5
	FtclWinNToHS:              0, // 6
	FtclWinSetSockOpt:         0, // 7
	FtclpGetPid:               0, // 8
	FtclWinGetPlatformId:      0, // 10
	FtclGetAndDetachPids:      0, // 11
	FtclpCloseFile:            0, // 12
	FtclpCreateCommandChannel: 0, // 13
	FtclpCreatePipe:           0, // 14
	FtclpCreateProcess:        0, // 17
	FtclpMakeFile:             0, // 18
	FtclpOpenFile:             0, // 19
	FtclWinAddProcess:         0, // 20
	FtclpInetNtoa:             0, // 21
	FtclpCreateTempFile:       0, // 23
	FtclWinNoBackslash:        0, // 25
	FtclWinSetInterfaces:      0, // 26
	FtclWinFlushDirtyChannels: 0, // 27
	FtclWinResetInterfaces:    0, // 28
	FtclWinCPUID:              0, // 30
} /* tclStubInit.c:755:30 */

var tclPlatStubs = TclPlatStubs{
	Fmagic:             libc.Int32FromUint32(0xFCA3BACF),
	Ftcl_WinUtfToTChar: 0, // 0
	Ftcl_WinTCharToUtf: 0, // 1
} /* tclStubInit.c:859:27 */

var XtclTomMathStubs = TclTomMathStubs{
	Fmagic:                       libc.Int32FromUint32(0xFCA3BACF),
	FtclBN_epoch:                 0, // 0
	FtclBN_revision:              0, // 1
	FtclBN_mp_add:                0, // 2
	FtclBN_mp_add_d:              0, // 3
	FtclBN_mp_and:                0, // 4
	FtclBN_mp_clamp:              0, // 5
	FtclBN_mp_clear:              0, // 6
	FtclBN_mp_clear_multi:        0, // 7
	FtclBN_mp_cmp:                0, // 8
	FtclBN_mp_cmp_d:              0, // 9
	FtclBN_mp_cmp_mag:            0, // 10
	FtclBN_mp_copy:               0, // 11
	FtclBN_mp_count_bits:         0, // 12
	FtclBN_mp_div:                0, // 13
	FtclBN_mp_div_d:              0, // 14
	FtclBN_mp_div_2:              0, // 15
	FtclBN_mp_div_2d:             0, // 16
	FtclBN_mp_div_3:              0, // 17
	FtclBN_mp_exch:               0, // 18
	FtclBN_mp_expt_d:             0, // 19
	FtclBN_mp_grow:               0, // 20
	FtclBN_mp_init:               0, // 21
	FtclBN_mp_init_copy:          0, // 22
	FtclBN_mp_init_multi:         0, // 23
	FtclBN_mp_init_set:           0, // 24
	FtclBN_mp_init_size:          0, // 25
	FtclBN_mp_lshd:               0, // 26
	FtclBN_mp_mod:                0, // 27
	FtclBN_mp_mod_2d:             0, // 28
	FtclBN_mp_mul:                0, // 29
	FtclBN_mp_mul_d:              0, // 30
	FtclBN_mp_mul_2:              0, // 31
	FtclBN_mp_mul_2d:             0, // 32
	FtclBN_mp_neg:                0, // 33
	FtclBN_mp_or:                 0, // 34
	FtclBN_mp_radix_size:         0, // 35
	FtclBN_mp_read_radix:         0, // 36
	FtclBN_mp_rshd:               0, // 37
	FtclBN_mp_shrink:             0, // 38
	FtclBN_mp_set:                0, // 39
	FtclBN_mp_sqr:                0, // 40
	FtclBN_mp_sqrt:               0, // 41
	FtclBN_mp_sub:                0, // 42
	FtclBN_mp_sub_d:              0, // 43
	FtclBN_mp_to_unsigned_bin:    0, // 44
	FtclBN_mp_to_unsigned_bin_n:  0, // 45
	FtclBN_mp_toradix_n:          0, // 46
	FtclBN_mp_unsigned_bin_size:  0, // 47
	FtclBN_mp_xor:                0, // 48
	FtclBN_mp_zero:               0, // 49
	FtclBN_reverse:               0, // 50
	FtclBN_fast_s_mp_mul_digs:    0, // 51
	FtclBN_fast_s_mp_sqr:         0, // 52
	FtclBN_mp_karatsuba_mul:      0, // 53
	FtclBN_mp_karatsuba_sqr:      0, // 54
	FtclBN_mp_toom_mul:           0, // 55
	FtclBN_mp_toom_sqr:           0, // 56
	FtclBN_s_mp_add:              0, // 57
	FtclBN_s_mp_mul_digs:         0, // 58
	FtclBN_s_mp_sqr:              0, // 59
	FtclBN_s_mp_sub:              0, // 60
	FtclBN_mp_init_set_int:       0, // 61
	FtclBN_mp_set_int:            0, // 62
	FtclBN_mp_cnt_lsb:            0, // 63
	FtclBNInitBignumFromLong:     0, // 64
	FtclBNInitBignumFromWideInt:  0, // 65
	FtclBNInitBignumFromWideUInt: 0, // 66
	FtclBN_mp_expt_d_ex:          0, // 67
	FtclBN_mp_set_ull:            0, // 68
	FtclBN_mp_get_mag_ull:        0, // 69
	FtclBN_mp_set_ll:             0, // 72
	FtclBN_mp_tc_and:             0, // 73
	FtclBN_mp_tc_or:              0, // 74
	FtclBN_mp_tc_xor:             0, // 75
	FtclBN_mp_signed_rsh:         0, // 77
	FtclBN_mp_to_ubin:            0, // 78
	FtclBN_mp_div_ld:             0, // 79
	FtclBN_mp_to_radix:           0, // 80
} /* tclStubInit.c:873:23 */

var tclStubHooks = TclStubHooks{
	FtclPlatStubs:    0,
	FtclIntStubs:     0,
	FtclIntPlatStubs: 0,
} /* tclStubInit.c:959:27 */

var XtclStubs = TclStubs{
	Fmagic:                                  libc.Int32FromUint32(0xFCA3BACF),
	Fhooks:                                  0,
	Ftcl_PkgProvideEx:                       0, // 0
	Ftcl_PkgRequireEx:                       0, // 1
	Ftcl_Panic:                              0, // 2
	Ftcl_Alloc:                              0, // 3
	Ftcl_Free:                               0, // 4
	Ftcl_Realloc:                            0, // 5
	Ftcl_DbCkalloc:                          0, // 6
	Ftcl_DbCkfree:                           0, // 7
	Ftcl_DbCkrealloc:                        0, // 10
	Ftcl_SetTimer:                           0, // 11
	Ftcl_Sleep:                              0, // 12
	Ftcl_WaitForEvent:                       0, // 13
	Ftcl_AppendAllObjTypes:                  0, // 14
	Ftcl_AppendStringsToObj:                 0, // 15
	Ftcl_AppendToObj:                        0, // 16
	Ftcl_ConcatObj:                          0, // 17
	Ftcl_ConvertToType:                      0, // 18
	Ftcl_DbDecrRefCount:                     0, // 19
	Ftcl_DbIncrRefCount:                     0, // 20
	Ftcl_DbIsShared:                         0, // 21
	Ftcl_DbNewBooleanObj:                    0, // 22
	Ftcl_DbNewByteArrayObj:                  0, // 23
	Ftcl_DbNewDoubleObj:                     0, // 24
	Ftcl_DbNewListObj:                       0, // 25
	Ftcl_DbNewLongObj:                       0, // 26
	Ftcl_DbNewObj:                           0, // 27
	Ftcl_DbNewStringObj:                     0, // 28
	Ftcl_DuplicateObj:                       0, // 29
	FtclFreeObj:                             0, // 30
	Ftcl_GetBoolean:                         0, // 31
	Ftcl_GetBooleanFromObj:                  0, // 32
	Ftcl_GetByteArrayFromObj:                0, // 33
	Ftcl_GetDouble:                          0, // 34
	Ftcl_GetDoubleFromObj:                   0, // 35
	Ftcl_GetIndexFromObj:                    0, // 36
	Ftcl_GetInt:                             0, // 37
	Ftcl_GetIntFromObj:                      0, // 38
	Ftcl_GetLongFromObj:                     0, // 39
	Ftcl_GetObjType:                         0, // 40
	Ftcl_GetStringFromObj:                   0, // 41
	Ftcl_InvalidateStringRep:                0, // 42
	Ftcl_ListObjAppendList:                  0, // 43
	Ftcl_ListObjAppendElement:               0, // 44
	Ftcl_ListObjGetElements:                 0, // 45
	Ftcl_ListObjIndex:                       0, // 46
	Ftcl_ListObjLength:                      0, // 47
	Ftcl_ListObjReplace:                     0, // 48
	Ftcl_NewBooleanObj:                      0, // 49
	Ftcl_NewByteArrayObj:                    0, // 50
	Ftcl_NewDoubleObj:                       0, // 51
	Ftcl_NewIntObj:                          0, // 52
	Ftcl_NewListObj:                         0, // 53
	Ftcl_NewLongObj:                         0, // 54
	Ftcl_NewObj:                             0, // 55
	Ftcl_NewStringObj:                       0, // 56
	Ftcl_SetBooleanObj:                      0, // 57
	Ftcl_SetByteArrayLength:                 0, // 58
	Ftcl_SetByteArrayObj:                    0, // 59
	Ftcl_SetDoubleObj:                       0, // 60
	Ftcl_SetIntObj:                          0, // 61
	Ftcl_SetListObj:                         0, // 62
	Ftcl_SetLongObj:                         0, // 63
	Ftcl_SetObjLength:                       0, // 64
	Ftcl_SetStringObj:                       0, // 65
	Ftcl_AddErrorInfo:                       0, // 66
	Ftcl_AddObjErrorInfo:                    0, // 67
	Ftcl_AllowExceptions:                    0, // 68
	Ftcl_AppendElement:                      0, // 69
	Ftcl_AppendResult:                       0, // 70
	Ftcl_AsyncCreate:                        0, // 71
	Ftcl_AsyncDelete:                        0, // 72
	Ftcl_AsyncInvoke:                        0, // 73
	Ftcl_AsyncMark:                          0, // 74
	Ftcl_AsyncReady:                         0, // 75
	Ftcl_BackgroundError:                    0, // 76
	Ftcl_Backslash:                          0, // 77
	Ftcl_BadChannelOption:                   0, // 78
	Ftcl_CallWhenDeleted:                    0, // 79
	Ftcl_CancelIdleCall:                     0, // 80
	Ftcl_Close:                              0, // 81
	Ftcl_CommandComplete:                    0, // 82
	Ftcl_Concat:                             0, // 83
	Ftcl_ConvertElement:                     0, // 84
	Ftcl_ConvertCountedElement:              0, // 85
	Ftcl_CreateAlias:                        0, // 86
	Ftcl_CreateAliasObj:                     0, // 87
	Ftcl_CreateChannel:                      0, // 88
	Ftcl_CreateChannelHandler:               0, // 89
	Ftcl_CreateCloseHandler:                 0, // 90
	Ftcl_CreateCommand:                      0, // 91
	Ftcl_CreateEventSource:                  0, // 92
	Ftcl_CreateExitHandler:                  0, // 93
	Ftcl_CreateInterp:                       0, // 94
	Ftcl_CreateMathFunc:                     0, // 95
	Ftcl_CreateObjCommand:                   0, // 96
	Ftcl_CreateSlave:                        0, // 97
	Ftcl_CreateTimerHandler:                 0, // 98
	Ftcl_CreateTrace:                        0, // 99
	Ftcl_DeleteAssocData:                    0, // 100
	Ftcl_DeleteChannelHandler:               0, // 101
	Ftcl_DeleteCloseHandler:                 0, // 102
	Ftcl_DeleteCommand:                      0, // 103
	Ftcl_DeleteCommandFromToken:             0, // 104
	Ftcl_DeleteEvents:                       0, // 105
	Ftcl_DeleteEventSource:                  0, // 106
	Ftcl_DeleteExitHandler:                  0, // 107
	Ftcl_DeleteHashEntry:                    0, // 108
	Ftcl_DeleteHashTable:                    0, // 109
	Ftcl_DeleteInterp:                       0, // 110
	Ftcl_DetachPids:                         0, // 111
	Ftcl_DeleteTimerHandler:                 0, // 112
	Ftcl_DeleteTrace:                        0, // 113
	Ftcl_DontCallWhenDeleted:                0, // 114
	Ftcl_DoOneEvent:                         0, // 115
	Ftcl_DoWhenIdle:                         0, // 116
	Ftcl_DStringAppend:                      0, // 117
	Ftcl_DStringAppendElement:               0, // 118
	Ftcl_DStringEndSublist:                  0, // 119
	Ftcl_DStringFree:                        0, // 120
	Ftcl_DStringGetResult:                   0, // 121
	Ftcl_DStringInit:                        0, // 122
	Ftcl_DStringResult:                      0, // 123
	Ftcl_DStringSetLength:                   0, // 124
	Ftcl_DStringStartSublist:                0, // 125
	Ftcl_Eof:                                0, // 126
	Ftcl_ErrnoId:                            0, // 127
	Ftcl_ErrnoMsg:                           0, // 128
	Ftcl_Eval:                               0, // 129
	Ftcl_EvalFile:                           0, // 130
	Ftcl_EvalObj:                            0, // 131
	Ftcl_EventuallyFree:                     0, // 132
	Ftcl_Exit:                               0, // 133
	Ftcl_ExposeCommand:                      0, // 134
	Ftcl_ExprBoolean:                        0, // 135
	Ftcl_ExprBooleanObj:                     0, // 136
	Ftcl_ExprDouble:                         0, // 137
	Ftcl_ExprDoubleObj:                      0, // 138
	Ftcl_ExprLong:                           0, // 139
	Ftcl_ExprLongObj:                        0, // 140
	Ftcl_ExprObj:                            0, // 141
	Ftcl_ExprString:                         0, // 142
	Ftcl_Finalize:                           0, // 143
	Ftcl_FindExecutable:                     0, // 144
	Ftcl_FirstHashEntry:                     0, // 145
	Ftcl_Flush:                              0, // 146
	Ftcl_FreeResult:                         0, // 147
	Ftcl_GetAlias:                           0, // 148
	Ftcl_GetAliasObj:                        0, // 149
	Ftcl_GetAssocData:                       0, // 150
	Ftcl_GetChannel:                         0, // 151
	Ftcl_GetChannelBufferSize:               0, // 152
	Ftcl_GetChannelHandle:                   0, // 153
	Ftcl_GetChannelInstanceData:             0, // 154
	Ftcl_GetChannelMode:                     0, // 155
	Ftcl_GetChannelName:                     0, // 156
	Ftcl_GetChannelOption:                   0, // 157
	Ftcl_GetChannelType:                     0, // 158
	Ftcl_GetCommandInfo:                     0, // 159
	Ftcl_GetCommandName:                     0, // 160
	Ftcl_GetErrno:                           0, // 161
	Ftcl_GetHostName:                        0, // 162
	Ftcl_GetInterpPath:                      0, // 163
	Ftcl_GetMaster:                          0, // 164
	Ftcl_GetNameOfExecutable:                0, // 165
	Ftcl_GetObjResult:                       0, // 167
	Ftcl_GetPathType:                        0, // 168
	Ftcl_Gets:                               0, // 169
	Ftcl_GetsObj:                            0, // 170
	Ftcl_GetServiceMode:                     0, // 171
	Ftcl_GetSlave:                           0, // 172
	Ftcl_GetStdChannel:                      0, // 173
	Ftcl_GetStringResult:                    0, // 174
	Ftcl_GetVar:                             0, // 175
	Ftcl_GetVar2:                            0, // 176
	Ftcl_GlobalEval:                         0, // 177
	Ftcl_GlobalEvalObj:                      0, // 178
	Ftcl_HideCommand:                        0, // 179
	Ftcl_Init:                               0, // 180
	Ftcl_InitHashTable:                      0, // 181
	Ftcl_InputBlocked:                       0, // 182
	Ftcl_InputBuffered:                      0, // 183
	Ftcl_InterpDeleted:                      0, // 184
	Ftcl_IsSafe:                             0, // 185
	Ftcl_JoinPath:                           0, // 186
	Ftcl_LinkVar:                            0, // 188
	Ftcl_MakeFileChannel:                    0, // 189
	Ftcl_MakeSafe:                           0, // 190
	Ftcl_MakeTcpClientChannel:               0, // 191
	Ftcl_Merge:                              0, // 192
	Ftcl_NextHashEntry:                      0, // 193
	Ftcl_NotifyChannel:                      0, // 194
	Ftcl_ObjGetVar2:                         0, // 195
	Ftcl_ObjSetVar2:                         0, // 196
	Ftcl_OpenCommandChannel:                 0, // 197
	Ftcl_OpenFileChannel:                    0, // 198
	Ftcl_OpenTcpClient:                      0, // 199
	Ftcl_OpenTcpServer:                      0, // 200
	Ftcl_Preserve:                           0, // 201
	Ftcl_PrintDouble:                        0, // 202
	Ftcl_PutEnv:                             0, // 203
	Ftcl_PosixError:                         0, // 204
	Ftcl_QueueEvent:                         0, // 205
	Ftcl_Read:                               0, // 206
	Ftcl_ReapDetachedProcs:                  0, // 207
	Ftcl_RecordAndEval:                      0, // 208
	Ftcl_RecordAndEvalObj:                   0, // 209
	Ftcl_RegisterChannel:                    0, // 210
	Ftcl_RegisterObjType:                    0, // 211
	Ftcl_RegExpCompile:                      0, // 212
	Ftcl_RegExpExec:                         0, // 213
	Ftcl_RegExpMatch:                        0, // 214
	Ftcl_RegExpRange:                        0, // 215
	Ftcl_Release:                            0, // 216
	Ftcl_ResetResult:                        0, // 217
	Ftcl_ScanElement:                        0, // 218
	Ftcl_ScanCountedElement:                 0, // 219
	Ftcl_SeekOld:                            0, // 220
	Ftcl_ServiceAll:                         0, // 221
	Ftcl_ServiceEvent:                       0, // 222
	Ftcl_SetAssocData:                       0, // 223
	Ftcl_SetChannelBufferSize:               0, // 224
	Ftcl_SetChannelOption:                   0, // 225
	Ftcl_SetCommandInfo:                     0, // 226
	Ftcl_SetErrno:                           0, // 227
	Ftcl_SetErrorCode:                       0, // 228
	Ftcl_SetMaxBlockTime:                    0, // 229
	Ftcl_SetPanicProc:                       0, // 230
	Ftcl_SetRecursionLimit:                  0, // 231
	Ftcl_SetResult:                          0, // 232
	Ftcl_SetServiceMode:                     0, // 233
	Ftcl_SetObjErrorCode:                    0, // 234
	Ftcl_SetObjResult:                       0, // 235
	Ftcl_SetStdChannel:                      0, // 236
	Ftcl_SetVar:                             0, // 237
	Ftcl_SetVar2:                            0, // 238
	Ftcl_SignalId:                           0, // 239
	Ftcl_SignalMsg:                          0, // 240
	Ftcl_SourceRCFile:                       0, // 241
	Ftcl_SplitList:                          0, // 242
	Ftcl_SplitPath:                          0, // 243
	Ftcl_StaticPackage:                      0, // 244
	Ftcl_StringMatch:                        0, // 245
	Ftcl_TellOld:                            0, // 246
	Ftcl_TraceVar:                           0, // 247
	Ftcl_TraceVar2:                          0, // 248
	Ftcl_TranslateFileName:                  0, // 249
	Ftcl_Ungets:                             0, // 250
	Ftcl_UnlinkVar:                          0, // 251
	Ftcl_UnregisterChannel:                  0, // 252
	Ftcl_UnsetVar:                           0, // 253
	Ftcl_UnsetVar2:                          0, // 254
	Ftcl_UntraceVar:                         0, // 255
	Ftcl_UntraceVar2:                        0, // 256
	Ftcl_UpdateLinkedVar:                    0, // 257
	Ftcl_UpVar:                              0, // 258
	Ftcl_UpVar2:                             0, // 259
	Ftcl_VarEval:                            0, // 260
	Ftcl_VarTraceInfo:                       0, // 261
	Ftcl_VarTraceInfo2:                      0, // 262
	Ftcl_Write:                              0, // 263
	Ftcl_WrongNumArgs:                       0, // 264
	Ftcl_DumpActiveMemory:                   0, // 265
	Ftcl_ValidateAllMemory:                  0, // 266
	Ftcl_AppendResultVA:                     0, // 267
	Ftcl_AppendStringsToObjVA:               0, // 268
	Ftcl_HashStats:                          0, // 269
	Ftcl_ParseVar:                           0, // 270
	Ftcl_PkgPresent:                         0, // 271
	Ftcl_PkgPresentEx:                       0, // 272
	Ftcl_PkgProvide:                         0, // 273
	Ftcl_PkgRequire:                         0, // 274
	Ftcl_SetErrorCodeVA:                     0, // 275
	Ftcl_VarEvalVA:                          0, // 276
	Ftcl_WaitPid:                            0, // 277
	Ftcl_PanicVA:                            0, // 278
	Ftcl_GetVersion:                         0, // 279
	Ftcl_InitMemory:                         0, // 280
	Ftcl_StackChannel:                       0, // 281
	Ftcl_UnstackChannel:                     0, // 282
	Ftcl_GetStackedChannel:                  0, // 283
	Ftcl_SetMainLoop:                        0, // 285
	Ftcl_AppendObjToObj:                     0, // 286
	Ftcl_CreateEncoding:                     0, // 287
	Ftcl_CreateThreadExitHandler:            0, // 288
	Ftcl_DeleteThreadExitHandler:            0, // 289
	Ftcl_DiscardResult:                      0, // 290
	Ftcl_EvalEx:                             0, // 291
	Ftcl_EvalObjv:                           0, // 292
	Ftcl_EvalObjEx:                          0, // 293
	Ftcl_ExitThread:                         0, // 294
	Ftcl_ExternalToUtf:                      0, // 295
	Ftcl_ExternalToUtfDString:               0, // 296
	Ftcl_FinalizeThread:                     0, // 297
	Ftcl_FinalizeNotifier:                   0, // 298
	Ftcl_FreeEncoding:                       0, // 299
	Ftcl_GetCurrentThread:                   0, // 300
	Ftcl_GetEncoding:                        0, // 301
	Ftcl_GetEncodingName:                    0, // 302
	Ftcl_GetEncodingNames:                   0, // 303
	Ftcl_GetIndexFromObjStruct:              0, // 304
	Ftcl_GetThreadData:                      0, // 305
	Ftcl_GetVar2Ex:                          0, // 306
	Ftcl_InitNotifier:                       0, // 307
	Ftcl_MutexLock:                          0, // 308
	Ftcl_MutexUnlock:                        0, // 309
	Ftcl_ConditionNotify:                    0, // 310
	Ftcl_ConditionWait:                      0, // 311
	Ftcl_NumUtfChars:                        0, // 312
	Ftcl_ReadChars:                          0, // 313
	Ftcl_RestoreResult:                      0, // 314
	Ftcl_SaveResult:                         0, // 315
	Ftcl_SetSystemEncoding:                  0, // 316
	Ftcl_SetVar2Ex:                          0, // 317
	Ftcl_ThreadAlert:                        0, // 318
	Ftcl_ThreadQueueEvent:                   0, // 319
	Ftcl_UniCharAtIndex:                     0, // 320
	Ftcl_UniCharToLower:                     0, // 321
	Ftcl_UniCharToTitle:                     0, // 322
	Ftcl_UniCharToUpper:                     0, // 323
	Ftcl_UniCharToUtf:                       0, // 324
	Ftcl_UtfAtIndex:                         0, // 325
	Ftcl_UtfCharComplete:                    0, // 326
	Ftcl_UtfBackslash:                       0, // 327
	Ftcl_UtfFindFirst:                       0, // 328
	Ftcl_UtfFindLast:                        0, // 329
	Ftcl_UtfNext:                            0, // 330
	Ftcl_UtfPrev:                            0, // 331
	Ftcl_UtfToExternal:                      0, // 332
	Ftcl_UtfToExternalDString:               0, // 333
	Ftcl_UtfToLower:                         0, // 334
	Ftcl_UtfToTitle:                         0, // 335
	Ftcl_UtfToUniChar:                       0, // 336
	Ftcl_UtfToUpper:                         0, // 337
	Ftcl_WriteChars:                         0, // 338
	Ftcl_WriteObj:                           0, // 339
	Ftcl_GetString:                          0, // 340
	Ftcl_GetDefaultEncodingDir:              0, // 341
	Ftcl_SetDefaultEncodingDir:              0, // 342
	Ftcl_AlertNotifier:                      0, // 343
	Ftcl_ServiceModeHook:                    0, // 344
	Ftcl_UniCharIsAlnum:                     0, // 345
	Ftcl_UniCharIsAlpha:                     0, // 346
	Ftcl_UniCharIsDigit:                     0, // 347
	Ftcl_UniCharIsLower:                     0, // 348
	Ftcl_UniCharIsSpace:                     0, // 349
	Ftcl_UniCharIsUpper:                     0, // 350
	Ftcl_UniCharIsWordChar:                  0, // 351
	Ftcl_UniCharLen:                         0, // 352
	Ftcl_UniCharNcmp:                        0, // 353
	Ftcl_UniCharToUtfDString:                0, // 354
	Ftcl_UtfToUniCharDString:                0, // 355
	Ftcl_GetRegExpFromObj:                   0, // 356
	Ftcl_EvalTokens:                         0, // 357
	Ftcl_FreeParse:                          0, // 358
	Ftcl_LogCommandInfo:                     0, // 359
	Ftcl_ParseBraces:                        0, // 360
	Ftcl_ParseCommand:                       0, // 361
	Ftcl_ParseExpr:                          0, // 362
	Ftcl_ParseQuotedString:                  0, // 363
	Ftcl_ParseVarName:                       0, // 364
	Ftcl_GetCwd:                             0, // 365
	Ftcl_Chdir:                              0, // 366
	Ftcl_Access:                             0, // 367
	Ftcl_Stat:                               0, // 368
	Ftcl_UtfNcmp:                            0, // 369
	Ftcl_UtfNcasecmp:                        0, // 370
	Ftcl_StringCaseMatch:                    0, // 371
	Ftcl_UniCharIsControl:                   0, // 372
	Ftcl_UniCharIsGraph:                     0, // 373
	Ftcl_UniCharIsPrint:                     0, // 374
	Ftcl_UniCharIsPunct:                     0, // 375
	Ftcl_RegExpExecObj:                      0, // 376
	Ftcl_RegExpGetInfo:                      0, // 377
	Ftcl_NewUnicodeObj:                      0, // 378
	Ftcl_SetUnicodeObj:                      0, // 379
	Ftcl_GetCharLength:                      0, // 380
	Ftcl_GetUniChar:                         0, // 381
	Ftcl_GetUnicode:                         0, // 382
	Ftcl_GetRange:                           0, // 383
	Ftcl_AppendUnicodeToObj:                 0, // 384
	Ftcl_RegExpMatchObj:                     0, // 385
	Ftcl_SetNotifier:                        0, // 386
	Ftcl_GetAllocMutex:                      0, // 387
	Ftcl_GetChannelNames:                    0, // 388
	Ftcl_GetChannelNamesEx:                  0, // 389
	Ftcl_ProcObjCmd:                         0, // 390
	Ftcl_ConditionFinalize:                  0, // 391
	Ftcl_MutexFinalize:                      0, // 392
	Ftcl_CreateThread:                       0, // 393
	Ftcl_ReadRaw:                            0, // 394
	Ftcl_WriteRaw:                           0, // 395
	Ftcl_GetTopChannel:                      0, // 396
	Ftcl_ChannelBuffered:                    0, // 397
	Ftcl_ChannelName:                        0, // 398
	Ftcl_ChannelVersion:                     0, // 399
	Ftcl_ChannelBlockModeProc:               0, // 400
	Ftcl_ChannelCloseProc:                   0, // 401
	Ftcl_ChannelClose2Proc:                  0, // 402
	Ftcl_ChannelInputProc:                   0, // 403
	Ftcl_ChannelOutputProc:                  0, // 404
	Ftcl_ChannelSeekProc:                    0, // 405
	Ftcl_ChannelSetOptionProc:               0, // 406
	Ftcl_ChannelGetOptionProc:               0, // 407
	Ftcl_ChannelWatchProc:                   0, // 408
	Ftcl_ChannelGetHandleProc:               0, // 409
	Ftcl_ChannelFlushProc:                   0, // 410
	Ftcl_ChannelHandlerProc:                 0, // 411
	Ftcl_JoinThread:                         0, // 412
	Ftcl_IsChannelShared:                    0, // 413
	Ftcl_IsChannelRegistered:                0, // 414
	Ftcl_CutChannel:                         0, // 415
	Ftcl_SpliceChannel:                      0, // 416
	Ftcl_ClearChannelHandlers:               0, // 417
	Ftcl_IsChannelExisting:                  0, // 418
	Ftcl_UniCharNcasecmp:                    0, // 419
	Ftcl_UniCharCaseMatch:                   0, // 420
	Ftcl_FindHashEntry:                      0, // 421
	Ftcl_CreateHashEntry:                    0, // 422
	Ftcl_InitCustomHashTable:                0, // 423
	Ftcl_InitObjHashTable:                   0, // 424
	Ftcl_CommandTraceInfo:                   0, // 425
	Ftcl_TraceCommand:                       0, // 426
	Ftcl_UntraceCommand:                     0, // 427
	Ftcl_AttemptAlloc:                       0, // 428
	Ftcl_AttemptDbCkalloc:                   0, // 429
	Ftcl_AttemptRealloc:                     0, // 430
	Ftcl_AttemptDbCkrealloc:                 0, // 431
	Ftcl_AttemptSetObjLength:                0, // 432
	Ftcl_GetChannelThread:                   0, // 433
	Ftcl_GetUnicodeFromObj:                  0, // 434
	Ftcl_GetMathFuncInfo:                    0, // 435
	Ftcl_ListMathFuncs:                      0, // 436
	Ftcl_SubstObj:                           0, // 437
	Ftcl_DetachChannel:                      0, // 438
	Ftcl_IsStandardChannel:                  0, // 439
	Ftcl_FSCopyFile:                         0, // 440
	Ftcl_FSCopyDirectory:                    0, // 441
	Ftcl_FSCreateDirectory:                  0, // 442
	Ftcl_FSDeleteFile:                       0, // 443
	Ftcl_FSLoadFile:                         0, // 444
	Ftcl_FSMatchInDirectory:                 0, // 445
	Ftcl_FSLink:                             0, // 446
	Ftcl_FSRemoveDirectory:                  0, // 447
	Ftcl_FSRenameFile:                       0, // 448
	Ftcl_FSLstat:                            0, // 449
	Ftcl_FSUtime:                            0, // 450
	Ftcl_FSFileAttrsGet:                     0, // 451
	Ftcl_FSFileAttrsSet:                     0, // 452
	Ftcl_FSFileAttrStrings:                  0, // 453
	Ftcl_FSStat:                             0, // 454
	Ftcl_FSAccess:                           0, // 455
	Ftcl_FSOpenFileChannel:                  0, // 456
	Ftcl_FSGetCwd:                           0, // 457
	Ftcl_FSChdir:                            0, // 458
	Ftcl_FSConvertToPathType:                0, // 459
	Ftcl_FSJoinPath:                         0, // 460
	Ftcl_FSSplitPath:                        0, // 461
	Ftcl_FSEqualPaths:                       0, // 462
	Ftcl_FSGetNormalizedPath:                0, // 463
	Ftcl_FSJoinToPath:                       0, // 464
	Ftcl_FSGetInternalRep:                   0, // 465
	Ftcl_FSGetTranslatedPath:                0, // 466
	Ftcl_FSEvalFile:                         0, // 467
	Ftcl_FSNewNativePath:                    0, // 468
	Ftcl_FSGetNativePath:                    0, // 469
	Ftcl_FSFileSystemInfo:                   0, // 470
	Ftcl_FSPathSeparator:                    0, // 471
	Ftcl_FSListVolumes:                      0, // 472
	Ftcl_FSRegister:                         0, // 473
	Ftcl_FSUnregister:                       0, // 474
	Ftcl_FSData:                             0, // 475
	Ftcl_FSGetTranslatedStringPath:          0, // 476
	Ftcl_FSGetFileSystemForPath:             0, // 477
	Ftcl_FSGetPathType:                      0, // 478
	Ftcl_OutputBuffered:                     0, // 479
	Ftcl_FSMountsChanged:                    0, // 480
	Ftcl_EvalTokensStandard:                 0, // 481
	Ftcl_GetTime:                            0, // 482
	Ftcl_CreateObjTrace:                     0, // 483
	Ftcl_GetCommandInfoFromToken:            0, // 484
	Ftcl_SetCommandInfoFromToken:            0, // 485
	Ftcl_DbNewWideIntObj:                    0, // 486
	Ftcl_GetWideIntFromObj:                  0, // 487
	Ftcl_NewWideIntObj:                      0, // 488
	Ftcl_SetWideIntObj:                      0, // 489
	Ftcl_AllocStatBuf:                       0, // 490
	Ftcl_Seek:                               0, // 491
	Ftcl_Tell:                               0, // 492
	Ftcl_ChannelWideSeekProc:                0, // 493
	Ftcl_DictObjPut:                         0, // 494
	Ftcl_DictObjGet:                         0, // 495
	Ftcl_DictObjRemove:                      0, // 496
	Ftcl_DictObjSize:                        0, // 497
	Ftcl_DictObjFirst:                       0, // 498
	Ftcl_DictObjNext:                        0, // 499
	Ftcl_DictObjDone:                        0, // 500
	Ftcl_DictObjPutKeyList:                  0, // 501
	Ftcl_DictObjRemoveKeyList:               0, // 502
	Ftcl_NewDictObj:                         0, // 503
	Ftcl_DbNewDictObj:                       0, // 504
	Ftcl_RegisterConfig:                     0, // 505
	Ftcl_CreateNamespace:                    0, // 506
	Ftcl_DeleteNamespace:                    0, // 507
	Ftcl_AppendExportList:                   0, // 508
	Ftcl_Export:                             0, // 509
	Ftcl_Import:                             0, // 510
	Ftcl_ForgetImport:                       0, // 511
	Ftcl_GetCurrentNamespace:                0, // 512
	Ftcl_GetGlobalNamespace:                 0, // 513
	Ftcl_FindNamespace:                      0, // 514
	Ftcl_FindCommand:                        0, // 515
	Ftcl_GetCommandFromObj:                  0, // 516
	Ftcl_GetCommandFullName:                 0, // 517
	Ftcl_FSEvalFileEx:                       0, // 518
	Ftcl_SetExitProc:                        0, // 519
	Ftcl_LimitAddHandler:                    0, // 520
	Ftcl_LimitRemoveHandler:                 0, // 521
	Ftcl_LimitReady:                         0, // 522
	Ftcl_LimitCheck:                         0, // 523
	Ftcl_LimitExceeded:                      0, // 524
	Ftcl_LimitSetCommands:                   0, // 525
	Ftcl_LimitSetTime:                       0, // 526
	Ftcl_LimitSetGranularity:                0, // 527
	Ftcl_LimitTypeEnabled:                   0, // 528
	Ftcl_LimitTypeExceeded:                  0, // 529
	Ftcl_LimitTypeSet:                       0, // 530
	Ftcl_LimitTypeReset:                     0, // 531
	Ftcl_LimitGetCommands:                   0, // 532
	Ftcl_LimitGetTime:                       0, // 533
	Ftcl_LimitGetGranularity:                0, // 534
	Ftcl_SaveInterpState:                    0, // 535
	Ftcl_RestoreInterpState:                 0, // 536
	Ftcl_DiscardInterpState:                 0, // 537
	Ftcl_SetReturnOptions:                   0, // 538
	Ftcl_GetReturnOptions:                   0, // 539
	Ftcl_IsEnsemble:                         0, // 540
	Ftcl_CreateEnsemble:                     0, // 541
	Ftcl_FindEnsemble:                       0, // 542
	Ftcl_SetEnsembleSubcommandList:          0, // 543
	Ftcl_SetEnsembleMappingDict:             0, // 544
	Ftcl_SetEnsembleUnknownHandler:          0, // 545
	Ftcl_SetEnsembleFlags:                   0, // 546
	Ftcl_GetEnsembleSubcommandList:          0, // 547
	Ftcl_GetEnsembleMappingDict:             0, // 548
	Ftcl_GetEnsembleUnknownHandler:          0, // 549
	Ftcl_GetEnsembleFlags:                   0, // 550
	Ftcl_GetEnsembleNamespace:               0, // 551
	Ftcl_SetTimeProc:                        0, // 552
	Ftcl_QueryTimeProc:                      0, // 553
	Ftcl_ChannelThreadActionProc:            0, // 554
	Ftcl_NewBignumObj:                       0, // 555
	Ftcl_DbNewBignumObj:                     0, // 556
	Ftcl_SetBignumObj:                       0, // 557
	Ftcl_GetBignumFromObj:                   0, // 558
	Ftcl_TakeBignumFromObj:                  0, // 559
	Ftcl_TruncateChannel:                    0, // 560
	Ftcl_ChannelTruncateProc:                0, // 561
	Ftcl_SetChannelErrorInterp:              0, // 562
	Ftcl_GetChannelErrorInterp:              0, // 563
	Ftcl_SetChannelError:                    0, // 564
	Ftcl_GetChannelError:                    0, // 565
	Ftcl_InitBignumFromDouble:               0, // 566
	Ftcl_GetNamespaceUnknownHandler:         0, // 567
	Ftcl_SetNamespaceUnknownHandler:         0, // 568
	Ftcl_GetEncodingFromObj:                 0, // 569
	Ftcl_GetEncodingSearchPath:              0, // 570
	Ftcl_SetEncodingSearchPath:              0, // 571
	Ftcl_GetEncodingNameFromEnvironment:     0, // 572
	Ftcl_PkgRequireProc:                     0, // 573
	Ftcl_AppendObjToErrorInfo:               0, // 574
	Ftcl_AppendLimitedToObj:                 0, // 575
	Ftcl_Format:                             0, // 576
	Ftcl_AppendFormatToObj:                  0, // 577
	Ftcl_ObjPrintf:                          0, // 578
	Ftcl_AppendPrintfToObj:                  0, // 579
	Ftcl_CancelEval:                         0, // 580
	Ftcl_Canceled:                           0, // 581
	Ftcl_CreatePipe:                         0, // 582
	Ftcl_NRCreateCommand:                    0, // 583
	Ftcl_NREvalObj:                          0, // 584
	Ftcl_NREvalObjv:                         0, // 585
	Ftcl_NRCmdSwap:                          0, // 586
	Ftcl_NRAddCallback:                      0, // 587
	Ftcl_NRCallObjProc:                      0, // 588
	Ftcl_GetFSDeviceFromStat:                0, // 589
	Ftcl_GetFSInodeFromStat:                 0, // 590
	Ftcl_GetModeFromStat:                    0, // 591
	Ftcl_GetLinkCountFromStat:               0, // 592
	Ftcl_GetUserIdFromStat:                  0, // 593
	Ftcl_GetGroupIdFromStat:                 0, // 594
	Ftcl_GetDeviceTypeFromStat:              0, // 595
	Ftcl_GetAccessTimeFromStat:              0, // 596
	Ftcl_GetModificationTimeFromStat:        0, // 597
	Ftcl_GetChangeTimeFromStat:              0, // 598
	Ftcl_GetSizeFromStat:                    0, // 599
	Ftcl_GetBlocksFromStat:                  0, // 600
	Ftcl_GetBlockSizeFromStat:               0, // 601
	Ftcl_SetEnsembleParameterList:           0, // 602
	Ftcl_GetEnsembleParameterList:           0, // 603
	Ftcl_ParseArgsObjv:                      0, // 604
	Ftcl_GetErrorLine:                       0, // 605
	Ftcl_SetErrorLine:                       0, // 606
	Ftcl_TransferResult:                     0, // 607
	Ftcl_InterpActive:                       0, // 608
	Ftcl_BackgroundException:                0, // 609
	Ftcl_ZlibDeflate:                        0, // 610
	Ftcl_ZlibInflate:                        0, // 611
	Ftcl_ZlibCRC32:                          0, // 612
	Ftcl_ZlibAdler32:                        0, // 613
	Ftcl_ZlibStreamInit:                     0, // 614
	Ftcl_ZlibStreamGetCommandName:           0, // 615
	Ftcl_ZlibStreamEof:                      0, // 616
	Ftcl_ZlibStreamChecksum:                 0, // 617
	Ftcl_ZlibStreamPut:                      0, // 618
	Ftcl_ZlibStreamGet:                      0, // 619
	Ftcl_ZlibStreamClose:                    0, // 620
	Ftcl_ZlibStreamReset:                    0, // 621
	Ftcl_SetStartupScript:                   0, // 622
	Ftcl_GetStartupScript:                   0, // 623
	Ftcl_CloseEx:                            0, // 624
	Ftcl_NRExprObj:                          0, // 625
	Ftcl_NRSubstObj:                         0, // 626
	Ftcl_LoadFile:                           0, // 627
	Ftcl_FindSymbol:                         0, // 628
	Ftcl_FSUnloadFile:                       0, // 629
	Ftcl_ZlibStreamSetCompressionDictionary: 0, // 660
} /* tclStubInit.c:965:16 */

// !END!: Do not edit above this line.

var XtclStubsPtr uintptr = uintptr(0)        /* tclStubLib.c:21:16 */
var XtclPlatStubsPtr uintptr = uintptr(0)    /* tclStubLib.c:22:20 */
var XtclIntStubsPtr uintptr = uintptr(0)     /* tclStubLib.c:23:19 */
var XtclIntPlatStubsPtr uintptr = uintptr(0) /* tclStubLib.c:24:23 */

// Use our own isDigit to avoid linking to libc on windows

func isDigit(tls *libc.TLS, c int32) int32 { /* tclStubLib.c:30:12: */
	return libc.Bool32(c >= '0' && c <= '9')
}

//----------------------------------------------------------------------
//
// Tcl_InitStubs --
//
//	Tries to initialise the stub table pointers and ensures that the
//	correct version of Tcl is loaded.
//
// Results:
//	The actual version of Tcl that satisfies the request, or NULL to
//	indicate that an error occurred.
//
// Side effects:
//	Sets the stub table pointers.
//
//----------------------------------------------------------------------
func XTcl_InitStubs(tls *libc.TLS, interp uintptr, version uintptr, exact int32) uintptr { /* tclStubLib.c:53:25: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var iPtr uintptr = interp
	var actualVersion uintptr = uintptr(0)
	*(*ClientData)(unsafe.Pointer(bp /* pkgData */)) = uintptr(0)
	var stubsPtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FstubTable

	// We can't optimize this check by caching tclStubsPtr because that
	// prevents apps from being able to load/unload Tcl dynamically multiple
	// times. [Bug 615304]

	if !(stubsPtr != 0) || (*TclStubs)(unsafe.Pointer(stubsPtr)).Fmagic != libc.Int32FromUint32(0xFCA3BACF) {
		(*Interp)(unsafe.Pointer(iPtr)).Fresult = ts + 63924 /* "interpreter uses..." */
		(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
		return uintptr(0)
	}

	actualVersion = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(stubsPtr)).Ftcl_PkgRequireEx})).f(tls, interp, ts+7036 /* "Tcl" */, version, 0, bp /* &pkgData */)
	if actualVersion == uintptr(0) {
		return uintptr(0)
	}
	if exact != 0 {
		var p uintptr = version
		var count int32 = 0

		for *(*int8)(unsafe.Pointer(p)) != 0 {
			count = count + libc.BoolInt32(!(isDigit(tls, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))))) != 0))
		}
		if count == 1 {
			var q uintptr = actualVersion

			p = version
			for *(*int8)(unsafe.Pointer(p)) != 0 && int32(*(*int8)(unsafe.Pointer(p))) == int32(*(*int8)(unsafe.Pointer(q))) {
				p++
				q++
			}
			if *(*int8)(unsafe.Pointer(p)) != 0 || isDigit(tls, int32(*(*int8)(unsafe.Pointer(q)))) != 0 {
				// Construct error message
				(*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(stubsPtr)).Ftcl_PkgRequireEx})).f(tls, interp, ts+7036 /* "Tcl" */, version, 1, uintptr(0))
				return uintptr(0)
			}
		} else {
			actualVersion = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(stubsPtr)).Ftcl_PkgRequireEx})).f(tls, interp, ts+7036 /* "Tcl" */, version, 1, uintptr(0))
			if actualVersion == uintptr(0) {
				return uintptr(0)
			}
		}
	}
	XtclStubsPtr = *(*ClientData)(unsafe.Pointer(bp /* pkgData */))

	if (*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Fhooks != 0 {
		XtclPlatStubsPtr = (*TclStubHooks)(unsafe.Pointer((*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Fhooks)).FtclPlatStubs
		XtclIntStubsPtr = (*TclStubHooks)(unsafe.Pointer((*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Fhooks)).FtclIntStubs
		XtclIntPlatStubsPtr = (*TclStubHooks)(unsafe.Pointer((*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Fhooks)).FtclIntPlatStubs
	} else {
		XtclPlatStubsPtr = uintptr(0)
		XtclIntStubsPtr = uintptr(0)
		XtclIntPlatStubsPtr = uintptr(0)
	}

	return actualVersion
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// There are three classes of synchronization objects: mutexes, thread data
// keys, and condition variables. The following are used to record the memory
// used for these objects so they can be finalized.
//
// These statics are guarded by the mutex in the caller of
// TclRememberThreadData, e.g., TclpThreadDataKeyInit

type SyncObjRecord = struct {
	Fnum  int32
	Fmax  int32
	Flist uintptr
} /* tclThread.c:29:3 */

var keyRecord = SyncObjRecord{}   /* tclThread.c:31:22 */
var mutexRecord = SyncObjRecord{} /* tclThread.c:32:22 */
var condRecord = SyncObjRecord{}  /* tclThread.c:33:22 */

// Several functions are #defined to nothing in tcl.h if TCL_THREADS is not
// specified. Here we undo that so the functions are defined in the stubs
// table.

//----------------------------------------------------------------------
//
// Tcl_GetThreadData --
//
//	This function allocates and initializes a chunk of thread local
//	storage.
//
// Results:
//	A thread-specific pointer to the data structure.
//
// Side effects:
//	Will allocate memory the first time this thread calls for this chunk
//	of storage.
//
//----------------------------------------------------------------------

func XTcl_GetThreadData(tls *libc.TLS, keyPtr uintptr, size int32) uintptr { /* tclThread.c:76:6: */
	var result uintptr
	if *(*Tcl_ThreadDataKey)(unsafe.Pointer(keyPtr)) == uintptr(0) {
		result = XTcl_Alloc(tls, uint32(size))
		libc.Xmemset(tls, result, 0, uint64(size))
		*(*Tcl_ThreadDataKey)(unsafe.Pointer(keyPtr)) = result
		sRememberSyncObject(tls, keyPtr, uintptr(unsafe.Pointer(&keyRecord)))
	} else {
		result = *(*Tcl_ThreadDataKey)(unsafe.Pointer(keyPtr))
	}
	return result
}

//----------------------------------------------------------------------
//
// TclThreadDataKeyGet --
//
//	This function returns a pointer to a block of thread local storage.
//
// Results:
//	A thread-specific pointer to the data structure, or NULL if the memory
//	has not been assigned to this key for this thread.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclThreadDataKeyGet(tls *libc.TLS, keyPtr uintptr) uintptr { /* tclThread.c:124:6: */
	return *(*Tcl_ThreadDataKey)(unsafe.Pointer(keyPtr))
}

//----------------------------------------------------------------------
//
// RememberSyncObject
//
//	Keep a list of (mutexes/condition variable/data key) used during
//	finalization.
//
//	Assume global lock is held.
//
// Results:
//	None.
//
// Side effects:
//	Add to the appropriate list.
//
//----------------------------------------------------------------------

func sRememberSyncObject(tls *libc.TLS, objPtr uintptr, recPtr uintptr) { /* tclThread.c:156:1: */
	var newList uintptr
	var i int32
	var j int32

	// Reuse any free slot in the list.

	for i = 0; i < (*SyncObjRecord)(unsafe.Pointer(recPtr)).Fnum; i++ {
		if *(*uintptr)(unsafe.Pointer((*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist + uintptr(i)*8)) == uintptr(0) {
			*(*uintptr)(unsafe.Pointer((*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist + uintptr(i)*8)) = objPtr
			return
		}
	}

	// Grow the list of pointers if necessary, copying only non-NULL
	// pointers to the new list.

	if (*SyncObjRecord)(unsafe.Pointer(recPtr)).Fnum >= (*SyncObjRecord)(unsafe.Pointer(recPtr)).Fmax {
		*(*int32)(unsafe.Pointer(recPtr + 4)) += 8
		newList = XTcl_Alloc(tls, uint32(uint64((*SyncObjRecord)(unsafe.Pointer(recPtr)).Fmax)*uint64(unsafe.Sizeof(uintptr(0)))))
		i = 0
		j = 0
		for ; i < (*SyncObjRecord)(unsafe.Pointer(recPtr)).Fnum; i++ {
			if *(*uintptr)(unsafe.Pointer((*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist + uintptr(i)*8)) != uintptr(0) {
				*(*uintptr)(unsafe.Pointer(newList + uintptr(libc.PostIncInt32(&j, 1))*8)) = *(*uintptr)(unsafe.Pointer((*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist + uintptr(i)*8))
			}
		}
		if (*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist != uintptr(0) {
			XTclpFree(tls, (*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist)
		}
		(*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist = newList
		(*SyncObjRecord)(unsafe.Pointer(recPtr)).Fnum = j
	}

	*(*uintptr)(unsafe.Pointer((*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist + uintptr((*SyncObjRecord)(unsafe.Pointer(recPtr)).Fnum)*8)) = objPtr
	(*SyncObjRecord)(unsafe.Pointer(recPtr)).Fnum++
}

//----------------------------------------------------------------------
//
// ForgetSyncObject
//
//	Remove a single object from the list.
//	Assume global lock is held.
//
// Results:
//	None.
//
// Side effects:
//	Remove from the appropriate list.
//
//----------------------------------------------------------------------

func sForgetSyncObject(tls *libc.TLS, objPtr uintptr, recPtr uintptr) { /* tclThread.c:217:1: */
	var i int32

	for i = 0; i < (*SyncObjRecord)(unsafe.Pointer(recPtr)).Fnum; i++ {
		if objPtr == *(*uintptr)(unsafe.Pointer((*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist + uintptr(i)*8)) {
			*(*uintptr)(unsafe.Pointer((*SyncObjRecord)(unsafe.Pointer(recPtr)).Flist + uintptr(i)*8)) = uintptr(0)
			return
		}
	}
}

//----------------------------------------------------------------------
//
// TclRememberMutex
//
//	Keep a list of mutexes used during finalization.
//	Assume global lock is held.
//
// Results:
//	None.
//
// Side effects:
//	Add to the mutex list.
//
//----------------------------------------------------------------------

func XTclRememberMutex(tls *libc.TLS, mutexPtr uintptr) { /* tclThread.c:249:1: */
	sRememberSyncObject(tls, mutexPtr, uintptr(unsafe.Pointer(&mutexRecord)))
}

//----------------------------------------------------------------------
//
// Tcl_MutexFinalize --
//
//	Finalize a single mutex and remove it from the list of remembered
//	objects.
//
// Results:
//	None.
//
// Side effects:
//	Remove the mutex from the list.
//
//----------------------------------------------------------------------

func XTcl_MutexFinalize(tls *libc.TLS, mutexPtr uintptr) { /* tclThread.c:273:1: */
	XTclpGlobalLock(tls)
	sForgetSyncObject(tls, mutexPtr, uintptr(unsafe.Pointer(&mutexRecord)))
	XTclpGlobalUnlock(tls)
}

//----------------------------------------------------------------------
//
// TclRememberCondition
//
//	Keep a list of condition variables used during finalization.
//	Assume global lock is held.
//
// Results:
//	None.
//
// Side effects:
//	Add to the condition variable list.
//
//----------------------------------------------------------------------

func XTclRememberCondition(tls *libc.TLS, condPtr uintptr) { /* tclThread.c:302:1: */
	sRememberSyncObject(tls, condPtr, uintptr(unsafe.Pointer(&condRecord)))
}

//----------------------------------------------------------------------
//
// Tcl_ConditionFinalize --
//
//	Finalize a single condition variable and remove it from the list of
//	remembered objects.
//
// Results:
//	None.
//
// Side effects:
//	Remove the condition variable from the list.
//
//----------------------------------------------------------------------

func XTcl_ConditionFinalize(tls *libc.TLS, condPtr uintptr) { /* tclThread.c:326:1: */
	XTclpGlobalLock(tls)
	sForgetSyncObject(tls, condPtr, uintptr(unsafe.Pointer(&condRecord)))
	XTclpGlobalUnlock(tls)
}

//----------------------------------------------------------------------
//
// TclFinalizeThreadData --
//
//	This function cleans up the thread-local storage. Secondary, it cleans
//	thread alloc cache.
//	This is called once for each thread before thread exits.
//
// Results:
//	None.
//
// Side effects:
//	Frees up all thread local storage.
//
//----------------------------------------------------------------------

func XTclFinalizeThreadData(tls *libc.TLS, quick int32) { /* tclThread.c:356:1: */
	XTclFinalizeThreadDataThread(tls)
}

//----------------------------------------------------------------------
//
// TclFinalizeSynchronization --
//
//	This function cleans up all synchronization objects: mutexes,
//	condition variables, and thread-local storage.
//
// Results:
//	None.
//
// Side effects:
//	Frees up the memory.
//
//----------------------------------------------------------------------

func XTclFinalizeSynchronization(tls *libc.TLS) { /* tclThread.c:387:1: */
	var i int32
	var blockPtr uintptr
	var keyPtr uintptr

	// If we're running unthreaded, the TSD blocks are simply stored inside
	// their thread data keys. Free them here.

	if keyRecord.Flist != uintptr(0) {
		for i = 0; i < keyRecord.Fnum; i++ {
			keyPtr = *(*uintptr)(unsafe.Pointer(keyRecord.Flist + uintptr(i)*8))
			blockPtr = *(*Tcl_ThreadDataKey)(unsafe.Pointer(keyPtr))
			XTclpFree(tls, blockPtr)
		}
		XTclpFree(tls, keyRecord.Flist)
		keyRecord.Flist = uintptr(0)
	}
	keyRecord.Fmax = 0
	keyRecord.Fnum = 0

}

//----------------------------------------------------------------------
//
// Tcl_ExitThread --
//
//	This function is called to terminate the current thread. This should
//	be used by extensions that create threads with additional interpreters
//	in them.
//
// Results:
//	None.
//
// Side effects:
//	All thread exit handlers are invoked, then the thread dies.
//
//----------------------------------------------------------------------

func XTcl_ExitThread(tls *libc.TLS, status int32) { /* tclThread.c:472:1: */
	XTcl_FinalizeThread(tls)
}

//----------------------------------------------------------------------
//
// Tcl_ConditionWait, et al. --
//
//	These noop functions are provided so the stub table does not have to
//	be conditionalized for threads. The real implementations of these
//	functions live in the platform specific files.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ConditionWait(tls *libc.TLS, condPtr uintptr, mutexPtr uintptr, timePtr uintptr) { /* tclThread.c:503:1: */
}

func XTcl_ConditionNotify(tls *libc.TLS, condPtr uintptr) { /* tclThread.c:512:1: */
}

func XTcl_MutexLock(tls *libc.TLS, mutexPtr uintptr) { /* tclThread.c:519:1: */
}

func XTcl_MutexUnlock(tls *libc.TLS, mutexPtr uintptr) { /* tclThread.c:526:1: */
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
//----------------------------------------------------------------------
//
// Tcl_GetMemoryInfo --
//
//	Return a list-of-lists of memory stats.
//
// Results:
//	None.
//
// Side effects:
//	List appended to given dstring.
//
//----------------------------------------------------------------------

func XTcl_GetMemoryInfo(tls *libc.TLS, dsPtr uintptr) { /* tclThreadAlloc.c:1149:1: */
	XTcl_Panic(tls, ts+63973, 0)
}

//----------------------------------------------------------------------
//
// TclFinalizeThreadAlloc --
//
//	This procedure is used to destroy all private resources used in this
//	file.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFinalizeThreadAlloc(tls *libc.TLS) { /* tclThreadAlloc.c:1173:1: */
	XTcl_Panic(tls, ts+64040, 0)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The information about each joinable thread is remembered in a structure as
// defined below.

type JoinableThread1 = struct {
	Fid            Tcl_ThreadId
	Fresult        int32
	Fdone          int32
	FwaitedUpon    int32
	F__ccgo_pad1   [4]byte
	FthreadMutex   Tcl_Mutex
	Fcond          Tcl_Condition
	FnextThreadPtr uintptr
} /* tclThreadJoin.c:24:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The information about each joinable thread is remembered in a structure as
// defined below.

type JoinableThread = JoinableThread1 /* tclThreadJoin.c:45:3 */

// The following variable is used to maintain the global list of all joinable
// threads. Usage by a thread is allowed only if the thread acquired the
// 'joinMutex'.

var firstThreadPtr uintptr /* tclThreadJoin.c:55:23: */

//----------------------------------------------------------------------
//
// TclJoinThread --
//
//	This procedure waits for the exit of the thread with the specified id
//	and returns its result.
//
// Results:
//	A standard tcl result signaling the overall success/failure of the
//	operation and an integer result delivered by the thread which was
//	waited upon.
//
// Side effects:
//	Deallocates the memory allocated by TclRememberJoinableThread.
//	Removes the data associated to the thread waited upon from the list of
//	joinable threads.
//
//----------------------------------------------------------------------

func XTclJoinThread(tls *libc.TLS, id Tcl_ThreadId, result uintptr) int32 { /* tclThreadJoin.c:79:1: */
	var threadPtr uintptr

	// Steps done here:
	// i.    Acquire the joinMutex and search for the thread.
	// ii.   Error out if it could not be found.
	// iii.  If found, switch from exclusive access to the list to exclusive
	//	     access to the thread structure.
	// iv.   Error out if some other is already waiting.
	// v.    Skip the waiting part of the thread is already done.
	// vi.   Wait for the thread to exit, mark it as waited upon too.
	// vii.  Get the result form the structure,
	// viii. switch to exclusive access of the list,
	// ix.   remove the structure from the list,
	// x.    then switch back to exclusive access to the structure
	// xi.   and delete it.

	threadPtr = firstThreadPtr
	for threadPtr != uintptr(0) && (*JoinableThread)(unsafe.Pointer(threadPtr)).Fid != id {
		threadPtr = (*JoinableThread)(unsafe.Pointer(threadPtr)).FnextThreadPtr
	}

	if threadPtr == uintptr(0) {
		// Thread not found. Either not joinable, or already waited upon and
		// exited. Whatever, an error is in order.

		return TCL_ERROR
	}

	// [1] If we don't lock the structure before giving up exclusive access to
	// the list some other thread just completing its wait on the same thread
	// can delete the structure from under us, leaving us with a dangling
	// pointer.

	// [2] Now that we have the structure mutex any other thread that just
	// tries to delete structure will wait at location [3] until we are done
	// with the structure. And in that case we are done with it rather quickly
	// as 'waitedUpon' will be set and we will have to error out.

	if (*JoinableThread)(unsafe.Pointer(threadPtr)).FwaitedUpon != 0 {

		return TCL_ERROR
	}

	// We are waiting now, let other threads recognize this.

	(*JoinableThread)(unsafe.Pointer(threadPtr)).FwaitedUpon = 1

	for !((*JoinableThread)(unsafe.Pointer(threadPtr)).Fdone != 0) {

	}

	// We have to release the structure before trying to access the list again
	// or we can run into deadlock with a thread at [1] (see above) because of
	// us holding the structure and the other holding the list.  There is no
	// problem with dangling pointers here as 'waitedUpon == 1' is still valid
	// and any other thread will error out and not come to this place. IOW,
	// the fact that we are here also means that no other thread came here
	// before us and is able to delete the structure.

	// We have to search the list again as its structure may (may, almost
	// certainly) have changed while we were waiting. Especially now is the
	// time to compute the predecessor in the list. Any earlier result can be
	// dangling by now.

	if firstThreadPtr == threadPtr {
		firstThreadPtr = (*JoinableThread)(unsafe.Pointer(threadPtr)).FnextThreadPtr
	} else {
		var prevThreadPtr uintptr = firstThreadPtr

		for (*JoinableThread)(unsafe.Pointer(prevThreadPtr)).FnextThreadPtr != threadPtr {
			prevThreadPtr = (*JoinableThread)(unsafe.Pointer(prevThreadPtr)).FnextThreadPtr
		}
		(*JoinableThread)(unsafe.Pointer(prevThreadPtr)).FnextThreadPtr = (*JoinableThread)(unsafe.Pointer(threadPtr)).FnextThreadPtr
	}

	// [3] Now that the structure is not part of the list anymore no other
	// thread can acquire its mutex from now on. But it is possible that
	// another thread is still holding the mutex though, see location [2].  So
	// we have to acquire the mutex one more time to wait for that thread to
	// finish. We can (and have to) release the mutex immediately.

	// Copy the result to us, finalize the synchronisation objects, then free
	// the structure and return.

	*(*int32)(unsafe.Pointer(result)) = (*JoinableThread)(unsafe.Pointer(threadPtr)).Fresult

	XTclpFree(tls, threadPtr)

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclRememberJoinableThread --
//
//	This procedure remebers a thread as joinable. Only a call to
//	TclJoinThread will remove the structre created (and initialized) here.
//	IOW, not waiting upon a joinable thread will cause memory leaks.
//
// Results:
//	None.
//
// Side effects:
//	Allocates memory, adds it to the global list of all joinable threads.
//
//----------------------------------------------------------------------

func XTclRememberJoinableThread(tls *libc.TLS, id Tcl_ThreadId) { /* tclThreadJoin.c:228:1: */
	var threadPtr uintptr

	threadPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(JoinableThread{})))
	(*JoinableThread)(unsafe.Pointer(threadPtr)).Fid = id
	(*JoinableThread)(unsafe.Pointer(threadPtr)).Fdone = 0
	(*JoinableThread)(unsafe.Pointer(threadPtr)).FwaitedUpon = 0
	(*JoinableThread)(unsafe.Pointer(threadPtr)).FthreadMutex = uintptr(0)
	(*JoinableThread)(unsafe.Pointer(threadPtr)).Fcond = uintptr(0)

	(*JoinableThread)(unsafe.Pointer(threadPtr)).FnextThreadPtr = firstThreadPtr
	firstThreadPtr = threadPtr

}

//----------------------------------------------------------------------
//
// TclSignalExitThread --
//
//	This procedure signals that the specified thread is done with its
//	work. If the thread is joinable this signal is propagated to the
//	thread waiting upon it.
//
// Results:
//	None.
//
// Side effects:
//	Modifies the associated structure to hold the result.
//
//----------------------------------------------------------------------

func XTclSignalExitThread(tls *libc.TLS, id Tcl_ThreadId, result int32) { /* tclThreadJoin.c:267:1: */
	var threadPtr uintptr

	threadPtr = firstThreadPtr
	for threadPtr != uintptr(0) && (*JoinableThread)(unsafe.Pointer(threadPtr)).Fid != id {
		threadPtr = (*JoinableThread)(unsafe.Pointer(threadPtr)).FnextThreadPtr
	}

	if threadPtr == uintptr(0) {
		// Thread not found. Not joinable. No problem, nothing to do.

		return
	}

	// Switch over the exclusive access from the list to the structure, then
	// store the result, set the flag and notify the waiting thread, provided
	// that it exists. The order of lock/unlock ensures that a thread entering
	// 'TclJoinThread' will not interfere with us.

	(*JoinableThread)(unsafe.Pointer(threadPtr)).Fdone = 1
	(*JoinableThread)(unsafe.Pointer(threadPtr)).Fresult = result

	if (*JoinableThread)(unsafe.Pointer(threadPtr)).FwaitedUpon != 0 {

	}

}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Stub functions for non-threaded builds

func XTclInitThreadStorage(tls *libc.TLS) { /* tclThreadStorage.c:352:1: */
}

func XTclFinalizeThreadDataThread(tls *libc.TLS) { /* tclThreadStorage.c:357:1: */
}

func XTclFinalizeThreadStorage(tls *libc.TLS) { /* tclThreadStorage.c:362:1: */
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// For each timer callback that's pending there is one record of the following
// type. The normal handlers (created by Tcl_CreateTimerHandler) are chained
// together in a list sorted by time (earliest event first).

type TimerHandler1 = struct {
	Ftime       Tcl_Time
	Fproc       uintptr
	FclientData ClientData
	Ftoken      Tcl_TimerToken
	FnextPtr    uintptr
} /* tclTimer.c:21:9 */

// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// For each timer callback that's pending there is one record of the following
// type. The normal handlers (created by Tcl_CreateTimerHandler) are chained
// together in a list sorted by time (earliest event first).

type TimerHandler = TimerHandler1 /* tclTimer.c:29:3 */

// The data structure below is used by the "after" command to remember the
// command to be executed later. All of the pending "after" commands for an
// interpreter are linked together in a list.

type AfterInfo1 = struct {
	FassocPtr    uintptr
	FcommandPtr  uintptr
	Fid          int32
	F__ccgo_pad1 [4]byte
	Ftoken       Tcl_TimerToken
	FnextPtr     uintptr
} /* tclTimer.c:37:9 */

// The data structure below is used by the "after" command to remember the
// command to be executed later. All of the pending "after" commands for an
// interpreter are linked together in a list.

type AfterAssocData1 = struct {
	Finterp        uintptr
	FfirstAfterPtr uintptr
} /* tclTimer.c:37:9 */

// The data structure below is used by the "after" command to remember the
// command to be executed later. All of the pending "after" commands for an
// interpreter are linked together in a list.

type AfterInfo = AfterInfo1 /* tclTimer.c:52:3 */

// One of the following structures is associated with each interpreter for
// which an "after" command has ever been invoked. A pointer to this structure
// is stored in the AssocData for the "tclAfter" key.

type AfterAssocData = AfterAssocData1 /* tclTimer.c:66:3 */

// There is one of the following structures for each of the handlers declared
// in a call to Tcl_DoWhenIdle. All of the currently-active handlers are
// linked together into a list.

type IdleHandler1 = struct {
	Fproc        uintptr
	FclientData  ClientData
	Fgeneration  int32
	F__ccgo_pad1 [4]byte
	FnextPtr     uintptr
} /* tclTimer.c:74:9 */

// There is one of the following structures for each of the handlers declared
// in a call to Tcl_DoWhenIdle. All of the currently-active handlers are
// linked together into a list.

type IdleHandler = IdleHandler1 /* tclTimer.c:80:3 */

// The timer and idle queues are per-thread because they are associated with
// the notifier, which is also per-thread.
//
// All static variables used in this file are collected into a single instance
// of the following structure. For multi-threaded implementations, there is
// one instance of this structure for each thread.
//
// Notice that different structures with the same name appear in other files.
// The structure defined below is used in this file only.

type ThreadSpecificData11 = struct {
	FfirstTimerHandlerPtr uintptr
	FlastTimerId          int32
	FtimerPending         int32
	FidleList             uintptr
	FlastIdlePtr          uintptr
	FidleGeneration       int32
	FafterId              int32
} /* tclTimer.c:108:3 */

var dataKey10 Tcl_ThreadDataKey /* tclTimer.c:110:26: */

//----------------------------------------------------------------------
//
// InitTimer --
//
//	This function initializes the timer module.
//
// Results:
//	A pointer to the thread specific data.
//
// Side effects:
//	Registers the idle and timer event sources.
//
//----------------------------------------------------------------------

func sInitTimer(tls *libc.TLS) uintptr { /* tclTimer.c:182:27: */
	var tsdPtr uintptr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey10)))

	if tsdPtr == uintptr(0) {
		tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey10)), int32(unsafe.Sizeof(ThreadSpecificData11{})))
		XTcl_CreateEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sTimerSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sTimerCheckProc})), uintptr(0))
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sTimerExitProc})), uintptr(0))
	}
	return tsdPtr
}

//----------------------------------------------------------------------
//
// TimerExitProc --
//
//	This function is call at exit or unload time to remove the timer and
//	idle event sources.
//
// Results:
//	None.
//
// Side effects:
//	Removes the timer and idle event sources and remaining events.
//
//----------------------------------------------------------------------

func sTimerExitProc(tls *libc.TLS, clientData ClientData) { /* tclTimer.c:213:1: */
	var tsdPtr uintptr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey10)))

	XTcl_DeleteEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sTimerSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sTimerCheckProc})), uintptr(0))
	if tsdPtr != uintptr(0) {
		var timerHandlerPtr uintptr

		timerHandlerPtr = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr
		for timerHandlerPtr != uintptr(0) {
			(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr = (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).FnextPtr
			XTclpFree(tls, timerHandlerPtr)
			timerHandlerPtr = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr
		}
	}
}

//--------------------------------------------------------------
//
// Tcl_CreateTimerHandler --
//
//	Arrange for a given function to be invoked at a particular time in the
//	future.
//
// Results:
//	The return value is a token for the timer event, which may be used to
//	delete the event before it fires.
//
// Side effects:
//	When milliseconds have elapsed, proc will be invoked exactly once.
//
//--------------------------------------------------------------

func XTcl_CreateTimerHandler(tls *libc.TLS, milliseconds int32, proc uintptr, clientData ClientData) Tcl_TimerToken { /* tclTimer.c:250:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var time Tcl_Time at bp, 8

	// Compute when the event should fire.

	XTcl_GetTime(tls, bp)
	*(*int32)(unsafe.Pointer(bp)) += int32(milliseconds / 1000)
	*(*int32)(unsafe.Pointer(bp + 4)) += int32(milliseconds % 1000 * 1000)
	if (*Tcl_Time)(unsafe.Pointer(bp)).Fusec >= 1000000 {
		*(*int32)(unsafe.Pointer(bp + 4)) -= 1000000
		*(*int32)(unsafe.Pointer(bp)) += 1
	}
	return XTclCreateAbsoluteTimerHandler(tls, bp, proc, clientData)
}

//--------------------------------------------------------------
//
// TclCreateAbsoluteTimerHandler --
//
//	Arrange for a given function to be invoked at a particular time in the
//	future.
//
// Results:
//	The return value is a token for the timer event, which may be used to
//	delete the event before it fires.
//
// Side effects:
//	When the time in timePtr has been reached, proc will be invoked
//	exactly once.
//
//--------------------------------------------------------------

func XTclCreateAbsoluteTimerHandler(tls *libc.TLS, timePtr uintptr, proc uintptr, clientData ClientData) Tcl_TimerToken { /* tclTimer.c:292:1: */
	var timerHandlerPtr uintptr
	var tPtr2 uintptr
	var prevPtr uintptr
	var tsdPtr uintptr = sInitTimer(tls)

	timerHandlerPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TimerHandler{})))

	// Fill in fields for the event.

	libc.Xmemcpy(tls, timerHandlerPtr, timePtr, uint64(unsafe.Sizeof(Tcl_Time{})))
	(*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Fproc = proc
	(*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).FclientData = clientData
	(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FlastTimerId++
	(*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftoken = uintptr(Intptr_t((*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FlastTimerId))

	// Add the event to the queue in the correct position (ordered by event
	// firing time).

	tPtr2 = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr
	prevPtr = uintptr(0)
__1:
	if !(tPtr2 != uintptr(0)) {
		goto __3
	}
	{
		if (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftime.Fsec < (*TimerHandler)(unsafe.Pointer(tPtr2)).Ftime.Fsec || (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftime.Fsec == (*TimerHandler)(unsafe.Pointer(tPtr2)).Ftime.Fsec && (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftime.Fusec < (*TimerHandler)(unsafe.Pointer(tPtr2)).Ftime.Fusec {
			goto __3
		}

	}
	goto __2
__2:
	prevPtr = tPtr2
	tPtr2 = (*TimerHandler)(unsafe.Pointer(tPtr2)).FnextPtr
	goto __1
	goto __3
__3:
	;
	(*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).FnextPtr = tPtr2
	if prevPtr == uintptr(0) {
		(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr = timerHandlerPtr
	} else {
		(*TimerHandler)(unsafe.Pointer(prevPtr)).FnextPtr = timerHandlerPtr
	}

	sTimerSetupProc(tls, uintptr(0), libc.CplInt32(int32(1)<<1))

	return (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftoken
}

//--------------------------------------------------------------
//
// Tcl_DeleteTimerHandler --
//
//	Delete a previously-registered timer handler.
//
// Results:
//	None.
//
// Side effects:
//	Destroy the timer callback identified by TimerToken, so that its
//	associated function will not be called. If the callback has already
//	fired, or if the given token doesn't exist, then nothing happens.
//
//--------------------------------------------------------------

func XTcl_DeleteTimerHandler(tls *libc.TLS, token Tcl_TimerToken) { /* tclTimer.c:354:1: */
	var timerHandlerPtr uintptr
	var prevPtr uintptr
	var tsdPtr uintptr = sInitTimer(tls)

	if token == uintptr(0) {
		return
	}

	timerHandlerPtr = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr
	prevPtr = uintptr(0)
__1:
	if !(timerHandlerPtr != uintptr(0)) {
		goto __3
	}
	{
		if (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftoken != token {
			goto __2
		}
		if prevPtr == uintptr(0) {
			(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr = (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).FnextPtr
		} else {
			(*TimerHandler)(unsafe.Pointer(prevPtr)).FnextPtr = (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).FnextPtr
		}
		XTclpFree(tls, timerHandlerPtr)
		return

	}
	goto __2
__2:
	prevPtr = timerHandlerPtr
	timerHandlerPtr = (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).FnextPtr
	goto __1
	goto __3
__3:
}

//----------------------------------------------------------------------
//
// TimerSetupProc --
//
//	This function is called by Tcl_DoOneEvent to setup the timer event
//	source for before blocking. This routine checks both the idle and
//	after timer lists.
//
// Results:
//	None.
//
// Side effects:
//	May update the maximum notifier block time.
//
//----------------------------------------------------------------------

func sTimerSetupProc(tls *libc.TLS, data ClientData, flags int32) { /* tclTimer.c:400:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var blockTime Tcl_Time at bp, 8

	var tsdPtr uintptr = sInitTimer(tls)

	if flags&(int32(1)<<5) != 0 && (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList != 0 ||
		flags&(int32(1)<<4) != 0 && (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FtimerPending != 0 {
		// There is an idle handler or a pending timer event, so just poll.

		(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fsec = 0
		(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fusec = 0
	} else if flags&(int32(1)<<4) != 0 && (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr != 0 {
		// Compute the timeout for the next timer on the list.

		XTcl_GetTime(tls, bp)
		(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fsec = (*TimerHandler)(unsafe.Pointer((*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr)).Ftime.Fsec - (*Tcl_Time)(unsafe.Pointer(bp)).Fsec
		(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fusec = (*TimerHandler)(unsafe.Pointer((*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr)).Ftime.Fusec - (*Tcl_Time)(unsafe.Pointer(bp)).Fusec
		if (*Tcl_Time)(unsafe.Pointer(bp)).Fusec < 0 {
			*(*int32)(unsafe.Pointer(bp)) -= 1
			*(*int32)(unsafe.Pointer(bp + 4)) += 1000000
		}
		if (*Tcl_Time)(unsafe.Pointer(bp)).Fsec < 0 {
			(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fsec = 0
			(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fusec = 0
		}
	} else {
		return
	}

	XTcl_SetMaxBlockTime(tls, bp)
}

//----------------------------------------------------------------------
//
// TimerCheckProc --
//
//	This function is called by Tcl_DoOneEvent to check the timer event
//	source for events. This routine checks both the idle and after timer
//	lists.
//
// Results:
//	None.
//
// Side effects:
//	May queue an event and update the maximum notifier block time.
//
//----------------------------------------------------------------------

func sTimerCheckProc(tls *libc.TLS, data ClientData, flags int32) { /* tclTimer.c:458:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var timerEvPtr uintptr
	// var blockTime Tcl_Time at bp, 8

	var tsdPtr uintptr = sInitTimer(tls)

	if flags&(int32(1)<<4) != 0 && (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr != 0 {
		// Compute the timeout for the next timer on the list.

		XTcl_GetTime(tls, bp)
		(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fsec = (*TimerHandler)(unsafe.Pointer((*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr)).Ftime.Fsec - (*Tcl_Time)(unsafe.Pointer(bp)).Fsec
		(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fusec = (*TimerHandler)(unsafe.Pointer((*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr)).Ftime.Fusec - (*Tcl_Time)(unsafe.Pointer(bp)).Fusec
		if (*Tcl_Time)(unsafe.Pointer(bp)).Fusec < 0 {
			*(*int32)(unsafe.Pointer(bp)) -= 1
			*(*int32)(unsafe.Pointer(bp + 4)) += 1000000
		}
		if (*Tcl_Time)(unsafe.Pointer(bp)).Fsec < 0 {
			(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fsec = 0
			(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fusec = 0
		}

		// If the first timer has expired, stick an event on the queue.

		if (*Tcl_Time)(unsafe.Pointer(bp)).Fsec == 0 && (*Tcl_Time)(unsafe.Pointer(bp)).Fusec == 0 && !((*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FtimerPending != 0) {
			(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FtimerPending = 1
			timerEvPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_Event{})))
			(*Tcl_Event)(unsafe.Pointer(timerEvPtr)).Fproc = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, int32) int32
			}{sTimerHandlerEventProc}))
			XTcl_QueueEvent(tls, timerEvPtr, TCL_QUEUE_TAIL)
		}
	}
}

//----------------------------------------------------------------------
//
// TimerHandlerEventProc --
//
//	This function is called by Tcl_ServiceEvent when a timer event reaches
//	the front of the event queue. This function handles the event by
//	invoking the callbacks for all timers that are ready.
//
// Results:
//	Returns 1 if the event was handled, meaning it should be removed from
//	the queue. Returns 0 if the event was not handled, meaning it should
//	stay on the queue. The only time the event isn't handled is if the
//	TCL_TIMER_EVENTS flag bit isn't set.
//
// Side effects:
//	Whatever the timer handler callback functions do.
//
//----------------------------------------------------------------------

func sTimerHandlerEventProc(tls *libc.TLS, evPtr uintptr, flags int32) int32 { /* tclTimer.c:520:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var timerHandlerPtr uintptr
	var nextPtrPtr uintptr
	// var time Tcl_Time at bp, 8

	var currentTimerId int32
	var tsdPtr uintptr = sInitTimer(tls)

	// Do nothing if timers aren't enabled. This leaves the event on the
	// queue, so we will get to it as soon as ServiceEvents() is called with
	// timers enabled.

	if !(flags&(int32(1)<<4) != 0) {
		return 0
	}

	// The code below is trickier than it may look, for the following reasons:
	//
	// 1. New handlers can get added to the list while the current one is
	//	  being processed. If new ones get added, we don't want to process
	//	  them during this pass through the list to avoid starving other event
	//	  sources. This is implemented using the token number in the handler:
	//	  new handlers will have a newer token than any of the ones currently
	//	  on the list.
	// 2. The handler can call Tcl_DoOneEvent, so we have to remove the
	//	  handler from the list before calling it. Otherwise an infinite loop
	//	  could result.
	// 3. Tcl_DeleteTimerHandler can be called to remove an element from the
	//	  list while a handler is executing, so the list could change
	//	  structure during the call.
	// 4. Because we only fetch the current time before entering the loop, the
	//	  only way a new timer will even be considered runnable is if its
	//	  expiration time is within the same millisecond as the current time.
	//	  This is fairly likely on Windows, since it has a course granularity
	//	  clock. Since timers are placed on the queue in time order with the
	//	  most recently created handler appearing after earlier ones with the
	//	  same expiration time, we don't have to worry about newer generation
	//	  timers appearing before later ones.

	(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FtimerPending = 0
	currentTimerId = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FlastTimerId
	XTcl_GetTime(tls, bp)
	for 1 != 0 {
		nextPtrPtr = tsdPtr
		timerHandlerPtr = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FfirstTimerHandlerPtr
		if timerHandlerPtr == uintptr(0) {
			break
		}

		if (*Tcl_Time)(unsafe.Pointer(bp)).Fsec < (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftime.Fsec || (*Tcl_Time)(unsafe.Pointer(bp)).Fsec == (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftime.Fsec && (*Tcl_Time)(unsafe.Pointer(bp)).Fusec < (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftime.Fusec {
			break
		}

		// Bail out if the next timer is of a newer generation.

		if currentTimerId-int32((*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Ftoken) < 0 {
			break
		}

		// Remove the handler from the queue before invoking it, to avoid
		// potential reentrancy problems.

		*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).FnextPtr
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).Fproc})).f(tls, (*TimerHandler)(unsafe.Pointer(timerHandlerPtr)).FclientData)
		XTclpFree(tls, timerHandlerPtr)
	}
	sTimerSetupProc(tls, uintptr(0), int32(1)<<4)
	return 1
}

//--------------------------------------------------------------
//
// Tcl_DoWhenIdle --
//
//	Arrange for proc to be invoked the next time the system is idle (i.e.,
//	just before the next time that Tcl_DoOneEvent would have to wait for
//	something to happen).
//
// Results:
//	None.
//
// Side effects:
//	Proc will eventually be called, with clientData as argument. See the
//	manual entry for details.
//
//--------------------------------------------------------------

func XTcl_DoWhenIdle(tls *libc.TLS, proc uintptr, clientData ClientData) { /* tclTimer.c:620:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var idlePtr uintptr
	// var blockTime Tcl_Time at bp, 8

	var tsdPtr uintptr = sInitTimer(tls)

	idlePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(IdleHandler{})))
	(*IdleHandler)(unsafe.Pointer(idlePtr)).Fproc = proc
	(*IdleHandler)(unsafe.Pointer(idlePtr)).FclientData = clientData
	(*IdleHandler)(unsafe.Pointer(idlePtr)).Fgeneration = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleGeneration
	(*IdleHandler)(unsafe.Pointer(idlePtr)).FnextPtr = uintptr(0)
	if (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FlastIdlePtr == uintptr(0) {
		(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList = idlePtr
	} else {
		(*IdleHandler)(unsafe.Pointer((*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FlastIdlePtr)).FnextPtr = idlePtr
	}
	(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FlastIdlePtr = idlePtr

	(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fsec = 0
	(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fusec = 0
	XTcl_SetMaxBlockTime(tls, bp)
}

//----------------------------------------------------------------------
//
// Tcl_CancelIdleCall --
//
//	If there are any when-idle calls requested to a given function with
//	given clientData, cancel all of them.
//
// Results:
//	None.
//
// Side effects:
//	If the proc/clientData combination were on the when-idle list, they
//	are removed so that they will never be called.
//
//----------------------------------------------------------------------

func XTcl_CancelIdleCall(tls *libc.TLS, proc uintptr, clientData ClientData) { /* tclTimer.c:664:1: */
	var idlePtr uintptr
	var prevPtr uintptr
	var nextPtr uintptr
	var tsdPtr uintptr = sInitTimer(tls)

	prevPtr = uintptr(0)
	idlePtr = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList
__1:
	if !(idlePtr != uintptr(0)) {
		goto __3
	}
	{
		for (*IdleHandler)(unsafe.Pointer(idlePtr)).Fproc == proc &&
			(*IdleHandler)(unsafe.Pointer(idlePtr)).FclientData == clientData {
			nextPtr = (*IdleHandler)(unsafe.Pointer(idlePtr)).FnextPtr
			XTclpFree(tls, idlePtr)
			idlePtr = nextPtr
			if prevPtr == uintptr(0) {
				(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList = idlePtr
			} else {
				(*IdleHandler)(unsafe.Pointer(prevPtr)).FnextPtr = idlePtr
			}
			if idlePtr == uintptr(0) {
				(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FlastIdlePtr = prevPtr
				return
			}
		}

	}
	goto __2
__2:
	prevPtr = idlePtr
	idlePtr = (*IdleHandler)(unsafe.Pointer(idlePtr)).FnextPtr
	goto __1
	goto __3
__3:
}

//----------------------------------------------------------------------
//
// TclServiceIdle --
//
//	This function is invoked by the notifier when it becomes idle. It will
//	invoke all idle handlers that are present at the time the call is
//	invoked, but not those added during idle processing.
//
// Results:
//	The return value is 1 if TclServiceIdle found something to do,
//	otherwise return value is 0.
//
// Side effects:
//	Invokes all pending idle handlers.
//
//----------------------------------------------------------------------

func XTclServiceIdle(tls *libc.TLS) int32 { /* tclTimer.c:712:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var idlePtr uintptr
	var oldGeneration int32
	// var blockTime Tcl_Time at bp, 8

	var tsdPtr uintptr = sInitTimer(tls)

	if (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList == uintptr(0) {
		return 0
	}

	oldGeneration = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleGeneration
	(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleGeneration++

	// The code below is trickier than it may look, for the following reasons:
	//
	// 1. New handlers can get added to the list while the current one is
	//	  being processed. If new ones get added, we don't want to process
	//	  them during this pass through the list (want to check for other work
	//	  to do first). This is implemented using the generation number in the
	//	  handler: new handlers will have a different generation than any of
	//	  the ones currently on the list.
	// 2. The handler can call Tcl_DoOneEvent, so we have to remove the
	//	  handler from the list before calling it. Otherwise an infinite loop
	//	  could result.
	// 3. Tcl_CancelIdleCall can be called to remove an element from the list
	//	  while a handler is executing, so the list could change structure
	//	  during the call.

	for idlePtr = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList; idlePtr != uintptr(0) &&
		oldGeneration-(*IdleHandler)(unsafe.Pointer(idlePtr)).Fgeneration >= 0; idlePtr = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList {
		(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList = (*IdleHandler)(unsafe.Pointer(idlePtr)).FnextPtr
		if (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList == uintptr(0) {
			(*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FlastIdlePtr = uintptr(0)
		}
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*IdleHandler)(unsafe.Pointer(idlePtr)).Fproc})).f(tls, (*IdleHandler)(unsafe.Pointer(idlePtr)).FclientData)
		XTclpFree(tls, idlePtr)
	}
	if (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FidleList != 0 {
		(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fsec = 0
		(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fusec = 0
		XTcl_SetMaxBlockTime(tls, bp)
	}
	return 1
}

//----------------------------------------------------------------------
//
// Tcl_AfterObjCmd --
//
//	This function is invoked to process the "after" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_AfterObjCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclTimer.c:781:1: */
	bp := tls.Alloc(160)
	defer tls.Free(160)

	*(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* ms */)) = int64(0) // Number of milliseconds to wait
	// var wakeup Tcl_Time at bp+144, 8

	var afterPtr uintptr
	var assocPtr uintptr
	// var length int32 at bp+152, 4

	// var index int32 at bp+128, 4

	var tsdPtr uintptr = sInitTimer(tls)

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+56951)
		return TCL_ERROR
	}

	// Create the "after" information associated for this interpreter, if it
	// doesn't already exist.

	assocPtr = XTcl_GetAssocData(tls, interp, ts+64112, uintptr(0))
	if assocPtr == uintptr(0) {
		assocPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(AfterAssocData{})))
		(*AfterAssocData)(unsafe.Pointer(assocPtr)).Finterp = interp
		(*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr = uintptr(0)
		XTcl_SetAssocData(tls, interp, ts+64112, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr)
		}{sAfterCleanupProc})), assocPtr)
	}

	// First lets see if the command was passed a number as the first argument.

	if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) ||
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclWideIntType)) ||
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).FtypePtr == uintptr(unsafe.Pointer(&XtclBignumType)) ||
		XTcl_GetIndexFromObjStruct(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&afterSubCmds)), int32(unsafe.Sizeof(uintptr(0))), ts+2631, 0, bp+128) != TCL_OK {
		*(*int32)(unsafe.Pointer(bp + 128 /* index */)) = -1
		if XTcl_GetWideIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+136) != TCL_OK {
			var arg uintptr = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))

			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

				ts+64121, libc.VaList(bp, arg)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+16812, ts+64182,
				arg, uintptr(0)))
			return TCL_ERROR
		}
	}

	// At this point, either index = -1 and ms contains the number of ms
	// to wait, or else index is the index of a subcommand.

	switch *(*int32)(unsafe.Pointer(bp + 128 /* index */)) {
	case -1:
		{
			if *(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) < int64(0) {
				*(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* ms */)) = int64(0)
			}
			if objc == 2 {
				return sAfterDelay(tls, interp, *(*Tcl_WideInt)(unsafe.Pointer(bp + 136 /* ms */)))
			}
			afterPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(AfterInfo{})))
			(*AfterInfo)(unsafe.Pointer(afterPtr)).FassocPtr = assocPtr
			if objc == 3 {
				(*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
			} else {
				(*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr = XTcl_ConcatObj(tls, objc-2, objv+uintptr(2)*8)
			}
			(*Tcl_Obj)(unsafe.Pointer((*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr)).FrefCount++

			// The variable below is used to generate unique identifiers for after
			// commands. This id can wrap around, which can potentially cause
			// problems. However, there are not likely to be problems in practice,
			// because after commands can only be requested to about a month in
			// the future, and wrap-around is unlikely to occur in less than about
			// 1-10 years. Thus it's unlikely that any old ids will still be
			// around when wrap-around occurs.

			(*AfterInfo)(unsafe.Pointer(afterPtr)).Fid = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FafterId
			*(*int32)(unsafe.Pointer(tsdPtr + 36)) += 1
			XTcl_GetTime(tls, bp+144)
			*(*int32)(unsafe.Pointer(bp + 144)) += int32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136)) / int64(1000))
			*(*int32)(unsafe.Pointer(bp + 144 + 4)) += int32(*(*Tcl_WideInt)(unsafe.Pointer(bp + 136))%int64(1000)) * 1000
			if (*Tcl_Time)(unsafe.Pointer(bp+144)).Fusec > 1000000 {
				(*Tcl_Time)(unsafe.Pointer(bp+144 /* &wakeup */)).Fsec++
				*(*int32)(unsafe.Pointer(bp + 144 + 4)) -= 1000000
			}
			(*AfterInfo)(unsafe.Pointer(afterPtr)).Ftoken = XTclCreateAbsoluteTimerHandler(tls, bp+144,
				*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sAfterProc})), afterPtr)
			(*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr = (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr
			(*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr = afterPtr
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+64191, libc.VaList(bp+56, (*AfterInfo)(unsafe.Pointer(afterPtr)).Fid)))
			return TCL_OK

		}
	case 0 /* AFTER_CANCEL */ :
		{
			var commandPtr uintptr
			var command uintptr
			var tempCommand uintptr
			// var tempLength int32 at bp+156, 4

			if objc < 3 {
				XTcl_WrongNumArgs(tls, interp, 2, objv, ts+64200)
				return TCL_ERROR
			}
			if objc == 3 {
				commandPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
			} else {
				commandPtr = XTcl_ConcatObj(tls, objc-2, objv+uintptr(2)*8)
			}
			command = XTcl_GetStringFromObj(tls, commandPtr, bp+152)
			for afterPtr = (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr; afterPtr != uintptr(0); afterPtr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr {
				tempCommand = XTcl_GetStringFromObj(tls, (*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr,
					bp+156)
				if *(*int32)(unsafe.Pointer(bp + 152)) == *(*int32)(unsafe.Pointer(bp + 156)) &&
					!(libc.Xmemcmp(tls, command, tempCommand, uint64(*(*int32)(unsafe.Pointer(bp + 152)))) != 0) {
					break
				}
			}
			if afterPtr == uintptr(0) {
				afterPtr = sGetAfterEvent(tls, assocPtr, commandPtr)
			}
			if objc != 3 {
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = commandPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}
			if afterPtr != uintptr(0) {
				if (*AfterInfo)(unsafe.Pointer(afterPtr)).Ftoken != uintptr(0) {
					XTcl_DeleteTimerHandler(tls, (*AfterInfo)(unsafe.Pointer(afterPtr)).Ftoken)
				} else {
					XTcl_CancelIdleCall(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sAfterProc})), afterPtr)
				}
				sFreeAfterPtr(tls, afterPtr)
			}
			break

		}
	case 1 /* AFTER_IDLE */ :
		if objc < 3 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+64211)
			return TCL_ERROR
		}
		afterPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(AfterInfo{})))
		(*AfterInfo)(unsafe.Pointer(afterPtr)).FassocPtr = assocPtr
		if objc == 3 {
			(*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr = *(*uintptr)(unsafe.Pointer(objv + 2*8))
		} else {
			(*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr = XTcl_ConcatObj(tls, objc-2, objv+uintptr(2)*8)
		}
		(*Tcl_Obj)(unsafe.Pointer((*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr)).FrefCount++
		(*AfterInfo)(unsafe.Pointer(afterPtr)).Fid = (*ThreadSpecificData11)(unsafe.Pointer(tsdPtr)).FafterId
		*(*int32)(unsafe.Pointer(tsdPtr + 36)) += 1
		(*AfterInfo)(unsafe.Pointer(afterPtr)).Ftoken = uintptr(0)
		(*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr = (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr
		(*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr = afterPtr
		XTcl_DoWhenIdle(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sAfterProc})), afterPtr)
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+64191, libc.VaList(bp+64, (*AfterInfo)(unsafe.Pointer(afterPtr)).Fid)))
		break
	case 2 /* AFTER_INFO */ :
		if objc == 2 {
			var resultObj uintptr = XTcl_NewObj(tls)

			for afterPtr = (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr; afterPtr != uintptr(0); afterPtr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr {
				if (*AfterAssocData)(unsafe.Pointer(assocPtr)).Finterp == interp {
					XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, XTcl_ObjPrintf(tls,
						ts+64191, libc.VaList(bp+72, (*AfterInfo)(unsafe.Pointer(afterPtr)).Fid)))
				}
			}
			XTcl_SetObjResult(tls, interp, resultObj)
			return TCL_OK
		}
		if objc != 3 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+64231)
			return TCL_ERROR
		}
		afterPtr = sGetAfterEvent(tls, assocPtr, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
		if afterPtr == uintptr(0) {
			var eventStr uintptr = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 2*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
			}()

			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+64236, libc.VaList(bp+80, eventStr)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+88, ts+4178, ts+7699, ts+28325, eventStr, uintptr(0)))
			return TCL_ERROR
		} else {
			var resultListPtr uintptr = XTcl_NewObj(tls)

			XTcl_ListObjAppendElement(tls, interp, resultListPtr,
				(*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr)
			XTcl_ListObjAppendElement(tls, interp, resultListPtr, XTcl_NewStringObj(tls,
				func() uintptr {
					if (*AfterInfo)(unsafe.Pointer(afterPtr)).Ftoken == uintptr(0) {
						return ts + 23345 /* "idle" */
					}
					return ts + 64261 /* "timer" */
				}(), -1))
			XTcl_SetObjResult(tls, interp, resultListPtr)
		}
		break
	default:
		XTcl_Panic(tls, ts+64267, 0)
	}
	return TCL_OK
}

var afterSubCmds = [4]uintptr{
	ts + 42429, ts + 23345, ts + 14096, uintptr(0),
} /* tclTimer.c:793:23 */

//----------------------------------------------------------------------
//
// AfterDelay --
//
//	Implements the blocking delay behaviour of [after $time]. Tricky
//	because it has to take into account any time limit that has been set.
//
// Results:
//	Standard Tcl result code (with error set if an error occurred due to a
//	time limit being exceeded or being canceled).
//
// Side effects:
//	May adjust the time limit granularity marker.
//
//----------------------------------------------------------------------

func sAfterDelay(tls *libc.TLS, interp uintptr, ms Tcl_WideInt) int32 { /* tclTimer.c:1011:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var iPtr uintptr = interp
	// var endTime Tcl_Time at bp+8, 8

	// var now Tcl_Time at bp, 8

	var diff Tcl_WideInt

	XTcl_GetTime(tls, bp)
	*(*Tcl_Time)(unsafe.Pointer(bp + 8 /* endTime */)) = *(*Tcl_Time)(unsafe.Pointer(bp /* now */))
	*(*int32)(unsafe.Pointer(bp + 8)) += int32(ms / int64(1000))
	*(*int32)(unsafe.Pointer(bp + 8 + 4)) += int32(int32(ms%int64(1000)) * 1000)
	if (*Tcl_Time)(unsafe.Pointer(bp+8)).Fusec >= 1000000 {
		(*Tcl_Time)(unsafe.Pointer(bp+8 /* &endTime */)).Fsec++
		*(*int32)(unsafe.Pointer(bp + 8 + 4)) -= 1000000
	}

	for ok := true; ok; ok = (*Tcl_Time)(unsafe.Pointer(bp)).Fsec < (*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec || (*Tcl_Time)(unsafe.Pointer(bp)).Fsec == (*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec && (*Tcl_Time)(unsafe.Pointer(bp)).Fusec < (*Tcl_Time)(unsafe.Pointer(bp+8)).Fusec {
		if XTcl_AsyncReady(tls) != 0 {
			if XTcl_AsyncInvoke(tls, interp, TCL_OK) != TCL_OK {
				return TCL_ERROR
			}
		}
		if XTcl_Canceled(tls, interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR {
			return TCL_ERROR
		}
		if (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent != uintptr(0) &&
			((*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fsec < (*Tcl_Time)(unsafe.Pointer(bp)).Fsec || (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fsec == (*Tcl_Time)(unsafe.Pointer(bp)).Fsec && (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fusec < (*Tcl_Time)(unsafe.Pointer(bp)).Fusec) {
			(*Interp)(unsafe.Pointer(iPtr)).Flimit.FgranularityTicker = 0
			if XTcl_LimitCheck(tls, interp) != TCL_OK {
				return TCL_ERROR
			}
		}
		if (*Interp)(unsafe.Pointer(iPtr)).Flimit.FtimeEvent == uintptr(0) ||
			((*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec < (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fsec || (*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec == (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fsec && (*Tcl_Time)(unsafe.Pointer(bp+8)).Fusec < (*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fusec) {
			diff = int64(1000)*(Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec)-Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp)).Fsec)) + Tcl_WideInt(((*Tcl_Time)(unsafe.Pointer(bp+8)).Fusec-(*Tcl_Time)(unsafe.Pointer(bp)).Fusec+999)/1000)
			if diff > int64(0x7fffffff) {
				diff = int64(0x7fffffff)
			}
			if diff > int64(TCL_TIME_MAXIMUM_SLICE) {
				diff = int64(TCL_TIME_MAXIMUM_SLICE)
			}
			if diff == int64(0) && ((*Tcl_Time)(unsafe.Pointer(bp)).Fsec < (*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec || (*Tcl_Time)(unsafe.Pointer(bp)).Fsec == (*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec && (*Tcl_Time)(unsafe.Pointer(bp)).Fusec < (*Tcl_Time)(unsafe.Pointer(bp+8)).Fusec) {
				diff = int64(1)
			}
			if diff > int64(0) {
				XTcl_Sleep(tls, int32(int32(diff)))
				if diff < int64(SLEEP_OFFLOAD_GETTIMEOFDAY) {
					break
				}
			} else {
				break
			}
		} else {
			diff = int64(1000)*(Tcl_WideInt((*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fsec)-Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp)).Fsec)) + Tcl_WideInt(((*Interp)(unsafe.Pointer(iPtr)).Flimit.Ftime.Fusec-(*Tcl_Time)(unsafe.Pointer(bp)).Fusec)/1000)
			if diff > int64(0x7fffffff) {
				diff = int64(0x7fffffff)
			}
			if diff > int64(TCL_TIME_MAXIMUM_SLICE) {
				diff = int64(TCL_TIME_MAXIMUM_SLICE)
			}
			if diff > int64(0) {
				XTcl_Sleep(tls, int32(int32(diff)))
			}
			if XTcl_AsyncReady(tls) != 0 {
				if XTcl_AsyncInvoke(tls, interp, TCL_OK) != TCL_OK {
					return TCL_ERROR
				}
			}
			if XTcl_Canceled(tls, interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR {
				return TCL_ERROR
			}
			if XTcl_LimitCheck(tls, interp) != TCL_OK {
				return TCL_ERROR
			}
		}
		XTcl_GetTime(tls, bp)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// GetAfterEvent --
//
//	This function parses an "after" id such as "after#4" and returns a
//	pointer to the AfterInfo structure.
//
// Results:
//	The return value is either a pointer to an AfterInfo structure, if one
//	is found that corresponds to "cmdString" and is for interp, or NULL if
//	no corresponding after event can be found.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetAfterEvent(tls *libc.TLS, assocPtr uintptr, commandPtr uintptr) uintptr { /* tclTimer.c:1116:18: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var cmdString uintptr // Textual identifier for after event, such as
	// "after#6".
	var afterPtr uintptr
	var id int32
	// var end uintptr at bp, 8

	cmdString = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(commandPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(commandPtr)).Fbytes
		}
		return XTcl_GetString(tls, commandPtr)
	}()
	if libc.Xstrncmp(tls, cmdString, ts+64321, uint64(6)) != 0 {
		return uintptr(0)
	}
	cmdString += uintptr(6)
	id = int32(libc.Xstrtoul(tls, cmdString, bp, 10))
	if *(*uintptr)(unsafe.Pointer(bp)) == cmdString || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0 {
		return uintptr(0)
	}
	for afterPtr = (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr; afterPtr != uintptr(0); afterPtr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr {
		if (*AfterInfo)(unsafe.Pointer(afterPtr)).Fid == id {
			return afterPtr
		}
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// AfterProc --
//
//	Timer callback to execute commands registered with the "after"
//	command.
//
// Results:
//	None.
//
// Side effects:
//	Executes whatever command was specified. If the command returns an
//	error, then the command "bgerror" is invoked to process the error; if
//	bgerror fails then information about the error is output on stderr.
//
//----------------------------------------------------------------------

func sAfterProc(tls *libc.TLS, clientData ClientData) { /* tclTimer.c:1166:1: */
	var afterPtr uintptr = clientData
	var assocPtr uintptr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FassocPtr
	var prevPtr uintptr
	var result int32
	var interp uintptr

	// First remove the callback from our list of callbacks; otherwise someone
	// could delete the callback while it's being executed, which could cause
	// a core dump.

	if (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr == afterPtr {
		(*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr
	} else {
		for prevPtr = (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr; (*AfterInfo)(unsafe.Pointer(prevPtr)).FnextPtr != afterPtr; prevPtr = (*AfterInfo)(unsafe.Pointer(prevPtr)).FnextPtr {
			// Empty loop body.
		}
		(*AfterInfo)(unsafe.Pointer(prevPtr)).FnextPtr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr
	}

	// Execute the callback.

	interp = (*AfterAssocData)(unsafe.Pointer(assocPtr)).Finterp
	XTcl_Preserve(tls, interp)
	result = XTcl_EvalObjEx(tls, interp, (*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr, TCL_EVAL_GLOBAL)
	if result != TCL_OK {
		XTcl_AddErrorInfo(tls, interp, ts+64328)
		XTcl_BackgroundException(tls, interp, result)
	}
	XTcl_Release(tls, interp)

	// Free the memory for the callback.

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTclpFree(tls, afterPtr)
}

//----------------------------------------------------------------------
//
// FreeAfterPtr --
//
//	This function removes an "after" command from the list of those that
//	are pending and frees its resources. This function does *not* cancel
//	the timer handler; if that's needed, the caller must do it.
//
// Results:
//	None.
//
// Side effects:
//	The memory associated with afterPtr is released.
//
//----------------------------------------------------------------------

func sFreeAfterPtr(tls *libc.TLS, afterPtr uintptr) { /* tclTimer.c:1231:1: */
	var prevPtr uintptr
	var assocPtr uintptr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FassocPtr

	if (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr == afterPtr {
		(*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr
	} else {
		for prevPtr = (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr; (*AfterInfo)(unsafe.Pointer(prevPtr)).FnextPtr != afterPtr; prevPtr = (*AfterInfo)(unsafe.Pointer(prevPtr)).FnextPtr {
			// Empty loop body.
		}
		(*AfterInfo)(unsafe.Pointer(prevPtr)).FnextPtr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr
	}
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	XTclpFree(tls, afterPtr)
}

//----------------------------------------------------------------------
//
// AfterCleanupProc --
//
//	This function is invoked whenever an interpreter is deleted
//	to cleanup the AssocData for "tclAfter".
//
// Results:
//	None.
//
// Side effects:
//	After commands are removed.
//
//----------------------------------------------------------------------

// ARGSUSED
func sAfterCleanupProc(tls *libc.TLS, clientData ClientData, interp uintptr) { /* tclTimer.c:1269:1: */
	var assocPtr uintptr = clientData
	var afterPtr uintptr

	for (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr != uintptr(0) {
		afterPtr = (*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr
		(*AfterAssocData)(unsafe.Pointer(assocPtr)).FfirstAfterPtr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FnextPtr
		if (*AfterInfo)(unsafe.Pointer(afterPtr)).Ftoken != uintptr(0) {
			XTcl_DeleteTimerHandler(tls, (*AfterInfo)(unsafe.Pointer(afterPtr)).Ftoken)
		} else {
			XTcl_CancelIdleCall(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sAfterProc})), afterPtr)
		}
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*AfterInfo)(unsafe.Pointer(afterPtr)).FcommandPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		XTclpFree(tls, afterPtr)
	}
	XTclpFree(tls, assocPtr)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// indent-tabs-mode: nil
// End:

//----------------------------------------------------------------------
//
// TclTommath_Init --
//
//	Initializes the TclTomMath 'package', which exists as a
//	placeholder so that the package data can be used to hold
//	a stub table pointer.
//
// Results:
//	Returns a standard Tcl result.
//
// Side effects:
//	Installs the stub table for tommath.
//
//----------------------------------------------------------------------

func XTclTommath_Init(tls *libc.TLS, interp uintptr) int32 { /* tclTomMathInterface.c:39:1: */
	// TIP #268: Full patchlevel instead of just major.minor

	if XTcl_PkgProvideEx(tls, interp, ts+64350, ts+7109,
		uintptr(unsafe.Pointer(&XtclTomMathStubs))) != TCL_OK {
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclBN_epoch --
//
//	Return the epoch number of the TclTomMath stubs table
//
// Results:
//	Returns an arbitrary integer that does not decrease with
//	release.  Stubs tables with different epochs are incompatible.
//
//----------------------------------------------------------------------

func XTclBN_epoch(tls *libc.TLS) int32 { /* tclTomMathInterface.c:66:1: */
	return TCLTOMMATH_EPOCH
}

//----------------------------------------------------------------------
//
// TclBN_revision --
//
//	Returns the revision level of the TclTomMath stubs table
//
// Results:
//	Returns an arbitrary integer that increases with revisions.
//	If a client requires a given epoch and revision, any Stubs table
//	with the same epoch and an equal or higher revision satisfies
//	the request.
//
//----------------------------------------------------------------------

func XTclBN_revision(tls *libc.TLS) int32 { /* tclTomMathInterface.c:88:1: */
	return TCLTOMMATH_REVISION
}

//----------------------------------------------------------------------
//
// TclBNInitBignumFromLong --
//
//	Allocate and initialize a 'bignum' from a native 'long'.
//
// Results:
//	None.
//
// Side effects:
//	The 'bignum' is constructed.
//
//----------------------------------------------------------------------

func XTclBNInitBignumFromLong(tls *libc.TLS, a uintptr, initVal int32) int32 { /* tclTomMathInterface.c:110:1: */
	var v uint32
	var p uintptr

	// Allocate enough memory to hold the largest possible long

	if XTclBN_mp_init(tls, a) != MP_OKAY {
		XTcl_Panic(tls, ts+64363, 0)
	}

	// Convert arg to sign and magnitude.

	if initVal < 0 {
		(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_NEG
		v = -uint32(initVal)
	} else {
		(*Mp_int)(unsafe.Pointer(a)).Fsign = MP_ZPOS
		v = uint32(initVal)
	}

	// Store the magnitude in the bignum.

	p = (*Mp_int)(unsafe.Pointer(a)).Fdp
	for v != 0 {
		*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&p, 4))) = Mp_digit(v & (Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT) - Mp_digit(1)))
		v >>= MP_DIGIT_BIT
	}
	(*Mp_int)(unsafe.Pointer(a)).Fused = int32((int64(p) - int64((*Mp_int)(unsafe.Pointer(a)).Fdp)) / 4)
	return MP_OKAY
}

//----------------------------------------------------------------------
//
// TclBNInitBignumFromWideInt --
//
//	Allocate and initialize a 'bignum' from a Tcl_WideInt
//
// Results:
//	None.
//
// Side effects:
//	The 'bignum' is constructed.
//
//----------------------------------------------------------------------

func XTclBNInitBignumFromWideInt(tls *libc.TLS, a uintptr, v Tcl_WideInt) int32 { /* tclTomMathInterface.c:167:1: */
	if v < int64(0) {
		XTclBNInitBignumFromWideUInt(tls, a, -Tcl_WideUInt(v))
		return XTclBN_mp_neg(tls, a, a)
	}
	XTclBNInitBignumFromWideUInt(tls, a, Tcl_WideUInt(v))
	return MP_OKAY
}

//----------------------------------------------------------------------
//
// TclBNInitBignumFromWideUInt --
//
//	Allocate and initialize a 'bignum' from a Tcl_WideUInt
//
// Results:
//	None.
//
// Side effects:
//	The 'bignum' is constructed.
//
//----------------------------------------------------------------------

func XTclBNInitBignumFromWideUInt(tls *libc.TLS, a uintptr, v Tcl_WideUInt) int32 { /* tclTomMathInterface.c:196:1: */
	var p uintptr

	// Allocate enough memory to hold the largest possible Tcl_WideUInt.

	if XTclBN_mp_init(tls, a) != MP_OKAY {
		XTcl_Panic(tls, ts+64413, 0)
	}

	(*Mp_int)(unsafe.Pointer(a)).Fsign = 0

	// Store the magnitude in the bignum.

	p = (*Mp_int)(unsafe.Pointer(a)).Fdp
	for v != 0 {
		*(*Mp_digit)(unsafe.Pointer(libc.PostIncUintptr(&p, 4))) = Mp_digit(v & uint64(Mp_digit(Mp_digit(1))<<Mp_digit(MP_DIGIT_BIT)-Mp_digit(1)))
		v >>= MP_DIGIT_BIT
	}
	(*Mp_int)(unsafe.Pointer(a)).Fused = int32((int64(p) - int64((*Mp_int)(unsafe.Pointer(a)).Fdp)) / 4)
	return MP_OKAY
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

var XtclTomMathStubsPtr uintptr = uintptr(0) /* tclTomMathStubLib.c:18:23 */

//----------------------------------------------------------------------
//
// TclTomMathInitStubs --
//
//	Initializes the Stubs table for Tcl's subset of libtommath
//
// Results:
//	Returns a standard Tcl result.
//
// This procedure should not be called directly, but rather through
// the TclTomMath_InitStubs macro, to insure that the Stubs table
// matches the header files used in compilation.
//
//----------------------------------------------------------------------

func XTclTomMathInitializeStubs(tls *libc.TLS, interp uintptr, version uintptr, epoch int32, revision int32) uintptr { /* tclTomMathStubLib.c:38:25: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var exact int32 = 0
	var packageName uintptr = ts + 64350 /* "tcl::tommath" */
	var errMsg uintptr = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 72 /* stubsPtr */)) = uintptr(0)
	var actualVersion uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_PkgRequireEx})).f(tls, interp,
		packageName, version, exact, bp+72 /* &stubsPtr */)

	if actualVersion == uintptr(0) {
		return uintptr(0)
	}
	if *(*uintptr)(unsafe.Pointer(bp + 72)) == uintptr(0) {
		errMsg = ts + 53809 /* "missing stub tab..." */
	} else if (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{(*TclTomMathStubs)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FtclBN_epoch})).f(tls) != epoch {
		errMsg = ts + 64467 /* "epoch number mis..." */
	} else if (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{(*TclTomMathStubs)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FtclBN_revision})).f(tls) != revision {
		errMsg = ts + 64489 /* "requires a later..." */
	} else {
		XtclTomMathStubsPtr = *(*uintptr)(unsafe.Pointer(bp + 72 /* stubsPtr */))
		return actualVersion
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_AppendResult})).f(tls, interp, libc.VaList(bp, ts+53836 /* "Error loading " */, packageName,
		ts+53851, version, ts+53872,
		actualVersion, ts+53890, errMsg, uintptr(0)))
	return uintptr(0)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Structures used to hold information about variable traces:

type TraceVarInfo = struct {
	Fflags       int32
	F__ccgo_pad1 [4]byte
	Flength      Size_t
	Fcommand     [1]int8
	F__ccgo_pad2 [7]byte
} /* tclTrace.c:30:3 */

type CombinedTraceVarInfo = struct {
	FtraceInfo    VarTrace
	FtraceCmdInfo TraceVarInfo
} /* tclTrace.c:35:3 */

// Structure used to hold information about command traces:

type TraceCommandInfo = struct {
	Fflags       int32
	F__ccgo_pad1 [4]byte
	Flength      Size_t
	FstepTrace   Tcl_Trace
	FstartLevel  int32
	F__ccgo_pad2 [4]byte
	FstartCmd    uintptr
	FcurFlags    int32
	FcurCode     int32
	FrefCount    int32
	Fcommand     [1]int8
	F__ccgo_pad3 [3]byte
} /* tclTrace.c:64:3 */

// Each subcommand has a number of 'types' to which it can apply. Currently
// 'execution', 'command' and 'variable' are the only types supported. These
// three arrays MUST be kept in sync! In the future we may provide an API to
// add to the list of supported trace types.

var traceTypeOptions = [4]uintptr{
	ts + 64515, ts + 14158, ts + 4017, uintptr(0),
} /* tclTrace.c:110:19 */
var traceSubCmds = [3]uintptr{
	0,
	0,
	0,
} /* tclTrace.c:113:28 */

// The following structure holds the client data for string-based
// trace procs

type StringTraceData1 = struct {
	FclientData ClientData
	Fproc       uintptr
} /* tclTrace.c:146:9 */

// The following structure holds the client data for string-based
// trace procs

type StringTraceData = StringTraceData1 /* tclTrace.c:149:3 */

// Convenience macros for iterating over the list of traces. Note that each of
// these *must* be treated as a command, and *must* have a block following it.

//----------------------------------------------------------------------
//
// Tcl_TraceObjCmd --
//
//	This function is invoked to process the "trace" Tcl command. See the
//	user documentation for details on what it does.
//
//	Standard syntax as of Tcl 8.4 is:
//	    trace {add|info|remove} {command|variable} name ops cmd
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_TraceObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclTrace.c:187:1: */
	bp := tls.Alloc(117)
	defer tls.Free(117)

	// var optionIndex int32 at bp+48, 4

	var name uintptr
	var flagOps uintptr
	var p uintptr
	// All sub commands of trace add/remove must take at least one more
	// argument. Beyond that we let the subcommand itself control the
	// argument structure.

	// var typeIndex int32 at bp+52, 4

	// All sub commands of trace info must take exactly two more arguments
	// which name the type of thing being traced and the name of the thing
	// being traced.

	// var typeIndex1 int32 at bp+56, 4

	var _objPtr uintptr
	var _objPtr1 uintptr
	var opObj uintptr
	var _objPtr2 uintptr
	// var copyObjv [6]uintptr at bp+64, 48

	var opsList uintptr
	var code int32
	// var numFlags int32 at bp+60, 4

	var tvarPtr uintptr
	var q uintptr
	var clientData ClientData
	// var ops [5]int8 at bp+112, 5

	var resultListPtr uintptr
	var pairObjPtr uintptr
	var elemObjPtr uintptr

	if !(objc < 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+56951)
	return TCL_ERROR
__1:
	;

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&traceOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+48) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 48 /* optionIndex */))) {
	case uint32(0) /* TRACE_ADD */ :
		goto __4
	case uint32(2) /* TRACE_REMOVE */ :
		goto __5
	case uint32(1) /* TRACE_INFO */ :
		goto __6

	case uint32(3) /* TRACE_OLD_VARIABLE */ :
		goto __7
	case uint32(4) /* TRACE_OLD_VDELETE */ :
		goto __8
	case uint32(5) /* TRACE_OLD_VINFO */ :
		goto __9
	}
	goto __3
__4:
__5:

	if !(objc < 3) {
		goto __10
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+64525)
	return TCL_ERROR
__10:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&traceTypeOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+52) != TCL_OK) {
		goto __11
	}
	return TCL_ERROR
__11:
	;
	return (*struct {
		f func(*libc.TLS, uintptr, int32, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{traceSubCmds[*(*int32)(unsafe.Pointer(bp + 52 /* typeIndex */))]})).f(tls, interp, *(*int32)(unsafe.Pointer(bp + 48 /* optionIndex */)), objc, objv)

__6:
	if !(objc < 3) {
		goto __12
	}
	// Delegate other complaints to the type-specific code which can
	// give a better error message.

	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+64540)
	return TCL_ERROR
__12:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&traceTypeOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+56) != TCL_OK) {
		goto __13
	}
	return TCL_ERROR
__13:
	;
	return (*struct {
		f func(*libc.TLS, uintptr, int32, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{traceSubCmds[*(*int32)(unsafe.Pointer(bp + 56 /* typeIndex1 */))]})).f(tls, interp, *(*int32)(unsafe.Pointer(bp + 48 /* optionIndex */)), objc, objv)
	goto __3

__7:
__8:

	if !(objc != 5) {
		goto __14
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+64550)
	return TCL_ERROR
__14:
	;

__15:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __18
	}
	XTclAllocateFreeObjects(tls)
__18:
	;
	opsList = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __16
__16:
	if 0 != 0 {
		goto __15
	}
	goto __17
__17:
	;
	(*Tcl_Obj)(unsafe.Pointer(opsList)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(opsList)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(opsList)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(opsList)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(opsList)).FrefCount++
	flagOps = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+60)
	if !(*(*int32)(unsafe.Pointer(bp + 60)) == 0) {
		goto __19
	}
__20:
	_objPtr = opsList
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __23
	}
	XTclFreeObj(tls, _objPtr)
__23:
	;
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	goto badVarOps
__19:
	;
	p = flagOps
__24:
	if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) {
		goto __26
	}

	if !(int32(*(*int8)(unsafe.Pointer(p))) == 'r') {
		goto __27
	}
__29:
	;
__32:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __35
	}
	XTclAllocateFreeObjects(tls)
__35:
	;
	opObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __33
__33:
	if 0 != 0 {
		goto __32
	}
	goto __34
__34:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0) {
		goto __36
	}
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
	goto __37
__36:
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+6057, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 4)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
__37:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)

	goto __30
__30:
	if 0 != 0 {
		goto __29
	}
	goto __31
__31:
	;
	goto __28
__27:
	if !(int32(*(*int8)(unsafe.Pointer(p))) == 'w') {
		goto __38
	}
__40:
	;
__43:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __46
	}
	XTclAllocateFreeObjects(tls)
__46:
	;
	opObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __44
__44:
	if 0 != 0 {
		goto __43
	}
	goto __45
__45:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0) {
		goto __47
	}
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
	goto __48
__47:
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+33651, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 5)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
__48:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)

	goto __41
__41:
	if 0 != 0 {
		goto __40
	}
	goto __42
__42:
	;
	goto __39
__38:
	if !(int32(*(*int8)(unsafe.Pointer(p))) == 'u') {
		goto __49
	}
__51:
	;
__54:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __57
	}
	XTclAllocateFreeObjects(tls)
__57:
	;
	opObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __55
__55:
	if 0 != 0 {
		goto __54
	}
	goto __56
__56:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0) {
		goto __58
	}
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
	goto __59
__58:
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+3965, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 5)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
__59:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)

	goto __52
__52:
	if 0 != 0 {
		goto __51
	}
	goto __53
__53:
	;
	goto __50
__49:
	if !(int32(*(*int8)(unsafe.Pointer(p))) == 'a') {
		goto __60
	}
__62:
	;
__65:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __68
	}
	XTclAllocateFreeObjects(tls)
__68:
	;
	opObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __66
__66:
	if 0 != 0 {
		goto __65
	}
	goto __67
__67:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0) {
		goto __69
	}
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
	goto __70
__69:
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+25675, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 5)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
__70:
	;
	(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)

	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
	goto __61
__60:
__71:
	_objPtr1 = opsList
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __74
	}
	XTclFreeObj(tls, _objPtr1)
__74:
	;
	goto __72
__72:
	if 0 != 0 {
		goto __71
	}
	goto __73
__73:
	;
	goto badVarOps
__61:
	;
__50:
	;
__39:
	;
__28:
	;
	XTcl_ListObjAppendElement(tls, uintptr(0), opsList, opObj)
	goto __25
__25:
	p++
	goto __24
	goto __26
__26:
	;
	*(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0)
	libc.Xmemcpy(tls, bp+64+uintptr(1)*8, objv, uint64(objc)*uint64(unsafe.Sizeof(uintptr(0))))
	*(*uintptr)(unsafe.Pointer(bp + 64 + 4*8)) = opsList
	if !(*(*int32)(unsafe.Pointer(bp + 48)) == 3) {
		goto __75
	}
	code = (*struct {
		f func(*libc.TLS, uintptr, int32, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{traceSubCmds[2]})).f(tls, interp, 0 /* TRACE_ADD */, objc+1, bp+64 /* &copyObjv[0] */)
	goto __76
__75:
	code = (*struct {
		f func(*libc.TLS, uintptr, int32, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{traceSubCmds[2]})).f(tls, interp, 2 /* TRACE_REMOVE */, objc+1, bp+64 /* &copyObjv[0] */)
__76:
	;
__77:
	_objPtr2 = opsList
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __80
	}
	XTclFreeObj(tls, _objPtr2)
__80:
	;
	goto __78
__78:
	if 0 != 0 {
		goto __77
	}
	goto __79
__79:
	;
	return code

__9:

	if !(objc != 3) {
		goto __81
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+4245)
	return TCL_ERROR
__81:
	;
__82:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __85
	}
	XTclAllocateFreeObjects(tls)
__85:
	;
	resultListPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __83
__83:
	if 0 != 0 {
		goto __82
	}
	goto __84
__84:
	;
	(*Tcl_Obj)(unsafe.Pointer(resultListPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultListPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultListPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultListPtr)).FtypePtr = uintptr(0)

	name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)))
	clientData = uintptr(0)
__86:
	if !(libc.AssignUintptr(&clientData, XTcl_VarTraceInfo2(tls, interp, name, uintptr(0), 0, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
	}{sTraceVarProc})), clientData)) != uintptr(0)) {
		goto __87
	}
	tvarPtr = clientData
	q = bp + 112 /* ops */

	pairObjPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	if !((*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_READS != 0) {
		goto __88
	}
	*(*int8)(unsafe.Pointer(q)) = int8('r')
	q++
__88:
	;
	if !((*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_WRITES != 0) {
		goto __89
	}
	*(*int8)(unsafe.Pointer(q)) = int8('w')
	q++
__89:
	;
	if !((*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_UNSETS != 0) {
		goto __90
	}
	*(*int8)(unsafe.Pointer(q)) = int8('u')
	q++
__90:
	;
	if !((*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_ARRAY != 0) {
		goto __91
	}
	*(*int8)(unsafe.Pointer(q)) = int8('a')
	q++
__91:
	;
	*(*int8)(unsafe.Pointer(q)) = int8(0)

	// Build a pair (2-item list) with the ops string as the first obj
	// element and the tvarPtr->command string as the second obj
	// element. Append the pair (as an element) to the end of the
	// result object list.

	elemObjPtr = XTcl_NewStringObj(tls, bp+112, -1)
	XTcl_ListObjAppendElement(tls, uintptr(0), pairObjPtr, elemObjPtr)
	elemObjPtr = XTcl_NewStringObj(tls, tvarPtr+16, -1)
	XTcl_ListObjAppendElement(tls, uintptr(0), pairObjPtr, elemObjPtr)
	XTcl_ListObjAppendElement(tls, interp, resultListPtr, pairObjPtr)
	goto __86
__87:
	;
	XTcl_SetObjResult(tls, interp, resultListPtr)
	goto __3

__3:
	;
	return TCL_OK

badVarOps:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+64567,
		libc.VaList(bp, flagOps)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7949, ts+64618, ts+64624, uintptr(0)))
	return TCL_ERROR
}

var traceOptions = [7]uintptr{
	ts + 2662, ts + 14096, ts + 23771,
	ts + 4017, ts + 64631, ts + 64639,
	uintptr(0),
} /* tclTrace.c:199:23 */

//----------------------------------------------------------------------
//
// TraceExecutionObjCmd --
//
//	Helper function for Tcl_TraceObjCmd; implements the [trace
//	{add|remove|info} execution ...] subcommands. See the user
//	documentation for details on what these do.
//
// Results:
//	Standard Tcl result.
//
// Side effects:
//	Depends on the operation (add, remove, or info) being performed; may
//	add or remove command traces on a command.
//
//----------------------------------------------------------------------

func sTraceExecutionObjCmd(tls *libc.TLS, interp uintptr, optionIndex int32, objc int32, objv uintptr) int32 { /* tclTrace.c:400:1: */
	bp := tls.Alloc(68)
	defer tls.Free(68)

	// var commandLength int32 at bp+60, 4

	// var index int32 at bp+56, 4

	var name uintptr
	var command uintptr
	var length Size_t

	switch uint32(optionIndex) {
	case uint32(0) /* TRACE_ADD */ :
		fallthrough
	case uint32(2) /* TRACE_REMOVE */ :
		{
			var flags int32 = 0
			var i int32
			// var listLen int32 at bp+40, 4

			var result int32
			// var elemPtrs uintptr at bp+48, 8

			if objc != 6 {
				XTcl_WrongNumArgs(tls, interp, 3, objv, ts+64645)
				return TCL_ERROR
			}

			// Make sure the ops argument is a list object; get its length and a
			// pointer to its array of element pointers.

			result = XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+40, bp+48)
			if result != TCL_OK {
				return result
			}
			if *(*int32)(unsafe.Pointer(bp + 40)) == 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

					ts+64665, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+64618, ts+64749,
					uintptr(0)))
				return TCL_ERROR
			}
			for i = 0; i < *(*int32)(unsafe.Pointer(bp + 40 /* listLen */)); i++ {
				if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)) + uintptr(i)*8)), uintptr(unsafe.Pointer(&opStrings)), int32(unsafe.Sizeof(uintptr(0))), ts+64755, TCL_EXACT, bp+56) != TCL_OK {
					return TCL_ERROR
				}
				switch uint32(*(*int32)(unsafe.Pointer(bp + 56 /* index */))) {
				case uint32(0) /* TRACE_EXEC_ENTER */ :
					flags = flags | TCL_TRACE_ENTER_EXEC
					break
				case uint32(1) /* TRACE_EXEC_LEAVE */ :
					flags = flags | TCL_TRACE_LEAVE_EXEC
					break
				case uint32(2) /* TRACE_EXEC_ENTER_STEP */ :
					flags = flags | TCL_TRACE_ENTER_DURING_EXEC
					break
				case uint32(3) /* TRACE_EXEC_LEAVE_STEP */ :
					flags = flags | TCL_TRACE_LEAVE_DURING_EXEC
					break
				}
			}
			command = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 5*8)), bp+60)
			length = Size_t(*(*int32)(unsafe.Pointer(bp + 60 /* commandLength */)))
			if int32(uint32(optionIndex)) == 0 {
				var tcmdPtr uintptr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+52)+1)+length))

				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags = flags
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace = uintptr(0)
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartLevel = 0
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartCmd = uintptr(0)
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Flength = length
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount = 1
				flags = flags | TCL_TRACE_DELETE
				if flags&(TCL_TRACE_ENTER_DURING_EXEC|TCL_TRACE_LEAVE_DURING_EXEC) != 0 {
					flags = flags | (TCL_TRACE_ENTER_EXEC | TCL_TRACE_LEAVE_EXEC)
				}
				libc.Xmemcpy(tls, tcmdPtr+52, command, length+uint64(1))
				name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
				if XTcl_TraceCommand(tls, interp, name, flags, *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
				}{sTraceCommandProc})),
					tcmdPtr) != TCL_OK {
					XTclpFree(tls, tcmdPtr)
					return TCL_ERROR
				}
			} else {
				// Search through all of our traces on this command to see if
				// there's one with the given command. If so, then delete the
				// first one that matches.

				var clientData ClientData

				// First ensure the name given is valid.

				name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
				if XTcl_FindCommand(tls, interp, name, uintptr(0), TCL_LEAVE_ERR_MSG) == uintptr(0) {
					return TCL_ERROR
				}

				clientData = uintptr(0)
				for libc.AssignUintptr(&clientData, XTcl_CommandTraceInfo(tls, interp, name, 0, *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
				}{sTraceCommandProc})), clientData)) != uintptr(0) {
					var tcmdPtr uintptr = clientData

					// In checking the 'flags' field we must remove any extraneous
					// flags which may have been temporarily added by various
					// pieces of the trace mechanism.

					if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Flength == length &&
						(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&(TCL_TRACE_ANY_EXEC|TCL_TRACE_RENAME|TCL_TRACE_DELETE) == flags &&
						libc.Xstrncmp(tls, command, tcmdPtr+52,
							length) == 0 {
						flags = flags | TCL_TRACE_DELETE
						if flags&(TCL_TRACE_ENTER_DURING_EXEC|TCL_TRACE_LEAVE_DURING_EXEC) != 0 {
							flags = flags | (TCL_TRACE_ENTER_EXEC | TCL_TRACE_LEAVE_EXEC)
						}
						XTcl_UntraceCommand(tls, interp, name, flags,
							*(*uintptr)(unsafe.Pointer(&struct {
								f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
							}{sTraceCommandProc})), clientData)
						if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace != uintptr(0) {
							// We need to remove the interpreter-wide trace which
							// we created to allow 'step' traces.

							XTcl_DeleteTrace(tls, interp, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace)
							(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace = uintptr(0)
							XTclpFree(tls, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartCmd)
						}
						if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_EXEC_IN_PROGRESS != 0 {
							// Postpone deletion.

							(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags = 0
						}
						if libc.PostDecInt32(&(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount, 1) <= 1 {
							XTclpFree(tls, tcmdPtr)
						}
						break
					}
				}
			}
			break

		}
	case uint32(1) /* TRACE_INFO */ :
		{
			var clientData ClientData
			var resultListPtr uintptr

			if objc != 4 {
				XTcl_WrongNumArgs(tls, interp, 3, objv, ts+4245)
				return TCL_ERROR
			}

			name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))

			// First ensure the name given is valid.

			if XTcl_FindCommand(tls, interp, name, uintptr(0), TCL_LEAVE_ERR_MSG) == uintptr(0) {
				return TCL_ERROR
			}

			resultListPtr = XTcl_NewListObj(tls, 0, uintptr(0))
			clientData = uintptr(0)
			for libc.AssignUintptr(&clientData, XTcl_CommandTraceInfo(tls, interp, name, 0, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
			}{sTraceCommandProc})), clientData)) != uintptr(0) {
				*(*int32)(unsafe.Pointer(bp + 64 /* numOps */)) = 0
				var opObj uintptr
				var eachTraceObjPtr uintptr
				var elemObjPtr uintptr
				var tcmdPtr uintptr = clientData

				// Build a list with the ops list as the first obj element and the
				// tcmdPtr->command string as the second obj element. Append this
				// list (as an element) to the end of the result object list.

				elemObjPtr = XTcl_NewListObj(tls, 0, uintptr(0))
				(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount++
				if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_ENTER_EXEC != 0 {
					for ok := true; ok; ok = 0 != 0 {
						for ok1 := true; ok1; ok1 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObj = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+64765, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 5)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObj)
				}
				if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_LEAVE_EXEC != 0 {
					for ok2 := true; ok2; ok2 = 0 != 0 {
						for ok3 := true; ok3; ok3 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObj = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+64771, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 5)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObj)
				}
				if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_ENTER_DURING_EXEC != 0 {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						for ok5 := true; ok5; ok5 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObj = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+64777, uint64(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 9)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([10]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObj)
				}
				if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_LEAVE_DURING_EXEC != 0 {
					for ok6 := true; ok6; ok6 = 0 != 0 {
						for ok7 := true; ok7; ok7 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObj = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+64787, uint64(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 9)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([10]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObj)
				}
				XTcl_ListObjLength(tls, uintptr(0), elemObjPtr, bp+64)
				if 0 == *(*int32)(unsafe.Pointer(bp + 64)) {
					for ok8 := true; ok8; ok8 = 0 != 0 {
						var _objPtr uintptr = elemObjPtr
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
					continue
				}
				eachTraceObjPtr = XTcl_NewListObj(tls, 0, uintptr(0))
				XTcl_ListObjAppendElement(tls, uintptr(0), eachTraceObjPtr, elemObjPtr)
				for ok9 := true; ok9; ok9 = 0 != 0 {
					var _objPtr uintptr = elemObjPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				elemObjPtr = uintptr(0)

				XTcl_ListObjAppendElement(tls, uintptr(0), eachTraceObjPtr,
					XTcl_NewStringObj(tls, tcmdPtr+52, -1))
				XTcl_ListObjAppendElement(tls, interp, resultListPtr, eachTraceObjPtr)
			}
			XTcl_SetObjResult(tls, interp, resultListPtr)
			break

		}
	}
	return TCL_OK
}

var opStrings = [5]uintptr{
	ts + 64765, ts + 64771, ts + 64777, ts + 64787, uintptr(0),
} /* tclTrace.c:412:23 */

//----------------------------------------------------------------------
//
// TraceCommandObjCmd --
//
//	Helper function for Tcl_TraceObjCmd; implements the [trace
//	{add|info|remove} command ...] subcommands. See the user documentation
//	for details on what these do.
//
// Results:
//	Standard Tcl result.
//
// Side effects:
//	Depends on the operation (add, remove, or info) being performed; may
//	add or remove command traces on a command.
//
//----------------------------------------------------------------------

func sTraceCommandObjCmd(tls *libc.TLS, interp uintptr, optionIndex int32, objc int32, objv uintptr) int32 { /* tclTrace.c:648:1: */
	bp := tls.Alloc(68)
	defer tls.Free(68)

	// var commandLength int32 at bp+60, 4

	// var index int32 at bp+56, 4

	var name uintptr
	var command uintptr
	var length Size_t

	switch uint32(optionIndex) {
	case uint32(0) /* TRACE_ADD */ :
		fallthrough
	case uint32(2) /* TRACE_REMOVE */ :
		{
			var flags int32 = 0
			var i int32
			// var listLen int32 at bp+40, 4

			var result int32
			// var elemPtrs uintptr at bp+48, 8

			if objc != 6 {
				XTcl_WrongNumArgs(tls, interp, 3, objv, ts+64645)
				return TCL_ERROR
			}

			// Make sure the ops argument is a list object; get its length and a
			// pointer to its array of element pointers.

			result = XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+40, bp+48)
			if result != TCL_OK {
				return result
			}
			if *(*int32)(unsafe.Pointer(bp + 40)) == 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

					ts+64797, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+64618, ts+64749,
					uintptr(0)))
				return TCL_ERROR
			}

			for i = 0; i < *(*int32)(unsafe.Pointer(bp + 40 /* listLen */)); i++ {
				if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)) + uintptr(i)*8)), uintptr(unsafe.Pointer(&opStrings1)), int32(unsafe.Sizeof(uintptr(0))), ts+64755, TCL_EXACT, bp+56) != TCL_OK {
					return TCL_ERROR
				}
				switch uint32(*(*int32)(unsafe.Pointer(bp + 56 /* index */))) {
				case uint32(1) /* TRACE_CMD_RENAME */ :
					flags = flags | TCL_TRACE_RENAME
					break
				case uint32(0) /* TRACE_CMD_DELETE */ :
					flags = flags | TCL_TRACE_DELETE
					break
				}
			}

			command = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 5*8)), bp+60)
			length = Size_t(*(*int32)(unsafe.Pointer(bp + 60 /* commandLength */)))
			if int32(uint32(optionIndex)) == 0 {
				var tcmdPtr uintptr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+52)+1)+length))

				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags = flags
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace = uintptr(0)
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartLevel = 0
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartCmd = uintptr(0)
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Flength = length
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount = 1
				flags = flags | TCL_TRACE_DELETE
				libc.Xmemcpy(tls, tcmdPtr+52, command, length+uint64(1))
				name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
				if XTcl_TraceCommand(tls, interp, name, flags, *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
				}{sTraceCommandProc})),
					tcmdPtr) != TCL_OK {
					XTclpFree(tls, tcmdPtr)
					return TCL_ERROR
				}
			} else {
				// Search through all of our traces on this command to see if
				// there's one with the given command. If so, then delete the
				// first one that matches.

				var clientData ClientData

				// First ensure the name given is valid.

				name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
				if XTcl_FindCommand(tls, interp, name, uintptr(0), TCL_LEAVE_ERR_MSG) == uintptr(0) {
					return TCL_ERROR
				}

				clientData = uintptr(0)
				for libc.AssignUintptr(&clientData, XTcl_CommandTraceInfo(tls, interp, name, 0, *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
				}{sTraceCommandProc})), clientData)) != uintptr(0) {
					var tcmdPtr uintptr = clientData

					if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Flength == length && (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags == flags &&
						libc.Xstrncmp(tls, command, tcmdPtr+52,
							length) == 0 {
						XTcl_UntraceCommand(tls, interp, name, flags|TCL_TRACE_DELETE,
							*(*uintptr)(unsafe.Pointer(&struct {
								f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
							}{sTraceCommandProc})), clientData)
						*(*int32)(unsafe.Pointer(tcmdPtr)) |= TCL_TRACE_DESTROYED
						if libc.PostDecInt32(&(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount, 1) <= 1 {
							XTclpFree(tls, tcmdPtr)
						}
						break
					}
				}
			}
			break

		}
	case uint32(1) /* TRACE_INFO */ :
		{
			var clientData ClientData
			var resultListPtr uintptr

			if objc != 4 {
				XTcl_WrongNumArgs(tls, interp, 3, objv, ts+4245)
				return TCL_ERROR
			}

			// First ensure the name given is valid.

			name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
			if XTcl_FindCommand(tls, interp, name, uintptr(0), TCL_LEAVE_ERR_MSG) == uintptr(0) {
				return TCL_ERROR
			}

			resultListPtr = XTcl_NewListObj(tls, 0, uintptr(0))
			clientData = uintptr(0)
			for libc.AssignUintptr(&clientData, XTcl_CommandTraceInfo(tls, interp, name, 0, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
			}{sTraceCommandProc})), clientData)) != uintptr(0) {
				*(*int32)(unsafe.Pointer(bp + 64 /* numOps */)) = 0
				var opObj uintptr
				var eachTraceObjPtr uintptr
				var elemObjPtr uintptr
				var tcmdPtr uintptr = clientData

				// Build a list with the ops list as the first obj element and the
				// tcmdPtr->command string as the second obj element. Append this
				// list (as an element) to the end of the result object list.

				elemObjPtr = XTcl_NewListObj(tls, 0, uintptr(0))
				(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount++
				if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_RENAME != 0 {
					for ok := true; ok; ok = 0 != 0 {
						for ok1 := true; ok1; ok1 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObj = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+5869, uint64(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 6)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([7]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObj)
				}
				if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_DELETE != 0 {
					for ok2 := true; ok2; ok2 = 0 != 0 {
						for ok3 := true; ok3; ok3 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObj = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes, ts+7850, uint64(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObj)).Fbytes + 6)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObj)).Flength = int32(uint64(unsafe.Sizeof([7]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObj)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObj)
				}
				XTcl_ListObjLength(tls, uintptr(0), elemObjPtr, bp+64)
				if 0 == *(*int32)(unsafe.Pointer(bp + 64)) {
					for ok4 := true; ok4; ok4 = 0 != 0 {
						var _objPtr uintptr = elemObjPtr
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							XTclFreeObj(tls, _objPtr)
						}
					}
					continue
				}
				eachTraceObjPtr = XTcl_NewListObj(tls, 0, uintptr(0))
				XTcl_ListObjAppendElement(tls, uintptr(0), eachTraceObjPtr, elemObjPtr)
				for ok5 := true; ok5; ok5 = 0 != 0 {
					var _objPtr uintptr = elemObjPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}

				elemObjPtr = XTcl_NewStringObj(tls, tcmdPtr+52, -1)
				XTcl_ListObjAppendElement(tls, uintptr(0), eachTraceObjPtr, elemObjPtr)
				XTcl_ListObjAppendElement(tls, interp, resultListPtr, eachTraceObjPtr)
			}
			XTcl_SetObjResult(tls, interp, resultListPtr)
			break

		}
	}
	return TCL_OK
}

var opStrings1 = [3]uintptr{ts + 7850, ts + 5869, uintptr(0)} /* tclTrace.c:658:23 */

//----------------------------------------------------------------------
//
// TraceVariableObjCmd --
//
//	Helper function for Tcl_TraceObjCmd; implements the [trace
//	{add|info|remove} variable ...] subcommands. See the user
//	documentation for details on what these do.
//
// Results:
//	Standard Tcl result.
//
// Side effects:
//	Depends on the operation (add, remove, or info) being performed; may
//	add or remove variable traces on a variable.
//
//----------------------------------------------------------------------

func sTraceVariableObjCmd(tls *libc.TLS, interp uintptr, optionIndex int32, objc int32, objv uintptr) int32 { /* tclTrace.c:842:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	// var commandLength int32 at bp+60, 4

	// var index int32 at bp+56, 4

	var name uintptr
	var command uintptr
	var length Size_t
	var clientData ClientData

	switch uint32(optionIndex) {
	case uint32(0) /* TRACE_ADD */ :
		fallthrough
	case uint32(2) /* TRACE_REMOVE */ :
		{
			var flags int32 = 0
			var i int32
			// var listLen int32 at bp+40, 4

			var result int32
			// var elemPtrs uintptr at bp+48, 8

			if objc != 6 {
				XTcl_WrongNumArgs(tls, interp, 3, objv, ts+64645)
				return TCL_ERROR
			}

			// Make sure the ops argument is a list object; get its length and a
			// pointer to its array of element pointers.

			result = XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 4*8)), bp+40, bp+48)
			if result != TCL_OK {
				return result
			}
			if *(*int32)(unsafe.Pointer(bp + 40)) == 0 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

					ts+64860, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7949, ts+64618, ts+64749,
					uintptr(0)))
				return TCL_ERROR
			}
			for i = 0; i < *(*int32)(unsafe.Pointer(bp + 40 /* listLen */)); i++ {
				if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)) + uintptr(i)*8)), uintptr(unsafe.Pointer(&opStrings2)), int32(unsafe.Sizeof(uintptr(0))), ts+64755, TCL_EXACT, bp+56) != TCL_OK {
					return TCL_ERROR
				}
				switch uint32(*(*int32)(unsafe.Pointer(bp + 56 /* index */))) {
				case uint32(0) /* TRACE_VAR_ARRAY */ :
					flags = flags | TCL_TRACE_ARRAY
					break
				case uint32(1) /* TRACE_VAR_READ */ :
					flags = flags | TCL_TRACE_READS
					break
				case uint32(2) /* TRACE_VAR_UNSET */ :
					flags = flags | TCL_TRACE_UNSETS
					break
				case uint32(3) /* TRACE_VAR_WRITE */ :
					flags = flags | TCL_TRACE_WRITES
					break
				}
			}
			command = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 5*8)), bp+60)
			length = Size_t(*(*int32)(unsafe.Pointer(bp + 60 /* commandLength */)))
			if int32(uint32(optionIndex)) == 0 {
				var ctvarPtr uintptr = XTcl_Alloc(tls, uint32(uint64(int32(uintptr(0)+32+16)+1)+length))

				(*CombinedTraceVarInfo)(unsafe.Pointer(ctvarPtr)).FtraceCmdInfo.Fflags = flags
				if *(*uintptr)(unsafe.Pointer(objv)) == uintptr(0) {
					*(*int32)(unsafe.Pointer(ctvarPtr + 32)) |= TCL_TRACE_OLD_STYLE
				}
				(*CombinedTraceVarInfo)(unsafe.Pointer(ctvarPtr)).FtraceCmdInfo.Flength = length
				flags = flags | (TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT)
				libc.Xmemcpy(tls, ctvarPtr+32+16, command, length+uint64(1))
				(*CombinedTraceVarInfo)(unsafe.Pointer(ctvarPtr)).FtraceInfo.FtraceProc = *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
				}{sTraceVarProc}))
				(*CombinedTraceVarInfo)(unsafe.Pointer(ctvarPtr)).FtraceInfo.FclientData = ctvarPtr + 32
				(*CombinedTraceVarInfo)(unsafe.Pointer(ctvarPtr)).FtraceInfo.Fflags = flags
				name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
				if sTraceVarEx(tls, interp, name, uintptr(0), ctvarPtr) !=
					TCL_OK {
					XTclpFree(tls, ctvarPtr)
					return TCL_ERROR
				}
			} else {
				// Search through all of our traces on this variable to see if
				// there's one with the given command. If so, then delete the
				// first one that matches.

				name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
				clientData = uintptr(0)
				for libc.AssignUintptr(&clientData, XTcl_VarTraceInfo2(tls, interp, name, uintptr(0), 0, *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
				}{sTraceVarProc})), clientData)) != uintptr(0) {
					var tvarPtr uintptr = clientData

					if (*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Flength == length &&
						(*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&
							libc.CplInt32(TCL_TRACE_OLD_STYLE) == flags &&
						libc.Xstrncmp(tls, command, tvarPtr+16,
							length) == 0 {
						XTcl_UntraceVar2(tls, interp, name, uintptr(0),
							flags|TCL_TRACE_UNSETS|TCL_TRACE_RESULT_OBJECT,
							*(*uintptr)(unsafe.Pointer(&struct {
								f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
							}{sTraceVarProc})), clientData)
						break
					}
				}
			}
			break

		}
	case uint32(1) /* TRACE_INFO */ :
		{
			var resultListPtr uintptr

			if objc != 4 {
				XTcl_WrongNumArgs(tls, interp, 3, objv, ts+4245)
				return TCL_ERROR
			}

			for ok := true; ok; ok = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				resultListPtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(resultListPtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(resultListPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(resultListPtr)).Flength = 0
			(*Tcl_Obj)(unsafe.Pointer(resultListPtr)).FtypePtr = uintptr(0)
			{
			}

			name = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
			clientData = uintptr(0)
			for libc.AssignUintptr(&clientData, XTcl_VarTraceInfo2(tls, interp, name, uintptr(0), 0, *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
			}{sTraceVarProc})), clientData)) != uintptr(0) {
				var opObjPtr uintptr
				var eachTraceObjPtr uintptr
				var elemObjPtr uintptr
				var tvarPtr uintptr = clientData

				// Build a list with the ops list as the first obj element and the
				// tcmdPtr->command string as the second obj element. Append this
				// list (as an element) to the end of the result object list.

				elemObjPtr = XTcl_NewListObj(tls, 0, uintptr(0))
				if (*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_ARRAY != 0 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						for ok2 := true; ok2; ok2 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObjPtr = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes, ts+25675, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes + 5)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObjPtr)
				}
				if (*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_READS != 0 {
					for ok3 := true; ok3; ok3 = 0 != 0 {
						for ok4 := true; ok4; ok4 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObjPtr = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes, ts+6057, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes + 4)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObjPtr)
				}
				if (*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_WRITES != 0 {
					for ok5 := true; ok5; ok5 = 0 != 0 {
						for ok6 := true; ok6; ok6 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObjPtr = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes, ts+33651, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes + 5)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObjPtr)
				}
				if (*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_UNSETS != 0 {
					for ok7 := true; ok7; ok7 = 0 != 0 {
						for ok8 := true; ok8; ok8 = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							opObjPtr = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).FrefCount = 0
						if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Flength = 0
						} else {
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
							libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes, ts+3965, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
							*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Fbytes + 5)) = int8(0)
							(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
						}
						(*Tcl_Obj)(unsafe.Pointer(opObjPtr)).FtypePtr = uintptr(0)
						{
						}
					}
					XTcl_ListObjAppendElement(tls, uintptr(0), elemObjPtr, opObjPtr)
				}
				eachTraceObjPtr = XTcl_NewListObj(tls, 0, uintptr(0))
				XTcl_ListObjAppendElement(tls, uintptr(0), eachTraceObjPtr, elemObjPtr)

				elemObjPtr = XTcl_NewStringObj(tls, tvarPtr+16, -1)
				XTcl_ListObjAppendElement(tls, uintptr(0), eachTraceObjPtr, elemObjPtr)
				XTcl_ListObjAppendElement(tls, interp, resultListPtr,
					eachTraceObjPtr)
			}
			XTcl_SetObjResult(tls, interp, resultListPtr)
			break

		}
	}
	return TCL_OK
}

var opStrings2 = [5]uintptr{
	ts + 25675, ts + 6057, ts + 3965, ts + 33651, uintptr(0),
} /* tclTrace.c:853:23 */

//----------------------------------------------------------------------
//
// Tcl_CommandTraceInfo --
//
//	Return the clientData value associated with a trace on a command.
//	This function can also be used to step through all of the traces on a
//	particular command that have the same trace function.
//
// Results:
//	The return value is the clientData value associated with a trace on
//	the given command. Information will only be returned for a trace with
//	proc as trace function. If the clientData argument is NULL then the
//	first such trace is returned; otherwise, the next relevant one after
//	the one given by clientData will be returned. If the command doesn't
//	exist then an error message is left in the interpreter and NULL is
//	returned. Also, if there are no (more) traces for the given command,
//	NULL is returned.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_CommandTraceInfo(tls *libc.TLS, interp uintptr, cmdName uintptr, flags int32, proc uintptr, prevClientData ClientData) ClientData { /* tclTrace.c:1040:1: */
	var cmdPtr uintptr
	var tracePtr uintptr

	cmdPtr = XTcl_FindCommand(tls, interp, cmdName, uintptr(0),
		TCL_LEAVE_ERR_MSG)
	if cmdPtr == uintptr(0) {
		return uintptr(0)
	}

	// Find the relevant trace, if any, and return its clientData.

	tracePtr = (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr
	if prevClientData != uintptr(0) {
		for ; tracePtr != uintptr(0); tracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr {
			if (*CommandTrace)(unsafe.Pointer(tracePtr)).FclientData == prevClientData &&
				(*CommandTrace)(unsafe.Pointer(tracePtr)).FtraceProc == proc {
				tracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr
				break
			}
		}
	}
	for ; tracePtr != uintptr(0); tracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr {
		if (*CommandTrace)(unsafe.Pointer(tracePtr)).FtraceProc == proc {
			return (*CommandTrace)(unsafe.Pointer(tracePtr)).FclientData
		}
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_TraceCommand --
//
//	Arrange for rename/deletes to a command to cause a function to be
//	invoked, which can monitor the operations.
//
//	Also optionally arrange for execution of that command to cause a
//	function to be invoked.
//
// Results:
//	A standard Tcl return value.
//
// Side effects:
//	A trace is set up on the command given by cmdName, such that future
//	changes to the command will be intermediated by proc. See the manual
//	entry for complete details on the calling sequence for proc.
//
//----------------------------------------------------------------------

func XTcl_TraceCommand(tls *libc.TLS, interp uintptr, cmdName uintptr, flags int32, proc uintptr, clientData ClientData) int32 { /* tclTrace.c:1105:1: */
	var cmdPtr uintptr
	var tracePtr uintptr

	cmdPtr = XTcl_FindCommand(tls, interp, cmdName, uintptr(0),
		TCL_LEAVE_ERR_MSG)
	if cmdPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Set up trace information.

	tracePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(CommandTrace{})))
	(*CommandTrace)(unsafe.Pointer(tracePtr)).FtraceProc = proc
	(*CommandTrace)(unsafe.Pointer(tracePtr)).FclientData = clientData
	(*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags = flags & (TCL_TRACE_RENAME | TCL_TRACE_DELETE | TCL_TRACE_ANY_EXEC)
	(*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr = (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr
	(*CommandTrace)(unsafe.Pointer(tracePtr)).FrefCount = 1
	(*Command)(unsafe.Pointer(cmdPtr)).FtracePtr = tracePtr
	if (*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags&TCL_TRACE_ANY_EXEC != 0 {
		// Bug 3484621: up the interp's epoch if this is a BC'ed command

		if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc != uintptr(0) && !((*Command)(unsafe.Pointer(cmdPtr)).Fflags&CMD_HAS_EXEC_TRACES != 0) {
			var iPtr uintptr = interp
			(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
		}
		*(*int32)(unsafe.Pointer(cmdPtr + 80)) |= CMD_HAS_EXEC_TRACES
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_UntraceCommand --
//
//	Remove a previously-created trace for a command.
//
// Results:
//	None.
//
// Side effects:
//	If there exists a trace for the command given by cmdName with the
//	given flags, proc, and clientData, then that trace is removed.
//
//----------------------------------------------------------------------

func XTcl_UntraceCommand(tls *libc.TLS, interp uintptr, cmdName uintptr, flags int32, proc uintptr, clientData ClientData) { /* tclTrace.c:1171:1: */
	var tracePtr uintptr
	var prevPtr uintptr
	var cmdPtr uintptr
	var iPtr uintptr = interp
	var activePtr uintptr
	var hasExecTraces int32 = 0

	cmdPtr = XTcl_FindCommand(tls, interp, cmdName, uintptr(0),
		TCL_LEAVE_ERR_MSG)
	if cmdPtr == uintptr(0) {
		return
	}

	flags = flags & (TCL_TRACE_RENAME | TCL_TRACE_DELETE | TCL_TRACE_ANY_EXEC)

	tracePtr = (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr
	prevPtr = uintptr(0)
__1:
	;
	{
		if tracePtr == uintptr(0) {
			return
		}
		if (*CommandTrace)(unsafe.Pointer(tracePtr)).FtraceProc == proc &&
			(*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags&(TCL_TRACE_RENAME|TCL_TRACE_DELETE|TCL_TRACE_ANY_EXEC) == flags &&
			(*CommandTrace)(unsafe.Pointer(tracePtr)).FclientData == clientData {
			if (*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags&TCL_TRACE_ANY_EXEC != 0 {
				hasExecTraces = 1
			}
			goto __3
		}

	}
	goto __2
__2:
	prevPtr = tracePtr
	tracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr
	goto __1
	goto __3
__3:
	;

	// The code below makes it possible to delete traces while traces are
	// active: it makes sure that the deleted trace won't be processed by
	// CallCommandTraces.

	for activePtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveCmdTracePtr; activePtr != uintptr(0); activePtr = (*ActiveCommandTrace)(unsafe.Pointer(activePtr)).FnextPtr {
		if (*ActiveCommandTrace)(unsafe.Pointer(activePtr)).FnextTracePtr == tracePtr {
			if (*ActiveCommandTrace)(unsafe.Pointer(activePtr)).FreverseScan != 0 {
				(*ActiveCommandTrace)(unsafe.Pointer(activePtr)).FnextTracePtr = prevPtr
			} else {
				(*ActiveCommandTrace)(unsafe.Pointer(activePtr)).FnextTracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr
			}
		}
	}
	if prevPtr == uintptr(0) {
		(*Command)(unsafe.Pointer(cmdPtr)).FtracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr
	} else {
		(*CommandTrace)(unsafe.Pointer(prevPtr)).FnextPtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr
	}
	(*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags = 0

	if libc.PostDecInt32(&(*CommandTrace)(unsafe.Pointer(tracePtr)).FrefCount, 1) <= 1 {
		XTclpFree(tls, tracePtr)
	}

	if hasExecTraces != 0 {
		tracePtr = (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr
		prevPtr = uintptr(0)
	__4:
		if !(tracePtr != uintptr(0)) {
			goto __6
		}
		{
			if (*CommandTrace)(unsafe.Pointer(tracePtr)).Fflags&TCL_TRACE_ANY_EXEC != 0 {
				return
			}

		}
		goto __5
	__5:
		prevPtr = tracePtr
		tracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr
		goto __4
		goto __6
	__6:
		;

		// None of the remaining traces on this command are execution traces.
		// We therefore remove this flag:

		*(*int32)(unsafe.Pointer(cmdPtr + 80)) &= libc.CplInt32(CMD_HAS_EXEC_TRACES)

		// Bug 3484621: up the interp's epoch if this is a BC'ed command

		if (*Command)(unsafe.Pointer(cmdPtr)).FcompileProc != uintptr(0) {
			(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
		}
	}
}

//----------------------------------------------------------------------
//
// TraceCommandProc --
//
//	This function is called to handle command changes that have been
//	traced using the "trace" command, when using the 'rename' or 'delete'
//	options.
//
// Results:
//	None.
//
// Side effects:
//	Depends on the command associated with the trace.
//
//----------------------------------------------------------------------

// ARGSUSED
func sTraceCommandProc(tls *libc.TLS, clientData ClientData, interp uintptr, oldName uintptr, newName uintptr, flags int32) { /* tclTrace.c:1283:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var tcmdPtr uintptr = clientData
	var code int32
	// var cmd Tcl_DString at bp, 216

	(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount++

	if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&flags != 0 && !(XTcl_InterpDeleted(tls, interp) != 0) &&
		!(XTcl_LimitExceeded(tls, interp) != 0) {
		// Generate a command to execute by appending list elements for the
		// old and new command name and the operation.

		XTcl_DStringInit(tls, bp)
		XTcl_DStringAppend(tls, bp, tcmdPtr+52, int32((*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Flength))
		XTcl_DStringAppendElement(tls, bp, oldName)
		XTcl_DStringAppendElement(tls, bp, func() uintptr {
			if newName != 0 {
				return newName
			}
			return ts + 2631
		}())
		if flags&TCL_TRACE_RENAME != 0 {
			XTcl_DStringAppend(tls, bp, ts+64935, int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)))
		} else if flags&TCL_TRACE_DELETE != 0 {
			XTcl_DStringAppend(tls, bp, ts+64943, int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)))
		}

		// Execute the command. We discard any object result the command
		// returns.
		//
		// Add the TCL_TRACE_DESTROYED flag to tcmdPtr to indicate to other
		// areas that this will be destroyed by us, otherwise a double-free
		// might occur depending on what the eval does.

		if flags&TCL_TRACE_DESTROYED != 0 {
			*(*int32)(unsafe.Pointer(tcmdPtr)) |= TCL_TRACE_DESTROYED
		}
		code = XTcl_EvalEx(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring,
			(*Tcl_DString)(unsafe.Pointer(bp)).Flength, 0)
		if code != TCL_OK {
			// We ignore errors in these traced commands
			//** QUESTION: Use Tcl_BackgroundException(interp, code); instead? **
		}
		XTcl_DStringFree(tls, bp)
	}

	// We delete when the trace was destroyed or if this is a delete trace,
	// because command deletes are unconditional, so the trace must go away.

	if flags&(TCL_TRACE_DESTROYED|TCL_TRACE_DELETE) != 0 {
		var untraceFlags int32 = (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags
		var state Tcl_InterpState

		if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace != uintptr(0) {
			XTcl_DeleteTrace(tls, interp, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace)
			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace = uintptr(0)
			XTclpFree(tls, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartCmd)
		}
		if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_EXEC_IN_PROGRESS != 0 {
			// Postpone deletion, until exec trace returns.

			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags = 0
		}

		// We need to construct the same flags for Tcl_UntraceCommand as were
		// passed to Tcl_TraceCommand. Reproduce the processing of [trace add
		// execution/command]. Be careful to keep this code in sync with that.

		if untraceFlags&TCL_TRACE_ANY_EXEC != 0 {
			untraceFlags = untraceFlags | TCL_TRACE_DELETE
			if untraceFlags&(TCL_TRACE_ENTER_DURING_EXEC|
				TCL_TRACE_LEAVE_DURING_EXEC) != 0 {
				untraceFlags = untraceFlags | (TCL_TRACE_ENTER_EXEC | TCL_TRACE_LEAVE_EXEC)
			}
		} else if untraceFlags&TCL_TRACE_RENAME != 0 {
			untraceFlags = untraceFlags | TCL_TRACE_DELETE
		}

		// Remove the trace since TCL_TRACE_DESTROYED tells us to, or the
		// command we're tracing has just gone away. Then decrement the
		// clientData refCount that was set up by trace creation.
		//
		// Note that we save the (return) state of the interpreter to prevent
		// bizarre error messages.

		state = XTcl_SaveInterpState(tls, interp, TCL_OK)
		XTcl_UntraceCommand(tls, interp, oldName, untraceFlags,
			*(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
			}{sTraceCommandProc})), clientData)
		XTcl_RestoreInterpState(tls, interp, state)
		(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount--
	}
	if libc.PostDecInt32(&(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount, 1) <= 1 {
		XTclpFree(tls, tcmdPtr)
	}
}

//----------------------------------------------------------------------
//
// TclCheckExecutionTraces --
//
//	Checks on all current command execution traces, and invokes functions
//	which have been registered. This function can be used by other code
//	which performs execution to unify the tracing system, so that
//	execution traces will function for that other code.
//
//	For instance extensions like [incr Tcl] which use their own execution
//	technique can make use of Tcl's tracing.
//
//	This function is called by 'TclEvalObjvInternal'
//
// Results:
//	The return value is a standard Tcl completion code such as TCL_OK or
//	TCL_ERROR, etc.
//
// Side effects:
//	Those side effects made by any trace functions called.
//
//----------------------------------------------------------------------

func XTclCheckExecutionTraces(tls *libc.TLS, interp uintptr, command uintptr, numChars int32, cmdPtr uintptr, code int32, traceFlags int32, objc int32, objv uintptr) int32 { /* tclTrace.c:1421:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var iPtr uintptr = interp
	var tracePtr uintptr
	var lastTracePtr uintptr
	// var active ActiveCommandTrace at bp, 32

	var curLevel int32
	var traceCode int32 = TCL_OK
	var state Tcl_InterpState = uintptr(0)

	if (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr == uintptr(0) {
		return traceCode
	}

	curLevel = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).Flevel

	(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveCmdTracePtr
	(*Interp)(unsafe.Pointer(iPtr)).FactiveCmdTracePtr = bp /* &active */

	(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FcmdPtr = cmdPtr
	lastTracePtr = uintptr(0)
	for tracePtr = (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr; traceCode == TCL_OK && tracePtr != uintptr(0); tracePtr = (*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr {
		if traceFlags&TCL_TRACE_LEAVE_EXEC != 0 {
			// Execute the trace command in order of creation for "leave".

			(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FreverseScan = 1
			(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr = uintptr(0)
			tracePtr = (*Command)(unsafe.Pointer(cmdPtr)).FtracePtr
			for (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr != lastTracePtr {
				(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr = tracePtr
				tracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr
			}
		} else {
			(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FreverseScan = 0
			(*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FnextPtr
		}
		if (*CommandTrace)(unsafe.Pointer(tracePtr)).FtraceProc == *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32)
		}{sTraceCommandProc})) {
			var tcmdPtr uintptr = (*CommandTrace)(unsafe.Pointer(tracePtr)).FclientData

			if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags != 0 {
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FcurFlags = traceFlags | TCL_TRACE_EXEC_DIRECT
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FcurCode = code
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount++
				if state == uintptr(0) {
					state = XTcl_SaveInterpState(tls, interp, code)
				}
				traceCode = sTraceExecutionProc(tls, tcmdPtr, interp, curLevel,
					command, cmdPtr, objc, objv)
				if libc.PostDecInt32(&(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount, 1) <= 1 {
					XTclpFree(tls, tcmdPtr)
				}
			}
		}
		if (*ActiveCommandTrace)(unsafe.Pointer(bp)).FnextTracePtr != 0 {
			lastTracePtr = (*CommandTrace)(unsafe.Pointer((*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr)).FnextPtr
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FactiveCmdTracePtr = (*ActiveCommandTrace)(unsafe.Pointer(bp /* &active */)).FnextPtr
	if state != 0 {
		if traceCode == TCL_OK {
			XTcl_RestoreInterpState(tls, interp, state)
		} else {
			XTcl_DiscardInterpState(tls, state)
		}
	}

	return traceCode
}

//----------------------------------------------------------------------
//
// TclCheckInterpTraces --
//
//	Checks on all current traces, and invokes functions which have been
//	registered. This function can be used by other code which performs
//	execution to unify the tracing system. For instance extensions like
//	[incr Tcl] which use their own execution technique can make use of
//	Tcl's tracing.
//
//	This function is called by 'TclEvalObjvInternal'
//
// Results:
//	The return value is a standard Tcl completion code such as TCL_OK or
//	TCL_ERROR, etc.
//
// Side effects:
//	Those side effects made by any trace functions called.
//
//----------------------------------------------------------------------

func XTclCheckInterpTraces(tls *libc.TLS, interp uintptr, command uintptr, numChars int32, cmdPtr uintptr, code int32, traceFlags int32, objc int32, objv uintptr) int32 { /* tclTrace.c:1527:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var iPtr uintptr = interp
	var tracePtr uintptr
	var lastTracePtr uintptr
	// var active ActiveInterpTrace at bp, 24

	var curLevel int32
	var traceCode int32 = TCL_OK
	var state Tcl_InterpState = uintptr(0)

	if (*Interp)(unsafe.Pointer(iPtr)).FtracePtr == uintptr(0) ||
		(*Interp)(unsafe.Pointer(iPtr)).Fflags&INTERP_TRACE_IN_PROGRESS != 0 {
		return traceCode
	}

	curLevel = (*Interp)(unsafe.Pointer(iPtr)).FnumLevels

	(*ActiveInterpTrace)(unsafe.Pointer(bp /* &active */)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveInterpTracePtr
	(*Interp)(unsafe.Pointer(iPtr)).FactiveInterpTracePtr = bp /* &active */

	lastTracePtr = uintptr(0)
	for tracePtr = (*Interp)(unsafe.Pointer(iPtr)).FtracePtr; traceCode == TCL_OK && tracePtr != uintptr(0); tracePtr = (*ActiveInterpTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr {
		if traceFlags&TCL_TRACE_ENTER_EXEC != 0 {
			// Execute the trace command in reverse order of creation for
			// "enterstep" operation. The order is changed for "enterstep"
			// instead of for "leavestep" as was done in
			// TclCheckExecutionTraces because for step traces,
			// Tcl_CreateObjTrace creates one more linked list of traces which
			// results in one more reversal of trace invocation.

			(*ActiveInterpTrace)(unsafe.Pointer(bp /* &active */)).FreverseScan = 1
			(*ActiveInterpTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr = uintptr(0)
			tracePtr = (*Interp)(unsafe.Pointer(iPtr)).FtracePtr
			for (*Trace)(unsafe.Pointer(tracePtr)).FnextPtr != lastTracePtr {
				(*ActiveInterpTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr = tracePtr
				tracePtr = (*Trace)(unsafe.Pointer(tracePtr)).FnextPtr
			}
			if (*ActiveInterpTrace)(unsafe.Pointer(bp)).FnextTracePtr != 0 {
				lastTracePtr = (*Trace)(unsafe.Pointer((*ActiveInterpTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr)).FnextPtr
			}
		} else {
			(*ActiveInterpTrace)(unsafe.Pointer(bp /* &active */)).FreverseScan = 0
			(*ActiveInterpTrace)(unsafe.Pointer(bp /* &active */)).FnextTracePtr = (*Trace)(unsafe.Pointer(tracePtr)).FnextPtr
		}

		if (*Trace)(unsafe.Pointer(tracePtr)).Flevel > 0 && curLevel > (*Trace)(unsafe.Pointer(tracePtr)).Flevel {
			continue
		}

		if !((*Trace)(unsafe.Pointer(tracePtr)).Fflags&TCL_TRACE_EXEC_IN_PROGRESS != 0) {
			// The proc invoked might delete the traced command which which
			// might try to free tracePtr. We want to use tracePtr until the
			// end of this if section, so we use Tcl_Preserve() and
			// Tcl_Release() to be sure it is not freed while we still need
			// it.

			XTcl_Preserve(tls, tracePtr)
			*(*int32)(unsafe.Pointer(tracePtr + 32)) |= TCL_TRACE_EXEC_IN_PROGRESS
			if state == uintptr(0) {
				state = XTcl_SaveInterpState(tls, interp, code)
			}

			if (*Trace)(unsafe.Pointer(tracePtr)).Fflags&(TCL_TRACE_ENTER_EXEC|TCL_TRACE_LEAVE_EXEC) != 0 {
				// New style trace.

				if (*Trace)(unsafe.Pointer(tracePtr)).Fflags&traceFlags != 0 {
					if (*Trace)(unsafe.Pointer(tracePtr)).Fproc == *(*uintptr)(unsafe.Pointer(&struct {
						f func(*libc.TLS, ClientData, uintptr, int32, uintptr, Tcl_Command, int32, uintptr) int32
					}{sTraceExecutionProc})) {
						var tcmdPtr uintptr = (*Trace)(unsafe.Pointer(tracePtr)).FclientData

						(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FcurFlags = traceFlags
						(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FcurCode = code
					}
					traceCode = (*struct {
						f func(*libc.TLS, ClientData, uintptr, int32, uintptr, Tcl_Command, int32, uintptr) int32
					})(unsafe.Pointer(&struct{ uintptr }{(*Trace)(unsafe.Pointer(tracePtr)).Fproc})).f(tls, (*Trace)(unsafe.Pointer(tracePtr)).FclientData, interp,
						curLevel, command, cmdPtr, objc,
						objv)
				}
			} else {
				// Old-style trace.

				if traceFlags&TCL_TRACE_ENTER_EXEC != 0 {
					// Old-style interpreter-wide traces only trigger before
					// the command is executed.

					traceCode = sCallTraceFunction(tls, interp, tracePtr, cmdPtr,
						command, numChars, objc, objv)
				}
			}
			*(*int32)(unsafe.Pointer(tracePtr + 32)) &= libc.CplInt32(TCL_TRACE_EXEC_IN_PROGRESS)
			XTcl_Release(tls, tracePtr)
		}
	}
	(*Interp)(unsafe.Pointer(iPtr)).FactiveInterpTracePtr = (*ActiveInterpTrace)(unsafe.Pointer(bp /* &active */)).FnextPtr
	if state != 0 {
		if traceCode == TCL_OK {
			XTcl_RestoreInterpState(tls, interp, state)
		} else {
			XTcl_DiscardInterpState(tls, state)
		}
	}

	return traceCode
}

//----------------------------------------------------------------------
//
// CallTraceFunction --
//
//	Invokes a trace function registered with an interpreter. These
//	functions trace command execution. Currently this trace function is
//	called with the address of the string-based Tcl_CmdProc for the
//	command, not the Tcl_ObjCmdProc.
//
// Results:
//	None.
//
// Side effects:
//	Those side effects made by the trace function.
//
//----------------------------------------------------------------------

func sCallTraceFunction(tls *libc.TLS, interp uintptr, tracePtr uintptr, cmdPtr uintptr, command uintptr, numChars int32, objc int32, objv uintptr) int32 { /* tclTrace.c:1672:1: */
	var iPtr uintptr = interp
	var commandCopy uintptr
	var traceCode int32

	// Copy the command characters into a new string.

	commandCopy = XTclStackAlloc(tls, interp, numChars+1)
	libc.Xmemcpy(tls, commandCopy, command, uint64(numChars))
	*(*int8)(unsafe.Pointer(commandCopy + uintptr(numChars))) = int8(0)

	// Call the trace function then free allocated storage.

	traceCode = (*struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr, Tcl_Command, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*Trace)(unsafe.Pointer(tracePtr)).Fproc})).f(tls, (*Trace)(unsafe.Pointer(tracePtr)).FclientData, iPtr,
		(*Interp)(unsafe.Pointer(iPtr)).FnumLevels, commandCopy, cmdPtr, objc, objv)

	XTclStackFree(tls, interp, commandCopy)
	return traceCode
}

//----------------------------------------------------------------------
//
// CommandObjTraceDeleted --
//
//	Ensure the trace is correctly deleted by decrementing its refCount and
//	only deleting if no other references exist.
//
// Results:
//	None.
//
// Side effects:
//	May release memory.
//
//----------------------------------------------------------------------

func sCommandObjTraceDeleted(tls *libc.TLS, clientData ClientData) { /* tclTrace.c:1724:1: */
	var tcmdPtr uintptr = clientData

	if libc.PostDecInt32(&(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount, 1) <= 1 {
		XTclpFree(tls, tcmdPtr)
	}
}

//----------------------------------------------------------------------
//
// TraceExecutionProc --
//
//	This function is invoked whenever code relevant to a 'trace execution'
//	command is executed. It is called in one of two ways in Tcl's core:
//
//	(i) by the TclCheckExecutionTraces, when an execution trace has been
//	triggered.
//	(ii) by TclCheckInterpTraces, when a prior execution trace has created
//	a trace of the internals of a procedure, passing in this function as
//	the one to be called.
//
// Results:
//	The return value is a standard Tcl completion code such as TCL_OK or
//	TCL_ERROR, etc.
//
// Side effects:
//	May invoke an arbitrary Tcl procedure, and may create or delete an
//	interpreter-wide trace.
//
//----------------------------------------------------------------------

func sTraceExecutionProc(tls *libc.TLS, clientData ClientData, interp uintptr, level int32, command uintptr, cmdInfo Tcl_Command, objc int32, objv uintptr) int32 { /* tclTrace.c:1760:1: */
	bp := tls.Alloc(432)
	defer tls.Free(432)

	var call int32 = 0
	var iPtr uintptr = interp
	var tcmdPtr uintptr = clientData
	var flags int32 = (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FcurFlags
	var code int32 = (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FcurCode
	var traceCode int32 = TCL_OK

	if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_EXEC_IN_PROGRESS != 0 {
		// Inside any kind of execution trace callback, we do not allow any
		// further execution trace callbacks to be called for the same trace.

		return traceCode
	}

	if !(XTcl_InterpDeleted(tls, interp) != 0) && !(XTcl_LimitExceeded(tls, interp) != 0) {
		// Check whether the current call is going to eval arbitrary Tcl code
		// with a generated trace, or whether we are only going to setup
		// interpreter-wide traces to implement the 'step' traces. This latter
		// situation can happen if we create a command trace without either
		// before or after operations, but with either of the step operations.

		if flags&TCL_TRACE_EXEC_DIRECT != 0 {
			call = flags & (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags & (TCL_TRACE_ENTER_EXEC | TCL_TRACE_LEAVE_EXEC)
		} else {
			call = 1
		}

		// First, if we have returned back to the level at which we created an
		// interpreter trace for enterstep and/or leavestep execution traces,
		// we remove it here.

		if flags&TCL_TRACE_LEAVE_EXEC != 0 && (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace != uintptr(0) &&
			level == (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartLevel &&
			libc.Xstrcmp(tls, command, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartCmd) == 0 {
			XTcl_DeleteTrace(tls, interp, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace)
			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace = uintptr(0)
			XTclpFree(tls, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartCmd)
		}

		// Second, create the tcl callback, if required.

		if call != 0 {
			// var cmd Tcl_DString at bp, 216

			// var sub Tcl_DString at bp+216, 216

			var i int32
			var saveInterpFlags int32

			XTcl_DStringInit(tls, bp)
			XTcl_DStringAppend(tls, bp, tcmdPtr+52, int32((*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Flength))

			// Append command with arguments.

			XTcl_DStringInit(tls, bp+216)
			for i = 0; i < objc; i++ {
				XTcl_DStringAppendElement(tls, bp+216, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))))
			}
			XTcl_DStringAppendElement(tls, bp, (*Tcl_DString)(unsafe.Pointer(bp+216)).Fstring)
			XTcl_DStringFree(tls, bp+216)

			if flags&TCL_TRACE_ENTER_EXEC != 0 {
				// Append trace operation.

				if flags&TCL_TRACE_EXEC_DIRECT != 0 {
					XTcl_DStringAppendElement(tls, bp, ts+64765)
				} else {
					XTcl_DStringAppendElement(tls, bp, ts+64777)
				}
			} else if flags&TCL_TRACE_LEAVE_EXEC != 0 {
				var resultCode uintptr
				var resultCodeStr uintptr

				// Append result code.

				for ok := true; ok; ok = 0 != 0 {
					for ok1 := true; ok1; ok1 = 0 != 0 {
						if XtclFreeObjList == uintptr(0) {
							XTclAllocateFreeObjects(tls)
						}
						resultCode = XtclFreeObjList
						XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
					}
					(*Tcl_Obj)(unsafe.Pointer(resultCode)).FrefCount = 0
					(*Tcl_Obj)(unsafe.Pointer(resultCode)).Fbytes = uintptr(0)
					*(*int32)(unsafe.Pointer(resultCode + 32)) = int32(code)
					(*Tcl_Obj)(unsafe.Pointer(resultCode)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
					{
					}
				}
				resultCodeStr = XTcl_GetString(tls, resultCode)
				XTcl_DStringAppendElement(tls, bp, resultCodeStr)
				for ok2 := true; ok2; ok2 = 0 != 0 {
					var _objPtr uintptr = resultCode
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}

				// Append result string.

				XTcl_DStringAppendElement(tls, bp, XTcl_GetStringResult(tls, interp))

				// Append trace operation.

				if flags&TCL_TRACE_EXEC_DIRECT != 0 {
					XTcl_DStringAppendElement(tls, bp, ts+64771)
				} else {
					XTcl_DStringAppendElement(tls, bp, ts+64787)
				}
			} else {
				XTcl_Panic(tls, ts+64951, 0)
			}

			// Execute the command. We discard any object result the command
			// returns.

			saveInterpFlags = (*Interp)(unsafe.Pointer(iPtr)).Fflags
			*(*int32)(unsafe.Pointer(iPtr + 424)) |= INTERP_TRACE_IN_PROGRESS
			*(*int32)(unsafe.Pointer(tcmdPtr)) |= TCL_TRACE_EXEC_IN_PROGRESS
			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount++

			// This line can have quite arbitrary side-effects, including
			// deleting the trace, the command being traced, or even the
			// interpreter.

			traceCode = XTcl_EvalEx(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring,
				(*Tcl_DString)(unsafe.Pointer(bp)).Flength, 0)
			*(*int32)(unsafe.Pointer(tcmdPtr)) &= libc.CplInt32(TCL_TRACE_EXEC_IN_PROGRESS)

			// Restore the interp tracing flag to prevent cmd traces from
			// affecting interp traces.

			(*Interp)(unsafe.Pointer(iPtr)).Fflags = saveInterpFlags
			if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags == 0 {
				flags = flags | TCL_TRACE_DESTROYED
			}
			XTcl_DStringFree(tls, bp)
		}

		// Third, if there are any step execution traces for this proc, we
		// register an interpreter trace to invoke enterstep and/or leavestep
		// traces. We also need to save the current stack level and the proc
		// string in startLevel and startCmd so that we can delete this
		// interpreter trace when it reaches the end of this proc.

		if flags&TCL_TRACE_ENTER_EXEC != 0 && (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace == uintptr(0) &&
			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&(TCL_TRACE_ENTER_DURING_EXEC|TCL_TRACE_LEAVE_DURING_EXEC) != 0 {
			var len uint32 = uint32(libc.Xstrlen(tls, command) + uint64(1))

			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartLevel = level
			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartCmd = XTcl_Alloc(tls, len)
			libc.Xmemcpy(tls, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartCmd, command, uint64(len))
			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount++
			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace = XTcl_CreateObjTrace(tls, interp, 0,
				(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).Fflags&TCL_TRACE_ANY_EXEC>>2,
				*(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, int32, uintptr, Tcl_Command, int32, uintptr) int32
				}{sTraceExecutionProc})), tcmdPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sCommandObjTraceDeleted})))
		}
	}
	if flags&TCL_TRACE_DESTROYED != 0 {
		if (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace != uintptr(0) {
			XTcl_DeleteTrace(tls, interp, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace)
			(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstepTrace = uintptr(0)
			XTclpFree(tls, (*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FstartCmd)
		}
	}
	if call != 0 {
		if libc.PostDecInt32(&(*TraceCommandInfo)(unsafe.Pointer(tcmdPtr)).FrefCount, 1) <= 1 {
			XTclpFree(tls, tcmdPtr)
		}
	}
	return traceCode
}

//----------------------------------------------------------------------
//
// TraceVarProc --
//
//	This function is called to handle variable accesses that have been
//	traced using the "trace" command.
//
// Results:
//	Normally returns NULL. If the trace command returns an error, then
//	this function returns an error string.
//
// Side effects:
//	Depends on the command associated with the trace.
//
//----------------------------------------------------------------------

// ARGSUSED
func sTraceVarProc(tls *libc.TLS, clientData ClientData, interp uintptr, name1 uintptr, name2 uintptr, flags int32) uintptr { /* tclTrace.c:1967:13: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var tvarPtr uintptr = clientData
	var result uintptr
	var code int32
	var destroy int32 = 0
	// var cmd Tcl_DString at bp, 216

	var rewind int32 = (*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).Frewind

	// We might call Tcl_Eval() below, and that might evaluate [trace vdelete]
	// which might try to free tvarPtr. We want to use tvarPtr until the end
	// of this function, so we use Tcl_Preserve() and Tcl_Release() to be sure
	// it is not freed while we still need it.

	result = uintptr(0)
	if (*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&flags != 0 && !(XTcl_InterpDeleted(tls, interp) != 0) &&
		!(XTcl_LimitExceeded(tls, interp) != 0) {
		if (*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Flength != uint64(0) {
			// Generate a command to execute by appending list elements for
			// the two variable names and the operation.

			XTcl_DStringInit(tls, bp)
			XTcl_DStringAppend(tls, bp, tvarPtr+16, int32((*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Flength))
			XTcl_DStringAppendElement(tls, bp, name1)
			XTcl_DStringAppendElement(tls, bp, func() uintptr {
				if name2 != 0 {
					return name2
				}
				return ts + 2631
			}())
			if (*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_OLD_STYLE != 0 {
				if flags&TCL_TRACE_ARRAY != 0 {
					XTcl_DStringAppend(tls, bp, ts+64992, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
				} else if flags&TCL_TRACE_READS != 0 {
					XTcl_DStringAppend(tls, bp, ts+64995, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
				} else if flags&TCL_TRACE_WRITES != 0 {
					XTcl_DStringAppend(tls, bp, ts+64998, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
				} else if flags&TCL_TRACE_UNSETS != 0 {
					XTcl_DStringAppend(tls, bp, ts+65001, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
				}
			} else {
				if flags&TCL_TRACE_ARRAY != 0 {
					XTcl_DStringAppend(tls, bp, ts+65004, int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)))
				} else if flags&TCL_TRACE_READS != 0 {
					XTcl_DStringAppend(tls, bp, ts+65011, int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)))
				} else if flags&TCL_TRACE_WRITES != 0 {
					XTcl_DStringAppend(tls, bp, ts+65017, int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)))
				} else if flags&TCL_TRACE_UNSETS != 0 {
					XTcl_DStringAppend(tls, bp, ts+65024, int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)))
				}
			}

			// Execute the command. We discard any object result the command
			// returns.
			//
			// Add the TCL_TRACE_DESTROYED flag to tvarPtr to indicate to
			// other areas that this will be destroyed by us, otherwise a
			// double-free might occur depending on what the eval does.

			if flags&TCL_TRACE_DESTROYED != 0 &&
				!((*TraceVarInfo)(unsafe.Pointer(tvarPtr)).Fflags&TCL_TRACE_DESTROYED != 0) {
				destroy = 1
				*(*int32)(unsafe.Pointer(tvarPtr)) |= TCL_TRACE_DESTROYED
			}

			// Make sure that unset traces are rune even if the execEnv is
			// rewinding (coroutine deletion, [Bug 2093947]

			if rewind != 0 && flags&TCL_TRACE_UNSETS != 0 {
				(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).Frewind = 0
			}
			code = XTcl_EvalEx(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring,
				(*Tcl_DString)(unsafe.Pointer(bp)).Flength, 0)
			if rewind != 0 {
				(*ExecEnv1)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FexecEnvPtr)).Frewind = rewind
			}
			if code != TCL_OK { // copy error msg to result
				var errMsgObj uintptr = XTcl_GetObjResult(tls, interp)

				(*Tcl_Obj)(unsafe.Pointer(errMsgObj)).FrefCount++
				result = errMsgObj
			}
			XTcl_DStringFree(tls, bp)
		}
	}
	if destroy != 0 && result != uintptr(0) {
		var errMsgObj uintptr = result

		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = errMsgObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		result = uintptr(0)
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_CreateObjTrace --
//
//	Arrange for a function to be called to trace command execution.
//
// Results:
//	The return value is a token for the trace, which may be passed to
//	Tcl_DeleteTrace to eliminate the trace.
//
// Side effects:
//	From now on, proc will be called just before a command function is
//	called to execute a Tcl command. Calls to proc will have the following
//	form:
//
//	void proc(ClientData	 clientData,
//		  Tcl_Interp *	 interp,
//		  int		 level,
//		  const char *	 command,
//		  Tcl_Command	 commandInfo,
//		  int		 objc,
//		  Tcl_Obj *const objv[]);
//
//	The 'clientData' and 'interp' arguments to 'proc' will be the same as
//	the arguments to Tcl_CreateObjTrace. The 'level' argument gives the
//	nesting depth of command interpretation within the interpreter. The
//	'command' argument is the ASCII text of the command being evaluated -
//	before any substitutions are performed. The 'commandInfo' argument
//	gives a handle to the command procedure that will be evaluated. The
//	'objc' and 'objv' parameters give the parameter vector that will be
//	passed to the command procedure. Proc does not return a value.
//
//	It is permissible for 'proc' to call Tcl_SetCommandTokenInfo to change
//	the command procedure or client data for the command being evaluated,
//	and these changes will take effect with the current evaluation.
//
//	The 'level' argument specifies the maximum nesting level of calls to
//	be traced. If the execution depth of the interpreter exceeds 'level',
//	the trace callback is not executed.
//
//	The 'flags' argument is either zero or the value,
//	TCL_ALLOW_INLINE_COMPILATION. If the TCL_ALLOW_INLINE_COMPILATION flag
//	is not present, the bytecode compiler will not generate inline code
//	for Tcl's built-in commands. This behavior will have a significant
//	impact on performance, but will ensure that all command evaluations
//	are traced. If the TCL_ALLOW_INLINE_COMPILATION flag is present, the
//	bytecode compiler will have its normal behavior of compiling in-line
//	code for some of Tcl's built-in commands. In this case, the tracing
//	will be imprecise - in-line code will not be traced - but run-time
//	performance will be improved. The latter behavior is desired for many
//	applications such as profiling of run time.
//
//	When the trace is deleted, the 'delProc' function will be invoked,
//	passing it the original client data.
//
//----------------------------------------------------------------------

func XTcl_CreateObjTrace(tls *libc.TLS, interp uintptr, level int32, flags int32, proc uintptr, clientData ClientData, delProc uintptr) Tcl_Trace { /* tclTrace.c:2135:1: */
	var tracePtr uintptr
	var iPtr uintptr = interp

	// Test if this trace allows inline compilation of commands.

	if !(flags&TCL_ALLOW_INLINE_COMPILATION != 0) {
		if (*Interp)(unsafe.Pointer(iPtr)).FtracesForbiddingInline == 0 {
			// When the first trace forbidding inline compilation is created,
			// invalidate existing compiled code for this interpreter and
			// arrange (by setting the DONT_COMPILE_CMDS_INLINE flag) that
			// when compiling new code, no commands will be compiled inline
			// (i.e., into an inline sequence of instructions). We do this
			// because commands that were compiled inline will never result in
			// a command trace being called.

			(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
			*(*int32)(unsafe.Pointer(iPtr + 424)) |= DONT_COMPILE_CMDS_INLINE
		}
		(*Interp)(unsafe.Pointer(iPtr)).FtracesForbiddingInline++
	}

	tracePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Trace{})))
	(*Trace)(unsafe.Pointer(tracePtr)).Flevel = level
	(*Trace)(unsafe.Pointer(tracePtr)).Fproc = proc
	(*Trace)(unsafe.Pointer(tracePtr)).FclientData = clientData
	(*Trace)(unsafe.Pointer(tracePtr)).FdelProc = delProc
	(*Trace)(unsafe.Pointer(tracePtr)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).FtracePtr
	(*Trace)(unsafe.Pointer(tracePtr)).Fflags = flags
	(*Interp)(unsafe.Pointer(iPtr)).FtracePtr = tracePtr

	return tracePtr
}

//----------------------------------------------------------------------
//
// Tcl_CreateTrace --
//
//	Arrange for a function to be called to trace command execution.
//
// Results:
//	The return value is a token for the trace, which may be passed to
//	Tcl_DeleteTrace to eliminate the trace.
//
// Side effects:
//	From now on, proc will be called just before a command procedure is
//	called to execute a Tcl command. Calls to proc will have the following
//	form:
//
//	void
//	proc(clientData, interp, level, command, cmdProc, cmdClientData,
//		argc, argv)
//	    ClientData clientData;
//	    Tcl_Interp *interp;
//	    int level;
//	    char *command;
//	    int (*cmdProc)();
//	    ClientData cmdClientData;
//	    int argc;
//	    char **argv;
//	{
//	}
//
//	The clientData and interp arguments to proc will be the same as the
//	corresponding arguments to this function. Level gives the nesting
//	level of command interpretation for this interpreter (0 corresponds to
//	top level). Command gives the ASCII text of the raw command, cmdProc
//	and cmdClientData give the function that will be called to process the
//	command and the ClientData value it will receive, and argc and argv
//	give the arguments to the command, after any argument parsing and
//	substitution. Proc does not return a value.
//
//----------------------------------------------------------------------

func XTcl_CreateTrace(tls *libc.TLS, interp uintptr, level int32, proc uintptr, clientData ClientData) Tcl_Trace { /* tclTrace.c:2224:1: */
	var data uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(StringTraceData{})))

	(*StringTraceData)(unsafe.Pointer(data)).FclientData = clientData
	(*StringTraceData)(unsafe.Pointer(data)).Fproc = proc
	return XTcl_CreateObjTrace(tls, interp, level, 0, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr, Tcl_Command, int32, uintptr) int32
	}{sStringTraceProc})),
		data, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sStringTraceDeleteProc})))
}

//----------------------------------------------------------------------
//
// StringTraceProc --
//
//	Invoke a string-based trace function from an object-based callback.
//
// Results:
//	None.
//
// Side effects:
//	Whatever the string-based trace function does.
//
//----------------------------------------------------------------------

func sStringTraceProc(tls *libc.TLS, clientData ClientData, interp uintptr, level int32, command uintptr, commandInfo Tcl_Command, objc int32, objv uintptr) int32 { /* tclTrace.c:2257:1: */
	var data uintptr = clientData
	var cmdPtr uintptr = commandInfo
	var argv uintptr // Args to pass to string trace proc
	var i int32

	// This is a bit messy because we have to emulate the old trace interface,
	// which uses strings for everything.

	argv = XTclStackAlloc(tls, interp,
		int32(uint32(uint64(objc+1)*uint64(unsafe.Sizeof(uintptr(0))))))
	for i = 0; i < objc; i++ {
		*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) = XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}
	*(*uintptr)(unsafe.Pointer(argv + uintptr(objc)*8)) = uintptr(0)

	// Invoke the command function. Note that we cast away const-ness on two
	// parameters for compatibility with legacy code; the code MUST NOT modify
	// either command or argv.

	(*struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr, uintptr, ClientData, int32, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*StringTraceData)(unsafe.Pointer(data)).Fproc})).f(tls, (*StringTraceData)(unsafe.Pointer(data)).FclientData, interp, level, command,
		(*Command)(unsafe.Pointer(cmdPtr)).Fproc, (*Command)(unsafe.Pointer(cmdPtr)).FclientData, objc, argv)
	XTclStackFree(tls, interp, argv)

	return TCL_OK
}

//----------------------------------------------------------------------
//
// StringTraceDeleteProc --
//
//	Clean up memory when a string-based trace is deleted.
//
// Results:
//	None.
//
// Side effects:
//	Allocated memory is returned to the system.
//
//----------------------------------------------------------------------

func sStringTraceDeleteProc(tls *libc.TLS, clientData ClientData) { /* tclTrace.c:2313:1: */
	XTclpFree(tls, clientData)
}

//----------------------------------------------------------------------
//
// Tcl_DeleteTrace --
//
//	Remove a trace.
//
// Results:
//	None.
//
// Side effects:
//	From now on there will be no more calls to the function given in
//	trace.
//
//----------------------------------------------------------------------

func XTcl_DeleteTrace(tls *libc.TLS, interp uintptr, trace Tcl_Trace) { /* tclTrace.c:2337:1: */
	var iPtr uintptr = interp
	var prevPtr uintptr
	var tracePtr uintptr = trace
	var tracePtr2 uintptr = iPtr + 432
	var activePtr uintptr

	// Locate the trace entry in the interpreter's trace list, and remove it
	// from the list.

	prevPtr = uintptr(0)
	for *(*uintptr)(unsafe.Pointer(tracePtr2)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(tracePtr2)) != tracePtr {
		prevPtr = *(*uintptr)(unsafe.Pointer(tracePtr2))
		tracePtr2 = prevPtr + 24
	}
	if *(*uintptr)(unsafe.Pointer(tracePtr2)) == uintptr(0) {
		return
	}
	*(*uintptr)(unsafe.Pointer(tracePtr2)) = (*Trace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(tracePtr2)))).FnextPtr

	// The code below makes it possible to delete traces while traces are
	// active: it makes sure that the deleted trace won't be processed by
	// TclCheckInterpTraces.

	for activePtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveInterpTracePtr; activePtr != uintptr(0); activePtr = (*ActiveInterpTrace)(unsafe.Pointer(activePtr)).FnextPtr {
		if (*ActiveInterpTrace)(unsafe.Pointer(activePtr)).FnextTracePtr == tracePtr {
			if (*ActiveInterpTrace)(unsafe.Pointer(activePtr)).FreverseScan != 0 {
				(*ActiveInterpTrace)(unsafe.Pointer(activePtr)).FnextTracePtr = prevPtr
			} else {
				(*ActiveInterpTrace)(unsafe.Pointer(activePtr)).FnextTracePtr = (*Trace)(unsafe.Pointer(tracePtr)).FnextPtr
			}
		}
	}

	// If the trace forbids bytecode compilation, change the interpreter's
	// state. If bytecode compilation is now permitted, flag the fact and
	// advance the compilation epoch so that procs will be recompiled to take
	// advantage of it.

	if !((*Trace)(unsafe.Pointer(tracePtr)).Fflags&TCL_ALLOW_INLINE_COMPILATION != 0) {
		(*Interp)(unsafe.Pointer(iPtr)).FtracesForbiddingInline--
		if (*Interp)(unsafe.Pointer(iPtr)).FtracesForbiddingInline == 0 {
			*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(DONT_COMPILE_CMDS_INLINE)
			(*Interp)(unsafe.Pointer(iPtr)).FcompileEpoch++
		}
	}

	// Execute any delete callback.

	if (*Trace)(unsafe.Pointer(tracePtr)).FdelProc != uintptr(0) {
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*Trace)(unsafe.Pointer(tracePtr)).FdelProc})).f(tls, (*Trace)(unsafe.Pointer(tracePtr)).FclientData)
	}

	// Delete the trace object.

	XTcl_EventuallyFree(tls, tracePtr, uintptr(3))
}

//----------------------------------------------------------------------
//
// TclTraceVarExists --
//
//	This is called from info exists. We need to trigger read and/or array
//	traces because they may end up creating a variable that doesn't
//	currently exist.
//
// Results:
//	A pointer to the Var structure, or NULL.
//
// Side effects:
//	May fill in error messages in the interp.
//
//----------------------------------------------------------------------

func XTclVarTraceExists(tls *libc.TLS, interp uintptr, varName uintptr) uintptr { /* tclTrace.c:2427:5: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var varPtr uintptr
	// var arrayPtr uintptr at bp, 8

	// The choice of "create" flag values is delicate here, and matches the
	// semantics of GetVar. Things are still not perfect, however, because if
	// you do "info exists x" you get a varPtr and therefore trigger traces.
	// However, if you do "info exists x(i)", then you only get a varPtr if x
	// is already known to be an array. Otherwise you get NULL, and no trace
	// is triggered. This matches Tcl 7.6 semantics.

	varPtr = XTclLookupVar(tls, interp, varName, uintptr(0), 0, ts+29024,
		/*createPart1*/ 0 /*createPart2*/, 1, bp)

	if varPtr == uintptr(0) {
		return uintptr(0)
	}

	if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_TRACED_READ != 0 ||
		*(*uintptr)(unsafe.Pointer(bp)) != 0 && (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags&VAR_TRACED_READ != 0 {
		XTclCallVarTraces(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* arrayPtr */)), varPtr, varName, uintptr(0),
			TCL_TRACE_READS /* leaveErrMsg */, 0)
	}

	// If the variable doesn't exist anymore and no-one's using it, then free
	// up the relevant structures and hash table entries.

	if *(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0) {
		XTclCleanupVar(tls, varPtr, *(*uintptr)(unsafe.Pointer(bp /* arrayPtr */)))
		return uintptr(0)
	}

	return varPtr
}

//----------------------------------------------------------------------
//
// TclCheckArrayTraces --
//
//	This function is invoked to when we operate on an array variable,
//	to allow any array traces to fire.
//
// Results:
//	Returns TCL_OK to indicate normal operation. Returns TCL_ERROR if
//	invocation of a trace function indicated an error. When TCL_ERROR is
//	returned, then error information is left in interp.
//
// Side effects:
//	Almost anything can happen, depending on trace; this function itself
//	doesn't have any side effects.
//
//----------------------------------------------------------------------

func XTclCheckArrayTraces(tls *libc.TLS, interp uintptr, varPtr uintptr, arrayPtr uintptr, name uintptr, index int32) int32 { /* tclTrace.c:2490:1: */
	var code int32 = TCL_OK

	if varPtr != 0 && (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_TRACED_ARRAY != 0 &&
		((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_ARRAY != 0 || *(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) {
		var iPtr uintptr = interp

		code = XTclObjCallVarTraces(tls, iPtr, arrayPtr, varPtr, name, uintptr(0),
			TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY|TCL_TRACE_ARRAY,
			/* leaveErrMsg */ 1, index)
	}
	return code
}

//----------------------------------------------------------------------
//
// TclCallVarTraces --
//
//	This function is invoked to find and invoke relevant trace functions
//	associated with a particular operation on a variable. This function
//	invokes traces both on the variable and on its containing array (where
//	relevant).
//
// Results:
//	Returns TCL_OK to indicate normal operation. Returns TCL_ERROR if
//	invocation of a trace function indicated an error. When TCL_ERROR is
//	returned and leaveErrMsg is true, then the errorInfo field of iPtr has
//	information about the error placed in it.
//
// Side effects:
//	Almost anything can happen, depending on trace; this function itself
//	doesn't have any side effects.
//
//----------------------------------------------------------------------

func XTclObjCallVarTraces(tls *libc.TLS, iPtr uintptr, arrayPtr uintptr, varPtr uintptr, part1Ptr uintptr, part2Ptr uintptr, flags int32, leaveErrMsg int32, index int32) int32 { /* tclTrace.c:2534:1: */
	var part1 uintptr
	var part2 uintptr

	if !(part1Ptr != 0) {
		part1Ptr = *(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr + 8 + uintptr(index)*8))
	}
	if !(part1Ptr != 0) {
		XTcl_Panic(tls, ts+65031, 0)
	}
	part1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes
		}
		return XTcl_GetString(tls, part1Ptr)
	}()
	if part2Ptr != 0 {
		part2 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(part2Ptr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(part2Ptr)).Fbytes
			}
			return XTcl_GetString(tls, part2Ptr)
		}()
	} else {
		part2 = uintptr(0)
	}

	return XTclCallVarTraces(tls, iPtr, arrayPtr, varPtr, part1, part2, flags,
		leaveErrMsg)
}

func XTclCallVarTraces(tls *libc.TLS, iPtr uintptr, arrayPtr uintptr, varPtr uintptr, part1 uintptr, part2 uintptr, flags int32, leaveErrMsg int32) int32 { /* tclTrace.c:2568:1: */
	bp := tls.Alloc(280)
	defer tls.Free(280)

	var tracePtr uintptr
	// var active ActiveVarTrace at bp+256, 24

	var result uintptr
	var openParen uintptr
	var p uintptr
	// var nameCopy Tcl_DString at bp+40, 216

	var copiedName int32
	var code int32
	var disposeFlags int32
	var state Tcl_InterpState
	var hPtr uintptr
	var traceflags int32
	var offset int32
	var newPart1 uintptr
	var verb uintptr
	var type1 uintptr
	code = TCL_OK
	disposeFlags = 0
	state = uintptr(0)
	traceflags = flags & (VAR_TRACED_READ | VAR_TRACED_WRITE | VAR_TRACED_ARRAY | VAR_TRACED_UNSET)

	// If there are already similar trace functions active for the variable,
	// don't call them again.

	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_TRACE_ACTIVE != 0) {
		goto __1
	}
	return code
__1:
	;
	*(*int32)(unsafe.Pointer(varPtr)) |= VAR_TRACE_ACTIVE
	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __2
	}
	(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount++
__2:
	;
	if !(arrayPtr != 0 && (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __3
	}
	(*VarInHash)(unsafe.Pointer(arrayPtr)).FrefCount++
__3:
	;

	// If the variable name hasn't been parsed into array name and element, do
	// it here. If there really is an array element, make a copy of the
	// original name so that NULLs can be inserted into it to separate the
	// names (can't modify the name string in place, because the string might
	// get used by the callbacks we invoke).

	copiedName = 0
	if !(part2 == uintptr(0)) {
		goto __4
	}
	p = part1
__5:
	if !(*(*int8)(unsafe.Pointer(p)) != 0) {
		goto __7
	}
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '(') {
		goto __8
	}
	openParen = p
__9:
	p++
	goto __10
__10:
	if int32(*(*int8)(unsafe.Pointer(p))) != 0 {
		goto __9
	}
	goto __11
__11:
	;
	p--
	if !(int32(*(*int8)(unsafe.Pointer(p))) == ')') {
		goto __12
	}
	offset = int32((int64(openParen) - int64(part1)) / 1)

	XTcl_DStringInit(tls, bp+40)
	XTcl_DStringAppend(tls, bp+40, part1, int32((int64(p)-int64(part1))/1))
	newPart1 = (*Tcl_DString)(unsafe.Pointer(bp + 40)).Fstring
	*(*int8)(unsafe.Pointer(newPart1 + uintptr(offset))) = int8(0)
	part1 = newPart1
	part2 = newPart1 + uintptr(offset) + uintptr(1)
	copiedName = 1
__12:
	;
	goto __7
__8:
	;
	goto __6
__6:
	p++
	goto __5
	goto __7
__7:
	;
__4:
	;

	// Ignore any caller-provided TCL_INTERP_DESTROYED flag.  Only we can
	// set it correctly.

	flags = flags & libc.CplInt32(TCL_INTERP_DESTROYED)

	// Invoke traces on the array containing the variable, if relevant.

	result = uintptr(0)
	(*ActiveVarTrace)(unsafe.Pointer(bp + 256 /* &active */)).FnextPtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveVarTracePtr
	(*Interp)(unsafe.Pointer(iPtr)).FactiveVarTracePtr = bp + 256 /* &active */
	XTcl_Preserve(tls, iPtr)
	if !(arrayPtr != 0 && !((*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_TRACE_ACTIVE != 0) &&
		(*Var)(unsafe.Pointer(arrayPtr)).Fflags&traceflags != 0) {
		goto __13
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FfindProc})).f(tls, iPtr+1008 /* &.varTraces */, arrayPtr)
	(*ActiveVarTrace)(unsafe.Pointer(bp + 256 /* &active */)).FvarPtr = arrayPtr
	tracePtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
__14:
	if !(tracePtr != uintptr(0)) {
		goto __16
	}
	(*ActiveVarTrace)(unsafe.Pointer(bp + 256 /* &active */)).FnextTracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
	if !!((*VarTrace)(unsafe.Pointer(tracePtr)).Fflags&flags != 0) {
		goto __17
	}
	goto __15
__17:
	;
	XTcl_Preserve(tls, tracePtr)
	if !(state == uintptr(0)) {
		goto __18
	}
	state = XTcl_SaveInterpState(tls, iPtr, code)
__18:
	;
	if !(XTcl_InterpDeleted(tls, iPtr) != 0) {
		goto __19
	}
	flags = flags | TCL_INTERP_DESTROYED
__19:
	;
	result = (*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*VarTrace)(unsafe.Pointer(tracePtr)).FtraceProc})).f(tls, (*VarTrace)(unsafe.Pointer(tracePtr)).FclientData,
		iPtr, part1, part2, flags)
	if !(result != uintptr(0)) {
		goto __20
	}
	if !(flags&TCL_TRACE_UNSETS != 0) {
		goto __21
	}
	// Ignore errors in unset traces.

	sDisposeTraceResult(tls, (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags, result)
	goto __22
__21:
	disposeFlags = (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags
	code = TCL_ERROR
__22:
	;
__20:
	;
	XTcl_Release(tls, tracePtr)
	if !(code == TCL_ERROR) {
		goto __23
	}
	goto done
__23:
	;
	goto __15
__15:
	tracePtr = (*ActiveVarTrace)(unsafe.Pointer(bp + 256 /* &active */)).FnextTracePtr
	goto __14
	goto __16
__16:
	;
__13:
	;

	// Invoke traces on the variable itself.

	if !(flags&TCL_TRACE_UNSETS != 0) {
		goto __24
	}
	flags = flags | TCL_TRACE_DESTROYED
__24:
	;
	(*ActiveVarTrace)(unsafe.Pointer(bp + 256 /* &active */)).FvarPtr = varPtr
	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&traceflags != 0) {
		goto __25
	}
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FfindProc})).f(tls, iPtr+1008 /* &.varTraces */, varPtr)
	tracePtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
__26:
	if !(tracePtr != uintptr(0)) {
		goto __28
	}
	(*ActiveVarTrace)(unsafe.Pointer(bp + 256 /* &active */)).FnextTracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
	if !!((*VarTrace)(unsafe.Pointer(tracePtr)).Fflags&flags != 0) {
		goto __29
	}
	goto __27
__29:
	;
	XTcl_Preserve(tls, tracePtr)
	if !(state == uintptr(0)) {
		goto __30
	}
	state = XTcl_SaveInterpState(tls, iPtr, code)
__30:
	;
	if !(XTcl_InterpDeleted(tls, iPtr) != 0) {
		goto __31
	}
	flags = flags | TCL_INTERP_DESTROYED
__31:
	;
	result = (*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*VarTrace)(unsafe.Pointer(tracePtr)).FtraceProc})).f(tls, (*VarTrace)(unsafe.Pointer(tracePtr)).FclientData,
		iPtr, part1, part2, flags)
	if !(result != uintptr(0)) {
		goto __32
	}
	if !(flags&TCL_TRACE_UNSETS != 0) {
		goto __33
	}
	// Ignore errors in unset traces.

	sDisposeTraceResult(tls, (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags, result)
	goto __34
__33:
	disposeFlags = (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags
	code = TCL_ERROR
__34:
	;
__32:
	;
	XTcl_Release(tls, tracePtr)
	if !(code == TCL_ERROR) {
		goto __35
	}
	goto done
__35:
	;
	goto __27
__27:
	tracePtr = (*ActiveVarTrace)(unsafe.Pointer(bp + 256 /* &active */)).FnextTracePtr
	goto __26
	goto __28
__28:
	;
__25:
	;

	// Restore the variable's flags, remove the record of our active traces,
	// and then return.

done:
	if !(code == TCL_ERROR) {
		goto __36
	}
	if !(leaveErrMsg != 0) {
		goto __38
	}
	verb = ts + 2631  /* "" */
	type1 = ts + 2631 /* "" */

	switch flags & (TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_ARRAY) {
	case TCL_TRACE_READS:
		goto __41
	case TCL_TRACE_WRITES:
		goto __42
	case TCL_TRACE_ARRAY:
		goto __43
	}
	goto __40
__41:
	verb = ts + 6057 /* "read" */
	type1 = verb
	goto __40
__42:
	verb = ts + 5888   /* "set" */
	type1 = ts + 33651 /* "write" */
	goto __40
__43:
	verb = ts + 65068  /* "trace array" */
	type1 = ts + 25675 /* "array" */
	goto __40
__40:
	;

	if !(disposeFlags&TCL_TRACE_RESULT_OBJECT != 0) {
		goto __44
	}
	XTcl_SetObjResult(tls, iPtr, result)
	goto __45
__44:
	XTcl_SetObjResult(tls, iPtr,
		XTcl_NewStringObj(tls, result, -1))
__45:
	;
	XTcl_AddErrorInfo(tls, iPtr, ts+2631)

	XTcl_AppendObjToErrorInfo(tls, iPtr, XTcl_ObjPrintf(tls,
		ts+65080, libc.VaList(bp, type1, part1,
			func() uintptr {
				if part2 != 0 {
					return ts + 50766 /* "(" */
				}
				return ts + 2631 /* "" */
			}(), func() uintptr {
				if part2 != 0 {
					return part2
				}
				return ts + 2631
			}(),
			func() uintptr {
				if part2 != 0 {
					return ts + 4078 /* ")" */
				}
				return ts + 2631 /* "" */
			}())))
	if !(disposeFlags&TCL_TRACE_RESULT_OBJECT != 0) {
		goto __46
	}
	XTclVarErrMsg(tls, iPtr, part1, part2, verb,
		XTcl_GetString(tls, result))
	goto __47
__46:
	XTclVarErrMsg(tls, iPtr, part1, part2, verb, result)
__47:
	;
	*(*int32)(unsafe.Pointer(iPtr + 424)) &= libc.CplInt32(ERR_ALREADY_LOGGED)
	XTcl_DiscardInterpState(tls, state)
	goto __39
__38:
	XTcl_RestoreInterpState(tls, iPtr, state)
__39:
	;
	sDisposeTraceResult(tls, disposeFlags, result)
	goto __37
__36:
	if !(state != 0) {
		goto __48
	}
	if !(code == TCL_OK) {
		goto __49
	}
	code = XTcl_RestoreInterpState(tls, iPtr, state)
	goto __50
__49:
	XTcl_DiscardInterpState(tls, state)
__50:
	;
__48:
	;
__37:
	;

	if !(arrayPtr != 0 && (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __51
	}
	(*VarInHash)(unsafe.Pointer(arrayPtr)).FrefCount--
__51:
	;
	if !(copiedName != 0) {
		goto __52
	}
	XTcl_DStringFree(tls, bp+40)
__52:
	;
	*(*int32)(unsafe.Pointer(varPtr)) &= libc.CplInt32(VAR_TRACE_ACTIVE)
	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __53
	}
	(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount--
__53:
	;
	(*Interp)(unsafe.Pointer(iPtr)).FactiveVarTracePtr = (*ActiveVarTrace)(unsafe.Pointer(bp + 256 /* &active */)).FnextPtr
	XTcl_Release(tls, iPtr)
	return code
}

//----------------------------------------------------------------------
//
// DisposeTraceResult--
//
//	This function is called to dispose of the result returned from a trace
//	function. The disposal method appropriate to the type of result is
//	determined by flags.
//
// Results:
//	None.
//
// Side effects:
//	The memory allocated for the trace result may be freed.
//
//----------------------------------------------------------------------

func sDisposeTraceResult(tls *libc.TLS, flags int32, result uintptr) { /* tclTrace.c:2834:1: */
	if flags&TCL_TRACE_RESULT_DYNAMIC != 0 {
		XTclpFree(tls, result)
	} else if flags&TCL_TRACE_RESULT_OBJECT != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = result
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_UntraceVar --
//
//	Remove a previously-created trace for a variable.
//
// Results:
//	None.
//
// Side effects:
//	If there exists a trace for the variable given by varName with the
//	given flags, proc, and clientData, then that trace is removed.
//
//----------------------------------------------------------------------

func XTcl_UntraceVar(tls *libc.TLS, interp uintptr, varName uintptr, flags int32, proc uintptr, clientData ClientData) { /* tclTrace.c:2866:1: */
	XTcl_UntraceVar2(tls, interp, varName, uintptr(0), flags, proc, clientData)
}

//----------------------------------------------------------------------
//
// Tcl_UntraceVar2 --
//
//	Remove a previously-created trace for a variable.
//
// Results:
//	None.
//
// Side effects:
//	If there exists a trace for the variable given by part1 and part2 with
//	the given flags, proc, and clientData, then that trace is removed.
//
//----------------------------------------------------------------------

func XTcl_UntraceVar2(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, flags int32, proc uintptr, clientData ClientData) { /* tclTrace.c:2898:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var tracePtr uintptr
	var prevPtr uintptr
	var nextPtr uintptr
	var varPtr uintptr
	// var arrayPtr uintptr at bp, 8

	var iPtr uintptr
	var activePtr uintptr
	var flagMask int32
	var allFlags int32
	var hPtr uintptr
	iPtr = interp
	allFlags = 0

	// Set up a mask to mask out the parts of the flags that we are not
	// interested in now.

	flagMask = TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY
	varPtr = XTclLookupVar(tls, interp, part1, part2, flags&flagMask, uintptr(0),
		/*createPart1*/ 0 /*createPart2*/, 0, bp)
	if !(varPtr == uintptr(0) || !((*Var)(unsafe.Pointer(varPtr)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET)&flags != 0)) {
		goto __1
	}
	return
__1:
	;

	// Set up a mask to mask out the parts of the flags that we are not
	// interested in now.

	flagMask = TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS | TCL_TRACE_ARRAY | TCL_TRACE_RESULT_DYNAMIC | TCL_TRACE_RESULT_OBJECT
	flagMask = flagMask | TCL_TRACE_OLD_STYLE
	flags = flags & flagMask

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FfindProc})).f(tls, iPtr+1008 /* &.varTraces */, varPtr)
	tracePtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	prevPtr = uintptr(0)
__2:
	;
	if !(tracePtr == uintptr(0)) {
		goto __5
	}
	goto updateFlags
__5:
	;
	if !((*VarTrace)(unsafe.Pointer(tracePtr)).FtraceProc == proc && (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags == flags &&
		(*VarTrace)(unsafe.Pointer(tracePtr)).FclientData == clientData) {
		goto __6
	}
	goto __4
__6:
	;
	allFlags = allFlags | (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags
	goto __3
__3:
	prevPtr = tracePtr
	tracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
	goto __2
	goto __4
__4:
	;

	// The code below makes it possible to delete traces while traces are
	// active: it makes sure that the deleted trace won't be processed by
	// TclCallVarTraces.
	//
	// Caveat (Bug 3062331): When an unset trace handler on a variable
	// tries to delete a different unset trace handler on the same variable,
	// the results may be surprising.  When variable unset traces fire, the
	// traced variable is already gone.  So the TclLookupVar() call above
	// will not find that variable, and not finding it will never reach here
	// to perform the deletion.  This means callers of Tcl_UntraceVar*()
	// attempting to delete unset traces from within the handler of another
	// unset trace have to account for the possibility that their call to
	// Tcl_UntraceVar*() is a no-op.

	activePtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveVarTracePtr
__7:
	if !(activePtr != uintptr(0)) {
		goto __9
	}
	if !((*ActiveVarTrace)(unsafe.Pointer(activePtr)).FnextTracePtr == tracePtr) {
		goto __10
	}
	(*ActiveVarTrace)(unsafe.Pointer(activePtr)).FnextTracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
__10:
	;
	goto __8
__8:
	activePtr = (*ActiveVarTrace)(unsafe.Pointer(activePtr)).FnextPtr
	goto __7
	goto __9
__9:
	;
	nextPtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
	if !(prevPtr == uintptr(0)) {
		goto __11
	}
	if !(nextPtr != 0) {
		goto __13
	}
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = nextPtr
	goto __14
__13:
	XTcl_DeleteHashEntry(tls, hPtr)
__14:
	;
	goto __12
__11:
	(*VarTrace)(unsafe.Pointer(prevPtr)).FnextPtr = nextPtr
__12:
	;
	(*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr = uintptr(0)
	XTcl_EventuallyFree(tls, tracePtr, uintptr(3))

	tracePtr = nextPtr
__15:
	if !(tracePtr != uintptr(0)) {
		goto __17
	}
	allFlags = allFlags | (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags
	goto __16
__16:
	tracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
	goto __15
	goto __17
__17:
	;

updateFlags:
	*(*int32)(unsafe.Pointer(varPtr)) &= libc.CplInt32(VAR_TRACED_READ | VAR_TRACED_WRITE | VAR_TRACED_ARRAY | VAR_TRACED_UNSET)
	if !(allFlags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0) {
		goto __18
	}
	*(*int32)(unsafe.Pointer(varPtr)) |= allFlags & (VAR_TRACED_READ | VAR_TRACED_WRITE | VAR_TRACED_ARRAY | VAR_TRACED_UNSET)
	goto __19
__18:
	if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) {
		goto __20
	}
	// If this is the last trace on the variable, and the variable is
	// unset and unused, then free up the variable.

	XTclCleanupVar(tls, varPtr, uintptr(0))
__20:
	;
__19:
}

//----------------------------------------------------------------------
//
// Tcl_VarTraceInfo --
//
//	Return the clientData value associated with a trace on a variable.
//	This function can also be used to step through all of the traces on a
//	particular variable that have the same trace function.
//
// Results:
//	The return value is the clientData value associated with a trace on
//	the given variable. Information will only be returned for a trace with
//	proc as trace function. If the clientData argument is NULL then the
//	first such trace is returned; otherwise, the next relevant one after
//	the one given by clientData will be returned. If the variable doesn't
//	exist, or if there are no (more) traces for it, then NULL is returned.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_VarTraceInfo(tls *libc.TLS, interp uintptr, varName uintptr, flags int32, proc uintptr, prevClientData ClientData) ClientData { /* tclTrace.c:3035:1: */
	return XTcl_VarTraceInfo2(tls, interp, varName, uintptr(0), flags, proc,
		prevClientData)
}

//----------------------------------------------------------------------
//
// Tcl_VarTraceInfo2 --
//
//	Same as Tcl_VarTraceInfo, except takes name in two pieces instead of
//	one.
//
// Results:
//	Same as Tcl_VarTraceInfo.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_VarTraceInfo2(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, flags int32, proc uintptr, prevClientData ClientData) ClientData { /* tclTrace.c:3069:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var iPtr uintptr = interp
	var varPtr uintptr
	// var arrayPtr uintptr at bp, 8

	var hPtr uintptr

	varPtr = XTclLookupVar(tls, interp, part1, part2,
		flags&(TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY), uintptr(0),
		/*createPart1*/ 0 /*createPart2*/, 0, bp)
	if varPtr == uintptr(0) {
		return uintptr(0)
	}

	// Find the relevant trace, if any, and return its clientData.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FfindProc})).f(tls, iPtr+1008 /* &.varTraces */, varPtr)

	if hPtr != 0 {
		var tracePtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		if prevClientData != uintptr(0) {
			for ; tracePtr != uintptr(0); tracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr {
				if (*VarTrace)(unsafe.Pointer(tracePtr)).FclientData == prevClientData &&
					(*VarTrace)(unsafe.Pointer(tracePtr)).FtraceProc == proc {
					tracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
					break
				}
			}
		}
		for ; tracePtr != uintptr(0); tracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr {
			if (*VarTrace)(unsafe.Pointer(tracePtr)).FtraceProc == proc {
				return (*VarTrace)(unsafe.Pointer(tracePtr)).FclientData
			}
		}
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_TraceVar --
//
//	Arrange for reads and/or writes to a variable to cause a function to
//	be invoked, which can monitor the operations and/or change their
//	actions.
//
// Results:
//	A standard Tcl return value.
//
// Side effects:
//	A trace is set up on the variable given by varName, such that future
//	references to the variable will be intermediated by proc. See the
//	manual entry for complete details on the calling sequence for proc.
//     The variable's flags are updated.
//
//----------------------------------------------------------------------

func XTcl_TraceVar(tls *libc.TLS, interp uintptr, varName uintptr, flags int32, proc uintptr, clientData ClientData) int32 { /* tclTrace.c:3144:1: */
	return XTcl_TraceVar2(tls, interp, varName, uintptr(0), flags, proc, clientData)
}

//----------------------------------------------------------------------
//
// Tcl_TraceVar2 --
//
//	Arrange for reads and/or writes to a variable to cause a function to
//	be invoked, which can monitor the operations and/or change their
//	actions.
//
// Results:
//	A standard Tcl return value.
//
// Side effects:
//	A trace is set up on the variable given by part1 and part2, such that
//	future references to the variable will be intermediated by proc. See
//	the manual entry for complete details on the calling sequence for
//	proc. The variable's flags are updated.
//
//----------------------------------------------------------------------

func XTcl_TraceVar2(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, flags int32, proc uintptr, clientData ClientData) int32 { /* tclTrace.c:3182:1: */
	var tracePtr uintptr
	var result int32

	tracePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(VarTrace{})))
	(*VarTrace)(unsafe.Pointer(tracePtr)).FtraceProc = proc
	(*VarTrace)(unsafe.Pointer(tracePtr)).FclientData = clientData
	(*VarTrace)(unsafe.Pointer(tracePtr)).Fflags = flags

	result = sTraceVarEx(tls, interp, part1, part2, tracePtr)

	if result != TCL_OK {
		XTclpFree(tls, tracePtr)
	}
	return result
}

//----------------------------------------------------------------------
//
// TraceVarEx --
//
//	Arrange for reads and/or writes to a variable to cause a function to
//	be invoked, which can monitor the operations and/or change their
//	actions.
//
// Results:
//	A standard Tcl return value.
//
// Side effects:
//	A trace is set up on the variable given by part1 and part2, such that
//	future references to the variable will be intermediated by the
//	traceProc listed in tracePtr. See the manual entry for complete
//	details on the calling sequence for proc.
//
//----------------------------------------------------------------------

func sTraceVarEx(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, tracePtr uintptr) int32 { /* tclTrace.c:3235:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var iPtr uintptr = interp
	var varPtr uintptr
	// var arrayPtr uintptr at bp, 8

	var flagMask int32
	// var isNew int32 at bp+8, 4

	var hPtr uintptr

	// We strip 'flags' down to just the parts which are relevant to
	// TclLookupVar, to avoid conflicts between trace flags and internal
	// namespace flags such as 'TCL_FIND_ONLY_NS'. This can now occur since we
	// have trace flags with values 0x1000 and higher.

	flagMask = TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY
	varPtr = XTclLookupVar(tls, interp, part1, part2,
		(*VarTrace)(unsafe.Pointer(tracePtr)).Fflags&flagMask|TCL_LEAVE_ERR_MSG,
		ts+5926, 1 /*createPart2*/, 1, bp)
	if varPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Check for a nonsense flag combination. Note that this is a Tcl_Panic()
	// because there should be no code path that ever sets both flags.

	if (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags&TCL_TRACE_RESULT_DYNAMIC != 0 &&
		(*VarTrace)(unsafe.Pointer(tracePtr)).Fflags&TCL_TRACE_RESULT_OBJECT != 0 {
		XTcl_Panic(tls, ts+65110, 0)
	}

	// Set up trace information.

	flagMask = TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS | TCL_TRACE_ARRAY | TCL_TRACE_RESULT_DYNAMIC | TCL_TRACE_RESULT_OBJECT
	flagMask = flagMask | TCL_TRACE_OLD_STYLE
	(*VarTrace)(unsafe.Pointer(tracePtr)).Fflags = (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags & flagMask

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FcreateProc})).f(tls, iPtr+1008 /* &.varTraces */, varPtr, bp+8 /* &isNew */)
	if *(*int32)(unsafe.Pointer(bp + 8)) != 0 {
		(*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr = uintptr(0)
	} else {
		(*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	}
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = tracePtr

	// Mark the variable as traced so we know to call them.

	*(*int32)(unsafe.Pointer(varPtr)) |= (*VarTrace)(unsafe.Pointer(tracePtr)).Fflags & (VAR_TRACED_READ | VAR_TRACED_WRITE | VAR_TRACED_ARRAY | VAR_TRACED_UNSET)

	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Include the static character classification tables and macros.

// tclUniData.c --
//
//	Declarations of Unicode character information tables.  This file is
//	automatically generated by the tools/uniParse.tcl script.  Do not
//	modify this file by hand.
//
// Copyright (c) 1998 by Scriptics Corporation.
// All rights reserved.

// A 16-bit Unicode character is split into two parts in order to index
// into the following tables.  The lower OFFSET_BITS comprise an offset
// into a page of characters.  The upper bits comprise the page number.

// The pageMap is indexed by page number and returns an alternate page number
// that identifies a unique page of characters.  Many Unicode characters map
// to the same alternate page number.

var pageMap = [2048]uint16{
	uint16(0), uint16(32), uint16(64), uint16(96), uint16(0), uint16(128), uint16(160), uint16(192), uint16(224), uint16(256), uint16(288), uint16(320), uint16(352), uint16(384), uint16(416),
	uint16(448), uint16(224), uint16(480), uint16(512), uint16(544), uint16(576), uint16(608), uint16(640), uint16(672), uint16(704), uint16(704), uint16(736), uint16(768), uint16(800),
	uint16(832), uint16(864), uint16(896), uint16(928), uint16(960), uint16(992), uint16(224), uint16(1024), uint16(224), uint16(1056), uint16(224), uint16(224), uint16(1088),
	uint16(1120), uint16(1152), uint16(1184), uint16(1216), uint16(1248), uint16(1280), uint16(1312), uint16(1344), uint16(1376), uint16(1408), uint16(1344), uint16(1344),
	uint16(1440), uint16(1472), uint16(1504), uint16(1536), uint16(1568), uint16(1344), uint16(1344), uint16(1600), uint16(1632), uint16(1664), uint16(1696), uint16(1728),
	uint16(1760), uint16(1792), uint16(1824), uint16(1344), uint16(1856), uint16(1888), uint16(1920), uint16(1952), uint16(1984), uint16(2016), uint16(2048), uint16(2080),
	uint16(2112), uint16(2144), uint16(2176), uint16(2208), uint16(2240), uint16(2272), uint16(2304), uint16(2336), uint16(2368), uint16(2400), uint16(2432), uint16(2464),
	uint16(2496), uint16(2528), uint16(2560), uint16(2592), uint16(2624), uint16(2656), uint16(2688), uint16(2720), uint16(2752), uint16(2784), uint16(2816), uint16(2848),
	uint16(2880), uint16(2912), uint16(2944), uint16(2976), uint16(3008), uint16(3040), uint16(3072), uint16(3104), uint16(3136), uint16(3168), uint16(3200), uint16(3232),
	uint16(3264), uint16(3296), uint16(3328), uint16(3360), uint16(3392), uint16(3296), uint16(3424), uint16(3456), uint16(3488), uint16(3520), uint16(3552), uint16(3584),
	uint16(3616), uint16(3296), uint16(1344), uint16(3648), uint16(3680), uint16(3712), uint16(3744), uint16(3776), uint16(3808), uint16(3840), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(3872), uint16(1344), uint16(3904), uint16(3936),
	uint16(3968), uint16(1344), uint16(4000), uint16(1344), uint16(4032), uint16(4064), uint16(4096), uint16(4128), uint16(4128), uint16(4160), uint16(4192), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(4224), uint16(4256), uint16(1344), uint16(1344), uint16(4288), uint16(4320), uint16(4352),
	uint16(4384), uint16(4416), uint16(1344), uint16(4448), uint16(4480), uint16(4512), uint16(4544), uint16(1344), uint16(4576), uint16(4608), uint16(4640), uint16(4672),
	uint16(1344), uint16(4704), uint16(4736), uint16(4768), uint16(4800), uint16(4832), uint16(1344), uint16(4864), uint16(4896), uint16(4928), uint16(4960), uint16(1344),
	uint16(4992), uint16(5024), uint16(5056), uint16(5088), uint16(5120), uint16(3296), uint16(5152), uint16(5184), uint16(5216), uint16(5248), uint16(5280), uint16(5312),
	uint16(1344), uint16(5344), uint16(1344), uint16(5376), uint16(5408), uint16(5440), uint16(5472), uint16(5504), uint16(5536), uint16(5568), uint16(5600), uint16(5632),
	uint16(5664), uint16(5696), uint16(5728), uint16(5664), uint16(704), uint16(704), uint16(224), uint16(224), uint16(224), uint16(224), uint16(5760), uint16(224), uint16(224),
	uint16(224), uint16(5792), uint16(5824), uint16(5856), uint16(5888), uint16(5920), uint16(5952), uint16(5984), uint16(6016), uint16(6048), uint16(6080), uint16(6112),
	uint16(6144), uint16(6176), uint16(6208), uint16(6240), uint16(6272), uint16(6304), uint16(6336), uint16(6368), uint16(6400), uint16(6432), uint16(6464), uint16(6496),
	uint16(6528), uint16(6560), uint16(6560), uint16(6560), uint16(6560), uint16(6560), uint16(6560), uint16(6560), uint16(6560), uint16(6592), uint16(6624), uint16(4928),
	uint16(6656), uint16(6688), uint16(6720), uint16(6752), uint16(6784), uint16(4928), uint16(6816), uint16(6848), uint16(6880), uint16(6912), uint16(6944), uint16(6976),
	uint16(7008), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(7040), uint16(7072), uint16(7104), uint16(4928), uint16(4928), uint16(4928),
	uint16(7136), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(7168), uint16(7200), uint16(4928), uint16(7232),
	uint16(7264), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(6560), uint16(6560), uint16(6560),
	uint16(6560), uint16(7296), uint16(6560), uint16(7328), uint16(7360), uint16(6560), uint16(6560), uint16(6560), uint16(6560), uint16(6560), uint16(6560), uint16(6560),
	uint16(6560), uint16(4928), uint16(7392), uint16(7424), uint16(7456), uint16(7488), uint16(4928), uint16(4928), uint16(4928), uint16(7520), uint16(7552), uint16(7584),
	uint16(7616), uint16(224), uint16(224), uint16(224), uint16(7648), uint16(7680), uint16(7712), uint16(1344), uint16(7744), uint16(7776), uint16(7808), uint16(7808),
	uint16(704), uint16(7840), uint16(7872), uint16(7904), uint16(3296), uint16(7936), uint16(4928), uint16(4928), uint16(7968), uint16(4928), uint16(4928), uint16(4928),
	uint16(4928), uint16(4928), uint16(4928), uint16(8000), uint16(8032), uint16(8064), uint16(8096), uint16(3200), uint16(1344), uint16(8128), uint16(4192), uint16(1344),
	uint16(8160), uint16(8192), uint16(8224), uint16(1344), uint16(1344), uint16(8256), uint16(1344), uint16(4928), uint16(8288), uint16(8320), uint16(8352), uint16(8384),
	uint16(4928), uint16(8352), uint16(8416), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928), uint16(4928),
	uint16(4928), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(4928), uint16(4928), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(8448), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(8480), uint16(4928), uint16(8512), uint16(5440), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(8544), uint16(8576), uint16(224), uint16(8608), uint16(8640), uint16(1344), uint16(1344), uint16(8672), uint16(8704), uint16(8736), uint16(224),
	uint16(8768), uint16(8800), uint16(8832), uint16(8864), uint16(8896), uint16(8928), uint16(8960), uint16(1344), uint16(8992), uint16(9024), uint16(9056), uint16(9088),
	uint16(9120), uint16(1632), uint16(9152), uint16(9184), uint16(9216), uint16(1920), uint16(9248), uint16(9280), uint16(9312), uint16(1344), uint16(9344), uint16(9376),
	uint16(9408), uint16(1344), uint16(9440), uint16(9472), uint16(9504), uint16(9536), uint16(9568), uint16(9600), uint16(9632), uint16(9664), uint16(9664), uint16(1344),
	uint16(9696), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(9728), uint16(9760), uint16(9792), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824),
	uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824),
	uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824),
	uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824),
	uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824),
	uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9824), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856),
	uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(9856), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(9888), uint16(1344), uint16(1344), uint16(9920), uint16(3296), uint16(9952), uint16(9984), uint16(10016),
	uint16(1344), uint16(1344), uint16(10048), uint16(10080), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344), uint16(1344),
	uint16(1344), uint16(1344), uint16(1344), uint16(10112), uint16(10144), uint16(1344), uint16(10176), uint16(1344), uint16(10208), uint16(10240), uint16(10272),
	uint16(10304), uint16(10336), uint16(10368), uint16(1344), uint16(1344), uint16(1344), uint16(10400), uint16(10432), uint16(64), uint16(10464), uint16(10496),
	uint16(10528), uint16(4736), uint16(10560), uint16(10592),
} /* tclUniData.c:26:29 */

// The groupMap is indexed by combining the alternate page number with
// the page offset and returns a group number that identifies a unique
// set of character attributes.

var groupMap = [10624]uint8{
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(2), uint8(3), uint8(3), uint8(3), uint8(4), uint8(3), uint8(3), uint8(3), uint8(5), uint8(6), uint8(3), uint8(7), uint8(3), uint8(8),
	uint8(3), uint8(3), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(3), uint8(3), uint8(7), uint8(7), uint8(7), uint8(3), uint8(3), uint8(10), uint8(10), uint8(10),
	uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10),
	uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(5), uint8(3), uint8(6), uint8(11), uint8(12), uint8(11), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13),
	uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13),
	uint8(13), uint8(13), uint8(13), uint8(5), uint8(7), uint8(6), uint8(7), uint8(1), uint8(2), uint8(3), uint8(4), uint8(4), uint8(4), uint8(4), uint8(14), uint8(3), uint8(11), uint8(14), uint8(15), uint8(16),
	uint8(7), uint8(17), uint8(14), uint8(11), uint8(14), uint8(7), uint8(18), uint8(18), uint8(11), uint8(19), uint8(3), uint8(3), uint8(11), uint8(18), uint8(15), uint8(20), uint8(18), uint8(18),
	uint8(18), uint8(3), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10),
	uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(7), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(21),
	uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13),
	uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(7), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(22), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(25), uint8(26), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(21), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(21), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(27),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(28), uint8(29), uint8(30), uint8(23), uint8(24), uint8(23), uint8(24), uint8(31), uint8(23), uint8(24), uint8(32),
	uint8(32), uint8(23), uint8(24), uint8(21), uint8(33), uint8(34), uint8(35), uint8(23), uint8(24), uint8(32), uint8(36), uint8(37), uint8(38), uint8(39), uint8(23), uint8(24), uint8(40),
	uint8(21), uint8(38), uint8(41), uint8(42), uint8(43), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(44), uint8(23), uint8(24), uint8(44), uint8(21), uint8(21),
	uint8(23), uint8(24), uint8(44), uint8(23), uint8(24), uint8(45), uint8(45), uint8(23), uint8(24), uint8(23), uint8(24), uint8(46), uint8(23), uint8(24), uint8(21), uint8(15), uint8(23),
	uint8(24), uint8(21), uint8(47), uint8(15), uint8(15), uint8(15), uint8(15), uint8(48), uint8(49), uint8(50), uint8(48), uint8(49), uint8(50), uint8(48), uint8(49), uint8(50), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(51), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24),
	uint8(21), uint8(48), uint8(49), uint8(50), uint8(23), uint8(24), uint8(52), uint8(53), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(54),
	uint8(21), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(55), uint8(23), uint8(24), uint8(56), uint8(57), uint8(58), uint8(58), uint8(23), uint8(24),
	uint8(59), uint8(60), uint8(61), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(62), uint8(63), uint8(64), uint8(65),
	uint8(66), uint8(21), uint8(67), uint8(67), uint8(21), uint8(68), uint8(21), uint8(69), uint8(70), uint8(21), uint8(21), uint8(21), uint8(67), uint8(71), uint8(21), uint8(72), uint8(21),
	uint8(73), uint8(74), uint8(21), uint8(75), uint8(76), uint8(74), uint8(77), uint8(78), uint8(21), uint8(21), uint8(76), uint8(21), uint8(79), uint8(80), uint8(21), uint8(21), uint8(81),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(82), uint8(21), uint8(21), uint8(83), uint8(21), uint8(84), uint8(83), uint8(21), uint8(21), uint8(21),
	uint8(85), uint8(83), uint8(86), uint8(87), uint8(87), uint8(88), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(89), uint8(21), uint8(15), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(90), uint8(91), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92),
	uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(11), uint8(11), uint8(11), uint8(11), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92),
	uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11),
	uint8(11), uint8(11), uint8(11), uint8(11), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(92),
	uint8(11), uint8(92), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11),
	uint8(11), uint8(11), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(94), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(92), uint8(11), uint8(23), uint8(24), uint8(0), uint8(0), uint8(92), uint8(42), uint8(42), uint8(42), uint8(3), uint8(95), uint8(0), uint8(0), uint8(0), uint8(0), uint8(11), uint8(11),
	uint8(96), uint8(3), uint8(97), uint8(97), uint8(97), uint8(0), uint8(98), uint8(0), uint8(99), uint8(99), uint8(21), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10),
	uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(0), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10),
	uint8(10), uint8(10), uint8(10), uint8(100), uint8(101), uint8(101), uint8(101), uint8(21), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13),
	uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(102), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13),
	uint8(13), uint8(13), uint8(103), uint8(104), uint8(104), uint8(105), uint8(106), uint8(107), uint8(108), uint8(108), uint8(108), uint8(109), uint8(110), uint8(111),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(112), uint8(113), uint8(114), uint8(115), uint8(116), uint8(117), uint8(7), uint8(23), uint8(24),
	uint8(118), uint8(23), uint8(24), uint8(21), uint8(54), uint8(54), uint8(54), uint8(119), uint8(119), uint8(119), uint8(119), uint8(119), uint8(119), uint8(119), uint8(119),
	uint8(119), uint8(119), uint8(119), uint8(119), uint8(119), uint8(119), uint8(119), uint8(119), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10),
	uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10),
	uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(10), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13),
	uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13),
	uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(113), uint8(113), uint8(113), uint8(113), uint8(113), uint8(113), uint8(113), uint8(113), uint8(113),
	uint8(113), uint8(113), uint8(113), uint8(113), uint8(113), uint8(113), uint8(113), uint8(23), uint8(24), uint8(14), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(120), uint8(120), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(121), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(122), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(0), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123),
	uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123),
	uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123),
	uint8(0), uint8(0), uint8(92), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(21), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124),
	uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124),
	uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124),
	uint8(124), uint8(124), uint8(124), uint8(21), uint8(21), uint8(3), uint8(8), uint8(0), uint8(0), uint8(14), uint8(14), uint8(4), uint8(0), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(8), uint8(93), uint8(3), uint8(93), uint8(93), uint8(3), uint8(93), uint8(93), uint8(3), uint8(93), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(3), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(17), uint8(17), uint8(17),
	uint8(17), uint8(17), uint8(17), uint8(7), uint8(7), uint8(7), uint8(3), uint8(3), uint8(4), uint8(3), uint8(3), uint8(14), uint8(14), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(3), uint8(17), uint8(3), uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(92), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(3), uint8(3), uint8(3), uint8(3), uint8(15), uint8(15),
	uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(3), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(17), uint8(14), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(92), uint8(92), uint8(93), uint8(93), uint8(14), uint8(93), uint8(93), uint8(93), uint8(93), uint8(15), uint8(15), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(15), uint8(15), uint8(15), uint8(14), uint8(14), uint8(15), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(0), uint8(17), uint8(15), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(15),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9),
	uint8(9), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(92), uint8(92), uint8(14), uint8(3), uint8(3), uint8(3), uint8(92), uint8(0), uint8(0),
	uint8(93), uint8(4), uint8(4), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(92), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(92), uint8(93), uint8(93), uint8(93), uint8(92), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(3), uint8(3),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(3), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(11), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(0), uint8(17), uint8(17), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(92), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(17), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(125),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(93), uint8(125), uint8(93), uint8(15), uint8(125), uint8(125), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(125), uint8(125), uint8(125), uint8(125), uint8(93), uint8(125), uint8(125), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(3), uint8(3), uint8(9), uint8(9), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(3), uint8(92), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(125), uint8(125), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(0), uint8(0), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(0), uint8(15), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(93), uint8(15), uint8(125), uint8(125), uint8(125), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(125), uint8(125), uint8(0), uint8(0), uint8(125), uint8(125), uint8(93), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(125), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(0), uint8(0), uint8(9), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(15), uint8(15), uint8(4), uint8(4), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(14), uint8(4),
	uint8(15), uint8(3), uint8(93), uint8(0), uint8(0), uint8(93), uint8(93), uint8(125), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15),
	uint8(15), uint8(0), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(0), uint8(0), uint8(93), uint8(0), uint8(125), uint8(125), uint8(125), uint8(93), uint8(93), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(93), uint8(93), uint8(0), uint8(0), uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0), uint8(93), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9),
	uint8(9), uint8(93), uint8(93), uint8(15), uint8(15), uint8(15), uint8(93), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(93),
	uint8(125), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(0), uint8(0), uint8(93), uint8(15), uint8(125), uint8(125), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(93), uint8(93),
	uint8(125), uint8(0), uint8(125), uint8(125), uint8(93), uint8(0), uint8(0), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(93), uint8(93), uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(3), uint8(4),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(93), uint8(125), uint8(125), uint8(0),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(0), uint8(0), uint8(93), uint8(15), uint8(125), uint8(93), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(125), uint8(125), uint8(0), uint8(0), uint8(125),
	uint8(125), uint8(93), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(93), uint8(125), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(93), uint8(93), uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(14), uint8(15), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15),
	uint8(0), uint8(15), uint8(0), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(125), uint8(125), uint8(93),
	uint8(125), uint8(125), uint8(0), uint8(0), uint8(0), uint8(125), uint8(125), uint8(125), uint8(0), uint8(125), uint8(125), uint8(125), uint8(93), uint8(0), uint8(0), uint8(15), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(125), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(9), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(18), uint8(18), uint8(18), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(4), uint8(14),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(125), uint8(125), uint8(125), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(0), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(93), uint8(15), uint8(93), uint8(93), uint8(93), uint8(125),
	uint8(125), uint8(125), uint8(125), uint8(0), uint8(93), uint8(93), uint8(93), uint8(0), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(93), uint8(93), uint8(0), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(93), uint8(93), uint8(0), uint8(0), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(3), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(14), uint8(15), uint8(93), uint8(125), uint8(125), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(0), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(93), uint8(15), uint8(125), uint8(93), uint8(125),
	uint8(125), uint8(125), uint8(125), uint8(125), uint8(0), uint8(93), uint8(125), uint8(125), uint8(0), uint8(125), uint8(125), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(125), uint8(125), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(93), uint8(93),
	uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(93), uint8(125), uint8(125), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(15), uint8(125), uint8(125),
	uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(125), uint8(125), uint8(125), uint8(0), uint8(125), uint8(125), uint8(125), uint8(93), uint8(15), uint8(14),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(125), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(15), uint8(15), uint8(15),
	uint8(93), uint8(93), uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(14), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(93), uint8(125), uint8(125), uint8(0), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0),
	uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(0), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(93), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(125), uint8(125), uint8(125), uint8(93), uint8(93), uint8(93), uint8(0), uint8(93), uint8(0), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125),
	uint8(125), uint8(125), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0), uint8(125),
	uint8(125), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(0), uint8(0), uint8(0), uint8(0), uint8(4), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(92), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(3), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(3), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(0), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(93), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(0), uint8(92), uint8(0), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(14), uint8(14), uint8(14), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(14), uint8(3), uint8(14), uint8(14), uint8(14), uint8(93), uint8(93), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(14), uint8(93), uint8(14), uint8(93), uint8(14), uint8(93), uint8(5), uint8(6), uint8(5), uint8(6), uint8(125), uint8(125), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(3), uint8(93), uint8(93),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(0), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(93), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(0), uint8(14), uint8(14), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(14), uint8(14), uint8(14), uint8(14), uint8(3), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(125), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(125), uint8(93), uint8(93), uint8(125), uint8(125), uint8(93), uint8(93), uint8(15), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(125), uint8(125), uint8(93), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(15), uint8(125), uint8(125), uint8(125), uint8(15),
	uint8(15), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(125), uint8(125), uint8(93),
	uint8(93), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(93), uint8(15), uint8(125), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(125), uint8(125), uint8(125), uint8(93), uint8(14), uint8(14), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126),
	uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126),
	uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126), uint8(126),
	uint8(126), uint8(126), uint8(126), uint8(0), uint8(126), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(126), uint8(0), uint8(0), uint8(127), uint8(127), uint8(127), uint8(127),
	uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127),
	uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127),
	uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(127), uint8(3), uint8(92), uint8(127),
	uint8(127), uint8(127), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0),
	uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0),
	uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(93), uint8(93),
	uint8(93), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128),
	uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128),
	uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128),
	uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128), uint8(128),
	uint8(105), uint8(105), uint8(105), uint8(105), uint8(105), uint8(105), uint8(0), uint8(0), uint8(111), uint8(111), uint8(111), uint8(111), uint8(111), uint8(111), uint8(0),
	uint8(0), uint8(8), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(14), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(2), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(5), uint8(6), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(3), uint8(3), uint8(3), uint8(129), uint8(129), uint8(129), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(125), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(125), uint8(3), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(0), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(93), uint8(125), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(3), uint8(3), uint8(3), uint8(92), uint8(3), uint8(3), uint8(3), uint8(4), uint8(15), uint8(93), uint8(0), uint8(0),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(8), uint8(3), uint8(3), uint8(3),
	uint8(3), uint8(93), uint8(93), uint8(93), uint8(17), uint8(93), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(15), uint8(15), uint8(15), uint8(92), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(93), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(93), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0),
	uint8(93), uint8(93), uint8(93), uint8(125), uint8(125), uint8(125), uint8(125), uint8(93), uint8(93), uint8(125), uint8(125), uint8(125), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(125), uint8(125), uint8(93), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(14), uint8(0), uint8(0), uint8(0), uint8(3), uint8(3), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(18), uint8(0), uint8(0), uint8(0), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(93), uint8(93), uint8(125), uint8(125), uint8(93), uint8(0), uint8(0), uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(125), uint8(93), uint8(125), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(93), uint8(125), uint8(93), uint8(125), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(0), uint8(0), uint8(93), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(92),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(0), uint8(0), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(120), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(125), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(93), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(125), uint8(93), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(93),
	uint8(125), uint8(125), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(3), uint8(3), uint8(0), uint8(93), uint8(93), uint8(125), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(125), uint8(125), uint8(93), uint8(93), uint8(125), uint8(93), uint8(93), uint8(93),
	uint8(15), uint8(15), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(125), uint8(93), uint8(93), uint8(125), uint8(125), uint8(125), uint8(93), uint8(125), uint8(93), uint8(93), uint8(93),
	uint8(125), uint8(125), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(3), uint8(3), uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(125),
	uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(125), uint8(125), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9),
	uint8(9), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(3), uint8(3), uint8(130),
	uint8(131), uint8(132), uint8(133), uint8(133), uint8(134), uint8(135), uint8(136), uint8(137), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(138), uint8(138),
	uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138),
	uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138),
	uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(138), uint8(0),
	uint8(0), uint8(138), uint8(138), uint8(138), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93),
	uint8(93), uint8(93), uint8(3), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(125),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(93), uint8(15), uint8(15), uint8(125), uint8(93), uint8(93), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92),
	uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92),
	uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92),
	uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(92), uint8(139), uint8(21), uint8(21),
	uint8(21), uint8(140), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(141), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(92), uint8(92), uint8(92),
	uint8(92), uint8(92), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(142), uint8(21), uint8(21), uint8(143), uint8(21),
	uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(145), uint8(145), uint8(145), uint8(145), uint8(145), uint8(145),
	uint8(145), uint8(145), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(0), uint8(0), uint8(145), uint8(145), uint8(145), uint8(145), uint8(145),
	uint8(145), uint8(0), uint8(0), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(145), uint8(145), uint8(145), uint8(145),
	uint8(145), uint8(145), uint8(145), uint8(145), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(145), uint8(145),
	uint8(145), uint8(145), uint8(145), uint8(145), uint8(145), uint8(145), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(0), uint8(0), uint8(145),
	uint8(145), uint8(145), uint8(145), uint8(145), uint8(145), uint8(0), uint8(0), uint8(21), uint8(144), uint8(21), uint8(144), uint8(21), uint8(144), uint8(21), uint8(144),
	uint8(0), uint8(145), uint8(0), uint8(145), uint8(0), uint8(145), uint8(0), uint8(145), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144),
	uint8(144), uint8(145), uint8(145), uint8(145), uint8(145), uint8(145), uint8(145), uint8(145), uint8(145), uint8(146), uint8(146), uint8(147), uint8(147), uint8(147),
	uint8(147), uint8(148), uint8(148), uint8(149), uint8(149), uint8(150), uint8(150), uint8(151), uint8(151), uint8(0), uint8(0), uint8(144), uint8(144), uint8(144), uint8(144),
	uint8(144), uint8(144), uint8(144), uint8(144), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152), uint8(144), uint8(144),
	uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152),
	uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(144), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152), uint8(152),
	uint8(152), uint8(152), uint8(144), uint8(144), uint8(21), uint8(153), uint8(21), uint8(0), uint8(21), uint8(21), uint8(145), uint8(145), uint8(154), uint8(154), uint8(155),
	uint8(11), uint8(156), uint8(11), uint8(11), uint8(11), uint8(21), uint8(153), uint8(21), uint8(0), uint8(21), uint8(21), uint8(157), uint8(157), uint8(157), uint8(157), uint8(155),
	uint8(11), uint8(11), uint8(11), uint8(144), uint8(144), uint8(21), uint8(21), uint8(0), uint8(0), uint8(21), uint8(21), uint8(145), uint8(145), uint8(158), uint8(158), uint8(0),
	uint8(11), uint8(11), uint8(11), uint8(144), uint8(144), uint8(21), uint8(21), uint8(21), uint8(114), uint8(21), uint8(21), uint8(145), uint8(145), uint8(159), uint8(159),
	uint8(118), uint8(11), uint8(11), uint8(11), uint8(0), uint8(0), uint8(21), uint8(153), uint8(21), uint8(0), uint8(21), uint8(21), uint8(160), uint8(160), uint8(161), uint8(161),
	uint8(155), uint8(11), uint8(11), uint8(0), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(17), uint8(17), uint8(17), uint8(17), uint8(17),
	uint8(8), uint8(8), uint8(8), uint8(8), uint8(8), uint8(8), uint8(3), uint8(3), uint8(16), uint8(20), uint8(5), uint8(16), uint8(16), uint8(20), uint8(5), uint8(16), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(3), uint8(3), uint8(3), uint8(162), uint8(163), uint8(17), uint8(17), uint8(17), uint8(17), uint8(17), uint8(2), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(16), uint8(20), uint8(3), uint8(3), uint8(3), uint8(3), uint8(12), uint8(12), uint8(3), uint8(3), uint8(3), uint8(7), uint8(5), uint8(6), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(7), uint8(3), uint8(12), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(2), uint8(17), uint8(17), uint8(17),
	uint8(17), uint8(17), uint8(0), uint8(17), uint8(17), uint8(17), uint8(17), uint8(17), uint8(17), uint8(17), uint8(17), uint8(17), uint8(17), uint8(18), uint8(92), uint8(0), uint8(0), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(7), uint8(7), uint8(7), uint8(5), uint8(6), uint8(92), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(7), uint8(7), uint8(7), uint8(5), uint8(6), uint8(0), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92),
	uint8(92), uint8(92), uint8(92), uint8(0), uint8(0), uint8(0), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4),
	uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(4), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(120), uint8(120), uint8(120), uint8(120), uint8(93), uint8(120), uint8(120), uint8(120), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(14), uint8(14), uint8(108), uint8(14), uint8(14), uint8(14), uint8(14), uint8(108), uint8(14), uint8(14), uint8(21), uint8(108), uint8(108), uint8(108),
	uint8(21), uint8(21), uint8(108), uint8(108), uint8(108), uint8(21), uint8(14), uint8(108), uint8(14), uint8(14), uint8(7), uint8(108), uint8(108), uint8(108), uint8(108),
	uint8(108), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(108), uint8(14), uint8(164), uint8(14), uint8(108), uint8(14), uint8(165), uint8(166), uint8(108),
	uint8(108), uint8(14), uint8(21), uint8(108), uint8(108), uint8(167), uint8(108), uint8(21), uint8(15), uint8(15), uint8(15), uint8(15), uint8(21), uint8(14), uint8(14), uint8(21),
	uint8(21), uint8(108), uint8(108), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(108), uint8(21), uint8(21), uint8(21), uint8(21), uint8(14), uint8(7), uint8(14), uint8(14), uint8(168),
	uint8(14), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(169), uint8(169), uint8(169), uint8(169), uint8(169), uint8(169), uint8(169), uint8(169), uint8(169), uint8(169), uint8(169), uint8(169), uint8(169), uint8(169),
	uint8(169), uint8(169), uint8(170), uint8(170), uint8(170), uint8(170), uint8(170), uint8(170), uint8(170), uint8(170), uint8(170), uint8(170), uint8(170), uint8(170),
	uint8(170), uint8(170), uint8(170), uint8(170), uint8(129), uint8(129), uint8(129), uint8(23), uint8(24), uint8(129), uint8(129), uint8(129), uint8(129), uint8(18),
	uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7), uint8(7), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(7), uint8(14), uint8(14), uint8(7), uint8(14), uint8(14), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7), uint8(7), uint8(14), uint8(14), uint8(7),
	uint8(14), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(5), uint8(6), uint8(5), uint8(6), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(5), uint8(6), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7),
	uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171),
	uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171),
	uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(171), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172),
	uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172), uint8(172),
	uint8(172), uint8(172), uint8(172), uint8(172), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6),
	uint8(5), uint8(6), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(5), uint8(6), uint8(7), uint8(7), uint8(7), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5),
	uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(5), uint8(6), uint8(5), uint8(6), uint8(7), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(5), uint8(6), uint8(7), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(14), uint8(14), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(7), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(0), uint8(0), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(0),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123),
	uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123),
	uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123),
	uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(123), uint8(124),
	uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124),
	uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124),
	uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(124),
	uint8(124), uint8(124), uint8(124), uint8(124), uint8(124), uint8(23), uint8(24), uint8(173), uint8(174), uint8(175), uint8(176), uint8(177), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(178), uint8(179), uint8(180), uint8(181), uint8(21), uint8(23), uint8(24), uint8(21), uint8(23), uint8(24), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(92), uint8(92), uint8(182), uint8(182), uint8(23), uint8(24), uint8(23), uint8(24), uint8(21), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(93), uint8(93), uint8(93), uint8(23), uint8(24), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(3), uint8(3), uint8(3), uint8(3), uint8(18),
	uint8(3), uint8(3), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183),
	uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183),
	uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(183), uint8(0), uint8(183), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(183), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(92), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(3), uint8(3), uint8(16), uint8(20), uint8(16), uint8(20), uint8(3), uint8(3), uint8(3), uint8(16), uint8(20), uint8(3), uint8(16), uint8(20),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(8), uint8(3), uint8(3), uint8(8), uint8(3), uint8(16), uint8(20), uint8(3), uint8(3), uint8(16), uint8(20), uint8(5),
	uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(92), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(3), uint8(8), uint8(8), uint8(3), uint8(3), uint8(3), uint8(3), uint8(8), uint8(3), uint8(5), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(14), uint8(14), uint8(3), uint8(3), uint8(3), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(8), uint8(0), uint8(0), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(0), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(2), uint8(3), uint8(3), uint8(3), uint8(14), uint8(92), uint8(15),
	uint8(129), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(14), uint8(14), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6),
	uint8(8), uint8(5), uint8(6), uint8(6), uint8(14), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(125), uint8(125), uint8(8), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(14), uint8(14), uint8(129), uint8(129), uint8(129), uint8(92),
	uint8(15), uint8(3), uint8(14), uint8(14), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(93), uint8(93), uint8(11), uint8(11), uint8(92), uint8(92),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(3), uint8(92), uint8(92), uint8(92), uint8(15), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(14), uint8(14), uint8(18), uint8(18), uint8(18), uint8(18), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(0), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(14), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(18), uint8(18), uint8(18),
	uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(92),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(92), uint8(3),
	uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(15), uint8(93), uint8(120), uint8(120), uint8(120), uint8(3), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(3), uint8(92), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(92),
	uint8(92), uint8(93), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129), uint8(129),
	uint8(129), uint8(129), uint8(129), uint8(93), uint8(93), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(11),
	uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11),
	uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(92), uint8(11), uint8(11), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(21), uint8(21), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(92), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(23), uint8(24), uint8(23), uint8(24), uint8(184), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(92), uint8(11), uint8(11), uint8(23), uint8(24), uint8(185), uint8(21), uint8(15), uint8(23), uint8(24), uint8(23), uint8(24), uint8(186), uint8(21), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23),
	uint8(24), uint8(187), uint8(188), uint8(189), uint8(190), uint8(187), uint8(21), uint8(191), uint8(192), uint8(193), uint8(194), uint8(23), uint8(24), uint8(23), uint8(24),
	uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(23), uint8(24), uint8(195), uint8(196), uint8(197), uint8(23),
	uint8(24), uint8(23), uint8(24), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(23), uint8(24), uint8(0), uint8(21), uint8(0), uint8(21), uint8(23), uint8(24), uint8(23), uint8(24), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(92), uint8(92), uint8(92), uint8(23), uint8(24), uint8(15), uint8(92), uint8(92), uint8(21), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93),
	uint8(15), uint8(15), uint8(15), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(125), uint8(125),
	uint8(93), uint8(93), uint8(125), uint8(14), uint8(14), uint8(14), uint8(14), uint8(93), uint8(0), uint8(0), uint8(0), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(18), uint8(14),
	uint8(14), uint8(4), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(3), uint8(3), uint8(3), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(125), uint8(125), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(125),
	uint8(125), uint8(125), uint8(125), uint8(125), uint8(125), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(3), uint8(3), uint8(9), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(3), uint8(3), uint8(3), uint8(15), uint8(3), uint8(15), uint8(15), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(125), uint8(125), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(3), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(125),
	uint8(125), uint8(93), uint8(93), uint8(93), uint8(93), uint8(125), uint8(125), uint8(93), uint8(93), uint8(125), uint8(125), uint8(125), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(0), uint8(92), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(92), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(125), uint8(125), uint8(93), uint8(93),
	uint8(125), uint8(125), uint8(93), uint8(93), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(93), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(125), uint8(0), uint8(0), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9),
	uint8(0), uint8(0), uint8(3), uint8(3), uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(92), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(14), uint8(14), uint8(14), uint8(15), uint8(125), uint8(93), uint8(125),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(93), uint8(15), uint8(93), uint8(93), uint8(93), uint8(15), uint8(15), uint8(93), uint8(93), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(93), uint8(93),
	uint8(15), uint8(93), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(92), uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(125), uint8(93), uint8(93), uint8(125), uint8(125), uint8(3), uint8(3), uint8(15), uint8(92), uint8(92), uint8(125), uint8(93), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(198), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(11), uint8(92), uint8(92), uint8(92), uint8(92), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21),
	uint8(21), uint8(21), uint8(21), uint8(92), uint8(11), uint8(11), uint8(0), uint8(0), uint8(0), uint8(0), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199),
	uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199),
	uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199),
	uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(199), uint8(15),
	uint8(15), uint8(15), uint8(125), uint8(125), uint8(93), uint8(125), uint8(125), uint8(93), uint8(125), uint8(125), uint8(3), uint8(125), uint8(93), uint8(0), uint8(0), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200),
	uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200), uint8(200),
	uint8(200), uint8(200), uint8(200), uint8(200), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201),
	uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201),
	uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(201), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(21), uint8(21), uint8(21), uint8(21), uint8(21), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(93), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(7), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(0), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15),
	uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11),
	uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(11), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(6), uint8(5), uint8(14),
	uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(14), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
	uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(4), uint8(14), uint8(14), uint8(14), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(3), uint8(3), uint8(5), uint8(6), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93),
	uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(93), uint8(3), uint8(8), uint8(8), uint8(12), uint8(12), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6),
	uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(3), uint8(3), uint8(5), uint8(6), uint8(3), uint8(3), uint8(3), uint8(3), uint8(12), uint8(12), uint8(12), uint8(3), uint8(3), uint8(3),
	uint8(0), uint8(3), uint8(3), uint8(3), uint8(3), uint8(8), uint8(5), uint8(6), uint8(5), uint8(6), uint8(5), uint8(6), uint8(3), uint8(3), uint8(3), uint8(7), uint8(8), uint8(7), uint8(7), uint8(7), uint8(0), uint8(3), uint8(4),
	uint8(3), uint8(3), uint8(0), uint8(0), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(17),
	uint8(0), uint8(3), uint8(3), uint8(3), uint8(4), uint8(3), uint8(3), uint8(3), uint8(5), uint8(6), uint8(3), uint8(7), uint8(3), uint8(8), uint8(3), uint8(3), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9), uint8(9),
	uint8(9), uint8(9), uint8(9), uint8(3), uint8(3), uint8(7), uint8(7), uint8(7), uint8(3), uint8(11), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13),
	uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13), uint8(13),
	uint8(5), uint8(7), uint8(6), uint8(7), uint8(5), uint8(6), uint8(3), uint8(5), uint8(6), uint8(3), uint8(3), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(92), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(92), uint8(92), uint8(0), uint8(0), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15),
	uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(15), uint8(15), uint8(15), uint8(0), uint8(0), uint8(0), uint8(4), uint8(4), uint8(7), uint8(11), uint8(14), uint8(4), uint8(4), uint8(0), uint8(14),
	uint8(7), uint8(7), uint8(7), uint8(7), uint8(14), uint8(14), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(17), uint8(17), uint8(17), uint8(14), uint8(14),
	uint8(0), uint8(0),
} /* tclUniData.c:569:28 */

// Each group represents a unique set of character attributes.  The attributes
// are encoded into a 32-bit value as follows:
//
// Bits 0-4	Character category: see the constants listed below.
//
// Bits 5-7	Case delta type: 000 = identity
//				 010 = add delta for lower
//				 011 = add delta for lower, add 1 for title
//				 100 = subtract delta for title/upper
//				 101 = sub delta for upper, sub 1 for title
//				 110 = sub delta for upper, add delta for lower
//				 111 = subtract delta for upper
//
// Bits 8-31	Case delta: delta for case conversions.  This should be the
//			    highest field so we can easily sign extend.

var groups = [208]int32{
	0, 15, 12, 25, 27, 21, 22, 26, 20, 9, 8257, 28, 19, 8322, 29,
	5, 23, 16, 11, -190078, 24, 2, -30846, 321, 386, -50879, 59522,
	-30911, 76930, -49790, 53825, 52801, 52545, 20289, 51777, 52033,
	53057, -24702, 54081, 53569, -41598, 54593, -33150, 54849, 55873,
	55617, 56129, -14206, 609, 451, 674, 20354, -24767, -14271, -33215,
	2763585, -41663, 2762817, -2768510, -49855, 17729, 18241, -2760318,
	-2759550, -2760062, 53890, 52866, 52610, 51842, 52098, -10833534,
	-10832510, 53122, -10823550, -10830718, 53634, 54146, -2750078,
	-10829950, -2751614, 54658, 54914, -2745982, 55938, -10830462,
	-10824062, 17794, 55682, 18306, 56194, -10818686, -10817918, 4,
	6, -21370, 29761, 9793, 9537, 16449, 16193, 9858, 9602, 8066,
	16514, 16258, 2113, 16002, 14722, 1, 12162, 13954, 2178, 22146,
	20610, -1662, 29826, -15295, 24706, -1727, 20545, 7, 3905, 3970,
	12353, 12418, 8, 1859649, -769822, 9949249, 10, 1601154, 1600898,
	1598594, 1598082, 1598338, 1596546, 1582466, -9027966, -769983,
	-9044862, -976254, -9058174, 15234, -1949375, -1918, -1983, -18814,
	-21886, -25470, -32638, -28542, -32126, -1981, -2174, -18879,
	-2237, 1844610, -21951, -25535, -28607, -32703, -32191, 13, 14,
	-1924287, -2145983, -2115007, 7233, 7298, 4170, 4234, 6749, 6813,
	-2750143, -976319, -2746047, 2763650, 2762882, -2759615, -2751679,
	-2760383, -2760127, -2768575, 1859714, -9044927, -10823615, -12158,
	-10830783, -10833599, -10832575, -10830015, -10817983, -10824127,
	-10818751, 237633, -12223, -10830527, -9058239, 237698, 9949314,
	18, 17, 10305, 10370, 10049, 10114, 8769, 8834,
} /* tclUniData.c:1647:18 */

// The following macros extract the fields of the character info.  The
// GetDelta() macro is complicated because we can't rely on the C compiler
// to do sign extension on right shifts.

// This macro extracts the information about a character from the
// Unicode character tables.

// The following macros are used for fast character category tests. The x_BITS
// values are shifted right by the category value to determine whether the
// given category is included in the set.

// Unicode characters less than this value are represented by themselves in
// UTF-8 strings.

// The following structures are used when mapping between Unicode (UCS-2) and
// UTF-8.

var totalBytes = [256]uint8{
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(2), uint8(1), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
} /* tclUtf.c:62:28 */

var complete = [256]uint8{
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
	// Tcl_UtfCharComplete() might point to 2nd byte of valid 4-byte sequence
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	// End of "continuation byte section"
	uint8(2), uint8(1), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	// Tcl_UtfToUniChar() accesses src[1] and src[2] to check whether
	// the UTF-8 sequence is valid, so we cannot use 1 here.
	uint8(3), uint8(3), uint8(3), uint8(3), uint8(3),
	uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
} /* tclUtf.c:79:28 */

//---------------------------------------------------------------------------
//
// UtfCount --
//
//	Find the number of bytes in the Utf character "ch".
//
// Results:
//	The return values is the number of bytes in the Utf character "ch".
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sUtfCount(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:126:1: */
	if uint32(ch-1) < uint32(UNICODE_SELF-1) {
		return 1
	}
	if ch <= 0x7FF {
		return 2
	}
	return 3
}

//---------------------------------------------------------------------------
//
// Invalid --
//
//	Given a pointer to a two-byte prefix of a well-formed UTF-8 byte
//	sequence (a lead byte followed by a trail byte) this routine
//	examines those two bytes to determine whether the sequence is
//	invalid in UTF-8.  This might be because it is an overlong
//	encoding, or because it encodes something out of the proper range.
//
//	Given a pointer to the bytes \xF8 or \xFC , this routine will
//	try to read beyond the end of the "bounds" table.  Callers must
//	prevent this.
//
//	Given a pointer to something else (an ASCII byte, a trail byte,
//	or another byte	that can never begin a valid byte sequence such
//	as \xF5) this routine returns false.  That makes the routine poorly
//	named, as it does not detect and report all invalid sequences.
//
//	Callers have to take care that this routine does something useful
//	for their needs.
//
// Results:
//	A boolean.
//---------------------------------------------------------------------------

var bounds = [28]uint8{
	uint8(0x80), uint8(0x80), // \xC0 accepts \x80 only
	uint8(0x80), uint8(0xBF), uint8(0x80), uint8(0xBF), uint8(0x80), uint8(0xBF), uint8(0x80), uint8(0xBF), uint8(0x80), uint8(0xBF), uint8(0x80), uint8(0xBF),
	uint8(0x80), uint8(0xBF), // (\xC4 - \xDC) -- all sequences valid
	uint8(0xA0), uint8(0xBF), // \xE0\x80 through \xE0\x9F are invalid prefixes
	uint8(0x80), uint8(0xBF), uint8(0x80), uint8(0xBF), uint8(0x80), uint8(0xBF), // (\xE4 - \xEC) -- all valid
	uint8(0xC0), uint8(0xBF), // Not used, but reject all again for safety.
	uint8(0xC0), uint8(0xBF), // Not used, but reject all again for safety.
} /* tclUtf.c:171:28 */

func sInvalid(tls *libc.TLS, src uintptr) int32 { /* tclUtf.c:187:1: */
	var byte uint8 = uint8(*(*int8)(unsafe.Pointer(src)))
	var index int32

	if int32(byte)&0xC3 == 0xC0 {
		// Only lead bytes 0xC0, 0xE0, 0xF0, 0xF4 need examination
		index = (int32(byte) - 0xC0) >> 1
		if int32(uint8(*(*int8)(unsafe.Pointer(src + 1)))) < int32(bounds[index]) || int32(uint8(*(*int8)(unsafe.Pointer(src + 1)))) > int32(bounds[index+1]) {
			// Out of bounds - report invalid.
			return 1
		}
	}
	return 0
}

//---------------------------------------------------------------------------
//
// Tcl_UniCharToUtf --
//
//	Store the given Tcl_UniChar as a sequence of UTF-8 bytes in the
//	provided buffer. Equivalent to Plan 9 runetochar().
//
// Results:
//	The return values is the number of bytes in the buffer that were
//	consumed.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UniCharToUtf(tls *libc.TLS, ch int32, buf uintptr) int32 { /* tclUtf.c:223:1: */
	if !(uint32(ch-1) < uint32(UNICODE_SELF-1)) {
		goto __1
	}
	*(*int8)(unsafe.Pointer(buf)) = int8(ch)
	return 1
__1:
	;
	if !(ch >= 0) {
		goto __2
	}
	if !(ch <= 0x7FF) {
		goto __3
	}
	*(*int8)(unsafe.Pointer(buf + 1)) = int8((ch | 0x80) & 0xBF)
	*(*int8)(unsafe.Pointer(buf)) = int8(ch>>6 | 0xC0)
	return 2
__3:
	;
	if !(ch <= 0xFFFF) {
		goto __4
	}
	goto three
__4:
	;

__2:
	;

	ch = 0xFFFD
three:
	*(*int8)(unsafe.Pointer(buf + 2)) = int8((ch | 0x80) & 0xBF)
	*(*int8)(unsafe.Pointer(buf + 1)) = int8((ch>>6 | 0x80) & 0xBF)
	*(*int8)(unsafe.Pointer(buf)) = int8(ch>>12 | 0xE0)
	return 3
}

//---------------------------------------------------------------------------
//
// Tcl_UniCharToUtfDString --
//
//	Convert the given Unicode string to UTF-8.
//
// Results:
//	The return value is a pointer to the UTF-8 representation of the
//	Unicode string. Storage for the return value is appended to the end of
//	dsPtr.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UniCharToUtfDString(tls *libc.TLS, uniStr uintptr, uniLength int32, dsPtr uintptr) uintptr { /* tclUtf.c:315:6: */
	var w uintptr
	var wEnd uintptr
	var p uintptr
	var string uintptr
	var oldLength int32

	// UTF-8 string length in bytes will be <= Unicode string length *
	// TCL_UTF_MAX.

	oldLength = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength
	XTcl_DStringSetLength(tls, dsPtr, oldLength+(uniLength+1)*TCL_UTF_MAX)
	string = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring + uintptr(oldLength)

	p = string
	wEnd = uniStr + uintptr(uniLength)*2
	for w = uniStr; w < wEnd; {
		p += uintptr(XTcl_UniCharToUtf(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(w))), p))
		w += 2
	}
	XTcl_DStringSetLength(tls, dsPtr, int32(int64(oldLength)+(int64(p)-int64(string))/1))

	return string
}

//---------------------------------------------------------------------------
//
// Tcl_UtfToUniChar --
//
//	Extract the Tcl_UniChar represented by the UTF-8 string. Bad UTF-8
//	sequences are converted to valid Tcl_UniChars and processing
//	continues. Equivalent to Plan 9 chartorune().
//
//	The caller must ensure that the source buffer is long enough that this
//	routine does not run off the end and dereference non-existent memory
//	looking for trail bytes. If the source buffer is known to be '\0'
//	terminated, this cannot happen. Otherwise, the caller should call
//	Tcl_UtfCharComplete() before calling this routine to ensure that
//	enough bytes remain in the string.
//
//	If TCL_UTF_MAX <= 4, special handling of Surrogate pairs is done:
//	For any UTF-8 string containing a character outside of the BMP, the
//	first call to this function will fill *chPtr with the high surrogate
//	and generate a return value of 1. Calling Tcl_UtfToUniChar again
//	will produce the low surrogate and a return value of 3. Because *chPtr
//	is used to remember whether the high surrogate is already produced, it
//	is recommended to initialize the variable it points to as 0 before
//	the first call to Tcl_UtfToUniChar is done.
//
// Results:
//	*chPtr is filled with the Tcl_UniChar, and the return value is the
//	number of bytes from the UTF-8 string that were consumed.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UtfToUniChar(tls *libc.TLS, src uintptr, chPtr uintptr) int32 { /* tclUtf.c:383:1: */
	var byte Tcl_UniChar

	// Unroll 1 to 3 (or 4) byte UTF-8 sequences.

	byte = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
	if int32(byte) < 0xC0 {
		// Handles properly formed UTF-8 characters between 0x01 and 0x7F.
		// Also treats \0 and naked trail bytes 0x80 to 0xBF as valid
		// characters representing themselves.

		// If *chPtr contains a high surrogate (produced by a previous
		// Tcl_UtfToUniChar() call) and the next 3 bytes are UTF-8 continuation
		// bytes, then we must produce a follow-up low surrogate. We only
		// do that if the high surrogate matches the bits we encounter.
		if int32(byte)&0xC0 == 0x80 &&
			int32(*(*int8)(unsafe.Pointer(src + 1)))&0xC0 == 0x80 && int32(*(*int8)(unsafe.Pointer(src + 2)))&0xC0 == 0x80 &&
			(int32(byte)-0x10)<<2&0xFC|0xD800 == int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr)))&0xFCFC &&
			int32(*(*int8)(unsafe.Pointer(src + 1)))&0xF0 == int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr)))<<4&0x30|0x80 {
			*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(int32(*(*int8)(unsafe.Pointer(src + 1)))&0x0F<<6 + int32(*(*int8)(unsafe.Pointer(src + 2)))&0x3F + 0xDC00)
			return 3
		}
		*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = byte
		return 1
	} else if int32(byte) < 0xE0 {
		if int32(*(*int8)(unsafe.Pointer(src + 1)))&0xC0 == 0x80 {
			// Two-byte-character lead-byte followed by a trail-byte.

			*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(int32(byte)&0x1F<<6 | int32(*(*int8)(unsafe.Pointer(src + 1)))&0x3F)
			if uint32(int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr)))-1) >= uint32(UNICODE_SELF-1) {
				return 2
			}
		}

		// A two-byte-character lead-byte not followed by trail-byte
		// represents itself.
	} else if int32(byte) < 0xF0 {
		if int32(*(*int8)(unsafe.Pointer(src + 1)))&0xC0 == 0x80 && int32(*(*int8)(unsafe.Pointer(src + 2)))&0xC0 == 0x80 {
			// Three-byte-character lead byte followed by two trail bytes.

			*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(int32(byte)&0x0F<<12 |
				int32(*(*int8)(unsafe.Pointer(src + 1)))&0x3F<<6 | int32(*(*int8)(unsafe.Pointer(src + 2)))&0x3F)
			if int32(*(*Tcl_UniChar)(unsafe.Pointer(chPtr))) > 0x7FF {
				return 3
			}
		}

		// A three-byte-character lead-byte not followed by two trail-bytes
		// represents itself.
	} else if int32(byte) < 0xF5 {
		if int32(*(*int8)(unsafe.Pointer(src + 1)))&0xC0 == 0x80 && int32(*(*int8)(unsafe.Pointer(src + 2)))&0xC0 == 0x80 {
			// Four-byte-character lead byte followed by at least two trail bytes.
			// We don't test the validity of 3th trail byte, see [ed29806ba]
			var high Tcl_UniChar = Tcl_UniChar(int32(byte)&0x07<<8 | int32(*(*int8)(unsafe.Pointer(src + 1)))&0x3F<<2 |
				int32(*(*int8)(unsafe.Pointer(src + 2)))&0x3F>>4 - 0x40)
			if int32(high) < 0x400 {
				// produce high surrogate, advance source pointer
				*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = Tcl_UniChar(0xD800 + int32(high))
				return 1
			}
			// out of range, < 0x10000 or > 0x10FFFF
		}

		// A four-byte-character lead-byte not followed by three trail-bytes
		// represents itself.
	}

	*(*Tcl_UniChar)(unsafe.Pointer(chPtr)) = byte
	return 1
}

//---------------------------------------------------------------------------
//
// Tcl_UtfToUniCharDString --
//
//	Convert the UTF-8 string to Unicode.
//
// Results:
//	The return value is a pointer to the Unicode representation of the
//	UTF-8 string. Storage for the return value is appended to the end of
//	dsPtr. The Unicode string is terminated with a Unicode NULL character.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UtfToUniCharDString(tls *libc.TLS, src uintptr, length int32, dsPtr uintptr) uintptr { /* tclUtf.c:506:13: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar(0)
	var w uintptr
	var wString uintptr
	var p uintptr
	var oldLength int32
	// Pointer to the end of string. Never read endPtr[0]
	var endPtr uintptr = src + uintptr(length)
	// Pointer to last byte where optimization still can be used
	var optPtr uintptr = endPtr - uintptr(TCL_UTF_MAX)

	if length < 0 {
		length = int32(libc.Xstrlen(tls, src))
	}

	// Unicode string length in Tcl_UniChars will be <= UTF-8 string length in
	// bytes.

	oldLength = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength

	XTcl_DStringSetLength(tls, dsPtr,
		int32(uint64(oldLength)+uint64(length+1)*uint64(unsafe.Sizeof(Tcl_UniChar(0)))))
	wString = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring + uintptr(oldLength)

	w = wString
	p = src
	endPtr = src + uintptr(length)
	optPtr = endPtr - uintptr(func() int32 {
		if TCL_UTF_MAX > 3 {
			return 4
		}
		return 3
	}())
	for p <= optPtr {
		p += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(p)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(p))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, p, bp))
		}()
		*(*Tcl_UniChar)(unsafe.Pointer(libc.PostIncUintptr(&w, 2))) = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
	}
	for p < endPtr {
		if XTcl_UtfCharComplete(tls, p, int32((int64(endPtr)-int64(p))/1)) != 0 {
			p += func() uintptr {
				if int32(uint8(*(*int8)(unsafe.Pointer(p)))) < 0x80 {
					return uintptr(func() int32 {
						*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(p))))
						return 1
					}())
				}
				return uintptr(XTcl_UtfToUniChar(tls, p, bp))
			}()
			*(*Tcl_UniChar)(unsafe.Pointer(libc.PostIncUintptr(&w, 2))) = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
		} else {
			*(*Tcl_UniChar)(unsafe.Pointer(libc.PostIncUintptr(&w, 2))) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))))
		}
	}
	*(*Tcl_UniChar)(unsafe.Pointer(w)) = Tcl_UniChar(0)
	XTcl_DStringSetLength(tls, dsPtr,
		int32(int64(oldLength)+(int64(w)-int64(wString))/1))

	return wString
}

//---------------------------------------------------------------------------
//
// Tcl_UtfCharComplete --
//
//	Determine if the UTF-8 string of the given length is long enough to be
//	decoded by Tcl_UtfToUniChar(). This does not ensure that the UTF-8
//	string is properly formed. Equivalent to Plan 9 fullrune().
//
// Results:
//	The return value is 0 if the string is not long enough, non-zero
//	otherwise.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UtfCharComplete(tls *libc.TLS, src uintptr, length int32) int32 { /* tclUtf.c:581:1: */
	return libc.Bool32(length >= int32(complete[uint8(*(*int8)(unsafe.Pointer(src)))]))
}

//---------------------------------------------------------------------------
//
// Tcl_NumUtfChars --
//
//	Returns the number of characters (not bytes) in the UTF-8 string, not
//	including the terminating NULL byte. This is equivalent to Plan 9
//	utflen() and utfnlen().
//
// Results:
//	As above.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_NumUtfChars(tls *libc.TLS, src uintptr, length int32) int32 { /* tclUtf.c:608:1: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar(0)
	var i int32 = 0

	if length < 0 {
		// string is NUL-terminated, so TclUtfToUniChar calls are safe.
		for int32(*(*int8)(unsafe.Pointer(src))) != 0 && i < 0x7fffffff {
			src += func() uintptr {
				if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
					return uintptr(func() int32 {
						*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
						return 1
					}())
				}
				return uintptr(XTcl_UtfToUniChar(tls, src, bp))
			}()
			i++
		}
	} else {
		// Will return value between 0 and length. No overflow checks.

		// Pointer to the end of string. Never read endPtr[0]
		var endPtr uintptr = src + uintptr(length)
		// Pointer to last byte where optimization still can be used
		var optPtr uintptr = endPtr - uintptr(func() int32 {
			if TCL_UTF_MAX > 3 {
				return 4
			}
			return 3
		}())

		// Optimize away the call in this loop. Justified because...
		// when (src <= optPtr), (endPtr - src) >= (endPtr - optPtr)
		// By initialization above (endPtr - optPtr) = TCL_UTF_MAX
		// So (endPtr - src) >= TCL_UTF_MAX, and passing that to
		// Tcl_UtfCharComplete we know will cause return of 1.
		for src <= optPtr {
			src += func() uintptr {
				if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
					return uintptr(func() int32 {
						*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
						return 1
					}())
				}
				return uintptr(XTcl_UtfToUniChar(tls, src, bp))
			}()
			i++
		}
		// Loop over the remaining string where call must happen
		for src < endPtr {
			if XTcl_UtfCharComplete(tls, src, int32((int64(endPtr)-int64(src))/1)) != 0 {
				src += func() uintptr {
					if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
						return uintptr(func() int32 {
							*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
							return 1
						}())
					}
					return uintptr(XTcl_UtfToUniChar(tls, src, bp))
				}()
			} else {
				// src points to incomplete UTF-8 sequence
				// Treat first byte as character and count it
				src++
			}
			i++
		}
	}
	return i
}

//---------------------------------------------------------------------------
//
// Tcl_UtfFindFirst --
//
//	Returns a pointer to the first occurrence of the given Unicode character
//	in the NULL-terminated UTF-8 string. The NULL terminator is considered
//	part of the UTF-8 string. Equivalent to Plan 9 utfrune().
//
// Results:
//	As above. If the Unicode character does not exist in the given string,
//	the return value is NULL.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UtfFindFirst(tls *libc.TLS, src uintptr, ch int32) uintptr { /* tclUtf.c:678:12: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	for 1 != 0 {
		// var find int32 at bp, 4

		var len int32 = XTclUtfToUCS4(tls, src, bp)

		if *(*int32)(unsafe.Pointer(bp)) == ch {
			return src
		}
		if int32(*(*int8)(unsafe.Pointer(src))) == 0 {
			return uintptr(0)
		}
		src += uintptr(len)
	}
	return uintptr(0)
}

//---------------------------------------------------------------------------
//
// Tcl_UtfFindLast --
//
//	Returns a pointer to the last occurrence of the given Unicode character
//	in the NULL-terminated UTF-8 string. The NULL terminator is considered
//	part of the UTF-8 string. Equivalent to Plan 9 utfrrune().
//
// Results:
//	As above. If the Unicode character does not exist in the given string, the
//	return value is NULL.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UtfFindLast(tls *libc.TLS, src uintptr, ch int32) uintptr { /* tclUtf.c:715:12: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var last uintptr = uintptr(0)

	for 1 != 0 {
		// var find int32 at bp, 4

		var len int32 = XTclUtfToUCS4(tls, src, bp)

		if *(*int32)(unsafe.Pointer(bp)) == ch {
			last = src
		}
		if int32(*(*int8)(unsafe.Pointer(src))) == 0 {
			break
		}
		src += uintptr(len)
	}
	return last
}

//---------------------------------------------------------------------------
//
// Tcl_UtfNext --
//
//	Given a pointer to some location in a UTF-8 string, Tcl_UtfNext
//	returns a pointer to the next UTF-8 character in the string.
//	The caller must not ask for the next character after the last
//	character in the string if the string is not terminated by a null
//	character.
//
// Results:
//	The return value is the pointer to the next character in the UTF-8
//	string.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UtfNext(tls *libc.TLS, src uintptr) uintptr { /* tclUtf.c:757:12: */
	var left int32
	var next uintptr

	left = int32(totalBytes[uint8(*(*int8)(unsafe.Pointer(src)))])
	next = src + uintptr(1)
	for libc.PreDecInt32(&left, 1) != 0 {
		if int32(*(*int8)(unsafe.Pointer(next)))&0xC0 != 0x80 {
			// src points to non-trail byte; We ran out of trail bytes
			// before the needs of the lead byte were satisfied.
			// Let the (malformed) lead byte alone be a character
			return src + uintptr(1)
		}
		next++
	}
	// Call Invalid() here only if required conditions are met:
	//    src[0] is known a lead byte.
	//    src[1] is known a trail byte.
	// Especially important to prevent calls when src[0] == '\xF8' or '\xFC'
	// See tests utf-6.37 through utf-6.43 through valgrind or similar tool.
	if next == src+uintptr(1) || sInvalid(tls, src) != 0 {
		return src + uintptr(1)
	}
	return next
}

//---------------------------------------------------------------------------
//
// Tcl_UtfPrev --
//
//	Given a pointer to some current location in a UTF-8 string, move
//	backwards one character. This works correctly when the pointer is in
//	the middle of a UTF-8 character.
//
// Results:
//	The return value is a pointer to the previous character in the UTF-8
//	string. If the current location was already at the beginning of the
//	string, the return value will also be a pointer to the beginning of
//	the string.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UtfPrev(tls *libc.TLS, src uintptr, start uintptr) uintptr { /* tclUtf.c:824:12: */
	var trailBytesSeen int32 = 0 // How many trail bytes have been verified?
	var fallback uintptr = src - uintptr(1)
	// If we cannot find a lead byte that might
	// start a prefix of a valid UTF byte sequence,
	// we will fallback to a one-byte back step
	var look uintptr = fallback
	// Start search at the fallback position

	// Quick boundary case exit.
	if fallback <= start {
		return start
	}

	for ok := true; ok; ok = trailBytesSeen < func() int32 {
		if TCL_UTF_MAX < 4 {
			return 3
		}
		return 4
	}() {
		var byte uint8 = uint8(*(*int8)(unsafe.Pointer(look)))

		if int32(byte) < 0x80 {
			// Single byte character. Either this is a correct previous
			// character, or it is followed by at least one trail byte
			// which indicates a malformed sequence. In either case the
			// correct result is to return the fallback.
			return fallback
		}
		if int32(byte) >= 0xC0 {
			// Non-trail byte; May be multibyte lead.

			if trailBytesSeen == 0 ||

				trailBytesSeen >= int32(totalBytes[byte]) {
				// That is, (1 + trailBytesSeen > needed).
				// We've examined more bytes than needed to complete
				// this lead byte. No matter about well-formedness or
				// validity, the sequence starting with this lead byte
				// will never include the fallback location, so we must
				// return the fallback location. See test utf-7.17
				return fallback
			}

			// trailBytesSeen > 0, so we can examine look[1] safely.
			// Use that capability to screen out invalid sequences.

			if sInvalid(tls, look) != 0 {
				// Reject
				return fallback
			}
			return look
		}

		// We saw a trail byte.
		trailBytesSeen++

		if look == start {
			// Do not read before the start of the string
			//
			// If we get here, we've examined bytes at every location
			// >= start and < src and all of them are trail bytes,
			// including (*start).  We need to return our fallback
			// and exit this loop before we run past the start of the string.
			return fallback
		}

		// Continue the search backwards...
		look--
	}

	// We've seen 3 trail bytes, so we know there will not be a
	// properly formed byte sequence to find, and we can stop looking,
	// accepting the fallback.
	return fallback
}

//---------------------------------------------------------------------------
//
// Tcl_UniCharAtIndex --
//
//	Returns the Tcl_UniChar represented at the specified character
//	(not byte) position in the UTF-8 string.
//
// Results:
//	As above.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UniCharAtIndex(tls *libc.TLS, src uintptr, index int32) Tcl_UniChar { /* tclUtf.c:934:1: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar(0)

	for libc.PostDecInt32(&index, 1) >= 0 {
		src += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, src, bp))
		}()
	}
	return *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
}

//---------------------------------------------------------------------------
//
// Tcl_UtfAtIndex --
//
//	Returns a pointer to the specified character (not byte) position in
//	the UTF-8 string.
//
// Results:
//	As above.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_UtfAtIndex(tls *libc.TLS, src uintptr, index int32) uintptr { /* tclUtf.c:963:12: */
	bp := tls.Alloc(2)
	defer tls.Free(2)

	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar(0)
	var len int32 = 0

	for libc.PostDecInt32(&index, 1) > 0 {
		len = func() int32 {
			if int32(uint8(*(*int8)(unsafe.Pointer(src)))) < 0x80 {
				return func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(src))))
					return 1
				}()
			}
			return XTcl_UtfToUniChar(tls, src, bp)
		}()
		src += uintptr(len)
	}
	return src
}

//---------------------------------------------------------------------------
//
// Tcl_UtfBackslash --
//
//	Figure out how to handle a backslash sequence.
//
// Results:
//	Stores the bytes represented by the backslash sequence in dst and
//	returns the number of bytes written to dst. At most TCL_UTF_MAX bytes
//	are written to dst; dst must have been large enough to accept those
//	bytes. If readPtr isn't NULL then it is filled in with a count of the
//	number of bytes in the backslash sequence.
//
// Side effects:
//	The maximum number of bytes it takes to represent a Unicode character
//	in UTF-8 is guaranteed to be less than the number of bytes used to
//	express the backslash sequence that represents that Unicode character.
//	If the target buffer into which the caller is going to store the bytes
//	that represent the Unicode character is at least as large as the
//	source buffer from which the backslashed sequence was extracted, no
//	buffer overruns should occur.
//
//---------------------------------------------------------------------------

func XTcl_UtfBackslash(tls *libc.TLS, src uintptr, readPtr uintptr, dst uintptr) int32 { /* tclUtf.c:1011:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var numRead int32 at bp, 4

	var result int32

	result = XTclParseBackslash(tls, src, LINE_LENGTH, bp, dst)
	if *(*int32)(unsafe.Pointer(bp)) == LINE_LENGTH {
		// We ate a whole line. Pay the price of a strlen()

		result = XTclParseBackslash(tls, src, int32(libc.Xstrlen(tls, src)), bp, dst)
	}
	if readPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(readPtr)) = *(*int32)(unsafe.Pointer(bp /* numRead */))
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_UtfToUpper --
//
//	Convert lowercase characters to uppercase characters in a UTF string
//	in place. The conversion may shrink the UTF string.
//
// Results:
//	Returns the number of bytes in the resulting string excluding the
//	trailing null.
//
// Side effects:
//	Writes a terminating null after the last converted character.
//
//----------------------------------------------------------------------

func XTcl_UtfToUpper(tls *libc.TLS, str uintptr) int32 { /* tclUtf.c:1056:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var ch int32 at bp, 4

	var upChar int32
	var src uintptr
	var dst uintptr
	var len int32

	// Iterate over the string until we hit the terminating null.

	src = libc.AssignUintptr(&dst, str)
	for *(*int8)(unsafe.Pointer(src)) != 0 {
		len = XTclUtfToUCS4(tls, src, bp)
		upChar = sUCS4ToUpper(tls, *(*int32)(unsafe.Pointer(bp /* ch */)))

		// To keep badly formed Utf strings from getting inflated by the
		// conversion (thereby causing a segfault), only copy the upper case
		// char to dst if its size is <= the original char.

		if len < sUtfCount(tls, upChar) {
			libc.Xmemmove(tls, dst, src, uint64(len))
			dst += uintptr(len)
		} else {
			dst += uintptr(XTclUCS4ToUtf(tls, upChar, dst))
		}
		src += uintptr(len)
	}
	*(*int8)(unsafe.Pointer(dst)) = int8(0)
	return int32((int64(dst) - int64(str)) / 1)
}

//----------------------------------------------------------------------
//
// Tcl_UtfToLower --
//
//	Convert uppercase characters to lowercase characters in a UTF string
//	in place. The conversion may shrink the UTF string.
//
// Results:
//	Returns the number of bytes in the resulting string excluding the
//	trailing null.
//
// Side effects:
//	Writes a terminating null after the last converted character.
//
//----------------------------------------------------------------------

func XTcl_UtfToLower(tls *libc.TLS, str uintptr) int32 { /* tclUtf.c:1109:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var ch int32 at bp, 4

	var lowChar int32
	var src uintptr
	var dst uintptr
	var len int32

	// Iterate over the string until we hit the terminating null.

	src = libc.AssignUintptr(&dst, str)
	for *(*int8)(unsafe.Pointer(src)) != 0 {
		len = XTclUtfToUCS4(tls, src, bp)
		lowChar = XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp /* ch */)))

		// To keep badly formed Utf strings from getting inflated by the
		// conversion (thereby causing a segfault), only copy the lower case
		// char to dst if its size is <= the original char.

		if len < sUtfCount(tls, lowChar) {
			libc.Xmemmove(tls, dst, src, uint64(len))
			dst += uintptr(len)
		} else {
			dst += uintptr(XTclUCS4ToUtf(tls, lowChar, dst))
		}
		src += uintptr(len)
	}
	*(*int8)(unsafe.Pointer(dst)) = int8(0)
	return int32((int64(dst) - int64(str)) / 1)
}

//----------------------------------------------------------------------
//
// Tcl_UtfToTitle --
//
//	Changes the first character of a UTF string to title case or uppercase
//	and the rest of the string to lowercase. The conversion happens in
//	place and may shrink the UTF string.
//
// Results:
//	Returns the number of bytes in the resulting string excluding the
//	trailing null.
//
// Side effects:
//	Writes a terminating null after the last converted character.
//
//----------------------------------------------------------------------

func XTcl_UtfToTitle(tls *libc.TLS, str uintptr) int32 { /* tclUtf.c:1163:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var ch int32 at bp, 4

	var titleChar int32
	var lowChar int32
	var src uintptr
	var dst uintptr
	var len int32

	// Capitalize the first character and then lowercase the rest of the
	// characters until we get to a null.

	src = libc.AssignUintptr(&dst, str)

	if *(*int8)(unsafe.Pointer(src)) != 0 {
		len = XTclUtfToUCS4(tls, src, bp)
		titleChar = sUCS4ToTitle(tls, *(*int32)(unsafe.Pointer(bp /* ch */)))

		if len < sUtfCount(tls, titleChar) {
			libc.Xmemmove(tls, dst, src, uint64(len))
			dst += uintptr(len)
		} else {
			dst += uintptr(XTclUCS4ToUtf(tls, titleChar, dst))
		}
		src += uintptr(len)
	}
	for *(*int8)(unsafe.Pointer(src)) != 0 {
		len = XTclUtfToUCS4(tls, src, bp)
		lowChar = *(*int32)(unsafe.Pointer(bp /* ch */))
		// Special exception for Georgian Asomtavruli chars, no titlecase.
		if uint32(lowChar-0x1C90) >= uint32(0x30) {
			lowChar = XTclUCS4ToLower(tls, lowChar)
		}

		if len < sUtfCount(tls, lowChar) {
			libc.Xmemmove(tls, dst, src, uint64(len))
			dst += uintptr(len)
		} else {
			dst += uintptr(XTclUCS4ToUtf(tls, lowChar, dst))
		}
		src += uintptr(len)
	}
	*(*int8)(unsafe.Pointer(dst)) = int8(0)
	return int32((int64(dst) - int64(str)) / 1)
}

//----------------------------------------------------------------------
//
// TclpUtfNcmp2 --
//
//	Compare at most numBytes bytes of utf-8 strings cs and ct. Both cs and
//	ct are assumed to be at least numBytes bytes long.
//
// Results:
//	Return <0 if cs < ct, 0 if cs == ct, or >0 if cs > ct.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpUtfNcmp2(tls *libc.TLS, cs uintptr, ct uintptr, numBytes uint32) int32 { /* tclUtf.c:1227:1: */
	// We can't simply call 'memcmp(cs, ct, numBytes);' because we need to
	// check for Tcl's \xC0\x80 non-utf-8 null encoding. Otherwise utf-8 lexes
	// fine in the strcmp manner.

	var result int32 = 0

__1:
	if !(numBytes != uint32(0)) {
		goto __3
	}
	{
		if int32(*(*int8)(unsafe.Pointer(cs))) != int32(*(*int8)(unsafe.Pointer(ct))) {
			result = int32(uint8(*(*int8)(unsafe.Pointer(cs)))) - int32(uint8(*(*int8)(unsafe.Pointer(ct))))
			goto __3
		}

	}
	goto __2
__2:
	numBytes--
	cs++
	ct++
	goto __1
	goto __3
__3:
	;
	if numBytes != 0 && (int32(uint8(*(*int8)(unsafe.Pointer(cs)))) == 0xC0 || int32(uint8(*(*int8)(unsafe.Pointer(ct)))) == 0xC0) {
		var c1 uint8
		var c2 uint8

		if int32(uint8(*(*int8)(unsafe.Pointer(cs)))) == 0xC0 && int32(uint8(*(*int8)(unsafe.Pointer(cs + 1)))) == 0x80 {
			c1 = uint8(0)
		} else {
			c1 = uint8(*(*int8)(unsafe.Pointer(cs)))
		}
		if int32(uint8(*(*int8)(unsafe.Pointer(ct)))) == 0xC0 && int32(uint8(*(*int8)(unsafe.Pointer(ct + 1)))) == 0x80 {
			c2 = uint8(0)
		} else {
			c2 = uint8(*(*int8)(unsafe.Pointer(ct)))
		}
		result = int32(c1) - int32(c2)
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_UtfNcmp --
//
//	Compare at most numChars UTF chars of string cs to string ct. Both cs
//	and ct are assumed to be at least numChars UTF chars long.
//
// Results:
//	Return <0 if cs < ct, 0 if cs == ct, or >0 if cs > ct.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UtfNcmp(tls *libc.TLS, cs uintptr, ct uintptr, numChars uint32) int32 { /* tclUtf.c:1274:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch1 */)) = Tcl_UniChar(0)
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 2 /* ch2 */)) = Tcl_UniChar(0)

	// Cannot use 'memcmp(cs, ct, n);' as byte representation of \u0000 (the
	// pair of bytes 0xC0,0x80) is larger than byte representation of \u0001
	// (the byte 0x01.)

	for libc.PostDecUint32(&numChars, 1) > uint32(0) {
		// n must be interpreted as chars, not bytes. This should be called
		// only when both strings are of at least n chars long (no need for \0
		// check)

		cs += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(cs)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(cs))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, cs, bp))
		}()
		ct += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(ct)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp + 2)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(ct))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, ct, bp+2))
		}()
		if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2))) {
			return int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) - int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2)))
		}
	}
	return 0
}

//----------------------------------------------------------------------
//
// Tcl_UtfNcasecmp --
//
//	Compare at most numChars UTF chars of string cs to string ct case
//	insensitive. Both cs and ct are assumed to be at least numChars UTF
//	chars long.
//
// Results:
//	Return <0 if cs < ct, 0 if cs == ct, or >0 if cs > ct.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UtfNcasecmp(tls *libc.TLS, cs uintptr, ct uintptr, numChars uint32) int32 { /* tclUtf.c:1332:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch1 */)) = Tcl_UniChar(0)
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 2 /* ch2 */)) = Tcl_UniChar(0)

	for libc.PostDecUint32(&numChars, 1) > uint32(0) {
		// n must be interpreted as chars, not bytes.
		// This should be called only when both strings are of
		// at least n chars long (no need for \0 check)
		cs += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(cs)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(cs))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, cs, bp))
		}()
		ct += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(ct)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp + 2)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(ct))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, ct, bp+2))
		}()
		if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2))) {
			*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch1 */)) = XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch1 */))))
			*(*Tcl_UniChar)(unsafe.Pointer(bp + 2 /* ch2 */)) = XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2 /* ch2 */))))
			if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2))) {
				return int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) - int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2)))
			}
		}
	}
	return 0
}

//----------------------------------------------------------------------
//
// TclUtfCasecmp --
//
//	Compare UTF chars of string cs to string ct case insensitively.
//	Replacement for strcasecmp in Tcl core, in places where UTF-8 should
//	be handled.
//
// Results:
//	Return <0 if cs < ct, 0 if cs == ct, or >0 if cs > ct.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclUtfCasecmp(tls *libc.TLS, cs uintptr, ct uintptr) int32 { /* tclUtf.c:1387:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch1 */)) = Tcl_UniChar(0)
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 2 /* ch2 */)) = Tcl_UniChar(0)

	for *(*int8)(unsafe.Pointer(cs)) != 0 && *(*int8)(unsafe.Pointer(ct)) != 0 {
		cs += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(cs)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(cs))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, cs, bp))
		}()
		ct += func() uintptr {
			if int32(uint8(*(*int8)(unsafe.Pointer(ct)))) < 0x80 {
				return uintptr(func() int32 {
					*(*Tcl_UniChar)(unsafe.Pointer(bp + 2)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(ct))))
					return 1
				}())
			}
			return uintptr(XTcl_UtfToUniChar(tls, ct, bp+2))
		}()
		if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2))) {
			*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch1 */)) = XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch1 */))))
			*(*Tcl_UniChar)(unsafe.Pointer(bp + 2 /* ch2 */)) = XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2 /* ch2 */))))
			if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2))) {
				return int32(*(*Tcl_UniChar)(unsafe.Pointer(bp))) - int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2)))
			}
		}
	}
	return int32(uint8(*(*int8)(unsafe.Pointer(cs)))) - int32(uint8(*(*int8)(unsafe.Pointer(ct))))
}

//----------------------------------------------------------------------
//
// Tcl_UniCharToUpper --
//
//	Compute the uppercase equivalent of the given Unicode character.
//
// Results:
//	Returns the uppercase Unicode character.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sUCS4ToUpper(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1435:1: */
	if !(ch&0x1F0000 != 0) {
		var info int32 = groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]]

		if info&0xE0>>5&0x04 != 0 {
			ch = ch - info>>8
		}
	}
	// Clear away extension bits, if any
	return ch & 0x1FFFFF
}

func XTcl_UniCharToUpper(tls *libc.TLS, ch int32) Tcl_UniChar { /* tclUtf.c:1450:1: */
	return Tcl_UniChar(sUCS4ToUpper(tls, ch))
}

//----------------------------------------------------------------------
//
// Tcl_UniCharToLower --
//
//	Compute the lowercase equivalent of the given Unicode character.
//
// Results:
//	Returns the lowercase Unicode character.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclUCS4ToLower(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1473:1: */
	if !(ch&0x1F0000 != 0) {
		var info int32 = groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]]
		var mode int32 = info & 0xE0 >> 5

		if mode&0x02 != 0 && mode != 0x7 {
			ch = ch + info>>8
		}
	}
	// Clear away extension bits, if any
	return ch & 0x1FFFFF
}

func XTcl_UniCharToLower(tls *libc.TLS, ch int32) Tcl_UniChar { /* tclUtf.c:1489:1: */
	return Tcl_UniChar(XTclUCS4ToLower(tls, ch))
}

//----------------------------------------------------------------------
//
// Tcl_UniCharToTitle --
//
//	Compute the titlecase equivalent of the given Unicode character.
//
// Results:
//	Returns the titlecase Unicode character.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sUCS4ToTitle(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1512:1: */
	if !(ch&0x1F0000 != 0) {
		var info int32 = groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]]
		var mode int32 = info & 0xE0 >> 5

		if mode&0x1 != 0 {
			// Subtract or add one depending on the original case.

			if mode != 0x7 {
				ch = ch + func() int32 {
					if mode&0x4 != 0 {
						return -1
					}
					return 1
				}()
			}
		} else if mode == 0x4 {
			ch = ch - info>>8
		}
	}
	// Clear away extension bits, if any
	return ch & 0x1FFFFF
}

func XTcl_UniCharToTitle(tls *libc.TLS, ch int32) Tcl_UniChar { /* tclUtf.c:1536:1: */
	return Tcl_UniChar(sUCS4ToTitle(tls, ch))
}

//----------------------------------------------------------------------
//
// Tcl_UniCharLen --
//
//	Find the length of a UniChar string. The str input must be null
//	terminated.
//
// Results:
//	Returns the length of str in UniChars (not bytes).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharLen(tls *libc.TLS, uniStr uintptr) int32 { /* tclUtf.c:1560:1: */
	var len int32 = 0

	for int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))) != 0 {
		len++
		uniStr += 2
	}
	return len
}

//----------------------------------------------------------------------
//
// Tcl_UniCharNcmp --
//
//	Compare at most numChars unichars of string ucs to string uct.
//	Both ucs and uct are assumed to be at least numChars unichars long.
//
// Results:
//	Return <0 if ucs < uct, 0 if ucs == uct, or >0 if ucs > uct.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharNcmp(tls *libc.TLS, ucs uintptr, uct uintptr, numChars uint32) int32 { /* tclUtf.c:1590:1: */
	// We can't simply call memcmp() because that is not lexically correct.

__1:
	if !(numChars != uint32(0)) {
		goto __3
	}
	{
		if int32(*(*Tcl_UniChar)(unsafe.Pointer(ucs))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(uct))) {
			return int32(*(*Tcl_UniChar)(unsafe.Pointer(ucs))) - int32(*(*Tcl_UniChar)(unsafe.Pointer(uct)))
		}

	}
	goto __2
__2:
	ucs += 2
	uct += 2
	numChars--
	goto __1
	goto __3
__3:
	;
	return 0
}

//----------------------------------------------------------------------
//
// Tcl_UniCharNcasecmp --
//
//	Compare at most numChars unichars of string ucs to string uct case
//	insensitive. Both ucs and uct are assumed to be at least numChars
//	unichars long.
//
// Results:
//	Return <0 if ucs < uct, 0 if ucs == uct, or >0 if ucs > uct.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharNcasecmp(tls *libc.TLS, ucs uintptr, uct uintptr, numChars uint32) int32 { /* tclUtf.c:1643:1: */
__1:
	if !(numChars != uint32(0)) {
		goto __3
	}
	{
		if int32(*(*Tcl_UniChar)(unsafe.Pointer(ucs))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(uct))) {
			var lcs Tcl_UniChar = XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(ucs))))
			var lct Tcl_UniChar = XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(uct))))

			if int32(lcs) != int32(lct) {
				return int32(lcs) - int32(lct)
			}
		}

	}
	goto __2
__2:
	numChars--
	ucs += 2
	uct += 2
	goto __1
	goto __3
__3:
	;
	return 0
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsAlnum --
//
//	Test if a character is an alphanumeric Unicode character.
//
// Results:
//	Returns 1 if character is alphanumeric.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsAlnum(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1686:1: */
	return int32(int32(1)<<UPPERCASE_LETTER|int32(1)<<LOWERCASE_LETTER|int32(1)<<TITLECASE_LETTER|int32(1)<<MODIFIER_LETTER|int32(1)<<OTHER_LETTER|int32(1)<<DECIMAL_DIGIT_NUMBER) >> (groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]] & 0x1F) & 1
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsAlpha --
//
//	Test if a character is an alphabetic Unicode character.
//
// Results:
//	Returns 1 if character is alphabetic.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsAlpha(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1714:1: */
	return int32(int32(1)<<UPPERCASE_LETTER|int32(1)<<LOWERCASE_LETTER|int32(1)<<TITLECASE_LETTER|int32(1)<<MODIFIER_LETTER|int32(1)<<OTHER_LETTER) >> (groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]] & 0x1F) & 1
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsControl --
//
//	Test if a character is a Unicode control character.
//
// Results:
//	Returns non-zero if character is a control.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsControl(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1742:1: */
	return int32(int32(1)<<CONTROL|int32(1)<<FORMAT|int32(1)<<PRIVATE_USE) >> (groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]] & 0x1F) & 1
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsDigit --
//
//	Test if a character is a numeric Unicode character.
//
// Results:
//	Returns non-zero if character is a digit.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsDigit(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1778:1: */
	return libc.Bool32(groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]]&0x1F == DECIMAL_DIGIT_NUMBER)
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsGraph --
//
//	Test if a character is any Unicode print character except space.
//
// Results:
//	Returns non-zero if character is printable, but not space.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsGraph(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1806:1: */
	return int32(int32(1)<<UPPERCASE_LETTER|int32(1)<<LOWERCASE_LETTER|int32(1)<<TITLECASE_LETTER|int32(1)<<MODIFIER_LETTER|int32(1)<<OTHER_LETTER|int32(1)<<DECIMAL_DIGIT_NUMBER|int32(1)<<CONNECTOR_PUNCTUATION|(int32(1)<<CONNECTOR_PUNCTUATION|int32(1)<<DASH_PUNCTUATION|int32(1)<<OPEN_PUNCTUATION|int32(1)<<CLOSE_PUNCTUATION|int32(1)<<INITIAL_QUOTE_PUNCTUATION|int32(1)<<FINAL_QUOTE_PUNCTUATION|int32(1)<<OTHER_PUNCTUATION)|int32(1)<<NON_SPACING_MARK|int32(1)<<ENCLOSING_MARK|int32(1)<<COMBINING_SPACING_MARK|int32(1)<<LETTER_NUMBER|int32(1)<<OTHER_NUMBER|int32(1)<<MATH_SYMBOL|int32(1)<<CURRENCY_SYMBOL|int32(1)<<MODIFIER_SYMBOL|int32(1)<<OTHER_SYMBOL) >> (groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]] & 0x1F) & 1
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsLower --
//
//	Test if a character is a lowercase Unicode character.
//
// Results:
//	Returns non-zero if character is lowercase.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsLower(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1834:1: */
	return libc.Bool32(groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]]&0x1F == LOWERCASE_LETTER)
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsPrint --
//
//	Test if a character is a Unicode print character.
//
// Results:
//	Returns non-zero if character is printable.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsPrint(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1862:1: */
	return int32(int32(1)<<UPPERCASE_LETTER|int32(1)<<LOWERCASE_LETTER|int32(1)<<TITLECASE_LETTER|int32(1)<<MODIFIER_LETTER|int32(1)<<OTHER_LETTER|int32(1)<<DECIMAL_DIGIT_NUMBER|int32(1)<<CONNECTOR_PUNCTUATION|(int32(1)<<CONNECTOR_PUNCTUATION|int32(1)<<DASH_PUNCTUATION|int32(1)<<OPEN_PUNCTUATION|int32(1)<<CLOSE_PUNCTUATION|int32(1)<<INITIAL_QUOTE_PUNCTUATION|int32(1)<<FINAL_QUOTE_PUNCTUATION|int32(1)<<OTHER_PUNCTUATION)|int32(1)<<NON_SPACING_MARK|int32(1)<<ENCLOSING_MARK|int32(1)<<COMBINING_SPACING_MARK|int32(1)<<LETTER_NUMBER|int32(1)<<OTHER_NUMBER|int32(1)<<MATH_SYMBOL|int32(1)<<CURRENCY_SYMBOL|int32(1)<<MODIFIER_SYMBOL|int32(1)<<OTHER_SYMBOL|(int32(1)<<SPACE_SEPARATOR|int32(1)<<LINE_SEPARATOR|int32(1)<<PARAGRAPH_SEPARATOR)) >> (groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]] & 0x1F) & 1
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsPunct --
//
//	Test if a character is a Unicode punctuation character.
//
// Results:
//	Returns non-zero if character is punct.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsPunct(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1890:1: */
	return int32(int32(1)<<CONNECTOR_PUNCTUATION|int32(1)<<DASH_PUNCTUATION|int32(1)<<OPEN_PUNCTUATION|int32(1)<<CLOSE_PUNCTUATION|int32(1)<<INITIAL_QUOTE_PUNCTUATION|int32(1)<<FINAL_QUOTE_PUNCTUATION|int32(1)<<OTHER_PUNCTUATION) >> (groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]] & 0x1F) & 1
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsSpace --
//
//	Test if a character is a whitespace Unicode character.
//
// Results:
//	Returns non-zero if character is a space.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsSpace(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1918:1: */
	// Ignore upper 16 bits.
	ch = ch & 0xFFFF

	// If the character is within the first 127 characters, just use the
	// standard C function, otherwise consult the Unicode table.

	if ch < 0x80 {
		return func() int32 {
			if int32(int8(ch)) > 0x20 {
				return 0
			}
			return XTclIsSpaceProc(tls, int32(int8(ch)))
		}()
	} else if ch == 0x0085 || ch == 0x180E || ch == 0x200B ||
		ch == 0x202F || ch == 0x2060 || ch == 0xFEFF {
		return 1
	} else {
		return int32(int32(1)<<SPACE_SEPARATOR|int32(1)<<LINE_SEPARATOR|int32(1)<<PARAGRAPH_SEPARATOR) >> (groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]] & 0x1F) & 1
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsUpper --
//
//	Test if a character is a uppercase Unicode character.
//
// Results:
//	Returns non-zero if character is uppercase.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsUpper(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1965:1: */
	return libc.Bool32(groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]]&0x1F == UPPERCASE_LETTER)
}

//----------------------------------------------------------------------
//
// Tcl_UniCharIsWordChar --
//
//	Test if a character is alphanumeric or a connector punctuation mark.
//
// Results:
//	Returns 1 if character is a word character.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharIsWordChar(tls *libc.TLS, ch int32) int32 { /* tclUtf.c:1993:1: */
	return int32(int32(1)<<UPPERCASE_LETTER|int32(1)<<LOWERCASE_LETTER|int32(1)<<TITLECASE_LETTER|int32(1)<<MODIFIER_LETTER|int32(1)<<OTHER_LETTER|int32(1)<<DECIMAL_DIGIT_NUMBER|int32(1)<<CONNECTOR_PUNCTUATION) >> (groups[groupMap[int32(pageMap[ch&0xFFFF>>OFFSET_BITS])|ch&(int32(1)<<OFFSET_BITS-1)]] & 0x1F) & 1
}

//----------------------------------------------------------------------
//
// Tcl_UniCharCaseMatch --
//
//	See if a particular Unicode string matches a particular pattern.
//	Allows case insensitivity. This is the Unicode equivalent of the char*
//	Tcl_StringCaseMatch. The UniChar strings must be NULL-terminated.
//	This has no provision for counted UniChar strings, thus should not be
//	used where NULLs are expected in the UniChar string. Use
//	TclUniCharMatch where possible.
//
// Results:
//	The return value is 1 if string matches pattern, and 0 otherwise. The
//	matching operation permits the following special characters in the
//	pattern: *?\[] (see the manual entry for details on what these mean).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_UniCharCaseMatch(tls *libc.TLS, uniStr uintptr, uniPattern uintptr, nocase int32) int32 { /* tclUtf.c:2028:1: */
	var ch1 Tcl_UniChar = Tcl_UniChar(0)
	var p Tcl_UniChar

	for 1 != 0 {
		p = *(*Tcl_UniChar)(unsafe.Pointer(uniPattern))

		// See if we're at the end of both the pattern and the string. If so,
		// we succeeded. If we're at the end of the pattern but not at the end
		// of the string, we failed.

		if int32(p) == 0 {
			return libc.Bool32(int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))) == 0)
		}
		if int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))) == 0 && int32(p) != '*' {
			return 0
		}

		// Check for a "*" as the next pattern character. It matches any
		// substring. We handle this by skipping all the characters up to the
		// next matching one in the pattern, and then calling ourselves
		// recursively for each postfix of string, until either we match or we
		// reach the end of the string.

		if int32(p) == '*' {
			// Skip all successive *'s in the pattern

			for int32(*(*Tcl_UniChar)(unsafe.Pointer(libc.PreIncUintptr(&uniPattern, 2)))) == '*' {
				// empty body
			}
			p = *(*Tcl_UniChar)(unsafe.Pointer(uniPattern))
			if int32(p) == 0 {
				return 1
			}
			if nocase != 0 {
				p = XTcl_UniCharToLower(tls, int32(p))
			}
			for 1 != 0 {
				// Optimization for matching - cruise through the string
				// quickly if the next char in the pattern isn't a special
				// character

				if int32(p) != '[' && int32(p) != '?' && int32(p) != '\\' {
					if nocase != 0 {
						for *(*Tcl_UniChar)(unsafe.Pointer(uniStr)) != 0 && int32(p) != int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))) &&
							int32(p) != int32(XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))))) {
							uniStr += 2
						}
					} else {
						for *(*Tcl_UniChar)(unsafe.Pointer(uniStr)) != 0 && int32(p) != int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))) {
							uniStr += 2
						}
					}
				}
				if XTcl_UniCharCaseMatch(tls, uniStr, uniPattern, nocase) != 0 {
					return 1
				}
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))) == 0 {
					return 0
				}
				uniStr += 2
			}
		}

		// Check for a "?" as the next pattern character. It matches any
		// single character.

		if int32(p) == '?' {
			uniPattern += 2
			uniStr += 2
			continue
		}

		// Check for a "[" as the next pattern character. It is followed by a
		// list of characters that are acceptable, or by a range (two
		// characters separated by "-").

		if int32(p) == '[' {
			var startChar Tcl_UniChar
			var endChar Tcl_UniChar

			uniPattern += 2
			ch1 = func() uint16 {
				if nocase != 0 {
					return XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))))
				}
				return *(*Tcl_UniChar)(unsafe.Pointer(uniStr))
			}()
			uniStr += 2
			for 1 != 0 {
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))) == ']' || int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))) == 0 {
					return 0
				}
				startChar = func() uint16 {
					if nocase != 0 {
						return XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))))
					}
					return *(*Tcl_UniChar)(unsafe.Pointer(uniPattern))
				}()
				uniPattern += 2
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))) == '-' {
					uniPattern += 2
					if int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))) == 0 {
						return 0
					}
					endChar = func() uint16 {
						if nocase != 0 {
							return XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))))
						}
						return *(*Tcl_UniChar)(unsafe.Pointer(uniPattern))
					}()
					uniPattern += 2
					if int32(startChar) <= int32(ch1) && int32(ch1) <= int32(endChar) ||
						int32(endChar) <= int32(ch1) && int32(ch1) <= int32(startChar) {
						// Matches ranges of form [a-z] or [z-a].
						break
					}
				} else if int32(startChar) == int32(ch1) {
					break
				}
			}
			for int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))) != ']' {
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))) == 0 {
					uniPattern -= 2
					break
				}
				uniPattern += 2
			}
			uniPattern += 2
			continue
		}

		// If the next pattern character is '\', just strip off the '\' so we
		// do exact matching on the character that follows.

		if int32(p) == '\\' {
			if int32(*(*Tcl_UniChar)(unsafe.Pointer(libc.PreIncUintptr(&uniPattern, 2)))) == 0 {
				return 0
			}
		}

		// There's no special character. Just make sure that the next bytes of
		// each string match.

		if nocase != 0 {
			if int32(XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))))) != int32(XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))))) {
				return 0
			}
		} else if int32(*(*Tcl_UniChar)(unsafe.Pointer(uniStr))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(uniPattern))) {
			return 0
		}
		uniStr += 2
		uniPattern += 2
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// TclUniCharMatch --
//
//	See if a particular Unicode string matches a particular pattern.
//	Allows case insensitivity. This is the Unicode equivalent of the char*
//	Tcl_StringCaseMatch. This variant of Tcl_UniCharCaseMatch uses counted
//	Strings, so embedded NULLs are allowed.
//
// Results:
//	The return value is 1 if string matches pattern, and 0 otherwise. The
//	matching operation permits the following special characters in the
//	pattern: *?\[] (see the manual entry for details on what these mean).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclUniCharMatch(tls *libc.TLS, string uintptr, strLen int32, pattern uintptr, ptnLen int32, nocase int32) int32 { /* tclUtf.c:2216:1: */
	var stringEnd uintptr
	var patternEnd uintptr
	var p Tcl_UniChar

	stringEnd = string + uintptr(strLen)*2
	patternEnd = pattern + uintptr(ptnLen)*2

	for 1 != 0 {
		// See if we're at the end of both the pattern and the string. If so,
		// we succeeded. If we're at the end of the pattern but not at the end
		// of the string, we failed.

		if pattern == patternEnd {
			return libc.Bool32(string == stringEnd)
		}
		p = *(*Tcl_UniChar)(unsafe.Pointer(pattern))
		if string == stringEnd && int32(p) != '*' {
			return 0
		}

		// Check for a "*" as the next pattern character. It matches any
		// substring. We handle this by skipping all the characters up to the
		// next matching one in the pattern, and then calling ourselves
		// recursively for each postfix of string, until either we match or we
		// reach the end of the string.

		if int32(p) == '*' {
			// Skip all successive *'s in the pattern.

			for int32(*(*Tcl_UniChar)(unsafe.Pointer(libc.PreIncUintptr(&pattern, 2)))) == '*' {
				// empty body
			}
			if pattern == patternEnd {
				return 1
			}
			p = *(*Tcl_UniChar)(unsafe.Pointer(pattern))
			if nocase != 0 {
				p = XTcl_UniCharToLower(tls, int32(p))
			}
			for 1 != 0 {
				// Optimization for matching - cruise through the string
				// quickly if the next char in the pattern isn't a special
				// character.

				if int32(p) != '[' && int32(p) != '?' && int32(p) != '\\' {
					if nocase != 0 {
						for string < stringEnd && int32(p) != int32(*(*Tcl_UniChar)(unsafe.Pointer(string))) &&
							int32(p) != int32(XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(string))))) {
							string += 2
						}
					} else {
						for string < stringEnd && int32(p) != int32(*(*Tcl_UniChar)(unsafe.Pointer(string))) {
							string += 2
						}
					}
				}
				if XTclUniCharMatch(tls, string, int32((int64(stringEnd)-int64(string))/2),
					pattern, int32((int64(patternEnd)-int64(pattern))/2), nocase) != 0 {
					return 1
				}
				if string == stringEnd {
					return 0
				}
				string += 2
			}
		}

		// Check for a "?" as the next pattern character. It matches any
		// single character.

		if int32(p) == '?' {
			pattern += 2
			string += 2
			continue
		}

		// Check for a "[" as the next pattern character. It is followed by a
		// list of characters that are acceptable, or by a range (two
		// characters separated by "-").

		if int32(p) == '[' {
			var ch1 Tcl_UniChar
			var startChar Tcl_UniChar
			var endChar Tcl_UniChar

			pattern += 2
			ch1 = func() uint16 {
				if nocase != 0 {
					return XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(string))))
				}
				return *(*Tcl_UniChar)(unsafe.Pointer(string))
			}()
			string += 2
			for 1 != 0 {
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(pattern))) == ']' || pattern == patternEnd {
					return 0
				}
				startChar = func() uint16 {
					if nocase != 0 {
						return XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(pattern))))
					}
					return *(*Tcl_UniChar)(unsafe.Pointer(pattern))
				}()
				pattern += 2
				if int32(*(*Tcl_UniChar)(unsafe.Pointer(pattern))) == '-' {
					pattern += 2
					if pattern == patternEnd {
						return 0
					}
					endChar = func() uint16 {
						if nocase != 0 {
							return XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(pattern))))
						}
						return *(*Tcl_UniChar)(unsafe.Pointer(pattern))
					}()
					pattern += 2
					if int32(startChar) <= int32(ch1) && int32(ch1) <= int32(endChar) ||
						int32(endChar) <= int32(ch1) && int32(ch1) <= int32(startChar) {
						// Matches ranges of form [a-z] or [z-a].
						break
					}
				} else if int32(startChar) == int32(ch1) {
					break
				}
			}
			for int32(*(*Tcl_UniChar)(unsafe.Pointer(pattern))) != ']' {
				if pattern == patternEnd {
					pattern -= 2
					break
				}
				pattern += 2
			}
			pattern += 2
			continue
		}

		// If the next pattern character is '\', just strip off the '\' so we
		// do exact matching on the character that follows.

		if int32(p) == '\\' {
			if libc.PreIncUintptr(&pattern, 2) == patternEnd {
				return 0
			}
		}

		// There's no special character. Just make sure that the next bytes of
		// each string match.

		if nocase != 0 {
			if int32(XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(string))))) != int32(XTcl_UniCharToLower(tls, int32(*(*Tcl_UniChar)(unsafe.Pointer(pattern))))) {
				return 0
			}
		} else if int32(*(*Tcl_UniChar)(unsafe.Pointer(string))) != int32(*(*Tcl_UniChar)(unsafe.Pointer(pattern))) {
			return 0
		}
		string += 2
		pattern += 2
	}
	return int32(0)
}

//---------------------------------------------------------------------------
//
// TclUtfToUCS4 --
//
//	Extract the 4-byte codepoint from the leading bytes of the
//	Modified UTF-8 string "src".  This is a utility routine to
//	contain the surrogate gymnastics in one place.
//
//	The caller must ensure that the source buffer is long enough that this
//	routine does not run off the end and dereference non-existent memory
//	looking for trail bytes. If the source buffer is known to be '\0'
//	terminated, this cannot happen. Otherwise, the caller should call
//	TclUCS4Complete() before calling this routine to ensure that
//	enough bytes remain in the string.
//
// Results:
//	*usc4Ptr is filled with the UCS4 code point, and the return value is
//	the number of bytes from the UTF-8 string that were consumed.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclUtfToUCS4(tls *libc.TLS, src uintptr, ucs4Ptr uintptr) int32 { /* tclUtf.c:2412:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)) = Tcl_UniChar(0)
	var len int32 = XTcl_UtfToUniChar(tls, src, bp)

	if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))&libc.CplInt32(0x3FF) == 0xD800 {
		*(*Tcl_UniChar)(unsafe.Pointer(bp + 2 /* low */)) = *(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */))
		var len2 int32 = XTcl_UtfToUniChar(tls, src+uintptr(len), bp+2)
		if int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2)))&libc.CplInt32(0x3FF) == 0xDC00 {
			*(*int32)(unsafe.Pointer(ucs4Ptr)) = int32(*(*Tcl_UniChar)(unsafe.Pointer(bp)))&0x3FF<<10 | int32(*(*Tcl_UniChar)(unsafe.Pointer(bp + 2)))&0x3FF + 0x10000
			return len + len2
		}
	}
	*(*int32)(unsafe.Pointer(ucs4Ptr)) = int32(*(*Tcl_UniChar)(unsafe.Pointer(bp /* ch */)))
	return len
}

//---------------------------------------------------------------------------
//
// TclUCS4ToUtf --
//
//	Store the given Unicode character as a sequence of UTF-8 bytes in the
//	provided buffer. Might output 6 bytes, if the code point > 0xFFFF.
//
// Results:
//	The return values is the number of bytes in the buffer that were
//	consumed. If ch == -1, this function outputs 0 bytes (empty string),
//	since TclGetUCS4 returns -1 for out-of-range indices.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclUCS4ToUtf(tls *libc.TLS, ch int32, buf uintptr) int32 { /* tclUtf.c:2470:1: */
	if uint32(ch-0x10000) <= uint32(0xFFFFF) {
		// Spit out a 4-byte UTF-8 character or 2 x 3-byte UTF-8 characters, depending on Tcl
		// version and/or TCL_UTF_MAX build value
		var len int32 = XTcl_UniCharToUtf(tls, 0xD800|(ch-0x10000)>>10, buf)
		return len + XTcl_UniCharToUtf(tls, 0xDC00|ch&0x7FF, buf+uintptr(len))
	}
	if ch&libc.CplInt32(0x7FF) == 0xD800 {
		*(*int8)(unsafe.Pointer(buf + 2)) = int8((ch | 0x80) & 0xBF)
		*(*int8)(unsafe.Pointer(buf + 1)) = int8((ch>>6 | 0x80) & 0xBF)
		*(*int8)(unsafe.Pointer(buf)) = int8(ch>>12 | 0xE0)
		return 3
	}
	if ch == -1 {
		return 0
	}
	return XTcl_UniCharToUtf(tls, ch, buf)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Documentation on decimal float math
//    http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=8cf166fedd1aa110VgnVCM100000a360ea10RCRD
//

// The absolute pathname of the executable in which this Tcl library is
// running.

var executableName = ProcessGlobalValue{} /* tclUtil.c:25:27 */

//
//  The following values are used in the flags arguments of Tcl*Scan*Element
//  and Tcl*Convert*Element.  The values TCL_DONT_USE_BRACES and
//  TCL_DONT_QUOTE_HASH are defined in tcl.h, like so:
//
// #define TCL_DONT_USE_BRACES     1
// #define TCL_DONT_QUOTE_HASH     8
//  *
//  * Those are public flag bits which callers of the public routines
//  * Tcl_Convert*Element() can use to indicate:
//  *
//  * TCL_DONT_USE_BRACES -	1 means the caller is insisting that brace
//  *				quoting not be used when converting the list
//  *				element.
//  * TCL_DONT_QUOTE_HASH -	1 means the caller insists that a leading hash
//  *				character ('#') should *not* be quoted. This
//  *				is appropriate when the caller can guarantee
//  *				the element is not the first element of a
//  *				list, so [eval] cannot mis-parse the element
//  *				as a comment.
//  *
//  * The remaining values which can be carried by the flags of these routines
//  * are for internal use only.  Make sure they do not overlap with the public
//  * values above.
//  *
//  * The Tcl*Scan*Element() routines make a determination which of 4 modes of
//  * conversion is most appropriate for Tcl*Convert*Element() to perform, and
//  * sets two bits of the flags value to indicate the mode selected.
//  *
//  * CONVERT_NONE		The element needs no quoting. Its literal string is
//  *			suitable as is.
//  * CONVERT_BRACE	The conversion should be enclosing the literal string
//  *			in braces.
//  * CONVERT_ESCAPE	The conversion should be using backslashes to escape
//  *			any characters in the string that require it.
//  * CONVERT_MASK		A mask value used to extract the conversion mode from
//  *			the flags argument.
//  *			Also indicates a strange conversion mode where all
//  *			special characters are escaped with backslashes
//  *			*except for braces*. This is a strange and unnecessary
//  *			case, but it's part of the historical way in which
//  *			lists have been formatted in Tcl. To experiment with
//  *			removing this case, set the value of COMPAT to 0.
//  *
//  * One last flag value is used only by callers of TclScanElement(). The flag
//  * value produced by a call to Tcl*Scan*Element() will never leave this bit
//  * set.
//  *
//  * CONVERT_ANY		The caller of TclScanElement() declares it can make no
//  *			promise about what public flags will be passed to the
//  *			matching call of TclConvertElement(). As such,
//  *			TclScanElement() has to determine the worst case
//  *			destination buffer length over all possibilities, and
//  *			in other cases this means an overestimate of the
//  *			required size.
//  *
//  * For more details, see the comments on the Tcl*Scan*Element and
//  * Tcl*Convert*Element routines.
//

// The following key is used by Tcl_PrintDouble and TclPrecTraceProc to
// access the precision to be used for double formatting.

var precisionKey Tcl_ThreadDataKey /* tclUtil.c:101:26: */
// The following is the Tcl object type definition for an object that
// represents a list index in the form, "end-offset". It is used as a
// performance optimization in TclGetIntForIndex. The internal rep is an
// integer, so no memory management is required for it.

var XtclEndOffsetType = Tcl_ObjType{
	Fname:             ts + 65138,
	FupdateStringProc: 0, // updateStringProc
	FsetFromAnyProc:   0,
} /* tclUtil.c:128:19 */

//	*	STRING REPRESENTATION OF LISTS	*	*	*
//
// The next several routines implement the conversions of strings to and from
// Tcl lists. To understand their operation, the rules of parsing and
// generating the string representation of lists must be known.  Here we
// describe them in one place.
//
// A list is made up of zero or more elements. Any string is a list if it is
// made up of alternating substrings of element-separating ASCII whitespace
// and properly formatted elements.
//
// The ASCII characters which can make up the whitespace between list elements
// are:
//
//	\u0009	\t	TAB
//	\u000A	\n	NEWLINE
//	\u000B	\v	VERTICAL TAB
//	\u000C	\f	FORM FEED
// 	\u000D	\r	CARRIAGE RETURN
//	\u0020		SPACE
//
// NOTE: differences between this and other places where Tcl defines a role
// for "whitespace".
//
//	* Unlike command parsing, here NEWLINE is just another whitespace
//	  character; its role as a command terminator in a script has no
//	  importance here.
//
//	* Unlike command parsing, the BACKSLASH NEWLINE sequence is not
//	  considered to be a whitespace character.
//
//	* Other Unicode whitespace characters (recognized by [string is space]
//	  or Tcl_UniCharIsSpace()) do not play any role as element separators
//	  in Tcl lists.
//
//	* The NUL byte ought not appear, as it is not in strings properly
//	  encoded for Tcl, but if it is present, it is not treated as
//	  separating whitespace, or a string terminator. It is just another
//	  character in a list element.
//
// The interpretation of a formatted substring as a list element follows rules
// similar to the parsing of the words of a command in a Tcl script. Backslash
// substitution plays a key role, and is defined exactly as it is in command
// parsing. The same routine, TclParseBackslash() is used in both command
// parsing and list parsing.
//
// NOTE: This means that if and when backslash substitution rules ever change
// for command parsing, the interpretation of strings as lists also changes.
//
// Backslash substitution replaces an "escape sequence" of one or more
// characters starting with
//		\u005c	\	BACKSLASH
// with a single character. The one character escape sequence case happens only
// when BACKSLASH is the last character in the string. In all other cases, the
// escape sequence is at least two characters long.
//
// The formatted substrings are interpreted as element values according to the
// following cases:
//
// * If the first character of a formatted substring is
//		\u007b	{	OPEN BRACE
//   then the end of the substring is the matching
//		\u007d	}	CLOSE BRACE
//   character, where matching is determined by counting nesting levels, and
//   not including any brace characters that are contained within a backslash
//   escape sequence in the nesting count. Having found the matching brace,
//   all characters between the braces are the string value of the element.
//   If no matching close brace is found before the end of the string, the
//   string is not a Tcl list. If the character following the close brace is
//   not an element separating whitespace character, or the end of the string,
//   then the string is not a Tcl list.
//
//   NOTE: this differs from a brace-quoted word in the parsing of a Tcl
//   command only in its treatment of the backslash-newline sequence. In a
//   list element, the literal characters in the backslash-newline sequence
//   become part of the element value. In a script word, conversion to a
//   single SPACE character is done.
//
//   NOTE: Most list element values can be represented by a formatted
//   substring using brace quoting. The exceptions are any element value that
//   includes an unbalanced brace not in a backslash escape sequence, and any
//   value that ends with a backslash not itself in a backslash escape
//   sequence.
//
// * If the first character of a formatted substring is
//		\u0022	"	QUOTE
//   then the end of the substring is the next QUOTE character, not counting
//   any QUOTE characters that are contained within a backslash escape
//   sequence. If no next QUOTE is found before the end of the string, the
//   string is not a Tcl list. If the character following the closing QUOTE is
//   not an element separating whitespace character, or the end of the string,
//   then the string is not a Tcl list. Having found the limits of the
//   substring, the element value is produced by performing backslash
//   substitution on the character sequence between the open and close QUOTEs.
//
//   NOTE: Any element value can be represented by this style of formatting,
//   given suitable choice of backslash escape sequences.
//
// * All other formatted substrings are terminated by the next element
//   separating whitespace character in the string.  Having found the limits
//   of the substring, the element value is produced by performing backslash
//   substitution on it.
//
//   NOTE: Any element value can be represented by this style of formatting,
//   given suitable choice of backslash escape sequences, with one exception.
//   The empty string cannot be represented as a list element without the use
//   of either braces or quotes to delimit it.
//
// This collection of parsing rules is implemented in the routine
// FindElement().
//
// In order to produce lists that can be parsed by these rules, we need the
// ability to distinguish between characters that are part of a list element
// value from characters providing syntax that define the structure of the
// list. This means that our code that generates lists must at a minimum be
// able to produce escape sequences for the 10 characters identified above
// that have significance to a list parser.
//
//	*	*	CANONICAL LISTS	*	*	*	*	*
//
// In addition to the basic rules for parsing strings into Tcl lists, there
// are additional properties to be met by the set of list values that are
// generated by Tcl.  Such list values are often said to be in "canonical
// form":
//
// * When any canonical list is evaluated as a Tcl script, it is a script of
//   either zero commands (an empty list) or exactly one command. The command
//   word is exactly the first element of the list, and each argument word is
//   exactly one of the following elements of the list. This means that any
//   characters that have special meaning during script evaluation need
//   special treatment when canonical lists are produced:
//
//	* Whitespace between elements may not include NEWLINE.
//	* The command terminating character,
//		\u003b	;	SEMICOLON
//	  must be BRACEd, QUOTEd, or escaped so that it does not terminate the
// 	  command prematurely.
//	* Any of the characters that begin substitutions in scripts,
//		\u0024	$	DOLLAR
//		\u005b	[	OPEN BRACKET
//		\u005c	\	BACKSLASH
//	  need to be BRACEd or escaped.
//	* In any list where the first character of the first element is
//		\u0023	#	HASH
//	  that HASH character must be BRACEd, QUOTEd, or escaped so that it
//	  does not convert the command into a comment.
//	* Any list element that contains the character sequence BACKSLASH
//	  NEWLINE cannot be formatted with BRACEs. The BACKSLASH character
//	  must be represented by an escape sequence, and unless QUOTEs are
//	  used, the NEWLINE must be as well.
//
// * It is also guaranteed that one can use a canonical list as a building
//   block of a larger script within command substitution, as in this example:
//	set script "puts \[[list $cmd $arg]]"; eval $script
//   To support this usage, any appearance of the character
//		\u005d	]	CLOSE BRACKET
//   in a list element must be BRACEd, QUOTEd, or escaped.
//
// * Finally it is guaranteed that enclosing a canonical list in braces
//   produces a new value that is also a canonical list.  This new list has
//   length 1, and its only element is the original canonical list.  This same
//   guarantee also makes it possible to construct scripts where an argument
//   word is given a list value by enclosing the canonical form of that list
//   in braces:
//	set script "puts {[list $one $two $three]}"; eval $script
//   This sort of coding was once fairly common, though it's become more
//   idiomatic to see the following instead:
//	set script [list puts [list $one $two $three]]; eval $script
//   In order to support this guarantee, every canonical list must have
//   balance when counting those braces that are not in escape sequences.
//
// Within these constraints, the canonical list generation routines
// TclScanElement() and TclConvertElement() attempt to generate the string for
// any list that is easiest to read. When an element value is itself
// acceptable as the formatted substring, it is usually used (CONVERT_NONE).
// When some quoting or escaping is required, use of BRACEs (CONVERT_BRACE) is
// usually preferred over the use of escape sequences (CONVERT_ESCAPE). There
// are some exceptions to both of these preferences for reasons of code
// simplicity, efficiency, and continuation of historical habits. Canonical
// lists never use the QUOTE formatting to delimit their elements because that
// form of quoting does not nest, which makes construction of nested lists far
// too much trouble.  Canonical lists always use only a single SPACE character
// for element-separating whitespace.
//
//	*	*	FUTURE CONSIDERATIONS	*	*	*
//
// When a list element requires quoting or escaping due to a CLOSE BRACKET
// character or an internal QUOTE character, a strange formatting mode is
// recommended. For example, if the value "a{b]c}d" is converted by the usual
// modes:
//
//	CONVERT_BRACE:	a{b]c}d		=> {a{b]c}d}
//	CONVERT_ESCAPE:	a{b]c}d		=> a\{b\]c\}d
//
// we get perfectly usable formatted list elements. However, this is not what
// Tcl releases have been producing. Instead, we have:
//
//	CONVERT_MASK:	a{b]c}d		=> a{b\]c}d
//
// where the CLOSE BRACKET is escaped, but the BRACEs are not. The same effect
// can be seen replacing ] with " in this example. There does not appear to be
// any functional or aesthetic purpose for this strange additional mode. The
// sole purpose I can see for preserving it is to keep generating the same
// formatted lists programmers have become accustomed to, and perhaps written
// tests to expect. That is, compatibility only. The additional code
// complexity required to support this mode is significant. The lines of code
// supporting it are delimited in the routines below with #if COMPAT
// directives. This makes it easy to experiment with eliminating this
// formatting mode simply with "#define COMPAT 0" above. I believe this is
// worth considering.
//
// Another consideration is the treatment of QUOTE characters in list
// elements. TclConvertElement() must have the ability to produce the escape
// sequence \" so that when a list element begins with a QUOTE we do not
// confuse that first character with a QUOTE used as list syntax to define
// list structure. However, that is the only place where QUOTE characters need
// quoting. In this way, handling QUOTE could really be much more like the way
// we handle HASH which also needs quoting and escaping only in particular
// situations. Following up this could increase the set of list elements that
// can use the CONVERT_NONE formatting mode.
//
// More speculative is that the demands of canonical list form require brace
// balance for the list as a whole, while the current implementation achieves
// this by establishing brace balance for every element.
//
// Finally, a reminder that the rules for parsing and formatting lists are
// closely tied together with the rules for parsing and evaluating scripts,
// and will need to evolve in sync.

//----------------------------------------------------------------------
//
// TclMaxListLength --
//
//	Given 'bytes' pointing to 'numBytes' bytes, scan through them and
//	count the number of whitespace runs that could be list element
//	separators. If 'numBytes' is -1, scan to the terminating '\0'. Not a
//	full list parser. Typically used to get a quick and dirty overestimate
//	of length size in order to allocate space for an actual list parser to
//	operate with.
//
// Results:
//	Returns the largest number of list elements that could possibly be in
//	this string, interpreted as a Tcl list. If 'endPtr' is not NULL,
//	writes a pointer to the end of the string scanned there.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclMaxListLength(tls *libc.TLS, bytes uintptr, numBytes int32, endPtr uintptr) int32 { /* tclUtil.c:391:1: */
	var count int32
	count = 0

	if !(numBytes == 0 || numBytes == -1 && int32(*(*int8)(unsafe.Pointer(bytes))) == 0) {
		goto __1
	}
	// Empty string case - quick exit
	goto done
__1:
	;

	// No list element before leading white space.

	count = count + (1 - func() int32 {
		if int32(*(*int8)(unsafe.Pointer(bytes))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(bytes))))
	}())

	// Count white space runs as potential element separators.

__2:
	if !(numBytes != 0) {
		goto __3
	}
	if !(numBytes == -1 && int32(*(*int8)(unsafe.Pointer(bytes))) == 0) {
		goto __4
	}
	goto __3
__4:
	;
	if !(func() int32 {
		if int32(*(*int8)(unsafe.Pointer(bytes))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(bytes))))
	}() != 0) {
		goto __5
	}
	// Space run started; bump count.

	count++
__6:
	bytes++
	numBytes = numBytes - libc.Bool32(numBytes != -1)
	goto __7
__7:
	if numBytes != 0 && func() int32 {
		if int32(*(*int8)(unsafe.Pointer(bytes))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(bytes))))
	}() != 0 {
		goto __6
	}
	goto __8
__8:
	;
	if !(numBytes == 0 || numBytes == -1 && int32(*(*int8)(unsafe.Pointer(bytes))) == 0) {
		goto __9
	}
	goto __3
__9:
	;

	// (*bytes) is non-space; return to counting state.
__5:
	;
	bytes++
	numBytes = numBytes - libc.Bool32(numBytes != -1)
	goto __2
__3:
	;

	// No list element following trailing white space.

	count = count - func() int32 {
		if int32(*(*int8)(unsafe.Pointer(bytes + libc.UintptrFromInt32(-1)))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(bytes + libc.UintptrFromInt32(-1)))))
	}()

done:
	if !(endPtr != 0) {
		goto __10
	}
	*(*uintptr)(unsafe.Pointer(endPtr)) = bytes
__10:
	;
	return count
}

//----------------------------------------------------------------------
//
// TclFindElement --
//
//	Given a pointer into a Tcl list, locate the first (or next) element in
//	the list.
//
// Results:
//	The return value is normally TCL_OK, which means that the element was
//	successfully located. If TCL_ERROR is returned it means that list
//	didn't have proper list structure; the interp's result contains a more
//	detailed error message.
//
//	If TCL_OK is returned, then *elementPtr will be set to point to the
//	first element of list, and *nextPtr will be set to point to the
//	character just after any white space following the last character
//	that's part of the element. If this is the last argument in the list,
//	then *nextPtr will point just after the last character in the list
//	(i.e., at the character at list+listLength). If sizePtr is non-NULL,
//	*sizePtr is filled in with the number of bytes in the element. If the
//	element is in braces, then *elementPtr will point to the character
//	after the opening brace and *sizePtr will not include either of the
//	braces. If there isn't an element in the list, *sizePtr will be zero,
//	and both *elementPtr and *nextPtr will point just after the last
//	character in the list. If literalPtr is non-NULL, *literalPtr is set
//	to a boolean value indicating whether the substring returned as the
//	values of **elementPtr and *sizePtr is the literal value of a list
//	element. If not, a call to TclCopyAndCollapse() is needed to produce
//	the actual value of the list element. Note: this function does NOT
//	collapse backslash sequences, but uses *literalPtr to tell callers
//	when it is required for them to do so.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclFindElement(tls *libc.TLS, interp uintptr, list uintptr, listLength int32, elementPtr uintptr, nextPtr uintptr, sizePtr uintptr, literalPtr uintptr) int32 { /* tclUtil.c:492:1: */
	return sFindElement(tls, interp, list, listLength, ts+3395, ts+65149, elementPtr,
		nextPtr, sizePtr, literalPtr)
}

func XTclFindDictElement(tls *libc.TLS, interp uintptr, dict uintptr, dictLength int32, elementPtr uintptr, nextPtr uintptr, sizePtr uintptr, literalPtr uintptr) int32 { /* tclUtil.c:519:1: */
	return sFindElement(tls, interp, dict, dictLength, ts+23790, ts+23824,
		elementPtr, nextPtr, sizePtr, literalPtr)
}

func sFindElement(tls *libc.TLS, interp uintptr, string uintptr, stringLength int32, typeStr uintptr, typeCode uintptr, elementPtr uintptr, nextPtr uintptr, sizePtr uintptr, literalPtr uintptr) int32 { /* tclUtil.c:548:1: */
	bp := tls.Alloc(228)
	defer tls.Free(228)

	var p uintptr
	var elemStart uintptr // Points to first byte of first element.
	var limit uintptr     // Points just after list/dict's last byte.
	var openBraces int32  // Brace nesting level during parse.
	var inQuotes int32
	var size int32
	// var numChars int32 at bp+224, 4

	var literal int32
	var p2 uintptr
	p = string
	openBraces = 0
	inQuotes = 0
	size = 0
	literal = 1

	// Skim off leading white space and check for an opening brace or quote.
	// We treat embedded NULLs in the list/dict as bytes belonging to a list
	// element (or dictionary key or value).

	limit = string + uintptr(stringLength)
__1:
	if !(p < limit && func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0) {
		goto __2
	}
	p++
	goto __1
__2:
	;
	if !(p == limit) {
		goto __3
	} // no element found
	elemStart = limit
	goto done
__3:
	;

	if !(int32(*(*int8)(unsafe.Pointer(p))) == '{') {
		goto __4
	}
	openBraces = 1
	p++
	goto __5
__4:
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '"') {
		goto __6
	}
	inQuotes = 1
	p++
__6:
	;
__5:
	;
	elemStart = p

	// Find element's end (a space, close brace, or the end of the string).

__7:
	if !(p < limit) {
		goto __8
	}
	switch int32(*(*int8)(unsafe.Pointer(p))) {
	// Open brace: don't treat specially unless the element is in
	// braces. In this case, keep a nesting count.

	case '{':
		goto __10

		// Close brace: if element is in braces, keep nesting count and
		// quit when the last close brace is seen.

	case '}':
		goto __11

		// Backslash: skip over everything up to the end of the backslash
		// sequence.

	case '\\':
		goto __12

		// Double-quote: if element is in quotes then terminate it.

	case '"':
		goto __13

	default:
		goto __14
	}
	goto __9
	// Open brace: don't treat specially unless the element is in
	// braces. In this case, keep a nesting count.

__10:
	if !(openBraces != 0) {
		goto __15
	}
	openBraces++
__15:
	;
	goto __9

	// Close brace: if element is in braces, keep nesting count and
	// quit when the last close brace is seen.

__11:
	if !(openBraces > 1) {
		goto __16
	}
	openBraces--
	goto __17
__16:
	if !(openBraces == 1) {
		goto __18
	}
	size = int32((int64(p) - int64(elemStart)) / 1)
	p++
	if !(p >= limit || func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0) {
		goto __19
	}
	goto done
__19:
	;

	// Garbage after the closing brace; return an error.

	if !(interp != uintptr(0)) {
		goto __20
	}
	p2 = p
__21:
	if !(p2 < limit && !(func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p2))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p2))))
	}() != 0) &&
		p2 < p+uintptr(20)) {
		goto __22
	}
	p2++
	goto __21
__22:
	;
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+65154, libc.VaList(bp, typeStr, int32((int64(p2)-int64(p))/1), p)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+7444, typeCode, ts+65211,
		uintptr(0)))
__20:
	;
	return TCL_ERROR
__18:
	;
__17:
	;
	goto __9

	// Backslash: skip over everything up to the end of the backslash
	// sequence.

__12:
	if !(openBraces == 0) {
		goto __23
	}
	// A backslash sequence not within a brace quoted element
	// means the value of the element is different from the
	// substring we are parsing. A call to TclCopyAndCollapse() is
	// needed to produce the element value. Inform the caller.

	literal = 0
__23:
	;
	XTclParseBackslash(tls, p, int32((int64(limit)-int64(p))/1), bp+224, uintptr(0))
	p += uintptr(*(*int32)(unsafe.Pointer(bp + 224)) - 1)
	goto __9

	// Double-quote: if element is in quotes then terminate it.

__13:
	if !(inQuotes != 0) {
		goto __24
	}
	size = int32((int64(p) - int64(elemStart)) / 1)
	p++
	if !(p >= limit || func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0) {
		goto __25
	}
	goto done
__25:
	;

	// Garbage after the closing quote; return an error.

	if !(interp != uintptr(0)) {
		goto __26
	}
	p2 = p
__27:
	if !(p2 < limit && !(func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p2))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p2))))
	}() != 0) &&
		p2 < p+uintptr(20)) {
		goto __28
	}
	p2++
	goto __27
__28:
	;
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+65216, libc.VaList(bp+64, typeStr, int32((int64(p2)-int64(p))/1), p)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+88, ts+4178, ts+7444, typeCode, ts+65211,
		uintptr(0)))
__26:
	;
	return TCL_ERROR
__24:
	;
	goto __9

__14:
	if !(func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0) {
		goto __29
	}
	// Space: ignore if element is in braces or quotes;
	// otherwise terminate element.
	if !(openBraces == 0 && !(inQuotes != 0)) {
		goto __30
	}
	size = int32((int64(p) - int64(elemStart)) / 1)
	goto done
__30:
	;
__29:
	;
	goto __9

__9:
	;
	p++
	goto __7
__8:
	;

	// End of list/dict: terminate element.

	if !(p == limit) {
		goto __31
	}
	if !(openBraces != 0) {
		goto __32
	}
	if !(interp != uintptr(0)) {
		goto __34
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+65273, libc.VaList(bp+128, typeStr)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+136, ts+4178, ts+7444, typeCode, ts+65300,
		uintptr(0)))
__34:
	;
	return TCL_ERROR
	goto __33
__32:
	if !(inQuotes != 0) {
		goto __35
	}
	if !(interp != uintptr(0)) {
		goto __36
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+65306, libc.VaList(bp+176, typeStr)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+184, ts+4178, ts+7444, typeCode, ts+65333,
		uintptr(0)))
__36:
	;
	return TCL_ERROR
__35:
	;
__33:
	;
	size = int32((int64(p) - int64(elemStart)) / 1)
__31:
	;

done:
__37:
	if !(p < limit && func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0) {
		goto __38
	}
	p++
	goto __37
__38:
	;
	*(*uintptr)(unsafe.Pointer(elementPtr)) = elemStart
	*(*uintptr)(unsafe.Pointer(nextPtr)) = p
	if !(sizePtr != uintptr(0)) {
		goto __39
	}
	*(*int32)(unsafe.Pointer(sizePtr)) = size
__39:
	;
	if !(literalPtr != uintptr(0)) {
		goto __40
	}
	*(*int32)(unsafe.Pointer(literalPtr)) = literal
__40:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclCopyAndCollapse --
//
//	Copy a string and substitute all backslash escape sequences
//
// Results:
//	Count bytes get copied from src to dst. Along the way, backslash
//	sequences are substituted in the copy. After scanning count bytes from
//	src, a null character is placed at the end of dst. Returns the number
//	of bytes that got written to dst.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclCopyAndCollapse(tls *libc.TLS, count int32, src uintptr, dst uintptr) int32 { /* tclUtil.c:790:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var newCount int32 = 0

	for count > 0 {
		var c int8 = *(*int8)(unsafe.Pointer(src))

		if int32(c) == '\\' {
			// var numRead int32 at bp, 4

			var backslashCount int32 = XTclParseBackslash(tls, src, count, bp, dst)

			dst += uintptr(backslashCount)
			newCount = newCount + backslashCount
			src += uintptr(*(*int32)(unsafe.Pointer(bp /* numRead */)))
			count = count - *(*int32)(unsafe.Pointer(bp))
		} else {
			*(*int8)(unsafe.Pointer(dst)) = c
			dst++
			newCount++
			src++
			count--
		}
	}
	*(*int8)(unsafe.Pointer(dst)) = int8(0)
	return newCount
}

//----------------------------------------------------------------------
//
// Tcl_SplitList --
//
//	Splits a list up into its constituent fields.
//
// Results
//	The return value is normally TCL_OK, which means that the list was
//	successfully split up. If TCL_ERROR is returned, it means that "list"
//	didn't have proper list structure; the interp's result will contain a
//	more detailed error message.
//
//	*argvPtr will be filled in with the address of an array whose elements
//	point to the elements of list, in order. *argcPtr will get filled in
//	with the number of valid elements in the array. A single block of
//	memory is dynamically allocated to hold both the argv array and a copy
//	of the list (with backslashes and braces removed in the standard way).
//	The caller must eventually free this memory by calling free() on
//	*argvPtr. Note: *argvPtr and *argcPtr are only modified if the
//	function returns normally.
//
// Side effects:
//	Memory is allocated.
//
//----------------------------------------------------------------------

func XTcl_SplitList(tls *libc.TLS, interp uintptr, list uintptr, argcPtr uintptr, argvPtr uintptr) int32 { /* tclUtil.c:849:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)
	*(*uintptr)(unsafe.Pointer(bp + 48)) = list

	var argv uintptr
	// var end uintptr at bp+32, 8

	// var element uintptr at bp+40, 8

	var p uintptr
	var length int32
	var size int32
	var i int32
	var result int32
	// var elSize int32 at bp+56, 4

	// Allocate enough space to work in. A (const char *) for each (possible)
	// list element plus one more for terminating NULL, plus as many bytes as
	// in the original string value, plus one more for a terminating '\0'.
	// Space used to hold element separating white space in the original
	// string gets re-purposed to hold '\0' characters in the argv array.

	size = XTclMaxListLength(tls, *(*uintptr)(unsafe.Pointer(bp + 48)), -1, bp+32) + 1
	length = int32((int64(*(*uintptr)(unsafe.Pointer(bp + 32))) - int64(*(*uintptr)(unsafe.Pointer(bp + 48)))) / 1)
	argv = XTcl_Alloc(tls, uint32(uint64(size)*uint64(unsafe.Sizeof(uintptr(0)))+uint64(length)+uint64(1)))

	i = 0
	p = argv + uintptr(uint64(size)*uint64(unsafe.Sizeof(uintptr(0))))
	for ; int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48))))) != 0; i++ {
		var prevList uintptr = *(*uintptr)(unsafe.Pointer(bp + 48 /* list */))
		// var literal int32 at bp+60, 4

		result = XTclFindElement(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 48 /* list */)), length, bp+40, bp+48,
			bp+56, bp+60)
		length = int32(int64(length) - (int64(*(*uintptr)(unsafe.Pointer(bp + 48)))-int64(prevList))/1)
		if result != TCL_OK {
			XTclpFree(tls, argv)
			return result
		}
		if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40))))) == 0 {
			break
		}
		if i >= size {
			XTclpFree(tls, argv)
			if interp != uintptr(0) {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+65339, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+65371, ts+65380,
					uintptr(0)))
			}
			return TCL_ERROR
		}
		*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) = p
		if *(*int32)(unsafe.Pointer(bp + 60)) != 0 {
			libc.Xmemcpy(tls, p, *(*uintptr)(unsafe.Pointer(bp + 40 /* element */)), uint64(*(*int32)(unsafe.Pointer(bp + 56 /* elSize */))))
			p += uintptr(*(*int32)(unsafe.Pointer(bp + 56 /* elSize */)))
			*(*int8)(unsafe.Pointer(p)) = int8(0)
			p++
		} else {
			p += uintptr(1 + XTclCopyAndCollapse(tls, *(*int32)(unsafe.Pointer(bp + 56)), *(*uintptr)(unsafe.Pointer(bp + 40)), p))
		}
	}

	*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(argvPtr)) = argv
	*(*int32)(unsafe.Pointer(argcPtr)) = i
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ScanElement --
//
//	This function is a companion function to Tcl_ConvertElement. It scans
//	a string to see what needs to be done to it (e.g. add backslashes or
//	enclosing braces) to make the string into a valid Tcl list element.
//
// Results:
//	The return value is an overestimate of the number of bytes that will
//	be needed by Tcl_ConvertElement to produce a valid list element from
//	src. The word at *flagPtr is filled in with a value needed by
//	Tcl_ConvertElement when doing the actual conversion.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ScanElement(tls *libc.TLS, src uintptr, flagPtr uintptr) int32 { /* tclUtil.c:938:1: */
	return XTcl_ScanCountedElement(tls, src, -1, flagPtr)
}

//----------------------------------------------------------------------
//
// Tcl_ScanCountedElement --
//
//	This function is a companion function to Tcl_ConvertCountedElement. It
//	scans a string to see what needs to be done to it (e.g. add
//	backslashes or enclosing braces) to make the string into a valid Tcl
//	list element. If length is -1, then the string is scanned from src up
//	to the first null byte.
//
// Results:
//	The return value is an overestimate of the number of bytes that will
//	be needed by Tcl_ConvertCountedElement to produce a valid list element
//	from src. The word at *flagPtr is filled in with a value needed by
//	Tcl_ConvertCountedElement when doing the actual conversion.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ScanCountedElement(tls *libc.TLS, src uintptr, length int32, flagPtr uintptr) int32 { /* tclUtil.c:970:1: */
	bp := tls.Alloc(1)
	defer tls.Free(1)

	*(*int8)(unsafe.Pointer(bp /* flags */)) = int8(CONVERT_ANY)
	var numBytes int32 = XTclScanElement(tls, src, length, bp)

	*(*int32)(unsafe.Pointer(flagPtr)) = int32(*(*int8)(unsafe.Pointer(bp /* flags */)))
	return numBytes
}

//----------------------------------------------------------------------
//
// TclScanElement --
//
//	This function is a companion function to TclConvertElement. It scans a
//	string to see what needs to be done to it (e.g. add backslashes or
//	enclosing braces) to make the string into a valid Tcl list element. If
//	length is -1, then the string is scanned from src up to the first null
//	byte. A NULL value for src is treated as an empty string. The incoming
//	value of *flagPtr is a report from the caller what additional flags it
//	will pass to TclConvertElement().
//
// Results:
//	The recommended formatting mode for the element is determined and a
//	value is written to *flagPtr indicating that recommendation. This
//	recommendation is combined with the incoming flag values in *flagPtr
//	set by the caller to determine how many bytes will be needed by
//	TclConvertElement() in which to write the formatted element following
//	the recommendation modified by the flag values. This number of bytes
//	is the return value of the routine.  In some situations it may be an
//	overestimate, but so long as the caller passes the same flags to
//	TclConvertElement(), it will be large enough.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclScanElement(tls *libc.TLS, src uintptr, length int32, flagPtr uintptr) int32 { /* tclUtil.c:1014:1: */
	var p uintptr
	var nestingLevel int32 // Brace nesting count
	var forbidNone int32   // Do not permit CONVERT_NONE mode. Something
	// needs protection or escape.
	var requireEscape int32 // Force use of CONVERT_ESCAPE mode.  For some
	// reason bare or brace-quoted form fails.
	var extra int32 // Count of number of extra bytes needed for
	// formatted element, assuming we use escape
	// sequences in formatting.
	var bytesNeeded int32 // Buffer length computed to complete the
	// element formatting in the selected mode.
	var preferEscape int32 // Use preferences to track whether to use
	var preferBrace int32  // CONVERT_MASK mode.
	var braceCount int32
	p = src
	nestingLevel = 0
	forbidNone = 0
	requireEscape = 0
	extra = 0
	preferEscape = 0
	preferBrace = 0
	braceCount = 0 // Count of all braces '{' '}' seen.

	if !(p == uintptr(0) || length == 0 || int32(*(*int8)(unsafe.Pointer(p))) == 0 && length == -1) {
		goto __1
	}
	// Empty string element must be brace quoted.

	*(*int8)(unsafe.Pointer(flagPtr)) = int8(CONVERT_BRACE)
	return 2
__1:
	;

	// We have an established history in TclConvertElement() when quoting
	// because of a leading hash character to force what would be the
	// CONVERT_MASK mode into the CONVERT_BRACE mode. That is, we format
	// the element #{a"b} like this:
	//			{#{a"b}}
	// and not like this:
	//			\#{a\"b}
	// This is inconsistent with [list x{a"b}], but we will not change that now.
	// Set that preference here so that we compute a tight size requirement.
	if !(int32(*(*int8)(unsafe.Pointer(src))) == '#' && !(int32(*(*int8)(unsafe.Pointer(flagPtr)))&TCL_DONT_QUOTE_HASH != 0)) {
		goto __2
	}
	preferBrace = 1
__2:
	;

	if !(int32(*(*int8)(unsafe.Pointer(p))) == '{' || int32(*(*int8)(unsafe.Pointer(p))) == '"') {
		goto __3
	}
	// Must escape or protect so leading character of value is not
	// misinterpreted as list element delimiting syntax.

	forbidNone = 1
	preferBrace = 1
__3:
	;

__4:
	if !(length != 0) {
		goto __5
	}
	if !(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCharTypeTable)) + uintptr(128) + uintptr(uint8(*(*int8)(unsafe.Pointer(p))))))) != TYPE_NORMAL) {
		goto __6
	}
	switch int32(*(*int8)(unsafe.Pointer(p))) {
	case '{':
		goto __8
	case '}':
		goto __9
	case ']':
		goto __10 // TYPE_CLOSE_BRACK
	case '"':
		goto __11
	case '[':
		goto __12 // TYPE_SUBS
	case '$':
		goto __13 // TYPE_SUBS
	case ';':
		goto __14
	case '\\':
		goto __15
	case 0:
		goto __16
	default:
		goto __17
	}
	goto __7
__8: // TYPE_BRACE
	braceCount++
	extra++ // Escape '{' => '\{'
	nestingLevel++
	goto __7
__9: // TYPE_BRACE
	braceCount++
	extra++ // Escape '}' => '\}'
	nestingLevel--
	if !(nestingLevel < 0) {
		goto __18
	}
	// Unbalanced braces!  Cannot format with brace quoting.

	requireEscape = 1
__18:
	;
	goto __7
__10: // TYPE_CLOSE_BRACK
__11: // TYPE_SPACE
	forbidNone = 1
	extra++ // Escapes all just prepend a backslash
	preferEscape = 1
	goto __7
__12: // TYPE_SUBS
__13: // TYPE_SUBS
__14: // TYPE_COMMAND_END
	forbidNone = 1
	extra++ // Escape sequences all one byte longer.
	preferBrace = 1
	goto __7
__15: // TYPE_SUBS
	extra++ // Escape '\' => '\\'
	if !(length == 1 || length == -1 && int32(*(*int8)(unsafe.Pointer(p + 1))) == 0) {
		goto __19
	}
	// Final backslash. Cannot format with brace quoting.

	requireEscape = 1
	goto __7
__19:
	;
	if !(int32(*(*int8)(unsafe.Pointer(p + 1))) == '\n') {
		goto __20
	}
	extra++ // Escape newline => '\n', one byte longer

	// Backslash newline sequence.  Brace quoting not permitted.

	requireEscape = 1
	length = length - libc.Bool32(length > 0)
	p++
	goto __7
__20:
	;
	if !(int32(*(*int8)(unsafe.Pointer(p + 1))) == '{' || int32(*(*int8)(unsafe.Pointer(p + 1))) == '}' || int32(*(*int8)(unsafe.Pointer(p + 1))) == '\\') {
		goto __21
	}
	extra++ // Escape sequences all one byte longer.
	length = length - libc.Bool32(length > 0)
	p++
__21:
	;
	forbidNone = 1
	preferBrace = 1
	goto __7
__16: // TYPE_SUBS
	if !(length == -1) {
		goto __22
	}
	goto endOfString
__22:
	;
	// TODO: Panic on improper encoding?
	goto __7
__17:
	if !(func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0) {
		goto __23
	}
	forbidNone = 1
	extra++ // Escape sequences all one byte longer.
	preferBrace = 1
__23:
	;
	goto __7
__7:
	;
__6:
	;
	length = length - libc.Bool32(length > 0)
	p++
	goto __4
__5:
	;

endOfString:
	if !(nestingLevel != 0) {
		goto __24
	}
	// Unbalanced braces!  Cannot format with brace quoting.

	requireEscape = 1
__24:
	;

	// We need at least as many bytes as are in the element value...

	bytesNeeded = int32((int64(p) - int64(src)) / 1)

	if !(requireEscape != 0) {
		goto __25
	}
	// We must use escape sequences.  Add all the extra bytes needed to
	// have room to create them.

	bytesNeeded = bytesNeeded + extra

	// Make room to escape leading #, if needed.

	if !(int32(*(*int8)(unsafe.Pointer(src))) == '#' && !(int32(*(*int8)(unsafe.Pointer(flagPtr)))&TCL_DONT_QUOTE_HASH != 0)) {
		goto __26
	}
	bytesNeeded++
__26:
	;
	*(*int8)(unsafe.Pointer(flagPtr)) = int8(CONVERT_ESCAPE)
	goto overflowCheck
__25:
	;
	if !(int32(*(*int8)(unsafe.Pointer(flagPtr)))&CONVERT_ANY != 0) {
		goto __27
	}
	// The caller has not let us know what flags it will pass to
	// TclConvertElement() so compute the max size we might need for any
	// possible choice.  Normally the formatting using escape sequences is
	// the longer one, and a minimum "extra" value of 2 makes sure we
	// don't request too small a buffer in those edge cases where that's
	// not true.

	if !(extra < 2) {
		goto __28
	}
	extra = 2
__28:
	;
	*(*int8)(unsafe.Pointer(flagPtr)) &= int8(libc.CplInt32(CONVERT_ANY))
	*(*int8)(unsafe.Pointer(flagPtr)) |= int8(TCL_DONT_USE_BRACES)
__27:
	;
	if !(forbidNone != 0) {
		goto __29
	}
	// We must request some form of quoting of escaping...

	if !(preferEscape != 0 && !(preferBrace != 0)) {
		goto __30
	}
	// If we are quoting solely due to ] or internal " characters use
	// the CONVERT_MASK mode where we escape all special characters
	// except for braces. "extra" counted space needed to escape
	// braces too, so substract "braceCount" to get our actual needs.

	bytesNeeded = bytesNeeded + (extra - braceCount)
	// Make room to escape leading #, if needed.
	if !(int32(*(*int8)(unsafe.Pointer(src))) == '#' && !(int32(*(*int8)(unsafe.Pointer(flagPtr)))&TCL_DONT_QUOTE_HASH != 0)) {
		goto __31
	}
	bytesNeeded++
__31:
	;

	// If the caller reports it will direct TclConvertElement() to
	// use full escapes on the element, add back the bytes needed to
	// escape the braces.

	if !(int32(*(*int8)(unsafe.Pointer(flagPtr)))&TCL_DONT_USE_BRACES != 0) {
		goto __32
	}
	bytesNeeded = bytesNeeded + braceCount
__32:
	;
	*(*int8)(unsafe.Pointer(flagPtr)) = int8(CONVERT_BRACE | CONVERT_ESCAPE)
	goto overflowCheck
__30:
	;
	if !(int32(*(*int8)(unsafe.Pointer(flagPtr)))&TCL_DONT_USE_BRACES != 0) {
		goto __33
	}
	// If the caller reports it will direct TclConvertElement() to
	// use escapes, add the extra bytes needed to have room for them.

	bytesNeeded = bytesNeeded + extra

	// Make room to escape leading #, if needed.

	if !(int32(*(*int8)(unsafe.Pointer(src))) == '#' && !(int32(*(*int8)(unsafe.Pointer(flagPtr)))&TCL_DONT_QUOTE_HASH != 0)) {
		goto __35
	}
	bytesNeeded++
__35:
	;
	goto __34
__33:
	// Add 2 bytes for room for the enclosing braces.

	bytesNeeded = bytesNeeded + 2
__34:
	;
	*(*int8)(unsafe.Pointer(flagPtr)) = int8(CONVERT_BRACE)
	goto overflowCheck
__29:
	;

	// So far, no need to quote or escape anything.

	if !(int32(*(*int8)(unsafe.Pointer(src))) == '#' && !(int32(*(*int8)(unsafe.Pointer(flagPtr)))&TCL_DONT_QUOTE_HASH != 0)) {
		goto __36
	}
	// If we need to quote a leading #, make room to enclose in braces.

	bytesNeeded = bytesNeeded + 2
__36:
	;
	*(*int8)(unsafe.Pointer(flagPtr)) = int8(CONVERT_NONE)

overflowCheck:
	if !(bytesNeeded < 0) {
		goto __37
	}
	XTcl_Panic(tls, ts+65394, 0)
__37:
	;
	return bytesNeeded
}

//----------------------------------------------------------------------
//
// Tcl_ConvertElement --
//
//	This is a companion function to Tcl_ScanElement. Given the information
//	produced by Tcl_ScanElement, this function converts a string to a list
//	element equal to that string.
//
// Results:
//	Information is copied to *dst in the form of a list element identical
//	to src (i.e. if Tcl_SplitList is applied to dst it will produce a
//	string identical to src). The return value is a count of the number of
//	characters copied (not including the terminating NULL character).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ConvertElement(tls *libc.TLS, src uintptr, dst uintptr, flags int32) int32 { /* tclUtil.c:1321:1: */
	return XTcl_ConvertCountedElement(tls, src, -1, dst, flags)
}

//----------------------------------------------------------------------
//
// Tcl_ConvertCountedElement --
//
//	This is a companion function to Tcl_ScanCountedElement. Given the
//	information produced by Tcl_ScanCountedElement, this function converts
//	a string to a list element equal to that string.
//
// Results:
//	Information is copied to *dst in the form of a list element identical
//	to src (i.e. if Tcl_SplitList is applied to dst it will produce a
//	string identical to src). The return value is a count of the number of
//	characters copied (not including the terminating NULL character).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ConvertCountedElement(tls *libc.TLS, src uintptr, length int32, dst uintptr, flags int32) int32 { /* tclUtil.c:1351:1: */
	var numBytes int32 = XTclConvertElement(tls, src, length, dst, flags)
	*(*int8)(unsafe.Pointer(dst + uintptr(numBytes))) = int8(0)
	return numBytes
}

//----------------------------------------------------------------------
//
// TclConvertElement --
//
//	This is a companion function to TclScanElement. Given the information
//	produced by TclScanElement, this function converts a string to a list
//	element equal to that string.
//
// Results:
//	Information is copied to *dst in the form of a list element identical
//	to src (i.e. if Tcl_SplitList is applied to dst it will produce a
//	string identical to src). The return value is a count of the number of
//	characters copied (not including the terminating NULL character).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclConvertElement(tls *libc.TLS, src uintptr, length int32, dst uintptr, flags int32) int32 { /* tclUtil.c:1384:1: */
	var conversion int32 = flags & (CONVERT_BRACE | CONVERT_ESCAPE)
	var p uintptr = dst

	// Let the caller demand we use escape sequences rather than braces.

	if flags&TCL_DONT_USE_BRACES != 0 && conversion&CONVERT_BRACE != 0 {
		conversion = CONVERT_ESCAPE
	}

	// No matter what the caller demands, empty string must be braced!

	if src == uintptr(0) || length == 0 || int32(*(*int8)(unsafe.Pointer(src))) == 0 && length == -1 {
		src = XtclEmptyStringRep
		length = 0
		conversion = CONVERT_BRACE
	}

	// Escape leading hash as needed and requested.

	if int32(*(*int8)(unsafe.Pointer(src))) == '#' && !(flags&TCL_DONT_QUOTE_HASH != 0) {
		if conversion == CONVERT_ESCAPE {
			*(*int8)(unsafe.Pointer(p)) = int8('\\')
			*(*int8)(unsafe.Pointer(p + 1)) = int8('#')
			p += uintptr(2)
			src++
			length = length - libc.Bool32(length > 0)
		} else {
			conversion = CONVERT_BRACE
		}
	}

	// No escape or quoting needed.  Copy the literal string value.

	if conversion == CONVERT_NONE {
		if length == -1 {
			// TODO: INT_MAX overflow?
			for *(*int8)(unsafe.Pointer(src)) != 0 {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))
			}
			return int32((int64(p) - int64(dst)) / 1)
		} else {
			libc.Xmemcpy(tls, dst, src, uint64(length))
			return length
		}
	}

	// Formatted string is original string enclosed in braces.

	if conversion == CONVERT_BRACE {
		*(*int8)(unsafe.Pointer(p)) = int8('{')
		p++
		if length == -1 {
			// TODO: INT_MAX overflow?
			for *(*int8)(unsafe.Pointer(src)) != 0 {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&src, 1)))
			}
		} else {
			libc.Xmemcpy(tls, p, src, uint64(length))
			p += uintptr(length)
		}
		*(*int8)(unsafe.Pointer(p)) = int8('}')
		p++
		return int32((int64(p) - int64(dst)) / 1)
	}

	// conversion == CONVERT_ESCAPE or CONVERT_MASK

	// Formatted string is original string converted to escape sequences.

__1:
	if !(length != 0) {
		goto __3
	}
	{
		switch int32(*(*int8)(unsafe.Pointer(src))) {
		case ']':
			fallthrough
		case '[':
			fallthrough
		case '$':
			fallthrough
		case ';':
			fallthrough
		case ' ':
			fallthrough
		case '\\':
			fallthrough
		case '"':
			*(*int8)(unsafe.Pointer(p)) = int8('\\')
			p++
			break
		case '{':
			fallthrough
		case '}':
			if conversion == CONVERT_ESCAPE {
				*(*int8)(unsafe.Pointer(p)) = int8('\\')
				p++
			}
			break
		case '\f':
			*(*int8)(unsafe.Pointer(p)) = int8('\\')
			p++
			*(*int8)(unsafe.Pointer(p)) = int8('f')
			p++
			goto __2
		case '\n':
			*(*int8)(unsafe.Pointer(p)) = int8('\\')
			p++
			*(*int8)(unsafe.Pointer(p)) = int8('n')
			p++
			goto __2
		case '\r':
			*(*int8)(unsafe.Pointer(p)) = int8('\\')
			p++
			*(*int8)(unsafe.Pointer(p)) = int8('r')
			p++
			goto __2
		case '\t':
			*(*int8)(unsafe.Pointer(p)) = int8('\\')
			p++
			*(*int8)(unsafe.Pointer(p)) = int8('t')
			p++
			goto __2
		case '\v':
			*(*int8)(unsafe.Pointer(p)) = int8('\\')
			p++
			*(*int8)(unsafe.Pointer(p)) = int8('v')
			p++
			goto __2
		case 0:
			if length == -1 {
				return int32((int64(p) - int64(dst)) / 1)
			}

			// If we reach this point, there's an embedded NULL in the string
			// range being processed, which should not happen when the
			// encoding rules for Tcl strings are properly followed.  If the
			// day ever comes when we stop tolerating such things, this is
			// where to put the Tcl_Panic().

			break
		}
		*(*int8)(unsafe.Pointer(p)) = *(*int8)(unsafe.Pointer(src))
		p++

	}
	goto __2
__2:
	src++
	length = length - libc.Bool32(length > 0)
	goto __1
	goto __3
__3:
	;
	return int32((int64(p) - int64(dst)) / 1)
}

//----------------------------------------------------------------------
//
// Tcl_Merge --
//
//	Given a collection of strings, merge them together into a single
//	string that has proper Tcl list structured (i.e. Tcl_SplitList may be
//	used to retrieve strings equal to the original elements, and Tcl_Eval
//	will parse the string back into its original elements).
//
// Results:
//	The return value is the address of a dynamically-allocated string
//	containing the merged list.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_Merge(tls *libc.TLS, argc int32, argv uintptr) uintptr { /* tclUtil.c:1564:6: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	// var localFlags [64]int8 at bp+16, 64

	var flagPtr uintptr = uintptr(0)
	var i int32
	var bytesNeeded int32 = 0
	var result uintptr
	var dst uintptr

	// Handle empty list case first, so logic of the general case can be
	// simpler.

	if argc == 0 {
		result = XTcl_Alloc(tls, uint32(1))
		*(*int8)(unsafe.Pointer(result)) = int8(0)
		return result
	}

	// Pass 1: estimate space, gather flags.

	if argc <= LOCAL_SIZE {
		flagPtr = bp + 16 /* &localFlags[0] */
	} else {
		flagPtr = XTcl_Alloc(tls, uint32(argc))
	}
	for i = 0; i < argc; i++ {
		*(*int8)(unsafe.Pointer(flagPtr + uintptr(i))) = func() int8 {
			if i != 0 {
				return int8(TCL_DONT_QUOTE_HASH)
			}
			return int8(0)
		}()
		bytesNeeded = bytesNeeded + XTclScanElement(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), -1, flagPtr+uintptr(i))
		if bytesNeeded < 0 {
			XTcl_Panic(tls, ts+9934, libc.VaList(bp, 0x7fffffff))
		}
	}
	if bytesNeeded > 0x7fffffff-argc+1 {
		XTcl_Panic(tls, ts+9934, libc.VaList(bp+8, 0x7fffffff))
	}
	bytesNeeded = bytesNeeded + argc

	// Pass two: copy into the result area.

	result = XTcl_Alloc(tls, uint32(bytesNeeded))
	dst = result
	for i = 0; i < argc; i++ {
		*(*int8)(unsafe.Pointer(flagPtr + uintptr(i))) |= int8(func() int32 {
			if i != 0 {
				return TCL_DONT_QUOTE_HASH
			}
			return 0
		}())
		dst += uintptr(XTclConvertElement(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), -1, dst, int32(*(*int8)(unsafe.Pointer(flagPtr + uintptr(i))))))
		*(*int8)(unsafe.Pointer(dst)) = int8(' ')
		dst++
	}
	*(*int8)(unsafe.Pointer(dst + libc.UintptrFromInt32(-1))) = int8(0)

	if flagPtr != bp+16 {
		XTclpFree(tls, flagPtr)
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_Backslash --
//
//	Figure out how to handle a backslash sequence.
//
// Results:
//	The return value is the character that should be substituted in place
//	of the backslash sequence that starts at src. If readPtr isn't NULL
//	then it is filled in with a count of the number of characters in the
//	backslash sequence.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_Backslash(tls *libc.TLS, src uintptr, readPtr uintptr) int8 { /* tclUtil.c:1646:1: */
	bp := tls.Alloc(6)
	defer tls.Free(6)

	*(*[4]int8)(unsafe.Pointer(bp /* buf */)) = *(*[4]int8)(unsafe.Pointer(ts + 62397))
	*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */)) = Tcl_UniChar(0)

	XTcl_UtfBackslash(tls, src, readPtr, bp)
	if int32(uint8(*(*int8)(unsafe.Pointer(bp)))) < 0x80 {
		*(*Tcl_UniChar)(unsafe.Pointer(bp + 4)) = Tcl_UniChar(uint8(*(*int8)(unsafe.Pointer(bp))))
	} else {
		XTcl_UtfToUniChar(tls, bp, bp+4)
	}
	return int8(*(*Tcl_UniChar)(unsafe.Pointer(bp + 4 /* ch */)))
}

//----------------------------------------------------------------------
//
// TclTrimRight --
//	Takes two counted strings in the Tcl encoding.  Conceptually
//	finds the sub string (offset) to trim from the right side of the
//	first string all characters found in the second string.
//
// Results:
//	The number of bytes to be removed from the end of the string.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclTrimRight(tls *libc.TLS, bytes uintptr, numBytes int32, trim uintptr, numTrim int32) int32 { /* tclUtil.c:1678:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var pp uintptr
	var p uintptr = bytes + uintptr(numBytes)
	// var ch1 int32 at bp, 4

	// var ch2 int32 at bp+4, 4

	// Empty strings -> nothing to do
	if numBytes == 0 || numTrim == 0 {
		return 0
	}

	// Outer loop: iterate over string to be trimmed.

	for ok := true; ok; ok = p > bytes {
		var q uintptr = trim
		var pInc int32 = 0
		var bytesLeft int32 = numTrim

		pp = func() uintptr {
			if p < bytes+uintptr(2) {
				return bytes
			}
			return func() uintptr {
				if int32(uint8(*(*int8)(unsafe.Pointer(p - uintptr(1))))) < 0x80 {
					return p - uintptr(1)
				}
				return XTcl_UtfPrev(tls, p, bytes)
			}()
		}()
		pp = func() uintptr {
			if pp < bytes+uintptr(2) {
				return bytes
			}
			return func() uintptr {
				if int32(uint8(*(*int8)(unsafe.Pointer(pp - uintptr(1))))) < 0x80 {
					return pp - uintptr(1)
				}
				return XTcl_UtfPrev(tls, pp, bytes)
			}()
		}()
		for ok1 := true; ok1; ok1 = pp+uintptr(pInc) < p {
			pp += uintptr(pInc)
			pInc = XTclUtfToUCS4(tls, pp, bp)
		}

		// Inner loop: scan trim string for match to current character.

		for ok2 := true; ok2; ok2 = bytesLeft != 0 {
			pInc = XTclUtfToUCS4(tls, q, bp+4)

			if *(*int32)(unsafe.Pointer(bp)) == *(*int32)(unsafe.Pointer(bp + 4)) {
				break
			}

			q += uintptr(pInc)
			bytesLeft = bytesLeft - pInc
		}

		if bytesLeft == 0 {
			// No match; trim task done; *p is last non-trimmed char.

			break
		}
		p = pp
	}

	return int32(int64(numBytes) - (int64(p)-int64(bytes))/1)
}

//----------------------------------------------------------------------
//
// TclTrimLeft --
//
//	Takes two counted strings in the Tcl encoding.  Conceptually
//	finds the sub string (offset) to trim from the left side of the
//	first string all characters found in the second string.
//
// Results:
//	The number of bytes to be removed from the start of the string.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclTrimLeft(tls *libc.TLS, bytes uintptr, numBytes int32, trim uintptr, numTrim int32) int32 { /* tclUtil.c:1760:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var p uintptr = bytes
	// var ch1 int32 at bp, 4

	// var ch2 int32 at bp+4, 4

	// Empty strings -> nothing to do
	if numBytes == 0 || numTrim == 0 {
		return 0
	}

	// Outer loop: iterate over string to be trimmed.

	for ok := true; ok; ok = numBytes > 0 {
		var pInc int32 = XTclUtfToUCS4(tls, p, bp)
		var q uintptr = trim
		var bytesLeft int32 = numTrim

		// Inner loop: scan trim string for match to current character.

		for ok1 := true; ok1; ok1 = bytesLeft != 0 {
			var qInc int32 = XTclUtfToUCS4(tls, q, bp+4)

			if *(*int32)(unsafe.Pointer(bp)) == *(*int32)(unsafe.Pointer(bp + 4)) {
				break
			}

			q += uintptr(qInc)
			bytesLeft = bytesLeft - qInc
		}

		if bytesLeft == 0 {
			// No match; trim task done; *p is first non-trimmed char.

			break
		}

		p += uintptr(pInc)
		numBytes = numBytes - pInc
	}

	return int32((int64(p) - int64(bytes)) / 1)
}

//----------------------------------------------------------------------
//
// TclTrim --
//	Finds the sub string (offset) to trim from both sides of the
//	first string all characters found in the second string.
//
// Results:
//	The number of bytes to be removed from the start of the string
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclTrim(tls *libc.TLS, bytes uintptr, numBytes int32, trim uintptr, numTrim int32, trimRightPtr uintptr) int32 { /* tclUtil.c:1834:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var trimLeft int32 = 0
	var trimRight int32 = 0

	// Empty strings -> nothing to do
	if numBytes > 0 && numTrim > 0 {

		// When bytes is NUL-terminated, returns 0 <= trimLeft <= numBytes
		trimLeft = XTclTrimLeft(tls, bytes, numBytes, trim, numTrim)
		numBytes = numBytes - trimLeft

		// If we did not trim the whole string, it starts with a character
		// that we will not trim. Skip over it.
		if numBytes > 0 {
			// var ch int32 at bp, 4

			var first uintptr = bytes + uintptr(trimLeft)
			bytes += uintptr(XTclUtfToUCS4(tls, first, bp))
			numBytes = int32(int64(numBytes) - (int64(bytes)-int64(first))/1)

			if numBytes > 0 {
				// When bytes is NUL-terminated, returns
				// 0 <= trimRight <= numBytes
				trimRight = XTclTrimRight(tls, bytes, numBytes, trim, numTrim)
			}
		}
	}
	*(*int32)(unsafe.Pointer(trimRightPtr)) = trimRight
	return trimLeft
}

//----------------------------------------------------------------------
//
// Tcl_Concat --
//
//	Concatenate a set of strings into a single large string.
//
// Results:
//	The return value is dynamically-allocated string containing a
//	concatenation of all the strings in argv, with spaces between the
//	original argv elements.
//
// Side effects:
//	Memory is allocated for the result; the caller is responsible for
//	freeing the memory.
//
//----------------------------------------------------------------------

// The whitespace characters trimmed during [concat] operations

func XTcl_Concat(tls *libc.TLS, argc int32, argv uintptr) uintptr { /* tclUtil.c:1895:6: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var i int32
	var needSpace int32 = 0
	var bytesNeeded int32 = 0
	var result uintptr
	var p uintptr

	// Dispose of the empty result corner case first to simplify later code.

	if argc == 0 {
		result = XTcl_Alloc(tls, uint32(1))
		*(*int8)(unsafe.Pointer(result)) = int8(0)
		return result
	}

	// First allocate the result buffer at the size required.

	for i = 0; i < argc; i++ {
		bytesNeeded = int32(Size_t(bytesNeeded) + libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))
		if bytesNeeded < 0 {
			XTcl_Panic(tls, ts+65433, 0)
		}
	}
	if bytesNeeded+argc-1 < 0 {
		// Panic test could be tighter, but not going to bother for this
		// legacy routine.

		XTcl_Panic(tls, ts+65433, 0)
	}

	// All element bytes + (argc - 1) spaces + 1 terminating NULL.

	result = XTcl_Alloc(tls, uint32(bytesNeeded+argc))

	p = result
	i = 0
	for ; i < argc; i++ {
		var triml int32
		// var trimr int32 at bp, 4

		var elemLength int32
		var element uintptr

		element = *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))
		elemLength = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))

		// Trim away the leading/trailing whitespace.
		triml = XTclTrim(tls, element, elemLength, ts+65476,
			int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)), bp)
		element += uintptr(triml)
		elemLength = elemLength - (triml + *(*int32)(unsafe.Pointer(bp)))

		// Do not permit trimming to expose a final backslash character.
		elemLength = elemLength + libc.Bool32(*(*int32)(unsafe.Pointer(bp)) != 0 && int32(*(*int8)(unsafe.Pointer(element + uintptr(elemLength-1)))) == '\\')

		// If we're left with empty element after trimming, do nothing.

		if elemLength == 0 {
			continue
		}

		// Append to the result with space if needed.

		if needSpace != 0 {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8(' ')
		}
		libc.Xmemcpy(tls, p, element, uint64(elemLength))
		p += uintptr(elemLength)
		needSpace = 1
	}
	*(*int8)(unsafe.Pointer(p)) = int8(0)
	return result
}

//----------------------------------------------------------------------
//
// Tcl_ConcatObj --
//
//	Concatenate the strings from a set of objects into a single string
//	object with spaces between the original strings.
//
// Results:
//	The return value is a new string object containing a concatenation of
//	the strings in objv. Its ref count is zero.
//
// Side effects:
//	A new object is created.
//
//----------------------------------------------------------------------

func XTcl_ConcatObj(tls *libc.TLS, objc int32, objv uintptr) uintptr { /* tclUtil.c:1995:9: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var i int32
	// var elemLength int32 at bp+16, 4

	var needSpace int32
	var bytesNeeded int32
	var element uintptr
	var objPtr uintptr
	var resPtr uintptr
	// var length int32 at bp, 4

	var _objPtr uintptr
	// var elemPtr uintptr at bp+8, 8

	var triml int32
	// var trimr int32 at bp+20, 4
	needSpace = 0
	bytesNeeded = 0

	// Check first to see if all the items are of list type or empty. If so,
	// we will concat them together as lists, and return a list object. This
	// is only valid when the lists are in canonical form.

	i = 0
__1:
	if !(i < objc) {
		goto __3
	}

	objPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return libc.Bool32((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes == uintptr(0) || (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objPtr + 32)))).FcanonicalFlag != 0)
		}
		return 0
	}() != 0) {
		goto __4
	}
	goto __2
__4:
	;
	XTcl_GetStringFromObj(tls, objPtr, bp)
	if !(*(*int32)(unsafe.Pointer(bp)) > 0) {
		goto __5
	}
	goto __3
__5:
	;
	goto __2
__2:
	i++
	goto __1
	goto __3
__3:
	;
	if !(i == objc) {
		goto __6
	}
	resPtr = uintptr(0)
	i = 0
__7:
	if !(i < objc) {
		goto __9
	}
	objPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength == 0) {
		goto __10
	}
	goto __8
__10:
	;
	if !(resPtr != 0) {
		goto __11
	}
	*(*uintptr)(unsafe.Pointer(bp + 8 /* elemPtr */)) = uintptr(0)

	XTcl_ListObjIndex(tls, uintptr(0), objPtr, 0, bp+8)
	if !(*(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0)) {
		goto __13
	}
	goto __8
__13:
	;
	if !(int32(*(*int8)(unsafe.Pointer(XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(bp + 8)))))) == '#' || TCL_OK !=
		XTcl_ListObjAppendList(tls, uintptr(0), resPtr, objPtr)) {
		goto __14
	}
	// Abandon ship!
__15:
	_objPtr = resPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __18
	}
	XTclFreeObj(tls, _objPtr)
__18:
	;
	goto __16
__16:
	if 0 != 0 {
		goto __15
	}
	goto __17
__17:
	;
	goto slow
__14:
	;
	goto __12
__11:
	resPtr = XTclListObjCopy(tls, uintptr(0), objPtr)
__12:
	;
	goto __8
__8:
	i++
	goto __7
	goto __9
__9:
	;
	if !!(resPtr != 0) {
		goto __19
	}
__20:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __23
	}
	XTclAllocateFreeObjects(tls)
__23:
	;
	resPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	(*Tcl_Obj)(unsafe.Pointer(resPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resPtr)).FtypePtr = uintptr(0)

__19:
	;
	return resPtr
__6:
	;

slow:
	// Something cannot be determined to be safe, so build the concatenation
	// the slow way, using the string representations.
	//
	// First try to pre-allocate the size required.

	i = 0
__24:
	if !(i < objc) {
		goto __26
	}
	element = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 16)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+16)
	}()
	bytesNeeded = bytesNeeded + *(*int32)(unsafe.Pointer(bp + 16))
	if !(bytesNeeded < 0) {
		goto __27
	}
	goto __26
__27:
	;
	goto __25
__25:
	i++
	goto __24
	goto __26
__26:
	;

	// Does not matter if this fails, will simply try later to build up the
	// string with each Append reallocating as needed with the usual string
	// append algorithm.  When that fails it will report the error.

__28:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __31
	}
	XTclAllocateFreeObjects(tls)
__31:
	;
	resPtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __29
__29:
	if 0 != 0 {
		goto __28
	}
	goto __30
__30:
	;
	(*Tcl_Obj)(unsafe.Pointer(resPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resPtr)).FtypePtr = uintptr(0)

	XTcl_AttemptSetObjLength(tls, resPtr, bytesNeeded+objc-1)
	XTcl_SetObjLength(tls, resPtr, 0)

	i = 0
__32:
	if !(i < objc) {
		goto __34
	}

	element = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 16)) = (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Flength
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+16)
	}()

	// Trim away the leading/trailing whitespace.
	triml = XTclTrim(tls, element, *(*int32)(unsafe.Pointer(bp + 16 /* elemLength */)), ts+65476,
		int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)), bp+20)
	element += uintptr(triml)
	*(*int32)(unsafe.Pointer(bp + 16 /* elemLength */)) -= triml + *(*int32)(unsafe.Pointer(bp + 20))

	// Do not permit trimming to expose a final backslash character.
	*(*int32)(unsafe.Pointer(bp + 16 /* elemLength */)) += libc.Bool32(*(*int32)(unsafe.Pointer(bp + 20)) != 0 && int32(*(*int8)(unsafe.Pointer(element + uintptr(*(*int32)(unsafe.Pointer(bp + 16))-1)))) == '\\')

	// If we're left with empty element after trimming, do nothing.

	if !(*(*int32)(unsafe.Pointer(bp + 16)) == 0) {
		goto __35
	}
	goto __33
__35:
	;

	// Append to the result with space if needed.

	if !(needSpace != 0) {
		goto __36
	}
	XTcl_AppendToObj(tls, resPtr, ts+14901, 1)
__36:
	;
	XTcl_AppendToObj(tls, resPtr, element, *(*int32)(unsafe.Pointer(bp + 16 /* elemLength */)))
	needSpace = 1
	goto __33
__33:
	i++
	goto __32
	goto __34
__34:
	;
	return resPtr
}

//----------------------------------------------------------------------
//
// Tcl_StringMatch --
//
//	See if a particular string matches a particular pattern.
//
// Results:
//	The return value is 1 if string matches pattern, and 0 otherwise. The
//	matching operation permits the following special characters in the
//	pattern: *?\[] (see the manual entry for details on what these mean).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_StringMatch(tls *libc.TLS, str uintptr, pattern uintptr) int32 { /* tclUtil.c:2132:1: */
	return XTcl_StringCaseMatch(tls, str, pattern, 0)
}

//----------------------------------------------------------------------
//
// Tcl_StringCaseMatch --
//
//	See if a particular string matches a particular pattern. Allows case
//	insensitivity.
//
// Results:
//	The return value is 1 if string matches pattern, and 0 otherwise. The
//	matching operation permits the following special characters in the
//	pattern: *?\[] (see the manual entry for details on what these mean).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_StringCaseMatch(tls *libc.TLS, str uintptr, pattern uintptr, nocase int32) int32 { /* tclUtil.c:2160:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var p int32
	var charLen int32
	*(*int32)(unsafe.Pointer(bp + 4 /* ch1 */)) = 0
	*(*int32)(unsafe.Pointer(bp /* ch2 */)) = 0

	for 1 != 0 {
		p = int32(*(*int8)(unsafe.Pointer(pattern)))

		// See if we're at the end of both the pattern and the string. If so,
		// we succeeded. If we're at the end of the pattern but not at the end
		// of the string, we failed.

		if p == 0 {
			return libc.Bool32(int32(*(*int8)(unsafe.Pointer(str))) == 0)
		}
		if int32(*(*int8)(unsafe.Pointer(str))) == 0 && p != '*' {
			return 0
		}

		// Check for a "*" as the next pattern character. It matches any
		// substring. We handle this by calling ourselves recursively for each
		// postfix of string, until either we match or we reach the end of the
		// string.

		if p == '*' {
			// Skip all successive *'s in the pattern

			for int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&pattern, 1)))) == '*' {
			}
			p = int32(*(*int8)(unsafe.Pointer(pattern)))
			if p == 0 {
				return 1
			}

			// This is a special case optimization for single-byte utf.

			if int32(uint8(*(*int8)(unsafe.Pointer(pattern)))) < 0x80 {
				*(*int32)(unsafe.Pointer(bp /* ch2 */)) = func() int32 {
					if nocase != 0 {
						return libc.Xtolower(tls, int32(uint8(*(*int8)(unsafe.Pointer(pattern)))))
					}
					return int32(uint8(*(*int8)(unsafe.Pointer(pattern))))
				}()
			} else {
				XTclUtfToUCS4(tls, pattern, bp)
				if nocase != 0 {
					*(*int32)(unsafe.Pointer(bp /* ch2 */)) = XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp /* ch2 */)))
				}
			}

			for 1 != 0 {
				// Optimization for matching - cruise through the string
				// quickly if the next char in the pattern isn't a special
				// character

				if p != '[' && p != '?' && p != '\\' {
					if nocase != 0 {
						for *(*int8)(unsafe.Pointer(str)) != 0 {
							charLen = XTclUtfToUCS4(tls, str, bp+4)
							if *(*int32)(unsafe.Pointer(bp)) == *(*int32)(unsafe.Pointer(bp + 4)) || *(*int32)(unsafe.Pointer(bp)) == XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp + 4))) {
								break
							}
							str += uintptr(charLen)
						}
					} else {
						// There's no point in trying to make this code
						// shorter, as the number of bytes you want to compare
						// each time is non-constant.

						for *(*int8)(unsafe.Pointer(str)) != 0 {
							charLen = XTclUtfToUCS4(tls, str, bp+4)
							if *(*int32)(unsafe.Pointer(bp)) == *(*int32)(unsafe.Pointer(bp + 4)) {
								break
							}
							str += uintptr(charLen)
						}
					}
				}
				if XTcl_StringCaseMatch(tls, str, pattern, nocase) != 0 {
					return 1
				}
				if int32(*(*int8)(unsafe.Pointer(str))) == 0 {
					return 0
				}
				str += uintptr(XTclUtfToUCS4(tls, str, bp+4))
			}
		}

		// Check for a "?" as the next pattern character. It matches any
		// single character.

		if p == '?' {
			pattern++
			str += uintptr(XTclUtfToUCS4(tls, str, bp+4))
			continue
		}

		// Check for a "[" as the next pattern character. It is followed by a
		// list of characters that are acceptable, or by a range (two
		// characters separated by "-").

		if p == '[' {
			*(*int32)(unsafe.Pointer(bp + 8 /* startChar */)) = 0
			*(*int32)(unsafe.Pointer(bp + 12 /* endChar */)) = 0

			pattern++
			if int32(uint8(*(*int8)(unsafe.Pointer(str)))) < 0x80 {
				*(*int32)(unsafe.Pointer(bp + 4 /* ch1 */)) = func() int32 {
					if nocase != 0 {
						return libc.Xtolower(tls, int32(uint8(*(*int8)(unsafe.Pointer(str)))))
					}
					return int32(uint8(*(*int8)(unsafe.Pointer(str))))
				}()
				str++
			} else {
				str += uintptr(XTclUtfToUCS4(tls, str, bp+4))
				if nocase != 0 {
					*(*int32)(unsafe.Pointer(bp + 4 /* ch1 */)) = XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp + 4 /* ch1 */)))
				}
			}
			for 1 != 0 {
				if int32(*(*int8)(unsafe.Pointer(pattern))) == ']' || int32(*(*int8)(unsafe.Pointer(pattern))) == 0 {
					return 0
				}
				if int32(uint8(*(*int8)(unsafe.Pointer(pattern)))) < 0x80 {
					*(*int32)(unsafe.Pointer(bp + 8 /* startChar */)) = func() int32 {
						if nocase != 0 {
							return libc.Xtolower(tls, int32(uint8(*(*int8)(unsafe.Pointer(pattern)))))
						}
						return int32(uint8(*(*int8)(unsafe.Pointer(pattern))))
					}()
					pattern++
				} else {
					pattern += uintptr(XTclUtfToUCS4(tls, pattern, bp+8))
					if nocase != 0 {
						*(*int32)(unsafe.Pointer(bp + 8 /* startChar */)) = XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp + 8 /* startChar */)))
					}
				}
				if int32(*(*int8)(unsafe.Pointer(pattern))) == '-' {
					pattern++
					if int32(*(*int8)(unsafe.Pointer(pattern))) == 0 {
						return 0
					}
					if int32(uint8(*(*int8)(unsafe.Pointer(pattern)))) < 0x80 {
						*(*int32)(unsafe.Pointer(bp + 12 /* endChar */)) = func() int32 {
							if nocase != 0 {
								return libc.Xtolower(tls, int32(uint8(*(*int8)(unsafe.Pointer(pattern)))))
							}
							return int32(uint8(*(*int8)(unsafe.Pointer(pattern))))
						}()
						pattern++
					} else {
						pattern += uintptr(XTclUtfToUCS4(tls, pattern, bp+12))
						if nocase != 0 {
							*(*int32)(unsafe.Pointer(bp + 12 /* endChar */)) = XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp + 12 /* endChar */)))
						}
					}
					if *(*int32)(unsafe.Pointer(bp + 8)) <= *(*int32)(unsafe.Pointer(bp + 4)) && *(*int32)(unsafe.Pointer(bp + 4)) <= *(*int32)(unsafe.Pointer(bp + 12)) ||
						*(*int32)(unsafe.Pointer(bp + 12)) <= *(*int32)(unsafe.Pointer(bp + 4)) && *(*int32)(unsafe.Pointer(bp + 4)) <= *(*int32)(unsafe.Pointer(bp + 8)) {
						// Matches ranges of form [a-z] or [z-a].

						break
					}
				} else if *(*int32)(unsafe.Pointer(bp + 8)) == *(*int32)(unsafe.Pointer(bp + 4)) {
					break
				}
			}
			// If we reach here, we matched. Need to move past closing ]
			for int32(*(*int8)(unsafe.Pointer(pattern))) != ']' {
				if int32(*(*int8)(unsafe.Pointer(pattern))) == 0 {
					// We ran out of pattern after matching something in
					// (unclosed!) brackets. So long as we ran out of string
					// at the same time, we have a match. Otherwise, not.
					return libc.Bool32(int32(*(*int8)(unsafe.Pointer(str))) == 0)
				}
				pattern++
			}
			pattern++
			continue
		}

		// If the next pattern character is '\', just strip off the '\' so we
		// do exact matching on the character that follows.

		if p == '\\' {
			pattern++
			if int32(*(*int8)(unsafe.Pointer(pattern))) == 0 {
				return 0
			}
		}

		// There's no special character. Just make sure that the next bytes of
		// each string match.

		str += uintptr(XTclUtfToUCS4(tls, str, bp+4))
		pattern += uintptr(XTclUtfToUCS4(tls, pattern, bp))
		if nocase != 0 {
			if XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp + 4))) != XTclUCS4ToLower(tls, *(*int32)(unsafe.Pointer(bp))) {
				return 0
			}
		} else if *(*int32)(unsafe.Pointer(bp + 4)) != *(*int32)(unsafe.Pointer(bp)) {
			return 0
		}
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// TclByteArrayMatch --
//
//	See if a particular string matches a particular pattern.  Does not
//	allow for case insensitivity.
//	Parallels tclUtf.c:TclUniCharMatch, adjusted for char* and sans nocase.
//
// Results:
//	The return value is 1 if string matches pattern, and 0 otherwise. The
//	matching operation permits the following special characters in the
//	pattern: *?\[] (see the manual entry for details on what these mean).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclByteArrayMatch(tls *libc.TLS, string uintptr, strLen int32, pattern uintptr, ptnLen int32, flags int32) int32 { /* tclUtil.c:2395:1: */
	var stringEnd uintptr
	var patternEnd uintptr
	var p uint8

	stringEnd = string + uintptr(strLen)
	patternEnd = pattern + uintptr(ptnLen)

	for 1 != 0 {
		// See if we're at the end of both the pattern and the string. If so,
		// we succeeded. If we're at the end of the pattern but not at the end
		// of the string, we failed.

		if pattern == patternEnd {
			return libc.Bool32(string == stringEnd)
		}
		p = *(*uint8)(unsafe.Pointer(pattern))
		if string == stringEnd && int32(p) != '*' {
			return 0
		}

		// Check for a "*" as the next pattern character. It matches any
		// substring. We handle this by skipping all the characters up to the
		// next matching one in the pattern, and then calling ourselves
		// recursively for each postfix of string, until either we match or we
		// reach the end of the string.

		if int32(p) == '*' {
			// Skip all successive *'s in the pattern.

			for libc.PreIncUintptr(&pattern, 1) < patternEnd && int32(*(*uint8)(unsafe.Pointer(pattern))) == '*' {
				// empty body
			}
			if pattern == patternEnd {
				return 1
			}
			p = *(*uint8)(unsafe.Pointer(pattern))
			for 1 != 0 {
				// Optimization for matching - cruise through the string
				// quickly if the next char in the pattern isn't a special
				// character.

				if int32(p) != '[' && int32(p) != '?' && int32(p) != '\\' {
					for string < stringEnd && int32(p) != int32(*(*uint8)(unsafe.Pointer(string))) {
						string++
					}
				}
				if XTclByteArrayMatch(tls, string, int32((int64(stringEnd)-int64(string))/1),
					pattern, int32((int64(patternEnd)-int64(pattern))/1), 0) != 0 {
					return 1
				}
				if string == stringEnd {
					return 0
				}
				string++
			}
		}

		// Check for a "?" as the next pattern character. It matches any
		// single character.

		if int32(p) == '?' {
			pattern++
			string++
			continue
		}

		// Check for a "[" as the next pattern character. It is followed by a
		// list of characters that are acceptable, or by a range (two
		// characters separated by "-").

		if int32(p) == '[' {
			var ch1 uint8
			var startChar uint8
			var endChar uint8

			pattern++
			ch1 = *(*uint8)(unsafe.Pointer(string))
			string++
			for 1 != 0 {
				if int32(*(*uint8)(unsafe.Pointer(pattern))) == ']' || pattern == patternEnd {
					return 0
				}
				startChar = *(*uint8)(unsafe.Pointer(pattern))
				pattern++
				if int32(*(*uint8)(unsafe.Pointer(pattern))) == '-' {
					pattern++
					if pattern == patternEnd {
						return 0
					}
					endChar = *(*uint8)(unsafe.Pointer(pattern))
					pattern++
					if int32(startChar) <= int32(ch1) && int32(ch1) <= int32(endChar) ||
						int32(endChar) <= int32(ch1) && int32(ch1) <= int32(startChar) {
						// Matches ranges of form [a-z] or [z-a].

						break
					}
				} else if int32(startChar) == int32(ch1) {
					break
				}
			}
			for int32(*(*uint8)(unsafe.Pointer(pattern))) != ']' {
				if pattern == patternEnd {
					pattern--
					break
				}
				pattern++
			}
			pattern++
			continue
		}

		// If the next pattern character is '\', just strip off the '\' so we
		// do exact matching on the character that follows.

		if int32(p) == '\\' {
			if libc.PreIncUintptr(&pattern, 1) == patternEnd {
				return 0
			}
		}

		// There's no special character. Just make sure that the next bytes of
		// each string match.

		if int32(*(*uint8)(unsafe.Pointer(string))) != int32(*(*uint8)(unsafe.Pointer(pattern))) {
			return 0
		}
		string++
		pattern++
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// TclStringMatchObj --
//
//	See if a particular string matches a particular pattern. Allows case
//	insensitivity. This is the generic multi-type handler for the various
//	matching algorithms.
//
// Results:
//	The return value is 1 if string matches pattern, and 0 otherwise. The
//	matching operation permits the following special characters in the
//	pattern: *?\[] (see the manual entry for details on what these mean).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclStringMatchObj(tls *libc.TLS, strObj uintptr, ptnObj uintptr, flags int32) int32 { /* tclUtil.c:2572:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var match int32
	// var length int32 at bp, 4

	// var plen int32 at bp+4, 4

	//
	//  Promote based on the type of incoming object.
	//  XXX: Currently doesn't take advantage of exact-ness that
	//  XXX: TclReToGlob tells us about
	//     trivial = nocase ? 0 : TclMatchIsTrivial(TclGetString(ptnObj));
	//

	if (*Tcl_Obj)(unsafe.Pointer(strObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclStringType)) || (*Tcl_Obj)(unsafe.Pointer(strObj)).FtypePtr == uintptr(0) {
		var udata uintptr
		var uptn uintptr

		udata = XTcl_GetUnicodeFromObj(tls, strObj, bp)
		uptn = XTcl_GetUnicodeFromObj(tls, ptnObj, bp+4)
		match = XTclUniCharMatch(tls, udata, *(*int32)(unsafe.Pointer(bp /* length */)), uptn, *(*int32)(unsafe.Pointer(bp + 4 /* plen */)), flags)
	} else if (*Tcl_Obj)(unsafe.Pointer(strObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(strObj)).Fbytes == uintptr(0) && ((*Tcl_Obj)(unsafe.Pointer(ptnObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclByteArrayType)) && (*Tcl_Obj)(unsafe.Pointer(ptnObj)).Fbytes == uintptr(0)) &&
		!(flags != 0) {
		var data uintptr
		var ptn uintptr

		data = XTcl_GetByteArrayFromObj(tls, strObj, bp)
		ptn = XTcl_GetByteArrayFromObj(tls, ptnObj, bp+4)
		match = XTclByteArrayMatch(tls, data, *(*int32)(unsafe.Pointer(bp /* length */)), ptn, *(*int32)(unsafe.Pointer(bp + 4 /* plen */)), 0)
	} else {
		match = XTcl_StringCaseMatch(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(strObj)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(strObj)).Fbytes
			}
			return XTcl_GetString(tls, strObj)
		}(),
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(ptnObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(ptnObj)).Fbytes
				}
				return XTcl_GetString(tls, ptnObj)
			}(), flags)
	}
	return match
}

//----------------------------------------------------------------------
//
// Tcl_DStringInit --
//
//	Initializes a dynamic string, discarding any previous contents of the
//	string (Tcl_DStringFree should have been called already if the dynamic
//	string was previously in use).
//
// Results:
//	None.
//
// Side effects:
//	The dynamic string is initialized to be empty.
//
//----------------------------------------------------------------------

func XTcl_DStringInit(tls *libc.TLS, dsPtr uintptr) { /* tclUtil.c:2626:1: */
	(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = dsPtr + 16 /* &.staticSpace */
	(*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength = 0
	(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = TCL_DSTRING_STATIC_SIZE
	*(*int8)(unsafe.Pointer(dsPtr + 16)) = int8(0)
}

//----------------------------------------------------------------------
//
// Tcl_DStringAppend --
//
//	Append more bytes to the current value of a dynamic string.
//
// Results:
//	The return value is a pointer to the dynamic string's new value.
//
// Side effects:
//	Length bytes from "bytes" (or all of "bytes" if length is less than
//	zero) are added to the current value of the string. Memory gets
//	reallocated if needed to accomodate the string's new size.
//
//----------------------------------------------------------------------

func XTcl_DStringAppend(tls *libc.TLS, dsPtr uintptr, bytes uintptr, length int32) uintptr { /* tclUtil.c:2653:6: */
	var newSize int32

	if length < 0 {
		length = int32(libc.Xstrlen(tls, bytes))
	}
	newSize = length + (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength

	// Allocate a larger buffer for the string if the current one isn't large
	// enough. Allocate extra space in the new buffer so that there will be
	// room to grow before we have to allocate again.

	if newSize >= (*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl {
		(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = newSize * 2
		if (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring == dsPtr+16 {
			var newString uintptr = XTcl_Alloc(tls, uint32((*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl))

			libc.Xmemcpy(tls, newString, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, uint64((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength))
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = newString
		} else {
			var offset int32 = -1

			// See [16896d49fd]
			if bytes >= (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring &&
				bytes <= (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring+uintptr((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength) {
				offset = int32((int64(bytes) - int64((*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring)) / 1)
			}

			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = XTcl_Realloc(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, uint32((*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl))

			if offset >= 0 {
				bytes = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring + uintptr(offset)
			}
		}
	}

	// Copy the new string into the buffer at the end of the old one.

	libc.Xmemcpy(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring+uintptr((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength), bytes, uint64(length))
	*(*int32)(unsafe.Pointer(dsPtr + 8)) += length
	*(*int8)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring + uintptr((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength))) = int8(0)
	return (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring
}

//----------------------------------------------------------------------
//
// TclDStringAppendObj, TclDStringAppendDString --
//
//	Simple wrappers round Tcl_DStringAppend that make it easier to append
//	from particular sources of strings.
//
//----------------------------------------------------------------------

func XTclDStringAppendObj(tls *libc.TLS, dsPtr uintptr, objPtr uintptr) uintptr { /* tclUtil.c:2720:6: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var length int32 at bp, 4

	var bytes uintptr = XTcl_GetStringFromObj(tls, objPtr, bp)

	return XTcl_DStringAppend(tls, dsPtr, bytes, *(*int32)(unsafe.Pointer(bp /* length */)))
}

func XTclDStringAppendDString(tls *libc.TLS, dsPtr uintptr, toAppendPtr uintptr) uintptr { /* tclUtil.c:2731:6: */
	return XTcl_DStringAppend(tls, dsPtr, (*Tcl_DString)(unsafe.Pointer(toAppendPtr)).Fstring,
		(*Tcl_DString)(unsafe.Pointer(toAppendPtr)).Flength)
}

//----------------------------------------------------------------------
//
// Tcl_DStringAppendElement --
//
//	Append a list element to the current value of a dynamic string.
//
// Results:
//	The return value is a pointer to the dynamic string's new value.
//
// Side effects:
//	String is reformatted as a list element and added to the current value
//	of the string. Memory gets reallocated if needed to accomodate the
//	string's new size.
//
//----------------------------------------------------------------------

func XTcl_DStringAppendElement(tls *libc.TLS, dsPtr uintptr, element uintptr) uintptr { /* tclUtil.c:2758:6: */
	bp := tls.Alloc(1)
	defer tls.Free(1)

	var dst uintptr = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring + uintptr((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength)
	var needSpace int32 = XTclNeedSpace(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, dst)
	*(*int8)(unsafe.Pointer(bp /* flags */)) = int8(0)
	var quoteHash int32 = 1
	var newSize int32

	if needSpace != 0 {
		// If we need a space to separate the new element from something
		// already ending the string, we're not appending the first element
		// of any list, so we need not quote any leading hash character.
		quoteHash = 0
	} else {
		// We don't need a space, maybe because there's some already there.
		// Checking whether we might be appending a first element is a bit
		// more involved.
		//
		// Backtrack over all whitespace.
		for libc.PreDecUintptr(&dst, 1) >= (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring && func() int32 {
			if int32(*(*int8)(unsafe.Pointer(dst))) > 0x20 {
				return 0
			}
			return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(dst))))
		}() != 0 {
		}

		// Call again without whitespace to confound things.
		quoteHash = libc.BoolInt32(!(XTclNeedSpace(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, dst+uintptr(1)) != 0))
	}
	if !(quoteHash != 0) {
		*(*int8)(unsafe.Pointer(bp /* flags */)) |= int8(TCL_DONT_QUOTE_HASH)
	}
	newSize = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength + needSpace + XTclScanElement(tls, element, -1, bp)
	if !(quoteHash != 0) {
		*(*int8)(unsafe.Pointer(bp /* flags */)) |= int8(TCL_DONT_QUOTE_HASH)
	}

	// Allocate a larger buffer for the string if the current one isn't large
	// enough. Allocate extra space in the new buffer so that there will be
	// room to grow before we have to allocate again. SPECIAL NOTE: must use
	// memcpy, not strcpy, to copy the string to a larger buffer, since there
	// may be embedded NULLs in the string in some cases.

	if newSize >= (*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl {
		(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = newSize * 2
		if (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring == dsPtr+16 {
			var newString uintptr = XTcl_Alloc(tls, uint32((*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl))

			libc.Xmemcpy(tls, newString, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, uint64((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength))
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = newString
		} else {
			var offset int32 = -1

			// See [16896d49fd]
			if element >= (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring &&
				element <= (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring+uintptr((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength) {
				offset = int32((int64(element) - int64((*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring)) / 1)
			}

			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = XTcl_Realloc(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, uint32((*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl))

			if offset >= 0 {
				element = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring + uintptr(offset)
			}
		}
	}
	dst = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring + uintptr((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength)

	// Convert the new string to a list element and copy it into the buffer at
	// the end, with a space, if needed.

	if needSpace != 0 {
		*(*int8)(unsafe.Pointer(dst)) = int8(' ')
		dst++
		(*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength++
	}

	*(*int32)(unsafe.Pointer(dsPtr + 8)) += XTclConvertElement(tls, element, -1, dst, int32(*(*int8)(unsafe.Pointer(bp))))
	*(*int8)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring + uintptr((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength))) = int8(0)
	return (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring
}

//----------------------------------------------------------------------
//
// Tcl_DStringSetLength --
//
//	Change the length of a dynamic string. This can cause the string to
//	either grow or shrink, depending on the value of length.
//
// Results:
//	None.
//
// Side effects:
//	The length of dsPtr is changed to length and a null byte is stored at
//	that position in the string. If length is larger than the space
//	allocated for dsPtr, then a panic occurs.
//
//----------------------------------------------------------------------

func XTcl_DStringSetLength(tls *libc.TLS, dsPtr uintptr, length int32) { /* tclUtil.c:2867:1: */
	var newsize int32

	if length < 0 {
		length = 0
	}
	if length >= (*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl {
		// There are two interesting cases here. In the first case, the user
		// may be trying to allocate a large buffer of a specific size. It
		// would be wasteful to overallocate that buffer, so we just allocate
		// enough for the requested size plus the trailing null byte. In the
		// second case, we are growing the buffer incrementally, so we need
		// behavior similar to Tcl_DStringAppend. The requested length will
		// usually be a small delta above the current spaceAvl, so we'll end
		// up doubling the old size. This won't grow the buffer quite as
		// quickly, but it should be close enough.

		newsize = (*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl * 2
		if length < newsize {
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = newsize
		} else {
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = length + 1
		}
		if (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring == dsPtr+16 {
			var newString uintptr = XTcl_Alloc(tls, uint32((*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl))

			libc.Xmemcpy(tls, newString, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, uint64((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength))
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = newString
		} else {
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = XTcl_Realloc(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, uint32((*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl))
		}
	}
	(*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength = length
	*(*int8)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring + uintptr(length))) = int8(0)
}

//----------------------------------------------------------------------
//
// Tcl_DStringFree --
//
//	Frees up any memory allocated for the dynamic string and reinitializes
//	the string to an empty state.
//
// Results:
//	None.
//
// Side effects:
//	The previous contents of the dynamic string are lost, and the new
//	value is an empty string.
//
//----------------------------------------------------------------------

func XTcl_DStringFree(tls *libc.TLS, dsPtr uintptr) { /* tclUtil.c:2927:1: */
	if (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring != dsPtr+16 {
		XTclpFree(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring)
	}
	(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = dsPtr + 16 /* &.staticSpace */
	(*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength = 0
	(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = TCL_DSTRING_STATIC_SIZE
	*(*int8)(unsafe.Pointer(dsPtr + 16)) = int8(0)
}

//----------------------------------------------------------------------
//
// Tcl_DStringResult --
//
//	This function moves the value of a dynamic string into an interpreter
//	as its string result. Afterwards, the dynamic string is reset to an
//	empty string.
//
// Results:
//	None.
//
// Side effects:
//	The string is "moved" to interp's result, and any existing string
//	result for interp is freed. dsPtr is reinitialized to an empty string.
//
//----------------------------------------------------------------------

func XTcl_DStringResult(tls *libc.TLS, interp uintptr, dsPtr uintptr) { /* tclUtil.c:2959:1: */
	XTcl_ResetResult(tls, interp)
	XTcl_SetObjResult(tls, interp, XTclDStringToObj(tls, dsPtr))
}

//----------------------------------------------------------------------
//
// Tcl_DStringGetResult --
//
//	This function moves an interpreter's result into a dynamic string.
//
// Results:
//	None.
//
// Side effects:
//	The interpreter's string result is cleared, and the previous contents
//	of dsPtr are freed.
//
//	If the string result is empty, the object result is moved to the
//	string result, then the object result is reset.
//
//----------------------------------------------------------------------

func XTcl_DStringGetResult(tls *libc.TLS, interp uintptr, dsPtr uintptr) { /* tclUtil.c:2989:1: */
	var iPtr uintptr = interp

	if (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring != dsPtr+16 {
		XTclpFree(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring)
	}

	//
	//  Do more efficient transfer when we know the result is a Tcl_Obj. When
	//  there's no string result, we only have to deal with two cases:
	//
	//   1. When the string rep is the empty string, when we don't copy but
	//      instead use the staticSpace in the DString to hold an empty string.
	//
	//      *  2. When the string rep is not there or there's a real string rep, when
	//      *     we use Tcl_GetString to fetch (or generate) the string rep - which
	//      *     we know to have been allocated with ckalloc() - and use it to
	//      *     populate the DString space. Then, we free the internal rep. and set
	//      *     the object's string representation back to the canonical empty
	//      *     string.
	//

	if !(int32(*(*int8)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).Fresult))) != 0) && (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr != 0 &&
		!((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).FrefCount > 1) {
		if (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).Fbytes == XtclEmptyStringRep {
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = dsPtr + 16 /* &.staticSpace */
			*(*int8)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring)) = int8(0)
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength = 0
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = TCL_DSTRING_STATIC_SIZE
		} else {
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).Fbytes
				}
				return XTcl_GetString(tls, (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)
			}()
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength = (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).Flength
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength + 1
			if (*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).FtypePtr != uintptr(0) {
				if (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0) {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)
				}
				(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).FtypePtr = uintptr(0)
			}

			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FobjResultPtr)).Flength = 0
		}
		return
	}

	// If the string result is empty, move the object result to the string
	// result, then reset the object result.

	XTcl_GetStringResult(tls, interp)

	(*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength = int32(libc.Xstrlen(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult))
	if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc != uintptr(0) {
		if (*Interp)(unsafe.Pointer(iPtr)).FfreeProc == uintptr(3) {
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = (*Interp)(unsafe.Pointer(iPtr)).Fresult
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength + 1
		} else {
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = XTcl_Alloc(tls, uint32((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength+1))
			libc.Xmemcpy(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, (*Interp)(unsafe.Pointer(iPtr)).Fresult, uint64((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength+1))
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Interp)(unsafe.Pointer(iPtr)).FfreeProc})).f(tls, (*Interp)(unsafe.Pointer(iPtr)).Fresult)
		}
		(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength + 1
		(*Interp)(unsafe.Pointer(iPtr)).FfreeProc = uintptr(0)
	} else {
		if (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength < TCL_DSTRING_STATIC_SIZE {
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = dsPtr + 16 /* &.staticSpace */
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = TCL_DSTRING_STATIC_SIZE
		} else {
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = XTcl_Alloc(tls, uint32((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength+1))
			(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength + 1
		}
		libc.Xmemcpy(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, (*Interp)(unsafe.Pointer(iPtr)).Fresult, uint64((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength+1))
	}

	(*Interp)(unsafe.Pointer(iPtr)).Fresult = iPtr + 464 /* &.resultSpace */
	*(*int8)(unsafe.Pointer(iPtr + 464)) = int8(0)
}

//----------------------------------------------------------------------
//
// TclDStringToObj --
//
//	This function moves a dynamic string's contents to a new Tcl_Obj. Be
//	aware that this function does *not* check that the encoding of the
//	contents of the dynamic string is correct; this is the caller's
//	responsibility to enforce.
//
// Results:
//	The newly-allocated untyped (i.e., typePtr==NULL) Tcl_Obj with a
//	reference count of zero.
//
// Side effects:
//	The string is "moved" to the object. dsPtr is reinitialized to an
//	empty string; it does not need to be Tcl_DStringFree'd after this if
//	not used further.
//
//----------------------------------------------------------------------

func XTclDStringToObj(tls *libc.TLS, dsPtr uintptr) uintptr { /* tclUtil.c:3089:9: */
	var result uintptr

	if (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring == dsPtr+16 {
		if (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength == 0 {
			for ok := true; ok; ok = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				result = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(result)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(result)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(result)).Flength = 0
			(*Tcl_Obj)(unsafe.Pointer(result)).FtypePtr = uintptr(0)
			{
			}

		} else {
			// Static buffer, so must copy.

			for ok1 := true; ok1; ok1 = 0 != 0 {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					if XtclFreeObjList == uintptr(0) {
						XTclAllocateFreeObjects(tls)
					}
					result = XtclFreeObjList
					XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
				}
				(*Tcl_Obj)(unsafe.Pointer(result)).FrefCount = 0
				if (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength == 0 {
					(*Tcl_Obj)(unsafe.Pointer(result)).Fbytes = XtclEmptyStringRep
					(*Tcl_Obj)(unsafe.Pointer(result)).Flength = 0
				} else {
					(*Tcl_Obj)(unsafe.Pointer(result)).Fbytes = XTcl_Alloc(tls, uint32((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength+1))
					libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(result)).Fbytes, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, uint64((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength))
					*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(result)).Fbytes + uintptr((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength))) = int8(0)
					(*Tcl_Obj)(unsafe.Pointer(result)).Flength = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength
				}
				(*Tcl_Obj)(unsafe.Pointer(result)).FtypePtr = uintptr(0)
				{
				}
			}
		}
	} else {
		// Dynamic buffer, so transfer ownership and reset.

		for ok3 := true; ok3; ok3 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			result = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(result)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(result)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(result)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(result)).FtypePtr = uintptr(0)
		{
		}

		(*Tcl_Obj)(unsafe.Pointer(result)).Fbytes = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring
		(*Tcl_Obj)(unsafe.Pointer(result)).Flength = (*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength
	}

	// Re-establish the DString as empty with no buffer allocated.

	(*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring = dsPtr + 16 /* &.staticSpace */
	(*Tcl_DString)(unsafe.Pointer(dsPtr)).FspaceAvl = TCL_DSTRING_STATIC_SIZE
	(*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength = 0
	*(*int8)(unsafe.Pointer(dsPtr + 16)) = int8(0)

	return result
}

//----------------------------------------------------------------------
//
// Tcl_DStringStartSublist --
//
//	This function adds the necessary information to a dynamic string
//	(e.g. " {") to start a sublist. Future element appends will be in the
//	sublist rather than the main list.
//
// Results:
//	None.
//
// Side effects:
//	Characters get added to the dynamic string.
//
//----------------------------------------------------------------------

func XTcl_DStringStartSublist(tls *libc.TLS, dsPtr uintptr) { /* tclUtil.c:3146:1: */
	if XTclNeedSpace(tls, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring+uintptr((*Tcl_DString)(unsafe.Pointer(dsPtr)).Flength)) != 0 {
		XTcl_DStringAppend(tls, dsPtr, ts+65483, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
	} else {
		XTcl_DStringAppend(tls, dsPtr, ts+65486, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
	}
}

//----------------------------------------------------------------------
//
// Tcl_DStringEndSublist --
//
//	This function adds the necessary characters to a dynamic string to end
//	a sublist (e.g. "}"). Future element appends will be in the enclosing
//	(sub)list rather than the current sublist.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_DStringEndSublist(tls *libc.TLS, dsPtr uintptr) { /* tclUtil.c:3175:1: */
	XTcl_DStringAppend(tls, dsPtr, ts+912, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
}

//----------------------------------------------------------------------
//
// Tcl_PrintDouble --
//
//	Given a floating-point value, this function converts it to an ASCII
//	string using.
//
// Results:
//	The ASCII equivalent of "value" is written at "dst". It is written
//	using the current precision, and it is guaranteed to contain a decimal
//	point or exponent, so that it looks like a floating-point value and
//	not an integer.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_PrintDouble(tls *libc.TLS, interp uintptr, value float64, dst uintptr) { /* tclUtil.c:3202:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var p uintptr
	var c int8
	// var exponent int32 at bp+16, 4

	// var signum int32 at bp+20, 4

	var digits uintptr
	// var end uintptr at bp+24, 8

	var precisionPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&precisionKey)), int32(unsafe.Sizeof(int32(0))))

	// Handle NaN.

	if libc.X__isnan(tls, value) != 0 {
		XTclFormatNaN(tls, value, dst)
		return
	}

	// Handle infinities.

	if value > 1.79769313486231570814527423731704357e+308 || value < -1.79769313486231570814527423731704357e+308 {
		// Remember to copy the terminating NUL too.

		if value < float64(0) {
			libc.Xmemcpy(tls, dst, ts+65488, uint64(5))
		} else {
			libc.Xmemcpy(tls, dst, ts+65493, uint64(4))
		}
		return
	}

	// Ordinary (normal and denormal) values.

	if *(*int32)(unsafe.Pointer(precisionPtr)) == 0 {
		digits = XTclDoubleDigits(tls, value, -1, TCL_DD_SHORTEST,
			bp+16, bp+20, bp+24)
	} else {
		// There are at least two possible interpretations for tcl_precision.
		//
		// The first is, "choose the decimal representation having
		// $tcl_precision digits of significance that is nearest to the given
		// number, breaking ties by rounding to even, and then trimming
		// trailing zeros." This gives the greatest possible precision in the
		// decimal string, but offers the anomaly that [expr 0.1] will be
		// "0.10000000000000001".
		//
		// The second is "choose the decimal representation having at most
		// $tcl_precision digits of significance that is nearest to the given
		// number. If no such representation converts exactly to the given
		// number, choose the one that is closest, breaking ties by rounding
		// to even. If more than one such representation converts exactly to
		// the given number, choose the shortest, breaking ties in favour of
		// the nearest, breaking remaining ties in favour of the one ending in
		// an even digit."
		//
		// Tcl 8.4 implements the first of these, which gives rise to
		// anomalies in formatting:
		//
		//	% expr 0.1
		//	0.10000000000000001
		//	% expr 0.01
		//	0.01
		//	% expr 1e-7
		//	9.9999999999999995e-08
		//
		// For human readability, it appears better to choose the second rule,
		// and let [expr 0.1] return 0.1. But for 8.4 compatibility, we prefer
		// the first (the recommended zero value for tcl_precision avoids the
		// problem entirely).
		//
		// Uncomment TCL_DD_SHORTEN_FLAG in the next call to prefer the method
		// that allows floating point values to be shortened if it can be done
		// without loss of precision.

		digits = XTclDoubleDigits(tls, value, *(*int32)(unsafe.Pointer(precisionPtr)),
			TCL_DD_E_FORMAT,
			bp+16, bp+20, bp+24)
	}
	if *(*int32)(unsafe.Pointer(bp + 20)) != 0 {
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('-')
	}
	p = digits
	if *(*int32)(unsafe.Pointer(bp + 16)) < -4 || *(*int32)(unsafe.Pointer(bp + 16)) > 16 {
		// E format for numbers < 1e-3 or >= 1e17.

		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))
		c = *(*int8)(unsafe.Pointer(p))
		if int32(c) != 0 {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('.')
			for int32(c) != 0 {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = c
				c = *(*int8)(unsafe.Pointer(libc.PreIncUintptr(&p, 1)))
			}
		}

		// Tcl 8.4 appears to format with at least a two-digit exponent;
		// preserve that behaviour when tcl_precision != 0

		if *(*int32)(unsafe.Pointer(precisionPtr)) == 0 {
			libc.Xsprintf(tls, dst, ts+65497, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 16 /* exponent */))))
		} else {
			libc.Xsprintf(tls, dst, ts+65502, libc.VaList(bp+8, *(*int32)(unsafe.Pointer(bp + 16 /* exponent */))))
		}
	} else {
		// F format for others.

		if *(*int32)(unsafe.Pointer(bp + 16)) < 0 {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('0')
		}
		c = *(*int8)(unsafe.Pointer(p))
		for libc.PostDecInt32(&*(*int32)(unsafe.Pointer(bp + 16)), 1) >= 0 {
			if int32(c) != 0 {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = c
				c = *(*int8)(unsafe.Pointer(libc.PreIncUintptr(&p, 1)))
			} else {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('0')
			}
		}
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('.')
		if int32(c) == 0 {
			*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('0')
		} else {
			for libc.PreIncInt32(&*(*int32)(unsafe.Pointer(bp + 16)), 1) < -1 {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8('0')
			}
			for int32(c) != 0 {
				*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = c
				c = *(*int8)(unsafe.Pointer(libc.PreIncUintptr(&p, 1)))
			}
		}
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dst, 1))) = int8(0)
	}
	XTclpFree(tls, digits)
}

//----------------------------------------------------------------------
//
// TclPrecTraceProc --
//
//	This function is invoked whenever the variable "tcl_precision" is
//	written.
//
// Results:
//	Returns NULL if all went well, or an error message if the new value
//	for the variable doesn't make sense.
//
// Side effects:
//	If the new value doesn't make sense then this function undoes the
//	effect of the variable modification. Otherwise it modifies the format
//	string that's used by Tcl_PrintDouble.
//
//----------------------------------------------------------------------

func XTclPrecTraceProc(tls *libc.TLS, clientData ClientData, interp uintptr, name1 uintptr, name2 uintptr, flags int32) uintptr { /* tclUtil.c:3377:6: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var value uintptr
	// var prec int32 at bp, 4

	var precisionPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&precisionKey)), int32(unsafe.Sizeof(int32(0))))

	// If the variable is unset, then recreate the trace.

	if flags&TCL_TRACE_UNSETS != 0 {
		if flags&TCL_TRACE_DESTROYED != 0 && !(XTcl_InterpDeleted(tls, interp) != 0) {
			XTcl_TraceVar2(tls, interp, name1, name2,
				TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|
					TCL_TRACE_UNSETS, *(*uintptr)(unsafe.Pointer(&struct {
					f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr
				}{XTclPrecTraceProc})), clientData)
		}
		return uintptr(0)
	}

	// When the variable is read, reset its value from our shared value. This
	// is needed in case the variable was modified in some other interpreter
	// so that this interpreter's value is out of date.

	if flags&TCL_TRACE_READS != 0 {
		XTcl_SetVar2Ex(tls, interp, name1, name2, XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(precisionPtr))),
			flags&TCL_GLOBAL_ONLY)
		return uintptr(0)
	}

	// The variable is being written. Check the new value and disallow it if
	// it isn't reasonable or if this is a safe interpreter (we don't want
	// safe interpreters messing up the precision of other interpreters).

	if XTcl_IsSafe(tls, interp) != 0 {
		return ts + 65509 /* "can't modify pre..." */
	}
	value = XTcl_GetVar2Ex(tls, interp, name1, name2, flags&TCL_GLOBAL_ONLY)
	if value == uintptr(0) ||
		XTcl_GetIntFromObj(tls, uintptr(0), value, bp) != TCL_OK ||
		*(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > TCL_MAX_PREC {
		return ts + 65556 /* "improper value f..." */
	}
	*(*int32)(unsafe.Pointer(precisionPtr)) = *(*int32)(unsafe.Pointer(bp /* prec */))
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclNeedSpace --
//
//	This function checks to see whether it is appropriate to add a space
//	before appending a new list element to an existing string.
//
// Results:
//	The return value is 1 if a space is appropriate, 0 otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclNeedSpace(tls *libc.TLS, start uintptr, end uintptr) int32 { /* tclUtil.c:3452:1: */
	//
	//  A space is needed unless either:
	//  (a) we're at the start of the string, or
	//
	//  (NOTE: This check is now absorbed into the loop below.)
	//
	//
	//     if (end == start) {
	// 	return 0;
	//     }
	//
	//      *
	//

	//
	//  (b) we're at the start of a nested list-element, quoted with an open
	// 	   curly brace; we can be nested arbitrarily deep, so long as the
	// 	   first curly brace starts an element, so backtrack over open curly
	// 	   braces that are trailing characters of the string; and
	//
	//   (NOTE: Every character our parser is looking for is a proper
	//   single-byte encoding of an ASCII value. It does not accept
	//   overlong encodings.  Given that, there's no benefit using
	//   Tcl_UtfPrev. If it would find what we seek, so would byte-by-byte
	//   backward scan. Save routine call overhead and risk of wrong
	//   results should the behavior of Tcl_UtfPrev change in unexpected ways.
	// 	Reconsider this if we ever start treating non-ASCII Unicode
	// 	characters as meaningful list syntax, expanded Unicode spaces as
	// 	element separators, for example.)
	//
	//
	//     end = Tcl_UtfPrev(end, start);
	//     while (*end == '{') {
	//         if (end == start) {
	//             return 0;
	//         }
	//         end = Tcl_UtfPrev(end, start);
	//     }
	//
	//      *
	//

	for libc.PreDecUintptr(&end, 1) >= start && int32(*(*int8)(unsafe.Pointer(end))) == '{' {
	}
	if end < start {
		return 0
	}

	// (c) the trailing character of the string is already a list-element
	//	   separator, Use the same testing routine as TclFindElement to
	//	   enforce consistency.

	if func() int32 {
		if int32(*(*int8)(unsafe.Pointer(end))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(end))))
	}() != 0 {
		var result int32 = 0

		// Trailing whitespace might be part of a backslash escape
		// sequence. Handle that possibility.

		for libc.PreDecUintptr(&end, 1) >= start && int32(*(*int8)(unsafe.Pointer(end))) == '\\' {
			result = libc.BoolInt32(!(result != 0))
		}
		return result
	}
	return 1
}

//----------------------------------------------------------------------
//
// TclFormatInt --
//
//	This procedure formats an integer into a sequence of decimal digit
//	characters in a buffer. If the integer is negative, a minus sign is
//	inserted at the start of the buffer. A null character is inserted at
//	the end of the formatted characters. It is the caller's responsibility
//	to ensure that enough storage is available. This procedure has the
//	effect of sprintf(buffer, "%ld", n) but is faster as proven in
//	benchmarks.  This is key to UpdateStringOfInt, which is a common path
//	for a lot of code (e.g. int-indexed arrays).
//
// Results:
//	An integer representing the number of characters formatted, not
//	including the terminating \0.
//
// Side effects:
//	The formatted characters are written into the storage pointer to by
//	the "buffer" argument.
//
//----------------------------------------------------------------------

func XTclFormatInt(tls *libc.TLS, buffer uintptr, n int32) int32 { /* tclUtil.c:3553:1: */
	var intVal uint32
	var i int32 = 0
	var numFormatted int32
	var j int32

	// Generate the characters of the result backwards in the buffer.

	intVal = func() uint32 {
		if n < 0 {
			return -uint32(n)
		}
		return uint32(n)
	}()
	for ok := true; ok; ok = intVal > uint32(0) {
		*(*int8)(unsafe.Pointer(buffer + uintptr(libc.PostIncInt32(&i, 1)))) = digits[intVal%uint32(10)]
		intVal = intVal / uint32(10)
	}
	if n < 0 {
		*(*int8)(unsafe.Pointer(buffer + uintptr(libc.PostIncInt32(&i, 1)))) = int8('-')
	}
	*(*int8)(unsafe.Pointer(buffer + uintptr(i))) = int8(0)
	numFormatted = libc.PostDecInt32(&i, 1)

	// Now reverse the characters.

	j = 0
__1:
	if !(j < i) {
		goto __3
	}
	{
		var tmp int8 = *(*int8)(unsafe.Pointer(buffer + uintptr(i)))

		*(*int8)(unsafe.Pointer(buffer + uintptr(i))) = *(*int8)(unsafe.Pointer(buffer + uintptr(j)))
		*(*int8)(unsafe.Pointer(buffer + uintptr(j))) = tmp

	}
	goto __2
__2:
	j++
	i--
	goto __1
	goto __3
__3:
	;
	return numFormatted
}

var digits = *(*[11]int8)(unsafe.Pointer(ts + 65585)) /* tclUtil.c:3561:23 */

//----------------------------------------------------------------------
//
// TclGetIntForIndex --
//
//	Provides an integer corresponding to the list index held in a Tcl
//	object. The string value 'objPtr' is expected have the format
//	integer([+-]integer)? or end([+-]integer)?.
//
// Value
// 	TCL_OK
//
// 	    The index is stored at the address given by by 'indexPtr'. If
// 	    'objPtr' has the value "end", the value stored is 'endValue'.
//
// 	TCL_ERROR
//
// 	    The value of 'objPtr' does not have one of the expected formats. If
// 	    'interp' is non-NULL, an error message is left in the interpreter's
// 	    result object.
//
// Effect
//
// 	The object referenced by 'objPtr' is converted, as needed, to an
// 	integer, wide integer, or end-based-index object.
//
//----------------------------------------------------------------------

func XTclGetIntForIndex(tls *libc.TLS, interp uintptr, objPtr uintptr, endValue int32, indexPtr uintptr) int32 { /* tclUtil.c:3621:1: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	// var length int32 at bp+40, 4

	// var opPtr uintptr at bp+48, 8

	var bytes uintptr
	var code int32
	// var first int32 at bp+56, 4

	// var second int32 at bp+60, 4

	var savedOp int8

	if !(func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(indexPtr)) = int32(*(*int32)(unsafe.Pointer(objPtr + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, uintptr(0), objPtr, indexPtr)
	}() == TCL_OK) {
		goto __1
	}
	return TCL_OK
__1:
	;

	if !(sGetEndOffsetFromObj(tls, objPtr, endValue, indexPtr) == TCL_OK) {
		goto __2
	}
	return TCL_OK
__2:
	;

	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 40)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+40)
	}()

	// Leading whitespace is acceptable in an index.

__3:
	if !(*(*int32)(unsafe.Pointer(bp + 40)) != 0 && func() int32 {
		if int32(*(*int8)(unsafe.Pointer(bytes))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(bytes))))
	}() != 0) {
		goto __4
	}
	bytes++
	*(*int32)(unsafe.Pointer(bp + 40 /* length */))--
	goto __3
__4:
	;

	if !(XTclParseNumber(tls, uintptr(0), uintptr(0), uintptr(0), bytes, *(*int32)(unsafe.Pointer(bp + 40)), bp+48,
		TCL_PARSE_INTEGER_ONLY|TCL_PARSE_NO_WHITESPACE) == TCL_OK) {
		goto __5
	}
	savedOp = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* opPtr */))))

	if !(int32(savedOp) != '+' && int32(savedOp) != '-') {
		goto __6
	}
	goto parseError
__6:
	;
	if !(func() int32 {
		if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)) + 1))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48)) + 1))))
	}() != 0) {
		goto __7
	}
	goto parseError
__7:
	;
	*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* opPtr */)))) = int8(0)
	code = XTcl_GetInt(tls, interp, bytes, bp+56)
	*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* opPtr */)))) = savedOp
	if !(code == TCL_ERROR) {
		goto __8
	}
	goto parseError
__8:
	;
	if !(TCL_ERROR == XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 48))+uintptr(1), bp+60)) {
		goto __9
	}
	goto parseError
__9:
	;
	if !(int32(savedOp) == '+') {
		goto __10
	}
	*(*int32)(unsafe.Pointer(indexPtr)) = *(*int32)(unsafe.Pointer(bp + 56)) + *(*int32)(unsafe.Pointer(bp + 60))
	goto __11
__10:
	*(*int32)(unsafe.Pointer(indexPtr)) = *(*int32)(unsafe.Pointer(bp + 56)) - *(*int32)(unsafe.Pointer(bp + 60))
__11:
	;
	return TCL_OK
__5:
	;

	// Report a parse error.

parseError:
	if !(interp != uintptr(0)) {
		goto __12
	}
	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+65596, libc.VaList(bp, bytes)))
	if !!(libc.Xstrncmp(tls, bytes, ts+65661, uint64(4)) != 0) {
		goto __13
	}
	bytes += uintptr(4)
__13:
	;
	XTclCheckBadOctal(tls, interp, bytes)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+16812, uintptr(0)))
__12:
	;

	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// UpdateStringOfEndOffset --
//
//	Update the string rep of a Tcl object holding an "end-offset"
//	expression.
//
// Results:
//	None.
//
// Side effects:
//	Stores a valid string in the object's string rep.
//
// This function does NOT free any earlier string rep. If it is called on an
// object that already has a valid string rep, it will leak memory.
//
//----------------------------------------------------------------------

func sUpdateStringOfEndOffset(tls *libc.TLS, objPtr uintptr) { /* tclUtil.c:3724:1: */
	bp := tls.Alloc(29)
	defer tls.Free(29)

	// var buffer [29]int8 at bp, 29

	var len int32 = 3

	libc.Xmemcpy(tls, bp, ts+19372, uint64(4))
	if *(*int32)(unsafe.Pointer(objPtr + 32)) != 0 {
		*(*int8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&len, 1)))) = int8('-')
		len = len + XTclFormatInt(tls, bp+uintptr(len), -*(*int32)(unsafe.Pointer(objPtr + 32)))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XTcl_Alloc(tls, uint32(len+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes, bp, uint64(len+1))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = len
}

//----------------------------------------------------------------------
//
// GetEndOffsetFromObj --
//
//	Look for a string of the form "end[+-]offset" and convert it to an
//	internal representation holding the offset.
//
// Results:
//	Tcl return code.
//
// Side effects:
//	May store a Tcl_ObjType.
//
//----------------------------------------------------------------------

func sGetEndOffsetFromObj(tls *libc.TLS, objPtr uintptr, endValue int32, indexPtr uintptr) int32 { /* tclUtil.c:3758:1: */
	if sSetEndOffsetFromAny(tls, uintptr(0), objPtr) != TCL_OK {
		return TCL_ERROR
	}

	// TODO: Handle overflow cases sensibly
	*(*int32)(unsafe.Pointer(indexPtr)) = endValue + int32(*(*int32)(unsafe.Pointer(objPtr + 32)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// SetEndOffsetFromAny --
//
//	Look for a string of the form "end[+-]offset" and convert it to an
//	internal representation holding the offset.
//
// Results:
//	Returns TCL_OK if ok, TCL_ERROR if the string was badly formed.
//
// Side effects:
//	If interp is not NULL, stores an error message in the interpreter
//	result.
//
//----------------------------------------------------------------------

func sSetEndOffsetFromAny(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclUtil.c:3794:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	// var offset int32 at bp+84, 4
	// Offset in the "end-offset" expression
	var bytes uintptr // String rep of the object
	// var length int32 at bp+80, 4
	// Length of the object's string rep

	// If it's already the right type, we're fine.

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclEndOffsetType))) {
		goto __1
	}
	return TCL_OK
__1:
	;

	// Check for a string rep of the right form.

	bytes = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 80)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, objPtr, bp+80)
	}()
	if !(int32(*(*int8)(unsafe.Pointer(bytes))) != 'e' || libc.Xstrncmp(tls, bytes, ts+19372,
		func() uint64 {
			if *(*int32)(unsafe.Pointer(bp + 80)) > 3 {
				return uint64(3)
			}
			return uint64(*(*int32)(unsafe.Pointer(bp + 80)))
		}()) != 0) {
		goto __2
	}
	if !(interp != uintptr(0)) {
		goto __3
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+65666, libc.VaList(bp, bytes)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+16812, uintptr(0)))
__3:
	;
	return TCL_ERROR
__2:
	;

	// Convert the string rep.

	if !(*(*int32)(unsafe.Pointer(bp + 80)) <= 3) {
		goto __4
	}
	*(*int32)(unsafe.Pointer(bp + 84 /* offset */)) = 0
	goto __5
__4:
	if !(*(*int32)(unsafe.Pointer(bp + 80)) > 4 && (int32(*(*int8)(unsafe.Pointer(bytes + 3))) == '-' || int32(*(*int8)(unsafe.Pointer(bytes + 3))) == '+')) {
		goto __6
	}
	// This is our limited string expression evaluator. Pass everything
	// after "end-" to Tcl_GetInt, then reverse for offset.

	if !(func() int32 {
		if int32(*(*int8)(unsafe.Pointer(bytes + 4))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(bytes + 4))))
	}() != 0) {
		goto __8
	}
	goto badIndexFormat
__8:
	;
	if !(XTcl_GetInt(tls, interp, bytes+uintptr(4), bp+84) != TCL_OK) {
		goto __9
	}
	return TCL_ERROR
__9:
	;
	if !(int32(*(*int8)(unsafe.Pointer(bytes + 3))) == '-') {
		goto __10
	}

	// TODO: Review overflow concerns here!
	*(*int32)(unsafe.Pointer(bp + 84 /* offset */)) = -*(*int32)(unsafe.Pointer(bp + 84 /* offset */))
__10:
	;
	goto __7
__6:
	// Conversion failed. Report the error.

badIndexFormat:
	if !(interp != uintptr(0)) {
		goto __11
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+65666, libc.VaList(bp+40, bytes)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7444, ts+16812, uintptr(0)))
__11:
	;
	return TCL_ERROR
__7:
	;
__5:
	;

	// The conversion succeeded. Free the old internal rep and set the new
	// one.

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __12
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __13
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__13:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__12:
	;

	*(*int32)(unsafe.Pointer(objPtr + 32)) = int32(*(*int32)(unsafe.Pointer(bp + 84 /* offset */)))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclEndOffsetType))

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclIndexEncode --
//
//      Parse objPtr to determine if it is an index value. Two cases
//	are possible.  The value objPtr might be parsed as an absolute
//	index value in the C signed int range.  Note that this includes
//	index values that are integers as presented and it includes index
//      arithmetic expressions. The absolute index values that can be
//	directly meaningful as an index into either a list or a string are
//	those integer values >= TCL_INDEX_START (0)
//	and < TCL_INDEX_AFTER (INT_MAX).
//      The largest string supported in Tcl 8 has bytelength INT_MAX.
//      This means the largest supported character length is also INT_MAX,
//      and the index of the last character in a string of length INT_MAX
//      is INT_MAX-1.
//
//      Any absolute index value parsed outside that range is encoded
//      using the before and after values passed in by the
//      caller as the encoding to use for indices that are either
//      less than or greater than the usable index range. TCL_INDEX_AFTER
//      is available as a good choice for most callers to use for
//      after. Likewise, the value TCL_INDEX_BEFORE is good for
//      most callers to use for before.  Other values are possible
//      when the caller knows it is helpful in producing its own behavior
//      for indices before and after the indexed item.
//
//      A token can also be parsed as an end-relative index expression.
//      All end-relative expressions that indicate an index larger
//      than end (end+2, end--5) point beyond the end of the indexed
//      collection, and can be encoded as after.  The end-relative
//      expressions that indicate an index less than or equal to end
//      are encoded relative to the value TCL_INDEX_END (-2).  The
//      index "end" is encoded as -2, down to the index "end-0x7FFFFFFE"
//      which is encoded as INT_MIN. Since the largest index into a
//      string possible in Tcl 8 is 0x7FFFFFFE, the interpretation of
//      "end-0x7FFFFFFE" for that largest string would be 0.  Thus,
//      if the tokens "end-0x7FFFFFFF" or "end+-0x80000000" are parsed,
//      they can be encoded with the before value.
//
//      These details will require re-examination whenever string and
//      list length limits are increased, but that will likely also
//      mean a revised routine capable of returning Tcl_WideInt values.
//
// Returns:
//      TCL_OK if parsing succeeded, and TCL_ERROR if it failed.
//
// Side effects:
//      When TCL_OK is returned, the encoded index value is written
//      to *indexPtr.
//
//----------------------------------------------------------------------

func XTclIndexEncode(tls *libc.TLS, interp uintptr, objPtr uintptr, before int32, after int32, indexPtr uintptr) int32 { /* tclUtil.c:3930:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var idx int32 at bp, 4

	if !(TCL_OK == func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(objPtr + 32)))
				return TCL_OK
			}()
		}
		return XTcl_GetIntFromObj(tls, uintptr(0), objPtr, bp)
	}()) {
		goto __1
	}
	// We parsed a value in the range INT_MIN...INT_MAX
integerEncode:
	if !(*(*int32)(unsafe.Pointer(bp)) < 0) {
		goto __3
	}
	// All negative absolute indices are "before the beginning"
	*(*int32)(unsafe.Pointer(bp /* idx */)) = before
	goto __4
__3:
	if !(*(*int32)(unsafe.Pointer(bp)) == 0x7fffffff) {
		goto __5
	}
	// This index value is always "after the end"
	*(*int32)(unsafe.Pointer(bp /* idx */)) = after
__5:
	;
__4:
	;
	// usual case, the absolute index value encodes itself
	goto __2
__1:
	if !(TCL_OK == sGetEndOffsetFromObj(tls, objPtr, 0, bp)) {
		goto __6
	}
	// We parsed an end+offset index value.
	// idx holds the offset value in the range INT_MIN...INT_MAX.
	if !(*(*int32)(unsafe.Pointer(bp)) > 0) {
		goto __8
	}
	// All end+postive or end-negative expressions
	// always indicate "after the end".
	*(*int32)(unsafe.Pointer(bp /* idx */)) = after
	goto __9
__8:
	if !(*(*int32)(unsafe.Pointer(bp)) < -0x7fffffff-1 - -2) {
		goto __10
	}
	// These indices always indicate "before the beginning
	*(*int32)(unsafe.Pointer(bp /* idx */)) = before
	goto __11
__10:
	// Encoded end-positive (or end+negative) are offset
	*(*int32)(unsafe.Pointer(bp /* idx */)) += -2
__11:
	;
__9:
	;

	// TODO: Consider flag to suppress repeated end-offset parse.
	goto __7
__6:
	if !(TCL_OK == func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclIntType)) {
			return func() int32 {
				*(*int32)(unsafe.Pointer(bp)) = int32(*(*int32)(unsafe.Pointer(objPtr + 32)))
				return TCL_OK
			}()
		}
		return XTclGetIntForIndex(tls, interp, objPtr, 0, bp)
	}()) {
		goto __12
	}
	// Only reach this case when the index value is a
	// constant index arithmetic expression, and idx
	// holds the result. Treat it the same as if it were
	// parsed as an absolute integer value.
	goto integerEncode
	goto __13
__12:
	return TCL_ERROR
__13:
	;
__7:
	;
__2:
	;
	*(*int32)(unsafe.Pointer(indexPtr)) = *(*int32)(unsafe.Pointer(bp /* idx */))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclIndexDecode --
//
//	Decodes a value previously encoded by TclIndexEncode.  The argument
//	endValue indicates what value of "end" should be used in the
//	decoding.
//
// Results:
//	The decoded index value.
//
//----------------------------------------------------------------------

func XTclIndexDecode(tls *libc.TLS, encoded int32, endValue int32) int32 { /* tclUtil.c:4001:1: */
	if encoded <= -2 {
		return encoded - -2 + endValue
	}
	return encoded
}

//----------------------------------------------------------------------
//
// TclCheckBadOctal --
//
//	This function checks for a bad octal value and appends a meaningful
//	error to the interp's result.
//
// Results:
//	1 if the argument was a bad octal, else 0.
//
// Side effects:
//	The interpreter's result is modified.
//
//----------------------------------------------------------------------

func XTclCheckBadOctal(tls *libc.TLS, interp uintptr, value uintptr) int32 { /* tclUtil.c:4029:1: */
	var p uintptr = value

	// A frequent mistake is invalid octal values due to an unwanted leading
	// zero. Try to generate a meaningful error message.

	for func() int32 {
		if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
			return 0
		}
		return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
	}() != 0 {
		p++
	}
	if int32(*(*int8)(unsafe.Pointer(p))) == '+' || int32(*(*int8)(unsafe.Pointer(p))) == '-' {
		p++
	}
	if int32(*(*int8)(unsafe.Pointer(p))) == '0' {
		if int32(*(*int8)(unsafe.Pointer(p + 1))) == 'o' || int32(*(*int8)(unsafe.Pointer(p + 1))) == 'O' {
			p += uintptr(2)
		}
		for libc.Xisdigit(tls, int32(uint8(*(*int8)(unsafe.Pointer(p))))) != 0 { // INTL: digit.
			p++
		}
		for func() int32 {
			if int32(*(*int8)(unsafe.Pointer(p))) > 0x20 {
				return 0
			}
			return XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(p))))
		}() != 0 {
			p++
		}
		if int32(*(*int8)(unsafe.Pointer(p))) == 0 {
			// Reached end of string.

			if interp != uintptr(0) {
				// Don't reset the result here because we want this result to
				// be added to an existing error message as extra info.

				XTcl_AppendToObj(tls, XTcl_GetObjResult(tls, interp),
					ts+63122, -1)
			}
			return 1
		}
	}
	return 0
}

//----------------------------------------------------------------------
//
// ClearHash --
//
//	Remove all the entries in the hash table *tablePtr.
//
//----------------------------------------------------------------------

func sClearHash(tls *libc.TLS, tablePtr uintptr) { /* tclUtil.c:4089:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var search Tcl_HashSearch at bp, 24

	var hPtr uintptr

	for hPtr = XTcl_FirstHashEntry(tls, tablePtr, bp); hPtr != uintptr(0); hPtr = XTcl_NextHashEntry(tls, bp) {
		var objPtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData

		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		XTcl_DeleteHashEntry(tls, hPtr)
	}
}

//----------------------------------------------------------------------
//
// GetThreadHash --
//
//	Get a thread-specific (Tcl_HashTable *) associated with a thread data
//	key.
//
// Results:
//	The Tcl_HashTable * corresponding to *keyPtr.
//
// Side effects:
//	The first call on a keyPtr in each thread creates a new Tcl_HashTable,
//	and registers a thread exit handler to dispose of it.
//
//----------------------------------------------------------------------

func sGetThreadHash(tls *libc.TLS, keyPtr uintptr) uintptr { /* tclUtil.c:4122:22: */
	var tablePtrPtr uintptr = XTcl_GetThreadData(tls, keyPtr, int32(unsafe.Sizeof(uintptr(0))))

	if uintptr(0) == *(*uintptr)(unsafe.Pointer(tablePtrPtr)) {
		*(*uintptr)(unsafe.Pointer(tablePtrPtr)) = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_HashTable{})))
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFreeThreadHash})), *(*uintptr)(unsafe.Pointer(tablePtrPtr)))
		XTcl_InitHashTable(tls, *(*uintptr)(unsafe.Pointer(tablePtrPtr)), 1)
	}
	return *(*uintptr)(unsafe.Pointer(tablePtrPtr))
}

//----------------------------------------------------------------------
//
// FreeThreadHash --
//
//	Thread exit handler used by GetThreadHash to dispose of a thread hash
//	table.
//
// Side effects:
//	Frees a Tcl_HashTable.
//
//----------------------------------------------------------------------

func sFreeThreadHash(tls *libc.TLS, clientData ClientData) { /* tclUtil.c:4152:1: */
	var tablePtr uintptr = clientData

	sClearHash(tls, tablePtr)
	XTcl_DeleteHashTable(tls, tablePtr)
	XTclpFree(tls, tablePtr)
}

//----------------------------------------------------------------------
//
// FreeProcessGlobalValue --
//
//	Exit handler used by Tcl(Set|Get)ProcessGlobalValue to cleanup a
//	ProcessGlobalValue at exit.
//
//----------------------------------------------------------------------

func sFreeProcessGlobalValue(tls *libc.TLS, clientData ClientData) { /* tclUtil.c:4174:1: */
	var pgvPtr uintptr = clientData

	(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fepoch++
	(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).FnumBytes = 0
	XTclpFree(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue)
	(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue = uintptr(0)
	if (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding != 0 {
		XTcl_FreeEncoding(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding)
		(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding = uintptr(0)
	}

}

//----------------------------------------------------------------------
//
// TclSetProcessGlobalValue --
//
//	Utility routine to set a global value shared by all threads in the
//	process while keeping a thread-local copy as well.
//
//----------------------------------------------------------------------

func XTclSetProcessGlobalValue(tls *libc.TLS, pgvPtr uintptr, newValue uintptr, encoding Tcl_Encoding) { /* tclUtil.c:4202:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var bytes uintptr
	var cacheMap uintptr
	var hPtr uintptr
	// var dummy int32 at bp, 4

	// Fill the global string value.

	(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fepoch++
	if uintptr(0) != (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue {
		XTclpFree(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue)
	} else {
		XTcl_CreateExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFreeProcessGlobalValue})), pgvPtr)
	}
	bytes = XTcl_GetStringFromObj(tls, newValue, pgvPtr+4)
	(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue = XTcl_Alloc(tls, uint32((*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).FnumBytes+1))
	libc.Xmemcpy(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue, bytes, uint64((*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).FnumBytes+1))
	if (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding != 0 {
		XTcl_FreeEncoding(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding)
	}
	(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding = encoding

	// Fill the local thread copy directly with the Tcl_Obj value to avoid
	// loss of the internalrep. Increment newValue refCount early to handle case
	// where we set a PGV to itself.

	(*Tcl_Obj)(unsafe.Pointer(newValue)).FrefCount++
	cacheMap = sGetThreadHash(tls, pgvPtr+40)
	sClearHash(tls, cacheMap)
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(cacheMap)).FcreateProc})).f(tls, cacheMap, uintptr(Intptr_t((*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fepoch)), bp /* &dummy */)
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = newValue

}

//----------------------------------------------------------------------
//
// TclGetProcessGlobalValue --
//
//	Retrieve a global value shared among all threads of the process,
//	preferring a thread-local copy as long as it remains valid.
//
// Results:
//	Returns a (Tcl_Obj *) that holds a copy of the global value.
//
//----------------------------------------------------------------------

func XTclGetProcessGlobalValue(tls *libc.TLS, pgvPtr uintptr) uintptr { /* tclUtil.c:4260:9: */
	bp := tls.Alloc(436)
	defer tls.Free(436)

	var value uintptr = uintptr(0)
	var cacheMap uintptr
	var hPtr uintptr
	var epoch int32 = (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fepoch

	if (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding != 0 {
		var current Tcl_Encoding = XTcl_GetEncoding(tls, uintptr(0), uintptr(0))

		if (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding != current {
			// The system encoding has changed since the global string value
			// was saved. Convert the global value to be based on the new
			// system encoding.

			// var native Tcl_DString at bp, 216

			// var newValue Tcl_DString at bp+216, 216

			epoch = libc.PreIncInt32(&(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fepoch, 1)
			XTcl_UtfToExternalDString(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue,
				(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).FnumBytes, bp)
			XTcl_ExternalToUtfDString(tls, current, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring,
				(*Tcl_DString)(unsafe.Pointer(bp)).Flength, bp+216)
			XTcl_DStringFree(tls, bp)
			XTclpFree(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue)
			(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue = XTcl_Alloc(tls, uint32((*Tcl_DString)(unsafe.Pointer(bp+216)).Flength+1))
			libc.Xmemcpy(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue, (*Tcl_DString)(unsafe.Pointer(bp+216)).Fstring,
				uint64((*Tcl_DString)(unsafe.Pointer(bp+216)).Flength+1))
			XTcl_DStringFree(tls, bp+216)
			XTcl_FreeEncoding(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding)
			(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fencoding = current

		} else {
			XTcl_FreeEncoding(tls, current)
		}
	}
	cacheMap = sGetThreadHash(tls, pgvPtr+40)
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(cacheMap)).FfindProc})).f(tls, cacheMap, uintptr(Intptr_t(epoch)))
	if uintptr(0) == hPtr {
		// var dummy int32 at bp+432, 4

		// No cache for the current epoch - must be a new one.
		//
		// First, clear the cacheMap, as anything in it must refer to some
		// expired epoch.

		sClearHash(tls, cacheMap)

		// If no thread has set the shared value, call the initializer.

		if uintptr(0) == (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue && (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fproc != 0 {
			(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fepoch++
			(*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr)
			})(unsafe.Pointer(&struct{ uintptr }{(*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fproc})).f(tls, pgvPtr+8 /* &.value */, pgvPtr+4 /* &.numBytes */, pgvPtr+16 /* &.encoding */)
			if (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue == uintptr(0) {
				XTcl_Panic(tls, ts+65707, 0)
			}
			XTcl_CreateExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFreeProcessGlobalValue})), pgvPtr)
		}

		// Store a copy of the shared value in our epoch-indexed cache.

		value = XTcl_NewStringObj(tls, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fvalue, (*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).FnumBytes)
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(cacheMap)).FcreateProc})).f(tls, cacheMap, uintptr(Intptr_t((*ProcessGlobalValue)(unsafe.Pointer(pgvPtr)).Fepoch)), bp+432 /* &dummy */)

		(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = value
		(*Tcl_Obj)(unsafe.Pointer(value)).FrefCount++
	}
	return (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
}

//----------------------------------------------------------------------
//
// TclSetObjNameOfExecutable --
//
//	This function stores the absolute pathname of the executable file
//	(normally as computed by TclpFindExecutable).
//
// Results:
//	None.
//
// Side effects:
//	Stores the executable name.
//
//----------------------------------------------------------------------

func XTclSetObjNameOfExecutable(tls *libc.TLS, name uintptr, encoding Tcl_Encoding) { /* tclUtil.c:4360:1: */
	XTclSetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&executableName)), name, encoding)
}

//----------------------------------------------------------------------
//
// TclGetObjNameOfExecutable --
//
//	This function retrieves the absolute pathname of the application in
//	which the Tcl library is running, usually as previously stored by
//	TclpFindExecutable(). This function call is the C API equivalent to
//	the "info nameofexecutable" command.
//
// Results:
//	A pointer to an "fsPath" Tcl_Obj, or to an empty Tcl_Obj if the
//	pathname of the application is unknown.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetObjNameOfExecutable(tls *libc.TLS) uintptr { /* tclUtil.c:4387:9: */
	return XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&executableName)))
}

//----------------------------------------------------------------------
//
// Tcl_GetNameOfExecutable --
//
//	This function retrieves the absolute pathname of the application in
//	which the Tcl library is running, and returns it in string form.
//
//	The returned string belongs to Tcl and should be copied if the caller
//	plans to keep it, to guard against it becoming invalid.
//
// Results:
//	A pointer to the internal string or NULL if the internal full path
//	name has not been computed or unknown.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetNameOfExecutable(tls *libc.TLS) uintptr { /* tclUtil.c:4414:12: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var numBytes int32 at bp, 4

	var bytes uintptr = XTcl_GetStringFromObj(tls, XTclGetObjNameOfExecutable(tls), bp)

	if *(*int32)(unsafe.Pointer(bp)) == 0 {
		return uintptr(0)
	}
	return bytes
}

//----------------------------------------------------------------------
//
// TclpGetTime --
//
//	Deprecated synonym for Tcl_GetTime. This function is provided for the
//	benefit of extensions written before Tcl_GetTime was exported from the
//	library.
//
// Results:
//	None.
//
// Side effects:
//	Stores current time in the buffer designated by "timePtr"
//
//----------------------------------------------------------------------

func XTclpGetTime(tls *libc.TLS, timePtr uintptr) { /* tclUtil.c:4446:1: */
	XTcl_GetTime(tls, timePtr)
}

//----------------------------------------------------------------------
//
// TclGetPlatform --
//
//	This is a kludge that allows the test library to get access the
//	internal tclPlatform variable.
//
// Results:
//	Returns a pointer to the tclPlatform variable.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGetPlatform(tls *libc.TLS) uintptr { /* tclUtil.c:4469:17: */
	return uintptr(unsafe.Pointer(&XtclPlatform))
}

//----------------------------------------------------------------------
//
// TclReToGlob --
//
//	Attempt to convert a regular expression to an equivalent glob pattern.
//
// Results:
//	Returns TCL_OK on success, TCL_ERROR on failure. If interp is not
//	NULL, an error message is placed in the result. On success, the
//	DString will contain an exact equivalent glob pattern. The caller is
//	responsible for calling Tcl_DStringFree on success. If exactPtr is not
//	NULL, it will be 1 if an exact match qualifies.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclReToGlob(tls *libc.TLS, interp uintptr, reStr uintptr, reStrLen int32, dsPtr uintptr, exactPtr uintptr, quantifiersFoundPtr uintptr) int32 { /* tclUtil.c:4496:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var anchorLeft int32
	var anchorRight int32
	var lastIsStar int32
	var numStars int32
	var dsStr uintptr
	var dsStrStart uintptr
	var msg uintptr
	var p uintptr
	var strEnd uintptr
	var code uintptr

	strEnd = reStr + uintptr(reStrLen)
	XTcl_DStringInit(tls, dsPtr)
	if !(quantifiersFoundPtr != uintptr(0)) {
		goto __1
	}
	*(*int32)(unsafe.Pointer(quantifiersFoundPtr)) = 0
__1:
	;

	// "***=xxx" == "*xxx*", watch for glob-sensitive chars.

	if !(reStrLen >= 4 && libc.Xmemcmp(tls, ts+65742, reStr, uint64(4)) == 0) {
		goto __2
	}
	// At most, the glob pattern has length 2*reStrLen + 2 to backslash
	// escape every character and have * at each end.

	XTcl_DStringSetLength(tls, dsPtr, reStrLen+2)
	dsStr = libc.AssignUintptr(&dsStrStart, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring)
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('*')
	p = reStr + uintptr(4)
__3:
	if !(p < strEnd) {
		goto __5
	}
	switch int32(*(*int8)(unsafe.Pointer(p))) {
	case '\\':
		goto __7
	case '*':
		goto __8
	case '[':
		goto __9
	case ']':
		goto __10
	case '?':
		goto __11
		// fall through
	default:
		goto __12
	}
	goto __6
__7:
__8:
__9:
__10:
__11:
	// Only add \ where necessary for glob
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\\')
	// fall through
__12:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = *(*int8)(unsafe.Pointer(p))
	goto __6
__6:
	;
	goto __4
__4:
	p++
	goto __3
	goto __5
__5:
	;
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('*')
	XTcl_DStringSetLength(tls, dsPtr, int32((int64(dsStr)-int64(dsStrStart))/1))
	if !(exactPtr != 0) {
		goto __13
	}
	*(*int32)(unsafe.Pointer(exactPtr)) = 0
__13:
	;
	return TCL_OK
__2:
	;

	// At most, the glob pattern has length reStrLen + 2 to account for
	// possible * at each end.

	XTcl_DStringSetLength(tls, dsPtr, reStrLen+2)
	dsStr = libc.AssignUintptr(&dsStrStart, (*Tcl_DString)(unsafe.Pointer(dsPtr)).Fstring)

	// Check for anchored REs (ie ^foo$), so we can use string equal if
	// possible. Do not alter the start of str so we can free it correctly.
	//
	// Keep track of the last char being an unescaped star to prevent multiple
	// instances.  Simpler than checking that the last star may be escaped.

	msg = uintptr(0)
	code = uintptr(0)
	p = reStr
	anchorRight = 0
	lastIsStar = 0
	numStars = 0

	if !(int32(*(*int8)(unsafe.Pointer(p))) == '^') {
		goto __14
	}
	anchorLeft = 1
	p++
	goto __15
__14:
	anchorLeft = 0
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('*')
	lastIsStar = 1
__15:
	;

__16:
	if !(p < strEnd) {
		goto __18
	}
	switch int32(*(*int8)(unsafe.Pointer(p))) {
	case '\\':
		goto __20
	case '.':
		goto __21
	case '$':
		goto __22
	case '*':
		goto __23
	case '+':
		goto __24
	case '?':
		goto __25
	case '|':
		goto __26
	case '^':
		goto __27
	case '{':
		goto __28
	case '}':
		goto __29
	case '(':
		goto __30
	case ')':
		goto __31
	case '[':
		goto __32
	case ']':
		goto __33
	default:
		goto __34
	}
	goto __19
__20:
	p++
	switch int32(*(*int8)(unsafe.Pointer(p))) {
	case 'a':
		goto __36
	case 'b':
		goto __37
	case 'f':
		goto __38
	case 'n':
		goto __39
	case 'r':
		goto __40
	case 't':
		goto __41
	case 'v':
		goto __42
	case 'B':
		goto __43
	case '\\':
		goto __44
	case '*':
		goto __45
	case '[':
		goto __46
	case ']':
		goto __47
	case '?':
		goto __48 // prevent exact match
		// fall through
	case '{':
		goto __49
	case '}':
		goto __50
	case '(':
		goto __51
	case ')':
		goto __52
	case '+':
		goto __53
	case '.':
		goto __54
	case '|':
		goto __55
	case '^':
		goto __56
	case '$':
		goto __57
	default:
		goto __58
	}
	goto __35
__36:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\a')
	goto __35
__37:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\b')
	goto __35
__38:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\f')
	goto __35
__39:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\n')
	goto __35
__40:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\r')
	goto __35
__41:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\t')
	goto __35
__42:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\v')
	goto __35
__43:
__44:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\\')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\\')
	anchorLeft = 0 // prevent exact match
	goto __35
__45:
__46:
__47:
__48:
	// Only add \ where necessary for glob
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('\\')
	anchorLeft = 0 // prevent exact match
	// fall through
__49:
__50:
__51:
__52:
__53:
__54:
__55:
__56:
__57:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = *(*int8)(unsafe.Pointer(p))
	goto __35
__58:
	msg = ts + 65747  /* "invalid escape s..." */
	code = ts + 65771 /* "BADESCAPE" */
	goto invalidGlob
__35:
	;
	goto __19
__21:
	if !(quantifiersFoundPtr != uintptr(0)) {
		goto __59
	}
	*(*int32)(unsafe.Pointer(quantifiersFoundPtr)) = 1
__59:
	;
	anchorLeft = 0 // prevent exact match
	if !(p+uintptr(1) < strEnd) {
		goto __60
	}
	if !(int32(*(*int8)(unsafe.Pointer(p + 1))) == '*') {
		goto __61
	}
	p++
	if !!(lastIsStar != 0) {
		goto __63
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('*')
	lastIsStar = 1
	numStars++
__63:
	;
	goto __17
	goto __62
__61:
	if !(int32(*(*int8)(unsafe.Pointer(p + 1))) == '+') {
		goto __64
	}
	p++
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('?')
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('*')
	lastIsStar = 1
	numStars++
	goto __17
__64:
	;
__62:
	;
__60:
	;
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('?')
	goto __19
__22:
	if !(p+uintptr(1) != strEnd) {
		goto __65
	}
	msg = ts + 65781  /* "$ not anchor" */
	code = ts + 65794 /* "NONANCHOR" */
	goto invalidGlob
__65:
	;
	anchorRight = 1
	goto __19
__23:
__24:
__25:
__26:
__27:
__28:
__29:
__30:
__31:
__32:
__33:
	msg = ts + 65804  /* "unhandled RE spe..." */
	code = ts + 65830 /* "UNHANDLED" */
	goto invalidGlob
__34:
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = *(*int8)(unsafe.Pointer(p))
	goto __19
__19:
	;
	lastIsStar = 0
	goto __17
__17:
	p++
	goto __16
	goto __18
__18:
	;
	if !(numStars > 1) {
		goto __66
	}
	// Heuristic: if >1 non-anchoring *, the risk is large that glob
	// matching is slower than the RE engine, so report invalid.

	msg = ts + 65840  /* "excessive recurs..." */
	code = ts + 65885 /* "OVERCOMPLEX" */
	goto invalidGlob
__66:
	;

	if !(!(anchorRight != 0) && !(lastIsStar != 0)) {
		goto __67
	}
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&dsStr, 1))) = int8('*')
__67:
	;
	XTcl_DStringSetLength(tls, dsPtr, int32((int64(dsStr)-int64(dsStrStart))/1))

	if !(exactPtr != 0) {
		goto __68
	}
	*(*int32)(unsafe.Pointer(exactPtr)) = libc.Bool32(anchorLeft != 0 && anchorRight != 0)
__68:
	;

	return TCL_OK

invalidGlob:
	if !(interp != uintptr(0)) {
		goto __69
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, msg, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+65897, code, uintptr(0)))
__69:
	;
	XTcl_DStringFree(tls, dsPtr)
	return TCL_ERROR
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

var tclVarHashKeyType = Tcl_HashKeyType{
	Fversion:         TCL_HASH_KEY_TYPE_VERSION, // flags
	FhashKeyProc:     0,                         // hashKeyProc
	FcompareKeysProc: 0,                         // compareKeysProc
	FallocEntryProc:  0,                         // allocEntryProc
	FfreeEntryProc:   0,                         // freeEntryProc
} /* tclVar.c:31:30 */

// NOTE: VarHashCreateVar increments the recount of its key argument.
// All callers that will call Tcl_DecrRefCount on that argument must
// call Tcl_IncrRefCount on it before passing it in.  This requirement
// can bubble up to callers of callers .... etc.

func sVarHashCreateVar1(tls *libc.TLS, tablePtr uintptr, key uintptr, newPtr uintptr) uintptr { /* tclVar.c:57:19: */
	var hPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr /* &.table */)).FcreateProc})).f(tls, tablePtr /* &.table */, key, newPtr)

	if hPtr != 0 {
		return hPtr - uintptr(int32(uintptr(0)+24))
	} else {
		return uintptr(0)
	}
	return uintptr(0)
}

func sVarHashFirstVar(tls *libc.TLS, tablePtr uintptr, searchPtr uintptr) uintptr { /* tclVar.c:88:19: */
	var hPtr uintptr = XTcl_FirstHashEntry(tls, tablePtr, searchPtr)

	if hPtr != 0 {
		return hPtr - uintptr(int32(uintptr(0)+24))
	} else {
		return uintptr(0)
	}
	return uintptr(0)
}

func sVarHashNextVar(tls *libc.TLS, searchPtr uintptr) uintptr { /* tclVar.c:102:19: */
	var hPtr uintptr = XTcl_NextHashEntry(tls, searchPtr)

	if hPtr != 0 {
		return hPtr - uintptr(int32(uintptr(0)+24))
	} else {
		return uintptr(0)
	}
	return uintptr(0)
}

// The strings below are used to indicate what went wrong when a variable
// access is denied.

var sNOSUCHVAR = *(*[17]int8)(unsafe.Pointer(ts + 27857))       /* tclVar.c:126:19 */
var sISARRAY = *(*[18]int8)(unsafe.Pointer(ts + 65905))         /* tclVar.c:127:19 */
var sNEEDARRAY = *(*[21]int8)(unsafe.Pointer(ts + 29041))       /* tclVar.c:128:19 */
var sNOSUCHELEMENT = *(*[25]int8)(unsafe.Pointer(ts + 65923))   /* tclVar.c:129:19 */
var sDANGLINGELEMENT = *(*[41]int8)(unsafe.Pointer(ts + 65948)) /* tclVar.c:130:19 */
var sDANGLINGVAR = *(*[46]int8)(unsafe.Pointer(ts + 65989))     /* tclVar.c:132:19 */
var sBADNAMESPACE = *(*[31]int8)(unsafe.Pointer(ts + 66035))    /* tclVar.c:134:19 */
var sMISSINGNAME = *(*[22]int8)(unsafe.Pointer(ts + 66066))     /* tclVar.c:135:19 */
var sISARRAYELEMENT = *(*[38]int8)(unsafe.Pointer(ts + 50705))  /* tclVar.c:136:19 */

// A test to see if we are in a call frame that has local variables. This is
// true if we are inside a procedure body.

// The following structure describes an enumerative search in progress on an
// array variable; this are invoked with options to the "array" command.

type ArraySearch1 = struct {
	Fid          int32
	F__ccgo_pad1 [4]byte
	FvarPtr      uintptr
	Fsearch      Tcl_HashSearch
	FnextEntry   uintptr
	FnextPtr     uintptr
} /* tclVar.c:151:9 */

// A test to see if we are in a call frame that has local variables. This is
// true if we are inside a procedure body.

// The following structure describes an enumerative search in progress on an
// array variable; this are invoked with options to the "array" command.

type ArraySearch = ArraySearch1 /* tclVar.c:168:3 */

// Types of Tcl_Objs used to cache variable lookups.
//
// localVarName - INTERNALREP DEFINITION:
//   twoPtrValue.ptr1:   pointer to name obj in varFramePtr->localCache
//			  or NULL if it is this same obj
//   twoPtrValue.ptr2: index into locals table
//
// parsedVarName - INTERNALREP DEFINITION:
//   twoPtrValue.ptr1:	pointer to the array name Tcl_Obj, or NULL if it is a
//			scalar variable
//   twoPtrValue.ptr2:	pointer to the element name string (owned by this
//			Tcl_Obj), or NULL if it is a scalar variable

var localVarNameType = Tcl_ObjType{
	Fname:           ts + 66088,
	FfreeIntRepProc: 0, FdupIntRepProc: 0, FupdateStringProc: 0, FsetFromAnyProc: 0,
} /* tclVar.c:232:26 */

var tclParsedVarNameType = Tcl_ObjType{
	Fname:           ts + 66101,
	FfreeIntRepProc: 0, FdupIntRepProc: 0, FupdateStringProc: 0, FsetFromAnyProc: 0,
} /* tclVar.c:237:26 */

// Type of Tcl_Objs used to speed up array searches.
//
// INTERNALREP DEFINITION:
//   twoPtrValue.ptr1:	searchIdNumber (cast to pointer)
//   twoPtrValue.ptr2:	variableNameStartInString (cast to pointer)
//
// Note that the value stored in ptr2 is the offset into the string of the
// start of the variable name and not the address of the variable name itself,
// as this can be safely copied.

var XtclArraySearchType = Tcl_ObjType{
	Fname: ts + 66115, FsetFromAnyProc: 0,
} /* tclVar.c:254:19 */

func XTclVarHashCreateVar(tls *libc.TLS, tablePtr uintptr, key uintptr, newPtr uintptr) uintptr { /* tclVar.c:259:5: */
	var keyPtr uintptr
	var varPtr uintptr

	keyPtr = XTcl_NewStringObj(tls, key, -1)
	(*Tcl_Obj)(unsafe.Pointer(keyPtr)).FrefCount++
	varPtr = sVarHashCreateVar1(tls, tablePtr, keyPtr, newPtr)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = keyPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	return varPtr
}

func sLocateArray(tls *libc.TLS, interp uintptr, name uintptr, varPtrPtr uintptr, isArrayPtr uintptr) int32 { /* tclVar.c:277:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var arrayPtr uintptr at bp, 8

	var varPtr uintptr = XTclObjLookupVarEx(tls, interp, name, uintptr(0), 0,
		/*msg*/ uintptr(0) /*createPart1*/, 0 /*createPart2*/, 0, bp)

	if XTclCheckArrayTraces(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp)), name, -1) == TCL_ERROR {
		return TCL_ERROR
	}
	if varPtrPtr != 0 {
		*(*uintptr)(unsafe.Pointer(varPtrPtr)) = varPtr
	}
	if isArrayPtr != 0 {
		*(*int32)(unsafe.Pointer(isArrayPtr)) = libc.Bool32(varPtr != 0 && !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) &&
			(*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_ARRAY != 0)
	}
	return TCL_OK
}

func sNotArrayError(tls *libc.TLS, interp uintptr, name uintptr) int32 { /* tclVar.c:300:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var nameStr uintptr = XTcl_GetString(tls, name)

	XTcl_SetObjResult(tls, interp,
		XTcl_ObjPrintf(tls, ts+66128, libc.VaList(bp, nameStr)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+29068, nameStr, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclCleanupVar --
//
//	This function is called when it looks like it may be OK to free up a
//	variable's storage. If the variable is in a hashtable, its Var
//	structure and hash table entry will be freed along with those of its
//	containing array, if any. This function is called, for example, when
//	a trace on a variable deletes a variable.
//
// Results:
//	None.
//
// Side effects:
//	If the variable (or its containing array) really is dead and in a
//	hashtable, then its Var structure, and possibly its hash table entry,
//	is freed up.
//
//----------------------------------------------------------------------

func sCleanupVar(tls *libc.TLS, varPtr uintptr, arrayPtr uintptr) { /* tclVar.c:335:1: */
	if *(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0) && (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 &&
		!((*Var)(unsafe.Pointer(varPtr)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0) &&
		(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount == libc.BoolInt32(!((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_DEAD_HASH != 0)) {
		if (*VarInHash)(unsafe.Pointer(varPtr)).FrefCount == 0 {
			XTclpFree(tls, varPtr)
		} else {
			XTcl_DeleteHashEntry(tls, varPtr+24)
		}
	}
	if arrayPtr != uintptr(0) && *(*uintptr)(unsafe.Pointer(arrayPtr + 8)) == uintptr(0) && (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_IN_HASHTABLE != 0 && !((*Var)(unsafe.Pointer(arrayPtr)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0) && (*VarInHash)(unsafe.Pointer(arrayPtr)).FrefCount == libc.BoolInt32(!((*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_DEAD_HASH != 0)) {
		if (*VarInHash)(unsafe.Pointer(arrayPtr)).FrefCount == 0 {
			XTclpFree(tls, arrayPtr)
		} else {
			XTcl_DeleteHashEntry(tls, arrayPtr+24)
		}
	}
}

func XTclCleanupVar(tls *libc.TLS, varPtr uintptr, arrayPtr uintptr) { /* tclVar.c:362:1: */
	sCleanupVar(tls, varPtr, arrayPtr)
}

//----------------------------------------------------------------------
//
// TclLookupVar --
//
//	This function is used to locate a variable given its name(s). It has
//	been mostly superseded by TclObjLookupVar, it is now only used by the
//	trace code. It is kept in tcl8.5 mainly because it is in the internal
//	stubs table, so that some extension may be calling it.
//
// Results:
//	The return value is a pointer to the variable structure indicated by
//	part1 and part2, or NULL if the variable couldn't be found. If the
//	variable is found, *arrayPtrPtr is filled in with the address of the
//	variable structure for the array that contains the variable (or NULL
//	if the variable is a scalar). If the variable can't be found and
//	either createPart1 or createPart2 are 1, a new as-yet-undefined
//	(VAR_UNDEFINED) variable structure is created, entered into a hash
//	table, and returned.
//
//	If the variable isn't found and creation wasn't specified, or some
//	other error occurs, NULL is returned and an error message is left in
//	the interp's result if TCL_LEAVE_ERR_MSG is set in flags.
//
//	Note: it's possible for the variable returned to be VAR_UNDEFINED even
//	if createPart1 or createPart2 are 1 (these only cause the hash table
//	entry or array to be created). For example, the variable might be a
//	global that has been unset but is still referenced by a procedure, or
//	a variable that has been unset but it only being kept in existence (if
//	VAR_UNDEFINED) by a trace.
//
// Side effects:
//	New hashtable entries may be created if createPart1 or createPart2
//	are 1.
//
//----------------------------------------------------------------------

func XTclLookupVar(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, flags int32, msg uintptr, createPart1 int32, createPart2 int32, arrayPtrPtr uintptr) uintptr { /* tclVar.c:409:5: */
	var varPtr uintptr
	var part1Ptr uintptr = XTcl_NewStringObj(tls, part1, -1)

	if createPart1 != 0 {
		(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FrefCount++
	}

	varPtr = XTclObjLookupVar(tls, interp, part1Ptr, part2, flags, msg,
		createPart1, createPart2, arrayPtrPtr)

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(part1Ptr + 32)) = XtclFreeObjList
				XtclFreeObjList = part1Ptr
			}
		} else {
			XTclFreeObj(tls, part1Ptr)
		}
	}

	return varPtr
}

//----------------------------------------------------------------------
//
// TclObjLookupVar, TclObjLookupVarEx --
//
//	This function is used by virtually all of the variable code to locate
//	a variable given its name(s). The parsing into array/element
//	components and (if possible) the lookup results are cached in
//	part1Ptr, which is converted to one of the varNameTypes.
//
// Results:
//	The return value is a pointer to the variable structure indicated by
//	part1Ptr and part2, or NULL if the variable couldn't be found. If *
//	the variable is found, *arrayPtrPtr is filled with the address of the
//	variable structure for the array that contains the variable (or NULL
//	if the variable is a scalar). If the variable can't be found and
//	either createPart1 or createPart2 are 1, a new as-yet-undefined
//	(VAR_UNDEFINED) variable structure is created, entered into a hash
//	table, and returned.
//
//	If the variable isn't found and creation wasn't specified, or some
//	other error occurs, NULL is returned and an error message is left in
//	the interp's result if TCL_LEAVE_ERR_MSG is set in flags.
//
//	Note: it's possible for the variable returned to be VAR_UNDEFINED even
//	if createPart1 or createPart2 are 1 (these only cause the hash table
//	entry or array to be created). For example, the variable might be a
//	global that has been unset but is still referenced by a procedure, or
//	a variable that has been unset but it only being kept in existence (if
//	VAR_UNDEFINED) by a trace.
//
// Side effects:
//	New hashtable entries may be created if createPart1 or createPart2
//	are 1. The object part1Ptr is converted to one of localVarNameType,
//	tclNsVarNameType or tclParsedVarNameType and caches as much of the
//	lookup as it can.
//	When createPart1 is 1, callers must IncrRefCount part1Ptr if they
//	plan to DecrRefCount it.
//
//----------------------------------------------------------------------

func XTclObjLookupVar(tls *libc.TLS, interp uintptr, part1Ptr uintptr, part2 uintptr, flags int32, msg uintptr, createPart1 int32, createPart2 int32, arrayPtrPtr uintptr) uintptr { /* tclVar.c:489:5: */
	var part2Ptr uintptr = uintptr(0)
	var resPtr uintptr

	if part2 != 0 {
		part2Ptr = XTcl_NewStringObj(tls, part2, -1)
		if createPart2 != 0 {
			(*Tcl_Obj)(unsafe.Pointer(part2Ptr)).FrefCount++
		}
	}

	resPtr = XTclObjLookupVarEx(tls, interp, part1Ptr, part2Ptr,
		flags, msg, createPart1, createPart2, arrayPtrPtr)

	if part2Ptr != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = part2Ptr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	return resPtr
}

//	When createPart1 is 1, callers must IncrRefCount part1Ptr if they
//	plan to DecrRefCount it.
//	When createPart2 is 1, callers must IncrRefCount part2Ptr if they
//	plan to DecrRefCount it.
func XTclObjLookupVarEx(tls *libc.TLS, interp uintptr, part1Ptr uintptr, part2Ptr uintptr, flags int32, msg uintptr, createPart1 int32, createPart2 int32, arrayPtrPtr uintptr) uintptr { /* tclVar.c:539:5: */
	bp := tls.Alloc(124)
	defer tls.Free(124)

	var iPtr uintptr
	var varPtr uintptr // Points to the variable's in-frame Var
	// structure.
	var part1 uintptr
	// var index int32 at bp+120, 4

	// var len1 int32 at bp+104, 4

	var len2 int32
	var parsed int32
	var objPtr uintptr
	var typePtr uintptr
	// var errMsg uintptr at bp+112, 8

	var varFramePtr uintptr
	var part2 uintptr
	var newPart2 uintptr
	// Use the cached index if the names coincide.

	var namePtr uintptr
	var checkNamePtr uintptr
	var localIndex int32
	// part1Ptr is possibly an unparsed array element.

	var i int32
	var _objPtr uintptr
	// An indexed local variable.
	var cachedNamePtr uintptr
	var _objPtr1 uintptr
	iPtr = interp
	parsed = 0
	typePtr = (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr
	*(*uintptr)(unsafe.Pointer(bp + 112 /* errMsg */)) = uintptr(0)
	varFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	if part2Ptr != 0 {
		part2 = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(part2Ptr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(part2Ptr)).Fbytes
			}
			return XTcl_GetString(tls, part2Ptr)
		}()
	} else {
		part2 = uintptr(0)
	}
	newPart2 = uintptr(0)
	*(*uintptr)(unsafe.Pointer(arrayPtrPtr)) = uintptr(0)

	if !(typePtr == uintptr(unsafe.Pointer(&localVarNameType))) {
		goto __1
	}

localVarNameTypeHandling:
	localIndex = int32(*(*uintptr)(unsafe.Pointer(part1Ptr + 32 + 8)))
	if !((*CallFrame)(unsafe.Pointer(varFramePtr)).FisProcCallFrame&FRAME_IS_PROC != 0 &&
		!(flags&(TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY) != 0) &&
		localIndex < (*CallFrame)(unsafe.Pointer(varFramePtr)).FnumCompiledLocals) {
		goto __2
	}
	// Use the cached index if the names coincide.

	namePtr = *(*uintptr)(unsafe.Pointer(part1Ptr + 32))
	checkNamePtr = *(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr + 8 + uintptr(localIndex)*8))

	if !(!(namePtr != 0) && checkNamePtr == part1Ptr || namePtr != 0 && checkNamePtr == namePtr) {
		goto __3
	}
	varPtr = (*CallFrame)(unsafe.Pointer(varFramePtr)).FcompiledLocals + uintptr(localIndex)*16
	goto donePart1
__3:
	;
__2:
	;
	goto doneParsing
__1:
	;

	// If part1Ptr is a tclParsedVarNameType, separate it into the pre-parsed
	// parts.

	if !(typePtr == uintptr(unsafe.Pointer(&tclParsedVarNameType))) {
		goto __4
	}
	if !(*(*uintptr)(unsafe.Pointer(part1Ptr + 32)) != uintptr(0)) {
		goto __5
	}
	if !(part2Ptr != uintptr(0)) {
		goto __6
	}
	// ERROR: part1Ptr is already an array element, cannot specify
	// a part2.

	if !(flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __7
	}
	XTclObjVarErrMsg(tls, interp, part1Ptr, part2Ptr, msg,
		uintptr(unsafe.Pointer(&sNOSUCHVAR)), -1)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+66148, uintptr(0)))
__7:
	;
	return uintptr(0)
__6:
	;
	part2 = libc.AssignUintptr(&newPart2, *(*uintptr)(unsafe.Pointer(part1Ptr + 32 + 8 /* &.ptr2 */)))
	if !(newPart2 != 0) {
		goto __8
	}
	part2Ptr = XTcl_NewStringObj(tls, newPart2, -1)
	if !(createPart2 != 0) {
		goto __9
	}
	(*Tcl_Obj)(unsafe.Pointer(part2Ptr)).FrefCount++
__9:
	;
__8:
	;
	part1Ptr = *(*uintptr)(unsafe.Pointer(part1Ptr + 32))
	typePtr = (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr
	if !(typePtr == uintptr(unsafe.Pointer(&localVarNameType))) {
		goto __10
	}
	goto localVarNameTypeHandling
__10:
	;
__5:
	;
	parsed = 1
__4:
	;
	part1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp + 104)) = (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, part1Ptr, bp+104)
	}()

	if !(!(parsed != 0) && *(*int32)(unsafe.Pointer(bp + 104)) != 0 && int32(*(*int8)(unsafe.Pointer(part1 + uintptr(*(*int32)(unsafe.Pointer(bp + 104))) - uintptr(1)))) == ')') {
		goto __11
	}

	len2 = -1
	i = 0
__12:
	if !(i < *(*int32)(unsafe.Pointer(bp + 104))) {
		goto __14
	}
	if !(int32(*(*int8)(unsafe.Pointer(part1 + uintptr(i)))) == '(') {
		goto __15
	}
	if !(part2Ptr != uintptr(0)) {
		goto __16
	}
	if !(flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __17
	}
	XTclObjVarErrMsg(tls, interp, part1Ptr, part2Ptr, msg,
		uintptr(unsafe.Pointer(&sNEEDARRAY)), -1)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+7444, ts+66148,
		uintptr(0)))
__17:
	;
	return uintptr(0)
__16:
	;

	// part1Ptr points to an array element; first copy the element
	// name to a new string part2.

	part2 = part1 + uintptr(i) + uintptr(1)
	len2 = *(*int32)(unsafe.Pointer(bp + 104)) - i - 2
	*(*int32)(unsafe.Pointer(bp + 104 /* len1 */)) = i

	newPart2 = XTcl_Alloc(tls, uint32(len2+1))
	libc.Xmemcpy(tls, newPart2, part2, uint64(len2))
	*(*int8)(unsafe.Pointer(newPart2 + uintptr(len2))) = int8(0)
	part2 = newPart2
	part2Ptr = XTcl_NewStringObj(tls, newPart2, -1)
	if !(createPart2 != 0) {
		goto __18
	}
	(*Tcl_Obj)(unsafe.Pointer(part2Ptr)).FrefCount++
__18:
	;

	// Free the internal rep of the original part1Ptr, now renamed
	// objPtr, and set it to tclParsedVarNameType.

	objPtr = part1Ptr
	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __19
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __20
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__20:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__19:
	;

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&tclParsedVarNameType))

	// Define a new string object to hold the new part1Ptr, i.e.,
	// the array name. Set the internal rep of objPtr, reset
	// typePtr and part1 to contain the references to the array
	// name.

__21:
	;
__24:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __27
	}
	XTclAllocateFreeObjects(tls)
__27:
	;
	part1Ptr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FrefCount = 0
	if !(*(*int32)(unsafe.Pointer(bp + 104)) == 0) {
		goto __28
	}
	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Flength = 0
	goto __29
__28:
	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 104))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes, part1, uint64(*(*int32)(unsafe.Pointer(bp + 104))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes + uintptr(*(*int32)(unsafe.Pointer(bp + 104))))) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Flength = *(*int32)(unsafe.Pointer(bp + 104))
__29:
	;
	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr = uintptr(0)

	goto __22
__22:
	if 0 != 0 {
		goto __21
	}
	goto __23
__23:
	;
	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FrefCount++

	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = part1Ptr
	*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = part2

	typePtr = (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr
	part1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes
		}
		return XTcl_GetString(tls, part1Ptr)
	}()
	goto __14
__15:
	;
	goto __13
__13:
	i++
	goto __12
	goto __14
__14:
	;
__11:
	;

doneParsing:
	// part1Ptr is not an array element; look it up, and convert it to one of
	// the cached types if possible.

	if !((*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr != uintptr(0)) {
		goto __30
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __31
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr)).FfreeIntRepProc})).f(tls, part1Ptr)
__31:
	;
	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr = uintptr(0)
__30:
	;

	varPtr = XTclLookupSimpleVar(tls, interp, part1Ptr, flags, createPart1,
		bp+112, bp+120)
	if !(varPtr == uintptr(0)) {
		goto __32
	}
	if !(*(*uintptr)(unsafe.Pointer(bp + 112)) != uintptr(0) && flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __33
	}
	XTclObjVarErrMsg(tls, interp, part1Ptr, part2Ptr, msg, *(*uintptr)(unsafe.Pointer(bp + 112 /* errMsg */)), -1)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+7699, ts+66148,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes
			}
			return XTcl_GetString(tls, part1Ptr)
		}(), uintptr(0)))
__33:
	;
	if !(newPart2 != 0) {
		goto __34
	}
__35:
	_objPtr = part2Ptr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __38
	}
	XTclFreeObj(tls, _objPtr)
__38:
	;
	goto __36
__36:
	if 0 != 0 {
		goto __35
	}
	goto __37
__37:
	;
__34:
	;
	return uintptr(0)
__32:
	;

	// Cache the newly found variable if possible.

	if !(*(*int32)(unsafe.Pointer(bp + 120)) >= 0) {
		goto __39
	}
	// An indexed local variable.
	cachedNamePtr = *(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 120)))*8))

	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr = uintptr(unsafe.Pointer(&localVarNameType))
	if !(part1Ptr != cachedNamePtr) {
		goto __41
	}
	*(*uintptr)(unsafe.Pointer(part1Ptr + 32)) = cachedNamePtr
	(*Tcl_Obj)(unsafe.Pointer(cachedNamePtr)).FrefCount++
	if !((*Tcl_Obj)(unsafe.Pointer(cachedNamePtr)).FtypePtr != uintptr(unsafe.Pointer(&localVarNameType)) ||
		*(*uintptr)(unsafe.Pointer(cachedNamePtr + 32)) != uintptr(0)) {
		goto __43
	}
	if !((*Tcl_Obj)(unsafe.Pointer(cachedNamePtr)).FtypePtr != uintptr(0)) {
		goto __44
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(cachedNamePtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __45
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(cachedNamePtr)).FtypePtr)).FfreeIntRepProc})).f(tls, cachedNamePtr)
__45:
	;
	(*Tcl_Obj)(unsafe.Pointer(cachedNamePtr)).FtypePtr = uintptr(0)
__44:
	;

__43:
	;
	goto __42
__41:
	*(*uintptr)(unsafe.Pointer(part1Ptr + 32)) = uintptr(0)
__42:
	;
	*(*uintptr)(unsafe.Pointer(part1Ptr + 32 + 8 /* &.ptr2 */)) = uintptr(Intptr_t(*(*int32)(unsafe.Pointer(bp + 120))))
	goto __40
__39:
	// At least mark part1Ptr as already parsed.

	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FtypePtr = uintptr(unsafe.Pointer(&tclParsedVarNameType))
	*(*uintptr)(unsafe.Pointer(part1Ptr + 32)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(part1Ptr + 32 + 8 /* &.ptr2 */)) = uintptr(0)
__40:
	;

donePart1:
__46:
	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_LINK != 0) {
		goto __47
	}
	varPtr = *(*uintptr)(unsafe.Pointer(varPtr + 8))
	goto __46
__47:
	;

	if !(part2Ptr != uintptr(0)) {
		goto __48
	}
	// Array element sought: look it up.

	*(*uintptr)(unsafe.Pointer(arrayPtrPtr)) = varPtr
	varPtr = XTclLookupArrayElement(tls, interp, part1Ptr, part2Ptr, flags, msg,
		createPart1, createPart2, varPtr, -1)
	if !(newPart2 != 0) {
		goto __49
	}
__50:
	_objPtr1 = part2Ptr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __53
	}
	XTclFreeObj(tls, _objPtr1)
__53:
	;
	goto __51
__51:
	if 0 != 0 {
		goto __50
	}
	goto __52
__52:
	;
__49:
	;
__48:
	;
	return varPtr
}

//----------------------------------------------------------------------
//
// TclLookupSimpleVar --
//
//	This function is used by to locate a simple variable (i.e., not an
//	array element) given its name.
//
// Results:
//	The return value is a pointer to the variable structure indicated by
//	varName, or NULL if the variable couldn't be found. If the variable
//	can't be found and create is 1, a new as-yet-undefined (VAR_UNDEFINED)
//	variable structure is created, entered into a hash table, and
//	returned.
//
//	If the current CallFrame corresponds to a proc and the variable found
//	is one of the compiledLocals, its index is placed in *indexPtr.
//	Otherwise, *indexPtr will be set to (according to the needs of
//	TclObjLookupVar):
//	    -1 a global reference
//	    -2 a reference to a namespace variable
//	    -3 a non-cachable reference, i.e., one of:
//		. non-indexed local var
//		. a reference of unknown origin;
//		. resolution by a namespace or interp resolver
//
//	If the variable isn't found and creation wasn't specified, or some
//	other error occurs, NULL is returned and the corresponding error
//	message is left in *errMsgPtr.
//
//	Note: it's possible for the variable returned to be VAR_UNDEFINED even
//	if create is 1 (this only causes the hash table entry to be created).
//	For example, the variable might be a global that has been unset but is
//	still referenced by a procedure, or a variable that has been unset but
//	it only being kept in existence (if VAR_UNDEFINED) by a trace.
//
// Side effects:
//	A new hashtable entry may be created if create is 1.
//	Callers must Incr varNamePtr if they plan to Decr it if create is 1.
//
//----------------------------------------------------------------------

func XTclLookupSimpleVar(tls *libc.TLS, interp uintptr, varNamePtr uintptr, flags int32, create int32, errMsgPtr uintptr, indexPtr uintptr) uintptr { /* tclVar.c:822:5: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var iPtr uintptr = interp
	var varFramePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	// Points to the procedure call frame whose
	// variables are currently in use. Same as the
	// current procedure's frame, if any, unless
	// an "uplevel" is executing.
	var tablePtr uintptr // Points to the hashtable, if any, in which
	// to look up the variable.
	// var var1 Tcl_Var at bp+8, 8
	// Used to search for global names.
	var varPtr uintptr // Points to the Var structure returned for
	// the variable.
	// var varNsPtr uintptr at bp+16, 8

	var cxtNsPtr uintptr
	// var dummy1Ptr uintptr at bp+24, 8

	// var dummy2Ptr uintptr at bp+32, 8

	var resPtr uintptr
	// var isNew int32 at bp+48, 4

	var i int32
	var result int32
	// var varLen int32 at bp, 4

	var varName uintptr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, varNamePtr, bp)
	}()

	varPtr = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 16 /* varNsPtr */)) = uintptr(0) // Set non-NULL if a nonlocal variable.
	*(*int32)(unsafe.Pointer(indexPtr)) = -3

	if flags&TCL_GLOBAL_ONLY != 0 {
		cxtNsPtr = (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr
	} else {
		cxtNsPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnsPtr
	}

	// If this namespace has a variable resolver, then give it first crack at
	// the variable resolution. It may return a Tcl_Var value, it may signal
	// to continue onward, or it may signal an error.

	if ((*Namespace)(unsafe.Pointer(cxtNsPtr)).FvarResProc != uintptr(0) || (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr != uintptr(0)) &&
		!(flags&TCL_AVOID_RESOLVERS != 0) {
		resPtr = (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr
		if (*Namespace)(unsafe.Pointer(cxtNsPtr)).FvarResProc != 0 {
			result = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*Namespace)(unsafe.Pointer(cxtNsPtr)).FvarResProc})).f(tls, interp, varName,
				cxtNsPtr, flags, bp+8)
		} else {
			result = TCL_CONTINUE
		}

		for result == TCL_CONTINUE && resPtr != 0 {
			if (*ResolverScheme)(unsafe.Pointer(resPtr)).FvarResProc != 0 {
				result = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
				})(unsafe.Pointer(&struct{ uintptr }{(*ResolverScheme)(unsafe.Pointer(resPtr)).FvarResProc})).f(tls, interp, varName,
					cxtNsPtr, flags, bp+8 /* &var1 */)
			}
			resPtr = (*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr
		}

		if result == TCL_OK {
			return *(*Tcl_Var)(unsafe.Pointer(bp + 8 /* var1 */))
		} else if result != TCL_CONTINUE {
			return uintptr(0)
		}
	}

	// Look up varName. Look it up as either a namespace variable or as a
	// local variable in a procedure call frame (varFramePtr). Interpret
	// varName as a namespace variable if:
	//    1) so requested by a TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY flag,
	//    2) there is no active frame (we're at the global :: scope),
	//    3) the active frame was pushed to define the namespace context for a
	//	     "namespace eval" or "namespace inscope" command,
	//    4) the name has namespace qualifiers ("::"s).
	// Otherwise, if varName is a local variable, search first in the frame's
	// array of compiler-allocated local variables, then in its hashtable for
	// runtime-created local variables.
	//
	// If create and the variable isn't found, create the variable and, if
	// necessary, create varFramePtr's local var hashtable.

	if flags&(TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY) != 0 ||
		!((*CallFrame)(unsafe.Pointer(varFramePtr)).FisProcCallFrame&FRAME_IS_PROC != 0) ||
		libc.Xstrstr(tls, varName, ts+7376) != uintptr(0) {
		// var tail uintptr at bp+40, 8

		var lookGlobal int32 = libc.Bool32(flags&TCL_GLOBAL_ONLY != 0 ||
			cxtNsPtr == (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr ||
			int32(*(*int8)(unsafe.Pointer(varName))) == ':' && int32(*(*int8)(unsafe.Pointer(varName + uintptr(1)))) == ':')

		if lookGlobal != 0 {
			*(*int32)(unsafe.Pointer(indexPtr)) = -1
			flags = (flags | TCL_GLOBAL_ONLY) & libc.CplInt32(TCL_NAMESPACE_ONLY)
		} else {
			if flags&TCL_AVOID_RESOLVERS != 0 {
				flags = flags | TCL_NAMESPACE_ONLY
			}
			if flags&TCL_NAMESPACE_ONLY != 0 {
				*(*int32)(unsafe.Pointer(indexPtr)) = -2
			}
		}

		// Don't pass TCL_LEAVE_ERR_MSG, we may yet create the variable, or
		// otherwise generate our own error!

		varPtr = sObjFindNamespaceVar(tls, interp, varNamePtr,
			cxtNsPtr,
			(flags|TCL_AVOID_RESOLVERS)&libc.CplInt32(TCL_LEAVE_ERR_MSG))
		if varPtr == uintptr(0) {
			var tailPtr uintptr

			if create != 0 { // Var wasn't found so create it.
				XTclGetNamespaceForQualName(tls, interp, varName, cxtNsPtr,
					flags, bp+16, bp+24, bp+32, bp+40)
				if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) {
					*(*uintptr)(unsafe.Pointer(errMsgPtr)) = uintptr(unsafe.Pointer(&sBADNAMESPACE))
					return uintptr(0)
				} else if *(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0) {
					*(*uintptr)(unsafe.Pointer(errMsgPtr)) = uintptr(unsafe.Pointer(&sMISSINGNAME))
					return uintptr(0)
				}
				if *(*uintptr)(unsafe.Pointer(bp + 40)) != varName {
					tailPtr = XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* tail */)), -1)
				} else {
					tailPtr = varNamePtr
				}
				varPtr = sVarHashCreateVar1(tls, *(*uintptr)(unsafe.Pointer(bp + 16))+248, tailPtr,
					bp+48)
				if lookGlobal != 0 {
					// The variable was created starting from the global
					// namespace: a global reference is returned even if it
					// wasn't explicitly requested.

					*(*int32)(unsafe.Pointer(indexPtr)) = -1
				} else {
					*(*int32)(unsafe.Pointer(indexPtr)) = -2
				}
			} else { // Var wasn't found and not to create it.
				*(*uintptr)(unsafe.Pointer(errMsgPtr)) = uintptr(unsafe.Pointer(&sNOSUCHVAR))
				return uintptr(0)
			}
		}
	} else { // Local var: look in frame varFramePtr.
		var localCt int32 = (*CallFrame)(unsafe.Pointer(varFramePtr)).FnumCompiledLocals

		if localCt > 0 {
			var objPtrPtr uintptr = (*CallFrame)(unsafe.Pointer(varFramePtr)).FlocalCachePtr + 8
			var localNameStr uintptr
			// var localLen int32 at bp+52, 4

			i = 0
		__1:
			if !(i < localCt) {
				goto __3
			}
			{
				var objPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtrPtr))

				if objPtr != 0 {
					localNameStr = func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
							return func() uintptr {
								*(*int32)(unsafe.Pointer(bp + 52)) = (*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength
								return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
							}()
						}
						return XTcl_GetStringFromObj(tls, objPtr, bp+52)
					}()

					if *(*int32)(unsafe.Pointer(bp)) == *(*int32)(unsafe.Pointer(bp + 52)) && int32(*(*int8)(unsafe.Pointer(varName))) == int32(*(*int8)(unsafe.Pointer(localNameStr))) &&
						!(libc.Xmemcmp(tls, varName, localNameStr, uint64(*(*int32)(unsafe.Pointer(bp)))) != 0) {
						*(*int32)(unsafe.Pointer(indexPtr)) = i
						return (*CallFrame)(unsafe.Pointer(varFramePtr)).FcompiledLocals + uintptr(i)*16
					}
				}

			}
			goto __2
		__2:
			i++
			objPtrPtr += 8
			goto __1
			goto __3
		__3:
		}
		tablePtr = (*CallFrame)(unsafe.Pointer(varFramePtr)).FvarTablePtr
		if create != 0 {
			if tablePtr == uintptr(0) {
				tablePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TclVarHashTable{})))
				XTclInitVarHashTable(tls, tablePtr, uintptr(0))
				(*CallFrame)(unsafe.Pointer(varFramePtr)).FvarTablePtr = tablePtr
			}
			varPtr = sVarHashCreateVar1(tls, tablePtr, varNamePtr, bp+48)
		} else {
			varPtr = uintptr(0)
			if tablePtr != uintptr(0) {
				varPtr = sVarHashCreateVar1(tls, tablePtr, varNamePtr, uintptr(0))
			}
			if varPtr == uintptr(0) {
				*(*uintptr)(unsafe.Pointer(errMsgPtr)) = uintptr(unsafe.Pointer(&sNOSUCHVAR))
			}
		}
	}
	return varPtr
}

//----------------------------------------------------------------------
//
// TclLookupArrayElement --
//
//	This function is used to locate a variable which is in an array's
//	hashtable given a pointer to the array's Var structure and the
//	element's name.
//
// Results:
//	The return value is a pointer to the variable structure , or NULL if
//	the variable couldn't be found.
//
//	If arrayPtr points to a variable that isn't an array and createPart1
//	is 1, the corresponding variable will be converted to an array.
//	Otherwise, NULL is returned and an error message is left in the
//	interp's result if TCL_LEAVE_ERR_MSG is set in flags.
//
//	If the variable is not found and createPart2 is 1, the variable is
//	created. Otherwise, NULL is returned and an error message is left in
//	the interp's result if TCL_LEAVE_ERR_MSG is set in flags.
//
//	Note: it's possible for the variable returned to be VAR_UNDEFINED even
//	if createPart1 or createPart2 are 1 (these only cause the hash table
//	entry or array to be created). For example, the variable might be a
//	global that has been unset but is still referenced by a procedure, or
//	a variable that has been unset but it only being kept in existence (if
//	VAR_UNDEFINED) by a trace.
//
// Side effects:
//	The variable at arrayPtr may be converted to be an array if
//	createPart1 is 1. A new hashtable entry may be created if createPart2
//	is 1.
//	When createElem is 1, callers must incr elNamePtr if they plan
//	to decr it.
//
//----------------------------------------------------------------------

func XTclLookupArrayElement(tls *libc.TLS, interp uintptr, arrayNamePtr uintptr, elNamePtr uintptr, flags int32, msg uintptr, createArray int32, createElem int32, arrayPtr uintptr, index int32) uintptr { /* tclVar.c:1056:5: */
	bp := tls.Alloc(164)
	defer tls.Free(164)

	// var isNew int32 at bp+160, 4

	var varPtr uintptr
	var tablePtr uintptr
	var nsPtr uintptr

	// We're dealing with an array element. Make sure the variable is an array
	// and look up the element (create the element if desired).

	if *(*uintptr)(unsafe.Pointer(arrayPtr + 8)) == uintptr(0) && !((*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_ARRAY_ELEMENT != 0) {
		if !(createArray != 0) {
			if flags&TCL_LEAVE_ERR_MSG != 0 {
				XTclObjVarErrMsg(tls, interp, arrayNamePtr, elNamePtr, msg,
					uintptr(unsafe.Pointer(&sNOSUCHVAR)), index)
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+66148,
					func() uintptr {
						if arrayNamePtr != 0 {
							return func() uintptr {
								if (*Tcl_Obj)(unsafe.Pointer(arrayNamePtr)).Fbytes != 0 {
									return (*Tcl_Obj)(unsafe.Pointer(arrayNamePtr)).Fbytes
								}
								return XTcl_GetString(tls, arrayNamePtr)
							}()
						}
						return uintptr(0)
					}(), uintptr(0)))
			}
			return uintptr(0)
		}

		// Make sure we are not resurrecting a namespace variable from a
		// deleted namespace!

		if (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_DEAD_HASH != 0 {
			if flags&TCL_LEAVE_ERR_MSG != 0 {
				XTclObjVarErrMsg(tls, interp, arrayNamePtr, elNamePtr, msg,
					uintptr(unsafe.Pointer(&sDANGLINGVAR)), index)
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7699, ts+66148,
					func() uintptr {
						if arrayNamePtr != 0 {
							return func() uintptr {
								if (*Tcl_Obj)(unsafe.Pointer(arrayNamePtr)).Fbytes != 0 {
									return (*Tcl_Obj)(unsafe.Pointer(arrayNamePtr)).Fbytes
								}
								return XTcl_GetString(tls, arrayNamePtr)
							}()
						}
						return uintptr(0)
					}(), uintptr(0)))
			}
			return uintptr(0)
		}

		(*Var)(unsafe.Pointer(arrayPtr)).Fflags = (*Var)(unsafe.Pointer(arrayPtr)).Fflags&libc.CplInt32(VAR_LINK) | VAR_ARRAY
		tablePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TclVarHashTable{})))
		*(*uintptr)(unsafe.Pointer(arrayPtr + 8)) = tablePtr

		if (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_IN_HASHTABLE != 0 && func() uintptr {
			if (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
				return (*TclVarHashTable)(unsafe.Pointer((*VarInHash)(unsafe.Pointer(arrayPtr)).Fentry.FtablePtr)).FnsPtr
			}
			return uintptr(0)
		}() != 0 {
			nsPtr = func() uintptr {
				if (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
					return (*TclVarHashTable)(unsafe.Pointer((*VarInHash)(unsafe.Pointer(arrayPtr)).Fentry.FtablePtr)).FnsPtr
				}
				return uintptr(0)
			}()
		} else {
			nsPtr = uintptr(0)
		}
		XTclInitVarHashTable(tls, *(*uintptr)(unsafe.Pointer(arrayPtr + 8)), nsPtr)
	} else if !((*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_ARRAY != 0) {
		if flags&TCL_LEAVE_ERR_MSG != 0 {
			XTclObjVarErrMsg(tls, interp, arrayNamePtr, elNamePtr, msg, uintptr(unsafe.Pointer(&sNEEDARRAY)),
				index)
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+7699, ts+66148,
				func() uintptr {
					if arrayNamePtr != 0 {
						return func() uintptr {
							if (*Tcl_Obj)(unsafe.Pointer(arrayNamePtr)).Fbytes != 0 {
								return (*Tcl_Obj)(unsafe.Pointer(arrayNamePtr)).Fbytes
							}
							return XTcl_GetString(tls, arrayNamePtr)
						}()
					}
					return uintptr(0)
				}(), uintptr(0)))
		}
		return uintptr(0)
	}

	if createElem != 0 {
		varPtr = sVarHashCreateVar1(tls, *(*uintptr)(unsafe.Pointer(arrayPtr + 8)), elNamePtr,
			bp+160)
		if *(*int32)(unsafe.Pointer(bp + 160)) != 0 {
			if (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_SEARCH_ACTIVE != 0 {
				sDeleteSearches(tls, interp, arrayPtr)
			}
			(*Var)(unsafe.Pointer(varPtr)).Fflags = (*Var)(unsafe.Pointer(varPtr)).Fflags&libc.CplInt32(VAR_ARRAY) | VAR_ARRAY_ELEMENT
		}
	} else {
		varPtr = sVarHashCreateVar1(tls, *(*uintptr)(unsafe.Pointer(arrayPtr + 8)), elNamePtr, uintptr(0))
		if varPtr == uintptr(0) {
			if flags&TCL_LEAVE_ERR_MSG != 0 {
				XTclObjVarErrMsg(tls, interp, arrayNamePtr, elNamePtr, msg,
					uintptr(unsafe.Pointer(&sNOSUCHELEMENT)), index)
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+120, ts+4178, ts+7699, ts+66156,
					func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(elNamePtr)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(elNamePtr)).Fbytes
						}
						return XTcl_GetString(tls, elNamePtr)
					}(), uintptr(0)))
			}
		}
	}
	return varPtr
}

//----------------------------------------------------------------------
//
// Tcl_GetVar --
//
//	Return the value of a Tcl variable as a string.
//
// Results:
//	The return value points to the current value of varName as a string.
//	If the variable is not defined or can't be read because of a clash in
//	array usage then a NULL pointer is returned and an error message is
//	left in the interp's result if the TCL_LEAVE_ERR_MSG flag is set.
//	Note: the return value is only valid up until the next change to the
//	variable; if you depend on the value lasting longer than that, then
//	make yourself a private copy.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetVar(tls *libc.TLS, interp uintptr, varName uintptr, flags int32) uintptr { /* tclVar.c:1178:12: */
	var varNamePtr uintptr = XTcl_NewStringObj(tls, varName, -1)
	var resultPtr uintptr = XTcl_ObjGetVar2(tls, interp, varNamePtr, uintptr(0), flags)

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(varNamePtr + 32)) = XtclFreeObjList
				XtclFreeObjList = varNamePtr
			}
		} else {
			XTclFreeObj(tls, varNamePtr)
		}
	}

	if resultPtr == uintptr(0) {
		return uintptr(0)
	}
	return func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
		}
		return XTcl_GetString(tls, resultPtr)
	}()
}

//----------------------------------------------------------------------
//
// Tcl_GetVar2 --
//
//	Return the value of a Tcl variable as a string, given a two-part name
//	consisting of array name and element within array.
//
// Results:
//	The return value points to the current value of the variable given by
//	part1 and part2 as a string. If the specified variable doesn't exist,
//	or if there is a clash in array usage, then NULL is returned and a
//	message will be left in the interp's result if the TCL_LEAVE_ERR_MSG
//	flag is set. Note: the return value is only valid up until the next
//	change to the variable; if you depend on the value lasting longer than
//	that, then make yourself a private copy.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetVar2(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, flags int32) uintptr { /* tclVar.c:1221:12: */
	var resultPtr uintptr
	var part2Ptr uintptr = uintptr(0)
	var part1Ptr uintptr = XTcl_NewStringObj(tls, part1, -1)

	if part2 != 0 {
		part2Ptr = XTcl_NewStringObj(tls, part2, -1)
		(*Tcl_Obj)(unsafe.Pointer(part2Ptr)).FrefCount++
	}

	resultPtr = XTcl_ObjGetVar2(tls, interp, part1Ptr, part2Ptr, flags)

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = part1Ptr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if part2Ptr != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = part2Ptr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if resultPtr == uintptr(0) {
		return uintptr(0)
	}
	return func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes
		}
		return XTcl_GetString(tls, resultPtr)
	}()
}

//----------------------------------------------------------------------
//
// Tcl_GetVar2Ex --
//
//	Return the value of a Tcl variable as a Tcl object, given a two-part
//	name consisting of array name and element within array.
//
// Results:
//	The return value points to the current object value of the variable
//	given by part1Ptr and part2Ptr. If the specified variable doesn't
//	exist, or if there is a clash in array usage, then NULL is returned
//	and a message will be left in the interpreter's result if the
//	TCL_LEAVE_ERR_MSG flag is set.
//
// Side effects:
//	The ref count for the returned object is _not_ incremented to reflect
//	the returned reference; if you want to keep a reference to the object
//	you must increment its ref count yourself.
//
//----------------------------------------------------------------------

func XTcl_GetVar2Ex(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, flags int32) uintptr { /* tclVar.c:1276:9: */
	var resPtr uintptr
	var part2Ptr uintptr = uintptr(0)
	var part1Ptr uintptr = XTcl_NewStringObj(tls, part1, -1)

	if part2 != 0 {
		part2Ptr = XTcl_NewStringObj(tls, part2, -1)
		(*Tcl_Obj)(unsafe.Pointer(part2Ptr)).FrefCount++
	}

	resPtr = XTcl_ObjGetVar2(tls, interp, part1Ptr, part2Ptr, flags)

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = part1Ptr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if part2Ptr != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = part2Ptr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	return resPtr
}

//----------------------------------------------------------------------
//
// Tcl_ObjGetVar2 --
//
//	Return the value of a Tcl variable as a Tcl object, given a two-part
//	name consisting of array name and element within array.
//
// Results:
//	The return value points to the current object value of the variable
//	given by part1Ptr and part2Ptr. If the specified variable doesn't
//	exist, or if there is a clash in array usage, then NULL is returned
//	and a message will be left in the interpreter's result if the
//	TCL_LEAVE_ERR_MSG flag is set.
//
// Side effects:
//	The ref count for the returned object is _not_ incremented to reflect
//	the returned reference; if you want to keep a reference to the object
//	you must increment its ref count yourself.
//
//	Callers must incr part2Ptr if they plan to decr it.
//
//----------------------------------------------------------------------

func XTcl_ObjGetVar2(tls *libc.TLS, interp uintptr, part1Ptr uintptr, part2Ptr uintptr, flags int32) uintptr { /* tclVar.c:1329:9: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var varPtr uintptr
	// var arrayPtr uintptr at bp, 8

	// Filter to pass through only the flags this interface supports.

	flags = flags & (TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG)
	varPtr = XTclObjLookupVarEx(tls, interp, part1Ptr, part2Ptr, flags, ts+6057,
		/*createPart1*/ 0 /*createPart2*/, 1, bp)
	if varPtr == uintptr(0) {
		return uintptr(0)
	}

	return XTclPtrGetVarIdx(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp /* arrayPtr */)), part1Ptr, part2Ptr,
		flags, -1)
}

//----------------------------------------------------------------------
//
// TclPtrGetVar --
//
//	Return the value of a Tcl variable as a Tcl object, given the pointers
//	to the variable's (and possibly containing array's) VAR structure.
//
// Results:
//	The return value points to the current object value of the variable
//	given by varPtr. If the specified variable doesn't exist, or if there
//	is a clash in array usage, then NULL is returned and a message will be
//	left in the interpreter's result if the TCL_LEAVE_ERR_MSG flag is set.
//
// Side effects:
//	The ref count for the returned object is _not_ incremented to reflect
//	the returned reference; if you want to keep a reference to the object
//	you must increment its ref count yourself.
//
//----------------------------------------------------------------------

func XTclPtrGetVar(tls *libc.TLS, interp uintptr, varPtr Tcl_Var, arrayPtr Tcl_Var, part1Ptr uintptr, part2Ptr uintptr, flags int32) uintptr { /* tclVar.c:1381:9: */
	if varPtr == uintptr(0) {
		XTcl_Panic(tls, ts+66164, 0)
	}
	if part1Ptr == uintptr(0) {
		XTcl_Panic(tls, ts+66188, 0)
	}
	return XTclPtrGetVarIdx(tls, interp, varPtr, arrayPtr,
		part1Ptr, part2Ptr, flags, -1)
}

//----------------------------------------------------------------------
//
// TclPtrGetVarIdx --
//
//	Return the value of a Tcl variable as a Tcl object, given the pointers
//	to the variable's (and possibly containing array's) VAR structure.
//
// Results:
//	The return value points to the current object value of the variable
//	given by varPtr. If the specified variable doesn't exist, or if there
//	is a clash in array usage, then NULL is returned and a message will be
//	left in the interpreter's result if the TCL_LEAVE_ERR_MSG flag is set.
//
// Side effects:
//	The ref count for the returned object is _not_ incremented to reflect
//	the returned reference; if you want to keep a reference to the object
//	you must increment its ref count yourself.
//
//----------------------------------------------------------------------

func XTclPtrGetVarIdx(tls *libc.TLS, interp uintptr, varPtr uintptr, arrayPtr uintptr, part1Ptr uintptr, part2Ptr uintptr, flags int32, index int32) uintptr { /* tclVar.c:1427:9: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var iPtr uintptr
	var msg uintptr
	iPtr = interp

	// Invoke any read traces that have been set for the variable.

	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_TRACED_READ != 0 ||
		arrayPtr != 0 && (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_TRACED_READ != 0) {
		goto __1
	}
	if !(TCL_ERROR == XTclObjCallVarTraces(tls, iPtr, arrayPtr, varPtr,
		part1Ptr, part2Ptr,
		flags&(TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY)|
			TCL_TRACE_READS, flags&TCL_LEAVE_ERR_MSG, index)) {
		goto __2
	}
	goto errorReturn
__2:
	;
__1:
	;

	// Return the element if it's an existing scalar variable.

	if !(!((*Var)(unsafe.Pointer(varPtr)).Fflags&(VAR_ARRAY|VAR_LINK) != 0) && !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0))) {
		goto __3
	}
	return *(*uintptr)(unsafe.Pointer(varPtr + 8))
__3:
	;

	if !(flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __4
	}
	if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0) && arrayPtr != 0 &&
		!(*(*uintptr)(unsafe.Pointer(arrayPtr + 8)) == uintptr(0))) {
		goto __5
	}
	msg = uintptr(unsafe.Pointer(&sNOSUCHELEMENT))
	goto __6
__5:
	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_ARRAY != 0) {
		goto __7
	}
	msg = uintptr(unsafe.Pointer(&sISARRAY))
	goto __8
__7:
	msg = uintptr(unsafe.Pointer(&sNOSUCHVAR))
__8:
	;
__6:
	;
	XTclObjVarErrMsg(tls, interp, part1Ptr, part2Ptr, ts+6057, msg, index)
__4:
	;

	// An error. If the variable doesn't exist anymore and no-one's using it,
	// then free up the relevant structures and hash table entries.

errorReturn:
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+66214, ts+66148, uintptr(0)))
	if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) {
		goto __9
	}
	XTclCleanupVar(tls, varPtr, arrayPtr)
__9:
	;
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_SetObjCmd --
//
//	This function is invoked to process the "set" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result value.
//
// Side effects:
//	A variable's value may be changed.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_SetObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:1513:1: */
	var varValueObj uintptr

	if objc == 2 {
		varValueObj = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), TCL_LEAVE_ERR_MSG)
		if varValueObj == uintptr(0) {
			return TCL_ERROR
		}
		XTcl_SetObjResult(tls, interp, varValueObj)
		return TCL_OK
	} else if objc == 3 {
		varValueObj = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)),
			TCL_LEAVE_ERR_MSG)
		if varValueObj == uintptr(0) {
			return TCL_ERROR
		}
		XTcl_SetObjResult(tls, interp, varValueObj)
		return TCL_OK
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66219)
		return TCL_ERROR
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// Tcl_SetVar --
//
//	Change the value of a variable.
//
// Results:
//	Returns a pointer to the malloc'ed string which is the character
//	representation of the variable's new value. The caller must not modify
//	this string. If the write operation was disallowed then NULL is
//	returned; if the TCL_LEAVE_ERR_MSG flag is set, then an explanatory
//	message will be left in the interp's result. Note that the returned
//	string may not be the same as newValue; this is because variable
//	traces may modify the variable's value.
//
// Side effects:
//	If varName is defined as a local or global variable in interp, its
//	value is changed to newValue. If varName isn't currently defined, then
//	a new global variable by that name is created.
//
//----------------------------------------------------------------------

func XTcl_SetVar(tls *libc.TLS, interp uintptr, varName uintptr, newValue uintptr, flags int32) uintptr { /* tclVar.c:1567:12: */
	var varValuePtr uintptr
	var varNamePtr uintptr = XTcl_NewStringObj(tls, varName, -1)

	(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FrefCount++
	varValuePtr = XTcl_ObjSetVar2(tls, interp, varNamePtr, uintptr(0),
		XTcl_NewStringObj(tls, newValue, -1), flags)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = varNamePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}

	if varValuePtr == uintptr(0) {
		return uintptr(0)
	}
	return func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes
		}
		return XTcl_GetString(tls, varValuePtr)
	}()
}

//----------------------------------------------------------------------
//
// Tcl_SetVar2 --
//
//	Given a two-part variable name, which may refer either to a scalar
//	variable or an element of an array, change the value of the variable.
//	If the named scalar or array or element doesn't exist then create one.
//
// Results:
//	Returns a pointer to the malloc'ed string which is the character
//	representation of the variable's new value. The caller must not modify
//	this string. If the write operation was disallowed because an array
//	was expected but not found (or vice versa), then NULL is returned; if
//	the TCL_LEAVE_ERR_MSG flag is set, then an explanatory message will be
//	left in the interp's result. Note that the returned string may not be
//	the same as newValue; this is because variable traces may modify the
//	variable's value.
//
// Side effects:
//	The value of the given variable is set. If either the array or the
//	entry didn't exist then a new one is created.
//
//----------------------------------------------------------------------

func XTcl_SetVar2(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, newValue uintptr, flags int32) uintptr { /* tclVar.c:1617:12: */
	var varValuePtr uintptr = XTcl_SetVar2Ex(tls, interp, part1, part2,
		XTcl_NewStringObj(tls, newValue, -1), flags)

	if varValuePtr == uintptr(0) {
		return uintptr(0)
	}
	return func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes
		}
		return XTcl_GetString(tls, varValuePtr)
	}()
}

//----------------------------------------------------------------------
//
// Tcl_SetVar2Ex --
//
//	Given a two-part variable name, which may refer either to a scalar
//	variable or an element of an array, change the value of the variable
//	to a new Tcl object value. If the named scalar or array or element
//	doesn't exist then create one.
//
// Results:
//	Returns a pointer to the Tcl_Obj holding the new value of the
//	variable. If the write operation was disallowed because an array was
//	expected but not found (or vice versa), then NULL is returned; if the
//	TCL_LEAVE_ERR_MSG flag is set, then an explanatory message will be
//	left in the interpreter's result. Note that the returned object may
//	not be the same one referenced by newValuePtr; this is because
//	variable traces may modify the variable's value.
//
// Side effects:
//	The value of the given variable is set. If either the array or the
//	entry didn't exist then a new variable is created.
//
//	The reference count is decremented for any old value of the variable
//	and incremented for its new value. If the new value for the variable
//	is not the same one referenced by newValuePtr (perhaps as a result of
//	a variable trace), then newValuePtr's ref count is left unchanged by
//	Tcl_SetVar2Ex. newValuePtr's ref count is also left unchanged if we
//	are appending it as a string value: that is, if "flags" includes
//	TCL_APPEND_VALUE but not TCL_LIST_ELEMENT.
//
//	The reference count for the returned object is _not_ incremented: if
//	you want to keep a reference to the object you must increment its ref
//	count yourself.
//
//----------------------------------------------------------------------

func XTcl_SetVar2Ex(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, newValuePtr uintptr, flags int32) uintptr { /* tclVar.c:1679:9: */
	var resPtr uintptr
	var part2Ptr uintptr = uintptr(0)
	var part1Ptr uintptr = XTcl_NewStringObj(tls, part1, -1)

	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FrefCount++
	if part2 != 0 {
		part2Ptr = XTcl_NewStringObj(tls, part2, -1)
		(*Tcl_Obj)(unsafe.Pointer(part2Ptr)).FrefCount++
	}

	resPtr = XTcl_ObjSetVar2(tls, interp, part1Ptr, part2Ptr, newValuePtr, flags)

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = part1Ptr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if part2Ptr != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = part2Ptr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	return resPtr
}

//----------------------------------------------------------------------
//
// Tcl_ObjSetVar2 --
//
//	This function is the same as Tcl_SetVar2Ex above, except the variable
//	names are passed in Tcl object instead of strings.
//
// Results:
//	Returns a pointer to the Tcl_Obj holding the new value of the
//	variable. If the write operation was disallowed because an array was
//	expected but not found (or vice versa), then NULL is returned; if the
//	TCL_LEAVE_ERR_MSG flag is set, then an explanatory message will be
//	left in the interpreter's result. Note that the returned object may
//	not be the same one referenced by newValuePtr; this is because
//	variable traces may modify the variable's value.
//
// Side effects:
//	The value of the given variable is set. If either the array or the
//	entry didn't exist then a new variable is created.
//	Callers must Incr part1Ptr if they plan to Decr it.
//	Callers must Incr part2Ptr if they plan to Decr it.
//
//----------------------------------------------------------------------

func XTcl_ObjSetVar2(tls *libc.TLS, interp uintptr, part1Ptr uintptr, part2Ptr uintptr, newValuePtr uintptr, flags int32) uintptr { /* tclVar.c:1737:9: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var varPtr uintptr
	// var arrayPtr uintptr at bp, 8

	// Filter to pass through only the flags this interface supports.

	flags = flags & (TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG |
		TCL_APPEND_VALUE | TCL_LIST_ELEMENT)
	varPtr = XTclObjLookupVarEx(tls, interp, part1Ptr, part2Ptr, flags, ts+5888,
		/*createPart1*/ 1 /*createPart2*/, 1, bp)
	if varPtr == uintptr(0) {
		if (*Tcl_Obj)(unsafe.Pointer(newValuePtr)).FrefCount == 0 {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = newValuePtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}
		return uintptr(0)
	}

	return XTclPtrSetVarIdx(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp /* arrayPtr */)), part1Ptr, part2Ptr,
		newValuePtr, flags, -1)
}

//----------------------------------------------------------------------
//
// TclPtrSetVar --
//
//	This function is the same as Tcl_SetVar2Ex above, except that it
//	requires pointers to the variable's Var structs in addition to the
//	variable names.
//
// Results:
//	Returns a pointer to the Tcl_Obj holding the new value of the
//	variable. If the write operation was disallowed because an array was
//	expected but not found (or vice versa), then NULL is returned; if the
//	TCL_LEAVE_ERR_MSG flag is set, then an explanatory message will be
//	left in the interpreter's result. Note that the returned object may
//	not be the same one referenced by newValuePtr; this is because
//	variable traces may modify the variable's value.
//
// Side effects:
//	The value of the given variable is set. If either the array or the
//	entry didn't exist then a new variable is created.
//
//----------------------------------------------------------------------

func XTclPtrSetVar(tls *libc.TLS, interp uintptr, varPtr Tcl_Var, arrayPtr Tcl_Var, part1Ptr uintptr, part2Ptr uintptr, newValuePtr uintptr, flags int32) uintptr { /* tclVar.c:1799:9: */
	if varPtr == uintptr(0) {
		XTcl_Panic(tls, ts+66164, 0)
	}
	if part1Ptr == uintptr(0) {
		XTcl_Panic(tls, ts+66188, 0)
	}
	if newValuePtr == uintptr(0) {
		XTcl_Panic(tls, ts+66238, 0)
	}
	return XTclPtrSetVarIdx(tls, interp, varPtr, arrayPtr,
		part1Ptr, part2Ptr, newValuePtr, flags, -1)
}

//----------------------------------------------------------------------
//
// TclPtrSetVarIdx --
//
//	This function is the same as Tcl_SetVar2Ex above, except that it
//	requires pointers to the variable's Var structs in addition to the
//	variable names.
//
// Results:
//	Returns a pointer to the Tcl_Obj holding the new value of the
//	variable. If the write operation was disallowed because an array was
//	expected but not found (or vice versa), then NULL is returned; if the
//	TCL_LEAVE_ERR_MSG flag is set, then an explanatory message will be
//	left in the interpreter's result. Note that the returned object may
//	not be the same one referenced by newValuePtr; this is because
//	variable traces may modify the variable's value.
//
// Side effects:
//	The value of the given variable is set. If either the array or the
//	entry didn't exist then a new variable is created.
//
//----------------------------------------------------------------------

func XTclPtrSetVarIdx(tls *libc.TLS, interp uintptr, varPtr uintptr, arrayPtr uintptr, part1Ptr uintptr, part2Ptr uintptr, newValuePtr uintptr, flags int32, index int32) uintptr { /* tclVar.c:1853:9: */
	bp := tls.Alloc(128)
	defer tls.Free(128)

	var iPtr uintptr
	var oldValuePtr uintptr
	var resultPtr uintptr
	var result int32
	var cleanupOnEarlyError int32
	var _objPtr uintptr
	var _objPtr1 uintptr
	iPtr = interp
	resultPtr = uintptr(0)
	cleanupOnEarlyError = libc.Bool32((*Tcl_Obj)(unsafe.Pointer(newValuePtr)).FrefCount == 0)

	// If the variable is in a hashtable and its hPtr field is NULL, then we
	// may have an upvar to an array element where the array was deleted or an
	// upvar to a namespace variable whose namespace was deleted. Generate an
	// error (allowing the variable to be reset would screw up our storage
	// allocation and is meaningless anyway).

	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_DEAD_HASH != 0) {
		goto __1
	}
	if !(flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __2
	}
	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_ARRAY_ELEMENT != 0) {
		goto __3
	}
	XTclObjVarErrMsg(tls, interp, part1Ptr, part2Ptr, ts+5888,
		uintptr(unsafe.Pointer(&sDANGLINGELEMENT)), index)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+66156, uintptr(0)))
	goto __4
__3:
	XTclObjVarErrMsg(tls, interp, part1Ptr, part2Ptr, ts+5888,
		uintptr(unsafe.Pointer(&sDANGLINGVAR)), index)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+7699, ts+66148, uintptr(0)))
__4:
	;
__2:
	;
	goto earlyError
__1:
	;

	// It's an error to try to set an array variable itself.

	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_ARRAY != 0) {
		goto __5
	}
	if !(flags&TCL_LEAVE_ERR_MSG != 0) {
		goto __6
	}
	XTclObjVarErrMsg(tls, interp, part1Ptr, part2Ptr, ts+5888, uintptr(unsafe.Pointer(&sISARRAY)), index)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+64, ts+4178, ts+29062, ts+29068, uintptr(0)))
__6:
	;
	goto earlyError
__5:
	;

	// Invoke any read traces that have been set for the variable if it is
	// requested. This was done for INST_LAPPEND_* but that was inconsistent
	// with the non-bc instruction, and would cause failures trying to
	// lappend to any non-existing ::env var, which is inconsistent with
	// documented behavior. [Bug #3057639].

	if !(flags&TCL_TRACE_READS != 0 && ((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_TRACED_READ != 0 ||
		arrayPtr != 0 && (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_TRACED_READ != 0)) {
		goto __7
	}
	if !(TCL_ERROR == XTclObjCallVarTraces(tls, iPtr, arrayPtr, varPtr,
		part1Ptr, part2Ptr,
		TCL_TRACE_READS, flags&TCL_LEAVE_ERR_MSG, index)) {
		goto __8
	}
	goto earlyError
__8:
	;
__7:
	;

	// Set the variable's new value. If appending, append the new value to the
	// variable, either as a list element or as a string. Also, if appending,
	// then if the variable's old value is unshared we can modify it directly,
	// otherwise we must create a new copy to modify: this is "copy on write".

	oldValuePtr = *(*uintptr)(unsafe.Pointer(varPtr + 8))
	if !(flags&TCL_LIST_ELEMENT != 0 && !(flags&TCL_APPEND_VALUE != 0)) {
		goto __9
	}
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = uintptr(0)
__9:
	;
	if !(flags&(TCL_APPEND_VALUE|TCL_LIST_ELEMENT) != 0) {
		goto __10
	}
	if !(flags&TCL_LIST_ELEMENT != 0) {
		goto __12
	} // Append list element.
	if !(oldValuePtr == uintptr(0)) {
		goto __14
	}
__16:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __19
	}
	XTclAllocateFreeObjects(tls)
__19:
	;
	oldValuePtr = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __17
__17:
	if 0 != 0 {
		goto __16
	}
	goto __18
__18:
	;
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr = uintptr(0)

	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = oldValuePtr
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount++ // Since var is referenced.
	goto __15
__14:
	if !((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount > 1) {
		goto __20
	}
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = XTcl_DuplicateObj(tls, oldValuePtr)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount, 1) > 1) {
		goto __21
	}
	goto __22
__21:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __23
	}

	if !((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != XtclEmptyStringRep) {
		goto __25
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes)
__25:
	;
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Flength = -1
__26:
	;
	*(*uintptr)(unsafe.Pointer(oldValuePtr + 32)) = XtclFreeObjList
	XtclFreeObjList = oldValuePtr
	goto __27
__27:
	if 0 != 0 {
		goto __26
	}
	goto __28
__28:
	;
	goto __24
__23:
	XTclFreeObj(tls, oldValuePtr)
__24:
	;
__22:
	;

	oldValuePtr = *(*uintptr)(unsafe.Pointer(varPtr + 8))
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount++ // Since var is referenced.
__20:
	;
__15:
	;
	result = XTcl_ListObjAppendElement(tls, interp, oldValuePtr,
		newValuePtr)
	if !(result != TCL_OK) {
		goto __29
	}
	goto earlyError
__29:
	;
	goto __13
__12: // Append string.
	// We append newValuePtr's bytes but don't change its ref count.

	if !(oldValuePtr == uintptr(0)) {
		goto __30
	}
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = newValuePtr
	(*Tcl_Obj)(unsafe.Pointer(newValuePtr)).FrefCount++
	goto __31
__30:
	if !((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount > 1) {
		goto __32
	} // Append to copy.
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = XTcl_DuplicateObj(tls, oldValuePtr)

	XTclContinuationsCopy(tls, *(*uintptr)(unsafe.Pointer(varPtr + 8)), oldValuePtr)

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount, 1) > 1) {
		goto __33
	}
	goto __34
__33:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __35
	}

	if !((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != XtclEmptyStringRep) {
		goto __37
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes)
__37:
	;
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Flength = -1
__38:
	;
	*(*uintptr)(unsafe.Pointer(oldValuePtr + 32)) = XtclFreeObjList
	XtclFreeObjList = oldValuePtr
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	goto __36
__35:
	XTclFreeObj(tls, oldValuePtr)
__36:
	;
__34:
	;

	oldValuePtr = *(*uintptr)(unsafe.Pointer(varPtr + 8))
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount++ // Since var is ref
__32:
	;
	XTcl_AppendObjToObj(tls, oldValuePtr, newValuePtr)
	if !((*Tcl_Obj)(unsafe.Pointer(newValuePtr)).FrefCount == 0) {
		goto __41
	}
__42:
	_objPtr = newValuePtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __45
	}
	XTclFreeObj(tls, _objPtr)
__45:
	;
	goto __43
__43:
	if 0 != 0 {
		goto __42
	}
	goto __44
__44:
	;
__41:
	;
__31:
	;
__13:
	;
	goto __11
__10:
	if !(newValuePtr != oldValuePtr) {
		goto __46
	}
	// In this case we are replacing the value, so we don't need to do
	// more than swap the objects.

	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = newValuePtr
	(*Tcl_Obj)(unsafe.Pointer(newValuePtr)).FrefCount++ // Var is another ref.
	if !(oldValuePtr != uintptr(0)) {
		goto __47
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FrefCount, 1) > 1) {
		goto __48
	}
	goto __49
__48:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __50
	}

	if !((*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes != XtclEmptyStringRep) {
		goto __52
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Fbytes)
__52:
	;
	(*Tcl_Obj)(unsafe.Pointer(oldValuePtr)).Flength = -1
__53:
	;
	*(*uintptr)(unsafe.Pointer(oldValuePtr + 32)) = XtclFreeObjList
	XtclFreeObjList = oldValuePtr
	goto __54
__54:
	if 0 != 0 {
		goto __53
	}
	goto __55
__55:
	;
	goto __51
__50:
	XTclFreeObj(tls, oldValuePtr)
__51:
	;
__49:
	;
	// Discard old value.
__47:
	;
__46:
	;
__11:
	;

	// Invoke any write traces for the variable.

	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_TRACED_WRITE != 0 ||
		arrayPtr != 0 && (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_TRACED_WRITE != 0) {
		goto __56
	}
	if !(TCL_ERROR == XTclObjCallVarTraces(tls, iPtr, arrayPtr, varPtr, part1Ptr,
		part2Ptr, flags&(TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY)|
			TCL_TRACE_WRITES, flags&TCL_LEAVE_ERR_MSG, index)) {
		goto __57
	}
	goto cleanup
__57:
	;
__56:
	;

	// Return the variable's value unless the variable was changed in some
	// gross way by a trace (e.g. it was unset and then recreated as an
	// array).

	if !(!((*Var)(unsafe.Pointer(varPtr)).Fflags&(VAR_ARRAY|VAR_LINK) != 0) && !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0))) {
		goto __58
	}
	return *(*uintptr)(unsafe.Pointer(varPtr + 8))
__58:
	;

	// A trace changed the value in some gross way. Return an empty string
	// object.

	resultPtr = (*Interp)(unsafe.Pointer(iPtr)).FemptyObjPtr

	// If the variable doesn't exist anymore and no-one's using it, then free
	// up the relevant structures and hash table entries.

cleanup:
	if !(resultPtr == uintptr(0)) {
		goto __59
	}
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+96, ts+4178, ts+29062, ts+66148, uintptr(0)))
__59:
	;
	if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) {
		goto __60
	}
	XTclCleanupVar(tls, varPtr, arrayPtr)
__60:
	;
	return resultPtr

earlyError:
	if !(cleanupOnEarlyError != 0) {
		goto __61
	}
__62:
	_objPtr1 = newValuePtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __65
	}
	XTclFreeObj(tls, _objPtr1)
__65:
	;
	goto __63
__63:
	if 0 != 0 {
		goto __62
	}
	goto __64
__64:
	;
__61:
	;
	goto cleanup
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclIncrObjVar2 --
//
//	Given a two-part variable name, which may refer either to a scalar
//	variable or an element of an array, increment the Tcl object value of
//	the variable by a specified Tcl_Obj increment value.
//
// Results:
//	Returns a pointer to the Tcl_Obj holding the new value of the
//	variable. If the specified variable doesn't exist, or there is a clash
//	in array usage, or an error occurs while executing variable traces,
//	then NULL is returned and a message will be left in the interpreter's
//	result.
//
// Side effects:
//	The value of the given variable is incremented by the specified
//	amount. If either the array or the entry didn't exist then a new
//	variable is created. The ref count for the returned object is _not_
//	incremented to reflect the returned reference; if you want to keep a
//	reference to the object you must increment its ref count yourself.
//	Callers must Incr part1Ptr if they plan to Decr it.
//	Callers must Incr part2Ptr if they plan to Decr it.
//
//----------------------------------------------------------------------

func XTclIncrObjVar2(tls *libc.TLS, interp uintptr, part1Ptr uintptr, part2Ptr uintptr, incrPtr uintptr, flags int32) uintptr { /* tclVar.c:2074:9: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var varPtr uintptr
	// var arrayPtr uintptr at bp, 8

	varPtr = XTclObjLookupVarEx(tls, interp, part1Ptr, part2Ptr, flags, ts+6057,
		1, 1, bp)
	if varPtr == uintptr(0) {
		XTcl_AddErrorInfo(tls, interp,
			ts+28978)
		return uintptr(0)
	}
	return XTclPtrIncrObjVarIdx(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp /* arrayPtr */)), part1Ptr, part2Ptr,
		incrPtr, flags, -1)
}

//----------------------------------------------------------------------
//
// TclPtrIncrObjVar --
//
//	Given the pointers to a variable and possible containing array,
//	increment the Tcl object value of the variable by a Tcl_Obj increment.
//
// Results:
//	Returns a pointer to the Tcl_Obj holding the new value of the
//	variable. If the specified variable doesn't exist, or there is a clash
//	in array usage, or an error occurs while executing variable traces,
//	then NULL is returned and a message will be left in the interpreter's
//	result.
//
// Side effects:
//	The value of the given variable is incremented by the specified
//	amount. If either the array or the entry didn't exist then a new
//	variable is created. The ref count for the returned object is _not_
//	incremented to reflect the returned reference; if you want to keep a
//	reference to the object you must increment its ref count yourself.
//
//----------------------------------------------------------------------

func XTclPtrIncrObjVar(tls *libc.TLS, interp uintptr, varPtr Tcl_Var, arrayPtr Tcl_Var, part1Ptr uintptr, part2Ptr uintptr, incrPtr uintptr, flags int32) uintptr { /* tclVar.c:2128:9: */
	if varPtr == uintptr(0) {
		XTcl_Panic(tls, ts+66164, 0)
	}
	if part1Ptr == uintptr(0) {
		XTcl_Panic(tls, ts+66188, 0)
	}
	return XTclPtrIncrObjVarIdx(tls, interp, varPtr, arrayPtr,
		part1Ptr, part2Ptr, incrPtr, flags, -1)
}

//----------------------------------------------------------------------
//
// TclPtrIncrObjVarIdx --
//
//	Given the pointers to a variable and possible containing array,
//	increment the Tcl object value of the variable by a Tcl_Obj increment.
//
// Results:
//	Returns a pointer to the Tcl_Obj holding the new value of the
//	variable. If the specified variable doesn't exist, or there is a clash
//	in array usage, or an error occurs while executing variable traces,
//	then NULL is returned and a message will be left in the interpreter's
//	result.
//
// Side effects:
//	The value of the given variable is incremented by the specified
//	amount. If either the array or the entry didn't exist then a new
//	variable is created. The ref count for the returned object is _not_
//	incremented to reflect the returned reference; if you want to keep a
//	reference to the object you must increment its ref count yourself.
//
//----------------------------------------------------------------------

func XTclPtrIncrObjVarIdx(tls *libc.TLS, interp uintptr, varPtr uintptr, arrayPtr uintptr, part1Ptr uintptr, part2Ptr uintptr, incrPtr uintptr, flags int32, index int32) uintptr { /* tclVar.c:2184:9: */
	var varValuePtr uintptr

	if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
		(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount++
	}
	varValuePtr = XTclPtrGetVarIdx(tls, interp, varPtr, arrayPtr, part1Ptr,
		part2Ptr, flags, index)
	if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
		(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount--
	}
	if varValuePtr == uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				varValuePtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes = uintptr(0)
			*(*int32)(unsafe.Pointer(varValuePtr + 32)) = 0
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
			{
			}
		}
	}
	if (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FrefCount > 1 {
		// Copy on write
		varValuePtr = XTcl_DuplicateObj(tls, varValuePtr)

		if TCL_OK == XTclIncrObj(tls, interp, varValuePtr, incrPtr) {
			return XTclPtrSetVarIdx(tls, interp, varPtr, arrayPtr, part1Ptr,
				part2Ptr, varValuePtr, flags, index)
		} else {
			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr = varValuePtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			return uintptr(0)
		}
	} else {
		// Unshared - can Incr in place
		if TCL_OK == XTclIncrObj(tls, interp, varValuePtr, incrPtr) {

			// This seems dumb to write the incremeted value into the var
			// after we just adjusted the value in place, but the spec for
			// [incr] requires that write traces fire, and making this call
			// is the way to make that happen.

			return XTclPtrSetVarIdx(tls, interp, varPtr, arrayPtr, part1Ptr,
				part2Ptr, varValuePtr, flags, index)
		} else {
			return uintptr(0)
		}
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// Tcl_UnsetVar --
//
//	Delete a variable, so that it may not be accessed anymore.
//
// Results:
//	Returns TCL_OK if the variable was successfully deleted, TCL_ERROR if
//	the variable can't be unset. In the event of an error, if the
//	TCL_LEAVE_ERR_MSG flag is set then an error message is left in the
//	interp's result.
//
// Side effects:
//	If varName is defined as a local or global variable in interp, it is
//	deleted.
//
//----------------------------------------------------------------------

func XTcl_UnsetVar(tls *libc.TLS, interp uintptr, varName uintptr, flags int32) int32 { /* tclVar.c:2273:1: */
	var result int32
	var varNamePtr uintptr

	varNamePtr = XTcl_NewStringObj(tls, varName, -1)
	(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FrefCount++

	// Filter to pass through only the flags this interface supports.

	flags = flags & (TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG)
	result = XTclObjUnsetVar2(tls, interp, varNamePtr, uintptr(0), flags)

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = varNamePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_UnsetVar2 --
//
//	Delete a variable, given a 2-part name.
//
// Results:
//	Returns TCL_OK if the variable was successfully deleted, TCL_ERROR if
//	the variable can't be unset. In the event of an error, if the
//	TCL_LEAVE_ERR_MSG flag is set then an error message is left in the
//	interp's result.
//
// Side effects:
//	If part1 and part2 indicate a local or global variable in interp, it
//	is deleted. If part1 is an array name and part2 is NULL, then the
//	whole array is deleted.
//
//----------------------------------------------------------------------

func XTcl_UnsetVar2(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, flags int32) int32 { /* tclVar.c:2322:1: */
	var result int32
	var part2Ptr uintptr = uintptr(0)
	var part1Ptr uintptr = XTcl_NewStringObj(tls, part1, -1)

	if part2 != 0 {
		part2Ptr = XTcl_NewStringObj(tls, part2, -1)
	}

	// Filter to pass through only the flags this interface supports.

	flags = flags & (TCL_GLOBAL_ONLY | TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG)
	result = XTclObjUnsetVar2(tls, interp, part1Ptr, part2Ptr, flags)

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = part1Ptr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if part2Ptr != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = part2Ptr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// TclObjUnsetVar2 --
//
//	Delete a variable, given a 2-object name.
//
// Results:
//	Returns TCL_OK if the variable was successfully deleted, TCL_ERROR if
//	the variable can't be unset. In the event of an error, if the
//	TCL_LEAVE_ERR_MSG flag is set then an error message is left in the
//	interp's result.
//
// Side effects:
//	If part1ptr and part2Ptr indicate a local or global variable in
//	interp, it is deleted. If part1Ptr is an array name and part2Ptr is
//	NULL, then the whole array is deleted.
//
//----------------------------------------------------------------------

func XTclObjUnsetVar2(tls *libc.TLS, interp uintptr, part1Ptr uintptr, part2Ptr uintptr, flags int32) int32 { /* tclVar.c:2374:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var varPtr uintptr
	// var arrayPtr uintptr at bp, 8

	varPtr = XTclObjLookupVarEx(tls, interp, part1Ptr, part2Ptr, flags, ts+3965,
		/*createPart1*/ 0 /*createPart2*/, 0, bp)
	if varPtr == uintptr(0) {
		return TCL_ERROR
	}

	return XTclPtrUnsetVarIdx(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp /* arrayPtr */)), part1Ptr, part2Ptr,
		flags, -1)
}

//----------------------------------------------------------------------
//
// TclPtrUnsetVar --
//
//	Delete a variable, given the pointers to the variable's (and possibly
//	containing array's) VAR structure.
//
// Results:
//	Returns TCL_OK if the variable was successfully deleted, TCL_ERROR if
//	the variable can't be unset. In the event of an error, if the
//	TCL_LEAVE_ERR_MSG flag is set then an error message is left in the
//	interp's result.
//
// Side effects:
//	If varPtr and arrayPtr indicate a local or global variable in interp,
//	it is deleted. If varPtr is an array reference and part2Ptr is NULL,
//	then the whole array is deleted.
//
//----------------------------------------------------------------------

func XTclPtrUnsetVar(tls *libc.TLS, interp uintptr, varPtr Tcl_Var, arrayPtr Tcl_Var, part1Ptr uintptr, part2Ptr uintptr, flags int32) int32 { /* tclVar.c:2418:1: */
	if varPtr == uintptr(0) {
		XTcl_Panic(tls, ts+66164, 0)
	}
	if part1Ptr == uintptr(0) {
		XTcl_Panic(tls, ts+66188, 0)
	}
	return XTclPtrUnsetVarIdx(tls, interp, varPtr, arrayPtr,
		part1Ptr, part2Ptr, flags, -1)
}

//----------------------------------------------------------------------
//
// TclPtrUnsetVarIdx --
//
//	Delete a variable, given the pointers to the variable's (and possibly
//	containing array's) VAR structure.
//
// Results:
//	Returns TCL_OK if the variable was successfully deleted, TCL_ERROR if
//	the variable can't be unset. In the event of an error, if the
//	TCL_LEAVE_ERR_MSG flag is set then an error message is left in the
//	interp's result.
//
// Side effects:
//	If varPtr and arrayPtr indicate a local or global variable in interp,
//	it is deleted. If varPtr is an array reference and part2Ptr is NULL,
//	then the whole array is deleted.
//
//----------------------------------------------------------------------

func XTclPtrUnsetVarIdx(tls *libc.TLS, interp uintptr, varPtr uintptr, arrayPtr uintptr, part1Ptr uintptr, part2Ptr uintptr, flags int32, index int32) int32 { /* tclVar.c:2465:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var iPtr uintptr = interp
	var result int32 = func() int32 {
		if *(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0) {
			return TCL_ERROR
		}
		return TCL_OK
	}()

	// Keep the variable alive until we're done with it. We used to
	// increase/decrease the refCount for each operation, making it hard to
	// find [Bug 735335] - caused by unsetting the variable whose value was
	// the variable's name.

	if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
		(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount++
	}

	sUnsetVarStruct(tls, varPtr, arrayPtr, iPtr, part1Ptr, part2Ptr, flags, index)

	// It's an error to unset an undefined variable.

	if result != TCL_OK {
		if flags&TCL_LEAVE_ERR_MSG != 0 {
			XTclObjVarErrMsg(tls, interp, part1Ptr, part2Ptr, ts+3965,
				func() uintptr {
					if arrayPtr == uintptr(0) {
						return uintptr(unsafe.Pointer(&sNOSUCHVAR))
					}
					return uintptr(unsafe.Pointer(&sNOSUCHELEMENT))
				}(), index)
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+66267, ts+66148, uintptr(0)))
		}
	}

	// Finally, if the variable is truly not in use then free up its Var
	// structure and remove it from its hash table, if any. The ref count of
	// its value object, if any, was decremented above.

	if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
		(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount--
		sCleanupVar(tls, varPtr, arrayPtr)
	}
	return result
}

//----------------------------------------------------------------------
//
// UnsetVarStruct --
//
//	Unset and delete a variable. This does the internal work for
//	TclObjUnsetVar2 and TclDeleteNamespaceVars, which call here for each
//	variable to be unset and deleted.
//
// Results:
//	None.
//
// Side effects:
//	If the arguments indicate a local or global variable in iPtr, it is
//	unset and deleted.
//
//----------------------------------------------------------------------

func sUnsetVarStruct(tls *libc.TLS, varPtr uintptr, arrayPtr uintptr, iPtr uintptr, part1Ptr uintptr, part2Ptr uintptr, flags int32, index int32) { /* tclVar.c:2543:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	// var dummyVar Var at bp, 16

	var traced int32 = libc.Bool32((*Var)(unsafe.Pointer(varPtr)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0 ||
		arrayPtr != 0 && (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_TRACED_UNSET != 0)

	if arrayPtr != 0 && (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_SEARCH_ACTIVE != 0 {
		sDeleteSearches(tls, iPtr, arrayPtr)
	} else if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_SEARCH_ACTIVE != 0 {
		sDeleteSearches(tls, iPtr, varPtr)
	}

	// The code below is tricky, because of the possibility that a trace
	// function might try to access a variable being deleted. To handle this
	// situation gracefully, do things in three steps:
	// 1. Copy the contents of the variable to a dummy variable structure, and
	//    mark the original Var structure as undefined.
	// 2. Invoke traces and clean up the variable, using the dummy copy.
	// 3. If at the end of this the original variable is still undefined and
	//    has no outstanding references, then delete it (but it could have
	//    gotten recreated by a trace).

	*(*Var)(unsafe.Pointer(bp /* dummyVar */)) = *(*Var)(unsafe.Pointer(varPtr))
	*(*int32)(unsafe.Pointer(bp)) &= libc.CplInt32(VAR_IN_HASHTABLE | VAR_DEAD_HASH | VAR_NAMESPACE_VAR | VAR_ARRAY_ELEMENT)
	*(*int32)(unsafe.Pointer(varPtr)) &= libc.CplInt32(VAR_ARRAY | VAR_LINK)
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = uintptr(0)

	// Call trace functions for the variable being deleted. Then delete its
	// traces. Be sure to abort any other traces for the variable that are
	// still pending. Special tricks:
	// 1. We need to increment varPtr's refCount around this: TclCallVarTraces
	//    will use dummyVar so it won't increment varPtr's refCount itself.
	// 2. Turn off the VAR_TRACE_ACTIVE flag in dummyVar: we want to call
	//    unset traces even if other traces are pending.

	if traced != 0 {
		var tracePtr uintptr = uintptr(0)
		var tPtr uintptr

		if (*Var)(unsafe.Pointer(bp)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0 {
			// Transfer any existing traces on var, IF there are unset traces.
			// Otherwise just delete them.

			// var isNew int32 at bp+16, 4

			tPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FfindProc})).f(tls, iPtr+1008 /* &.varTraces */, varPtr)
			tracePtr = (*Tcl_HashEntry)(unsafe.Pointer(tPtr)).FclientData
			*(*int32)(unsafe.Pointer(varPtr)) &= libc.CplInt32(VAR_TRACED_READ | VAR_TRACED_WRITE | VAR_TRACED_ARRAY | VAR_TRACED_UNSET)
			XTcl_DeleteHashEntry(tls, tPtr)
			if (*Var)(unsafe.Pointer(bp)).Fflags&VAR_TRACED_UNSET != 0 {
				tPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FcreateProc})).f(tls, iPtr+1008 /* &.varTraces */, bp /* &dummyVar */, bp+16 /* &isNew */)
				(*Tcl_HashEntry)(unsafe.Pointer(tPtr)).FclientData = tracePtr
			}
		}

		if (*Var)(unsafe.Pointer(bp)).Fflags&VAR_TRACED_UNSET != 0 ||
			arrayPtr != 0 && (*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_TRACED_UNSET != 0 {
			*(*int32)(unsafe.Pointer(bp)) &= libc.CplInt32(VAR_TRACE_ACTIVE)
			XTclObjCallVarTraces(tls, iPtr, arrayPtr, bp, part1Ptr, part2Ptr,
				flags&(TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY)|
					TCL_TRACE_UNSETS,
				/* leaveErrMsg */ 0, index)

			// The traces that we just called may have triggered a change in
			// the set of traces. If so, reload the traces to manipulate.

			tracePtr = uintptr(0)
			if (*Var)(unsafe.Pointer(bp)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0 {
				tPtr = (*struct {
					f func(*libc.TLS, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FfindProc})).f(tls, iPtr+1008 /* &.varTraces */, bp /* &dummyVar */)
				if tPtr != 0 {
					tracePtr = (*Tcl_HashEntry)(unsafe.Pointer(tPtr)).FclientData
					XTcl_DeleteHashEntry(tls, tPtr)
				}
			}
		}

		if tracePtr != 0 {
			var activePtr uintptr

			for tracePtr != 0 {
				var prevPtr uintptr = tracePtr

				tracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
				(*VarTrace)(unsafe.Pointer(prevPtr)).FnextPtr = uintptr(0)
				XTcl_EventuallyFree(tls, prevPtr, uintptr(3))
			}
			for activePtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveVarTracePtr; activePtr != uintptr(0); activePtr = (*ActiveVarTrace)(unsafe.Pointer(activePtr)).FnextPtr {
				if (*ActiveVarTrace)(unsafe.Pointer(activePtr)).FvarPtr == varPtr {
					(*ActiveVarTrace)(unsafe.Pointer(activePtr)).FnextTracePtr = uintptr(0)
				}
			}
			*(*int32)(unsafe.Pointer(bp)) &= libc.CplInt32(VAR_TRACED_READ | VAR_TRACED_WRITE | VAR_TRACED_ARRAY | VAR_TRACED_UNSET)
		}
	}

	if !((*Var)(unsafe.Pointer(bp)).Fflags&(VAR_ARRAY|VAR_LINK) != 0) && *(*uintptr)(unsafe.Pointer(bp + 8)) != uintptr(0) {
		// Decrement the ref count of the var's value.

		var objPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 8))

		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = objPtr
				}
			} else {
				XTclFreeObj(tls, objPtr)
			}
		}

	} else if (*Var)(unsafe.Pointer(bp)).Fflags&VAR_ARRAY != 0 {
		// If the variable is an array, delete all of its elements. This must
		// be done after calling and deleting the traces on the array, above
		// (that's the way traces are defined). If the array name is not
		// present and is required for a trace on some element, it will be
		// computed at DeleteArray.

		sDeleteArray(tls, iPtr, part1Ptr, bp, flags&
			(TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY)|TCL_TRACE_UNSETS,
			index)
	} else if (*Var)(unsafe.Pointer(bp)).Fflags&VAR_LINK != 0 {
		// For global/upvar variables referenced in procedures, decrement the
		// reference count on the variable referred to, and free the
		// referenced variable if it's no longer needed.

		var linkPtr uintptr = *(*uintptr)(unsafe.Pointer(bp + 8))

		if (*Var)(unsafe.Pointer(linkPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
			(*VarInHash)(unsafe.Pointer(linkPtr)).FrefCount--
			sCleanupVar(tls, linkPtr, uintptr(0))
		}
	}

	// If the variable was a namespace variable, decrement its reference
	// count.

	if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_NAMESPACE_VAR != 0 {
		*(*int32)(unsafe.Pointer(varPtr)) &= libc.CplInt32(VAR_NAMESPACE_VAR)
		if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
			(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount--
		}
	}

}

//----------------------------------------------------------------------
//
// Tcl_UnsetObjCmd --
//
//	This object-based function is invoked to process the "unset" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_UnsetObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:2716:1: */
	var i int32
	var flags int32 = TCL_LEAVE_ERR_MSG
	var name uintptr

	if objc == 1 {
		// Do nothing if no arguments supplied, so as to match command
		// documentation.

		return TCL_OK
	}

	// Simple, restrictive argument parsing. The only options are -- and
	// -nocomplain (which must come first and be given exactly to be an
	// option).

	i = 1
	name = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
	}()
	if int32(*(*int8)(unsafe.Pointer(name))) == '-' {
		if libc.Xstrcmp(tls, ts+19906, name) == 0 {
			i++
			if i == objc {
				return TCL_OK
			}
			flags = 0
			name = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))).Fbytes
				}
				return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)))
			}()
		}
		if libc.Xstrcmp(tls, ts+16430, name) == 0 {
			i++
		}
	}

	for ; i < objc; i++ {
		if XTclObjUnsetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(0), flags) != TCL_OK &&
			flags == TCL_LEAVE_ERR_MSG {
			return TCL_ERROR
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_AppendObjCmd --
//
//	This object-based function is invoked to process the "append" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	A variable's value may be changed.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_AppendObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:2784:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var varPtr uintptr
	// var arrayPtr uintptr at bp, 8

	var varValuePtr uintptr = uintptr(0)
	// Initialized to avoid compiler warning.
	var i int32

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66273)
		return TCL_ERROR
	}

	if objc == 2 {
		varValuePtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), TCL_LEAVE_ERR_MSG)
		if varValuePtr == uintptr(0) {
			return TCL_ERROR
		}
	} else {
		varPtr = XTclObjLookupVarEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), TCL_LEAVE_ERR_MSG,
			ts+5888, 1 /*createPart2*/, 1, bp)
		if varPtr == uintptr(0) {
			return TCL_ERROR
		}
		for i = 2; i < objc; i++ {
			// Note that we do not need to increase the refCount of the Var
			// pointers: should a trace delete the variable, the return value
			// of TclPtrSetVarIdx will be NULL or emptyObjPtr, and we will not
			// access the variable again.

			varValuePtr = XTclPtrSetVarIdx(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp /* arrayPtr */)), *(*uintptr)(unsafe.Pointer(objv + 1*8)),
				uintptr(0), *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), TCL_APPEND_VALUE|TCL_LEAVE_ERR_MSG, -1)
			if varValuePtr == uintptr(0) || varValuePtr == (*Interp)(unsafe.Pointer(interp)).FemptyObjPtr {
				return TCL_ERROR
			}
		}
	}
	XTcl_SetObjResult(tls, interp, varValuePtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_LappendObjCmd --
//
//	This object-based function is invoked to process the "lappend" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	A variable's value may be changed.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_LappendObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:2850:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var varValuePtr uintptr
	var newValuePtr uintptr
	// var numElems int32 at bp, 4

	var createdNewObj int32
	var varPtr uintptr
	// var arrayPtr uintptr at bp+8, 8

	var result int32

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66273)
		return TCL_ERROR
	}
	if objc == 2 {
		newValuePtr = XTcl_ObjGetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), 0)
		if newValuePtr == uintptr(0) {
			// The variable doesn't exist yet. Just create it with an empty
			// initial value.

			for ok := true; ok; ok = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				varValuePtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Flength = 0
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FtypePtr = uintptr(0)
			{
			}

			newValuePtr = XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), varValuePtr,
				TCL_LEAVE_ERR_MSG)
			if newValuePtr == uintptr(0) {
				return TCL_ERROR
			}
		} else {
			result = func() int32 {
				if (*Tcl_Obj)(unsafe.Pointer(newValuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
					return func() int32 {
						*(*int32)(unsafe.Pointer(bp)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(newValuePtr + 32)))).FelemCount
						return TCL_OK
					}()
				}
				return XTcl_ListObjLength(tls, interp, newValuePtr, bp)
			}()
			if result != TCL_OK {
				return result
			}
		}
	} else {
		// We have arguments to append. We used to call Tcl_SetVar2 to append
		// each argument one at a time to ensure that traces were run for each
		// append step. We now append the arguments all at once because it's
		// faster. Note that a read trace and a write trace for the variable
		// will now each only be called once. Also, if the variable's old
		// value is unshared we modify it directly, otherwise we create a new
		// copy to modify: this is "copy on write".

		createdNewObj = 0

		// Protect the variable pointers around the TclPtrGetVarIdx call
		// to insure that they remain valid even if the variable was undefined
		// and unused.

		varPtr = XTclObjLookupVarEx(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), TCL_LEAVE_ERR_MSG,
			ts+5888, 1 /*createPart2*/, 1, bp+8)
		if varPtr == uintptr(0) {
			return TCL_ERROR
		}
		if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
			(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount++
		}
		if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 && (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).Fflags&VAR_IN_HASHTABLE != 0 {
			(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FrefCount++
		}
		varValuePtr = XTclPtrGetVarIdx(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp + 8 /* arrayPtr */)), *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0),
			TCL_LEAVE_ERR_MSG, -1)
		if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
			(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount--
		}
		if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 && (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).Fflags&VAR_IN_HASHTABLE != 0 {
			(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FrefCount--
		}

		if varValuePtr == uintptr(0) {
			// We couldn't read the old value: either the var doesn't yet
			// exist or it's an array element. If it's new, we will try to
			// create it with Tcl_ObjSetVar2 below.

			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				varValuePtr = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Flength = 0
			(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FtypePtr = uintptr(0)
			{
			}

			createdNewObj = 1
		} else if (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FrefCount > 1 {
			varValuePtr = XTcl_DuplicateObj(tls, varValuePtr)
			createdNewObj = 1
		}

		result = func() int32 {
			if (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
				return func() int32 {
					*(*int32)(unsafe.Pointer(bp)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(varValuePtr + 32)))).FelemCount
					return TCL_OK
				}()
			}
			return XTcl_ListObjLength(tls, interp, varValuePtr, bp)
		}()
		if result == TCL_OK {
			result = XTcl_ListObjReplace(tls, interp, varValuePtr, *(*int32)(unsafe.Pointer(bp /* numElems */)), 0,
				objc-2, objv+uintptr(2)*8)
		}
		if result != TCL_OK {
			if createdNewObj != 0 {
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FrefCount, 1) > 1 {
				} else {
					if !(int32((*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(varValuePtr)).FtypePtr)).FfreeIntRepProc) != 0) {
						{
						}
						if (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes != XtclEmptyStringRep {
							XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Fbytes)
						}
						(*Tcl_Obj)(unsafe.Pointer(varValuePtr)).Flength = -1
						for ok2 := true; ok2; ok2 = 0 != 0 {
							*(*uintptr)(unsafe.Pointer(varValuePtr + 32)) = XtclFreeObjList
							XtclFreeObjList = varValuePtr
						}
					} else {
						XTclFreeObj(tls, varValuePtr)
					}
				}
				// Free unneeded obj.
			}
			return result
		}

		// Now store the list object back into the variable. If there is an
		// error setting the new value, decrement its ref count if it was new
		// and we didn't create the variable.

		newValuePtr = XTclPtrSetVarIdx(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp + 8 /* arrayPtr */)), *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0),
			varValuePtr, TCL_LEAVE_ERR_MSG, -1)
		if newValuePtr == uintptr(0) {
			return TCL_ERROR
		}
	}

	// Set the interpreter's object result to refer to the variable's value
	// object.

	XTcl_SetObjResult(tls, interp, newValuePtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ArrayStartSearchCmd --
//
//	This object-based function is invoked to process the "array
//	startsearch" Tcl command. See the user documentation for details on
//	what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArrayStartSearchCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:2992:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var iPtr uintptr = interp
	// var varPtr uintptr at bp+16, 8

	var hPtr uintptr
	// var isNew int32 at bp+28, 4

	// var isArray int32 at bp+24, 4

	var searchPtr uintptr
	var varName uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66293)
		return TCL_ERROR
	}

	if TCL_ERROR == sLocateArray(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp+16, bp+24) {
		return TCL_ERROR
	}

	if !(*(*int32)(unsafe.Pointer(bp + 24)) != 0) {
		return sNotArrayError(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}

	// Make a new array search with a free name.

	varName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
	}()
	searchPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ArraySearch{})))
	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1096 /* &.varSearches */)).FcreateProc})).f(tls, iPtr+1096 /* &.varSearches */, *(*uintptr)(unsafe.Pointer(bp + 16 /* varPtr */)), bp+28 /* &isNew */)
	if *(*int32)(unsafe.Pointer(bp + 28)) != 0 {
		(*ArraySearch)(unsafe.Pointer(searchPtr)).Fid = 1
		*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) |= VAR_SEARCH_ACTIVE
		(*ArraySearch)(unsafe.Pointer(searchPtr)).FnextPtr = uintptr(0)
	} else {
		(*ArraySearch)(unsafe.Pointer(searchPtr)).Fid = (*ArraySearch)(unsafe.Pointer((*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData)).Fid + 1
		(*ArraySearch)(unsafe.Pointer(searchPtr)).FnextPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
	}
	(*ArraySearch)(unsafe.Pointer(searchPtr)).FvarPtr = *(*uintptr)(unsafe.Pointer(bp + 16 /* varPtr */))
	(*ArraySearch)(unsafe.Pointer(searchPtr)).FnextEntry = XTcl_FirstHashEntry(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 8)), searchPtr+16)
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = searchPtr
	XTcl_SetObjResult(tls, interp,
		XTcl_ObjPrintf(tls, ts+66303, libc.VaList(bp, (*ArraySearch)(unsafe.Pointer(searchPtr)).Fid, varName)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ArrayAnyMoreCmd --
//
//	This object-based function is invoked to process the "array anymore"
//	Tcl command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArrayAnyMoreCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3061:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var iPtr uintptr = interp
	// var varPtr uintptr at bp, 8

	var varNameObj uintptr
	var searchObj uintptr
	var gotValue int32
	// var isArray int32 at bp+8, 4

	var searchPtr uintptr

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66311)
		return TCL_ERROR
	}
	varNameObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	searchObj = *(*uintptr)(unsafe.Pointer(objv + 2*8))

	if TCL_ERROR == sLocateArray(tls, interp, varNameObj, bp, bp+8) {
		return TCL_ERROR
	}

	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		return sNotArrayError(tls, interp, varNameObj)
	}

	// Get the search.

	searchPtr = sParseSearchId(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* varPtr */)), varNameObj, searchObj)
	if searchPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Scan forward to find if there are any further elements in the array
	// that are defined.

	for 1 != 0 {
		if (*ArraySearch)(unsafe.Pointer(searchPtr)).FnextEntry != uintptr(0) {
			*(*uintptr)(unsafe.Pointer(bp /* varPtr */)) = (*ArraySearch)(unsafe.Pointer(searchPtr)).FnextEntry - uintptr(int32(uintptr(0)+24))
			if !(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)) == uintptr(0)) {
				gotValue = 1
				break
			}
		}
		(*ArraySearch)(unsafe.Pointer(searchPtr)).FnextEntry = XTcl_NextHashEntry(tls, searchPtr+16)
		if (*ArraySearch)(unsafe.Pointer(searchPtr)).FnextEntry == uintptr(0) {
			gotValue = 0
			break
		}
	}
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr + 8 + uintptr(gotValue)*8)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ArrayNextElementCmd --
//
//	This object-based function is invoked to process the "array
//	nextelement" Tcl command. See the user documentation for details on
//	what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArrayNextElementCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3140:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var varPtr uintptr at bp, 8

	var varNameObj uintptr
	var searchObj uintptr
	var searchPtr uintptr
	// var isArray int32 at bp+8, 4

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66311)
		return TCL_ERROR
	}
	varNameObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	searchObj = *(*uintptr)(unsafe.Pointer(objv + 2*8))

	if TCL_ERROR == sLocateArray(tls, interp, varNameObj, bp, bp+8) {
		return TCL_ERROR
	}

	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		return sNotArrayError(tls, interp, varNameObj)
	}

	// Get the search.

	searchPtr = sParseSearchId(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* varPtr */)), varNameObj, searchObj)
	if searchPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Get the next element from the search, or the empty string on
	// exhaustion. Note that the [array anymore] command may well have already
	// pulled a value from the hash enumeration, so we have to check the cache
	// there first.

	for 1 != 0 {
		var hPtr uintptr = (*ArraySearch)(unsafe.Pointer(searchPtr)).FnextEntry

		if hPtr == uintptr(0) {
			hPtr = XTcl_NextHashEntry(tls, searchPtr+16)
			if hPtr == uintptr(0) {
				return TCL_OK
			}
		} else {
			(*ArraySearch)(unsafe.Pointer(searchPtr)).FnextEntry = uintptr(0)
		}
		*(*uintptr)(unsafe.Pointer(bp /* varPtr */)) = hPtr - uintptr(int32(uintptr(0)+24))
		if !(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)) == uintptr(0)) {
			XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 24 + 32)))
			return TCL_OK
		}
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// ArrayDoneSearchCmd --
//
//	This object-based function is invoked to process the "array
//	donesearch" Tcl command. See the user documentation for details on
//	what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArrayDoneSearchCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3221:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var iPtr uintptr = interp
	// var varPtr uintptr at bp, 8

	var hPtr uintptr
	var varNameObj uintptr
	var searchObj uintptr
	var searchPtr uintptr
	var prevPtr uintptr
	// var isArray int32 at bp+8, 4

	if objc != 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66311)
		return TCL_ERROR
	}
	varNameObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	searchObj = *(*uintptr)(unsafe.Pointer(objv + 2*8))

	if TCL_ERROR == sLocateArray(tls, interp, varNameObj, bp, bp+8) {
		return TCL_ERROR
	}

	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		return sNotArrayError(tls, interp, varNameObj)
	}

	// Get the search.

	searchPtr = sParseSearchId(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* varPtr */)), varNameObj, searchObj)
	if searchPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Unhook the search from the list of searches associated with the
	// variable.

	hPtr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1096 /* &.varSearches */)).FfindProc})).f(tls, iPtr+1096 /* &.varSearches */, *(*uintptr)(unsafe.Pointer(bp /* varPtr */)))
	if searchPtr == (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData {
		if (*ArraySearch)(unsafe.Pointer(searchPtr)).FnextPtr != 0 {
			(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = (*ArraySearch)(unsafe.Pointer(searchPtr)).FnextPtr
		} else {
			*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) &= libc.CplInt32(VAR_SEARCH_ACTIVE)
			XTcl_DeleteHashEntry(tls, hPtr)
		}
	} else {
		for prevPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData; ; prevPtr = (*ArraySearch)(unsafe.Pointer(prevPtr)).FnextPtr {
			if (*ArraySearch)(unsafe.Pointer(prevPtr)).FnextPtr == searchPtr {
				(*ArraySearch)(unsafe.Pointer(prevPtr)).FnextPtr = (*ArraySearch)(unsafe.Pointer(searchPtr)).FnextPtr
				break
			}
		}
	}
	XTclpFree(tls, searchPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ArrayExistsCmd --
//
//	This object-based function is invoked to process the "array exists"
//	Tcl command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArrayExistsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3302:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var iPtr uintptr = interp
	// var isArray int32 at bp, 4

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66293)
		return TCL_ERROR
	}

	if TCL_ERROR == sLocateArray(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), bp) {
		return TCL_ERROR
	}

	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FexecEnvPtr + 8 + uintptr(*(*int32)(unsafe.Pointer(bp /* isArray */)))*8)))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ArrayGetCmd --
//
//	This object-based function is invoked to process the "array get" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArrayGetCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3343:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var varPtr uintptr at bp, 8

	var varPtr2 uintptr
	var varNameObj uintptr
	var nameObj uintptr
	var valueObj uintptr
	var nameLstObj uintptr
	var tmpResObj uintptr
	// var nameObjPtr uintptr at bp+48, 8

	var patternObj uintptr
	// var search Tcl_HashSearch at bp+16, 24

	var pattern uintptr
	var i int32
	// var count int32 at bp+40, 4

	var result int32
	// var isArray int32 at bp+8, 4

	switch objc {
	case 2:
		goto __2
	case 3:
		goto __3
	default:
		goto __4
	}
	goto __1
__2:
	varNameObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	patternObj = uintptr(0)
	goto __1
__3:
	varNameObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	patternObj = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	goto __1
__4:
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66330)
	return TCL_ERROR
__1:
	;

	if !(TCL_ERROR == sLocateArray(tls, interp, varNameObj, bp, bp+8)) {
		goto __5
	}
	return TCL_ERROR
__5:
	;

	// If not an array, it's an empty result.
	if !!(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		goto __6
	}
	return TCL_OK
__6:
	;

	pattern = func() uintptr {
		if patternObj != 0 {
			return func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(patternObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(patternObj)).Fbytes
				}
				return XTcl_GetString(tls, patternObj)
			}()
		}
		return uintptr(0)
	}()

	// Store the array names in a new object.

__7:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __10
	}
	XTclAllocateFreeObjects(tls)
__10:
	;
	nameLstObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __8
__8:
	if 0 != 0 {
		goto __7
	}
	goto __9
__9:
	;
	(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FtypePtr = uintptr(0)

	(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FrefCount++
	if !(patternObj != uintptr(0) && libc.Xstrpbrk(tls, pattern, ts+14153) == uintptr(0)) {
		goto __11
	}
	varPtr2 = sVarHashCreateVar1(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)), patternObj, uintptr(0))
	if !(varPtr2 == uintptr(0)) {
		goto __12
	}
	goto searchDone
__12:
	;
	if !(*(*uintptr)(unsafe.Pointer(varPtr2 + 8)) == uintptr(0)) {
		goto __13
	}
	goto searchDone
__13:
	;
	result = XTcl_ListObjAppendElement(tls, interp, nameLstObj,
		*(*uintptr)(unsafe.Pointer(varPtr2 + 24 + 32)))
	if !(result != TCL_OK) {
		goto __14
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FrefCount, 1) > 1) {
		goto __15
	}
	goto __16
__15:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __17
	}

	if !((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes != XtclEmptyStringRep) {
		goto __19
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes)
__19:
	;
	(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Flength = -1
__20:
	;
	*(*uintptr)(unsafe.Pointer(nameLstObj + 32)) = XtclFreeObjList
	XtclFreeObjList = nameLstObj
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	goto __18
__17:
	XTclFreeObj(tls, nameLstObj)
__18:
	;
__16:
	;

	return result
__14:
	;
	goto searchDone
__11:
	;

	varPtr2 = sVarHashFirstVar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)), bp+16)
__23:
	if !(varPtr2 != 0) {
		goto __25
	}
	if !(*(*uintptr)(unsafe.Pointer(varPtr2 + 8)) == uintptr(0)) {
		goto __26
	}
	goto __24
__26:
	;
	nameObj = *(*uintptr)(unsafe.Pointer(varPtr2 + 24 + 32))
	if !(patternObj != 0 && !(XTcl_StringMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes
		}
		return XTcl_GetString(tls, nameObj)
	}(), pattern) != 0)) {
		goto __27
	}
	goto __24 // Element name doesn't match pattern.
__27:
	;

	result = XTcl_ListObjAppendElement(tls, interp, nameLstObj, nameObj)
	if !(result != TCL_OK) {
		goto __28
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FrefCount, 1) > 1) {
		goto __29
	}
	goto __30
__29:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __31
	}

	if !((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes != XtclEmptyStringRep) {
		goto __33
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes)
__33:
	;
	(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Flength = -1
__34:
	;
	*(*uintptr)(unsafe.Pointer(nameLstObj + 32)) = XtclFreeObjList
	XtclFreeObjList = nameLstObj
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
	goto __32
__31:
	XTclFreeObj(tls, nameLstObj)
__32:
	;
__30:
	;

	return result
__28:
	;
	goto __24
__24:
	varPtr2 = sVarHashNextVar(tls, bp+16)
	goto __23
	goto __25
__25:
	;

	// Make sure the Var structure of the array is not removed by a trace
	// while we're working.

searchDone:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __37
	}
	(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount++
__37:
	;

	// Get the array values corresponding to each element name.

__38:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __41
	}
	XTclAllocateFreeObjects(tls)
__41:
	;
	tmpResObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __39
__39:
	if 0 != 0 {
		goto __38
	}
	goto __40
__40:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpResObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpResObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(tmpResObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(tmpResObj)).FtypePtr = uintptr(0)

	result = XTcl_ListObjGetElements(tls, interp, nameLstObj, bp+40, bp+48)
	if !(result != TCL_OK) {
		goto __42
	}
	goto errorInArrayGet
__42:
	;

	i = 0
__43:
	if !(i < *(*int32)(unsafe.Pointer(bp + 40))) {
		goto __45
	}
	nameObj = *(*uintptr)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 48 /* nameObjPtr */)), 8)))
	valueObj = XTcl_ObjGetVar2(tls, interp, varNameObj, nameObj,
		TCL_LEAVE_ERR_MSG)
	if !(valueObj == uintptr(0)) {
		goto __46
	}
	// Some trace played a trick on us; we need to diagnose to adapt
	// our behaviour: was the array element unset, or did the
	// modification modify the complete array?

	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags&VAR_ARRAY != 0) {
		goto __47
	}
	// The array itself looks OK, the variable was undefined:
	// forget it.

	goto __44
__47:
	;
	result = TCL_ERROR
	goto errorInArrayGet
__46:
	;
	result = XTcl_DictObjPut(tls, interp, tmpResObj, nameObj, valueObj)
	if !(result != TCL_OK) {
		goto __48
	}
	goto errorInArrayGet
__48:
	;
	goto __44
__44:
	i++
	goto __43
	goto __45
__45:
	;
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __49
	}
	(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount--
__49:
	;
	XTcl_SetObjResult(tls, interp, tmpResObj)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FrefCount, 1) > 1) {
		goto __50
	}
	goto __51
__50:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __52
	}

	if !((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes != XtclEmptyStringRep) {
		goto __54
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes)
__54:
	;
	(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Flength = -1
__55:
	;
	*(*uintptr)(unsafe.Pointer(nameLstObj + 32)) = XtclFreeObjList
	XtclFreeObjList = nameLstObj
	goto __56
__56:
	if 0 != 0 {
		goto __55
	}
	goto __57
__57:
	;
	goto __53
__52:
	XTclFreeObj(tls, nameLstObj)
__53:
	;
__51:
	;

	return TCL_OK

errorInArrayGet:
	if !((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags&VAR_IN_HASHTABLE != 0) {
		goto __58
	}
	(*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount--
__58:
	;
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FrefCount, 1) > 1) {
		goto __59
	}
	goto __60
__59:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __61
	}

	if !((*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes != XtclEmptyStringRep) {
		goto __63
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Fbytes)
__63:
	;
	(*Tcl_Obj)(unsafe.Pointer(nameLstObj)).Flength = -1
__64:
	;
	*(*uintptr)(unsafe.Pointer(nameLstObj + 32)) = XtclFreeObjList
	XtclFreeObjList = nameLstObj
	goto __65
__65:
	if 0 != 0 {
		goto __64
	}
	goto __66
__66:
	;
	goto __62
__61:
	XTclFreeObj(tls, nameLstObj)
__62:
	;
__60:
	;

	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpResObj)).FrefCount, 1) > 1) {
		goto __67
	}
	goto __68
__67:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpResObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpResObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __69
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpResObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpResObj)).Fbytes != XtclEmptyStringRep) {
		goto __71
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpResObj)).Fbytes)
__71:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpResObj)).Flength = -1
__72:
	;
	*(*uintptr)(unsafe.Pointer(tmpResObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpResObj
	goto __73
__73:
	if 0 != 0 {
		goto __72
	}
	goto __74
__74:
	;
	goto __70
__69:
	XTclFreeObj(tls, tmpResObj)
__70:
	;
__68:
	;
	// Free unneeded temp result.
	return result
}

//----------------------------------------------------------------------
//
// ArrayNamesCmd --
//
//	This object-based function is invoked to process the "array names" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArrayNamesCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3503:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	// var varPtr uintptr at bp, 8

	var varPtr2 uintptr
	var nameObj uintptr
	var resultObj uintptr
	var patternObj uintptr
	// var search Tcl_HashSearch at bp+16, 24

	var pattern uintptr = uintptr(0)
	// var isArray int32 at bp+8, 4

	*(*int32)(unsafe.Pointer(bp + 12 /* mode */)) = 1 /* OPT_GLOB */

	if objc < 2 || objc > 4 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66350)
		return TCL_ERROR
	}
	patternObj = func() uintptr {
		if objc > 2 {
			return *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8))
		}
		return uintptr(0)
	}()

	if TCL_ERROR == sLocateArray(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, bp+8) {
		return TCL_ERROR
	}

	// Finish parsing the arguments.

	if objc == 4 && XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&options19)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+12) != TCL_OK {
		return TCL_ERROR
	}

	// If not an array, the result is empty.

	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		return TCL_OK
	}

	// Check for the trivial cases where we can use a direct lookup.

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)
	{
	}

	if patternObj != 0 {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(patternObj)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(patternObj)).Fbytes
			}
			return XTcl_GetString(tls, patternObj)
		}()
	}
	if *(*int32)(unsafe.Pointer(bp + 12)) == 1 && patternObj != 0 && libc.Xstrpbrk(tls, pattern, ts+14153) == uintptr(0) ||
		*(*int32)(unsafe.Pointer(bp + 12)) == 0 {
		varPtr2 = sVarHashCreateVar1(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)), patternObj, uintptr(0))
		if varPtr2 != uintptr(0) && !(*(*uintptr)(unsafe.Pointer(varPtr2 + 8)) == uintptr(0)) {
			// This can't fail; lappending to an empty object always works.

			XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, *(*uintptr)(unsafe.Pointer(varPtr2 + 24 + 32)))
		}
		XTcl_SetObjResult(tls, interp, resultObj)
		return TCL_OK
	}

	// Must scan the array to select the elements.

	for varPtr2 = sVarHashFirstVar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)), bp+16); varPtr2 != uintptr(0); varPtr2 = sVarHashNextVar(tls, bp+16) {
		if *(*uintptr)(unsafe.Pointer(varPtr2 + 8)) == uintptr(0) {
			continue
		}
		nameObj = *(*uintptr)(unsafe.Pointer(varPtr2 + 24 + 32))
		if patternObj != 0 {
			var name uintptr = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes
				}
				return XTcl_GetString(tls, nameObj)
			}()
			var matched int32 = 0

			switch uint32(*(*int32)(unsafe.Pointer(bp + 12 /* mode */))) {
			case uint32(0) /* OPT_EXACT */ :
				XTcl_Panic(tls, ts+66377, 0)
				fallthrough
			case uint32(1) /* OPT_GLOB */ :
				matched = XTcl_StringMatch(tls, name, pattern)
				break
				fallthrough
			case uint32(2) /* OPT_REGEXP */ :
				matched = XTcl_RegExpMatchObj(tls, interp, nameObj, patternObj)
				if matched < 0 {
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount, 1) > 1 {
					} else {
						if !(int32((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr)).FfreeIntRepProc) != 0) {
							{
							}
							if (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes != XtclEmptyStringRep {
								XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes)
							}
							(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = -1
							for ok1 := true; ok1; ok1 = 0 != 0 {
								*(*uintptr)(unsafe.Pointer(resultObj + 32)) = XtclFreeObjList
								XtclFreeObjList = resultObj
							}
						} else {
							XTclFreeObj(tls, resultObj)
						}
					}

					return TCL_ERROR
				}
				break
			}
			if matched == 0 {
				continue
			}
		}

		XTcl_ListObjAppendElement(tls, uintptr(0), resultObj, nameObj)
	}
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

var options19 = [4]uintptr{
	ts + 15508, ts + 15515, ts + 15576, uintptr(0),
} /* tclVar.c:3509:23 */

//----------------------------------------------------------------------
//
// TclFindArrayPtrElements --
//
//	Fill out a hash table (which *must* use Tcl_Obj* keys) with an entry
//	for each existing element of the given array. The provided hash table
//	is assumed to be initially empty.
//
// Result:
//	none
//
// Side effects:
//	The keys of the array gain an extra reference. The supplied hash table
//	has elements added to it.
//
//----------------------------------------------------------------------

func XTclFindArrayPtrElements(tls *libc.TLS, arrayPtr uintptr, tablePtr uintptr) { /* tclVar.c:3625:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var varPtr uintptr
	// var search Tcl_HashSearch at bp, 24

	if arrayPtr == uintptr(0) || !((*Var)(unsafe.Pointer(arrayPtr)).Fflags&VAR_ARRAY != 0) ||
		*(*uintptr)(unsafe.Pointer(arrayPtr + 8)) == uintptr(0) {
		return
	}

	for varPtr = sVarHashFirstVar(tls, *(*uintptr)(unsafe.Pointer(arrayPtr + 8)), bp); varPtr != uintptr(0); varPtr = sVarHashNextVar(tls, bp) {
		var hPtr uintptr
		var nameObj uintptr
		// var dummy int32 at bp+24, 4

		if *(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0) {
			continue
		}
		nameObj = *(*uintptr)(unsafe.Pointer(varPtr + 24 + 32))
		hPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(tablePtr)).FcreateProc})).f(tls, tablePtr, nameObj, bp+24 /* &dummy */)
		(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = nameObj
	}
}

//----------------------------------------------------------------------
//
// ArraySetCmd --
//
//	This object-based function is invoked to process the "array set" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArraySetCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3671:1: */
	bp := tls.Alloc(172)
	defer tls.Free(172)

	var arrayNameObj uintptr
	var arrayElemObj uintptr
	var varPtr uintptr
	// var arrayPtr uintptr at bp+104, 8

	var result int32
	var i int32
	// At this point, it would be nice if the key was directly usable
	// by the array. This isn't the case though.

	var elemVarPtr uintptr
	// var keyPtr uintptr at bp+144, 8

	// var valuePtr uintptr at bp+152, 8

	// var search Tcl_DictSearch at bp+120, 24

	// var done int32 at bp+112, 4

	var elemVarPtr1 uintptr
	var _objPtr uintptr
	// Not a dictionary, so assume (and convert to, for backward-
	// -compatibility reasons) a list.

	// var elemLen int32 at bp+168, 4

	// var elemPtrs uintptr at bp+160, 8

	var copyListObj uintptr

	if !(objc != 3) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66411)
	return TCL_ERROR
__1:
	;

	if !(TCL_ERROR == sLocateArray(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(0), uintptr(0))) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	arrayNameObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	varPtr = XTclObjLookupVarEx(tls, interp, arrayNameObj, uintptr(0),
		/*flags*/ TCL_LEAVE_ERR_MSG /*msg*/, ts+5888, 1,
		/*createPart2*/ 1, bp+104)
	if !(varPtr == uintptr(0)) {
		goto __3
	}
	return TCL_ERROR
__3:
	;
	if !(*(*uintptr)(unsafe.Pointer(bp + 104)) != 0) {
		goto __4
	}
	sCleanupVar(tls, varPtr, *(*uintptr)(unsafe.Pointer(bp + 104 /* arrayPtr */)))
	XTclObjVarErrMsg(tls, interp, arrayNameObj, uintptr(0), ts+5888, uintptr(unsafe.Pointer(&sNEEDARRAY)), -1)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7699, ts+66148,
		func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(arrayNameObj)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(arrayNameObj)).Fbytes
			}
			return XTcl_GetString(tls, arrayNameObj)
		}(), uintptr(0)))
	return TCL_ERROR
__4:
	;

	// Install the contents of the dictionary or list into the array.

	arrayElemObj = *(*uintptr)(unsafe.Pointer(objv + 2*8))
	if !((*Tcl_Obj)(unsafe.Pointer(arrayElemObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclDictType)) && (*Tcl_Obj)(unsafe.Pointer(arrayElemObj)).Fbytes == uintptr(0)) {
		goto __5
	}

	if !(XTcl_DictObjSize(tls, interp, arrayElemObj, bp+112) != TCL_OK) {
		goto __7
	}
	return TCL_ERROR
__7:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 112)) == 0) {
		goto __8
	}
	// Empty, so we'll just force the array to be properly existing
	// instead.

	goto ensureArray
__8:
	;

	// Don't need to look at result of Tcl_DictObjFirst as we've just
	// successfully used a dictionary operation on the same object.

	XTcl_DictObjFirst(tls, interp, arrayElemObj, bp+120,
		bp+144, bp+152, bp+112)
__9:
	if !!(*(*int32)(unsafe.Pointer(bp + 112)) != 0) {
		goto __11
	}
	// At this point, it would be nice if the key was directly usable
	// by the array. This isn't the case though.

	elemVarPtr = XTclLookupArrayElement(tls, interp, arrayNameObj,
		*(*uintptr)(unsafe.Pointer(bp + 144 /* keyPtr */)), TCL_LEAVE_ERR_MSG, ts+5888, 1, 1, varPtr, -1)

	if !(elemVarPtr == uintptr(0) || XTclPtrSetVarIdx(tls, interp, elemVarPtr, varPtr, arrayNameObj,
		*(*uintptr)(unsafe.Pointer(bp + 144)), *(*uintptr)(unsafe.Pointer(bp + 152)), TCL_LEAVE_ERR_MSG, -1) == uintptr(0)) {
		goto __12
	}
	XTcl_DictObjDone(tls, bp+120)
	return TCL_ERROR
__12:
	;
	goto __10
__10:
	XTcl_DictObjNext(tls, bp+120, bp+144, bp+152, bp+112)
	goto __9
	goto __11
__11:
	;
	return TCL_OK
	goto __6
__5:

	result = func() int32 {
		if (*Tcl_Obj)(unsafe.Pointer(arrayElemObj)).FtypePtr == uintptr(unsafe.Pointer(&XtclListType)) {
			return func() int32 {
				*(*uintptr)(unsafe.Pointer(bp + 160)) = *(*uintptr)(unsafe.Pointer(arrayElemObj + 32)) + 16
				*(*int32)(unsafe.Pointer(bp + 168)) = (*List)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(arrayElemObj + 32)))).FelemCount
				return TCL_OK
			}()
		}
		return XTcl_ListObjGetElements(tls, interp, arrayElemObj, bp+168, bp+160)
	}()
	if !(result != TCL_OK) {
		goto __13
	}
	return result
__13:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 168))&1 != 0) {
		goto __14
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+18939, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+14232, ts+62448, uintptr(0)))
	return TCL_ERROR
__14:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 168)) == 0) {
		goto __15
	}
	goto ensureArray
__15:
	;

	// We needn't worry about traces invalidating arrayPtr: should that be
	// the case, TclPtrSetVarIdx will return NULL so that we break out of
	// the loop and return an error.

	copyListObj = XTclListObjCopy(tls, uintptr(0), arrayElemObj)
	i = 0
__16:
	if !(i < *(*int32)(unsafe.Pointer(bp + 168))) {
		goto __18
	}
	elemVarPtr1 = XTclLookupArrayElement(tls, interp, arrayNameObj,
		*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 160 /* elemPtrs */)) + uintptr(i)*8)), TCL_LEAVE_ERR_MSG, ts+5888, 1, 1, varPtr, -1)

	if !(elemVarPtr1 == uintptr(0) || XTclPtrSetVarIdx(tls, interp, elemVarPtr1, varPtr, arrayNameObj,
		*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 160)) + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 160)) + uintptr(i+1)*8)), TCL_LEAVE_ERR_MSG, -1) == uintptr(0)) {
		goto __19
	}
	result = TCL_ERROR
	goto __18
__19:
	;
	goto __17
__17:
	i = i + 2
	goto __16
	goto __18
__18:
	;
__20:
	_objPtr = copyListObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __23
	}
	XTclFreeObj(tls, _objPtr)
__23:
	;
	goto __21
__21:
	if 0 != 0 {
		goto __20
	}
	goto __22
__22:
	;
	return result
__6:
	;

	// The list is empty make sure we have an array, or create one if
	// necessary.

ensureArray:
	if !(varPtr != uintptr(0)) {
		goto __24
	}
	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_ARRAY != 0) {
		goto __25
	}
	// Already an array, done.

	return TCL_OK
__25:
	;
	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_ARRAY_ELEMENT != 0 || !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0))) {
		goto __26
	}
	// Either an array element, or a scalar: lose!

	XTclObjVarErrMsg(tls, interp, arrayNameObj, uintptr(0), ts+29031,
		uintptr(unsafe.Pointer(&sNEEDARRAY)), -1)
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+29062, ts+29068, uintptr(0)))
	return TCL_ERROR
__26:
	;
__24:
	;
	(*Var)(unsafe.Pointer(varPtr)).Fflags = (*Var)(unsafe.Pointer(varPtr)).Fflags&libc.CplInt32(VAR_LINK) | VAR_ARRAY
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TclVarHashTable{})))
	XTclInitVarHashTable(tls, *(*uintptr)(unsafe.Pointer(varPtr + 8)), func() uintptr {
		if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
			return (*TclVarHashTable)(unsafe.Pointer((*VarInHash)(unsafe.Pointer(varPtr)).Fentry.FtablePtr)).FnsPtr
		}
		return uintptr(0)
	}())
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ArraySizeCmd --
//
//	This object-based function is invoked to process the "array size" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArraySizeCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3848:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	// var varPtr uintptr at bp, 8

	// var search Tcl_HashSearch at bp+16, 24

	var varPtr2 uintptr
	// var isArray int32 at bp+8, 4

	var size int32 = 0

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66293)
		return TCL_ERROR
	}

	if TCL_ERROR == sLocateArray(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), bp, bp+8) {
		return TCL_ERROR
	}

	// We can only iterate over the array if it exists...

	if *(*int32)(unsafe.Pointer(bp + 8)) != 0 {
		// Must iterate in order to get chance to check for present but
		// "undefined" entries.

		for varPtr2 = sVarHashFirstVar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)), bp+16); varPtr2 != uintptr(0); varPtr2 = sVarHashNextVar(tls, bp+16) {
			if !(*(*uintptr)(unsafe.Pointer(varPtr2 + 8)) == uintptr(0)) {
				size++
			}
		}
	}

	XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, size))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ArrayStatsCmd --
//
//	This object-based function is invoked to process the "array
//	statistics" Tcl command. See the user documentation for details on
//	what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArrayStatsCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3908:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var varPtr uintptr at bp, 8

	var varNameObj uintptr
	var stats uintptr
	// var isArray int32 at bp+8, 4

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66293)
		return TCL_ERROR
	}
	varNameObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))

	if TCL_ERROR == sLocateArray(tls, interp, varNameObj, bp, bp+8) {
		return TCL_ERROR
	}

	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		return sNotArrayError(tls, interp, varNameObj)
	}

	stats = XTcl_HashStats(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)))
	if stats == uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+66426, -1))
		return TCL_ERROR
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, stats, -1))
	XTclpFree(tls, stats)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ArrayUnsetCmd --
//
//	This object-based function is invoked to process the "array unset" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl result object.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func sArrayUnsetCmd(tls *libc.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:3963:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	// var varPtr uintptr at bp, 8

	var varPtr2 uintptr
	var protectedVarPtr uintptr
	var varNameObj uintptr
	var patternObj uintptr
	var nameObj uintptr
	// var search Tcl_HashSearch at bp+16, 24

	var pattern uintptr
	var unsetFlags int32 = 0 // Should this be TCL_LEAVE_ERR_MSG?
	// var isArray int32 at bp+8, 4

	switch objc {
	case 2:
		varNameObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		patternObj = uintptr(0)
		break
	case 3:
		varNameObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		patternObj = *(*uintptr)(unsafe.Pointer(objv + 2*8))
		break
	default:
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+66330)
		return TCL_ERROR
	}

	if TCL_ERROR == sLocateArray(tls, interp, varNameObj, bp, bp+8) {
		return TCL_ERROR
	}

	if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) {
		return TCL_OK
	}

	if !(patternObj != 0) {
		// When no pattern is given, just unset the whole array.

		return XTclObjUnsetVar2(tls, interp, varNameObj, uintptr(0), 0)
	}

	// With a trivial pattern, we can just unset.

	pattern = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(patternObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(patternObj)).Fbytes
		}
		return XTcl_GetString(tls, patternObj)
	}()
	if libc.Xstrpbrk(tls, pattern, ts+14153) == uintptr(0) {
		varPtr2 = sVarHashCreateVar1(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)), patternObj, uintptr(0))
		if !(varPtr2 != 0) || *(*uintptr)(unsafe.Pointer(varPtr2 + 8)) == uintptr(0) {
			return TCL_OK
		}
		return XTclPtrUnsetVarIdx(tls, interp, varPtr2, *(*uintptr)(unsafe.Pointer(bp /* varPtr */)), varNameObj,
			patternObj, unsetFlags, -1)
	}

	// Non-trivial case (well, deeply tricky really). We peek inside the hash
	// iterator in order to allow us to guarantee that the following element
	// in the array will not be scrubbed until we have dealt with it. This
	// stops the overall iterator from ending up pointing into deallocated
	// memory. [Bug 2939073]

	protectedVarPtr = uintptr(0)
	for varPtr2 = sVarHashFirstVar(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 8)), bp+16); varPtr2 != uintptr(0); varPtr2 = sVarHashNextVar(tls, bp+16) {
		// Drop the extra ref immediately. We don't need to free it at this
		// point though; we'll be unsetting it if necessary soon.

		if varPtr2 == protectedVarPtr {
			(*VarInHash)(unsafe.Pointer(varPtr2)).FrefCount--
		}

		// Guard the next (peeked) item in the search chain by incrementing
		// its refcount. This guarantees that the hash table iterator won't be
		// dangling on the next time through the loop.

		if (*Tcl_HashSearch)(unsafe.Pointer(bp+16)).FnextEntryPtr != uintptr(0) {
			protectedVarPtr = (*Tcl_HashSearch)(unsafe.Pointer(bp+16)).FnextEntryPtr - uintptr(int32(uintptr(0)+24))
			(*VarInHash)(unsafe.Pointer(protectedVarPtr)).FrefCount++
		} else {
			protectedVarPtr = uintptr(0)
		}

		// If the variable is undefined, clean it out as it has been hit by
		// something else (i.e., an unset trace).

		if *(*uintptr)(unsafe.Pointer(varPtr2 + 8)) == uintptr(0) {
			sCleanupVar(tls, varPtr2, *(*uintptr)(unsafe.Pointer(bp /* varPtr */)))
			continue
		}

		nameObj = *(*uintptr)(unsafe.Pointer(varPtr2 + 24 + 32))
		if XTcl_StringMatch(tls, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(nameObj)).Fbytes
			}
			return XTcl_GetString(tls, nameObj)
		}(), pattern) != 0 &&
			XTclPtrUnsetVarIdx(tls, interp, varPtr2, *(*uintptr)(unsafe.Pointer(bp)), varNameObj,
				nameObj, unsetFlags, -1) != TCL_OK {
			// If we incremented a refcount, we must decrement it here as we
			// will not be coming back properly due to the error.

			if protectedVarPtr != 0 {
				(*VarInHash)(unsafe.Pointer(protectedVarPtr)).FrefCount--
				sCleanupVar(tls, protectedVarPtr, *(*uintptr)(unsafe.Pointer(bp /* varPtr */)))
			}
			return TCL_ERROR
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclInitArrayCmd --
//
//	This creates the ensemble for the "array" command.
//
// Results:
//	The handle for the created ensemble.
//
// Side effects:
//	Creates a command in the global namespace.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTclInitArrayCmd(tls *libc.TLS, interp uintptr) Tcl_Command { /* tclVar.c:4100:1: */

	return XTclMakeEnsemble(tls, interp, ts+25675, uintptr(unsafe.Pointer(&arrayImplMap)))
}

var arrayImplMap = [12]EnsembleImplMap{
	{Fname: ts + 66457, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 66465, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12691, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 22680, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12227, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 66476, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 5888, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 12823, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 66488, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 66500, Fproc: 0, FcompileProc: 0},
	{Fname: ts + 3965, Fproc: 0, FcompileProc: 0},
	{},
} /* tclVar.c:4103:34 */

//----------------------------------------------------------------------
//
// ObjMakeUpvar --
//
//	This function does all of the work of the "global" and "upvar"
//	commands.
//
// Results:
//	A standard Tcl completion code. If an error occurs then an error
//	message is left in iPtr->result.
//
// Side effects:
//	The variable given by myName is linked to the variable in framePtr
//	given by otherP1 and otherP2, so that references to myName are
//	redirected to the other variable like a symbolic link.
//	Callers must Incr myNamePtr if they plan to Decr it.
//	Callers must Incr otherP1Ptr if they plan to Decr it.
//
//----------------------------------------------------------------------

func sObjMakeUpvar(tls *libc.TLS, interp uintptr, framePtr uintptr, otherP1Ptr uintptr, otherP2 uintptr, otherFlags int32, myNamePtr uintptr, myFlags int32, index int32) int32 { /* tclVar.c:4144:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	var iPtr uintptr = interp
	var otherPtr uintptr
	// var arrayPtr uintptr at bp+40, 8

	var varFramePtr uintptr

	// Find "other" in "framePtr". If not looking up other in just the current
	// namespace, temporarily replace the current var frame pointer in the
	// interpreter in order to use TclObjLookupVar.

	if framePtr == uintptr(0) {
		framePtr = (*Interp)(unsafe.Pointer(iPtr)).FrootFramePtr
	}

	varFramePtr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	if !(otherFlags&TCL_NAMESPACE_ONLY != 0) {
		(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = framePtr
	}
	otherPtr = XTclObjLookupVar(tls, interp, otherP1Ptr, otherP2,
		otherFlags|TCL_LEAVE_ERR_MSG, ts+29024,
		/*createPart1*/ 1 /*createPart2*/, 1, bp+40)
	if !(otherFlags&TCL_NAMESPACE_ONLY != 0) {
		(*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr = varFramePtr
	}
	if otherPtr == uintptr(0) {
		return TCL_ERROR
	}

	// Check that we are not trying to create a namespace var linked to a
	// local variable in a procedure. If we allowed this, the local
	// variable in the shorter-lived procedure frame could go away leaving
	// the namespace var's reference invalid.

	if index < 0 {
		if !(func() int32 {
			if *(*uintptr)(unsafe.Pointer(bp + 40)) != uintptr(0) {
				return libc.Bool32((*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).Fflags&VAR_IN_HASHTABLE != 0 && func() uintptr {
					if (*Var)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).Fflags&VAR_IN_HASHTABLE != 0 {
						return (*TclVarHashTable)(unsafe.Pointer((*VarInHash)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).Fentry.FtablePtr)).FnsPtr
					}
					return uintptr(0)
				}() != 0)
			}
			return libc.Bool32((*Var)(unsafe.Pointer(otherPtr)).Fflags&VAR_IN_HASHTABLE != 0 && func() uintptr {
				if (*Var)(unsafe.Pointer(otherPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
					return (*TclVarHashTable)(unsafe.Pointer((*VarInHash)(unsafe.Pointer(otherPtr)).Fentry.FtablePtr)).FnsPtr
				}
				return uintptr(0)
			}() != 0)
		}() != 0) &&
			(myFlags&(TCL_GLOBAL_ONLY|TCL_NAMESPACE_ONLY) != 0 ||
				varFramePtr == uintptr(0) ||
				!((*CallFrame)(unsafe.Pointer(varFramePtr)).FisProcCallFrame&FRAME_IS_PROC != 0) ||
				libc.Xstrstr(tls, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes
					}
					return XTcl_GetString(tls, myNamePtr)
				}(), ts+7376) != uintptr(0)) {
			XTcl_SetObjResult(tls, iPtr, XTcl_ObjPrintf(tls,

				ts+66511,
				libc.VaList(bp, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes
					}
					return XTcl_GetString(tls, myNamePtr)
				}())))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+50683, ts+50689, uintptr(0)))
			return TCL_ERROR
		}
	}

	return XTclPtrObjMakeUpvarIdx(tls, interp, otherPtr, myNamePtr, myFlags, index)
}

//----------------------------------------------------------------------
//
// TclPtrMakeUpvar --
//
//	This procedure does all of the work of the "global" and "upvar"
//	commands.
//
// Results:
//	A standard Tcl completion code. If an error occurs then an error
//	message is left in iPtr->result.
//
// Side effects:
//	The variable given by myName is linked to the variable in framePtr
//	given by otherP1 and otherP2, so that references to myName are
//	redirected to the other variable like a symbolic link.
//
//----------------------------------------------------------------------

func XTclPtrMakeUpvar(tls *libc.TLS, interp uintptr, otherPtr uintptr, myName uintptr, myFlags int32, index int32) int32 { /* tclVar.c:4236:1: */
	var myNamePtr uintptr = uintptr(0)
	var result int32

	if myName != 0 {
		myNamePtr = XTcl_NewStringObj(tls, myName, -1)
		(*Tcl_Obj)(unsafe.Pointer(myNamePtr)).FrefCount++
	}
	result = XTclPtrObjMakeUpvarIdx(tls, interp, otherPtr, myNamePtr, myFlags,
		index)
	if myNamePtr != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = myNamePtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	return result
}

func XTclPtrObjMakeUpvar(tls *libc.TLS, interp uintptr, otherPtr Tcl_Var, myNamePtr uintptr, myFlags int32) int32 { /* tclVar.c:4263:1: */
	return XTclPtrObjMakeUpvarIdx(tls, interp, otherPtr, myNamePtr, myFlags,
		-1)
}

// Callers must Incr myNamePtr if they plan to Decr it.

func XTclPtrObjMakeUpvarIdx(tls *libc.TLS, interp uintptr, otherPtr uintptr, myNamePtr uintptr, myFlags int32, index int32) int32 { /* tclVar.c:4279:1: */
	bp := tls.Alloc(204)
	defer tls.Free(204)
	*(*int32)(unsafe.Pointer(bp + 200)) = index

	var iPtr uintptr = interp
	var varFramePtr uintptr = (*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr
	// var errMsg uintptr at bp+192, 8

	var p uintptr
	var myName uintptr
	var varPtr uintptr

	if *(*int32)(unsafe.Pointer(bp + 200)) >= 0 {
		if !((*CallFrame)(unsafe.Pointer(varFramePtr)).FisProcCallFrame&FRAME_IS_PROC != 0) {
			XTcl_Panic(tls, ts+66601, 0)
		}
		varPtr = (*CallFrame)(unsafe.Pointer(varFramePtr)).FcompiledLocals + uintptr(*(*int32)(unsafe.Pointer(bp + 200)))*16
		myNamePtr = *(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr + 8 + uintptr(*(*int32)(unsafe.Pointer(bp + 200)))*8))
		if myNamePtr != 0 {
			myName = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes
				}
				return XTcl_GetString(tls, myNamePtr)
			}()
		} else {
			myName = uintptr(0)
		}
	} else {
		// Do not permit the new variable to look like an array reference, as
		// it will not be reachable in that case [Bug 600812, TIP 184]. The
		// "definition" of what "looks like an array reference" is consistent
		// (and must remain consistent) with the code in TclObjLookupVar().

		myName = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes
			}
			return XTcl_GetString(tls, myNamePtr)
		}()
		p = libc.Xstrstr(tls, myName, ts+50766)
		if p != uintptr(0) {
			p += uintptr(libc.Xstrlen(tls, p) - uint64(1))
			if int32(*(*int8)(unsafe.Pointer(p))) == ')' {
				// myName looks like an array reference.

				XTcl_SetObjResult(tls, iPtr, XTcl_ObjPrintf(tls,

					ts+66655, libc.VaList(bp, myName)))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+50683, ts+50743,
					uintptr(0)))
				return TCL_ERROR
			}
		}

		// Lookup and eventually create the new variable. Set the flag bit
		// TCL_AVOID_RESOLVERS to indicate the special resolution rules for
		// upvar purposes:
		//   - Bug #696893 - variable is either proc-local or in the current
		//     namespace; never follow the second (global) resolution path.
		//   - Bug #631741 - do not use special namespace or interp resolvers.

		varPtr = XTclLookupSimpleVar(tls, interp, myNamePtr,
			myFlags|TCL_AVOID_RESOLVERS, 1, bp+192, bp+200)
		if varPtr == uintptr(0) {
			XTclObjVarErrMsg(tls, interp, myNamePtr, uintptr(0), ts+23746, *(*uintptr)(unsafe.Pointer(bp + 192 /* errMsg */)), -1)
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7699, ts+66148,
				func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(myNamePtr)).Fbytes
					}
					return XTcl_GetString(tls, myNamePtr)
				}(), uintptr(0)))
			return TCL_ERROR
		}
	}

	if varPtr == otherPtr {
		XTcl_SetObjResult(tls, iPtr, XTcl_NewStringObj(tls,
			ts+66743, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+50683, ts+43923, uintptr(0)))
		return TCL_ERROR
	}

	if (*Var)(unsafe.Pointer(varPtr)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0 {
		XTcl_SetObjResult(tls, iPtr, XTcl_ObjPrintf(tls,
			ts+66779, libc.VaList(bp+112, myName)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+120, ts+4178, ts+50683, ts+66825, uintptr(0)))
		return TCL_ERROR
	} else if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) {
		var linkPtr uintptr

		// The variable already existed. Make sure this variable "varPtr"
		// isn't the same as "otherPtr" (avoid circular links). Also, if it's
		// not an upvar then it's an error. If it is an upvar, then just
		// disconnect it from the thing it currently refers to.

		if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_LINK != 0) {
			XTcl_SetObjResult(tls, iPtr, XTcl_ObjPrintf(tls,
				ts+66832, libc.VaList(bp+152, myName)))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+160, ts+4178, ts+50683, ts+66861, uintptr(0)))
			return TCL_ERROR
		}

		linkPtr = *(*uintptr)(unsafe.Pointer(varPtr + 8))
		if linkPtr == otherPtr {
			return TCL_OK
		}
		if (*Var)(unsafe.Pointer(linkPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
			(*VarInHash)(unsafe.Pointer(linkPtr)).FrefCount--
			if *(*uintptr)(unsafe.Pointer(linkPtr + 8)) == uintptr(0) {
				sCleanupVar(tls, linkPtr, uintptr(0))
			}
		}
	}
	(*Var)(unsafe.Pointer(varPtr)).Fflags = (*Var)(unsafe.Pointer(varPtr)).Fflags&libc.CplInt32(VAR_ARRAY) | VAR_LINK
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = otherPtr
	if (*Var)(unsafe.Pointer(otherPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
		(*VarInHash)(unsafe.Pointer(otherPtr)).FrefCount++
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_UpVar --
//
//	This function links one variable to another, just like the "upvar"
//	command.
//
// Results:
//	A standard Tcl completion code. If an error occurs then an error
//	message is left in the interp's result.
//
// Side effects:
//	The variable in frameName whose name is given by varName becomes
//	accessible under the name localNameStr, so that references to
//	localNameStr are redirected to the other variable like a symbolic
//	link.
//
//----------------------------------------------------------------------

func XTcl_UpVar(tls *libc.TLS, interp uintptr, frameName uintptr, varName uintptr, localNameStr uintptr, flags int32) int32 { /* tclVar.c:4418:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var result int32
	// var framePtr uintptr at bp, 8

	var varNamePtr uintptr
	var localNamePtr uintptr

	if XTclGetFrame(tls, interp, frameName, bp) == -1 {
		return TCL_ERROR
	}

	varNamePtr = XTcl_NewStringObj(tls, varName, -1)
	(*Tcl_Obj)(unsafe.Pointer(varNamePtr)).FrefCount++
	localNamePtr = XTcl_NewStringObj(tls, localNameStr, -1)
	(*Tcl_Obj)(unsafe.Pointer(localNamePtr)).FrefCount++

	result = sObjMakeUpvar(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* framePtr */)), varNamePtr, uintptr(0), 0,
		localNamePtr, flags, -1)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = varNamePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = localNamePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_UpVar2 --
//
//	This function links one variable to another, just like the "upvar"
//	command.
//
// Results:
//	A standard Tcl completion code. If an error occurs then an error
//	message is left in the interp's result.
//
// Side effects:
//	The variable in frameName whose name is given by part1 and part2
//	becomes accessible under the name localNameStr, so that references to
//	localNameStr are redirected to the other variable like a symbolic
//	link.
//
//----------------------------------------------------------------------

func XTcl_UpVar2(tls *libc.TLS, interp uintptr, frameName uintptr, part1 uintptr, part2 uintptr, localNameStr uintptr, flags int32) int32 { /* tclVar.c:4472:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var result int32
	// var framePtr uintptr at bp, 8

	var part1Ptr uintptr
	var localNamePtr uintptr

	if XTclGetFrame(tls, interp, frameName, bp) == -1 {
		return TCL_ERROR
	}

	part1Ptr = XTcl_NewStringObj(tls, part1, -1)
	(*Tcl_Obj)(unsafe.Pointer(part1Ptr)).FrefCount++
	localNamePtr = XTcl_NewStringObj(tls, localNameStr, -1)
	(*Tcl_Obj)(unsafe.Pointer(localNamePtr)).FrefCount++

	result = sObjMakeUpvar(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* framePtr */)), part1Ptr, part2, 0,
		localNamePtr, flags, -1)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = part1Ptr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = localNamePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return result
}

//----------------------------------------------------------------------
//
// Tcl_GetVariableFullName --
//
//	Given a Tcl_Var token returned by Tcl_FindNamespaceVar, this function
//	appends to an object the namespace variable's full name, qualified by
//	a sequence of parent namespace names.
//
// Results:
//	None.
//
// Side effects:
//	The variable's fully-qualified name is appended to the string
//	representation of objPtr.
//
//----------------------------------------------------------------------

func XTcl_GetVariableFullName(tls *libc.TLS, interp uintptr, variable Tcl_Var, objPtr uintptr) { /* tclVar.c:4524:1: */
	var iPtr uintptr = interp
	var varPtr uintptr = variable
	var namePtr uintptr
	var nsPtr uintptr

	if !(varPtr != 0) || (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_ARRAY_ELEMENT != 0 {
		return
	}

	// Add the full name of the containing namespace (if any), followed by the
	// "::" separator, then the variable name.

	nsPtr = func() uintptr {
		if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
			return (*TclVarHashTable)(unsafe.Pointer((*VarInHash)(unsafe.Pointer(varPtr)).Fentry.FtablePtr)).FnsPtr
		}
		return uintptr(0)
	}()
	if nsPtr != 0 {
		XTcl_AppendToObj(tls, objPtr, (*Namespace)(unsafe.Pointer(nsPtr)).FfullName, -1)
		if nsPtr != (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr {
			XTcl_AppendToObj(tls, objPtr, ts+7376, 2)
		}
	}
	if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
		if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_DEAD_HASH != 0) {
			namePtr = *(*uintptr)(unsafe.Pointer(varPtr + 24 + 32))
			XTcl_AppendObjToObj(tls, objPtr, namePtr)
		}
	} else if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FprocPtr != 0 {
		var index int32 = int32((int64(varPtr) - int64((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FcompiledLocals)) / 16)

		if index >= 0 && index < (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnumCompiledLocals {
			namePtr = *(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr + 8 + uintptr(index)*8))
			XTcl_AppendObjToObj(tls, objPtr, namePtr)
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_GlobalObjCmd --
//
//	This object-based function is invoked to process the "global" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_GlobalObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:4585:1: */
	var iPtr uintptr = interp
	var objPtr uintptr
	var tailPtr uintptr
	var varName uintptr
	var tail uintptr
	var result int32
	var i int32

	// If we are not executing inside a Tcl procedure, just return.

	if !((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame&FRAME_IS_PROC != 0) {
		return TCL_OK
	}

	for i = 1; i < objc; i++ {
		// Make a local variable linked to its counterpart in the global ::
		// namespace.

		objPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
		varName = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
			}
			return XTcl_GetString(tls, objPtr)
		}()

		// The variable name might have a scope qualifier, but the name for
		// the local "link" variable must be the simple name at the tail.

		for tail = varName; int32(*(*int8)(unsafe.Pointer(tail))) != 0; tail++ {
			// empty body
		}
		for tail > varName && (int32(*(*int8)(unsafe.Pointer(tail))) != ':' || int32(*(*int8)(unsafe.Pointer(tail - uintptr(1)))) != ':') {
			tail--
		}
		if int32(*(*int8)(unsafe.Pointer(tail))) == ':' && tail > varName {
			tail++
		}

		if tail == varName {
			tailPtr = objPtr
		} else {
			tailPtr = XTcl_NewStringObj(tls, tail, -1)
			(*Tcl_Obj)(unsafe.Pointer(tailPtr)).FrefCount++
		}

		// Link to the variable "varName" in the global :: namespace.

		result = sObjMakeUpvar(tls, interp, uintptr(0), objPtr, uintptr(0),
			TCL_GLOBAL_ONLY /*myName*/, tailPtr /*myFlags*/, 0, -1)

		if tail != varName {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = tailPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		}

		if result != TCL_OK {
			return result
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_VariableObjCmd --
//
//	Invoked to implement the "variable" command that creates one or more
//	global variables. Handles the following syntax:
//
//	    variable ?name value...? name ?value?
//
//	One or more variables can be created. The variables are initialized
//	with the specified values. The value for the last variable is
//	optional.
//
//	If the variable does not exist, it is created and given the optional
//	value. If it already exists, it is simply set to the optional value.
//	Normally, "name" is an unqualified name, so it is created in the
//	current namespace. If it includes namespace qualifiers, it can be
//	created in another namespace.
//
//	If the variable command is executed inside a Tcl procedure, it creates
//	a local variable linked to the newly-created namespace variable.
//
// Results:
//	Returns TCL_OK if the variable is found or created. Returns TCL_ERROR
//	if anything goes wrong.
//
// Side effects:
//	If anything goes wrong, this function returns an error message as the
//	result in the interpreter's result object.
//
//----------------------------------------------------------------------

func XTcl_VariableObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:4689:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var iPtr uintptr = interp
	var varName uintptr
	var tail uintptr
	var cp uintptr
	var varPtr uintptr
	// var arrayPtr uintptr at bp+32, 8

	var varValuePtr uintptr
	var i int32
	var result int32
	var varNamePtr uintptr
	var tailPtr uintptr

	for i = 1; i < objc; i = i + 2 {
		// Look up each variable in the current namespace context, creating it
		// if necessary.

		varNamePtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
		varName = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes
			}
			return XTcl_GetString(tls, varNamePtr)
		}()
		varPtr = XTclObjLookupVarEx(tls, interp, varNamePtr, uintptr(0),
			TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG, ts+50698,
			/*createPart1*/ 1 /*createPart2*/, 0, bp+32)

		if *(*uintptr)(unsafe.Pointer(bp + 32)) != uintptr(0) {
			// Variable cannot be an element in an array. If arrayPtr is
			// non-NULL, it is, so throw up an error and return.

			XTclObjVarErrMsg(tls, interp, varNamePtr, uintptr(0), ts+50698,
				uintptr(unsafe.Pointer(&sISARRAYELEMENT)), -1)
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+50683, ts+50743, uintptr(0)))
			return TCL_ERROR
		}

		if varPtr == uintptr(0) {
			return TCL_ERROR
		}

		// Mark the variable as a namespace variable and increment its
		// reference count so that it will persist until its namespace is
		// destroyed or until the variable is unset.

		if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_NAMESPACE_VAR != 0) {
			*(*int32)(unsafe.Pointer(varPtr)) |= VAR_NAMESPACE_VAR
			if (*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
				(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount++
			}
		}

		// If a value was specified, set the variable to that value.
		// Otherwise, if the variable is new, leave it undefined. (If the
		// variable already exists and no value was specified, leave its value
		// unchanged; just create the local link if we're in a Tcl procedure).

		if i+1 < objc { // A value was specified.
			varValuePtr = XTclPtrSetVarIdx(tls, interp, varPtr, *(*uintptr)(unsafe.Pointer(bp + 32 /* arrayPtr */)),
				varNamePtr, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)),
				TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG, -1)
			if varValuePtr == uintptr(0) {
				return TCL_ERROR
			}
		}

		// If we are executing inside a Tcl procedure, create a local variable
		// linked to the new namespace variable "varName".

		if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame&FRAME_IS_PROC != 0 {
			// varName might have a scope qualifier, but the name for the
			// local "link" variable must be the simple name at the tail.
			//
			// Locate tail in one pass: drop any prefix after two *or more*
			// consecutive ":" characters).

			for tail = libc.AssignUintptr(&cp, varName); int32(*(*int8)(unsafe.Pointer(cp))) != 0; {
				if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&cp, 1)))) == ':' {
					for int32(*(*int8)(unsafe.Pointer(cp))) == ':' {
						tail = libc.PreIncUintptr(&cp, 1)
					}
				}
			}

			// Create a local link "tail" to the variable "varName" in the
			// current namespace.

			if tail == varName {
				tailPtr = varNamePtr
			} else {
				tailPtr = XTcl_NewStringObj(tls, tail, -1)
				(*Tcl_Obj)(unsafe.Pointer(tailPtr)).FrefCount++
			}

			result = sObjMakeUpvar(tls, interp, uintptr(0), varNamePtr /*otherP2*/, uintptr(0),
				/*otherFlags*/ TCL_NAMESPACE_ONLY,
				/*myName*/ tailPtr /*myFlags*/, 0, -1)

			if tail != varName {
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = tailPtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
			}

			if result != TCL_OK {
				return result
			}
		}
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_UpvarObjCmd --
//
//	This object-based function is invoked to process the "upvar" Tcl
//	command. See the user documentation for details on what it does.
//
// Results:
//	A standard Tcl object result value.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

// ARGSUSED
func XTcl_UpvarObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:4823:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// var framePtr uintptr at bp+48, 8

	var result int32
	var hasLevel int32
	var levelObj uintptr

	if objc < 3 {
		XTcl_WrongNumArgs(tls, interp, 1, objv,
			ts+66868)
		return TCL_ERROR
	}

	if objc&1 != 0 {
		// Even number of arguments, so use the default level of "1" by
		// passing NULL to TclObjGetFrame.

		levelObj = uintptr(0)
		hasLevel = 0
	} else {
		// Odd number of arguments, so objv[1] must contain the level.

		levelObj = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		hasLevel = 1
	}

	// Find the call frame containing each of the "other variables" to be
	// linked to.

	result = XTclObjGetFrame(tls, interp, levelObj, bp+48)
	if result == -1 {
		return TCL_ERROR
	}
	if result == 0 && hasLevel != 0 {
		// Synthesize an error message since TclObjGetFrame doesn't do this
		// for this particular case.

		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+14298, libc.VaList(bp, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(levelObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(levelObj)).Fbytes
				}
				return XTcl_GetString(tls, levelObj)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+14313,
			func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(levelObj)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(levelObj)).Fbytes
				}
				return XTcl_GetString(tls, levelObj)
			}(), uintptr(0)))
		return TCL_ERROR
	}

	// We've now finished with parsing levels; skip to the variable names.

	objc = objc - (hasLevel + 1)
	objv += 8 * uintptr(hasLevel+1)

	// Iterate over each (other variable, local variable) pair. Divide the
	// other variable name into two parts, then call MakeUpvar to do all the
	// work of linking it to the local variable.

__1:
	if !(objc > 0) {
		goto __3
	}
	{
		result = sObjMakeUpvar(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 48 /* framePtr */)) /* othervarName */, *(*uintptr)(unsafe.Pointer(objv)),
			uintptr(0), 0 /* myVarName */, *(*uintptr)(unsafe.Pointer(objv + 1*8)) /*flags*/, 0, -1)
		if result != TCL_OK {
			return TCL_ERROR
		}

	}
	goto __2
__2:
	objc = objc - 2
	objv += 8 * uintptr(2)
	goto __1
	goto __3
__3:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// SetArraySearchObj --
//
//	This function converts the given tcl object into one that has the
//	"array search" internal type.
//
// Results:
//	TCL_OK if the conversion succeeded, and TCL_ERROR if it failed (when
//	an error message will be placed in the interpreter's result.)
//
// Side effects:
//	Updates the internal type and representation of the object to make
//	this an array-search object. See the tclArraySearchType declaration
//	above for details of the internal representation.
//
//----------------------------------------------------------------------

func sSetArraySearchObj(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclVar.c:4922:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var string uintptr
	// var end uintptr at bp+48, 8
	// Can't be const due to strtoul defn.
	var id int32
	var offset Size_t

	// Get the string representation. Make it up-to-date if necessary.

	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes
		}
		return XTcl_GetString(tls, objPtr)
	}()

	// Parse the id into the three parts separated by dashes.

	if !(int32(*(*int8)(unsafe.Pointer(string))) != 's' || int32(*(*int8)(unsafe.Pointer(string + 1))) != '-') {
		goto __1
	}
	goto syntax
__1:
	;
	id = int32(libc.Xstrtoul(tls, string+uintptr(2), bp+48, 10))
	if !(*(*uintptr)(unsafe.Pointer(bp + 48)) == string+uintptr(2) || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48))))) != '-') {
		goto __2
	}
	goto syntax
__2:
	;

	// Can't perform value check in this context, so place reference to place
	// in string to use for the check in the object instead.

	*(*uintptr)(unsafe.Pointer(bp + 48 /* end */))++
	offset = Size_t((int64(*(*uintptr)(unsafe.Pointer(bp + 48))) - int64(string)) / 1)

	if !((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr != uintptr(0)) {
		goto __3
	}
	if !((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc != uintptr(0)) {
		goto __4
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc})).f(tls, objPtr)
__4:
	;
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
__3:
	;

	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(unsafe.Pointer(&XtclArraySearchType))
	*(*uintptr)(unsafe.Pointer(objPtr + 32)) = uintptr(Intptr_t(id))
	*(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */)) = uintptr(Intptr_t(offset))
	return TCL_OK

syntax:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+66918, libc.VaList(bp, string)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+66949, string, uintptr(0)))
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// ParseSearchId --
//
//	This function translates from a tcl object to a pointer to an active
//	array search (if there is one that matches the string).
//
// Results:
//	The return value is a pointer to the array search indicated by string,
//	or NULL if there isn't one. If NULL is returned, the interp's result
//	contains an error message.
//
// Side effects:
//	The tcl object might have its internal type and representation
//	modified.
//
//----------------------------------------------------------------------

func sParseSearchId(tls *libc.TLS, interp uintptr, varPtr uintptr, varNamePtr uintptr, handleObj uintptr) uintptr { /* tclVar.c:4990:20: */
	bp := tls.Alloc(64)
	defer tls.Free(64)

	var iPtr uintptr
	var string uintptr
	var offset Size_t
	var id int32
	var searchPtr uintptr
	var varName uintptr
	var hPtr uintptr
	iPtr = interp
	varName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes
		}
		return XTcl_GetString(tls, varNamePtr)
	}()

	// Parse the id.

	if !((*Tcl_Obj)(unsafe.Pointer(handleObj)).FtypePtr != uintptr(unsafe.Pointer(&XtclArraySearchType)) &&
		sSetArraySearchObj(tls, interp, handleObj) != TCL_OK) {
		goto __1
	}
	return uintptr(0)
__1:
	;

	// Extract the information out of the Tcl_Obj.

	id = int32(*(*uintptr)(unsafe.Pointer(handleObj + 32)))
	string = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(handleObj)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(handleObj)).Fbytes
		}
		return XTcl_GetString(tls, handleObj)
	}()
	offset = Size_t(int32(*(*uintptr)(unsafe.Pointer(handleObj + 32 + 8))))

	// This test cannot be placed inside the Tcl_Obj machinery, since it is
	// dependent on the variable context.

	if !(libc.Xstrcmp(tls, string+uintptr(offset), varName) != 0) {
		goto __2
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+66961,
		libc.VaList(bp, string, varName)))
	goto badLookup
__2:
	;

	// Search through the list of active searches on the interpreter to see if
	// the desired one exists.
	//
	// Note that we cannot store the searchPtr directly in the Tcl_Obj as that
	// would run into trouble when DeleteSearches() was called so we must scan
	// this list every time.

	if !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_SEARCH_ACTIVE != 0) {
		goto __3
	}
	hPtr =
		(*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1096 /* &.varSearches */)).FfindProc})).f(tls, iPtr+1096 /* &.varSearches */, varPtr)

	searchPtr = (*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData
__4:
	if !(searchPtr != uintptr(0)) {
		goto __6
	}
	if !((*ArraySearch)(unsafe.Pointer(searchPtr)).Fid == id) {
		goto __7
	}
	return searchPtr
__7:
	;
	goto __5
__5:
	searchPtr = (*ArraySearch)(unsafe.Pointer(searchPtr)).FnextPtr
	goto __4
	goto __6
__6:
	;
__3:
	;
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+67008, libc.VaList(bp+16, string)))
badLookup:
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+7699, ts+66949, string, uintptr(0)))
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// DeleteSearches --
//
//	This function is called to free up all of the searches associated
//	with an array variable.
//
// Results:
//	None.
//
// Side effects:
//	Memory is released to the storage allocator.
//
//----------------------------------------------------------------------

func sDeleteSearches(tls *libc.TLS, iPtr uintptr, arrayVarPtr uintptr) { /* tclVar.c:5082:1: */
	var searchPtr uintptr
	var nextPtr uintptr
	var sPtr uintptr

	if (*Var)(unsafe.Pointer(arrayVarPtr)).Fflags&VAR_SEARCH_ACTIVE != 0 {
		sPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1096 /* &.varSearches */)).FfindProc})).f(tls, iPtr+1096 /* &.varSearches */, arrayVarPtr)
		for searchPtr = (*Tcl_HashEntry)(unsafe.Pointer(sPtr)).FclientData; searchPtr != uintptr(0); searchPtr = nextPtr {
			nextPtr = (*ArraySearch)(unsafe.Pointer(searchPtr)).FnextPtr
			XTclpFree(tls, searchPtr)
		}
		*(*int32)(unsafe.Pointer(arrayVarPtr)) &= libc.CplInt32(VAR_SEARCH_ACTIVE)
		XTcl_DeleteHashEntry(tls, sPtr)
	}
}

//----------------------------------------------------------------------
//
// TclDeleteNamespaceVars --
//
//	This function is called to recycle all the storage space associated
//	with a namespace's table of variables.
//
// Results:
//	None.
//
// Side effects:
//	Variables are deleted and trace functions are invoked, if any are
//	declared.
//
//----------------------------------------------------------------------

func XTclDeleteNamespaceVars(tls *libc.TLS, nsPtr uintptr) { /* tclVar.c:5121:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var tablePtr uintptr = nsPtr + 248
	var interp uintptr = (*Namespace)(unsafe.Pointer(nsPtr)).Finterp
	var iPtr uintptr = interp
	// var search Tcl_HashSearch at bp, 24

	var flags int32 = 0
	var varPtr uintptr

	// Determine what flags to pass to the trace callback functions.

	if nsPtr == (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr {
		flags = TCL_GLOBAL_ONLY
	} else if nsPtr == (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr {
		flags = TCL_NAMESPACE_ONLY
	}

	for varPtr = sVarHashFirstVar(tls, tablePtr, bp); varPtr != uintptr(0); varPtr = sVarHashFirstVar(tls, tablePtr, bp) {
		var objPtr uintptr
		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			objPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
		{
		}

		(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount++ // Make sure we get to remove from
		// hash.
		XTcl_GetVariableFullName(tls, interp, varPtr, objPtr)
		sUnsetVarStruct(tls, varPtr, uintptr(0), iPtr /* part1 */, objPtr,
			uintptr(0), flags, -1)

		// We just unset the variable. However, an unset trace might
		// have re-set it, or might have re-established traces on it.
		// This namespace and its vartable are going away unconditionally,
		// so we cannot let such things linger. That would be a leak.
		//
		// First we destroy all traces. ...

		if (*Var)(unsafe.Pointer(varPtr)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0 {
			var tPtr uintptr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FfindProc})).f(tls, iPtr+1008 /* &.varTraces */, varPtr)
			var tracePtr uintptr = (*Tcl_HashEntry)(unsafe.Pointer(tPtr)).FclientData
			var activePtr uintptr

			for tracePtr != 0 {
				var prevPtr uintptr = tracePtr

				tracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
				(*VarTrace)(unsafe.Pointer(prevPtr)).FnextPtr = uintptr(0)
				XTcl_EventuallyFree(tls, prevPtr, uintptr(3))
			}
			XTcl_DeleteHashEntry(tls, tPtr)
			*(*int32)(unsafe.Pointer(varPtr)) &= libc.CplInt32(VAR_TRACED_READ | VAR_TRACED_WRITE | VAR_TRACED_ARRAY | VAR_TRACED_UNSET)
			for activePtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveVarTracePtr; activePtr != uintptr(0); activePtr = (*ActiveVarTrace)(unsafe.Pointer(activePtr)).FnextPtr {
				if (*ActiveVarTrace)(unsafe.Pointer(activePtr)).FvarPtr == varPtr {
					(*ActiveVarTrace)(unsafe.Pointer(activePtr)).FnextTracePtr = uintptr(0)
				}
			}
		}

		// ...and then, if the variable still holds a value, we unset it
		// again. This time with no traces left, we're sure it goes away.

		if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) {
			sUnsetVarStruct(tls, varPtr, uintptr(0), iPtr /* part1 */, objPtr,
				uintptr(0), flags, -1)
		}
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = objPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		} // free no longer needed obj
		(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount--
		XTcl_DeleteHashEntry(tls, varPtr+24)
	}
	XTcl_DeleteHashTable(tls, tablePtr)
}

//----------------------------------------------------------------------
//
// TclDeleteVars --
//
//	This function is called to recycle all the storage space associated
//	with a table of variables. For this function to work correctly, it
//	must not be possible for any of the variables in the table to be
//	accessed from Tcl commands (e.g. from trace functions).
//
// Results:
//	None.
//
// Side effects:
//	Variables are deleted and trace functions are invoked, if any are
//	declared.
//
//----------------------------------------------------------------------

func XTclDeleteVars(tls *libc.TLS, iPtr uintptr, tablePtr uintptr) { /* tclVar.c:5219:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var interp uintptr = iPtr
	// var search Tcl_HashSearch at bp, 24

	var varPtr uintptr
	var flags int32
	var currNsPtr uintptr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr

	// Determine what flags to pass to the trace callback functions.

	flags = TCL_TRACE_UNSETS
	if tablePtr == (*Interp)(unsafe.Pointer(iPtr)).FglobalNsPtr+248 {
		flags = flags | TCL_GLOBAL_ONLY
	} else if tablePtr == currNsPtr+248 {
		flags = flags | TCL_NAMESPACE_ONLY
	}

	for varPtr = sVarHashFirstVar(tls, tablePtr, bp); varPtr != uintptr(0); varPtr = sVarHashFirstVar(tls, tablePtr, bp) {
		sUnsetVarStruct(tls, varPtr, uintptr(0), iPtr, *(*uintptr)(unsafe.Pointer(varPtr + 24 + 32)), uintptr(0), flags,
			-1)
		XTcl_DeleteHashEntry(tls, varPtr+24)
	}
	XTcl_DeleteHashTable(tls, tablePtr)
}

//----------------------------------------------------------------------
//
// TclDeleteCompiledLocalVars --
//
//	This function is called to recycle storage space associated with the
//	compiler-allocated array of local variables in a procedure call frame.
//	This function resembles TclDeleteVars above except that each variable
//	is stored in a call frame and not a hash table. For this function to
//	work correctly, it must not be possible for any of the variable in the
//	table to be accessed from Tcl commands (e.g. from trace functions).
//
// Results:
//	None.
//
// Side effects:
//	Variables are deleted and trace functions are invoked, if any are
//	declared.
//
//----------------------------------------------------------------------

func XTclDeleteCompiledLocalVars(tls *libc.TLS, iPtr uintptr, framePtr uintptr) { /* tclVar.c:5273:1: */
	var varPtr uintptr
	var numLocals int32
	var i int32
	var namePtrPtr uintptr

	numLocals = (*CallFrame)(unsafe.Pointer(framePtr)).FnumCompiledLocals
	varPtr = (*CallFrame)(unsafe.Pointer(framePtr)).FcompiledLocals
	namePtrPtr = (*CallFrame)(unsafe.Pointer(framePtr)).FlocalCachePtr + 8
	i = 0
__1:
	if !(i < numLocals) {
		goto __3
	}
	{
		sUnsetVarStruct(tls, varPtr, uintptr(0), iPtr, *(*uintptr)(unsafe.Pointer(namePtrPtr)), uintptr(0),
			TCL_TRACE_UNSETS, i)

	}
	goto __2
__2:
	i++
	namePtrPtr += 8
	varPtr += 16
	goto __1
	goto __3
__3:
	;
	(*CallFrame)(unsafe.Pointer(framePtr)).FnumCompiledLocals = 0
}

//----------------------------------------------------------------------
//
// DeleteArray --
//
//	This function is called to free up everything in an array variable.
//	It's the caller's responsibility to make sure that the array is no
//	longer accessible before this function is called.
//
// Results:
//	None.
//
// Side effects:
//	All storage associated with varPtr's array elements is deleted
//	(including the array's hash table). Deletion trace functions for
//	array elements are invoked, then deleted. Any pending traces for array
//	elements are also deleted.
//
//----------------------------------------------------------------------

func sDeleteArray(tls *libc.TLS, iPtr uintptr, arrayNamePtr uintptr, varPtr uintptr, flags int32, index int32) { /* tclVar.c:5314:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var search Tcl_HashSearch at bp, 24

	var tPtr uintptr
	var elPtr uintptr
	var activePtr uintptr
	var objPtr uintptr
	var tracePtr uintptr

	for elPtr = sVarHashFirstVar(tls, *(*uintptr)(unsafe.Pointer(varPtr + 8)), bp); elPtr != uintptr(0); elPtr = sVarHashNextVar(tls, bp) {
		if !((*Var)(unsafe.Pointer(elPtr)).Fflags&(VAR_ARRAY|VAR_LINK) != 0) && *(*uintptr)(unsafe.Pointer(elPtr + 8)) != uintptr(0) {
			objPtr = *(*uintptr)(unsafe.Pointer(elPtr + 8))
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = -1
					for ok := true; ok; ok = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(objPtr + 32)) = XtclFreeObjList
						XtclFreeObjList = objPtr
					}
				} else {
					XTclFreeObj(tls, objPtr)
				}
			}

			*(*uintptr)(unsafe.Pointer(elPtr + 8)) = uintptr(0)
		}

		// Lie about the validity of the hashtable entry. In this way the
		// variables will be deleted by VarHashDeleteTable.

		*(*int32)(unsafe.Pointer(elPtr)) |= VAR_DEAD_HASH
		if (*Var)(unsafe.Pointer(elPtr)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0 {
			// Compute the array name if it was not supplied.

			if (*Var)(unsafe.Pointer(elPtr)).Fflags&VAR_TRACED_UNSET != 0 {
				var elNamePtr uintptr = *(*uintptr)(unsafe.Pointer(elPtr + 24 + 32))

				*(*int32)(unsafe.Pointer(elPtr)) &= libc.CplInt32(VAR_TRACE_ACTIVE)
				XTclObjCallVarTraces(tls, iPtr, uintptr(0), elPtr, arrayNamePtr,
					elNamePtr, flags /* leaveErrMsg */, 0, index)
			}
			tPtr = (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(iPtr + 1008 /* &.varTraces */)).FfindProc})).f(tls, iPtr+1008 /* &.varTraces */, elPtr)
			tracePtr = (*Tcl_HashEntry)(unsafe.Pointer(tPtr)).FclientData
			for tracePtr != 0 {
				var prevPtr uintptr = tracePtr

				tracePtr = (*VarTrace)(unsafe.Pointer(tracePtr)).FnextPtr
				(*VarTrace)(unsafe.Pointer(prevPtr)).FnextPtr = uintptr(0)
				XTcl_EventuallyFree(tls, prevPtr, uintptr(3))
			}
			XTcl_DeleteHashEntry(tls, tPtr)
			*(*int32)(unsafe.Pointer(elPtr)) &= libc.CplInt32(VAR_TRACED_READ | VAR_TRACED_WRITE | VAR_TRACED_ARRAY | VAR_TRACED_UNSET)
			for activePtr = (*Interp)(unsafe.Pointer(iPtr)).FactiveVarTracePtr; activePtr != uintptr(0); activePtr = (*ActiveVarTrace)(unsafe.Pointer(activePtr)).FnextPtr {
				if (*ActiveVarTrace)(unsafe.Pointer(activePtr)).FvarPtr == elPtr {
					(*ActiveVarTrace)(unsafe.Pointer(activePtr)).FnextTracePtr = uintptr(0)
				}
			}
		}
		*(*int32)(unsafe.Pointer(elPtr)) &= libc.CplInt32(VAR_ARRAY | VAR_LINK)
		*(*uintptr)(unsafe.Pointer(elPtr + 8)) = uintptr(0)

		// Even though array elements are not supposed to be namespace
		// variables, some combinations of [upvar] and [variable] may create
		// such beasts - see [Bug 604239]. This is necessary to avoid leaking
		// the corresponding Var struct, and is otherwise harmless.

		if (*Var)(unsafe.Pointer(elPtr)).Fflags&VAR_NAMESPACE_VAR != 0 {
			*(*int32)(unsafe.Pointer(elPtr)) &= libc.CplInt32(VAR_NAMESPACE_VAR)
			if (*Var)(unsafe.Pointer(elPtr)).Fflags&VAR_IN_HASHTABLE != 0 {
				(*VarInHash)(unsafe.Pointer(elPtr)).FrefCount--
			}
		}

	}
	XTcl_DeleteHashTable(tls, *(*uintptr)(unsafe.Pointer(varPtr + 8)))
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(varPtr + 8)))
}

//----------------------------------------------------------------------
//
// TclObjVarErrMsg --
//
//	Generate a reasonable error message describing why a variable
//	operation failed.
//
// Results:
//	None.
//
// Side effects:
//	The interp's result is set to hold a message identifying the variable
//	given by part1 and part2 and describing why the variable operation
//	failed.
//
//----------------------------------------------------------------------

func XTclVarErrMsg(tls *libc.TLS, interp uintptr, part1 uintptr, part2 uintptr, operation uintptr, reason uintptr) { /* tclVar.c:5411:1: */
	var part2Ptr uintptr = uintptr(0)
	var part1Ptr uintptr = XTcl_NewStringObj(tls, part1, -1)

	if part2 != 0 {
		part2Ptr = XTcl_NewStringObj(tls, part2, -1)
	}

	XTclObjVarErrMsg(tls, interp, part1Ptr, part2Ptr, operation, reason, -1)

	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = part1Ptr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	if part2Ptr != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = part2Ptr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
}

func XTclObjVarErrMsg(tls *libc.TLS, interp uintptr, part1Ptr uintptr, part2Ptr uintptr, operation uintptr, reason uintptr, index int32) { /* tclVar.c:5434:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	if !(part1Ptr != 0) {
		if index == -1 {
			XTcl_Panic(tls, ts+67034, 0)
		}
		part1Ptr = *(*uintptr)(unsafe.Pointer((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FlocalCachePtr + 8 + uintptr(index)*8))
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+67078,
		libc.VaList(bp, operation, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(part1Ptr)).Fbytes
			}
			return XTcl_GetString(tls, part1Ptr)
		}(), func() uintptr {
			if part2Ptr != 0 {
				return ts + 50766 /* "(" */
			}
			return ts + 2631 /* "" */
		}(),
			func() uintptr {
				if part2Ptr != 0 {
					return func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(part2Ptr)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(part2Ptr)).Fbytes
						}
						return XTcl_GetString(tls, part2Ptr)
					}()
				}
				return ts + 2631
			}(), func() uintptr {
				if part2Ptr != 0 {
					return ts + 4078 /* ")" */
				}
				return ts + 2631 /* "" */
			}(),
			reason)))
}

//----------------------------------------------------------------------
//
// Internal functions for variable name object types --
//
//----------------------------------------------------------------------

// Panic functions that should never be called in normal operation.

func sPanicOnUpdateVarName(tls *libc.TLS, objPtr uintptr) { /* tclVar.c:5470:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	XTcl_Panic(tls, ts+67102, libc.VaList(bp, ts+67137,
		(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).Fname))
}

func sPanicOnSetVarName(tls *libc.TLS, interp uintptr, objPtr uintptr) int32 { /* tclVar.c:5478:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	XTcl_Panic(tls, ts+67102, libc.VaList(bp, ts+67154,
		(*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr)).Fname))
	return TCL_ERROR
}

// localVarName -
//
// INTERNALREP DEFINITION:
//   twoPtrValue.ptr1:   pointer to name obj in varFramePtr->localCache
//			  or NULL if it is this same obj
//   twoPtrValue.ptr2: index into locals table

func sFreeLocalVarName(tls *libc.TLS, objPtr uintptr) { /* tclVar.c:5497:1: */
	var namePtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))

	if namePtr != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = namePtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

func sDupLocalVarName(tls *libc.TLS, srcPtr uintptr, dupPtr uintptr) { /* tclVar.c:5509:1: */
	var namePtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))

	if !(namePtr != 0) {
		namePtr = srcPtr
	}
	*(*uintptr)(unsafe.Pointer(dupPtr + 32)) = namePtr
	(*Tcl_Obj)(unsafe.Pointer(namePtr)).FrefCount++

	*(*uintptr)(unsafe.Pointer(dupPtr + 32 + 8 /* &.ptr2 */)) = *(*uintptr)(unsafe.Pointer(srcPtr + 32 + 8 /* &.ptr2 */))
	(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr = uintptr(unsafe.Pointer(&localVarNameType))
}

// parsedVarName -
//
// INTERNALREP DEFINITION:
//   twoPtrValue.ptr1 = pointer to the array name Tcl_Obj (NULL if scalar)
//   twoPtrValue.ptr2 = pointer to the element name string (owned by this
//			Tcl_Obj), or NULL if it is a scalar variable

func sFreeParsedVarName(tls *libc.TLS, objPtr uintptr) { /* tclVar.c:5536:1: */
	var arrayPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	var elem uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */))

	if arrayPtr != uintptr(0) {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(arrayPtr)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(arrayPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(arrayPtr)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(arrayPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(arrayPtr)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(arrayPtr)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(arrayPtr)).Flength = -1
				for ok := true; ok; ok = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(arrayPtr + 32)) = XtclFreeObjList
					XtclFreeObjList = arrayPtr
				}
			} else {
				XTclFreeObj(tls, arrayPtr)
			}
		}

		XTclpFree(tls, elem)
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
}

func sDupParsedVarName(tls *libc.TLS, srcPtr uintptr, dupPtr uintptr) { /* tclVar.c:5550:1: */
	var arrayPtr uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32))
	var elem uintptr = *(*uintptr)(unsafe.Pointer(srcPtr + 32 + 8 /* &.ptr2 */))
	var elemCopy uintptr
	var elemLen uint32

	if arrayPtr != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer(arrayPtr)).FrefCount++
		elemLen = uint32(libc.Xstrlen(tls, elem))
		elemCopy = XTcl_Alloc(tls, elemLen+uint32(1))
		libc.Xmemcpy(tls, elemCopy, elem, uint64(elemLen))
		*(*int8)(unsafe.Pointer(elemCopy + uintptr(elemLen))) = int8(0)
		elem = elemCopy
	}

	*(*uintptr)(unsafe.Pointer(dupPtr + 32)) = arrayPtr
	*(*uintptr)(unsafe.Pointer(dupPtr + 32 + 8 /* &.ptr2 */)) = elem
	(*Tcl_Obj)(unsafe.Pointer(dupPtr)).FtypePtr = uintptr(unsafe.Pointer(&tclParsedVarNameType))
}

func sUpdateParsedVarName(tls *libc.TLS, objPtr uintptr) { /* tclVar.c:5574:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var arrayPtr uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32))
	var part2 uintptr = *(*uintptr)(unsafe.Pointer(objPtr + 32 + 8 /* &.ptr2 */))
	var part1 uintptr
	var p uintptr
	// var len1 int32 at bp, 4

	var len2 int32
	var totalLen int32

	if arrayPtr == uintptr(0) {
		// This is a parsed scalar name: what is it doing here?

		XTcl_Panic(tls, ts+67169, 0)
	}

	part1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(arrayPtr)).Fbytes != 0 {
			return func() uintptr {
				*(*int32)(unsafe.Pointer(bp)) = (*Tcl_Obj)(unsafe.Pointer(arrayPtr)).Flength
				return (*Tcl_Obj)(unsafe.Pointer(arrayPtr)).Fbytes
			}()
		}
		return XTcl_GetStringFromObj(tls, arrayPtr, bp)
	}()
	len2 = int32(libc.Xstrlen(tls, part2))

	totalLen = *(*int32)(unsafe.Pointer(bp)) + len2 + 2
	p = XTcl_Alloc(tls, uint32(totalLen+1))
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = p
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = totalLen

	libc.Xmemcpy(tls, p, part1, uint64(*(*int32)(unsafe.Pointer(bp /* len1 */))))
	p += uintptr(*(*int32)(unsafe.Pointer(bp /* len1 */)))
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8('(')
	libc.Xmemcpy(tls, p, part2, uint64(len2))
	p += uintptr(len2)
	*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8(')')
	*(*int8)(unsafe.Pointer(p)) = int8(0)
}

//----------------------------------------------------------------------
//
// Tcl_FindNamespaceVar -- MOVED OVER from tclNamesp.c
//
//	Searches for a namespace variable, a variable not local to a
//	procedure. The variable can be either a scalar or an array, but may
//	not be an element of an array.
//
// Results:
//	Returns a token for the variable if it is found. Otherwise, if it
//	can't be found or there is an error, returns NULL and leaves an error
//	message in the interpreter's result object if "flags" contains
//	TCL_LEAVE_ERR_MSG.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_FindNamespaceVar(tls *libc.TLS, interp uintptr, name uintptr, contextNsPtr uintptr, flags int32) Tcl_Var { /* tclVar.c:5630:1: */
	var namePtr uintptr = XTcl_NewStringObj(tls, name, -1)
	var var1 Tcl_Var

	var1 = sObjFindNamespaceVar(tls, interp, namePtr, contextNsPtr, flags)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = namePtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
	return var1
}

func sObjFindNamespaceVar(tls *libc.TLS, interp uintptr, namePtr uintptr, contextNsPtr uintptr, flags int32) Tcl_Var { /* tclVar.c:5661:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var iPtr uintptr = interp
	var resPtr uintptr
	// var nsPtr [2]uintptr at bp+56, 16

	// var cxtNsPtr uintptr at bp+72, 8

	// var simpleName uintptr at bp+80, 8

	var varPtr uintptr
	var search int32
	var result int32
	// var var1 Tcl_Var at bp+48, 8

	var simpleNamePtr uintptr
	var name uintptr = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(namePtr)).Fbytes
		}
		return XTcl_GetString(tls, namePtr)
	}()

	// If this namespace has a variable resolver, then give it first crack at
	// the variable resolution. It may return a Tcl_Var value, it may signal
	// to continue onward, or it may signal an error.

	if flags&TCL_GLOBAL_ONLY != 0 {
		*(*uintptr)(unsafe.Pointer(bp + 72 /* cxtNsPtr */)) = (*Interp)(unsafe.Pointer(interp)).FglobalNsPtr
	} else if contextNsPtr != uintptr(0) {
		*(*uintptr)(unsafe.Pointer(bp + 72 /* cxtNsPtr */)) = contextNsPtr
	} else {
		*(*uintptr)(unsafe.Pointer(bp + 72 /* cxtNsPtr */)) = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(interp)).FvarFramePtr)).FnsPtr
	}

	if !(flags&TCL_AVOID_RESOLVERS != 0) && ((*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FvarResProc != uintptr(0) || (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr != uintptr(0)) {
		resPtr = (*Interp)(unsafe.Pointer(iPtr)).FresolverPtr

		if (*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FvarResProc != 0 {
			result = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*Namespace)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 /* cxtNsPtr */)))).FvarResProc})).f(tls, interp, name,
				*(*uintptr)(unsafe.Pointer(bp + 72 /* cxtNsPtr */)), flags, bp+48)
		} else {
			result = TCL_CONTINUE
		}

		for result == TCL_CONTINUE && resPtr != 0 {
			if (*ResolverScheme)(unsafe.Pointer(resPtr)).FvarResProc != 0 {
				result = (*struct {
					f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
				})(unsafe.Pointer(&struct{ uintptr }{(*ResolverScheme)(unsafe.Pointer(resPtr)).FvarResProc})).f(tls, interp, name,
					*(*uintptr)(unsafe.Pointer(bp + 72 /* cxtNsPtr */)), flags, bp+48 /* &var1 */)
			}
			resPtr = (*ResolverScheme)(unsafe.Pointer(resPtr)).FnextPtr
		}

		if result == TCL_OK {
			return *(*Tcl_Var)(unsafe.Pointer(bp + 48 /* var1 */))
		} else if result != TCL_CONTINUE {
			return uintptr(0)
		}
	}

	// Find the namespace(s) that contain the variable.

	XTclGetNamespaceForQualName(tls, interp, name, contextNsPtr,
		flags, bp+56, bp+56+1*8, bp+72, bp+80)

	// Look for the variable in the variable table of its namespace. Be sure
	// to check both possible search paths: from the specified namespace
	// context and from the global namespace.

	varPtr = uintptr(0)
	if *(*uintptr)(unsafe.Pointer(bp + 80)) != name {
		simpleNamePtr = XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* simpleName */)), -1)
	} else {
		simpleNamePtr = namePtr
	}

	for search = 0; search < 2 && varPtr == uintptr(0); search++ {
		if *(*uintptr)(unsafe.Pointer(bp + 56 + uintptr(search)*8)) != uintptr(0) && *(*uintptr)(unsafe.Pointer(bp + 80)) != uintptr(0) {
			varPtr = sVarHashCreateVar1(tls, *(*uintptr)(unsafe.Pointer(bp + 56 + uintptr(search)*8))+248, simpleNamePtr, uintptr(0))
		}
	}
	if *(*uintptr)(unsafe.Pointer(bp + 80)) != name {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = simpleNamePtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if varPtr == uintptr(0) && flags&TCL_LEAVE_ERR_MSG != 0 {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+67211, libc.VaList(bp, name)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+14858, name, uintptr(0)))
	}
	return varPtr
}

//----------------------------------------------------------------------
//
// InfoVarsCmd -- (moved over from tclCmdIL.c)
//
//	Called to implement the "info vars" command that returns the list of
//	variables in the interpreter that match an optional pattern. The
//	pattern, if any, consists of an optional sequence of namespace names
//	separated by "::" qualifiers, which is followed by a glob-style
//	pattern that restricts which variables are returned. Handles the
//	following syntax:
//
//	    info vars ?pattern?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func XTclInfoVarsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:5795:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	var iPtr uintptr = interp
	var varName uintptr
	var pattern uintptr
	// var simplePattern uintptr at bp+24, 8

	// var search Tcl_HashSearch at bp+32, 24

	var varPtr uintptr
	// var nsPtr uintptr at bp, 8

	var globalNsPtr uintptr = XTcl_GetGlobalNamespace(tls, interp)
	var currNsPtr uintptr = XTcl_GetCurrentNamespace(tls, interp)
	var listPtr uintptr
	var elemObjPtr uintptr
	var varNamePtr uintptr
	var specificNsInPattern int32 = 0 // Init. to avoid compiler warning.
	var simplePatternPtr uintptr = uintptr(0)

	// Get the pattern and find the "effective namespace" in which to list
	// variables. We only use this effective namespace if there's no active
	// Tcl procedure frame.

	if objc == 1 {
		*(*uintptr)(unsafe.Pointer(bp + 24 /* simplePattern */)) = uintptr(0)
		*(*uintptr)(unsafe.Pointer(bp /* nsPtr */)) = currNsPtr
		specificNsInPattern = 0
	} else if objc == 2 {
		// From the pattern, get the effective namespace and the simple
		// pattern (no namespace qualifiers or ::'s) at the end. If an error
		// was found while parsing the pattern, return it. Otherwise, if the
		// namespace wasn't found, just leave nsPtr NULL: we will return an
		// empty list since no variables there can be found.

		// var dummy1NsPtr uintptr at bp+8, 8

		// var dummy2NsPtr uintptr at bp+16, 8

		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}()
		XTclGetNamespaceForQualName(tls, interp, pattern, uintptr(0), 0,
			bp, bp+8, bp+16, bp+24)

		if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) { // We successfully found the pattern's ns.
			specificNsInPattern = libc.Bool32(libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), pattern) != 0)
			if *(*uintptr)(unsafe.Pointer(bp + 24)) == pattern {
				simplePatternPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
			} else {
				simplePatternPtr = XTcl_NewStringObj(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* simplePattern */)), -1)
			}
			(*Tcl_Obj)(unsafe.Pointer(simplePatternPtr)).FrefCount++
		}
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14143)
		return TCL_ERROR
	}

	// If the namespace specified in the pattern wasn't found, just return.

	if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
		return TCL_OK
	}

	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))

	if !((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame&FRAME_IS_PROC != 0) || specificNsInPattern != 0 {
		// There is no frame pointer, the frame pointer was pushed only to
		// activate a namespace, or we are in a procedure call frame but a
		// specific namespace was specified. Create a list containing only the
		// variables in the effective namespace's variable table.

		if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 && libc.Xstrpbrk(tls, *(*uintptr)(unsafe.Pointer(bp + 24)), ts+14153) == uintptr(0) {
			// If we can just do hash lookups, that simplifies things a lot.

			varPtr = sVarHashCreateVar1(tls, *(*uintptr)(unsafe.Pointer(bp))+248, simplePatternPtr, uintptr(0))
			if varPtr != 0 {
				if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) ||
					(*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_NAMESPACE_VAR != 0 {
					if specificNsInPattern != 0 {
						for ok := true; ok; ok = 0 != 0 {
							if XtclFreeObjList == uintptr(0) {
								XTclAllocateFreeObjects(tls)
							}
							elemObjPtr = XtclFreeObjList
							XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
						}
						(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount = 0
						(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes = XtclEmptyStringRep
						(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Flength = 0
						(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr = uintptr(0)
						{
						}

						XTcl_GetVariableFullName(tls, interp, varPtr,
							elemObjPtr)
					} else {
						elemObjPtr = *(*uintptr)(unsafe.Pointer(varPtr + 24 + 32))
					}
					XTcl_ListObjAppendElement(tls, interp, listPtr, elemObjPtr)
				}
			} else if *(*uintptr)(unsafe.Pointer(bp)) != globalNsPtr && !(specificNsInPattern != 0) {
				varPtr = sVarHashCreateVar1(tls, globalNsPtr+248, simplePatternPtr, uintptr(0))
				if varPtr != 0 {
					if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) ||
						(*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_NAMESPACE_VAR != 0 {
						XTcl_ListObjAppendElement(tls, interp, listPtr,
							*(*uintptr)(unsafe.Pointer(varPtr + 24 + 32)))
					}
				}
			}
		} else {
			// Have to scan the tables of variables.

			varPtr = sVarHashFirstVar(tls, *(*uintptr)(unsafe.Pointer(bp))+248, bp+32)
			for varPtr != 0 {
				if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) ||
					(*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_NAMESPACE_VAR != 0 {
					varNamePtr = *(*uintptr)(unsafe.Pointer(varPtr + 24 + 32))
					varName = func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes
						}
						return XTcl_GetString(tls, varNamePtr)
					}()
					if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) ||
						XTcl_StringMatch(tls, varName, *(*uintptr)(unsafe.Pointer(bp + 24))) != 0 {
						if specificNsInPattern != 0 {
							for ok1 := true; ok1; ok1 = 0 != 0 {
								if XtclFreeObjList == uintptr(0) {
									XTclAllocateFreeObjects(tls)
								}
								elemObjPtr = XtclFreeObjList
								XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
							}
							(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FrefCount = 0
							(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Fbytes = XtclEmptyStringRep
							(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).Flength = 0
							(*Tcl_Obj)(unsafe.Pointer(elemObjPtr)).FtypePtr = uintptr(0)
							{
							}

							XTcl_GetVariableFullName(tls, interp, varPtr,
								elemObjPtr)
						} else {
							elemObjPtr = varNamePtr
						}
						XTcl_ListObjAppendElement(tls, interp, listPtr, elemObjPtr)
					}
				}
				varPtr = sVarHashNextVar(tls, bp+32)
			}

			// If the effective namespace isn't the global :: namespace, and a
			// specific namespace wasn't requested in the pattern (i.e., the
			// pattern only specifies variable names), then add in all global
			// :: variables that match the simple pattern. Of course, add in
			// only those variables that aren't hidden by a variable in the
			// effective namespace.

			if *(*uintptr)(unsafe.Pointer(bp)) != globalNsPtr && !(specificNsInPattern != 0) {
				varPtr = sVarHashFirstVar(tls, globalNsPtr+248, bp+32)
				for varPtr != 0 {
					if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) ||
						(*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_NAMESPACE_VAR != 0 {
						varNamePtr = *(*uintptr)(unsafe.Pointer(varPtr + 24 + 32))
						varName = func() uintptr {
							if (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes != 0 {
								return (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes
							}
							return XTcl_GetString(tls, varNamePtr)
						}()
						if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) ||
							XTcl_StringMatch(tls, varName, *(*uintptr)(unsafe.Pointer(bp + 24))) != 0 {
							if sVarHashCreateVar1(tls, *(*uintptr)(unsafe.Pointer(bp))+248, varNamePtr, uintptr(0)) == uintptr(0) {
								XTcl_ListObjAppendElement(tls, interp, listPtr,
									varNamePtr)
							}
						}
					}
					varPtr = sVarHashNextVar(tls, bp+32)
				}
			}
		}
	} else if (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FprocPtr != uintptr(0) {
		sAppendLocals(tls, interp, listPtr, simplePatternPtr, 1)
	}

	if simplePatternPtr != 0 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = simplePatternPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// InfoGlobalsCmd -- (moved over from tclCmdIL.c)
//
//	Called to implement the "info globals" command that returns the list
//	of global variables matching an optional pattern. Handles the
//	following syntax:
//
//	    info globals ?pattern?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func XTclInfoGlobalsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:5986:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var varName uintptr
	var pattern uintptr
	var globalNsPtr uintptr = XTcl_GetGlobalNamespace(tls, interp)
	// var search Tcl_HashSearch at bp, 24

	var varPtr uintptr
	var listPtr uintptr
	var varNamePtr uintptr
	var patternPtr uintptr

	if objc == 1 {
		pattern = uintptr(0)
	} else if objc == 2 {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}()

		// Strip leading global-namespace qualifiers. [Bug 1057461]

		if int32(*(*int8)(unsafe.Pointer(pattern))) == ':' && int32(*(*int8)(unsafe.Pointer(pattern + 1))) == ':' {
			for int32(*(*int8)(unsafe.Pointer(pattern))) == ':' {
				pattern++
			}
		}
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14143)
		return TCL_ERROR
	}

	// Scan through the global :: namespace's variable table and create a list
	// of all global variables that match the pattern.

	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	if pattern != uintptr(0) && libc.Xstrpbrk(tls, pattern, ts+14153) == uintptr(0) {
		if pattern == func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Fbytes
			}
			return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		}() {
			patternPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
		} else {
			patternPtr = XTcl_NewStringObj(tls, pattern, -1)
		}
		(*Tcl_Obj)(unsafe.Pointer(patternPtr)).FrefCount++

		varPtr = sVarHashCreateVar1(tls, globalNsPtr+248, patternPtr, uintptr(0))
		if varPtr != 0 {
			if !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) {
				XTcl_ListObjAppendElement(tls, interp, listPtr,
					*(*uintptr)(unsafe.Pointer(varPtr + 24 + 32)))
			}
		}
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = patternPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	} else {
		for varPtr = sVarHashFirstVar(tls, globalNsPtr+248, bp); varPtr != uintptr(0); varPtr = sVarHashNextVar(tls, bp) {
			if *(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0) {
				continue
			}
			varNamePtr = *(*uintptr)(unsafe.Pointer(varPtr + 24 + 32))
			varName = func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(varNamePtr)).Fbytes
				}
				return XTcl_GetString(tls, varNamePtr)
			}()
			if pattern == uintptr(0) || XTcl_StringMatch(tls, varName, pattern) != 0 {
				XTcl_ListObjAppendElement(tls, interp, listPtr, varNamePtr)
			}
		}
	}
	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclInfoLocalsCmd -- (moved over from tclCmdIl.c)
//
//	Called to implement the "info locals" command to return a list of
//	local variables that match an optional pattern. Handles the following
//	syntax:
//
//	    info locals ?pattern?
//
// Results:
//	Returns TCL_OK if successful and TCL_ERROR if there is an error.
//
// Side effects:
//	Returns a result in the interpreter's result object. If there is an
//	error, the result is an error message.
//
//----------------------------------------------------------------------

func XTclInfoLocalsCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclVar.c:6079:1: */
	var iPtr uintptr = interp
	var patternPtr uintptr
	var listPtr uintptr

	if objc == 1 {
		patternPtr = uintptr(0)
	} else if objc == 2 {
		patternPtr = *(*uintptr)(unsafe.Pointer(objv + 1*8))
	} else {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14143)
		return TCL_ERROR
	}

	if !((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame&FRAME_IS_PROC != 0) {
		return TCL_OK
	}

	// Return a list containing names of first the compiled locals (i.e. the
	// ones stored in the call frame), then the variables in the local hash
	// table (if one exists).

	listPtr = XTcl_NewListObj(tls, 0, uintptr(0))
	sAppendLocals(tls, interp, listPtr, patternPtr, 0)
	XTcl_SetObjResult(tls, interp, listPtr)
	return TCL_OK
}

//----------------------------------------------------------------------
//
// AppendLocals --
//
//	Append the local variables for the current frame to the specified list
//	object.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sAppendLocals(tls *libc.TLS, interp uintptr, listPtr uintptr, patternPtr uintptr, includeLinks int32) { /* tclVar.c:6131:1: */
	bp := tls.Alloc(120)
	defer tls.Free(120)

	var iPtr uintptr
	var varPtr uintptr
	var i int32
	var localVarCt int32
	// var added int32 at bp+88, 4

	var objNamePtr uintptr
	var varName uintptr
	var localVarTablePtr uintptr
	// var search Tcl_HashSearch at bp+96, 24

	// var addedTable Tcl_HashTable at bp, 88

	var pattern uintptr
	var varNamePtr uintptr
	var contextPtr uintptr
	var mPtr uintptr
	iPtr = interp
	if patternPtr != 0 {
		pattern = func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(patternPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(patternPtr)).Fbytes
			}
			return XTcl_GetString(tls, patternPtr)
		}()
	} else {
		pattern = uintptr(0)
	}

	localVarCt = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FnumCompiledLocals
	varPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FcompiledLocals
	localVarTablePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FvarTablePtr
	if !(includeLinks != 0) {
		goto __1
	}
	XTcl_InitObjHashTable(tls, bp)
__1:
	;

	if !(localVarCt > 0) {
		goto __2
	}
	varNamePtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FlocalCachePtr + 8

	i = 0
__3:
	if !(i < localVarCt) {
		goto __5
	}
	// Skip nameless (temporary) variables and undefined variables.

	if !(*(*uintptr)(unsafe.Pointer(varNamePtr)) != 0 && !(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) &&
		(includeLinks != 0 || !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_LINK != 0))) {
		goto __6
	}
	varName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(varNamePtr)))).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(varNamePtr)))).Fbytes
		}
		return XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(varNamePtr)))
	}()
	if !(pattern == uintptr(0) || XTcl_StringMatch(tls, varName, pattern) != 0) {
		goto __7
	}
	XTcl_ListObjAppendElement(tls, interp, listPtr, *(*uintptr)(unsafe.Pointer(varNamePtr)))
	if !(includeLinks != 0) {
		goto __8
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &addedTable */)).FcreateProc})).f(tls, bp /* &addedTable */, *(*uintptr)(unsafe.Pointer(varNamePtr)), bp+88 /* &added */)
__8:
	;
__7:
	;
__6:
	;
	varPtr += 16
	goto __4
__4:
	i++
	varNamePtr += 8
	goto __3
	goto __5
__5:
	;
__2:
	;

	// Do nothing if no local variables.

	if !(localVarTablePtr == uintptr(0)) {
		goto __9
	}
	goto objectVars
__9:
	;

	// Check for the simple and fast case.

	if !(pattern != uintptr(0) && libc.Xstrpbrk(tls, pattern, ts+14153) == uintptr(0)) {
		goto __10
	}
	varPtr = sVarHashCreateVar1(tls, localVarTablePtr, patternPtr, uintptr(0))
	if !(varPtr != uintptr(0)) {
		goto __11
	}
	if !(!(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) &&
		(includeLinks != 0 || !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_LINK != 0))) {
		goto __12
	}
	XTcl_ListObjAppendElement(tls, interp, listPtr,
		*(*uintptr)(unsafe.Pointer(varPtr + 24 + 32)))
	if !(includeLinks != 0) {
		goto __13
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &addedTable */)).FcreateProc})).f(tls, bp /* &addedTable */, *(*uintptr)(unsafe.Pointer(varPtr + 24 /* &.entry */ + 32 /* &.key */)), bp+88 /* &added */)
__13:
	;
__12:
	;
__11:
	;
	goto objectVars
__10:
	;

	// Scan over and process all local variables.

	varPtr = sVarHashFirstVar(tls, localVarTablePtr, bp+96)
__14:
	if !(varPtr != uintptr(0)) {
		goto __16
	}
	if !(!(*(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0)) &&
		(includeLinks != 0 || !((*Var)(unsafe.Pointer(varPtr)).Fflags&VAR_LINK != 0))) {
		goto __17
	}
	objNamePtr = *(*uintptr)(unsafe.Pointer(varPtr + 24 + 32))
	varName = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objNamePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objNamePtr)).Fbytes
		}
		return XTcl_GetString(tls, objNamePtr)
	}()
	if !(pattern == uintptr(0) || XTcl_StringMatch(tls, varName, pattern) != 0) {
		goto __18
	}
	XTcl_ListObjAppendElement(tls, interp, listPtr, objNamePtr)
	if !(includeLinks != 0) {
		goto __19
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &addedTable */)).FcreateProc})).f(tls, bp /* &addedTable */, objNamePtr, bp+88 /* &added */)
__19:
	;
__18:
	;
__17:
	;
	goto __15
__15:
	varPtr = sVarHashNextVar(tls, bp+96)
	goto __14
	goto __16
__16:
	;

objectVars:
	if !!(includeLinks != 0) {
		goto __20
	}
	return
__20:
	;

	if !((*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FisProcCallFrame&FRAME_IS_METHOD != 0) {
		goto __21
	}
	contextPtr = (*CallFrame)(unsafe.Pointer((*Interp)(unsafe.Pointer(iPtr)).FvarFramePtr)).FclientData
	mPtr = (*MInvoke)(unsafe.Pointer((*CallChain)(unsafe.Pointer((*CallContext)(unsafe.Pointer(contextPtr)).FcallPtr)).Fchain + uintptr((*CallContext)(unsafe.Pointer(contextPtr)).Findex)*24)).FmPtr

	if !((*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr != 0) {
		goto __22
	}
	i = 0
__24:
	if !(i < (*Object1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr)).Fvariables.Fnum) {
		goto __26
	}
	if !(*(*uintptr)(unsafe.Pointer((*Object1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __27
	}
	goto __25
	goto __28
__27:
	if !func() bool {
		objNamePtr = *(*uintptr)(unsafe.Pointer((*Object1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringObjectPtr)).Fvariables.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __29
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &addedTable */)).FcreateProc})).f(tls, bp /* &addedTable */, objNamePtr, bp+88 /* &added */)
	if !(*(*int32)(unsafe.Pointer(bp + 88)) != 0 && (!(pattern != 0) || XTcl_StringMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objNamePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objNamePtr)).Fbytes
		}
		return XTcl_GetString(tls, objNamePtr)
	}(), pattern) != 0)) {
		goto __30
	}
	XTcl_ListObjAppendElement(tls, interp, listPtr, objNamePtr)
__30:
	;
__29:
	;
__28:
	;
	goto __25
__25:
	i++
	goto __24
	goto __26
__26:
	;
	goto __23
__22:
	i = 0
__31:
	if !(i < (*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).Fvariables.Fnum) {
		goto __33
	}
	if !(*(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).Fvariables.Flist + uintptr(i)*8)) == uintptr(0)) {
		goto __34
	}
	goto __32
	goto __35
__34:
	if !func() bool {
		objNamePtr = *(*uintptr)(unsafe.Pointer((*Class1)(unsafe.Pointer((*Method)(unsafe.Pointer(mPtr)).FdeclaringClassPtr)).Fvariables.Flist + uintptr(i)*8))
		return 1 != 0
	}() {
		goto __36
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*Tcl_HashTable)(unsafe.Pointer(bp /* &addedTable */)).FcreateProc})).f(tls, bp /* &addedTable */, objNamePtr, bp+88 /* &added */)
	if !(*(*int32)(unsafe.Pointer(bp + 88)) != 0 && (!(pattern != 0) || XTcl_StringMatch(tls, func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objNamePtr)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objNamePtr)).Fbytes
		}
		return XTcl_GetString(tls, objNamePtr)
	}(), pattern) != 0)) {
		goto __37
	}
	XTcl_ListObjAppendElement(tls, interp, listPtr, objNamePtr)
__37:
	;
__36:
	;
__35:
	;
	goto __32
__32:
	i++
	goto __31
	goto __33
__33:
	;
__23:
	;
__21:
	;
	XTcl_DeleteHashTable(tls, bp)
}

// Hash table implementation - first, just copy and adapt the obj key stuff

func XTclInitVarHashTable(tls *libc.TLS, tablePtr uintptr, nsPtr uintptr) { /* tclVar.c:6259:1: */
	XTcl_InitCustomHashTable(tls, tablePtr,
		-2, uintptr(unsafe.Pointer(&tclVarHashKeyType)))
	(*TclVarHashTable)(unsafe.Pointer(tablePtr)).FnsPtr = nsPtr
}

func sAllocVarEntry(tls *libc.TLS, tablePtr uintptr, keyPtr uintptr) uintptr { /* tclVar.c:6268:22: */
	var objPtr uintptr = keyPtr
	var hPtr uintptr
	var varPtr uintptr

	varPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(VarInHash{})))
	(*Var)(unsafe.Pointer(varPtr)).Fflags = VAR_IN_HASHTABLE
	*(*uintptr)(unsafe.Pointer(varPtr + 8)) = uintptr(0)
	(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount = 1

	hPtr = varPtr + 24
	(*Tcl_HashEntry)(unsafe.Pointer(hPtr)).FclientData = varPtr
	*(*uintptr)(unsafe.Pointer(hPtr + 32)) = objPtr
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount++

	return hPtr
}

func sFreeVarEntry(tls *libc.TLS, hPtr uintptr) { /* tclVar.c:6291:1: */
	var varPtr uintptr = hPtr - uintptr(int32(uintptr(0)+24))
	var objPtr uintptr = *(*uintptr)(unsafe.Pointer(hPtr + 32))

	if *(*uintptr)(unsafe.Pointer(varPtr + 8)) == uintptr(0) && !((*Var)(unsafe.Pointer(varPtr)).Fflags&(VAR_TRACED_READ|VAR_TRACED_WRITE|VAR_TRACED_ARRAY|VAR_TRACED_UNSET) != 0) &&
		(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount == 1 {
		XTclpFree(tls, varPtr)
	} else {
		*(*int32)(unsafe.Pointer(varPtr)) |= VAR_DEAD_HASH
		*(*int32)(unsafe.Pointer(varPtr)) &= libc.CplInt32(VAR_ARRAY | VAR_LINK)
		*(*uintptr)(unsafe.Pointer(varPtr + 8)) = uintptr(0)
		(*VarInHash)(unsafe.Pointer(varPtr)).FrefCount--
	}
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = objPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

func sCompareVarKeys(tls *libc.TLS, keyPtr uintptr, hPtr uintptr) int32 { /* tclVar.c:6309:1: */
	var objPtr1 uintptr = keyPtr
	var objPtr2 uintptr = *(*uintptr)(unsafe.Pointer(hPtr + 32))
	var p1 uintptr
	var p2 uintptr
	var l1 int32
	var l2 int32

	//
	//  If the object pointers are the same then they match.
	//  OPT: this comparison was moved to the caller
	//
	//        if (objPtr1 == objPtr2) return 1;
	//

	// Don't use Tcl_GetStringFromObj as it would prevent l1 and l2 being in a
	// register.

	p1 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr1)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr1)).Fbytes
		}
		return XTcl_GetString(tls, objPtr1)
	}()
	l1 = (*Tcl_Obj)(unsafe.Pointer(objPtr1)).Flength
	p2 = func() uintptr {
		if (*Tcl_Obj)(unsafe.Pointer(objPtr2)).Fbytes != 0 {
			return (*Tcl_Obj)(unsafe.Pointer(objPtr2)).Fbytes
		}
		return XTcl_GetString(tls, objPtr2)
	}()
	l2 = (*Tcl_Obj)(unsafe.Pointer(objPtr2)).Flength

	// Only compare string representations of the same length.

	return libc.Bool32(l1 == l2 && !(libc.Xmemcmp(tls, p1, p2, uint64(l1)) != 0))
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

func sTclPipeThreadSignal1(tls *libc.TLS, pipeTIPtr uintptr) { /* tclWinInt.h:153:1: */
	var pipeTI uintptr = *(*uintptr)(unsafe.Pointer(pipeTIPtr))
	if pipeTI != 0 {
		libc.XSetEvent(tls, (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevControl)
	}
}

func sTclPipeThreadIsAlive1(tls *libc.TLS, pipeTIPtr uintptr) int32 { /* tclWinInt.h:163:1: */
	var pipeTI uintptr = *(*uintptr)(unsafe.Pointer(pipeTIPtr))
	return libc.Bool32(pipeTI != 0 && (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).Fstate != PTI_STATE_DOWN)
}

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// The purpose of this file is to provide support for MSVC's intrinsics (what gcc calls
//    Builtins) in gcc.  In MSVC, there are several features for intrinsics:
//
//    - Intrinsics can either be implemented inline (via the compiler), or implemented as functions.
//    - You can specify which approach you prefer either globally (via compile switch /Oi) or
//      on a function by function basis via pragmas.
//    - Before you can use any of the intrinsics, they must be declared via a prototype.  For
//      whatever reason, MS has decided to put all the intrinsics in one file (intrin.h) AND
//      to put duplicate copies of some of these prototypes in various platform sdk headers.
//
//    In gcc, this is implemented as follows:
//
//    - The inline implementations for the intrinsics are located in intrin-impl.h.  This file
//      is included by intrin.h, as well as various platform sdk headers.
//    - Including intrin.h will create definitions/implementations for all available MSVC intrinsics.
//    - Including various platforms sdk headers will only include the intrinsics defined in that
//      header.  As of this writing, only winnt.h and winbase.h use this approach.
//    - If an application defines its own prototypes for intrinsics (ie without including any
//      platform header or intrin.h), the symbols will be resolved from the library.  Since this
//      will likely result in the code being invoked via 'call', performance may be degraded.
//
//    If you wish to implement intrinsic functions that are defined in intrin.h but are not
//    yet implemented in mingw-w64, see the comments at the top of intrin-impl.h.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_SETJMP_FLOAT128 = struct{ FPart [2]uint64 } /* setjmp.h:112:26 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// The purpose of this file is to provide support for MSVC's intrinsics (what gcc calls
//    Builtins) in gcc.  In MSVC, there are several features for intrinsics:
//
//    - Intrinsics can either be implemented inline (via the compiler), or implemented as functions.
//    - You can specify which approach you prefer either globally (via compile switch /Oi) or
//      on a function by function basis via pragmas.
//    - Before you can use any of the intrinsics, they must be declared via a prototype.  For
//      whatever reason, MS has decided to put all the intrinsics in one file (intrin.h) AND
//      to put duplicate copies of some of these prototypes in various platform sdk headers.
//
//    In gcc, this is implemented as follows:
//
//    - The inline implementations for the intrinsics are located in intrin-impl.h.  This file
//      is included by intrin.h, as well as various platform sdk headers.
//    - Including intrin.h will create definitions/implementations for all available MSVC intrinsics.
//    - Including various platforms sdk headers will only include the intrinsics defined in that
//      header.  As of this writing, only winnt.h and winbase.h use this approach.
//    - If an application defines its own prototypes for intrinsics (ie without including any
//      platform header or intrin.h), the symbols will be resolved from the library.  Since this
//      will likely result in the code being invoked via 'call', performance may be degraded.
//
//    If you wish to implement intrinsic functions that are defined in intrin.h but are not
//    yet implemented in mingw-w64, see the comments at the top of intrin-impl.h.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type SETJMP_FLOAT128 = X_SETJMP_FLOAT128 /* setjmp.h:114:5 */

type X_JBTYPE = SETJMP_FLOAT128 /* setjmp.h:117:27 */

type X_JUMP_BUFFER1 = struct {
	FFrame uint64
	FRbx   uint64
	FRsp   uint64
	FRbp   uint64
	FRsi   uint64
	FRdi   uint64
	FR12   uint64
	FR13   uint64
	FR14   uint64
	FR15   uint64
	FRip   uint64
	FSpare uint64
	FXmm6  SETJMP_FLOAT128
	FXmm7  SETJMP_FLOAT128
	FXmm8  SETJMP_FLOAT128
	FXmm9  SETJMP_FLOAT128
	FXmm10 SETJMP_FLOAT128
	FXmm11 SETJMP_FLOAT128
	FXmm12 SETJMP_FLOAT128
	FXmm13 SETJMP_FLOAT128
	FXmm14 SETJMP_FLOAT128
	FXmm15 SETJMP_FLOAT128
} /* setjmp.h:119:11 */

type X_JUMP_BUFFER = X_JUMP_BUFFER1 /* setjmp.h:142:5 */

type Jmp_buf = [16]X_JBTYPE /* setjmp.h:199:19 */

// The following variables keep track of information about this DLL on a
// per-instance basis. Each time this DLL is loaded, it gets its own new data
// segment with its own copy of all static and global information.

var hInstance HINSTANCE /* tclWin32Dll.c:25:18: */

// The following structure and linked list is to allow us to map between
// volume mount points and drive letters on the fly (no Win API exists for
// this).

type MountPointMap1 = struct {
	FvolumeName  uintptr
	FdriveLetter WCHAR
	F__ccgo_pad1 [6]byte
	FnextPtr     uintptr
} /* tclWin32Dll.c:48:9 */

// The following structure and linked list is to allow us to map between
// volume mount points and drive letters on the fly (no Win API exists for
// this).

type MountPointMap = MountPointMap1 /* tclWin32Dll.c:55:3 */

// This is the head of the linked list, which is protected by the mutex which
// follows, for thread-enabled builds.

var XdriveLetterLookup uintptr = uintptr(0) /* tclWin32Dll.c:62:15 */

// We will need this below.

//----------------------------------------------------------------------
//
// TclWinGetTclInstance --
//
//	Retrieves the global library instance handle.
//
// Results:
//	Returns the global library instance handle.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclWinGetTclInstance(tls *libc.TLS) HINSTANCE { /* tclWin32Dll.c:158:1: */
	return hInstance
}

//----------------------------------------------------------------------
//
// TclWinInit --
//
//	This function initializes the internal state of the tcl library.
//
// Results:
//	None.
//
// Side effects:
//	Initializes the tclPlatformId variable.
//
//----------------------------------------------------------------------

func XTclWinInit(tls *libc.TLS, hInst HINSTANCE) { /* tclWin32Dll.c:180:1: */
	bp := tls.Alloc(276)
	defer tls.Free(276)

	// var os OSVERSIONINFOW at bp, 276

	hInstance = hInst
	(*OSVERSIONINFOW)(unsafe.Pointer(bp /* &os */)).FdwOSVersionInfoSize = DWORD(unsafe.Sizeof(OSVERSIONINFOW{}))
	libc.XGetVersionExW(tls, bp)

	// We no longer support Win32s or Win9x or Windows CE, so just in case
	// someone manages to get a runtime there, make sure they know that.

	if (*OSVERSIONINFOW)(unsafe.Pointer(bp)).FdwPlatformId != DWORD(VER_PLATFORM_WIN32_NT) {
		XTcl_Panic(tls, ts+67233, 0)
	}
}

//----------------------------------------------------------------------
//
// TclWinGetPlatformId --
//
//	Determines whether running under NT, 95, or Win32s, to allow runtime
//	conditional code.
//
// Results:
//	The return value is always:
//	VER_PLATFORM_WIN32_NT	Win32 on Windows NT, 2000, XP
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclWinGetPlatformId(tls *libc.TLS) int32 { /* tclWin32Dll.c:218:1: */
	return VER_PLATFORM_WIN32_NT
}

//-------------------------------------------------------------------------
//
// TclWinNoBackslash --
//
//	We're always iterating through a string in Windows, changing the
//	backslashes to slashes for use in Tcl.
//
// Results:
//	All backslashes in given string are changed to slashes.
//
// Side effects:
//	None.
//
//-------------------------------------------------------------------------

func XTclWinNoBackslash(tls *libc.TLS, path uintptr) uintptr { /* tclWin32Dll.c:240:6: */
	var p uintptr

	for p = path; int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
		if int32(*(*int8)(unsafe.Pointer(p))) == '\\' {
			*(*int8)(unsafe.Pointer(p)) = int8('/')
		}
	}
	return path
}

//---------------------------------------------------------------------------
//
// TclWinEncodingsCleanup --
//
//	Called during finalization to clean up any memory allocated in our
//	mount point map which is used to follow certain kinds of symlinks.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclWinEncodingsCleanup(tls *libc.TLS) { /* tclWin32Dll.c:272:1: */
	var dlIter uintptr
	var dlIter2 uintptr

	// Clean up the mount point map.

	dlIter = XdriveLetterLookup
	for dlIter != uintptr(0) {
		dlIter2 = (*MountPointMap)(unsafe.Pointer(dlIter)).FnextPtr
		XTclpFree(tls, (*MountPointMap)(unsafe.Pointer(dlIter)).FvolumeName)
		XTclpFree(tls, dlIter)
		dlIter = dlIter2
	}

}

//---------------------------------------------------------------------------
//
// TclWinResetInterfaces --
//
//	Called during finalization to reset us to a safe state for reuse.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------
func XTclWinResetInterfaces(tls *libc.TLS) { /* tclWin32Dll.c:307:1: */
}

//--------------------------------------------------------------------
//
// TclWinDriveLetterForVolMountPoint
//
//	Unfortunately, Windows provides no easy way at all to get hold of the
//	drive letter for a volume mount point, but we need that information to
//	understand paths correctly. So, we have to build an associated array
//	to find these correctly, and allow quick and easy lookup from volume
//	mount points to drive letters.
//
//	We assume here that we are running on a system for which the wide
//	character interfaces are used, which is valid for Win 2000 and WinXP
//	which are the only systems on which this function will ever be called.
//
// Result:
//	The drive letter, or -1 if no drive letter corresponds to the given
//	mount point.
//
//--------------------------------------------------------------------

func XTclWinDriveLetterForVolMountPoint(tls *libc.TLS, mountPoint uintptr) int8 { /* tclWin32Dll.c:334:1: */
	bp := tls.Alloc(118)
	defer tls.Free(118)

	var dlIter uintptr
	var dlPtr2 uintptr
	// var Target [55]WCHAR at bp+8, 110
	// Target of mount at mount point
	*(*[4]WCHAR)(unsafe.Pointer(bp /* drive */)) = *(*[4]WCHAR)(unsafe.Pointer(wtext + 178))

	// Detect the volume mounted there. Unfortunately, there is no simple way
	// to map a unique volume name to a DOS drive letter. So, we have to build
	// an associative array.

	dlIter = XdriveLetterLookup
	for dlIter != uintptr(0) {
		if libc.Xwcscmp(tls, (*MountPointMap)(unsafe.Pointer(dlIter)).FvolumeName, mountPoint) == 0 {
			// We need to check whether this information is still valid, since
			// either the user or various programs could have adjusted the
			// mount points on the fly.

			*(*WCHAR)(unsafe.Pointer(bp)) = (*MountPointMap)(unsafe.Pointer(dlIter)).FdriveLetter

			// Try to read the volume mount point and see where it points.

			if libc.XGetVolumeNameForVolumeMountPointW(tls, bp,
				bp+8, uint32(55)) != 0 {
				if libc.Xwcscmp(tls, (*MountPointMap)(unsafe.Pointer(dlIter)).FvolumeName, bp+8) == 0 {
					// Nothing has changed.

					return int8((*MountPointMap)(unsafe.Pointer(dlIter)).FdriveLetter)
				}
			}

			// If we reach here, unfortunately, this mount point is no longer
			// valid at all.

			if XdriveLetterLookup == dlIter {
				dlPtr2 = dlIter
				XdriveLetterLookup = (*MountPointMap)(unsafe.Pointer(dlIter)).FnextPtr
			} else {
				for dlPtr2 = XdriveLetterLookup; dlPtr2 != uintptr(0); dlPtr2 = (*MountPointMap)(unsafe.Pointer(dlPtr2)).FnextPtr {
					if (*MountPointMap)(unsafe.Pointer(dlPtr2)).FnextPtr == dlIter {
						(*MountPointMap)(unsafe.Pointer(dlPtr2)).FnextPtr = (*MountPointMap)(unsafe.Pointer(dlIter)).FnextPtr
						dlPtr2 = dlIter
						break
					}
				}
			}

			// Now dlPtr2 points to the structure to free.

			XTclpFree(tls, (*MountPointMap)(unsafe.Pointer(dlPtr2)).FvolumeName)
			XTclpFree(tls, dlPtr2)

			// Restart the loop - we could try to be clever and continue half
			// way through, but the logic is a bit messy, so it's cleanest
			// just to restart.

			dlIter = XdriveLetterLookup
			continue
		}
		dlIter = (*MountPointMap)(unsafe.Pointer(dlIter)).FnextPtr
	}

	// We couldn't find it, so we must iterate over the letters.

	for *(*WCHAR)(unsafe.Pointer(bp)) = WCHAR('A'); int32(*(*WCHAR)(unsafe.Pointer(bp /* &drive[0] */))) <= 'Z'; *(*WCHAR)(unsafe.Pointer(bp /* &drive[0] */))++ {
		// Try to read the volume mount point and see where it points.

		if libc.XGetVolumeNameForVolumeMountPointW(tls, bp,
			bp+8, uint32(55)) != 0 {
			var alreadyStored int32 = 0

			for dlIter = XdriveLetterLookup; dlIter != uintptr(0); dlIter = (*MountPointMap)(unsafe.Pointer(dlIter)).FnextPtr {
				if libc.Xwcscmp(tls, (*MountPointMap)(unsafe.Pointer(dlIter)).FvolumeName, bp+8) == 0 {
					alreadyStored = 1
					break
				}
			}
			if !(alreadyStored != 0) {
				dlPtr2 = XTcl_Alloc(tls, uint32(unsafe.Sizeof(MountPointMap{})))
				(*MountPointMap)(unsafe.Pointer(dlPtr2)).FvolumeName = XTclNativeDupInternalRep(tls, bp+8)
				(*MountPointMap)(unsafe.Pointer(dlPtr2)).FdriveLetter = WCHAR(int8(*(*WCHAR)(unsafe.Pointer(bp))))
				(*MountPointMap)(unsafe.Pointer(dlPtr2)).FnextPtr = XdriveLetterLookup
				XdriveLetterLookup = dlPtr2
			}
		}
	}

	// Try again.

	for dlIter = XdriveLetterLookup; dlIter != uintptr(0); dlIter = (*MountPointMap)(unsafe.Pointer(dlIter)).FnextPtr {
		if libc.Xwcscmp(tls, (*MountPointMap)(unsafe.Pointer(dlIter)).FvolumeName, mountPoint) == 0 {

			return int8((*MountPointMap)(unsafe.Pointer(dlIter)).FdriveLetter)
		}
	}

	// The volume doesn't appear to correspond to a drive letter - we remember
	// that fact and store '-1' so we don't have to look it up each time.

	dlPtr2 = XTcl_Alloc(tls, uint32(unsafe.Sizeof(MountPointMap{})))
	(*MountPointMap)(unsafe.Pointer(dlPtr2)).FvolumeName = XTclNativeDupInternalRep(tls, mountPoint)
	(*MountPointMap)(unsafe.Pointer(dlPtr2)).FdriveLetter = libc.Uint16FromInt32(-1)
	(*MountPointMap)(unsafe.Pointer(dlPtr2)).FnextPtr = XdriveLetterLookup
	XdriveLetterLookup = dlPtr2

	return int8(-1)
}

//---------------------------------------------------------------------------
//
// Tcl_WinUtfToTChar, Tcl_WinTCharToUtf --
//
//	Convert between UTF-8 and Unicode when running Windows.
//
//	On Mac and Unix, all strings exchanged between Tcl and the OS are
//	"char" oriented. We need only one Tcl_Encoding to convert between
//	UTF-8 and the system's native encoding. We use NULL to represent
//	that encoding.
//
//	On Windows, some strings exchanged between Tcl and the OS are "char"
//	oriented, while others are in Unicode. We need two Tcl_Encoding APIs
//	depending on whether we are targeting a "char" or Unicode interface.
//
//	Calling Tcl_UtfToExternal() or Tcl_ExternalToUtf() with an encoding
//	of NULL should always used to convert between UTF-8 and the system's
//	"char" oriented encoding. The following two functions are used in
//	Windows-specific code to convert between UTF-8 and Unicode strings.
//	This saves you the trouble of writing the
//	following type of fragment over and over:
//
//		encoding <- Tcl_GetEncoding("unicode");
//		nativeBuffer <- UtfToExternal(encoding, utfBuffer);
//		Tcl_FreeEncoding(encoding);
//
//	By convention, in Windows a WCHAR is a Unicode character. If you plan
//	on targeting a Unicode interface when running on Windows, these
//	functions should be used. If you plan on targetting a "char" oriented
//	function on Windows, use Tcl_UtfToExternal() with an encoding of NULL.
//
// Results:
//	The result is a pointer to the string in the desired target encoding.
//	Storage for the result string is allocated in dsPtr; the caller must
//	call Tcl_DStringFree() when the result is no longer needed.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTcl_WinUtfToTChar(tls *libc.TLS, string uintptr, len int32, dsPtr uintptr) uintptr { /* tclWin32Dll.c:512:7: */

	XTcl_DStringInit(tls, dsPtr)
	if !(string != 0) {
		return uintptr(0)
	}
	return XTcl_UtfToUniCharDString(tls, string, len, dsPtr)
}

func XTcl_WinTCharToUtf(tls *libc.TLS, string uintptr, len int32, dsPtr uintptr) uintptr { /* tclWin32Dll.c:584:6: */

	XTcl_DStringInit(tls, dsPtr)
	if !(string != 0) {
		return uintptr(0)
	}
	if len < 0 {
		len = int32(libc.Xwcslen(tls, string))
	} else {
		len = len / 2
	}
	return XTcl_UniCharToUtfDString(tls, string, len, dsPtr)
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Values for the flags field in Channel. Any ORed combination of the
// following flags can be stored in the field. These flags record various
// options and state bits about the channel. In addition to the flags below,
// the channel can also have TCL_READABLE (1<<1) and TCL_WRITABLE (1<<2) set.

// The length of time to wait between synthetic timer events. Must be zero or
// bad things tend to happen.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// State flags used in the info structures below.

// The following structure contains per-instance data for a file based channel.

type FileInfo1 = struct {
	Fchannel     Tcl_Channel
	FvalidMask   int32
	FwatchMask   int32
	Fflags       int32
	F__ccgo_pad1 [4]byte
	Fhandle      HANDLE
	FnextPtr     uintptr
	Fdirty       int32
	F__ccgo_pad2 [4]byte
} /* tclWinChan.c:31:9 */

// Values for the flags field in Channel. Any ORed combination of the
// following flags can be stored in the field. These flags record various
// options and state bits about the channel. In addition to the flags below,
// the channel can also have TCL_READABLE (1<<1) and TCL_WRITABLE (1<<2) set.

// The length of time to wait between synthetic timer events. Must be zero or
// bad things tend to happen.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// State flags used in the info structures below.

// The following structure contains per-instance data for a file based channel.

type FileInfo = FileInfo1 /* tclWinChan.c:44:3 */

type ThreadSpecificData12 = struct{ FfirstFilePtr uintptr } /* tclWinChan.c:52:3 */

var dataKey11 Tcl_ThreadDataKey /* tclWinChan.c:54:26: */

// The following structure is what is added to the Tcl event queue when file
// events are generated.

type FileEvent1 = struct {
	Fheader  Tcl_Event
	FinfoPtr uintptr
} /* tclWinChan.c:61:9 */

// The following structure is what is added to the Tcl event queue when file
// events are generated.

type FileEvent = FileEvent1 /* tclWinChan.c:68:3 */
// This structure describes the channel type structure for file based IO.

var fileChannelType = Tcl_ChannelType{
	FtypeName:         ts + 12636,
	Fversion:          uintptr(0x5),
	FcloseProc:        0, // Close proc.
	FinputProc:        0, // Input proc.
	FoutputProc:       0, // Output proc.
	FseekProc:         0, // Get option proc.
	FwatchProc:        0, // Set up the notifier to watch the channel.
	FgetHandleProc:    0, // Get an OS handle from channel.
	Fclose2Proc:       0, // close2proc.
	FblockModeProc:    0, // handler proc.
	FwideSeekProc:     0, // Wide seek proc.
	FthreadActionProc: 0, // Thread action proc.
	FtruncateProc:     0, // Truncate proc.
} /* tclWinChan.c:105:30 */

//----------------------------------------------------------------------
//
// FileInit --
//
//	This function creates the window used to simulate file events.
//
// Results:
//	None.
//
// Side effects:
//	Creates a new window and creates an exit handler.
//
//----------------------------------------------------------------------

func sFileInit(tls *libc.TLS) uintptr { /* tclWinChan.c:141:27: */
	var tsdPtr uintptr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey11)))

	if tsdPtr == uintptr(0) {
		tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey11)), int32(unsafe.Sizeof(ThreadSpecificData12{})))
		(*ThreadSpecificData12)(unsafe.Pointer(tsdPtr)).FfirstFilePtr = uintptr(0)
		XTcl_CreateEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{XFileSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sFileCheckProc})), uintptr(0))
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sFileChannelExitHandler})), uintptr(0))
	}
	return tsdPtr
}

//----------------------------------------------------------------------
//
// FileChannelExitHandler --
//
//	This function is called to cleanup the channel driver before Tcl is
//	unloaded.
//
// Results:
//	None.
//
// Side effects:
//	Destroys the communication window.
//
//----------------------------------------------------------------------

func sFileChannelExitHandler(tls *libc.TLS, clientData ClientData) { /* tclWinChan.c:174:1: */
	XTcl_DeleteEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{XFileSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sFileCheckProc})), uintptr(0))
}

//----------------------------------------------------------------------
//
// FileSetupProc --
//
//	This function is invoked before Tcl_DoOneEvent blocks waiting for an
//	event.
//
// Results:
//	None.
//
// Side effects:
//	Adjusts the block time if needed.
//
//----------------------------------------------------------------------

func XFileSetupProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinChan.c:198:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var infoPtr uintptr
	*(*Tcl_Time)(unsafe.Pointer(bp /* blockTime */)) = Tcl_Time{}
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey11)), int32(unsafe.Sizeof(ThreadSpecificData12{})))

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Check to see if there is a ready file. If so, poll.

	for infoPtr = (*ThreadSpecificData12)(unsafe.Pointer(tsdPtr)).FfirstFilePtr; infoPtr != uintptr(0); infoPtr = (*FileInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*FileInfo)(unsafe.Pointer(infoPtr)).FwatchMask != 0 {
			XTcl_SetMaxBlockTime(tls, bp)
			break
		}
	}
}

//----------------------------------------------------------------------
//
// FileCheckProc --
//
//	This function is called by Tcl_DoOneEvent to check the file event
//	source for events.
//
// Results:
//	None.
//
// Side effects:
//	May queue an event.
//
//----------------------------------------------------------------------

func sFileCheckProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinChan.c:241:1: */
	var evPtr uintptr
	var infoPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey11)), int32(unsafe.Sizeof(ThreadSpecificData12{})))

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Queue events for any ready files that don't already have events queued
	// (caused by persistent states that won't generate WinSock events).

	for infoPtr = (*ThreadSpecificData12)(unsafe.Pointer(tsdPtr)).FfirstFilePtr; infoPtr != uintptr(0); infoPtr = (*FileInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*FileInfo)(unsafe.Pointer(infoPtr)).FwatchMask != 0 && !((*FileInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<0) != 0) {
			*(*int32)(unsafe.Pointer(infoPtr + 16)) |= int32(1) << 0
			evPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FileEvent{})))
			(*FileEvent)(unsafe.Pointer(evPtr)).Fheader.Fproc = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, int32) int32
			}{sFileEventProc}))
			(*FileEvent)(unsafe.Pointer(evPtr)).FinfoPtr = infoPtr
			XTcl_QueueEvent(tls, evPtr, TCL_QUEUE_TAIL)
		}
	}
}

//----------------------------------------------------------------------
//
// FileEventProc --
//
//	This function is invoked by Tcl_ServiceEvent when a file event reaches
//	the front of the event queue. This function invokes Tcl_NotifyChannel
//	on the file.
//
// Results:
//	Returns 1 if the event was handled, meaning it should be removed from
//	the queue. Returns 0 if the event was not handled, meaning it should
//	stay on the queue. The only time the event isn't handled is if the
//	TCL_FILE_EVENTS flag bit isn't set.
//
// Side effects:
//	Whatever the notifier callback does.
//
//----------------------------------------------------------------------

func sFileEventProc(tls *libc.TLS, evPtr uintptr, flags int32) int32 { /* tclWinChan.c:292:1: */
	var fileEvPtr uintptr = evPtr
	var infoPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey11)), int32(unsafe.Sizeof(ThreadSpecificData12{})))

	if !(flags&(int32(1)<<3) != 0) {
		return 0
	}

	// Search through the list of watched files for the one whose handle
	// matches the event. We do this rather than simply dereferencing the
	// handle in the event so that files can be deleted while the event is in
	// the queue.

	for infoPtr = (*ThreadSpecificData12)(unsafe.Pointer(tsdPtr)).FfirstFilePtr; infoPtr != uintptr(0); infoPtr = (*FileInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*FileEvent)(unsafe.Pointer(fileEvPtr)).FinfoPtr == infoPtr {
			*(*int32)(unsafe.Pointer(infoPtr + 16)) &= libc.CplInt32(int32(1) << 0)
			XTcl_NotifyChannel(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fchannel, (*FileInfo)(unsafe.Pointer(infoPtr)).FwatchMask)
			break
		}
	}
	return 1
}

//----------------------------------------------------------------------
//
// FileBlockProc --
//
//	Set blocking or non-blocking mode on channel.
//
// Results:
//	0 if successful, errno when failed.
//
// Side effects:
//	Sets the device into blocking or non-blocking mode.
//
//----------------------------------------------------------------------

func sFileBlockProc(tls *libc.TLS, instanceData ClientData, mode int32) int32 { /* tclWinChan.c:340:1: */
	var infoPtr uintptr = instanceData

	// Files on Windows can not be switched between blocking and nonblocking,
	// hence we have to emulate the behavior. This is done in the input
	// function by checking against a bit in the state. We set or unset the
	// bit here to cause the input function to emulate the correct behavior.

	if mode == TCL_MODE_NONBLOCKING {
		*(*int32)(unsafe.Pointer(infoPtr + 16)) |= int32(1) << 1
	} else {
		*(*int32)(unsafe.Pointer(infoPtr + 16)) &= libc.CplInt32(int32(1) << 1)
	}
	return 0
}

//----------------------------------------------------------------------
//
// FileCloseProc/FileClose2Proc --
//
//	Closes the IO channel.
//
// Results:
//	0 if successful, the value of errno if failed.
//
// Side effects:
//	Closes the physical channel
//
//----------------------------------------------------------------------

func sFileCloseProc(tls *libc.TLS, instanceData ClientData, interp uintptr) int32 { /* tclWinChan.c:379:1: */
	var fileInfoPtr uintptr = instanceData
	var infoPtr uintptr
	var tsdPtr uintptr
	var errorCode int32 = 0

	// Remove the file from the watch list.

	sFileWatchProc(tls, instanceData, 0)

	// Don't close the Win32 handle if the handle is a standard channel during
	// the thread exit process. Otherwise, one thread may kill the stdio of
	// another.

	if !(XTclInThreadExit(tls) != 0) ||
		libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-10))) != (*FileInfo)(unsafe.Pointer(fileInfoPtr)).Fhandle &&
			libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-11))) != (*FileInfo)(unsafe.Pointer(fileInfoPtr)).Fhandle &&
			libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-12))) != (*FileInfo)(unsafe.Pointer(fileInfoPtr)).Fhandle {
		if libc.XCloseHandle(tls, (*FileInfo)(unsafe.Pointer(fileInfoPtr)).Fhandle) == FALSE {
			XTclWinConvertError(tls, libc.XGetLastError(tls))
			errorCode = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
		}
	}

	// See if this FileInfo* is still on the thread local list.

	tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey11)), int32(unsafe.Sizeof(ThreadSpecificData12{})))
	for infoPtr = (*ThreadSpecificData12)(unsafe.Pointer(tsdPtr)).FfirstFilePtr; infoPtr != uintptr(0); infoPtr = (*FileInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if infoPtr == fileInfoPtr {
			// This channel exists on the thread local list. It should have
			// been removed by an earlier Threadaction call, but do that now
			// since just deallocating fileInfoPtr would leave an deallocated
			// pointer on the thread local list.

			sFileThreadActionProc(tls, fileInfoPtr, 1)
			break
		}
	}
	XTclpFree(tls, fileInfoPtr)
	return errorCode
}

func sFileClose2Proc(tls *libc.TLS, instanceData ClientData, interp uintptr, flags int32) int32 { /* tclWinChan.c:434:1: */
	if flags&(int32(1)<<1|int32(1)<<2) == 0 {
		return sFileCloseProc(tls, instanceData, interp)
	}
	return EINVAL
}

//----------------------------------------------------------------------
//
// FileSeekProc --
//
//	Seeks on a file-based channel. Returns the new position.
//
// Results:
//	-1 if failed, the new position if successful. If failed, it also sets
//	*errorCodePtr to the error code.
//
// Side effects:
//	Moves the location at which the channel will be accessed in future
//	operations.
//
//----------------------------------------------------------------------

func sFileSeekProc(tls *libc.TLS, instanceData ClientData, offset int32, mode int32, errorCodePtr uintptr) int32 { /* tclWinChan.c:464:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var infoPtr uintptr = instanceData
	var newPos LONG
	// var newPosHigh LONG at bp+4, 4

	var oldPos LONG
	// var oldPosHigh LONG at bp, 4

	var moveMethod DWORD

	*(*int32)(unsafe.Pointer(errorCodePtr)) = 0
	if mode == SEEK_SET {
		moveMethod = DWORD(FILE_BEGIN)
	} else if mode == SEEK_CUR {
		moveMethod = DWORD(FILE_CURRENT)
	} else {
		moveMethod = DWORD(FILE_END)
	}

	// Save our current place in case we need to roll-back the seek.

	*(*LONG)(unsafe.Pointer(bp /* oldPosHigh */)) = 0
	oldPos = LONG(libc.XSetFilePointer(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, 0, bp, uint32(FILE_CURRENT)))
	if oldPos == LONG(libc.Uint32FromInt32(-1)) {
		var winError DWORD = libc.XGetLastError(tls)

		if winError != DWORD(0) {
			XTclWinConvertError(tls, winError)
			*(*int32)(unsafe.Pointer(errorCodePtr)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
			return -1
		}
	}

	*(*LONG)(unsafe.Pointer(bp + 4 /* newPosHigh */)) = func() int32 {
		if offset < 0 {
			return -1
		}
		return 0
	}()
	newPos = LONG(libc.XSetFilePointer(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, offset, bp+4, moveMethod))
	if newPos == LONG(libc.Uint32FromInt32(-1)) {
		var winError DWORD = libc.XGetLastError(tls)

		if winError != DWORD(0) {
			XTclWinConvertError(tls, winError)
			*(*int32)(unsafe.Pointer(errorCodePtr)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
			return -1
		}
	}

	// Check for expressability in our return type, and roll-back otherwise.

	if *(*LONG)(unsafe.Pointer(bp + 4)) != 0 {
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EOVERFLOW
		libc.XSetFilePointer(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, oldPos, bp, uint32(FILE_BEGIN))
		return -1
	}
	return int32(newPos)
}

//----------------------------------------------------------------------
//
// FileWideSeekProc --
//
//	Seeks on a file-based channel. Returns the new position.
//
// Results:
//	-1 if failed, the new position if successful. If failed, it also sets
//	*errorCodePtr to the error code.
//
// Side effects:
//	Moves the location at which the channel will be accessed in future
//	operations.
//
//----------------------------------------------------------------------

func sFileWideSeekProc(tls *libc.TLS, instanceData ClientData, offset Tcl_WideInt, mode int32, errorCodePtr uintptr) Tcl_WideInt { /* tclWinChan.c:542:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var infoPtr uintptr = instanceData
	var moveMethod DWORD
	var newPos LONG
	// var newPosHigh LONG at bp, 4

	*(*int32)(unsafe.Pointer(errorCodePtr)) = 0
	if mode == SEEK_SET {
		moveMethod = DWORD(FILE_BEGIN)
	} else if mode == SEEK_CUR {
		moveMethod = DWORD(FILE_CURRENT)
	} else {
		moveMethod = DWORD(FILE_END)
	}

	*(*LONG)(unsafe.Pointer(bp /* newPosHigh */)) = int32(offset >> 32)
	newPos = LONG(libc.XSetFilePointer(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, int32(offset),
		bp, moveMethod))
	if newPos == LONG(libc.Uint32FromInt32(-1)) {
		var winError DWORD = libc.XGetLastError(tls)

		if winError != DWORD(0) {
			XTclWinConvertError(tls, winError)
			*(*int32)(unsafe.Pointer(errorCodePtr)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
			return int64(-1)
		}
	}
	return Tcl_WideInt(uint32(newPos)) | Tcl_WideInt(*(*LONG)(unsafe.Pointer(bp)))<<32
}

//----------------------------------------------------------------------
//
// FileTruncateProc --
//
//	Truncates a file-based channel. Returns the error code.
//
// Results:
//	0 if successful, POSIX-y error code if it failed.
//
// Side effects:
//	Truncates the file, may move file pointers too.
//
//----------------------------------------------------------------------

func sFileTruncateProc(tls *libc.TLS, instanceData ClientData, length Tcl_WideInt) int32 { /* tclWinChan.c:593:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var infoPtr uintptr = instanceData
	var newPos LONG
	// var newPosHigh LONG at bp+4, 4

	var oldPos LONG
	// var oldPosHigh LONG at bp, 4

	// Save where we were...

	*(*LONG)(unsafe.Pointer(bp /* oldPosHigh */)) = 0
	oldPos = LONG(libc.XSetFilePointer(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, 0, bp, uint32(FILE_CURRENT)))
	if oldPos == LONG(libc.Uint32FromInt32(-1)) {
		var winError DWORD = libc.XGetLastError(tls)
		if winError != DWORD(0) {
			XTclWinConvertError(tls, winError)
			return *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
		}
	}

	// Move to where we want to truncate

	*(*LONG)(unsafe.Pointer(bp + 4 /* newPosHigh */)) = int32(length >> 32)
	newPos = LONG(libc.XSetFilePointer(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, int32(length),
		bp+4, uint32(FILE_BEGIN)))
	if newPos == LONG(libc.Uint32FromInt32(-1)) {
		var winError DWORD = libc.XGetLastError(tls)
		if winError != DWORD(0) {
			XTclWinConvertError(tls, winError)
			return *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
		}
	}

	// Perform the truncation (unlike POSIX ftruncate(), we needed to move to
	// the location to truncate at first).

	if !(libc.XSetEndOfFile(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle) != 0) {
		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
	}

	// Move back. If this last step fails, we don't care; it's just a "best
	// effort" attempt to restore our file pointer to where it was.

	libc.XSetFilePointer(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, oldPos, bp, uint32(FILE_BEGIN))
	return 0
}

//----------------------------------------------------------------------
//
// FileInputProc --
//
//	Reads input from the IO channel into the buffer given. Returns count
//	of how many bytes were actually read, and an error indication.
//
// Results:
//	A count of how many bytes were read is returned and an error
//	indication is returned in an output argument.
//
// Side effects:
//	Reads input from the actual channel.
//
//----------------------------------------------------------------------

func sFileInputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, bufSize int32, errorCode uintptr) int32 { /* tclWinChan.c:667:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var infoPtr uintptr = instanceData
	// var bytesRead DWORD at bp, 4

	*(*int32)(unsafe.Pointer(errorCode)) = 0

	// TODO: This comment appears to be out of date.  We *do* have a
	// console driver, over in tclWinConsole.c.  After some Windows
	// developer confirms, this comment should be revised.
	//
	// Note that we will block on reads from a console buffer until a full
	// line has been entered. The only way I know of to get around this is to
	// write a console driver. We should probably do this at some point, but
	// for now, we just block. The same problem exists for files being read
	// over the network.

	if libc.XReadFile(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, buf, DWORD(bufSize), bp,
		uintptr(0)) != FALSE {
		return int32(*(*DWORD)(unsafe.Pointer(bp /* bytesRead */)))
	}

	XTclWinConvertError(tls, libc.XGetLastError(tls))
	*(*int32)(unsafe.Pointer(errorCode)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
	if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EPIPE {
		return 0
	}
	return -1
}

//----------------------------------------------------------------------
//
// FileOutputProc --
//
//	Writes the given output on the IO channel. Returns count of how many
//	characters were actually written, and an error indication.
//
// Results:
//	A count of how many characters were written is returned and an error
//	indication is returned in an output argument.
//
// Side effects:
//	Writes output on the actual channel.
//
//----------------------------------------------------------------------

func sFileOutputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, toWrite int32, errorCode uintptr) int32 { /* tclWinChan.c:722:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var infoPtr uintptr = instanceData
	// var bytesWritten DWORD at bp, 4

	*(*int32)(unsafe.Pointer(errorCode)) = 0

	// If we are writing to a file that was opened with O_APPEND, we need to
	// seek to the end of the file before writing the current buffer.

	if (*FileInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<2) != 0 {
		libc.XSetFilePointer(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, 0, uintptr(0), uint32(FILE_END))
	}

	if libc.XWriteFile(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle, buf, DWORD(toWrite),
		bp, uintptr(0)) == FALSE {
		XTclWinConvertError(tls, libc.XGetLastError(tls))
		*(*int32)(unsafe.Pointer(errorCode)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
		return -1
	}
	(*FileInfo)(unsafe.Pointer(infoPtr)).Fdirty = 1
	return int32(*(*DWORD)(unsafe.Pointer(bp /* bytesWritten */)))
}

//----------------------------------------------------------------------
//
// FileWatchProc --
//
//	Called by the notifier to set up to watch for events on this channel.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileWatchProc(tls *libc.TLS, instanceData ClientData, mask int32) { /* tclWinChan.c:769:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var infoPtr uintptr = instanceData
	*(*Tcl_Time)(unsafe.Pointer(bp /* blockTime */)) = Tcl_Time{}

	// Since the file is always ready for events, we set the block time to
	// zero so we will poll.

	(*FileInfo)(unsafe.Pointer(infoPtr)).FwatchMask = mask & (*FileInfo)(unsafe.Pointer(infoPtr)).FvalidMask
	if (*FileInfo)(unsafe.Pointer(infoPtr)).FwatchMask != 0 {
		XTcl_SetMaxBlockTime(tls, bp)
	}
}

//----------------------------------------------------------------------
//
// FileGetHandleProc --
//
//	Called from Tcl_GetChannelHandle to retrieve OS handles from a file
//	based channel.
//
// Results:
//	Returns TCL_OK with the fd in handlePtr, or TCL_ERROR if there is no
//	handle for the specified direction.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sFileGetHandleProc(tls *libc.TLS, instanceData ClientData, direction int32, handlePtr uintptr) int32 { /* tclWinChan.c:808:1: */
	var infoPtr uintptr = instanceData

	if direction&(*FileInfo)(unsafe.Pointer(infoPtr)).FvalidMask != 0 {
		*(*ClientData)(unsafe.Pointer(handlePtr)) = (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle
		return TCL_OK
	} else {
		return TCL_ERROR
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// TclpOpenFileChannel --
//
//	Open an File based channel on Unix systems.
//
// Results:
//	The new channel or NULL. If NULL, the output argument errorCodePtr is
//	set to a POSIX error.
//
// Side effects:
//	May open the channel and may cause creation of a file on the file
//	system.
//
//----------------------------------------------------------------------

func XTclpOpenFileChannel(tls *libc.TLS, interp uintptr, pathPtr uintptr, mode int32, permissions int32) Tcl_Channel { /* tclWinChan.c:842:1: */
	bp := tls.Alloc(192)
	defer tls.Free(192)

	var channel Tcl_Channel = uintptr(0)
	var channelPermissions int32 = 0
	var accessMode DWORD = DWORD(0)
	var createMode DWORD
	var shareMode DWORD
	var flags DWORD
	var nativeName uintptr
	var handle HANDLE
	// var channelName [40]int8 at bp+152, 40

	var readFile TclFile = uintptr(0)
	var writeFile TclFile = uintptr(0)

	nativeName = XTcl_FSGetNativePath(tls, pathPtr)
	if nativeName == uintptr(0) {
		if interp != uintptr(0) {
			XTcl_AppendResult(tls, interp, libc.VaList(bp, ts+67275,
				func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
					}
					return XTcl_GetString(tls, pathPtr)
				}(), ts+67291,
				uintptr(0)))
		}
		return uintptr(0)
	}

	switch mode & (X_O_RDONLY | X_O_WRONLY | X_O_RDWR) {
	case X_O_RDONLY:
		accessMode = 0x80000000
		channelPermissions = int32(1) << 1
		break
	case X_O_WRONLY:
		accessMode = DWORD(0x40000000)
		channelPermissions = int32(1) << 2
		break
	case X_O_RDWR:
		accessMode = 0x80000000 | uint32(0x40000000)
		channelPermissions = int32(1)<<1 | int32(1)<<2
		break
	default:
		XTcl_Panic(tls, ts+67331, 0)
		break
	}

	// Map the creation flags to the NT create mode.

	switch mode & (X_O_CREAT | X_O_EXCL | X_O_TRUNC) {
	case X_O_CREAT | X_O_EXCL:
		fallthrough
	case X_O_CREAT | X_O_EXCL | X_O_TRUNC:
		createMode = DWORD(CREATE_NEW)
		break
	case X_O_CREAT | X_O_TRUNC:
		createMode = DWORD(CREATE_ALWAYS)
		break
	case X_O_CREAT:
		createMode = DWORD(OPEN_ALWAYS)
		break
	case X_O_TRUNC:
		fallthrough
	case X_O_TRUNC | X_O_EXCL:
		createMode = DWORD(TRUNCATE_EXISTING)
		break
	default:
		createMode = DWORD(OPEN_EXISTING)
		break
	}

	// [2413550] Avoid double-open of serial ports on Windows
	// Special handling for Windows serial ports by a "name-hint"
	// to directly open it with the OVERLAPPED flag set.

	if sNativeIsComPort(tls, nativeName) != 0 {

		handle = XTclWinSerialOpen(tls, libc.UintptrFromInt64(int64(-1)), nativeName, accessMode)
		if handle == libc.UintptrFromInt64(int64(-1)) {
			XTclWinConvertError(tls, libc.XGetLastError(tls))
			if interp != uintptr(0) {
				XTcl_AppendResult(tls, interp, libc.VaList(bp+32, ts+67371,
					func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
						}
						return XTcl_GetString(tls, pathPtr)
					}(), ts+34774,
					XTcl_PosixError(tls, interp), uintptr(0)))
			}
			return uintptr(0)
		}

		// For natively named Windows serial ports we are done.
		channel = XTclWinOpenSerialChannel(tls, handle, bp+152,
			channelPermissions)

		return channel
	}
	// If the file is being created, get the file attributes from the
	// permissions argument, else use the existing file attributes.

	if mode&X_O_CREAT != 0 {
		if permissions&X_S_IWRITE != 0 {
			flags = DWORD(FILE_ATTRIBUTE_NORMAL)
		} else {
			flags = DWORD(FILE_ATTRIBUTE_READONLY)
		}
	} else {
		flags = libc.XGetFileAttributesW(tls, nativeName)
		if flags == 0xFFFFFFFF {
			flags = DWORD(0)
		}
	}

	// Set up the file sharing mode.  We want to allow simultaneous access.

	shareMode = DWORD(FILE_SHARE_READ | FILE_SHARE_WRITE)

	// Now we get to create the file.

	handle = libc.XCreateFileW(tls, nativeName, accessMode, shareMode,
		uintptr(0), createMode, flags, uintptr(0))

	if handle == libc.UintptrFromInt64(int64(-1)) {
		var err DWORD = libc.XGetLastError(tls)

		if err&DWORD(0xFFFF) == DWORD(110) {
			if mode&X_O_CREAT != 0 {
				err = uint32(80)
			} else {
				err = uint32(2)
			}
		}
		XTclWinConvertError(tls, err)
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+38634,
				libc.VaList(bp+72, func() uintptr {
					if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
						return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
					}
					return XTcl_GetString(tls, pathPtr)
				}(), XTcl_PosixError(tls, interp))))
		}
		return uintptr(0)
	}

	channel = uintptr(0)

	switch XFileGetType(tls, handle) {
	case DWORD(FILE_TYPE_PIPE + 1):

		handle = XTclWinSerialOpen(tls, handle, nativeName, accessMode)
		if handle == libc.UintptrFromInt64(int64(-1)) {
			XTclWinConvertError(tls, libc.XGetLastError(tls))
			if interp != uintptr(0) {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+67394,
					libc.VaList(bp+88, func() uintptr {
						if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
							return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
						}
						return XTcl_GetString(tls, pathPtr)
					}(), XTcl_PosixError(tls, interp))))
			}
			return uintptr(0)
		}
		channel = XTclWinOpenSerialChannel(tls, handle, bp+152,
			channelPermissions)
		break
	case DWORD(FILE_TYPE_PIPE + 2):
		channel = XTclWinOpenConsoleChannel(tls, handle, bp+152,
			channelPermissions)
		break
	case DWORD(FILE_TYPE_PIPE):
		if channelPermissions&(int32(1)<<1) != 0 {
			readFile = XTclWinMakeFile(tls, handle)
		}
		if channelPermissions&(int32(1)<<2) != 0 {
			writeFile = XTclWinMakeFile(tls, handle)
		}
		channel = XTclpCreateCommandChannel(tls, readFile, writeFile, uintptr(0), 0, uintptr(0))
		break
	case DWORD(FILE_TYPE_CHAR):
		fallthrough
	case DWORD(FILE_TYPE_DISK):
		fallthrough
	case DWORD(FILE_TYPE_UNKNOWN):
		channel = XTclWinOpenFileChannel(tls, handle, bp+152,
			channelPermissions, func() int32 {
				if mode&X_O_APPEND != 0 {
					return int32(1) << 2
				}
				return 0
			}())
		break

	default:
		// The handle is of an unknown type, probably /dev/nul equivalent or
		// possibly a closed handle.

		channel = uintptr(0)
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+67426,
			libc.VaList(bp+104, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes
				}
				return XTcl_GetString(tls, pathPtr)
			}())))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+112, ts+4178, ts+7444, ts+32774, ts+9452,
			uintptr(0)))
		break
	}

	return channel
}

//----------------------------------------------------------------------
//
// Tcl_MakeFileChannel --
//
//	Creates a Tcl_Channel from an existing platform specific file handle.
//
// Results:
//	The Tcl_Channel created around the preexisting file.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_MakeFileChannel(tls *libc.TLS, rawHandle ClientData, mode int32) Tcl_Channel { /* tclWinChan.c:1064:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var channelName [40]int8 at bp, 40

	var channel Tcl_Channel = uintptr(0)
	var handle HANDLE = rawHandle
	// var dupedHandle HANDLE at bp+40, 8

	var readFile TclFile = uintptr(0)
	var writeFile TclFile = uintptr(0)
	var result WINBOOL

	if mode == 0 {
		return uintptr(0)
	}

	switch XFileGetType(tls, handle) {
	case DWORD(FILE_TYPE_PIPE + 1):
		channel = XTclWinOpenSerialChannel(tls, handle, bp, mode)
		break
	case DWORD(FILE_TYPE_PIPE + 2):
		channel = XTclWinOpenConsoleChannel(tls, handle, bp, mode)
		break
	case DWORD(FILE_TYPE_PIPE):
		if mode&(int32(1)<<1) != 0 {
			readFile = XTclWinMakeFile(tls, handle)
		}
		if mode&(int32(1)<<2) != 0 {
			writeFile = XTclWinMakeFile(tls, handle)
		}
		channel = XTclpCreateCommandChannel(tls, readFile, writeFile, uintptr(0), 0, uintptr(0))
		break

	case DWORD(FILE_TYPE_DISK):
		fallthrough
	case DWORD(FILE_TYPE_CHAR):
		channel = XTclWinOpenFileChannel(tls, handle, bp, mode, 0)
		break

	case DWORD(FILE_TYPE_UNKNOWN):
		fallthrough
	default:
		// The handle is of an unknown type. Test the validity of this OS
		// handle by duplicating it, then closing the dupe. The Win32 API
		// doesn't provide an IsValidHandle() function, so we have to emulate
		// it here. This test will not work on a console handle reliably,
		// which is why we can't test every handle that comes into this
		// function in this way.

		result = libc.XDuplicateHandle(tls, libc.XGetCurrentProcess(tls), handle,
			libc.XGetCurrentProcess(tls), bp+40, uint32(0), FALSE,
			uint32(DUPLICATE_SAME_ACCESS))

		if result == 0 {
			// Unable to make a duplicate. It's definitely invalid at this
			// point.

			return uintptr(0)
		}

		// Use structured exception handling (Win32 SEH) to protect the close
		// of this duped handle which might throw EXCEPTION_INVALID_HANDLE.

		result = 0
		libc.XCloseHandle(tls, *(*HANDLE)(unsafe.Pointer(bp + 40 /* dupedHandle */)))
		result = 1
		if result == FALSE {
			return uintptr(0)
		}

		// Fall through, the handle is valid.
		//
		// Create the undefined channel, anyways, because we know the handle
		// is valid to something.

		channel = XTclWinOpenFileChannel(tls, handle, bp, mode, 0)
	}

	return channel
}

//----------------------------------------------------------------------
//
// TclpGetDefaultStdChannel --
//
//	Constructs a channel for the specified standard OS handle.
//
// Results:
//	Returns the specified default standard channel, or NULL.
//
// Side effects:
//	May cause the creation of a standard channel and the underlying file.
//
//----------------------------------------------------------------------

func XTclpGetDefaultStdChannel(tls *libc.TLS, type1 int32) Tcl_Channel { /* tclWinChan.c:1259:1: */
	var channel Tcl_Channel
	var handle HANDLE
	var mode int32 = -1
	var bufMode uintptr = uintptr(0)
	var handleId DWORD = libc.Uint32(libc.Uint32FromInt32(-1))
	// Standard handle to retrieve.

	switch type1 {
	case int32(1) << 1:
		handleId = libc.Uint32(libc.Uint32FromInt32(-10))
		mode = int32(1) << 1
		bufMode = ts + 14319 /* "line" */
		break
	case int32(1) << 2:
		handleId = libc.Uint32(libc.Uint32FromInt32(-11))
		mode = int32(1) << 2
		bufMode = ts + 14319 /* "line" */
		break
	case int32(1) << 3:
		handleId = libc.Uint32(libc.Uint32FromInt32(-12))
		mode = int32(1) << 2
		bufMode = ts + 34192 /* "none" */
		break
	default:
		XTcl_Panic(tls, ts+67460, 0)
		break
	}

	handle = libc.XGetStdHandle(tls, handleId)

	// Note that we need to check for 0 because Windows may return 0 if this
	// is not a console mode application, even though this is not a valid
	// handle.

	if handle == libc.UintptrFromInt64(int64(-1)) || handle == uintptr(0) {
		return uintptr(0)
	}

	channel = XTcl_MakeFileChannel(tls, handle, mode)

	if channel == uintptr(0) {
		return uintptr(0)
	}

	// Set up the normal channel options for stdio handles.

	if XTcl_SetChannelOption(tls, uintptr(0), channel, ts+34223, ts+34236) != TCL_OK || XTcl_SetChannelOption(tls, uintptr(0), channel, ts+34214, ts+38537) != TCL_OK || XTcl_SetChannelOption(tls, uintptr(0), channel, ts+34181, bufMode) != TCL_OK {
		XTcl_Close(tls, uintptr(0), channel)
		return uintptr(0)
	}
	return channel
}

//----------------------------------------------------------------------
//
// TclWinOpenFileChannel --
//
//	Constructs a File channel for the specified standard OS handle. This
//	is a helper function to break up the construction of channels into
//	File, Console, or Serial.
//
// Results:
//	Returns the new channel, or NULL.
//
// Side effects:
//	May open the channel and may cause creation of a file on the file
//	system.
//
//----------------------------------------------------------------------

func XTclWinOpenFileChannel(tls *libc.TLS, handle HANDLE, channelName uintptr, permissions int32, appendMode int32) Tcl_Channel { /* tclWinChan.c:1342:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var infoPtr uintptr
	var tsdPtr uintptr = sFileInit(tls)

	// See if a channel with this handle already exists.

	for infoPtr = (*ThreadSpecificData12)(unsafe.Pointer(tsdPtr)).FfirstFilePtr; infoPtr != uintptr(0); infoPtr = (*FileInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle == handle {
			if permissions == (*FileInfo)(unsafe.Pointer(infoPtr)).FvalidMask {
				return (*FileInfo)(unsafe.Pointer(infoPtr)).Fchannel
			}
			return uintptr(0)
		}
	}

	infoPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(FileInfo{})))

	// TIP #218. Removed the code inserting the new structure into the global
	// list. This is now handled in the thread action callbacks, and only
	// there.

	(*FileInfo)(unsafe.Pointer(infoPtr)).FnextPtr = uintptr(0)
	(*FileInfo)(unsafe.Pointer(infoPtr)).FvalidMask = permissions
	(*FileInfo)(unsafe.Pointer(infoPtr)).FwatchMask = 0
	(*FileInfo)(unsafe.Pointer(infoPtr)).Fflags = appendMode
	(*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle = handle
	(*FileInfo)(unsafe.Pointer(infoPtr)).Fdirty = 0
	libc.Xsprintf(tls, channelName, ts+67509, libc.VaList(bp, Size_t(infoPtr)))

	(*FileInfo)(unsafe.Pointer(infoPtr)).Fchannel = XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&fileChannelType)), channelName,
		infoPtr, permissions)

	// Files have default translation of AUTO and ^Z eof char, which means
	// that a ^Z will be accepted as EOF when reading.

	XTcl_SetChannelOption(tls, uintptr(0), (*FileInfo)(unsafe.Pointer(infoPtr)).Fchannel, ts+34223, ts+34236)
	XTcl_SetChannelOption(tls, uintptr(0), (*FileInfo)(unsafe.Pointer(infoPtr)).Fchannel, ts+34214, ts+38537)

	return (*FileInfo)(unsafe.Pointer(infoPtr)).Fchannel
}

//----------------------------------------------------------------------
//
// TclWinFlushDirtyChannels --
//
//	Flush all dirty channels to disk, so that requesting the size of any
//	file returns the correct value.
//
// Results:
//	None.
//
// Side effects:
//	Information is actually written to disk now, rather than later. Don't
//	call this too often, or there will be a performance hit (i.e. only
//	call when we need to ask for the size of a file).
//
//----------------------------------------------------------------------

func XTclWinFlushDirtyChannels(tls *libc.TLS) { /* tclWinChan.c:1416:1: */
	var infoPtr uintptr
	var tsdPtr uintptr = sFileInit(tls)

	// Flush all channels which are dirty, i.e. may have data pending in the
	// OS.

	for infoPtr = (*ThreadSpecificData12)(unsafe.Pointer(tsdPtr)).FfirstFilePtr; infoPtr != uintptr(0); infoPtr = (*FileInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*FileInfo)(unsafe.Pointer(infoPtr)).Fdirty != 0 {
			libc.XFlushFileBuffers(tls, (*FileInfo)(unsafe.Pointer(infoPtr)).Fhandle)
			(*FileInfo)(unsafe.Pointer(infoPtr)).Fdirty = 0
		}
	}
}

//----------------------------------------------------------------------
//
// FileThreadActionProc --
//
//	Insert or remove any thread local refs to this channel.
//
// Results:
//	None.
//
// Side effects:
//	Changes thread local list of valid channels.
//
//----------------------------------------------------------------------

func sFileThreadActionProc(tls *libc.TLS, instanceData ClientData, action int32) { /* tclWinChan.c:1452:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey11)), int32(unsafe.Sizeof(ThreadSpecificData12{})))
	var infoPtr uintptr = instanceData

	if action == 0 {
		(*FileInfo)(unsafe.Pointer(infoPtr)).FnextPtr = (*ThreadSpecificData12)(unsafe.Pointer(tsdPtr)).FfirstFilePtr
		(*ThreadSpecificData12)(unsafe.Pointer(tsdPtr)).FfirstFilePtr = infoPtr
	} else {
		var nextPtrPtr uintptr
		var removed int32 = 0

		for nextPtrPtr = tsdPtr; *(*uintptr)(unsafe.Pointer(nextPtrPtr)) != uintptr(0); nextPtrPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr)) + 32 {
			if *(*uintptr)(unsafe.Pointer(nextPtrPtr)) == infoPtr {
				*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*FileInfo)(unsafe.Pointer(infoPtr)).FnextPtr
				removed = 1
				break
			}
		}

		// This could happen if the channel was created in one thread and then
		// moved to another without updating the thread local data in each
		// thread.

		if !(removed != 0) {
			XTcl_Panic(tls, ts+67517, 0)
		}
	}
}

//----------------------------------------------------------------------
//
// FileGetType --
//
//	Given a file handle, return its type
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XFileGetType(tls *libc.TLS, handle HANDLE) DWORD { /* tclWinChan.c:1504:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var type1 DWORD

	type1 = libc.XGetFileType(tls, handle)

	// If the file is a character device, we need to try to figure out whether
	// it is a serial port, a console, or something else. We test for the
	// console case first because this is more common.

	if type1 == DWORD(FILE_TYPE_CHAR) ||
		type1 == DWORD(FILE_TYPE_UNKNOWN) && !(libc.XGetLastError(tls) != 0) {
		// var consoleParams DWORD at bp, 4

		if libc.XGetConsoleMode(tls, handle, bp) != 0 {
			type1 = DWORD(FILE_TYPE_PIPE + 2)
		} else {
			// var dcb DCB at bp+4, 32

			(*DCB)(unsafe.Pointer(bp + 4 /* &dcb */)).FDCBlength = DWORD(unsafe.Sizeof(DCB{}))
			if libc.XGetCommState(tls, handle, bp+4) != 0 {
				type1 = DWORD(FILE_TYPE_PIPE + 1)
			}
		}
	}

	return type1
}

//----------------------------------------------------------------------
//
// NativeIsComPort --
//
//	Determines if a path refers to a Windows serial port.
//	A simple and efficient solution is to use a "name hint" to detect
//      COM ports by their filename instead of resorting to a syscall
//	to detect serialness after the fact.
//	The following patterns cover common serial port names:
//	    COM[1-9]
//	    \\.\COM[0-9]+
//
// Results:
//	1 = serial port, 0 = not.
//
//----------------------------------------------------------------------

func sNativeIsComPort(tls *libc.TLS, nativePath uintptr) int32 { /* tclWinChan.c:1556:1: */
	var p uintptr = nativePath
	var i int32
	var len int32 = int32(libc.Xwcslen(tls, p))

	// 1. Look for com[1-9]:?

	if len == 4 && libc.X_wcsnicmp(tls, p, wtext+186, uint64(3)) == 0 {
		// The 4th character must be a digit 1..9

		if int32(*(*WCHAR)(unsafe.Pointer(p + 3*2))) < int32(49) || int32(*(*WCHAR)(unsafe.Pointer(p + 3*2))) > int32(57) {
			return 0
		}
		return 1
	}

	// 2. Look for \\.\com[0-9]+

	if len >= 8 && libc.X_wcsnicmp(tls, p, wtext+194, uint64(7)) == 0 {
		// Charaters 8..end must be a digits 0..9

		for i = 7; i < len; i++ {
			if int32(*(*WCHAR)(unsafe.Pointer(p + uintptr(i)*2))) < '0' || int32(*(*WCHAR)(unsafe.Pointer(p + uintptr(i)*2))) > '9' {
				return 0
			}
		}
		return 1
	}
	return 0
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The following variable is used to tell whether this module has been
// initialized.

var initialized int32 = 0 /* tclWinConsole.c:20:12 */

// The consoleMutex locks around access to the initialized variable, and it is
// used to protect background threads from being terminated while they are
// using APIs that hold locks.

// Bit masks used in the flags field of the ConsoleInfo structure below.

// Bit masks used in the sharedFlags field of the ConsoleInfo structure below.

// Structure containing handles associated with one of the special console
// threads.

type ConsoleThreadInfo1 = struct {
	Fthread     HANDLE
	FreadyEvent HANDLE
	FTI         uintptr
} /* tclWinConsole.c:52:9 */

// The consoleMutex locks around access to the initialized variable, and it is
// used to protect background threads from being terminated while they are
// using APIs that hold locks.

// Bit masks used in the flags field of the ConsoleInfo structure below.

// Bit masks used in the sharedFlags field of the ConsoleInfo structure below.

// Structure containing handles associated with one of the special console
// threads.

type ConsoleThreadInfo = ConsoleThreadInfo1 /* tclWinConsole.c:58:3 */

// This structure describes per-instance data for a console based channel.

type ConsoleInfo1 = struct {
	Fhandle      HANDLE
	Ftype        int32
	F__ccgo_pad1 [4]byte
	FnextPtr     uintptr
	Fchannel     Tcl_Channel
	FvalidMask   int32
	FwatchMask   int32
	Fflags       int32
	F__ccgo_pad2 [4]byte
	FthreadId    Tcl_ThreadId
	Fwriter      ConsoleThreadInfo
	Freader      ConsoleThreadInfo
	FwriteError  DWORD
	F__ccgo_pad3 [4]byte
	FwriteBuf    uintptr
	FwriteBufLen int32
	FtoWrite     int32
	FreadFlags   int32
	FbytesRead   int32
	Foffset      int32
	Fbuffer      [8192]int8
	F__ccgo_pad4 [4]byte
} /* tclWinConsole.c:64:9 */

// This structure describes per-instance data for a console based channel.

type ConsoleInfo = ConsoleInfo1 /* tclWinConsole.c:107:3 */

type ThreadSpecificData13 = struct{ FfirstConsolePtr uintptr } /* tclWinConsole.c:116:3 */

var dataKey12 Tcl_ThreadDataKey /* tclWinConsole.c:118:26: */

// The following structure is what is added to the Tcl event queue when
// console events are generated.

type ConsoleEvent1 = struct {
	Fheader  Tcl_Event
	FinfoPtr uintptr
} /* tclWinConsole.c:125:9 */

// The following structure is what is added to the Tcl event queue when
// console events are generated.

type ConsoleEvent = ConsoleEvent1 /* tclWinConsole.c:132:3 */

// This structure describes the channel type structure for command console
// based IO.

var consoleChannelType = Tcl_ChannelType{
	FtypeName:         ts + 67558,
	Fversion:          uintptr(0x5),
	FcloseProc:        0, // Close proc.
	FinputProc:        0, // Input proc.
	FoutputProc:       0, // Get option proc.
	FwatchProc:        0, // Set up notifier to watch the channel.
	FgetHandleProc:    0, // Get an OS handle from channel.
	Fclose2Proc:       0, // close2proc.
	FblockModeProc:    0, // Wide seek proc.
	FthreadActionProc: 0, // Truncation proc.
} /* tclWinConsole.c:173:30 */

//----------------------------------------------------------------------
//
// ReadConsoleBytes, WriteConsoleBytes --
//
//	Wrapper for ReadConsoleW, that takes and returns number of bytes
//	instead of number of WCHARS.
//
//----------------------------------------------------------------------

func sReadConsoleBytes(tls *libc.TLS, hConsole HANDLE, lpBuffer LPVOID, nbytes DWORD, nbytesread LPDWORD) WINBOOL { /* tclWinConsole.c:205:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var ntchars DWORD at bp, 4

	var result WINBOOL

	// If user types a Ctrl-Break or Ctrl-C, ReadConsole will return
	// success with ntchars == 0 and GetLastError() will be
	// ERROR_OPERATION_ABORTED. We do not want to treat this case
	// as EOF so we will loop around again. If no Ctrl signal handlers
	// have been established, the default signal OS handler in a separate
	// thread will terminate the program. If a Ctrl signal handler
	// has been established (through an extension for example), it
	// will run and take whatever action it deems appropriate.
	for ok := true; ok; ok = result != 0 && *(*DWORD)(unsafe.Pointer(bp)) == DWORD(0) && libc.XGetLastError(tls) == DWORD(995) {
		result = libc.XReadConsoleW(tls, hConsole, lpBuffer, uint32(uint64(nbytes)/uint64(unsafe.Sizeof(WCHAR(0)))), bp,
			uintptr(0))
	}
	if nbytesread != uintptr(0) {
		*(*DWORD)(unsafe.Pointer(nbytesread)) = DWORD(uint64(*(*DWORD)(unsafe.Pointer(bp))) * uint64(unsafe.Sizeof(WCHAR(0))))
	}
	return result
}

func sWriteConsoleBytes(tls *libc.TLS, hConsole HANDLE, lpBuffer uintptr, nbytes DWORD, nbyteswritten LPDWORD) WINBOOL { /* tclWinConsole.c:235:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var ntchars DWORD at bp, 4

	var result WINBOOL

	result = libc.XWriteConsoleW(tls, hConsole, lpBuffer, uint32(uint64(nbytes)/uint64(unsafe.Sizeof(WCHAR(0)))), bp,
		uintptr(0))
	if nbyteswritten != uintptr(0) {
		*(*DWORD)(unsafe.Pointer(nbyteswritten)) = DWORD(uint64(*(*DWORD)(unsafe.Pointer(bp))) * uint64(unsafe.Sizeof(WCHAR(0))))
	}
	return result
}

//----------------------------------------------------------------------
//
// ConsoleInit --
//
//	This function initializes the static variables for this file.
//
// Results:
//	None.
//
// Side effects:
//	Creates a new event source.
//
//----------------------------------------------------------------------

func sConsoleInit(tls *libc.TLS) { /* tclWinConsole.c:269:1: */
	// Check the initialized flag first, then check again in the mutex. This
	// is a speed enhancement.

	if !(initialized != 0) {

		if !(initialized != 0) {
			initialized = 1
			XTcl_CreateExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sProcExitHandler})), uintptr(0))
		}

	}

	if XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey12))) == uintptr(0) {
		var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey12)), int32(unsafe.Sizeof(ThreadSpecificData13{})))

		(*ThreadSpecificData13)(unsafe.Pointer(tsdPtr)).FfirstConsolePtr = uintptr(0)
		XTcl_CreateEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{XConsoleSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sConsoleCheckProc})), uintptr(0))
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sConsoleExitHandler})), uintptr(0))
	}
}

//----------------------------------------------------------------------
//
// ConsoleExitHandler --
//
//	This function is called to cleanup the console module before Tcl is
//	unloaded.
//
// Results:
//	None.
//
// Side effects:
//	Removes the console event source.
//
//----------------------------------------------------------------------

func sConsoleExitHandler(tls *libc.TLS, clientData ClientData) { /* tclWinConsole.c:312:1: */
	XTcl_DeleteEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{XConsoleSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sConsoleCheckProc})), uintptr(0))
}

//----------------------------------------------------------------------
//
// ProcExitHandler --
//
//	This function is called to cleanup the process list before Tcl is
//	unloaded.
//
// Results:
//	None.
//
// Side effects:
//	Resets the process list.
//
//----------------------------------------------------------------------

func sProcExitHandler(tls *libc.TLS, clientData ClientData) { /* tclWinConsole.c:336:1: */

	initialized = 0

}

//----------------------------------------------------------------------
//
// ConsoleSetupProc --
//
//	This procedure is invoked before Tcl_DoOneEvent blocks waiting for an
//	event.
//
// Results:
//	None.
//
// Side effects:
//	Adjusts the block time if needed.
//
//----------------------------------------------------------------------

func XConsoleSetupProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinConsole.c:362:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var infoPtr uintptr
	*(*Tcl_Time)(unsafe.Pointer(bp /* blockTime */)) = Tcl_Time{}
	var block int32 = 1
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey12)), int32(unsafe.Sizeof(ThreadSpecificData13{})))

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Look to see if any events are already pending. If they are, poll.

	for infoPtr = (*ThreadSpecificData13)(unsafe.Pointer(tsdPtr)).FfirstConsolePtr; infoPtr != uintptr(0); infoPtr = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<2) != 0 {
			if libc.XWaitForSingleObject(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fwriter.FreadyEvent,
				uint32(0)) != DWORD(258) {
				block = 0
			}
		}
		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 {
			if sWaitForRead(tls, infoPtr, 0) >= 0 {
				block = 0
			}
		}
	}
	if !(block != 0) {
		XTcl_SetMaxBlockTime(tls, bp)
	}
}

//----------------------------------------------------------------------
//
// ConsoleCheckProc --
//
//	This procedure is called by Tcl_DoOneEvent to check the console event
//	source for events.
//
// Results:
//	None.
//
// Side effects:
//	May queue an event.
//
//----------------------------------------------------------------------

func sConsoleCheckProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinConsole.c:416:1: */
	var infoPtr uintptr
	var needEvent int32
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey12)), int32(unsafe.Sizeof(ThreadSpecificData13{})))

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Queue events for any ready consoles that don't already have events
	// queued.

	for infoPtr = (*ThreadSpecificData13)(unsafe.Pointer(tsdPtr)).FfirstConsolePtr; infoPtr != uintptr(0); infoPtr = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<0) != 0 {
			continue
		}

		// Queue an event if the console is signaled for reading or writing.

		needEvent = 0
		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<2) != 0 {
			if libc.XWaitForSingleObject(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fwriter.FreadyEvent,
				uint32(0)) != DWORD(258) {
				needEvent = 1
			}
		}

		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 {
			if sWaitForRead(tls, infoPtr, 0) >= 0 {
				needEvent = 1
			}
		}

		if needEvent != 0 {
			var evPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ConsoleEvent{})))

			*(*int32)(unsafe.Pointer(infoPtr + 40)) |= int32(1) << 0
			(*ConsoleEvent)(unsafe.Pointer(evPtr)).Fheader.Fproc = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, int32) int32
			}{sConsoleEventProc}))
			(*ConsoleEvent)(unsafe.Pointer(evPtr)).FinfoPtr = infoPtr
			XTcl_QueueEvent(tls, evPtr, TCL_QUEUE_TAIL)
		}
	}
}

//----------------------------------------------------------------------
//
// ConsoleBlockModeProc --
//
//	Set blocking or non-blocking mode on channel.
//
// Results:
//	0 if successful, errno when failed.
//
// Side effects:
//	Sets the device into blocking or non-blocking mode.
//
//----------------------------------------------------------------------

func sConsoleBlockModeProc(tls *libc.TLS, instanceData ClientData, mode int32) int32 { /* tclWinConsole.c:485:1: */
	var infoPtr uintptr = instanceData

	// Consoles on Windows can not be switched between blocking and
	// nonblocking, hence we have to emulate the behavior. This is done in the
	// input function by checking against a bit in the state. We set or unset
	// the bit here to cause the input function to emulate the correct
	// behavior.

	if mode == TCL_MODE_NONBLOCKING {
		*(*int32)(unsafe.Pointer(infoPtr + 40)) |= int32(1) << 1
	} else {
		*(*int32)(unsafe.Pointer(infoPtr + 40)) &= libc.CplInt32(int32(1) << 1)
	}
	return 0
}

//----------------------------------------------------------------------
//
// ConsoleCloseProc/ConsoleClose2Proc --
//
//	Closes a console based IO channel.
//
// Results:
//	0 on success, errno otherwise.
//
// Side effects:
//	Closes the physical channel.
//
//----------------------------------------------------------------------

func sConsoleCloseProc(tls *libc.TLS, instanceData ClientData, interp uintptr) int32 { /* tclWinConsole.c:525:1: */
	var consolePtr uintptr = instanceData
	var errorCode int32 = 0
	var infoPtr uintptr
	var nextPtrPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey12)), int32(unsafe.Sizeof(ThreadSpecificData13{})))

	// Clean up the background thread if necessary. Note that this must be
	// done before we can close the file, since the thread may be blocking
	// trying to read from the console.

	if (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Freader.Fthread != 0 {
		XTclPipeThreadStop(tls, consolePtr+80+16, (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Freader.Fthread)
		libc.XCloseHandle(tls, (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Freader.Fthread)
		libc.XCloseHandle(tls, (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Freader.FreadyEvent)
		(*ConsoleInfo)(unsafe.Pointer(consolePtr)).Freader.Fthread = uintptr(0)
	}
	*(*int32)(unsafe.Pointer(consolePtr + 32)) &= libc.CplInt32(int32(1) << 1)

	// Wait for the writer thread to finish the current buffer, then terminate
	// the thread and close the handles. If the channel is nonblocking, there
	// should be no pending write operations.

	if (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fwriter.Fthread != 0 {
		if (*ConsoleInfo)(unsafe.Pointer(consolePtr)).FtoWrite != 0 {
			// We only need to wait if there is something to write. This may
			// prevent infinite wait on exit. [Python Bug 216289]

			libc.XWaitForSingleObject(tls, (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fwriter.FreadyEvent, uint32(5000))
		}

		XTclPipeThreadStop(tls, consolePtr+56+16, (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fwriter.Fthread)
		libc.XCloseHandle(tls, (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fwriter.Fthread)
		libc.XCloseHandle(tls, (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fwriter.FreadyEvent)
		(*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fwriter.Fthread = uintptr(0)
	}
	*(*int32)(unsafe.Pointer(consolePtr + 32)) &= libc.CplInt32(int32(1) << 2)

	// Don't close the Win32 handle if the handle is a standard channel during
	// the thread exit process. Otherwise, one thread may kill the stdio of
	// another.

	if !(XTclInThreadExit(tls) != 0) ||
		libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-10))) != (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fhandle &&
			libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-11))) != (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fhandle &&
			libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-12))) != (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fhandle {
		if libc.XCloseHandle(tls, (*ConsoleInfo)(unsafe.Pointer(consolePtr)).Fhandle) == FALSE {
			XTclWinConvertError(tls, libc.XGetLastError(tls))
			errorCode = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
		}
	}

	*(*int32)(unsafe.Pointer(consolePtr + 36)) &= (*ConsoleInfo)(unsafe.Pointer(consolePtr)).FvalidMask

	// Remove the file from the list of watched files.

	nextPtrPtr = tsdPtr
	infoPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
__1:
	if !(infoPtr != uintptr(0)) {
		goto __3
	}
	{
		if infoPtr == consolePtr {
			*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FnextPtr
			goto __3
		}

	}
	goto __2
__2:
	nextPtrPtr = infoPtr + 16
	infoPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
	goto __1
	goto __3
__3:
	;
	if (*ConsoleInfo)(unsafe.Pointer(consolePtr)).FwriteBuf != uintptr(0) {
		XTclpFree(tls, (*ConsoleInfo)(unsafe.Pointer(consolePtr)).FwriteBuf)
		(*ConsoleInfo)(unsafe.Pointer(consolePtr)).FwriteBuf = uintptr(0)
	}
	XTclpFree(tls, consolePtr)

	return errorCode
}

func sConsoleClose2Proc(tls *libc.TLS, instanceData ClientData, interp uintptr, flags int32) int32 { /* tclWinConsole.c:611:1: */
	if flags&(int32(1)<<1|int32(1)<<2) == 0 {
		return sConsoleCloseProc(tls, instanceData, interp)
	}
	return EINVAL
}

//----------------------------------------------------------------------
//
// ConsoleInputProc --
//
//	Reads input from the IO channel into the buffer given. Returns count
//	of how many bytes were actually read, and an error indication.
//
// Results:
//	A count of how many bytes were read is returned and an error
//	indication is returned in an output argument.
//
// Side effects:
//	Reads input from the actual channel.
//
//----------------------------------------------------------------------

func sConsoleInputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, bufSize int32, errorCode uintptr) int32 { /* tclWinConsole.c:641:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var infoPtr uintptr = instanceData
	// var count DWORD at bp, 4

	var bytesRead DWORD = DWORD(0)
	var result int32

	*(*int32)(unsafe.Pointer(errorCode)) = 0

	// Synchronize with the reader thread.

	result = sWaitForRead(tls, infoPtr, func() int32 {
		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<1) != 0 {
			return 0
		}
		return 1
	}())

	// If an error occurred, return immediately.

	if result == -1 {
		*(*int32)(unsafe.Pointer(errorCode)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
		return -1
	}

	if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<3) != 0 {
		// Data is stored in the buffer.

		if bufSize < (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FbytesRead-(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Foffset {
			libc.Xmemcpy(tls, buf, infoPtr+140+uintptr((*ConsoleInfo)(unsafe.Pointer(infoPtr)).Foffset), uint64(bufSize))
			bytesRead = DWORD(bufSize)
			*(*int32)(unsafe.Pointer(infoPtr + 136)) += bufSize
		} else {
			libc.Xmemcpy(tls, buf, infoPtr+140+uintptr((*ConsoleInfo)(unsafe.Pointer(infoPtr)).Foffset), uint64(bufSize))
			bytesRead = DWORD((*ConsoleInfo)(unsafe.Pointer(infoPtr)).FbytesRead - (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Foffset)

			// Reset the buffer.

			*(*int32)(unsafe.Pointer(infoPtr + 128)) &= libc.CplInt32(int32(1) << 3)
			(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Foffset = 0
		}

		return int32(bytesRead)
	}

	// Attempt to read bufSize bytes. The read will return immediately if
	// there is any data available. Otherwise it will block until at least one
	// byte is available or an EOF occurs.

	if sReadConsoleBytes(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fhandle, buf, DWORD(bufSize),
		bp) == TRUE {
		// TODO: This potentially writes beyond the limits specified
		// by the caller.  In practice this is harmless, since all writes
		// are into ChannelBuffers, and those have padding, but still
		// ought to remove this, unless some Windows wizard can give
		// a reason not to.
		*(*int8)(unsafe.Pointer(buf + uintptr(*(*DWORD)(unsafe.Pointer(bp /* count */))))) = int8(0)
		return int32(*(*DWORD)(unsafe.Pointer(bp /* count */)))
	}

	return -1
}

//----------------------------------------------------------------------
//
// ConsoleOutputProc --
//
//	Writes the given output on the IO channel. Returns count of how many
//	characters were actually written, and an error indication.
//
// Results:
//	A count of how many characters were written is returned and an error
//	indication is returned in an output argument.
//
// Side effects:
//	Writes output on the actual channel.
//
//----------------------------------------------------------------------

func sConsoleOutputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, toWrite int32, errorCode uintptr) int32 { /* tclWinConsole.c:734:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var infoPtr uintptr
	var threadInfo uintptr
	// var bytesWritten DWORD at bp, 4

	var timeout DWORD
	infoPtr = instanceData
	threadInfo = infoPtr + 56

	*(*int32)(unsafe.Pointer(errorCode)) = 0

	// avoid blocking if pipe-thread exited
	if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<1) != 0 || !(sTclPipeThreadIsAlive1(tls, threadInfo+16) != 0) ||
		XTclInExit(tls) != 0 || XTclInThreadExit(tls) != 0 {
		timeout = uint32(0)
	} else {
		timeout = INFINITE
	}
	if !(libc.XWaitForSingleObject(tls, (*ConsoleThreadInfo)(unsafe.Pointer(threadInfo)).FreadyEvent, timeout) == DWORD(258)) {
		goto __1
	}
	// The writer thread is blocked waiting for a write to complete and
	// the channel is in non-blocking mode.

	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EWOULDBLOCK
	goto error
__1:
	;

	// Check for a background error on the last write.

	if !((*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteError != 0) {
		goto __2
	}
	XTclWinConvertError(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteError)
	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteError = DWORD(0)
	goto error
__2:
	;

	if !((*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<1) != 0) {
		goto __3
	}
	// The console is non-blocking, so copy the data into the output
	// buffer and restart the writer thread.

	if !(toWrite > (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteBufLen) {
		goto __5
	}
	// Reallocate the buffer to be large enough to hold the data.

	if !((*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteBuf != 0) {
		goto __6
	}
	XTclpFree(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteBuf)
__6:
	;
	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteBufLen = toWrite
	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteBuf = XTcl_Alloc(tls, uint32(toWrite))
__5:
	;
	libc.Xmemcpy(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteBuf, buf, uint64(toWrite))
	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FtoWrite = toWrite
	libc.XResetEvent(tls, (*ConsoleThreadInfo)(unsafe.Pointer(threadInfo)).FreadyEvent)
	sTclPipeThreadSignal1(tls, threadInfo+16)
	*(*DWORD)(unsafe.Pointer(bp /* bytesWritten */)) = DWORD(toWrite)
	goto __4
__3:
	// In the blocking case, just try to write the buffer directly. This
	// avoids an unnecessary copy.

	if !(sWriteConsoleBytes(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fhandle, buf, DWORD(toWrite),
		bp) == FALSE) {
		goto __7
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	goto error
__7:
	;
__4:
	;
	return int32(*(*DWORD)(unsafe.Pointer(bp /* bytesWritten */)))

error:
	*(*int32)(unsafe.Pointer(errorCode)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
	return -1
}

//----------------------------------------------------------------------
//
// ConsoleEventProc --
//
//	This function is invoked by Tcl_ServiceEvent when a file event reaches
//	the front of the event queue. This procedure invokes Tcl_NotifyChannel
//	on the console.
//
// Results:
//	Returns 1 if the event was handled, meaning it should be removed from
//	the queue. Returns 0 if the event was not handled, meaning it should
//	stay on the queue. The only time the event isn't handled is if the
//	TCL_FILE_EVENTS flag bit isn't set.
//
// Side effects:
//	Whatever the notifier callback does.
//
//----------------------------------------------------------------------

func sConsoleEventProc(tls *libc.TLS, evPtr uintptr, flags int32) int32 { /* tclWinConsole.c:832:1: */
	var consoleEvPtr uintptr = evPtr
	var infoPtr uintptr
	var mask int32
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey12)), int32(unsafe.Sizeof(ThreadSpecificData13{})))

	if !(flags&(int32(1)<<3) != 0) {
		return 0
	}

	// Search through the list of watched consoles for the one whose handle
	// matches the event. We do this rather than simply dereferencing the
	// handle in the event so that consoles can be deleted while the event is
	// in the queue.

	for infoPtr = (*ThreadSpecificData13)(unsafe.Pointer(tsdPtr)).FfirstConsolePtr; infoPtr != uintptr(0); infoPtr = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*ConsoleEvent)(unsafe.Pointer(consoleEvPtr)).FinfoPtr == infoPtr {
			*(*int32)(unsafe.Pointer(infoPtr + 40)) &= libc.CplInt32(int32(1) << 0)
			break
		}
	}

	// Remove stale events.

	if !(infoPtr != 0) {
		return 1
	}

	// Check to see if the console is readable. Note that we can't tell if a
	// console is writable, so we always report it as being writable unless we
	// have detected EOF.

	mask = 0
	if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<2) != 0 {
		if libc.XWaitForSingleObject(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fwriter.FreadyEvent,
			uint32(0)) != DWORD(258) {
			mask = int32(1) << 2
		}
	}

	if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 {
		if sWaitForRead(tls, infoPtr, 0) >= 0 {
			if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<2) != 0 {
				mask = int32(1) << 1
			} else {
				mask = mask | int32(1)<<1
			}
		}
	}

	// Inform the channel of the events.

	XTcl_NotifyChannel(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fchannel, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask&mask)
	return 1
}

//----------------------------------------------------------------------
//
// ConsoleWatchProc --
//
//	Called by the notifier to set up to watch for events on this channel.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sConsoleWatchProc(tls *libc.TLS, instanceData ClientData, mask int32) { /* tclWinConsole.c:918:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var nextPtrPtr uintptr
	var ptr uintptr
	var infoPtr uintptr = instanceData
	var oldMask int32 = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey12)), int32(unsafe.Sizeof(ThreadSpecificData13{})))

	// Since most of the work is handled by the background threads, we just
	// need to update the watchMask and then force the notifier to poll once.

	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask = mask & (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FvalidMask
	if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwatchMask != 0 {
		*(*Tcl_Time)(unsafe.Pointer(bp /* blockTime */)) = Tcl_Time{}

		if !(oldMask != 0) {
			(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FnextPtr = (*ThreadSpecificData13)(unsafe.Pointer(tsdPtr)).FfirstConsolePtr
			(*ThreadSpecificData13)(unsafe.Pointer(tsdPtr)).FfirstConsolePtr = infoPtr
		}
		XTcl_SetMaxBlockTime(tls, bp)
	} else if oldMask != 0 {
		// Remove the console from the list of watched consoles.

		nextPtrPtr = tsdPtr
		ptr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
	__1:
		if !(ptr != uintptr(0)) {
			goto __3
		}
		{
			if infoPtr == ptr {
				*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*ConsoleInfo)(unsafe.Pointer(ptr)).FnextPtr
				goto __3
			}

		}
		goto __2
	__2:
		nextPtrPtr = ptr + 16
		ptr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
		goto __1
		goto __3
	__3:
	}
}

//----------------------------------------------------------------------
//
// ConsoleGetHandleProc --
//
//	Called from Tcl_GetChannelHandle to retrieve OS handles from inside a
//	command consoleline based channel.
//
// Results:
//	Returns TCL_OK with the fd in handlePtr, or TCL_ERROR if there is no
//	handle for the specified direction.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sConsoleGetHandleProc(tls *libc.TLS, instanceData ClientData, direction int32, handlePtr uintptr) int32 { /* tclWinConsole.c:978:1: */
	var infoPtr uintptr = instanceData

	*(*ClientData)(unsafe.Pointer(handlePtr)) = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fhandle
	return TCL_OK
}

//----------------------------------------------------------------------
//
// WaitForRead --
//
//	Wait until some data is available, the console is at EOF or the reader
//	thread is blocked waiting for data (if the channel is in non-blocking
//	mode).
//
// Results:
//	Returns 1 if console is readable. Returns 0 if there is no data on the
//	console, but there is buffered data. Returns -1 if an error occurred.
//	If an error occurred, the threads may not be synchronized.
//
// Side effects:
//	Updates the shared state flags. If no error occurred, the reader
//	thread is blocked waiting for a signal from the main thread.
//
//----------------------------------------------------------------------

func sWaitForRead(tls *libc.TLS, infoPtr uintptr, blocking int32) int32 { /* tclWinConsole.c:1011:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var timeout DWORD
	// var count DWORD at bp+20, 4

	var handle uintptr = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fhandle
	var threadInfo uintptr = infoPtr + 80
	// var input INPUT_RECORD at bp, 20

	for 1 != 0 {
		// Synchronize with the reader thread.

		// avoid blocking if pipe-thread exited
		if !(blocking != 0) || !(sTclPipeThreadIsAlive1(tls, threadInfo+16) != 0) ||
			XTclInExit(tls) != 0 || XTclInThreadExit(tls) != 0 {
			timeout = uint32(0)
		} else {
			timeout = INFINITE
		}
		if libc.XWaitForSingleObject(tls, (*ConsoleThreadInfo)(unsafe.Pointer(threadInfo)).FreadyEvent, timeout) == DWORD(258) {
			// The reader thread is blocked waiting for data and the channel
			// is in non-blocking mode.

			*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EWOULDBLOCK
			return -1
		}

		// At this point, the two threads are synchronized, so it is safe to
		// access shared state.

		// If the console has hit EOF, it is always readable.

		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<2) != 0 {
			return 1
		}

		if libc.XPeekConsoleInputW(tls, handle, bp, uint32(1), bp+20) == FALSE {
			// Check to see if the peek failed because of EOF.

			XTclWinConvertError(tls, libc.XGetLastError(tls))

			if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == -1 {
				*(*int32)(unsafe.Pointer(infoPtr + 128)) |= int32(1) << 2
				return 1
			}

			// Ignore errors if there is data in the buffer.

			if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<3) != 0 {
				return 0
			} else {
				return -1
			}
		}

		// If there is data in the buffer, the console must be readable (since
		// it is a line-oriented device).

		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<3) != 0 {
			return 1
		}

		// There wasn't any data available, so reset the thread and try again.

		libc.XResetEvent(tls, (*ConsoleThreadInfo)(unsafe.Pointer(threadInfo)).FreadyEvent)
		sTclPipeThreadSignal1(tls, threadInfo+16)
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// ConsoleReaderThread --
//
//	This function runs in a separate thread and waits for input to become
//	available on a console.
//
// Results:
//	None.
//
// Side effects:
//	Signals the main thread when input become available. May cause the
//	main thread to wake up by posting a message. May one line from the
//	console for each wait operation.
//
//----------------------------------------------------------------------

func sConsoleReaderThread(tls *libc.TLS, arg LPVOID) DWORD { /* tclWinConsole.c:1113:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)) = arg
	var infoPtr uintptr = uintptr(0) // access info only after success init/wait
	var handle uintptr = uintptr(0)
	var threadInfo uintptr = uintptr(0)
	var done int32 = 0

	for !(done != 0) {
		// Wait for the main thread to signal before attempting to read.

		if !(XTclPipeThreadWaitForSignal(tls, bp) != 0) {
			// exit
			break
		}
		if !(infoPtr != 0) {
			infoPtr = (*TclPipeThreadInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)))).FclientData
			handle = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fhandle
			threadInfo = infoPtr + 80
		}

		// Look for data on the console, but first ignore any events that are
		// not KEY_EVENTs.

		if sReadConsoleBytes(tls, handle, infoPtr+140, uint32(8*1024),
			infoPtr+132) != FALSE {
			// Data was stored in the buffer.

			*(*int32)(unsafe.Pointer(infoPtr + 128)) |= int32(1) << 3
		} else {
			var err DWORD = libc.XGetLastError(tls)

			if err == libc.Uint32(libc.Uint32FromInt32(-1)) {
				(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FreadFlags = int32(1) << 2
			}
			done = 1
		}

		// Signal the main thread by signalling the readable event and then
		// waking up the notifier thread.

		libc.XSetEvent(tls, (*ConsoleThreadInfo)(unsafe.Pointer(threadInfo)).FreadyEvent)

		// Alert the foreground thread. Note that we need to treat this like a
		// critical section so the foreground thread does not terminate this
		// thread while we are holding a mutex in the notifier code.

		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FthreadId != uintptr(0) {
			// TIP #218. When in flight ignore the event, no one will receive
			// it anyway.

			XTcl_ThreadAlert(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FthreadId)
		}

	}

	// Worker exit, so inform the main thread or free TI-structure (if owned)
	XTclPipeThreadExit(tls, bp)

	return DWORD(0)
}

//
// ----------------------------------------------------------------------
//
//  ConsoleWriterThread --
//
// 	This function runs in a separate thread and writes data onto a
// 	console.
//
//  Results:
// 	Always returns 0.
//
//  Side effects:
//
//  *	Signals the main thread when an output operation is completed. May
//  *	cause the main thread to wake up by posting a message.
//  *
//  *----------------------------------------------------------------------
//

func sConsoleWriterThread(tls *libc.TLS, arg LPVOID) DWORD { /* tclWinConsole.c:1210:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)) = arg
	var infoPtr uintptr = uintptr(0) // access info only after success init/wait
	var handle uintptr = uintptr(0)
	var threadInfo uintptr = uintptr(0)
	// var count DWORD at bp+8, 4

	var toWrite DWORD
	var buf uintptr
	var done int32 = 0

	for !(done != 0) {
		// Wait for the main thread to signal before attempting to write.
		if !(XTclPipeThreadWaitForSignal(tls, bp) != 0) {
			// exit
			break
		}
		if !(infoPtr != 0) {
			infoPtr = (*TclPipeThreadInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)))).FclientData
			handle = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fhandle
			threadInfo = infoPtr + 56
		}

		buf = (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteBuf
		toWrite = DWORD((*ConsoleInfo)(unsafe.Pointer(infoPtr)).FtoWrite)

		// Loop until all of the bytes are written or an error occurs.

		for toWrite > DWORD(0) {
			if sWriteConsoleBytes(tls, handle, buf, toWrite,
				bp+8) == FALSE {
				(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FwriteError = libc.XGetLastError(tls)
				done = 1
				break
			}
			toWrite = toWrite - *(*DWORD)(unsafe.Pointer(bp + 8))
			buf += uintptr(*(*DWORD)(unsafe.Pointer(bp + 8 /* count */)))
		}

		// Signal the main thread by signalling the writable event and then
		// waking up the notifier thread.

		libc.XSetEvent(tls, (*ConsoleThreadInfo)(unsafe.Pointer(threadInfo)).FreadyEvent)

		// Alert the foreground thread. Note that we need to treat this like a
		// critical section so the foreground thread does not terminate this
		// thread while we are holding a mutex in the notifier code.

		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FthreadId != uintptr(0) {
			// TIP #218. When in flight ignore the event, no one will receive
			// it anyway.

			XTcl_ThreadAlert(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).FthreadId)
		}

	}

	// Worker exit, so inform the main thread or free TI-structure (if owned)
	XTclPipeThreadExit(tls, bp)

	return DWORD(0)
}

//----------------------------------------------------------------------
//
// TclWinOpenConsoleChannel --
//
//	Constructs a Console channel for the specified standard OS handle.
//	This is a helper function to break up the construction of channels
//	into File, Console, or Serial.
//
// Results:
//	Returns the new channel, or NULL.
//
// Side effects:
//	May open the channel.
//
//----------------------------------------------------------------------

func XTclWinOpenConsoleChannel(tls *libc.TLS, handle HANDLE, channelName uintptr, permissions int32) Tcl_Channel { /* tclWinConsole.c:1303:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var encoding [28]int8 at bp+16, 28

	var infoPtr uintptr
	// var modes DWORD at bp+44, 4

	sConsoleInit(tls)

	// See if a channel with this handle already exists.

	infoPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ConsoleInfo{})))
	libc.Xmemset(tls, infoPtr, 0, uint64(unsafe.Sizeof(ConsoleInfo{})))

	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FvalidMask = permissions
	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fhandle = handle
	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fchannel = uintptr(0)

	libc.XwsprintfA(tls, bp+16, ts+67566, libc.VaList(bp, libc.XGetConsoleCP(tls)))

	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FthreadId = XTcl_GetCurrentThread(tls)

	// Use the pointer for the name of the result channel. This keeps the
	// channel names unique, since some may share handles (stdin/stdout/stderr
	// for instance).

	libc.Xsprintf(tls, channelName, ts+67509, libc.VaList(bp+8, Size_t(infoPtr)))

	(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fchannel = XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&consoleChannelType)), channelName,
		infoPtr, permissions)

	if permissions&(int32(1)<<1) != 0 {
		// Make sure the console input buffer is ready for only character
		// input notifications and the buffer is set for line buffering. IOW,
		// we only want to catch when complete lines are ready for reading.

		libc.XGetConsoleMode(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+44)
		*(*DWORD)(unsafe.Pointer(bp + 44 /* modes */)) &= libc.Uint32FromInt32(libc.CplInt32(ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT))
		*(*DWORD)(unsafe.Pointer(bp + 44 /* modes */)) |= DWORD(ENABLE_LINE_INPUT)
		libc.XSetConsoleMode(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fhandle, *(*DWORD)(unsafe.Pointer(bp + 44 /* modes */)))

		(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Freader.FreadyEvent = libc.XCreateEventW(tls, uintptr(0), TRUE, TRUE, uintptr(0))
		(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Freader.Fthread = libc.XCreateThread(tls, uintptr(0), uint64(256), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPVOID) DWORD }{sConsoleReaderThread})),
			XTclPipeThreadCreateTI(tls, infoPtr+80+16, infoPtr,
				(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Freader.FreadyEvent), uint32(0), uintptr(0))
		libc.XSetThreadPriority(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Freader.Fthread, THREAD_BASE_PRIORITY_MAX)
	}

	if permissions&(int32(1)<<2) != 0 {

		(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fwriter.FreadyEvent = libc.XCreateEventW(tls, uintptr(0), TRUE, TRUE, uintptr(0))
		(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fwriter.Fthread = libc.XCreateThread(tls, uintptr(0), uint64(256), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPVOID) DWORD }{sConsoleWriterThread})),
			XTclPipeThreadCreateTI(tls, infoPtr+56+16, infoPtr,
				(*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fwriter.FreadyEvent), uint32(0), uintptr(0))
		libc.XSetThreadPriority(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fwriter.Fthread, THREAD_BASE_PRIORITY_MAX)
	}

	// Files have default translation of AUTO and ^Z eof char, which means
	// that a ^Z will be accepted as EOF when reading.

	XTcl_SetChannelOption(tls, uintptr(0), (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fchannel, ts+34223, ts+34236)
	XTcl_SetChannelOption(tls, uintptr(0), (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fchannel, ts+34214, ts+38537)
	XTcl_SetChannelOption(tls, uintptr(0), (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fchannel, ts+16536, ts+26559)
	return (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fchannel
}

//----------------------------------------------------------------------
//
// ConsoleThreadActionProc --
//
//	Insert or remove any thread local refs to this channel.
//
// Results:
//	None.
//
// Side effects:
//	Changes thread local list of valid channels.
//
//----------------------------------------------------------------------

func sConsoleThreadActionProc(tls *libc.TLS, instanceData ClientData, action int32) { /* tclWinConsole.c:1396:1: */
	var infoPtr uintptr = instanceData

	// We do not access firstConsolePtr in the thread structures. This is not
	// for all serials managed by the thread, but only those we are watching.
	// Removal of the filevent handlers before transfer thus takes care of
	// this structure.

	if action == 0 {
		// We can't copy the thread information from the channel when the
		// channel is created. At this time the channel back pointer has not
		// been set yet. However in that case the threadId has already been
		// set by TclpCreateCommandChannel itself, so the structure is still
		// good.

		sConsoleInit(tls)
		if (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fchannel != uintptr(0) {
			(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FthreadId = XTcl_GetChannelThread(tls, (*ConsoleInfo)(unsafe.Pointer(infoPtr)).Fchannel)
		}
	} else {
		(*ConsoleInfo)(unsafe.Pointer(infoPtr)).FthreadId = uintptr(0)
	}

}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type DDEACK = struct {
	F__ccgo_pad1    [0]uint16
	FbAppReturnCode uint16 /* unsigned short bAppReturnCode: 8, unsigned short reserved: 6, unsigned short fBusy: 1, unsigned short fAck: 1 */
} /* dde.h:29:5 */

type DDEADVISE = struct {
	Freserved    uint16 /* unsigned short reserved: 14, unsigned short fDeferUpd: 1, unsigned short fAckReq: 1 */
	F__ccgo_pad1 [2]byte
	FcfFormat    int16
} /* dde.h:34:5 */

type DDEDATA = struct {
	Funused      uint16 /* unsigned short unused: 12, unsigned short fResponse: 1, unsigned short fRelease: 1, unsigned short reserved: 1, unsigned short fAckReq: 1 */
	F__ccgo_pad1 [2]byte
	FcfFormat    int16
	FValue       [1]BYTE
	F__ccgo_pad2 [1]byte
} /* dde.h:40:5 */

type DDEPOKE = struct {
	Funused      uint16 /* unsigned short unused: 13, unsigned short fRelease: 1, unsigned short fReserved: 2 */
	F__ccgo_pad1 [2]byte
	FcfFormat    int16
	FValue       [1]BYTE
	F__ccgo_pad2 [1]byte
} /* dde.h:47:5 */

type DDELN = struct {
	Funused      uint16 /* unsigned short unused: 13, unsigned short fRelease: 1, unsigned short fDeferUpd: 1, unsigned short fAckReq: 1 */
	F__ccgo_pad1 [2]byte
	FcfFormat    int16
} /* dde.h:52:5 */

type DDEUP = struct {
	Funused      uint16 /* unsigned short unused: 12, unsigned short fAck: 1, unsigned short fRelease: 1, unsigned short fReserved: 1, unsigned short fAckReq: 1 */
	F__ccgo_pad1 [2]byte
	FcfFormat    int16
	Frgb         [1]BYTE
	F__ccgo_pad2 [1]byte
} /* dde.h:58:5 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type HCONVLIST__ = struct{ Funused int32 } /* ddeml.h:15:3 */

type HCONVLIST = uintptr               /* ddeml.h:15:3 */
type HCONV__ = struct{ Funused int32 } /* ddeml.h:16:3 */

type HCONV = uintptr                 /* ddeml.h:16:3 */
type HSZ__ = struct{ Funused int32 } /* ddeml.h:17:3 */

type HSZ = uintptr                        /* ddeml.h:17:3 */
type HDDEDATA__ = struct{ Funused int32 } /* ddeml.h:18:3 */

type HDDEDATA = uintptr /* ddeml.h:18:3 */

type TagHSZPAIR = struct {
	FhszSvc   HSZ
	FhszTopic HSZ
} /* ddeml.h:21:11 */

type HSZPAIR = TagHSZPAIR /* ddeml.h:24:5 */
type PHSZPAIR = uintptr   /* ddeml.h:24:14 */

type TagCONVCONTEXT = struct {
	Fcb         UINT
	FwFlags     UINT
	FwCountryID UINT
	FiCodePage  int32
	FdwLangID   DWORD
	FdwSecurity DWORD
	Fqos        SECURITY_QUALITY_OF_SERVICE
} /* ddeml.h:26:11 */

type CONVCONTEXT = TagCONVCONTEXT /* ddeml.h:34:5 */
type PCONVCONTEXT = uintptr       /* ddeml.h:34:18 */

type TagCONVINFO = struct {
	Fcb            DWORD
	F__ccgo_pad1   [4]byte
	FhUser         DWORD_PTR
	FhConvPartner  HCONV
	FhszSvcPartner HSZ
	FhszServiceReq HSZ
	FhszTopic      HSZ
	FhszItem       HSZ
	FwFmt          UINT
	FwType         UINT
	FwStatus       UINT
	FwConvst       UINT
	FwLastError    UINT
	F__ccgo_pad2   [4]byte
	FhConvList     HCONVLIST
	FConvCtxt      CONVCONTEXT
	F__ccgo_pad3   [4]byte
	Fhwnd          HWND
	FhwndPartner   HWND
} /* ddeml.h:36:11 */

type CONVINFO = TagCONVINFO /* ddeml.h:53:5 */
type PCONVINFO = uintptr    /* ddeml.h:53:15 */
type PFNCALLBACK = uintptr  /* ddeml.h:155:20 */

type TagDDEML_MSG_HOOK_DATA = struct {
	FuiLo        UINT_PTR
	FuiHi        UINT_PTR
	FcbData      DWORD
	FData        [8]DWORD
	F__ccgo_pad1 [4]byte
} /* ddeml.h:256:11 */

type DDEML_MSG_HOOK_DATA = TagDDEML_MSG_HOOK_DATA /* ddeml.h:261:5 */
type PDDEML_MSG_HOOK_DATA = uintptr               /* ddeml.h:261:25 */

type TagMONMSGSTRUCT = struct {
	Fcb          UINT
	F__ccgo_pad1 [4]byte
	FhwndTo      HWND
	FdwTime      DWORD
	F__ccgo_pad2 [4]byte
	FhTask       HANDLE
	FwMsg        UINT
	F__ccgo_pad3 [4]byte
	FwParam      WPARAM
	FlParam      LPARAM
	Fdmhd        DDEML_MSG_HOOK_DATA
} /* ddeml.h:263:11 */

type MONMSGSTRUCT = TagMONMSGSTRUCT /* ddeml.h:272:5 */
type PMONMSGSTRUCT = uintptr        /* ddeml.h:272:18 */

type TagMONCBSTRUCT = struct {
	Fcb          UINT
	FdwTime      DWORD
	FhTask       HANDLE
	FdwRet       DWORD
	FwType       UINT
	FwFmt        UINT
	F__ccgo_pad1 [4]byte
	FhConv       HCONV
	Fhsz1        HSZ
	Fhsz2        HSZ
	FhData       HDDEDATA
	FdwData1     ULONG_PTR
	FdwData2     ULONG_PTR
	Fcc          CONVCONTEXT
	FcbData      DWORD
	FData        [8]DWORD
} /* ddeml.h:274:11 */

type MONCBSTRUCT = TagMONCBSTRUCT /* ddeml.h:290:5 */
type PMONCBSTRUCT = uintptr       /* ddeml.h:290:17 */

type TagMONHSZSTRUCTA = struct {
	Fcb          UINT
	FfsAction    WINBOOL
	FdwTime      DWORD
	F__ccgo_pad1 [4]byte
	Fhsz         HSZ
	FhTask       HANDLE
	Fstr         [1]CHAR
	F__ccgo_pad2 [7]byte
} /* ddeml.h:292:11 */

type MONHSZSTRUCTA = TagMONHSZSTRUCTA /* ddeml.h:299:5 */
type PMONHSZSTRUCTA = uintptr         /* ddeml.h:299:19 */

type TagMONHSZSTRUCTW = struct {
	Fcb          UINT
	FfsAction    WINBOOL
	FdwTime      DWORD
	F__ccgo_pad1 [4]byte
	Fhsz         HSZ
	FhTask       HANDLE
	Fstr         [1]WCHAR
	F__ccgo_pad2 [6]byte
} /* ddeml.h:301:11 */

type MONHSZSTRUCTW = TagMONHSZSTRUCTW /* ddeml.h:308:5 */
type PMONHSZSTRUCTW = uintptr         /* ddeml.h:308:19 */

type MONHSZSTRUCT = MONHSZSTRUCTA   /* ddeml.h:310:3 */
type PMONHSZSTRUCT = PMONHSZSTRUCTA /* ddeml.h:311:3 */

type TagMONERRSTRUCT = struct {
	Fcb          UINT
	FwLastError  UINT
	FdwTime      DWORD
	F__ccgo_pad1 [4]byte
	FhTask       HANDLE
} /* ddeml.h:318:11 */

type MONERRSTRUCT = TagMONERRSTRUCT /* ddeml.h:323:5 */
type PMONERRSTRUCT = uintptr        /* ddeml.h:323:18 */

type TagMONLINKSTRUCT = struct {
	Fcb           UINT
	FdwTime       DWORD
	FhTask        HANDLE
	FfEstablished WINBOOL
	FfNoData      WINBOOL
	FhszSvc       HSZ
	FhszTopic     HSZ
	FhszItem      HSZ
	FwFmt         UINT
	FfServer      WINBOOL
	FhConvServer  HCONV
	FhConvClient  HCONV
} /* ddeml.h:325:11 */

type MONLINKSTRUCT = TagMONLINKSTRUCT /* ddeml.h:338:5 */
type PMONLINKSTRUCT = uintptr         /* ddeml.h:338:19 */

type TagMONCONVSTRUCT = struct {
	Fcb          UINT
	FfConnect    WINBOOL
	FdwTime      DWORD
	F__ccgo_pad1 [4]byte
	FhTask       HANDLE
	FhszSvc      HSZ
	FhszTopic    HSZ
	FhConvClient HCONV
	FhConvServer HCONV
} /* ddeml.h:340:11 */

type MONCONVSTRUCT = TagMONCONVSTRUCT /* ddeml.h:349:5 */
type PMONCONVSTRUCT = uintptr         /* ddeml.h:349:19 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// The following structure is used to keep track of the interpreters
// registered by this process.

type RegisteredInterp1 = struct {
	FnextPtr    uintptr
	Fname       uintptr
	FhandlerPtr uintptr
	Finterp     uintptr
} /* tclWinDde.c:33:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// The following structure is used to keep track of the interpreters
// registered by this process.

type RegisteredInterp = RegisteredInterp1 /* tclWinDde.c:40:3 */

// Used to keep track of conversations.

type Conversation1 = struct {
	FnextPtr          uintptr
	FriPtr            uintptr
	FhConv            HCONV
	FreturnPackagePtr uintptr
} /* tclWinDde.c:46:9 */

// Used to keep track of conversations.

type Conversation = Conversation1 /* tclWinDde.c:52:3 */

type DdeEnumServices = struct {
	Finterp  uintptr
	Fresult  int32
	Fservice ATOM
	Ftopic   ATOM
	Fhwnd    HWND
} /* tclWinDde.c:60:3 */

type ThreadSpecificData14 = struct {
	FcurrentConversations uintptr
	FinterpListPtr        uintptr
}                               /* tclWinDde.c:69:3 */
var dataKey13 Tcl_ThreadDataKey /* tclWinDde.c:70:26: */

// The following variables cannot be placed in thread-local storage. The Mutex
// ddeMutex guards access to the ddeInstance.

var ddeServiceGlobal HSZ = uintptr(0) /* tclWinDde.c:77:12 */
var ddeInstance DWORD                 /* tclWinDde.c:78:14: */ // The application instance handle given to us
// by DdeInitialize.
var ddeIsServer int32 = 0 /* tclWinDde.c:80:12 */

func getByteArrayFromObj(tls *libc.TLS, objPtr uintptr, lengthPtr uintptr) uintptr { /* tclWinDde.c:130:22: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var length int32 at bp, 4

	var result uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetByteArrayFromObj})).f(tls, objPtr, bp /* &length */)
	// 32-bit or without TIP #494
	*(*Size_t)(unsafe.Pointer(lengthPtr)) = Size_t(uint32(*(*int32)(unsafe.Pointer(bp /* length */))))
	return result
}

//----------------------------------------------------------------------
//
// Dde_Init --
//
//	This function initializes the dde command.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XDde_Init(tls *libc.TLS, interp uintptr) int32 { /* tclWinDde.c:175:1: */
	if !(XTcl_InitStubs(tls, interp, ts+67571, 0) != 0) {
		return TCL_ERROR
	}

	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Command
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_CreateObjCommand})).f(tls, interp, ts+67575 /* "dde" */, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	}{sDdeObjCmd})), uintptr(0), uintptr(0))
	(*struct {
		f func(*libc.TLS, uintptr, ClientData)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_CreateExitHandler})).f(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sDdeExitProc})), uintptr(0))
	return (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_PkgProvideEx})).f(tls, interp, ts+67575 /* "dde" */, ts+67579 /* "1.4.4" */, uintptr(0))
}

//----------------------------------------------------------------------
//
// Dde_SafeInit --
//
//	This function initializes the dde command within a safe interp
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XDde_SafeInit(tls *libc.TLS, interp uintptr) int32 { /* tclWinDde.c:204:1: */
	var result int32 = XDde_Init(tls, interp)
	if result == TCL_OK {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_HideCommand})).f(tls, interp, ts+67575 /* "dde" */, ts+67575 /* "dde" */)
	}
	return result
}

//----------------------------------------------------------------------
//
// Initialize --
//
//	Initialize the global DDE instance.
//
// Results:
//	None.
//
// Side effects:
//	Registers the DDE server proc.
//
//----------------------------------------------------------------------

func sInitialize(tls *libc.TLS) { /* tclWinDde.c:231:1: */
	var nameFound int32 = 0
	var tsdPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetThreadData})).f(tls, uintptr(unsafe.Pointer(&dataKey13)), int32(unsafe.Sizeof(ThreadSpecificData14{})))

	// See if the application is already registered; if so, remove its current
	// name from the registry. The deletion of the command will take care of
	// disposing of this entry.

	if (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr != uintptr(0) {
		nameFound = 1
	}

	// Make sure that the DDE server is there. This is done only once, add an
	// exit handler tear it down.

	if ddeInstance == DWORD(0) {

		if ddeInstance == DWORD(0) {
			if libc.XDdeInitializeW(tls, uintptr(unsafe.Pointer(&ddeInstance)), *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, UINT, UINT, HCONV, HSZ, HSZ, HDDEDATA, DWORD, DWORD) HDDEDATA
			}{sDdeServerProc})),
				uint32(CBF_SKIP_REGISTRATIONS|CBF_SKIP_UNREGISTRATIONS|
					CBF_FAIL_POKES), uint32(0)) != UINT(DMLERR_NO_ERROR) {
				ddeInstance = DWORD(0)
			}
		}

	}
	if ddeServiceGlobal == uintptr(0) && nameFound != 0 {

		if ddeServiceGlobal == uintptr(0) && nameFound != 0 {
			ddeIsServer = 1
			(*struct {
				f func(*libc.TLS, uintptr, ClientData)
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_CreateExitHandler})).f(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sDdeExitProc})), uintptr(0))
			ddeServiceGlobal = libc.XDdeCreateStringHandleW(tls, ddeInstance,
				wtext+210, CP_WINUNICODE)
			libc.XDdeNameService(tls, ddeInstance, ddeServiceGlobal, uintptr(0), uint32(DNS_REGISTER))
		} else {
			ddeIsServer = 0
		}

	}
}

//----------------------------------------------------------------------
//
// DdeSetServerName --
//
//	This function is called to associate an ASCII name with a Dde server.
//	If the interpreter has already been named, the name replaces the old
//	one.
//
// Results:
//	The return value is the name actually given to the interp. This will
//	normally be the same as name, but if name was already in use for a Dde
//	Server then a name of the form "name #2" will be chosen, with a high
//	enough number to make the name unique.
//
// Side effects:
//	Registration info is saved, thereby allowing the "send" command to be
//	used later to invoke commands in the application. In addition, the
//	"send" command is created in the application's interpreter. The
//	registration will be removed automatically if the interpreter is
//	deleted or the "send" command is removed.
//
//----------------------------------------------------------------------

func sDdeSetServerName(tls *libc.TLS, interp uintptr, name uintptr, flags int32, handlerPtr uintptr) uintptr { /* tclWinDde.c:302:20: */
	bp := tls.Alloc(464)
	defer tls.Free(464)

	var suffix int32
	var offset int32
	var riPtr uintptr
	var prevPtr uintptr
	// var dString Tcl_DString at bp+8, 216

	var actualName uintptr
	var srvListPtr uintptr = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 232 /* srvPtrPtr */)) = uintptr(0)
	var n int32
	*(*int32)(unsafe.Pointer(bp + 224 /* srvCount */)) = 0
	var lastSuffix int32
	var r int32 = TCL_OK
	var tsdPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetThreadData})).f(tls, uintptr(unsafe.Pointer(&dataKey13)), int32(unsafe.Sizeof(ThreadSpecificData14{})))

	// See if the application is already registered; if so, remove its current
	// name from the registry. The deletion of the command will take care of
	// disposing of this entry.

	riPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr
	prevPtr = uintptr(0)
__1:
	if !(riPtr != uintptr(0)) {
		goto __3
	}
	{
		if (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp == interp {
			if name != uintptr(0) {
				if prevPtr == uintptr(0) {
					(*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr = (*RegisteredInterp)(unsafe.Pointer((*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr)).FnextPtr
				} else {
					(*RegisteredInterp)(unsafe.Pointer(prevPtr)).FnextPtr = (*RegisteredInterp)(unsafe.Pointer(riPtr)).FnextPtr
				}
				goto __3
			} else {
				// The name was NULL, so the caller is asking for the name of
				// the current interp.

				return (*RegisteredInterp)(unsafe.Pointer(riPtr)).Fname
			}
		}

	}
	goto __2
__2:
	prevPtr = riPtr
	riPtr = (*RegisteredInterp)(unsafe.Pointer(riPtr)).FnextPtr
	goto __1
	goto __3
__3:
	;

	if name == uintptr(0) {
		// The name was NULL, so the caller is asking for the name of the
		// current interp, but it doesn't have a name.

		return wtext + 90
	}

	// Get the list of currently registered Tcl interpreters by calling the
	// internal implementation of the 'dde services' command.

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+8 /* &dString */)
	actualName = name

	if !(flags&DDE_FLAG_FORCE != 0) {
		r = sDdeGetServicesList(tls, interp, wtext+210, uintptr(0))
		if r == TCL_OK {
			srvListPtr = (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetObjResult})).f(tls, interp)
		}
		if r == TCL_OK {
			r = (*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjGetElements})).f(tls, interp, srvListPtr, bp+224, /* &srvCount */
				bp+232 /* &srvPtrPtr */)
		}
		if r != TCL_OK {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+8 /* &dString */)
			libc.XOutputDebugStringW(tls, (*struct {
				f func(*libc.TLS, uintptr, int32, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetObjResult})).f(tls, interp)), -1, bp+8 /* &dString */))
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+8 /* &dString */)
			return uintptr(0)
		}

		// Pick a name to use for the application. Use "name" if it's not
		// already in use. Otherwise add a suffix such as " #2", trying larger
		// and larger numbers until we eventually find one that is unique.

		offset = libc.AssignInt32(&lastSuffix, 0)
		suffix = 1

		for suffix != lastSuffix {
			lastSuffix = suffix
			if suffix > 1 {
				if suffix == 2 {
					(*struct {
						f func(*libc.TLS, uintptr, uintptr, int32) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringAppend})).f(tls, bp+8 /* &dString */, name, int32(libc.Xwcslen(tls, name)*Size_t(unsafe.Sizeof(WCHAR(0)))))
					(*struct {
						f func(*libc.TLS, uintptr, uintptr, int32) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringAppend})).f(tls, bp+8 /* &dString */, wtext+226, int32(uint64(2)*uint64(unsafe.Sizeof(WCHAR(0)))))
					offset = (*Tcl_DString)(unsafe.Pointer(bp + 8)).Flength
					(*struct {
						f func(*libc.TLS, uintptr, int32)
					})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringSetLength})).f(tls, bp+8 /* &dString */, int32(uint64(offset)+uint64(unsafe.Sizeof(WCHAR(0)))*uint64(TCL_INTEGER_SPACE)))
					actualName = (*Tcl_DString)(unsafe.Pointer(bp + 8)).Fstring
				}
				libc.X_snwprintf(tls, (*Tcl_DString)(unsafe.Pointer(bp+8)).Fstring+uintptr(offset),
					uint64(TCL_INTEGER_SPACE), wtext+232, libc.VaList(bp, suffix))
			}

			// See if the name is already in use, if so increment suffix.

			for n = 0; n < *(*int32)(unsafe.Pointer(bp + 224 /* srvCount */)); n++ {
				// var namePtr uintptr at bp+240, 8

				// var ds Tcl_DString at bp+248, 216

				(*struct {
					f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjIndex})).f(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* srvPtrPtr */)) + uintptr(n)*8)), 1, bp+240 /* &namePtr */)
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+248 /* &ds */)
				(*struct {
					f func(*libc.TLS, uintptr, int32, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, (*struct {
					f func(*libc.TLS, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 240 /* namePtr */))), -1, bp+248 /* &ds */)
				if libc.Xwcscmp(tls, actualName, (*Tcl_DString)(unsafe.Pointer(bp+248)).Fstring) == 0 {
					suffix++
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+248 /* &ds */)
					break
				}
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+248 /* &ds */)
			}
		}
	}

	// We have found a unique name. Now add it to the registry.

	riPtr = (*struct {
		f func(*libc.TLS, uint32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Alloc})).f(tls, uint32(unsafe.Sizeof(RegisteredInterp{})))
	(*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp = interp
	(*RegisteredInterp)(unsafe.Pointer(riPtr)).Fname = (*struct {
		f func(*libc.TLS, uint32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Alloc})).f(tls, uint32((libc.Xwcslen(tls, actualName)+uint64(1))*Size_t(unsafe.Sizeof(WCHAR(0)))))
	(*RegisteredInterp)(unsafe.Pointer(riPtr)).FnextPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr
	(*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr = handlerPtr
	if (*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr != uintptr(0) {
		(*Tcl_Obj)(unsafe.Pointer((*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr)).FrefCount++
	}
	(*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr = riPtr
	libc.Xwcscpy(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Fname, actualName)

	if (*struct {
		f func(*libc.TLS, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_IsSafe})).f(tls, interp) != 0 {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ExposeCommand})).f(tls, interp, ts+67575 /* "dde" */, ts+67575 /* "dde" */)
	}

	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Command
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_CreateObjCommand})).f(tls, interp, ts+67575 /* "dde" */, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	}{sDdeObjCmd})),
		riPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sDeleteProc})))
	if (*struct {
		f func(*libc.TLS, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_IsSafe})).f(tls, interp) != 0 {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_HideCommand})).f(tls, interp, ts+67575 /* "dde" */, ts+67575 /* "dde" */)
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+8 /* &dString */)

	// Re-initialize with the new name.

	sInitialize(tls)

	return (*RegisteredInterp)(unsafe.Pointer(riPtr)).Fname
}

//----------------------------------------------------------------------
//
// DdeGetRegistrationPtr
//
//	Retrieve the registration info for an interpreter.
//
// Results:
//	Returns a pointer to the registration structure or NULL
//
// Side effects:
//	None
//
//----------------------------------------------------------------------

func sDdeGetRegistrationPtr(tls *libc.TLS, interp uintptr) uintptr { /* tclWinDde.c:475:25: */
	var riPtr uintptr
	var tsdPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetThreadData})).f(tls, uintptr(unsafe.Pointer(&dataKey13)), int32(unsafe.Sizeof(ThreadSpecificData14{})))

	for riPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr; riPtr != uintptr(0); riPtr = (*RegisteredInterp)(unsafe.Pointer(riPtr)).FnextPtr {
		if (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp == interp {
			break
		}
	}
	return riPtr
}

//----------------------------------------------------------------------
//
// DeleteProc
//
//	This function is called when the command "dde" is destroyed.
//
// Results:
//	none
//
// Side effects:
//	The interpreter given by riPtr is unregistered.
//
//----------------------------------------------------------------------

func sDeleteProc(tls *libc.TLS, clientData uintptr) { /* tclWinDde.c:508:1: */
	var riPtr uintptr = clientData
	var searchPtr uintptr
	var prevPtr uintptr
	var tsdPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetThreadData})).f(tls, uintptr(unsafe.Pointer(&dataKey13)), int32(unsafe.Sizeof(ThreadSpecificData14{})))

	searchPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr
	prevPtr = uintptr(0)
__1:
	if !(searchPtr != uintptr(0) && searchPtr != riPtr) {
		goto __3
	}
	{
		// Empty loop body.

	}
	goto __2
__2:
	prevPtr = searchPtr
	searchPtr = (*RegisteredInterp)(unsafe.Pointer(searchPtr)).FnextPtr
	goto __1
	goto __3
__3:
	;

	if searchPtr != uintptr(0) {
		if prevPtr == uintptr(0) {
			(*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr = (*RegisteredInterp)(unsafe.Pointer((*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr)).FnextPtr
		} else {
			(*RegisteredInterp)(unsafe.Pointer(prevPtr)).FnextPtr = (*RegisteredInterp)(unsafe.Pointer(searchPtr)).FnextPtr
		}
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Free})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Fname)
	if (*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr)
			}
		}
	}
	(*struct {
		f func(*libc.TLS, ClientData, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_EventuallyFree})).f(tls, clientData, uintptr(3))
}

//----------------------------------------------------------------------
//
// ExecuteRemoteObject --
//
//	Takes the package delivered by DDE and executes it in the server's
//	interpreter.
//
// Results:
//	A list Tcl_Obj * that describes what happened. The first element is
//	the numerical return code (TCL_ERROR, etc.). The second element is the
//	result of the script. If the return result was TCL_ERROR, then the
//	third element will be the value of the global "errorCode", and the
//	fourth will be the value of the global "errorInfo". The return result
//	will have a refCount of 0.
//
// Side effects:
//	A Tcl script is run, which can cause all kinds of other things to
//	happen.
//
//----------------------------------------------------------------------

func sExecuteRemoteObject(tls *libc.TLS, riPtr uintptr, ddeObjectPtr uintptr) uintptr { /* tclWinDde.c:560:16: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var returnPackagePtr uintptr
	var result int32 = TCL_OK

	if (*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr == uintptr(0) && (*struct {
		f func(*libc.TLS, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_IsSafe})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp) != 0 {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp, (*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls,

			ts+67585, -1))
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp, libc.VaList(bp, ts+4178 /* "TCL" */, ts+67665 /* "DDE" */, ts+67669 /* "SECURITY_CHECK" */, uintptr(0)))
		result = TCL_ERROR
	}

	if (*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr != uintptr(0) {
		// Add the dde request data to the handler proc list.

		var cmdPtr uintptr = (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DuplicateObj})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr)

		result = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp, cmdPtr,
			ddeObjectPtr)
		if result == TCL_OK {
			ddeObjectPtr = cmdPtr
		}
	}

	if result == TCL_OK {
		result = (*struct {
			f func(*libc.TLS, uintptr, uintptr, int32) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_EvalObjEx})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp, ddeObjectPtr, TCL_EVAL_GLOBAL)
	}

	returnPackagePtr = (*struct {
		f func(*libc.TLS, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewListObj})).f(tls, 0, uintptr(0))

	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, uintptr(0), returnPackagePtr,
		(*struct {
			f func(*libc.TLS, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewIntObj})).f(tls, result))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, uintptr(0), returnPackagePtr,
		(*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetObjResult})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp))

	if result == TCL_ERROR {
		var errorObjPtr uintptr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetVar2Ex})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp, ts+46212 /* "errorCode" */, uintptr(0),
			TCL_GLOBAL_ONLY)
		if errorObjPtr != 0 {
			(*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, uintptr(0), returnPackagePtr, errorObjPtr)
		}
		errorObjPtr = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetVar2Ex})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Finterp, ts+28015 /* "errorInfo" */, uintptr(0),
			TCL_GLOBAL_ONLY)
		if errorObjPtr != 0 {
			(*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, uintptr(0), returnPackagePtr, errorObjPtr)
		}
	}

	return returnPackagePtr
}

//----------------------------------------------------------------------
//
// DdeServerProc --
//
//	Handles all transactions for this server. Can handle execute, request,
//	and connect protocols. Dde will call this routine when a client
//	attempts to run a dde command using this server.
//
// Results:
//	A DDE Handle with the result of the dde command.
//
// Side effects:
//	Depending on which command is executed, arbitrary Tcl scripts can be
//	run.
//
//----------------------------------------------------------------------

func sDdeServerProc(tls *libc.TLS, uType UINT, uFmt UINT, hConv HCONV, ddeTopic HSZ, ddeItem HSZ, hData HDDEDATA, unused1 DWORD, unused2 DWORD) HDDEDATA { /* tclWinDde.c:637:1: */
	bp := tls.Alloc(872)
	defer tls.Free(872)

	// var dString Tcl_DString at bp, 216

	var len Size_t
	// var dlen DWORD at bp+648, 4

	var utilString uintptr
	var ddeObjectPtr uintptr
	var ddeReturn HDDEDATA = uintptr(0)
	var riPtr uintptr
	var convPtr uintptr
	var prevConvPtr uintptr
	var tsdPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetThreadData})).f(tls, uintptr(unsafe.Pointer(&dataKey13)), int32(unsafe.Sizeof(ThreadSpecificData14{})))
	_ = unused1
	_ = unused2

	switch uType {
	case UINT(0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK):

		len = Size_t(libc.XDdeQueryStringW(tls, ddeInstance, ddeTopic, uintptr(0), uint32(0), CP_WINUNICODE))
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp /* &dString */)
		(*struct {
			f func(*libc.TLS, uintptr, int32)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringSetLength})).f(tls, bp /* &dString */, int32((len+uint64(1))*Size_t(unsafe.Sizeof(WCHAR(0)))-uint64(1)))
		utilString = (*Tcl_DString)(unsafe.Pointer(bp)).Fstring
		libc.XDdeQueryStringW(tls, ddeInstance, ddeTopic, utilString, DWORD(len)+DWORD(1),
			CP_WINUNICODE)

		for riPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr; riPtr != uintptr(0); riPtr = (*RegisteredInterp)(unsafe.Pointer(riPtr)).FnextPtr {
			if libc.X_wcsicmp(tls, utilString, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Fname) == 0 {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp /* &dString */)
				return HDDEDATA(TRUE)
			}
		}

		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp /* &dString */)
		return HDDEDATA(FALSE)

	case UINT(0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK):

		len = Size_t(libc.XDdeQueryStringW(tls, ddeInstance, ddeTopic, uintptr(0), uint32(0), CP_WINUNICODE))
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp /* &dString */)
		(*struct {
			f func(*libc.TLS, uintptr, int32)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringSetLength})).f(tls, bp /* &dString */, int32((len+uint64(1))*Size_t(unsafe.Sizeof(WCHAR(0)))-uint64(1)))
		utilString = (*Tcl_DString)(unsafe.Pointer(bp)).Fstring
		libc.XDdeQueryStringW(tls, ddeInstance, ddeTopic, utilString, DWORD(len)+DWORD(1),
			CP_WINUNICODE)
		for riPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr; riPtr != uintptr(0); riPtr = (*RegisteredInterp)(unsafe.Pointer(riPtr)).FnextPtr {
			if libc.X_wcsicmp(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr)).Fname, utilString) == 0 {
				convPtr = (*struct {
					f func(*libc.TLS, uint32) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Alloc})).f(tls, uint32(unsafe.Sizeof(Conversation{})))
				(*Conversation)(unsafe.Pointer(convPtr)).FnextPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FcurrentConversations
				(*Conversation)(unsafe.Pointer(convPtr)).FreturnPackagePtr = uintptr(0)
				(*Conversation)(unsafe.Pointer(convPtr)).FhConv = hConv
				(*Conversation)(unsafe.Pointer(convPtr)).FriPtr = riPtr
				(*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FcurrentConversations = convPtr
				break
			}
		}
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp /* &dString */)
		return HDDEDATA(TRUE)

	case UINT(0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK):

		convPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FcurrentConversations
		prevConvPtr = uintptr(0)
	__1:
		if !(convPtr != uintptr(0)) {
			goto __3
		}
		{
			if hConv == (*Conversation)(unsafe.Pointer(convPtr)).FhConv {
				if prevConvPtr == uintptr(0) {
					(*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FcurrentConversations = (*Conversation)(unsafe.Pointer(convPtr)).FnextPtr
				} else {
					(*Conversation)(unsafe.Pointer(prevConvPtr)).FnextPtr = (*Conversation)(unsafe.Pointer(convPtr)).FnextPtr
				}
				if (*Conversation)(unsafe.Pointer(convPtr)).FreturnPackagePtr != uintptr(0) {
					for ok := true; ok; ok = 0 != 0 {
						var _objPtr uintptr = (*Conversation)(unsafe.Pointer(convPtr)).FreturnPackagePtr
						if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
							(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr)
						}
					}
				}
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Free})).f(tls, convPtr)
				goto __3
			}

		}
		goto __2
	__2:
		prevConvPtr = convPtr
		convPtr = (*Conversation)(unsafe.Pointer(convPtr)).FnextPtr
		goto __1
		goto __3
	__3:
		;
		return HDDEDATA(TRUE)

	case UINT(0x00B0 | XCLASS_DATA):

		if uFmt != UINT(CF_TEXT) && uFmt != UINT(CF_UNICODETEXT) {
			return HDDEDATA(FALSE)
		}

		ddeReturn = HDDEDATA(FALSE)
		for convPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FcurrentConversations; convPtr != uintptr(0) &&
			(*Conversation)(unsafe.Pointer(convPtr)).FhConv != hConv; convPtr = (*Conversation)(unsafe.Pointer(convPtr)).FnextPtr {
			// Empty loop body.
		}

		if convPtr != uintptr(0) {
			// var dsBuf Tcl_DString at bp+216, 216

			var returnString uintptr

			len = Size_t(libc.XDdeQueryStringW(tls, ddeInstance, ddeItem, uintptr(0), uint32(0), CP_WINUNICODE))
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp /* &dString */)
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+216 /* &dsBuf */)
			(*struct {
				f func(*libc.TLS, uintptr, int32)
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringSetLength})).f(tls, bp /* &dString */, int32((len+uint64(1))*Size_t(unsafe.Sizeof(WCHAR(0)))-uint64(1)))
			utilString = (*Tcl_DString)(unsafe.Pointer(bp)).Fstring
			libc.XDdeQueryStringW(tls, ddeInstance, ddeItem, utilString, DWORD(len)+DWORD(1),
				CP_WINUNICODE)
			if libc.X_wcsicmp(tls, utilString, wtext+238) == 0 {
				returnString = (*struct {
					f func(*libc.TLS, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, (*Conversation)(unsafe.Pointer(convPtr)).FreturnPackagePtr)
				len = Size_t((*Tcl_Obj)(unsafe.Pointer((*Conversation)(unsafe.Pointer(convPtr)).FreturnPackagePtr)).Flength)
				if uFmt != UINT(CF_TEXT) {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+216 /* &dsBuf */)
					(*struct {
						f func(*libc.TLS, uintptr, int32, uintptr) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, returnString, int32(len), bp+216 /* &dsBuf */)
					returnString = (*Tcl_DString)(unsafe.Pointer(bp + 216)).Fstring
					len = uint64((*Tcl_DString)(unsafe.Pointer(bp+216)).Flength) + uint64(unsafe.Sizeof(WCHAR(0))) - uint64(1)
				}
				ddeReturn = libc.XDdeCreateDataHandle(tls, ddeInstance, returnString,
					DWORD(len)+DWORD(1), uint32(0), ddeItem, uFmt, uint32(0))
			} else {
				if (*struct {
					f func(*libc.TLS, uintptr) int32
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_IsSafe})).f(tls, (*RegisteredInterp)(unsafe.Pointer((*Conversation)(unsafe.Pointer(convPtr)).FriPtr)).Finterp) != 0 {
					ddeReturn = uintptr(0)
				} else {
					// var ds Tcl_DString at bp+432, 216

					var variableObjPtr uintptr

					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+432 /* &ds */)
					(*struct {
						f func(*libc.TLS, uintptr, int32, uintptr) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, utilString, int32(libc.Xwcslen(tls, utilString)), bp+432 /* &ds */)
					variableObjPtr = (*struct {
						f func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetVar2Ex})).f(tls,
						(*RegisteredInterp)(unsafe.Pointer((*Conversation)(unsafe.Pointer(convPtr)).FriPtr)).Finterp, (*Tcl_DString)(unsafe.Pointer(bp+432)).Fstring, uintptr(0),
						TCL_GLOBAL_ONLY)
					if variableObjPtr != uintptr(0) {
						returnString = (*struct {
							f func(*libc.TLS, uintptr) uintptr
						})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, variableObjPtr)
						len = Size_t((*Tcl_Obj)(unsafe.Pointer(variableObjPtr)).Flength)
						if uFmt != UINT(CF_TEXT) {
							(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+216 /* &dsBuf */)
							(*struct {
								f func(*libc.TLS, uintptr, int32, uintptr) uintptr
							})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, returnString, int32(len), bp+216 /* &dsBuf */)
							returnString = (*Tcl_DString)(unsafe.Pointer(bp + 216)).Fstring
							len = uint64((*Tcl_DString)(unsafe.Pointer(bp+216)).Flength) + uint64(unsafe.Sizeof(WCHAR(0))) - uint64(1)
						}
						ddeReturn = libc.XDdeCreateDataHandle(tls, ddeInstance,
							returnString, DWORD(len)+DWORD(1), uint32(0), ddeItem,
							uFmt, uint32(0))
					} else {
						ddeReturn = uintptr(0)
					}
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+432 /* &ds */)
				}
			}
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+216 /* &dsBuf */)
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp /* &dString */)
		}
		return ddeReturn

	case UINT(0x0050 | XCLASS_FLAGS):
		{
			// Execute this script. The results will be saved into a list object
			// which will be retreived later. See ExecuteRemoteObject.

			var returnPackagePtr uintptr
			var string uintptr

			for convPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FcurrentConversations; convPtr != uintptr(0) &&
				(*Conversation)(unsafe.Pointer(convPtr)).FhConv != hConv; convPtr = (*Conversation)(unsafe.Pointer(convPtr)).FnextPtr {
				// Empty loop body.
			}

			if convPtr == uintptr(0) {
				return HDDEDATA(DDE_FNOTPROCESSED)
			}

			utilString = libc.XDdeAccessData(tls, hData, bp+648)
			string = utilString
			if !(*(*DWORD)(unsafe.Pointer(bp + 648)) != 0) {
				// Empty binary array.
				ddeObjectPtr = (*struct{ f func(*libc.TLS) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewObj})).f(tls)
			} else if *(*DWORD)(unsafe.Pointer(bp + 648))&DWORD(1) != 0 || *(*WCHAR)(unsafe.Pointer(utilString + uintptr(*(*DWORD)(unsafe.Pointer(bp + 648))>>1-DWORD(1))*2)) != 0 {
				// Cannot be unicode, so assume utf-8
				if !(int32(*(*int8)(unsafe.Pointer(string + uintptr(*(*DWORD)(unsafe.Pointer(bp + 648))-DWORD(1))))) != 0) {
					*(*DWORD)(unsafe.Pointer(bp + 648 /* dlen */))--
				}
				ddeObjectPtr = (*struct {
					f func(*libc.TLS, uintptr, int32) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, string, int32(*(*DWORD)(unsafe.Pointer(bp + 648 /* dlen */))))
			} else {
				// unicode
				// var dsBuf Tcl_DString at bp+656, 216

				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+656 /* &dsBuf */)
				(*struct {
					f func(*libc.TLS, uintptr, int32, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, utilString, int32(*(*DWORD)(unsafe.Pointer(bp + 648 /* dlen */))>>1-DWORD(1)), bp+656 /* &dsBuf */)
				ddeObjectPtr = (*struct {
					f func(*libc.TLS, uintptr, int32) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+656 /* &dsBuf */)).Fstring,
					(*Tcl_DString)(unsafe.Pointer(bp+656)).Flength)
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+656 /* &dsBuf */)
			}
			(*Tcl_Obj)(unsafe.Pointer(ddeObjectPtr)).FrefCount++
			libc.XDdeUnaccessData(tls, hData)
			if (*Conversation)(unsafe.Pointer(convPtr)).FreturnPackagePtr != uintptr(0) {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _objPtr uintptr = (*Conversation)(unsafe.Pointer(convPtr)).FreturnPackagePtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr)
					}
				}
			}
			(*Conversation)(unsafe.Pointer(convPtr)).FreturnPackagePtr = uintptr(0)
			returnPackagePtr = sExecuteRemoteObject(tls, (*Conversation)(unsafe.Pointer(convPtr)).FriPtr, ddeObjectPtr)
			(*Tcl_Obj)(unsafe.Pointer(returnPackagePtr)).FrefCount++
			for convPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FcurrentConversations; convPtr != uintptr(0) &&
				(*Conversation)(unsafe.Pointer(convPtr)).FhConv != hConv; convPtr = (*Conversation)(unsafe.Pointer(convPtr)).FnextPtr {
				// Empty loop body.
			}
			if convPtr != uintptr(0) {
				(*Conversation)(unsafe.Pointer(convPtr)).FreturnPackagePtr = returnPackagePtr
			} else {
				for ok2 := true; ok2; ok2 = 0 != 0 {
					var _objPtr uintptr = returnPackagePtr
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr)
					}
				}
			}
			for ok3 := true; ok3; ok3 = 0 != 0 {
				var _objPtr uintptr = ddeObjectPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr)
				}
			}
			if returnPackagePtr == uintptr(0) {
				return HDDEDATA(DDE_FNOTPROCESSED)
			} else {
				return HDDEDATA(DDE_FACK)
			}

		}
		fallthrough

	case UINT(0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK):
		{
			// Dde wants a list of services and topics that we support.

			var returnPtr uintptr
			var i int32
			var numItems int32

			i = 0
			riPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr
		__4:
			if !(riPtr != uintptr(0)) {
				goto __6
			}
			{
				// Empty loop body.

			}
			goto __5
		__5:
			i++
			riPtr = (*RegisteredInterp)(unsafe.Pointer(riPtr)).FnextPtr
			goto __4
			goto __6
		__6:
			;

			numItems = i
			ddeReturn = libc.XDdeCreateDataHandle(tls, ddeInstance, uintptr(0),
				uint32(uint64(numItems+1)*uint64(unsafe.Sizeof(HSZPAIR{}))), uint32(0), uintptr(0), uint32(0), uint32(0))
			returnPtr = libc.XDdeAccessData(tls, ddeReturn, bp+648)
			len = Size_t(*(*DWORD)(unsafe.Pointer(bp + 648 /* dlen */)))
			i = 0
			riPtr = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr
		__7:
			if !(i < numItems) {
				goto __9
			}
			{
				(*HSZPAIR)(unsafe.Pointer(returnPtr + uintptr(i)*16)).FhszSvc = libc.XDdeCreateStringHandleW(tls, ddeInstance,
					wtext+210, CP_WINUNICODE)
				(*HSZPAIR)(unsafe.Pointer(returnPtr + uintptr(i)*16)).FhszTopic = libc.XDdeCreateStringHandleW(tls, ddeInstance,
					(*RegisteredInterp)(unsafe.Pointer(riPtr)).Fname, CP_WINUNICODE)

			}
			goto __8
		__8:
			i++
			riPtr = (*RegisteredInterp)(unsafe.Pointer(riPtr)).FnextPtr
			goto __7
			goto __9
		__9:
			;
			(*HSZPAIR)(unsafe.Pointer(returnPtr + uintptr(i)*16)).FhszSvc = uintptr(0)
			(*HSZPAIR)(unsafe.Pointer(returnPtr + uintptr(i)*16)).FhszTopic = uintptr(0)
			libc.XDdeUnaccessData(tls, ddeReturn)
			return ddeReturn

		}

	default:
		return uintptr(0)
	}
	return HDDEDATA(0)
}

//----------------------------------------------------------------------
//
// DdeExitProc --
//
//	Gets rid of our DDE server when we go away.
//
// Results:
//	None.
//
// Side effects:
//	The DDE server is deleted.
//
//----------------------------------------------------------------------

func sDdeExitProc(tls *libc.TLS, dummy uintptr) { /* tclWinDde.c:992:1: */
	_ = dummy
	libc.XDdeNameService(tls, ddeInstance, uintptr(0), uintptr(0), uint32(DNS_UNREGISTER))
	libc.XDdeUninitialize(tls, ddeInstance)
	ddeInstance = DWORD(0)
}

//----------------------------------------------------------------------
//
// MakeDdeConnection --
//
//	This function is a utility used to connect to a DDE server when given
//	a server name and a topic name.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Passes back a conversation through ddeConvPtr
//
//----------------------------------------------------------------------

func sMakeDdeConnection(tls *libc.TLS, interp uintptr, name uintptr, ddeConvPtr uintptr) int32 { /* tclWinDde.c:1019:1: */
	bp := tls.Alloc(256)
	defer tls.Free(256)

	var ddeTopic HSZ
	var ddeService HSZ
	var ddeConv HCONV

	ddeService = libc.XDdeCreateStringHandleW(tls, ddeInstance, wtext+210, CP_WINUNICODE)
	ddeTopic = libc.XDdeCreateStringHandleW(tls, ddeInstance, name, CP_WINUNICODE)

	ddeConv = libc.XDdeConnect(tls, ddeInstance, ddeService, ddeTopic, uintptr(0))
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeService)
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeTopic)

	if ddeConv == uintptr(0) {
		if interp != uintptr(0) {
			// var dString Tcl_DString at bp+40, 216

			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+40 /* &dString */)
			(*struct {
				f func(*libc.TLS, uintptr, int32, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, name, int32(libc.Xwcslen(tls, name)), bp+40 /* &dString */)
			(*struct {
				f func(*libc.TLS, uintptr, uintptr)
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
				f func(*libc.TLS, uintptr, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ObjPrintf})).f(tls,
				ts+67684, libc.VaList(bp, (*Tcl_DString)(unsafe.Pointer(bp+40)).Fstring)))
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+40 /* &dString */)
			(*struct {
				f func(*libc.TLS, uintptr, uintptr)
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp+8, ts+4178 /* "TCL" */, ts+67665 /* "DDE" */, ts+67716 /* "NO_SERVER" */, uintptr(0)))
		}
		return TCL_ERROR
	}

	*(*HCONV)(unsafe.Pointer(ddeConvPtr)) = ddeConv
	return TCL_OK
}

//----------------------------------------------------------------------
//
// DdeGetServicesList --
//
//	This function obtains the list of DDE services.
//
//	The functions between here and this function are all involved with
//	handling the DDE callbacks for this. They are: DdeCreateClient,
//	DdeClientWindowProc, DdeServicesOnAck, and DdeEnumWindowsCallback
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Sets the services list into the interp result.
//
//----------------------------------------------------------------------

func sDdeCreateClient(tls *libc.TLS, es uintptr) int32 { /* tclWinDde.c:1073:1: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	// var wc WNDCLASSEXW at bp, 80

	libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(WNDCLASSEXW{})))
	(*WNDCLASSEXW)(unsafe.Pointer(bp /* &wc */)).FcbSize = UINT(unsafe.Sizeof(WNDCLASSEXW{}))
	(*WNDCLASSEXW)(unsafe.Pointer(bp /* &wc */)).FlpfnWndProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, HWND, UINT, WPARAM, LPARAM) LRESULT
	}{sDdeClientWindowProc}))
	(*WNDCLASSEXW)(unsafe.Pointer(bp /* &wc */)).FlpszClassName = szDdeClientClassName
	(*WNDCLASSEXW)(unsafe.Pointer(bp /* &wc */)).FcbWndExtra = int32(unsafe.Sizeof(uintptr(0)))

	// Register and create the callback window.

	libc.XRegisterClassExW(tls, bp)
	(*DdeEnumServices)(unsafe.Pointer(es)).Fhwnd = libc.XCreateWindowExW(tls, uint32(0), szDdeClientClassName, szDdeClientWindowName,
		0x80000000, 0, 0, 0, 0, uintptr(0), uintptr(0), uintptr(0), es)
	return TCL_OK
}

var szDdeClientClassName uintptr = wtext + 286  /* tclWinDde.c:1077:24 */
var szDdeClientWindowName uintptr = wtext + 328 /* tclWinDde.c:1078:24 */

func sDdeClientWindowProc(tls *libc.TLS, hwnd HWND, uMsg UINT, wParam WPARAM, lParam LPARAM) LRESULT { /* tclWinDde.c:1097:1: */
	switch uMsg {
	case UINT(WM_CREATE):
		{
			var lpcs LPCREATESTRUCT2 = LPCREATESTRUCT2(lParam)
			var es uintptr = (*TagCREATESTRUCTA)(unsafe.Pointer(lpcs)).FlpCreateParams

			libc.XSetWindowLongPtrW(tls, hwnd, -21, int64(es))
			return int64(0)

		}
	case UINT(WM_DDE_FIRST + 4):
		return sDdeServicesOnAck(tls, hwnd, wParam, lParam)
	default:
		return libc.XDefWindowProcW(tls, hwnd, uMsg, wParam, lParam)
	}
	return LRESULT(0)
}

func sDdeServicesOnAck(tls *libc.TLS, hwnd HWND, wParam WPARAM, lParam LPARAM) LRESULT { /* tclWinDde.c:1124:1: */
	bp := tls.Alloc(728)
	defer tls.Free(728)

	var hwndRemote HWND = HWND(wParam)
	var service ATOM = WORD(DWORD_PTR(lParam) & uint64(0xffff))
	var topic ATOM = WORD(DWORD_PTR(lParam) >> 16 & uint64(0xffff))
	var es uintptr
	// var sz [255]WCHAR at bp, 510

	// var dString Tcl_DString at bp+512, 216

	es = uintptr(libc.XGetWindowLongPtrW(tls, hwnd, -21))

	if (int32((*DdeEnumServices)(unsafe.Pointer(es)).Fservice) == int32(ATOM(0)) || int32((*DdeEnumServices)(unsafe.Pointer(es)).Fservice) == int32(service)) &&
		(int32((*DdeEnumServices)(unsafe.Pointer(es)).Ftopic) == int32(ATOM(0)) || int32((*DdeEnumServices)(unsafe.Pointer(es)).Ftopic) == int32(topic)) {
		var matchPtr uintptr = (*struct {
			f func(*libc.TLS, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewListObj})).f(tls, 0, uintptr(0))
		var resultPtr uintptr = (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetObjResult})).f(tls, (*DdeEnumServices)(unsafe.Pointer(es)).Finterp)

		libc.XGlobalGetAtomNameW(tls, service, bp, 255)
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+512 /* &dString */)
		(*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, bp /* &sz[0] */, int32(libc.Xwcslen(tls, bp /* &sz[0] */)), bp+512 /* &dString */)
		(*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, uintptr(0), matchPtr, (*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+512 /* &dString */)).Fstring, -1))
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+512 /* &dString */)
		libc.XGlobalGetAtomNameW(tls, topic, bp, 255)
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+512 /* &dString */)
		(*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, bp /* &sz[0] */, int32(libc.Xwcslen(tls, bp /* &sz[0] */)), bp+512 /* &dString */)
		(*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, uintptr(0), matchPtr, (*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+512 /* &dString */)).Fstring, -1))
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+512 /* &dString */)

		// Adding the hwnd as a third list element provides a unique
		// identifier in the case of multiple servers with the name
		// application and topic names.
		// Needs a TIP though:
		// Tcl_ListObjAppendElement(NULL, matchPtr,
		//	Tcl_NewLongObj((long)hwndRemote));

		if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount > 1 {
			resultPtr = (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DuplicateObj})).f(tls, resultPtr)
		}
		if (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, (*DdeEnumServices)(unsafe.Pointer(es)).Finterp, resultPtr,
			matchPtr) == TCL_OK {
			(*struct {
				f func(*libc.TLS, uintptr, uintptr)
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, (*DdeEnumServices)(unsafe.Pointer(es)).Finterp, resultPtr)
		}
	}

	// Tell the server we are no longer interested.

	libc.XPostMessageW(tls, hwndRemote, uint32(WM_DDE_FIRST+1), uint64(hwnd), int64(0))
	return int64(0)
}

func sDdeEnumWindowsCallback(tls *libc.TLS, hwndTarget HWND, lParam LPARAM) WINBOOL { /* tclWinDde.c:1187:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	*(*DWORD_PTR)(unsafe.Pointer(bp /* dwResult */)) = uint64(0)
	var es uintptr = uintptr(lParam)

	libc.XSendMessageTimeoutW(tls, hwndTarget, uint32(WM_DDE_FIRST), uint64((*DdeEnumServices)(unsafe.Pointer(es)).Fhwnd),
		int64(LONG(DWORD(WORD(DWORD_PTR((*DdeEnumServices)(unsafe.Pointer(es)).Fservice)&uint64(0xffff)))|DWORD(WORD(DWORD_PTR((*DdeEnumServices)(unsafe.Pointer(es)).Ftopic)&uint64(0xffff)))<<16)), uint32(SMTO_ABORTIFHUNG), uint32(1000),
		bp)
	return TRUE
}

func sDdeGetServicesList(tls *libc.TLS, interp uintptr, serviceName uintptr, topicName uintptr) int32 { /* tclWinDde.c:1201:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var es DdeEnumServices at bp, 24

	(*DdeEnumServices)(unsafe.Pointer(bp /* &es */)).Finterp = interp
	(*DdeEnumServices)(unsafe.Pointer(bp /* &es */)).Fresult = TCL_OK
	(*DdeEnumServices)(unsafe.Pointer(bp /* &es */)).Fservice = func() uint16 {
		if serviceName == uintptr(0) {
			return ATOM(0)
		}
		return libc.XGlobalAddAtomW(tls, serviceName)
	}()
	(*DdeEnumServices)(unsafe.Pointer(bp /* &es */)).Ftopic = func() uint16 {
		if topicName == uintptr(0) {
			return ATOM(0)
		}
		return libc.XGlobalAddAtomW(tls, topicName)
	}()

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp) // our list is to be appended to result.
	sDdeCreateClient(tls, bp)
	libc.XEnumWindows(tls, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, HWND, LPARAM) WINBOOL
	}{sDdeEnumWindowsCallback})), int64(bp /* &es */))

	if libc.XIsWindow(tls, (*DdeEnumServices)(unsafe.Pointer(bp)).Fhwnd) != 0 {
		libc.XDestroyWindow(tls, (*DdeEnumServices)(unsafe.Pointer(bp /* &es */)).Fhwnd)
	}
	if int32((*DdeEnumServices)(unsafe.Pointer(bp)).Fservice) != int32(ATOM(0)) {
		libc.XGlobalDeleteAtom(tls, (*DdeEnumServices)(unsafe.Pointer(bp /* &es */)).Fservice)
	}
	if int32((*DdeEnumServices)(unsafe.Pointer(bp)).Ftopic) != int32(ATOM(0)) {
		libc.XGlobalDeleteAtom(tls, (*DdeEnumServices)(unsafe.Pointer(bp /* &es */)).Ftopic)
	}
	return (*DdeEnumServices)(unsafe.Pointer(bp /* &es */)).Fresult
}

//----------------------------------------------------------------------
//
// SetDdeError --
//
//	Sets the interp result to a cogent error message describing the last
//	DDE error.
//
// Results:
//	None.
//
// Side effects:
//	The interp's result object is changed.
//
//----------------------------------------------------------------------

func sSetDdeError(tls *libc.TLS, interp uintptr) { /* tclWinDde.c:1248:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var errorMessage uintptr
	var errorCode uintptr

	switch libc.XDdeGetLastError(tls, ddeInstance) {
	case UINT(DMLERR_DATAACKTIMEOUT):
		fallthrough
	case UINT(DMLERR_EXECACKTIMEOUT):
		fallthrough
	case UINT(DMLERR_POKEACKTIMEOUT):
		errorMessage = ts + 67726 /* "remote interpret..." */
		errorCode = ts + 67761    /* "TIMEOUT" */
		break
	case UINT(DMLERR_BUSY):
		errorMessage = ts + 67769 /* "remote server is..." */
		errorCode = ts + 9627     /* "BUSY" */
		break
	case UINT(DMLERR_NOTPROCESSED):
		errorMessage = ts + 67791 /* "remote server ca..." */
		errorCode = ts + 67832    /* "NOCANDO" */
		break
	default:
		errorMessage = ts + 67840 /* "dde command fail..." */
		errorCode = ts + 67859    /* "FAILED" */
	}

	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, errorMessage, -1))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp, ts+4178 /* "TCL" */, ts+67665 /* "DDE" */, errorCode, uintptr(0)))
}

//----------------------------------------------------------------------
//
// DdeObjCmd --
//
//	This function is invoked to process the "dde" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func sDdeObjCmd(tls *libc.TLS, dummy uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* tclWinDde.c:1295:1: */
	bp := tls.Alloc(1980)
	defer tls.Free(1980)

	// var index int32 at bp+192, 4

	var i int32
	// var argIndex int32 at bp+848, 4

	// var length Size_t at bp+1736, 8

	var flags int32
	// var result int32 at bp+1976, 4

	var firstArg int32
	var ddeService HSZ
	var ddeTopic HSZ
	var ddeItem HSZ
	var ddeCookie HSZ
	var ddeData HDDEDATA
	var ddeItemData HDDEDATA
	var ddeReturn HDDEDATA
	// var hConv HCONV at bp+1744, 8

	var serviceName uintptr
	var topicName uintptr
	var string uintptr
	// var ddeResult DWORD at bp+1296, 4

	// var objPtr uintptr at bp+1968, 8

	var handlerPtr uintptr
	// var serviceBuf Tcl_DString at bp+200, 216

	// var topicBuf Tcl_DString at bp+416, 216

	// var itemBuf Tcl_DString at bp+632, 216
	// return current handler
	var riPtr uintptr
	var src uintptr
	var src1 uintptr
	// var dsBuf Tcl_DString at bp+856, 216

	var src2 uintptr
	// var dataLength Size_t at bp+1288, 8

	var dataString uintptr
	// var dsBuf1 Tcl_DString at bp+1072, 216

	// var dsBuf2 Tcl_DString at bp+1304, 216

	// var tmp DWORD at bp+1300, 4

	var dataString1 uintptr
	var returnObjPtr uintptr
	var itemString uintptr
	var src3 uintptr
	var data uintptr
	// var dsBuf3 Tcl_DString at bp+1520, 216

	var itemString1 uintptr
	var dataString2 uintptr
	var src4 uintptr
	// add the dde request data to the handler proc list
	//result = Tcl_ListObjReplace(sendInterp, objPtr, 0, 0, 1,
	//	    &(riPtr->handlerPtr));
	var cmdPtr uintptr
	var _objPtr uintptr
	var sendInterp uintptr
	var _objPtr1 uintptr
	var _objPtr2 uintptr
	var _objPtr3 uintptr
	var _objPtr4 uintptr
	var _objPtr5 uintptr
	var _objPtr6 uintptr
	var resultPtr uintptr
	var ddeDataString uintptr
	// var dsBuf4 Tcl_DString at bp+1752, 216

	var riPtr1 uintptr
	var tsdPtr uintptr
	flags = 0
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_OK
	firstArg = 0
	ddeService = uintptr(0)
	ddeTopic = uintptr(0)
	ddeItem = uintptr(0)
	ddeCookie = uintptr(0)
	ddeData = uintptr(0)
	ddeItemData = uintptr(0)
	*(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)) = uintptr(0)
	serviceName = uintptr(0)
	topicName = uintptr(0)
	handlerPtr = uintptr(0)
	_ = dummy

	// Initialize DDE server/client

	if !(objc < 2) {
		goto __1
	}
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_WrongNumArgs})).f(tls, interp, 1, objv, ts+9176 /* "command ?arg ......" */)
	return TCL_ERROR
__1:
	;

	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&ddeCommands)), int32(unsafe.Sizeof(uintptr(0))), ts+14158, 0, bp+192) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+200 /* &serviceBuf */)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+416 /* &topicBuf */)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+632 /* &itemBuf */)
	switch uint32(*(*int32)(unsafe.Pointer(bp + 192 /* index */))) {
	case uint32(0) /* DDE_SERVERNAME */ :
		goto __4
	case uint32(1) /* DDE_EXECUTE */ :
		goto __5
	case uint32(2) /* DDE_POKE */ :
		goto __6
	case uint32(3) /* DDE_REQUEST */ :
		goto __7
	case uint32(4) /* DDE_SERVICES */ :
		goto __8
	case uint32(5) /* DDE_EVAL */ :
		goto __9
	}
	goto __3
__4:
	i = 2
__10:
	if !(i < objc) {
		goto __12
	}
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&ddeSrvOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+848) != TCL_OK) {
		goto __13
	}
	// If it is the last argument, it might be a server name
	// instead of a bad argument.

	if !(i != objc-1) {
		goto __14
	}
	return TCL_ERROR
__14:
	;
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp)
	goto __12
__13:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 848)) == 0) {
		goto __15
	}
	flags = flags | DDE_FLAG_FORCE
	goto __16
__15:
	if !(*(*int32)(unsafe.Pointer(bp + 848)) == 1) {
		goto __17
	}
	if !(objc-i == 1) {
		goto __19
	} // return current handler
	riPtr = sDdeGetRegistrationPtr(tls, interp)

	if !(riPtr != 0 && (*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr != 0) {
		goto __20
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*RegisteredInterp)(unsafe.Pointer(riPtr)).FhandlerPtr)
	goto __21
__20:
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp)
__21:
	;
	return TCL_OK
__19:
	;
	handlerPtr = *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PreIncInt32(&i, 1))*8))
	goto __18
__17:
	if !(*(*int32)(unsafe.Pointer(bp + 848)) == 2) {
		goto __22
	}
	i++
	goto __12
__22:
	;
__18:
	;
__16:
	;
	goto __11
__11:
	i++
	goto __10
	goto __12
__12:
	;

	if !(objc-i > 1) {
		goto __23
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp)
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_WrongNumArgs})).f(tls, interp, 2, objv,
		ts+67866)
	return TCL_ERROR
__23:
	;

	if objc == i {
		firstArg = 1
	} else {
		firstArg = i
	}
	goto __3
__5:
	if !(objc == 5) {
		goto __24
	}
	firstArg = 2
	goto __3
	goto __25
__24:
	if !(objc >= 6 && objc <= 7) {
		goto __26
	}
	firstArg = objc - 3
	i = 2
__27:
	if !(i < firstArg) {
		goto __29
	}
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&ddeExecOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+848) != TCL_OK) {
		goto __30
	}
	goto wrongDdeExecuteArgs
__30:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 848)) == 0) {
		goto __31
	}
	flags = flags | DDE_FLAG_ASYNC
	goto __32
__31:
	flags = flags | DDE_FLAG_BINARY
__32:
	;
	goto __28
__28:
	i++
	goto __27
	goto __29
__29:
	;
	goto __3
__26:
	;
__25:
	;
	// otherwise...
wrongDdeExecuteArgs:
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_WrongNumArgs})).f(tls, interp, 2, objv,
		ts+67909)
	return TCL_ERROR
__6:
	if !(objc == 6) {
		goto __33
	}
	firstArg = 2
	goto __3
	goto __34
__33:
	if !(objc == 7 && (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&ddeReqOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+848) == TCL_OK) {
		goto __35
	}
	flags = flags | DDE_FLAG_BINARY
	firstArg = 3
	goto __3
__35:
	;
__34:
	;

	// Otherwise...

	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_WrongNumArgs})).f(tls, interp, 2, objv,
		ts+67956)
	return TCL_ERROR
__7:
	if !(objc == 5) {
		goto __36
	}
	firstArg = 2
	goto __3
	goto __37
__36:
	if !(objc == 6 && (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&ddeReqOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+848) == TCL_OK) {
		goto __38
	}
	flags = flags | DDE_FLAG_BINARY
	firstArg = 3
	goto __3
__38:
	;
__37:
	;

	// Otherwise ...

	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_WrongNumArgs})).f(tls, interp, 2, objv,
		ts+67999)
	return TCL_ERROR
__8:
	if !(objc != 4) {
		goto __39
	}
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_WrongNumArgs})).f(tls, interp, 2, objv, ts+68037 /* "serviceName topi..." */)
	return TCL_ERROR
__39:
	;
	firstArg = 2
	goto __3
__9:
	if !(objc < 4) {
		goto __40
	}
wrongDdeEvalArgs:
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_WrongNumArgs})).f(tls, interp, 2, objv, ts+68059 /* "?-async? service..." */)
	return TCL_ERROR
	goto __41
__40:
	firstArg = 2
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&ddeEvalOptions)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+848) == TCL_OK) {
		goto __42
	}
	if !(objc < 5) {
		goto __43
	}
	goto wrongDdeEvalArgs
__43:
	;
	flags = flags | DDE_FLAG_ASYNC
	firstArg++
__42:
	;
	goto __3
__41:
	;
__3:
	;

	sInitialize(tls)

	if !(firstArg != 1) {
		goto __44
	}
	src = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg)*8)))

	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = Size_t((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg)*8)))).Flength)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+200 /* &serviceBuf */)
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, src, int32(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))), bp+200 /* &serviceBuf */)
	serviceName = (*Tcl_DString)(unsafe.Pointer(bp + 200)).Fstring
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = uint64((*Tcl_DString)(unsafe.Pointer(bp+200)).Flength) / uint64(unsafe.Sizeof(WCHAR(0)))
	goto __45
__44:
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = uint64(0)
__45:
	;

	if !(*(*Size_t)(unsafe.Pointer(bp + 1736)) == uint64(0)) {
		goto __46
	}
	serviceName = uintptr(0)
	goto __47
__46:
	if !(*(*int32)(unsafe.Pointer(bp + 192)) != 0 && *(*int32)(unsafe.Pointer(bp + 192)) != 5) {
		goto __48
	}
	ddeService = libc.XDdeCreateStringHandleW(tls, ddeInstance, serviceName,
		CP_WINUNICODE)
__48:
	;
__47:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 192)) != 0 && *(*int32)(unsafe.Pointer(bp + 192)) != 5) {
		goto __49
	}
	src1 = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+1)*8)))

	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = Size_t((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+1)*8)))).Flength)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+416 /* &topicBuf */)
	topicName = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, src1, int32(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))), bp+416 /* &topicBuf */)
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = uint64((*Tcl_DString)(unsafe.Pointer(bp+416)).Flength) / uint64(unsafe.Sizeof(WCHAR(0)))
	if !(*(*Size_t)(unsafe.Pointer(bp + 1736)) == uint64(0)) {
		goto __50
	}
	topicName = uintptr(0)
	goto __51
__50:
	ddeTopic = libc.XDdeCreateStringHandleW(tls, ddeInstance, topicName,
		CP_WINUNICODE)
__51:
	;
__49:
	;

	switch uint32(*(*int32)(unsafe.Pointer(bp + 192 /* index */))) {
	case uint32(0) /* DDE_SERVERNAME */ :
		goto __53

	case uint32(1) /* DDE_EXECUTE */ :
		goto __54
	case uint32(3) /* DDE_REQUEST */ :
		goto __55
	case uint32(2) /* DDE_POKE */ :
		goto __56

	case uint32(4) /* DDE_SERVICES */ :
		goto __57

	case uint32(5) /* DDE_EVAL */ :
		goto __58
	}
	goto __52
__53:
	serviceName = sDdeSetServerName(tls, interp, serviceName, flags,
		handlerPtr)
	if !(serviceName != uintptr(0)) {
		goto __59
	}

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+856 /* &dsBuf */)
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, serviceName, int32(libc.Xwcslen(tls, serviceName)), bp+856 /* &dsBuf */)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+856 /* &dsBuf */)).Fstring,
		(*Tcl_DString)(unsafe.Pointer(bp+856)).Flength))
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+856 /* &dsBuf */)
	goto __60
__59:
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp)
__60:
	;
	goto __52

__54:

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+1072 /* &dsBuf1 */)
	if !(flags&DDE_FLAG_BINARY != 0) {
		goto __61
	}
	dataString = getByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+2)*8)), bp+1288)
	goto __62
__61:

	src2 = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+2)*8)))
	*(*Size_t)(unsafe.Pointer(bp + 1288 /* dataLength */)) = Size_t((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+2)*8)))).Flength)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+1072 /* &dsBuf1 */)
	dataString = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, src2, int32(*(*Size_t)(unsafe.Pointer(bp + 1288 /* dataLength */))), bp+1072 /* &dsBuf1 */)
	*(*Size_t)(unsafe.Pointer(bp + 1288 /* dataLength */)) = uint64((*Tcl_DString)(unsafe.Pointer(bp+1072)).Flength) + uint64(unsafe.Sizeof(WCHAR(0)))
__62:
	;

	if !(*(*Size_t)(unsafe.Pointer(bp + 1288))+uint64(1) < uint64(2)) {
		goto __63
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
		(*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+68085 /* "cannot execute n..." */, -1))
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+1072 /* &dsBuf1 */)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp, ts+4178 /* "TCL" */, ts+67665 /* "DDE" */, ts+44816 /* "NULL" */, uintptr(0)))
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto __52
__63:
	;
	*(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)) = libc.XDdeConnect(tls, ddeInstance, ddeService, ddeTopic, uintptr(0))
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeService)
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeTopic)

	if !(*(*HCONV)(unsafe.Pointer(bp + 1744)) == uintptr(0)) {
		goto __64
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+1072 /* &dsBuf1 */)
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto __52
__64:
	;

	ddeData = libc.XDdeCreateDataHandle(tls, ddeInstance, dataString,
		DWORD(*(*Size_t)(unsafe.Pointer(bp + 1288 /* dataLength */))), uint32(0), uintptr(0), func() uint32 {
			if flags&DDE_FLAG_BINARY != 0 {
				return uint32(CF_TEXT)
			}
			return uint32(CF_UNICODETEXT)
		}(), uint32(0))
	if !(ddeData != uintptr(0)) {
		goto __65
	}
	if !(flags&DDE_FLAG_ASYNC != 0) {
		goto __67
	}
	libc.XDdeClientTransaction(tls, ddeData, 0xFFFFFFFF, *(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)), uintptr(0),
		func() uint32 {
			if flags&DDE_FLAG_BINARY != 0 {
				return uint32(CF_TEXT)
			}
			return uint32(CF_UNICODETEXT)
		}(), uint32(0x0050|XCLASS_FLAGS), TIMEOUT_ASYNC, bp+1296 /* &ddeResult */)
	libc.XDdeAbandonTransaction(tls, ddeInstance, *(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)), *(*DWORD)(unsafe.Pointer(bp + 1296 /* ddeResult */)))
	goto __68
__67:
	ddeReturn = libc.XDdeClientTransaction(tls, ddeData, 0xFFFFFFFF,
		*(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)), uintptr(0), func() uint32 {
			if flags&DDE_FLAG_BINARY != 0 {
				return uint32(CF_TEXT)
			}
			return uint32(CF_UNICODETEXT)
		}(), uint32(0x0050|XCLASS_FLAGS), uint32(30000), uintptr(0))
	if !(ddeReturn == uintptr(0)) {
		goto __69
	}
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
__69:
	;
__68:
	;
	libc.XDdeFreeDataHandle(tls, ddeData)
	goto __66
__65:
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
__66:
	;
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+1072 /* &dsBuf1 */)
	goto __52

__55:

	src3 = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+2)*8)))
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = Size_t((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+2)*8)))).Flength)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+632 /* &itemBuf */)
	itemString = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, src3, int32(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))), bp+632 /* &itemBuf */)
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = uint64((*Tcl_DString)(unsafe.Pointer(bp+632)).Flength) / uint64(unsafe.Sizeof(WCHAR(0)))

	if !(*(*Size_t)(unsafe.Pointer(bp + 1736)) == uint64(0)) {
		goto __70
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
		(*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+68110 /* "cannot request v..." */, -1))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp+32, ts+4178 /* "TCL" */, ts+67665 /* "DDE" */, ts+44816 /* "NULL" */, uintptr(0)))
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto cleanup
__70:
	;
	*(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)) = libc.XDdeConnect(tls, ddeInstance, ddeService, ddeTopic, uintptr(0))
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeService)
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeTopic)

	if !(*(*HCONV)(unsafe.Pointer(bp + 1744)) == uintptr(0)) {
		goto __71
	}
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto __72
__71:
	ddeItem = libc.XDdeCreateStringHandleW(tls, ddeInstance, itemString,
		CP_WINUNICODE)
	if !(ddeItem != uintptr(0)) {
		goto __73
	}
	ddeData = libc.XDdeClientTransaction(tls, uintptr(0), uint32(0), *(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)), ddeItem,
		func() uint32 {
			if flags&DDE_FLAG_BINARY != 0 {
				return uint32(CF_TEXT)
			}
			return uint32(CF_UNICODETEXT)
		}(), uint32(0x00B0|XCLASS_DATA), uint32(5000), uintptr(0))
	if !(ddeData == uintptr(0)) {
		goto __75
	}
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto __76
__75:
	dataString1 = libc.XDdeAccessData(tls, ddeData, bp+1300)

	if !(flags&DDE_FLAG_BINARY != 0) {
		goto __77
	}
	returnObjPtr = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewByteArrayObj})).f(tls, dataString1, int32(*(*DWORD)(unsafe.Pointer(bp + 1300 /* tmp */))))
	goto __78
__77:

	if !(uint64(*(*DWORD)(unsafe.Pointer(bp + 1300))) >= uint64(unsafe.Sizeof(WCHAR(0))) &&
		!(int32(*(*WCHAR)(unsafe.Pointer(dataString1 + uintptr(uint64(*(*DWORD)(unsafe.Pointer(bp + 1300)))/uint64(unsafe.Sizeof(WCHAR(0)))-uint64(1))*2))) != 0)) {
		goto __79
	}
	*(*DWORD)(unsafe.Pointer(bp + 1300 /* tmp */)) -= uint32(uint64(unsafe.Sizeof(WCHAR(0))))
__79:
	;
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+1304 /* &dsBuf2 */)
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, dataString1, int32(*(*DWORD)(unsafe.Pointer(bp + 1300 /* tmp */))>>1), bp+1304 /* &dsBuf2 */)
	returnObjPtr = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+1304 /* &dsBuf2 */)).Fstring,
		(*Tcl_DString)(unsafe.Pointer(bp+1304)).Flength)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+1304 /* &dsBuf2 */)
__78:
	;
	libc.XDdeUnaccessData(tls, ddeData)
	libc.XDdeFreeDataHandle(tls, ddeData)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, returnObjPtr)
__76:
	;
	goto __74
__73:
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
__74:
	;
__72:
	;
	goto __52

__56:

	src4 = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+2)*8)))
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = Size_t((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+2)*8)))).Flength)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+632 /* &itemBuf */)
	itemString1 = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, src4, int32(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))), bp+632 /* &itemBuf */)
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = uint64((*Tcl_DString)(unsafe.Pointer(bp+632)).Flength) / uint64(unsafe.Sizeof(WCHAR(0)))
	if !(*(*Size_t)(unsafe.Pointer(bp + 1736)) == uint64(0)) {
		goto __80
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
		(*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+68144 /* "cannot have a nu..." */, -1))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp+64, ts+4178 /* "TCL" */, ts+67665 /* "DDE" */, ts+44816 /* "NULL" */, uintptr(0)))
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto cleanup
__80:
	;
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+1520 /* &dsBuf3 */)
	if !(flags&DDE_FLAG_BINARY != 0) {
		goto __81
	}
	dataString2 = getByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+3)*8)), bp+1736)
	goto __82
__81:
	data =
		(*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+3)*8)))
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = Size_t((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + uintptr(firstArg+3)*8)))).Flength)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+1520 /* &dsBuf3 */)
	dataString2 = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, data, int32(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))), bp+1520 /* &dsBuf3 */)
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = uint64((*Tcl_DString)(unsafe.Pointer(bp+1520)).Flength) + uint64(unsafe.Sizeof(WCHAR(0)))
__82:
	;

	*(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)) = libc.XDdeConnect(tls, ddeInstance, ddeService, ddeTopic, uintptr(0))
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeService)
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeTopic)

	if !(*(*HCONV)(unsafe.Pointer(bp + 1744)) == uintptr(0)) {
		goto __83
	}
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto __84
__83:
	ddeItem = libc.XDdeCreateStringHandleW(tls, ddeInstance, itemString1,
		CP_WINUNICODE)
	if !(ddeItem != uintptr(0)) {
		goto __85
	}
	ddeData = libc.XDdeClientTransaction(tls, dataString2, DWORD(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))),
		*(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)), ddeItem, func() uint32 {
			if flags&DDE_FLAG_BINARY != 0 {
				return uint32(CF_TEXT)
			}
			return uint32(CF_UNICODETEXT)
		}(), uint32(0x0090|XCLASS_FLAGS), uint32(5000), uintptr(0))
	if !(ddeData == uintptr(0)) {
		goto __87
	}
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
__87:
	;
	goto __86
__85:
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
__86:
	;
__84:
	;
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+1520 /* &dsBuf3 */)
	goto __52

__57:
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = sDdeGetServicesList(tls, interp, serviceName, topicName)
	goto __52

__58:
	tsdPtr = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetThreadData})).f(tls, uintptr(unsafe.Pointer(&dataKey13)), int32(unsafe.Sizeof(ThreadSpecificData14{})))

	if !(serviceName == uintptr(0)) {
		goto __88
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
		(*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+68168 /* "invalid service ..." */, -1))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp+96, ts+4178 /* "TCL" */, ts+67665 /* "DDE" */, ts+67716 /* "NO_SERVER" */, uintptr(0)))
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto cleanup
__88:
	;

	objc = objc - (firstArg + 1)
	objv += 8 * uintptr(firstArg+1)

	// See if the target interpreter is local. If so, execute the command
	// directly without going through the DDE server. Don't exchange
	// objects between interps. The target interp could compile an object,
	// producing a bytecode structure that refers to other objects owned
	// by the target interp. If the target interp is then deleted, the
	// bytecode structure would be referring to deallocated objects.

	riPtr1 = (*ThreadSpecificData14)(unsafe.Pointer(tsdPtr)).FinterpListPtr
__89:
	if !(riPtr1 != uintptr(0)) {
		goto __91
	}
	if !(libc.X_wcsicmp(tls, serviceName, (*RegisteredInterp)(unsafe.Pointer(riPtr1)).Fname) == 0) {
		goto __92
	}
	goto __91
__92:
	;
	goto __90
__90:
	riPtr1 = (*RegisteredInterp)(unsafe.Pointer(riPtr1)).FnextPtr
	goto __89
	goto __91
__91:
	;

	if !(riPtr1 != uintptr(0)) {
		goto __93
	}

	// This command is to a local interp. No need to go through the
	// server.

	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Preserve})).f(tls, riPtr1)
	sendInterp = (*RegisteredInterp)(unsafe.Pointer(riPtr1)).Finterp
	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Preserve})).f(tls, sendInterp)

	// Don't exchange objects between interps. The target interp would
	// compile an object, producing a bytecode structure that refers
	// to other objects owned by the target interp. If the target
	// interp is then deleted, the bytecode structure would be
	// referring to deallocated objects.

	if !((*struct {
		f func(*libc.TLS, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_IsSafe})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr1)).Finterp) != 0 && (*RegisteredInterp)(unsafe.Pointer(riPtr1)).FhandlerPtr == uintptr(0)) {
		goto __95
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr1)).Finterp, (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls,

		ts+67585, -1))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp+128, ts+4178 /* "TCL" */, ts+67665 /* "DDE" */, ts+67669, /* "SECURITY_CHECK" */
		uintptr(0)))
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
__95:
	;

	if !(*(*int32)(unsafe.Pointer(bp + 1976)) == TCL_OK) {
		goto __96
	}
	if !(objc == 1) {
		goto __97
	}
	*(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)) = *(*uintptr)(unsafe.Pointer(objv))
	goto __98
__97:
	*(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)) = (*struct {
		f func(*libc.TLS, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ConcatObj})).f(tls, objc, objv)
__98:
	;
	if !((*RegisteredInterp)(unsafe.Pointer(riPtr1)).FhandlerPtr != uintptr(0)) {
		goto __99
	}
	// add the dde request data to the handler proc list
	//result = Tcl_ListObjReplace(sendInterp, objPtr, 0, 0, 1,
	//	    &(riPtr->handlerPtr));
	cmdPtr = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DuplicateObj})).f(tls, (*RegisteredInterp)(unsafe.Pointer(riPtr1)).FhandlerPtr)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, sendInterp, cmdPtr,
		*(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)))
	if !(*(*int32)(unsafe.Pointer(bp + 1976)) == TCL_OK) {
		goto __100
	}
	*(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)) = cmdPtr
__100:
	;
__99:
	;
__96:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 1976)) == TCL_OK) {
		goto __101
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1968)))).FrefCount++
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = (*struct {
		f func(*libc.TLS, uintptr, uintptr, int32) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_EvalObjEx})).f(tls, sendInterp, *(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)), TCL_EVAL_GLOBAL)
__102:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp + 1968))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __105
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr)
__105:
	;
	goto __103
__103:
	if 0 != 0 {
		goto __102
	}
	goto __104
__104:
	;
__101:
	;
	if !(interp != sendInterp) {
		goto __106
	}
	if !(*(*int32)(unsafe.Pointer(bp + 1976)) == TCL_ERROR) {
		goto __107
	}
	// An error occurred, so transfer error information from
	// the destination interpreter back to our interpreter.

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp)
	*(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)) = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetVar2Ex})).f(tls, sendInterp, ts+28015 /* "errorInfo" */, uintptr(0),
		TCL_GLOBAL_ONLY)
	if !(*(*uintptr)(unsafe.Pointer(bp + 1968)) != 0) {
		goto __108
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_AppendObjToErrorInfo})).f(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)))
__108:
	;

	*(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)) = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetVar2Ex})).f(tls, sendInterp, ts+46212 /* "errorCode" */, uintptr(0),
		TCL_GLOBAL_ONLY)
	if !(*(*uintptr)(unsafe.Pointer(bp + 1968)) != 0) {
		goto __109
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjErrorCode})).f(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)))
__109:
	;
__107:
	;
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetObjResult})).f(tls, sendInterp))
__106:
	;
	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Release})).f(tls, riPtr1)
	(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Release})).f(tls, sendInterp)
	goto __94
__93:

	// This is a non-local request. Send the script to the server and
	// poll it for a result.

	if !(sMakeDdeConnection(tls, interp, serviceName, bp+1744) != TCL_OK) {
		goto __110
	}
invalidServerResponse:
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
		(*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+68192 /* "invalid data ret..." */, -1))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp+160, ts+4178 /* "TCL" */, ts+67665 /* "DDE" */, ts+68226 /* "BAD_RESPONSE" */, uintptr(0)))
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto cleanup
__110:
	;

	*(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)) = (*struct {
		f func(*libc.TLS, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ConcatObj})).f(tls, objc, objv)
	string = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)))
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = Size_t((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)))).Flength)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+1752 /* &dsBuf4 */)
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, string, int32(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))), bp+1752 /* &dsBuf4 */)
	string = (*Tcl_DString)(unsafe.Pointer(bp + 1752)).Fstring
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = uint64((*Tcl_DString)(unsafe.Pointer(bp+1752)).Flength) + uint64(unsafe.Sizeof(WCHAR(0)))
	ddeItemData = libc.XDdeCreateDataHandle(tls, ddeInstance, string,
		DWORD(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))), uint32(0), uintptr(0), uint32(CF_UNICODETEXT), uint32(0))
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+1752 /* &dsBuf4 */)

	if !(flags&DDE_FLAG_ASYNC != 0) {
		goto __111
	}
	ddeData = libc.XDdeClientTransaction(tls, ddeItemData,
		0xFFFFFFFF, *(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)), uintptr(0),
		uint32(CF_UNICODETEXT), uint32(0x0050|XCLASS_FLAGS), TIMEOUT_ASYNC, bp+1296)
	libc.XDdeAbandonTransaction(tls, ddeInstance, *(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)), *(*DWORD)(unsafe.Pointer(bp + 1296 /* ddeResult */)))
	goto __112
__111:
	ddeData = libc.XDdeClientTransaction(tls, ddeItemData,
		0xFFFFFFFF, *(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)), uintptr(0),
		uint32(CF_UNICODETEXT), uint32(0x0050|XCLASS_FLAGS), uint32(30000), uintptr(0))
	if !(ddeData != uintptr(0)) {
		goto __113
	}
	ddeCookie = libc.XDdeCreateStringHandleW(tls, ddeInstance,
		wtext+238, CP_WINUNICODE)
	ddeData = libc.XDdeClientTransaction(tls, uintptr(0), uint32(0), *(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)), ddeCookie,
		uint32(CF_UNICODETEXT), uint32(0x00B0|XCLASS_DATA), uint32(30000), uintptr(0))
__113:
	;
__112:
	;

__114:
	_objPtr1 = *(*uintptr)(unsafe.Pointer(bp + 1968))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __117
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr1)
__117:
	;
	goto __115
__115:
	if 0 != 0 {
		goto __114
	}
	goto __116
__116:
	;

	if !(ddeData == uintptr(0)) {
		goto __118
	}
	sSetDdeError(tls, interp)
	*(*int32)(unsafe.Pointer(bp + 1976 /* result */)) = TCL_ERROR
	goto cleanup
__118:
	;

	if !!(flags&DDE_FLAG_ASYNC != 0) {
		goto __119
	}

	// The return handle has a two or four element list in it. The
	// first element is the return code (TCL_OK, TCL_ERROR, etc.).
	// The second is the result of the script. If the return code
	// is TCL_ERROR, then the third element is the value of the
	// variable "errorCode", and the fourth is the value of the
	// variable "errorInfo".

	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) = Size_t(libc.XDdeGetData(tls, ddeData, uintptr(0), uint32(0), uint32(0)))
	ddeDataString = (*struct {
		f func(*libc.TLS, uint32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Alloc})).f(tls, uint32(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))))
	libc.XDdeGetData(tls, ddeData, ddeDataString, DWORD(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))), uint32(0))
	if !(*(*Size_t)(unsafe.Pointer(bp + 1736)) > Size_t(unsafe.Sizeof(WCHAR(0)))) {
		goto __120
	}
	*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */)) -= Size_t(unsafe.Sizeof(WCHAR(0)))
__120:
	;
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+1752 /* &dsBuf4 */)
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, ddeDataString, int32(*(*Size_t)(unsafe.Pointer(bp + 1736 /* length */))>>1), bp+1752 /* &dsBuf4 */)
	resultPtr = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+1752 /* &dsBuf4 */)).Fstring,
		(*Tcl_DString)(unsafe.Pointer(bp+1752)).Flength)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+1752 /* &dsBuf4 */)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Free})).f(tls, ddeDataString)

	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjIndex})).f(tls, uintptr(0), resultPtr, 0, bp+1968) != TCL_OK) {
		goto __121
	}
__122:
	_objPtr2 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __125
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr2)
__125:
	;
	goto __123
__123:
	if 0 != 0 {
		goto __122
	}
	goto __124
__124:
	;
	goto invalidServerResponse
__121:
	;
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIntFromObj})).f(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 1968)), bp+1976) != TCL_OK) {
		goto __126
	}
__127:
	_objPtr3 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr3)).FrefCount, 1) <= 1) {
		goto __130
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr3)
__130:
	;
	goto __128
__128:
	if 0 != 0 {
		goto __127
	}
	goto __129
__129:
	;
	goto invalidServerResponse
__126:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 1976)) == TCL_ERROR) {
		goto __131
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp)

	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjIndex})).f(tls, uintptr(0), resultPtr, 3,
		bp+1968) != TCL_OK) {
		goto __132
	}
__133:
	_objPtr4 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr4)).FrefCount, 1) <= 1) {
		goto __136
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr4)
__136:
	;
	goto __134
__134:
	if 0 != 0 {
		goto __133
	}
	goto __135
__135:
	;
	goto invalidServerResponse
__132:
	;
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_AppendObjToErrorInfo})).f(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)))

	(*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjIndex})).f(tls, uintptr(0), resultPtr, 2, bp+1968 /* &objPtr */)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjErrorCode})).f(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)))
__131:
	;
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjIndex})).f(tls, uintptr(0), resultPtr, 1, bp+1968) != TCL_OK) {
		goto __137
	}
__138:
	_objPtr5 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr5)).FrefCount, 1) <= 1) {
		goto __141
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr5)
__141:
	;
	goto __139
__139:
	if 0 != 0 {
		goto __138
	}
	goto __140
__140:
	;
	goto invalidServerResponse
__137:
	;
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1968 /* objPtr */)))
__142:
	_objPtr6 = resultPtr
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr6)).FrefCount, 1) <= 1) {
		goto __145
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr6)
__145:
	;
	goto __143
__143:
	if 0 != 0 {
		goto __142
	}
	goto __144
__144:
	;
__119:
	;
__94:
	;

__52:
	;

cleanup:
	if !(ddeCookie != uintptr(0)) {
		goto __146
	}
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeCookie)
__146:
	;
	if !(ddeItem != uintptr(0)) {
		goto __147
	}
	libc.XDdeFreeStringHandle(tls, ddeInstance, ddeItem)
__147:
	;
	if !(ddeItemData != uintptr(0)) {
		goto __148
	}
	libc.XDdeFreeDataHandle(tls, ddeItemData)
__148:
	;
	if !(ddeData != uintptr(0)) {
		goto __149
	}
	libc.XDdeFreeDataHandle(tls, ddeData)
__149:
	;
	if !(*(*HCONV)(unsafe.Pointer(bp + 1744)) != uintptr(0)) {
		goto __150
	}
	libc.XDdeDisconnect(tls, *(*HCONV)(unsafe.Pointer(bp + 1744 /* hConv */)))
__150:
	;
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+632 /* &itemBuf */)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+416 /* &topicBuf */)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+200 /* &serviceBuf */)
	return *(*int32)(unsafe.Pointer(bp + 1976 /* result */))
}

var ddeCommands = [7]uintptr{
	ts + 68239, ts + 68250, ts + 68258, ts + 68263, ts + 68271, ts + 2994,
	uintptr(0)} /* tclWinDde.c:1301:23 */
var ddeSrvOptions = [4]uintptr{
	ts + 30818, ts + 68280, ts + 16430, uintptr(0),
} /* tclWinDde.c:1308:23 */
var ddeExecOptions = [3]uintptr{
	ts + 35976, ts + 68289, uintptr(0),
} /* tclWinDde.c:1314:23 */
var ddeEvalOptions = [2]uintptr{
	ts + 35976, uintptr(0),
} /* tclWinDde.c:1320:23 */
var ddeReqOptions = [2]uintptr{
	ts + 68289, uintptr(0),
} /* tclWinDde.c:1323:23 */

// Local variables:
// mode: c
// indent-tabs-mode: t
// tab-width: 8
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// The following table contains the mapping from Win32 errors to errno errors.

var errorTable = [268]uint8{
	uint8(0),
	uint8(EINVAL),       // ERROR_INVALID_FUNCTION	1
	uint8(ENOENT),       // ERROR_FILE_NOT_FOUND		2
	uint8(ENOENT),       // ERROR_PATH_NOT_FOUND		3
	uint8(EMFILE),       // ERROR_TOO_MANY_OPEN_FILES	4
	uint8(EACCES),       // ERROR_ACCESS_DENIED		5
	uint8(EBADF),        // ERROR_INVALID_HANDLE		6
	uint8(ENOMEM),       // ERROR_ARENA_TRASHED		7
	uint8(ENOMEM),       // ERROR_NOT_ENOUGH_MEMORY	8
	uint8(ENOMEM),       // ERROR_INVALID_BLOCK		9
	uint8(E2BIG),        // ERROR_BAD_ENVIRONMENT	10
	uint8(ENOEXEC),      // ERROR_BAD_FORMAT		11
	uint8(EACCES),       // ERROR_INVALID_ACCESS		12
	uint8(EINVAL),       // ERROR_INVALID_DATA		13
	uint8(ENOMEM),       // ERROR_OUT_OF_MEMORY		14
	uint8(ENOENT),       // ERROR_INVALID_DRIVE		15
	uint8(EACCES),       // ERROR_CURRENT_DIRECTORY	16
	uint8(EXDEV),        // ERROR_NOT_SAME_DEVICE	17
	uint8(ENOENT),       // ERROR_NO_MORE_FILES		18
	uint8(EROFS),        // ERROR_WRITE_PROTECT		19
	uint8(ENXIO),        // ERROR_BAD_UNIT		20
	uint8(EBUSY),        // ERROR_NOT_READY		21
	uint8(EIO),          // ERROR_BAD_COMMAND		22
	uint8(EIO),          // ERROR_CRC			23
	uint8(EIO),          // ERROR_BAD_LENGTH		24
	uint8(EIO),          // ERROR_SEEK			25
	uint8(EIO),          // ERROR_NOT_DOS_DISK		26
	uint8(ENXIO),        // ERROR_SECTOR_NOT_FOUND	27
	uint8(EBUSY),        // ERROR_OUT_OF_PAPER		28
	uint8(EIO),          // ERROR_WRITE_FAULT		29
	uint8(EIO),          // ERROR_READ_FAULT		30
	uint8(EIO),          // ERROR_GEN_FAILURE		31
	uint8(EACCES),       // ERROR_SHARING_VIOLATION	32
	uint8(EACCES),       // ERROR_LOCK_VIOLATION		33
	uint8(ENXIO),        // ERROR_WRONG_DISK		34
	uint8(ENFILE),       // ERROR_FCB_UNAVAILABLE	35
	uint8(ENFILE),       // ERROR_SHARING_BUFFER_EXCEEDED	36
	uint8(EINVAL),       // 37
	uint8(EINVAL),       // 38
	uint8(ENOSPC),       // ERROR_HANDLE_DISK_FULL	39
	uint8(EINVAL),       // 40
	uint8(EINVAL),       // 41
	uint8(EINVAL),       // 42
	uint8(EINVAL),       // 43
	uint8(EINVAL),       // 44
	uint8(EINVAL),       // 45
	uint8(EINVAL),       // 46
	uint8(EINVAL),       // 47
	uint8(EINVAL),       // 48
	uint8(EINVAL),       // 49
	uint8(ENODEV),       // ERROR_NOT_SUPPORTED		50
	uint8(EBUSY),        // ERROR_REM_NOT_LIST		51
	uint8(EEXIST),       // ERROR_DUP_NAME		52
	uint8(ENOENT),       // ERROR_BAD_NETPATH		53
	uint8(EBUSY),        // ERROR_NETWORK_BUSY		54
	uint8(ENODEV),       // ERROR_DEV_NOT_EXIST		55
	uint8(EAGAIN),       // ERROR_TOO_MANY_CMDS		56
	uint8(EIO),          // ERROR_ADAP_HDW_ERR		57
	uint8(EIO),          // ERROR_BAD_NET_RESP		58
	uint8(EIO),          // ERROR_UNEXP_NET_ERR		59
	uint8(EINVAL),       // ERROR_BAD_REM_ADAP		60
	uint8(EFBIG),        // ERROR_PRINTQ_FULL		61
	uint8(ENOSPC),       // ERROR_NO_SPOOL_SPACE		62
	uint8(ENOENT),       // ERROR_PRINT_CANCELLED	63
	uint8(ENOENT),       // ERROR_NETNAME_DELETED	64
	uint8(EACCES),       // ERROR_NETWORK_ACCESS_DENIED	65
	uint8(ENODEV),       // ERROR_BAD_DEV_TYPE		66
	uint8(ENOENT),       // ERROR_BAD_NET_NAME		67
	uint8(ENFILE),       // ERROR_TOO_MANY_NAMES		68
	uint8(EIO),          // ERROR_TOO_MANY_SESS		69
	uint8(EAGAIN),       // ERROR_SHARING_PAUSED		70
	uint8(EINVAL),       // ERROR_REQ_NOT_ACCEP		71
	uint8(EAGAIN),       // ERROR_REDIR_PAUSED		72
	uint8(EINVAL),       // 73
	uint8(EINVAL),       // 74
	uint8(EINVAL),       // 75
	uint8(EINVAL),       // 76
	uint8(EINVAL),       // 77
	uint8(EINVAL),       // 78
	uint8(EINVAL),       // 79
	uint8(EEXIST),       // ERROR_FILE_EXISTS		80
	uint8(EINVAL),       // 81
	uint8(ENOSPC),       // ERROR_CANNOT_MAKE		82
	uint8(EIO),          // ERROR_FAIL_I24		83
	uint8(ENFILE),       // ERROR_OUT_OF_STRUCTURES	84
	uint8(EEXIST),       // ERROR_ALREADY_ASSIGNED	85
	uint8(EPERM),        // ERROR_INVALID_PASSWORD	86
	uint8(EINVAL),       // ERROR_INVALID_PARAMETER	87
	uint8(EIO),          // ERROR_NET_WRITE_FAULT	88
	uint8(EAGAIN),       // ERROR_NO_PROC_SLOTS		89
	uint8(EINVAL),       // 90
	uint8(EINVAL),       // 91
	uint8(EINVAL),       // 92
	uint8(EINVAL),       // 93
	uint8(EINVAL),       // 94
	uint8(EINVAL),       // 95
	uint8(EINVAL),       // 96
	uint8(EINVAL),       // 97
	uint8(EINVAL),       // 98
	uint8(EINVAL),       // 99
	uint8(EINVAL),       // 100
	uint8(EINVAL),       // 101
	uint8(EINVAL),       // 102
	uint8(EINVAL),       // 103
	uint8(EINVAL),       // 104
	uint8(EINVAL),       // 105
	uint8(EINVAL),       // 106
	uint8(EXDEV),        // ERROR_DISK_CHANGE		107
	uint8(EAGAIN),       // ERROR_DRIVE_LOCKED		108
	uint8(EPIPE),        // ERROR_BROKEN_PIPE		109
	uint8(ENOENT),       // ERROR_OPEN_FAILED		110
	uint8(EINVAL),       // ERROR_BUFFER_OVERFLOW	111
	uint8(ENOSPC),       // ERROR_DISK_FULL		112
	uint8(EMFILE),       // ERROR_NO_MORE_SEARCH_HANDLES	113
	uint8(EBADF),        // ERROR_INVALID_TARGET_HANDLE	114
	uint8(EFAULT),       // ERROR_PROTECTION_VIOLATION	115
	uint8(EINVAL),       // 116
	uint8(EINVAL),       // 117
	uint8(EINVAL),       // 118
	uint8(EINVAL),       // 119
	uint8(EINVAL),       // 120
	uint8(EINVAL),       // 121
	uint8(EINVAL),       // 122
	uint8(ENOENT),       // ERROR_INVALID_NAME		123
	uint8(EINVAL),       // 124
	uint8(EINVAL),       // 125
	uint8(EINVAL),       // 126
	uint8(EINVAL),       // ERROR_PROC_NOT_FOUND		127
	uint8(ECHILD),       // ERROR_WAIT_NO_CHILDREN	128
	uint8(ECHILD),       // ERROR_CHILD_NOT_COMPLETE	129
	uint8(EBADF),        // ERROR_DIRECT_ACCESS_HANDLE	130
	uint8(EINVAL),       // ERROR_NEGATIVE_SEEK		131
	uint8(ESPIPE),       // ERROR_SEEK_ON_DEVICE		132
	uint8(EINVAL),       // 133
	uint8(EINVAL),       // 134
	uint8(EINVAL),       // 135
	uint8(EINVAL),       // 136
	uint8(EINVAL),       // 137
	uint8(EINVAL),       // 138
	uint8(EINVAL),       // 139
	uint8(EINVAL),       // 140
	uint8(EINVAL),       // 141
	uint8(EAGAIN),       // ERROR_BUSY_DRIVE		142
	uint8(EINVAL),       // 143
	uint8(EINVAL),       // 144
	uint8(EEXIST),       // ERROR_DIR_NOT_EMPTY		145
	uint8(EINVAL),       // 146
	uint8(EINVAL),       // 147
	uint8(EINVAL),       // 148
	uint8(EINVAL),       // 149
	uint8(EINVAL),       // 150
	uint8(EINVAL),       // 151
	uint8(EINVAL),       // 152
	uint8(EINVAL),       // 153
	uint8(EINVAL),       // 154
	uint8(EINVAL),       // 155
	uint8(EINVAL),       // 156
	uint8(EINVAL),       // 157
	uint8(EACCES),       // ERROR_NOT_LOCKED		158
	uint8(EINVAL),       // 159
	uint8(EINVAL),       // 160
	uint8(ENOENT),       // ERROR_BAD_PATHNAME	        161
	uint8(EINVAL),       // 162
	uint8(EINVAL),       // 163
	uint8(EINVAL),       // 164
	uint8(EINVAL),       // 165
	uint8(EINVAL),       // 166
	uint8(EACCES),       // ERROR_LOCK_FAILED		167
	uint8(EINVAL),       // 168
	uint8(EINVAL),       // 169
	uint8(EINVAL),       // 170
	uint8(EINVAL),       // 171
	uint8(EINVAL),       // 172
	uint8(EINVAL),       // 173
	uint8(EINVAL),       // 174
	uint8(EINVAL),       // 175
	uint8(EINVAL),       // 176
	uint8(EINVAL),       // 177
	uint8(EINVAL),       // 178
	uint8(EINVAL),       // 179
	uint8(EINVAL),       // 180
	uint8(EINVAL),       // 181
	uint8(EINVAL),       // 182
	uint8(EEXIST),       // ERROR_ALREADY_EXISTS		183
	uint8(ECHILD),       // ERROR_NO_CHILD_PROCESS	184
	uint8(EINVAL),       // 185
	uint8(EINVAL),       // 186
	uint8(EINVAL),       // 187
	uint8(EINVAL),       // 188
	uint8(EINVAL),       // 189
	uint8(EINVAL),       // 190
	uint8(EINVAL),       // 191
	uint8(EINVAL),       // 192
	uint8(EINVAL),       // 193
	uint8(EINVAL),       // 194
	uint8(EINVAL),       // 195
	uint8(EINVAL),       // 196
	uint8(EINVAL),       // 197
	uint8(EINVAL),       // 198
	uint8(EINVAL),       // 199
	uint8(EINVAL),       // 200
	uint8(EINVAL),       // 201
	uint8(EINVAL),       // 202
	uint8(EINVAL),       // 203
	uint8(EINVAL),       // 204
	uint8(EINVAL),       // 205
	uint8(ENAMETOOLONG), // ERROR_FILENAME_EXCED_RANGE	206
	uint8(EINVAL),       // 207
	uint8(EINVAL),       // 208
	uint8(EINVAL),       // 209
	uint8(EINVAL),       // 210
	uint8(EINVAL),       // 211
	uint8(EINVAL),       // 212
	uint8(EINVAL),       // 213
	uint8(EINVAL),       // 214
	uint8(EINVAL),       // 215
	uint8(EINVAL),       // 216
	uint8(EINVAL),       // 217
	uint8(EINVAL),       // 218
	uint8(EINVAL),       // 219
	uint8(EINVAL),       // 220
	uint8(EINVAL),       // 221
	uint8(EINVAL),       // 222
	uint8(EINVAL),       // 223
	uint8(EINVAL),       // 224
	uint8(EINVAL),       // 225
	uint8(EINVAL),       // 226
	uint8(EINVAL),       // 227
	uint8(EINVAL),       // 228
	uint8(EINVAL),       // 229
	uint8(EPIPE),        // ERROR_BAD_PIPE		230
	uint8(EAGAIN),       // ERROR_PIPE_BUSY		231
	uint8(EPIPE),        // ERROR_NO_DATA		232
	uint8(EPIPE),        // ERROR_PIPE_NOT_CONNECTED	233
	uint8(EINVAL),       // 234
	uint8(EINVAL),       // 235
	uint8(EINVAL),       // 236
	uint8(EINVAL),       // 237
	uint8(EINVAL),       // 238
	uint8(EINVAL),       // 239
	uint8(EINVAL),       // 240
	uint8(EINVAL),       // 241
	uint8(EINVAL),       // 242
	uint8(EINVAL),       // 243
	uint8(EINVAL),       // 244
	uint8(EINVAL),       // 245
	uint8(EINVAL),       // 246
	uint8(EINVAL),       // 247
	uint8(EINVAL),       // 248
	uint8(EINVAL),       // 249
	uint8(EINVAL),       // 250
	uint8(EINVAL),       // 251
	uint8(EINVAL),       // 252
	uint8(EINVAL),       // 253
	uint8(EINVAL),       // 254
	uint8(EINVAL),       // 255
	uint8(EINVAL),       // 256
	uint8(EINVAL),       // 257
	uint8(EINVAL),       // 258
	uint8(EINVAL),       // 259
	uint8(EINVAL),       // 260
	uint8(EINVAL),       // 261
	uint8(EINVAL),       // 262
	uint8(EINVAL),       // 263
	uint8(EINVAL),       // 264
	uint8(EINVAL),       // 265
	uint8(EINVAL),       // 266
	uint8(ENOTDIR),      // ERROR_DIRECTORY		267
} /* tclWinError.c:18:28 */

// The following table contains the mapping from WinSock errors to
// errno errors.

var wsaErrorTable = [37]uint8{
	uint8(EWOULDBLOCK),     // WSAEWOULDBLOCK
	uint8(EINPROGRESS),     // WSAEINPROGRESS
	uint8(EALREADY),        // WSAEALREADY
	uint8(ENOTSOCK),        // WSAENOTSOCK
	uint8(EDESTADDRREQ),    // WSAEDESTADDRREQ
	uint8(EMSGSIZE),        // WSAEMSGSIZE
	uint8(EPROTOTYPE),      // WSAEPROTOTYPE
	uint8(ENOPROTOOPT),     // WSAENOPROTOOPT
	uint8(EPROTONOSUPPORT), // WSAEPROTONOSUPPORT
	uint8(ESOCKTNOSUPPORT), // WSAESOCKTNOSUPPORT
	uint8(EOPNOTSUPP),      // WSAEOPNOTSUPP
	uint8(EPFNOSUPPORT),    // WSAEPFNOSUPPORT
	uint8(EAFNOSUPPORT),    // WSAEAFNOSUPPORT
	uint8(EADDRINUSE),      // WSAEADDRINUSE
	uint8(EADDRNOTAVAIL),   // WSAEADDRNOTAVAIL
	uint8(ENETDOWN),        // WSAENETDOWN
	uint8(ENETUNREACH),     // WSAENETUNREACH
	uint8(ENETRESET),       // WSAENETRESET
	uint8(ECONNABORTED),    // WSAECONNABORTED
	uint8(ECONNRESET),      // WSAECONNRESET
	uint8(ENOBUFS),         // WSAENOBUFS
	uint8(EISCONN),         // WSAEISCONN
	uint8(ENOTCONN),        // WSAENOTCONN
	uint8(ESHUTDOWN),       // WSAESHUTDOWN
	uint8(ETOOMANYREFS),    // WSAETOOMANYREFS
	uint8(ETIMEDOUT),       // WSAETIMEDOUT
	uint8(ECONNREFUSED),    // WSAECONNREFUSED
	uint8(ELOOP),           // WSAELOOP
	uint8(ENAMETOOLONG),    // WSAENAMETOOLONG
	uint8(EHOSTDOWN),       // WSAEHOSTDOWN
	uint8(EHOSTUNREACH),    // WSAEHOSTUNREACH
	uint8(ENOTEMPTY),       // WSAENOTEMPTY
	uint8(EAGAIN),          // WSAEPROCLIM
	uint8(EUSERS),          // WSAEUSERS
	uint8(EDQUOT),          // WSAEDQUOT
	uint8(ESTALE),          // WSAESTALE
	uint8(EREMOTE),         // WSAEREMOTE
} /* tclWinError.c:294:28 */

//----------------------------------------------------------------------
//
// TclWinConvertError --
//
//	This routine converts a Win32 error into an errno value.
//
// Results:
//	None.
//
// Side effects:
//	Sets the errno global variable.
//
//----------------------------------------------------------------------

func XTclWinConvertError(tls *libc.TLS, errCode DWORD) { /* tclWinError.c:351:1: */
	if uint64(errCode) >= uint64(unsafe.Sizeof(errorTable))/uint64(unsafe.Sizeof(uint8(0))) {
		errCode = errCode - DWORD(WSABASEERR+35)
		if uint64(errCode) >= uint64(unsafe.Sizeof(wsaErrorTable))/uint64(unsafe.Sizeof(uint8(0))) {
			XTcl_SetErrno(tls, int32(errorTable[1]))
		} else {
			XTcl_SetErrno(tls, int32(wsaErrorTable[errCode]))
		}
	} else {
		XTcl_SetErrno(tls, int32(errorTable[errCode]))
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// End:

var attributeArray = [6]int32{FILE_ATTRIBUTE_ARCHIVE, FILE_ATTRIBUTE_HIDDEN,
	0, FILE_ATTRIBUTE_READONLY, 0, FILE_ATTRIBUTE_SYSTEM} /* tclWinFCmd.c:53:18 */

var XtclpFileAttrStrings = [7]uintptr{
	ts + 68297, ts + 68306, ts + 68314, ts + 68324,
	ts + 68334, ts + 68345, uintptr(0),
} /* tclWinFCmd.c:57:12 */

var XtclpFileAttrProcs = [6]TclFileAttrProcs{
	{FgetProc: 0, FsetProc: 0},
	{FgetProc: 0, FsetProc: 0},
	{FgetProc: 0, FsetProc: 0},
	{FgetProc: 0, FsetProc: 0},
	{FgetProc: 0, FsetProc: 0},
	{FgetProc: 0, FsetProc: 0}} /* tclWinFCmd.c:62:24 */

//---------------------------------------------------------------------------
//
// TclpObjRenameFile, DoRenameFile --
//
//	Changes the name of an existing file or directory, from src to dst.
//	If src and dst refer to the same file or directory, does nothing and
//	returns success. Otherwise if dst already exists, it will be deleted
//	and replaced by src subject to the following conditions:
//	    If src is a directory, dst may be an empty directory.
//	    If src is a file, dst may be a file.
//	In any other situation where dst already exists, the rename will fail.
//
// Results:
//	If the file or directory was successfully renamed, returns TCL_OK.
//	Otherwise the return value is TCL_ERROR and errno is set to indicate
//	the error. Some possible values for errno are:
//
//	ENAMETOOLONG: src or dst names are too long.
//	EACCES:	    src or dst parent directory can't be read and/or written.
//	EEXIST:	    dst is a non-empty directory.
//	EINVAL:	    src is a root directory or dst is a subdirectory of src.
//	EISDIR:	    dst is a directory, but src is not.
//	ENOENT:	    src doesn't exist.	src or dst is "".
//	ENOTDIR:    src is a directory, but dst is not.
//	EXDEV:	    src and dst are on different filesystems.
//
//	EACCES:	    exists an open file already referring to src or dst.
//	EACCES:	    src or dst specify the current working directory (NT).
//	EACCES:	    src specifies a char device (nul:, com1:, etc.)
//	EEXIST:	    dst specifies a char device (nul:, com1:, etc.) (NT)
//	EACCES:	    dst specifies a char device (nul:, com1:, etc.) (95)
//
// Side effects:
//	The implementation supports cross-filesystem renames of files, but the
//	caller should be prepared to emulate cross-filesystem renames of
//	directories if errno is EXDEV.
//
//---------------------------------------------------------------------------

func XTclpObjRenameFile(tls *libc.TLS, srcPathPtr uintptr, destPathPtr uintptr) int32 { /* tclWinFCmd.c:144:1: */
	return sDoRenameFile(tls, XTcl_FSGetNativePath(tls, srcPathPtr),
		XTcl_FSGetNativePath(tls, destPathPtr))
}

func sDoRenameFile(tls *libc.TLS, nativeSrc uintptr, nativeDst uintptr) int32 { /* tclWinFCmd.c:153:1: */
	bp := tls.Alloc(2048)
	defer tls.Free(2048)

	var srcAttr DWORD
	var dstAttr DWORD
	var retval int32
	// var nativeSrcRest uintptr at bp+520, 8

	// var nativeDstRest uintptr at bp+1048, 8

	// var srcArgv uintptr at bp+1496, 8

	// var dstArgv uintptr at bp+1512, 8

	var size int32
	// var srcArgc int32 at bp+1488, 4

	// var dstArgc int32 at bp+1504, 4

	// var nativeSrcPath [260]WCHAR at bp, 520

	// var nativeDstPath [260]WCHAR at bp+528, 520

	// var srcString Tcl_DString at bp+1056, 216

	// var dstString Tcl_DString at bp+1272, 216

	var src uintptr
	var dst uintptr
	// Overwrite existing file by:
	//
	// 1. Rename existing file to temp name.
	// 2. Rename old file to new name.
	// 3. If success, delete temp file. If failure, put temp file
	//    back to old name.

	// var nativeRest uintptr at bp+2040, 8

	var nativeTmp uintptr
	var nativePrefix uintptr
	var result int32
	var size1 int32
	// var tempBuf [260]WCHAR at bp+1520, 520
	retval = -1

	// The MoveFileW API acts differently under Win95/98 and NT WRT NULL and
	// "". Avoid passing these values.

	if !(nativeSrc == uintptr(0) || int32(*(*WCHAR)(unsafe.Pointer(nativeSrc))) == 0 || nativeDst == uintptr(0) || int32(*(*WCHAR)(unsafe.Pointer(nativeDst))) == 0) {
		goto __1
	}
	XTcl_SetErrno(tls, ENOENT)
	return TCL_ERROR
__1:
	;

	// The MoveFileW API would throw an exception under NT if one of the
	// arguments is a char block device.

	if !(libc.XMoveFileW(tls, nativeSrc, nativeDst) != FALSE) {
		goto __2
	}
	retval = TCL_OK
__2:
	;

	if !(retval != -1) {
		goto __3
	}
	return retval
__3:
	;

	XTclWinConvertError(tls, libc.XGetLastError(tls))

	srcAttr = libc.XGetFileAttributesW(tls, nativeSrc)
	dstAttr = libc.XGetFileAttributesW(tls, nativeDst)
	if !(srcAttr == 0xFFFFFFFF) {
		goto __4
	}
	if !(libc.XGetFullPathNameW(tls, nativeSrc, uint32(0), uintptr(0),
		uintptr(0)) >= DWORD(MAX_PATH)) {
		goto __5
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = ENAMETOOLONG
	return TCL_ERROR
__5:
	;
	srcAttr = DWORD(0)
__4:
	;
	if !(dstAttr == 0xFFFFFFFF) {
		goto __6
	}
	if !(libc.XGetFullPathNameW(tls, nativeDst, uint32(0), uintptr(0),
		uintptr(0)) >= DWORD(MAX_PATH)) {
		goto __7
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = ENAMETOOLONG
	return TCL_ERROR
__7:
	;
	dstAttr = DWORD(0)
__6:
	;

	if !(*(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EBADF) {
		goto __8
	}
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EACCES
	return TCL_ERROR
__8:
	;
	if !(*(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EACCES) {
		goto __9
	}
decode:
	if !(srcAttr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0) {
		goto __11
	}

	size = int32(libc.XGetFullPathNameW(tls, nativeSrc, uint32(MAX_PATH),
		bp, bp+520))
	if !(size == 0 || size > MAX_PATH) {
		goto __12
	}
	return TCL_ERROR
__12:
	;
	size = int32(libc.XGetFullPathNameW(tls, nativeDst, uint32(MAX_PATH),
		bp+528, bp+1048))
	if !(size == 0 || size > MAX_PATH) {
		goto __13
	}
	return TCL_ERROR
__13:
	;
	libc.XCharLowerW(tls, bp)
	libc.XCharLowerW(tls, bp+528)

	src = XTcl_WinTCharToUtf(tls, bp, -1, bp+1056)
	dst = XTcl_WinTCharToUtf(tls, bp+528, -1, bp+1272)

	// Check whether the destination path is actually inside the
	// source path. This is true if the prefix matches, and the next
	// character is either end-of-string or a directory separator

	if !(libc.Xstrncmp(tls, src, dst, uint64((*Tcl_DString)(unsafe.Pointer(bp+1056)).Flength)) == 0 &&
		(int32(*(*int8)(unsafe.Pointer(dst + uintptr((*Tcl_DString)(unsafe.Pointer(bp+1056)).Flength)))) == '\\' ||
			int32(*(*int8)(unsafe.Pointer(dst + uintptr((*Tcl_DString)(unsafe.Pointer(bp+1056)).Flength)))) == '/' ||
			int32(*(*int8)(unsafe.Pointer(dst + uintptr((*Tcl_DString)(unsafe.Pointer(bp+1056)).Flength)))) == 0)) {
		goto __14
	}
	// Trying to move a directory into itself.

	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EINVAL
	XTcl_DStringFree(tls, bp+1056)
	XTcl_DStringFree(tls, bp+1272)
	return TCL_ERROR
__14:
	;
	XTcl_SplitPath(tls, src, bp+1488, bp+1496)
	XTcl_SplitPath(tls, dst, bp+1504, bp+1512)
	XTcl_DStringFree(tls, bp+1056)
	XTcl_DStringFree(tls, bp+1272)

	if !(*(*int32)(unsafe.Pointer(bp + 1488)) == 1) {
		goto __15
	}
	// They are trying to move a root directory. Whether or not it
	// is across filesystems, this cannot be done.

	XTcl_SetErrno(tls, EINVAL)
	goto __16
__15:
	if !(*(*int32)(unsafe.Pointer(bp + 1488)) > 0 && *(*int32)(unsafe.Pointer(bp + 1504)) > 0 && libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1496)))), *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1512))))) != 0) {
		goto __17
	}
	// If src is a directory and dst filesystem != src filesystem,
	// errno should be EXDEV. It is very important to get this
	// behavior, so that the caller can respond to a cross
	// filesystem rename by simulating it with copy and delete.
	// The MoveFileW system call already handles the case of moving
	// a file between filesystems.

	XTcl_SetErrno(tls, EXDEV)
__17:
	;
__16:
	;

	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 1496)))
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 1512)))
__11:
	;

	// Other types of access failure is that dst is a read-only
	// filesystem, that an open file referred to src or dest, or that src
	// or dest specified the current working directory on the current
	// filesystem. EACCES is returned for those cases.

	goto __10
__9:
	if !(XTcl_GetErrno(tls) == EEXIST) {
		goto __18
	}
	// Reports EEXIST any time the target already exists. If it makes
	// sense, remove the old file and try renaming again.

	if !(srcAttr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0) {
		goto __19
	}
	if !(dstAttr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0) {
		goto __21
	}
	// Overwrite empty dst directory with src directory. The
	// following call will remove an empty directory. If it fails,
	// it's because it wasn't empty.

	if !(sDoRemoveJustDirectory(tls, nativeDst, 0, uintptr(0)) == TCL_OK) {
		goto __23
	}
	// Now that that empty directory is gone, we can try
	// renaming again. If that fails, we'll put this empty
	// directory back, for completeness.

	if !(libc.XMoveFileW(tls, nativeSrc,
		nativeDst) != FALSE) {
		goto __24
	}
	return TCL_OK
__24:
	;

	// Some new error has occurred. Don't know what it could
	// be, but report this one.

	XTclWinConvertError(tls, libc.XGetLastError(tls))
	libc.XCreateDirectoryW(tls, nativeDst, uintptr(0))
	libc.XSetFileAttributesW(tls, nativeDst, dstAttr)
	if !(XTcl_GetErrno(tls) == EACCES) {
		goto __25
	}
	// Decode the EACCES to a more meaningful error.

	goto decode
__25:
	;
__23:
	;
	goto __22
__21: // (dstAttr & FILE_ATTRIBUTE_DIRECTORY) == 0
	XTcl_SetErrno(tls, ENOTDIR)
__22:
	;
	goto __20
__19: // (srcAttr & FILE_ATTRIBUTE_DIRECTORY) == 0
	if !(dstAttr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0) {
		goto __26
	}
	XTcl_SetErrno(tls, EISDIR)
	goto __27
__26:

	size1 = int32(libc.XGetFullPathNameW(tls, nativeDst, uint32(MAX_PATH),
		bp+1520, bp+2040))
	if !(size1 == 0 || size1 > MAX_PATH || *(*uintptr)(unsafe.Pointer(bp + 2040)) == uintptr(0)) {
		goto __28
	}
	return TCL_ERROR
__28:
	;
	nativeTmp = bp + 1520 /* tempBuf */
	*(*WCHAR)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2040 /* nativeRest */)))) = 0

	result = TCL_ERROR
	nativePrefix = wtext + 372
	if !(libc.XGetTempFileNameW(tls, nativeTmp, nativePrefix,
		uint32(0), bp+1520) != UINT(0)) {
		goto __29
	}
	// Strictly speaking, need the following DeleteFile and
	// MoveFileW to be joined as an atomic operation so no
	// other app comes along in the meantime and creates the
	// same temp file.

	nativeTmp = bp + 1520 /* &tempBuf[0] */
	libc.XDeleteFileW(tls, nativeTmp)
	if !(libc.XMoveFileW(tls, nativeDst, nativeTmp) != FALSE) {
		goto __30
	}
	if !(libc.XMoveFileW(tls, nativeSrc, nativeDst) != FALSE) {
		goto __31
	}
	libc.XSetFileAttributesW(tls, nativeTmp, uint32(FILE_ATTRIBUTE_NORMAL))
	libc.XDeleteFileW(tls, nativeTmp)
	return TCL_OK
	goto __32
__31:
	libc.XDeleteFileW(tls, nativeDst)
	libc.XMoveFileW(tls, nativeTmp, nativeDst)
__32:
	;
__30:
	;

	// Can't backup dst file or move src file. Return that
	// error. Could happen if an open file refers to dst.

	XTclWinConvertError(tls, libc.XGetLastError(tls))
	if !(XTcl_GetErrno(tls) == EACCES) {
		goto __33
	}
	// Decode the EACCES to a more meaningful error.

	goto decode
__33:
	;
__29:
	;
	return result
__27:
	;
__20:
	;
__18:
	;
__10:
	;
	return TCL_ERROR
}

//---------------------------------------------------------------------------
//
// TclpObjCopyFile, DoCopyFile --
//
//	Copy a single file (not a directory). If dst already exists and is not
//	a directory, it is removed.
//
// Results:
//	If the file was successfully copied, returns TCL_OK. Otherwise the
//	return value is TCL_ERROR and errno is set to indicate the error.
//	Some possible values for errno are:
//
//	EACCES:	    src or dst parent directory can't be read and/or written.
//	EISDIR:	    src or dst is a directory.
//	ENOENT:	    src doesn't exist.	src or dst is "".
//
//	EACCES:	    exists an open file already referring to dst (95).
//	EACCES:	    src specifies a char device (nul:, com1:, etc.) (NT)
//	ENOENT:	    src specifies a char device (nul:, com1:, etc.) (95)
//
// Side effects:
//	It is not an error to copy to a char device.
//
//---------------------------------------------------------------------------

func XTclpObjCopyFile(tls *libc.TLS, srcPathPtr uintptr, destPathPtr uintptr) int32 { /* tclWinFCmd.c:533:1: */
	return sDoCopyFile(tls, XTcl_FSGetNativePath(tls, srcPathPtr),
		XTcl_FSGetNativePath(tls, destPathPtr))
}

func sDoCopyFile(tls *libc.TLS, nativeSrc uintptr, nativeDst uintptr) int32 { /* tclWinFCmd.c:542:1: */
	var retval int32 = -1

	// The CopyFile API acts differently under Win95/98 and NT WRT NULL and
	// "". Avoid passing these values.

	if nativeSrc == uintptr(0) || int32(*(*WCHAR)(unsafe.Pointer(nativeSrc))) == 0 || nativeDst == uintptr(0) || int32(*(*WCHAR)(unsafe.Pointer(nativeDst))) == 0 {
		XTcl_SetErrno(tls, ENOENT)
		return TCL_ERROR
	}

	// The CopyFile API would throw an exception under NT if one of the
	// arguments is a char block device.

	if libc.XCopyFileW(tls, nativeSrc, nativeDst, 0) != FALSE {
		retval = TCL_OK
	}

	if retval != -1 {
		return retval
	}

	XTclWinConvertError(tls, libc.XGetLastError(tls))
	if XTcl_GetErrno(tls) == EBADF {
		XTcl_SetErrno(tls, EACCES)
		return TCL_ERROR
	}
	if XTcl_GetErrno(tls) == EACCES {
		var srcAttr DWORD
		var dstAttr DWORD

		srcAttr = libc.XGetFileAttributesW(tls, nativeSrc)
		dstAttr = libc.XGetFileAttributesW(tls, nativeDst)
		if srcAttr != 0xFFFFFFFF {
			if dstAttr == 0xFFFFFFFF {
				dstAttr = DWORD(0)
			}
			if srcAttr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 || dstAttr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 {
				if srcAttr&DWORD(FILE_ATTRIBUTE_REPARSE_POINT) != 0 {
					// Source is a symbolic link -- copy it
					if XTclWinSymLinkCopyDirectory(tls, nativeSrc, nativeDst) == 0 {
						return TCL_OK
					}
				}
				XTcl_SetErrno(tls, EISDIR)
			}
			if dstAttr&DWORD(FILE_ATTRIBUTE_READONLY) != 0 {
				libc.XSetFileAttributesW(tls, nativeDst,
					dstAttr&libc.CplUint32(DWORD(FILE_ATTRIBUTE_READONLY)))
				if libc.XCopyFileW(tls, nativeSrc, nativeDst,
					0) != FALSE {
					return TCL_OK
				}

				// Still can't copy onto dst. Return that error, and restore
				// attributes of dst.

				XTclWinConvertError(tls, libc.XGetLastError(tls))
				libc.XSetFileAttributesW(tls, nativeDst, dstAttr)
			}
		}
	}
	return TCL_ERROR
}

//---------------------------------------------------------------------------
//
// TclpObjDeleteFile, TclpDeleteFile --
//
//	Removes a single file (not a directory).
//
// Results:
//	If the file was successfully deleted, returns TCL_OK. Otherwise the
//	return value is TCL_ERROR and errno is set to indicate the error.
//	Some possible values for errno are:
//
//	EACCES:	    a parent directory can't be read and/or written.
//	EISDIR:	    path is a directory.
//	ENOENT:	    path doesn't exist or is "".
//
//	EACCES:	    exists an open file already referring to path.
//	EACCES:	    path is a char device (nul:, com1:, etc.)
//
// Side effects:
//	The file is deleted, even if it is read-only.
//
//---------------------------------------------------------------------------

func XTclpObjDeleteFile(tls *libc.TLS, pathPtr uintptr) int32 { /* tclWinFCmd.c:741:1: */
	return XTclpDeleteFile(tls, XTcl_FSGetNativePath(tls, pathPtr))
}

func XTclpDeleteFile(tls *libc.TLS, nativePath uintptr) int32 { /* tclWinFCmd.c:748:1: */
	var attr DWORD
	var path uintptr = nativePath

	// The DeleteFile API acts differently under Win95/98 and NT WRT NULL and
	// "". Avoid passing these values.

	if path == uintptr(0) || int32(*(*WCHAR)(unsafe.Pointer(path))) == 0 {
		XTcl_SetErrno(tls, ENOENT)
		return TCL_ERROR
	}

	if libc.XDeleteFileW(tls, path) != FALSE {
		return TCL_OK
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))

	if XTcl_GetErrno(tls) == EACCES {
		attr = libc.XGetFileAttributesW(tls, path)
		if attr != 0xFFFFFFFF {
			if attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 {
				if attr&DWORD(FILE_ATTRIBUTE_REPARSE_POINT) != 0 {
					// It is a symbolic link - remove it.
					if XTclWinSymLinkDelete(tls, path, 0) == 0 {
						return TCL_OK
					}
				}

				// If we fall through here, it is a directory.
				//
				// Windows NT reports removing a directory as EACCES instead
				// of EISDIR.

				XTcl_SetErrno(tls, EISDIR)
			} else if attr&DWORD(FILE_ATTRIBUTE_READONLY) != 0 {
				var res int32 = libc.XSetFileAttributesW(tls, path,
					attr&libc.CplUint32(DWORD(FILE_ATTRIBUTE_READONLY)))

				if res != 0 && libc.XDeleteFileW(tls, path) != FALSE {
					return TCL_OK
				}
				XTclWinConvertError(tls, libc.XGetLastError(tls))
				if res != 0 {
					libc.XSetFileAttributesW(tls, path, attr)
				}
			}
		}
	} else if XTcl_GetErrno(tls) == ENOENT {
		attr = libc.XGetFileAttributesW(tls, path)
		if attr != 0xFFFFFFFF {
			if attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 {
				// Windows 95 reports removing a directory as ENOENT instead
				// of EISDIR.

				XTcl_SetErrno(tls, EISDIR)
			}
		}
	} else if XTcl_GetErrno(tls) == EINVAL {
		// Windows NT reports removing a char device as EINVAL instead of
		// EACCES.

		XTcl_SetErrno(tls, EACCES)
	}

	return TCL_ERROR
}

//---------------------------------------------------------------------------
//
// TclpObjCreateDirectory --
//
//	Creates the specified directory. All parent directories of the
//	specified directory must already exist. The directory is automatically
//	created with permissions so that user can access the new directory and
//	create new files or subdirectories in it.
//
// Results:
//	If the directory was successfully created, returns TCL_OK. Otherwise
//	the return value is TCL_ERROR and errno is set to indicate the error.
//	Some possible values for errno are:
//
//	EACCES:	    a parent directory can't be read and/or written.
//	EEXIST:	    path already exists.
//	ENOENT:	    a parent directory doesn't exist.
//
// Side effects:
//	A directory is created.
//
//---------------------------------------------------------------------------

func XTclpObjCreateDirectory(tls *libc.TLS, pathPtr uintptr) int32 { /* tclWinFCmd.c:854:1: */
	return sDoCreateDirectory(tls, XTcl_FSGetNativePath(tls, pathPtr))
}

func sDoCreateDirectory(tls *libc.TLS, nativePath uintptr) int32 { /* tclWinFCmd.c:861:1: */
	if libc.XCreateDirectoryW(tls, nativePath, uintptr(0)) == 0 {
		var error DWORD = libc.XGetLastError(tls)

		XTclWinConvertError(tls, error)
		return TCL_ERROR
	}
	return TCL_OK
}

//---------------------------------------------------------------------------
//
// TclpObjCopyDirectory --
//
//	Recursively copies a directory. The target directory dst must not
//	already exist. Note that this function does not merge two directory
//	hierarchies, even if the target directory is an an empty directory.
//
// Results:
//	If the directory was successfully copied, returns TCL_OK. Otherwise
//	the return value is TCL_ERROR, errno is set to indicate the error, and
//	the pathname of the file that caused the error is stored in errorPtr.
//	See TclpCreateDirectory and TclpCopyFile for a description of possible
//	values for errno.
//
// Side effects:
//	An exact copy of the directory hierarchy src will be created with the
//	name dst. If an error occurs, the error will be returned immediately,
//	and remaining files will not be processed.
//
//---------------------------------------------------------------------------

func XTclpObjCopyDirectory(tls *libc.TLS, srcPathPtr uintptr, destPathPtr uintptr, errorPtr uintptr) int32 { /* tclWinFCmd.c:898:1: */
	bp := tls.Alloc(648)
	defer tls.Free(648)

	// var ds Tcl_DString at bp+432, 216

	// var srcString Tcl_DString at bp, 216

	// var dstString Tcl_DString at bp+216, 216

	var normSrcPtr uintptr
	var normDestPtr uintptr
	var ret int32

	normSrcPtr = XTcl_FSGetNormalizedPath(tls, uintptr(0), srcPathPtr)
	normDestPtr = XTcl_FSGetNormalizedPath(tls, uintptr(0), destPathPtr)
	if normSrcPtr == uintptr(0) || normDestPtr == uintptr(0) {
		return TCL_ERROR
	}

	XTcl_WinUtfToTChar(tls, XTcl_GetString(tls, normSrcPtr), -1, bp)
	XTcl_WinUtfToTChar(tls, XTcl_GetString(tls, normDestPtr), -1, bp+216)

	ret = sTraverseWinTree(tls, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	}{sTraversalCopy})), bp /* &srcString */, bp+216 /* &dstString */, bp+432 /* &ds */)

	XTcl_DStringFree(tls, bp)
	XTcl_DStringFree(tls, bp+216)

	if ret != TCL_OK {
		if !(libc.Xstrcmp(tls, (*Tcl_DString)(unsafe.Pointer(bp+432)).Fstring, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(normSrcPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(normSrcPtr)).Fbytes
			}
			return XTcl_GetString(tls, normSrcPtr)
		}()) != 0) {
			*(*uintptr)(unsafe.Pointer(errorPtr)) = srcPathPtr
		} else if !(libc.Xstrcmp(tls, (*Tcl_DString)(unsafe.Pointer(bp+432)).Fstring, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(normDestPtr)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(normDestPtr)).Fbytes
			}
			return XTcl_GetString(tls, normDestPtr)
		}()) != 0) {
			*(*uintptr)(unsafe.Pointer(errorPtr)) = destPathPtr
		} else {
			*(*uintptr)(unsafe.Pointer(errorPtr)) = XTcl_NewStringObj(tls, (*Tcl_DString)(unsafe.Pointer(bp+432)).Fstring, -1)
		}
		XTcl_DStringFree(tls, bp+432)
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(errorPtr)))).FrefCount++
	}
	return ret
}

//----------------------------------------------------------------------
//
// TclpObjRemoveDirectory, DoRemoveDirectory --
//
//	Removes directory (and its contents, if the recursive flag is set).
//
// Results:
//	If the directory was successfully removed, returns TCL_OK. Otherwise
//	the return value is TCL_ERROR, errno is set to indicate the error, and
//	the pathname of the file that caused the error is stored in errorPtr.
//	Some possible values for errno are:
//
//	EACCES:	    path directory can't be read and/or written.
//	EEXIST:	    path is a non-empty directory.
//	EINVAL:	    path is root directory or current directory.
//	ENOENT:	    path doesn't exist or is "".
//	ENOTDIR:    path is not a directory.
//
//	EACCES:	    path is a char device (nul:, com1:, etc.) (95)
//	EINVAL:	    path is a char device (nul:, com1:, etc.) (NT)
//
// Side effects:
//	Directory removed. If an error occurs, the error will be returned
//	immediately, and remaining files will not be deleted.
//
//----------------------------------------------------------------------

func XTclpObjRemoveDirectory(tls *libc.TLS, pathPtr uintptr, recursive int32, errorPtr uintptr) int32 { /* tclWinFCmd.c:966:1: */
	bp := tls.Alloc(432)
	defer tls.Free(432)

	// var ds Tcl_DString at bp+216, 216

	var normPtr uintptr = uintptr(0)
	var ret int32

	if recursive != 0 {
		// In the recursive case, the string rep is used to construct a
		// Tcl_DString which may be used extensively, so we can't optimize
		// this case easily.

		// var native Tcl_DString at bp, 216

		normPtr = XTcl_FSGetNormalizedPath(tls, uintptr(0), pathPtr)
		if normPtr == uintptr(0) {
			return TCL_ERROR
		}
		XTcl_WinUtfToTChar(tls, XTcl_GetString(tls, normPtr), -1, bp)
		ret = sDoRemoveDirectory(tls, bp, recursive, bp+216)
		XTcl_DStringFree(tls, bp)
	} else {
		ret = sDoRemoveJustDirectory(tls, XTcl_FSGetNativePath(tls, pathPtr), 0, bp+216)
	}

	if ret != TCL_OK {
		if (*Tcl_DString)(unsafe.Pointer(bp+216)).Flength > 0 {
			if normPtr != uintptr(0) && !(libc.Xstrcmp(tls, (*Tcl_DString)(unsafe.Pointer(bp+216)).Fstring, func() uintptr {
				if (*Tcl_Obj)(unsafe.Pointer(normPtr)).Fbytes != 0 {
					return (*Tcl_Obj)(unsafe.Pointer(normPtr)).Fbytes
				}
				return XTcl_GetString(tls, normPtr)
			}()) != 0) {
				*(*uintptr)(unsafe.Pointer(errorPtr)) = pathPtr
			} else {
				*(*uintptr)(unsafe.Pointer(errorPtr)) = XTclDStringToObj(tls, bp+216)
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(errorPtr)))).FrefCount++
		}
		XTcl_DStringFree(tls, bp+216)
	}

	return ret
}

func sDoRemoveJustDirectory(tls *libc.TLS, nativePath uintptr, ignoreError int32, errorPtr uintptr) int32 { /* tclWinFCmd.c:1011:1: */
	var attr DWORD
	var p uintptr

	// The RemoveDirectory API acts differently under Win95/98 and NT WRT NULL
	// and "". Avoid passing these values.

	if !(nativePath == uintptr(0) || int32(*(*WCHAR)(unsafe.Pointer(nativePath))) == 0) {
		goto __1
	}
	XTcl_SetErrno(tls, ENOENT)
	XTcl_DStringInit(tls, errorPtr)
	return TCL_ERROR
__1:
	;

	attr = libc.XGetFileAttributesW(tls, nativePath)

	if !(attr&DWORD(FILE_ATTRIBUTE_REPARSE_POINT) != 0) {
		goto __2
	}
	// It is a symbolic link - remove it.
	if !(XTclWinSymLinkDelete(tls, nativePath, 0) == 0) {
		goto __4
	}
	return TCL_OK
__4:
	;
	goto __3
__2:
	// Ordinary directory.

	if !(libc.XRemoveDirectoryW(tls, nativePath) != FALSE) {
		goto __5
	}
	return TCL_OK
__5:
	;
__3:
	;

	XTclWinConvertError(tls, libc.XGetLastError(tls))

	if !(XTcl_GetErrno(tls) == EACCES) {
		goto __6
	}
	attr = libc.XGetFileAttributesW(tls, nativePath)
	if !(attr != 0xFFFFFFFF) {
		goto __7
	}
	if !(attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) == DWORD(0)) {
		goto __8
	}
	// Windows 95 reports calling RemoveDirectory on a file as an
	// EACCES, not an ENOTDIR.

	XTcl_SetErrno(tls, ENOTDIR)
	goto end
__8:
	;

	if !(attr&DWORD(FILE_ATTRIBUTE_REPARSE_POINT) != 0) {
		goto __9
	}
	// It is a symbolic link - remove it.

	if !(XTclWinSymLinkDelete(tls, nativePath, 1) != 0) {
		goto __10
	}
	goto end
__10:
	;
__9:
	;

	if !(attr&DWORD(FILE_ATTRIBUTE_READONLY) != 0) {
		goto __11
	}
	attr = attr & libc.Uint32FromInt32(libc.CplInt32(FILE_ATTRIBUTE_READONLY))
	if !(libc.XSetFileAttributesW(tls, nativePath,
		attr) == FALSE) {
		goto __12
	}
	goto end
__12:
	;
	if !(libc.XRemoveDirectoryW(tls, nativePath) != FALSE) {
		goto __13
	}
	return TCL_OK
__13:
	;
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	libc.XSetFileAttributesW(tls, nativePath,
		attr|DWORD(FILE_ATTRIBUTE_READONLY))
__11:
	;
__7:
	;
__6:
	;

	if !(XTcl_GetErrno(tls) == ENOTEMPTY) {
		goto __14
	}
	// The caller depends on EEXIST to signify that the directory is not
	// empty, not ENOTEMPTY.

	XTcl_SetErrno(tls, EEXIST)
__14:
	;

	if !(ignoreError != 0 && XTcl_GetErrno(tls) == EEXIST) {
		goto __15
	}
	// If we're being recursive, this error may actually be ok, so we
	// don't want to initialise the errorPtr yet.
	return TCL_ERROR
__15:
	;

end:
	if !(errorPtr != uintptr(0)) {
		goto __16
	}
	p = XTcl_WinTCharToUtf(tls, nativePath, -1, errorPtr)
__17:
	if !(*(*int8)(unsafe.Pointer(p)) != 0) {
		goto __19
	}
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '\\') {
		goto __20
	}
	*(*int8)(unsafe.Pointer(p)) = int8('/')
__20:
	;
	goto __18
__18:
	p++
	goto __17
	goto __19
__19:
	;
__16:
	;
	return TCL_ERROR

}

func sDoRemoveDirectory(tls *libc.TLS, pathPtr uintptr, recursive int32, errorPtr uintptr) int32 { /* tclWinFCmd.c:1122:1: */
	var res int32 = sDoRemoveJustDirectory(tls, (*Tcl_DString)(unsafe.Pointer(pathPtr)).Fstring, recursive,
		errorPtr)

	if res == TCL_ERROR && recursive != 0 && XTcl_GetErrno(tls) == EEXIST {
		// The directory is nonempty, but the recursive flag has been
		// specified, so we recursively remove all the files in the directory.

		return sTraverseWinTree(tls, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
		}{sTraversalDelete})), pathPtr, uintptr(0), errorPtr)
	} else {
		return res
	}
	return int32(0)
}

//---------------------------------------------------------------------------
//
// TraverseWinTree --
//
//	Traverse directory tree specified by sourcePtr, calling the function
//	traverseProc for each file and directory encountered. If destPtr is
//	non-null, each of name in the sourcePtr directory is appended to the
//	directory specified by destPtr and passed as the second argument to
//	traverseProc().
//
// Results:
//	Standard Tcl result.
//
// Side effects:
//	None caused by TraverseWinTree, however the user specified
//	traverseProc() may change state. If an error occurs, the error will be
//	returned immediately, and remaining files will not be processed.
//
//---------------------------------------------------------------------------

func sTraverseWinTree(tls *libc.TLS, traverseProc uintptr, sourcePtr uintptr, targetPtr uintptr, errorPtr uintptr) int32 { /* tclWinFCmd.c:1170:1: */
	bp := tls.Alloc(592)
	defer tls.Free(592)

	var sourceAttr DWORD
	var nativeSource uintptr
	var nativeTarget uintptr
	var nativeErrfile uintptr
	var result int32
	var found int32
	var sourceLen int32
	var targetLen int32
	var oldSourceLen int32
	var oldTargetLen int32
	var handle HANDLE
	// var data WIN32_FIND_DATAW at bp, 592

	var nativeName uintptr
	var len Size_t
	var wp uintptr
	targetLen = 0

	nativeErrfile = uintptr(0)
	result = TCL_OK
	oldTargetLen = 0 // lint.

	nativeSource = (*Tcl_DString)(unsafe.Pointer(sourcePtr)).Fstring
	nativeTarget = func() uintptr {
		if targetPtr == uintptr(0) {
			return uintptr(0)
		}
		return (*Tcl_DString)(unsafe.Pointer(targetPtr)).Fstring
	}()

	oldSourceLen = (*Tcl_DString)(unsafe.Pointer(sourcePtr)).Flength
	sourceAttr = libc.XGetFileAttributesW(tls, nativeSource)
	if !(sourceAttr == 0xFFFFFFFF) {
		goto __1
	}
	nativeErrfile = nativeSource
	goto end
__1:
	;

	if !(sourceAttr&DWORD(FILE_ATTRIBUTE_REPARSE_POINT) != 0) {
		goto __2
	}
	// Process the symbolic link

	return (*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{traverseProc})).f(tls, nativeSource, nativeTarget, DOTREE_LINK,
		errorPtr)
__2:
	;

	if !(sourceAttr&DWORD(FILE_ATTRIBUTE_DIRECTORY) == DWORD(0)) {
		goto __3
	}
	// Process the regular file

	return (*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{traverseProc})).f(tls, nativeSource, nativeTarget, DOTREE_F, errorPtr)
__3:
	;

	XTcl_DStringAppend(tls, sourcePtr, wtext+382, int32(uint64(4)*uint64(unsafe.Sizeof(WCHAR(0)))+uint64(1)))
	XTcl_DStringSetLength(tls, sourcePtr, (*Tcl_DString)(unsafe.Pointer(sourcePtr)).Flength-1)

	nativeSource = (*Tcl_DString)(unsafe.Pointer(sourcePtr)).Fstring
	handle = libc.XFindFirstFileW(tls, nativeSource, bp)
	if !(handle == libc.UintptrFromInt64(int64(-1))) {
		goto __4
	}
	// Can't read directory.

	XTclWinConvertError(tls, libc.XGetLastError(tls))
	nativeErrfile = nativeSource
	goto end
__4:
	;

	XTcl_DStringSetLength(tls, sourcePtr, oldSourceLen+1)
	XTcl_DStringSetLength(tls, sourcePtr, oldSourceLen)
	result = (*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{traverseProc})).f(tls, nativeSource, nativeTarget, DOTREE_PRED,
		errorPtr)
	if !(result != TCL_OK) {
		goto __5
	}
	libc.XFindClose(tls, handle)
	return result
__5:
	;

	sourceLen = int32(uint64(oldSourceLen) + uint64(unsafe.Sizeof(WCHAR(0))))
	XTcl_DStringAppend(tls, sourcePtr, wtext+392, int32(uint64(unsafe.Sizeof(WCHAR(0)))+uint64(1)))
	XTcl_DStringSetLength(tls, sourcePtr, sourceLen)
	if !(targetPtr != uintptr(0)) {
		goto __6
	}
	oldTargetLen = (*Tcl_DString)(unsafe.Pointer(targetPtr)).Flength

	targetLen = oldTargetLen
	targetLen = int32(uint64(targetLen) + uint64(unsafe.Sizeof(WCHAR(0))))
	XTcl_DStringAppend(tls, targetPtr, wtext+392, int32(uint64(unsafe.Sizeof(WCHAR(0)))+uint64(1)))
	XTcl_DStringSetLength(tls, targetPtr, targetLen)
__6:
	;

	found = 1
__7:
	if !(found != 0) {
		goto __9
	}

	wp = bp + 44
	if !(int32(*(*WCHAR)(unsafe.Pointer(wp))) == '.') {
		goto __10
	}
	wp += 2
	if !(int32(*(*WCHAR)(unsafe.Pointer(wp))) == '.') {
		goto __11
	}
	wp += 2
__11:
	;
	if !(int32(*(*WCHAR)(unsafe.Pointer(wp))) == 0) {
		goto __12
	}
	goto __8
__12:
	;
__10:
	;
	nativeName = bp + 44
	len = libc.Xwcslen(tls, bp+44) * Size_t(unsafe.Sizeof(WCHAR(0)))

	// Append name after slash, and recurse on the file.

	XTcl_DStringAppend(tls, sourcePtr, nativeName, int32(len+uint64(1)))
	XTcl_DStringSetLength(tls, sourcePtr, (*Tcl_DString)(unsafe.Pointer(sourcePtr)).Flength-1)
	if !(targetPtr != uintptr(0)) {
		goto __13
	}
	XTcl_DStringAppend(tls, targetPtr, nativeName, int32(len+uint64(1)))
	XTcl_DStringSetLength(tls, targetPtr, (*Tcl_DString)(unsafe.Pointer(targetPtr)).Flength-1)
__13:
	;
	result = sTraverseWinTree(tls, traverseProc, sourcePtr, targetPtr,
		errorPtr)
	if !(result != TCL_OK) {
		goto __14
	}
	goto __9
__14:
	;

	// Remove name after slash.

	XTcl_DStringSetLength(tls, sourcePtr, sourceLen)
	if !(targetPtr != uintptr(0)) {
		goto __15
	}
	XTcl_DStringSetLength(tls, targetPtr, targetLen)
__15:
	;
	goto __8
__8:
	found = libc.XFindNextFileW(tls, handle, bp)
	goto __7
	goto __9
__9:
	;
	libc.XFindClose(tls, handle)

	// Strip off the trailing slash we added.

	XTcl_DStringSetLength(tls, sourcePtr, oldSourceLen+1)
	XTcl_DStringSetLength(tls, sourcePtr, oldSourceLen)
	if !(targetPtr != uintptr(0)) {
		goto __16
	}
	XTcl_DStringSetLength(tls, targetPtr, oldTargetLen+1)
	XTcl_DStringSetLength(tls, targetPtr, oldTargetLen)
__16:
	;
	if !(result == TCL_OK) {
		goto __17
	}
	// Call traverseProc() on a directory after visiting all the
	// files in that directory.

	result = (*struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{traverseProc})).f(tls, (*Tcl_DString)(unsafe.Pointer(sourcePtr)).Fstring,
		func() uintptr {
			if targetPtr == uintptr(0) {
				return uintptr(0)
			}
			return (*Tcl_DString)(unsafe.Pointer(targetPtr)).Fstring
		}(),
		DOTREE_POSTD, errorPtr)
__17:
	;

end:
	if !(nativeErrfile != uintptr(0)) {
		goto __18
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	if !(errorPtr != uintptr(0)) {
		goto __19
	}
	XTcl_WinTCharToUtf(tls, nativeErrfile, -1, errorPtr)
__19:
	;
	result = TCL_ERROR
__18:
	;

	return result
}

//----------------------------------------------------------------------
//
// TraversalCopy
//
//	Called from TraverseUnixTree in order to execute a recursive copy of a
//	directory.
//
// Results:
//	Standard Tcl result.
//
// Side effects:
//	Depending on the value of type, src may be copied to dst.
//
//----------------------------------------------------------------------

func sTraversalCopy(tls *libc.TLS, nativeSrc uintptr, nativeDst uintptr, type1 int32, errorPtr uintptr) int32 { /* tclWinFCmd.c:1352:1: */
	switch type1 {
	case DOTREE_F:
		if sDoCopyFile(tls, nativeSrc, nativeDst) == TCL_OK {
			return TCL_OK
		}
		break
	case DOTREE_LINK:
		if XTclWinSymLinkCopyDirectory(tls, nativeSrc, nativeDst) == TCL_OK {
			return TCL_OK
		}
		break
	case DOTREE_PRED:
		if sDoCreateDirectory(tls, nativeDst) == TCL_OK {
			var attr DWORD = libc.XGetFileAttributesW(tls, nativeSrc)

			if libc.XSetFileAttributesW(tls, nativeDst,
				attr) != FALSE {
				return TCL_OK
			}
			XTclWinConvertError(tls, libc.XGetLastError(tls))
		}
		break
	case DOTREE_POSTD:
		return TCL_OK
	}

	// There shouldn't be a problem with src, because we already checked it to
	// get here.

	if errorPtr != uintptr(0) {
		XTcl_WinTCharToUtf(tls, nativeDst, -1, errorPtr)
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TraversalDelete --
//
//	Called by function TraverseWinTree for every file and directory that
//	it encounters in a directory hierarchy. This function unlinks files,
//	and removes directories after all the containing files have been
//	processed.
//
// Results:
//	Standard Tcl result.
//
// Side effects:
//	Files or directory specified by src will be deleted. If an error
//	occurs, the windows error is converted to a Posix error and errno is
//	set accordingly.
//
//----------------------------------------------------------------------

func sTraversalDelete(tls *libc.TLS, nativeSrc uintptr, dstPtr uintptr, type1 int32, errorPtr uintptr) int32 { /* tclWinFCmd.c:1418:1: */
	switch type1 {
	case DOTREE_F:
		if XTclpDeleteFile(tls, nativeSrc) == TCL_OK {
			return TCL_OK
		}
		break
	case DOTREE_LINK:
		if sDoRemoveJustDirectory(tls, nativeSrc, 0, uintptr(0)) == TCL_OK {
			return TCL_OK
		}
		break
	case DOTREE_PRED:
		return TCL_OK
	case DOTREE_POSTD:
		if sDoRemoveJustDirectory(tls, nativeSrc, 0, uintptr(0)) == TCL_OK {
			return TCL_OK
		}
		break
	}

	if errorPtr != uintptr(0) {
		XTcl_WinTCharToUtf(tls, nativeSrc, -1, errorPtr)
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// StatError --
//
//	Sets the object result with the appropriate error.
//
// Results:
//	None.
//
// Side effects:
//	The interp's object result is set with an error message based on the
//	objIndex, fileName and errno.
//
//----------------------------------------------------------------------

func sStatError(tls *libc.TLS, interp uintptr, fileName uintptr) { /* tclWinFCmd.c:1469:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	XTclWinConvertError(tls, libc.XGetLastError(tls))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+13360,
		libc.VaList(bp, func() uintptr {
			if (*Tcl_Obj)(unsafe.Pointer(fileName)).Fbytes != 0 {
				return (*Tcl_Obj)(unsafe.Pointer(fileName)).Fbytes
			}
			return XTcl_GetString(tls, fileName)
		}(), XTcl_PosixError(tls, interp))))
}

//----------------------------------------------------------------------
//
// GetWinFileAttributes --
//
//	Returns a Tcl_Obj containing the value of a file attribute. This
//	routine gets the -hidden, -readonly or -system attribute.
//
// Results:
//	Standard Tcl result and a Tcl_Obj in attributePtrPtr. The object will
//	have ref count 0. If the return value is not TCL_OK, attributePtrPtr
//	is not touched.
//
// Side effects:
//	A new object is allocated if the file is valid.
//
//----------------------------------------------------------------------

func sGetWinFileAttributes(tls *libc.TLS, interp uintptr, objIndex int32, fileName uintptr, attributePtrPtr uintptr) int32 { /* tclWinFCmd.c:1499:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var result DWORD
	var nativeName uintptr
	var attr int32

	nativeName = XTcl_FSGetNativePath(tls, fileName)
	result = libc.XGetFileAttributesW(tls, nativeName)

	if result == 0xFFFFFFFF {
		sStatError(tls, interp, fileName)
		return TCL_ERROR
	}

	attr = int32(result & DWORD(attributeArray[objIndex]))
	if objIndex == WIN_HIDDEN_ATTRIBUTE && attr != 0 {
		// It is hidden. However there is a bug on some Windows OSes in which
		// root volumes (drives) formatted as NTFS are declared hidden when
		// they are not (and cannot be).
		//
		// We test for, and fix that case, here.

		// var len int32 at bp, 4

		var str uintptr = XTcl_GetStringFromObj(tls, fileName, bp)

		if *(*int32)(unsafe.Pointer(bp)) < 4 {
			if *(*int32)(unsafe.Pointer(bp)) == 0 {
				// Not sure if this is possible, but we pass it on anyway.
			} else if *(*int32)(unsafe.Pointer(bp)) == 1 && (int32(*(*int8)(unsafe.Pointer(str))) == '/' || int32(*(*int8)(unsafe.Pointer(str))) == '\\') {
				// Path is pointing to the root volume.

				attr = 0
			} else if int32(*(*int8)(unsafe.Pointer(str + 1))) == ':' &&
				(*(*int32)(unsafe.Pointer(bp)) == 2 || (int32(*(*int8)(unsafe.Pointer(str + 2))) == '/' || int32(*(*int8)(unsafe.Pointer(str + 2))) == '\\')) {
				// Path is of the form 'x:' or 'x:/' or 'x:\'

				attr = 0
			}
		}
	}

	*(*uintptr)(unsafe.Pointer(attributePtrPtr)) = XTcl_NewIntObj(tls, libc.Bool32(attr != 0))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ConvertFileNameFormat --
//
//	Returns a Tcl_Obj containing either the long or short version of the
//	file name.
//
// Results:
//	Standard Tcl result and a Tcl_Obj in attributePtrPtr. The object will
//	have ref count 0. If the return value is not TCL_OK, attributePtrPtr
//	is not touched.
//
//	Warning: if you pass this function a drive name like 'c:' it will
//	actually return the current working directory on that drive. To avoid
//	this, make sure the drive name ends in a slash, like this 'c:/'.
//
// Side effects:
//	A new object is allocated if the file is valid.
//
//----------------------------------------------------------------------

func sConvertFileNameFormat(tls *libc.TLS, interp uintptr, objIndex int32, fileName uintptr, longShort int32, attributePtrPtr uintptr) int32 { /* tclWinFCmd.c:1580:1: */
	bp := tls.Alloc(1072)
	defer tls.Free(1072)

	// var pathc int32 at bp+8, 4

	var i int32
	var splitPath uintptr
	var _objPtr uintptr
	// var tempPath uintptr at bp+1064, 8

	// var ds Tcl_DString at bp+32, 216

	// var dsTemp Tcl_DString at bp+848, 216

	var nativeName uintptr
	var tempString uintptr
	// var tempLen int32 at bp+248, 4

	// var data WIN32_FIND_DATAW at bp+252, 592

	var handle HANDLE
	var attr DWORD
	// var elt uintptr at bp+16, 8

	var pathv uintptr
	// var pathLen int32 at bp+24, 4

	var _objPtr1 uintptr
	var _objPtr2 uintptr

	splitPath = XTcl_FSSplitPath(tls, fileName, bp+8)

	if !(splitPath == uintptr(0) || *(*int32)(unsafe.Pointer(bp + 8)) == 0) {
		goto __1
	}
	if !(interp != uintptr(0)) {
		goto __2
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+13252,
		libc.VaList(bp, XTcl_GetString(tls, fileName))))
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = ENOENT
	XTcl_PosixError(tls, interp)
__2:
	;
	goto cleanup
__1:
	;

	// We will decrement this again at the end.	 It is safer to do this in
	// case any of the calls below retain a reference to splitPath.

	(*Tcl_Obj)(unsafe.Pointer(splitPath)).FrefCount++

	i = 0
__3:
	if !(i < *(*int32)(unsafe.Pointer(bp + 8))) {
		goto __5
	}

	XTcl_ListObjIndex(tls, uintptr(0), splitPath, i, bp+16)

	pathv = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* elt */)), bp+24)
	if !(int32(*(*int8)(unsafe.Pointer(pathv))) == '/' || *(*int32)(unsafe.Pointer(bp + 24)) == 3 && int32(*(*int8)(unsafe.Pointer(pathv + 1))) == ':' ||
		libc.Xstrcmp(tls, pathv, ts+32094) == 0 || libc.Xstrcmp(tls, pathv, ts+68353) == 0) {
		goto __6
	}
	// Handle "/", "//machine/export", "c:/", "." or ".." by just
	// copying the string literally.  Uppercase the drive letter, just
	// because it looks better under Windows to do so.

simple:
	// Here we are modifying the string representation in place.
	//
	// I believe this is legal, since this won't affect any file
	// representation this thing may have.

	*(*int8)(unsafe.Pointer(pathv)) = int8(XTcl_UniCharToUpper(tls, int32(uint8(*(*int8)(unsafe.Pointer(pathv))))))
	goto __7
__6:

	*(*uintptr)(unsafe.Pointer(bp + 1064 /* tempPath */)) = XTcl_FSJoinPath(tls, splitPath, i+1)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1064)))).FrefCount++

	// We'd like to call Tcl_FSGetNativePath(tempPath) but that is
	// likely to lead to infinite loops.

	XTcl_DStringInit(tls, bp+32)
	tempString = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* tempPath */)), bp+248)
	nativeName = XTcl_WinUtfToTChar(tls, tempString, *(*int32)(unsafe.Pointer(bp + 248 /* tempLen */)), bp+32)
__8:
	_objPtr = *(*uintptr)(unsafe.Pointer(bp + 1064))
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __11
	}
	XTclFreeObj(tls, _objPtr)
__11:
	;
	goto __9
__9:
	if 0 != 0 {
		goto __8
	}
	goto __10
__10:
	;
	handle = libc.XFindFirstFileW(tls, nativeName, bp+252)
	if !(handle == libc.UintptrFromInt64(int64(-1))) {
		goto __12
	}
	// FindFirstFileW() doesn't like root directories. We would
	// only get a root directory here if the caller specified "c:"
	// or "c:." and the current directory on the drive was the
	// root directory

	attr = libc.XGetFileAttributesW(tls, nativeName)
	if !(attr != 0xFFFFFFFF && attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0) {
		goto __13
	}
	XTcl_DStringFree(tls, bp+32)
	goto simple
__13:
	;
__12:
	;

	if !(handle == libc.UintptrFromInt64(int64(-1))) {
		goto __14
	}
	XTcl_DStringFree(tls, bp+32)
	if !(interp != uintptr(0)) {
		goto __15
	}
	sStatError(tls, interp, fileName)
__15:
	;
	goto cleanup
__14:
	;
	nativeName = bp + 252 + 564
	if !(longShort != 0) {
		goto __16
	}
	if !(int32(*(*WCHAR)(unsafe.Pointer(bp + 252 + 44))) != 0) {
		goto __18
	}
	nativeName = bp + 252 + 44
__18:
	;
	goto __17
__16:
	if !(int32(*(*WCHAR)(unsafe.Pointer(bp + 252 + 564))) == 0) {
		goto __19
	}
	nativeName = bp + 252 + 44
__19:
	;
__17:
	;

	// Purify reports a extraneous UMR in Tcl_WinTCharToUtf() trying
	// to dereference nativeName as a Unicode string. I have proven to
	// myself that purify is wrong by running the following example
	// when nativeName == data.w.cAlternateFileName and noting that
	// purify doesn't complain about the first line, but does complain
	// about the second.
	//
	//	fprintf(stderr, "%d\n", data.w.cAlternateFileName[0]);
	//	fprintf(stderr, "%d\n", ((WCHAR *) nativeName)[0]);

	XTcl_DStringInit(tls, bp+848)
	XTcl_WinTCharToUtf(tls, nativeName, -1, bp+848)
	XTcl_DStringFree(tls, bp+32)

	// Deal with issues of tildes being absolute.

	if !(int32(*(*int8)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(bp + 848)).Fstring))) == '~') {
		goto __20
	}
__22:
	;
__25:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __28
	}
	XTclAllocateFreeObjects(tls)
__28:
	;
	*(*uintptr)(unsafe.Pointer(bp + 1064)) = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __26
__26:
	if 0 != 0 {
		goto __25
	}
	goto __27
__27:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1064)))).FrefCount = 0
	if !(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)) == 0) {
		goto __29
	}
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1064)))).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1064)))).Flength = 0
	goto __30
__29:
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1064)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))+1))
	libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1064)))).Fbytes, ts+31379, uint64(int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1))))
	*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1064)))).Fbytes + 2)) = int8(0)
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1064)))).Flength = int32(uint64(unsafe.Sizeof([3]int8{})) - uint64(1))
__30:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1064)))).FtypePtr = uintptr(0)

	goto __23
__23:
	if 0 != 0 {
		goto __22
	}
	goto __24
__24:
	;
	XTcl_AppendToObj(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* tempPath */)), (*Tcl_DString)(unsafe.Pointer(bp+848)).Fstring,
		(*Tcl_DString)(unsafe.Pointer(bp+848)).Flength)
	XTcl_DStringFree(tls, bp+848)
	goto __21
__20:
	*(*uintptr)(unsafe.Pointer(bp + 1064 /* tempPath */)) = XTclDStringToObj(tls, bp+848)
__21:
	;
	XTcl_ListObjReplace(tls, uintptr(0), splitPath, i, 1, 1, bp+1064)
	libc.XFindClose(tls, handle)
__7:
	;
	goto __4
__4:
	i++
	goto __3
	goto __5
__5:
	;

	*(*uintptr)(unsafe.Pointer(attributePtrPtr)) = XTcl_FSJoinPath(tls, splitPath, -1)

	if !(splitPath != uintptr(0)) {
		goto __31
	}
	// Unfortunately, the object we will return may have its only refCount
	// as part of the list splitPath. This means if we free splitPath, the
	// object will disappear. So, we have to be very careful here.
	// Unfortunately this means we must manipulate the object's refCount
	// directly.

	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(attributePtrPtr)))).FrefCount++
__32:
	_objPtr1 = splitPath
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr1)).FrefCount, 1) <= 1) {
		goto __35
	}
	XTclFreeObj(tls, _objPtr1)
__35:
	;
	goto __33
__33:
	if 0 != 0 {
		goto __32
	}
	goto __34
__34:
	;
	(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(attributePtrPtr)))).FrefCount--
__31:
	;
	return TCL_OK

cleanup:
	if !(splitPath != uintptr(0)) {
		goto __36
	}
__37:
	_objPtr2 = splitPath
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr2)).FrefCount, 1) <= 1) {
		goto __40
	}
	XTclFreeObj(tls, _objPtr2)
__40:
	;
	goto __38
__38:
	if 0 != 0 {
		goto __37
	}
	goto __39
__39:
	;
__36:
	;

	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// GetWinFileLongName --
//
//	Returns a Tcl_Obj containing the long version of the file name.
//
// Results:
//	Standard Tcl result and a Tcl_Obj in attributePtrPtr. The object will
//	have ref count 0. If the return value is not TCL_OK, attributePtrPtr
//	is not touched.
//
// Side effects:
//	A new object is allocated if the file is valid.
//
//----------------------------------------------------------------------

func sGetWinFileLongName(tls *libc.TLS, interp uintptr, objIndex int32, fileName uintptr, attributePtrPtr uintptr) int32 { /* tclWinFCmd.c:1769:1: */
	return sConvertFileNameFormat(tls, interp, objIndex, fileName, 1,
		attributePtrPtr)
}

//----------------------------------------------------------------------
//
// GetWinFileShortName --
//
//	Returns a Tcl_Obj containing the short version of the file name.
//
// Results:
//	Standard Tcl result and a Tcl_Obj in attributePtrPtr. The object will
//	have ref count 0. If the return value is not TCL_OK, attributePtrPtr
//	is not touched.
//
// Side effects:
//	A new object is allocated if the file is valid.
//
//----------------------------------------------------------------------

func sGetWinFileShortName(tls *libc.TLS, interp uintptr, objIndex int32, fileName uintptr, attributePtrPtr uintptr) int32 { /* tclWinFCmd.c:1798:1: */
	return sConvertFileNameFormat(tls, interp, objIndex, fileName, 0,
		attributePtrPtr)
}

//----------------------------------------------------------------------
//
// SetWinFileAttributes --
//
//	Set the file attributes to the value given by attributePtr. This
//	routine sets the -hidden, -readonly, or -system attributes.
//
// Results:
//	Standard TCL error.
//
// Side effects:
//	The file's attribute is set.
//
//----------------------------------------------------------------------

func sSetWinFileAttributes(tls *libc.TLS, interp uintptr, objIndex int32, fileName uintptr, attributePtr uintptr) int32 { /* tclWinFCmd.c:1826:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var fileAttributes DWORD
	var old DWORD
	// var yesNo int32 at bp, 4

	var result int32
	var nativeName uintptr

	nativeName = XTcl_FSGetNativePath(tls, fileName)
	fileAttributes = libc.AssignUint32(&old, libc.XGetFileAttributesW(tls, nativeName))

	if fileAttributes == 0xFFFFFFFF {
		sStatError(tls, interp, fileName)
		return TCL_ERROR
	}

	result = XTcl_GetBooleanFromObj(tls, interp, attributePtr, bp)
	if result != TCL_OK {
		return result
	}

	if *(*int32)(unsafe.Pointer(bp)) != 0 {
		fileAttributes = fileAttributes | DWORD(attributeArray[objIndex])
	} else {
		fileAttributes = fileAttributes & DWORD(^attributeArray[objIndex])
	}

	if fileAttributes != old &&
		!(libc.XSetFileAttributesW(tls, nativeName, fileAttributes) != 0) {
		sStatError(tls, interp, fileName)
		return TCL_ERROR
	}

	return result
}

//----------------------------------------------------------------------
//
// SetWinFileLongName --
//
//	The attribute in question is a readonly attribute and cannot be set.
//
// Results:
//	TCL_ERROR
//
// Side effects:
//	The object result is set to a pertinent error message.
//
//----------------------------------------------------------------------

func sCannotSetAttribute(tls *libc.TLS, interp uintptr, objIndex int32, fileName uintptr, attributePtr uintptr) int32 { /* tclWinFCmd.c:1881:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+68356,
		libc.VaList(bp, XtclpFileAttrStrings[objIndex], XTcl_GetString(tls, fileName))))
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EINVAL
	XTcl_PosixError(tls, interp)
	return TCL_ERROR
}

//---------------------------------------------------------------------------
//
// TclpObjListVolumes --
//
//	Lists the currently mounted volumes
//
// Results:
//	The list of volumes.
//
// Side effects:
//	None
//
//---------------------------------------------------------------------------

func XTclpObjListVolumes(tls *libc.TLS) uintptr { /* tclWinFCmd.c:1911:9: */
	bp := tls.Alloc(160)
	defer tls.Free(160)

	var resultPtr uintptr
	var elemPtr uintptr
	// var buf [160]int8 at bp, 160
	// There couldn't be more than 30 drives???
	var i int32
	var p uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)
	{
	}

	// On Win32s:
	// GetLogicalDriveStrings() isn't implemented.
	// GetLogicalDrives() returns incorrect information.

	if libc.XGetLogicalDriveStringsA(tls, uint32(unsafe.Sizeof([160]int8{})), bp) == DWORD(0) {
		// GetVolumeInformationW() will detect all drives, but causes
		// chattering on empty floppy drives. We only do this if
		// GetLogicalDriveStrings() didn't work. It has also been reported
		// that on some laptops it takes a while for GetVolumeInformationW() to
		// return when pinging an empty floppy drive, another reason to try to
		// avoid calling it.

		*(*int8)(unsafe.Pointer(bp + 1)) = int8(':')
		*(*int8)(unsafe.Pointer(bp + 2)) = int8('/')
		*(*int8)(unsafe.Pointer(bp + 3)) = int8(0)

		for i = 0; i < 26; i++ {
			*(*int8)(unsafe.Pointer(bp)) = int8('a' + i)
			if libc.XGetVolumeInformationA(tls, bp, uintptr(0), uint32(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(0)) != 0 ||
				libc.XGetLastError(tls) == DWORD(21) {
				elemPtr = XTcl_NewStringObj(tls, bp, -1)
				XTcl_ListObjAppendElement(tls, uintptr(0), resultPtr, elemPtr)
			}
		}
	} else {
		for p = bp; /* &buf[0] */ int32(*(*int8)(unsafe.Pointer(p))) != 0; p += uintptr(4) {
			*(*int8)(unsafe.Pointer(p + 2)) = int8('/')
			elemPtr = XTcl_NewStringObj(tls, p, -1)
			XTcl_ListObjAppendElement(tls, uintptr(0), resultPtr, elemPtr)
		}
	}

	(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount++
	return resultPtr
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

type X_STORAGE_READ_CAPACITY = struct {
	FVersion        ULONG
	FSize           ULONG
	FBlockLength    ULONG
	F__ccgo_pad1    [4]byte
	FNumberOfBlocks LARGE_INTEGER
	FDiskLength     LARGE_INTEGER
} /* winioctl.h:194:9 */

type STORAGE_READ_CAPACITY = X_STORAGE_READ_CAPACITY /* winioctl.h:200:3 */
type PSTORAGE_READ_CAPACITY = uintptr                /* winioctl.h:200:26 */

type X_STORAGE_HOTPLUG_INFO = struct {
	FSize                     DWORD
	FMediaRemovable           BOOLEAN
	FMediaHotplug             BOOLEAN
	FDeviceHotplug            BOOLEAN
	FWriteCacheEnableOverride BOOLEAN
} /* winioctl.h:231:11 */

type STORAGE_HOTPLUG_INFO = X_STORAGE_HOTPLUG_INFO /* winioctl.h:237:5 */
type PSTORAGE_HOTPLUG_INFO = uintptr               /* winioctl.h:237:26 */

type X_STORAGE_DEVICE_NUMBER = struct {
	FDeviceType      DWORD
	FDeviceNumber    DWORD
	FPartitionNumber DWORD
} /* winioctl.h:239:11 */

type STORAGE_DEVICE_NUMBER = X_STORAGE_DEVICE_NUMBER /* winioctl.h:243:5 */
type PSTORAGE_DEVICE_NUMBER = uintptr                /* winioctl.h:243:27 */

type X_STORAGE_BUS_RESET_REQUEST = struct{ FPathId BYTE } /* winioctl.h:245:11 */

type STORAGE_BUS_RESET_REQUEST = X_STORAGE_BUS_RESET_REQUEST /* winioctl.h:247:5 */
type PSTORAGE_BUS_RESET_REQUEST = uintptr                    /* winioctl.h:247:31 */

type STORAGE_BREAK_RESERVATION_REQUEST1 = struct {
	FLength   DWORD
	F_unused  BYTE
	FPathId   BYTE
	FTargetId BYTE
	FLun      BYTE
} /* winioctl.h:249:11 */

type STORAGE_BREAK_RESERVATION_REQUEST = STORAGE_BREAK_RESERVATION_REQUEST1 /* winioctl.h:255:5 */
type PSTORAGE_BREAK_RESERVATION_REQUEST = uintptr                           /* winioctl.h:255:39 */

type X_PREVENT_MEDIA_REMOVAL = struct{ FPreventMediaRemoval BOOLEAN } /* winioctl.h:257:11 */

type PREVENT_MEDIA_REMOVAL = X_PREVENT_MEDIA_REMOVAL /* winioctl.h:259:5 */
type PPREVENT_MEDIA_REMOVAL = uintptr                /* winioctl.h:259:27 */

type X_CLASS_MEDIA_CHANGE_CONTEXT = struct {
	FMediaChangeCount DWORD
	FNewState         DWORD
} /* winioctl.h:261:11 */

type CLASS_MEDIA_CHANGE_CONTEXT = X_CLASS_MEDIA_CHANGE_CONTEXT /* winioctl.h:264:5 */
type PCLASS_MEDIA_CHANGE_CONTEXT = uintptr                     /* winioctl.h:264:32 */

type X_TAPE_STATISTICS = struct {
	FVersion                DWORD
	FFlags                  DWORD
	FRecoveredWrites        LARGE_INTEGER
	FUnrecoveredWrites      LARGE_INTEGER
	FRecoveredReads         LARGE_INTEGER
	FUnrecoveredReads       LARGE_INTEGER
	FCompressionRatioReads  BYTE
	FCompressionRatioWrites BYTE
	F__ccgo_pad1            [6]byte
} /* winioctl.h:266:11 */

type TAPE_STATISTICS = X_TAPE_STATISTICS /* winioctl.h:275:5 */
type PTAPE_STATISTICS = uintptr          /* winioctl.h:275:21 */

type X_TAPE_GET_STATISTICS = struct{ FOperation DWORD } /* winioctl.h:284:11 */

type TAPE_GET_STATISTICS = X_TAPE_GET_STATISTICS /* winioctl.h:286:5 */
type PTAPE_GET_STATISTICS = uintptr              /* winioctl.h:286:25 */

type STORAGE_MEDIA_TYPE = uint32   /* winioctl.h:356:5 */
type PSTORAGE_MEDIA_TYPE = uintptr /* winioctl.h:356:25 */

type STORAGE_BUS_TYPE = uint32   /* winioctl.h:389:5 */
type PSTORAGE_BUS_TYPE = uintptr /* winioctl.h:389:23 */

type X_DEVICE_MEDIA_INFO = struct {
	FDeviceSpecific struct {
		FDiskInfo struct {
			FCylinders            LARGE_INTEGER
			FMediaType            STORAGE_MEDIA_TYPE
			FTracksPerCylinder    DWORD
			FSectorsPerTrack      DWORD
			FBytesPerSector       DWORD
			FNumberMediaSides     DWORD
			FMediaCharacteristics DWORD
		}
	}
} /* winioctl.h:391:11 */

type DEVICE_MEDIA_INFO = X_DEVICE_MEDIA_INFO /* winioctl.h:424:5 */
type PDEVICE_MEDIA_INFO = uintptr            /* winioctl.h:424:23 */

type X_GET_MEDIA_TYPES = struct {
	FDeviceType     DWORD
	FMediaInfoCount DWORD
	FMediaInfo      [1]DEVICE_MEDIA_INFO
} /* winioctl.h:426:11 */

type GET_MEDIA_TYPES = X_GET_MEDIA_TYPES /* winioctl.h:430:5 */
type PGET_MEDIA_TYPES = uintptr          /* winioctl.h:430:21 */

type X_STORAGE_PREDICT_FAILURE = struct {
	FPredictFailure DWORD
	FVendorSpecific [512]BYTE
} /* winioctl.h:432:11 */

type STORAGE_PREDICT_FAILURE = X_STORAGE_PREDICT_FAILURE /* winioctl.h:435:5 */
type PSTORAGE_PREDICT_FAILURE = uintptr                  /* winioctl.h:435:29 */

type MEDIA_TYPE = uint32   /* winioctl.h:529:3 */
type PMEDIA_TYPE = uintptr /* winioctl.h:529:14 */

type X_FORMAT_PARAMETERS = struct {
	FMediaType           MEDIA_TYPE
	FStartCylinderNumber DWORD
	FEndCylinderNumber   DWORD
	FStartHeadNumber     DWORD
	FEndHeadNumber       DWORD
} /* winioctl.h:531:9 */

type FORMAT_PARAMETERS = X_FORMAT_PARAMETERS /* winioctl.h:537:3 */
type PFORMAT_PARAMETERS = uintptr            /* winioctl.h:537:21 */

type BAD_TRACK_NUMBER = WORD     /* winioctl.h:539:14 */
type PBAD_TRACK_NUMBER = uintptr /* winioctl.h:540:14 */

type X_FORMAT_EX_PARAMETERS = struct {
	FMediaType           MEDIA_TYPE
	FStartCylinderNumber DWORD
	FEndCylinderNumber   DWORD
	FStartHeadNumber     DWORD
	FEndHeadNumber       DWORD
	FFormatGapLength     WORD
	FSectorsPerTrack     WORD
	FSectorNumber        [1]WORD
	F__ccgo_pad1         [2]byte
} /* winioctl.h:542:9 */

type FORMAT_EX_PARAMETERS = X_FORMAT_EX_PARAMETERS /* winioctl.h:551:3 */
type PFORMAT_EX_PARAMETERS = uintptr               /* winioctl.h:551:24 */

type X_DISK_GEOMETRY = struct {
	FCylinders         LARGE_INTEGER
	FMediaType         MEDIA_TYPE
	FTracksPerCylinder DWORD
	FSectorsPerTrack   DWORD
	FBytesPerSector    DWORD
} /* winioctl.h:553:9 */

type DISK_GEOMETRY = X_DISK_GEOMETRY /* winioctl.h:559:3 */
type PDISK_GEOMETRY = uintptr        /* winioctl.h:559:17 */

type X_PARTITION_INFORMATION = struct {
	FStartingOffset      LARGE_INTEGER
	FPartitionLength     LARGE_INTEGER
	FHiddenSectors       DWORD
	FPartitionNumber     DWORD
	FPartitionType       BYTE
	FBootIndicator       BOOLEAN
	FRecognizedPartition BOOLEAN
	FRewritePartition    BOOLEAN
	F__ccgo_pad1         [4]byte
} /* winioctl.h:563:9 */

type PARTITION_INFORMATION = X_PARTITION_INFORMATION /* winioctl.h:572:3 */
type PPARTITION_INFORMATION = uintptr                /* winioctl.h:572:25 */

type X_SET_PARTITION_INFORMATION = struct{ FPartitionType BYTE } /* winioctl.h:574:9 */

type SET_PARTITION_INFORMATION = X_SET_PARTITION_INFORMATION /* winioctl.h:576:3 */
type PSET_PARTITION_INFORMATION = uintptr                    /* winioctl.h:576:29 */

type X_DRIVE_LAYOUT_INFORMATION = struct {
	FPartitionCount DWORD
	FSignature      DWORD
	FPartitionEntry [1]PARTITION_INFORMATION
} /* winioctl.h:578:9 */

type DRIVE_LAYOUT_INFORMATION = X_DRIVE_LAYOUT_INFORMATION /* winioctl.h:582:3 */
type PDRIVE_LAYOUT_INFORMATION = uintptr                   /* winioctl.h:582:28 */

type X_VERIFY_INFORMATION = struct {
	FStartingOffset LARGE_INTEGER
	FLength         DWORD
	F__ccgo_pad1    [4]byte
} /* winioctl.h:584:9 */

type VERIFY_INFORMATION = X_VERIFY_INFORMATION /* winioctl.h:587:3 */
type PVERIFY_INFORMATION = uintptr             /* winioctl.h:587:22 */

type X_REASSIGN_BLOCKS = struct {
	FReserved    WORD
	FCount       WORD
	FBlockNumber [1]DWORD
} /* winioctl.h:589:9 */

type REASSIGN_BLOCKS = X_REASSIGN_BLOCKS /* winioctl.h:593:3 */
type PREASSIGN_BLOCKS = uintptr          /* winioctl.h:593:19 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_REASSIGN_BLOCKS_EX = struct {
	FReserved    WORD
	FCount       WORD
	F__ccgo_pad1 [4]byte
	FBlockNumber [1]LARGE_INTEGER
} /* winioctl.h:596:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type REASSIGN_BLOCKS_EX = X_REASSIGN_BLOCKS_EX /* winioctl.h:600:3 */
type PREASSIGN_BLOCKS_EX = uintptr             /* winioctl.h:600:22 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type PARTITION_STYLE = uint32 /* winioctl.h:605:3 */

type X_PARTITION_INFORMATION_GPT = struct {
	FPartitionType GUID
	FPartitionId   GUID
	FAttributes    DWORD64
	FName          [36]WCHAR
} /* winioctl.h:607:9 */

type PARTITION_INFORMATION_GPT = X_PARTITION_INFORMATION_GPT /* winioctl.h:612:3 */
type PPARTITION_INFORMATION_GPT = uintptr                    /* winioctl.h:612:29 */

type X_PARTITION_INFORMATION_MBR = struct {
	FPartitionType       BYTE
	FBootIndicator       BOOLEAN
	FRecognizedPartition BOOLEAN
	F__ccgo_pad1         [1]byte
	FHiddenSectors       DWORD
} /* winioctl.h:621:9 */

type PARTITION_INFORMATION_MBR = X_PARTITION_INFORMATION_MBR /* winioctl.h:626:3 */
type PPARTITION_INFORMATION_MBR = uintptr                    /* winioctl.h:626:29 */

type SET_PARTITION_INFORMATION_MBR = SET_PARTITION_INFORMATION /* winioctl.h:628:35 */
type SET_PARTITION_INFORMATION_GPT = PARTITION_INFORMATION_GPT /* winioctl.h:629:35 */

type X_SET_PARTITION_INFORMATION_EX = struct {
	FPartitionStyle PARTITION_STYLE
	F__ccgo_pad1    [4]byte
	F__8            struct {
		F__ccgo_pad1 [0]uint64
		FMbr         SET_PARTITION_INFORMATION_MBR
		F__ccgo_pad2 [111]byte
	}
} /* winioctl.h:631:9 */

type SET_PARTITION_INFORMATION_EX = X_SET_PARTITION_INFORMATION_EX /* winioctl.h:637:3 */
type PSET_PARTITION_INFORMATION_EX = uintptr                       /* winioctl.h:637:32 */

type X_CREATE_DISK_GPT = struct {
	FDiskId            GUID
	FMaxPartitionCount DWORD
} /* winioctl.h:639:9 */

type CREATE_DISK_GPT = X_CREATE_DISK_GPT /* winioctl.h:642:3 */
type PCREATE_DISK_GPT = uintptr          /* winioctl.h:642:19 */

type X_CREATE_DISK_MBR = struct{ FSignature DWORD } /* winioctl.h:644:9 */

type CREATE_DISK_MBR = X_CREATE_DISK_MBR /* winioctl.h:646:3 */
type PCREATE_DISK_MBR = uintptr          /* winioctl.h:646:19 */

type X_CREATE_DISK = struct {
	FPartitionStyle PARTITION_STYLE
	F__4            struct {
		FMbr         CREATE_DISK_MBR
		F__ccgo_pad1 [16]byte
	}
} /* winioctl.h:648:9 */

type CREATE_DISK = X_CREATE_DISK /* winioctl.h:654:3 */
type PCREATE_DISK = uintptr      /* winioctl.h:654:15 */

type X_GET_LENGTH_INFORMATION = struct{ FLength LARGE_INTEGER } /* winioctl.h:656:9 */

type GET_LENGTH_INFORMATION = X_GET_LENGTH_INFORMATION /* winioctl.h:658:3 */
type PGET_LENGTH_INFORMATION = uintptr                 /* winioctl.h:658:26 */

type X_PARTITION_INFORMATION_EX = struct {
	FPartitionStyle   PARTITION_STYLE
	F__ccgo_pad1      [4]byte
	FStartingOffset   LARGE_INTEGER
	FPartitionLength  LARGE_INTEGER
	FPartitionNumber  DWORD
	FRewritePartition BOOLEAN
	F__ccgo_pad2      [3]byte
	F__32             struct {
		F__ccgo_pad1 [0]uint64
		FMbr         PARTITION_INFORMATION_MBR
		F__ccgo_pad2 [104]byte
	}
} /* winioctl.h:660:9 */

type PARTITION_INFORMATION_EX = X_PARTITION_INFORMATION_EX /* winioctl.h:670:3 */
type PPARTITION_INFORMATION_EX = uintptr                   /* winioctl.h:670:28 */

type X_DRIVE_LAYOUT_INFORMATION_GPT = struct {
	FDiskId               GUID
	FStartingUsableOffset LARGE_INTEGER
	FUsableLength         LARGE_INTEGER
	FMaxPartitionCount    DWORD
	F__ccgo_pad1          [4]byte
} /* winioctl.h:672:9 */

type DRIVE_LAYOUT_INFORMATION_GPT = X_DRIVE_LAYOUT_INFORMATION_GPT /* winioctl.h:677:3 */
type PDRIVE_LAYOUT_INFORMATION_GPT = uintptr                       /* winioctl.h:677:32 */

type X_DRIVE_LAYOUT_INFORMATION_MBR = struct{ FSignature DWORD } /* winioctl.h:679:9 */

type DRIVE_LAYOUT_INFORMATION_MBR = X_DRIVE_LAYOUT_INFORMATION_MBR /* winioctl.h:681:3 */
type PDRIVE_LAYOUT_INFORMATION_MBR = uintptr                       /* winioctl.h:681:32 */

type X_DRIVE_LAYOUT_INFORMATION_EX = struct {
	FPartitionStyle DWORD
	FPartitionCount DWORD
	F__8            struct {
		F__ccgo_pad1 [0]uint64
		FMbr         DRIVE_LAYOUT_INFORMATION_MBR
		F__ccgo_pad2 [36]byte
	}
	FPartitionEntry [1]PARTITION_INFORMATION_EX
} /* winioctl.h:683:9 */

type DRIVE_LAYOUT_INFORMATION_EX = X_DRIVE_LAYOUT_INFORMATION_EX /* winioctl.h:691:3 */
type PDRIVE_LAYOUT_INFORMATION_EX = uintptr                      /* winioctl.h:691:31 */

type DETECTION_TYPE = uint32 /* winioctl.h:695:3 */

type X_DISK_INT13_INFO = struct {
	FDriveSelect     WORD
	F__ccgo_pad1     [2]byte
	FMaxCylinders    DWORD
	FSectorsPerTrack WORD
	FMaxHeads        WORD
	FNumberDrives    WORD
	F__ccgo_pad2     [2]byte
} /* winioctl.h:697:9 */

type DISK_INT13_INFO = X_DISK_INT13_INFO /* winioctl.h:703:3 */
type PDISK_INT13_INFO = uintptr          /* winioctl.h:703:19 */

type X_DISK_EX_INT13_INFO = struct {
	FExBufferSize      WORD
	FExFlags           WORD
	FExCylinders       DWORD
	FExHeads           DWORD
	FExSectorsPerTrack DWORD
	FExSectorsPerDrive DWORD64
	FExSectorSize      WORD
	FExReserved        WORD
	F__ccgo_pad1       [4]byte
} /* winioctl.h:705:9 */

type DISK_EX_INT13_INFO = X_DISK_EX_INT13_INFO /* winioctl.h:714:3 */
type PDISK_EX_INT13_INFO = uintptr             /* winioctl.h:714:22 */

type X_DISK_DETECTION_INFO = struct {
	FSizeOfDetectInfo DWORD
	FDetectionType    DETECTION_TYPE
	F__8              struct {
		F__0 struct {
			FInt13   DISK_INT13_INFO
			FExInt13 DISK_EX_INT13_INFO
		}
	}
} /* winioctl.h:716:9 */

type DISK_DETECTION_INFO = X_DISK_DETECTION_INFO /* winioctl.h:725:3 */
type PDISK_DETECTION_INFO = uintptr              /* winioctl.h:725:23 */

type X_DISK_PARTITION_INFO = struct {
	FSizeOfPartitionInfo DWORD
	FPartitionStyle      PARTITION_STYLE
	F__8                 struct {
		FMbr struct {
			FSignature DWORD
			FCheckSum  DWORD
		}
		F__ccgo_pad1 [8]byte
	}
} /* winioctl.h:727:9 */

type DISK_PARTITION_INFO = X_DISK_PARTITION_INFO /* winioctl.h:739:3 */
type PDISK_PARTITION_INFO = uintptr              /* winioctl.h:739:23 */

type X_DISK_GEOMETRY_EX = struct {
	FGeometry    DISK_GEOMETRY
	FDiskSize    LARGE_INTEGER
	FData        [1]BYTE
	F__ccgo_pad1 [7]byte
} /* winioctl.h:744:9 */

type DISK_GEOMETRY_EX = X_DISK_GEOMETRY_EX /* winioctl.h:748:3 */
type PDISK_GEOMETRY_EX = uintptr           /* winioctl.h:748:20 */

type X_DISK_CONTROLLER_NUMBER = struct {
	FControllerNumber DWORD
	FDiskNumber       DWORD
} /* winioctl.h:750:9 */

type DISK_CONTROLLER_NUMBER = X_DISK_CONTROLLER_NUMBER /* winioctl.h:753:3 */
type PDISK_CONTROLLER_NUMBER = uintptr                 /* winioctl.h:753:26 */

type DISK_CACHE_RETENTION_PRIORITY = uint32 /* winioctl.h:757:3 */

type X_DISK_CACHE_INFORMATION = struct {
	FParametersSavable             BOOLEAN
	FReadCacheEnabled              BOOLEAN
	FWriteCacheEnabled             BOOLEAN
	F__ccgo_pad1                   [1]byte
	FReadRetentionPriority         DISK_CACHE_RETENTION_PRIORITY
	FWriteRetentionPriority        DISK_CACHE_RETENTION_PRIORITY
	FDisablePrefetchTransferLength WORD
	FPrefetchScalar                BOOLEAN
	F__ccgo_pad2                   [1]byte
	F__16                          struct {
		FScalarPrefetch struct {
			FMinimum       WORD
			FMaximum       WORD
			FMaximumBlocks WORD
		}
	}
	F__ccgo_pad3 [2]byte
} /* winioctl.h:759:9 */

type DISK_CACHE_INFORMATION = X_DISK_CACHE_INFORMATION /* winioctl.h:778:3 */
type PDISK_CACHE_INFORMATION = uintptr                 /* winioctl.h:778:26 */

type X_DISK_GROW_PARTITION = struct {
	FPartitionNumber DWORD
	F__ccgo_pad1     [4]byte
	FBytesToGrow     LARGE_INTEGER
} /* winioctl.h:780:9 */

type DISK_GROW_PARTITION = X_DISK_GROW_PARTITION /* winioctl.h:783:3 */
type PDISK_GROW_PARTITION = uintptr              /* winioctl.h:783:23 */

type X_HISTOGRAM_BUCKET = struct {
	FReads  DWORD
	FWrites DWORD
} /* winioctl.h:787:9 */

type HISTOGRAM_BUCKET = X_HISTOGRAM_BUCKET /* winioctl.h:790:3 */
type PHISTOGRAM_BUCKET = uintptr           /* winioctl.h:790:20 */

type X_DISK_HISTOGRAM = struct {
	FDiskSize     LARGE_INTEGER
	FStart        LARGE_INTEGER
	FEnd          LARGE_INTEGER
	FAverage      LARGE_INTEGER
	FAverageRead  LARGE_INTEGER
	FAverageWrite LARGE_INTEGER
	FGranularity  DWORD
	FSize         DWORD
	FReadCount    DWORD
	FWriteCount   DWORD
	FHistogram    PHISTOGRAM_BUCKET
} /* winioctl.h:794:9 */

type DISK_HISTOGRAM = X_DISK_HISTOGRAM /* winioctl.h:806:3 */
type PDISK_HISTOGRAM = uintptr         /* winioctl.h:806:18 */

type X_DISK_PERFORMANCE = struct {
	FBytesRead           LARGE_INTEGER
	FBytesWritten        LARGE_INTEGER
	FReadTime            LARGE_INTEGER
	FWriteTime           LARGE_INTEGER
	FIdleTime            LARGE_INTEGER
	FReadCount           DWORD
	FWriteCount          DWORD
	FQueueDepth          DWORD
	FSplitCount          DWORD
	FQueryTime           LARGE_INTEGER
	FStorageDeviceNumber DWORD
	FStorageManagerName  [8]WCHAR
	F__ccgo_pad1         [4]byte
} /* winioctl.h:810:9 */

type DISK_PERFORMANCE = X_DISK_PERFORMANCE /* winioctl.h:823:3 */
type PDISK_PERFORMANCE = uintptr           /* winioctl.h:823:20 */

type X_DISK_RECORD = struct {
	FByteOffset     LARGE_INTEGER
	FStartTime      LARGE_INTEGER
	FEndTime        LARGE_INTEGER
	FVirtualAddress PVOID
	FNumberOfBytes  DWORD
	FDeviceNumber   BYTE
	FReadRequest    BOOLEAN
	F__ccgo_pad1    [2]byte
} /* winioctl.h:825:9 */

type DISK_RECORD = X_DISK_RECORD /* winioctl.h:833:3 */
type PDISK_RECORD = uintptr      /* winioctl.h:833:15 */

type X_DISK_LOGGING = struct {
	FFunction      BYTE
	F__ccgo_pad1   [7]byte
	FBufferAddress PVOID
	FBufferSize    DWORD
	F__ccgo_pad2   [4]byte
} /* winioctl.h:835:9 */

type DISK_LOGGING = X_DISK_LOGGING /* winioctl.h:839:3 */
type PDISK_LOGGING = uintptr       /* winioctl.h:839:16 */

type BIN_TYPES = uint32 /* winioctl.h:848:3 */

type X_BIN_RANGE = struct {
	FStartValue LARGE_INTEGER
	FLength     LARGE_INTEGER
} /* winioctl.h:850:9 */

type BIN_RANGE = X_BIN_RANGE /* winioctl.h:853:3 */
type PBIN_RANGE = uintptr    /* winioctl.h:853:13 */

type X_PERF_BIN = struct {
	FNumberOfBins DWORD
	FTypeOfBin    DWORD
	FBinsRanges   [1]BIN_RANGE
} /* winioctl.h:855:9 */

type PERF_BIN = X_PERF_BIN /* winioctl.h:859:3 */
type PPERF_BIN = uintptr   /* winioctl.h:859:12 */

type X_BIN_COUNT = struct {
	FBinRange    BIN_RANGE
	FBinCount    DWORD
	F__ccgo_pad1 [4]byte
} /* winioctl.h:861:9 */

type BIN_COUNT = X_BIN_COUNT /* winioctl.h:864:3 */
type PBIN_COUNT = uintptr    /* winioctl.h:864:13 */

type X_BIN_RESULTS = struct {
	FNumberOfBins DWORD
	F__ccgo_pad1  [4]byte
	FBinCounts    [1]BIN_COUNT
} /* winioctl.h:866:9 */

type BIN_RESULTS = X_BIN_RESULTS /* winioctl.h:869:3 */
type PBIN_RESULTS = uintptr      /* winioctl.h:869:15 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_GETVERSIONINPARAMS = struct {
	FbVersion      BYTE
	FbRevision     BYTE
	FbReserved     BYTE
	FbIDEDeviceMap BYTE
	FfCapabilities DWORD
	FdwReserved    [4]DWORD
} /* winioctl.h:872:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type GETVERSIONINPARAMS = X_GETVERSIONINPARAMS /* winioctl.h:879:3 */
type PGETVERSIONINPARAMS = uintptr             /* winioctl.h:879:22 */
type LPGETVERSIONINPARAMS = uintptr            /* winioctl.h:879:43 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_IDEREGS = struct {
	FbFeaturesReg     BYTE
	FbSectorCountReg  BYTE
	FbSectorNumberReg BYTE
	FbCylLowReg       BYTE
	FbCylHighReg      BYTE
	FbDriveHeadReg    BYTE
	FbCommandReg      BYTE
	FbReserved        BYTE
} /* winioctl.h:887:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type IDEREGS = X_IDEREGS /* winioctl.h:896:3 */
type PIDEREGS = uintptr  /* winioctl.h:896:11 */
type LPIDEREGS = uintptr /* winioctl.h:896:21 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_SENDCMDINPARAMS = struct {
	FcBufferSize  DWORD
	FirDriveRegs  IDEREGS
	FbDriveNumber BYTE
	FbReserved    [3]BYTE
	FdwReserved   [4]DWORD
	FbBuffer      [1]BYTE
	F__ccgo_pad1  [3]byte
} /* winioctl.h:907:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SENDCMDINPARAMS = X_SENDCMDINPARAMS /* winioctl.h:914:3 */
type PSENDCMDINPARAMS = uintptr          /* winioctl.h:914:19 */
type LPSENDCMDINPARAMS = uintptr         /* winioctl.h:914:37 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_DRIVERSTATUS = struct {
	FbDriverError BYTE
	FbIDEError    BYTE
	FbReserved    [2]BYTE
	FdwReserved   [2]DWORD
} /* winioctl.h:918:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type DRIVERSTATUS = X_DRIVERSTATUS /* winioctl.h:923:3 */
type PDRIVERSTATUS = uintptr       /* winioctl.h:923:16 */
type LPDRIVERSTATUS = uintptr      /* winioctl.h:923:31 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_SENDCMDOUTPARAMS = struct {
	FcBufferSize  DWORD
	FDriverStatus DRIVERSTATUS
	FbBuffer      [1]BYTE
	F__ccgo_pad1  [3]byte
} /* winioctl.h:946:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SENDCMDOUTPARAMS = X_SENDCMDOUTPARAMS /* winioctl.h:950:3 */
type PSENDCMDOUTPARAMS = uintptr           /* winioctl.h:950:20 */
type LPSENDCMDOUTPARAMS = uintptr          /* winioctl.h:950:39 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type ELEMENT_TYPE = uint32   /* winioctl.h:996:3 */
type PELEMENT_TYPE = uintptr /* winioctl.h:996:16 */

type X_CHANGER_ELEMENT = struct {
	FElementType    ELEMENT_TYPE
	FElementAddress DWORD
} /* winioctl.h:998:9 */

type CHANGER_ELEMENT = X_CHANGER_ELEMENT /* winioctl.h:1001:3 */
type PCHANGER_ELEMENT = uintptr          /* winioctl.h:1001:19 */

type X_CHANGER_ELEMENT_LIST = struct {
	FElement          CHANGER_ELEMENT
	FNumberOfElements DWORD
} /* winioctl.h:1003:9 */

type CHANGER_ELEMENT_LIST = X_CHANGER_ELEMENT_LIST /* winioctl.h:1006:3 */
type PCHANGER_ELEMENT_LIST = uintptr               /* winioctl.h:1006:25 */

type X_GET_CHANGER_PARAMETERS = struct {
	FSize                       DWORD
	FNumberTransportElements    WORD
	FNumberStorageElements      WORD
	FNumberCleanerSlots         WORD
	FNumberIEElements           WORD
	FNumberDataTransferElements WORD
	FNumberOfDoors              WORD
	FFirstSlotNumber            WORD
	FFirstDriveNumber           WORD
	FFirstTransportNumber       WORD
	FFirstIEPortNumber          WORD
	FFirstCleanerSlotAddress    WORD
	FMagazineSize               WORD
	FDriveCleanTimeout          DWORD
	FFeatures0                  DWORD
	FFeatures1                  DWORD
	FMoveFromTransport          BYTE
	FMoveFromSlot               BYTE
	FMoveFromIePort             BYTE
	FMoveFromDrive              BYTE
	FExchangeFromTransport      BYTE
	FExchangeFromSlot           BYTE
	FExchangeFromIePort         BYTE
	FExchangeFromDrive          BYTE
	FLockUnlockCapabilities     BYTE
	FPositionCapabilities       BYTE
	FReserved1                  [2]BYTE
	FReserved2                  [2]DWORD
} /* winioctl.h:1070:9 */

type GET_CHANGER_PARAMETERS = X_GET_CHANGER_PARAMETERS /* winioctl.h:1099:3 */
type PGET_CHANGER_PARAMETERS = uintptr                 /* winioctl.h:1099:26 */

type X_CHANGER_PRODUCT_DATA = struct {
	FVendorId     [8]BYTE
	FProductId    [16]BYTE
	FRevision     [4]BYTE
	FSerialNumber [32]BYTE
	FDeviceType   BYTE
} /* winioctl.h:1101:9 */

type CHANGER_PRODUCT_DATA = X_CHANGER_PRODUCT_DATA /* winioctl.h:1107:3 */
type PCHANGER_PRODUCT_DATA = uintptr               /* winioctl.h:1107:24 */

type X_CHANGER_SET_ACCESS = struct {
	FElement CHANGER_ELEMENT
	FControl DWORD
} /* winioctl.h:1114:9 */

type CHANGER_SET_ACCESS = X_CHANGER_SET_ACCESS /* winioctl.h:1117:3 */
type PCHANGER_SET_ACCESS = uintptr             /* winioctl.h:1117:22 */

type X_CHANGER_READ_ELEMENT_STATUS = struct {
	FElementList   CHANGER_ELEMENT_LIST
	FVolumeTagInfo BOOLEAN
	F__ccgo_pad1   [3]byte
} /* winioctl.h:1119:9 */

type CHANGER_READ_ELEMENT_STATUS = X_CHANGER_READ_ELEMENT_STATUS /* winioctl.h:1122:3 */
type PCHANGER_READ_ELEMENT_STATUS = uintptr                      /* winioctl.h:1122:31 */

type X_CHANGER_ELEMENT_STATUS = struct {
	FElement           CHANGER_ELEMENT
	FSrcElementAddress CHANGER_ELEMENT
	FFlags             DWORD
	FExceptionCode     DWORD
	FTargetId          BYTE
	FLun               BYTE
	FReserved          WORD
	FPrimaryVolumeID   [36]BYTE
	FAlternateVolumeID [36]BYTE
} /* winioctl.h:1124:9 */

type CHANGER_ELEMENT_STATUS = X_CHANGER_ELEMENT_STATUS /* winioctl.h:1134:3 */
type PCHANGER_ELEMENT_STATUS = uintptr                 /* winioctl.h:1134:26 */

type X_CHANGER_ELEMENT_STATUS_EX = struct {
	FElement               CHANGER_ELEMENT
	FSrcElementAddress     CHANGER_ELEMENT
	FFlags                 DWORD
	FExceptionCode         DWORD
	FTargetId              BYTE
	FLun                   BYTE
	FReserved              WORD
	FPrimaryVolumeID       [36]BYTE
	FAlternateVolumeID     [36]BYTE
	FVendorIdentification  [8]BYTE
	FProductIdentification [16]BYTE
	FSerialNumber          [32]BYTE
} /* winioctl.h:1136:9 */

type CHANGER_ELEMENT_STATUS_EX = X_CHANGER_ELEMENT_STATUS_EX /* winioctl.h:1149:3 */
type PCHANGER_ELEMENT_STATUS_EX = uintptr                    /* winioctl.h:1149:29 */

type X_CHANGER_INITIALIZE_ELEMENT_STATUS = struct {
	FElementList CHANGER_ELEMENT_LIST
	FBarCodeScan BOOLEAN
	F__ccgo_pad1 [3]byte
} /* winioctl.h:1177:9 */

type CHANGER_INITIALIZE_ELEMENT_STATUS = X_CHANGER_INITIALIZE_ELEMENT_STATUS /* winioctl.h:1180:3 */
type PCHANGER_INITIALIZE_ELEMENT_STATUS = uintptr                            /* winioctl.h:1180:37 */

type X_CHANGER_SET_POSITION = struct {
	FTransport   CHANGER_ELEMENT
	FDestination CHANGER_ELEMENT
	FFlip        BOOLEAN
	F__ccgo_pad1 [3]byte
} /* winioctl.h:1182:9 */

type CHANGER_SET_POSITION = X_CHANGER_SET_POSITION /* winioctl.h:1186:3 */
type PCHANGER_SET_POSITION = uintptr               /* winioctl.h:1186:24 */

type X_CHANGER_EXCHANGE_MEDIUM = struct {
	FTransport    CHANGER_ELEMENT
	FSource       CHANGER_ELEMENT
	FDestination1 CHANGER_ELEMENT
	FDestination2 CHANGER_ELEMENT
	FFlip1        BOOLEAN
	FFlip2        BOOLEAN
	F__ccgo_pad1  [2]byte
} /* winioctl.h:1188:9 */

type CHANGER_EXCHANGE_MEDIUM = X_CHANGER_EXCHANGE_MEDIUM /* winioctl.h:1195:3 */
type PCHANGER_EXCHANGE_MEDIUM = uintptr                  /* winioctl.h:1195:27 */

type X_CHANGER_MOVE_MEDIUM = struct {
	FTransport   CHANGER_ELEMENT
	FSource      CHANGER_ELEMENT
	FDestination CHANGER_ELEMENT
	FFlip        BOOLEAN
	F__ccgo_pad1 [3]byte
} /* winioctl.h:1197:9 */

type CHANGER_MOVE_MEDIUM = X_CHANGER_MOVE_MEDIUM /* winioctl.h:1202:3 */
type PCHANGER_MOVE_MEDIUM = uintptr              /* winioctl.h:1202:23 */

type X_CHANGER_SEND_VOLUME_TAG_INFORMATION = struct {
	FStartingElement  CHANGER_ELEMENT
	FActionCode       DWORD
	FVolumeIDTemplate [40]BYTE
} /* winioctl.h:1204:9 */

type CHANGER_SEND_VOLUME_TAG_INFORMATION = X_CHANGER_SEND_VOLUME_TAG_INFORMATION /* winioctl.h:1208:3 */
type PCHANGER_SEND_VOLUME_TAG_INFORMATION = uintptr                              /* winioctl.h:1208:39 */

type X_READ_ELEMENT_ADDRESS_INFO = struct {
	FNumberOfElements DWORD
	FElementStatus    [1]CHANGER_ELEMENT_STATUS
} /* winioctl.h:1210:9 */

type READ_ELEMENT_ADDRESS_INFO = X_READ_ELEMENT_ADDRESS_INFO /* winioctl.h:1213:3 */
type PREAD_ELEMENT_ADDRESS_INFO = uintptr                    /* winioctl.h:1213:29 */

type CHANGER_DEVICE_PROBLEM_TYPE = uint32   /* winioctl.h:1235:3 */
type PCHANGER_DEVICE_PROBLEM_TYPE = uintptr /* winioctl.h:1235:31 */

type X_PATHNAME_BUFFER = struct {
	FPathNameLength DWORD
	FName           [1]WCHAR
	F__ccgo_pad1    [2]byte
} /* winioctl.h:1335:9 */

type PATHNAME_BUFFER = X_PATHNAME_BUFFER /* winioctl.h:1338:3 */
type PPATHNAME_BUFFER = uintptr          /* winioctl.h:1338:19 */

type X_FSCTL_QUERY_FAT_BPB_BUFFER = struct{ FFirst0x24BytesOfBootSector [36]BYTE } /* winioctl.h:1340:9 */

type FSCTL_QUERY_FAT_BPB_BUFFER = X_FSCTL_QUERY_FAT_BPB_BUFFER /* winioctl.h:1342:3 */
type PFSCTL_QUERY_FAT_BPB_BUFFER = uintptr                     /* winioctl.h:1342:30 */

type NTFS_VOLUME_DATA_BUFFER = struct {
	FVolumeSerialNumber           LARGE_INTEGER
	FNumberSectors                LARGE_INTEGER
	FTotalClusters                LARGE_INTEGER
	FFreeClusters                 LARGE_INTEGER
	FTotalReserved                LARGE_INTEGER
	FBytesPerSector               DWORD
	FBytesPerCluster              DWORD
	FBytesPerFileRecordSegment    DWORD
	FClustersPerFileRecordSegment DWORD
	FMftValidDataLength           LARGE_INTEGER
	FMftStartLcn                  LARGE_INTEGER
	FMft2StartLcn                 LARGE_INTEGER
	FMftZoneStart                 LARGE_INTEGER
	FMftZoneEnd                   LARGE_INTEGER
}                                       /* winioctl.h:1359:3 */
type PNTFS_VOLUME_DATA_BUFFER = uintptr /* winioctl.h:1359:27 */

type NTFS_EXTENDED_VOLUME_DATA = struct {
	FByteCount    DWORD
	FMajorVersion WORD
	FMinorVersion WORD
}                                         /* winioctl.h:1365:3 */
type PNTFS_EXTENDED_VOLUME_DATA = uintptr /* winioctl.h:1365:29 */

type STARTING_LCN_INPUT_BUFFER = struct{ FStartingLcn LARGE_INTEGER } /* winioctl.h:1369:3 */
type PSTARTING_LCN_INPUT_BUFFER = uintptr                             /* winioctl.h:1369:29 */

type VOLUME_BITMAP_BUFFER = struct {
	FStartingLcn LARGE_INTEGER
	FBitmapSize  LARGE_INTEGER
	FBuffer      [1]BYTE
	F__ccgo_pad1 [7]byte
}                                    /* winioctl.h:1375:3 */
type PVOLUME_BITMAP_BUFFER = uintptr /* winioctl.h:1375:24 */

type STARTING_VCN_INPUT_BUFFER = struct{ FStartingVcn LARGE_INTEGER } /* winioctl.h:1379:3 */
type PSTARTING_VCN_INPUT_BUFFER = uintptr                             /* winioctl.h:1379:29 */

type RETRIEVAL_POINTERS_BUFFER1 = struct {
	FExtentCount DWORD
	F__ccgo_pad1 [4]byte
	FStartingVcn LARGE_INTEGER
	FExtents     [1]struct {
		FNextVcn LARGE_INTEGER
		FLcn     LARGE_INTEGER
	}
} /* winioctl.h:1381:9 */

type RETRIEVAL_POINTERS_BUFFER = RETRIEVAL_POINTERS_BUFFER1 /* winioctl.h:1388:3 */
type PRETRIEVAL_POINTERS_BUFFER = uintptr                   /* winioctl.h:1388:29 */

type NTFS_FILE_RECORD_INPUT_BUFFER = struct{ FFileReferenceNumber LARGE_INTEGER } /* winioctl.h:1392:3 */
type PNTFS_FILE_RECORD_INPUT_BUFFER = uintptr                                     /* winioctl.h:1392:33 */

type NTFS_FILE_RECORD_OUTPUT_BUFFER = struct {
	FFileReferenceNumber LARGE_INTEGER
	FFileRecordLength    DWORD
	FFileRecordBuffer    [1]BYTE
	F__ccgo_pad1         [3]byte
}                                              /* winioctl.h:1398:3 */
type PNTFS_FILE_RECORD_OUTPUT_BUFFER = uintptr /* winioctl.h:1398:34 */

type MOVE_FILE_DATA = struct {
	FFileHandle   HANDLE
	FStartingVcn  LARGE_INTEGER
	FStartingLcn  LARGE_INTEGER
	FClusterCount DWORD
	F__ccgo_pad1  [4]byte
}                              /* winioctl.h:1405:3 */
type PMOVE_FILE_DATA = uintptr /* winioctl.h:1405:18 */

type X_MOVE_FILE_DATA32 = struct {
	FFileHandle   UINT32
	F__ccgo_pad1  [4]byte
	FStartingVcn  LARGE_INTEGER
	FStartingLcn  LARGE_INTEGER
	FClusterCount DWORD
	F__ccgo_pad2  [4]byte
} /* winioctl.h:1408:9 */

type MOVE_FILE_DATA32 = X_MOVE_FILE_DATA32 /* winioctl.h:1413:3 */
type PMOVE_FILE_DATA32 = uintptr           /* winioctl.h:1413:20 */

type FIND_BY_SID_DATA = struct {
	FRestart DWORD
	FSid     SID
}                                /* winioctl.h:1419:3 */
type PFIND_BY_SID_DATA = uintptr /* winioctl.h:1419:20 */

type FIND_BY_SID_OUTPUT = struct {
	FNextEntryOffset DWORD
	FFileIndex       DWORD
	FFileNameLength  DWORD
	FFileName        [1]WCHAR
	F__ccgo_pad1     [2]byte
}                                  /* winioctl.h:1426:3 */
type PFIND_BY_SID_OUTPUT = uintptr /* winioctl.h:1426:22 */

type MFT_ENUM_DATA = struct {
	FStartFileReferenceNumber DWORDLONG
	FLowUsn                   USN
	FHighUsn                  USN
}                             /* winioctl.h:1432:3 */
type PMFT_ENUM_DATA = uintptr /* winioctl.h:1432:17 */

type CREATE_USN_JOURNAL_DATA = struct {
	FMaximumSize     DWORDLONG
	FAllocationDelta DWORDLONG
}                                       /* winioctl.h:1437:3 */
type PCREATE_USN_JOURNAL_DATA = uintptr /* winioctl.h:1437:27 */

type READ_USN_JOURNAL_DATA = struct {
	FStartUsn          USN
	FReasonMask        DWORD
	FReturnOnlyOnClose DWORD
	FTimeout           DWORDLONG
	FBytesToWaitFor    DWORDLONG
	FUsnJournalID      DWORDLONG
}                                     /* winioctl.h:1446:3 */
type PREAD_USN_JOURNAL_DATA = uintptr /* winioctl.h:1446:25 */

type USN_RECORD = struct {
	FRecordLength              DWORD
	FMajorVersion              WORD
	FMinorVersion              WORD
	FFileReferenceNumber       DWORDLONG
	FParentFileReferenceNumber DWORDLONG
	FUsn                       USN
	FTimeStamp                 LARGE_INTEGER
	FReason                    DWORD
	FSourceInfo                DWORD
	FSecurityId                DWORD
	FFileAttributes            DWORD
	FFileNameLength            WORD
	FFileNameOffset            WORD
	FFileName                  [1]WCHAR
	F__ccgo_pad1               [2]byte
}                          /* winioctl.h:1463:3 */
type PUSN_RECORD = uintptr /* winioctl.h:1463:14 */

type USN_JOURNAL_DATA = struct {
	FUsnJournalID    DWORDLONG
	FFirstUsn        USN
	FNextUsn         USN
	FLowestValidUsn  USN
	FMaxUsn          USN
	FMaximumSize     DWORDLONG
	FAllocationDelta DWORDLONG
}                                /* winioctl.h:1498:3 */
type PUSN_JOURNAL_DATA = uintptr /* winioctl.h:1498:20 */

type DELETE_USN_JOURNAL_DATA = struct {
	FUsnJournalID DWORDLONG
	FDeleteFlags  DWORD
	F__ccgo_pad1  [4]byte
}                                       /* winioctl.h:1503:3 */
type PDELETE_USN_JOURNAL_DATA = uintptr /* winioctl.h:1503:27 */

type MARK_HANDLE_INFO = struct {
	FUsnSourceInfo DWORD
	F__ccgo_pad1   [4]byte
	FVolumeHandle  HANDLE
	FHandleInfo    DWORD
	F__ccgo_pad2   [4]byte
}                                /* winioctl.h:1514:3 */
type PMARK_HANDLE_INFO = uintptr /* winioctl.h:1514:20 */

type MARK_HANDLE_INFO32 = struct {
	FUsnSourceInfo DWORD
	FVolumeHandle  UINT32
	FHandleInfo    DWORD
}                                  /* winioctl.h:1523:3 */
type PMARK_HANDLE_INFO32 = uintptr /* winioctl.h:1523:22 */

type BULK_SECURITY_TEST_DATA = struct {
	FDesiredAccess ACCESS_MASK
	FSecurityIds   [1]DWORD
}                                       /* winioctl.h:1539:3 */
type PBULK_SECURITY_TEST_DATA = uintptr /* winioctl.h:1539:27 */

type X_FILE_PREFETCH = struct {
	FType     DWORD
	FCount    DWORD
	FPrefetch [1]DWORDLONG
} /* winioctl.h:1544:9 */

type FILE_PREFETCH = X_FILE_PREFETCH /* winioctl.h:1548:3 */
type PFILE_PREFETCH = uintptr        /* winioctl.h:1548:17 */

type X_FILESYSTEM_STATISTICS = struct {
	FFileSystemType          WORD
	FVersion                 WORD
	FSizeOfCompleteStructure DWORD
	FUserFileReads           DWORD
	FUserFileReadBytes       DWORD
	FUserDiskReads           DWORD
	FUserFileWrites          DWORD
	FUserFileWriteBytes      DWORD
	FUserDiskWrites          DWORD
	FMetaDataReads           DWORD
	FMetaDataReadBytes       DWORD
	FMetaDataDiskReads       DWORD
	FMetaDataWrites          DWORD
	FMetaDataWriteBytes      DWORD
	FMetaDataDiskWrites      DWORD
} /* winioctl.h:1552:9 */

type FILESYSTEM_STATISTICS = X_FILESYSTEM_STATISTICS /* winioctl.h:1568:3 */
type PFILESYSTEM_STATISTICS = uintptr                /* winioctl.h:1568:25 */

type X_FAT_STATISTICS = struct {
	FCreateHits          DWORD
	FSuccessfulCreates   DWORD
	FFailedCreates       DWORD
	FNonCachedReads      DWORD
	FNonCachedReadBytes  DWORD
	FNonCachedWrites     DWORD
	FNonCachedWriteBytes DWORD
	FNonCachedDiskReads  DWORD
	FNonCachedDiskWrites DWORD
} /* winioctl.h:1573:9 */

type FAT_STATISTICS = X_FAT_STATISTICS /* winioctl.h:1583:3 */
type PFAT_STATISTICS = uintptr         /* winioctl.h:1583:18 */

type X_EXFAT_STATISTICS = struct {
	FCreateHits          DWORD
	FSuccessfulCreates   DWORD
	FFailedCreates       DWORD
	FNonCachedReads      DWORD
	FNonCachedReadBytes  DWORD
	FNonCachedWrites     DWORD
	FNonCachedWriteBytes DWORD
	FNonCachedDiskReads  DWORD
	FNonCachedDiskWrites DWORD
} /* winioctl.h:1585:9 */

type EXFAT_STATISTICS = X_EXFAT_STATISTICS /* winioctl.h:1595:3 */
type PEXFAT_STATISTICS = uintptr           /* winioctl.h:1595:21 */

type X_NTFS_STATISTICS = struct {
	FLogFileFullExceptions DWORD
	FOtherExceptions       DWORD
	FMftReads              DWORD
	FMftReadBytes          DWORD
	FMftWrites             DWORD
	FMftWriteBytes         DWORD
	FMftWritesUserLevel    struct {
		FWrite   WORD
		FCreate  WORD
		FSetInfo WORD
		FFlush   WORD
	}
	FMftWritesFlushForLogFileFull WORD
	FMftWritesLazyWriter          WORD
	FMftWritesUserRequest         WORD
	F__ccgo_pad1                  [2]byte
	FMft2Writes                   DWORD
	FMft2WriteBytes               DWORD
	FMft2WritesUserLevel          struct {
		FWrite   WORD
		FCreate  WORD
		FSetInfo WORD
		FFlush   WORD
	}
	FMft2WritesFlushForLogFileFull   WORD
	FMft2WritesLazyWriter            WORD
	FMft2WritesUserRequest           WORD
	F__ccgo_pad2                     [2]byte
	FRootIndexReads                  DWORD
	FRootIndexReadBytes              DWORD
	FRootIndexWrites                 DWORD
	FRootIndexWriteBytes             DWORD
	FBitmapReads                     DWORD
	FBitmapReadBytes                 DWORD
	FBitmapWrites                    DWORD
	FBitmapWriteBytes                DWORD
	FBitmapWritesFlushForLogFileFull WORD
	FBitmapWritesLazyWriter          WORD
	FBitmapWritesUserRequest         WORD
	FBitmapWritesUserLevel           struct {
		FWrite   WORD
		FCreate  WORD
		FSetInfo WORD
	}
	FMftBitmapReads                     DWORD
	FMftBitmapReadBytes                 DWORD
	FMftBitmapWrites                    DWORD
	FMftBitmapWriteBytes                DWORD
	FMftBitmapWritesFlushForLogFileFull WORD
	FMftBitmapWritesLazyWriter          WORD
	FMftBitmapWritesUserRequest         WORD
	FMftBitmapWritesUserLevel           struct {
		FWrite   WORD
		FCreate  WORD
		FSetInfo WORD
		FFlush   WORD
	}
	F__ccgo_pad3         [2]byte
	FUserIndexReads      DWORD
	FUserIndexReadBytes  DWORD
	FUserIndexWrites     DWORD
	FUserIndexWriteBytes DWORD
	FLogFileReads        DWORD
	FLogFileReadBytes    DWORD
	FLogFileWrites       DWORD
	FLogFileWriteBytes   DWORD
	FAllocate            struct {
		FCalls             DWORD
		FClusters          DWORD
		FHints             DWORD
		FRunsReturned      DWORD
		FHintsHonored      DWORD
		FHintsClusters     DWORD
		FCache             DWORD
		FCacheClusters     DWORD
		FCacheMiss         DWORD
		FCacheMissClusters DWORD
	}
} /* winioctl.h:1597:9 */

type NTFS_STATISTICS = X_NTFS_STATISTICS /* winioctl.h:1673:3 */
type PNTFS_STATISTICS = uintptr          /* winioctl.h:1673:19 */

type X_FILE_OBJECTID_BUFFER = struct {
	FObjectId [16]BYTE
	F__16     struct {
		F__0 struct {
			FBirthVolumeId [16]BYTE
			FBirthObjectId [16]BYTE
			FDomainId      [16]BYTE
		}
	}
} /* winioctl.h:1675:9 */

type FILE_OBJECTID_BUFFER = X_FILE_OBJECTID_BUFFER /* winioctl.h:1685:3 */
type PFILE_OBJECTID_BUFFER = uintptr               /* winioctl.h:1685:24 */

type X_FILE_SET_SPARSE_BUFFER = struct{ FSetSparse BOOLEAN } /* winioctl.h:1687:9 */

type FILE_SET_SPARSE_BUFFER = X_FILE_SET_SPARSE_BUFFER /* winioctl.h:1689:3 */
type PFILE_SET_SPARSE_BUFFER = uintptr                 /* winioctl.h:1689:26 */

type X_FILE_ZERO_DATA_INFORMATION = struct {
	FFileOffset      LARGE_INTEGER
	FBeyondFinalZero LARGE_INTEGER
} /* winioctl.h:1691:9 */

type FILE_ZERO_DATA_INFORMATION = X_FILE_ZERO_DATA_INFORMATION /* winioctl.h:1694:3 */
type PFILE_ZERO_DATA_INFORMATION = uintptr                     /* winioctl.h:1694:30 */

type X_FILE_ALLOCATED_RANGE_BUFFER = struct {
	FFileOffset LARGE_INTEGER
	FLength     LARGE_INTEGER
} /* winioctl.h:1696:9 */

type FILE_ALLOCATED_RANGE_BUFFER = X_FILE_ALLOCATED_RANGE_BUFFER /* winioctl.h:1699:3 */
type PFILE_ALLOCATED_RANGE_BUFFER = uintptr                      /* winioctl.h:1699:31 */

type X_ENCRYPTION_BUFFER = struct {
	FEncryptionOperation DWORD
	FPrivate             [1]BYTE
	F__ccgo_pad1         [3]byte
} /* winioctl.h:1701:9 */

type ENCRYPTION_BUFFER = X_ENCRYPTION_BUFFER /* winioctl.h:1704:3 */
type PENCRYPTION_BUFFER = uintptr            /* winioctl.h:1704:21 */

type X_DECRYPTION_STATUS_BUFFER = struct{ FNoEncryptedStreams BOOLEAN } /* winioctl.h:1713:9 */

type DECRYPTION_STATUS_BUFFER = X_DECRYPTION_STATUS_BUFFER /* winioctl.h:1715:3 */
type PDECRYPTION_STATUS_BUFFER = uintptr                   /* winioctl.h:1715:28 */

type X_REQUEST_RAW_ENCRYPTED_DATA = struct {
	FFileOffset  LONGLONG
	FLength      DWORD
	F__ccgo_pad1 [4]byte
} /* winioctl.h:1720:9 */

type REQUEST_RAW_ENCRYPTED_DATA = X_REQUEST_RAW_ENCRYPTED_DATA /* winioctl.h:1723:3 */
type PREQUEST_RAW_ENCRYPTED_DATA = uintptr                     /* winioctl.h:1723:30 */

type X_ENCRYPTED_DATA_INFO = struct {
	FStartingFileOffset         DWORDLONG
	FOutputBufferOffset         DWORD
	FBytesWithinFileSize        DWORD
	FBytesWithinValidDataLength DWORD
	FCompressionFormat          WORD
	FDataUnitShift              BYTE
	FChunkShift                 BYTE
	FClusterShift               BYTE
	FEncryptionFormat           BYTE
	FNumberOfDataBlocks         WORD
	FDataBlockSize              [1]DWORD
} /* winioctl.h:1725:9 */

type ENCRYPTED_DATA_INFO = X_ENCRYPTED_DATA_INFO /* winioctl.h:1737:3 */
type PENCRYPTED_DATA_INFO = uintptr              /* winioctl.h:1738:29 */

type X_PLEX_READ_DATA_REQUEST = struct {
	FByteOffset LARGE_INTEGER
	FByteLength DWORD
	FPlexNumber DWORD
} /* winioctl.h:1740:9 */

type PLEX_READ_DATA_REQUEST = X_PLEX_READ_DATA_REQUEST /* winioctl.h:1744:3 */
type PPLEX_READ_DATA_REQUEST = uintptr                 /* winioctl.h:1744:26 */

type X_SI_COPYFILE = struct {
	FSourceFileNameLength      DWORD
	FDestinationFileNameLength DWORD
	FFlags                     DWORD
	FFileNameBuffer            [1]WCHAR
	F__ccgo_pad1               [2]byte
} /* winioctl.h:1746:9 */

type SI_COPYFILE = X_SI_COPYFILE /* winioctl.h:1751:3 */
type PSI_COPYFILE = uintptr      /* winioctl.h:1751:15 */

type X_STORAGE_DESCRIPTOR_HEADER = struct {
	FVersion DWORD
	FSize    DWORD
} /* winioctl.h:1757:9 */

type STORAGE_DESCRIPTOR_HEADER = X_STORAGE_DESCRIPTOR_HEADER /* winioctl.h:1760:3 */
type PSTORAGE_DESCRIPTOR_HEADER = uintptr                    /* winioctl.h:1760:30 */

type STORAGE_PROPERTY_ID = uint32   /* winioctl.h:1772:3 */
type PSTORAGE_PROPERTY_ID = uintptr /* winioctl.h:1772:24 */

type STORAGE_QUERY_TYPE = uint32   /* winioctl.h:1779:3 */
type PSTORAGE_QUERY_TYPE = uintptr /* winioctl.h:1779:23 */

type X_STORAGE_PROPERTY_QUERY = struct {
	FPropertyId           STORAGE_PROPERTY_ID
	FQueryType            STORAGE_QUERY_TYPE
	FAdditionalParameters [1]BYTE
	F__ccgo_pad1          [3]byte
} /* winioctl.h:1781:9 */

type STORAGE_PROPERTY_QUERY = X_STORAGE_PROPERTY_QUERY /* winioctl.h:1785:3 */
type PSTORAGE_PROPERTY_QUERY = uintptr                 /* winioctl.h:1785:27 */

type X_STORAGE_DEVICE_DESCRIPTOR = struct {
	FVersion               DWORD
	FSize                  DWORD
	FDeviceType            BYTE
	FDeviceTypeModifier    BYTE
	FRemovableMedia        BOOLEAN
	FCommandQueueing       BOOLEAN
	FVendorIdOffset        DWORD
	FProductIdOffset       DWORD
	FProductRevisionOffset DWORD
	FSerialNumberOffset    DWORD
	FBusType               STORAGE_BUS_TYPE
	FRawPropertiesLength   DWORD
	FRawDeviceProperties   [1]BYTE
	F__ccgo_pad1           [3]byte
} /* winioctl.h:1787:9 */

type STORAGE_DEVICE_DESCRIPTOR = X_STORAGE_DEVICE_DESCRIPTOR /* winioctl.h:1801:3 */
type PSTORAGE_DEVICE_DESCRIPTOR = uintptr                    /* winioctl.h:1801:30 */

type X_STORAGE_ADAPTER_DESCRIPTOR = struct {
	FVersion               DWORD
	FSize                  DWORD
	FMaximumTransferLength DWORD
	FMaximumPhysicalPages  DWORD
	FAlignmentMask         DWORD
	FAdapterUsesPio        BOOLEAN
	FAdapterScansDown      BOOLEAN
	FCommandQueueing       BOOLEAN
	FAcceleratedTransfer   BOOLEAN
	FBusType               BYTE
	F__ccgo_pad1           [1]byte
	FBusMajorVersion       WORD
	FBusMinorVersion       WORD
	F__ccgo_pad2           [2]byte
} /* winioctl.h:1803:9 */

type STORAGE_ADAPTER_DESCRIPTOR = X_STORAGE_ADAPTER_DESCRIPTOR /* winioctl.h:1816:3 */
type PSTORAGE_ADAPTER_DESCRIPTOR = uintptr                     /* winioctl.h:1816:31 */

type X_STORAGE_DEVICE_ID_DESCRIPTOR = struct {
	FVersion             DWORD
	FSize                DWORD
	FNumberOfIdentifiers DWORD
	FIdentifiers         [1]BYTE
	F__ccgo_pad1         [3]byte
} /* winioctl.h:1818:9 */

type STORAGE_DEVICE_ID_DESCRIPTOR = X_STORAGE_DEVICE_ID_DESCRIPTOR /* winioctl.h:1823:3 */
type PSTORAGE_DEVICE_ID_DESCRIPTOR = uintptr                       /* winioctl.h:1823:33 */

type X_VOLUME_GET_GPT_ATTRIBUTES_INFORMATION = struct{ FGptAttributes ULONGLONG } /* winioctl.h:1825:9 */

type VOLUME_GET_GPT_ATTRIBUTES_INFORMATION = X_VOLUME_GET_GPT_ATTRIBUTES_INFORMATION /* winioctl.h:1827:3 */
type PVOLUME_GET_GPT_ATTRIBUTES_INFORMATION = uintptr                                /* winioctl.h:1827:42 */

type X_DISK_EXTENT = struct {
	FDiskNumber     DWORD
	F__ccgo_pad1    [4]byte
	FStartingOffset LARGE_INTEGER
	FExtentLength   LARGE_INTEGER
} /* winioctl.h:2344:9 */

type DISK_EXTENT = X_DISK_EXTENT /* winioctl.h:2348:3 */
type PDISK_EXTENT = uintptr      /* winioctl.h:2348:15 */

type X_VOLUME_DISK_EXTENTS = struct {
	FNumberOfDiskExtents DWORD
	F__ccgo_pad1         [4]byte
	FExtents             [1]DISK_EXTENT
} /* winioctl.h:2350:9 */

type VOLUME_DISK_EXTENTS = X_VOLUME_DISK_EXTENTS /* winioctl.h:2353:3 */
type PVOLUME_DISK_EXTENTS = uintptr              /* winioctl.h:2353:23 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/wtypesbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type I_RPC_HANDLE = uintptr /* rpc.h:48:16 */
type RPC_STATUS = int32     /* rpc.h:49:20 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type RPC_CSTR = uintptr                /* rpcdce.h:33:25 */
type RPC_WSTR = uintptr                /* rpcdce.h:34:26 */
type RPC_BINDING_HANDLE = I_RPC_HANDLE /* rpcdce.h:35:24 */
type Handle_t = RPC_BINDING_HANDLE     /* rpcdce.h:36:30 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here.

type UUID = GUID /* rpcdce.h:44:16 */

type X_RPC_BINDING_VECTOR = struct {
	FCount       uint32
	F__ccgo_pad1 [4]byte
	FBindingH    [1]RPC_BINDING_HANDLE
} /* rpcdce.h:50:11 */

type RPC_BINDING_VECTOR = X_RPC_BINDING_VECTOR /* rpcdce.h:53:5 */

type X_UUID_VECTOR = struct {
	FCount       uint32
	F__ccgo_pad1 [4]byte
	FUuid        [1]uintptr
} /* rpcdce.h:58:11 */

type UUID_VECTOR = X_UUID_VECTOR /* rpcdce.h:61:5 */

type RPC_IF_HANDLE = uintptr /* rpcdce.h:66:16 */

type X_RPC_IF_ID = struct {
	FUuid      UUID
	FVersMajor uint16
	FVersMinor uint16
} /* rpcdce.h:70:11 */

type RPC_IF_ID = X_RPC_IF_ID /* rpcdce.h:74:5 */

type X_RPC_PROTSEQ_VECTORA = struct {
	FCount       uint32
	F__ccgo_pad1 [4]byte
	FProtseq     [1]uintptr
} /* rpcdce.h:124:11 */

type RPC_PROTSEQ_VECTORA = X_RPC_PROTSEQ_VECTORA /* rpcdce.h:127:5 */

type X_RPC_PROTSEQ_VECTORW = struct {
	FCount       uint32
	F__ccgo_pad1 [4]byte
	FProtseq     [1]uintptr
} /* rpcdce.h:129:11 */

type RPC_PROTSEQ_VECTORW = X_RPC_PROTSEQ_VECTORW /* rpcdce.h:132:5 */

type X_RPC_POLICY = struct {
	FLength        uint32
	FEndpointFlags uint32
	FNICFlags      uint32
} /* rpcdce.h:136:11 */

type RPC_POLICY = X_RPC_POLICY /* rpcdce.h:140:5 */
type PRPC_POLICY = uintptr     /* rpcdce.h:140:16 */

type RPC_STATS_VECTOR = struct {
	FCount uint32
	FStats [1]uint32
} /* rpcdce.h:151:5 */

type RPC_IF_ID_VECTOR = struct {
	FCount       uint32
	F__ccgo_pad1 [4]byte
	FIfId        [1]uintptr
} /* rpcdce.h:161:5 */

type RPC_AUTH_IDENTITY_HANDLE = uintptr /* rpcdce.h:257:16 */
type RPC_AUTHZ_HANDLE = uintptr         /* rpcdce.h:258:16 */

type X_RPC_SECURITY_QOS = struct {
	FVersion           uint32
	FCapabilities      uint32
	FIdentityTracking  uint32
	FImpersonationType uint32
} /* rpcdce.h:311:11 */

type RPC_SECURITY_QOS = X_RPC_SECURITY_QOS /* rpcdce.h:316:5 */
type PRPC_SECURITY_QOS = uintptr           /* rpcdce.h:316:22 */

type X_SEC_WINNT_AUTH_IDENTITY_W = struct {
	FUser           uintptr
	FUserLength     uint32
	F__ccgo_pad1    [4]byte
	FDomain         uintptr
	FDomainLength   uint32
	F__ccgo_pad2    [4]byte
	FPassword       uintptr
	FPasswordLength uint32
	FFlags          uint32
} /* rpcdce.h:324:11 */

type SEC_WINNT_AUTH_IDENTITY_W = X_SEC_WINNT_AUTH_IDENTITY_W /* rpcdce.h:332:5 */
type PSEC_WINNT_AUTH_IDENTITY_W = uintptr                    /* rpcdce.h:332:31 */

type X_SEC_WINNT_AUTH_IDENTITY_A = struct {
	FUser           uintptr
	FUserLength     uint32
	F__ccgo_pad1    [4]byte
	FDomain         uintptr
	FDomainLength   uint32
	F__ccgo_pad2    [4]byte
	FPassword       uintptr
	FPasswordLength uint32
	FFlags          uint32
} /* rpcdce.h:334:11 */

type SEC_WINNT_AUTH_IDENTITY_A = X_SEC_WINNT_AUTH_IDENTITY_A /* rpcdce.h:342:5 */
type PSEC_WINNT_AUTH_IDENTITY_A = uintptr                    /* rpcdce.h:342:31 */

type X_RPC_HTTP_TRANSPORT_CREDENTIALS_W = struct {
	FTransportCredentials     uintptr
	FFlags                    uint32
	FAuthenticationTarget     uint32
	FNumberOfAuthnSchemes     uint32
	F__ccgo_pad1              [4]byte
	FAuthnSchemes             uintptr
	FServerCertificateSubject uintptr
} /* rpcdce.h:366:11 */

type RPC_HTTP_TRANSPORT_CREDENTIALS_W = X_RPC_HTTP_TRANSPORT_CREDENTIALS_W /* rpcdce.h:373:5 */
type PRPC_HTTP_TRANSPORT_CREDENTIALS_W = uintptr                           /* rpcdce.h:373:38 */

type X_RPC_HTTP_TRANSPORT_CREDENTIALS_A = struct {
	FTransportCredentials     uintptr
	FFlags                    uint32
	FAuthenticationTarget     uint32
	FNumberOfAuthnSchemes     uint32
	F__ccgo_pad1              [4]byte
	FAuthnSchemes             uintptr
	FServerCertificateSubject uintptr
} /* rpcdce.h:375:11 */

type RPC_HTTP_TRANSPORT_CREDENTIALS_A = X_RPC_HTTP_TRANSPORT_CREDENTIALS_A /* rpcdce.h:382:5 */
type PRPC_HTTP_TRANSPORT_CREDENTIALS_A = uintptr                           /* rpcdce.h:382:38 */

type X_RPC_SECURITY_QOS_V2_W = struct {
	FVersion                    uint32
	FCapabilities               uint32
	FIdentityTracking           uint32
	FImpersonationType          uint32
	FAdditionalSecurityInfoType uint32
	F__ccgo_pad1                [4]byte
	Fu                          struct{ FHttpCredentials uintptr }
} /* rpcdce.h:384:11 */

type RPC_SECURITY_QOS_V2_W = X_RPC_SECURITY_QOS_V2_W /* rpcdce.h:393:5 */
type PRPC_SECURITY_QOS_V2_W = uintptr                /* rpcdce.h:393:27 */

type X_RPC_SECURITY_QOS_V2_A = struct {
	FVersion                    uint32
	FCapabilities               uint32
	FIdentityTracking           uint32
	FImpersonationType          uint32
	FAdditionalSecurityInfoType uint32
	F__ccgo_pad1                [4]byte
	Fu                          struct{ FHttpCredentials uintptr }
} /* rpcdce.h:395:11 */

type RPC_SECURITY_QOS_V2_A = X_RPC_SECURITY_QOS_V2_A /* rpcdce.h:404:5 */
type PRPC_SECURITY_QOS_V2_A = uintptr                /* rpcdce.h:404:27 */

type X_RPC_SECURITY_QOS_V3_W = struct {
	FVersion                    uint32
	FCapabilities               uint32
	FIdentityTracking           uint32
	FImpersonationType          uint32
	FAdditionalSecurityInfoType uint32
	F__ccgo_pad1                [4]byte
	Fu                          struct{ FHttpCredentials uintptr }
	FSid                        uintptr
} /* rpcdce.h:408:11 */

type RPC_SECURITY_QOS_V3_W = X_RPC_SECURITY_QOS_V3_W /* rpcdce.h:418:5 */
type PRPC_SECURITY_QOS_V3_W = uintptr                /* rpcdce.h:418:27 */

type X_RPC_SECURITY_QOS_V3_A = struct {
	FVersion                    uint32
	FCapabilities               uint32
	FIdentityTracking           uint32
	FImpersonationType          uint32
	FAdditionalSecurityInfoType uint32
	F__ccgo_pad1                [4]byte
	Fu                          struct{ FHttpCredentials uintptr }
	FSid                        uintptr
} /* rpcdce.h:420:11 */

type RPC_SECURITY_QOS_V3_A = X_RPC_SECURITY_QOS_V3_A /* rpcdce.h:430:5 */
type PRPC_SECURITY_QOS_V3_A = uintptr                /* rpcdce.h:430:27 */

type RPC_HTTP_REDIRECTOR_STAGE = uint32 /* rpcdce.h:445:5 */

type RPC_NEW_HTTP_PROXY_CHANNEL = uintptr /* rpcdce.h:447:22 */
type RPC_HTTP_PROXY_FREE_STRING = uintptr /* rpcdce.h:448:16 */

type RPC_AUTH_KEY_RETRIEVAL_FN = uintptr /* rpcdce.h:471:16 */

type RPC_CLIENT_INFORMATION1 = struct {
	FUserName     uintptr
	FComputerName uintptr
	FPrivilege    uint16
	F__ccgo_pad1  [2]byte
	FAuthFlags    uint32
}                                       /* rpcdce.h:490:5 */
type PRPC_CLIENT_INFORMATION1 = uintptr /* rpcdce.h:490:29 */

type RPC_EP_INQ_HANDLE = uintptr /* rpcdce.h:526:24 */

type RPC_MGMT_AUTHORIZATION_FN = uintptr /* rpcdce.h:547:15 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_RPC_VERSION = struct {
	FMajorVersion uint16
	FMinorVersion uint16
} /* rpcdcep.h:15:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type RPC_VERSION = X_RPC_VERSION /* rpcdcep.h:18:5 */

type X_RPC_SYNTAX_IDENTIFIER = struct {
	FSyntaxGUID    GUID
	FSyntaxVersion RPC_VERSION
} /* rpcdcep.h:20:11 */

type RPC_SYNTAX_IDENTIFIER = X_RPC_SYNTAX_IDENTIFIER /* rpcdcep.h:23:5 */
type PRPC_SYNTAX_IDENTIFIER = uintptr                /* rpcdcep.h:23:27 */

type X_RPC_MESSAGE = struct {
	FHandle                  RPC_BINDING_HANDLE
	FDataRepresentation      uint32
	F__ccgo_pad1             [4]byte
	FBuffer                  uintptr
	FBufferLength            uint32
	FProcNum                 uint32
	FTransferSyntax          PRPC_SYNTAX_IDENTIFIER
	FRpcInterfaceInformation uintptr
	FReservedForRuntime      uintptr
	FManagerEpv              uintptr
	FImportContext           uintptr
	FRpcFlags                uint32
	F__ccgo_pad2             [4]byte
} /* rpcdcep.h:25:11 */

type RPC_MESSAGE = X_RPC_MESSAGE /* rpcdcep.h:37:5 */
type PRPC_MESSAGE = uintptr      /* rpcdcep.h:37:17 */

type RPC_DISPATCH_FUNCTION = uintptr /* rpcdcep.h:77:16 */

type RPC_DISPATCH_TABLE = struct {
	FDispatchTableCount uint32
	F__ccgo_pad1        [4]byte
	FDispatchTable      uintptr
	FReserved           LONG_PTR
}                                  /* rpcdcep.h:83:5 */
type PRPC_DISPATCH_TABLE = uintptr /* rpcdcep.h:83:24 */

type X_RPC_PROTSEQ_ENDPOINT = struct {
	FRpcProtocolSequence uintptr
	FEndpoint            uintptr
} /* rpcdcep.h:85:11 */

type RPC_PROTSEQ_ENDPOINT = X_RPC_PROTSEQ_ENDPOINT /* rpcdcep.h:88:5 */
type PRPC_PROTSEQ_ENDPOINT = uintptr               /* rpcdcep.h:88:26 */

type X_RPC_SERVER_INTERFACE = struct {
	FLength                  uint32
	FInterfaceId             RPC_SYNTAX_IDENTIFIER
	FTransferSyntax          RPC_SYNTAX_IDENTIFIER
	F__ccgo_pad1             [4]byte
	FDispatchTable           PRPC_DISPATCH_TABLE
	FRpcProtseqEndpointCount uint32
	F__ccgo_pad2             [4]byte
	FRpcProtseqEndpoint      PRPC_PROTSEQ_ENDPOINT
	FDefaultManagerEpv       uintptr
	FInterpreterInfo         uintptr
	FFlags                   uint32
	F__ccgo_pad3             [4]byte
} /* rpcdcep.h:93:11 */

type RPC_SERVER_INTERFACE = X_RPC_SERVER_INTERFACE /* rpcdcep.h:103:5 */
type PRPC_SERVER_INTERFACE = uintptr               /* rpcdcep.h:103:26 */

type X_RPC_CLIENT_INTERFACE = struct {
	FLength                  uint32
	FInterfaceId             RPC_SYNTAX_IDENTIFIER
	FTransferSyntax          RPC_SYNTAX_IDENTIFIER
	F__ccgo_pad1             [4]byte
	FDispatchTable           PRPC_DISPATCH_TABLE
	FRpcProtseqEndpointCount uint32
	F__ccgo_pad2             [4]byte
	FRpcProtseqEndpoint      PRPC_PROTSEQ_ENDPOINT
	FReserved                ULONG_PTR
	FInterpreterInfo         uintptr
	FFlags                   uint32
	F__ccgo_pad3             [4]byte
} /* rpcdcep.h:105:11 */

type RPC_CLIENT_INTERFACE = X_RPC_CLIENT_INTERFACE /* rpcdcep.h:115:5 */
type PRPC_CLIENT_INTERFACE = uintptr               /* rpcdcep.h:115:26 */

type I_RPC_MUTEX = uintptr /* rpcdcep.h:127:16 */

type PRPC_RUNDOWN = uintptr /* rpcdcep.h:142:16 */

type X_RPC_TRANSFER_SYNTAX = struct {
	FUuid      UUID
	FVersMajor uint16
	FVersMinor uint16
} /* rpcdcep.h:175:11 */

type RPC_TRANSFER_SYNTAX = X_RPC_TRANSFER_SYNTAX /* rpcdcep.h:179:5 */

type RPCLT_PDU_FILTER_FUNC = uintptr /* rpcdcep.h:201:16 */
type RPC_SETFILTER_FUNC = uintptr    /* rpcdcep.h:202:16 */

type X_RPC_C_OPT_METADATA_DESCRIPTOR = struct {
	FBufferSize  uint32
	F__ccgo_pad1 [4]byte
	FBuffer      uintptr
} /* rpcdcep.h:222:11 */

type RPC_C_OPT_METADATA_DESCRIPTOR = X_RPC_C_OPT_METADATA_DESCRIPTOR /* rpcdcep.h:225:5 */

type X_RDR_CALLOUT_STATE = struct {
	FLastError           RPC_STATUS
	F__ccgo_pad1         [4]byte
	FLastEEInfo          uintptr
	FLastCalledStage     RPC_HTTP_REDIRECTOR_STAGE
	F__ccgo_pad2         [4]byte
	FServerName          uintptr
	FServerPort          uintptr
	FRemoteUser          uintptr
	FAuthType            uintptr
	FResourceTypePresent uint8
	FMetadataPresent     uint8
	FSessionIdPresent    uint8
	FInterfacePresent    uint8
	FResourceType        UUID
	F__ccgo_pad3         [4]byte
	FMetadata            RPC_C_OPT_METADATA_DESCRIPTOR
	FSessionId           UUID
	FInterface           RPC_SYNTAX_IDENTIFIER
	F__ccgo_pad4         [4]byte
	FCertContext         uintptr
} /* rpcdcep.h:227:11 */

type RDR_CALLOUT_STATE = X_RDR_CALLOUT_STATE /* rpcdcep.h:244:5 */

type I_RpcProxyIsValidMachineFn = uintptr       /* rpcdcep.h:246:22 */
type I_RpcProxyGetClientAddressFn = uintptr     /* rpcdcep.h:247:22 */
type I_RpcProxyGetConnectionTimeoutFn = uintptr /* rpcdcep.h:248:22 */
type I_RpcPerformCalloutFn = uintptr            /* rpcdcep.h:249:22 */
type I_RpcFreeCalloutStateFn = uintptr          /* rpcdcep.h:250:16 */

type TagI_RpcProxyCallbackInterface = struct {
	FIsValidMachineFn       I_RpcProxyIsValidMachineFn
	FGetClientAddressFn     I_RpcProxyGetClientAddressFn
	FGetConnectionTimeoutFn I_RpcProxyGetConnectionTimeoutFn
	FPerformCalloutFn       I_RpcPerformCalloutFn
	FFreeCalloutStateFn     I_RpcFreeCalloutStateFn
} /* rpcdcep.h:252:11 */

type I_RpcProxyCallbackInterface = TagI_RpcProxyCallbackInterface /* rpcdcep.h:258:5 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type RPC_NS_HANDLE = uintptr /* rpcnsi.h:11:14 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// TODO:  This isn't actual working on gcc.  Either we need to implement
//    their __try/__except/__finally feature, or we need to do at least for x64
//    emulation-code via inline-assembler ...

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type RPC_NOTIFICATION_TYPES = uint32 /* rpcasync.h:23:5 */

type RPC_ASYNC_EVENT = uint32 /* rpcasync.h:27:5 */

type X_RPC_ASYNC_STATE = struct {
	FSize             uint32
	FSignature        uint32
	FLock             int32
	FFlags            uint32
	FStubInfo         uintptr
	FUserInfo         uintptr
	FRuntimeInfo      uintptr
	FEvent            RPC_ASYNC_EVENT
	FNotificationType RPC_NOTIFICATION_TYPES
	Fu                struct {
		FAPC struct {
			FNotificationRoutine PFN_RPCNOTIFICATION_ROUTINE
			FhThread             HANDLE
		}
		F__ccgo_pad1 [16]byte
	}
	FReserved [4]LONG_PTR
} /* rpcasync.h:29:3 */

type PFN_RPCNOTIFICATION_ROUTINE = uintptr /* rpcasync.h:32:35 */

type RPC_ASYNC_STATE = X_RPC_ASYNC_STATE /* rpcasync.h:63:5 */
type PRPC_ASYNC_STATE = uintptr          /* rpcasync.h:63:21 */

type ExtendedErrorParamTypes = uint32 /* rpcasync.h:80:5 */

type TagBinaryParam = struct {
	FBuffer      uintptr
	FSize        int16
	F__ccgo_pad1 [6]byte
} /* rpcasync.h:85:11 */

type BinaryParam = TagBinaryParam /* rpcasync.h:88:5 */

type TagRPC_EE_INFO_PARAM = struct {
	FParameterType ExtendedErrorParamTypes
	F__ccgo_pad1   [4]byte
	Fu             struct {
		FAnsiString  LPSTR
		F__ccgo_pad1 [8]byte
	}
} /* rpcasync.h:90:11 */

type RPC_EE_INFO_PARAM = TagRPC_EE_INFO_PARAM /* rpcasync.h:100:5 */

type TagRPC_EXTENDED_ERROR_INFO = struct {
	FVersion      ULONG
	F__ccgo_pad1  [4]byte
	FComputerName LPWSTR
	FProcessID    ULONG
	Fu            struct {
		F__ccgo_pad1 [0]uint32
		FSystemTime  SYSTEMTIME
	}
	FGeneratingComponent ULONG
	FStatus              ULONG
	FDetectionLocation   USHORT
	FFlags               USHORT
	FNumberOfParameters  int32
	F__ccgo_pad2         [4]byte
	FParameters          [4]RPC_EE_INFO_PARAM
} /* rpcasync.h:109:11 */

type RPC_EXTENDED_ERROR_INFO = TagRPC_EXTENDED_ERROR_INFO /* rpcasync.h:123:5 */

type TagRPC_ERROR_ENUM_HANDLE = struct {
	FSignature   ULONG
	F__ccgo_pad1 [4]byte
	FCurrentPos  uintptr
	FHead        uintptr
} /* rpcasync.h:125:11 */

type RPC_ERROR_ENUM_HANDLE = TagRPC_ERROR_ENUM_HANDLE /* rpcasync.h:129:5 */

type TagRPC_CALL_ATTRIBUTES_V1_W = struct {
	FVersion                         uint32
	FFlags                           uint32
	FServerPrincipalNameBufferLength uint32
	F__ccgo_pad1                     [4]byte
	FServerPrincipalName             uintptr
	FClientPrincipalNameBufferLength uint32
	F__ccgo_pad2                     [4]byte
	FClientPrincipalName             uintptr
	FAuthenticationLevel             uint32
	FAuthenticationService           uint32
	FNullSession                     WINBOOL
	F__ccgo_pad3                     [4]byte
} /* rpcasync.h:149:11 */

type RPC_CALL_ATTRIBUTES_V1_W = TagRPC_CALL_ATTRIBUTES_V1_W /* rpcasync.h:159:5 */

type TagRPC_CALL_ATTRIBUTES_V1_A = struct {
	FVersion                         uint32
	FFlags                           uint32
	FServerPrincipalNameBufferLength uint32
	F__ccgo_pad1                     [4]byte
	FServerPrincipalName             uintptr
	FClientPrincipalNameBufferLength uint32
	F__ccgo_pad2                     [4]byte
	FClientPrincipalName             uintptr
	FAuthenticationLevel             uint32
	FAuthenticationService           uint32
	FNullSession                     WINBOOL
	F__ccgo_pad3                     [4]byte
} /* rpcasync.h:161:11 */

type RPC_CALL_ATTRIBUTES_V1_A = TagRPC_CALL_ATTRIBUTES_V1_A /* rpcasync.h:171:5 */

type RPC_CALL_ATTRIBUTES = RPC_CALL_ATTRIBUTES_V1_A /* rpcasync.h:179:34 */

type X_RPC_ASYNC_NOTIFICATION_INFO = struct {
	FAPC struct {
		FNotificationRoutine PFN_RPCNOTIFICATION_ROUTINE
		FhThread             HANDLE
	}
	F__ccgo_pad1 [16]byte
} /* rpcasync.h:185:9 */

type RPC_ASYNC_NOTIFICATION_INFO = X_RPC_ASYNC_NOTIFICATION_INFO /* rpcasync.h:202:3 */
type PRPC_ASYNC_NOTIFICATION_INFO = uintptr                      /* rpcasync.h:202:32 */

type RpcCallType = uint32 /* rpcasync.h:219:3 */

type RpcLocalAddressFormat = uint32 /* rpcasync.h:225:3 */

type RPC_NOTIFICATIONS = uint32 /* rpcasync.h:231:3 */

type RpcCallClientLocality = uint32 /* rpcasync.h:238:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type RPC_IMPORT_CONTEXT_P = struct {
	FLookupContext  RPC_NS_HANDLE
	FProposedHandle RPC_BINDING_HANDLE
	FBindings       uintptr
}                                    /* rpcnsip.h:17:5 */
type PRPC_IMPORT_CONTEXT_P = uintptr /* rpcnsip.h:17:26 */

// Copyright (C) 2011 Francois Gouget
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA

type Byte1 = uint8   /* rpcndr.h:63:25 */
type Cs_byte = Byte1 /* rpcndr.h:64:16 */
type Boolean = uint8 /* rpcndr.h:65:25 */

type NDR_CCONTEXT = uintptr /* rpcndr.h:128:16 */

type X_NDR_SCONTEXT = struct {
	Fpad         [2]uintptr
	FuserContext uintptr
} /* rpcndr.h:130:11 */

type NDR_SCONTEXT = uintptr /* rpcndr.h:133:5 */

type NDR_RUNDOWN = uintptr         /* rpcndr.h:139:16 */
type NDR_NOTIFY_ROUTINE = uintptr  /* rpcndr.h:140:16 */
type NDR_NOTIFY2_ROUTINE = uintptr /* rpcndr.h:141:16 */

type X_SCONTEXT_QUEUE = struct {
	FNumberOfObjects uint32
	F__ccgo_pad1     [4]byte
	FArrayOfObjects  uintptr
} /* rpcndr.h:143:11 */

type SCONTEXT_QUEUE = X_SCONTEXT_QUEUE /* rpcndr.h:146:5 */
type PSCONTEXT_QUEUE = uintptr         /* rpcndr.h:146:20 */

type Error_status_t = uint32 /* rpcndr.h:173:27 */

type X_MIDL_STUB_MESSAGE = struct {
	FRpcMsg                 PRPC_MESSAGE
	FBuffer                 uintptr
	FBufferStart            uintptr
	FBufferEnd              uintptr
	FBufferMark             uintptr
	FBufferLength           uint32
	FMemorySize             uint32
	FMemory                 uintptr
	FIsClient               uint8
	FPad                    uint8
	FuFlags2                uint16
	FReuseBuffer            int32
	FpAllocAllNodesContext  uintptr
	FpPointerQueueState     uintptr
	FIgnoreEmbeddedPointers int32
	F__ccgo_pad1            [4]byte
	FPointerBufferMark      uintptr
	FfBufferValid           uint8
	FuFlags                 uint8
	FUniquePtrCount         uint16
	F__ccgo_pad2            [4]byte
	FMaxCount               ULONG_PTR
	FOffset                 uint32
	FActualCount            uint32
	FpfnAllocate            uintptr
	FpfnFree                uintptr
	FStackTop               uintptr
	FpPresentedType         uintptr
	FpTransmitType          uintptr
	FSavedHandle            Handle_t
	FStubDesc               uintptr
	FFullPtrXlatTables      uintptr
	FFullPtrRefId           uint32
	FPointerLength          uint32
	FfInDontFree            uint32 /* int fInDontFree: 1, int fDontCallFreeInst: 1, int fInOnlyParam: 1, int fHasReturn: 1, int fHasExtensions: 1, int fHasNewCorrDesc: 1, int fIsOicfServer: 1, int fHasMemoryValidateCallback: 1, int fUnused: 8, int fUnused2: 16 */
	F__ccgo_pad3            [4]byte
	FdwDestContext          uint32
	F__ccgo_pad4            [4]byte
	FpvDestContext          uintptr
	FSavedContextHandles    uintptr
	FParamNumber            int32
	F__ccgo_pad5            [4]byte
	FpRpcChannelBuffer      uintptr
	FpArrayInfo             PARRAY_INFO
	FSizePtrCountArray      uintptr
	FSizePtrOffsetArray     uintptr
	FSizePtrLengthArray     uintptr
	FpArgQueue              uintptr
	FdwStubPhase            uint32
	F__ccgo_pad6            [4]byte
	FLowStackMark           uintptr
	FpAsyncMsg              PNDR_ASYNC_MESSAGE
	FpCorrInfo              PNDR_CORRELATION_INFO
	FpCorrMemory            uintptr
	FpMemoryList            uintptr
	FpCSInfo                uintptr
	FConformanceMark        uintptr
	FVarianceMark           uintptr
	FUnused                 INT_PTR
	FpContext               uintptr
	FpUserMarshalList       uintptr
	FReserved51_2           INT_PTR
	FReserved51_3           INT_PTR
	FReserved51_4           INT_PTR
	FReserved51_5           INT_PTR
} /* rpcndr.h:211:3 */

type X_MIDL_STUB_DESC = struct {
	FRpcInterfaceInformation     uintptr
	FpfnAllocate                 uintptr
	FpfnFree                     uintptr
	FIMPLICIT_HANDLE_INFO        struct{ FpAutoHandle uintptr }
	FapfnNdrRundownRoutines      uintptr
	FaGenericBindingRoutinePairs uintptr
	FapfnExprEval                uintptr
	FaXmitQuintuple              uintptr
	FpFormatTypes                uintptr
	FfCheckBounds                int32
	FVersion                     uint32
	FpMallocFreeStruct           uintptr
	FMIDLVersion                 int32
	F__ccgo_pad1                 [4]byte
	FCommFaultOffsets            uintptr
	FaUserMarshalQuadruple       uintptr
	FNotifyRoutineTable          uintptr
	FmFlags                      ULONG_PTR
	FCsRoutineTables             uintptr
	FReserved4                   uintptr
	FReserved5                   ULONG_PTR
} /* rpcndr.h:211:3 */

type X_FULL_PTR_XLAT_TABLES = struct {
	FRefIdToPointer struct {
		FXlatTable       uintptr
		FStateTable      uintptr
		FNumberOfEntries uint32
		F__ccgo_pad1     [4]byte
	}
	FPointerToRefId struct {
		FXlatTable       uintptr
		FNumberOfBuckets uint32
		FHashMask        uint32
	}
	FNextRefId uint32
	FXlatSide  XLAT_SIDE
} /* rpcndr.h:211:3 */

type RPC_BUFPTR = uintptr     /* rpcndr.h:215:25 */
type RPC_LENGTH = uint32      /* rpcndr.h:216:29 */
type EXPR_EVAL = uintptr      /* rpcndr.h:217:16 */
type PFORMAT_STRING = uintptr /* rpcndr.h:218:31 */

type ARRAY_INFO = struct {
	FDimension             int32
	F__ccgo_pad1           [4]byte
	FBufferConformanceMark uintptr
	FBufferVarianceMark    uintptr
	FMaxCountArray         uintptr
	FOffsetArray           uintptr
	FActualCountArray      uintptr
}                          /* rpcndr.h:227:5 */
type PARRAY_INFO = uintptr /* rpcndr.h:227:16 */

type PNDR_ASYNC_MESSAGE = uintptr    /* rpcndr.h:229:37 */
type PNDR_CORRELATION_INFO = uintptr /* rpcndr.h:230:40 */

type CS_STUB_INFO = struct {
	FWireCodeset             uint32
	FDesiredReceivingCodeset uint32
	FCSArrayInfo             uintptr
} /* rpcndr.h:236:5 */

type X_MIDL_SYNTAX_INFO = struct {
	FTransferSyntax        RPC_SYNTAX_IDENTIFIER
	F__ccgo_pad1           [4]byte
	FDispatchTable         uintptr
	FProcString            PFORMAT_STRING
	FFmtStringOffset       uintptr
	FTypeString            PFORMAT_STRING
	FaUserMarshalQuadruple uintptr
	FpReserved1            ULONG_PTR
	FpReserved2            ULONG_PTR
} /* rpcndr.h:238:3 */

type MIDL_SYNTAX_INFO = X_MIDL_SYNTAX_INFO /* rpcndr.h:239:36 */
type PMIDL_SYNTAX_INFO = uintptr           /* rpcndr.h:239:53 */

type IRpcChannelBuffer1 = struct{ FlpVtbl uintptr } /* rpcndr.h:211:3 */

type MIDL_STUB_MESSAGE = X_MIDL_STUB_MESSAGE /* rpcndr.h:318:5 */
type PMIDL_STUB_MESSAGE = uintptr            /* rpcndr.h:318:23 */

type GENERIC_BINDING_ROUTINE = uintptr /* rpcndr.h:320:16 */
type GENERIC_UNBIND_ROUTINE = uintptr  /* rpcndr.h:321:16 */

type X_GENERIC_BINDING_ROUTINE_PAIR = struct {
	FpfnBind   GENERIC_BINDING_ROUTINE
	FpfnUnbind GENERIC_UNBIND_ROUTINE
} /* rpcndr.h:211:3 */

type GENERIC_BINDING_ROUTINE_PAIR = X_GENERIC_BINDING_ROUTINE_PAIR /* rpcndr.h:326:5 */
type PGENERIC_BINDING_ROUTINE_PAIR = uintptr                       /* rpcndr.h:326:34 */

type X__GENERIC_BINDING_INFO = struct {
	FpObj        uintptr
	FSize        uint32
	F__ccgo_pad1 [4]byte
	FpfnBind     GENERIC_BINDING_ROUTINE
	FpfnUnbind   GENERIC_UNBIND_ROUTINE
} /* rpcndr.h:328:11 */

type GENERIC_BINDING_INFO = X__GENERIC_BINDING_INFO /* rpcndr.h:333:5 */
type PGENERIC_BINDING_INFO = uintptr                /* rpcndr.h:333:26 */

type XMIT_HELPER_ROUTINE = uintptr /* rpcndr.h:337:16 */

type X_XMIT_ROUTINE_QUINTUPLE = struct {
	FpfnTranslateToXmit   XMIT_HELPER_ROUTINE
	FpfnTranslateFromXmit XMIT_HELPER_ROUTINE
	FpfnFreeXmit          XMIT_HELPER_ROUTINE
	FpfnFreeInst          XMIT_HELPER_ROUTINE
} /* rpcndr.h:211:3 */

type XMIT_ROUTINE_QUINTUPLE = X_XMIT_ROUTINE_QUINTUPLE /* rpcndr.h:344:5 */
type PXMIT_ROUTINE_QUINTUPLE = uintptr                 /* rpcndr.h:344:28 */

type USER_MARSHAL_SIZING_ROUTINE = uintptr        /* rpcndr.h:346:17 */
type USER_MARSHAL_MARSHALLING_ROUTINE = uintptr   /* rpcndr.h:347:25 */
type USER_MARSHAL_UNMARSHALLING_ROUTINE = uintptr /* rpcndr.h:348:25 */
type USER_MARSHAL_FREEING_ROUTINE = uintptr       /* rpcndr.h:349:16 */

type X_USER_MARSHAL_ROUTINE_QUADRUPLE = struct {
	FpfnBufferSize USER_MARSHAL_SIZING_ROUTINE
	FpfnMarshall   USER_MARSHAL_MARSHALLING_ROUTINE
	FpfnUnmarshall USER_MARSHAL_UNMARSHALLING_ROUTINE
	FpfnFree       USER_MARSHAL_FREEING_ROUTINE
} /* rpcndr.h:211:3 */

type USER_MARSHAL_ROUTINE_QUADRUPLE = X_USER_MARSHAL_ROUTINE_QUADRUPLE /* rpcndr.h:356:5 */

type USER_MARSHAL_CB_TYPE = uint32 /* rpcndr.h:362:5 */

type X_USER_MARSHAL_CB = struct {
	FFlags       uint32
	F__ccgo_pad1 [4]byte
	FpStubMsg    PMIDL_STUB_MESSAGE
	FpReserve    PFORMAT_STRING
	FSignature   uint32
	FCBType      USER_MARSHAL_CB_TYPE
	FpFormat     PFORMAT_STRING
	FpTypeFormat PFORMAT_STRING
} /* rpcndr.h:364:11 */

type USER_MARSHAL_CB = X_USER_MARSHAL_CB /* rpcndr.h:372:5 */

type X_MALLOC_FREE_STRUCT = struct {
	FpfnAllocate uintptr
	FpfnFree     uintptr
} /* rpcndr.h:211:3 */

type MALLOC_FREE_STRUCT = X_MALLOC_FREE_STRUCT /* rpcndr.h:384:5 */

type X_COMM_FAULT_OFFSETS = struct {
	FCommOffset  int16
	FFaultOffset int16
} /* rpcndr.h:211:3 */

type COMM_FAULT_OFFSETS = X_COMM_FAULT_OFFSETS /* rpcndr.h:389:5 */

type IDL_CS_CONVERT = uint32 /* rpcndr.h:393:5 */

type CS_TYPE_NET_SIZE_ROUTINE = uintptr   /* rpcndr.h:395:16 */
type CS_TYPE_LOCAL_SIZE_ROUTINE = uintptr /* rpcndr.h:396:16 */
type CS_TYPE_TO_NETCS_ROUTINE = uintptr   /* rpcndr.h:397:16 */
type CS_TYPE_FROM_NETCS_ROUTINE = uintptr /* rpcndr.h:398:16 */
type CS_TAG_GETTING_ROUTINE = uintptr     /* rpcndr.h:399:16 */

type X_NDR_CS_SIZE_CONVERT_ROUTINES = struct {
	FpfnNetSize   CS_TYPE_NET_SIZE_ROUTINE
	FpfnToNetCs   CS_TYPE_TO_NETCS_ROUTINE
	FpfnLocalSize CS_TYPE_LOCAL_SIZE_ROUTINE
	FpfnFromNetCs CS_TYPE_FROM_NETCS_ROUTINE
} /* rpcndr.h:211:3 */

type NDR_CS_SIZE_CONVERT_ROUTINES = X_NDR_CS_SIZE_CONVERT_ROUTINES /* rpcndr.h:408:5 */

type X_NDR_CS_ROUTINES = struct {
	FpSizeConvertRoutines uintptr
	FpTagGettingRoutines  uintptr
} /* rpcndr.h:211:3 */

type NDR_CS_ROUTINES = X_NDR_CS_ROUTINES /* rpcndr.h:413:5 */

type MIDL_STUB_DESC = X_MIDL_STUB_DESC /* rpcndr.h:440:5 */

type PMIDL_STUB_DESC = uintptr /* rpcndr.h:442:32 */
type PMIDL_XMIT_TYPE = uintptr /* rpcndr.h:443:16 */

type X_MIDL_FORMAT_STRING = struct {
	F__ccgo_pad1 [0]uint16
	FPad         int16
} /* rpcndr.h:445:11 */

type MIDL_FORMAT_STRING = X_MIDL_FORMAT_STRING /* rpcndr.h:448:5 */

type STUB_THUNK = uintptr     /* rpcndr.h:450:16 */
type SERVER_ROUTINE = uintptr /* rpcndr.h:451:20 */

type X_MIDL_SERVER_INFO_ = struct {
	FpStubDesc       PMIDL_STUB_DESC
	FDispatchTable   uintptr
	FProcString      PFORMAT_STRING
	FFmtStringOffset uintptr
	FThunkTable      uintptr
	FpTransferSyntax PRPC_SYNTAX_IDENTIFIER
	FnCount          ULONG_PTR
	FpSyntaxInfo     PMIDL_SYNTAX_INFO
} /* rpcndr.h:453:11 */

type MIDL_SERVER_INFO = X_MIDL_SERVER_INFO_ /* rpcndr.h:462:5 */
type PMIDL_SERVER_INFO = uintptr            /* rpcndr.h:462:22 */

type X_MIDL_STUBLESS_PROXY_INFO = struct {
	FpStubDesc          PMIDL_STUB_DESC
	FProcFormatString   PFORMAT_STRING
	FFormatStringOffset uintptr
	FpTransferSyntax    PRPC_SYNTAX_IDENTIFIER
	FnCount             ULONG_PTR
	FpSyntaxInfo        PMIDL_SYNTAX_INFO
} /* rpcndr.h:466:11 */

type MIDL_STUBLESS_PROXY_INFO = X_MIDL_STUBLESS_PROXY_INFO /* rpcndr.h:473:5 */

type PMIDL_STUBLESS_PROXY_INFO = uintptr /* rpcndr.h:475:36 */

type PARAM_OFFSETTABLE = uintptr  /* rpcndr.h:488:26 */
type PPARAM_OFFSETTABLE = uintptr /* rpcndr.h:488:45 */

type X_CLIENT_CALL_RETURN = struct{ FPointer uintptr } /* rpcndr.h:490:11 */

type CLIENT_CALL_RETURN = X_CLIENT_CALL_RETURN /* rpcndr.h:493:5 */

type XLAT_SIDE = uint32 /* rpcndr.h:497:5 */

type X_FULL_PTR_TO_REFID_ELEMENT = struct {
	FNext        uintptr
	FPointer     uintptr
	FRefId       uint32
	FState       uint8
	F__ccgo_pad1 [3]byte
} /* rpcndr.h:499:11 */

type FULL_PTR_TO_REFID_ELEMENT = X_FULL_PTR_TO_REFID_ELEMENT /* rpcndr.h:504:5 */
type PFULL_PTR_TO_REFID_ELEMENT = uintptr                    /* rpcndr.h:504:31 */

type FULL_PTR_XLAT_TABLES = X_FULL_PTR_XLAT_TABLES /* rpcndr.h:520:5 */
type PFULL_PTR_XLAT_TABLES = uintptr               /* rpcndr.h:520:26 */

type STUB_PHASE = uint32 /* rpcndr.h:674:5 */

type PROXY_PHASE = uint32 /* rpcndr.h:678:5 */

type IRpcStubBuffer1 = struct{ FlpVtbl uintptr } /* rpcndr.h:680:3 */

type RPC_SS_THREAD_HANDLE = uintptr /* rpcndr.h:705:16 */

type X_NDR_USER_MARSHAL_INFO_LEVEL1 = struct {
	FBuffer            uintptr
	FBufferSize        uint32
	F__ccgo_pad1       [4]byte
	FpfnAllocate       uintptr
	FpfnFree           uintptr
	FpRpcChannelBuffer uintptr
	FReserved          [5]ULONG_PTR
} /* rpcndr.h:763:11 */

type NDR_USER_MARSHAL_INFO_LEVEL1 = X_NDR_USER_MARSHAL_INFO_LEVEL1 /* rpcndr.h:770:5 */

type X_NDR_USER_MARSHAL_INFO = struct {
	FInformationLevel uint32
	F__ccgo_pad1      [4]byte
	F__8              struct{ FLevel1 NDR_USER_MARSHAL_INFO_LEVEL1 }
} /* rpcndr.h:772:11 */

type NDR_USER_MARSHAL_INFO = X_NDR_USER_MARSHAL_INFO /* rpcndr.h:777:5 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type REGCLS = uint32 /* combaseapi.h:144:3 */

type IRpcStubBuffer = IRpcStubBuffer1       /* combaseapi.h:146:34 */
type IRpcChannelBuffer = IRpcChannelBuffer1 /* combaseapi.h:147:37 */

type COINITBASE = uint32 /* combaseapi.h:151:3 */

type OLECHAR = WCHAR     /* wtypesbase.h:69:15 */
type LPOLESTR = uintptr  /* wtypesbase.h:70:17 */
type LPCOLESTR = uintptr /* wtypesbase.h:71:23 */
type DOUBLE = float64    /* wtypesbase.h:94:16 */

type X_COAUTHIDENTITY = struct {
	FUser           uintptr
	FUserLength     ULONG
	F__ccgo_pad1    [4]byte
	FDomain         uintptr
	FDomainLength   ULONG
	F__ccgo_pad2    [4]byte
	FPassword       uintptr
	FPasswordLength ULONG
	FFlags          ULONG
} /* wtypesbase.h:185:9 */

type COAUTHIDENTITY = X_COAUTHIDENTITY /* wtypesbase.h:193:3 */

type X_COAUTHINFO = struct {
	FdwAuthnSvc           DWORD
	FdwAuthzSvc           DWORD
	FpwszServerPrincName  LPWSTR
	FdwAuthnLevel         DWORD
	FdwImpersonationLevel DWORD
	FpAuthIdentityData    uintptr
	FdwCapabilities       DWORD
	F__ccgo_pad1          [4]byte
} /* wtypesbase.h:195:9 */

type COAUTHINFO = X_COAUTHINFO /* wtypesbase.h:203:3 */

type SCODE = LONG     /* wtypesbase.h:205:14 */
type PSCODE = uintptr /* wtypesbase.h:206:15 */

type MEMCTX = int32 /* wtypesbase.h:239:3 */

type CLSCTX = int32 /* wtypesbase.h:294:3 */

type MSHLFLAGS = uint32 /* wtypesbase.h:307:3 */

type MSHCTX = uint32 /* wtypesbase.h:315:3 */

type X_BYTE_BLOB = struct {
	FclSize      ULONG
	FabData      [1]Byte1
	F__ccgo_pad1 [3]byte
} /* wtypesbase.h:317:9 */

type BYTE_BLOB = X_BYTE_BLOB /* wtypesbase.h:320:3 */

type UP_BYTE_BLOB = uintptr /* wtypesbase.h:322:19 */

type X_WORD_BLOB = struct {
	FclSize      ULONG
	FasData      [1]uint16
	F__ccgo_pad1 [2]byte
} /* wtypesbase.h:324:9 */

type WORD_BLOB = X_WORD_BLOB /* wtypesbase.h:327:3 */

type UP_WORD_BLOB = uintptr /* wtypesbase.h:329:19 */

type X_DWORD_BLOB = struct {
	FclSize ULONG
	FalData [1]ULONG
} /* wtypesbase.h:331:9 */

type DWORD_BLOB = X_DWORD_BLOB /* wtypesbase.h:334:3 */

type UP_DWORD_BLOB = uintptr /* wtypesbase.h:336:20 */

type X_FLAGGED_BYTE_BLOB = struct {
	FfFlags      ULONG
	FclSize      ULONG
	FabData      [1]Byte1
	F__ccgo_pad1 [3]byte
} /* wtypesbase.h:338:9 */

type FLAGGED_BYTE_BLOB = X_FLAGGED_BYTE_BLOB /* wtypesbase.h:342:3 */

type UP_FLAGGED_BYTE_BLOB = uintptr /* wtypesbase.h:344:27 */

type X_FLAGGED_WORD_BLOB = struct {
	FfFlags      ULONG
	FclSize      ULONG
	FasData      [1]uint16
	F__ccgo_pad1 [2]byte
} /* wtypesbase.h:346:9 */

type FLAGGED_WORD_BLOB = X_FLAGGED_WORD_BLOB /* wtypesbase.h:350:3 */

type UP_FLAGGED_WORD_BLOB = uintptr /* wtypesbase.h:352:27 */

type X_BYTE_SIZEDARR = struct {
	FclSize      ULONG
	F__ccgo_pad1 [4]byte
	FpData       uintptr
} /* wtypesbase.h:354:9 */

type BYTE_SIZEDARR = X_BYTE_SIZEDARR /* wtypesbase.h:357:3 */

type X_SHORT_SIZEDARR = struct {
	FclSize      ULONG
	F__ccgo_pad1 [4]byte
	FpData       uintptr
} /* wtypesbase.h:359:9 */

type WORD_SIZEDARR = X_SHORT_SIZEDARR /* wtypesbase.h:362:3 */

type X_LONG_SIZEDARR = struct {
	FclSize      ULONG
	F__ccgo_pad1 [4]byte
	FpData       uintptr
} /* wtypesbase.h:364:9 */

type DWORD_SIZEDARR = X_LONG_SIZEDARR /* wtypesbase.h:367:3 */

type X_HYPER_SIZEDARR = struct {
	FclSize      ULONG
	F__ccgo_pad1 [4]byte
	FpData       uintptr
} /* wtypesbase.h:369:9 */

type HYPER_SIZEDARR = X_HYPER_SIZEDARR /* wtypesbase.h:372:3 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.14 from include/unknwnbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IUnknown1 = struct{ FlpVtbl uintptr } /* unknwnbase.h:23:9 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.14 from include/unknwnbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IUnknown = IUnknown1 /* unknwnbase.h:23:28 */

type AsyncIUnknown1 = struct{ FlpVtbl uintptr } /* unknwnbase.h:31:9 */

type AsyncIUnknown = AsyncIUnknown1 /* unknwnbase.h:31:33 */

type IClassFactory1 = struct{ FlpVtbl uintptr } /* unknwnbase.h:39:9 */

type IClassFactory = IClassFactory1 /* unknwnbase.h:39:33 */

// Headers for imported files

//** Autogenerated by WIDL 4.12.1 from include/wtypesbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// ****************************************************************************
//
// IUnknown interface

type LPUNKNOWN = uintptr /* unknwnbase.h:68:18 */
type IUnknownVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
} /* unknwnbase.h:23:9 */

type IUnknownVtbl = IUnknownVtbl1 /* unknwnbase.h:138:3 */
type AsyncIUnknownVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FBegin_QueryInterface  uintptr
	FFinish_QueryInterface uintptr
	FBegin_AddRef          uintptr
	FFinish_AddRef         uintptr
	FBegin_Release         uintptr
	FFinish_Release        uintptr
} /* unknwnbase.h:31:9 */

type AsyncIUnknownVtbl = AsyncIUnknownVtbl1 /* unknwnbase.h:244:3 */

// ****************************************************************************
//
// IClassFactory interface

type LPCLASSFACTORY = uintptr /* unknwnbase.h:310:23 */
type IClassFactoryVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCreateInstance uintptr
	FLockServer     uintptr
} /* unknwnbase.h:39:9 */

type IClassFactoryVtbl = IClassFactoryVtbl1 /* unknwnbase.h:357:3 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/objidlbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IMarshal1 = struct{ FlpVtbl uintptr } /* objidlbase.h:23:9 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/objidlbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IMarshal = IMarshal1 /* objidlbase.h:23:28 */

type INoMarshal1 = struct{ FlpVtbl uintptr } /* objidlbase.h:31:9 */

type INoMarshal = INoMarshal1 /* objidlbase.h:31:30 */

type IAgileObject1 = struct{ FlpVtbl uintptr } /* objidlbase.h:39:9 */

type IAgileObject = IAgileObject1 /* objidlbase.h:39:32 */

type IAgileReference1 = struct{ FlpVtbl uintptr } /* objidlbase.h:47:9 */

type IAgileReference = IAgileReference1 /* objidlbase.h:47:35 */

type IMarshal21 = struct{ FlpVtbl uintptr } /* objidlbase.h:55:9 */

type IMarshal2 = IMarshal21 /* objidlbase.h:55:29 */

type IMalloc1 = struct{ FlpVtbl uintptr } /* objidlbase.h:63:9 */

type IMalloc = IMalloc1 /* objidlbase.h:63:27 */

type IStdMarshalInfo1 = struct{ FlpVtbl uintptr } /* objidlbase.h:71:9 */

type IStdMarshalInfo = IStdMarshalInfo1 /* objidlbase.h:71:35 */

type IExternalConnection1 = struct{ FlpVtbl uintptr } /* objidlbase.h:79:9 */

type IExternalConnection = IExternalConnection1 /* objidlbase.h:79:39 */

type IMultiQI1 = struct{ FlpVtbl uintptr } /* objidlbase.h:87:9 */

type IMultiQI = IMultiQI1 /* objidlbase.h:87:28 */

type AsyncIMultiQI1 = struct{ FlpVtbl uintptr } /* objidlbase.h:95:9 */

type AsyncIMultiQI = AsyncIMultiQI1 /* objidlbase.h:95:33 */

type IInternalUnknown1 = struct{ FlpVtbl uintptr } /* objidlbase.h:103:9 */

type IInternalUnknown = IInternalUnknown1 /* objidlbase.h:103:36 */

type IEnumUnknown1 = struct{ FlpVtbl uintptr } /* objidlbase.h:111:9 */

type IEnumUnknown = IEnumUnknown1 /* objidlbase.h:111:32 */

type IEnumString1 = struct{ FlpVtbl uintptr } /* objidlbase.h:119:9 */

type IEnumString = IEnumString1 /* objidlbase.h:119:31 */

type ISequentialStream1 = struct{ FlpVtbl uintptr } /* objidlbase.h:127:9 */

type ISequentialStream = ISequentialStream1 /* objidlbase.h:127:37 */

type IStream1 = struct{ FlpVtbl uintptr } /* objidlbase.h:135:9 */

type IStream = IStream1 /* objidlbase.h:135:27 */

type IRpcChannelBuffer21 = struct{ FlpVtbl uintptr } /* objidlbase.h:151:9 */

type IRpcChannelBuffer2 = IRpcChannelBuffer21 /* objidlbase.h:151:38 */

type IAsyncRpcChannelBuffer1 = struct{ FlpVtbl uintptr } /* objidlbase.h:159:9 */

type IAsyncRpcChannelBuffer = IAsyncRpcChannelBuffer1 /* objidlbase.h:159:42 */

type IRpcChannelBuffer31 = struct{ FlpVtbl uintptr } /* objidlbase.h:167:9 */

type IRpcChannelBuffer3 = IRpcChannelBuffer31 /* objidlbase.h:167:38 */

type IRpcSyntaxNegotiate1 = struct{ FlpVtbl uintptr } /* objidlbase.h:175:9 */

type IRpcSyntaxNegotiate = IRpcSyntaxNegotiate1 /* objidlbase.h:175:39 */

type IRpcProxyBuffer1 = struct{ FlpVtbl uintptr } /* objidlbase.h:183:9 */

type IRpcProxyBuffer = IRpcProxyBuffer1 /* objidlbase.h:183:35 */

type IPSFactoryBuffer1 = struct{ FlpVtbl uintptr } /* objidlbase.h:199:9 */

type IPSFactoryBuffer = IPSFactoryBuffer1 /* objidlbase.h:199:36 */

type IChannelHook1 = struct{ FlpVtbl uintptr } /* objidlbase.h:207:9 */

type IChannelHook = IChannelHook1 /* objidlbase.h:207:32 */

type IClientSecurity1 = struct{ FlpVtbl uintptr } /* objidlbase.h:215:9 */

type IClientSecurity = IClientSecurity1 /* objidlbase.h:215:35 */

type IServerSecurity1 = struct{ FlpVtbl uintptr } /* objidlbase.h:223:9 */

type IServerSecurity = IServerSecurity1 /* objidlbase.h:223:35 */

type IRpcOptions1 = struct{ FlpVtbl uintptr } /* objidlbase.h:231:9 */

type IRpcOptions = IRpcOptions1 /* objidlbase.h:231:31 */

type IGlobalOptions1 = struct{ FlpVtbl uintptr } /* objidlbase.h:239:9 */

type IGlobalOptions = IGlobalOptions1 /* objidlbase.h:239:34 */

type ISurrogate1 = struct{ FlpVtbl uintptr } /* objidlbase.h:247:9 */

type ISurrogate = ISurrogate1 /* objidlbase.h:247:30 */

type IGlobalInterfaceTable1 = struct{ FlpVtbl uintptr } /* objidlbase.h:255:9 */

type IGlobalInterfaceTable = IGlobalInterfaceTable1 /* objidlbase.h:255:41 */

type ISynchronize1 = struct{ FlpVtbl uintptr } /* objidlbase.h:263:9 */

type ISynchronize = ISynchronize1 /* objidlbase.h:263:32 */

type ISynchronizeHandle1 = struct{ FlpVtbl uintptr } /* objidlbase.h:271:9 */

type ISynchronizeHandle = ISynchronizeHandle1 /* objidlbase.h:271:38 */

type ISynchronizeEvent1 = struct{ FlpVtbl uintptr } /* objidlbase.h:279:9 */

type ISynchronizeEvent = ISynchronizeEvent1 /* objidlbase.h:279:37 */

type ISynchronizeContainer1 = struct{ FlpVtbl uintptr } /* objidlbase.h:287:9 */

type ISynchronizeContainer = ISynchronizeContainer1 /* objidlbase.h:287:41 */

type ISynchronizeMutex1 = struct{ FlpVtbl uintptr } /* objidlbase.h:295:9 */

type ISynchronizeMutex = ISynchronizeMutex1 /* objidlbase.h:295:37 */

type ICancelMethodCalls1 = struct{ FlpVtbl uintptr } /* objidlbase.h:303:9 */

type ICancelMethodCalls = ICancelMethodCalls1 /* objidlbase.h:303:38 */

type IAsyncManager1 = struct{ FlpVtbl uintptr } /* objidlbase.h:311:9 */

type IAsyncManager = IAsyncManager1 /* objidlbase.h:311:33 */

type ICallFactory1 = struct{ FlpVtbl uintptr } /* objidlbase.h:319:9 */

type ICallFactory = ICallFactory1 /* objidlbase.h:319:32 */

type IRpcHelper1 = struct{ FlpVtbl uintptr } /* objidlbase.h:327:9 */

type IRpcHelper = IRpcHelper1 /* objidlbase.h:327:30 */

type IReleaseMarshalBuffers1 = struct{ FlpVtbl uintptr } /* objidlbase.h:335:9 */

type IReleaseMarshalBuffers = IReleaseMarshalBuffers1 /* objidlbase.h:335:42 */

type IWaitMultiple1 = struct{ FlpVtbl uintptr } /* objidlbase.h:343:9 */

type IWaitMultiple = IWaitMultiple1 /* objidlbase.h:343:33 */

type IAddrTrackingControl1 = struct{ FlpVtbl uintptr } /* objidlbase.h:351:9 */

type IAddrTrackingControl = IAddrTrackingControl1 /* objidlbase.h:351:40 */

type IAddrExclusionControl1 = struct{ FlpVtbl uintptr } /* objidlbase.h:359:9 */

type IAddrExclusionControl = IAddrExclusionControl1 /* objidlbase.h:359:41 */

type IPipeByte1 = struct{ FlpVtbl uintptr } /* objidlbase.h:367:9 */

type IPipeByte = IPipeByte1 /* objidlbase.h:367:29 */

type IPipeLong1 = struct{ FlpVtbl uintptr } /* objidlbase.h:375:9 */

type IPipeLong = IPipeLong1 /* objidlbase.h:375:29 */

type IPipeDouble1 = struct{ FlpVtbl uintptr } /* objidlbase.h:383:9 */

type IPipeDouble = IPipeDouble1 /* objidlbase.h:383:31 */

type IComThreadingInfo1 = struct{ FlpVtbl uintptr } /* objidlbase.h:407:9 */

type IComThreadingInfo = IComThreadingInfo1 /* objidlbase.h:407:37 */

type IProcessInitControl1 = struct{ FlpVtbl uintptr } /* objidlbase.h:415:9 */

type IProcessInitControl = IProcessInitControl1 /* objidlbase.h:415:39 */

type IFastRundown1 = struct{ FlpVtbl uintptr } /* objidlbase.h:423:9 */

type IFastRundown = IFastRundown1 /* objidlbase.h:423:32 */

type IMarshalingStream1 = struct{ FlpVtbl uintptr } /* objidlbase.h:431:9 */

type IMarshalingStream = IMarshalingStream1 /* objidlbase.h:431:37 */

// Headers for imported files

//** Autogenerated by WIDL 4.14 from include/unknwnbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/wtypesbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type X_COSERVERINFO = struct {
	FdwReserved1 DWORD
	F__ccgo_pad1 [4]byte
	FpwszName    LPWSTR
	FpAuthInfo   uintptr
	FdwReserved2 DWORD
	F__ccgo_pad2 [4]byte
} /* objidlbase.h:522:9 */

// Headers for imported files

//** Autogenerated by WIDL 4.14 from include/unknwnbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/wtypesbase.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type COSERVERINFO = X_COSERVERINFO /* objidlbase.h:527:3 */

// ****************************************************************************
//
// IMarshal interface

type LPMARSHAL = uintptr /* objidlbase.h:535:18 */
type IMarshalVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FGetUnmarshalClass  uintptr
	FGetMarshalSizeMax  uintptr
	FMarshalInterface   uintptr
	FUnmarshalInterface uintptr
	FReleaseMarshalData uintptr
	FDisconnectObject   uintptr
} /* objidlbase.h:23:9 */

type IMarshalVtbl = IMarshalVtbl1 /* objidlbase.h:639:3 */
type INoMarshalVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
} /* objidlbase.h:31:9 */

type INoMarshalVtbl = INoMarshalVtbl1 /* objidlbase.h:729:3 */
type IAgileObjectVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
} /* objidlbase.h:39:9 */

type IAgileObjectVtbl = IAgileObjectVtbl1 /* objidlbase.h:793:3 */
type IAgileReferenceVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FResolve        uintptr
} /* objidlbase.h:47:9 */

type IAgileReferenceVtbl = IAgileReferenceVtbl1 /* objidlbase.h:866:3 */

// ****************************************************************************
//
// IMarshal2 interface

type LPMARSHAL2 = uintptr /* objidlbase.h:912:19 */
type IMarshal2Vtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FGetUnmarshalClass  uintptr
	FGetMarshalSizeMax  uintptr
	FMarshalInterface   uintptr
	FUnmarshalInterface uintptr
	FReleaseMarshalData uintptr
	FDisconnectObject   uintptr
} /* objidlbase.h:55:9 */

type IMarshal2Vtbl = IMarshal2Vtbl1 /* objidlbase.h:981:3 */

// ****************************************************************************
//
// IMalloc interface

type LPMALLOC = uintptr /* objidlbase.h:1045:17 */
type IMallocVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAlloc          uintptr
	FRealloc        uintptr
	FFree           uintptr
	FGetSize        uintptr
	FDidAlloc       uintptr
	FHeapMinimize   uintptr
} /* objidlbase.h:63:9 */

type IMallocVtbl = IMallocVtbl1 /* objidlbase.h:1117:3 */

// ****************************************************************************
//
// IStdMarshalInfo interface

type LPSTDMARSHALINFO = uintptr /* objidlbase.h:1181:25 */
type IStdMarshalInfoVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FGetClassForHandler uintptr
} /* objidlbase.h:71:9 */

type IStdMarshalInfoVtbl = IStdMarshalInfoVtbl1 /* objidlbase.h:1221:3 */

// ****************************************************************************
//
// IExternalConnection interface

type LPEXTERNALCONNECTION = uintptr /* objidlbase.h:1265:29 */

type EXTCONN = uint32 /* objidlbase.h:1271:3 */
type IExternalConnectionVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FAddConnection     uintptr
	FReleaseConnection uintptr
} /* objidlbase.h:79:9 */

type IExternalConnectionVtbl = IExternalConnectionVtbl1 /* objidlbase.h:1320:3 */

type LPMULTIQI = uintptr /* objidlbase.h:1362:18 */

type TagMULTI_QI = struct {
	FpIID        uintptr
	FpItf        uintptr
	Fhr          HRESULT
	F__ccgo_pad1 [4]byte
} /* objidlbase.h:1366:9 */

type MULTI_QI = TagMULTI_QI /* objidlbase.h:1370:3 */
type IMultiQIVtbl1 = struct {
	FQueryInterface          uintptr
	FAddRef                  uintptr
	FRelease                 uintptr
	FQueryMultipleInterfaces uintptr
} /* objidlbase.h:87:9 */

type IMultiQIVtbl = IMultiQIVtbl1 /* objidlbase.h:1414:3 */
type AsyncIMultiQIVtbl1 = struct {
	FQueryInterface                 uintptr
	FAddRef                         uintptr
	FRelease                        uintptr
	FBegin_QueryMultipleInterfaces  uintptr
	FFinish_QueryMultipleInterfaces uintptr
} /* objidlbase.h:95:9 */

type AsyncIMultiQIVtbl = AsyncIMultiQIVtbl1 /* objidlbase.h:1500:3 */
type IInternalUnknownVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FQueryInternalInterface uintptr
} /* objidlbase.h:103:9 */

type IInternalUnknownVtbl = IInternalUnknownVtbl1 /* objidlbase.h:1586:3 */

// ****************************************************************************
//
// IEnumUnknown interface

type LPENUMUNKNOWN = uintptr /* objidlbase.h:1632:22 */
type IEnumUnknownVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* objidlbase.h:111:9 */

type IEnumUnknownVtbl = IEnumUnknownVtbl1 /* objidlbase.h:1692:3 */

// ****************************************************************************
//
// IEnumString interface

type LPENUMSTRING = uintptr /* objidlbase.h:1768:21 */
type IEnumStringVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* objidlbase.h:119:9 */

type IEnumStringVtbl = IEnumStringVtbl1 /* objidlbase.h:1828:3 */
type ISequentialStreamVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FRead           uintptr
	FWrite          uintptr
} /* objidlbase.h:127:9 */

type ISequentialStreamVtbl = ISequentialStreamVtbl1 /* objidlbase.h:1953:3 */

// ****************************************************************************
//
// IStream interface

type LPSTREAM = uintptr /* objidlbase.h:2041:17 */

type TagSTATSTG = struct {
	FpwcsName          LPOLESTR
	Ftype              DWORD
	F__ccgo_pad1       [4]byte
	FcbSize            ULARGE_INTEGER
	Fmtime             FILETIME
	Fctime             FILETIME
	Fatime             FILETIME
	FgrfMode           DWORD
	FgrfLocksSupported DWORD
	Fclsid             CLSID
	FgrfStateBits      DWORD
	Freserved          DWORD
} /* objidlbase.h:2043:9 */

type STATSTG = TagSTATSTG /* objidlbase.h:2055:3 */

type STGTY = uint32 /* objidlbase.h:2062:3 */

type STREAM_SEEK = uint32 /* objidlbase.h:2068:3 */

type LOCKTYPE = uint32 /* objidlbase.h:2074:3 */
type IStreamVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FRead           uintptr
	FWrite          uintptr
	FSeek           uintptr
	FSetSize        uintptr
	FCopyTo         uintptr
	FCommit         uintptr
	FRevert         uintptr
	FLockRegion     uintptr
	FUnlockRegion   uintptr
	FStat           uintptr
	FClone          uintptr
} /* objidlbase.h:135:9 */

type IStreamVtbl = IStreamVtbl1 /* objidlbase.h:2198:3 */

// ****************************************************************************
//
// IRpcChannelBuffer interface

type RPCOLEDATAREP = ULONG /* objidlbase.h:2327:15 */

type TagRPCOLEMESSAGE = struct {
	Freserved1          uintptr
	FdataRepresentation RPCOLEDATAREP
	F__ccgo_pad1        [4]byte
	FBuffer             uintptr
	FcbBuffer           ULONG
	FiMethod            ULONG
	Freserved2          [5]uintptr
	FrpcFlags           ULONG
	F__ccgo_pad2        [4]byte
} /* objidlbase.h:2329:9 */

type RPCOLEMESSAGE = TagRPCOLEMESSAGE /* objidlbase.h:2337:3 */

type PRPCOLEMESSAGE = uintptr /* objidlbase.h:2339:23 */
type IRpcChannelBufferVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetBuffer      uintptr
	FSendReceive    uintptr
	FFreeBuffer     uintptr
	FGetDestCtx     uintptr
	FIsConnected    uintptr
} /* rpcndr.h:211:3 */

type IRpcChannelBufferVtbl = IRpcChannelBufferVtbl1 /* objidlbase.h:2408:3 */
type IRpcChannelBuffer2Vtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FGetBuffer          uintptr
	FSendReceive        uintptr
	FFreeBuffer         uintptr
	FGetDestCtx         uintptr
	FIsConnected        uintptr
	FGetProtocolVersion uintptr
} /* objidlbase.h:151:9 */

type IRpcChannelBuffer2Vtbl = IRpcChannelBuffer2Vtbl1 /* objidlbase.h:2527:3 */
type IAsyncRpcChannelBufferVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FGetBuffer          uintptr
	FSendReceive        uintptr
	FFreeBuffer         uintptr
	FGetDestCtx         uintptr
	FIsConnected        uintptr
	FGetProtocolVersion uintptr
	FSend               uintptr
	FReceive            uintptr
	FGetDestCtxEx       uintptr
} /* objidlbase.h:159:9 */

type IAsyncRpcChannelBufferVtbl = IAsyncRpcChannelBufferVtbl1 /* objidlbase.h:2679:3 */
type IRpcChannelBuffer3Vtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FGetBuffer          uintptr
	FSendReceive        uintptr
	FFreeBuffer         uintptr
	FGetDestCtx         uintptr
	FIsConnected        uintptr
	FGetProtocolVersion uintptr
	FSend               uintptr
	FReceive            uintptr
	FCancel             uintptr
	FGetCallContext     uintptr
	FGetDestCtxEx       uintptr
	FGetState           uintptr
	FRegisterAsync      uintptr
} /* objidlbase.h:167:9 */

type IRpcChannelBuffer3Vtbl = IRpcChannelBuffer3Vtbl1 /* objidlbase.h:2881:3 */
type IRpcSyntaxNegotiateVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FNegotiateSyntax uintptr
} /* objidlbase.h:175:9 */

type IRpcSyntaxNegotiateVtbl = IRpcSyntaxNegotiateVtbl1 /* objidlbase.h:3011:3 */
type IRpcProxyBufferVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FConnect        uintptr
	FDisconnect     uintptr
} /* objidlbase.h:183:9 */

type IRpcProxyBufferVtbl = IRpcProxyBufferVtbl1 /* objidlbase.h:3095:3 */
type IRpcStubBufferVtbl1 = struct {
	FQueryInterface            uintptr
	FAddRef                    uintptr
	FRelease                   uintptr
	FConnect                   uintptr
	FDisconnect                uintptr
	FInvoke                    uintptr
	FIsIIDSupported            uintptr
	FCountRefs                 uintptr
	FDebugServerQueryInterface uintptr
	FDebugServerRelease        uintptr
} /* rpcndr.h:680:3 */

type IRpcStubBufferVtbl = IRpcStubBufferVtbl1 /* objidlbase.h:3221:3 */
type IPSFactoryBufferVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCreateProxy    uintptr
	FCreateStub     uintptr
} /* objidlbase.h:199:9 */

type IPSFactoryBufferVtbl = IPSFactoryBufferVtbl1 /* objidlbase.h:3340:3 */

type SChannelHookCallInfo1 = struct {
	Fiid         IID
	FcbSize      DWORD
	FuCausality  GUID
	FdwServerPid DWORD
	FiMethod     DWORD
	F__ccgo_pad1 [4]byte
	FpObject     uintptr
} /* objidlbase.h:3385:9 */

type SChannelHookCallInfo = SChannelHookCallInfo1 /* objidlbase.h:3392:3 */
type IChannelHookVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FClientGetSize    uintptr
	FClientFillBuffer uintptr
	FClientNotify     uintptr
	FServerNotify     uintptr
	FServerGetSize    uintptr
	FServerFillBuffer uintptr
} /* objidlbase.h:207:9 */

type IChannelHookVtbl = IChannelHookVtbl1 /* objidlbase.h:3511:3 */

// ****************************************************************************
//
// IClientSecurity interface

type TagSOLE_AUTHENTICATION_SERVICE = struct {
	FdwAuthnSvc     DWORD
	FdwAuthzSvc     DWORD
	FpPrincipalName uintptr
	Fhr             HRESULT
	F__ccgo_pad1    [4]byte
} /* objidlbase.h:3579:9 */

// ****************************************************************************
//
// IClientSecurity interface

type SOLE_AUTHENTICATION_SERVICE = TagSOLE_AUTHENTICATION_SERVICE /* objidlbase.h:3584:3 */

type PSOLE_AUTHENTICATION_SERVICE = uintptr /* objidlbase.h:3586:37 */

type EOLE_AUTHENTICATION_CAPABILITIES = uint32 /* objidlbase.h:3604:3 */

type TagSOLE_AUTHENTICATION_INFO = struct {
	FdwAuthnSvc DWORD
	FdwAuthzSvc DWORD
	FpAuthInfo  uintptr
} /* objidlbase.h:3611:9 */

type SOLE_AUTHENTICATION_INFO = TagSOLE_AUTHENTICATION_INFO /* objidlbase.h:3615:3 */
type PSOLE_AUTHENTICATION_INFO = uintptr                    /* objidlbase.h:3616:44 */

type TagSOLE_AUTHENTICATION_LIST = struct {
	FcAuthInfo   DWORD
	F__ccgo_pad1 [4]byte
	FaAuthInfo   uintptr
} /* objidlbase.h:3618:9 */

type SOLE_AUTHENTICATION_LIST = TagSOLE_AUTHENTICATION_LIST /* objidlbase.h:3621:3 */
type PSOLE_AUTHENTICATION_LIST = uintptr                    /* objidlbase.h:3622:44 */
type IClientSecurityVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FQueryBlanket   uintptr
	FSetBlanket     uintptr
	FCopyProxy      uintptr
} /* objidlbase.h:215:9 */

type IClientSecurityVtbl = IClientSecurityVtbl1 /* objidlbase.h:3702:3 */
type IServerSecurityVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FQueryBlanket      uintptr
	FImpersonateClient uintptr
	FRevertToSelf      uintptr
	FIsImpersonating   uintptr
} /* objidlbase.h:223:9 */

type IServerSecurityVtbl = IServerSecurityVtbl1 /* objidlbase.h:3820:3 */

type RPCOPT_PROPERTIES = uint32 /* objidlbase.h:3874:3 */

type RPCOPT_SERVER_LOCALITY_VALUES = uint32 /* objidlbase.h:3880:3 */
type IRpcOptionsVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSet            uintptr
	FQuery          uintptr
} /* objidlbase.h:231:9 */

type IRpcOptionsVtbl = IRpcOptionsVtbl1 /* objidlbase.h:3937:3 */

type GLOBALOPT_PROPERTIES = uint32 /* objidlbase.h:3987:3 */

type GLOBALOPT_EH_VALUES = uint32 /* objidlbase.h:3994:3 */

type GLOBALOPT_RPCTP_VALUES = uint32 /* objidlbase.h:3999:3 */

type GLOBALOPT_RO_FLAGS = uint32 /* objidlbase.h:4010:3 */

type GLOBALOPT_UNMARSHALING_POLICY_VALUES = uint32 /* objidlbase.h:4016:3 */
type IGlobalOptionsVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSet            uintptr
	FQuery          uintptr
} /* objidlbase.h:239:9 */

type IGlobalOptionsVtbl = IGlobalOptionsVtbl1 /* objidlbase.h:4069:3 */

// ****************************************************************************
//
// ISurrogate interface

type LPSURROGATE = uintptr /* objidlbase.h:4120:20 */
type ISurrogateVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FLoadDllServer  uintptr
	FFreeSurrogate  uintptr
} /* objidlbase.h:247:9 */

type ISurrogateVtbl = ISurrogateVtbl1 /* objidlbase.h:4162:3 */

// ****************************************************************************
//
// IGlobalInterfaceTable interface

type LPGLOBALINTERFACETABLE = uintptr /* objidlbase.h:4210:31 */
type IGlobalInterfaceTableVtbl1 = struct {
	FQueryInterface            uintptr
	FAddRef                    uintptr
	FRelease                   uintptr
	FRegisterInterfaceInGlobal uintptr
	FRevokeInterfaceFromGlobal uintptr
	FGetInterfaceFromGlobal    uintptr
} /* objidlbase.h:255:9 */

type IGlobalInterfaceTableVtbl = IGlobalInterfaceTableVtbl1 /* objidlbase.h:4268:3 */
type ISynchronizeVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FWait           uintptr
	FSignal         uintptr
	FReset          uintptr
} /* objidlbase.h:263:9 */

type ISynchronizeVtbl = ISynchronizeVtbl1 /* objidlbase.h:4370:3 */
type ISynchronizeHandleVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetHandle      uintptr
} /* objidlbase.h:271:9 */

type ISynchronizeHandleVtbl = ISynchronizeHandleVtbl1 /* objidlbase.h:4456:3 */
type ISynchronizeEventVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetHandle      uintptr
	FSetEventHandle uintptr
} /* objidlbase.h:279:9 */

type ISynchronizeEventVtbl = ISynchronizeEventVtbl1 /* objidlbase.h:4539:3 */
type ISynchronizeContainerVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAddSynchronize uintptr
	FWaitMultiple   uintptr
} /* objidlbase.h:287:9 */

type ISynchronizeContainerVtbl = ISynchronizeContainerVtbl1 /* objidlbase.h:4634:3 */
type ISynchronizeMutexVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FWait           uintptr
	FSignal         uintptr
	FReset          uintptr
	FReleaseMutex   uintptr
} /* objidlbase.h:295:9 */

type ISynchronizeMutexVtbl = ISynchronizeMutexVtbl1 /* objidlbase.h:4727:3 */

// ****************************************************************************
//
// ICancelMethodCalls interface

type LPCANCELMETHODCALLS = uintptr /* objidlbase.h:4785:28 */
type ICancelMethodCallsVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCancel         uintptr
	FTestCancel     uintptr
} /* objidlbase.h:303:9 */

type ICancelMethodCallsVtbl = ICancelMethodCallsVtbl1 /* objidlbase.h:4827:3 */

// ****************************************************************************
//
// IAsyncManager interface

type DCOM_CALL_STATE = uint32 /* objidlbase.h:4879:3 */
type IAsyncManagerVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCompleteCall   uintptr
	FGetCallContext uintptr
	FGetState       uintptr
} /* objidlbase.h:311:9 */

type IAsyncManagerVtbl = IAsyncManagerVtbl1 /* objidlbase.h:4931:3 */
type ICallFactoryVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCreateCall     uintptr
} /* objidlbase.h:319:9 */

type ICallFactoryVtbl = ICallFactoryVtbl1 /* objidlbase.h:5023:3 */
type IRpcHelperVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FGetDCOMProtocolVersion uintptr
	FGetIIDFromOBJREF       uintptr
} /* objidlbase.h:327:9 */

type IRpcHelperVtbl = IRpcHelperVtbl1 /* objidlbase.h:5110:3 */
type IReleaseMarshalBuffersVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FReleaseMarshalBuffer uintptr
} /* objidlbase.h:335:9 */

type IReleaseMarshalBuffersVtbl = IReleaseMarshalBuffersVtbl1 /* objidlbase.h:5196:3 */
type IWaitMultipleVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FWaitMultiple   uintptr
	FAddSynchronize uintptr
} /* objidlbase.h:343:9 */

type IWaitMultipleVtbl = IWaitMultipleVtbl1 /* objidlbase.h:5283:3 */

// ****************************************************************************
//
// IAddrTrackingControl interface

type LPADDRTRACKINGCONTROL = uintptr /* objidlbase.h:5331:30 */
type IAddrTrackingControlVtbl1 = struct {
	FQueryInterface                uintptr
	FAddRef                        uintptr
	FRelease                       uintptr
	FEnableCOMDynamicAddrTracking  uintptr
	FDisableCOMDynamicAddrTracking uintptr
} /* objidlbase.h:351:9 */

type IAddrTrackingControlVtbl = IAddrTrackingControlVtbl1 /* objidlbase.h:5371:3 */

// ****************************************************************************
//
// IAddrExclusionControl interface

type LPADDREXCLUSIONCONTROL = uintptr /* objidlbase.h:5419:31 */
type IAddrExclusionControlVtbl1 = struct {
	FQueryInterface              uintptr
	FAddRef                      uintptr
	FRelease                     uintptr
	FGetCurrentAddrExclusionList uintptr
	FUpdateAddrExclusionList     uintptr
} /* objidlbase.h:359:9 */

type IAddrExclusionControlVtbl = IAddrExclusionControlVtbl1 /* objidlbase.h:5463:3 */
type IPipeByteVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FPull           uintptr
	FPush           uintptr
} /* objidlbase.h:367:9 */

type IPipeByteVtbl = IPipeByteVtbl1 /* objidlbase.h:5558:3 */
type IPipeLongVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FPull           uintptr
	FPush           uintptr
} /* objidlbase.h:375:9 */

type IPipeLongVtbl = IPipeLongVtbl1 /* objidlbase.h:5653:3 */
type IPipeDoubleVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FPull           uintptr
	FPush           uintptr
} /* objidlbase.h:383:9 */

type IPipeDoubleVtbl = IPipeDoubleVtbl1 /* objidlbase.h:5748:3 */

type APTTYPEQUALIFIER = uint32 /* objidlbase.h:6057:3 */

type APTTYPE = int32 /* objidlbase.h:6065:3 */

type THDTYPE = uint32 /* objidlbase.h:6072:3 */

type APARTMENTID = DWORD /* objidlbase.h:6074:15 */
type IComThreadingInfoVtbl1 = struct {
	FQueryInterface            uintptr
	FAddRef                    uintptr
	FRelease                   uintptr
	FGetCurrentApartmentType   uintptr
	FGetCurrentThreadType      uintptr
	FGetCurrentLogicalThreadId uintptr
	FSetCurrentLogicalThreadId uintptr
} /* objidlbase.h:407:9 */

type IComThreadingInfoVtbl = IComThreadingInfoVtbl1 /* objidlbase.h:6137:3 */
type IProcessInitControlVtbl1 = struct {
	FQueryInterface          uintptr
	FAddRef                  uintptr
	FRelease                 uintptr
	FResetInitializerTimeout uintptr
} /* objidlbase.h:415:9 */

type IProcessInitControlVtbl = IProcessInitControlVtbl1 /* objidlbase.h:6227:3 */
type IFastRundownVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
} /* objidlbase.h:423:9 */

type IFastRundownVtbl = IFastRundownVtbl1 /* objidlbase.h:6297:3 */

type CO_MARSHALING_CONTEXT_ATTRIBUTES = uint32 /* objidlbase.h:6331:3 */
type IMarshalingStreamVtbl1 = struct {
	FQueryInterface                uintptr
	FAddRef                        uintptr
	FRelease                       uintptr
	FRead                          uintptr
	FWrite                         uintptr
	FSeek                          uintptr
	FSetSize                       uintptr
	FCopyTo                        uintptr
	FCommit                        uintptr
	FRevert                        uintptr
	FLockRegion                    uintptr
	FUnlockRegion                  uintptr
	FStat                          uintptr
	FClone                         uintptr
	FGetMarshalingContextAttribute uintptr
} /* objidlbase.h:431:9 */

type IMarshalingStreamVtbl = IMarshalingStreamVtbl1 /* objidlbase.h:6434:3 */

type STDMSHLFLAGS = uint32 /* combaseapi.h:219:3 */

type TagPROPVARIANT = struct {
	F__0 struct {
		F__0 struct {
			Fvt         VARTYPE
			FwReserved1 PROPVAR_PAD1
			FwReserved2 PROPVAR_PAD2
			FwReserved3 PROPVAR_PAD3
			F__8        struct {
				F__ccgo_pad1 [0]uint64
				FcVal        CHAR
				F__ccgo_pad2 [15]byte
			}
		}
	}
} /* combaseapi.h:308:9 */

type PROPVARIANT = TagPROPVARIANT /* combaseapi.h:308:31 */

type COWAIT_FLAGS = uint32 /* combaseapi.h:331:3 */

type LPFNGETCLASSOBJECT = uintptr /* combaseapi.h:358:17 */
type LPFNCANUNLOADNOW = uintptr   /* combaseapi.h:359:17 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type COINIT = uint32 /* objbase.h:21:3 */

type STGFMT = DWORD /* objbase.h:57:15 */

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IMallocSpy1 = struct{ FlpVtbl uintptr } /* objidl.h:277:9 */

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IMallocSpy = IMallocSpy1 /* objidl.h:277:30 */

type IBindCtx1 = struct{ FlpVtbl uintptr } /* objidl.h:282:9 */

type IBindCtx = IBindCtx1 /* objidl.h:282:28 */

type IEnumMoniker1 = struct{ FlpVtbl uintptr } /* objidl.h:287:9 */

type IEnumMoniker = IEnumMoniker1 /* objidl.h:287:32 */

type IRunnableObject1 = struct{ FlpVtbl uintptr } /* objidl.h:292:9 */

type IRunnableObject = IRunnableObject1 /* objidl.h:292:35 */

type IRunningObjectTable1 = struct{ FlpVtbl uintptr } /* objidl.h:297:9 */

type IRunningObjectTable = IRunningObjectTable1 /* objidl.h:297:39 */

type IPersist1 = struct{ FlpVtbl uintptr } /* objidl.h:302:9 */

type IPersist = IPersist1 /* objidl.h:302:28 */

type IPersistStream1 = struct{ FlpVtbl uintptr } /* objidl.h:307:9 */

type IPersistStream = IPersistStream1 /* objidl.h:307:34 */

type IMoniker1 = struct{ FlpVtbl uintptr } /* objidl.h:312:9 */

type IMoniker = IMoniker1 /* objidl.h:312:28 */

type IROTData1 = struct{ FlpVtbl uintptr } /* objidl.h:317:9 */

type IROTData = IROTData1 /* objidl.h:317:28 */

type IEnumSTATSTG1 = struct{ FlpVtbl uintptr } /* objidl.h:322:9 */

type IEnumSTATSTG = IEnumSTATSTG1 /* objidl.h:322:32 */

type IStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:327:9 */

type IStorage = IStorage1 /* objidl.h:327:28 */

type IPersistFile1 = struct{ FlpVtbl uintptr } /* objidl.h:332:9 */

type IPersistFile = IPersistFile1 /* objidl.h:332:32 */

type IPersistStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:337:9 */

type IPersistStorage = IPersistStorage1 /* objidl.h:337:35 */

type ILockBytes1 = struct{ FlpVtbl uintptr } /* objidl.h:342:9 */

type ILockBytes = ILockBytes1 /* objidl.h:342:30 */

type IEnumFORMATETC1 = struct{ FlpVtbl uintptr } /* objidl.h:347:9 */

type IEnumFORMATETC = IEnumFORMATETC1 /* objidl.h:347:34 */

type IEnumSTATDATA1 = struct{ FlpVtbl uintptr } /* objidl.h:352:9 */

type IEnumSTATDATA = IEnumSTATDATA1 /* objidl.h:352:33 */

type IRootStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:357:9 */

type IRootStorage = IRootStorage1 /* objidl.h:357:32 */

type IAdviseSink1 = struct{ FlpVtbl uintptr } /* objidl.h:362:9 */

type IAdviseSink = IAdviseSink1 /* objidl.h:362:31 */

type AsyncIAdviseSink1 = struct{ FlpVtbl uintptr } /* objidl.h:367:9 */

type AsyncIAdviseSink = AsyncIAdviseSink1 /* objidl.h:367:36 */

type IAdviseSink21 = struct{ FlpVtbl uintptr } /* objidl.h:372:9 */

type IAdviseSink2 = IAdviseSink21 /* objidl.h:372:32 */

type AsyncIAdviseSink21 = struct{ FlpVtbl uintptr } /* objidl.h:377:9 */

type AsyncIAdviseSink2 = AsyncIAdviseSink21 /* objidl.h:377:37 */

type IDataObject1 = struct{ FlpVtbl uintptr } /* objidl.h:382:9 */

type IDataObject = IDataObject1 /* objidl.h:382:31 */

type IDataAdviseHolder1 = struct{ FlpVtbl uintptr } /* objidl.h:387:9 */

type IDataAdviseHolder = IDataAdviseHolder1 /* objidl.h:387:37 */

type IMessageFilter1 = struct{ FlpVtbl uintptr } /* objidl.h:392:9 */

type IMessageFilter = IMessageFilter1 /* objidl.h:392:34 */

type IClassActivator1 = struct{ FlpVtbl uintptr } /* objidl.h:397:9 */

type IClassActivator = IClassActivator1 /* objidl.h:397:35 */

type IFillLockBytes1 = struct{ FlpVtbl uintptr } /* objidl.h:402:9 */

type IFillLockBytes = IFillLockBytes1 /* objidl.h:402:34 */

type IProgressNotify1 = struct{ FlpVtbl uintptr } /* objidl.h:407:9 */

type IProgressNotify = IProgressNotify1 /* objidl.h:407:35 */

type ILayoutStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:412:9 */

type ILayoutStorage = ILayoutStorage1 /* objidl.h:412:34 */

type IBlockingLock1 = struct{ FlpVtbl uintptr } /* objidl.h:417:9 */

type IBlockingLock = IBlockingLock1 /* objidl.h:417:33 */

type ITimeAndNoticeControl1 = struct{ FlpVtbl uintptr } /* objidl.h:422:9 */

type ITimeAndNoticeControl = ITimeAndNoticeControl1 /* objidl.h:422:41 */

type IOplockStorage1 = struct{ FlpVtbl uintptr } /* objidl.h:427:9 */

type IOplockStorage = IOplockStorage1 /* objidl.h:427:34 */

type IDirectWriterLock1 = struct{ FlpVtbl uintptr } /* objidl.h:432:9 */

type IDirectWriterLock = IDirectWriterLock1 /* objidl.h:432:37 */

type IUrlMon1 = struct{ FlpVtbl uintptr } /* objidl.h:437:9 */

type IUrlMon = IUrlMon1 /* objidl.h:437:27 */

type IForegroundTransfer1 = struct{ FlpVtbl uintptr } /* objidl.h:442:9 */

type IForegroundTransfer = IForegroundTransfer1 /* objidl.h:442:39 */

type IThumbnailExtractor1 = struct{ FlpVtbl uintptr } /* objidl.h:447:9 */

type IThumbnailExtractor = IThumbnailExtractor1 /* objidl.h:447:39 */

type IDummyHICONIncluder1 = struct{ FlpVtbl uintptr } /* objidl.h:452:9 */

type IDummyHICONIncluder = IDummyHICONIncluder1 /* objidl.h:452:39 */

type IProcessLock1 = struct{ FlpVtbl uintptr } /* objidl.h:457:9 */

type IProcessLock = IProcessLock1 /* objidl.h:457:32 */

type ISurrogateService1 = struct{ FlpVtbl uintptr } /* objidl.h:462:9 */

type ISurrogateService = ISurrogateService1 /* objidl.h:462:37 */

type IInitializeSpy1 = struct{ FlpVtbl uintptr } /* objidl.h:467:9 */

type IInitializeSpy = IInitializeSpy1 /* objidl.h:467:34 */

type IApartmentShutdown1 = struct{ FlpVtbl uintptr } /* objidl.h:472:9 */

type IApartmentShutdown = IApartmentShutdown1 /* objidl.h:472:38 */
type TagRemHGLOBAL = struct {
	FfNullHGlobal LONG
	FcbData       ULONG
	Fdata         [1]Byte1
	F__ccgo_pad1  [3]byte
} /* wtypes.h:43:9 */

type RemHGLOBAL = TagRemHGLOBAL /* wtypes.h:47:3 */

type TagRemHMETAFILEPICT = struct {
	Fmm          LONG
	FxExt        LONG
	FyExt        LONG
	FcbData      ULONG
	Fdata        [1]Byte1
	F__ccgo_pad1 [3]byte
} /* wtypes.h:49:9 */

type RemHMETAFILEPICT = TagRemHMETAFILEPICT /* wtypes.h:55:3 */

type TagRemHENHMETAFILE = struct {
	FcbData      ULONG
	Fdata        [1]Byte1
	F__ccgo_pad1 [3]byte
} /* wtypes.h:57:9 */

type RemHENHMETAFILE = TagRemHENHMETAFILE /* wtypes.h:60:3 */
type TagRemHBITMAP = struct {
	FcbData      ULONG
	Fdata        [1]Byte1
	F__ccgo_pad1 [3]byte
} /* wtypes.h:61:9 */

type RemHBITMAP = TagRemHBITMAP /* wtypes.h:64:3 */

type TagRemHPALETTE = struct {
	FcbData      ULONG
	Fdata        [1]Byte1
	F__ccgo_pad1 [3]byte
} /* wtypes.h:66:9 */

type RemHPALETTE = TagRemHPALETTE /* wtypes.h:69:3 */

type TagRemBRUSH = struct {
	FcbData      ULONG
	Fdata        [1]Byte1
	F__ccgo_pad1 [3]byte
} /* wtypes.h:71:9 */

type RemHBRUSH = TagRemBRUSH /* wtypes.h:74:3 */

type DVASPECT = uint32 /* wtypes.h:187:3 */

type STGC = uint32 /* wtypes.h:195:3 */

type STGMOVE = uint32 /* wtypes.h:201:3 */

type STATFLAG = uint32  /* wtypes.h:207:3 */
type HCONTEXT = uintptr /* wtypes.h:208:14 */

type X_userCLIPFORMAT = struct {
	FfContext    LONG
	F__ccgo_pad1 [4]byte
	Fu           struct {
		F__ccgo_pad1 [0]uint64
		FdwValue     DWORD
		F__ccgo_pad2 [4]byte
	}
} /* wtypes.h:227:9 */

type UserCLIPFORMAT = X_userCLIPFORMAT /* wtypes.h:233:3 */

type WireCLIPFORMAT = uintptr /* wtypes.h:235:24 */
type CLIPFORMAT = WORD        /* wtypes.h:236:14 */

type X_GDI_NONREMOTE = struct {
	FfContext    LONG
	F__ccgo_pad1 [4]byte
	Fu           struct {
		F__ccgo_pad1 [0]uint64
		FhInproc     LONG
		F__ccgo_pad2 [4]byte
	}
} /* wtypes.h:238:9 */

type GDI_NONREMOTE = X_GDI_NONREMOTE /* wtypes.h:244:3 */

type X_userHGLOBAL = struct {
	FfContext    LONG
	F__ccgo_pad1 [4]byte
	Fu           struct {
		F__ccgo_pad1 [0]uint64
		FhInproc     LONG
		F__ccgo_pad2 [4]byte
	}
} /* wtypes.h:246:9 */

type UserHGLOBAL = X_userHGLOBAL /* wtypes.h:253:3 */

type WireHGLOBAL = uintptr /* wtypes.h:255:21 */

type X_userHMETAFILE = struct {
	FfContext    LONG
	F__ccgo_pad1 [4]byte
	Fu           struct {
		F__ccgo_pad1 [0]uint64
		FhInproc     LONG
		F__ccgo_pad2 [4]byte
	}
} /* wtypes.h:257:9 */

type UserHMETAFILE = X_userHMETAFILE /* wtypes.h:264:3 */

type X_remoteMETAFILEPICT = struct {
	Fmm          LONG
	FxExt        LONG
	FyExt        LONG
	F__ccgo_pad1 [4]byte
	FhMF         uintptr
} /* wtypes.h:266:9 */

type RemoteMETAFILEPICT = X_remoteMETAFILEPICT /* wtypes.h:271:3 */

type X_userHMETAFILEPICT = struct {
	FfContext    LONG
	F__ccgo_pad1 [4]byte
	Fu           struct {
		F__ccgo_pad1 [0]uint64
		FhInproc     LONG
		F__ccgo_pad2 [4]byte
	}
} /* wtypes.h:273:9 */

type UserHMETAFILEPICT = X_userHMETAFILEPICT /* wtypes.h:280:3 */

type X_userHENHMETAFILE = struct {
	FfContext    LONG
	F__ccgo_pad1 [4]byte
	Fu           struct {
		F__ccgo_pad1 [0]uint64
		FhInproc     LONG
		F__ccgo_pad2 [4]byte
	}
} /* wtypes.h:282:9 */

type UserHENHMETAFILE = X_userHENHMETAFILE /* wtypes.h:289:3 */

type X_userBITMAP = struct {
	FbmType       LONG
	FbmWidth      LONG
	FbmHeight     LONG
	FbmWidthBytes LONG
	FbmPlanes     WORD
	FbmBitsPixel  WORD
	FcbSize       ULONG
	FpBuffer      [1]Byte1
	F__ccgo_pad1  [3]byte
} /* wtypes.h:291:9 */

type UserBITMAP = X_userBITMAP /* wtypes.h:300:3 */

type X_userHBITMAP = struct {
	FfContext    LONG
	F__ccgo_pad1 [4]byte
	Fu           struct {
		F__ccgo_pad1 [0]uint64
		FhInproc     LONG
		F__ccgo_pad2 [4]byte
	}
} /* wtypes.h:302:9 */

type UserHBITMAP = X_userHBITMAP /* wtypes.h:309:3 */

type X_userHPALETTE = struct {
	FfContext    LONG
	F__ccgo_pad1 [4]byte
	Fu           struct {
		F__ccgo_pad1 [0]uint64
		FhInproc     LONG
		F__ccgo_pad2 [4]byte
	}
} /* wtypes.h:311:9 */

type UserHPALETTE = X_userHPALETTE /* wtypes.h:318:3 */

type X_RemotableHandle = struct {
	FfContext LONG
	Fu        struct{ FhInproc LONG }
} /* wtypes.h:320:9 */

type RemotableHandle = X_RemotableHandle /* wtypes.h:326:3 */

type WireHWND = uintptr     /* wtypes.h:328:25 */
type WireHMENU = uintptr    /* wtypes.h:329:25 */
type WireHACCEL = uintptr   /* wtypes.h:330:25 */
type WireHBRUSH = uintptr   /* wtypes.h:331:25 */
type WireHFONT = uintptr    /* wtypes.h:332:25 */
type WireHDC = uintptr      /* wtypes.h:333:25 */
type WireHICON = uintptr    /* wtypes.h:334:25 */
type WireHRGN = uintptr     /* wtypes.h:335:25 */
type WireHMONITOR = uintptr /* wtypes.h:336:25 */

type WireHBITMAP = uintptr       /* wtypes.h:401:21 */
type WireHPALETTE = uintptr      /* wtypes.h:402:22 */
type WireHENHMETAFILE = uintptr  /* wtypes.h:403:26 */
type WireHMETAFILE = uintptr     /* wtypes.h:404:23 */
type WireHMETAFILEPICT = uintptr /* wtypes.h:405:27 */

type HMETAFILEPICT = uintptr /* wtypes.h:416:14 */

type DATE = float64 /* wtypes.h:421:16 */

type TagCY = struct {
	F__ccgo_pad1 [0]uint64
	F__0         struct {
		FLo uint32
		FHi int32
	}
} /* wtypes.h:432:9 */

type CY = TagCY /* wtypes.h:438:3 */

type LPCY = uintptr /* wtypes.h:442:12 */

type TagDEC = struct {
	FwReserved USHORT
	F__2       struct {
		F__ccgo_pad1 [0]uint16
		F__0         struct {
			Fscale BYTE
			Fsign  BYTE
		}
	}
	FHi32 ULONG
	F__8  struct {
		F__ccgo_pad1 [0]uint64
		F__0         struct {
			FLo32  ULONG
			FMid32 ULONG
		}
	}
} /* wtypes.h:453:9 */

type DECIMAL = TagDEC /* wtypes.h:470:3 */

type LPDECIMAL = uintptr /* wtypes.h:476:17 */

type WireBSTR = uintptr /* wtypes.h:478:27 */
type BSTR = uintptr     /* wtypes.h:479:17 */

type LPBSTR = uintptr /* wtypes.h:481:14 */

type VARIANT_BOOL = int16 /* wtypes.h:483:15 */

type TagBSTRBLOB = struct {
	FcbSize      ULONG
	F__ccgo_pad1 [4]byte
	FpData       uintptr
} /* wtypes.h:493:9 */

type BSTRBLOB = TagBSTRBLOB /* wtypes.h:496:3 */
type LPBSTRBLOB = uintptr   /* wtypes.h:497:28 */

type TagCLIPDATA = struct {
	FcbSize    ULONG
	FulClipFmt LONG
	FpClipData uintptr
} /* wtypes.h:503:9 */

type CLIPDATA = TagCLIPDATA /* wtypes.h:507:3 */

type VARTYPE = uint16 /* wtypes.h:511:24 */

type PROPID = ULONG /* wtypes.h:568:15 */

type X_tagpropertykey = struct {
	Ffmtid GUID
	Fpid   DWORD
} /* wtypes.h:573:9 */

type PROPERTYKEY = X_tagpropertykey /* wtypes.h:576:3 */

type TagCSPLATFORM = struct {
	FdwPlatformId    DWORD
	FdwVersionHi     DWORD
	FdwVersionLo     DWORD
	FdwProcessorArch DWORD
} /* wtypes.h:579:9 */

type CSPLATFORM = TagCSPLATFORM /* wtypes.h:584:3 */

type TagQUERYCONTEXT = struct {
	FdwContext   DWORD
	FPlatform    CSPLATFORM
	FLocale      LCID
	FdwVersionHi DWORD
	FdwVersionLo DWORD
} /* wtypes.h:586:9 */

type QUERYCONTEXT = TagQUERYCONTEXT /* wtypes.h:592:3 */

type TYSPEC = uint32 /* wtypes.h:602:3 */

type X__WIDL_wtypes_generated_name_00000001 = struct {
	Ftyspec       DWORD
	F__ccgo_pad1  [4]byte
	Ftagged_union struct {
		F__ccgo_pad1 [0]uint64
		Fclsid       CLSID
		F__ccgo_pad2 [16]byte
	}
} /* wtypes.h:604:9 */

type UCLSSPEC = X__WIDL_wtypes_generated_name_00000001 /* wtypes.h:621:3 */
// Begin additional prototypes for all interfaces

// End additional prototypes

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// ****************************************************************************
//
// IUnknown interface

// ****************************************************************************
//
// AsyncIUnknown interface

// ****************************************************************************
//
// IClassFactory interface

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/wtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// ****************************************************************************
//
// IMallocSpy interface

type LPMALLOCSPY = uintptr /* objidl.h:7612:20 */
type IMallocSpyVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FPreAlloc         uintptr
	FPostAlloc        uintptr
	FPreFree          uintptr
	FPostFree         uintptr
	FPreRealloc       uintptr
	FPostRealloc      uintptr
	FPreGetSize       uintptr
	FPostGetSize      uintptr
	FPreDidAlloc      uintptr
	FPostDidAlloc     uintptr
	FPreHeapMinimize  uintptr
	FPostHeapMinimize uintptr
} /* objidl.h:277:9 */

type IMallocSpyVtbl = IMallocSpyVtbl1 /* objidl.h:7742:3 */

// ****************************************************************************
//
// IBindCtx interface

type LPBC = uintptr      /* objidl.h:7934:18 */
type LPBINDCTX = uintptr /* objidl.h:7935:18 */
type TagBIND_OPTS = struct {
	FcbStruct            DWORD
	FgrfFlags            DWORD
	FgrfMode             DWORD
	FdwTickCountDeadline DWORD
} /* objidl.h:7944:9 */

type BIND_OPTS = TagBIND_OPTS /* objidl.h:7949:3 */
type LPBIND_OPTS = uintptr    /* objidl.h:7950:29 */
type TagBIND_OPTS2 = struct {
	FcbStruct            DWORD
	FgrfFlags            DWORD
	FgrfMode             DWORD
	FdwTickCountDeadline DWORD
	FdwTrackFlags        DWORD
	FdwClassContext      DWORD
	Flocale              LCID
	F__ccgo_pad1         [4]byte
	FpServerInfo         uintptr
} /* objidl.h:7960:9 */

type BIND_OPTS2 = TagBIND_OPTS2 /* objidl.h:7969:3 */
type LPBIND_OPTS2 = uintptr     /* objidl.h:7970:30 */
type TagBIND_OPTS3 = struct {
	FcbStruct            DWORD
	FgrfFlags            DWORD
	FgrfMode             DWORD
	FdwTickCountDeadline DWORD
	FdwTrackFlags        DWORD
	FdwClassContext      DWORD
	Flocale              LCID
	F__ccgo_pad1         [4]byte
	FpServerInfo         uintptr
	Fhwnd                HWND
} /* objidl.h:7977:9 */

type BIND_OPTS3 = TagBIND_OPTS3 /* objidl.h:7987:3 */
type LPBIND_OPTS3 = uintptr     /* objidl.h:7988:30 */
type BIND_FLAGS = uint32        /* objidl.h:7993:3 */
type IBindCtxVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FRegisterObjectBound   uintptr
	FRevokeObjectBound     uintptr
	FReleaseBoundObjects   uintptr
	FSetBindOptions        uintptr
	FGetBindOptions        uintptr
	FGetRunningObjectTable uintptr
	FRegisterObjectParam   uintptr
	FGetObjectParam        uintptr
	FEnumObjectParam       uintptr
	FRevokeObjectParam     uintptr
} /* objidl.h:282:9 */

type IBindCtxVtbl = IBindCtxVtbl1 /* objidl.h:8094:3 */

// ****************************************************************************
//
// IEnumMoniker interface

type LPENUMMONIKER = uintptr /* objidl.h:8265:22 */
type IEnumMonikerVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* objidl.h:287:9 */

type IEnumMonikerVtbl = IEnumMonikerVtbl1 /* objidl.h:8324:3 */

// ****************************************************************************
//
// IRunnableObject interface

type LPRUNNABLEOBJECT = uintptr /* objidl.h:8423:25 */
type IRunnableObjectVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FGetRunningClass    uintptr
	FRun                uintptr
	FIsRunning          uintptr
	FLockRunning        uintptr
	FSetContainedObject uintptr
} /* objidl.h:292:9 */

type IRunnableObjectVtbl = IRunnableObjectVtbl1 /* objidl.h:8487:3 */

// ****************************************************************************
//
// IRunningObjectTable interface

type LPRUNNINGOBJECTTABLE = uintptr /* objidl.h:8589:29 */
type IRunningObjectTableVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FRegister            uintptr
	FRevoke              uintptr
	FIsRunning           uintptr
	FGetObjectA          uintptr
	FNoteChangeTime      uintptr
	FGetTimeOfLastChange uintptr
	FEnumRunning         uintptr
} /* objidl.h:297:9 */

type IRunningObjectTableVtbl = IRunningObjectTableVtbl1 /* objidl.h:8678:3 */

// ****************************************************************************
//
// IPersist interface

type LPPERSIST = uintptr /* objidl.h:8808:18 */
type IPersistVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
} /* objidl.h:302:9 */

type IPersistVtbl = IPersistVtbl1 /* objidl.h:8843:3 */

// ****************************************************************************
//
// IPersistStream interface

type LPPERSISTSTREAM = uintptr /* objidl.h:8893:24 */
type IPersistStreamVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FIsDirty        uintptr
	FLoad           uintptr
	FSave           uintptr
	FGetSizeMax     uintptr
} /* objidl.h:307:9 */

type IPersistStreamVtbl = IPersistStreamVtbl1 /* objidl.h:8955:3 */

// ****************************************************************************
//
// IMoniker interface

type LPMONIKER = uintptr /* objidl.h:9047:18 */
type MKSYS = uint32      /* objidl.h:9059:3 */
type MKRREDUCE = uint32  /* objidl.h:9065:3 */
type IMonikerVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetClassID          uintptr
	FIsDirty             uintptr
	FLoad                uintptr
	FSave                uintptr
	FGetSizeMax          uintptr
	FBindToObject        uintptr
	FBindToStorage       uintptr
	FReduce              uintptr
	FComposeWith         uintptr
	FEnum                uintptr
	FIsEqual             uintptr
	FHash                uintptr
	FIsRunning           uintptr
	FGetTimeOfLastChange uintptr
	FInverse             uintptr
	FCommonPrefixWith    uintptr
	FRelativePathTo      uintptr
	FGetDisplayName      uintptr
	FParseDisplayName    uintptr
	FIsSystemMoniker     uintptr
} /* objidl.h:312:9 */

type IMonikerVtbl = IMonikerVtbl1 /* objidl.h:9268:3 */
type IROTDataVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FGetComparisonData uintptr
} /* objidl.h:317:9 */

type IROTDataVtbl = IROTDataVtbl1 /* objidl.h:9598:3 */

// ****************************************************************************
//
// IEnumSTATSTG interface

type LPENUMSTATSTG = uintptr /* objidl.h:9652:22 */
type IEnumSTATSTGVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* objidl.h:322:9 */

type IEnumSTATSTGVtbl = IEnumSTATSTGVtbl1 /* objidl.h:9711:3 */

// ****************************************************************************
//
// IStorage interface

type LPSTORAGE = uintptr /* objidl.h:9808:18 */
type TagRemSNB = struct {
	FulCntStr    ULONG
	FulCntChar   ULONG
	FrgString    [1]OLECHAR
	F__ccgo_pad1 [2]byte
} /* objidl.h:9809:9 */

type RemSNB = TagRemSNB /* objidl.h:9813:3 */
type WireSNB = uintptr  /* objidl.h:9814:16 */
type SNB = uintptr      /* objidl.h:9815:18 */
type IStorageVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FCreateStream    uintptr
	FOpenStream      uintptr
	FCreateStorage   uintptr
	FOpenStorage     uintptr
	FCopyTo          uintptr
	FMoveElementTo   uintptr
	FCommit          uintptr
	FRevert          uintptr
	FEnumElements    uintptr
	FDestroyElement  uintptr
	FRenameElement   uintptr
	FSetElementTimes uintptr
	FSetClass        uintptr
	FSetStateBits    uintptr
	FStat            uintptr
} /* objidl.h:327:9 */

type IStorageVtbl = IStorageVtbl1 /* objidl.h:10011:3 */

// ****************************************************************************
//
// IPersistFile interface

type LPPERSISTFILE = uintptr /* objidl.h:10304:22 */
type IPersistFileVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FIsDirty        uintptr
	FLoad           uintptr
	FSave           uintptr
	FSaveCompleted  uintptr
	FGetCurFile     uintptr
} /* objidl.h:332:9 */

type IPersistFileVtbl = IPersistFileVtbl1 /* objidl.h:10375:3 */

// ****************************************************************************
//
// IPersistStorage interface

type LPPERSISTSTORAGE = uintptr /* objidl.h:10480:25 */
type IPersistStorageVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FGetClassID      uintptr
	FIsDirty         uintptr
	FInitNew         uintptr
	FLoad            uintptr
	FSave            uintptr
	FSaveCompleted   uintptr
	FHandsOffStorage uintptr
} /* objidl.h:337:9 */

type IPersistStorageVtbl = IPersistStorageVtbl1 /* objidl.h:10555:3 */

// ****************************************************************************
//
// ILockBytes interface

type LPLOCKBYTES = uintptr /* objidl.h:10672:20 */
type ILockBytesVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FReadAt         uintptr
	FWriteAt        uintptr
	FFlush          uintptr
	FSetSize        uintptr
	FLockRegion     uintptr
	FUnlockRegion   uintptr
	FStat           uintptr
} /* objidl.h:342:9 */

type ILockBytesVtbl = ILockBytesVtbl1 /* objidl.h:10770:3 */

// ****************************************************************************
//
// IEnumFORMATETC interface

type LPENUMFORMATETC = uintptr /* objidl.h:10926:24 */
type TagDVTARGETDEVICE = struct {
	FtdSize             DWORD
	FtdDriverNameOffset WORD
	FtdDeviceNameOffset WORD
	FtdPortNameOffset   WORD
	FtdExtDevmodeOffset WORD
	FtdData             [1]BYTE
	F__ccgo_pad1        [3]byte
} /* objidl.h:10927:9 */

type DVTARGETDEVICE = TagDVTARGETDEVICE /* objidl.h:10934:3 */
type LPCLIPFORMAT = uintptr             /* objidl.h:10935:20 */
type TagFORMATETC = struct {
	FcfFormat    CLIPFORMAT
	F__ccgo_pad1 [6]byte
	Fptd         uintptr
	FdwAspect    DWORD
	Flindex      LONG
	Ftymed       DWORD
	F__ccgo_pad2 [4]byte
} /* objidl.h:10936:9 */

type FORMATETC = TagFORMATETC /* objidl.h:10942:3 */
type LPFORMATETC = uintptr    /* objidl.h:10943:29 */
type IEnumFORMATETCVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* objidl.h:347:9 */

type IEnumFORMATETCVtbl = IEnumFORMATETCVtbl1 /* objidl.h:11002:3 */

// ****************************************************************************
//
// IEnumSTATDATA interface

type LPENUMSTATDATA = uintptr /* objidl.h:11099:23 */
type ADVF = uint32            /* objidl.h:11108:3 */
type TagSTATDATA = struct {
	Fformatetc    FORMATETC
	Fadvf         DWORD
	F__ccgo_pad1  [4]byte
	FpAdvSink     uintptr
	FdwConnection DWORD
	F__ccgo_pad2  [4]byte
} /* objidl.h:11109:9 */

type STATDATA = TagSTATDATA /* objidl.h:11114:3 */
type LPSTATDATA = uintptr   /* objidl.h:11115:18 */
type IEnumSTATDATAVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* objidl.h:352:9 */

type IEnumSTATDATAVtbl = IEnumSTATDATAVtbl1 /* objidl.h:11174:3 */

// ****************************************************************************
//
// IRootStorage interface

type LPROOTSTORAGE = uintptr /* objidl.h:11271:22 */
type IRootStorageVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSwitchToFile   uintptr
} /* objidl.h:357:9 */

type IRootStorageVtbl = IRootStorageVtbl1 /* objidl.h:11306:3 */

// ****************************************************************************
//
// IAdviseSink interface

type LPADVISESINK = uintptr /* objidl.h:11356:21 */
type TYMED = uint32         /* objidl.h:11366:3 */
type TagRemSTGMEDIUM = struct {
	Ftymed          DWORD
	FdwHandleType   DWORD
	FpData          ULONG
	FpUnkForRelease ULONG
	FcbData         ULONG
	Fdata           [1]Byte1
	F__ccgo_pad1    [3]byte
} /* objidl.h:11367:9 */

type RemSTGMEDIUM = TagRemSTGMEDIUM /* objidl.h:11374:3 */
type TagSTGMEDIUM = struct {
	Ftymed          DWORD
	F__ccgo_pad1    [4]byte
	F__8            struct{ FhBitmap HBITMAP }
	FpUnkForRelease uintptr
} /* objidl.h:11390:9 */

type USTGMEDIUM = TagSTGMEDIUM /* objidl.h:11402:3 */
type X_GDI_OBJECT = struct {
	FObjectType  DWORD
	F__ccgo_pad1 [4]byte
	Fu           struct{ FhBitmap WireHBITMAP }
} /* objidl.h:11404:9 */

type GDI_OBJECT = X_GDI_OBJECT /* objidl.h:11411:3 */
type X_userSTGMEDIUM = struct {
	F__0 struct {
		Ftymed       DWORD
		F__ccgo_pad1 [4]byte
		Fu           struct{ FhMetaFilePict WireHMETAFILEPICT }
	}
	FpUnkForRelease uintptr
} /* objidl.h:11412:9 */

type X_STGMEDIUM_UNION = struct {
	Ftymed       DWORD
	F__ccgo_pad1 [4]byte
	Fu           struct{ FhMetaFilePict WireHMETAFILEPICT }
} /* objidl.h:11412:9 */

type UserSTGMEDIUM = X_userSTGMEDIUM /* objidl.h:11426:3 */
type WireSTGMEDIUM = uintptr         /* objidl.h:11427:23 */
type STGMEDIUM = USTGMEDIUM          /* objidl.h:11428:20 */
type WireASYNC_STGMEDIUM = uintptr   /* objidl.h:11429:23 */
type ASYNC_STGMEDIUM = STGMEDIUM     /* objidl.h:11430:19 */
type LPSTGMEDIUM = uintptr           /* objidl.h:11431:19 */
type X_userFLAG_STGMEDIUM = struct {
	FContextFlags   LONG
	FfPassOwnership LONG
	FStgmed         UserSTGMEDIUM
} /* objidl.h:11432:9 */

type UserFLAG_STGMEDIUM = X_userFLAG_STGMEDIUM /* objidl.h:11436:3 */
type WireFLAG_STGMEDIUM = uintptr              /* objidl.h:11437:28 */
type X_FLAG_STGMEDIUM = struct {
	FContextFlags   LONG
	FfPassOwnership LONG
	FStgmed         STGMEDIUM
} /* objidl.h:11438:9 */

type FLAG_STGMEDIUM = X_FLAG_STGMEDIUM /* objidl.h:11442:3 */
type IAdviseSinkVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FOnDataChange   uintptr
	FOnViewChange   uintptr
	FOnRename       uintptr
	FOnSave         uintptr
	FOnClose        uintptr
} /* objidl.h:362:9 */

type IAdviseSinkVtbl = IAdviseSinkVtbl1 /* objidl.h:11507:3 */
type AsyncIAdviseSinkVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FBegin_OnDataChange  uintptr
	FFinish_OnDataChange uintptr
	FBegin_OnViewChange  uintptr
	FFinish_OnViewChange uintptr
	FBegin_OnRename      uintptr
	FFinish_OnRename     uintptr
	FBegin_OnSave        uintptr
	FFinish_OnSave       uintptr
	FBegin_OnClose       uintptr
	FFinish_OnClose      uintptr
} /* objidl.h:367:9 */

type AsyncIAdviseSinkVtbl = AsyncIAdviseSinkVtbl1 /* objidl.h:11729:3 */

// ****************************************************************************
//
// IAdviseSink2 interface

type LPADVISESINK2 = uintptr /* objidl.h:11944:22 */
type IAdviseSink2Vtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FOnDataChange    uintptr
	FOnViewChange    uintptr
	FOnRename        uintptr
	FOnSave          uintptr
	FOnClose         uintptr
	FOnLinkSrcChange uintptr
} /* objidl.h:372:9 */

type IAdviseSink2Vtbl = IAdviseSink2Vtbl1 /* objidl.h:12000:3 */
type AsyncIAdviseSink2Vtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FBegin_OnDataChange     uintptr
	FFinish_OnDataChange    uintptr
	FBegin_OnViewChange     uintptr
	FFinish_OnViewChange    uintptr
	FBegin_OnRename         uintptr
	FFinish_OnRename        uintptr
	FBegin_OnSave           uintptr
	FFinish_OnSave          uintptr
	FBegin_OnClose          uintptr
	FFinish_OnClose         uintptr
	FBegin_OnLinkSrcChange  uintptr
	FFinish_OnLinkSrcChange uintptr
} /* objidl.h:377:9 */

type AsyncIAdviseSink2Vtbl = AsyncIAdviseSink2Vtbl1 /* objidl.h:12154:3 */

// ****************************************************************************
//
// IDataObject interface

type LPDATAOBJECT = uintptr /* objidl.h:12271:21 */
type DATADIR = uint32       /* objidl.h:12275:3 */
type IDataObjectVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetData               uintptr
	FGetDataHere           uintptr
	FQueryGetData          uintptr
	FGetCanonicalFormatEtc uintptr
	FSetData               uintptr
	FEnumFormatEtc         uintptr
	FDAdvise               uintptr
	FDUnadvise             uintptr
	FEnumDAdvise           uintptr
} /* objidl.h:382:9 */

type IDataObjectVtbl = IDataObjectVtbl1 /* objidl.h:12384:3 */

// ****************************************************************************
//
// IDataAdviseHolder interface

type LPDATAADVISEHOLDER = uintptr /* objidl.h:12567:27 */
type IDataAdviseHolderVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FAdvise           uintptr
	FUnadvise         uintptr
	FEnumAdvise       uintptr
	FSendOnDataChange uintptr
} /* objidl.h:387:9 */

type IDataAdviseHolderVtbl = IDataAdviseHolderVtbl1 /* objidl.h:12635:3 */

// ****************************************************************************
//
// IMessageFilter interface

type LPMESSAGEFILTER = uintptr /* objidl.h:12727:24 */
type CALLTYPE = uint32         /* objidl.h:12734:3 */
type SERVERCALL = uint32       /* objidl.h:12739:3 */
type PENDINGTYPE = uint32      /* objidl.h:12743:3 */
type PENDINGMSG = uint32       /* objidl.h:12748:3 */
type TagINTERFACEINFO = struct {
	FpUnk        uintptr
	Fiid         IID
	FwMethod     WORD
	F__ccgo_pad1 [6]byte
} /* objidl.h:12749:9 */

type INTERFACEINFO = TagINTERFACEINFO /* objidl.h:12753:3 */
type LPINTERFACEINFO = uintptr        /* objidl.h:12754:33 */
type IMessageFilterVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FHandleInComingCall uintptr
	FRetryRejectedCall  uintptr
	FMessagePending     uintptr
} /* objidl.h:392:9 */

type IMessageFilterVtbl = IMessageFilterVtbl1 /* objidl.h:12817:3 */
type IClassActivatorVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassObject uintptr
} /* objidl.h:397:9 */

type IClassActivatorVtbl = IClassActivatorVtbl1 /* objidl.h:12957:3 */
type IFillLockBytesVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FFillAppend     uintptr
	FFillAt         uintptr
	FSetFillSize    uintptr
	FTerminate      uintptr
} /* objidl.h:402:9 */

type IFillLockBytesVtbl = IFillLockBytesVtbl1 /* objidl.h:13078:3 */
type IProgressNotifyVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FOnProgress     uintptr
} /* objidl.h:407:9 */

type IProgressNotifyVtbl = IProgressNotifyVtbl1 /* objidl.h:13233:3 */

// ****************************************************************************
//
// ILayoutStorage interface

type TagStorageLayout = struct {
	FLayoutType      DWORD
	F__ccgo_pad1     [4]byte
	FpwcsElementName uintptr
	FcOffset         LARGE_INTEGER
	FcBytes          LARGE_INTEGER
} /* objidl.h:13288:9 */

// ****************************************************************************
//
// ILayoutStorage interface

type StorageLayout = TagStorageLayout /* objidl.h:13293:3 */
type ILayoutStorageVtbl1 = struct {
	FQueryInterface              uintptr
	FAddRef                      uintptr
	FRelease                     uintptr
	FLayoutScript                uintptr
	FBeginMonitor                uintptr
	FEndMonitor                  uintptr
	FReLayoutDocfile             uintptr
	FReLayoutDocfileOnILockBytes uintptr
} /* objidl.h:412:9 */

type ILayoutStorageVtbl = ILayoutStorageVtbl1 /* objidl.h:13358:3 */
type IBlockingLockVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FLock           uintptr
	FUnlock         uintptr
} /* objidl.h:417:9 */

type IBlockingLockVtbl = IBlockingLockVtbl1 /* objidl.h:13498:3 */
type ITimeAndNoticeControlVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FSuppressChanges uintptr
} /* objidl.h:422:9 */

type ITimeAndNoticeControlVtbl = ITimeAndNoticeControlVtbl1 /* objidl.h:13595:3 */
type IOplockStorageVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FCreateStorageEx uintptr
	FOpenStorageEx   uintptr
} /* objidl.h:427:9 */

type IOplockStorageVtbl = IOplockStorageVtbl1 /* objidl.h:13707:3 */
type IDirectWriterLockVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FWaitForWriteAccess uintptr
	FReleaseWriteAccess uintptr
	FHaveWriteAccess    uintptr
} /* objidl.h:432:9 */

type IDirectWriterLockVtbl = IDirectWriterLockVtbl1 /* objidl.h:13827:3 */
type IUrlMonVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FAsyncGetClassBits uintptr
} /* objidl.h:437:9 */

type IUrlMonVtbl = IUrlMonVtbl1 /* objidl.h:13953:3 */
type IForegroundTransferVtbl1 = struct {
	FQueryInterface          uintptr
	FAddRef                  uintptr
	FRelease                 uintptr
	FAllowForegroundTransfer uintptr
} /* objidl.h:442:9 */

type IForegroundTransferVtbl = IForegroundTransferVtbl1 /* objidl.h:14046:3 */
type IThumbnailExtractorVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FExtractThumbnail uintptr
	FOnFileUpdated    uintptr
} /* objidl.h:447:9 */

type IThumbnailExtractorVtbl = IThumbnailExtractorVtbl1 /* objidl.h:14147:3 */
type IDummyHICONIncluderVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FDummy          uintptr
} /* objidl.h:452:9 */

type IDummyHICONIncluderVtbl = IDummyHICONIncluderVtbl1 /* objidl.h:14250:3 */

type ApplicationType = uint32 /* objidl.h:14298:3 */
type ShutdownType = uint32    /* objidl.h:14302:3 */
type IProcessLockVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FAddRefOnProcess     uintptr
	FReleaseRefOnProcess uintptr
} /* objidl.h:457:9 */

type IProcessLockVtbl = IProcessLockVtbl1 /* objidl.h:14348:3 */
type ISurrogateServiceVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FInit              uintptr
	FApplicationLaunch uintptr
	FApplicationFree   uintptr
	FCatalogRefresh    uintptr
	FProcessShutdown   uintptr
} /* objidl.h:462:9 */

type ISurrogateServiceVtbl = ISurrogateServiceVtbl1 /* objidl.h:14476:3 */

// ****************************************************************************
//
// IInitializeSpy interface

type LPINITIALIZESPY = uintptr /* objidl.h:14577:24 */
type IInitializeSpyVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FPreInitialize    uintptr
	FPostInitialize   uintptr
	FPreUninitialize  uintptr
	FPostUninitialize uintptr
} /* objidl.h:467:9 */

type IInitializeSpyVtbl = IInitializeSpyVtbl1 /* objidl.h:14639:3 */
type IApartmentShutdownVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FOnUninitialize uintptr
} /* objidl.h:472:9 */

type IApartmentShutdownVtbl = IApartmentShutdownVtbl1 /* objidl.h:14764:3 */

type COMSD = uint32 /* objbase.h:92:3 */

type TagSTGOPTIONS = struct {
	FusVersion        USHORT
	Freserved         USHORT
	FulSectorSize     ULONG
	FpwcsTemplateFile uintptr
} /* objbase.h:130:9 */

type STGOPTIONS = TagSTGOPTIONS /* objbase.h:137:3 */

//** Autogenerated by WIDL 4.12.1 from include/urlmon.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IPersistMoniker1 = struct{ FlpVtbl uintptr } /* urlmon.h:23:9 */

//** Autogenerated by WIDL 4.12.1 from include/urlmon.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IPersistMoniker = IPersistMoniker1 /* urlmon.h:23:35 */

type IMonikerProp1 = struct{ FlpVtbl uintptr } /* urlmon.h:31:9 */

type IMonikerProp = IMonikerProp1 /* urlmon.h:31:32 */

type IBindProtocol1 = struct{ FlpVtbl uintptr } /* urlmon.h:39:9 */

type IBindProtocol = IBindProtocol1 /* urlmon.h:39:33 */

type IBinding1 = struct{ FlpVtbl uintptr } /* urlmon.h:47:9 */

type IBinding = IBinding1 /* urlmon.h:47:28 */

type IBindStatusCallback1 = struct{ FlpVtbl uintptr } /* urlmon.h:55:9 */

type IBindStatusCallback = IBindStatusCallback1 /* urlmon.h:55:39 */

type IBindStatusCallbackEx1 = struct{ FlpVtbl uintptr } /* urlmon.h:63:9 */

type IBindStatusCallbackEx = IBindStatusCallbackEx1 /* urlmon.h:63:41 */

type IAuthenticate1 = struct{ FlpVtbl uintptr } /* urlmon.h:71:9 */

type IAuthenticate = IAuthenticate1 /* urlmon.h:71:33 */

type IAuthenticateEx1 = struct{ FlpVtbl uintptr } /* urlmon.h:79:9 */

type IAuthenticateEx = IAuthenticateEx1 /* urlmon.h:79:35 */

type IHttpNegotiate1 = struct{ FlpVtbl uintptr } /* urlmon.h:87:9 */

type IHttpNegotiate = IHttpNegotiate1 /* urlmon.h:87:34 */

type IHttpNegotiate21 = struct{ FlpVtbl uintptr } /* urlmon.h:95:9 */

type IHttpNegotiate2 = IHttpNegotiate21 /* urlmon.h:95:35 */

type IHttpNegotiate31 = struct{ FlpVtbl uintptr } /* urlmon.h:103:9 */

type IHttpNegotiate3 = IHttpNegotiate31 /* urlmon.h:103:35 */

type IWinInetFileStream1 = struct{ FlpVtbl uintptr } /* urlmon.h:111:9 */

type IWinInetFileStream = IWinInetFileStream1 /* urlmon.h:111:38 */

type IWindowForBindingUI1 = struct{ FlpVtbl uintptr } /* urlmon.h:119:9 */

type IWindowForBindingUI = IWindowForBindingUI1 /* urlmon.h:119:39 */

type ICodeInstall1 = struct{ FlpVtbl uintptr } /* urlmon.h:127:9 */

type ICodeInstall = ICodeInstall1 /* urlmon.h:127:32 */

type IWinInetInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:167:9 */

type IWinInetInfo = IWinInetInfo1 /* urlmon.h:167:32 */

type IHttpSecurity1 = struct{ FlpVtbl uintptr } /* urlmon.h:175:9 */

type IHttpSecurity = IHttpSecurity1 /* urlmon.h:175:33 */

type IWinInetHttpInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:183:9 */

type IWinInetHttpInfo = IWinInetHttpInfo1 /* urlmon.h:183:36 */

type IWinInetHttpTimeouts1 = struct{ FlpVtbl uintptr } /* urlmon.h:191:9 */

type IWinInetHttpTimeouts = IWinInetHttpTimeouts1 /* urlmon.h:191:40 */

type IBindHost1 = struct{ FlpVtbl uintptr } /* urlmon.h:215:9 */

type IBindHost = IBindHost1 /* urlmon.h:215:29 */

type IInternet1 = struct{ FlpVtbl uintptr } /* urlmon.h:223:9 */

type IInternet = IInternet1 /* urlmon.h:223:29 */

type IInternetBindInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:231:9 */

type IInternetBindInfo = IInternetBindInfo1 /* urlmon.h:231:37 */

type IInternetBindInfoEx1 = struct{ FlpVtbl uintptr } /* urlmon.h:239:9 */

type IInternetBindInfoEx = IInternetBindInfoEx1 /* urlmon.h:239:39 */

type IInternetProtocolRoot1 = struct{ FlpVtbl uintptr } /* urlmon.h:247:9 */

type IInternetProtocolRoot = IInternetProtocolRoot1 /* urlmon.h:247:41 */

type IInternetProtocol1 = struct{ FlpVtbl uintptr } /* urlmon.h:255:9 */

type IInternetProtocol = IInternetProtocol1 /* urlmon.h:255:37 */

type IInternetProtocolSink1 = struct{ FlpVtbl uintptr } /* urlmon.h:271:9 */

type IInternetProtocolSink = IInternetProtocolSink1 /* urlmon.h:271:41 */

type IInternetProtocolSinkStackable1 = struct{ FlpVtbl uintptr } /* urlmon.h:279:9 */

type IInternetProtocolSinkStackable = IInternetProtocolSinkStackable1 /* urlmon.h:279:50 */

type IInternetSession1 = struct{ FlpVtbl uintptr } /* urlmon.h:287:9 */

type IInternetSession = IInternetSession1 /* urlmon.h:287:36 */

type IInternetThreadSwitch1 = struct{ FlpVtbl uintptr } /* urlmon.h:295:9 */

type IInternetThreadSwitch = IInternetThreadSwitch1 /* urlmon.h:295:41 */

type IInternetPriority1 = struct{ FlpVtbl uintptr } /* urlmon.h:303:9 */

type IInternetPriority = IInternetPriority1 /* urlmon.h:303:37 */

type IInternetProtocolInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:311:9 */

type IInternetProtocolInfo = IInternetProtocolInfo1 /* urlmon.h:311:41 */

type IInternetSecurityMgrSite1 = struct{ FlpVtbl uintptr } /* urlmon.h:319:9 */

type IInternetSecurityMgrSite = IInternetSecurityMgrSite1 /* urlmon.h:319:44 */

type IInternetSecurityManager1 = struct{ FlpVtbl uintptr } /* urlmon.h:327:9 */

type IInternetSecurityManager = IInternetSecurityManager1 /* urlmon.h:327:44 */

type IInternetHostSecurityManager1 = struct{ FlpVtbl uintptr } /* urlmon.h:359:9 */

type IInternetHostSecurityManager = IInternetHostSecurityManager1 /* urlmon.h:359:48 */

type IInternetZoneManager1 = struct{ FlpVtbl uintptr } /* urlmon.h:367:9 */

type IInternetZoneManager = IInternetZoneManager1 /* urlmon.h:367:40 */

type ISoftDistExt1 = struct{ FlpVtbl uintptr } /* urlmon.h:391:9 */

type ISoftDistExt = ISoftDistExt1 /* urlmon.h:391:32 */

type ICatalogFileInfo1 = struct{ FlpVtbl uintptr } /* urlmon.h:399:9 */

type ICatalogFileInfo = ICatalogFileInfo1 /* urlmon.h:399:36 */

type IDataFilter1 = struct{ FlpVtbl uintptr } /* urlmon.h:407:9 */

type IDataFilter = IDataFilter1 /* urlmon.h:407:31 */

type IEncodingFilterFactory1 = struct{ FlpVtbl uintptr } /* urlmon.h:415:9 */

type IEncodingFilterFactory = IEncodingFilterFactory1 /* urlmon.h:415:42 */

type IWrappedProtocol1 = struct{ FlpVtbl uintptr } /* urlmon.h:423:9 */

type IWrappedProtocol = IWrappedProtocol1 /* urlmon.h:423:36 */

type IGetBindHandle1 = struct{ FlpVtbl uintptr } /* urlmon.h:431:9 */

type IGetBindHandle = IGetBindHandle1 /* urlmon.h:431:34 */

type IBindCallbackRedirect1 = struct{ FlpVtbl uintptr } /* urlmon.h:439:9 */

type IBindCallbackRedirect = IBindCallbackRedirect1 /* urlmon.h:439:41 */

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oleidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IOleAdviseHolder1 = struct{ FlpVtbl uintptr } /* oleidl.h:23:9 */

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oleidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IOleAdviseHolder = IOleAdviseHolder1 /* oleidl.h:23:36 */

type IOleCache1 = struct{ FlpVtbl uintptr } /* oleidl.h:31:9 */

type IOleCache = IOleCache1 /* oleidl.h:31:29 */

type IOleCache21 = struct{ FlpVtbl uintptr } /* oleidl.h:39:9 */

type IOleCache2 = IOleCache21 /* oleidl.h:39:30 */

type IOleCacheControl1 = struct{ FlpVtbl uintptr } /* oleidl.h:47:9 */

type IOleCacheControl = IOleCacheControl1 /* oleidl.h:47:36 */

type IParseDisplayName1 = struct{ FlpVtbl uintptr } /* oleidl.h:55:9 */

type IParseDisplayName = IParseDisplayName1 /* oleidl.h:55:37 */

type IOleContainer1 = struct{ FlpVtbl uintptr } /* oleidl.h:63:9 */

type IOleContainer = IOleContainer1 /* oleidl.h:63:33 */

type IOleClientSite1 = struct{ FlpVtbl uintptr } /* oleidl.h:71:9 */

type IOleClientSite = IOleClientSite1 /* oleidl.h:71:34 */

type IOleObject1 = struct{ FlpVtbl uintptr } /* oleidl.h:79:9 */

type IOleObject = IOleObject1 /* oleidl.h:79:30 */

type IOleWindow1 = struct{ FlpVtbl uintptr } /* oleidl.h:87:9 */

type IOleWindow = IOleWindow1 /* oleidl.h:87:30 */

type IOleLink1 = struct{ FlpVtbl uintptr } /* oleidl.h:95:9 */

type IOleLink = IOleLink1 /* oleidl.h:95:28 */

type IOleItemContainer1 = struct{ FlpVtbl uintptr } /* oleidl.h:103:9 */

type IOleItemContainer = IOleItemContainer1 /* oleidl.h:103:37 */

type IOleInPlaceUIWindow1 = struct{ FlpVtbl uintptr } /* oleidl.h:111:9 */

type IOleInPlaceUIWindow = IOleInPlaceUIWindow1 /* oleidl.h:111:39 */

type IOleInPlaceActiveObject1 = struct{ FlpVtbl uintptr } /* oleidl.h:119:9 */

type IOleInPlaceActiveObject = IOleInPlaceActiveObject1 /* oleidl.h:119:43 */

type IOleInPlaceFrame1 = struct{ FlpVtbl uintptr } /* oleidl.h:127:9 */

type IOleInPlaceFrame = IOleInPlaceFrame1 /* oleidl.h:127:36 */

type IOleInPlaceObject1 = struct{ FlpVtbl uintptr } /* oleidl.h:135:9 */

type IOleInPlaceObject = IOleInPlaceObject1 /* oleidl.h:135:37 */

type IOleInPlaceSite1 = struct{ FlpVtbl uintptr } /* oleidl.h:143:9 */

type IOleInPlaceSite = IOleInPlaceSite1 /* oleidl.h:143:35 */

type IContinue1 = struct{ FlpVtbl uintptr } /* oleidl.h:151:9 */

type IContinue = IContinue1 /* oleidl.h:151:29 */

type IViewObject1 = struct{ FlpVtbl uintptr } /* oleidl.h:159:9 */

type IViewObject = IViewObject1 /* oleidl.h:159:31 */

type IViewObject21 = struct{ FlpVtbl uintptr } /* oleidl.h:167:9 */

type IViewObject2 = IViewObject21 /* oleidl.h:167:32 */

type IDropSource1 = struct{ FlpVtbl uintptr } /* oleidl.h:175:9 */

type IDropSource = IDropSource1 /* oleidl.h:175:31 */

type IDropTarget1 = struct{ FlpVtbl uintptr } /* oleidl.h:183:9 */

type IDropTarget = IDropTarget1 /* oleidl.h:183:31 */

type IDropSourceNotify1 = struct{ FlpVtbl uintptr } /* oleidl.h:191:9 */

type IDropSourceNotify = IDropSourceNotify1 /* oleidl.h:191:37 */

type IEnumOLEVERB1 = struct{ FlpVtbl uintptr } /* oleidl.h:199:9 */

type IEnumOLEVERB = IEnumOLEVERB1 /* oleidl.h:199:32 */

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// ****************************************************************************
//
// IOleAdviseHolder interface

type LPOLEADVISEHOLDER = uintptr /* oleidl.h:245:26 */
type IOleAdviseHolderVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAdvise         uintptr
	FUnadvise       uintptr
	FEnumAdvise     uintptr
	FSendOnRename   uintptr
	FSendOnSave     uintptr
	FSendOnClose    uintptr
} /* oleidl.h:23:9 */

type IOleAdviseHolderVtbl = IOleAdviseHolderVtbl1 /* oleidl.h:316:3 */

// ****************************************************************************
//
// IOleCache interface

type LPOLECACHE = uintptr /* oleidl.h:382:19 */
type IOleCacheVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCache          uintptr
	FUncache        uintptr
	FEnumCache      uintptr
	FInitCache      uintptr
	FSetData        uintptr
} /* oleidl.h:31:9 */

type IOleCacheVtbl = IOleCacheVtbl1 /* oleidl.h:454:3 */

// ****************************************************************************
//
// IOleCache2 interface

type LPOLECACHE2 = uintptr /* oleidl.h:514:20 */

type DISCARDCACHE = uint32 /* oleidl.h:538:3 */
type IOleCache2Vtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCache          uintptr
	FUncache        uintptr
	FEnumCache      uintptr
	FInitCache      uintptr
	FSetData        uintptr
	FUpdateCache    uintptr
	FDiscardCache   uintptr
} /* oleidl.h:39:9 */

type IOleCache2Vtbl = IOleCache2Vtbl1 /* oleidl.h:610:3 */

// ****************************************************************************
//
// IOleCacheControl interface

type LPOLECACHECONTROL = uintptr /* oleidl.h:702:26 */
type IOleCacheControlVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FOnRun          uintptr
	FOnStop         uintptr
} /* oleidl.h:47:9 */

type IOleCacheControlVtbl = IOleCacheControlVtbl1 /* oleidl.h:744:3 */

// ****************************************************************************
//
// IParseDisplayName interface

type LPPARSEDISPLAYNAME = uintptr /* oleidl.h:792:27 */
type IParseDisplayNameVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FParseDisplayName uintptr
} /* oleidl.h:55:9 */

type IParseDisplayNameVtbl = IParseDisplayNameVtbl1 /* oleidl.h:834:3 */

// ****************************************************************************
//
// IOleContainer interface

type LPOLECONTAINER = uintptr /* oleidl.h:878:23 */
type IOleContainerVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FParseDisplayName uintptr
	FEnumObjects      uintptr
	FLockContainer    uintptr
} /* oleidl.h:63:9 */

type IOleContainerVtbl = IOleContainerVtbl1 /* oleidl.h:931:3 */

// ****************************************************************************
//
// IOleClientSite interface

type LPOLECLIENTSITE = uintptr /* oleidl.h:985:24 */
type IOleClientSiteVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FSaveObject             uintptr
	FGetMoniker             uintptr
	FGetContainer           uintptr
	FShowObject             uintptr
	FOnShowWindow           uintptr
	FRequestNewObjectLayout uintptr
} /* oleidl.h:71:9 */

type IOleClientSiteVtbl = IOleClientSiteVtbl1 /* oleidl.h:1057:3 */

// ****************************************************************************
//
// IOleObject interface

type LPOLEOBJECT = uintptr /* oleidl.h:1121:20 */

type OLEGETMONIKER = uint32 /* oleidl.h:1128:3 */

type OLEWHICHMK = uint32 /* oleidl.h:1134:3 */

type USERCLASSTYPE = uint32 /* oleidl.h:1140:3 */

type OLEMISC = uint32  /* oleidl.h:1165:3 */
type OLECLOSE = uint32 /* oleidl.h:1170:3 */
type IOleObjectVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FSetClientSite    uintptr
	FGetClientSite    uintptr
	FSetHostNames     uintptr
	FClose            uintptr
	FSetMoniker       uintptr
	FGetMoniker       uintptr
	FInitFromData     uintptr
	FGetClipboardData uintptr
	FDoVerb           uintptr
	FEnumVerbs        uintptr
	FUpdate           uintptr
	FIsUpToDate       uintptr
	FGetUserClassID   uintptr
	FGetUserType      uintptr
	FSetExtent        uintptr
	FGetExtent        uintptr
	FAdvise           uintptr
	FUnadvise         uintptr
	FEnumAdvise       uintptr
	FGetMiscStatus    uintptr
	FSetColorScheme   uintptr
} /* oleidl.h:79:9 */

type IOleObjectVtbl = IOleObjectVtbl1 /* oleidl.h:1378:3 */
type OLERENDER = uint32               /* oleidl.h:1509:3 */

type LPOLERENDER = uintptr /* oleidl.h:1511:19 */

type TagOBJECTDESCRIPTOR = struct {
	FcbSize             ULONG
	Fclsid              CLSID
	FdwDrawAspect       DWORD
	Fsizel              SIZEL
	Fpointl             POINTL
	FdwStatus           DWORD
	FdwFullUserTypeName DWORD
	FdwSrcOfCopy        DWORD
} /* oleidl.h:1513:9 */

type OBJECTDESCRIPTOR = TagOBJECTDESCRIPTOR  /* oleidl.h:1522:3 */
type POBJECTDESCRIPTOR = uintptr             /* oleidl.h:1523:36 */
type LPOBJECTDESCRIPTOR = uintptr            /* oleidl.h:1524:36 */
type LINKSRCDESCRIPTOR = TagOBJECTDESCRIPTOR /* oleidl.h:1525:36 */
type PLINKSRCDESCRIPTOR = uintptr            /* oleidl.h:1526:36 */
type LPLINKSRCDESCRIPTOR = uintptr           /* oleidl.h:1527:36 */

// ****************************************************************************
//
// IOleWindow interface

type LPOLEWINDOW = uintptr /* oleidl.h:1538:20 */
type IOleWindowVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FContextSensitiveHelp uintptr
} /* oleidl.h:87:9 */

type IOleWindowVtbl = IOleWindowVtbl1 /* oleidl.h:1581:3 */

// ****************************************************************************
//
// IOleLink interface

type LPOLELINK = uintptr /* oleidl.h:1629:18 */

type OLEUPDATE = uint32 /* oleidl.h:1634:3 */

type LPOLEUPDATE = uintptr /* oleidl.h:1636:19 */
type POLEUPDATE = uintptr  /* oleidl.h:1637:19 */

type OLELINKBIND = uint32 /* oleidl.h:1641:3 */
type IOleLinkVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FSetUpdateOptions     uintptr
	FGetUpdateOptions     uintptr
	FSetSourceMoniker     uintptr
	FGetSourceMoniker     uintptr
	FSetSourceDisplayName uintptr
	FGetSourceDisplayName uintptr
	FBindToSource         uintptr
	FBindIfRunning        uintptr
	FGetBoundSource       uintptr
	FUnbindSource         uintptr
	FUpdate               uintptr
} /* oleidl.h:95:9 */

type IOleLinkVtbl = IOleLinkVtbl1 /* oleidl.h:1749:3 */

// ****************************************************************************
//
// IOleItemContainer interface

type LPOLEITEMCONTAINER = uintptr /* oleidl.h:1833:27 */

type BINDSPEED = uint32 /* oleidl.h:1839:3 */

type OLECONTF = uint32 /* oleidl.h:1847:3 */
type IOleItemContainerVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FParseDisplayName uintptr
	FEnumObjects      uintptr
	FLockContainer    uintptr
	FGetObjectA       uintptr
	FGetObjectStorage uintptr
	FIsRunning        uintptr
} /* oleidl.h:103:9 */

type IOleItemContainerVtbl = IOleItemContainerVtbl1 /* oleidl.h:1929:3 */

// ****************************************************************************
//
// IOleInPlaceUIWindow interface

type LPOLEINPLACEUIWINDOW = uintptr /* oleidl.h:1997:29 */
type BORDERWIDTHS = RECT            /* oleidl.h:1998:14 */
type LPBORDERWIDTHS = LPRECT        /* oleidl.h:1999:16 */
type LPCBORDERWIDTHS = LPCRECT      /* oleidl.h:2000:17 */
type IOleInPlaceUIWindowVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FContextSensitiveHelp uintptr
	FGetBorder            uintptr
	FRequestBorderSpace   uintptr
	FSetBorderSpace       uintptr
	FSetActiveObject      uintptr
} /* oleidl.h:111:9 */

type IOleInPlaceUIWindowVtbl = IOleInPlaceUIWindowVtbl1 /* oleidl.h:2068:3 */

// ****************************************************************************
//
// IOleInPlaceActiveObject interface

type LPOLEINPLACEACTIVEOBJECT = uintptr /* oleidl.h:2134:33 */
type IOleInPlaceActiveObjectVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetWindow             uintptr
	FContextSensitiveHelp  uintptr
	FTranslateAcceleratorA uintptr
	FOnFrameWindowActivate uintptr
	FOnDocWindowActivate   uintptr
	FResizeBorder          uintptr
	FEnableModeless        uintptr
} /* oleidl.h:119:9 */

type IOleInPlaceActiveObjectVtbl = IOleInPlaceActiveObjectVtbl1 /* oleidl.h:2211:3 */

// ****************************************************************************
//
// IOleInPlaceFrame interface

type LPOLEINPLACEFRAME = uintptr /* oleidl.h:2315:26 */

type TagOIFI = struct {
	Fcb            UINT
	FfMDIApp       WINBOOL
	FhwndFrame     HWND
	Fhaccel        HACCEL
	FcAccelEntries UINT
	F__ccgo_pad1   [4]byte
} /* oleidl.h:2317:9 */

type OLEINPLACEFRAMEINFO = TagOIFI   /* oleidl.h:2323:3 */
type LPOLEINPLACEFRAMEINFO = uintptr /* oleidl.h:2324:24 */

type TagOleMenuGroupWidths = struct{ Fwidth [6]LONG } /* oleidl.h:2326:9 */

type OLEMENUGROUPWIDTHS = TagOleMenuGroupWidths /* oleidl.h:2328:3 */
type LPOLEMENUGROUPWIDTHS = uintptr             /* oleidl.h:2329:38 */

type HOLEMENU = HGLOBAL /* oleidl.h:2331:17 */
type IOleInPlaceFrameVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetWindow             uintptr
	FContextSensitiveHelp  uintptr
	FGetBorder             uintptr
	FRequestBorderSpace    uintptr
	FSetBorderSpace        uintptr
	FSetActiveObject       uintptr
	FInsertMenus           uintptr
	FSetMenu               uintptr
	FRemoveMenus           uintptr
	FSetStatusText         uintptr
	FEnableModeless        uintptr
	FTranslateAcceleratorA uintptr
} /* oleidl.h:127:9 */

type IOleInPlaceFrameVtbl = IOleInPlaceFrameVtbl1 /* oleidl.h:2437:3 */

// ****************************************************************************
//
// IOleInPlaceObject interface

type LPOLEINPLACEOBJECT = uintptr /* oleidl.h:2529:27 */
type IOleInPlaceObjectVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FContextSensitiveHelp uintptr
	FInPlaceDeactivate    uintptr
	FUIDeactivate         uintptr
	FSetObjectRects       uintptr
	FReactivateAndUndo    uintptr
} /* oleidl.h:135:9 */

type IOleInPlaceObjectVtbl = IOleInPlaceObjectVtbl1 /* oleidl.h:2594:3 */

// ****************************************************************************
//
// IOleInPlaceSite interface

type LPOLEINPLACESITE = uintptr /* oleidl.h:2660:25 */
type IOleInPlaceSiteVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FContextSensitiveHelp uintptr
	FCanInPlaceActivate   uintptr
	FOnInPlaceActivate    uintptr
	FOnUIActivate         uintptr
	FGetWindowContext     uintptr
	FScroll               uintptr
	FOnUIDeactivate       uintptr
	FOnInPlaceDeactivate  uintptr
	FDiscardUndoState     uintptr
	FDeactivateAndUndo    uintptr
	FOnPosRectChange      uintptr
} /* oleidl.h:143:9 */

type IOleInPlaceSiteVtbl = IOleInPlaceSiteVtbl1 /* oleidl.h:2770:3 */
type IContinueVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FFContinue      uintptr
} /* oleidl.h:151:9 */

type IContinueVtbl = IContinueVtbl1 /* oleidl.h:2893:3 */

// ****************************************************************************
//
// IViewObject interface

type LPVIEWOBJECT = uintptr /* oleidl.h:2937:21 */
type IViewObjectVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FDraw           uintptr
	FGetColorSet    uintptr
	FFreeze         uintptr
	FUnfreeze       uintptr
	FSetAdvise      uintptr
	FGetAdvise      uintptr
} /* oleidl.h:159:9 */

type IViewObjectVtbl = IViewObjectVtbl1 /* oleidl.h:3050:3 */

// ****************************************************************************
//
// IViewObject2 interface

type LPVIEWOBJECT2 = uintptr /* oleidl.h:3225:22 */
type IViewObject2Vtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FDraw           uintptr
	FGetColorSet    uintptr
	FFreeze         uintptr
	FUnfreeze       uintptr
	FSetAdvise      uintptr
	FGetAdvise      uintptr
	FGetExtent      uintptr
} /* oleidl.h:167:9 */

type IViewObject2Vtbl = IViewObject2Vtbl1 /* oleidl.h:3313:3 */

// ****************************************************************************
//
// IDropSource interface

type LPDROPSOURCE = uintptr /* oleidl.h:3383:21 */
type IDropSourceVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FQueryContinueDrag uintptr
	FGiveFeedback      uintptr
} /* oleidl.h:175:9 */

type IDropSourceVtbl = IDropSourceVtbl1 /* oleidl.h:3428:3 */

// ****************************************************************************
//
// IDropTarget interface

type LPDROPTARGET = uintptr /* oleidl.h:3476:21 */
type IDropTargetVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FDragEnter      uintptr
	FDragOver       uintptr
	FDragLeave      uintptr
	FDrop           uintptr
} /* oleidl.h:183:9 */

type IDropTargetVtbl = IDropTargetVtbl1 /* oleidl.h:3576:3 */
type IDropSourceNotifyVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FDragEnterTarget uintptr
	FDragLeaveTarget uintptr
} /* oleidl.h:191:9 */

type IDropSourceNotifyVtbl = IDropSourceNotifyVtbl1 /* oleidl.h:3672:3 */

// ****************************************************************************
//
// IEnumOLEVERB interface

type LPENUMOLEVERB = uintptr /* oleidl.h:3722:22 */

type TagOLEVERB = struct {
	FlVerb        LONG
	F__ccgo_pad1  [4]byte
	FlpszVerbName LPOLESTR
	FfuFlags      DWORD
	FgrfAttribs   DWORD
} /* oleidl.h:3724:9 */

type OLEVERB = TagOLEVERB /* oleidl.h:3729:3 */
type LPOLEVERB = uintptr  /* oleidl.h:3730:27 */

type OLEVERBATTRIB = uint32 /* oleidl.h:3735:3 */
type IEnumOLEVERBVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* oleidl.h:199:9 */

type IEnumOLEVERBVtbl = IEnumOLEVERBVtbl1 /* oleidl.h:3795:3 */

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/servprov.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IServiceProvider1 = struct{ FlpVtbl uintptr } /* servprov.h:23:9 */

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/servprov.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IServiceProvider = IServiceProvider1 /* servprov.h:23:36 */

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// ****************************************************************************
//
// IServiceProvider interface

type LPSERVICEPROVIDER = uintptr /* servprov.h:62:26 */
type IServiceProviderVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FQueryService   uintptr
} /* servprov.h:23:9 */

type IServiceProviderVtbl = IServiceProviderVtbl1 /* servprov.h:122:3 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/msxml.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/unknwn.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oaidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type ICreateTypeInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:23:9 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/msxml.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/unknwn.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oaidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type ICreateTypeInfo = ICreateTypeInfo1 /* oaidl.h:23:35 */

type ICreateTypeInfo21 = struct{ FlpVtbl uintptr } /* oaidl.h:31:9 */

type ICreateTypeInfo2 = ICreateTypeInfo21 /* oaidl.h:31:36 */

type ICreateTypeLib1 = struct{ FlpVtbl uintptr } /* oaidl.h:39:9 */

type ICreateTypeLib = ICreateTypeLib1 /* oaidl.h:39:34 */

type ICreateTypeLib21 = struct{ FlpVtbl uintptr } /* oaidl.h:47:9 */

type ICreateTypeLib2 = ICreateTypeLib21 /* oaidl.h:47:35 */

type IDispatch1 = struct{ FlpVtbl uintptr } /* oaidl.h:55:9 */

type IDispatch = IDispatch1 /* oaidl.h:55:29 */

type IEnumVARIANT1 = struct{ FlpVtbl uintptr } /* oaidl.h:63:9 */

type IEnumVARIANT = IEnumVARIANT1 /* oaidl.h:63:32 */

type ITypeComp1 = struct{ FlpVtbl uintptr } /* oaidl.h:71:9 */

type ITypeComp = ITypeComp1 /* oaidl.h:71:29 */

type ITypeInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:79:9 */

type ITypeInfo = ITypeInfo1 /* oaidl.h:79:29 */

type ITypeInfo21 = struct{ FlpVtbl uintptr } /* oaidl.h:87:9 */

type ITypeInfo2 = ITypeInfo21 /* oaidl.h:87:30 */

type ITypeLib1 = struct{ FlpVtbl uintptr } /* oaidl.h:95:9 */

type ITypeLib = ITypeLib1 /* oaidl.h:95:28 */

type ITypeLib21 = struct{ FlpVtbl uintptr } /* oaidl.h:103:9 */

type ITypeLib2 = ITypeLib21 /* oaidl.h:103:29 */

type ITypeChangeEvents1 = struct{ FlpVtbl uintptr } /* oaidl.h:111:9 */

type ITypeChangeEvents = ITypeChangeEvents1 /* oaidl.h:111:37 */

type IErrorInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:119:9 */

type IErrorInfo = IErrorInfo1 /* oaidl.h:119:30 */

type ICreateErrorInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:127:9 */

type ICreateErrorInfo = ICreateErrorInfo1 /* oaidl.h:127:36 */

type ISupportErrorInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:135:9 */

type ISupportErrorInfo = ISupportErrorInfo1 /* oaidl.h:135:37 */

type ITypeFactory1 = struct{ FlpVtbl uintptr } /* oaidl.h:143:9 */

type ITypeFactory = ITypeFactory1 /* oaidl.h:143:32 */

type ITypeMarshal1 = struct{ FlpVtbl uintptr } /* oaidl.h:151:9 */

type ITypeMarshal = ITypeMarshal1 /* oaidl.h:151:32 */

type IRecordInfo1 = struct{ FlpVtbl uintptr } /* oaidl.h:159:9 */

type IRecordInfo = IRecordInfo1 /* oaidl.h:159:31 */

type IErrorLog1 = struct{ FlpVtbl uintptr } /* oaidl.h:167:9 */

type IErrorLog = IErrorLog1 /* oaidl.h:167:29 */

type IPropertyBag1 = struct{ FlpVtbl uintptr } /* oaidl.h:175:9 */

type IPropertyBag = IPropertyBag1 /* oaidl.h:175:32 */
type CURRENCY = CY                /* oaidl.h:358:12 */
type TagSAFEARRAYBOUND = struct {
	FcElements ULONG
	FlLbound   LONG
} /* oaidl.h:359:9 */

type SAFEARRAYBOUND = TagSAFEARRAYBOUND /* oaidl.h:362:3 */
type LPSAFEARRAYBOUND = uintptr         /* oaidl.h:363:34 */

type X_wireVARIANT = struct {
	FclSize      DWORD
	FrpcReserved DWORD
	Fvt          USHORT
	FwReserved1  USHORT
	FwReserved2  USHORT
	FwReserved3  USHORT
	F__16        struct {
		FllVal       LONGLONG
		F__ccgo_pad1 [8]byte
	}
} /* oaidl.h:365:9 */

type WireVARIANT = uintptr /* oaidl.h:365:29 */
type X_wireBRECORD = struct {
	FfFlags   ULONG
	FclSize   ULONG
	FpRecInfo uintptr
	FpRecord  uintptr
} /* oaidl.h:366:9 */

type WireBRECORD = uintptr /* oaidl.h:366:29 */

type X_wireSAFEARR_BSTR = struct {
	FSize        ULONG
	F__ccgo_pad1 [4]byte
	FaBstr       uintptr
} /* oaidl.h:368:9 */

type SAFEARR_BSTR = X_wireSAFEARR_BSTR /* oaidl.h:371:3 */

type X_wireSAFEARR_UNKNOWN = struct {
	FSize        ULONG
	F__ccgo_pad1 [4]byte
	FapUnknown   uintptr
} /* oaidl.h:373:9 */

type SAFEARR_UNKNOWN = X_wireSAFEARR_UNKNOWN /* oaidl.h:376:3 */

type X_wireSAFEARR_DISPATCH = struct {
	FSize        ULONG
	F__ccgo_pad1 [4]byte
	FapDispatch  uintptr
} /* oaidl.h:378:9 */

type SAFEARR_DISPATCH = X_wireSAFEARR_DISPATCH /* oaidl.h:381:3 */

type X_wireSAFEARR_VARIANT = struct {
	FSize        ULONG
	F__ccgo_pad1 [4]byte
	FaVariant    uintptr
} /* oaidl.h:383:9 */

type SAFEARR_VARIANT = X_wireSAFEARR_VARIANT /* oaidl.h:386:3 */

type X_wireSAFEARR_BRECORD = struct {
	FSize        ULONG
	F__ccgo_pad1 [4]byte
	FaRecord     uintptr
} /* oaidl.h:388:9 */

type SAFEARR_BRECORD = X_wireSAFEARR_BRECORD /* oaidl.h:391:3 */

type X_wireSAFEARR_HAVEIID = struct {
	FSize        ULONG
	F__ccgo_pad1 [4]byte
	FapUnknown   uintptr
	Fiid         IID
} /* oaidl.h:393:9 */

type SAFEARR_HAVEIID = X_wireSAFEARR_HAVEIID /* oaidl.h:397:3 */

type SF_TYPE = uint32 /* oaidl.h:411:3 */

type X_wireSAFEARRAY_UNION = struct {
	FsfType      ULONG
	F__ccgo_pad1 [4]byte
	Fu           struct {
		FBstrStr     SAFEARR_BSTR
		F__ccgo_pad1 [16]byte
	}
} /* oaidl.h:413:9 */

type SAFEARRAYUNION = X_wireSAFEARRAY_UNION /* oaidl.h:427:3 */

type X_wireSAFEARRAY = struct {
	FcDims         USHORT
	FfFeatures     USHORT
	FcbElements    ULONG
	FcLocks        ULONG
	F__ccgo_pad1   [4]byte
	FuArrayStructs SAFEARRAYUNION
	Frgsabound     [1]SAFEARRAYBOUND
} /* oaidl.h:429:9 */

type WireSAFEARRAY = uintptr  /* oaidl.h:436:3 */
type WirePSAFEARRAY = uintptr /* oaidl.h:437:23 */

type TagSAFEARRAY = struct {
	FcDims       USHORT
	FfFeatures   USHORT
	FcbElements  ULONG
	FcLocks      ULONG
	F__ccgo_pad1 [4]byte
	FpvData      PVOID
	Frgsabound   [1]SAFEARRAYBOUND
} /* oaidl.h:439:9 */

type SAFEARRAY = TagSAFEARRAY /* oaidl.h:446:3 */
type LPSAFEARRAY = uintptr    /* oaidl.h:447:19 */

// Kludge for 3.0 release to disable new default-behavior.
// For now we define _FORCENAMELESSUNION.  For 4.0 this define
// will be removed.

type TagVARIANT = struct {
	F__0 struct {
		F__0 struct {
			Fvt         VARTYPE
			FwReserved1 WORD
			FwReserved2 WORD
			FwReserved3 WORD
			F__8        struct {
				FllVal       LONGLONG
				F__ccgo_pad1 [8]byte
			}
		}
	}
} /* oaidl.h:495:9 */

// Kludge for 3.0 release to disable new default-behavior.
// For now we define _FORCENAMELESSUNION.  For 4.0 this define
// will be removed.

type VARIANT = TagVARIANT /* oaidl.h:495:27 */

type LPVARIANT = uintptr    /* oaidl.h:558:17 */
type VARIANTARG = VARIANT   /* oaidl.h:559:17 */
type LPVARIANTARG = uintptr /* oaidl.h:560:17 */

type DISPID = LONG     /* oaidl.h:637:14 */
type MEMBERID = DISPID /* oaidl.h:638:16 */
type HREFTYPE = DWORD  /* oaidl.h:639:15 */
type TYPEKIND = uint32 /* oaidl.h:650:3 */

type TagTYPEDESC = struct {
	F__0         struct{ Flptdesc uintptr }
	Fvt          VARTYPE
	F__ccgo_pad1 [6]byte
} /* oaidl.h:652:9 */

type TagARRAYDESC = struct {
	FtdescElem   TYPEDESC
	FcDims       USHORT
	F__ccgo_pad1 [2]byte
	Frgbounds    [1]SAFEARRAYBOUND
	F__ccgo_pad2 [4]byte
} /* oaidl.h:655:9 */

type TYPEDESC = TagTYPEDESC /* oaidl.h:659:3 */

type ARRAYDESC = TagARRAYDESC /* oaidl.h:665:3 */

type TagPARAMDESCEX = struct {
	FcBytes          ULONG
	F__ccgo_pad1     [4]byte
	FvarDefaultValue VARIANTARG
} /* oaidl.h:667:9 */

type PARAMDESCEX = TagPARAMDESCEX /* oaidl.h:670:3 */
type LPPARAMDESCEX = uintptr      /* oaidl.h:671:31 */

type TagPARAMDESC = struct {
	Fpparamdescex LPPARAMDESCEX
	FwParamFlags  USHORT
	F__ccgo_pad1  [6]byte
} /* oaidl.h:673:9 */

type PARAMDESC = TagPARAMDESC /* oaidl.h:676:3 */
type LPPARAMDESC = uintptr    /* oaidl.h:677:29 */

type TagIDLDESC = struct {
	FdwReserved  ULONG_PTR
	FwIDLFlags   USHORT
	F__ccgo_pad1 [6]byte
} /* oaidl.h:696:9 */

type IDLDESC = TagIDLDESC /* oaidl.h:699:3 */
type LPIDLDESC = uintptr  /* oaidl.h:700:27 */

type TagELEMDESC = struct {
	Ftdesc TYPEDESC
	F__16  struct{ Fidldesc IDLDESC }
} /* oaidl.h:720:11 */

type ELEMDESC = TagELEMDESC /* oaidl.h:726:5 */
type LPELEMDESC = uintptr   /* oaidl.h:726:14 */

type TagTYPEATTR = struct {
	Fguid             GUID
	Flcid             LCID
	FdwReserved       DWORD
	FmemidConstructor MEMBERID
	FmemidDestructor  MEMBERID
	FlpstrSchema      LPOLESTR
	FcbSizeInstance   ULONG
	Ftypekind         TYPEKIND
	FcFuncs           WORD
	FcVars            WORD
	FcImplTypes       WORD
	FcbSizeVft        WORD
	FcbAlignment      WORD
	FwTypeFlags       WORD
	FwMajorVerNum     WORD
	FwMinorVerNum     WORD
	FtdescAlias       TYPEDESC
	FidldescType      IDLDESC
} /* oaidl.h:729:9 */

type TYPEATTR = TagTYPEATTR /* oaidl.h:748:3 */
type LPTYPEATTR = uintptr   /* oaidl.h:749:28 */

type TagDISPPARAMS = struct {
	Frgvarg            uintptr
	FrgdispidNamedArgs uintptr
	FcArgs             UINT
	FcNamedArgs        UINT
} /* oaidl.h:751:9 */

type DISPPARAMS = TagDISPPARAMS /* oaidl.h:756:3 */

type TagEXCEPINFO = struct {
	FwCode             WORD
	FwReserved         WORD
	F__ccgo_pad1       [4]byte
	FbstrSource        BSTR
	FbstrDescription   BSTR
	FbstrHelpFile      BSTR
	FdwHelpContext     DWORD
	F__ccgo_pad2       [4]byte
	FpvReserved        PVOID
	FpfnDeferredFillIn uintptr
	Fscode             SCODE
	F__ccgo_pad3       [4]byte
} /* oaidl.h:771:11 */

type EXCEPINFO = TagEXCEPINFO /* oaidl.h:781:5 */
type LPEXCEPINFO = uintptr    /* oaidl.h:781:16 */

type CALLCONV = uint32 /* oaidl.h:796:3 */

type FUNCKIND = uint32 /* oaidl.h:804:3 */

type INVOKEKIND = uint32 /* oaidl.h:811:3 */

type TagFUNCDESC = struct {
	Fmemid             MEMBERID
	F__ccgo_pad1       [4]byte
	Flprgscode         uintptr
	FlprgelemdescParam uintptr
	Ffunckind          FUNCKIND
	Finvkind           INVOKEKIND
	Fcallconv          CALLCONV
	FcParams           SHORT
	FcParamsOpt        SHORT
	FoVft              SHORT
	FcScodes           SHORT
	F__ccgo_pad2       [4]byte
	FelemdescFunc      ELEMDESC
	FwFuncFlags        WORD
	F__ccgo_pad3       [6]byte
} /* oaidl.h:813:9 */

type FUNCDESC = TagFUNCDESC /* oaidl.h:826:3 */
type LPFUNCDESC = uintptr   /* oaidl.h:827:28 */

type VARKIND = uint32 /* oaidl.h:834:3 */

type TagVARDESC = struct {
	Fmemid       MEMBERID
	F__ccgo_pad1 [4]byte
	FlpstrSchema LPOLESTR
	F__16        struct {
		F__ccgo_pad1 [0]uint64
		FoInst       ULONG
		F__ccgo_pad2 [4]byte
	}
	FelemdescVar ELEMDESC
	FwVarFlags   WORD
	F__ccgo_pad2 [2]byte
	Fvarkind     VARKIND
} /* oaidl.h:845:9 */

type VARDESC = TagVARDESC /* oaidl.h:855:3 */
type LPVARDESC = uintptr  /* oaidl.h:856:27 */

type TYPEFLAGS = uint32 /* oaidl.h:874:3 */

type FUNCFLAGS = uint32 /* oaidl.h:890:3 */

type VARFLAGS = uint32 /* oaidl.h:906:3 */

type TagCLEANLOCALSTORAGE = struct {
	FpInterface  uintptr
	FpStorage    PVOID
	Fflags       DWORD
	F__ccgo_pad1 [4]byte
} /* oaidl.h:908:9 */

type CLEANLOCALSTORAGE = TagCLEANLOCALSTORAGE /* oaidl.h:912:3 */

type TagCUSTDATAITEM = struct {
	Fguid     GUID
	FvarValue VARIANTARG
} /* oaidl.h:914:9 */

type CUSTDATAITEM = TagCUSTDATAITEM /* oaidl.h:917:3 */
type LPCUSTDATAITEM = uintptr       /* oaidl.h:918:32 */

type TagCUSTDATA = struct {
	FcCustData   DWORD
	F__ccgo_pad1 [4]byte
	FprgCustData LPCUSTDATAITEM
} /* oaidl.h:920:9 */

type CUSTDATA = TagCUSTDATA /* oaidl.h:923:3 */
type LPCUSTDATA = uintptr   /* oaidl.h:924:28 */

// ****************************************************************************
//
// ICreateTypeInfo interface

type LPCREATETYPEINFO = uintptr /* oaidl.h:937:25 */
type ICreateTypeInfoVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FSetGuid              uintptr
	FSetTypeFlags         uintptr
	FSetDocString         uintptr
	FSetHelpContext       uintptr
	FSetVersion           uintptr
	FAddRefTypeInfo       uintptr
	FAddFuncDesc          uintptr
	FAddImplType          uintptr
	FSetImplTypeFlags     uintptr
	FSetAlignment         uintptr
	FSetSchema            uintptr
	FAddVarDesc           uintptr
	FSetFuncAndParamNames uintptr
	FSetVarName           uintptr
	FSetTypeDescAlias     uintptr
	FDefineFuncAsDllEntry uintptr
	FSetFuncDocString     uintptr
	FSetVarDocString      uintptr
	FSetFuncHelpContext   uintptr
	FSetVarHelpContext    uintptr
	FSetMops              uintptr
	FSetTypeIdldesc       uintptr
	FLayOut               uintptr
} /* oaidl.h:23:9 */

type ICreateTypeInfoVtbl = ICreateTypeInfoVtbl1 /* oaidl.h:1158:3 */

// ****************************************************************************
//
// ICreateTypeInfo2 interface

type LPCREATETYPEINFO2 = uintptr /* oaidl.h:1290:26 */
type ICreateTypeInfo2Vtbl1 = struct {
	FQueryInterface           uintptr
	FAddRef                   uintptr
	FRelease                  uintptr
	FSetGuid                  uintptr
	FSetTypeFlags             uintptr
	FSetDocString             uintptr
	FSetHelpContext           uintptr
	FSetVersion               uintptr
	FAddRefTypeInfo           uintptr
	FAddFuncDesc              uintptr
	FAddImplType              uintptr
	FSetImplTypeFlags         uintptr
	FSetAlignment             uintptr
	FSetSchema                uintptr
	FAddVarDesc               uintptr
	FSetFuncAndParamNames     uintptr
	FSetVarName               uintptr
	FSetTypeDescAlias         uintptr
	FDefineFuncAsDllEntry     uintptr
	FSetFuncDocString         uintptr
	FSetVarDocString          uintptr
	FSetFuncHelpContext       uintptr
	FSetVarHelpContext        uintptr
	FSetMops                  uintptr
	FSetTypeIdldesc           uintptr
	FLayOut                   uintptr
	FDeleteFuncDesc           uintptr
	FDeleteFuncDescByMemId    uintptr
	FDeleteVarDesc            uintptr
	FDeleteVarDescByMemId     uintptr
	FDeleteImplType           uintptr
	FSetCustData              uintptr
	FSetFuncCustData          uintptr
	FSetParamCustData         uintptr
	FSetVarCustData           uintptr
	FSetImplTypeCustData      uintptr
	FSetHelpStringContext     uintptr
	FSetFuncHelpStringContext uintptr
	FSetVarHelpStringContext  uintptr
	FInvalidate               uintptr
	FSetName                  uintptr
} /* oaidl.h:31:9 */

type ICreateTypeInfo2Vtbl = ICreateTypeInfo2Vtbl1 /* oaidl.h:1557:3 */

// ****************************************************************************
//
// ICreateTypeLib interface

type LPCREATETYPELIB = uintptr /* oaidl.h:1751:24 */
type ICreateTypeLibVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FCreateTypeInfo  uintptr
	FSetName         uintptr
	FSetVersion      uintptr
	FSetGuid         uintptr
	FSetDocString    uintptr
	FSetHelpFileName uintptr
	FSetHelpContext  uintptr
	FSetLcid         uintptr
	FSetLibFlags     uintptr
	FSaveAllChanges  uintptr
} /* oaidl.h:39:9 */

type ICreateTypeLibVtbl = ICreateTypeLibVtbl1 /* oaidl.h:1855:3 */

// ****************************************************************************
//
// ICreateTypeLib2 interface

type LPCREATETYPELIB2 = uintptr /* oaidl.h:1935:25 */
type ICreateTypeLib2Vtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FCreateTypeInfo       uintptr
	FSetName              uintptr
	FSetVersion           uintptr
	FSetGuid              uintptr
	FSetDocString         uintptr
	FSetHelpFileName      uintptr
	FSetHelpContext       uintptr
	FSetLcid              uintptr
	FSetLibFlags          uintptr
	FSaveAllChanges       uintptr
	FDeleteTypeInfo       uintptr
	FSetCustData          uintptr
	FSetHelpStringContext uintptr
	FSetHelpStringDll     uintptr
} /* oaidl.h:47:9 */

type ICreateTypeLib2Vtbl = ICreateTypeLib2Vtbl1 /* oaidl.h:2036:3 */

// ****************************************************************************
//
// IDispatch interface

type LPDISPATCH = uintptr /* oaidl.h:2136:19 */
type IDispatchVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* oaidl.h:55:9 */

type IDispatchVtbl = IDispatchVtbl1 /* oaidl.h:2237:3 */

// ****************************************************************************
//
// IEnumVARIANT interface

type LPENUMVARIANT = uintptr /* oaidl.h:2334:22 */
type IEnumVARIANTVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* oaidl.h:63:9 */

type IEnumVARIANTVtbl = IEnumVARIANTVtbl1 /* oaidl.h:2394:3 */

// ****************************************************************************
//
// ITypeComp interface

type LPTYPECOMP = uintptr /* oaidl.h:2470:19 */

type DESCKIND = uint32 /* oaidl.h:2479:3 */

type TagBINDPTR = struct{ Flpfuncdesc uintptr } /* oaidl.h:2481:9 */

type BINDPTR = TagBINDPTR /* oaidl.h:2485:3 */
type LPBINDPTR = uintptr  /* oaidl.h:2486:26 */
type ITypeCompVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FBind           uintptr
	FBindType       uintptr
} /* oaidl.h:71:9 */

type ITypeCompVtbl = ITypeCompVtbl1 /* oaidl.h:2545:3 */

// ****************************************************************************
//
// ITypeInfo interface

type LPTYPEINFO = uintptr /* oaidl.h:2651:19 */
type ITypeInfoVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeAttr          uintptr
	FGetTypeComp          uintptr
	FGetFuncDesc          uintptr
	FGetVarDesc           uintptr
	FGetNames             uintptr
	FGetRefTypeOfImplType uintptr
	FGetImplTypeFlags     uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	FGetDocumentation     uintptr
	FGetDllEntry          uintptr
	FGetRefTypeInfo       uintptr
	FAddressOfMember      uintptr
	FCreateInstance       uintptr
	FGetMops              uintptr
	FGetContainingTypeLib uintptr
	FReleaseTypeAttr      uintptr
	FReleaseFuncDesc      uintptr
	FReleaseVarDesc       uintptr
} /* oaidl.h:79:9 */

type ITypeInfoVtbl = ITypeInfoVtbl1 /* oaidl.h:2873:3 */

// ****************************************************************************
//
// ITypeInfo2 interface

type LPTYPEINFO2 = uintptr /* oaidl.h:3239:20 */
type ITypeInfo2Vtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FGetTypeAttr            uintptr
	FGetTypeComp            uintptr
	FGetFuncDesc            uintptr
	FGetVarDesc             uintptr
	FGetNames               uintptr
	FGetRefTypeOfImplType   uintptr
	FGetImplTypeFlags       uintptr
	FGetIDsOfNames          uintptr
	FInvoke                 uintptr
	FGetDocumentation       uintptr
	FGetDllEntry            uintptr
	FGetRefTypeInfo         uintptr
	FAddressOfMember        uintptr
	FCreateInstance         uintptr
	FGetMops                uintptr
	FGetContainingTypeLib   uintptr
	FReleaseTypeAttr        uintptr
	FReleaseFuncDesc        uintptr
	FReleaseVarDesc         uintptr
	FGetTypeKind            uintptr
	FGetTypeFlags           uintptr
	FGetFuncIndexOfMemId    uintptr
	FGetVarIndexOfMemId     uintptr
	FGetCustData            uintptr
	FGetFuncCustData        uintptr
	FGetParamCustData       uintptr
	FGetVarCustData         uintptr
	FGetImplTypeCustData    uintptr
	FGetDocumentation2      uintptr
	FGetAllCustData         uintptr
	FGetAllFuncCustData     uintptr
	FGetAllParamCustData    uintptr
	FGetAllVarCustData      uintptr
	FGetAllImplTypeCustData uintptr
} /* oaidl.h:87:9 */

type ITypeInfo2Vtbl = ITypeInfo2Vtbl1 /* oaidl.h:3524:3 */

// ****************************************************************************
//
// ITypeLib interface

type SYSKIND = uint32 /* oaidl.h:3737:3 */

type LIBFLAGS = uint32 /* oaidl.h:3744:3 */

type LPTYPELIB = uintptr /* oaidl.h:3746:18 */

type TagTLIBATTR = struct {
	Fguid         GUID
	Flcid         LCID
	Fsyskind      SYSKIND
	FwMajorVerNum WORD
	FwMinorVerNum WORD
	FwLibFlags    WORD
	F__ccgo_pad1  [2]byte
} /* oaidl.h:3748:9 */

type TLIBATTR = TagTLIBATTR /* oaidl.h:3755:3 */
type LPTLIBATTR = uintptr   /* oaidl.h:3756:28 */
type ITypeLibVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FGetTypeInfoCount  uintptr
	FGetTypeInfo       uintptr
	FGetTypeInfoType   uintptr
	FGetTypeInfoOfGuid uintptr
	FGetLibAttr        uintptr
	FGetTypeComp       uintptr
	FGetDocumentation  uintptr
	FIsName            uintptr
	FFindName          uintptr
	FReleaseTLibAttr   uintptr
} /* oaidl.h:95:9 */

type ITypeLibVtbl = ITypeLibVtbl1 /* oaidl.h:3880:3 */

// ****************************************************************************
//
// ITypeLib2 interface

type LPTYPELIB2 = uintptr /* oaidl.h:4081:19 */
type ITypeLib2Vtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FGetTypeInfoCount  uintptr
	FGetTypeInfo       uintptr
	FGetTypeInfoType   uintptr
	FGetTypeInfoOfGuid uintptr
	FGetLibAttr        uintptr
	FGetTypeComp       uintptr
	FGetDocumentation  uintptr
	FIsName            uintptr
	FFindName          uintptr
	FReleaseTLibAttr   uintptr
	FGetCustData       uintptr
	FGetLibStatistics  uintptr
	FGetDocumentation2 uintptr
	FGetAllCustData    uintptr
} /* oaidl.h:103:9 */

type ITypeLib2Vtbl = ITypeLib2Vtbl1 /* oaidl.h:4203:3 */

// ****************************************************************************
//
// ITypeChangeEvents interface

type LPTYPECHANGEEVENTS = uintptr /* oaidl.h:4346:27 */

type CHANGEKIND = uint32 /* oaidl.h:4357:3 */
type ITypeChangeEventsVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FRequestTypeChange uintptr
	FAfterTypeChange   uintptr
} /* oaidl.h:111:9 */

type ITypeChangeEventsVtbl = ITypeChangeEventsVtbl1 /* oaidl.h:4410:3 */

// ****************************************************************************
//
// IErrorInfo interface

type LPERRORINFO = uintptr /* oaidl.h:4458:20 */
type IErrorInfoVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetGUID        uintptr
	FGetSource      uintptr
	FGetDescription uintptr
	FGetHelpFile    uintptr
	FGetHelpContext uintptr
} /* oaidl.h:119:9 */

type IErrorInfoVtbl = IErrorInfoVtbl1 /* oaidl.h:4522:3 */

// ****************************************************************************
//
// ICreateErrorInfo interface

type LPCREATEERRORINFO = uintptr /* oaidl.h:4582:26 */
type ICreateErrorInfoVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetGUID        uintptr
	FSetSource      uintptr
	FSetDescription uintptr
	FSetHelpFile    uintptr
	FSetHelpContext uintptr
} /* oaidl.h:127:9 */

type ICreateErrorInfoVtbl = ICreateErrorInfoVtbl1 /* oaidl.h:4646:3 */

// ****************************************************************************
//
// ISupportErrorInfo interface

type LPSUPPORTERRORINFO = uintptr /* oaidl.h:4706:27 */
type ISupportErrorInfoVtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FInterfaceSupportsErrorInfo uintptr
} /* oaidl.h:135:9 */

type ISupportErrorInfoVtbl = ISupportErrorInfoVtbl1 /* oaidl.h:4742:3 */
type ITypeFactoryVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FCreateFromTypeInfo uintptr
} /* oaidl.h:143:9 */

type ITypeFactoryVtbl = ITypeFactoryVtbl1 /* oaidl.h:4824:3 */
type ITypeMarshalVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSize           uintptr
	FMarshal        uintptr
	FUnmarshal      uintptr
	FFree           uintptr
} /* oaidl.h:151:9 */

type ITypeMarshalVtbl = ITypeMarshalVtbl1 /* oaidl.h:4947:3 */

// ****************************************************************************
//
// IRecordInfo interface

type LPRECORDINFO = uintptr /* oaidl.h:5003:21 */
type IRecordInfoVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FRecordInit       uintptr
	FRecordClear      uintptr
	FRecordCopy       uintptr
	FGetGuid          uintptr
	FGetName          uintptr
	FGetSize          uintptr
	FGetTypeInfo      uintptr
	FGetField         uintptr
	FGetFieldNoCopy   uintptr
	FPutField         uintptr
	FPutFieldNoCopy   uintptr
	FGetFieldNames    uintptr
	FIsMatchingType   uintptr
	FRecordCreate     uintptr
	FRecordCreateCopy uintptr
	FRecordDestroy    uintptr
} /* oaidl.h:159:9 */

type IRecordInfoVtbl = IRecordInfoVtbl1 /* oaidl.h:5171:3 */

// ****************************************************************************
//
// IErrorLog interface

type LPERRORLOG = uintptr /* oaidl.h:5275:19 */
type IErrorLogVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAddError       uintptr
} /* oaidl.h:167:9 */

type IErrorLogVtbl = IErrorLogVtbl1 /* oaidl.h:5313:3 */

// ****************************************************************************
//
// IPropertyBag interface

type LPPROPERTYBAG = uintptr /* oaidl.h:5357:22 */
type IPropertyBagVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FRead           uintptr
	FWrite          uintptr
} /* oaidl.h:175:9 */

type IPropertyBagVtbl = IPropertyBagVtbl1 /* oaidl.h:5406:3 */

// End additional prototypes

type IXMLDOMImplementation1 = struct{ FlpVtbl uintptr } /* msxml.h:35:9 */

// End additional prototypes

type IXMLDOMImplementation = IXMLDOMImplementation1 /* msxml.h:35:38 */

type IXMLDOMNode1 = struct{ FlpVtbl uintptr } /* msxml.h:40:9 */

type IXMLDOMNode = IXMLDOMNode1 /* msxml.h:40:28 */

type IXMLDOMDocumentFragment1 = struct{ FlpVtbl uintptr } /* msxml.h:45:9 */

type IXMLDOMDocumentFragment = IXMLDOMDocumentFragment1 /* msxml.h:45:40 */

type IXMLDOMDocument1 = struct{ FlpVtbl uintptr } /* msxml.h:50:9 */

type IXMLDOMDocument = IXMLDOMDocument1 /* msxml.h:50:32 */

type IXMLDOMNodeList1 = struct{ FlpVtbl uintptr } /* msxml.h:55:9 */

type IXMLDOMNodeList = IXMLDOMNodeList1 /* msxml.h:55:32 */

type IXMLDOMNamedNodeMap1 = struct{ FlpVtbl uintptr } /* msxml.h:60:9 */

type IXMLDOMNamedNodeMap = IXMLDOMNamedNodeMap1 /* msxml.h:60:36 */

type IXMLDOMCharacterData1 = struct{ FlpVtbl uintptr } /* msxml.h:65:9 */

type IXMLDOMCharacterData = IXMLDOMCharacterData1 /* msxml.h:65:37 */

type IXMLDOMAttribute1 = struct{ FlpVtbl uintptr } /* msxml.h:70:9 */

type IXMLDOMAttribute = IXMLDOMAttribute1 /* msxml.h:70:33 */

type IXMLDOMElement1 = struct{ FlpVtbl uintptr } /* msxml.h:75:9 */

type IXMLDOMElement = IXMLDOMElement1 /* msxml.h:75:31 */

type IXMLDOMText1 = struct{ FlpVtbl uintptr } /* msxml.h:80:9 */

type IXMLDOMText = IXMLDOMText1 /* msxml.h:80:28 */

type IXMLDOMComment1 = struct{ FlpVtbl uintptr } /* msxml.h:85:9 */

type IXMLDOMComment = IXMLDOMComment1 /* msxml.h:85:31 */

type IXMLDOMProcessingInstruction1 = struct{ FlpVtbl uintptr } /* msxml.h:90:9 */

type IXMLDOMProcessingInstruction = IXMLDOMProcessingInstruction1 /* msxml.h:90:45 */

type IXMLDOMCDATASection1 = struct{ FlpVtbl uintptr } /* msxml.h:95:9 */

type IXMLDOMCDATASection = IXMLDOMCDATASection1 /* msxml.h:95:36 */

type IXMLDOMDocumentType1 = struct{ FlpVtbl uintptr } /* msxml.h:100:9 */

type IXMLDOMDocumentType = IXMLDOMDocumentType1 /* msxml.h:100:36 */

type IXMLDOMNotation1 = struct{ FlpVtbl uintptr } /* msxml.h:105:9 */

type IXMLDOMNotation = IXMLDOMNotation1 /* msxml.h:105:32 */

type IXMLDOMEntity1 = struct{ FlpVtbl uintptr } /* msxml.h:110:9 */

type IXMLDOMEntity = IXMLDOMEntity1 /* msxml.h:110:30 */

type IXMLDOMEntityReference1 = struct{ FlpVtbl uintptr } /* msxml.h:115:9 */

type IXMLDOMEntityReference = IXMLDOMEntityReference1 /* msxml.h:115:39 */

type IXMLDOMParseError1 = struct{ FlpVtbl uintptr } /* msxml.h:120:9 */

type IXMLDOMParseError = IXMLDOMParseError1 /* msxml.h:120:34 */

type IXTLRuntime1 = struct{ FlpVtbl uintptr } /* msxml.h:125:9 */

type IXTLRuntime = IXTLRuntime1 /* msxml.h:125:28 */

type XMLDOMDocumentEvents1 = struct{ FlpVtbl uintptr } /* msxml.h:130:9 */

type XMLDOMDocumentEvents = XMLDOMDocumentEvents1 /* msxml.h:130:37 */

type IXMLHttpRequest1 = struct{ FlpVtbl uintptr } /* msxml.h:153:9 */

type IXMLHttpRequest = IXMLHttpRequest1 /* msxml.h:153:32 */

type IXMLDSOControl1 = struct{ FlpVtbl uintptr } /* msxml.h:167:9 */

type IXMLDSOControl = IXMLDSOControl1 /* msxml.h:167:31 */

type IXMLElementCollection1 = struct{ FlpVtbl uintptr } /* msxml.h:181:9 */

type IXMLElementCollection = IXMLElementCollection1 /* msxml.h:181:38 */

type IXMLDocument1 = struct{ FlpVtbl uintptr } /* msxml.h:186:9 */

type IXMLDocument = IXMLDocument1 /* msxml.h:186:29 */

type IXMLDocument21 = struct{ FlpVtbl uintptr } /* msxml.h:191:9 */

type IXMLDocument2 = IXMLDocument21 /* msxml.h:191:30 */

type IXMLElement1 = struct{ FlpVtbl uintptr } /* msxml.h:196:9 */

type IXMLElement = IXMLElement1 /* msxml.h:196:28 */

type IXMLElement21 = struct{ FlpVtbl uintptr } /* msxml.h:201:9 */

type IXMLElement2 = IXMLElement21 /* msxml.h:201:29 */

type IXMLAttribute1 = struct{ FlpVtbl uintptr } /* msxml.h:206:9 */

type IXMLAttribute = IXMLAttribute1 /* msxml.h:206:30 */

type IXMLError1 = struct{ FlpVtbl uintptr } /* msxml.h:211:9 */

type IXMLError = IXMLError1 /* msxml.h:211:26 */

type X_xml_error = struct {
	F_nLine       uint32
	F__ccgo_pad1  [4]byte
	F_pchBuf      BSTR
	F_cchBuf      uint32
	F_ich         uint32
	F_pszFound    BSTR
	F_pszExpected BSTR
	F_reserved1   DWORD
	F_reserved2   DWORD
} /* msxml.h:225:11 */

type XML_ERROR = X_xml_error /* msxml.h:234:5 */

type DOMNodeType = uint32 /* msxml.h:246:5 */

type XMLELEM_TYPE = uint32 /* msxml.h:251:5 */
type IXMLDOMImplementationVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	FhasFeature       uintptr
} /* msxml.h:35:9 */

type IXMLDOMImplementationVtbl = IXMLDOMImplementationVtbl1 /* msxml.h:275:5 */
type IXMLDOMNodeVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
} /* msxml.h:40:9 */

type IXMLDOMNodeVtbl = IXMLDOMNodeVtbl1 /* msxml.h:384:5 */
type IXMLDOMDocumentFragmentVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
} /* msxml.h:45:9 */

type IXMLDOMDocumentFragmentVtbl = IXMLDOMDocumentFragmentVtbl1 /* msxml.h:561:5 */
type IXMLDOMDocumentVtbl1 = struct {
	FQueryInterface              uintptr
	FAddRef                      uintptr
	FRelease                     uintptr
	FGetTypeInfoCount            uintptr
	FGetTypeInfo                 uintptr
	FGetIDsOfNames               uintptr
	FInvoke                      uintptr
	Fget_nodeName                uintptr
	Fget_nodeValue               uintptr
	Fput_nodeValue               uintptr
	Fget_nodeType                uintptr
	Fget_parentNode              uintptr
	Fget_childNodes              uintptr
	Fget_firstChild              uintptr
	Fget_lastChild               uintptr
	Fget_previousSibling         uintptr
	Fget_nextSibling             uintptr
	Fget_attributes              uintptr
	FinsertBefore                uintptr
	FreplaceChild                uintptr
	FremoveChild                 uintptr
	FappendChild                 uintptr
	FhasChildNodes               uintptr
	Fget_ownerDocument           uintptr
	FcloneNode                   uintptr
	Fget_nodeTypeString          uintptr
	Fget_text                    uintptr
	Fput_text                    uintptr
	Fget_specified               uintptr
	Fget_definition              uintptr
	Fget_nodeTypedValue          uintptr
	Fput_nodeTypedValue          uintptr
	Fget_dataType                uintptr
	Fput_dataType                uintptr
	Fget_xml                     uintptr
	FtransformNode               uintptr
	FselectNodes                 uintptr
	FselectSingleNode            uintptr
	Fget_parsed                  uintptr
	Fget_namespaceURI            uintptr
	Fget_prefix                  uintptr
	Fget_baseName                uintptr
	FtransformNodeToObject       uintptr
	Fget_doctype                 uintptr
	Fget_implementation          uintptr
	Fget_documentElement         uintptr
	Fputref_documentElement      uintptr
	FcreateElement               uintptr
	FcreateDocumentFragment      uintptr
	FcreateTextNode              uintptr
	FcreateComment               uintptr
	FcreateCDATASection          uintptr
	FcreateProcessingInstruction uintptr
	FcreateAttribute             uintptr
	FcreateEntityReference       uintptr
	FgetElementsByTagName        uintptr
	FcreateNode                  uintptr
	FnodeFromID                  uintptr
	Fload                        uintptr
	Fget_readyState              uintptr
	Fget_parseError              uintptr
	Fget_url                     uintptr
	Fget_async                   uintptr
	Fput_async                   uintptr
	Fabort                       uintptr
	FloadXML                     uintptr
	Fsave                        uintptr
	Fget_validateOnParse         uintptr
	Fput_validateOnParse         uintptr
	Fget_resolveExternals        uintptr
	Fput_resolveExternals        uintptr
	Fget_preserveWhiteSpace      uintptr
	Fput_preserveWhiteSpace      uintptr
	Fput_onreadystatechange      uintptr
	Fput_ondataavailable         uintptr
	Fput_ontransformnode         uintptr
} /* msxml.h:50:9 */

type IXMLDOMDocumentVtbl = IXMLDOMDocumentVtbl1 /* msxml.h:733:5 */
type IXMLDOMNodeListVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_item         uintptr
	Fget_length       uintptr
	FnextNode         uintptr
	Freset            uintptr
	Fget__newEnum     uintptr
} /* msxml.h:55:9 */

type IXMLDOMNodeListVtbl = IXMLDOMNodeListVtbl1 /* msxml.h:912:5 */
type IXMLDOMNamedNodeMapVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetTypeInfoCount    uintptr
	FGetTypeInfo         uintptr
	FGetIDsOfNames       uintptr
	FInvoke              uintptr
	FgetNamedItem        uintptr
	FsetNamedItem        uintptr
	FremoveNamedItem     uintptr
	Fget_item            uintptr
	Fget_length          uintptr
	FgetQualifiedItem    uintptr
	FremoveQualifiedItem uintptr
	FnextNode            uintptr
	Freset               uintptr
	Fget__newEnum        uintptr
} /* msxml.h:60:9 */

type IXMLDOMNamedNodeMapVtbl = IXMLDOMNamedNodeMapVtbl1 /* msxml.h:981:5 */
type IXMLDOMCharacterDataVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_data              uintptr
	Fput_data              uintptr
	Fget_length            uintptr
	FsubstringData         uintptr
	FappendData            uintptr
	FinsertData            uintptr
	FdeleteData            uintptr
	FreplaceData           uintptr
} /* msxml.h:65:9 */

type IXMLDOMCharacterDataVtbl = IXMLDOMCharacterDataVtbl1 /* msxml.h:1097:5 */
type IXMLDOMAttributeVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_name              uintptr
	Fget_value             uintptr
	Fput_value             uintptr
} /* msxml.h:70:9 */

type IXMLDOMAttributeVtbl = IXMLDOMAttributeVtbl1 /* msxml.h:1233:5 */
type IXMLDOMElementVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_tagName           uintptr
	FgetAttribute          uintptr
	FsetAttribute          uintptr
	FremoveAttribute       uintptr
	FgetAttributeNode      uintptr
	FsetAttributeNode      uintptr
	FremoveAttributeNode   uintptr
	FgetElementsByTagName  uintptr
	Fnormalize             uintptr
} /* msxml.h:75:9 */

type IXMLDOMElementVtbl = IXMLDOMElementVtbl1 /* msxml.h:1366:5 */
type IXMLDOMTextVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_data              uintptr
	Fput_data              uintptr
	Fget_length            uintptr
	FsubstringData         uintptr
	FappendData            uintptr
	FinsertData            uintptr
	FdeleteData            uintptr
	FreplaceData           uintptr
	FsplitText             uintptr
} /* msxml.h:80:9 */

type IXMLDOMTextVtbl = IXMLDOMTextVtbl1 /* msxml.h:1509:5 */
type IXMLDOMCommentVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_data              uintptr
	Fput_data              uintptr
	Fget_length            uintptr
	FsubstringData         uintptr
	FappendData            uintptr
	FinsertData            uintptr
	FdeleteData            uintptr
	FreplaceData           uintptr
} /* msxml.h:85:9 */

type IXMLDOMCommentVtbl = IXMLDOMCommentVtbl1 /* msxml.h:1633:5 */
type IXMLDOMProcessingInstructionVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_target            uintptr
	Fget_data              uintptr
	Fput_data              uintptr
} /* msxml.h:90:9 */

type IXMLDOMProcessingInstructionVtbl = IXMLDOMProcessingInstructionVtbl1 /* msxml.h:1753:5 */
type IXMLDOMCDATASectionVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_data              uintptr
	Fput_data              uintptr
	Fget_length            uintptr
	FsubstringData         uintptr
	FappendData            uintptr
	FinsertData            uintptr
	FdeleteData            uintptr
	FreplaceData           uintptr
	FsplitText             uintptr
} /* msxml.h:95:9 */

type IXMLDOMCDATASectionVtbl = IXMLDOMCDATASectionVtbl1 /* msxml.h:1876:5 */
type IXMLDOMDocumentTypeVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_name              uintptr
	Fget_entities          uintptr
	Fget_notations         uintptr
} /* msxml.h:100:9 */

type IXMLDOMDocumentTypeVtbl = IXMLDOMDocumentTypeVtbl1 /* msxml.h:1997:5 */
type IXMLDOMNotationVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_publicId          uintptr
	Fget_systemId          uintptr
} /* msxml.h:105:9 */

type IXMLDOMNotationVtbl = IXMLDOMNotationVtbl1 /* msxml.h:2116:5 */
type IXMLDOMEntityVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	Fget_publicId          uintptr
	Fget_systemId          uintptr
	Fget_notationName      uintptr
} /* msxml.h:110:9 */

type IXMLDOMEntityVtbl = IXMLDOMEntityVtbl1 /* msxml.h:2234:5 */
type IXMLDOMEntityReferenceVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
} /* msxml.h:115:9 */

type IXMLDOMEntityReferenceVtbl = IXMLDOMEntityReferenceVtbl1 /* msxml.h:2348:5 */
type IXMLDOMParseErrorVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_errorCode    uintptr
	Fget_url          uintptr
	Fget_reason       uintptr
	Fget_srcText      uintptr
	Fget_line         uintptr
	Fget_linepos      uintptr
	Fget_filepos      uintptr
} /* msxml.h:120:9 */

type IXMLDOMParseErrorVtbl = IXMLDOMParseErrorVtbl1 /* msxml.h:2432:5 */
type IXTLRuntimeVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_nodeName          uintptr
	Fget_nodeValue         uintptr
	Fput_nodeValue         uintptr
	Fget_nodeType          uintptr
	Fget_parentNode        uintptr
	Fget_childNodes        uintptr
	Fget_firstChild        uintptr
	Fget_lastChild         uintptr
	Fget_previousSibling   uintptr
	Fget_nextSibling       uintptr
	Fget_attributes        uintptr
	FinsertBefore          uintptr
	FreplaceChild          uintptr
	FremoveChild           uintptr
	FappendChild           uintptr
	FhasChildNodes         uintptr
	Fget_ownerDocument     uintptr
	FcloneNode             uintptr
	Fget_nodeTypeString    uintptr
	Fget_text              uintptr
	Fput_text              uintptr
	Fget_specified         uintptr
	Fget_definition        uintptr
	Fget_nodeTypedValue    uintptr
	Fput_nodeTypedValue    uintptr
	Fget_dataType          uintptr
	Fput_dataType          uintptr
	Fget_xml               uintptr
	FtransformNode         uintptr
	FselectNodes           uintptr
	FselectSingleNode      uintptr
	Fget_parsed            uintptr
	Fget_namespaceURI      uintptr
	Fget_prefix            uintptr
	Fget_baseName          uintptr
	FtransformNodeToObject uintptr
	FuniqueID              uintptr
	Fdepth                 uintptr
	FchildNumber           uintptr
	FancestorChildNumber   uintptr
	FabsoluteChildNumber   uintptr
	FformatIndex           uintptr
	FformatNumber          uintptr
	FformatDate            uintptr
	FformatTime            uintptr
} /* msxml.h:125:9 */

type IXTLRuntimeVtbl = IXTLRuntimeVtbl1 /* msxml.h:2541:5 */
type XMLDOMDocumentEventsVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* msxml.h:130:9 */

type XMLDOMDocumentEventsVtbl = XMLDOMDocumentEventsVtbl1 /* msxml.h:2637:5 */
type IXMLHttpRequestVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FGetTypeInfoCount       uintptr
	FGetTypeInfo            uintptr
	FGetIDsOfNames          uintptr
	FInvoke                 uintptr
	Fopen                   uintptr
	FsetRequestHeader       uintptr
	FgetResponseHeader      uintptr
	FgetAllResponseHeaders  uintptr
	Fsend                   uintptr
	Fabort                  uintptr
	Fget_status             uintptr
	Fget_statusText         uintptr
	Fget_responseXML        uintptr
	Fget_responseText       uintptr
	Fget_responseBody       uintptr
	Fget_responseStream     uintptr
	Fget_readyState         uintptr
	Fput_onreadystatechange uintptr
} /* msxml.h:153:9 */

type IXMLHttpRequestVtbl = IXMLHttpRequestVtbl1 /* msxml.h:2708:5 */
type IXMLDSOControlVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	Fget_XMLDocument       uintptr
	Fput_XMLDocument       uintptr
	Fget_JavaDSOCompatible uintptr
	Fput_JavaDSOCompatible uintptr
	Fget_readyState        uintptr
} /* msxml.h:167:9 */

type IXMLDSOControlVtbl = IXMLDSOControlVtbl1 /* msxml.h:2799:5 */
type IXMLElementCollectionVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fput_length       uintptr
	Fget_length       uintptr
	Fget__newEnum     uintptr
	Fitem             uintptr
} /* msxml.h:181:9 */

type IXMLElementCollectionVtbl = IXMLElementCollectionVtbl1 /* msxml.h:2861:5 */
type IXMLDocumentVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeInfoCount     uintptr
	FGetTypeInfo          uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	Fget_root             uintptr
	Fget_fileSize         uintptr
	Fget_fileModifiedDate uintptr
	Fget_fileUpdatedDate  uintptr
	Fget_URL              uintptr
	Fput_URL              uintptr
	Fget_mimeType         uintptr
	Fget_readyState       uintptr
	Fget_charset          uintptr
	Fput_charset          uintptr
	Fget_version          uintptr
	Fget_doctype          uintptr
	Fget_dtdURL           uintptr
	FcreateElement        uintptr
} /* msxml.h:186:9 */

type IXMLDocumentVtbl = IXMLDocumentVtbl1 /* msxml.h:2935:5 */
type IXMLDocument2Vtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeInfoCount     uintptr
	FGetTypeInfo          uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	Fget_root             uintptr
	Fget_fileSize         uintptr
	Fget_fileModifiedDate uintptr
	Fget_fileUpdatedDate  uintptr
	Fget_URL              uintptr
	Fput_URL              uintptr
	Fget_mimeType         uintptr
	Fget_readyState       uintptr
	Fget_charset          uintptr
	Fput_charset          uintptr
	Fget_version          uintptr
	Fget_doctype          uintptr
	Fget_dtdURL           uintptr
	FcreateElement        uintptr
	Fget_async            uintptr
	Fput_async            uintptr
} /* msxml.h:191:9 */

type IXMLDocument2Vtbl = IXMLDocument2Vtbl1 /* msxml.h:3043:5 */
type IXMLElementVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_tagName      uintptr
	Fput_tagName      uintptr
	Fget_parent       uintptr
	FsetAttribute     uintptr
	FgetAttribute     uintptr
	FremoveAttribute  uintptr
	Fget_children     uintptr
	Fget_type         uintptr
	Fget_text         uintptr
	Fput_text         uintptr
	FaddChild         uintptr
	FremoveChild      uintptr
} /* msxml.h:196:9 */

type IXMLElementVtbl = IXMLElementVtbl1 /* msxml.h:3149:5 */
type IXMLElement2Vtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_tagName      uintptr
	Fput_tagName      uintptr
	Fget_parent       uintptr
	FsetAttribute     uintptr
	FgetAttribute     uintptr
	FremoveAttribute  uintptr
	Fget_children     uintptr
	Fget_type         uintptr
	Fget_text         uintptr
	Fput_text         uintptr
	FaddChild         uintptr
	FremoveChild      uintptr
	Fget_attributes   uintptr
} /* msxml.h:201:9 */

type IXMLElement2Vtbl = IXMLElement2Vtbl1 /* msxml.h:3245:5 */
type IXMLAttributeVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_name         uintptr
	Fget_value        uintptr
} /* msxml.h:206:9 */

type IXMLAttributeVtbl = IXMLAttributeVtbl1 /* msxml.h:3322:5 */
type IXMLErrorVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetErrorInfo   uintptr
} /* msxml.h:211:9 */

type IXMLErrorVtbl = IXMLErrorVtbl1 /* msxml.h:3360:5 */

// ****************************************************************************
//
// IPersistMoniker interface

type LPPERSISTMONIKER = uintptr /* urlmon.h:795:25 */
type IPersistMonikerVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FIsDirty        uintptr
	FLoad           uintptr
	FSave           uintptr
	FSaveCompleted  uintptr
	FGetCurMoniker  uintptr
} /* urlmon.h:23:9 */

type IPersistMonikerVtbl = IPersistMonikerVtbl1 /* urlmon.h:877:3 */

// ****************************************************************************
//
// IMonikerProp interface

type LPMONIKERPROP = uintptr /* urlmon.h:944:22 */

type MONIKERPROPERTY = uint32 /* urlmon.h:952:3 */
type IMonikerPropVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FPutProperty    uintptr
} /* urlmon.h:31:9 */

type IMonikerPropVtbl = IMonikerPropVtbl1 /* urlmon.h:990:3 */

// ****************************************************************************
//
// IBindProtocol interface

type LPBINDPROTOCOL = uintptr /* urlmon.h:1038:23 */
type IBindProtocolVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCreateBinding  uintptr
} /* urlmon.h:39:9 */

type IBindProtocolVtbl = IBindProtocolVtbl1 /* urlmon.h:1078:3 */

// ****************************************************************************
//
// IBinding interface

type LPBINDING = uintptr /* urlmon.h:1126:18 */
type IBindingVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAbort          uintptr
	FSuspend        uintptr
	FResume         uintptr
	FSetPriority    uintptr
	FGetPriority    uintptr
	FGetBindResult  uintptr
} /* urlmon.h:47:9 */

type IBindingVtbl = IBindingVtbl1 /* urlmon.h:1200:3 */

// ****************************************************************************
//
// IBindStatusCallback interface

type LPBINDSTATUSCALLBACK = uintptr /* urlmon.h:1293:29 */

type BINDVERB = uint32 /* urlmon.h:1301:3 */

type BINDINFOF = uint32 /* urlmon.h:1306:3 */

type BINDF = uint32 /* urlmon.h:1340:3 */

type URL_ENCODING = uint32 /* urlmon.h:1346:3 */

type X_tagBINDINFO = struct {
	FcbSize             ULONG
	F__ccgo_pad1        [4]byte
	FszExtraInfo        LPWSTR
	FstgmedData         STGMEDIUM
	FgrfBindInfoF       DWORD
	FdwBindVerb         DWORD
	FszCustomVerb       LPWSTR
	FcbstgmedData       DWORD
	FdwOptions          DWORD
	FdwOptionsFlags     DWORD
	FdwCodePage         DWORD
	FsecurityAttributes SECURITY_ATTRIBUTES
	Fiid                IID
	FpUnk               uintptr
	FdwReserved         DWORD
	F__ccgo_pad2        [4]byte
} /* urlmon.h:1348:9 */

type BINDINFO = X_tagBINDINFO /* urlmon.h:1363:3 */

type X_REMSECURITY_ATTRIBUTES = struct {
	FnLength              DWORD
	FlpSecurityDescriptor DWORD
	FbInheritHandle       WINBOOL
} /* urlmon.h:1365:9 */

type REMSECURITY_ATTRIBUTES = X_REMSECURITY_ATTRIBUTES /* urlmon.h:1369:3 */
type PREMSECURITY_ATTRIBUTES = uintptr                 /* urlmon.h:1370:40 */
type LPREMSECURITY_ATTRIBUTES = uintptr                /* urlmon.h:1371:40 */

type X_tagRemBINDINFO = struct {
	FcbSize             ULONG
	F__ccgo_pad1        [4]byte
	FszExtraInfo        LPWSTR
	FgrfBindInfoF       DWORD
	FdwBindVerb         DWORD
	FszCustomVerb       LPWSTR
	FcbstgmedData       DWORD
	FdwOptions          DWORD
	FdwOptionsFlags     DWORD
	FdwCodePage         DWORD
	FsecurityAttributes REMSECURITY_ATTRIBUTES
	Fiid                IID
	F__ccgo_pad2        [4]byte
	FpUnk               uintptr
	FdwReserved         DWORD
	F__ccgo_pad3        [4]byte
} /* urlmon.h:1373:9 */

type RemBINDINFO = X_tagRemBINDINFO /* urlmon.h:1387:3 */

type TagRemFORMATETC = struct {
	FcfFormat DWORD
	Fptd      DWORD
	FdwAspect DWORD
	Flindex   LONG
	Ftymed    DWORD
} /* urlmon.h:1389:9 */

type RemFORMATETC = TagRemFORMATETC /* urlmon.h:1395:3 */
type LPREMFORMATETC = uintptr       /* urlmon.h:1396:32 */

type BINDINFO_OPTIONS = int32 /* urlmon.h:1414:3 */

type BSCF = uint32 /* urlmon.h:1424:3 */

type BINDSTATUS = uint32 /* urlmon.h:1495:3 */
type IBindStatusCallbackVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FOnStartBinding    uintptr
	FGetPriority       uintptr
	FOnLowResource     uintptr
	FOnProgress        uintptr
	FOnStopBinding     uintptr
	FGetBindInfo       uintptr
	FOnDataAvailable   uintptr
	FOnObjectAvailable uintptr
} /* urlmon.h:55:9 */

type IBindStatusCallbackVtbl = IBindStatusCallbackVtbl1 /* urlmon.h:1600:3 */

// ****************************************************************************
//
// IBindStatusCallbackEx interface

type LPBINDSTATUSCALLBACKEX = uintptr /* urlmon.h:1720:31 */

type BINDF2 = uint32 /* urlmon.h:1746:3 */
type IBindStatusCallbackExVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FOnStartBinding    uintptr
	FGetPriority       uintptr
	FOnLowResource     uintptr
	FOnProgress        uintptr
	FOnStopBinding     uintptr
	FGetBindInfo       uintptr
	FOnDataAvailable   uintptr
	FOnObjectAvailable uintptr
	FGetBindInfoEx     uintptr
} /* urlmon.h:63:9 */

type IBindStatusCallbackExVtbl = IBindStatusCallbackExVtbl1 /* urlmon.h:1831:3 */

// ****************************************************************************
//
// IAuthenticate interface

type LPAUTHENTICATION = uintptr /* urlmon.h:1938:23 */
type IAuthenticateVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAuthenticate   uintptr
} /* urlmon.h:71:9 */

type IAuthenticateVtbl = IAuthenticateVtbl1 /* urlmon.h:1978:3 */

// ****************************************************************************
//
// IAuthenticateEx interface

type LPAUTHENTICATIONEX = uintptr /* urlmon.h:2026:25 */

type AUTHENTICATEF = uint32 /* urlmon.h:2032:3 */

type X_tagAUTHENTICATEINFO = struct {
	FdwFlags    DWORD
	FdwReserved DWORD
} /* urlmon.h:2034:9 */

type AUTHENTICATEINFO = X_tagAUTHENTICATEINFO /* urlmon.h:2037:3 */
type IAuthenticateExVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAuthenticate   uintptr
	FAuthenticateEx uintptr
} /* urlmon.h:79:9 */

type IAuthenticateExVtbl = IAuthenticateExVtbl1 /* urlmon.h:2086:3 */

// ****************************************************************************
//
// IHttpNegotiate interface

type LPHTTPNEGOTIATE = uintptr /* urlmon.h:2140:24 */
type IHttpNegotiateVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FBeginningTransaction uintptr
	FOnResponse           uintptr
} /* urlmon.h:87:9 */

type IHttpNegotiateVtbl = IHttpNegotiateVtbl1 /* urlmon.h:2195:3 */

// ****************************************************************************
//
// IHttpNegotiate2 interface

type LPHTTPNEGOTIATE2 = uintptr /* urlmon.h:2247:25 */
type IHttpNegotiate2Vtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FBeginningTransaction uintptr
	FOnResponse           uintptr
	FGetRootSecurityId    uintptr
} /* urlmon.h:95:9 */

type IHttpNegotiate2Vtbl = IHttpNegotiate2Vtbl1 /* urlmon.h:2302:3 */

// ****************************************************************************
//
// IHttpNegotiate3 interface

type LPHTTPNEGOTIATE3 = uintptr /* urlmon.h:2360:25 */
type IHttpNegotiate3Vtbl1 = struct {
	FQueryInterface                 uintptr
	FAddRef                         uintptr
	FRelease                        uintptr
	FBeginningTransaction           uintptr
	FOnResponse                     uintptr
	FGetRootSecurityId              uintptr
	FGetSerializedClientCertContext uintptr
} /* urlmon.h:103:9 */

type IHttpNegotiate3Vtbl = IHttpNegotiate3Vtbl1 /* urlmon.h:2420:3 */

// ****************************************************************************
//
// IWinInetFileStream interface

type LPWININETFILESTREAM = uintptr /* urlmon.h:2484:28 */
type IWinInetFileStreamVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FSetHandleForUnlock uintptr
	FSetDeleteFile      uintptr
} /* urlmon.h:111:9 */

type IWinInetFileStreamVtbl = IWinInetFileStreamVtbl1 /* urlmon.h:2529:3 */

// ****************************************************************************
//
// IWindowForBindingUI interface

type LPWINDOWFORBINDINGUI = uintptr /* urlmon.h:2581:29 */
type IWindowForBindingUIVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetWindow      uintptr
} /* urlmon.h:119:9 */

type IWindowForBindingUIVtbl = IWindowForBindingUIVtbl1 /* urlmon.h:2619:3 */

// ****************************************************************************
//
// ICodeInstall interface

type LPCODEINSTALL = uintptr /* urlmon.h:2667:22 */

type CIP_STATUS = uint32 /* urlmon.h:2680:3 */
type ICodeInstallVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FOnCodeInstallProblem uintptr
} /* urlmon.h:127:9 */

type ICodeInstallVtbl = ICodeInstallVtbl1 /* urlmon.h:2728:3 */

// ****************************************************************************
//
// IWinInetInfo interface

type LPWININETINFO = uintptr /* urlmon.h:3783:22 */
type IWinInetInfoVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FQueryOption    uintptr
} /* urlmon.h:167:9 */

type IWinInetInfoVtbl = IWinInetInfoVtbl1 /* urlmon.h:3822:3 */

// ****************************************************************************
//
// IHttpSecurity interface

type LPHTTPSECURITY = uintptr /* urlmon.h:3892:23 */
type IHttpSecurityVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FGetWindow         uintptr
	FOnSecurityProblem uintptr
} /* urlmon.h:175:9 */

type IHttpSecurityVtbl = IHttpSecurityVtbl1 /* urlmon.h:3934:3 */

// ****************************************************************************
//
// IWinInetHttpInfo interface

type LPWININETHTTPINFO = uintptr /* urlmon.h:3988:26 */
type IWinInetHttpInfoVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FQueryOption    uintptr
	FQueryInfo      uintptr
} /* urlmon.h:183:9 */

type IWinInetHttpInfoVtbl = IWinInetHttpInfoVtbl1 /* urlmon.h:4039:3 */
type IWinInetHttpTimeoutsVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FGetRequestTimeouts uintptr
} /* urlmon.h:191:9 */

type IWinInetHttpTimeoutsVtbl = IWinInetHttpTimeoutsVtbl1 /* urlmon.h:4156:3 */

// ****************************************************************************
//
// IBindHost interface

type LPBINDHOST = uintptr /* urlmon.h:4412:19 */
type IBindHostVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FCreateMoniker        uintptr
	FMonikerBindToStorage uintptr
	FMonikerBindToObject  uintptr
} /* urlmon.h:215:9 */

type IBindHostVtbl = IBindHostVtbl1 /* urlmon.h:4484:3 */

// ****************************************************************************
//
// IInternet interface

type LPIINTERNET = uintptr /* urlmon.h:4703:19 */
type IInternetVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
} /* urlmon.h:223:9 */

type IInternetVtbl = IInternetVtbl1 /* urlmon.h:4730:3 */

// ****************************************************************************
//
// IInternetBindInfo interface

type LPIINTERNETBINDINFO = uintptr /* urlmon.h:4772:27 */

type BINDSTRING = uint32 /* urlmon.h:4798:3 */
type IInternetBindInfoVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetBindInfo    uintptr
	FGetBindString  uintptr
} /* urlmon.h:231:9 */

type IInternetBindInfoVtbl = IInternetBindInfoVtbl1 /* urlmon.h:4849:3 */

// ****************************************************************************
//
// IInternetBindInfoEx interface

type LPIINTERNETBINDINFOEX = uintptr /* urlmon.h:4901:29 */
type IInternetBindInfoExVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetBindInfo    uintptr
	FGetBindString  uintptr
	FGetBindInfoEx  uintptr
} /* urlmon.h:239:9 */

type IInternetBindInfoExVtbl = IInternetBindInfoExVtbl1 /* urlmon.h:4956:3 */

// ****************************************************************************
//
// IInternetProtocolRoot interface

type LPIINTERNETPROTOCOLROOT = uintptr /* urlmon.h:5014:31 */

type PI_FLAGS = uint32 /* urlmon.h:5032:3 */
type X_tagPROTOCOLDATA = struct {
	FgrfFlags    DWORD
	FdwState     DWORD
	FpData       LPVOID
	FcbData      ULONG
	F__ccgo_pad1 [4]byte
} /* urlmon.h:5033:9 */

type PROTOCOLDATA = X_tagPROTOCOLDATA /* urlmon.h:5038:3 */

type X_tagStartParam = struct {
	Fiid       IID
	FpIBindCtx uintptr
	FpItf      uintptr
} /* urlmon.h:5040:9 */

type StartParam = X_tagStartParam /* urlmon.h:5044:3 */
type IInternetProtocolRootVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FStart          uintptr
	FContinue       uintptr
	FAbort          uintptr
	FTerminate      uintptr
	FSuspend        uintptr
	FResume         uintptr
} /* urlmon.h:247:9 */

type IInternetProtocolRootVtbl = IInternetProtocolRootVtbl1 /* urlmon.h:5123:3 */

// ****************************************************************************
//
// IInternetProtocol interface

type LPIINTERNETPROTOCOL = uintptr /* urlmon.h:5191:27 */
type IInternetProtocolVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FStart          uintptr
	FContinue       uintptr
	FAbort          uintptr
	FTerminate      uintptr
	FSuspend        uintptr
	FResume         uintptr
	FRead           uintptr
	FSeek           uintptr
	FLockRequest    uintptr
	FUnlockRequest  uintptr
} /* urlmon.h:255:9 */

type IInternetProtocolVtbl = IInternetProtocolVtbl1 /* urlmon.h:5283:3 */

// ****************************************************************************
//
// IInternetProtocolSink interface

type LPIINTERNETPROTOCOLSINK = uintptr /* urlmon.h:5552:31 */
type IInternetProtocolSinkVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSwitch         uintptr
	FReportProgress uintptr
	FReportData     uintptr
	FReportResult   uintptr
} /* urlmon.h:271:9 */

type IInternetProtocolSinkVtbl = IInternetProtocolSinkVtbl1 /* urlmon.h:5619:3 */

// ****************************************************************************
//
// IInternetProtocolSinkStackable interface

type LPIINTERNETPROTOCOLSINKStackable = uintptr /* urlmon.h:5679:40 */
type IInternetProtocolSinkStackableVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSwitchSink     uintptr
	FCommitSwitch   uintptr
	FRollbackSwitch uintptr
} /* urlmon.h:279:9 */

type IInternetProtocolSinkStackableVtbl = IInternetProtocolSinkStackableVtbl1 /* urlmon.h:5727:3 */

// ****************************************************************************
//
// IInternetSession interface

type LPIINTERNETSESSION = uintptr /* urlmon.h:5783:26 */

type OIBDG_FLAGS = uint32 /* urlmon.h:5788:3 */
type IInternetSessionVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FRegisterNameSpace    uintptr
	FUnregisterNameSpace  uintptr
	FRegisterMimeFilter   uintptr
	FUnregisterMimeFilter uintptr
	FCreateBinding        uintptr
	FSetSessionOption     uintptr
	FGetSessionOption     uintptr
} /* urlmon.h:287:9 */

type IInternetSessionVtbl = IInternetSessionVtbl1 /* urlmon.h:5906:3 */

// ****************************************************************************
//
// IInternetThreadSwitch interface

type LPIINTERNETTHREADSWITCH = uintptr /* urlmon.h:5978:31 */
type IInternetThreadSwitchVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FPrepare        uintptr
	FContinue       uintptr
} /* urlmon.h:295:9 */

type IInternetThreadSwitchVtbl = IInternetThreadSwitchVtbl1 /* urlmon.h:6019:3 */

// ****************************************************************************
//
// IInternetPriority interface

type LPIINTERNETPRIORITY = uintptr /* urlmon.h:6071:27 */
type IInternetPriorityVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetPriority    uintptr
	FGetPriority    uintptr
} /* urlmon.h:303:9 */

type IInternetPriorityVtbl = IInternetPriorityVtbl1 /* urlmon.h:6114:3 */

// ****************************************************************************
//
// IInternetProtocolInfo interface

type LPIINTERNETPROTOCOLINFO = uintptr /* urlmon.h:6166:31 */

type PARSEACTION = uint32 /* urlmon.h:6188:3 */

type PSUACTION = uint32 /* urlmon.h:6193:3 */

type QUERYOPTION = uint32 /* urlmon.h:6212:3 */
type IInternetProtocolInfoVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FParseUrl       uintptr
	FCombineUrl     uintptr
	FCompareUrl     uintptr
	FQueryInfo      uintptr
} /* urlmon.h:311:9 */

type IInternetProtocolInfoVtbl = IInternetProtocolInfoVtbl1 /* urlmon.h:6309:3 */
type IInternetSecurityMgrSiteVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetWindow      uintptr
	FEnableModeless uintptr
} /* urlmon.h:319:9 */

type IInternetSecurityMgrSiteVtbl = IInternetSecurityMgrSiteVtbl1 /* urlmon.h:6585:3 */

// ****************************************************************************
//
// IInternetSecurityManager interface

type PUAF = uint32    /* urlmon.h:6675:3 */
type PUAFOUT = uint32 /* urlmon.h:6679:3 */

type SZM_FLAGS = uint32 /* urlmon.h:6685:3 */
type IInternetSecurityManagerVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FSetSecuritySite   uintptr
	FGetSecuritySite   uintptr
	FMapUrlToZone      uintptr
	FGetSecurityId     uintptr
	FProcessUrlAction  uintptr
	FQueryCustomPolicy uintptr
	FSetZoneMapping    uintptr
	FGetZoneMappings   uintptr
} /* urlmon.h:327:9 */

type IInternetSecurityManagerVtbl = IInternetSecurityManagerVtbl1 /* urlmon.h:6814:3 */
type IInternetHostSecurityManagerVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FGetSecurityId     uintptr
	FProcessUrlAction  uintptr
	FQueryCustomPolicy uintptr
} /* urlmon.h:359:9 */

type IInternetHostSecurityManagerVtbl = IInternetHostSecurityManagerVtbl1 /* urlmon.h:7521:3 */

// ****************************************************************************
//
// IInternetZoneManager interface

type LPURLZONEMANAGER = uintptr /* urlmon.h:7780:30 */

type URLZONE = int32 /* urlmon.h:7793:3 */

type URLTEMPLATE = uint32 /* urlmon.h:7806:3 */

type ZAFLAGS = uint32 /* urlmon.h:7826:3 */

type X_ZONEATTRIBUTES = struct {
	FcbSize                 ULONG
	FszDisplayName          [260]WCHAR
	FszDescription          [200]WCHAR
	FszIconPath             [260]WCHAR
	FdwTemplateMinLevel     DWORD
	FdwTemplateRecommended  DWORD
	FdwTemplateCurrentLevel DWORD
	FdwFlags                DWORD
} /* urlmon.h:7828:9 */

type ZONEATTRIBUTES = X_ZONEATTRIBUTES /* urlmon.h:7837:3 */
type LPZONEATTRIBUTES = uintptr        /* urlmon.h:7838:32 */

type URLZONEREG = uint32 /* urlmon.h:7845:3 */
type IInternetZoneManagerVtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FGetZoneAttributes          uintptr
	FSetZoneAttributes          uintptr
	FGetZoneCustomPolicy        uintptr
	FSetZoneCustomPolicy        uintptr
	FGetZoneActionPolicy        uintptr
	FSetZoneActionPolicy        uintptr
	FPromptAction               uintptr
	FLogAction                  uintptr
	FCreateZoneEnumerator       uintptr
	FGetZoneAt                  uintptr
	FDestroyZoneEnumerator      uintptr
	FCopyTemplatePoliciesToZone uintptr
} /* urlmon.h:367:9 */

type IInternetZoneManagerVtbl = IInternetZoneManagerVtbl1 /* urlmon.h:8020:3 */

type X_tagCODEBASEHOLD = struct {
	FcbSize      ULONG
	F__ccgo_pad1 [4]byte
	FszDistUnit  LPWSTR
	FszCodeBase  LPWSTR
	FdwVersionMS DWORD
	FdwVersionLS DWORD
	FdwStyle     DWORD
	F__ccgo_pad2 [4]byte
} /* urlmon.h:8657:9 */

type CODEBASEHOLD = X_tagCODEBASEHOLD /* urlmon.h:8664:3 */
type LPCODEBASEHOLD = uintptr         /* urlmon.h:8665:33 */

type X_tagSOFTDISTINFO = struct {
	FcbSize                ULONG
	FdwFlags               DWORD
	FdwAdState             DWORD
	F__ccgo_pad1           [4]byte
	FszTitle               LPWSTR
	FszAbstract            LPWSTR
	FszHREF                LPWSTR
	FdwInstalledVersionMS  DWORD
	FdwInstalledVersionLS  DWORD
	FdwUpdateVersionMS     DWORD
	FdwUpdateVersionLS     DWORD
	FdwAdvertisedVersionMS DWORD
	FdwAdvertisedVersionLS DWORD
	FdwReserved            DWORD
	F__ccgo_pad2           [4]byte
} /* urlmon.h:8667:9 */

type SOFTDISTINFO = X_tagSOFTDISTINFO /* urlmon.h:8681:3 */
type LPSOFTDISTINFO = uintptr         /* urlmon.h:8682:33 */
type ISoftDistExtVtbl1 = struct {
	FQueryInterface               uintptr
	FAddRef                       uintptr
	FRelease                      uintptr
	FProcessSoftDist              uintptr
	FGetFirstCodeBase             uintptr
	FGetNextCodeBase              uintptr
	FAsyncInstallDistributionUnit uintptr
} /* urlmon.h:391:9 */

type ISoftDistExtVtbl = ISoftDistExtVtbl1 /* urlmon.h:8759:3 */

// ****************************************************************************
//
// ICatalogFileInfo interface

type LPCATALOGFILEINFO = uintptr /* urlmon.h:8822:26 */
type ICatalogFileInfoVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetCatalogFile uintptr
	FGetJavaTrust   uintptr
} /* urlmon.h:399:9 */

type ICatalogFileInfoVtbl = ICatalogFileInfoVtbl1 /* urlmon.h:8865:3 */

// ****************************************************************************
//
// IDataFilter interface

type LPDATAFILTER = uintptr /* urlmon.h:8917:21 */
type IDataFilterVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FDoEncode         uintptr
	FDoDecode         uintptr
	FSetEncodingLevel uintptr
} /* urlmon.h:407:9 */

type IDataFilterVtbl = IDataFilterVtbl1 /* urlmon.h:8999:3 */

type X_tagPROTOCOLFILTERDATA = struct {
	FcbSize        DWORD
	F__ccgo_pad1   [4]byte
	FpProtocolSink uintptr
	FpProtocol     uintptr
	FpUnk          uintptr
	FdwFilterFlags DWORD
	F__ccgo_pad2   [4]byte
} /* urlmon.h:9049:9 */

type PROTOCOLFILTERDATA = X_tagPROTOCOLFILTERDATA /* urlmon.h:9055:3 */

// ****************************************************************************
//
// IEncodingFilterFactory interface

type LPENCODINGFILTERFACTORY = uintptr /* urlmon.h:9063:32 */

type X_tagDATAINFO = struct {
	FulTotalSize      ULONG
	FulavrPacketSize  ULONG
	FulConnectSpeed   ULONG
	FulProcessorSpeed ULONG
} /* urlmon.h:9065:9 */

type DATAINFO = X_tagDATAINFO /* urlmon.h:9070:3 */
type IEncodingFilterFactoryVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FFindBestFilter   uintptr
	FGetDefaultFilter uintptr
} /* urlmon.h:415:9 */

type IEncodingFilterFactoryVtbl = IEncodingFilterFactoryVtbl1 /* urlmon.h:9123:3 */

type X_tagHIT_LOGGING_INFO = struct {
	FdwStructSize      DWORD
	F__ccgo_pad1       [4]byte
	FlpszLoggedUrlName LPSTR
	FStartTime         SYSTEMTIME
	FEndTime           SYSTEMTIME
	FlpszExtendedInfo  LPSTR
} /* urlmon.h:9173:9 */

type HIT_LOGGING_INFO = X_tagHIT_LOGGING_INFO /* urlmon.h:9179:3 */
type LPHIT_LOGGING_INFO = uintptr             /* urlmon.h:9180:37 */

type CONFIRMSAFETY = struct {
	Fclsid       CLSID
	FpUnk        uintptr
	FdwFlags     DWORD
	F__ccgo_pad1 [4]byte
} /* urlmon.h:9186:1 */

// ****************************************************************************
//
// IWrappedProtocol interface

type LPIWRAPPEDPROTOCOL = uintptr /* urlmon.h:9204:26 */
type IWrappedProtocolVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetWrapperCode uintptr
} /* urlmon.h:423:9 */

type IWrappedProtocolVtbl = IWrappedProtocolVtbl1 /* urlmon.h:9242:3 */

// ****************************************************************************
//
// IGetBindHandle interface

type LPGETBINDHANDLE = uintptr /* urlmon.h:9290:24 */

type BINDHANDLETYPES = uint32 /* urlmon.h:9296:3 */
type IGetBindHandleVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetBindHandle  uintptr
} /* urlmon.h:431:9 */

type IGetBindHandleVtbl = IGetBindHandleVtbl1 /* urlmon.h:9334:3 */

type X_tagPROTOCOL_ARGUMENT = struct {
	FszMethod    LPCWSTR
	FszTargetUrl LPCWSTR
} /* urlmon.h:9376:9 */

type PROTOCOL_ARGUMENT = X_tagPROTOCOL_ARGUMENT /* urlmon.h:9379:3 */
type LPPROTOCOL_ARGUMENT = uintptr              /* urlmon.h:9380:38 */

// ****************************************************************************
//
// IBindCallbackRedirect interface

type LPBINDCALLBACKREDIRECT = uintptr /* urlmon.h:9392:31 */
type IBindCallbackRedirectVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FRedirect       uintptr
} /* urlmon.h:439:9 */

type IBindCallbackRedirectVtbl = IBindCallbackRedirectVtbl1 /* urlmon.h:9430:3 */

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/propidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IPropertyStorage1 = struct{ FlpVtbl uintptr } /* propidl.h:23:9 */

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/propidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IPropertyStorage = IPropertyStorage1 /* propidl.h:23:36 */

type IPropertySetStorage1 = struct{ FlpVtbl uintptr } /* propidl.h:31:9 */

type IPropertySetStorage = IPropertySetStorage1 /* propidl.h:31:39 */

type IEnumSTATPROPSTG1 = struct{ FlpVtbl uintptr } /* propidl.h:39:9 */

type IEnumSTATPROPSTG = IEnumSTATPROPSTG1 /* propidl.h:39:36 */

type IEnumSTATPROPSETSTG1 = struct{ FlpVtbl uintptr } /* propidl.h:47:9 */

type IEnumSTATPROPSETSTG = IEnumSTATPROPSETSTG1 /* propidl.h:47:39 */

// Headers for imported files

//** Autogenerated by WIDL 4.12.1 from include/wtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oaidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type TagVersionedStream = struct {
	FguidVersion GUID
	FpStream     uintptr
} /* propidl.h:97:9 */

// Headers for imported files

//** Autogenerated by WIDL 4.12.1 from include/wtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oaidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type VERSIONEDSTREAM = TagVersionedStream /* propidl.h:100:3 */
type LPVERSIONEDSTREAM = uintptr          /* propidl.h:101:35 */

type TagCAC = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:123:9 */

type CAC = TagCAC /* propidl.h:126:3 */
type TagCAUB = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:127:9 */

type CAUB = TagCAUB /* propidl.h:130:3 */
type TagCAI = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:131:9 */

type CAI = TagCAI /* propidl.h:134:3 */
type TagCAUI = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:135:9 */

type CAUI = TagCAUI /* propidl.h:138:3 */
type TagCAL = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:139:9 */

type CAL = TagCAL /* propidl.h:142:3 */
type TagCAUL = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:143:9 */

type CAUL = TagCAUL /* propidl.h:146:3 */
type TagCAFLT = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:147:9 */

type CAFLT = TagCAFLT /* propidl.h:150:3 */
type TagCADBL = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:151:9 */

type CADBL = TagCADBL /* propidl.h:154:3 */
type TagCACY = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:155:9 */

type CACY = TagCACY /* propidl.h:158:3 */
type TagCADATE = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:159:9 */

type CADATE = TagCADATE /* propidl.h:162:3 */
type TagCABSTR = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:163:9 */

type CABSTR = TagCABSTR /* propidl.h:166:3 */
type TagCABSTRBLOB = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:167:9 */

type CABSTRBLOB = TagCABSTRBLOB /* propidl.h:170:3 */
type TagCABOOL = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:171:9 */

type CABOOL = TagCABOOL /* propidl.h:174:3 */
type TagCASCODE = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:175:9 */

type CASCODE = TagCASCODE /* propidl.h:178:3 */
type TagCAPROPVARIANT = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:179:9 */

type CAPROPVARIANT = TagCAPROPVARIANT /* propidl.h:182:3 */
type TagCAH = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:183:9 */

type CAH = TagCAH /* propidl.h:186:3 */
type TagCAUH = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:187:9 */

type CAUH = TagCAUH /* propidl.h:190:3 */
type TagCALPSTR = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:191:9 */

type CALPSTR = TagCALPSTR /* propidl.h:194:3 */
type TagCALPWSTR = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:195:9 */

type CALPWSTR = TagCALPWSTR /* propidl.h:198:3 */
type TagCAFILETIME = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:199:9 */

type CAFILETIME = TagCAFILETIME /* propidl.h:202:3 */
type TagCACLIPDATA = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:203:9 */

type CACLIPDATA = TagCACLIPDATA /* propidl.h:206:3 */
type TagCACLSID = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* propidl.h:207:9 */

type CACLSID = TagCACLSID /* propidl.h:210:3 */

type PROPVAR_PAD1 = WORD /* propidl.h:217:14 */
type PROPVAR_PAD2 = WORD /* propidl.h:218:14 */
type PROPVAR_PAD3 = WORD /* propidl.h:219:14 */

type LPPROPVARIANT = uintptr /* propidl.h:315:31 */

type TagPROPSPEC = struct {
	FulKind      ULONG
	F__ccgo_pad1 [4]byte
	F__8         struct {
		F__ccgo_pad1 [0]uint64
		Fpropid      PROPID
		F__ccgo_pad2 [4]byte
	}
} /* propidl.h:424:9 */

type PROPSPEC = TagPROPSPEC /* propidl.h:430:3 */

type TagSTATPROPSTG = struct {
	FlpwstrName  LPOLESTR
	Fpropid      PROPID
	Fvt          VARTYPE
	F__ccgo_pad1 [2]byte
} /* propidl.h:432:9 */

type STATPROPSTG = TagSTATPROPSTG /* propidl.h:436:3 */

type TagSTATPROPSETSTG = struct {
	Ffmtid       FMTID
	Fclsid       CLSID
	FgrfFlags    DWORD
	Fmtime       FILETIME
	Fctime       FILETIME
	Fatime       FILETIME
	FdwOSVersion DWORD
} /* propidl.h:443:9 */

type STATPROPSETSTG = TagSTATPROPSETSTG /* propidl.h:451:3 */
type IPropertyStorageVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FReadMultiple        uintptr
	FWriteMultiple       uintptr
	FDeleteMultiple      uintptr
	FReadPropertyNames   uintptr
	FWritePropertyNames  uintptr
	FDeletePropertyNames uintptr
	FCommit              uintptr
	FRevert              uintptr
	FEnum                uintptr
	FSetTimes            uintptr
	FSetClass            uintptr
	FStat                uintptr
} /* propidl.h:23:9 */

type IPropertyStorageVtbl = IPropertyStorageVtbl1 /* propidl.h:595:3 */

// ****************************************************************************
//
// IPropertySetStorage interface

type LPPROPERTYSETSTORAGE = uintptr /* propidl.h:683:29 */
type IPropertySetStorageVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCreate         uintptr
	FOpen           uintptr
	FDelete         uintptr
	FEnum           uintptr
} /* propidl.h:31:9 */

type IPropertySetStorageVtbl = IPropertySetStorageVtbl1 /* propidl.h:752:3 */

// ****************************************************************************
//
// IEnumSTATPROPSTG interface

type LPENUMSTATPROPSTG = uintptr /* propidl.h:808:26 */
type IEnumSTATPROPSTGVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* propidl.h:39:9 */

type IEnumSTATPROPSTGVtbl = IEnumSTATPROPSTGVtbl1 /* propidl.h:868:3 */

// ****************************************************************************
//
// IEnumSTATPROPSETSTG interface

type LPENUMSTATPROPSETSTG = uintptr /* propidl.h:944:29 */
type IEnumSTATPROPSETSTGVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* propidl.h:47:9 */

type IEnumSTATPROPSETSTGVtbl = IEnumSTATPROPSETSTGVtbl1 /* propidl.h:1004:3 */

type LPPROPERTYSTORAGE = uintptr /* propidl.h:1074:26 */

type TagSERIALIZEDPROPERTYVALUE = struct {
	FdwType      DWORD
	Frgb         [1]BYTE
	F__ccgo_pad1 [3]byte
} /* propidl.h:1100:9 */

type SERIALIZEDPROPERTYVALUE = TagSERIALIZEDPROPERTYVALUE /* propidl.h:1103:3 */

type NUMPARSE = struct {
	FcDig       INT
	FdwInFlags  ULONG
	FdwOutFlags ULONG
	FcchUsed    INT
	FnBaseShift INT
	FnPwr10     INT
} /* oleauto.h:429:3 */

type UDATE = struct {
	Fst         SYSTEMTIME
	FwDayOfYear USHORT
} /* oleauto.h:530:3 */

type REGKIND = uint32 /* oleauto.h:592:3 */

type TagPARAMDATA = struct {
	FszName      uintptr
	Fvt          VARTYPE
	F__ccgo_pad1 [6]byte
} /* oleauto.h:611:9 */

type PARAMDATA = TagPARAMDATA /* oleauto.h:614:3 */
type LPPARAMDATA = uintptr    /* oleauto.h:614:13 */

type TagMETHODDATA = struct {
	FszName      uintptr
	Fppdata      uintptr
	Fdispid      DISPID
	FiMeth       UINT
	Fcc          CALLCONV
	FcArgs       UINT
	FwFlags      WORD
	FvtReturn    VARTYPE
	F__ccgo_pad1 [4]byte
} /* oleauto.h:616:9 */

type METHODDATA = TagMETHODDATA /* oleauto.h:625:3 */
type LPMETHODDATA = uintptr     /* oleauto.h:625:14 */

type TagINTERFACEDATA = struct {
	Fpmethdata   uintptr
	FcMembers    UINT
	F__ccgo_pad1 [4]byte
} /* oleauto.h:627:9 */

type INTERFACEDATA = TagINTERFACEDATA /* oleauto.h:630:3 */
type LPINTERFACEDATA = uintptr        /* oleauto.h:630:17 */

type X_OLESTREAM = struct{ Flpstbl LPOLESTREAMVTBL } /* ole2.h:109:9 */

type LPOLESTREAM = uintptr /* ole2.h:109:27 */

type X_OLESTREAMVTBL = struct {
	FGet uintptr
	FPut uintptr
} /* ole2.h:109:9 */

type OLESTREAMVTBL = X_OLESTREAMVTBL /* ole2.h:114:3 */
type LPOLESTREAMVTBL = uintptr       /* ole2.h:115:23 */

type OLESTREAM = X_OLESTREAM /* ole2.h:119:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type ALG_ID = uint32 /* wincrypt.h:199:24 */

// In ncrypt.h too
type HCRYPTHASH = ULONG_PTR /* wincrypt.h:283:21 */
type HCRYPTKEY = ULONG_PTR  /* wincrypt.h:284:21 */
type HCRYPTPROV = ULONG_PTR /* wincrypt.h:285:21 */

type X_CMS_KEY_INFO = struct {
	FdwVersion   DWORD
	FAlgid       ALG_ID
	FpbOID       uintptr
	FcbOID       DWORD
	F__ccgo_pad1 [4]byte
} /* wincrypt.h:627:11 */

type CMS_KEY_INFO = X_CMS_KEY_INFO /* wincrypt.h:632:5 */
type PCMS_KEY_INFO = uintptr       /* wincrypt.h:632:18 */

type X_HMAC_Info = struct {
	FHashAlgid     ALG_ID
	F__ccgo_pad1   [4]byte
	FpbInnerString uintptr
	FcbInnerString DWORD
	F__ccgo_pad2   [4]byte
	FpbOuterString uintptr
	FcbOuterString DWORD
	F__ccgo_pad3   [4]byte
} /* wincrypt.h:634:11 */

type HMAC_INFO = X_HMAC_Info /* wincrypt.h:640:5 */
type PHMAC_INFO = uintptr    /* wincrypt.h:640:15 */

type X_SCHANNEL_ALG = struct {
	FdwUse      DWORD
	FAlgid      ALG_ID
	FcBits      DWORD
	FdwFlags    DWORD
	FdwReserved DWORD
} /* wincrypt.h:642:11 */

type SCHANNEL_ALG = X_SCHANNEL_ALG /* wincrypt.h:648:5 */
type PSCHANNEL_ALG = uintptr       /* wincrypt.h:648:18 */

type X_PROV_ENUMALGS = struct {
	FaiAlgid   ALG_ID
	FdwBitLen  DWORD
	FdwNameLen DWORD
	FszName    [20]CHAR
} /* wincrypt.h:654:11 */

type PROV_ENUMALGS = X_PROV_ENUMALGS /* wincrypt.h:659:5 */

type X_PROV_ENUMALGS_EX = struct {
	FaiAlgid       ALG_ID
	FdwDefaultLen  DWORD
	FdwMinLen      DWORD
	FdwMaxLen      DWORD
	FdwProtocols   DWORD
	FdwNameLen     DWORD
	FszName        [20]CHAR
	FdwLongNameLen DWORD
	FszLongName    [40]CHAR
} /* wincrypt.h:661:11 */

type PROV_ENUMALGS_EX = X_PROV_ENUMALGS_EX /* wincrypt.h:671:5 */

type X_PUBLICKEYSTRUC = struct {
	FbType    BYTE
	FbVersion BYTE
	Freserved WORD
	FaiKeyAlg ALG_ID
} /* wincrypt.h:673:11 */

type BLOBHEADER = X_PUBLICKEYSTRUC     /* wincrypt.h:678:5 */
type PUBLICKEYSTRUC = X_PUBLICKEYSTRUC /* wincrypt.h:678:16 */

type X_RSAPUBKEY = struct {
	Fmagic  DWORD
	Fbitlen DWORD
	Fpubexp DWORD
} /* wincrypt.h:680:11 */

type RSAPUBKEY = X_RSAPUBKEY /* wincrypt.h:684:5 */

type X_PUBKEY = struct {
	Fmagic  DWORD
	Fbitlen DWORD
} /* wincrypt.h:686:11 */

type DHPUBKEY = X_PUBKEY  /* wincrypt.h:689:5 */
type DSSPUBKEY = X_PUBKEY /* wincrypt.h:689:14 */
type KEAPUBKEY = X_PUBKEY /* wincrypt.h:689:24 */
type TEKPUBKEY = X_PUBKEY /* wincrypt.h:689:34 */

type X_DSSSEED = struct {
	Fcounter DWORD
	Fseed    [20]BYTE
} /* wincrypt.h:691:11 */

type DSSSEED = X_DSSSEED /* wincrypt.h:694:5 */

type X_PUBKEYVER3 = struct {
	Fmagic   DWORD
	FbitlenP DWORD
	FbitlenQ DWORD
	FbitlenJ DWORD
	FDSSSeed DSSSEED
} /* wincrypt.h:696:11 */

type DHPUBKEY_VER3 = X_PUBKEYVER3  /* wincrypt.h:702:5 */
type DSSPUBKEY_VER3 = X_PUBKEYVER3 /* wincrypt.h:702:20 */

type X_PRIVKEYVER3 = struct {
	Fmagic   DWORD
	FbitlenP DWORD
	FbitlenQ DWORD
	FbitlenJ DWORD
	FbitlenX DWORD
	FDSSSeed DSSSEED
} /* wincrypt.h:704:11 */

type DHPRIVKEY_VER3 = X_PRIVKEYVER3  /* wincrypt.h:711:5 */
type DSSPRIVKEY_VER3 = X_PRIVKEYVER3 /* wincrypt.h:711:20 */

type X_KEY_TYPE_SUBTYPE = struct {
	FdwKeySpec DWORD
	FType      GUID
	FSubtype   GUID
} /* wincrypt.h:713:11 */

type KEY_TYPE_SUBTYPE = X_KEY_TYPE_SUBTYPE /* wincrypt.h:717:5 */
type PKEY_TYPE_SUBTYPE = uintptr           /* wincrypt.h:717:22 */

type X_CERT_FORTEZZA_DATA_PROP = struct {
	FSerialNumber [8]uint8
	FCertIndex    int32
	FCertLabel    [36]uint8
} /* wincrypt.h:719:11 */

type CERT_FORTEZZA_DATA_PROP = X_CERT_FORTEZZA_DATA_PROP /* wincrypt.h:723:5 */

type X_CRYPTOAPI_BLOB = struct {
	FcbData      DWORD
	F__ccgo_pad1 [4]byte
	FpbData      uintptr
} /* wincrypt.h:769:11 */

type CRYPT_INTEGER_BLOB = X_CRYPTOAPI_BLOB  /* wincrypt.h:772:5 */
type PCRYPT_INTEGER_BLOB = uintptr          /* wincrypt.h:772:24 */
type CRYPT_UINT_BLOB = X_CRYPTOAPI_BLOB     /* wincrypt.h:772:45 */
type PCRYPT_UINT_BLOB = uintptr             /* wincrypt.h:772:61 */
type CRYPT_OBJID_BLOB = X_CRYPTOAPI_BLOB    /* wincrypt.h:772:79 */
type PCRYPT_OBJID_BLOB = uintptr            /* wincrypt.h:772:96 */
type CERT_NAME_BLOB = X_CRYPTOAPI_BLOB      /* wincrypt.h:772:115 */
type PCERT_NAME_BLOB = uintptr              /* wincrypt.h:772:130 */
type CERT_RDN_VALUE_BLOB = X_CRYPTOAPI_BLOB /* wincrypt.h:772:147 */
type PCERT_RDN_VALUE_BLOB = uintptr         /* wincrypt.h:772:167 */
type CERT_BLOB = X_CRYPTOAPI_BLOB           /* wincrypt.h:772:189 */
type PCERT_BLOB = uintptr                   /* wincrypt.h:772:199 */
type CRL_BLOB = X_CRYPTOAPI_BLOB            /* wincrypt.h:772:211 */
type PCRL_BLOB = uintptr                    /* wincrypt.h:772:220 */
type DATA_BLOB = X_CRYPTOAPI_BLOB           /* wincrypt.h:772:231 */
type PDATA_BLOB = uintptr                   /* wincrypt.h:772:241 */
type CRYPT_DATA_BLOB = X_CRYPTOAPI_BLOB     /* wincrypt.h:772:253 */
type PCRYPT_DATA_BLOB = uintptr             /* wincrypt.h:772:269 */
type CRYPT_HASH_BLOB = X_CRYPTOAPI_BLOB     /* wincrypt.h:772:287 */
type PCRYPT_HASH_BLOB = uintptr             /* wincrypt.h:772:303 */
type CRYPT_DIGEST_BLOB = X_CRYPTOAPI_BLOB   /* wincrypt.h:772:321 */
type PCRYPT_DIGEST_BLOB = uintptr           /* wincrypt.h:772:339 */
type CRYPT_DER_BLOB = X_CRYPTOAPI_BLOB      /* wincrypt.h:772:359 */
type PCRYPT_DER_BLOB = uintptr              /* wincrypt.h:772:374 */
type CRYPT_ATTR_BLOB = X_CRYPTOAPI_BLOB     /* wincrypt.h:772:391 */
type PCRYPT_ATTR_BLOB = uintptr             /* wincrypt.h:772:407 */
type X_CMS_DH_KEY_INFO = struct {
	FdwVersion          DWORD
	FAlgid              ALG_ID
	FpszContentEncObjId LPSTR
	FPubInfo            CRYPT_DATA_BLOB
	FpReserved          uintptr
} /* wincrypt.h:786:11 */

type CMS_DH_KEY_INFO = X_CMS_DH_KEY_INFO /* wincrypt.h:792:5 */
type PCMS_DH_KEY_INFO = uintptr          /* wincrypt.h:792:21 */

type HCRYPTPROV_OR_NCRYPT_KEY_HANDLE = ULONG_PTR /* wincrypt.h:843:21 */
type HCRYPTPROV_LEGACY = ULONG_PTR               /* wincrypt.h:844:21 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type NTSTATUS = LONG     /* bcrypt.h:27:16 */
type PNTSTATUS = uintptr /* bcrypt.h:27:25 */

type X__BCRYPT_KEY_LENGTHS_STRUCT = struct {
	FdwMinLength ULONG
	FdwMaxLength ULONG
	FdwIncrement ULONG
} /* bcrypt.h:142:11 */

type BCRYPT_KEY_LENGTHS_STRUCT = X__BCRYPT_KEY_LENGTHS_STRUCT /* bcrypt.h:146:5 */

type BCRYPT_AUTH_TAG_LENGTHS_STRUCT = BCRYPT_KEY_LENGTHS_STRUCT /* bcrypt.h:148:37 */

type X_BCRYPT_OID = struct {
	FcbOID       ULONG
	F__ccgo_pad1 [4]byte
	FpbOID       PUCHAR
} /* bcrypt.h:150:11 */

type BCRYPT_OID = X_BCRYPT_OID /* bcrypt.h:153:5 */

type X_BCRYPT_OID_LIST = struct {
	FdwOIDCount  ULONG
	F__ccgo_pad1 [4]byte
	FpOIDs       uintptr
} /* bcrypt.h:155:11 */

type BCRYPT_OID_LIST = X_BCRYPT_OID_LIST /* bcrypt.h:158:5 */

type X_BCRYPT_PKCS1_PADDING_INFO = struct{ FpszAlgId LPCWSTR } /* bcrypt.h:160:11 */

type BCRYPT_PKCS1_PADDING_INFO = X_BCRYPT_PKCS1_PADDING_INFO /* bcrypt.h:162:5 */

type X_BCRYPT_PSS_PADDING_INFO = struct {
	FpszAlgId    LPCWSTR
	FcbSalt      ULONG
	F__ccgo_pad1 [4]byte
} /* bcrypt.h:164:11 */

type BCRYPT_PSS_PADDING_INFO = X_BCRYPT_PSS_PADDING_INFO /* bcrypt.h:167:5 */

type X_BCRYPT_OAEP_PADDING_INFO = struct {
	FpszAlgId    LPCWSTR
	FpbLabel     PUCHAR
	FcbLabel     ULONG
	F__ccgo_pad1 [4]byte
} /* bcrypt.h:169:11 */

type BCRYPT_OAEP_PADDING_INFO = X_BCRYPT_OAEP_PADDING_INFO /* bcrypt.h:173:5 */

type X_BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO = struct {
	FcbSize        ULONG
	FdwInfoVersion ULONG
	FpbNonce       PUCHAR
	FcbNonce       ULONG
	F__ccgo_pad1   [4]byte
	FpbAuthData    PUCHAR
	FcbAuthData    ULONG
	F__ccgo_pad2   [4]byte
	FpbTag         PUCHAR
	FcbTag         ULONG
	F__ccgo_pad3   [4]byte
	FpbMacContext  PUCHAR
	FcbMacContext  ULONG
	FcbAAD         ULONG
	FcbData        ULONGLONG
	FdwFlags       ULONG
	F__ccgo_pad4   [4]byte
} /* bcrypt.h:175:11 */

type BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO = X_BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO /* bcrypt.h:189:5 */
type PBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO = uintptr                                /* bcrypt.h:189:43 */

type X_BCryptBuffer = struct {
	FcbBuffer   ULONG
	FBufferType ULONG
	FpvBuffer   PVOID
} /* bcrypt.h:193:11 */

type BCryptBuffer = X_BCryptBuffer /* bcrypt.h:197:5 */
type PBCryptBuffer = uintptr       /* bcrypt.h:197:18 */

type X_BCryptBufferDesc = struct {
	FulVersion ULONG
	FcBuffers  ULONG
	FpBuffers  PBCryptBuffer
} /* bcrypt.h:199:11 */

type BCryptBufferDesc = X_BCryptBufferDesc /* bcrypt.h:203:5 */
type PBCryptBufferDesc = uintptr           /* bcrypt.h:203:22 */

type BCRYPT_HANDLE = PVOID        /* bcrypt.h:374:15 */
type BCRYPT_ALG_HANDLE = PVOID    /* bcrypt.h:375:17 */
type BCRYPT_KEY_HANDLE = PVOID    /* bcrypt.h:376:17 */
type BCRYPT_HASH_HANDLE = PVOID   /* bcrypt.h:377:17 */
type BCRYPT_SECRET_HANDLE = PVOID /* bcrypt.h:378:17 */

type X_BCRYPT_KEY_BLOB = struct{ FMagic ULONG } /* bcrypt.h:380:11 */

type BCRYPT_KEY_BLOB = X_BCRYPT_KEY_BLOB /* bcrypt.h:382:5 */

type X_BCRYPT_RSAKEY_BLOB = struct {
	FMagic       ULONG
	FBitLength   ULONG
	FcbPublicExp ULONG
	FcbModulus   ULONG
	FcbPrime1    ULONG
	FcbPrime2    ULONG
} /* bcrypt.h:384:11 */

type BCRYPT_RSAKEY_BLOB = X_BCRYPT_RSAKEY_BLOB /* bcrypt.h:391:5 */

type X_BCRYPT_ECCKEY_BLOB = struct {
	FdwMagic ULONG
	FcbKey   ULONG
} /* bcrypt.h:393:11 */

type BCRYPT_ECCKEY_BLOB = X_BCRYPT_ECCKEY_BLOB /* bcrypt.h:396:5 */
type PBCRYPT_ECCKEY_BLOB = uintptr             /* bcrypt.h:396:24 */

type X_BCRYPT_DH_KEY_BLOB = struct {
	FdwMagic ULONG
	FcbKey   ULONG
} /* bcrypt.h:398:11 */

type BCRYPT_DH_KEY_BLOB = X_BCRYPT_DH_KEY_BLOB /* bcrypt.h:401:5 */
type PBCRYPT_DH_KEY_BLOB = uintptr             /* bcrypt.h:401:24 */

type X_BCRYPT_DH_PARAMETER_HEADER = struct {
	FcbLength    ULONG
	FdwMagic     ULONG
	FcbKeyLength ULONG
} /* bcrypt.h:403:11 */

type BCRYPT_DH_PARAMETER_HEADER = X_BCRYPT_DH_PARAMETER_HEADER /* bcrypt.h:407:5 */

type X_BCRYPT_DSA_KEY_BLOB = struct {
	FdwMagic ULONG
	FcbKey   ULONG
	FCount   [4]UCHAR
	FSeed    [20]UCHAR
	Fq       [20]UCHAR
} /* bcrypt.h:409:11 */

type BCRYPT_DSA_KEY_BLOB = X_BCRYPT_DSA_KEY_BLOB /* bcrypt.h:415:5 */
type PBCRYPT_DSA_KEY_BLOB = uintptr              /* bcrypt.h:415:25 */

type HASHALGORITHM_ENUM = uint32 /* bcrypt.h:421:5 */

type DSAFIPSVERSION_ENUM = uint32 /* bcrypt.h:426:5 */
type X_BCRYPT_DSA_KEY_BLOB_V2 = struct {
	FdwMagic         ULONG
	FcbKey           ULONG
	FhashAlgorithm   HASHALGORITHM_ENUM
	FstandardVersion DSAFIPSVERSION_ENUM
	FcbSeedLength    ULONG
	FcbGroupSize     ULONG
	FCount           [4]UCHAR
} /* bcrypt.h:427:11 */

type BCRYPT_DSA_KEY_BLOB_V2 = X_BCRYPT_DSA_KEY_BLOB_V2 /* bcrypt.h:435:5 */
type PBCRYPT_DSA_KEY_BLOB_V2 = uintptr                 /* bcrypt.h:435:28 */

type X_BCRYPT_KEY_DATA_BLOB_HEADER = struct {
	FdwMagic   ULONG
	FdwVersion ULONG
	FcbKeyData ULONG
} /* bcrypt.h:437:11 */

type BCRYPT_KEY_DATA_BLOB_HEADER = X_BCRYPT_KEY_DATA_BLOB_HEADER /* bcrypt.h:441:5 */
type PBCRYPT_KEY_DATA_BLOB_HEADER = uintptr                      /* bcrypt.h:441:33 */

type X_BCRYPT_DSA_PARAMETER_HEADER = struct {
	FcbLength    ULONG
	FdwMagic     ULONG
	FcbKeyLength ULONG
	FCount       [4]UCHAR
	FSeed        [20]UCHAR
	Fq           [20]UCHAR
} /* bcrypt.h:443:11 */

type BCRYPT_DSA_PARAMETER_HEADER = X_BCRYPT_DSA_PARAMETER_HEADER /* bcrypt.h:450:5 */

type X_BCRYPT_DSA_PARAMETER_HEADER_V2 = struct {
	FcbLength        ULONG
	FdwMagic         ULONG
	FcbKeyLength     ULONG
	FhashAlgorithm   HASHALGORITHM_ENUM
	FstandardVersion DSAFIPSVERSION_ENUM
	FcbSeedLength    ULONG
	FcbGroupSize     ULONG
	FCount           [4]UCHAR
} /* bcrypt.h:452:11 */

type BCRYPT_DSA_PARAMETER_HEADER_V2 = X_BCRYPT_DSA_PARAMETER_HEADER_V2 /* bcrypt.h:461:5 */

type X_BCRYPT_ALGORITHM_IDENTIFIER = struct {
	FpszName LPWSTR
	FdwClass ULONG
	FdwFlags ULONG
} /* bcrypt.h:463:11 */

type BCRYPT_ALGORITHM_IDENTIFIER = X_BCRYPT_ALGORITHM_IDENTIFIER /* bcrypt.h:467:5 */

type X_BCRYPT_PROVIDER_NAME = struct{ FpszProviderName LPWSTR } /* bcrypt.h:469:11 */

type BCRYPT_PROVIDER_NAME = X_BCRYPT_PROVIDER_NAME /* bcrypt.h:471:5 */

type X_BCRYPT_INTERFACE_VERSION = struct {
	FMajorVersion USHORT
	FMinorVersion USHORT
} /* bcrypt.h:473:11 */

type BCRYPT_INTERFACE_VERSION = X_BCRYPT_INTERFACE_VERSION /* bcrypt.h:476:5 */
type PBCRYPT_INTERFACE_VERSION = uintptr                   /* bcrypt.h:476:30 */

type X_CRYPT_INTERFACE_REG = struct {
	FdwInterface    ULONG
	FdwFlags        ULONG
	FcFunctions     ULONG
	F__ccgo_pad1    [4]byte
	FrgpszFunctions uintptr
} /* bcrypt.h:478:11 */

type CRYPT_INTERFACE_REG = X_CRYPT_INTERFACE_REG /* bcrypt.h:483:5 */
type PCRYPT_INTERFACE_REG = uintptr              /* bcrypt.h:483:25 */

type X_CRYPT_IMAGE_REG = struct {
	FpszImage      PWSTR
	FcInterfaces   ULONG
	F__ccgo_pad1   [4]byte
	FrgpInterfaces uintptr
} /* bcrypt.h:485:11 */

type CRYPT_IMAGE_REG = X_CRYPT_IMAGE_REG /* bcrypt.h:489:5 */
type PCRYPT_IMAGE_REG = uintptr          /* bcrypt.h:489:21 */

type X_CRYPT_PROVIDER_REG = struct {
	FcAliases     ULONG
	F__ccgo_pad1  [4]byte
	FrgpszAliases uintptr
	FpUM          PCRYPT_IMAGE_REG
	FpKM          PCRYPT_IMAGE_REG
} /* bcrypt.h:491:11 */

type CRYPT_PROVIDER_REG = X_CRYPT_PROVIDER_REG /* bcrypt.h:496:5 */
type PCRYPT_PROVIDER_REG = uintptr             /* bcrypt.h:496:24 */

type X_CRYPT_PROVIDERS = struct {
	FcProviders     ULONG
	F__ccgo_pad1    [4]byte
	FrgpszProviders uintptr
} /* bcrypt.h:498:11 */

type CRYPT_PROVIDERS = X_CRYPT_PROVIDERS /* bcrypt.h:501:5 */
type PCRYPT_PROVIDERS = uintptr          /* bcrypt.h:501:21 */

type X_CRYPT_CONTEXT_CONFIG = struct {
	FdwFlags    ULONG
	FdwReserved ULONG
} /* bcrypt.h:503:11 */

type CRYPT_CONTEXT_CONFIG = X_CRYPT_CONTEXT_CONFIG /* bcrypt.h:506:5 */
type PCRYPT_CONTEXT_CONFIG = uintptr               /* bcrypt.h:506:26 */

type X_CRYPT_CONTEXT_FUNCTION_CONFIG = struct {
	FdwFlags    ULONG
	FdwReserved ULONG
} /* bcrypt.h:508:11 */

type CRYPT_CONTEXT_FUNCTION_CONFIG = X_CRYPT_CONTEXT_FUNCTION_CONFIG /* bcrypt.h:511:5 */
type PCRYPT_CONTEXT_FUNCTION_CONFIG = uintptr                        /* bcrypt.h:511:35 */

type X_CRYPT_CONTEXTS = struct {
	FcContexts     ULONG
	F__ccgo_pad1   [4]byte
	FrgpszContexts uintptr
} /* bcrypt.h:513:11 */

type CRYPT_CONTEXTS = X_CRYPT_CONTEXTS /* bcrypt.h:516:5 */
type PCRYPT_CONTEXTS = uintptr         /* bcrypt.h:516:20 */

type X_CRYPT_CONTEXT_FUNCTIONS = struct {
	FcFunctions     ULONG
	F__ccgo_pad1    [4]byte
	FrgpszFunctions uintptr
} /* bcrypt.h:518:11 */

type CRYPT_CONTEXT_FUNCTIONS = X_CRYPT_CONTEXT_FUNCTIONS /* bcrypt.h:521:5 */
type PCRYPT_CONTEXT_FUNCTIONS = uintptr                  /* bcrypt.h:521:29 */

type X_CRYPT_CONTEXT_FUNCTION_PROVIDERS = struct {
	FcProviders     ULONG
	F__ccgo_pad1    [4]byte
	FrgpszProviders uintptr
} /* bcrypt.h:523:11 */

type CRYPT_CONTEXT_FUNCTION_PROVIDERS = X_CRYPT_CONTEXT_FUNCTION_PROVIDERS /* bcrypt.h:526:5 */
type PCRYPT_CONTEXT_FUNCTION_PROVIDERS = uintptr                           /* bcrypt.h:526:38 */

type X_CRYPT_PROPERTY_REF = struct {
	FpszProperty PWSTR
	FcbValue     ULONG
	F__ccgo_pad1 [4]byte
	FpbValue     PUCHAR
} /* bcrypt.h:528:11 */

type CRYPT_PROPERTY_REF = X_CRYPT_PROPERTY_REF /* bcrypt.h:532:5 */
type PCRYPT_PROPERTY_REF = uintptr             /* bcrypt.h:532:24 */

type X_CRYPT_IMAGE_REF = struct {
	FpszImage    PWSTR
	FdwFlags     ULONG
	F__ccgo_pad1 [4]byte
} /* bcrypt.h:534:11 */

type CRYPT_IMAGE_REF = X_CRYPT_IMAGE_REF /* bcrypt.h:537:5 */
type PCRYPT_IMAGE_REF = uintptr          /* bcrypt.h:537:21 */

type X_CRYPT_PROVIDER_REF = struct {
	FdwInterface   ULONG
	F__ccgo_pad1   [4]byte
	FpszFunction   PWSTR
	FpszProvider   PWSTR
	FcProperties   ULONG
	F__ccgo_pad2   [4]byte
	FrgpProperties uintptr
	FpUM           PCRYPT_IMAGE_REF
	FpKM           PCRYPT_IMAGE_REF
} /* bcrypt.h:539:11 */

type CRYPT_PROVIDER_REF = X_CRYPT_PROVIDER_REF /* bcrypt.h:547:5 */
type PCRYPT_PROVIDER_REF = uintptr             /* bcrypt.h:547:24 */

type X_CRYPT_PROVIDER_REFS = struct {
	FcProviders   ULONG
	F__ccgo_pad1  [4]byte
	FrgpProviders uintptr
} /* bcrypt.h:549:11 */

type CRYPT_PROVIDER_REFS = X_CRYPT_PROVIDER_REFS /* bcrypt.h:552:5 */
type PCRYPT_PROVIDER_REFS = uintptr              /* bcrypt.h:552:25 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type SECURITY_STATUS = LONG /* ncrypt.h:23:16 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type PFN_NCRYPT_ALLOC = uintptr /* ncrypt.h:138:18 */
type PFN_NCRYPT_FREE = uintptr  /* ncrypt.h:139:16 */

type NCRYPT_ALLOC_PARA1 = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FpfnAlloc    PFN_NCRYPT_ALLOC
	FpfnFree     PFN_NCRYPT_FREE
} /* ncrypt.h:141:11 */

type NCRYPT_ALLOC_PARA = NCRYPT_ALLOC_PARA1 /* ncrypt.h:145:5 */

type NCryptBuffer = BCryptBuffer         /* ncrypt.h:147:24 */
type PNCryptBuffer = uintptr             /* ncrypt.h:148:24 */
type NCryptBufferDesc = BCryptBufferDesc /* ncrypt.h:149:28 */
type PNCryptBufferDesc = uintptr         /* ncrypt.h:150:28 */

type NCRYPT_HANDLE = ULONG_PTR        /* ncrypt.h:152:21 */
type NCRYPT_PROV_HANDLE = ULONG_PTR   /* ncrypt.h:153:21 */
type NCRYPT_KEY_HANDLE = ULONG_PTR    /* ncrypt.h:154:21 */
type NCRYPT_HASH_HANDLE = ULONG_PTR   /* ncrypt.h:155:21 */
type NCRYPT_SECRET_HANDLE = ULONG_PTR /* ncrypt.h:156:21 */

type X_NCryptAlgorithmName = struct {
	FpszName         LPWSTR
	FdwClass         DWORD
	FdwAlgOperations DWORD
	FdwFlags         DWORD
	F__ccgo_pad1     [4]byte
} /* ncrypt.h:202:11 */

type NCryptAlgorithmName = X_NCryptAlgorithmName /* ncrypt.h:207:5 */

type NCryptKeyName1 = struct {
	FpszName         LPWSTR
	FpszAlgid        LPWSTR
	FdwLegacyKeySpec DWORD
	FdwFlags         DWORD
} /* ncrypt.h:209:11 */

type NCryptKeyName = NCryptKeyName1 /* ncrypt.h:214:5 */

type NCryptProviderName1 = struct {
	FpszName    LPWSTR
	FpszComment LPWSTR
} /* ncrypt.h:216:11 */

type NCryptProviderName = NCryptProviderName1 /* ncrypt.h:219:5 */

type X__NCRYPT_UI_POLICY = struct {
	FdwVersion        DWORD
	FdwFlags          DWORD
	FpszCreationTitle LPCWSTR
	FpszFriendlyName  LPCWSTR
	FpszDescription   LPCWSTR
} /* ncrypt.h:335:9 */

type NCRYPT_UI_POLICY = X__NCRYPT_UI_POLICY /* ncrypt.h:341:5 */

type X__NCRYPT_SUPPORTED_LENGTHS = struct {
	FdwMinLength     DWORD
	FdwMaxLength     DWORD
	FdwIncrement     DWORD
	FdwDefaultLength DWORD
} /* ncrypt.h:343:11 */

type NCRYPT_SUPPORTED_LENGTHS = X__NCRYPT_SUPPORTED_LENGTHS /* ncrypt.h:348:5 */

type X_CRYPT_BIT_BLOB = struct {
	FcbData      DWORD
	F__ccgo_pad1 [4]byte
	FpbData      uintptr
	FcUnusedBits DWORD
	F__ccgo_pad2 [4]byte
} /* wincrypt.h:851:11 */

type CRYPT_BIT_BLOB = X_CRYPT_BIT_BLOB /* wincrypt.h:855:5 */
type PCRYPT_BIT_BLOB = uintptr         /* wincrypt.h:855:20 */

type X_CRYPT_ALGORITHM_IDENTIFIER = struct {
	FpszObjId   LPSTR
	FParameters CRYPT_OBJID_BLOB
} /* wincrypt.h:857:11 */

type CRYPT_ALGORITHM_IDENTIFIER = X_CRYPT_ALGORITHM_IDENTIFIER /* wincrypt.h:860:5 */
type PCRYPT_ALGORITHM_IDENTIFIER = uintptr                     /* wincrypt.h:860:32 */

type X_CRYPT_OBJID_TABLE = struct {
	FdwAlgId     DWORD
	F__ccgo_pad1 [4]byte
	FpszObjId    LPCSTR
} /* wincrypt.h:1086:11 */

type CRYPT_OBJID_TABLE = X_CRYPT_OBJID_TABLE /* wincrypt.h:1089:5 */
type PCRYPT_OBJID_TABLE = uintptr            /* wincrypt.h:1089:23 */

type X_CRYPT_HASH_INFO = struct {
	FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FHash          CRYPT_HASH_BLOB
} /* wincrypt.h:1091:11 */

type CRYPT_HASH_INFO = X_CRYPT_HASH_INFO /* wincrypt.h:1094:5 */
type PCRYPT_HASH_INFO = uintptr          /* wincrypt.h:1094:21 */

type X_CERT_EXTENSION = struct {
	FpszObjId    LPSTR
	FfCritical   WINBOOL
	F__ccgo_pad1 [4]byte
	FValue       CRYPT_OBJID_BLOB
} /* wincrypt.h:1098:11 */

type CERT_EXTENSION = X_CERT_EXTENSION /* wincrypt.h:1102:5 */
type PCERT_EXTENSION = uintptr         /* wincrypt.h:1102:20 */

type PCCERT_EXTENSION = uintptr /* wincrypt.h:1104:32 */

type X_CRYPT_ATTRIBUTE_TYPE_VALUE = struct {
	FpszObjId LPSTR
	FValue    CRYPT_OBJID_BLOB
} /* wincrypt.h:1107:11 */

type CRYPT_ATTRIBUTE_TYPE_VALUE = X_CRYPT_ATTRIBUTE_TYPE_VALUE /* wincrypt.h:1110:5 */
type PCRYPT_ATTRIBUTE_TYPE_VALUE = uintptr                     /* wincrypt.h:1110:32 */

type X_CRYPT_ATTRIBUTE = struct {
	FpszObjId    LPSTR
	FcValue      DWORD
	F__ccgo_pad1 [4]byte
	FrgValue     PCRYPT_ATTR_BLOB
} /* wincrypt.h:1112:11 */

type CRYPT_ATTRIBUTE = X_CRYPT_ATTRIBUTE /* wincrypt.h:1116:5 */
type PCRYPT_ATTRIBUTE = uintptr          /* wincrypt.h:1116:21 */

type X_CRYPT_ATTRIBUTES = struct {
	FcAttr       DWORD
	F__ccgo_pad1 [4]byte
	FrgAttr      PCRYPT_ATTRIBUTE
} /* wincrypt.h:1118:11 */

type CRYPT_ATTRIBUTES = X_CRYPT_ATTRIBUTES /* wincrypt.h:1121:5 */
type PCRYPT_ATTRIBUTES = uintptr           /* wincrypt.h:1121:22 */

type X_CERT_RDN_ATTR = struct {
	FpszObjId    LPSTR
	FdwValueType DWORD
	F__ccgo_pad1 [4]byte
	FValue       CERT_RDN_VALUE_BLOB
} /* wincrypt.h:1123:11 */

type CERT_RDN_ATTR = X_CERT_RDN_ATTR /* wincrypt.h:1127:5 */
type PCERT_RDN_ATTR = uintptr        /* wincrypt.h:1127:19 */

type X_CERT_RDN = struct {
	FcRDNAttr    DWORD
	F__ccgo_pad1 [4]byte
	FrgRDNAttr   PCERT_RDN_ATTR
} /* wincrypt.h:1217:11 */

type CERT_RDN = X_CERT_RDN /* wincrypt.h:1220:5 */
type PCERT_RDN = uintptr   /* wincrypt.h:1220:14 */

type X_CERT_NAME_INFO = struct {
	FcRDN        DWORD
	F__ccgo_pad1 [4]byte
	FrgRDN       PCERT_RDN
} /* wincrypt.h:1222:11 */

type CERT_NAME_INFO = X_CERT_NAME_INFO /* wincrypt.h:1225:5 */
type PCERT_NAME_INFO = uintptr         /* wincrypt.h:1225:20 */

type X_CERT_NAME_VALUE = struct {
	FdwValueType DWORD
	F__ccgo_pad1 [4]byte
	FValue       CERT_RDN_VALUE_BLOB
} /* wincrypt.h:1227:11 */

type CERT_NAME_VALUE = X_CERT_NAME_VALUE /* wincrypt.h:1230:5 */
type PCERT_NAME_VALUE = uintptr          /* wincrypt.h:1230:21 */

type X_CERT_PUBLIC_KEY_INFO = struct {
	FAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FPublicKey CRYPT_BIT_BLOB
} /* wincrypt.h:1233:11 */

type CERT_PUBLIC_KEY_INFO = X_CERT_PUBLIC_KEY_INFO /* wincrypt.h:1236:5 */
type PCERT_PUBLIC_KEY_INFO = uintptr               /* wincrypt.h:1236:26 */

type X_CRYPT_ECC_PRIVATE_KEY_INFO = struct {
	FdwVersion   DWORD
	F__ccgo_pad1 [4]byte
	FPrivateKey  CRYPT_DER_BLOB
	FszCurveOid  LPSTR
	FPublicKey   CRYPT_BIT_BLOB
} /* wincrypt.h:1244:11 */

type CRYPT_ECC_PRIVATE_KEY_INFO = X_CRYPT_ECC_PRIVATE_KEY_INFO /* wincrypt.h:1249:5 */
type PCRYPT_ECC_PRIVATE_KEY_INFO = uintptr                     /* wincrypt.h:1249:32 */

type X_CRYPT_PRIVATE_KEY_INFO = struct {
	FVersion     DWORD
	F__ccgo_pad1 [4]byte
	FAlgorithm   CRYPT_ALGORITHM_IDENTIFIER
	FPrivateKey  CRYPT_DER_BLOB
	FpAttributes PCRYPT_ATTRIBUTES
} /* wincrypt.h:1253:11 */

type CRYPT_PRIVATE_KEY_INFO = X_CRYPT_PRIVATE_KEY_INFO /* wincrypt.h:1258:5 */
type PCRYPT_PRIVATE_KEY_INFO = uintptr                 /* wincrypt.h:1258:28 */

type X_CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = struct {
	FEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FEncryptedPrivateKey CRYPT_DATA_BLOB
} /* wincrypt.h:1260:11 */

type CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = X_CRYPT_ENCRYPTED_PRIVATE_KEY_INFO /* wincrypt.h:1263:5 */
type PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO = uintptr                           /* wincrypt.h:1263:38 */

type PCRYPT_DECRYPT_PRIVATE_KEY_FUNC = uintptr /* wincrypt.h:1265:19 */
type PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC = uintptr /* wincrypt.h:1266:19 */
type PCRYPT_RESOLVE_HCRYPTPROV_FUNC = uintptr  /* wincrypt.h:1267:19 */

type X_CRYPT_PKCS8_IMPORT_PARAMS = struct {
	FPrivateKey             CRYPT_DIGEST_BLOB
	FpResolvehCryptProvFunc PCRYPT_RESOLVE_HCRYPTPROV_FUNC
	FpVoidResolveFunc       LPVOID
	FpDecryptPrivateKeyFunc PCRYPT_DECRYPT_PRIVATE_KEY_FUNC
	FpVoidDecryptFunc       LPVOID
} /* wincrypt.h:1269:11 */

type CRYPT_PKCS8_IMPORT_PARAMS = X_CRYPT_PKCS8_IMPORT_PARAMS         /* wincrypt.h:1275:5 */
type PCRYPT_PKCS8_IMPORT_PARAMS = uintptr                            /* wincrypt.h:1275:31 */
type CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = X_CRYPT_PKCS8_IMPORT_PARAMS /* wincrypt.h:1275:60 */
type PCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = uintptr                    /* wincrypt.h:1275:94 */

type X_CRYPT_PKCS8_EXPORT_PARAMS = struct {
	FhCryptProv             HCRYPTPROV
	FdwKeySpec              DWORD
	F__ccgo_pad1            [4]byte
	FpszPrivateKeyObjId     LPSTR
	FpEncryptPrivateKeyFunc PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC
	FpVoidEncryptFunc       LPVOID
} /* wincrypt.h:1277:11 */

type CRYPT_PKCS8_EXPORT_PARAMS = X_CRYPT_PKCS8_EXPORT_PARAMS /* wincrypt.h:1283:5 */
type PCRYPT_PKCS8_EXPORT_PARAMS = uintptr                    /* wincrypt.h:1283:31 */

type X_CERT_INFO = struct {
	FdwVersion            DWORD
	F__ccgo_pad1          [4]byte
	FSerialNumber         CRYPT_INTEGER_BLOB
	FSignatureAlgorithm   CRYPT_ALGORITHM_IDENTIFIER
	FIssuer               CERT_NAME_BLOB
	FNotBefore            FILETIME
	FNotAfter             FILETIME
	FSubject              CERT_NAME_BLOB
	FSubjectPublicKeyInfo CERT_PUBLIC_KEY_INFO
	FIssuerUniqueId       CRYPT_BIT_BLOB
	FSubjectUniqueId      CRYPT_BIT_BLOB
	FcExtension           DWORD
	F__ccgo_pad2          [4]byte
	FrgExtension          PCERT_EXTENSION
} /* wincrypt.h:1287:11 */

type CERT_INFO = X_CERT_INFO /* wincrypt.h:1300:5 */
type PCERT_INFO = uintptr    /* wincrypt.h:1300:15 */

type X_CRL_ENTRY = struct {
	FSerialNumber   CRYPT_INTEGER_BLOB
	FRevocationDate FILETIME
	FcExtension     DWORD
	F__ccgo_pad1    [4]byte
	FrgExtension    PCERT_EXTENSION
} /* wincrypt.h:1319:11 */

type CRL_ENTRY = X_CRL_ENTRY /* wincrypt.h:1324:5 */
type PCRL_ENTRY = uintptr    /* wincrypt.h:1324:15 */

type X_CRL_INFO = struct {
	FdwVersion          DWORD
	F__ccgo_pad1        [4]byte
	FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FIssuer             CERT_NAME_BLOB
	FThisUpdate         FILETIME
	FNextUpdate         FILETIME
	FcCRLEntry          DWORD
	F__ccgo_pad2        [4]byte
	FrgCRLEntry         PCRL_ENTRY
	FcExtension         DWORD
	F__ccgo_pad3        [4]byte
	FrgExtension        PCERT_EXTENSION
} /* wincrypt.h:1326:11 */

type CRL_INFO = X_CRL_INFO /* wincrypt.h:1336:5 */
type PCRL_INFO = uintptr   /* wincrypt.h:1336:14 */

type X_CERT_OR_CRL_BLOB = struct {
	FdwChoice  DWORD
	FcbEncoded DWORD
	FpbEncoded uintptr
} /* wincrypt.h:1344:11 */

type CERT_OR_CRL_BLOB = X_CERT_OR_CRL_BLOB /* wincrypt.h:1348:5 */
type PCERT_OR_CRL_BLOB = uintptr           /* wincrypt.h:1348:22 */

type X_CERT_OR_CRL_BUNDLE = struct {
	FcItem       DWORD
	F__ccgo_pad1 [4]byte
	FrgItem      PCERT_OR_CRL_BLOB
} /* wincrypt.h:1350:11 */

type CERT_OR_CRL_BUNDLE = X_CERT_OR_CRL_BUNDLE /* wincrypt.h:1353:5 */
type PCERT_OR_CRL_BUNDLE = uintptr             /* wincrypt.h:1353:24 */

type X_CERT_REQUEST_INFO = struct {
	FdwVersion            DWORD
	F__ccgo_pad1          [4]byte
	FSubject              CERT_NAME_BLOB
	FSubjectPublicKeyInfo CERT_PUBLIC_KEY_INFO
	FcAttribute           DWORD
	F__ccgo_pad2          [4]byte
	FrgAttribute          PCRYPT_ATTRIBUTE
} /* wincrypt.h:1355:11 */

type CERT_REQUEST_INFO = X_CERT_REQUEST_INFO /* wincrypt.h:1361:5 */
type PCERT_REQUEST_INFO = uintptr            /* wincrypt.h:1361:23 */

type X_CERT_KEYGEN_REQUEST_INFO = struct {
	FdwVersion            DWORD
	F__ccgo_pad1          [4]byte
	FSubjectPublicKeyInfo CERT_PUBLIC_KEY_INFO
	FpwszChallengeString  LPWSTR
} /* wincrypt.h:1365:11 */

type CERT_KEYGEN_REQUEST_INFO = X_CERT_KEYGEN_REQUEST_INFO /* wincrypt.h:1369:5 */
type PCERT_KEYGEN_REQUEST_INFO = uintptr                   /* wincrypt.h:1369:30 */

type X_CERT_SIGNED_CONTENT_INFO = struct {
	FToBeSigned         CRYPT_DER_BLOB
	FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FSignature          CRYPT_BIT_BLOB
} /* wincrypt.h:1373:11 */

type CERT_SIGNED_CONTENT_INFO = X_CERT_SIGNED_CONTENT_INFO /* wincrypt.h:1377:5 */
type PCERT_SIGNED_CONTENT_INFO = uintptr                   /* wincrypt.h:1377:30 */

type X_CTL_USAGE = struct {
	FcUsageIdentifier     DWORD
	F__ccgo_pad1          [4]byte
	FrgpszUsageIdentifier uintptr
} /* wincrypt.h:1379:11 */

type CTL_USAGE = X_CTL_USAGE         /* wincrypt.h:1382:5 */
type PCTL_USAGE = uintptr            /* wincrypt.h:1382:15 */
type CERT_ENHKEY_USAGE = X_CTL_USAGE /* wincrypt.h:1382:27 */
type PCERT_ENHKEY_USAGE = uintptr    /* wincrypt.h:1382:45 */

type PCCTL_USAGE = uintptr         /* wincrypt.h:1384:27 */
type PCCERT_ENHKEY_USAGE = uintptr /* wincrypt.h:1385:35 */

type X_CTL_ENTRY = struct {
	FSubjectIdentifier CRYPT_DATA_BLOB
	FcAttribute        DWORD
	F__ccgo_pad1       [4]byte
	FrgAttribute       PCRYPT_ATTRIBUTE
} /* wincrypt.h:1387:11 */

type CTL_ENTRY = X_CTL_ENTRY /* wincrypt.h:1391:5 */
type PCTL_ENTRY = uintptr    /* wincrypt.h:1391:15 */

type X_CTL_INFO = struct {
	FdwVersion        DWORD
	F__ccgo_pad1      [4]byte
	FSubjectUsage     CTL_USAGE
	FListIdentifier   CRYPT_DATA_BLOB
	FSequenceNumber   CRYPT_INTEGER_BLOB
	FThisUpdate       FILETIME
	FNextUpdate       FILETIME
	FSubjectAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FcCTLEntry        DWORD
	F__ccgo_pad2      [4]byte
	FrgCTLEntry       PCTL_ENTRY
	FcExtension       DWORD
	F__ccgo_pad3      [4]byte
	FrgExtension      PCERT_EXTENSION
} /* wincrypt.h:1393:11 */

type CTL_INFO = X_CTL_INFO /* wincrypt.h:1405:5 */
type PCTL_INFO = uintptr   /* wincrypt.h:1405:14 */

type X_CRYPT_TIME_STAMP_REQUEST_INFO = struct {
	FpszTimeStampAlgorithm LPSTR
	FpszContentType        LPSTR
	FContent               CRYPT_OBJID_BLOB
	FcAttribute            DWORD
	F__ccgo_pad1           [4]byte
	FrgAttribute           PCRYPT_ATTRIBUTE
} /* wincrypt.h:1409:11 */

type CRYPT_TIME_STAMP_REQUEST_INFO = X_CRYPT_TIME_STAMP_REQUEST_INFO /* wincrypt.h:1415:5 */
type PCRYPT_TIME_STAMP_REQUEST_INFO = uintptr                        /* wincrypt.h:1415:35 */

type X_CRYPT_ENROLLMENT_NAME_VALUE_PAIR = struct {
	FpwszName  LPWSTR
	FpwszValue LPWSTR
} /* wincrypt.h:1417:11 */

type CRYPT_ENROLLMENT_NAME_VALUE_PAIR = X_CRYPT_ENROLLMENT_NAME_VALUE_PAIR /* wincrypt.h:1420:5 */
type PCRYPT_ENROLLMENT_NAME_VALUE_PAIR = uintptr                           /* wincrypt.h:1420:38 */

type X_CRYPT_CSP_PROVIDER = struct {
	FdwKeySpec        DWORD
	F__ccgo_pad1      [4]byte
	FpwszProviderName LPWSTR
	FSignature        CRYPT_BIT_BLOB
} /* wincrypt.h:1422:11 */

type CRYPT_CSP_PROVIDER = X_CRYPT_CSP_PROVIDER /* wincrypt.h:1426:5 */
type PCRYPT_CSP_PROVIDER = uintptr             /* wincrypt.h:1426:24 */

type PFN_CRYPT_ALLOC = uintptr /* wincrypt.h:1456:18 */
type PFN_CRYPT_FREE = uintptr  /* wincrypt.h:1457:16 */

type X_CRYPT_ENCODE_PARA = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FpfnAlloc    PFN_CRYPT_ALLOC
	FpfnFree     PFN_CRYPT_FREE
} /* wincrypt.h:1459:11 */

type CRYPT_ENCODE_PARA = X_CRYPT_ENCODE_PARA /* wincrypt.h:1463:5 */
type PCRYPT_ENCODE_PARA = uintptr            /* wincrypt.h:1463:23 */

type X_CRYPT_DECODE_PARA = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FpfnAlloc    PFN_CRYPT_ALLOC
	FpfnFree     PFN_CRYPT_FREE
} /* wincrypt.h:1479:11 */

type CRYPT_DECODE_PARA = X_CRYPT_DECODE_PARA /* wincrypt.h:1483:5 */
type PCRYPT_DECODE_PARA = uintptr            /* wincrypt.h:1483:23 */

// szOID_KEY_USAGE is defined incorrectly in msdn as 2.5.29.4 --
//    http://www.oid-info.com/get/2.5.29.15 RFC3280

type X_CERT_EXTENSIONS = struct {
	FcExtension  DWORD
	F__ccgo_pad1 [4]byte
	FrgExtension PCERT_EXTENSION
} /* wincrypt.h:1876:11 */

// szOID_KEY_USAGE is defined incorrectly in msdn as 2.5.29.4 --
//    http://www.oid-info.com/get/2.5.29.15 RFC3280

type CERT_EXTENSIONS = X_CERT_EXTENSIONS /* wincrypt.h:1879:5 */
type PCERT_EXTENSIONS = uintptr          /* wincrypt.h:1879:21 */

type X_CERT_AUTHORITY_KEY_ID_INFO = struct {
	FKeyId            CRYPT_DATA_BLOB
	FCertIssuer       CERT_NAME_BLOB
	FCertSerialNumber CRYPT_INTEGER_BLOB
} /* wincrypt.h:1892:11 */

type CERT_AUTHORITY_KEY_ID_INFO = X_CERT_AUTHORITY_KEY_ID_INFO /* wincrypt.h:1896:5 */
type PCERT_AUTHORITY_KEY_ID_INFO = uintptr                     /* wincrypt.h:1896:32 */

type X_CERT_PRIVATE_KEY_VALIDITY = struct {
	FNotBefore FILETIME
	FNotAfter  FILETIME
} /* wincrypt.h:1898:11 */

type CERT_PRIVATE_KEY_VALIDITY = X_CERT_PRIVATE_KEY_VALIDITY /* wincrypt.h:1901:5 */
type PCERT_PRIVATE_KEY_VALIDITY = uintptr                    /* wincrypt.h:1901:31 */

type X_CERT_KEY_ATTRIBUTES_INFO = struct {
	FKeyId                  CRYPT_DATA_BLOB
	FIntendedKeyUsage       CRYPT_BIT_BLOB
	FpPrivateKeyUsagePeriod PCERT_PRIVATE_KEY_VALIDITY
} /* wincrypt.h:1903:11 */

type CERT_KEY_ATTRIBUTES_INFO = X_CERT_KEY_ATTRIBUTES_INFO /* wincrypt.h:1907:5 */
type PCERT_KEY_ATTRIBUTES_INFO = uintptr                   /* wincrypt.h:1907:30 */

type X_CERT_POLICY_ID = struct {
	FcCertPolicyElementId     DWORD
	F__ccgo_pad1              [4]byte
	FrgpszCertPolicyElementId uintptr
} /* wincrypt.h:1921:11 */

type CERT_POLICY_ID = X_CERT_POLICY_ID /* wincrypt.h:1924:5 */
type PCERT_POLICY_ID = uintptr         /* wincrypt.h:1924:20 */

type X_CERT_KEY_USAGE_RESTRICTION_INFO = struct {
	FcCertPolicyId      DWORD
	F__ccgo_pad1        [4]byte
	FrgCertPolicyId     PCERT_POLICY_ID
	FRestrictedKeyUsage CRYPT_BIT_BLOB
} /* wincrypt.h:1926:11 */

type CERT_KEY_USAGE_RESTRICTION_INFO = X_CERT_KEY_USAGE_RESTRICTION_INFO /* wincrypt.h:1930:5 */
type PCERT_KEY_USAGE_RESTRICTION_INFO = uintptr                          /* wincrypt.h:1930:37 */

type X_CERT_OTHER_NAME = struct {
	FpszObjId LPSTR
	FValue    CRYPT_OBJID_BLOB
} /* wincrypt.h:1932:11 */

type CERT_OTHER_NAME = X_CERT_OTHER_NAME /* wincrypt.h:1935:5 */
type PCERT_OTHER_NAME = uintptr          /* wincrypt.h:1935:21 */

type X_CERT_ALT_NAME_ENTRY = struct {
	FdwAltNameChoice DWORD
	F__ccgo_pad1     [4]byte
	F__8             struct {
		FpOtherName  PCERT_OTHER_NAME
		F__ccgo_pad1 [8]byte
	}
} /* wincrypt.h:1937:11 */

type CERT_ALT_NAME_ENTRY = X_CERT_ALT_NAME_ENTRY /* wincrypt.h:1959:5 */
type PCERT_ALT_NAME_ENTRY = uintptr              /* wincrypt.h:1959:25 */

type X_CERT_ALT_NAME_INFO = struct {
	FcAltEntry   DWORD
	F__ccgo_pad1 [4]byte
	FrgAltEntry  PCERT_ALT_NAME_ENTRY
} /* wincrypt.h:1971:11 */

type CERT_ALT_NAME_INFO = X_CERT_ALT_NAME_INFO /* wincrypt.h:1974:5 */
type PCERT_ALT_NAME_INFO = uintptr             /* wincrypt.h:1974:24 */

type X_CERT_BASIC_CONSTRAINTS_INFO = struct {
	FSubjectType          CRYPT_BIT_BLOB
	FfPathLenConstraint   WINBOOL
	FdwPathLenConstraint  DWORD
	FcSubtreesConstraint  DWORD
	F__ccgo_pad1          [4]byte
	FrgSubtreesConstraint uintptr
} /* wincrypt.h:1983:11 */

type CERT_BASIC_CONSTRAINTS_INFO = X_CERT_BASIC_CONSTRAINTS_INFO /* wincrypt.h:1989:5 */
type PCERT_BASIC_CONSTRAINTS_INFO = uintptr                      /* wincrypt.h:1989:34 */

type X_CERT_BASIC_CONSTRAINTS2_INFO = struct {
	FfCA                 WINBOOL
	FfPathLenConstraint  WINBOOL
	FdwPathLenConstraint DWORD
} /* wincrypt.h:1994:11 */

type CERT_BASIC_CONSTRAINTS2_INFO = X_CERT_BASIC_CONSTRAINTS2_INFO /* wincrypt.h:1998:5 */
type PCERT_BASIC_CONSTRAINTS2_INFO = uintptr                       /* wincrypt.h:1998:34 */

type X_CERT_POLICY_QUALIFIER_INFO = struct {
	FpszPolicyQualifierId LPSTR
	FQualifier            CRYPT_OBJID_BLOB
} /* wincrypt.h:2000:11 */

type CERT_POLICY_QUALIFIER_INFO = X_CERT_POLICY_QUALIFIER_INFO /* wincrypt.h:2003:5 */
type PCERT_POLICY_QUALIFIER_INFO = uintptr                     /* wincrypt.h:2003:32 */

type X_CERT_POLICY_INFO = struct {
	FpszPolicyIdentifier LPSTR
	FcPolicyQualifier    DWORD
	F__ccgo_pad1         [4]byte
	FrgPolicyQualifier   uintptr
} /* wincrypt.h:2005:11 */

type CERT_POLICY_INFO = X_CERT_POLICY_INFO /* wincrypt.h:2009:5 */
type PCERT_POLICY_INFO = uintptr           /* wincrypt.h:2009:22 */

type X_CERT_POLICIES_INFO = struct {
	FcPolicyInfo  DWORD
	F__ccgo_pad1  [4]byte
	FrgPolicyInfo uintptr
} /* wincrypt.h:2011:11 */

type CERT_POLICIES_INFO = X_CERT_POLICIES_INFO /* wincrypt.h:2014:5 */
type PCERT_POLICIES_INFO = uintptr             /* wincrypt.h:2014:24 */

type X_CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = struct {
	FpszOrganization LPSTR
	FcNoticeNumbers  DWORD
	F__ccgo_pad1     [4]byte
	FrgNoticeNumbers uintptr
} /* wincrypt.h:2016:11 */

type CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = X_CERT_POLICY_QUALIFIER_NOTICE_REFERENCE /* wincrypt.h:2020:5 */
type PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE = uintptr                                 /* wincrypt.h:2020:44 */

type X_CERT_POLICY_QUALIFIER_USER_NOTICE = struct {
	FpNoticeReference uintptr
	FpszDisplayText   LPWSTR
} /* wincrypt.h:2022:11 */

type CERT_POLICY_QUALIFIER_USER_NOTICE = X_CERT_POLICY_QUALIFIER_USER_NOTICE /* wincrypt.h:2025:5 */
type PCERT_POLICY_QUALIFIER_USER_NOTICE = uintptr                            /* wincrypt.h:2025:39 */

type X_CPS_URLS = struct {
	FpszURL     LPWSTR
	FpAlgorithm uintptr
	FpDigest    uintptr
} /* wincrypt.h:2027:11 */

type CPS_URLS = X_CPS_URLS /* wincrypt.h:2031:5 */
type PCPS_URLS = uintptr   /* wincrypt.h:2031:14 */

type X_CERT_POLICY95_QUALIFIER1 = struct {
	FpszPracticesReference  LPWSTR
	FpszNoticeIdentifier    LPSTR
	FpszNSINoticeIdentifier LPSTR
	FcCPSURLs               DWORD
	F__ccgo_pad1            [4]byte
	FrgCPSURLs              uintptr
} /* wincrypt.h:2033:11 */

type CERT_POLICY95_QUALIFIER1 = X_CERT_POLICY95_QUALIFIER1 /* wincrypt.h:2039:5 */
type PCERT_POLICY95_QUALIFIER1 = uintptr                   /* wincrypt.h:2039:30 */

type X_CERT_POLICY_MAPPING = struct {
	FpszIssuerDomainPolicy  LPSTR
	FpszSubjectDomainPolicy LPSTR
} /* wincrypt.h:2041:11 */

type CERT_POLICY_MAPPING = X_CERT_POLICY_MAPPING /* wincrypt.h:2044:5 */
type PCERT_POLICY_MAPPING = uintptr              /* wincrypt.h:2044:25 */

type X_CERT_POLICY_MAPPINGS_INFO = struct {
	FcPolicyMapping  DWORD
	F__ccgo_pad1     [4]byte
	FrgPolicyMapping PCERT_POLICY_MAPPING
} /* wincrypt.h:2046:11 */

type CERT_POLICY_MAPPINGS_INFO = X_CERT_POLICY_MAPPINGS_INFO /* wincrypt.h:2049:5 */
type PCERT_POLICY_MAPPINGS_INFO = uintptr                    /* wincrypt.h:2049:31 */

type X_CERT_POLICY_CONSTRAINTS_INFO = struct {
	FfRequireExplicitPolicy           WINBOOL
	FdwRequireExplicitPolicySkipCerts DWORD
	FfInhibitPolicyMapping            WINBOOL
	FdwInhibitPolicyMappingSkipCerts  DWORD
} /* wincrypt.h:2051:11 */

type CERT_POLICY_CONSTRAINTS_INFO = X_CERT_POLICY_CONSTRAINTS_INFO /* wincrypt.h:2056:5 */
type PCERT_POLICY_CONSTRAINTS_INFO = uintptr                       /* wincrypt.h:2056:34 */

type X_CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = struct {
	FpszObjId    LPSTR
	FcValue      DWORD
	F__ccgo_pad1 [4]byte
	FrgValue     PCRYPT_DER_BLOB
} /* wincrypt.h:2058:11 */

type CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = X_CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY /* wincrypt.h:2062:5 */
type PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = uintptr                             /* wincrypt.h:2062:40 */

type X_CRYPT_CONTENT_INFO = struct {
	FpszObjId LPSTR
	FContent  CRYPT_DER_BLOB
} /* wincrypt.h:2064:11 */

type CRYPT_CONTENT_INFO = X_CRYPT_CONTENT_INFO /* wincrypt.h:2067:5 */
type PCRYPT_CONTENT_INFO = uintptr             /* wincrypt.h:2067:24 */

type X_CRYPT_SEQUENCE_OF_ANY = struct {
	FcValue      DWORD
	F__ccgo_pad1 [4]byte
	FrgValue     PCRYPT_DER_BLOB
} /* wincrypt.h:2069:11 */

type CRYPT_SEQUENCE_OF_ANY = X_CRYPT_SEQUENCE_OF_ANY /* wincrypt.h:2072:5 */
type PCRYPT_SEQUENCE_OF_ANY = uintptr                /* wincrypt.h:2072:27 */

type X_CERT_AUTHORITY_KEY_ID2_INFO = struct {
	FKeyId                     CRYPT_DATA_BLOB
	FAuthorityCertIssuer       CERT_ALT_NAME_INFO
	FAuthorityCertSerialNumber CRYPT_INTEGER_BLOB
} /* wincrypt.h:2074:11 */

type CERT_AUTHORITY_KEY_ID2_INFO = X_CERT_AUTHORITY_KEY_ID2_INFO /* wincrypt.h:2078:5 */
type PCERT_AUTHORITY_KEY_ID2_INFO = uintptr                      /* wincrypt.h:2078:33 */

type X_CERT_ACCESS_DESCRIPTION = struct {
	FpszAccessMethod LPSTR
	FAccessLocation  CERT_ALT_NAME_ENTRY
} /* wincrypt.h:2080:11 */

type CERT_ACCESS_DESCRIPTION = X_CERT_ACCESS_DESCRIPTION /* wincrypt.h:2083:5 */
type PCERT_ACCESS_DESCRIPTION = uintptr                  /* wincrypt.h:2083:29 */

type X_CERT_AUTHORITY_INFO_ACCESS = struct {
	FcAccDescr   DWORD
	F__ccgo_pad1 [4]byte
	FrgAccDescr  PCERT_ACCESS_DESCRIPTION
} /* wincrypt.h:2085:11 */

type CERT_AUTHORITY_INFO_ACCESS = X_CERT_AUTHORITY_INFO_ACCESS /* wincrypt.h:2088:5 */
type PCERT_AUTHORITY_INFO_ACCESS = uintptr                     /* wincrypt.h:2088:32 */

type CERT_SUBJECT_INFO_ACCESS = CERT_AUTHORITY_INFO_ACCESS /* wincrypt.h:2090:38 */
type PCERT_SUBJECT_INFO_ACCESS = uintptr                   /* wincrypt.h:2090:63 */

type X_CRL_DIST_POINT_NAME = struct {
	FdwDistPointNameChoice DWORD
	F__ccgo_pad1           [4]byte
	F__8                   struct{ FFullName CERT_ALT_NAME_INFO }
} /* wincrypt.h:2109:11 */

type CRL_DIST_POINT_NAME = X_CRL_DIST_POINT_NAME /* wincrypt.h:2114:5 */
type PCRL_DIST_POINT_NAME = uintptr              /* wincrypt.h:2114:25 */

type X_CRL_DIST_POINT = struct {
	FDistPointName CRL_DIST_POINT_NAME
	FReasonFlags   CRYPT_BIT_BLOB
	FCRLIssuer     CERT_ALT_NAME_INFO
} /* wincrypt.h:2120:11 */

type CRL_DIST_POINT = X_CRL_DIST_POINT /* wincrypt.h:2124:5 */
type PCRL_DIST_POINT = uintptr         /* wincrypt.h:2124:20 */

type X_CRL_DIST_POINTS_INFO = struct {
	FcDistPoint  DWORD
	F__ccgo_pad1 [4]byte
	FrgDistPoint PCRL_DIST_POINT
} /* wincrypt.h:2136:11 */

type CRL_DIST_POINTS_INFO = X_CRL_DIST_POINTS_INFO /* wincrypt.h:2139:5 */
type PCRL_DIST_POINTS_INFO = uintptr               /* wincrypt.h:2139:26 */

type X_CROSS_CERT_DIST_POINTS_INFO = struct {
	FdwSyncDeltaTime DWORD
	FcDistPoint      DWORD
	FrgDistPoint     PCERT_ALT_NAME_INFO
} /* wincrypt.h:2148:11 */

type CROSS_CERT_DIST_POINTS_INFO = X_CROSS_CERT_DIST_POINTS_INFO /* wincrypt.h:2152:5 */
type PCROSS_CERT_DIST_POINTS_INFO = uintptr                      /* wincrypt.h:2152:33 */

type X_CERT_PAIR = struct {
	FForward CERT_BLOB
	FReverse CERT_BLOB
} /* wincrypt.h:2158:11 */

type CERT_PAIR = X_CERT_PAIR /* wincrypt.h:2161:5 */
type PCERT_PAIR = uintptr    /* wincrypt.h:2161:15 */

type X_CRL_ISSUING_DIST_POINT = struct {
	FDistPointName          CRL_DIST_POINT_NAME
	FfOnlyContainsUserCerts WINBOOL
	FfOnlyContainsCACerts   WINBOOL
	FOnlySomeReasonFlags    CRYPT_BIT_BLOB
	FfIndirectCRL           WINBOOL
	F__ccgo_pad1            [4]byte
} /* wincrypt.h:2163:11 */

type CRL_ISSUING_DIST_POINT = X_CRL_ISSUING_DIST_POINT /* wincrypt.h:2169:5 */
type PCRL_ISSUING_DIST_POINT = uintptr                 /* wincrypt.h:2169:28 */

type X_CERT_GENERAL_SUBTREE = struct {
	FBase        CERT_ALT_NAME_ENTRY
	FdwMinimum   DWORD
	FfMaximum    WINBOOL
	FdwMaximum   DWORD
	F__ccgo_pad1 [4]byte
} /* wincrypt.h:2171:11 */

type CERT_GENERAL_SUBTREE = X_CERT_GENERAL_SUBTREE /* wincrypt.h:2176:5 */
type PCERT_GENERAL_SUBTREE = uintptr               /* wincrypt.h:2176:26 */

type X_CERT_NAME_CONSTRAINTS_INFO = struct {
	FcPermittedSubtree  DWORD
	F__ccgo_pad1        [4]byte
	FrgPermittedSubtree PCERT_GENERAL_SUBTREE
	FcExcludedSubtree   DWORD
	F__ccgo_pad2        [4]byte
	FrgExcludedSubtree  PCERT_GENERAL_SUBTREE
} /* wincrypt.h:2178:11 */

type CERT_NAME_CONSTRAINTS_INFO = X_CERT_NAME_CONSTRAINTS_INFO /* wincrypt.h:2183:5 */
type PCERT_NAME_CONSTRAINTS_INFO = uintptr                     /* wincrypt.h:2183:32 */

type X_CERT_DSS_PARAMETERS = struct {
	Fp CRYPT_UINT_BLOB
	Fq CRYPT_UINT_BLOB
	Fg CRYPT_UINT_BLOB
} /* wincrypt.h:2195:11 */

type CERT_DSS_PARAMETERS = X_CERT_DSS_PARAMETERS /* wincrypt.h:2199:5 */
type PCERT_DSS_PARAMETERS = uintptr              /* wincrypt.h:2199:25 */

type X_CERT_DH_PARAMETERS = struct {
	Fp CRYPT_UINT_BLOB
	Fg CRYPT_UINT_BLOB
} /* wincrypt.h:2207:11 */

type CERT_DH_PARAMETERS = X_CERT_DH_PARAMETERS /* wincrypt.h:2210:5 */
type PCERT_DH_PARAMETERS = uintptr             /* wincrypt.h:2210:24 */

type X_CERT_ECC_SIGNATURE = struct {
	Fr CRYPT_UINT_BLOB
	Fs CRYPT_UINT_BLOB
} /* wincrypt.h:2212:11 */

type CERT_ECC_SIGNATURE = X_CERT_ECC_SIGNATURE /* wincrypt.h:2215:5 */
type PCERT_ECC_SIGNATURE = uintptr             /* wincrypt.h:2215:24 */

type X_CERT_X942_DH_VALIDATION_PARAMS = struct {
	Fseed        CRYPT_BIT_BLOB
	FpgenCounter DWORD
	F__ccgo_pad1 [4]byte
} /* wincrypt.h:2217:11 */

type CERT_X942_DH_VALIDATION_PARAMS = X_CERT_X942_DH_VALIDATION_PARAMS /* wincrypt.h:2220:5 */
type PCERT_X942_DH_VALIDATION_PARAMS = uintptr                         /* wincrypt.h:2220:36 */

type X_CERT_X942_DH_PARAMETERS = struct {
	Fp                 CRYPT_UINT_BLOB
	Fg                 CRYPT_UINT_BLOB
	Fq                 CRYPT_UINT_BLOB
	Fj                 CRYPT_UINT_BLOB
	FpValidationParams PCERT_X942_DH_VALIDATION_PARAMS
} /* wincrypt.h:2222:11 */

type CERT_X942_DH_PARAMETERS = X_CERT_X942_DH_PARAMETERS /* wincrypt.h:2228:5 */
type PCERT_X942_DH_PARAMETERS = uintptr                  /* wincrypt.h:2228:29 */

type X_CRYPT_X942_OTHER_INFO = struct {
	FpszContentEncryptionObjId LPSTR
	FrgbCounter                [4]BYTE
	FrgbKeyLength              [4]BYTE
	FPubInfo                   CRYPT_DATA_BLOB
} /* wincrypt.h:2234:11 */

type CRYPT_X942_OTHER_INFO = X_CRYPT_X942_OTHER_INFO /* wincrypt.h:2239:5 */
type PCRYPT_X942_OTHER_INFO = uintptr                /* wincrypt.h:2239:27 */

type X_CRYPT_ECC_CMS_SHARED_INFO = struct {
	FAlgorithm      CRYPT_ALGORITHM_IDENTIFIER
	FEntityUInfo    CRYPT_DATA_BLOB
	FrgbSuppPubInfo [4]BYTE
	F__ccgo_pad1    [4]byte
} /* wincrypt.h:2243:11 */

type CRYPT_ECC_CMS_SHARED_INFO = X_CRYPT_ECC_CMS_SHARED_INFO /* wincrypt.h:2247:5 */
type PCRYPT_ECC_CMS_SHARED_INFO = uintptr                    /* wincrypt.h:2247:31 */

type X_CRYPT_RC2_CBC_PARAMETERS = struct {
	FdwVersion DWORD
	FfIV       WINBOOL
	FrgbIV     [8]BYTE
} /* wincrypt.h:2249:11 */

type CRYPT_RC2_CBC_PARAMETERS = X_CRYPT_RC2_CBC_PARAMETERS /* wincrypt.h:2253:5 */
type PCRYPT_RC2_CBC_PARAMETERS = uintptr                   /* wincrypt.h:2253:30 */

type X_CRYPT_SMIME_CAPABILITY = struct {
	FpszObjId   LPSTR
	FParameters CRYPT_OBJID_BLOB
} /* wincrypt.h:2260:11 */

type CRYPT_SMIME_CAPABILITY = X_CRYPT_SMIME_CAPABILITY /* wincrypt.h:2263:5 */
type PCRYPT_SMIME_CAPABILITY = uintptr                 /* wincrypt.h:2263:28 */

type X_CRYPT_SMIME_CAPABILITIES = struct {
	FcCapability  DWORD
	F__ccgo_pad1  [4]byte
	FrgCapability PCRYPT_SMIME_CAPABILITY
} /* wincrypt.h:2265:11 */

type CRYPT_SMIME_CAPABILITIES = X_CRYPT_SMIME_CAPABILITIES /* wincrypt.h:2268:5 */
type PCRYPT_SMIME_CAPABILITIES = uintptr                   /* wincrypt.h:2268:30 */

type X_CERT_QC_STATEMENT = struct {
	FpszStatementId LPSTR
	FStatementInfo  CRYPT_OBJID_BLOB
} /* wincrypt.h:2270:11 */

type CERT_QC_STATEMENT = X_CERT_QC_STATEMENT /* wincrypt.h:2273:5 */
type PCERT_QC_STATEMENT = uintptr            /* wincrypt.h:2273:23 */

type X_CERT_QC_STATEMENTS_EXT_INFO = struct {
	FcStatement  DWORD
	F__ccgo_pad1 [4]byte
	FrgStatement PCERT_QC_STATEMENT
} /* wincrypt.h:2275:11 */

type CERT_QC_STATEMENTS_EXT_INFO = X_CERT_QC_STATEMENTS_EXT_INFO /* wincrypt.h:2278:5 */
type PCERT_QC_STATEMENTS_EXT_INFO = uintptr                      /* wincrypt.h:2278:33 */

type X_CRYPT_MASK_GEN_ALGORITHM = struct {
	FpszObjId      LPSTR
	FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER
} /* wincrypt.h:2283:11 */

type CRYPT_MASK_GEN_ALGORITHM = X_CRYPT_MASK_GEN_ALGORITHM /* wincrypt.h:2286:5 */
type PCRYPT_MASK_GEN_ALGORITHM = uintptr                   /* wincrypt.h:2286:30 */

type X_CRYPT_RSA_SSA_PSS_PARAMETERS = struct {
	FHashAlgorithm    CRYPT_ALGORITHM_IDENTIFIER
	FMaskGenAlgorithm CRYPT_MASK_GEN_ALGORITHM
	FdwSaltLength     DWORD
	FdwTrailerField   DWORD
} /* wincrypt.h:2288:11 */

type CRYPT_RSA_SSA_PSS_PARAMETERS = X_CRYPT_RSA_SSA_PSS_PARAMETERS /* wincrypt.h:2293:5 */
type PCRYPT_RSA_SSA_PSS_PARAMETERS = uintptr                       /* wincrypt.h:2293:34 */

type X_CRYPT_PSOURCE_ALGORITHM = struct {
	FpszObjId           LPSTR
	FEncodingParameters CRYPT_DATA_BLOB
} /* wincrypt.h:2297:11 */

type CRYPT_PSOURCE_ALGORITHM = X_CRYPT_PSOURCE_ALGORITHM /* wincrypt.h:2300:5 */
type PCRYPT_PSOURCE_ALGORITHM = uintptr                  /* wincrypt.h:2300:29 */

type X_CRYPT_RSAES_OAEP_PARAMETERS = struct {
	FHashAlgorithm    CRYPT_ALGORITHM_IDENTIFIER
	FMaskGenAlgorithm CRYPT_MASK_GEN_ALGORITHM
	FPSourceAlgorithm CRYPT_PSOURCE_ALGORITHM
} /* wincrypt.h:2302:11 */

type CRYPT_RSAES_OAEP_PARAMETERS = X_CRYPT_RSAES_OAEP_PARAMETERS /* wincrypt.h:2306:5 */
type PCRYPT_RSAES_OAEP_PARAMETERS = uintptr                      /* wincrypt.h:2306:33 */

type X_CMC_TAGGED_ATTRIBUTE = struct {
	FdwBodyPartID DWORD
	F__ccgo_pad1  [4]byte
	FAttribute    CRYPT_ATTRIBUTE
} /* wincrypt.h:2374:11 */

type CMC_TAGGED_ATTRIBUTE = X_CMC_TAGGED_ATTRIBUTE /* wincrypt.h:2377:5 */
type PCMC_TAGGED_ATTRIBUTE = uintptr               /* wincrypt.h:2377:26 */

type X_CMC_TAGGED_CERT_REQUEST = struct {
	FdwBodyPartID      DWORD
	F__ccgo_pad1       [4]byte
	FSignedCertRequest CRYPT_DER_BLOB
} /* wincrypt.h:2379:11 */

type CMC_TAGGED_CERT_REQUEST = X_CMC_TAGGED_CERT_REQUEST /* wincrypt.h:2382:5 */
type PCMC_TAGGED_CERT_REQUEST = uintptr                  /* wincrypt.h:2382:29 */

type X_CMC_TAGGED_REQUEST = struct {
	FdwTaggedRequestChoice DWORD
	F__ccgo_pad1           [4]byte
	F__8                   struct{ FpTaggedCertRequest PCMC_TAGGED_CERT_REQUEST }
} /* wincrypt.h:2384:11 */

type CMC_TAGGED_REQUEST = X_CMC_TAGGED_REQUEST /* wincrypt.h:2389:5 */
type PCMC_TAGGED_REQUEST = uintptr             /* wincrypt.h:2389:24 */

type X_CMC_TAGGED_CONTENT_INFO = struct {
	FdwBodyPartID       DWORD
	F__ccgo_pad1        [4]byte
	FEncodedContentInfo CRYPT_DER_BLOB
} /* wincrypt.h:2393:11 */

type CMC_TAGGED_CONTENT_INFO = X_CMC_TAGGED_CONTENT_INFO /* wincrypt.h:2396:5 */
type PCMC_TAGGED_CONTENT_INFO = uintptr                  /* wincrypt.h:2396:29 */

type X_CMC_TAGGED_OTHER_MSG = struct {
	FdwBodyPartID DWORD
	F__ccgo_pad1  [4]byte
	FpszObjId     LPSTR
	FValue        CRYPT_OBJID_BLOB
} /* wincrypt.h:2398:11 */

type CMC_TAGGED_OTHER_MSG = X_CMC_TAGGED_OTHER_MSG /* wincrypt.h:2402:5 */
type PCMC_TAGGED_OTHER_MSG = uintptr               /* wincrypt.h:2402:26 */

type X_CMC_DATA_INFO = struct {
	FcTaggedAttribute    DWORD
	F__ccgo_pad1         [4]byte
	FrgTaggedAttribute   PCMC_TAGGED_ATTRIBUTE
	FcTaggedRequest      DWORD
	F__ccgo_pad2         [4]byte
	FrgTaggedRequest     PCMC_TAGGED_REQUEST
	FcTaggedContentInfo  DWORD
	F__ccgo_pad3         [4]byte
	FrgTaggedContentInfo PCMC_TAGGED_CONTENT_INFO
	FcTaggedOtherMsg     DWORD
	F__ccgo_pad4         [4]byte
	FrgTaggedOtherMsg    PCMC_TAGGED_OTHER_MSG
} /* wincrypt.h:2404:11 */

type CMC_DATA_INFO = X_CMC_DATA_INFO /* wincrypt.h:2413:5 */
type PCMC_DATA_INFO = uintptr        /* wincrypt.h:2413:19 */

type X_CMC_RESPONSE_INFO = struct {
	FcTaggedAttribute    DWORD
	F__ccgo_pad1         [4]byte
	FrgTaggedAttribute   PCMC_TAGGED_ATTRIBUTE
	FcTaggedContentInfo  DWORD
	F__ccgo_pad2         [4]byte
	FrgTaggedContentInfo PCMC_TAGGED_CONTENT_INFO
	FcTaggedOtherMsg     DWORD
	F__ccgo_pad3         [4]byte
	FrgTaggedOtherMsg    PCMC_TAGGED_OTHER_MSG
} /* wincrypt.h:2415:11 */

type CMC_RESPONSE_INFO = X_CMC_RESPONSE_INFO /* wincrypt.h:2422:5 */
type PCMC_RESPONSE_INFO = uintptr            /* wincrypt.h:2422:23 */

type X_CMC_PEND_INFO = struct {
	FPendToken CRYPT_DATA_BLOB
	FPendTime  FILETIME
} /* wincrypt.h:2424:11 */

type CMC_PEND_INFO = X_CMC_PEND_INFO /* wincrypt.h:2427:5 */
type PCMC_PEND_INFO = uintptr        /* wincrypt.h:2427:19 */

type X_CMC_STATUS_INFO = struct {
	FdwStatus          DWORD
	FcBodyList         DWORD
	FrgdwBodyList      uintptr
	FpwszStatusString  LPWSTR
	FdwOtherInfoChoice DWORD
	F__ccgo_pad1       [4]byte
	F__32              struct {
		F__ccgo_pad1 [0]uint64
		FdwFailInfo  DWORD
		F__ccgo_pad2 [4]byte
	}
} /* wincrypt.h:2429:11 */

type CMC_STATUS_INFO = X_CMC_STATUS_INFO /* wincrypt.h:2439:5 */
type PCMC_STATUS_INFO = uintptr          /* wincrypt.h:2439:21 */

type X_CMC_ADD_EXTENSIONS_INFO = struct {
	FdwCmcDataReference DWORD
	FcCertReference     DWORD
	FrgdwCertReference  uintptr
	FcExtension         DWORD
	F__ccgo_pad1        [4]byte
	FrgExtension        PCERT_EXTENSION
} /* wincrypt.h:2465:11 */

type CMC_ADD_EXTENSIONS_INFO = X_CMC_ADD_EXTENSIONS_INFO /* wincrypt.h:2471:5 */
type PCMC_ADD_EXTENSIONS_INFO = uintptr                  /* wincrypt.h:2471:29 */

type X_CMC_ADD_ATTRIBUTES_INFO = struct {
	FdwCmcDataReference DWORD
	FcCertReference     DWORD
	FrgdwCertReference  uintptr
	FcAttribute         DWORD
	F__ccgo_pad1        [4]byte
	FrgAttribute        PCRYPT_ATTRIBUTE
} /* wincrypt.h:2473:11 */

type CMC_ADD_ATTRIBUTES_INFO = X_CMC_ADD_ATTRIBUTES_INFO /* wincrypt.h:2479:5 */
type PCMC_ADD_ATTRIBUTES_INFO = uintptr                  /* wincrypt.h:2479:29 */

type X_CERT_TEMPLATE_EXT = struct {
	FpszObjId       LPSTR
	FdwMajorVersion DWORD
	FfMinorVersion  WINBOOL
	FdwMinorVersion DWORD
	F__ccgo_pad1    [4]byte
} /* wincrypt.h:2481:11 */

type CERT_TEMPLATE_EXT = X_CERT_TEMPLATE_EXT /* wincrypt.h:2486:5 */
type PCERT_TEMPLATE_EXT = uintptr            /* wincrypt.h:2486:23 */

type X_CERT_HASHED_URL = struct {
	FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FHash          CRYPT_HASH_BLOB
	FpwszUrl       LPWSTR
} /* wincrypt.h:2488:11 */

type CERT_HASHED_URL = X_CERT_HASHED_URL /* wincrypt.h:2492:5 */
type PCERT_HASHED_URL = uintptr          /* wincrypt.h:2492:21 */

type X_CERT_LOGOTYPE_DETAILS = struct {
	FpwszMimeType LPWSTR
	FcHashedUrl   DWORD
	F__ccgo_pad1  [4]byte
	FrgHashedUrl  PCERT_HASHED_URL
} /* wincrypt.h:2494:11 */

type CERT_LOGOTYPE_DETAILS = X_CERT_LOGOTYPE_DETAILS /* wincrypt.h:2498:5 */
type PCERT_LOGOTYPE_DETAILS = uintptr                /* wincrypt.h:2498:27 */

type X_CERT_LOGOTYPE_REFERENCE = struct {
	FcHashedUrl  DWORD
	F__ccgo_pad1 [4]byte
	FrgHashedUrl PCERT_HASHED_URL
} /* wincrypt.h:2500:11 */

type CERT_LOGOTYPE_REFERENCE = X_CERT_LOGOTYPE_REFERENCE /* wincrypt.h:2503:5 */
type PCERT_LOGOTYPE_REFERENCE = uintptr                  /* wincrypt.h:2503:29 */

type X_CERT_LOGOTYPE_IMAGE_INFO = struct {
	FdwLogotypeImageInfoChoice       DWORD
	FdwFileSize                      DWORD
	FdwXSize                         DWORD
	FdwYSize                         DWORD
	FdwLogotypeImageResolutionChoice DWORD
	F__20                            struct{ FdwNumBits DWORD }
	FpwszLanguage                    LPWSTR
} /* wincrypt.h:2505:11 */

type CERT_LOGOTYPE_IMAGE_INFO = X_CERT_LOGOTYPE_IMAGE_INFO /* wincrypt.h:2516:5 */
type PCERT_LOGOTYPE_IMAGE_INFO = uintptr                   /* wincrypt.h:2516:30 */

type X_CERT_LOGOTYPE_IMAGE = struct {
	FLogotypeDetails    CERT_LOGOTYPE_DETAILS
	FpLogotypeImageInfo PCERT_LOGOTYPE_IMAGE_INFO
} /* wincrypt.h:2525:11 */

type CERT_LOGOTYPE_IMAGE = X_CERT_LOGOTYPE_IMAGE /* wincrypt.h:2528:5 */
type PCERT_LOGOTYPE_IMAGE = uintptr              /* wincrypt.h:2528:25 */

type X_CERT_LOGOTYPE_AUDIO_INFO = struct {
	FdwFileSize   DWORD
	FdwPlayTime   DWORD
	FdwChannels   DWORD
	FdwSampleRate DWORD
	FpwszLanguage LPWSTR
} /* wincrypt.h:2530:11 */

type CERT_LOGOTYPE_AUDIO_INFO = X_CERT_LOGOTYPE_AUDIO_INFO /* wincrypt.h:2536:5 */
type PCERT_LOGOTYPE_AUDIO_INFO = uintptr                   /* wincrypt.h:2536:30 */

type X_CERT_LOGOTYPE_AUDIO = struct {
	FLogotypeDetails    CERT_LOGOTYPE_DETAILS
	FpLogotypeAudioInfo PCERT_LOGOTYPE_AUDIO_INFO
} /* wincrypt.h:2538:11 */

type CERT_LOGOTYPE_AUDIO = X_CERT_LOGOTYPE_AUDIO /* wincrypt.h:2541:5 */
type PCERT_LOGOTYPE_AUDIO = uintptr              /* wincrypt.h:2541:25 */

type X_CERT_LOGOTYPE_DATA = struct {
	FcLogotypeImage  DWORD
	F__ccgo_pad1     [4]byte
	FrgLogotypeImage PCERT_LOGOTYPE_IMAGE
	FcLogotypeAudio  DWORD
	F__ccgo_pad2     [4]byte
	FrgLogotypeAudio PCERT_LOGOTYPE_AUDIO
} /* wincrypt.h:2543:11 */

type CERT_LOGOTYPE_DATA = X_CERT_LOGOTYPE_DATA /* wincrypt.h:2548:5 */
type PCERT_LOGOTYPE_DATA = uintptr             /* wincrypt.h:2548:24 */

type X_CERT_LOGOTYPE_INFO = struct {
	FdwLogotypeInfoChoice DWORD
	F__ccgo_pad1          [4]byte
	F__8                  struct{ FpLogotypeDirectInfo PCERT_LOGOTYPE_DATA }
} /* wincrypt.h:2550:11 */

type CERT_LOGOTYPE_INFO = X_CERT_LOGOTYPE_INFO /* wincrypt.h:2556:5 */
type PCERT_LOGOTYPE_INFO = uintptr             /* wincrypt.h:2556:24 */

type X_CERT_OTHER_LOGOTYPE_INFO = struct {
	FpszObjId     LPSTR
	FLogotypeInfo CERT_LOGOTYPE_INFO
} /* wincrypt.h:2561:11 */

type CERT_OTHER_LOGOTYPE_INFO = X_CERT_OTHER_LOGOTYPE_INFO /* wincrypt.h:2564:5 */
type PCERT_OTHER_LOGOTYPE_INFO = uintptr                   /* wincrypt.h:2564:30 */

type X_CERT_LOGOTYPE_EXT_INFO = struct {
	FcCommunityLogo  DWORD
	F__ccgo_pad1     [4]byte
	FrgCommunityLogo PCERT_LOGOTYPE_INFO
	FpIssuerLogo     PCERT_LOGOTYPE_INFO
	FpSubjectLogo    PCERT_LOGOTYPE_INFO
	FcOtherLogo      DWORD
	F__ccgo_pad2     [4]byte
	FrgOtherLogo     PCERT_OTHER_LOGOTYPE_INFO
} /* wincrypt.h:2569:11 */

type CERT_LOGOTYPE_EXT_INFO = X_CERT_LOGOTYPE_EXT_INFO /* wincrypt.h:2576:5 */
type PCERT_LOGOTYPE_EXT_INFO = uintptr                 /* wincrypt.h:2576:28 */

type X_CERT_BIOMETRIC_DATA = struct {
	FdwTypeOfBiometricDataChoice DWORD
	F__ccgo_pad1                 [4]byte
	F__8                         struct {
		F__ccgo_pad1  [0]uint64
		FdwPredefined DWORD
		F__ccgo_pad2  [4]byte
	}
	FHashedUrl CERT_HASHED_URL
} /* wincrypt.h:2578:11 */

type CERT_BIOMETRIC_DATA = X_CERT_BIOMETRIC_DATA /* wincrypt.h:2585:5 */
type PCERT_BIOMETRIC_DATA = uintptr              /* wincrypt.h:2585:25 */

type X_CERT_BIOMETRIC_EXT_INFO = struct {
	FcBiometricData  DWORD
	F__ccgo_pad1     [4]byte
	FrgBiometricData PCERT_BIOMETRIC_DATA
} /* wincrypt.h:2593:11 */

type CERT_BIOMETRIC_EXT_INFO = X_CERT_BIOMETRIC_EXT_INFO /* wincrypt.h:2596:5 */
type PCERT_BIOMETRIC_EXT_INFO = uintptr                  /* wincrypt.h:2596:29 */

type X_OCSP_SIGNATURE_INFO = struct {
	FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FSignature          CRYPT_BIT_BLOB
	FcCertEncoded       DWORD
	F__ccgo_pad1        [4]byte
	FrgCertEncoded      PCERT_BLOB
} /* wincrypt.h:2598:11 */

type OCSP_SIGNATURE_INFO = X_OCSP_SIGNATURE_INFO /* wincrypt.h:2603:5 */
type POCSP_SIGNATURE_INFO = uintptr              /* wincrypt.h:2603:25 */

type X_OCSP_SIGNED_REQUEST_INFO = struct {
	FToBeSigned             CRYPT_DER_BLOB
	FpOptionalSignatureInfo POCSP_SIGNATURE_INFO
} /* wincrypt.h:2605:11 */

type OCSP_SIGNED_REQUEST_INFO = X_OCSP_SIGNED_REQUEST_INFO /* wincrypt.h:2608:5 */
type POCSP_SIGNED_REQUEST_INFO = uintptr                   /* wincrypt.h:2608:30 */

type X_OCSP_CERT_ID = struct {
	FHashAlgorithm  CRYPT_ALGORITHM_IDENTIFIER
	FIssuerNameHash CRYPT_HASH_BLOB
	FIssuerKeyHash  CRYPT_HASH_BLOB
	FSerialNumber   CRYPT_INTEGER_BLOB
} /* wincrypt.h:2610:11 */

type OCSP_CERT_ID = X_OCSP_CERT_ID /* wincrypt.h:2615:5 */
type POCSP_CERT_ID = uintptr       /* wincrypt.h:2615:18 */

type X_OCSP_REQUEST_ENTRY = struct {
	FCertId      OCSP_CERT_ID
	FcExtension  DWORD
	F__ccgo_pad1 [4]byte
	FrgExtension PCERT_EXTENSION
} /* wincrypt.h:2617:11 */

type OCSP_REQUEST_ENTRY = X_OCSP_REQUEST_ENTRY /* wincrypt.h:2621:5 */
type POCSP_REQUEST_ENTRY = uintptr             /* wincrypt.h:2621:24 */

type X_OCSP_REQUEST_INFO = struct {
	FdwVersion      DWORD
	F__ccgo_pad1    [4]byte
	FpRequestorName PCERT_ALT_NAME_ENTRY
	FcRequestEntry  DWORD
	F__ccgo_pad2    [4]byte
	FrgRequestEntry POCSP_REQUEST_ENTRY
	FcExtension     DWORD
	F__ccgo_pad3    [4]byte
	FrgExtension    PCERT_EXTENSION
} /* wincrypt.h:2623:11 */

type OCSP_REQUEST_INFO = X_OCSP_REQUEST_INFO /* wincrypt.h:2630:5 */
type POCSP_REQUEST_INFO = uintptr            /* wincrypt.h:2630:23 */

type X_OCSP_RESPONSE_INFO = struct {
	FdwStatus    DWORD
	F__ccgo_pad1 [4]byte
	FpszObjId    LPSTR
	FValue       CRYPT_OBJID_BLOB
} /* wincrypt.h:2634:11 */

type OCSP_RESPONSE_INFO = X_OCSP_RESPONSE_INFO /* wincrypt.h:2638:5 */
type POCSP_RESPONSE_INFO = uintptr             /* wincrypt.h:2638:24 */

type X_OCSP_BASIC_SIGNED_RESPONSE_INFO = struct {
	FToBeSigned    CRYPT_DER_BLOB
	FSignatureInfo OCSP_SIGNATURE_INFO
} /* wincrypt.h:2649:11 */

type OCSP_BASIC_SIGNED_RESPONSE_INFO = X_OCSP_BASIC_SIGNED_RESPONSE_INFO /* wincrypt.h:2652:5 */
type POCSP_BASIC_SIGNED_RESPONSE_INFO = uintptr                          /* wincrypt.h:2652:37 */

type X_OCSP_BASIC_REVOKED_INFO = struct {
	FRevocationDate  FILETIME
	FdwCrlReasonCode DWORD
} /* wincrypt.h:2654:11 */

type OCSP_BASIC_REVOKED_INFO = X_OCSP_BASIC_REVOKED_INFO /* wincrypt.h:2657:5 */
type POCSP_BASIC_REVOKED_INFO = uintptr                  /* wincrypt.h:2657:29 */

type X_OCSP_BASIC_RESPONSE_ENTRY = struct {
	FCertId       OCSP_CERT_ID
	FdwCertStatus DWORD
	F__ccgo_pad1  [4]byte
	F__80         struct{ FpRevokedInfo POCSP_BASIC_REVOKED_INFO }
	FThisUpdate   FILETIME
	FNextUpdate   FILETIME
	FcExtension   DWORD
	F__ccgo_pad2  [4]byte
	FrgExtension  PCERT_EXTENSION
} /* wincrypt.h:2659:11 */

type OCSP_BASIC_RESPONSE_ENTRY = X_OCSP_BASIC_RESPONSE_ENTRY /* wincrypt.h:2669:5 */
type POCSP_BASIC_RESPONSE_ENTRY = uintptr                    /* wincrypt.h:2669:31 */

type X_OCSP_BASIC_RESPONSE_INFO = struct {
	FdwVersion           DWORD
	FdwResponderIdChoice DWORD
	F__8                 struct{ FByNameResponderId CERT_NAME_BLOB }
	FProducedAt          FILETIME
	FcResponseEntry      DWORD
	F__ccgo_pad1         [4]byte
	FrgResponseEntry     POCSP_BASIC_RESPONSE_ENTRY
	FcExtension          DWORD
	F__ccgo_pad2         [4]byte
	FrgExtension         PCERT_EXTENSION
} /* wincrypt.h:2675:11 */

type OCSP_BASIC_RESPONSE_INFO = X_OCSP_BASIC_RESPONSE_INFO /* wincrypt.h:2687:5 */
type POCSP_BASIC_RESPONSE_INFO = uintptr                   /* wincrypt.h:2687:30 */

type X_CERT_SUPPORTED_ALGORITHM_INFO = struct {
	FAlgorithm            CRYPT_ALGORITHM_IDENTIFIER
	FIntendedKeyUsage     CRYPT_BIT_BLOB
	FIntendedCertPolicies CERT_POLICIES_INFO
} /* wincrypt.h:2693:11 */

type CERT_SUPPORTED_ALGORITHM_INFO = X_CERT_SUPPORTED_ALGORITHM_INFO /* wincrypt.h:2697:5 */
type PCERT_SUPPORTED_ALGORITHM_INFO = uintptr                        /* wincrypt.h:2697:36 */

type X_CERT_TPM_SPECIFICATION_INFO = struct {
	FpwszFamily LPWSTR
	FdwLevel    DWORD
	FdwRevision DWORD
} /* wincrypt.h:2699:11 */

type CERT_TPM_SPECIFICATION_INFO = X_CERT_TPM_SPECIFICATION_INFO /* wincrypt.h:2703:5 */
type PCERT_TPM_SPECIFICATION_INFO = uintptr                      /* wincrypt.h:2703:34 */

type HCRYPTOIDFUNCSET = uintptr  /* wincrypt.h:2705:16 */
type HCRYPTOIDFUNCADDR = uintptr /* wincrypt.h:2706:16 */

type X_CRYPT_OID_FUNC_ENTRY = struct {
	FpszOID     LPCSTR
	FpvFuncAddr uintptr
} /* wincrypt.h:2729:11 */

type CRYPT_OID_FUNC_ENTRY = X_CRYPT_OID_FUNC_ENTRY /* wincrypt.h:2732:5 */
type PCRYPT_OID_FUNC_ENTRY = uintptr               /* wincrypt.h:2732:26 */

type PFN_CRYPT_ENUM_OID_FUNC = uintptr /* wincrypt.h:2753:19 */

type X_CRYPT_OID_INFO = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FpszOID      LPCSTR
	FpwszName    LPCWSTR
	FdwGroupId   DWORD
	F__28        struct{ FdwValue DWORD }
	FExtraInfo   CRYPT_DATA_BLOB
} /* wincrypt.h:2770:11 */

type CRYPT_OID_INFO = X_CRYPT_OID_INFO /* wincrypt.h:2785:5 */
type PCRYPT_OID_INFO = uintptr         /* wincrypt.h:2785:20 */

type CCRYPT_OID_INFO = CRYPT_OID_INFO /* wincrypt.h:2787:32 */
type PCCRYPT_OID_INFO = uintptr       /* wincrypt.h:2787:48 */

type PFN_CRYPT_ENUM_OID_INFO = uintptr /* wincrypt.h:2837:19 */

type X_CERT_STRONG_SIGN_SERIALIZED_INFO = struct {
	FdwFlags                    DWORD
	F__ccgo_pad1                [4]byte
	FpwszCNGSignHashAlgids      LPWSTR
	FpwszCNGPubKeyMinBitLengths LPWSTR
} /* wincrypt.h:2849:11 */

type CERT_STRONG_SIGN_SERIALIZED_INFO = X_CERT_STRONG_SIGN_SERIALIZED_INFO /* wincrypt.h:2853:5 */
type PCERT_STRONG_SIGN_SERIALIZED_INFO = uintptr                           /* wincrypt.h:2853:38 */

type X_CERT_STRONG_SIGN_PARA = struct {
	FcbSize       DWORD
	FdwInfoChoice DWORD
	F__8          struct{ FpvInfo uintptr }
} /* wincrypt.h:2855:11 */

type CERT_STRONG_SIGN_PARA = X_CERT_STRONG_SIGN_PARA /* wincrypt.h:2863:5 */
type PCERT_STRONG_SIGN_PARA = uintptr                /* wincrypt.h:2863:27 */

type PCCERT_STRONG_SIGN_PARA = uintptr /* wincrypt.h:2865:39 */

type HCRYPTMSG = uintptr /* wincrypt.h:2888:16 */

type X_CERT_ISSUER_SERIAL_NUMBER = struct {
	FIssuer       CERT_NAME_BLOB
	FSerialNumber CRYPT_INTEGER_BLOB
} /* wincrypt.h:2915:11 */

type CERT_ISSUER_SERIAL_NUMBER = X_CERT_ISSUER_SERIAL_NUMBER /* wincrypt.h:2918:5 */
type PCERT_ISSUER_SERIAL_NUMBER = uintptr                    /* wincrypt.h:2918:31 */

type X_CERT_ID = struct {
	FdwIdChoice  DWORD
	F__ccgo_pad1 [4]byte
	F__8         struct{ FIssuerSerialNumber CERT_ISSUER_SERIAL_NUMBER }
} /* wincrypt.h:2920:11 */

type CERT_ID = X_CERT_ID /* wincrypt.h:2927:5 */
type PCERT_ID = uintptr  /* wincrypt.h:2927:13 */

type X_CMSG_SIGNER_ENCODE_INFO = struct {
	FcbSize        DWORD
	F__ccgo_pad1   [4]byte
	FpCertInfo     PCERT_INFO
	F__16          struct{ FhCryptProv HCRYPTPROV }
	FdwKeySpec     DWORD
	F__ccgo_pad2   [4]byte
	FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FpvHashAuxInfo uintptr
	FcAuthAttr     DWORD
	F__ccgo_pad3   [4]byte
	FrgAuthAttr    PCRYPT_ATTRIBUTE
	FcUnauthAttr   DWORD
	F__ccgo_pad4   [4]byte
	FrgUnauthAttr  PCRYPT_ATTRIBUTE
} /* wincrypt.h:2933:11 */

type CMSG_SIGNER_ENCODE_INFO = X_CMSG_SIGNER_ENCODE_INFO /* wincrypt.h:2952:5 */
type PCMSG_SIGNER_ENCODE_INFO = uintptr                  /* wincrypt.h:2952:29 */

type X_CMSG_SIGNED_ENCODE_INFO = struct {
	FcbSize        DWORD
	FcSigners      DWORD
	FrgSigners     PCMSG_SIGNER_ENCODE_INFO
	FcCertEncoded  DWORD
	F__ccgo_pad1   [4]byte
	FrgCertEncoded PCERT_BLOB
	FcCrlEncoded   DWORD
	F__ccgo_pad2   [4]byte
	FrgCrlEncoded  PCRL_BLOB
} /* wincrypt.h:2954:11 */

type CMSG_SIGNED_ENCODE_INFO = X_CMSG_SIGNED_ENCODE_INFO /* wincrypt.h:2966:5 */
type PCMSG_SIGNED_ENCODE_INFO = uintptr                  /* wincrypt.h:2966:29 */

type X_CMSG_RECIPIENT_ENCODE_INFO = struct {
	FdwRecipientChoice DWORD
	F__ccgo_pad1       [4]byte
	F__8               struct {
		FpKeyTrans PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO
	}
} /* wincrypt.h:2968:11 */

type CMSG_RECIPIENT_ENCODE_INFO = X_CMSG_RECIPIENT_ENCODE_INFO /* wincrypt.h:2968:46 */
type PCMSG_RECIPIENT_ENCODE_INFO = uintptr                     /* wincrypt.h:2968:73 */

type X_CMSG_ENVELOPED_ENCODE_INFO = struct {
	FcbSize                     DWORD
	F__ccgo_pad1                [4]byte
	FhCryptProv                 HCRYPTPROV_LEGACY
	FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FpvEncryptionAuxInfo        uintptr
	FcRecipients                DWORD
	F__ccgo_pad2                [4]byte
	FrgpRecipients              uintptr
} /* wincrypt.h:2970:11 */

type CMSG_ENVELOPED_ENCODE_INFO = X_CMSG_ENVELOPED_ENCODE_INFO /* wincrypt.h:2988:5 */
type PCMSG_ENVELOPED_ENCODE_INFO = uintptr                     /* wincrypt.h:2988:32 */

type X_CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = struct {
	FcbSize                 DWORD
	F__ccgo_pad1            [4]byte
	FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FpvKeyEncryptionAuxInfo uintptr
	FhCryptProv             HCRYPTPROV_LEGACY
	FRecipientPublicKey     CRYPT_BIT_BLOB
	FRecipientId            CERT_ID
} /* wincrypt.h:2990:11 */

type CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = X_CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO /* wincrypt.h:2997:5 */
type PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = uintptr                               /* wincrypt.h:2997:42 */

type X_CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = struct {
	FcbSize             DWORD
	F__ccgo_pad1        [4]byte
	FRecipientPublicKey CRYPT_BIT_BLOB
	FRecipientId        CERT_ID
	FDate               FILETIME
	FpOtherAttr         PCRYPT_ATTRIBUTE_TYPE_VALUE
} /* wincrypt.h:2999:11 */

type CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = X_CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO /* wincrypt.h:3005:5 */
type PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = uintptr                                   /* wincrypt.h:3005:46 */

type X_CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = struct {
	FcbSize                    DWORD
	F__ccgo_pad1               [4]byte
	FKeyEncryptionAlgorithm    CRYPT_ALGORITHM_IDENTIFIER
	FpvKeyEncryptionAuxInfo    uintptr
	FKeyWrapAlgorithm          CRYPT_ALGORITHM_IDENTIFIER
	FpvKeyWrapAuxInfo          uintptr
	FhCryptProv                HCRYPTPROV_LEGACY
	FdwKeySpec                 DWORD
	FdwKeyChoice               DWORD
	F__88                      struct{ FpEphemeralAlgorithm PCRYPT_ALGORITHM_IDENTIFIER }
	FUserKeyingMaterial        CRYPT_DATA_BLOB
	FcRecipientEncryptedKeys   DWORD
	F__ccgo_pad2               [4]byte
	FrgpRecipientEncryptedKeys uintptr
} /* wincrypt.h:3007:11 */

type CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = X_CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO /* wincrypt.h:3023:5 */
type PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = uintptr                               /* wincrypt.h:3023:42 */

type X_CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = struct {
	FcbSize                 DWORD
	F__ccgo_pad1            [4]byte
	FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FpvKeyEncryptionAuxInfo uintptr
	FhCryptProv             HCRYPTPROV
	FdwKeyChoice            DWORD
	F__ccgo_pad2            [4]byte
	F__56                   struct{ FhKeyEncryptionKey HCRYPTKEY }
	FKeyId                  CRYPT_DATA_BLOB
	FDate                   FILETIME
	FpOtherAttr             PCRYPT_ATTRIBUTE_TYPE_VALUE
} /* wincrypt.h:3028:11 */

type CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = X_CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO /* wincrypt.h:3041:5 */
type PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = uintptr                               /* wincrypt.h:3041:42 */

type X_CMSG_RC2_AUX_INFO = struct {
	FcbSize   DWORD
	FdwBitLen DWORD
} /* wincrypt.h:3061:11 */

type CMSG_RC2_AUX_INFO = X_CMSG_RC2_AUX_INFO /* wincrypt.h:3064:5 */
type PCMSG_RC2_AUX_INFO = uintptr            /* wincrypt.h:3064:23 */

type X_CMSG_SP3_COMPATIBLE_AUX_INFO = struct {
	FcbSize  DWORD
	FdwFlags DWORD
} /* wincrypt.h:3066:11 */

type CMSG_SP3_COMPATIBLE_AUX_INFO = X_CMSG_SP3_COMPATIBLE_AUX_INFO /* wincrypt.h:3069:5 */
type PCMSG_SP3_COMPATIBLE_AUX_INFO = uintptr                       /* wincrypt.h:3069:34 */

type X_CMSG_RC4_AUX_INFO = struct {
	FcbSize   DWORD
	FdwBitLen DWORD
} /* wincrypt.h:3071:11 */

type CMSG_RC4_AUX_INFO = X_CMSG_RC4_AUX_INFO /* wincrypt.h:3074:5 */
type PCMSG_RC4_AUX_INFO = uintptr            /* wincrypt.h:3074:23 */

type X_CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = struct {
	FcbSize        DWORD
	F__ccgo_pad1   [4]byte
	FSignedInfo    CMSG_SIGNED_ENCODE_INFO
	FEnvelopedInfo CMSG_ENVELOPED_ENCODE_INFO
} /* wincrypt.h:3076:11 */

type CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = X_CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO /* wincrypt.h:3080:5 */
type PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = uintptr                                /* wincrypt.h:3080:43 */

type X_CMSG_HASHED_ENCODE_INFO = struct {
	FcbSize        DWORD
	F__ccgo_pad1   [4]byte
	FhCryptProv    HCRYPTPROV_LEGACY
	FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FpvHashAuxInfo uintptr
} /* wincrypt.h:3082:11 */

type CMSG_HASHED_ENCODE_INFO = X_CMSG_HASHED_ENCODE_INFO /* wincrypt.h:3087:5 */
type PCMSG_HASHED_ENCODE_INFO = uintptr                  /* wincrypt.h:3087:29 */

type X_CMSG_ENCRYPTED_ENCODE_INFO = struct {
	FcbSize                     DWORD
	F__ccgo_pad1                [4]byte
	FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FpvEncryptionAuxInfo        uintptr
} /* wincrypt.h:3089:11 */

type CMSG_ENCRYPTED_ENCODE_INFO = X_CMSG_ENCRYPTED_ENCODE_INFO /* wincrypt.h:3093:5 */
type PCMSG_ENCRYPTED_ENCODE_INFO = uintptr                     /* wincrypt.h:3093:32 */

type PFN_CMSG_STREAM_OUTPUT = uintptr /* wincrypt.h:3095:19 */

type X_CMSG_STREAM_INFO = struct {
	FcbContent       DWORD
	F__ccgo_pad1     [4]byte
	FpfnStreamOutput PFN_CMSG_STREAM_OUTPUT
	FpvArg           uintptr
} /* wincrypt.h:3099:11 */

type CMSG_STREAM_INFO = X_CMSG_STREAM_INFO /* wincrypt.h:3103:5 */
type PCMSG_STREAM_INFO = uintptr           /* wincrypt.h:3103:22 */

type X_CMSG_SIGNER_INFO = struct {
	FdwVersion               DWORD
	F__ccgo_pad1             [4]byte
	FIssuer                  CERT_NAME_BLOB
	FSerialNumber            CRYPT_INTEGER_BLOB
	FHashAlgorithm           CRYPT_ALGORITHM_IDENTIFIER
	FHashEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FEncryptedHash           CRYPT_DATA_BLOB
	FAuthAttrs               CRYPT_ATTRIBUTES
	FUnauthAttrs             CRYPT_ATTRIBUTES
} /* wincrypt.h:3159:11 */

type CMSG_SIGNER_INFO = X_CMSG_SIGNER_INFO /* wincrypt.h:3168:5 */
type PCMSG_SIGNER_INFO = uintptr           /* wincrypt.h:3168:22 */

type X_CMSG_CMS_SIGNER_INFO = struct {
	FdwVersion               DWORD
	F__ccgo_pad1             [4]byte
	FSignerId                CERT_ID
	FHashAlgorithm           CRYPT_ALGORITHM_IDENTIFIER
	FHashEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FEncryptedHash           CRYPT_DATA_BLOB
	FAuthAttrs               CRYPT_ATTRIBUTES
	FUnauthAttrs             CRYPT_ATTRIBUTES
} /* wincrypt.h:3170:11 */

type CMSG_CMS_SIGNER_INFO = X_CMSG_CMS_SIGNER_INFO /* wincrypt.h:3178:5 */
type PCMSG_CMS_SIGNER_INFO = uintptr               /* wincrypt.h:3178:26 */

type CMSG_ATTR = CRYPT_ATTRIBUTES /* wincrypt.h:3180:28 */
type PCMSG_ATTR = uintptr         /* wincrypt.h:3181:28 */

type X_CMSG_KEY_TRANS_RECIPIENT_INFO = struct {
	FdwVersion              DWORD
	F__ccgo_pad1            [4]byte
	FRecipientId            CERT_ID
	FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FEncryptedKey           CRYPT_DATA_BLOB
} /* wincrypt.h:3203:11 */

type CMSG_KEY_TRANS_RECIPIENT_INFO = X_CMSG_KEY_TRANS_RECIPIENT_INFO /* wincrypt.h:3208:5 */
type PCMSG_KEY_TRANS_RECIPIENT_INFO = uintptr                        /* wincrypt.h:3208:35 */

type X_CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = struct {
	FRecipientId  CERT_ID
	FEncryptedKey CRYPT_DATA_BLOB
	FDate         FILETIME
	FpOtherAttr   PCRYPT_ATTRIBUTE_TYPE_VALUE
} /* wincrypt.h:3210:11 */

type CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = X_CMSG_RECIPIENT_ENCRYPTED_KEY_INFO /* wincrypt.h:3215:5 */
type PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO = uintptr                            /* wincrypt.h:3215:39 */

type X_CMSG_KEY_AGREE_RECIPIENT_INFO = struct {
	FdwVersion          DWORD
	FdwOriginatorChoice DWORD
	F__8                struct {
		FOriginatorCertId CERT_ID
		F__ccgo_pad1      [8]byte
	}
	FUserKeyingMaterial        CRYPT_DATA_BLOB
	FKeyEncryptionAlgorithm    CRYPT_ALGORITHM_IDENTIFIER
	FcRecipientEncryptedKeys   DWORD
	F__ccgo_pad1               [4]byte
	FrgpRecipientEncryptedKeys uintptr
} /* wincrypt.h:3217:11 */

type CMSG_KEY_AGREE_RECIPIENT_INFO = X_CMSG_KEY_AGREE_RECIPIENT_INFO /* wincrypt.h:3228:5 */
type PCMSG_KEY_AGREE_RECIPIENT_INFO = uintptr                        /* wincrypt.h:3228:35 */

type X_CMSG_MAIL_LIST_RECIPIENT_INFO = struct {
	FdwVersion              DWORD
	F__ccgo_pad1            [4]byte
	FKeyId                  CRYPT_DATA_BLOB
	FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FEncryptedKey           CRYPT_DATA_BLOB
	FDate                   FILETIME
	FpOtherAttr             PCRYPT_ATTRIBUTE_TYPE_VALUE
} /* wincrypt.h:3233:11 */

type CMSG_MAIL_LIST_RECIPIENT_INFO = X_CMSG_MAIL_LIST_RECIPIENT_INFO /* wincrypt.h:3240:5 */
type PCMSG_MAIL_LIST_RECIPIENT_INFO = uintptr                        /* wincrypt.h:3240:35 */

type X_CMSG_CMS_RECIPIENT_INFO = struct {
	FdwRecipientChoice DWORD
	F__ccgo_pad1       [4]byte
	F__8               struct {
		FpKeyTrans PCMSG_KEY_TRANS_RECIPIENT_INFO
	}
} /* wincrypt.h:3242:11 */

type CMSG_CMS_RECIPIENT_INFO = X_CMSG_CMS_RECIPIENT_INFO /* wincrypt.h:3249:5 */
type PCMSG_CMS_RECIPIENT_INFO = uintptr                  /* wincrypt.h:3249:29 */

type X_CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = struct {
	FcbSize        DWORD
	F__ccgo_pad1   [4]byte
	FhCryptProv    HCRYPTPROV_LEGACY
	FdwSignerIndex DWORD
	FdwSignerType  DWORD
	FpvSigner      uintptr
} /* wincrypt.h:3282:11 */

type CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = X_CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA /* wincrypt.h:3288:5 */
type PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = uintptr                             /* wincrypt.h:3288:40 */

type X_CMSG_CTRL_DECRYPT_PARA = struct {
	FcbSize           DWORD
	F__ccgo_pad1      [4]byte
	F__8              struct{ FhCryptProv HCRYPTPROV }
	FdwKeySpec        DWORD
	FdwRecipientIndex DWORD
} /* wincrypt.h:3295:11 */

type CMSG_CTRL_DECRYPT_PARA = X_CMSG_CTRL_DECRYPT_PARA /* wincrypt.h:3303:5 */
type PCMSG_CTRL_DECRYPT_PARA = uintptr                 /* wincrypt.h:3303:28 */

type X_CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = struct {
	FcbSize           DWORD
	F__ccgo_pad1      [4]byte
	F__8              struct{ FhCryptProv HCRYPTPROV }
	FdwKeySpec        DWORD
	F__ccgo_pad2      [4]byte
	FpKeyTrans        PCMSG_KEY_TRANS_RECIPIENT_INFO
	FdwRecipientIndex DWORD
	F__ccgo_pad3      [4]byte
} /* wincrypt.h:3305:11 */

type CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = X_CMSG_CTRL_KEY_TRANS_DECRYPT_PARA /* wincrypt.h:3314:5 */
type PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA = uintptr                           /* wincrypt.h:3314:38 */

type X_CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = struct {
	FcbSize                       DWORD
	F__ccgo_pad1                  [4]byte
	F__8                          struct{ FhCryptProv HCRYPTPROV }
	FdwKeySpec                    DWORD
	F__ccgo_pad2                  [4]byte
	FpKeyAgree                    PCMSG_KEY_AGREE_RECIPIENT_INFO
	FdwRecipientIndex             DWORD
	FdwRecipientEncryptedKeyIndex DWORD
	FOriginatorPublicKey          CRYPT_BIT_BLOB
} /* wincrypt.h:3316:11 */

type CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = X_CMSG_CTRL_KEY_AGREE_DECRYPT_PARA /* wincrypt.h:3327:5 */
type PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA = uintptr                           /* wincrypt.h:3327:38 */

type X_CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = struct {
	FcbSize           DWORD
	F__ccgo_pad1      [4]byte
	FhCryptProv       HCRYPTPROV
	FpMailList        PCMSG_MAIL_LIST_RECIPIENT_INFO
	FdwRecipientIndex DWORD
	FdwKeyChoice      DWORD
	F__32             struct{ FhKeyEncryptionKey HCRYPTKEY }
} /* wincrypt.h:3329:11 */

type CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = X_CMSG_CTRL_MAIL_LIST_DECRYPT_PARA /* wincrypt.h:3339:5 */
type PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA = uintptr                           /* wincrypt.h:3339:38 */

type X_CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = struct {
	FcbSize        DWORD
	FdwSignerIndex DWORD
	Fblob          CRYPT_DATA_BLOB
} /* wincrypt.h:3341:11 */

type CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = X_CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA /* wincrypt.h:3345:5 */
type PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = uintptr                                /* wincrypt.h:3345:43 */

type X_CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = struct {
	FcbSize            DWORD
	FdwSignerIndex     DWORD
	FdwUnauthAttrIndex DWORD
} /* wincrypt.h:3347:11 */

type CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = X_CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA /* wincrypt.h:3351:5 */
type PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = uintptr                                /* wincrypt.h:3351:43 */

type PFN_CMSG_ALLOC = uintptr /* wincrypt.h:3360:16 */
type PFN_CMSG_FREE = uintptr  /* wincrypt.h:3361:16 */

type PFN_CMSG_GEN_ENCRYPT_KEY = uintptr    /* wincrypt.h:3367:19 */
type PFN_CMSG_EXPORT_ENCRYPT_KEY = uintptr /* wincrypt.h:3368:19 */
type PFN_CMSG_IMPORT_ENCRYPT_KEY = uintptr /* wincrypt.h:3369:19 */

type X_CMSG_CONTENT_ENCRYPT_INFO = struct {
	FcbSize                       DWORD
	F__ccgo_pad1                  [4]byte
	FhCryptProv                   HCRYPTPROV_LEGACY
	FContentEncryptionAlgorithm   CRYPT_ALGORITHM_IDENTIFIER
	FpvEncryptionAuxInfo          uintptr
	FcRecipients                  DWORD
	F__ccgo_pad2                  [4]byte
	FrgCmsRecipients              PCMSG_RECIPIENT_ENCODE_INFO
	FpfnAlloc                     PFN_CMSG_ALLOC
	FpfnFree                      PFN_CMSG_FREE
	FdwEncryptFlags               DWORD
	F__ccgo_pad3                  [4]byte
	F__88                         struct{ FhContentEncryptKey HCRYPTKEY }
	FdwFlags                      DWORD
	FfCNG                         WINBOOL
	FpbCNGContentEncryptKeyObject uintptr
	FpbContentEncryptKey          uintptr
	FcbContentEncryptKey          DWORD
	F__ccgo_pad4                  [4]byte
} /* wincrypt.h:3375:11 */

type CMSG_CONTENT_ENCRYPT_INFO = X_CMSG_CONTENT_ENCRYPT_INFO /* wincrypt.h:3394:5 */
type PCMSG_CONTENT_ENCRYPT_INFO = uintptr                    /* wincrypt.h:3394:31 */

type PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY = uintptr /* wincrypt.h:3406:19 */

type X_CMSG_KEY_TRANS_ENCRYPT_INFO = struct {
	FcbSize                 DWORD
	FdwRecipientIndex       DWORD
	FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FEncryptedKey           CRYPT_DATA_BLOB
	FdwFlags                DWORD
	F__ccgo_pad1            [4]byte
} /* wincrypt.h:3408:11 */

type CMSG_KEY_TRANS_ENCRYPT_INFO = X_CMSG_KEY_TRANS_ENCRYPT_INFO /* wincrypt.h:3414:5 */
type PCMSG_KEY_TRANS_ENCRYPT_INFO = uintptr                      /* wincrypt.h:3414:33 */

type PFN_CMSG_EXPORT_KEY_TRANS = uintptr /* wincrypt.h:3423:19 */

type X_CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = struct {
	FcbSize       DWORD
	F__ccgo_pad1  [4]byte
	FEncryptedKey CRYPT_DATA_BLOB
} /* wincrypt.h:3425:11 */

type CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = X_CMSG_KEY_AGREE_KEY_ENCRYPT_INFO /* wincrypt.h:3428:5 */
type PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO = uintptr                          /* wincrypt.h:3428:37 */

type X_CMSG_KEY_AGREE_ENCRYPT_INFO = struct {
	FcbSize                 DWORD
	FdwRecipientIndex       DWORD
	FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FUserKeyingMaterial     CRYPT_DATA_BLOB
	FdwOriginatorChoice     DWORD
	F__ccgo_pad1            [4]byte
	F__56                   struct {
		FOriginatorCertId CERT_ID
		F__ccgo_pad1      [8]byte
	}
	FcKeyAgreeKeyEncryptInfo   DWORD
	F__ccgo_pad2               [4]byte
	FrgpKeyAgreeKeyEncryptInfo uintptr
	FdwFlags                   DWORD
	F__ccgo_pad3               [4]byte
} /* wincrypt.h:3430:11 */

type CMSG_KEY_AGREE_ENCRYPT_INFO = X_CMSG_KEY_AGREE_ENCRYPT_INFO /* wincrypt.h:3443:5 */
type PCMSG_KEY_AGREE_ENCRYPT_INFO = uintptr                      /* wincrypt.h:3443:33 */

type PFN_CMSG_EXPORT_KEY_AGREE = uintptr /* wincrypt.h:3456:19 */

type X_CMSG_MAIL_LIST_ENCRYPT_INFO = struct {
	FcbSize                 DWORD
	FdwRecipientIndex       DWORD
	FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FEncryptedKey           CRYPT_DATA_BLOB
	FdwFlags                DWORD
	F__ccgo_pad1            [4]byte
} /* wincrypt.h:3458:11 */

type CMSG_MAIL_LIST_ENCRYPT_INFO = X_CMSG_MAIL_LIST_ENCRYPT_INFO /* wincrypt.h:3464:5 */
type PCMSG_MAIL_LIST_ENCRYPT_INFO = uintptr                      /* wincrypt.h:3464:33 */

type PFN_CMSG_EXPORT_MAIL_LIST = uintptr /* wincrypt.h:3478:19 */
type PFN_CMSG_IMPORT_KEY_TRANS = uintptr /* wincrypt.h:3479:19 */
type PFN_CMSG_IMPORT_KEY_AGREE = uintptr /* wincrypt.h:3480:19 */
type PFN_CMSG_IMPORT_MAIL_LIST = uintptr /* wincrypt.h:3481:19 */

type X_CMSG_CNG_CONTENT_DECRYPT_INFO = struct {
	FcbSize                       DWORD
	F__ccgo_pad1                  [4]byte
	FContentEncryptionAlgorithm   CRYPT_ALGORITHM_IDENTIFIER
	FpfnAlloc                     PFN_CMSG_ALLOC
	FpfnFree                      PFN_CMSG_FREE
	FhNCryptKey                   NCRYPT_KEY_HANDLE
	FpbContentEncryptKey          uintptr
	FcbContentEncryptKey          DWORD
	F__ccgo_pad2                  [4]byte
	FhCNGContentEncryptKey        BCRYPT_KEY_HANDLE
	FpbCNGContentEncryptKeyObject uintptr
} /* wincrypt.h:3483:11 */

type CMSG_CNG_CONTENT_DECRYPT_INFO = X_CMSG_CNG_CONTENT_DECRYPT_INFO /* wincrypt.h:3493:5 */
type PCMSG_CNG_CONTENT_DECRYPT_INFO = uintptr                        /* wincrypt.h:3493:35 */

type PFN_CMSG_CNG_IMPORT_KEY_TRANS = uintptr           /* wincrypt.h:3499:19 */
type PFN_CMSG_CNG_IMPORT_KEY_AGREE = uintptr           /* wincrypt.h:3500:19 */
type PFN_CMSG_CNG_IMPORT_CONTENT_ENCRYPT_KEY = uintptr /* wincrypt.h:3501:19 */

type HCERTSTORE = uintptr /* wincrypt.h:3505:16 */

type X_CERT_CONTEXT = struct {
	FdwCertEncodingType DWORD
	F__ccgo_pad1        [4]byte
	FpbCertEncoded      uintptr
	FcbCertEncoded      DWORD
	F__ccgo_pad2        [4]byte
	FpCertInfo          PCERT_INFO
	FhCertStore         HCERTSTORE
} /* wincrypt.h:3507:11 */

type CERT_CONTEXT = X_CERT_CONTEXT /* wincrypt.h:3513:5 */
type PCERT_CONTEXT = uintptr       /* wincrypt.h:3513:18 */

type PCCERT_CONTEXT = uintptr /* wincrypt.h:3515:30 */

type X_CRL_CONTEXT = struct {
	FdwCertEncodingType DWORD
	F__ccgo_pad1        [4]byte
	FpbCrlEncoded       uintptr
	FcbCrlEncoded       DWORD
	F__ccgo_pad2        [4]byte
	FpCrlInfo           PCRL_INFO
	FhCertStore         HCERTSTORE
} /* wincrypt.h:3518:11 */

type CRL_CONTEXT = X_CRL_CONTEXT /* wincrypt.h:3524:5 */
type PCRL_CONTEXT = uintptr      /* wincrypt.h:3524:17 */

type PCCRL_CONTEXT = uintptr /* wincrypt.h:3526:29 */

type X_CTL_CONTEXT = struct {
	FdwMsgAndCertEncodingType DWORD
	F__ccgo_pad1              [4]byte
	FpbCtlEncoded             uintptr
	FcbCtlEncoded             DWORD
	F__ccgo_pad2              [4]byte
	FpCtlInfo                 PCTL_INFO
	FhCertStore               HCERTSTORE
	FhCryptMsg                HCRYPTMSG
	FpbCtlContent             uintptr
	FcbCtlContent             DWORD
	F__ccgo_pad3              [4]byte
} /* wincrypt.h:3528:11 */

type CTL_CONTEXT = X_CTL_CONTEXT /* wincrypt.h:3537:5 */
type PCTL_CONTEXT = uintptr      /* wincrypt.h:3537:17 */

type PCCTL_CONTEXT = uintptr /* wincrypt.h:3539:29 */

type CertKeyType = uint32 /* wincrypt.h:3666:5 */

type X_CRYPT_KEY_PROV_PARAM = struct {
	FdwParam     DWORD
	F__ccgo_pad1 [4]byte
	FpbData      uintptr
	FcbData      DWORD
	FdwFlags     DWORD
} /* wincrypt.h:3699:11 */

type CRYPT_KEY_PROV_PARAM = X_CRYPT_KEY_PROV_PARAM /* wincrypt.h:3704:5 */
type PCRYPT_KEY_PROV_PARAM = uintptr               /* wincrypt.h:3704:26 */

type X_CRYPT_KEY_PROV_INFO = struct {
	FpwszContainerName LPWSTR
	FpwszProvName      LPWSTR
	FdwProvType        DWORD
	FdwFlags           DWORD
	FcProvParam        DWORD
	F__ccgo_pad1       [4]byte
	FrgProvParam       PCRYPT_KEY_PROV_PARAM
	FdwKeySpec         DWORD
	F__ccgo_pad2       [4]byte
} /* wincrypt.h:3706:11 */

type CRYPT_KEY_PROV_INFO = X_CRYPT_KEY_PROV_INFO /* wincrypt.h:3714:5 */
type PCRYPT_KEY_PROV_INFO = uintptr              /* wincrypt.h:3714:25 */

type X_CERT_KEY_CONTEXT = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	F__8         struct{ FhCryptProv HCRYPTPROV }
	FdwKeySpec   DWORD
	F__ccgo_pad2 [4]byte
} /* wincrypt.h:3721:11 */

type CERT_KEY_CONTEXT = X_CERT_KEY_CONTEXT /* wincrypt.h:3728:5 */
type PCERT_KEY_CONTEXT = uintptr           /* wincrypt.h:3728:22 */

type X_ROOT_INFO_LUID = struct {
	FLowPart  DWORD
	FHighPart LONG
} /* wincrypt.h:3730:11 */

type ROOT_INFO_LUID = X_ROOT_INFO_LUID /* wincrypt.h:3733:5 */
type PROOT_INFO_LUID = uintptr         /* wincrypt.h:3733:20 */

type X_CRYPT_SMART_CARD_ROOT_INFO = struct {
	FrgbCardID [16]BYTE
	Fluid      ROOT_INFO_LUID
} /* wincrypt.h:3735:11 */

type CRYPT_SMART_CARD_ROOT_INFO = X_CRYPT_SMART_CARD_ROOT_INFO /* wincrypt.h:3738:5 */
type PCRYPT_SMART_CARD_ROOT_INFO = uintptr                     /* wincrypt.h:3738:32 */

type X_CERT_SYSTEM_STORE_RELOCATE_PARA = struct {
	F__0 struct{ FhKeyBase HKEY }
	F__8 struct{ FpvSystemStore uintptr }
} /* wincrypt.h:3814:11 */

type CERT_SYSTEM_STORE_RELOCATE_PARA = X_CERT_SYSTEM_STORE_RELOCATE_PARA /* wincrypt.h:3824:5 */
type PCERT_SYSTEM_STORE_RELOCATE_PARA = uintptr                          /* wincrypt.h:3824:37 */

type X_CERT_REGISTRY_STORE_CLIENT_GPT_PARA = struct {
	FhKeyBase    HKEY
	FpwszRegPath LPWSTR
} /* wincrypt.h:3937:11 */

type CERT_REGISTRY_STORE_CLIENT_GPT_PARA = X_CERT_REGISTRY_STORE_CLIENT_GPT_PARA /* wincrypt.h:3940:5 */
type PCERT_REGISTRY_STORE_CLIENT_GPT_PARA = uintptr                              /* wincrypt.h:3940:41 */

type X_CERT_REGISTRY_STORE_ROAMING_PARA = struct {
	FhKey               HKEY
	FpwszStoreDirectory LPWSTR
} /* wincrypt.h:3944:11 */

type CERT_REGISTRY_STORE_ROAMING_PARA = X_CERT_REGISTRY_STORE_ROAMING_PARA /* wincrypt.h:3947:5 */
type PCERT_REGISTRY_STORE_ROAMING_PARA = uintptr                           /* wincrypt.h:3947:38 */

type X_CERT_LDAP_STORE_OPENED_PARA = struct {
	FpvLdapSessionHandle uintptr
	FpwszLdapUrl         LPCWSTR
} /* wincrypt.h:3959:11 */

type CERT_LDAP_STORE_OPENED_PARA = X_CERT_LDAP_STORE_OPENED_PARA /* wincrypt.h:3962:5 */
type PCERT_LDAP_STORE_OPENED_PARA = uintptr                      /* wincrypt.h:3962:33 */

type HCERTSTOREPROV = uintptr /* wincrypt.h:3968:16 */

type X_CERT_STORE_PROV_INFO = struct {
	FcbSize              DWORD
	FcStoreProvFunc      DWORD
	FrgpvStoreProvFunc   uintptr
	FhStoreProv          HCERTSTOREPROV
	FdwStoreProvFlags    DWORD
	F__ccgo_pad1         [4]byte
	FhStoreProvFuncAddr2 HCRYPTOIDFUNCADDR
} /* wincrypt.h:3972:11 */

type CERT_STORE_PROV_INFO = X_CERT_STORE_PROV_INFO /* wincrypt.h:3979:5 */
type PCERT_STORE_PROV_INFO = uintptr               /* wincrypt.h:3979:26 */

type PFN_CERT_DLL_OPEN_STORE_PROV_FUNC = uintptr /* wincrypt.h:3981:19 */

type PFN_CERT_STORE_PROV_CLOSE = uintptr             /* wincrypt.h:4017:16 */
type PFN_CERT_STORE_PROV_READ_CERT = uintptr         /* wincrypt.h:4018:19 */
type PFN_CERT_STORE_PROV_WRITE_CERT = uintptr        /* wincrypt.h:4019:19 */
type PFN_CERT_STORE_PROV_DELETE_CERT = uintptr       /* wincrypt.h:4020:19 */
type PFN_CERT_STORE_PROV_SET_CERT_PROPERTY = uintptr /* wincrypt.h:4021:19 */
type PFN_CERT_STORE_PROV_READ_CRL = uintptr          /* wincrypt.h:4022:19 */
type PFN_CERT_STORE_PROV_WRITE_CRL = uintptr         /* wincrypt.h:4023:19 */
type PFN_CERT_STORE_PROV_DELETE_CRL = uintptr        /* wincrypt.h:4024:19 */
type PFN_CERT_STORE_PROV_SET_CRL_PROPERTY = uintptr  /* wincrypt.h:4025:19 */
type PFN_CERT_STORE_PROV_READ_CTL = uintptr          /* wincrypt.h:4026:19 */
type PFN_CERT_STORE_PROV_WRITE_CTL = uintptr         /* wincrypt.h:4027:19 */
type PFN_CERT_STORE_PROV_DELETE_CTL = uintptr        /* wincrypt.h:4028:19 */
type PFN_CERT_STORE_PROV_SET_CTL_PROPERTY = uintptr  /* wincrypt.h:4029:19 */
type PFN_CERT_STORE_PROV_CONTROL = uintptr           /* wincrypt.h:4030:19 */

type X_CERT_STORE_PROV_FIND_INFO = struct {
	FcbSize                   DWORD
	FdwMsgAndCertEncodingType DWORD
	FdwFindFlags              DWORD
	FdwFindType               DWORD
	FpvFindPara               uintptr
} /* wincrypt.h:4032:11 */

type CERT_STORE_PROV_FIND_INFO = X_CERT_STORE_PROV_FIND_INFO /* wincrypt.h:4038:5 */
type PCERT_STORE_PROV_FIND_INFO = uintptr                    /* wincrypt.h:4038:31 */

type CCERT_STORE_PROV_FIND_INFO = CERT_STORE_PROV_FIND_INFO /* wincrypt.h:4040:43 */
type PCCERT_STORE_PROV_FIND_INFO = uintptr                  /* wincrypt.h:4040:70 */

type PFN_CERT_STORE_PROV_FIND_CERT = uintptr         /* wincrypt.h:4042:19 */
type PFN_CERT_STORE_PROV_FREE_FIND_CERT = uintptr    /* wincrypt.h:4043:19 */
type PFN_CERT_STORE_PROV_GET_CERT_PROPERTY = uintptr /* wincrypt.h:4044:19 */
type PFN_CERT_STORE_PROV_FIND_CRL = uintptr          /* wincrypt.h:4045:19 */
type PFN_CERT_STORE_PROV_FREE_FIND_CRL = uintptr     /* wincrypt.h:4046:19 */
type PFN_CERT_STORE_PROV_GET_CRL_PROPERTY = uintptr  /* wincrypt.h:4047:19 */
type PFN_CERT_STORE_PROV_FIND_CTL = uintptr          /* wincrypt.h:4048:19 */
type PFN_CERT_STORE_PROV_FREE_FIND_CTL = uintptr     /* wincrypt.h:4049:19 */
type PFN_CERT_STORE_PROV_GET_CTL_PROPERTY = uintptr  /* wincrypt.h:4050:19 */

type X_CRL_FIND_ISSUED_FOR_PARA = struct {
	FpSubjectCert PCCERT_CONTEXT
	FpIssuerCert  PCCERT_CONTEXT
} /* wincrypt.h:4152:11 */

type CRL_FIND_ISSUED_FOR_PARA = X_CRL_FIND_ISSUED_FOR_PARA /* wincrypt.h:4155:5 */
type PCRL_FIND_ISSUED_FOR_PARA = uintptr                   /* wincrypt.h:4155:30 */

type X_CTL_ANY_SUBJECT_INFO = struct {
	FSubjectAlgorithm  CRYPT_ALGORITHM_IDENTIFIER
	FSubjectIdentifier CRYPT_DATA_BLOB
} /* wincrypt.h:4157:11 */

type CTL_ANY_SUBJECT_INFO = X_CTL_ANY_SUBJECT_INFO /* wincrypt.h:4160:5 */
type PCTL_ANY_SUBJECT_INFO = uintptr               /* wincrypt.h:4160:26 */

type X_CTL_FIND_USAGE_PARA = struct {
	FcbSize         DWORD
	F__ccgo_pad1    [4]byte
	FSubjectUsage   CTL_USAGE
	FListIdentifier CRYPT_DATA_BLOB
	FpSigner        PCERT_INFO
} /* wincrypt.h:4272:11 */

type CTL_FIND_USAGE_PARA = X_CTL_FIND_USAGE_PARA /* wincrypt.h:4277:5 */
type PCTL_FIND_USAGE_PARA = uintptr              /* wincrypt.h:4277:25 */

type X_CTL_FIND_SUBJECT_PARA = struct {
	FcbSize        DWORD
	F__ccgo_pad1   [4]byte
	FpUsagePara    PCTL_FIND_USAGE_PARA
	FdwSubjectType DWORD
	F__ccgo_pad2   [4]byte
	FpvSubject     uintptr
} /* wincrypt.h:4279:11 */

type CTL_FIND_SUBJECT_PARA = X_CTL_FIND_SUBJECT_PARA /* wincrypt.h:4284:5 */
type PCTL_FIND_SUBJECT_PARA = uintptr                /* wincrypt.h:4284:27 */

type PFN_CERT_CREATE_CONTEXT_SORT_FUNC = uintptr /* wincrypt.h:4286:19 */

type X_CERT_CREATE_CONTEXT_PARA = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FpfnFree     PFN_CRYPT_FREE
	FpvFree      uintptr
	FpfnSort     PFN_CERT_CREATE_CONTEXT_SORT_FUNC
	FpvSort      uintptr
} /* wincrypt.h:4288:11 */

type CERT_CREATE_CONTEXT_PARA = X_CERT_CREATE_CONTEXT_PARA /* wincrypt.h:4294:5 */
type PCERT_CREATE_CONTEXT_PARA = uintptr                   /* wincrypt.h:4294:30 */

type X_CERT_SYSTEM_STORE_INFO = struct{ FcbSize DWORD } /* wincrypt.h:4296:11 */

type CERT_SYSTEM_STORE_INFO = X_CERT_SYSTEM_STORE_INFO /* wincrypt.h:4298:5 */
type PCERT_SYSTEM_STORE_INFO = uintptr                 /* wincrypt.h:4298:28 */

type X_CERT_PHYSICAL_STORE_INFO = struct {
	FcbSize               DWORD
	F__ccgo_pad1          [4]byte
	FpszOpenStoreProvider LPSTR
	FdwOpenEncodingType   DWORD
	FdwOpenFlags          DWORD
	FOpenParameters       CRYPT_DATA_BLOB
	FdwFlags              DWORD
	FdwPriority           DWORD
} /* wincrypt.h:4300:11 */

type CERT_PHYSICAL_STORE_INFO = X_CERT_PHYSICAL_STORE_INFO /* wincrypt.h:4308:5 */
type PCERT_PHYSICAL_STORE_INFO = uintptr                   /* wincrypt.h:4308:30 */

type PFN_CERT_ENUM_SYSTEM_STORE_LOCATION = uintptr /* wincrypt.h:4328:19 */
type PFN_CERT_ENUM_SYSTEM_STORE = uintptr          /* wincrypt.h:4329:19 */
type PFN_CERT_ENUM_PHYSICAL_STORE = uintptr        /* wincrypt.h:4330:19 */

type X_CTL_VERIFY_USAGE_PARA = struct {
	FcbSize         DWORD
	F__ccgo_pad1    [4]byte
	FListIdentifier CRYPT_DATA_BLOB
	FcCtlStore      DWORD
	F__ccgo_pad2    [4]byte
	FrghCtlStore    uintptr
	FcSignerStore   DWORD
	F__ccgo_pad3    [4]byte
	FrghSignerStore uintptr
} /* wincrypt.h:4375:11 */

type CTL_VERIFY_USAGE_PARA = X_CTL_VERIFY_USAGE_PARA /* wincrypt.h:4382:5 */
type PCTL_VERIFY_USAGE_PARA = uintptr                /* wincrypt.h:4382:27 */

type X_CTL_VERIFY_USAGE_STATUS = struct {
	FcbSize          DWORD
	FdwError         DWORD
	FdwFlags         DWORD
	F__ccgo_pad1     [4]byte
	FppCtl           uintptr
	FdwCtlEntryIndex DWORD
	F__ccgo_pad2     [4]byte
	FppSigner        uintptr
	FdwSignerIndex   DWORD
	F__ccgo_pad3     [4]byte
} /* wincrypt.h:4384:11 */

type CTL_VERIFY_USAGE_STATUS = X_CTL_VERIFY_USAGE_STATUS /* wincrypt.h:4392:5 */
type PCTL_VERIFY_USAGE_STATUS = uintptr                  /* wincrypt.h:4392:29 */

type X_CERT_REVOCATION_CRL_INFO = struct {
	FcbSize           DWORD
	F__ccgo_pad1      [4]byte
	FpBaseCrlContext  PCCRL_CONTEXT
	FpDeltaCrlContext PCCRL_CONTEXT
	FpCrlEntry        PCRL_ENTRY
	FfDeltaCrlEntry   WINBOOL
	F__ccgo_pad2      [4]byte
} /* wincrypt.h:4403:11 */

type CERT_REVOCATION_CRL_INFO = X_CERT_REVOCATION_CRL_INFO /* wincrypt.h:4409:5 */
type PCERT_REVOCATION_CRL_INFO = uintptr                   /* wincrypt.h:4409:30 */

type X_CERT_REVOCATION_CHAIN_PARA = struct {
	FcbSize                     DWORD
	F__ccgo_pad1                [4]byte
	FhChainEngine               HCERTCHAINENGINE
	FhAdditionalStore           HCERTSTORE
	FdwChainFlags               DWORD
	FdwUrlRetrievalTimeout      DWORD
	FpftCurrentTime             LPFILETIME
	FpftCacheResync             LPFILETIME
	FcbMaxUrlRetrievalByteCount DWORD
	F__ccgo_pad2                [4]byte
} /* wincrypt.h:4411:11 */

type CERT_REVOCATION_CHAIN_PARA = X_CERT_REVOCATION_CHAIN_PARA /* wincrypt.h:4411:46 */
type PCERT_REVOCATION_CHAIN_PARA = uintptr                     /* wincrypt.h:4411:73 */

type X_CERT_REVOCATION_PARA = struct {
	FcbSize       DWORD
	F__ccgo_pad1  [4]byte
	FpIssuerCert  PCCERT_CONTEXT
	FcCertStore   DWORD
	F__ccgo_pad2  [4]byte
	FrgCertStore  uintptr
	FhCrlStore    HCERTSTORE
	FpftTimeToUse LPFILETIME
} /* wincrypt.h:4413:11 */

type CERT_REVOCATION_PARA = X_CERT_REVOCATION_PARA /* wincrypt.h:4429:5 */
type PCERT_REVOCATION_PARA = uintptr               /* wincrypt.h:4429:26 */

type X_CERT_REVOCATION_STATUS = struct {
	FcbSize            DWORD
	FdwIndex           DWORD
	FdwError           DWORD
	FdwReason          DWORD
	FfHasFreshnessTime WINBOOL
	FdwFreshnessTime   DWORD
} /* wincrypt.h:4431:11 */

type CERT_REVOCATION_STATUS = X_CERT_REVOCATION_STATUS /* wincrypt.h:4438:5 */
type PCERT_REVOCATION_STATUS = uintptr                 /* wincrypt.h:4438:28 */

type X_CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO = struct {
	FCertSignHashCNGAlgPropData        CRYPT_DATA_BLOB
	FCertIssuerPubKeyBitLengthPropData CRYPT_DATA_BLOB
} /* wincrypt.h:4475:11 */

type CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO = X_CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO /* wincrypt.h:4478:5 */
type PCRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO = uintptr                                        /* wincrypt.h:4478:52 */

type PFN_CRYPT_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC = uintptr /* wincrypt.h:4480:19 */
type PFN_CRYPT_SIGN_AND_ENCODE_HASH_FUNC = uintptr                 /* wincrypt.h:4481:19 */
type PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC = uintptr             /* wincrypt.h:4482:19 */

type HCRYPTDEFAULTCONTEXT = uintptr /* wincrypt.h:4484:16 */

type X_CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = struct {
	FcOID        DWORD
	F__ccgo_pad1 [4]byte
	FrgpszOID    uintptr
} /* wincrypt.h:4486:11 */

type CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = X_CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA /* wincrypt.h:4489:5 */
type PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = uintptr                               /* wincrypt.h:4489:42 */

type PFN_CRYPT_EXPORT_PUBLIC_KEY_INFO_EX2_FUNC = uintptr /* wincrypt.h:4526:19 */

type PFN_IMPORT_PRIV_KEY_FUNC = uintptr /* wincrypt.h:4558:19 */
type PFN_EXPORT_PRIV_KEY_FUNC = uintptr /* wincrypt.h:4559:19 */

type PFN_CRYPT_GET_SIGNER_CERTIFICATE = uintptr /* wincrypt.h:4627:26 */

type X_CRYPT_SIGN_MESSAGE_PARA = struct {
	FcbSize             DWORD
	FdwMsgEncodingType  DWORD
	FpSigningCert       PCCERT_CONTEXT
	FHashAlgorithm      CRYPT_ALGORITHM_IDENTIFIER
	FpvHashAuxInfo      uintptr
	FcMsgCert           DWORD
	F__ccgo_pad1        [4]byte
	FrgpMsgCert         uintptr
	FcMsgCrl            DWORD
	F__ccgo_pad2        [4]byte
	FrgpMsgCrl          uintptr
	FcAuthAttr          DWORD
	F__ccgo_pad3        [4]byte
	FrgAuthAttr         PCRYPT_ATTRIBUTE
	FcUnauthAttr        DWORD
	F__ccgo_pad4        [4]byte
	FrgUnauthAttr       PCRYPT_ATTRIBUTE
	FdwFlags            DWORD
	FdwInnerContentType DWORD
} /* wincrypt.h:4629:11 */

type CRYPT_SIGN_MESSAGE_PARA = X_CRYPT_SIGN_MESSAGE_PARA /* wincrypt.h:4649:5 */
type PCRYPT_SIGN_MESSAGE_PARA = uintptr                  /* wincrypt.h:4649:29 */

type X_CRYPT_VERIFY_MESSAGE_PARA = struct {
	FcbSize                   DWORD
	FdwMsgAndCertEncodingType DWORD
	FhCryptProv               HCRYPTPROV_LEGACY
	FpfnGetSignerCertificate  PFN_CRYPT_GET_SIGNER_CERTIFICATE
	FpvGetArg                 uintptr
} /* wincrypt.h:4656:11 */

type CRYPT_VERIFY_MESSAGE_PARA = X_CRYPT_VERIFY_MESSAGE_PARA /* wincrypt.h:4665:5 */
type PCRYPT_VERIFY_MESSAGE_PARA = uintptr                    /* wincrypt.h:4665:31 */

type X_CRYPT_ENCRYPT_MESSAGE_PARA = struct {
	FcbSize                     DWORD
	FdwMsgEncodingType          DWORD
	FhCryptProv                 HCRYPTPROV_LEGACY
	FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER
	FpvEncryptionAuxInfo        uintptr
	FdwFlags                    DWORD
	FdwInnerContentType         DWORD
} /* wincrypt.h:4667:11 */

type CRYPT_ENCRYPT_MESSAGE_PARA = X_CRYPT_ENCRYPT_MESSAGE_PARA /* wincrypt.h:4675:5 */
type PCRYPT_ENCRYPT_MESSAGE_PARA = uintptr                     /* wincrypt.h:4675:32 */

type X_CRYPT_DECRYPT_MESSAGE_PARA = struct {
	FcbSize                   DWORD
	FdwMsgAndCertEncodingType DWORD
	FcCertStore               DWORD
	F__ccgo_pad1              [4]byte
	FrghCertStore             uintptr
} /* wincrypt.h:4679:11 */

type CRYPT_DECRYPT_MESSAGE_PARA = X_CRYPT_DECRYPT_MESSAGE_PARA /* wincrypt.h:4687:5 */
type PCRYPT_DECRYPT_MESSAGE_PARA = uintptr                     /* wincrypt.h:4687:32 */

type X_CRYPT_HASH_MESSAGE_PARA = struct {
	FcbSize            DWORD
	FdwMsgEncodingType DWORD
	FhCryptProv        HCRYPTPROV_LEGACY
	FHashAlgorithm     CRYPT_ALGORITHM_IDENTIFIER
	FpvHashAuxInfo     uintptr
} /* wincrypt.h:4689:11 */

type CRYPT_HASH_MESSAGE_PARA = X_CRYPT_HASH_MESSAGE_PARA /* wincrypt.h:4695:5 */
type PCRYPT_HASH_MESSAGE_PARA = uintptr                  /* wincrypt.h:4695:29 */

type X_CRYPT_KEY_SIGN_MESSAGE_PARA = struct {
	FcbSize                   DWORD
	FdwMsgAndCertEncodingType DWORD
	F__8                      struct{ FhCryptProv HCRYPTPROV }
	FdwKeySpec                DWORD
	F__ccgo_pad1              [4]byte
	FHashAlgorithm            CRYPT_ALGORITHM_IDENTIFIER
	FpvHashAuxInfo            uintptr
	FPubKeyAlgorithm          CRYPT_ALGORITHM_IDENTIFIER
} /* wincrypt.h:4697:11 */

type CRYPT_KEY_SIGN_MESSAGE_PARA = X_CRYPT_KEY_SIGN_MESSAGE_PARA /* wincrypt.h:4708:5 */
type PCRYPT_KEY_SIGN_MESSAGE_PARA = uintptr                      /* wincrypt.h:4708:33 */

type X_CRYPT_KEY_VERIFY_MESSAGE_PARA = struct {
	FcbSize            DWORD
	FdwMsgEncodingType DWORD
	FhCryptProv        HCRYPTPROV_LEGACY
} /* wincrypt.h:4710:11 */

type CRYPT_KEY_VERIFY_MESSAGE_PARA = X_CRYPT_KEY_VERIFY_MESSAGE_PARA /* wincrypt.h:4714:5 */
type PCRYPT_KEY_VERIFY_MESSAGE_PARA = uintptr                        /* wincrypt.h:4714:35 */

type X_CERT_CHAIN = struct {
	FcCerts         DWORD
	F__ccgo_pad1    [4]byte
	Fcerts          PCERT_BLOB
	FkeyLocatorInfo CRYPT_KEY_PROV_INFO
} /* wincrypt.h:4716:11 */

type CERT_CHAIN = X_CERT_CHAIN /* wincrypt.h:4720:5 */
type PCERT_CHAIN = uintptr     /* wincrypt.h:4720:16 */

type HCRYPTASYNC = HANDLE                      /* wincrypt.h:4793:18 */
type PHCRYPTASYNC = uintptr                    /* wincrypt.h:4793:30 */
type PFN_CRYPT_ASYNC_PARAM_FREE_FUNC = uintptr /* wincrypt.h:4794:16 */

type X_CRYPT_BLOB_ARRAY = struct {
	FcBlob       DWORD
	F__ccgo_pad1 [4]byte
	FrgBlob      PCRYPT_DATA_BLOB
} /* wincrypt.h:4804:11 */

type CRYPT_BLOB_ARRAY = X_CRYPT_BLOB_ARRAY /* wincrypt.h:4807:5 */
type PCRYPT_BLOB_ARRAY = uintptr           /* wincrypt.h:4807:22 */

type X_CRYPT_CREDENTIALS = struct {
	FcbSize            DWORD
	F__ccgo_pad1       [4]byte
	FpszCredentialsOid LPCSTR
	FpvCredentials     LPVOID
} /* wincrypt.h:4809:11 */

type CRYPT_CREDENTIALS = X_CRYPT_CREDENTIALS /* wincrypt.h:4813:5 */
type PCRYPT_CREDENTIALS = uintptr            /* wincrypt.h:4813:23 */

type X_CRYPT_PASSWORD_CREDENTIALSA = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FpszUsername LPSTR
	FpszPassword LPSTR
} /* wincrypt.h:4820:11 */

type CRYPT_PASSWORD_CREDENTIALSA = X_CRYPT_PASSWORD_CREDENTIALSA /* wincrypt.h:4824:5 */
type PCRYPT_PASSWORD_CREDENTIALSA = uintptr                      /* wincrypt.h:4824:33 */

type X_CRYPT_PASSWORD_CREDENTIALSW = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FpszUsername LPWSTR
	FpszPassword LPWSTR
} /* wincrypt.h:4826:11 */

type CRYPT_PASSWORD_CREDENTIALSW = X_CRYPT_PASSWORD_CREDENTIALSW /* wincrypt.h:4830:5 */
type PCRYPT_PASSWORD_CREDENTIALSW = uintptr                      /* wincrypt.h:4830:33 */

type CRYPT_PASSWORD_CREDENTIALS = CRYPT_PASSWORD_CREDENTIALSA   /* wincrypt.h:4832:55 */
type PCRYPT_PASSWORD_CREDENTIALS = PCRYPT_PASSWORD_CREDENTIALSA /* wincrypt.h:4833:56 */

type PFN_FREE_ENCODED_OBJECT_FUNC = uintptr /* wincrypt.h:4839:16 */

type X_CRYPTNET_URL_CACHE_PRE_FETCH_INFO = struct {
	FcbSize         DWORD
	FdwObjectType   DWORD
	FdwError        DWORD
	FdwReserved     DWORD
	FThisUpdateTime FILETIME
	FNextUpdateTime FILETIME
	FPublishTime    FILETIME
} /* wincrypt.h:4878:11 */

type CRYPTNET_URL_CACHE_PRE_FETCH_INFO = X_CRYPTNET_URL_CACHE_PRE_FETCH_INFO /* wincrypt.h:4886:5 */
type PCRYPTNET_URL_CACHE_PRE_FETCH_INFO = uintptr                            /* wincrypt.h:4886:39 */

type X_CRYPTNET_URL_CACHE_FLUSH_INFO = struct {
	FcbSize          DWORD
	FdwExemptSeconds DWORD
	FExpireTime      FILETIME
} /* wincrypt.h:4896:11 */

type CRYPTNET_URL_CACHE_FLUSH_INFO = X_CRYPTNET_URL_CACHE_FLUSH_INFO /* wincrypt.h:4900:5 */
type PCRYPTNET_URL_CACHE_FLUSH_INFO = uintptr                        /* wincrypt.h:4900:35 */

type X_CRYPTNET_URL_CACHE_RESPONSE_INFO = struct {
	FcbSize           DWORD
	FwResponseType    WORD
	FwResponseFlags   WORD
	FLastModifiedTime FILETIME
	FdwMaxAge         DWORD
	F__ccgo_pad1      [4]byte
	FpwszETag         LPCWSTR
	FdwProxyId        DWORD
	F__ccgo_pad2      [4]byte
} /* wincrypt.h:4905:11 */

type CRYPTNET_URL_CACHE_RESPONSE_INFO = X_CRYPTNET_URL_CACHE_RESPONSE_INFO /* wincrypt.h:4913:5 */
type PCRYPTNET_URL_CACHE_RESPONSE_INFO = uintptr                           /* wincrypt.h:4913:38 */

type X_CRYPT_RETRIEVE_AUX_INFO = struct {
	FcbSize                     DWORD
	F__ccgo_pad1                [4]byte
	FpLastSyncTime              uintptr
	FdwMaxUrlRetrievalByteCount DWORD
	F__ccgo_pad2                [4]byte
	FpPreFetchInfo              PCRYPTNET_URL_CACHE_PRE_FETCH_INFO
	FpFlushInfo                 PCRYPTNET_URL_CACHE_FLUSH_INFO
	FppResponseInfo             uintptr
	FpwszCacheFileNamePrefix    LPWSTR
	FpftCacheResync             LPFILETIME
	FfProxyCacheRetrieval       WINBOOL
	FdwHttpStatusCode           DWORD
} /* wincrypt.h:4920:11 */

type CRYPT_RETRIEVE_AUX_INFO = X_CRYPT_RETRIEVE_AUX_INFO /* wincrypt.h:4931:5 */
type PCRYPT_RETRIEVE_AUX_INFO = uintptr                  /* wincrypt.h:4931:29 */

type PFN_CRYPT_CANCEL_RETRIEVAL = uintptr /* wincrypt.h:4940:19 */

type PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC = uintptr /* wincrypt.h:4948:16 */

type X_CRYPT_ASYNC_RETRIEVAL_COMPLETION = struct {
	FpfnCompletion PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC
	FpvCompletion  LPVOID
} /* wincrypt.h:4950:11 */

type CRYPT_ASYNC_RETRIEVAL_COMPLETION = X_CRYPT_ASYNC_RETRIEVAL_COMPLETION /* wincrypt.h:4953:5 */
type PCRYPT_ASYNC_RETRIEVAL_COMPLETION = uintptr                           /* wincrypt.h:4953:38 */

type PFN_CANCEL_ASYNC_RETRIEVAL_FUNC = uintptr /* wincrypt.h:4957:19 */

type X_CRYPT_URL_ARRAY = struct {
	FcUrl        DWORD
	F__ccgo_pad1 [4]byte
	FrgwszUrl    uintptr
} /* wincrypt.h:4964:11 */

type CRYPT_URL_ARRAY = X_CRYPT_URL_ARRAY /* wincrypt.h:4967:5 */
type PCRYPT_URL_ARRAY = uintptr          /* wincrypt.h:4967:21 */

type X_CRYPT_URL_INFO = struct {
	FcbSize          DWORD
	FdwSyncDeltaTime DWORD
	FcGroup          DWORD
	F__ccgo_pad1     [4]byte
	FrgcGroupEntry   uintptr
} /* wincrypt.h:4969:11 */

type CRYPT_URL_INFO = X_CRYPT_URL_INFO /* wincrypt.h:4974:5 */
type PCRYPT_URL_INFO = uintptr         /* wincrypt.h:4974:20 */

type X_CERT_CRL_CONTEXT_PAIR = struct {
	FpCertContext PCCERT_CONTEXT
	FpCrlContext  PCCRL_CONTEXT
} /* wincrypt.h:4994:11 */

type CERT_CRL_CONTEXT_PAIR = X_CERT_CRL_CONTEXT_PAIR /* wincrypt.h:4997:5 */
type PCERT_CRL_CONTEXT_PAIR = uintptr                /* wincrypt.h:4997:27 */

type PCCERT_CRL_CONTEXT_PAIR = uintptr /* wincrypt.h:4999:39 */

type X_CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO = struct {
	FcbSize             DWORD
	FiDeltaCrlIndicator int32
	FpftCacheResync     LPFILETIME
	FpLastSyncTime      LPFILETIME
	FpMaxAgeTime        LPFILETIME
	FpChainPara         PCERT_REVOCATION_CHAIN_PARA
	FpDeltaCrlIndicator PCRYPT_INTEGER_BLOB
} /* wincrypt.h:5001:11 */

type CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO = X_CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO /* wincrypt.h:5009:5 */
type PCRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO = uintptr                                 /* wincrypt.h:5009:45 */

type PFN_CRYPT_ENUM_KEYID_PROP = uintptr /* wincrypt.h:5011:19 */

type HCERTCHAINENGINE = HANDLE /* wincrypt.h:5243:18 */

type X_CERT_CHAIN_ENGINE_CONFIG = struct {
	FcbSize                    DWORD
	F__ccgo_pad1               [4]byte
	FhRestrictedRoot           HCERTSTORE
	FhRestrictedTrust          HCERTSTORE
	FhRestrictedOther          HCERTSTORE
	FcAdditionalStore          DWORD
	F__ccgo_pad2               [4]byte
	FrghAdditionalStore        uintptr
	FdwFlags                   DWORD
	FdwUrlRetrievalTimeout     DWORD
	FMaximumCachedCertificates DWORD
	FCycleDetectionModulus     DWORD
} /* wincrypt.h:5245:11 */

type CERT_CHAIN_ENGINE_CONFIG = X_CERT_CHAIN_ENGINE_CONFIG /* wincrypt.h:5263:5 */
type PCERT_CHAIN_ENGINE_CONFIG = uintptr                   /* wincrypt.h:5263:30 */

type X_CERT_TRUST_STATUS = struct {
	FdwErrorStatus DWORD
	FdwInfoStatus  DWORD
} /* wincrypt.h:5273:11 */

type CERT_TRUST_STATUS = X_CERT_TRUST_STATUS /* wincrypt.h:5276:5 */
type PCERT_TRUST_STATUS = uintptr            /* wincrypt.h:5276:23 */

type X_CERT_REVOCATION_INFO = struct {
	FcbSize             DWORD
	FdwRevocationResult DWORD
	FpszRevocationOid   LPCSTR
	FpvOidSpecificInfo  LPVOID
	FfHasFreshnessTime  WINBOOL
	FdwFreshnessTime    DWORD
	FpCrlInfo           PCERT_REVOCATION_CRL_INFO
} /* wincrypt.h:5332:11 */

type CERT_REVOCATION_INFO = X_CERT_REVOCATION_INFO /* wincrypt.h:5340:5 */
type PCERT_REVOCATION_INFO = uintptr               /* wincrypt.h:5340:26 */

type X_CERT_TRUST_LIST_INFO = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FpCtlEntry   PCTL_ENTRY
	FpCtlContext PCCTL_CONTEXT
} /* wincrypt.h:5342:11 */

type CERT_TRUST_LIST_INFO = X_CERT_TRUST_LIST_INFO /* wincrypt.h:5346:5 */
type PCERT_TRUST_LIST_INFO = uintptr               /* wincrypt.h:5346:26 */

type X_CERT_CHAIN_ELEMENT = struct {
	FcbSize                DWORD
	F__ccgo_pad1           [4]byte
	FpCertContext          PCCERT_CONTEXT
	FTrustStatus           CERT_TRUST_STATUS
	FpRevocationInfo       PCERT_REVOCATION_INFO
	FpIssuanceUsage        PCERT_ENHKEY_USAGE
	FpApplicationUsage     PCERT_ENHKEY_USAGE
	FpwszExtendedErrorInfo LPCWSTR
} /* wincrypt.h:5348:11 */

type CERT_CHAIN_ELEMENT = X_CERT_CHAIN_ELEMENT /* wincrypt.h:5356:5 */
type PCERT_CHAIN_ELEMENT = uintptr             /* wincrypt.h:5356:24 */

type PCCERT_CHAIN_ELEMENT = uintptr /* wincrypt.h:5358:36 */

type X_CERT_SIMPLE_CHAIN = struct {
	FcbSize                      DWORD
	FTrustStatus                 CERT_TRUST_STATUS
	FcElement                    DWORD
	FrgpElement                  uintptr
	FpTrustListInfo              PCERT_TRUST_LIST_INFO
	FfHasRevocationFreshnessTime WINBOOL
	FdwRevocationFreshnessTime   DWORD
} /* wincrypt.h:5360:11 */

type CERT_SIMPLE_CHAIN = X_CERT_SIMPLE_CHAIN /* wincrypt.h:5368:5 */
type PCERT_SIMPLE_CHAIN = uintptr            /* wincrypt.h:5368:23 */

type PCCERT_SIMPLE_CHAIN = uintptr /* wincrypt.h:5370:35 */

type X_CERT_CHAIN_CONTEXT = struct {
	FcbSize                      DWORD
	FTrustStatus                 CERT_TRUST_STATUS
	FcChain                      DWORD
	FrgpChain                    uintptr
	FcLowerQualityChainContext   DWORD
	F__ccgo_pad1                 [4]byte
	FrgpLowerQualityChainContext uintptr
	FfHasRevocationFreshnessTime WINBOOL
	FdwRevocationFreshnessTime   DWORD
	FdwCreateFlags               DWORD
	FChainId                     GUID
	F__ccgo_pad2                 [4]byte
} /* wincrypt.h:5372:11 */

type CERT_CHAIN_CONTEXT = X_CERT_CHAIN_CONTEXT /* wincrypt.h:5372:38 */
type PCERT_CHAIN_CONTEXT = uintptr             /* wincrypt.h:5372:57 */
type PCCERT_CHAIN_CONTEXT = uintptr            /* wincrypt.h:5373:36 */

type X_CERT_USAGE_MATCH = struct {
	FdwType      DWORD
	F__ccgo_pad1 [4]byte
	FUsage       CERT_ENHKEY_USAGE
} /* wincrypt.h:5391:11 */

type CERT_USAGE_MATCH = X_CERT_USAGE_MATCH /* wincrypt.h:5394:5 */
type PCERT_USAGE_MATCH = uintptr           /* wincrypt.h:5394:22 */

type X_CTL_USAGE_MATCH = struct {
	FdwType      DWORD
	F__ccgo_pad1 [4]byte
	FUsage       CTL_USAGE
} /* wincrypt.h:5396:11 */

type CTL_USAGE_MATCH = X_CTL_USAGE_MATCH /* wincrypt.h:5399:5 */
type PCTL_USAGE_MATCH = uintptr          /* wincrypt.h:5399:21 */

type X_CERT_CHAIN_PARA = struct {
	FcbSize         DWORD
	F__ccgo_pad1    [4]byte
	FRequestedUsage CERT_USAGE_MATCH
} /* wincrypt.h:5401:11 */

type CERT_CHAIN_PARA = X_CERT_CHAIN_PARA /* wincrypt.h:5413:5 */
type PCERT_CHAIN_PARA = uintptr          /* wincrypt.h:5413:21 */

type X_CRL_REVOCATION_INFO = struct {
	FpCrlEntry       PCRL_ENTRY
	FpCrlContext     PCCRL_CONTEXT
	FpCrlIssuerChain PCCERT_CHAIN_CONTEXT
} /* wincrypt.h:5451:11 */

type CRL_REVOCATION_INFO = X_CRL_REVOCATION_INFO /* wincrypt.h:5455:5 */
type PCRL_REVOCATION_INFO = uintptr              /* wincrypt.h:5455:25 */

type PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK = uintptr /* wincrypt.h:5461:19 */

type X_CERT_CHAIN_FIND_BY_ISSUER_PARA = struct {
	FcbSize                   DWORD
	F__ccgo_pad1              [4]byte
	FpszUsageIdentifier       LPCSTR
	FdwKeySpec                DWORD
	FdwAcquirePrivateKeyFlags DWORD
	FcIssuer                  DWORD
	F__ccgo_pad2              [4]byte
	FrgIssuer                 uintptr
	FpfnFindCallback          PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK
	FpvFindArg                uintptr
} /* wincrypt.h:5463:11 */

type CERT_CHAIN_FIND_ISSUER_PARA = X_CERT_CHAIN_FIND_BY_ISSUER_PARA    /* wincrypt.h:5476:5 */
type PCERT_CHAIN_FIND_ISSUER_PARA = uintptr                            /* wincrypt.h:5476:33 */
type CERT_CHAIN_FIND_BY_ISSUER_PARA = X_CERT_CHAIN_FIND_BY_ISSUER_PARA /* wincrypt.h:5476:63 */
type PCERT_CHAIN_FIND_BY_ISSUER_PARA = uintptr                         /* wincrypt.h:5476:94 */

type X_CERT_CHAIN_POLICY_PARA = struct {
	FcbSize            DWORD
	FdwFlags           DWORD
	FpvExtraPolicyPara uintptr
} /* wincrypt.h:5485:11 */

type CERT_CHAIN_POLICY_PARA = X_CERT_CHAIN_POLICY_PARA /* wincrypt.h:5489:5 */
type PCERT_CHAIN_POLICY_PARA = uintptr                 /* wincrypt.h:5489:28 */

type X_CERT_CHAIN_POLICY_STATUS = struct {
	FcbSize              DWORD
	FdwError             DWORD
	FlChainIndex         LONG
	FlElementIndex       LONG
	FpvExtraPolicyStatus uintptr
} /* wincrypt.h:5491:11 */

type CERT_CHAIN_POLICY_STATUS = X_CERT_CHAIN_POLICY_STATUS /* wincrypt.h:5497:5 */
type PCERT_CHAIN_POLICY_STATUS = uintptr                   /* wincrypt.h:5497:30 */

type X_AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = struct {
	FcbSize              DWORD
	FdwRegPolicySettings DWORD
	FpSignerInfo         PCMSG_SIGNER_INFO
} /* wincrypt.h:5540:11 */

type AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = X_AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA /* wincrypt.h:5544:5 */
type PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr                                    /* wincrypt.h:5544:48 */

type X_AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = struct {
	FcbSize      DWORD
	FfCommercial WINBOOL
} /* wincrypt.h:5546:11 */

type AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = X_AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS /* wincrypt.h:5549:5 */
type PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr                                      /* wincrypt.h:5549:50 */

type X_AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = struct {
	FcbSize              DWORD
	FdwRegPolicySettings DWORD
	FfCommercial         WINBOOL
} /* wincrypt.h:5551:11 */

type AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = X_AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA /* wincrypt.h:5555:5 */
type PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr                                       /* wincrypt.h:5555:50 */

type X_HTTPSPolicyCallbackData = struct {
	F__0            struct{ FcbStruct DWORD }
	FdwAuthType     DWORD
	FfdwChecks      DWORD
	F__ccgo_pad1    [4]byte
	FpwszServerName uintptr
} /* wincrypt.h:5560:11 */

type HTTPSPolicyCallbackData = X_HTTPSPolicyCallbackData          /* wincrypt.h:5568:5 */
type PHTTPSPolicyCallbackData = uintptr                           /* wincrypt.h:5568:29 */
type SSL_EXTRA_CERT_CHAIN_POLICY_PARA = X_HTTPSPolicyCallbackData /* wincrypt.h:5568:55 */
type PSSL_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr                  /* wincrypt.h:5568:88 */

type X_EV_EXTRA_CERT_CHAIN_POLICY_PARA = struct {
	FcbSize                      DWORD
	FdwRootProgramQualifierFlags DWORD
} /* wincrypt.h:5576:11 */

type EV_EXTRA_CERT_CHAIN_POLICY_PARA = X_EV_EXTRA_CERT_CHAIN_POLICY_PARA /* wincrypt.h:5579:5 */
type PEV_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr                          /* wincrypt.h:5579:37 */

type X_EV_EXTRA_CERT_CHAIN_POLICY_STATUS = struct {
	FcbSize               DWORD
	FdwQualifiers         DWORD
	FdwIssuanceUsageIndex DWORD
} /* wincrypt.h:5581:11 */

type EV_EXTRA_CERT_CHAIN_POLICY_STATUS = X_EV_EXTRA_CERT_CHAIN_POLICY_STATUS /* wincrypt.h:5585:5 */
type PEV_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr                            /* wincrypt.h:5585:39 */

type X_SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS = struct {
	FcbSize          DWORD
	FdwErrorLevel    DWORD
	FdwErrorCategory DWORD
	FdwReserved      DWORD
	FwszErrorText    [256]WCHAR
} /* wincrypt.h:5588:11 */

type SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS = X_SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS /* wincrypt.h:5594:5 */
type PSSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr                                 /* wincrypt.h:5594:45 */

type X_SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA = struct {
	FcbSize         DWORD
	FdwReserved     DWORD
	FpwszServerName LPWSTR
	FrgpszHpkpValue [2]LPSTR
} /* wincrypt.h:5608:11 */

type SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA = X_SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA /* wincrypt.h:5613:5 */
type PSSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr                                       /* wincrypt.h:5613:51 */

type X_SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA = struct {
	FcbSize         DWORD
	FdwReserved     DWORD
	FpwszServerName PCWSTR
} /* wincrypt.h:5615:11 */

type SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA = X_SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA /* wincrypt.h:5619:5 */
type PSSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr                                   /* wincrypt.h:5619:47 */

type X_SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS = struct {
	FcbSize       DWORD
	FlError       LONG
	FwszErrorText [512]WCHAR
} /* wincrypt.h:5622:11 */

type SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS = X_SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS /* wincrypt.h:5626:5 */
type PSSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr                                     /* wincrypt.h:5626:49 */

type X_CRYPT_PKCS12_PBE_PARAMS = struct {
	FiIterations int32
	FcbSalt      ULONG
} /* wincrypt.h:5677:11 */

type CRYPT_PKCS12_PBE_PARAMS = X_CRYPT_PKCS12_PBE_PARAMS /* wincrypt.h:5680:5 */

type X_PKCS12_PBES2_EXPORT_PARAMS = struct {
	FdwSize            DWORD
	F__ccgo_pad1       [4]byte
	FhNcryptDescriptor PVOID
	FpwszPbes2Alg      LPWSTR
} /* wincrypt.h:5729:11 */

type PKCS12_PBES2_EXPORT_PARAMS = X_PKCS12_PBES2_EXPORT_PARAMS /* wincrypt.h:5733:5 */
type PPKCS12_PBES2_EXPORT_PARAMS = uintptr                     /* wincrypt.h:5733:33 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type X_CRYPTPROTECT_PROMPTSTRUCT = struct {
	FcbSize        DWORD
	FdwPromptFlags DWORD
	FhwndApp       HWND
	FszPrompt      LPCWSTR
} /* dpapi.h:65:11 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type CRYPTPROTECT_PROMPTSTRUCT = X_CRYPTPROTECT_PROMPTSTRUCT /* dpapi.h:70:5 */
type PCRYPTPROTECT_PROMPTSTRUCT = uintptr                    /* dpapi.h:70:31 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type SHGFP_TYPE = uint32 /* shlobj.h:37:3 */
type X_PROPSHEETPAGEA = struct {
	FdwSize            DWORD
	FdwFlags           DWORD
	FhInstance         HINSTANCE
	F__16              struct{ FpszTemplate LPCSTR }
	F__24              struct{ FhIcon HICON }
	FpszTitle          LPCSTR
	FpfnDlgProc        DLGPROC
	FlParam            LPARAM
	FpfnCallback       LPFNPSPCALLBACKA
	FpcRefParent       uintptr
	FpszHeaderTitle    LPCSTR
	FpszHeaderSubTitle LPCSTR
	FhActCtx           HANDLE
} /* prsht.h:50:3 */

type X_PROPSHEETPAGEW = struct {
	FdwSize            DWORD
	FdwFlags           DWORD
	FhInstance         HINSTANCE
	F__16              struct{ FpszTemplate LPCWSTR }
	F__24              struct{ FhIcon HICON }
	FpszTitle          LPCWSTR
	FpfnDlgProc        DLGPROC
	FlParam            LPARAM
	FpfnCallback       LPFNPSPCALLBACKW
	FpcRefParent       uintptr
	FpszHeaderTitle    LPCWSTR
	FpszHeaderSubTitle LPCWSTR
	FhActCtx           HANDLE
} /* prsht.h:51:3 */

type HPROPSHEETPAGE = uintptr   /* prsht.h:53:23 */
type LPFNPSPCALLBACKA = uintptr /* prsht.h:54:16 */
type LPFNPSPCALLBACKW = uintptr /* prsht.h:55:16 */

type PROPSHEETPAGE_RESOURCE = LPCDLGTEMPLATE /* prsht.h:86:26 */

type X_PROPSHEETPAGEA_V1 = struct {
	FdwSize      DWORD
	FdwFlags     DWORD
	FhInstance   HINSTANCE
	F__16        struct{ FpszTemplate LPCSTR }
	F__24        struct{ FhIcon HICON }
	FpszTitle    LPCSTR
	FpfnDlgProc  DLGPROC
	FlParam      LPARAM
	FpfnCallback LPFNPSPCALLBACKA
	FpcRefParent uintptr
} /* prsht.h:121:11 */

type PROPSHEETPAGEA_V1 = X_PROPSHEETPAGEA_V1 /* prsht.h:123:5 */
type LPPROPSHEETPAGEA_V1 = uintptr           /* prsht.h:123:23 */

type LPCPROPSHEETPAGEA_V1 = uintptr /* prsht.h:125:35 */

type X_PROPSHEETPAGEA_V2 = struct {
	FdwSize            DWORD
	FdwFlags           DWORD
	FhInstance         HINSTANCE
	F__16              struct{ FpszTemplate LPCSTR }
	F__24              struct{ FhIcon HICON }
	FpszTitle          LPCSTR
	FpfnDlgProc        DLGPROC
	FlParam            LPARAM
	FpfnCallback       LPFNPSPCALLBACKA
	FpcRefParent       uintptr
	FpszHeaderTitle    LPCSTR
	FpszHeaderSubTitle LPCSTR
} /* prsht.h:127:11 */

type PROPSHEETPAGEA_V2 = X_PROPSHEETPAGEA_V2 /* prsht.h:132:5 */
type LPPROPSHEETPAGEA_V2 = uintptr           /* prsht.h:132:23 */

type LPCPROPSHEETPAGEA_V2 = uintptr /* prsht.h:134:35 */

type PROPSHEETPAGEA_V3 = X_PROPSHEETPAGEA /* prsht.h:141:5 */
type LPPROPSHEETPAGEA_V3 = uintptr        /* prsht.h:141:23 */

type LPCPROPSHEETPAGEA_V3 = uintptr /* prsht.h:143:35 */

type X_PROPSHEETPAGEW_V1 = struct {
	FdwSize      DWORD
	FdwFlags     DWORD
	FhInstance   HINSTANCE
	F__16        struct{ FpszTemplate LPCWSTR }
	F__24        struct{ FhIcon HICON }
	FpszTitle    LPCWSTR
	FpfnDlgProc  DLGPROC
	FlParam      LPARAM
	FpfnCallback LPFNPSPCALLBACKW
	FpcRefParent uintptr
} /* prsht.h:145:11 */

type PROPSHEETPAGEW_V1 = X_PROPSHEETPAGEW_V1 /* prsht.h:147:5 */
type LPPROPSHEETPAGEW_V1 = uintptr           /* prsht.h:147:23 */

type LPCPROPSHEETPAGEW_V1 = uintptr /* prsht.h:149:35 */

type X_PROPSHEETPAGEW_V2 = struct {
	FdwSize            DWORD
	FdwFlags           DWORD
	FhInstance         HINSTANCE
	F__16              struct{ FpszTemplate LPCWSTR }
	F__24              struct{ FhIcon HICON }
	FpszTitle          LPCWSTR
	FpfnDlgProc        DLGPROC
	FlParam            LPARAM
	FpfnCallback       LPFNPSPCALLBACKW
	FpcRefParent       uintptr
	FpszHeaderTitle    LPCWSTR
	FpszHeaderSubTitle LPCWSTR
} /* prsht.h:151:11 */

type PROPSHEETPAGEW_V2 = X_PROPSHEETPAGEW_V2 /* prsht.h:155:5 */
type LPPROPSHEETPAGEW_V2 = uintptr           /* prsht.h:155:23 */

type LPCPROPSHEETPAGEW_V2 = uintptr /* prsht.h:157:35 */

type PROPSHEETPAGEW_V3 = X_PROPSHEETPAGEW /* prsht.h:164:5 */
type LPPROPSHEETPAGEW_V3 = uintptr        /* prsht.h:164:23 */

type LPCPROPSHEETPAGEW_V3 = uintptr                  /* prsht.h:166:35 */
type PROPSHEETPAGEA_LATEST = PROPSHEETPAGEA_V3       /* prsht.h:167:29 */
type PROPSHEETPAGEW_LATEST = PROPSHEETPAGEW_V3       /* prsht.h:168:29 */
type LPPROPSHEETPAGEA_LATEST = LPPROPSHEETPAGEA_V3   /* prsht.h:169:31 */
type LPPROPSHEETPAGEW_LATEST = LPPROPSHEETPAGEW_V3   /* prsht.h:170:31 */
type LPCPROPSHEETPAGEA_LATEST = LPCPROPSHEETPAGEA_V3 /* prsht.h:171:32 */
type LPCPROPSHEETPAGEW_LATEST = LPCPROPSHEETPAGEW_V3 /* prsht.h:172:32 */

type PROPSHEETPAGEA = PROPSHEETPAGEA_V3       /* prsht.h:174:29 */
type PROPSHEETPAGEW = PROPSHEETPAGEW_V3       /* prsht.h:175:29 */
type LPPROPSHEETPAGEA = LPPROPSHEETPAGEA_V3   /* prsht.h:176:31 */
type LPPROPSHEETPAGEW = LPPROPSHEETPAGEW_V3   /* prsht.h:177:31 */
type LPCPROPSHEETPAGEA = LPCPROPSHEETPAGEA_V3 /* prsht.h:178:32 */
type LPCPROPSHEETPAGEW = LPCPROPSHEETPAGEW_V3 /* prsht.h:179:32 */

type PFNPROPSHEETCALLBACK = uintptr /* prsht.h:227:15 */

type X_PROPSHEETHEADERA = struct {
	FdwSize      DWORD
	FdwFlags     DWORD
	FhwndParent  HWND
	FhInstance   HINSTANCE
	F__24        struct{ FhIcon HICON }
	FpszCaption  LPCSTR
	FnPages      UINT
	F__ccgo_pad1 [4]byte
	F__48        struct {
		F__ccgo_pad1 [0]uint64
		FnStartPage  UINT
		F__ccgo_pad2 [4]byte
	}
	F__56         struct{ Fppsp LPCPROPSHEETPAGEA }
	FpfnCallback  PFNPROPSHEETCALLBACK
	F__72         struct{ FhbmWatermark HBITMAP }
	FhplWatermark HPALETTE
	F__88         struct{ FhbmHeader HBITMAP }
} /* prsht.h:235:11 */

type PROPSHEETHEADERA = X_PROPSHEETHEADERA /* prsht.h:264:5 */
type LPPROPSHEETHEADERA = uintptr          /* prsht.h:264:22 */

type LPCPROPSHEETHEADERA = uintptr /* prsht.h:266:34 */

type X_PROPSHEETHEADERW = struct {
	FdwSize      DWORD
	FdwFlags     DWORD
	FhwndParent  HWND
	FhInstance   HINSTANCE
	F__24        struct{ FhIcon HICON }
	FpszCaption  LPCWSTR
	FnPages      UINT
	F__ccgo_pad1 [4]byte
	F__48        struct {
		F__ccgo_pad1 [0]uint64
		FnStartPage  UINT
		F__ccgo_pad2 [4]byte
	}
	F__56         struct{ Fppsp LPCPROPSHEETPAGEW }
	FpfnCallback  PFNPROPSHEETCALLBACK
	F__72         struct{ FhbmWatermark HBITMAP }
	FhplWatermark HPALETTE
	F__88         struct{ FhbmHeader HBITMAP }
} /* prsht.h:268:11 */

type PROPSHEETHEADERW = X_PROPSHEETHEADERW /* prsht.h:297:5 */
type LPPROPSHEETHEADERW = uintptr          /* prsht.h:297:22 */

type LPCPROPSHEETHEADERW = uintptr /* prsht.h:299:34 */

type LPFNADDPROPSHEETPAGE = uintptr  /* prsht.h:321:19 */
type LPFNADDPROPSHEETPAGES = uintptr /* prsht.h:322:19 */

type X_PSHNOTIFY = struct {
	Fhdr    NMHDR
	FlParam LPARAM
} /* prsht.h:324:11 */

type PSHNOTIFY = X_PSHNOTIFY /* prsht.h:327:5 */
type LPPSHNOTIFY = uintptr   /* prsht.h:327:15 */

type TagINITCOMMONCONTROLSEX = struct {
	FdwSize DWORD
	FdwICC  DWORD
} /* commctrl.h:51:11 */

type INITCOMMONCONTROLSEX = TagINITCOMMONCONTROLSEX /* commctrl.h:54:5 */
type LPINITCOMMONCONTROLSEX = uintptr               /* commctrl.h:54:26 */

type TagCOLORSCHEME = struct {
	FdwSize          DWORD
	FclrBtnHighlight COLORREF
	FclrBtnShadow    COLORREF
} /* commctrl.h:105:11 */

type COLORSCHEME = TagCOLORSCHEME /* commctrl.h:109:5 */
type LPCOLORSCHEME = uintptr      /* commctrl.h:109:17 */

type TagNMTOOLTIPSCREATED = struct {
	Fhdr          NMHDR
	FhwndToolTips HWND
} /* commctrl.h:145:11 */

type NMTOOLTIPSCREATED = TagNMTOOLTIPSCREATED /* commctrl.h:148:5 */
type LPNMTOOLTIPSCREATED = uintptr            /* commctrl.h:148:23 */

type TagNMMOUSE = struct {
	Fhdr        NMHDR
	FdwItemSpec DWORD_PTR
	FdwItemData DWORD_PTR
	Fpt         POINT
	FdwHitInfo  LPARAM
} /* commctrl.h:150:11 */

type NMMOUSE = TagNMMOUSE /* commctrl.h:156:5 */
type LPNMMOUSE = uintptr  /* commctrl.h:156:13 */

type NMCLICK = NMMOUSE     /* commctrl.h:158:19 */
type LPNMCLICK = LPNMMOUSE /* commctrl.h:159:21 */

type TagNMOBJECTNOTIFY = struct {
	Fhdr         NMHDR
	FiItem       int32
	F__ccgo_pad1 [4]byte
	Fpiid        uintptr
	FpObject     uintptr
	FhResult     HRESULT
	FdwFlags     DWORD
} /* commctrl.h:161:11 */

type NMOBJECTNOTIFY = TagNMOBJECTNOTIFY /* commctrl.h:172:5 */
type LPNMOBJECTNOTIFY = uintptr         /* commctrl.h:172:20 */

type TagNMKEY = struct {
	Fhdr    NMHDR
	FnVKey  UINT
	FuFlags UINT
} /* commctrl.h:174:11 */

type NMKEY = TagNMKEY  /* commctrl.h:178:5 */
type LPNMKEY = uintptr /* commctrl.h:178:11 */

type TagNMCHAR = struct {
	Fhdr         NMHDR
	Fch          UINT
	FdwItemPrev  DWORD
	FdwItemNext  DWORD
	F__ccgo_pad1 [4]byte
} /* commctrl.h:180:11 */

type NMCHAR = TagNMCHAR /* commctrl.h:185:5 */
type LPNMCHAR = uintptr /* commctrl.h:185:12 */

type TagNMCUSTOMTEXT = struct {
	Fhdr         NMHDR
	FhDC         HDC
	FlpString    LPCWSTR
	FnCount      int32
	F__ccgo_pad1 [4]byte
	FlpRect      LPRECT
	FuFormat     UINT
	FfLink       WINBOOL
} /* commctrl.h:188:11 */

type NMCUSTOMTEXT = TagNMCUSTOMTEXT /* commctrl.h:196:5 */
type LPNMCUSTOMTEXT = uintptr       /* commctrl.h:196:18 */

type TagNMCUSTOMDRAWINFO = struct {
	Fhdr         NMHDR
	FdwDrawStage DWORD
	F__ccgo_pad1 [4]byte
	Fhdc         HDC
	Frc          RECT
	FdwItemSpec  DWORD_PTR
	FuItemState  UINT
	F__ccgo_pad2 [4]byte
	FlItemlParam LPARAM
} /* commctrl.h:304:11 */

type NMCUSTOMDRAW = TagNMCUSTOMDRAWINFO /* commctrl.h:312:5 */
type LPNMCUSTOMDRAW = uintptr           /* commctrl.h:312:18 */

type TagNMTTCUSTOMDRAW = struct {
	Fnmcd        NMCUSTOMDRAW
	FuDrawFlags  UINT
	F__ccgo_pad1 [4]byte
} /* commctrl.h:314:11 */

type NMTTCUSTOMDRAW = TagNMTTCUSTOMDRAW /* commctrl.h:317:5 */
type LPNMTTCUSTOMDRAW = uintptr         /* commctrl.h:317:20 */

type TagNMCUSTOMSPLITRECTINFO = struct {
	Fhdr      NMHDR
	FrcClient RECT
	FrcButton RECT
	FrcSplit  RECT
} /* commctrl.h:319:11 */

type NMCUSTOMSPLITRECTINFO = TagNMCUSTOMSPLITRECTINFO /* commctrl.h:324:5 */
type LPNMCUSTOMSPLITRECTINFO = uintptr                /* commctrl.h:324:27 */
type HIMAGELIST = uintptr                             /* commctrl.h:335:29 */

type X_IMAGELISTDRAWPARAMS = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	Fhiml        HIMAGELIST
	Fi           int32
	F__ccgo_pad2 [4]byte
	FhdcDst      HDC
	Fx           int32
	Fy           int32
	Fcx          int32
	Fcy          int32
	FxBitmap     int32
	FyBitmap     int32
	FrgbBk       COLORREF
	FrgbFg       COLORREF
	FfStyle      UINT
	FdwRop       DWORD
	FfState      DWORD
	FFrame       DWORD
	FcrEffect    COLORREF
	F__ccgo_pad3 [4]byte
} /* commctrl.h:339:11 */

type IMAGELISTDRAWPARAMS = X_IMAGELISTDRAWPARAMS /* commctrl.h:357:5 */
type LPIMAGELISTDRAWPARAMS = uintptr             /* commctrl.h:357:25 */

type X_IMAGEINFO = struct {
	FhbmImage HBITMAP
	FhbmMask  HBITMAP
	FUnused1  int32
	FUnused2  int32
	FrcImage  RECT
} /* commctrl.h:460:11 */

type IMAGEINFO = X_IMAGEINFO /* commctrl.h:466:5 */
type LPIMAGEINFO = uintptr   /* commctrl.h:466:15 */

type X_HD_TEXTFILTERA = struct {
	FpszText     LPSTR
	FcchTextMax  INT
	F__ccgo_pad1 [4]byte
} /* commctrl.h:518:11 */

type HD_TEXTFILTERA = X_HD_TEXTFILTERA /* commctrl.h:521:5 */
type LPHD_TEXTFILTERA = uintptr        /* commctrl.h:521:20 */

type X_HD_TEXTFILTERW = struct {
	FpszText     LPWSTR
	FcchTextMax  INT
	F__ccgo_pad1 [4]byte
} /* commctrl.h:523:11 */

type HD_TEXTFILTERW = X_HD_TEXTFILTERW /* commctrl.h:526:5 */
type LPHD_TEXTFILTERW = uintptr        /* commctrl.h:526:20 */

type X_HD_ITEMA = struct {
	Fmask        UINT
	Fcxy         int32
	FpszText     LPSTR
	Fhbm         HBITMAP
	FcchTextMax  int32
	Ffmt         int32
	FlParam      LPARAM
	FiImage      int32
	FiOrder      int32
	Ftype        UINT
	F__ccgo_pad1 [4]byte
	FpvFilter    uintptr
} /* commctrl.h:532:11 */

type HDITEMA = X_HD_ITEMA /* commctrl.h:547:5 */
type LPHDITEMA = uintptr  /* commctrl.h:547:13 */

type X_HD_ITEMW = struct {
	Fmask        UINT
	Fcxy         int32
	FpszText     LPWSTR
	Fhbm         HBITMAP
	FcchTextMax  int32
	Ffmt         int32
	FlParam      LPARAM
	FiImage      int32
	FiOrder      int32
	Ftype        UINT
	F__ccgo_pad1 [4]byte
	FpvFilter    uintptr
} /* commctrl.h:552:11 */

type HDITEMW = X_HD_ITEMW /* commctrl.h:567:5 */
type LPHDITEMW = uintptr  /* commctrl.h:567:13 */

type X_HD_LAYOUT = struct {
	Fprc   uintptr
	Fpwpos uintptr
} /* commctrl.h:638:11 */

type HDLAYOUT = X_HD_LAYOUT /* commctrl.h:641:5 */
type LPHDLAYOUT = uintptr   /* commctrl.h:641:14 */

type X_HD_HITTESTINFO = struct {
	Fpt    POINT
	Fflags UINT
	FiItem int32
} /* commctrl.h:664:11 */

type HDHITTESTINFO = X_HD_HITTESTINFO /* commctrl.h:668:5 */
type LPHDHITTESTINFO = uintptr        /* commctrl.h:668:19 */

type TagNMHEADERA = struct {
	Fhdr     NMHDR
	FiItem   int32
	FiButton int32
	Fpitem   uintptr
} /* commctrl.h:786:11 */

type NMHEADERA = TagNMHEADERA /* commctrl.h:791:5 */
type LPNMHEADERA = uintptr    /* commctrl.h:791:15 */

type TagNMHEADERW = struct {
	Fhdr     NMHDR
	FiItem   int32
	FiButton int32
	Fpitem   uintptr
} /* commctrl.h:793:11 */

type NMHEADERW = TagNMHEADERW /* commctrl.h:798:5 */
type LPNMHEADERW = uintptr    /* commctrl.h:798:15 */

type TagNMHDDISPINFOW = struct {
	Fhdr        NMHDR
	FiItem      int32
	Fmask       UINT
	FpszText    LPWSTR
	FcchTextMax int32
	FiImage     int32
	FlParam     LPARAM
} /* commctrl.h:803:11 */

type NMHDDISPINFOW = TagNMHDDISPINFOW /* commctrl.h:811:5 */
type LPNMHDDISPINFOW = uintptr        /* commctrl.h:811:19 */

type TagNMHDDISPINFOA = struct {
	Fhdr        NMHDR
	FiItem      int32
	Fmask       UINT
	FpszText    LPSTR
	FcchTextMax int32
	FiImage     int32
	FlParam     LPARAM
} /* commctrl.h:813:11 */

type NMHDDISPINFOA = TagNMHDDISPINFOA /* commctrl.h:821:5 */
type LPNMHDDISPINFOA = uintptr        /* commctrl.h:821:19 */

type TagNMHDFILTERBTNCLICK = struct {
	Fhdr         NMHDR
	FiItem       INT
	Frc          RECT
	F__ccgo_pad1 [4]byte
} /* commctrl.h:826:11 */

type NMHDFILTERBTNCLICK = TagNMHDFILTERBTNCLICK /* commctrl.h:830:5 */
type LPNMHDFILTERBTNCLICK = uintptr             /* commctrl.h:830:24 */

type X_TBBUTTON = struct {
	FiBitmap   int32
	FidCommand int32
	FfsState   BYTE
	FfsStyle   BYTE
	FbReserved [6]BYTE
	FdwData    DWORD_PTR
	FiString   INT_PTR
} /* commctrl.h:840:11 */

type TBBUTTON = X_TBBUTTON /* commctrl.h:852:5 */
type PTBBUTTON = uintptr   /* commctrl.h:852:19 */
type LPTBBUTTON = uintptr  /* commctrl.h:852:30 */
type LPCTBBUTTON = uintptr /* commctrl.h:853:26 */

type X_COLORMAP = struct {
	Ffrom COLORREF
	Fto   COLORREF
} /* commctrl.h:855:11 */

type COLORMAP = X_COLORMAP /* commctrl.h:858:5 */
type LPCOLORMAP = uintptr  /* commctrl.h:858:14 */

type X_NMTBCUSTOMDRAW = struct {
	Fnmcd                 NMCUSTOMDRAW
	FhbrMonoDither        HBRUSH
	FhbrLines             HBRUSH
	FhpenLines            HPEN
	FclrText              COLORREF
	FclrMark              COLORREF
	FclrTextHighlight     COLORREF
	FclrBtnFace           COLORREF
	FclrBtnHighlight      COLORREF
	FclrHighlightHotTrack COLORREF
	FrcText               RECT
	FnStringBkMode        int32
	FnHLStringBkMode      int32
	FiListGap             int32
	F__ccgo_pad1          [4]byte
} /* commctrl.h:908:11 */

type NMTBCUSTOMDRAW = X_NMTBCUSTOMDRAW /* commctrl.h:923:5 */
type LPNMTBCUSTOMDRAW = uintptr        /* commctrl.h:923:20 */

type TagTBADDBITMAP = struct {
	FhInst HINSTANCE
	FnID   UINT_PTR
} /* commctrl.h:953:11 */

type TBADDBITMAP = TagTBADDBITMAP /* commctrl.h:956:5 */
type LPTBADDBITMAP = uintptr      /* commctrl.h:956:17 */

type TagTBSAVEPARAMSA = struct {
	Fhkr          HKEY
	FpszSubKey    LPCSTR
	FpszValueName LPCSTR
} /* commctrl.h:1014:11 */

type TBSAVEPARAMSA = TagTBSAVEPARAMSA /* commctrl.h:1018:5 */
type LPTBSAVEPARAMSA = uintptr        /* commctrl.h:1018:19 */

type TagTBSAVEPARAMSW = struct {
	Fhkr          HKEY
	FpszSubKey    LPCWSTR
	FpszValueName LPCWSTR
} /* commctrl.h:1020:11 */

type TBSAVEPARAMSW = TagTBSAVEPARAMSW /* commctrl.h:1024:5 */
type LPTBSAVEPARAMW = uintptr         /* commctrl.h:1024:19 */

type TBINSERTMARK = struct {
	FiButton int32
	FdwFlags DWORD
}                             /* commctrl.h:1080:5 */
type LPTBINSERTMARK = uintptr /* commctrl.h:1080:18 */

type TBREPLACEBITMAP = struct {
	FhInstOld    HINSTANCE
	FnIDOld      UINT_PTR
	FhInstNew    HINSTANCE
	FnIDNew      UINT_PTR
	FnButtons    int32
	F__ccgo_pad1 [4]byte
}                                /* commctrl.h:1112:5 */
type LPTBREPLACEBITMAP = uintptr /* commctrl.h:1112:21 */

type TBBUTTONINFOA = struct {
	FcbSize      UINT
	FdwMask      DWORD
	FidCommand   int32
	FiImage      int32
	FfsState     BYTE
	FfsStyle     BYTE
	Fcx          WORD
	F__ccgo_pad1 [4]byte
	FlParam      DWORD_PTR
	FpszText     LPSTR
	FcchText     int32
	F__ccgo_pad2 [4]byte
}                              /* commctrl.h:1138:5 */
type LPTBBUTTONINFOA = uintptr /* commctrl.h:1138:19 */

type TBBUTTONINFOW = struct {
	FcbSize      UINT
	FdwMask      DWORD
	FidCommand   int32
	FiImage      int32
	FfsState     BYTE
	FfsStyle     BYTE
	Fcx          WORD
	F__ccgo_pad1 [4]byte
	FlParam      DWORD_PTR
	FpszText     LPWSTR
	FcchText     int32
	F__ccgo_pad2 [4]byte
}                              /* commctrl.h:1151:5 */
type LPTBBUTTONINFOW = uintptr /* commctrl.h:1151:19 */

type TBMETRICS = struct {
	FcbSize          UINT
	FdwMask          DWORD
	FcxPad           int32
	FcyPad           int32
	FcxBarPad        int32
	FcyBarPad        int32
	FcxButtonSpacing int32
	FcyButtonSpacing int32
}                          /* commctrl.h:1199:5 */
type LPTBMETRICS = uintptr /* commctrl.h:1199:15 */

type TagNMTBHOTITEM = struct {
	Fhdr         NMHDR
	FidOld       int32
	FidNew       int32
	FdwFlags     DWORD
	F__ccgo_pad1 [4]byte
} /* commctrl.h:1222:11 */

type NMTBHOTITEM = TagNMTBHOTITEM /* commctrl.h:1227:5 */
type LPNMTBHOTITEM = uintptr      /* commctrl.h:1227:17 */

type TagNMTBSAVE = struct {
	Fhdr         NMHDR
	FpData       uintptr
	FpCurrent    uintptr
	FcbData      UINT
	FiItem       int32
	FcButtons    int32
	F__ccgo_pad1 [4]byte
	FtbButton    TBBUTTON
} /* commctrl.h:1263:11 */

type NMTBSAVE = TagNMTBSAVE /* commctrl.h:1271:5 */
type LPNMTBSAVE = uintptr   /* commctrl.h:1271:14 */

type TagNMTBRESTORE = struct {
	Fhdr              NMHDR
	FpData            uintptr
	FpCurrent         uintptr
	FcbData           UINT
	FiItem            int32
	FcButtons         int32
	FcbBytesPerRecord int32
	FtbButton         TBBUTTON
} /* commctrl.h:1273:11 */

type NMTBRESTORE = TagNMTBRESTORE /* commctrl.h:1282:5 */
type LPNMTBRESTORE = uintptr      /* commctrl.h:1282:17 */

type TagNMTBGETINFOTIPA = struct {
	Fhdr        NMHDR
	FpszText    LPSTR
	FcchTextMax int32
	FiItem      int32
	FlParam     LPARAM
} /* commctrl.h:1284:11 */

type NMTBGETINFOTIPA = TagNMTBGETINFOTIPA /* commctrl.h:1290:5 */
type LPNMTBGETINFOTIPA = uintptr          /* commctrl.h:1290:21 */

type TagNMTBGETINFOTIPW = struct {
	Fhdr        NMHDR
	FpszText    LPWSTR
	FcchTextMax int32
	FiItem      int32
	FlParam     LPARAM
} /* commctrl.h:1292:11 */

type NMTBGETINFOTIPW = TagNMTBGETINFOTIPW /* commctrl.h:1298:5 */
type LPNMTBGETINFOTIPW = uintptr          /* commctrl.h:1298:21 */

type NMTBDISPINFOA = struct {
	Fhdr         NMHDR
	FdwMask      DWORD
	FidCommand   int32
	FlParam      DWORD_PTR
	FiImage      int32
	F__ccgo_pad1 [4]byte
	FpszText     LPSTR
	FcchText     int32
	F__ccgo_pad2 [4]byte
}                              /* commctrl.h:1316:5 */
type LPNMTBDISPINFOA = uintptr /* commctrl.h:1316:19 */

type NMTBDISPINFOW = struct {
	Fhdr         NMHDR
	FdwMask      DWORD
	FidCommand   int32
	FlParam      DWORD_PTR
	FiImage      int32
	F__ccgo_pad1 [4]byte
	FpszText     LPWSTR
	FcchText     int32
	F__ccgo_pad2 [4]byte
}                              /* commctrl.h:1326:5 */
type LPNMTBDISPINFOW = uintptr /* commctrl.h:1326:19 */

type TagNMTOOLBARA = struct {
	Fhdr         NMHDR
	FiItem       int32
	F__ccgo_pad1 [4]byte
	FtbButton    TBBUTTON
	FcchText     int32
	F__ccgo_pad2 [4]byte
	FpszText     LPSTR
	FrcButton    RECT
} /* commctrl.h:1346:11 */

type NMTOOLBARA = TagNMTOOLBARA /* commctrl.h:1353:5 */
type LPNMTOOLBARA = uintptr     /* commctrl.h:1353:16 */

type TagNMTOOLBARW = struct {
	Fhdr         NMHDR
	FiItem       int32
	F__ccgo_pad1 [4]byte
	FtbButton    TBBUTTON
	FcchText     int32
	F__ccgo_pad2 [4]byte
	FpszText     LPWSTR
	FrcButton    RECT
} /* commctrl.h:1355:11 */

type NMTOOLBARW = TagNMTOOLBARW /* commctrl.h:1362:5 */
type LPNMTOOLBARW = uintptr     /* commctrl.h:1362:16 */

type TagREBARINFO = struct {
	FcbSize UINT
	FfMask  UINT
	Fhiml   HIMAGELIST
} /* commctrl.h:1387:11 */

type REBARINFO = TagREBARINFO /* commctrl.h:1395:5 */
type LPREBARINFO = uintptr    /* commctrl.h:1395:15 */

type TagREBARBANDINFOA = struct {
	FcbSize      UINT
	FfMask       UINT
	FfStyle      UINT
	FclrFore     COLORREF
	FclrBack     COLORREF
	F__ccgo_pad1 [4]byte
	FlpText      LPSTR
	Fcch         UINT
	FiImage      int32
	FhwndChild   HWND
	FcxMinChild  UINT
	FcyMinChild  UINT
	Fcx          UINT
	F__ccgo_pad2 [4]byte
	FhbmBack     HBITMAP
	FwID         UINT
	FcyChild     UINT
	FcyMaxChild  UINT
	FcyIntegral  UINT
	FcxIdeal     UINT
	F__ccgo_pad3 [4]byte
	FlParam      LPARAM
	FcxHeader    UINT
	F__ccgo_pad4 [4]byte
} /* commctrl.h:1427:11 */

type REBARBANDINFOA = TagREBARBANDINFOA /* commctrl.h:1452:5 */
type LPREBARBANDINFOA = uintptr         /* commctrl.h:1452:20 */
type LPCREBARBANDINFOA = uintptr        /* commctrl.h:1453:32 */

type TagREBARBANDINFOW = struct {
	FcbSize      UINT
	FfMask       UINT
	FfStyle      UINT
	FclrFore     COLORREF
	FclrBack     COLORREF
	F__ccgo_pad1 [4]byte
	FlpText      LPWSTR
	Fcch         UINT
	FiImage      int32
	FhwndChild   HWND
	FcxMinChild  UINT
	FcyMinChild  UINT
	Fcx          UINT
	F__ccgo_pad2 [4]byte
	FhbmBack     HBITMAP
	FwID         UINT
	FcyChild     UINT
	FcyMaxChild  UINT
	FcyIntegral  UINT
	FcxIdeal     UINT
	F__ccgo_pad3 [4]byte
	FlParam      LPARAM
	FcxHeader    UINT
	F__ccgo_pad4 [4]byte
} /* commctrl.h:1460:11 */

type REBARBANDINFOW = TagREBARBANDINFOW /* commctrl.h:1485:5 */
type LPREBARBANDINFOW = uintptr         /* commctrl.h:1485:20 */

type LPCREBARBANDINFOW = uintptr /* commctrl.h:1487:32 */

type TagNMREBARCHILDSIZE = struct {
	Fhdr     NMHDR
	FuBand   UINT
	FwID     UINT
	FrcChild RECT
	FrcBand  RECT
} /* commctrl.h:1572:11 */

type NMREBARCHILDSIZE = TagNMREBARCHILDSIZE /* commctrl.h:1578:5 */
type LPNMREBARCHILDSIZE = uintptr           /* commctrl.h:1578:22 */

type TagNMREBAR = struct {
	Fhdr    NMHDR
	FdwMask DWORD
	FuBand  UINT
	FfStyle UINT
	FwID    UINT
	FlParam LPARAM
} /* commctrl.h:1580:11 */

type NMREBAR = TagNMREBAR /* commctrl.h:1587:5 */
type LPNMREBAR = uintptr  /* commctrl.h:1587:13 */

type TagNMRBAUTOSIZE = struct {
	Fhdr         NMHDR
	FfChanged    WINBOOL
	FrcTarget    RECT
	FrcActual    RECT
	F__ccgo_pad1 [4]byte
} /* commctrl.h:1593:11 */

type NMRBAUTOSIZE = TagNMRBAUTOSIZE /* commctrl.h:1598:5 */
type LPNMRBAUTOSIZE = uintptr       /* commctrl.h:1598:18 */

type TagNMREBARCHEVRON = struct {
	Fhdr      NMHDR
	FuBand    UINT
	FwID      UINT
	FlParam   LPARAM
	Frc       RECT
	FlParamNM LPARAM
} /* commctrl.h:1600:11 */

type NMREBARCHEVRON = TagNMREBARCHEVRON /* commctrl.h:1607:5 */
type LPNMREBARCHEVRON = uintptr         /* commctrl.h:1607:20 */

type TagNMREBARSPLITTER = struct {
	Fhdr      NMHDR
	FrcSizing RECT
} /* commctrl.h:1610:11 */

type NMREBARSPLITTER = TagNMREBARSPLITTER /* commctrl.h:1613:5 */
type LPNMREBARSPLITTER = uintptr          /* commctrl.h:1613:21 */

type TagNMREBARAUTOBREAK = struct {
	Fhdr           NMHDR
	FuBand         UINT
	FwID           UINT
	FlParam        LPARAM
	FuMsg          UINT
	FfStyleCurrent UINT
	FfAutoBreak    WINBOOL
	F__ccgo_pad1   [4]byte
} /* commctrl.h:1619:11 */

type NMREBARAUTOBREAK = TagNMREBARAUTOBREAK /* commctrl.h:1627:5 */
type LPNMREBARAUTOBREAK = uintptr           /* commctrl.h:1627:22 */

type X_RB_HITTESTINFO = struct {
	Fpt    POINT
	Fflags UINT
	FiBand int32
} /* commctrl.h:1638:11 */

type RBHITTESTINFO = X_RB_HITTESTINFO /* commctrl.h:1642:5 */
type LPRBHITTESTINFO = uintptr        /* commctrl.h:1642:19 */

type TagTOOLINFOA = struct {
	FcbSize     UINT
	FuFlags     UINT
	Fhwnd       HWND
	FuId        UINT_PTR
	Frect       RECT
	Fhinst      HINSTANCE
	FlpszText   LPSTR
	FlParam     LPARAM
	FlpReserved uintptr
} /* commctrl.h:1667:11 */

type TTTOOLINFOA = TagTOOLINFOA /* commctrl.h:1677:5 */
type PTOOLINFOA = uintptr       /* commctrl.h:1677:22 */
type LPTTTOOLINFOA = uintptr    /* commctrl.h:1677:34 */

type TagTOOLINFOW = struct {
	FcbSize     UINT
	FuFlags     UINT
	Fhwnd       HWND
	FuId        UINT_PTR
	Frect       RECT
	Fhinst      HINSTANCE
	FlpszText   LPWSTR
	FlParam     LPARAM
	FlpReserved uintptr
} /* commctrl.h:1679:11 */

type TTTOOLINFOW = TagTOOLINFOW /* commctrl.h:1689:5 */
type PTOOLINFOW = uintptr       /* commctrl.h:1689:22 */
type LPTTTOOLINFOW = uintptr    /* commctrl.h:1689:34 */

type X_TTGETTITLE = struct {
	FdwSize       DWORD
	FuTitleBitmap UINT
	Fcch          UINT
	F__ccgo_pad1  [4]byte
	FpszTitle     uintptr
} /* commctrl.h:1780:11 */

type TTGETTITLE = X_TTGETTITLE /* commctrl.h:1785:5 */
type PTTGETTITLE = uintptr     /* commctrl.h:1785:16 */

type X_TT_HITTESTINFOA = struct {
	Fhwnd HWND
	Fpt   POINT
	Fti   TTTOOLINFOA
} /* commctrl.h:1805:11 */

type TTHITTESTINFOA = X_TT_HITTESTINFOA /* commctrl.h:1809:5 */
type LPTTHITTESTINFOA = uintptr         /* commctrl.h:1809:20 */

type X_TT_HITTESTINFOW = struct {
	Fhwnd HWND
	Fpt   POINT
	Fti   TTTOOLINFOW
} /* commctrl.h:1811:11 */

type TTHITTESTINFOW = X_TT_HITTESTINFOW /* commctrl.h:1815:5 */
type LPTTHITTESTINFOW = uintptr         /* commctrl.h:1815:20 */

type TagNMTTDISPINFOA = struct {
	Fhdr         NMHDR
	FlpszText    LPSTR
	FszText      [80]int8
	Fhinst       HINSTANCE
	FuFlags      UINT
	F__ccgo_pad1 [4]byte
	FlParam      LPARAM
} /* commctrl.h:1843:11 */

type NMTTDISPINFOA = TagNMTTDISPINFOA /* commctrl.h:1850:5 */
type LPNMTTDISPINFOA = uintptr        /* commctrl.h:1850:19 */

type TagNMTTDISPINFOW = struct {
	Fhdr         NMHDR
	FlpszText    LPWSTR
	FszText      [80]WCHAR
	Fhinst       HINSTANCE
	FuFlags      UINT
	F__ccgo_pad1 [4]byte
	FlParam      LPARAM
} /* commctrl.h:1852:11 */

type NMTTDISPINFOW = TagNMTTDISPINFOW /* commctrl.h:1859:5 */
type LPNMTTDISPINFOW = uintptr        /* commctrl.h:1859:19 */

type TagDRAGLISTINFO = struct {
	FuNotification UINT
	F__ccgo_pad1   [4]byte
	FhWnd          HWND
	FptCursor      POINT
} /* commctrl.h:2037:11 */

type DRAGLISTINFO = TagDRAGLISTINFO /* commctrl.h:2041:5 */
type LPDRAGLISTINFO = uintptr       /* commctrl.h:2041:18 */

type X_UDACCEL = struct {
	FnSec UINT
	FnInc UINT
} /* commctrl.h:2067:11 */

type UDACCEL = X_UDACCEL /* commctrl.h:2070:5 */
type LPUDACCEL = uintptr /* commctrl.h:2070:13 */

type X_NM_UPDOWN = struct {
	Fhdr    NMHDR
	FiPos   int32
	FiDelta int32
} /* commctrl.h:2107:11 */

type NMUPDOWN = X_NM_UPDOWN /* commctrl.h:2111:5 */
type LPNMUPDOWN = uintptr   /* commctrl.h:2111:14 */

type PBRANGE = struct {
	FiLow  int32
	FiHigh int32
}                       /* commctrl.h:2135:5 */
type PPBRANGE = uintptr /* commctrl.h:2135:13 */

type TagLITEM = struct {
	Fmask      UINT
	FiLink     int32
	Fstate     UINT
	FstateMask UINT
	FszID      [48]WCHAR
	FszUrl     [2084]WCHAR
} /* commctrl.h:2203:11 */

type LITEM = TagLITEM /* commctrl.h:2210:5 */
type PLITEM = uintptr /* commctrl.h:2210:11 */

type TagLHITTESTINFO = struct {
	Fpt   POINT
	Fitem LITEM
} /* commctrl.h:2212:11 */

type LHITTESTINFO = TagLHITTESTINFO /* commctrl.h:2215:5 */
type PLHITTESTINFO = uintptr        /* commctrl.h:2215:18 */

type TagNMLINK = struct {
	Fhdr  NMHDR
	Fitem LITEM
} /* commctrl.h:2217:11 */

type NMLINK = TagNMLINK /* commctrl.h:2220:5 */
type PNMLINK = uintptr  /* commctrl.h:2220:12 */

type TagLVITEMA = struct {
	Fmask        UINT
	FiItem       int32
	FiSubItem    int32
	Fstate       UINT
	FstateMask   UINT
	F__ccgo_pad1 [4]byte
	FpszText     LPSTR
	FcchTextMax  int32
	FiImage      int32
	FlParam      LPARAM
	FiIndent     int32
	FiGroupId    int32
	FcColumns    UINT
	F__ccgo_pad2 [4]byte
	FpuColumns   PUINT
} /* commctrl.h:2319:11 */

type LVITEMA = TagLVITEMA /* commctrl.h:2337:5 */
type LPLVITEMA = uintptr  /* commctrl.h:2337:13 */

type TagLVITEMW = struct {
	Fmask        UINT
	FiItem       int32
	FiSubItem    int32
	Fstate       UINT
	FstateMask   UINT
	F__ccgo_pad1 [4]byte
	FpszText     LPWSTR
	FcchTextMax  int32
	FiImage      int32
	FlParam      LPARAM
	FiIndent     int32
	FiGroupId    int32
	FcColumns    UINT
	F__ccgo_pad2 [4]byte
	FpuColumns   PUINT
} /* commctrl.h:2339:11 */

type LVITEMW = TagLVITEMW /* commctrl.h:2358:5 */
type LPLVITEMW = uintptr  /* commctrl.h:2358:13 */

type TagLVFINDINFOA = struct {
	Fflags       UINT
	F__ccgo_pad1 [4]byte
	Fpsz         LPCSTR
	FlParam      LPARAM
	Fpt          POINT
	FvkDirection UINT
	F__ccgo_pad2 [4]byte
} /* commctrl.h:2436:11 */

type LVFINDINFOA = TagLVFINDINFOA /* commctrl.h:2442:5 */
type LPFINDINFOA = uintptr        /* commctrl.h:2442:17 */

type TagLVFINDINFOW = struct {
	Fflags       UINT
	F__ccgo_pad1 [4]byte
	Fpsz         LPCWSTR
	FlParam      LPARAM
	Fpt          POINT
	FvkDirection UINT
	F__ccgo_pad2 [4]byte
} /* commctrl.h:2444:11 */

type LVFINDINFOW = TagLVFINDINFOW /* commctrl.h:2450:5 */
type LPFINDINFOW = uintptr        /* commctrl.h:2450:17 */

type TagLVHITTESTINFO = struct {
	Fpt       POINT
	Fflags    UINT
	FiItem    int32
	FiSubItem int32
} /* commctrl.h:2506:11 */

type LVHITTESTINFO = TagLVHITTESTINFO /* commctrl.h:2514:5 */
type LPLVHITTESTINFO = uintptr        /* commctrl.h:2514:19 */

type TagLVCOLUMNA = struct {
	Fmask        UINT
	Ffmt         int32
	Fcx          int32
	F__ccgo_pad1 [4]byte
	FpszText     LPSTR
	FcchTextMax  int32
	FiSubItem    int32
	FiImage      int32
	FiOrder      int32
} /* commctrl.h:2553:11 */

type LVCOLUMNA = TagLVCOLUMNA /* commctrl.h:2567:5 */
type LPLVCOLUMNA = uintptr    /* commctrl.h:2567:15 */

type TagLVCOLUMNW = struct {
	Fmask        UINT
	Ffmt         int32
	Fcx          int32
	F__ccgo_pad1 [4]byte
	FpszText     LPWSTR
	FcchTextMax  int32
	FiSubItem    int32
	FiImage      int32
	FiOrder      int32
} /* commctrl.h:2569:11 */

type LVCOLUMNW = TagLVCOLUMNW /* commctrl.h:2583:5 */
type LPLVCOLUMNW = uintptr    /* commctrl.h:2583:15 */

type PFNLVCOMPARE = uintptr /* commctrl.h:2704:15 */

type TagLVBKIMAGEA = struct {
	FulFlags        ULONG
	F__ccgo_pad1    [4]byte
	Fhbm            HBITMAP
	FpszImage       LPSTR
	FcchImageMax    UINT
	FxOffsetPercent int32
	FyOffsetPercent int32
	F__ccgo_pad2    [4]byte
} /* commctrl.h:2808:11 */

type LVBKIMAGEA = TagLVBKIMAGEA /* commctrl.h:2815:5 */
type LPLVBKIMAGEA = uintptr     /* commctrl.h:2815:16 */

type TagLVBKIMAGEW = struct {
	FulFlags        ULONG
	F__ccgo_pad1    [4]byte
	Fhbm            HBITMAP
	FpszImage       LPWSTR
	FcchImageMax    UINT
	FxOffsetPercent int32
	FyOffsetPercent int32
	F__ccgo_pad2    [4]byte
} /* commctrl.h:2817:11 */

type LVBKIMAGEW = TagLVBKIMAGEW /* commctrl.h:2824:5 */
type LPLVBKIMAGEW = uintptr     /* commctrl.h:2824:16 */

type TagLVGROUP = struct {
	FcbSize      UINT
	Fmask        UINT
	FpszHeader   LPWSTR
	FcchHeader   int32
	F__ccgo_pad1 [4]byte
	FpszFooter   LPWSTR
	FcchFooter   int32
	FiGroupId    int32
	FstateMask   UINT
	Fstate       UINT
	FuAlign      UINT
	F__ccgo_pad2 [4]byte
} /* commctrl.h:2891:11 */

type LVGROUP = TagLVGROUP /* commctrl.h:2920:5 */
type PLVGROUP = uintptr   /* commctrl.h:2920:13 */

type TagLVGROUPMETRICS = struct {
	FcbSize   UINT
	Fmask     UINT
	FLeft     UINT
	FTop      UINT
	FRight    UINT
	FBottom   UINT
	FcrLeft   COLORREF
	FcrTop    COLORREF
	FcrRight  COLORREF
	FcrBottom COLORREF
	FcrHeader COLORREF
	FcrFooter COLORREF
} /* commctrl.h:2952:11 */

type LVGROUPMETRICS = TagLVGROUPMETRICS /* commctrl.h:2964:5 */
type PLVGROUPMETRICS = uintptr          /* commctrl.h:2964:20 */

type PFNLVGROUPCOMPARE = uintptr /* commctrl.h:2973:15 */

type TagLVINSERTGROUPSORTED = struct {
	FpfnGroupCompare PFNLVGROUPCOMPARE
	FpvData          uintptr
	FlvGroup         LVGROUP
} /* commctrl.h:2978:11 */

type LVINSERTGROUPSORTED = TagLVINSERTGROUPSORTED /* commctrl.h:2982:5 */
type PLVINSERTGROUPSORTED = uintptr               /* commctrl.h:2982:25 */

type TagLVTILEVIEWINFO = struct {
	FcbSize        UINT
	FdwMask        DWORD
	FdwFlags       DWORD
	FsizeTile      SIZE
	FcLines        int32
	FrcLabelMargin RECT
} /* commctrl.h:3009:11 */

type LVTILEVIEWINFO = TagLVTILEVIEWINFO /* commctrl.h:3016:5 */
type PLVTILEVIEWINFO = uintptr          /* commctrl.h:3016:20 */

type TagLVTILEINFO = struct {
	FcbSize      UINT
	FiItem       int32
	FcColumns    UINT
	F__ccgo_pad1 [4]byte
	FpuColumns   PUINT
} /* commctrl.h:3018:11 */

type LVTILEINFO = TagLVTILEINFO /* commctrl.h:3026:5 */
type PLVTILEINFO = uintptr      /* commctrl.h:3026:16 */

type LVINSERTMARK = struct {
	FcbSize     UINT
	FdwFlags    DWORD
	FiItem      int32
	FdwReserved DWORD
}                             /* commctrl.h:3044:5 */
type LPLVINSERTMARK = uintptr /* commctrl.h:3044:18 */

type TagLVSETINFOTIP = struct {
	FcbSize   UINT
	FdwFlags  DWORD
	FpszText  LPWSTR
	FiItem    int32
	FiSubItem int32
} /* commctrl.h:3061:11 */

type LVSETINFOTIP = TagLVSETINFOTIP /* commctrl.h:3067:5 */
type PLVSETINFOTIP = uintptr        /* commctrl.h:3067:18 */

type TagNMLISTVIEW = struct {
	Fhdr         NMHDR
	FiItem       int32
	FiSubItem    int32
	FuNewState   UINT
	FuOldState   UINT
	FuChanged    UINT
	FptAction    POINT
	F__ccgo_pad1 [4]byte
	FlParam      LPARAM
} /* commctrl.h:3151:11 */

type NMLISTVIEW = TagNMLISTVIEW /* commctrl.h:3160:5 */
type LPNMLISTVIEW = uintptr     /* commctrl.h:3160:16 */

type TagNMITEMACTIVATE = struct {
	Fhdr         NMHDR
	FiItem       int32
	FiSubItem    int32
	FuNewState   UINT
	FuOldState   UINT
	FuChanged    UINT
	FptAction    POINT
	F__ccgo_pad1 [4]byte
	FlParam      LPARAM
	FuKeyFlags   UINT
	F__ccgo_pad2 [4]byte
} /* commctrl.h:3162:11 */

type NMITEMACTIVATE = TagNMITEMACTIVATE /* commctrl.h:3172:5 */
type LPNMITEMACTIVATE = uintptr         /* commctrl.h:3172:20 */

type TagNMLVCUSTOMDRAW = struct {
	Fnmcd        NMCUSTOMDRAW
	FclrText     COLORREF
	FclrTextBk   COLORREF
	FiSubItem    int32
	FdwItemType  DWORD
	FclrFace     COLORREF
	FiIconEffect int32
	FiIconPhase  int32
	FiPartId     int32
	FiStateId    int32
	FrcText      RECT
	FuAlign      UINT
} /* commctrl.h:3180:11 */

type NMLVCUSTOMDRAW = TagNMLVCUSTOMDRAW /* commctrl.h:3193:5 */
type LPNMLVCUSTOMDRAW = uintptr         /* commctrl.h:3193:20 */

type TagNMLVCACHEHINT = struct {
	Fhdr   NMHDR
	FiFrom int32
	FiTo   int32
} /* commctrl.h:3202:11 */

type NMLVCACHEHINT = TagNMLVCACHEHINT /* commctrl.h:3206:5 */
type LPNMLVCACHEHINT = uintptr        /* commctrl.h:3206:19 */

type TagNMLVFINDITEMA = struct {
	Fhdr         NMHDR
	FiStart      int32
	F__ccgo_pad1 [4]byte
	Flvfi        LVFINDINFOA
} /* commctrl.h:3212:11 */

type NMLVFINDITEMA = TagNMLVFINDITEMA /* commctrl.h:3216:5 */
type LPNMLVFINDITEMA = uintptr        /* commctrl.h:3216:19 */

type TagNMLVFINDITEMW = struct {
	Fhdr         NMHDR
	FiStart      int32
	F__ccgo_pad1 [4]byte
	Flvfi        LVFINDINFOW
} /* commctrl.h:3218:11 */

type NMLVFINDITEMW = TagNMLVFINDITEMW /* commctrl.h:3222:5 */
type LPNMLVFINDITEMW = uintptr        /* commctrl.h:3222:19 */

type TagNMLVODSTATECHANGE = struct {
	Fhdr       NMHDR
	FiFrom     int32
	FiTo       int32
	FuNewState UINT
	FuOldState UINT
} /* commctrl.h:3238:11 */

type NMLVODSTATECHANGE = TagNMLVODSTATECHANGE /* commctrl.h:3244:5 */
type LPNMLVODSTATECHANGE = uintptr            /* commctrl.h:3244:23 */

type TagLVDISPINFO = struct {
	Fhdr  NMHDR
	Fitem LVITEMA
} /* commctrl.h:3289:11 */

type NMLVDISPINFOA = TagLVDISPINFO /* commctrl.h:3292:5 */
type LPNMLVDISPINFOA = uintptr     /* commctrl.h:3292:19 */

type TagLVDISPINFOW = struct {
	Fhdr  NMHDR
	Fitem LVITEMW
} /* commctrl.h:3294:11 */

type NMLVDISPINFOW = TagLVDISPINFOW /* commctrl.h:3297:5 */
type LPNMLVDISPINFOW = uintptr      /* commctrl.h:3297:19 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagLVKEYDOWN = struct {
	Fhdr         NMHDR
	FwVKey       WORD
	F__ccgo_pad1 [2]byte
	Fflags       UINT
} /* commctrl.h:3307:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type NMLVKEYDOWN = TagLVKEYDOWN /* commctrl.h:3311:5 */
type LPNMLVKEYDOWN = uintptr    /* commctrl.h:3311:17 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagNMLVGETINFOTIPA = struct {
	Fhdr         NMHDR
	FdwFlags     DWORD
	F__ccgo_pad1 [4]byte
	FpszText     LPSTR
	FcchTextMax  int32
	FiItem       int32
	FiSubItem    int32
	F__ccgo_pad2 [4]byte
	FlParam      LPARAM
} /* commctrl.h:3326:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type NMLVGETINFOTIPA = TagNMLVGETINFOTIPA /* commctrl.h:3334:5 */
type LPNMLVGETINFOTIPA = uintptr          /* commctrl.h:3334:21 */

type TagNMLVGETINFOTIPW = struct {
	Fhdr         NMHDR
	FdwFlags     DWORD
	F__ccgo_pad1 [4]byte
	FpszText     LPWSTR
	FcchTextMax  int32
	FiItem       int32
	FiSubItem    int32
	F__ccgo_pad2 [4]byte
	FlParam      LPARAM
} /* commctrl.h:3336:11 */

type NMLVGETINFOTIPW = TagNMLVGETINFOTIPW /* commctrl.h:3344:5 */
type LPNMLVGETINFOTIPW = uintptr          /* commctrl.h:3344:21 */

type TagNMLVSCROLL = struct {
	Fhdr NMHDR
	Fdx  int32
	Fdy  int32
} /* commctrl.h:3369:11 */

type NMLVSCROLL = TagNMLVSCROLL /* commctrl.h:3373:5 */
type LPNMLVSCROLL = uintptr     /* commctrl.h:3373:16 */

type HTREEITEM = uintptr /* commctrl.h:3430:28 */

type TagNMTVSTATEIMAGECHANGING = struct {
	Fhdr                 NMHDR
	Fhti                 HTREEITEM
	FiOldStateImageIndex int32
	FiNewStateImageIndex int32
} /* commctrl.h:3463:11 */

type NMTVSTATEIMAGECHANGING = TagNMTVSTATEIMAGECHANGING /* commctrl.h:3468:5 */
type LPNMTVSTATEIMAGECHANGING = uintptr                 /* commctrl.h:3468:28 */

type TagTVITEMA = struct {
	Fmask           UINT
	F__ccgo_pad1    [4]byte
	FhItem          HTREEITEM
	Fstate          UINT
	FstateMask      UINT
	FpszText        LPSTR
	FcchTextMax     int32
	FiImage         int32
	FiSelectedImage int32
	FcChildren      int32
	FlParam         LPARAM
} /* commctrl.h:3481:11 */

type TVITEMA = TagTVITEMA /* commctrl.h:3492:5 */
type LPTVITEMA = uintptr  /* commctrl.h:3492:13 */

type TagTVITEMW = struct {
	Fmask           UINT
	F__ccgo_pad1    [4]byte
	FhItem          HTREEITEM
	Fstate          UINT
	FstateMask      UINT
	FpszText        LPWSTR
	FcchTextMax     int32
	FiImage         int32
	FiSelectedImage int32
	FcChildren      int32
	FlParam         LPARAM
} /* commctrl.h:3494:11 */

type TVITEMW = TagTVITEMW /* commctrl.h:3505:5 */
type LPTVITEMW = uintptr  /* commctrl.h:3505:13 */

type TagTVITEMEXA = struct {
	Fmask           UINT
	F__ccgo_pad1    [4]byte
	FhItem          HTREEITEM
	Fstate          UINT
	FstateMask      UINT
	FpszText        LPSTR
	FcchTextMax     int32
	FiImage         int32
	FiSelectedImage int32
	FcChildren      int32
	FlParam         LPARAM
	FiIntegral      int32
	FuStateEx       UINT
	Fhwnd           HWND
	FiExpandedImage int32
	F__ccgo_pad2    [4]byte
} /* commctrl.h:3507:11 */

type TVITEMEXA = TagTVITEMEXA /* commctrl.h:3527:5 */
type LPTVITEMEXA = uintptr    /* commctrl.h:3527:15 */

type TagTVITEMEXW = struct {
	Fmask           UINT
	F__ccgo_pad1    [4]byte
	FhItem          HTREEITEM
	Fstate          UINT
	FstateMask      UINT
	FpszText        LPWSTR
	FcchTextMax     int32
	FiImage         int32
	FiSelectedImage int32
	FcChildren      int32
	FlParam         LPARAM
	FiIntegral      int32
	FuStateEx       UINT
	Fhwnd           HWND
	FiExpandedImage int32
	F__ccgo_pad2    [4]byte
} /* commctrl.h:3529:11 */

type TVITEMEXW = TagTVITEMEXW /* commctrl.h:3549:5 */
type LPTVITEMEXW = uintptr    /* commctrl.h:3549:15 */

type TVITEMEX = TVITEMEXA     /* commctrl.h:3551:3 */
type LPTVITEMEX = LPTVITEMEXA /* commctrl.h:3552:3 */

type TagTVINSERTSTRUCTA = struct {
	FhParent      HTREEITEM
	FhInsertAfter HTREEITEM
	F__16         struct{ Fitemex TVITEMEXA }
} /* commctrl.h:3572:11 */

type TVINSERTSTRUCTA = TagTVINSERTSTRUCTA /* commctrl.h:3579:5 */
type LPTVINSERTSTRUCTA = uintptr          /* commctrl.h:3579:21 */

type TagTVINSERTSTRUCTW = struct {
	FhParent      HTREEITEM
	FhInsertAfter HTREEITEM
	F__16         struct{ Fitemex TVITEMEXW }
} /* commctrl.h:3581:11 */

type TVINSERTSTRUCTW = TagTVINSERTSTRUCTW /* commctrl.h:3588:5 */
type LPTVINSERTSTRUCTW = uintptr          /* commctrl.h:3588:21 */

type TagTVHITTESTINFO = struct {
	Fpt          POINT
	Fflags       UINT
	F__ccgo_pad1 [4]byte
	FhItem       HTREEITEM
} /* commctrl.h:3713:11 */

type TVHITTESTINFO = TagTVHITTESTINFO /* commctrl.h:3717:5 */
type LPTVHITTESTINFO = uintptr        /* commctrl.h:3717:19 */

type PFNTVCOMPARE = uintptr /* commctrl.h:3842:13 */

type TagTVSORTCB = struct {
	FhParent     HTREEITEM
	FlpfnCompare PFNTVCOMPARE
	FlParam      LPARAM
} /* commctrl.h:3847:11 */

type TVSORTCB = TagTVSORTCB /* commctrl.h:3851:5 */
type LPTVSORTCB = uintptr   /* commctrl.h:3851:14 */

type TagNMTREEVIEWA = struct {
	Fhdr         NMHDR
	Faction      UINT
	F__ccgo_pad1 [4]byte
	FitemOld     TVITEMA
	FitemNew     TVITEMA
	FptDrag      POINT
} /* commctrl.h:3860:11 */

type NMTREEVIEWA = TagNMTREEVIEWA /* commctrl.h:3866:5 */
type LPNMTREEVIEWA = uintptr      /* commctrl.h:3866:17 */

type TagNMTREEVIEWW = struct {
	Fhdr         NMHDR
	Faction      UINT
	F__ccgo_pad1 [4]byte
	FitemOld     TVITEMW
	FitemNew     TVITEMW
	FptDrag      POINT
} /* commctrl.h:3868:11 */

type NMTREEVIEWW = TagNMTREEVIEWW /* commctrl.h:3874:5 */
type LPNMTREEVIEWW = uintptr      /* commctrl.h:3874:17 */

type TagTVDISPINFOA = struct {
	Fhdr  NMHDR
	Fitem TVITEMA
} /* commctrl.h:3899:11 */

type NMTVDISPINFOA = TagTVDISPINFOA /* commctrl.h:3902:5 */
type LPNMTVDISPINFOA = uintptr      /* commctrl.h:3902:19 */

type TagTVDISPINFOW = struct {
	Fhdr  NMHDR
	Fitem TVITEMW
} /* commctrl.h:3904:11 */

type NMTVDISPINFOW = TagTVDISPINFOW /* commctrl.h:3907:5 */
type LPNMTVDISPINFOW = uintptr      /* commctrl.h:3907:19 */

type TagTVDISPINFOEXA = struct {
	Fhdr  NMHDR
	Fitem TVITEMEXA
} /* commctrl.h:3913:9 */

type NMTVDISPINFOEXA = TagTVDISPINFOEXA /* commctrl.h:3916:3 */
type LPNMTVDISPINFOEXA = uintptr        /* commctrl.h:3916:20 */

type TagTVDISPINFOEXW = struct {
	Fhdr  NMHDR
	Fitem TVITEMEXW
} /* commctrl.h:3918:9 */

type NMTVDISPINFOEXW = TagTVDISPINFOEXW /* commctrl.h:3921:3 */
type LPNMTVDISPINFOEXW = uintptr        /* commctrl.h:3921:20 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagTVKEYDOWN = struct {
	Fhdr         NMHDR
	FwVKey       WORD
	F__ccgo_pad1 [2]byte
	Fflags       UINT
} /* commctrl.h:3966:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type NMTVKEYDOWN = TagTVKEYDOWN /* commctrl.h:3970:5 */
type LPNMTVKEYDOWN = uintptr    /* commctrl.h:3970:17 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagNMTVCUSTOMDRAW = struct {
	Fnmcd        NMCUSTOMDRAW
	FclrText     COLORREF
	FclrTextBk   COLORREF
	FiLevel      int32
	F__ccgo_pad1 [4]byte
} /* commctrl.h:3988:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type NMTVCUSTOMDRAW = TagNMTVCUSTOMDRAW /* commctrl.h:3993:5 */
type LPNMTVCUSTOMDRAW = uintptr         /* commctrl.h:3993:20 */

type TagNMTVGETINFOTIPA = struct {
	Fhdr         NMHDR
	FpszText     LPSTR
	FcchTextMax  int32
	F__ccgo_pad1 [4]byte
	FhItem       HTREEITEM
	FlParam      LPARAM
} /* commctrl.h:3995:11 */

type NMTVGETINFOTIPA = TagNMTVGETINFOTIPA /* commctrl.h:4001:5 */
type LPNMTVGETINFOTIPA = uintptr          /* commctrl.h:4001:21 */

type TagNMTVGETINFOTIPW = struct {
	Fhdr         NMHDR
	FpszText     LPWSTR
	FcchTextMax  int32
	F__ccgo_pad1 [4]byte
	FhItem       HTREEITEM
	FlParam      LPARAM
} /* commctrl.h:4003:11 */

type NMTVGETINFOTIPW = TagNMTVGETINFOTIPW /* commctrl.h:4009:5 */
type LPNMTVGETINFOTIPW = uintptr          /* commctrl.h:4009:21 */

type TagCOMBOBOXEXITEMA = struct {
	Fmask           UINT
	F__ccgo_pad1    [4]byte
	FiItem          INT_PTR
	FpszText        LPSTR
	FcchTextMax     int32
	FiImage         int32
	FiSelectedImage int32
	FiOverlay       int32
	FiIndent        int32
	F__ccgo_pad2    [4]byte
	FlParam         LPARAM
} /* commctrl.h:4058:11 */

type COMBOBOXEXITEMA = TagCOMBOBOXEXITEMA /* commctrl.h:4068:5 */
type PCOMBOBOXEXITEMA = uintptr           /* commctrl.h:4068:21 */
type PCCOMBOEXITEMA = uintptr             /* commctrl.h:4069:33 */

type TagCOMBOBOXEXITEMW = struct {
	Fmask           UINT
	F__ccgo_pad1    [4]byte
	FiItem          INT_PTR
	FpszText        LPWSTR
	FcchTextMax     int32
	FiImage         int32
	FiSelectedImage int32
	FiOverlay       int32
	FiIndent        int32
	F__ccgo_pad2    [4]byte
	FlParam         LPARAM
} /* commctrl.h:4071:11 */

type COMBOBOXEXITEMW = TagCOMBOBOXEXITEMW /* commctrl.h:4082:5 */
type PCOMBOBOXEXITEMW = uintptr           /* commctrl.h:4082:21 */
type PCCOMBOEXITEMW = uintptr             /* commctrl.h:4083:33 */

type NMCOMBOBOXEXA = struct {
	Fhdr    NMHDR
	FceItem COMBOBOXEXITEMA
}                             /* commctrl.h:4126:5 */
type PNMCOMBOBOXEXA = uintptr /* commctrl.h:4126:19 */

type NMCOMBOBOXEXW = struct {
	Fhdr    NMHDR
	FceItem COMBOBOXEXITEMW
}                             /* commctrl.h:4131:5 */
type PNMCOMBOBOXEXW = uintptr /* commctrl.h:4131:19 */

type NMCBEDRAGBEGINW = struct {
	Fhdr         NMHDR
	FiItemid     int32
	FszText      [260]WCHAR
	F__ccgo_pad1 [4]byte
}                                /* commctrl.h:4164:5 */
type LPNMCBEDRAGBEGINW = uintptr /* commctrl.h:4164:21 */
type PNMCBEDRAGBEGINW = uintptr  /* commctrl.h:4164:40 */

type NMCBEDRAGBEGINA = struct {
	Fhdr     NMHDR
	FiItemid int32
	FszText  [260]int8
}                                /* commctrl.h:4170:5 */
type LPNMCBEDRAGBEGINA = uintptr /* commctrl.h:4170:21 */
type PNMCBEDRAGBEGINA = uintptr  /* commctrl.h:4170:40 */

type NMCBEENDEDITW = struct {
	Fhdr           NMHDR
	FfChanged      WINBOOL
	FiNewSelection int32
	FszText        [260]WCHAR
	FiWhy          int32
	F__ccgo_pad1   [4]byte
}                              /* commctrl.h:4182:5 */
type LPNMCBEENDEDITW = uintptr /* commctrl.h:4182:19 */
type PNMCBEENDEDITW = uintptr  /* commctrl.h:4182:36 */

type NMCBEENDEDITA = struct {
	Fhdr           NMHDR
	FfChanged      WINBOOL
	FiNewSelection int32
	FszText        [260]int8
	FiWhy          int32
}                              /* commctrl.h:4190:5 */
type LPNMCBEENDEDITA = uintptr /* commctrl.h:4190:19 */
type PNMCBEENDEDITA = uintptr  /* commctrl.h:4190:36 */

type TagTCITEMHEADERA = struct {
	Fmask        UINT
	FlpReserved1 UINT
	FlpReserved2 UINT
	F__ccgo_pad1 [4]byte
	FpszText     LPSTR
	FcchTextMax  int32
	FiImage      int32
} /* commctrl.h:4248:11 */

type TCITEMHEADERA = TagTCITEMHEADERA /* commctrl.h:4255:5 */
type LPTCITEMHEADERA = uintptr        /* commctrl.h:4255:19 */

type TagTCITEMHEADERW = struct {
	Fmask        UINT
	FlpReserved1 UINT
	FlpReserved2 UINT
	F__ccgo_pad1 [4]byte
	FpszText     LPWSTR
	FcchTextMax  int32
	FiImage      int32
} /* commctrl.h:4257:11 */

type TCITEMHEADERW = TagTCITEMHEADERW /* commctrl.h:4264:5 */
type LPTCITEMHEADERW = uintptr        /* commctrl.h:4264:19 */

type TagTCITEMA = struct {
	Fmask        UINT
	FdwState     DWORD
	FdwStateMask DWORD
	F__ccgo_pad1 [4]byte
	FpszText     LPSTR
	FcchTextMax  int32
	FiImage      int32
	FlParam      LPARAM
} /* commctrl.h:4273:11 */

type TCITEMA = TagTCITEMA /* commctrl.h:4281:5 */
type LPTCITEMA = uintptr  /* commctrl.h:4281:13 */

type TagTCITEMW = struct {
	Fmask        UINT
	FdwState     DWORD
	FdwStateMask DWORD
	F__ccgo_pad1 [4]byte
	FpszText     LPWSTR
	FcchTextMax  int32
	FiImage      int32
	FlParam      LPARAM
} /* commctrl.h:4283:11 */

type TCITEMW = TagTCITEMW /* commctrl.h:4291:5 */
type LPTCITEMW = uintptr  /* commctrl.h:4291:13 */

type TagTCHITTESTINFO = struct {
	Fpt    POINT
	Fflags UINT
} /* commctrl.h:4340:11 */

type TCHITTESTINFO = TagTCHITTESTINFO /* commctrl.h:4343:5 */
type LPTCHITTESTINFO = uintptr        /* commctrl.h:4343:19 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type TagTCKEYDOWN = struct {
	Fhdr         NMHDR
	FwVKey       WORD
	F__ccgo_pad1 [2]byte
	Fflags       UINT
} /* commctrl.h:4388:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type NMTCKEYDOWN = TagTCKEYDOWN /* commctrl.h:4392:5 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type MONTHDAYSTATE = DWORD     /* commctrl.h:4442:17 */
type LPMONTHDAYSTATE = uintptr /* commctrl.h:4442:31 */

type MCHITTESTINFO = struct {
	FcbSize UINT
	Fpt     POINT
	FuHit   UINT
	Fst     SYSTEMTIME
}                             /* commctrl.h:4494:5 */
type PMCHITTESTINFO = uintptr /* commctrl.h:4494:19 */

type TagNMSELCHANGE = struct {
	Fnmhdr      NMHDR
	FstSelStart SYSTEMTIME
	FstSelEnd   SYSTEMTIME
} /* commctrl.h:4600:11 */

type NMSELCHANGE = TagNMSELCHANGE /* commctrl.h:4604:5 */
type LPNMSELCHANGE = uintptr      /* commctrl.h:4604:17 */

type TagNMDAYSTATE = struct {
	Fnmhdr       NMHDR
	FstStart     SYSTEMTIME
	FcDayState   int32
	F__ccgo_pad1 [4]byte
	FprgDayState LPMONTHDAYSTATE
} /* commctrl.h:4608:11 */

type NMDAYSTATE = TagNMDAYSTATE /* commctrl.h:4613:5 */
type LPNMDAYSTATE = uintptr     /* commctrl.h:4613:16 */

type NMSELECT = NMSELCHANGE /* commctrl.h:4617:23 */
type LPNMSELECT = uintptr   /* commctrl.h:4617:32 */

type TagNMVIEWCHANGE = struct {
	Fnmhdr     NMHDR
	FdwOldView DWORD
	FdwNewView DWORD
} /* commctrl.h:4621:11 */

type NMVIEWCHANGE = TagNMVIEWCHANGE /* commctrl.h:4625:5 */
type LPNMVIEWCHANGE = uintptr       /* commctrl.h:4625:18 */

type TagNMDATETIMECHANGE = struct {
	Fnmhdr       NMHDR
	FdwFlags     DWORD
	Fst          SYSTEMTIME
	F__ccgo_pad1 [4]byte
} /* commctrl.h:4714:11 */

type NMDATETIMECHANGE = TagNMDATETIMECHANGE /* commctrl.h:4718:5 */
type LPNMDATETIMECHANGE = uintptr           /* commctrl.h:4718:22 */

type TagNMDATETIMESTRINGA = struct {
	Fnmhdr         NMHDR
	FpszUserString LPCSTR
	Fst            SYSTEMTIME
	FdwFlags       DWORD
	F__ccgo_pad1   [4]byte
} /* commctrl.h:4723:11 */

type NMDATETIMESTRINGA = TagNMDATETIMESTRINGA /* commctrl.h:4728:5 */
type LPNMDATETIMESTRINGA = uintptr            /* commctrl.h:4728:23 */

type TagNMDATETIMESTRINGW = struct {
	Fnmhdr         NMHDR
	FpszUserString LPCWSTR
	Fst            SYSTEMTIME
	FdwFlags       DWORD
	F__ccgo_pad1   [4]byte
} /* commctrl.h:4730:11 */

type NMDATETIMESTRINGW = TagNMDATETIMESTRINGW /* commctrl.h:4735:5 */
type LPNMDATETIMESTRINGW = uintptr            /* commctrl.h:4735:23 */

type TagNMDATETIMEWMKEYDOWNA = struct {
	Fnmhdr       NMHDR
	FnVirtKey    int32
	F__ccgo_pad1 [4]byte
	FpszFormat   LPCSTR
	Fst          SYSTEMTIME
} /* commctrl.h:4744:11 */

type NMDATETIMEWMKEYDOWNA = TagNMDATETIMEWMKEYDOWNA /* commctrl.h:4749:5 */
type LPNMDATETIMEWMKEYDOWNA = uintptr               /* commctrl.h:4749:26 */

type TagNMDATETIMEWMKEYDOWNW = struct {
	Fnmhdr       NMHDR
	FnVirtKey    int32
	F__ccgo_pad1 [4]byte
	FpszFormat   LPCWSTR
	Fst          SYSTEMTIME
} /* commctrl.h:4751:11 */

type NMDATETIMEWMKEYDOWNW = TagNMDATETIMEWMKEYDOWNW /* commctrl.h:4756:5 */
type LPNMDATETIMEWMKEYDOWNW = uintptr               /* commctrl.h:4756:26 */

type TagNMDATETIMEFORMATA = struct {
	Fnmhdr      NMHDR
	FpszFormat  LPCSTR
	Fst         SYSTEMTIME
	FpszDisplay LPCSTR
	FszDisplay  [64]CHAR
} /* commctrl.h:4765:11 */

type NMDATETIMEFORMATA = TagNMDATETIMEFORMATA /* commctrl.h:4771:5 */
type LPNMDATETIMEFORMATA = uintptr            /* commctrl.h:4771:23 */

type TagNMDATETIMEFORMATW = struct {
	Fnmhdr      NMHDR
	FpszFormat  LPCWSTR
	Fst         SYSTEMTIME
	FpszDisplay LPCWSTR
	FszDisplay  [64]WCHAR
} /* commctrl.h:4773:11 */

type NMDATETIMEFORMATW = TagNMDATETIMEFORMATW /* commctrl.h:4779:5 */
type LPNMDATETIMEFORMATW = uintptr            /* commctrl.h:4779:23 */

type TagNMDATETIMEFORMATQUERYA = struct {
	Fnmhdr     NMHDR
	FpszFormat LPCSTR
	FszMax     SIZE
} /* commctrl.h:4788:11 */

type NMDATETIMEFORMATQUERYA = TagNMDATETIMEFORMATQUERYA /* commctrl.h:4792:5 */
type LPNMDATETIMEFORMATQUERYA = uintptr                 /* commctrl.h:4792:28 */

type TagNMDATETIMEFORMATQUERYW = struct {
	Fnmhdr     NMHDR
	FpszFormat LPCWSTR
	FszMax     SIZE
} /* commctrl.h:4794:11 */

type NMDATETIMEFORMATQUERYW = TagNMDATETIMEFORMATQUERYW /* commctrl.h:4798:5 */
type LPNMDATETIMEFORMATQUERYW = uintptr                 /* commctrl.h:4798:28 */

type TagNMIPADDRESS = struct {
	Fhdr    NMHDR
	FiField int32
	FiValue int32
} /* commctrl.h:4829:11 */

type NMIPADDRESS = TagNMIPADDRESS /* commctrl.h:4833:5 */
type LPNMIPADDRESS = uintptr      /* commctrl.h:4833:17 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type NMPGSCROLL = struct {
	Fhdr         NMHDR
	FfwKeys      WORD
	F__ccgo_pad1 [2]byte
	FrcParent    RECT
	FiDir        int32
	FiXpos       int32
	FiYpos       int32
	FiScroll     int32
	F__ccgo_pad2 [4]byte
}                           /* commctrl.h:4928:4 */
type LPNMPGSCROLL = uintptr /* commctrl.h:4928:15 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type NMPGCALCSIZE = struct {
	Fhdr         NMHDR
	FdwFlag      DWORD
	FiWidth      int32
	FiHeight     int32
	F__ccgo_pad1 [4]byte
}                             /* commctrl.h:4942:5 */
type LPNMPGCALCSIZE = uintptr /* commctrl.h:4942:18 */

type TagNMPGHOTITEM = struct {
	Fhdr         NMHDR
	FidOld       int32
	FidNew       int32
	FdwFlags     DWORD
	F__ccgo_pad1 [4]byte
} /* commctrl.h:4946:11 */

type NMPGHOTITEM = TagNMPGHOTITEM /* commctrl.h:4951:5 */
type LPNMPGHOTITEM = uintptr      /* commctrl.h:4951:17 */

type BUTTON_IMAGELIST = struct {
	Fhiml        HIMAGELIST
	Fmargin      RECT
	FuAlign      UINT
	F__ccgo_pad1 [4]byte
}                                /* commctrl.h:4985:5 */
type PBUTTON_IMAGELIST = uintptr /* commctrl.h:4985:22 */

type TagNMBCHOTITEM = struct {
	Fhdr         NMHDR
	FdwFlags     DWORD
	F__ccgo_pad1 [4]byte
} /* commctrl.h:5001:11 */

type NMBCHOTITEM = TagNMBCHOTITEM /* commctrl.h:5004:5 */
type LPNMBCHOTITEM = uintptr      /* commctrl.h:5004:17 */

type X_tagEDITBALLOONTIP = struct {
	FcbStruct    DWORD
	F__ccgo_pad1 [4]byte
	FpszTitle    LPCWSTR
	FpszText     LPCWSTR
	FttiIcon     INT
	F__ccgo_pad2 [4]byte
} /* commctrl.h:5081:11 */

type EDITBALLOONTIP = X_tagEDITBALLOONTIP /* commctrl.h:5086:5 */
type PEDITBALLOONTIP = uintptr            /* commctrl.h:5086:20 */

type PFNDAENUMCALLBACK = uintptr      /* commctrl.h:5313:15 */
type PFNDAENUMCALLBACKCONST = uintptr /* commctrl.h:5314:15 */
type PFNDACOMPARE = uintptr           /* commctrl.h:5315:15 */
type PFNDACOMPARECONST = uintptr      /* commctrl.h:5316:15 */
type HDSA = uintptr                   /* commctrl.h:5318:23 */
type HDPA = uintptr                   /* commctrl.h:5363:23 */

type X_DPASTREAMINFO = struct {
	FiPos        int32
	F__ccgo_pad1 [4]byte
	FpvItem      uintptr
} /* commctrl.h:5405:11 */

type DPASTREAMINFO = X_DPASTREAMINFO /* commctrl.h:5408:5 */
type PFNDPASTREAM = uintptr          /* commctrl.h:5411:19 */

type PFNDPAMERGE = uintptr      /* commctrl.h:5420:16 */
type PFNDPAMERGECONST = uintptr /* commctrl.h:5421:22 */

type SUBCLASSPROC = uintptr /* commctrl.h:5525:19 */

//** Autogenerated by WIDL 5.16 from include/exdisp.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IWebBrowser1 = struct{ FlpVtbl uintptr } /* exdisp.h:23:9 */

//** Autogenerated by WIDL 5.16 from include/exdisp.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IWebBrowser = IWebBrowser1 /* exdisp.h:23:31 */

type DWebBrowserEvents1 = struct{ FlpVtbl uintptr } /* exdisp.h:31:9 */

type DWebBrowserEvents = DWebBrowserEvents1 /* exdisp.h:31:37 */

type IWebBrowserApp1 = struct{ FlpVtbl uintptr } /* exdisp.h:39:9 */

type IWebBrowserApp = IWebBrowserApp1 /* exdisp.h:39:34 */

type IWebBrowser21 = struct{ FlpVtbl uintptr } /* exdisp.h:47:9 */

type IWebBrowser2 = IWebBrowser21 /* exdisp.h:47:32 */

type DWebBrowserEvents21 = struct{ FlpVtbl uintptr } /* exdisp.h:55:9 */

type DWebBrowserEvents2 = DWebBrowserEvents21 /* exdisp.h:55:38 */

type DShellWindowsEvents1 = struct{ FlpVtbl uintptr } /* exdisp.h:99:9 */

type DShellWindowsEvents = DShellWindowsEvents1 /* exdisp.h:99:39 */

type IShellWindows1 = struct{ FlpVtbl uintptr } /* exdisp.h:107:9 */

type IShellWindows = IShellWindows1 /* exdisp.h:107:33 */

type IShellUIHelper1 = struct{ FlpVtbl uintptr } /* exdisp.h:124:9 */

type IShellUIHelper = IShellUIHelper1 /* exdisp.h:124:34 */

type IShellUIHelper21 = struct{ FlpVtbl uintptr } /* exdisp.h:132:9 */

type IShellUIHelper2 = IShellUIHelper21 /* exdisp.h:132:35 */

type DShellNameSpaceEvents1 = struct{ FlpVtbl uintptr } /* exdisp.h:149:9 */

type DShellNameSpaceEvents = DShellNameSpaceEvents1 /* exdisp.h:149:41 */

type IShellFavoritesNameSpace1 = struct{ FlpVtbl uintptr } /* exdisp.h:157:9 */

type IShellFavoritesNameSpace = IShellFavoritesNameSpace1 /* exdisp.h:157:44 */

type IShellNameSpace1 = struct{ FlpVtbl uintptr } /* exdisp.h:165:9 */

type IShellNameSpace = IShellNameSpace1 /* exdisp.h:165:35 */

type IScriptErrorList1 = struct{ FlpVtbl uintptr } /* exdisp.h:191:9 */

type IScriptErrorList = IScriptErrorList1 /* exdisp.h:191:36 */

type ISearch1 = struct{ FlpVtbl uintptr } /* exdisp.h:208:9 */

type ISearch = ISearch1 /* exdisp.h:208:27 */

type ISearches1 = struct{ FlpVtbl uintptr } /* exdisp.h:216:9 */

type ISearches = ISearches1 /* exdisp.h:216:29 */

type ISearchAssistantOC1 = struct{ FlpVtbl uintptr } /* exdisp.h:224:9 */

type ISearchAssistantOC = ISearchAssistantOC1 /* exdisp.h:224:38 */

type ISearchAssistantOC21 = struct{ FlpVtbl uintptr } /* exdisp.h:232:9 */

type ISearchAssistantOC2 = ISearchAssistantOC21 /* exdisp.h:232:39 */

type ISearchAssistantOC31 = struct{ FlpVtbl uintptr } /* exdisp.h:240:9 */

type ISearchAssistantOC3 = ISearchAssistantOC31 /* exdisp.h:240:39 */

type X_SearchAssistantEvents1 = struct{ FlpVtbl uintptr } /* exdisp.h:248:9 */

type X_SearchAssistantEvents = X_SearchAssistantEvents1 /* exdisp.h:248:42 */

// Headers for imported files

//** Autogenerated by WIDL 4.12.1 from include/ocidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IEnumConnections1 = struct{ FlpVtbl uintptr } /* ocidl.h:23:9 */

// Headers for imported files

//** Autogenerated by WIDL 4.12.1 from include/ocidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IEnumConnections = IEnumConnections1 /* ocidl.h:23:36 */

type IConnectionPoint1 = struct{ FlpVtbl uintptr } /* ocidl.h:31:9 */

type IConnectionPoint = IConnectionPoint1 /* ocidl.h:31:36 */

type IEnumConnectionPoints1 = struct{ FlpVtbl uintptr } /* ocidl.h:39:9 */

type IEnumConnectionPoints = IEnumConnectionPoints1 /* ocidl.h:39:41 */

type IConnectionPointContainer1 = struct{ FlpVtbl uintptr } /* ocidl.h:47:9 */

type IConnectionPointContainer = IConnectionPointContainer1 /* ocidl.h:47:45 */

type IClassFactory21 = struct{ FlpVtbl uintptr } /* ocidl.h:55:9 */

type IClassFactory2 = IClassFactory21 /* ocidl.h:55:34 */

type IProvideClassInfo1 = struct{ FlpVtbl uintptr } /* ocidl.h:63:9 */

type IProvideClassInfo = IProvideClassInfo1 /* ocidl.h:63:37 */

type IProvideClassInfo21 = struct{ FlpVtbl uintptr } /* ocidl.h:71:9 */

type IProvideClassInfo2 = IProvideClassInfo21 /* ocidl.h:71:38 */

type IProvideMultipleClassInfo1 = struct{ FlpVtbl uintptr } /* ocidl.h:79:9 */

type IProvideMultipleClassInfo = IProvideMultipleClassInfo1 /* ocidl.h:79:45 */

type IOleControl1 = struct{ FlpVtbl uintptr } /* ocidl.h:87:9 */

type IOleControl = IOleControl1 /* ocidl.h:87:31 */

type IOleControlSite1 = struct{ FlpVtbl uintptr } /* ocidl.h:95:9 */

type IOleControlSite = IOleControlSite1 /* ocidl.h:95:35 */

type IPropertyPage1 = struct{ FlpVtbl uintptr } /* ocidl.h:103:9 */

type IPropertyPage = IPropertyPage1 /* ocidl.h:103:33 */

type IPropertyPage21 = struct{ FlpVtbl uintptr } /* ocidl.h:111:9 */

type IPropertyPage2 = IPropertyPage21 /* ocidl.h:111:34 */

type IPropertyPageSite1 = struct{ FlpVtbl uintptr } /* ocidl.h:119:9 */

type IPropertyPageSite = IPropertyPageSite1 /* ocidl.h:119:37 */

type IPropertyNotifySink1 = struct{ FlpVtbl uintptr } /* ocidl.h:127:9 */

type IPropertyNotifySink = IPropertyNotifySink1 /* ocidl.h:127:39 */

type ISpecifyPropertyPages1 = struct{ FlpVtbl uintptr } /* ocidl.h:135:9 */

type ISpecifyPropertyPages = ISpecifyPropertyPages1 /* ocidl.h:135:41 */

type IPersistMemory1 = struct{ FlpVtbl uintptr } /* ocidl.h:143:9 */

type IPersistMemory = IPersistMemory1 /* ocidl.h:143:34 */

type IPersistStreamInit1 = struct{ FlpVtbl uintptr } /* ocidl.h:151:9 */

type IPersistStreamInit = IPersistStreamInit1 /* ocidl.h:151:38 */

type IPersistPropertyBag1 = struct{ FlpVtbl uintptr } /* ocidl.h:159:9 */

type IPersistPropertyBag = IPersistPropertyBag1 /* ocidl.h:159:39 */

type ISimpleFrameSite1 = struct{ FlpVtbl uintptr } /* ocidl.h:167:9 */

type ISimpleFrameSite = ISimpleFrameSite1 /* ocidl.h:167:36 */

type IFont1 = struct{ FlpVtbl uintptr } /* ocidl.h:175:9 */

type IFont = IFont1 /* ocidl.h:175:25 */

type IPicture1 = struct{ FlpVtbl uintptr } /* ocidl.h:183:9 */

type IPicture = IPicture1 /* ocidl.h:183:28 */

type IPicture21 = struct{ FlpVtbl uintptr } /* ocidl.h:191:9 */

type IPicture2 = IPicture21 /* ocidl.h:191:29 */

type IFontEventsDisp1 = struct{ FlpVtbl uintptr } /* ocidl.h:199:9 */

type IFontEventsDisp = IFontEventsDisp1 /* ocidl.h:199:35 */

type IFontDisp1 = struct{ FlpVtbl uintptr } /* ocidl.h:207:9 */

type IFontDisp = IFontDisp1 /* ocidl.h:207:29 */

type IPictureDisp1 = struct{ FlpVtbl uintptr } /* ocidl.h:215:9 */

type IPictureDisp = IPictureDisp1 /* ocidl.h:215:32 */

type IOleInPlaceObjectWindowless1 = struct{ FlpVtbl uintptr } /* ocidl.h:223:9 */

type IOleInPlaceObjectWindowless = IOleInPlaceObjectWindowless1 /* ocidl.h:223:47 */

type IOleInPlaceSiteEx1 = struct{ FlpVtbl uintptr } /* ocidl.h:231:9 */

type IOleInPlaceSiteEx = IOleInPlaceSiteEx1 /* ocidl.h:231:37 */

type IOleInPlaceSiteWindowless1 = struct{ FlpVtbl uintptr } /* ocidl.h:239:9 */

type IOleInPlaceSiteWindowless = IOleInPlaceSiteWindowless1 /* ocidl.h:239:45 */

type IViewObjectEx1 = struct{ FlpVtbl uintptr } /* ocidl.h:247:9 */

type IViewObjectEx = IViewObjectEx1 /* ocidl.h:247:33 */

type IOleUndoUnit1 = struct{ FlpVtbl uintptr } /* ocidl.h:255:9 */

type IOleUndoUnit = IOleUndoUnit1 /* ocidl.h:255:32 */

type IOleParentUndoUnit1 = struct{ FlpVtbl uintptr } /* ocidl.h:263:9 */

type IOleParentUndoUnit = IOleParentUndoUnit1 /* ocidl.h:263:38 */

type IEnumOleUndoUnits1 = struct{ FlpVtbl uintptr } /* ocidl.h:271:9 */

type IEnumOleUndoUnits = IEnumOleUndoUnits1 /* ocidl.h:271:37 */

type IOleUndoManager1 = struct{ FlpVtbl uintptr } /* ocidl.h:279:9 */

type IOleUndoManager = IOleUndoManager1 /* ocidl.h:279:35 */

type IPointerInactive1 = struct{ FlpVtbl uintptr } /* ocidl.h:287:9 */

type IPointerInactive = IPointerInactive1 /* ocidl.h:287:36 */

type IObjectWithSite1 = struct{ FlpVtbl uintptr } /* ocidl.h:295:9 */

type IObjectWithSite = IObjectWithSite1 /* ocidl.h:295:35 */

type IPerPropertyBrowsing1 = struct{ FlpVtbl uintptr } /* ocidl.h:303:9 */

type IPerPropertyBrowsing = IPerPropertyBrowsing1 /* ocidl.h:303:40 */

type IPropertyBag21 = struct{ FlpVtbl uintptr } /* ocidl.h:311:9 */

type IPropertyBag2 = IPropertyBag21 /* ocidl.h:311:33 */

type IPersistPropertyBag21 = struct{ FlpVtbl uintptr } /* ocidl.h:319:9 */

type IPersistPropertyBag2 = IPersistPropertyBag21 /* ocidl.h:319:40 */

type IAdviseSinkEx1 = struct{ FlpVtbl uintptr } /* ocidl.h:327:9 */

type IAdviseSinkEx = IAdviseSinkEx1 /* ocidl.h:327:33 */

type IQuickActivate1 = struct{ FlpVtbl uintptr } /* ocidl.h:335:9 */

type IQuickActivate = IQuickActivate1 /* ocidl.h:335:34 */
type UASFLAGS = uint32                /* ocidl.h:749:3 */

type READYSTATE = uint32 /* ocidl.h:757:3 */

// ****************************************************************************
//
// IEnumConnections interface

type PENUMCONNECTIONS = uintptr  /* ocidl.h:770:26 */
type LPENUMCONNECTIONS = uintptr /* ocidl.h:771:26 */
type TagCONNECTDATA = struct {
	FpUnk        uintptr
	FdwCookie    DWORD
	F__ccgo_pad1 [4]byte
} /* ocidl.h:772:9 */

type CONNECTDATA = TagCONNECTDATA /* ocidl.h:775:3 */

type PCONNECTDATA = uintptr  /* ocidl.h:777:31 */
type LPCONNECTDATA = uintptr /* ocidl.h:778:31 */
type IEnumConnectionsVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* ocidl.h:23:9 */

type IEnumConnectionsVtbl = IEnumConnectionsVtbl1 /* ocidl.h:838:3 */

// ****************************************************************************
//
// IConnectionPoint interface

type PCONNECTIONPOINT = uintptr  /* ocidl.h:914:26 */
type LPCONNECTIONPOINT = uintptr /* ocidl.h:915:26 */
type IConnectionPointVtbl1 = struct {
	FQueryInterface              uintptr
	FAddRef                      uintptr
	FRelease                     uintptr
	FGetConnectionInterface      uintptr
	FGetConnectionPointContainer uintptr
	FAdvise                      uintptr
	FUnadvise                    uintptr
	FEnumConnections             uintptr
} /* ocidl.h:31:9 */

type IConnectionPointVtbl = IConnectionPointVtbl1 /* ocidl.h:981:3 */

// ****************************************************************************
//
// IEnumConnectionPoints interface

type PENUMCONNECTIONPOINTS = uintptr  /* ocidl.h:1041:31 */
type LPENUMCONNECTIONPOINTS = uintptr /* ocidl.h:1042:31 */
type IEnumConnectionPointsVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* ocidl.h:39:9 */

type IEnumConnectionPointsVtbl = IEnumConnectionPointsVtbl1 /* ocidl.h:1102:3 */

// ****************************************************************************
//
// IConnectionPointContainer interface

type PCONNECTIONPOINTCONTAINER = uintptr  /* ocidl.h:1178:35 */
type LPCONNECTIONPOINTCONTAINER = uintptr /* ocidl.h:1179:35 */
type IConnectionPointContainerVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FEnumConnectionPoints uintptr
	FFindConnectionPoint  uintptr
} /* ocidl.h:47:9 */

type IConnectionPointContainerVtbl = IConnectionPointContainerVtbl1 /* ocidl.h:1224:3 */

// ****************************************************************************
//
// IClassFactory2 interface

type LPCLASSFACTORY2 = uintptr /* ocidl.h:1274:24 */

type TagLICINFO = struct {
	FcbLicInfo        LONG
	FfRuntimeKeyAvail WINBOOL
	FfLicVerified     WINBOOL
} /* ocidl.h:1276:9 */

type LICINFO = TagLICINFO /* ocidl.h:1280:3 */

type LPLICINFO = uintptr /* ocidl.h:1282:27 */
type IClassFactory2Vtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FCreateInstance    uintptr
	FLockServer        uintptr
	FGetLicInfo        uintptr
	FRequestLicKey     uintptr
	FCreateInstanceLic uintptr
} /* ocidl.h:55:9 */

type IClassFactory2Vtbl = IClassFactory2Vtbl1 /* ocidl.h:1353:3 */

// ****************************************************************************
//
// IProvideClassInfo interface

type LPPROVIDECLASSINFO = uintptr /* ocidl.h:1437:27 */
type IProvideClassInfoVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassInfoA  uintptr
} /* ocidl.h:63:9 */

type IProvideClassInfoVtbl = IProvideClassInfoVtbl1 /* ocidl.h:1473:3 */

// ****************************************************************************
//
// IProvideClassInfo2 interface

type LPPROVIDECLASSINFO2 = uintptr /* ocidl.h:1517:28 */

type GUIDKIND = uint32 /* ocidl.h:1521:3 */
type IProvideClassInfo2Vtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassInfoA  uintptr
	FGetGUID        uintptr
} /* ocidl.h:71:9 */

type IProvideClassInfo2Vtbl = IProvideClassInfo2Vtbl1 /* ocidl.h:1564:3 */

// ****************************************************************************
//
// IProvideMultipleClassInfo interface

type LPPROVIDEMULTIPLECLASSINFO = uintptr /* ocidl.h:1621:35 */
type IProvideMultipleClassInfoVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetClassInfoA         uintptr
	FGetGUID               uintptr
	FGetMultiTypeInfoCount uintptr
	FGetInfoOfIndex        uintptr
} /* ocidl.h:79:9 */

type IProvideMultipleClassInfoVtbl = IProvideMultipleClassInfoVtbl1 /* ocidl.h:1687:3 */

// ****************************************************************************
//
// IOleControl interface

type LPOLECONTROL = uintptr /* ocidl.h:1747:21 */

type TagCONTROLINFO = struct {
	Fcb          ULONG
	F__ccgo_pad1 [4]byte
	FhAccel      HACCEL
	FcAccel      USHORT
	F__ccgo_pad2 [2]byte
	FdwFlags     DWORD
} /* ocidl.h:1749:9 */

type CONTROLINFO = TagCONTROLINFO /* ocidl.h:1754:3 */

type LPCONTROLINFO = uintptr /* ocidl.h:1756:31 */

type CTRLINFO = uint32 /* ocidl.h:1761:3 */
type IOleControlVtbl1 = struct {
	FQueryInterface          uintptr
	FAddRef                  uintptr
	FRelease                 uintptr
	FGetControlInfo          uintptr
	FOnMnemonic              uintptr
	FOnAmbientPropertyChange uintptr
	FFreezeEvents            uintptr
} /* ocidl.h:87:9 */

type IOleControlVtbl = IOleControlVtbl1 /* ocidl.h:1818:3 */

// ****************************************************************************
//
// IOleControlSite interface

type LPOLECONTROLSITE = uintptr /* ocidl.h:1874:25 */

type TagPOINTF = struct {
	Fx FLOAT
	Fy FLOAT
} /* ocidl.h:1876:9 */

type POINTF = TagPOINTF /* ocidl.h:1879:3 */

type LPPOINTF = uintptr /* ocidl.h:1881:26 */

type XFORMCOORDS = uint32 /* ocidl.h:1889:3 */
type IOleControlSiteVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FOnControlInfoChanged  uintptr
	FLockInPlaceActive     uintptr
	FGetExtendedControl    uintptr
	FTransformCoords       uintptr
	FTranslateAcceleratorA uintptr
	FOnFocus               uintptr
	FShowPropertyFrame     uintptr
} /* ocidl.h:95:9 */

type IOleControlSiteVtbl = IOleControlSiteVtbl1 /* ocidl.h:1971:3 */

// ****************************************************************************
//
// IPropertyPage interface

type LPPROPERTYPAGE = uintptr /* ocidl.h:2039:23 */

type TagPROPPAGEINFO = struct {
	Fcb            ULONG
	F__ccgo_pad1   [4]byte
	FpszTitle      LPOLESTR
	Fsize          SIZE
	FpszDocString  LPOLESTR
	FpszHelpFile   LPOLESTR
	FdwHelpContext DWORD
	F__ccgo_pad2   [4]byte
} /* ocidl.h:2041:9 */

type PROPPAGEINFO = TagPROPPAGEINFO /* ocidl.h:2048:3 */

type LPPROPPAGEINFO = uintptr /* ocidl.h:2050:32 */
type IPropertyPageVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FSetPageSite           uintptr
	FActivate              uintptr
	FDeactivate            uintptr
	FGetPageInfo           uintptr
	FSetObjects            uintptr
	FShow                  uintptr
	FMove                  uintptr
	FIsPageDirty           uintptr
	FApply                 uintptr
	FHelp                  uintptr
	FTranslateAcceleratorA uintptr
} /* ocidl.h:103:9 */

type IPropertyPageVtbl = IPropertyPageVtbl1 /* ocidl.h:2159:3 */

// ****************************************************************************
//
// IPropertyPage2 interface

type LPPROPERTYPAGE2 = uintptr /* ocidl.h:2243:24 */
type IPropertyPage2Vtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FSetPageSite           uintptr
	FActivate              uintptr
	FDeactivate            uintptr
	FGetPageInfo           uintptr
	FSetObjects            uintptr
	FShow                  uintptr
	FMove                  uintptr
	FIsPageDirty           uintptr
	FApply                 uintptr
	FHelp                  uintptr
	FTranslateAcceleratorA uintptr
	FEditProperty          uintptr
} /* ocidl.h:111:9 */

type IPropertyPage2Vtbl = IPropertyPage2Vtbl1 /* ocidl.h:2324:3 */

// ****************************************************************************
//
// IPropertyPageSite interface

type LPPROPERTYPAGESITE = uintptr /* ocidl.h:2414:27 */

type PROPPAGESTATUS = uint32 /* ocidl.h:2420:3 */
type IPropertyPageSiteVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FOnStatusChange        uintptr
	FGetLocaleID           uintptr
	FGetPageContainer      uintptr
	FTranslateAcceleratorA uintptr
} /* ocidl.h:119:9 */

type IPropertyPageSiteVtbl = IPropertyPageSiteVtbl1 /* ocidl.h:2477:3 */

// ****************************************************************************
//
// IPropertyNotifySink interface

type LPPROPERTYNOTIFYSINK = uintptr /* ocidl.h:2533:29 */
type IPropertyNotifySinkVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FOnChanged      uintptr
	FOnRequestEdit  uintptr
} /* ocidl.h:127:9 */

type IPropertyNotifySinkVtbl = IPropertyNotifySinkVtbl1 /* ocidl.h:2576:3 */

// ****************************************************************************
//
// ISpecifyPropertyPages interface

type LPSPECIFYPROPERTYPAGES = uintptr /* ocidl.h:2624:31 */

type TagCAUUID = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* ocidl.h:2626:9 */

type CAUUID = TagCAUUID /* ocidl.h:2629:3 */

type LPCAUUID = uintptr /* ocidl.h:2631:26 */
type ISpecifyPropertyPagesVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetPages       uintptr
} /* ocidl.h:135:9 */

type ISpecifyPropertyPagesVtbl = ISpecifyPropertyPagesVtbl1 /* ocidl.h:2667:3 */

// ****************************************************************************
//
// IPersistMemory interface

type LPPERSISTMEMORY = uintptr /* ocidl.h:2711:24 */
type IPersistMemoryVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FIsDirty        uintptr
	FLoad           uintptr
	FSave           uintptr
	FGetSizeMax     uintptr
	FInitNew        uintptr
} /* ocidl.h:143:9 */

type IPersistMemoryVtbl = IPersistMemoryVtbl1 /* ocidl.h:2784:3 */

// ****************************************************************************
//
// IPersistStreamInit interface

type LPPERSISTSTREAMINIT = uintptr /* ocidl.h:2887:28 */
type IPersistStreamInitVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FIsDirty        uintptr
	FLoad           uintptr
	FSave           uintptr
	FGetSizeMax     uintptr
	FInitNew        uintptr
} /* ocidl.h:151:9 */

type IPersistStreamInitVtbl = IPersistStreamInitVtbl1 /* ocidl.h:2956:3 */

// ****************************************************************************
//
// IPersistPropertyBag interface

type LPPERSISTPROPERTYBAG = uintptr /* ocidl.h:3022:29 */
type IPersistPropertyBagVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FInitNew        uintptr
	FLoad           uintptr
	FSave           uintptr
} /* ocidl.h:159:9 */

type IPersistPropertyBagVtbl = IPersistPropertyBagVtbl1 /* ocidl.h:3082:3 */

// ****************************************************************************
//
// ISimpleFrameSite interface

type LPSIMPLEFRAMESITE = uintptr /* ocidl.h:3140:26 */
type ISimpleFrameSiteVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FPreMessageFilter  uintptr
	FPostMessageFilter uintptr
} /* ocidl.h:167:9 */

type ISimpleFrameSiteVtbl = ISimpleFrameSiteVtbl1 /* ocidl.h:3203:3 */

// ****************************************************************************
//
// IFont interface

type LPFONT = uintptr /* ocidl.h:3251:15 */

type TEXTMETRICOLE = TEXTMETRICW /* ocidl.h:3254:21 */

type LPTEXTMETRICOLE = uintptr /* ocidl.h:3259:23 */
type IFontVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	Fget_Name          uintptr
	Fput_Name          uintptr
	Fget_Size          uintptr
	Fput_Size          uintptr
	Fget_Bold          uintptr
	Fput_Bold          uintptr
	Fget_Italic        uintptr
	Fput_Italic        uintptr
	Fget_Underline     uintptr
	Fput_Underline     uintptr
	Fget_Strikethrough uintptr
	Fput_Strikethrough uintptr
	Fget_Weight        uintptr
	Fput_Weight        uintptr
	Fget_Charset       uintptr
	Fput_Charset       uintptr
	Fget_hFont         uintptr
	FClone             uintptr
	FIsEqual           uintptr
	FSetRatio          uintptr
	FQueryTextMetrics  uintptr
	FAddRefHfont       uintptr
	FReleaseHfont      uintptr
	FSetHdc            uintptr
} /* ocidl.h:175:9 */

type IFontVtbl = IFontVtbl1 /* ocidl.h:3458:3 */

// ****************************************************************************
//
// IPicture interface

type LPPICTURE = uintptr /* ocidl.h:3594:18 */

type PICTUREATTRIBUTES = uint32 /* ocidl.h:3599:3 */

type OLE_HANDLE = UINT         /* ocidl.h:3601:14 */
type OLE_XPOS_HIMETRIC = LONG  /* ocidl.h:3602:14 */
type OLE_YPOS_HIMETRIC = LONG  /* ocidl.h:3603:14 */
type OLE_XSIZE_HIMETRIC = LONG /* ocidl.h:3604:14 */
type OLE_YSIZE_HIMETRIC = LONG /* ocidl.h:3605:14 */
type IPictureVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	Fget_Handle             uintptr
	Fget_hPal               uintptr
	Fget_Type               uintptr
	Fget_Width              uintptr
	Fget_Height             uintptr
	FRender                 uintptr
	Fset_hPal               uintptr
	Fget_CurDC              uintptr
	FSelectPicture          uintptr
	Fget_KeepOriginalFormat uintptr
	Fput_KeepOriginalFormat uintptr
	FPictureChanged         uintptr
	FSaveAsFile             uintptr
	Fget_Attributes         uintptr
} /* ocidl.h:183:9 */

type IPictureVtbl = IPictureVtbl1 /* ocidl.h:3757:3 */

// ****************************************************************************
//
// IPicture2 interface

type LPPICTURE2 = uintptr /* ocidl.h:3853:19 */
type HHANDLE = UINT_PTR   /* ocidl.h:3854:18 */
type IPicture2Vtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	Fget_Handle             uintptr
	Fget_hPal               uintptr
	Fget_Type               uintptr
	Fget_Width              uintptr
	Fget_Height             uintptr
	FRender                 uintptr
	Fset_hPal               uintptr
	Fget_CurDC              uintptr
	FSelectPicture          uintptr
	Fget_KeepOriginalFormat uintptr
	Fput_KeepOriginalFormat uintptr
	FPictureChanged         uintptr
	FSaveAsFile             uintptr
	Fget_Attributes         uintptr
} /* ocidl.h:191:9 */

type IPicture2Vtbl = IPicture2Vtbl1 /* ocidl.h:4006:3 */

// ****************************************************************************
//
// IFontEventsDisp interface

type LPFONTEVENTS = uintptr /* ocidl.h:4102:25 */
type IFontEventsDispVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* ocidl.h:199:9 */

type IFontEventsDispVtbl = IFontEventsDispVtbl1 /* ocidl.h:4159:3 */

// ****************************************************************************
//
// IFontDisp interface

type LPFONTDISP = uintptr /* ocidl.h:4215:19 */
type IFontDispVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* ocidl.h:207:9 */

type IFontDispVtbl = IFontDispVtbl1 /* ocidl.h:4272:3 */

// ****************************************************************************
//
// IPictureDisp interface

type LPPICTUREDISP = uintptr /* ocidl.h:4328:22 */
type IPictureDispVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* ocidl.h:215:9 */

type IPictureDispVtbl = IPictureDispVtbl1 /* ocidl.h:4385:3 */

// ****************************************************************************
//
// IOleInPlaceObjectWindowless interface

type LPOLEINPLACEOBJECTWINDOWLESS = uintptr /* ocidl.h:4441:37 */
type IOleInPlaceObjectWindowlessVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FContextSensitiveHelp uintptr
	FInPlaceDeactivate    uintptr
	FUIDeactivate         uintptr
	FSetObjectRects       uintptr
	FReactivateAndUndo    uintptr
	FOnWindowMessage      uintptr
	FGetDropTarget        uintptr
} /* ocidl.h:223:9 */

type IOleInPlaceObjectWindowlessVtbl = IOleInPlaceObjectWindowlessVtbl1 /* ocidl.h:4514:3 */

// ****************************************************************************
//
// IOleInPlaceSiteEx interface

type LPOLEINPLACESITEEX = uintptr /* ocidl.h:4590:27 */

type ACTIVATEFLAGS = uint32 /* ocidl.h:4594:3 */
type IOleInPlaceSiteExVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetWindow             uintptr
	FContextSensitiveHelp  uintptr
	FCanInPlaceActivate    uintptr
	FOnInPlaceActivate     uintptr
	FOnUIActivate          uintptr
	FGetWindowContext      uintptr
	FScroll                uintptr
	FOnUIDeactivate        uintptr
	FOnInPlaceDeactivate   uintptr
	FDiscardUndoState      uintptr
	FDeactivateAndUndo     uintptr
	FOnPosRectChange       uintptr
	FOnInPlaceActivateEx   uintptr
	FOnInPlaceDeactivateEx uintptr
	FRequestUIActivate     uintptr
} /* ocidl.h:231:9 */

type IOleInPlaceSiteExVtbl = IOleInPlaceSiteExVtbl1 /* ocidl.h:4693:3 */

// ****************************************************************************
//
// IOleInPlaceSiteWindowless interface

type LPOLEINPLACESITEWINDOWLESS = uintptr /* ocidl.h:4797:35 */

type OLEDCFLAGS = uint32 /* ocidl.h:4803:3 */
type IOleInPlaceSiteWindowlessVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetWindow             uintptr
	FContextSensitiveHelp  uintptr
	FCanInPlaceActivate    uintptr
	FOnInPlaceActivate     uintptr
	FOnUIActivate          uintptr
	FGetWindowContext      uintptr
	FScroll                uintptr
	FOnUIDeactivate        uintptr
	FOnInPlaceDeactivate   uintptr
	FDiscardUndoState      uintptr
	FDeactivateAndUndo     uintptr
	FOnPosRectChange       uintptr
	FOnInPlaceActivateEx   uintptr
	FOnInPlaceDeactivateEx uintptr
	FRequestUIActivate     uintptr
	FCanWindowlessActivate uintptr
	FGetCapture            uintptr
	FSetCapture            uintptr
	FGetFocus              uintptr
	FSetFocus              uintptr
	FGetDC                 uintptr
	FReleaseDC             uintptr
	FInvalidateRect        uintptr
	FInvalidateRgn         uintptr
	FScrollRect            uintptr
	FAdjustRect            uintptr
	FOnDefWindowMessage    uintptr
} /* ocidl.h:239:9 */

type IOleInPlaceSiteWindowlessVtbl = IOleInPlaceSiteWindowlessVtbl1 /* ocidl.h:4994:3 */

// ****************************************************************************
//
// IViewObjectEx interface

type LPVIEWOBJECTEX = uintptr /* ocidl.h:5148:23 */

type VIEWSTATUS = uint32 /* ocidl.h:5157:3 */

type HITRESULT = uint32 /* ocidl.h:5164:3 */

type DVASPECT2 = uint32 /* ocidl.h:5169:3 */

type TagExtentInfo = struct {
	Fcb            ULONG
	FdwExtentMode  DWORD
	FsizelProposed SIZEL
} /* ocidl.h:5171:9 */

type DVEXTENTINFO = TagExtentInfo /* ocidl.h:5175:3 */

type DVEXTENTMODE = uint32 /* ocidl.h:5180:3 */

type DVASPECTINFOFLAG = uint32 /* ocidl.h:5184:3 */

type TagAspectInfo = struct {
	Fcb      ULONG
	FdwFlags DWORD
} /* ocidl.h:5186:9 */

type DVASPECTINFO = TagAspectInfo /* ocidl.h:5189:3 */
type IViewObjectExVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FDraw             uintptr
	FGetColorSet      uintptr
	FFreeze           uintptr
	FUnfreeze         uintptr
	FSetAdvise        uintptr
	FGetAdvise        uintptr
	FGetExtent        uintptr
	FGetRect          uintptr
	FGetViewStatus    uintptr
	FQueryHitPoint    uintptr
	FQueryHitRect     uintptr
	FGetNaturalExtent uintptr
} /* ocidl.h:247:9 */

type IViewObjectExVtbl = IViewObjectExVtbl1 /* ocidl.h:5335:3 */

// ****************************************************************************
//
// IOleUndoUnit interface

type LPOLEUNDOUNIT = uintptr /* ocidl.h:5427:22 */
type IOleUndoUnitVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FDo             uintptr
	FGetDescription uintptr
	FGetUnitType    uintptr
	FOnNextAdd      uintptr
} /* ocidl.h:255:9 */

type IOleUndoUnitVtbl = IOleUndoUnitVtbl1 /* ocidl.h:5485:3 */

// ****************************************************************************
//
// IOleParentUndoUnit interface

type LPOLEPARENTUNDOUNIT = uintptr /* ocidl.h:5541:28 */
type IOleParentUndoUnitVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FDo             uintptr
	FGetDescription uintptr
	FGetUnitType    uintptr
	FOnNextAdd      uintptr
	FOpen           uintptr
	FClose          uintptr
	FAdd            uintptr
	FFindUnit       uintptr
	FGetParentState uintptr
} /* ocidl.h:263:9 */

type IOleParentUndoUnitVtbl = IOleParentUndoUnitVtbl1 /* ocidl.h:5624:3 */

// ****************************************************************************
//
// IEnumOleUndoUnits interface

type LPENUMOLEUNDOUNITS = uintptr /* ocidl.h:5702:27 */
type IEnumOleUndoUnitsVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* ocidl.h:271:9 */

type IEnumOleUndoUnitsVtbl = IEnumOleUndoUnitsVtbl1 /* ocidl.h:5762:3 */

// ****************************************************************************
//
// IOleUndoManager interface

type LPOLEUNDOMANAGER = uintptr /* ocidl.h:5840:25 */
type IOleUndoManagerVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FOpen                   uintptr
	FClose                  uintptr
	FAdd                    uintptr
	FGetOpenParentState     uintptr
	FDiscardFrom            uintptr
	FUndoTo                 uintptr
	FRedoTo                 uintptr
	FEnumUndoable           uintptr
	FEnumRedoable           uintptr
	FGetLastUndoDescription uintptr
	FGetLastRedoDescription uintptr
	FEnable                 uintptr
} /* ocidl.h:279:9 */

type IOleUndoManagerVtbl = IOleUndoManagerVtbl1 /* ocidl.h:5955:3 */

// ****************************************************************************
//
// IPointerInactive interface

type LPPOINTERINACTIVE = uintptr /* ocidl.h:6043:26 */

type POINTERINACTIVE = uint32 /* ocidl.h:6049:3 */
type IPointerInactiveVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetActivationPolicy uintptr
	FOnInactiveMouseMove uintptr
	FOnInactiveSetCursor uintptr
} /* ocidl.h:287:9 */

type IPointerInactiveVtbl = IPointerInactiveVtbl1 /* ocidl.h:6113:3 */

// ****************************************************************************
//
// IObjectWithSite interface

type LPOBJECTWITHSITE = uintptr /* ocidl.h:6165:25 */
type IObjectWithSiteVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetSite        uintptr
	FGetSite        uintptr
} /* ocidl.h:295:9 */

type IObjectWithSiteVtbl = IObjectWithSiteVtbl1 /* ocidl.h:6210:3 */

// ****************************************************************************
//
// IPerPropertyBrowsing interface

type LPPERPROPERTYBROWSING = uintptr /* ocidl.h:6260:30 */

type TagCALPOLESTR = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* ocidl.h:6262:9 */

type CALPOLESTR = TagCALPOLESTR /* ocidl.h:6265:3 */

type LPCALPOLESTR = uintptr /* ocidl.h:6267:30 */

type TagCADWORD = struct {
	FcElems      ULONG
	F__ccgo_pad1 [4]byte
	FpElems      uintptr
} /* ocidl.h:6269:9 */

type CADWORD = TagCADWORD /* ocidl.h:6272:3 */

type LPCADWORD = uintptr /* ocidl.h:6274:27 */
type IPerPropertyBrowsingVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetDisplayString     uintptr
	FMapPropertyToPage    uintptr
	FGetPredefinedStrings uintptr
	FGetPredefinedValue   uintptr
} /* ocidl.h:303:9 */

type IPerPropertyBrowsingVtbl = IPerPropertyBrowsingVtbl1 /* ocidl.h:6343:3 */

// ****************************************************************************
//
// IPropertyBag2 interface

type LPPROPERTYBAG2 = uintptr /* ocidl.h:6401:23 */

type PROPBAG2_TYPE = uint32 /* ocidl.h:6411:3 */

type TagPROPBAG2 = struct {
	FdwType      DWORD
	Fvt          VARTYPE
	FcfType      CLIPFORMAT
	FdwHint      DWORD
	F__ccgo_pad1 [4]byte
	FpstrName    LPOLESTR
	Fclsid       CLSID
} /* ocidl.h:6413:9 */

type PROPBAG2 = TagPROPBAG2 /* ocidl.h:6420:3 */
type IPropertyBag2Vtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FRead            uintptr
	FWrite           uintptr
	FCountProperties uintptr
	FGetPropertyInfo uintptr
	FLoadObject      uintptr
} /* ocidl.h:311:9 */

type IPropertyBag2Vtbl = IPropertyBag2Vtbl1 /* ocidl.h:6508:3 */

// ****************************************************************************
//
// IPersistPropertyBag2 interface

type LPPERSISTPROPERTYBAG2 = uintptr /* ocidl.h:6570:30 */
type IPersistPropertyBag2Vtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FInitNew        uintptr
	FLoad           uintptr
	FSave           uintptr
	FIsDirty        uintptr
} /* ocidl.h:319:9 */

type IPersistPropertyBag2Vtbl = IPersistPropertyBag2Vtbl1 /* ocidl.h:6636:3 */

// ****************************************************************************
//
// IAdviseSinkEx interface

type LPADVISESINKEX = uintptr /* ocidl.h:6700:23 */
type IAdviseSinkExVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FOnDataChange       uintptr
	FOnViewChange       uintptr
	FOnRename           uintptr
	FOnSave             uintptr
	FOnClose            uintptr
	FOnViewStatusChange uintptr
} /* ocidl.h:327:9 */

type IAdviseSinkExVtbl = IAdviseSinkExVtbl1 /* ocidl.h:6757:3 */

// ****************************************************************************
//
// IQuickActivate interface

type LPQUICKACTIVATE = uintptr /* ocidl.h:6839:24 */

type QACONTAINERFLAGS = uint32 /* ocidl.h:6850:3 */

type OLE_COLOR = DWORD /* ocidl.h:6852:15 */

type TagQACONTAINER = struct {
	FcbSize              ULONG
	F__ccgo_pad1         [4]byte
	FpClientSite         uintptr
	FpAdviseSink         uintptr
	FpPropertyNotifySink uintptr
	FpUnkEventSink       uintptr
	FdwAmbientFlags      DWORD
	FcolorFore           OLE_COLOR
	FcolorBack           OLE_COLOR
	F__ccgo_pad2         [4]byte
	FpFont               uintptr
	FpUndoMgr            uintptr
	FdwAppearance        DWORD
	Flcid                LONG
	Fhpal                HPALETTE
	FpBindHost           uintptr
	FpOleControlSite     uintptr
	FpServiceProvider    uintptr
} /* ocidl.h:6854:9 */

type QACONTAINER = TagQACONTAINER /* ocidl.h:6871:3 */

type TagQACONTROL = struct {
	FcbSize                    ULONG
	FdwMiscStatus              DWORD
	FdwViewStatus              DWORD
	FdwEventCookie             DWORD
	FdwPropNotifyCookie        DWORD
	FdwPointerActivationPolicy DWORD
} /* ocidl.h:6873:9 */

type QACONTROL = TagQACONTROL /* ocidl.h:6880:3 */
type IQuickActivateVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FQuickActivate    uintptr
	FSetContentExtent uintptr
	FGetContentExtent uintptr
} /* ocidl.h:335:9 */

type IQuickActivateVtbl = IQuickActivateVtbl1 /* ocidl.h:6932:3 */

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/docobj.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IOleDocument1 = struct{ FlpVtbl uintptr } /* docobj.h:23:9 */

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/docobj.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IOleDocument = IOleDocument1 /* docobj.h:23:32 */

type IOleDocumentSite1 = struct{ FlpVtbl uintptr } /* docobj.h:31:9 */

type IOleDocumentSite = IOleDocumentSite1 /* docobj.h:31:36 */

type IOleDocumentView1 = struct{ FlpVtbl uintptr } /* docobj.h:39:9 */

type IOleDocumentView = IOleDocumentView1 /* docobj.h:39:36 */

type IEnumOleDocumentViews1 = struct{ FlpVtbl uintptr } /* docobj.h:47:9 */

type IEnumOleDocumentViews = IEnumOleDocumentViews1 /* docobj.h:47:41 */

type IContinueCallback1 = struct{ FlpVtbl uintptr } /* docobj.h:55:9 */

type IContinueCallback = IContinueCallback1 /* docobj.h:55:37 */

type IPrint1 = struct{ FlpVtbl uintptr } /* docobj.h:63:9 */

type IPrint = IPrint1 /* docobj.h:63:26 */

type IOleCommandTarget1 = struct{ FlpVtbl uintptr } /* docobj.h:71:9 */

type IOleCommandTarget = IOleCommandTarget1 /* docobj.h:71:37 */

type IZoomEvents1 = struct{ FlpVtbl uintptr } /* docobj.h:79:9 */

type IZoomEvents = IZoomEvents1 /* docobj.h:79:31 */

type IProtectFocus1 = struct{ FlpVtbl uintptr } /* docobj.h:87:9 */

type IProtectFocus = IProtectFocus1 /* docobj.h:87:33 */

type IProtectedModeMenuServices1 = struct{ FlpVtbl uintptr } /* docobj.h:95:9 */

type IProtectedModeMenuServices = IProtectedModeMenuServices1 /* docobj.h:95:46 */

// Headers for imported files

//** Autogenerated by WIDL 4.12.1 from include/ocidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oleidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oaidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/servprov.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// ****************************************************************************
//
// IOleDocument interface

type LPOLEDOCUMENT = uintptr /* docobj.h:196:22 */

type DOCMISC = uint32 /* docobj.h:203:3 */
type IOleDocumentVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FCreateView       uintptr
	FGetDocMiscStatus uintptr
	FEnumViews        uintptr
} /* docobj.h:23:9 */

type IOleDocumentVtbl = IOleDocumentVtbl1 /* docobj.h:261:3 */

// ****************************************************************************
//
// IOleDocumentSite interface

type LPOLEDOCUMENTSITE = uintptr /* docobj.h:316:26 */
type IOleDocumentSiteVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FActivateMe     uintptr
} /* docobj.h:31:9 */

type IOleDocumentSiteVtbl = IOleDocumentSiteVtbl1 /* docobj.h:352:3 */

// ****************************************************************************
//
// IOleDocumentView interface

type LPOLEDOCUMENTVIEW = uintptr /* docobj.h:399:26 */
type IOleDocumentViewVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetInPlaceSite uintptr
	FGetInPlaceSite uintptr
	FGetDocument    uintptr
	FSetRect        uintptr
	FGetRect        uintptr
	FSetRectComplex uintptr
	FShow           uintptr
	FUIActivate     uintptr
	FOpen           uintptr
	FCloseView      uintptr
	FSaveViewState  uintptr
	FApplyViewState uintptr
	FClone          uintptr
} /* docobj.h:39:9 */

type IOleDocumentViewVtbl = IOleDocumentViewVtbl1 /* docobj.h:526:3 */

// ****************************************************************************
//
// IEnumOleDocumentViews interface

type LPENUMOLEDOCUMENTVIEWS = uintptr /* docobj.h:621:31 */
type IEnumOleDocumentViewsVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* docobj.h:47:9 */

type IEnumOleDocumentViewsVtbl = IEnumOleDocumentViewsVtbl1 /* docobj.h:681:3 */

// ****************************************************************************
//
// IContinueCallback interface

type LPCONTINUECALLBACK = uintptr /* docobj.h:760:27 */
type IContinueCallbackVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FFContinue         uintptr
	FFContinuePrinting uintptr
} /* docobj.h:55:9 */

type IContinueCallbackVtbl = IContinueCallbackVtbl1 /* docobj.h:806:3 */

// ****************************************************************************
//
// IPrint interface

type LPPRINT = uintptr /* docobj.h:857:16 */

type PRINTFLAG = uint32 /* docobj.h:867:3 */

type TagPAGERANGE = struct {
	FnFromPage LONG
	FnToPage   LONG
} /* docobj.h:869:9 */

type PAGERANGE = TagPAGERANGE /* docobj.h:872:3 */

type TagPAGESET = struct {
	FcbStruct   ULONG
	FfOddPages  WINBOOL
	FfEvenPages WINBOOL
	FcPageRange ULONG
	FrgPages    [1]PAGERANGE
} /* docobj.h:874:9 */

type PAGESET = TagPAGESET /* docobj.h:880:3 */
type IPrintVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FSetInitialPageNum uintptr
	FGetPageInfo       uintptr
	FPrint             uintptr
} /* docobj.h:63:9 */

type IPrintVtbl = IPrintVtbl1 /* docobj.h:948:3 */

// ****************************************************************************
//
// IOleCommandTarget interface

type LPOLECOMMANDTARGET = uintptr /* docobj.h:1038:27 */

type OLECMDF = uint32 /* docobj.h:1047:3 */

type X_tagOLECMD = struct {
	FcmdID ULONG
	Fcmdf  DWORD
} /* docobj.h:1049:9 */

type OLECMD = X_tagOLECMD /* docobj.h:1052:3 */

type X_tagOLECMDTEXT = struct {
	Fcmdtextf    DWORD
	FcwActual    ULONG
	FcwBuf       ULONG
	Frgwz        [1]Wchar_t
	F__ccgo_pad1 [2]byte
} /* docobj.h:1054:9 */

type OLECMDTEXT = X_tagOLECMDTEXT /* docobj.h:1059:3 */

type OLECMDTEXTF = uint32 /* docobj.h:1065:3 */

type OLECMDEXECOPT = uint32 /* docobj.h:1072:3 */

type OLECMDID = uint32 /* docobj.h:1151:3 */

type MEDIAPLAYBACK_STATE = uint32 /* docobj.h:1156:3 */
type IOleCommandTargetVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FQueryStatus    uintptr
	FExec           uintptr
} /* docobj.h:71:9 */

type IOleCommandTargetVtbl = IOleCommandTargetVtbl1 /* docobj.h:1254:3 */

type OLECMDID_REFRESHFLAG = uint32 /* docobj.h:1324:3 */

type OLECMDID_PAGEACTIONFLAG = int32 /* docobj.h:1360:3 */

type OLECMDID_BROWSERSTATEFLAG = uint32 /* docobj.h:1368:3 */

type OLECMDID_OPTICAL_ZOOMFLAG = uint32 /* docobj.h:1373:3 */

type PAGEACTION_UI = uint32 /* docobj.h:1380:3 */

type OLECMDID_WINDOWSTATE_FLAG = uint32 /* docobj.h:1387:3 */

type OLECMDID_VIEWPORT_MODE_FLAG = uint32 /* docobj.h:1394:3 */
type IZoomEventsVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FOnZoomPercentChanged uintptr
} /* docobj.h:79:9 */

type IZoomEventsVtbl = IZoomEventsVtbl1 /* docobj.h:1487:3 */
type IProtectFocusVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FAllowFocusChange uintptr
} /* docobj.h:87:9 */

type IProtectFocusVtbl = IProtectFocusVtbl1 /* docobj.h:1565:3 */
type IProtectedModeMenuServicesVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCreateMenu     uintptr
	FLoadMenuA      uintptr
	FLoadMenuID     uintptr
} /* docobj.h:95:9 */

type IProtectedModeMenuServicesVtbl = IProtectedModeMenuServicesVtbl1 /* docobj.h:1669:3 */

// ****************************************************************************
//
// IWebBrowser interface

type BrowserNavConstants = uint32 /* exdisp.h:323:3 */
type RefreshConstants = uint32    /* exdisp.h:328:3 */
type IWebBrowserVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	FGoBack                uintptr
	FGoForward             uintptr
	FGoHome                uintptr
	FGoSearch              uintptr
	FNavigate              uintptr
	FRefresh               uintptr
	FRefresh2              uintptr
	FStop                  uintptr
	Fget_Application       uintptr
	Fget_Parent            uintptr
	Fget_Container         uintptr
	Fget_Document          uintptr
	Fget_TopLevelContainer uintptr
	Fget_Type              uintptr
	Fget_Left              uintptr
	Fput_Left              uintptr
	Fget_Top               uintptr
	Fput_Top               uintptr
	Fget_Width             uintptr
	Fput_Width             uintptr
	Fget_Height            uintptr
	Fput_Height            uintptr
	Fget_LocationName      uintptr
	Fget_LocationURL       uintptr
	Fget_Busy              uintptr
} /* exdisp.h:23:9 */

type IWebBrowserVtbl = IWebBrowserVtbl1 /* exdisp.h:563:3 */
type DWebBrowserEventsVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* exdisp.h:31:9 */

type DWebBrowserEventsVtbl = DWebBrowserEventsVtbl1 /* exdisp.h:776:3 */

type CommandStateChangeConstants = int32 /* exdisp.h:828:3 */
type IWebBrowserAppVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	FGoBack                uintptr
	FGoForward             uintptr
	FGoHome                uintptr
	FGoSearch              uintptr
	FNavigate              uintptr
	FRefresh               uintptr
	FRefresh2              uintptr
	FStop                  uintptr
	Fget_Application       uintptr
	Fget_Parent            uintptr
	Fget_Container         uintptr
	Fget_Document          uintptr
	Fget_TopLevelContainer uintptr
	Fget_Type              uintptr
	Fget_Left              uintptr
	Fput_Left              uintptr
	Fget_Top               uintptr
	Fput_Top               uintptr
	Fget_Width             uintptr
	Fput_Width             uintptr
	Fget_Height            uintptr
	Fput_Height            uintptr
	Fget_LocationName      uintptr
	Fget_LocationURL       uintptr
	Fget_Busy              uintptr
	FQuit                  uintptr
	FClientToWindow        uintptr
	FPutProperty           uintptr
	FGetProperty           uintptr
	Fget_Name              uintptr
	Fget_HWND              uintptr
	Fget_FullName          uintptr
	Fget_Path              uintptr
	Fget_Visible           uintptr
	Fput_Visible           uintptr
	Fget_StatusBar         uintptr
	Fput_StatusBar         uintptr
	Fget_StatusText        uintptr
	Fput_StatusText        uintptr
	Fget_ToolBar           uintptr
	Fput_ToolBar           uintptr
	Fget_MenuBar           uintptr
	Fput_MenuBar           uintptr
	Fget_FullScreen        uintptr
	Fput_FullScreen        uintptr
} /* exdisp.h:39:9 */

type IWebBrowserAppVtbl = IWebBrowserAppVtbl1 /* exdisp.h:1136:3 */
type IWebBrowser2Vtbl1 = struct {
	FQueryInterface           uintptr
	FAddRef                   uintptr
	FRelease                  uintptr
	FGetTypeInfoCount         uintptr
	FGetTypeInfo              uintptr
	FGetIDsOfNames            uintptr
	FInvoke                   uintptr
	FGoBack                   uintptr
	FGoForward                uintptr
	FGoHome                   uintptr
	FGoSearch                 uintptr
	FNavigate                 uintptr
	FRefresh                  uintptr
	FRefresh2                 uintptr
	FStop                     uintptr
	Fget_Application          uintptr
	Fget_Parent               uintptr
	Fget_Container            uintptr
	Fget_Document             uintptr
	Fget_TopLevelContainer    uintptr
	Fget_Type                 uintptr
	Fget_Left                 uintptr
	Fput_Left                 uintptr
	Fget_Top                  uintptr
	Fput_Top                  uintptr
	Fget_Width                uintptr
	Fput_Width                uintptr
	Fget_Height               uintptr
	Fput_Height               uintptr
	Fget_LocationName         uintptr
	Fget_LocationURL          uintptr
	Fget_Busy                 uintptr
	FQuit                     uintptr
	FClientToWindow           uintptr
	FPutProperty              uintptr
	FGetProperty              uintptr
	Fget_Name                 uintptr
	Fget_HWND                 uintptr
	Fget_FullName             uintptr
	Fget_Path                 uintptr
	Fget_Visible              uintptr
	Fput_Visible              uintptr
	Fget_StatusBar            uintptr
	Fput_StatusBar            uintptr
	Fget_StatusText           uintptr
	Fput_StatusText           uintptr
	Fget_ToolBar              uintptr
	Fput_ToolBar              uintptr
	Fget_MenuBar              uintptr
	Fput_MenuBar              uintptr
	Fget_FullScreen           uintptr
	Fput_FullScreen           uintptr
	FNavigate2                uintptr
	FQueryStatusWB            uintptr
	FExecWB                   uintptr
	FShowBrowserBar           uintptr
	Fget_ReadyState           uintptr
	Fget_Offline              uintptr
	Fput_Offline              uintptr
	Fget_Silent               uintptr
	Fput_Silent               uintptr
	Fget_RegisterAsBrowser    uintptr
	Fput_RegisterAsBrowser    uintptr
	Fget_RegisterAsDropTarget uintptr
	Fput_RegisterAsDropTarget uintptr
	Fget_TheaterMode          uintptr
	Fput_TheaterMode          uintptr
	Fget_AddressBar           uintptr
	Fput_AddressBar           uintptr
	Fget_Resizable            uintptr
	Fput_Resizable            uintptr
} /* exdisp.h:47:9 */

type IWebBrowser2Vtbl = IWebBrowser2Vtbl1 /* exdisp.h:1767:3 */

type SecureLockIconConstants = uint32 /* exdisp.h:2086:3 */
type DWebBrowserEvents2Vtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* exdisp.h:55:9 */

type DWebBrowserEvents2Vtbl = DWebBrowserEvents2Vtbl1 /* exdisp.h:2149:3 */

type ShellWindowTypeConstants = uint32     /* exdisp.h:2255:3 */
type ShellWindowFindWindowOptions = uint32 /* exdisp.h:2260:3 */
type DShellWindowsEventsVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* exdisp.h:99:9 */

type DShellWindowsEventsVtbl = DShellWindowsEventsVtbl1 /* exdisp.h:2323:3 */
type IShellWindowsVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetTypeInfoCount    uintptr
	FGetTypeInfo         uintptr
	FGetIDsOfNames       uintptr
	FInvoke              uintptr
	Fget_Count           uintptr
	FItem                uintptr
	F_NewEnum            uintptr
	FRegister            uintptr
	FRegisterPending     uintptr
	FRevoke              uintptr
	FOnNavigate          uintptr
	FOnActivated         uintptr
	FFindWindowSW        uintptr
	FOnCreated           uintptr
	FProcessAttachDetach uintptr
} /* exdisp.h:107:9 */

type IShellWindowsVtbl = IShellWindowsVtbl1 /* exdisp.h:2543:3 */
type IShellUIHelperVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetTypeInfoCount      uintptr
	FGetTypeInfo           uintptr
	FGetIDsOfNames         uintptr
	FInvoke                uintptr
	FResetFirstBootMode    uintptr
	FResetSafeMode         uintptr
	FRefreshOfflineDesktop uintptr
	FAddFavorite           uintptr
	FAddChannel            uintptr
	FAddDesktopComponent   uintptr
	FIsSubscribed          uintptr
	FNavigateAndFind       uintptr
	FImportExportFavorites uintptr
	FAutoCompleteSaveForm  uintptr
	FAutoScan              uintptr
	FAutoCompleteAttach    uintptr
	FShowBrowserUI         uintptr
} /* exdisp.h:124:9 */

type IShellUIHelperVtbl = IShellUIHelperVtbl1 /* exdisp.h:2830:3 */
type IShellUIHelper2Vtbl1 = struct {
	FQueryInterface                  uintptr
	FAddRef                          uintptr
	FRelease                         uintptr
	FGetTypeInfoCount                uintptr
	FGetTypeInfo                     uintptr
	FGetIDsOfNames                   uintptr
	FInvoke                          uintptr
	FResetFirstBootMode              uintptr
	FResetSafeMode                   uintptr
	FRefreshOfflineDesktop           uintptr
	FAddFavorite                     uintptr
	FAddChannel                      uintptr
	FAddDesktopComponent             uintptr
	FIsSubscribed                    uintptr
	FNavigateAndFind                 uintptr
	FImportExportFavorites           uintptr
	FAutoCompleteSaveForm            uintptr
	FAutoScan                        uintptr
	FAutoCompleteAttach              uintptr
	FShowBrowserUI                   uintptr
	FAddSearchProvider               uintptr
	FRunOnceShown                    uintptr
	FSkipRunOnce                     uintptr
	FCustomizeSettings               uintptr
	FSqmEnabled                      uintptr
	FPhishingEnabled                 uintptr
	FBrandImageUri                   uintptr
	FSkipTabsWelcome                 uintptr
	FDiagnoseConnection              uintptr
	FCustomizeClearType              uintptr
	FIsSearchProviderInstalled       uintptr
	FIsSearchMigrated                uintptr
	FDefaultSearchProvider           uintptr
	FRunOnceRequiredSettingsComplete uintptr
	FRunOnceHasShown                 uintptr
	FSearchGuideUrl                  uintptr
} /* exdisp.h:132:9 */

type IShellUIHelper2Vtbl = IShellUIHelper2Vtbl1 /* exdisp.h:3174:3 */
type DShellNameSpaceEventsVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* exdisp.h:149:9 */

type DShellNameSpaceEventsVtbl = DShellNameSpaceEventsVtbl1 /* exdisp.h:3418:3 */
type IShellFavoritesNameSpaceVtbl1 = struct {
	FQueryInterface                 uintptr
	FAddRef                         uintptr
	FRelease                        uintptr
	FGetTypeInfoCount               uintptr
	FGetTypeInfo                    uintptr
	FGetIDsOfNames                  uintptr
	FInvoke                         uintptr
	FMoveSelectionUp                uintptr
	FMoveSelectionDown              uintptr
	FResetSort                      uintptr
	FNewFolder                      uintptr
	FSynchronize                    uintptr
	FImport                         uintptr
	FExport                         uintptr
	FInvokeContextMenuCommand       uintptr
	FMoveSelectionTo                uintptr
	Fget_SubscriptionsEnabled       uintptr
	FCreateSubscriptionForSelection uintptr
	FDeleteSubscriptionForSelection uintptr
	FSetRoot                        uintptr
} /* exdisp.h:157:9 */

type IShellFavoritesNameSpaceVtbl = IShellFavoritesNameSpaceVtbl1 /* exdisp.h:3612:3 */
type IShellNameSpaceVtbl1 = struct {
	FQueryInterface                 uintptr
	FAddRef                         uintptr
	FRelease                        uintptr
	FGetTypeInfoCount               uintptr
	FGetTypeInfo                    uintptr
	FGetIDsOfNames                  uintptr
	FInvoke                         uintptr
	FMoveSelectionUp                uintptr
	FMoveSelectionDown              uintptr
	FResetSort                      uintptr
	FNewFolder                      uintptr
	FSynchronize                    uintptr
	FImport                         uintptr
	FExport                         uintptr
	FInvokeContextMenuCommand       uintptr
	FMoveSelectionTo                uintptr
	Fget_SubscriptionsEnabled       uintptr
	FCreateSubscriptionForSelection uintptr
	FDeleteSubscriptionForSelection uintptr
	FSetRoot                        uintptr
	Fget_EnumOptions                uintptr
	Fput_EnumOptions                uintptr
	Fget_SelectedItem               uintptr
	Fput_SelectedItem               uintptr
	Fget_Root                       uintptr
	Fput_Root                       uintptr
	Fget_Depth                      uintptr
	Fput_Depth                      uintptr
	Fget_Mode                       uintptr
	Fput_Mode                       uintptr
	Fget_Flags                      uintptr
	Fput_Flags                      uintptr
	Fput_TVFlags                    uintptr
	Fget_TVFlags                    uintptr
	Fget_Columns                    uintptr
	Fput_Columns                    uintptr
	Fget_CountViewTypes             uintptr
	FSetViewType                    uintptr
	FSelectedItems                  uintptr
	FExpand                         uintptr
	FUnselectAll                    uintptr
} /* exdisp.h:165:9 */

type IShellNameSpaceVtbl = IShellNameSpaceVtbl1 /* exdisp.h:3971:3 */
type IScriptErrorListVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FGetTypeInfoCount       uintptr
	FGetTypeInfo            uintptr
	FGetIDsOfNames          uintptr
	FInvoke                 uintptr
	FadvanceError           uintptr
	FretreatError           uintptr
	FcanAdvanceError        uintptr
	FcanRetreatError        uintptr
	FgetErrorLine           uintptr
	FgetErrorChar           uintptr
	FgetErrorCode           uintptr
	FgetErrorMsg            uintptr
	FgetErrorUrl            uintptr
	FgetAlwaysShowLockState uintptr
	FgetDetailsPaneOpen     uintptr
	FsetDetailsPaneOpen     uintptr
	FgetPerErrorDisplay     uintptr
	FsetPerErrorDisplay     uintptr
} /* exdisp.h:191:9 */

type IScriptErrorListVtbl = IScriptErrorListVtbl1 /* exdisp.h:4345:3 */
type ISearchVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Title        uintptr
	Fget_Id           uintptr
	Fget_URL          uintptr
} /* exdisp.h:208:9 */

type ISearchVtbl = ISearchVtbl1 /* exdisp.h:4549:3 */
type ISearchesVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Count        uintptr
	Fget_Default      uintptr
	FItem             uintptr
	F_NewEnum         uintptr
} /* exdisp.h:216:9 */

type ISearchesVtbl = ISearchesVtbl1 /* exdisp.h:4705:3 */
type ISearchAssistantOCVtbl1 = struct {
	FQueryInterface              uintptr
	FAddRef                      uintptr
	FRelease                     uintptr
	FGetTypeInfoCount            uintptr
	FGetTypeInfo                 uintptr
	FGetIDsOfNames               uintptr
	FInvoke                      uintptr
	FAddNextMenuItem             uintptr
	FSetDefaultSearchUrl         uintptr
	FNavigateToDefaultSearch     uintptr
	FIsRestricted                uintptr
	Fget_ShellFeaturesEnabled    uintptr
	Fget_SearchAssistantDefault  uintptr
	Fget_Searches                uintptr
	Fget_InWebFolder             uintptr
	FPutProperty                 uintptr
	FGetProperty                 uintptr
	Fput_EventHandled            uintptr
	FResetNextMenu               uintptr
	FFindOnWeb                   uintptr
	FFindFilesOrFolders          uintptr
	FFindComputer                uintptr
	FFindPrinter                 uintptr
	FFindPeople                  uintptr
	FGetSearchAssistantURL       uintptr
	FNotifySearchSettingsChanged uintptr
	Fput_ASProvider              uintptr
	Fget_ASProvider              uintptr
	Fput_ASSetting               uintptr
	Fget_ASSetting               uintptr
	FNETDetectNextNavigate       uintptr
	FPutFindText                 uintptr
	Fget_Version                 uintptr
	FEncodeString                uintptr
} /* exdisp.h:224:9 */

type ISearchAssistantOCVtbl = ISearchAssistantOCVtbl1 /* exdisp.h:5037:3 */
type ISearchAssistantOC2Vtbl1 = struct {
	FQueryInterface              uintptr
	FAddRef                      uintptr
	FRelease                     uintptr
	FGetTypeInfoCount            uintptr
	FGetTypeInfo                 uintptr
	FGetIDsOfNames               uintptr
	FInvoke                      uintptr
	FAddNextMenuItem             uintptr
	FSetDefaultSearchUrl         uintptr
	FNavigateToDefaultSearch     uintptr
	FIsRestricted                uintptr
	Fget_ShellFeaturesEnabled    uintptr
	Fget_SearchAssistantDefault  uintptr
	Fget_Searches                uintptr
	Fget_InWebFolder             uintptr
	FPutProperty                 uintptr
	FGetProperty                 uintptr
	Fput_EventHandled            uintptr
	FResetNextMenu               uintptr
	FFindOnWeb                   uintptr
	FFindFilesOrFolders          uintptr
	FFindComputer                uintptr
	FFindPrinter                 uintptr
	FFindPeople                  uintptr
	FGetSearchAssistantURL       uintptr
	FNotifySearchSettingsChanged uintptr
	Fput_ASProvider              uintptr
	Fget_ASProvider              uintptr
	Fput_ASSetting               uintptr
	Fget_ASSetting               uintptr
	FNETDetectNextNavigate       uintptr
	FPutFindText                 uintptr
	Fget_Version                 uintptr
	FEncodeString                uintptr
	Fget_ShowFindPrinter         uintptr
} /* exdisp.h:232:9 */

type ISearchAssistantOC2Vtbl = ISearchAssistantOC2Vtbl1 /* exdisp.h:5377:3 */
type ISearchAssistantOC3Vtbl1 = struct {
	FQueryInterface               uintptr
	FAddRef                       uintptr
	FRelease                      uintptr
	FGetTypeInfoCount             uintptr
	FGetTypeInfo                  uintptr
	FGetIDsOfNames                uintptr
	FInvoke                       uintptr
	FAddNextMenuItem              uintptr
	FSetDefaultSearchUrl          uintptr
	FNavigateToDefaultSearch      uintptr
	FIsRestricted                 uintptr
	Fget_ShellFeaturesEnabled     uintptr
	Fget_SearchAssistantDefault   uintptr
	Fget_Searches                 uintptr
	Fget_InWebFolder              uintptr
	FPutProperty                  uintptr
	FGetProperty                  uintptr
	Fput_EventHandled             uintptr
	FResetNextMenu                uintptr
	FFindOnWeb                    uintptr
	FFindFilesOrFolders           uintptr
	FFindComputer                 uintptr
	FFindPrinter                  uintptr
	FFindPeople                   uintptr
	FGetSearchAssistantURL        uintptr
	FNotifySearchSettingsChanged  uintptr
	Fput_ASProvider               uintptr
	Fget_ASProvider               uintptr
	Fput_ASSetting                uintptr
	Fget_ASSetting                uintptr
	FNETDetectNextNavigate        uintptr
	FPutFindText                  uintptr
	Fget_Version                  uintptr
	FEncodeString                 uintptr
	Fget_ShowFindPrinter          uintptr
	Fget_SearchCompanionAvailable uintptr
	Fput_UseSearchCompanion       uintptr
	Fget_UseSearchCompanion       uintptr
} /* exdisp.h:240:9 */

type ISearchAssistantOC3Vtbl = ISearchAssistantOC3Vtbl1 /* exdisp.h:5742:3 */
type X_SearchAssistantEventsVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* exdisp.h:248:9 */

type X_SearchAssistantEventsVtbl = X_SearchAssistantEventsVtbl1 /* exdisp.h:5983:3 */

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/shldisp.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IFolderViewOC1 = struct{ FlpVtbl uintptr } /* shldisp.h:23:9 */

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/shldisp.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IFolderViewOC = IFolderViewOC1 /* shldisp.h:23:33 */

type DShellFolderViewEvents1 = struct{ FlpVtbl uintptr } /* shldisp.h:31:9 */

type DShellFolderViewEvents = DShellFolderViewEvents1 /* shldisp.h:31:42 */

type DFConstraint1 = struct{ FlpVtbl uintptr } /* shldisp.h:48:9 */

type DFConstraint = DFConstraint1 /* shldisp.h:48:32 */

type Folder1 = struct{ FlpVtbl uintptr } /* shldisp.h:56:9 */

type Folder = Folder1 /* shldisp.h:56:26 */

type Folder21 = struct{ FlpVtbl uintptr } /* shldisp.h:64:9 */

type Folder2 = Folder21 /* shldisp.h:64:27 */

type Folder31 = struct{ FlpVtbl uintptr } /* shldisp.h:72:9 */

type Folder3 = Folder31 /* shldisp.h:72:27 */

type FolderItem1 = struct{ FlpVtbl uintptr } /* shldisp.h:80:9 */

type FolderItem = FolderItem1 /* shldisp.h:80:30 */

type FolderItem21 = struct{ FlpVtbl uintptr } /* shldisp.h:88:9 */

type FolderItem2 = FolderItem21 /* shldisp.h:88:31 */

type FolderItems1 = struct{ FlpVtbl uintptr } /* shldisp.h:105:9 */

type FolderItems = FolderItems1 /* shldisp.h:105:31 */

type FolderItems21 = struct{ FlpVtbl uintptr } /* shldisp.h:113:9 */

type FolderItems2 = FolderItems21 /* shldisp.h:113:32 */

type FolderItems31 = struct{ FlpVtbl uintptr } /* shldisp.h:121:9 */

type FolderItems3 = FolderItems31 /* shldisp.h:121:32 */

type FolderItemVerb1 = struct{ FlpVtbl uintptr } /* shldisp.h:129:9 */

type FolderItemVerb = FolderItemVerb1 /* shldisp.h:129:34 */

type FolderItemVerbs1 = struct{ FlpVtbl uintptr } /* shldisp.h:137:9 */

type FolderItemVerbs = FolderItemVerbs1 /* shldisp.h:137:35 */

type IShellLinkDual1 = struct{ FlpVtbl uintptr } /* shldisp.h:145:9 */

type IShellLinkDual = IShellLinkDual1 /* shldisp.h:145:34 */

type IShellLinkDual21 = struct{ FlpVtbl uintptr } /* shldisp.h:153:9 */

type IShellLinkDual2 = IShellLinkDual21 /* shldisp.h:153:35 */

type IShellFolderViewDual1 = struct{ FlpVtbl uintptr } /* shldisp.h:170:9 */

type IShellFolderViewDual = IShellFolderViewDual1 /* shldisp.h:170:40 */

type IShellFolderViewDual21 = struct{ FlpVtbl uintptr } /* shldisp.h:178:9 */

type IShellFolderViewDual2 = IShellFolderViewDual21 /* shldisp.h:178:41 */

type IShellFolderViewDual31 = struct{ FlpVtbl uintptr } /* shldisp.h:186:9 */

type IShellFolderViewDual3 = IShellFolderViewDual31 /* shldisp.h:186:41 */

type IShellDispatch1 = struct{ FlpVtbl uintptr } /* shldisp.h:203:9 */

type IShellDispatch = IShellDispatch1 /* shldisp.h:203:34 */

type IShellDispatch21 = struct{ FlpVtbl uintptr } /* shldisp.h:211:9 */

type IShellDispatch2 = IShellDispatch21 /* shldisp.h:211:35 */

type IShellDispatch31 = struct{ FlpVtbl uintptr } /* shldisp.h:219:9 */

type IShellDispatch3 = IShellDispatch31 /* shldisp.h:219:35 */

type IShellDispatch41 = struct{ FlpVtbl uintptr } /* shldisp.h:227:9 */

type IShellDispatch4 = IShellDispatch41 /* shldisp.h:227:35 */

type IShellDispatch51 = struct{ FlpVtbl uintptr } /* shldisp.h:235:9 */

type IShellDispatch5 = IShellDispatch51 /* shldisp.h:235:35 */

type IFileSearchBand1 = struct{ FlpVtbl uintptr } /* shldisp.h:269:9 */

type IFileSearchBand = IFileSearchBand1 /* shldisp.h:269:35 */

type IWebWizardHost1 = struct{ FlpVtbl uintptr } /* shldisp.h:286:9 */

type IWebWizardHost = IWebWizardHost1 /* shldisp.h:286:34 */

type INewWDEvents1 = struct{ FlpVtbl uintptr } /* shldisp.h:294:9 */

type INewWDEvents = INewWDEvents1 /* shldisp.h:294:32 */

type IAutoComplete1 = struct{ FlpVtbl uintptr } /* shldisp.h:302:9 */

type IAutoComplete = IAutoComplete1 /* shldisp.h:302:33 */

type IAutoComplete21 = struct{ FlpVtbl uintptr } /* shldisp.h:310:9 */

type IAutoComplete2 = IAutoComplete21 /* shldisp.h:310:34 */

type IEnumACString1 = struct{ FlpVtbl uintptr } /* shldisp.h:318:9 */

type IEnumACString = IEnumACString1 /* shldisp.h:318:33 */

type IDataObjectAsyncCapability1 = struct{ FlpVtbl uintptr } /* shldisp.h:326:9 */

type IDataObjectAsyncCapability = IDataObjectAsyncCapability1 /* shldisp.h:326:46 */
type IFolderViewOCVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	FSetFolderView    uintptr
} /* shldisp.h:23:9 */

type IFolderViewOCVtbl = IFolderViewOCVtbl1 /* shldisp.h:464:3 */
type DShellFolderViewEventsVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
} /* shldisp.h:31:9 */

type DShellFolderViewEventsVtbl = DShellFolderViewEventsVtbl1 /* shldisp.h:581:3 */
type DFConstraintVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Name         uintptr
	Fget_Value        uintptr
} /* shldisp.h:48:9 */

type DFConstraintVtbl = DFConstraintVtbl1 /* shldisp.h:719:3 */
type FolderVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Title        uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	Fget_ParentFolder uintptr
	FItems            uintptr
	FParseName        uintptr
	FNewFolder        uintptr
	FMoveHere         uintptr
	FCopyHere         uintptr
	FGetDetailsOf     uintptr
} /* shldisp.h:56:9 */

type FolderVtbl = FolderVtbl1 /* shldisp.h:923:3 */
type Folder2Vtbl1 = struct {
	FQueryInterface                 uintptr
	FAddRef                         uintptr
	FRelease                        uintptr
	FGetTypeInfoCount               uintptr
	FGetTypeInfo                    uintptr
	FGetIDsOfNames                  uintptr
	FInvoke                         uintptr
	Fget_Title                      uintptr
	Fget_Application                uintptr
	Fget_Parent                     uintptr
	Fget_ParentFolder               uintptr
	FItems                          uintptr
	FParseName                      uintptr
	FNewFolder                      uintptr
	FMoveHere                       uintptr
	FCopyHere                       uintptr
	FGetDetailsOf                   uintptr
	Fget_Self                       uintptr
	Fget_OfflineStatus              uintptr
	FSynchronize                    uintptr
	Fget_HaveToShowWebViewBarricade uintptr
	FDismissedWebViewBarricade      uintptr
} /* shldisp.h:64:9 */

type Folder2Vtbl = Folder2Vtbl1 /* shldisp.h:1157:3 */

type OfflineFolderStatus = int32 /* shldisp.h:1276:3 */
type Folder3Vtbl1 = struct {
	FQueryInterface                 uintptr
	FAddRef                         uintptr
	FRelease                        uintptr
	FGetTypeInfoCount               uintptr
	FGetTypeInfo                    uintptr
	FGetIDsOfNames                  uintptr
	FInvoke                         uintptr
	Fget_Title                      uintptr
	Fget_Application                uintptr
	Fget_Parent                     uintptr
	Fget_ParentFolder               uintptr
	FItems                          uintptr
	FParseName                      uintptr
	FNewFolder                      uintptr
	FMoveHere                       uintptr
	FCopyHere                       uintptr
	FGetDetailsOf                   uintptr
	Fget_Self                       uintptr
	Fget_OfflineStatus              uintptr
	FSynchronize                    uintptr
	Fget_HaveToShowWebViewBarricade uintptr
	FDismissedWebViewBarricade      uintptr
	Fget_ShowWebViewBarricade       uintptr
	Fput_ShowWebViewBarricade       uintptr
} /* shldisp.h:72:9 */

type Folder3Vtbl = Folder3Vtbl1 /* shldisp.h:1420:3 */

// ****************************************************************************
//
// FolderItem interface

type LPFOLDERITEM = uintptr /* shldisp.h:1549:20 */
type FolderItemVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	Fget_Name         uintptr
	Fput_Name         uintptr
	Fget_Path         uintptr
	Fget_GetLink      uintptr
	Fget_GetFolder    uintptr
	Fget_IsLink       uintptr
	Fget_IsFolder     uintptr
	Fget_IsFileSystem uintptr
	Fget_IsBrowsable  uintptr
	Fget_ModifyDate   uintptr
	Fput_ModifyDate   uintptr
	Fget_Size         uintptr
	Fget_Type         uintptr
	FVerbs            uintptr
	FInvokeVerb       uintptr
} /* shldisp.h:80:9 */

type FolderItemVtbl = FolderItemVtbl1 /* shldisp.h:1726:3 */
type FolderItem2Vtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	Fget_Name         uintptr
	Fput_Name         uintptr
	Fget_Path         uintptr
	Fget_GetLink      uintptr
	Fget_GetFolder    uintptr
	Fget_IsLink       uintptr
	Fget_IsFolder     uintptr
	Fget_IsFileSystem uintptr
	Fget_IsBrowsable  uintptr
	Fget_ModifyDate   uintptr
	Fput_ModifyDate   uintptr
	Fget_Size         uintptr
	Fget_Type         uintptr
	FVerbs            uintptr
	FInvokeVerb       uintptr
	FInvokeVerbEx     uintptr
	FExtendedProperty uintptr
} /* shldisp.h:88:9 */

type FolderItem2Vtbl = FolderItem2Vtbl1 /* shldisp.h:1995:3 */
type FolderItemsVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Count        uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	FItem             uintptr
	F_NewEnum         uintptr
} /* shldisp.h:105:9 */

type FolderItemsVtbl = FolderItemsVtbl1 /* shldisp.h:2237:3 */
type FolderItems2Vtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Count        uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	FItem             uintptr
	F_NewEnum         uintptr
	FInvokeVerbEx     uintptr
} /* shldisp.h:113:9 */

type FolderItems2Vtbl = FolderItems2Vtbl1 /* shldisp.h:2402:3 */
type FolderItems3Vtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Count        uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	FItem             uintptr
	F_NewEnum         uintptr
	FInvokeVerbEx     uintptr
	FFilter           uintptr
	Fget_Verbs        uintptr
} /* shldisp.h:121:9 */

type FolderItems3Vtbl = FolderItems3Vtbl1 /* shldisp.h:2586:3 */
type FolderItemVerbVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	Fget_Name         uintptr
	FDoIt             uintptr
} /* shldisp.h:129:9 */

type FolderItemVerbVtbl = FolderItemVerbVtbl1 /* shldisp.h:2763:3 */
type FolderItemVerbsVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Count        uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	FItem             uintptr
	F_NewEnum         uintptr
} /* shldisp.h:137:9 */

type FolderItemVerbsVtbl = FolderItemVerbsVtbl1 /* shldisp.h:2930:3 */
type IShellLinkDualVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeInfoCount     uintptr
	FGetTypeInfo          uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	Fget_Path             uintptr
	Fput_Path             uintptr
	Fget_Description      uintptr
	Fput_Description      uintptr
	Fget_WorkingDirectory uintptr
	Fput_WorkingDirectory uintptr
	Fget_Arguments        uintptr
	Fput_Arguments        uintptr
	Fget_Hotkey           uintptr
	Fput_Hotkey           uintptr
	Fget_ShowCommand      uintptr
	Fput_ShowCommand      uintptr
	FResolve              uintptr
	FGetIconLocation      uintptr
	FSetIconLocation      uintptr
	FSave                 uintptr
} /* shldisp.h:145:9 */

type IShellLinkDualVtbl = IShellLinkDualVtbl1 /* shldisp.h:3180:3 */
type IShellLinkDual2Vtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeInfoCount     uintptr
	FGetTypeInfo          uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	Fget_Path             uintptr
	Fput_Path             uintptr
	Fget_Description      uintptr
	Fput_Description      uintptr
	Fget_WorkingDirectory uintptr
	Fput_WorkingDirectory uintptr
	Fget_Arguments        uintptr
	Fput_Arguments        uintptr
	Fget_Hotkey           uintptr
	Fput_Hotkey           uintptr
	Fget_ShowCommand      uintptr
	Fput_ShowCommand      uintptr
	FResolve              uintptr
	FGetIconLocation      uintptr
	FSetIconLocation      uintptr
	FSave                 uintptr
	Fget_Target           uintptr
} /* shldisp.h:153:9 */

type IShellLinkDual2Vtbl = IShellLinkDual2Vtbl1 /* shldisp.h:3432:3 */
type IShellFolderViewDualVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	Fget_Folder       uintptr
	FSelectedItems    uintptr
	Fget_FocusedItem  uintptr
	FSelectItem       uintptr
	FPopupItemMenu    uintptr
	Fget_Script       uintptr
	Fget_ViewOptions  uintptr
} /* shldisp.h:170:9 */

type IShellFolderViewDualVtbl = IShellFolderViewDualVtbl1 /* shldisp.h:3700:3 */
type IShellFolderViewDual2Vtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetTypeInfoCount    uintptr
	FGetTypeInfo         uintptr
	FGetIDsOfNames       uintptr
	FInvoke              uintptr
	Fget_Application     uintptr
	Fget_Parent          uintptr
	Fget_Folder          uintptr
	FSelectedItems       uintptr
	Fget_FocusedItem     uintptr
	FSelectItem          uintptr
	FPopupItemMenu       uintptr
	Fget_Script          uintptr
	Fget_ViewOptions     uintptr
	Fget_CurrentViewMode uintptr
	Fput_CurrentViewMode uintptr
	FSelectItemRelative  uintptr
} /* shldisp.h:178:9 */

type IShellFolderViewDual2Vtbl = IShellFolderViewDual2Vtbl1 /* shldisp.h:3912:3 */
type IShellFolderViewDual3Vtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetTypeInfoCount    uintptr
	FGetTypeInfo         uintptr
	FGetIDsOfNames       uintptr
	FInvoke              uintptr
	Fget_Application     uintptr
	Fget_Parent          uintptr
	Fget_Folder          uintptr
	FSelectedItems       uintptr
	Fget_FocusedItem     uintptr
	FSelectItem          uintptr
	FPopupItemMenu       uintptr
	Fget_Script          uintptr
	Fget_ViewOptions     uintptr
	Fget_CurrentViewMode uintptr
	Fput_CurrentViewMode uintptr
	FSelectItemRelative  uintptr
	Fget_GroupBy         uintptr
	Fput_GroupBy         uintptr
	Fget_FolderFlags     uintptr
	Fput_FolderFlags     uintptr
	Fget_SortColumns     uintptr
	Fput_SortColumns     uintptr
	Fput_IconSize        uintptr
	Fget_IconSize        uintptr
	FFilterView          uintptr
} /* shldisp.h:186:9 */

type IShellFolderViewDual3Vtbl = IShellFolderViewDual3Vtbl1 /* shldisp.h:4193:3 */

type ShellFolderViewOptions = uint32 /* shldisp.h:4353:3 */
type IShellDispatchVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	Fget_Application  uintptr
	Fget_Parent       uintptr
	FNameSpace        uintptr
	FBrowseForFolder  uintptr
	FWindows          uintptr
	FOpen             uintptr
	FExplore          uintptr
	FMinimizeAll      uintptr
	FUndoMinimizeALL  uintptr
	FFileRun          uintptr
	FCascadeWindows   uintptr
	FTileVertically   uintptr
	FTileHorizontally uintptr
	FShutdownWindows  uintptr
	FSuspend          uintptr
	FEjectPC          uintptr
	FSetTime          uintptr
	FTrayProperties   uintptr
	FHelp             uintptr
	FFindFiles        uintptr
	FFindComputer     uintptr
	FRefreshMenu      uintptr
	FControlPanelItem uintptr
} /* shldisp.h:203:9 */

type IShellDispatchVtbl = IShellDispatchVtbl1 /* shldisp.h:4573:3 */
type IShellDispatch2Vtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeInfoCount     uintptr
	FGetTypeInfo          uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	Fget_Application      uintptr
	Fget_Parent           uintptr
	FNameSpace            uintptr
	FBrowseForFolder      uintptr
	FWindows              uintptr
	FOpen                 uintptr
	FExplore              uintptr
	FMinimizeAll          uintptr
	FUndoMinimizeALL      uintptr
	FFileRun              uintptr
	FCascadeWindows       uintptr
	FTileVertically       uintptr
	FTileHorizontally     uintptr
	FShutdownWindows      uintptr
	FSuspend              uintptr
	FEjectPC              uintptr
	FSetTime              uintptr
	FTrayProperties       uintptr
	FHelp                 uintptr
	FFindFiles            uintptr
	FFindComputer         uintptr
	FRefreshMenu          uintptr
	FControlPanelItem     uintptr
	FIsRestricted         uintptr
	FShellExecute         uintptr
	FFindPrinter          uintptr
	FGetSystemInformation uintptr
	FServiceStart         uintptr
	FServiceStop          uintptr
	FIsServiceRunning     uintptr
	FCanStartStopService  uintptr
	FShowBrowserBar       uintptr
} /* shldisp.h:211:9 */

type IShellDispatch2Vtbl = IShellDispatch2Vtbl1 /* shldisp.h:4959:3 */
type IShellDispatch3Vtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeInfoCount     uintptr
	FGetTypeInfo          uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	Fget_Application      uintptr
	Fget_Parent           uintptr
	FNameSpace            uintptr
	FBrowseForFolder      uintptr
	FWindows              uintptr
	FOpen                 uintptr
	FExplore              uintptr
	FMinimizeAll          uintptr
	FUndoMinimizeALL      uintptr
	FFileRun              uintptr
	FCascadeWindows       uintptr
	FTileVertically       uintptr
	FTileHorizontally     uintptr
	FShutdownWindows      uintptr
	FSuspend              uintptr
	FEjectPC              uintptr
	FSetTime              uintptr
	FTrayProperties       uintptr
	FHelp                 uintptr
	FFindFiles            uintptr
	FFindComputer         uintptr
	FRefreshMenu          uintptr
	FControlPanelItem     uintptr
	FIsRestricted         uintptr
	FShellExecute         uintptr
	FFindPrinter          uintptr
	FGetSystemInformation uintptr
	FServiceStart         uintptr
	FServiceStop          uintptr
	FIsServiceRunning     uintptr
	FCanStartStopService  uintptr
	FShowBrowserBar       uintptr
	FAddToRecent          uintptr
} /* shldisp.h:219:9 */

type IShellDispatch3Vtbl = IShellDispatch3Vtbl1 /* shldisp.h:5349:3 */
type IShellDispatch4Vtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeInfoCount     uintptr
	FGetTypeInfo          uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	Fget_Application      uintptr
	Fget_Parent           uintptr
	FNameSpace            uintptr
	FBrowseForFolder      uintptr
	FWindows              uintptr
	FOpen                 uintptr
	FExplore              uintptr
	FMinimizeAll          uintptr
	FUndoMinimizeALL      uintptr
	FFileRun              uintptr
	FCascadeWindows       uintptr
	FTileVertically       uintptr
	FTileHorizontally     uintptr
	FShutdownWindows      uintptr
	FSuspend              uintptr
	FEjectPC              uintptr
	FSetTime              uintptr
	FTrayProperties       uintptr
	FHelp                 uintptr
	FFindFiles            uintptr
	FFindComputer         uintptr
	FRefreshMenu          uintptr
	FControlPanelItem     uintptr
	FIsRestricted         uintptr
	FShellExecute         uintptr
	FFindPrinter          uintptr
	FGetSystemInformation uintptr
	FServiceStart         uintptr
	FServiceStop          uintptr
	FIsServiceRunning     uintptr
	FCanStartStopService  uintptr
	FShowBrowserBar       uintptr
	FAddToRecent          uintptr
	FWindowsSecurity      uintptr
	FToggleDesktop        uintptr
	FExplorerPolicy       uintptr
	FGetSetting           uintptr
} /* shldisp.h:227:9 */

type IShellDispatch4Vtbl = IShellDispatch4Vtbl1 /* shldisp.h:5772:3 */
type IShellDispatch5Vtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeInfoCount     uintptr
	FGetTypeInfo          uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	Fget_Application      uintptr
	Fget_Parent           uintptr
	FNameSpace            uintptr
	FBrowseForFolder      uintptr
	FWindows              uintptr
	FOpen                 uintptr
	FExplore              uintptr
	FMinimizeAll          uintptr
	FUndoMinimizeALL      uintptr
	FFileRun              uintptr
	FCascadeWindows       uintptr
	FTileVertically       uintptr
	FTileHorizontally     uintptr
	FShutdownWindows      uintptr
	FSuspend              uintptr
	FEjectPC              uintptr
	FSetTime              uintptr
	FTrayProperties       uintptr
	FHelp                 uintptr
	FFindFiles            uintptr
	FFindComputer         uintptr
	FRefreshMenu          uintptr
	FControlPanelItem     uintptr
	FIsRestricted         uintptr
	FShellExecute         uintptr
	FFindPrinter          uintptr
	FGetSystemInformation uintptr
	FServiceStart         uintptr
	FServiceStop          uintptr
	FIsServiceRunning     uintptr
	FCanStartStopService  uintptr
	FShowBrowserBar       uintptr
	FAddToRecent          uintptr
	FWindowsSecurity      uintptr
	FToggleDesktop        uintptr
	FExplorerPolicy       uintptr
	FGetSetting           uintptr
	FWindowSwitcher       uintptr
} /* shldisp.h:235:9 */

type IShellDispatch5Vtbl = IShellDispatch5Vtbl1 /* shldisp.h:6206:3 */

type ShellSpecialFolderConstants = uint32 /* shldisp.h:6934:3 */
type IFileSearchBandVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetTypeInfoCount    uintptr
	FGetTypeInfo         uintptr
	FGetIDsOfNames       uintptr
	FInvoke              uintptr
	FSetFocus            uintptr
	FSetSearchParameters uintptr
	Fget_SearchID        uintptr
	Fget_Scope           uintptr
	Fget_QueryFile       uintptr
} /* shldisp.h:269:9 */

type IFileSearchBandVtbl = IFileSearchBandVtbl1 /* shldisp.h:7038:3 */
type IWebWizardHostVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTypeInfoCount uintptr
	FGetTypeInfo      uintptr
	FGetIDsOfNames    uintptr
	FInvoke           uintptr
	FFinalBack        uintptr
	FFinalNext        uintptr
	FCancel           uintptr
	Fput_Caption      uintptr
	Fget_Caption      uintptr
	Fput_Property     uintptr
	Fget_Property     uintptr
	FSetWizardButtons uintptr
	FSetHeaderText    uintptr
} /* shldisp.h:286:9 */

type IWebWizardHostVtbl = IWebWizardHostVtbl1 /* shldisp.h:7255:3 */
type INewWDEventsVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetTypeInfoCount     uintptr
	FGetTypeInfo          uintptr
	FGetIDsOfNames        uintptr
	FInvoke               uintptr
	FFinalBack            uintptr
	FFinalNext            uintptr
	FCancel               uintptr
	Fput_Caption          uintptr
	Fget_Caption          uintptr
	Fput_Property         uintptr
	Fget_Property         uintptr
	FSetWizardButtons     uintptr
	FSetHeaderText        uintptr
	FPassportAuthenticate uintptr
} /* shldisp.h:294:9 */

type INewWDEventsVtbl = INewWDEventsVtbl1 /* shldisp.h:7453:3 */

// ****************************************************************************
//
// IAutoComplete interface

type LPAUTOCOMPLETE = uintptr /* shldisp.h:7552:23 */
type IAutoCompleteVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInit           uintptr
	FEnable         uintptr
} /* shldisp.h:302:9 */

type IAutoCompleteVtbl = IAutoCompleteVtbl1 /* shldisp.h:7600:3 */

// ****************************************************************************
//
// IAutoComplete2 interface

type LPAUTOCOMPLETE2 = uintptr    /* shldisp.h:7647:24 */
type AUTOCOMPLETEOPTIONS = uint32 /* shldisp.h:7659:3 */
type IAutoComplete2Vtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInit           uintptr
	FEnable         uintptr
	FSetOptions     uintptr
	FGetOptions     uintptr
} /* shldisp.h:310:9 */

type IAutoComplete2Vtbl = IAutoComplete2Vtbl1 /* shldisp.h:7713:3 */

// ****************************************************************************
//
// IEnumACString interface

type PENUMACSTRING = uintptr  /* shldisp.h:7771:23 */
type LPENUMACSTRING = uintptr /* shldisp.h:7772:23 */
type ACENUMOPTION = uint32    /* shldisp.h:7777:3 */
type IEnumACStringVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
	FNextItem       uintptr
	FSetEnumOptions uintptr
	FGetEnumOptions uintptr
} /* shldisp.h:318:9 */

type IEnumACStringVtbl = IEnumACStringVtbl1 /* shldisp.h:7848:3 */
type IDataObjectAsyncCapabilityVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetAsyncMode   uintptr
	FGetAsyncMode   uintptr
	FStartOperation uintptr
	FInOperation    uintptr
	FEndOperation   uintptr
} /* shldisp.h:326:9 */

type IDataObjectAsyncCapabilityVtbl = IDataObjectAsyncCapabilityVtbl1 /* shldisp.h:7983:3 */

// Commented out to ...
//   DEFINE_GUID (IID_IShellBrowser, __MSABI_LONG(0x000214e2), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellView, __MSABI_LONG(0x000214e3), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IContextMenu, __MSABI_LONG(0x000214e4), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellIcon, __MSABI_LONG(0x000214e5), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellFolder, __MSABI_LONG(0x000214e6), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellExtInit, __MSABI_LONG(0x000214e8), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellPropSheetExt, __MSABI_LONG(0x000214e9), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IPersistFolder, __MSABI_LONG(0x000214ea), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellLinkA, __MSABI_LONG(0x000214ee), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_ICommDlgBrowser, __MSABI_LONG(0x000214f1), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IEnumIDList, __MSABI_LONG(0x000214f2), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IContextMenu2, __MSABI_LONG(0x000214f4), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellLinkW, __MSABI_LONG(0x000214f9), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IRemoteComputer, __MSABI_LONG(0x000214fe), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellView2, __MSABI_LONG(0x88e39e80), 0x3578, 0x11cf, 0xae, 0x69, 0x08, 0x00, 0x2b, 0x2e, 0x12, 0x62);
//   DEFINE_GUID (IID_ICommDlgBrowser2, 0x10339516, 0x2894, 0x11d2, 0x90, 0x39, 0x0, 0xc0, 0x4f, 0x8e, 0xeb, 0x3e);
//   DEFINE_GUID (IID_IContextMenu3, 0xbcfce0a0, 0xec17, 0x11d0, 0x8d, 0x10, 0x0, 0xa0, 0xc9, 0xf, 0x27, 0x19);
//   DEFINE_GUID (IID_IShellFolder2, 0x93f2f68c, 0x1d1b, 0x11d3, 0xa3, 0xe, 0x0, 0xc0, 0x4f, 0x79, 0xab, 0xd1);
//   DEFINE_GUID (IID_IEnumExtraSearch, 0xe700be1, 0x9db6, 0x11d1, 0xa1, 0xce, 0x0, 0xc0, 0x4f, 0xd7, 0x5d, 0x13);
//
//   ... avoid double definitions. See shobjidl.h header.

//** Autogenerated by WIDL 4.5 from shtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/unknwn.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/wtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_SHITEMID = struct {
	Fcb          USHORT
	FabID        [1]BYTE
	F__ccgo_pad1 [1]byte
} /* shtypes.h:53:9 */

// Commented out to ...
//   DEFINE_GUID (IID_IShellBrowser, __MSABI_LONG(0x000214e2), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellView, __MSABI_LONG(0x000214e3), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IContextMenu, __MSABI_LONG(0x000214e4), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellIcon, __MSABI_LONG(0x000214e5), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellFolder, __MSABI_LONG(0x000214e6), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellExtInit, __MSABI_LONG(0x000214e8), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellPropSheetExt, __MSABI_LONG(0x000214e9), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IPersistFolder, __MSABI_LONG(0x000214ea), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellLinkA, __MSABI_LONG(0x000214ee), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_ICommDlgBrowser, __MSABI_LONG(0x000214f1), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IEnumIDList, __MSABI_LONG(0x000214f2), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IContextMenu2, __MSABI_LONG(0x000214f4), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellLinkW, __MSABI_LONG(0x000214f9), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IRemoteComputer, __MSABI_LONG(0x000214fe), 0, 0, 0xc0, 0, 0, 0, 0, 0, 0, 0x46);
//   DEFINE_GUID (IID_IShellView2, __MSABI_LONG(0x88e39e80), 0x3578, 0x11cf, 0xae, 0x69, 0x08, 0x00, 0x2b, 0x2e, 0x12, 0x62);
//   DEFINE_GUID (IID_ICommDlgBrowser2, 0x10339516, 0x2894, 0x11d2, 0x90, 0x39, 0x0, 0xc0, 0x4f, 0x8e, 0xeb, 0x3e);
//   DEFINE_GUID (IID_IContextMenu3, 0xbcfce0a0, 0xec17, 0x11d0, 0x8d, 0x10, 0x0, 0xa0, 0xc9, 0xf, 0x27, 0x19);
//   DEFINE_GUID (IID_IShellFolder2, 0x93f2f68c, 0x1d1b, 0x11d3, 0xa3, 0xe, 0x0, 0xc0, 0x4f, 0x79, 0xab, 0xd1);
//   DEFINE_GUID (IID_IEnumExtraSearch, 0xe700be1, 0x9db6, 0x11d1, 0xa1, 0xce, 0x0, 0xc0, 0x4f, 0xd7, 0x5d, 0x13);
//
//   ... avoid double definitions. See shobjidl.h header.

//** Autogenerated by WIDL 4.5 from shtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/unknwn.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/wtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SHITEMID = X_SHITEMID /* shtypes.h:56:3 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type LPSHITEMID = uintptr  /* shtypes.h:64:18 */
type LPCSHITEMID = uintptr /* shtypes.h:65:24 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_ITEMIDLIST = struct{ Fmkid SHITEMID } /* shtypes.h:68:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type ITEMIDLIST = X_ITEMIDLIST /* shtypes.h:70:3 */

type ITEMIDLIST_RELATIVE = ITEMIDLIST /* shtypes.h:77:20 */
type ITEMID_CHILD = ITEMIDLIST        /* shtypes.h:78:20 */
type ITEMIDLIST_ABSOLUTE = ITEMIDLIST /* shtypes.h:79:20 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type WirePIDL = uintptr      /* shtypes.h:83:19 */
type LPITEMIDLIST = uintptr  /* shtypes.h:84:20 */
type LPCITEMIDLIST = uintptr /* shtypes.h:85:26 */

type STRRET_TYPE = uint32 /* shtypes.h:156:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_STRRET = struct {
	FuType       UINT
	F__ccgo_pad1 [4]byte
	F__8         struct {
		FpOleStr     LPWSTR
		F__ccgo_pad1 [256]byte
	}
} /* shtypes.h:159:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type STRRET = X_STRRET /* shtypes.h:166:3 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type LPSTRRET = uintptr /* shtypes.h:169:16 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_SHELLDETAILS = struct {
	Ffmt    int32
	FcxChar int32
	Fstr    STRRET
} /* shtypes.h:172:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SHELLDETAILS = X_SHELLDETAILS /* shtypes.h:176:3 */
type LPSHELLDETAILS = uintptr      /* shtypes.h:177:30 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_COMDLG_FILTERSPEC = struct {
	FpszName LPCWSTR
	FpszSpec LPCWSTR
} /* shtypes.h:211:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type COMDLG_FILTERSPEC = X_COMDLG_FILTERSPEC /* shtypes.h:214:3 */

type KNOWNFOLDERID = GUID /* shtypes.h:216:14 */

type KF_REDIRECT_FLAGS = DWORD /* shtypes.h:228:15 */

type FOLDERTYPEID = GUID /* shtypes.h:230:14 */

type TASKOWNERID = GUID /* shtypes.h:242:14 */

type ELEMENTID = GUID /* shtypes.h:254:14 */

type SHCOLSTATE = uint32 /* shtypes.h:325:3 */

type SHCOLSTATEF = DWORD      /* shtypes.h:327:15 */
type SHCOLUMNID = PROPERTYKEY /* shtypes.h:328:21 */
type LPCSHCOLUMNID = uintptr  /* shtypes.h:329:26 */

type DEVICE_SCALE_FACTOR = uint32 /* shtypes.h:349:3 */
// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/shobjidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IContextMenu1 = struct{ FlpVtbl uintptr } /* shobjidl.h:23:9 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/shobjidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IContextMenu = IContextMenu1 /* shobjidl.h:23:32 */

type IContextMenu21 = struct{ FlpVtbl uintptr } /* shobjidl.h:31:9 */

type IContextMenu2 = IContextMenu21 /* shobjidl.h:31:33 */

type IContextMenu31 = struct{ FlpVtbl uintptr } /* shobjidl.h:39:9 */

type IContextMenu3 = IContextMenu31 /* shobjidl.h:39:33 */

type IExecuteCommand1 = struct{ FlpVtbl uintptr } /* shobjidl.h:47:9 */

type IExecuteCommand = IExecuteCommand1 /* shobjidl.h:47:35 */

type IPersistFolder1 = struct{ FlpVtbl uintptr } /* shobjidl.h:55:9 */

type IPersistFolder = IPersistFolder1 /* shobjidl.h:55:34 */

type IRunnableTask1 = struct{ FlpVtbl uintptr } /* shobjidl.h:63:9 */

type IRunnableTask = IRunnableTask1 /* shobjidl.h:63:33 */

type IShellTaskScheduler1 = struct{ FlpVtbl uintptr } /* shobjidl.h:71:9 */

type IShellTaskScheduler = IShellTaskScheduler1 /* shobjidl.h:71:39 */

type IQueryCodePage1 = struct{ FlpVtbl uintptr } /* shobjidl.h:79:9 */

type IQueryCodePage = IQueryCodePage1 /* shobjidl.h:79:34 */

type IPersistFolder21 = struct{ FlpVtbl uintptr } /* shobjidl.h:87:9 */

type IPersistFolder2 = IPersistFolder21 /* shobjidl.h:87:35 */

type IPersistFolder31 = struct{ FlpVtbl uintptr } /* shobjidl.h:95:9 */

type IPersistFolder3 = IPersistFolder31 /* shobjidl.h:95:35 */

type IPersistIDList1 = struct{ FlpVtbl uintptr } /* shobjidl.h:103:9 */

type IPersistIDList = IPersistIDList1 /* shobjidl.h:103:34 */

type IEnumIDList1 = struct{ FlpVtbl uintptr } /* shobjidl.h:111:9 */

type IEnumIDList = IEnumIDList1 /* shobjidl.h:111:31 */

type IEnumFullIDList1 = struct{ FlpVtbl uintptr } /* shobjidl.h:119:9 */

type IEnumFullIDList = IEnumFullIDList1 /* shobjidl.h:119:35 */

type IShellFolder1 = struct{ FlpVtbl uintptr } /* shobjidl.h:143:9 */

type IShellFolder = IShellFolder1 /* shobjidl.h:143:32 */

type IEnumExtraSearch1 = struct{ FlpVtbl uintptr } /* shobjidl.h:151:9 */

type IEnumExtraSearch = IEnumExtraSearch1 /* shobjidl.h:151:36 */

type IShellFolder21 = struct{ FlpVtbl uintptr } /* shobjidl.h:159:9 */

type IShellFolder2 = IShellFolder21 /* shobjidl.h:159:33 */

type IFolderViewOptions1 = struct{ FlpVtbl uintptr } /* shobjidl.h:167:9 */

type IFolderViewOptions = IFolderViewOptions1 /* shobjidl.h:167:38 */

type IShellView1 = struct{ FlpVtbl uintptr } /* shobjidl.h:175:9 */

type IShellView = IShellView1 /* shobjidl.h:175:30 */

type IShellView21 = struct{ FlpVtbl uintptr } /* shobjidl.h:183:9 */

type IShellView2 = IShellView21 /* shobjidl.h:183:31 */

type IFolderView1 = struct{ FlpVtbl uintptr } /* shobjidl.h:199:9 */

type IFolderView = IFolderView1 /* shobjidl.h:199:31 */

type ICommDlgBrowser1 = struct{ FlpVtbl uintptr } /* shobjidl.h:247:9 */

type ICommDlgBrowser = ICommDlgBrowser1 /* shobjidl.h:247:35 */

type ICommDlgBrowser21 = struct{ FlpVtbl uintptr } /* shobjidl.h:255:9 */

type ICommDlgBrowser2 = ICommDlgBrowser21 /* shobjidl.h:255:36 */

type IFolderFilterSite1 = struct{ FlpVtbl uintptr } /* shobjidl.h:279:9 */

type IFolderFilterSite = IFolderFilterSite1 /* shobjidl.h:279:37 */

type IFolderFilter1 = struct{ FlpVtbl uintptr } /* shobjidl.h:287:9 */

type IFolderFilter = IFolderFilter1 /* shobjidl.h:287:33 */

type IInputObjectSite1 = struct{ FlpVtbl uintptr } /* shobjidl.h:295:9 */

type IInputObjectSite = IInputObjectSite1 /* shobjidl.h:295:36 */

type IInputObject1 = struct{ FlpVtbl uintptr } /* shobjidl.h:303:9 */

type IInputObject = IInputObject1 /* shobjidl.h:303:32 */

type IInputObject21 = struct{ FlpVtbl uintptr } /* shobjidl.h:311:9 */

type IInputObject2 = IInputObject21 /* shobjidl.h:311:33 */

type IShellIcon1 = struct{ FlpVtbl uintptr } /* shobjidl.h:319:9 */

type IShellIcon = IShellIcon1 /* shobjidl.h:319:30 */

type IShellBrowser1 = struct{ FlpVtbl uintptr } /* shobjidl.h:327:9 */

type IShellBrowser = IShellBrowser1 /* shobjidl.h:327:33 */

type IProfferService1 = struct{ FlpVtbl uintptr } /* shobjidl.h:335:9 */

type IProfferService = IProfferService1 /* shobjidl.h:335:35 */

type IShellItem1 = struct{ FlpVtbl uintptr } /* shobjidl.h:343:9 */

type IShellItem = IShellItem1 /* shobjidl.h:343:30 */

type IShellItem21 = struct{ FlpVtbl uintptr } /* shobjidl.h:351:9 */

type IShellItem2 = IShellItem21 /* shobjidl.h:351:31 */

type IShellItemImageFactory1 = struct{ FlpVtbl uintptr } /* shobjidl.h:359:9 */

type IShellItemImageFactory = IShellItemImageFactory1 /* shobjidl.h:359:42 */

type IUserAccountChangeCallback1 = struct{ FlpVtbl uintptr } /* shobjidl.h:367:9 */

type IUserAccountChangeCallback = IUserAccountChangeCallback1 /* shobjidl.h:367:46 */

type IEnumShellItems1 = struct{ FlpVtbl uintptr } /* shobjidl.h:375:9 */

type IEnumShellItems = IEnumShellItems1 /* shobjidl.h:375:35 */

type IEnumResources1 = struct{ FlpVtbl uintptr } /* shobjidl.h:399:9 */

type IEnumResources = IEnumResources1 /* shobjidl.h:399:34 */

type IShellItemResources1 = struct{ FlpVtbl uintptr } /* shobjidl.h:407:9 */

type IShellItemResources = IShellItemResources1 /* shobjidl.h:407:39 */

type ITransferDestination1 = struct{ FlpVtbl uintptr } /* shobjidl.h:415:9 */

type ITransferDestination = ITransferDestination1 /* shobjidl.h:415:40 */

type IStreamAsync1 = struct{ FlpVtbl uintptr } /* shobjidl.h:423:9 */

type IStreamAsync = IStreamAsync1 /* shobjidl.h:423:32 */

type IStreamUnbufferedInfo1 = struct{ FlpVtbl uintptr } /* shobjidl.h:431:9 */

type IStreamUnbufferedInfo = IStreamUnbufferedInfo1 /* shobjidl.h:431:41 */

type IShellItemArray1 = struct{ FlpVtbl uintptr } /* shobjidl.h:447:9 */

type IShellItemArray = IShellItemArray1 /* shobjidl.h:447:35 */

type IInitializeWithItem1 = struct{ FlpVtbl uintptr } /* shobjidl.h:455:9 */

type IInitializeWithItem = IInitializeWithItem1 /* shobjidl.h:455:39 */

type IObjectWithSelection1 = struct{ FlpVtbl uintptr } /* shobjidl.h:463:9 */

type IObjectWithSelection = IObjectWithSelection1 /* shobjidl.h:463:40 */

type IObjectWithBackReferences1 = struct{ FlpVtbl uintptr } /* shobjidl.h:471:9 */

type IObjectWithBackReferences = IObjectWithBackReferences1 /* shobjidl.h:471:45 */

type IPropertyUI1 = struct{ FlpVtbl uintptr } /* shobjidl.h:479:9 */

type IPropertyUI = IPropertyUI1 /* shobjidl.h:479:31 */

type ICategoryProvider1 = struct{ FlpVtbl uintptr } /* shobjidl.h:487:9 */

type ICategoryProvider = ICategoryProvider1 /* shobjidl.h:487:37 */

type ICategorizer1 = struct{ FlpVtbl uintptr } /* shobjidl.h:495:9 */

type ICategorizer = ICategorizer1 /* shobjidl.h:495:32 */

type IDropTargetHelper1 = struct{ FlpVtbl uintptr } /* shobjidl.h:503:9 */

type IDropTargetHelper = IDropTargetHelper1 /* shobjidl.h:503:37 */

type IDragSourceHelper1 = struct{ FlpVtbl uintptr } /* shobjidl.h:511:9 */

type IDragSourceHelper = IDragSourceHelper1 /* shobjidl.h:511:37 */

type IShellLinkA1 = struct{ FlpVtbl uintptr } /* shobjidl.h:527:9 */

type IShellLinkA = IShellLinkA1 /* shobjidl.h:527:31 */

type IShellLinkW1 = struct{ FlpVtbl uintptr } /* shobjidl.h:535:9 */

type IShellLinkW = IShellLinkW1 /* shobjidl.h:535:31 */

type IShellLinkDataList1 = struct{ FlpVtbl uintptr } /* shobjidl.h:543:9 */

type IShellLinkDataList = IShellLinkDataList1 /* shobjidl.h:543:38 */

type IResolveShellLink1 = struct{ FlpVtbl uintptr } /* shobjidl.h:551:9 */

type IResolveShellLink = IResolveShellLink1 /* shobjidl.h:551:37 */

type IActionProgressDialog1 = struct{ FlpVtbl uintptr } /* shobjidl.h:559:9 */

type IActionProgressDialog = IActionProgressDialog1 /* shobjidl.h:559:41 */

type IHWEventHandler1 = struct{ FlpVtbl uintptr } /* shobjidl.h:567:9 */

type IHWEventHandler = IHWEventHandler1 /* shobjidl.h:567:35 */

type IHWEventHandler21 = struct{ FlpVtbl uintptr } /* shobjidl.h:575:9 */

type IHWEventHandler2 = IHWEventHandler21 /* shobjidl.h:575:36 */

type IQueryCancelAutoPlay1 = struct{ FlpVtbl uintptr } /* shobjidl.h:583:9 */

type IQueryCancelAutoPlay = IQueryCancelAutoPlay1 /* shobjidl.h:583:40 */

type IActionProgress1 = struct{ FlpVtbl uintptr } /* shobjidl.h:599:9 */

type IActionProgress = IActionProgress1 /* shobjidl.h:599:35 */

type IShellExtInit1 = struct{ FlpVtbl uintptr } /* shobjidl.h:607:9 */

type IShellExtInit = IShellExtInit1 /* shobjidl.h:607:33 */

type IShellPropSheetExt1 = struct{ FlpVtbl uintptr } /* shobjidl.h:615:9 */

type IShellPropSheetExt = IShellPropSheetExt1 /* shobjidl.h:615:38 */

type IRemoteComputer1 = struct{ FlpVtbl uintptr } /* shobjidl.h:623:9 */

type IRemoteComputer = IRemoteComputer1 /* shobjidl.h:623:35 */

type IQueryContinue1 = struct{ FlpVtbl uintptr } /* shobjidl.h:631:9 */

type IQueryContinue = IQueryContinue1 /* shobjidl.h:631:34 */

type IObjectWithCancelEvent1 = struct{ FlpVtbl uintptr } /* shobjidl.h:639:9 */

type IObjectWithCancelEvent = IObjectWithCancelEvent1 /* shobjidl.h:639:42 */

type IUserNotification1 = struct{ FlpVtbl uintptr } /* shobjidl.h:647:9 */

type IUserNotification = IUserNotification1 /* shobjidl.h:647:37 */

type IUserNotificationCallback1 = struct{ FlpVtbl uintptr } /* shobjidl.h:655:9 */

type IUserNotificationCallback = IUserNotificationCallback1 /* shobjidl.h:655:45 */

type IUserNotification21 = struct{ FlpVtbl uintptr } /* shobjidl.h:663:9 */

type IUserNotification2 = IUserNotification21 /* shobjidl.h:663:38 */

type IItemNameLimits1 = struct{ FlpVtbl uintptr } /* shobjidl.h:671:9 */

type IItemNameLimits = IItemNameLimits1 /* shobjidl.h:671:35 */

type IExtractImage1 = struct{ FlpVtbl uintptr } /* shobjidl.h:687:9 */

type IExtractImage = IExtractImage1 /* shobjidl.h:687:33 */

type IExtractImage21 = struct{ FlpVtbl uintptr } /* shobjidl.h:695:9 */

type IExtractImage2 = IExtractImage21 /* shobjidl.h:695:34 */

type IThumbnailHandlerFactory1 = struct{ FlpVtbl uintptr } /* shobjidl.h:703:9 */

type IThumbnailHandlerFactory = IThumbnailHandlerFactory1 /* shobjidl.h:703:44 */

type IParentAndItem1 = struct{ FlpVtbl uintptr } /* shobjidl.h:711:9 */

type IParentAndItem = IParentAndItem1 /* shobjidl.h:711:34 */

type IDockingWindow1 = struct{ FlpVtbl uintptr } /* shobjidl.h:719:9 */

type IDockingWindow = IDockingWindow1 /* shobjidl.h:719:34 */

type IDeskBand1 = struct{ FlpVtbl uintptr } /* shobjidl.h:727:9 */

type IDeskBand = IDeskBand1 /* shobjidl.h:727:29 */

type ITaskbarList1 = struct{ FlpVtbl uintptr } /* shobjidl.h:751:9 */

type ITaskbarList = ITaskbarList1 /* shobjidl.h:751:32 */

type ITaskbarList21 = struct{ FlpVtbl uintptr } /* shobjidl.h:759:9 */

type ITaskbarList2 = ITaskbarList21 /* shobjidl.h:759:33 */

type ITaskbarList31 = struct{ FlpVtbl uintptr } /* shobjidl.h:767:9 */

type ITaskbarList3 = ITaskbarList31 /* shobjidl.h:767:33 */

type ITaskbarList41 = struct{ FlpVtbl uintptr } /* shobjidl.h:775:9 */

type ITaskbarList4 = ITaskbarList41 /* shobjidl.h:775:33 */

type IStartMenuPinnedList1 = struct{ FlpVtbl uintptr } /* shobjidl.h:783:9 */

type IStartMenuPinnedList = IStartMenuPinnedList1 /* shobjidl.h:783:40 */

type ICDBurn1 = struct{ FlpVtbl uintptr } /* shobjidl.h:791:9 */

type ICDBurn = ICDBurn1 /* shobjidl.h:791:27 */

type IWizardSite1 = struct{ FlpVtbl uintptr } /* shobjidl.h:799:9 */

type IWizardSite = IWizardSite1 /* shobjidl.h:799:31 */

type IWizardExtension1 = struct{ FlpVtbl uintptr } /* shobjidl.h:807:9 */

type IWizardExtension = IWizardExtension1 /* shobjidl.h:807:36 */

type IWebWizardExtension1 = struct{ FlpVtbl uintptr } /* shobjidl.h:815:9 */

type IWebWizardExtension = IWebWizardExtension1 /* shobjidl.h:815:39 */

type IPublishingWizard1 = struct{ FlpVtbl uintptr } /* shobjidl.h:823:9 */

type IPublishingWizard = IPublishingWizard1 /* shobjidl.h:823:37 */

type IFolderViewHost1 = struct{ FlpVtbl uintptr } /* shobjidl.h:831:9 */

type IFolderViewHost = IFolderViewHost1 /* shobjidl.h:831:35 */

type IResultsFolder1 = struct{ FlpVtbl uintptr } /* shobjidl.h:863:9 */

type IResultsFolder = IResultsFolder1 /* shobjidl.h:863:34 */

type INamespaceWalkCB1 = struct{ FlpVtbl uintptr } /* shobjidl.h:911:9 */

type INamespaceWalkCB = INamespaceWalkCB1 /* shobjidl.h:911:36 */

type INamespaceWalk1 = struct{ FlpVtbl uintptr } /* shobjidl.h:927:9 */

type INamespaceWalk = INamespaceWalk1 /* shobjidl.h:927:34 */

type IAutoCompleteDropDown1 = struct{ FlpVtbl uintptr } /* shobjidl.h:935:9 */

type IAutoCompleteDropDown = IAutoCompleteDropDown1 /* shobjidl.h:935:41 */

type IBandSite1 = struct{ FlpVtbl uintptr } /* shobjidl.h:943:9 */

type IBandSite = IBandSite1 /* shobjidl.h:943:29 */

type IModalWindow1 = struct{ FlpVtbl uintptr } /* shobjidl.h:951:9 */

type IModalWindow = IModalWindow1 /* shobjidl.h:951:32 */

type ICDBurnExt1 = struct{ FlpVtbl uintptr } /* shobjidl.h:959:9 */

type ICDBurnExt = ICDBurnExt1 /* shobjidl.h:959:30 */

type IContextMenuSite1 = struct{ FlpVtbl uintptr } /* shobjidl.h:967:9 */

type IContextMenuSite = IContextMenuSite1 /* shobjidl.h:967:36 */

type IEnumReadyCallback1 = struct{ FlpVtbl uintptr } /* shobjidl.h:975:9 */

type IEnumReadyCallback = IEnumReadyCallback1 /* shobjidl.h:975:38 */

type IEnumerableView1 = struct{ FlpVtbl uintptr } /* shobjidl.h:983:9 */

type IEnumerableView = IEnumerableView1 /* shobjidl.h:983:35 */

type IInsertItem1 = struct{ FlpVtbl uintptr } /* shobjidl.h:991:9 */

type IInsertItem = IInsertItem1 /* shobjidl.h:991:31 */

type IMenuBand1 = struct{ FlpVtbl uintptr } /* shobjidl.h:999:9 */

type IMenuBand = IMenuBand1 /* shobjidl.h:999:29 */

type IFolderBandPriv1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1007:9 */

type IFolderBandPriv = IFolderBandPriv1 /* shobjidl.h:1007:35 */

type IRegTreeItem1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1015:9 */

type IRegTreeItem = IRegTreeItem1 /* shobjidl.h:1015:32 */

type IImageRecompress1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1023:9 */

type IImageRecompress = IImageRecompress1 /* shobjidl.h:1023:36 */

type IDeskBar1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1031:9 */

type IDeskBar = IDeskBar1 /* shobjidl.h:1031:28 */

type IMenuPopup1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1039:9 */

type IMenuPopup = IMenuPopup1 /* shobjidl.h:1039:30 */

type IDelegateFolder1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1127:9 */

type IDelegateFolder = IDelegateFolder1 /* shobjidl.h:1127:35 */

type IBrowserFrameOptions1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1135:9 */

type IBrowserFrameOptions = IBrowserFrameOptions1 /* shobjidl.h:1135:40 */

type IShellMenuCallback1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1159:9 */

type IShellMenuCallback = IShellMenuCallback1 /* shobjidl.h:1159:38 */

type IShellMenu1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1167:9 */

type IShellMenu = IShellMenu1 /* shobjidl.h:1167:30 */

type IShellRunDll1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1175:9 */

type IShellRunDll = IShellRunDll1 /* shobjidl.h:1175:32 */

type IPreviousVersionsInfo1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1207:9 */

type IPreviousVersionsInfo = IPreviousVersionsInfo1 /* shobjidl.h:1207:41 */

type IDestinationStreamFactory1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1287:9 */

type IDestinationStreamFactory = IDestinationStreamFactory1 /* shobjidl.h:1287:45 */

type INewMenuClient1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1295:9 */

type INewMenuClient = INewMenuClient1 /* shobjidl.h:1295:34 */

type INameSpaceTreeControl1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1319:9 */

type INameSpaceTreeControl = INameSpaceTreeControl1 /* shobjidl.h:1319:41 */

type INameSpaceTreeControl21 = struct{ FlpVtbl uintptr } /* shobjidl.h:1327:9 */

type INameSpaceTreeControl2 = INameSpaceTreeControl21 /* shobjidl.h:1327:42 */

type INameSpaceTreeControlEvents1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1335:9 */

type INameSpaceTreeControlEvents = INameSpaceTreeControlEvents1 /* shobjidl.h:1335:47 */

type INameSpaceTreeControlDropHandler1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1343:9 */

type INameSpaceTreeControlDropHandler = INameSpaceTreeControlDropHandler1 /* shobjidl.h:1343:52 */

type INameSpaceTreeAccessible1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1351:9 */

type INameSpaceTreeAccessible = INameSpaceTreeAccessible1 /* shobjidl.h:1351:44 */

type INameSpaceTreeControlCustomDraw1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1359:9 */

type INameSpaceTreeControlCustomDraw = INameSpaceTreeControlCustomDraw1 /* shobjidl.h:1359:51 */

type IPreviewHandler1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1375:9 */

type IPreviewHandler = IPreviewHandler1 /* shobjidl.h:1375:35 */

type IPreviewHandlerFrame1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1383:9 */

type IPreviewHandlerFrame = IPreviewHandlerFrame1 /* shobjidl.h:1383:40 */

type IDefaultExtractIconInit1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1423:9 */

type IDefaultExtractIconInit = IDefaultExtractIconInit1 /* shobjidl.h:1423:43 */

type IExplorerCommand1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1431:9 */

type IExplorerCommand = IExplorerCommand1 /* shobjidl.h:1431:36 */

type IExplorerCommandState1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1439:9 */

type IExplorerCommandState = IExplorerCommandState1 /* shobjidl.h:1439:41 */

type IInitializeCommand1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1447:9 */

type IInitializeCommand = IInitializeCommand1 /* shobjidl.h:1447:38 */

type IEnumExplorerCommand1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1455:9 */

type IEnumExplorerCommand = IEnumExplorerCommand1 /* shobjidl.h:1455:40 */

type IExplorerCommandProvider1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1463:9 */

type IExplorerCommandProvider = IExplorerCommandProvider1 /* shobjidl.h:1463:44 */

type IInitializeNetworkFolder1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1471:9 */

type IInitializeNetworkFolder = IInitializeNetworkFolder1 /* shobjidl.h:1471:44 */

type IOpenControlPanel1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1479:9 */

type IOpenControlPanel = IOpenControlPanel1 /* shobjidl.h:1479:37 */

type IComputerInfoChangeNotify1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1487:9 */

type IComputerInfoChangeNotify = IComputerInfoChangeNotify1 /* shobjidl.h:1487:45 */

type IFileSystemBindData1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1495:9 */

type IFileSystemBindData = IFileSystemBindData1 /* shobjidl.h:1495:39 */

type IFileSystemBindData21 = struct{ FlpVtbl uintptr } /* shobjidl.h:1503:9 */

type IFileSystemBindData2 = IFileSystemBindData21 /* shobjidl.h:1503:40 */

type IDesktopGadget1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1559:9 */

type IDesktopGadget = IDesktopGadget1 /* shobjidl.h:1559:34 */

type IHomeGroup1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1575:9 */

type IHomeGroup = IHomeGroup1 /* shobjidl.h:1575:30 */

type IInitializeWithPropertyStore1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1583:9 */

type IInitializeWithPropertyStore = IInitializeWithPropertyStore1 /* shobjidl.h:1583:48 */

type IOpenSearchSource1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1591:9 */

type IOpenSearchSource = IOpenSearchSource1 /* shobjidl.h:1591:37 */

type IShellLibrary1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1599:9 */

type IShellLibrary = IShellLibrary1 /* shobjidl.h:1599:33 */

type IPlaybackManagerEvents1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1607:9 */

type IPlaybackManagerEvents = IPlaybackManagerEvents1 /* shobjidl.h:1607:42 */

type IPlaybackManager1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1615:9 */

type IPlaybackManager = IPlaybackManager1 /* shobjidl.h:1615:36 */

type IDefaultFolderMenuInitialize1 = struct{ FlpVtbl uintptr } /* shobjidl.h:1623:9 */

type IDefaultFolderMenuInitialize = IDefaultFolderMenuInitialize1 /* shobjidl.h:1623:48 */

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oleidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oaidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/docobj.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.5 from shtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/servprov.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/comcat.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IEnumGUID1 = struct{ FlpVtbl uintptr } /* comcat.h:23:9 */

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oleidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oaidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/docobj.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.5 from shtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/servprov.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/comcat.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IEnumGUID = IEnumGUID1 /* comcat.h:23:29 */

type IEnumCATEGORYINFO1 = struct{ FlpVtbl uintptr } /* comcat.h:31:9 */

type IEnumCATEGORYINFO = IEnumCATEGORYINFO1 /* comcat.h:31:37 */

type ICatRegister1 = struct{ FlpVtbl uintptr } /* comcat.h:39:9 */

type ICatRegister = ICatRegister1 /* comcat.h:39:32 */

type ICatInformation1 = struct{ FlpVtbl uintptr } /* comcat.h:47:9 */

type ICatInformation = ICatInformation1 /* comcat.h:47:35 */

type CATID = GUID       /* comcat.h:108:14 */
type REFCATID = uintptr /* comcat.h:109:9 */

// ****************************************************************************
//
// IEnumGUID interface

type LPENUMGUID = uintptr /* comcat.h:151:19 */
type IEnumGUIDVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* comcat.h:23:9 */

type IEnumGUIDVtbl = IEnumGUIDVtbl1 /* comcat.h:210:3 */

// ****************************************************************************
//
// IEnumCATEGORYINFO interface

type LPENUMCATEGORYINFO = uintptr /* comcat.h:291:27 */

type TagCATEGORYINFO = struct {
	Fcatid         CATID
	Flcid          LCID
	FszDescription [128]OLECHAR
} /* comcat.h:293:9 */

type CATEGORYINFO = TagCATEGORYINFO /* comcat.h:297:3 */
type LPCATEGORYINFO = uintptr       /* comcat.h:298:32 */
type IEnumCATEGORYINFOVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* comcat.h:31:9 */

type IEnumCATEGORYINFOVtbl = IEnumCATEGORYINFOVtbl1 /* comcat.h:358:3 */

// ****************************************************************************
//
// ICatRegister interface

type LPCATREGISTER = uintptr /* comcat.h:417:22 */
type ICatRegisterVtbl1 = struct {
	FQueryInterface                uintptr
	FAddRef                        uintptr
	FRelease                       uintptr
	FRegisterCategories            uintptr
	FUnRegisterCategories          uintptr
	FRegisterClassImplCategories   uintptr
	FUnRegisterClassImplCategories uintptr
	FRegisterClassReqCategories    uintptr
	FUnRegisterClassReqCategories  uintptr
} /* comcat.h:39:9 */

type ICatRegisterVtbl = ICatRegisterVtbl1 /* comcat.h:508:3 */

// ****************************************************************************
//
// ICatInformation interface

type LPCATINFORMATION = uintptr /* comcat.h:575:25 */
type ICatInformationVtbl1 = struct {
	FQueryInterface            uintptr
	FAddRef                    uintptr
	FRelease                   uintptr
	FEnumCategories            uintptr
	FGetCategoryDesc           uintptr
	FEnumClassesOfCategories   uintptr
	FIsClassOfCategories       uintptr
	FEnumImplCategoriesOfClass uintptr
	FEnumReqCategoriesOfClass  uintptr
} /* comcat.h:47:9 */

type ICatInformationVtbl = ICatInformationVtbl1 /* comcat.h:672:3 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/propidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
//** Autogenerated by WIDL 4.12.1 from include/msxml.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/wtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/propsys.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IInitializeWithFile1 = struct{ FlpVtbl uintptr } /* propsys.h:23:9 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/propidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
//** Autogenerated by WIDL 4.12.1 from include/msxml.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/wtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/propsys.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IInitializeWithFile = IInitializeWithFile1 /* propsys.h:23:39 */

type IInitializeWithStream1 = struct{ FlpVtbl uintptr } /* propsys.h:31:9 */

type IInitializeWithStream = IInitializeWithStream1 /* propsys.h:31:41 */

type IPropertyStore1 = struct{ FlpVtbl uintptr } /* propsys.h:39:9 */

type IPropertyStore = IPropertyStore1 /* propsys.h:39:34 */

type INamedPropertyStore1 = struct{ FlpVtbl uintptr } /* propsys.h:47:9 */

type INamedPropertyStore = INamedPropertyStore1 /* propsys.h:47:39 */

type IObjectWithPropertyKey1 = struct{ FlpVtbl uintptr } /* propsys.h:55:9 */

type IObjectWithPropertyKey = IObjectWithPropertyKey1 /* propsys.h:55:42 */

type IPropertyChange1 = struct{ FlpVtbl uintptr } /* propsys.h:63:9 */

type IPropertyChange = IPropertyChange1 /* propsys.h:63:35 */

type IPropertyChangeArray1 = struct{ FlpVtbl uintptr } /* propsys.h:71:9 */

type IPropertyChangeArray = IPropertyChangeArray1 /* propsys.h:71:40 */

type IPropertyStoreCapabilities1 = struct{ FlpVtbl uintptr } /* propsys.h:79:9 */

type IPropertyStoreCapabilities = IPropertyStoreCapabilities1 /* propsys.h:79:46 */

type IPropertyStoreCache1 = struct{ FlpVtbl uintptr } /* propsys.h:87:9 */

type IPropertyStoreCache = IPropertyStoreCache1 /* propsys.h:87:39 */

type IPropertyEnumType1 = struct{ FlpVtbl uintptr } /* propsys.h:95:9 */

type IPropertyEnumType = IPropertyEnumType1 /* propsys.h:95:37 */

type IPropertyEnumType21 = struct{ FlpVtbl uintptr } /* propsys.h:103:9 */

type IPropertyEnumType2 = IPropertyEnumType21 /* propsys.h:103:38 */

type IPropertyEnumTypeList1 = struct{ FlpVtbl uintptr } /* propsys.h:111:9 */

type IPropertyEnumTypeList = IPropertyEnumTypeList1 /* propsys.h:111:41 */

type IPropertyDescription1 = struct{ FlpVtbl uintptr } /* propsys.h:119:9 */

type IPropertyDescription = IPropertyDescription1 /* propsys.h:119:40 */

type IPropertyDescription21 = struct{ FlpVtbl uintptr } /* propsys.h:127:9 */

type IPropertyDescription2 = IPropertyDescription21 /* propsys.h:127:41 */

type IPropertyDescriptionAliasInfo1 = struct{ FlpVtbl uintptr } /* propsys.h:135:9 */

type IPropertyDescriptionAliasInfo = IPropertyDescriptionAliasInfo1 /* propsys.h:135:49 */

type IPropertyDescriptionSearchInfo1 = struct{ FlpVtbl uintptr } /* propsys.h:143:9 */

type IPropertyDescriptionSearchInfo = IPropertyDescriptionSearchInfo1 /* propsys.h:143:50 */

type IPropertyDescriptionRelatedPropertyInfo1 = struct{ FlpVtbl uintptr } /* propsys.h:151:9 */

type IPropertyDescriptionRelatedPropertyInfo = IPropertyDescriptionRelatedPropertyInfo1 /* propsys.h:151:59 */

type IPropertySystem1 = struct{ FlpVtbl uintptr } /* propsys.h:159:9 */

type IPropertySystem = IPropertySystem1 /* propsys.h:159:35 */

type IPropertyDescriptionList1 = struct{ FlpVtbl uintptr } /* propsys.h:167:9 */

type IPropertyDescriptionList = IPropertyDescriptionList1 /* propsys.h:167:44 */

type IPropertyStoreFactory1 = struct{ FlpVtbl uintptr } /* propsys.h:175:9 */

type IPropertyStoreFactory = IPropertyStoreFactory1 /* propsys.h:175:41 */

type IDelayedPropertyStoreFactory1 = struct{ FlpVtbl uintptr } /* propsys.h:183:9 */

type IDelayedPropertyStoreFactory = IDelayedPropertyStoreFactory1 /* propsys.h:183:48 */

type IPersistSerializedPropStorage1 = struct{ FlpVtbl uintptr } /* propsys.h:191:9 */

type IPersistSerializedPropStorage = IPersistSerializedPropStorage1 /* propsys.h:191:49 */

type IPersistSerializedPropStorage21 = struct{ FlpVtbl uintptr } /* propsys.h:199:9 */

type IPersistSerializedPropStorage2 = IPersistSerializedPropStorage21 /* propsys.h:199:50 */

type IPropertySystemChangeNotify1 = struct{ FlpVtbl uintptr } /* propsys.h:207:9 */

type IPropertySystemChangeNotify = IPropertySystemChangeNotify1 /* propsys.h:207:47 */

type ICreateObject1 = struct{ FlpVtbl uintptr } /* propsys.h:215:9 */

type ICreateObject = ICreateObject1 /* propsys.h:215:33 */

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oleidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/ocidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.5 from shtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/structuredquerycondition.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IRichChunk1 = struct{ FlpVtbl uintptr } /* structuredquerycondition.h:23:9 */

// Headers for imported files

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/oleidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/ocidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.5 from shtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/structuredquerycondition.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IRichChunk = IRichChunk1 /* structuredquerycondition.h:23:30 */

type ICondition1 = struct{ FlpVtbl uintptr } /* structuredquerycondition.h:31:9 */

type ICondition = ICondition1 /* structuredquerycondition.h:31:30 */

type ICondition21 = struct{ FlpVtbl uintptr } /* structuredquerycondition.h:39:9 */

type ICondition2 = ICondition21 /* structuredquerycondition.h:39:31 */

// Headers for imported files

//** Autogenerated by WIDL 4.12.1 from include/oaidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/ocidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 1.6 from include/objidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

//** Autogenerated by WIDL 4.12.1 from include/propidl.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type CONDITION_TYPE = uint32 /* structuredquerycondition.h:68:3 */

type CONDITION_OPERATION = uint32 /* structuredquerycondition.h:86:3 */
type IRichChunkVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetData        uintptr
} /* structuredquerycondition.h:23:9 */

type IRichChunkVtbl = IRichChunkVtbl1 /* structuredquerycondition.h:135:3 */
type IConditionVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetClassID            uintptr
	FIsDirty               uintptr
	FLoad                  uintptr
	FSave                  uintptr
	FGetSizeMax            uintptr
	FGetConditionType      uintptr
	FGetSubConditions      uintptr
	FGetComparisonInfo     uintptr
	FGetValueType          uintptr
	FGetValueNormalization uintptr
	FGetInputTerms         uintptr
	FClone                 uintptr
} /* structuredquerycondition.h:31:9 */

type IConditionVtbl = IConditionVtbl1 /* structuredquerycondition.h:310:3 */
type ICondition2Vtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetClassID            uintptr
	FIsDirty               uintptr
	FLoad                  uintptr
	FSave                  uintptr
	FGetSizeMax            uintptr
	FGetConditionType      uintptr
	FGetSubConditions      uintptr
	FGetComparisonInfo     uintptr
	FGetValueType          uintptr
	FGetValueNormalization uintptr
	FGetInputTerms         uintptr
	FClone                 uintptr
	FGetLocale             uintptr
	FGetLeafConditionInfo  uintptr
} /* structuredquerycondition.h:39:9 */

type ICondition2Vtbl = ICondition2Vtbl1 /* structuredquerycondition.h:543:3 */
type IInitializeWithFileVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
} /* propsys.h:23:9 */

type IInitializeWithFileVtbl = IInitializeWithFileVtbl1 /* propsys.h:317:3 */
type IInitializeWithStreamVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
} /* propsys.h:31:9 */

type IInitializeWithStreamVtbl = IInitializeWithStreamVtbl1 /* propsys.h:397:3 */
type IPropertyStoreVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetCount       uintptr
	FGetAt          uintptr
	FGetValue       uintptr
	FSetValue       uintptr
	FCommit         uintptr
} /* propsys.h:39:9 */

type IPropertyStoreVtbl = IPropertyStoreVtbl1 /* propsys.h:527:3 */

type LPPROPERTYSTORE = uintptr /* propsys.h:581:24 */
type INamedPropertyStoreVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetNamedValue  uintptr
	FSetNamedValue  uintptr
	FGetNameCount   uintptr
	FGetNameAt      uintptr
} /* propsys.h:47:9 */

type INamedPropertyStoreVtbl = INamedPropertyStoreVtbl1 /* propsys.h:652:3 */

type GETPROPERTYSTOREFLAGS = uint32 /* propsys.h:714:3 */
type IObjectWithPropertyKeyVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetPropertyKey uintptr
	FGetPropertyKey uintptr
} /* propsys.h:55:9 */

type IObjectWithPropertyKeyVtbl = IObjectWithPropertyKeyVtbl1 /* propsys.h:765:3 */

type PKA_FLAGS = uint32 /* propsys.h:811:3 */
type IPropertyChangeVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FSetPropertyKey     uintptr
	FGetPropertyKey     uintptr
	FApplyToPropVariant uintptr
} /* propsys.h:63:9 */

type IPropertyChangeVtbl = IPropertyChangeVtbl1 /* propsys.h:864:3 */
type IPropertyChangeArrayVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FGetCount        uintptr
	FGetAt           uintptr
	FInsertAt        uintptr
	FAppend          uintptr
	FAppendOrReplace uintptr
	FRemoveAt        uintptr
	FIsKeyInArray    uintptr
} /* propsys.h:71:9 */

type IPropertyChangeArrayVtbl = IPropertyChangeArrayVtbl1 /* propsys.h:1000:3 */
type IPropertyStoreCapabilitiesVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FIsPropertyWritable uintptr
} /* propsys.h:79:9 */

type IPropertyStoreCapabilitiesVtbl = IPropertyStoreCapabilitiesVtbl1 /* propsys.h:1102:3 */

// ****************************************************************************
//
// IPropertyStoreCache interface

type PSC_STATE = uint32 /* propsys.h:1151:3 */
type IPropertyStoreCacheVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetCount         uintptr
	FGetAt            uintptr
	FGetValue         uintptr
	FSetValue         uintptr
	FCommit           uintptr
	FGetState         uintptr
	FGetValueAndState uintptr
	FSetState         uintptr
	FSetValueAndState uintptr
} /* propsys.h:87:9 */

type IPropertyStoreCacheVtbl = IPropertyStoreCacheVtbl1 /* propsys.h:1243:3 */

// ****************************************************************************
//
// IPropertyEnumType interface

type PROPENUMTYPE = uint32 /* propsys.h:1326:3 */
type IPropertyEnumTypeVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetEnumType      uintptr
	FGetValue         uintptr
	FGetRangeMinValue uintptr
	FGetRangeSetValue uintptr
	FGetDisplayText   uintptr
} /* propsys.h:95:9 */

type IPropertyEnumTypeVtbl = IPropertyEnumTypeVtbl1 /* propsys.h:1390:3 */
type IPropertyEnumType2Vtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FGetEnumType       uintptr
	FGetValue          uintptr
	FGetRangeMinValue  uintptr
	FGetRangeSetValue  uintptr
	FGetDisplayText    uintptr
	FGetImageReference uintptr
} /* propsys.h:103:9 */

type IPropertyEnumType2Vtbl = IPropertyEnumType2Vtbl1 /* propsys.h:1505:3 */
type IPropertyEnumTypeListVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FGetCount          uintptr
	FGetAt             uintptr
	FGetConditionAt    uintptr
	FFindMatchingIndex uintptr
} /* propsys.h:111:9 */

type IPropertyEnumTypeListVtbl = IPropertyEnumTypeListVtbl1 /* propsys.h:1636:3 */

// ****************************************************************************
//
// IPropertyDescription interface

type PROPDESC_TYPE_FLAGS = uint32 /* propsys.h:1707:3 */

type PROPDESC_VIEW_FLAGS = uint32 /* propsys.h:1726:3 */

type PROPDESC_DISPLAYTYPE = uint32 /* propsys.h:1736:3 */

type PROPDESC_GROUPING_RANGE = uint32 /* propsys.h:1746:3 */

type PROPDESC_FORMAT_FLAGS = uint32 /* propsys.h:1764:3 */

type PROPDESC_SORTDESCRIPTION = uint32 /* propsys.h:1774:3 */

type PROPDESC_RELATIVEDESCRIPTION_TYPE = uint32 /* propsys.h:1788:3 */

type PROPDESC_AGGREGATION_TYPE = uint32 /* propsys.h:1799:3 */

type PROPDESC_CONDITION_TYPE = uint32 /* propsys.h:1808:3 */
type IPropertyDescriptionVtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FGetPropertyKey             uintptr
	FGetCanonicalName           uintptr
	FGetPropertyType            uintptr
	FGetDisplayName             uintptr
	FGetEditInvitation          uintptr
	FGetTypeFlags               uintptr
	FGetViewFlags               uintptr
	FGetDefaultColumnWidth      uintptr
	FGetDisplayType             uintptr
	FGetColumnState             uintptr
	FGetGroupingRange           uintptr
	FGetRelativeDescriptionType uintptr
	FGetRelativeDescription     uintptr
	FGetSortDescription         uintptr
	FGetSortDescriptionLabel    uintptr
	FGetAggregationType         uintptr
	FGetConditionType           uintptr
	FGetEnumTypeList            uintptr
	FCoerceToCanonicalValue     uintptr
	FFormatForDisplay           uintptr
	FIsValueCanonical           uintptr
} /* propsys.h:119:9 */

type IPropertyDescriptionVtbl = IPropertyDescriptionVtbl1 /* propsys.h:2002:3 */
type IPropertyDescription2Vtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FGetPropertyKey             uintptr
	FGetCanonicalName           uintptr
	FGetPropertyType            uintptr
	FGetDisplayName             uintptr
	FGetEditInvitation          uintptr
	FGetTypeFlags               uintptr
	FGetViewFlags               uintptr
	FGetDefaultColumnWidth      uintptr
	FGetDisplayType             uintptr
	FGetColumnState             uintptr
	FGetGroupingRange           uintptr
	FGetRelativeDescriptionType uintptr
	FGetRelativeDescription     uintptr
	FGetSortDescription         uintptr
	FGetSortDescriptionLabel    uintptr
	FGetAggregationType         uintptr
	FGetConditionType           uintptr
	FGetEnumTypeList            uintptr
	FCoerceToCanonicalValue     uintptr
	FFormatForDisplay           uintptr
	FIsValueCanonical           uintptr
	FGetImageReferenceForValue  uintptr
} /* propsys.h:127:9 */

type IPropertyDescription2Vtbl = IPropertyDescription2Vtbl1 /* propsys.h:2272:3 */
type IPropertyDescriptionAliasInfoVtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FGetPropertyKey             uintptr
	FGetCanonicalName           uintptr
	FGetPropertyType            uintptr
	FGetDisplayName             uintptr
	FGetEditInvitation          uintptr
	FGetTypeFlags               uintptr
	FGetViewFlags               uintptr
	FGetDefaultColumnWidth      uintptr
	FGetDisplayType             uintptr
	FGetColumnState             uintptr
	FGetGroupingRange           uintptr
	FGetRelativeDescriptionType uintptr
	FGetRelativeDescription     uintptr
	FGetSortDescription         uintptr
	FGetSortDescriptionLabel    uintptr
	FGetAggregationType         uintptr
	FGetConditionType           uintptr
	FGetEnumTypeList            uintptr
	FCoerceToCanonicalValue     uintptr
	FFormatForDisplay           uintptr
	FIsValueCanonical           uintptr
	FGetSortByAlias             uintptr
	FGetAdditionalSortByAliases uintptr
} /* propsys.h:135:9 */

type IPropertyDescriptionAliasInfoVtbl = IPropertyDescriptionAliasInfoVtbl1 /* propsys.h:2541:3 */

// ****************************************************************************
//
// IPropertyDescriptionSearchInfo interface

type PROPDESC_SEARCHINFO_FLAGS = uint32 /* propsys.h:2682:3 */

type PROPDESC_COLUMNINDEX_TYPE = uint32 /* propsys.h:2693:3 */
type IPropertyDescriptionSearchInfoVtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FGetPropertyKey             uintptr
	FGetCanonicalName           uintptr
	FGetPropertyType            uintptr
	FGetDisplayName             uintptr
	FGetEditInvitation          uintptr
	FGetTypeFlags               uintptr
	FGetViewFlags               uintptr
	FGetDefaultColumnWidth      uintptr
	FGetDisplayType             uintptr
	FGetColumnState             uintptr
	FGetGroupingRange           uintptr
	FGetRelativeDescriptionType uintptr
	FGetRelativeDescription     uintptr
	FGetSortDescription         uintptr
	FGetSortDescriptionLabel    uintptr
	FGetAggregationType         uintptr
	FGetConditionType           uintptr
	FGetEnumTypeList            uintptr
	FCoerceToCanonicalValue     uintptr
	FFormatForDisplay           uintptr
	FIsValueCanonical           uintptr
	FGetSearchInfoFlags         uintptr
	FGetColumnIndexType         uintptr
	FGetProjectionString        uintptr
	FGetMaxSize                 uintptr
} /* propsys.h:143:9 */

type IPropertyDescriptionSearchInfoVtbl = IPropertyDescriptionSearchInfoVtbl1 /* propsys.h:2844:3 */
type IPropertyDescriptionRelatedPropertyInfoVtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FGetPropertyKey             uintptr
	FGetCanonicalName           uintptr
	FGetPropertyType            uintptr
	FGetDisplayName             uintptr
	FGetEditInvitation          uintptr
	FGetTypeFlags               uintptr
	FGetViewFlags               uintptr
	FGetDefaultColumnWidth      uintptr
	FGetDisplayType             uintptr
	FGetColumnState             uintptr
	FGetGroupingRange           uintptr
	FGetRelativeDescriptionType uintptr
	FGetRelativeDescription     uintptr
	FGetSortDescription         uintptr
	FGetSortDescriptionLabel    uintptr
	FGetAggregationType         uintptr
	FGetConditionType           uintptr
	FGetEnumTypeList            uintptr
	FCoerceToCanonicalValue     uintptr
	FFormatForDisplay           uintptr
	FIsValueCanonical           uintptr
	FGetRelatedProperty         uintptr
} /* propsys.h:151:9 */

type IPropertyDescriptionRelatedPropertyInfoVtbl = IPropertyDescriptionRelatedPropertyInfoVtbl1 /* propsys.h:3118:3 */

type PROPDESC_ENUMFILTER = uint32 /* propsys.h:3250:3 */
type IPropertySystemVtbl1 = struct {
	FQueryInterface                       uintptr
	FAddRef                               uintptr
	FRelease                              uintptr
	FGetPropertyDescription               uintptr
	FGetPropertyDescriptionByName         uintptr
	FGetPropertyDescriptionListFromString uintptr
	FEnumeratePropertyDescriptions        uintptr
	FFormatForDisplay                     uintptr
	FFormatForDisplayAlloc                uintptr
	FRegisterPropertySchema               uintptr
	FUnregisterPropertySchema             uintptr
	FRefreshPropertySchema                uintptr
} /* propsys.h:159:9 */

type IPropertySystemVtbl = IPropertySystemVtbl1 /* propsys.h:3377:3 */
type IPropertyDescriptionListVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetCount       uintptr
	FGetAt          uintptr
} /* propsys.h:167:9 */

type IPropertyDescriptionListVtbl = IPropertyDescriptionListVtbl1 /* propsys.h:3498:3 */
type IPropertyStoreFactoryVtbl1 = struct {
	FQueryInterface          uintptr
	FAddRef                  uintptr
	FRelease                 uintptr
	FGetPropertyStore        uintptr
	FGetPropertyStoreForKeys uintptr
} /* propsys.h:175:9 */

type IPropertyStoreFactoryVtbl = IPropertyStoreFactoryVtbl1 /* propsys.h:3601:3 */
type IDelayedPropertyStoreFactoryVtbl1 = struct {
	FQueryInterface          uintptr
	FAddRef                  uintptr
	FRelease                 uintptr
	FGetPropertyStore        uintptr
	FGetPropertyStoreForKeys uintptr
	FGetDelayedPropertyStore uintptr
} /* propsys.h:183:9 */

type IDelayedPropertyStoreFactoryVtbl = IDelayedPropertyStoreFactoryVtbl1 /* propsys.h:3705:3 */

type PERSIST_SPROPSTORE_FLAGS = int32   /* propsys.h:3759:13 */
type PUSERIALIZEDPROPSTORAGE = uintptr  /* propsys.h:3761:31 */
type PCUSERIALIZEDPROPSTORAGE = uintptr /* propsys.h:3762:37 */
type IPersistSerializedPropStorageVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FSetFlags           uintptr
	FSetPropertyStorage uintptr
	FGetPropertyStorage uintptr
} /* propsys.h:191:9 */

type IPersistSerializedPropStorageVtbl = IPersistSerializedPropStorageVtbl1 /* propsys.h:3822:3 */
type IPersistSerializedPropStorage2Vtbl1 = struct {
	FQueryInterface           uintptr
	FAddRef                   uintptr
	FRelease                  uintptr
	FSetFlags                 uintptr
	FSetPropertyStorage       uintptr
	FGetPropertyStorage       uintptr
	FGetPropertyStorageSize   uintptr
	FGetPropertyStorageBuffer uintptr
} /* propsys.h:199:9 */

type IPersistSerializedPropStorage2Vtbl = IPersistSerializedPropStorage2Vtbl1 /* propsys.h:3934:3 */
type IPropertySystemChangeNotifyVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FSchemaRefreshed uintptr
} /* propsys.h:207:9 */

type IPropertySystemChangeNotifyVtbl = IPropertySystemChangeNotifyVtbl1 /* propsys.h:4029:3 */
type ICreateObjectVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCreateObject   uintptr
} /* propsys.h:215:9 */

type ICreateObjectVtbl = ICreateObjectVtbl1 /* propsys.h:4113:3 */

// End additional prototypes

//** Autogenerated by WIDL 5.16 from include/objectarray.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IObjectArray1 = struct{ FlpVtbl uintptr } /* objectarray.h:23:9 */

// End additional prototypes

//** Autogenerated by WIDL 5.16 from include/objectarray.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// Forward declarations

type IObjectArray = IObjectArray1 /* objectarray.h:23:32 */

type IObjectCollection1 = struct{ FlpVtbl uintptr } /* objectarray.h:31:9 */

type IObjectCollection = IObjectCollection1 /* objectarray.h:31:37 */
type IObjectArrayVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetCount       uintptr
	FGetAt          uintptr
} /* objectarray.h:23:9 */

type IObjectArrayVtbl = IObjectArrayVtbl1 /* objectarray.h:97:3 */
type IObjectCollectionVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetCount       uintptr
	FGetAt          uintptr
	FAddObject      uintptr
	FAddFromArray   uintptr
	FRemoveObjectAt uintptr
	FClear          uintptr
} /* objectarray.h:31:9 */

type IObjectCollectionVtbl = IObjectCollectionVtbl1 /* objectarray.h:209:3 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/structuredquerycondition.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_CMINVOKECOMMANDINFO = struct {
	FcbSize       DWORD
	FfMask        DWORD
	Fhwnd         HWND
	FlpVerb       LPCSTR
	FlpParameters LPCSTR
	FlpDirectory  LPCSTR
	FnShow        int32
	FdwHotKey     DWORD
	FhIcon        HANDLE
} /* shobjidl.h:2522:9 */

// Begin additional prototypes for all interfaces

// End additional prototypes

//** Autogenerated by WIDL 4.12.1 from include/structuredquerycondition.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type CMINVOKECOMMANDINFO = X_CMINVOKECOMMANDINFO /* shobjidl.h:2532:3 */

type LPCMINVOKECOMMANDINFO = uintptr /* shobjidl.h:2534:29 */
type PCCMINVOKECOMMANDINFO = uintptr /* shobjidl.h:2535:35 */

type X_CMINVOKECOMMANDINFOEX = struct {
	FcbSize        DWORD
	FfMask         DWORD
	Fhwnd          HWND
	FlpVerb        LPCSTR
	FlpParameters  LPCSTR
	FlpDirectory   LPCSTR
	FnShow         int32
	FdwHotKey      DWORD
	FhIcon         HANDLE
	FlpTitle       LPCSTR
	FlpVerbW       LPCWSTR
	FlpParametersW LPCWSTR
	FlpDirectoryW  LPCWSTR
	FlpTitleW      LPCWSTR
	FptInvoke      POINT
} /* shobjidl.h:2537:9 */

type CMINVOKECOMMANDINFOEX = X_CMINVOKECOMMANDINFOEX /* shobjidl.h:2553:3 */

type LPCMINVOKECOMMANDINFOEX = uintptr /* shobjidl.h:2555:31 */
type PCCMINVOKECOMMANDINFOEX = uintptr /* shobjidl.h:2556:37 */
type IContextMenuVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FQueryContextMenu uintptr
	FInvokeCommand    uintptr
	FGetCommandString uintptr
} /* shobjidl.h:23:9 */

type IContextMenuVtbl = IContextMenuVtbl1 /* shobjidl.h:2629:3 */

type LPCONTEXTMENU = uintptr /* shobjidl.h:2674:22 */
type IContextMenu2Vtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FQueryContextMenu uintptr
	FInvokeCommand    uintptr
	FGetCommandString uintptr
	FHandleMenuMsg    uintptr
} /* shobjidl.h:31:9 */

type IContextMenu2Vtbl = IContextMenu2Vtbl1 /* shobjidl.h:2741:3 */

type LPCONTEXTMENU2 = uintptr /* shobjidl.h:2792:23 */
type IContextMenu3Vtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FQueryContextMenu uintptr
	FInvokeCommand    uintptr
	FGetCommandString uintptr
	FHandleMenuMsg    uintptr
	FHandleMenuMsg2   uintptr
} /* shobjidl.h:39:9 */

type IContextMenu3Vtbl = IContextMenu3Vtbl1 /* shobjidl.h:2868:3 */

type LPCONTEXTMENU3 = uintptr /* shobjidl.h:2925:23 */
type IExecuteCommandVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetKeyState    uintptr
	FSetParameters  uintptr
	FSetPosition    uintptr
	FSetShowWindow  uintptr
	FSetNoShowUI    uintptr
	FSetDirectory   uintptr
	FExecute        uintptr
} /* shobjidl.h:47:9 */

type IExecuteCommandVtbl = IExecuteCommandVtbl1 /* shobjidl.h:3008:3 */
type IPersistFolderVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FInitialize     uintptr
} /* shobjidl.h:55:9 */

type IPersistFolderVtbl = IPersistFolderVtbl1 /* shobjidl.h:3115:3 */

type LPPERSISTFOLDER = uintptr /* shobjidl.h:3158:24 */
type IRunnableTaskVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FRun            uintptr
	FKill           uintptr
	FSuspend        uintptr
	FResume         uintptr
	FIsRunning      uintptr
} /* shobjidl.h:63:9 */

type IRunnableTaskVtbl = IRunnableTaskVtbl1 /* shobjidl.h:3230:3 */
type IShellTaskSchedulerVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAddTask        uintptr
	FRemoveTasks    uintptr
	FCountTasks     uintptr
	FStatus         uintptr
} /* shobjidl.h:71:9 */

type IShellTaskSchedulerVtbl = IShellTaskSchedulerVtbl1 /* shobjidl.h:3373:3 */
type IQueryCodePageVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetCodePage    uintptr
	FSetCodePage    uintptr
} /* shobjidl.h:79:9 */

type IQueryCodePageVtbl = IQueryCodePageVtbl1 /* shobjidl.h:3472:3 */
type IPersistFolder2Vtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FInitialize     uintptr
	FGetCurFolder   uintptr
} /* shobjidl.h:87:9 */

type IPersistFolder2Vtbl = IPersistFolder2Vtbl1 /* shobjidl.h:3564:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_PERSIST_FOLDER_TARGET_INFO = struct {
	FpidlTargetFolder    LPITEMIDLIST
	FszTargetParsingName [260]WCHAR
	FszNetworkProvider   [260]WCHAR
	FdwAttributes        DWORD
	Fcsidl               int32
} /* shobjidl.h:3617:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type PERSIST_FOLDER_TARGET_INFO = X_PERSIST_FOLDER_TARGET_INFO /* shobjidl.h:3623:3 */
type IPersistFolder3Vtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetClassID          uintptr
	FInitialize          uintptr
	FGetCurFolder        uintptr
	FInitializeEx        uintptr
	FGetFolderTargetInfo uintptr
} /* shobjidl.h:95:9 */

type IPersistFolder3Vtbl = IPersistFolder3Vtbl1 /* shobjidl.h:3692:3 */
type IPersistIDListVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetClassID     uintptr
	FSetIDList      uintptr
	FGetIDList      uintptr
} /* shobjidl.h:103:9 */

type IPersistIDListVtbl = IPersistIDListVtbl1 /* shobjidl.h:3804:3 */
type IEnumIDListVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* shobjidl.h:111:9 */

type IEnumIDListVtbl = IEnumIDListVtbl1 /* shobjidl.h:3916:3 */

type LPENUMIDLIST = uintptr /* shobjidl.h:3985:21 */
type IEnumFullIDListVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* shobjidl.h:119:9 */

type IEnumFullIDListVtbl = IEnumFullIDListVtbl1 /* shobjidl.h:4051:3 */

type SHGDNF = DWORD /* shobjidl.h:4129:15 */

type SHCONTF = DWORD /* shobjidl.h:4147:15 */

type SFGAOF = ULONG /* shobjidl.h:4197:15 */
type IShellFolderVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FParseDisplayName uintptr
	FEnumObjects      uintptr
	FBindToObject     uintptr
	FBindToStorage    uintptr
	FCompareIDs       uintptr
	FCreateViewObject uintptr
	FGetAttributesOf  uintptr
	FGetUIObjectOf    uintptr
	FGetDisplayNameOf uintptr
	FSetNameOf        uintptr
} /* shobjidl.h:143:9 */

type IShellFolderVtbl = IShellFolderVtbl1 /* shobjidl.h:4605:3 */

type LPSHELLFOLDER = uintptr /* shobjidl.h:4704:22 */

type EXTRASEARCH1 = struct {
	FguidSearch      GUID
	FwszFriendlyName [80]WCHAR
	FwszUrl          [2084]WCHAR
} /* shobjidl.h:4706:9 */

type EXTRASEARCH = EXTRASEARCH1 /* shobjidl.h:4710:3 */
type LPEXTRASEARCH = uintptr    /* shobjidl.h:4711:28 */
type IEnumExtraSearchVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* shobjidl.h:151:9 */

type IEnumExtraSearchVtbl = IEnumExtraSearchVtbl1 /* shobjidl.h:4777:3 */

type LPENUMEXTRASEARCH = uintptr /* shobjidl.h:4826:26 */
type IShellFolder2Vtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FParseDisplayName      uintptr
	FEnumObjects           uintptr
	FBindToObject          uintptr
	FBindToStorage         uintptr
	FCompareIDs            uintptr
	FCreateViewObject      uintptr
	FGetAttributesOf       uintptr
	FGetUIObjectOf         uintptr
	FGetDisplayNameOf      uintptr
	FSetNameOf             uintptr
	FGetDefaultSearchGUID  uintptr
	FEnumSearches          uintptr
	FGetDefaultColumn      uintptr
	FGetDefaultColumnState uintptr
	FGetDetailsEx          uintptr
	FGetDetailsOf          uintptr
	FMapColumnToSCID       uintptr
} /* shobjidl.h:159:9 */

type IShellFolder2Vtbl = IShellFolder2Vtbl1 /* shobjidl.h:4997:3 */

type LPVIEWSETTINGS = uintptr /* shobjidl.h:5100:14 */

type FOLDERFLAGS = uint32 /* shobjidl.h:5136:3 */

type FOLDERVIEWMODE = int32 /* shobjidl.h:5152:3 */

type FOLDERSETTINGS1 = struct {
	FViewMode UINT
	FfFlags   UINT
} /* shobjidl.h:5166:9 */

type FOLDERSETTINGS = FOLDERSETTINGS1 /* shobjidl.h:5169:3 */

type LPFOLDERSETTINGS = uintptr  /* shobjidl.h:5171:24 */
type LPCFOLDERSETTINGS = uintptr /* shobjidl.h:5172:30 */
type PFOLDERSETTINGS = uintptr   /* shobjidl.h:5173:24 */

// ****************************************************************************
//
// IFolderViewOptions interface

type FOLDERVIEWOPTIONS = uint32 /* shobjidl.h:5189:3 */
type IFolderViewOptionsVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FSetFolderViewOptions uintptr
	FGetFolderViewOptions uintptr
} /* shobjidl.h:167:9 */

type IFolderViewOptionsVtbl = IFolderViewOptionsVtbl1 /* shobjidl.h:5236:3 */

type X_SVSIF = uint32 /* shobjidl.h:5291:3 */

type SVSIF = UINT /* shobjidl.h:5295:14 */

type X_SVGIO = uint32 /* shobjidl.h:5304:3 */

type SVGIO = int32 /* shobjidl.h:5308:13 */

type SVUIA_STATUS = uint32 /* shobjidl.h:5315:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type LPFNSVADDPROPSHEETPAGE = LPFNADDPROPSHEETPAGE /* shobjidl.h:5325:30 */
type IShellViewVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetWindow             uintptr
	FContextSensitiveHelp  uintptr
	FTranslateAcceleratorA uintptr
	FEnableModeless        uintptr
	FUIActivate            uintptr
	FRefresh               uintptr
	FCreateViewWindow      uintptr
	FDestroyViewWindow     uintptr
	FGetCurrentInfo        uintptr
	FAddPropertySheetPages uintptr
	FSaveViewState         uintptr
	FSelectItem            uintptr
	FGetItemObject         uintptr
} /* shobjidl.h:175:9 */

type IShellViewVtbl = IShellViewVtbl1 /* shobjidl.h:5471:3 */

type LPSHELLVIEW = uintptr /* shobjidl.h:5558:20 */

// ****************************************************************************
//
// IShellView2 interface

type SHELLVIEWID = GUID /* shobjidl.h:5566:14 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_SV2CVW2_PARAMS = struct {
	FcbSize      DWORD
	F__ccgo_pad1 [4]byte
	FpsvPrev     uintptr
	Fpfs         LPCFOLDERSETTINGS
	FpsbOwner    uintptr
	FprcView     uintptr
	Fpvid        uintptr
	FhwndView    HWND
} /* shobjidl.h:5572:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SV2CVW2_PARAMS = X_SV2CVW2_PARAMS /* shobjidl.h:5580:3 */
type LPSV2CVW2_PARAMS = uintptr        /* shobjidl.h:5581:32 */
type IShellView2Vtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetWindow             uintptr
	FContextSensitiveHelp  uintptr
	FTranslateAcceleratorA uintptr
	FEnableModeless        uintptr
	FUIActivate            uintptr
	FRefresh               uintptr
	FCreateViewWindow      uintptr
	FDestroyViewWindow     uintptr
	FGetCurrentInfo        uintptr
	FAddPropertySheetPages uintptr
	FSaveViewState         uintptr
	FSelectItem            uintptr
	FGetItemObject         uintptr
	FGetView               uintptr
	FCreateViewWindow2     uintptr
	FHandleRename          uintptr
	FSelectAndPositionItem uintptr
} /* shobjidl.h:183:9 */

type IShellView2Vtbl = IShellView2Vtbl1 /* shobjidl.h:5705:3 */
type IFolderViewVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FGetCurrentViewMode     uintptr
	FSetCurrentViewMode     uintptr
	FGetFolder              uintptr
	FItem                   uintptr
	FItemCount              uintptr
	FItems                  uintptr
	FGetSelectionMarkedItem uintptr
	FGetFocusedItem         uintptr
	FGetItemPosition        uintptr
	FGetSpacing             uintptr
	FGetDefaultSpacing      uintptr
	FGetAutoArrange         uintptr
	FSelectItem             uintptr
	FSelectAndPositionItems uintptr
} /* shobjidl.h:199:9 */

type IFolderViewVtbl = IFolderViewVtbl1 /* shobjidl.h:6223:3 */
type ICommDlgBrowserVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FOnDefaultCommand uintptr
	FOnStateChange    uintptr
	FIncludeObject    uintptr
} /* shobjidl.h:247:9 */

type ICommDlgBrowserVtbl = ICommDlgBrowserVtbl1 /* shobjidl.h:7468:3 */

type LPCOMMDLGBROWSER = uintptr /* shobjidl.h:7513:25 */
type ICommDlgBrowser2Vtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FOnDefaultCommand   uintptr
	FOnStateChange      uintptr
	FIncludeObject      uintptr
	FNotify             uintptr
	FGetDefaultMenuText uintptr
	FGetViewFlags       uintptr
} /* shobjidl.h:255:9 */

type ICommDlgBrowser2Vtbl = ICommDlgBrowser2Vtbl1 /* shobjidl.h:7605:3 */

type LPCOMMDLGBROWSER2 = uintptr /* shobjidl.h:7664:26 */
type IFolderFilterSiteVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetFilter      uintptr
} /* shobjidl.h:279:9 */

type IFolderFilterSiteVtbl = IFolderFilterSiteVtbl1 /* shobjidl.h:8047:3 */
type IFolderFilterVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FShouldShow     uintptr
	FGetEnumFlags   uintptr
} /* shobjidl.h:287:9 */

type IFolderFilterVtbl = IFolderFilterVtbl1 /* shobjidl.h:8142:3 */
type IInputObjectSiteVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FOnFocusChangeIS uintptr
} /* shobjidl.h:295:9 */

type IInputObjectSiteVtbl = IInputObjectSiteVtbl1 /* shobjidl.h:8226:3 */
type IInputObjectVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FUIActivateIO           uintptr
	FHasFocusIO             uintptr
	FTranslateAcceleratorIO uintptr
} /* shobjidl.h:303:9 */

type IInputObjectVtbl = IInputObjectVtbl1 /* shobjidl.h:8319:3 */
type IInputObject2Vtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FUIActivateIO               uintptr
	FHasFocusIO                 uintptr
	FTranslateAcceleratorIO     uintptr
	FTranslateAcceleratorGlobal uintptr
} /* shobjidl.h:311:9 */

type IInputObject2Vtbl = IInputObject2Vtbl1 /* shobjidl.h:8418:3 */
type IShellIconVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetIconOf      uintptr
} /* shobjidl.h:319:9 */

type IShellIconVtbl = IShellIconVtbl1 /* shobjidl.h:8514:3 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type LPTBBUTTONSB = LPTBBUTTON /* shobjidl.h:8606:20 */
type IShellBrowserVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FGetWindow              uintptr
	FContextSensitiveHelp   uintptr
	FInsertMenusSB          uintptr
	FSetMenuSB              uintptr
	FRemoveMenusSB          uintptr
	FSetStatusTextSB        uintptr
	FEnableModelessSB       uintptr
	FTranslateAcceleratorSB uintptr
	FBrowseObject           uintptr
	FGetViewStateStream     uintptr
	FGetControlWindow       uintptr
	FSendControlMsg         uintptr
	FQueryActiveShellView   uintptr
	FOnViewWindowActive     uintptr
	FSetToolbarItems        uintptr
} /* shobjidl.h:327:9 */

type IShellBrowserVtbl = IShellBrowserVtbl1 /* shobjidl.h:8768:3 */

type LPSHELLBROWSER = uintptr /* shobjidl.h:8864:23 */
type IProfferServiceVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FProfferService uintptr
	FRevokeService  uintptr
} /* shobjidl.h:335:9 */

type IProfferServiceVtbl = IProfferServiceVtbl1 /* shobjidl.h:8917:3 */

// ****************************************************************************
//
// IShellItem interface

type SIGDN = int32 /* shobjidl.h:8980:3 */

type SICHINTF = DWORD /* shobjidl.h:8989:15 */
type IShellItemVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FBindToHandler  uintptr
	FGetParent      uintptr
	FGetDisplayName uintptr
	FGetAttributes  uintptr
	FCompare        uintptr
} /* shobjidl.h:343:9 */

type IShellItemVtbl = IShellItemVtbl1 /* shobjidl.h:9067:3 */
type IShellItem2Vtbl1 = struct {
	FQueryInterface                   uintptr
	FAddRef                           uintptr
	FRelease                          uintptr
	FBindToHandler                    uintptr
	FGetParent                        uintptr
	FGetDisplayName                   uintptr
	FGetAttributes                    uintptr
	FCompare                          uintptr
	FGetPropertyStore                 uintptr
	FGetPropertyStoreWithCreateObject uintptr
	FGetPropertyStoreForKeys          uintptr
	FGetPropertyDescriptionList       uintptr
	FUpdate                           uintptr
	FGetProperty                      uintptr
	FGetCLSID                         uintptr
	FGetFileTime                      uintptr
	FGetInt32                         uintptr
	FGetString                        uintptr
	FGetUInt32                        uintptr
	FGetUInt64                        uintptr
	FGetBool                          uintptr
} /* shobjidl.h:351:9 */

type IShellItem2Vtbl = IShellItem2Vtbl1 /* shobjidl.h:9348:3 */

type SIIGBF = int32 /* shobjidl.h:9469:13 */
type IShellItemImageFactoryVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetImage       uintptr
} /* shobjidl.h:359:9 */

type IShellItemImageFactoryVtbl = IShellItemImageFactoryVtbl1 /* shobjidl.h:9515:3 */
type IUserAccountChangeCallbackVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FOnPictureChange uintptr
} /* shobjidl.h:367:9 */

type IUserAccountChangeCallbackVtbl = IUserAccountChangeCallbackVtbl1 /* shobjidl.h:9593:3 */
type IEnumShellItemsVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* shobjidl.h:375:9 */

type IEnumShellItemsVtbl = IEnumShellItemsVtbl1 /* shobjidl.h:9695:3 */

type STGTRANSCONFIRMATION = GUID      /* shobjidl.h:9765:14 */
type LPSTGTRANSCONFIRMATION = uintptr /* shobjidl.h:9766:14 */

type STGOP = uint32 /* shobjidl.h:9776:3 */

type TRANSFER_SOURCE_FLAGS = DWORD /* shobjidl.h:9795:15 */

type SHELL_ITEM_RESOURCE1 = struct {
	FguidType GUID
	FszName   [260]WCHAR
} /* shobjidl.h:10238:9 */

type SHELL_ITEM_RESOURCE = SHELL_ITEM_RESOURCE1 /* shobjidl.h:10241:3 */
type IEnumResourcesVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* shobjidl.h:399:9 */

type IEnumResourcesVtbl = IEnumResourcesVtbl1 /* shobjidl.h:10307:3 */
type IShellItemResourcesVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FGetAttributes          uintptr
	FGetSize                uintptr
	FGetTimes               uintptr
	FSetTimes               uintptr
	FGetResourceDescription uintptr
	FEnumResources          uintptr
	FSupportsResource       uintptr
	FOpenResource           uintptr
	FCreateResource         uintptr
	FMarkForDelete          uintptr
} /* shobjidl.h:407:9 */

type IShellItemResourcesVtbl = IShellItemResourcesVtbl1 /* shobjidl.h:10477:3 */
type ITransferDestinationVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAdvise         uintptr
	FUnadvise       uintptr
	FCreateItem     uintptr
} /* shobjidl.h:415:9 */

type ITransferDestinationVtbl = ITransferDestinationVtbl1 /* shobjidl.h:10621:3 */
type IStreamAsyncVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FRead             uintptr
	FWrite            uintptr
	FSeek             uintptr
	FSetSize          uintptr
	FCopyTo           uintptr
	FCommit           uintptr
	FRevert           uintptr
	FLockRegion       uintptr
	FUnlockRegion     uintptr
	FStat             uintptr
	FClone            uintptr
	FReadAsync        uintptr
	FWriteAsync       uintptr
	FOverlappedResult uintptr
	FCancelIo         uintptr
} /* shobjidl.h:423:9 */

type IStreamAsyncVtbl = IStreamAsyncVtbl1 /* shobjidl.h:10817:3 */
type IStreamUnbufferedInfoVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetSectorSize  uintptr
} /* shobjidl.h:431:9 */

type IStreamUnbufferedInfoVtbl = IStreamUnbufferedInfoVtbl1 /* shobjidl.h:10955:3 */

// ****************************************************************************
//
// IShellItemArray interface

type SIATTRIBFLAGS = uint32 /* shobjidl.h:11316:3 */
type IShellItemArrayVtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FBindToHandler              uintptr
	FGetPropertyStore           uintptr
	FGetPropertyDescriptionList uintptr
	FGetAttributes              uintptr
	FGetCount                   uintptr
	FGetItemAt                  uintptr
	FEnumItems                  uintptr
} /* shobjidl.h:447:9 */

type IShellItemArrayVtbl = IShellItemArrayVtbl1 /* shobjidl.h:11416:3 */
type IInitializeWithItemVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
} /* shobjidl.h:455:9 */

type IInitializeWithItemVtbl = IInitializeWithItemVtbl1 /* shobjidl.h:11527:3 */
type IObjectWithSelectionVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetSelection   uintptr
	FGetSelection   uintptr
} /* shobjidl.h:463:9 */

type IObjectWithSelectionVtbl = IObjectWithSelectionVtbl1 /* shobjidl.h:11614:3 */
type IObjectWithBackReferencesVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FRemoveBackReferences uintptr
} /* shobjidl.h:471:9 */

type IObjectWithBackReferencesVtbl = IObjectWithBackReferencesVtbl1 /* shobjidl.h:11695:3 */

type PROPERTYUI_NAME_FLAGS = DWORD /* shobjidl.h:11738:15 */

type PROPERTYUI_FLAGS = DWORD /* shobjidl.h:11746:15 */

type PROPERTYUI_FORMAT_FLAGS = DWORD /* shobjidl.h:11756:15 */
type IPropertyUIVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FParsePropertyName      uintptr
	FGetCannonicalName      uintptr
	FGetDisplayName         uintptr
	FGetPropertyDescription uintptr
	FGetDefaultWidth        uintptr
	FGetFlags               uintptr
	FFormatForDisplay       uintptr
	FGetHelpInfo            uintptr
} /* shobjidl.h:479:9 */

type IPropertyUIVtbl = IPropertyUIVtbl1 /* shobjidl.h:11899:3 */
type ICategoryProviderVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FCanCategorizeOnSCID uintptr
	FGetDefaultCategory  uintptr
	FGetCategoryForSCID  uintptr
	FEnumCategories      uintptr
	FGetCategoryName     uintptr
	FCreateCategory      uintptr
} /* shobjidl.h:487:9 */

type ICategoryProviderVtbl = ICategoryProviderVtbl1 /* shobjidl.h:12059:3 */

type CATEGORYINFO_FLAGS = uint32 /* shobjidl.h:12126:3 */

type CATSORT_FLAGS = uint32 /* shobjidl.h:12133:3 */

type CATEGORY_INFO1 = struct {
	Fcif     CATEGORYINFO_FLAGS
	FwszName [260]WCHAR
} /* shobjidl.h:12137:9 */

type CATEGORY_INFO = CATEGORY_INFO1 /* shobjidl.h:12140:3 */
type ICategorizerVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FGetDescription  uintptr
	FGetCategory     uintptr
	FGetCategoryInfo uintptr
	FCompareCategory uintptr
} /* shobjidl.h:495:9 */

type ICategorizerVtbl = ICategorizerVtbl1 /* shobjidl.h:12215:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SHDRAGIMAGE1 = struct {
	FsizeDragImage SIZE
	FptOffset      POINT
	FhbmpDragImage HBITMAP
	FcrColorKey    COLORREF
	F__ccgo_pad1   [4]byte
} /* shobjidl.h:12266:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SHDRAGIMAGE = SHDRAGIMAGE1 /* shobjidl.h:12271:3 */
type LPSHDRAGIMAGE = uintptr    /* shobjidl.h:12272:28 */
type IDropTargetHelperVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FDragEnter      uintptr
	FDragLeave      uintptr
	FDragOver       uintptr
	FDrop           uintptr
	FShow           uintptr
} /* shobjidl.h:503:9 */

type IDropTargetHelperVtbl = IDropTargetHelperVtbl1 /* shobjidl.h:12356:3 */
type IDragSourceHelperVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FInitializeFromBitmap uintptr
	FInitializeFromWindow uintptr
} /* shobjidl.h:511:9 */

type IDragSourceHelperVtbl = IDragSourceHelperVtbl1 /* shobjidl.h:12463:3 */

type SLR_FLAGS = uint32 /* shobjidl.h:12629:3 */

type SLGP_FLAGS = uint32 /* shobjidl.h:12638:3 */
type IShellLinkAVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetPath             uintptr
	FGetIDList           uintptr
	FSetIDList           uintptr
	FGetDescription      uintptr
	FSetDescription      uintptr
	FGetWorkingDirectory uintptr
	FSetWorkingDirectory uintptr
	FGetArguments        uintptr
	FSetArguments        uintptr
	FGetHotkey           uintptr
	FSetHotkey           uintptr
	FGetShowCmd          uintptr
	FSetShowCmd          uintptr
	FGetIconLocation     uintptr
	FSetIconLocation     uintptr
	FSetRelativePath     uintptr
	FResolve             uintptr
	FSetPath             uintptr
} /* shobjidl.h:527:9 */

type IShellLinkAVtbl = IShellLinkAVtbl1 /* shobjidl.h:12823:3 */
type IShellLinkWVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetPath             uintptr
	FGetIDList           uintptr
	FSetIDList           uintptr
	FGetDescription      uintptr
	FSetDescription      uintptr
	FGetWorkingDirectory uintptr
	FSetWorkingDirectory uintptr
	FGetArguments        uintptr
	FSetArguments        uintptr
	FGetHotkey           uintptr
	FSetHotkey           uintptr
	FGetShowCmd          uintptr
	FSetShowCmd          uintptr
	FGetIconLocation     uintptr
	FSetIconLocation     uintptr
	FSetRelativePath     uintptr
	FResolve             uintptr
	FSetPath             uintptr
} /* shobjidl.h:535:9 */

type IShellLinkWVtbl = IShellLinkWVtbl1 /* shobjidl.h:13110:3 */
type IShellLinkDataListVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FAddDataBlock    uintptr
	FCopyDataBlock   uintptr
	FRemoveDataBlock uintptr
	FGetFlags        uintptr
	FSetFlags        uintptr
} /* shobjidl.h:543:9 */

type IShellLinkDataListVtbl = IShellLinkDataListVtbl1 /* shobjidl.h:13286:3 */
type IResolveShellLinkVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FResolveShellLink uintptr
} /* shobjidl.h:551:9 */

type IResolveShellLinkVtbl = IResolveShellLinkVtbl1 /* shobjidl.h:13384:3 */

type SPINITF = DWORD /* shobjidl.h:13434:15 */
type IActionProgressDialogVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
	FStop           uintptr
} /* shobjidl.h:559:9 */

type IActionProgressDialogVtbl = IActionProgressDialogVtbl1 /* shobjidl.h:13480:3 */
type IHWEventHandlerVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FInitialize             uintptr
	FHandleEvent            uintptr
	FHandleEventWithContent uintptr
} /* shobjidl.h:567:9 */

type IHWEventHandlerVtbl = IHWEventHandlerVtbl1 /* shobjidl.h:13588:3 */
type IHWEventHandler2Vtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FInitialize             uintptr
	FHandleEvent            uintptr
	FHandleEventWithContent uintptr
	FHandleEventWithHWND    uintptr
} /* shobjidl.h:575:9 */

type IHWEventHandler2Vtbl = IHWEventHandler2Vtbl1 /* shobjidl.h:13699:3 */
type IQueryCancelAutoPlayVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAllowAutoPlay  uintptr
} /* shobjidl.h:583:9 */

type IQueryCancelAutoPlayVtbl = IQueryCancelAutoPlayVtbl1 /* shobjidl.h:13825:3 */

type SPBEGINF = DWORD /* shobjidl.h:13961:15 */

type SPACTION = uint32 /* shobjidl.h:13978:3 */

type SPTEXT = uint32 /* shobjidl.h:13983:3 */
type IActionProgressVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FBegin          uintptr
	FUpdateProgress uintptr
	FUpdateText     uintptr
	FQueryCancel    uintptr
	FResetCancel    uintptr
	FEnd            uintptr
} /* shobjidl.h:599:9 */

type IActionProgressVtbl = IActionProgressVtbl1 /* shobjidl.h:14060:3 */
type IShellExtInitVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
} /* shobjidl.h:607:9 */

type IShellExtInitVtbl = IShellExtInitVtbl1 /* shobjidl.h:14162:3 */

type LPSHELLEXTINIT = uintptr /* shobjidl.h:14199:23 */

type EXPPS = UINT /* shobjidl.h:14211:14 */
type IShellPropSheetExtVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAddPages       uintptr
	FReplacePage    uintptr
} /* shobjidl.h:615:9 */

type IShellPropSheetExtVtbl = IShellPropSheetExtVtbl1 /* shobjidl.h:14260:3 */

type LPSHELLPROPSHEETEXT = uintptr /* shobjidl.h:14301:28 */
type IRemoteComputerVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
} /* shobjidl.h:623:9 */

type IRemoteComputerVtbl = IRemoteComputerVtbl1 /* shobjidl.h:14345:3 */
type IQueryContinueVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FQueryContinue  uintptr
} /* shobjidl.h:631:9 */

type IQueryContinueVtbl = IQueryContinueVtbl1 /* shobjidl.h:14422:3 */
type IObjectWithCancelEventVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetCancelEvent uintptr
} /* shobjidl.h:639:9 */

type IObjectWithCancelEventVtbl = IObjectWithCancelEventVtbl1 /* shobjidl.h:14500:3 */
type IUserNotificationVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FSetBalloonInfo  uintptr
	FSetBalloonRetry uintptr
	FSetIconInfo     uintptr
	FShow            uintptr
	FPlaySound       uintptr
} /* shobjidl.h:647:9 */

type IUserNotificationVtbl = IUserNotificationVtbl1 /* shobjidl.h:14618:3 */
type IUserNotificationCallbackVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FOnBalloonUserClick uintptr
	FOnLeftClick        uintptr
	FOnContextMenu      uintptr
} /* shobjidl.h:655:9 */

type IUserNotificationCallbackVtbl = IUserNotificationCallbackVtbl1 /* shobjidl.h:14726:3 */
type IUserNotification2Vtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FSetBalloonInfo  uintptr
	FSetBalloonRetry uintptr
	FSetIconInfo     uintptr
	FShow            uintptr
	FPlaySound       uintptr
} /* shobjidl.h:663:9 */

type IUserNotification2Vtbl = IUserNotification2Vtbl1 /* shobjidl.h:14854:3 */
type IItemNameLimitsVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FGetValidCharacters uintptr
	FGetMaxLength       uintptr
} /* shobjidl.h:671:9 */

type IItemNameLimitsVtbl = IItemNameLimitsVtbl1 /* shobjidl.h:14959:3 */
type IExtractImageVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetLocation    uintptr
	FExtract        uintptr
} /* shobjidl.h:687:9 */

type IExtractImageVtbl = IExtractImageVtbl1 /* shobjidl.h:15292:3 */

type LPEXTRACTIMAGE = uintptr /* shobjidl.h:15333:23 */
type IExtractImage2Vtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetLocation    uintptr
	FExtract        uintptr
	FGetDateStamp   uintptr
} /* shobjidl.h:695:9 */

type IExtractImage2Vtbl = IExtractImage2Vtbl1 /* shobjidl.h:15389:3 */

type LPEXTRACTIMAGE2 = uintptr /* shobjidl.h:15436:24 */
type IThumbnailHandlerFactoryVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetThumbnailHandler uintptr
} /* shobjidl.h:703:9 */

type IThumbnailHandlerFactoryVtbl = IThumbnailHandlerFactoryVtbl1 /* shobjidl.h:15484:3 */
type IParentAndItemVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FSetParentAndItem uintptr
	FGetParentAndItem uintptr
} /* shobjidl.h:711:9 */

type IParentAndItemVtbl = IParentAndItemVtbl1 /* shobjidl.h:15577:3 */
type IDockingWindowVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FContextSensitiveHelp uintptr
	FShowDW               uintptr
	FCloseDW              uintptr
	FResizeBorderDW       uintptr
} /* shobjidl.h:719:9 */

type IDockingWindowVtbl = IDockingWindowVtbl1 /* shobjidl.h:15706:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type DESKBANDINFO1 = struct {
	FdwMask      DWORD
	FptMinSize   POINTL
	FptMaxSize   POINTL
	FptIntegral  POINTL
	FptActual    POINTL
	FwszTitle    [256]WCHAR
	FdwModeFlags DWORD
	FcrBkgnd     COLORREF
} /* shobjidl.h:15771:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type DESKBANDINFO = DESKBANDINFO1 /* shobjidl.h:15780:3 */
type IDeskBandVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FContextSensitiveHelp uintptr
	FShowDW               uintptr
	FCloseDW              uintptr
	FResizeBorderDW       uintptr
	FGetBandInfo          uintptr
} /* shobjidl.h:727:9 */

type IDeskBandVtbl = IDeskBandVtbl1 /* shobjidl.h:15889:3 */
type ITaskbarListVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FHrInit         uintptr
	FAddTab         uintptr
	FDeleteTab      uintptr
	FActivateTab    uintptr
	FSetActiveAlt   uintptr
} /* shobjidl.h:751:9 */

type ITaskbarListVtbl = ITaskbarListVtbl1 /* shobjidl.h:16263:3 */
type ITaskbarList2Vtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FHrInit               uintptr
	FAddTab               uintptr
	FDeleteTab            uintptr
	FActivateTab          uintptr
	FSetActiveAlt         uintptr
	FMarkFullscreenWindow uintptr
} /* shobjidl.h:759:9 */

type ITaskbarList2Vtbl = ITaskbarList2Vtbl1 /* shobjidl.h:16379:3 */

type THUMBBUTTONFLAGS = uint32 /* shobjidl.h:16450:3 */

type THUMBBUTTONMASK = uint32 /* shobjidl.h:16460:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type THUMBBUTTON1 = struct {
	FdwMask      THUMBBUTTONMASK
	FiId         UINT
	FiBitmap     UINT
	F__ccgo_pad1 [4]byte
	FhIcon       HICON
	FszTip       [260]WCHAR
	FdwFlags     THUMBBUTTONFLAGS
	F__ccgo_pad2 [4]byte
} /* shobjidl.h:16465:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type THUMBBUTTON = THUMBBUTTON1 /* shobjidl.h:16472:3 */
type LPTHUMBBUTTON = uintptr    /* shobjidl.h:16473:28 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// ****************************************************************************
//
// ITaskbarList3 interface

type TBPFLAG = uint32 /* shobjidl.h:16490:3 */
type ITaskbarList3Vtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FHrInit                uintptr
	FAddTab                uintptr
	FDeleteTab             uintptr
	FActivateTab           uintptr
	FSetActiveAlt          uintptr
	FMarkFullscreenWindow  uintptr
	FSetProgressValue      uintptr
	FSetProgressState      uintptr
	FRegisterTab           uintptr
	FUnregisterTab         uintptr
	FSetTabOrder           uintptr
	FSetTabActive          uintptr
	FThumbBarAddButtons    uintptr
	FThumbBarUpdateButtons uintptr
	FThumbBarSetImageList  uintptr
	FSetOverlayIcon        uintptr
	FSetThumbnailTooltip   uintptr
	FSetThumbnailClip      uintptr
} /* shobjidl.h:767:9 */

type ITaskbarList3Vtbl = ITaskbarList3Vtbl1 /* shobjidl.h:16663:3 */

// ****************************************************************************
//
// ITaskbarList4 interface

type STPFLAG = uint32 /* shobjidl.h:16785:3 */
type ITaskbarList4Vtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FHrInit                uintptr
	FAddTab                uintptr
	FDeleteTab             uintptr
	FActivateTab           uintptr
	FSetActiveAlt          uintptr
	FMarkFullscreenWindow  uintptr
	FSetProgressValue      uintptr
	FSetProgressState      uintptr
	FRegisterTab           uintptr
	FUnregisterTab         uintptr
	FSetTabOrder           uintptr
	FSetTabActive          uintptr
	FThumbBarAddButtons    uintptr
	FThumbBarUpdateButtons uintptr
	FThumbBarSetImageList  uintptr
	FSetOverlayIcon        uintptr
	FSetThumbnailTooltip   uintptr
	FSetThumbnailClip      uintptr
	FSetTabProperties      uintptr
} /* shobjidl.h:775:9 */

type ITaskbarList4Vtbl = ITaskbarList4Vtbl1 /* shobjidl.h:16916:3 */
type IStartMenuPinnedListVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FRemoveFromList uintptr
} /* shobjidl.h:783:9 */

type IStartMenuPinnedListVtbl = IStartMenuPinnedListVtbl1 /* shobjidl.h:17072:3 */
type ICDBurnVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FGetRecorderDriveLetter uintptr
	FBurn                   uintptr
	FHasRecordableDrive     uintptr
} /* shobjidl.h:791:9 */

type ICDBurnVtbl = ICDBurnVtbl1 /* shobjidl.h:17166:3 */
type IWizardSiteVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetPreviousPage  uintptr
	FGetNextPage      uintptr
	FGetCancelledPage uintptr
} /* shobjidl.h:799:9 */

type IWizardSiteVtbl = IWizardSiteVtbl1 /* shobjidl.h:17269:3 */
type IWizardExtensionVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAddPages       uintptr
	FGetFirstPage   uintptr
	FGetLastPage    uintptr
} /* shobjidl.h:807:9 */

type IWizardExtensionVtbl = IWizardExtensionVtbl1 /* shobjidl.h:17375:3 */
type IWebWizardExtensionVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAddPages       uintptr
	FGetFirstPage   uintptr
	FGetLastPage    uintptr
	FSetInitialURL  uintptr
	FSetErrorURL    uintptr
} /* shobjidl.h:815:9 */

type IWebWizardExtensionVtbl = IWebWizardExtensionVtbl1 /* shobjidl.h:17483:3 */
type IPublishingWizardVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FAddPages            uintptr
	FGetFirstPage        uintptr
	FGetLastPage         uintptr
	FInitialize          uintptr
	FGetTransferManifest uintptr
} /* shobjidl.h:823:9 */

type IPublishingWizardVtbl = IPublishingWizardVtbl1 /* shobjidl.h:17627:3 */
type IFolderViewHostVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
} /* shobjidl.h:831:9 */

type IFolderViewHostVtbl = IFolderViewHostVtbl1 /* shobjidl.h:17727:3 */
type IResultsFolderVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAddItem        uintptr
	FAddIDList      uintptr
	FRemoveItem     uintptr
	FRemoveIDList   uintptr
	FRemoveAll      uintptr
} /* shobjidl.h:863:9 */

type IResultsFolderVtbl = IResultsFolderVtbl1 /* shobjidl.h:18293:3 */
type INamespaceWalkCBVtbl1 = struct {
	FQueryInterface           uintptr
	FAddRef                   uintptr
	FRelease                  uintptr
	FFoundItem                uintptr
	FEnterFolder              uintptr
	FLeaveFolder              uintptr
	FInitializeProgressDialog uintptr
} /* shobjidl.h:911:9 */

type INamespaceWalkCBVtbl = INamespaceWalkCBVtbl1 /* shobjidl.h:19318:3 */

// ****************************************************************************
//
// INamespaceWalk interface

type NAMESPACEWALKFLAG = uint32 /* shobjidl.h:19511:3 */
type INamespaceWalkVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FWalk             uintptr
	FGetIDArrayResult uintptr
} /* shobjidl.h:927:9 */

type INamespaceWalkVtbl = INamespaceWalkVtbl1 /* shobjidl.h:19567:3 */
type IAutoCompleteDropDownVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FGetDropDownStatus uintptr
	FResetEnumerator   uintptr
} /* shobjidl.h:935:9 */

type IAutoCompleteDropDownVtbl = IAutoCompleteDropDownVtbl1 /* shobjidl.h:19684:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type TagBANDSITEINFO = struct {
	FdwMask  DWORD
	FdwState DWORD
	FdwStyle DWORD
} /* shobjidl.h:19727:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type BANDSITEINFO = TagBANDSITEINFO /* shobjidl.h:19731:3 */
type IBandSiteVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FAddBand         uintptr
	FEnumBands       uintptr
	FQueryBand       uintptr
	FSetBandState    uintptr
	FRemoveBand      uintptr
	FGetBandObject   uintptr
	FSetBandSiteInfo uintptr
	FGetBandSiteInfo uintptr
} /* shobjidl.h:943:9 */

type IBandSiteVtbl = IBandSiteVtbl1 /* shobjidl.h:19870:3 */
type IModalWindowVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FShow           uintptr
} /* shobjidl.h:951:9 */

type IModalWindowVtbl = IModalWindowVtbl1 /* shobjidl.h:20002:3 */

type CDBE_ACTIONS = DWORD /* shobjidl.h:20070:15 */
type ICDBurnExtVtbl1 = struct {
	FQueryInterface          uintptr
	FAddRef                  uintptr
	FRelease                 uintptr
	FGetSupportedActionTypes uintptr
} /* shobjidl.h:959:9 */

type ICDBurnExtVtbl = ICDBurnExtVtbl1 /* shobjidl.h:20112:3 */
type IContextMenuSiteVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FDoContextMenuPopup uintptr
} /* shobjidl.h:967:9 */

type IContextMenuSiteVtbl = IContextMenuSiteVtbl1 /* shobjidl.h:20194:3 */
type IEnumReadyCallbackVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FEnumReady      uintptr
} /* shobjidl.h:975:9 */

type IEnumReadyCallbackVtbl = IEnumReadyCallbackVtbl1 /* shobjidl.h:20271:3 */
type IEnumerableViewVtbl1 = struct {
	FQueryInterface               uintptr
	FAddRef                       uintptr
	FRelease                      uintptr
	FSetEnumReadyCallback         uintptr
	FCreateEnumIDListFromContents uintptr
} /* shobjidl.h:983:9 */

type IEnumerableViewVtbl = IEnumerableViewVtbl1 /* shobjidl.h:20360:3 */
type IInsertItemVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInsertItem     uintptr
} /* shobjidl.h:991:9 */

type IInsertItemVtbl = IInsertItemVtbl1 /* shobjidl.h:20444:3 */
type IMenuBandVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FIsMenuMessage        uintptr
	FTranslateMenuMessage uintptr
} /* shobjidl.h:999:9 */

type IMenuBandVtbl = IMenuBandVtbl1 /* shobjidl.h:20535:3 */
type IFolderBandPrivVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FSetCascade      uintptr
	FSetAccelerators uintptr
	FSetNoIcons      uintptr
	FSetNoText       uintptr
} /* shobjidl.h:1007:9 */

type IFolderBandPrivVtbl = IFolderBandPrivVtbl1 /* shobjidl.h:20638:3 */
type IRegTreeItemVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetCheckState  uintptr
	FSetCheckState  uintptr
} /* shobjidl.h:1015:9 */

type IRegTreeItemVtbl = IRegTreeItemVtbl1 /* shobjidl.h:20735:3 */
type IImageRecompressVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FRecompressImage uintptr
} /* shobjidl.h:1023:9 */

type IImageRecompressVtbl = IImageRecompressVtbl1 /* shobjidl.h:20827:3 */
type IDeskBarVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FContextSensitiveHelp uintptr
	FSetClient            uintptr
	FGetClient            uintptr
	FOnPosRectChangeDB    uintptr
} /* shobjidl.h:1031:9 */

type IDeskBarVtbl = IDeskBarVtbl1 /* shobjidl.h:20929:3 */

type MP_POPUPFLAGS = int32 /* shobjidl.h:21017:13 */
type IMenuPopupVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetWindow            uintptr
	FContextSensitiveHelp uintptr
	FSetClient            uintptr
	FGetClient            uintptr
	FOnPosRectChangeDB    uintptr
	FPopup                uintptr
	FOnSelect             uintptr
	FSetSubMenu           uintptr
} /* shobjidl.h:1039:9 */

type IMenuPopupVtbl = IMenuPopupVtbl1 /* shobjidl.h:21095:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type DELEGATEITEMID1 = struct {
	FcbSize      WORD
	FwOuter      WORD
	FcbInner     WORD
	Frgb         [1]BYTE
	F__ccgo_pad1 [1]byte
} /* shobjidl.h:23551:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type DELEGATEITEMID = DELEGATEITEMID1 /* shobjidl.h:23556:3 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type PCDELEGATEITEMID = uintptr /* shobjidl.h:23559:40 */
type PDELEGATEITEMID = uintptr  /* shobjidl.h:23560:34 */
type IDelegateFolderVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetItemAlloc   uintptr
} /* shobjidl.h:1127:9 */

type IDelegateFolderVtbl = IDelegateFolderVtbl1 /* shobjidl.h:23602:3 */

// ****************************************************************************
//
// IBrowserFrameOptions interface

type LPBROWSERFRAMEOPTIONS = uintptr /* shobjidl.h:23647:30 */

type BROWSERFRAMEOPTIONS = DWORD /* shobjidl.h:23672:15 */
type IBrowserFrameOptionsVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FGetFrameOptions uintptr
} /* shobjidl.h:1135:9 */

type IBrowserFrameOptionsVtbl = IBrowserFrameOptionsVtbl1 /* shobjidl.h:23710:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type TagSMDATA = struct {
	FdwMask      DWORD
	FdwFlags     DWORD
	Fhmenu       HMENU
	Fhwnd        HWND
	FuId         UINT
	FuIdParent   UINT
	FuIdAncestor UINT
	F__ccgo_pad1 [4]byte
	Fpunk        uintptr
	FpidlFolder  LPITEMIDLIST
	FpidlItem    LPITEMIDLIST
	Fpsf         uintptr
	FpvUserData  uintptr
} /* shobjidl.h:24082:9 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SMDATA = TagSMDATA /* shobjidl.h:24095:3 */
type LPSMDATA = uintptr /* shobjidl.h:24096:26 */

type TagSMINFO = struct {
	FdwMask  DWORD
	FdwType  DWORD
	FdwFlags DWORD
	FiIcon   int32
} /* shobjidl.h:24102:9 */

type SMINFO = TagSMINFO /* shobjidl.h:24107:3 */
type PSMINFO = uintptr  /* shobjidl.h:24108:26 */

type SHCSCHANGENOTIFYSTRUCT = struct {
	FlEvent      LONG
	F__ccgo_pad1 [4]byte
	Fpidl1       LPCITEMIDLIST
	Fpidl2       LPCITEMIDLIST
} /* shobjidl.h:24110:9 */

type SMCSHCHANGENOTIFYSTRUCT = SHCSCHANGENOTIFYSTRUCT /* shobjidl.h:24114:3 */
type PSMCSHCHANGENOTIFYSTRUCT = uintptr               /* shobjidl.h:24115:39 */
type IShellMenuCallbackVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCallbackSM     uintptr
} /* shobjidl.h:1159:9 */

type IShellMenuCallbackVtbl = IShellMenuCallbackVtbl1 /* shobjidl.h:24227:3 */
type IShellMenuVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
	FGetMenuInfo    uintptr
	FSetShellFolder uintptr
	FGetShellFolder uintptr
	FSetMenu        uintptr
	FGetMenu        uintptr
	FInvalidateItem uintptr
	FGetState       uintptr
	FSetMenuToolbar uintptr
} /* shobjidl.h:1167:9 */

type IShellMenuVtbl = IShellMenuVtbl1 /* shobjidl.h:24419:3 */
type IShellRunDllVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FRun            uintptr
} /* shobjidl.h:1175:9 */

type IShellRunDllVtbl = IShellRunDllVtbl1 /* shobjidl.h:24530:3 */
type IPreviousVersionsInfoVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FAreSnapshotsAvailable uintptr
} /* shobjidl.h:1207:9 */

type IPreviousVersionsInfoVtbl = IPreviousVersionsInfoVtbl1 /* shobjidl.h:25265:3 */
type IDestinationStreamFactoryVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FGetDestinationStream uintptr
} /* shobjidl.h:1287:9 */

type IDestinationStreamFactoryVtbl = IDestinationStreamFactoryVtbl1 /* shobjidl.h:26098:3 */

type NMCII_FLAGS = int32 /* shobjidl.h:26142:13 */

type NMCSAEI_FLAGS = int32 /* shobjidl.h:26149:13 */
type INewMenuClientVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FIncludeItems      uintptr
	FSelectAndEditItem uintptr
} /* shobjidl.h:1295:9 */

type INewMenuClientVtbl = INewMenuClientVtbl1 /* shobjidl.h:26200:3 */

type NSTCSTYLE = DWORD /* shobjidl.h:26456:15 */

type NSTCROOTSTYLE = DWORD /* shobjidl.h:26464:15 */

type NSTCITEMSTATE = DWORD /* shobjidl.h:26475:15 */

type NSTCGNI = uint32 /* shobjidl.h:26486:3 */
type INameSpaceTreeControlVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FInitialize         uintptr
	FTreeAdvise         uintptr
	FTreeUnadvise       uintptr
	FAppendRoot         uintptr
	FInsertRoot         uintptr
	FRemoveRoot         uintptr
	FRemoveAllRoots     uintptr
	FGetRootItems       uintptr
	FSetItemState       uintptr
	FGetItemState       uintptr
	FGetSelectedItems   uintptr
	FGetItemCustomState uintptr
	FSetItemCustomState uintptr
	FEnsureItemVisible  uintptr
	FSetTheme           uintptr
	FGetNextItem        uintptr
	FHitTest            uintptr
	FGetItemRect        uintptr
	FCollapseAll        uintptr
} /* shobjidl.h:1319:9 */

type INameSpaceTreeControlVtbl = INameSpaceTreeControlVtbl1 /* shobjidl.h:26686:3 */

// ****************************************************************************
//
// INameSpaceTreeControl2 interface

type NSTCSTYLE2 = uint32 /* shobjidl.h:26810:3 */
type INameSpaceTreeControl2Vtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FInitialize         uintptr
	FTreeAdvise         uintptr
	FTreeUnadvise       uintptr
	FAppendRoot         uintptr
	FInsertRoot         uintptr
	FRemoveRoot         uintptr
	FRemoveAllRoots     uintptr
	FGetRootItems       uintptr
	FSetItemState       uintptr
	FGetItemState       uintptr
	FGetSelectedItems   uintptr
	FGetItemCustomState uintptr
	FSetItemCustomState uintptr
	FEnsureItemVisible  uintptr
	FSetTheme           uintptr
	FGetNextItem        uintptr
	FHitTest            uintptr
	FGetItemRect        uintptr
	FCollapseAll        uintptr
	FSetControlStyle    uintptr
	FGetControlStyle    uintptr
	FSetControlStyle2   uintptr
	FGetControlStyle2   uintptr
} /* shobjidl.h:1327:9 */

type INameSpaceTreeControl2Vtbl = INameSpaceTreeControl2Vtbl1 /* shobjidl.h:26972:3 */

type NSTCEHITTEST = DWORD /* shobjidl.h:27126:15 */

type NSTCECLICKTYPE = DWORD /* shobjidl.h:27136:15 */
type INameSpaceTreeControlEventsVtbl1 = struct {
	FQueryInterface           uintptr
	FAddRef                   uintptr
	FRelease                  uintptr
	FOnItemClick              uintptr
	FOnPropertyItemCommit     uintptr
	FOnItemStateChanging      uintptr
	FOnItemStateChanged       uintptr
	FOnSelectionChanged       uintptr
	FOnKeyboardInput          uintptr
	FOnBeforeExpand           uintptr
	FOnAfterExpand            uintptr
	FOnBeginLabelEdit         uintptr
	FOnEndLabelEdit           uintptr
	FOnGetToolTip             uintptr
	FOnBeforeItemDelete       uintptr
	FOnItemAdded              uintptr
	FOnItemDeleted            uintptr
	FOnBeforeContextMenu      uintptr
	FOnAfterContextMenu       uintptr
	FOnBeforeStateImageChange uintptr
	FOnGetDefaultIconIndex    uintptr
} /* shobjidl.h:1335:9 */

type INameSpaceTreeControlEventsVtbl = INameSpaceTreeControlEventsVtbl1 /* shobjidl.h:27329:3 */
type INameSpaceTreeControlDropHandlerVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FOnDragEnter    uintptr
	FOnDragOver     uintptr
	FOnDragPosition uintptr
	FOnDrop         uintptr
	FOnDropPosition uintptr
	FOnDragLeave    uintptr
} /* shobjidl.h:1343:9 */

type INameSpaceTreeControlDropHandlerVtbl = INameSpaceTreeControlDropHandlerVtbl1 /* shobjidl.h:27546:3 */
type INameSpaceTreeAccessibleVtbl1 = struct {
	FQueryInterface                  uintptr
	FAddRef                          uintptr
	FRelease                         uintptr
	FOnGetDefaultAccessibilityAction uintptr
	FOnDoDefaultAccessibilityAction  uintptr
	FOnGetAccessibilityRole          uintptr
} /* shobjidl.h:1351:9 */

type INameSpaceTreeAccessibleVtbl = INameSpaceTreeAccessibleVtbl1 /* shobjidl.h:27662:3 */

// ****************************************************************************
//
// INameSpaceTreeControlCustomDraw interface

type NSTCCUSTOMDRAW1 = struct {
	Fpsi         uintptr
	FuItemState  UINT
	Fnstcis      NSTCITEMSTATE
	FpszText     LPCWSTR
	FiImage      int32
	F__ccgo_pad1 [4]byte
	Fhiml        HIMAGELIST
	FiLevel      int32
	FiIndent     int32
} /* shobjidl.h:27714:9 */

// ****************************************************************************
//
// INameSpaceTreeControlCustomDraw interface

type NSTCCUSTOMDRAW = NSTCCUSTOMDRAW1 /* shobjidl.h:27723:3 */
type INameSpaceTreeControlCustomDrawVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FPrePaint       uintptr
	FPostPaint      uintptr
	FItemPrePaint   uintptr
	FItemPostPaint  uintptr
} /* shobjidl.h:1359:9 */

type INameSpaceTreeControlCustomDrawVtbl = INameSpaceTreeControlCustomDrawVtbl1 /* shobjidl.h:27800:3 */
type IPreviewHandlerVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FSetWindow             uintptr
	FSetRect               uintptr
	FDoPreview             uintptr
	FUnload                uintptr
	FSetFocus              uintptr
	FQueryFocus            uintptr
	FTranslateAcceleratorA uintptr
} /* shobjidl.h:1375:9 */

type IPreviewHandlerVtbl = IPreviewHandlerVtbl1 /* shobjidl.h:28026:3 */

// ****************************************************************************
//
// IPreviewHandlerFrame interface

type PREVIEWHANDLERFRAMEINFO1 = struct {
	Fhaccel        HACCEL
	FcAccelEntries UINT
	F__ccgo_pad1   [4]byte
} /* shobjidl.h:28094:9 */

// ****************************************************************************
//
// IPreviewHandlerFrame interface

type PREVIEWHANDLERFRAMEINFO = PREVIEWHANDLERFRAMEINFO1 /* shobjidl.h:28097:3 */
type IPreviewHandlerFrameVtbl1 = struct {
	FQueryInterface        uintptr
	FAddRef                uintptr
	FRelease               uintptr
	FGetWindowContext      uintptr
	FTranslateAcceleratorA uintptr
} /* shobjidl.h:1383:9 */

type IPreviewHandlerFrameVtbl = IPreviewHandlerFrameVtbl1 /* shobjidl.h:28140:3 */
type IDefaultExtractIconInitVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FSetFlags        uintptr
	FSetKey          uintptr
	FSetNormalIcon   uintptr
	FSetOpenIcon     uintptr
	FSetShortcutIcon uintptr
	FSetDefaultIcon  uintptr
} /* shobjidl.h:1423:9 */

type IDefaultExtractIconInitVtbl = IDefaultExtractIconInitVtbl1 /* shobjidl.h:28682:3 */

type EXPCMDSTATE = DWORD /* shobjidl.h:28766:15 */

type EXPCMDFLAGS = DWORD /* shobjidl.h:28782:15 */
type IExplorerCommandVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGetTitle         uintptr
	FGetIcon          uintptr
	FGetToolTip       uintptr
	FGetCanonicalName uintptr
	FGetState         uintptr
	FInvoke           uintptr
	FGetFlags         uintptr
	FEnumSubCommands  uintptr
} /* shobjidl.h:1431:9 */

type IExplorerCommandVtbl = IExplorerCommandVtbl1 /* shobjidl.h:28879:3 */
type IExplorerCommandStateVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetState       uintptr
} /* shobjidl.h:1439:9 */

type IExplorerCommandStateVtbl = IExplorerCommandStateVtbl1 /* shobjidl.h:28989:3 */
type IInitializeCommandVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
} /* shobjidl.h:1447:9 */

type IInitializeCommandVtbl = IInitializeCommandVtbl1 /* shobjidl.h:29069:3 */
type IEnumExplorerCommandVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FNext           uintptr
	FSkip           uintptr
	FReset          uintptr
	FClone          uintptr
} /* shobjidl.h:1455:9 */

type IEnumExplorerCommandVtbl = IEnumExplorerCommandVtbl1 /* shobjidl.h:29171:3 */
type IExplorerCommandProviderVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetCommands    uintptr
	FGetCommand     uintptr
} /* shobjidl.h:1463:9 */

type IExplorerCommandProviderVtbl = IExplorerCommandProviderVtbl1 /* shobjidl.h:29296:3 */

type HTHEME = HANDLE /* shobjidl.h:29338:16 */
type IInitializeNetworkFolderVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
} /* shobjidl.h:1471:9 */

type IInitializeNetworkFolderVtbl = IInitializeNetworkFolderVtbl1 /* shobjidl.h:29388:3 */

type CPVIEW = uint32 /* shobjidl.h:29431:3 */
type IOpenControlPanelVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FOpen           uintptr
	FGetPath        uintptr
	FGetCurrentView uintptr
} /* shobjidl.h:1479:9 */

type IOpenControlPanelVtbl = IOpenControlPanelVtbl1 /* shobjidl.h:29495:3 */
type IComputerInfoChangeNotifyVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FComputerInfoChanged uintptr
} /* shobjidl.h:1487:9 */

type IComputerInfoChangeNotifyVtbl = IComputerInfoChangeNotifyVtbl1 /* shobjidl.h:29580:3 */
type IFileSystemBindDataVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetFindData    uintptr
	FGetFindData    uintptr
} /* shobjidl.h:1495:9 */

type IFileSystemBindDataVtbl = IFileSystemBindDataVtbl1 /* shobjidl.h:29667:3 */
type IFileSystemBindData2Vtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FSetFindData      uintptr
	FGetFindData      uintptr
	FSetFileID        uintptr
	FGetFileID        uintptr
	FSetJunctionCLSID uintptr
	FGetJunctionCLSID uintptr
} /* shobjidl.h:1503:9 */

type IFileSystemBindData2Vtbl = IFileSystemBindData2Vtbl1 /* shobjidl.h:29779:3 */
type IDesktopGadgetVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FRunGadget      uintptr
} /* shobjidl.h:1559:9 */

type IDesktopGadgetVtbl = IDesktopGadgetVtbl1 /* shobjidl.h:30520:3 */

// ****************************************************************************
//
// IHomeGroup interface

type HOMEGROUPSHARINGCHOICES = uint32 /* shobjidl.h:30861:3 */
type IHomeGroupVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FIsMember          uintptr
	FShowSharingWizard uintptr
} /* shobjidl.h:1575:9 */

type IHomeGroupVtbl = IHomeGroupVtbl1 /* shobjidl.h:30908:3 */
type IInitializeWithPropertyStoreVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
} /* shobjidl.h:1583:9 */

type IInitializeWithPropertyStoreVtbl = IInitializeWithPropertyStoreVtbl1 /* shobjidl.h:30990:3 */
type IOpenSearchSourceVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetResults     uintptr
} /* shobjidl.h:1591:9 */

type IOpenSearchSourceVtbl = IOpenSearchSourceVtbl1 /* shobjidl.h:31078:3 */

// ****************************************************************************
//
// IShellLibrary interface

type LIBRARYFOLDERFILTER = uint32 /* shobjidl.h:31126:3 */

type LIBRARYOPTIONFLAGS = uint32 /* shobjidl.h:31132:3 */

type DEFAULTSAVEFOLDERTYPE = uint32 /* shobjidl.h:31140:3 */

type LIBRARYSAVEFLAGS = uint32 /* shobjidl.h:31146:3 */
type IShellLibraryVtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FLoadLibraryFromItem        uintptr
	FLoadLibraryFromKnownFolder uintptr
	FAddFolder                  uintptr
	FRemoveFolder               uintptr
	FGetFolders                 uintptr
	FResolveFolder              uintptr
	FGetDefaultSaveFolder       uintptr
	FSetDefaultSaveFolder       uintptr
	FGetOptions                 uintptr
	FSetOptions                 uintptr
	FGetFolderType              uintptr
	FSetFolderType              uintptr
	FGetIcon                    uintptr
	FSetIcon                    uintptr
	FCommit                     uintptr
	FSave                       uintptr
	FSaveInKnownFolder          uintptr
} /* shobjidl.h:1599:9 */

type IShellLibraryVtbl = IShellLibraryVtbl1 /* shobjidl.h:31329:3 */

type PBM_EVENT = uint32 /* shobjidl.h:31434:3 */
type IPlaybackManagerEventsVtbl1 = struct {
	FQueryInterface         uintptr
	FAddRef                 uintptr
	FRelease                uintptr
	FOnPlaybackManagerEvent uintptr
} /* shobjidl.h:1607:9 */

type IPlaybackManagerEventsVtbl = IPlaybackManagerEventsVtbl1 /* shobjidl.h:31478:3 */

type PBM_SESSION_TYPE = uint32 /* shobjidl.h:31519:3 */

type PBM_PLAY_STATE = uint32 /* shobjidl.h:31525:3 */

type PBM_MUTE_STATE = uint32 /* shobjidl.h:31530:3 */
type IPlaybackManagerVtbl1 = struct {
	FQueryInterface     uintptr
	FAddRef             uintptr
	FRelease            uintptr
	FAdvise             uintptr
	FUnadvise           uintptr
	FChangeSessionState uintptr
} /* shobjidl.h:1615:9 */

type IPlaybackManagerVtbl = IPlaybackManagerVtbl1 /* shobjidl.h:31594:3 */

type DEFAULT_FOLDER_MENU_RESTRICTIONS = uint32 /* shobjidl.h:31650:3 */
type IDefaultFolderMenuInitializeVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FInitialize          uintptr
	FSetMenuRestrictions uintptr
	FGetMenuRestrictions uintptr
	FSetHandlerClsid     uintptr
} /* shobjidl.h:1623:9 */

type IDefaultFolderMenuInitializeVtbl = IDefaultFolderMenuInitializeVtbl1 /* shobjidl.h:31733:3 */

type IExtractIconA1 = struct{ FlpVtbl uintptr } /* shlobj.h:153:3 */

type IExtractIconAVtbl1 = struct {
	FGetIconLocation uintptr
	FExtract         uintptr
} /* shlobj.h:153:3 */

type IExtractIconA = IExtractIconA1         /* shlobj.h:153:3 */
type IExtractIconAVtbl = IExtractIconAVtbl1 /* shlobj.h:153:3 */
type LPEXTRACTICONA = uintptr               /* shlobj.h:157:25 */

type IExtractIconW1 = struct{ FlpVtbl uintptr } /* shlobj.h:161:3 */

type IExtractIconWVtbl1 = struct {
	FGetIconLocation uintptr
	FExtract         uintptr
} /* shlobj.h:161:3 */

type IExtractIconW = IExtractIconW1         /* shlobj.h:161:3 */
type IExtractIconWVtbl = IExtractIconWVtbl1 /* shlobj.h:161:3 */
type LPEXTRACTICONW = uintptr               /* shlobj.h:165:25 */

type IShellIconOverlayIdentifier1 = struct{ FlpVtbl uintptr } /* shlobj.h:173:3 */

type IShellIconOverlayIdentifierVtbl1 = struct {
	FIsMemberOf     uintptr
	FGetOverlayInfo uintptr
	FGetPriority    uintptr
} /* shlobj.h:173:3 */

type IShellIconOverlayIdentifier = IShellIconOverlayIdentifier1         /* shlobj.h:173:3 */
type IShellIconOverlayIdentifierVtbl = IShellIconOverlayIdentifierVtbl1 /* shlobj.h:173:3 */

type IShellIconOverlayManager1 = struct{ FlpVtbl uintptr } /* shlobj.h:184:3 */

type IShellIconOverlayManagerVtbl1 = struct {
	FGetFileOverlayInfo              uintptr
	FGetReservedOverlayInfo          uintptr
	FRefreshOverlayImages            uintptr
	FLoadNonloadedOverlayIdentifiers uintptr
	FOverlayIndexFromImageIndex      uintptr
} /* shlobj.h:184:3 */

type IShellIconOverlayManager = IShellIconOverlayManager1         /* shlobj.h:184:3 */
type IShellIconOverlayManagerVtbl = IShellIconOverlayManagerVtbl1 /* shlobj.h:184:3 */

type IShellIconOverlay1 = struct{ FlpVtbl uintptr } /* shlobj.h:202:3 */

type IShellIconOverlayVtbl1 = struct {
	FGetOverlayIndex     uintptr
	FGetOverlayIconIndex uintptr
} /* shlobj.h:202:3 */

type IShellIconOverlay = IShellIconOverlay1         /* shlobj.h:202:3 */
type IShellIconOverlayVtbl = IShellIconOverlayVtbl1 /* shlobj.h:202:3 */

type SHELL_LINK_DATA_FLAGS = int32 /* shlobj.h:264:5 */

type TagDATABLOCKHEADER = struct {
	FcbSize      DWORD
	FdwSignature DWORD
} /* shlobj.h:268:11 */

type DATABLOCK_HEADER = TagDATABLOCKHEADER /* shlobj.h:271:5 */
type LPDATABLOCK_HEADER = uintptr          /* shlobj.h:271:22 */
type LPDBLIST = uintptr                    /* shlobj.h:271:42 */

type NT_CONSOLE_PROPS = struct {
	F__0 struct {
		FcbSize      DWORD
		FdwSignature DWORD
	}
	FwFillAttribute          WORD
	FwPopupFillAttribute     WORD
	FdwScreenBufferSize      COORD
	FdwWindowSize            COORD
	FdwWindowOrigin          COORD
	FnFont                   DWORD
	FnInputBufferSize        DWORD
	FdwFontSize              COORD
	FuFontFamily             UINT
	FuFontWeight             UINT
	FFaceName                [32]WCHAR
	FuCursorSize             UINT
	FbFullScreen             WINBOOL
	FbQuickEdit              WINBOOL
	FbInsertMode             WINBOOL
	FbAutoPosition           WINBOOL
	FuHistoryBufferSize      UINT
	FuNumberOfHistoryBuffers UINT
	FbHistoryNoDup           WINBOOL
	FColorTable              [16]COLORREF
}                                 /* shlobj.h:304:5 */
type LPNT_CONSOLE_PROPS = uintptr /* shlobj.h:304:22 */

type NT_FE_CONSOLE_PROPS = struct {
	F__0 struct {
		FcbSize      DWORD
		FdwSignature DWORD
	}
	FuCodePage UINT
}                                    /* shlobj.h:321:5 */
type LPNT_FE_CONSOLE_PROPS = uintptr /* shlobj.h:321:25 */

type EXP_DARWIN_LINK = struct {
	F__0 struct {
		FcbSize      DWORD
		FdwSignature DWORD
	}
	FszDarwinID  [260]CHAR
	FszwDarwinID [260]WCHAR
}                                /* shlobj.h:336:5 */
type LPEXP_DARWIN_LINK = uintptr /* shlobj.h:336:21 */

type EXP_SPECIAL_FOLDER = struct {
	FcbSize          DWORD
	FdwSignature     DWORD
	FidSpecialFolder DWORD
	FcbOffset        DWORD
}                                   /* shlobj.h:347:5 */
type LPEXP_SPECIAL_FOLDER = uintptr /* shlobj.h:347:24 */

type EXP_SZ_LINK = struct {
	FcbSize      DWORD
	FdwSignature DWORD
	FszTarget    [260]CHAR
	FswzTarget   [260]WCHAR
}                            /* shlobj.h:354:5 */
type LPEXP_SZ_LINK = uintptr /* shlobj.h:354:17 */

type IURLSearchHook1 = struct{ FlpVtbl uintptr } /* shlobj.h:389:3 */

type IURLSearchHookVtbl1 = struct{ FTranslate uintptr } /* shlobj.h:389:3 */

type IURLSearchHook = IURLSearchHook1         /* shlobj.h:389:3 */
type IURLSearchHookVtbl = IURLSearchHookVtbl1 /* shlobj.h:389:3 */

type ISearchContext1 = struct{ FlpVtbl uintptr } /* shlobj.h:395:3 */

type ISearchContextVtbl1 = struct {
	FGetSearchUrl   uintptr
	FGetSearchText  uintptr
	FGetSearchStyle uintptr
} /* shlobj.h:395:3 */

type ISearchContext = ISearchContext1         /* shlobj.h:395:3 */
type ISearchContextVtbl = ISearchContextVtbl1 /* shlobj.h:395:3 */

type IURLSearchHook21 = struct{ FlpVtbl uintptr } /* shlobj.h:403:3 */

type IURLSearchHook2Vtbl1 = struct{ FTranslateWithSearchContext uintptr } /* shlobj.h:403:3 */

type IURLSearchHook2 = IURLSearchHook21         /* shlobj.h:403:3 */
type IURLSearchHook2Vtbl = IURLSearchHook2Vtbl1 /* shlobj.h:403:3 */

type INewShortcutHookA1 = struct{ FlpVtbl uintptr } /* shlobj.h:409:3 */

type INewShortcutHookAVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetReferent    uintptr
	FGetReferent    uintptr
	FSetFolder      uintptr
	FGetFolder      uintptr
	FGetName        uintptr
	FGetExtension   uintptr
} /* shlobj.h:409:3 */

type INewShortcutHookA = INewShortcutHookA1         /* shlobj.h:409:3 */
type INewShortcutHookAVtbl = INewShortcutHookAVtbl1 /* shlobj.h:409:3 */

type INewShortcutHookW1 = struct{ FlpVtbl uintptr } /* shlobj.h:423:3 */

type INewShortcutHookWVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FSetReferent    uintptr
	FGetReferent    uintptr
	FSetFolder      uintptr
	FGetFolder      uintptr
	FGetName        uintptr
	FGetExtension   uintptr
} /* shlobj.h:423:3 */

type INewShortcutHookW = INewShortcutHookW1         /* shlobj.h:423:3 */
type INewShortcutHookWVtbl = INewShortcutHookWVtbl1 /* shlobj.h:423:3 */

type ICopyHookA1 = struct{ FlpVtbl uintptr } /* shlobj.h:440:3 */

type ICopyHookAVtbl1 = struct{ FCopyCallback uintptr } /* shlobj.h:440:3 */

type ICopyHookA = ICopyHookA1         /* shlobj.h:440:3 */
type ICopyHookAVtbl = ICopyHookAVtbl1 /* shlobj.h:440:3 */
type LPCOPYHOOKA = uintptr            /* shlobj.h:443:22 */

type ICopyHookW1 = struct{ FlpVtbl uintptr } /* shlobj.h:447:3 */

type ICopyHookWVtbl1 = struct{ FCopyCallback uintptr } /* shlobj.h:447:3 */

type ICopyHookW = ICopyHookW1         /* shlobj.h:447:3 */
type ICopyHookWVtbl = ICopyHookWVtbl1 /* shlobj.h:447:3 */
type LPCOPYHOOKW = uintptr            /* shlobj.h:450:22 */

type BFFCALLBACK = uintptr /* shlobj.h:801:15 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_browseinfoA = struct {
	FhwndOwner      HWND
	FpidlRoot       LPCITEMIDLIST
	FpszDisplayName LPSTR
	FlpszTitle      LPCSTR
	FulFlags        UINT
	F__ccgo_pad1    [4]byte
	Flpfn           BFFCALLBACK
	FlParam         LPARAM
	FiImage         int32
	F__ccgo_pad2    [4]byte
} /* shlobj.h:804:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type BROWSEINFOA = X_browseinfoA /* shlobj.h:813:5 */
type PBROWSEINFOA = uintptr      /* shlobj.h:813:17 */
type LPBROWSEINFOA = uintptr     /* shlobj.h:813:31 */

type X_browseinfoW = struct {
	FhwndOwner      HWND
	FpidlRoot       LPCITEMIDLIST
	FpszDisplayName LPWSTR
	FlpszTitle      LPCWSTR
	FulFlags        UINT
	F__ccgo_pad1    [4]byte
	Flpfn           BFFCALLBACK
	FlParam         LPARAM
	FiImage         int32
	F__ccgo_pad2    [4]byte
} /* shlobj.h:815:11 */

type BROWSEINFOW = X_browseinfoW /* shlobj.h:824:5 */
type PBROWSEINFOW = uintptr      /* shlobj.h:824:17 */
type LPBROWSEINFOW = uintptr     /* shlobj.h:824:31 */

type IShellDetails1 = struct{ FlpVtbl uintptr } /* shlobj.h:896:3 */

type IShellDetailsVtbl1 = struct {
	FGetDetailsOf uintptr
	FColumnClick  uintptr
} /* shlobj.h:896:3 */

type IShellDetails = IShellDetails1         /* shlobj.h:896:3 */
type IShellDetailsVtbl = IShellDetailsVtbl1 /* shlobj.h:896:3 */

type IObjMgr1 = struct{ FlpVtbl uintptr } /* shlobj.h:903:3 */

type IObjMgrVtbl1 = struct {
	FAppend uintptr
	FRemove uintptr
} /* shlobj.h:903:3 */

type IObjMgr = IObjMgr1         /* shlobj.h:903:3 */
type IObjMgrVtbl = IObjMgrVtbl1 /* shlobj.h:903:3 */

type ICurrentWorkingDirectory1 = struct{ FlpVtbl uintptr } /* shlobj.h:910:3 */

type ICurrentWorkingDirectoryVtbl1 = struct {
	FGetDirectory uintptr
	FSetDirectory uintptr
} /* shlobj.h:910:3 */

type ICurrentWorkingDirectory = ICurrentWorkingDirectory1         /* shlobj.h:910:3 */
type ICurrentWorkingDirectoryVtbl = ICurrentWorkingDirectoryVtbl1 /* shlobj.h:910:3 */

type IACList1 = struct{ FlpVtbl uintptr } /* shlobj.h:917:3 */

type IACListVtbl1 = struct{ FExpand uintptr } /* shlobj.h:917:3 */

type IACList = IACList1         /* shlobj.h:917:3 */
type IACListVtbl = IACListVtbl1 /* shlobj.h:917:3 */

type AUTOCOMPLETELISTOPTIONS = uint32 /* shlobj.h:936:5 */

type IACList21 = struct{ FlpVtbl uintptr } /* shlobj.h:938:3 */

type IACList2Vtbl1 = struct {
	FSetOptions uintptr
	FGetOptions uintptr
} /* shlobj.h:938:3 */

type IACList2 = IACList21         /* shlobj.h:938:3 */
type IACList2Vtbl = IACList2Vtbl1 /* shlobj.h:938:3 */

type IProgressDialog1 = struct{ FlpVtbl uintptr } /* shlobj.h:963:3 */

type IProgressDialogVtbl1 = struct {
	FStartProgressDialog uintptr
	FStopProgressDialog  uintptr
	FSetTitle            uintptr
	FSetAnimation        uintptr
	FHasUserCancelled    uintptr
	FSetProgress         uintptr
	FSetProgress64       uintptr
	FSetLine             uintptr
	FSetCancelMsg        uintptr
	FTimer               uintptr
} /* shlobj.h:963:3 */

type IProgressDialog = IProgressDialog1         /* shlobj.h:963:3 */
type IProgressDialogVtbl = IProgressDialogVtbl1 /* shlobj.h:963:3 */

type IDockingWindowSite1 = struct{ FlpVtbl uintptr } /* shlobj.h:978:3 */

type IDockingWindowSiteVtbl1 = struct {
	FGetBorderDW          uintptr
	FRequestBorderSpaceDW uintptr
	FSetBorderSpaceDW     uintptr
} /* shlobj.h:978:3 */

type IDockingWindowSite = IDockingWindowSite1         /* shlobj.h:978:3 */
type IDockingWindowSiteVtbl = IDockingWindowSiteVtbl1 /* shlobj.h:978:3 */

type IDockingWindowFrame1 = struct{ FlpVtbl uintptr } /* shlobj.h:994:3 */

type IDockingWindowFrameVtbl1 = struct {
	FAddToolbar    uintptr
	FRemoveToolbar uintptr
	FFindToolbar   uintptr
} /* shlobj.h:994:3 */

type IDockingWindowFrame = IDockingWindowFrame1         /* shlobj.h:994:3 */
type IDockingWindowFrameVtbl = IDockingWindowFrameVtbl1 /* shlobj.h:994:3 */

type IThumbnailCapture1 = struct{ FlpVtbl uintptr } /* shlobj.h:1002:3 */

type IThumbnailCaptureVtbl1 = struct{ FCaptureThumbnail uintptr } /* shlobj.h:1002:3 */

type IThumbnailCapture = IThumbnailCapture1         /* shlobj.h:1002:3 */
type IThumbnailCaptureVtbl = IThumbnailCaptureVtbl1 /* shlobj.h:1002:3 */
type LPTHUMBNAILCAPTURE = uintptr                   /* shlobj.h:1005:29 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_EnumImageStoreDATAtag = struct {
	FszPath      [260]WCHAR
	FftTimeStamp FILETIME
} /* shlobj.h:1009:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type ENUMSHELLIMAGESTOREDATA = X_EnumImageStoreDATAtag /* shlobj.h:1012:5 */
type PENUMSHELLIMAGESTOREDATA = uintptr                /* shlobj.h:1012:29 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IEnumShellImageStore1 = struct{ FlpVtbl uintptr } /* shlobj.h:1017:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IEnumShellImageStoreVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FReset          uintptr
	FNext           uintptr
	FSkip           uintptr
	FClone          uintptr
} /* shlobj.h:1017:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IEnumShellImageStore = IEnumShellImageStore1         /* shlobj.h:1017:3 */
type IEnumShellImageStoreVtbl = IEnumShellImageStoreVtbl1 /* shlobj.h:1017:3 */
type LPENUMSHELLIMAGESTORE = uintptr                      /* shlobj.h:1026:32 */

type IShellImageStore1 = struct{ FlpVtbl uintptr } /* shlobj.h:1033:3 */

type IShellImageStoreVtbl1 = struct {
	FQueryInterface  uintptr
	FAddRef          uintptr
	FRelease         uintptr
	FOpen            uintptr
	FCreate          uintptr
	FReleaseLock     uintptr
	FClose           uintptr
	FCommit          uintptr
	FIsLocked        uintptr
	FGetMode         uintptr
	FGetCapabilities uintptr
	FAddEntry        uintptr
	FGetEntry        uintptr
	FDeleteEntry     uintptr
	FIsEntryInStore  uintptr
	FEnum            uintptr
} /* shlobj.h:1033:3 */

type IShellImageStore = IShellImageStore1         /* shlobj.h:1033:3 */
type IShellImageStoreVtbl = IShellImageStoreVtbl1 /* shlobj.h:1033:3 */
type LPSHELLIMAGESTORE = uintptr                  /* shlobj.h:1051:28 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type BANDINFOSFB = struct {
	FdwMask      DWORD
	FdwStateMask DWORD
	FdwState     DWORD
	FcrBkgnd     COLORREF
	FcrBtnLt     COLORREF
	FcrBtnDk     COLORREF
	FwViewMode   WORD
	FwAlign      WORD
	F__ccgo_pad1 [4]byte
	Fpsf         uintptr
	Fpidl        LPITEMIDLIST
}                           /* shlobj.h:1089:5 */
type PBANDINFOSFB = uintptr /* shlobj.h:1089:17 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IShellFolderBand1 = struct{ FlpVtbl uintptr } /* shlobj.h:1094:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IShellFolderBandVtbl1 = struct {
	FInitializeSFB  uintptr
	FSetBandInfoSFB uintptr
	FGetBandInfoSFB uintptr
} /* shlobj.h:1094:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IShellFolderBand = IShellFolderBand1         /* shlobj.h:1094:3 */
type IShellFolderBandVtbl = IShellFolderBandVtbl1 /* shlobj.h:1094:3 */

type IDeskBarClient1 = struct{ FlpVtbl uintptr } /* shlobj.h:1105:3 */

type IDeskBarClientVtbl1 = struct {
	FSetDeskBarSite uintptr
	FSetModeDBC     uintptr
	FUIActivateDBC  uintptr
	FGetSize        uintptr
} /* shlobj.h:1105:3 */

type IDeskBarClient = IDeskBarClient1         /* shlobj.h:1105:3 */
type IDeskBarClientVtbl = IDeskBarClientVtbl1 /* shlobj.h:1105:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SHCOLUMNINFO = struct {
	Fscid           SHCOLUMNID
	Fvt             VARTYPE
	F__ccgo_pad1    [2]byte
	Ffmt            DWORD
	FcChars         UINT
	FcsFlags        DWORD
	FwszTitle       [80]WCHAR
	FwszDescription [128]WCHAR
}                             /* shlobj.h:1369:5 */
type LPSHCOLUMNINFO = uintptr /* shlobj.h:1369:18 */

type LPCSHCOLUMNINFO = uintptr /* shlobj.h:1371:30 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SHCOLUMNINIT = struct {
	FdwFlags    ULONG
	FdwReserved ULONG
	FwszFolder  [260]WCHAR
}                             /* shlobj.h:1379:5 */
type LPSHCOLUMNINIT = uintptr /* shlobj.h:1379:18 */

type LPCSHCOLUMNINIT = uintptr /* shlobj.h:1381:30 */

type SHCOLUMNDATA = struct {
	FdwFlags          ULONG
	FdwFileAttributes DWORD
	FdwReserved       ULONG
	F__ccgo_pad1      [4]byte
	FpwszExt          uintptr
	FwszFile          [260]WCHAR
}                             /* shlobj.h:1391:5 */
type LPSHCOLUMNDATA = uintptr /* shlobj.h:1391:18 */

type LPCSHCOLUMNDATA = uintptr /* shlobj.h:1393:30 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IColumnProvider1 = struct{ FlpVtbl uintptr } /* shlobj.h:1398:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IColumnProviderVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FInitialize     uintptr
	FGetColumnInfo  uintptr
	FGetItemData    uintptr
} /* shlobj.h:1398:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type IColumnProvider = IColumnProvider1         /* shlobj.h:1398:3 */
type IColumnProviderVtbl = IColumnProviderVtbl1 /* shlobj.h:1398:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_NRESARRAY = struct {
	FcItems      UINT
	F__ccgo_pad1 [4]byte
	Fnr          [1]NETRESOURCE2
} /* shlobj.h:1447:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type NRESARRAY = X_NRESARRAY /* shlobj.h:1450:5 */
type LPNRESARRAY = uintptr   /* shlobj.h:1450:15 */
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_IDA = struct {
	Fcidl    UINT
	Faoffset [1]UINT
} /* shlobj.h:1453:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type CIDA = X_IDA    /* shlobj.h:1456:5 */
type LPIDA = uintptr /* shlobj.h:1456:10 */

type FD_FLAGS = uint32 /* shlobj.h:1471:5 */

type X_FILEDESCRIPTORA = struct {
	FdwFlags          DWORD
	Fclsid            CLSID
	Fsizel            SIZEL
	Fpointl           POINTL
	FdwFileAttributes DWORD
	FftCreationTime   FILETIME
	FftLastAccessTime FILETIME
	FftLastWriteTime  FILETIME
	FnFileSizeHigh    DWORD
	FnFileSizeLow     DWORD
	FcFileName        [260]CHAR
} /* shlobj.h:1473:11 */

type FILEDESCRIPTORA = X_FILEDESCRIPTORA /* shlobj.h:1485:5 */
type LPFILEDESCRIPTORA = uintptr         /* shlobj.h:1485:21 */

type X_FILEDESCRIPTORW = struct {
	FdwFlags          DWORD
	Fclsid            CLSID
	Fsizel            SIZEL
	Fpointl           POINTL
	FdwFileAttributes DWORD
	FftCreationTime   FILETIME
	FftLastAccessTime FILETIME
	FftLastWriteTime  FILETIME
	FnFileSizeHigh    DWORD
	FnFileSizeLow     DWORD
	FcFileName        [260]WCHAR
} /* shlobj.h:1487:11 */

type FILEDESCRIPTORW = X_FILEDESCRIPTORW /* shlobj.h:1499:5 */
type LPFILEDESCRIPTORW = uintptr         /* shlobj.h:1499:21 */

type X_FILEGROUPDESCRIPTORA = struct {
	FcItems UINT
	Ffgd    [1]FILEDESCRIPTORA
} /* shlobj.h:1504:11 */

type FILEGROUPDESCRIPTORA = X_FILEGROUPDESCRIPTORA /* shlobj.h:1507:5 */
type LPFILEGROUPDESCRIPTORA = uintptr              /* shlobj.h:1507:26 */

type X_FILEGROUPDESCRIPTORW = struct {
	FcItems UINT
	Ffgd    [1]FILEDESCRIPTORW
} /* shlobj.h:1509:11 */

type FILEGROUPDESCRIPTORW = X_FILEGROUPDESCRIPTORW /* shlobj.h:1512:5 */
type LPFILEGROUPDESCRIPTORW = uintptr              /* shlobj.h:1512:26 */

type X_DROPFILES = struct {
	FpFiles DWORD
	Fpt     POINT
	FfNC    WINBOOL
	FfWide  WINBOOL
} /* shlobj.h:1517:11 */

type DROPFILES = X_DROPFILES /* shlobj.h:1522:5 */
type LPDROPFILES = uintptr   /* shlobj.h:1522:15 */

type X_SHChangeNotifyEntry = struct {
	Fpidl        LPCITEMIDLIST
	FfRecursive  WINBOOL
	F__ccgo_pad1 [4]byte
} /* shlobj.h:1552:11 */

type SHChangeNotifyEntry = X_SHChangeNotifyEntry /* shlobj.h:1555:5 */

type IShellChangeNotify1 = struct{ FlpVtbl uintptr } /* shlobj.h:1614:3 */

type IShellChangeNotifyVtbl1 = struct{ FOnChange uintptr } /* shlobj.h:1614:3 */

type IShellChangeNotify = IShellChangeNotify1         /* shlobj.h:1614:3 */
type IShellChangeNotifyVtbl = IShellChangeNotifyVtbl1 /* shlobj.h:1614:3 */

type IQueryInfo1 = struct{ FlpVtbl uintptr } /* shlobj.h:1620:3 */

type IQueryInfoVtbl1 = struct {
	FGetInfoTip   uintptr
	FGetInfoFlags uintptr
} /* shlobj.h:1620:3 */

type IQueryInfo = IQueryInfo1         /* shlobj.h:1620:3 */
type IQueryInfoVtbl = IQueryInfoVtbl1 /* shlobj.h:1620:3 */

type SHARD = uint32 /* shlobj.h:1648:5 */

type X_SHChangeDWORDAsIDList = struct {
	Fcb          USHORT
	F__ccgo_pad1 [2]byte
	FdwItem1     DWORD
	FdwItem2     DWORD
	FcbZero      USHORT
	F__ccgo_pad2 [2]byte
} /* shlobj.h:1672:11 */

type SHChangeDWORDAsIDList = X_SHChangeDWORDAsIDList /* shlobj.h:1677:5 */
type LPSHChangeDWORDAsIDList = uintptr               /* shlobj.h:1677:27 */

type X_SHChangeUpdateImageIDList = struct {
	Fcb          USHORT
	F__ccgo_pad1 [2]byte
	FiIconIndex  int32
	FiCurIndex   int32
	FuFlags      UINT
	FdwProcessID DWORD
	FszName      [260]WCHAR
	FcbZero      USHORT
	F__ccgo_pad2 [2]byte
} /* shlobj.h:1679:11 */

type SHChangeUpdateImageIDList = X_SHChangeUpdateImageIDList /* shlobj.h:1687:5 */
type LPSHChangeUpdateImageIDList = uintptr                   /* shlobj.h:1687:31 */

type X_SHChangeProductKeyAsIDList = struct {
	Fcb            USHORT
	FwszProductKey [39]WCHAR
	FcbZero        USHORT
} /* shlobj.h:1691:11 */

type SHChangeProductKeyAsIDList = X_SHChangeProductKeyAsIDList /* shlobj.h:1695:5 */
type LPSHChangeProductKeyAsIDList = uintptr                    /* shlobj.h:1695:32 */

type SCNRT_STATUS = uint32 /* shlobj.h:1708:5 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_SHDESCRIPTIONID = struct {
	FdwDescriptionId DWORD
	Fclsid           CLSID
} /* shlobj.h:1747:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type SHDESCRIPTIONID = X_SHDESCRIPTIONID /* shlobj.h:1750:5 */
type LPSHDESCRIPTIONID = uintptr         /* shlobj.h:1750:21 */

type AUTO_SCROLL_DATA = struct {
	FiNextSample  int32
	FdwLastScroll DWORD
	FbFull        WINBOOL
	Fpts          [3]POINT
	FdwTimes      [3]DWORD
} /* shlobj.h:1782:5 */

type CABINETSTATE = struct {
	FcLength         WORD
	FnVersion        WORD
	FfFullPathTitle  uint16 /* WINBOOL fFullPathTitle: 1, WINBOOL fSaveLocalView: 1, WINBOOL fNotShell: 1, WINBOOL fSimpleDefault: 1, WINBOOL fDontShowDescBar: 1, WINBOOL fNewWindowMode: 1, WINBOOL fShowCompColor: 1, WINBOOL fDontPrettyNames: 1, WINBOOL fAdminsCreateCommonGroups: 1, UINT fUnusedFlags: 7 */
	F__ccgo_pad1     [2]byte
	FfMenuEnumFilter UINT
}                             /* shlobj.h:1806:5 */
type LPCABINETSTATE = uintptr /* shlobj.h:1806:18 */

type HPSXA__ = struct{ Funused int32 } /* shlobj.h:1857:3 */

type HPSXA = uintptr /* shlobj.h:1857:3 */

type IDefViewFrame1 = struct{ FlpVtbl uintptr } /* shlobj.h:1868:3 */

type IDefViewFrameVtbl1 = struct {
	FGetWindowLV     uintptr
	FReleaseWindowLV uintptr
	FGetShellFolder  uintptr
} /* shlobj.h:1868:3 */

type IDefViewFrame = IDefViewFrame1         /* shlobj.h:1868:3 */
type IDefViewFrameVtbl = IDefViewFrameVtbl1 /* shlobj.h:1868:3 */

type RESTRICTIONS = uint32 /* shlobj.h:2055:5 */

type OPEN_AS_INFO_FLAGS = int32 /* shlobj.h:2103:15 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type X_openasinfo = struct {
	FpcszFile    LPCWSTR
	FpcszClass   LPCWSTR
	FoaifInFlags OPEN_AS_INFO_FLAGS
	F__ccgo_pad1 [4]byte
} /* shlobj.h:2106:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type OPENASINFO = X_openasinfo /* shlobj.h:2110:5 */
type POPENASINFO = uintptr     /* shlobj.h:2110:16 */

type IDocViewSite1 = struct{ FlpVtbl uintptr } /* shlobj.h:2127:3 */

type IDocViewSiteVtbl1 = struct{ FOnSetTitle uintptr } /* shlobj.h:2127:3 */

type IDocViewSite = IDocViewSite1         /* shlobj.h:2127:3 */
type IDocViewSiteVtbl = IDocViewSiteVtbl1 /* shlobj.h:2127:3 */

type PROPPRG1 = struct {
	FflPrg           WORD
	FflPrgInit       WORD
	FachTitle        [30]CHAR
	FachCmdLine      [128]CHAR
	FachWorkDir      [64]CHAR
	FwHotKey         WORD
	FachIconFile     [80]CHAR
	FwIconIndex      WORD
	F__ccgo_pad1     [2]byte
	FdwEnhModeFlags  DWORD
	FdwRealModeFlags DWORD
	FachOtherFile    [80]CHAR
	FachPIFFile      [260]CHAR
} /* shlobj.h:2159:11 */

type PROPPRG = PROPPRG1 /* shlobj.h:2172:5 */

type PPROPPRG = uintptr   /* shlobj.h:2174:29 */
type LPPROPPRG = uintptr  /* shlobj.h:2175:29 */
type LPCPROPPRG = uintptr /* shlobj.h:2176:35 */

type IInitializeObject1 = struct{ FlpVtbl uintptr } /* shlobj.h:2187:3 */

type IInitializeObjectVtbl1 = struct{ FInitialize uintptr } /* shlobj.h:2187:3 */

type IInitializeObject = IInitializeObject1         /* shlobj.h:2187:3 */
type IInitializeObjectVtbl = IInitializeObjectVtbl1 /* shlobj.h:2187:3 */

type IBanneredBar1 = struct{ FlpVtbl uintptr } /* shlobj.h:2198:3 */

type IBanneredBarVtbl1 = struct {
	FSetIconSize uintptr
	FGetIconSize uintptr
	FSetBitmap   uintptr
	FGetBitmap   uintptr
} /* shlobj.h:2198:3 */

type IBanneredBar = IBanneredBar1         /* shlobj.h:2198:3 */
type IBanneredBarVtbl = IBanneredBarVtbl1 /* shlobj.h:2198:3 */

type IShellFolderViewCB1 = struct{ FlpVtbl uintptr } /* shlobj.h:2208:3 */

type IShellFolderViewCBVtbl1 = struct{ FMessageSFVCB uintptr } /* shlobj.h:2208:3 */

type IShellFolderViewCB = IShellFolderViewCB1         /* shlobj.h:2208:3 */
type IShellFolderViewCBVtbl = IShellFolderViewCBVtbl1 /* shlobj.h:2208:3 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_QCMINFO_IDMAP_PLACEMENT = struct {
	Fid     UINT
	FfFlags UINT
} /* shlobj.h:2217:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type QCMINFO_IDMAP_PLACEMENT = X_QCMINFO_IDMAP_PLACEMENT /* shlobj.h:2220:5 */

type X_QCMINFO_IDMAP = struct {
	FnMaxIds UINT
	FpIdList [1]QCMINFO_IDMAP_PLACEMENT
} /* shlobj.h:2222:11 */

type QCMINFO_IDMAP = X_QCMINFO_IDMAP /* shlobj.h:2225:5 */

type X_QCMINFO = struct {
	Fhmenu       HMENU
	FindexMenu   UINT
	FidCmdFirst  UINT
	FidCmdLast   UINT
	F__ccgo_pad1 [4]byte
	FpIdMap      uintptr
} /* shlobj.h:2227:11 */

type QCMINFO = X_QCMINFO /* shlobj.h:2233:5 */

type LPQCMINFO = uintptr /* shlobj.h:2235:19 */

type X_TBINFO = struct {
	Fcbuttons UINT
	FuFlags   UINT
} /* shlobj.h:2245:11 */

type TBINFO = X_TBINFO /* shlobj.h:2248:5 */

type LPTBINFO = uintptr /* shlobj.h:2250:18 */

type X_DETAILSINFO = struct {
	Fpidl        LPCITEMIDLIST
	Ffmt         int32
	FcxChar      int32
	Fstr         STRRET
	FiImage      int32
	F__ccgo_pad1 [4]byte
} /* shlobj.h:2252:11 */

type DETAILSINFO = X_DETAILSINFO /* shlobj.h:2258:5 */

type PDETAILSINFO = uintptr /* shlobj.h:2260:23 */

type X_SFVM_PROPPAGE_DATA = struct {
	FdwReserved  DWORD
	F__ccgo_pad1 [4]byte
	Fpfn         LPFNADDPROPSHEETPAGE
	FlParam      LPARAM
} /* shlobj.h:2262:11 */

type SFVM_PROPPAGE_DATA = X_SFVM_PROPPAGE_DATA /* shlobj.h:2266:5 */

type X_SFVM_HELPTOPIC_DATA = struct {
	FwszHelpFile  [260]WCHAR
	FwszHelpTopic [260]WCHAR
} /* shlobj.h:2268:11 */

type SFVM_HELPTOPIC_DATA = X_SFVM_HELPTOPIC_DATA /* shlobj.h:2271:5 */

type X_ITEMSPACING = struct {
	FcxSmall int32
	FcySmall int32
	FcxLarge int32
	FcyLarge int32
} /* shlobj.h:2303:11 */

type ITEMSPACING = X_ITEMSPACING /* shlobj.h:2308:5 */

type IShellFolderView1 = struct{ FlpVtbl uintptr } /* shlobj.h:2319:3 */

type IShellFolderViewVtbl1 = struct {
	FRearrange           uintptr
	FGetArrangeParam     uintptr
	FArrangeGrid         uintptr
	FAutoArrange         uintptr
	FGetAutoArrange      uintptr
	FAddObject           uintptr
	FGetObjectA          uintptr
	FRemoveObject        uintptr
	FGetObjectCount      uintptr
	FSetObjectCount      uintptr
	FUpdateObject        uintptr
	FRefreshObject       uintptr
	FSetRedraw           uintptr
	FGetSelectedCount    uintptr
	FGetSelectedObjects  uintptr
	FIsDropOnSource      uintptr
	FGetDragPoint        uintptr
	FGetDropPoint        uintptr
	FMoveIcons           uintptr
	FSetItemPos          uintptr
	FIsBkDropTarget      uintptr
	FSetClipboard        uintptr
	FSetPoints           uintptr
	FGetItemSpacing      uintptr
	FSetCallback         uintptr
	FSelect              uintptr
	FQuerySupport        uintptr
	FSetAutomationObject uintptr
} /* shlobj.h:2319:3 */

type IShellFolderView = IShellFolderView1         /* shlobj.h:2319:3 */
type IShellFolderViewVtbl = IShellFolderViewVtbl1 /* shlobj.h:2319:3 */

type X_SFV_CREATE = struct {
	FcbSize      UINT
	F__ccgo_pad1 [4]byte
	Fpshf        uintptr
	FpsvOuter    uintptr
	Fpsfvcb      uintptr
} /* shlobj.h:2350:11 */

type SFV_CREATE = X_SFV_CREATE /* shlobj.h:2355:5 */

type LPFNDFMCALLBACK = uintptr /* shlobj.h:2359:19 */

type DEFCONTEXTMENU = struct {
	Fhwnd                HWND
	Fpcmcb               uintptr
	FpidlFolder          LPCITEMIDLIST
	Fpsf                 uintptr
	Fcidl                UINT
	F__ccgo_pad1         [4]byte
	Fapidl               uintptr
	FpunkAssociationInfo uintptr
	FcKeys               UINT
	F__ccgo_pad2         [4]byte
	FaKeys               uintptr
} /* shlobj.h:2373:5 */

type DFMICS = struct {
	FcbSize     DWORD
	FfMask      DWORD
	FlParam     LPARAM
	FidCmdFirst UINT
	FidDefMax   UINT
	Fpici       LPCMINVOKECOMMANDINFO
}                      /* shlobj.h:2393:5 */
type PDFMICS = uintptr /* shlobj.h:2393:12 */

type LPFNVIEWCALLBACK = uintptr /* shlobj.h:2426:19 */

type X_CSFV = struct {
	FcbSize      UINT
	F__ccgo_pad1 [4]byte
	Fpshf        uintptr
	FpsvOuter    uintptr
	Fpidl        LPCITEMIDLIST
	FlEvents     LONG
	F__ccgo_pad2 [4]byte
	FpfnCallback LPFNVIEWCALLBACK
	Ffvm         FOLDERVIEWMODE
	F__ccgo_pad3 [4]byte
} /* shlobj.h:2428:11 */

type CSFV = X_CSFV    /* shlobj.h:2436:5 */
type LPCSFV = uintptr /* shlobj.h:2436:10 */

type X_SFV_SETITEMPOS = struct {
	Fpidl LPCITEMIDLIST
	Fpt   POINT
} /* shlobj.h:2456:11 */

type SFV_SETITEMPOS = X_SFV_SETITEMPOS /* shlobj.h:2459:5 */

type LPSFV_SETITEMPOS = uintptr /* shlobj.h:2461:26 */
type PCSFV_SETITEMPOS = uintptr /* shlobj.h:2462:32 */

type SHELLSTATEA = struct {
	FfShowAllObjects uint32 /* WINBOOL fShowAllObjects: 1, WINBOOL fShowExtensions: 1, WINBOOL fNoConfirmRecycle: 1, WINBOOL fShowSysFiles: 1, WINBOOL fShowCompColor: 1, WINBOOL fDoubleClickInWebView: 1, WINBOOL fDesktopHTML: 1, WINBOOL fWin95Classic: 1, WINBOOL fDontPrettyPath: 1, WINBOOL fShowAttribCol: 1, WINBOOL fMapNetDrvBtn: 1, WINBOOL fShowInfoTip: 1, WINBOOL fHideIcons: 1, WINBOOL fWebView: 1, WINBOOL fFilter: 1, WINBOOL fShowSuperHidden: 1, WINBOOL fNoNetCrawling: 1 */
	FdwWin95Unused   DWORD
	FuWin95Unused    UINT
	FlParamSort      LONG
	FiSortDirection  int32
	Fversion         UINT
	FuNotUsed        UINT
	FfSepProcess     uint16 /* WINBOOL fSepProcess: 1, WINBOOL fStartPanelOn: 1, WINBOOL fShowStartPage: 1, WINBOOL fAutoCheckSelect: 1, WINBOOL fIconsOnly: 1, WINBOOL fShowTypeOverlay: 1, WINBOOL fShowStatusBar: 1, UINT fSpareFlags: 9 */
	F__ccgo_pad1     [2]byte
}                            /* shlobj.h:2548:3 */
type LPSHELLSTATEA = uintptr /* shlobj.h:2548:15 */

type SHELLSTATEW = struct {
	FfShowAllObjects uint32 /* WINBOOL fShowAllObjects: 1, WINBOOL fShowExtensions: 1, WINBOOL fNoConfirmRecycle: 1, WINBOOL fShowSysFiles: 1, WINBOOL fShowCompColor: 1, WINBOOL fDoubleClickInWebView: 1, WINBOOL fDesktopHTML: 1, WINBOOL fWin95Classic: 1, WINBOOL fDontPrettyPath: 1, WINBOOL fShowAttribCol: 1, WINBOOL fMapNetDrvBtn: 1, WINBOOL fShowInfoTip: 1, WINBOOL fHideIcons: 1, WINBOOL fWebView: 1, WINBOOL fFilter: 1, WINBOOL fShowSuperHidden: 1, WINBOOL fNoNetCrawling: 1 */
	FdwWin95Unused   DWORD
	FuWin95Unused    UINT
	FlParamSort      LONG
	FiSortDirection  int32
	Fversion         UINT
	FuNotUsed        UINT
	FfSepProcess     uint16 /* WINBOOL fSepProcess: 1, WINBOOL fStartPanelOn: 1, WINBOOL fShowStartPage: 1, WINBOOL fAutoCheckSelect: 1, WINBOOL fIconsOnly: 1, WINBOOL fShowTypeOverlay: 1, WINBOOL fShowStatusBar: 1, UINT fSpareFlags: 9 */
	F__ccgo_pad1     [2]byte
}                            /* shlobj.h:2582:3 */
type LPSHELLSTATEW = uintptr /* shlobj.h:2582:15 */

type SHELLFLAGSTATE = struct {
	F__ccgo_pad1     [0]uint32
	FfShowAllObjects uint16 /* WINBOOL fShowAllObjects: 1, WINBOOL fShowExtensions: 1, WINBOOL fNoConfirmRecycle: 1, WINBOOL fShowSysFiles: 1, WINBOOL fShowCompColor: 1, WINBOOL fDoubleClickInWebView: 1, WINBOOL fDesktopHTML: 1, WINBOOL fWin95Classic: 1, WINBOOL fDontPrettyPath: 1, WINBOOL fShowAttribCol: 1, WINBOOL fMapNetDrvBtn: 1, WINBOOL fShowInfoTip: 1, WINBOOL fHideIcons: 1, UINT fRestFlags: 3 */
	F__ccgo_pad2     [2]byte
}                               /* shlobj.h:2618:3 */
type LPSHELLFLAGSTATE = uintptr /* shlobj.h:2618:18 */

type INamedPropertyBag1 = struct{ FlpVtbl uintptr } /* shlobj.h:2687:1 */

type INamedPropertyBagVtbl1 = struct {
	FReadPropertyNPB   uintptr
	FWritePropertyNPB  uintptr
	FRemovePropertyNPB uintptr
} /* shlobj.h:2687:1 */

type INamedPropertyBag = INamedPropertyBag1         /* shlobj.h:2687:1 */
type INamedPropertyBagVtbl = INamedPropertyBagVtbl1 /* shlobj.h:2687:1 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type TagAAMENUFILENAME = struct {
	FcbTotal     SHORT
	FrgbReserved [12]BYTE
	FszFileName  [1]WCHAR
} /* shlobj.h:2715:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
type AASHELLMENUFILENAME = TagAAMENUFILENAME /* shlobj.h:2719:5 */
type LPAASHELLMENUFILENAME = uintptr         /* shlobj.h:2719:25 */

type TagAASHELLMENUITEM = struct {
	FlpReserved1 uintptr
	FiReserved   int32
	FuiReserved  UINT
	FlpName      LPAASHELLMENUFILENAME
	Fpsz         LPWSTR
} /* shlobj.h:2721:11 */

type AASHELLMENUITEM = TagAASHELLMENUITEM /* shlobj.h:2727:5 */
type LPAASHELLMENUITEM = uintptr          /* shlobj.h:2727:21 */

type X_USER_INFO_0 = struct{ Fusri0_name LPWSTR } /* lmaccess.h:27:11 */

type USER_INFO_0 = X_USER_INFO_0 /* lmaccess.h:29:5 */
type PUSER_INFO_0 = uintptr      /* lmaccess.h:29:17 */
type LPUSER_INFO_0 = uintptr     /* lmaccess.h:29:31 */

type X_USER_INFO_1 = struct {
	Fusri1_name         LPWSTR
	Fusri1_password     LPWSTR
	Fusri1_password_age DWORD
	Fusri1_priv         DWORD
	Fusri1_home_dir     LPWSTR
	Fusri1_comment      LPWSTR
	Fusri1_flags        DWORD
	F__ccgo_pad1        [4]byte
	Fusri1_script_path  LPWSTR
} /* lmaccess.h:31:11 */

type USER_INFO_1 = X_USER_INFO_1 /* lmaccess.h:40:5 */
type PUSER_INFO_1 = uintptr      /* lmaccess.h:40:17 */
type LPUSER_INFO_1 = uintptr     /* lmaccess.h:40:31 */

type X_USER_INFO_2 = struct {
	Fusri2_name           LPWSTR
	Fusri2_password       LPWSTR
	Fusri2_password_age   DWORD
	Fusri2_priv           DWORD
	Fusri2_home_dir       LPWSTR
	Fusri2_comment        LPWSTR
	Fusri2_flags          DWORD
	F__ccgo_pad1          [4]byte
	Fusri2_script_path    LPWSTR
	Fusri2_auth_flags     DWORD
	F__ccgo_pad2          [4]byte
	Fusri2_full_name      LPWSTR
	Fusri2_usr_comment    LPWSTR
	Fusri2_parms          LPWSTR
	Fusri2_workstations   LPWSTR
	Fusri2_last_logon     DWORD
	Fusri2_last_logoff    DWORD
	Fusri2_acct_expires   DWORD
	Fusri2_max_storage    DWORD
	Fusri2_units_per_week DWORD
	F__ccgo_pad3          [4]byte
	Fusri2_logon_hours    PBYTE
	Fusri2_bad_pw_count   DWORD
	Fusri2_num_logons     DWORD
	Fusri2_logon_server   LPWSTR
	Fusri2_country_code   DWORD
	Fusri2_code_page      DWORD
} /* lmaccess.h:42:11 */

type USER_INFO_2 = X_USER_INFO_2 /* lmaccess.h:67:5 */
type PUSER_INFO_2 = uintptr      /* lmaccess.h:67:17 */
type LPUSER_INFO_2 = uintptr     /* lmaccess.h:67:31 */

type X_USER_INFO_3 = struct {
	Fusri3_name             LPWSTR
	Fusri3_password         LPWSTR
	Fusri3_password_age     DWORD
	Fusri3_priv             DWORD
	Fusri3_home_dir         LPWSTR
	Fusri3_comment          LPWSTR
	Fusri3_flags            DWORD
	F__ccgo_pad1            [4]byte
	Fusri3_script_path      LPWSTR
	Fusri3_auth_flags       DWORD
	F__ccgo_pad2            [4]byte
	Fusri3_full_name        LPWSTR
	Fusri3_usr_comment      LPWSTR
	Fusri3_parms            LPWSTR
	Fusri3_workstations     LPWSTR
	Fusri3_last_logon       DWORD
	Fusri3_last_logoff      DWORD
	Fusri3_acct_expires     DWORD
	Fusri3_max_storage      DWORD
	Fusri3_units_per_week   DWORD
	F__ccgo_pad3            [4]byte
	Fusri3_logon_hours      PBYTE
	Fusri3_bad_pw_count     DWORD
	Fusri3_num_logons       DWORD
	Fusri3_logon_server     LPWSTR
	Fusri3_country_code     DWORD
	Fusri3_code_page        DWORD
	Fusri3_user_id          DWORD
	Fusri3_primary_group_id DWORD
	Fusri3_profile          LPWSTR
	Fusri3_home_dir_drive   LPWSTR
	Fusri3_password_expired DWORD
	F__ccgo_pad4            [4]byte
} /* lmaccess.h:69:11 */

type USER_INFO_3 = X_USER_INFO_3 /* lmaccess.h:99:5 */
type PUSER_INFO_3 = uintptr      /* lmaccess.h:99:17 */
type LPUSER_INFO_3 = uintptr     /* lmaccess.h:99:31 */

type X_USER_INFO_4 = struct {
	Fusri4_name             LPWSTR
	Fusri4_password         LPWSTR
	Fusri4_password_age     DWORD
	Fusri4_priv             DWORD
	Fusri4_home_dir         LPWSTR
	Fusri4_comment          LPWSTR
	Fusri4_flags            DWORD
	F__ccgo_pad1            [4]byte
	Fusri4_script_path      LPWSTR
	Fusri4_auth_flags       DWORD
	F__ccgo_pad2            [4]byte
	Fusri4_full_name        LPWSTR
	Fusri4_usr_comment      LPWSTR
	Fusri4_parms            LPWSTR
	Fusri4_workstations     LPWSTR
	Fusri4_last_logon       DWORD
	Fusri4_last_logoff      DWORD
	Fusri4_acct_expires     DWORD
	Fusri4_max_storage      DWORD
	Fusri4_units_per_week   DWORD
	F__ccgo_pad3            [4]byte
	Fusri4_logon_hours      PBYTE
	Fusri4_bad_pw_count     DWORD
	Fusri4_num_logons       DWORD
	Fusri4_logon_server     LPWSTR
	Fusri4_country_code     DWORD
	Fusri4_code_page        DWORD
	Fusri4_user_sid         PSID
	Fusri4_primary_group_id DWORD
	F__ccgo_pad4            [4]byte
	Fusri4_profile          LPWSTR
	Fusri4_home_dir_drive   LPWSTR
	Fusri4_password_expired DWORD
	F__ccgo_pad5            [4]byte
} /* lmaccess.h:101:11 */

type USER_INFO_4 = X_USER_INFO_4 /* lmaccess.h:131:5 */
type PUSER_INFO_4 = uintptr      /* lmaccess.h:131:17 */
type LPUSER_INFO_4 = uintptr     /* lmaccess.h:131:31 */

type X_USER_INFO_10 = struct {
	Fusri10_name        LPWSTR
	Fusri10_comment     LPWSTR
	Fusri10_usr_comment LPWSTR
	Fusri10_full_name   LPWSTR
} /* lmaccess.h:133:11 */

type USER_INFO_10 = X_USER_INFO_10 /* lmaccess.h:138:4 */
type PUSER_INFO_10 = uintptr       /* lmaccess.h:138:17 */
type LPUSER_INFO_10 = uintptr      /* lmaccess.h:138:32 */

type X_USER_INFO_11 = struct {
	Fusri11_name           LPWSTR
	Fusri11_comment        LPWSTR
	Fusri11_usr_comment    LPWSTR
	Fusri11_full_name      LPWSTR
	Fusri11_priv           DWORD
	Fusri11_auth_flags     DWORD
	Fusri11_password_age   DWORD
	F__ccgo_pad1           [4]byte
	Fusri11_home_dir       LPWSTR
	Fusri11_parms          LPWSTR
	Fusri11_last_logon     DWORD
	Fusri11_last_logoff    DWORD
	Fusri11_bad_pw_count   DWORD
	Fusri11_num_logons     DWORD
	Fusri11_logon_server   LPWSTR
	Fusri11_country_code   DWORD
	F__ccgo_pad2           [4]byte
	Fusri11_workstations   LPWSTR
	Fusri11_max_storage    DWORD
	Fusri11_units_per_week DWORD
	Fusri11_logon_hours    PBYTE
	Fusri11_code_page      DWORD
	F__ccgo_pad3           [4]byte
} /* lmaccess.h:140:11 */

type USER_INFO_11 = X_USER_INFO_11 /* lmaccess.h:161:5 */
type PUSER_INFO_11 = uintptr       /* lmaccess.h:161:18 */
type LPUSER_INFO_11 = uintptr      /* lmaccess.h:161:33 */

type X_USER_INFO_20 = struct {
	Fusri20_name      LPWSTR
	Fusri20_full_name LPWSTR
	Fusri20_comment   LPWSTR
	Fusri20_flags     DWORD
	Fusri20_user_id   DWORD
} /* lmaccess.h:163:11 */

type USER_INFO_20 = X_USER_INFO_20 /* lmaccess.h:169:5 */
type PUSER_INFO_20 = uintptr       /* lmaccess.h:169:18 */
type LPUSER_INFO_20 = uintptr      /* lmaccess.h:169:33 */

type X_USER_INFO_21 = struct{ Fusri21_password [16]BYTE } /* lmaccess.h:171:11 */

type USER_INFO_21 = X_USER_INFO_21 /* lmaccess.h:173:5 */
type PUSER_INFO_21 = uintptr       /* lmaccess.h:173:18 */
type LPUSER_INFO_21 = uintptr      /* lmaccess.h:173:33 */

type X_USER_INFO_22 = struct {
	Fusri22_name           LPWSTR
	Fusri22_password       [16]BYTE
	Fusri22_password_age   DWORD
	Fusri22_priv           DWORD
	Fusri22_home_dir       LPWSTR
	Fusri22_comment        LPWSTR
	Fusri22_flags          DWORD
	F__ccgo_pad1           [4]byte
	Fusri22_script_path    LPWSTR
	Fusri22_auth_flags     DWORD
	F__ccgo_pad2           [4]byte
	Fusri22_full_name      LPWSTR
	Fusri22_usr_comment    LPWSTR
	Fusri22_parms          LPWSTR
	Fusri22_workstations   LPWSTR
	Fusri22_last_logon     DWORD
	Fusri22_last_logoff    DWORD
	Fusri22_acct_expires   DWORD
	Fusri22_max_storage    DWORD
	Fusri22_units_per_week DWORD
	F__ccgo_pad3           [4]byte
	Fusri22_logon_hours    PBYTE
	Fusri22_bad_pw_count   DWORD
	Fusri22_num_logons     DWORD
	Fusri22_logon_server   LPWSTR
	Fusri22_country_code   DWORD
	Fusri22_code_page      DWORD
} /* lmaccess.h:175:11 */

type USER_INFO_22 = X_USER_INFO_22 /* lmaccess.h:200:5 */
type PUSER_INFO_22 = uintptr       /* lmaccess.h:200:18 */
type LPUSER_INFO_22 = uintptr      /* lmaccess.h:200:33 */

type X_USER_INFO_23 = struct {
	Fusri23_name      LPWSTR
	Fusri23_full_name LPWSTR
	Fusri23_comment   LPWSTR
	Fusri23_flags     DWORD
	F__ccgo_pad1      [4]byte
	Fusri23_user_sid  PSID
} /* lmaccess.h:202:11 */

type USER_INFO_23 = X_USER_INFO_23 /* lmaccess.h:208:5 */
type PUSER_INFO_23 = uintptr       /* lmaccess.h:208:18 */
type LPUSER_INFO_23 = uintptr      /* lmaccess.h:208:33 */

type X_USER_INFO_24 = struct {
	Fusri24_internet_identity       WINBOOL
	Fusri24_flags                   DWORD
	Fusri24_internet_provider_name  LPWSTR
	Fusri24_internet_principal_name LPWSTR
	Fusri24_user_sid                PSID
} /* lmaccess.h:210:11 */

type USER_INFO_24 = X_USER_INFO_24 /* lmaccess.h:216:5 */
type PUSER_INFO_24 = uintptr       /* lmaccess.h:216:18 */
type LPUSER_INFO_24 = uintptr      /* lmaccess.h:216:33 */

type X_USER_INFO_1003 = struct{ Fusri1003_password LPWSTR } /* lmaccess.h:218:11 */

type USER_INFO_1003 = X_USER_INFO_1003 /* lmaccess.h:220:5 */
type PUSER_INFO_1003 = uintptr         /* lmaccess.h:220:20 */
type LPUSER_INFO_1003 = uintptr        /* lmaccess.h:220:37 */

type X_USER_INFO_1005 = struct{ Fusri1005_priv DWORD } /* lmaccess.h:222:11 */

type USER_INFO_1005 = X_USER_INFO_1005 /* lmaccess.h:224:5 */
type PUSER_INFO_1005 = uintptr         /* lmaccess.h:224:20 */
type LPUSER_INFO_1005 = uintptr        /* lmaccess.h:224:37 */

type X_USER_INFO_1006 = struct{ Fusri1006_home_dir LPWSTR } /* lmaccess.h:226:11 */

type USER_INFO_1006 = X_USER_INFO_1006 /* lmaccess.h:228:5 */
type PUSER_INFO_1006 = uintptr         /* lmaccess.h:228:20 */
type LPUSER_INFO_1006 = uintptr        /* lmaccess.h:228:37 */

type X_USER_INFO_1007 = struct{ Fusri1007_comment LPWSTR } /* lmaccess.h:230:11 */

type USER_INFO_1007 = X_USER_INFO_1007 /* lmaccess.h:232:5 */
type PUSER_INFO_1007 = uintptr         /* lmaccess.h:232:20 */
type LPUSER_INFO_1007 = uintptr        /* lmaccess.h:232:37 */

type X_USER_INFO_1008 = struct{ Fusri1008_flags DWORD } /* lmaccess.h:234:11 */

type USER_INFO_1008 = X_USER_INFO_1008 /* lmaccess.h:236:5 */
type PUSER_INFO_1008 = uintptr         /* lmaccess.h:236:20 */
type LPUSER_INFO_1008 = uintptr        /* lmaccess.h:236:37 */

type X_USER_INFO_1009 = struct{ Fusri1009_script_path LPWSTR } /* lmaccess.h:238:11 */

type USER_INFO_1009 = X_USER_INFO_1009 /* lmaccess.h:240:5 */
type PUSER_INFO_1009 = uintptr         /* lmaccess.h:240:20 */
type LPUSER_INFO_1009 = uintptr        /* lmaccess.h:240:37 */

type X_USER_INFO_1010 = struct{ Fusri1010_auth_flags DWORD } /* lmaccess.h:242:11 */

type USER_INFO_1010 = X_USER_INFO_1010 /* lmaccess.h:244:5 */
type PUSER_INFO_1010 = uintptr         /* lmaccess.h:244:20 */
type LPUSER_INFO_1010 = uintptr        /* lmaccess.h:244:37 */

type X_USER_INFO_1011 = struct{ Fusri1011_full_name LPWSTR } /* lmaccess.h:246:11 */

type USER_INFO_1011 = X_USER_INFO_1011 /* lmaccess.h:248:5 */
type PUSER_INFO_1011 = uintptr         /* lmaccess.h:248:20 */
type LPUSER_INFO_1011 = uintptr        /* lmaccess.h:248:37 */

type X_USER_INFO_1012 = struct{ Fusri1012_usr_comment LPWSTR } /* lmaccess.h:250:11 */

type USER_INFO_1012 = X_USER_INFO_1012 /* lmaccess.h:252:5 */
type PUSER_INFO_1012 = uintptr         /* lmaccess.h:252:20 */
type LPUSER_INFO_1012 = uintptr        /* lmaccess.h:252:37 */

type X_USER_INFO_1013 = struct{ Fusri1013_parms LPWSTR } /* lmaccess.h:254:11 */

type USER_INFO_1013 = X_USER_INFO_1013 /* lmaccess.h:256:5 */
type PUSER_INFO_1013 = uintptr         /* lmaccess.h:256:20 */
type LPUSER_INFO_1013 = uintptr        /* lmaccess.h:256:37 */

type X_USER_INFO_1014 = struct{ Fusri1014_workstations LPWSTR } /* lmaccess.h:258:11 */

type USER_INFO_1014 = X_USER_INFO_1014 /* lmaccess.h:260:5 */
type PUSER_INFO_1014 = uintptr         /* lmaccess.h:260:20 */
type LPUSER_INFO_1014 = uintptr        /* lmaccess.h:260:37 */

type X_USER_INFO_1017 = struct{ Fusri1017_acct_expires DWORD } /* lmaccess.h:262:11 */

type USER_INFO_1017 = X_USER_INFO_1017 /* lmaccess.h:264:5 */
type PUSER_INFO_1017 = uintptr         /* lmaccess.h:264:20 */
type LPUSER_INFO_1017 = uintptr        /* lmaccess.h:264:37 */

type X_USER_INFO_1018 = struct{ Fusri1018_max_storage DWORD } /* lmaccess.h:266:11 */

type USER_INFO_1018 = X_USER_INFO_1018 /* lmaccess.h:268:5 */
type PUSER_INFO_1018 = uintptr         /* lmaccess.h:268:20 */
type LPUSER_INFO_1018 = uintptr        /* lmaccess.h:268:37 */

type X_USER_INFO_1020 = struct {
	Fusri1020_units_per_week DWORD
	F__ccgo_pad1             [4]byte
	Fusri1020_logon_hours    LPBYTE
} /* lmaccess.h:270:11 */

type USER_INFO_1020 = X_USER_INFO_1020 /* lmaccess.h:273:5 */
type PUSER_INFO_1020 = uintptr         /* lmaccess.h:273:20 */
type LPUSER_INFO_1020 = uintptr        /* lmaccess.h:273:37 */

type X_USER_INFO_1023 = struct{ Fusri1023_logon_server LPWSTR } /* lmaccess.h:275:11 */

type USER_INFO_1023 = X_USER_INFO_1023 /* lmaccess.h:277:5 */
type PUSER_INFO_1023 = uintptr         /* lmaccess.h:277:20 */
type LPUSER_INFO_1023 = uintptr        /* lmaccess.h:277:37 */

type X_USER_INFO_1024 = struct{ Fusri1024_country_code DWORD } /* lmaccess.h:279:11 */

type USER_INFO_1024 = X_USER_INFO_1024 /* lmaccess.h:281:5 */
type PUSER_INFO_1024 = uintptr         /* lmaccess.h:281:20 */
type LPUSER_INFO_1024 = uintptr        /* lmaccess.h:281:37 */

type X_USER_INFO_1025 = struct{ Fusri1025_code_page DWORD } /* lmaccess.h:283:11 */

type USER_INFO_1025 = X_USER_INFO_1025 /* lmaccess.h:285:5 */
type PUSER_INFO_1025 = uintptr         /* lmaccess.h:285:20 */
type LPUSER_INFO_1025 = uintptr        /* lmaccess.h:285:37 */

type X_USER_INFO_1051 = struct{ Fusri1051_primary_group_id DWORD } /* lmaccess.h:287:11 */

type USER_INFO_1051 = X_USER_INFO_1051 /* lmaccess.h:289:5 */
type PUSER_INFO_1051 = uintptr         /* lmaccess.h:289:20 */
type LPUSER_INFO_1051 = uintptr        /* lmaccess.h:289:37 */

type X_USER_INFO_1052 = struct{ Fusri1052_profile LPWSTR } /* lmaccess.h:291:11 */

type USER_INFO_1052 = X_USER_INFO_1052 /* lmaccess.h:293:5 */
type PUSER_INFO_1052 = uintptr         /* lmaccess.h:293:20 */
type LPUSER_INFO_1052 = uintptr        /* lmaccess.h:293:37 */

type X_USER_INFO_1053 = struct{ Fusri1053_home_dir_drive LPWSTR } /* lmaccess.h:295:11 */

type USER_INFO_1053 = X_USER_INFO_1053 /* lmaccess.h:297:5 */
type PUSER_INFO_1053 = uintptr         /* lmaccess.h:297:20 */
type LPUSER_INFO_1053 = uintptr        /* lmaccess.h:297:37 */

type X_USER_MODALS_INFO_0 = struct {
	Fusrmod0_min_passwd_len    DWORD
	Fusrmod0_max_passwd_age    DWORD
	Fusrmod0_min_passwd_age    DWORD
	Fusrmod0_force_logoff      DWORD
	Fusrmod0_password_hist_len DWORD
} /* lmaccess.h:299:11 */

type USER_MODALS_INFO_0 = X_USER_MODALS_INFO_0 /* lmaccess.h:305:5 */
type PUSER_MODALS_INFO_0 = uintptr             /* lmaccess.h:305:24 */
type LPUSER_MODALS_INFO_0 = uintptr            /* lmaccess.h:305:45 */

type X_USER_MODALS_INFO_1 = struct {
	Fusrmod1_role    DWORD
	F__ccgo_pad1     [4]byte
	Fusrmod1_primary LPWSTR
} /* lmaccess.h:307:11 */

type USER_MODALS_INFO_1 = X_USER_MODALS_INFO_1 /* lmaccess.h:310:5 */
type PUSER_MODALS_INFO_1 = uintptr             /* lmaccess.h:310:24 */
type LPUSER_MODALS_INFO_1 = uintptr            /* lmaccess.h:310:45 */

type X_USER_MODALS_INFO_2 = struct {
	Fusrmod2_domain_name LPWSTR
	Fusrmod2_domain_id   PSID
} /* lmaccess.h:312:11 */

type USER_MODALS_INFO_2 = X_USER_MODALS_INFO_2 /* lmaccess.h:315:5 */
type PUSER_MODALS_INFO_2 = uintptr             /* lmaccess.h:315:24 */
type LPUSER_MODALS_INFO_2 = uintptr            /* lmaccess.h:315:45 */

type X_USER_MODALS_INFO_3 = struct {
	Fusrmod3_lockout_duration           DWORD
	Fusrmod3_lockout_observation_window DWORD
	Fusrmod3_lockout_threshold          DWORD
} /* lmaccess.h:317:11 */

type USER_MODALS_INFO_3 = X_USER_MODALS_INFO_3 /* lmaccess.h:321:5 */
type PUSER_MODALS_INFO_3 = uintptr             /* lmaccess.h:321:24 */
type LPUSER_MODALS_INFO_3 = uintptr            /* lmaccess.h:321:45 */

type X_USER_MODALS_INFO_1001 = struct{ Fusrmod1001_min_passwd_len DWORD } /* lmaccess.h:323:11 */

type USER_MODALS_INFO_1001 = X_USER_MODALS_INFO_1001 /* lmaccess.h:325:5 */
type PUSER_MODALS_INFO_1001 = uintptr                /* lmaccess.h:325:27 */
type LPUSER_MODALS_INFO_1001 = uintptr               /* lmaccess.h:325:51 */

type X_USER_MODALS_INFO_1002 = struct{ Fusrmod1002_max_passwd_age DWORD } /* lmaccess.h:327:11 */

type USER_MODALS_INFO_1002 = X_USER_MODALS_INFO_1002 /* lmaccess.h:329:5 */
type PUSER_MODALS_INFO_1002 = uintptr                /* lmaccess.h:329:27 */
type LPUSER_MODALS_INFO_1002 = uintptr               /* lmaccess.h:329:51 */

type X_USER_MODALS_INFO_1003 = struct{ Fusrmod1003_min_passwd_age DWORD } /* lmaccess.h:331:11 */

type USER_MODALS_INFO_1003 = X_USER_MODALS_INFO_1003 /* lmaccess.h:333:5 */
type PUSER_MODALS_INFO_1003 = uintptr                /* lmaccess.h:333:27 */
type LPUSER_MODALS_INFO_1003 = uintptr               /* lmaccess.h:333:51 */

type X_USER_MODALS_INFO_1004 = struct{ Fusrmod1004_force_logoff DWORD } /* lmaccess.h:335:11 */

type USER_MODALS_INFO_1004 = X_USER_MODALS_INFO_1004 /* lmaccess.h:337:5 */
type PUSER_MODALS_INFO_1004 = uintptr                /* lmaccess.h:337:27 */
type LPUSER_MODALS_INFO_1004 = uintptr               /* lmaccess.h:337:51 */

type X_USER_MODALS_INFO_1005 = struct{ Fusrmod1005_password_hist_len DWORD } /* lmaccess.h:339:11 */

type USER_MODALS_INFO_1005 = X_USER_MODALS_INFO_1005 /* lmaccess.h:341:5 */
type PUSER_MODALS_INFO_1005 = uintptr                /* lmaccess.h:341:27 */
type LPUSER_MODALS_INFO_1005 = uintptr               /* lmaccess.h:341:51 */

type X_USER_MODALS_INFO_1006 = struct{ Fusrmod1006_role DWORD } /* lmaccess.h:343:11 */

type USER_MODALS_INFO_1006 = X_USER_MODALS_INFO_1006 /* lmaccess.h:345:5 */
type PUSER_MODALS_INFO_1006 = uintptr                /* lmaccess.h:345:27 */
type LPUSER_MODALS_INFO_1006 = uintptr               /* lmaccess.h:345:51 */

type X_USER_MODALS_INFO_1007 = struct{ Fusrmod1007_primary LPWSTR } /* lmaccess.h:347:11 */

type USER_MODALS_INFO_1007 = X_USER_MODALS_INFO_1007 /* lmaccess.h:349:5 */
type PUSER_MODALS_INFO_1007 = uintptr                /* lmaccess.h:349:27 */
type LPUSER_MODALS_INFO_1007 = uintptr               /* lmaccess.h:349:51 */

type X_GROUP_INFO_0 = struct{ Fgrpi0_name LPWSTR } /* lmaccess.h:525:11 */

type GROUP_INFO_0 = X_GROUP_INFO_0 /* lmaccess.h:527:5 */
type PGROUP_INFO_0 = uintptr       /* lmaccess.h:527:18 */
type LPGROUP_INFO_0 = uintptr      /* lmaccess.h:527:33 */

type X_GROUP_INFO_1 = struct {
	Fgrpi1_name    LPWSTR
	Fgrpi1_comment LPWSTR
} /* lmaccess.h:529:11 */

type GROUP_INFO_1 = X_GROUP_INFO_1 /* lmaccess.h:532:5 */
type PGROUP_INFO_1 = uintptr       /* lmaccess.h:532:18 */
type LPGROUP_INFO_1 = uintptr      /* lmaccess.h:532:33 */

type X_GROUP_INFO_2 = struct {
	Fgrpi2_name       LPWSTR
	Fgrpi2_comment    LPWSTR
	Fgrpi2_group_id   DWORD
	Fgrpi2_attributes DWORD
} /* lmaccess.h:534:11 */

type GROUP_INFO_2 = X_GROUP_INFO_2 /* lmaccess.h:539:5 */
type PGROUP_INFO_2 = uintptr       /* lmaccess.h:539:18 */

type X_GROUP_INFO_3 = struct {
	Fgrpi3_name       LPWSTR
	Fgrpi3_comment    LPWSTR
	Fgrpi3_group_sid  PSID
	Fgrpi3_attributes DWORD
	F__ccgo_pad1      [4]byte
} /* lmaccess.h:541:11 */

type GROUP_INFO_3 = X_GROUP_INFO_3 /* lmaccess.h:546:5 */
type PGROUP_INFO_3 = uintptr       /* lmaccess.h:546:18 */

type X_GROUP_INFO_1002 = struct{ Fgrpi1002_comment LPWSTR } /* lmaccess.h:548:11 */

type GROUP_INFO_1002 = X_GROUP_INFO_1002 /* lmaccess.h:550:5 */
type PGROUP_INFO_1002 = uintptr          /* lmaccess.h:550:21 */
type LPGROUP_INFO_1002 = uintptr         /* lmaccess.h:550:39 */

type X_GROUP_INFO_1005 = struct{ Fgrpi1005_attributes DWORD } /* lmaccess.h:552:11 */

type GROUP_INFO_1005 = X_GROUP_INFO_1005 /* lmaccess.h:554:5 */
type PGROUP_INFO_1005 = uintptr          /* lmaccess.h:554:21 */
type LPGROUP_INFO_1005 = uintptr         /* lmaccess.h:554:39 */

type X_GROUP_USERS_INFO_0 = struct{ Fgrui0_name LPWSTR } /* lmaccess.h:556:11 */

type GROUP_USERS_INFO_0 = X_GROUP_USERS_INFO_0 /* lmaccess.h:558:5 */
type PGROUP_USERS_INFO_0 = uintptr             /* lmaccess.h:558:24 */
type LPGROUP_USERS_INFO_0 = uintptr            /* lmaccess.h:558:45 */

type X_GROUP_USERS_INFO_1 = struct {
	Fgrui1_name       LPWSTR
	Fgrui1_attributes DWORD
	F__ccgo_pad1      [4]byte
} /* lmaccess.h:560:11 */

type GROUP_USERS_INFO_1 = X_GROUP_USERS_INFO_1 /* lmaccess.h:563:5 */
type PGROUP_USERS_INFO_1 = uintptr             /* lmaccess.h:563:24 */
type LPGROUP_USERS_INFO_1 = uintptr            /* lmaccess.h:563:45 */

type X_LOCALGROUP_INFO_0 = struct{ Flgrpi0_name LPWSTR } /* lmaccess.h:598:11 */

type LOCALGROUP_INFO_0 = X_LOCALGROUP_INFO_0 /* lmaccess.h:600:5 */
type PLOCALGROUP_INFO_0 = uintptr            /* lmaccess.h:600:23 */
type LPLOCALGROUP_INFO_0 = uintptr           /* lmaccess.h:600:43 */

type X_LOCALGROUP_INFO_1 = struct {
	Flgrpi1_name    LPWSTR
	Flgrpi1_comment LPWSTR
} /* lmaccess.h:602:11 */

type LOCALGROUP_INFO_1 = X_LOCALGROUP_INFO_1 /* lmaccess.h:605:5 */
type PLOCALGROUP_INFO_1 = uintptr            /* lmaccess.h:605:23 */
type LPLOCALGROUP_INFO_1 = uintptr           /* lmaccess.h:605:43 */

type X_LOCALGROUP_INFO_1002 = struct{ Flgrpi1002_comment LPWSTR } /* lmaccess.h:607:11 */

type LOCALGROUP_INFO_1002 = X_LOCALGROUP_INFO_1002 /* lmaccess.h:609:5 */
type PLOCALGROUP_INFO_1002 = uintptr               /* lmaccess.h:609:26 */
type LPLOCALGROUP_INFO_1002 = uintptr              /* lmaccess.h:609:49 */

type X_LOCALGROUP_MEMBERS_INFO_0 = struct{ Flgrmi0_sid PSID } /* lmaccess.h:611:11 */

type LOCALGROUP_MEMBERS_INFO_0 = X_LOCALGROUP_MEMBERS_INFO_0 /* lmaccess.h:613:5 */
type PLOCALGROUP_MEMBERS_INFO_0 = uintptr                    /* lmaccess.h:613:31 */
type LPLOCALGROUP_MEMBERS_INFO_0 = uintptr                   /* lmaccess.h:613:59 */

type X_LOCALGROUP_MEMBERS_INFO_1 = struct {
	Flgrmi1_sid      PSID
	Flgrmi1_sidusage SID_NAME_USE
	F__ccgo_pad1     [4]byte
	Flgrmi1_name     LPWSTR
} /* lmaccess.h:615:11 */

type LOCALGROUP_MEMBERS_INFO_1 = X_LOCALGROUP_MEMBERS_INFO_1 /* lmaccess.h:619:5 */
type PLOCALGROUP_MEMBERS_INFO_1 = uintptr                    /* lmaccess.h:619:31 */
type LPLOCALGROUP_MEMBERS_INFO_1 = uintptr                   /* lmaccess.h:619:59 */

type X_LOCALGROUP_MEMBERS_INFO_2 = struct {
	Flgrmi2_sid           PSID
	Flgrmi2_sidusage      SID_NAME_USE
	F__ccgo_pad1          [4]byte
	Flgrmi2_domainandname LPWSTR
} /* lmaccess.h:621:11 */

type LOCALGROUP_MEMBERS_INFO_2 = X_LOCALGROUP_MEMBERS_INFO_2 /* lmaccess.h:625:5 */
type PLOCALGROUP_MEMBERS_INFO_2 = uintptr                    /* lmaccess.h:625:31 */
type LPLOCALGROUP_MEMBERS_INFO_2 = uintptr                   /* lmaccess.h:625:59 */

type X_LOCALGROUP_MEMBERS_INFO_3 = struct{ Flgrmi3_domainandname LPWSTR } /* lmaccess.h:627:11 */

type LOCALGROUP_MEMBERS_INFO_3 = X_LOCALGROUP_MEMBERS_INFO_3 /* lmaccess.h:629:5 */
type PLOCALGROUP_MEMBERS_INFO_3 = uintptr                    /* lmaccess.h:629:31 */
type LPLOCALGROUP_MEMBERS_INFO_3 = uintptr                   /* lmaccess.h:629:59 */

type X_LOCALGROUP_USERS_INFO_0 = struct{ Flgrui0_name LPWSTR } /* lmaccess.h:631:11 */

type LOCALGROUP_USERS_INFO_0 = X_LOCALGROUP_USERS_INFO_0 /* lmaccess.h:633:5 */
type PLOCALGROUP_USERS_INFO_0 = uintptr                  /* lmaccess.h:633:29 */
type LPLOCALGROUP_USERS_INFO_0 = uintptr                 /* lmaccess.h:633:55 */

type X_NET_DISPLAY_USER = struct {
	Fusri1_name       LPWSTR
	Fusri1_comment    LPWSTR
	Fusri1_flags      DWORD
	F__ccgo_pad1      [4]byte
	Fusri1_full_name  LPWSTR
	Fusri1_user_id    DWORD
	Fusri1_next_index DWORD
} /* lmaccess.h:641:11 */

type NET_DISPLAY_USER = X_NET_DISPLAY_USER /* lmaccess.h:648:5 */
type PNET_DISPLAY_USER = uintptr           /* lmaccess.h:648:22 */

type X_NET_DISPLAY_MACHINE = struct {
	Fusri2_name       LPWSTR
	Fusri2_comment    LPWSTR
	Fusri2_flags      DWORD
	Fusri2_user_id    DWORD
	Fusri2_next_index DWORD
	F__ccgo_pad1      [4]byte
} /* lmaccess.h:650:11 */

type NET_DISPLAY_MACHINE = X_NET_DISPLAY_MACHINE /* lmaccess.h:656:5 */
type PNET_DISPLAY_MACHINE = uintptr              /* lmaccess.h:656:25 */

type X_NET_DISPLAY_GROUP = struct {
	Fgrpi3_name       LPWSTR
	Fgrpi3_comment    LPWSTR
	Fgrpi3_group_id   DWORD
	Fgrpi3_attributes DWORD
	Fgrpi3_next_index DWORD
	F__ccgo_pad1      [4]byte
} /* lmaccess.h:658:11 */

type NET_DISPLAY_GROUP = X_NET_DISPLAY_GROUP /* lmaccess.h:664:5 */
type PNET_DISPLAY_GROUP = uintptr            /* lmaccess.h:664:23 */

type X_ACCESS_INFO_0 = struct{ Facc0_resource_name LPWSTR } /* lmaccess.h:684:11 */

type ACCESS_INFO_0 = X_ACCESS_INFO_0 /* lmaccess.h:686:5 */
type PACCESS_INFO_0 = uintptr        /* lmaccess.h:686:19 */
type LPACCESS_INFO_0 = uintptr       /* lmaccess.h:686:35 */

type X_ACCESS_INFO_1 = struct {
	Facc1_resource_name LPWSTR
	Facc1_attr          DWORD
	Facc1_count         DWORD
} /* lmaccess.h:688:11 */

type ACCESS_INFO_1 = X_ACCESS_INFO_1 /* lmaccess.h:692:5 */
type PACCESS_INFO_1 = uintptr        /* lmaccess.h:692:19 */
type LPACCESS_INFO_1 = uintptr       /* lmaccess.h:692:35 */

type X_ACCESS_INFO_1002 = struct{ Facc1002_attr DWORD } /* lmaccess.h:694:11 */

type ACCESS_INFO_1002 = X_ACCESS_INFO_1002 /* lmaccess.h:696:5 */
type PACCESS_INFO_1002 = uintptr           /* lmaccess.h:696:22 */
type LPACCESS_INFO_1002 = uintptr          /* lmaccess.h:696:41 */

type X_ACCESS_LIST = struct {
	Facl_ugname  LPWSTR
	Facl_access  DWORD
	F__ccgo_pad1 [4]byte
} /* lmaccess.h:698:11 */

type ACCESS_LIST = X_ACCESS_LIST /* lmaccess.h:701:5 */
type PACCESS_LIST = uintptr      /* lmaccess.h:701:17 */
type LPACCESS_LIST = uintptr     /* lmaccess.h:701:31 */

type NET_VALIDATE_PASSWORD_TYPE = uint32   /* lmaccess.h:745:5 */
type PNET_VALIDATE_PASSWORD_TYPE = uintptr /* lmaccess.h:745:32 */

type X_NET_VALIDATE_PASSWORD_HASH = struct {
	FLength      ULONG
	F__ccgo_pad1 [4]byte
	FHash        LPBYTE
} /* lmaccess.h:747:11 */

type NET_VALIDATE_PASSWORD_HASH = X_NET_VALIDATE_PASSWORD_HASH /* lmaccess.h:750:5 */
type PNET_VALIDATE_PASSWORD_HASH = uintptr                     /* lmaccess.h:750:32 */

type X_NET_VALIDATE_PERSISTED_FIELDS = struct {
	FPresentFields         ULONG
	FPasswordLastSet       FILETIME
	FBadPasswordTime       FILETIME
	FLockoutTime           FILETIME
	FBadPasswordCount      ULONG
	FPasswordHistoryLength ULONG
	F__ccgo_pad1           [4]byte
	FPasswordHistory       PNET_VALIDATE_PASSWORD_HASH
} /* lmaccess.h:767:11 */

type NET_VALIDATE_PERSISTED_FIELDS = X_NET_VALIDATE_PERSISTED_FIELDS /* lmaccess.h:775:5 */
type PNET_VALIDATE_PERSISTED_FIELDS = uintptr                        /* lmaccess.h:775:35 */

type X_NET_VALIDATE_OUTPUT_ARG = struct {
	FChangedPersistedFields NET_VALIDATE_PERSISTED_FIELDS
	FValidationStatus       DWORD
	F__ccgo_pad1            [4]byte
} /* lmaccess.h:777:11 */

type NET_VALIDATE_OUTPUT_ARG = X_NET_VALIDATE_OUTPUT_ARG /* lmaccess.h:780:5 */
type PNET_VALIDATE_OUTPUT_ARG = uintptr                  /* lmaccess.h:780:29 */

type X_NET_VALIDATE_AUTHENTICATION_INPUT_ARG = struct {
	FInputPersistedFields NET_VALIDATE_PERSISTED_FIELDS
	FPasswordMatched      BOOLEAN
	F__ccgo_pad1          [7]byte
} /* lmaccess.h:782:11 */

type NET_VALIDATE_AUTHENTICATION_INPUT_ARG = X_NET_VALIDATE_AUTHENTICATION_INPUT_ARG /* lmaccess.h:785:5 */
type PNET_VALIDATE_AUTHENTICATION_INPUT_ARG = uintptr                                /* lmaccess.h:785:43 */

type X_NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG = struct {
	FInputPersistedFields NET_VALIDATE_PERSISTED_FIELDS
	FClearPassword        LPWSTR
	FUserAccountName      LPWSTR
	FHashedPassword       NET_VALIDATE_PASSWORD_HASH
	FPasswordMatch        BOOLEAN
	F__ccgo_pad1          [7]byte
} /* lmaccess.h:787:11 */

type NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG = X_NET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG /* lmaccess.h:793:5 */
type PNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG = uintptr                                 /* lmaccess.h:793:44 */

type X_NET_VALIDATE_PASSWORD_RESET_INPUT_ARG = struct {
	FInputPersistedFields          NET_VALIDATE_PERSISTED_FIELDS
	FClearPassword                 LPWSTR
	FUserAccountName               LPWSTR
	FHashedPassword                NET_VALIDATE_PASSWORD_HASH
	FPasswordMustChangeAtNextLogon BOOLEAN
	FClearLockout                  BOOLEAN
	F__ccgo_pad1                   [6]byte
} /* lmaccess.h:795:11 */

type NET_VALIDATE_PASSWORD_RESET_INPUT_ARG = X_NET_VALIDATE_PASSWORD_RESET_INPUT_ARG /* lmaccess.h:802:5 */
type PNET_VALIDATE_PASSWORD_RESET_INPUT_ARG = uintptr                                /* lmaccess.h:802:43 */

type X_NETLOGON_INFO_1 = struct {
	Fnetlog1_flags                 DWORD
	Fnetlog1_pdc_connection_status DWORD
} /* lmaccess.h:841:11 */

type NETLOGON_INFO_1 = X_NETLOGON_INFO_1 /* lmaccess.h:844:5 */
type PNETLOGON_INFO_1 = uintptr          /* lmaccess.h:844:21 */

type X_NETLOGON_INFO_2 = struct {
	Fnetlog2_flags                 DWORD
	Fnetlog2_pdc_connection_status DWORD
	Fnetlog2_trusted_dc_name       LPWSTR
	Fnetlog2_tc_connection_status  DWORD
	F__ccgo_pad1                   [4]byte
} /* lmaccess.h:846:11 */

type NETLOGON_INFO_2 = X_NETLOGON_INFO_2 /* lmaccess.h:852:5 */
type PNETLOGON_INFO_2 = uintptr          /* lmaccess.h:852:21 */

type X_NETLOGON_INFO_3 = struct {
	Fnetlog3_flags          DWORD
	Fnetlog3_logon_attempts DWORD
	Fnetlog3_reserved1      DWORD
	Fnetlog3_reserved2      DWORD
	Fnetlog3_reserved3      DWORD
	Fnetlog3_reserved4      DWORD
	Fnetlog3_reserved5      DWORD
} /* lmaccess.h:854:11 */

type NETLOGON_INFO_3 = X_NETLOGON_INFO_3 /* lmaccess.h:862:5 */
type PNETLOGON_INFO_3 = uintptr          /* lmaccess.h:862:21 */

type X_NETLOGON_INFO_4 = struct {
	Fnetlog4_trusted_dc_name     LPWSTR
	Fnetlog4_trusted_domain_name LPWSTR
} /* lmaccess.h:864:11 */

type NETLOGON_INFO_4 = X_NETLOGON_INFO_4 /* lmaccess.h:867:5 */
type PNETLOGON_INFO_4 = uintptr          /* lmaccess.h:867:21 */

type X_STD_ALERT = struct {
	Falrt_timestamp   DWORD
	Falrt_eventname   [17]WCHAR
	Falrt_servicename [81]WCHAR
} /* lmalert.h:16:11 */

type STD_ALERT = X_STD_ALERT /* lmalert.h:20:5 */
type PSTD_ALERT = uintptr    /* lmalert.h:20:15 */
type LPSTD_ALERT = uintptr   /* lmalert.h:20:27 */

type X_ADMIN_OTHER_INFO = struct {
	Falrtad_errcode    DWORD
	Falrtad_numstrings DWORD
} /* lmalert.h:22:11 */

type ADMIN_OTHER_INFO = X_ADMIN_OTHER_INFO /* lmalert.h:25:5 */
type PADMIN_OTHER_INFO = uintptr           /* lmalert.h:25:22 */
type LPADMIN_OTHER_INFO = uintptr          /* lmalert.h:25:41 */

type X_ERRLOG_OTHER_INFO = struct {
	Falrter_errcode DWORD
	Falrter_offset  DWORD
} /* lmalert.h:27:11 */

type ERRLOG_OTHER_INFO = X_ERRLOG_OTHER_INFO /* lmalert.h:30:5 */
type PERRLOG_OTHER_INFO = uintptr            /* lmalert.h:30:23 */
type LPERRLOG_OTHER_INFO = uintptr           /* lmalert.h:30:43 */

type X_PRINT_OTHER_INFO = struct {
	Falrtpr_jobid     DWORD
	Falrtpr_status    DWORD
	Falrtpr_submitted DWORD
	Falrtpr_size      DWORD
} /* lmalert.h:32:11 */

type PRINT_OTHER_INFO = X_PRINT_OTHER_INFO /* lmalert.h:37:5 */
type PPRINT_OTHER_INFO = uintptr           /* lmalert.h:37:22 */
type LPPRINT_OTHER_INFO = uintptr          /* lmalert.h:37:41 */

type X_USER_OTHER_INFO = struct {
	Falrtus_errcode    DWORD
	Falrtus_numstrings DWORD
} /* lmalert.h:39:11 */

type USER_OTHER_INFO = X_USER_OTHER_INFO /* lmalert.h:42:5 */
type PUSER_OTHER_INFO = uintptr          /* lmalert.h:42:21 */
type LPUSER_OTHER_INFO = uintptr         /* lmalert.h:42:39 */

type X_SHARE_INFO_0 = struct{ Fshi0_netname LPWSTR } /* lmshare.h:24:11 */

type SHARE_INFO_0 = X_SHARE_INFO_0 /* lmshare.h:26:5 */
type PSHARE_INFO_0 = uintptr       /* lmshare.h:26:18 */
type LPSHARE_INFO_0 = uintptr      /* lmshare.h:26:33 */

type X_SHARE_INFO_1 = struct {
	Fshi1_netname LPWSTR
	Fshi1_type    DWORD
	F__ccgo_pad1  [4]byte
	Fshi1_remark  LPWSTR
} /* lmshare.h:28:11 */

type SHARE_INFO_1 = X_SHARE_INFO_1 /* lmshare.h:32:5 */
type PSHARE_INFO_1 = uintptr       /* lmshare.h:32:18 */
type LPSHARE_INFO_1 = uintptr      /* lmshare.h:32:33 */

type X_SHARE_INFO_2 = struct {
	Fshi2_netname      LPWSTR
	Fshi2_type         DWORD
	F__ccgo_pad1       [4]byte
	Fshi2_remark       LPWSTR
	Fshi2_permissions  DWORD
	Fshi2_max_uses     DWORD
	Fshi2_current_uses DWORD
	F__ccgo_pad2       [4]byte
	Fshi2_path         LPWSTR
	Fshi2_passwd       LPWSTR
} /* lmshare.h:34:11 */

type SHARE_INFO_2 = X_SHARE_INFO_2 /* lmshare.h:43:5 */
type PSHARE_INFO_2 = uintptr       /* lmshare.h:43:18 */
type LPSHARE_INFO_2 = uintptr      /* lmshare.h:43:33 */

type X_SHARE_INFO_501 = struct {
	Fshi501_netname LPWSTR
	Fshi501_type    DWORD
	F__ccgo_pad1    [4]byte
	Fshi501_remark  LPWSTR
	Fshi501_flags   DWORD
	F__ccgo_pad2    [4]byte
} /* lmshare.h:45:11 */

type SHARE_INFO_501 = X_SHARE_INFO_501 /* lmshare.h:50:5 */
type PSHARE_INFO_501 = uintptr         /* lmshare.h:50:20 */
type LPSHARE_INFO_501 = uintptr        /* lmshare.h:50:37 */

type X_SHARE_INFO_502 = struct {
	Fshi502_netname             LPWSTR
	Fshi502_type                DWORD
	F__ccgo_pad1                [4]byte
	Fshi502_remark              LPWSTR
	Fshi502_permissions         DWORD
	Fshi502_max_uses            DWORD
	Fshi502_current_uses        DWORD
	F__ccgo_pad2                [4]byte
	Fshi502_path                LPWSTR
	Fshi502_passwd              LPWSTR
	Fshi502_reserved            DWORD
	F__ccgo_pad3                [4]byte
	Fshi502_security_descriptor PSECURITY_DESCRIPTOR
} /* lmshare.h:52:11 */

type SHARE_INFO_502 = X_SHARE_INFO_502 /* lmshare.h:63:5 */
type PSHARE_INFO_502 = uintptr         /* lmshare.h:63:20 */
type LPSHARE_INFO_502 = uintptr        /* lmshare.h:63:37 */

type X_SHARE_INFO_1004 = struct{ Fshi1004_remark LPWSTR } /* lmshare.h:65:11 */

type SHARE_INFO_1004 = X_SHARE_INFO_1004 /* lmshare.h:67:5 */
type PSHARE_INFO_1004 = uintptr          /* lmshare.h:67:21 */
type LPSHARE_INFO_1004 = uintptr         /* lmshare.h:67:39 */

type X_SHARE_INFO_1005 = struct{ Fshi1005_flags DWORD } /* lmshare.h:69:11 */

type SHARE_INFO_1005 = X_SHARE_INFO_1005 /* lmshare.h:71:5 */
type PSHARE_INFO_1005 = uintptr          /* lmshare.h:71:21 */
type LPSHARE_INFO_1005 = uintptr         /* lmshare.h:71:39 */

type X_SHARE_INFO_1006 = struct{ Fshi1006_max_uses DWORD } /* lmshare.h:73:11 */

type SHARE_INFO_1006 = X_SHARE_INFO_1006 /* lmshare.h:75:5 */
type PSHARE_INFO_1006 = uintptr          /* lmshare.h:75:21 */
type LPSHARE_INFO_1006 = uintptr         /* lmshare.h:75:39 */

type X_SHARE_INFO_1501 = struct {
	Fshi1501_reserved            DWORD
	F__ccgo_pad1                 [4]byte
	Fshi1501_security_descriptor PSECURITY_DESCRIPTOR
} /* lmshare.h:77:11 */

type SHARE_INFO_1501 = X_SHARE_INFO_1501 /* lmshare.h:80:5 */
type PSHARE_INFO_1501 = uintptr          /* lmshare.h:80:21 */
type LPSHARE_INFO_1501 = uintptr         /* lmshare.h:80:39 */

type X_SESSION_INFO_0 = struct{ Fsesi0_cname LPWSTR } /* lmshare.h:134:11 */

type SESSION_INFO_0 = X_SESSION_INFO_0 /* lmshare.h:136:5 */
type PSESSION_INFO_0 = uintptr         /* lmshare.h:136:20 */
type LPSESSION_INFO_0 = uintptr        /* lmshare.h:136:37 */

type X_SESSION_INFO_1 = struct {
	Fsesi1_cname      LPWSTR
	Fsesi1_username   LPWSTR
	Fsesi1_num_opens  DWORD
	Fsesi1_time       DWORD
	Fsesi1_idle_time  DWORD
	Fsesi1_user_flags DWORD
} /* lmshare.h:138:11 */

type SESSION_INFO_1 = X_SESSION_INFO_1 /* lmshare.h:145:5 */
type PSESSION_INFO_1 = uintptr         /* lmshare.h:145:20 */
type LPSESSION_INFO_1 = uintptr        /* lmshare.h:145:37 */

type X_SESSION_INFO_2 = struct {
	Fsesi2_cname       LPWSTR
	Fsesi2_username    LPWSTR
	Fsesi2_num_opens   DWORD
	Fsesi2_time        DWORD
	Fsesi2_idle_time   DWORD
	Fsesi2_user_flags  DWORD
	Fsesi2_cltype_name LPWSTR
} /* lmshare.h:147:11 */

type SESSION_INFO_2 = X_SESSION_INFO_2 /* lmshare.h:155:5 */
type PSESSION_INFO_2 = uintptr         /* lmshare.h:155:20 */
type LPSESSION_INFO_2 = uintptr        /* lmshare.h:155:37 */

type X_SESSION_INFO_10 = struct {
	Fsesi10_cname     LPWSTR
	Fsesi10_username  LPWSTR
	Fsesi10_time      DWORD
	Fsesi10_idle_time DWORD
} /* lmshare.h:157:11 */

type SESSION_INFO_10 = X_SESSION_INFO_10 /* lmshare.h:162:5 */
type PSESSION_INFO_10 = uintptr          /* lmshare.h:162:21 */
type LPSESSION_INFO_10 = uintptr         /* lmshare.h:162:39 */

type X_SESSION_INFO_502 = struct {
	Fsesi502_cname       LPWSTR
	Fsesi502_username    LPWSTR
	Fsesi502_num_opens   DWORD
	Fsesi502_time        DWORD
	Fsesi502_idle_time   DWORD
	Fsesi502_user_flags  DWORD
	Fsesi502_cltype_name LPWSTR
	Fsesi502_transport   LPWSTR
} /* lmshare.h:164:11 */

type SESSION_INFO_502 = X_SESSION_INFO_502 /* lmshare.h:173:5 */
type PSESSION_INFO_502 = uintptr           /* lmshare.h:173:22 */
type LPSESSION_INFO_502 = uintptr          /* lmshare.h:173:41 */

type X_CONNECTION_INFO_0 = struct{ Fconi0_id DWORD } /* lmshare.h:188:11 */

type CONNECTION_INFO_0 = X_CONNECTION_INFO_0 /* lmshare.h:190:5 */
type PCONNECTION_INFO_0 = uintptr            /* lmshare.h:190:23 */
type LPCONNECTION_INFO_0 = uintptr           /* lmshare.h:190:43 */

type X_CONNECTION_INFO_1 = struct {
	Fconi1_id        DWORD
	Fconi1_type      DWORD
	Fconi1_num_opens DWORD
	Fconi1_num_users DWORD
	Fconi1_time      DWORD
	F__ccgo_pad1     [4]byte
	Fconi1_username  LPWSTR
	Fconi1_netname   LPWSTR
} /* lmshare.h:192:11 */

type CONNECTION_INFO_1 = X_CONNECTION_INFO_1 /* lmshare.h:200:5 */
type PCONNECTION_INFO_1 = uintptr            /* lmshare.h:200:23 */
type LPCONNECTION_INFO_1 = uintptr           /* lmshare.h:200:43 */

type X_FILE_INFO_2 = struct{ Ffi2_id DWORD } /* lmshare.h:210:11 */

type FILE_INFO_2 = X_FILE_INFO_2 /* lmshare.h:212:5 */
type PFILE_INFO_2 = uintptr      /* lmshare.h:212:17 */
type LPFILE_INFO_2 = uintptr     /* lmshare.h:212:31 */

type X_FILE_INFO_3 = struct {
	Ffi3_id          DWORD
	Ffi3_permissions DWORD
	Ffi3_num_locks   DWORD
	F__ccgo_pad1     [4]byte
	Ffi3_pathname    LPWSTR
	Ffi3_username    LPWSTR
} /* lmshare.h:214:11 */

type FILE_INFO_3 = X_FILE_INFO_3 /* lmshare.h:220:5 */
type PFILE_INFO_3 = uintptr      /* lmshare.h:220:17 */
type LPFILE_INFO_3 = uintptr     /* lmshare.h:220:31 */

type X_MSG_INFO_0 = struct{ Fmsgi0_name LPWSTR } /* lmmsg.h:19:11 */

type MSG_INFO_0 = X_MSG_INFO_0 /* lmmsg.h:21:5 */
type PMSG_INFO_0 = uintptr     /* lmmsg.h:21:16 */
type LPMSG_INFO_0 = uintptr    /* lmmsg.h:21:29 */

type X_MSG_INFO_1 = struct {
	Fmsgi1_name         LPWSTR
	Fmsgi1_forward_flag DWORD
	F__ccgo_pad1        [4]byte
	Fmsgi1_forward      LPWSTR
} /* lmmsg.h:23:11 */

type MSG_INFO_1 = X_MSG_INFO_1 /* lmmsg.h:27:5 */
type PMSG_INFO_1 = uintptr     /* lmmsg.h:27:16 */
type LPMSG_INFO_1 = uintptr    /* lmmsg.h:27:29 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type DESC_CHAR = CHAR /* lmremutl.h:14:16 */

type LPDESC = uintptr /* lmremutl.h:19:21 */

type X_TIME_OF_DAY_INFO = struct {
	Ftod_elapsedt  DWORD
	Ftod_msecs     DWORD
	Ftod_hours     DWORD
	Ftod_mins      DWORD
	Ftod_secs      DWORD
	Ftod_hunds     DWORD
	Ftod_timezone  LONG
	Ftod_tinterval DWORD
	Ftod_day       DWORD
	Ftod_month     DWORD
	Ftod_year      DWORD
	Ftod_weekday   DWORD
} /* lmremutl.h:25:11 */

type TIME_OF_DAY_INFO = X_TIME_OF_DAY_INFO /* lmremutl.h:38:5 */
type PTIME_OF_DAY_INFO = uintptr           /* lmremutl.h:38:22 */
type LPTIME_OF_DAY_INFO = uintptr          /* lmremutl.h:38:41 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_REPL_INFO_0 = struct {
	Frp0_role          DWORD
	F__ccgo_pad1       [4]byte
	Frp0_exportpath    LPWSTR
	Frp0_exportlist    LPWSTR
	Frp0_importpath    LPWSTR
	Frp0_importlist    LPWSTR
	Frp0_logonusername LPWSTR
	Frp0_interval      DWORD
	Frp0_pulse         DWORD
	Frp0_guardtime     DWORD
	Frp0_random        DWORD
} /* lmrepl.h:22:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type REPL_INFO_0 = X_REPL_INFO_0 /* lmrepl.h:33:5 */
type PREPL_INFO_0 = uintptr      /* lmrepl.h:33:17 */
type LPREPL_INFO_0 = uintptr     /* lmrepl.h:33:31 */

type X_REPL_INFO_1000 = struct{ Frp1000_interval DWORD } /* lmrepl.h:35:11 */

type REPL_INFO_1000 = X_REPL_INFO_1000 /* lmrepl.h:37:5 */
type PREPL_INFO_1000 = uintptr         /* lmrepl.h:37:20 */
type LPREPL_INFO_1000 = uintptr        /* lmrepl.h:37:37 */

type X_REPL_INFO_1001 = struct{ Frp1001_pulse DWORD } /* lmrepl.h:39:11 */

type REPL_INFO_1001 = X_REPL_INFO_1001 /* lmrepl.h:41:5 */
type PREPL_INFO_1001 = uintptr         /* lmrepl.h:41:20 */
type LPREPL_INFO_1001 = uintptr        /* lmrepl.h:41:37 */

type X_REPL_INFO_1002 = struct{ Frp1002_guardtime DWORD } /* lmrepl.h:43:11 */

type REPL_INFO_1002 = X_REPL_INFO_1002 /* lmrepl.h:45:5 */
type PREPL_INFO_1002 = uintptr         /* lmrepl.h:45:20 */
type LPREPL_INFO_1002 = uintptr        /* lmrepl.h:45:37 */

type X_REPL_INFO_1003 = struct{ Frp1003_random DWORD } /* lmrepl.h:47:11 */

type REPL_INFO_1003 = X_REPL_INFO_1003 /* lmrepl.h:49:5 */
type PREPL_INFO_1003 = uintptr         /* lmrepl.h:49:20 */
type LPREPL_INFO_1003 = uintptr        /* lmrepl.h:49:37 */

type X_REPL_EDIR_INFO_0 = struct{ Frped0_dirname LPWSTR } /* lmrepl.h:63:11 */

type REPL_EDIR_INFO_0 = X_REPL_EDIR_INFO_0 /* lmrepl.h:65:5 */
type PREPL_EDIR_INFO_0 = uintptr           /* lmrepl.h:65:22 */
type LPREPL_EDIR_INFO_0 = uintptr          /* lmrepl.h:65:41 */

type X_REPL_EDIR_INFO_1 = struct {
	Frped1_dirname   LPWSTR
	Frped1_integrity DWORD
	Frped1_extent    DWORD
} /* lmrepl.h:67:11 */

type REPL_EDIR_INFO_1 = X_REPL_EDIR_INFO_1 /* lmrepl.h:71:5 */
type PREPL_EDIR_INFO_1 = uintptr           /* lmrepl.h:71:22 */
type LPREPL_EDIR_INFO_1 = uintptr          /* lmrepl.h:71:41 */

type X_REPL_EDIR_INFO_2 = struct {
	Frped2_dirname   LPWSTR
	Frped2_integrity DWORD
	Frped2_extent    DWORD
	Frped2_lockcount DWORD
	Frped2_locktime  DWORD
} /* lmrepl.h:73:11 */

type REPL_EDIR_INFO_2 = X_REPL_EDIR_INFO_2 /* lmrepl.h:79:5 */
type PREPL_EDIR_INFO_2 = uintptr           /* lmrepl.h:79:22 */
type LPREPL_EDIR_INFO_2 = uintptr          /* lmrepl.h:79:41 */

type X_REPL_EDIR_INFO_1000 = struct{ Frped1000_integrity DWORD } /* lmrepl.h:81:11 */

type REPL_EDIR_INFO_1000 = X_REPL_EDIR_INFO_1000 /* lmrepl.h:83:5 */
type PREPL_EDIR_INFO_1000 = uintptr              /* lmrepl.h:83:25 */
type LPREPL_EDIR_INFO_1000 = uintptr             /* lmrepl.h:83:47 */

type X_REPL_EDIR_INFO_1001 = struct{ Frped1001_extent DWORD } /* lmrepl.h:85:11 */

type REPL_EDIR_INFO_1001 = X_REPL_EDIR_INFO_1001 /* lmrepl.h:87:5 */
type PREPL_EDIR_INFO_1001 = uintptr              /* lmrepl.h:87:25 */
type LPREPL_EDIR_INFO_1001 = uintptr             /* lmrepl.h:87:47 */

type X_REPL_IDIR_INFO_0 = struct{ Frpid0_dirname LPWSTR } /* lmrepl.h:100:11 */

type REPL_IDIR_INFO_0 = X_REPL_IDIR_INFO_0 /* lmrepl.h:102:5 */
type PREPL_IDIR_INFO_0 = uintptr           /* lmrepl.h:102:22 */
type LPREPL_IDIR_INFO_0 = uintptr          /* lmrepl.h:102:41 */

type X_REPL_IDIR_INFO_1 = struct {
	Frpid1_dirname          LPWSTR
	Frpid1_state            DWORD
	F__ccgo_pad1            [4]byte
	Frpid1_mastername       LPWSTR
	Frpid1_last_update_time DWORD
	Frpid1_lockcount        DWORD
	Frpid1_locktime         DWORD
	F__ccgo_pad2            [4]byte
} /* lmrepl.h:104:11 */

type REPL_IDIR_INFO_1 = X_REPL_IDIR_INFO_1 /* lmrepl.h:111:5 */
type PREPL_IDIR_INFO_1 = uintptr           /* lmrepl.h:111:22 */
type LPREPL_IDIR_INFO_1 = uintptr          /* lmrepl.h:111:41 */

type X_SERVER_INFO_100 = struct {
	Fsv100_platform_id DWORD
	F__ccgo_pad1       [4]byte
	Fsv100_name        LPWSTR
} /* lmserver.h:31:11 */

type SERVER_INFO_100 = X_SERVER_INFO_100 /* lmserver.h:34:5 */
type PSERVER_INFO_100 = uintptr          /* lmserver.h:34:21 */
type LPSERVER_INFO_100 = uintptr         /* lmserver.h:34:39 */

type X_SERVER_INFO_101 = struct {
	Fsv101_platform_id   DWORD
	F__ccgo_pad1         [4]byte
	Fsv101_name          LPWSTR
	Fsv101_version_major DWORD
	Fsv101_version_minor DWORD
	Fsv101_type          DWORD
	F__ccgo_pad2         [4]byte
	Fsv101_comment       LPWSTR
} /* lmserver.h:36:11 */

type SERVER_INFO_101 = X_SERVER_INFO_101 /* lmserver.h:43:5 */
type PSERVER_INFO_101 = uintptr          /* lmserver.h:43:21 */
type LPSERVER_INFO_101 = uintptr         /* lmserver.h:43:39 */

type X_SERVER_INFO_102 = struct {
	Fsv102_platform_id   DWORD
	F__ccgo_pad1         [4]byte
	Fsv102_name          LPWSTR
	Fsv102_version_major DWORD
	Fsv102_version_minor DWORD
	Fsv102_type          DWORD
	F__ccgo_pad2         [4]byte
	Fsv102_comment       LPWSTR
	Fsv102_users         DWORD
	Fsv102_disc          LONG
	Fsv102_hidden        WINBOOL
	Fsv102_announce      DWORD
	Fsv102_anndelta      DWORD
	Fsv102_licenses      DWORD
	Fsv102_userpath      LPWSTR
} /* lmserver.h:45:11 */

type SERVER_INFO_102 = X_SERVER_INFO_102 /* lmserver.h:59:5 */
type PSERVER_INFO_102 = uintptr          /* lmserver.h:59:21 */
type LPSERVER_INFO_102 = uintptr         /* lmserver.h:59:39 */

type X_SERVER_INFO_402 = struct {
	Fsv402_ulist_mtime   DWORD
	Fsv402_glist_mtime   DWORD
	Fsv402_alist_mtime   DWORD
	F__ccgo_pad1         [4]byte
	Fsv402_alerts        LPWSTR
	Fsv402_security      DWORD
	Fsv402_numadmin      DWORD
	Fsv402_lanmask       DWORD
	F__ccgo_pad2         [4]byte
	Fsv402_guestacct     LPWSTR
	Fsv402_chdevs        DWORD
	Fsv402_chdevq        DWORD
	Fsv402_chdevjobs     DWORD
	Fsv402_connections   DWORD
	Fsv402_shares        DWORD
	Fsv402_openfiles     DWORD
	Fsv402_sessopens     DWORD
	Fsv402_sessvcs       DWORD
	Fsv402_sessreqs      DWORD
	Fsv402_opensearch    DWORD
	Fsv402_activelocks   DWORD
	Fsv402_numreqbuf     DWORD
	Fsv402_sizreqbuf     DWORD
	Fsv402_numbigbuf     DWORD
	Fsv402_numfiletasks  DWORD
	Fsv402_alertsched    DWORD
	Fsv402_erroralert    DWORD
	Fsv402_logonalert    DWORD
	Fsv402_accessalert   DWORD
	Fsv402_diskalert     DWORD
	Fsv402_netioalert    DWORD
	Fsv402_maxauditsz    DWORD
	Fsv402_srvheuristics LPWSTR
} /* lmserver.h:61:11 */

type SERVER_INFO_402 = X_SERVER_INFO_402 /* lmserver.h:93:5 */
type PSERVER_INFO_402 = uintptr          /* lmserver.h:93:21 */
type LPSERVER_INFO_402 = uintptr         /* lmserver.h:93:39 */

type X_SERVER_INFO_403 = struct {
	Fsv403_ulist_mtime   DWORD
	Fsv403_glist_mtime   DWORD
	Fsv403_alist_mtime   DWORD
	F__ccgo_pad1         [4]byte
	Fsv403_alerts        LPWSTR
	Fsv403_security      DWORD
	Fsv403_numadmin      DWORD
	Fsv403_lanmask       DWORD
	F__ccgo_pad2         [4]byte
	Fsv403_guestacct     LPWSTR
	Fsv403_chdevs        DWORD
	Fsv403_chdevq        DWORD
	Fsv403_chdevjobs     DWORD
	Fsv403_connections   DWORD
	Fsv403_shares        DWORD
	Fsv403_openfiles     DWORD
	Fsv403_sessopens     DWORD
	Fsv403_sessvcs       DWORD
	Fsv403_sessreqs      DWORD
	Fsv403_opensearch    DWORD
	Fsv403_activelocks   DWORD
	Fsv403_numreqbuf     DWORD
	Fsv403_sizreqbuf     DWORD
	Fsv403_numbigbuf     DWORD
	Fsv403_numfiletasks  DWORD
	Fsv403_alertsched    DWORD
	Fsv403_erroralert    DWORD
	Fsv403_logonalert    DWORD
	Fsv403_accessalert   DWORD
	Fsv403_diskalert     DWORD
	Fsv403_netioalert    DWORD
	Fsv403_maxauditsz    DWORD
	Fsv403_srvheuristics LPWSTR
	Fsv403_auditedevents DWORD
	Fsv403_autoprofile   DWORD
	Fsv403_autopath      LPWSTR
} /* lmserver.h:95:11 */

type SERVER_INFO_403 = X_SERVER_INFO_403 /* lmserver.h:130:5 */
type PSERVER_INFO_403 = uintptr          /* lmserver.h:130:21 */
type LPSERVER_INFO_403 = uintptr         /* lmserver.h:130:39 */

type X_SERVER_INFO_502 = struct {
	Fsv502_sessopens              DWORD
	Fsv502_sessvcs                DWORD
	Fsv502_opensearch             DWORD
	Fsv502_sizreqbuf              DWORD
	Fsv502_initworkitems          DWORD
	Fsv502_maxworkitems           DWORD
	Fsv502_rawworkitems           DWORD
	Fsv502_irpstacksize           DWORD
	Fsv502_maxrawbuflen           DWORD
	Fsv502_sessusers              DWORD
	Fsv502_sessconns              DWORD
	Fsv502_maxpagedmemoryusage    DWORD
	Fsv502_maxnonpagedmemoryusage DWORD
	Fsv502_enablesoftcompat       WINBOOL
	Fsv502_enableforcedlogoff     WINBOOL
	Fsv502_timesource             WINBOOL
	Fsv502_acceptdownlevelapis    WINBOOL
	Fsv502_lmannounce             WINBOOL
} /* lmserver.h:132:11 */

type SERVER_INFO_502 = X_SERVER_INFO_502 /* lmserver.h:151:5 */
type PSERVER_INFO_502 = uintptr          /* lmserver.h:151:21 */
type LPSERVER_INFO_502 = uintptr         /* lmserver.h:151:39 */

type X_SERVER_INFO_503 = struct {
	Fsv503_sessopens               DWORD
	Fsv503_sessvcs                 DWORD
	Fsv503_opensearch              DWORD
	Fsv503_sizreqbuf               DWORD
	Fsv503_initworkitems           DWORD
	Fsv503_maxworkitems            DWORD
	Fsv503_rawworkitems            DWORD
	Fsv503_irpstacksize            DWORD
	Fsv503_maxrawbuflen            DWORD
	Fsv503_sessusers               DWORD
	Fsv503_sessconns               DWORD
	Fsv503_maxpagedmemoryusage     DWORD
	Fsv503_maxnonpagedmemoryusage  DWORD
	Fsv503_enablesoftcompat        WINBOOL
	Fsv503_enableforcedlogoff      WINBOOL
	Fsv503_timesource              WINBOOL
	Fsv503_acceptdownlevelapis     WINBOOL
	Fsv503_lmannounce              WINBOOL
	Fsv503_domain                  LPWSTR
	Fsv503_maxcopyreadlen          DWORD
	Fsv503_maxcopywritelen         DWORD
	Fsv503_minkeepsearch           DWORD
	Fsv503_maxkeepsearch           DWORD
	Fsv503_minkeepcomplsearch      DWORD
	Fsv503_maxkeepcomplsearch      DWORD
	Fsv503_threadcountadd          DWORD
	Fsv503_numblockthreads         DWORD
	Fsv503_scavtimeout             DWORD
	Fsv503_minrcvqueue             DWORD
	Fsv503_minfreeworkitems        DWORD
	Fsv503_xactmemsize             DWORD
	Fsv503_threadpriority          DWORD
	Fsv503_maxmpxct                DWORD
	Fsv503_oplockbreakwait         DWORD
	Fsv503_oplockbreakresponsewait DWORD
	Fsv503_enableoplocks           WINBOOL
	Fsv503_enableoplockforceclose  WINBOOL
	Fsv503_enablefcbopens          WINBOOL
	Fsv503_enableraw               WINBOOL
	Fsv503_enablesharednetdrives   WINBOOL
	Fsv503_minfreeconnections      DWORD
	Fsv503_maxfreeconnections      DWORD
	F__ccgo_pad1                   [4]byte
} /* lmserver.h:153:11 */

type SERVER_INFO_503 = X_SERVER_INFO_503 /* lmserver.h:196:5 */
type PSERVER_INFO_503 = uintptr          /* lmserver.h:196:21 */
type LPSERVER_INFO_503 = uintptr         /* lmserver.h:196:39 */

type X_SERVER_INFO_599 = struct {
	Fsv599_sessopens               DWORD
	Fsv599_sessvcs                 DWORD
	Fsv599_opensearch              DWORD
	Fsv599_sizreqbuf               DWORD
	Fsv599_initworkitems           DWORD
	Fsv599_maxworkitems            DWORD
	Fsv599_rawworkitems            DWORD
	Fsv599_irpstacksize            DWORD
	Fsv599_maxrawbuflen            DWORD
	Fsv599_sessusers               DWORD
	Fsv599_sessconns               DWORD
	Fsv599_maxpagedmemoryusage     DWORD
	Fsv599_maxnonpagedmemoryusage  DWORD
	Fsv599_enablesoftcompat        WINBOOL
	Fsv599_enableforcedlogoff      WINBOOL
	Fsv599_timesource              WINBOOL
	Fsv599_acceptdownlevelapis     WINBOOL
	Fsv599_lmannounce              WINBOOL
	Fsv599_domain                  LPWSTR
	Fsv599_maxcopyreadlen          DWORD
	Fsv599_maxcopywritelen         DWORD
	Fsv599_minkeepsearch           DWORD
	Fsv599_maxkeepsearch           DWORD
	Fsv599_minkeepcomplsearch      DWORD
	Fsv599_maxkeepcomplsearch      DWORD
	Fsv599_threadcountadd          DWORD
	Fsv599_numblockthreads         DWORD
	Fsv599_scavtimeout             DWORD
	Fsv599_minrcvqueue             DWORD
	Fsv599_minfreeworkitems        DWORD
	Fsv599_xactmemsize             DWORD
	Fsv599_threadpriority          DWORD
	Fsv599_maxmpxct                DWORD
	Fsv599_oplockbreakwait         DWORD
	Fsv599_oplockbreakresponsewait DWORD
	Fsv599_enableoplocks           WINBOOL
	Fsv599_enableoplockforceclose  WINBOOL
	Fsv599_enablefcbopens          WINBOOL
	Fsv599_enableraw               WINBOOL
	Fsv599_enablesharednetdrives   WINBOOL
	Fsv599_minfreeconnections      DWORD
	Fsv599_maxfreeconnections      DWORD
	Fsv599_initsesstable           DWORD
	Fsv599_initconntable           DWORD
	Fsv599_initfiletable           DWORD
	Fsv599_initsearchtable         DWORD
	Fsv599_alertschedule           DWORD
	Fsv599_errorthreshold          DWORD
	Fsv599_networkerrorthreshold   DWORD
	Fsv599_diskspacethreshold      DWORD
	Fsv599_reserved                DWORD
	Fsv599_maxlinkdelay            DWORD
	Fsv599_minlinkthroughput       DWORD
	Fsv599_linkinfovalidtime       DWORD
	Fsv599_scavqosinfoupdatetime   DWORD
	Fsv599_maxworkitemidletime     DWORD
	F__ccgo_pad1                   [4]byte
} /* lmserver.h:198:11 */

type SERVER_INFO_599 = X_SERVER_INFO_599 /* lmserver.h:255:5 */
type PSERVER_INFO_599 = uintptr          /* lmserver.h:255:21 */
type LPSERVER_INFO_599 = uintptr         /* lmserver.h:255:39 */

type X_SERVER_INFO_598 = struct {
	Fsv598_maxrawworkitems                 DWORD
	Fsv598_maxthreadsperqueue              DWORD
	Fsv598_producttype                     DWORD
	Fsv598_serversize                      DWORD
	Fsv598_connectionlessautodisc          DWORD
	Fsv598_sharingviolationretries         DWORD
	Fsv598_sharingviolationdelay           DWORD
	Fsv598_maxglobalopensearch             DWORD
	Fsv598_removeduplicatesearches         DWORD
	Fsv598_lockviolationoffset             DWORD
	Fsv598_lockviolationdelay              DWORD
	Fsv598_mdlreadswitchover               DWORD
	Fsv598_cachedopenlimit                 DWORD
	Fsv598_otherqueueaffinity              DWORD
	Fsv598_restrictnullsessaccess          WINBOOL
	Fsv598_enablewfw311directipx           WINBOOL
	Fsv598_queuesamplesecs                 DWORD
	Fsv598_balancecount                    DWORD
	Fsv598_preferredaffinity               DWORD
	Fsv598_maxfreerfcbs                    DWORD
	Fsv598_maxfreemfcbs                    DWORD
	Fsv598_maxfreelfcbs                    DWORD
	Fsv598_maxfreepagedpoolchunks          DWORD
	Fsv598_minpagedpoolchunksize           DWORD
	Fsv598_maxpagedpoolchunksize           DWORD
	Fsv598_sendsfrompreferredprocessor     WINBOOL
	Fsv598_cacheddirectorylimit            DWORD
	Fsv598_maxcopylength                   DWORD
	Fsv598_enablecompression               WINBOOL
	Fsv598_autosharewks                    WINBOOL
	Fsv598_autoshareserver                 WINBOOL
	Fsv598_enablesecuritysignature         WINBOOL
	Fsv598_requiresecuritysignature        WINBOOL
	Fsv598_minclientbuffersize             DWORD
	Fsv598_serverguid                      GUID
	Fsv598_ConnectionNoSessionsTimeout     DWORD
	Fsv598_IdleThreadTimeOut               DWORD
	Fsv598_enableW9xsecuritysignature      WINBOOL
	Fsv598_enforcekerberosreauthentication WINBOOL
	Fsv598_disabledos                      WINBOOL
	Fsv598_lowdiskspaceminimum             DWORD
	Fsv598_disablestrictnamechecking       WINBOOL
} /* lmserver.h:257:11 */

type SERVER_INFO_598 = X_SERVER_INFO_598 /* lmserver.h:300:5 */
type PSERVER_INFO_598 = uintptr          /* lmserver.h:300:21 */
type LPSERVER_INFO_598 = uintptr         /* lmserver.h:300:39 */

type X_SERVER_INFO_1005 = struct{ Fsv1005_comment LPWSTR } /* lmserver.h:302:11 */

type SERVER_INFO_1005 = X_SERVER_INFO_1005 /* lmserver.h:304:5 */
type PSERVER_INFO_1005 = uintptr           /* lmserver.h:304:22 */
type LPSERVER_INFO_1005 = uintptr          /* lmserver.h:304:41 */

type X_SERVER_INFO_1107 = struct{ Fsv1107_users DWORD } /* lmserver.h:306:11 */

type SERVER_INFO_1107 = X_SERVER_INFO_1107 /* lmserver.h:308:5 */
type PSERVER_INFO_1107 = uintptr           /* lmserver.h:308:22 */
type LPSERVER_INFO_1107 = uintptr          /* lmserver.h:308:41 */

type X_SERVER_INFO_1010 = struct{ Fsv1010_disc LONG } /* lmserver.h:310:11 */

type SERVER_INFO_1010 = X_SERVER_INFO_1010 /* lmserver.h:312:5 */
type PSERVER_INFO_1010 = uintptr           /* lmserver.h:312:22 */
type LPSERVER_INFO_1010 = uintptr          /* lmserver.h:312:41 */

type X_SERVER_INFO_1016 = struct{ Fsv1016_hidden WINBOOL } /* lmserver.h:314:11 */

type SERVER_INFO_1016 = X_SERVER_INFO_1016 /* lmserver.h:316:5 */
type PSERVER_INFO_1016 = uintptr           /* lmserver.h:316:22 */
type LPSERVER_INFO_1016 = uintptr          /* lmserver.h:316:41 */

type X_SERVER_INFO_1017 = struct{ Fsv1017_announce DWORD } /* lmserver.h:318:11 */

type SERVER_INFO_1017 = X_SERVER_INFO_1017 /* lmserver.h:320:5 */
type PSERVER_INFO_1017 = uintptr           /* lmserver.h:320:22 */
type LPSERVER_INFO_1017 = uintptr          /* lmserver.h:320:41 */

type X_SERVER_INFO_1018 = struct{ Fsv1018_anndelta DWORD } /* lmserver.h:322:11 */

type SERVER_INFO_1018 = X_SERVER_INFO_1018 /* lmserver.h:324:5 */
type PSERVER_INFO_1018 = uintptr           /* lmserver.h:324:22 */
type LPSERVER_INFO_1018 = uintptr          /* lmserver.h:324:41 */

type X_SERVER_INFO_1501 = struct{ Fsv1501_sessopens DWORD } /* lmserver.h:326:11 */

type SERVER_INFO_1501 = X_SERVER_INFO_1501 /* lmserver.h:328:5 */
type PSERVER_INFO_1501 = uintptr           /* lmserver.h:328:22 */
type LPSERVER_INFO_1501 = uintptr          /* lmserver.h:328:41 */

type X_SERVER_INFO_1502 = struct{ Fsv1502_sessvcs DWORD } /* lmserver.h:330:11 */

type SERVER_INFO_1502 = X_SERVER_INFO_1502 /* lmserver.h:332:5 */
type PSERVER_INFO_1502 = uintptr           /* lmserver.h:332:22 */
type LPSERVER_INFO_1502 = uintptr          /* lmserver.h:332:41 */

type X_SERVER_INFO_1503 = struct{ Fsv1503_opensearch DWORD } /* lmserver.h:334:11 */

type SERVER_INFO_1503 = X_SERVER_INFO_1503 /* lmserver.h:336:5 */
type PSERVER_INFO_1503 = uintptr           /* lmserver.h:336:22 */
type LPSERVER_INFO_1503 = uintptr          /* lmserver.h:336:41 */

type X_SERVER_INFO_1506 = struct{ Fsv1506_maxworkitems DWORD } /* lmserver.h:338:11 */

type SERVER_INFO_1506 = X_SERVER_INFO_1506 /* lmserver.h:340:5 */
type PSERVER_INFO_1506 = uintptr           /* lmserver.h:340:22 */
type LPSERVER_INFO_1506 = uintptr          /* lmserver.h:340:41 */

type X_SERVER_INFO_1509 = struct{ Fsv1509_maxrawbuflen DWORD } /* lmserver.h:342:11 */

type SERVER_INFO_1509 = X_SERVER_INFO_1509 /* lmserver.h:344:5 */
type PSERVER_INFO_1509 = uintptr           /* lmserver.h:344:22 */
type LPSERVER_INFO_1509 = uintptr          /* lmserver.h:344:41 */

type X_SERVER_INFO_1510 = struct{ Fsv1510_sessusers DWORD } /* lmserver.h:346:11 */

type SERVER_INFO_1510 = X_SERVER_INFO_1510 /* lmserver.h:348:5 */
type PSERVER_INFO_1510 = uintptr           /* lmserver.h:348:22 */
type LPSERVER_INFO_1510 = uintptr          /* lmserver.h:348:41 */

type X_SERVER_INFO_1511 = struct{ Fsv1511_sessconns DWORD } /* lmserver.h:350:11 */

type SERVER_INFO_1511 = X_SERVER_INFO_1511 /* lmserver.h:352:5 */
type PSERVER_INFO_1511 = uintptr           /* lmserver.h:352:22 */
type LPSERVER_INFO_1511 = uintptr          /* lmserver.h:352:41 */

type X_SERVER_INFO_1512 = struct{ Fsv1512_maxnonpagedmemoryusage DWORD } /* lmserver.h:354:11 */

type SERVER_INFO_1512 = X_SERVER_INFO_1512 /* lmserver.h:356:5 */
type PSERVER_INFO_1512 = uintptr           /* lmserver.h:356:22 */
type LPSERVER_INFO_1512 = uintptr          /* lmserver.h:356:41 */

type X_SERVER_INFO_1513 = struct{ Fsv1513_maxpagedmemoryusage DWORD } /* lmserver.h:358:11 */

type SERVER_INFO_1513 = X_SERVER_INFO_1513 /* lmserver.h:360:5 */
type PSERVER_INFO_1513 = uintptr           /* lmserver.h:360:22 */
type LPSERVER_INFO_1513 = uintptr          /* lmserver.h:360:41 */

type X_SERVER_INFO_1514 = struct{ Fsv1514_enablesoftcompat WINBOOL } /* lmserver.h:362:11 */

type SERVER_INFO_1514 = X_SERVER_INFO_1514 /* lmserver.h:364:5 */
type PSERVER_INFO_1514 = uintptr           /* lmserver.h:364:22 */
type LPSERVER_INFO_1514 = uintptr          /* lmserver.h:364:41 */

type X_SERVER_INFO_1515 = struct{ Fsv1515_enableforcedlogoff WINBOOL } /* lmserver.h:366:11 */

type SERVER_INFO_1515 = X_SERVER_INFO_1515 /* lmserver.h:368:5 */
type PSERVER_INFO_1515 = uintptr           /* lmserver.h:368:22 */
type LPSERVER_INFO_1515 = uintptr          /* lmserver.h:368:41 */

type X_SERVER_INFO_1516 = struct{ Fsv1516_timesource WINBOOL } /* lmserver.h:370:11 */

type SERVER_INFO_1516 = X_SERVER_INFO_1516 /* lmserver.h:372:5 */
type PSERVER_INFO_1516 = uintptr           /* lmserver.h:372:22 */
type LPSERVER_INFO_1516 = uintptr          /* lmserver.h:372:41 */

type X_SERVER_INFO_1518 = struct{ Fsv1518_lmannounce WINBOOL } /* lmserver.h:374:11 */

type SERVER_INFO_1518 = X_SERVER_INFO_1518 /* lmserver.h:376:5 */
type PSERVER_INFO_1518 = uintptr           /* lmserver.h:376:22 */
type LPSERVER_INFO_1518 = uintptr          /* lmserver.h:376:41 */

type X_SERVER_INFO_1520 = struct{ Fsv1520_maxcopyreadlen DWORD } /* lmserver.h:378:11 */

type SERVER_INFO_1520 = X_SERVER_INFO_1520 /* lmserver.h:380:5 */
type PSERVER_INFO_1520 = uintptr           /* lmserver.h:380:22 */
type LPSERVER_INFO_1520 = uintptr          /* lmserver.h:380:41 */

type X_SERVER_INFO_1521 = struct{ Fsv1521_maxcopywritelen DWORD } /* lmserver.h:382:11 */

type SERVER_INFO_1521 = X_SERVER_INFO_1521 /* lmserver.h:384:5 */
type PSERVER_INFO_1521 = uintptr           /* lmserver.h:384:22 */
type LPSERVER_INFO_1521 = uintptr          /* lmserver.h:384:41 */

type X_SERVER_INFO_1522 = struct{ Fsv1522_minkeepsearch DWORD } /* lmserver.h:386:11 */

type SERVER_INFO_1522 = X_SERVER_INFO_1522 /* lmserver.h:388:5 */
type PSERVER_INFO_1522 = uintptr           /* lmserver.h:388:22 */
type LPSERVER_INFO_1522 = uintptr          /* lmserver.h:388:41 */

type X_SERVER_INFO_1523 = struct{ Fsv1523_maxkeepsearch DWORD } /* lmserver.h:390:11 */

type SERVER_INFO_1523 = X_SERVER_INFO_1523 /* lmserver.h:392:5 */
type PSERVER_INFO_1523 = uintptr           /* lmserver.h:392:22 */
type LPSERVER_INFO_1523 = uintptr          /* lmserver.h:392:41 */

type X_SERVER_INFO_1524 = struct{ Fsv1524_minkeepcomplsearch DWORD } /* lmserver.h:394:11 */

type SERVER_INFO_1524 = X_SERVER_INFO_1524 /* lmserver.h:396:5 */
type PSERVER_INFO_1524 = uintptr           /* lmserver.h:396:22 */
type LPSERVER_INFO_1524 = uintptr          /* lmserver.h:396:41 */

type X_SERVER_INFO_1525 = struct{ Fsv1525_maxkeepcomplsearch DWORD } /* lmserver.h:398:11 */

type SERVER_INFO_1525 = X_SERVER_INFO_1525 /* lmserver.h:400:5 */
type PSERVER_INFO_1525 = uintptr           /* lmserver.h:400:22 */
type LPSERVER_INFO_1525 = uintptr          /* lmserver.h:400:41 */

type X_SERVER_INFO_1528 = struct{ Fsv1528_scavtimeout DWORD } /* lmserver.h:402:11 */

type SERVER_INFO_1528 = X_SERVER_INFO_1528 /* lmserver.h:404:5 */
type PSERVER_INFO_1528 = uintptr           /* lmserver.h:404:22 */
type LPSERVER_INFO_1528 = uintptr          /* lmserver.h:404:41 */

type X_SERVER_INFO_1529 = struct{ Fsv1529_minrcvqueue DWORD } /* lmserver.h:406:11 */

type SERVER_INFO_1529 = X_SERVER_INFO_1529 /* lmserver.h:408:5 */
type PSERVER_INFO_1529 = uintptr           /* lmserver.h:408:22 */
type LPSERVER_INFO_1529 = uintptr          /* lmserver.h:408:41 */

type X_SERVER_INFO_1530 = struct{ Fsv1530_minfreeworkitems DWORD } /* lmserver.h:410:11 */

type SERVER_INFO_1530 = X_SERVER_INFO_1530 /* lmserver.h:412:5 */
type PSERVER_INFO_1530 = uintptr           /* lmserver.h:412:22 */
type LPSERVER_INFO_1530 = uintptr          /* lmserver.h:412:41 */

type X_SERVER_INFO_1533 = struct{ Fsv1533_maxmpxct DWORD } /* lmserver.h:414:11 */

type SERVER_INFO_1533 = X_SERVER_INFO_1533 /* lmserver.h:416:5 */
type PSERVER_INFO_1533 = uintptr           /* lmserver.h:416:22 */
type LPSERVER_INFO_1533 = uintptr          /* lmserver.h:416:41 */

type X_SERVER_INFO_1534 = struct{ Fsv1534_oplockbreakwait DWORD } /* lmserver.h:418:11 */

type SERVER_INFO_1534 = X_SERVER_INFO_1534 /* lmserver.h:420:5 */
type PSERVER_INFO_1534 = uintptr           /* lmserver.h:420:22 */
type LPSERVER_INFO_1534 = uintptr          /* lmserver.h:420:41 */

type X_SERVER_INFO_1535 = struct{ Fsv1535_oplockbreakresponsewait DWORD } /* lmserver.h:422:11 */

type SERVER_INFO_1535 = X_SERVER_INFO_1535 /* lmserver.h:424:5 */
type PSERVER_INFO_1535 = uintptr           /* lmserver.h:424:22 */
type LPSERVER_INFO_1535 = uintptr          /* lmserver.h:424:41 */

type X_SERVER_INFO_1536 = struct{ Fsv1536_enableoplocks WINBOOL } /* lmserver.h:426:11 */

type SERVER_INFO_1536 = X_SERVER_INFO_1536 /* lmserver.h:428:5 */
type PSERVER_INFO_1536 = uintptr           /* lmserver.h:428:22 */
type LPSERVER_INFO_1536 = uintptr          /* lmserver.h:428:41 */

type X_SERVER_INFO_1537 = struct{ Fsv1537_enableoplockforceclose WINBOOL } /* lmserver.h:430:11 */

type SERVER_INFO_1537 = X_SERVER_INFO_1537 /* lmserver.h:432:5 */
type PSERVER_INFO_1537 = uintptr           /* lmserver.h:432:22 */
type LPSERVER_INFO_1537 = uintptr          /* lmserver.h:432:41 */

type X_SERVER_INFO_1538 = struct{ Fsv1538_enablefcbopens WINBOOL } /* lmserver.h:434:11 */

type SERVER_INFO_1538 = X_SERVER_INFO_1538 /* lmserver.h:436:5 */
type PSERVER_INFO_1538 = uintptr           /* lmserver.h:436:22 */
type LPSERVER_INFO_1538 = uintptr          /* lmserver.h:436:41 */

type X_SERVER_INFO_1539 = struct{ Fsv1539_enableraw WINBOOL } /* lmserver.h:438:11 */

type SERVER_INFO_1539 = X_SERVER_INFO_1539 /* lmserver.h:440:5 */
type PSERVER_INFO_1539 = uintptr           /* lmserver.h:440:22 */
type LPSERVER_INFO_1539 = uintptr          /* lmserver.h:440:41 */

type X_SERVER_INFO_1540 = struct{ Fsv1540_enablesharednetdrives WINBOOL } /* lmserver.h:442:11 */

type SERVER_INFO_1540 = X_SERVER_INFO_1540 /* lmserver.h:444:5 */
type PSERVER_INFO_1540 = uintptr           /* lmserver.h:444:22 */
type LPSERVER_INFO_1540 = uintptr          /* lmserver.h:444:41 */

type X_SERVER_INFO_1541 = struct{ Fsv1541_minfreeconnections WINBOOL } /* lmserver.h:446:11 */

type SERVER_INFO_1541 = X_SERVER_INFO_1541 /* lmserver.h:448:5 */
type PSERVER_INFO_1541 = uintptr           /* lmserver.h:448:22 */
type LPSERVER_INFO_1541 = uintptr          /* lmserver.h:448:41 */

type X_SERVER_INFO_1542 = struct{ Fsv1542_maxfreeconnections WINBOOL } /* lmserver.h:450:11 */

type SERVER_INFO_1542 = X_SERVER_INFO_1542 /* lmserver.h:452:5 */
type PSERVER_INFO_1542 = uintptr           /* lmserver.h:452:22 */
type LPSERVER_INFO_1542 = uintptr          /* lmserver.h:452:41 */

type X_SERVER_INFO_1543 = struct{ Fsv1543_initsesstable DWORD } /* lmserver.h:454:11 */

type SERVER_INFO_1543 = X_SERVER_INFO_1543 /* lmserver.h:456:5 */
type PSERVER_INFO_1543 = uintptr           /* lmserver.h:456:22 */
type LPSERVER_INFO_1543 = uintptr          /* lmserver.h:456:41 */

type X_SERVER_INFO_1544 = struct{ Fsv1544_initconntable DWORD } /* lmserver.h:458:11 */

type SERVER_INFO_1544 = X_SERVER_INFO_1544 /* lmserver.h:460:5 */
type PSERVER_INFO_1544 = uintptr           /* lmserver.h:460:22 */
type LPSERVER_INFO_1544 = uintptr          /* lmserver.h:460:41 */

type X_SERVER_INFO_1545 = struct{ Fsv1545_initfiletable DWORD } /* lmserver.h:462:11 */

type SERVER_INFO_1545 = X_SERVER_INFO_1545 /* lmserver.h:464:5 */
type PSERVER_INFO_1545 = uintptr           /* lmserver.h:464:22 */
type LPSERVER_INFO_1545 = uintptr          /* lmserver.h:464:41 */

type X_SERVER_INFO_1546 = struct{ Fsv1546_initsearchtable DWORD } /* lmserver.h:466:11 */

type SERVER_INFO_1546 = X_SERVER_INFO_1546 /* lmserver.h:468:5 */
type PSERVER_INFO_1546 = uintptr           /* lmserver.h:468:22 */
type LPSERVER_INFO_1546 = uintptr          /* lmserver.h:468:41 */

type X_SERVER_INFO_1547 = struct{ Fsv1547_alertschedule DWORD } /* lmserver.h:470:11 */

type SERVER_INFO_1547 = X_SERVER_INFO_1547 /* lmserver.h:472:5 */
type PSERVER_INFO_1547 = uintptr           /* lmserver.h:472:22 */
type LPSERVER_INFO_1547 = uintptr          /* lmserver.h:472:41 */

type X_SERVER_INFO_1548 = struct{ Fsv1548_errorthreshold DWORD } /* lmserver.h:474:11 */

type SERVER_INFO_1548 = X_SERVER_INFO_1548 /* lmserver.h:476:5 */
type PSERVER_INFO_1548 = uintptr           /* lmserver.h:476:22 */
type LPSERVER_INFO_1548 = uintptr          /* lmserver.h:476:41 */

type X_SERVER_INFO_1549 = struct{ Fsv1549_networkerrorthreshold DWORD } /* lmserver.h:478:11 */

type SERVER_INFO_1549 = X_SERVER_INFO_1549 /* lmserver.h:480:5 */
type PSERVER_INFO_1549 = uintptr           /* lmserver.h:480:22 */
type LPSERVER_INFO_1549 = uintptr          /* lmserver.h:480:41 */

type X_SERVER_INFO_1550 = struct{ Fsv1550_diskspacethreshold DWORD } /* lmserver.h:482:11 */

type SERVER_INFO_1550 = X_SERVER_INFO_1550 /* lmserver.h:484:5 */
type PSERVER_INFO_1550 = uintptr           /* lmserver.h:484:22 */
type LPSERVER_INFO_1550 = uintptr          /* lmserver.h:484:41 */

type X_SERVER_INFO_1552 = struct{ Fsv1552_maxlinkdelay DWORD } /* lmserver.h:486:11 */

type SERVER_INFO_1552 = X_SERVER_INFO_1552 /* lmserver.h:488:5 */
type PSERVER_INFO_1552 = uintptr           /* lmserver.h:488:22 */
type LPSERVER_INFO_1552 = uintptr          /* lmserver.h:488:41 */

type X_SERVER_INFO_1553 = struct{ Fsv1553_minlinkthroughput DWORD } /* lmserver.h:490:11 */

type SERVER_INFO_1553 = X_SERVER_INFO_1553 /* lmserver.h:492:5 */
type PSERVER_INFO_1553 = uintptr           /* lmserver.h:492:22 */
type LPSERVER_INFO_1553 = uintptr          /* lmserver.h:492:41 */

type X_SERVER_INFO_1554 = struct{ Fsv1554_linkinfovalidtime DWORD } /* lmserver.h:494:11 */

type SERVER_INFO_1554 = X_SERVER_INFO_1554 /* lmserver.h:496:5 */
type PSERVER_INFO_1554 = uintptr           /* lmserver.h:496:22 */
type LPSERVER_INFO_1554 = uintptr          /* lmserver.h:496:41 */

type X_SERVER_INFO_1555 = struct{ Fsv1555_scavqosinfoupdatetime DWORD } /* lmserver.h:498:11 */

type SERVER_INFO_1555 = X_SERVER_INFO_1555 /* lmserver.h:500:5 */
type PSERVER_INFO_1555 = uintptr           /* lmserver.h:500:22 */
type LPSERVER_INFO_1555 = uintptr          /* lmserver.h:500:41 */

type X_SERVER_INFO_1556 = struct{ Fsv1556_maxworkitemidletime DWORD } /* lmserver.h:502:11 */

type SERVER_INFO_1556 = X_SERVER_INFO_1556 /* lmserver.h:504:5 */
type PSERVER_INFO_1556 = uintptr           /* lmserver.h:504:22 */
type LPSERVER_INFO_1556 = uintptr          /* lmserver.h:504:41 */

type X_SERVER_INFO_1557 = struct{ Fsv1557_maxrawworkitems DWORD } /* lmserver.h:506:11 */

type SERVER_INFO_1557 = X_SERVER_INFO_1557 /* lmserver.h:508:5 */
type PSERVER_INFO_1557 = uintptr           /* lmserver.h:508:22 */
type LPSERVER_INFO_1557 = uintptr          /* lmserver.h:508:41 */

type X_SERVER_INFO_1560 = struct{ Fsv1560_producttype DWORD } /* lmserver.h:510:11 */

type SERVER_INFO_1560 = X_SERVER_INFO_1560 /* lmserver.h:512:5 */
type PSERVER_INFO_1560 = uintptr           /* lmserver.h:512:22 */
type LPSERVER_INFO_1560 = uintptr          /* lmserver.h:512:41 */

type X_SERVER_INFO_1561 = struct{ Fsv1561_serversize DWORD } /* lmserver.h:514:11 */

type SERVER_INFO_1561 = X_SERVER_INFO_1561 /* lmserver.h:516:5 */
type PSERVER_INFO_1561 = uintptr           /* lmserver.h:516:22 */
type LPSERVER_INFO_1561 = uintptr          /* lmserver.h:516:41 */

type X_SERVER_INFO_1562 = struct{ Fsv1562_connectionlessautodisc DWORD } /* lmserver.h:518:11 */

type SERVER_INFO_1562 = X_SERVER_INFO_1562 /* lmserver.h:520:5 */
type PSERVER_INFO_1562 = uintptr           /* lmserver.h:520:22 */
type LPSERVER_INFO_1562 = uintptr          /* lmserver.h:520:41 */

type X_SERVER_INFO_1563 = struct{ Fsv1563_sharingviolationretries DWORD } /* lmserver.h:522:11 */

type SERVER_INFO_1563 = X_SERVER_INFO_1563 /* lmserver.h:524:5 */
type PSERVER_INFO_1563 = uintptr           /* lmserver.h:524:22 */
type LPSERVER_INFO_1563 = uintptr          /* lmserver.h:524:41 */

type X_SERVER_INFO_1564 = struct{ Fsv1564_sharingviolationdelay DWORD } /* lmserver.h:526:11 */

type SERVER_INFO_1564 = X_SERVER_INFO_1564 /* lmserver.h:528:5 */
type PSERVER_INFO_1564 = uintptr           /* lmserver.h:528:22 */
type LPSERVER_INFO_1564 = uintptr          /* lmserver.h:528:41 */

type X_SERVER_INFO_1565 = struct{ Fsv1565_maxglobalopensearch DWORD } /* lmserver.h:530:11 */

type SERVER_INFO_1565 = X_SERVER_INFO_1565 /* lmserver.h:532:5 */
type PSERVER_INFO_1565 = uintptr           /* lmserver.h:532:22 */
type LPSERVER_INFO_1565 = uintptr          /* lmserver.h:532:41 */

type X_SERVER_INFO_1566 = struct{ Fsv1566_removeduplicatesearches WINBOOL } /* lmserver.h:534:11 */

type SERVER_INFO_1566 = X_SERVER_INFO_1566 /* lmserver.h:536:5 */
type PSERVER_INFO_1566 = uintptr           /* lmserver.h:536:22 */
type LPSERVER_INFO_1566 = uintptr          /* lmserver.h:536:41 */

type X_SERVER_INFO_1567 = struct{ Fsv1567_lockviolationretries DWORD } /* lmserver.h:538:11 */

type SERVER_INFO_1567 = X_SERVER_INFO_1567 /* lmserver.h:540:5 */
type PSERVER_INFO_1567 = uintptr           /* lmserver.h:540:22 */
type LPSERVER_INFO_1567 = uintptr          /* lmserver.h:540:41 */

type X_SERVER_INFO_1568 = struct{ Fsv1568_lockviolationoffset DWORD } /* lmserver.h:542:11 */

type SERVER_INFO_1568 = X_SERVER_INFO_1568 /* lmserver.h:544:5 */
type PSERVER_INFO_1568 = uintptr           /* lmserver.h:544:22 */
type LPSERVER_INFO_1568 = uintptr          /* lmserver.h:544:41 */

type X_SERVER_INFO_1569 = struct{ Fsv1569_lockviolationdelay DWORD } /* lmserver.h:546:11 */

type SERVER_INFO_1569 = X_SERVER_INFO_1569 /* lmserver.h:548:5 */
type PSERVER_INFO_1569 = uintptr           /* lmserver.h:548:22 */
type LPSERVER_INFO_1569 = uintptr          /* lmserver.h:548:41 */

type X_SERVER_INFO_1570 = struct{ Fsv1570_mdlreadswitchover DWORD } /* lmserver.h:550:11 */

type SERVER_INFO_1570 = X_SERVER_INFO_1570 /* lmserver.h:552:5 */
type PSERVER_INFO_1570 = uintptr           /* lmserver.h:552:22 */
type LPSERVER_INFO_1570 = uintptr          /* lmserver.h:552:41 */

type X_SERVER_INFO_1571 = struct{ Fsv1571_cachedopenlimit DWORD } /* lmserver.h:554:11 */

type SERVER_INFO_1571 = X_SERVER_INFO_1571 /* lmserver.h:556:5 */
type PSERVER_INFO_1571 = uintptr           /* lmserver.h:556:22 */
type LPSERVER_INFO_1571 = uintptr          /* lmserver.h:556:41 */

type X_SERVER_INFO_1572 = struct{ Fsv1572_criticalthreads DWORD } /* lmserver.h:558:11 */

type SERVER_INFO_1572 = X_SERVER_INFO_1572 /* lmserver.h:560:5 */
type PSERVER_INFO_1572 = uintptr           /* lmserver.h:560:22 */
type LPSERVER_INFO_1572 = uintptr          /* lmserver.h:560:41 */

type X_SERVER_INFO_1573 = struct{ Fsv1573_restrictnullsessaccess DWORD } /* lmserver.h:562:11 */

type SERVER_INFO_1573 = X_SERVER_INFO_1573 /* lmserver.h:564:5 */
type PSERVER_INFO_1573 = uintptr           /* lmserver.h:564:22 */
type LPSERVER_INFO_1573 = uintptr          /* lmserver.h:564:41 */

type X_SERVER_INFO_1574 = struct{ Fsv1574_enablewfw311directipx DWORD } /* lmserver.h:566:11 */

type SERVER_INFO_1574 = X_SERVER_INFO_1574 /* lmserver.h:568:5 */
type PSERVER_INFO_1574 = uintptr           /* lmserver.h:568:22 */
type LPSERVER_INFO_1574 = uintptr          /* lmserver.h:568:41 */

type X_SERVER_INFO_1575 = struct{ Fsv1575_otherqueueaffinity DWORD } /* lmserver.h:570:11 */

type SERVER_INFO_1575 = X_SERVER_INFO_1575 /* lmserver.h:572:5 */
type PSERVER_INFO_1575 = uintptr           /* lmserver.h:572:22 */
type LPSERVER_INFO_1575 = uintptr          /* lmserver.h:572:41 */

type X_SERVER_INFO_1576 = struct{ Fsv1576_queuesamplesecs DWORD } /* lmserver.h:574:11 */

type SERVER_INFO_1576 = X_SERVER_INFO_1576 /* lmserver.h:576:5 */
type PSERVER_INFO_1576 = uintptr           /* lmserver.h:576:22 */
type LPSERVER_INFO_1576 = uintptr          /* lmserver.h:576:41 */

type X_SERVER_INFO_1577 = struct{ Fsv1577_balancecount DWORD } /* lmserver.h:578:11 */

type SERVER_INFO_1577 = X_SERVER_INFO_1577 /* lmserver.h:580:5 */
type PSERVER_INFO_1577 = uintptr           /* lmserver.h:580:22 */
type LPSERVER_INFO_1577 = uintptr          /* lmserver.h:580:41 */

type X_SERVER_INFO_1578 = struct{ Fsv1578_preferredaffinity DWORD } /* lmserver.h:582:11 */

type SERVER_INFO_1578 = X_SERVER_INFO_1578 /* lmserver.h:584:5 */
type PSERVER_INFO_1578 = uintptr           /* lmserver.h:584:22 */
type LPSERVER_INFO_1578 = uintptr          /* lmserver.h:584:41 */

type X_SERVER_INFO_1579 = struct{ Fsv1579_maxfreerfcbs DWORD } /* lmserver.h:586:11 */

type SERVER_INFO_1579 = X_SERVER_INFO_1579 /* lmserver.h:588:5 */
type PSERVER_INFO_1579 = uintptr           /* lmserver.h:588:22 */
type LPSERVER_INFO_1579 = uintptr          /* lmserver.h:588:41 */

type X_SERVER_INFO_1580 = struct{ Fsv1580_maxfreemfcbs DWORD } /* lmserver.h:590:11 */

type SERVER_INFO_1580 = X_SERVER_INFO_1580 /* lmserver.h:592:5 */
type PSERVER_INFO_1580 = uintptr           /* lmserver.h:592:22 */
type LPSERVER_INFO_1580 = uintptr          /* lmserver.h:592:41 */

type X_SERVER_INFO_1581 = struct{ Fsv1581_maxfreemlcbs DWORD } /* lmserver.h:594:11 */

type SERVER_INFO_1581 = X_SERVER_INFO_1581 /* lmserver.h:596:5 */
type PSERVER_INFO_1581 = uintptr           /* lmserver.h:596:22 */
type LPSERVER_INFO_1581 = uintptr          /* lmserver.h:596:41 */

type X_SERVER_INFO_1582 = struct{ Fsv1582_maxfreepagedpoolchunks DWORD } /* lmserver.h:598:11 */

type SERVER_INFO_1582 = X_SERVER_INFO_1582 /* lmserver.h:600:5 */
type PSERVER_INFO_1582 = uintptr           /* lmserver.h:600:22 */
type LPSERVER_INFO_1582 = uintptr          /* lmserver.h:600:41 */

type X_SERVER_INFO_1583 = struct{ Fsv1583_minpagedpoolchunksize DWORD } /* lmserver.h:602:11 */

type SERVER_INFO_1583 = X_SERVER_INFO_1583 /* lmserver.h:604:5 */
type PSERVER_INFO_1583 = uintptr           /* lmserver.h:604:22 */
type LPSERVER_INFO_1583 = uintptr          /* lmserver.h:604:41 */

type X_SERVER_INFO_1584 = struct{ Fsv1584_maxpagedpoolchunksize DWORD } /* lmserver.h:606:11 */

type SERVER_INFO_1584 = X_SERVER_INFO_1584 /* lmserver.h:608:5 */
type PSERVER_INFO_1584 = uintptr           /* lmserver.h:608:22 */
type LPSERVER_INFO_1584 = uintptr          /* lmserver.h:608:41 */

type X_SERVER_INFO_1585 = struct{ Fsv1585_sendsfrompreferredprocessor WINBOOL } /* lmserver.h:610:11 */

type SERVER_INFO_1585 = X_SERVER_INFO_1585 /* lmserver.h:612:5 */
type PSERVER_INFO_1585 = uintptr           /* lmserver.h:612:22 */
type LPSERVER_INFO_1585 = uintptr          /* lmserver.h:612:41 */

type X_SERVER_INFO_1586 = struct{ Fsv1586_maxthreadsperqueue DWORD } /* lmserver.h:614:11 */

type SERVER_INFO_1586 = X_SERVER_INFO_1586 /* lmserver.h:616:5 */
type PSERVER_INFO_1586 = uintptr           /* lmserver.h:616:22 */
type LPSERVER_INFO_1586 = uintptr          /* lmserver.h:616:41 */

type X_SERVER_INFO_1587 = struct{ Fsv1587_cacheddirectorylimit DWORD } /* lmserver.h:618:11 */

type SERVER_INFO_1587 = X_SERVER_INFO_1587 /* lmserver.h:620:5 */
type PSERVER_INFO_1587 = uintptr           /* lmserver.h:620:22 */
type LPSERVER_INFO_1587 = uintptr          /* lmserver.h:620:41 */

type X_SERVER_INFO_1588 = struct{ Fsv1588_maxcopylength DWORD } /* lmserver.h:622:11 */

type SERVER_INFO_1588 = X_SERVER_INFO_1588 /* lmserver.h:624:5 */
type PSERVER_INFO_1588 = uintptr           /* lmserver.h:624:22 */
type LPSERVER_INFO_1588 = uintptr          /* lmserver.h:624:41 */

type X_SERVER_INFO_1590 = struct{ Fsv1590_enablecompression DWORD } /* lmserver.h:626:11 */

type SERVER_INFO_1590 = X_SERVER_INFO_1590 /* lmserver.h:628:5 */
type PSERVER_INFO_1590 = uintptr           /* lmserver.h:628:22 */
type LPSERVER_INFO_1590 = uintptr          /* lmserver.h:628:41 */

type X_SERVER_INFO_1591 = struct{ Fsv1591_autosharewks DWORD } /* lmserver.h:630:11 */

type SERVER_INFO_1591 = X_SERVER_INFO_1591 /* lmserver.h:632:5 */
type PSERVER_INFO_1591 = uintptr           /* lmserver.h:632:22 */
type LPSERVER_INFO_1591 = uintptr          /* lmserver.h:632:41 */

type X_SERVER_INFO_1592 = struct{ Fsv1592_autosharewks DWORD } /* lmserver.h:634:11 */

type SERVER_INFO_1592 = X_SERVER_INFO_1592 /* lmserver.h:636:5 */
type PSERVER_INFO_1592 = uintptr           /* lmserver.h:636:22 */
type LPSERVER_INFO_1592 = uintptr          /* lmserver.h:636:41 */

type X_SERVER_INFO_1593 = struct{ Fsv1593_enablesecuritysignature DWORD } /* lmserver.h:638:11 */

type SERVER_INFO_1593 = X_SERVER_INFO_1593 /* lmserver.h:640:5 */
type PSERVER_INFO_1593 = uintptr           /* lmserver.h:640:22 */
type LPSERVER_INFO_1593 = uintptr          /* lmserver.h:640:41 */

type X_SERVER_INFO_1594 = struct{ Fsv1594_requiresecuritysignature DWORD } /* lmserver.h:642:11 */

type SERVER_INFO_1594 = X_SERVER_INFO_1594 /* lmserver.h:644:5 */
type PSERVER_INFO_1594 = uintptr           /* lmserver.h:644:22 */
type LPSERVER_INFO_1594 = uintptr          /* lmserver.h:644:41 */

type X_SERVER_INFO_1595 = struct{ Fsv1595_minclientbuffersize DWORD } /* lmserver.h:646:11 */

type SERVER_INFO_1595 = X_SERVER_INFO_1595 /* lmserver.h:648:5 */
type PSERVER_INFO_1595 = uintptr           /* lmserver.h:648:22 */
type LPSERVER_INFO_1595 = uintptr          /* lmserver.h:648:41 */

type X_SERVER_INFO_1596 = struct{ Fsv1596_ConnectionNoSessionsTimeout DWORD } /* lmserver.h:650:11 */

type SERVER_INFO_1596 = X_SERVER_INFO_1596 /* lmserver.h:652:5 */
type PSERVER_INFO_1596 = uintptr           /* lmserver.h:652:22 */
type LPSERVER_INFO_1596 = uintptr          /* lmserver.h:652:41 */

type X_SERVER_INFO_1597 = struct{ Fsv1597_IdleThreadTimeOut DWORD } /* lmserver.h:654:11 */

type SERVER_INFO_1597 = X_SERVER_INFO_1597 /* lmserver.h:656:5 */
type PSERVER_INFO_1597 = uintptr           /* lmserver.h:656:22 */
type LPSERVER_INFO_1597 = uintptr          /* lmserver.h:656:41 */

type X_SERVER_INFO_1598 = struct{ Fsv1598_enableW9xsecuritysignature DWORD } /* lmserver.h:658:11 */

type SERVER_INFO_1598 = X_SERVER_INFO_1598 /* lmserver.h:660:5 */
type PSERVER_INFO_1598 = uintptr           /* lmserver.h:660:22 */
type LPSERVER_INFO_1598 = uintptr          /* lmserver.h:660:41 */

type X_SERVER_INFO_1599 = struct{ Fsv1598_enforcekerberosreauthentication BOOLEAN } /* lmserver.h:662:11 */

type SERVER_INFO_1599 = X_SERVER_INFO_1599 /* lmserver.h:664:5 */
type PSERVER_INFO_1599 = uintptr           /* lmserver.h:664:22 */
type LPSERVER_INFO_1599 = uintptr          /* lmserver.h:664:41 */

type X_SERVER_INFO_1600 = struct{ Fsv1598_disabledos BOOLEAN } /* lmserver.h:666:11 */

type SERVER_INFO_1600 = X_SERVER_INFO_1600 /* lmserver.h:668:5 */
type PSERVER_INFO_1600 = uintptr           /* lmserver.h:668:22 */
type LPSERVER_INFO_1600 = uintptr          /* lmserver.h:668:41 */

type X_SERVER_INFO_1601 = struct{ Fsv1598_lowdiskspaceminimum DWORD } /* lmserver.h:670:11 */

type SERVER_INFO_1601 = X_SERVER_INFO_1601 /* lmserver.h:672:5 */
type PSERVER_INFO_1601 = uintptr           /* lmserver.h:672:22 */
type LPSERVER_INFO_1601 = uintptr          /* lmserver.h:672:41 */

type X_SERVER_INFO_1602 = struct{ Fsv_1598_disablestrictnamechecking WINBOOL } /* lmserver.h:674:11 */

type SERVER_INFO_1602 = X_SERVER_INFO_1602 /* lmserver.h:676:5 */
type PSERVER_INFO_1602 = uintptr           /* lmserver.h:676:22 */
type LPSERVER_INFO_1602 = uintptr          /* lmserver.h:676:41 */

type X_SERVER_TRANSPORT_INFO_0 = struct {
	Fsvti0_numberofvcs            DWORD
	F__ccgo_pad1                  [4]byte
	Fsvti0_transportname          LPWSTR
	Fsvti0_transportaddress       LPBYTE
	Fsvti0_transportaddresslength DWORD
	F__ccgo_pad2                  [4]byte
	Fsvti0_networkaddress         LPWSTR
} /* lmserver.h:678:11 */

type SERVER_TRANSPORT_INFO_0 = X_SERVER_TRANSPORT_INFO_0 /* lmserver.h:684:5 */
type PSERVER_TRANSPORT_INFO_0 = uintptr                  /* lmserver.h:684:29 */
type LPSERVER_TRANSPORT_INFO_0 = uintptr                 /* lmserver.h:684:55 */

type X_SERVER_TRANSPORT_INFO_1 = struct {
	Fsvti1_numberofvcs            DWORD
	F__ccgo_pad1                  [4]byte
	Fsvti1_transportname          LPWSTR
	Fsvti1_transportaddress       LPBYTE
	Fsvti1_transportaddresslength DWORD
	F__ccgo_pad2                  [4]byte
	Fsvti1_networkaddress         LPWSTR
	Fsvti1_domain                 LPWSTR
} /* lmserver.h:686:11 */

type SERVER_TRANSPORT_INFO_1 = X_SERVER_TRANSPORT_INFO_1 /* lmserver.h:693:5 */
type PSERVER_TRANSPORT_INFO_1 = uintptr                  /* lmserver.h:693:29 */
type LPSERVER_TRANSPORT_INFO_1 = uintptr                 /* lmserver.h:693:55 */

type X_SERVER_TRANSPORT_INFO_2 = struct {
	Fsvti2_numberofvcs            DWORD
	F__ccgo_pad1                  [4]byte
	Fsvti2_transportname          LPWSTR
	Fsvti2_transportaddress       LPBYTE
	Fsvti2_transportaddresslength DWORD
	F__ccgo_pad2                  [4]byte
	Fsvti2_networkaddress         LPWSTR
	Fsvti2_domain                 LPWSTR
	Fsvti2_flags                  ULONG
	F__ccgo_pad3                  [4]byte
} /* lmserver.h:695:11 */

type SERVER_TRANSPORT_INFO_2 = X_SERVER_TRANSPORT_INFO_2 /* lmserver.h:703:5 */
type PSERVER_TRANSPORT_INFO_2 = uintptr                  /* lmserver.h:703:29 */
type LPSERVER_TRANSPORT_INFO_2 = uintptr                 /* lmserver.h:703:55 */

type X_SERVER_TRANSPORT_INFO_3 = struct {
	Fsvti3_numberofvcs            DWORD
	F__ccgo_pad1                  [4]byte
	Fsvti3_transportname          LPWSTR
	Fsvti3_transportaddress       LPBYTE
	Fsvti3_transportaddresslength DWORD
	F__ccgo_pad2                  [4]byte
	Fsvti3_networkaddress         LPWSTR
	Fsvti3_domain                 LPWSTR
	Fsvti3_flags                  ULONG
	Fsvti3_passwordlength         DWORD
	Fsvti3_password               [256]BYTE
} /* lmserver.h:705:11 */

type SERVER_TRANSPORT_INFO_3 = X_SERVER_TRANSPORT_INFO_3 /* lmserver.h:715:5 */
type PSERVER_TRANSPORT_INFO_3 = uintptr                  /* lmserver.h:715:29 */
type LPSERVER_TRANSPORT_INFO_3 = uintptr                 /* lmserver.h:715:55 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_SERVICE_INFO_0 = struct{ Fsvci0_name LPWSTR } /* lmsvc.h:19:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type SERVICE_INFO_0 = X_SERVICE_INFO_0 /* lmsvc.h:21:5 */
type PSERVICE_INFO_0 = uintptr         /* lmsvc.h:21:20 */
type LPSERVICE_INFO_0 = uintptr        /* lmsvc.h:21:37 */

type X_SERVICE_INFO_1 = struct {
	Fsvci1_name   LPWSTR
	Fsvci1_status DWORD
	Fsvci1_code   DWORD
	Fsvci1_pid    DWORD
	F__ccgo_pad1  [4]byte
} /* lmsvc.h:23:11 */

type SERVICE_INFO_1 = X_SERVICE_INFO_1 /* lmsvc.h:28:5 */
type PSERVICE_INFO_1 = uintptr         /* lmsvc.h:28:20 */
type LPSERVICE_INFO_1 = uintptr        /* lmsvc.h:28:37 */

type X_SERVICE_INFO_2 = struct {
	Fsvci2_name           LPWSTR
	Fsvci2_status         DWORD
	Fsvci2_code           DWORD
	Fsvci2_pid            DWORD
	F__ccgo_pad1          [4]byte
	Fsvci2_text           LPWSTR
	Fsvci2_specific_error DWORD
	F__ccgo_pad2          [4]byte
	Fsvci2_display_name   LPWSTR
} /* lmsvc.h:30:11 */

type SERVICE_INFO_2 = X_SERVICE_INFO_2 /* lmsvc.h:38:5 */
type PSERVICE_INFO_2 = uintptr         /* lmsvc.h:38:20 */
type LPSERVICE_INFO_2 = uintptr        /* lmsvc.h:38:37 */

type X_USE_INFO_0 = struct {
	Fui0_local  LPWSTR
	Fui0_remote LPWSTR
} /* lmuse.h:21:11 */

type USE_INFO_0 = X_USE_INFO_0 /* lmuse.h:24:5 */
type PUSE_INFO_0 = uintptr     /* lmuse.h:24:16 */
type LPUSE_INFO_0 = uintptr    /* lmuse.h:24:29 */

type X_USE_INFO_1 = struct {
	Fui1_local    LPWSTR
	Fui1_remote   LPWSTR
	Fui1_password LPWSTR
	Fui1_status   DWORD
	Fui1_asg_type DWORD
	Fui1_refcount DWORD
	Fui1_usecount DWORD
} /* lmuse.h:26:11 */

type USE_INFO_1 = X_USE_INFO_1 /* lmuse.h:34:5 */
type PUSE_INFO_1 = uintptr     /* lmuse.h:34:16 */
type LPUSE_INFO_1 = uintptr    /* lmuse.h:34:29 */

type X_USE_INFO_2 = struct {
	Fui2_local      LPWSTR
	Fui2_remote     LPWSTR
	Fui2_password   LPWSTR
	Fui2_status     DWORD
	Fui2_asg_type   DWORD
	Fui2_refcount   DWORD
	Fui2_usecount   DWORD
	Fui2_username   LPWSTR
	Fui2_domainname LPWSTR
} /* lmuse.h:36:11 */

type USE_INFO_2 = X_USE_INFO_2 /* lmuse.h:46:5 */
type PUSE_INFO_2 = uintptr     /* lmuse.h:46:16 */
type LPUSE_INFO_2 = uintptr    /* lmuse.h:46:29 */

type X_USE_INFO_3 = struct {
	Fui3_ui2     USE_INFO_2
	Fui3_flags   ULONG
	F__ccgo_pad1 [4]byte
} /* lmuse.h:48:11 */

type USE_INFO_3 = X_USE_INFO_3 /* lmuse.h:51:5 */
type PUSE_INFO_3 = uintptr     /* lmuse.h:51:16 */
type LPUSE_INFO_3 = uintptr    /* lmuse.h:51:29 */

type X_WKSTA_INFO_100 = struct {
	Fwki100_platform_id  DWORD
	F__ccgo_pad1         [4]byte
	Fwki100_computername LPWSTR
	Fwki100_langroup     LPWSTR
	Fwki100_ver_major    DWORD
	Fwki100_ver_minor    DWORD
} /* lmwksta.h:25:11 */

type WKSTA_INFO_100 = X_WKSTA_INFO_100 /* lmwksta.h:31:5 */
type PWKSTA_INFO_100 = uintptr         /* lmwksta.h:31:20 */
type LPWKSTA_INFO_100 = uintptr        /* lmwksta.h:31:37 */

type X_WKSTA_INFO_101 = struct {
	Fwki101_platform_id  DWORD
	F__ccgo_pad1         [4]byte
	Fwki101_computername LPWSTR
	Fwki101_langroup     LPWSTR
	Fwki101_ver_major    DWORD
	Fwki101_ver_minor    DWORD
	Fwki101_lanroot      LPWSTR
} /* lmwksta.h:33:11 */

type WKSTA_INFO_101 = X_WKSTA_INFO_101 /* lmwksta.h:40:5 */
type PWKSTA_INFO_101 = uintptr         /* lmwksta.h:40:20 */
type LPWKSTA_INFO_101 = uintptr        /* lmwksta.h:40:37 */

type X_WKSTA_INFO_102 = struct {
	Fwki102_platform_id     DWORD
	F__ccgo_pad1            [4]byte
	Fwki102_computername    LPWSTR
	Fwki102_langroup        LPWSTR
	Fwki102_ver_major       DWORD
	Fwki102_ver_minor       DWORD
	Fwki102_lanroot         LPWSTR
	Fwki102_logged_on_users DWORD
	F__ccgo_pad2            [4]byte
} /* lmwksta.h:42:11 */

type WKSTA_INFO_102 = X_WKSTA_INFO_102 /* lmwksta.h:50:5 */
type PWKSTA_INFO_102 = uintptr         /* lmwksta.h:50:20 */
type LPWKSTA_INFO_102 = uintptr        /* lmwksta.h:50:37 */

type X_WKSTA_INFO_302 = struct {
	Fwki302_char_wait                DWORD
	Fwki302_collection_time          DWORD
	Fwki302_maximum_collection_count DWORD
	Fwki302_keep_conn                DWORD
	Fwki302_keep_search              DWORD
	Fwki302_max_cmds                 DWORD
	Fwki302_num_work_buf             DWORD
	Fwki302_siz_work_buf             DWORD
	Fwki302_max_wrk_cache            DWORD
	Fwki302_sess_timeout             DWORD
	Fwki302_siz_error                DWORD
	Fwki302_num_alerts               DWORD
	Fwki302_num_services             DWORD
	Fwki302_errlog_sz                DWORD
	Fwki302_print_buf_time           DWORD
	Fwki302_num_char_buf             DWORD
	Fwki302_siz_char_buf             DWORD
	F__ccgo_pad1                     [4]byte
	Fwki302_wrk_heuristics           LPWSTR
	Fwki302_mailslots                DWORD
	Fwki302_num_dgram_buf            DWORD
} /* lmwksta.h:52:11 */

type WKSTA_INFO_302 = X_WKSTA_INFO_302 /* lmwksta.h:73:5 */
type PWKSTA_INFO_302 = uintptr         /* lmwksta.h:73:20 */
type LPWKSTA_INFO_302 = uintptr        /* lmwksta.h:73:37 */

type X_WKSTA_INFO_402 = struct {
	Fwki402_char_wait                DWORD
	Fwki402_collection_time          DWORD
	Fwki402_maximum_collection_count DWORD
	Fwki402_keep_conn                DWORD
	Fwki402_keep_search              DWORD
	Fwki402_max_cmds                 DWORD
	Fwki402_num_work_buf             DWORD
	Fwki402_siz_work_buf             DWORD
	Fwki402_max_wrk_cache            DWORD
	Fwki402_sess_timeout             DWORD
	Fwki402_siz_error                DWORD
	Fwki402_num_alerts               DWORD
	Fwki402_num_services             DWORD
	Fwki402_errlog_sz                DWORD
	Fwki402_print_buf_time           DWORD
	Fwki402_num_char_buf             DWORD
	Fwki402_siz_char_buf             DWORD
	F__ccgo_pad1                     [4]byte
	Fwki402_wrk_heuristics           LPWSTR
	Fwki402_mailslots                DWORD
	Fwki402_num_dgram_buf            DWORD
	Fwki402_max_threads              DWORD
	F__ccgo_pad2                     [4]byte
} /* lmwksta.h:75:11 */

type WKSTA_INFO_402 = X_WKSTA_INFO_402 /* lmwksta.h:97:5 */
type PWKSTA_INFO_402 = uintptr         /* lmwksta.h:97:20 */
type LPWKSTA_INFO_402 = uintptr        /* lmwksta.h:97:37 */

type X_WKSTA_INFO_502 = struct {
	Fwki502_char_wait                              DWORD
	Fwki502_collection_time                        DWORD
	Fwki502_maximum_collection_count               DWORD
	Fwki502_keep_conn                              DWORD
	Fwki502_max_cmds                               DWORD
	Fwki502_sess_timeout                           DWORD
	Fwki502_siz_char_buf                           DWORD
	Fwki502_max_threads                            DWORD
	Fwki502_lock_quota                             DWORD
	Fwki502_lock_increment                         DWORD
	Fwki502_lock_maximum                           DWORD
	Fwki502_pipe_increment                         DWORD
	Fwki502_pipe_maximum                           DWORD
	Fwki502_cache_file_timeout                     DWORD
	Fwki502_dormant_file_limit                     DWORD
	Fwki502_read_ahead_throughput                  DWORD
	Fwki502_num_mailslot_buffers                   DWORD
	Fwki502_num_srv_announce_buffers               DWORD
	Fwki502_max_illegal_datagram_events            DWORD
	Fwki502_illegal_datagram_event_reset_frequency DWORD
	Fwki502_log_election_packets                   WINBOOL
	Fwki502_use_opportunistic_locking              WINBOOL
	Fwki502_use_unlock_behind                      WINBOOL
	Fwki502_use_close_behind                       WINBOOL
	Fwki502_buf_named_pipes                        WINBOOL
	Fwki502_use_lock_read_unlock                   WINBOOL
	Fwki502_utilize_nt_caching                     WINBOOL
	Fwki502_use_raw_read                           WINBOOL
	Fwki502_use_raw_write                          WINBOOL
	Fwki502_use_write_raw_data                     WINBOOL
	Fwki502_use_encryption                         WINBOOL
	Fwki502_buf_files_deny_write                   WINBOOL
	Fwki502_buf_read_only_files                    WINBOOL
	Fwki502_force_core_create_mode                 WINBOOL
	Fwki502_use_512_byte_max_transfer              WINBOOL
} /* lmwksta.h:99:11 */

type WKSTA_INFO_502 = X_WKSTA_INFO_502 /* lmwksta.h:135:5 */
type PWKSTA_INFO_502 = uintptr         /* lmwksta.h:135:20 */
type LPWKSTA_INFO_502 = uintptr        /* lmwksta.h:135:37 */

type X_WKSTA_INFO_1010 = struct{ Fwki1010_char_wait DWORD } /* lmwksta.h:137:11 */

type WKSTA_INFO_1010 = X_WKSTA_INFO_1010 /* lmwksta.h:139:5 */
type PWKSTA_INFO_1010 = uintptr          /* lmwksta.h:139:21 */
type LPWKSTA_INFO_1010 = uintptr         /* lmwksta.h:139:39 */

type X_WKSTA_INFO_1011 = struct{ Fwki1011_collection_time DWORD } /* lmwksta.h:141:11 */

type WKSTA_INFO_1011 = X_WKSTA_INFO_1011 /* lmwksta.h:143:5 */
type PWKSTA_INFO_1011 = uintptr          /* lmwksta.h:143:21 */
type LPWKSTA_INFO_1011 = uintptr         /* lmwksta.h:143:39 */

type X_WKSTA_INFO_1012 = struct{ Fwki1012_maximum_collection_count DWORD } /* lmwksta.h:145:11 */

type WKSTA_INFO_1012 = X_WKSTA_INFO_1012 /* lmwksta.h:147:5 */
type PWKSTA_INFO_1012 = uintptr          /* lmwksta.h:147:21 */
type LPWKSTA_INFO_1012 = uintptr         /* lmwksta.h:147:39 */

type X_WKSTA_INFO_1027 = struct{ Fwki1027_errlog_sz DWORD } /* lmwksta.h:149:11 */

type WKSTA_INFO_1027 = X_WKSTA_INFO_1027 /* lmwksta.h:151:5 */
type PWKSTA_INFO_1027 = uintptr          /* lmwksta.h:151:21 */
type LPWKSTA_INFO_1027 = uintptr         /* lmwksta.h:151:39 */

type X_WKSTA_INFO_1028 = struct{ Fwki1028_print_buf_time DWORD } /* lmwksta.h:153:11 */

type WKSTA_INFO_1028 = X_WKSTA_INFO_1028 /* lmwksta.h:155:5 */
type PWKSTA_INFO_1028 = uintptr          /* lmwksta.h:155:21 */
type LPWKSTA_INFO_1028 = uintptr         /* lmwksta.h:155:39 */

type X_WKSTA_INFO_1032 = struct{ Fwki1032_wrk_heuristics DWORD } /* lmwksta.h:157:11 */

type WKSTA_INFO_1032 = X_WKSTA_INFO_1032 /* lmwksta.h:159:5 */
type PWKSTA_INFO_1032 = uintptr          /* lmwksta.h:159:21 */
type LPWKSTA_INFO_1032 = uintptr         /* lmwksta.h:159:39 */

type X_WKSTA_INFO_1013 = struct{ Fwki1013_keep_conn DWORD } /* lmwksta.h:161:11 */

type WKSTA_INFO_1013 = X_WKSTA_INFO_1013 /* lmwksta.h:163:5 */
type PWKSTA_INFO_1013 = uintptr          /* lmwksta.h:163:21 */
type LPWKSTA_INFO_1013 = uintptr         /* lmwksta.h:163:39 */

type X_WKSTA_INFO_1018 = struct{ Fwki1018_sess_timeout DWORD } /* lmwksta.h:165:11 */

type WKSTA_INFO_1018 = X_WKSTA_INFO_1018 /* lmwksta.h:167:5 */
type PWKSTA_INFO_1018 = uintptr          /* lmwksta.h:167:21 */
type LPWKSTA_INFO_1018 = uintptr         /* lmwksta.h:167:39 */

type X_WKSTA_INFO_1023 = struct{ Fwki1023_siz_char_buf DWORD } /* lmwksta.h:169:11 */

type WKSTA_INFO_1023 = X_WKSTA_INFO_1023 /* lmwksta.h:171:5 */
type PWKSTA_INFO_1023 = uintptr          /* lmwksta.h:171:21 */
type LPWKSTA_INFO_1023 = uintptr         /* lmwksta.h:171:39 */

type X_WKSTA_INFO_1033 = struct{ Fwki1033_max_threads DWORD } /* lmwksta.h:173:11 */

type WKSTA_INFO_1033 = X_WKSTA_INFO_1033 /* lmwksta.h:175:5 */
type PWKSTA_INFO_1033 = uintptr          /* lmwksta.h:175:21 */
type LPWKSTA_INFO_1033 = uintptr         /* lmwksta.h:175:39 */

type X_WKSTA_INFO_1041 = struct{ Fwki1041_lock_quota DWORD } /* lmwksta.h:177:11 */

type WKSTA_INFO_1041 = X_WKSTA_INFO_1041 /* lmwksta.h:179:5 */
type PWKSTA_INFO_1041 = uintptr          /* lmwksta.h:179:21 */
type LPWKSTA_INFO_1041 = uintptr         /* lmwksta.h:179:39 */

type X_WKSTA_INFO_1042 = struct{ Fwki1042_lock_increment DWORD } /* lmwksta.h:181:11 */

type WKSTA_INFO_1042 = X_WKSTA_INFO_1042 /* lmwksta.h:183:5 */
type PWKSTA_INFO_1042 = uintptr          /* lmwksta.h:183:21 */
type LPWKSTA_INFO_1042 = uintptr         /* lmwksta.h:183:39 */

type X_WKSTA_INFO_1043 = struct{ Fwki1043_lock_maximum DWORD } /* lmwksta.h:185:11 */

type WKSTA_INFO_1043 = X_WKSTA_INFO_1043 /* lmwksta.h:187:5 */
type PWKSTA_INFO_1043 = uintptr          /* lmwksta.h:187:21 */
type LPWKSTA_INFO_1043 = uintptr         /* lmwksta.h:187:39 */

type X_WKSTA_INFO_1044 = struct{ Fwki1044_pipe_increment DWORD } /* lmwksta.h:189:11 */

type WKSTA_INFO_1044 = X_WKSTA_INFO_1044 /* lmwksta.h:191:5 */
type PWKSTA_INFO_1044 = uintptr          /* lmwksta.h:191:21 */
type LPWKSTA_INFO_1044 = uintptr         /* lmwksta.h:191:39 */

type X_WKSTA_INFO_1045 = struct{ Fwki1045_pipe_maximum DWORD } /* lmwksta.h:193:11 */

type WKSTA_INFO_1045 = X_WKSTA_INFO_1045 /* lmwksta.h:195:5 */
type PWKSTA_INFO_1045 = uintptr          /* lmwksta.h:195:21 */
type LPWKSTA_INFO_1045 = uintptr         /* lmwksta.h:195:39 */

type X_WKSTA_INFO_1046 = struct{ Fwki1046_dormant_file_limit DWORD } /* lmwksta.h:197:11 */

type WKSTA_INFO_1046 = X_WKSTA_INFO_1046 /* lmwksta.h:199:5 */
type PWKSTA_INFO_1046 = uintptr          /* lmwksta.h:199:21 */
type LPWKSTA_INFO_1046 = uintptr         /* lmwksta.h:199:39 */

type X_WKSTA_INFO_1047 = struct{ Fwki1047_cache_file_timeout DWORD } /* lmwksta.h:201:11 */

type WKSTA_INFO_1047 = X_WKSTA_INFO_1047 /* lmwksta.h:203:5 */
type PWKSTA_INFO_1047 = uintptr          /* lmwksta.h:203:21 */
type LPWKSTA_INFO_1047 = uintptr         /* lmwksta.h:203:39 */

type X_WKSTA_INFO_1048 = struct{ Fwki1048_use_opportunistic_locking WINBOOL } /* lmwksta.h:205:11 */

type WKSTA_INFO_1048 = X_WKSTA_INFO_1048 /* lmwksta.h:207:5 */
type PWKSTA_INFO_1048 = uintptr          /* lmwksta.h:207:21 */
type LPWKSTA_INFO_1048 = uintptr         /* lmwksta.h:207:39 */

type X_WKSTA_INFO_1049 = struct{ Fwki1049_use_unlock_behind WINBOOL } /* lmwksta.h:209:11 */

type WKSTA_INFO_1049 = X_WKSTA_INFO_1049 /* lmwksta.h:211:5 */
type PWKSTA_INFO_1049 = uintptr          /* lmwksta.h:211:21 */
type LPWKSTA_INFO_1049 = uintptr         /* lmwksta.h:211:39 */

type X_WKSTA_INFO_1050 = struct{ Fwki1050_use_close_behind WINBOOL } /* lmwksta.h:213:11 */

type WKSTA_INFO_1050 = X_WKSTA_INFO_1050 /* lmwksta.h:215:5 */
type PWKSTA_INFO_1050 = uintptr          /* lmwksta.h:215:21 */
type LPWKSTA_INFO_1050 = uintptr         /* lmwksta.h:215:39 */

type X_WKSTA_INFO_1051 = struct{ Fwki1051_buf_named_pipes WINBOOL } /* lmwksta.h:217:11 */

type WKSTA_INFO_1051 = X_WKSTA_INFO_1051 /* lmwksta.h:219:5 */
type PWKSTA_INFO_1051 = uintptr          /* lmwksta.h:219:21 */
type LPWKSTA_INFO_1051 = uintptr         /* lmwksta.h:219:39 */

type X_WKSTA_INFO_1052 = struct{ Fwki1052_use_lock_read_unlock WINBOOL } /* lmwksta.h:221:11 */

type WKSTA_INFO_1052 = X_WKSTA_INFO_1052 /* lmwksta.h:223:5 */
type PWKSTA_INFO_1052 = uintptr          /* lmwksta.h:223:21 */
type LPWKSTA_INFO_1052 = uintptr         /* lmwksta.h:223:39 */

type X_WKSTA_INFO_1053 = struct{ Fwki1053_utilize_nt_caching WINBOOL } /* lmwksta.h:225:11 */

type WKSTA_INFO_1053 = X_WKSTA_INFO_1053 /* lmwksta.h:227:5 */
type PWKSTA_INFO_1053 = uintptr          /* lmwksta.h:227:21 */
type LPWKSTA_INFO_1053 = uintptr         /* lmwksta.h:227:39 */

type X_WKSTA_INFO_1054 = struct{ Fwki1054_use_raw_read WINBOOL } /* lmwksta.h:229:11 */

type WKSTA_INFO_1054 = X_WKSTA_INFO_1054 /* lmwksta.h:231:5 */
type PWKSTA_INFO_1054 = uintptr          /* lmwksta.h:231:21 */
type LPWKSTA_INFO_1054 = uintptr         /* lmwksta.h:231:39 */

type X_WKSTA_INFO_1055 = struct{ Fwki1055_use_raw_write WINBOOL } /* lmwksta.h:233:11 */

type WKSTA_INFO_1055 = X_WKSTA_INFO_1055 /* lmwksta.h:235:5 */
type PWKSTA_INFO_1055 = uintptr          /* lmwksta.h:235:21 */
type LPWKSTA_INFO_1055 = uintptr         /* lmwksta.h:235:39 */

type X_WKSTA_INFO_1056 = struct{ Fwki1056_use_write_raw_data WINBOOL } /* lmwksta.h:237:11 */

type WKSTA_INFO_1056 = X_WKSTA_INFO_1056 /* lmwksta.h:239:5 */
type PWKSTA_INFO_1056 = uintptr          /* lmwksta.h:239:21 */
type LPWKSTA_INFO_1056 = uintptr         /* lmwksta.h:239:39 */

type X_WKSTA_INFO_1057 = struct{ Fwki1057_use_encryption WINBOOL } /* lmwksta.h:241:11 */

type WKSTA_INFO_1057 = X_WKSTA_INFO_1057 /* lmwksta.h:243:5 */
type PWKSTA_INFO_1057 = uintptr          /* lmwksta.h:243:21 */
type LPWKSTA_INFO_1057 = uintptr         /* lmwksta.h:243:39 */

type X_WKSTA_INFO_1058 = struct{ Fwki1058_buf_files_deny_write WINBOOL } /* lmwksta.h:245:11 */

type WKSTA_INFO_1058 = X_WKSTA_INFO_1058 /* lmwksta.h:247:5 */
type PWKSTA_INFO_1058 = uintptr          /* lmwksta.h:247:21 */
type LPWKSTA_INFO_1058 = uintptr         /* lmwksta.h:247:39 */

type X_WKSTA_INFO_1059 = struct{ Fwki1059_buf_read_only_files WINBOOL } /* lmwksta.h:249:11 */

type WKSTA_INFO_1059 = X_WKSTA_INFO_1059 /* lmwksta.h:251:5 */
type PWKSTA_INFO_1059 = uintptr          /* lmwksta.h:251:21 */
type LPWKSTA_INFO_1059 = uintptr         /* lmwksta.h:251:39 */

type X_WKSTA_INFO_1060 = struct{ Fwki1060_force_core_create_mode WINBOOL } /* lmwksta.h:253:11 */

type WKSTA_INFO_1060 = X_WKSTA_INFO_1060 /* lmwksta.h:255:5 */
type PWKSTA_INFO_1060 = uintptr          /* lmwksta.h:255:21 */
type LPWKSTA_INFO_1060 = uintptr         /* lmwksta.h:255:39 */

type X_WKSTA_INFO_1061 = struct{ Fwki1061_use_512_byte_max_transfer WINBOOL } /* lmwksta.h:257:11 */

type WKSTA_INFO_1061 = X_WKSTA_INFO_1061 /* lmwksta.h:259:5 */
type PWKSTA_INFO_1061 = uintptr          /* lmwksta.h:259:21 */
type LPWKSTA_INFO_1061 = uintptr         /* lmwksta.h:259:39 */

type X_WKSTA_INFO_1062 = struct{ Fwki1062_read_ahead_throughput DWORD } /* lmwksta.h:261:11 */

type WKSTA_INFO_1062 = X_WKSTA_INFO_1062 /* lmwksta.h:263:5 */
type PWKSTA_INFO_1062 = uintptr          /* lmwksta.h:263:21 */
type LPWKSTA_INFO_1062 = uintptr         /* lmwksta.h:263:39 */

type X_WKSTA_USER_INFO_0 = struct{ Fwkui0_username LPWSTR } /* lmwksta.h:265:11 */

type WKSTA_USER_INFO_0 = X_WKSTA_USER_INFO_0 /* lmwksta.h:267:5 */
type PWKSTA_USER_INFO_0 = uintptr            /* lmwksta.h:267:23 */
type LPWKSTA_USER_INFO_0 = uintptr           /* lmwksta.h:267:43 */

type X_WKSTA_USER_INFO_1 = struct {
	Fwkui1_username     LPWSTR
	Fwkui1_logon_domain LPWSTR
	Fwkui1_oth_domains  LPWSTR
	Fwkui1_logon_server LPWSTR
} /* lmwksta.h:269:11 */

type WKSTA_USER_INFO_1 = X_WKSTA_USER_INFO_1 /* lmwksta.h:274:5 */
type PWKSTA_USER_INFO_1 = uintptr            /* lmwksta.h:274:23 */
type LPWKSTA_USER_INFO_1 = uintptr           /* lmwksta.h:274:43 */

type X_WKSTA_USER_INFO_1101 = struct{ Fwkui1101_oth_domains LPWSTR } /* lmwksta.h:276:11 */

type WKSTA_USER_INFO_1101 = X_WKSTA_USER_INFO_1101 /* lmwksta.h:278:5 */
type PWKSTA_USER_INFO_1101 = uintptr               /* lmwksta.h:278:26 */
type LPWKSTA_USER_INFO_1101 = uintptr              /* lmwksta.h:278:49 */

type X_WKSTA_TRANSPORT_INFO_0 = struct {
	Fwkti0_quality_of_service DWORD
	Fwkti0_number_of_vcs      DWORD
	Fwkti0_transport_name     LPWSTR
	Fwkti0_transport_address  LPWSTR
	Fwkti0_wan_ish            WINBOOL
	F__ccgo_pad1              [4]byte
} /* lmwksta.h:280:11 */

type WKSTA_TRANSPORT_INFO_0 = X_WKSTA_TRANSPORT_INFO_0 /* lmwksta.h:286:5 */
type PWKSTA_TRANSPORT_INFO_0 = uintptr                 /* lmwksta.h:286:28 */
type LPWKSTA_TRANSPORT_INFO_0 = uintptr                /* lmwksta.h:286:53 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_ERROR_LOG = struct {
	Fel_len       DWORD
	Fel_reserved  DWORD
	Fel_time      DWORD
	Fel_error     DWORD
	Fel_name      LPWSTR
	Fel_text      LPWSTR
	Fel_data      LPBYTE
	Fel_data_size DWORD
	Fel_nstrings  DWORD
} /* lmerrlog.h:13:11 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type ERROR_LOG = X_ERROR_LOG /* lmerrlog.h:23:5 */
type PERROR_LOG = uintptr    /* lmerrlog.h:23:15 */
type LPERROR_LOG = uintptr   /* lmerrlog.h:23:27 */

type X_HLOG = struct {
	Ftime       DWORD
	Flast_flags DWORD
	Foffset     DWORD
	Frec_offset DWORD
} /* lmerrlog.h:29:11 */

type HLOG = X_HLOG    /* lmerrlog.h:34:5 */
type PHLOG = uintptr  /* lmerrlog.h:34:10 */
type LPHLOG = uintptr /* lmerrlog.h:34:17 */

type X_CONFIG_INFO_0 = struct {
	Fcfgi0_key  LPWSTR
	Fcfgi0_data LPWSTR
} /* lmconfig.h:21:11 */

type CONFIG_INFO_0 = X_CONFIG_INFO_0 /* lmconfig.h:24:5 */
type PCONFIG_INFO_0 = uintptr        /* lmconfig.h:24:19 */
type LPCONFIG_INFO_0 = uintptr       /* lmconfig.h:24:35 */

type X_STAT_WORKSTATION_0 = struct {
	FStatisticsStartTime          LARGE_INTEGER
	FBytesReceived                LARGE_INTEGER
	FSmbsReceived                 LARGE_INTEGER
	FPagingReadBytesRequested     LARGE_INTEGER
	FNonPagingReadBytesRequested  LARGE_INTEGER
	FCacheReadBytesRequested      LARGE_INTEGER
	FNetworkReadBytesRequested    LARGE_INTEGER
	FBytesTransmitted             LARGE_INTEGER
	FSmbsTransmitted              LARGE_INTEGER
	FPagingWriteBytesRequested    LARGE_INTEGER
	FNonPagingWriteBytesRequested LARGE_INTEGER
	FCacheWriteBytesRequested     LARGE_INTEGER
	FNetworkWriteBytesRequested   LARGE_INTEGER
	FInitiallyFailedOperations    DWORD
	FFailedCompletionOperations   DWORD
	FReadOperations               DWORD
	FRandomReadOperations         DWORD
	FReadSmbs                     DWORD
	FLargeReadSmbs                DWORD
	FSmallReadSmbs                DWORD
	FWriteOperations              DWORD
	FRandomWriteOperations        DWORD
	FWriteSmbs                    DWORD
	FLargeWriteSmbs               DWORD
	FSmallWriteSmbs               DWORD
	FRawReadsDenied               DWORD
	FRawWritesDenied              DWORD
	FNetworkErrors                DWORD
	FSessions                     DWORD
	FFailedSessions               DWORD
	FReconnects                   DWORD
	FCoreConnects                 DWORD
	FLanman20Connects             DWORD
	FLanman21Connects             DWORD
	FLanmanNtConnects             DWORD
	FServerDisconnects            DWORD
	FHungSessions                 DWORD
	FUseCount                     DWORD
	FFailedUseCount               DWORD
	FCurrentCommands              DWORD
	F__ccgo_pad1                  [4]byte
} /* lmstats.h:51:11 */

type STAT_WORKSTATION_0 = X_STAT_WORKSTATION_0 /* lmstats.h:93:5 */
type PSTAT_WORKSTATION_0 = uintptr             /* lmstats.h:93:24 */
type LPSTAT_WORKSTATION_0 = uintptr            /* lmstats.h:93:45 */

type X_STAT_SERVER_0 = struct {
	Fsts0_start          DWORD
	Fsts0_fopens         DWORD
	Fsts0_devopens       DWORD
	Fsts0_jobsqueued     DWORD
	Fsts0_sopens         DWORD
	Fsts0_stimedout      DWORD
	Fsts0_serrorout      DWORD
	Fsts0_pwerrors       DWORD
	Fsts0_permerrors     DWORD
	Fsts0_syserrors      DWORD
	Fsts0_bytessent_low  DWORD
	Fsts0_bytessent_high DWORD
	Fsts0_bytesrcvd_low  DWORD
	Fsts0_bytesrcvd_high DWORD
	Fsts0_avresponse     DWORD
	Fsts0_reqbufneed     DWORD
	Fsts0_bigbufneed     DWORD
} /* lmstats.h:96:11 */

type STAT_SERVER_0 = X_STAT_SERVER_0 /* lmstats.h:114:5 */
type PSTAT_SERVER_0 = uintptr        /* lmstats.h:114:19 */
type LPSTAT_SERVER_0 = uintptr       /* lmstats.h:114:35 */

type X_AUDIT_ENTRY = struct {
	Fae_len         DWORD
	Fae_reserved    DWORD
	Fae_time        DWORD
	Fae_type        DWORD
	Fae_data_offset DWORD
	Fae_data_size   DWORD
} /* lmaudit.h:32:11 */

type AUDIT_ENTRY = X_AUDIT_ENTRY /* lmaudit.h:39:5 */
type PAUDIT_ENTRY = uintptr      /* lmaudit.h:39:17 */
type LPAUDIT_ENTRY = uintptr     /* lmaudit.h:39:31 */

type X_AE_SRVSTATUS = struct{ Fae_sv_status DWORD } /* lmaudit.h:43:11 */

type AE_SRVSTATUS = X_AE_SRVSTATUS /* lmaudit.h:45:5 */
type PAE_SRVSTATUS = uintptr       /* lmaudit.h:45:18 */
type LPAE_SRVSTATUS = uintptr      /* lmaudit.h:45:33 */

type X_AE_SESSLOGON = struct {
	Fae_so_compname  DWORD
	Fae_so_username  DWORD
	Fae_so_privilege DWORD
} /* lmaudit.h:47:11 */

type AE_SESSLOGON = X_AE_SESSLOGON /* lmaudit.h:51:5 */
type PAE_SESSLOGON = uintptr       /* lmaudit.h:51:18 */
type LPAE_SESSLOGON = uintptr      /* lmaudit.h:51:33 */

type X_AE_SESSLOGOFF = struct {
	Fae_sf_compname DWORD
	Fae_sf_username DWORD
	Fae_sf_reason   DWORD
} /* lmaudit.h:53:11 */

type AE_SESSLOGOFF = X_AE_SESSLOGOFF /* lmaudit.h:57:5 */
type PAE_SESSLOGOFF = uintptr        /* lmaudit.h:57:19 */
type LPAE_SESSLOGOFF = uintptr       /* lmaudit.h:57:35 */

type X_AE_SESSPWERR = struct {
	Fae_sp_compname DWORD
	Fae_sp_username DWORD
} /* lmaudit.h:59:11 */

type AE_SESSPWERR = X_AE_SESSPWERR /* lmaudit.h:62:5 */
type PAE_SESSPWERR = uintptr       /* lmaudit.h:62:18 */
type LPAE_SESSPWERR = uintptr      /* lmaudit.h:62:33 */

type X_AE_CONNSTART = struct {
	Fae_ct_compname DWORD
	Fae_ct_username DWORD
	Fae_ct_netname  DWORD
	Fae_ct_connid   DWORD
} /* lmaudit.h:64:11 */

type AE_CONNSTART = X_AE_CONNSTART /* lmaudit.h:69:5 */
type PAE_CONNSTART = uintptr       /* lmaudit.h:69:18 */
type LPAE_CONNSTART = uintptr      /* lmaudit.h:69:33 */

type X_AE_CONNSTOP = struct {
	Fae_cp_compname DWORD
	Fae_cp_username DWORD
	Fae_cp_netname  DWORD
	Fae_cp_connid   DWORD
	Fae_cp_reason   DWORD
} /* lmaudit.h:71:11 */

type AE_CONNSTOP = X_AE_CONNSTOP /* lmaudit.h:77:5 */
type PAE_CONNSTOP = uintptr      /* lmaudit.h:77:17 */
type LPAE_CONNSTOP = uintptr     /* lmaudit.h:77:31 */

type X_AE_CONNREJ = struct {
	Fae_cr_compname DWORD
	Fae_cr_username DWORD
	Fae_cr_netname  DWORD
	Fae_cr_reason   DWORD
} /* lmaudit.h:79:11 */

type AE_CONNREJ = X_AE_CONNREJ /* lmaudit.h:84:5 */
type PAE_CONNREJ = uintptr     /* lmaudit.h:84:16 */
type LPAE_CONNREJ = uintptr    /* lmaudit.h:84:29 */

type X_AE_RESACCESS = struct {
	Fae_ra_compname   DWORD
	Fae_ra_username   DWORD
	Fae_ra_resname    DWORD
	Fae_ra_operation  DWORD
	Fae_ra_returncode DWORD
	Fae_ra_restype    DWORD
	Fae_ra_fileid     DWORD
} /* lmaudit.h:86:11 */

type AE_RESACCESS = X_AE_RESACCESS /* lmaudit.h:94:5 */
type PAE_RESACCESS = uintptr       /* lmaudit.h:94:18 */
type LPAE_RESACCESS = uintptr      /* lmaudit.h:94:33 */

type X_AE_RESACCESSREJ = struct {
	Fae_rr_compname  DWORD
	Fae_rr_username  DWORD
	Fae_rr_resname   DWORD
	Fae_rr_operation DWORD
} /* lmaudit.h:96:11 */

type AE_RESACCESSREJ = X_AE_RESACCESSREJ /* lmaudit.h:101:5 */
type PAE_RESACCESSREJ = uintptr          /* lmaudit.h:101:21 */
type LPAE_RESACCESSREJ = uintptr         /* lmaudit.h:101:39 */

type X_AE_CLOSEFILE = struct {
	Fae_cf_compname DWORD
	Fae_cf_username DWORD
	Fae_cf_resname  DWORD
	Fae_cf_fileid   DWORD
	Fae_cf_duration DWORD
	Fae_cf_reason   DWORD
} /* lmaudit.h:103:11 */

type AE_CLOSEFILE = X_AE_CLOSEFILE /* lmaudit.h:110:5 */
type PAE_CLOSEFILE = uintptr       /* lmaudit.h:110:18 */
type LPAE_CLOSEFILE = uintptr      /* lmaudit.h:110:33 */

type X_AE_SERVICESTAT = struct {
	Fae_ss_compname  DWORD
	Fae_ss_username  DWORD
	Fae_ss_svcname   DWORD
	Fae_ss_status    DWORD
	Fae_ss_code      DWORD
	Fae_ss_text      DWORD
	Fae_ss_returnval DWORD
} /* lmaudit.h:112:11 */

type AE_SERVICESTAT = X_AE_SERVICESTAT /* lmaudit.h:120:5 */
type PAE_SERVICESTAT = uintptr         /* lmaudit.h:120:20 */
type LPAE_SERVICESTAT = uintptr        /* lmaudit.h:120:37 */

type X_AE_ACLMOD = struct {
	Fae_am_compname DWORD
	Fae_am_username DWORD
	Fae_am_resname  DWORD
	Fae_am_action   DWORD
	Fae_am_datalen  DWORD
} /* lmaudit.h:122:11 */

type AE_ACLMOD = X_AE_ACLMOD /* lmaudit.h:128:5 */
type PAE_ACLMOD = uintptr    /* lmaudit.h:128:15 */
type LPAE_ACLMOD = uintptr   /* lmaudit.h:128:27 */

type X_AE_UASMOD = struct {
	Fae_um_compname DWORD
	Fae_um_username DWORD
	Fae_um_resname  DWORD
	Fae_um_rectype  DWORD
	Fae_um_action   DWORD
	Fae_um_datalen  DWORD
} /* lmaudit.h:130:11 */

type AE_UASMOD = X_AE_UASMOD /* lmaudit.h:137:5 */
type PAE_UASMOD = uintptr    /* lmaudit.h:137:15 */
type LPAE_UASMOD = uintptr   /* lmaudit.h:137:27 */

type X_AE_NETLOGON = struct {
	Fae_no_compname  DWORD
	Fae_no_username  DWORD
	Fae_no_privilege DWORD
	Fae_no_authflags DWORD
} /* lmaudit.h:139:11 */

type AE_NETLOGON = X_AE_NETLOGON /* lmaudit.h:144:5 */
type PAE_NETLOGON = uintptr      /* lmaudit.h:144:17 */
type LPAE_NETLOGON = uintptr     /* lmaudit.h:144:31 */

type X_AE_NETLOGOFF = struct {
	Fae_nf_compname  DWORD
	Fae_nf_username  DWORD
	Fae_nf_reserved1 DWORD
	Fae_nf_reserved2 DWORD
} /* lmaudit.h:146:11 */

type AE_NETLOGOFF = X_AE_NETLOGOFF /* lmaudit.h:151:5 */
type PAE_NETLOGOFF = uintptr       /* lmaudit.h:151:18 */
type LPAE_NETLOGOFF = uintptr      /* lmaudit.h:151:33 */

type X_AE_ACCLIM = struct {
	Fae_al_compname DWORD
	Fae_al_username DWORD
	Fae_al_resname  DWORD
	Fae_al_limit    DWORD
} /* lmaudit.h:153:11 */

type AE_ACCLIM = X_AE_ACCLIM /* lmaudit.h:158:5 */
type PAE_ACCLIM = uintptr    /* lmaudit.h:158:15 */
type LPAE_ACCLIM = uintptr   /* lmaudit.h:158:27 */

type X_AE_LOCKOUT = struct {
	Fae_lk_compname     DWORD
	Fae_lk_username     DWORD
	Fae_lk_action       DWORD
	Fae_lk_bad_pw_count DWORD
} /* lmaudit.h:163:11 */

type AE_LOCKOUT = X_AE_LOCKOUT /* lmaudit.h:168:5 */
type PAE_LOCKOUT = uintptr     /* lmaudit.h:168:16 */
type LPAE_LOCKOUT = uintptr    /* lmaudit.h:168:29 */

type X_AE_GENERIC = struct {
	Fae_ge_msgfile DWORD
	Fae_ge_msgnum  DWORD
	Fae_ge_params  DWORD
	Fae_ge_param1  DWORD
	Fae_ge_param2  DWORD
	Fae_ge_param3  DWORD
	Fae_ge_param4  DWORD
	Fae_ge_param5  DWORD
	Fae_ge_param6  DWORD
	Fae_ge_param7  DWORD
	Fae_ge_param8  DWORD
	Fae_ge_param9  DWORD
} /* lmaudit.h:170:11 */

type AE_GENERIC = X_AE_GENERIC /* lmaudit.h:183:5 */
type PAE_GENERIC = uintptr     /* lmaudit.h:183:16 */
type LPAE_GENERIC = uintptr    /* lmaudit.h:183:29 */

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type NETSETUP_NAME_TYPE = uint32   /* lmjoin.h:16:5 */
type PNETSETUP_NAME_TYPE = uintptr /* lmjoin.h:16:24 */

type NETSETUP_JOIN_STATUS = uint32   /* lmjoin.h:20:5 */
type PNETSETUP_JOIN_STATUS = uintptr /* lmjoin.h:20:26 */

type NET_COMPUTER_NAME_TYPE = uint32   /* lmjoin.h:51:5 */
type PNET_COMPUTER_NAME_TYPE = uintptr /* lmjoin.h:51:28 */

type IWbemClassObject1 = struct{ FlpVtbl uintptr } /* wbemcli.h:104:9 */

type IWbemClassObject = IWbemClassObject1 /* wbemcli.h:104:36 */

type IWbemQualifierSet1 = struct{ FlpVtbl uintptr } /* wbemcli.h:112:9 */

type IWbemQualifierSet = IWbemQualifierSet1 /* wbemcli.h:112:37 */

type IWbemLocator1 = struct{ FlpVtbl uintptr } /* wbemcli.h:120:9 */

type IWbemLocator = IWbemLocator1 /* wbemcli.h:120:32 */

type IWbemObjectSink1 = struct{ FlpVtbl uintptr } /* wbemcli.h:128:9 */

type IWbemObjectSink = IWbemObjectSink1 /* wbemcli.h:128:35 */

type IWbemObjectSinkEx1 = struct{ FlpVtbl uintptr } /* wbemcli.h:136:9 */

type IWbemObjectSinkEx = IWbemObjectSinkEx1 /* wbemcli.h:136:37 */

type IEnumWbemClassObject1 = struct{ FlpVtbl uintptr } /* wbemcli.h:144:9 */

type IEnumWbemClassObject = IEnumWbemClassObject1 /* wbemcli.h:144:40 */

type IWbemContext1 = struct{ FlpVtbl uintptr } /* wbemcli.h:152:9 */

type IWbemContext = IWbemContext1 /* wbemcli.h:152:32 */

type IWbemCallResult1 = struct{ FlpVtbl uintptr } /* wbemcli.h:160:9 */

type IWbemCallResult = IWbemCallResult1 /* wbemcli.h:160:35 */

type IWbemServices1 = struct{ FlpVtbl uintptr } /* wbemcli.h:168:9 */

type IWbemServices = IWbemServices1 /* wbemcli.h:168:33 */

type IWbemShutdown1 = struct{ FlpVtbl uintptr } /* wbemcli.h:176:9 */

type IWbemShutdown = IWbemShutdown1 /* wbemcli.h:176:33 */

type IWbemObjectTextSrc1 = struct{ FlpVtbl uintptr } /* wbemcli.h:184:9 */

type IWbemObjectTextSrc = IWbemObjectTextSrc1 /* wbemcli.h:184:38 */

type IWbemObjectAccess1 = struct{ FlpVtbl uintptr } /* wbemcli.h:192:9 */

type IWbemObjectAccess = IWbemObjectAccess1 /* wbemcli.h:192:37 */

type IMofCompiler1 = struct{ FlpVtbl uintptr } /* wbemcli.h:200:9 */

type IMofCompiler = IMofCompiler1 /* wbemcli.h:200:32 */

type IUnsecuredApartment1 = struct{ FlpVtbl uintptr } /* wbemcli.h:208:9 */

type IUnsecuredApartment = IUnsecuredApartment1 /* wbemcli.h:208:39 */

type IWbemUnsecuredApartment1 = struct{ FlpVtbl uintptr } /* wbemcli.h:216:9 */

type IWbemUnsecuredApartment = IWbemUnsecuredApartment1 /* wbemcli.h:216:43 */

type IWbemStatusCodeText1 = struct{ FlpVtbl uintptr } /* wbemcli.h:224:9 */

type IWbemStatusCodeText = IWbemStatusCodeText1 /* wbemcli.h:224:39 */

type IWbemBackupRestore1 = struct{ FlpVtbl uintptr } /* wbemcli.h:232:9 */

type IWbemBackupRestore = IWbemBackupRestore1 /* wbemcli.h:232:38 */

type IWbemBackupRestoreEx1 = struct{ FlpVtbl uintptr } /* wbemcli.h:240:9 */

type IWbemBackupRestoreEx = IWbemBackupRestoreEx1 /* wbemcli.h:240:40 */

type IWbemRefresher1 = struct{ FlpVtbl uintptr } /* wbemcli.h:248:9 */

type IWbemRefresher = IWbemRefresher1 /* wbemcli.h:248:34 */

type IWbemHiPerfEnum1 = struct{ FlpVtbl uintptr } /* wbemcli.h:256:9 */

type IWbemHiPerfEnum = IWbemHiPerfEnum1 /* wbemcli.h:256:35 */

type IWbemConfigureRefresher1 = struct{ FlpVtbl uintptr } /* wbemcli.h:264:9 */

type IWbemConfigureRefresher = IWbemConfigureRefresher1 /* wbemcli.h:264:43 */

type WBEM_GENUS_TYPE = uint32            /* wbemcli.h:455:3 */
type WBEM_CHANGE_FLAG_TYPE = uint32      /* wbemcli.h:465:3 */
type WBEM_GENERIC_FLAG_TYPE = uint32     /* wbemcli.h:483:3 */
type WBEM_STATUS_TYPE = uint32           /* wbemcli.h:493:3 */
type WBEM_TIMEOUT_TYPE = uint32          /* wbemcli.h:497:3 */
type WBEM_CONDITION_FLAG_TYPE = uint32   /* wbemcli.h:514:3 */
type WBEM_FLAVOR_TYPE = uint32           /* wbemcli.h:530:3 */
type WBEM_QUERY_FLAG_TYPE = uint32       /* wbemcli.h:535:3 */
type WBEM_SECURITY_FLAGS = uint32        /* wbemcli.h:545:3 */
type WBEM_LIMITATION_FLAG_TYPE = uint32  /* wbemcli.h:549:3 */
type WBEM_TEXT_FLAG_TYPE = uint32        /* wbemcli.h:552:3 */
type WBEM_COMPARISON_FLAG = uint32       /* wbemcli.h:561:3 */
type WBEM_LOCKING_FLAG_TYPE = uint32     /* wbemcli.h:564:3 */
type CIMTYPE_ENUMERATION = uint32        /* wbemcli.h:585:3 */
type WBEM_BACKUP_RESTORE_FLAGS = uint32  /* wbemcli.h:589:3 */
type WBEM_REFRESHER_FLAGS = uint32       /* wbemcli.h:593:3 */
type WBEM_SHUTDOWN_FLAGS = uint32        /* wbemcli.h:598:3 */
type WBEMSTATUS_FORMAT = uint32          /* wbemcli.h:602:3 */
type WBEM_LIMITS = uint32                /* wbemcli.h:609:3 */
type WBEMSTATUS = uint32                 /* wbemcli.h:804:3 */
type WMI_OBJ_TEXT = uint32               /* wbemcli.h:819:3 */
type WBEM_COMPILER_OPTIONS = uint32      /* wbemcli.h:828:3 */
type WBEM_CONNECT_OPTIONS = uint32       /* wbemcli.h:833:3 */
type WBEM_UNSECAPP_FLAG_TYPE = uint32    /* wbemcli.h:838:3 */
type WBEM_INFORMATION_FLAG_TYPE = uint32 /* wbemcli.h:842:3 */
type Tag_CompileStatusInfo = struct {
	FlPhaseError LONG
	FhRes        HRESULT
	FObjectNum   LONG
	FFirstLine   LONG
	FLastLine    LONG
	FdwOutFlags  DWORD
} /* wbemcli.h:843:9 */

type WBEM_COMPILE_STATUS_INFO = Tag_CompileStatusInfo /* wbemcli.h:850:3 */
type CIMTYPE = LONG                                   /* wbemcli.h:851:14 */
type IWbemClassObjectVtbl1 = struct {
	FQueryInterface          uintptr
	FAddRef                  uintptr
	FRelease                 uintptr
	FGetQualifierSet         uintptr
	FGet                     uintptr
	FPut                     uintptr
	FDelete                  uintptr
	FGetNames                uintptr
	FBeginEnumeration        uintptr
	FNext                    uintptr
	FEndEnumeration          uintptr
	FGetPropertyQualifierSet uintptr
	FClone                   uintptr
	FGetObjectText           uintptr
	FSpawnDerivedClass       uintptr
	FSpawnInstance           uintptr
	FCompareTo               uintptr
	FGetPropertyOrigin       uintptr
	FInheritsFrom            uintptr
	FGetMethod               uintptr
	FPutMethod               uintptr
	FDeleteMethod            uintptr
	FBeginMethodEnumeration  uintptr
	FNextMethod              uintptr
	FEndMethodEnumeration    uintptr
	FGetMethodQualifierSet   uintptr
	FGetMethodOrigin         uintptr
} /* wbemcli.h:104:9 */

type IWbemClassObjectVtbl = IWbemClassObjectVtbl1 /* wbemcli.h:1230:3 */
type IWbemQualifierSetVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FGet              uintptr
	FPut              uintptr
	FDelete           uintptr
	FGetNames         uintptr
	FBeginEnumeration uintptr
	FNext             uintptr
	FEndEnumeration   uintptr
} /* wbemcli.h:112:9 */

type IWbemQualifierSetVtbl = IWbemQualifierSetVtbl1 /* wbemcli.h:1458:3 */
type IWbemLocatorVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FConnectServer  uintptr
} /* wbemcli.h:120:9 */

type IWbemLocatorVtbl = IWbemLocatorVtbl1 /* wbemcli.h:1573:3 */
type IWbemObjectSinkVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FIndicate       uintptr
	FSetStatus      uintptr
} /* wbemcli.h:128:9 */

type IWbemObjectSinkVtbl = IWbemObjectSinkVtbl1 /* wbemcli.h:1665:3 */
type IWbemObjectSinkExVtbl1 = struct {
	FQueryInterface       uintptr
	FAddRef               uintptr
	FRelease              uintptr
	FIndicate             uintptr
	FSetStatus            uintptr
	FWriteMessage         uintptr
	FWriteError           uintptr
	FPromptUser           uintptr
	FWriteProgress        uintptr
	FWriteStreamParameter uintptr
} /* wbemcli.h:136:9 */

type IWbemObjectSinkExVtbl = IWbemObjectSinkExVtbl1 /* wbemcli.h:1809:3 */
type IEnumWbemClassObjectVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FReset          uintptr
	FNext           uintptr
	FNextAsync      uintptr
	FClone          uintptr
	FSkip           uintptr
} /* wbemcli.h:144:9 */

type IEnumWbemClassObjectVtbl = IEnumWbemClassObjectVtbl1 /* wbemcli.h:1949:3 */
type IWbemContextVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FClone            uintptr
	FGetNames         uintptr
	FBeginEnumeration uintptr
	FNext             uintptr
	FEndEnumeration   uintptr
	FSetValue         uintptr
	FGetValue         uintptr
	FDeleteValue      uintptr
	FDeleteAll        uintptr
} /* wbemcli.h:152:9 */

type IWbemContextVtbl = IWbemContextVtbl1 /* wbemcli.h:2112:3 */
type IWbemCallResultVtbl1 = struct {
	FQueryInterface    uintptr
	FAddRef            uintptr
	FRelease           uintptr
	FGetResultObject   uintptr
	FGetResultString   uintptr
	FGetResultServices uintptr
	FGetCallStatus     uintptr
} /* wbemcli.h:160:9 */

type IWbemCallResultVtbl = IWbemCallResultVtbl1 /* wbemcli.h:2250:3 */
type IWbemServicesVtbl1 = struct {
	FQueryInterface             uintptr
	FAddRef                     uintptr
	FRelease                    uintptr
	FOpenNamespace              uintptr
	FCancelAsyncCall            uintptr
	FQueryObjectSink            uintptr
	FGetObjectA                 uintptr
	FGetObjectAsync             uintptr
	FPutClass                   uintptr
	FPutClassAsync              uintptr
	FDeleteClass                uintptr
	FDeleteClassAsync           uintptr
	FCreateClassEnum            uintptr
	FCreateClassEnumAsync       uintptr
	FPutInstance                uintptr
	FPutInstanceAsync           uintptr
	FDeleteInstance             uintptr
	FDeleteInstanceAsync        uintptr
	FCreateInstanceEnum         uintptr
	FCreateInstanceEnumAsync    uintptr
	FExecQuery                  uintptr
	FExecQueryAsync             uintptr
	FExecNotificationQuery      uintptr
	FExecNotificationQueryAsync uintptr
	FExecMethod                 uintptr
	FExecMethodAsync            uintptr
} /* wbemcli.h:168:9 */

type IWbemServicesVtbl = IWbemServicesVtbl1 /* wbemcli.h:2643:3 */
type IWbemShutdownVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FShutdown       uintptr
} /* wbemcli.h:176:9 */

type IWbemShutdownVtbl = IWbemShutdownVtbl1 /* wbemcli.h:2812:3 */
type IWbemObjectTextSrcVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FGetText        uintptr
	FCreateFromText uintptr
} /* wbemcli.h:184:9 */

type IWbemObjectTextSrcVtbl = IWbemObjectTextSrcVtbl1 /* wbemcli.h:2912:3 */
type IWbemObjectAccessVtbl1 = struct {
	FQueryInterface          uintptr
	FAddRef                  uintptr
	FRelease                 uintptr
	FGetQualifierSet         uintptr
	FGet                     uintptr
	FPut                     uintptr
	FDelete                  uintptr
	FGetNames                uintptr
	FBeginEnumeration        uintptr
	FNext                    uintptr
	FEndEnumeration          uintptr
	FGetPropertyQualifierSet uintptr
	FClone                   uintptr
	FGetObjectText           uintptr
	FSpawnDerivedClass       uintptr
	FSpawnInstance           uintptr
	FCompareTo               uintptr
	FGetPropertyOrigin       uintptr
	FInheritsFrom            uintptr
	FGetMethod               uintptr
	FPutMethod               uintptr
	FDeleteMethod            uintptr
	FBeginMethodEnumeration  uintptr
	FNextMethod              uintptr
	FEndMethodEnumeration    uintptr
	FGetMethodQualifierSet   uintptr
	FGetMethodOrigin         uintptr
	FGetPropertyHandle       uintptr
	FWritePropertyValue      uintptr
	FReadPropertyValue       uintptr
	FReadDWORD               uintptr
	FWriteDWORD              uintptr
	FReadQWORD               uintptr
	FWriteQWORD              uintptr
	FGetPropertyInfoByHandle uintptr
	FLock                    uintptr
	FUnlock                  uintptr
} /* wbemcli.h:192:9 */

type IWbemObjectAccessVtbl = IWbemObjectAccessVtbl1 /* wbemcli.h:3208:3 */
type IMofCompilerVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FCompileFile    uintptr
	FCompileBuffer  uintptr
	FCreateBMOF     uintptr
} /* wbemcli.h:200:9 */

type IMofCompilerVtbl = IMofCompilerVtbl1 /* wbemcli.h:3479:3 */
type IUnsecuredApartmentVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FCreateObjectStub uintptr
} /* wbemcli.h:208:9 */

type IUnsecuredApartmentVtbl = IUnsecuredApartmentVtbl1 /* wbemcli.h:3566:3 */
type IWbemUnsecuredApartmentVtbl1 = struct {
	FQueryInterface   uintptr
	FAddRef           uintptr
	FRelease          uintptr
	FCreateObjectStub uintptr
	FCreateSinkStub   uintptr
} /* wbemcli.h:216:9 */

type IWbemUnsecuredApartmentVtbl = IWbemUnsecuredApartmentVtbl1 /* wbemcli.h:3655:3 */
type IWbemStatusCodeTextVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FGetErrorCodeText    uintptr
	FGetFacilityCodeText uintptr
} /* wbemcli.h:224:9 */

type IWbemStatusCodeTextVtbl = IWbemStatusCodeTextVtbl1 /* wbemcli.h:3757:3 */
type IWbemBackupRestoreVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FBackup         uintptr
	FRestore        uintptr
} /* wbemcli.h:232:9 */

type IWbemBackupRestoreVtbl = IWbemBackupRestoreVtbl1 /* wbemcli.h:3849:3 */
type IWbemBackupRestoreExVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FBackup         uintptr
	FRestore        uintptr
	FPause          uintptr
	FResume         uintptr
} /* wbemcli.h:240:9 */

type IWbemBackupRestoreExVtbl = IWbemBackupRestoreExVtbl1 /* wbemcli.h:3946:3 */
type IWbemRefresherVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FRefresh        uintptr
} /* wbemcli.h:248:9 */

type IWbemRefresherVtbl = IWbemRefresherVtbl1 /* wbemcli.h:4037:3 */
type IWbemHiPerfEnumVtbl1 = struct {
	FQueryInterface uintptr
	FAddRef         uintptr
	FRelease        uintptr
	FAddObjects     uintptr
	FRemoveObjects  uintptr
	FGetObjects     uintptr
	FRemoveAll      uintptr
} /* wbemcli.h:256:9 */

type IWbemHiPerfEnumVtbl = IWbemHiPerfEnumVtbl1 /* wbemcli.h:4151:3 */
type IWbemConfigureRefresherVtbl1 = struct {
	FQueryInterface      uintptr
	FAddRef              uintptr
	FRelease             uintptr
	FAddObjectByPath     uintptr
	FAddObjectByTemplate uintptr
	FAddRefresher        uintptr
	FRemove              uintptr
	FAddEnum             uintptr
} /* wbemcli.h:264:9 */

type IWbemConfigureRefresherVtbl = IWbemConfigureRefresherVtbl1 /* wbemcli.h:4304:3 */

// End additional prototypes

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type X_PROFILEINFOA = struct {
	FdwSize        DWORD
	FdwFlags       DWORD
	FlpUserName    LPSTR
	FlpProfilePath LPSTR
	FlpDefaultPath LPSTR
	FlpServerName  LPSTR
	FlpPolicyPath  LPSTR
	FhProfile      HANDLE
} /* profinfo.h:11:9 */

// End additional prototypes

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

type PROFILEINFOA = X_PROFILEINFOA /* profinfo.h:20:3 */
type LPPROFILEINFOA = uintptr      /* profinfo.h:20:16 */

type X_PROFILEINFOW = struct {
	FdwSize        DWORD
	FdwFlags       DWORD
	FlpUserName    LPWSTR
	FlpProfilePath LPWSTR
	FlpDefaultPath LPWSTR
	FlpServerName  LPWSTR
	FlpPolicyPath  LPWSTR
	FhProfile      HANDLE
} /* profinfo.h:22:9 */

type PROFILEINFOW = X_PROFILEINFOW /* profinfo.h:31:3 */
type LPPROFILEINFOW = uintptr      /* profinfo.h:31:16 */

type PROFILEINFO = PROFILEINFOA     /* profinfo.h:33:1 */
type LPPROFILEINFO = LPPROFILEINFOA /* profinfo.h:34:1 */

type GPO_LINK = uint32   /* userenv.h:85:5 */
type PGPO_LINK = uintptr /* userenv.h:85:15 */

type X_GROUP_POLICY_OBJECTA = struct {
	FdwOptions     DWORD
	FdwVersion     DWORD
	FlpDSPath      LPSTR
	FlpFileSysPath LPSTR
	FlpDisplayName LPSTR
	FszGPOName     [50]CHAR
	F__ccgo_pad1   [2]byte
	FGPOLink       GPO_LINK
	FlParam        LPARAM
	FpNext         uintptr
	FpPrev         uintptr
	FlpExtensions  LPSTR
	FlParam2       LPARAM
	FlpLink        LPSTR
} /* userenv.h:87:11 */

type GROUP_POLICY_OBJECTA = X_GROUP_POLICY_OBJECTA /* userenv.h:101:5 */
type PGROUP_POLICY_OBJECTA = uintptr               /* userenv.h:101:27 */

type X_GROUP_POLICY_OBJECTW = struct {
	FdwOptions     DWORD
	FdwVersion     DWORD
	FlpDSPath      LPWSTR
	FlpFileSysPath LPWSTR
	FlpDisplayName LPWSTR
	FszGPOName     [50]WCHAR
	FGPOLink       GPO_LINK
	FlParam        LPARAM
	FpNext         uintptr
	FpPrev         uintptr
	FlpExtensions  LPWSTR
	FlParam2       LPARAM
	FlpLink        LPWSTR
} /* userenv.h:103:11 */

type GROUP_POLICY_OBJECTW = X_GROUP_POLICY_OBJECTW /* userenv.h:117:5 */
type PGROUP_POLICY_OBJECTW = uintptr               /* userenv.h:117:26 */

type GROUP_POLICY_OBJECT = GROUP_POLICY_OBJECTA   /* userenv.h:119:4 */
type PGROUP_POLICY_OBJECT = PGROUP_POLICY_OBJECTA /* userenv.h:120:4 */

type ASYNCCOMPLETIONHANDLE = UINT_PTR   /* userenv.h:162:20 */
type PFNSTATUSMESSAGECALLBACK = uintptr /* userenv.h:163:17 */
type PFNPROCESSGROUPPOLICY = uintptr    /* userenv.h:164:17 */
type PFNPROCESSGROUPPOLICYEX = uintptr  /* userenv.h:165:17 */
type PRSOPTOKEN = PVOID                 /* userenv.h:166:17 */

type X_RSOP_TARGET = struct {
	FpwszAccountName   uintptr
	FpwszNewSOM        uintptr
	FpsaSecurityGroups uintptr
	FpRsopToken        PRSOPTOKEN
	FpGPOList          PGROUP_POLICY_OBJECT
	FpWbemServices     uintptr
} /* userenv.h:168:11 */

type RSOP_TARGET = X_RSOP_TARGET /* userenv.h:175:5 */
type PRSOP_TARGET = uintptr      /* userenv.h:175:18 */

type PFNGENERATEGROUPPOLICY = uintptr /* userenv.h:177:17 */

type REFGPEXTENSIONID = uintptr /* userenv.h:185:16 */

type SETTINGSTATUS = uint32 /* userenv.h:198:5 */

type X_POLICYSETTINGSTATUSINFO = struct {
	FszKey          LPWSTR
	FszEventSource  LPWSTR
	FszEventLogName LPWSTR
	FdwEventID      DWORD
	FdwErrorCode    DWORD
	Fstatus         SETTINGSTATUS
	FtimeLogged     SYSTEMTIME
	F__ccgo_pad1    [4]byte
} /* userenv.h:200:11 */

type POLICYSETTINGSTATUSINFO = X_POLICYSETTINGSTATUSINFO /* userenv.h:208:5 */
type LPPOLICYSETTINGSTATUSINFO = uintptr                 /* userenv.h:208:29 */

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

//** Autogenerated by WIDL 4.12.1 from include/wtypes.idl - Do not edit **

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Make sure we have internals defined.
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.
// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

type SE_OBJECT_TYPE = uint32 /* accctrl.h:36:5 */

type TRUSTEE_TYPE = uint32 /* accctrl.h:48:5 */
type TRUSTEE_FORM = uint32 /* accctrl.h:55:5 */

type MULTIPLE_TRUSTEE_OPERATION = uint32 /* accctrl.h:60:5 */

type X_OBJECTS_AND_SID = struct {
	FObjectsPresent          DWORD
	FObjectTypeGuid          GUID
	FInheritedObjectTypeGuid GUID
	F__ccgo_pad1             [4]byte
	FpSid                    uintptr
} /* accctrl.h:62:11 */

type OBJECTS_AND_SID = X_OBJECTS_AND_SID /* accctrl.h:67:5 */
type POBJECTS_AND_SID = uintptr          /* accctrl.h:67:22 */

type X_OBJECTS_AND_NAME_A = struct {
	FObjectsPresent          DWORD
	FObjectType              SE_OBJECT_TYPE
	FObjectTypeName          LPSTR
	FInheritedObjectTypeName LPSTR
	FptstrName               LPSTR
} /* accctrl.h:69:11 */

type OBJECTS_AND_NAME_A = X_OBJECTS_AND_NAME_A /* accctrl.h:75:5 */
type POBJECTS_AND_NAME_A = uintptr             /* accctrl.h:75:25 */

type X_OBJECTS_AND_NAME_W = struct {
	FObjectsPresent          DWORD
	FObjectType              SE_OBJECT_TYPE
	FObjectTypeName          LPWSTR
	FInheritedObjectTypeName LPWSTR
	FptstrName               LPWSTR
} /* accctrl.h:77:11 */

type OBJECTS_AND_NAME_W = X_OBJECTS_AND_NAME_W /* accctrl.h:83:5 */
type POBJECTS_AND_NAME_W = uintptr             /* accctrl.h:83:25 */

type OBJECTS_AND_NAME_ = OBJECTS_AND_NAME_A   /* accctrl.h:85:3 */
type POBJECTS_AND_NAME_ = POBJECTS_AND_NAME_A /* accctrl.h:86:3 */

type X_TRUSTEE_A = struct {
	FpMultipleTrustee         uintptr
	FMultipleTrusteeOperation MULTIPLE_TRUSTEE_OPERATION
	FTrusteeForm              TRUSTEE_FORM
	FTrusteeType              TRUSTEE_TYPE
	F__ccgo_pad1              [4]byte
	FptstrName                LPSTR
} /* accctrl.h:88:11 */

type TRUSTEE_A = X_TRUSTEE_A /* accctrl.h:103:5 */
type PTRUSTEE_A = uintptr    /* accctrl.h:103:16 */
type TRUSTEEA = X_TRUSTEE_A  /* accctrl.h:103:29 */
type PTRUSTEEA = uintptr     /* accctrl.h:103:39 */

type X_TRUSTEE_W = struct {
	FpMultipleTrustee         uintptr
	FMultipleTrusteeOperation MULTIPLE_TRUSTEE_OPERATION
	FTrusteeForm              TRUSTEE_FORM
	FTrusteeType              TRUSTEE_TYPE
	F__ccgo_pad1              [4]byte
	FptstrName                LPWSTR
} /* accctrl.h:105:11 */

type TRUSTEE_W = X_TRUSTEE_W /* accctrl.h:120:5 */
type PTRUSTEE_W = uintptr    /* accctrl.h:120:16 */
type TRUSTEEW = X_TRUSTEE_W  /* accctrl.h:120:29 */
type PTRUSTEEW = uintptr     /* accctrl.h:120:39 */

type TRUSTEE_ = TRUSTEE_A   /* accctrl.h:122:3 */
type PTRUSTEE_ = PTRUSTEE_A /* accctrl.h:123:3 */
type TRUSTEE = TRUSTEEA     /* accctrl.h:124:3 */
type PTRUSTEE = PTRUSTEEA   /* accctrl.h:125:3 */

type ACCESS_MODE = uint32 /* accctrl.h:135:5 */

type X_EXPLICIT_ACCESS_A = struct {
	FgrfAccessPermissions DWORD
	FgrfAccessMode        ACCESS_MODE
	FgrfInheritance       DWORD
	F__ccgo_pad1          [4]byte
	FTrustee              TRUSTEE_A
} /* accctrl.h:148:11 */

type EXPLICIT_ACCESS_A = X_EXPLICIT_ACCESS_A /* accctrl.h:153:5 */
type PEXPLICIT_ACCESS_A = uintptr            /* accctrl.h:153:24 */
type EXPLICIT_ACCESSA = X_EXPLICIT_ACCESS_A  /* accctrl.h:153:45 */
type PEXPLICIT_ACCESSA = uintptr             /* accctrl.h:153:63 */

type X_EXPLICIT_ACCESS_W = struct {
	FgrfAccessPermissions DWORD
	FgrfAccessMode        ACCESS_MODE
	FgrfInheritance       DWORD
	F__ccgo_pad1          [4]byte
	FTrustee              TRUSTEE_W
} /* accctrl.h:155:11 */

type EXPLICIT_ACCESS_W = X_EXPLICIT_ACCESS_W /* accctrl.h:160:5 */
type PEXPLICIT_ACCESS_W = uintptr            /* accctrl.h:160:24 */
type EXPLICIT_ACCESSW = X_EXPLICIT_ACCESS_W  /* accctrl.h:160:45 */
type PEXPLICIT_ACCESSW = uintptr             /* accctrl.h:160:63 */

type EXPLICIT_ACCESS_ = EXPLICIT_ACCESS_A   /* accctrl.h:162:3 */
type PEXPLICIT_ACCESS_ = PEXPLICIT_ACCESS_A /* accctrl.h:163:3 */
type EXPLICIT_ACCESS = EXPLICIT_ACCESSA     /* accctrl.h:164:3 */
type PEXPLICIT_ACCESS = PEXPLICIT_ACCESSA   /* accctrl.h:165:3 */

type ACCESS_RIGHTS = ULONG    /* accctrl.h:172:17 */
type PACCESS_RIGHTS = uintptr /* accctrl.h:172:32 */
type INHERIT_FLAGS = ULONG    /* accctrl.h:173:17 */
type PINHERIT_FLAGS = uintptr /* accctrl.h:173:32 */

type X_ACTRL_ACCESS_ENTRYA = struct {
	FTrustee            TRUSTEE_A
	FfAccessFlags       ULONG
	FAccess             ACCESS_RIGHTS
	FProvSpecificAccess ACCESS_RIGHTS
	FInheritance        INHERIT_FLAGS
	FlpInheritProperty  LPSTR
} /* accctrl.h:175:11 */

type ACTRL_ACCESS_ENTRYA = X_ACTRL_ACCESS_ENTRYA /* accctrl.h:182:5 */
type PACTRL_ACCESS_ENTRYA = uintptr              /* accctrl.h:182:26 */

type X_ACTRL_ACCESS_ENTRYW = struct {
	FTrustee            TRUSTEE_W
	FfAccessFlags       ULONG
	FAccess             ACCESS_RIGHTS
	FProvSpecificAccess ACCESS_RIGHTS
	FInheritance        INHERIT_FLAGS
	FlpInheritProperty  LPWSTR
} /* accctrl.h:184:11 */

type ACTRL_ACCESS_ENTRYW = X_ACTRL_ACCESS_ENTRYW /* accctrl.h:191:5 */
type PACTRL_ACCESS_ENTRYW = uintptr              /* accctrl.h:191:26 */

type ACTRL_ACCESS_ENTRY = ACTRL_ACCESS_ENTRYA   /* accctrl.h:193:3 */
type PACTRL_ACCESS_ENTRY = PACTRL_ACCESS_ENTRYA /* accctrl.h:194:3 */

type X_ACTRL_ACCESS_ENTRY_LISTA = struct {
	FcEntries    ULONG
	F__ccgo_pad1 [4]byte
	FpAccessList uintptr
} /* accctrl.h:196:11 */

type ACTRL_ACCESS_ENTRY_LISTA = X_ACTRL_ACCESS_ENTRY_LISTA /* accctrl.h:202:5 */
type PACTRL_ACCESS_ENTRY_LISTA = uintptr                   /* accctrl.h:202:31 */

type X_ACTRL_ACCESS_ENTRY_LISTW = struct {
	FcEntries    ULONG
	F__ccgo_pad1 [4]byte
	FpAccessList uintptr
} /* accctrl.h:204:11 */

type ACTRL_ACCESS_ENTRY_LISTW = X_ACTRL_ACCESS_ENTRY_LISTW /* accctrl.h:210:5 */
type PACTRL_ACCESS_ENTRY_LISTW = uintptr                   /* accctrl.h:210:31 */

type ACTRL_ACCESS_ENTRY_LIST = ACTRL_ACCESS_ENTRY_LISTA   /* accctrl.h:212:3 */
type PACTRL_ACCESS_ENTRY_LIST = PACTRL_ACCESS_ENTRY_LISTA /* accctrl.h:213:3 */

type X_ACTRL_PROPERTY_ENTRYA = struct {
	FlpProperty       LPSTR
	FpAccessEntryList PACTRL_ACCESS_ENTRY_LISTA
	FfListFlags       ULONG
	F__ccgo_pad1      [4]byte
} /* accctrl.h:215:11 */

type ACTRL_PROPERTY_ENTRYA = X_ACTRL_PROPERTY_ENTRYA /* accctrl.h:219:5 */
type PACTRL_PROPERTY_ENTRYA = uintptr                /* accctrl.h:219:28 */

type X_ACTRL_PROPERTY_ENTRYW = struct {
	FlpProperty       LPWSTR
	FpAccessEntryList PACTRL_ACCESS_ENTRY_LISTW
	FfListFlags       ULONG
	F__ccgo_pad1      [4]byte
} /* accctrl.h:221:11 */

type ACTRL_PROPERTY_ENTRYW = X_ACTRL_PROPERTY_ENTRYW /* accctrl.h:225:5 */
type PACTRL_PROPERTY_ENTRYW = uintptr                /* accctrl.h:225:28 */

type ACTRL_PROPERTY_ENTRY = ACTRL_PROPERTY_ENTRYA   /* accctrl.h:227:3 */
type PACTRL_PROPERTY_ENTRY = PACTRL_PROPERTY_ENTRYA /* accctrl.h:228:3 */

type X_ACTRL_ALISTA = struct {
	FcEntries            ULONG
	F__ccgo_pad1         [4]byte
	FpPropertyAccessList PACTRL_PROPERTY_ENTRYA
} /* accctrl.h:230:11 */

type ACTRL_ACCESSA = X_ACTRL_ALISTA /* accctrl.h:236:5 */
type PACTRL_ACCESSA = uintptr       /* accctrl.h:236:20 */
type ACTRL_AUDITA = X_ACTRL_ALISTA  /* accctrl.h:236:37 */
type PACTRL_AUDITA = uintptr        /* accctrl.h:236:51 */

type X_ACTRL_ALISTW = struct {
	FcEntries            ULONG
	F__ccgo_pad1         [4]byte
	FpPropertyAccessList PACTRL_PROPERTY_ENTRYW
} /* accctrl.h:238:11 */

type ACTRL_ACCESSW = X_ACTRL_ALISTW /* accctrl.h:244:5 */
type PACTRL_ACCESSW = uintptr       /* accctrl.h:244:20 */
type ACTRL_AUDITW = X_ACTRL_ALISTW  /* accctrl.h:244:37 */
type PACTRL_AUDITW = uintptr        /* accctrl.h:244:51 */

type ACTRL_ACCESS = ACTRL_ACCESSA   /* accctrl.h:246:3 */
type PACTRL_ACCESS = PACTRL_ACCESSA /* accctrl.h:247:3 */
type ACTRL_AUDIT = ACTRL_AUDITA     /* accctrl.h:248:3 */
type PACTRL_AUDIT = PACTRL_AUDITA   /* accctrl.h:249:3 */

type X_TRUSTEE_ACCESSA = struct {
	FlpProperty      LPSTR
	FAccess          ACCESS_RIGHTS
	FfAccessFlags    ULONG
	FfReturnedAccess ULONG
	F__ccgo_pad1     [4]byte
} /* accctrl.h:259:11 */

type TRUSTEE_ACCESSA = X_TRUSTEE_ACCESSA /* accctrl.h:264:5 */
type PTRUSTEE_ACCESSA = uintptr          /* accctrl.h:264:22 */

type X_TRUSTEE_ACCESSW = struct {
	FlpProperty      LPWSTR
	FAccess          ACCESS_RIGHTS
	FfAccessFlags    ULONG
	FfReturnedAccess ULONG
	F__ccgo_pad1     [4]byte
} /* accctrl.h:266:11 */

type TRUSTEE_ACCESSW = X_TRUSTEE_ACCESSW /* accctrl.h:271:5 */
type PTRUSTEE_ACCESSW = uintptr          /* accctrl.h:271:22 */

type TRUSTEE_ACCESS = TRUSTEE_ACCESSA   /* accctrl.h:273:3 */
type PTRUSTEE_ACCESS = PTRUSTEE_ACCESSA /* accctrl.h:274:3 */

type X_ACTRL_OVERLAPPED = struct {
	F__0         struct{ FProvider PVOID }
	FReserved2   ULONG
	F__ccgo_pad1 [4]byte
	FhEvent      HANDLE
} /* accctrl.h:389:11 */

type ACTRL_OVERLAPPED = X_ACTRL_OVERLAPPED /* accctrl.h:396:5 */
type PACTRL_OVERLAPPED = uintptr           /* accctrl.h:396:23 */

type X_ACTRL_ACCESS_INFOA = struct {
	FfAccessPermission      ULONG
	F__ccgo_pad1            [4]byte
	FlpAccessPermissionName LPSTR
} /* accctrl.h:398:11 */

type ACTRL_ACCESS_INFOA = X_ACTRL_ACCESS_INFOA /* accctrl.h:401:5 */
type PACTRL_ACCESS_INFOA = uintptr             /* accctrl.h:401:25 */

type X_ACTRL_ACCESS_INFOW = struct {
	FfAccessPermission      ULONG
	F__ccgo_pad1            [4]byte
	FlpAccessPermissionName LPWSTR
} /* accctrl.h:403:11 */

type ACTRL_ACCESS_INFOW = X_ACTRL_ACCESS_INFOW /* accctrl.h:406:5 */
type PACTRL_ACCESS_INFOW = uintptr             /* accctrl.h:406:25 */

type ACTRL_ACCESS_INFO = ACTRL_ACCESS_INFOA   /* accctrl.h:408:3 */
type PACTRL_ACCESS_INFO = PACTRL_ACCESS_INFOA /* accctrl.h:409:3 */

type X_ACTRL_CONTROL_INFOA = struct {
	FlpControlId   LPSTR
	FlpControlName LPSTR
} /* accctrl.h:411:11 */

type ACTRL_CONTROL_INFOA = X_ACTRL_CONTROL_INFOA /* accctrl.h:414:5 */
type PACTRL_CONTROL_INFOA = uintptr              /* accctrl.h:414:26 */

type X_ACTRL_CONTROL_INFOW = struct {
	FlpControlId   LPWSTR
	FlpControlName LPWSTR
} /* accctrl.h:416:11 */

type ACTRL_CONTROL_INFOW = X_ACTRL_CONTROL_INFOW /* accctrl.h:419:5 */
type PACTRL_CONTROL_INFOW = uintptr              /* accctrl.h:419:26 */

type ACTRL_CONTROL_INFO = ACTRL_CONTROL_INFOA   /* accctrl.h:421:3 */
type PACTRL_CONTROL_INFO = PACTRL_CONTROL_INFOA /* accctrl.h:422:3 */

type PROG_INVOKE_SETTING = uint32   /* accctrl.h:438:5 */
type PPROG_INVOKE_SETTING = uintptr /* accctrl.h:438:26 */

type X_FN_OBJECT_MGR_FUNCTIONS = struct{ FPlaceholder ULONG } /* accctrl.h:440:11 */

type FN_OBJECT_MGR_FUNCTS = X_FN_OBJECT_MGR_FUNCTIONS /* accctrl.h:442:5 */
type PFN_OBJECT_MGR_FUNCTS = uintptr                  /* accctrl.h:442:27 */

type X_INHERITED_FROMA = struct {
	FGenerationGap LONG
	F__ccgo_pad1   [4]byte
	FAncestorName  LPSTR
} /* accctrl.h:444:11 */

type INHERITED_FROMA = X_INHERITED_FROMA /* accctrl.h:447:5 */
type PINHERITED_FROMA = uintptr          /* accctrl.h:447:22 */

type X_INHERITED_FROMW = struct {
	FGenerationGap LONG
	F__ccgo_pad1   [4]byte
	FAncestorName  LPWSTR
} /* accctrl.h:449:11 */

type INHERITED_FROMW = X_INHERITED_FROMW /* accctrl.h:452:5 */
type PINHERITED_FROMW = uintptr          /* accctrl.h:452:22 */

type INHERITED_FROM = INHERITED_FROMA   /* accctrl.h:454:3 */
type PINHERITED_FROM = PINHERITED_FROMA /* accctrl.h:455:3 */

type FN_PROGRESS = uintptr /* aclapi.h:20:16 */

// The number of 100-ns intervals between the Windows system epoch (1601-01-01
// on the proleptic Gregorian calendar) and the Posix epoch (1970-01-01).

// Declarations for 'link' related information. This information should come
// with VC++ 6.0, but is not in some older SDKs. In any case it is not well
// documented.

// Maximum reparse buffer info size. The max user defined reparse data is
// 16KB, plus there's a header.

// Undocumented REPARSE_MOUNTPOINT_HEADER_SIZE structure definition. This is
// found in winnt.h.
//
// IMPORTANT: caution when using this structure, since the actual structures
// used will want to store a full path in the 'PathBuffer' field, but there
// isn't room (there's only a single WCHAR!). Therefore one must artificially
// create a larger space of memory and then cast it to this type. We use the
// 'DUMMY_REPARSE_BUFFER' struct just below to deal with this problem.

type X_REPARSE_DATA_BUFFER = struct {
	FReparseTag        DWORD
	FReparseDataLength WORD
	FReserved          WORD
	F__8               struct {
		FSymbolicLinkReparseBuffer struct {
			FSubstituteNameOffset WORD
			FSubstituteNameLength WORD
			FPrintNameOffset      WORD
			FPrintNameLength      WORD
			FFlags                ULONG
			FPathBuffer           [1]WCHAR
			F__ccgo_pad1          [2]byte
		}
	}
} /* tclWinFile.c:116:9 */

// The number of 100-ns intervals between the Windows system epoch (1601-01-01
// on the proleptic Gregorian calendar) and the Posix epoch (1970-01-01).

// Declarations for 'link' related information. This information should come
// with VC++ 6.0, but is not in some older SDKs. In any case it is not well
// documented.

// Maximum reparse buffer info size. The max user defined reparse data is
// 16KB, plus there's a header.

// Undocumented REPARSE_MOUNTPOINT_HEADER_SIZE structure definition. This is
// found in winnt.h.
//
// IMPORTANT: caution when using this structure, since the actual structures
// used will want to store a full path in the 'PathBuffer' field, but there
// isn't room (there's only a single WCHAR!). Therefore one must artificially
// create a larger space of memory and then cast it to this type. We use the
// 'DUMMY_REPARSE_BUFFER' struct just below to deal with this problem.

type REPARSE_DATA_BUFFER = X_REPARSE_DATA_BUFFER /* tclWinFile.c:140:3 */

type DUMMY_REPARSE_BUFFER = struct {
	Fdummy    REPARSE_DATA_BUFFER
	FdummyBuf [780]WCHAR
} /* tclWinFile.c:146:3 */

//--------------------------------------------------------------------
//
// WinLink --
//
//	Make a link from source to target.
//
//--------------------------------------------------------------------

func sWinLink(tls *libc.TLS, linkSourcePath uintptr, linkTargetPath uintptr, linkAction int32) int32 { /* tclWinFile.c:193:1: */
	bp := tls.Alloc(528)
	defer tls.Free(528)

	// var tempFileName [260]WCHAR at bp, 520

	// var tempFilePart uintptr at bp+520, 8

	var attr DWORD

	// Get the full path referenced by the target.

	if !(libc.XGetFullPathNameW(tls, linkTargetPath, uint32(MAX_PATH), bp,
		bp+520) != 0) {
		// Invalid file.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return -1
	}

	// Make sure source file doesn't exist.

	attr = libc.XGetFileAttributesW(tls, linkSourcePath)
	if attr != libc.Uint32(libc.Uint32FromInt32(-1)) {
		XTcl_SetErrno(tls, EEXIST)
		return -1
	}

	// Get the full path referenced by the source file/directory.

	if !(libc.XGetFullPathNameW(tls, linkSourcePath, uint32(MAX_PATH), bp,
		bp+520) != 0) {
		// Invalid file.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return -1
	}

	// Check the target.

	attr = libc.XGetFileAttributesW(tls, linkTargetPath)
	if attr == libc.Uint32(libc.Uint32FromInt32(-1)) {
		// The target doesn't exist.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
	} else if attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) == DWORD(0) {
		// It is a file.

		if linkAction&TCL_CREATE_HARD_LINK != 0 {
			if libc.XCreateHardLinkW(tls, linkSourcePath, linkTargetPath, uintptr(0)) != 0 {
				// Success!

				return 0
			}

			XTclWinConvertError(tls, libc.XGetLastError(tls))
		} else if linkAction&TCL_CREATE_SYMBOLIC_LINK != 0 {
			if !(int32(XtclWinProcs.FcreateSymbolicLink) != 0) {
				// Can't symlink files.
				XTcl_SetErrno(tls, EINVAL)
			} else if (*struct {
				f func(*libc.TLS, LPCWSTR, LPCWSTR, DWORD) BOOLEAN
			})(unsafe.Pointer(&struct{ uintptr }{XtclWinProcs.FcreateSymbolicLink})).f(tls, linkSourcePath, linkTargetPath,
				uint32(0x2)) != 0 {
				// Success!

				return 0
			} else {
				XTclWinConvertError(tls, libc.XGetLastError(tls))
			}
		} else {
			XTcl_SetErrno(tls, ENODEV)
		}
	} else {
		// We've got a directory. Now check whether what we're trying to do is
		// reasonable.

		if linkAction&TCL_CREATE_SYMBOLIC_LINK != 0 {
			return sWinSymLinkDirectory(tls, linkSourcePath, linkTargetPath)

		} else if linkAction&TCL_CREATE_HARD_LINK != 0 {
			// Can't hard link directories.

			XTcl_SetErrno(tls, EISDIR)
		} else {
			XTcl_SetErrno(tls, ENODEV)
		}
	}
	return -1
}

//--------------------------------------------------------------------
//
// WinReadLink --
//
//	What does 'LinkSource' point to?
//
//--------------------------------------------------------------------

func sWinReadLink(tls *libc.TLS, linkSourcePath uintptr) uintptr { /* tclWinFile.c:317:16: */
	bp := tls.Alloc(528)
	defer tls.Free(528)

	// var tempFileName [260]WCHAR at bp, 520

	// var tempFilePart uintptr at bp+520, 8

	var attr DWORD

	// Get the full path referenced by the target.

	if !(libc.XGetFullPathNameW(tls, linkSourcePath, uint32(MAX_PATH), bp,
		bp+520) != 0) {
		// Invalid file.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return uintptr(0)
	}

	// Make sure source file does exist.

	attr = libc.XGetFileAttributesW(tls, linkSourcePath)
	if attr == libc.Uint32(libc.Uint32FromInt32(-1)) {
		// The source doesn't exist.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return uintptr(0)

	} else if attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) == DWORD(0) {
		// It is a file - this is not yet supported.

		XTcl_SetErrno(tls, ENOTDIR)
		return uintptr(0)
	}

	return sWinReadLinkDirectory(tls, linkSourcePath)
}

//--------------------------------------------------------------------
//
// WinSymLinkDirectory --
//
//	This routine creates a NTFS junction, using the undocumented
//	FSCTL_SET_REPARSE_POINT structure Win2K uses for mount points and
//	junctions.
//
//	Assumption that linkTargetPath is a valid, existing directory.
//
// Returns:
//	Zero on success.
//
//--------------------------------------------------------------------

func sWinSymLinkDirectory(tls *libc.TLS, linkDirPath uintptr, linkTargetPath uintptr) int32 { /* tclWinFile.c:382:1: */
	bp := tls.Alloc(2104)
	defer tls.Free(2104)

	// var dummy DUMMY_REPARSE_BUFFER at bp, 1584

	var reparseBuffer uintptr = bp /* &dummy */
	var len int32
	// var nativeTarget [260]WCHAR at bp+1584, 520

	var loop uintptr

	// Make the native target name.

	libc.Xmemcpy(tls, bp+1584, wtext+396, uint64(4)*uint64(unsafe.Sizeof(WCHAR(0))))
	libc.Xmemcpy(tls, bp+1584+uintptr(4)*2, linkTargetPath,
		uint64(unsafe.Sizeof(WCHAR(0)))*(uint64(1)+libc.Xwcslen(tls, linkTargetPath)))
	len = int32(libc.Xwcslen(tls, bp+1584))

	// We must have backslashes only. This is VERY IMPORTANT. If we have any
	// forward slashes everything appears to work, but the resulting symlink
	// is useless!

	for loop = bp + 1584; /* &nativeTarget[0] */ int32(*(*WCHAR)(unsafe.Pointer(loop))) != 0; loop += 2 {
		if int32(*(*WCHAR)(unsafe.Pointer(loop))) == '/' {
			*(*WCHAR)(unsafe.Pointer(loop)) = WCHAR('\\')
		}
	}
	if int32(*(*WCHAR)(unsafe.Pointer(bp + 1584 + uintptr(len-1)*2))) == '\\' && int32(*(*WCHAR)(unsafe.Pointer(bp + 1584 + uintptr(len-2)*2))) != ':' {
		*(*WCHAR)(unsafe.Pointer(bp + 1584 + uintptr(len-1)*2)) = WCHAR(0)
	}

	// Build the reparse info.

	libc.Xmemset(tls, reparseBuffer, 0, uint64(unsafe.Sizeof(DUMMY_REPARSE_BUFFER{})))
	(*REPARSE_DATA_BUFFER)(unsafe.Pointer(reparseBuffer)).FReparseTag = 0xA0000003
	*(*WORD)(unsafe.Pointer(reparseBuffer + 8 + 2 /* &.SubstituteNameLength */)) = WORD(libc.Xwcslen(tls, bp+1584) * Size_t(unsafe.Sizeof(WCHAR(0))))
	(*REPARSE_DATA_BUFFER)(unsafe.Pointer(reparseBuffer)).FReserved = WORD(0)
	*(*WORD)(unsafe.Pointer(reparseBuffer + 8 + 6 /* &.PrintNameLength */)) = WORD(0)
	*(*WORD)(unsafe.Pointer(reparseBuffer + 8 + 4 /* &.PrintNameOffset */)) = WORD(uint64(*(*WORD)(unsafe.Pointer(reparseBuffer + 8 + 2))) +
		uint64(unsafe.Sizeof(WCHAR(0))))
	libc.Xmemcpy(tls, reparseBuffer+8+8, bp+1584,
		uint64(unsafe.Sizeof(WCHAR(0)))+
			uint64(*(*WORD)(unsafe.Pointer(reparseBuffer + 8 + 2))))
	(*REPARSE_DATA_BUFFER)(unsafe.Pointer(reparseBuffer)).FReparseDataLength = WORD(int32(*(*WORD)(unsafe.Pointer(reparseBuffer + 8 + 2))) + 12)

	return sNativeWriteReparse(tls, linkDirPath, reparseBuffer)
}

//--------------------------------------------------------------------
//
// TclWinSymLinkCopyDirectory --
//
//	Copy a Windows NTFS junction. This function assumes that LinkOriginal
//	exists and is a valid junction point, and that LinkCopy does not
//	exist.
//
// Returns:
//	Zero on success.
//
//--------------------------------------------------------------------

func XTclWinSymLinkCopyDirectory(tls *libc.TLS, linkOrigPath uintptr, linkCopyPath uintptr) int32 { /* tclWinFile.c:454:1: */
	bp := tls.Alloc(1584)
	defer tls.Free(1584)

	// var dummy DUMMY_REPARSE_BUFFER at bp, 1584

	var reparseBuffer uintptr = bp /* &dummy */

	if sNativeReadReparse(tls, linkOrigPath, reparseBuffer, 0x80000000) != 0 {
		return -1
	}
	return sNativeWriteReparse(tls, linkCopyPath, reparseBuffer)
}

//--------------------------------------------------------------------
//
// TclWinSymLinkDelete --
//
//	Delete a Windows NTFS junction. Once the junction information is
//	deleted, the filesystem object becomes an ordinary directory. Unless
//	'linkOnly' is given, that directory is also removed.
//
//	Assumption that LinkOriginal is a valid, existing junction.
//
// Returns:
//	Zero on success.
//
//--------------------------------------------------------------------

func XTclWinSymLinkDelete(tls *libc.TLS, linkOrigPath uintptr, linkOnly int32) int32 { /* tclWinFile.c:485:1: */
	bp := tls.Alloc(1588)
	defer tls.Free(1588)

	// It is a symbolic link - remove it.

	// var dummy DUMMY_REPARSE_BUFFER at bp, 1584

	var reparseBuffer uintptr = bp /* &dummy */
	var hFile HANDLE
	// var returnedLength DWORD at bp+1584, 4

	libc.Xmemset(tls, reparseBuffer, 0, uint64(unsafe.Sizeof(DUMMY_REPARSE_BUFFER{})))
	(*REPARSE_DATA_BUFFER)(unsafe.Pointer(reparseBuffer)).FReparseTag = 0xA0000003
	hFile = libc.XCreateFileW(tls, linkOrigPath, uint32(0x40000000), uint32(0), uintptr(0), uint32(OPEN_EXISTING),
		uint32(FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS), uintptr(0))

	if hFile != libc.UintptrFromInt64(int64(-1)) {
		if !(libc.XDeviceIoControl(tls, hFile, uint32(int32(FILE_DEVICE_FILE_SYSTEM)<<16|int32(FILE_ANY_ACCESS)<<14|int32(43)<<2|METHOD_BUFFERED), reparseBuffer,
			uint32(REPARSE_MOUNTPOINT_HEADER_SIZE), uintptr(0), uint32(0), bp+1584, uintptr(0)) != 0) {
			// Error setting junction.

			XTclWinConvertError(tls, libc.XGetLastError(tls))
			libc.XCloseHandle(tls, hFile)
		} else {
			libc.XCloseHandle(tls, hFile)
			if !(linkOnly != 0) {
				libc.XRemoveDirectoryW(tls, linkOrigPath)
			}
			return 0
		}
	}
	return -1
}

//--------------------------------------------------------------------
//
// WinReadLinkDirectory --
//
//	This routine reads a NTFS junction, using the undocumented
//	FSCTL_GET_REPARSE_POINT structure Win2K uses for mount points and
//	junctions.
//
//	Assumption that LinkDirectory is a valid, existing directory.
//
// Returns:
//	A Tcl_Obj with refCount of 1 (i.e. owned by the caller), or NULL if
//	anything went wrong.
//
//	In the future we should enhance this to return a path object rather
//	than a string.
//
//--------------------------------------------------------------------

func sWinReadLinkDirectory(tls *libc.TLS, linkDirPath uintptr) uintptr { /* tclWinFile.c:549:16: */
	bp := tls.Alloc(1808)
	defer tls.Free(1808)

	var attr int32
	var len int32
	var offset int32
	// var dummy DUMMY_REPARSE_BUFFER at bp, 1584

	var reparseBuffer uintptr
	var retVal uintptr
	// var ds Tcl_DString at bp+1592, 216

	var copy uintptr
	// var driveSpec [3]int8 at bp+1584, 3

	var drive int8
	reparseBuffer = bp /* &dummy */

	attr = int32(libc.XGetFileAttributesW(tls, linkDirPath))
	if !!(attr&FILE_ATTRIBUTE_REPARSE_POINT != 0) {
		goto __1
	}
	goto invalidError
__1:
	;
	if !(sNativeReadReparse(tls, linkDirPath, reparseBuffer, uint32(0)) != 0) {
		goto __2
	}
	return uintptr(0)
__2:
	;

	switch (*REPARSE_DATA_BUFFER)(unsafe.Pointer(reparseBuffer)).FReparseTag {
	case 0x80000000 | uint32(0):
		goto __4
	case DWORD(0):
		goto __5
	case 0xA0000003:
		goto __6
	}
	goto __3
__4:
__5:
__6:
	// Certain native path representations on Windows have a special
	// prefix to indicate that they are to be treated specially. For
	// example extremely long paths, or symlinks, or volumes mounted
	// inside directories.
	//
	// There is an assumption in this code that 'wide' interfaces are
	// being used (see tclWin32Dll.c), which is true for the only systems
	// which support reparse tags at present. If that changes in the
	// future, this code will have to be generalised.

	offset = 0
	if !(int32(*(*WCHAR)(unsafe.Pointer(reparseBuffer + 8 + 8))) == '\\') {
		goto __7
	}
	// Check whether this is a mounted volume.

	if !(libc.Xwcsncmp(tls, reparseBuffer+8+8,
		wtext+406, uint64(11)) == 0) {
		goto __8
	}

	// There is some confusion between \??\ and \\?\ which we have
	// to fix here. It doesn't seem very well documented.

	*(*WCHAR)(unsafe.Pointer(reparseBuffer + 8 + 8 + 1*2)) = WCHAR('\\')

	// Check if a corresponding drive letter exists, and use that
	// if it is found

	drive = XTclWinDriveLetterForVolMountPoint(tls,
		reparseBuffer+8+8)
	if !(int32(drive) != -1) {
		goto __10
	}
	*(*[3]int8)(unsafe.Pointer(bp + 1584 /* driveSpec */)) = [3]int8{
		int8(0), int8(':'), int8(0),
	}

	*(*int8)(unsafe.Pointer(bp + 1584)) = drive
	retVal = XTcl_NewStringObj(tls, bp+1584, 2)
	(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount++
	return retVal
__10:
	;

	// This is actually a mounted drive, which doesn't exists as a
	// DOS drive letter. This means the path isn't actually a
	// link, although we partially treat it like one ('file type'
	// will return 'link'), but then the link will actually just
	// be treated like an ordinary directory. I don't believe any
	// serious inconsistency will arise from this, but it is
	// something to be aware of.

	goto invalidError
	goto __9
__8:
	if !(libc.Xwcsncmp(tls, reparseBuffer+8+8, wtext+430, uint64(4)) == 0) {
		goto __11
	}
	// Strip off the prefix.

	offset = 4
	goto __12
__11:
	if !(libc.Xwcsncmp(tls, reparseBuffer+8+8, wtext+396, uint64(4)) == 0) {
		goto __13
	}
	// Strip off the prefix.

	offset = 4
__13:
	;
__12:
	;
__9:
	;
__7:
	;

	XTcl_WinTCharToUtf(tls, reparseBuffer+8+8,
		int32(*(*WORD)(unsafe.Pointer(reparseBuffer + 8 + 2 /* &.SubstituteNameLength */))), bp+1592)

	copy = (*Tcl_DString)(unsafe.Pointer(bp+1592)).Fstring + uintptr(offset)
	len = (*Tcl_DString)(unsafe.Pointer(bp+1592)).Flength - offset
	retVal = XTcl_NewStringObj(tls, copy, len)
	(*Tcl_Obj)(unsafe.Pointer(retVal)).FrefCount++
	XTcl_DStringFree(tls, bp+1592)
	return retVal
__3:
	;

invalidError:
	XTcl_SetErrno(tls, EINVAL)
	return uintptr(0)
}

//--------------------------------------------------------------------
//
// NativeReadReparse --
//
//	Read the junction/reparse information from a given NTFS directory.
//
//	Assumption that linkDirPath is a valid, existing directory.
//
// Returns:
//	Zero on success.
//
//--------------------------------------------------------------------

func sNativeReadReparse(tls *libc.TLS, linkDirPath uintptr, buffer uintptr, desiredAccess DWORD) int32 { /* tclWinFile.c:685:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var hFile HANDLE
	// var returnedLength DWORD at bp, 4

	hFile = libc.XCreateFileW(tls, linkDirPath, desiredAccess, uint32(FILE_SHARE_READ), uintptr(0),
		uint32(OPEN_EXISTING),
		uint32(FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS), uintptr(0))

	if hFile == libc.UintptrFromInt64(int64(-1)) {
		// Error creating directory.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return -1
	}

	// Get the link.

	if !(libc.XDeviceIoControl(tls, hFile, uint32(int32(FILE_DEVICE_FILE_SYSTEM)<<16|int32(FILE_ANY_ACCESS)<<14|int32(42)<<2|METHOD_BUFFERED), uintptr(0), uint32(0), buffer,
		uint32(unsafe.Sizeof(DUMMY_REPARSE_BUFFER{})), bp, uintptr(0)) != 0) {
		// Error setting junction.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
		libc.XCloseHandle(tls, hFile)
		return -1
	}
	libc.XCloseHandle(tls, hFile)

	if !(!((*REPARSE_DATA_BUFFER)(unsafe.Pointer(buffer)).FReparseTag&libc.CplUint32(IO_REPARSE_TAG_VALID_VALUES) != 0) && (*REPARSE_DATA_BUFFER)(unsafe.Pointer(buffer)).FReparseTag > DWORD(1)) {
		XTcl_SetErrno(tls, EINVAL)
		return -1
	}
	return 0
}

//--------------------------------------------------------------------
//
// NativeWriteReparse --
//
//	Write the reparse information for a given directory.
//
//	Assumption that LinkDirectory does not exist.
//
//--------------------------------------------------------------------

func sNativeWriteReparse(tls *libc.TLS, linkDirPath uintptr, buffer uintptr) int32 { /* tclWinFile.c:742:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var hFile HANDLE
	// var returnedLength DWORD at bp, 4

	// Create the directory - it must not already exist.

	if libc.XCreateDirectoryW(tls, linkDirPath, uintptr(0)) == 0 {
		// Error creating directory.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return -1
	}
	hFile = libc.XCreateFileW(tls, linkDirPath, uint32(0x40000000), uint32(0), uintptr(0),
		uint32(OPEN_EXISTING), uint32(FILE_FLAG_OPEN_REPARSE_POINT|
			FILE_FLAG_BACKUP_SEMANTICS), uintptr(0))
	if hFile == libc.UintptrFromInt64(int64(-1)) {
		// Error creating directory.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return -1
	}

	// Set the link.

	if !(libc.XDeviceIoControl(tls, hFile, uint32(int32(FILE_DEVICE_FILE_SYSTEM)<<16|int32(FILE_ANY_ACCESS)<<14|int32(41)<<2|METHOD_BUFFERED), buffer,
		DWORD((*REPARSE_DATA_BUFFER)(unsafe.Pointer(buffer)).FReparseDataLength)+DWORD(REPARSE_MOUNTPOINT_HEADER_SIZE),
		uintptr(0), uint32(0), bp, uintptr(0)) != 0) {
		// Error setting junction.

		XTclWinConvertError(tls, libc.XGetLastError(tls))
		libc.XCloseHandle(tls, hFile)
		libc.XRemoveDirectoryW(tls, linkDirPath)
		return -1
	}
	libc.XCloseHandle(tls, hFile)

	// We succeeded.

	return 0
}

//----------------------------------------------------------------------
//
// tclWinDebugPanic --
//
//	Display a message. If a debugger is present, present it directly to
//	the debugger, otherwise use a MessageBox.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XtclWinDebugPanic(tls *libc.TLS, format uintptr, va uintptr) { /* tclWinFile.c:816:1: */
	bp := tls.Alloc(5120)
	defer tls.Free(5120)

	var argList Va_list
	_ = argList
	// var buf [3072]int8 at bp, 3072

	// var msgString [1024]WCHAR at bp+3072, 2048

	argList = va
	vsnprintf(tls, bp, uint64(unsafe.Sizeof([3072]int8{})), format, argList)

	*(*WCHAR)(unsafe.Pointer(bp + 3072 + 1023*2)) = WCHAR(0)
	libc.XMultiByteToWideChar(tls, uint32(CP_UTF8), uint32(0), bp, -1, bp+3072, TCL_MAX_WARN_LEN)

	// Truncate MessageBox string if it is too long to not overflow the screen
	// and cause possible oversized window error.

	if int32(*(*WCHAR)(unsafe.Pointer(bp + 3072 + 1023*2))) != 0 {
		libc.Xmemcpy(tls, bp+3072+uintptr(TCL_MAX_WARN_LEN-5)*2, wtext+440, uint64(5)*uint64(unsafe.Sizeof(WCHAR(0))))
	}
	if libc.XIsDebuggerPresent(tls) != 0 {
		libc.XOutputDebugStringW(tls, bp+3072)
	} else {
		libc.XMessageBeep(tls, uint32(0x00000030))
		libc.XMessageBoxW(tls, uintptr(0), bp+3072, wtext+450,
			uint32(0x00000010|0x00000000|0x00002000|0x00010000))
	}
	libc.X__builtin_trap(tls)
	libc.Xabort(tls)
}

//---------------------------------------------------------------------------
//
// TclpFindExecutable --
//
//	This function computes the absolute path name of the current
//	application.
//
// Results:
//	None.
//
// Side effects:
//	The computed path is stored.
//
//---------------------------------------------------------------------------

func XTclpFindExecutable(tls *libc.TLS, argv0 uintptr) { /* tclWinFile.c:875:1: */
	bp := tls.Alloc(1300)
	defer tls.Free(1300)

	// var wName [260]WCHAR at bp, 520

	// var name [780]int8 at bp+520, 780

	// Under Windows we ignore argv0, and return the path for the file used to
	// create this process. Only if it is NULL, install a new panic handler.

	if argv0 == uintptr(0) {
		XTcl_SetPanicProc(tls, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, uintptr, uintptr)
		}{XtclWinDebugPanic})))
	}

	libc.XGetModuleFileNameW(tls, uintptr(0), bp, uint32(uint64(unsafe.Sizeof([260]WCHAR{}))/uint64(unsafe.Sizeof(WCHAR(0)))))
	libc.XWideCharToMultiByte(tls, uint32(CP_UTF8), uint32(0), bp, -1, bp+520, int32(unsafe.Sizeof([780]int8{})), uintptr(0), uintptr(0))
	XTclWinNoBackslash(tls, bp+520)
	XTclSetObjNameOfExecutable(tls, XTcl_NewStringObj(tls, bp+520, -1), uintptr(0))
}

//----------------------------------------------------------------------
//
// TclpMatchInDirectory --
//
//	This routine is used by the globbing code to search a directory for
//	all files which match a given pattern.
//
// Results:
//	The return value is a standard Tcl result indicating whether an error
//	occurred in globbing. Errors are left in interp, good results are
//	lappended to resultPtr (which must be a valid object).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpMatchInDirectory(tls *libc.TLS, interp uintptr, resultPtr uintptr, pathPtr uintptr, pattern uintptr, types1 uintptr) int32 { /* tclWinFile.c:917:1: */
	bp := tls.Alloc(1088)
	defer tls.Free(1088)

	var native uintptr

	if types1 != uintptr(0) && (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype == int32(1)<<7 {
		// The native filesystem never adds mounts.

		return TCL_OK
	}

	if pattern == uintptr(0) || int32(*(*int8)(unsafe.Pointer(pattern))) == 0 {
		var norm uintptr = XTcl_FSGetNormalizedPath(tls, uintptr(0), pathPtr)

		if norm != uintptr(0) {
			// Match a single file directly.

			// var len int32 at bp+16, 4

			var attr DWORD
			// var data WIN32_FILE_ATTRIBUTE_DATA at bp+20, 36

			var str uintptr = XTcl_GetStringFromObj(tls, norm, bp+16)

			native = XTcl_FSGetNativePath(tls, pathPtr)

			if libc.XGetFileAttributesExW(tls, native,
				GetFileExInfoStandard, bp+20) != TRUE {
				return TCL_OK
			}
			attr = (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp + 20 /* &data */)).FdwFileAttributes

			if sNativeMatchType(tls, sWinIsDrive(tls, str, uint64(*(*int32)(unsafe.Pointer(bp + 16)))), attr, native, types1) != 0 {
				XTcl_ListObjAppendElement(tls, interp, resultPtr, pathPtr)
			}
		}
		return TCL_OK
	} else {
		var attr DWORD
		var handle HANDLE
		// var data WIN32_FIND_DATAW at bp+496, 592

		var dirName uintptr // UTF-8 dir name, later with pattern
		// appended.
		// var dirLength int32 at bp+272, 4

		var matchSpecialDots int32
		// var ds Tcl_DString at bp+280, 216
		// Native encoding of dir, also used
		// temporarily for other things.
		// var dsOrig Tcl_DString at bp+56, 216
		// UTF-8 encoding of dir.
		var fileNamePtr uintptr
		var lastChar int8

		// Get the normalized path representation (the main thing is we dont
		// want any '~' sequences).

		fileNamePtr = XTcl_FSGetNormalizedPath(tls, interp, pathPtr)
		if fileNamePtr == uintptr(0) {
			return TCL_ERROR
		}

		// Verify that the specified path exists and is actually a directory.

		native = XTcl_FSGetNativePath(tls, pathPtr)
		if native == uintptr(0) {
			return TCL_OK
		}
		attr = libc.XGetFileAttributesW(tls, native)

		if attr == libc.Uint32(libc.Uint32FromInt32(-1)) ||
			attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) == DWORD(0) {
			return TCL_OK
		}

		// Build up the directory name for searching, including a trailing
		// directory separator.

		XTcl_DStringInit(tls, bp+56)
		dirName = XTcl_GetStringFromObj(tls, fileNamePtr, bp+272)
		XTcl_DStringAppend(tls, bp+56, dirName, *(*int32)(unsafe.Pointer(bp + 272 /* dirLength */)))

		lastChar = *(*int8)(unsafe.Pointer(dirName + uintptr(*(*int32)(unsafe.Pointer(bp + 272))-1)))
		if int32(lastChar) != '\\' && int32(lastChar) != '/' && int32(lastChar) != ':' {
			XTcl_DStringAppend(tls, bp+56, ts+6377, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
			*(*int32)(unsafe.Pointer(bp + 272 /* dirLength */))++
		}
		dirName = (*Tcl_DString)(unsafe.Pointer(bp + 56)).Fstring

		// We need to check all files in the directory, so we append '*.*' to
		// the path, unless the pattern we've been given is rather simple,
		// when we can use that instead.

		if libc.Xstrpbrk(tls, pattern, ts+68419) == uintptr(0) {
			// The pattern is a simple one containing just '*' and/or '?'.
			// This means we can get the OS to help us, by passing it the
			// pattern.

			dirName = XTcl_DStringAppend(tls, bp+56, pattern, -1)
		} else {
			dirName = XTcl_DStringAppend(tls, bp+56, ts+68423, int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)))
		}

		native = XTcl_WinUtfToTChar(tls, dirName, -1, bp+280)
		if types1 == uintptr(0) || (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype != int32(1)<<2 {
			handle = libc.XFindFirstFileW(tls, native, bp+496)
		} else {
			// We can be more efficient, for pure directory requests.

			handle = libc.XFindFirstFileExW(tls, native,
				FindExInfoStandard, bp+496,
				FindExSearchLimitToDirectories, uintptr(0), uint32(0))
		}

		if handle == libc.UintptrFromInt64(int64(-1)) {
			var err DWORD = libc.XGetLastError(tls)

			XTcl_DStringFree(tls, bp+280)
			if err == DWORD(2) {
				// We used our 'pattern' above, and matched nothing. This
				// means we just return TCL_OK, indicating no results found.

				XTcl_DStringFree(tls, bp+56)
				return TCL_OK
			}

			XTclWinConvertError(tls, err)
			if interp != uintptr(0) {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+68427,
					libc.VaList(bp, (*Tcl_DString)(unsafe.Pointer(bp+56)).Fstring, XTcl_PosixError(tls, interp))))
			}
			XTcl_DStringFree(tls, bp+56)
			return TCL_ERROR
		}
		XTcl_DStringFree(tls, bp+280)

		// We may use this later, so we must restore it to its length
		// including the directory delimiter.

		XTcl_DStringSetLength(tls, bp+56, *(*int32)(unsafe.Pointer(bp + 272 /* dirLength */)))

		// Check to see if the pattern should match the special . and
		// .. names, referring to the current directory, or the directory
		// above. We need a special check for this because paths beginning
		// with a dot are not considered hidden on Windows, and so otherwise a
		// relative glob like 'glob -join * *' will actually return
		// './. ../..' etc.

		if int32(*(*int8)(unsafe.Pointer(pattern))) == '.' ||
			int32(*(*int8)(unsafe.Pointer(pattern))) == '\\' && int32(*(*int8)(unsafe.Pointer(pattern + 1))) == '.' {
			matchSpecialDots = 1
		} else {
			matchSpecialDots = 0
		}

		// Now iterate over all of the files in the directory, starting with
		// the first one we found.

		for ok := true; ok; ok = libc.XFindNextFileW(tls, handle, bp+496) == TRUE {
			var utfname uintptr
			var checkDrive int32 = 0
			var isDrive int32

			native = bp + 496 + 44
			attr = (*WIN32_FIND_DATAW)(unsafe.Pointer(bp + 496 /* &data */)).FdwFileAttributes
			utfname = XTcl_WinTCharToUtf(tls, native, -1, bp+280)

			if !(matchSpecialDots != 0) {
				// If it is exactly '.' or '..' then we ignore it.

				if int32(*(*int8)(unsafe.Pointer(utfname))) == '.' && (int32(*(*int8)(unsafe.Pointer(utfname + 1))) == 0 ||
					int32(*(*int8)(unsafe.Pointer(utfname + 1))) == '.' && int32(*(*int8)(unsafe.Pointer(utfname + 2))) == 0) {
					XTcl_DStringFree(tls, bp+280)
					continue
				}
			} else if int32(*(*int8)(unsafe.Pointer(utfname))) == '.' && int32(*(*int8)(unsafe.Pointer(utfname + 1))) == '.' &&
				int32(*(*int8)(unsafe.Pointer(utfname + 2))) == 0 {
				// Have to check if this is a drive below, so we can correctly
				// match 'hidden' and not hidden files.

				checkDrive = 1
			}

			// Check to see if the file matches the pattern. Note that we are
			// ignoring the case sensitivity flag because Windows doesn't
			// honor case even if the volume is case sensitive. If the volume
			// also doesn't preserve case, then we previously returned the
			// lower case form of the name. This didn't seem quite right since
			// there are non-case-preserving volumes that actually return
			// mixed case. So now we are returning exactly what we get from
			// the system.

			if XTcl_StringCaseMatch(tls, utfname, pattern, 1) != 0 {
				// If the file matches, then we need to process the remainder
				// of the path.

				if checkDrive != 0 {
					var fullname uintptr = XTcl_DStringAppend(tls, bp+56, utfname,
						(*Tcl_DString)(unsafe.Pointer(bp+280)).Flength)

					isDrive = sWinIsDrive(tls, fullname, uint64((*Tcl_DString)(unsafe.Pointer(bp+56)).Flength))
					XTcl_DStringSetLength(tls, bp+56, *(*int32)(unsafe.Pointer(bp + 272 /* dirLength */)))
				} else {
					isDrive = 0
				}
				if sNativeMatchType(tls, isDrive, attr, native, types1) != 0 {
					XTcl_ListObjAppendElement(tls, interp, resultPtr,
						XTclNewFSPathObj(tls, pathPtr, utfname,
							(*Tcl_DString)(unsafe.Pointer(bp+280)).Flength))
				}
			}

			// Free ds here to ensure that native is valid above.

			XTcl_DStringFree(tls, bp+280)
		}

		libc.XFindClose(tls, handle)
		XTcl_DStringFree(tls, bp+56)
		return TCL_OK
	}
	return int32(0)
}

// Does the given path represent a root volume? We need this special case
// because for NTFS root volumes, the getFileAttributesProc returns a 'hidden'
// attribute when it should not.

func sWinIsDrive(tls *libc.TLS, name uintptr, len Size_t) int32 { /* tclWinFile.c:1182:1: */
	var remove int32 = 0

	for len > uint64(4) {
		if int32(*(*int8)(unsafe.Pointer(name + uintptr(len-uint64(1))))) != '.' || int32(*(*int8)(unsafe.Pointer(name + uintptr(len-uint64(2))))) != '.' ||
			int32(*(*int8)(unsafe.Pointer(name + uintptr(len-uint64(3))))) != '/' && int32(*(*int8)(unsafe.Pointer(name + uintptr(len-uint64(3))))) != '\\' {
			// We don't have '/..' at the end.

			if remove == 0 {
				break
			}
			remove--
			for len > uint64(0) {
				len--
				if int32(*(*int8)(unsafe.Pointer(name + uintptr(len)))) == '/' || int32(*(*int8)(unsafe.Pointer(name + uintptr(len)))) == '\\' {
					break
				}
			}
			if len < uint64(4) {
				len++
				break
			}
		} else {
			// We do have '/..'

			len = len - uint64(3)
			remove++
		}
	}

	if len < uint64(4) {
		if len == uint64(0) {
			// Not sure if this is possible, but we pass it on anyway.
		} else if len == uint64(1) && (int32(*(*int8)(unsafe.Pointer(name))) == '/' || int32(*(*int8)(unsafe.Pointer(name))) == '\\') {
			// Path is pointing to the root volume.

			return 1
		} else if int32(*(*int8)(unsafe.Pointer(name + 1))) == ':' &&
			(len == uint64(2) || (int32(*(*int8)(unsafe.Pointer(name + 2))) == '/' || int32(*(*int8)(unsafe.Pointer(name + 2))) == '\\')) {
			// Path is of the form 'x:' or 'x:/' or 'x:\'

			return 1
		}
	}

	return 0
}

// Does the given path represent a reserved window path name? If not return 0,
// if true, return the number of characters of the path that we actually want
// (not any trailing :).

func sWinIsReserved(tls *libc.TLS, path uintptr) int32 { /* tclWinFile.c:1250:1: */
	if (int32(*(*int8)(unsafe.Pointer(path))) == 'c' || int32(*(*int8)(unsafe.Pointer(path))) == 'C') &&
		(int32(*(*int8)(unsafe.Pointer(path + 1))) == 'o' || int32(*(*int8)(unsafe.Pointer(path + 1))) == 'O') {
		if (int32(*(*int8)(unsafe.Pointer(path + 2))) == 'm' || int32(*(*int8)(unsafe.Pointer(path + 2))) == 'M') &&
			int32(*(*int8)(unsafe.Pointer(path + 3))) >= '1' && int32(*(*int8)(unsafe.Pointer(path + 3))) <= '9' {
			// May have match for 'com[1-9]:?', which is a serial port.

			if int32(*(*int8)(unsafe.Pointer(path + 4))) == 0 {
				return 4
			} else if int32(*(*int8)(unsafe.Pointer(path + 4))) == ':' && int32(*(*int8)(unsafe.Pointer(path + 5))) == 0 {
				return 4
			}
		} else if (int32(*(*int8)(unsafe.Pointer(path + 2))) == 'n' || int32(*(*int8)(unsafe.Pointer(path + 2))) == 'N') && int32(*(*int8)(unsafe.Pointer(path + 3))) == 0 {
			// Have match for 'con'

			return 3
		}

	} else if (int32(*(*int8)(unsafe.Pointer(path))) == 'l' || int32(*(*int8)(unsafe.Pointer(path))) == 'L') &&
		(int32(*(*int8)(unsafe.Pointer(path + 1))) == 'p' || int32(*(*int8)(unsafe.Pointer(path + 1))) == 'P') &&
		(int32(*(*int8)(unsafe.Pointer(path + 2))) == 't' || int32(*(*int8)(unsafe.Pointer(path + 2))) == 'T') {
		if int32(*(*int8)(unsafe.Pointer(path + 3))) >= '1' && int32(*(*int8)(unsafe.Pointer(path + 3))) <= '9' {
			// May have match for 'lpt[1-9]:?'

			if int32(*(*int8)(unsafe.Pointer(path + 4))) == 0 {
				return 4
			} else if int32(*(*int8)(unsafe.Pointer(path + 4))) == ':' && int32(*(*int8)(unsafe.Pointer(path + 5))) == 0 {
				return 4
			}
		}

	} else if !(libc.X_stricmp(tls, path, ts+68460) != 0) || !(libc.X_stricmp(tls, path, ts+68464) != 0) ||
		!(libc.X_stricmp(tls, path, ts+68468) != 0) {
		// Have match for 'prn', 'nul' or 'aux'.

		return 3
	}
	return 0
}

//----------------------------------------------------------------------
//
// NativeMatchType --
//
//	This function needs a special case for a path which is a root volume,
//	because for NTFS root volumes, the getFileAttributesProc returns a
//	'hidden' attribute when it should not.
//
//	We never make any calls to a 'get attributes' routine here, since we
//	have arranged things so that our caller already knows such
//	information.
//
// Results:
//	0 = file doesn't match
//	1 = file matches
//
//----------------------------------------------------------------------

func sNativeMatchType(tls *libc.TLS, isDrive int32, attr DWORD, nativeName uintptr, types1 uintptr) int32 { /* tclWinFile.c:1321:1: */
	// 'attr' represents the attributes of the file, but we only want to
	// retrieve this info if it is absolutely necessary because it is an
	// expensive call. Unfortunately, to deal with hidden files properly, we
	// must always retrieve it.

	if types1 == uintptr(0) {
		// If invisible, don't return the file.

		return libc.BoolInt32(!(attr&DWORD(FILE_ATTRIBUTE_HIDDEN) != 0 && !(isDrive != 0)))
	}

	if attr&DWORD(FILE_ATTRIBUTE_HIDDEN) != 0 && !(isDrive != 0) {
		// If invisible.

		if (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Fperm == 0 || !((*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Fperm&(int32(1)<<1) != 0) {
			return 0
		}
	} else {
		// Visible.

		if (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Fperm&(int32(1)<<1) != 0 {
			return 0
		}
	}

	if (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Fperm != 0 {
		if (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Fperm&(int32(1)<<0) != 0 && !(attr&DWORD(FILE_ATTRIBUTE_READONLY) != 0) || (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Fperm&(int32(1)<<2) != 0 && 0 != 0 || (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Fperm&(int32(1)<<3) != 0 && attr&DWORD(FILE_ATTRIBUTE_READONLY) != 0 || (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Fperm&(int32(1)<<4) != 0 && (!(attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0) &&
			!(sNativeIsExec(tls, nativeName) != 0)) {
			return 0
		}
	}

	if (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype&(int32(1)<<2) != 0 &&
		attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 {
		// Quicker test for directory, which is a common case.

		return 1

	} else if (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype != 0 {
		var st_mode uint16
		var isExec int32 = sNativeIsExec(tls, nativeName)

		st_mode = sNativeStatMode(tls, attr, 0, isExec)

		// In order bcdpfls as in 'find -t'

		if (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype&(int32(1)<<0) != 0 && int32(st_mode)&X_S_IFMT == X_S_IFBLK || (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype&(int32(1)<<1) != 0 && int32(st_mode)&X_S_IFMT == X_S_IFCHR || (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype&(int32(1)<<2) != 0 && int32(st_mode)&X_S_IFMT == X_S_IFDIR || (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype&(int32(1)<<3) != 0 && int32(st_mode)&X_S_IFMT == X_S_IFIFO || (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype&(int32(1)<<4) != 0 && int32(st_mode)&X_S_IFMT == X_S_IFREG {
			// Do nothing - this file is ok.
		} else {
			if (*Tcl_GlobTypeData)(unsafe.Pointer(types1)).Ftype&(int32(1)<<5) != 0 {
				st_mode = sNativeStatMode(tls, attr, 1, isExec)
				if int32(st_mode)&X_S_IFMT == S_IFLNK {
					return 1
				}
			}
			return 0
		}
	}
	return 1
}

//----------------------------------------------------------------------
//
// TclpGetUserHome --
//
//	This function takes the passed in user name and finds the
//	corresponding home directory specified in the password file.
//
// Results:
//	The result is a pointer to a string specifying the user's home
//	directory, or NULL if the user's home directory could not be
//	determined. Storage for the result string is allocated in bufferPtr;
//	the caller must call Tcl_DStringFree() when the result is no longer
//	needed.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpGetUserHome(tls *libc.TLS, name uintptr, bufferPtr uintptr) uintptr { /* tclWinFile.c:1440:12: */
	bp := tls.Alloc(1024)
	defer tls.Free(1024)

	var result uintptr = uintptr(0)
	// var uiPtr uintptr at bp+232, 8

	// var ds Tcl_DString at bp, 216

	var nameLen int32 = -1
	var rc int32 = 0
	var domain uintptr
	var wName uintptr
	var wHomeDir uintptr
	// var wDomain uintptr at bp+224, 8

	XTcl_DStringInit(tls, bufferPtr)

	*(*uintptr)(unsafe.Pointer(bp + 224 /* wDomain */)) = uintptr(0)
	domain = XTcl_UtfFindFirst(tls, name, '@')
	if domain == uintptr(0) {
		// var ptr uintptr at bp+216, 8

		// No domain. Firstly check it's the current user

		*(*uintptr)(unsafe.Pointer(bp + 216 /* ptr */)) = XTclpGetUserName(tls, bp)
		if *(*uintptr)(unsafe.Pointer(bp + 216)) != uintptr(0) && libc.X_stricmp(tls, name, *(*uintptr)(unsafe.Pointer(bp + 216))) == 0 {
			// Try safest and fastest way to get current user home

			*(*uintptr)(unsafe.Pointer(bp + 216 /* ptr */)) = XTclGetEnv(tls, ts+27852, bp)
			if *(*uintptr)(unsafe.Pointer(bp + 216)) != uintptr(0) {
				XTcl_JoinPath(tls, 1, bp+216, bufferPtr)
				rc = 1
				result = (*Tcl_DString)(unsafe.Pointer(bufferPtr)).Fstring
			}
		}
		XTcl_DStringFree(tls, bp)
	} else {
		wName = XTcl_WinUtfToTChar(tls, domain+uintptr(1), -1, bp)
		rc = int32(libc.XNetGetDCName(tls, uintptr(0), wName, bp+224))
		XTcl_DStringFree(tls, bp)
		nameLen = int32((int64(domain) - int64(name)) / 1)
	}
	if rc == 0 {
		wName = XTcl_WinUtfToTChar(tls, name, nameLen, bp)
		for libc.XNetUserGetInfo(tls, *(*uintptr)(unsafe.Pointer(bp + 224)), wName, uint32(1), bp+232) != DWORD(0) {
			// User does not exist; if domain was not specified, try again
			// using current domain.

			rc = 1
			if domain != uintptr(0) {
				break
			}

			// Get current domain

			rc = int32(libc.XNetGetDCName(tls, uintptr(0), uintptr(0), bp+224))
			if rc != 0 {
				break
			}
			domain = libc.UintptrFromInt64(int64(-1)) // repeat once
		}
		if rc == 0 {
			var i DWORD
			*(*DWORD)(unsafe.Pointer(bp + 760 /* size */)) = DWORD(MAX_PATH)

			wHomeDir = (*USER_INFO_1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* uiPtr */)))).Fusri1_home_dir
			if wHomeDir != uintptr(0) && int32(*(*WCHAR)(unsafe.Pointer(wHomeDir))) != 0 {
				*(*DWORD)(unsafe.Pointer(bp + 760 /* size */)) = DWORD(libc.XlstrlenW(tls, wHomeDir))
				XTcl_WinTCharToUtf(tls, wHomeDir, int32(uint64(*(*DWORD)(unsafe.Pointer(bp + 760)))*uint64(unsafe.Sizeof(WCHAR(0)))), bufferPtr)
			} else {
				// var buf [260]WCHAR at bp+240, 520

				// User exists but has no home dir. Return
				// "{GetProfilesDirectory}/<user>".

				libc.XGetProfilesDirectoryW(tls, bp+240, bp+760)
				XTcl_WinTCharToUtf(tls, bp+240, int32(uint64(*(*DWORD)(unsafe.Pointer(bp + 760))-DWORD(1))*uint64(unsafe.Sizeof(WCHAR(0)))), bufferPtr)
				XTcl_DStringAppend(tls, bufferPtr, ts+6377, 1)
				XTcl_DStringAppend(tls, bufferPtr, name, nameLen)
			}
			result = (*Tcl_DString)(unsafe.Pointer(bufferPtr)).Fstring

			// Be sure we return normalized path

			for i = DWORD(0); i < *(*DWORD)(unsafe.Pointer(bp + 760 /* size */)); i++ {
				if int32(*(*int8)(unsafe.Pointer(result + uintptr(i)))) == '\\' {
					*(*int8)(unsafe.Pointer(result + uintptr(i))) = int8('/')
				}
			}
			libc.XNetApiBufferFree(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* uiPtr */)))
		}
		XTcl_DStringFree(tls, bp)
	}
	if *(*uintptr)(unsafe.Pointer(bp + 224)) != uintptr(0) {
		libc.XNetApiBufferFree(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* wDomain */)))
	}
	if result == uintptr(0) {
		// Look in the "Password Lists" section of system.ini for the local
		// user. There are also entries in that section that begin with a "*"
		// character that are used by Windows for other purposes; ignore user
		// names beginning with a "*".

		// var buf [260]int8 at bp+764, 260

		if int32(*(*int8)(unsafe.Pointer(name))) != '*' {
			if libc.XGetPrivateProfileStringA(tls, ts+68472, name, ts+2631, bp+764,
				uint32(MAX_PATH), ts+68487) > DWORD(0) {
				// User exists, but there is no such thing as a home directory
				// in system.ini. Return "{Windows drive}:/".

				libc.XGetWindowsDirectoryA(tls, bp+764, uint32(MAX_PATH))
				XTcl_DStringAppend(tls, bufferPtr, bp+764, 3)
				result = (*Tcl_DString)(unsafe.Pointer(bufferPtr)).Fstring
			}
		}
	}

	return result
}

//---------------------------------------------------------------------------
//
// NativeAccess --
//
//	This function replaces the library version of access(), fixing the
//	following bugs:
//
//	1. access() returns that all files have execute permission.
//
// Results:
//	See access documentation.
//
// Side effects:
//	See access documentation.
//
//---------------------------------------------------------------------------

func sNativeAccess(tls *libc.TLS, nativePath uintptr, mode int32) int32 { /* tclWinFile.c:1593:1: */
	bp := tls.Alloc(88)
	defer tls.Free(88)

	var attr DWORD
	// File might not exist.

	var lasterror DWORD
	var mask DWORD
	var hFile HANDLE
	var sdPtr uintptr
	// var size uint32 at bp, 4

	// var pSid PSID at bp+8, 8

	// var SidDefaulted WINBOOL at bp+16, 4

	// var samba_unmapped SID_IDENTIFIER_AUTHORITY at bp+20, 6

	// var genMap GENERIC_MAPPING at bp+40, 16

	// var hToken HANDLE at bp+32, 8

	var desiredAccess DWORD
	// var grantedAccess DWORD at bp+80, 4

	// var accessYesNo WINBOOL at bp+84, 4

	// var privSet PRIVILEGE_SET at bp+56, 20

	// var privSetSize DWORD at bp+76, 4

	var error int32

	attr = libc.XGetFileAttributesW(tls, nativePath)

	if !(attr == libc.Uint32(libc.Uint32FromInt32(-1))) {
		goto __1
	}
	// File might not exist.

	lasterror = libc.XGetLastError(tls)
	if !(lasterror != DWORD(32)) {
		goto __2
	}
	XTclWinConvertError(tls, lasterror)
	return -1
__2:
	;
__1:
	;

	if !(mode == F_OK) {
		goto __3
	}
	// File exists, nothing else to check.

	return 0
__3:
	;

	// If it's not a directory (assume file), do several fast checks:

	if !!(attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0) {
		goto __4
	}
	// If the attributes say this is not writable at all.  The file is a
	// regular file (i.e., not a directory), then the file is not
	// writable, full stop.  For directories, the read-only bit is
	// (mostly) ignored by Windows, so we can't ascertain anything about
	// directory access from the attrib data.  However, if we have the
	// advanced 'getFileSecurityProc', then more robust ACL checks will be
	// done below.

	if !(mode&W_OK != 0 && attr&DWORD(FILE_ATTRIBUTE_READONLY) != 0) {
		goto __5
	}
	XTcl_SetErrno(tls, EACCES)
	return -1
__5:
	;

	// If doesn't have the correct extension, it can't be executable

	if !(mode&X_OK != 0 && !(sNativeIsExec(tls, nativePath) != 0)) {
		goto __6
	}
	XTcl_SetErrno(tls, EACCES)
	return -1
__6:
	;

	// Special case for read/write/executable check on file

	if !(mode&(R_OK|W_OK|X_OK) != 0 && !(mode&libc.CplInt32(R_OK|W_OK|X_OK) != 0)) {
		goto __7
	}
	mask = DWORD(0)

	if !(mode&R_OK != 0) {
		goto __8
	}
	mask = mask | 0x80000000
__8:
	;
	if !(mode&W_OK != 0) {
		goto __9
	}
	mask = mask | DWORD(0x40000000)
__9:
	;
	if !(mode&X_OK != 0) {
		goto __10
	}
	mask = mask | DWORD(0x20000000)
__10:
	;

	hFile = libc.XCreateFileW(tls, nativePath, mask,
		uint32(FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE),
		uintptr(0), uint32(OPEN_EXISTING), uint32(FILE_FLAG_NO_BUFFERING), uintptr(0))
	if !(hFile != libc.UintptrFromInt64(int64(-1))) {
		goto __11
	}
	libc.XCloseHandle(tls, hFile)
	return 0
__11:
	;

	// Fast exit if access was denied

	if !(libc.XGetLastError(tls) == DWORD(5)) {
		goto __12
	}
	XTcl_SetErrno(tls, EACCES)
	return -1
__12:
	;
__7:
	;

	// We cannnot verify the access fast, check it below using security
	// info.
__4:
	;

	/*
	 * It looks as if the permissions are ok, but if we are on NT, 2000 or XP,
	 * we have a more complex permissions structure so we try to check that.
	 * The code below is remarkably complex for such a simple thing as finding
	 * what permissions the OS has set for a file.
	 */

	sdPtr = uintptr(0)
	*(*PSID)(unsafe.Pointer(bp + 8 /* pSid */)) = uintptr(0)
	*(*SID_IDENTIFIER_AUTHORITY)(unsafe.Pointer(bp + 20 /* samba_unmapped */)) = SID_IDENTIFIER_AUTHORITY{FValue: [6]BYTE{BYTE(0), BYTE(0), BYTE(0), BYTE(0), BYTE(0), BYTE(22)}}
	*(*HANDLE)(unsafe.Pointer(bp + 32 /* hToken */)) = uintptr(0)
	desiredAccess = DWORD(0)
	*(*DWORD)(unsafe.Pointer(bp + 80 /* grantedAccess */)) = DWORD(0)
	*(*WINBOOL)(unsafe.Pointer(bp + 84 /* accessYesNo */)) = FALSE
	*(*DWORD)(unsafe.Pointer(bp + 76 /* privSetSize */)) = DWORD(unsafe.Sizeof(PRIVILEGE_SET{}))

	// First find out how big the buffer needs to be.

	*(*uint32)(unsafe.Pointer(bp /* size */)) = uint32(0)
	libc.XGetFileSecurityW(tls, nativePath,
		uint32(0x00000001|0x00000002|
			0x00000004|0x00000010),
		uintptr(0), uint32(0), bp)

	// Should have failed with ERROR_INSUFFICIENT_BUFFER

	error = int32(libc.XGetLastError(tls))
	if !(int32(error) != 122) {
		goto __13
	}
	// Most likely case is ERROR_ACCESS_DENIED, which we will convert
	// to EACCES - just what we want!

	XTclWinConvertError(tls, DWORD(error))
	return -1
__13:
	;

	// Now size contains the size of buffer needed.

	sdPtr = libc.XHeapAlloc(tls, libc.XGetProcessHeap(tls), uint32(0), uint64(*(*uint32)(unsafe.Pointer(bp /* size */))))

	if !(sdPtr == uintptr(0)) {
		goto __14
	}
	goto accessError
__14:
	;

	// Call GetFileSecurityW() for real.

	if !!(libc.XGetFileSecurityW(tls, nativePath,
		uint32(0x00000001|0x00000002|
			0x00000004|0x00000010),
		sdPtr, *(*uint32)(unsafe.Pointer(bp)), bp) != 0) {
		goto __15
	}
	// Error getting owner SD

	goto accessError
__15:
	;

	// As of Samba 3.0.23 (10-Jul-2006), unmapped users and groups are
	// assigned to SID domains S-1-22-1 and S-1-22-2, where "22" is the
	// top-level authority.	 If the file owner and group is unmapped then
	// the ACL access check below will only test against world access,
	// which is likely to be more restrictive than the actual access
	// restrictions.  Since the ACL tests are more likely wrong than
	// right, skip them.  Moreover, the unix owner access permissions are
	// usually mapped to the Windows attributes, so if the user is the
	// file owner then the attrib checks above are correct (as far as they
	// go).

	if !(!(libc.XGetSecurityDescriptorOwner(tls, sdPtr, bp+8, bp+16) != 0) || libc.Xmemcmp(tls, libc.XGetSidIdentifierAuthority(tls, *(*PSID)(unsafe.Pointer(bp + 8))), bp+20,
		uint64(unsafe.Sizeof(SID_IDENTIFIER_AUTHORITY{}))) == 0) {
		goto __16
	}
	libc.XHeapFree(tls, libc.XGetProcessHeap(tls), uint32(0), sdPtr)
	return 0 // Attrib tests say access allowed.
__16:
	;

	// Perform security impersonation of the user and open the resulting
	// thread token.

	if !!(libc.XImpersonateSelf(tls, SecurityImpersonation) != 0) {
		goto __17
	}
	// Unable to perform security impersonation.

	goto accessError
__17:
	;
	if !!(libc.XOpenThreadToken(tls, libc.XGetCurrentThread(tls),
		uint32(0x0002|0x0008), FALSE, bp+32) != 0) {
		goto __18
	}
	// Unable to get current thread's token.

	goto accessError
__18:
	;

	libc.XRevertToSelf(tls)

	// Setup desiredAccess according to the access priveleges we are
	// checking.

	if !(mode&R_OK != 0) {
		goto __19
	}
	desiredAccess = desiredAccess | DWORD(0x00020000|0x0001|0x0080|0x0008|0x00100000)
__19:
	;
	if !(mode&W_OK != 0) {
		goto __20
	}
	desiredAccess = desiredAccess | DWORD(0x00020000|0x0002|0x0100|0x0010|0x0004|0x00100000)
__20:
	;
	if !(mode&X_OK != 0) {
		goto __21
	}
	desiredAccess = desiredAccess | DWORD(0x00020000|0x0080|0x0020|0x00100000)
__21:
	;

	libc.Xmemset(tls, bp+40, 0x0, uint64(unsafe.Sizeof(GENERIC_MAPPING{})))
	(*GENERIC_MAPPING)(unsafe.Pointer(bp + 40 /* &genMap */)).FGenericRead = ACCESS_MASK(0x00020000 | 0x0001 | 0x0080 | 0x0008 | 0x00100000)
	(*GENERIC_MAPPING)(unsafe.Pointer(bp + 40 /* &genMap */)).FGenericWrite = ACCESS_MASK(0x00020000 | 0x0002 | 0x0100 | 0x0010 | 0x0004 | 0x00100000)
	(*GENERIC_MAPPING)(unsafe.Pointer(bp + 40 /* &genMap */)).FGenericExecute = ACCESS_MASK(0x00020000 | 0x0080 | 0x0020 | 0x00100000)
	(*GENERIC_MAPPING)(unsafe.Pointer(bp + 40 /* &genMap */)).FGenericAll = ACCESS_MASK(0x000F0000 | 0x00100000 | 0x1FF)

	// Perform access check using the token.

	if !!(libc.XAccessCheck(tls, sdPtr, *(*HANDLE)(unsafe.Pointer(bp + 32)), desiredAccess,
		bp+40, bp+56, bp+76, bp+80,
		bp+84) != 0) {
		goto __22
	}
	// Unable to perform access check.

accessError:
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	if !(sdPtr != uintptr(0)) {
		goto __23
	}
	libc.XHeapFree(tls, libc.XGetProcessHeap(tls), uint32(0), sdPtr)
__23:
	;
	if !(*(*HANDLE)(unsafe.Pointer(bp + 32)) != uintptr(0)) {
		goto __24
	}
	libc.XCloseHandle(tls, *(*HANDLE)(unsafe.Pointer(bp + 32 /* hToken */)))
__24:
	;
	return -1
__22:
	;

	// Clean up.

	libc.XHeapFree(tls, libc.XGetProcessHeap(tls), uint32(0), sdPtr)
	libc.XCloseHandle(tls, *(*HANDLE)(unsafe.Pointer(bp + 32 /* hToken */)))
	if !!(*(*WINBOOL)(unsafe.Pointer(bp + 84)) != 0) {
		goto __25
	}
	XTcl_SetErrno(tls, EACCES)
	return -1
__25:
	;

	return 0
}

//----------------------------------------------------------------------
//
// NativeIsExec --
//
//	Determines if a path is executable. On windows this is simply defined
//	by whether the path ends in a standard executable extension.
//
// Results:
//	1 = executable, 0 = not.
//
//----------------------------------------------------------------------

func sNativeIsExec(tls *libc.TLS, path uintptr) int32 { /* tclWinFile.c:1879:1: */
	var len Size_t = libc.Xwcslen(tls, path)

	if len < uint64(5) {
		return 0
	}

	if int32(*(*WCHAR)(unsafe.Pointer(path + uintptr(len-uint64(4))*2))) != '.' {
		return 0
	}

	path += 2 * uintptr(len-uint64(3))
	if libc.X_wcsicmp(tls, path, wtext+474) == 0 ||
		libc.X_wcsicmp(tls, path, wtext+186) == 0 ||
		libc.X_wcsicmp(tls, path, wtext+482) == 0 ||
		libc.X_wcsicmp(tls, path, wtext+490) == 0 {
		return 1
	}
	return 0
}

//----------------------------------------------------------------------
//
// TclpObjChdir --
//
//	This function replaces the library version of chdir().
//
// Results:
//	See chdir() documentation.
//
// Side effects:
//	See chdir() documentation.
//
//----------------------------------------------------------------------

func XTclpObjChdir(tls *libc.TLS, pathPtr uintptr) int32 { /* tclWinFile.c:1919:1: */
	var result int32
	var nativePath uintptr

	nativePath = XTcl_FSGetNativePath(tls, pathPtr)

	if !(nativePath != 0) {
		return -1
	}
	result = libc.XSetCurrentDirectoryW(tls, nativePath)

	if result == 0 {
		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return -1
	}
	return 0
}

//----------------------------------------------------------------------
//
// TclpGetCwd --
//
//	This function replaces the library version of getcwd(). (Obsolete
//	function, only retained for old extensions which may call it
//	directly).
//
// Results:
//	The result is a pointer to a string specifying the current directory,
//	or NULL if the current directory could not be determined. If NULL is
//	returned, an error message is left in the interp's result. Storage for
//	the result string is allocated in bufferPtr; the caller must call
//	Tcl_DStringFree() when the result is no longer needed.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpGetCwd(tls *libc.TLS, interp uintptr, bufferPtr uintptr) uintptr { /* tclWinFile.c:1961:12: */
	bp := tls.Alloc(528)
	defer tls.Free(528)

	// var buffer [260]WCHAR at bp+8, 520

	var p uintptr
	var native uintptr

	if libc.XGetCurrentDirectoryW(tls, uint32(MAX_PATH), bp+8) == DWORD(0) {
		XTclWinConvertError(tls, libc.XGetLastError(tls))
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+38657,
				libc.VaList(bp, XTcl_PosixError(tls, interp))))
		}
		return uintptr(0)
	}

	// Watch for the weird Windows c:\\UNC syntax.

	native = bp + 8 /* buffer */
	if int32(*(*WCHAR)(unsafe.Pointer(native))) != 0 && int32(*(*WCHAR)(unsafe.Pointer(native + 1*2))) == ':' &&
		int32(*(*WCHAR)(unsafe.Pointer(native + 2*2))) == '\\' && int32(*(*WCHAR)(unsafe.Pointer(native + 3*2))) == '\\' {
		native += 2 * uintptr(2)
	}
	XTcl_WinTCharToUtf(tls, native, -1, bufferPtr)

	// Convert to forward slashes for easier use in scripts.

	for p = (*Tcl_DString)(unsafe.Pointer(bufferPtr)).Fstring; int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
		if int32(*(*int8)(unsafe.Pointer(p))) == '\\' {
			*(*int8)(unsafe.Pointer(p)) = int8('/')
		}
	}
	return (*Tcl_DString)(unsafe.Pointer(bufferPtr)).Fstring
}

func XTclpObjStat(tls *libc.TLS, pathPtr uintptr, statPtr uintptr) int32 { /* tclWinFile.c:2005:1: */
	// Ensure correct file sizes by forcing the OS to write any pending data
	// to disk. This is done only for channels which are dirty, i.e. have been
	// written to since the last flush here.

	XTclWinFlushDirtyChannels(tls)

	return sNativeStat(tls, XTcl_FSGetNativePath(tls, pathPtr), statPtr, 0)
}

//----------------------------------------------------------------------
//
// NativeStat --
//
//	This function replaces the library version of stat(), fixing the
//	following bugs:
//
//	1. stat("c:") returns an error.
//	2. Borland stat() return time in GMT instead of localtime.
//	3. stat("\\server\mount") would return error.
//	4. Accepts slashes or backslashes.
//	5. st_dev and st_rdev were wrong for UNC paths.
//
// Results:
//	See stat documentation.
//
// Side effects:
//	See stat documentation.
//
//----------------------------------------------------------------------

func sNativeStat(tls *libc.TLS, nativePath uintptr, statPtr uintptr, checkLinks int32) int32 { /* tclWinFile.c:2044:1: */
	bp := tls.Alloc(680)
	defer tls.Free(680)

	var attr DWORD
	var dev int32
	var nlink int32 = 1
	var mode uint16
	var inode uint32 = uint32(0)
	var fileHandle HANDLE
	var fileType DWORD = DWORD(FILE_TYPE_UNKNOWN)

	// If we can use 'createFile' on this, then we can use the resulting
	// fileHandle to read more information (nlink, ino) than we can get from
	// other attributes reading APIs. If not, then we try to fall back on the
	// 'getFileAttributesExProc', and if that isn't available, then on even
	// simpler routines.
	//
	// Special consideration must be given to Windows hardcoded names like
	// CON, NULL, COM1, LPT1 etc. For these, we still need to do the
	// CreateFile as some may not exist (e.g. there is no CON in wish by
	// default). However the subsequent GetFileInformationByHandle will
	// fail. We do a WinIsReserved to see if it is one of the special names,
	// and if successful, mock up a BY_HANDLE_FILE_INFORMATION structure.

	fileHandle = libc.XCreateFileW(tls, nativePath, 0x80000000,
		uint32(FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE),
		uintptr(0), uint32(OPEN_EXISTING),
		uint32(FILE_FLAG_BACKUP_SEMANTICS|FILE_FLAG_OPEN_REPARSE_POINT), uintptr(0))

	if fileHandle != libc.UintptrFromInt64(int64(-1)) {
		// var data BY_HANDLE_FILE_INFORMATION at bp, 52

		if libc.XGetFileInformationByHandle(tls, fileHandle, bp) != TRUE {
			fileType = libc.XGetFileType(tls, fileHandle)
			libc.XCloseHandle(tls, fileHandle)
			if fileType != DWORD(FILE_TYPE_CHAR) && fileType != DWORD(FILE_TYPE_DISK) {
				XTcl_SetErrno(tls, ENOENT)
				return -1
			}

			// Mock up the expected structure

			libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(BY_HANDLE_FILE_INFORMATION{})))
			(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_atime = int64(0)
			(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_mtime = int64(0)
			(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_ctime = int64(0)
		} else {
			libc.XCloseHandle(tls, fileHandle)
			(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_atime = sToCTime(tls, (*BY_HANDLE_FILE_INFORMATION)(unsafe.Pointer(bp /* &data */)).FftLastAccessTime)
			(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_mtime = sToCTime(tls, (*BY_HANDLE_FILE_INFORMATION)(unsafe.Pointer(bp /* &data */)).FftLastWriteTime)
			(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_ctime = sToCTime(tls, (*BY_HANDLE_FILE_INFORMATION)(unsafe.Pointer(bp /* &data */)).FftCreationTime)
		}
		attr = (*BY_HANDLE_FILE_INFORMATION)(unsafe.Pointer(bp /* &data */)).FdwFileAttributes
		(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_size = Tcl_WideInt((*BY_HANDLE_FILE_INFORMATION)(unsafe.Pointer(bp)).FnFileSizeLow) | Tcl_WideInt((*BY_HANDLE_FILE_INFORMATION)(unsafe.Pointer(bp)).FnFileSizeHigh)<<32

		// On Unix, for directories, nlink apparently depends on the number of
		// files in the directory.  We could calculate that, but it would be a
		// bit of a performance penalty, I think. Hence we just use what
		// Windows gives us, which is the same as Unix for files, at least.

		nlink = int32((*BY_HANDLE_FILE_INFORMATION)(unsafe.Pointer(bp /* &data */)).FnNumberOfLinks)

		// Unfortunately our stat definition's inode field (unsigned short)
		// will throw away most of the precision we have here, which means we
		// can't rely on inode as a unique identifier of a file. We'd really
		// like to do something like how we handle 'st_size'.

		inode = uint32((*BY_HANDLE_FILE_INFORMATION)(unsafe.Pointer(bp)).FnFileIndexHigh | (*BY_HANDLE_FILE_INFORMATION)(unsafe.Pointer(bp)).FnFileIndexLow)
	} else {
		// Fall back on the less capable routines. This means no nlink or ino.

		// var data WIN32_FILE_ATTRIBUTE_DATA at bp+52, 36

		if libc.XGetFileAttributesExW(tls, nativePath,
			GetFileExInfoStandard, bp+52) != TRUE {
			var hFind HANDLE
			// var ffd WIN32_FIND_DATAW at bp+88, 592

			var lasterror DWORD = libc.XGetLastError(tls)

			if lasterror != DWORD(32) {
				XTclWinConvertError(tls, lasterror)
				return -1
			}
			hFind = libc.XFindFirstFileW(tls, nativePath, bp+88)
			if hFind == libc.UintptrFromInt64(int64(-1)) {
				XTclWinConvertError(tls, libc.XGetLastError(tls))
				return -1
			}
			libc.Xmemcpy(tls, bp+52, bp+88, uint64(unsafe.Sizeof(WIN32_FILE_ATTRIBUTE_DATA{})))
			libc.XFindClose(tls, hFind)
		}

		attr = (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp + 52 /* &data */)).FdwFileAttributes

		(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_size = Tcl_WideInt((*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp+52)).FnFileSizeLow) | Tcl_WideInt((*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp+52)).FnFileSizeHigh)<<32
		(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_atime = sToCTime(tls, (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp+52 /* &data */)).FftLastAccessTime)
		(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_mtime = sToCTime(tls, (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp+52 /* &data */)).FftLastWriteTime)
		(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_ctime = sToCTime(tls, (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp+52 /* &data */)).FftCreationTime)
	}

	dev = sNativeDev(tls, nativePath)
	mode = sNativeStatMode(tls, attr, checkLinks, sNativeIsExec(tls, nativePath))
	if fileType == DWORD(FILE_TYPE_CHAR) {
		mode = libc.Uint16FromInt32(int32(mode) & libc.CplInt32(X_S_IFMT))
		mode = uint16(int32(mode) | X_S_IFCHR)
	} else if fileType == DWORD(FILE_TYPE_DISK) {
		mode = libc.Uint16FromInt32(int32(mode) & libc.CplInt32(X_S_IFMT))
		mode = uint16(int32(mode) | X_S_IFBLK)
	}

	(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_dev = Dev_t(dev)
	(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_ino = X_ino_t(inode)
	(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_mode = mode
	(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_nlink = int16(nlink)
	(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_uid = int16(0)
	(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_gid = int16(0)
	(*Tcl_StatBuf)(unsafe.Pointer(statPtr)).Fst_rdev = Dev_t(dev)
	return 0
}

//----------------------------------------------------------------------
//
// NativeDev --
//
//	Calculate just the 'st_dev' field of a 'stat' structure.
//
//----------------------------------------------------------------------

func sNativeDev(tls *libc.TLS, nativePath uintptr) int32 { /* tclWinFile.c:2188:1: */
	bp := tls.Alloc(964)
	defer tls.Free(964)

	var dev int32
	// var ds Tcl_DString at bp+528, 216

	// var nativeFullPath [260]WCHAR at bp, 520

	// var nativePart uintptr at bp+520, 8

	var fullPath uintptr

	libc.XGetFullPathNameW(tls, nativePath, uint32(MAX_PATH), bp, bp+520)
	fullPath = XTcl_WinTCharToUtf(tls, bp, -1, bp+528)

	if int32(*(*int8)(unsafe.Pointer(fullPath))) == '\\' && int32(*(*int8)(unsafe.Pointer(fullPath + 1))) == '\\' {
		var p uintptr
		// var dw DWORD at bp+960, 4

		var nativeVol uintptr
		// var volString Tcl_DString at bp+744, 216

		p = libc.Xstrchr(tls, fullPath+uintptr(2), '\\')
		p = libc.Xstrchr(tls, p+uintptr(1), '\\')
		if p == uintptr(0) {
			// Add terminating backslash to fullpath or GetVolumeInformation()
			// won't work.

			fullPath = XTcl_DStringAppend(tls, bp+528, ts+13358, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
			p = fullPath + uintptr((*Tcl_DString)(unsafe.Pointer(bp+528)).Flength)
		} else {
			p++
		}
		nativeVol = XTcl_WinUtfToTChar(tls, fullPath, int32((int64(p)-int64(fullPath))/1), bp+744)
		*(*DWORD)(unsafe.Pointer(bp + 960 /* dw */)) = libc.Uint32(libc.Uint32FromInt32(-1))
		libc.XGetVolumeInformationW(tls, nativeVol, uintptr(0), uint32(0), bp+960, uintptr(0), uintptr(0), uintptr(0), uint32(0))

		// GetFullPathNameW() turns special devices like "NUL" into "\\.\NUL",
		// but GetVolumeInformationW() returns failure for "\\.\NUL". This will
		// cause "NUL" to get a drive number of -1, which makes about as much
		// sense as anything since the special devices don't live on any
		// drive.

		dev = int32(*(*DWORD)(unsafe.Pointer(bp + 960 /* dw */)))
		XTcl_DStringFree(tls, bp+744)
	} else if int32(*(*int8)(unsafe.Pointer(fullPath))) != 0 && int32(*(*int8)(unsafe.Pointer(fullPath + 1))) == ':' {
		dev = int32(XTcl_UniCharToLower(tls, int32(*(*int8)(unsafe.Pointer(fullPath))))) - 'a'
	} else {
		dev = -1
	}
	XTcl_DStringFree(tls, bp+528)

	return dev
}

//----------------------------------------------------------------------
//
// NativeStatMode --
//
//	Calculate just the 'st_mode' field of a 'stat' structure.
//
//	In many places we don't need the full stat structure, and it's much
//	faster just to calculate these pieces, if that's all we need.
//
//----------------------------------------------------------------------

func sNativeStatMode(tls *libc.TLS, attr DWORD, checkLinks int32, isExec int32) uint16 { /* tclWinFile.c:2257:1: */
	var mode int32

	if checkLinks != 0 && attr&DWORD(FILE_ATTRIBUTE_REPARSE_POINT) != 0 {
		// It is a link.

		mode = S_IFLNK
	} else {
		if attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 {
			mode = X_S_IFDIR | X_S_IEXEC
		} else {
			mode = X_S_IFREG
		}
	}
	mode = mode | func() int32 {
		if attr&DWORD(FILE_ATTRIBUTE_READONLY) != 0 {
			return X_S_IREAD
		}
		return X_S_IREAD | X_S_IWRITE
	}()
	if isExec != 0 {
		mode = mode | X_S_IEXEC
	}

	// Propagate the S_IREAD, S_IWRITE, S_IEXEC bits to the group and other
	// positions.

	mode = mode | mode&(X_S_IREAD|X_S_IWRITE|X_S_IEXEC)>>3
	mode = mode | mode&(X_S_IREAD|X_S_IWRITE|X_S_IEXEC)>>6
	return uint16(mode)
}

//------------------------------------------------------------------------
//
// ToCTime --
//
//	Converts a Windows FILETIME to a time_t in UTC.
//
// Results:
//	Returns the count of seconds from the Posix epoch.
//
//------------------------------------------------------------------------

func sToCTime(tls *libc.TLS, fileTime FILETIME) Time_t { /* tclWinFile.c:2302:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var convertedTime LARGE_INTEGER at bp, 8

	*(*DWORD)(unsafe.Pointer(bp)) = fileTime.FdwLowDateTime
	*(*LONG)(unsafe.Pointer(bp)) = LONG(fileTime.FdwHighDateTime)

	return (*(*LONGLONG)(unsafe.Pointer(bp)) - int64(116444736)*int64(1000000000)) / int64(10000000)
}

//------------------------------------------------------------------------
//
// FromCTime --
//
//	Converts a time_t to a Windows FILETIME
//
// Results:
//	Returns the count of 100-ns ticks seconds from the Windows epoch.
//
//------------------------------------------------------------------------

func sFromCTime(tls *libc.TLS, posixTime Time_t, fileTime uintptr) { /* tclWinFile.c:2328:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var convertedTime LARGE_INTEGER at bp, 8

	*(*LONGLONG)(unsafe.Pointer(bp)) = posixTime*int64(10000000) +
		int64(116444736)*int64(1000000000)
	(*FILETIME)(unsafe.Pointer(fileTime)).FdwLowDateTime = *(*DWORD)(unsafe.Pointer(bp))
	(*FILETIME)(unsafe.Pointer(fileTime)).FdwHighDateTime = DWORD(*(*LONG)(unsafe.Pointer(bp)))
}

//---------------------------------------------------------------------------
//
// TclpGetNativeCwd --
//
//	This function replaces the library version of getcwd().
//
// Results:
//	The input and output are filesystem paths in native form. The result
//	is either the given clientData, if the working directory hasn't
//	changed, or a new clientData (owned by our caller), giving the new
//	native path, or NULL if the current directory could not be determined.
//	If NULL is returned, the caller can examine the standard posix error
//	codes to determine the cause of the problem.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpGetNativeCwd(tls *libc.TLS, clientData ClientData) ClientData { /* tclWinFile.c:2362:1: */
	bp := tls.Alloc(520)
	defer tls.Free(520)

	// var buffer [260]WCHAR at bp, 520

	if libc.XGetCurrentDirectoryW(tls, uint32(MAX_PATH), bp) == DWORD(0) {
		XTclWinConvertError(tls, libc.XGetLastError(tls))
		return uintptr(0)
	}

	if clientData != uintptr(0) {
		if libc.Xwcscmp(tls, clientData, bp) == 0 {
			return clientData
		}
	}

	return XTclNativeDupInternalRep(tls, bp)
}

func XTclpObjAccess(tls *libc.TLS, pathPtr uintptr, mode int32) int32 { /* tclWinFile.c:2382:1: */
	return sNativeAccess(tls, XTcl_FSGetNativePath(tls, pathPtr), mode)
}

func XTclpObjLstat(tls *libc.TLS, pathPtr uintptr, statPtr uintptr) int32 { /* tclWinFile.c:2390:1: */
	// Ensure correct file sizes by forcing the OS to write any pending data
	// to disk. This is done only for channels which are dirty, i.e. have been
	// written to since the last flush here.

	XTclWinFlushDirtyChannels(tls)

	return sNativeStat(tls, XTcl_FSGetNativePath(tls, pathPtr), statPtr, 1)
}

func XTclpObjLink(tls *libc.TLS, pathPtr uintptr, toPtr uintptr, linkAction int32) uintptr { /* tclWinFile.c:2406:9: */
	if toPtr != uintptr(0) {
		var res int32
		var LinkTarget uintptr
		var LinkSource uintptr = XTcl_FSGetNativePath(tls, pathPtr)
		var normalizedToPtr uintptr = XTcl_FSGetNormalizedPath(tls, uintptr(0), toPtr)

		if normalizedToPtr == uintptr(0) {
			return uintptr(0)
		}

		LinkTarget = XTcl_FSGetNativePath(tls, normalizedToPtr)

		if LinkSource == uintptr(0) || LinkTarget == uintptr(0) {
			return uintptr(0)
		}
		res = sWinLink(tls, LinkSource, LinkTarget, linkAction)
		if res == 0 {
			return toPtr
		} else {
			return uintptr(0)
		}
	} else {
		var LinkSource uintptr = XTcl_FSGetNativePath(tls, pathPtr)

		if LinkSource == uintptr(0) {
			return uintptr(0)
		}
		return sWinReadLink(tls, LinkSource)
	}
	return uintptr(0)
}

//---------------------------------------------------------------------------
//
// TclpFilesystemPathType --
//
//	This function is part of the native filesystem support, and returns
//	the path type of the given path. Returns NTFS or FAT or whatever is
//	returned by the 'volume information' proc.
//
// Results:
//	NULL at present.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclpFilesystemPathType(tls *libc.TLS, pathPtr uintptr) uintptr { /* tclWinFile.c:2462:9: */
	bp := tls.Alloc(280)
	defer tls.Free(280)

	var found int32
	// var volType [32]WCHAR at bp, 64

	var firstSeparator uintptr
	var path uintptr
	var normPath uintptr = XTcl_FSGetNormalizedPath(tls, uintptr(0), pathPtr)

	if normPath == uintptr(0) {
		return uintptr(0)
	}
	path = XTcl_GetString(tls, normPath)
	if path == uintptr(0) {
		return uintptr(0)
	}

	firstSeparator = libc.Xstrchr(tls, path, '/')
	if firstSeparator == uintptr(0) {
		found = libc.XGetVolumeInformationW(tls, XTcl_FSGetNativePath(tls, pathPtr),
			uintptr(0), uint32(0), uintptr(0), uintptr(0), uintptr(0), bp, uint32(32))
	} else {
		var driveName uintptr = XTcl_NewStringObj(tls, path, int32((int64(firstSeparator)-int64(path))/1+int64(1)))

		(*Tcl_Obj)(unsafe.Pointer(driveName)).FrefCount++
		found = libc.XGetVolumeInformationW(tls, XTcl_FSGetNativePath(tls, driveName),
			uintptr(0), uint32(0), uintptr(0), uintptr(0), uintptr(0), bp, uint32(32))
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = driveName
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	if found == 0 {
		return uintptr(0)
	} else {
		// var ds Tcl_DString at bp+64, 216

		XTcl_WinTCharToUtf(tls, bp, -1, bp+64)
		return XTclDStringToObj(tls, bp+64)
	}
	return uintptr(0)
}

// This define can be turned on to experiment with a different way of
// normalizing paths (using a different Windows API). Unfortunately the new
// path seems to take almost exactly the same amount of time as the old path!
// The primary time taken by normalization is in
// GetFileAttributesEx/FindFirstFile or GetFileAttributesEx/GetLongPathName.
// Conversion to/from native is not a significant factor at all.
//
// Also, since we have to check for symbolic links (reparse points) then we
// have to call GetFileAttributes on each path segment anyway, so there's no
// benefit to doing anything clever there.

// #define TclNORM_LONG_PATH

//---------------------------------------------------------------------------
//
// TclpObjNormalizePath --
//
//	This function scans through a path specification and replaces it, in
//	place, with a normalized version. This means using the 'longname', and
//	expanding any symbolic links contained within the path.
//
// Results:
//	The new 'nextCheckpoint' value, giving as far as we could understand
//	in the path.
//
// Side effects:
//	The pathPtr string, which must contain a valid path, is possibly
//	modified in place.
//
//---------------------------------------------------------------------------

func XTclpObjNormalizePath(tls *libc.TLS, interp uintptr, pathPtr uintptr, nextCheckpoint int32) int32 { /* tclWinFile.c:2541:1: */
	bp := tls.Alloc(1064)
	defer tls.Free(1064)

	var lastValidPathEnd uintptr = uintptr(0)
	// var dsNorm Tcl_DString at bp, 216
	// This will hold the normalized string.
	var path uintptr
	var currentPathEndPosition uintptr
	var temp uintptr = uintptr(0)
	var isDrive int32 = 1
	// var ds Tcl_DString at bp+216, 216
	// Some workspace.

	XTcl_DStringInit(tls, bp)
	path = XTcl_GetString(tls, pathPtr)

	currentPathEndPosition = path + uintptr(nextCheckpoint)
	if int32(*(*int8)(unsafe.Pointer(currentPathEndPosition))) == '/' {
		currentPathEndPosition++
	}
	for 1 != 0 {
		var cur int8 = *(*int8)(unsafe.Pointer(currentPathEndPosition))

		if (int32(cur) == '/' || int32(cur) == 0) && path != currentPathEndPosition {
			// Reached directory separator, or end of string.

			// var data WIN32_FILE_ATTRIBUTE_DATA at bp+432, 36

			var nativePath uintptr = XTcl_WinUtfToTChar(tls, path,
				int32((int64(currentPathEndPosition)-int64(path))/1), bp+216)

			if libc.XGetFileAttributesExW(tls, nativePath,
				GetFileExInfoStandard, bp+432) != TRUE {
				// File doesn't exist.

				if isDrive != 0 {
					var len int32 = sWinIsReserved(tls, path)

					if len > 0 {
						// Actually it does exist - COM1, etc.

						var i int32

						for i = 0; i < len; i++ {
							var wc WCHAR = *(*WCHAR)(unsafe.Pointer(nativePath + uintptr(i)*2))

							if int32(wc) >= 'a' {
								wc = WCHAR(int32(wc) - ('a' - 'A'))
								*(*WCHAR)(unsafe.Pointer(nativePath + uintptr(i)*2)) = wc
							}
						}
						XTcl_DStringAppend(tls, bp,
							nativePath,
							int32(uint64(unsafe.Sizeof(WCHAR(0)))*uint64(len)))
						lastValidPathEnd = currentPathEndPosition
					} else if nextCheckpoint == 0 {
						// Path starts with a drive designation that's not
						// actually on the system. We still must normalize up
						// past the first separator. [Bug 3603434]

						currentPathEndPosition++
					}
				}
				XTcl_DStringFree(tls, bp+216)
				break
			}

			// File 'nativePath' does exist if we get here. We now want to
			// check if it is a symlink and otherwise continue with the
			// rest of the path.

			// Check for symlinks, except at last component of path (we don't
			// follow final symlinks). Also a drive (C:/) for example, may
			// sometimes have the reparse flag set for some reason I don't
			// understand. We therefore don't perform this check for drives.

			if int32(cur) != 0 && !(isDrive != 0) && (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp+432)).FdwFileAttributes&DWORD(FILE_ATTRIBUTE_REPARSE_POINT) != 0 {
				var to uintptr = sWinReadLinkDirectory(tls, nativePath)

				if to != uintptr(0) {
					// Read the reparse point ok. Now, reparse points need not
					// be normalized, otherwise we could use:
					//
					// Tcl_GetStringFromObj(to, &pathLen);
					// nextCheckpoint = pathLen;
					//
					// So, instead we have to start from the beginning.

					nextCheckpoint = 0
					XTcl_AppendToObj(tls, to, currentPathEndPosition, -1)

					// Convert link to forward slashes.

					for path = XTcl_GetString(tls, to); int32(*(*int8)(unsafe.Pointer(path))) != 0; path++ {
						if int32(*(*int8)(unsafe.Pointer(path))) == '\\' {
							*(*int8)(unsafe.Pointer(path)) = int8('/')
						}
					}
					path = XTcl_GetString(tls, to)
					currentPathEndPosition = path + uintptr(nextCheckpoint)
					if temp != uintptr(0) {
						for ok := true; ok; ok = 0 != 0 {
							var _objPtr uintptr = temp
							if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
								XTclFreeObj(tls, _objPtr)
							}
						}
					}
					temp = to

					// Reset variables so we can restart normalization.

					isDrive = 1
					XTcl_DStringFree(tls, bp)
					XTcl_DStringFree(tls, bp+216)
					continue
				}
			}

			// Now we convert the tail of the current path to its 'long form',
			// and append it to 'dsNorm' which holds the current normalized
			// path

			if isDrive != 0 {
				var drive WCHAR = *(*WCHAR)(unsafe.Pointer(nativePath))

				if int32(drive) >= 'a' {
					drive = WCHAR(int32(drive) - ('a' - 'A'))
					*(*WCHAR)(unsafe.Pointer(nativePath)) = drive
				}
				XTcl_DStringAppend(tls, bp, nativePath,
					(*Tcl_DString)(unsafe.Pointer(bp+216)).Flength)
			} else {
				var checkDots uintptr = uintptr(0)

				if int32(*(*int8)(unsafe.Pointer(lastValidPathEnd + 1))) == '.' {
					checkDots = lastValidPathEnd + uintptr(1)
					for checkDots < currentPathEndPosition {
						if int32(*(*int8)(unsafe.Pointer(checkDots))) != '.' {
							checkDots = uintptr(0)
							break
						}
						checkDots++
					}
				}
				if checkDots != uintptr(0) {
					var dotLen int32 = int32((int64(currentPathEndPosition) - int64(lastValidPathEnd)) / 1)

					// Path is just dots. We shouldn't really ever see a path
					// like that. However, to be nice we at least don't mangle
					// the path - we just add the dots as a path segment and
					// continue.

					XTcl_DStringAppend(tls, bp, nativePath+
						uintptr((*Tcl_DString)(unsafe.Pointer(bp+216)).Flength)-
						uintptr(uint64(dotLen)*uint64(unsafe.Sizeof(WCHAR(0)))),
						int32(uint64(dotLen)*uint64(unsafe.Sizeof(WCHAR(0)))))
				} else {
					// Normal path.

					// var fData WIN32_FIND_DATAW at bp+468, 592

					var handle HANDLE

					handle = libc.XFindFirstFileW(tls, nativePath, bp+468)
					if handle == libc.UintptrFromInt64(int64(-1)) {
						// This is usually the '/' in 'c:/' at end of string.

						XTcl_DStringAppend(tls, bp, wtext+498,
							int32(unsafe.Sizeof(WCHAR(0))))
					} else {
						var nativeName uintptr

						if int32(*(*WCHAR)(unsafe.Pointer(bp + 468 + 44))) != 0 {
							nativeName = bp + 468 + 44
						} else {
							nativeName = bp + 468 + 564
						}
						libc.XFindClose(tls, handle)
						XTcl_DStringAppend(tls, bp, wtext+498,
							int32(unsafe.Sizeof(WCHAR(0))))
						XTcl_DStringAppend(tls, bp,
							nativeName,
							int32(libc.Xwcslen(tls, nativeName)*Size_t(unsafe.Sizeof(WCHAR(0)))))
					}
				}
			}
			XTcl_DStringFree(tls, bp+216)
			lastValidPathEnd = currentPathEndPosition
			if int32(cur) == 0 {
				break
			}

			// If we get here, we've got past one directory delimiter, so we
			// know it is no longer a drive.

			isDrive = 0
		}
		currentPathEndPosition++

	}

	// Common code path for all Windows platforms.

	nextCheckpoint = int32((int64(currentPathEndPosition) - int64(path)) / 1)
	if lastValidPathEnd != uintptr(0) {
		// Concatenate the normalized string in dsNorm with the tail of the
		// path which we didn't recognise. The string in dsNorm is in the
		// native encoding, so we have to convert it to Utf.

		XTcl_WinTCharToUtf(tls, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring,
			(*Tcl_DString)(unsafe.Pointer(bp)).Flength, bp+216)
		nextCheckpoint = (*Tcl_DString)(unsafe.Pointer(bp + 216)).Flength
		if int32(*(*int8)(unsafe.Pointer(lastValidPathEnd))) != 0 {
			// Not the end of the string.

			// var len int32 at bp+1060, 4

			var tmpPathPtr uintptr

			tmpPathPtr = XTcl_NewStringObj(tls, (*Tcl_DString)(unsafe.Pointer(bp+216)).Fstring,
				nextCheckpoint)
			XTcl_AppendToObj(tls, tmpPathPtr, lastValidPathEnd, -1)
			path = XTcl_GetStringFromObj(tls, tmpPathPtr, bp+1060)
			XTcl_SetStringObj(tls, pathPtr, path, *(*int32)(unsafe.Pointer(bp + 1060 /* len */)))
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = tmpPathPtr
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		} else {
			// End of string was reached above.

			XTcl_SetStringObj(tls, pathPtr, (*Tcl_DString)(unsafe.Pointer(bp+216)).Fstring, nextCheckpoint)
		}
		XTcl_DStringFree(tls, bp+216)
	}
	XTcl_DStringFree(tls, bp)

	// This must be done after we are totally finished with 'path' as we are
	// sharing the same underlying string.

	if temp != uintptr(0) {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = temp
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}

	return nextCheckpoint
}

//---------------------------------------------------------------------------
//
// TclWinVolumeRelativeNormalize --
//
//	Only Windows has volume-relative paths. These paths are rather rare,
//	but it is nice if Tcl can handle them. It is much better if we can
//	handle them here, rather than in the native fs code, because we really
//	need to have a real absolute path just below.
//
//	We do not let this block compile on non-Windows platforms because the
//	test suite's manual forcing of tclPlatform can otherwise cause this
//	code path to be executed, causing various errors because
//	volume-relative paths really do not exist.
//
// Results:
//	A valid normalized path.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclWinVolumeRelativeNormalize(tls *libc.TLS, interp uintptr, path uintptr, useThisCwdPtr uintptr) uintptr { /* tclWinFile.c:2867:9: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var absolutePath uintptr
	var useThisCwd uintptr

	useThisCwd = XTcl_FSGetCwd(tls, interp)
	if useThisCwd == uintptr(0) {
		return uintptr(0)
	}

	if int32(*(*int8)(unsafe.Pointer(path))) == '/' {
		// Path of form /foo/bar which is a path in the root directory of the
		// current volume.

		var drive uintptr = XTcl_GetString(tls, useThisCwd)

		absolutePath = XTcl_NewStringObj(tls, drive, 2)
		XTcl_AppendToObj(tls, absolutePath, path, -1)
		(*Tcl_Obj)(unsafe.Pointer(absolutePath)).FrefCount++

		// We have a refCount on the cwd.
	} else {
		// Path of form C:foo/bar, but this only makes sense if the cwd is
		// also on drive C.

		// var cwdLen int32 at bp, 4

		var drive uintptr = XTcl_GetStringFromObj(tls, useThisCwd, bp)
		var drive_cur int8 = *(*int8)(unsafe.Pointer(path))

		if int32(drive_cur) >= 'a' {
			drive_cur = int8(int32(drive_cur) - ('a' - 'A'))
		}
		if int32(*(*int8)(unsafe.Pointer(drive))) == int32(drive_cur) {
			absolutePath = XTcl_DuplicateObj(tls, useThisCwd)

			// We have a refCount on the cwd, which we will release later.

			if int32(*(*int8)(unsafe.Pointer(drive + uintptr(*(*int32)(unsafe.Pointer(bp))-1)))) != '/' && int32(*(*int8)(unsafe.Pointer(path + 2))) != 0 {
				// Only add a trailing '/' if needed, which is if there isn't
				// one already, and if we are going to be adding some more
				// characters.

				XTcl_AppendToObj(tls, absolutePath, ts+6377, 1)
			}
		} else {
			for ok := true; ok; ok = 0 != 0 {
				var _objPtr uintptr = useThisCwd
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			useThisCwd = uintptr(0)

			// The path is not in the current drive, but is volume-relative.
			// The way Tcl 8.3 handles this is that it treats such a path as
			// relative to the root of the drive. We therefore behave the same
			// here. This behaviour is, however, different to that of the
			// windows command-line. If we want to fix this at some point in
			// the future (at the expense of a behaviour change to Tcl), we
			// could use the '_dgetdcwd' Win32 API to get the drive's cwd.

			absolutePath = XTcl_NewStringObj(tls, path, 2)
			XTcl_AppendToObj(tls, absolutePath, ts+6377, 1)
		}
		(*Tcl_Obj)(unsafe.Pointer(absolutePath)).FrefCount++
		XTcl_AppendToObj(tls, absolutePath, path+uintptr(2), -1)
	}
	*(*uintptr)(unsafe.Pointer(useThisCwdPtr)) = useThisCwd
	return absolutePath
}

//---------------------------------------------------------------------------
//
// TclpNativeToNormalized --
//
//	Convert native format to a normalized path object, with refCount of
//	zero.
//
//	Currently assumes all native paths are actually normalized already, so
//	if the path given is not normalized this will actually just convert to
//	a valid string path, but not necessarily a normalized one.
//
// Results:
//	A valid normalized path.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclpNativeToNormalized(tls *libc.TLS, clientData ClientData) uintptr { /* tclWinFile.c:2970:9: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var ds Tcl_DString at bp, 216

	var objPtr uintptr
	var len int32
	var copy uintptr
	var p uintptr

	XTcl_WinTCharToUtf(tls, clientData, -1, bp)
	copy = (*Tcl_DString)(unsafe.Pointer(bp)).Fstring
	len = (*Tcl_DString)(unsafe.Pointer(bp)).Flength

	// Certain native path representations on Windows have this special prefix
	// to indicate that they are to be treated specially. For example
	// extremely long paths, or symlinks.

	if int32(*(*int8)(unsafe.Pointer(copy))) == '\\' {
		if 0 == libc.Xstrncmp(tls, copy, ts+68498, uint64(4)) {
			copy += uintptr(4)
			len = len - 4
		} else if 0 == libc.Xstrncmp(tls, copy, ts+68503, uint64(4)) {
			copy += uintptr(4)
			len = len - 4
		}
	}

	// Ensure we are using forward slashes only.

	for p = copy; int32(*(*int8)(unsafe.Pointer(p))) != 0; p++ {
		if int32(*(*int8)(unsafe.Pointer(p))) == '\\' {
			*(*int8)(unsafe.Pointer(p)) = int8('/')
		}
	}

	objPtr = XTcl_NewStringObj(tls, copy, len)
	XTcl_DStringFree(tls, bp)

	return objPtr
}

//---------------------------------------------------------------------------
//
// TclNativeCreateNativeRep --
//
//	Create a native representation for the given path.
//
// Results:
//	The nativePath representation.
//
// Side effects:
//	Memory will be allocated. The path might be normalized.
//
//---------------------------------------------------------------------------

func XTclNativeCreateNativeRep(tls *libc.TLS, pathPtr uintptr) ClientData { /* tclWinFile.c:3032:1: */
	var nativePathPtr uintptr
	var str uintptr
	var validPathPtr uintptr
	var len Size_t
	var wp uintptr
	nativePathPtr = uintptr(0)

	if !(XTclFSCwdIsNative(tls) != 0) {
		goto __1
	}
	// The cwd is native, which means we can use the translated path
	// without worrying about normalization (this will also usually be
	// shorter so the utf-to-external conversion will be somewhat faster).

	validPathPtr = XTcl_FSGetTranslatedPath(tls, uintptr(0), pathPtr)
	if !(validPathPtr == uintptr(0)) {
		goto __3
	}
	return uintptr(0)
__3:
	;

	// refCount of validPathPtr was already incremented in
	// Tcl_FSGetTranslatedPath
	goto __2
__1:
	// Make sure the normalized path is set.

	validPathPtr = XTcl_FSGetNormalizedPath(tls, uintptr(0), pathPtr)
	if !(validPathPtr == uintptr(0)) {
		goto __4
	}
	return uintptr(0)
__4:
	;

	// validPathPtr returned from Tcl_FSGetNormalizedPath is owned by Tcl,
	// so incr refCount here

	(*Tcl_Obj)(unsafe.Pointer(validPathPtr)).FrefCount++
__2:
	;

	str = XTcl_GetString(tls, validPathPtr)
	len = Size_t((*Tcl_Obj)(unsafe.Pointer(validPathPtr)).Flength)

	if !(libc.Xstrlen(tls, str) != len) {
		goto __5
	}
	// String contains NUL-bytes. This is invalid.

	goto done
__5:
	;

	// For a reserved device, strip a possible postfix ':'

	len = Size_t(sWinIsReserved(tls, str))
	if !(len == uint64(0)) {
		goto __6
	}
	// Let MultiByteToWideChar check for other invalid sequences, like
	// 0xC0 0x80 (== overlong NUL). See bug [3118489]: NUL in filenames

	len = Size_t(libc.XMultiByteToWideChar(tls, uint32(CP_UTF8), uint32(MB_ERR_INVALID_CHARS), str, -1, uintptr(0), 0))
	if !(len == uint64(0)) {
		goto __7
	}
	goto done
__7:
	;
__6:
	;

	// Overallocate 6 chars, making some room for extended paths

	wp = libc.AssignUintptr(&nativePathPtr, XTcl_Alloc(tls, uint32((len+uint64(6))*Size_t(unsafe.Sizeof(WCHAR(0))))))
	if !(nativePathPtr == uintptr(0)) {
		goto __8
	}
	goto done
__8:
	;
	libc.XMultiByteToWideChar(tls, uint32(CP_UTF8), uint32(MB_ERR_INVALID_CHARS), str, -1, nativePathPtr,
		int32(len+uint64(2)))
	*(*WCHAR)(unsafe.Pointer(nativePathPtr + uintptr(len)*2)) = WCHAR(0)

	// If path starts with "//?/" or "\\?\" (extended path), translate any
	// slashes to backslashes but leave the '?' intact

	if !((int32(*(*int8)(unsafe.Pointer(str))) == '\\' || int32(*(*int8)(unsafe.Pointer(str))) == '/') && (int32(*(*int8)(unsafe.Pointer(str + 1))) == '\\' || int32(*(*int8)(unsafe.Pointer(str + 1))) == '/') &&
		int32(*(*int8)(unsafe.Pointer(str + 2))) == '?' && (int32(*(*int8)(unsafe.Pointer(str + 3))) == '\\' || int32(*(*int8)(unsafe.Pointer(str + 3))) == '/')) {
		goto __9
	}
	*(*WCHAR)(unsafe.Pointer(wp)) = libc.AssignPtrUint16(wp+1*2, libc.AssignPtrUint16(wp+3*2, WCHAR('\\')))
	str += uintptr(4)
	wp += 2 * uintptr(4)
__9:
	;

	// If there is no "\\?\" prefix but there is a drive or UNC path prefix
	// and the path is larger than MAX_PATH chars, no Win32 API function can
	// handle that unless it is prefixed with the extended path prefix. See:
	// <https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maxpath>

	if !((int32(*(*int8)(unsafe.Pointer(str))) >= 'A' && int32(*(*int8)(unsafe.Pointer(str))) <= 'Z' || int32(*(*int8)(unsafe.Pointer(str))) >= 'a' && int32(*(*int8)(unsafe.Pointer(str))) <= 'z') &&
		int32(*(*int8)(unsafe.Pointer(str + 1))) == ':') {
		goto __10
	}
	if !(wp == nativePathPtr && len > uint64(MAX_PATH) &&
		(int32(*(*int8)(unsafe.Pointer(str + 2))) == '\\' || int32(*(*int8)(unsafe.Pointer(str + 2))) == '/')) {
		goto __12
	}
	libc.Xmemmove(tls, wp+uintptr(4)*2, wp, len*Size_t(unsafe.Sizeof(WCHAR(0))))
	libc.Xmemcpy(tls, wp, wtext+430, uint64(4)*uint64(unsafe.Sizeof(WCHAR(0))))
	wp += 2 * uintptr(4)
__12:
	;

	// If (remainder of) path starts with "<drive>:", leave the ':'
	// intact.

	wp += 2 * uintptr(2)
	goto __11
__10:
	if !(wp == nativePathPtr && len > uint64(MAX_PATH) &&
		(int32(*(*int8)(unsafe.Pointer(str))) == '\\' || int32(*(*int8)(unsafe.Pointer(str))) == '/') &&
		(int32(*(*int8)(unsafe.Pointer(str + 1))) == '\\' || int32(*(*int8)(unsafe.Pointer(str + 1))) == '/') && int32(*(*int8)(unsafe.Pointer(str + 2))) != '?') {
		goto __13
	}
	libc.Xmemmove(tls, wp+uintptr(6)*2, wp, len*Size_t(unsafe.Sizeof(WCHAR(0))))
	libc.Xmemcpy(tls, wp, wtext+502, uint64(7)*uint64(unsafe.Sizeof(WCHAR(0))))
	wp += 2 * uintptr(7)
__13:
	;
__11:
	;

	// In the remainder of the path, translate invalid characters to
	// characters in the Unicode private use area.

__14:
	if !(int32(*(*WCHAR)(unsafe.Pointer(wp))) != 0) {
		goto __15
	}
	if !(int32(*(*WCHAR)(unsafe.Pointer(wp))) < ' ' || libc.Xwcschr(tls, wtext+518, *(*WCHAR)(unsafe.Pointer(wp))) != 0) {
		goto __16
	}
	*(*WCHAR)(unsafe.Pointer(wp)) |= WCHAR(0xF000)
	goto __17
__16:
	if !(int32(*(*WCHAR)(unsafe.Pointer(wp))) == '/') {
		goto __18
	}
	*(*WCHAR)(unsafe.Pointer(wp)) = WCHAR('\\')
__18:
	;
__17:
	;
	wp += 2
	goto __14
__15:
	;

done:
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(validPathPtr)).FrefCount, 1) > 1) {
		goto __19
	}
	goto __20
__19:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(validPathPtr)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(validPathPtr)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __21
	}

	if !((*Tcl_Obj)(unsafe.Pointer(validPathPtr)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(validPathPtr)).Fbytes != XtclEmptyStringRep) {
		goto __23
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(validPathPtr)).Fbytes)
__23:
	;
	(*Tcl_Obj)(unsafe.Pointer(validPathPtr)).Flength = -1
__24:
	;
	*(*uintptr)(unsafe.Pointer(validPathPtr + 32)) = XtclFreeObjList
	XtclFreeObjList = validPathPtr
	goto __25
__25:
	if 0 != 0 {
		goto __24
	}
	goto __26
__26:
	;
	goto __22
__21:
	XTclFreeObj(tls, validPathPtr)
__22:
	;
__20:
	;

	return nativePathPtr
}

//---------------------------------------------------------------------------
//
// TclNativeDupInternalRep --
//
//	Duplicate the native representation.
//
// Results:
//	The copied native representation, or NULL if it is not possible to
//	copy the representation.
//
// Side effects:
//	Memory allocation for the copy.
//
//---------------------------------------------------------------------------

func XTclNativeDupInternalRep(tls *libc.TLS, clientData ClientData) ClientData { /* tclWinFile.c:3194:1: */
	var copy uintptr
	var len Size_t

	if clientData == uintptr(0) {
		return uintptr(0)
	}

	len = uint64(unsafe.Sizeof(WCHAR(0))) * (libc.Xwcslen(tls, clientData) + uint64(1))

	copy = XTcl_Alloc(tls, uint32(len))
	libc.Xmemcpy(tls, copy, clientData, len)
	return copy
}

//---------------------------------------------------------------------------
//
// TclpUtime --
//
//	Set the modification date for a file.
//
// Results:
//	0 on success, -1 on error.
//
// Side effects:
//	Sets errno to a representation of any Windows problem that's observed
//	in the process.
//
//---------------------------------------------------------------------------

func XTclpUtime(tls *libc.TLS, pathPtr uintptr, tval uintptr) int32 { /* tclWinFile.c:3229:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var res int32 = 0
	var fileHandle HANDLE
	var native uintptr
	var attr DWORD = DWORD(0)
	var flags DWORD = DWORD(FILE_ATTRIBUTE_NORMAL)
	// var lastAccessTime FILETIME at bp, 8

	// var lastModTime FILETIME at bp+8, 8

	sFromCTime(tls, (*Utimbuf)(unsafe.Pointer(tval)).Factime, bp)
	sFromCTime(tls, (*Utimbuf)(unsafe.Pointer(tval)).Fmodtime, bp+8)

	native = XTcl_FSGetNativePath(tls, pathPtr)

	attr = libc.XGetFileAttributesW(tls, native)

	if attr != libc.Uint32(libc.Uint32FromInt32(-1)) && attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 {
		flags = DWORD(FILE_FLAG_BACKUP_SEMANTICS)
	}

	// We use the native APIs (not 'utime') because there are some daylight
	// savings complications that utime gets wrong.

	fileHandle = libc.XCreateFileW(tls, native, uint32(0x0100), uint32(0), uintptr(0),
		uint32(OPEN_EXISTING), flags, uintptr(0))

	if fileHandle == libc.UintptrFromInt64(int64(-1)) || !(libc.XSetFileTime(tls, fileHandle, uintptr(0), bp, bp+8) != 0) {
		XTclWinConvertError(tls, libc.XGetLastError(tls))
		res = -1
	}
	if fileHandle != libc.UintptrFromInt64(int64(-1)) {
		libc.XCloseHandle(tls, fileHandle)
	}
	return res
}

//---------------------------------------------------------------------------
//
// TclWinFileOwned --
//
//	Returns 1 if the specified file exists and is owned by the current
//      user and 0 otherwise. Like the Unix case, the check is made using
//      the real process SID, not the effective (impersonation) one.
//
//---------------------------------------------------------------------------

func XTclWinFileOwned(tls *libc.TLS, pathPtr uintptr) int32 { /* tclWinFile.c:3283:1: */
	bp := tls.Alloc(28)
	defer tls.Free(28)

	var native uintptr
	*(*PSID)(unsafe.Pointer(bp /* ownerSid */)) = uintptr(0)
	*(*PSECURITY_DESCRIPTOR)(unsafe.Pointer(bp + 8 /* secd */)) = uintptr(0)
	// var token HANDLE at bp+16, 8

	var buf LPBYTE = uintptr(0)
	// var bufsz DWORD at bp+24, 4

	var owned int32 = 0

	native = XTcl_FSGetNativePath(tls, pathPtr)

	if libc.XGetNamedSecurityInfoW(tls, native, SE_FILE_OBJECT,
		uint32(0x00000001), bp, uintptr(0), uintptr(0), uintptr(0),
		bp+8) != DWORD(0) {
		// Either not a file, or we do not have access to it in which case we
		// are in all likelihood not the owner.

		return 0
	}

	// Getting the current process SID is a multi-step process.  We make the
	// assumption that if a call fails, this process is so underprivileged it
	// could not possibly own anything. Normally a process can *always* look
	// up its own token.

	if libc.XOpenProcessToken(tls, libc.XGetCurrentProcess(tls), uint32(0x0008), bp+16) != 0 {
		// Find out how big the buffer needs to be.

		*(*DWORD)(unsafe.Pointer(bp + 24 /* bufsz */)) = DWORD(0)
		libc.XGetTokenInformation(tls, *(*HANDLE)(unsafe.Pointer(bp + 16 /* token */)), TokenUser, uintptr(0), uint32(0), bp+24)
		if *(*DWORD)(unsafe.Pointer(bp + 24)) != 0 {
			buf = XTcl_Alloc(tls, uint32(*(*DWORD)(unsafe.Pointer(bp + 24))))
			if libc.XGetTokenInformation(tls, *(*HANDLE)(unsafe.Pointer(bp + 16)), TokenUser, buf, *(*DWORD)(unsafe.Pointer(bp + 24)), bp+24) != 0 {
				owned = libc.XEqualSid(tls, *(*PSID)(unsafe.Pointer(bp /* ownerSid */)), (*X_TOKEN_USER)(unsafe.Pointer(buf)).FUser.FSid)
			}
		}
		libc.XCloseHandle(tls, *(*HANDLE)(unsafe.Pointer(bp + 16 /* token */)))
	}

	// Free allocations and be done.

	if *(*PSECURITY_DESCRIPTOR)(unsafe.Pointer(bp + 8)) != 0 {
		libc.XLocalFree(tls, *(*PSECURITY_DESCRIPTOR)(unsafe.Pointer(bp + 8 /* secd */))) // Also frees ownerSid
	}
	if buf != 0 {
		XTclpFree(tls, buf)
	}

	return libc.Bool32(owned != 0) // Convert non-0 to 1
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER within this package.

// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// GetUserNameW() is found in advapi32.dll

// The following declaration is a workaround for some Microsoft brain damage.
// The SYSTEM_INFO structure is different in various releases, even though the
// layout is the same. So we overlay our own structure on top of it so we can
// access the interesting slots in a uniform way.

type OemId = struct {
	FwProcessorArchitecture WORD
	FwReserved              WORD
} /* tclWinInit.c:36:3 */

// The following macros are missing from some versions of winnt.h.

// Windows version dependend functions
var XtclWinProcs TclWinProcs /* tclWinInit.c:83:13: */

// The following arrays contain the human readable strings for the
// processor values.

var processors = [15]uintptr{
	ts + 68508, ts + 68514, ts + 1774, ts + 68519, ts + 68523, ts + 68527, ts + 68531, ts + 68536, ts + 68544,
	ts + 68549, ts + 68555, ts + 68569, ts + 68577, ts + 68583, ts + 68598,
}                                                    /* tclWinInit.c:91:19 */
var defaultLibraryDir = ProcessGlobalValue{Fproc: 0} /* tclWinInit.c:101:27 */
var sourceLibraryDir = ProcessGlobalValue{Fproc: 0}  /* tclWinInit.c:105:27 */

//---------------------------------------------------------------------------
//
// TclpInitPlatform --
//
//	Initialize all the platform-dependent things like signals,
//	floating-point error handling and sockets.
//
//	Called at process initialization time.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func XTclpInitPlatform(tls *libc.TLS) { /* tclWinInit.c:136:1: */
	bp := tls.Alloc(408)
	defer tls.Free(408)

	// var wsaData WSADATA at bp, 408

	var wVersionRequested WORD = WORD(int32(uint8(uint64(2)&uint64(0xff))) | int32(int32(WORD(uint8(uint64(2)&uint64(0xff)))))<<8)
	var handle HMODULE

	XtclPlatform = TCL_PLATFORM_WINDOWS

	// Initialize the winsock library. On Windows XP and higher this
	// can never fail.
	libc.XWSAStartup(tls, wVersionRequested, bp)

	// If we are in a statically linked executable, then we need to explicitly
	// initialize the Windows function tables here since DllMain() will not be
	// invoked.

	XTclWinInit(tls, libc.XGetModuleHandleW(tls, uintptr(0)))

	// Fill available functions depending on windows version
	handle = libc.XGetModuleHandleW(tls, wtext+534)
	XtclWinProcs.FcancelSynchronousIo = libc.XGetProcAddress(tls, handle,
		ts+68612)
	XtclWinProcs.FcreateSymbolicLink = libc.XGetProcAddress(tls, handle,
		ts+68632)
}

//-------------------------------------------------------------------------
//
// TclpInitLibraryPath --
//
//	This is the fallback routine that sets the library path if the
//	application has not set one by the first time it is needed.
//
// Results:
//	None.
//
// Side effects:
//	Sets the library path to an initial value.
//
//-------------------------------------------------------------------------

func XTclpInitLibraryPath(tls *libc.TLS, valuePtr uintptr, lengthPtr uintptr, encodingPtr uintptr) { /* tclWinInit.c:190:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var pathPtr uintptr
	// var installLib [64]int8 at bp+8, 64

	var bytes uintptr

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		pathPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(pathPtr)).FtypePtr = uintptr(0)
	{
	}

	// Initialize the substring used when locating the script library. The
	// installLib variable computes the script library path relative to the
	// installed DLL.

	libc.Xsprintf(tls, bp+8, ts+68652, libc.VaList(bp, ts+7128))

	// Look for the library relative to the TCL_LIBRARY env variable. If the
	// last dirname in the TCL_LIBRARY path does not match the last dirname in
	// the installLib variable, use the last dir name of installLib in
	// addition to the orginal TCL_LIBRARY path.

	sAppendEnvironment(tls, pathPtr, bp+8)

	// Look for the library in its default location.

	XTcl_ListObjAppendElement(tls, uintptr(0), pathPtr,
		XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&defaultLibraryDir))))

	// Look for the library in its source checkout location.

	XTcl_ListObjAppendElement(tls, uintptr(0), pathPtr,
		XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&sourceLibraryDir))))

	*(*Tcl_Encoding)(unsafe.Pointer(encodingPtr)) = uintptr(0)
	bytes = XTcl_GetStringFromObj(tls, pathPtr, lengthPtr)
	*(*uintptr)(unsafe.Pointer(valuePtr)) = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(lengthPtr))+1))
	libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(valuePtr)), bytes, uint64(*(*int32)(unsafe.Pointer(lengthPtr))+1))
	for ok1 := true; ok1; ok1 = 0 != 0 {
		var _objPtr uintptr = pathPtr
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			XTclFreeObj(tls, _objPtr)
		}
	}
}

//---------------------------------------------------------------------------
//
// AppendEnvironment --
//
//	Append the value of the TCL_LIBRARY environment variable onto the path
//	pointer. If the env variable points to another version of tcl (e.g.
//	"tcl7.6") also append the path to this version (e.g.,
//	"tcl7.6/../tcl8.2")
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sAppendEnvironment(tls *libc.TLS, pathPtr uintptr, lib uintptr) { /* tclWinInit.c:260:1: */
	bp := tls.Alloc(1528)
	defer tls.Free(1528)

	// var pathc int32 at bp+1300, 4

	// var wBuf [260]WCHAR at bp, 520

	// var buf [780]int8 at bp+520, 780

	var objPtr uintptr
	// var ds Tcl_DString at bp+1312, 216

	// var pathv uintptr at bp+1304, 8

	var shortlib uintptr

	// The shortlib value needs to be the tail component of the lib path. For
	// example, "lib/tcl8.4" -> "tcl8.4" while "usr/share/tcl8.5" -> "tcl8.5".

	for shortlib = lib + uintptr(libc.Xstrlen(tls, lib)-uint64(1)); shortlib > lib; shortlib-- {
		if int32(*(*int8)(unsafe.Pointer(shortlib))) == '/' {
			if Size_t((int64(shortlib)-int64(lib))/1) == libc.Xstrlen(tls, lib)-uint64(1) {
				XTcl_Panic(tls, ts+68662, 0)
			}
			shortlib++
			break
		}
	}
	if shortlib == lib {
		XTcl_Panic(tls, ts+68698, 0)
	}

	// The "L" preceeding the TCL_LIBRARY string is used to tell VC++ that
	// this is a unicode string.

	if libc.XGetEnvironmentVariableW(tls, wtext+552, bp, uint32(MAX_PATH)) == DWORD(0) {
		*(*int8)(unsafe.Pointer(bp + 520)) = int8(0)
		libc.XGetEnvironmentVariableA(tls, ts+68728, bp+520, uint32(MAX_PATH))
	} else {
		sToUtf(tls, bp, bp+520)
	}

	if int32(*(*int8)(unsafe.Pointer(bp + 520))) != 0 {
		objPtr = XTcl_NewStringObj(tls, bp+520, -1)
		XTcl_ListObjAppendElement(tls, uintptr(0), pathPtr, objPtr)

		XTclWinNoBackslash(tls, bp+520)
		XTcl_SplitPath(tls, bp+520, bp+1300, bp+1304)

		// The lstrcmpiA() will work even if pathv[pathc-1] is random UTF-8
		// chars because I know shortlib is ascii.

		if *(*int32)(unsafe.Pointer(bp + 1300)) > 0 && libc.XlstrcmpiA(tls, shortlib, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1304)) + uintptr(*(*int32)(unsafe.Pointer(bp + 1300))-1)*8))) != 0 {
			// TCL_LIBRARY is set but refers to a different tcl installation
			// than the current version. Try fiddling with the specified
			// directory to make it refer to this installation by removing the
			// old "tclX.Y" and substituting the current version string.

			*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1304 /* pathv */)) + uintptr(*(*int32)(unsafe.Pointer(bp + 1300))-1)*8)) = shortlib
			XTcl_DStringInit(tls, bp+1312)
			XTcl_JoinPath(tls, *(*int32)(unsafe.Pointer(bp + 1300 /* pathc */)), *(*uintptr)(unsafe.Pointer(bp + 1304 /* pathv */)), bp+1312)
			objPtr = XTclDStringToObj(tls, bp+1312)
		} else {
			objPtr = XTcl_NewStringObj(tls, bp+520, -1)
		}
		XTcl_ListObjAppendElement(tls, uintptr(0), pathPtr, objPtr)
		XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 1304)))
	}
}

//---------------------------------------------------------------------------
//
// InitializeDefaultLibraryDir --
//
//	Locate the Tcl script library default location relative to the
//	location of the Tcl DLL.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sInitializeDefaultLibraryDir(tls *libc.TLS, valuePtr uintptr, lengthPtr uintptr, encodingPtr uintptr) { /* tclWinInit.c:352:1: */
	bp := tls.Alloc(1628)
	defer tls.Free(1628)

	var hModule HMODULE = XTclWinGetTclInstance(tls)
	// var wName [324]WCHAR at bp+8, 648

	// var name [972]int8 at bp+656, 972

	var end uintptr
	var p uintptr

	if libc.XGetModuleFileNameW(tls, hModule, bp+8, uint32(uint64(unsafe.Sizeof([324]WCHAR{}))/uint64(unsafe.Sizeof(WCHAR(0))))) == DWORD(0) {
		libc.XGetModuleFileNameA(tls, hModule, bp+656, uint32(unsafe.Sizeof([972]int8{})))
	} else {
		sToUtf(tls, bp+8, bp+656)
	}

	end = libc.Xstrrchr(tls, bp+656, '\\')
	*(*int8)(unsafe.Pointer(end)) = int8(0)
	p = libc.Xstrrchr(tls, bp+656, '\\')
	if p != uintptr(0) {
		end = p
	}
	*(*int8)(unsafe.Pointer(end)) = int8('\\')

	XTclWinNoBackslash(tls, bp+656)
	libc.Xsprintf(tls, end+uintptr(1), ts+68652, libc.VaList(bp, ts+7128))
	*(*int32)(unsafe.Pointer(lengthPtr)) = int32(libc.Xstrlen(tls, bp+656))
	*(*uintptr)(unsafe.Pointer(valuePtr)) = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(lengthPtr))+1))
	*(*Tcl_Encoding)(unsafe.Pointer(encodingPtr)) = uintptr(0)
	libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(valuePtr)), bp+656, uint64(*(*int32)(unsafe.Pointer(lengthPtr))+1))
}

//---------------------------------------------------------------------------
//
// InitializeSourceLibraryDir --
//
//	Locate the Tcl script library default location relative to the
//	location of the Tcl DLL as it exists in the build output directory
//	associated with the source checkout.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sInitializeSourceLibraryDir(tls *libc.TLS, valuePtr uintptr, lengthPtr uintptr, encodingPtr uintptr) { /* tclWinInit.c:403:1: */
	bp := tls.Alloc(1620)
	defer tls.Free(1620)

	var hModule HMODULE = XTclWinGetTclInstance(tls)
	// var wName [324]WCHAR at bp, 648

	// var name [972]int8 at bp+648, 972

	var end uintptr
	var p uintptr

	if libc.XGetModuleFileNameW(tls, hModule, bp, uint32(uint64(unsafe.Sizeof([324]WCHAR{}))/uint64(unsafe.Sizeof(WCHAR(0))))) == DWORD(0) {
		libc.XGetModuleFileNameA(tls, hModule, bp+648, uint32(unsafe.Sizeof([972]int8{})))
	} else {
		sToUtf(tls, bp, bp+648)
	}

	end = libc.Xstrrchr(tls, bp+648, '\\')
	*(*int8)(unsafe.Pointer(end)) = int8(0)
	p = libc.Xstrrchr(tls, bp+648, '\\')
	if p != uintptr(0) {
		end = p
	}
	*(*int8)(unsafe.Pointer(end)) = int8('\\')

	XTclWinNoBackslash(tls, bp+648)
	libc.Xsprintf(tls, end+uintptr(1), ts+68740, 0)
	*(*int32)(unsafe.Pointer(lengthPtr)) = int32(libc.Xstrlen(tls, bp+648))
	*(*uintptr)(unsafe.Pointer(valuePtr)) = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(lengthPtr))+1))
	*(*Tcl_Encoding)(unsafe.Pointer(encodingPtr)) = uintptr(0)
	libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(valuePtr)), bp+648, uint64(*(*int32)(unsafe.Pointer(lengthPtr))+1))
}

//---------------------------------------------------------------------------
//
// ToUtf --
//
//	Convert a wchar string to a UTF string.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//---------------------------------------------------------------------------

func sToUtf(tls *libc.TLS, wSrc uintptr, dst uintptr) { /* tclWinInit.c:453:1: */
	for int32(*(*WCHAR)(unsafe.Pointer(wSrc))) != 0 {
		dst += uintptr(XTcl_UniCharToUtf(tls, int32(*(*WCHAR)(unsafe.Pointer(wSrc))), dst))
		wSrc += 2
	}
	*(*int8)(unsafe.Pointer(dst)) = int8(0)
}

//---------------------------------------------------------------------------
//
// TclpSetInitialEncodings --
//
//	Based on the locale, determine the encoding of the operating system
//	and the default encoding for newly opened files.
//
//	Called at process initialization time, and part way through startup,
//	we verify that the initial encodings were correctly setup. Depending
//	on Tcl's environment, there may not have been enough information first
//	time through (above).
//
// Results:
//	None.
//
// Side effects:
//	The Tcl library path is converted from native encoding to UTF-8, on
//	the first call, and the encodings may be changed on first or second
//	call.
//
//---------------------------------------------------------------------------

func XTclpSetInitialEncodings(tls *libc.TLS) { /* tclWinInit.c:490:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	// var encodingName Tcl_DString at bp, 216

	XTcl_SetSystemEncoding(tls, uintptr(0),
		XTcl_GetEncodingNameFromEnvironment(tls, bp))
	XTcl_DStringFree(tls, bp)
}

func XTclWinSetInterfaces(tls *libc.TLS, dummy int32) { /* tclWinInit.c:499:6: */
	_ = dummy
}

func XTcl_GetEncodingNameFromEnvironment(tls *libc.TLS, bufPtr uintptr) uintptr { /* tclWinInit.c:505:12: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var acp UINT = libc.XGetACP(tls)

	XTcl_DStringInit(tls, bufPtr)
	if acp == UINT(CP_UTF8) {
		XTcl_DStringAppend(tls, bufPtr, ts+26553, 5)
	} else {
		XTcl_DStringSetLength(tls, bufPtr, 2+TCL_INTEGER_SPACE)
		libc.XwsprintfA(tls, (*Tcl_DString)(unsafe.Pointer(bufPtr)).Fstring, ts+67566, libc.VaList(bp, libc.XGetACP(tls)))
		XTcl_DStringSetLength(tls, bufPtr, int32(libc.Xstrlen(tls, (*Tcl_DString)(unsafe.Pointer(bufPtr)).Fstring)))
	}
	return (*Tcl_DString)(unsafe.Pointer(bufPtr)).Fstring
}

func XTclpGetUserName(tls *libc.TLS, bufferPtr uintptr) uintptr { /* tclWinInit.c:522:12: */
	bp := tls.Alloc(520)
	defer tls.Free(520)

	XTcl_DStringInit(tls, bufferPtr)

	if XTclGetEnv(tls, ts+68751, bufferPtr) == uintptr(0) {
		// var szUserName [257]WCHAR at bp, 514

		*(*DWORD)(unsafe.Pointer(bp + 516 /* cchUserNameLen */)) = DWORD(UNLEN)

		if !(libc.XGetUserNameW(tls, bp, bp+516) != 0) {
			return uintptr(0)
		}
		*(*DWORD)(unsafe.Pointer(bp + 516 /* cchUserNameLen */))--
		*(*DWORD)(unsafe.Pointer(bp + 516 /* cchUserNameLen */)) *= uint32(uint64(unsafe.Sizeof(WCHAR(0))))
		XTcl_WinTCharToUtf(tls, bp, int32(*(*DWORD)(unsafe.Pointer(bp + 516 /* cchUserNameLen */))), bufferPtr)
	}
	return (*Tcl_DString)(unsafe.Pointer(bufferPtr)).Fstring
}

//---------------------------------------------------------------------------
//
// TclpSetVariables --
//
//	Performs platform-specific interpreter initialization related to the
//	tcl_platform and env variables, and other platform-specific things.
//
// Results:
//	None.
//
// Side effects:
//	Sets "tcl_platform", and "env(HOME)" Tcl variables.
//
//----------------------------------------------------------------------

func XTclpSetVariables(tls *libc.TLS, interp uintptr) { /* tclWinInit.c:561:1: */
	bp := tls.Alloc(328)
	defer tls.Free(328)

	var ptr uintptr
	// var buffer [48]int8 at bp+64, 48

	// var sys struct {Finfo SYSTEM_INFO;} at bp+16, 48

	// var ds Tcl_DString at bp+112, 216

	XTcl_SetVar2Ex(tls, interp, ts+43637, uintptr(0),
		XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&defaultLibraryDir))), TCL_GLOBAL_ONLY)

	if !(osInfoInitialized != 0) {
		var handle HMODULE = libc.XGetModuleHandleW(tls, wtext+576)
		var getversion uintptr = libc.XGetProcAddress(tls, handle, ts+68760)
		osInfo.FdwOSVersionInfoSize = DWORD(unsafe.Sizeof(OSVERSIONINFOW{}))
		if !(getversion != 0) || (*struct {
			f func(*libc.TLS, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{getversion})).f(tls, uintptr(unsafe.Pointer(&osInfo))) != 0 {
			libc.XGetVersionExW(tls, uintptr(unsafe.Pointer(&osInfo)))
		}
		osInfoInitialized = 1
	}
	libc.XGetSystemInfo(tls, bp+16)

	// Define the tcl_platform array.

	XTcl_SetVar2(tls, interp, ts+7016, ts+34561, ts+68774,
		TCL_GLOBAL_ONLY)
	XTcl_SetVar2(tls, interp, ts+7016, ts+43611,
		ts+68782, TCL_GLOBAL_ONLY)
	libc.XwsprintfA(tls, bp+64, ts+68793, libc.VaList(bp, osInfo.FdwMajorVersion, osInfo.FdwMinorVersion))
	XTcl_SetVar2(tls, interp, ts+7016, ts+43614, bp+64, TCL_GLOBAL_ONLY)
	if int32((*OemId)(unsafe.Pointer(bp+16)).FwProcessorArchitecture) < NUMPROCESSORS {
		XTcl_SetVar2(tls, interp, ts+7016, ts+43624,
			processors[(*OemId)(unsafe.Pointer(bp+16)).FwProcessorArchitecture],
			TCL_GLOBAL_ONLY)
	}

	// Set up the HOME environment variable from the HOMEDRIVE & HOMEPATH
	// environment variables, if necessary.

	XTcl_DStringInit(tls, bp+112)
	ptr = XTcl_GetVar2(tls, interp, ts+27835, ts+27852, TCL_GLOBAL_ONLY)
	if ptr == uintptr(0) {
		ptr = XTcl_GetVar2(tls, interp, ts+27835, ts+68799, TCL_GLOBAL_ONLY)
		if ptr != uintptr(0) {
			XTcl_DStringAppend(tls, bp+112, ptr, -1)
		}
		ptr = XTcl_GetVar2(tls, interp, ts+27835, ts+68809, TCL_GLOBAL_ONLY)
		if ptr != uintptr(0) {
			XTcl_DStringAppend(tls, bp+112, ptr, -1)
		}
		if (*Tcl_DString)(unsafe.Pointer(bp+112)).Flength > 0 {
			XTcl_SetVar2(tls, interp, ts+27835, ts+27852, (*Tcl_DString)(unsafe.Pointer(bp+112)).Fstring,
				TCL_GLOBAL_ONLY)
		} else {
			XTcl_SetVar2(tls, interp, ts+27835, ts+27852, ts+68818, TCL_GLOBAL_ONLY)
		}
	}

	// Initialize the user name from the environment first, since this is much
	// faster than asking the system.
	// Note: cchUserNameLen is number of characters including nul terminator.

	ptr = XTclpGetUserName(tls, bp+112)
	XTcl_SetVar2(tls, interp, ts+7016, ts+43632, func() uintptr {
		if ptr != 0 {
			return ptr
		}
		return ts + 2631 /* "" */
	}(),
		TCL_GLOBAL_ONLY)
	XTcl_DStringFree(tls, bp+112)

	// Define what the platform PATH separator is. [TIP #315]

	XTcl_SetVar2(tls, interp, ts+7016, ts+68822, ts+68836, TCL_GLOBAL_ONLY)
}

var osInfo OSVERSIONINFOW       /* tclWinInit.c:570:27: */
var osInfoInitialized int32 = 0 /* tclWinInit.c:571:16 */

//----------------------------------------------------------------------
//
// TclpFindVariable --
//
//	Locate the entry in environ for a given name. On Unix this routine is
//	case sensitive, on Windows this matches mixed case.
//
// Results:
//	The return value is the index in environ of an entry with the name
//	"name", or -1 if there is no such entry. The integer at *lengthPtr is
//	filled in with the length of name (if a matching entry is found) or
//	the length of the environ array (if no matching entry is found).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpFindVariable(tls *libc.TLS, name uintptr, lengthPtr uintptr) int32 { /* tclWinInit.c:681:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var i int32
	var length int32
	var result int32
	var env uintptr
	var p1 uintptr
	var p2 uintptr
	var envUpper uintptr
	var nameUpper uintptr
	// var envString Tcl_DString at bp, 216
	result = -1

	// Convert the name to all upper case for the case insensitive comparison.

	length = int32(libc.Xstrlen(tls, name))
	nameUpper = XTcl_Alloc(tls, uint32(length+1))
	libc.Xmemcpy(tls, nameUpper, name, uint64(length+1))
	XTcl_UtfToUpper(tls, nameUpper)

	XTcl_DStringInit(tls, bp)
	i = 0
	env = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(i)*8))
__1:
	if !(env != uintptr(0)) {
		goto __3
	}
	// Chop the env string off after the equal sign, then Convert the name
	// to all upper case, so we do not have to convert all the characters
	// after the equal sign.

	envUpper = XTcl_WinTCharToUtf(tls, env, -1, bp)
	p1 = libc.Xstrchr(tls, envUpper, '=')
	if !(p1 == uintptr(0)) {
		goto __4
	}
	goto __2
__4:
	;
	length = int32((int64(p1) - int64(envUpper)) / 1)
	XTcl_DStringSetLength(tls, bp, length+1)
	XTcl_UtfToUpper(tls, envUpper)

	p1 = envUpper
	p2 = nameUpper
__5:
	if !(int32(*(*int8)(unsafe.Pointer(p2))) == int32(*(*int8)(unsafe.Pointer(p1)))) {
		goto __7
	}
	// NULL loop body.
	goto __6
__6:
	p1++
	p2++
	goto __5
	goto __7
__7:
	;
	if !(int32(*(*int8)(unsafe.Pointer(p1))) == '=' && int32(*(*int8)(unsafe.Pointer(p2))) == 0) {
		goto __8
	}
	*(*int32)(unsafe.Pointer(lengthPtr)) = length
	result = i
	goto done
__8:
	;

	XTcl_DStringFree(tls, bp)
	goto __2
__2:
	i++
	env = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(libc.X__imp__wenviron)) + uintptr(i)*8))
	goto __1
	goto __3
__3:
	;

	*(*int32)(unsafe.Pointer(lengthPtr)) = i

done:
	XTcl_DStringFree(tls, bp)
	XTclpFree(tls, nameUpper)
	return result
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Native name of the directory in the native filesystem where DLLs used in
// this process are copied prior to loading, and mutex used to protect its
// allocation.

var dllDirectoryName uintptr = uintptr(0) /* tclWinLoad.c:22:14 */
var dllDirectoryNameMutex Tcl_Mutex       /* tclWinLoad.c:23:18: */

//----------------------------------------------------------------------
//
// TclpDlopen --
//
//	Dynamically loads a binary code file into memory and returns a handle
//	to the new code.
//
// Results:
//	A standard Tcl completion code. If an error occurs, an error message
//	is left in the interp's result.
//
// Side effects:
//	New code suddenly appears in memory.
//
//----------------------------------------------------------------------

func XTclpDlopen(tls *libc.TLS, interp uintptr, pathPtr uintptr, loadHandle uintptr, unloadProcPtr uintptr, flags int32) int32 { /* tclWinLoad.c:53:1: */
	bp := tls.Alloc(368)
	defer tls.Free(368)

	var hInstance HINSTANCE
	var nativeName uintptr
	var handlePtr Tcl_LoadHandle
	var firstError DWORD
	// Let the OS loader examine the binary search path for whatever
	// string the user gave us which hopefully refers to a file on the
	// binary path.

	// var ds Tcl_DString at bp+152, 216

	var lastError DWORD
	var errMsg uintptr
	hInstance = uintptr(0)
	_ = flags

	// First try the full path the user gave us. This is particularly
	// important if the cwd is inside a vfs, and we are trying to load using a
	// relative path.

	nativeName = XTcl_FSGetNativePath(tls, pathPtr)
	if !(nativeName != uintptr(0)) {
		goto __1
	}
	hInstance = libc.XLoadLibraryExW(tls, nativeName, uintptr(0),
		uint32(LOAD_WITH_ALTERED_SEARCH_PATH))
__1:
	;
	if !(hInstance == uintptr(0)) {
		goto __2
	}

	// Remember the first error on load attempt to be used if the
	// second load attempt below also fails.
	if nativeName == uintptr(0) {
		firstError = uint32(126)
	} else {
		firstError = libc.XGetLastError(tls)
	}

	nativeName = XTcl_WinUtfToTChar(tls, XTcl_GetString(tls, pathPtr), -1, bp+152)
	hInstance = libc.XLoadLibraryExW(tls, nativeName, uintptr(0),
		uint32(LOAD_WITH_ALTERED_SEARCH_PATH))
	XTcl_DStringFree(tls, bp+152)
__2:
	;

	if !(hInstance == uintptr(0)) {
		goto __3
	}

	// We choose to only use the error from the second call if the first
	// call failed due to the file not being found. Else stick to the
	// first error for reporting purposes.
	if !(firstError == DWORD(126) || firstError == DWORD(1157)) {
		goto __4
	}
	lastError = libc.XGetLastError(tls)
	goto __5
__4:
	lastError = firstError
__5:
	;

	errMsg = XTcl_ObjPrintf(tls, ts+68838,
		libc.VaList(bp, XTcl_GetString(tls, pathPtr)))

	// Check for possible DLL errors. This doesn't work quite right,
	// because Windows seems to only return ERROR_MOD_NOT_FOUND for just
	// about any problem, but it's better than nothing. It'd be even
	// better if there was a way to get what DLLs

	if !(interp != 0) {
		goto __6
	}
	switch lastError {
	case DWORD(126):
		goto __8
	case DWORD(1157):
		goto __9
	case DWORD(127):
		goto __10
	case DWORD(1154):
		goto __11
	case DWORD(1114):
		goto __12
	case DWORD(193):
		goto __13
	default:
		goto __14
	}
	goto __7
__8:
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+68867, ts+68876, uintptr(0)))
	goto notFoundMsg
__9:
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+68867, ts+68890, uintptr(0)))
notFoundMsg:
	XTcl_AppendToObj(tls, errMsg,
		ts+68904, -1)
	goto __7
__10:
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+56, ts+68867, ts+68975, uintptr(0)))
	XTcl_AppendToObj(tls, errMsg,

		ts+68990, -1)
	goto __7
__11:
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+68867, ts+69113, uintptr(0)))
	XTcl_AppendToObj(tls, errMsg,
		ts+69125, -1)
	goto __7
__12:
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+68867, ts+69172, uintptr(0)))
	XTcl_AppendToObj(tls, errMsg,
		ts+69188, -1)
	goto __7
__13:
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+128, ts+68867, ts+69230, uintptr(0)))
	XTcl_AppendToObj(tls, errMsg, ts+69245, -1)
	goto __7
__14:
	XTclWinConvertError(tls, lastError)
	XTcl_AppendToObj(tls, errMsg, XTcl_PosixError(tls, interp), -1)
__7:
	;
	XTcl_SetObjResult(tls, interp, errMsg)
__6:
	;
	return TCL_ERROR
__3:
	;

	// Succeded; package everything up for Tcl.

	handlePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(Tcl_LoadHandle_{})))
	(*Tcl_LoadHandle_)(unsafe.Pointer(handlePtr)).FclientData = hInstance
	(*Tcl_LoadHandle_)(unsafe.Pointer(handlePtr)).FfindSymbolProcPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, Tcl_LoadHandle, uintptr) uintptr
	}{sFindSymbol}))
	(*Tcl_LoadHandle_)(unsafe.Pointer(handlePtr)).FunloadFileProcPtr = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, Tcl_LoadHandle)
	}{sUnloadFile}))
	*(*Tcl_LoadHandle)(unsafe.Pointer(loadHandle)) = handlePtr
	*(*uintptr)(unsafe.Pointer(unloadProcPtr)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, Tcl_LoadHandle)
	}{sUnloadFile}))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// FindSymbol --
//
//	Looks up a symbol, by name, through a handle associated with a
//	previously loaded piece of code (shared library).
//
// Results:
//	Returns a pointer to the function associated with 'symbol' if it is
//	found. Otherwise returns NULL and may leave an error message in the
//	interp's result.
//
//----------------------------------------------------------------------

func sFindSymbol(tls *libc.TLS, interp uintptr, loadHandle Tcl_LoadHandle, symbol uintptr) uintptr { /* tclWinLoad.c:199:13: */
	bp := tls.Alloc(264)
	defer tls.Free(264)

	var hInstance HINSTANCE = (*Tcl_LoadHandle_)(unsafe.Pointer(loadHandle)).FclientData
	var proc uintptr = uintptr(0)

	// For each symbol, check for both Symbol and _Symbol, since Borland
	// generates C symbols with a leading '_' by default.

	proc = libc.XGetProcAddress(tls, hInstance, symbol)
	if proc == uintptr(0) {
		// var ds Tcl_DString at bp+48, 216

		var sym2 uintptr

		XTcl_DStringInit(tls, bp+48)
		XTcl_DStringAppend(tls, bp+48, ts+69292, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
		sym2 = XTcl_DStringAppend(tls, bp+48, symbol, -1)
		proc = libc.XGetProcAddress(tls, hInstance, sym2)
		XTcl_DStringFree(tls, bp+48)
	}
	if proc == uintptr(0) && interp != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+69294, libc.VaList(bp, symbol)))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7699, ts+69318, symbol, uintptr(0)))
	}
	return proc
}

//----------------------------------------------------------------------
//
// UnloadFile --
//
//	Unloads a dynamically loaded binary code file from memory. Code
//	pointers in the formerly loaded file are no longer valid after calling
//	this function.
//
// Results:
//	None.
//
// Side effects:
//	Code removed from memory.
//
//----------------------------------------------------------------------

func sUnloadFile(tls *libc.TLS, loadHandle Tcl_LoadHandle) { /* tclWinLoad.c:251:1: */
	var hInstance HINSTANCE = (*Tcl_LoadHandle_)(unsafe.Pointer(loadHandle)).FclientData

	libc.XFreeLibrary(tls, hInstance)
	XTclpFree(tls, loadHandle)
}

//----------------------------------------------------------------------
//
// TclGuessPackageName --
//
//	If the "load" command is invoked without providing a package name,
//	this function is invoked to try to figure it out.
//
// Results:
//	Always returns 0 to indicate that we couldn't figure out a package
//	name; generic code will then try to guess the package from the file
//	name. A return value of 1 would have meant that we figured out the
//	package name and put it in bufPtr.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclGuessPackageName(tls *libc.TLS, fileName uintptr, bufPtr uintptr) int32 { /* tclWinLoad.c:283:1: */
	_ = fileName
	_ = bufPtr

	return 0
}

//----------------------------------------------------------------------
//
// TclpTempFileNameForLibrary --
//
//	Constructs a temporary file name for loading a shared object (DLL).
//
// Results:
//	Returns the constructed file name.
//
// On Windows, a DLL is identified by the final component of its path name.
// Cross linking among DLL's (and hence, preloading) will not work unless this
// name is preserved when copying a DLL from a VFS to a temp file for
// preloading. For this reason, all DLLs in a given process are copied to a
// temp directory, and their names are preserved.
//
//----------------------------------------------------------------------

func XTclpTempFileNameForLibrary(tls *libc.TLS, interp uintptr, path uintptr) uintptr { /* tclWinLoad.c:314:9: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var fileName uintptr // Name of the temp file.
	var tail uintptr     // Tail of the source path.

	if dllDirectoryName == uintptr(0) {
		if sInitDLLDirectoryName(tls) == TCL_ERROR {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+69330,
				libc.VaList(bp, XTcl_PosixError(tls, interp))))

			return uintptr(0)
		}
	}

	// Now we know where to put temporary DLLs, construct the name.

	fileName = XTclpNativeToNormalized(tls, dllDirectoryName)
	tail = XTclPathPart(tls, interp, path, TCL_PATH_TAIL)
	if tail == uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = fileName
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		return uintptr(0)
	}
	XTcl_AppendToObj(tls, fileName, ts+6377, 1)
	XTcl_AppendObjToObj(tls, fileName, tail)
	return fileName
}

//----------------------------------------------------------------------
//
// InitDLLDirectoryName --
//
//	Helper for TclpTempFileNameForLibrary; builds a temporary directory
//	that is specific to the current process. Should only be called once
//	per process start. Caller must hold dllDirectoryNameMutex.
//
// Results:
//	Tcl result code.
//
// Side-effects:
//	Creates temp directory.
//	Allocates memory pointed to by dllDirectoryName.
//
//----------------------------------------------------------------------
// [Candidate for process global?]

func sInitDLLDirectoryName(tls *libc.TLS) int32 { /* tclWinLoad.c:370:1: */
	bp := tls.Alloc(528)
	defer tls.Free(528)

	var nameLen Size_t // Length of the temp folder name.
	// var name [260]WCHAR at bp+8, 520
	// Path name of the temp folder.
	var id DWORD        // The process id.
	var lastError DWORD // Last error to happen in Win API.
	var i int32

	// Determine the name of the directory to use, and create it.  (Keep
	// trying with new names until an attempt to create the directory
	// succeeds)

	nameLen = Size_t(libc.XGetTempPathW(tls, uint32(MAX_PATH), bp+8))
	if !(nameLen >= uint64(MAX_PATH-12)) {
		goto __1
	}
	XTcl_SetErrno(tls, ENAMETOOLONG)
	return TCL_ERROR
__1:
	;

	libc.Xwcscpy(tls, bp+8+uintptr(nameLen)*2, wtext+588)
	nameLen = nameLen + uint64(11)

	id = libc.XGetCurrentProcessId(tls)
	lastError = DWORD(183)

	i = 0
__2:
	if !(i < 256) {
		goto __4
	}
	libc.XwsprintfW(tls, bp+8+uintptr(nameLen)*2-uintptr(8)*2, wtext+612, libc.VaList(bp, id))
	if !(libc.XCreateDirectoryW(tls, bp+8, uintptr(0)) != 0) {
		goto __5
	}
	// Issue: we don't schedule this directory for deletion by anyone.
	// Can we ask the OS to do this for us?  There appears to be
	// potential for using CreateFile (with the flag
	// FILE_FLAG_BACKUP_SEMANTICS) and RemoveDirectory to do this...

	goto copyToGlobalBuffer
__5:
	;
	lastError = libc.XGetLastError(tls)
	if !(lastError != DWORD(183)) {
		goto __6
	}
	goto __4
__6:
	;
	id = id * DWORD(16777619)
	goto __3
__3:
	i++
	goto __2
	goto __4
__4:
	;

	XTclWinConvertError(tls, lastError)
	return TCL_ERROR

	// Store our computed value in the global.

copyToGlobalBuffer:
	dllDirectoryName = XTcl_Alloc(tls, uint32((nameLen+uint64(1))*Size_t(unsafe.Sizeof(WCHAR(0)))))
	libc.Xwcscpy(tls, dllDirectoryName, bp+8)
	return TCL_OK
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The follwing static indicates whether this module has been initialized.

// The following static structure contains the state information for the
// Windows implementation of the Tcl notifier. One of these structures is
// created for each thread that is using the notifier.

type ThreadSpecificData15 = struct {
	Fcrit        CRITICAL_SECTION
	Fthread      DWORD
	F__ccgo_pad1 [4]byte
	Fevent       HANDLE
	Fpending     int32
	F__ccgo_pad2 [4]byte
	Fhwnd        HWND
	Ftimeout     int32
	FtimerActive int32
} /* tclWinNotify.c:41:3 */

var dataKey14 Tcl_ThreadDataKey /* tclWinNotify.c:43:26: */

// The following static indicates the number of threads that have initialized
// notifiers. It controls the lifetime of the TclNotifier window class.
//
// You must hold the notifierMutex lock before accessing this variable.

var notifierCount int32 = 0                                /* tclWinNotify.c:52:12 */
var classname = *(*[12]WCHAR)(unsafe.Pointer(wtext + 622)) /* tclWinNotify.c:53:20 */

//----------------------------------------------------------------------
//
// Tcl_InitNotifier --
//
//	Initializes the platform specific notifier state.
//
// Results:
//	Returns a handle to the notifier state for this thread..
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_InitNotifier(tls *libc.TLS) ClientData { /* tclWinNotify.c:80:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	if XtclNotifierHooks.FinitNotifierProc != 0 {
		return (*struct{ f func(*libc.TLS) ClientData })(unsafe.Pointer(&struct{ uintptr }{XtclNotifierHooks.FinitNotifierProc})).f(tls)
	} else {
		var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey14)), int32(unsafe.Sizeof(ThreadSpecificData15{})))
		// var windowClass WNDCLASSW at bp, 72

		// Register Notifier window class if this is the first thread to use
		// this module.

		if notifierCount == 0 {
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).Fstyle = UINT(0)
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).FcbClsExtra = 0
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).FcbWndExtra = 0
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).FhInstance = XTclWinGetTclInstance(tls)
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).FhbrBackground = uintptr(0)
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).FlpszMenuName = uintptr(0)
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).FlpszClassName = uintptr(unsafe.Pointer(&classname))
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).FlpfnWndProc = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, HWND, UINT, WPARAM, LPARAM) LRESULT
			}{sNotifierProc}))
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).FhIcon = uintptr(0)
			(*WNDCLASSW)(unsafe.Pointer(bp /* &windowClass */)).FhCursor = uintptr(0)

			if !(libc.XRegisterClassW(tls, bp) != 0) {
				XTcl_Panic(tls, ts+69370, 0)
			}
		}
		notifierCount++

		(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fpending = 0
		(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).FtimerActive = 0

		libc.XInitializeCriticalSection(tls, tsdPtr)

		(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd = uintptr(0)
		(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fthread = libc.XGetCurrentThreadId(tls)
		(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fevent = libc.XCreateEventW(tls, uintptr(0), TRUE,
			FALSE, uintptr(0))

		return tsdPtr
	}
	return ClientData(0)
}

//----------------------------------------------------------------------
//
// Tcl_FinalizeNotifier --
//
//	This function is called to cleanup the notifier state before a thread
//	is terminated.
//
// Results:
//	None.
//
// Side effects:
//	May dispose of the notifier window and class.
//
//----------------------------------------------------------------------

func XTcl_FinalizeNotifier(tls *libc.TLS, clientData ClientData) { /* tclWinNotify.c:145:1: */
	if XtclNotifierHooks.FfinalizeNotifierProc != 0 {
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{XtclNotifierHooks.FfinalizeNotifierProc})).f(tls, clientData)
		return
	} else {
		var tsdPtr uintptr = clientData

		// Only finalize the notifier if a notifier was installed in the
		// current thread; there is a route in which this is not guaranteed to
		// be true (when tclWin32Dll.c:DllMain() is called with the flag
		// DLL_PROCESS_DETACH by the OS, which could be doing so from a thread
		// that's never previously been involved with Tcl, e.g. the task
		// manager) so this check is important.
		//
		// Fixes Bug #217982 reported by Hugh Vu and Gene Leache.

		if tsdPtr == uintptr(0) {
			return
		}

		libc.XDeleteCriticalSection(tls, tsdPtr)
		libc.XCloseHandle(tls, (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fevent)

		// Clean up the timer and messaging window for this thread.

		if (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd != 0 {
			libc.XKillTimer(tls, (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd, uint64(INTERVAL_TIMER))
			libc.XDestroyWindow(tls, (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd)
		}

		// If this is the last thread to use the notifier, unregister the
		// notifier window class.

		notifierCount--
		if notifierCount == 0 {
			libc.XUnregisterClassW(tls, uintptr(unsafe.Pointer(&classname)), XTclWinGetTclInstance(tls))
		}

	}
}

//----------------------------------------------------------------------
//
// Tcl_AlertNotifier --
//
//	Wake up the specified notifier from any thread. This routine is called
//	by the platform independent notifier code whenever the Tcl_ThreadAlert
//	routine is called. This routine is guaranteed not to be called on a
//	given notifier after Tcl_FinalizeNotifier is called for that notifier.
//	This routine is typically called from a thread other than the
//	notifier's thread.
//
// Results:
//	None.
//
// Side effects:
//	Sends a message to the messaging window for the notifier if there
//	isn't already one pending.
//
//----------------------------------------------------------------------

func XTcl_AlertNotifier(tls *libc.TLS, clientData ClientData) { /* tclWinNotify.c:218:1: */
	if XtclNotifierHooks.FalertNotifierProc != 0 {
		(*struct{ f func(*libc.TLS, ClientData) })(unsafe.Pointer(&struct{ uintptr }{XtclNotifierHooks.FalertNotifierProc})).f(tls, clientData)
		return
	} else {
		var tsdPtr uintptr = clientData

		// Note that we do not need to lock around access to the hwnd because
		// the race condition has no effect since any race condition implies
		// that the notifier thread is already awake.

		if (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd != 0 {
			// We do need to lock around access to the pending flag.

			libc.XEnterCriticalSection(tls, tsdPtr)
			if !((*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fpending != 0) {
				libc.XPostMessageW(tls, (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER), uint64(0), int64(0))
			}
			(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fpending = 1
			libc.XLeaveCriticalSection(tls, tsdPtr)
		} else {
			libc.XSetEvent(tls, (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fevent)
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_SetTimer --
//
//	This procedure sets the current notifier timer value. The notifier
//	will ensure that Tcl_ServiceAll() is called after the specified
//	interval, even if no events have occurred.
//
// Results:
//	None.
//
// Side effects:
//	Replaces any previous timer.
//
//----------------------------------------------------------------------

func XTcl_SetTimer(tls *libc.TLS, timePtr uintptr) { /* tclWinNotify.c:269:1: */
	if XtclNotifierHooks.FsetTimerProc != 0 {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{XtclNotifierHooks.FsetTimerProc})).f(tls, timePtr)
		return
	} else {
		var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey14)), int32(unsafe.Sizeof(ThreadSpecificData15{})))
		var timeout UINT

		// We only need to set up an interval timer if we're being called from
		// an external event loop. If we don't have a window handle then we
		// just return immediately and let Tcl_WaitForEvent handle timeouts.

		if !(int32((*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd) != 0) {
			return
		}

		if !(timePtr != 0) {
			timeout = UINT(0)
		} else {
			// Make sure we pass a non-zero value into the timeout argument.
			// Windows seems to get confused by zero length timers.

			timeout = UINT((*Tcl_Time)(unsafe.Pointer(timePtr)).Fsec*1000 + (*Tcl_Time)(unsafe.Pointer(timePtr)).Fusec/1000)
			if timeout == UINT(0) {
				timeout = UINT(1)
			}
		}
		(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Ftimeout = int32(timeout)
		if timeout != UINT(0) {
			(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).FtimerActive = 1
			libc.XSetTimer(tls, (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd, uint64(INTERVAL_TIMER),
				uint32(uint32((*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Ftimeout)), uintptr(0))
		} else {
			(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).FtimerActive = 0
			libc.XKillTimer(tls, (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd, uint64(INTERVAL_TIMER))
		}
	}
}

//----------------------------------------------------------------------
//
// Tcl_ServiceModeHook --
//
//	This function is invoked whenever the service mode changes.
//
// Results:
//	None.
//
// Side effects:
//	If this is the first time the notifier is set into TCL_SERVICE_ALL,
//	then the communication window is created.
//
//----------------------------------------------------------------------

func XTcl_ServiceModeHook(tls *libc.TLS, mode int32) { /* tclWinNotify.c:332:1: */
	if XtclNotifierHooks.FserviceModeHookProc != 0 {
		(*struct{ f func(*libc.TLS, int32) })(unsafe.Pointer(&struct{ uintptr }{XtclNotifierHooks.FserviceModeHookProc})).f(tls, mode)
		return
	} else {
		var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey14)), int32(unsafe.Sizeof(ThreadSpecificData15{})))

		// If this is the first time that the notifier has been used from a
		// modal loop, then create a communication window. Note that after this
		// point, the application needs to service events in a timely fashion
		// or Windows will hang waiting for the window to respond to
		// synchronous system messages. At some point, we may want to consider
		// destroying the window if we leave the modal loop, but for now we'll
		// leave it around.

		if mode == TCL_SERVICE_ALL && !(int32((*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd) != 0) {
			(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fhwnd = libc.XCreateWindowExW(tls, DWORD(0), uintptr(unsafe.Pointer(&classname)), uintptr(unsafe.Pointer(&classname)), uint32(0x00000000), 0, 0, 0, 0, uintptr(0), uintptr(0), XTclWinGetTclInstance(tls), uintptr(0))

			// Send an initial message to the window to ensure that we wake up
			// the notifier once we get into the modal loop. This will force
			// the notifier to recompute the timeout value and schedule a timer
			// if one is needed.

			XTcl_AlertNotifier(tls, tsdPtr)
		}
	}
}

//----------------------------------------------------------------------
//
// NotifierProc --
//
//	This procedure is invoked by Windows to process events on the notifier
//	window. Messages will be sent to this window in response to external
//	timer events or calls to TclpAlertTsdPtr->
//
// Results:
//	A standard windows result.
//
// Side effects:
//	Services any pending events.
//
//----------------------------------------------------------------------

func sNotifierProc(tls *libc.TLS, hwnd HWND, message UINT, wParam WPARAM, lParam LPARAM) LRESULT { /* tclWinNotify.c:388:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey14)), int32(unsafe.Sizeof(ThreadSpecificData15{})))

	if message == UINT(WM_USER) {
		libc.XEnterCriticalSection(tls, tsdPtr)
		(*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fpending = 0
		libc.XLeaveCriticalSection(tls, tsdPtr)
	} else if message != UINT(WM_TIMER) {
		return libc.XDefWindowProcW(tls, hwnd, message, wParam, lParam)
	}

	// Process all of the runnable events.

	XTcl_ServiceAll(tls)
	return int64(0)
}

//----------------------------------------------------------------------
//
// Tcl_WaitForEvent --
//
//	This function is called by Tcl_DoOneEvent to wait for new events on
//	the message queue. If the block time is 0, then Tcl_WaitForEvent just
//	polls the event queue without blocking.
//
// Results:
//	Returns -1 if a WM_QUIT message is detected, returns 1 if a message
//	was dispatched, otherwise returns 0.
//
// Side effects:
//	Dispatches a message to a window procedure, which could do anything.
//
//----------------------------------------------------------------------

func XTcl_WaitForEvent(tls *libc.TLS, timePtr uintptr) int32 { /* tclWinNotify.c:432:1: */
	bp := tls.Alloc(56)
	defer tls.Free(56)

	// TIP #233 (Virtualized Time). Convert virtual domain delay to
	// real-time.

	// var myTime Tcl_Time at bp, 8

	var tsdPtr uintptr
	// var msg MSG at bp+8, 48

	var timeout DWORD
	var result DWORD
	var status int32
	if !(XtclNotifierHooks.FwaitForEventProc != 0) {
		goto __1
	}
	return (*struct {
		f func(*libc.TLS, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{XtclNotifierHooks.FwaitForEventProc})).f(tls, timePtr)
	goto __2
__1:
	tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey14)), int32(unsafe.Sizeof(ThreadSpecificData15{})))

	// Compute the timeout in milliseconds.

	if !(timePtr != 0) {
		goto __3
	}

	(*Tcl_Time)(unsafe.Pointer(bp /* &myTime */)).Fsec = (*Tcl_Time)(unsafe.Pointer(timePtr)).Fsec
	(*Tcl_Time)(unsafe.Pointer(bp /* &myTime */)).Fusec = (*Tcl_Time)(unsafe.Pointer(timePtr)).Fusec

	if !((*Tcl_Time)(unsafe.Pointer(bp)).Fsec != 0 || (*Tcl_Time)(unsafe.Pointer(bp)).Fusec != 0) {
		goto __5
	}
	(*struct {
		f func(*libc.TLS, uintptr, ClientData)
	})(unsafe.Pointer(&struct{ uintptr }{XtclScaleTimeProcPtr})).f(tls, bp /* &myTime */, XtclTimeClientData)
__5:
	;

	timeout = DWORD((*Tcl_Time)(unsafe.Pointer(bp)).Fsec*1000 + (*Tcl_Time)(unsafe.Pointer(bp)).Fusec/1000)
	goto __4
__3:
	timeout = INFINITE
__4:
	;

	// Check to see if there are any messages in the queue before waiting
	// because MsgWaitForMultipleObjects will not wake up if there are
	// events currently sitting in the queue.

	if !!(libc.XPeekMessageW(tls, bp+8, uintptr(0), uint32(0), uint32(0), uint32(PM_NOREMOVE)) != 0) {
		goto __6
	}
	// Wait for something to happen (a signal from another thread, a
	// message, or timeout) or loop servicing asynchronous procedure
	// calls queued to this thread.

again:
	result = libc.XMsgWaitForMultipleObjectsEx(tls, uint32(1), tsdPtr+48, timeout,
		uint32(QS_MOUSEMOVE|QS_MOUSEBUTTON|QS_KEY|QS_RAWINPUT|QS_POSTMESSAGE|QS_TIMER|QS_PAINT|QS_HOTKEY|QS_SENDMESSAGE), uint32(MWMO_ALERTABLE))
	if !(result == DWORD(0x000000C0)) {
		goto __7
	}
	goto again
	goto __8
__7:
	if !(result == 0xffffffff) {
		goto __9
	}
	status = -1
	goto end
__9:
	;
__8:
	;
__6:
	;

	// Check to see if there are any messages to process.

	if !(libc.XPeekMessageW(tls, bp+8, uintptr(0), uint32(0), uint32(0), uint32(PM_NOREMOVE)) != 0) {
		goto __10
	}
	// Retrieve and dispatch the first message.

	result = DWORD(libc.XGetMessageW(tls, bp+8, uintptr(0), uint32(0), uint32(0)))
	if !(result == DWORD(0)) {
		goto __12
	}
	// We received a request to exit this thread (WM_QUIT), so
	// propagate the quit message and start unwinding.

	libc.XPostQuitMessage(tls, int32((*MSG)(unsafe.Pointer(bp+8 /* &msg */)).FwParam))
	status = -1
	goto __13
__12:
	if !(result == libc.Uint32(libc.Uint32FromInt32(-1))) {
		goto __14
	}
	// We got an error from the system. I have no idea why this
	// would happen, so we'll just unwind.

	status = -1
	goto __15
__14:
	libc.XTranslateMessage(tls, bp+8)
	libc.XDispatchMessageW(tls, bp+8)
	status = 1
__15:
	;
__13:
	;
	goto __11
__10:
	status = 0
__11:
	;

end:
	libc.XResetEvent(tls, (*ThreadSpecificData15)(unsafe.Pointer(tsdPtr)).Fevent)
	return status
__2:
	;
	return int32(0)
}

//----------------------------------------------------------------------
//
// Tcl_Sleep --
//
//	Delay execution for the specified number of milliseconds.
//
// Results:
//	None.
//
// Side effects:
//	Time passes.
//
//----------------------------------------------------------------------

func XTcl_Sleep(tls *libc.TLS, ms int32) { /* tclWinNotify.c:548:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// Simply calling 'Sleep' for the requisite number of milliseconds can
	// make the process appear to wake up early because it isn't synchronized
	// with the CPU performance counter that is used in tclWinTime.c. This
	// behavior is probably benign, but messes up some of the corner cases in
	// the test suite. We get around this problem by repeating the 'Sleep'
	// call as many times as necessary to make the clock advance by the
	// requisite amount.

	// var now Tcl_Time at bp, 8
	// Current wall clock time.
	// var desired Tcl_Time at bp+8, 8
	// Desired wakeup time.
	// var vdelay Tcl_Time at bp+16, 8
	// Time to sleep, for scaling virtual ->
	// real.
	var sleepTime DWORD // Time to sleep, real-time

	(*Tcl_Time)(unsafe.Pointer(bp + 16 /* &vdelay */)).Fsec = int32(ms / 1000)
	(*Tcl_Time)(unsafe.Pointer(bp + 16 /* &vdelay */)).Fusec = int32(ms % 1000 * 1000)

	XTcl_GetTime(tls, bp)
	(*Tcl_Time)(unsafe.Pointer(bp + 8 /* &desired */)).Fsec = (*Tcl_Time)(unsafe.Pointer(bp)).Fsec + (*Tcl_Time)(unsafe.Pointer(bp+16)).Fsec
	(*Tcl_Time)(unsafe.Pointer(bp + 8 /* &desired */)).Fusec = (*Tcl_Time)(unsafe.Pointer(bp)).Fusec + (*Tcl_Time)(unsafe.Pointer(bp+16)).Fusec
	if (*Tcl_Time)(unsafe.Pointer(bp+8)).Fusec > 1000000 {
		(*Tcl_Time)(unsafe.Pointer(bp+8 /* &desired */)).Fsec++
		*(*int32)(unsafe.Pointer(bp + 8 + 4)) -= 1000000
	}

	// TIP #233: Scale delay from virtual to real-time.

	(*struct {
		f func(*libc.TLS, uintptr, ClientData)
	})(unsafe.Pointer(&struct{ uintptr }{XtclScaleTimeProcPtr})).f(tls, bp+16 /* &vdelay */, XtclTimeClientData)
	sleepTime = DWORD((*Tcl_Time)(unsafe.Pointer(bp+16)).Fsec*1000 + (*Tcl_Time)(unsafe.Pointer(bp+16)).Fusec/1000)

	for {
		libc.XSleepEx(tls, sleepTime, TRUE)
		XTcl_GetTime(tls, bp)
		if (*Tcl_Time)(unsafe.Pointer(bp)).Fsec > (*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec {
			break
		} else if (*Tcl_Time)(unsafe.Pointer(bp)).Fsec == (*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec && (*Tcl_Time)(unsafe.Pointer(bp)).Fusec >= (*Tcl_Time)(unsafe.Pointer(bp+8)).Fusec {
			break
		}

		(*Tcl_Time)(unsafe.Pointer(bp + 16 /* &vdelay */)).Fsec = (*Tcl_Time)(unsafe.Pointer(bp+8)).Fsec - (*Tcl_Time)(unsafe.Pointer(bp)).Fsec
		(*Tcl_Time)(unsafe.Pointer(bp + 16 /* &vdelay */)).Fusec = (*Tcl_Time)(unsafe.Pointer(bp+8)).Fusec - (*Tcl_Time)(unsafe.Pointer(bp)).Fusec

		(*struct {
			f func(*libc.TLS, uintptr, ClientData)
		})(unsafe.Pointer(&struct{ uintptr }{XtclScaleTimeProcPtr})).f(tls, bp+16 /* &vdelay */, XtclTimeClientData)
		sleepTime = DWORD((*Tcl_Time)(unsafe.Pointer(bp+16)).Fsec*1000 + (*Tcl_Time)(unsafe.Pointer(bp+16)).Fusec/1000)
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The following variable is used to tell whether this module has been
// initialized.

var initialized1 int32 = 0 /* tclWinPipe.c:20:12 */

// The pipeMutex locks around access to the initialized and procList
// variables, and it is used to protect background threads from being
// terminated while they are using APIs that hold locks.

// The following defines identify the various types of applications that run
// under windows. There is special case code for the various types.

// The following constants and structures are used to encapsulate the state of
// various types of files used in a pipeline. This used to have a 1 && 2 that
// supported Win32s.

// This structure encapsulates the common state associated with all file types
// used in a pipeline.

type WinFile = struct {
	Ftype        int32
	F__ccgo_pad1 [4]byte
	Fhandle      HANDLE
} /* tclWinPipe.c:56:3 */

// This list is used to map from pids to process handles.

type ProcInfo1 = struct {
	FhProcess    HANDLE
	FdwProcessId DWORD
	F__ccgo_pad1 [4]byte
	FnextPtr     uintptr
} /* tclWinPipe.c:62:9 */

// This list is used to map from pids to process handles.

type ProcInfo = ProcInfo1 /* tclWinPipe.c:66:3 */

var procList uintptr /* tclWinPipe.c:68:17: */

// Bit masks used in the flags field of the PipeInfo structure below.

// Bit masks used in the sharedFlags field of the PipeInfo structure below.

// TODO: It appears the whole EXTRABYTE machinery is in place to support
// outdated Win 95 systems.  If this can be confirmed, much code can be
// deleted.

// This structure describes per-instance data for a pipe based channel.

type PipeInfo1 = struct {
	FnextPtr     uintptr
	Fchannel     Tcl_Channel
	FvalidMask   int32
	FwatchMask   int32
	Fflags       int32
	F__ccgo_pad1 [4]byte
	FreadFile    TclFile
	FwriteFile   TclFile
	FerrorFile   TclFile
	FnumPids     int32
	F__ccgo_pad2 [4]byte
	FpidPtr      uintptr
	FthreadId    Tcl_ThreadId
	FwriteTI     uintptr
	FreadTI      uintptr
	FwriteThread HANDLE
	FreadThread  HANDLE
	Fwritable    HANDLE
	Freadable    HANDLE
	FwriteError  DWORD
	F__ccgo_pad3 [4]byte
	FwriteBuf    uintptr
	FwriteBufLen int32
	FtoWrite     int32
	FreadFlags   int32
	FextraByte   int8
	F__ccgo_pad4 [3]byte
} /* tclWinPipe.c:94:9 */

// Bit masks used in the flags field of the PipeInfo structure below.

// Bit masks used in the sharedFlags field of the PipeInfo structure below.

// TODO: It appears the whole EXTRABYTE machinery is in place to support
// outdated Win 95 systems.  If this can be confirmed, much code can be
// deleted.

// This structure describes per-instance data for a pipe based channel.

type PipeInfo = PipeInfo1 /* tclWinPipe.c:141:3 */

type ThreadSpecificData16 = struct{ FfirstPipePtr uintptr } /* tclWinPipe.c:150:3 */

var dataKey15 Tcl_ThreadDataKey /* tclWinPipe.c:152:26: */

// The following structure is what is added to the Tcl event queue when pipe
// events are generated.

type PipeEvent = struct {
	Fheader  Tcl_Event
	FinfoPtr uintptr
} /* tclWinPipe.c:166:3 */

// This structure describes the channel type structure for command pipe based
// I/O.

var pipeChannelType = Tcl_ChannelType{
	FtypeName:         ts + 36259,
	Fversion:          uintptr(0x5),
	FcloseProc:        uintptr(1),
	FinputProc:        0, // Input proc.
	FoutputProc:       0, // Get option proc.
	FwatchProc:        0, // Set up notifier to watch the channel.
	FgetHandleProc:    0, // Get an OS handle from channel.
	Fclose2Proc:       0, // close2proc
	FblockModeProc:    0, // wide seek proc
	FthreadActionProc: 0, // truncate
} /* tclWinPipe.c:203:30 */

//----------------------------------------------------------------------
//
// PipeInit --
//
//	This function initializes the static variables for this file.
//
// Results:
//	None.
//
// Side effects:
//	Creates a new event source.
//
//----------------------------------------------------------------------

func sPipeInit(tls *libc.TLS) { /* tclWinPipe.c:240:1: */
	var tsdPtr uintptr

	// Check the initialized flag first, then check again in the mutex. This
	// is a speed enhancement.

	if !(initialized1 != 0) {

		if !(initialized1 != 0) {
			initialized1 = 1
			procList = uintptr(0)
		}

	}

	tsdPtr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey15)))
	if tsdPtr == uintptr(0) {
		tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey15)), int32(unsafe.Sizeof(ThreadSpecificData16{})))
		(*ThreadSpecificData16)(unsafe.Pointer(tsdPtr)).FfirstPipePtr = uintptr(0)
		XTcl_CreateEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{XPipeSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sPipeCheckProc})), uintptr(0))
	}
}

//----------------------------------------------------------------------
//
// TclpFinalizePipes --
//
//	This function is called from Tcl_FinalizeThread to finalize the
//	platform specific pipe subsystem.
//
// Results:
//	None.
//
// Side effects:
//	Removes the pipe event source.
//
//----------------------------------------------------------------------

func XTclpFinalizePipes(tls *libc.TLS) { /* tclWinPipe.c:284:1: */
	var tsdPtr uintptr

	tsdPtr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey15)))
	if tsdPtr != uintptr(0) {
		XTcl_DeleteEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{XPipeSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sPipeCheckProc})), uintptr(0))
	}
}

//----------------------------------------------------------------------
//
// PipeSetupProc --
//
//	This function is invoked before Tcl_DoOneEvent blocks waiting for an
//	event.
//
// Results:
//	None.
//
// Side effects:
//	Adjusts the block time if needed.
//
//----------------------------------------------------------------------

func XPipeSetupProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinPipe.c:312:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var infoPtr uintptr
	*(*Tcl_Time)(unsafe.Pointer(bp /* blockTime */)) = Tcl_Time{}
	var block int32 = 1
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey15)), int32(unsafe.Sizeof(ThreadSpecificData16{})))

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Look to see if any events are already pending.  If they are, poll.

	for infoPtr = (*ThreadSpecificData16)(unsafe.Pointer(tsdPtr)).FfirstPipePtr; infoPtr != uintptr(0); infoPtr = (*PipeInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<2) != 0 {
			if libc.XWaitForSingleObject(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Fwritable, uint32(0)) != DWORD(258) {
				block = 0
			}
		}
		if (*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 {
			if sWaitForRead1(tls, infoPtr, 0) >= 0 {
				block = 0
			}
		}
	}
	if !(block != 0) {
		XTcl_SetMaxBlockTime(tls, bp)
	}
}

//----------------------------------------------------------------------
//
// PipeCheckProc --
//
//	This function is called by Tcl_DoOneEvent to check the pipe event
//	source for events.
//
// Results:
//	None.
//
// Side effects:
//	May queue an event.
//
//----------------------------------------------------------------------

func sPipeCheckProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinPipe.c:365:1: */
	var infoPtr uintptr
	var evPtr uintptr
	var needEvent int32
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey15)), int32(unsafe.Sizeof(ThreadSpecificData16{})))

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Queue events for any ready pipes that don't already have events queued.

	for infoPtr = (*ThreadSpecificData16)(unsafe.Pointer(tsdPtr)).FfirstPipePtr; infoPtr != uintptr(0); infoPtr = (*PipeInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*PipeInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<0) != 0 {
			continue
		}

		// Queue an event if the pipe is signaled for reading or writing.

		needEvent = 0
		if (*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<2) != 0 && libc.XWaitForSingleObject(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Fwritable, uint32(0)) != DWORD(258) {
			needEvent = 1
		}

		if (*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 && sWaitForRead1(tls, infoPtr, 0) >= 0 {
			needEvent = 1
		}

		if needEvent != 0 {
			*(*int32)(unsafe.Pointer(infoPtr + 24)) |= int32(1) << 0
			evPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(PipeEvent{})))
			(*PipeEvent)(unsafe.Pointer(evPtr)).Fheader.Fproc = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, int32) int32
			}{sPipeEventProc}))
			(*PipeEvent)(unsafe.Pointer(evPtr)).FinfoPtr = infoPtr
			XTcl_QueueEvent(tls, evPtr, TCL_QUEUE_TAIL)
		}
	}
}

//----------------------------------------------------------------------
//
// TclWinMakeFile --
//
//	This function constructs a new TclFile from a given data and type
//	value.
//
// Results:
//	Returns a newly allocated WinFile as a TclFile.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclWinMakeFile(tls *libc.TLS, handle HANDLE) TclFile { /* tclWinPipe.c:431:1: */
	var filePtr uintptr

	filePtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(WinFile{})))
	(*WinFile)(unsafe.Pointer(filePtr)).Ftype = WIN_FILE
	(*WinFile)(unsafe.Pointer(filePtr)).Fhandle = handle

	return filePtr
}

//----------------------------------------------------------------------
//
// TempFileName --
//
//	Gets a temporary file name and deals with the fact that the temporary
//	file path provided by Windows may not actually exist if the TMP or
//	TEMP environment variables refer to a non-existent directory.
//
// Results:
//	0 if error, non-zero otherwise. If non-zero is returned, the name
//	buffer will be filled with a name that can be used to construct a
//	temporary file.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sTempFileName(tls *libc.TLS, name uintptr) int32 { /* tclWinPipe.c:464:1: */
	var prefix uintptr = wtext + 646
	if libc.XGetTempPathW(tls, uint32(MAX_PATH), name) != DWORD(0) {
		if libc.XGetTempFileNameW(tls, name, prefix, uint32(0), name) != UINT(0) {
			return 1
		}
	}
	*(*WCHAR)(unsafe.Pointer(name)) = WCHAR('.')
	*(*WCHAR)(unsafe.Pointer(name + 1*2)) = WCHAR(0)
	return int32(libc.XGetTempFileNameW(tls, name, prefix, uint32(0), name))
}

//----------------------------------------------------------------------
//
// TclpMakeFile --
//
//	Make a TclFile from a channel.
//
// Results:
//	Returns a new TclFile or NULL on failure.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpMakeFile(tls *libc.TLS, channel Tcl_Channel, direction int32) TclFile { /* tclWinPipe.c:496:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var handle HANDLE at bp, 8

	if XTcl_GetChannelHandle(tls, channel, direction,
		bp) == TCL_OK {
		return XTclWinMakeFile(tls, *(*HANDLE)(unsafe.Pointer(bp /* handle */)))
	} else {
		return uintptr(0)
	}
	return TclFile(0)
}

//----------------------------------------------------------------------
//
// TclpOpenFile --
//
//	This function opens files for use in a pipeline.
//
// Results:
//	Returns a newly allocated TclFile structure containing the file
//	handle.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpOpenFile(tls *libc.TLS, path uintptr, mode int32) TclFile { /* tclWinPipe.c:528:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var handle HANDLE
	var accessMode DWORD
	var createMode DWORD
	var shareMode DWORD
	var flags DWORD
	// var ds Tcl_DString at bp, 216

	var nativePath uintptr

	// Map the access bits to the NT access mode.

	switch mode & (X_O_RDONLY | X_O_WRONLY | X_O_RDWR) {
	case X_O_RDONLY:
		accessMode = 0x80000000
		break
	case X_O_WRONLY:
		accessMode = DWORD(0x40000000)
		break
	case X_O_RDWR:
		accessMode = 0x80000000 | uint32(0x40000000)
		break
	default:
		XTclWinConvertError(tls, uint32(1))
		return uintptr(0)
	}

	// Map the creation flags to the NT create mode.

	switch mode & (X_O_CREAT | X_O_EXCL | X_O_TRUNC) {
	case X_O_CREAT | X_O_EXCL:
		fallthrough
	case X_O_CREAT | X_O_EXCL | X_O_TRUNC:
		createMode = DWORD(CREATE_NEW)
		break
	case X_O_CREAT | X_O_TRUNC:
		createMode = DWORD(CREATE_ALWAYS)
		break
	case X_O_CREAT:
		createMode = DWORD(OPEN_ALWAYS)
		break
	case X_O_TRUNC:
		fallthrough
	case X_O_TRUNC | X_O_EXCL:
		createMode = DWORD(TRUNCATE_EXISTING)
		break
	default:
		createMode = DWORD(OPEN_EXISTING)
		break
	}

	nativePath = XTcl_WinUtfToTChar(tls, path, -1, bp)

	// If the file is not being created, use the existing file attributes.

	flags = DWORD(0)
	if !(mode&X_O_CREAT != 0) {
		flags = libc.XGetFileAttributesW(tls, nativePath)
		if flags == 0xFFFFFFFF {
			flags = DWORD(0)
		}
	}

	// Set up the file sharing mode.  We want to allow simultaneous access.

	shareMode = DWORD(FILE_SHARE_READ | FILE_SHARE_WRITE)

	// Now we get to create the file.

	handle = libc.XCreateFileW(tls, nativePath, accessMode, shareMode,
		uintptr(0), createMode, flags, uintptr(0))
	XTcl_DStringFree(tls, bp)

	if handle == libc.UintptrFromInt64(int64(-1)) {
		var err DWORD

		err = libc.XGetLastError(tls)
		if err&DWORD(0xFFFF) == DWORD(110) {
			if mode&X_O_CREAT != 0 {
				err = uint32(80)
			} else {
				err = uint32(2)
			}
		}
		XTclWinConvertError(tls, err)
		return uintptr(0)
	}

	// Seek to the end of file if we are writing.

	if mode&(X_O_WRONLY|X_O_APPEND) != 0 {
		libc.XSetFilePointer(tls, handle, 0, uintptr(0), uint32(FILE_END))
	}

	return XTclWinMakeFile(tls, handle)
}

//----------------------------------------------------------------------
//
// TclpCreateTempFile --
//
//	This function opens a unique file with the property that it will be
//	deleted when its file handle is closed. The temporary file is created
//	in the system temporary directory.
//
// Results:
//	Returns a valid TclFile, or NULL on failure.
//
// Side effects:
//	Creates a new temporary file.
//
//----------------------------------------------------------------------

func XTclpCreateTempFile(tls *libc.TLS, contents uintptr) TclFile { /* tclWinPipe.c:649:1: */
	bp := tls.Alloc(740)
	defer tls.Free(740)

	// var name [260]WCHAR at bp, 520

	var native uintptr
	// var dstring Tcl_DString at bp+520, 216

	var handle HANDLE
	// var result DWORD at bp+736, 4

	var length DWORD
	var p uintptr
	var toCopy int32

	if !(sTempFileName(tls, bp) == 0) {
		goto __1
	}
	return uintptr(0)
__1:
	;

	handle = libc.XCreateFileW(tls, bp,
		0x80000000|uint32(0x40000000), uint32(0), uintptr(0), uint32(CREATE_ALWAYS),
		uint32(FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE), uintptr(0))
	if !(handle == libc.UintptrFromInt64(int64(-1))) {
		goto __2
	}
	goto error
__2:
	;

	// Write the file out, doing line translations on the way.

	if !(contents != uintptr(0)) {
		goto __3
	}

	// Convert the contents from UTF to native encoding

	native = XTcl_UtfToExternalDString(tls, uintptr(0), contents, -1, bp+520)

	toCopy = (*Tcl_DString)(unsafe.Pointer(bp + 520)).Flength
	p = native
__4:
	if !(toCopy > 0) {
		goto __6
	}
	if !(int32(*(*int8)(unsafe.Pointer(p))) == '\n') {
		goto __7
	}
	length = DWORD((int64(p) - int64(native)) / 1)
	if !(length > DWORD(0)) {
		goto __8
	}
	if !!(libc.XWriteFile(tls, handle, native, length, bp+736, uintptr(0)) != 0) {
		goto __9
	}
	goto error
__9:
	;
__8:
	;
	if !!(libc.XWriteFile(tls, handle, ts+33828, uint32(2), bp+736, uintptr(0)) != 0) {
		goto __10
	}
	goto error
__10:
	;
	native = p + uintptr(1)
__7:
	;
	goto __5
__5:
	p++
	toCopy--
	goto __4
	goto __6
__6:
	;
	length = DWORD((int64(p) - int64(native)) / 1)
	if !(length > DWORD(0)) {
		goto __11
	}
	if !!(libc.XWriteFile(tls, handle, native, length, bp+736, uintptr(0)) != 0) {
		goto __12
	}
	goto error
__12:
	;
__11:
	;
	XTcl_DStringFree(tls, bp+520)
	if !(libc.XSetFilePointer(tls, handle, 0, uintptr(0), uint32(FILE_BEGIN)) == 0xFFFFFFFF) {
		goto __13
	}
	goto error
__13:
	;
__3:
	;

	return XTclWinMakeFile(tls, handle)

error:
	// Free the native representation of the contents if necessary.

	if !(contents != uintptr(0)) {
		goto __14
	}
	XTcl_DStringFree(tls, bp+520)
__14:
	;

	XTclWinConvertError(tls, libc.XGetLastError(tls))
	libc.XCloseHandle(tls, handle)
	libc.XDeleteFileW(tls, bp)
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclpTempFileName --
//
//	This function returns a unique filename.
//
// Results:
//	Returns a valid Tcl_Obj* with refCount 0, or NULL on failure.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpTempFileName(tls *libc.TLS) uintptr { /* tclWinPipe.c:743:9: */
	bp := tls.Alloc(520)
	defer tls.Free(520)

	// var fileName [260]WCHAR at bp, 520

	if sTempFileName(tls, bp) == 0 {
		return uintptr(0)
	}

	return XTclpNativeToNormalized(tls, bp)
}

//----------------------------------------------------------------------
//
// TclpCreatePipe --
//
//	Creates an anonymous pipe.
//
// Results:
//	Returns 1 on success, 0 on failure.
//
// Side effects:
//	Creates a pipe.
//
//----------------------------------------------------------------------

func XTclpCreatePipe(tls *libc.TLS, readPipe uintptr, writePipe uintptr) int32 { /* tclWinPipe.c:772:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var readHandle HANDLE at bp, 8

	// var writeHandle HANDLE at bp+8, 8

	if libc.XCreatePipe(tls, bp, bp+8, uintptr(0), uint32(0)) != 0 {
		*(*TclFile)(unsafe.Pointer(readPipe)) = XTclWinMakeFile(tls, *(*HANDLE)(unsafe.Pointer(bp /* readHandle */)))
		*(*TclFile)(unsafe.Pointer(writePipe)) = XTclWinMakeFile(tls, *(*HANDLE)(unsafe.Pointer(bp + 8 /* writeHandle */)))
		return 1
	}

	XTclWinConvertError(tls, libc.XGetLastError(tls))
	return 0
}

//----------------------------------------------------------------------
//
// TclpCloseFile --
//
//	Closes a pipeline file handle. These handles are created by
//	TclpOpenFile, TclpCreatePipe, or TclpMakeFile.
//
// Results:
//	0 on success, -1 on failure.
//
// Side effects:
//	The file is closed and deallocated.
//
//----------------------------------------------------------------------

func XTclpCloseFile(tls *libc.TLS, file TclFile) int32 { /* tclWinPipe.c:808:1: */
	var filePtr uintptr = file

	switch (*WinFile)(unsafe.Pointer(filePtr)).Ftype {
	case WIN_FILE:
		// Don't close the Win32 handle if the handle is a standard channel
		// during the thread exit process. Otherwise, one thread may kill the
		// stdio of another.

		if !(XTclInThreadExit(tls) != 0) ||
			libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-10))) != (*WinFile)(unsafe.Pointer(filePtr)).Fhandle &&
				libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-11))) != (*WinFile)(unsafe.Pointer(filePtr)).Fhandle &&
				libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-12))) != (*WinFile)(unsafe.Pointer(filePtr)).Fhandle {
			if (*WinFile)(unsafe.Pointer(filePtr)).Fhandle != uintptr(0) && libc.XCloseHandle(tls, (*WinFile)(unsafe.Pointer(filePtr)).Fhandle) == FALSE {
				XTclWinConvertError(tls, libc.XGetLastError(tls))
				XTclpFree(tls, filePtr)
				return -1
			}
		}
		break

	default:
		XTcl_Panic(tls, ts+69414, 0)
	}

	XTclpFree(tls, filePtr)
	return 0
}

//--------------------------------------------------------------------------
//
// TclpGetPid --
//
//	Given a HANDLE to a child process, return the process id for that
//	child process.
//
// Results:
//	Returns the process id for the child process. If the pid was not known
//	by Tcl, either because the pid was not created by Tcl or the child
//	process has already been reaped, -1 is returned.
//
// Side effects:
//	None.
//
//--------------------------------------------------------------------------

func XTclpGetPid(tls *libc.TLS, pid Tcl_Pid) int32 { /* tclWinPipe.c:862:1: */
	var infoPtr uintptr

	sPipeInit(tls)

	for infoPtr = procList; infoPtr != uintptr(0); infoPtr = (*ProcInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*ProcInfo)(unsafe.Pointer(infoPtr)).FhProcess == pid {

			return int32((*ProcInfo)(unsafe.Pointer(infoPtr)).FdwProcessId)
		}
	}

	return int32(libc.Uint32FromInt32(-1))
}

//----------------------------------------------------------------------
//
// TclpCreateProcess --
//
//	Create a child process that has the specified files as its standard
//	input, output, and error. The child process runs asynchronously under
//	Windows NT and Windows 9x, and runs with the same environment
//	variables as the creating process.
//
//	The complete Windows search path is searched to find the specified
//	executable. If an executable by the given name is not found,
//	automatically tries appending standard extensions to the
//	executable name.
//
// Results:
//	The return value is TCL_ERROR and an error message is left in the
//	interp's result if there was a problem creating the child process.
//	Otherwise, the return value is TCL_OK and *pidPtr is filled with the
//	process id of the child process.
//
// Side effects:
//	A process is created.
//
//----------------------------------------------------------------------

func XTclpCreateProcess(tls *libc.TLS, interp uintptr, argc int32, argv uintptr, inputFile TclFile, outputFile TclFile, errorFile TclFile, pidPtr uintptr) int32 { /* tclWinPipe.c:908:1: */
	bp := tls.Alloc(1240)
	defer tls.Free(1240)

	var result int32
	var applType int32
	var createFlags int32
	// var cmdLine Tcl_DString at bp+864, 216
	// Complete command line (WCHAR).
	// var startInfo STARTUPINFOW at bp+1080, 104

	// var procInfo PROCESS_INFORMATION at bp+1216, 24

	// var secAtts SECURITY_ATTRIBUTES at bp+1192, 24

	var hProcess HANDLE
	// var h HANDLE at bp+1184, 8

	var inputHandle HANDLE
	var outputHandle HANDLE
	var errorHandle HANDLE
	// var execPath [780]int8 at bp+80, 780

	var filePtr uintptr

	sPipeInit(tls)

	applType = sApplicationType(tls, interp, *(*uintptr)(unsafe.Pointer(argv)), bp+80)
	if !(applType == APPL_NONE) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	result = TCL_ERROR
	XTcl_DStringInit(tls, bp+864)
	hProcess = libc.XGetCurrentProcess(tls)

	// STARTF_USESTDHANDLES must be used to pass handles to child process.
	// Using SetStdHandle() and/or dup2() only works when a console mode
	// parent process is spawning an attached console mode child process.

	libc.Xmemset(tls, bp+1080, 0, uint64(unsafe.Sizeof(STARTUPINFOW{})))
	(*STARTUPINFOW)(unsafe.Pointer(bp + 1080 /* &startInfo */)).Fcb = DWORD(unsafe.Sizeof(STARTUPINFOW{}))
	(*STARTUPINFOW)(unsafe.Pointer(bp + 1080 /* &startInfo */)).FdwFlags = DWORD(STARTF_USESTDHANDLES)
	(*STARTUPINFOW)(unsafe.Pointer(bp + 1080 /* &startInfo */)).FhStdInput = libc.UintptrFromInt64(int64(-1))
	(*STARTUPINFOW)(unsafe.Pointer(bp + 1080 /* &startInfo */)).FhStdOutput = libc.UintptrFromInt64(int64(-1))
	(*STARTUPINFOW)(unsafe.Pointer(bp + 1080 /* &startInfo */)).FhStdError = libc.UintptrFromInt64(int64(-1))

	(*SECURITY_ATTRIBUTES)(unsafe.Pointer(bp + 1192 /* &secAtts */)).FnLength = DWORD(unsafe.Sizeof(SECURITY_ATTRIBUTES{}))
	(*SECURITY_ATTRIBUTES)(unsafe.Pointer(bp + 1192 /* &secAtts */)).FlpSecurityDescriptor = uintptr(0)
	(*SECURITY_ATTRIBUTES)(unsafe.Pointer(bp + 1192 /* &secAtts */)).FbInheritHandle = TRUE

	// We have to check the type of each file, since we cannot duplicate some
	// file types.

	inputHandle = libc.UintptrFromInt64(int64(-1))
	if !(inputFile != uintptr(0)) {
		goto __2
	}
	filePtr = inputFile
	if !((*WinFile)(unsafe.Pointer(filePtr)).Ftype == WIN_FILE) {
		goto __3
	}
	inputHandle = (*WinFile)(unsafe.Pointer(filePtr)).Fhandle
__3:
	;
__2:
	;
	outputHandle = libc.UintptrFromInt64(int64(-1))
	if !(outputFile != uintptr(0)) {
		goto __4
	}
	filePtr = outputFile
	if !((*WinFile)(unsafe.Pointer(filePtr)).Ftype == WIN_FILE) {
		goto __5
	}
	outputHandle = (*WinFile)(unsafe.Pointer(filePtr)).Fhandle
__5:
	;
__4:
	;
	errorHandle = libc.UintptrFromInt64(int64(-1))
	if !(errorFile != uintptr(0)) {
		goto __6
	}
	filePtr = errorFile
	if !((*WinFile)(unsafe.Pointer(filePtr)).Ftype == WIN_FILE) {
		goto __7
	}
	errorHandle = (*WinFile)(unsafe.Pointer(filePtr)).Fhandle
__7:
	;
__6:
	;

	// Duplicate all the handles which will be passed off as stdin, stdout and
	// stderr of the child process. The duplicate handles are set to be
	// inheritable, so the child process can use them.

	if !(inputHandle == libc.UintptrFromInt64(int64(-1))) {
		goto __8
	}
	// If handle was not set, stdin should return immediate EOF. Under
	// Windows95, some applications (both 16 and 32 bit!) cannot read from
	// the NUL device; they read from console instead. When running tk,
	// this is fatal because the child process would hang forever waiting
	// for EOF from the unmapped console window used by the helper
	// application.
	//
	// Fortunately, the helper application detects a closed pipe as an
	// immediate EOF and can pass that information to the child process.

	if !(libc.XCreatePipe(tls, bp+1080+80, bp+1184, bp+1192, uint32(0)) != FALSE) {
		goto __10
	}
	libc.XCloseHandle(tls, *(*HANDLE)(unsafe.Pointer(bp + 1184 /* h */)))
__10:
	;
	goto __9
__8:
	libc.XDuplicateHandle(tls, hProcess, inputHandle, hProcess, bp+1080+80,
		uint32(0), TRUE, uint32(DUPLICATE_SAME_ACCESS))
__9:
	;
	if !((*STARTUPINFOW)(unsafe.Pointer(bp+1080)).FhStdInput == libc.UintptrFromInt64(int64(-1))) {
		goto __11
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+69450,
		libc.VaList(bp, XTcl_PosixError(tls, interp))))
	goto end
__11:
	;

	if !(outputHandle == libc.UintptrFromInt64(int64(-1))) {
		goto __12
	}
	// If handle was not set, output should be sent to an infinitely deep
	// sink. Under Windows 95, some 16 bit applications cannot have stdout
	// redirected to NUL; they send their output to the console instead.
	// Some applications, like "more" or "dir /p", when outputting
	// multiple pages to the console, also then try and read from the
	// console to go the next page. When running tk, this is fatal because
	// the child process would hang forever waiting for input from the
	// unmapped console window used by the helper application.
	//
	// Fortunately, the helper application will detect a closed pipe as a
	// sink.

	(*STARTUPINFOW)(unsafe.Pointer(bp + 1080 /* &startInfo */)).FhStdOutput = libc.XCreateFileW(tls, wtext+654, uint32(0x40000000), uint32(0),
		bp+1192, uint32(OPEN_ALWAYS), uint32(FILE_ATTRIBUTE_NORMAL), uintptr(0))
	goto __13
__12:
	libc.XDuplicateHandle(tls, hProcess, outputHandle, hProcess,
		bp+1080+88, uint32(0), TRUE, uint32(DUPLICATE_SAME_ACCESS))
__13:
	;
	if !((*STARTUPINFOW)(unsafe.Pointer(bp+1080)).FhStdOutput == libc.UintptrFromInt64(int64(-1))) {
		goto __14
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+69486,
		libc.VaList(bp+8, XTcl_PosixError(tls, interp))))
	goto end
__14:
	;

	if !(errorHandle == libc.UintptrFromInt64(int64(-1))) {
		goto __15
	}
	// If handle was not set, errors should be sent to an infinitely deep
	// sink.

	(*STARTUPINFOW)(unsafe.Pointer(bp + 1080 /* &startInfo */)).FhStdError = libc.XCreateFileW(tls, wtext+654, uint32(0x40000000), uint32(0),
		bp+1192, uint32(OPEN_EXISTING), uint32(FILE_ATTRIBUTE_NORMAL), uintptr(0))
	goto __16
__15:
	libc.XDuplicateHandle(tls, hProcess, errorHandle, hProcess, bp+1080+96,
		uint32(0), TRUE, uint32(DUPLICATE_SAME_ACCESS))
__16:
	;
	if !((*STARTUPINFOW)(unsafe.Pointer(bp+1080)).FhStdError == libc.UintptrFromInt64(int64(-1))) {
		goto __17
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+69523,
		libc.VaList(bp+16, XTcl_PosixError(tls, interp))))
	goto end
__17:
	;

	// If we do not have a console window, then we must run DOS and WIN32
	// console mode applications as detached processes. This tells the loader
	// that the child application should not inherit the console, and that it
	// should not create a new console window for the child application. The
	// child application should get its stdio from the redirection handles
	// provided by this application, and run in the background.
	//
	// If we are starting a GUI process, they don't automatically get a
	// console, so it doesn't matter if they are started as foreground or
	// detached processes. The GUI window will still pop up to the foreground.

	if !(XTclWinGetPlatformId(tls) == VER_PLATFORM_WIN32_NT) {
		goto __18
	}
	if !(sHasConsole(tls) != 0) {
		goto __20
	}
	createFlags = 0
	goto __21
__20:
	if !(applType == APPL_DOS) {
		goto __22
	}
	// Under NT, 16-bit DOS applications will not run unless they can
	// be attached to a console. If we are running without a console,
	// run the 16-bit program as an normal process inside of a hidden
	// console application, and then run that hidden console as a
	// detached process.

	(*STARTUPINFOW)(unsafe.Pointer(bp + 1080 /* &startInfo */)).FwShowWindow = WORD(SW_HIDE)
	*(*DWORD)(unsafe.Pointer(bp + 1080 + 60)) |= DWORD(STARTF_USESHOWWINDOW)
	createFlags = CREATE_NEW_CONSOLE
	XTcl_DStringAppend(tls, bp+864, ts+69559, int32(uint64(unsafe.Sizeof([11]int8{}))-uint64(1)))
	goto __23
__22:
	createFlags = DETACHED_PROCESS
__23:
	;
__21:
	;
	goto __19
__18:
	if !(sHasConsole(tls) != 0) {
		goto __24
	}
	createFlags = 0
	goto __25
__24:
	createFlags = DETACHED_PROCESS
__25:
	;

	if !(applType == APPL_DOS) {
		goto __26
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+69570,
		-1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+24, ts+4178, ts+7949, ts+55389, ts+69625,
		uintptr(0)))
	goto end
__26:
	;
__19:
	;

	// cmdLine gets the full command line used to invoke the executable,
	// including the name of the executable itself. The command line arguments
	// in argv[] are stored in cmdLine separated by spaces. Special characters
	// in individual arguments from argv[] must be quoted when being stored in
	// cmdLine.
	//
	// When calling any application, bear in mind that arguments that specify
	// a path name are not converted. If an argument contains forward slashes
	// as path separators, it may or may not be recognized as a path name,
	// depending on the program. In general, most applications accept forward
	// slashes only as option delimiters and backslashes only as paths.
	//
	// Additionally, when calling a 16-bit dos or windows application, all
	// path names must use the short, cryptic, path format (e.g., using
	// ab~1.def instead of "a b.default").

	sBuildCommandLine(tls, bp+80, argc, argv, bp+864)

	if !(libc.XCreateProcessW(tls, uintptr(0), (*Tcl_DString)(unsafe.Pointer(bp+864)).Fstring,
		uintptr(0), uintptr(0), TRUE, DWORD(createFlags), uintptr(0), uintptr(0), bp+1080,
		bp+1216) == 0) {
		goto __27
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+69633,
		libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(argv)), XTcl_PosixError(tls, interp))))
	goto end
__27:
	;

	// This wait is used to force the OS to give some time to the DOS process.

	if !(applType == APPL_DOS) {
		goto __28
	}
	libc.XWaitForSingleObject(tls, (*PROCESS_INFORMATION)(unsafe.Pointer(bp+1216 /* &procInfo */)).FhProcess, uint32(50))
__28:
	;

	// "When an application spawns a process repeatedly, a new thread instance
	// will be created for each process but the previous instances may not be
	// cleaned up. This results in a significant virtual memory loss each time
	// the process is spawned. If there is a WaitForInputIdle() call between
	// CreateProcess() and CloseHandle(), the problem does not occur." PSS ID
	// Number: Q124121

	libc.XWaitForInputIdle(tls, (*PROCESS_INFORMATION)(unsafe.Pointer(bp+1216 /* &procInfo */)).FhProcess, uint32(5000))
	libc.XCloseHandle(tls, (*PROCESS_INFORMATION)(unsafe.Pointer(bp+1216 /* &procInfo */)).FhThread)

	*(*Tcl_Pid)(unsafe.Pointer(pidPtr)) = (*PROCESS_INFORMATION)(unsafe.Pointer(bp + 1216 /* &procInfo */)).FhProcess
	if !(*(*Tcl_Pid)(unsafe.Pointer(pidPtr)) != uintptr(0)) {
		goto __29
	}
	XTclWinAddProcess(tls, (*PROCESS_INFORMATION)(unsafe.Pointer(bp+1216 /* &procInfo */)).FhProcess, (*PROCESS_INFORMATION)(unsafe.Pointer(bp+1216 /* &procInfo */)).FdwProcessId)
__29:
	;
	result = TCL_OK

end:
	XTcl_DStringFree(tls, bp+864)
	if !((*STARTUPINFOW)(unsafe.Pointer(bp+1080)).FhStdInput != libc.UintptrFromInt64(int64(-1))) {
		goto __30
	}
	libc.XCloseHandle(tls, (*STARTUPINFOW)(unsafe.Pointer(bp+1080 /* &startInfo */)).FhStdInput)
__30:
	;
	if !((*STARTUPINFOW)(unsafe.Pointer(bp+1080)).FhStdOutput != libc.UintptrFromInt64(int64(-1))) {
		goto __31
	}
	libc.XCloseHandle(tls, (*STARTUPINFOW)(unsafe.Pointer(bp+1080 /* &startInfo */)).FhStdOutput)
__31:
	;
	if !((*STARTUPINFOW)(unsafe.Pointer(bp+1080)).FhStdError != libc.UintptrFromInt64(int64(-1))) {
		goto __32
	}
	libc.XCloseHandle(tls, (*STARTUPINFOW)(unsafe.Pointer(bp+1080 /* &startInfo */)).FhStdError)
__32:
	;
	return result
}

//----------------------------------------------------------------------
//
// HasConsole --
//
//	Determines whether the current application is attached to a console.
//
// Results:
//	Returns TRUE if this application has a console, else FALSE.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sHasConsole(tls *libc.TLS) WINBOOL { /* tclWinPipe.c:1220:1: */
	var handle HANDLE

	handle = libc.XCreateFileW(tls, wtext+664, uint32(0x40000000), uint32(FILE_SHARE_WRITE),
		uintptr(0), uint32(OPEN_EXISTING), uint32(FILE_ATTRIBUTE_NORMAL), uintptr(0))

	if handle != libc.UintptrFromInt64(int64(-1)) {
		libc.XCloseHandle(tls, handle)
		return TRUE
	} else {
		return FALSE
	}
	return WINBOOL(0)
}

//--------------------------------------------------------------------
//
// ApplicationType --
//
//	Search for the specified program and identify if it refers to a DOS,
//	Windows 3.X, or Win32 program.	Used to determine how to invoke a
//	program, or if it can even be invoked.
//
//	It is possible to almost positively identify DOS and Windows
//	applications that contain the appropriate magic numbers. However, DOS
//	.com files do not seem to contain a magic number; if the program name
//	ends with .com and could not be identified as a Windows .com file, it
//	will be assumed to be a DOS application, even if it was just random
//	data. If the program name does not end with .com, no such assumption
//	is made.
//
//	The Win32 function GetBinaryType incorrectly identifies any junk file
//	that ends with .exe as a dos executable and some executables that
//	don't end with .exe as not executable. Plus it doesn't exist under
//	win95, so I won't feel bad about reimplementing functionality.
//
// Results:
//	The return value is one of APPL_DOS, APPL_WIN3X, or APPL_WIN32 if the
//	filename referred to the corresponding application type. If the file
//	name could not be found or did not refer to any known application
//	type, APPL_NONE is returned and an error message is left in interp.
//	.bat files are identified as APPL_DOS.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sApplicationType(tls *libc.TLS, interp uintptr, originalName uintptr, fullName uintptr) int32 { /* tclWinPipe.c:1271:1: */
	bp := tls.Alloc(1046)
	defer tls.Free(1046)

	var applType int32
	var i int32
	var nameLen int32
	var found int32
	var hFile HANDLE
	// var rest uintptr at bp+968, 8

	var ext uintptr
	// var buf [2]int8 at bp+1044, 2

	var attr DWORD
	// var read DWORD at bp+1040, 4

	// var header IMAGE_DOS_HEADER at bp+976, 64

	// var nameBuf Tcl_DString at bp+16, 216

	// var ds Tcl_DString at bp+232, 216

	var nativeName uintptr
	// var nativeFullPath [260]WCHAR at bp+448, 520

	// Look for the program as an external program. First try the name as it
	// is, then try adding .com, .exe, .bat and .cmd, in that order, to the name,
	// looking for an executable.
	//
	// Using the raw SearchPathW() function doesn't do quite what is necessary.
	// If the name of the executable already contains a '.' character, it will
	// not try appending the specified extension when searching (in other
	// words, SearchPathW will not find the program "a.b.exe" if the arguments
	// specified "a.b" and ".exe"). So, first look for the file as it is
	// named. Then manually append the extensions, looking for a match.

	applType = APPL_NONE
	XTcl_DStringInit(tls, bp+16)
	XTcl_DStringAppend(tls, bp+16, originalName, -1)
	nameLen = (*Tcl_DString)(unsafe.Pointer(bp + 16)).Flength

	for i = 0; i < int32(uint64(unsafe.Sizeof(extensions))/uint64(unsafe.Sizeof([5]int8{}))); i++ {
		XTcl_DStringSetLength(tls, bp+16, nameLen)
		XTcl_DStringAppend(tls, bp+16, uintptr(unsafe.Pointer(&extensions))+uintptr(i)*5, -1)
		nativeName = XTcl_WinUtfToTChar(tls, (*Tcl_DString)(unsafe.Pointer(bp+16)).Fstring,
			(*Tcl_DString)(unsafe.Pointer(bp+16)).Flength, bp+232)
		found = int32(libc.XSearchPathW(tls, uintptr(0), nativeName, uintptr(0), uint32(MAX_PATH),
			bp+448, bp+968))
		XTcl_DStringFree(tls, bp+232)
		if found == 0 {
			continue
		}

		// Ignore matches on directories or data files, return if identified a
		// known type.

		attr = libc.XGetFileAttributesW(tls, bp+448)
		if attr == 0xFFFFFFFF || attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 {
			continue
		}
		libc.Xstrcpy(tls, fullName, XTcl_WinTCharToUtf(tls, bp+448, -1, bp+232))
		XTcl_DStringFree(tls, bp+232)

		ext = libc.Xstrrchr(tls, fullName, '.')
		if ext != uintptr(0) && (libc.X_stricmp(tls, ext, ts+69659) == 0 || libc.X_stricmp(tls, ext, ts+69664) == 0) {
			applType = APPL_DOS
			break
		}

		hFile = libc.XCreateFileW(tls, bp+448,
			0x80000000, uint32(FILE_SHARE_READ), uintptr(0), uint32(OPEN_EXISTING),
			uint32(FILE_ATTRIBUTE_NORMAL), uintptr(0))
		if hFile == libc.UintptrFromInt64(int64(-1)) {
			continue
		}

		(*IMAGE_DOS_HEADER)(unsafe.Pointer(bp + 976 /* &header */)).Fe_magic = WORD(0)
		libc.XReadFile(tls, hFile, bp+976, uint32(unsafe.Sizeof(IMAGE_DOS_HEADER{})), bp+1040, uintptr(0))
		if int32((*IMAGE_DOS_HEADER)(unsafe.Pointer(bp+976)).Fe_magic) != IMAGE_DOS_SIGNATURE {
			// Doesn't have the magic number for relocatable executables. If
			// filename ends with .com, assume it's a DOS application anyhow.
			// Note that we didn't make this assumption at first, because some
			// supposed .com files are really 32-bit executables with all the
			// magic numbers and everything.

			libc.XCloseHandle(tls, hFile)
			if ext != uintptr(0) && libc.X_stricmp(tls, ext, ts+69669) == 0 {
				applType = APPL_DOS
				break
			}
			continue
		}
		if uint64((*IMAGE_DOS_HEADER)(unsafe.Pointer(bp+976)).Fe_lfarlc) != uint64(unsafe.Sizeof(IMAGE_DOS_HEADER{})) {
			// All Windows 3.X and Win32 and some DOS programs have this value
			// set here. If it doesn't, assume that since it already had the
			// other magic number it was a DOS application.

			libc.XCloseHandle(tls, hFile)
			applType = APPL_DOS
			break
		}

		// The DWORD at header.e_lfanew points to yet another magic number.

		*(*int8)(unsafe.Pointer(bp + 1044)) = int8(0)
		libc.XSetFilePointer(tls, hFile, (*IMAGE_DOS_HEADER)(unsafe.Pointer(bp+976 /* &header */)).Fe_lfanew, uintptr(0), uint32(FILE_BEGIN))
		libc.XReadFile(tls, hFile, bp+1044, uint32(2), bp+1040, uintptr(0))
		libc.XCloseHandle(tls, hFile)

		if int32(*(*int8)(unsafe.Pointer(bp + 1044))) == 'N' && int32(*(*int8)(unsafe.Pointer(bp + 1044 + 1))) == 'E' {
			applType = APPL_WIN3X
		} else if int32(*(*int8)(unsafe.Pointer(bp + 1044))) == 'P' && int32(*(*int8)(unsafe.Pointer(bp + 1044 + 1))) == 'E' {
			applType = APPL_WIN32
		} else {
			// Strictly speaking, there should be a test that there is an 'L'
			// and 'E' at buf[0..1], to identify the type as DOS, but of
			// course we ran into a DOS executable that _doesn't_ have the
			// magic number - specifically, one compiled using the Lahey
			// Fortran90 compiler.

			applType = APPL_DOS
		}
		break
	}
	XTcl_DStringFree(tls, bp+16)

	if applType == APPL_NONE {
		XTclWinConvertError(tls, libc.XGetLastError(tls))
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls, ts+69633,
			libc.VaList(bp, originalName, XTcl_PosixError(tls, interp))))
		return APPL_NONE
	}

	if applType == APPL_WIN3X {
		// Replace long path name of executable with short path name for
		// 16-bit applications. Otherwise the application may not be able to
		// correctly parse its own command line to separate off the
		// application name from the arguments.

		libc.XGetShortPathNameW(tls, bp+448, bp+448, uint32(MAX_PATH))
		libc.Xstrcpy(tls, fullName, XTcl_WinTCharToUtf(tls, bp+448, -1, bp+232))
		XTcl_DStringFree(tls, bp+232)
	}
	return applType
}

var extensions = [5][5]int8{*(*[5]int8)(unsafe.Pointer(ts + 69674)), *(*[5]int8)(unsafe.Pointer(ts + 69669)), *(*[5]int8)(unsafe.Pointer(ts + 69679)), *(*[5]int8)(unsafe.Pointer(ts + 69664)), *(*[5]int8)(unsafe.Pointer(ts + 69659))} /* tclWinPipe.c:1287:23 */

//----------------------------------------------------------------------
//
// BuildCommandLine --
//
//	The command line arguments are stored in linePtr separated by spaces,
//	in a form that CreateProcess() understands. Special characters in
//	individual arguments from argv[] must be quoted when being stored in
//	cmdLine.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sBuildCmdLineBypassBS(tls *libc.TLS, current uintptr, bspos uintptr) uintptr { /* tclWinPipe.c:1444:19: */
	// Mark first backslash position.

	if !(int32(*(*uintptr)(unsafe.Pointer(bspos))) != 0) {
		*(*uintptr)(unsafe.Pointer(bspos)) = current
	}
	for ok := true; ok; ok = int32(*(*int8)(unsafe.Pointer(current))) == '\\' {
		current++
	}
	return current
}

func sQuoteCmdLineBackslash(tls *libc.TLS, dsPtr uintptr, start uintptr, current uintptr, bspos uintptr) { /* tclWinPipe.c:1463:1: */
	if !(bspos != 0) {
		if current > start { // part before current (special)
			XTcl_DStringAppend(tls, dsPtr, start, int32((int64(current)-int64(start))/1))
		}
	} else {
		if bspos > start { // part before first backslash
			XTcl_DStringAppend(tls, dsPtr, start, int32((int64(bspos)-int64(start))/1))
		}
		for libc.PostIncUintptr(&bspos, 1) < current { // each backslash twice
			XTcl_DStringAppend(tls, dsPtr, ts+69684, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
		}
	}
}

func sQuoteCmdLinePart(tls *libc.TLS, dsPtr uintptr, start uintptr, special uintptr, specMetaChars uintptr, bspos uintptr) uintptr { /* tclWinPipe.c:1483:19: */
	if !(int32(*(*uintptr)(unsafe.Pointer(bspos))) != 0) {
		// Rest before special (before quote).

		sQuoteCmdLineBackslash(tls, dsPtr, start, special, uintptr(0))
		start = special
	} else {
		// Rest before first backslash and backslashes into new quoted block.

		sQuoteCmdLineBackslash(tls, dsPtr, start, *(*uintptr)(unsafe.Pointer(bspos)), uintptr(0))
		start = *(*uintptr)(unsafe.Pointer(bspos))
	}

	// escape all special chars enclosed in quotes like `"..."`, note that
	// here we don't must escape `\` (with `\`), because it's outside of the
	// main quotes, so `\` remains `\`, but important - not at end of part,
	// because results as before the quote, so `%\%\` should be escaped as
	// `"%\%"\\`).

	XTcl_DStringAppend(tls, dsPtr, ts+25631, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))) // opening escape quote-char
	for ok := true; ok; ok = *(*int8)(unsafe.Pointer(special)) != 0 && libc.Xstrchr(tls, specMetaChars, int32(*(*int8)(unsafe.Pointer(special)))) != 0 {
		*(*uintptr)(unsafe.Pointer(bspos)) = uintptr(0)
		special++
		if int32(*(*int8)(unsafe.Pointer(special))) == '\\' {
			// Bypass backslashes (and mark first backslash position).

			special = sBuildCmdLineBypassBS(tls, special, bspos)
			if int32(*(*int8)(unsafe.Pointer(special))) == 0 {
				break
			}
		}
	}
	if !(int32(*(*uintptr)(unsafe.Pointer(bspos))) != 0) {
		// Unescaped rest before quote.

		sQuoteCmdLineBackslash(tls, dsPtr, start, special, uintptr(0))
	} else {
		// Unescaped rest before first backslash (rather belongs to the main
		// block).

		sQuoteCmdLineBackslash(tls, dsPtr, start, *(*uintptr)(unsafe.Pointer(bspos)), uintptr(0))
	}
	XTcl_DStringAppend(tls, dsPtr, ts+25631, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1))) // closing escape quote-char
	return special
}

func sBuildCommandLine(tls *libc.TLS, executable uintptr, argc int32, argv uintptr, linePtr uintptr) { /* tclWinPipe.c:1549:1: */
	bp := tls.Alloc(224)
	defer tls.Free(224)

	var arg uintptr
	var start uintptr
	var special uintptr
	// var bspos uintptr at bp+216, 8

	var quote int32 = 0
	var i int32
	// var ds Tcl_DString at bp, 216

	XTcl_DStringInit(tls, bp)

	// Prime the path. Add a space separator if we were primed with something.

	XTclDStringAppendDString(tls, bp, linePtr)
	if (*Tcl_DString)(unsafe.Pointer(linePtr)).Flength > 0 {
		XTcl_DStringAppend(tls, bp, ts+14901, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
	}

	for i = 0; i < argc; i++ {
		if i == 0 {
			arg = executable
		} else {
			arg = *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))
			XTcl_DStringAppend(tls, bp, ts+14901, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
		}

		quote = quote & libc.CplInt32(1|2) // reset escape flags
		*(*uintptr)(unsafe.Pointer(bp + 216 /* bspos */)) = uintptr(0)
		if int32(*(*int8)(unsafe.Pointer(arg))) == 0 {
			quote = 2 /* CL_QUOTE */
		} else {
			for start = arg; int32(*(*int8)(unsafe.Pointer(start))) != 0 && quote&(1 /* CL_ESCAPE */ |2) /* CL_QUOTE */ != 1 /* CL_ESCAPE */ |2; /* CL_QUOTE */ start++ {
				if int32(*(*int8)(unsafe.Pointer(start)))&0x80 != 0 {
					continue
				}
				if XTclIsSpaceProc(tls, int32(*(*int8)(unsafe.Pointer(start)))) != 0 {
					quote = quote | 2                               // quote only
					if *(*uintptr)(unsafe.Pointer(bp + 216)) != 0 { // if backslash found, escape & quote
						quote = quote | 1
						break
					}
					continue
				}
				if libc.Xstrchr(tls, uintptr(unsafe.Pointer(&specMetaChars)), int32(*(*int8)(unsafe.Pointer(start)))) != 0 {
					quote = quote | (1 | 2) // escape & quote
					break
				}
				if int32(*(*int8)(unsafe.Pointer(start))) == '"' {
					quote = quote | 1 // escape only
					continue
				}
				if int32(*(*int8)(unsafe.Pointer(start))) == '\\' {
					*(*uintptr)(unsafe.Pointer(bp + 216 /* bspos */)) = start
					if quote&2 != 0 { // if quote, escape & quote
						quote = quote | 1
						break
					}
					continue
				}
			}
			*(*uintptr)(unsafe.Pointer(bp + 216 /* bspos */)) = uintptr(0)
		}
		if quote&2 != 0 {
			// Start of argument (main opening quote-char).

			XTcl_DStringAppend(tls, bp, ts+25631, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
		}
		if !(quote&1 != 0) {
			// Nothing to escape.

			XTcl_DStringAppend(tls, bp, arg, -1)
		} else {
			start = arg
			for special = arg; int32(*(*int8)(unsafe.Pointer(special))) != 0; {
				// Position of `\` is important before quote or at end (equal
				// `\"` because quoted).

				if int32(*(*int8)(unsafe.Pointer(special))) == '\\' {
					// Bypass backslashes (and mark first backslash position)

					special = sBuildCmdLineBypassBS(tls, special, bp+216)
					if int32(*(*int8)(unsafe.Pointer(special))) == 0 {
						break
					}
				}
				// ["]
				if int32(*(*int8)(unsafe.Pointer(special))) == '"' {
					// Invert the unpaired flag - observe unpaired quotes

					quote = quote ^ 4

					// Add part before (and escape backslashes before quote).

					sQuoteCmdLineBackslash(tls, bp, start, special, *(*uintptr)(unsafe.Pointer(bp + 216 /* bspos */)))
					*(*uintptr)(unsafe.Pointer(bp + 216 /* bspos */)) = uintptr(0)

					// Escape using backslash

					XTcl_DStringAppend(tls, bp, ts+25633, int32(uint64(unsafe.Sizeof([3]int8{}))-uint64(1)))
					start = libc.PreIncUintptr(&special, 1)
					continue
				}

				// Unpaired (escaped) quote causes special handling on
				// meta-chars

				if quote&4 != 0 && libc.Xstrchr(tls, uintptr(unsafe.Pointer(&specMetaChars)), int32(*(*int8)(unsafe.Pointer(special)))) != 0 {
					special = sQuoteCmdLinePart(tls, bp, start, special,
						uintptr(unsafe.Pointer(&specMetaChars)), bp+216)

					// Start to current or first backslash

					if !(*(*uintptr)(unsafe.Pointer(bp + 216)) != 0) {
						start = special
					} else {
						start = *(*uintptr)(unsafe.Pointer(bp + 216 /* bspos */))
					}
					continue
				}

				// Special case for % - should be enclosed always (paired
				// also)

				if libc.Xstrchr(tls, uintptr(unsafe.Pointer(&specMetaChars2)), int32(*(*int8)(unsafe.Pointer(special)))) != 0 {
					special = sQuoteCmdLinePart(tls, bp, start, special,
						uintptr(unsafe.Pointer(&specMetaChars2)), bp+216)

					// Start to current or first backslash.

					if !(*(*uintptr)(unsafe.Pointer(bp + 216)) != 0) {
						start = special
					} else {
						start = *(*uintptr)(unsafe.Pointer(bp + 216 /* bspos */))
					}
					continue
				}

				// Other not special (and not meta) character

				*(*uintptr)(unsafe.Pointer(bp + 216 /* bspos */)) = uintptr(0) // reset last backslash position (not
				// interesting)
				special++
			}

			// Rest of argument (and escape backslashes before closing main
			// quote)

			sQuoteCmdLineBackslash(tls, bp, start, special,
				func() uintptr {
					if quote&2 != 0 {
						return *(*uintptr)(unsafe.Pointer(bp + 216 /* bspos */))
					}
					return uintptr(0)
				}())
		}
		if quote&2 != 0 {
			// End of argument (main closing quote-char)

			XTcl_DStringAppend(tls, bp, ts+25631, int32(uint64(unsafe.Sizeof([2]int8{}))-uint64(1)))
		}
	}
	XTcl_DStringFree(tls, linePtr)
	XTcl_WinUtfToTChar(tls, (*Tcl_DString)(unsafe.Pointer(bp)).Fstring, (*Tcl_DString)(unsafe.Pointer(bp)).Flength, linePtr)
	XTcl_DStringFree(tls, bp)
}

var specMetaChars = *(*[10]int8)(unsafe.Pointer(ts + 69687))          /* tclWinPipe.c:1560:23 */
var specMetaChars2 = *(*[2]int8)(unsafe.Pointer(ts + 6304 /* "%" */)) /* tclWinPipe.c:1563:23 */

//----------------------------------------------------------------------
//
// TclpCreateCommandChannel --
//
//	This function is called by Tcl_OpenCommandChannel to perform the
//	platform specific channel initialization for a command channel.
//
// Results:
//	Returns a new channel or NULL on failure.
//
// Side effects:
//	Allocates a new channel.
//
//----------------------------------------------------------------------

func XTclpCreateCommandChannel(tls *libc.TLS, readFile TclFile, writeFile TclFile, errorFile TclFile, numPids int32, pidPtr uintptr) Tcl_Channel { /* tclWinPipe.c:1769:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var channelName [40]int8 at bp+8, 40

	var infoPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(PipeInfo{})))

	sPipeInit(tls)

	(*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask = 0
	(*PipeInfo)(unsafe.Pointer(infoPtr)).Fflags = 0
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFlags = 0
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFile = readFile
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteFile = writeFile
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FerrorFile = errorFile
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FnumPids = numPids
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FpidPtr = pidPtr
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteBuf = uintptr(0)
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteBufLen = 0
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteError = DWORD(0)
	(*PipeInfo)(unsafe.Pointer(infoPtr)).Fchannel = uintptr(0)

	(*PipeInfo)(unsafe.Pointer(infoPtr)).FvalidMask = 0

	(*PipeInfo)(unsafe.Pointer(infoPtr)).FthreadId = XTcl_GetCurrentThread(tls)

	if readFile != uintptr(0) {
		// Start the background reader thread.

		(*PipeInfo)(unsafe.Pointer(infoPtr)).Freadable = libc.XCreateEventW(tls, uintptr(0), TRUE, TRUE, uintptr(0))
		(*PipeInfo)(unsafe.Pointer(infoPtr)).FreadThread = libc.XCreateThread(tls, uintptr(0), uint64(256), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPVOID) DWORD }{sPipeReaderThread})),
			XTclPipeThreadCreateTI(tls, infoPtr+88, infoPtr, (*PipeInfo)(unsafe.Pointer(infoPtr)).Freadable),
			uint32(0), uintptr(0))
		libc.XSetThreadPriority(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).FreadThread, THREAD_BASE_PRIORITY_MAX)
		*(*int32)(unsafe.Pointer(infoPtr + 16)) |= int32(1) << 1
	} else {
		(*PipeInfo)(unsafe.Pointer(infoPtr)).FreadTI = uintptr(0)
		(*PipeInfo)(unsafe.Pointer(infoPtr)).FreadThread = uintptr(0)
	}
	if writeFile != uintptr(0) {
		// Start the background writer thread.

		(*PipeInfo)(unsafe.Pointer(infoPtr)).Fwritable = libc.XCreateEventW(tls, uintptr(0), TRUE, TRUE, uintptr(0))
		(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteThread = libc.XCreateThread(tls, uintptr(0), uint64(256), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPVOID) DWORD }{sPipeWriterThread})),
			XTclPipeThreadCreateTI(tls, infoPtr+80, infoPtr, (*PipeInfo)(unsafe.Pointer(infoPtr)).Fwritable),
			uint32(0), uintptr(0))
		libc.XSetThreadPriority(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteThread, THREAD_BASE_PRIORITY_MAX)
		*(*int32)(unsafe.Pointer(infoPtr + 16)) |= int32(1) << 2
	} else {
		(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteTI = uintptr(0)
		(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteThread = uintptr(0)
	}

	// For backward compatibility with previous versions of Tcl, we use
	// "file%d" as the base name for pipes even though it would be more
	// natural to use "pipe%d". Use the pointer to keep the channel names
	// unique, in case channels share handles (stdin/stdout).

	libc.Xsprintf(tls, bp+8, ts+67509, libc.VaList(bp, Size_t(infoPtr)))
	(*PipeInfo)(unsafe.Pointer(infoPtr)).Fchannel = XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&pipeChannelType)), bp+8,
		infoPtr, (*PipeInfo)(unsafe.Pointer(infoPtr)).FvalidMask)

	// Pipes have AUTO translation mode on Windows and ^Z eof char, which
	// means that a ^Z will be appended to them at close. This is needed for
	// Windows programs that expect a ^Z at EOF.

	XTcl_SetChannelOption(tls, uintptr(0), (*PipeInfo)(unsafe.Pointer(infoPtr)).Fchannel, ts+34223, ts+34236)
	XTcl_SetChannelOption(tls, uintptr(0), (*PipeInfo)(unsafe.Pointer(infoPtr)).Fchannel, ts+34214, ts+38537)
	return (*PipeInfo)(unsafe.Pointer(infoPtr)).Fchannel
}

//----------------------------------------------------------------------
//
// Tcl_CreatePipe --
//
//	System dependent interface to create a pipe for the [chan pipe]
//	command. Stolen from TclX.
//
// Results:
//	TCL_OK or TCL_ERROR.
//
//----------------------------------------------------------------------

func XTcl_CreatePipe(tls *libc.TLS, interp uintptr, rchan uintptr, wchan uintptr, flags int32) int32 { /* tclWinPipe.c:1867:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var readHandle HANDLE at bp+8, 8

	// var writeHandle HANDLE at bp+16, 8

	// var sec SECURITY_ATTRIBUTES at bp+24, 24

	(*SECURITY_ATTRIBUTES)(unsafe.Pointer(bp + 24 /* &sec */)).FnLength = DWORD(unsafe.Sizeof(SECURITY_ATTRIBUTES{}))
	(*SECURITY_ATTRIBUTES)(unsafe.Pointer(bp + 24 /* &sec */)).FlpSecurityDescriptor = uintptr(0)
	(*SECURITY_ATTRIBUTES)(unsafe.Pointer(bp + 24 /* &sec */)).FbInheritHandle = FALSE

	if !(libc.XCreatePipe(tls, bp+8, bp+16, bp+24, uint32(0)) != 0) {
		XTclWinConvertError(tls, libc.XGetLastError(tls))
		XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
			ts+69697, libc.VaList(bp, XTcl_PosixError(tls, interp))))
		return TCL_ERROR
	}

	*(*Tcl_Channel)(unsafe.Pointer(rchan)) = XTcl_MakeFileChannel(tls, *(*HANDLE)(unsafe.Pointer(bp + 8 /* readHandle */)), int32(1)<<1)
	XTcl_RegisterChannel(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(rchan)))

	*(*Tcl_Channel)(unsafe.Pointer(wchan)) = XTcl_MakeFileChannel(tls, *(*HANDLE)(unsafe.Pointer(bp + 16 /* writeHandle */)), int32(1)<<2)
	XTcl_RegisterChannel(tls, interp, *(*Tcl_Channel)(unsafe.Pointer(wchan)))

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TclGetAndDetachPids --
//
//	Stores a list of the command PIDs for a command channel in the
//	interp's result.
//
// Results:
//	None.
//
// Side effects:
//	Modifies the interp's result.
//
//----------------------------------------------------------------------

func XTclGetAndDetachPids(tls *libc.TLS, interp uintptr, chan1 Tcl_Channel) { /* tclWinPipe.c:1914:1: */
	var pipePtr uintptr
	var chanTypePtr uintptr
	var pidsObj uintptr
	var i int32

	// Punt if the channel is not a command channel.

	chanTypePtr = XTcl_GetChannelType(tls, chan1)
	if chanTypePtr != uintptr(unsafe.Pointer(&pipeChannelType)) {
		return
	}

	pipePtr = XTcl_GetChannelInstanceData(tls, chan1)
	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		pidsObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(pidsObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(pidsObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(pidsObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(pidsObj)).FtypePtr = uintptr(0)
	{
	}

	for i = 0; i < (*PipeInfo)(unsafe.Pointer(pipePtr)).FnumPids; i++ {
		XTcl_ListObjAppendElement(tls, uintptr(0), pidsObj,
			XTcl_NewWideIntObj(tls, int64(uint32(XTclpGetPid(tls, *(*Tcl_Pid)(unsafe.Pointer((*PipeInfo)(unsafe.Pointer(pipePtr)).FpidPtr + uintptr(i)*8)))))))
		XTcl_DetachPids(tls, 1, (*PipeInfo)(unsafe.Pointer(pipePtr)).FpidPtr+uintptr(i)*8)
	}
	XTcl_SetObjResult(tls, interp, pidsObj)
	if (*PipeInfo)(unsafe.Pointer(pipePtr)).FnumPids > 0 {
		XTclpFree(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).FpidPtr)
		(*PipeInfo)(unsafe.Pointer(pipePtr)).FnumPids = 0
	}
}

//----------------------------------------------------------------------
//
// PipeBlockModeProc --
//
//	Set blocking or non-blocking mode on channel.
//
// Results:
//	0 if successful, errno when failed.
//
// Side effects:
//	Sets the device into blocking or non-blocking mode.
//
//----------------------------------------------------------------------

func sPipeBlockModeProc(tls *libc.TLS, instanceData ClientData, mode int32) int32 { /* tclWinPipe.c:1964:1: */
	var infoPtr uintptr = instanceData

	// Pipes on Windows can not be switched between blocking and nonblocking,
	// hence we have to emulate the behavior. This is done in the input
	// function by checking against a bit in the state. We set or unset the
	// bit here to cause the input function to emulate the correct behavior.

	if mode == TCL_MODE_NONBLOCKING {
		*(*int32)(unsafe.Pointer(infoPtr + 24)) |= int32(1) << 1
	} else {
		*(*int32)(unsafe.Pointer(infoPtr + 24)) &= libc.CplInt32(int32(1) << 1)
	}
	return 0
}

//----------------------------------------------------------------------
//
// PipeClose2Proc --
//
//	Closes a pipe based IO channel.
//
// Results:
//	0 on success, errno otherwise.
//
// Side effects:
//	Closes the physical channel.
//
//----------------------------------------------------------------------

func sPipeClose2Proc(tls *libc.TLS, instanceData ClientData, interp uintptr, flags int32) int32 { /* tclWinPipe.c:2003:1: */
	var pipePtr uintptr = instanceData
	var errChan Tcl_Channel
	var errorCode int32
	var result int32
	var infoPtr uintptr
	var nextPtrPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey15)), int32(unsafe.Sizeof(ThreadSpecificData16{})))
	var inExit int32 = libc.Bool32(XTclInExit(tls) != 0 || XTclInThreadExit(tls) != 0)

	errorCode = 0
	result = 0

	if (!(flags != 0) || flags&(int32(1)<<1) != 0) && (*PipeInfo)(unsafe.Pointer(pipePtr)).FreadFile != uintptr(0) {
		// Clean up the background thread if necessary. Note that this must be
		// done before we can close the file, since the thread may be blocking
		// trying to read from the pipe.

		if (*PipeInfo)(unsafe.Pointer(pipePtr)).FreadThread != 0 {

			XTclPipeThreadStop(tls, pipePtr+88, (*PipeInfo)(unsafe.Pointer(pipePtr)).FreadThread)
			libc.XCloseHandle(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).FreadThread)
			libc.XCloseHandle(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).Freadable)
			(*PipeInfo)(unsafe.Pointer(pipePtr)).FreadThread = uintptr(0)
		}
		if XTclpCloseFile(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).FreadFile) != 0 {
			errorCode = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
		}
		*(*int32)(unsafe.Pointer(pipePtr + 16)) &= libc.CplInt32(int32(1) << 1)
		(*PipeInfo)(unsafe.Pointer(pipePtr)).FreadFile = uintptr(0)
	}
	if (!(flags != 0) || flags&(int32(1)<<2) != 0) && (*PipeInfo)(unsafe.Pointer(pipePtr)).FwriteFile != uintptr(0) {
		if (*PipeInfo)(unsafe.Pointer(pipePtr)).FwriteThread != 0 {

			// Wait for the  writer thread to finish the  current buffer, then
			// terminate the thread  and close the handles. If  the channel is
			// nonblocking or may block during exit, bail out since the worker
			// thread is not interruptible and we want TIP#398-fast-exit.
			if (*PipeInfo)(unsafe.Pointer(pipePtr)).Fflags&(int32(1)<<1) != 0 && inExit != 0 {

				// give it a chance to leave honorably
				XTclPipeThreadStopSignal(tls, pipePtr+80, (*PipeInfo)(unsafe.Pointer(pipePtr)).Fwritable)

				if libc.XWaitForSingleObject(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).Fwritable, uint32(20)) == DWORD(258) {
					return EWOULDBLOCK
				}

			} else {

				libc.XWaitForSingleObject(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).Fwritable, func() uint32 {
					if inExit != 0 {
						return uint32(5000)
					}
					return INFINITE
				}())

			}

			XTclPipeThreadStop(tls, pipePtr+80, (*PipeInfo)(unsafe.Pointer(pipePtr)).FwriteThread)

			libc.XCloseHandle(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).Fwritable)
			libc.XCloseHandle(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).FwriteThread)
			(*PipeInfo)(unsafe.Pointer(pipePtr)).FwriteThread = uintptr(0)
		}
		if XTclpCloseFile(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).FwriteFile) != 0 {
			if errorCode == 0 {
				errorCode = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
			}
		}
		*(*int32)(unsafe.Pointer(pipePtr + 16)) &= libc.CplInt32(int32(1) << 2)
		(*PipeInfo)(unsafe.Pointer(pipePtr)).FwriteFile = uintptr(0)
	}

	*(*int32)(unsafe.Pointer(pipePtr + 20)) &= (*PipeInfo)(unsafe.Pointer(pipePtr)).FvalidMask

	// Don't free the channel if any of the flags were set.

	if flags != 0 {
		return errorCode
	}

	// Remove the file from the list of watched files.

	nextPtrPtr = tsdPtr
	infoPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
__1:
	if !(infoPtr != uintptr(0)) {
		goto __3
	}
	{
		if infoPtr == pipePtr {
			*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*PipeInfo)(unsafe.Pointer(infoPtr)).FnextPtr
			goto __3
		}

	}
	goto __2
__2:
	nextPtrPtr = infoPtr
	infoPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
	goto __1
	goto __3
__3:
	;

	if (*PipeInfo)(unsafe.Pointer(pipePtr)).Fflags&(int32(1)<<1) != 0 || inExit != 0 {
		// If the channel is non-blocking or Tcl is being cleaned up, just
		// detach the children PIDs, reap them (important if we are in a
		// dynamic load module), and discard the errorFile.

		XTcl_DetachPids(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).FnumPids, (*PipeInfo)(unsafe.Pointer(pipePtr)).FpidPtr)
		XTcl_ReapDetachedProcs(tls)

		if (*PipeInfo)(unsafe.Pointer(pipePtr)).FerrorFile != 0 {
			if XTclpCloseFile(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).FerrorFile) != 0 {
				if errorCode == 0 {
					errorCode = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
				}
			}
		}
		result = 0
	} else {
		// Wrap the error file into a channel and give it to the cleanup
		// routine.

		if (*PipeInfo)(unsafe.Pointer(pipePtr)).FerrorFile != 0 {
			var filePtr uintptr = (*PipeInfo)(unsafe.Pointer(pipePtr)).FerrorFile

			errChan = XTcl_MakeFileChannel(tls, (*WinFile)(unsafe.Pointer(filePtr)).Fhandle,
				int32(1)<<1)
			XTclpFree(tls, filePtr)
		} else {
			errChan = uintptr(0)
		}

		result = XTclCleanupChildren(tls, interp, (*PipeInfo)(unsafe.Pointer(pipePtr)).FnumPids,
			(*PipeInfo)(unsafe.Pointer(pipePtr)).FpidPtr, errChan)
	}

	if (*PipeInfo)(unsafe.Pointer(pipePtr)).FnumPids > 0 {
		XTclpFree(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).FpidPtr)
	}

	if (*PipeInfo)(unsafe.Pointer(pipePtr)).FwriteBuf != uintptr(0) {
		XTclpFree(tls, (*PipeInfo)(unsafe.Pointer(pipePtr)).FwriteBuf)
	}

	XTclpFree(tls, pipePtr)

	if errorCode == 0 {
		return result
	}
	return errorCode
}

//----------------------------------------------------------------------
//
// PipeInputProc --
//
//	Reads input from the IO channel into the buffer given. Returns count
//	of how many bytes were actually read, and an error indication.
//
// Results:
//	A count of how many bytes were read is returned and an error
//	indication is returned in an output argument.
//
// Side effects:
//	Reads input from the actual channel.
//
//----------------------------------------------------------------------

func sPipeInputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, bufSize int32, errorCode uintptr) int32 { /* tclWinPipe.c:2173:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var infoPtr uintptr = instanceData
	var filePtr uintptr = (*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFile
	// var count DWORD at bp, 4

	var bytesRead DWORD = DWORD(0)
	var result int32

	*(*int32)(unsafe.Pointer(errorCode)) = 0
	// Synchronize with the reader thread.

	result = sWaitForRead1(tls, infoPtr, func() int32 {
		if (*PipeInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<1) != 0 {
			return 0
		}
		return 1
	}())

	// If an error occurred, return immediately.

	if result == -1 {
		*(*int32)(unsafe.Pointer(errorCode)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
		return -1
	}

	if (*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<3) != 0 {
		// The reader thread consumed 1 byte as a side effect of waiting so we
		// need to move it into the buffer.

		*(*int8)(unsafe.Pointer(buf)) = (*PipeInfo)(unsafe.Pointer(infoPtr)).FextraByte
		*(*int32)(unsafe.Pointer(infoPtr + 152)) &= libc.CplInt32(int32(1) << 3)
		buf++
		bufSize--
		bytesRead = DWORD(1)

		// If further read attempts would block, return what we have.

		if result == 0 {
			return int32(bytesRead)
		}
	}

	// Attempt to read bufSize bytes. The read will return immediately if
	// there is any data available. Otherwise it will block until at least one
	// byte is available or an EOF occurs.

	if libc.XReadFile(tls, (*WinFile)(unsafe.Pointer(filePtr)).Fhandle, buf, DWORD(bufSize), bp,
		uintptr(0)) == TRUE {
		return int32(bytesRead + *(*DWORD)(unsafe.Pointer(bp)))
	} else if bytesRead != 0 {
		// Ignore errors if we have data to return.

		return int32(bytesRead)
	}

	XTclWinConvertError(tls, libc.XGetLastError(tls))
	if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EPIPE {
		*(*int32)(unsafe.Pointer(infoPtr + 152)) |= int32(1) << 2
		return 0
	}
	*(*int32)(unsafe.Pointer(errorCode)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
	return -1
}

//----------------------------------------------------------------------
//
// PipeOutputProc --
//
//	Writes the given output on the IO channel. Returns count of how many
//	characters were actually written, and an error indication.
//
// Results:
//	A count of how many characters were written is returned and an error
//	indication is returned in an output argument.
//
// Side effects:
//	Writes output on the actual channel.
//
//----------------------------------------------------------------------

func sPipeOutputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, toWrite int32, errorCode uintptr) int32 { /* tclWinPipe.c:2267:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var infoPtr uintptr
	var filePtr uintptr
	// var bytesWritten DWORD at bp, 4

	var timeout DWORD
	infoPtr = instanceData
	filePtr = (*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteFile

	*(*int32)(unsafe.Pointer(errorCode)) = 0

	// avoid blocking if pipe-thread exited
	if (*PipeInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<1) != 0 ||
		!(sTclPipeThreadIsAlive1(tls, infoPtr+80) != 0) ||
		XTclInExit(tls) != 0 || XTclInThreadExit(tls) != 0 {
		timeout = uint32(0)
	} else {
		timeout = INFINITE
	}
	if !(libc.XWaitForSingleObject(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Fwritable, timeout) == DWORD(258)) {
		goto __1
	}
	// The writer thread is blocked waiting for a write to complete and
	// the channel is in non-blocking mode.

	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EWOULDBLOCK
	goto error
__1:
	;

	// Check for a background error on the last write.

	if !((*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteError != 0) {
		goto __2
	}
	XTclWinConvertError(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteError)
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteError = DWORD(0)
	goto error
__2:
	;

	if !((*PipeInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<1) != 0) {
		goto __3
	}
	// The pipe is non-blocking, so copy the data into the output buffer
	// and restart the writer thread.

	if !(toWrite > (*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteBufLen) {
		goto __5
	}
	// Reallocate the buffer to be large enough to hold the data.

	if !((*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteBuf != 0) {
		goto __6
	}
	XTclpFree(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteBuf)
__6:
	;
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteBufLen = toWrite
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteBuf = XTcl_Alloc(tls, uint32(toWrite))
__5:
	;
	libc.Xmemcpy(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteBuf, buf, uint64(toWrite))
	(*PipeInfo)(unsafe.Pointer(infoPtr)).FtoWrite = toWrite
	libc.XResetEvent(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Fwritable)
	sTclPipeThreadSignal1(tls, infoPtr+80)
	*(*DWORD)(unsafe.Pointer(bp /* bytesWritten */)) = DWORD(toWrite)
	goto __4
__3:
	// In the blocking case, just try to write the buffer directly. This
	// avoids an unnecessary copy.

	if !(libc.XWriteFile(tls, (*WinFile)(unsafe.Pointer(filePtr)).Fhandle, buf, DWORD(toWrite),
		bp, uintptr(0)) == FALSE) {
		goto __7
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	goto error
__7:
	;
__4:
	;
	return int32(*(*DWORD)(unsafe.Pointer(bp /* bytesWritten */)))

error:
	*(*int32)(unsafe.Pointer(errorCode)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
	return -1

}

//----------------------------------------------------------------------
//
// PipeEventProc --
//
//	This function is invoked by Tcl_ServiceEvent when a file event reaches
//	the front of the event queue. This function invokes Tcl_NotifyChannel
//	on the pipe.
//
// Results:
//	Returns 1 if the event was handled, meaning it should be removed from
//	the queue. Returns 0 if the event was not handled, meaning it should
//	stay on the queue. The only time the event isn't handled is if the
//	TCL_FILE_EVENTS flag bit isn't set.
//
// Side effects:
//	Whatever the notifier callback does.
//
//----------------------------------------------------------------------

func sPipeEventProc(tls *libc.TLS, evPtr uintptr, flags int32) int32 { /* tclWinPipe.c:2367:1: */
	var pipeEvPtr uintptr = evPtr
	var infoPtr uintptr
	var mask int32
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey15)), int32(unsafe.Sizeof(ThreadSpecificData16{})))

	if !(flags&(int32(1)<<3) != 0) {
		return 0
	}

	// Search through the list of watched pipes for the one whose handle
	// matches the event. We do this rather than simply dereferencing the
	// handle in the event so that pipes can be deleted while the event is in
	// the queue.

	for infoPtr = (*ThreadSpecificData16)(unsafe.Pointer(tsdPtr)).FfirstPipePtr; infoPtr != uintptr(0); infoPtr = (*PipeInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*PipeEvent)(unsafe.Pointer(pipeEvPtr)).FinfoPtr == infoPtr {
			*(*int32)(unsafe.Pointer(infoPtr + 24)) &= libc.CplInt32(int32(1) << 0)
			break
		}
	}

	// Remove stale events.

	if !(infoPtr != 0) {
		return 1
	}

	// Check to see if the pipe is readable. Note that we can't tell if a pipe
	// is writable, so we always report it as being writable unless we have
	// detected EOF.

	mask = 0
	if (*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<2) != 0 && libc.XWaitForSingleObject(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Fwritable, uint32(0)) != DWORD(258) {
		mask = int32(1) << 2
	}

	if (*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 && sWaitForRead1(tls, infoPtr, 0) >= 0 {
		if (*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<2) != 0 {
			mask = int32(1) << 1
		} else {
			mask = mask | int32(1)<<1
		}
	}

	// Inform the channel of the events.

	XTcl_NotifyChannel(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Fchannel, (*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask&mask)
	return 1
}

//----------------------------------------------------------------------
//
// PipeWatchProc --
//
//	Called by the notifier to set up to watch for events on this channel.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPipeWatchProc(tls *libc.TLS, instanceData ClientData, mask int32) { /* tclWinPipe.c:2449:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var nextPtrPtr uintptr
	var ptr uintptr
	var infoPtr uintptr = instanceData
	var oldMask int32 = (*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey15)), int32(unsafe.Sizeof(ThreadSpecificData16{})))

	// Since most of the work is handled by the background threads, we just
	// need to update the watchMask and then force the notifier to poll once.

	(*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask = mask & (*PipeInfo)(unsafe.Pointer(infoPtr)).FvalidMask
	if (*PipeInfo)(unsafe.Pointer(infoPtr)).FwatchMask != 0 {
		*(*Tcl_Time)(unsafe.Pointer(bp /* blockTime */)) = Tcl_Time{}

		if !(oldMask != 0) {
			(*PipeInfo)(unsafe.Pointer(infoPtr)).FnextPtr = (*ThreadSpecificData16)(unsafe.Pointer(tsdPtr)).FfirstPipePtr
			(*ThreadSpecificData16)(unsafe.Pointer(tsdPtr)).FfirstPipePtr = infoPtr
		}
		XTcl_SetMaxBlockTime(tls, bp)
	} else {
		if oldMask != 0 {
			// Remove the pipe from the list of watched pipes.

			nextPtrPtr = tsdPtr
			ptr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
		__1:
			if !(ptr != uintptr(0)) {
				goto __3
			}
			{
				if infoPtr == ptr {
					*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*PipeInfo)(unsafe.Pointer(ptr)).FnextPtr
					goto __3
				}

			}
			goto __2
		__2:
			nextPtrPtr = ptr
			ptr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
			goto __1
			goto __3
		__3:
		}
	}
}

//----------------------------------------------------------------------
//
// PipeGetHandleProc --
//
//	Called from Tcl_GetChannelHandle to retrieve OS handles from inside a
//	command pipeline based channel.
//
// Results:
//	Returns TCL_OK with the fd in handlePtr, or TCL_ERROR if there is no
//	handle for the specified direction.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sPipeGetHandleProc(tls *libc.TLS, instanceData ClientData, direction int32, handlePtr uintptr) int32 { /* tclWinPipe.c:2511:1: */
	var infoPtr uintptr = instanceData
	var filePtr uintptr

	if direction == int32(1)<<1 && (*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFile != 0 {
		filePtr = (*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFile
		*(*ClientData)(unsafe.Pointer(handlePtr)) = (*WinFile)(unsafe.Pointer(filePtr)).Fhandle
		return TCL_OK
	}
	if direction == int32(1)<<2 && (*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteFile != 0 {
		filePtr = (*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteFile
		*(*ClientData)(unsafe.Pointer(handlePtr)) = (*WinFile)(unsafe.Pointer(filePtr)).Fhandle
		return TCL_OK
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_WaitPid --
//
//	Emulates the waitpid system call.
//
// Results:
//	Returns 0 if the process is still alive, -1 on an error, or the pid on
//	a clean close.
//
// Side effects:
//	Unless WNOHANG is set and the wait times out, the process information
//	record will be deleted and the process handle will be closed.
//
//----------------------------------------------------------------------

func XTcl_WaitPid(tls *libc.TLS, pid Tcl_Pid, statPtr uintptr, options int32) Tcl_Pid { /* tclWinPipe.c:2551:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var infoPtr uintptr = uintptr(0)
	var prevPtrPtr uintptr
	var flags DWORD
	var result Tcl_Pid
	var ret DWORD
	// var exitCode DWORD at bp, 4

	sPipeInit(tls)

	// If no pid is specified, do nothing.

	if pid == uintptr(0) {
		*(*int32)(unsafe.Pointer(statPtr)) = 0
		return uintptr(0)
	}

	// Find the process and cut it from the process list.

	prevPtrPtr = uintptr(unsafe.Pointer(&procList))
	infoPtr = procList
__1:
	if !(infoPtr != uintptr(0)) {
		goto __3
	}
	{
		if (*ProcInfo)(unsafe.Pointer(infoPtr)).FhProcess == pid {
			*(*uintptr)(unsafe.Pointer(prevPtrPtr)) = (*ProcInfo)(unsafe.Pointer(infoPtr)).FnextPtr
			goto __3
		}

	}
	goto __2
__2:
	prevPtrPtr = infoPtr + 16
	infoPtr = (*ProcInfo)(unsafe.Pointer(infoPtr)).FnextPtr
	goto __1
	goto __3
__3:
	;

	// If the pid is not one of the processes we know about (we started it)
	// then do nothing.

	if infoPtr == uintptr(0) {
		*(*int32)(unsafe.Pointer(statPtr)) = 0
		return uintptr(0)
	}

	// Officially "wait" for it to finish. We either poll (WNOHANG) or wait
	// for an infinite amount of time.

	if options&WNOHANG != 0 {
		flags = DWORD(0)
	} else {
		flags = INFINITE
	}
	ret = libc.XWaitForSingleObject(tls, (*ProcInfo)(unsafe.Pointer(infoPtr)).FhProcess, flags)
	if ret == DWORD(258) {
		*(*int32)(unsafe.Pointer(statPtr)) = 0
		if options&WNOHANG != 0 {
			// Re-insert this infoPtr back on the list.

			(*ProcInfo)(unsafe.Pointer(infoPtr)).FnextPtr = procList
			procList = infoPtr

			return uintptr(0)
		} else {
			result = uintptr(0)
		}
	} else if ret == DWORD(0x00000000)+DWORD(0) {
		libc.XGetExitCodeProcess(tls, (*ProcInfo)(unsafe.Pointer(infoPtr)).FhProcess, bp)

		// Does the exit code look like one of the exception codes?

		switch *(*DWORD)(unsafe.Pointer(bp /* exitCode */)) {
		case 0xC000008D:
			fallthrough
		case 0xC000008E:
			fallthrough
		case 0xC000008F:
			fallthrough
		case 0xC0000090:
			fallthrough
		case 0xC0000091:
			fallthrough
		case 0xC0000092:
			fallthrough
		case 0xC0000093:
			fallthrough
		case 0xC0000094:
			fallthrough
		case 0xC0000095:
			*(*int32)(unsafe.Pointer(statPtr)) = libc.Int32FromUint32(0xC0000000 | uint32(SIGFPE))
			break
			fallthrough

		case 0xC0000096:
			fallthrough
		case 0xC000001D:
			*(*int32)(unsafe.Pointer(statPtr)) = libc.Int32FromUint32(0xC0000000 | uint32(SIGILL))
			break
			fallthrough

		case 0xC0000005:
			fallthrough
		case 0xC000008C:
			fallthrough
		case 0xC00000FD:
			fallthrough
		case 0xC0000025:
			fallthrough
		case 0xC0000026:
			fallthrough
		case 0x80000001:
			fallthrough
		case 0xC0000008:
			*(*int32)(unsafe.Pointer(statPtr)) = libc.Int32FromUint32(0xC0000000 | uint32(SIGSEGV))
			break
			fallthrough

		case 0x80000002:
			*(*int32)(unsafe.Pointer(statPtr)) = libc.Int32FromUint32(0xC0000000 | uint32(SIGBUS))
			break
			fallthrough

		case 0x80000003:
			fallthrough
		case 0x80000004:
			*(*int32)(unsafe.Pointer(statPtr)) = libc.Int32FromUint32(0xC0000000 | uint32(SIGTRAP))
			break
			fallthrough

		case 0xC000013A:
			*(*int32)(unsafe.Pointer(statPtr)) = libc.Int32FromUint32(0xC0000000 | uint32(SIGINT))
			break
			fallthrough

		default:
			// Non-exceptional, normal, exit code. Note that the exit code is
			// truncated to a signed short range [-32768,32768) whether it
			// fits into this range or not.
			//
			// BUG: Even though the exit code is a DWORD, it is understood by
			// convention to be a signed integer, yet there isn't enough room
			// to fit this into the POSIX style waitstatus mask without
			// truncating it.

			*(*int32)(unsafe.Pointer(statPtr)) = int32(*(*DWORD)(unsafe.Pointer(bp /* exitCode */)))
			break
		}
		result = pid
	} else {
		*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = ECHILD
		*(*int32)(unsafe.Pointer(statPtr)) = libc.Int32FromUint32(0xC0000000 | uint32(ECHILD))
		result = libc.UintptrFromInt32(-1)
	}

	// Officially close the process handle.

	libc.XCloseHandle(tls, (*ProcInfo)(unsafe.Pointer(infoPtr)).FhProcess)
	XTclpFree(tls, infoPtr)

	return result
}

//----------------------------------------------------------------------
//
// TclWinAddProcess --
//
//	Add a process to the process list so that we can use Tcl_WaitPid on
//	the process.
//
// Results:
//	None
//
// Side effects:
//	Adds the specified process handle to the process list so Tcl_WaitPid
//	knows about it.
//
//----------------------------------------------------------------------

func XTclWinAddProcess(tls *libc.TLS, hProcess uintptr, id uint32) { /* tclWinPipe.c:2722:1: */
	var procPtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ProcInfo{})))

	sPipeInit(tls)

	(*ProcInfo)(unsafe.Pointer(procPtr)).FhProcess = hProcess
	(*ProcInfo)(unsafe.Pointer(procPtr)).FdwProcessId = id

	(*ProcInfo)(unsafe.Pointer(procPtr)).FnextPtr = procList
	procList = procPtr

}

//----------------------------------------------------------------------
//
// Tcl_PidObjCmd --
//
//	This function is invoked to process the "pid" Tcl command. See the
//	user documentation for details on what it does.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	See the user documentation.
//
//----------------------------------------------------------------------

func XTcl_PidObjCmd(tls *libc.TLS, dummy ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclWinPipe.c:2756:1: */
	var chan1 Tcl_Channel
	var chanTypePtr uintptr
	var pipePtr uintptr
	var i int32
	var resultPtr uintptr

	if objc > 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+69722)
		return TCL_ERROR
	}
	if objc == 1 {
		XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, int64(uint32(libc.Xgetpid(tls)))))
	} else {
		chan1 = XTcl_GetChannel(tls, interp, XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8))),
			uintptr(0))
		if chan1 == uintptr(0) {
			return TCL_ERROR
		}
		chanTypePtr = XTcl_GetChannelType(tls, chan1)
		if chanTypePtr != uintptr(unsafe.Pointer(&pipeChannelType)) {
			return TCL_OK
		}

		pipePtr = XTcl_GetChannelInstanceData(tls, chan1)
		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			resultPtr = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(resultPtr)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(resultPtr)).FtypePtr = uintptr(0)
		{
		}

		for i = 0; i < (*PipeInfo)(unsafe.Pointer(pipePtr)).FnumPids; i++ {
			XTcl_ListObjAppendElement(tls /*interp*/, uintptr(0), resultPtr,
				XTcl_NewWideIntObj(tls, int64(uint32(XTclpGetPid(tls, *(*Tcl_Pid)(unsafe.Pointer((*PipeInfo)(unsafe.Pointer(pipePtr)).FpidPtr + uintptr(i)*8)))))))
		}
		XTcl_SetObjResult(tls, interp, resultPtr)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// WaitForRead --
//
//	Wait until some data is available, the pipe is at EOF or the reader
//	thread is blocked waiting for data (if the channel is in non-blocking
//	mode).
//
// Results:
//	Returns 1 if pipe is readable. Returns 0 if there is no data on the
//	pipe, but there is buffered data. Returns -1 if an error occurred. If
//	an error occurred, the threads may not be synchronized.
//
// Side effects:
//	Updates the shared state flags and may consume 1 byte of data from the
//	pipe. If no error occurred, the reader thread is blocked waiting for a
//	signal from the main thread.
//
//----------------------------------------------------------------------

func sWaitForRead1(tls *libc.TLS, infoPtr uintptr, blocking int32) int32 { /* tclWinPipe.c:2820:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var timeout DWORD
	// var count DWORD at bp, 4

	var handle uintptr = (*WinFile)(unsafe.Pointer((*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFile)).Fhandle

	for 1 != 0 {
		// Synchronize with the reader thread.

		// avoid blocking if pipe-thread exited
		if !(blocking != 0) || !(sTclPipeThreadIsAlive1(tls, infoPtr+88) != 0) ||
			XTclInExit(tls) != 0 || XTclInThreadExit(tls) != 0 {
			timeout = uint32(0)
		} else {
			timeout = INFINITE
		}
		if libc.XWaitForSingleObject(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Freadable, timeout) == DWORD(258) {
			// The reader thread is blocked waiting for data and the channel
			// is in non-blocking mode.

			*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EWOULDBLOCK
			return -1
		}

		// At this point, the two threads are synchronized, so it is safe to
		// access shared state.

		// If the pipe has hit EOF, it is always readable.

		if (*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<2) != 0 {
			return 1
		}

		// Check to see if there is any data sitting in the pipe.

		if libc.XPeekNamedPipe(tls, handle, uintptr(0), DWORD(0),
			uintptr(0), bp, uintptr(0)) != TRUE {
			XTclWinConvertError(tls, libc.XGetLastError(tls))

			// Check to see if the peek failed because of EOF.

			if *(*int32)(unsafe.Pointer(libc.X_errno(tls))) == EPIPE {
				*(*int32)(unsafe.Pointer(infoPtr + 152)) |= int32(1) << 2
				return 1
			}

			// Ignore errors if there is data in the buffer.

			if (*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<3) != 0 {
				return 0
			} else {
				return -1
			}
		}

		// We found some data in the pipe, so it must be readable.

		if *(*DWORD)(unsafe.Pointer(bp)) > DWORD(0) {
			return 1
		}

		// The pipe isn't readable, but there is some data sitting in the
		// buffer, so return immediately.

		if (*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFlags&(int32(1)<<3) != 0 {
			return 0
		}

		// There wasn't any data available, so reset the thread and try again.

		libc.XResetEvent(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Freadable)
		sTclPipeThreadSignal1(tls, infoPtr+88)
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// PipeReaderThread --
//
//	This function runs in a separate thread and waits for input to become
//	available on a pipe.
//
// Results:
//	None.
//
// Side effects:
//	Signals the main thread when input become available. May cause the
//	main thread to wake up by posting a message. May consume one byte from
//	the pipe for each wait operation. Will cause a memory leak of ~4k, if
//	forcefully terminated with TerminateThread().
//
//----------------------------------------------------------------------

func sPipeReaderThread(tls *libc.TLS, arg LPVOID) DWORD { /* tclWinPipe.c:2934:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)) = arg
	var infoPtr uintptr = uintptr(0) // access info only after success init/wait
	var handle HANDLE = uintptr(0)
	// var count DWORD at bp+8, 4

	var err DWORD
	var done int32 = 0

	for !(done != 0) {
		// Wait for the main thread to signal before attempting to wait on the
		// pipe becoming readable.

		if !(XTclPipeThreadWaitForSignal(tls, bp) != 0) {
			// exit
			break
		}

		if !(infoPtr != 0) {
			infoPtr = (*TclPipeThreadInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)))).FclientData
			handle = (*WinFile)(unsafe.Pointer((*PipeInfo)(unsafe.Pointer(infoPtr)).FreadFile)).Fhandle
		}

		// Try waiting for 0 bytes. This will block until some data is
		// available on NT, but will return immediately on Win 95. So, if no
		// data is available after the first read, we block until we can read
		// a single byte off of the pipe.

		if libc.XReadFile(tls, handle, uintptr(0), uint32(0), bp+8, uintptr(0)) == FALSE || libc.XPeekNamedPipe(tls, handle, uintptr(0), uint32(0), uintptr(0), bp+8, uintptr(0)) == FALSE {
			// The error is a result of an EOF condition, so set the EOF bit
			// before signalling the main thread.

			err = libc.XGetLastError(tls)
			if err == DWORD(109) {
				*(*int32)(unsafe.Pointer(infoPtr + 152)) |= int32(1) << 2
				done = 1
			} else if err == DWORD(6) {
				done = 1
			}
		} else if *(*DWORD)(unsafe.Pointer(bp + 8)) == DWORD(0) {
			if libc.XReadFile(tls, handle, infoPtr+156, uint32(1), bp+8, uintptr(0)) !=
				FALSE {
				// One byte was consumed as a side effect of waiting for the
				// pipe to become readable.

				*(*int32)(unsafe.Pointer(infoPtr + 152)) |= int32(1) << 3
			} else {
				err = libc.XGetLastError(tls)
				if err == DWORD(109) {
					// The error is a result of an EOF condition, so set the
					// EOF bit before signalling the main thread.

					*(*int32)(unsafe.Pointer(infoPtr + 152)) |= int32(1) << 2
					done = 1
				} else if err == DWORD(6) {
					done = 1
				}
			}
		}

		// Signal the main thread by signalling the readable event and then
		// waking up the notifier thread.

		libc.XSetEvent(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Freadable)

		// Alert the foreground thread. Note that we need to treat this like a
		// critical section so the foreground thread does not terminate this
		// thread while we are holding a mutex in the notifier code.

		if (*PipeInfo)(unsafe.Pointer(infoPtr)).FthreadId != uintptr(0) {
			// TIP #218. When in flight ignore the event, no one will receive
			// it anyway.

			XTcl_ThreadAlert(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).FthreadId)
		}

	}

	// If state of thread was set to stop, we can sane free info structure,
	// otherwise it is shared with main thread, so main thread will own it
	XTclPipeThreadExit(tls, bp)

	return DWORD(0)
}

//----------------------------------------------------------------------
//
// PipeWriterThread --
//
//	This function runs in a separate thread and writes data onto a pipe.
//
// Results:
//	Always returns 0.
//
// Side effects:
//	Signals the main thread when an output operation is completed. May
//	cause the main thread to wake up by posting a message.
//
//----------------------------------------------------------------------

func sPipeWriterThread(tls *libc.TLS, arg LPVOID) DWORD { /* tclWinPipe.c:3057:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)) = arg
	var infoPtr uintptr = uintptr(0) // access info only after success init/wait
	var handle HANDLE = uintptr(0)
	// var count DWORD at bp+8, 4

	var toWrite DWORD
	var buf uintptr
	var done int32 = 0

	for !(done != 0) {
		// Wait for the main thread to signal before attempting to write.
		if !(XTclPipeThreadWaitForSignal(tls, bp) != 0) {
			// exit
			break
		}

		if !(infoPtr != 0) {
			infoPtr = (*TclPipeThreadInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)))).FclientData
			handle = (*WinFile)(unsafe.Pointer((*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteFile)).Fhandle
		}

		buf = (*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteBuf
		toWrite = DWORD((*PipeInfo)(unsafe.Pointer(infoPtr)).FtoWrite)

		// Loop until all of the bytes are written or an error occurs.

		for toWrite > DWORD(0) {
			if libc.XWriteFile(tls, handle, buf, toWrite, bp+8, uintptr(0)) == FALSE {
				(*PipeInfo)(unsafe.Pointer(infoPtr)).FwriteError = libc.XGetLastError(tls)
				done = 1
				break
			} else {
				toWrite = toWrite - *(*DWORD)(unsafe.Pointer(bp + 8))
				buf += uintptr(*(*DWORD)(unsafe.Pointer(bp + 8 /* count */)))
			}
		}

		// Signal the main thread by signalling the writable event and then
		// waking up the notifier thread.

		libc.XSetEvent(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Fwritable)

		// Alert the foreground thread. Note that we need to treat this like a
		// critical section so the foreground thread does not terminate this
		// thread while we are holding a mutex in the notifier code.

		if (*PipeInfo)(unsafe.Pointer(infoPtr)).FthreadId != uintptr(0) {
			// TIP #218. When in flight ignore the event, no one will receive
			// it anyway.

			XTcl_ThreadAlert(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).FthreadId)
		}

	}

	// If state of thread was set to stop, we can sane free info structure,
	// otherwise it is shared with main thread, so main thread will own it.
	XTclPipeThreadExit(tls, bp)

	return DWORD(0)
}

//----------------------------------------------------------------------
//
// PipeThreadActionProc --
//
//	Insert or remove any thread local refs to this channel.
//
// Results:
//	None.
//
// Side effects:
//	Changes thread local list of valid channels.
//
//----------------------------------------------------------------------

func sPipeThreadActionProc(tls *libc.TLS, instanceData ClientData, action int32) { /* tclWinPipe.c:3150:1: */
	var infoPtr uintptr = instanceData

	// We do not access firstPipePtr in the thread structures. This is not for
	// all pipes managed by the thread, but only those we are watching.
	// Removal of the filevent handlers before transfer thus takes care of
	// this structure.

	if action == 0 {
		// We can't copy the thread information from the channel when the
		// channel is created. At this time the channel back pointer has not
		// been set yet. However in that case the threadId has already been
		// set by TclpCreateCommandChannel itself, so the structure is still
		// good.

		sPipeInit(tls)
		if (*PipeInfo)(unsafe.Pointer(infoPtr)).Fchannel != uintptr(0) {
			(*PipeInfo)(unsafe.Pointer(infoPtr)).FthreadId = XTcl_GetChannelThread(tls, (*PipeInfo)(unsafe.Pointer(infoPtr)).Fchannel)
		}
	} else {
		(*PipeInfo)(unsafe.Pointer(infoPtr)).FthreadId = uintptr(0)
	}

}

//----------------------------------------------------------------------
//
// TclpOpenTemporaryFile --
//
//	Creates a temporary file, possibly based on the supplied bits and
//	pieces of template supplied in the first three arguments. If the
//	fourth argument is non-NULL, it contains a Tcl_Obj to store the name
//	of the temporary file in (and it is caller's responsibility to clean
//	up). If the fourth argument is NULL, try to arrange for the temporary
//	file to go away once it is no longer needed.
//
// Results:
//	A read-write Tcl Channel open on the file.
//
//----------------------------------------------------------------------

func XTclpOpenTemporaryFile(tls *libc.TLS, dirObj uintptr, basenameObj uintptr, extensionObj uintptr, resultingNameObj uintptr) Tcl_Channel { /* tclWinPipe.c:3202:1: */
	bp := tls.Alloc(772)
	defer tls.Free(772)

	// var name [260]WCHAR at bp+8, 520

	var namePtr uintptr
	var handle HANDLE
	var flags DWORD
	var length int32
	var counter int32
	var counter2 int32
	// var buf Tcl_DString at bp+528, 216

	var string uintptr
	var baseStr uintptr
	// var number [28]int8 at bp+744, 28

	var tmpObj uintptr
	flags = DWORD(FILE_ATTRIBUTE_TEMPORARY)

	if !!(resultingNameObj != 0) {
		goto __1
	}
	flags = flags | DWORD(FILE_FLAG_DELETE_ON_CLOSE)
__1:
	;

	namePtr = bp + 8 /* name */
	length = int32(libc.XGetTempPathW(tls, uint32(MAX_PATH), bp+8))
	if !(length == 0) {
		goto __2
	}
	goto gotError
__2:
	;
	namePtr += uintptr(uint64(length) * uint64(unsafe.Sizeof(WCHAR(0))))
	if !(basenameObj != 0) {
		goto __3
	}
	string = XTcl_GetString(tls, basenameObj)

	XTcl_WinUtfToTChar(tls, string, (*Tcl_Obj)(unsafe.Pointer(basenameObj)).Flength, bp+528)
	libc.Xmemcpy(tls, namePtr, (*Tcl_DString)(unsafe.Pointer(bp+528)).Fstring, uint64((*Tcl_DString)(unsafe.Pointer(bp+528)).Flength))
	namePtr += uintptr((*Tcl_DString)(unsafe.Pointer(bp + 528)).Flength)
	XTcl_DStringFree(tls, bp+528)
	goto __4
__3:
	baseStr = wtext + 646
	length = int32(uint64(3) * uint64(unsafe.Sizeof(WCHAR(0))))

	libc.Xmemcpy(tls, namePtr, baseStr, uint64(length))
	namePtr += uintptr(length)
__4:
	;
	counter = int32(XTclpGetClicks(tls) % uint32(65533))
	counter2 = 1024 // Only try this many times! Prevents
	// an infinite loop.

__5:

	libc.Xsprintf(tls, bp+744, ts+69734, libc.VaList(bp, counter))
	counter = int32(uint16(counter + 1))
	XTcl_WinUtfToTChar(tls, bp+744, int32(libc.Xstrlen(tls, bp+744)), bp+528)
	XTcl_DStringSetLength(tls, bp+528, (*Tcl_DString)(unsafe.Pointer(bp+528)).Flength+1)
	libc.Xmemcpy(tls, namePtr, (*Tcl_DString)(unsafe.Pointer(bp+528)).Fstring, uint64((*Tcl_DString)(unsafe.Pointer(bp+528)).Flength+1))
	XTcl_DStringFree(tls, bp+528)

	handle = libc.XCreateFileW(tls, bp+8,
		0x80000000|uint32(0x40000000), uint32(0), uintptr(0), uint32(CREATE_NEW), flags, uintptr(0))
	goto __6
__6:
	if handle == libc.UintptrFromInt64(int64(-1)) &&
		libc.PreDecInt32(&counter2, 1) > 0 &&
		libc.XGetLastError(tls) == DWORD(80) {
		goto __5
	}
	goto __7
__7:
	;
	if !(handle == libc.UintptrFromInt64(int64(-1))) {
		goto __8
	}
	goto gotError
__8:
	;

	if !(resultingNameObj != 0) {
		goto __9
	}
	tmpObj = XTclpNativeToNormalized(tls, bp+8)

	XTcl_AppendObjToObj(tls, resultingNameObj, tmpObj)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount, 1) > 1) {
		goto __10
	}
	goto __11
__10:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __12
	}

	if !((*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes != XtclEmptyStringRep) {
		goto __14
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes)
__14:
	;
	(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = -1
__15:
	;
	*(*uintptr)(unsafe.Pointer(tmpObj + 32)) = XtclFreeObjList
	XtclFreeObjList = tmpObj
	goto __16
__16:
	if 0 != 0 {
		goto __15
	}
	goto __17
__17:
	;
	goto __13
__12:
	XTclFreeObj(tls, tmpObj)
__13:
	;
__11:
	;

__9:
	;

	return XTcl_MakeFileChannel(tls, handle,
		int32(1)<<1|int32(1)<<2)

gotError:
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclPipeThreadCreateTI --
//
//	Creates a thread info structure, can be owned by worker.
//
// Results:
//	Pointer to created TI structure.
//
//----------------------------------------------------------------------

func XTclPipeThreadCreateTI(tls *libc.TLS, pipeTIPtr uintptr, clientData ClientData, wakeEvent HANDLE) uintptr { /* tclWinPipe.c:3290:19: */
	var pipeTI uintptr
	pipeTI = libc.Xmalloc(tls, uint64(unsafe.Sizeof(TclPipeThreadInfo{})))
	(*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevControl = libc.XCreateEventW(tls, uintptr(0), FALSE, FALSE, uintptr(0))
	(*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).Fstate = PTI_STATE_IDLE
	(*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FclientData = clientData
	(*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevWakeUp = wakeEvent
	return libc.AssignPtrUintptr(pipeTIPtr, pipeTI)
}

//----------------------------------------------------------------------
//
// TclPipeThreadWaitForSignal --
//
//	Wait for work/stop signals inside pipe worker.
//
// Results:
//	1 if signaled to work, 0 if signaled to stop.
//
// Side effects:
//	If this function returns 0, TI-structure pointer given via pipeTIPtr
//	may be NULL, so not accessible (can be owned by main thread).
//
//----------------------------------------------------------------------

func XTclPipeThreadWaitForSignal(tls *libc.TLS, pipeTIPtr uintptr) int32 { /* tclWinPipe.c:3327:1: */
	var pipeTI uintptr
	var state LONG
	var waitResult DWORD
	var wakeEvent HANDLE
	pipeTI = *(*uintptr)(unsafe.Pointer(pipeTIPtr))

	if !!(pipeTI != 0) {
		goto __1
	}
	return 0
__1:
	;

	wakeEvent = (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevWakeUp

	// Wait for the main thread to signal before attempting to do the work.

	// Reset work state of thread (idle/waiting)

	state = libc.X_InterlockedCompareExchange(tls, pipeTI+8, PTI_STATE_IDLE,
		PTI_STATE_WORK)
	if !(state&(PTI_STATE_STOP|PTI_STATE_END) != 0) {
		goto __2
	}
	// End of work, check the owner of structure.

	goto end
__2:
	;

	// Entering wait

	waitResult = libc.XWaitForSingleObject(tls, (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevControl, INFINITE)
	if !(waitResult != DWORD(0x00000000)+DWORD(0)) {
		goto __3
	}
	// The control event was not signaled, so end of work (unexpected
	// behaviour, main thread can be dead?).

	goto end
__3:
	;

	// Try to set work state of thread

	state = libc.X_InterlockedCompareExchange(tls, pipeTI+8, PTI_STATE_WORK,
		PTI_STATE_IDLE)
	if !(state&(PTI_STATE_STOP|PTI_STATE_END) != 0) {
		goto __4
	}
	// End of work

	goto end
__4:
	;

	// Signaled to work.

	return 1

end:
	// End of work, check the owner of the TI structure.

	if !(state != PTI_STATE_STOP) {
		goto __5
	}
	*(*uintptr)(unsafe.Pointer(pipeTIPtr)) = uintptr(0)
	goto __6
__5:
	(*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevWakeUp = uintptr(0)
__6:
	;
	if !(wakeEvent != 0) {
		goto __7
	}
	libc.XSetEvent(tls, wakeEvent)
__7:
	;
	return 0
}

//----------------------------------------------------------------------
//
// TclPipeThreadStopSignal --
//
//	Send stop signal to the pipe worker (without waiting).
//
//	After calling of this function, TI-structure pointer given via pipeTIPtr
//	may be NULL.
//
// Results:
//	1 if signaled (or pipe-thread is down), 0 if pipe thread still working.
//
//----------------------------------------------------------------------

func XTclPipeThreadStopSignal(tls *libc.TLS, pipeTIPtr uintptr, wakeEvent HANDLE) int32 { /* tclWinPipe.c:3426:1: */
	var pipeTI uintptr = *(*uintptr)(unsafe.Pointer(pipeTIPtr))
	var evControl HANDLE
	var state int32

	if !(pipeTI != 0) {
		return 1
	}
	evControl = (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevControl
	(*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevWakeUp = wakeEvent
	state = int32(libc.X_InterlockedCompareExchange(tls, pipeTI+8, PTI_STATE_STOP,
		PTI_STATE_IDLE))
	switch state {
	case PTI_STATE_IDLE:
		// Thread was idle/waiting, notify it goes teardown

		libc.XSetEvent(tls, evControl)
		*(*uintptr)(unsafe.Pointer(pipeTIPtr)) = uintptr(0)
		fallthrough
		// FALLTHRU
	case PTI_STATE_DOWN:
		return 1

	default:
		// Thread works currently, we should try to end it, own the TI
		// structure (because of possible sharing the joint structures with
		// thread)

		libc.X_InterlockedExchange(tls, pipeTI+8, PTI_STATE_END)
		break
	}

	return 0
}

//----------------------------------------------------------------------
//
// TclPipeThreadStop --
//
//	Send stop signal to the pipe worker and wait for thread completion.
//
//	May be combined with TclPipeThreadStopSignal.
//
//	After calling of this function, TI-structure pointer given via pipeTIPtr
//	is not accessible (owned by pipe worker or released here).
//
// Results:
//	None.
//
// Side effects:
//	Can terminate pipe worker (and / or stop its synchronous operations).
//
//----------------------------------------------------------------------

func XTclPipeThreadStop(tls *libc.TLS, pipeTIPtr uintptr, hThread HANDLE) { /* tclWinPipe.c:3489:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var pipeTI uintptr = *(*uintptr)(unsafe.Pointer(pipeTIPtr))
	var evControl HANDLE
	var state int32

	if !(pipeTI != 0) {
		return
	}
	pipeTI = *(*uintptr)(unsafe.Pointer(pipeTIPtr))
	evControl = (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevControl
	(*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevWakeUp = uintptr(0)

	// Try to sane stop the pipe worker, corresponding its current state

	state = int32(libc.X_InterlockedCompareExchange(tls, pipeTI+8, PTI_STATE_STOP,
		PTI_STATE_IDLE))
	switch state {
	case PTI_STATE_IDLE:
		// Thread was idle/waiting, notify it goes teardown

		libc.XSetEvent(tls, evControl)

		// We don't need to wait for it at all, thread frees himself (owns the
		// TI structure)

		pipeTI = uintptr(0)
		break

	case PTI_STATE_STOP:
		// Already stopped, thread frees himself (owns the TI structure)

		pipeTI = uintptr(0)
		break
	case PTI_STATE_DOWN:
		// Thread already down (?), do nothing

		// We don't need to wait for it, but we should free pipeTI
		hThread = uintptr(0)
		break

		// case PTI_STATE_WORK:
	default:
		// Thread works currently, we should try to end it, own the TI
		// structure (because of possible sharing the joint structures with
		// thread)

		state = int32(libc.X_InterlockedCompareExchange(tls, pipeTI+8, PTI_STATE_END,
			PTI_STATE_WORK))
		if state == PTI_STATE_DOWN {
			// We don't need to wait for it, but we should free pipeTI
			hThread = uintptr(0)
		}
		break
	}

	if pipeTI != 0 && hThread != 0 {
		// var exitCode DWORD at bp, 4

		// The thread may already have closed on its own. Check its exit
		// code.

		libc.XGetExitCodeThread(tls, hThread, bp)

		if *(*DWORD)(unsafe.Pointer(bp)) == DWORD(0x00000103) {
			var inExit int32 = libc.Bool32(XTclInExit(tls) != 0 || XTclInThreadExit(tls) != 0)

			// Set the stop event so that if the pipe thread is blocked
			// somewhere, it may hereafter sane exit cleanly.

			libc.XSetEvent(tls, evControl)

			// Cancel all sync-IO of this thread (may be blocked there).

			if XtclWinProcs.FcancelSynchronousIo != 0 {
				(*struct {
					f func(*libc.TLS, HANDLE) WINBOOL
				})(unsafe.Pointer(&struct{ uintptr }{XtclWinProcs.FcancelSynchronousIo})).f(tls, hThread)
			}

			// Wait at most 20 milliseconds for the reader thread to close
			// (regarding TIP#398-fast-exit).

			// If we want TIP#398-fast-exit.

			if libc.XWaitForSingleObject(tls, hThread, func() uint32 {
				if inExit != 0 {
					return uint32(0)
				}
				return uint32(20)
			}()) == DWORD(258) {
				// The thread must be blocked waiting for the pipe to become
				// readable in ReadFile(). There isn't a clean way to exit the
				// thread from this condition. We should terminate the child
				// process instead to get the reader thread to fall out of
				// ReadFile with a FALSE. (below) is not the correct way to do
				// this, but will stay here until a better solution is found.
				//
				// Note that we need to guard against terminating the thread
				// while it is in the middle of Tcl_ThreadAlert because it
				// won't be able to release the notifier lock.
				//
				// Also note that terminating threads during their
				// initialization or teardown phase may result in ntdll.dll's
				// LoaderLock to remain locked indefinitely.  This causes
				// ntdll.dll's LdrpInitializeThread() to deadlock trying to
				// acquire LoaderLock.  LdrpInitializeThread() is executed
				// within new threads to perform initialization and to execute
				// DllMain() of all loaded dlls.  As a result, all new threads
				// are deadlocked in their initialization phase and never
				// execute, even though CreateThread() reports successful
				// thread creation.  This results in a very weird process-wide
				// behavior, which is extremely hard to debug.
				//
				// THREADS SHOULD NEVER BE TERMINATED. Period.
				//
				// But for now, check if thread is exiting, and if so, let it
				// die peacefully.
				//
				// Also don't terminate if in exit (otherwise deadlocked in
				// ntdll.dll's).

				if (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).Fstate != PTI_STATE_DOWN &&
					libc.XWaitForSingleObject(tls, hThread,
						func() uint32 {
							if inExit != 0 {
								return uint32(50)
							}
							return uint32(5000)
						}()) != DWORD(0x00000000)+DWORD(0) {
					// BUG: this leaks memory
					if inExit != 0 || !(libc.XTerminateThread(tls, hThread, uint32(0)) != 0) {
						// in exit or terminate fails, just give thread a
						// chance to exit

						if libc.X_InterlockedExchange(tls, pipeTI+8,
							PTI_STATE_STOP) != PTI_STATE_DOWN {
							pipeTI = uintptr(0)
						}
					}
				}
			}
		}
	}

	*(*uintptr)(unsafe.Pointer(pipeTIPtr)) = uintptr(0)
	if pipeTI != 0 {
		if (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevWakeUp != 0 {
			libc.XSetEvent(tls, (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevWakeUp)
		}
		libc.XCloseHandle(tls, (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevControl)
		libc.Xfree(tls, pipeTI)
	}
}

//----------------------------------------------------------------------
//
// TclPipeThreadExit --
//
//	Clean-up for the pipe thread (removes owned TI-structure in worker).
//
//	Should be executed on worker exit, to inform the main thread or
//	free TI-structure (if owned).
//
//	After calling of this function, TI-structure pointer given via pipeTIPtr
//	is not accessible (owned by main thread or released here).
//
// Results:
//	None.
//
//----------------------------------------------------------------------

func XTclPipeThreadExit(tls *libc.TLS, pipeTIPtr uintptr) { /* tclWinPipe.c:3688:1: */
	var state LONG
	var pipeTI uintptr = *(*uintptr)(unsafe.Pointer(pipeTIPtr))

	// If state of thread was set to stop (exactly), we can sane free its info
	// structure, otherwise it is shared with main thread, so main thread will
	// own it.

	if !(pipeTI != 0) {
		return
	}
	*(*uintptr)(unsafe.Pointer(pipeTIPtr)) = uintptr(0)
	state = libc.X_InterlockedExchange(tls, pipeTI+8, PTI_STATE_DOWN)
	if state == PTI_STATE_STOP {
		libc.XCloseHandle(tls, (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevControl)
		if (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevWakeUp != 0 {
			libc.XSetEvent(tls, (*TclPipeThreadInfo)(unsafe.Pointer(pipeTI)).FevWakeUp)
		}
		libc.Xfree(tls, pipeTI)
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// *
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-w64 runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within this package.

// Ensure that we can say which registry is being accessed.

// The maximum length of a sub-key name.

// The following macros convert between different endian ints.

// The following flag is used in OpenKeys to indicate that the specified key
// should be created if it doesn't currently exist.

// The following tables contain the mapping from registry root names to the
// system predefined keys.

var rootKeyNames = [8]uintptr{
	ts + 69741, ts + 69760, ts + 69771,
	ts + 69789, ts + 69807,
	ts + 69827, ts + 69849, uintptr(0),
} /* tclWinReg.c:63:19 */

var rootKeys = [7]HKEY{
	HKEY(ULONG_PTR(libc.Int32FromUint32(0x80000002))), HKEY(ULONG_PTR(libc.Int32FromUint32(0x80000003))), HKEY(ULONG_PTR(libc.Int32FromUint32(0x80000000))), HKEY(ULONG_PTR(libc.Int32FromUint32(0x80000001))),
	HKEY(ULONG_PTR(libc.Int32FromUint32(0x80000005))), HKEY(ULONG_PTR(libc.Int32FromUint32(0x80000004))), HKEY(ULONG_PTR(libc.Int32FromUint32(0x80000006))),
} /* tclWinReg.c:69:19 */

var sREGISTRY_ASSOC_KEY = *(*[18]int8)(unsafe.Pointer(ts + 69863)) /* tclWinReg.c:74:19 */

// The following table maps from registry types to strings. Note that the
// indices for this array are the same as the constants for the known registry
// types so we don't need a separate table to hold the mapping.

var typeNames = [10]uintptr{
	ts + 34192, ts + 69881, ts + 69884, ts + 10063, ts + 69894,
	ts + 69900, ts + 12727, ts + 69917, ts + 69926, uintptr(0),
} /* tclWinReg.c:82:19 */

var lastType DWORD = DWORD(8) /* tclWinReg.c:87:14 */

func getByteArrayFromObj1(tls *libc.TLS, objPtr uintptr, lengthPtr uintptr) uintptr { /* tclWinReg.c:137:22: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var length int32 at bp, 4

	var result uintptr = (*struct {
		f func(*libc.TLS, uintptr, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetByteArrayFromObj})).f(tls, objPtr, bp /* &length */)
	// 32-bit or without TIP #494
	*(*Size_t)(unsafe.Pointer(lengthPtr)) = Size_t(uint32(*(*int32)(unsafe.Pointer(bp /* length */))))
	return result
}

//----------------------------------------------------------------------
//
// Registry_Init --
//
//	This function initializes the registry command.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XRegistry_Init(tls *libc.TLS, interp uintptr) int32 { /* tclWinReg.c:182:1: */
	var cmd Tcl_Command

	if XTcl_InitStubs(tls, interp, ts+67571, 0) == uintptr(0) {
		return TCL_ERROR
	}

	cmd = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Command
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_CreateObjCommand})).f(tls, interp, ts+69940 /* "registry" */, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
	}{sRegistryObjCmd})),
		interp, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{sDeleteCmd})))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, ClientData)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetAssocData})).f(tls, interp, uintptr(unsafe.Pointer(&sREGISTRY_ASSOC_KEY)), uintptr(0), cmd)
	return (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_PkgProvideEx})).f(tls, interp, ts+69940 /* "registry" */, ts+69949 /* "1.3.5" */, uintptr(0))
}

//----------------------------------------------------------------------
//
// Registry_Unload --
//
//	This function removes the registry command.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	The registry command is deleted and the dll may be unloaded.
//
//----------------------------------------------------------------------

func XRegistry_Unload(tls *libc.TLS, interp uintptr, flags int32) int32 { /* tclWinReg.c:214:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var cmd Tcl_Command
	// var objv [3]uintptr at bp, 24

	_ = flags

	// Unregister the registry package. There is no Tcl_PkgForget()

	*(*uintptr)(unsafe.Pointer(bp)) = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+5849 /* "package" */, -1)
	*(*uintptr)(unsafe.Pointer(bp + 1*8)) = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+46129 /* "forget" */, -1)
	*(*uintptr)(unsafe.Pointer(bp + 2*8)) = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+69940 /* "registry" */, -1)
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, int32) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_EvalObjv})).f(tls, interp, 3, bp /* &objv[0] */, TCL_EVAL_GLOBAL)

	// Delete the originally registered command.

	cmd = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) ClientData
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetAssocData})).f(tls, interp, uintptr(unsafe.Pointer(&sREGISTRY_ASSOC_KEY)), uintptr(0))
	if cmd != uintptr(0) {
		(*struct {
			f func(*libc.TLS, uintptr, Tcl_Command) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DeleteCommandFromToken})).f(tls, interp, cmd)
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// DeleteCmd --
//
//	Cleanup the interp command token so that unloading doesn't try to
//	re-delete the command (which will crash).
//
// Results:
//	None.
//
// Side effects:
//	The unload command will not attempt to delete this command.
//
//----------------------------------------------------------------------

func sDeleteCmd(tls *libc.TLS, clientData uintptr) { /* tclWinReg.c:261:1: */
	var interp uintptr = clientData

	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, ClientData)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetAssocData})).f(tls, interp, uintptr(unsafe.Pointer(&sREGISTRY_ASSOC_KEY)), uintptr(0), uintptr(0))
}

//----------------------------------------------------------------------
//
// RegistryObjCmd --
//
//	This function implements the Tcl "registry" command.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sRegistryObjCmd(tls *libc.TLS, dummy uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* tclWinReg.c:286:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var n int32
	// var index int32 at bp, 4

	var argc int32
	var mode REGSAM
	var errString uintptr
	var res int32
	// var key HKEY at bp+8, 8
	n = 1
	mode = REGSAM(0)
	errString = uintptr(0)
	_ = dummy

	if !(objc < 2) {
		goto __1
	}
wrongArgs:
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_WrongNumArgs})).f(tls, interp, 1, objv, ts+69955 /* "?-32bit|-64bit? ..." */)
	return TCL_ERROR
__1:
	;

	if !(int32(*(*int8)(unsafe.Pointer((*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)))))) == '-') {
		goto __2
	}
	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PostIncInt32(&n, 1))*8)), uintptr(unsafe.Pointer(&modes)), int32(unsafe.Sizeof(uintptr(0))), ts+13412, 0, bp) != TCL_OK) {
		goto __3
	}
	return TCL_ERROR
__3:
	;
	switch *(*int32)(unsafe.Pointer(bp /* index */)) {
	case 0:
		goto __5
	case 1:
		goto __6
	}
	goto __4
__5: // -32bit
	mode = mode | REGSAM(0x0200)
	goto __4
__6: // -64bit
	mode = mode | REGSAM(0x0100)
	goto __4
__4:
	;
	if !(objc < 3) {
		goto __7
	}
	goto wrongArgs
__7:
	;
__2:
	;

	if !((*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PostIncInt32(&n, 1))*8)), uintptr(unsafe.Pointer(&subcommands)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK) {
		goto __8
	}
	return TCL_ERROR
__8:
	;

	argc = objc - n
	switch *(*int32)(unsafe.Pointer(bp /* index */)) {
	case 0 /* BroadcastIdx */ :
		goto __10
	case 1 /* DeleteIdx */ :
		goto __11
	case 2 /* GetIdx */ :
		goto __12
	case 3 /* KeysIdx */ :
		goto __13
	case 4 /* SetIdx */ :
		goto __14
	case 5 /* TypeIdx */ :
		goto __15
	case 6 /* ValuesIdx */ :
		goto __16
	}
	goto __9
__10: // broadcast
	if !(argc == 1 || argc == 3) {
		goto __17
	}
	res = sBroadcastValue(tls, interp, argc, objv+uintptr(n)*8)

	if !(res != TCL_BREAK) {
		goto __18
	}
	return res
__18:
	;
__17:
	;
	errString = ts + 69988 /* "keyName ?-timeou..." */
	goto __9
__11: // delete
	if !(argc == 1) {
		goto __19
	}
	return sDeleteKey(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), mode)
	goto __20
__19:
	if !(argc == 2) {
		goto __21
	}
	return sDeleteValue(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+1)*8)), mode)
__21:
	;
__20:
	;
	errString = ts + 70020 /* "keyName ?valueNa..." */
	goto __9
__12: // get
	if !(argc == 2) {
		goto __22
	}
	return sGetValue(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+1)*8)), mode)
__22:
	;
	errString = ts + 70040 /* "keyName valueNam..." */
	goto __9
__13: // keys
	if !(argc == 1) {
		goto __23
	}
	return sGetKeyNames(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), uintptr(0), mode)
	goto __24
__23:
	if !(argc == 2) {
		goto __25
	}
	return sGetKeyNames(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+1)*8)), mode)
__25:
	;
__24:
	;
	errString = ts + 70058 /* "keyName ?pattern..." */
	goto __9
__14: // set
	if !(argc == 1) {
		goto __26
	}

	// Create the key and then close it immediately.

	mode = mode | REGSAM((0x001F0000|0x0001|0x0002|0x0004|0x0008|0x0010|0x0020)&libc.CplInt32(0x00100000))
	if !(sOpenKey(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), mode, 1, bp+8) != TCL_OK) {
		goto __28
	}
	return TCL_ERROR
__28:
	;
	libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)))
	return TCL_OK
	goto __27
__26:
	if !(argc == 3) {
		goto __29
	}
	return sSetValue(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+1)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+2)*8)), uintptr(0),
		mode)
	goto __30
__29:
	if !(argc == 4) {
		goto __31
	}
	return sSetValue(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+1)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+2)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+3)*8)),
		mode)
__31:
	;
__30:
	;
__27:
	;
	errString = ts + 70076 /* "keyName ?valueNa..." */
	goto __9
__15: // type
	if !(argc == 2) {
		goto __32
	}
	return sGetType(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+1)*8)), mode)
__32:
	;
	errString = ts + 70040 /* "keyName valueNam..." */
	goto __9
__16: // values
	if !(argc == 1) {
		goto __33
	}
	return sGetValueNames(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), uintptr(0), mode)
	goto __34
__33:
	if !(argc == 2) {
		goto __35
	}
	return sGetValueNames(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(n)*8)), *(*uintptr)(unsafe.Pointer(objv + uintptr(n+1)*8)), mode)
__35:
	;
__34:
	;
	errString = ts + 70058 /* "keyName ?pattern..." */
	goto __9
__9:
	;
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_WrongNumArgs})).f(tls, interp, func() int32 {
		if mode != 0 {
			return 3
		}
		return 2
	}(), objv, errString)
	return TCL_ERROR
}

var subcommands = [8]uintptr{
	ts + 70108, ts + 7850, ts + 22680, ts + 23760, ts + 5888, ts + 12847, ts + 23778, uintptr(0),
} /* tclWinReg.c:297:23 */
var modes = [3]uintptr{
	ts + 70118, ts + 70125, uintptr(0),
} /* tclWinReg.c:303:23 */

//----------------------------------------------------------------------
//
// DeleteKey --
//
//	This function deletes a registry key.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sDeleteKey(tls *libc.TLS, interp uintptr, keyNameObj uintptr, mode REGSAM) int32 { /* tclWinReg.c:430:1: */
	bp := tls.Alloc(272)
	defer tls.Free(272)

	var tail uintptr
	var buffer uintptr
	// var hostName uintptr at bp+24, 8

	// var keyName uintptr at bp+40, 8

	var nativeTail uintptr
	// var rootKey HKEY at bp+32, 8

	// var subkey HKEY at bp+48, 8

	var result DWORD
	// var buf Tcl_DString at bp+56, 216

	var saveMode REGSAM = mode

	// Find the parent of the key being deleted and open it.

	*(*uintptr)(unsafe.Pointer(bp + 40 /* keyName */)) = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, keyNameObj)
	buffer = (*struct {
		f func(*libc.TLS, uint32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Alloc})).f(tls, uint32((*Tcl_Obj)(unsafe.Pointer(keyNameObj)).Flength+1))
	libc.Xstrcpy(tls, buffer, *(*uintptr)(unsafe.Pointer(bp + 40 /* keyName */)))

	if sParseKeyName(tls, interp, buffer, bp+24, bp+32,
		bp+40) != TCL_OK {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Free})).f(tls, buffer)
		return TCL_ERROR
	}

	if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40))))) == 0 {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
			(*struct {
				f func(*libc.TLS, uintptr, int32) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+70132 /* "bad key: cannot ..." */, -1))
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp, ts+70165 /* "WIN_REG" */, ts+70173 /* "DEL_ROOT_KEY" */, uintptr(0)))
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Free})).f(tls, buffer)
		return TCL_ERROR
	}

	tail = libc.Xstrrchr(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* keyName */)), '\\')
	if tail != 0 {
		*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&tail, 1))) = int8(0)
	} else {
		tail = *(*uintptr)(unsafe.Pointer(bp + 40 /* keyName */))
		*(*uintptr)(unsafe.Pointer(bp + 40 /* keyName */)) = uintptr(0)
	}

	mode = mode | REGSAM(0x0008|0x00010000)
	result = sOpenSubKey(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* hostName */)), *(*HKEY)(unsafe.Pointer(bp + 32 /* rootKey */)), *(*uintptr)(unsafe.Pointer(bp + 40 /* keyName */)), mode, 0, bp+48)
	if result != DWORD(0) {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Free})).f(tls, buffer)
		if result == DWORD(2) {
			return TCL_OK
		}
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
			(*struct {
				f func(*libc.TLS, uintptr, int32) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+70186 /* "unable to delete..." */, -1))
		sAppendSystemError(tls, interp, result)
		return TCL_ERROR
	}

	// Now we recursively delete the key and everything below it.

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+56 /* &buf */)
	nativeTail = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, tail, -1, bp+56 /* &buf */)
	result = sRecursiveDeleteKey(tls, *(*HKEY)(unsafe.Pointer(bp + 48 /* subkey */)), nativeTail, saveMode)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+56 /* &buf */)

	if result != DWORD(0) && result != DWORD(2) {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
			(*struct {
				f func(*libc.TLS, uintptr, int32) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+70186 /* "unable to delete..." */, -1))
		sAppendSystemError(tls, interp, result)
		result = DWORD(TCL_ERROR)
	} else {
		result = DWORD(TCL_OK)
	}

	libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 48 /* subkey */)))
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Free})).f(tls, buffer)
	return int32(result)
}

//----------------------------------------------------------------------
//
// DeleteValue --
//
//	This function deletes a value from a registry key.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sDeleteValue(tls *libc.TLS, interp uintptr, keyNameObj uintptr, valueNameObj uintptr, mode REGSAM) int32 { /* tclWinReg.c:525:1: */
	bp := tls.Alloc(240)
	defer tls.Free(240)

	// var key HKEY at bp+16, 8

	var valueName uintptr
	var result DWORD
	// var ds Tcl_DString at bp+24, 216

	// Attempt to open the key for deletion.

	mode = mode | REGSAM(0x0002)
	if sOpenKey(tls, interp, keyNameObj, mode, 0, bp+16) != TCL_OK {
		return TCL_ERROR
	}

	valueName = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, valueNameObj)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+24 /* &ds */)
	(*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, valueName, (*Tcl_Obj)(unsafe.Pointer(valueNameObj)).Flength, bp+24 /* &ds */)
	result = DWORD(libc.XRegDeleteValueW(tls, *(*HKEY)(unsafe.Pointer(bp + 16 /* key */)), (*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring))
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+24 /* &ds */)
	if result != DWORD(0) {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ObjPrintf})).f(tls,
			ts+70209,
			libc.VaList(bp, (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, valueNameObj), (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, keyNameObj))))
		sAppendSystemError(tls, interp, result)
		result = DWORD(TCL_ERROR)
	} else {
		result = DWORD(TCL_OK)
	}
	libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 16 /* key */)))
	return int32(result)
}

//----------------------------------------------------------------------
//
// GetKeyNames --
//
//	This function enumerates the subkeys of a given key. If the optional
//	pattern is supplied, then only keys that match the pattern will be
//	returned.
//
// Results:
//	Returns the list of subkeys in the result object of the interpreter,
//	or an error message on failure.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetKeyNames(tls *libc.TLS, interp uintptr, keyNameObj uintptr, patternObj uintptr, mode REGSAM) int32 { /* tclWinReg.c:583:1: */
	bp := tls.Alloc(752)
	defer tls.Free(752)

	var pattern uintptr // Pattern being matched against subkeys
	// var key HKEY at bp+8, 8
	// Handle to the key being examined
	// var buffer [256]WCHAR at bp+16, 512

	// Buffer to hold the subkey name
	// var bufSize DWORD at bp+528, 4
	// Size of the buffer
	var index DWORD           // Position of the current subkey
	var name uintptr          // Subkey name
	var resultPtr uintptr     // List of subkeys being accumulated
	var result int32 = TCL_OK // Return value from this command
	// var ds Tcl_DString at bp+536, 216
	// Buffer to translate subkey name to UTF-8

	if patternObj != 0 {
		pattern = (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, patternObj)
	} else {
		pattern = uintptr(0)
	}

	// Attempt to open the key for enumeration.

	mode = mode | REGSAM(0x0001|0x0008)
	if sOpenKey(tls, interp, keyNameObj, mode, 0, bp+8) != TCL_OK {
		return TCL_ERROR
	}

	// Enumerate the subkeys.

	resultPtr = (*struct{ f func(*libc.TLS) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewObj})).f(tls)
	for index = DWORD(0); ; index++ {
		*(*DWORD)(unsafe.Pointer(bp + 528 /* bufSize */)) = DWORD(MAX_KEY_LENGTH)
		result = int32(libc.XRegEnumKeyExW(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)), index, bp+16, bp+528,
			uintptr(0), uintptr(0), uintptr(0), uintptr(0)))
		if int32(result) != 0 {
			if int32(result) == 259 {
				result = TCL_OK
			} else {
				(*struct {
					f func(*libc.TLS, uintptr, uintptr)
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
					f func(*libc.TLS, uintptr, uintptr) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ObjPrintf})).f(tls,
					ts+70253,
					libc.VaList(bp, (*struct {
						f func(*libc.TLS, uintptr) uintptr
					})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, keyNameObj))))
				sAppendSystemError(tls, interp, uint32(result))
				result = TCL_ERROR
			}
			break
		}
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+536 /* &ds */)
		name = (*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, bp+16 /* &buffer[0] */, int32(*(*DWORD)(unsafe.Pointer(bp + 528 /* bufSize */))), bp+536 /* &ds */)
		if pattern != 0 && !((*struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_StringMatch})).f(tls, name, pattern) != 0) {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+536 /* &ds */)
			continue
		}
		result = (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, interp, resultPtr,
			(*struct {
				f func(*libc.TLS, uintptr, int32) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, name, (*Tcl_DString)(unsafe.Pointer(bp+536 /* &ds */)).Flength))
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+536 /* &ds */)
		if result != TCL_OK {
			break
		}
	}
	if result == TCL_OK {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, resultPtr)
	} else {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = resultPtr
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr)
			}
		} // BUGFIX: Don't leak on failure.
	}

	libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)))
	return result
}

//----------------------------------------------------------------------
//
// GetType --
//
//	This function gets the type of a given registry value and places it in
//	the interpreter result.
//
// Results:
//	Returns a normal Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetType(tls *libc.TLS, interp uintptr, keyNameObj uintptr, valueNameObj uintptr, mode REGSAM) int32 { /* tclWinReg.c:677:1: */
	bp := tls.Alloc(244)
	defer tls.Free(244)

	// var key HKEY at bp+16, 8

	var result DWORD
	// var type1 DWORD at bp+240, 4

	// var ds Tcl_DString at bp+24, 216

	var valueName uintptr
	var nativeValue uintptr

	// Attempt to open the key for reading.

	mode = mode | REGSAM(0x0001)
	if sOpenKey(tls, interp, keyNameObj, mode, 0, bp+16) != TCL_OK {
		return TCL_ERROR
	}

	// Get the type of the value.

	valueName = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, valueNameObj)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+24 /* &ds */)
	nativeValue = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, valueName, (*Tcl_Obj)(unsafe.Pointer(valueNameObj)).Flength, bp+24 /* &ds */)
	result = DWORD(libc.XRegQueryValueExW(tls, *(*HKEY)(unsafe.Pointer(bp + 16 /* key */)), nativeValue, uintptr(0), bp+240,
		uintptr(0), uintptr(0)))
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+24 /* &ds */)
	libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 16 /* key */)))

	if result != DWORD(0) {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ObjPrintf})).f(tls,
			ts+70291,
			libc.VaList(bp, (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, valueNameObj), (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, keyNameObj))))
		sAppendSystemError(tls, interp, result)
		return TCL_ERROR
	}

	// Set the type into the result. Watch out for unknown types. If we don't
	// know about the type, just use the numeric value.

	if *(*DWORD)(unsafe.Pointer(bp + 240)) > lastType {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
			f func(*libc.TLS, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewIntObj})).f(tls, int32(*(*DWORD)(unsafe.Pointer(bp + 240 /* type1 */)))))
	} else {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, typeNames[*(*DWORD)(unsafe.Pointer(bp + 240 /* type1 */))], -1))
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// GetValue --
//
//	This function gets the contents of a registry value and places a list
//	containing the data and the type in the interpreter result.
//
// Results:
//	Returns a normal Tcl result.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetValue(tls *libc.TLS, interp uintptr, keyNameObj uintptr, valueNameObj uintptr, mode REGSAM) int32 { /* tclWinReg.c:749:1: */
	bp := tls.Alloc(464)
	defer tls.Free(464)

	// var key HKEY at bp+16, 8

	var valueName uintptr
	var nativeValue uintptr
	var result DWORD
	// var length DWORD at bp+460, 4

	// var type1 DWORD at bp+456, 4

	// var data Tcl_DString at bp+24, 216

	// var buf Tcl_DString at bp+240, 216

	// Attempt to open the key for reading.

	mode = mode | REGSAM(0x0001)
	if sOpenKey(tls, interp, keyNameObj, mode, 0, bp+16) != TCL_OK {
		return TCL_ERROR
	}

	// Initialize a Dstring to maximum statically allocated size we could get
	// one more byte by avoiding Tcl_DStringSetLength() and just setting
	// length to TCL_DSTRING_STATIC_SIZE, but this should be safer if the
	// implementation of Dstrings changes.
	//
	// This allows short values to be read from the registy in one call.
	// Longer values need a second call with an expanded DString.

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+24 /* &data */)
	(*struct {
		f func(*libc.TLS, uintptr, int32)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringSetLength})).f(tls, bp+24 /* &data */, TCL_DSTRING_STATIC_SIZE-1)
	*(*DWORD)(unsafe.Pointer(bp + 460 /* length */)) = uint32(uint64(TCL_DSTRING_STATIC_SIZE)/uint64(unsafe.Sizeof(WCHAR(0))) - uint64(1))

	valueName = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, valueNameObj)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+240 /* &buf */)
	nativeValue = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, valueName, (*Tcl_Obj)(unsafe.Pointer(valueNameObj)).Flength, bp+240 /* &buf */)

	result = DWORD(libc.XRegQueryValueExW(tls, *(*HKEY)(unsafe.Pointer(bp + 16 /* key */)), nativeValue, uintptr(0), bp+456,
		(*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring, bp+460))
	for result == DWORD(234) {
		// The Windows docs say that in this error case, we just need to
		// expand our buffer and request more data. Required for
		// HKEY_PERFORMANCE_DATA

		*(*DWORD)(unsafe.Pointer(bp + 460 /* length */)) = DWORD(uint64((*Tcl_DString)(unsafe.Pointer(bp+24)).Flength) * (uint64(2) / uint64(unsafe.Sizeof(WCHAR(0)))))
		(*struct {
			f func(*libc.TLS, uintptr, int32)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringSetLength})).f(tls, bp+24 /* &data */, int32(uint64(int32(*(*DWORD)(unsafe.Pointer(bp + 460 /* length */))))*uint64(unsafe.Sizeof(WCHAR(0)))))
		result = DWORD(libc.XRegQueryValueExW(tls, *(*HKEY)(unsafe.Pointer(bp + 16 /* key */)), nativeValue,
			uintptr(0), bp+456, (*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring, bp+460))
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+240 /* &buf */)
	libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 16 /* key */)))
	if result != DWORD(0) {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ObjPrintf})).f(tls,
			ts+70340,
			libc.VaList(bp, (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, valueNameObj), (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, keyNameObj))))
		sAppendSystemError(tls, interp, result)
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+24 /* &data */)
		return TCL_ERROR
	}

	// If the data is a 32-bit quantity, store it as an integer object. If it
	// is a multi-string, store it as a list of strings. For null-terminated
	// strings, append up the to first null. Otherwise, store it as a binary
	// string.

	if *(*DWORD)(unsafe.Pointer(bp + 456)) == DWORD(4) || *(*DWORD)(unsafe.Pointer(bp + 456)) == DWORD(5) {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
			f func(*libc.TLS, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewIntObj})).f(tls, int32(sConvertDWORD(tls, *(*DWORD)(unsafe.Pointer(bp + 456 /* type1 */)),
			*(*DWORD)(unsafe.Pointer((*Tcl_DString)(unsafe.Pointer(bp + 24)).Fstring))))))
	} else if *(*DWORD)(unsafe.Pointer(bp + 456)) == DWORD(7) {
		var p uintptr = (*Tcl_DString)(unsafe.Pointer(bp + 24)).Fstring
		var end uintptr = (*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring + uintptr(*(*DWORD)(unsafe.Pointer(bp + 460)))
		var resultPtr uintptr = (*struct{ f func(*libc.TLS) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewObj})).f(tls)

		// Multistrings are stored as an array of null-terminated strings,
		// terminated by two null characters. Also do a bounds check in case
		// we get bogus data.

		for p < end && int32(*(*WCHAR)(unsafe.Pointer(p))) != 0 {
			var wp uintptr = p

			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+240 /* &buf */)
			(*struct {
				f func(*libc.TLS, uintptr, int32, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, wp, int32(libc.Xwcslen(tls, wp)), bp+240 /* &buf */)
			(*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, interp, resultPtr,
				(*struct {
					f func(*libc.TLS, uintptr, int32) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+240 /* &buf */)).Fstring,
					(*Tcl_DString)(unsafe.Pointer(bp+240)).Flength))

			for int32(*(*WCHAR)(unsafe.Pointer(libc.PostIncUintptr(&wp, 2)))) != 0 { /* empty body */
			}
			p = wp
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+240 /* &buf */)
		}
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, resultPtr)
	} else if *(*DWORD)(unsafe.Pointer(bp + 456)) == DWORD(1) || *(*DWORD)(unsafe.Pointer(bp + 456)) == DWORD(2) {
		var wp uintptr = (*Tcl_DString)(unsafe.Pointer(bp + 24)).Fstring
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+240 /* &buf */)
		(*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+24 /* &data */)).Fstring, int32(libc.Xwcslen(tls, wp)), bp+240 /* &buf */)
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringResult})).f(tls, interp, bp+240 /* &buf */)
	} else {
		// Save binary data as a byte array.

		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
			f func(*libc.TLS, uintptr, int32) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewByteArrayObj})).f(tls,
			(*Tcl_DString)(unsafe.Pointer(bp+24)).Fstring, int32(*(*DWORD)(unsafe.Pointer(bp + 460 /* length */)))))
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+24 /* &data */)
	return int32(result)
}

//----------------------------------------------------------------------
//
// GetValueNames --
//
//	This function enumerates the values of the a given key. If the
//	optional pattern is supplied, then only value names that match the
//	pattern will be returned.
//
// Results:
//	Returns the list of value names in the result object of the
//	interpreter, or an error message on failure.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sGetValueNames(tls *libc.TLS, interp uintptr, keyNameObj uintptr, patternObj uintptr, mode REGSAM) int32 { /* tclWinReg.c:885:1: */
	bp := tls.Alloc(448)
	defer tls.Free(448)

	// var key HKEY at bp, 8

	var resultPtr uintptr
	var index DWORD
	// var size DWORD at bp+224, 4

	var result DWORD
	// var buffer Tcl_DString at bp+8, 216

	// var ds Tcl_DString at bp+232, 216

	var pattern uintptr
	var name uintptr

	// Attempt to open the key for enumeration.

	mode = mode | REGSAM(0x0001)
	if sOpenKey(tls, interp, keyNameObj, mode, 0, bp) != TCL_OK {
		return TCL_ERROR
	}

	resultPtr = (*struct{ f func(*libc.TLS) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewObj})).f(tls)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+8 /* &buffer */)
	(*struct {
		f func(*libc.TLS, uintptr, int32)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringSetLength})).f(tls, bp+8 /* &buffer */, int32(uint64(MAX_KEY_LENGTH)*uint64(unsafe.Sizeof(WCHAR(0)))))
	index = DWORD(0)
	result = DWORD(TCL_OK)

	if patternObj != 0 {
		pattern = (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, patternObj)
	} else {
		pattern = uintptr(0)
	}

	// Enumerate the values under the given subkey until we get an error,
	// indicating the end of the list. Note that we need to reset size after
	// each iteration because RegEnumValue smashes the old value.

	*(*DWORD)(unsafe.Pointer(bp + 224 /* size */)) = DWORD(MAX_KEY_LENGTH)
	for libc.XRegEnumValueW(tls, *(*HKEY)(unsafe.Pointer(bp)), index, (*Tcl_DString)(unsafe.Pointer(bp+8)).Fstring,
		bp+224, uintptr(0), uintptr(0), uintptr(0), uintptr(0)) == 0 {

		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+232 /* &ds */)
		(*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+8 /* &buffer */)).Fstring, int32(*(*DWORD)(unsafe.Pointer(bp + 224 /* size */))), bp+232 /* &ds */)
		name = (*Tcl_DString)(unsafe.Pointer(bp + 232)).Fstring
		if !(pattern != 0) || (*struct {
			f func(*libc.TLS, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_StringMatch})).f(tls, name, pattern) != 0 {
			result = DWORD((*struct {
				f func(*libc.TLS, uintptr, uintptr, uintptr) int32
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, interp, resultPtr,
				(*struct {
					f func(*libc.TLS, uintptr, int32) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, name, (*Tcl_DString)(unsafe.Pointer(bp+232 /* &ds */)).Flength)))
			if result != DWORD(TCL_OK) {
				(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+232 /* &ds */)
				break
			}
		}
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+232 /* &ds */)

		index++
		*(*DWORD)(unsafe.Pointer(bp + 224 /* size */)) = DWORD(MAX_KEY_LENGTH)
	}
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, resultPtr)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+8 /* &buffer */)
	libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp /* key */)))
	return int32(result)
}

//----------------------------------------------------------------------
//
// OpenKey --
//
//	This function opens the specified key. This function is a simple
//	wrapper around ParseKeyName and OpenSubKey.
//
// Results:
//	Returns the opened key in the keyPtr argument and a Tcl result code.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sOpenKey(tls *libc.TLS, interp uintptr, keyNameObj uintptr, mode REGSAM, flags int32, keyPtr uintptr) int32 { /* tclWinReg.c:968:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	// var keyName uintptr at bp+16, 8

	var buffer uintptr
	// var hostName uintptr at bp, 8

	// var rootKey HKEY at bp+8, 8

	var result DWORD

	*(*uintptr)(unsafe.Pointer(bp + 16 /* keyName */)) = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, keyNameObj)
	buffer = (*struct {
		f func(*libc.TLS, uint32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Alloc})).f(tls, uint32((*Tcl_Obj)(unsafe.Pointer(keyNameObj)).Flength+1))
	libc.Xstrcpy(tls, buffer, *(*uintptr)(unsafe.Pointer(bp + 16 /* keyName */)))

	result = DWORD(sParseKeyName(tls, interp, buffer, bp, bp+8, bp+16))
	if result == DWORD(TCL_OK) {
		result = sOpenSubKey(tls, *(*uintptr)(unsafe.Pointer(bp /* hostName */)), *(*HKEY)(unsafe.Pointer(bp + 8 /* rootKey */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* keyName */)), mode, flags, keyPtr)
		if result != DWORD(0) {
			(*struct {
				f func(*libc.TLS, uintptr, uintptr)
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
				(*struct {
					f func(*libc.TLS, uintptr, int32) uintptr
				})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+70381 /* "unable to open k..." */, -1))
			sAppendSystemError(tls, interp, result)
			result = DWORD(TCL_ERROR)
		} else {
			result = DWORD(TCL_OK)
		}
	}

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_Free})).f(tls, buffer)
	return int32(result)
}

//----------------------------------------------------------------------
//
// OpenSubKey --
//
//	This function opens a given subkey of a root key on the specified
//	host.
//
// Results:
//	Returns the opened key in the keyPtr and a Windows error code as the
//	return value.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sOpenSubKey(tls *libc.TLS, hostName uintptr, rootKey HKEY, keyName uintptr, mode REGSAM, flags int32, keyPtr uintptr) DWORD { /* tclWinReg.c:1019:1: */
	bp := tls.Alloc(228)
	defer tls.Free(228)
	*(*HKEY)(unsafe.Pointer(bp + 216)) = rootKey

	var result DWORD
	// var buf Tcl_DString at bp, 216

	// Attempt to open the root key on a remote host if necessary.

	if hostName != 0 {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp /* &buf */)
		hostName = (*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, hostName, -1, bp /* &buf */)
		result = DWORD(libc.XRegConnectRegistryW(tls, hostName, *(*HKEY)(unsafe.Pointer(bp + 216 /* rootKey */)),
			bp+216))
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp /* &buf */)
		if result != DWORD(0) {
			return result
		}
	}

	// Now open the specified key with the requested permissions. Note that
	// this key must be closed by the caller.

	if keyName != 0 {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp /* &buf */)
		keyName = (*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, keyName, -1, bp /* &buf */)
	}
	if flags&REG_CREATE != 0 {
		// var create DWORD at bp+224, 4

		result = DWORD(libc.XRegCreateKeyExW(tls, *(*HKEY)(unsafe.Pointer(bp + 216 /* rootKey */)), keyName, uint32(0), uintptr(0),
			uint32(0x00000000), mode, uintptr(0), keyPtr, bp+224))
	} else if *(*HKEY)(unsafe.Pointer(bp + 216)) == HKEY(ULONG_PTR(libc.Int32FromUint32(0x80000004))) {
		// Here we fudge it for this special root key. See MSDN for more info
		// on HKEY_PERFORMANCE_DATA and the peculiarities surrounding it.

		*(*HKEY)(unsafe.Pointer(keyPtr)) = HKEY(ULONG_PTR(libc.Int32FromUint32(0x80000004)))
		result = DWORD(0)
	} else {
		result = DWORD(libc.XRegOpenKeyExW(tls, *(*HKEY)(unsafe.Pointer(bp + 216 /* rootKey */)), keyName, uint32(0), mode,
			keyPtr))
	}
	if keyName != 0 {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp /* &buf */)
	}

	// Be sure to close the root key since we are done with it now.

	if hostName != 0 {
		libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 216 /* rootKey */)))
	}
	return result
}

//----------------------------------------------------------------------
//
// ParseKeyName --
//
//	This function parses a key name into the host, root, and subkey parts.
//
// Results:
//	The pointers to the start of the host and subkey names are returned in
//	the hostNamePtr and keyNamePtr variables. The specified root HKEY is
//	returned in rootKeyPtr. Returns a standard Tcl result.
//
// Side effects:
//	Modifies the name string by inserting nulls.
//
//----------------------------------------------------------------------

func sParseKeyName(tls *libc.TLS, interp uintptr, name uintptr, hostNamePtr uintptr, rootKeyPtr uintptr, keyNamePtr uintptr) int32 { /* tclWinReg.c:1104:1: */
	bp := tls.Alloc(36)
	defer tls.Free(36)

	var rootName uintptr
	var result int32
	// var index int32 at bp+32, 4

	var rootObj uintptr

	// Split the key into host and root portions.

	*(*uintptr)(unsafe.Pointer(hostNamePtr)) = libc.AssignPtrUintptr(keyNamePtr, libc.AssignUintptr(&rootName, uintptr(0)))
	if int32(*(*int8)(unsafe.Pointer(name))) == '\\' {
		if int32(*(*int8)(unsafe.Pointer(name + 1))) == '\\' {
			*(*uintptr)(unsafe.Pointer(hostNamePtr)) = name
			for rootName = name + uintptr(2); int32(*(*int8)(unsafe.Pointer(rootName))) != 0; rootName++ {
				if int32(*(*int8)(unsafe.Pointer(rootName))) == '\\' {
					*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&rootName, 1))) = int8(0)
					break
				}
			}
		}
	} else {
		rootName = name
	}
	if !(rootName != 0) {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, (*struct {
			f func(*libc.TLS, uintptr, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ObjPrintf})).f(tls,
			ts+70402, libc.VaList(bp, name)))
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp+8, ts+70165 /* "WIN_REG" */, ts+70445 /* "NO_ROOT_KEY" */, uintptr(0)))
		return TCL_ERROR
	}

	// Split the root into root and subkey portions.

	for *(*uintptr)(unsafe.Pointer(keyNamePtr)) = rootName; int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyNamePtr))))) != 0; *(*uintptr)(unsafe.Pointer(keyNamePtr))++ {
		if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyNamePtr))))) == '\\' {
			*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(keyNamePtr)))) = int8(0)
			*(*uintptr)(unsafe.Pointer(keyNamePtr))++
			break
		}
	}

	// Look for a matching root name.

	rootObj = (*struct {
		f func(*libc.TLS, uintptr, int32) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, rootName, -1)
	result = (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, interp, rootObj, uintptr(unsafe.Pointer(&rootKeyNames)), int32(unsafe.Sizeof(uintptr(0))), ts+70457 /* "root name" */, TCL_EXACT, bp+32 /* &index */)
	for ok := true; ok; ok = 0 != 0 {
		var _objPtr uintptr = rootObj
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).FtclFreeObj})).f(tls, _objPtr)
		}
	}
	if result != TCL_OK {
		return TCL_ERROR
	}
	*(*HKEY)(unsafe.Pointer(rootKeyPtr)) = rootKeys[*(*int32)(unsafe.Pointer(bp + 32 /* index */))]
	return TCL_OK
}

//----------------------------------------------------------------------
//
// RecursiveDeleteKey --
//
//	This function recursively deletes all the keys below a starting key.
//	Although Windows 95 does this automatically, we still need to do this
//	for Windows NT.
//
// Results:
//	Returns a Windows error code.
//
// Side effects:
//	Deletes all of the keys and values below the given key.
//
//----------------------------------------------------------------------

func sRecursiveDeleteKey(tls *libc.TLS, startKey HKEY, keyName uintptr, mode REGSAM) DWORD { /* tclWinReg.c:1186:1: */
	bp := tls.Alloc(228)
	defer tls.Free(228)

	var result DWORD
	// var size DWORD at bp+224, 4

	// var subkey Tcl_DString at bp+8, 216

	// var hKey HKEY at bp, 8

	var saveMode REGSAM = mode

	// Do not allow NULL or empty key name.

	if !(keyName != 0) || int32(*(*WCHAR)(unsafe.Pointer(keyName))) == 0 {
		return DWORD(1010)
	}

	mode = mode | REGSAM(0x0008|0x00010000|0x0001)
	result = DWORD(libc.XRegOpenKeyExW(tls, startKey, keyName, uint32(0), mode, bp))
	if result != DWORD(0) {
		return result
	}

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+8 /* &subkey */)
	(*struct {
		f func(*libc.TLS, uintptr, int32)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringSetLength})).f(tls, bp+8 /* &subkey */, int32(uint64(MAX_KEY_LENGTH)*uint64(unsafe.Sizeof(WCHAR(0)))))

	mode = saveMode
	for result == DWORD(0) {
		// Always get index 0 because key deletion changes ordering.

		*(*DWORD)(unsafe.Pointer(bp + 224 /* size */)) = DWORD(MAX_KEY_LENGTH)
		result = DWORD(libc.XRegEnumKeyExW(tls, *(*HKEY)(unsafe.Pointer(bp /* hKey */)), uint32(0), (*Tcl_DString)(unsafe.Pointer(bp+8)).Fstring,
			bp+224, uintptr(0), uintptr(0), uintptr(0), uintptr(0)))
		if result == DWORD(259) {
			// RegDeleteKeyEx doesn't exist on non-64bit XP platforms, so we
			// can't compile with it in. We need to check for it at runtime
			// and use it if we find it.

			if mode != 0 && !(checkExProc != 0) {
				var handle HMODULE

				checkExProc = 1
				handle = libc.XGetModuleHandleW(tls, wtext+680)
				regDeleteKeyExProc = libc.XGetProcAddress(tls, handle, ts+70467)
			}
			if mode != 0 && regDeleteKeyExProc != 0 {
				result = DWORD((*struct {
					f func(*libc.TLS, HKEY, LPCWSTR, REGSAM, DWORD) LONG
				})(unsafe.Pointer(&struct{ uintptr }{regDeleteKeyExProc})).f(tls, startKey, keyName, mode, uint32(0)))
			} else {
				result = DWORD(libc.XRegDeleteKeyW(tls, startKey, keyName))
			}
			break
		} else if result == DWORD(0) {
			result = sRecursiveDeleteKey(tls, *(*HKEY)(unsafe.Pointer(bp /* hKey */)),
				(*Tcl_DString)(unsafe.Pointer(bp+8)).Fstring, mode)
		}
	}
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+8 /* &subkey */)
	libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp /* hKey */)))
	return result
}

var checkExProc int32 = 0                   /* tclWinReg.c:1196:16 */
var regDeleteKeyExProc uintptr = uintptr(0) /* tclWinReg.c:1197:17 */

//----------------------------------------------------------------------
//
// SetValue --
//
//	This function sets the contents of a registry value. If the key or
//	value does not exist, it will be created. If it does exist, then the
//	data and type will be replaced.
//
// Results:
//	Returns a normal Tcl result.
//
// Side effects:
//	May create new keys or values.
//
//----------------------------------------------------------------------

func sSetValue(tls *libc.TLS, interp uintptr, keyNameObj uintptr, valueNameObj uintptr, dataObj uintptr, typeObj uintptr, mode REGSAM) int32 { /* tclWinReg.c:1275:1: */
	bp := tls.Alloc(904)
	defer tls.Free(904)

	// var type1 int32 at bp, 4

	var result DWORD
	// var key HKEY at bp+8, 8

	var valueName uintptr
	// var nameBuf Tcl_DString at bp+16, 216

	if typeObj == uintptr(0) {
		*(*int32)(unsafe.Pointer(bp /* type1 */)) = 1
	} else if (*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIndexFromObjStruct})).f(tls, interp, typeObj, uintptr(unsafe.Pointer(&typeNames)), int32(unsafe.Sizeof(uintptr(0))), ts+12847, 0, bp) != TCL_OK {
		if (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIntFromObj})).f(tls, uintptr(0), typeObj, bp) != TCL_OK {
			return TCL_ERROR
		}
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ResetResult})).f(tls, interp)
	}
	mode = mode | REGSAM((0x001F0000|0x0001|0x0002|0x0004|0x0008|0x0010|0x0020)&libc.CplInt32(0x00100000))
	if sOpenKey(tls, interp, keyNameObj, mode, 1, bp+8) != TCL_OK {
		return TCL_ERROR
	}

	valueName = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, valueNameObj)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+16 /* &nameBuf */)
	valueName = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, valueName, (*Tcl_Obj)(unsafe.Pointer(valueNameObj)).Flength, bp+16 /* &nameBuf */)

	if *(*int32)(unsafe.Pointer(bp)) == 4 || *(*int32)(unsafe.Pointer(bp)) == 5 {
		// var value int32 at bp+232, 4

		if (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIntFromObj})).f(tls, interp, dataObj, bp+232) != TCL_OK {
			libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)))
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+16 /* &nameBuf */)
			return TCL_ERROR
		}

		*(*int32)(unsafe.Pointer(bp + 232 /* value */)) = int32(sConvertDWORD(tls, DWORD(*(*int32)(unsafe.Pointer(bp /* type1 */))), DWORD(*(*int32)(unsafe.Pointer(bp + 232 /* value */)))))
		result = DWORD(libc.XRegSetValueExW(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)), valueName, uint32(0),
			DWORD(*(*int32)(unsafe.Pointer(bp /* type1 */))), bp+232, uint32(unsafe.Sizeof(DWORD(0)))))
	} else if *(*int32)(unsafe.Pointer(bp)) == 7 {
		// var data Tcl_DString at bp+248, 216

		// var buf Tcl_DString at bp+464, 216

		// var objc int32 at bp+236, 4

		var i int32
		// var objv uintptr at bp+240, 8

		if (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjGetElements})).f(tls, interp, dataObj, bp+236, bp+240) != TCL_OK {
			libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)))
			(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+16 /* &nameBuf */)
			return TCL_ERROR
		}

		// Append the elements as null terminated strings. Note that we must
		// not assume the length of the string in case there are embedded
		// nulls, which aren't allowed in REG_MULTI_SZ values.

		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+248 /* &data */)
		for i = 0; i < *(*int32)(unsafe.Pointer(bp + 236 /* objc */)); i++ {
			var bytes uintptr = (*struct {
				f func(*libc.TLS, uintptr) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 240 /* objv */)) + uintptr(i)*8)))

			(*struct {
				f func(*libc.TLS, uintptr, uintptr, int32) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringAppend})).f(tls, bp+248 /* &data */, bytes, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 240 /* objv */)) + uintptr(i)*8)))).Flength)

			// Add a null character to separate this value from the next.

			(*struct {
				f func(*libc.TLS, uintptr, uintptr, int32) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringAppend})).f(tls, bp+248 /* &data */, ts+2631 /* "" */, 1) // NUL-terminated string
		}

		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+464 /* &buf */)
		(*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, (*Tcl_DString)(unsafe.Pointer(bp+248 /* &data */)).Fstring, (*Tcl_DString)(unsafe.Pointer(bp+248 /* &data */)).Flength+1,
			bp+464)
		result = DWORD(libc.XRegSetValueExW(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)), valueName, uint32(0),
			DWORD(*(*int32)(unsafe.Pointer(bp /* type1 */))), (*Tcl_DString)(unsafe.Pointer(bp+464)).Fstring,
			DWORD((*Tcl_DString)(unsafe.Pointer(bp+464)).Flength)))
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+248 /* &data */)
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+464 /* &buf */)
	} else if *(*int32)(unsafe.Pointer(bp)) == 1 || *(*int32)(unsafe.Pointer(bp)) == 2 {
		// var buf Tcl_DString at bp+680, 216

		var data uintptr = (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, dataObj)

		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+680 /* &buf */)
		data = (*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, data, (*Tcl_Obj)(unsafe.Pointer(dataObj)).Flength, bp+680 /* &buf */)

		// Include the null in the length, padding if needed for WCHAR.

		(*struct {
			f func(*libc.TLS, uintptr, int32)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringSetLength})).f(tls, bp+680 /* &buf */, (*Tcl_DString)(unsafe.Pointer(bp+680 /* &buf */)).Flength+1)

		result = DWORD(libc.XRegSetValueExW(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)), valueName, uint32(0),
			DWORD(*(*int32)(unsafe.Pointer(bp /* type1 */))), data, DWORD((*Tcl_DString)(unsafe.Pointer(bp+680)).Flength)+DWORD(1)))
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+680 /* &buf */)
	} else {
		var data uintptr
		// var bytelength Size_t at bp+896, 8

		// Store binary data in the registry.

		data = getByteArrayFromObj1(tls, dataObj, bp+896)
		result = DWORD(libc.XRegSetValueExW(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)), valueName, uint32(0),
			DWORD(*(*int32)(unsafe.Pointer(bp /* type1 */))), data, DWORD(*(*Size_t)(unsafe.Pointer(bp + 896 /* bytelength */)))))
	}

	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+16 /* &nameBuf */)
	libc.XRegCloseKey(tls, *(*HKEY)(unsafe.Pointer(bp + 8 /* key */)))

	if result != DWORD(0) {
		(*struct {
			f func(*libc.TLS, uintptr, uintptr)
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp,
			(*struct {
				f func(*libc.TLS, uintptr, int32) uintptr
			})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewStringObj})).f(tls, ts+70483 /* "unable to set va..." */, -1))
		sAppendSystemError(tls, interp, result)
		return TCL_ERROR
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// BroadcastValue --
//
//	This function broadcasts a WM_SETTINGCHANGE message to indicate to
//	other programs that we have changed the contents of a registry value.
//
// Results:
//	Returns a normal Tcl result.
//
// Side effects:
//	Will cause other programs to reload their system settings.
//
//----------------------------------------------------------------------

func sBroadcastValue(tls *libc.TLS, interp uintptr, objc int32, objv uintptr) int32 { /* tclWinReg.c:1416:1: */
	bp := tls.Alloc(232)
	defer tls.Free(232)

	var result LRESULT
	// var sendResult DWORD_PTR at bp+224, 8

	*(*int32)(unsafe.Pointer(bp /* timeout */)) = 3000
	var len Size_t
	var str uintptr
	var objPtr uintptr
	var wstr uintptr
	// var ds Tcl_DString at bp+8, 216

	if objc == 3 {
		str = (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(objv + 1*8)))
		len = Size_t((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv + 1*8)))).Flength)
		if len < uint64(2) || int32(*(*int8)(unsafe.Pointer(str))) != '-' || libc.Xstrncmp(tls, str, ts+70505, len) != 0 {
			return TCL_BREAK
		}
		if (*struct {
			f func(*libc.TLS, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetIntFromObj})).f(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp) != TCL_OK {
			return TCL_ERROR
		}
	}

	str = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetString})).f(tls, *(*uintptr)(unsafe.Pointer(objv)))
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+8 /* &ds */)
	wstr = (*struct {
		f func(*libc.TLS, uintptr, int32, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UtfToUniCharDString})).f(tls, str, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(objv)))).Flength, bp+8 /* &ds */)
	if (*Tcl_DString)(unsafe.Pointer(bp+8)).Flength == 0 {
		wstr = uintptr(0)
	}

	// Use the ignore the result.

	result = libc.XSendMessageTimeoutW(tls, uintptr(0xffff), uint32(WM_WININICHANGE),
		uint64(0), int64(wstr), uint32(SMTO_ABORTIFHUNG), UINT(*(*int32)(unsafe.Pointer(bp /* timeout */))), bp+224)
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+8 /* &ds */)

	objPtr = (*struct{ f func(*libc.TLS) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewObj})).f(tls)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, uintptr(0), objPtr, (*struct {
		f func(*libc.TLS, Tcl_WideInt) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewWideIntObj})).f(tls, result))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_ListObjAppendElement})).f(tls, uintptr(0), objPtr, (*struct {
		f func(*libc.TLS, Tcl_WideInt) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_NewWideIntObj})).f(tls, Tcl_WideInt(*(*DWORD_PTR)(unsafe.Pointer(bp + 224 /* sendResult */)))))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, objPtr)

	return TCL_OK
}

//----------------------------------------------------------------------
//
// AppendSystemError --
//
//	This routine formats a Windows system error message and places it into
//	the interpreter result.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sAppendSystemError(tls *libc.TLS, interp uintptr, error DWORD) { /* tclWinReg.c:1482:1: */
	bp := tls.Alloc(344)
	defer tls.Free(344)

	var length int32
	// var tMsgPtr uintptr at bp+48, 8

	var tMsgPtrPtr uintptr = bp + 48 /* &tMsgPtr */
	var msg uintptr
	// var id [24]int8 at bp+320, 24

	// var msgBuf [48]int8 at bp+56, 48

	// var ds Tcl_DString at bp+104, 216

	var resultPtr uintptr = (*struct {
		f func(*libc.TLS, uintptr) uintptr
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_GetObjResult})).f(tls, interp)

	if (*Tcl_Obj)(unsafe.Pointer(resultPtr)).FrefCount > 1 {
		resultPtr = (*struct {
			f func(*libc.TLS, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DuplicateObj})).f(tls, resultPtr)
	}
	length = int32(libc.XFormatMessageW(tls, uint32(FORMAT_MESSAGE_FROM_SYSTEM|
		FORMAT_MESSAGE_ALLOCATE_BUFFER), uintptr(0), error,
		uint32(int32(int32(WORD(SUBLANG_DEFAULT)))<<10|int32(WORD(LANG_NEUTRAL))), tMsgPtrPtr,
		uint32(0), uintptr(0)))
	if length == 0 {
		libc.Xsprintf(tls, bp+56, ts+70514, libc.VaList(bp, error))
		msg = bp + 56 /* &msgBuf[0] */
	} else {
		var msgPtr uintptr

		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringInit})).f(tls, bp+104 /* &ds */)
		(*struct {
			f func(*libc.TLS, uintptr, int32, uintptr) uintptr
		})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_UniCharToUtfDString})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* tMsgPtr */)), int32(libc.Xwcslen(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* tMsgPtr */)))), bp+104 /* &ds */)
		libc.XLocalFree(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* tMsgPtr */)))

		msgPtr = (*Tcl_DString)(unsafe.Pointer(bp + 104)).Fstring
		length = (*Tcl_DString)(unsafe.Pointer(bp + 104)).Flength

		// Trim the trailing CR/LF from the system message.

		if int32(*(*int8)(unsafe.Pointer(msgPtr + uintptr(length-1)))) == '\n' {
			length--
		}
		if int32(*(*int8)(unsafe.Pointer(msgPtr + uintptr(length-1)))) == '\r' {
			length--
		}
		*(*int8)(unsafe.Pointer(msgPtr + uintptr(length))) = int8(0)
		msg = msgPtr
	}

	libc.Xsprintf(tls, bp+320, ts+70533, libc.VaList(bp+8, error))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetErrorCode})).f(tls, interp, libc.VaList(bp+16, ts+70537 /* "WINDOWS" */, bp+320 /* &id[0] */, msg, uintptr(0)))
	(*struct {
		f func(*libc.TLS, uintptr, uintptr, int32)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_AppendToObj})).f(tls, resultPtr, msg, length)
	(*struct {
		f func(*libc.TLS, uintptr, uintptr)
	})(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_SetObjResult})).f(tls, interp, resultPtr)

	if length != 0 {
		(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*TclStubs)(unsafe.Pointer(XtclStubsPtr)).Ftcl_DStringFree})).f(tls, bp+104 /* &ds */)
	}
}

//----------------------------------------------------------------------
//
// ConvertDWORD --
//
//	This function determines whether a DWORD needs to be byte swapped, and
//	returns the appropriately swapped value.
//
// Results:
//	Returns a converted DWORD.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sConvertDWORD(tls *libc.TLS, type1 DWORD, value DWORD) DWORD { /* tclWinReg.c:1555:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	*(*DWORD)(unsafe.Pointer(bp /* order */)) = DWORD(1)
	var localType DWORD

	// Check to see if the low bit is in the first byte.

	if int32(*(*int8)(unsafe.Pointer(bp))) == 1 {
		localType = uint32(4)
	} else {
		localType = uint32(5)
	}
	if type1 != localType {
		return DWORD(LONG(DWORD(WORD(DWORD_PTR(WORD(int32(BYTE(DWORD_PTR(BYTE(DWORD_PTR(WORD(DWORD_PTR(value)>>16&uint64(0xffff)))>>8&uint64(0xff)))&uint64(0xff)))|int32(WORD(BYTE(DWORD_PTR(BYTE(DWORD_PTR(WORD(DWORD_PTR(value)>>16&uint64(0xffff)))&uint64(0xff)))&uint64(0xff))))<<8))&uint64(0xffff))) | DWORD(WORD(DWORD_PTR(WORD(int32(BYTE(DWORD_PTR(BYTE(DWORD_PTR(WORD(DWORD_PTR(value)&uint64(0xffff)))>>8&uint64(0xff)))&uint64(0xff)))|int32(WORD(BYTE(DWORD_PTR(BYTE(DWORD_PTR(WORD(DWORD_PTR(value)&uint64(0xffff)))&uint64(0xff)))&uint64(0xff))))<<8))&uint64(0xffff)))<<16))
	}
	return value
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The following variable is used to tell whether this module has been
// initialized.

var initialized2 int32 = 0 /* tclWinSerial.c:22:12 */

// The serialMutex locks around access to the initialized variable, and it is
// used to protect background threads from being terminated while they are
// using APIs that hold locks.

// Bit masks used in the flags field of the SerialInfo structure below.

// Bit masks used in the sharedFlags field of the SerialInfo structure below.

// Default time to block between checking status on the serial port.

// Define Win32 read/write error masks returned by ClearCommError()

// This structure describes per-instance data for a serial based channel.

type SerialInfo1 = struct {
	Fhandle        HANDLE
	FnextPtr       uintptr
	Fchannel       Tcl_Channel
	FvalidMask     int32
	FwatchMask     int32
	Fflags         int32
	Freadable      int32
	Fwritable      int32
	FblockTime     int32
	FlastEventTime uint32
	Ferror         DWORD
	FlastError     DWORD
	FsysBufRead    DWORD
	FsysBufWrite   DWORD
	F__ccgo_pad1   [4]byte
	FthreadId      Tcl_ThreadId
	FosRead        OVERLAPPED
	FosWrite       OVERLAPPED
	FwriteTI       uintptr
	FwriteThread   HANDLE
	FcsWrite       CRITICAL_SECTION
	FevWritable    HANDLE
	FwriteError    DWORD
	F__ccgo_pad2   [4]byte
	FwriteBuf      uintptr
	FwriteBufLen   int32
	FtoWrite       int32
	FwriteQueue    int32
	F__ccgo_pad3   [4]byte
} /* tclWinSerial.c:65:9 */

// The serialMutex locks around access to the initialized variable, and it is
// used to protect background threads from being terminated while they are
// using APIs that hold locks.

// Bit masks used in the flags field of the SerialInfo structure below.

// Bit masks used in the sharedFlags field of the SerialInfo structure below.

// Default time to block between checking status on the serial port.

// Define Win32 read/write error masks returned by ClearCommError()

// This structure describes per-instance data for a serial based channel.

type SerialInfo = SerialInfo1 /* tclWinSerial.c:116:3 */

type ThreadSpecificData17 = struct{ FfirstSerialPtr uintptr } /* tclWinSerial.c:125:3 */

var dataKey16 Tcl_ThreadDataKey /* tclWinSerial.c:127:26: */

// The following structure is what is added to the Tcl event queue when serial
// events are generated.

type SerialEvent1 = struct {
	Fheader  Tcl_Event
	FinfoPtr uintptr
} /* tclWinSerial.c:134:9 */

// The following structure is what is added to the Tcl event queue when serial
// events are generated.

type SerialEvent = SerialEvent1 /* tclWinSerial.c:141:3 */

// We don't use timeouts.

var no_timeout = COMMTIMEOUTS{ // WriteTotalTimeoutConstant
}                              /* tclWinSerial.c:147:21 */

// This structure describes the channel type structure for command serial
// based IO.

var serialChannelType = Tcl_ChannelType{
	FtypeName:         ts + 70545,
	Fversion:          uintptr(0x5),
	FcloseProc:        0, // Close proc.
	FinputProc:        0, // Input proc.
	FoutputProc:       0, // Seek proc.
	FsetOptionProc:    0, // Set option proc.
	FgetOptionProc:    0, // Get option proc.
	FwatchProc:        0, // Set up notifier to watch the channel.
	FgetHandleProc:    0, // Get an OS handle from channel.
	Fclose2Proc:       0, // close2proc.
	FblockModeProc:    0, // wide seek proc
	FthreadActionProc: 0, // truncate
} /* tclWinSerial.c:197:30 */

//----------------------------------------------------------------------
//
// SerialInit --
//
//	This function initializes the static variables for this file.
//
// Results:
//	None.
//
// Side effects:
//	Creates a new event source.
//
//----------------------------------------------------------------------

func sSerialInit(tls *libc.TLS) uintptr { /* tclWinSerial.c:233:27: */
	var tsdPtr uintptr

	// Check the initialized flag first, then check it again in the mutex.
	// This is a speed enhancement.

	if !(initialized2 != 0) {

		if !(initialized2 != 0) {
			initialized2 = 1
			XTcl_CreateExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sProcExitHandler1})), uintptr(0))
		}

	}

	tsdPtr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey16)))
	if tsdPtr == uintptr(0) {
		tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey16)), int32(unsafe.Sizeof(ThreadSpecificData17{})))
		(*ThreadSpecificData17)(unsafe.Pointer(tsdPtr)).FfirstSerialPtr = uintptr(0)
		XTcl_CreateEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{XSerialSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, int32)
		}{sSerialCheckProc})), uintptr(0))
		XTcl_CreateThreadExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sSerialExitHandler})), uintptr(0))
	}
	return tsdPtr
}

//----------------------------------------------------------------------
//
// SerialExitHandler --
//
//	This function is called to cleanup the serial module before Tcl is
//	unloaded.
//
// Results:
//	None.
//
// Side effects:
//	Removes the serial event source.
//
//----------------------------------------------------------------------

func sSerialExitHandler(tls *libc.TLS, clientData ClientData) { /* tclWinSerial.c:280:1: */
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey16)), int32(unsafe.Sizeof(ThreadSpecificData17{})))
	var infoPtr uintptr

	// Clear all eventually pending output. Otherwise Tcl's exit could totally
	// block, because it performs a blocking flush on all open channels. Note
	// that serial write operations may be blocked due to handshake.

	for infoPtr = (*ThreadSpecificData17)(unsafe.Pointer(tsdPtr)).FfirstSerialPtr; infoPtr != uintptr(0); infoPtr = (*SerialInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		libc.XPurgeComm(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle,
			uint32(PURGE_TXABORT|PURGE_RXABORT|PURGE_TXCLEAR|PURGE_RXCLEAR))
	}
	XTcl_DeleteEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{XSerialSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sSerialCheckProc})), uintptr(0))
}

//----------------------------------------------------------------------
//
// ProcExitHandler --
//
//	This function is called to cleanup the process list before Tcl is
//	unloaded.
//
// Results:
//	None.
//
// Side effects:
//	Resets the process list.
//
//----------------------------------------------------------------------

func sProcExitHandler1(tls *libc.TLS, clientData ClientData) { /* tclWinSerial.c:318:1: */

	initialized2 = 0

}

//----------------------------------------------------------------------
//
// SerialBlockTime --
//
//	Wrapper to set Tcl's block time in msec
//
// Results:
//	None.
//
// Side effects:
//	Updates the maximum blocking time.
//
//----------------------------------------------------------------------

func sSerialBlockTime(tls *libc.TLS, msec int32) { /* tclWinSerial.c:343:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var blockTime Tcl_Time at bp, 8

	(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fsec = int32(msec / 1000)
	(*Tcl_Time)(unsafe.Pointer(bp /* &blockTime */)).Fusec = int32(msec % 1000 * 1000)
	XTcl_SetMaxBlockTime(tls, bp)
}

//----------------------------------------------------------------------
//
// SerialGetMilliseconds --
//
//	Get current time in milliseconds,ignoring integer overruns.
//
// Results:
//	The current time.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSerialGetMilliseconds(tls *libc.TLS) uint32 { /* tclWinSerial.c:370:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var time Tcl_Time at bp, 8

	XTcl_GetTime(tls, bp)

	return uint32((*Tcl_Time)(unsafe.Pointer(bp)).Fsec*1000 + (*Tcl_Time)(unsafe.Pointer(bp)).Fusec/1000)
}

//----------------------------------------------------------------------
//
// SerialSetupProc --
//
//	This procedure is invoked before Tcl_DoOneEvent blocks waiting for an
//	event.
//
// Results:
//	None.
//
// Side effects:
//	Adjusts the block time if needed.
//
//----------------------------------------------------------------------

func XSerialSetupProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinSerial.c:397:1: */
	var infoPtr uintptr
	var block int32 = 1
	var msec int32 = 0x7fffffff // min. found block time
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey16)), int32(unsafe.Sizeof(ThreadSpecificData17{})))

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Look to see if any events handlers installed. If they are, do not
	// block.

	for infoPtr = (*ThreadSpecificData17)(unsafe.Pointer(tsdPtr)).FfirstSerialPtr; infoPtr != uintptr(0); infoPtr = (*SerialInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<2) != 0 {
			if libc.XWaitForSingleObject(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FevWritable, uint32(0)) != DWORD(258) {
				block = 0
				msec = func() int32 {
					if msec < (*SerialInfo)(unsafe.Pointer(infoPtr)).FblockTime {
						return msec
					}
					return (*SerialInfo)(unsafe.Pointer(infoPtr)).FblockTime
				}()
			}
		}
		if (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 {
			block = 0
			msec = func() int32 {
				if msec < (*SerialInfo)(unsafe.Pointer(infoPtr)).FblockTime {
					return msec
				}
				return (*SerialInfo)(unsafe.Pointer(infoPtr)).FblockTime
			}()
		}
	}

	if !(block != 0) {
		sSerialBlockTime(tls, msec)
	}
}

//----------------------------------------------------------------------
//
// SerialCheckProc --
//
//	This procedure is called by Tcl_DoOneEvent to check the serial event
//	source for events.
//
// Results:
//	None.
//
// Side effects:
//	May queue an event.
//
//----------------------------------------------------------------------

func sSerialCheckProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinSerial.c:452:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var infoPtr uintptr
	var evPtr uintptr
	var needEvent int32
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey16)), int32(unsafe.Sizeof(ThreadSpecificData17{})))
	// var cStat COMSTAT at bp, 16

	var time uint32

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Queue events for any ready serials that don't already have events
	// queued.

	for infoPtr = (*ThreadSpecificData17)(unsafe.Pointer(tsdPtr)).FfirstSerialPtr; infoPtr != uintptr(0); infoPtr = (*SerialInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*SerialInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<0) != 0 {
			continue
		}

		needEvent = 0

		// If WRITABLE watch mask is set look for infoPtr->evWritable object.

		if (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<2) != 0 && libc.XWaitForSingleObject(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FevWritable, uint32(0)) != DWORD(258) {
			(*SerialInfo)(unsafe.Pointer(infoPtr)).Fwritable = 1
			needEvent = 1
		}

		// If READABLE watch mask is set call ClearCommError to poll cbInQue.
		// Window errors are ignored here.

		if (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 {
			if libc.XClearCommError(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, infoPtr+52, bp) != 0 {
				// Look for characters already pending in windows queue. If
				// they are, poll.

				if (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 {
					// Force fileevent after serial read error.

					if (*COMSTAT)(unsafe.Pointer(bp)).FcbInQue > DWORD(0) || (*SerialInfo)(unsafe.Pointer(infoPtr)).Ferror&DWORD(CE_RXOVER|CE_OVERRUN|CE_RXPARITY|CE_FRAME|CE_BREAK) != 0 {
						(*SerialInfo)(unsafe.Pointer(infoPtr)).Freadable = 1
						time = sSerialGetMilliseconds(tls)
						if time-(*SerialInfo)(unsafe.Pointer(infoPtr)).FlastEventTime >=
							uint32((*SerialInfo)(unsafe.Pointer(infoPtr)).FblockTime) {
							needEvent = 1
							(*SerialInfo)(unsafe.Pointer(infoPtr)).FlastEventTime = time
						}
					}
				}
			}
		}

		// Queue an event if the serial is signaled for reading or writing.

		if needEvent != 0 {
			*(*int32)(unsafe.Pointer(infoPtr + 32)) |= int32(1) << 0
			evPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(SerialEvent{})))
			(*SerialEvent)(unsafe.Pointer(evPtr)).Fheader.Fproc = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, int32) int32
			}{sSerialEventProc}))
			(*SerialEvent)(unsafe.Pointer(evPtr)).FinfoPtr = infoPtr
			XTcl_QueueEvent(tls, evPtr, TCL_QUEUE_TAIL)
		}
	}
}

//----------------------------------------------------------------------
//
// SerialBlockProc --
//
//	Set blocking or non-blocking mode on channel.
//
// Results:
//	0 if successful, errno when failed.
//
// Side effects:
//	Sets the device into blocking or non-blocking mode.
//
//----------------------------------------------------------------------

func sSerialBlockProc(tls *libc.TLS, instanceData ClientData, mode int32) int32 { /* tclWinSerial.c:552:1: */
	var errorCode int32 = 0
	var infoPtr uintptr = instanceData

	// Only serial READ can be switched between blocking & nonblocking using
	// COMMTIMEOUTS. Serial write emulates blocking & nonblocking by the
	// SerialWriterThread.

	if mode == TCL_MODE_NONBLOCKING {
		*(*int32)(unsafe.Pointer(infoPtr + 32)) |= int32(1) << 1
	} else {
		*(*int32)(unsafe.Pointer(infoPtr + 32)) &= libc.CplInt32(int32(1) << 1)
	}
	return errorCode
}

//----------------------------------------------------------------------
//
// SerialCloseProc/SerialClose2Proc --
//
//	Closes a serial based IO channel.
//
// Results:
//	0 on success, errno otherwise.
//
// Side effects:
//	Closes the physical channel.
//
//----------------------------------------------------------------------

func sSerialCloseProc(tls *libc.TLS, instanceData ClientData, interp uintptr) int32 { /* tclWinSerial.c:591:1: */
	var serialPtr uintptr = instanceData
	var errorCode int32
	var result int32 = 0
	var infoPtr uintptr
	var nextPtrPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey16)), int32(unsafe.Sizeof(ThreadSpecificData17{})))

	errorCode = 0

	if (*SerialInfo)(unsafe.Pointer(serialPtr)).FvalidMask&(int32(1)<<1) != 0 {
		libc.XPurgeComm(tls, (*SerialInfo)(unsafe.Pointer(serialPtr)).Fhandle, uint32(PURGE_RXABORT|PURGE_RXCLEAR))
		libc.XCloseHandle(tls, (*SerialInfo)(unsafe.Pointer(serialPtr)).FosRead.FhEvent)
	}
	*(*int32)(unsafe.Pointer(serialPtr + 24)) &= libc.CplInt32(int32(1) << 1)

	if (*SerialInfo)(unsafe.Pointer(serialPtr)).FwriteThread != 0 {

		XTclPipeThreadStop(tls, serialPtr+144, (*SerialInfo)(unsafe.Pointer(serialPtr)).FwriteThread)

		libc.XCloseHandle(tls, (*SerialInfo)(unsafe.Pointer(serialPtr)).FosWrite.FhEvent)
		libc.XCloseHandle(tls, (*SerialInfo)(unsafe.Pointer(serialPtr)).FevWritable)
		libc.XCloseHandle(tls, (*SerialInfo)(unsafe.Pointer(serialPtr)).FwriteThread)
		(*SerialInfo)(unsafe.Pointer(serialPtr)).FwriteThread = uintptr(0)

		libc.XPurgeComm(tls, (*SerialInfo)(unsafe.Pointer(serialPtr)).Fhandle, uint32(PURGE_TXABORT|PURGE_TXCLEAR))
	}
	*(*int32)(unsafe.Pointer(serialPtr + 24)) &= libc.CplInt32(int32(1) << 2)

	libc.XDeleteCriticalSection(tls, serialPtr+160)

	// Don't close the Win32 handle if the handle is a standard channel during
	// the thread exit process. Otherwise, one thread may kill the stdio of
	// another.

	if !(XTclInThreadExit(tls) != 0) ||
		libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-10))) != (*SerialInfo)(unsafe.Pointer(serialPtr)).Fhandle &&
			libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-11))) != (*SerialInfo)(unsafe.Pointer(serialPtr)).Fhandle &&
			libc.XGetStdHandle(tls, libc.Uint32(libc.Uint32FromInt32(-12))) != (*SerialInfo)(unsafe.Pointer(serialPtr)).Fhandle {
		if libc.XCloseHandle(tls, (*SerialInfo)(unsafe.Pointer(serialPtr)).Fhandle) == FALSE {
			XTclWinConvertError(tls, libc.XGetLastError(tls))
			errorCode = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
		}
	}

	*(*int32)(unsafe.Pointer(serialPtr + 28)) &= (*SerialInfo)(unsafe.Pointer(serialPtr)).FvalidMask

	// Remove the file from the list of watched files.

	nextPtrPtr = tsdPtr
	infoPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
__1:
	if !(infoPtr != uintptr(0)) {
		goto __3
	}
	{
		if infoPtr == serialPtr {
			*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*SerialInfo)(unsafe.Pointer(infoPtr)).FnextPtr
			goto __3
		}

	}
	goto __2
__2:
	nextPtrPtr = infoPtr + 8
	infoPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
	goto __1
	goto __3
__3:
	;

	// Wrap the error file into a channel and give it to the cleanup routine.

	if (*SerialInfo)(unsafe.Pointer(serialPtr)).FwriteBuf != uintptr(0) {
		XTclpFree(tls, (*SerialInfo)(unsafe.Pointer(serialPtr)).FwriteBuf)
		(*SerialInfo)(unsafe.Pointer(serialPtr)).FwriteBuf = uintptr(0)
	}
	XTclpFree(tls, serialPtr)

	if errorCode == 0 {
		return result
	}
	return errorCode
}

func sSerialClose2Proc(tls *libc.TLS, instanceData ClientData, interp uintptr, flags int32) int32 { /* tclWinSerial.c:671:1: */
	if flags&(int32(1)<<1|int32(1)<<2) == 0 {
		return sSerialCloseProc(tls, instanceData, interp)
	}
	return EINVAL
}

//----------------------------------------------------------------------
//
// SerialBlockingRead --
//
//	Perform a blocking read into the buffer given. Returns count of how
//	many bytes were actually read, and an error indication.
//
// Results:
//	A count of how many bytes were read is returned and an error
//	indication is returned.
//
// Side effects:
//	Reads input from the actual channel.
//
//----------------------------------------------------------------------

func sSerialBlockingRead(tls *libc.TLS, infoPtr uintptr, buf LPVOID, bufSize DWORD, lpRead LPDWORD, osPtr LPOVERLAPPED) int32 { /* tclWinSerial.c:701:1: */
	//  Perform overlapped blocking read.
	//  1. Reset the overlapped event
	//  2. Start overlapped read operation
	//  3. Wait for completion

	// Set Offset to ZERO, otherwise NT4.0 may report an error.

	*(*DWORD)(unsafe.Pointer(osPtr + 16 /* &.Offset */)) = libc.AssignPtrUint32(osPtr+20, DWORD(0))
	libc.XResetEvent(tls, (*X_OVERLAPPED)(unsafe.Pointer(osPtr)).FhEvent)
	if !(libc.XReadFile(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, buf, bufSize, lpRead, osPtr) != 0) {
		if libc.XGetLastError(tls) != DWORD(997) {
			// ReadFile failed, but it isn't delayed. Report error.

			return FALSE
		} else {
			// Read is pending, wait for completion, timeout?

			if !(libc.XGetOverlappedResult(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, osPtr, lpRead, TRUE) != 0) {
				return FALSE
			}
		}
	} else {
		// ReadFile completed immediately.
	}
	return TRUE
}

//----------------------------------------------------------------------
//
// SerialBlockingWrite --
//
//	Perform a blocking write from the buffer given. Returns count of how
//	many bytes were actually written, and an error indication.
//
// Results:
//	A count of how many bytes were written is returned and an error
//	indication is returned.
//
// Side effects:
//	Writes output to the actual channel.
//
//----------------------------------------------------------------------

func sSerialBlockingWrite(tls *libc.TLS, infoPtr uintptr, buf LPVOID, bufSize DWORD, lpWritten LPDWORD, osPtr LPOVERLAPPED) int32 { /* tclWinSerial.c:764:1: */
	var result int32

	// Perform overlapped blocking write.
	//  1. Reset the overlapped event
	//  2. Remove these bytes from the output queue counter
	//  3. Start overlapped write operation
	//  3. Remove these bytes from the output queue counter
	//  4. Wait for completion
	//  5. Adjust the output queue counter

	libc.XResetEvent(tls, (*X_OVERLAPPED)(unsafe.Pointer(osPtr)).FhEvent)

	libc.XEnterCriticalSection(tls, infoPtr+160)
	*(*int32)(unsafe.Pointer(infoPtr + 232)) -= int32(bufSize)

	// Set Offset to ZERO, otherwise NT4.0 may report an error

	*(*DWORD)(unsafe.Pointer(osPtr + 16 /* &.Offset */)) = libc.AssignPtrUint32(osPtr+20, DWORD(0))
	result = libc.XWriteFile(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, buf, bufSize, lpWritten, osPtr)
	libc.XLeaveCriticalSection(tls, infoPtr+160)

	if result == FALSE {
		var err int32 = int32(libc.XGetLastError(tls))

		switch err {
		case 997:
			// Write is pending, wait for completion.

			if !(libc.XGetOverlappedResult(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, osPtr, lpWritten,
				TRUE) != 0) {
				return FALSE
			}
			break
			fallthrough
		case 1121:
			// Write timeout handled in SerialOutputProc.

			break
			fallthrough
		default:
			// WriteFile failed, but it isn't delayed. Report error.

			return FALSE
		}
	} else {
		// WriteFile completed immediately.
	}

	libc.XEnterCriticalSection(tls, infoPtr+160)
	*(*int32)(unsafe.Pointer(infoPtr + 232)) += int32(*(*DWORD)(unsafe.Pointer(lpWritten)) - bufSize)
	libc.XLeaveCriticalSection(tls, infoPtr+160)

	return TRUE
}

//----------------------------------------------------------------------
//
// SerialInputProc --
//
//	Reads input from the IO channel into the buffer given. Returns count
//	of how many bytes were actually read, and an error indication.
//
// Results:
//	A count of how many bytes were read is returned and an error
//	indication is returned in an output argument.
//
// Side effects:
//	Reads input from the actual channel.
//
//----------------------------------------------------------------------

func sSerialInputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, bufSize int32, errorCode uintptr) int32 { /* tclWinSerial.c:855:1: */
	bp := tls.Alloc(20)
	defer tls.Free(20)

	var infoPtr uintptr
	// var bytesRead DWORD at bp+16, 4

	// var cStat COMSTAT at bp, 16
	infoPtr = instanceData
	*(*DWORD)(unsafe.Pointer(bp + 16 /* bytesRead */)) = DWORD(0)

	*(*int32)(unsafe.Pointer(errorCode)) = 0

	// Check if there is a CommError pending from SerialCheckProc

	if !((*SerialInfo)(unsafe.Pointer(infoPtr)).Ferror&DWORD(CE_RXOVER|CE_OVERRUN|CE_RXPARITY|CE_FRAME|CE_BREAK) != 0) {
		goto __1
	}
	goto commError
__1:
	;

	// Look for characters already pending in windows queue. This is the
	// mainly restored good old code from Tcl8.0

	if !(libc.XClearCommError(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, infoPtr+52, bp) != 0) {
		goto __2
	}
	// Check for errors here, but not in the evSetup/Check procedures.

	if !((*SerialInfo)(unsafe.Pointer(infoPtr)).Ferror&DWORD(CE_RXOVER|CE_OVERRUN|CE_RXPARITY|CE_FRAME|CE_BREAK) != 0) {
		goto __3
	}
	goto commError
__3:
	;
	if !((*SerialInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<1) != 0) {
		goto __4
	}
	// NON_BLOCKING mode: Avoid blocking by reading more bytes than
	// available in input buffer.

	if !((*COMSTAT)(unsafe.Pointer(bp)).FcbInQue > DWORD(0)) {
		goto __6
	}
	if !(DWORD(bufSize) > (*COMSTAT)(unsafe.Pointer(bp)).FcbInQue) {
		goto __8
	}
	bufSize = int32((*COMSTAT)(unsafe.Pointer(bp /* &cStat */)).FcbInQue)
__8:
	;
	goto __7
__6:
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = libc.AssignPtrInt32(errorCode, EWOULDBLOCK)
	return -1
__7:
	;
	goto __5
__4:
	// BLOCKING mode: Tcl trys to read a full buffer of 4 kBytes here.

	if !((*COMSTAT)(unsafe.Pointer(bp)).FcbInQue > DWORD(0)) {
		goto __9
	}
	if !(DWORD(bufSize) > (*COMSTAT)(unsafe.Pointer(bp)).FcbInQue) {
		goto __11
	}
	bufSize = int32((*COMSTAT)(unsafe.Pointer(bp /* &cStat */)).FcbInQue)
__11:
	;
	goto __10
__9:
	bufSize = 1
__10:
	;
__5:
	;
__2:
	;

	if !(bufSize == 0) {
		goto __12
	}
	return int32(libc.AssignPtrUint32(bp+16 /* bytesRead */, DWORD(0)))
__12:
	;

	// Perform blocking read. Doesn't block in non-blocking mode, because we
	// checked the number of available bytes.

	if !(sSerialBlockingRead(tls, infoPtr, buf, DWORD(bufSize), bp+16,
		infoPtr+80) == FALSE) {
		goto __13
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	*(*int32)(unsafe.Pointer(errorCode)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
	return -1
__13:
	;
	return int32(*(*DWORD)(unsafe.Pointer(bp + 16 /* bytesRead */)))

commError:
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FlastError = (*SerialInfo)(unsafe.Pointer(infoPtr)).Ferror
	// save last error code
	(*SerialInfo)(unsafe.Pointer(infoPtr)).Ferror = DWORD(0) // reset error code
	*(*int32)(unsafe.Pointer(errorCode)) = EIO               // to return read-error only once
	return -1
}

//----------------------------------------------------------------------
//
// SerialOutputProc --
//
//	Writes the given output on the IO channel. Returns count of how many
//	characters were actually written, and an error indication.
//
// Results:
//	A count of how many characters were written is returned and an error
//	indication is returned in an output argument.
//
// Side effects:
//	Writes output on the actual channel.
//
//----------------------------------------------------------------------

func sSerialOutputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, toWrite int32, errorCode uintptr) int32 { /* tclWinSerial.c:962:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var infoPtr uintptr
	// var bytesWritten DWORD at bp, 4

	var timeout DWORD
	infoPtr = instanceData

	*(*int32)(unsafe.Pointer(errorCode)) = 0

	// At EXIT Tcl trys to flush all open channels in blocking mode. We avoid
	// blocking output after ExitProc or CloseHandler(chan) has been called by
	// checking the corrresponding variables.

	if !(!(initialized2 != 0) || XTclInExit(tls) != 0) {
		goto __1
	}
	return toWrite
__1:
	;

	// Check if there is a CommError pending from SerialCheckProc

	if !((*SerialInfo)(unsafe.Pointer(infoPtr)).Ferror&DWORD(CE_TXFULL|CE_PTO) != 0) {
		goto __2
	}
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FlastError = (*SerialInfo)(unsafe.Pointer(infoPtr)).Ferror
	// save last error code
	(*SerialInfo)(unsafe.Pointer(infoPtr)).Ferror = DWORD(0) // reset error code
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EIO
	goto error
__2:
	;

	if (*SerialInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<1) != 0 {
		timeout = uint32(0)
	} else {
		timeout = INFINITE
	}
	if !(libc.XWaitForSingleObject(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FevWritable, timeout) == DWORD(258)) {
		goto __3
	}
	// The writer thread is blocked waiting for a write to complete and
	// the channel is in non-blocking mode.

	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EWOULDBLOCK
	goto error1
__3:
	;

	// Check for a background error on the last write.

	if !((*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteError != 0) {
		goto __4
	}
	XTclWinConvertError(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteError)
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteError = DWORD(0)
	goto error1
__4:
	;

	// Remember the number of bytes in output queue

	libc.XEnterCriticalSection(tls, infoPtr+160)
	*(*int32)(unsafe.Pointer(infoPtr + 232)) += toWrite
	libc.XLeaveCriticalSection(tls, infoPtr+160)

	if !((*SerialInfo)(unsafe.Pointer(infoPtr)).Fflags&(int32(1)<<1) != 0) {
		goto __5
	}
	// The serial is non-blocking, so copy the data into the output buffer
	// and restart the writer thread.

	if !(toWrite > (*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteBufLen) {
		goto __7
	}
	// Reallocate the buffer to be large enough to hold the data.

	if !((*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteBuf != 0) {
		goto __8
	}
	XTclpFree(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteBuf)
__8:
	;
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteBufLen = toWrite
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteBuf = XTcl_Alloc(tls, uint32(toWrite))
__7:
	;
	libc.Xmemcpy(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteBuf, buf, uint64(toWrite))
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FtoWrite = toWrite
	libc.XResetEvent(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FevWritable)
	sTclPipeThreadSignal1(tls, infoPtr+144)
	*(*DWORD)(unsafe.Pointer(bp /* bytesWritten */)) = DWORD(toWrite)

	goto __6
__5:
	// In the blocking case, just try to write the buffer directly. This
	// avoids an unnecessary copy.

	if !!(sSerialBlockingWrite(tls, infoPtr, buf, DWORD(toWrite),
		bp, infoPtr+112) != 0) {
		goto __9
	}
	goto writeError
__9:
	;
	if !(*(*DWORD)(unsafe.Pointer(bp)) != DWORD(toWrite)) {
		goto __10
	}
	// Write timeout.
	*(*DWORD)(unsafe.Pointer(infoPtr + 56)) |= DWORD(CE_PTO)
	*(*int32)(unsafe.Pointer(libc.X_errno(tls))) = EIO
	goto error
__10:
	;
__6:
	;

	return int32(*(*DWORD)(unsafe.Pointer(bp /* bytesWritten */)))

writeError:
	XTclWinConvertError(tls, libc.XGetLastError(tls))

error:
	// Reset the output queue counter on error during blocking output

	// EnterCriticalSection(&infoPtr->csWrite);
	// infoPtr->writeQueue = 0;
	// LeaveCriticalSection(&infoPtr->csWrite);
error1:
	*(*int32)(unsafe.Pointer(errorCode)) = *(*int32)(unsafe.Pointer(libc.X_errno(tls)))
	return -1
}

//----------------------------------------------------------------------
//
// SerialEventProc --
//
//	This function is invoked by Tcl_ServiceEvent when a file event reaches
//	the front of the event queue. This procedure invokes Tcl_NotifyChannel
//	on the serial.
//
// Results:
//	Returns 1 if the event was handled, meaning it should be removed from
//	the queue. Returns 0 if the event was not handled, meaning it should
//	stay on the queue. The only time the event isn't handled is if the
//	TCL_FILE_EVENTS flag bit isn't set.
//
// Side effects:
//	Whatever the notifier callback does.
//
//----------------------------------------------------------------------

func sSerialEventProc(tls *libc.TLS, evPtr uintptr, flags int32) int32 { /* tclWinSerial.c:1109:1: */
	var serialEvPtr uintptr = evPtr
	var infoPtr uintptr
	var mask int32
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey16)), int32(unsafe.Sizeof(ThreadSpecificData17{})))

	if !(flags&(int32(1)<<3) != 0) {
		return 0
	}

	// Search through the list of watched serials for the one whose handle
	// matches the event. We do this rather than simply dereferencing the
	// handle in the event so that serials can be deleted while the event is
	// in the queue.

	for infoPtr = (*ThreadSpecificData17)(unsafe.Pointer(tsdPtr)).FfirstSerialPtr; infoPtr != uintptr(0); infoPtr = (*SerialInfo)(unsafe.Pointer(infoPtr)).FnextPtr {
		if (*SerialEvent)(unsafe.Pointer(serialEvPtr)).FinfoPtr == infoPtr {
			*(*int32)(unsafe.Pointer(infoPtr + 32)) &= libc.CplInt32(int32(1) << 0)
			break
		}
	}

	// Remove stale events.

	if !(infoPtr != 0) {
		return 1
	}

	// Check to see if the serial is readable. Note that we can't tell if a
	// serial is writable, so we always report it as being writable unless we
	// have detected EOF.

	mask = 0
	if (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<2) != 0 {
		if (*SerialInfo)(unsafe.Pointer(infoPtr)).Fwritable != 0 {
			mask = mask | int32(1)<<2
			(*SerialInfo)(unsafe.Pointer(infoPtr)).Fwritable = 0
		}
	}

	if (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask&(int32(1)<<1) != 0 {
		if (*SerialInfo)(unsafe.Pointer(infoPtr)).Freadable != 0 {
			mask = mask | int32(1)<<1
			(*SerialInfo)(unsafe.Pointer(infoPtr)).Freadable = 0
		}
	}

	// Inform the channel of the events.

	XTcl_NotifyChannel(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel, (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask&mask)
	return 1
}

//----------------------------------------------------------------------
//
// SerialWatchProc --
//
//	Called by the notifier to set up to watch for events on this channel.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSerialWatchProc(tls *libc.TLS, instanceData ClientData, mask int32) { /* tclWinSerial.c:1192:1: */
	var nextPtrPtr uintptr
	var ptr uintptr
	var infoPtr uintptr = instanceData
	var oldMask int32 = (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey16)), int32(unsafe.Sizeof(ThreadSpecificData17{})))

	// Since the file is always ready for events, we set the block time so we
	// will poll.

	(*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask = mask & (*SerialInfo)(unsafe.Pointer(infoPtr)).FvalidMask
	if (*SerialInfo)(unsafe.Pointer(infoPtr)).FwatchMask != 0 {
		if !(oldMask != 0) {
			(*SerialInfo)(unsafe.Pointer(infoPtr)).FnextPtr = (*ThreadSpecificData17)(unsafe.Pointer(tsdPtr)).FfirstSerialPtr
			(*ThreadSpecificData17)(unsafe.Pointer(tsdPtr)).FfirstSerialPtr = infoPtr
		}
		sSerialBlockTime(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FblockTime)
	} else if oldMask != 0 {
		// Remove the serial port from the list of watched serial ports.

		nextPtrPtr = tsdPtr
		ptr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
	__1:
		if !(ptr != uintptr(0)) {
			goto __3
		}
		{
			if infoPtr == ptr {
				*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*SerialInfo)(unsafe.Pointer(ptr)).FnextPtr
				goto __3
			}

		}
		goto __2
	__2:
		nextPtrPtr = ptr + 8
		ptr = *(*uintptr)(unsafe.Pointer(nextPtrPtr))
		goto __1
		goto __3
	__3:
	}
}

//----------------------------------------------------------------------
//
// SerialGetHandleProc --
//
//	Called from Tcl_GetChannelHandle to retrieve OS handles from inside a
//	command serial port based channel.
//
// Results:
//	Returns TCL_OK with the fd in handlePtr, or TCL_ERROR if there is no
//	handle for the specified direction.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSerialGetHandleProc(tls *libc.TLS, instanceData ClientData, direction int32, handlePtr uintptr) int32 { /* tclWinSerial.c:1249:1: */
	var infoPtr uintptr = instanceData

	*(*ClientData)(unsafe.Pointer(handlePtr)) = (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle
	return TCL_OK
}

//----------------------------------------------------------------------
//
// SerialWriterThread --
//
//	This function runs in a separate thread and writes data onto a serial.
//
// Results:
//	Always returns 0.
//
// Side effects:
//	Signals the main thread when an output operation is completed. May
//	cause the main thread to wake up by posting a message.
//
//----------------------------------------------------------------------

func sSerialWriterThread(tls *libc.TLS, arg LPVOID) DWORD { /* tclWinSerial.c:1278:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)) = arg
	var infoPtr uintptr = uintptr(0) // access info only after success init/wait
	// var bytesWritten DWORD at bp+8, 4

	var toWrite DWORD
	var buf uintptr
	// var myWrite OVERLAPPED at bp+16, 32
	// Have an own OVERLAPPED in this thread.

	for {
		// Wait for the main thread to signal before attempting to write.
		if !(XTclPipeThreadWaitForSignal(tls, bp) != 0) {
			// exit
			break
		}
		infoPtr = (*TclPipeThreadInfo)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pipeTI */)))).FclientData

		buf = (*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteBuf
		toWrite = DWORD((*SerialInfo)(unsafe.Pointer(infoPtr)).FtoWrite)

		(*OVERLAPPED)(unsafe.Pointer(bp + 16 /* &myWrite */)).FhEvent = libc.XCreateEventW(tls, uintptr(0), TRUE, FALSE, uintptr(0))

		// Loop until all of the bytes are written or an error occurs.

		for toWrite > DWORD(0) {
			// Check for pending writeError. Ignore all write operations until
			// the user has been notified.

			if (*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteError != 0 {
				break
			}
			if sSerialBlockingWrite(tls, infoPtr, buf, toWrite,
				bp+8, bp+16) == FALSE {
				(*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteError = libc.XGetLastError(tls)
				break
			}
			if *(*DWORD)(unsafe.Pointer(bp + 8)) != toWrite {
				// Write timeout.

				(*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteError = DWORD(29)
				break
			}
			toWrite = toWrite - *(*DWORD)(unsafe.Pointer(bp + 8))
			buf += uintptr(*(*DWORD)(unsafe.Pointer(bp + 8 /* bytesWritten */)))
		}

		libc.XCloseHandle(tls, (*OVERLAPPED)(unsafe.Pointer(bp+16 /* &myWrite */)).FhEvent)

		// Signal the main thread by signalling the evWritable event and then
		// waking up the notifier thread.

		libc.XSetEvent(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FevWritable)

		// Alert the foreground thread. Note that we need to treat this like a
		// critical section so the foreground thread does not terminate this
		// thread while we are holding a mutex in the notifier code.

		if (*SerialInfo)(unsafe.Pointer(infoPtr)).FthreadId != uintptr(0) {
			// TIP #218: When in flight ignore the event, no one will receive
			// it anyway.

			XTcl_ThreadAlert(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FthreadId)
		}

	}

	// Worker exit, so inform the main thread or free TI-structure (if owned)
	XTclPipeThreadExit(tls, bp)

	return DWORD(0)
}

//----------------------------------------------------------------------
//
// TclWinSerialOpen --
//
//	Opens or Reopens the serial port with the OVERLAPPED FLAG set
//
// Results:
//	Returns the new handle, or INVALID_HANDLE_VALUE.
//	If an existing channel is specified it is closed and reopened.
//
// Side effects:
//	May close/reopen the original handle
//
//----------------------------------------------------------------------

func XTclWinSerialOpen(tls *libc.TLS, handle HANDLE, name uintptr, access DWORD) HANDLE { /* tclWinSerial.c:1383:1: */
	sSerialInit(tls)

	// If an open channel is specified, close it

	if handle != libc.UintptrFromInt64(int64(-1)) && libc.XCloseHandle(tls, handle) == FALSE {
		return libc.UintptrFromInt64(int64(-1))
	}

	// Multithreaded I/O needs the overlapped flag set otherwise
	// ClearCommError blocks under Windows NT/2000 until serial output is
	// finished

	handle = libc.XCreateFileW(tls, name, access, uint32(0), uintptr(0), uint32(OPEN_EXISTING),
		uint32(FILE_FLAG_OVERLAPPED), uintptr(0))

	return handle
}

//----------------------------------------------------------------------
//
// TclWinOpenSerialChannel --
//
//	Constructs a Serial port channel for the specified standard OS handle.
//	This is a helper function to break up the construction of channels
//	into File, Console, or Serial.
//
// Results:
//	Returns the new channel, or NULL.
//
// Side effects:
//	May open the channel
//
//----------------------------------------------------------------------

func XTclWinOpenSerialChannel(tls *libc.TLS, handle HANDLE, channelName uintptr, permissions int32) Tcl_Channel { /* tclWinSerial.c:1429:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var infoPtr uintptr

	sSerialInit(tls)

	infoPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(SerialInfo{})))
	libc.Xmemset(tls, infoPtr, 0, uint64(unsafe.Sizeof(SerialInfo{})))

	(*SerialInfo)(unsafe.Pointer(infoPtr)).FvalidMask = permissions
	(*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle = handle
	(*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel = uintptr(0)
	(*SerialInfo)(unsafe.Pointer(infoPtr)).Freadable = 0
	(*SerialInfo)(unsafe.Pointer(infoPtr)).Fwritable = 1
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FtoWrite = libc.AssignPtrInt32(infoPtr+232, 0)
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FblockTime = SERIAL_DEFAULT_BLOCKTIME
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FlastEventTime = uint32(0)
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FlastError = libc.AssignPtrUint32(infoPtr+52, DWORD(0))
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FthreadId = XTcl_GetCurrentThread(tls)
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufRead = DWORD(4096)
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufWrite = DWORD(4096)

	// Use the pointer to keep the channel names unique, in case the handles
	// are shared between multiple channels (stdin/stdout).

	libc.Xsprintf(tls, channelName, ts+67509, libc.VaList(bp, Size_t(infoPtr)))

	(*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel = XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&serialChannelType)), channelName,
		infoPtr, permissions)

	libc.XSetupComm(tls, handle, (*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufRead, (*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufWrite)
	libc.XPurgeComm(tls, handle,
		uint32(PURGE_TXABORT|PURGE_RXABORT|PURGE_TXCLEAR|PURGE_RXCLEAR))

	// Default is blocking.

	libc.XSetCommTimeouts(tls, handle, uintptr(unsafe.Pointer(&no_timeout)))

	libc.XInitializeCriticalSection(tls, infoPtr+160)
	if permissions&(int32(1)<<1) != 0 {
		(*SerialInfo)(unsafe.Pointer(infoPtr)).FosRead.FhEvent = libc.XCreateEventW(tls, uintptr(0), TRUE, FALSE, uintptr(0))
	}
	if permissions&(int32(1)<<2) != 0 {
		// Initially the channel is writable and the writeThread is idle.

		(*SerialInfo)(unsafe.Pointer(infoPtr)).FosWrite.FhEvent = libc.XCreateEventW(tls, uintptr(0), TRUE, FALSE, uintptr(0))
		(*SerialInfo)(unsafe.Pointer(infoPtr)).FevWritable = libc.XCreateEventW(tls, uintptr(0), TRUE, TRUE, uintptr(0))
		(*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteThread = libc.XCreateThread(tls, uintptr(0), uint64(256), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPVOID) DWORD }{sSerialWriterThread})),
			XTclPipeThreadCreateTI(tls, infoPtr+144, infoPtr,
				(*SerialInfo)(unsafe.Pointer(infoPtr)).FevWritable), uint32(0), uintptr(0))
	}

	// Files have default translation of AUTO and ^Z eof char, which means
	// that a ^Z will be accepted as EOF when reading.

	XTcl_SetChannelOption(tls, uintptr(0), (*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel, ts+34223, ts+34236)
	XTcl_SetChannelOption(tls, uintptr(0), (*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel, ts+34214, ts+38537)

	return (*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel
}

//----------------------------------------------------------------------
//
// SerialErrorStr --
//
//	Converts a Win32 serial error code to a list of readable errors.
//
// Results:
//	None.
//
// Side effects:
//	Generates readable errors in the supplied DString.
//
//----------------------------------------------------------------------

func sSerialErrorStr(tls *libc.TLS, error DWORD, dsPtr uintptr) { /* tclWinSerial.c:1519:1: */
	bp := tls.Alloc(33)
	defer tls.Free(33)

	if error&DWORD(CE_RXOVER) != 0 {
		XTcl_DStringAppendElement(tls, dsPtr, ts+70552)
	}
	if error&DWORD(CE_OVERRUN) != 0 {
		XTcl_DStringAppendElement(tls, dsPtr, ts+70559)
	}
	if error&DWORD(CE_RXPARITY) != 0 {
		XTcl_DStringAppendElement(tls, dsPtr, ts+70567)
	}
	if error&DWORD(CE_FRAME) != 0 {
		XTcl_DStringAppendElement(tls, dsPtr, ts+70576)
	}
	if error&DWORD(CE_BREAK) != 0 {
		XTcl_DStringAppendElement(tls, dsPtr, ts+70582)
	}
	if error&DWORD(CE_TXFULL) != 0 {
		XTcl_DStringAppendElement(tls, dsPtr, ts+70588)
	}
	if error&DWORD(CE_PTO) != 0 { // PTO used to signal WRITE-TIMEOUT
		XTcl_DStringAppendElement(tls, dsPtr, ts+67761)
	}
	if error&libc.CplUint32(DWORD(CE_RXOVER|CE_OVERRUN|CE_RXPARITY|CE_FRAME|CE_BREAK|(CE_TXFULL|CE_PTO))) != 0 {
		// var buf [25]int8 at bp+8, 25

		libc.XwsprintfA(tls, bp+8, ts+909, libc.VaList(bp, error))
		XTcl_DStringAppendElement(tls, dsPtr, bp+8)
	}
}

//----------------------------------------------------------------------
//
// SerialModemStatusStr --
//
//	Converts a Win32 modem status list of readable flags
//
// Result:
//	None.
//
// Side effects:
//	Appends modem status flag strings to the given DString.
//
//----------------------------------------------------------------------

func sSerialModemStatusStr(tls *libc.TLS, status DWORD, dsPtr uintptr) { /* tclWinSerial.c:1569:1: */
	XTcl_DStringAppendElement(tls, dsPtr, ts+70595)
	XTcl_DStringAppendElement(tls, dsPtr, func() uintptr {
		if status&DWORD(0x10) != 0 {
			return ts + 18937 /* "1" */
		}
		return ts + 18935 /* "0" */
	}())
	XTcl_DStringAppendElement(tls, dsPtr, ts+70599)
	XTcl_DStringAppendElement(tls, dsPtr, func() uintptr {
		if status&DWORD(0x20) != 0 {
			return ts + 18937 /* "1" */
		}
		return ts + 18935 /* "0" */
	}())
	XTcl_DStringAppendElement(tls, dsPtr, ts+70603)
	XTcl_DStringAppendElement(tls, dsPtr, func() uintptr {
		if status&DWORD(0x40) != 0 {
			return ts + 18937 /* "1" */
		}
		return ts + 18935 /* "0" */
	}())
	XTcl_DStringAppendElement(tls, dsPtr, ts+70608)
	XTcl_DStringAppendElement(tls, dsPtr, func() uintptr {
		if status&DWORD(0x80) != 0 {
			return ts + 18937 /* "1" */
		}
		return ts + 18935 /* "0" */
	}())
}

//----------------------------------------------------------------------
//
// SerialSetOptionProc --
//
//	Sets an option on a channel.
//
// Results:
//	A standard Tcl result. Also sets the interp's result on error if
//	interp is not NULL.
//
// Side effects:
//	May modify an option on a device.
//
//----------------------------------------------------------------------

func sSerialSetOptionProc(tls *libc.TLS, instanceData ClientData, interp uintptr, optionName uintptr, value uintptr) int32 { /* tclWinSerial.c:1601:1: */
	bp := tls.Alloc(680)
	defer tls.Free(680)

	var infoPtr uintptr
	// var dcb DCB at bp+384, 32

	var result WINBOOL
	// var flag WINBOOL at bp+652, 4

	var len Size_t
	var vlen Size_t
	// var ds Tcl_DString at bp+416, 216

	var native uintptr
	// var argc int32 at bp+632, 4

	// var argv uintptr at bp+640, 8

	// var character int32 at bp+648, 4

	var charLen int32
	var i int32
	var res int32
	// -sysbuffer 4096 or -sysbuffer {64536 4096}

	var inSize Size_t
	var outSize Size_t
	// var msec int32 at bp+656, 4

	// var tout COMMTIMEOUTS at bp+660, 20

	infoPtr = instanceData

	// Parse options. This would be far easier if we had Tcl_Objs to work with
	// as that would let us use Tcl_GetIndexFromObj()...

	len = libc.Xstrlen(tls, optionName)
	vlen = libc.Xstrlen(tls, value)

	// Option -mode baud,parity,databits,stopbits

	if !(len > uint64(2) && libc.Xstrncmp(tls, optionName, ts+70612, len) == 0) {
		goto __1
	}
	if !!(libc.XGetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+384) != 0) {
		goto __2
	}
	goto getStateFailed
__2:
	;
	native = XTcl_WinUtfToTChar(tls, value, -1, bp+416)
	result = libc.XBuildCommDCBW(tls, native, bp+384)
	XTcl_DStringFree(tls, bp+416)

	if !(result == FALSE) {
		goto __3
	}
	if !(interp != uintptr(0)) {
		goto __4
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+70618,
		libc.VaList(bp, value)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+70676, uintptr(0)))
__4:
	;
	return TCL_ERROR
__3:
	;

	// Default settings for serial communications.

	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(TRUE), 0, 0x1)
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(FALSE), 10, 0x400)
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(FALSE), 11, 0x800)
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(FALSE), 14, 0x4000)

	if !!(libc.XSetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+384) != 0) {
		goto __5
	}
	goto setStateFailed
__5:
	;
	return TCL_OK
__1:
	;

	// Option -handshake none|xonxoff|rtscts|dtrdsr

	if !(len > uint64(1) && libc.Xstrncmp(tls, optionName, ts+70687, len) == 0) {
		goto __6
	}
	if !!(libc.XGetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+384) != 0) {
		goto __7
	}
	goto getStateFailed
__7:
	;

	// Reset all handshake options. DTR and RTS are ON by default.

	libc.SetBitFieldPtr32Uint32(bp+384+8, libc.AssignBitFieldPtr32Uint32(bp+384+8, DWORD(FALSE), 1, 9, 0x200), 8, 0x100)
	libc.SetBitFieldPtr32Uint32(bp+384+8, libc.AssignBitFieldPtr32Uint32(bp+384+8, libc.AssignBitFieldPtr32Uint32(bp+384+8, DWORD(FALSE), 1, 6, 0x40), 1, 3, 0x8), 2, 0x4)
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(DTR_CONTROL_ENABLE), 4, 0x30)
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(RTS_CONTROL_ENABLE), 12, 0x3000)
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(FALSE), 7, 0x80)

	// Adjust the handshake limits. Yes, the XonXoff limits seem to
	// influence even hardware handshake.

	(*DCB)(unsafe.Pointer(bp + 384 /* &dcb */)).FXonLim = WORD((*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufRead * DWORD(1) / DWORD(2))
	(*DCB)(unsafe.Pointer(bp + 384 /* &dcb */)).FXoffLim = WORD((*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufRead * DWORD(1) / DWORD(4))

	if !(libc.X_strnicmp(tls, value, ts+8740, vlen) == 0) {
		goto __8
	}
	// Leave all handshake options disabled.
	goto __9
__8:
	if !(libc.X_strnicmp(tls, value, ts+70698, vlen) == 0) {
		goto __10
	}
	libc.SetBitFieldPtr32Uint32(bp+384+8, libc.AssignBitFieldPtr32Uint32(bp+384+8, DWORD(TRUE), 1, 9, 0x200), 8, 0x100)
	goto __11
__10:
	if !(libc.X_strnicmp(tls, value, ts+70706, vlen) == 0) {
		goto __12
	}
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(TRUE), 2, 0x4)
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(RTS_CONTROL_HANDSHAKE), 12, 0x3000)
	goto __13
__12:
	if !(libc.X_strnicmp(tls, value, ts+70713, vlen) == 0) {
		goto __14
	}
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(TRUE), 3, 0x8)
	libc.SetBitFieldPtr32Uint32(bp+384+8, DWORD(DTR_CONTROL_HANDSHAKE), 4, 0x30)
	goto __15
__14:
	if !(interp != uintptr(0)) {
		goto __16
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+70720, libc.VaList(bp+40, value)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7444, ts+70798, uintptr(0)))
__16:
	;
	return TCL_ERROR
__15:
	;
__13:
	;
__11:
	;
__9:
	;

	if !!(libc.XSetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+384) != 0) {
		goto __17
	}
	goto setStateFailed
__17:
	;
	return TCL_OK
__6:
	;

	// Option -xchar {\x11 \x13}

	if !(len > uint64(1) && libc.Xstrncmp(tls, optionName, ts+70808, len) == 0) {
		goto __18
	}
	if !!(libc.XGetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+384) != 0) {
		goto __19
	}
	goto getStateFailed
__19:
	;

	if !(XTcl_SplitList(tls, interp, value, bp+632, bp+640) == TCL_ERROR) {
		goto __20
	}
	return TCL_ERROR
__20:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 632)) != 2) {
		goto __21
	}
badXchar:
	if !(interp != uintptr(0)) {
		goto __22
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+70815, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+80, ts+4178, ts+7444, ts+70899, uintptr(0)))
__22:
	;
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 640)))
	return TCL_ERROR
__21:
	;

	// These dereferences are safe, even in the zero-length string cases,
	// because that just makes the xon/xoff character into NUL. When the
	// character looks like it is UTF-8 encoded, decode it before casting
	// into the format required for the Win guts. Note that this does not
	// convert character sets; it is expected that when people set the
	// control characters to something large and custom, they'll know the
	// hex/octal value rather than the printable form.

	(*DCB)(unsafe.Pointer(bp + 384 /* &dcb */)).FXonChar = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640 /* argv */))))))
	(*DCB)(unsafe.Pointer(bp + 384 /* &dcb */)).FXoffChar = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640 /* argv */)) + 1*8))))
	if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)))))))&0x80 != 0 || int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)) + 1*8)))))&0x80 != 0) {
		goto __23
	}

	charLen = XTclUtfToUCS4(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640 /* argv */)))), bp+648)
	if !(*(*int32)(unsafe.Pointer(bp + 648))&libc.CplInt32(0xFF) != 0 || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)))) + uintptr(charLen))) != 0) {
		goto __24
	}
	goto badXchar
__24:
	;
	(*DCB)(unsafe.Pointer(bp + 384 /* &dcb */)).FXonChar = int8(*(*int32)(unsafe.Pointer(bp + 648 /* character */)))
	charLen = XTclUtfToUCS4(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640 /* argv */)) + 1*8)), bp+648)
	if !(*(*int32)(unsafe.Pointer(bp + 648))&libc.CplInt32(0xFF) != 0 || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)) + 1*8)) + uintptr(charLen))) != 0) {
		goto __25
	}
	goto badXchar
__25:
	;
	(*DCB)(unsafe.Pointer(bp + 384 /* &dcb */)).FXoffChar = int8(*(*int32)(unsafe.Pointer(bp + 648 /* character */)))
__23:
	;
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 640)))

	if !!(libc.XSetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+384) != 0) {
		goto __26
	}
	goto setStateFailed
__26:
	;
	return TCL_OK
__18:
	;

	// Option -ttycontrol {DTR 1 RTS 0 BREAK 0}

	if !(len > uint64(4) && libc.Xstrncmp(tls, optionName, ts+70905, len) == 0) {
		goto __27
	}
	res = TCL_OK

	if !(XTcl_SplitList(tls, interp, value, bp+632, bp+640) == TCL_ERROR) {
		goto __28
	}
	return TCL_ERROR
__28:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 632))%2 == 1) {
		goto __29
	}
	if !(interp != uintptr(0)) {
		goto __30
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+70917, libc.VaList(bp+112, value)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+120, ts+4178, ts+7444, ts+70988, uintptr(0)))
__30:
	;
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 640)))
	return TCL_ERROR
__29:
	;

	i = 0
__31:
	if !(i < *(*int32)(unsafe.Pointer(bp + 632))-1) {
		goto __33
	}
	if !(XTcl_GetBoolean(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)) + uintptr(i+1)*8)), bp+652) == TCL_ERROR) {
		goto __34
	}
	res = TCL_ERROR
	goto __33
__34:
	;
	if !(libc.X_strnicmp(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)) + uintptr(i)*8)), ts+70999, libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)) + uintptr(i)*8)))) == 0) {
		goto __35
	}
	if !!(libc.XEscapeCommFunction(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle,
		func() uint32 {
			if *(*WINBOOL)(unsafe.Pointer(bp + 652)) != 0 {
				return uint32(SETDTR)
			}
			return uint32(CLRDTR)
		}()) != 0) {
		goto __37
	}
	if !(interp != uintptr(0)) {
		goto __38
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+71003, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+152, ts+4178, ts+7949,
		ts+71024, ts+71035, uintptr(0)))
__38:
	;
	res = TCL_ERROR
	goto __33
__37:
	;
	goto __36
__35:
	if !(libc.X_strnicmp(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)) + uintptr(i)*8)), ts+71046, libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)) + uintptr(i)*8)))) == 0) {
		goto __39
	}
	if !!(libc.XEscapeCommFunction(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle,
		func() uint32 {
			if *(*WINBOOL)(unsafe.Pointer(bp + 652)) != 0 {
				return uint32(SETRTS)
			}
			return uint32(CLRRTS)
		}()) != 0) {
		goto __41
	}
	if !(interp != uintptr(0)) {
		goto __42
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+71050, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+192, ts+4178, ts+7949,
		ts+71024, ts+71035, uintptr(0)))
__42:
	;
	res = TCL_ERROR
	goto __33
__41:
	;
	goto __40
__39:
	if !(libc.X_strnicmp(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)) + uintptr(i)*8)), ts+70582, libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640)) + uintptr(i)*8)))) == 0) {
		goto __43
	}
	if !!(libc.XEscapeCommFunction(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle,
		func() uint32 {
			if *(*WINBOOL)(unsafe.Pointer(bp + 652)) != 0 {
				return uint32(SETBREAK)
			}
			return uint32(CLRBREAK)
		}()) != 0) {
		goto __45
	}
	if !(interp != uintptr(0)) {
		goto __46
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+71071, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+232, ts+4178, ts+7949,
		ts+71024, ts+71035, uintptr(0)))
__46:
	;
	res = TCL_ERROR
	goto __33
__45:
	;
	goto __44
__43:
	if !(interp != uintptr(0)) {
		goto __47
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+71094, libc.VaList(bp+272, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640 /* argv */)) + uintptr(i)*8)))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+280, ts+4178, ts+7444, ts+71035,
		uintptr(0)))
__47:
	;
	res = TCL_ERROR
	goto __33
__44:
	;
__40:
	;
__36:
	;
	goto __32
__32:
	i = i + 2
	goto __31
	goto __33
__33:
	;

	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 640)))
	return res
__27:
	;

	// Option -sysbuffer {read_size write_size}
	// Option -sysbuffer read_size

	if !(len > uint64(1) && libc.Xstrncmp(tls, optionName, ts+71158, len) == 0) {
		goto __48
	}
	// -sysbuffer 4096 or -sysbuffer {64536 4096}

	inSize = libc.Uint64(libc.Uint64FromInt32(-1))
	outSize = libc.Uint64(libc.Uint64FromInt32(-1))

	if !(XTcl_SplitList(tls, interp, value, bp+632, bp+640) == TCL_ERROR) {
		goto __49
	}
	return TCL_ERROR
__49:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 632)) == 1) {
		goto __50
	}
	inSize = Size_t(libc.Xatoi(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640 /* argv */))))))
	outSize = Size_t((*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufWrite)
	goto __51
__50:
	if !(*(*int32)(unsafe.Pointer(bp + 632)) == 2) {
		goto __52
	}
	inSize = Size_t(libc.Xatoi(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640 /* argv */))))))
	outSize = Size_t(libc.Xatoi(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 640 /* argv */)) + 1*8))))
__52:
	;
__51:
	;
	XTclpFree(tls, *(*uintptr)(unsafe.Pointer(bp + 640)))

	if !(*(*int32)(unsafe.Pointer(bp + 632)) < 1 || *(*int32)(unsafe.Pointer(bp + 632)) > 2 || inSize <= uint64(0) || outSize <= uint64(0)) {
		goto __53
	}
	if !(interp != uintptr(0)) {
		goto __54
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,

		ts+71169, libc.VaList(bp+312, value)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+320, ts+4178, ts+7444, ts+71244, uintptr(0)))
__54:
	;
	return TCL_ERROR
__53:
	;

	if !!(libc.XSetupComm(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, uint32(inSize), uint32(outSize)) != 0) {
		goto __55
	}
	if !(interp != uintptr(0)) {
		goto __56
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+71255,
		libc.VaList(bp+352, XTcl_PosixError(tls, interp))))
__56:
	;
	return TCL_ERROR
__55:
	;
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufRead = DWORD(inSize)
	(*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufWrite = DWORD(outSize)

	// Adjust the handshake limits. Yes, the XonXoff limits seem to
	// influence even hardware handshake.

	if !!(libc.XGetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+384) != 0) {
		goto __57
	}
	goto getStateFailed
__57:
	;
	(*DCB)(unsafe.Pointer(bp + 384 /* &dcb */)).FXonLim = WORD((*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufRead * DWORD(1) / DWORD(2))
	(*DCB)(unsafe.Pointer(bp + 384 /* &dcb */)).FXoffLim = WORD((*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufRead * DWORD(1) / DWORD(4))
	if !!(libc.XSetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+384) != 0) {
		goto __58
	}
	goto setStateFailed
__58:
	;
	return TCL_OK
__48:
	;

	// Option -pollinterval msec

	if !(len > uint64(1) && libc.Xstrncmp(tls, optionName, ts+71284, len) == 0) {
		goto __59
	}
	if !(XTcl_GetInt(tls, interp, value, infoPtr+44) != TCL_OK) {
		goto __60
	}
	return TCL_ERROR
__60:
	;
	return TCL_OK
__59:
	;

	// Option -timeout msec

	if !(len > uint64(2) && libc.Xstrncmp(tls, optionName, ts+70505, len) == 0) {
		goto __61
	}
	*(*COMMTIMEOUTS)(unsafe.Pointer(bp + 660 /* tout */)) = COMMTIMEOUTS{}

	if !(XTcl_GetInt(tls, interp, value, bp+656) != TCL_OK) {
		goto __62
	}
	return TCL_ERROR
__62:
	;
	(*COMMTIMEOUTS)(unsafe.Pointer(bp + 660 /* &tout */)).FReadTotalTimeoutConstant = DWORD(*(*int32)(unsafe.Pointer(bp + 656 /* msec */)))
	if !!(libc.XSetCommTimeouts(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+660) != 0) {
		goto __63
	}
	if !(interp != uintptr(0)) {
		goto __64
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+71298,
		libc.VaList(bp+360, XTcl_PosixError(tls, interp))))
__64:
	;
	return TCL_ERROR
__63:
	;

	return TCL_OK
__61:
	;

	return XTcl_BadChannelOption(tls, interp, optionName,
		ts+71326)

getStateFailed:
	if !(interp != uintptr(0)) {
		goto __65
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+71389, libc.VaList(bp+368, XTcl_PosixError(tls, interp))))
__65:
	;
	return TCL_ERROR

setStateFailed:
	if !(interp != uintptr(0)) {
		goto __66
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+71414, libc.VaList(bp+376, XTcl_PosixError(tls, interp))))
__66:
	;
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// SerialGetOptionProc --
//
//	Gets a mode associated with an IO channel. If the optionName arg is
//	non NULL, retrieves the value of that option. If the optionName arg is
//	NULL, retrieves a list of alternating option names and values for the
//	given channel.
//
// Results:
//	A standard Tcl result. Also sets the supplied DString to the string
//	value of the option(s) returned.
//
// Side effects:
//	The string returned by this function is in static storage and may be
//	reused at any time subsequent to the call.
//
//----------------------------------------------------------------------

func sSerialGetOptionProc(tls *libc.TLS, instanceData ClientData, interp uintptr, optionName uintptr, dsPtr uintptr) int32 { /* tclWinSerial.c:1996:1: */
	bp := tls.Alloc(316)
	defer tls.Free(316)

	var infoPtr uintptr
	// var dcb DCB at bp+112, 32

	var len Size_t
	var valid int32 = 0 // Flag if valid option parsed.

	infoPtr = instanceData

	if optionName == uintptr(0) {
		len = uint64(0)
	} else {
		len = libc.Xstrlen(tls, optionName)
	}

	// Get option -mode

	if len == uint64(0) {
		XTcl_DStringAppendElement(tls, dsPtr, ts+70612)
	}
	if len == uint64(0) || len > uint64(2) && libc.Xstrncmp(tls, optionName, ts+70612, len) == 0 {
		var parity int8
		var stop uintptr
		// var buf [64]int8 at bp+144, 64

		if !(libc.XGetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+112) != 0) {
			if interp != uintptr(0) {
				XTclWinConvertError(tls, libc.XGetLastError(tls))
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+71389, libc.VaList(bp, XTcl_PosixError(tls, interp))))
			}
			return TCL_ERROR
		}

		valid = 1
		parity = int8('n')
		if int32((*DCB)(unsafe.Pointer(bp+112)).FParity) <= 4 {
			parity = *(*int8)(unsafe.Pointer(ts + 71439 + uintptr((*DCB)(unsafe.Pointer(bp+112 /* &dcb */)).FParity)))
		}
		if int32((*DCB)(unsafe.Pointer(bp+112)).FStopBits) == ONESTOPBIT {
			stop = ts + 18937 /* "1" */
		} else {
			if int32((*DCB)(unsafe.Pointer(bp+112 /* &dcb */)).FStopBits) == ONE5STOPBITS {
				stop = ts + 71445 /* "1.5" */
			} else {
				stop = ts + 19370 /* "2" */
			}
		}

		libc.XwsprintfA(tls, bp+144, ts+71449, libc.VaList(bp+8, (*DCB)(unsafe.Pointer(bp+112 /* &dcb */)).FBaudRate, int32(parity),
			int32((*DCB)(unsafe.Pointer(bp+112 /* &dcb */)).FByteSize), stop))
		XTcl_DStringAppendElement(tls, dsPtr, bp+144)
	}

	// Get option -pollinterval

	if len == uint64(0) {
		XTcl_DStringAppendElement(tls, dsPtr, ts+71284)
	}
	if len == uint64(0) || len > uint64(1) && libc.Xstrncmp(tls, optionName, ts+71284, len) == 0 {
		// var buf [25]int8 at bp+208, 25

		valid = 1
		libc.XwsprintfA(tls, bp+208, ts+909, libc.VaList(bp+40, (*SerialInfo)(unsafe.Pointer(infoPtr)).FblockTime))
		XTcl_DStringAppendElement(tls, dsPtr, bp+208)
	}

	// Get option -sysbuffer

	if len == uint64(0) {
		XTcl_DStringAppendElement(tls, dsPtr, ts+71158)
		XTcl_DStringStartSublist(tls, dsPtr)
	}
	if len == uint64(0) || len > uint64(1) && libc.Xstrncmp(tls, optionName, ts+71158, len) == 0 {
		// var buf [25]int8 at bp+233, 25

		valid = 1

		libc.XwsprintfA(tls, bp+233, ts+909, libc.VaList(bp+48, (*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufRead))
		XTcl_DStringAppendElement(tls, dsPtr, bp+233)
		libc.XwsprintfA(tls, bp+233, ts+909, libc.VaList(bp+56, (*SerialInfo)(unsafe.Pointer(infoPtr)).FsysBufWrite))
		XTcl_DStringAppendElement(tls, dsPtr, bp+233)
	}
	if len == uint64(0) {
		XTcl_DStringEndSublist(tls, dsPtr)
	}

	// Get option -xchar

	if len == uint64(0) {
		XTcl_DStringAppendElement(tls, dsPtr, ts+70808)
		XTcl_DStringStartSublist(tls, dsPtr)
	}
	if len == uint64(0) || len > uint64(1) && libc.Xstrncmp(tls, optionName, ts+70808, len) == 0 {
		// var buf [4]int8 at bp+258, 4

		valid = 1

		if !(libc.XGetCommState(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+112) != 0) {
			if interp != uintptr(0) {
				XTclWinConvertError(tls, libc.XGetLastError(tls))
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+71389, libc.VaList(bp+64, XTcl_PosixError(tls, interp))))
			}
			return TCL_ERROR
		}
		libc.Xsprintf(tls, bp+258, ts+25665, libc.VaList(bp+72, int32((*DCB)(unsafe.Pointer(bp+112 /* &dcb */)).FXonChar)))
		XTcl_DStringAppendElement(tls, dsPtr, bp+258)
		libc.Xsprintf(tls, bp+258, ts+25665, libc.VaList(bp+80, int32((*DCB)(unsafe.Pointer(bp+112 /* &dcb */)).FXoffChar)))
		XTcl_DStringAppendElement(tls, dsPtr, bp+258)
	}
	if len == uint64(0) {
		XTcl_DStringEndSublist(tls, dsPtr)
	}

	// Get option -lasterror
	//
	// Option is readonly and returned by [fconfigure chan -lasterror] but not
	// returned by unnamed [fconfigure chan].

	if len > uint64(1) && libc.Xstrncmp(tls, optionName, ts+71461, len) == 0 {
		valid = 1
		sSerialErrorStr(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).FlastError, dsPtr)
	}

	// get option -queue
	//
	// Option is readonly and returned by [fconfigure chan -queue].

	if len > uint64(1) && libc.Xstrncmp(tls, optionName, ts+71472, len) == 0 {
		// var buf [25]int8 at bp+284, 25

		// var cStat COMSTAT at bp+268, 16

		// var error DWORD at bp+264, 4

		var inBuffered int32
		var outBuffered int32
		var count int32

		valid = 1

		// Query the pending data in Tcl's internal queues.

		inBuffered = XTcl_InputBuffered(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel)
		outBuffered = XTcl_OutputBuffered(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel)

		// Query the number of bytes in our output queue:
		//     1. The bytes pending in the output thread
		//     2. The bytes in the system drivers buffer
		// The writer thread should not interfere this action.

		libc.XEnterCriticalSection(tls, infoPtr+160)
		libc.XClearCommError(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+264, bp+268)
		count = int32((*COMSTAT)(unsafe.Pointer(bp+268)).FcbOutQue) + (*SerialInfo)(unsafe.Pointer(infoPtr)).FwriteQueue
		libc.XLeaveCriticalSection(tls, infoPtr+160)

		libc.XwsprintfA(tls, bp+284, ts+909, libc.VaList(bp+88, DWORD(inBuffered)+(*COMSTAT)(unsafe.Pointer(bp+268)).FcbInQue))
		XTcl_DStringAppendElement(tls, dsPtr, bp+284)
		libc.XwsprintfA(tls, bp+284, ts+909, libc.VaList(bp+96, outBuffered+count))
		XTcl_DStringAppendElement(tls, dsPtr, bp+284)
	}

	// get option -ttystatus
	//
	// Option is readonly and returned by [fconfigure chan -ttystatus] but not
	// returned by unnamed [fconfigure chan].

	if len > uint64(4) && libc.Xstrncmp(tls, optionName, ts+71479, len) == 0 {
		// var status DWORD at bp+312, 4

		if !(libc.XGetCommModemStatus(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fhandle, bp+312) != 0) {
			if interp != uintptr(0) {
				XTclWinConvertError(tls, libc.XGetLastError(tls))
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+71490, libc.VaList(bp+104, XTcl_PosixError(tls, interp))))
			}
			return TCL_ERROR
		}
		valid = 1
		sSerialModemStatusStr(tls, *(*DWORD)(unsafe.Pointer(bp + 312 /* status */)), dsPtr)
	}

	if valid != 0 {
		return TCL_OK
	}
	return XTcl_BadChannelOption(tls, interp, optionName,
		ts+71515)
}

//----------------------------------------------------------------------
//
// SerialThreadActionProc --
//
//	Insert or remove any thread local refs to this channel.
//
// Results:
//	None.
//
// Side effects:
//	Changes thread local list of valid channels.
//
//----------------------------------------------------------------------

func sSerialThreadActionProc(tls *libc.TLS, instanceData ClientData, action int32) { /* tclWinSerial.c:2211:1: */
	var infoPtr uintptr = instanceData

	// We do not access firstSerialPtr in the thread structures. This is not
	// for all serials managed by the thread, but only those we are watching.
	// Removal of the filevent handlers before transfer thus takes care of
	// this structure.

	if action == 0 {
		// We can't copy the thread information from the channel when the
		// channel is created. At this time the channel back pointer has not
		// been set yet. However in that case the threadId has already been
		// set by TclpCreateCommandChannel itself, so the structure is still
		// good.

		sSerialInit(tls)
		if (*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel != uintptr(0) {
			(*SerialInfo)(unsafe.Pointer(infoPtr)).FthreadId = XTcl_GetChannelThread(tls, (*SerialInfo)(unsafe.Pointer(infoPtr)).Fchannel)
		}
	} else {
		(*SerialInfo)(unsafe.Pointer(infoPtr)).FthreadId = uintptr(0)
	}

}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Support for control over sockets' KEEPALIVE and NODELAY behavior is
// currently disabled.

// Make sure to remove the redirection defines set in tclWinPort.h that is in
// use in other sections of the core, except for us.

// Helper macros to make parts of this file clearer. The macros do exactly
// what they say on the tin. :-) They also only ever refer to their arguments
// once, and so can be used without regard to side effects.

// "sock" + a pointer in hex + \0

// The following variable is used to tell whether this module has been
// initialized.  If 1, initialization of sockets was successful, if -1 then
// socket initialization failed (WSAStartup failed).

var initialized3 int32 = 0                                  /* tclWinSock.c:92:12 */
var classname1 = *(*[10]WCHAR)(unsafe.Pointer(wtext + 698)) /* tclWinSock.c:93:20 */

// The following defines declare the messages used on socket windows.

// This is needed to comply with the strict aliasing rules of GCC, but it also
// simplifies casting between the different sockaddr types.

type Address = struct {
	F__ccgo_pad1 [0]uint64
	Fsa          Sockaddr
	F__ccgo_pad2 [112]byte
} /* tclWinSock.c:116:3 */

// This structure describes per-instance state of a tcp based channel.

type TcpState1 = struct {
	Fchannel              Tcl_Channel
	Fsockets              uintptr
	Fflags                int32
	FwatchEvents          int32
	FreadyEvents          int32
	FselectEvents         int32
	FacceptEventCount     int32
	F__ccgo_pad1          [4]byte
	FacceptProc           uintptr
	FacceptProcData       ClientData
	Faddrlist             uintptr
	Faddr                 uintptr
	Fmyaddrlist           uintptr
	Fmyaddr               uintptr
	FconnectError         int32
	FcachedBlocking       int32
	FnotifierConnectError int32
	F__ccgo_pad2          [4]byte
	FnextPtr              uintptr
} /* tclWinSock.c:126:9 */

// This structure describes per-instance state of a tcp based channel.

type TcpState = TcpState1 /* tclWinSock.c:126:25 */

type TcpFdList1 = struct {
	FstatePtr uintptr
	Ffd       SOCKET
	Fnext     uintptr
} /* tclWinSock.c:126:9 */

type TcpFdList = TcpFdList1 /* tclWinSock.c:132:3 */

// These bits may be ORed together into the "flags" field of a TcpState
// structure.

// The following structure is what is added to the Tcl event queue when a
// socket event occurs.

type SocketEvent = struct {
	Fheader Tcl_Event
	Fsocket SOCKET
} /* tclWinSock.c:208:3 */

// This defines the minimum buffersize maintained by the kernel.

type ThreadSpecificData18 = struct {
	Fhwnd            HWND
	FsocketThread    HANDLE
	FthreadId        Tcl_ThreadId
	FreadyEvent      HANDLE
	FsocketListLock  HANDLE
	FpendingTcpState uintptr
	FsocketList      uintptr
} /* tclWinSock.c:232:3 */

var dataKey17 Tcl_ThreadDataKey /* tclWinSock.c:234:26: */
var windowClass WNDCLASSW       /* tclWinSock.c:235:18: */

// This structure describes the channel type structure for TCP socket
// based IO:

var tcpChannelType = Tcl_ChannelType{
	FtypeName:         ts + 34653,
	Fversion:          uintptr(0x5),
	FcloseProc:        0, // Close proc.
	FinputProc:        0, // Input proc.
	FoutputProc:       0, // Seek proc.
	FsetOptionProc:    0, // Set option proc.
	FgetOptionProc:    0, // Get option proc.
	FwatchProc:        0, // Initialize notifier.
	FgetHandleProc:    0, // Get OS handles out of channel.
	Fclose2Proc:       0, // Close2 proc.
	FblockModeProc:    0, // wide seek proc.
	FthreadActionProc: 0, // truncate proc.
}                                           /* tclWinSock.c:277:30 */
var hostName = ProcessGlobalValue{Fproc: 0} /* tclWinSock.c:302:27 */

// Address print debug functions

//----------------------------------------------------------------------
//
// InitializeHostName --
//
//	This routine sets the process global value of the name of the local
//	host on which the process is running.
//
// Results:
//	None.
//
//----------------------------------------------------------------------

func XInitializeHostName(tls *libc.TLS, valuePtr uintptr, lengthPtr uintptr, encodingPtr uintptr) { /* tclWinSock.c:341:1: */
	bp := tls.Alloc(952)
	defer tls.Free(952)

	// var wbuf [256]WCHAR at bp, 512

	*(*DWORD)(unsafe.Pointer(bp + 512 /* length */)) = uint32(uint64(unsafe.Sizeof([256]WCHAR{})) / uint64(unsafe.Sizeof(WCHAR(0))))
	// var ds Tcl_DString at bp+520, 216

	if libc.XGetComputerNameExW(tls, ComputerNamePhysicalDnsFullyQualified, bp, bp+512) != 0 {
		// Convert string from native to UTF then change to lowercase.

		XTcl_UtfToLower(tls, XTcl_WinTCharToUtf(tls, bp, -1, bp+520))

	} else {
		XTcl_DStringInit(tls, bp+520)
		if XTclpHasSockets(tls, uintptr(0)) == TCL_OK {
			// The buffer size of 256 is recommended by the MSDN page that
			// documents gethostname() as being always adequate.

			// var inDs Tcl_DString at bp+736, 216

			XTcl_DStringInit(tls, bp+736)
			XTcl_DStringSetLength(tls, bp+736, 256)
			if libc.Xgethostname(tls, (*Tcl_DString)(unsafe.Pointer(bp+736)).Fstring,
				(*Tcl_DString)(unsafe.Pointer(bp+736)).Flength) == 0 {
				XTcl_ExternalToUtfDString(tls, uintptr(0), (*Tcl_DString)(unsafe.Pointer(bp+736)).Fstring, -1,
					bp+520)
			}
			XTcl_DStringFree(tls, bp+736)
		}
	}

	*(*Tcl_Encoding)(unsafe.Pointer(encodingPtr)) = XTcl_GetEncoding(tls, uintptr(0), ts+26553)
	*(*int32)(unsafe.Pointer(lengthPtr)) = (*Tcl_DString)(unsafe.Pointer(bp + 520)).Flength
	*(*uintptr)(unsafe.Pointer(valuePtr)) = XTcl_Alloc(tls, uint32(*(*int32)(unsafe.Pointer(lengthPtr))+1))
	libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(valuePtr)), (*Tcl_DString)(unsafe.Pointer(bp+520)).Fstring, uint64(*(*int32)(unsafe.Pointer(lengthPtr))+1))
	XTcl_DStringFree(tls, bp+520)
}

//----------------------------------------------------------------------
//
// Tcl_GetHostName --
//
//	Returns the name of the local host.
//
// Results:
//	A string containing the network name for this machine, or an empty
//	string if we can't figure out the name. The caller must not modify or
//	free this string.
//
// Side effects:
//	Caches the name to return for future calls.
//
//----------------------------------------------------------------------

func XTcl_GetHostName(tls *libc.TLS) uintptr { /* tclWinSock.c:403:12: */
	return XTcl_GetString(tls, XTclGetProcessGlobalValue(tls, uintptr(unsafe.Pointer(&hostName))))
}

//----------------------------------------------------------------------
//
// TclpHasSockets --
//
//	This function determines whether sockets are available on the current
//	system and returns an error in interp if they are not. Note that
//	interp may be NULL.
//
// Results:
//	Returns TCL_OK if the system supports sockets, or TCL_ERROR with an
//	error in interp (if non-NULL).
//
// Side effects:
//	If not already prepared, initializes the TSD structure and socket
//	message handling thread associated to the calling thread for the
//	subsystem of the driver.
//
//----------------------------------------------------------------------

func XTclpHasSockets(tls *libc.TLS, interp uintptr) int32 { /* tclWinSock.c:431:1: */

	sInitSockets(tls)

	if sSocketsEnabled(tls) != 0 {
		return TCL_OK
	}
	if interp != uintptr(0) {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+71575, -1))
	}
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// TclpFinalizeSockets --
//
//	This function is called from Tcl_FinalizeThread to finalize the
//	platform specific socket subsystem. Also, it may be called from within
//	this module to cleanup the state if unable to initialize the sockets
//	subsystem.
//
// Results:
//	None.
//
// Side effects:
//	Deletes the event source and destroys the socket thread.
//
//----------------------------------------------------------------------

func XTclpFinalizeSockets(tls *libc.TLS) { /* tclWinSock.c:470:1: */
	var tsdPtr uintptr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))

	// Careful! This is a finalizer!

	if tsdPtr == uintptr(0) {
		return
	}

	if (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketThread != uintptr(0) {
		if (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd != uintptr(0) {
			libc.XPostMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+3), uint64(0), int64(0))

			// Wait for the thread to exit. This ensures that we are
			// completely cleaned up before we leave this function.

			libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent, INFINITE)
			(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd = uintptr(0)
		}
		libc.XCloseHandle(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketThread)
		(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketThread = uintptr(0)
	}
	if (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent != uintptr(0) {
		libc.XCloseHandle(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent)
		(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent = uintptr(0)
	}
	if (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock != uintptr(0) {
		libc.XCloseHandle(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
		(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock = uintptr(0)
	}
	XTcl_DeleteEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{XSocketSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sSocketCheckProc})), uintptr(0))
}

//----------------------------------------------------------------------
//
// TcpBlockModeProc --
//
//	This function is invoked by the generic IO level to set blocking and
//	nonblocking mode on a TCP socket based channel.
//
// Results:
//	0 if successful, errno when failed.
//
// Side effects:
//	Sets the device into blocking or nonblocking mode.
//
//----------------------------------------------------------------------

func sTcpBlockModeProc(tls *libc.TLS, instanceData ClientData, mode int32) int32 { /* tclWinSock.c:526:1: */
	var statePtr uintptr = instanceData

	if mode == TCL_MODE_NONBLOCKING {
		*(*int32)(unsafe.Pointer(statePtr + 16)) |= int32(1) << 0
	} else {
		*(*int32)(unsafe.Pointer(statePtr + 16)) &= libc.CplInt32(int32(1) << 0)
	}
	return 0
}

//----------------------------------------------------------------------
//
// WaitForConnect --
//
//	Check the state of an async connect process. If a connection
//	attempt terminated, process it, which may finalize it or may
//	start the next attempt. If a connect error occures, it is saved
//	in statePtr->connectError to be reported by 'fconfigure -error'.
//
//	There are two modes of operation, defined by errorCodePtr:
//	 *  non-NULL: Called by explicite read/write command. block if
//	    socket is blocking.
//	    May return two error codes:
//	     *	EWOULDBLOCK: if connect is still in progress
//	     *	ENOTCONN: if connect failed. This would be the error
//		message of a rect or sendto syscall so this is
//		emulated here.
//	 *  Null: Called by a backround operation. Do not block and
//	    don't return any error code.
//
// Results:
// 	0 if the connection has completed, -1 if still in progress
// 	or there is an error.
//
// Side effects:
//	Processes socket events off the system queue.
//	May process asynchroneous connect.
//
//----------------------------------------------------------------------

func sWaitForConnect(tls *libc.TLS, statePtr uintptr, errorCodePtr uintptr) int32 { /* tclWinSock.c:575:1: */
	var result int32
	var oldMode int32
	var tsdPtr uintptr

	// Check if an async connect failed already and error reporting is demanded,
	// return the error ENOTCONN

	if errorCodePtr != uintptr(0) && (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<5) != 0 {
		*(*int32)(unsafe.Pointer(errorCodePtr)) = ENOTCONN
		return -1
	}

	// Check if an async connect is running. If not return ok

	if !((*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<1) != 0) {
		return 0
	}

	// Be sure to disable event servicing so we are truly modal.

	oldMode = XTcl_SetServiceMode(tls, TCL_SERVICE_NONE)

	// Loop in the blocking case until the connect signal is present

	for 1 != 0 {

		// get statePtr lock
		tsdPtr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))
		libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)

		// Check for connect event
		if (*TcpState)(unsafe.Pointer(statePtr)).FreadyEvents&(int32(1)<<FD_CONNECT_BIT) != 0 {

			// Consume the connect event
			*(*int32)(unsafe.Pointer(statePtr + 24)) &= libc.CplInt32(int32(1) << FD_CONNECT_BIT)

			// For blocking sockets and foreground processing
			// disable async connect as we continue now synchoneously
			if errorCodePtr != uintptr(0) && !((*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<0) != 0) {
				*(*int32)(unsafe.Pointer(statePtr + 16)) &= libc.CplInt32(int32(1) << 1)
			}

			// Free list lock
			libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)

			// Continue connect.
			// If switched to synchroneous connect, the connect is terminated.
			result = sTcpConnect(tls, uintptr(0), statePtr)

			// Restore event service mode
			XTcl_SetServiceMode(tls, oldMode)

			// Check for Succesfull connect or async connect restart

			if result == TCL_OK {
				// Check for async connect restart
				// (not possible for foreground blocking operation)
				if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<4) != 0 {
					if errorCodePtr != uintptr(0) {
						*(*int32)(unsafe.Pointer(errorCodePtr)) = EWOULDBLOCK
					}
					return -1
				}
				return 0
			}

			// Connect finally failed.
			// For foreground operation return ENOTCONN.

			if errorCodePtr != uintptr(0) {
				*(*int32)(unsafe.Pointer(errorCodePtr)) = ENOTCONN
			}
			return -1
		}

		// Free list lock
		libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)

		// Background operation returns with no action as there was no connect
		// event

		if errorCodePtr == uintptr(0) {
			return -1
		}

		// A non blocking socket waiting for an asynchronous connect
		// returns directly the error EWOULDBLOCK

		if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<0) != 0 {
			*(*int32)(unsafe.Pointer(errorCodePtr)) = EWOULDBLOCK
			return -1
		}

		// Wait until something happens.

		libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent, INFINITE)
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// TcpInputProc --
//
//	This function is invoked by the generic IO level to read input from a
//	TCP socket based channel.
//
// Results:
//	The number of bytes read is returned or -1 on error. An output
//	argument contains the POSIX error code on error, or zero if no error
//	occurred.
//
// Side effects:
//	Reads input from the input device of the channel.
//
//----------------------------------------------------------------------

func sTcpInputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, bufSize int32, errorCodePtr uintptr) int32 { /* tclWinSock.c:725:1: */
	var statePtr uintptr = instanceData
	var bytesRead int32
	var error DWORD
	var tsdPtr uintptr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))

	*(*int32)(unsafe.Pointer(errorCodePtr)) = 0

	// Check that WinSock is initialized; do not call it if not, to prevent
	// system crashes. This can happen at exit time if the exit handler for
	// WinSock ran before other exit handlers that want to use sockets.

	if !(sSocketsEnabled(tls) != 0) {
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EFAULT
		return -1
	}

	// First check to see if EOF was already detected, to prevent calling the
	// socket stack after the first time EOF is detected.

	if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<2) != 0 {
		return 0
	}

	// Check if there is an async connect running.
	// For blocking sockets terminate connect, otherwise do one step.
	// For a non blocking socket return EWOULDBLOCK if connect not terminated

	if sWaitForConnect(tls, statePtr, errorCodePtr) != 0 {
		return -1
	}

	// No EOF, and it is connected, so try to read more from the socket. Note
	// that we clear the FD_READ bit because read events are level triggered
	// so a new event will be generated if there is still data available to be
	// read. We have to simulate blocking behavior here since we are always
	// using non-blocking sockets.

	for 1 != 0 {
		libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2),
			uint64(FALSE), int64(statePtr))
		// single fd operation: this proc is only called for a connected socket.
		bytesRead = libc.Xrecv(tls, (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd, buf, bufSize, 0)
		*(*int32)(unsafe.Pointer(statePtr + 24)) &= libc.CplInt32(int32(1) << FD_READ_BIT)

		// Check for end-of-file condition or successful read.

		if bytesRead == 0 {
			*(*int32)(unsafe.Pointer(statePtr + 16)) |= int32(1) << 2
		}
		if bytesRead != -1 {
			break
		}

		// If an error occurs after the FD_CLOSE has arrived, then ignore the
		// error and report an EOF.

		if (*TcpState)(unsafe.Pointer(statePtr)).FreadyEvents&(int32(1)<<FD_CLOSE_BIT) != 0 {
			*(*int32)(unsafe.Pointer(statePtr + 16)) |= int32(1) << 2
			bytesRead = 0
			break
		}

		error = DWORD(libc.XWSAGetLastError(tls))

		// If an RST comes, then ignore the error and report an EOF just like
		// on unix.

		if error == DWORD(WSABASEERR+54) {
			*(*int32)(unsafe.Pointer(statePtr + 16)) |= int32(1) << 2
			bytesRead = 0
			break
		}

		// Check for error condition or underflow in non-blocking case.

		if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<0) != 0 || error != DWORD(WSABASEERR+35) {
			XTclWinConvertError(tls, error)
			*(*int32)(unsafe.Pointer(errorCodePtr)) = XTcl_GetErrno(tls)
			bytesRead = -1
			break
		}

		// In the blocking case, wait until the file becomes readable or
		// closed and try again.

		if !(sWaitForSocketEvent(tls, statePtr, int32(1)<<FD_READ_BIT|int32(1)<<FD_CLOSE_BIT, errorCodePtr) != 0) {
			bytesRead = -1
			break
		}
	}

	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2), uint64(TRUE), int64(statePtr))

	return bytesRead
}

//----------------------------------------------------------------------
//
// TcpOutputProc --
//
//	This function is called by the generic IO level to write data to a
//	socket based channel.
//
// Results:
//	The number of bytes written or -1 on failure.
//
// Side effects:
//	Produces output on the socket.
//
//----------------------------------------------------------------------

func sTcpOutputProc(tls *libc.TLS, instanceData ClientData, buf uintptr, toWrite int32, errorCodePtr uintptr) int32 { /* tclWinSock.c:864:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var statePtr uintptr = instanceData
	var written int32
	var error DWORD
	var tsdPtr uintptr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))

	*(*int32)(unsafe.Pointer(errorCodePtr)) = 0

	// Check that WinSock is initialized; do not call it if not, to prevent
	// system crashes. This can happen at exit time if the exit handler for
	// WinSock ran before other exit handlers that want to use sockets.

	if !(sSocketsEnabled(tls) != 0) {
		*(*int32)(unsafe.Pointer(errorCodePtr)) = EFAULT
		return -1
	}

	// Check if there is an async connect running.
	// For blocking sockets terminate connect, otherwise do one step.
	// For a non blocking socket return EWOULDBLOCK if connect not terminated

	if sWaitForConnect(tls, statePtr, errorCodePtr) != 0 {
		return -1
	}

	for 1 != 0 {
		libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2),
			uint64(FALSE), int64(statePtr))

		// single fd operation: this proc is only called for a connected socket.
		written = libc.Xsend(tls, (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd, buf, toWrite, 0)
		if written != -1 {
			// Since Windows won't generate a new write event until we hit an
			// overflow condition, we need to force the event loop to poll
			// until the condition changes.

			if (*TcpState)(unsafe.Pointer(statePtr)).FwatchEvents&(int32(1)<<FD_WRITE_BIT) != 0 {
				*(*Tcl_Time)(unsafe.Pointer(bp /* blockTime */)) = Tcl_Time{}
				XTcl_SetMaxBlockTime(tls, bp)
			}
			break
		}

		// Check for error condition or overflow. In the event of overflow, we
		// need to clear the FD_WRITE flag so we can detect the next writable
		// event. Note that Windows only sends a new writable event after a
		// send fails with WSAEWOULDBLOCK.

		error = DWORD(libc.XWSAGetLastError(tls))
		if error == DWORD(WSABASEERR+35) {
			*(*int32)(unsafe.Pointer(statePtr + 24)) &= libc.CplInt32(int32(1) << FD_WRITE_BIT)
			if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<0) != 0 {
				*(*int32)(unsafe.Pointer(errorCodePtr)) = EWOULDBLOCK
				written = -1
				break
			}
		} else {
			XTclWinConvertError(tls, error)
			*(*int32)(unsafe.Pointer(errorCodePtr)) = XTcl_GetErrno(tls)
			written = -1
			break
		}

		// In the blocking case, wait until the file becomes writable or
		// closed and try again.

		if !(sWaitForSocketEvent(tls, statePtr, int32(1)<<FD_WRITE_BIT|int32(1)<<FD_CLOSE_BIT, errorCodePtr) != 0) {
			written = -1
			break
		}
	}

	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2), uint64(TRUE), int64(statePtr))

	return written
}

//----------------------------------------------------------------------
//
// TcpCloseProc --
//
//	This function is called by the generic IO level to perform channel
//	type specific cleanup on a socket based channel when the channel is
//	closed.
//
// Results:
//	0 if successful, the value of errno if failed.
//
// Side effects:
//	Closes the socket.
//
//----------------------------------------------------------------------

func sTcpCloseProc(tls *libc.TLS, instanceData ClientData, interp uintptr) int32 { /* tclWinSock.c:975:1: */
	var statePtr uintptr = instanceData
	// TIP #218
	var errorCode int32 = 0
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey17)), int32(unsafe.Sizeof(ThreadSpecificData18{})))

	// Check that WinSock is initialized; do not call it if not, to prevent
	// system crashes. This can happen at exit time if the exit handler for
	// WinSock ran before other exit handlers that want to use sockets.

	if sSocketsEnabled(tls) != 0 {
		// Clean up the OS socket handle. The default Windows setting for a
		// socket is SO_DONTLINGER, which does a graceful shutdown in the
		// background.

		for (*TcpState)(unsafe.Pointer(statePtr)).Fsockets != uintptr(0) {
			var thisfd uintptr = (*TcpState)(unsafe.Pointer(statePtr)).Fsockets
			(*TcpState)(unsafe.Pointer(statePtr)).Fsockets = (*TcpFdList)(unsafe.Pointer(thisfd)).Fnext

			if libc.Xclosesocket(tls, (*TcpFdList)(unsafe.Pointer(thisfd)).Ffd) == -1 {
				XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
				errorCode = XTcl_GetErrno(tls)
			}
			XTclpFree(tls, thisfd)
		}
	}

	if (*TcpState)(unsafe.Pointer(statePtr)).Faddrlist != uintptr(0) {
		libc.XWspiapiFreeAddrInfo(tls, (*TcpState)(unsafe.Pointer(statePtr)).Faddrlist)
	}
	if (*TcpState)(unsafe.Pointer(statePtr)).Fmyaddrlist != uintptr(0) {
		libc.XWspiapiFreeAddrInfo(tls, (*TcpState)(unsafe.Pointer(statePtr)).Fmyaddrlist)
	}

	// Clear an eventual tsd info list pointer.
	// This may be called, if an async socket connect fails or is closed
	// between connect and thread action callback.
	if (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState != uintptr(0) &&
		(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState == statePtr {

		// get infoPtr lock, because this concerns the notifier thread
		libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)

		(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState = uintptr(0)

		// Free list lock
		libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
	}

	// TIP #218. Removed the code removing the structure from the global
	// socket list. This is now done by the thread action callbacks, and only
	// there. This happens before this code is called. We can free without
	// fear of damaging the list.

	XTclpFree(tls, statePtr)
	return errorCode
}

//----------------------------------------------------------------------
//
// TcpClose2Proc --
//
//	This function is called by the generic IO level to perform the channel
//	type specific part of a half-close: namely, a shutdown() on a socket.
//
// Results:
//	0 if successful, the value of errno if failed.
//
// Side effects:
//	Shuts down one side of the socket.
//
//----------------------------------------------------------------------

func sTcpClose2Proc(tls *libc.TLS, instanceData ClientData, interp uintptr, flags int32) int32 { /* tclWinSock.c:1062:1: */
	var statePtr uintptr = instanceData
	var readError int32 = 0
	var writeError int32 = 0

	// Shutdown the OS socket handle.

	if flags&(int32(1)<<1|int32(1)<<2) == 0 {
		return sTcpCloseProc(tls, instanceData, interp)
	}

	// single fd operation: Tcl_OpenTcpServer() does not set TCL_READABLE or
	// TCL_WRITABLE so this should never be called for a server socket.
	if flags&(int32(1)<<1) != 0 && libc.Xshutdown(tls, (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd, SD_RECEIVE) == -1 {
		XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
		readError = XTcl_GetErrno(tls)
	}
	if flags&(int32(1)<<2) != 0 && libc.Xshutdown(tls, (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd, SD_SEND) == -1 {
		XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
		writeError = XTcl_GetErrno(tls)
	}
	if readError != 0 {
		return readError
	}
	return writeError
}

//----------------------------------------------------------------------
//
// TcpSetOptionProc --
//
//	Sets Tcp channel specific options.
//
// Results:
//	None, unless an error happens.
//
// Side effects:
//	Changes attributes of the socket at the system level.
//
//----------------------------------------------------------------------

func sTcpSetOptionProc(tls *libc.TLS, instanceData ClientData, interp uintptr, optionName uintptr, value uintptr) int32 { /* tclWinSock.c:1109:1: */

	// Check that WinSock is initialized; do not call it if not, to prevent
	// system crashes. This can happen at exit time if the exit handler for
	// WinSock ran before other exit handlers that want to use sockets.

	if !(sSocketsEnabled(tls) != 0) {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+71616, -1))
		}
		return TCL_ERROR
	}

	return XTcl_BadChannelOption(tls, interp, optionName, ts+2631)
}

//----------------------------------------------------------------------
//
// TcpGetOptionProc --
//
//	Computes an option value for a TCP socket based channel, or a list of
//	all options and their values.
//
//	Note: This code is based on code contributed by John Haxby.
//
// Results:
//	A standard Tcl result. The value of the specified option or a list of
//	all options and their values is returned in the supplied DString. Sets
//	Error message if needed.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sTcpGetOptionProc(tls *libc.TLS, instanceData ClientData, interp uintptr, optionName uintptr, dsPtr uintptr) int32 { /* tclWinSock.c:1212:1: */
	bp := tls.Alloc(1348)
	defer tls.Free(1348)

	var statePtr uintptr = instanceData
	// var host [1025]int8 at bp+156, 1025

	// var port [32]int8 at bp+1181, 32

	var sock SOCKET
	var len Size_t = uint64(0)
	var reverseDNS int32 = 0

	// Check that WinSock is initialized; do not call it if not, to prevent
	// system crashes. This can happen at exit time if the exit handler for
	// WinSock ran before other exit handlers that want to use sockets.

	if !(sSocketsEnabled(tls) != 0) {
		if interp != 0 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
				ts+71616, -1))
		}
		return TCL_ERROR
	}

	// Go one step in async connect
	// If any error is thrown save it as backround error to report eventually below
	sWaitForConnect(tls, statePtr, uintptr(0))

	sock = (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd
	if optionName != uintptr(0) {
		len = libc.Xstrlen(tls, optionName)
	}

	if len > uint64(1) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == 'e' && libc.Xstrncmp(tls, optionName, ts+39163, len) == 0 {

		// Do not return any errors if async connect is running
		if !((*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<4) != 0) {

			if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<5) != 0 {

				// In case of a failed async connect, eventually report the
				// connect error only once.
				// Do not report the system error, as this comes again and again.

				if (*TcpState)(unsafe.Pointer(statePtr)).FconnectError != 0 {
					XTcl_DStringAppend(tls, dsPtr,
						XTcl_ErrnoMsg(tls, (*TcpState)(unsafe.Pointer(statePtr)).FconnectError), -1)
					(*TcpState)(unsafe.Pointer(statePtr)).FconnectError = 0
				}

			} else {

				// Report an eventual last error of the socket system

				// var optlen int32 at bp+20, 4

				var ret int32
				// var err DWORD at bp+16, 4

				// Populater the err Variable with a possix error
				*(*int32)(unsafe.Pointer(bp + 20 /* optlen */)) = int32(unsafe.Sizeof(int32(0)))
				ret = libc.Xgetsockopt(tls, sock, SOL_SOCKET, SO_ERROR,
					bp+16, bp+20)
				// The error was not returned directly but should be
				// taken from WSA
				if ret == -1 {
					*(*DWORD)(unsafe.Pointer(bp + 16 /* err */)) = DWORD(libc.XWSAGetLastError(tls))
				}
				// Return error message
				if *(*DWORD)(unsafe.Pointer(bp + 16)) != 0 {
					XTclWinConvertError(tls, *(*DWORD)(unsafe.Pointer(bp + 16 /* err */)))
					XTcl_DStringAppend(tls, dsPtr, XTcl_ErrnoMsg(tls, XTcl_GetErrno(tls)), -1)
				}
			}
		}
		return TCL_OK
	}

	if len > uint64(1) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == 'c' && libc.Xstrncmp(tls, optionName, ts+71643, len) == 0 {

		XTcl_DStringAppend(tls, dsPtr,
			func() uintptr {
				if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<4) != 0 {
					return ts + 18937 /* "1" */
				}
				return ts + 18935 /* "0" */
			}(), -1)
		return TCL_OK
	}

	if interp != uintptr(0) && XTcl_GetVar2(tls, interp, ts+71655, uintptr(0), 0) != uintptr(0) {
		reverseDNS = NI_NUMERICHOST
	}

	if len == uint64(0) || len > uint64(1) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == 'p' && libc.Xstrncmp(tls, optionName, ts+71688, len) == 0 {
		// var peername Address at bp+24, 128

		*(*int32)(unsafe.Pointer(bp + 152 /* size */)) = int32(unsafe.Sizeof(Address{}))

		if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<4) != 0 {
			// In async connect output an empty string
			if len == uint64(0) {
				XTcl_DStringAppendElement(tls, dsPtr, ts+71688)
				XTcl_DStringAppendElement(tls, dsPtr, ts+2631)
			} else {
				return TCL_OK
			}
		} else if libc.Xgetpeername(tls, sock, bp+24, bp+152) == 0 {
			// Peername fetch succeeded - output list
			if len == uint64(0) {
				XTcl_DStringAppendElement(tls, dsPtr, ts+71688)
				XTcl_DStringStartSublist(tls, dsPtr)
			}

			libc.XWspiapiGetNameInfo(tls, bp+24, *(*int32)(unsafe.Pointer(bp + 152 /* size */)), bp+156, uint64(unsafe.Sizeof([1025]int8{})),
				uintptr(0), uint64(0), NI_NUMERICHOST)
			XTcl_DStringAppendElement(tls, dsPtr, bp+156)
			libc.XWspiapiGetNameInfo(tls, bp+24, *(*int32)(unsafe.Pointer(bp + 152 /* size */)), bp+156, uint64(unsafe.Sizeof([1025]int8{})),
				bp+1181, uint64(unsafe.Sizeof([32]int8{})), reverseDNS|NI_NUMERICSERV)
			XTcl_DStringAppendElement(tls, dsPtr, bp+156)
			XTcl_DStringAppendElement(tls, dsPtr, bp+1181)
			if len == uint64(0) {
				XTcl_DStringEndSublist(tls, dsPtr)
			} else {
				return TCL_OK
			}
		} else {
			// getpeername failed - but if we were asked for all the options
			// (len==0), don't flag an error at that point because it could be
			// an fconfigure request on a server socket (such sockets have no
			// peer). {Copied from unix/tclUnixChan.c}

			if len != 0 {
				XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
				if interp != 0 {
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
						ts+71698,
						libc.VaList(bp, XTcl_PosixError(tls, interp))))
				}
				return TCL_ERROR
			}
		}
	}

	if len == uint64(0) || len > uint64(1) && int32(*(*int8)(unsafe.Pointer(optionName + 1))) == 's' && libc.Xstrncmp(tls, optionName, ts+71721, len) == 0 {
		var fds uintptr
		// var sockname Address at bp+1216, 128

		// var size int32 at bp+1344, 4

		var found int32 = 0

		if len == uint64(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+71721)
			XTcl_DStringStartSublist(tls, dsPtr)
		}
		if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<4) != 0 {
			// In async connect output an empty string
			found = 1
		} else {
			for fds = (*TcpState)(unsafe.Pointer(statePtr)).Fsockets; fds != uintptr(0); fds = (*TcpFdList)(unsafe.Pointer(fds)).Fnext {
				sock = (*TcpFdList)(unsafe.Pointer(fds)).Ffd
				*(*int32)(unsafe.Pointer(bp + 1344 /* size */)) = int32(unsafe.Sizeof(Address{}))
				if libc.Xgetsockname(tls, sock, bp+1216, bp+1344) >= 0 {
					var flags int32 = reverseDNS

					found = 1
					libc.XWspiapiGetNameInfo(tls, bp+1216, *(*int32)(unsafe.Pointer(bp + 1344 /* size */)), bp+156, uint64(unsafe.Sizeof([1025]int8{})),
						uintptr(0), uint64(0), NI_NUMERICHOST)
					XTcl_DStringAppendElement(tls, dsPtr, bp+156)

					// We don't want to resolve INADDR_ANY and sin6addr_any; they
					// can sometimes cause problems (and never have a name).
					flags = flags | NI_NUMERICSERV
					if int32((*Sockaddr)(unsafe.Pointer(bp+1216)).Fsa_family) == AF_INET {
						if *(*U_long)(unsafe.Pointer(bp + 1216 + 4)) == U_long(0x00000000) {
							flags = flags | NI_NUMERICHOST
						}
					} else if int32((*Sockaddr)(unsafe.Pointer(bp+1216)).Fsa_family) == AF_INET6 {
						if libc.XIN6_ADDR_EQUAL(tls, bp+1216+8,
							libc.X__ccgo_in6addr_anyp(tls)) != 0 || libc.XIN6_IS_ADDR_V4MAPPED(tls, bp+1216+8) != 0 &&
							int32(*(*U_char)(unsafe.Pointer(bp + 1216 + 8 + 12))) == 0 &&
							int32(*(*U_char)(unsafe.Pointer(bp + 1216 + 8 + 13))) == 0 &&
							int32(*(*U_char)(unsafe.Pointer(bp + 1216 + 8 + 14))) == 0 &&
							int32(*(*U_char)(unsafe.Pointer(bp + 1216 + 8 + 15))) == 0 {
							flags = flags | NI_NUMERICHOST
						}
					}
					libc.XWspiapiGetNameInfo(tls, bp+1216, *(*int32)(unsafe.Pointer(bp + 1344 /* size */)), bp+156, uint64(unsafe.Sizeof([1025]int8{})),
						bp+1181, uint64(unsafe.Sizeof([32]int8{})), flags)
					XTcl_DStringAppendElement(tls, dsPtr, bp+156)
					XTcl_DStringAppendElement(tls, dsPtr, bp+1181)
				}
			}
		}
		if found != 0 {
			if len != 0 {
				return TCL_OK
			}
			XTcl_DStringEndSublist(tls, dsPtr)
		} else {
			if interp != 0 {
				XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+71731, libc.VaList(bp+8, XTcl_PosixError(tls, interp))))
			}
			return TCL_ERROR
		}
	}

	if len > uint64(0) {
		return XTcl_BadChannelOption(tls, interp, optionName, ts+71754)
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// TcpWatchProc --
//
//	Informs the channel driver of the events that the generic channel code
//	wishes to receive on this socket.
//
// Results:
//	None.
//
// Side effects:
//	May cause the notifier to poll if any of the specified conditions are
//	already true.
//
//----------------------------------------------------------------------

func sTcpWatchProc(tls *libc.TLS, instanceData ClientData, mask int32) { /* tclWinSock.c:1521:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var statePtr uintptr = instanceData

	// Update the watch events mask. Only if the socket is not a server
	// socket. [Bug 557878]

	if !(int32((*TcpState)(unsafe.Pointer(statePtr)).FacceptProc) != 0) {
		(*TcpState)(unsafe.Pointer(statePtr)).FwatchEvents = 0
		if mask&(int32(1)<<1) != 0 {
			*(*int32)(unsafe.Pointer(statePtr + 20)) |= int32(1)<<FD_READ_BIT | int32(1)<<FD_CLOSE_BIT
		}
		if mask&(int32(1)<<2) != 0 {
			*(*int32)(unsafe.Pointer(statePtr + 20)) |= int32(1)<<FD_WRITE_BIT | int32(1)<<FD_CLOSE_BIT
		}

		// If there are any conditions already set, then tell the notifier to
		// poll rather than block.

		if (*TcpState)(unsafe.Pointer(statePtr)).FreadyEvents&(*TcpState)(unsafe.Pointer(statePtr)).FwatchEvents != 0 {
			*(*Tcl_Time)(unsafe.Pointer(bp /* blockTime */)) = Tcl_Time{}

			XTcl_SetMaxBlockTime(tls, bp)
		}
	}
}

//----------------------------------------------------------------------
//
// TcpGetHandleProc --
//
//	Called from Tcl_GetChannelHandle to retrieve OS handles from inside a
//	TCP socket based channel.
//
// Results:
//	Returns TCL_OK with the fd in handlePtr, or TCL_ERROR if there is no
//	handle for the specified direction.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sTcpGetHandleProc(tls *libc.TLS, instanceData ClientData, direction int32, handlePtr uintptr) int32 { /* tclWinSock.c:1575:1: */
	var statePtr uintptr = instanceData

	*(*ClientData)(unsafe.Pointer(handlePtr)) = uintptr(Intptr_t((*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd))
	return TCL_OK
}

//----------------------------------------------------------------------
//
// TcpConnect --
//
//	This function opens a new socket in client mode.
//
//	This might be called in 3 circumstances:
//	-   By a regular socket command
//	-   By the event handler to continue an asynchronously connect
//	-   By a blocking socket function (gets/puts) to terminate the
//	    connect synchronously
//
// Results:
//      TCL_OK, if the socket was successfully connected or an asynchronous
//      connection is in progress. If an error occurs, TCL_ERROR is returned
//      and an error message is left in interp.
//
// Side effects:
//	Opens a socket.
//
// Remarks:
//	A single host name may resolve to more than one IP address, e.g. for
//	an IPv4/IPv6 dual stack host. For handling asynchronously connecting
//	sockets in the background for such hosts, this function can act as a
//	coroutine. On the first call, it sets up the control variables for the
//	two nested loops over the local and remote addresses. Once the first
//	connection attempt is in progress, it sets up itself as a writable
//	event handler for that socket, and returns. When the callback occurs,
//	control is transferred to the "reenter" label, right after the initial
//	return and the loops resume as if they had never been interrupted.
//	For synchronously connecting sockets, the loops work the usual way.
//
//----------------------------------------------------------------------

func sTcpConnect(tls *libc.TLS, interp uintptr, statePtr uintptr) int32 { /* tclWinSock.c:1625:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var error DWORD
	// We are started with async connect and the connect notification
	// was not jet received
	var async_connect int32
	// We were called by the event procedure and continue our loop
	var async_callback int32
	var tsdPtr uintptr
	var statePtr2 uintptr
	var in_socket_list int32
	async_connect = (*TcpState)(unsafe.Pointer(statePtr)).Fflags & (int32(1) << 1)
	async_callback = (*TcpState)(unsafe.Pointer(statePtr)).Fflags & (int32(1) << 4)
	tsdPtr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))

	if !(async_callback != 0) {
		goto __1
	}
	goto reenter
__1:
	;

	(*TcpState)(unsafe.Pointer(statePtr)).Faddr = (*TcpState)(unsafe.Pointer(statePtr)).Faddrlist
__2:
	if !((*TcpState)(unsafe.Pointer(statePtr)).Faddr != uintptr(0)) {
		goto __4
	}

	(*TcpState)(unsafe.Pointer(statePtr)).Fmyaddr = (*TcpState)(unsafe.Pointer(statePtr)).Fmyaddrlist
__5:
	if !((*TcpState)(unsafe.Pointer(statePtr)).Fmyaddr != uintptr(0)) {
		goto __7
	}

	// No need to try combinations of local and remote addresses
	// of different families.

	if !((*Addrinfo)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fmyaddr)).Fai_family != (*Addrinfo)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Faddr)).Fai_family) {
		goto __8
	}
	goto __6
__8:
	;

	// Close the socket if it is still open from the last unsuccessful
	// iteration.
	if !((*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd != libc.Uint64(libc.Uint64FromInt32(libc.CplInt32(0)))) {
		goto __9
	}
	libc.Xclosesocket(tls, (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd)
__9:
	;

	// get statePtr lock
	libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)

	// Reset last error from last try
	(*TcpState)(unsafe.Pointer(statePtr)).FnotifierConnectError = 0
	XTcl_SetErrno(tls, 0)

	(*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd = libc.Xsocket(tls, (*Addrinfo)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fmyaddr)).Fai_family, SOCK_STREAM, 0)

	// Free list lock
	libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)

	// continue on socket creation error
	if !((*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd == libc.Uint64(libc.Uint64FromInt32(libc.CplInt32(0)))) {
		goto __10
	}
	XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
	goto __6
__10:
	;

	// Win-NT has a misfeature that sockets are inherited in child
	// processes by default. Turn off the inherit bit.

	libc.XSetHandleInformation(tls, HANDLE((*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd), uint32(HANDLE_FLAG_INHERIT), uint32(0))

	// Set kernel space buffering

	XTclSockMinimumBuffers(tls, uintptr((*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd), TCP_BUFFER_SIZE)

	// Try to bind to a local port.

	if !(libc.Xbind(tls, (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd, (*Addrinfo)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fmyaddr)).Fai_addr,
		int32((*Addrinfo)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fmyaddr)).Fai_addrlen)) == -1) {
		goto __11
	}
	XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
	goto __6
__11:
	;
	// For asynchroneous connect set the socket in nonblocking mode
	// and activate connect notification
	if !(async_connect != 0) {
		goto __12
	}
	in_socket_list = 0
	// get statePtr lock
	libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)

	// Bugfig for 336441ed59 to not ignore notifications until the
	// infoPtr is in the list.
	// Check if my statePtr is already in the tsdPtr->socketList
	// It is set after this call by TcpThreadActionProc and is set
	// on a second round.
	//
	// If not, we buffer my statePtr in the tsd memory so it is not
	// lost by the event procedure

	statePtr2 = (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketList
__13:
	if !(statePtr2 != uintptr(0)) {
		goto __15
	}
	if !(statePtr2 == statePtr) {
		goto __16
	}
	in_socket_list = 1
	goto __15
__16:
	;
	goto __14
__14:
	statePtr2 = (*TcpState)(unsafe.Pointer(statePtr2)).FnextPtr
	goto __13
	goto __15
__15:
	;
	if !!(in_socket_list != 0) {
		goto __17
	}
	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState = statePtr
__17:
	;
	// Set connect mask to connect events
	// This is activated by a SOCKET_SELECT message to the notifier
	// thread.
	*(*int32)(unsafe.Pointer(statePtr + 28)) |= int32(1) << FD_CONNECT_BIT

	// Free list lock
	libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)

	// activate accept notification
	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2), uint64(TRUE),
		int64(statePtr))
__12:
	;

	// Attempt to connect to the remote socket.

	libc.Xconnect(tls, (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd, (*Addrinfo)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Faddr)).Fai_addr,
		int32((*Addrinfo)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Faddr)).Fai_addrlen))

	error = DWORD(libc.XWSAGetLastError(tls))
	XTclWinConvertError(tls, error)

	if !(async_connect != 0 && error == DWORD(WSABASEERR+35)) {
		goto __18
	}
	// Asynchroneous connect

	// Remember that we jump back behind this next round
	*(*int32)(unsafe.Pointer(statePtr + 16)) |= int32(1) << 4
	return TCL_OK

reenter:
	// Re-entry point for async connect after connect event or
	// blocking operation
	//
	// Clear the reenter flag
	*(*int32)(unsafe.Pointer(statePtr + 16)) &= libc.CplInt32(int32(1) << 4)
	// get statePtr lock
	libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)
	// Get signaled connect error
	XTclWinConvertError(tls, DWORD((*TcpState)(unsafe.Pointer(statePtr)).FnotifierConnectError))
	// Clear eventual connect flag
	*(*int32)(unsafe.Pointer(statePtr + 28)) &= libc.CplInt32(int32(1) << FD_CONNECT_BIT)
	// Free list lock
	libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
__18:
	;

	// Clear the tsd socket list pointer if we did not wait for
	// the FD_CONNECT asynchroneously
	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState = uintptr(0)

	if !(XTcl_GetErrno(tls) == 0) {
		goto __19
	}
	goto out
__19:
	;
	goto __6
__6:
	(*TcpState)(unsafe.Pointer(statePtr)).Fmyaddr = (*Addrinfo)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fmyaddr)).Fai_next
	goto __5
	goto __7
__7:
	;
	goto __3
__3:
	(*TcpState)(unsafe.Pointer(statePtr)).Faddr = (*Addrinfo)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Faddr)).Fai_next
	goto __2
	goto __4
__4:
	;

out:
	// Socket connected or connection failed

	// Async connect terminated

	*(*int32)(unsafe.Pointer(statePtr + 16)) &= libc.CplInt32(int32(1) << 1)

	if !(XTcl_GetErrno(tls) == 0) {
		goto __20
	}
	// Succesfully connected
	// Set up the select mask for read/write events.
	(*TcpState)(unsafe.Pointer(statePtr)).FselectEvents = int32(1)<<FD_READ_BIT | int32(1)<<FD_WRITE_BIT | int32(1)<<FD_CLOSE_BIT

	// Register for interest in events in the select mask. Note that this
	// automatically places the socket into non-blocking mode.

	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2), uint64(TRUE),
		int64(statePtr))
	goto __21
__20:
	// Connect failed

	// For async connect schedule a writable event to report the fail.
	if !(async_callback != 0) {
		goto __22
	}
	// Set up the select mask for read/write events.
	(*TcpState)(unsafe.Pointer(statePtr)).FselectEvents = int32(1)<<FD_WRITE_BIT | int32(1)<<FD_READ_BIT
	// get statePtr lock
	libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)
	// Signal ready readable and writable events
	*(*int32)(unsafe.Pointer(statePtr + 24)) |= int32(1)<<FD_WRITE_BIT | int32(1)<<FD_READ_BIT
	// Flag error to event routine
	*(*int32)(unsafe.Pointer(statePtr + 16)) |= int32(1) << 5
	// Save connect error to be reported by 'fconfigure -error'
	(*TcpState)(unsafe.Pointer(statePtr)).FconnectError = XTcl_GetErrno(tls)
	// Free list lock
	libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
__22:
	;
	// Error message on synchroneous connect
	if !(interp != uintptr(0)) {
		goto __23
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+71783, libc.VaList(bp, XTcl_PosixError(tls, interp))))
__23:
	;
	return TCL_ERROR
__21:
	;
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_OpenTcpClient --
//
//	Opens a TCP client socket and creates a channel around it.
//
// Results:
//	The channel or NULL if failed. An error message is returned in the
//	interpreter on failure.
//
// Side effects:
//	Opens a client socket and creates a new channel.
//
//----------------------------------------------------------------------

func XTcl_OpenTcpClient(tls *libc.TLS, interp uintptr, port int32, host uintptr, myaddr uintptr, myport int32, async int32) Tcl_Channel { /* tclWinSock.c:1888:1: */
	bp := tls.Alloc(61)
	defer tls.Free(61)

	var statePtr uintptr
	*(*uintptr)(unsafe.Pointer(bp + 24 /* errorMsg */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 16 /* addrlist */)) = uintptr(0)
	*(*uintptr)(unsafe.Pointer(bp + 32 /* myaddrlist */)) = uintptr(0)
	// var channelName [21]int8 at bp+40, 21

	if XTclpHasSockets(tls, interp) != TCL_OK {
		return uintptr(0)
	}

	// Check that WinSock is initialized; do not call it if not, to prevent
	// system crashes. This can happen at exit time if the exit handler for
	// WinSock ran before other exit handlers that want to use sockets.

	if !(sSocketsEnabled(tls) != 0) {
		return uintptr(0)
	}

	// Do the name lookups for the local and remote addresses.

	if !(XTclCreateSocketAddress(tls, interp, bp+16, host, port, 0, bp+24) != 0) ||
		!(XTclCreateSocketAddress(tls, interp, bp+32, myaddr, myport, 1,
			bp+24) != 0) {
		if *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0) {
			libc.XWspiapiFreeAddrInfo(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* addrlist */)))
		}
		if interp != uintptr(0) {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+71783, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24 /* errorMsg */)))))
		}
		return uintptr(0)
	}

	statePtr = sNewSocketInfo(tls, libc.Uint64(libc.Uint64FromInt32(libc.CplInt32(0))))
	(*TcpState)(unsafe.Pointer(statePtr)).Faddrlist = *(*uintptr)(unsafe.Pointer(bp + 16 /* addrlist */))
	(*TcpState)(unsafe.Pointer(statePtr)).Fmyaddrlist = *(*uintptr)(unsafe.Pointer(bp + 32 /* myaddrlist */))
	if async != 0 {
		*(*int32)(unsafe.Pointer(statePtr + 16)) |= int32(1) << 1
	}

	// Create a new client socket and wrap it in a channel.
	if sTcpConnect(tls, interp, statePtr) != TCL_OK {
		sTcpCloseProc(tls, statePtr, uintptr(0))
		return uintptr(0)
	}

	libc.Xsprintf(tls, bp+40, ts+71808, libc.VaList(bp+8, statePtr))

	(*TcpState)(unsafe.Pointer(statePtr)).Fchannel = XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&tcpChannelType)), bp+40,
		statePtr, int32(1)<<1|int32(1)<<2)
	if TCL_ERROR == XTcl_SetChannelOption(tls, uintptr(0), (*TcpState)(unsafe.Pointer(statePtr)).Fchannel,
		ts+34223, ts+71815) {
		XTcl_Close(tls, uintptr(0), (*TcpState)(unsafe.Pointer(statePtr)).Fchannel)
		return uintptr(0)
	} else if TCL_ERROR == XTcl_SetChannelOption(tls, uintptr(0), (*TcpState)(unsafe.Pointer(statePtr)).Fchannel,
		ts+34214, ts+2631) {
		XTcl_Close(tls, uintptr(0), (*TcpState)(unsafe.Pointer(statePtr)).Fchannel)
		return uintptr(0)
	}
	return (*TcpState)(unsafe.Pointer(statePtr)).Fchannel
}

//----------------------------------------------------------------------
//
// Tcl_MakeTcpClientChannel --
//
//	Creates a Tcl_Channel from an existing client TCP socket.
//
// Results:
//	The Tcl_Channel wrapped around the preexisting TCP socket.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_MakeTcpClientChannel(tls *libc.TLS, sock ClientData) Tcl_Channel { /* tclWinSock.c:1982:1: */
	bp := tls.Alloc(29)
	defer tls.Free(29)

	var statePtr uintptr
	// var channelName [21]int8 at bp+8, 21

	var tsdPtr uintptr

	if XTclpHasSockets(tls, uintptr(0)) != TCL_OK {
		return uintptr(0)
	}

	tsdPtr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))

	// Set kernel space buffering and non-blocking.

	XTclSockMinimumBuffers(tls, sock, TCP_BUFFER_SIZE)

	statePtr = sNewSocketInfo(tls, uint64(sock))

	// Start watching for read/write events on the socket.

	(*TcpState)(unsafe.Pointer(statePtr)).FselectEvents = int32(1)<<FD_READ_BIT | int32(1)<<FD_CLOSE_BIT | int32(1)<<FD_WRITE_BIT
	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2), uint64(TRUE), int64(statePtr))

	libc.Xsprintf(tls, bp+8, ts+71808, libc.VaList(bp, statePtr))
	(*TcpState)(unsafe.Pointer(statePtr)).Fchannel = XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&tcpChannelType)), bp+8,
		statePtr, int32(1)<<1|int32(1)<<2)
	XTcl_SetChannelOption(tls, uintptr(0), (*TcpState)(unsafe.Pointer(statePtr)).Fchannel, ts+34223, ts+71815)
	return (*TcpState)(unsafe.Pointer(statePtr)).Fchannel
}

//----------------------------------------------------------------------
//
// Tcl_OpenTcpServer --
//
//	Opens a TCP server socket and creates a channel around it.
//
// Results:
//	The channel or NULL if failed. If an error occurred, an error message
//	is left in the interp's result if interp is not NULL.
//
// Side effects:
//	Opens a server socket and creates a new channel.
//
//----------------------------------------------------------------------

func XTcl_OpenTcpServer(tls *libc.TLS, interp uintptr, port int32, myHost uintptr, acceptProc uintptr, acceptProcData ClientData) Tcl_Channel { /* tclWinSock.c:2035:1: */
	bp := tls.Alloc(192)
	defer tls.Free(192)

	var sock SOCKET
	var chosenport uint16
	// var addrlist uintptr at bp+16, 8

	var addrPtr uintptr  // Socket address to listen on.
	var statePtr uintptr // The returned value.
	// var channelName [21]int8 at bp+164, 21

	// var flag U_long at bp+188, 4
	// Indicates nonblocking mode.
	// var errorMsg uintptr at bp+24, 8

	// var sockname Address at bp+32, 128

	// var namelen int32 at bp+160, 4

	var tsdPtr uintptr
	sock = libc.Uint64(libc.Uint64FromInt32(libc.CplInt32(0)))
	chosenport = uint16(0)
	*(*uintptr)(unsafe.Pointer(bp + 16 /* addrlist */)) = uintptr(0)
	statePtr = uintptr(0)
	*(*U_long)(unsafe.Pointer(bp + 188 /* flag */)) = U_long(1)
	*(*uintptr)(unsafe.Pointer(bp + 24 /* errorMsg */)) = uintptr(0)

	if !(XTclpHasSockets(tls, interp) != TCL_OK) {
		goto __1
	}
	return uintptr(0)
__1:
	;

	// Check that WinSock is initialized; do not call it if not, to prevent
	// system crashes. This can happen at exit time if the exit handler for
	// WinSock ran before other exit handlers that want to use sockets.

	if !!(sSocketsEnabled(tls) != 0) {
		goto __2
	}
	return uintptr(0)
__2:
	;

	// Construct the addresses for each end of the socket.

	if !!(XTclCreateSocketAddress(tls, interp, bp+16, myHost, port, 1, bp+24) != 0) {
		goto __3
	}
	goto error
__3:
	;

	addrPtr = *(*uintptr)(unsafe.Pointer(bp + 16 /* addrlist */))
__4:
	if !(addrPtr != uintptr(0)) {
		goto __6
	}
	sock = libc.Xsocket(tls, (*Addrinfo)(unsafe.Pointer(addrPtr)).Fai_family, (*Addrinfo)(unsafe.Pointer(addrPtr)).Fai_socktype,
		(*Addrinfo)(unsafe.Pointer(addrPtr)).Fai_protocol)
	if !(sock == libc.Uint64(libc.Uint64FromInt32(libc.CplInt32(0)))) {
		goto __7
	}
	XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
	goto __5
__7:
	;

	// Win-NT has a misfeature that sockets are inherited in child
	// processes by default. Turn off the inherit bit.

	libc.XSetHandleInformation(tls, HANDLE(sock), uint32(HANDLE_FLAG_INHERIT), uint32(0))

	// Set kernel space buffering

	XTclSockMinimumBuffers(tls, uintptr(sock), TCP_BUFFER_SIZE)

	// Make sure we use the same port when opening two server sockets
	// for IPv4 and IPv6.
	//
	// As sockaddr_in6 uses the same offset and size for the port
	// member as sockaddr_in, we can handle both through the IPv4 API.

	if !(port == 0 && int32(chosenport) != 0) {
		goto __8
	}
	(*Sockaddr_in)(unsafe.Pointer((*Addrinfo)(unsafe.Pointer(addrPtr)).Fai_addr)).Fsin_port = libc.Xhtons(tls, chosenport)
__8:
	;

	// Bind to the specified port. Note that we must not call
	// setsockopt with SO_REUSEADDR because Microsoft allows addresses
	// to be reused even if they are still in use.
	//
	// Bind should not be affected by the socket having already been
	// set into nonblocking mode. If there is trouble, this is one
	// place to look for bugs.

	if !(libc.Xbind(tls, sock, (*Addrinfo)(unsafe.Pointer(addrPtr)).Fai_addr, int32((*Addrinfo)(unsafe.Pointer(addrPtr)).Fai_addrlen)) ==
		-1) {
		goto __9
	}
	XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
	libc.Xclosesocket(tls, sock)
	goto __5
__9:
	;
	if !(port == 0 && int32(chosenport) == 0) {
		goto __10
	}
	*(*int32)(unsafe.Pointer(bp + 160 /* namelen */)) = int32(unsafe.Sizeof(Address{}))

	// Synchronize port numbers when binding to port 0 of multiple
	// addresses.

	if !(libc.Xgetsockname(tls, sock, bp+32, bp+160) >= 0) {
		goto __11
	}
	chosenport = libc.Xntohs(tls, (*Sockaddr_in)(unsafe.Pointer(bp+32)).Fsin_port)
__11:
	;
__10:
	;

	// Set the maximum number of pending connect requests to the max
	// value allowed on each platform (Win32 and Win32s may be
	// different, and there may be differences between TCP/IP stacks).

	if !(libc.Xlisten(tls, sock, SOMAXCONN) == -1) {
		goto __12
	}
	XTclWinConvertError(tls, DWORD(libc.XWSAGetLastError(tls)))
	libc.Xclosesocket(tls, sock)
	goto __5
__12:
	;

	if !(statePtr == uintptr(0)) {
		goto __13
	}
	// Add this socket to the global list of sockets.
	statePtr = sNewSocketInfo(tls, sock)
	goto __14
__13:
	sAddSocketInfoFd(tls, statePtr, sock)
__14:
	;
	goto __5
__5:
	addrPtr = (*Addrinfo)(unsafe.Pointer(addrPtr)).Fai_next
	goto __4
	goto __6
__6:
	;

error:
	if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0)) {
		goto __15
	}
	libc.XWspiapiFreeAddrInfo(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* addrlist */)))
__15:
	;

	if !(statePtr != uintptr(0)) {
		goto __16
	}
	tsdPtr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))

	(*TcpState)(unsafe.Pointer(statePtr)).FacceptProc = acceptProc
	(*TcpState)(unsafe.Pointer(statePtr)).FacceptProcData = acceptProcData
	libc.Xsprintf(tls, bp+164, ts+71808, libc.VaList(bp, statePtr))
	(*TcpState)(unsafe.Pointer(statePtr)).Fchannel = XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&tcpChannelType)), bp+164,
		statePtr, 0)
	// Set up the select mask for connection request events.

	(*TcpState)(unsafe.Pointer(statePtr)).FselectEvents = int32(1) << FD_ACCEPT_BIT

	// Register for interest in events in the select mask. Note that this
	// automatically places the socket into non-blocking mode.

	libc.Xioctlsocket(tls, sock, libc.Int32FromUint32(IOC_IN|uint32(int32(int32(unsafe.Sizeof(U_long(0)))&IOCPARM_MASK)<<16)|uint32(int32('f')<<8)|uint32(126)), bp+188)
	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2), uint64(TRUE),
		int64(statePtr))
	if !(XTcl_SetChannelOption(tls, interp, (*TcpState)(unsafe.Pointer(statePtr)).Fchannel, ts+34214, ts+2631) ==
		TCL_ERROR) {
		goto __17
	}
	XTcl_Close(tls, uintptr(0), (*TcpState)(unsafe.Pointer(statePtr)).Fchannel)
	return uintptr(0)
__17:
	;
	return (*TcpState)(unsafe.Pointer(statePtr)).Fchannel
__16:
	;

	if !(interp != uintptr(0)) {
		goto __18
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+71783,
		libc.VaList(bp+8, func() uintptr {
			if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 {
				return *(*uintptr)(unsafe.Pointer(bp + 24))
			}
			return XTcl_PosixError(tls, interp)
		}())))
__18:
	;

	if !(sock != libc.Uint64(libc.Uint64FromInt32(libc.CplInt32(0)))) {
		goto __19
	}
	libc.Xclosesocket(tls, sock)
__19:
	;
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TcpAccept --
//	Accept a TCP socket connection.	 This is called by the event loop.
//
// Results:
//	None.
//
// Side effects:
//	Creates a new connection socket. Calls the registered callback for the
//	connection acceptance mechanism.
//
//----------------------------------------------------------------------

func sTcpAccept(tls *libc.TLS, fds uintptr, newSocket SOCKET, addr Address) { /* tclWinSock.c:2225:1: */
	bp := tls.Alloc(1217)
	defer tls.Free(1217)
	*(*Address)(unsafe.Pointer(bp + 32)) = addr

	var newInfoPtr uintptr
	var statePtr uintptr = (*TcpFdList)(unsafe.Pointer(fds)).FstatePtr
	var len int32 = int32(unsafe.Sizeof(Address{}))
	// var channelName [21]int8 at bp+8, 21

	// var host [1025]int8 at bp+160, 1025

	// var port [32]int8 at bp+1185, 32

	var tsdPtr uintptr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))

	// Win-NT has a misfeature that sockets are inherited in child processes
	// by default. Turn off the inherit bit.

	libc.XSetHandleInformation(tls, HANDLE(newSocket), uint32(HANDLE_FLAG_INHERIT), uint32(0))

	// Add this socket to the global list of sockets.

	newInfoPtr = sNewSocketInfo(tls, newSocket)

	// Select on read/write events and create the channel.

	(*TcpState)(unsafe.Pointer(newInfoPtr)).FselectEvents = int32(1)<<FD_READ_BIT | int32(1)<<FD_WRITE_BIT | int32(1)<<FD_CLOSE_BIT
	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2), uint64(TRUE),
		int64(newInfoPtr))

	libc.Xsprintf(tls, bp+8, ts+71808, libc.VaList(bp, newInfoPtr))
	(*TcpState)(unsafe.Pointer(newInfoPtr)).Fchannel = XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&tcpChannelType)), bp+8,
		newInfoPtr, int32(1)<<1|int32(1)<<2)
	if XTcl_SetChannelOption(tls, uintptr(0), (*TcpState)(unsafe.Pointer(newInfoPtr)).Fchannel, ts+34223,
		ts+71815) == TCL_ERROR {
		XTcl_Close(tls, uintptr(0), (*TcpState)(unsafe.Pointer(newInfoPtr)).Fchannel)
		return
	}
	if XTcl_SetChannelOption(tls, uintptr(0), (*TcpState)(unsafe.Pointer(newInfoPtr)).Fchannel, ts+34214, ts+2631) ==
		TCL_ERROR {
		XTcl_Close(tls, uintptr(0), (*TcpState)(unsafe.Pointer(newInfoPtr)).Fchannel)
		return
	}

	// Invoke the accept callback function.

	if (*TcpState)(unsafe.Pointer(statePtr)).FacceptProc != uintptr(0) {
		libc.XWspiapiGetNameInfo(tls, bp+32, len, bp+160, uint64(unsafe.Sizeof([1025]int8{})), bp+1185, uint64(unsafe.Sizeof([32]int8{})),
			NI_NUMERICHOST|NI_NUMERICSERV)
		(*struct {
			f func(*libc.TLS, ClientData, Tcl_Channel, uintptr, int32)
		})(unsafe.Pointer(&struct{ uintptr }{(*TcpState)(unsafe.Pointer(statePtr)).FacceptProc})).f(tls, (*TcpState)(unsafe.Pointer(statePtr)).FacceptProcData, (*TcpState)(unsafe.Pointer(newInfoPtr)).Fchannel,
			bp+160, libc.Xatoi(tls, bp+1185 /* &port[0] */))
	}
}

//----------------------------------------------------------------------
//
// InitSockets --
//
//	Registers the event window for the socket notifier code.
//
//	Assumes socketMutex is held.
//
// Results:
//	None.
//
// Side effects:
//	Register a new window class and creates a
//	window for use in asynchronous socket notification.
//
//----------------------------------------------------------------------

func sInitSockets(tls *libc.TLS) { /* tclWinSock.c:2304:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	// var id DWORD at bp, 4

	var tsdPtr uintptr
	tsdPtr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))

	if !!(initialized3 != 0) {
		goto __1
	}
	initialized3 = 1
	XTclCreateLateExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sSocketExitHandler})), uintptr(0))

	// Create the async notification window with a new class. We must
	// create a new class to avoid a Windows 95 bug that causes us to get
	// the wrong message number for socket events if the message window is
	// a subclass of a static control.

	windowClass.Fstyle = UINT(0)
	windowClass.FcbClsExtra = 0
	windowClass.FcbWndExtra = 0
	windowClass.FhInstance = XTclWinGetTclInstance(tls)
	windowClass.FhbrBackground = uintptr(0)
	windowClass.FlpszMenuName = uintptr(0)
	windowClass.FlpszClassName = uintptr(unsafe.Pointer(&classname1))
	windowClass.FlpfnWndProc = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, HWND, UINT, WPARAM, LPARAM) LRESULT
	}{sSocketProc}))
	windowClass.FhIcon = uintptr(0)
	windowClass.FhCursor = uintptr(0)

	if !!(libc.XRegisterClassW(tls, uintptr(unsafe.Pointer(&windowClass))) != 0) {
		goto __2
	}
	XTclWinConvertError(tls, libc.XGetLastError(tls))
	goto initFailure
__2:
	;
__1:
	;

	// Check for per-thread initialization.

	if !(tsdPtr != uintptr(0)) {
		goto __3
	}
	return
__3:
	;

	// OK, this thread has never done anything with sockets before.  Construct
	// a worker thread to handle asynchronous events related to sockets
	// assigned to _this_ thread.

	tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey17)), int32(unsafe.Sizeof(ThreadSpecificData18{})))
	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState = uintptr(0)
	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketList = uintptr(0)
	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd = uintptr(0)
	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FthreadId = XTcl_GetCurrentThread(tls)
	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent = libc.XCreateEventW(tls, uintptr(0), FALSE, FALSE, uintptr(0))
	if !((*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent == uintptr(0)) {
		goto __4
	}
	goto initFailure
__4:
	;
	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock = libc.XCreateEventW(tls, uintptr(0), FALSE, TRUE, uintptr(0))
	if !((*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock == uintptr(0)) {
		goto __5
	}
	goto initFailure
__5:
	;
	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketThread = libc.XCreateThread(tls, uintptr(0), uint64(256), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPVOID) DWORD }{sSocketThread})), tsdPtr, uint32(0),
		bp)
	if !((*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketThread == uintptr(0)) {
		goto __6
	}
	goto initFailure
__6:
	;

	libc.XSetThreadPriority(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketThread, THREAD_BASE_PRIORITY_MAX)

	// Wait for the thread to signal when the window has been created and if
	// it is ready to go.

	libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent, INFINITE)

	if !((*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd == uintptr(0)) {
		goto __7
	}
	goto initFailure // Trouble creating the window.
__7:
	;

	XTcl_CreateEventSource(tls, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{XSocketSetupProc})), *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, int32)
	}{sSocketCheckProc})), uintptr(0))
	return

initFailure:
	XTclpFinalizeSockets(tls)
	initialized3 = -1
	return
}

//----------------------------------------------------------------------
//
// SocketsEnabled --
//
//	Check that the WinSock was successfully initialized.
//
// Warning:
//	This check was useful in times of Windows98 where WinSock may
//	not be available. This is not the case any more.
//	This function may be removed with TCL 9.0
//
// Results:
//	1 if it is.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSocketsEnabled(tls *libc.TLS) int32 { /* tclWinSock.c:2414:1: */
	var enabled int32

	enabled = libc.Bool32(initialized3 == 1)

	return enabled
}

//----------------------------------------------------------------------
//
// SocketExitHandler --
//
//	Callback invoked during exit clean up to delete the socket
//	communication window.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSocketExitHandler(tls *libc.TLS, clientData ClientData) { /* tclWinSock.c:2443:1: */

	// Make sure the socket event handling window is cleaned-up for, at
	// most, this thread.

	XTclpFinalizeSockets(tls)
	libc.XUnregisterClassW(tls, uintptr(unsafe.Pointer(&classname1)), XTclWinGetTclInstance(tls))
	initialized3 = 0

}

//----------------------------------------------------------------------
//
// SocketSetupProc --
//
//	This function is invoked before Tcl_DoOneEvent blocks waiting for an
//	event.
//
// Results:
//	None.
//
// Side effects:
//	Adjusts the block time if needed.
//
//----------------------------------------------------------------------

func XSocketSetupProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinSock.c:2477:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var statePtr uintptr
	*(*Tcl_Time)(unsafe.Pointer(bp /* blockTime */)) = Tcl_Time{}
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey17)), int32(unsafe.Sizeof(ThreadSpecificData18{})))

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Check to see if there is a ready socket.	 If so, poll.
	libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)
	for statePtr = (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketList; statePtr != uintptr(0); statePtr = (*TcpState)(unsafe.Pointer(statePtr)).FnextPtr {
		if (*TcpState)(unsafe.Pointer(statePtr)).FreadyEvents&((*TcpState)(unsafe.Pointer(statePtr)).FwatchEvents|int32(1)<<FD_CONNECT_BIT|int32(1)<<FD_ACCEPT_BIT) != 0 {
			XTcl_SetMaxBlockTime(tls, bp)
			break
		}
	}
	libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
}

//----------------------------------------------------------------------
//
// SocketCheckProc --
//
//	This function is called by Tcl_DoOneEvent to check the socket event
//	source for events.
//
// Results:
//	None.
//
// Side effects:
//	May queue an event.
//
//----------------------------------------------------------------------

func sSocketCheckProc(tls *libc.TLS, data ClientData, flags int32) { /* tclWinSock.c:2523:1: */
	var statePtr uintptr
	var evPtr uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey17)), int32(unsafe.Sizeof(ThreadSpecificData18{})))

	if !(flags&(int32(1)<<3) != 0) {
		return
	}

	// Queue events for any ready sockets that don't already have events
	// queued (caused by persistent states that won't generate WinSock
	// events).

	libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)
	for statePtr = (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketList; statePtr != uintptr(0); statePtr = (*TcpState)(unsafe.Pointer(statePtr)).FnextPtr {
		if (*TcpState)(unsafe.Pointer(statePtr)).FreadyEvents&((*TcpState)(unsafe.Pointer(statePtr)).FwatchEvents|int32(1)<<FD_CONNECT_BIT|int32(1)<<FD_ACCEPT_BIT) != 0 &&
			!((*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<3) != 0) {
			*(*int32)(unsafe.Pointer(statePtr + 16)) |= int32(1) << 3
			evPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(SocketEvent{})))
			(*SocketEvent)(unsafe.Pointer(evPtr)).Fheader.Fproc = *(*uintptr)(unsafe.Pointer(&struct {
				f func(*libc.TLS, uintptr, int32) int32
			}{sSocketEventProc}))
			(*SocketEvent)(unsafe.Pointer(evPtr)).Fsocket = (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd
			XTcl_QueueEvent(tls, evPtr, TCL_QUEUE_TAIL)
		}
	}
	libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
}

//----------------------------------------------------------------------
//
// SocketEventProc --
//
//	This function is called by Tcl_ServiceEvent when a socket event
//	reaches the front of the event queue. This function is responsible for
//	notifying the generic channel code.
//
// Results:
//	Returns 1 if the event was handled, meaning it should be removed from
//	the queue. Returns 0 if the event was not handled, meaning it should
//	stay on the queue. The only time the event isn't handled is if the
//	TCL_FILE_EVENTS flag bit isn't set.
//
// Side effects:
//	Whatever the channel callback functions do.
//
//----------------------------------------------------------------------

func sSocketEventProc(tls *libc.TLS, evPtr uintptr, flags int32) int32 { /* tclWinSock.c:2580:1: */
	bp := tls.Alloc(672)
	defer tls.Free(672)

	var statePtr uintptr
	var eventPtr uintptr = evPtr
	var mask int32 = 0
	var events int32
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey17)), int32(unsafe.Sizeof(ThreadSpecificData18{})))
	var fds uintptr
	var newSocket SOCKET
	// var addr Address at bp, 128

	// var len int32 at bp+128, 4

	if !(flags&(int32(1)<<3) != 0) {
		return 0
	}

	// Find the specified socket on the socket list.

	libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)
	for statePtr = (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketList; statePtr != uintptr(0); statePtr = (*TcpState)(unsafe.Pointer(statePtr)).FnextPtr {
		if (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd == (*SocketEvent)(unsafe.Pointer(eventPtr)).Fsocket {
			break
		}
	}

	// Discard events that have gone stale.

	if !(statePtr != 0) {
		libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
		return 1
	}

	// Clear flag that (this) event is pending

	*(*int32)(unsafe.Pointer(statePtr + 16)) &= libc.CplInt32(int32(1) << 3)

	// Continue async connect if pending and ready

	if (*TcpState)(unsafe.Pointer(statePtr)).FreadyEvents&(int32(1)<<FD_CONNECT_BIT) != 0 {
		if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<4) != 0 {

			// Do one step and save eventual connect error

			libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
			sWaitForConnect(tls, statePtr, uintptr(0))

		} else {

			// No async connect reenter pending. Just clear event.

			*(*int32)(unsafe.Pointer(statePtr + 24)) &= libc.CplInt32(int32(1) << FD_CONNECT_BIT)
			libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
		}
		return 1
	}

	// Handle connection requests directly.
	if (*TcpState)(unsafe.Pointer(statePtr)).FreadyEvents&(int32(1)<<FD_ACCEPT_BIT) != 0 {
		for fds = (*TcpState)(unsafe.Pointer(statePtr)).Fsockets; fds != uintptr(0); fds = (*TcpFdList)(unsafe.Pointer(fds)).Fnext {

			// Accept the incoming connection request.
			*(*int32)(unsafe.Pointer(bp + 128 /* len */)) = int32(unsafe.Sizeof(Address{}))

			newSocket = libc.Xaccept(tls, (*TcpFdList)(unsafe.Pointer(fds)).Ffd, bp, bp+128)

			// On Tcl server sockets with multiple OS fds we loop over the fds trying
			// an accept() on each, so we expect INVALID_SOCKET.  There are also other
			// network stack conditions that can result in FD_ACCEPT but a subsequent
			// failure on accept() by the time we get around to it.
			// Access to sockets (acceptEventCount, readyEvents) in socketList
			// is still protected by the lock (prevents reintroduction of
			// SF Tcl Bug 3056775.

			if newSocket == libc.Uint64(libc.Uint64FromInt32(libc.CplInt32(0))) {
				// int err = WSAGetLastError();
				continue
			}

			// It is possible that more than one FD_ACCEPT has been sent, so an extra
			// count must be kept. Decrement the count, and reset the readyEvent bit
			// if the count is no longer > 0.
			(*TcpState)(unsafe.Pointer(statePtr)).FacceptEventCount--

			if (*TcpState)(unsafe.Pointer(statePtr)).FacceptEventCount <= 0 {
				*(*int32)(unsafe.Pointer(statePtr + 24)) &= libc.CplInt32(int32(1) << FD_ACCEPT_BIT)
			}

			libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)

			// Caution: TcpAccept() has the side-effect of evaluating the server
			// accept script (via AcceptCallbackProc() in tclIOCmd.c), which can
			// close the server socket and invalidate statePtr and fds.
			// If TcpAccept() accepts a socket we must return immediately and let
			// SocketCheckProc queue additional FD_ACCEPT events.
			sTcpAccept(tls, fds, newSocket, *(*Address)(unsafe.Pointer(bp /* addr */)))
			return 1
		}

		// Loop terminated with no sockets accepted; clear the ready mask so
		// we can detect the next connection request. Note that connection
		// requests are level triggered, so if there is a request already
		// pending, a new event will be generated.
		(*TcpState)(unsafe.Pointer(statePtr)).FacceptEventCount = 0
		*(*int32)(unsafe.Pointer(statePtr + 24)) &= libc.CplInt32(int32(1) << FD_ACCEPT_BIT)

		libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
		return 1
	}

	libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)

	// Mask off unwanted events and compute the read/write mask so we can
	// notify the channel.

	events = (*TcpState)(unsafe.Pointer(statePtr)).FreadyEvents & (*TcpState)(unsafe.Pointer(statePtr)).FwatchEvents

	if events&(int32(1)<<FD_CLOSE_BIT) != 0 {
		// If the socket was closed and the channel is still interested in
		// read events, then we need to ensure that we keep polling for this
		// event until someone does something with the channel. Note that we
		// do this before calling Tcl_NotifyChannel so we don't have to watch
		// out for the channel being deleted out from under us. This may cause
		// a redundant trip through the event loop, but it's simpler than
		// trying to do unwind protection.

		*(*Tcl_Time)(unsafe.Pointer(bp + 132 /* blockTime */)) = Tcl_Time{}

		XTcl_SetMaxBlockTime(tls, bp+132)
		mask = mask | (int32(1)<<1 | int32(1)<<2)
	} else if events&(int32(1)<<FD_READ_BIT) != 0 {

		// Throw the readable event if an async connect failed.

		if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<5) != 0 {

			mask = mask | int32(1)<<1

		} else {
			// var readFds Fd_set at bp+144, 520

			// var timeout Timeval at bp+664, 8

			// We must check to see if data is really available, since someone
			// could have consumed the data in the meantime. Turn off async
			// notification so select will work correctly. If the socket is
			// still readable, notify the channel driver, otherwise reset the
			// async select handler and keep waiting.

			libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2),
				uint64(FALSE), int64(statePtr))

			libc.X__builtin_memset(tls, bp+144, 0, uint64(unsafe.Sizeof(Fd_set{})))
			for ok := true; ok; ok = 0 != 0 {
				var __i U_int
				for __i = U_int(0); __i < (*Fd_set)(unsafe.Pointer(bp+144 /* &readFds */)).Ffd_count; __i++ {
					if *(*SOCKET)(unsafe.Pointer(bp + 144 /* &readFds */ + 8 /* &.fd_array */ + uintptr(__i)*8)) == (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd {
						break
					}
				}
				if __i == (*Fd_set)(unsafe.Pointer(bp+144 /* &readFds */)).Ffd_count {
					if (*Fd_set)(unsafe.Pointer(bp+144 /* &readFds */)).Ffd_count < U_int(FD_SETSIZE) {
						*(*SOCKET)(unsafe.Pointer(bp + 144 /* &readFds */ + 8 /* &.fd_array */ + uintptr(__i)*8)) = (*TcpFdList1)(unsafe.Pointer((*TcpState)(unsafe.Pointer(statePtr)).Fsockets)).Ffd
						(*Fd_set)(unsafe.Pointer(bp+144 /* &readFds */)).Ffd_count++
					}
				}
			}
			(*Timeval)(unsafe.Pointer(bp + 664 /* &timeout */)).Ftv_usec = 0
			(*Timeval)(unsafe.Pointer(bp + 664 /* &timeout */)).Ftv_sec = 0

			if libc.Xselect(tls, 0, bp+144, uintptr(0), uintptr(0), bp+664) != 0 {
				mask = mask | int32(1)<<1
			} else {
				*(*int32)(unsafe.Pointer(statePtr + 24)) &= libc.CplInt32(int32(1) << FD_READ_BIT)
				libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2),
					uint64(TRUE), int64(statePtr))
			}
		}
	}

	// writable event

	if events&(int32(1)<<FD_WRITE_BIT) != 0 {
		mask = mask | int32(1)<<2
	}

	// Call registered event procedures

	if mask != 0 {
		XTcl_NotifyChannel(tls, (*TcpState)(unsafe.Pointer(statePtr)).Fchannel, mask)
	}
	return 1
}

//----------------------------------------------------------------------
//
// AddSocketInfoFd --
//
//	This function adds a SOCKET file descriptor to the 'sockets' linked
//	list of a TcpState structure.
//
// Results:
//	None.
//
// Side effects:
//	None, except for allocation of memory.
//
//----------------------------------------------------------------------

func sAddSocketInfoFd(tls *libc.TLS, statePtr uintptr, socket SOCKET) { /* tclWinSock.c:2813:1: */
	var fds uintptr = (*TcpState)(unsafe.Pointer(statePtr)).Fsockets

	if fds == uintptr(0) {
		// Add the first FD
		(*TcpState)(unsafe.Pointer(statePtr)).Fsockets = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TcpFdList{})))
		fds = (*TcpState)(unsafe.Pointer(statePtr)).Fsockets
	} else {
		// Find end of list and append FD
		for (*TcpFdList)(unsafe.Pointer(fds)).Fnext != uintptr(0) {
			fds = (*TcpFdList)(unsafe.Pointer(fds)).Fnext
		}

		(*TcpFdList)(unsafe.Pointer(fds)).Fnext = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TcpFdList{})))
		fds = (*TcpFdList)(unsafe.Pointer(fds)).Fnext
	}

	// Populate new FD
	(*TcpFdList)(unsafe.Pointer(fds)).Ffd = socket
	(*TcpFdList)(unsafe.Pointer(fds)).FstatePtr = statePtr
	(*TcpFdList)(unsafe.Pointer(fds)).Fnext = uintptr(0)
}

//----------------------------------------------------------------------
//
// NewSocketInfo --
//
//	This function allocates and initializes a new TcpState structure.
//
// Results:
//	Returns a newly allocated TcpState.
//
// Side effects:
//	None, except for allocation of memory.
//
//----------------------------------------------------------------------

func sNewSocketInfo(tls *libc.TLS, socket SOCKET) uintptr { /* tclWinSock.c:2856:17: */
	var statePtr uintptr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(TcpState{})))

	libc.Xmemset(tls, statePtr, 0, uint64(unsafe.Sizeof(TcpState{})))

	// TIP #218. Removed the code inserting the new structure into the global
	// list. This is now handled in the thread action callbacks, and only
	// there.

	sAddSocketInfoFd(tls, statePtr, socket)

	return statePtr
}

//----------------------------------------------------------------------
//
// WaitForSocketEvent --
//
//	Waits until one of the specified events occurs on a socket.
//	For event FD_CONNECT use WaitForConnect.
//
// Results:
//	Returns 1 on success or 0 on failure, with an error code in
//	errorCodePtr.
//
// Side effects:
//	Processes socket events off the system queue.
//
//----------------------------------------------------------------------

func sWaitForSocketEvent(tls *libc.TLS, statePtr uintptr, events int32, errorCodePtr uintptr) int32 { /* tclWinSock.c:2893:1: */
	var result int32 = 1
	var oldMode int32
	var tsdPtr uintptr = XTclThreadDataKeyGet(tls, uintptr(unsafe.Pointer(&dataKey17)))
	// Be sure to disable event servicing so we are truly modal.

	oldMode = XTcl_SetServiceMode(tls, TCL_SERVICE_NONE)

	// Reset WSAAsyncSelect so we have a fresh set of events pending.

	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2), uint64(FALSE),
		int64(statePtr))
	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2), uint64(TRUE),
		int64(statePtr))

	for 1 != 0 {
		var event_found int32

		// get statePtr lock
		libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)

		// Check if event occured
		event_found = (*TcpState)(unsafe.Pointer(statePtr)).FreadyEvents & events

		// Free list lock
		libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)

		// exit loop if event occured
		if event_found != 0 {
			break
		}

		// Exit loop if event did not occur but this is a non-blocking channel
		if (*TcpState)(unsafe.Pointer(statePtr)).Fflags&(int32(1)<<0) != 0 {
			*(*int32)(unsafe.Pointer(errorCodePtr)) = EWOULDBLOCK
			result = 0
			break
		}

		// Wait until something happens.

		libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent, INFINITE)
	}

	XTcl_SetServiceMode(tls, oldMode)
	return result
}

//----------------------------------------------------------------------
//
// SocketThread --
//
//	Helper thread used to manage the socket event handling window.
//
// Results:
//	1 if unable to create socket event window, 0 otherwise.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func sSocketThread(tls *libc.TLS, arg LPVOID) DWORD { /* tclWinSock.c:2970:1: */
	bp := tls.Alloc(48)
	defer tls.Free(48)

	// var msg MSG at bp, 48

	var tsdPtr uintptr = arg

	// Create a dummy window receiving socket events.

	(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd = libc.XCreateWindowExW(tls, DWORD(0), uintptr(unsafe.Pointer(&classname1)), uintptr(unsafe.Pointer(&classname1)), uint32(0x00000000), 0, 0, 0, 0, uintptr(0), uintptr(0), windowClass.FhInstance, arg)

	// Signalize thread creator that we are done creating the window.

	libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent)

	// If unable to create the window, exit this thread immediately.

	if (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd == uintptr(0) {
		return DWORD(1)
	}

	// Process all messages on the socket window until WM_QUIT. This threads
	// exits only when instructed to do so by the call to
	// PostMessageW(SOCKET_TERMINATE) in TclpFinalizeSockets().

	for libc.XGetMessageW(tls, bp, uintptr(0), uint32(0), uint32(0)) > 0 {
		libc.XDispatchMessageW(tls, bp)
	}

	// This releases waiters on thread exit in TclpFinalizeSockets()

	libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent)

	return DWORD((*MSG)(unsafe.Pointer(bp /* &msg */)).FwParam)
}

//----------------------------------------------------------------------
//
// SocketProc --
//
//	This function is called when WSAAsyncSelect has been used to register
//	interest in a socket event, and the event has occurred.
//
// Results:
//	0 on success.
//
// Side effects:
//	The flags for the given socket are updated to reflect the event that
//	occured.
//
//----------------------------------------------------------------------

func sSocketProc(tls *libc.TLS, hwnd HWND, message UINT, wParam WPARAM, lParam LPARAM) LRESULT { /* tclWinSock.c:3036:1: */
	var event int32
	var error int32
	var socket SOCKET
	var statePtr uintptr
	var info_found int32 = 0
	var fds uintptr = uintptr(0)
	var tsdPtr uintptr = uintptr(libc.XGetWindowLongPtrW(tls, hwnd, -21))

	switch message {
	default:
		return libc.XDefWindowProcW(tls, hwnd, message, wParam, lParam)
		break

	case UINT(WM_CREATE):
		// Store the initial tsdPtr, it's from a different thread, so it's not
		// directly accessible, but needed.

		libc.XSetWindowLongPtrW(tls, hwnd, -21,
			int64((*TagCREATESTRUCTA)(unsafe.Pointer(LPCREATESTRUCT2(lParam))).FlpCreateParams))
		break

	case UINT(WM_DESTROY):
		libc.XPostQuitMessage(tls, 0)
		break

	case UINT(WM_USER + 1):
		event = int32(WORD(DWORD_PTR(lParam) & uint64(0xffff)))
		error = int32(WORD(DWORD_PTR(lParam) >> 16 & uint64(0xffff)))
		socket = wParam

		libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)

		// Find the specified socket on the socket list and update its
		// eventState flag.

		for statePtr = (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketList; statePtr != uintptr(0); statePtr = (*TcpState)(unsafe.Pointer(statePtr)).FnextPtr {
			if sFindFDInList(tls, statePtr, socket) != 0 {
				info_found = 1
				break
			}
		}
		// Check if there is a pending info structure not jet in the
		// list
		if !(info_found != 0) &&
			(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState != uintptr(0) &&
			sFindFDInList(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState, socket) != 0 {
			statePtr = (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState
			info_found = 1
		}
		if info_found != 0 {

			// Update the socket state.
			//
			// A count of FD_ACCEPTS is stored, so if an FD_CLOSE event
			// happens, then clear the FD_ACCEPT count. Otherwise,
			// increment the count if the current event is an FD_ACCEPT.

			if event&(int32(1)<<FD_CLOSE_BIT) != 0 {
				(*TcpState)(unsafe.Pointer(statePtr)).FacceptEventCount = 0
				*(*int32)(unsafe.Pointer(statePtr + 24)) &= libc.CplInt32(int32(1)<<FD_WRITE_BIT | int32(1)<<FD_ACCEPT_BIT)
			} else if event&(int32(1)<<FD_ACCEPT_BIT) != 0 {
				(*TcpState)(unsafe.Pointer(statePtr)).FacceptEventCount++
			}

			if event&(int32(1)<<FD_CONNECT_BIT) != 0 {
				// Remember any error that occurred so we can report
				// connection failures.
				if int32(error) != 0 {
					(*TcpState)(unsafe.Pointer(statePtr)).FnotifierConnectError = error
				}
			}
			// Inform main thread about signaled events
			*(*int32)(unsafe.Pointer(statePtr + 24)) |= event

			// Wake up the Main Thread.
			libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FreadyEvent)
			XTcl_ThreadAlert(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FthreadId)
		}
		libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)
		break

	case UINT(WM_USER + 2):
		statePtr = uintptr(lParam)
		for fds = (*TcpState)(unsafe.Pointer(statePtr)).Fsockets; fds != uintptr(0); fds = (*TcpFdList)(unsafe.Pointer(fds)).Fnext {
			if wParam == uint64(TRUE) {
				libc.XWSAAsyncSelect(tls, (*TcpFdList)(unsafe.Pointer(fds)).Ffd, hwnd,
					uint32(WM_USER+1), int32((*TcpState)(unsafe.Pointer(statePtr)).FselectEvents))
			} else {
				// Clear the selection mask

				libc.XWSAAsyncSelect(tls, (*TcpFdList)(unsafe.Pointer(fds)).Ffd, hwnd, uint32(0), 0)
			}
		}
		break

	case UINT(WM_USER + 3):
		libc.XDestroyWindow(tls, hwnd)
		break
	}

	return int64(0)
}

//----------------------------------------------------------------------
//
// FindFDInList --
//
//	Return true, if the given file descriptior is contained in the
//	file descriptor list.
//
// Results:
//	true if found.
//
// Side effects:
//
//----------------------------------------------------------------------

func sFindFDInList(tls *libc.TLS, statePtr uintptr, socket SOCKET) int32 { /* tclWinSock.c:3188:1: */
	var fds uintptr
	for fds = (*TcpState)(unsafe.Pointer(statePtr)).Fsockets; fds != uintptr(0); fds = (*TcpFdList)(unsafe.Pointer(fds)).Fnext {
		if (*TcpFdList)(unsafe.Pointer(fds)).Ffd == socket {
			return 1
		}
	}
	return 0
}

//----------------------------------------------------------------------
//
// TclWinGetSockOpt, et al. --
//
//	Those functions are historically exported by the stubs table and
//	just use the original system calls now.
//
// Warning:
//	Those functions are depreciated and will be removed with TCL 9.0.
//
// Results:
//	As defined for each function.
//
// Side effects:
//	As defined for each function.
//
//----------------------------------------------------------------------

func XTclWinGetSockOpt(tls *libc.TLS, s SOCKET, level int32, optname int32, optval uintptr, optlen uintptr) int32 { /* tclWinSock.c:3223:1: */

	return libc.Xgetsockopt(tls, s, level, optname, optval, optlen)
}

func XTclWinSetSockOpt(tls *libc.TLS, s SOCKET, level int32, optname int32, optval uintptr, optlen int32) int32 { /* tclWinSock.c:3235:1: */
	return libc.Xsetsockopt(tls, s, level, optname, optval, optlen)
}

func XTclpInetNtoa(tls *libc.TLS, addr In_addr) uintptr { /* tclWinSock.c:3246:6: */
	return libc.Xinet_ntoa(tls, addr)
}

func XTclWinGetServByName(tls *libc.TLS, name uintptr, proto uintptr) uintptr { /* tclWinSock.c:3253:16: */
	return libc.Xgetservbyname(tls, name, proto)
}

//----------------------------------------------------------------------
//
// TcpThreadActionProc --
//
//	Insert or remove any thread local refs to this channel.
//
// Results:
//	None.
//
// Side effects:
//	Changes thread local list of valid channels.
//
//----------------------------------------------------------------------

func sTcpThreadActionProc(tls *libc.TLS, instanceData ClientData, action int32) { /* tclWinSock.c:3278:1: */
	var tsdPtr uintptr
	var statePtr uintptr = instanceData
	var notifyCmd int32

	if action == 0 {
		// Ensure that socket subsystem is initialized in this thread, or else
		// sockets will not work.

		sInitSockets(tls)

		tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey17)), int32(unsafe.Sizeof(ThreadSpecificData18{})))

		libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)
		(*TcpState)(unsafe.Pointer(statePtr)).FnextPtr = (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketList
		(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketList = statePtr

		if statePtr == (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState {
			(*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FpendingTcpState = uintptr(0)
		}

		libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)

		notifyCmd = TRUE
	} else {
		var nextPtrPtr uintptr
		var removed int32 = 0

		tsdPtr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey17)), int32(unsafe.Sizeof(ThreadSpecificData18{})))

		// TIP #218, Bugfix: All access to socketList has to be protected by
		// the lock.

		libc.XWaitForSingleObject(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock, INFINITE)
		for nextPtrPtr = tsdPtr + 48; *(*uintptr)(unsafe.Pointer(nextPtrPtr)) != uintptr(0); nextPtrPtr = *(*uintptr)(unsafe.Pointer(nextPtrPtr)) + 104 {
			if *(*uintptr)(unsafe.Pointer(nextPtrPtr)) == statePtr {
				*(*uintptr)(unsafe.Pointer(nextPtrPtr)) = (*TcpState)(unsafe.Pointer(statePtr)).FnextPtr
				removed = 1
				break
			}
		}
		libc.XSetEvent(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).FsocketListLock)

		// This could happen if the channel was created in one thread and then
		// moved to another without updating the thread local data in each
		// thread.

		if !(removed != 0) {
			XTcl_Panic(tls, ts+67517, 0)
		}

		notifyCmd = FALSE
	}

	// Ensure that, or stop, notifications for the socket occur in this
	// thread.

	libc.XSendMessageW(tls, (*ThreadSpecificData18)(unsafe.Pointer(tsdPtr)).Fhwnd, uint32(WM_USER+2),
		WPARAM(notifyCmd), int64(statePtr))
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// tab-width: 8
// indent-tabs-mode: nil
// End:

// Copyright (C) 2002-2020 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
// GCC is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3, or (at your option)
// any later version.
//
// GCC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
//
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

// ISO C Standard:  5.2.4.2.2  Characteristics of floating types <float.h>

// float.h
// This file has no copyright assigned and is placed in the Public Domain.
// This file is part of the mingw-runtime package.
// No warranty is given; refer to the file DISCLAIMER.PD within the package.
//
// Constants related to floating point arithmetic.
//
// Also included here are some non-ANSI bits for accessing the floating
// point controller.
//

// Workaround for mingw versions which don't provide this in float.h

// This is the global lock used to serialize access to other serialization
// data structures.

var globalLock CRITICAL_SECTION /* tclWinThrd.c:31:25: */
var init1 int32 = 0             /* tclWinThrd.c:32:12 */

// This is the global lock used to serialize initialization and finalization
// of Tcl as a whole.

var initLock CRITICAL_SECTION /* tclWinThrd.c:42:25: */

// allocLock is used by Tcl's version of malloc for synchronization. For
// obvious reasons, cannot use any dynamically allocated storage.

// The joinLock serializes Create- and ExitThread. This is necessary to
// prevent a race where a new joinable thread exits before the creating thread
// had the time to create the necessary data structures in the emulation
// layer.

var joinLock CRITICAL_SECTION /* tclWinThrd.c:66:25: */

// Condition variables are implemented with a combination of a per-thread
// Windows Event and a per-condition waiting queue. The idea is that each
// thread has its own Event that it waits on when it is doing a ConditionWait;
// it uses the same event for all condition variables because it only waits on
// one at a time. Each condition variable has a queue of waiting threads, and
// a mutex used to serialize access to this queue.
//
// Special thanks to David Nichols and Jim Davidson for advice on the
// Condition Variable implementation.

// The per-thread event and queue pointers.

// State bits for the thread.
// WIN_THREAD_UNINIT		Uninitialized. Must be zero because of the way
//				ThreadSpecificData is created.
// WIN_THREAD_RUNNING		Running, not waiting.
// WIN_THREAD_BLOCKED		Waiting, or trying to wait.

// The per condition queue pointers and the Mutex used to serialize access to
// the queue.

type WinCondition1 = struct {
	FcondLock CRITICAL_SECTION
	FfirstPtr uintptr
	FlastPtr  uintptr
} /* tclWinThrd.c:113:9 */

// Condition variables are implemented with a combination of a per-thread
// Windows Event and a per-condition waiting queue. The idea is that each
// thread has its own Event that it waits on when it is doing a ConditionWait;
// it uses the same event for all condition variables because it only waits on
// one at a time. Each condition variable has a queue of waiting threads, and
// a mutex used to serialize access to this queue.
//
// Special thanks to David Nichols and Jim Davidson for advice on the
// Condition Variable implementation.

// The per-thread event and queue pointers.

// State bits for the thread.
// WIN_THREAD_UNINIT		Uninitialized. Must be zero because of the way
//				ThreadSpecificData is created.
// WIN_THREAD_RUNNING		Running, not waiting.
// WIN_THREAD_BLOCKED		Waiting, or trying to wait.

// The per condition queue pointers and the Mutex used to serialize access to
// the queue.

type WinCondition = WinCondition1 /* tclWinThrd.c:118:3 */

// Additions by AOL for specialized thread memory allocator.

// The per thread data passed from TclpThreadCreate
// to TclWinThreadStart.

type WinThread1 = struct {
	FlpStartAddress LPTHREAD_START_ROUTINE
	FlpParameter    LPVOID
	FfpControl      uint32
	F__ccgo_pad1    [4]byte
} /* tclWinThrd.c:139:9 */

// Additions by AOL for specialized thread memory allocator.

// The per thread data passed from TclpThreadCreate
// to TclWinThreadStart.

type WinThread = WinThread1 /* tclWinThrd.c:144:3 */

//----------------------------------------------------------------------
//
// TclWinThreadStart --
//
//	This procedure is the entry point for all new threads created
//	by Tcl on Windows.
//
// Results:
//	Various, depending on the result of the wrapped thread start
//	routine.
//
// Side effects:
//	Arbitrary, since user code is executed.
//
//----------------------------------------------------------------------

func sTclWinThreadStart(tls *libc.TLS, lpParameter LPVOID) DWORD { /* tclWinThrd.c:166:1: */
	var winThreadPtr uintptr = lpParameter
	var lpOrigStartAddress LPTHREAD_START_ROUTINE
	var lpOrigParameter LPVOID

	if !(winThreadPtr != 0) {
		return DWORD(TCL_ERROR)
	}

	libc.X_controlfp(tls, (*WinThread)(unsafe.Pointer(winThreadPtr)).FfpControl, uint32(X_MCW_EM|X_MCW_RC|0x03000000))

	lpOrigStartAddress = (*WinThread)(unsafe.Pointer(winThreadPtr)).FlpStartAddress
	lpOrigParameter = (*WinThread)(unsafe.Pointer(winThreadPtr)).FlpParameter

	XTclpFree(tls, winThreadPtr)
	return (*struct{ f func(*libc.TLS, LPVOID) DWORD })(unsafe.Pointer(&struct{ uintptr }{lpOrigStartAddress})).f(tls, lpOrigParameter)
}

//----------------------------------------------------------------------
//
// TclpThreadCreate --
//
//	This procedure creates a new thread.
//
// Results:
//	TCL_OK if the thread could be created. The thread ID is returned in a
//	parameter.
//
// Side effects:
//	A new thread is created.
//
//----------------------------------------------------------------------

func XTclpThreadCreate(tls *libc.TLS, idPtr uintptr, proc uintptr, clientData ClientData, stackSize int32, flags int32) int32 { /* tclWinThrd.c:209:1: */
	var winThreadPtr uintptr // Per-thread startup info
	var tHandle HANDLE

	winThreadPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(WinThread{})))
	(*WinThread)(unsafe.Pointer(winThreadPtr)).FlpStartAddress = proc
	(*WinThread)(unsafe.Pointer(winThreadPtr)).FlpParameter = clientData
	(*WinThread)(unsafe.Pointer(winThreadPtr)).FfpControl = libc.X_controlfp(tls, uint32(0), uint32(0))

	libc.XEnterCriticalSection(tls, uintptr(unsafe.Pointer(&joinLock)))

	*(*Tcl_ThreadId)(unsafe.Pointer(idPtr)) = uintptr(0) // must initialize as Tcl_Thread is a pointer and
	// on WIN64 sizeof void* != sizeof unsigned

	tHandle = HANDLE(libc.X_beginthreadex(tls, uintptr(0), uint32(stackSize),
		*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPVOID) DWORD }{sTclWinThreadStart})), winThreadPtr,
		uint32(0), idPtr))

	if tHandle == uintptr(0) {
		libc.XLeaveCriticalSection(tls, uintptr(unsafe.Pointer(&joinLock)))
		return TCL_ERROR
	} else {
		if flags&0001 != 0 {
			XTclRememberJoinableThread(tls, *(*Tcl_ThreadId)(unsafe.Pointer(idPtr)))
		}

		// The only purpose of this is to decrement the reference count so the
		// OS resources will be reacquired when the thread closes.

		libc.XCloseHandle(tls, tHandle)
		libc.XLeaveCriticalSection(tls, uintptr(unsafe.Pointer(&joinLock)))
		return TCL_OK
	}
	return int32(0)
}

//----------------------------------------------------------------------
//
// Tcl_JoinThread --
//
//	This procedure waits upon the exit of the specified thread.
//
// Results:
//	TCL_OK if the wait was successful, TCL_ERROR else.
//
// Side effects:
//	The result area is set to the exit code of the thread we
//	waited upon.
//
//----------------------------------------------------------------------

func XTcl_JoinThread(tls *libc.TLS, threadId Tcl_ThreadId, result uintptr) int32 { /* tclWinThrd.c:277:1: */
	return XTclJoinThread(tls, threadId, result)
}

//----------------------------------------------------------------------
//
// TclpThreadExit --
//
//	This procedure terminates the current thread.
//
// Results:
//	None.
//
// Side effects:
//	This procedure terminates the current thread.
//
//----------------------------------------------------------------------

func XTclpThreadExit(tls *libc.TLS, status int32) { /* tclWinThrd.c:302:1: */
	libc.XEnterCriticalSection(tls, uintptr(unsafe.Pointer(&joinLock)))
	XTclSignalExitThread(tls, XTcl_GetCurrentThread(tls), status)
	libc.XLeaveCriticalSection(tls, uintptr(unsafe.Pointer(&joinLock)))

	libc.X_endthreadex(tls, uint32(status))
}

//----------------------------------------------------------------------
//
// Tcl_GetCurrentThread --
//
//	This procedure returns the ID of the currently running thread.
//
// Results:
//	A thread ID.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetCurrentThread(tls *libc.TLS) Tcl_ThreadId { /* tclWinThrd.c:333:1: */
	return Tcl_ThreadId(Size_t(libc.XGetCurrentThreadId(tls)))
}

//----------------------------------------------------------------------
//
// TclpInitLock
//
//	This procedure is used to grab a lock that serializes initialization
//	and finalization of Tcl. On some platforms this may also initialize
//	the mutex used to serialize creation of more mutexes and thread local
//	storage keys.
//
// Results:
//	None.
//
// Side effects:
//	Acquire the initialization mutex.
//
//----------------------------------------------------------------------

func XTclpInitLock(tls *libc.TLS) { /* tclWinThrd.c:358:1: */
	if !(init1 != 0) {
		// There is a fundamental race here that is solved by creating the
		// first Tcl interpreter in a single threaded environment. Once the
		// interpreter has been created, it is safe to create more threads
		// that create interpreters in parallel.

		init1 = 1
		libc.XInitializeCriticalSection(tls, uintptr(unsafe.Pointer(&joinLock)))
		libc.XInitializeCriticalSection(tls, uintptr(unsafe.Pointer(&initLock)))
		libc.XInitializeCriticalSection(tls, uintptr(unsafe.Pointer(&globalLock)))
	}
	libc.XEnterCriticalSection(tls, uintptr(unsafe.Pointer(&initLock)))
}

//----------------------------------------------------------------------
//
// TclpInitUnlock
//
//	This procedure is used to release a lock that serializes
//	initialization and finalization of Tcl.
//
// Results:
//	None.
//
// Side effects:
//	Release the initialization mutex.
//
//----------------------------------------------------------------------

func XTclpInitUnlock(tls *libc.TLS) { /* tclWinThrd.c:394:1: */
	libc.XLeaveCriticalSection(tls, uintptr(unsafe.Pointer(&initLock)))
}

//----------------------------------------------------------------------
//
// TclpGlobalLock
//
//	This procedure is used to grab a lock that serializes creation of
//	mutexes, condition variables, and thread local storage keys.
//
//	This lock must be different than the initLock because the initLock is
//	held during creation of synchronization objects.
//
// Results:
//	None.
//
// Side effects:
//	Acquire the global mutex.
//
//----------------------------------------------------------------------

func XTclpGlobalLock(tls *libc.TLS) { /* tclWinThrd.c:420:1: */
	if !(init1 != 0) {
		// There is a fundamental race here that is solved by creating the
		// first Tcl interpreter in a single threaded environment. Once the
		// interpreter has been created, it is safe to create more threads
		// that create interpreters in parallel.

		init1 = 1
		libc.XInitializeCriticalSection(tls, uintptr(unsafe.Pointer(&joinLock)))
		libc.XInitializeCriticalSection(tls, uintptr(unsafe.Pointer(&initLock)))
		libc.XInitializeCriticalSection(tls, uintptr(unsafe.Pointer(&globalLock)))
	}
	libc.XEnterCriticalSection(tls, uintptr(unsafe.Pointer(&globalLock)))
}

//----------------------------------------------------------------------
//
// TclpGlobalUnlock
//
//	This procedure is used to release a lock that serializes creation and
//	deletion of synchronization objects.
//
// Results:
//	None.
//
// Side effects:
//	Release the global mutex.
//
//----------------------------------------------------------------------

func XTclpGlobalUnlock(tls *libc.TLS) { /* tclWinThrd.c:456:1: */
	libc.XLeaveCriticalSection(tls, uintptr(unsafe.Pointer(&globalLock)))
}

//----------------------------------------------------------------------
//
// Tcl_GetAllocMutex
//
//	This procedure returns a pointer to a statically initialized mutex for
//	use by the memory allocator. The allocator must use this lock, because
//	all other locks are allocated...
//
// Results:
//	A pointer to a mutex that is suitable for passing to Tcl_MutexLock and
//	Tcl_MutexUnlock.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_GetAllocMutex(tls *libc.TLS) uintptr { /* tclWinThrd.c:480:11: */
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// TclpFinalizeLock
//
//	This procedure is used to destroy all private resources used in this
//	file.
//
// Results:
//	None.
//
// Side effects:
//	Destroys everything private. TclpInitLock must be held entering this
//	function.
//
//----------------------------------------------------------------------

func XTclFinalizeLock(tls *libc.TLS) { /* tclWinThrd.c:513:1: */
	XTclpGlobalLock(tls)
	libc.XDeleteCriticalSection(tls, uintptr(unsafe.Pointer(&joinLock)))

	// Destroy the critical section that we are holding!

	libc.XDeleteCriticalSection(tls, uintptr(unsafe.Pointer(&globalLock)))
	init1 = 0

	libc.XLeaveCriticalSection(tls, uintptr(unsafe.Pointer(&initLock)))

	// Destroy the critical section that we were holding.

	libc.XDeleteCriticalSection(tls, uintptr(unsafe.Pointer(&initLock)))
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:
// Epoch of the tcl environment
// (if changed with tcl-env).

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Number of samples over which to estimate the performance counter.

// The following arrays contain the day of year for the last day of each
// month, where index 1 is January.

var normalDays = [13]int32{
	-1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364,
} /* tclWinTime.c:30:18 */

var leapDays = [13]int32{
	-1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365,
} /* tclWinTime.c:34:18 */

type ThreadSpecificData19 = struct {
	FtzName [64]int8
	Ftm     Tm
}                               /* tclWinTime.c:41:3 */
var dataKey18 Tcl_ThreadDataKey /* tclWinTime.c:42:26: */

// Data for managing high-resolution timers.

type TimeInfo1 = struct {
	Fcs                   CRITICAL_SECTION
	Finitialized          int32
	FperfCounterAvailable int32
	FcalibrationInterv    DWORD
	F__ccgo_pad1          [4]byte
	FcalibrationThread    HANDLE
	FreadyEvent           HANDLE
	FexitEvent            HANDLE
	FnominalFreq          LARGE_INTEGER
	FfileTimeLastCall     ULARGE_INTEGER
	FperfCounterLastCall  LARGE_INTEGER
	FcurCounterFreq       LARGE_INTEGER
	FposixEpoch           LARGE_INTEGER
	FfileTimeSample       [64]Tcl_WideUInt
	FperfCounterSample    [64]Tcl_WideInt
	FsampleNo             int32
	F__ccgo_pad2          [4]byte
} /* tclWinTime.c:48:9 */

// Data for managing high-resolution timers.

type TimeInfo = TimeInfo1 /* tclWinTime.c:89:3 */

var timeInfo = TimeInfo{
	FcalibrationInterv: DWORD(1),
} /* tclWinTime.c:91:17 */

// Scale to convert wide click values from the TclpGetWideClicks native
// resolution to microsecond resolution and back.
var wideClick = struct {
	Finitialized    int32
	FperfCounter    int32
	FmicrosecsScale float64
}{} /* tclWinTime.c:126:3 */

// TIP #233 (Virtualized Time): Data for the time hooks, if any.

var XtclGetTimeProcPtr uintptr = 0             /* tclWinTime.c:151:17 */
var XtclScaleTimeProcPtr uintptr = 0           /* tclWinTime.c:152:19 */
var XtclTimeClientData ClientData = uintptr(0) /* tclWinTime.c:153:12 */

//----------------------------------------------------------------------
//
// TclpGetSeconds --
//
//	This procedure returns the number of seconds from the epoch. On most
//	Unix systems the epoch is Midnight Jan 1, 1970 GMT.
//
// Results:
//	Number of seconds from the epoch.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpGetSeconds(tls *libc.TLS) uint32 { /* tclWinTime.c:173:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var usecSincePosixEpoch Tcl_WideInt

	// Try to use high resolution timer
	if XtclGetTimeProcPtr == *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, ClientData)
	}{sNativeGetTime})) &&
		libc.AssignInt64(&usecSincePosixEpoch, sNativeGetMicroseconds(tls)) != 0 {
		return uint32(usecSincePosixEpoch / int64(1000000))
	} else {
		// var t Tcl_Time at bp, 8

		(*struct {
			f func(*libc.TLS, uintptr, ClientData)
		})(unsafe.Pointer(&struct{ uintptr }{XtclGetTimeProcPtr})).f(tls, bp /* &t */, XtclTimeClientData) // Tcl_GetTime inlined.
		return uint32((*Tcl_Time)(unsafe.Pointer(bp /* &t */)).Fsec)
	}
	return uint32(0)
}

//----------------------------------------------------------------------
//
// TclpGetClicks --
//
//	This procedure returns a value that represents the highest resolution
//	clock available on the system. There are no guarantees on what the
//	resolution will be. In Tcl we will call this value a "click". The
//	start time is also system dependent.
//
// Results:
//	Number of clicks from some start time.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpGetClicks(tls *libc.TLS) uint32 { /* tclWinTime.c:210:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var usecSincePosixEpoch Tcl_WideInt

	// Try to use high resolution timer
	if XtclGetTimeProcPtr == *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, ClientData)
	}{sNativeGetTime})) &&
		libc.AssignInt64(&usecSincePosixEpoch, sNativeGetMicroseconds(tls)) != 0 {
		return uint32(usecSincePosixEpoch)
	} else {
		// Use the Tcl_GetTime abstraction to get the time in microseconds, as
		// nearly as we can, and return it.

		// var now Tcl_Time at bp, 8
		// Current Tcl time

		(*struct {
			f func(*libc.TLS, uintptr, ClientData)
		})(unsafe.Pointer(&struct{ uintptr }{XtclGetTimeProcPtr})).f(tls, bp /* &now */, XtclTimeClientData) // Tcl_GetTime inlined
		return uint32((*Tcl_Time)(unsafe.Pointer(bp)).Fsec*1000000) + uint32((*Tcl_Time)(unsafe.Pointer(bp)).Fusec)
	}
	return uint32(0)
}

//----------------------------------------------------------------------
//
// TclpGetWideClicks --
//
//	This procedure returns a WideInt value that represents the highest
//	resolution clock in microseconds available on the system.
//
// Results:
//	Number of microseconds (from some start time).
//
// Side effects:
//	This should be used for time-delta resp. for measurement purposes
//	only, because on some platforms can return microseconds from some
//	start time (not from the epoch).
//
//----------------------------------------------------------------------

func XTclpGetWideClicks(tls *libc.TLS) Tcl_WideInt { /* tclWinTime.c:252:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// var curCounter LARGE_INTEGER at bp+8, 8

	if !(wideClick.Finitialized != 0) {
		// var perfCounterFreq LARGE_INTEGER at bp, 8

		// The frequency of the performance counter is fixed at system boot and
		// is consistent across all processors. Therefore, the frequency need
		// only be queried upon application initialization.
		if libc.XQueryPerformanceFrequency(tls, bp) != 0 {
			wideClick.FperfCounter = 1
			wideClick.FmicrosecsScale = 1000000.0 / float64(*(*LONGLONG)(unsafe.Pointer(bp)))
		} else {
			// fallback using microseconds
			wideClick.FperfCounter = 0
			wideClick.FmicrosecsScale = float64(1)
		}

		wideClick.Finitialized = 1
	}
	if wideClick.FperfCounter != 0 {
		if libc.XQueryPerformanceCounter(tls, bp+8) != 0 {
			return *(*LONGLONG)(unsafe.Pointer(bp + 8))
		}
		// fallback using microseconds
		wideClick.FperfCounter = 0
		wideClick.FmicrosecsScale = float64(1)
		return XTclpGetMicroseconds(tls)
	} else {
		return XTclpGetMicroseconds(tls)
	}
	return Tcl_WideInt(0)
}

//----------------------------------------------------------------------
//
// TclpWideClickInMicrosec --
//
//	This procedure return scale to convert wide click values from the
//	TclpGetWideClicks native resolution to microsecond resolution
//	and back.
//
// Results:
// 	1 click in microseconds as double.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpWideClickInMicrosec(tls *libc.TLS) float64 { /* tclWinTime.c:307:1: */
	if !(wideClick.Finitialized != 0) {
		XTclpGetWideClicks(tls) // initialize
	}
	return wideClick.FmicrosecsScale
}

//----------------------------------------------------------------------
//
// TclpGetMicroseconds --
//
//	This procedure returns a WideInt value that represents the highest
//	resolution clock in microseconds available on the system.
//
// Results:
//	Number of microseconds (from the epoch).
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpGetMicroseconds(tls *libc.TLS) Tcl_WideInt { /* tclWinTime.c:333:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var usecSincePosixEpoch Tcl_WideInt

	// Try to use high resolution timer
	if XtclGetTimeProcPtr == *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, ClientData)
	}{sNativeGetTime})) &&
		libc.AssignInt64(&usecSincePosixEpoch, sNativeGetMicroseconds(tls)) != 0 {
		return usecSincePosixEpoch
	} else {
		// Use the Tcl_GetTime abstraction to get the time in microseconds, as
		// nearly as we can, and return it.

		// var now Tcl_Time at bp, 8

		(*struct {
			f func(*libc.TLS, uintptr, ClientData)
		})(unsafe.Pointer(&struct{ uintptr }{XtclGetTimeProcPtr})).f(tls, bp /* &now */, XtclTimeClientData) // Tcl_GetTime inlined
		return Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp)).Fsec)*int64(1000000) + Tcl_WideInt((*Tcl_Time)(unsafe.Pointer(bp)).Fusec)
	}
	return Tcl_WideInt(0)
}

//----------------------------------------------------------------------
//
// Tcl_GetTime --
//
//	Gets the current system time in seconds and microseconds since the
//	beginning of the epoch: 00:00 UCT, January 1, 1970.
//
// Results:
//	Returns the current time in timePtr.
//
// Side effects:
//	On the first call, initializes a set of static variables to keep track
//	of the base value of the performance counter, the corresponding wall
//	clock (obtained through ftime) and the frequency of the performance
//	counter. Also spins a thread whose function is to wake up periodically
//	and monitor these values, adjusting them as necessary to correct for
//	drift in the performance counter's oscillator.
//
//----------------------------------------------------------------------

func XTcl_GetTime(tls *libc.TLS, timePtr uintptr) { /* tclWinTime.c:378:1: */
	var usecSincePosixEpoch Tcl_WideInt

	// Try to use high resolution timer
	if XtclGetTimeProcPtr == *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, ClientData)
	}{sNativeGetTime})) &&
		libc.AssignInt64(&usecSincePosixEpoch, sNativeGetMicroseconds(tls)) != 0 {
		(*Tcl_Time)(unsafe.Pointer(timePtr)).Fsec = int32(usecSincePosixEpoch / int64(1000000))
		(*Tcl_Time)(unsafe.Pointer(timePtr)).Fusec = int32(uint32(usecSincePosixEpoch % int64(1000000)))
	} else {
		(*struct {
			f func(*libc.TLS, uintptr, ClientData)
		})(unsafe.Pointer(&struct{ uintptr }{XtclGetTimeProcPtr})).f(tls, timePtr, XtclTimeClientData)
	}
}

//----------------------------------------------------------------------
//
// NativeScaleTime --
//
//	TIP #233: Scale from virtual time to the real-time. For native scaling
//	the relationship is 1:1 and nothing has to be done.
//
// Results:
//	Scales the time in timePtr.
//
// Side effects:
//	See above.
//
//----------------------------------------------------------------------

func sNativeScaleTime(tls *libc.TLS, timePtr uintptr, clientData ClientData) { /* tclWinTime.c:412:1: */
	// Native scale is 1:1. Nothing is done.
}

//----------------------------------------------------------------------
//
// NativeGetMicroseconds --
//
//	Gets the current system time in microseconds since the beginning
//	of the epoch: 00:00 UCT, January 1, 1970.
//
// Results:
//	Returns the wide integer with number of microseconds from the epoch, or
//	0 if high resolution timer is not available.
//
// Side effects:
//	On the first call, initializes a set of static variables to keep track
//	of the base value of the performance counter, the corresponding wall
//	clock (obtained through ftime) and the frequency of the performance
//	counter. Also spins a thread whose function is to wake up periodically
//	and monitor these values, adjusting them as necessary to correct for
//	drift in the performance counter's oscillator.
//
//----------------------------------------------------------------------

func sNativeCalc100NsTicks(tls *libc.TLS, fileTimeLastCall ULONGLONG, perfCounterLastCall LONGLONG, curCounterFreq LONGLONG, curCounter LONGLONG) Tcl_WideInt { /* tclWinTime.c:445:1: */
	return Tcl_WideInt(fileTimeLastCall + ULONGLONG((curCounter-perfCounterLastCall)*int64(10000000)/curCounterFreq))
}

func sNativeGetMicroseconds(tls *libc.TLS) Tcl_WideInt { /* tclWinTime.c:456:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	// Initialize static storage on the first trip through.
	//
	// Note: Outer check for 'initialized' is a performance win since it
	// avoids an extra mutex lock in the common case.

	if !(timeInfo.Finitialized != 0) {
		XTclpInitLock(tls)
		if !(timeInfo.Finitialized != 0) {
			*(*DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 112)) = 0xD53E8000
			*(*LONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 112)) = 0x019DB1DE

			timeInfo.FperfCounterAvailable = libc.XQueryPerformanceFrequency(tls, uintptr(unsafe.Pointer(&timeInfo))+80)

			// Some hardware abstraction layers use the CPU clock in place of
			// the real-time clock as a performance counter reference. This
			// results in:
			//    - inconsistent results among the processors on
			//      multi-processor systems.
			//    - unpredictable changes in performance counter frequency on
			//      "gearshift" processors such as Transmeta and SpeedStep.
			//
			// There seems to be no way to test whether the performance
			// counter is reliable, but a useful heuristic is that if its
			// frequency is 1.193182 MHz or 3.579545 MHz, it's derived from a
			// colorburst crystal and is therefore the RTC rather than the
			// TSC.
			//
			// A sloppier but serviceable heuristic is that the RTC crystal is
			// normally less than 15 MHz while the TSC crystal is virtually
			// assured to be greater than 100 MHz. Since Win98SE appears to
			// fiddle with the definition of the perf counter frequency
			// (perhaps in an attempt to calibrate the clock?), we use the
			// latter rule rather than an exact match.
			//
			// We also assume (perhaps questionably) that the vendors have
			// gotten their act together on Win64, so bypass all this rubbish
			// on that platform.

			// If the performance counter is available, start a thread to
			// calibrate it.

			if timeInfo.FperfCounterAvailable != 0 {
				// var id DWORD at bp, 4

				libc.XInitializeCriticalSection(tls, uintptr(unsafe.Pointer(&timeInfo)))
				timeInfo.FreadyEvent = libc.XCreateEventW(tls, uintptr(0), FALSE, FALSE, uintptr(0))
				timeInfo.FexitEvent = libc.XCreateEventW(tls, uintptr(0), FALSE, FALSE, uintptr(0))
				timeInfo.FcalibrationThread = libc.XCreateThread(tls, uintptr(0), uint64(256),
					*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, LPVOID) DWORD }{sCalibrationThread})), uintptr(0), uint32(0), bp /* &id */)
				libc.XSetThreadPriority(tls, timeInfo.FcalibrationThread,
					THREAD_BASE_PRIORITY_MAX)

				// Wait for the thread just launched to start running, and
				// create an exit handler that kills it so that it doesn't
				// outlive unloading tclXX.dll

				libc.XWaitForSingleObject(tls, timeInfo.FreadyEvent, INFINITE)
				libc.XCloseHandle(tls, timeInfo.FreadyEvent)
				XTcl_CreateExitHandler(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sStopCalibration})), uintptr(0))
			}
			timeInfo.Finitialized = TRUE
		}
		XTclpInitUnlock(tls)
	}

	if timeInfo.FperfCounterAvailable != 0 && *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104)) != int64(0) {
		// Query the performance counter and use it to calculate the current
		// time.

		var fileTimeLastCall ULONGLONG
		var perfCounterLastCall LONGLONG
		var curCounterFreq LONGLONG
		// Copy with current data of calibration cycle

		// var curCounter LARGE_INTEGER at bp+8, 8

		// Current performance counter.

		libc.XQueryPerformanceCounter(tls, bp+8)

		// Hold time section locked as short as possible
		libc.XEnterCriticalSection(tls, uintptr(unsafe.Pointer(&timeInfo)))

		fileTimeLastCall = *(*ULONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 88))
		perfCounterLastCall = *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 96))
		curCounterFreq = *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104))

		libc.XLeaveCriticalSection(tls, uintptr(unsafe.Pointer(&timeInfo)))

		// If calibration cycle occurred after we get curCounter

		if *(*LONGLONG)(unsafe.Pointer(bp + 8)) <= perfCounterLastCall {
			// Calibrated file-time is saved from posix in 100-ns ticks

			return Tcl_WideInt(fileTimeLastCall / uint64(10))
		}

		// If it appears to be more than 1.1 seconds since the last trip
		// through the calibration loop, the performance counter may have
		// jumped forward. (See MSDN Knowledge Base article Q274323 for a
		// description of the hardware problem that makes this test
		// necessary.) If the counter jumps, we don't want to use it directly.
		// Instead, we must return system time. Eventually, the calibration
		// loop should recover.

		if *(*LONGLONG)(unsafe.Pointer(bp + 8))-perfCounterLastCall < int64(11)*curCounterFreq*LONGLONG(timeInfo.FcalibrationInterv)/int64(10) {
			// Calibrated file-time is saved from posix in 100-ns ticks
			return sNativeCalc100NsTicks(tls, fileTimeLastCall,
				perfCounterLastCall, curCounterFreq, *(*LONGLONG)(unsafe.Pointer(bp + 8))) / int64(10)
		}
	}

	// High resolution timer is not available.
	return int64(0)
}

//----------------------------------------------------------------------
//
// NativeGetTime --
//
//	TIP #233: Gets the current system time in seconds and microseconds
//	since the beginning of the epoch: 00:00 UCT, January 1, 1970.
//
// Results:
//	Returns the current time in timePtr.
//
// Side effects:
//	See NativeGetMicroseconds for more information.
//
//----------------------------------------------------------------------

func sNativeGetTime(tls *libc.TLS, timePtr uintptr, clientData ClientData) { /* tclWinTime.c:650:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var usecSincePosixEpoch Tcl_WideInt

	// Try to use high resolution timer.
	if libc.AssignInt64(&usecSincePosixEpoch, sNativeGetMicroseconds(tls)) != 0 {
		(*Tcl_Time)(unsafe.Pointer(timePtr)).Fsec = int32(usecSincePosixEpoch / int64(1000000))
		(*Tcl_Time)(unsafe.Pointer(timePtr)).Fusec = int32(uint32(usecSincePosixEpoch % int64(1000000)))
	} else {
		// High resolution timer is not available. Just use ftime.

		// var t X__timeb64 at bp, 16

		libc.X_ftime64(tls, bp)
		(*Tcl_Time)(unsafe.Pointer(timePtr)).Fsec = int32((*X__timeb64)(unsafe.Pointer(bp /* &t */)).Ftime)
		(*Tcl_Time)(unsafe.Pointer(timePtr)).Fusec = int32(int32((*X__timeb64)(unsafe.Pointer(bp)).Fmillitm) * 1000)
	}
}

func sStopCalibration(tls *libc.TLS, unused ClientData) { /* tclWinTime.c:696:1: */
	libc.XSetEvent(tls, timeInfo.FexitEvent)

	// If Tcl_Finalize was called from DllMain, the calibration thread is in a
	// paused state so we need to timeout and continue.

	libc.XWaitForSingleObject(tls, timeInfo.FcalibrationThread, uint32(100))
	libc.XCloseHandle(tls, timeInfo.FexitEvent)
	libc.XCloseHandle(tls, timeInfo.FcalibrationThread)
}

//----------------------------------------------------------------------
//
// TclpGetDate --
//
//	This function converts between seconds and struct tm. If useGMT is
//	true, then the returned date will be in Greenwich Mean Time (GMT).
//	Otherwise, it will be in the local time zone.
//
// Results:
//	Returns a static tm structure.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTclpGetDate(tls *libc.TLS, t uintptr, useGMT int32) uintptr { /* tclWinTime.c:729:11: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var tmPtr uintptr
	// var time Time_t at bp, 8

	if !(useGMT != 0) {

		libc.Xtzset(tls)

		// If we are in the valid range, let the C run-time library handle it.
		// Otherwise we need to fake it. Note that this algorithm ignores
		// daylight savings time before the epoch.

		// Hm, Borland's localtime manages to return NULL under certain
		// circumstances (e.g. wintime.test, test 1.2). Nobody tests for this,
		// since 'localtime' isn't supposed to do this, possibly leading to
		// crashes.
		//
		// Patch: We only call this function if we are at least one day into
		// the epoch, else we handle it ourselves (like we do for times < 0).
		// H. Giese, June 2003

		if *(*Time_t)(unsafe.Pointer(t)) >= int64(LOCALTIME_VALIDITY_BOUNDARY) {
			return XTclpLocaltime(tls, t)
		}

		*(*Time_t)(unsafe.Pointer(bp /* time */)) = *(*Time_t)(unsafe.Pointer(t)) - Time_t(Xtimezone)

		// If we aren't near to overflowing the long, just add the bias and
		// use the normal calculation. Otherwise we will need to adjust the
		// result at the end.

		if *(*Time_t)(unsafe.Pointer(t)) < int64(0x7fffffff-2*(60*60*24)) && *(*Time_t)(unsafe.Pointer(t)) > int64(-0x7fffffff-1+2*(60*60*24)) {
			tmPtr = sComputeGMT(tls, bp)
		} else {
			tmPtr = sComputeGMT(tls, t)

			libc.Xtzset(tls)

			// Add the bias directly to the tm structure to avoid overflow.
			// Propagate seconds overflow into minutes, hours and days.

			*(*Time_t)(unsafe.Pointer(bp /* time */)) = Time_t(int32((*Tm)(unsafe.Pointer(tmPtr)).Ftm_sec) - Xtimezone)
			(*Tm)(unsafe.Pointer(tmPtr)).Ftm_sec = int32(*(*Time_t)(unsafe.Pointer(bp)) % int64(60))
			if (*Tm)(unsafe.Pointer(tmPtr)).Ftm_sec < 0 {
				*(*int32)(unsafe.Pointer(tmPtr)) += 60
				*(*Time_t)(unsafe.Pointer(bp /* time */)) -= int64(60)
			}

			*(*Time_t)(unsafe.Pointer(bp /* time */)) = Time_t((*Tm)(unsafe.Pointer(tmPtr)).Ftm_min) + *(*Time_t)(unsafe.Pointer(bp))/int64(60)
			(*Tm)(unsafe.Pointer(tmPtr)).Ftm_min = int32(*(*Time_t)(unsafe.Pointer(bp)) % int64(60))
			if (*Tm)(unsafe.Pointer(tmPtr)).Ftm_min < 0 {
				*(*int32)(unsafe.Pointer(tmPtr + 4)) += 60
				*(*Time_t)(unsafe.Pointer(bp /* time */)) -= int64(60)
			}

			*(*Time_t)(unsafe.Pointer(bp /* time */)) = Time_t((*Tm)(unsafe.Pointer(tmPtr)).Ftm_hour) + *(*Time_t)(unsafe.Pointer(bp))/int64(60)
			(*Tm)(unsafe.Pointer(tmPtr)).Ftm_hour = int32(*(*Time_t)(unsafe.Pointer(bp)) % int64(24))
			if (*Tm)(unsafe.Pointer(tmPtr)).Ftm_hour < 0 {
				*(*int32)(unsafe.Pointer(tmPtr + 8)) += 24
				*(*Time_t)(unsafe.Pointer(bp /* time */)) -= int64(24)
			}

			*(*Time_t)(unsafe.Pointer(bp /* time */)) /= int64(24)
			*(*int32)(unsafe.Pointer(tmPtr + 12)) += int32(*(*Time_t)(unsafe.Pointer(bp)))
			*(*int32)(unsafe.Pointer(tmPtr + 28)) += int32(*(*Time_t)(unsafe.Pointer(bp)))
			(*Tm)(unsafe.Pointer(tmPtr)).Ftm_wday = ((*Tm)(unsafe.Pointer(tmPtr)).Ftm_wday + int32(*(*Time_t)(unsafe.Pointer(bp)))) % 7
		}
	} else {
		tmPtr = sComputeGMT(tls, t)
	}
	return tmPtr
}

//----------------------------------------------------------------------
//
// ComputeGMT --
//
//	This function computes GMT given the number of seconds since the epoch
//	(midnight Jan 1 1970).
//
// Results:
//	Returns a (per thread) statically allocated struct tm.
//
// Side effects:
//	Updates the values of the static struct tm.
//
//----------------------------------------------------------------------

func sComputeGMT(tls *libc.TLS, tp uintptr) uintptr { /* tclWinTime.c:850:18: */
	var tmPtr uintptr
	var tmp int32
	var rem int32
	var isLeap int32
	var days uintptr
	var tsdPtr uintptr = XTcl_GetThreadData(tls, uintptr(unsafe.Pointer(&dataKey18)), int32(unsafe.Sizeof(ThreadSpecificData19{})))

	tmPtr = tsdPtr + 64

	// Compute the 4 year span containing the specified time.

	tmp = int32(*(*Time_t)(unsafe.Pointer(tp)) / int64(60*60*24*365*4+60*60*24))
	rem = int32(*(*Time_t)(unsafe.Pointer(tp)) % int64(60*60*24*365*4+60*60*24))

	// Correct for weird mod semantics so the remainder is always positive.

	if rem < 0 {
		tmp--
		rem = rem + (60*60*24*365*4 + 60*60*24)
	}

	// Compute the year after 1900 by taking the 4 year span and adjusting for
	// the remainder. This works because 2000 is a leap year, and 1900/2100
	// are out of the range.

	tmp = tmp*4 + 70
	isLeap = 0
	if rem >= 60*60*24*365 { // 1971, etc.
		tmp++
		rem = rem - 60*60*24*365
		if rem >= 60*60*24*365 { // 1972, etc.
			tmp++
			rem = rem - 60*60*24*365
			if rem >= 60*60*24*365+60*60*24 { // 1973, etc.
				tmp++
				rem = rem - (60*60*24*365 + 60*60*24)
			} else {
				isLeap = 1
			}
		}
	}
	(*Tm)(unsafe.Pointer(tmPtr)).Ftm_year = int32(tmp)

	// Compute the day of year and leave the seconds in the current day in the
	// remainder.

	(*Tm)(unsafe.Pointer(tmPtr)).Ftm_yday = int32(rem / (60 * 60 * 24))
	rem = rem % (60 * 60 * 24)

	// Compute the time of day.

	(*Tm)(unsafe.Pointer(tmPtr)).Ftm_hour = int32(rem / 3600)
	rem = rem % 3600
	(*Tm)(unsafe.Pointer(tmPtr)).Ftm_min = int32(rem / 60)
	(*Tm)(unsafe.Pointer(tmPtr)).Ftm_sec = int32(rem % 60)

	// Compute the month and day of month.

	days = func() uintptr {
		if isLeap != 0 {
			return uintptr(unsafe.Pointer(&leapDays))
		}
		return uintptr(unsafe.Pointer(&normalDays))
	}()
	for tmp = 1; *(*int32)(unsafe.Pointer(days + uintptr(tmp)*4)) < (*Tm)(unsafe.Pointer(tmPtr)).Ftm_yday; tmp++ {
		// empty body
	}
	(*Tm)(unsafe.Pointer(tmPtr)).Ftm_mon = int32(libc.PreDecInt32(&tmp, 1))
	(*Tm)(unsafe.Pointer(tmPtr)).Ftm_mday = (*Tm)(unsafe.Pointer(tmPtr)).Ftm_yday - *(*int32)(unsafe.Pointer(days + uintptr(tmp)*4))

	// Compute day of week.  Epoch started on a Thursday.

	(*Tm)(unsafe.Pointer(tmPtr)).Ftm_wday = int32(int32(*(*Time_t)(unsafe.Pointer(tp))/int64(60*60*24)) + 4)
	if *(*Time_t)(unsafe.Pointer(tp))%int64(60*60*24) < int64(0) {
		(*Tm)(unsafe.Pointer(tmPtr)).Ftm_wday--
	}
	*(*int32)(unsafe.Pointer(tmPtr + 24)) %= 7
	if (*Tm)(unsafe.Pointer(tmPtr)).Ftm_wday < 0 {
		*(*int32)(unsafe.Pointer(tmPtr + 24)) += 7
	}

	return tmPtr
}

//----------------------------------------------------------------------
//
// CalibrationThread --
//
//	Thread that manages calibration of the hi-resolution time derived from
//	the performance counter, to keep it synchronized with the system
//	clock.
//
// Parameters:
//	arg - Client data from the CreateThread call. This parameter points to
//	      the static TimeInfo structure.
//
// Return value:
//	None. This thread embeds an infinite loop.
//
// Side effects:
//	At an interval of 1s, this thread performs virtual time discipline.
//
// Note: When this thread is entered, TclpInitLock has been called to
// safeguard the static storage. There is therefore no synchronization in the
// body of this procedure.
//
//----------------------------------------------------------------------

func sCalibrationThread(tls *libc.TLS, arg LPVOID) DWORD { /* tclWinTime.c:973:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	// var curFileTime FILETIME at bp, 8

	var waitResult DWORD

	// Get initial system time and performance counter.

	libc.XGetSystemTimeAsFileTime(tls, bp)
	libc.XQueryPerformanceCounter(tls, uintptr(unsafe.Pointer(&timeInfo))+96)
	libc.XQueryPerformanceFrequency(tls, uintptr(unsafe.Pointer(&timeInfo))+104)
	*(*DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 88)) = (*FILETIME)(unsafe.Pointer(bp /* &curFileTime */)).FdwLowDateTime
	*(*DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 88)) = (*FILETIME)(unsafe.Pointer(bp /* &curFileTime */)).FdwHighDateTime
	// Calibrated file-time will be saved from posix in 100-ns ticks
	*(*ULONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 88)) -= ULONGLONG(*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 112)))

	sResetCounterSamples(tls, *(*ULONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 88)),
		*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 96)),
		*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104)))

	// Wake up the calling thread. When it wakes up, it will release the
	// initialization lock.

	libc.XSetEvent(tls, timeInfo.FreadyEvent)

	// Run the calibration once a second.

	for timeInfo.FperfCounterAvailable != 0 {
		// If the exitEvent is set, break out of the loop.

		waitResult = libc.XWaitForSingleObjectEx(tls, timeInfo.FexitEvent, uint32(1000), FALSE)
		if waitResult == DWORD(0x00000000)+DWORD(0) {
			break
		}
		sUpdateTimeEachSecond(tls)
	}

	return DWORD(0)
}

//----------------------------------------------------------------------
//
// UpdateTimeEachSecond --
//
//	Callback from the waitable timer in the clock calibration thread that
//	updates system time.
//
// Parameters:
//	info - Pointer to the static TimeInfo structure
//
// Results:
//	None.
//
// Side effects:
//	Performs virtual time calibration discipline.
//
//----------------------------------------------------------------------

func sUpdateTimeEachSecond(tls *libc.TLS) { /* tclWinTime.c:1042:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var curPerfCounter LARGE_INTEGER at bp+16, 8

	// Current value returned from
	// QueryPerformanceCounter.
	// var curSysTime FILETIME at bp, 8

	// File time of the previous calibration
	// var curFileTime LARGE_INTEGER at bp+8, 8
	// File time at the time this callback was
	// scheduled.
	var estFreq Tcl_WideInt // Estimated perf counter frequency.
	var vt0 Tcl_WideInt     // Tcl time right now.
	var vt1 Tcl_WideInt     // Tcl time one second from now.
	var tdiff Tcl_WideInt   // Difference between system clock and Tcl
	// time.
	var driftFreq Tcl_WideInt // Frequency needed to drift virtual time into
	// step over 1 second.

	// Sample performance counter and system time (from posix epoch).

	libc.XGetSystemTimeAsFileTime(tls, bp)
	*(*DWORD)(unsafe.Pointer(bp + 8)) = (*FILETIME)(unsafe.Pointer(bp /* &curSysTime */)).FdwLowDateTime
	*(*LONG)(unsafe.Pointer(bp + 8)) = LONG((*FILETIME)(unsafe.Pointer(bp /* &curSysTime */)).FdwHighDateTime)
	*(*LONGLONG)(unsafe.Pointer(bp + 8)) -= *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 112))
	// If calibration still not needed (check for possible time switch)
	if *(*LONGLONG)(unsafe.Pointer(bp + 8)) > *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&lastFileTime)))) &&
		*(*LONGLONG)(unsafe.Pointer(bp + 8)) < *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&lastFileTime))))+LONGLONG(timeInfo.FcalibrationInterv*DWORD(10000000)) {
		// again in next one second
		return
	}
	libc.XQueryPerformanceCounter(tls, bp+16)

	*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&lastFileTime)))) = *(*LONGLONG)(unsafe.Pointer(bp + 8))

	// We devide by timeInfo.curCounterFreq.QuadPart in several places. That
	// value should always be positive on a correctly functioning system. But
	// it is good to be defensive about such matters. So if something goes
	// wrong and the value does goes to zero, we clear the
	// timeInfo.perfCounterAvailable in order to cause the calibration thread
	// to shut itself down, then return without additional processing.

	if *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104)) == int64(0) {
		timeInfo.FperfCounterAvailable = 0
		return
	}

	// Several things may have gone wrong here that have to be checked for.
	//  (1) The performance counter may have jumped.
	//  (2) The system clock may have been reset.
	//
	// In either case, we'll need to reinitialize the circular buffer with
	// samples relative to the current system time and the NOMINAL performance
	// frequency (not the actual, because the actual has probably run slow in
	// the first case). Our estimated frequency will be the nominal frequency.
	//
	// Store the current sample into the circular buffer of samples, and
	// estimate the performance counter frequency.

	estFreq = sAccumulateSample(tls, *(*LONGLONG)(unsafe.Pointer(bp + 16)),
		Tcl_WideUInt(*(*LONGLONG)(unsafe.Pointer(bp + 8))))

	// We want to adjust things so that time appears to be continuous.
	// Virtual file time, right now, is
	//
	// vt0 = 10000000 * (curPerfCounter - perfCounterLastCall)
	//	     / curCounterFreq
	//	     + fileTimeLastCall
	//
	// Ideally, we would like to drift the clock into place over a period of 2
	// sec, so that virtual time 2 sec from now will be
	//
	// vt1 = 20000000 + curFileTime
	//
	// The frequency that we need to use to drift the counter back into place
	// is estFreq * 20000000 / (vt1 - vt0)

	vt0 = sNativeCalc100NsTicks(tls, *(*ULONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 88)),
		*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 96)), *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104)),
		*(*LONGLONG)(unsafe.Pointer(bp + 16)))
	// If we've gotten more than a second away from system time, then drifting
	// the clock is going to be pretty hopeless. Just let it jump. Otherwise,
	// compute the drift frequency and fill in everything.

	tdiff = vt0 - *(*LONGLONG)(unsafe.Pointer(bp + 8))
	if tdiff > int64(10000000) || tdiff < int64(-10000000) {
		// jump to current system time, use curent estimated frequency
		vt0 = *(*LONGLONG)(unsafe.Pointer(bp + 8))
	} else {
		// calculate new frequency and estimate drift to the next second
		vt1 = int64(20000000) + *(*LONGLONG)(unsafe.Pointer(bp + 8))
		driftFreq = estFreq * int64(20000000) / (vt1 - vt0)
		// Avoid too large drifts (only half of the current difference),
		// that allows also be more accurate (aspire to the smallest tdiff),
		// so then we can prolong calibration interval by tdiff < 100000
		driftFreq = *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104)) + (driftFreq-*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104)))/int64(2)

		// Average between estimated, 2 current and 5 drifted frequencies,
		// (do the soft drifting as possible)
		estFreq = (estFreq + int64(2)**(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104)) + int64(5)*driftFreq) / int64(8)
	}

	// Avoid too large discrepancy from nominal frequency
	if estFreq > int64(1003)**(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 80))/int64(1000) {
		estFreq = int64(1003) * *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 80)) / int64(1000)
		vt0 = *(*LONGLONG)(unsafe.Pointer(bp + 8))
	} else if estFreq < int64(997)**(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 80))/int64(1000) {
		estFreq = int64(997) * *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 80)) / int64(1000)
		vt0 = *(*LONGLONG)(unsafe.Pointer(bp + 8))
	} else if vt0 != *(*LONGLONG)(unsafe.Pointer(bp + 8)) {
		// Be sure the clock ticks never backwards (avoid it by negative drifting)
		// just compare native time (in 100-ns) before and hereafter using
		// new calibrated values) and do a small adjustment (short time freeze)
		// var newPerfCounter LARGE_INTEGER at bp+24, 8

		var nt0 Tcl_WideInt
		var nt1 Tcl_WideInt

		libc.XQueryPerformanceCounter(tls, bp+24)
		nt0 = sNativeCalc100NsTicks(tls, *(*ULONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 88)),
			*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 96)), *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104)),
			*(*LONGLONG)(unsafe.Pointer(bp + 24)))
		nt1 = sNativeCalc100NsTicks(tls, uint64(vt0),
			*(*LONGLONG)(unsafe.Pointer(bp + 16)), estFreq,
			*(*LONGLONG)(unsafe.Pointer(bp + 24)))
		if nt0 > nt1 { // drifted backwards, try to compensate with new base
			// first adjust with a micro jump (short frozen time is acceptable)
			vt0 = vt0 + (nt0 - nt1)
			// if drift unavoidable (e. g. we had a time switch), then reset it
			vt1 = vt0 - *(*LONGLONG)(unsafe.Pointer(bp + 8))
			if vt1 > int64(10000000) || vt1 < int64(-10000000) {
				// larger jump resp. shift relative new file-time
				vt0 = *(*LONGLONG)(unsafe.Pointer(bp + 8))
			}
		}
	}

	// In lock commit new values to timeInfo (hold lock as short as possible)
	libc.XEnterCriticalSection(tls, uintptr(unsafe.Pointer(&timeInfo)))

	// grow calibration interval up to 10 seconds (if still precise enough)
	if tdiff < int64(-100000) || tdiff > int64(100000) {
		// too long drift - reset calibration interval to 1000 second
		timeInfo.FcalibrationInterv = DWORD(1)
	} else if timeInfo.FcalibrationInterv < DWORD(10) {
		timeInfo.FcalibrationInterv++
	}

	*(*ULONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 88)) = ULONGLONG(vt0)
	*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 104)) = estFreq
	*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 96)) = *(*LONGLONG)(unsafe.Pointer(bp + 16))

	libc.XLeaveCriticalSection(tls, uintptr(unsafe.Pointer(&timeInfo)))
}

var lastFileTime LARGE_INTEGER /* tclWinTime.c:1048:26: */

//----------------------------------------------------------------------
//
// ResetCounterSamples --
//
//	Fills the sample arrays in 'timeInfo' with dummy values that will
//	yield the current performance counter and frequency.
//
// Results:
//	None.
//
// Side effects:
//	The array of samples is filled in so that it appears that there are
//	SAMPLES samples at one-second intervals, separated by precisely the
//	given frequency.
//
//----------------------------------------------------------------------

func sResetCounterSamples(tls *libc.TLS, fileTime Tcl_WideUInt, perfCounter Tcl_WideInt, perfFreq Tcl_WideInt) { /* tclWinTime.c:1233:1: */
	var i int32
	for i = SAMPLES - 1; i >= 0; i-- {
		*(*Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 632 + uintptr(i)*8)) = perfCounter
		*(*Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 120 + uintptr(i)*8)) = fileTime
		perfCounter = perfCounter - perfFreq
		fileTime = fileTime - uint64(10000000)
	}
	timeInfo.FsampleNo = 0
}

//----------------------------------------------------------------------
//
// AccumulateSample --
//
//	Updates the circular buffer of performance counter and system time
//	samples with a new data point.
//
// Results:
//	None.
//
// Side effects:
//	The new data point replaces the oldest point in the circular buffer,
//	and the descriptive statistics are updated to accumulate the new
//	point.
//
// Several things may have gone wrong here that have to be checked for.
//  (1) The performance counter may have jumped.
//  (2) The system clock may have been reset.
//
// In either case, we'll need to reinitialize the circular buffer with samples
// relative to the current system time and the NOMINAL performance frequency
// (not the actual, because the actual has probably run slow in the first
// case).

func sAccumulateSample(tls *libc.TLS, perfCounter Tcl_WideInt, fileTime Tcl_WideUInt) Tcl_WideInt { /* tclWinTime.c:1275:1: */
	var workFTSample Tcl_WideUInt // File time sample being removed from or
	// added to the circular buffer.
	var workPCSample Tcl_WideInt // Performance counter sample being removed
	// from or added to the circular buffer.
	var lastFTSample Tcl_WideUInt // Last file time sample recorded
	var lastPCSample Tcl_WideInt  // Last performance counter sample recorded
	var FTdiff Tcl_WideInt        // Difference between last FT and current
	var PCdiff Tcl_WideInt        // Difference between last PC and current
	var estFreq Tcl_WideInt       // Estimated performance counter frequency

	// Test for jumps and reset the samples if we have one.

	if timeInfo.FsampleNo == 0 {
		lastPCSample = *(*Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 632 + uintptr(timeInfo.FsampleNo+SAMPLES-1)*8))
		lastFTSample = *(*Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 120 + uintptr(timeInfo.FsampleNo+SAMPLES-1)*8))
	} else {
		lastPCSample = *(*Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 632 + uintptr(timeInfo.FsampleNo-1)*8))
		lastFTSample = *(*Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 120 + uintptr(timeInfo.FsampleNo-1)*8))
	}

	PCdiff = perfCounter - lastPCSample
	FTdiff = Tcl_WideInt(fileTime - lastFTSample)
	if PCdiff < *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 80))*int64(9)/int64(10) ||
		PCdiff > *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 80))*int64(11)/int64(10) ||
		FTdiff < int64(9000000) || FTdiff > int64(11000000) {
		sResetCounterSamples(tls, fileTime, perfCounter,
			*(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 80)))
		return *(*LONGLONG)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 80))
	} else {
		// Estimate the frequency.

		workPCSample = *(*Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 632 + uintptr(timeInfo.FsampleNo)*8))
		workFTSample = *(*Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 120 + uintptr(timeInfo.FsampleNo)*8))
		estFreq = Tcl_WideInt(Tcl_WideUInt(int64(10000000)*(perfCounter-workPCSample)) /
			(fileTime - workFTSample))
		*(*Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 632 + uintptr(timeInfo.FsampleNo)*8)) = perfCounter
		*(*Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&timeInfo)) + 120 + uintptr(timeInfo.FsampleNo)*8)) = Tcl_WideUInt(Tcl_WideInt(fileTime))

		// Advance the sample number.

		if libc.PreIncInt32(&timeInfo.FsampleNo, 1) >= SAMPLES {
			timeInfo.FsampleNo = 0
		}

		return estFreq
	}
	return Tcl_WideInt(0)
}

//----------------------------------------------------------------------
//
// TclpGmtime --
//
//	Wrapper around the 'gmtime' library function to make it thread safe.
//
// Results:
//	Returns a pointer to a 'struct tm' in thread-specific data.
//
// Side effects:
//	Invokes gmtime or gmtime_r as appropriate.
//
//----------------------------------------------------------------------

func XTclpGmtime(tls *libc.TLS, timePtr uintptr) uintptr { /* tclWinTime.c:1351:11: */
	// The MS implementation of gmtime is thread safe because it returns the
	// time in a block of thread-local storage, and Windows does not provide a
	// Posix gmtime_r function.

	return gmtime(tls, timePtr)
}

//----------------------------------------------------------------------
//
// TclpLocaltime --
//
//	Wrapper around the 'localtime' library function to make it thread
//	safe.
//
// Results:
//	Returns a pointer to a 'struct tm' in thread-specific data.
//
// Side effects:
//	Invokes localtime or localtime_r as appropriate.
//
//----------------------------------------------------------------------

func XTclpLocaltime(tls *libc.TLS, timePtr uintptr) uintptr { /* tclWinTime.c:1386:11: */
	// The MS implementation of localtime is thread safe because it returns
	// the time in a block of thread-local storage, and Windows does not
	// provide a Posix localtime_r function.

	return localtime(tls, timePtr)
}

//----------------------------------------------------------------------
//
// Tcl_SetTimeProc --
//
//	TIP #233 (Virtualized Time): Registers two handlers for the
//	virtualization of Tcl's access to time information.
//
// Results:
//	None.
//
// Side effects:
//	Remembers the handlers, alters core behaviour.
//
//----------------------------------------------------------------------

func XTcl_SetTimeProc(tls *libc.TLS, getProc uintptr, scaleProc uintptr, clientData ClientData) { /* tclWinTime.c:1422:1: */
	XtclGetTimeProcPtr = getProc
	XtclScaleTimeProcPtr = scaleProc
	XtclTimeClientData = clientData
}

//----------------------------------------------------------------------
//
// Tcl_QueryTimeProc --
//
//	TIP #233 (Virtualized Time): Query which time handlers are registered.
//
// Results:
//	None.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_QueryTimeProc(tls *libc.TLS, getProc uintptr, scaleProc uintptr, clientData uintptr) { /* tclWinTime.c:1449:1: */
	if getProc != 0 {
		*(*uintptr)(unsafe.Pointer(getProc)) = XtclGetTimeProcPtr
	}
	if scaleProc != 0 {
		*(*uintptr)(unsafe.Pointer(scaleProc)) = XtclScaleTimeProcPtr
	}
	if clientData != 0 {
		*(*ClientData)(unsafe.Pointer(clientData)) = XtclTimeClientData
	}
}

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// Values for the flags field in Channel. Any ORed combination of the
// following flags can be stored in the field. These flags record various
// options and state bits about the channel. In addition to the flags below,
// the channel can also have TCL_READABLE (1<<1) and TCL_WRITABLE (1<<2) set.

// The length of time to wait between synthetic timer events. Must be zero or
// bad things tend to happen.

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

// The version of the zlib "package" that this implements. Note that this
// thoroughly supersedes the versions included with tclkit, which are "1.1",
// so this is at least "2.0" (there's no general *commitment* to have the same
// interface, even if that is mostly true).

// Magic flags used with wbits fields to indicate that we're handling the gzip
// format or automatic detection of format. Putting it here is slightly less
// gross!

// Structure used for handling gzip headers that are generated from a
// dictionary. It comprises the header structure itself plus some working
// space that it is very convenient to have attached.

type GzipHeader = struct {
	Fheader            Gz_header
	FnativeFilenameBuf [260]int8
	FnativeCommentBuf  [256]int8
	F__ccgo_pad1       [4]byte
} /* tclZlib.c:54:3 */

// Structure used for the Tcl_ZlibStream* commands and [zlib stream ...]

type ZlibStreamHandle = struct {
	Finterp       uintptr
	Fstream       Z_stream
	FstreamEnd    int32
	F__ccgo_pad1  [4]byte
	FinData       uintptr
	FoutData      uintptr
	FcurrentInput uintptr
	FoutPos       int32
	Fmode         int32
	Fformat       int32
	Flevel        int32
	Fflush        int32
	Fwbits        int32
	Fcmd          Tcl_Command
	FcompDictObj  uintptr
	Fflags        int32
	F__ccgo_pad2  [4]byte
	FgzHeaderPtr  uintptr
} /* tclZlib.c:83:3 */

// Macros to make it clearer in some of the twiddlier accesses what is
// happening.

// Structure used for stacked channel compression and decompression.

type ZlibChannelData = struct {
	Fchan           Tcl_Channel
	Fparent         Tcl_Channel
	Fflags          int32
	Fmode           int32
	Fformat         int32
	FreadAheadLimit int32
	FinStream       Z_stream
	FoutStream      Z_stream
	FinBuffer       uintptr
	FoutBuffer      uintptr
	FinAllocated    int32
	FoutAllocated   int32
	FinHeader       GzipHeader
	FoutHeader      GzipHeader
	Ftimer          Tcl_TimerToken
	FcompDictObj    uintptr
} /* tclZlib.c:130:3 */

// Type of zlib-based compressing and decompressing channels.

var zlibChannelType = Tcl_ChannelType{
	FtypeName:      ts + 71825,
	Fversion:       uintptr(0x5),
	FcloseProc:     0,
	FinputProc:     0,
	FoutputProc:    0, // seekProc
	FsetOptionProc: 0,
	FgetOptionProc: 0,
	FwatchProc:     0,
	FgetHandleProc: 0, // close2Proc
	FblockModeProc: 0, // flushProc
	FhandlerProc:   0,
} /* tclZlib.c:206:30 */

//----------------------------------------------------------------------
//
// ConvertError --
//
//	Utility function for converting a zlib error into a Tcl error.
//
// Results:
//	None.
//
// Side effects:
//	Updates the interpreter result and errorcode.
//
//----------------------------------------------------------------------

func sConvertError(tls *libc.TLS, interp uintptr, code int32, adler ULong) { /* tclZlib.c:243:1: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var codeStr uintptr
	var codeStr2 uintptr = uintptr(0)
	// var codeStrBuf [24]int8 at bp+56, 24

	if interp == uintptr(0) {
		return
	}

	switch code {
	// Firstly, the case that is *different* because it's really coming
	// from the OS and is just being reported via zlib. It should be
	// really uncommon because Tcl handles all I/O rather than delegating
	// it to zlib, but proving it can't happen is hard.

	case -1:
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, XTcl_PosixError(tls, interp), -1))
		return

		// Normal errors/conditions, some of which have additional detail and
		// some which don't. (This is not defined by array lookup because zlib
		// error codes are sometimes negative.)

	case -2:
		codeStr = ts + 71830 /* "STREAM" */
		break
	case -3:
		codeStr = ts + 71837 /* "DATA" */
		break
	case -4:
		codeStr = ts + 71842 /* "MEM" */
		break
	case -5:
		codeStr = ts + 71846 /* "BUF" */
		break
	case -6:
		codeStr = ts + 57297 /* "VERSION" */
		break
	case Z_NEED_DICT:
		codeStr = ts + 71850 /* "NEED_DICT" */
		codeStr2 = bp + 56   /* &codeStrBuf[0] */
		libc.Xsprintf(tls, bp+56, ts+55561, libc.VaList(bp, adler))
		break

		// These should _not_ happen! This function is for dealing with error
		// cases, not non-errors!

	case Z_OK:
		XTcl_Panic(tls, ts+71860, 0)
		fallthrough
	case Z_STREAM_END:
		XTcl_Panic(tls, ts+71906, 0)
		fallthrough

		// Anything else is bad news; it's unexpected. Convert to generic
		// error.

	default:
		codeStr = ts + 14800 /* "UNKNOWN" */
		codeStr2 = bp + 56   /* &codeStrBuf[0] */
		libc.Xsprintf(tls, bp+56, ts+909, libc.VaList(bp+8, code))
		break
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, z.XzError(tls, code), -1))

	// Tricky point! We might pass NULL twice here (and will when the error
	// type is known).

	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+16, ts+4178, ts+71960, codeStr, codeStr2, uintptr(0)))
}

func sConvertErrorToList(tls *libc.TLS, code int32, adler ULong) uintptr { /* tclZlib.c:326:16: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var objv [4]uintptr at bp, 32

	for ok := true; ok; ok = 0 != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(bp)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes, ts+4178, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbytes + 3)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FtypePtr = uintptr(0)
		{
		}
	}
	for ok2 := true; ok2; ok2 = 0 != 0 {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			*(*uintptr)(unsafe.Pointer(bp + 1*8)) = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1*8)))).FrefCount = 0
		if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1*8)))).Fbytes = XtclEmptyStringRep
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1*8)))).Flength = 0
		} else {
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
			libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1*8)))).Fbytes, ts+71960, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
			*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1*8)))).Fbytes + 4)) = int8(0)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1*8)))).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
		}
		(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1*8)))).FtypePtr = uintptr(0)
		{
		}
	}
	switch code {
	case -2:
		for ok4 := true; ok4; ok4 = 0 != 0 {
			for ok5 := true; ok5; ok5 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 2*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes, ts+71830, uint64(int32(uint64(unsafe.Sizeof([7]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes + 6)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([7]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		return XTcl_NewListObj(tls, 3, bp)
	case -3:
		for ok6 := true; ok6; ok6 = 0 != 0 {
			for ok7 := true; ok7; ok7 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 2*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes, ts+71837, uint64(int32(uint64(unsafe.Sizeof([5]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes + 4)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([5]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		return XTcl_NewListObj(tls, 3, bp)
	case -4:
		for ok8 := true; ok8; ok8 = 0 != 0 {
			for ok9 := true; ok9; ok9 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 2*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes, ts+71842, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes + 3)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		return XTcl_NewListObj(tls, 3, bp)
	case -5:
		for ok10 := true; ok10; ok10 = 0 != 0 {
			for ok11 := true; ok11; ok11 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 2*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes, ts+71846, uint64(int32(uint64(unsafe.Sizeof([4]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes + 3)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([4]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		return XTcl_NewListObj(tls, 3, bp)
	case -6:
		for ok12 := true; ok12; ok12 = 0 != 0 {
			for ok13 := true; ok13; ok13 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 2*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes, ts+57297, uint64(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes + 7)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([8]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		return XTcl_NewListObj(tls, 3, bp)
	case -1:
		for ok14 := true; ok14; ok14 = 0 != 0 {
			for ok15 := true; ok15; ok15 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 2*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes, ts+38575, uint64(int32(uint64(unsafe.Sizeof([6]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes + 5)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([6]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + 3*8)) = XTcl_NewStringObj(tls, XTcl_ErrnoId(tls), -1)
		return XTcl_NewListObj(tls, 4, bp)
	case Z_NEED_DICT:
		for ok16 := true; ok16; ok16 = 0 != 0 {
			for ok17 := true; ok17; ok17 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 2*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes, ts+71850, uint64(int32(uint64(unsafe.Sizeof([10]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes + 9)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([10]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		*(*uintptr)(unsafe.Pointer(bp + 3*8)) = XTcl_NewWideIntObj(tls, Tcl_WideInt(adler))
		return XTcl_NewListObj(tls, 4, bp)

		// These should _not_ happen! This function is for dealing with error
		// cases, not non-errors!

	case Z_OK:
		XTcl_Panic(tls, ts+71860, 0)
		fallthrough
	case Z_STREAM_END:
		XTcl_Panic(tls, ts+71906, 0)
		fallthrough

		// Catch-all. Should be unreachable because all cases are already
		// listed above.

	default:
		for ok18 := true; ok18; ok18 = 0 != 0 {
			for ok19 := true; ok19; ok19 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 2*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FrefCount = 0
			if int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1)) == 0 {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes = XTcl_Alloc(tls, uint32(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))+1))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes, ts+14800, uint64(int32(uint64(unsafe.Sizeof([8]int8{}))-uint64(1))))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Fbytes + 7)) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).Flength = int32(uint64(unsafe.Sizeof([8]int8{})) - uint64(1))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 2*8)))).FtypePtr = uintptr(0)
			{
			}
		}
		for ok20 := true; ok20; ok20 = 0 != 0 {
			for ok21 := true; ok21; ok21 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				*(*uintptr)(unsafe.Pointer(bp + 3*8)) = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 3*8)))).FrefCount = 0
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 3*8)))).Fbytes = uintptr(0)
			*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 3*8)) + 32)) = int32(code)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 3*8)))).FtypePtr = uintptr(unsafe.Pointer(&XtclIntType))
			{
			}
		}
		return XTcl_NewListObj(tls, 4, bp)
	}
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// GenerateHeader --
//
//	Function for creating a gzip header from the contents of a dictionary
//	(as described in the documentation). GetValue is a helper function.
//
// Results:
//	A Tcl result code.
//
// Side effects:
//	Updates the fields of the given gz_header structure. Adds amount of
//	extra space required for the header to the variable referenced by the
//	extraSizePtr argument.
//
//----------------------------------------------------------------------

func sGetValue1(tls *libc.TLS, interp uintptr, dictObj uintptr, nameStr uintptr, valuePtrPtr uintptr) int32 { /* tclZlib.c:402:1: */
	var name uintptr = XTcl_NewStringObj(tls, nameStr, -1)
	var result int32 = XTcl_DictObjGet(tls, interp, dictObj, name, valuePtrPtr)

	if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(name)).FrefCount, 1) > 1 {
	} else {
		if !(int32((*Tcl_Obj)(unsafe.Pointer(name)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(name)).FtypePtr)).FfreeIntRepProc) != 0) {
			{
			}
			if (*Tcl_Obj)(unsafe.Pointer(name)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(name)).Fbytes != XtclEmptyStringRep {
				XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(name)).Fbytes)
			}
			(*Tcl_Obj)(unsafe.Pointer(name)).Flength = -1
			for ok := true; ok; ok = 0 != 0 {
				*(*uintptr)(unsafe.Pointer(name + 32)) = XtclFreeObjList
				XtclFreeObjList = name
			}
		} else {
			XTclFreeObj(tls, name)
		}
	}

	return result
}

func sGenerateHeader(tls *libc.TLS, interp uintptr, dictObj uintptr, headerPtr uintptr, extraSizePtr uintptr) int32 { /* tclZlib.c:416:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	// var value uintptr at bp, 8

	// var len int32 at bp+8, 4

	var result int32
	var valueStr uintptr
	var latin1enc Tcl_Encoding
	result = TCL_ERROR

	// RFC 1952 says that header strings are in ISO 8859-1 (LATIN-1).

	latin1enc = XTcl_GetEncoding(tls, uintptr(0), ts+26567)
	if !(latin1enc == uintptr(0)) {
		goto __1
	}
	XTcl_Panic(tls, ts+71965, 0)
__1:
	;

	if !(sGetValue1(tls, interp, dictObj, ts+71985, bp) != TCL_OK) {
		goto __2
	}
	goto error
	goto __3
__2:
	if !(*(*uintptr)(unsafe.Pointer(bp)) != uintptr(0)) {
		goto __4
	}
	valueStr = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp /* value */)), bp+8)
	XTcl_UtfToExternal(tls, uintptr(0), latin1enc, valueStr, *(*int32)(unsafe.Pointer(bp + 8 /* len */)), 0, uintptr(0),
		headerPtr+332, MAX_COMMENT_LEN-1, uintptr(0), bp+8,
		uintptr(0))
	*(*int8)(unsafe.Pointer(headerPtr + 332 + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* len */))))) = int8(0)
	(*GzipHeader)(unsafe.Pointer(headerPtr)).Fheader.Fcomment = headerPtr + 332 /* &.nativeCommentBuf */
	if !(extraSizePtr != uintptr(0)) {
		goto __5
	}
	*(*int32)(unsafe.Pointer(extraSizePtr)) += *(*int32)(unsafe.Pointer(bp + 8))
__5:
	;
__4:
	;
__3:
	;

	if !(sGetValue1(tls, interp, dictObj, ts+71993, bp) != TCL_OK) {
		goto __6
	}
	goto error
	goto __7
__6:
	if !(*(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) && XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp)), headerPtr+60) != 0) {
		goto __8
	}
	goto error
__8:
	;
__7:
	;

	if !(sGetValue1(tls, interp, dictObj, ts+71997, bp) != TCL_OK) {
		goto __9
	}
	goto error
	goto __10
__9:
	if !(*(*uintptr)(unsafe.Pointer(bp)) != uintptr(0)) {
		goto __11
	}
	valueStr = XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(bp /* value */)), bp+8)
	XTcl_UtfToExternal(tls, uintptr(0), latin1enc, valueStr, *(*int32)(unsafe.Pointer(bp + 8 /* len */)), 0, uintptr(0),
		headerPtr+72, MAX_PATH-1, uintptr(0), bp+8, uintptr(0))
	*(*int8)(unsafe.Pointer(headerPtr + 72 + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* len */))))) = int8(0)
	(*GzipHeader)(unsafe.Pointer(headerPtr)).Fheader.Fname = headerPtr + 72 /* &.nativeFilenameBuf */
	if !(extraSizePtr != uintptr(0)) {
		goto __12
	}
	*(*int32)(unsafe.Pointer(extraSizePtr)) += *(*int32)(unsafe.Pointer(bp + 8))
__12:
	;
__11:
	;
__10:
	;

	if !(sGetValue1(tls, interp, dictObj, ts+43611, bp) != TCL_OK) {
		goto __13
	}
	goto error
	goto __14
__13:
	if !(*(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) && XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp)),
		headerPtr+12) != TCL_OK) {
		goto __15
	}
	goto error
__15:
	;
__14:
	;

	// Ignore the 'size' field, since that is controlled by the size of the
	// input data.

	if !(sGetValue1(tls, interp, dictObj, ts+6086, bp) != TCL_OK) {
		goto __16
	}
	goto error
	goto __17
__16:
	if !(*(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) && XTcl_GetLongFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp)),
		headerPtr+4) != TCL_OK) {
		goto __18
	}
	goto error
__18:
	;
__17:
	;

	if !(sGetValue1(tls, interp, dictObj, ts+12847, bp) != TCL_OK) {
		goto __19
	}
	goto error
	goto __20
__19:
	if !(*(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) && XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(bp)), uintptr(unsafe.Pointer(&types2)), int32(unsafe.Sizeof(uintptr(0))), ts+12847, TCL_EXACT, headerPtr) != TCL_OK) {
		goto __21
	}
	goto error
__21:
	;
__20:
	;

	result = TCL_OK
error:
	XTcl_FreeEncoding(tls, latin1enc)
	return result
}

var types2 = [2]uintptr{
	ts + 10063, ts + 72006,
} /* tclZlib.c:428:23 */

//----------------------------------------------------------------------
//
// ExtractHeader --
//
//	Take the values out of a gzip header and store them in a dictionary.
//	SetValue is a helper macro.
//
// Results:
//	None.
//
// Side effects:
//	Updates the dictionary, which must be writable (i.e. refCount < 2).
//
//----------------------------------------------------------------------

func sExtractHeader(tls *libc.TLS, headerPtr uintptr, dictObj uintptr) { /* tclZlib.c:528:1: */
	bp := tls.Alloc(216)
	defer tls.Free(216)

	var latin1enc Tcl_Encoding = uintptr(0)
	// var tmp Tcl_DString at bp, 216

	if (*Gz_header)(unsafe.Pointer(headerPtr)).Fcomment != uintptr(Z_NULL) {
		if latin1enc == uintptr(0) {
			// RFC 1952 says that header strings are in ISO 8859-1 (LATIN-1).

			latin1enc = XTcl_GetEncoding(tls, uintptr(0), ts+26567)
			if latin1enc == uintptr(0) {
				XTcl_Panic(tls, ts+71965, 0)
			}
		}

		XTcl_ExternalToUtfDString(tls, latin1enc, (*Gz_header)(unsafe.Pointer(headerPtr)).Fcomment, -1,
			bp)
		XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+71985, -1), XTclDStringToObj(tls, bp))
	}
	XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+71993, -1), XTcl_NewIntObj(tls, libc.Bool32((*Gz_header)(unsafe.Pointer(headerPtr)).Fhcrc != 0)))
	if (*Gz_header)(unsafe.Pointer(headerPtr)).Fname != uintptr(Z_NULL) {
		if latin1enc == uintptr(0) {
			// RFC 1952 says that header strings are in ISO 8859-1 (LATIN-1).

			latin1enc = XTcl_GetEncoding(tls, uintptr(0), ts+26567)
			if latin1enc == uintptr(0) {
				XTcl_Panic(tls, ts+71965, 0)
			}
		}

		XTcl_ExternalToUtfDString(tls, latin1enc, (*Gz_header)(unsafe.Pointer(headerPtr)).Fname, -1,
			bp)
		XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+71997, -1), XTclDStringToObj(tls, bp))
	}
	if (*Gz_header)(unsafe.Pointer(headerPtr)).Fos != 255 {
		XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+43611, -1), XTcl_NewIntObj(tls, (*Gz_header)(unsafe.Pointer(headerPtr)).Fos))
	}
	if (*Gz_header)(unsafe.Pointer(headerPtr)).Ftime != ULong(0) {
		XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+6086, -1), XTcl_NewLongObj(tls, int32((*Gz_header)(unsafe.Pointer(headerPtr)).Ftime)))
	}
	if (*Gz_header)(unsafe.Pointer(headerPtr)).Ftext != Z_UNKNOWN {
		XTcl_DictObjPut(tls, uintptr(0), dictObj, XTcl_NewStringObj(tls, ts+12847, -1), XTcl_NewStringObj(tls, func() uintptr {
			if (*Gz_header)(unsafe.Pointer(headerPtr)).Ftext != 0 {
				return ts + 72006
			}
			return ts + 10063
		}(), -1))
	}

	if latin1enc != uintptr(0) {
		XTcl_FreeEncoding(tls, latin1enc)
	}
}

// Disentangle the worst of how the zlib API is used.

func sSetInflateDictionary(tls *libc.TLS, strm Z_streamp, compDictObj uintptr) int32 { /* tclZlib.c:589:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	if compDictObj != uintptr(0) {
		// var length int32 at bp, 4

		var bytes uintptr = XTcl_GetByteArrayFromObj(tls, compDictObj, bp)

		return z.XinflateSetDictionary(tls, strm, bytes, uint32(*(*int32)(unsafe.Pointer(bp /* length */))))
	}
	return Z_OK
}

func sSetDeflateDictionary(tls *libc.TLS, strm Z_streamp, compDictObj uintptr) int32 { /* tclZlib.c:603:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	if compDictObj != uintptr(0) {
		// var length int32 at bp, 4

		var bytes uintptr = XTcl_GetByteArrayFromObj(tls, compDictObj, bp)

		return z.XdeflateSetDictionary(tls, strm, bytes, uint32(*(*int32)(unsafe.Pointer(bp /* length */))))
	}
	return Z_OK
}

func sDeflate(tls *libc.TLS, strm Z_streamp, bufferPtr uintptr, bufferSize int32, flush int32, writtenPtr uintptr) int32 { /* tclZlib.c:617:1: */
	var e int32

	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = bufferPtr
	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = UInt(bufferSize)
	e = z.Xdeflate(tls, strm, flush)
	if writtenPtr != uintptr(0) {
		*(*int32)(unsafe.Pointer(writtenPtr)) = int32(UInt(bufferSize) - (*Z_stream)(unsafe.Pointer(strm)).Favail_out)
	}
	return e
}

func sAppendByteArray(tls *libc.TLS, listObj uintptr, buffer uintptr, size int32) { /* tclZlib.c:636:1: */
	if size > 0 {
		var baObj uintptr = XTcl_NewByteArrayObj(tls, buffer, size)

		XTcl_ListObjAppendElement(tls, uintptr(0), listObj, baObj)
	}
}

//----------------------------------------------------------------------
//
// Tcl_ZlibStreamInit --
//
//	This command initializes a (de)compression context/handle for
//	(de)compressing data in chunks.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	The variable pointed to by zshandlePtr is initialised and memory
//	allocated for internal state. Additionally, if interp is not null, a
//	Tcl command is created and its name placed in the interp result obj.
//
// Note:
//	At least one of interp and zshandlePtr should be non-NULL or the
//	reference to the stream will be completely lost.
//
//----------------------------------------------------------------------

func XTcl_ZlibStreamInit(tls *libc.TLS, interp uintptr, mode int32, format int32, level int32, dictObj uintptr, zshandlePtr uintptr) int32 { /* tclZlib.c:672:1: */
	bp := tls.Alloc(248)
	defer tls.Free(248)

	var wbits int32
	var e int32
	var zshPtr uintptr
	// var cmdname Tcl_DString at bp+32, 216

	var gzHeaderPtr uintptr
	var _objPtr uintptr
	wbits = 0
	zshPtr = uintptr(0)
	gzHeaderPtr = uintptr(0)

	switch mode {
	case TCL_ZLIB_STREAM_DEFLATE:
		goto __2
	case TCL_ZLIB_STREAM_INFLATE:
		goto __3
	default:
		goto __4
	}
	goto __1
__2:
	// Compressed format is specified by the wbits parameter. See zlib.h
	// for details.

	switch format {
	case TCL_ZLIB_FORMAT_RAW:
		goto __6
	case TCL_ZLIB_FORMAT_GZIP:
		goto __7
	case TCL_ZLIB_FORMAT_ZLIB:
		goto __8
	default:
		goto __9
	}
	goto __5
__6:
	wbits = -MAX_WBITS
	goto __5
__7:
	wbits = MAX_WBITS | 16
	if !(dictObj != 0) {
		goto __10
	}
	gzHeaderPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(GzipHeader{})))
	libc.Xmemset(tls, gzHeaderPtr, 0, uint64(unsafe.Sizeof(GzipHeader{})))
	if !(sGenerateHeader(tls, interp, dictObj, gzHeaderPtr,
		uintptr(0)) != TCL_OK) {
		goto __11
	}
	XTclpFree(tls, gzHeaderPtr)
	return TCL_ERROR
__11:
	;
__10:
	;
	goto __5
__8:
	wbits = MAX_WBITS
	goto __5
__9:
	XTcl_Panic(tls,

		ts+72011, 0)
__5:
	;
	if !(level < -1 || level > 9) {
		goto __12
	}
	XTcl_Panic(tls,

		ts+72113, 0)
__12:
	;
	goto __1
__3:
	// wbits are the same as DEFLATE, but FORMAT_AUTO is valid too.

	switch format {
	case TCL_ZLIB_FORMAT_RAW:
		goto __14
	case TCL_ZLIB_FORMAT_GZIP:
		goto __15
	case TCL_ZLIB_FORMAT_ZLIB:
		goto __16
	case TCL_ZLIB_FORMAT_AUTO:
		goto __17
	default:
		goto __18
	}
	goto __13
__14:
	wbits = -MAX_WBITS
	goto __13
__15:
	wbits = MAX_WBITS | 16
	gzHeaderPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(GzipHeader{})))
	libc.Xmemset(tls, gzHeaderPtr, 0, uint64(unsafe.Sizeof(GzipHeader{})))
	(*GzipHeader)(unsafe.Pointer(gzHeaderPtr)).Fheader.Fname = gzHeaderPtr + 72 /* &.nativeFilenameBuf */
	(*GzipHeader)(unsafe.Pointer(gzHeaderPtr)).Fheader.Fname_max = UInt(MAX_PATH - 1)
	(*GzipHeader)(unsafe.Pointer(gzHeaderPtr)).Fheader.Fcomment = gzHeaderPtr + 332 /* &.nativeCommentBuf */
	(*GzipHeader)(unsafe.Pointer(gzHeaderPtr)).Fheader.Fname_max = UInt(MAX_COMMENT_LEN - 1)
	goto __13
__16:
	wbits = MAX_WBITS
	goto __13
__17:
	wbits = MAX_WBITS | 32
	goto __13
__18:
	XTcl_Panic(tls,

		ts+72229, 0)
__13:
	;
	goto __1
__4:
	XTcl_Panic(tls,
		ts+72353, 0)
__1:
	;

	zshPtr = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ZlibStreamHandle{})))
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp = interp
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fmode = mode
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fformat = format
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Flevel = level
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fwbits = wbits
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput = uintptr(0)
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FstreamEnd = 0
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj = uintptr(0)
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflags = 0
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr = gzHeaderPtr
	libc.Xmemset(tls, zshPtr+8, 0, uint64(unsafe.Sizeof(Z_stream{})))
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fadler = ULong(1)

	// No output buffer available yet

	if !(mode == TCL_ZLIB_STREAM_DEFLATE) {
		goto __19
	}
	e = z.XdeflateInit2_(tls, zshPtr+8, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY, ts+65, int32(unsafe.Sizeof(Z_stream{})))
	if !(e == Z_OK && (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr != 0) {
		goto __21
	}
	e = z.XdeflateSetHeader(tls, zshPtr+8,
		(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr)
__21:
	;
	goto __20
__19:
	e = z.XinflateInit2_(tls, zshPtr+8, wbits, ts+65, int32(unsafe.Sizeof(Z_stream{})))
	if !(e == Z_OK && (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr != 0) {
		goto __22
	}
	e = z.XinflateGetHeader(tls, zshPtr+8,
		(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr)
__22:
	;
__20:
	;

	if !(e != Z_OK) {
		goto __23
	}
	sConvertError(tls, interp, e, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fadler)
	goto error
__23:
	;

	// I could do all this in C, but this is easier.

	if !(interp != uintptr(0)) {
		goto __24
	}
	if !(XTcl_EvalEx(tls, interp, ts+72422, -1, 0) != TCL_OK) {
		goto __26
	}
	goto error
__26:
	;
	XTcl_DStringInit(tls, bp+32)
	XTcl_DStringAppend(tls, bp+32, ts+72453, int32(uint64(unsafe.Sizeof([24]int8{}))-uint64(1)))
	XTclDStringAppendObj(tls, bp+32, XTcl_GetObjResult(tls, interp))
	if !(XTcl_FindCommand(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+32)).Fstring,
		uintptr(0), 0) != uintptr(0)) {
		goto __27
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+72477, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+23564, ts+72517, uintptr(0)))
	XTcl_DStringFree(tls, bp+32)
	goto error
__27:
	;
	XTcl_ResetResult(tls, interp)

	// Create the command.

	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fcmd = XTcl_CreateObjCommand(tls, interp, (*Tcl_DString)(unsafe.Pointer(bp+32)).Fstring,
		*(*uintptr)(unsafe.Pointer(&struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		}{sZlibStreamCmd})), zshPtr, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sZlibStreamCmdDelete})))
	XTcl_DStringFree(tls, bp+32)
	if !((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fcmd == uintptr(0)) {
		goto __28
	}
	goto error
__28:
	;
	goto __25
__24:
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fcmd = uintptr(0)
__25:
	;

	// Prepare the buffers for use.

	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData = XTcl_NewListObj(tls, 0, uintptr(0))
	(*Tcl_Obj)(unsafe.Pointer((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData)).FrefCount++
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData = XTcl_NewListObj(tls, 0, uintptr(0))
	(*Tcl_Obj)(unsafe.Pointer((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData)).FrefCount++

	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos = 0

	// Now set the variable pointed to by *zshandlePtr to the pointer to the
	// zsh struct.

	if !(zshandlePtr != 0) {
		goto __29
	}
	*(*Tcl_ZlibStream)(unsafe.Pointer(zshandlePtr)) = zshPtr
__29:
	;

	return TCL_OK

error:
	if !((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj != 0) {
		goto __30
	}
__31:
	_objPtr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __34
	}
	XTclFreeObj(tls, _objPtr)
__34:
	;
	goto __32
__32:
	if 0 != 0 {
		goto __31
	}
	goto __33
__33:
	;
__30:
	;
	if !((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr != 0) {
		goto __35
	}
	XTclpFree(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr)
__35:
	;
	XTclpFree(tls, zshPtr)
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// ZlibStreamCmdDelete --
//
//	This is the delete command which Tcl invokes when a zlibstream command
//	is deleted from the interpreter (on stream close, usually).
//
// Results:
//	None
//
// Side effects:
//	Invalidates the zlib stream handle as obtained from Tcl_ZlibStreamInit
//
//----------------------------------------------------------------------

func sZlibStreamCmdDelete(tls *libc.TLS, cd ClientData) { /* tclZlib.c:885:1: */
	var zshPtr uintptr = cd

	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fcmd = uintptr(0)
	XZlibStreamCleanup(tls, zshPtr)
}

//----------------------------------------------------------------------
//
// Tcl_ZlibStreamClose --
//
//	This procedure must be called after (de)compression is done to ensure
//	memory is freed and the command is deleted from the interpreter (if
//	any).
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Invalidates the zlib stream handle as obtained from Tcl_ZlibStreamInit
//
//----------------------------------------------------------------------

func XTcl_ZlibStreamClose(tls *libc.TLS, zshandle Tcl_ZlibStream) int32 { /* tclZlib.c:913:1: */
	var zshPtr uintptr = zshandle

	// If the interp is set, deleting the command will trigger
	// ZlibStreamCleanup in ZlibStreamCmdDelete. If no interp is set, call
	// ZlibStreamCleanup directly.

	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp != 0 && (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fcmd != 0 {
		XTcl_DeleteCommandFromToken(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fcmd)
	} else {
		XZlibStreamCleanup(tls, zshPtr)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ZlibStreamCleanup --
//
//	This procedure is called by either Tcl_ZlibStreamClose or
//	ZlibStreamCmdDelete to cleanup the stream context.
//
// Results:
//	None
//
// Side effects:
//	Invalidates the zlib stream handle.
//
//----------------------------------------------------------------------

func XZlibStreamCleanup(tls *libc.TLS, zshPtr uintptr) { /* tclZlib.c:950:1: */
	if !((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FstreamEnd != 0) {
		if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
			z.XdeflateEnd(tls, zshPtr+8)
		} else {
			z.XinflateEnd(tls, zshPtr+8)
		}
	}

	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput != 0 {
		for ok2 := true; ok2; ok2 = 0 != 0 {
			var _objPtr uintptr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj != 0 {
		for ok3 := true; ok3; ok3 = 0 != 0 {
			var _objPtr uintptr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr != 0 {
		XTclpFree(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr)
	}

	XTclpFree(tls, zshPtr)
}

//----------------------------------------------------------------------
//
// Tcl_ZlibStreamReset --
//
//	This procedure will reinitialize an existing stream handle.
//
// Results:
//	A standard Tcl result.
//
// Side effects:
//	Any data left in the (de)compression buffer is lost.
//
//----------------------------------------------------------------------

func XTcl_ZlibStreamReset(tls *libc.TLS, zshandle Tcl_ZlibStream) int32 { /* tclZlib.c:997:1: */
	var zshPtr uintptr = zshandle
	var e int32

	if !((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FstreamEnd != 0) {
		if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
			z.XdeflateEnd(tls, zshPtr+8)
		} else {
			z.XinflateEnd(tls, zshPtr+8)
		}
	}
	XTcl_SetByteArrayLength(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData, 0)
	XTcl_SetByteArrayLength(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData, 0)
	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput != 0 {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput = uintptr(0)
	}

	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos = 0
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FstreamEnd = 0
	libc.Xmemset(tls, zshPtr+8, 0, uint64(unsafe.Sizeof(Z_stream{})))

	// No output buffer available yet.

	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
		e = z.XdeflateInit2_(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Flevel, Z_DEFLATED, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fwbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY, ts+65, int32(unsafe.Sizeof(Z_stream{})))
		if e == Z_OK && (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflags&DICT_TO_SET != 0 {
			e = sSetDeflateDictionary(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj)
			if e == Z_OK {
				*(*int32)(unsafe.Pointer(zshPtr + 168)) |= libc.CplInt32(DICT_TO_SET)
			}
		}
	} else {
		e = z.XinflateInit2_(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fwbits, ts+65, int32(unsafe.Sizeof(Z_stream{})))
		if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fformat == TCL_ZLIB_FORMAT_RAW && (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflags&DICT_TO_SET != 0 && e == Z_OK {
			e = sSetInflateDictionary(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj)
			if e == Z_OK {
				*(*int32)(unsafe.Pointer(zshPtr + 168)) |= libc.CplInt32(DICT_TO_SET)
			}
		}
	}

	if e != Z_OK {
		sConvertError(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, e, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fadler)
		// TODO:cleanup
		return TCL_ERROR
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ZlibStreamGetCommandName --
//
//	This procedure will return the command name associated with the
//	stream.
//
// Results:
//	A Tcl_Obj with the name of the Tcl command or NULL if no command is
//	associated with the stream.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ZlibStreamGetCommandName(tls *libc.TLS, zshandle Tcl_ZlibStream) uintptr { /* tclZlib.c:1071:9: */
	var zshPtr uintptr = zshandle
	var objPtr uintptr

	if !(int32((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp) != 0) {
		return uintptr(0)
	}

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		objPtr = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(objPtr)).FtypePtr = uintptr(0)
	{
	}

	XTcl_GetCommandFullName(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fcmd, objPtr)
	return objPtr
}

//----------------------------------------------------------------------
//
// Tcl_ZlibStreamEof --
//
//	This procedure This function returns 0 or 1 depending on the state of
//	the (de)compressor. For decompression, eof is reached when the entire
//	compressed stream has been decompressed. For compression, eof is
//	reached when the stream has been flushed with TCL_ZLIB_FINALIZE.
//
// Results:
//	Integer.
//
// Side effects:
//	None.
//
//----------------------------------------------------------------------

func XTcl_ZlibStreamEof(tls *libc.TLS, zshandle Tcl_ZlibStream) int32 { /* tclZlib.c:1107:1: */
	var zshPtr uintptr = zshandle

	return (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FstreamEnd
}

//----------------------------------------------------------------------
//
// Tcl_ZlibStreamChecksum --
//
//	Return the checksum of the uncompressed data seen so far by the
//	stream.
//
//----------------------------------------------------------------------

func XTcl_ZlibStreamChecksum(tls *libc.TLS, zshandle Tcl_ZlibStream) int32 { /* tclZlib.c:1127:1: */
	var zshPtr uintptr = zshandle

	return int32((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fadler)
}

//----------------------------------------------------------------------
//
// Tcl_ZlibStreamSetCompressionDictionary --
//
//	Sets the compression dictionary for a stream. This will be used as
//	appropriate for the next compression or decompression action performed
//	on the stream.
//
//----------------------------------------------------------------------

func XTcl_ZlibStreamSetCompressionDictionary(tls *libc.TLS, zshandle Tcl_ZlibStream, compressionDictionaryObj uintptr) { /* tclZlib.c:1148:1: */
	var zshPtr uintptr = zshandle

	if compressionDictionaryObj != uintptr(0) {
		if (*Tcl_Obj)(unsafe.Pointer(compressionDictionaryObj)).FrefCount > 1 {
			compressionDictionaryObj = XTcl_DuplicateObj(tls, compressionDictionaryObj)
		}
		(*Tcl_Obj)(unsafe.Pointer(compressionDictionaryObj)).FrefCount++
		*(*int32)(unsafe.Pointer(zshPtr + 168)) |= DICT_TO_SET
	} else {
		*(*int32)(unsafe.Pointer(zshPtr + 168)) &= libc.CplInt32(DICT_TO_SET)
	}
	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj != uintptr(0) {
		for ok := true; ok; ok = 0 != 0 {
			var _objPtr uintptr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
	}
	(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj = compressionDictionaryObj
}

//----------------------------------------------------------------------
//
// Tcl_ZlibStreamPut --
//
//	Add data to the stream for compression or decompression from a
//	bytearray Tcl_Obj.
//
//----------------------------------------------------------------------

func XTcl_ZlibStreamPut(tls *libc.TLS, zshandle Tcl_ZlibStream, data uintptr, flush int32) int32 { /* tclZlib.c:1184:1: */
	bp := tls.Alloc(40)
	defer tls.Free(40)

	var zshPtr uintptr = zshandle
	var dataTmp uintptr = uintptr(0)
	var e int32
	// var size int32 at bp+32, 4

	var outSize int32
	// var toStore int32 at bp+36, 4

	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FstreamEnd != 0 {
		if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp != 0 {
			XTcl_SetObjResult(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, XTcl_NewStringObj(tls,
				ts+72530, -1))
			XTcl_SetErrorCode(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, libc.VaList(bp, ts+4178, ts+72565, ts+72569, uintptr(0)))
		}
		return TCL_ERROR
	}

	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
		(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fnext_in = XTcl_GetByteArrayFromObj(tls, data, bp+32)
		(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Favail_in = UInt(*(*int32)(unsafe.Pointer(bp + 32 /* size */)))

		// Must not do a zero-length compress unless finalizing. [Bug 25842c161]

		if *(*int32)(unsafe.Pointer(bp + 32)) == 0 && flush != Z_FINISH {
			return TCL_OK
		}

		if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflags&DICT_TO_SET != 0 {
			e = sSetDeflateDictionary(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj)
			if e != Z_OK {
				sConvertError(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, e, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fadler)
				return TCL_ERROR
			}
			*(*int32)(unsafe.Pointer(zshPtr + 168)) |= libc.CplInt32(DICT_TO_SET)
		}

		// deflateBound() doesn't seem to take various header sizes into
		// account, so we add 100 extra bytes. However, we can also loop
		// around again so we also set an upper bound on the output buffer
		// size.

		outSize = int32(z.XdeflateBound(tls, zshPtr+8, uint32(*(*int32)(unsafe.Pointer(bp + 32)))) + ULong(100))
		if outSize > BUFFER_SIZE_LIMIT {
			outSize = BUFFER_SIZE_LIMIT
		}
		dataTmp = XTcl_Alloc(tls, uint32(outSize))

		for 1 != 0 {
			e = sDeflate(tls, zshPtr+8, dataTmp, outSize, flush, bp+36)

			// Test if we've filled the buffer up and have to ask deflate() to
			// give us some more. Note that the condition for needing to
			// repeat a buffer transfer when the result is Z_OK is whether
			// there is no more space in the buffer we provided; the zlib
			// library does not necessarily return a different code in that
			// case. [Bug b26e38a3e4] [Tk Bug 10f2e7872b]

			if e != -5 && (e != Z_OK || *(*int32)(unsafe.Pointer(bp + 36)) < outSize) {
				if e == Z_OK || flush == Z_FINISH && e == Z_STREAM_END {
					break
				}
				sConvertError(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, e, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fadler)
				return TCL_ERROR
			}

			// Output buffer too small to hold the data being generated or we
			// are doing the end-of-stream flush (which can spit out masses of
			// data). This means we need to put a new buffer into place after
			// saving the old generated data to the outData list.

			sAppendByteArray(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData, dataTmp, outSize)

			if outSize < BUFFER_SIZE_LIMIT {
				outSize = BUFFER_SIZE_LIMIT
				// There may be *lots* of data left to output...
				dataTmp = XTcl_Realloc(tls, dataTmp, uint32(outSize))
			}
		}

		// And append the final data block to the outData list.

		sAppendByteArray(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData, dataTmp, *(*int32)(unsafe.Pointer(bp + 36 /* toStore */)))
		XTclpFree(tls, dataTmp)
	} else {
		// This is easy. Just append to the inData list.

		XTcl_ListObjAppendElement(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData, data)

		// and we'll need the flush parameter for the Inflate call.

		(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflush = flush
	}

	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ZlibStreamGet --
//
//	Retrieve data (now compressed or decompressed) from the stream into a
//	bytearray Tcl_Obj.
//
//----------------------------------------------------------------------

func XTcl_ZlibStreamGet(tls *libc.TLS, zshandle Tcl_ZlibStream, data uintptr, count int32) int32 { /* tclZlib.c:1308:1: */
	bp := tls.Alloc(52)
	defer tls.Free(52)

	var zshPtr uintptr = zshandle
	var e int32
	var i int32
	// var listLen int32 at bp+36, 4

	// var itemLen int32 at bp+48, 4

	var dataPos int32 = 0
	// var itemObj uintptr at bp+40, 8

	var dataPtr uintptr
	var itemPtr uintptr
	// var existing int32 at bp+32, 4

	// Getting beyond the of stream, just return empty string.

	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FstreamEnd != 0 {
		return TCL_OK
	}

	XTcl_GetByteArrayFromObj(tls, data, bp+32)

	if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fmode == TCL_ZLIB_STREAM_INFLATE {
		if count == -1 {
			// The only safe thing to do is restict to 65k. We might cause a
			// panic for out of memory if we just kept growing the buffer.

			count = MAX_BUFFER_SIZE
		}

		// Prepare the place to store the data.

		dataPtr = XTcl_SetByteArrayLength(tls, data, *(*int32)(unsafe.Pointer(bp + 32))+count)
		dataPtr += uintptr(*(*int32)(unsafe.Pointer(bp + 32 /* existing */)))

		(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fnext_out = dataPtr
		(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Favail_out = UInt(count)
		if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Favail_in == UInt(0) {
			// zlib will probably need more data to decompress.

			if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput != 0 {
				for ok := true; ok; ok = 0 != 0 {
					var _objPtr uintptr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput = uintptr(0)
			}
			XTcl_ListObjLength(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData, bp+36)
			if *(*int32)(unsafe.Pointer(bp + 36)) > 0 {
				// There is more input available, get it from the list and
				// give it to zlib. At this point, the data must not be shared
				// since we require the bytearray representation to not vanish
				// under our feet. [Bug 3081008]

				XTcl_ListObjIndex(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData, 0, bp+40)
				if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount > 1 {
					*(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */)))
				}
				itemPtr = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */)), bp+48)
				(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount++
				(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput = *(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */))
				(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fnext_in = itemPtr
				(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Favail_in = UInt(*(*int32)(unsafe.Pointer(bp + 48 /* itemLen */)))

				// And remove it from the list

				XTcl_ListObjReplace(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData, 0, 1, 0, uintptr(0))
			}
		}

		// When dealing with a raw stream, we set the dictionary here, once.
		// (You can't do it in response to getting Z_NEED_DATA as raw streams
		// don't ever issue that.)

		if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fformat == TCL_ZLIB_FORMAT_RAW && (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflags&DICT_TO_SET != 0 {
			e = sSetInflateDictionary(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj)
			if e != Z_OK {
				sConvertError(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, e, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fadler)
				return TCL_ERROR
			}
			*(*int32)(unsafe.Pointer(zshPtr + 168)) |= libc.CplInt32(DICT_TO_SET)
		}
		e = z.Xinflate(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflush)
		if e == Z_NEED_DICT && (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflags&DICT_TO_SET != 0 {
			e = sSetInflateDictionary(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj)
			if e == Z_OK {
				*(*int32)(unsafe.Pointer(zshPtr + 168)) |= libc.CplInt32(DICT_TO_SET)
				e = z.Xinflate(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflush)
			}
		}

		XTcl_ListObjLength(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData, bp+36)

		for (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Favail_out > UInt(0) &&
			(e == Z_OK || e == -5) && *(*int32)(unsafe.Pointer(bp + 36)) > 0 {
			// State: We have not satisfied the request yet and there may be
			// more to inflate.

			if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Favail_in > UInt(0) {
				if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp != 0 {
					XTcl_SetObjResult(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, XTcl_NewStringObj(tls,

						ts+72576, -1))
					XTcl_SetErrorCode(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, libc.VaList(bp, ts+4178, ts+72565, ts+72628,
						uintptr(0)))
				}
				XTcl_SetByteArrayLength(tls, data, *(*int32)(unsafe.Pointer(bp + 32 /* existing */)))
				return TCL_ERROR
			}

			if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput != 0 {
				for ok1 := true; ok1; ok1 = 0 != 0 {
					var _objPtr uintptr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput = uintptr(0)
			}

			// Get the next block of data to go to inflate. At this point, the
			// data must not be shared since we require the bytearray
			// representation to not vanish under our feet. [Bug 3081008]

			XTcl_ListObjIndex(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData, 0, bp+40)
			if (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount > 1 {
				*(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */)) = XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */)))
			}
			itemPtr = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */)), bp+48)
			(*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FrefCount++
			(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput = *(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */))
			(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fnext_in = itemPtr
			(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Favail_in = UInt(*(*int32)(unsafe.Pointer(bp + 48 /* itemLen */)))

			// Remove it from the list.

			XTcl_ListObjReplace(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FinData, 0, 1, 0, uintptr(0))
			*(*int32)(unsafe.Pointer(bp + 36 /* listLen */))--

			// And call inflate again.

			for ok2 := true; ok2; ok2 = e == Z_OK {
				e = z.Xinflate(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflush)
				if e != Z_NEED_DICT || !((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fflags&DICT_TO_SET != 0) {
					break
				}
				e = sSetInflateDictionary(tls, zshPtr+8, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcompDictObj)
				*(*int32)(unsafe.Pointer(zshPtr + 168)) |= libc.CplInt32(DICT_TO_SET)
			}
		}
		if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Favail_out > UInt(0) {
			XTcl_SetByteArrayLength(tls, data,
				int32(UInt(*(*int32)(unsafe.Pointer(bp + 32))+count)-(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Favail_out))
		}
		if !(e == Z_OK || e == Z_STREAM_END || e == -5) {
			XTcl_SetByteArrayLength(tls, data, *(*int32)(unsafe.Pointer(bp + 32 /* existing */)))
			sConvertError(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Finterp, e, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fstream.Fadler)
			return TCL_ERROR
		}
		if e == Z_STREAM_END {
			(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FstreamEnd = 1
			if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput != 0 {
				for ok3 := true; ok3; ok3 = 0 != 0 {
					var _objPtr uintptr = (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput
					if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
						XTclFreeObj(tls, _objPtr)
					}
				}
				(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FcurrentInput = uintptr(0)
			}
			z.XinflateEnd(tls, zshPtr+8)
		}
	} else {
		XTcl_ListObjLength(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData, bp+36)
		if count == -1 {
			count = 0
			for i = 0; i < *(*int32)(unsafe.Pointer(bp + 36 /* listLen */)); i++ {
				XTcl_ListObjIndex(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData, i, bp+40)
				XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */)), bp+48)
				if i == 0 {
					count = count + (*(*int32)(unsafe.Pointer(bp + 48)) - (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos)
				} else {
					count = count + *(*int32)(unsafe.Pointer(bp + 48))
				}
			}
		}

		// Prepare the place to store the data.

		dataPtr = XTcl_SetByteArrayLength(tls, data, *(*int32)(unsafe.Pointer(bp + 32))+count)
		dataPtr += uintptr(*(*int32)(unsafe.Pointer(bp + 32 /* existing */)))

		for count > dataPos && XTcl_ListObjLength(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData, bp+36) == TCL_OK &&
			*(*int32)(unsafe.Pointer(bp + 36)) > 0 {
			// Get the next chunk off our list of chunks and grab the data out
			// of it.

			XTcl_ListObjIndex(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData, 0, bp+40)
			itemPtr = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* itemObj */)), bp+48)
			if *(*int32)(unsafe.Pointer(bp + 48))-(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos >= count-dataPos {
				var len uint32 = uint32(count - dataPos)

				libc.Xmemcpy(tls, dataPtr+uintptr(dataPos), itemPtr+uintptr((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos), uint64(len))
				*(*int32)(unsafe.Pointer(zshPtr + 128)) += int32(len)
				dataPos = int32(uint32(dataPos) + len)
				if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos == *(*int32)(unsafe.Pointer(bp + 48)) {
					(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos = 0
				}
			} else {
				var len uint32 = uint32(*(*int32)(unsafe.Pointer(bp + 48)) - (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos)

				libc.Xmemcpy(tls, dataPtr+uintptr(dataPos), itemPtr+uintptr((*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos), uint64(len))
				dataPos = int32(uint32(dataPos) + len)
				(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos = 0
			}
			if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutPos == 0 {
				XTcl_ListObjReplace(tls, uintptr(0), (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FoutData, 0, 1, 0, uintptr(0))
				*(*int32)(unsafe.Pointer(bp + 36 /* listLen */))--
			}
		}
		XTcl_SetByteArrayLength(tls, data, *(*int32)(unsafe.Pointer(bp + 32))+dataPos)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// Tcl_ZlibDeflate --
//
//	Compress the contents of Tcl_Obj *data with compression level in
//	output format, producing the compressed data in the interpreter
//	result.
//
//----------------------------------------------------------------------

func XTcl_ZlibDeflate(tls *libc.TLS, interp uintptr, format int32, data uintptr, level int32, gzipHeaderDictObj uintptr) int32 { /* tclZlib.c:1557:1: */
	bp := tls.Alloc(688)
	defer tls.Free(688)

	var wbits int32
	// var inLen int32 at bp+596, 4

	var e int32
	// var extraSize int32 at bp+592, 4

	var inData uintptr
	// var stream Z_stream at bp+600, 88

	// var header GzipHeader at bp, 592

	var headerPtr uintptr
	var obj uintptr
	wbits = 0
	*(*int32)(unsafe.Pointer(bp + 596 /* inLen */)) = 0
	e = 0
	*(*int32)(unsafe.Pointer(bp + 592 /* extraSize */)) = 0
	inData = uintptr(0)
	headerPtr = uintptr(0)

	if !!(interp != 0) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// Compressed format is specified by the wbits parameter. See zlib.h for
	// details.

	if !(format == TCL_ZLIB_FORMAT_RAW) {
		goto __2
	}
	wbits = -MAX_WBITS
	goto __3
__2:
	if !(format == TCL_ZLIB_FORMAT_GZIP) {
		goto __4
	}
	wbits = MAX_WBITS | 16

	// Need to allocate extra space for the gzip header and footer. The
	// amount of space is (a bit less than) 32 bytes, plus a byte for each
	// byte of string that we add. Note that over-allocation is not a
	// problem. [Bug 2419061]

	*(*int32)(unsafe.Pointer(bp + 592 /* extraSize */)) = 32
	if !(gzipHeaderDictObj != 0) {
		goto __6
	}
	headerPtr = bp
	libc.Xmemset(tls, headerPtr, 0, uint64(unsafe.Sizeof(Gz_header{})))
	if !(sGenerateHeader(tls, interp, gzipHeaderDictObj, bp,
		bp+592) != TCL_OK) {
		goto __7
	}
	return TCL_ERROR
__7:
	;
__6:
	;
	goto __5
__4:
	if !(format == TCL_ZLIB_FORMAT_ZLIB) {
		goto __8
	}
	wbits = MAX_WBITS
	goto __9
__8:
	XTcl_Panic(tls,
		ts+72634, 0)
__9:
	;
__5:
	;
__3:
	;

	if !(level < -1 || level > 9) {
		goto __10
	}
	XTcl_Panic(tls,
		ts+72737, 0)
__10:
	;

	// Allocate some space to store the output.

__11:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __14
	}
	XTclAllocateFreeObjects(tls)
__14:
	;
	obj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __12
__12:
	if 0 != 0 {
		goto __11
	}
	goto __13
__13:
	;
	(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr = uintptr(0)

	// Obtain the pointer to the byte array, we'll pass this pointer straight
	// to the deflate command.

	inData = XTcl_GetByteArrayFromObj(tls, data, bp+596)
	libc.Xmemset(tls, bp+600, 0, uint64(unsafe.Sizeof(Z_stream{})))
	(*Z_stream)(unsafe.Pointer(bp + 600 /* &stream */)).Favail_in = UInt(*(*int32)(unsafe.Pointer(bp + 596 /* inLen */)))
	(*Z_stream)(unsafe.Pointer(bp + 600 /* &stream */)).Fnext_in = inData

	// No output buffer available yet, will alloc after deflateInit2.

	e = z.XdeflateInit2_(tls, bp+600, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY, ts+65, int32(unsafe.Sizeof(Z_stream{})))
	if !(e != Z_OK) {
		goto __15
	}
	goto error
__15:
	;

	if !(headerPtr != uintptr(0)) {
		goto __16
	}
	e = z.XdeflateSetHeader(tls, bp+600, headerPtr)
	if !(e != Z_OK) {
		goto __17
	}
	goto error
__17:
	;
__16:
	;

	// Allocate the output buffer from the value of deflateBound(). This is
	// probably too much space. Before returning to the caller, we will reduce
	// it back to the actual compressed size.

	(*Z_stream)(unsafe.Pointer(bp + 600 /* &stream */)).Favail_out = UInt(z.XdeflateBound(tls, bp+600, uint32(*(*int32)(unsafe.Pointer(bp + 596)))) + ULong(*(*int32)(unsafe.Pointer(bp + 592))))
	(*Z_stream)(unsafe.Pointer(bp + 600 /* &stream */)).Fnext_out = XTcl_SetByteArrayLength(tls, obj, int32((*Z_stream)(unsafe.Pointer(bp+600 /* &stream */)).Favail_out))

	// Perform the compression, Z_FINISH means do it in one go.

	e = z.Xdeflate(tls, bp+600, Z_FINISH)

	if !(e != Z_STREAM_END) {
		goto __18
	}
	e = z.XdeflateEnd(tls, bp+600)

	// deflateEnd() returns Z_OK when there are bytes left to compress, at
	// this point we consider that an error, although we could continue by
	// allocating more memory and calling deflate() again.

	if !(e == Z_OK) {
		goto __20
	}
	e = -5
__20:
	;
	goto __19
__18:
	e = z.XdeflateEnd(tls, bp+600)
__19:
	;

	if !(e != Z_OK) {
		goto __21
	}
	goto error
__21:
	;

	// Reduce the bytearray length to the actual data length produced by
	// deflate.

	XTcl_SetByteArrayLength(tls, obj, int32((*Z_stream)(unsafe.Pointer(bp+600 /* &stream */)).Ftotal_out))
	XTcl_SetObjResult(tls, interp, obj)
	return TCL_OK

error:
	sConvertError(tls, interp, e, (*Z_stream)(unsafe.Pointer(bp+600 /* &stream */)).Fadler)
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount, 1) > 1) {
		goto __22
	}
	goto __23
__22:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __24
	}

	if !((*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != XtclEmptyStringRep) {
		goto __26
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes)
__26:
	;
	(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = -1
__27:
	;
	*(*uintptr)(unsafe.Pointer(obj + 32)) = XtclFreeObjList
	XtclFreeObjList = obj
	goto __28
__28:
	if 0 != 0 {
		goto __27
	}
	goto __29
__29:
	;
	goto __25
__24:
	XTclFreeObj(tls, obj)
__25:
	;
__23:
	;

	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_ZlibInflate --
//
//	Decompress data in an object into the interpreter result.
//
//----------------------------------------------------------------------

func XTcl_ZlibInflate(tls *libc.TLS, interp uintptr, format int32, data uintptr, bufferSize int32, gzipHeaderDictObj uintptr) int32 { /* tclZlib.c:1707:1: */
	bp := tls.Alloc(168)
	defer tls.Free(168)

	var wbits int32
	// var inLen int32 at bp+72, 4

	var e int32
	var newBufferSize int32
	var inData uintptr
	var outData uintptr
	var newOutData uintptr
	// var stream Z_stream at bp+80, 88

	// var header Gz_header at bp, 72

	var headerPtr uintptr
	var obj uintptr
	var nameBuf uintptr
	var commentBuf uintptr
	wbits = 0
	*(*int32)(unsafe.Pointer(bp + 72 /* inLen */)) = 0
	e = 0
	inData = uintptr(0)
	outData = uintptr(0)
	newOutData = uintptr(0)
	headerPtr = uintptr(0)
	nameBuf = uintptr(0)
	commentBuf = uintptr(0)

	if !!(interp != 0) {
		goto __1
	}
	return TCL_ERROR
__1:
	;

	// Compressed format is specified by the wbits parameter. See zlib.h for
	// details.

	switch format {
	case TCL_ZLIB_FORMAT_RAW:
		goto __3
	case TCL_ZLIB_FORMAT_ZLIB:
		goto __4
	case TCL_ZLIB_FORMAT_GZIP:
		goto __5
	case TCL_ZLIB_FORMAT_AUTO:
		goto __6
	default:
		goto __7
	}
	goto __2
__3:
	wbits = -MAX_WBITS
	gzipHeaderDictObj = uintptr(0)
	goto __2
__4:
	wbits = MAX_WBITS
	gzipHeaderDictObj = uintptr(0)
	goto __2
__5:
	wbits = MAX_WBITS | 16
	goto __2
__6:
	wbits = MAX_WBITS | 32
	goto __2
__7:
	XTcl_Panic(tls,

		ts+72229, 0)
__2:
	;

	if !(gzipHeaderDictObj != 0) {
		goto __8
	}
	headerPtr = bp /* &header */
	libc.Xmemset(tls, headerPtr, 0, uint64(unsafe.Sizeof(Gz_header{})))
	nameBuf = XTcl_Alloc(tls, uint32(MAX_PATH))
	(*Gz_header)(unsafe.Pointer(bp /* &header */)).Fname = nameBuf
	(*Gz_header)(unsafe.Pointer(bp /* &header */)).Fname_max = UInt(MAX_PATH - 1)
	commentBuf = XTcl_Alloc(tls, uint32(MAX_COMMENT_LEN))
	(*Gz_header)(unsafe.Pointer(bp /* &header */)).Fcomment = commentBuf
	(*Gz_header)(unsafe.Pointer(bp /* &header */)).Fcomm_max = UInt(MAX_COMMENT_LEN - 1)
__8:
	;

	inData = XTcl_GetByteArrayFromObj(tls, data, bp+72)
	if !(bufferSize < 1) {
		goto __9
	}
	// Start with a buffer (up to) 3 times the size of the input data.

	if !(*(*int32)(unsafe.Pointer(bp + 72)) < 32*1024*1024) {
		goto __10
	}
	bufferSize = 3 * *(*int32)(unsafe.Pointer(bp + 72))
	goto __11
__10:
	if !(*(*int32)(unsafe.Pointer(bp + 72)) < 256*1024*1024) {
		goto __12
	}
	bufferSize = 2 * *(*int32)(unsafe.Pointer(bp + 72))
	goto __13
__12:
	bufferSize = *(*int32)(unsafe.Pointer(bp + 72 /* inLen */))
__13:
	;
__11:
	;
__9:
	;

__14:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __17
	}
	XTclAllocateFreeObjects(tls)
__17:
	;
	obj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __15
__15:
	if 0 != 0 {
		goto __14
	}
	goto __16
__16:
	;
	(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr = uintptr(0)

	outData = XTcl_SetByteArrayLength(tls, obj, bufferSize)
	libc.Xmemset(tls, bp+80, 0, uint64(unsafe.Sizeof(Z_stream{})))
	(*Z_stream)(unsafe.Pointer(bp + 80 /* &stream */)).Favail_in = UInt(*(*int32)(unsafe.Pointer(bp + 72))) + UInt(1) // +1 because zlib can "over-request"
	// input (but ignore it!)
	(*Z_stream)(unsafe.Pointer(bp + 80 /* &stream */)).Fnext_in = inData
	(*Z_stream)(unsafe.Pointer(bp + 80 /* &stream */)).Favail_out = UInt(bufferSize)
	(*Z_stream)(unsafe.Pointer(bp + 80 /* &stream */)).Fnext_out = outData

	// Initialize zlib for decompression.

	e = z.XinflateInit2_(tls, bp+80, wbits, ts+65, int32(unsafe.Sizeof(Z_stream{})))
	if !(e != Z_OK) {
		goto __18
	}
	goto error
__18:
	;
	if !(headerPtr != 0) {
		goto __19
	}
	e = z.XinflateGetHeader(tls, bp+80, headerPtr)
	if !(e != Z_OK) {
		goto __20
	}
	z.XinflateEnd(tls, bp+80)
	goto error
__20:
	;
__19:
	;

	// Start the decompression cycle.

__21:
	if !(1 != 0) {
		goto __22
	}
	e = z.Xinflate(tls, bp+80, Z_FINISH)
	if !(e != -5) {
		goto __23
	}
	goto __22
__23:
	;

	// Not enough room in the output buffer. Increase it by five times the
	// bytes still in the input buffer. (Because 3 times didn't do the
	// trick before, 5 times is what we do next.) Further optimization
	// should be done by the user, specify the decompressed size!

	if !((*Z_stream)(unsafe.Pointer(bp+80)).Favail_in == UInt(0) && (*Z_stream)(unsafe.Pointer(bp+80)).Favail_out > UInt(0)) {
		goto __24
	}
	e = -2
	goto __22
__24:
	;
	newBufferSize = int32(UInt(bufferSize) + UInt(5)*(*Z_stream)(unsafe.Pointer(bp+80)).Favail_in)
	if !(newBufferSize == bufferSize) {
		goto __25
	}
	newBufferSize = bufferSize + 1000
__25:
	;
	newOutData = XTcl_SetByteArrayLength(tls, obj, newBufferSize)

	// Set next out to the same offset in the new location.

	(*Z_stream)(unsafe.Pointer(bp + 80 /* &stream */)).Fnext_out = newOutData + uintptr((*Z_stream)(unsafe.Pointer(bp+80)).Ftotal_out)

	// And increase avail_out with the number of new bytes allocated.

	*(*UInt)(unsafe.Pointer(bp + 80 + 24)) += UInt(newBufferSize - bufferSize)
	outData = newOutData
	bufferSize = newBufferSize
	goto __21
__22:
	;

	if !(e != Z_STREAM_END) {
		goto __26
	}
	z.XinflateEnd(tls, bp+80)
	goto error
__26:
	;

	e = z.XinflateEnd(tls, bp+80)
	if !(e != Z_OK) {
		goto __27
	}
	goto error
__27:
	;

	// Reduce the BA length to the actual data length produced by deflate.

	XTcl_SetByteArrayLength(tls, obj, int32((*Z_stream)(unsafe.Pointer(bp+80 /* &stream */)).Ftotal_out))
	if !(headerPtr != uintptr(0)) {
		goto __28
	}
	sExtractHeader(tls, bp, gzipHeaderDictObj)
	XTcl_DictObjPut(tls, uintptr(0), gzipHeaderDictObj, XTcl_NewStringObj(tls, ts+12823, -1), XTcl_NewLongObj(tls, int32((*Z_stream)(unsafe.Pointer(bp+80)).Ftotal_out)))
	XTclpFree(tls, nameBuf)
	XTclpFree(tls, commentBuf)
__28:
	;
	XTcl_SetObjResult(tls, interp, obj)
	return TCL_OK

error:
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount, 1) > 1) {
		goto __29
	}
	goto __30
__29:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __31
	}

	if !((*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != XtclEmptyStringRep) {
		goto __33
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes)
__33:
	;
	(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = -1
__34:
	;
	*(*uintptr)(unsafe.Pointer(obj + 32)) = XtclFreeObjList
	XtclFreeObjList = obj
	goto __35
__35:
	if 0 != 0 {
		goto __34
	}
	goto __36
__36:
	;
	goto __32
__31:
	XTclFreeObj(tls, obj)
__32:
	;
__30:
	;

	sConvertError(tls, interp, e, (*Z_stream)(unsafe.Pointer(bp+80 /* &stream */)).Fadler)
	if !(nameBuf != 0) {
		goto __37
	}
	XTclpFree(tls, nameBuf)
__37:
	;
	if !(commentBuf != 0) {
		goto __38
	}
	XTclpFree(tls, commentBuf)
__38:
	;
	return TCL_ERROR
}

//----------------------------------------------------------------------
//
// Tcl_ZlibCRC32, Tcl_ZlibAdler32 --
//
//	Access to the checksumming engines.
//
//----------------------------------------------------------------------

func XTcl_ZlibCRC32(tls *libc.TLS, crc uint32, buf uintptr, len int32) uint32 { /* tclZlib.c:1892:1: */
	// Nothing much to do, just wrap the crc32().
	return uint32(z.Xcrc32(tls, uint32(crc), buf, uint32(len)))
}

func XTcl_ZlibAdler32(tls *libc.TLS, adler uint32, buf uintptr, len int32) uint32 { /* tclZlib.c:1902:1: */
	return uint32(z.Xadler32(tls, uint32(adler), buf, uint32(len)))
}

//----------------------------------------------------------------------
//
// ZlibCmd --
//
//	Implementation of the [zlib] command.
//
//----------------------------------------------------------------------

func sZlibCmd(tls *libc.TLS, notUsed ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclZlib.c:1921:1: */
	bp := tls.Alloc(104)
	defer tls.Free(104)

	// var command int32 at bp+80, 4

	// var dlen int32 at bp+88, 4

	var i int32
	// var option int32 at bp+96, 4

	// var level int32 at bp+92, 4

	// var start uint32 at bp+84, 4

	// var buffersize uint32 at bp+100, 4

	var data uintptr
	var headerDictObj uintptr
	var extraInfoStr uintptr // gunzip gzippeddata ?bufferSize?
	//	-> decompressedData
	var headerVarObj uintptr
	*(*int32)(unsafe.Pointer(bp + 92 /* level */)) = -1
	*(*uint32)(unsafe.Pointer(bp + 100 /* buffersize */)) = uint32(0)
	extraInfoStr = uintptr(0)

	if !(objc < 2) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 1, objv, ts+72851)
	return TCL_ERROR
__1:
	;
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&commands)), int32(unsafe.Sizeof(uintptr(0))), ts+14158, 0, bp+80) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;

	switch uint32(*(*int32)(unsafe.Pointer(bp + 80 /* command */))) {
	case uint32(0) /* CMD_ADLER */ :
		goto __4
	case uint32(2) /* CMD_CRC */ :
		goto __5
	case uint32(4) /* CMD_DEFLATE */ :
		goto __6
	case uint32(1) /* CMD_COMPRESS */ :
		goto __7
	case uint32(6) /* CMD_GZIP */ :
		goto __8
	case uint32(7) /* CMD_INFLATE */ :
		goto __9
	case uint32(3) /* CMD_DECOMPRESS */ :
		goto __10
	case uint32(5) /* CMD_GUNZIP */ :
		goto __11
	case uint32(9) /* CMD_STREAM */ :
		goto __12
	case uint32(8) /* CMD_PUSH */ :
		goto __13
	}
	goto __3
__4: // adler32 str ?startvalue?
	// -> checksum
	if !(objc < 3 || objc > 4) {
		goto __14
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+72869)
	return TCL_ERROR
__14:
	;
	if !(objc > 3 && XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)),
		bp+84) != TCL_OK) {
		goto __15
	}
	return TCL_ERROR
__15:
	;
	if !(objc < 4) {
		goto __16
	}
	*(*uint32)(unsafe.Pointer(bp + 84 /* start */)) = XTcl_ZlibAdler32(tls, uint32(0), uintptr(0), 0)
__16:
	;
	data = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+88)
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, Tcl_WideInt(ULong(XTcl_ZlibAdler32(tls, *(*uint32)(unsafe.Pointer(bp + 84 /* start */)), data, *(*int32)(unsafe.Pointer(bp + 88 /* dlen */)))))))
	return TCL_OK
__5: // crc32 str ?startvalue?
	// -> checksum
	if !(objc < 3 || objc > 4) {
		goto __17
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+72869)
	return TCL_ERROR
__17:
	;
	if !(objc > 3 && XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)),
		bp+84) != TCL_OK) {
		goto __18
	}
	return TCL_ERROR
__18:
	;
	if !(objc < 4) {
		goto __19
	}
	*(*uint32)(unsafe.Pointer(bp + 84 /* start */)) = XTcl_ZlibCRC32(tls, uint32(0), uintptr(0), 0)
__19:
	;
	data = XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+88)
	XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, Tcl_WideInt(ULong(XTcl_ZlibCRC32(tls, *(*uint32)(unsafe.Pointer(bp + 84 /* start */)), data, *(*int32)(unsafe.Pointer(bp + 88 /* dlen */)))))))
	return TCL_OK
__6: // deflate data ?level?
	// -> rawCompressedData
	if !(objc < 3 || objc > 4) {
		goto __20
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+72887)
	return TCL_ERROR
__20:
	;
	if !(objc > 3) {
		goto __21
	}
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+92) != TCL_OK) {
		goto __22
	}
	return TCL_ERROR
__22:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 92)) < 0 || *(*int32)(unsafe.Pointer(bp + 92)) > 9) {
		goto __23
	}
	goto badLevel
__23:
	;
__21:
	;
	return XTcl_ZlibDeflate(tls, interp, TCL_ZLIB_FORMAT_RAW, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp + 92 /* level */)),
		uintptr(0))
__7: // compress data ?level?
	// -> zlibCompressedData
	if !(objc < 3 || objc > 4) {
		goto __24
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+72887)
	return TCL_ERROR
__24:
	;
	if !(objc > 3) {
		goto __25
	}
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+92) != TCL_OK) {
		goto __26
	}
	return TCL_ERROR
__26:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 92)) < 0 || *(*int32)(unsafe.Pointer(bp + 92)) > 9) {
		goto __27
	}
	goto badLevel
__27:
	;
__25:
	;
	return XTcl_ZlibDeflate(tls, interp, TCL_ZLIB_FORMAT_ZLIB, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp + 92 /* level */)),
		uintptr(0))
__8: // gzip data ?level?
	// -> gzippedCompressedData
	headerDictObj = uintptr(0)

	// Legacy argument format support.

	if !(objc == 4 &&
		XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+92) == TCL_OK) {
		goto __28
	}
	if !(*(*int32)(unsafe.Pointer(bp + 92)) < 0 || *(*int32)(unsafe.Pointer(bp + 92)) > 9) {
		goto __29
	}
	extraInfoStr = ts + 72900 /* "\n    (in -level ..." */
	goto badLevel
__29:
	;
	return XTcl_ZlibDeflate(tls, interp, TCL_ZLIB_FORMAT_GZIP, *(*uintptr)(unsafe.Pointer(objv + 2*8)),
		*(*int32)(unsafe.Pointer(bp + 92 /* level */)), uintptr(0))
__28:
	;

	if !(objc < 3 || objc > 7 || objc&1 == 0) {
		goto __30
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv,
		ts+72924)
	return TCL_ERROR
__30:
	;
	i = 3
__31:
	if !(i < objc) {
		goto __33
	}

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&gzipopts)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+96) != TCL_OK) {
		goto __34
	}
	return TCL_ERROR
__34:
	;
	switch *(*int32)(unsafe.Pointer(bp + 96 /* option */)) {
	case 0:
		goto __36
	case 1:
		goto __37
	}
	goto __35
__36:
	headerDictObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	goto __35
__37:
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)),
		bp+92) != TCL_OK) {
		goto __38
	}
	return TCL_ERROR
__38:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 92)) < 0 || *(*int32)(unsafe.Pointer(bp + 92)) > 9) {
		goto __39
	}
	extraInfoStr = ts + 72900 /* "\n    (in -level ..." */
	goto badLevel
__39:
	;
	goto __35
__35:
	;
	goto __32
__32:
	i = i + 2
	goto __31
	goto __33
__33:
	;
	return XTcl_ZlibDeflate(tls, interp, TCL_ZLIB_FORMAT_GZIP, *(*uintptr)(unsafe.Pointer(objv + 2*8)), *(*int32)(unsafe.Pointer(bp + 92 /* level */)),
		headerDictObj)
__9: // inflate rawcomprdata ?bufferSize?
	//	-> decompressedData
	if !(objc < 3 || objc > 4) {
		goto __40
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+72961)
	return TCL_ERROR
__40:
	;
	if !(objc > 3) {
		goto __41
	}
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)),
		bp+100) != TCL_OK) {
		goto __42
	}
	return TCL_ERROR
__42:
	;
	if !(*(*uint32)(unsafe.Pointer(bp + 100)) < uint32(MIN_NONSTREAM_BUFFER_SIZE) ||
		*(*uint32)(unsafe.Pointer(bp + 100)) > uint32(MAX_BUFFER_SIZE)) {
		goto __43
	}
	goto badBuffer
__43:
	;
__41:
	;
	return XTcl_ZlibInflate(tls, interp, TCL_ZLIB_FORMAT_RAW, *(*uintptr)(unsafe.Pointer(objv + 2*8)),
		int32(*(*uint32)(unsafe.Pointer(bp + 100 /* buffersize */))), uintptr(0))
__10: // decompress zlibcomprdata 					 *    ?bufferSize?
	//	-> decompressedData
	if !(objc < 3 || objc > 4) {
		goto __44
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+72961)
	return TCL_ERROR
__44:
	;
	if !(objc > 3) {
		goto __45
	}
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)),
		bp+100) != TCL_OK) {
		goto __46
	}
	return TCL_ERROR
__46:
	;
	if !(*(*uint32)(unsafe.Pointer(bp + 100)) < uint32(MIN_NONSTREAM_BUFFER_SIZE) ||
		*(*uint32)(unsafe.Pointer(bp + 100)) > uint32(MAX_BUFFER_SIZE)) {
		goto __47
	}
	goto badBuffer
__47:
	;
__45:
	;
	return XTcl_ZlibInflate(tls, interp, TCL_ZLIB_FORMAT_ZLIB, *(*uintptr)(unsafe.Pointer(objv + 2*8)),
		int32(*(*uint32)(unsafe.Pointer(bp + 100 /* buffersize */))), uintptr(0))
__11:

	if !(objc < 3 || objc > 5 || objc&1 == 0) {
		goto __48
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+72979)
	return TCL_ERROR
__48:
	;
	headerDictObj = libc.AssignUintptr(&headerVarObj, uintptr(0))
	i = 3
__49:
	if !(i < objc) {
		goto __51
	}

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&gunzipopts)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+96) != TCL_OK) {
		goto __52
	}
	return TCL_ERROR
__52:
	;
	switch *(*int32)(unsafe.Pointer(bp + 96 /* option */)) {
	case 0:
		goto __54
	case 1:
		goto __55
	}
	goto __53
__54:
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8)),
		bp+100) != TCL_OK) {
		goto __56
	}
	return TCL_ERROR
__56:
	;
	if !(*(*uint32)(unsafe.Pointer(bp + 100)) < uint32(MIN_NONSTREAM_BUFFER_SIZE) ||
		*(*uint32)(unsafe.Pointer(bp + 100)) > uint32(MAX_BUFFER_SIZE)) {
		goto __57
	}
	goto badBuffer
__57:
	;
	goto __53
__55:
	headerVarObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
__58:
	;
	if !(XtclFreeObjList == uintptr(0)) {
		goto __61
	}
	XTclAllocateFreeObjects(tls)
__61:
	;
	headerDictObj = XtclFreeObjList
	XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	goto __59
__59:
	if 0 != 0 {
		goto __58
	}
	goto __60
__60:
	;
	(*Tcl_Obj)(unsafe.Pointer(headerDictObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(headerDictObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(headerDictObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(headerDictObj)).FtypePtr = uintptr(0)

	goto __53
__53:
	;
	goto __50
__50:
	i = i + 2
	goto __49
	goto __51
__51:
	;
	if !(XTcl_ZlibInflate(tls, interp, TCL_ZLIB_FORMAT_GZIP, *(*uintptr)(unsafe.Pointer(objv + 2*8)),
		int32(*(*uint32)(unsafe.Pointer(bp + 100))), headerDictObj) != TCL_OK) {
		goto __62
	}
	if !(headerDictObj != 0) {
		goto __63
	}
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(headerDictObj)).FrefCount, 1) > 1) {
		goto __64
	}
	goto __65
__64:
	if !(!(int32((*Tcl_Obj)(unsafe.Pointer(headerDictObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(headerDictObj)).FtypePtr)).FfreeIntRepProc) != 0)) {
		goto __66
	}

	if !((*Tcl_Obj)(unsafe.Pointer(headerDictObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(headerDictObj)).Fbytes != XtclEmptyStringRep) {
		goto __68
	}
	XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(headerDictObj)).Fbytes)
__68:
	;
	(*Tcl_Obj)(unsafe.Pointer(headerDictObj)).Flength = -1
__69:
	;
	*(*uintptr)(unsafe.Pointer(headerDictObj + 32)) = XtclFreeObjList
	XtclFreeObjList = headerDictObj
	goto __70
__70:
	if 0 != 0 {
		goto __69
	}
	goto __71
__71:
	;
	goto __67
__66:
	XTclFreeObj(tls, headerDictObj)
__67:
	;
__65:
	;

__63:
	;
	return TCL_ERROR
__62:
	;
	if !(headerVarObj != uintptr(0) && XTcl_ObjSetVar2(tls, interp, headerVarObj, uintptr(0),
		headerDictObj, TCL_LEAVE_ERR_MSG) == uintptr(0)) {
		goto __72
	}
	return TCL_ERROR
__72:
	;
	return TCL_OK

__12: // stream deflate/inflate/...gunzip 					 *    ?options...?
	//	-> handleCmd
	return sZlibStreamSubcmd(tls, interp, objc, objv)
__13: // push mode channel options...
	//	-> channel
	return sZlibPushSubcmd(tls, interp, objc, objv)
__3:
	;

	return TCL_ERROR

badLevel:
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+73005, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+73026, uintptr(0)))
	if !(extraInfoStr != 0) {
		goto __73
	}
	XTcl_AddErrorInfo(tls, interp, extraInfoStr)
__73:
	;
	return TCL_ERROR
badBuffer:
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+73043,
		libc.VaList(bp+32, MIN_NONSTREAM_BUFFER_SIZE, MAX_BUFFER_SIZE)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+48, ts+4178, ts+7444, ts+73072, uintptr(0)))
	return TCL_ERROR
}

var commands = [11]uintptr{
	ts + 73083, ts + 73091, ts + 73100, ts + 73106, ts + 73117, ts + 73125,
	ts + 73132, ts + 73137, ts + 2657, ts + 73145,
	uintptr(0),
} /* tclZlib.c:1932:23 */
var gzipopts = [3]uintptr{
	ts + 73152, ts + 27933, uintptr(0),
} /* tclZlib.c:2042:24 */
var gunzipopts = [3]uintptr{
	ts + 34202, ts + 73160, uintptr(0),
} /* tclZlib.c:2115:24 */

//----------------------------------------------------------------------
//
// ZlibStreamSubcmd --
//
//	Implementation of the [zlib stream] subcommand.
//
//----------------------------------------------------------------------

func sZlibStreamSubcmd(tls *libc.TLS, interp uintptr, objc int32, objv uintptr) int32 { /* tclZlib.c:2190:1: */
	bp := tls.Alloc(80)
	defer tls.Free(80)

	var i int32
	// var format int32 at bp+32, 4

	var mode int32 = 0
	// var option int32 at bp+36, 4

	// var level int32 at bp+64, 4

	*(*[3]uintptr)(unsafe.Pointer(bp + 40 /* obj */)) = [3]uintptr{uintptr(0), uintptr(0), uintptr(0)}
	var desc uintptr = uintptr(0)
	// var zh Tcl_ZlibStream at bp+72, 8

	if objc < 3 || !(objc&1 != 0) {
		XTcl_WrongNumArgs(tls, interp, 2, objv, ts+73171)
		return TCL_ERROR
	}
	if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&stream_formats)), int32(unsafe.Sizeof(uintptr(0))), ts+13412, 0, bp+32) != TCL_OK {
		return TCL_ERROR
	}

	// The format determines the compression mode and the options that may be
	// specified.

	switch uint32(*(*int32)(unsafe.Pointer(bp + 32 /* format */))) {
	case uint32(2) /* FMT_DEFLATE */ :
		desc = uintptr(unsafe.Pointer(&compressionOpts))
		mode = TCL_ZLIB_STREAM_DEFLATE
		*(*int32)(unsafe.Pointer(bp + 32 /* format */)) = TCL_ZLIB_FORMAT_RAW
		break
	case uint32(5) /* FMT_INFLATE */ :
		desc = uintptr(unsafe.Pointer(&expansionOpts))
		mode = TCL_ZLIB_STREAM_INFLATE
		*(*int32)(unsafe.Pointer(bp + 32 /* format */)) = TCL_ZLIB_FORMAT_RAW
		break
	case uint32(0) /* FMT_COMPRESS */ :
		desc = uintptr(unsafe.Pointer(&compressionOpts))
		mode = TCL_ZLIB_STREAM_DEFLATE
		*(*int32)(unsafe.Pointer(bp + 32 /* format */)) = TCL_ZLIB_FORMAT_ZLIB
		break
	case uint32(1) /* FMT_DECOMPRESS */ :
		desc = uintptr(unsafe.Pointer(&expansionOpts))
		mode = TCL_ZLIB_STREAM_INFLATE
		*(*int32)(unsafe.Pointer(bp + 32 /* format */)) = TCL_ZLIB_FORMAT_ZLIB
		break
	case uint32(4) /* FMT_GZIP */ :
		desc = uintptr(unsafe.Pointer(&gzipOpts))
		mode = TCL_ZLIB_STREAM_DEFLATE
		*(*int32)(unsafe.Pointer(bp + 32 /* format */)) = TCL_ZLIB_FORMAT_GZIP
		break
	case uint32(3) /* FMT_GUNZIP */ :
		desc = uintptr(unsafe.Pointer(&gunzipOpts))
		mode = TCL_ZLIB_STREAM_INFLATE
		*(*int32)(unsafe.Pointer(bp + 32 /* format */)) = TCL_ZLIB_FORMAT_GZIP
		break
	default:
		XTcl_Panic(tls, ts+73195, 0)
	}

	// Parse the options.

	for i = 3; i < objc; i = i + 2 {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), desc,
			int32(unsafe.Sizeof(struct {
				Fname        uintptr
				Foffset      int32
				F__ccgo_pad1 [4]byte
			}{})), ts+10473, 0, bp+36) != TCL_OK {
			return TCL_ERROR
		}
		*(*uintptr)(unsafe.Pointer(bp + 40 + uintptr((*struct {
			Fname        uintptr
			Foffset      int32
			F__ccgo_pad1 [4]byte
		})(unsafe.Pointer(desc+uintptr(*(*int32)(unsafe.Pointer(bp + 36)))*16)).Foffset)*8)) = *(*uintptr)(unsafe.Pointer(objv + uintptr(i+1)*8))
	}

	// If a compression level was given, parse it (integral: 0..9). Otherwise
	// use the default.

	if *(*uintptr)(unsafe.Pointer(bp + 40 + 2*8)) == uintptr(0) {
		*(*int32)(unsafe.Pointer(bp + 64 /* level */)) = -1
	} else if XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 40 + 2*8)), bp+64) != TCL_OK {
		return TCL_ERROR
	} else if *(*int32)(unsafe.Pointer(bp + 64)) < 0 || *(*int32)(unsafe.Pointer(bp + 64)) > 9 {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, ts+73005, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+7444, ts+73026, uintptr(0)))
		XTcl_AddErrorInfo(tls, interp, ts+72900)
		return TCL_ERROR
	}

	// Construct the stream now we know its configuration.

	if XTcl_ZlibStreamInit(tls, interp, mode, *(*int32)(unsafe.Pointer(bp + 32)), *(*int32)(unsafe.Pointer(bp + 64)), *(*uintptr)(unsafe.Pointer(bp + 40 + 1*8)),
		bp+72) != TCL_OK {
		return TCL_ERROR
	}
	if *(*uintptr)(unsafe.Pointer(bp + 40)) != uintptr(0) {
		XTcl_ZlibStreamSetCompressionDictionary(tls, *(*Tcl_ZlibStream)(unsafe.Pointer(bp + 72 /* zh */)), *(*uintptr)(unsafe.Pointer(bp + 40)))
	}
	XTcl_SetObjResult(tls, interp, XTcl_ZlibStreamGetCommandName(tls, *(*Tcl_ZlibStream)(unsafe.Pointer(bp + 72 /* zh */))))
	return TCL_OK
}

var stream_formats = [7]uintptr{
	ts + 73091, ts + 73106, ts + 73117, ts + 73125, ts + 73132, ts + 73137,
	uintptr(0),
} /* tclZlib.c:2195:23 */
var compressionOpts = [3]struct {
	Fname        uintptr
	Foffset      int32
	F__ccgo_pad1 [4]byte
}{
	{Fname: ts + 15496 /* "-dictionary" */},
	{Fname: ts + 27933 /* "-level" */, Foffset: 2 /* OPT_COMPRESSION_LEVEL */},
	{Foffset: -1 /* OPT_END */},
} /* tclZlib.c:2218:32 */
var gzipOpts = [3]struct {
	Fname        uintptr
	Foffset      int32
	F__ccgo_pad1 [4]byte
}{
	{Fname: ts + 73152 /* "-header" */, Foffset: 1 /* OPT_GZIP_HEADER */},
	{Fname: ts + 27933 /* "-level" */, Foffset: 2 /* OPT_COMPRESSION_LEVEL */},
	{Foffset: -1 /* OPT_END */},
} /* tclZlib.c:2223:32 */
var expansionOpts = [2]struct {
	Fname        uintptr
	Foffset      int32
	F__ccgo_pad1 [4]byte
}{
	{Fname: ts + 15496 /* "-dictionary" */},
	{Foffset: -1 /* OPT_END */},
} /* tclZlib.c:2228:32 */
var gunzipOpts = [1]struct {
	Fname        uintptr
	Foffset      int32
	F__ccgo_pad1 [4]byte
}{
	{Foffset: -1 /* OPT_END */},
} /* tclZlib.c:2232:32 */

//----------------------------------------------------------------------
//
// ZlibPushSubcmd --
//
//	Implementation of the [zlib push] subcommand.
//
//----------------------------------------------------------------------

func sZlibPushSubcmd(tls *libc.TLS, interp uintptr, objc int32, objv uintptr) int32 { /* tclZlib.c:2344:1: */
	bp := tls.Alloc(244)
	defer tls.Free(244)

	// var chan1 Tcl_Channel at bp+216, 8

	// var chanMode int32 at bp+224, 4

	// var format int32 at bp+208, 4

	var mode int32
	// var level int32 at bp+236, 4

	var i int32
	// var option int32 at bp+228, 4

	var pushOptions uintptr
	var headerObj uintptr
	var compDictObj uintptr
	// var limit int32 at bp+240, 4

	// var dummy int32 at bp+232, 4
	mode = 0
	pushOptions = uintptr(unsafe.Pointer(&pushDecompressOptions))
	headerObj = uintptr(0)
	compDictObj = uintptr(0)
	*(*int32)(unsafe.Pointer(bp + 240 /* limit */)) = DEFAULT_BUFFER_SIZE

	if !(objc < 4) {
		goto __1
	}
	XTcl_WrongNumArgs(tls, interp, 2, objv, ts+73217)
	return TCL_ERROR
__1:
	;

	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), uintptr(unsafe.Pointer(&stream_formats1)), int32(unsafe.Sizeof(uintptr(0))), ts+13412, 0, bp+208) != TCL_OK) {
		goto __2
	}
	return TCL_ERROR
__2:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 208 /* format */))) {
	case uint32(2) /* FMT_DEFLATE */ :
		goto __4
	case uint32(5) /* FMT_INFLATE */ :
		goto __5
	case uint32(0) /* FMT_COMPRESS */ :
		goto __6
	case uint32(1) /* FMT_DECOMPRESS */ :
		goto __7
	case uint32(4) /* FMT_GZIP */ :
		goto __8
	case uint32(3) /* FMT_GUNZIP */ :
		goto __9
	default:
		goto __10
	}
	goto __3
__4:
	mode = TCL_ZLIB_STREAM_DEFLATE
	*(*int32)(unsafe.Pointer(bp + 208 /* format */)) = TCL_ZLIB_FORMAT_RAW
	pushOptions = uintptr(unsafe.Pointer(&pushCompressOptions))
	goto __3
__5:
	mode = TCL_ZLIB_STREAM_INFLATE
	*(*int32)(unsafe.Pointer(bp + 208 /* format */)) = TCL_ZLIB_FORMAT_RAW
	goto __3
__6:
	mode = TCL_ZLIB_STREAM_DEFLATE
	*(*int32)(unsafe.Pointer(bp + 208 /* format */)) = TCL_ZLIB_FORMAT_ZLIB
	pushOptions = uintptr(unsafe.Pointer(&pushCompressOptions))
	goto __3
__7:
	mode = TCL_ZLIB_STREAM_INFLATE
	*(*int32)(unsafe.Pointer(bp + 208 /* format */)) = TCL_ZLIB_FORMAT_ZLIB
	goto __3
__8:
	mode = TCL_ZLIB_STREAM_DEFLATE
	*(*int32)(unsafe.Pointer(bp + 208 /* format */)) = TCL_ZLIB_FORMAT_GZIP
	pushOptions = uintptr(unsafe.Pointer(&pushCompressOptions))
	goto __3
__9:
	mode = TCL_ZLIB_STREAM_INFLATE
	*(*int32)(unsafe.Pointer(bp + 208 /* format */)) = TCL_ZLIB_FORMAT_GZIP
	goto __3
__10:
	XTcl_Panic(tls, ts+73195, 0)
__3:
	;

	if !(XTclGetChannelFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)), bp+216, bp+224, 0) != TCL_OK) {
		goto __11
	}
	return TCL_ERROR
__11:
	;

	// Sanity checks.

	if !(mode == TCL_ZLIB_STREAM_DEFLATE && !(*(*int32)(unsafe.Pointer(bp + 224))&(int32(1)<<2) != 0)) {
		goto __12
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+73243, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+72565, ts+73296, uintptr(0)))
	return TCL_ERROR
__12:
	;
	if !(mode == TCL_ZLIB_STREAM_INFLATE && !(*(*int32)(unsafe.Pointer(bp + 224))&(int32(1)<<1) != 0)) {
		goto __13
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+73307, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+72565, ts+73362, uintptr(0)))
	return TCL_ERROR
__13:
	;

	// Parse options.

	*(*int32)(unsafe.Pointer(bp + 236 /* level */)) = -1
	i = 4
__14:
	if !(i < objc) {
		goto __16
	}
	if !(XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), pushOptions, int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+228) != TCL_OK) {
		goto __17
	}
	return TCL_ERROR
__17:
	;
	if !(libc.PreIncInt32(&i, 1) > objc-1) {
		goto __18
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+73373, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(pushOptions + uintptr(*(*int32)(unsafe.Pointer(bp + 228 /* option */)))*8)))))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+72565, ts+73401, uintptr(0)))
	return TCL_ERROR
__18:
	;
	switch uint32(*(*int32)(unsafe.Pointer(bp + 228 /* option */))) {
	case uint32(1) /* poHeader */ :
		goto __20
	case uint32(2) /* poLevel */ :
		goto __21
	case uint32(3) /* poLimit */ :
		goto __22
	case uint32(0) /* poDictionary */ :
		goto __23
	}
	goto __19
__20:
	headerObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	if !(XTcl_DictObjSize(tls, interp, headerObj, bp+232) != TCL_OK) {
		goto __24
	}
	goto genericOptionError
__24:
	;
	goto __19
__21:
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+236) != TCL_OK) {
		goto __25
	}
	goto genericOptionError
__25:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 236)) < 0 || *(*int32)(unsafe.Pointer(bp + 236)) > 9) {
		goto __26
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
		ts+73005, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+4178, ts+7444, ts+73026,
		uintptr(0)))
	goto genericOptionError
__26:
	;
	goto __19
__22:
	if !(XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+240) != TCL_OK) {
		goto __27
	}
	goto genericOptionError
__27:
	;
	if !(*(*int32)(unsafe.Pointer(bp + 240)) < 1 || *(*int32)(unsafe.Pointer(bp + 240)) > MAX_BUFFER_SIZE) {
		goto __28
	}
	XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
		ts+73407,
		libc.VaList(bp+136, MAX_BUFFER_SIZE)))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+144, ts+4178, ts+7444, ts+73072, uintptr(0)))
	goto genericOptionError
__28:
	;
	goto __19
__23:
	if !(*(*int32)(unsafe.Pointer(bp + 208)) == TCL_ZLIB_FORMAT_GZIP) {
		goto __29
	}
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

		ts+73440, -1))
	XTcl_SetErrorCode(tls, interp, libc.VaList(bp+176, ts+4178, ts+72565, ts+73499, uintptr(0)))
	goto genericOptionError
__29:
	;
	compDictObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))
	goto __19
__19:
	;
	goto __15
__15:
	i++
	goto __14
	goto __16
__16:
	;

	if !(sZlibStackChannelTransform(tls, interp, mode, *(*int32)(unsafe.Pointer(bp + 208)), *(*int32)(unsafe.Pointer(bp + 236)), *(*int32)(unsafe.Pointer(bp + 240)), *(*Tcl_Channel)(unsafe.Pointer(bp + 216)),
		headerObj, compDictObj) == uintptr(0)) {
		goto __30
	}
	return TCL_ERROR
__30:
	;
	XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 3*8)))
	return TCL_OK

genericOptionError:
	XTcl_AddErrorInfo(tls, interp, ts+73506)
	XTcl_AddErrorInfo(tls, interp, *(*uintptr)(unsafe.Pointer(pushOptions + uintptr(*(*int32)(unsafe.Pointer(bp + 228 /* option */)))*8)))
	XTcl_AddErrorInfo(tls, interp, ts+73516)
	return TCL_ERROR
}

var stream_formats1 = [7]uintptr{
	ts + 73091, ts + 73106, ts + 73117, ts + 73125, ts + 73132, ts + 73137,
	uintptr(0),
} /* tclZlib.c:2349:23 */
var pushCompressOptions = [4]uintptr{
	ts + 15496, ts + 73152, ts + 27933, uintptr(0),
} /* tclZlib.c:2359:23 */
var pushDecompressOptions = [5]uintptr{
	ts + 15496, ts + 73152, ts + 27933, ts + 73525, uintptr(0),
} /* tclZlib.c:2362:23 */

//----------------------------------------------------------------------
//
// ZlibStreamCmd --
//
//	Implementation of the commands returned by [zlib stream].
//
//----------------------------------------------------------------------

func sZlibStreamCmd(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclZlib.c:2517:1: */
	bp := tls.Alloc(8)
	defer tls.Free(8)

	var zstream Tcl_ZlibStream = cd
	// var command int32 at bp, 4

	// var count int32 at bp+4, 4

	var code int32
	var obj uintptr

	if objc < 2 {
		XTcl_WrongNumArgs(tls, interp, 1, objv, ts+73532)
		return TCL_ERROR
	}

	if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 1*8)), uintptr(unsafe.Pointer(&cmds)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp) != TCL_OK {
		return TCL_ERROR
	}

	switch uint32(*(*int32)(unsafe.Pointer(bp /* command */))) {
	case uint32(0) /* zs_add */ : // $strm add ?$flushopt? $data
		return sZlibStreamAddCmd(tls, zstream, interp, objc, objv)
	case uint32(8) /* zs_header */ : // $strm header
		return sZlibStreamHeaderCmd(tls, zstream, interp, objc, objv)
	case uint32(9) /* zs_put */ : // $strm put ?$flushopt? $data
		return sZlibStreamPutCmd(tls, zstream, interp, objc, objv)

	case uint32(7) /* zs_get */ : // $strm get ?count?
		if objc > 3 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, ts+73550)
			return TCL_ERROR
		}

		*(*int32)(unsafe.Pointer(bp + 4 /* count */)) = -1
		if objc >= 3 {
			if XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + 2*8)), bp+4) != TCL_OK {
				return TCL_ERROR
			}
		}
		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			obj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr = uintptr(0)
		{
		}

		code = XTcl_ZlibStreamGet(tls, zstream, obj, *(*int32)(unsafe.Pointer(bp + 4 /* count */)))
		if code == TCL_OK {
			XTcl_SetObjResult(tls, interp, obj)
		} else {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = -1
					for ok1 := true; ok1; ok1 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer(obj + 32)) = XtclFreeObjList
						XtclFreeObjList = obj
					}
				} else {
					XTclFreeObj(tls, obj)
				}
			}

		}
		return code
	case uint32(5) /* zs_flush */ : // $strm flush
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		for ok2 := true; ok2; ok2 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			obj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr = uintptr(0)
		{
		}

		(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount++
		code = XTcl_ZlibStreamPut(tls, zstream, obj, Z_SYNC_FLUSH)
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = -1
				for ok3 := true; ok3; ok3 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(obj + 32)) = XtclFreeObjList
					XtclFreeObjList = obj
				}
			} else {
				XTclFreeObj(tls, obj)
			}
		}

		return code
	case uint32(6) /* zs_fullflush */ : // $strm fullflush
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		for ok4 := true; ok4; ok4 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			obj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr = uintptr(0)
		{
		}

		(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount++
		code = XTcl_ZlibStreamPut(tls, zstream, obj, Z_FULL_FLUSH)
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = -1
				for ok5 := true; ok5; ok5 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(obj + 32)) = XtclFreeObjList
					XtclFreeObjList = obj
				}
			} else {
				XTclFreeObj(tls, obj)
			}
		}

		return code
	case uint32(4) /* zs_finalize */ : // $strm finalize
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}

		// The flush commands slightly abuse the empty result obj as input
		// data.

		for ok6 := true; ok6; ok6 = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			obj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr = uintptr(0)
		{
		}

		(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount++
		code = XTcl_ZlibStreamPut(tls, zstream, obj, Z_FINISH)
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = -1
				for ok7 := true; ok7; ok7 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(obj + 32)) = XtclFreeObjList
					XtclFreeObjList = obj
				}
			} else {
				XTclFreeObj(tls, obj)
			}
		}

		return code
	case uint32(2) /* zs_close */ : // $strm close
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		return XTcl_ZlibStreamClose(tls, zstream)
	case uint32(3) /* zs_eof */ : // $strm eof
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		XTcl_SetObjResult(tls, interp, XTcl_NewIntObj(tls, XTcl_ZlibStreamEof(tls, zstream)))
		return TCL_OK
	case uint32(1) /* zs_checksum */ : // $strm checksum
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		XTcl_SetObjResult(tls, interp, XTcl_NewWideIntObj(tls, Tcl_WideInt(ULong(XTcl_ZlibStreamChecksum(tls, zstream)))))
		return TCL_OK
	case uint32(10) /* zs_reset */ : // $strm reset
		if objc != 2 {
			XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
			return TCL_ERROR
		}
		return XTcl_ZlibStreamReset(tls, zstream)
	}

	return TCL_OK
}

var cmds = [12]uintptr{
	ts + 2662, ts + 73558, ts + 5967, ts + 5973, ts + 36497, ts + 6023,
	ts + 73567, ts + 22680, ts + 73577, ts + 73584, ts + 73588,
	uintptr(0),
} /* tclZlib.c:2526:23 */

func sZlibStreamAddCmd(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclZlib.c:2643:1: */
	bp := tls.Alloc(148)
	defer tls.Free(148)

	var zstream Tcl_ZlibStream = cd
	// var index int32 at bp+136, 4

	var code int32
	*(*int32)(unsafe.Pointer(bp + 140 /* buffersize */)) = -1
	var flush int32 = -1
	var i int32
	var obj uintptr
	var compDictObj uintptr = uintptr(0)

	for i = 2; i < objc-1; i++ {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&add_options)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+136) != TCL_OK {
			return TCL_ERROR
		}

		switch uint32(*(*int32)(unsafe.Pointer(bp + 136 /* index */))) {
		case uint32(3) /* ao_flush */ : // -flush
			if flush >= 0 {
				flush = -2
			} else {
				flush = Z_SYNC_FLUSH
			}
			break
		case uint32(4) /* ao_fullflush */ : // -fullflush
			if flush >= 0 {
				flush = -2
			} else {
				flush = Z_FULL_FLUSH
			}
			break
		case uint32(2) /* ao_finalize */ : // -finalize
			if flush >= 0 {
				flush = -2
			} else {
				flush = Z_FINISH
			}
			break
		case uint32(0) /* ao_buffer */ : // -buffer
			if i == objc-2 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

					ts+73594, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+72565, ts+73401, uintptr(0)))
				return TCL_ERROR
			}
			if XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PreIncInt32(&i, 1))*8)), bp+140) != TCL_OK {
				return TCL_ERROR
			}
			if *(*int32)(unsafe.Pointer(bp + 140)) < 1 || *(*int32)(unsafe.Pointer(bp + 140)) > MAX_BUFFER_SIZE {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+73664,
					libc.VaList(bp+32, MAX_BUFFER_SIZE)))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7444, ts+73072, uintptr(0)))
				return TCL_ERROR
			}
			break
		case uint32(1) /* ao_dictionary */ :
			if i == objc-2 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

					ts+73692, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+72, ts+4178, ts+72565, ts+73401, uintptr(0)))
				return TCL_ERROR
			}
			compDictObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PreIncInt32(&i, 1))*8))
			break
		}

		if flush == -2 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

				ts+73762, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+104, ts+4178, ts+72565, ts+73832, uintptr(0)))
			return TCL_ERROR
		}
	}
	if flush == -1 {
		flush = 0
	}

	// Set the compression dictionary if requested.

	if compDictObj != uintptr(0) {
		// var len int32 at bp+144, 4

		XTcl_GetByteArrayFromObj(tls, compDictObj, bp+144)
		if *(*int32)(unsafe.Pointer(bp + 144)) == 0 {
			compDictObj = uintptr(0)
		}
		XTcl_ZlibStreamSetCompressionDictionary(tls, zstream, compDictObj)
	}

	// Send the data to the stream core, along with any flushing directive.

	if XTcl_ZlibStreamPut(tls, zstream, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), flush) != TCL_OK {
		return TCL_ERROR
	}

	// Get such data out as we can (up to the requested length).

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		obj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr = uintptr(0)
	{
	}

	code = XTcl_ZlibStreamGet(tls, zstream, obj, *(*int32)(unsafe.Pointer(bp + 140 /* buffersize */)))
	if code == TCL_OK {
		XTcl_SetObjResult(tls, interp, obj)
	} else {
		if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(obj)).FrefCount, 1) > 1 {
		} else {
			if !(int32((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(obj)).FtypePtr)).FfreeIntRepProc) != 0) {
				{
				}
				if (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes != XtclEmptyStringRep {
					XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer(obj)).Fbytes)
				}
				(*Tcl_Obj)(unsafe.Pointer(obj)).Flength = -1
				for ok1 := true; ok1; ok1 = 0 != 0 {
					*(*uintptr)(unsafe.Pointer(obj + 32)) = XtclFreeObjList
					XtclFreeObjList = obj
				}
			} else {
				XTclFreeObj(tls, obj)
			}
		}

	}
	return code
}

var add_options = [6]uintptr{
	ts + 73842, ts + 15496, ts + 73850, ts + 73860, ts + 73867, uintptr(0),
} /* tclZlib.c:2652:23 */

func sZlibStreamPutCmd(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclZlib.c:2767:1: */
	bp := tls.Alloc(72)
	defer tls.Free(72)

	var zstream Tcl_ZlibStream = cd
	// var index int32 at bp+64, 4

	var flush int32 = -1
	var i int32
	var compDictObj uintptr = uintptr(0)

	for i = 2; i < objc-1; i++ {
		if XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), uintptr(unsafe.Pointer(&put_options)), int32(unsafe.Sizeof(uintptr(0))), ts+10473, 0, bp+64) != TCL_OK {
			return TCL_ERROR
		}

		switch uint32(*(*int32)(unsafe.Pointer(bp + 64 /* index */))) {
		case uint32(2) /* po_flush */ : // -flush
			if flush >= 0 {
				flush = -2
			} else {
				flush = Z_SYNC_FLUSH
			}
			break
		case uint32(3) /* po_fullflush */ : // -fullflush
			if flush >= 0 {
				flush = -2
			} else {
				flush = Z_FULL_FLUSH
			}
			break
		case uint32(1) /* po_finalize */ : // -finalize
			if flush >= 0 {
				flush = -2
			} else {
				flush = Z_FINISH
			}
			break
		case uint32(0) /* po_dictionary */ :
			if i == objc-2 {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

					ts+73692, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+72565, ts+73401, uintptr(0)))
				return TCL_ERROR
			}
			compDictObj = *(*uintptr)(unsafe.Pointer(objv + uintptr(libc.PreIncInt32(&i, 1))*8))
			break
		}
		if flush == -2 {
			XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,

				ts+73762, -1))
			XTcl_SetErrorCode(tls, interp, libc.VaList(bp+32, ts+4178, ts+72565, ts+73832, uintptr(0)))
			return TCL_ERROR
		}
	}
	if flush == -1 {
		flush = 0
	}

	// Set the compression dictionary if requested.

	if compDictObj != uintptr(0) {
		// var len int32 at bp+68, 4

		XTcl_GetByteArrayFromObj(tls, compDictObj, bp+68)
		if *(*int32)(unsafe.Pointer(bp + 68)) == 0 {
			compDictObj = uintptr(0)
		}
		XTcl_ZlibStreamSetCompressionDictionary(tls, zstream, compDictObj)
	}

	// Send the data to the stream core, along with any flushing directive.

	return XTcl_ZlibStreamPut(tls, zstream, *(*uintptr)(unsafe.Pointer(objv + uintptr(objc-1)*8)), flush)
}

var put_options = [5]uintptr{
	ts + 15496, ts + 73850, ts + 73860, ts + 73867, uintptr(0),
} /* tclZlib.c:2776:23 */

func sZlibStreamHeaderCmd(tls *libc.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* tclZlib.c:2856:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	var zshPtr uintptr = cd
	var resultObj uintptr

	if objc != 2 {
		XTcl_WrongNumArgs(tls, interp, 2, objv, uintptr(0))
		return TCL_ERROR
	} else if (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fmode != TCL_ZLIB_STREAM_INFLATE ||
		(*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).Fformat != TCL_ZLIB_FORMAT_GZIP {
		XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
			ts+73878, -1))
		XTcl_SetErrorCode(tls, interp, libc.VaList(bp, ts+4178, ts+72565, ts+73929, uintptr(0)))
		return TCL_ERROR
	}

	for ok := true; ok; ok = 0 != 0 {
		if XtclFreeObjList == uintptr(0) {
			XTclAllocateFreeObjects(tls)
		}
		resultObj = XtclFreeObjList
		XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
	}
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FrefCount = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Fbytes = XtclEmptyStringRep
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).Flength = 0
	(*Tcl_Obj)(unsafe.Pointer(resultObj)).FtypePtr = uintptr(0)
	{
	}

	sExtractHeader(tls, (*ZlibStreamHandle)(unsafe.Pointer(zshPtr)).FgzHeaderPtr, resultObj)
	XTcl_SetObjResult(tls, interp, resultObj)
	return TCL_OK
}

//----------------------------------------------------------------------
//	Set of functions to support channel stacking.
//----------------------------------------------------------------------
//
// ZlibTransformClose --
//
//	How to shut down a stacked compressing/decompressing transform.
//
//----------------------------------------------------------------------

func sZlibTransformClose(tls *libc.TLS, instanceData ClientData, interp uintptr) int32 { /* tclZlib.c:2895:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var cd uintptr = instanceData
	var e int32
	// var written int32 at bp+8, 4

	var result int32 = TCL_OK

	// Delete the support timer.

	sZlibTransformEventTimerKill(tls, cd)

	// Flush any data waiting to be compressed.

	if (*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
		(*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Favail_in = UInt(0)
		for ok := true; ok; ok = e != Z_STREAM_END {
			e = sDeflate(tls, cd+120, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutAllocated,
				Z_FINISH, bp+8)

			// Can't be sure that deflate() won't declare the buffer to be
			// full (with Z_BUF_ERROR) so handle that case.

			if e == -5 {
				e = Z_OK
				*(*int32)(unsafe.Pointer(bp + 8 /* written */)) = (*ZlibChannelData)(unsafe.Pointer(cd)).FoutAllocated
			}
			if e != Z_OK && e != Z_STREAM_END {
				// TODO: is this the right way to do errors on close?
				if !(XTclInThreadExit(tls) != 0) {
					sConvertError(tls, interp, e, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Fadler)
				}
				result = TCL_ERROR
				break
			}
			if *(*int32)(unsafe.Pointer(bp + 8)) != 0 && XTcl_WriteRaw(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer, *(*int32)(unsafe.Pointer(bp + 8))) < 0 {
				// TODO: is this the right way to do errors on close?
				// Note: when close is called from FinalizeIOSubsystem then
				// interp may be NULL
				if !(XTclInThreadExit(tls) != 0) && interp != 0 {
					XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
						ts+73935,
						libc.VaList(bp, XTcl_PosixError(tls, interp))))
				}
				result = TCL_ERROR
				break
			}
		}
		z.XdeflateEnd(tls, cd+120)
	} else {
		// If we have unused bytes from the read input (overshot by
		// Z_STREAM_END or on possible error), unget them back to the parent
		// channel, so that they appear as not being read yet.
		if (*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_in != 0 {
			XTcl_Ungets(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent, (*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Fnext_in, int32((*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_in), 0)
		}

		z.XinflateEnd(tls, cd+32)
	}

	// Release all memory.

	if (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj != 0 {
		for ok1 := true; ok1; ok1 = 0 != 0 {
			var _objPtr uintptr = (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
				XTclFreeObj(tls, _objPtr)
			}
		}
		(*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj = uintptr(0)
	}

	if (*ZlibChannelData)(unsafe.Pointer(cd)).FinBuffer != 0 {
		XTclpFree(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FinBuffer)
		(*ZlibChannelData)(unsafe.Pointer(cd)).FinBuffer = uintptr(0)
	}
	if (*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer != 0 {
		XTclpFree(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer)
		(*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer = uintptr(0)
	}
	XTclpFree(tls, cd)
	return result
}

//----------------------------------------------------------------------
//
// ZlibTransformInput --
//
//	Reader filter that does decompression.
//
//----------------------------------------------------------------------

func sZlibTransformInput(tls *libc.TLS, instanceData ClientData, buf uintptr, toRead int32, errorCodePtr uintptr) int32 { /* tclZlib.c:2994:1: */
	var cd uintptr
	var inProc uintptr
	var readBytes int32
	var gotBytes int32
	var n int32
	var decBytes int32
	cd = instanceData
	inProc =
		XTcl_ChannelInputProc(tls, XTcl_GetChannelType(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent))

	if !((*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_DEFLATE) {
		goto __1
	}
	return (*struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{inProc})).f(tls, XTcl_GetChannelInstanceData(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent), buf, toRead,
		errorCodePtr)
__1:
	;

	gotBytes = 0
	readBytes = int32((*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_in) // how many bytes in buffer now
__2:
	if !(!((*ZlibChannelData)(unsafe.Pointer(cd)).Fflags&STREAM_DONE != 0) && toRead > 0) {
		goto __3
	}

	// if starting from scratch or continuation after full decompression
	if !!(int32((*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_in) != 0) {
		goto __4
	}
	// buffer to start, we can read to whole available buffer
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Fnext_in = (*ZlibChannelData)(unsafe.Pointer(cd)).FinBuffer
__4:
	;
	// If done - no read needed anymore, check we have to copy rest of
	// decompressed data, otherwise return with size (or 0 for Eof)
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).Fflags&STREAM_DECOMPRESS != 0) {
		goto __5
	}
	goto copyDecompressed
__5:
	;
	// The buffer is exhausted, but the caller wants even more. We now
	// have to go to the underlying channel, get more bytes and then
	// transform them for delivery. We may not get what we want (full EOF
	// or temporarily out of data).

	// Check free buffer size and adjust size of next chunk to read.
	n = int32(int64((*ZlibChannelData)(unsafe.Pointer(cd)).FinAllocated) - (int64((*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Fnext_in)-int64((*ZlibChannelData)(unsafe.Pointer(cd)).FinBuffer))/1)
	if !(n <= 0) {
		goto __6
	}
	// Normally unreachable: not enough input buffer to uncompress.
	// Todo: firstly try to realloc inBuffer upto MAX_BUFFER_SIZE.
	*(*int32)(unsafe.Pointer(errorCodePtr)) = ENOBUFS
	return -1
__6:
	;
	if !(n > (*ZlibChannelData)(unsafe.Pointer(cd)).FreadAheadLimit) {
		goto __7
	}
	n = (*ZlibChannelData)(unsafe.Pointer(cd)).FreadAheadLimit
__7:
	;
	readBytes = XTcl_ReadRaw(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent, (*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Fnext_in, n)

	// Three cases here:
	//  1.	Got some data from the underlying channel (readBytes > 0) so
	//	it should be fed through the decompression engine.
	//  2.	Got an error (readBytes < 0) which we should report up except
	//	for the case where we can convert it to a short read.
	//  3.	Got an end-of-data from EOF or blocking (readBytes == 0). If
	//	it is EOF, try flushing the data out of the decompressor.

	if !(readBytes < 0) {
		goto __8
	}

	// See ReflectInput() in tclIORTrans.c
	if !(XTcl_InputBlocked(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent) != 0 && gotBytes > 0) {
		goto __9
	}
	goto __3
__9:
	;

	*(*int32)(unsafe.Pointer(errorCodePtr)) = XTcl_GetErrno(tls)
	return -1
__8:
	;

	// more bytes (or Eof if readBytes == 0)
	*(*UInt)(unsafe.Pointer(cd + 32 + 8)) += UInt(readBytes)

copyDecompressed:

	// Transform the read chunk, if not empty. Anything we get
	// back is a transformation result to be put into our buffers, and
	// the next iteration will put it into the result.
	// For the case readBytes is 0 which signaling Eof in parent, the
	// partial data waiting is converted and returned.

	decBytes = sResultDecompress(tls, cd, buf, toRead,
		func() int32 {
			if readBytes != 0 {
				return Z_NO_FLUSH
			}
			return Z_SYNC_FLUSH
		}(),
		errorCodePtr)
	if !(decBytes == -1) {
		goto __10
	}
	return -1
__10:
	;
	gotBytes = gotBytes + decBytes
	buf += uintptr(decBytes)
	toRead = toRead - decBytes

	if !(decBytes == 0 || (*ZlibChannelData)(unsafe.Pointer(cd)).Fflags&STREAM_DECOMPRESS != 0) {
		goto __11
	}
	// The drain delivered nothing (or buffer too small to decompress).
	// Time to deliver what we've got.
	if !(!(gotBytes != 0) && !((*ZlibChannelData)(unsafe.Pointer(cd)).Fflags&STREAM_DONE != 0)) {
		goto __12
	}
	// if no-data, but not ready - avoid signaling Eof,
	// continue in blocking mode, otherwise EAGAIN
	if !(XTcl_InputBlocked(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent) != 0) {
		goto __13
	}
	goto __2
__13:
	;
	*(*int32)(unsafe.Pointer(errorCodePtr)) = EAGAIN
	return -1
__12:
	;
	goto __3
__11:
	;

	// Loop until the request is satisfied (or no data available from
	// above, possibly EOF).
	goto __2
__3:
	;

	return gotBytes
}

//----------------------------------------------------------------------
//
// ZlibTransformOutput --
//
//	Writer filter that does compression.
//
//----------------------------------------------------------------------

func sZlibTransformOutput(tls *libc.TLS, instanceData ClientData, buf uintptr, toWrite int32, errorCodePtr uintptr) int32 { /* tclZlib.c:3129:1: */
	bp := tls.Alloc(4)
	defer tls.Free(4)

	var cd uintptr = instanceData
	var outProc uintptr = XTcl_ChannelOutputProc(tls, XTcl_GetChannelType(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent))
	var e int32
	// var produced int32 at bp, 4

	var errObj uintptr

	if (*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_INFLATE {
		return (*struct {
			f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{outProc})).f(tls, XTcl_GetChannelInstanceData(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent), buf, toWrite,
			errorCodePtr)
	}

	// No zero-length writes. Flushes must be explicit.

	if toWrite == 0 {
		return 0
	}

	(*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Fnext_in = buf
	(*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Favail_in = UInt(toWrite)
	for (*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Favail_in > UInt(0) {
		e = sDeflate(tls, cd+120, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutAllocated,
			Z_NO_FLUSH, bp)
		if e != Z_OK || *(*int32)(unsafe.Pointer(bp)) == 0 {
			break
		}

		if XTcl_WriteRaw(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer, *(*int32)(unsafe.Pointer(bp))) < 0 {
			*(*int32)(unsafe.Pointer(errorCodePtr)) = XTcl_GetErrno(tls)
			return -1
		}
	}

	if e == Z_OK {
		return int32(UInt(toWrite) - (*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Favail_in)
	}

	errObj = XTcl_NewListObj(tls, 0, uintptr(0))
	XTcl_ListObjAppendElement(tls, uintptr(0), errObj, XTcl_NewStringObj(tls, ts+12571, -1))
	XTcl_ListObjAppendElement(tls, uintptr(0), errObj,
		sConvertErrorToList(tls, e, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Fadler))
	XTcl_ListObjAppendElement(tls, uintptr(0), errObj,
		XTcl_NewStringObj(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Fmsg, -1))
	XTcl_SetChannelError(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent, errObj)
	*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
	return -1
}

//----------------------------------------------------------------------
//
// ZlibTransformFlush --
//
//	How to perform a flush of a compressing transform.
//
//----------------------------------------------------------------------

func sZlibTransformFlush(tls *libc.TLS, interp uintptr, cd uintptr, flushType int32) int32 { /* tclZlib.c:3195:1: */
	bp := tls.Alloc(12)
	defer tls.Free(12)

	var e int32
	// var len int32 at bp+8, 4

	(*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Favail_in = UInt(0)
	for ok := true; ok; ok = *(*int32)(unsafe.Pointer(bp + 8)) > 0 && e == -5 {
		// Get the bytes to go out of the compression engine.

		e = sDeflate(tls, cd+120, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutAllocated,
			flushType, bp+8)
		if e != Z_OK && e != -5 {
			sConvertError(tls, interp, e, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Fadler)
			return TCL_ERROR
		}

		// Write the bytes we've received to the next layer.

		if *(*int32)(unsafe.Pointer(bp + 8)) > 0 && XTcl_WriteRaw(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer, *(*int32)(unsafe.Pointer(bp + 8))) < 0 {
			XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
				ts+73967,
				libc.VaList(bp, XTcl_PosixError(tls, interp))))
			return TCL_ERROR
		}

		// If we get to this point, either we're in the Z_OK or the
		// Z_BUF_ERROR state. In the former case, we're done. In the latter
		// case, it's because there's more bytes to go than would fit in the
		// buffer we provided, and we need to go round again to get some more.
		//
		// We also stop the loop if we would have done a zero-length write.
		// Those can cause problems at the OS level.
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ZlibTransformSetOption --
//
//	Writing side of [fconfigure] on our channel.
//
//----------------------------------------------------------------------

func sZlibTransformSetOption(tls *libc.TLS, instanceData ClientData, interp uintptr, optionName uintptr, value uintptr) int32 { /* tclZlib.c:3250:1: */
	bp := tls.Alloc(76)
	defer tls.Free(76)

	var cd uintptr = instanceData
	var setOptionProc uintptr = XTcl_ChannelSetOptionProc(tls, XTcl_GetChannelType(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent))
	var haveFlushOpt int32 = libc.Bool32((*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_DEFLATE)

	if optionName != 0 && libc.Xstrcmp(tls, optionName, ts+15496) == 0 &&
		(*ZlibChannelData)(unsafe.Pointer(cd)).Fformat != TCL_ZLIB_FORMAT_GZIP {
		var compDictObj uintptr
		var code int32

		for ok := true; ok; ok = 0 != 0 {
			for ok1 := true; ok1; ok1 = 0 != 0 {
				if XtclFreeObjList == uintptr(0) {
					XTclAllocateFreeObjects(tls)
				}
				compDictObj = XtclFreeObjList
				XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
			}
			(*Tcl_Obj)(unsafe.Pointer(compDictObj)).FrefCount = 0
			if libc.Xstrlen(tls, value) == uint64(0) {
				(*Tcl_Obj)(unsafe.Pointer(compDictObj)).Fbytes = XtclEmptyStringRep
				(*Tcl_Obj)(unsafe.Pointer(compDictObj)).Flength = 0
			} else {
				(*Tcl_Obj)(unsafe.Pointer(compDictObj)).Fbytes = XTcl_Alloc(tls, uint32(libc.Xstrlen(tls, value)+uint64(1)))
				libc.Xmemcpy(tls, (*Tcl_Obj)(unsafe.Pointer(compDictObj)).Fbytes, value, libc.Xstrlen(tls, value))
				*(*int8)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(compDictObj)).Fbytes + uintptr(libc.Xstrlen(tls, value)))) = int8(0)
				(*Tcl_Obj)(unsafe.Pointer(compDictObj)).Flength = int32(libc.Xstrlen(tls, value))
			}
			(*Tcl_Obj)(unsafe.Pointer(compDictObj)).FtypePtr = uintptr(0)
			{
			}
		}
		(*Tcl_Obj)(unsafe.Pointer(compDictObj)).FrefCount++
		XTcl_GetByteArrayFromObj(tls, compDictObj, uintptr(0))
		if (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj != 0 {
			if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)).FrefCount, 1) > 1 {
			} else {
				if !(int32((*Tcl_Obj)(unsafe.Pointer((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)).FtypePtr) != 0) || !(int32((*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)).FtypePtr)).FfreeIntRepProc) != 0) {
					{
					}
					if (*Tcl_Obj)(unsafe.Pointer((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)).Fbytes != 0 && (*Tcl_Obj)(unsafe.Pointer((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)).Fbytes != XtclEmptyStringRep {
						XTclpFree(tls, (*Tcl_Obj)(unsafe.Pointer((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)).Fbytes)
					}
					(*Tcl_Obj)(unsafe.Pointer((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)).Flength = -1
					for ok2 := true; ok2; ok2 = 0 != 0 {
						*(*uintptr)(unsafe.Pointer((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj + 32)) = XtclFreeObjList
						XtclFreeObjList = (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj
					}
				} else {
					XTclFreeObj(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)
				}
			}

		}
		(*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj = compDictObj
		code = Z_OK
		if (*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
			code = sSetDeflateDictionary(tls, cd+120, compDictObj)
			if code != Z_OK {
				sConvertError(tls, interp, code, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Fadler)
				return TCL_ERROR
			}
		} else if (*ZlibChannelData)(unsafe.Pointer(cd)).Fformat == TCL_ZLIB_FORMAT_RAW {
			code = sSetInflateDictionary(tls, cd+32, compDictObj)
			if code != Z_OK {
				sConvertError(tls, interp, code, (*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Fadler)
				return TCL_ERROR
			}
		}
		return TCL_OK
	}

	if haveFlushOpt != 0 {
		if optionName != 0 && libc.Xstrcmp(tls, optionName, ts+73860) == 0 {
			var flushType int32

			if int32(*(*int8)(unsafe.Pointer(value))) == 'f' && libc.Xstrcmp(tls, value, ts+34197) == 0 {
				flushType = Z_FULL_FLUSH
			} else if int32(*(*int8)(unsafe.Pointer(value))) == 's' && libc.Xstrcmp(tls, value, ts+73996) == 0 {
				flushType = Z_SYNC_FLUSH
			} else {
				XTcl_SetObjResult(tls, interp, XTcl_ObjPrintf(tls,
					ts+74001,
					libc.VaList(bp, value)))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+8, ts+4178, ts+7444, ts+74048, uintptr(0)))
				return TCL_ERROR
			}

			// Try to actually do the flush now.

			return sZlibTransformFlush(tls, interp, cd, flushType)
		}
	} else {
		if optionName != 0 && libc.Xstrcmp(tls, optionName, ts+73525) == 0 {
			// var newLimit int32 at bp+72, 4

			if XTcl_GetInt(tls, interp, value, bp+72) != TCL_OK {
				return TCL_ERROR
			} else if *(*int32)(unsafe.Pointer(bp + 72)) < 1 || *(*int32)(unsafe.Pointer(bp + 72)) > MAX_BUFFER_SIZE {
				XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls,
					ts+74054, -1))
				XTcl_SetErrorCode(tls, interp, libc.VaList(bp+40, ts+4178, ts+7444, ts+74089, uintptr(0)))
				return TCL_ERROR
			}
		}
	}

	if setOptionProc == uintptr(0) {
		if (*ZlibChannelData)(unsafe.Pointer(cd)).Fformat == TCL_ZLIB_FORMAT_GZIP {
			return XTcl_BadChannelOption(tls, interp, optionName,
				func() uintptr {
					if (*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
						return gzipChanOptions
					}
					return gunzipChanOptions
				}())
		} else {
			return XTcl_BadChannelOption(tls, interp, optionName,
				func() uintptr {
					if (*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
						return compressChanOptions
					}
					return decompressChanOptions
				}())
		}
	}

	// Pass all unknown options down, to deeper transforms and/or the base
	// channel.

	return (*struct {
		f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32
	})(unsafe.Pointer(&struct{ uintptr }{setOptionProc})).f(tls, XTcl_GetChannelInstanceData(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent), interp,
		optionName, value)
}

var compressChanOptions uintptr = ts + 74099   /* "dictionary flush" */ /* tclZlib.c:3259:23 */
var gzipChanOptions uintptr = ts + 6023        /* "flush" */            /* tclZlib.c:3260:23 */
var decompressChanOptions uintptr = ts + 74116 /* "dictionary limit" */ /* tclZlib.c:3261:23 */
var gunzipChanOptions uintptr = ts + 74133     /* "flush limit" */      /* tclZlib.c:3262:23 */

//----------------------------------------------------------------------
//
// ZlibTransformGetOption --
//
//	Reading side of [fconfigure] on our channel.
//
//----------------------------------------------------------------------

func sZlibTransformGetOption(tls *libc.TLS, instanceData ClientData, interp uintptr, optionName uintptr, dsPtr uintptr) int32 { /* tclZlib.c:3363:1: */
	bp := tls.Alloc(24)
	defer tls.Free(24)

	var cd uintptr = instanceData
	var getOptionProc uintptr = XTcl_ChannelGetOptionProc(tls, XTcl_GetChannelType(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent))

	// The "crc" option reports the current CRC (calculated with the Adler32
	// or CRC32 algorithm according to the format) given the data that has
	// been processed so far.

	if optionName == uintptr(0) || libc.Xstrcmp(tls, optionName, ts+74145) == 0 {
		var crc ULong
		// var buf [12]int8 at bp+8, 12

		if (*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
			crc = (*ZlibChannelData)(unsafe.Pointer(cd)).FoutStream.Fadler
		} else {
			crc = (*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Fadler
		}

		libc.Xsprintf(tls, bp+8, ts+55561, libc.VaList(bp, crc))
		if optionName == uintptr(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+74145)
			XTcl_DStringAppendElement(tls, dsPtr, bp+8)
		} else {
			XTcl_DStringAppend(tls, dsPtr, bp+8, -1)
			return TCL_OK
		}
	}

	if (*ZlibChannelData)(unsafe.Pointer(cd)).Fformat != TCL_ZLIB_FORMAT_GZIP && (optionName == uintptr(0) || libc.Xstrcmp(tls, optionName, ts+15496) == 0) {
		// Embedded NUL bytes are ok; they'll be C080-encoded.

		if optionName == uintptr(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+15496)
			if (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj != 0 {
				XTcl_DStringAppendElement(tls, dsPtr,
					XTcl_GetString(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj))
			} else {
				XTcl_DStringAppendElement(tls, dsPtr, ts+2631)
			}
		} else {
			if (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj != 0 {
				// var len int32 at bp+20, 4

				var str uintptr = XTcl_GetStringFromObj(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj, bp+20)

				XTcl_DStringAppend(tls, dsPtr, str, *(*int32)(unsafe.Pointer(bp + 20 /* len */)))
			}
			return TCL_OK
		}
	}

	// The "header" option, which is only valid on inflating gzip channels,
	// reports the header that has been read from the start of the stream.

	if (*ZlibChannelData)(unsafe.Pointer(cd)).Fflags&IN_HEADER != 0 && (optionName == uintptr(0) || libc.Xstrcmp(tls, optionName, ts+73152) == 0) {
		var tmpObj uintptr

		for ok := true; ok; ok = 0 != 0 {
			if XtclFreeObjList == uintptr(0) {
				XTclAllocateFreeObjects(tls)
			}
			tmpObj = XtclFreeObjList
			XtclFreeObjList = *(*uintptr)(unsafe.Pointer(XtclFreeObjList + 32))
		}
		(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FrefCount = 0
		(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Fbytes = XtclEmptyStringRep
		(*Tcl_Obj)(unsafe.Pointer(tmpObj)).Flength = 0
		(*Tcl_Obj)(unsafe.Pointer(tmpObj)).FtypePtr = uintptr(0)
		{
		}

		sExtractHeader(tls, cd+232, tmpObj)
		if optionName == uintptr(0) {
			XTcl_DStringAppendElement(tls, dsPtr, ts+73152)
			XTcl_DStringAppendElement(tls, dsPtr, XTcl_GetString(tls, tmpObj))
			for ok1 := true; ok1; ok1 = 0 != 0 {
				var _objPtr uintptr = tmpObj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
		} else {
			XTclDStringAppendObj(tls, dsPtr, tmpObj)
			for ok2 := true; ok2; ok2 = 0 != 0 {
				var _objPtr uintptr = tmpObj
				if libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1 {
					XTclFreeObj(tls, _objPtr)
				}
			}
			return TCL_OK
		}
	}

	// Now we do the standard processing of the stream we wrapped.

	if getOptionProc != 0 {
		return (*struct {
			f func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32
		})(unsafe.Pointer(&struct{ uintptr }{getOptionProc})).f(tls, XTcl_GetChannelInstanceData(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent),
			interp, optionName, dsPtr)
	}
	if optionName == uintptr(0) {
		return TCL_OK
	}
	if (*ZlibChannelData)(unsafe.Pointer(cd)).Fformat == TCL_ZLIB_FORMAT_GZIP {
		return XTcl_BadChannelOption(tls, interp, optionName,
			func() uintptr {
				if (*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
					return gzipChanOptions1
				}
				return gunzipChanOptions1
			}())
	} else {
		return XTcl_BadChannelOption(tls, interp, optionName,
			func() uintptr {
				if (*ZlibChannelData)(unsafe.Pointer(cd)).Fmode == TCL_ZLIB_STREAM_DEFLATE {
					return compressChanOptions1
				}
				return decompressChanOptions1
			}())
	}
	return int32(0)
}

var compressChanOptions1 uintptr = ts + 74155   /* "checksum diction..." */ /* tclZlib.c:3372:23 */
var gzipChanOptions1 uintptr = ts + 73558       /* "checksum" */            /* tclZlib.c:3373:23 */
var decompressChanOptions1 uintptr = ts + 74175 /* "checksum diction..." */ /* tclZlib.c:3374:23 */
var gunzipChanOptions1 uintptr = ts + 74201     /* "checksum header ..." */ /* tclZlib.c:3375:23 */

//----------------------------------------------------------------------
//
// ZlibTransformWatch, ZlibTransformEventHandler --
//
//	If we have data pending, trigger a readable event after a short time
//	(in order to allow a real event to catch up).
//
//----------------------------------------------------------------------

func sZlibTransformWatch(tls *libc.TLS, instanceData ClientData, mask int32) { /* tclZlib.c:3484:1: */
	var cd uintptr = instanceData
	var watchProc uintptr

	// This code is based on the code in tclIORTrans.c

	watchProc = XTcl_ChannelWatchProc(tls, XTcl_GetChannelType(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent))
	(*struct {
		f func(*libc.TLS, ClientData, int32)
	})(unsafe.Pointer(&struct{ uintptr }{watchProc})).f(tls, XTcl_GetChannelInstanceData(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent), mask)

	if !(mask&(int32(1)<<1) != 0) || !((*ZlibChannelData)(unsafe.Pointer(cd)).Fflags&STREAM_DECOMPRESS != 0) {
		sZlibTransformEventTimerKill(tls, cd)
	} else if (*ZlibChannelData)(unsafe.Pointer(cd)).Ftimer == uintptr(0) {
		(*ZlibChannelData)(unsafe.Pointer(cd)).Ftimer = XTcl_CreateTimerHandler(tls, SYNTHETIC_EVENT_TIME,
			*(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, ClientData) }{sZlibTransformTimerRun})), cd)
	}
}

func sZlibTransformEventHandler(tls *libc.TLS, instanceData ClientData, interestMask int32) int32 { /* tclZlib.c:3507:1: */
	var cd uintptr = instanceData

	sZlibTransformEventTimerKill(tls, cd)
	return interestMask
}

func sZlibTransformEventTimerKill(tls *libc.TLS, cd uintptr) { /* tclZlib.c:3518:1: */
	if (*ZlibChannelData)(unsafe.Pointer(cd)).Ftimer != uintptr(0) {
		XTcl_DeleteTimerHandler(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Ftimer)
		(*ZlibChannelData)(unsafe.Pointer(cd)).Ftimer = uintptr(0)
	}
}

func sZlibTransformTimerRun(tls *libc.TLS, clientData ClientData) { /* tclZlib.c:3528:1: */
	var cd uintptr = clientData

	(*ZlibChannelData)(unsafe.Pointer(cd)).Ftimer = uintptr(0)
	XTcl_NotifyChannel(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fchan, int32(1)<<1)
}

//----------------------------------------------------------------------
//
// ZlibTransformGetHandle --
//
//	Anything that needs the OS handle is told to get it from what we are
//	stacked on top of.
//
//----------------------------------------------------------------------

func sZlibTransformGetHandle(tls *libc.TLS, instanceData ClientData, direction int32, handlePtr uintptr) int32 { /* tclZlib.c:3549:1: */
	var cd uintptr = instanceData

	return XTcl_GetChannelHandle(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent, direction, handlePtr)
}

//----------------------------------------------------------------------
//
// ZlibTransformBlockMode --
//
//	We need to keep track of the blocking mode; it changes our behavior.
//
//----------------------------------------------------------------------

func sZlibTransformBlockMode(tls *libc.TLS, instanceData ClientData, mode int32) int32 { /* tclZlib.c:3570:1: */
	var cd uintptr = instanceData

	if mode == TCL_MODE_NONBLOCKING {
		*(*int32)(unsafe.Pointer(cd + 16)) |= ASYNC
	} else {
		*(*int32)(unsafe.Pointer(cd + 16)) &= libc.CplInt32(ASYNC)
	}
	return TCL_OK
}

//----------------------------------------------------------------------
//
// ZlibStackChannelTransform --
//
//	Stacks either compression or decompression onto a channel.
//
// Results:
//	The stacked channel, or NULL if there was an error.
//
//----------------------------------------------------------------------

func sZlibStackChannelTransform(tls *libc.TLS, interp uintptr, mode int32, format int32, level int32, limit int32, channel Tcl_Channel, gzipHeaderDictPtr uintptr, compDictObj uintptr) Tcl_Channel { /* tclZlib.c:3598:1: */
	bp := tls.Alloc(16)
	defer tls.Free(16)

	var cd uintptr
	var chan1 Tcl_Channel
	var wbits int32
	var _objPtr uintptr
	cd = XTcl_Alloc(tls, uint32(unsafe.Sizeof(ZlibChannelData{})))
	wbits = 0

	if !(mode != TCL_ZLIB_STREAM_DEFLATE && mode != TCL_ZLIB_STREAM_INFLATE) {
		goto __1
	}
	XTcl_Panic(tls, ts+74223, libc.VaList(bp, mode))
__1:
	;

	libc.Xmemset(tls, cd, 0, uint64(unsafe.Sizeof(ZlibChannelData{})))
	(*ZlibChannelData)(unsafe.Pointer(cd)).Fmode = mode
	(*ZlibChannelData)(unsafe.Pointer(cd)).Fformat = format
	(*ZlibChannelData)(unsafe.Pointer(cd)).FreadAheadLimit = limit

	if !(format == TCL_ZLIB_FORMAT_GZIP || format == TCL_ZLIB_FORMAT_AUTO) {
		goto __2
	}
	if !(mode == TCL_ZLIB_STREAM_DEFLATE) {
		goto __3
	}
	if !(gzipHeaderDictPtr != 0) {
		goto __5
	}
	*(*int32)(unsafe.Pointer(cd + 16)) |= OUT_HEADER
	if !(sGenerateHeader(tls, interp, gzipHeaderDictPtr, cd+824,
		uintptr(0)) != TCL_OK) {
		goto __6
	}
	goto error
__6:
	;
__5:
	;
	goto __4
__3:
	*(*int32)(unsafe.Pointer(cd + 16)) |= IN_HEADER
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinHeader.Fheader.Fname = cd + 232 + 72
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinHeader.Fheader.Fname_max = UInt(MAX_PATH - 1)
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinHeader.Fheader.Fcomment = cd + 232 + 332
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinHeader.Fheader.Fcomm_max = UInt(MAX_COMMENT_LEN - 1)
__4:
	;
__2:
	;

	if !(compDictObj != uintptr(0)) {
		goto __7
	}
	(*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj = XTcl_DuplicateObj(tls, compDictObj)
	(*Tcl_Obj)(unsafe.Pointer((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)).FrefCount++
	XTcl_GetByteArrayFromObj(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj, uintptr(0))
__7:
	;

	if !(format == TCL_ZLIB_FORMAT_RAW) {
		goto __8
	}
	wbits = -MAX_WBITS
	goto __9
__8:
	if !(format == TCL_ZLIB_FORMAT_ZLIB) {
		goto __10
	}
	wbits = MAX_WBITS
	goto __11
__10:
	if !(format == TCL_ZLIB_FORMAT_GZIP) {
		goto __12
	}
	wbits = MAX_WBITS | 16
	goto __13
__12:
	if !(format == TCL_ZLIB_FORMAT_AUTO) {
		goto __14
	}
	wbits = MAX_WBITS | 32
	goto __15
__14:
	XTcl_Panic(tls, ts+74240, libc.VaList(bp+8, format))
__15:
	;
__13:
	;
__11:
	;
__9:
	;

	// Initialize input inflater or the output deflater.

	if !(mode == TCL_ZLIB_STREAM_INFLATE) {
		goto __16
	}
	if !(z.XinflateInit2_(tls, cd+32, wbits, ts+65, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK) {
		goto __18
	}
	goto error
__18:
	;
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinAllocated = DEFAULT_BUFFER_SIZE
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).FinAllocated < (*ZlibChannelData)(unsafe.Pointer(cd)).FreadAheadLimit) {
		goto __19
	}
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinAllocated = (*ZlibChannelData)(unsafe.Pointer(cd)).FreadAheadLimit
__19:
	;
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinBuffer = XTcl_Alloc(tls, uint32((*ZlibChannelData)(unsafe.Pointer(cd)).FinAllocated))
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).Fflags&IN_HEADER != 0) {
		goto __20
	}
	if !(z.XinflateGetHeader(tls, cd+32, cd+232) != Z_OK) {
		goto __21
	}
	goto error
__21:
	;
__20:
	;
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).Fformat == TCL_ZLIB_FORMAT_RAW && (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj != 0) {
		goto __22
	}
	if !(sSetInflateDictionary(tls, cd+32, (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj) != Z_OK) {
		goto __23
	}
	goto error
__23:
	;
__22:
	;
	goto __17
__16:
	if !(z.XdeflateInit2_(tls, cd+120, level, Z_DEFLATED, wbits, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY, ts+65, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK) {
		goto __24
	}
	goto error
__24:
	;
	(*ZlibChannelData)(unsafe.Pointer(cd)).FoutAllocated = DEFAULT_BUFFER_SIZE
	(*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer = XTcl_Alloc(tls, uint32((*ZlibChannelData)(unsafe.Pointer(cd)).FoutAllocated))
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).Fflags&OUT_HEADER != 0) {
		goto __25
	}
	if !(z.XdeflateSetHeader(tls, cd+120, cd+824) != Z_OK) {
		goto __26
	}
	goto error
__26:
	;
__25:
	;
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj != 0) {
		goto __27
	}
	if !(sSetDeflateDictionary(tls, cd+120, (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj) != Z_OK) {
		goto __28
	}
	goto error
__28:
	;
__27:
	;
__17:
	;

	chan1 = XTcl_StackChannel(tls, interp, uintptr(unsafe.Pointer(&zlibChannelType)), cd,
		XTcl_GetChannelMode(tls, channel), channel)
	if !(chan1 == uintptr(0)) {
		goto __29
	}
	goto error
__29:
	;
	(*ZlibChannelData)(unsafe.Pointer(cd)).Fchan = chan1
	(*ZlibChannelData)(unsafe.Pointer(cd)).Fparent = XTcl_GetStackedChannel(tls, chan1)
	XTcl_SetObjResult(tls, interp, XTcl_NewStringObj(tls, XTcl_GetChannelName(tls, chan1), -1))
	return chan1

error:
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).FinBuffer != 0) {
		goto __30
	}
	XTclpFree(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FinBuffer)
	z.XinflateEnd(tls, cd+32)
__30:
	;
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer != 0) {
		goto __31
	}
	XTclpFree(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FoutBuffer)
	z.XdeflateEnd(tls, cd+120)
__31:
	;
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj != 0) {
		goto __32
	}
__33:
	_objPtr = (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj
	if !(libc.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer(_objPtr)).FrefCount, 1) <= 1) {
		goto __36
	}
	XTclFreeObj(tls, _objPtr)
__36:
	;
	goto __34
__34:
	if 0 != 0 {
		goto __33
	}
	goto __35
__35:
	;
__32:
	;
	XTclpFree(tls, cd)
	return uintptr(0)
}

//----------------------------------------------------------------------
//
// ResultDecompress --
//
//	Extract uncompressed bytes from the compression engine and store them
//	in our buffer (buf) up to toRead bytes.
//
// Result:
//	Number of bytes decompressed or -1 if error (with *errorCodePtr updated with reason).
//
// Side effects:
//	After execution it updates cd->inStream (next_in, avail_in) to reflect
//	the data that has been decompressed.
//
//----------------------------------------------------------------------

func sResultDecompress(tls *libc.TLS, cd uintptr, buf uintptr, toRead int32, flush int32, errorCodePtr uintptr) int32 { /* tclZlib.c:3762:1: */
	var e int32
	var written int32
	var resBytes int32
	var errObj uintptr
	resBytes = 0

	*(*int32)(unsafe.Pointer(cd + 16)) &= libc.CplInt32(STREAM_DECOMPRESS)
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Fnext_out = buf
	(*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_out = UInt(toRead)
__1:
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_out > UInt(0)) {
		goto __2
	}

	e = z.Xinflate(tls, cd+32, flush)
	if !(e == Z_NEED_DICT && (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj != 0) {
		goto __3
	}
	e = sSetInflateDictionary(tls, cd+32, (*ZlibChannelData)(unsafe.Pointer(cd)).FcompDictObj)
	if !(e == Z_OK) {
		goto __4
	}
	// A repetition of Z_NEED_DICT is just an error.
	e = z.Xinflate(tls, cd+32, flush)
__4:
	;
__3:
	;

	// avail_out is now the left over space in the output.  Therefore
	// "toRead - avail_out" is the amount of bytes generated.

	written = int32(UInt(toRead) - (*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_out)

	// The cases where we're definitely done.

	if !(e == Z_STREAM_END) {
		goto __5
	}
	*(*int32)(unsafe.Pointer(cd + 16)) |= STREAM_DONE
	resBytes = resBytes + written
	goto __2
__5:
	;
	if !(e == Z_OK) {
		goto __6
	}
	if !(written == 0) {
		goto __7
	}
	goto __2
__7:
	;
	resBytes = resBytes + written
__6:
	;

	if !(flush == Z_SYNC_FLUSH && e == -5) {
		goto __8
	}
	goto __2
__8:
	;

	// Z_BUF_ERROR can be ignored as per http://www.zlib.net/zlib_how.html
	//
	// Just indicates that the zlib couldn't consume input/produce output,
	// and is fixed by supplying more input.
	//
	// Otherwise, we've got errors and need to report to higher-up.

	if !(e != Z_OK && e != -5) {
		goto __9
	}
	goto handleError
__9:
	;

	// Check if the inflate stopped early.

	if !((*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_in <= UInt(0) && flush != Z_SYNC_FLUSH) {
		goto __10
	}
	goto __2
__10:
	;
	goto __1
__2:
	;

	if !!((*ZlibChannelData)(unsafe.Pointer(cd)).Fflags&STREAM_DONE != 0) {
		goto __11
	}
	// if we have pending input data, but no available output buffer
	if !((*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_in != 0 && !(int32((*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Favail_out) != 0)) {
		goto __12
	}
	// next time try to decompress it got readable (new output buffer)
	*(*int32)(unsafe.Pointer(cd + 16)) |= STREAM_DECOMPRESS
__12:
	;
__11:
	;

	return resBytes

handleError:
	errObj = XTcl_NewListObj(tls, 0, uintptr(0))
	XTcl_ListObjAppendElement(tls, uintptr(0), errObj, XTcl_NewStringObj(tls, ts+12571, -1))
	XTcl_ListObjAppendElement(tls, uintptr(0), errObj,
		sConvertErrorToList(tls, e, (*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Fadler))
	XTcl_ListObjAppendElement(tls, uintptr(0), errObj,
		XTcl_NewStringObj(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).FinStream.Fmsg, -1))
	XTcl_SetChannelError(tls, (*ZlibChannelData)(unsafe.Pointer(cd)).Fparent, errObj)
	*(*int32)(unsafe.Pointer(errorCodePtr)) = EINVAL
	return -1
}

//----------------------------------------------------------------------
//	Finally, the TclZlibInit function. Used to install the zlib API.
//----------------------------------------------------------------------

func XTclZlibInit(tls *libc.TLS, interp uintptr) int32 { /* tclZlib.c:3867:1: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var cfg [2]Tcl_Config at bp, 32

	// This does two things. It creates a counter used in the creation of
	// stream commands, and it creates the namespace that will contain those
	// commands.

	XTcl_EvalEx(tls, interp, ts+74255, -1, 0)

	// Create the public scripted interface to this file's functionality.

	XTcl_CreateObjCommand(tls, interp, ts+71825, *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32
	}{sZlibCmd})), uintptr(0), uintptr(0))

	// Store the underlying configuration information.
	//
	// TODO: Describe whether we're using the system version of the library or
	// a compatibility version built into Tcl?

	(*Tcl_Config)(unsafe.Pointer(bp)).Fkey = ts + 74306 /* "zlibVersion" */
	(*Tcl_Config)(unsafe.Pointer(bp)).Fvalue = z.XzlibVersion(tls)
	(*Tcl_Config)(unsafe.Pointer(bp + 1*16)).Fkey = uintptr(0)
	XTcl_RegisterConfig(tls, interp, ts+71825, bp, ts+26567)

	// Formally provide the package as a Tcl built-in.

	return XTcl_PkgProvideEx(tls, interp, ts+71825, ts+74318, uintptr(0))
}

//----------------------------------------------------------------------
//	Stubs used when a suitable zlib installation was not found during
//	configure.
//----------------------------------------------------------------------

// Local Variables:
// mode: c
// c-basic-offset: 4
// fill-column: 78
// End:

type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */

// ===========================================================================
// 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{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0} /* trees.c:62:17 */

var extra_dbits = [30]int32{0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13} /* trees.c:65:17 */

var extra_blbits = [19]int32{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7} /* trees.c:68:17 */

var bl_order = [19]Uch{Uch(16), Uch(17), Uch(18), Uch(0), Uch(8), Uch(7), Uch(9), Uch(6), Uch(10), Uch(5), Uch(11), Uch(4), Uch(12), Uch(3), Uch(13), Uch(2), Uch(14), Uch(1), Uch(15)} /* trees.c:71:17 */
// The lengths of the bit length codes are sent in order of decreasing
// probability, to avoid transmitting the lengths for unused bit length codes.

// ===========================================================================
// Local data. These are initialized only once.

// header created automatically with -DGEN_TREES_H

var static_ltree = [288]Ct_data{{Ffc: func() (r struct{ Ffreq Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12)
	return r
}(), Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
	return r
}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(140)
	return r
}(), Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
	return r
}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(76)
	return r
}(), Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
	return r
}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(204)
	return r
}(), Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
	return r
}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(44)
	return r
}(), Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
	return r
}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(172)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(108)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(236)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(156)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(92)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(220)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(60)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(188)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(124)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(252)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(130)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(66)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(194)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(34)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(162)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(98)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(226)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(146)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(82)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(210)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(50)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(178)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(114)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(242)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(138)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(74)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(202)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(42)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(170)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(106)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(234)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(154)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(90)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(218)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(58)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(186)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(122)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(250)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(134)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(70)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(198)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(38)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(166)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(102)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(230)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(150)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(86)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(214)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(54)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(182)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(118)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(246)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(142)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(78)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(206)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(46)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(174)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(110)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(238)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(158)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(94)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(222)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(62)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(190)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(126)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(254)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(129)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(65)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(193)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(33)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(161)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(97)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(225)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(145)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(81)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(209)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(49)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(177)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(113)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(241)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(137)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(73)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(201)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(41)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(169)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(105)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(233)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(153)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(89)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(217)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(57)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(185)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(121)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(249)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(133)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(69)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(197)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(37)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(165)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(101)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(229)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(149)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(85)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(213)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(53)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(181)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(117)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(245)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(141)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(77)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(205)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(45)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(173)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(109)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(237)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(157)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(93)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(221)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(61)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(189)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(125)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(253)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(275)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(147)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(403)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(83)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(339)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(211)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(467)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(51)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(307)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(179)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(435)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(115)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(371)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(243)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(499)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(267)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(139)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(395)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(75)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(331)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(203)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(459)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(43)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(299)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(171)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(427)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(107)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(363)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(235)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(491)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(283)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(155)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(411)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(91)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(347)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(219)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(475)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(59)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(315)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(187)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(443)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(123)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(379)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(251)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(507)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(263)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(135)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(391)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(71)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(327)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(199)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(455)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(39)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(295)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(167)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(423)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(103)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(359)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(231)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(487)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(279)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(151)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(407)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(87)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(343)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(215)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(471)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(55)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(311)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(183)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(439)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(119)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(375)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(247)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(503)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(15)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(271)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(143)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(399)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(79)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(335)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(207)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(463)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(47)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(303)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(175)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(431)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(111)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(367)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(239)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(495)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(31)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(287)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(159)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(415)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(95)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(351)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(223)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(479)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(63)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(319)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(191)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(447)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(127)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(383)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(255)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(511)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}()}, {Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(64)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(32)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(96)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(80)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(48)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(112)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(72)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(40)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(104)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(88)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(56)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(120)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(68)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(36)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(100)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(84)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(52)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(116)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(131)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(67)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(195)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(35)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(163)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(99)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(227)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
		return r
	}()}} /* trees.h:3:21 */

var static_dtree = [30]Ct_data{{Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
	return r
}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16)
	return r
}(), Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
	return r
}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
	return r
}(), Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
	return r
}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24)
	return r
}(), Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
	return r
}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4)
	return r
}(), Fdl: func() (r struct{ Fdad Ush }) {
	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
	return r
}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()},
	{Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23)
		return r
	}(), Fdl: func() (r struct{ Fdad Ush }) {
		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
		return r
	}()}} /* trees.h:64:21 */

var X_dist_code = [512]Uch{
	Uch(0), Uch(1), Uch(2), Uch(3), Uch(4), Uch(4), Uch(5), Uch(5), Uch(6), Uch(6), Uch(6), Uch(6), Uch(7), Uch(7), Uch(7), Uch(7), Uch(8), Uch(8), Uch(8), Uch(8),
	Uch(8), Uch(8), Uch(8), Uch(8), Uch(9), Uch(9), Uch(9), Uch(9), Uch(9), Uch(9), Uch(9), Uch(9), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10),
	Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(10), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11), Uch(11),
	Uch(11), Uch(11), Uch(11), Uch(11), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12),
	Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(12), Uch(13), Uch(13), Uch(13), Uch(13),
	Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13),
	Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(13), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14),
	Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14),
	Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14),
	Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(14), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15),
	Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15),
	Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15),
	Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(15), Uch(0), Uch(0), Uch(16), Uch(17),
	Uch(18), Uch(18), Uch(19), Uch(19), Uch(20), Uch(20), Uch(20), Uch(20), Uch(21), Uch(21), Uch(21), Uch(21), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22),
	Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24),
	Uch(24), Uch(24), Uch(24), Uch(24), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25),
	Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26),
	Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27),
	Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27),
	Uch(27), Uch(27), Uch(27), Uch(27), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28),
	Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28),
	Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28),
	Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(28), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29),
	Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29),
	Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29),
	Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29),
} /* trees.h:73:25 */

var X_length_code = [256]Uch{
	Uch(0), Uch(1), Uch(2), Uch(3), Uch(4), Uch(5), Uch(6), Uch(7), Uch(8), Uch(8), Uch(9), Uch(9), Uch(10), Uch(10), Uch(11), Uch(11), Uch(12), Uch(12), Uch(12), Uch(12),
	Uch(13), Uch(13), Uch(13), Uch(13), Uch(14), Uch(14), Uch(14), Uch(14), Uch(15), Uch(15), Uch(15), Uch(15), Uch(16), Uch(16), Uch(16), Uch(16), Uch(16), Uch(16), Uch(16), Uch(16),
	Uch(17), Uch(17), Uch(17), Uch(17), Uch(17), Uch(17), Uch(17), Uch(17), Uch(18), Uch(18), Uch(18), Uch(18), Uch(18), Uch(18), Uch(18), Uch(18), Uch(19), Uch(19), Uch(19), Uch(19),
	Uch(19), Uch(19), Uch(19), Uch(19), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20), Uch(20),
	Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(21), Uch(22), Uch(22), Uch(22), Uch(22),
	Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(22), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23),
	Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(23), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24),
	Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24), Uch(24),
	Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25),
	Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(25), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26),
	Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26), Uch(26),
	Uch(26), Uch(26), Uch(26), Uch(26), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27),
	Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(27), Uch(28),
} /* trees.h:102:25 */

var base_length = [29]int32{
	0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
	64, 80, 96, 112, 128, 160, 192, 224, 0,
} /* trees.h:118:17 */

var base_dist = [30]int32{
	0, 1, 2, 3, 4, 6, 8, 12, 16, 24,
	32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
	1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576,
} /* trees.h:123:17 */

var static_l_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Fextra_base: LITERALS + 1, Felems: LITERALS + 1 + LENGTH_CODES, Fmax_length: MAX_BITS} /* trees.c:125:31 */

var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */

var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */

// Send a code of the given tree. c and tree must not have side effects

// ===========================================================================
// Output a short LSB first on the stream.
// IN assertion: there is enough room in pendingBuf.

// ===========================================================================
// 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

// ===========================================================================
// Initialize the various 'constant' tables.
func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */
}

// ===========================================================================
// Genererate the file trees.h describing the static trees.

// ===========================================================================
// Initialize the tree data structures for a new zlib stream.
func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */
	tr_static_init(tls)

	(*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 188 /* &.dyn_ltree */
	(*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc))

	(*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2480 /* &.dyn_dtree */
	(*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc))

	(*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2724 /* &.bl_tree */
	(*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc))

	(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
	(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0

	// Initialize the first block of the first file:
	init_block(tls, s)
}

// ===========================================================================
// Initialize a new block.
func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */
	var n int32 // iterates over tree elements

	// Initialize the trees.
	for n = 0; n < LITERALS+1+LENGTH_CODES; n++ {
		*(*Ush)(unsafe.Pointer(s + 188 + uintptr(n)*4)) = Ush(0)
	}
	for n = 0; n < D_CODES; n++ {
		*(*Ush)(unsafe.Pointer(s + 2480 + uintptr(n)*4)) = Ush(0)
	}
	for n = 0; n < BL_CODES; n++ {
		*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(n)*4)) = Ush(0)
	}

	*(*Ush)(unsafe.Pointer(s + 188 + 256*4)) = Ush(1)
	(*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint32(s+5892, Ulg(0))
	(*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5896, UInt(0))
}

// 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.

// ===========================================================================
// 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) { /* trees.c:451:12: */
	var v int32 = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(k)*4))
	var j int32 = k << 1 // left son of k
	for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len {
		// Set j to the smallest of the two sons:
		if j < (*Deflate_state)(unsafe.Pointer(s)).Fheap_len && (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j+1)*4)))*4))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))*4))) || int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j+1)*4)))*4))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))*4))) && int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j+1)*4)))))) <= int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4))))))) {
			j++
		}
		// Exit if v is smaller than both sons
		if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))*4))) || int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))*4))) && int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(v)))) <= int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4)))))) {
			break
		}

		// Exchange v with the smallest son
		*(*int32)(unsafe.Pointer(s + 2984 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(j)*4))
		k = j

		// And continue down the tree, setting j to the left son of k
		j <<= 1
	}
	*(*int32)(unsafe.Pointer(s + 2984 + uintptr(k)*4)) = v
}

// ===========================================================================
// 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) { /* trees.c:486:12: */
	var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree
	var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code
	var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree
	var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits
	var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base
	var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length
	var h int32 // heap index
	var n int32
	var m int32            // iterate over the tree elements
	var bits int32         // bit length
	var xbits int32        // extra bits
	var f Ush              // frequency
	var overflow int32 = 0 // number of elements with bit length too large

	for bits = 0; bits <= MAX_BITS; bits++ {
		*(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2)) = Ush(0)
	}

	// In a first pass, compute the optimal bit lengths (which may
	// overflow in the case of the bit length tree).
	*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2984 + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fheap_max)*4)))*4 + 2)) = Ush(0) // root of the heap

	for h = (*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1; h < 2*(LITERALS+1+LENGTH_CODES)+1; h++ {
		n = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(h)*4))
		bits = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)))*4 + 2))) + 1
		if bits > max_length {
			bits = max_length
			overflow++
		}
		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(bits)
		// We overwrite tree[n].Dad which is no longer needed

		if n > max_code {
			continue
		} // not a leaf node

		*(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2))++
		xbits = 0
		if n >= base {
			xbits = *(*Intf)(unsafe.Pointer(extra + uintptr(n-base)*4))
		}
		f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))
		*(*Ulg)(unsafe.Pointer(s + 5888)) += Ulg(f) * Ulg(uint32(bits+xbits))
		if stree != 0 {
			*(*Ulg)(unsafe.Pointer(s + 5892)) += Ulg(f) * Ulg(uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2)))+xbits))
		}
	}
	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 ok := true; ok; ok = overflow > 0 {
		bits = max_length - 1
		for int32(*(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2))) == 0 {
			bits--
		}
		*(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2))--           // move one leaf down the tree
		*(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits+1)*2)) += Ush(2) // move one overflow item as its brother
		*(*Ush)(unsafe.Pointer(s + 2952 + 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 = overflow - 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.)
	for bits = max_length; bits != 0; bits-- {
		n = int32(*(*Ush)(unsafe.Pointer(s + 2952 + uintptr(bits)*2)))
		for n != 0 {
			m = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreDecInt32(&h, 1))*4))
			if m > max_code {
				continue
			}
			if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2))) != uint32(bits) {

				*(*Ulg)(unsafe.Pointer(s + 5888)) += (Ulg(bits) - Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)))) * Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4)))
				*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)) = Ush(bits)
			}
			n--
		}
	}
}

// ===========================================================================
// 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) { /* trees.c:572:12: */
	bp := tls.Alloc(32)
	defer tls.Free(32)

	// var next_code [16]Ush at bp, 32
	// next code value for each bit length
	var code uint32 = uint32(0) // running code value
	var bits int32              // bit index
	var n int32                 // code index

	// The distribution counts are first used to generate the code values
	// without bit reversal.
	for bits = 1; bits <= MAX_BITS; bits++ {
		code = (code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr(bits-1)*2)))) << 1
		*(*Ush)(unsafe.Pointer(bp + uintptr(bits)*2)) = Ush(code)
	}
	// Check that the bit counts in bl_count are consistent. The last code
	// must be all ones.

	for n = 0; n <= max_code; n++ {
		var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)))
		if len == 0 {
			continue
		}
		// Now reverse the bits
		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4)) = Ush(bi_reverse(tls, uint32(libc.PostIncUint16(&*(*Ush)(unsafe.Pointer(bp + uintptr(len)*2)), 1)), len))

	}
}

// ===========================================================================
// 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) { /* trees.c:615:12: */
	var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree
	var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree
	var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems
	var n int32
	var m int32             // iterate over heap elements
	var max_code int32 = -1 // largest code with non zero frequency
	var node int32          // 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.
	(*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0
	(*Deflate_state)(unsafe.Pointer(s)).Fheap_max = 2*(LITERALS+1+LENGTH_CODES) + 1

	for n = 0; n < elems; n++ {
		if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) != 0 {
			*(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) = libc.AssignInt32(&max_code, n)
			*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(n))) = Uch(0)
		} else {
			*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(0)
		}
	}

	// 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 (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 {
		node = libc.AssignPtrInt32(s+2984+uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4, func() int32 {
			if max_code < 2 {
				return libc.PreIncInt32(&max_code, 1)
			}
			return 0
		}())
		*(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(1)
		*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(node))) = Uch(0)
		(*Deflate_state)(unsafe.Pointer(s)).Fopt_len--
		if stree != 0 {
			*(*Ulg)(unsafe.Pointer(s + 5892)) -= Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2)))
		}
		// node is 0 or 1 so it does not have extra bits
	}
	(*Tree_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:
	for n = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2; n >= 1; n-- {
		pqdownheap(tls, s, tree, n)
	}

	// Construct the Huffman tree by repeatedly combining the least two
	// frequent nodes.
	node = elems // next internal node of the tree
	for ok := true; ok; ok = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2 {
		{
			n = *(*int32)(unsafe.Pointer(s + 2984 + 1*4))
			*(*int32)(unsafe.Pointer(s + 2984 + 1*4)) = *(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PostDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4))
			pqdownheap(tls, s, tree, SMALLEST)
		}
		// n = node of least frequency
		m = *(*int32)(unsafe.Pointer(s + 2984 + 1*4)) // m = node of next least frequency

		*(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = n // keep the nodes sorted by frequency
		*(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = m

		// Create a new node father of n and m
		*(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) + int32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4))))
		*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(node))) = Uch(func() int32 {
			if int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(m)))) {
				return int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(n))))
			}
			return int32(*(*Uch)(unsafe.Pointer(s + 5284 + uintptr(m))))
		}() + 1)
		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2, Ush(node))
		// and insert the new node in the heap
		*(*int32)(unsafe.Pointer(s + 2984 + 1*4)) = libc.PostIncInt32(&node, 1)
		pqdownheap(tls, s, tree, SMALLEST)

	}

	*(*int32)(unsafe.Pointer(s + 2984 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = *(*int32)(unsafe.Pointer(s + 2984 + 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+2952)
}

// ===========================================================================
// 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) { /* trees.c:703:12: */
	var n int32                                                  // iterates over all tree elements
	var prevlen int32 = -1                                       // last emitted length
	var curlen int32                                             // length of current code
	var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code
	var count int32 = 0                                          // repeat count of the current code
	var max_count int32 = 7                                      // max repeat count
	var min_count int32 = 4                                      // min repeat count

	if nextlen == 0 {
		max_count = 138
		min_count = 3
	}
	*(*Ush)(unsafe.Pointer(tree + uintptr(max_code+1)*4 + 2)) = Ush(0xffff) // guard

	for n = 0; n <= max_code; n++ {
		curlen = nextlen
		nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2)))
		if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen {
			continue
		} else if count < min_count {
			*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4)) += Ush(count)
		} else if curlen != 0 {
			if curlen != prevlen {
				*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4))++
			}
			*(*Ush)(unsafe.Pointer(s + 2724 + 16*4))++
		} else if count <= 10 {
			*(*Ush)(unsafe.Pointer(s + 2724 + 17*4))++
		} else {
			*(*Ush)(unsafe.Pointer(s + 2724 + 18*4))++
		}
		count = 0
		prevlen = curlen
		if nextlen == 0 {
			max_count = 138
			min_count = 3
		} else if curlen == nextlen {
			max_count = 6
			min_count = 3
		} else {
			max_count = 7
			min_count = 4
		}
	}
}

// ===========================================================================
// 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) { /* trees.c:748:12: */
	var n int32                                                  // iterates over all tree elements
	var prevlen int32 = -1                                       // last emitted length
	var curlen int32                                             // length of current code
	var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code
	var count int32 = 0                                          // repeat count of the current code
	var max_count int32 = 7                                      // max repeat count
	var min_count int32 = 4                                      // min repeat count

	/* tree[max_code+1].Len = -1; */ // guard already set
	if nextlen == 0 {
		max_count = 138
		min_count = 3
	}

	for n = 0; n <= max_code; n++ {
		curlen = nextlen
		nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2)))
		if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen {
			continue
		} else if count < min_count {
			for ok := true; ok; ok = libc.PreDecInt32(&count, 1) != 0 {
				{
					var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4 + 2)))
					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
						var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4)))
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						{
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
							}
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
							}

						}
						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
						*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
					} else {
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						*(*int32)(unsafe.Pointer(s + 5908)) += len
					}
				}
			}

		} else if curlen != 0 {
			if curlen != prevlen {
				{
					var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4 + 2)))
					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
						var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4)))
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						{
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
							}
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
							}

						}
						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
						*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
					} else {
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						*(*int32)(unsafe.Pointer(s + 5908)) += len
					}
				}
				count--
			}

			{
				var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 16*4 + 2)))
				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
					var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 16*4)))
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					{
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
						}
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
						}

					}
					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
					*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
				} else {
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + 16*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					*(*int32)(unsafe.Pointer(s + 5908)) += len
				}
			}
			{
				var len int32 = 2
				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
					var val int32 = count - 3
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					{
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
						}
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
						}

					}
					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
					*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
				} else {
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					*(*int32)(unsafe.Pointer(s + 5908)) += len
				}
			}

		} else if count <= 10 {
			{
				var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 17*4 + 2)))
				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
					var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 17*4)))
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					{
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
						}
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
						}

					}
					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
					*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
				} else {
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + 17*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					*(*int32)(unsafe.Pointer(s + 5908)) += len
				}
			}
			{
				var len int32 = 3
				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
					var val int32 = count - 3
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					{
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
						}
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
						}

					}
					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
					*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
				} else {
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					*(*int32)(unsafe.Pointer(s + 5908)) += len
				}
			}

		} else {
			{
				var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 18*4 + 2)))
				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
					var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + 18*4)))
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					{
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
						}
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
						}

					}
					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
					*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
				} else {
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + 18*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					*(*int32)(unsafe.Pointer(s + 5908)) += len
				}
			}
			{
				var len int32 = 7
				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
					var val int32 = count - 11
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					{
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
						}
						{
							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
						}

					}
					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
					*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
				} else {
					*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(count-11)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
					*(*int32)(unsafe.Pointer(s + 5908)) += len
				}
			}

		}
		count = 0
		prevlen = curlen
		if nextlen == 0 {
			max_count = 138
			min_count = 3
		} else if curlen == nextlen {
			max_count = 6
			min_count = 3
		} else {
			max_count = 7
			min_count = 4
		}
	}
}

// ===========================================================================
// 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) int32 { /* trees.c:799:11: */
	var max_blindex int32 // 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+188 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code)
	scan_tree(tls, s, s+2480 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code)

	// Build the bit length tree:
	build_tree(tls, s, s+2928)
	// 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.)
	for max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex-- {
		if int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(bl_order[max_blindex])*4 + 2))) != 0 {
			break
		}
	}
	// Update opt_len to include the bit length tree and counts
	*(*Ulg)(unsafe.Pointer(s + 5888)) += Ulg(3)*(Ulg(max_blindex)+Ulg(1)) + Ulg(5) + Ulg(5) + Ulg(4)

	return max_blindex
}

// ===========================================================================
// 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) { /* trees.c:834:12: */
	var rank int32 // index in bl_order

	{
		var len int32 = 5
		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
			var val int32 = lcodes - 257
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			{
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
				}
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
				}

			}
			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
			*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
		} else {
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(lcodes-257)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			*(*int32)(unsafe.Pointer(s + 5908)) += len
		}
	}
	/* not +255 as stated in appnote.txt */
	{
		var len int32 = 5
		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
			var val int32 = dcodes - 1
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			{
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
				}
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
				}

			}
			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
			*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
		} else {
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(dcodes-1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			*(*int32)(unsafe.Pointer(s + 5908)) += len
		}
	}

	{
		var len int32 = 4
		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
			var val int32 = blcodes - 4
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			{
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
				}
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
				}

			}
			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
			*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
		} else {
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(blcodes-4)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			*(*int32)(unsafe.Pointer(s + 5908)) += len
		}
	}
	// not -3 as stated in appnote.txt
	for rank = 0; rank < blcodes; rank++ {

		{
			var len int32 = 3
			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
				var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(bl_order[rank])*4 + 2)))
				*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
				{
					{
						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
					}
					{
						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
					}

				}
				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
				*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
			} else {
				*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2724 + uintptr(bl_order[rank])*4 + 2))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
				*(*int32)(unsafe.Pointer(s + 5908)) += len
			}
		}

	}

	send_tree(tls, s, s+188 /* &.dyn_ltree */, lcodes-1) // literal tree

	send_tree(tls, s, s+2480 /* &.dyn_dtree */, dcodes-1) // distance tree

}

// ===========================================================================
// Send a stored block
func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */
	{
		var len int32 = 3
		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
			var val int32 = int32(STORED_BLOCK)<<1 + last
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			{
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
				}
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
				}

			}
			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
			*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
		} else {
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(int32(STORED_BLOCK)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			*(*int32)(unsafe.Pointer(s + 5908)) += len
		}
	}
	// send block type
	bi_windup(tls, s) /* align on byte boundary */
	{
		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(stored_len)) & 0xff)
		}
		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(stored_len)) >> 8)
		}

	}

	{
		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(^stored_len)) & 0xff)
		}
		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(^stored_len)) >> 8)
		}

	}

	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending), buf, uint64(stored_len))
	*(*Ulg)(unsafe.Pointer(s + 40)) += stored_len
}

// ===========================================================================
// 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) { /* trees.c:886:20: */
	bi_flush(tls, s)
}

// ===========================================================================
// 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) { /* trees.c:896:20: */
	{
		var len int32 = 3
		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
			var val int32 = int32(STATIC_TREES) << 1
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			{
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
				}
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
				}

			}
			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
			*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
		} else {
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(int32(Ush(int32(STATIC_TREES)<<1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			*(*int32)(unsafe.Pointer(s + 5908)) += len
		}
	}

	{
		var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2)))
		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
			var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4)))
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			{
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
				}
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
				}

			}
			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
			*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
		} else {
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			*(*int32)(unsafe.Pointer(s + 5908)) += len
		}
	}

	bi_flush(tls, s)
}

// ===========================================================================
// 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 Ulg, last int32) { /* trees.c:911:20: */
	var opt_lenb Ulg
	var static_lenb Ulg       // opt_len and static_len in bytes
	var max_blindex int32 = 0 // index of last bit length code of non zero freq

	// Build the Huffman trees unless a stored block is forced
	if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 {

		// Check if the file is binary or text
		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN {
			(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s)
		}

		// Construct the literal and distance trees
		build_tree(tls, s, s+2880)

		build_tree(tls, s, s+2904)

		// 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 = ((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + Ulg(3) + Ulg(7)) >> 3
		static_lenb = ((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + Ulg(3) + Ulg(7)) >> 3

		if static_lenb <= opt_lenb {
			opt_lenb = static_lenb
		}

	} else {

		opt_lenb = libc.AssignUint32(&static_lenb, stored_len+Ulg(5)) // force a stored block
	}

	if stored_len+Ulg(4) <= opt_lenb && buf != uintptr(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.
		z.X_tr_stored_block(tls, s, buf, stored_len, last)

	} else if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED || static_lenb == opt_lenb {
		{
			var len int32 = 3
			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
				var val int32 = int32(STATIC_TREES)<<1 + last
				*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
				{
					{
						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
					}
					{
						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
					}

				}
				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
				*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
			} else {
				*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(int32(STATIC_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
				*(*int32)(unsafe.Pointer(s + 5908)) += len
			}
		}

		compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))),
			uintptr(uintptr(unsafe.Pointer(&static_dtree))))
	} else {
		{
			var len int32 = 3
			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
				var val int32 = int32(DYN_TREES)<<1 + last
				*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
				{
					{
						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
					}
					{
						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
					}

				}
				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
				*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
			} else {
				*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(int32(DYN_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
				*(*int32)(unsafe.Pointer(s + 5908)) += len
			}
		}

		send_all_trees(tls, s, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code+1, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code+1,
			max_blindex+1)
		compress_block(tls, s, s+188, /* &.dyn_ltree */
			s+2480 /* &.dyn_dtree */)
	}

	// The above check is made mod 2^32, for files larger than 512 MB
	// and uLong implemented on 32 bits.
	init_block(tls, s)

	if last != 0 {
		bi_windup(tls, s)
	}

}

// ===========================================================================
// Save the match info and tally the frequency counts. Return true if
// the current block must be flushed.
func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */
	*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist)
	*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc)
	if dist == uint32(0) {
		// lc is the unmatched char
		*(*Ush)(unsafe.Pointer(s + 188 + uintptr(lc)*4))++
	} else {
		(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
		// Here, lc is the match length - MIN_MATCH
		dist-- // dist = match distance - 1

		*(*Ush)(unsafe.Pointer(s + 188 + uintptr(int32(z.X_length_code[lc])+LITERALS+1)*4))++
		*(*Ush)(unsafe.Pointer(s + 2480 + uintptr(func() int32 {
			if dist < uint32(256) {
				return int32(z.X_dist_code[dist])
			}
			return int32(z.X_dist_code[uint32(256)+dist>>7])
		}())*4))++
	}

	return libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
	// We avoid equality with lit_bufsize because of wraparound at 64K
	// on 16 bit machines and because stored blocks are restricted to
	// 64K-1 bytes.
}

// ===========================================================================
// Send the block data compressed using the given Huffman trees
func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */
	var dist uint32           // distance of matched string
	var lc int32              // match length or unmatched char (if dist == 0)
	var lx uint32 = uint32(0) // running index in l_buf
	var code uint32           // the code to send
	var extra int32           // number of extra bits to send

	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) {
		for ok := true; ok; ok = lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit {
			dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2)))
			lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1)))))
			if dist == uint32(0) {
				{
					var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2)))
					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
						var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4)))
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						{
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
							}
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
							}

						}
						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
						*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
					} else {
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						*(*int32)(unsafe.Pointer(s + 5908)) += len
					}
				}
				// send a literal byte

			} else {
				// Here, lc is the match length - MIN_MATCH
				code = uint32(z.X_length_code[lc])
				{
					var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4 + 2)))
					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
						var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4)))
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						{
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
							}
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
							}

						}
						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
						*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
					} else {
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						*(*int32)(unsafe.Pointer(s + 5908)) += len
					}
				}
				// send the length code
				extra = extra_lbits[code]
				if extra != 0 {
					lc = lc - base_length[code]
					{
						var len int32 = extra
						if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
							var val int32 = lc
							*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
							{
								{
									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
								}
								{
									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
								}

							}
							(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
							*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
						} else {
							*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(lc)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
							*(*int32)(unsafe.Pointer(s + 5908)) += len
						}
					}
					// send the extra length bits
				}
				dist-- // dist is now the match distance - 1
				code = func() uint32 {
					if dist < uint32(256) {
						return uint32(z.X_dist_code[dist])
					}
					return uint32(z.X_dist_code[uint32(256)+dist>>7])
				}()

				{
					var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2)))
					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
						var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4)))
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						{
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
							}
							{
								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
							}

						}
						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
						*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
					} else {
						*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
						*(*int32)(unsafe.Pointer(s + 5908)) += len
					}
				}
				// send the distance code
				extra = extra_dbits[code]
				if extra != 0 {
					dist = dist - uint32(base_dist[code])
					{
						var len int32 = extra
						if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
							var val int32 = int32(dist)
							*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
							{
								{
									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
								}
								{
									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
								}

							}
							(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
							*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
						} else {
							*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(dist)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
							*(*int32)(unsafe.Pointer(s + 5908)) += len
						}
					}
					// send the extra distance bits
				}
			} // literal or match pair ?

			// Check that the overlay between pending_buf and d_buf+l_buf is ok:

		}
	}

	{
		var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2)))
		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
			var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4)))
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			{
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
				}
				{
					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
				}

			}
			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
			*(*int32)(unsafe.Pointer(s + 5908)) += len - Buf_size
		} else {
			*(*Ush)(unsafe.Pointer(s + 5904)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
			*(*int32)(unsafe.Pointer(s + 5908)) += len
		}
	}

}

// ===========================================================================
// 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
//       "black list" (0..6, 14..25, 28..31).
//    b) There is at least one printable character belonging to the
//       "white 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) int32 { /* trees.c:1124:11: */
	// black_mask is the bit mask of black-listed bytes
	// set bits 0..6, 14..25, and 28..31
	// 0xf3ffc07f = binary 11110011111111111100000001111111
	var black_mask uint32 = 0xf3ffc07f
	var n int32

	// Check for non-textual ("black-listed") bytes.
	n = 0
__1:
	if !(n <= 31) {
		goto __3
	}
	if black_mask&uint32(1) != 0 && int32(*(*Ush)(unsafe.Pointer(s + 188 + uintptr(n)*4))) != 0 {
		return Z_BINARY
	}
	goto __2
__2:
	n++
	black_mask >>= 1
	goto __1
	goto __3
__3:
	;

	// Check for textual ("white-listed") bytes.
	if int32(*(*Ush)(unsafe.Pointer(s + 188 + 9*4))) != 0 || int32(*(*Ush)(unsafe.Pointer(s + 188 + 10*4))) != 0 ||
		int32(*(*Ush)(unsafe.Pointer(s + 188 + 13*4))) != 0 {
		return Z_TEXT
	}
	for n = 32; n < LITERALS; n++ {
		if int32(*(*Ush)(unsafe.Pointer(s + 188 + uintptr(n)*4))) != 0 {
			return Z_TEXT
		}
	}

	// There are no "black-listed" or "white-listed" bytes:
	// this stream either is empty or has tolerated ("gray-listed") bytes only.
	return Z_BINARY
}

// ===========================================================================
// 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, len int32) uint32 { /* trees.c:1158:16: */
	var res uint32 = uint32(0)
	for ok := true; ok; ok = libc.PreDecInt32(&len, 1) > 0 {
		res = res | code&uint32(1)
		code >>= 1
		res <<= 1
	}
	return res >> 1
}

// ===========================================================================
// Flush the bit buffer, keeping at most 7 bits in it.
func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */
	if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 {
		{
			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
			}
			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
			}

		}

		(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
		(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
	} else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 {
		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)
		}

		libc.AssignShrPtrUint16(s+5904, int(8))
		*(*int32)(unsafe.Pointer(s + 5908)) -= 8
	}
}

// ===========================================================================
// Flush the bit buffer and align the output on a byte boundary
func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */
	if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 {
		{
			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
			}
			{
				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
			}

		}

	} else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 {
		{
			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)
		}

	}
	(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
	(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
}

// ===========================================================================
//      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) int32 { /* uncompr.c:27:13: */
	bp := tls.Alloc(96)
	defer tls.Free(96)

	// var stream Z_stream at bp+8, 88

	var err int32
	var max UInt = libc.Uint32(libc.Uint32FromInt32(-1))
	var len ULong
	var left ULong
	// var buf [1]Byte at bp, 1
	// for detection of incomplete stream when *destLen == 0

	len = *(*ULong)(unsafe.Pointer(sourceLen))
	if *(*ULongf)(unsafe.Pointer(destLen)) != 0 {
		left = *(*ULongf)(unsafe.Pointer(destLen))
		*(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0)
	} else {
		left = ULong(1)
		dest = bp /* &buf[0] */
	}

	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_in = source
	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = UInt(0)
	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzalloc = uintptr(0)
	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzfree = uintptr(0)
	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fopaque = uintptr(0)

	err = z.XinflateInit_(tls, bp+8, ts+65, int32(unsafe.Sizeof(Z_stream{})))
	if err != Z_OK {
		return err
	}

	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_out = dest
	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = UInt(0)

	for ok := true; ok; ok = err == Z_OK {
		if (*Z_stream)(unsafe.Pointer(bp+8)).Favail_out == UInt(0) {
			(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = func() uint32 {
				if left > ULong(max) {
					return max
				}
				return UInt(left)
			}()
			left = left - ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_out)
		}
		if (*Z_stream)(unsafe.Pointer(bp+8)).Favail_in == UInt(0) {
			(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = func() uint32 {
				if len > ULong(max) {
					return max
				}
				return UInt(len)
			}()
			len = len - ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_in)
		}
		err = z.Xinflate(tls, bp+8, Z_NO_FLUSH)
	}

	*(*ULong)(unsafe.Pointer(sourceLen)) -= len + ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_in)
	if dest != bp {
		*(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Ftotal_out
	} else if (*Z_stream)(unsafe.Pointer(bp+8)).Ftotal_out != 0 && err == -5 {
		left = ULong(1)
	}

	z.XinflateEnd(tls, bp+8)
	if err == Z_STREAM_END {
		return Z_OK
	}
	if err == Z_NEED_DICT {
		return -3
	}
	if err == -5 && left+ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_out) != 0 {
		return -3
	}
	return err
}

func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */
	bp := tls.Alloc(4)
	defer tls.Free(4)
	*(*ULong)(unsafe.Pointer(bp)) = sourceLen

	return z.Xuncompress2(tls, dest, destLen, source, bp)
}

// default memLevel

// default i/o buffer size -- double this for output when reading (this and
//    twice this must be able to fit in an unsigned type)

// gzip modes, also provide a little integrity check on the passed structure

// values for gz_state how

// internal gzip file state data structure
type Gz_state = struct {
	Fx        GzFile_s
	Fmode     int32
	Ffd       int32
	Fpath     uintptr
	Fsize     uint32
	Fwant     uint32
	Fin       uintptr
	Fout      uintptr
	Fdirect   int32
	Fhow      int32
	Fstart    Off_t
	Feof      int32
	Fpast     int32
	Flevel    int32
	Fstrategy int32
	Fskip     Off_t
	Fseek     int32
	Ferr      int32
	Fmsg      uintptr
	Fstrm     Z_stream
}                        /* gzguts.h:201:3 */
type Gz_statep = uintptr /* gzguts.h:202:22 */

// GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
//    value -- needed when comparing unsigned to z_off64_t, which is signed
//    (possible z_off64_t types off_t, off64_t, and long are all signed)

var Xz_errmsg = [10]uintptr{
	uintptr(ts + 74324),
	uintptr(ts + 74340),
	uintptr(ts + 2631),
	uintptr(ts + 74351),
	uintptr(ts + 74362),
	uintptr(ts + 74375),
	uintptr(ts + 74386),
	uintptr(ts + 74406),
	uintptr(ts + 74419),
	uintptr(ts + 2631),
} /* zutil.c:13:14 */

func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */
	return ts + 65 /* "1.2.11" */
}

func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */
	var flags ULong

	flags = ULong(0)
	switch int32(unsafe.Sizeof(UInt(0))) {
	case 2:
		break
	case 4:
		flags = flags + ULong(1)
		break
	case 8:
		flags = flags + ULong(2)
		break
	default:
		flags = flags + ULong(3)
	}
	switch int32(unsafe.Sizeof(ULong(0))) {
	case 2:
		break
	case 4:
		flags = flags + ULong(int32(1)<<2)
		break
	case 8:
		flags = flags + ULong(int32(2)<<2)
		break
	default:
		flags = flags + ULong(int32(3)<<2)
	}
	switch int32(unsafe.Sizeof(Voidpf(0))) {
	case 2:
		break
	case 4:
		flags = flags + ULong(int32(1)<<4)
		break
	case 8:
		flags = flags + ULong(int32(2)<<4)
		break
	default:
		flags = flags + ULong(int32(3)<<4)
	}
	switch int32(unsafe.Sizeof(Off_t(0))) {
	case 2:
		break
	case 4:
		flags = flags + ULong(int32(1)<<6)
		break
	case 8:
		flags = flags + ULong(int32(2)<<6)
		break
	default:
		flags = flags + ULong(int32(3)<<6)
	}
	return flags
}

// exported to allow conversion of error code to string for compress() and
// uncompress()
func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */
	return z.Xz_errmsg[Z_NEED_DICT-err]
}

func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */
	_ = opaque
	if uint64(unsafe.Sizeof(UInt(0))) > uint64(2) {
		return libc.Xmalloc(tls, uint64(items*size))
	}
	return libc.Xcalloc(tls, uint64(items), uint64(size))
}

func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */
	_ = opaque
	libc.Xfree(tls, ptr)
}

func init() {
	*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclArrayHashKeyType)) + 8)) = sHashArrayKey                                     // tclHash.c:85:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclArrayHashKeyType)) + 16)) = sCompareArrayKeys                                 // tclHash.c:86:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclArrayHashKeyType)) + 24)) = sAllocArrayEntry                                // tclHash.c:87:5:
	*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclArrayHashKeyType)) + 8)) = sHashArrayKey                                     // tclHash.c:85:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclArrayHashKeyType)) + 16)) = sCompareArrayKeys                                 // tclHash.c:86:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclArrayHashKeyType)) + 24)) = sAllocArrayEntry                                // tclHash.c:87:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclArraySearchType)) + 32)) = sSetArraySearchObj                                 // tclVar.c:256:23:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclArraySearchType)) + 32)) = sSetArraySearchObj                                 // tclVar.c:256:23:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclBignumType)) + 8)) = sFreeBignum                                                             // tclObj.c:285:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclBignumType)) + 16)) = sDupBignum                                                    // tclObj.c:286:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclBignumType)) + 24)) = sUpdateStringOfBignum                                                  // tclObj.c:287:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclBignumType)) + 8)) = sFreeBignum                                                             // tclObj.c:285:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclBignumType)) + 16)) = sDupBignum                                                    // tclObj.c:286:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclBignumType)) + 24)) = sUpdateStringOfBignum                                                  // tclObj.c:287:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclBooleanType)) + 32)) = XTclSetBooleanFromAny                                  // tclObj.c:258:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclBooleanType)) + 32)) = XTclSetBooleanFromAny                                  // tclObj.c:258:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteArrayType)) + 8)) = sFreeByteArrayInternalRep                                            // tclBinary.c:184:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteArrayType)) + 16)) = sDupByteArrayInternalRep                                   // tclBinary.c:185:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteArrayType)) + 24)) = sUpdateStringOfByteArray                                            // tclBinary.c:186:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteArrayType)) + 32)) = sSetByteArrayFromAny                                 // tclBinary.c:187:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteArrayType)) + 8)) = sFreeByteArrayInternalRep                                            // tclBinary.c:184:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteArrayType)) + 16)) = sDupByteArrayInternalRep                                   // tclBinary.c:185:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteArrayType)) + 24)) = sUpdateStringOfByteArray                                            // tclBinary.c:186:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteArrayType)) + 32)) = sSetByteArrayFromAny                                 // tclBinary.c:187:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteCodeType)) + 8)) = sFreeByteCodeInternalRep                                              // tclCompile.c:708:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteCodeType)) + 16)) = sDupByteCodeInternalRep                                     // tclCompile.c:709:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteCodeType)) + 32)) = sSetByteCodeFromAny                                   // tclCompile.c:711:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteCodeType)) + 8)) = sFreeByteCodeInternalRep                                              // tclCompile.c:708:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteCodeType)) + 16)) = sDupByteCodeInternalRep                                     // tclCompile.c:709:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclByteCodeType)) + 32)) = sSetByteCodeFromAny                                   // tclCompile.c:711:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCmdNameType)) + 8)) = sFreeCmdNameInternalRep                                                // tclObj.c:329:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCmdNameType)) + 16)) = sDupCmdNameInternalRep                                       // tclObj.c:330:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCmdNameType)) + 32)) = sSetCmdNameFromAny                                     // tclObj.c:332:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCmdNameType)) + 8)) = sFreeCmdNameInternalRep                                                // tclObj.c:329:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCmdNameType)) + 16)) = sDupCmdNameInternalRep                                       // tclObj.c:330:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclCmdNameType)) + 32)) = sSetCmdNameFromAny                                     // tclObj.c:332:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDictType)) + 8)) = sFreeDictInternalRep                                                      // tclDictObj.c:165:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDictType)) + 16)) = sDupDictInternalRep                                             // tclDictObj.c:166:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDictType)) + 24)) = sUpdateStringOfDict                                                      // tclDictObj.c:167:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDictType)) + 32)) = sSetDictFromAny                                           // tclDictObj.c:168:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDictType)) + 8)) = sFreeDictInternalRep                                                      // tclDictObj.c:165:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDictType)) + 16)) = sDupDictInternalRep                                             // tclDictObj.c:166:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDictType)) + 24)) = sUpdateStringOfDict                                                      // tclDictObj.c:167:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDictType)) + 32)) = sSetDictFromAny                                           // tclDictObj.c:168:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDoubleType)) + 24)) = sUpdateStringOfDouble                                                  // tclObj.c:264:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDoubleType)) + 32)) = sSetDoubleFromAny                                       // tclObj.c:265:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDoubleType)) + 24)) = sUpdateStringOfDouble                                                  // tclObj.c:264:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclDoubleType)) + 32)) = sSetDoubleFromAny                                       // tclObj.c:265:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclEmptyStringRep)) + 0)) = uintptr(unsafe.Pointer(&XtclEmptyString))                                            // tclObj.c:52:27:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclEmptyStringRep)) + 0)) = uintptr(unsafe.Pointer(&XtclEmptyString))                                            // tclObj.c:52:27:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclEndOffsetType)) + 24)) = sUpdateStringOfEndOffset                                            // tclUtil.c:132:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclEndOffsetType)) + 32)) = sSetEndOffsetFromAny                                 // tclUtil.c:133:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclEndOffsetType)) + 24)) = sUpdateStringOfEndOffset                                            // tclUtil.c:132:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclEndOffsetType)) + 32)) = sSetEndOffsetFromAny                                 // tclUtil.c:133:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclGetTimeProcPtr)) + 0)) = sNativeGetTime                                          // tclWinTime.c:151:38:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclGetTimeProcPtr)) + 0)) = sNativeGetTime                                          // tclWinTime.c:151:38:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclIntType)) + 24)) = sUpdateStringOfInt                                                        // tclObj.c:271:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclIntType)) + 32)) = sSetIntFromAny                                             // tclObj.c:272:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclIntType)) + 24)) = sUpdateStringOfInt                                                        // tclObj.c:271:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclIntType)) + 32)) = sSetIntFromAny                                             // tclObj.c:272:5:
	*(*func(*libc.TLS, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclJumptableInfoType)) + 8)) = sDupJumptableInfo                                  // tclCompCmdsSZ.c:76:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclJumptableInfoType)) + 16)) = sFreeJumptableInfo                                           // tclCompCmdsSZ.c:77:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclJumptableInfoType)) + 24)) = sPrintJumptableInfo                // tclCompCmdsSZ.c:78:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclJumptableInfoType)) + 32)) = sDisassembleJumptableInfo          // tclCompCmdsSZ.c:79:5:
	*(*func(*libc.TLS, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclJumptableInfoType)) + 8)) = sDupJumptableInfo                                  // tclCompCmdsSZ.c:76:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclJumptableInfoType)) + 16)) = sFreeJumptableInfo                                           // tclCompCmdsSZ.c:77:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclJumptableInfoType)) + 24)) = sPrintJumptableInfo                // tclCompCmdsSZ.c:78:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclJumptableInfoType)) + 32)) = sDisassembleJumptableInfo          // tclCompCmdsSZ.c:79:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclLambdaType)) + 8)) = sFreeLambdaInternalRep                                                  // tclProc.c:94:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclLambdaType)) + 16)) = sDupLambdaInternalRep                                         // tclProc.c:95:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclLambdaType)) + 32)) = sSetLambdaFromAny                                       // tclProc.c:97:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclLambdaType)) + 8)) = sFreeLambdaInternalRep                                                  // tclProc.c:94:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclLambdaType)) + 16)) = sDupLambdaInternalRep                                         // tclProc.c:95:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclLambdaType)) + 32)) = sSetLambdaFromAny                                       // tclProc.c:97:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclListType)) + 8)) = sFreeListInternalRep                                                      // tclListObj.c:43:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclListType)) + 16)) = sDupListInternalRep                                             // tclListObj.c:44:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclListType)) + 24)) = sUpdateStringOfList                                                      // tclListObj.c:45:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclListType)) + 32)) = sSetListFromAny                                           // tclListObj.c:46:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclListType)) + 8)) = sFreeListInternalRep                                                      // tclListObj.c:43:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclListType)) + 16)) = sDupListInternalRep                                             // tclListObj.c:44:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclListType)) + 24)) = sUpdateStringOfList                                                      // tclListObj.c:45:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclListType)) + 32)) = sSetListFromAny                                           // tclListObj.c:46:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 24)) = XTclNativePathInFilesystem                        // tclIOUtil.c:157:5:
	*(*func(*libc.TLS, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 32)) = XTclNativeDupInternalRep                           // tclIOUtil.c:158:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 40)) = sNativeFreeInternalRep                                        // tclIOUtil.c:159:5:
	*(*func(*libc.TLS, ClientData) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 48)) = XTclpNativeToNormalized                               // tclIOUtil.c:160:5:
	*(*func(*libc.TLS, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 56)) = XTclNativeCreateNativeRep                             // tclIOUtil.c:161:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 64)) = XTclpObjNormalizePath                      // tclIOUtil.c:162:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 72)) = XTclpFilesystemPathType                                  // tclIOUtil.c:163:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 80)) = sNativeFilesystemSeparator                               // tclIOUtil.c:164:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 88)) = XTclpObjStat                                      // tclIOUtil.c:165:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 96)) = XTclpObjAccess                                      // tclIOUtil.c:166:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 104)) = XTclpOpenFileChannel         // tclIOUtil.c:167:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 112)) = XTclpMatchInDirectory // tclIOUtil.c:168:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 120)) = XTclpUtime                                       // tclIOUtil.c:169:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 128)) = XTclpObjLink                            // tclIOUtil.c:173:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 136)) = XTclpObjListVolumes                                              // tclIOUtil.c:175:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 144)) = sNativeFileAttrStrings                         // tclIOUtil.c:176:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 152)) = sNativeFileAttrsGet              // tclIOUtil.c:177:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 160)) = sNativeFileAttrsSet              // tclIOUtil.c:178:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 168)) = XTclpObjCreateDirectory                                   // tclIOUtil.c:179:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 176)) = XTclpObjRemoveDirectory                   // tclIOUtil.c:180:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 184)) = XTclpObjDeleteFile                                        // tclIOUtil.c:181:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 192)) = XTclpObjCopyFile                                 // tclIOUtil.c:182:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 200)) = XTclpObjRenameFile                               // tclIOUtil.c:183:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 208)) = XTclpObjCopyDirectory                   // tclIOUtil.c:184:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 216)) = XTclpObjLstat                                    // tclIOUtil.c:185:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 224 /* .loadFileProc */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) int32
	}{XTclpDlopen})) // tclIOUtil.c:187:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 232 /* .getCwdProc */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData) ClientData
	}{XTclpGetNativeCwd})) // tclIOUtil.c:188:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 240)) = XTclpObjChdir                                             // tclIOUtil.c:189:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 24)) = XTclNativePathInFilesystem                        // tclIOUtil.c:157:5:
	*(*func(*libc.TLS, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 32)) = XTclNativeDupInternalRep                           // tclIOUtil.c:158:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 40)) = sNativeFreeInternalRep                                        // tclIOUtil.c:159:5:
	*(*func(*libc.TLS, ClientData) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 48)) = XTclpNativeToNormalized                               // tclIOUtil.c:160:5:
	*(*func(*libc.TLS, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 56)) = XTclNativeCreateNativeRep                             // tclIOUtil.c:161:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 64)) = XTclpObjNormalizePath                      // tclIOUtil.c:162:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 72)) = XTclpFilesystemPathType                                  // tclIOUtil.c:163:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 80)) = sNativeFilesystemSeparator                               // tclIOUtil.c:164:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 88)) = XTclpObjStat                                      // tclIOUtil.c:165:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 96)) = XTclpObjAccess                                      // tclIOUtil.c:166:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 104)) = XTclpOpenFileChannel         // tclIOUtil.c:167:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 112)) = XTclpMatchInDirectory // tclIOUtil.c:168:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 120)) = XTclpUtime                                       // tclIOUtil.c:169:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 128)) = XTclpObjLink                            // tclIOUtil.c:173:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 136)) = XTclpObjListVolumes                                              // tclIOUtil.c:175:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 144)) = sNativeFileAttrStrings                         // tclIOUtil.c:176:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 152)) = sNativeFileAttrsGet              // tclIOUtil.c:177:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 160)) = sNativeFileAttrsSet              // tclIOUtil.c:178:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 168)) = XTclpObjCreateDirectory                                   // tclIOUtil.c:179:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 176)) = XTclpObjRemoveDirectory                   // tclIOUtil.c:180:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 184)) = XTclpObjDeleteFile                                        // tclIOUtil.c:181:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 192)) = XTclpObjCopyFile                                 // tclIOUtil.c:182:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 200)) = XTclpObjRenameFile                               // tclIOUtil.c:183:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 208)) = XTclpObjCopyDirectory                   // tclIOUtil.c:184:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 216)) = XTclpObjLstat                                    // tclIOUtil.c:185:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 224 /* .loadFileProc */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) int32
	}{XTclpDlopen})) // tclIOUtil.c:187:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 232 /* .getCwdProc */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, ClientData) ClientData
	}{XTclpGetNativeCwd})) // tclIOUtil.c:188:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclNativeFilesystem)) + 240)) = XTclpObjChdir                                                                                     // tclIOUtil.c:189:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 8 /* .hooks */)) = uintptr(unsafe.Pointer(&tclOOStubHooks))                                                                               // tclOOStubInit.c:48:5:
	*(*func(*libc.TLS, uintptr, Tcl_Object, uintptr, uintptr) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 16)) = XTcl_CopyObjectInstance                                                  // tclOOStubInit.c:49:5:
	*(*func(*libc.TLS, Tcl_Class) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 24)) = XTcl_GetClassAsObject                                                                                // tclOOStubInit.c:50:5:
	*(*func(*libc.TLS, Tcl_Object) Tcl_Class)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 32)) = XTcl_GetObjectAsClass                                                                                // tclOOStubInit.c:51:5:
	*(*func(*libc.TLS, Tcl_Object) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 40)) = XTcl_GetObjectCommand                                                                              // tclOOStubInit.c:52:5:
	*(*func(*libc.TLS, uintptr, uintptr) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 48)) = XTcl_GetObjectFromObj                                                                         // tclOOStubInit.c:53:5:
	*(*func(*libc.TLS, Tcl_Object) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 56)) = XTcl_GetObjectNamespace                                                                                // tclOOStubInit.c:54:5:
	*(*func(*libc.TLS, Tcl_Method) Tcl_Class)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 64)) = XTcl_MethodDeclarerClass                                                                             // tclOOStubInit.c:55:5:
	*(*func(*libc.TLS, Tcl_Method) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 72)) = XTcl_MethodDeclarerObject                                                                           // tclOOStubInit.c:56:5:
	*(*func(*libc.TLS, Tcl_Method) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 80)) = XTcl_MethodIsPublic                                                                                      // tclOOStubInit.c:57:5:
	*(*func(*libc.TLS, Tcl_Method, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 88)) = XTcl_MethodIsType                                                                      // tclOOStubInit.c:58:5:
	*(*func(*libc.TLS, Tcl_Method) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 96)) = XTcl_MethodName                                                                                        // tclOOStubInit.c:59:5:
	*(*func(*libc.TLS, uintptr, Tcl_Object, uintptr, int32, uintptr, ClientData) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 104)) = XTcl_NewInstanceMethod                               // tclOOStubInit.c:60:5:
	*(*func(*libc.TLS, uintptr, Tcl_Class, uintptr, int32, uintptr, ClientData) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 112)) = XTcl_NewMethod                                        // tclOOStubInit.c:61:5:
	*(*func(*libc.TLS, uintptr, Tcl_Class, uintptr, uintptr, int32, uintptr, int32) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 120)) = XTcl_NewObjectInstance                            // tclOOStubInit.c:62:5:
	*(*func(*libc.TLS, Tcl_Object) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 128)) = XTcl_ObjectDeleted                                                                                      // tclOOStubInit.c:63:5:
	*(*func(*libc.TLS, Tcl_ObjectContext) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 136)) = XTcl_ObjectContextIsFiltering                                                                    // tclOOStubInit.c:64:5:
	*(*func(*libc.TLS, Tcl_ObjectContext) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 144)) = XTcl_ObjectContextMethod                                                                    // tclOOStubInit.c:65:5:
	*(*func(*libc.TLS, Tcl_ObjectContext) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 152)) = XTcl_ObjectContextObject                                                                    // tclOOStubInit.c:66:5:
	*(*func(*libc.TLS, Tcl_ObjectContext) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 160)) = XTcl_ObjectContextSkippedArgs                                                                    // tclOOStubInit.c:67:5:
	*(*func(*libc.TLS, Tcl_Class, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 168)) = XTcl_ClassGetMetadata                                                                      // tclOOStubInit.c:68:5:
	*(*func(*libc.TLS, Tcl_Class, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 176)) = XTcl_ClassSetMetadata                                                                     // tclOOStubInit.c:69:5:
	*(*func(*libc.TLS, Tcl_Object, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 184)) = XTcl_ObjectGetMetadata                                                                    // tclOOStubInit.c:70:5:
	*(*func(*libc.TLS, Tcl_Object, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 192)) = XTcl_ObjectSetMetadata                                                                   // tclOOStubInit.c:71:5:
	*(*func(*libc.TLS, uintptr, Tcl_ObjectContext, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 200)) = XTcl_ObjectContextInvokeNext                                     // tclOOStubInit.c:72:5:
	*(*func(*libc.TLS, Tcl_Object) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 208)) = XTcl_ObjectGetMethodNameMapper                                                                        // tclOOStubInit.c:73:5:
	*(*func(*libc.TLS, Tcl_Object, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 216)) = XTcl_ObjectSetMethodNameMapper                                                                       // tclOOStubInit.c:74:5:
	*(*func(*libc.TLS, uintptr, Tcl_Class, Tcl_Method))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 224)) = XTcl_ClassSetConstructor                                                                  // tclOOStubInit.c:75:5:
	*(*func(*libc.TLS, uintptr, Tcl_Class, Tcl_Method))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 232)) = XTcl_ClassSetDestructor                                                                   // tclOOStubInit.c:76:5:
	*(*func(*libc.TLS, uintptr, Tcl_Object) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 240)) = XTcl_GetObjectName                                                                           // tclOOStubInit.c:77:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 8 /* .hooks */)) = uintptr(unsafe.Pointer(&tclOOStubHooks))                                                                               // tclOOStubInit.c:48:5:
	*(*func(*libc.TLS, uintptr, Tcl_Object, uintptr, uintptr) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 16)) = XTcl_CopyObjectInstance                                                  // tclOOStubInit.c:49:5:
	*(*func(*libc.TLS, Tcl_Class) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 24)) = XTcl_GetClassAsObject                                                                                // tclOOStubInit.c:50:5:
	*(*func(*libc.TLS, Tcl_Object) Tcl_Class)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 32)) = XTcl_GetObjectAsClass                                                                                // tclOOStubInit.c:51:5:
	*(*func(*libc.TLS, Tcl_Object) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 40)) = XTcl_GetObjectCommand                                                                              // tclOOStubInit.c:52:5:
	*(*func(*libc.TLS, uintptr, uintptr) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 48)) = XTcl_GetObjectFromObj                                                                         // tclOOStubInit.c:53:5:
	*(*func(*libc.TLS, Tcl_Object) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 56)) = XTcl_GetObjectNamespace                                                                                // tclOOStubInit.c:54:5:
	*(*func(*libc.TLS, Tcl_Method) Tcl_Class)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 64)) = XTcl_MethodDeclarerClass                                                                             // tclOOStubInit.c:55:5:
	*(*func(*libc.TLS, Tcl_Method) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 72)) = XTcl_MethodDeclarerObject                                                                           // tclOOStubInit.c:56:5:
	*(*func(*libc.TLS, Tcl_Method) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 80)) = XTcl_MethodIsPublic                                                                                      // tclOOStubInit.c:57:5:
	*(*func(*libc.TLS, Tcl_Method, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 88)) = XTcl_MethodIsType                                                                      // tclOOStubInit.c:58:5:
	*(*func(*libc.TLS, Tcl_Method) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 96)) = XTcl_MethodName                                                                                        // tclOOStubInit.c:59:5:
	*(*func(*libc.TLS, uintptr, Tcl_Object, uintptr, int32, uintptr, ClientData) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 104)) = XTcl_NewInstanceMethod                               // tclOOStubInit.c:60:5:
	*(*func(*libc.TLS, uintptr, Tcl_Class, uintptr, int32, uintptr, ClientData) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 112)) = XTcl_NewMethod                                        // tclOOStubInit.c:61:5:
	*(*func(*libc.TLS, uintptr, Tcl_Class, uintptr, uintptr, int32, uintptr, int32) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 120)) = XTcl_NewObjectInstance                            // tclOOStubInit.c:62:5:
	*(*func(*libc.TLS, Tcl_Object) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 128)) = XTcl_ObjectDeleted                                                                                      // tclOOStubInit.c:63:5:
	*(*func(*libc.TLS, Tcl_ObjectContext) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 136)) = XTcl_ObjectContextIsFiltering                                                                    // tclOOStubInit.c:64:5:
	*(*func(*libc.TLS, Tcl_ObjectContext) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 144)) = XTcl_ObjectContextMethod                                                                    // tclOOStubInit.c:65:5:
	*(*func(*libc.TLS, Tcl_ObjectContext) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 152)) = XTcl_ObjectContextObject                                                                    // tclOOStubInit.c:66:5:
	*(*func(*libc.TLS, Tcl_ObjectContext) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 160)) = XTcl_ObjectContextSkippedArgs                                                                    // tclOOStubInit.c:67:5:
	*(*func(*libc.TLS, Tcl_Class, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 168)) = XTcl_ClassGetMetadata                                                                      // tclOOStubInit.c:68:5:
	*(*func(*libc.TLS, Tcl_Class, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 176)) = XTcl_ClassSetMetadata                                                                     // tclOOStubInit.c:69:5:
	*(*func(*libc.TLS, Tcl_Object, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 184)) = XTcl_ObjectGetMetadata                                                                    // tclOOStubInit.c:70:5:
	*(*func(*libc.TLS, Tcl_Object, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 192)) = XTcl_ObjectSetMetadata                                                                   // tclOOStubInit.c:71:5:
	*(*func(*libc.TLS, uintptr, Tcl_ObjectContext, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 200)) = XTcl_ObjectContextInvokeNext                                     // tclOOStubInit.c:72:5:
	*(*func(*libc.TLS, Tcl_Object) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 208)) = XTcl_ObjectGetMethodNameMapper                                                                        // tclOOStubInit.c:73:5:
	*(*func(*libc.TLS, Tcl_Object, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 216)) = XTcl_ObjectSetMethodNameMapper                                                                       // tclOOStubInit.c:74:5:
	*(*func(*libc.TLS, uintptr, Tcl_Class, Tcl_Method))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 224)) = XTcl_ClassSetConstructor                                                                  // tclOOStubInit.c:75:5:
	*(*func(*libc.TLS, uintptr, Tcl_Class, Tcl_Method))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 232)) = XTcl_ClassSetDestructor                                                                   // tclOOStubInit.c:76:5:
	*(*func(*libc.TLS, uintptr, Tcl_Object) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclOOStubs)) + 240)) = XTcl_GetObjectName                                                                           // tclOOStubInit.c:77:5:
	*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclObjHashKeyType)) + 8)) = XTclHashObjKey                                                                              // tclObj.c:298:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclObjHashKeyType)) + 16)) = XTclCompareObjKeys                                                                          // tclObj.c:299:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclObjHashKeyType)) + 24)) = sAllocObjEntry                                                                            // tclObj.c:300:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclObjHashKeyType)) + 32)) = XTclFreeObjEntry                                                                                           // tclObj.c:301:5:
	*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclObjHashKeyType)) + 8)) = XTclHashObjKey                                                                              // tclObj.c:298:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclObjHashKeyType)) + 16)) = XTclCompareObjKeys                                                                          // tclObj.c:299:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclObjHashKeyType)) + 24)) = sAllocObjEntry                                                                            // tclObj.c:300:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclObjHashKeyType)) + 32)) = XTclFreeObjEntry                                                                                           // tclObj.c:301:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclProcBodyType)) + 8)) = sProcBodyFree                                                                                                 // tclProc.c:61:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclProcBodyType)) + 16)) = sProcBodyDup                                                                                        // tclProc.c:62:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclProcBodyType)) + 8)) = sProcBodyFree                                                                                                 // tclProc.c:61:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclProcBodyType)) + 16)) = sProcBodyDup                                                                                        // tclProc.c:62:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclRegexpType)) + 8)) = sFreeRegexpInternalRep                                                                                          // tclRegexp.c:105:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclRegexpType)) + 16)) = sDupRegexpInternalRep                                                                                 // tclRegexp.c:106:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclRegexpType)) + 32)) = sSetRegexpFromAny                                                                               // tclRegexp.c:108:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclRegexpType)) + 8)) = sFreeRegexpInternalRep                                                                                          // tclRegexp.c:105:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclRegexpType)) + 16)) = sDupRegexpInternalRep                                                                                 // tclRegexp.c:106:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclRegexpType)) + 32)) = sSetRegexpFromAny                                                                               // tclRegexp.c:108:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclScaleTimeProcPtr)) + 0)) = sNativeScaleTime                                                                              // tclWinTime.c:152:42:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclScaleTimeProcPtr)) + 0)) = sNativeScaleTime                                                                              // tclWinTime.c:152:42:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 8)) = XTcl_UniCharIsAlnum                                                                                   // tclCompCmdsSZ.c:1361:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 24)) = XTcl_UniCharIsAlpha                                                                                  // tclCompCmdsSZ.c:1362:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 40)) = sUniCharIsAscii1                                                                                     // tclCompCmdsSZ.c:1363:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 56)) = XTcl_UniCharIsControl                                                                                // tclCompCmdsSZ.c:1364:17:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 72)) = XTcl_UniCharIsDigit                                                                                  // tclCompCmdsSZ.c:1365:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 88)) = XTcl_UniCharIsGraph                                                                                  // tclCompCmdsSZ.c:1366:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 104)) = XTcl_UniCharIsLower                                                                                 // tclCompCmdsSZ.c:1367:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 120)) = XTcl_UniCharIsPrint                                                                                 // tclCompCmdsSZ.c:1368:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 136)) = XTcl_UniCharIsPunct                                                                                 // tclCompCmdsSZ.c:1369:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 152)) = XTcl_UniCharIsSpace                                                                                 // tclCompCmdsSZ.c:1370:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 168)) = XTcl_UniCharIsUpper                                                                                 // tclCompCmdsSZ.c:1371:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 184)) = XTcl_UniCharIsWordChar                                                                              // tclCompCmdsSZ.c:1372:14:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 200)) = sUniCharIsHexDigit1                                                                                 // tclCompCmdsSZ.c:1373:16:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 8)) = XTcl_UniCharIsAlnum                                                                                   // tclCompCmdsSZ.c:1361:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 24)) = XTcl_UniCharIsAlpha                                                                                  // tclCompCmdsSZ.c:1362:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 40)) = sUniCharIsAscii1                                                                                     // tclCompCmdsSZ.c:1363:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 56)) = XTcl_UniCharIsControl                                                                                // tclCompCmdsSZ.c:1364:17:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 72)) = XTcl_UniCharIsDigit                                                                                  // tclCompCmdsSZ.c:1365:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 88)) = XTcl_UniCharIsGraph                                                                                  // tclCompCmdsSZ.c:1366:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 104)) = XTcl_UniCharIsLower                                                                                 // tclCompCmdsSZ.c:1367:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 120)) = XTcl_UniCharIsPrint                                                                                 // tclCompCmdsSZ.c:1368:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 136)) = XTcl_UniCharIsPunct                                                                                 // tclCompCmdsSZ.c:1369:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 152)) = XTcl_UniCharIsSpace                                                                                 // tclCompCmdsSZ.c:1370:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 168)) = XTcl_UniCharIsUpper                                                                                 // tclCompCmdsSZ.c:1371:15:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 184)) = XTcl_UniCharIsWordChar                                                                              // tclCompCmdsSZ.c:1372:14:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringClassTable)) + 200)) = sUniCharIsHexDigit1                                                                                 // tclCompCmdsSZ.c:1373:16:
	*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringHashKeyType)) + 8)) = sHashStringKey                                                                           // tclHash.c:103:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringHashKeyType)) + 16)) = sCompareStringKeys                                                                       // tclHash.c:104:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringHashKeyType)) + 24)) = sAllocStringEntry                                                                      // tclHash.c:105:5:
	*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringHashKeyType)) + 8)) = sHashStringKey                                                                           // tclHash.c:103:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringHashKeyType)) + 16)) = sCompareStringKeys                                                                       // tclHash.c:104:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringHashKeyType)) + 24)) = sAllocStringEntry                                                                      // tclHash.c:105:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringType)) + 8)) = sFreeStringInternalRep                                                                                          // tclStringObj.c:88:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringType)) + 16)) = sDupStringInternalRep                                                                                 // tclStringObj.c:89:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringType)) + 24)) = sUpdateStringOfString                                                                                          // tclStringObj.c:90:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringType)) + 32)) = sSetStringFromAny                                                                               // tclStringObj.c:91:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringType)) + 8)) = sFreeStringInternalRep                                                                                          // tclStringObj.c:88:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringType)) + 16)) = sDupStringInternalRep                                                                                 // tclStringObj.c:89:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringType)) + 24)) = sUpdateStringOfString                                                                                          // tclStringObj.c:90:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStringType)) + 32)) = sSetStringFromAny                                                                               // tclStringObj.c:91:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 8 /* .hooks */)) = uintptr(unsafe.Pointer(&tclStubHooks))                                                                                   // tclStubInit.c:967:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 16)) = XTcl_PkgProvideEx                                                                  // tclStubInit.c:968:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 24)) = XTcl_PkgRequireEx                                                         // tclStubInit.c:969:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 32)) = XTcl_Panic                                                                                                 // tclStubInit.c:970:5:
	*(*func(*libc.TLS, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 40)) = XTcl_Alloc                                                                                                   // tclStubInit.c:971:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 48)) = XTcl_Free                                                                                                           // tclStubInit.c:972:5:
	*(*func(*libc.TLS, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 56)) = XTcl_Realloc                                                                                        // tclStubInit.c:973:5:
	*(*func(*libc.TLS, uint32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 64)) = XTcl_DbCkalloc                                                                               // tclStubInit.c:974:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 72)) = XTcl_DbCkfree                                                                                       // tclStubInit.c:975:5:
	*(*func(*libc.TLS, uintptr, uint32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 80)) = XTcl_DbCkrealloc                                                                    // tclStubInit.c:976:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 104)) = XTcl_SetTimer                                                                                                      // tclStubInit.c:995:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 112)) = XTcl_Sleep                                                                                                           // tclStubInit.c:996:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 120)) = XTcl_WaitForEvent                                                                                            // tclStubInit.c:997:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 128)) = XTcl_AppendAllObjTypes                                                                              // tclStubInit.c:998:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 136)) = XTcl_AppendStringsToObj                                                                                   // tclStubInit.c:999:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 144)) = XTcl_AppendToObj                                                                                   // tclStubInit.c:1000:5:
	*(*func(*libc.TLS, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 152)) = XTcl_ConcatObj                                                                                      // tclStubInit.c:1001:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 160)) = XTcl_ConvertToType                                                                         // tclStubInit.c:1002:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 168)) = XTcl_DbDecrRefCount                                                                                // tclStubInit.c:1003:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 176)) = XTcl_DbIncrRefCount                                                                                // tclStubInit.c:1004:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 184)) = XTcl_DbIsShared                                                                              // tclStubInit.c:1005:5:
	*(*func(*libc.TLS, int32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 192)) = XTcl_DbNewBooleanObj                                                                         // tclStubInit.c:1006:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 200)) = XTcl_DbNewByteArrayObj                                                              // tclStubInit.c:1007:5:
	*(*func(*libc.TLS, float64, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 208)) = XTcl_DbNewDoubleObj                                                                        // tclStubInit.c:1008:5:
	*(*func(*libc.TLS, int32, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 216)) = XTcl_DbNewListObj                                                                   // tclStubInit.c:1009:5:
	*(*func(*libc.TLS, int32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 224)) = XTcl_DbNewLongObj                                                                            // tclStubInit.c:1010:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 232)) = XTcl_DbNewObj                                                                                       // tclStubInit.c:1011:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 240)) = XTcl_DbNewStringObj                                                                 // tclStubInit.c:1012:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 248)) = XTcl_DuplicateObj                                                                                          // tclStubInit.c:1013:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 256)) = XTclFreeObj                                                                                                        // tclStubInit.c:1014:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 264)) = XTcl_GetBoolean                                                                            // tclStubInit.c:1015:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 272)) = XTcl_GetBooleanFromObj                                                                     // tclStubInit.c:1016:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 280)) = XTcl_GetByteArrayFromObj                                                                          // tclStubInit.c:1017:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 288)) = XTcl_GetDouble                                                                             // tclStubInit.c:1018:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 296)) = XTcl_GetDoubleFromObj                                                                      // tclStubInit.c:1019:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 304)) = XTcl_GetIndexFromObj                                              // tclStubInit.c:1020:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 312)) = XTcl_GetInt                                                                                // tclStubInit.c:1021:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 320)) = XTcl_GetIntFromObj                                                                         // tclStubInit.c:1022:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 328)) = XTcl_GetLongFromObj                                                                        // tclStubInit.c:1023:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 336)) = XTcl_GetObjType                                                                                            // tclStubInit.c:1024:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 344)) = XTcl_GetStringFromObj                                                                             // tclStubInit.c:1025:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 352)) = XTcl_InvalidateStringRep                                                                                           // tclStubInit.c:1026:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 360)) = XTcl_ListObjAppendList                                                                     // tclStubInit.c:1027:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 368)) = XTcl_ListObjAppendElement                                                                  // tclStubInit.c:1028:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 376)) = XTcl_ListObjGetElements                                                           // tclStubInit.c:1029:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 384)) = XTcl_ListObjIndex                                                                   // tclStubInit.c:1030:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 392)) = XTcl_ListObjLength                                                                         // tclStubInit.c:1031:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 400)) = XTcl_ListObjReplace                                                   // tclStubInit.c:1032:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 408)) = XTcl_NewBooleanObj                                                                                           // tclStubInit.c:1033:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 416)) = XTcl_NewByteArrayObj                                                                                // tclStubInit.c:1034:5:
	*(*func(*libc.TLS, float64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 424)) = XTcl_NewDoubleObj                                                                                          // tclStubInit.c:1035:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 432)) = XTcl_NewIntObj                                                                                               // tclStubInit.c:1036:5:
	*(*func(*libc.TLS, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 440)) = XTcl_NewListObj                                                                                     // tclStubInit.c:1037:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 448)) = XTcl_NewLongObj                                                                                              // tclStubInit.c:1038:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 456)) = XTcl_NewObj                                                                                                         // tclStubInit.c:1039:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 464)) = XTcl_NewStringObj                                                                                   // tclStubInit.c:1040:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 472)) = XTcl_SetBooleanObj                                                                                          // tclStubInit.c:1041:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 480)) = XTcl_SetByteArrayLength                                                                             // tclStubInit.c:1042:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 488)) = XTcl_SetByteArrayObj                                                                               // tclStubInit.c:1043:5:
	*(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 496)) = XTcl_SetDoubleObj                                                                                         // tclStubInit.c:1044:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 504)) = XTcl_SetIntObj                                                                                              // tclStubInit.c:1045:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 512)) = XTcl_SetListObj                                                                                    // tclStubInit.c:1046:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 520)) = XTcl_SetLongObj                                                                                             // tclStubInit.c:1047:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 528)) = XTcl_SetObjLength                                                                                           // tclStubInit.c:1048:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 536)) = XTcl_SetStringObj                                                                                  // tclStubInit.c:1049:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 544)) = XTcl_AddErrorInfo                                                                                         // tclStubInit.c:1050:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 552)) = XTcl_AddObjErrorInfo                                                                               // tclStubInit.c:1051:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 560)) = XTcl_AllowExceptions                                                                                               // tclStubInit.c:1052:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 568)) = XTcl_AppendElement                                                                                        // tclStubInit.c:1053:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 576)) = XTcl_AppendResult                                                                                         // tclStubInit.c:1054:5:
	*(*func(*libc.TLS, uintptr, ClientData) Tcl_AsyncHandler)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 584)) = XTcl_AsyncCreate                                                                      // tclStubInit.c:1055:5:
	*(*func(*libc.TLS, Tcl_AsyncHandler))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 592)) = XTcl_AsyncDelete                                                                                          // tclStubInit.c:1056:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 600)) = XTcl_AsyncInvoke                                                                                      // tclStubInit.c:1057:5:
	*(*func(*libc.TLS, Tcl_AsyncHandler))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 608)) = XTcl_AsyncMark                                                                                            // tclStubInit.c:1058:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 616)) = XTcl_AsyncReady                                                                                                       // tclStubInit.c:1059:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 624)) = XTcl_BackgroundError                                                                                               // tclStubInit.c:1060:5:
	*(*func(*libc.TLS, uintptr, uintptr) int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 632)) = XTcl_Backslash                                                                                       // tclStubInit.c:1061:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 640)) = XTcl_BadChannelOption                                                                      // tclStubInit.c:1062:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 648)) = XTcl_CallWhenDeleted                                                                          // tclStubInit.c:1063:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 656)) = XTcl_CancelIdleCall                                                                                    // tclStubInit.c:1064:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 664)) = XTcl_Close                                                                                      // tclStubInit.c:1065:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 672)) = XTcl_CommandComplete                                                                                         // tclStubInit.c:1066:5:
	*(*func(*libc.TLS, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 680)) = XTcl_Concat                                                                                         // tclStubInit.c:1067:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 688)) = XTcl_ConvertElement                                                                          // tclStubInit.c:1068:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 696)) = XTcl_ConvertCountedElement                                                            // tclStubInit.c:1069:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 704)) = XTcl_CreateAlias                                                  // tclStubInit.c:1070:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 712)) = XTcl_CreateAliasObj                                               // tclStubInit.c:1071:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 720)) = XTcl_CreateChannel                                                         // tclStubInit.c:1072:5:
	*(*func(*libc.TLS, Tcl_Channel, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 728)) = XTcl_CreateChannelHandler                                                          // tclStubInit.c:1073:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 736)) = XTcl_CreateCloseHandler                                                                   // tclStubInit.c:1074:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 744)) = XTcl_CreateCommand                                              // tclStubInit.c:1075:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 752)) = XTcl_CreateEventSource                                                                        // tclStubInit.c:1076:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 760)) = XTcl_CreateExitHandler                                                                                 // tclStubInit.c:1077:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 768)) = XTcl_CreateInterp                                                                                                   // tclStubInit.c:1078:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 776)) = XTcl_CreateMathFunc                                                  // tclStubInit.c:1079:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 784)) = XTcl_CreateObjCommand                                           // tclStubInit.c:1080:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 792)) = XTcl_CreateSlave                                                                           // tclStubInit.c:1081:5:
	*(*func(*libc.TLS, int32, uintptr, ClientData) Tcl_TimerToken)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 800)) = XTcl_CreateTimerHandler                                                          // tclStubInit.c:1082:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, ClientData) Tcl_Trace)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 808)) = XTcl_CreateTrace                                                             // tclStubInit.c:1083:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 816)) = XTcl_DeleteAssocData                                                                                      // tclStubInit.c:1084:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 824)) = XTcl_DeleteChannelHandler                                                                 // tclStubInit.c:1085:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 832)) = XTcl_DeleteCloseHandler                                                                   // tclStubInit.c:1086:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 840)) = XTcl_DeleteCommand                                                                                  // tclStubInit.c:1087:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 848)) = XTcl_DeleteCommandFromToken                                                                     // tclStubInit.c:1088:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 856)) = XTcl_DeleteEvents                                                                                      // tclStubInit.c:1089:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 864)) = XTcl_DeleteEventSource                                                                        // tclStubInit.c:1090:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 872)) = XTcl_DeleteExitHandler                                                                                 // tclStubInit.c:1091:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 880)) = XTcl_DeleteHashEntry                                                                                               // tclStubInit.c:1092:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 888)) = XTcl_DeleteHashTable                                                                                               // tclStubInit.c:1093:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 896)) = XTcl_DeleteInterp                                                                                                  // tclStubInit.c:1094:5:
	*(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 904)) = XTcl_DetachPids                                                                                             // tclStubInit.c:1095:5:
	*(*func(*libc.TLS, Tcl_TimerToken))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 912)) = XTcl_DeleteTimerHandler                                                                                     // tclStubInit.c:1096:5:
	*(*func(*libc.TLS, uintptr, Tcl_Trace))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 920)) = XTcl_DeleteTrace                                                                                        // tclStubInit.c:1097:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 928)) = XTcl_DontCallWhenDeleted                                                                      // tclStubInit.c:1098:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 936)) = XTcl_DoOneEvent                                                                                                // tclStubInit.c:1099:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 944)) = XTcl_DoWhenIdle                                                                                        // tclStubInit.c:1100:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 952)) = XTcl_DStringAppend                                                                         // tclStubInit.c:1101:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 960)) = XTcl_DStringAppendElement                                                                         // tclStubInit.c:1102:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 968)) = XTcl_DStringEndSublist                                                                                             // tclStubInit.c:1103:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 976)) = XTcl_DStringFree                                                                                                   // tclStubInit.c:1104:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 984)) = XTcl_DStringGetResult                                                                                     // tclStubInit.c:1105:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 992)) = XTcl_DStringInit                                                                                                   // tclStubInit.c:1106:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1000)) = XTcl_DStringResult                                                                                       // tclStubInit.c:1107:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1008)) = XTcl_DStringSetLength                                                                                      // tclStubInit.c:1108:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1016)) = XTcl_DStringStartSublist                                                                                          // tclStubInit.c:1109:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1024)) = XTcl_Eof                                                                                                // tclStubInit.c:1110:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1032)) = XTcl_ErrnoId                                                                                                       // tclStubInit.c:1111:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1040)) = XTcl_ErrnoMsg                                                                                               // tclStubInit.c:1112:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1048)) = XTcl_Eval                                                                                          // tclStubInit.c:1113:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1056)) = XTcl_EvalFile                                                                                      // tclStubInit.c:1114:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1064)) = XTcl_EvalObj                                                                                       // tclStubInit.c:1115:5:
	*(*func(*libc.TLS, ClientData, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1072)) = XTcl_EventuallyFree                                                                                   // tclStubInit.c:1116:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1080)) = XTcl_Exit                                                                                                           // tclStubInit.c:1117:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1088)) = XTcl_ExposeCommand                                                                        // tclStubInit.c:1118:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1096)) = XTcl_ExprBoolean                                                                          // tclStubInit.c:1119:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1104)) = XTcl_ExprBooleanObj                                                                       // tclStubInit.c:1120:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1112)) = XTcl_ExprDouble                                                                           // tclStubInit.c:1121:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1120)) = XTcl_ExprDoubleObj                                                                        // tclStubInit.c:1122:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1128)) = XTcl_ExprLong                                                                             // tclStubInit.c:1123:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1136)) = XTcl_ExprLongObj                                                                          // tclStubInit.c:1124:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1144)) = XTcl_ExprObj                                                                              // tclStubInit.c:1125:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1152)) = XTcl_ExprString                                                                                    // tclStubInit.c:1126:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1160)) = XTcl_Finalize                                                                                                              // tclStubInit.c:1127:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1168)) = XTcl_FindExecutable                                                                                               // tclStubInit.c:1128:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1176)) = XTcl_FirstHashEntry                                                                              // tclStubInit.c:1129:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1184)) = XTcl_Flush                                                                                              // tclStubInit.c:1130:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1192)) = XTcl_FreeResult                                                                                                   // tclStubInit.c:1131:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1200)) = XTcl_GetAlias                                                  // tclStubInit.c:1132:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1208)) = XTcl_GetAliasObj                                               // tclStubInit.c:1133:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1216)) = XTcl_GetAssocData                                                                    // tclStubInit.c:1134:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1224)) = XTcl_GetChannel                                                                     // tclStubInit.c:1135:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1232)) = XTcl_GetChannelBufferSize                                                                               // tclStubInit.c:1136:5:
	*(*func(*libc.TLS, Tcl_Channel, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1240)) = XTcl_GetChannelHandle                                                                   // tclStubInit.c:1137:5:
	*(*func(*libc.TLS, Tcl_Channel) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1248)) = XTcl_GetChannelInstanceData                                                                        // tclStubInit.c:1138:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1256)) = XTcl_GetChannelMode                                                                                     // tclStubInit.c:1139:5:
	*(*func(*libc.TLS, Tcl_Channel) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1264)) = XTcl_GetChannelName                                                                                   // tclStubInit.c:1140:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1272)) = XTcl_GetChannelOption                                                        // tclStubInit.c:1141:5:
	*(*func(*libc.TLS, Tcl_Channel) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1280)) = XTcl_GetChannelType                                                                                   // tclStubInit.c:1142:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1288)) = XTcl_GetCommandInfo                                                                       // tclStubInit.c:1143:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1296)) = XTcl_GetCommandName                                                                          // tclStubInit.c:1144:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1304)) = XTcl_GetErrno                                                                                                        // tclStubInit.c:1145:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1312)) = XTcl_GetHostName                                                                                                   // tclStubInit.c:1146:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1320)) = XTcl_GetInterpPath                                                                                 // tclStubInit.c:1147:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1328)) = XTcl_GetMaster                                                                                            // tclStubInit.c:1148:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1336)) = XTcl_GetNameOfExecutable                                                                                           // tclStubInit.c:1149:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1344)) = XTcl_GetObjResult                                                                                         // tclStubInit.c:1150:5:
	*(*func(*libc.TLS, uintptr) Tcl_PathType)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1360)) = XTcl_GetPathType                                                                                     // tclStubInit.c:1160:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1368)) = XTcl_Gets                                                                                      // tclStubInit.c:1161:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1376)) = XTcl_GetsObj                                                                                   // tclStubInit.c:1162:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1384)) = XTcl_GetServiceMode                                                                                                  // tclStubInit.c:1163:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1392)) = XTcl_GetSlave                                                                                    // tclStubInit.c:1164:5:
	*(*func(*libc.TLS, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1400)) = XTcl_GetStdChannel                                                                                      // tclStubInit.c:1165:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1408)) = XTcl_GetStringResult                                                                                      // tclStubInit.c:1166:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1416)) = XTcl_GetVar                                                                               // tclStubInit.c:1167:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1424)) = XTcl_GetVar2                                                                     // tclStubInit.c:1168:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1432)) = XTcl_GlobalEval                                                                                    // tclStubInit.c:1169:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1440)) = XTcl_GlobalEvalObj                                                                                 // tclStubInit.c:1170:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1448)) = XTcl_HideCommand                                                                          // tclStubInit.c:1171:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1456)) = XTcl_Init                                                                                                   // tclStubInit.c:1172:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1464)) = XTcl_InitHashTable                                                                                         // tclStubInit.c:1173:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1472)) = XTcl_InputBlocked                                                                                       // tclStubInit.c:1174:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1480)) = XTcl_InputBuffered                                                                                      // tclStubInit.c:1175:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1488)) = XTcl_InterpDeleted                                                                                          // tclStubInit.c:1176:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1496)) = XTcl_IsSafe                                                                                                 // tclStubInit.c:1177:5:
	*(*func(*libc.TLS, int32, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1504)) = XTcl_JoinPath                                                                             // tclStubInit.c:1178:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1512)) = XTcl_LinkVar                                                                       // tclStubInit.c:1179:5:
	*(*func(*libc.TLS, ClientData, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1528)) = XTcl_MakeFileChannel                                                                        // tclStubInit.c:1181:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1536)) = XTcl_MakeSafe                                                                                               // tclStubInit.c:1182:5:
	*(*func(*libc.TLS, ClientData) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1544)) = XTcl_MakeTcpClientChannel                                                                          // tclStubInit.c:1183:5:
	*(*func(*libc.TLS, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1552)) = XTcl_Merge                                                                                         // tclStubInit.c:1184:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1560)) = XTcl_NextHashEntry                                                                                        // tclStubInit.c:1185:5:
	*(*func(*libc.TLS, Tcl_Channel, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1568)) = XTcl_NotifyChannel                                                                                     // tclStubInit.c:1186:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1576)) = XTcl_ObjGetVar2                                                                  // tclStubInit.c:1187:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1584)) = XTcl_ObjSetVar2                                                         // tclStubInit.c:1188:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1592)) = XTcl_OpenCommandChannel                                                        // tclStubInit.c:1189:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1600)) = XTcl_OpenFileChannel                                                         // tclStubInit.c:1190:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1608)) = XTcl_OpenTcpClient                                             // tclStubInit.c:1191:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, ClientData) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1616)) = XTcl_OpenTcpServer                                               // tclStubInit.c:1192:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1624)) = XTcl_Preserve                                                                                                  // tclStubInit.c:1193:5:
	*(*func(*libc.TLS, uintptr, float64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1632)) = XTcl_PrintDouble                                                                                // tclStubInit.c:1194:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1640)) = XTcl_PutEnv                                                                                                 // tclStubInit.c:1195:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1648)) = XTcl_PosixError                                                                                           // tclStubInit.c:1196:5:
	*(*func(*libc.TLS, uintptr, Tcl_QueuePosition))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1656)) = XTcl_QueueEvent                                                                                // tclStubInit.c:1197:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1664)) = XTcl_Read                                                                               // tclStubInit.c:1198:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1672)) = XTcl_ReapDetachedProcs                                                                                                     // tclStubInit.c:1199:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1680)) = XTcl_RecordAndEval                                                                          // tclStubInit.c:1200:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1688)) = XTcl_RecordAndEvalObj                                                                       // tclStubInit.c:1201:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1696)) = XTcl_RegisterChannel                                                                                 // tclStubInit.c:1202:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1704)) = XTcl_RegisterObjType                                                                                              // tclStubInit.c:1203:5:
	*(*func(*libc.TLS, uintptr, uintptr) Tcl_RegExp)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1712)) = XTcl_RegExpCompile                                                                            // tclStubInit.c:1204:5:
	*(*func(*libc.TLS, uintptr, Tcl_RegExp, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1720)) = XTcl_RegExpExec                                                               // tclStubInit.c:1205:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1728)) = XTcl_RegExpMatch                                                                          // tclStubInit.c:1206:5:
	*(*func(*libc.TLS, Tcl_RegExp, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1736)) = XTcl_RegExpRange                                                                      // tclStubInit.c:1207:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1744)) = XTcl_Release                                                                                                   // tclStubInit.c:1208:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1752)) = XTcl_ResetResult                                                                                                  // tclStubInit.c:1209:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1760)) = XTcl_ScanElement                                                                                   // tclStubInit.c:1210:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1768)) = XTcl_ScanCountedElement                                                                     // tclStubInit.c:1211:5:
	*(*func(*libc.TLS, Tcl_Channel, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1776)) = XTcl_SeekOld                                                                              // tclStubInit.c:1212:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1784)) = XTcl_ServiceAll                                                                                                      // tclStubInit.c:1213:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1792)) = XTcl_ServiceEvent                                                                                             // tclStubInit.c:1214:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1800)) = XTcl_SetAssocData                                                                   // tclStubInit.c:1215:5:
	*(*func(*libc.TLS, Tcl_Channel, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1808)) = XTcl_SetChannelBufferSize                                                                              // tclStubInit.c:1216:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1816)) = XTcl_SetChannelOption                                                        // tclStubInit.c:1217:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1824)) = XTcl_SetCommandInfo                                                                       // tclStubInit.c:1218:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1832)) = XTcl_SetErrno                                                                                                       // tclStubInit.c:1219:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1840)) = XTcl_SetErrorCode                                                                                        // tclStubInit.c:1220:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1848)) = XTcl_SetMaxBlockTime                                                                                              // tclStubInit.c:1221:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1856)) = XTcl_SetPanicProc                                                                                                 // tclStubInit.c:1222:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1864)) = XTcl_SetRecursionLimit                                                                               // tclStubInit.c:1223:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1872)) = XTcl_SetResult                                                                                  // tclStubInit.c:1224:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1880)) = XTcl_SetServiceMode                                                                                           // tclStubInit.c:1225:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1888)) = XTcl_SetObjErrorCode                                                                                     // tclStubInit.c:1226:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1896)) = XTcl_SetObjResult                                                                                        // tclStubInit.c:1227:5:
	*(*func(*libc.TLS, Tcl_Channel, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1904)) = XTcl_SetStdChannel                                                                                     // tclStubInit.c:1228:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1912)) = XTcl_SetVar                                                                      // tclStubInit.c:1229:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1920)) = XTcl_SetVar2                                                            // tclStubInit.c:1230:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1928)) = XTcl_SignalId                                                                                               // tclStubInit.c:1231:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1936)) = XTcl_SignalMsg                                                                                              // tclStubInit.c:1232:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1944)) = XTcl_SourceRCFile                                                                                                 // tclStubInit.c:1233:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1952)) = XTcl_SplitList                                                                   // tclStubInit.c:1234:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1960)) = XTcl_SplitPath                                                                                  // tclStubInit.c:1235:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1968)) = XTcl_StaticPackage                                                                     // tclStubInit.c:1236:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1976)) = XTcl_StringMatch                                                                                   // tclStubInit.c:1237:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1984)) = XTcl_TellOld                                                                                            // tclStubInit.c:1238:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1992)) = XTcl_TraceVar                                                          // tclStubInit.c:1239:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, ClientData) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2000)) = XTcl_TraceVar2                                                // tclStubInit.c:1240:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2008)) = XTcl_TranslateFileName                                                                  // tclStubInit.c:1241:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2016)) = XTcl_Ungets                                                                      // tclStubInit.c:1242:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2024)) = XTcl_UnlinkVar                                                                                           // tclStubInit.c:1243:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2032)) = XTcl_UnregisterChannel                                                                         // tclStubInit.c:1244:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2040)) = XTcl_UnsetVar                                                                               // tclStubInit.c:1245:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2048)) = XTcl_UnsetVar2                                                                     // tclStubInit.c:1246:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2056)) = XTcl_UntraceVar                                                              // tclStubInit.c:1247:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2064)) = XTcl_UntraceVar2                                                    // tclStubInit.c:1248:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2072)) = XTcl_UpdateLinkedVar                                                                                     // tclStubInit.c:1249:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2080)) = XTcl_UpVar                                                                // tclStubInit.c:1250:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2088)) = XTcl_UpVar2                                                      // tclStubInit.c:1251:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2096)) = XTcl_VarEval                                                                                       // tclStubInit.c:1252:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2104)) = XTcl_VarTraceInfo                                                 // tclStubInit.c:1253:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2112)) = XTcl_VarTraceInfo2                                       // tclStubInit.c:1254:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2120)) = XTcl_Write                                                                              // tclStubInit.c:1255:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2128)) = XTcl_WrongNumArgs                                                                        // tclStubInit.c:1256:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2136)) = XTcl_DumpActiveMemory                                                                                       // tclStubInit.c:1257:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2144)) = XTcl_ValidateAllMemory                                                                                     // tclStubInit.c:1258:5:
	*(*func(*libc.TLS, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2152)) = XTcl_AppendResultVA                                                                                      // tclStubInit.c:1259:5:
	*(*func(*libc.TLS, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2160)) = XTcl_AppendStringsToObjVA                                                                                // tclStubInit.c:1260:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2168)) = XTcl_HashStats                                                                                            // tclStubInit.c:1261:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2176)) = XTcl_ParseVar                                                                           // tclStubInit.c:1262:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2184)) = XTcl_PkgPresent                                                                  // tclStubInit.c:1263:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2192)) = XTcl_PkgPresentEx                                                       // tclStubInit.c:1264:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2200)) = XTcl_PkgProvide                                                                           // tclStubInit.c:1265:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2208)) = XTcl_PkgRequire                                                                  // tclStubInit.c:1266:5:
	*(*func(*libc.TLS, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2216)) = XTcl_SetErrorCodeVA                                                                                      // tclStubInit.c:1267:5:
	*(*func(*libc.TLS, uintptr, Va_list) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2224)) = XTcl_VarEvalVA                                                                                     // tclStubInit.c:1268:5:
	*(*func(*libc.TLS, Tcl_Pid, uintptr, int32) Tcl_Pid)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2232)) = XTcl_WaitPid                                                                              // tclStubInit.c:1269:5:
	*(*func(*libc.TLS, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2240)) = XTcl_PanicVA                                                                                             // tclStubInit.c:1270:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2248)) = XTcl_GetVersion                                                                        // tclStubInit.c:1271:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2256)) = XTcl_InitMemory                                                                                                   // tclStubInit.c:1272:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32, Tcl_Channel) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2264)) = XTcl_StackChannel                                            // tclStubInit.c:1273:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2272)) = XTcl_UnstackChannel                                                                            // tclStubInit.c:1274:5:
	*(*func(*libc.TLS, Tcl_Channel) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2280)) = XTcl_GetStackedChannel                                                                            // tclStubInit.c:1275:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2288)) = XTcl_SetMainLoop                                                                                                  // tclStubInit.c:1276:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2304)) = XTcl_AppendObjToObj                                                                                      // tclStubInit.c:1278:5:
	*(*func(*libc.TLS, uintptr) Tcl_Encoding)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2312)) = XTcl_CreateEncoding                                                                                  // tclStubInit.c:1279:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2320)) = XTcl_CreateThreadExitHandler                                                                          // tclStubInit.c:1280:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2328)) = XTcl_DeleteThreadExitHandler                                                                          // tclStubInit.c:1281:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2336)) = XTcl_DiscardResult                                                                                                // tclStubInit.c:1282:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2344)) = XTcl_EvalEx                                                                          // tclStubInit.c:1283:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2352)) = XTcl_EvalObjv                                                                        // tclStubInit.c:1284:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2360)) = XTcl_EvalObjEx                                                                              // tclStubInit.c:1285:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2368)) = XTcl_ExitThread                                                                                                     // tclStubInit.c:1286:5:
	*(*func(*libc.TLS, uintptr, Tcl_Encoding, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2376)) = XTcl_ExternalToUtf // tclStubInit.c:1287:5:
	*(*func(*libc.TLS, Tcl_Encoding, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2384)) = XTcl_ExternalToUtfDString                                                   // tclStubInit.c:1288:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2392)) = XTcl_FinalizeThread                                                                                                        // tclStubInit.c:1289:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2400)) = XTcl_FinalizeNotifier                                                                                          // tclStubInit.c:1290:5:
	*(*func(*libc.TLS, Tcl_Encoding))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2408)) = XTcl_FreeEncoding                                                                                            // tclStubInit.c:1291:5:
	*(*func(*libc.TLS) Tcl_ThreadId)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2416)) = XTcl_GetCurrentThread                                                                                         // tclStubInit.c:1292:5:
	*(*func(*libc.TLS, uintptr, uintptr) Tcl_Encoding)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2424)) = XTcl_GetEncoding                                                                            // tclStubInit.c:1293:5:
	*(*func(*libc.TLS, Tcl_Encoding) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2432)) = XTcl_GetEncodingName                                                                                 // tclStubInit.c:1294:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2440)) = XTcl_GetEncodingNames                                                                                             // tclStubInit.c:1295:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2448)) = XTcl_GetIndexFromObjStruct                                // tclStubInit.c:1296:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2456)) = XTcl_GetThreadData                                                                                 // tclStubInit.c:1297:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2464)) = XTcl_GetVar2Ex                                                                   // tclStubInit.c:1298:5:
	*(*func(*libc.TLS) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2472)) = XTcl_InitNotifier                                                                                               // tclStubInit.c:1299:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2480)) = XTcl_MutexLock                                                                                                    // tclStubInit.c:1300:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2488)) = XTcl_MutexUnlock                                                                                                  // tclStubInit.c:1301:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2496)) = XTcl_ConditionNotify                                                                                              // tclStubInit.c:1302:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2504)) = XTcl_ConditionWait                                                                              // tclStubInit.c:1303:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2512)) = XTcl_NumUtfChars                                                                                     // tclStubInit.c:1304:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2520)) = XTcl_ReadChars                                                                   // tclStubInit.c:1305:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2528)) = XTcl_RestoreResult                                                                                       // tclStubInit.c:1306:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2536)) = XTcl_SaveResult                                                                                          // tclStubInit.c:1307:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2544)) = XTcl_SetSystemEncoding                                                                             // tclStubInit.c:1308:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2552)) = XTcl_SetVar2Ex                                                          // tclStubInit.c:1309:5:
	*(*func(*libc.TLS, Tcl_ThreadId))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2560)) = XTcl_ThreadAlert                                                                                             // tclStubInit.c:1310:5:
	*(*func(*libc.TLS, Tcl_ThreadId, uintptr, Tcl_QueuePosition))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2568)) = XTcl_ThreadQueueEvent                                                            // tclStubInit.c:1311:5:
	*(*func(*libc.TLS, uintptr, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2576)) = XTcl_UniCharAtIndex                                                                            // tclStubInit.c:1312:5:
	*(*func(*libc.TLS, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2584)) = XTcl_UniCharToLower                                                                                     // tclStubInit.c:1313:5:
	*(*func(*libc.TLS, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2592)) = XTcl_UniCharToTitle                                                                                     // tclStubInit.c:1314:5:
	*(*func(*libc.TLS, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2600)) = XTcl_UniCharToUpper                                                                                     // tclStubInit.c:1315:5:
	*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2608)) = XTcl_UniCharToUtf                                                                                    // tclStubInit.c:1316:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2616)) = XTcl_UtfAtIndex                                                                                    // tclStubInit.c:1317:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2624)) = XTcl_UtfCharComplete                                                                                 // tclStubInit.c:1318:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2632)) = XTcl_UtfBackslash                                                                         // tclStubInit.c:1319:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2640)) = XTcl_UtfFindFirst                                                                                  // tclStubInit.c:1320:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2648)) = XTcl_UtfFindLast                                                                                   // tclStubInit.c:1321:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2656)) = XTcl_UtfNext                                                                                              // tclStubInit.c:1322:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2664)) = XTcl_UtfPrev                                                                                     // tclStubInit.c:1323:5:
	*(*func(*libc.TLS, uintptr, Tcl_Encoding, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2672)) = XTcl_UtfToExternal // tclStubInit.c:1324:5:
	*(*func(*libc.TLS, Tcl_Encoding, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2680)) = XTcl_UtfToExternalDString                                                   // tclStubInit.c:1325:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2688)) = XTcl_UtfToLower                                                                                             // tclStubInit.c:1326:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2696)) = XTcl_UtfToTitle                                                                                             // tclStubInit.c:1327:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2704)) = XTcl_UtfToUniChar                                                                                  // tclStubInit.c:1328:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2712)) = XTcl_UtfToUpper                                                                                             // tclStubInit.c:1329:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2720)) = XTcl_WriteChars                                                                         // tclStubInit.c:1330:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2728)) = XTcl_WriteObj                                                                                  // tclStubInit.c:1331:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2736)) = XTcl_GetString                                                                                            // tclStubInit.c:1332:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2744)) = XTcl_GetDefaultEncodingDir                                                                                         // tclStubInit.c:1333:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2752)) = XTcl_SetDefaultEncodingDir                                                                                        // tclStubInit.c:1334:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2760)) = XTcl_AlertNotifier                                                                                             // tclStubInit.c:1335:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2768)) = XTcl_ServiceModeHook                                                                                                // tclStubInit.c:1336:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2776)) = XTcl_UniCharIsAlnum                                                                                           // tclStubInit.c:1337:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2784)) = XTcl_UniCharIsAlpha                                                                                           // tclStubInit.c:1338:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2792)) = XTcl_UniCharIsDigit                                                                                           // tclStubInit.c:1339:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2800)) = XTcl_UniCharIsLower                                                                                           // tclStubInit.c:1340:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2808)) = XTcl_UniCharIsSpace                                                                                           // tclStubInit.c:1341:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2816)) = XTcl_UniCharIsUpper                                                                                           // tclStubInit.c:1342:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2824)) = XTcl_UniCharIsWordChar                                                                                        // tclStubInit.c:1343:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2832)) = XTcl_UniCharLen                                                                                             // tclStubInit.c:1344:5:
	*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2840)) = XTcl_UniCharNcmp                                                                           // tclStubInit.c:1345:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2848)) = XTcl_UniCharToUtfDString                                                                  // tclStubInit.c:1346:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2856)) = XTcl_UtfToUniCharDString                                                                  // tclStubInit.c:1347:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) Tcl_RegExp)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2864)) = XTcl_GetRegExpFromObj                                                                  // tclStubInit.c:1348:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2872)) = XTcl_EvalTokens                                                                           // tclStubInit.c:1349:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2880)) = XTcl_FreeParse                                                                                                    // tclStubInit.c:1350:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2888)) = XTcl_LogCommandInfo                                                                      // tclStubInit.c:1351:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2896)) = XTcl_ParseBraces                                                   // tclStubInit.c:1352:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2904)) = XTcl_ParseCommand                                                           // tclStubInit.c:1353:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2912)) = XTcl_ParseExpr                                                                     // tclStubInit.c:1354:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2920)) = XTcl_ParseQuotedString                                             // tclStubInit.c:1355:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2928)) = XTcl_ParseVarName                                                           // tclStubInit.c:1356:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2936)) = XTcl_GetCwd                                                                                      // tclStubInit.c:1357:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2944)) = XTcl_Chdir                                                                                                  // tclStubInit.c:1358:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2952)) = XTcl_Access                                                                                          // tclStubInit.c:1359:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2960)) = XTcl_Stat                                                                                          // tclStubInit.c:1360:5:
	*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2968)) = XTcl_UtfNcmp                                                                               // tclStubInit.c:1361:5:
	*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2976)) = XTcl_UtfNcasecmp                                                                           // tclStubInit.c:1362:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2984)) = XTcl_StringCaseMatch                                                                        // tclStubInit.c:1363:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2992)) = XTcl_UniCharIsControl                                                                                         // tclStubInit.c:1364:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3000)) = XTcl_UniCharIsGraph                                                                                           // tclStubInit.c:1365:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3008)) = XTcl_UniCharIsPrint                                                                                           // tclStubInit.c:1366:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3016)) = XTcl_UniCharIsPunct                                                                                           // tclStubInit.c:1367:5:
	*(*func(*libc.TLS, uintptr, Tcl_RegExp, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3024)) = XTcl_RegExpExecObj                                                // tclStubInit.c:1368:5:
	*(*func(*libc.TLS, Tcl_RegExp, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3032)) = XTcl_RegExpGetInfo                                                                                    // tclStubInit.c:1369:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3040)) = XTcl_NewUnicodeObj                                                                                 // tclStubInit.c:1370:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3048)) = XTcl_SetUnicodeObj                                                                                // tclStubInit.c:1371:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3056)) = XTcl_GetCharLength                                                                                          // tclStubInit.c:1372:5:
	*(*func(*libc.TLS, uintptr, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3064)) = XTcl_GetUniChar                                                                                // tclStubInit.c:1373:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3072)) = XTcl_GetUnicode                                                                                           // tclStubInit.c:1374:5:
	*(*func(*libc.TLS, uintptr, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3080)) = XTcl_GetRange                                                                               // tclStubInit.c:1375:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3088)) = XTcl_AppendUnicodeToObj                                                                           // tclStubInit.c:1376:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3096)) = XTcl_RegExpMatchObj                                                                       // tclStubInit.c:1377:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3104)) = XTcl_SetNotifier                                                                                                  // tclStubInit.c:1378:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3112)) = XTcl_GetAllocMutex                                                                                                 // tclStubInit.c:1379:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3120)) = XTcl_GetChannelNames                                                                                        // tclStubInit.c:1380:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3128)) = XTcl_GetChannelNamesEx                                                                             // tclStubInit.c:1381:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3136)) = XTcl_ProcObjCmd                                                                 // tclStubInit.c:1382:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3144)) = XTcl_ConditionFinalize                                                                                            // tclStubInit.c:1383:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3152)) = XTcl_MutexFinalize                                                                                                // tclStubInit.c:1384:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3160)) = XTcl_CreateThread                                                        // tclStubInit.c:1385:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3168)) = XTcl_ReadRaw                                                                            // tclStubInit.c:1386:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3176)) = XTcl_WriteRaw                                                                           // tclStubInit.c:1387:5:
	*(*func(*libc.TLS, Tcl_Channel) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3184)) = XTcl_GetTopChannel                                                                                // tclStubInit.c:1388:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3192)) = XTcl_ChannelBuffered                                                                                    // tclStubInit.c:1389:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3200)) = XTcl_ChannelName                                                                                          // tclStubInit.c:1390:5:
	*(*func(*libc.TLS, uintptr) Tcl_ChannelTypeVersion)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3208)) = XTcl_ChannelVersion                                                                        // tclStubInit.c:1391:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3216)) = XTcl_ChannelBlockModeProc                                                                                 // tclStubInit.c:1392:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3224)) = XTcl_ChannelCloseProc                                                                                     // tclStubInit.c:1393:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3232)) = XTcl_ChannelClose2Proc                                                                                    // tclStubInit.c:1394:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3240)) = XTcl_ChannelInputProc                                                                                     // tclStubInit.c:1395:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3248)) = XTcl_ChannelOutputProc                                                                                    // tclStubInit.c:1396:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3256)) = XTcl_ChannelSeekProc                                                                                      // tclStubInit.c:1397:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3264)) = XTcl_ChannelSetOptionProc                                                                                 // tclStubInit.c:1398:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3272)) = XTcl_ChannelGetOptionProc                                                                                 // tclStubInit.c:1399:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3280)) = XTcl_ChannelWatchProc                                                                                     // tclStubInit.c:1400:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3288)) = XTcl_ChannelGetHandleProc                                                                                 // tclStubInit.c:1401:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3296)) = XTcl_ChannelFlushProc                                                                                     // tclStubInit.c:1402:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3304)) = XTcl_ChannelHandlerProc                                                                                   // tclStubInit.c:1403:5:
	*(*func(*libc.TLS, Tcl_ThreadId, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3312)) = XTcl_JoinThread                                                                               // tclStubInit.c:1404:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3320)) = XTcl_IsChannelShared                                                                                    // tclStubInit.c:1405:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3328)) = XTcl_IsChannelRegistered                                                                       // tclStubInit.c:1406:5:
	*(*func(*libc.TLS, Tcl_Channel))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3336)) = XTcl_CutChannel                                                                                               // tclStubInit.c:1407:5:
	*(*func(*libc.TLS, Tcl_Channel))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3344)) = XTcl_SpliceChannel                                                                                            // tclStubInit.c:1408:5:
	*(*func(*libc.TLS, Tcl_Channel))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3352)) = XTcl_ClearChannelHandlers                                                                                     // tclStubInit.c:1409:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3360)) = XTcl_IsChannelExisting                                                                                      // tclStubInit.c:1410:5:
	*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3368)) = XTcl_UniCharNcasecmp                                                                       // tclStubInit.c:1411:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3376)) = XTcl_UniCharCaseMatch                                                                       // tclStubInit.c:1412:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3384)) = XTcl_FindHashEntry                                                                               // tclStubInit.c:1413:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3392)) = XTcl_CreateHashEntry                                                                    // tclStubInit.c:1414:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3400)) = XTcl_InitCustomHashTable                                                                          // tclStubInit.c:1415:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3408)) = XTcl_InitObjHashTable                                                                                             // tclStubInit.c:1416:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3416)) = XTcl_CommandTraceInfo                                             // tclStubInit.c:1417:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3424)) = XTcl_TraceCommand                                                      // tclStubInit.c:1418:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3432)) = XTcl_UntraceCommand                                                          // tclStubInit.c:1419:5:
	*(*func(*libc.TLS, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3440)) = XTcl_AttemptAlloc                                                                                          // tclStubInit.c:1420:5:
	*(*func(*libc.TLS, uint32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3448)) = XTcl_AttemptDbCkalloc                                                                      // tclStubInit.c:1421:5:
	*(*func(*libc.TLS, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3456)) = XTcl_AttemptRealloc                                                                               // tclStubInit.c:1422:5:
	*(*func(*libc.TLS, uintptr, uint32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3464)) = XTcl_AttemptDbCkrealloc                                                           // tclStubInit.c:1423:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3472)) = XTcl_AttemptSetObjLength                                                                             // tclStubInit.c:1424:5:
	*(*func(*libc.TLS, Tcl_Channel) Tcl_ThreadId)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3480)) = XTcl_GetChannelThread                                                                            // tclStubInit.c:1425:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3488)) = XTcl_GetUnicodeFromObj                                                                           // tclStubInit.c:1426:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3496)) = XTcl_GetMathFuncInfo                                           // tclStubInit.c:1427:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3504)) = XTcl_ListMathFuncs                                                                               // tclStubInit.c:1428:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3512)) = XTcl_SubstObj                                                                             // tclStubInit.c:1429:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3520)) = XTcl_DetachChannel                                                                             // tclStubInit.c:1430:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3528)) = XTcl_IsStandardChannel                                                                                  // tclStubInit.c:1431:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3536)) = XTcl_FSCopyFile                                                                                    // tclStubInit.c:1432:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3544)) = XTcl_FSCopyDirectory                                                                      // tclStubInit.c:1433:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3552)) = XTcl_FSCreateDirectory                                                                                      // tclStubInit.c:1434:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3560)) = XTcl_FSDeleteFile                                                                                           // tclStubInit.c:1435:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3568)) = XTcl_FSLoadFile                              // tclStubInit.c:1436:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3576)) = XTcl_FSMatchInDirectory                                                 // tclStubInit.c:1437:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3584)) = XTcl_FSLink                                                                               // tclStubInit.c:1438:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3592)) = XTcl_FSRemoveDirectory                                                                      // tclStubInit.c:1439:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3600)) = XTcl_FSRenameFile                                                                                  // tclStubInit.c:1440:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3608)) = XTcl_FSLstat                                                                                       // tclStubInit.c:1441:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3616)) = XTcl_FSUtime                                                                                       // tclStubInit.c:1442:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3624)) = XTcl_FSFileAttrsGet                                                                // tclStubInit.c:1443:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3632)) = XTcl_FSFileAttrsSet                                                                // tclStubInit.c:1444:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3640)) = XTcl_FSFileAttrStrings                                                                           // tclStubInit.c:1445:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3648)) = XTcl_FSStat                                                                                        // tclStubInit.c:1446:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3656)) = XTcl_FSAccess                                                                                        // tclStubInit.c:1447:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3664)) = XTcl_FSOpenFileChannel                                                       // tclStubInit.c:1448:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3672)) = XTcl_FSGetCwd                                                                                             // tclStubInit.c:1449:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3680)) = XTcl_FSChdir                                                                                                // tclStubInit.c:1450:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3688)) = XTcl_FSConvertToPathType                                                                           // tclStubInit.c:1451:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3696)) = XTcl_FSJoinPath                                                                                    // tclStubInit.c:1452:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3704)) = XTcl_FSSplitPath                                                                                 // tclStubInit.c:1453:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3712)) = XTcl_FSEqualPaths                                                                                  // tclStubInit.c:1454:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3720)) = XTcl_FSGetNormalizedPath                                                                         // tclStubInit.c:1455:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3728)) = XTcl_FSJoinToPath                                                                         // tclStubInit.c:1456:5:
	*(*func(*libc.TLS, uintptr, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3736)) = XTcl_FSGetInternalRep                                                                         // tclStubInit.c:1457:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3744)) = XTcl_FSGetTranslatedPath                                                                         // tclStubInit.c:1458:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3752)) = XTcl_FSEvalFile                                                                                    // tclStubInit.c:1459:5:
	*(*func(*libc.TLS, uintptr, ClientData) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3760)) = XTcl_FSNewNativePath                                                                          // tclStubInit.c:1460:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3768)) = XTcl_FSGetNativePath                                                                                      // tclStubInit.c:1461:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3776)) = XTcl_FSFileSystemInfo                                                                                     // tclStubInit.c:1462:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3784)) = XTcl_FSPathSeparator                                                                                      // tclStubInit.c:1463:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3792)) = XTcl_FSListVolumes                                                                                                 // tclStubInit.c:1464:5:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3800)) = XTcl_FSRegister                                                                                 // tclStubInit.c:1465:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3808)) = XTcl_FSUnregister                                                                                           // tclStubInit.c:1466:5:
	*(*func(*libc.TLS, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3816)) = XTcl_FSData                                                                                            // tclStubInit.c:1467:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3824)) = XTcl_FSGetTranslatedStringPath                                                                   // tclStubInit.c:1468:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3832)) = XTcl_FSGetFileSystemForPath                                                                               // tclStubInit.c:1469:5:
	*(*func(*libc.TLS, uintptr) Tcl_PathType)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3840)) = XTcl_FSGetPathType                                                                                   // tclStubInit.c:1470:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3848)) = XTcl_OutputBuffered                                                                                     // tclStubInit.c:1471:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3856)) = XTcl_FSMountsChanged                                                                                              // tclStubInit.c:1472:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3864)) = XTcl_EvalTokensStandard                                                                     // tclStubInit.c:1473:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3872)) = XTcl_GetTime                                                                                                      // tclStubInit.c:1474:5:
	*(*func(*libc.TLS, uintptr, int32, int32, uintptr, ClientData, uintptr) Tcl_Trace)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3880)) = XTcl_CreateObjTrace                                         // tclStubInit.c:1475:5:
	*(*func(*libc.TLS, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3888)) = XTcl_GetCommandInfoFromToken                                                                   // tclStubInit.c:1476:5:
	*(*func(*libc.TLS, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3896)) = XTcl_SetCommandInfoFromToken                                                                   // tclStubInit.c:1477:5:
	*(*func(*libc.TLS, Tcl_WideInt, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3904)) = XTcl_DbNewWideIntObj                                                                  // tclStubInit.c:1478:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3912)) = XTcl_GetWideIntFromObj                                                                    // tclStubInit.c:1479:5:
	*(*func(*libc.TLS, Tcl_WideInt) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3920)) = XTcl_NewWideIntObj                                                                                    // tclStubInit.c:1480:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideInt))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3928)) = XTcl_SetWideIntObj                                                                                   // tclStubInit.c:1481:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3936)) = XTcl_AllocStatBuf                                                                                                  // tclStubInit.c:1482:5:
	*(*func(*libc.TLS, Tcl_Channel, Tcl_WideInt, int32) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3944)) = XTcl_Seek                                                                     // tclStubInit.c:1483:5:
	*(*func(*libc.TLS, Tcl_Channel) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3952)) = XTcl_Tell                                                                                         // tclStubInit.c:1484:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3960)) = XTcl_ChannelWideSeekProc                                                                                  // tclStubInit.c:1485:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3968)) = XTcl_DictObjPut                                                                  // tclStubInit.c:1486:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3976)) = XTcl_DictObjGet                                                                  // tclStubInit.c:1487:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3984)) = XTcl_DictObjRemove                                                                        // tclStubInit.c:1488:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3992)) = XTcl_DictObjSize                                                                          // tclStubInit.c:1489:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4000)) = XTcl_DictObjFirst                                              // tclStubInit.c:1490:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4008)) = XTcl_DictObjNext                                                                       // tclStubInit.c:1491:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4016)) = XTcl_DictObjDone                                                                                                  // tclStubInit.c:1492:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4024)) = XTcl_DictObjPutKeyList                                                    // tclStubInit.c:1493:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4032)) = XTcl_DictObjRemoveKeyList                                                          // tclStubInit.c:1494:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4040)) = XTcl_NewDictObj                                                                                                    // tclStubInit.c:1495:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4048)) = XTcl_DbNewDictObj                                                                                  // tclStubInit.c:1496:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4056)) = XTcl_RegisterConfig                                                                    // tclStubInit.c:1497:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4064)) = XTcl_CreateNamespace                                                        // tclStubInit.c:1498:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4072)) = XTcl_DeleteNamespace                                                                                              // tclStubInit.c:1499:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4080)) = XTcl_AppendExportList                                                                     // tclStubInit.c:1500:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4088)) = XTcl_Export                                                                        // tclStubInit.c:1501:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4096)) = XTcl_Import                                                                        // tclStubInit.c:1502:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4104)) = XTcl_ForgetImport                                                                         // tclStubInit.c:1503:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4112)) = XTcl_GetCurrentNamespace                                                                                  // tclStubInit.c:1504:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4120)) = XTcl_GetGlobalNamespace                                                                                   // tclStubInit.c:1505:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4128)) = XTcl_FindNamespace                                                               // tclStubInit.c:1506:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4136)) = XTcl_FindCommand                                                             // tclStubInit.c:1507:5:
	*(*func(*libc.TLS, uintptr, uintptr) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4144)) = XTcl_GetCommandFromObj                                                                       // tclStubInit.c:1508:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4152)) = XTcl_GetCommandFullName                                                                     // tclStubInit.c:1509:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4160)) = XTcl_FSEvalFileEx                                                                         // tclStubInit.c:1510:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4168)) = XTcl_SetExitProc                                                                                          // tclStubInit.c:1511:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, ClientData, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4176)) = XTcl_LimitAddHandler                                                         // tclStubInit.c:1512:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4184)) = XTcl_LimitRemoveHandler                                                               // tclStubInit.c:1513:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4192)) = XTcl_LimitReady                                                                                             // tclStubInit.c:1514:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4200)) = XTcl_LimitCheck                                                                                             // tclStubInit.c:1515:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4208)) = XTcl_LimitExceeded                                                                                          // tclStubInit.c:1516:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4216)) = XTcl_LimitSetCommands                                                                                      // tclStubInit.c:1517:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4224)) = XTcl_LimitSetTime                                                                                        // tclStubInit.c:1518:5:
	*(*func(*libc.TLS, uintptr, int32, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4232)) = XTcl_LimitSetGranularity                                                                            // tclStubInit.c:1519:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4240)) = XTcl_LimitTypeEnabled                                                                                // tclStubInit.c:1520:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4248)) = XTcl_LimitTypeExceeded                                                                               // tclStubInit.c:1521:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4256)) = XTcl_LimitTypeSet                                                                                          // tclStubInit.c:1522:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4264)) = XTcl_LimitTypeReset                                                                                        // tclStubInit.c:1523:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4272)) = XTcl_LimitGetCommands                                                                                       // tclStubInit.c:1524:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4280)) = XTcl_LimitGetTime                                                                                        // tclStubInit.c:1525:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4288)) = XTcl_LimitGetGranularity                                                                             // tclStubInit.c:1526:5:
	*(*func(*libc.TLS, uintptr, int32) Tcl_InterpState)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4296)) = XTcl_SaveInterpState                                                                       // tclStubInit.c:1527:5:
	*(*func(*libc.TLS, uintptr, Tcl_InterpState) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4304)) = XTcl_RestoreInterpState                                                                    // tclStubInit.c:1528:5:
	*(*func(*libc.TLS, Tcl_InterpState))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4312)) = XTcl_DiscardInterpState                                                                                   // tclStubInit.c:1529:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4320)) = XTcl_SetReturnOptions                                                                              // tclStubInit.c:1530:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4328)) = XTcl_GetReturnOptions                                                                              // tclStubInit.c:1531:5:
	*(*func(*libc.TLS, Tcl_Command) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4336)) = XTcl_IsEnsemble                                                                                         // tclStubInit.c:1532:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4344)) = XTcl_CreateEnsemble                                                          // tclStubInit.c:1533:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4352)) = XTcl_FindEnsemble                                                                     // tclStubInit.c:1534:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4360)) = XTcl_SetEnsembleSubcommandList                                                        // tclStubInit.c:1535:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4368)) = XTcl_SetEnsembleMappingDict                                                           // tclStubInit.c:1536:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4376)) = XTcl_SetEnsembleUnknownHandler                                                        // tclStubInit.c:1537:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4384)) = XTcl_SetEnsembleFlags                                                                   // tclStubInit.c:1538:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4392)) = XTcl_GetEnsembleSubcommandList                                                        // tclStubInit.c:1539:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4400)) = XTcl_GetEnsembleMappingDict                                                           // tclStubInit.c:1540:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4408)) = XTcl_GetEnsembleUnknownHandler                                                        // tclStubInit.c:1541:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4416)) = XTcl_GetEnsembleFlags                                                                 // tclStubInit.c:1542:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4424)) = XTcl_GetEnsembleNamespace                                                             // tclStubInit.c:1543:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4432)) = XTcl_SetTimeProc                                                                             // tclStubInit.c:1544:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4440)) = XTcl_QueryTimeProc                                                                              // tclStubInit.c:1545:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4448)) = XTcl_ChannelThreadActionProc                                                                              // tclStubInit.c:1546:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4456)) = XTcl_NewBignumObj                                                                                         // tclStubInit.c:1547:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4464)) = XTcl_DbNewBignumObj                                                                       // tclStubInit.c:1548:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4472)) = XTcl_SetBignumObj                                                                                        // tclStubInit.c:1549:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4480)) = XTcl_GetBignumFromObj                                                                     // tclStubInit.c:1550:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4488)) = XTcl_TakeBignumFromObj                                                                    // tclStubInit.c:1551:5:
	*(*func(*libc.TLS, Tcl_Channel, Tcl_WideInt) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4496)) = XTcl_TruncateChannel                                                                       // tclStubInit.c:1552:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4504)) = XTcl_ChannelTruncateProc                                                                                  // tclStubInit.c:1553:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4512)) = XTcl_SetChannelErrorInterp                                                                               // tclStubInit.c:1554:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4520)) = XTcl_GetChannelErrorInterp                                                                               // tclStubInit.c:1555:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4528)) = XTcl_SetChannelError                                                                                 // tclStubInit.c:1556:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4536)) = XTcl_GetChannelError                                                                                 // tclStubInit.c:1557:5:
	*(*func(*libc.TLS, uintptr, float64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4544)) = XTcl_InitBignumFromDouble                                                                 // tclStubInit.c:1558:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4552)) = XTcl_GetNamespaceUnknownHandler                                                                  // tclStubInit.c:1559:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4560)) = XTcl_SetNamespaceUnknownHandler                                                           // tclStubInit.c:1560:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4568)) = XTcl_GetEncodingFromObj                                                                   // tclStubInit.c:1561:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4576)) = XTcl_GetEncodingSearchPath                                                                                         // tclStubInit.c:1562:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4584)) = XTcl_SetEncodingSearchPath                                                                                  // tclStubInit.c:1563:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4592)) = XTcl_GetEncodingNameFromEnvironment                                                                       // tclStubInit.c:1564:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4600)) = XTcl_PkgRequireProc                                                       // tclStubInit.c:1565:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4608)) = XTcl_AppendObjToErrorInfo                                                                                // tclStubInit.c:1566:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4616)) = XTcl_AppendLimitedToObj                                                           // tclStubInit.c:1567:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4624)) = XTcl_Format                                                                      // tclStubInit.c:1568:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4632)) = XTcl_AppendFormatToObj                                                    // tclStubInit.c:1569:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4640)) = XTcl_ObjPrintf                                                                                   // tclStubInit.c:1570:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4648)) = XTcl_AppendPrintfToObj                                                                          // tclStubInit.c:1571:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4656)) = XTcl_CancelEval                                                                 // tclStubInit.c:1572:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4664)) = XTcl_Canceled                                                                                        // tclStubInit.c:1573:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4672)) = XTcl_CreatePipe                                                                    // tclStubInit.c:1574:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4680)) = XTcl_NRCreateCommand                                  // tclStubInit.c:1575:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4688)) = XTcl_NREvalObj                                                                              // tclStubInit.c:1576:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4696)) = XTcl_NREvalObjv                                                                      // tclStubInit.c:1577:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4704)) = XTcl_NRCmdSwap                                                          // tclStubInit.c:1578:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, ClientData, ClientData, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4712)) = XTcl_NRAddCallback                                       // tclStubInit.c:1579:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4720)) = XTcl_NRCallObjProc                                                     // tclStubInit.c:1580:5:
	*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4728)) = XTcl_GetFSDeviceFromStat                                                                                   // tclStubInit.c:1581:5:
	*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4736)) = XTcl_GetFSInodeFromStat                                                                                    // tclStubInit.c:1582:5:
	*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4744)) = XTcl_GetModeFromStat                                                                                       // tclStubInit.c:1583:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4752)) = XTcl_GetLinkCountFromStat                                                                                   // tclStubInit.c:1584:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4760)) = XTcl_GetUserIdFromStat                                                                                      // tclStubInit.c:1585:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4768)) = XTcl_GetGroupIdFromStat                                                                                     // tclStubInit.c:1586:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4776)) = XTcl_GetDeviceTypeFromStat                                                                                  // tclStubInit.c:1587:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4784)) = XTcl_GetAccessTimeFromStat                                                                            // tclStubInit.c:1588:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4792)) = XTcl_GetModificationTimeFromStat                                                                      // tclStubInit.c:1589:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4800)) = XTcl_GetChangeTimeFromStat                                                                            // tclStubInit.c:1590:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4808)) = XTcl_GetSizeFromStat                                                                                 // tclStubInit.c:1591:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4816)) = XTcl_GetBlocksFromStat                                                                               // tclStubInit.c:1592:5:
	*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4824)) = XTcl_GetBlockSizeFromStat                                                                                  // tclStubInit.c:1593:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4832)) = XTcl_SetEnsembleParameterList                                                         // tclStubInit.c:1594:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4840)) = XTcl_GetEnsembleParameterList                                                         // tclStubInit.c:1595:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4848)) = XTcl_ParseArgsObjv                                                      // tclStubInit.c:1596:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4856)) = XTcl_GetErrorLine                                                                                           // tclStubInit.c:1597:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4864)) = XTcl_SetErrorLine                                                                                          // tclStubInit.c:1598:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4872)) = XTcl_TransferResult                                                                               // tclStubInit.c:1599:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4880)) = XTcl_InterpActive                                                                                           // tclStubInit.c:1600:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4888)) = XTcl_BackgroundException                                                                                   // tclStubInit.c:1601:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4896)) = XTcl_ZlibDeflate                                                            // tclStubInit.c:1602:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4904)) = XTcl_ZlibInflate                                                            // tclStubInit.c:1603:5:
	*(*func(*libc.TLS, uint32, uintptr, int32) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4912)) = XTcl_ZlibCRC32                                                                              // tclStubInit.c:1604:5:
	*(*func(*libc.TLS, uint32, uintptr, int32) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4920)) = XTcl_ZlibAdler32                                                                            // tclStubInit.c:1605:5:
	*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4928)) = XTcl_ZlibStreamInit                                                  // tclStubInit.c:1606:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4936)) = XTcl_ZlibStreamGetCommandName                                                                      // tclStubInit.c:1607:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4944)) = XTcl_ZlibStreamEof                                                                                   // tclStubInit.c:1608:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4952)) = XTcl_ZlibStreamChecksum                                                                              // tclStubInit.c:1609:5:
	*(*func(*libc.TLS, Tcl_ZlibStream, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4960)) = XTcl_ZlibStreamPut                                                                   // tclStubInit.c:1610:5:
	*(*func(*libc.TLS, Tcl_ZlibStream, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4968)) = XTcl_ZlibStreamGet                                                                   // tclStubInit.c:1611:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4976)) = XTcl_ZlibStreamClose                                                                                 // tclStubInit.c:1612:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4984)) = XTcl_ZlibStreamReset                                                                                 // tclStubInit.c:1613:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4992)) = XTcl_SetStartupScript                                                                                    // tclStubInit.c:1614:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5000)) = XTcl_GetStartupScript                                                                                     // tclStubInit.c:1615:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5008)) = XTcl_CloseEx                                                                            // tclStubInit.c:1616:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5016)) = XTcl_NRExprObj                                                                            // tclStubInit.c:1617:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5024)) = XTcl_NRSubstObj                                                                             // tclStubInit.c:1618:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5032)) = XTcl_LoadFile                                                    // tclStubInit.c:1619:5:
	*(*func(*libc.TLS, uintptr, Tcl_LoadHandle, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5040)) = XTcl_FindSymbol                                                                  // tclStubInit.c:1620:5:
	*(*func(*libc.TLS, uintptr, Tcl_LoadHandle) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5048)) = XTcl_FSUnloadFile                                                                           // tclStubInit.c:1621:5:
	*(*func(*libc.TLS, Tcl_ZlibStream, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5056)) = XTcl_ZlibStreamSetCompressionDictionary                                                           // tclStubInit.c:1622:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 8 /* .hooks */)) = uintptr(unsafe.Pointer(&tclStubHooks))                                                                                   // tclStubInit.c:967:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 16)) = XTcl_PkgProvideEx                                                                  // tclStubInit.c:968:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 24)) = XTcl_PkgRequireEx                                                         // tclStubInit.c:969:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 32)) = XTcl_Panic                                                                                                 // tclStubInit.c:970:5:
	*(*func(*libc.TLS, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 40)) = XTcl_Alloc                                                                                                   // tclStubInit.c:971:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 48)) = XTcl_Free                                                                                                           // tclStubInit.c:972:5:
	*(*func(*libc.TLS, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 56)) = XTcl_Realloc                                                                                        // tclStubInit.c:973:5:
	*(*func(*libc.TLS, uint32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 64)) = XTcl_DbCkalloc                                                                               // tclStubInit.c:974:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 72)) = XTcl_DbCkfree                                                                                       // tclStubInit.c:975:5:
	*(*func(*libc.TLS, uintptr, uint32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 80)) = XTcl_DbCkrealloc                                                                    // tclStubInit.c:976:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 104)) = XTcl_SetTimer                                                                                                      // tclStubInit.c:995:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 112)) = XTcl_Sleep                                                                                                           // tclStubInit.c:996:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 120)) = XTcl_WaitForEvent                                                                                            // tclStubInit.c:997:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 128)) = XTcl_AppendAllObjTypes                                                                              // tclStubInit.c:998:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 136)) = XTcl_AppendStringsToObj                                                                                   // tclStubInit.c:999:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 144)) = XTcl_AppendToObj                                                                                   // tclStubInit.c:1000:5:
	*(*func(*libc.TLS, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 152)) = XTcl_ConcatObj                                                                                      // tclStubInit.c:1001:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 160)) = XTcl_ConvertToType                                                                         // tclStubInit.c:1002:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 168)) = XTcl_DbDecrRefCount                                                                                // tclStubInit.c:1003:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 176)) = XTcl_DbIncrRefCount                                                                                // tclStubInit.c:1004:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 184)) = XTcl_DbIsShared                                                                              // tclStubInit.c:1005:5:
	*(*func(*libc.TLS, int32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 192)) = XTcl_DbNewBooleanObj                                                                         // tclStubInit.c:1006:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 200)) = XTcl_DbNewByteArrayObj                                                              // tclStubInit.c:1007:5:
	*(*func(*libc.TLS, float64, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 208)) = XTcl_DbNewDoubleObj                                                                        // tclStubInit.c:1008:5:
	*(*func(*libc.TLS, int32, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 216)) = XTcl_DbNewListObj                                                                   // tclStubInit.c:1009:5:
	*(*func(*libc.TLS, int32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 224)) = XTcl_DbNewLongObj                                                                            // tclStubInit.c:1010:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 232)) = XTcl_DbNewObj                                                                                       // tclStubInit.c:1011:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 240)) = XTcl_DbNewStringObj                                                                 // tclStubInit.c:1012:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 248)) = XTcl_DuplicateObj                                                                                          // tclStubInit.c:1013:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 256)) = XTclFreeObj                                                                                                        // tclStubInit.c:1014:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 264)) = XTcl_GetBoolean                                                                            // tclStubInit.c:1015:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 272)) = XTcl_GetBooleanFromObj                                                                     // tclStubInit.c:1016:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 280)) = XTcl_GetByteArrayFromObj                                                                          // tclStubInit.c:1017:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 288)) = XTcl_GetDouble                                                                             // tclStubInit.c:1018:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 296)) = XTcl_GetDoubleFromObj                                                                      // tclStubInit.c:1019:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 304)) = XTcl_GetIndexFromObj                                              // tclStubInit.c:1020:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 312)) = XTcl_GetInt                                                                                // tclStubInit.c:1021:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 320)) = XTcl_GetIntFromObj                                                                         // tclStubInit.c:1022:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 328)) = XTcl_GetLongFromObj                                                                        // tclStubInit.c:1023:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 336)) = XTcl_GetObjType                                                                                            // tclStubInit.c:1024:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 344)) = XTcl_GetStringFromObj                                                                             // tclStubInit.c:1025:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 352)) = XTcl_InvalidateStringRep                                                                                           // tclStubInit.c:1026:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 360)) = XTcl_ListObjAppendList                                                                     // tclStubInit.c:1027:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 368)) = XTcl_ListObjAppendElement                                                                  // tclStubInit.c:1028:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 376)) = XTcl_ListObjGetElements                                                           // tclStubInit.c:1029:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 384)) = XTcl_ListObjIndex                                                                   // tclStubInit.c:1030:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 392)) = XTcl_ListObjLength                                                                         // tclStubInit.c:1031:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 400)) = XTcl_ListObjReplace                                                   // tclStubInit.c:1032:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 408)) = XTcl_NewBooleanObj                                                                                           // tclStubInit.c:1033:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 416)) = XTcl_NewByteArrayObj                                                                                // tclStubInit.c:1034:5:
	*(*func(*libc.TLS, float64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 424)) = XTcl_NewDoubleObj                                                                                          // tclStubInit.c:1035:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 432)) = XTcl_NewIntObj                                                                                               // tclStubInit.c:1036:5:
	*(*func(*libc.TLS, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 440)) = XTcl_NewListObj                                                                                     // tclStubInit.c:1037:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 448)) = XTcl_NewLongObj                                                                                              // tclStubInit.c:1038:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 456)) = XTcl_NewObj                                                                                                         // tclStubInit.c:1039:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 464)) = XTcl_NewStringObj                                                                                   // tclStubInit.c:1040:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 472)) = XTcl_SetBooleanObj                                                                                          // tclStubInit.c:1041:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 480)) = XTcl_SetByteArrayLength                                                                             // tclStubInit.c:1042:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 488)) = XTcl_SetByteArrayObj                                                                               // tclStubInit.c:1043:5:
	*(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 496)) = XTcl_SetDoubleObj                                                                                         // tclStubInit.c:1044:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 504)) = XTcl_SetIntObj                                                                                              // tclStubInit.c:1045:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 512)) = XTcl_SetListObj                                                                                    // tclStubInit.c:1046:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 520)) = XTcl_SetLongObj                                                                                             // tclStubInit.c:1047:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 528)) = XTcl_SetObjLength                                                                                           // tclStubInit.c:1048:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 536)) = XTcl_SetStringObj                                                                                  // tclStubInit.c:1049:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 544)) = XTcl_AddErrorInfo                                                                                         // tclStubInit.c:1050:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 552)) = XTcl_AddObjErrorInfo                                                                               // tclStubInit.c:1051:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 560)) = XTcl_AllowExceptions                                                                                               // tclStubInit.c:1052:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 568)) = XTcl_AppendElement                                                                                        // tclStubInit.c:1053:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 576)) = XTcl_AppendResult                                                                                         // tclStubInit.c:1054:5:
	*(*func(*libc.TLS, uintptr, ClientData) Tcl_AsyncHandler)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 584)) = XTcl_AsyncCreate                                                                      // tclStubInit.c:1055:5:
	*(*func(*libc.TLS, Tcl_AsyncHandler))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 592)) = XTcl_AsyncDelete                                                                                          // tclStubInit.c:1056:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 600)) = XTcl_AsyncInvoke                                                                                      // tclStubInit.c:1057:5:
	*(*func(*libc.TLS, Tcl_AsyncHandler))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 608)) = XTcl_AsyncMark                                                                                            // tclStubInit.c:1058:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 616)) = XTcl_AsyncReady                                                                                                       // tclStubInit.c:1059:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 624)) = XTcl_BackgroundError                                                                                               // tclStubInit.c:1060:5:
	*(*func(*libc.TLS, uintptr, uintptr) int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 632)) = XTcl_Backslash                                                                                       // tclStubInit.c:1061:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 640)) = XTcl_BadChannelOption                                                                      // tclStubInit.c:1062:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 648)) = XTcl_CallWhenDeleted                                                                          // tclStubInit.c:1063:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 656)) = XTcl_CancelIdleCall                                                                                    // tclStubInit.c:1064:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 664)) = XTcl_Close                                                                                      // tclStubInit.c:1065:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 672)) = XTcl_CommandComplete                                                                                         // tclStubInit.c:1066:5:
	*(*func(*libc.TLS, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 680)) = XTcl_Concat                                                                                         // tclStubInit.c:1067:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 688)) = XTcl_ConvertElement                                                                          // tclStubInit.c:1068:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 696)) = XTcl_ConvertCountedElement                                                            // tclStubInit.c:1069:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 704)) = XTcl_CreateAlias                                                  // tclStubInit.c:1070:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 712)) = XTcl_CreateAliasObj                                               // tclStubInit.c:1071:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 720)) = XTcl_CreateChannel                                                         // tclStubInit.c:1072:5:
	*(*func(*libc.TLS, Tcl_Channel, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 728)) = XTcl_CreateChannelHandler                                                          // tclStubInit.c:1073:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 736)) = XTcl_CreateCloseHandler                                                                   // tclStubInit.c:1074:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 744)) = XTcl_CreateCommand                                              // tclStubInit.c:1075:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 752)) = XTcl_CreateEventSource                                                                        // tclStubInit.c:1076:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 760)) = XTcl_CreateExitHandler                                                                                 // tclStubInit.c:1077:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 768)) = XTcl_CreateInterp                                                                                                   // tclStubInit.c:1078:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 776)) = XTcl_CreateMathFunc                                                  // tclStubInit.c:1079:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 784)) = XTcl_CreateObjCommand                                           // tclStubInit.c:1080:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 792)) = XTcl_CreateSlave                                                                           // tclStubInit.c:1081:5:
	*(*func(*libc.TLS, int32, uintptr, ClientData) Tcl_TimerToken)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 800)) = XTcl_CreateTimerHandler                                                          // tclStubInit.c:1082:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, ClientData) Tcl_Trace)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 808)) = XTcl_CreateTrace                                                             // tclStubInit.c:1083:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 816)) = XTcl_DeleteAssocData                                                                                      // tclStubInit.c:1084:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 824)) = XTcl_DeleteChannelHandler                                                                 // tclStubInit.c:1085:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 832)) = XTcl_DeleteCloseHandler                                                                   // tclStubInit.c:1086:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 840)) = XTcl_DeleteCommand                                                                                  // tclStubInit.c:1087:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 848)) = XTcl_DeleteCommandFromToken                                                                     // tclStubInit.c:1088:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 856)) = XTcl_DeleteEvents                                                                                      // tclStubInit.c:1089:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 864)) = XTcl_DeleteEventSource                                                                        // tclStubInit.c:1090:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 872)) = XTcl_DeleteExitHandler                                                                                 // tclStubInit.c:1091:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 880)) = XTcl_DeleteHashEntry                                                                                               // tclStubInit.c:1092:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 888)) = XTcl_DeleteHashTable                                                                                               // tclStubInit.c:1093:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 896)) = XTcl_DeleteInterp                                                                                                  // tclStubInit.c:1094:5:
	*(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 904)) = XTcl_DetachPids                                                                                             // tclStubInit.c:1095:5:
	*(*func(*libc.TLS, Tcl_TimerToken))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 912)) = XTcl_DeleteTimerHandler                                                                                     // tclStubInit.c:1096:5:
	*(*func(*libc.TLS, uintptr, Tcl_Trace))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 920)) = XTcl_DeleteTrace                                                                                        // tclStubInit.c:1097:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 928)) = XTcl_DontCallWhenDeleted                                                                      // tclStubInit.c:1098:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 936)) = XTcl_DoOneEvent                                                                                                // tclStubInit.c:1099:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 944)) = XTcl_DoWhenIdle                                                                                        // tclStubInit.c:1100:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 952)) = XTcl_DStringAppend                                                                         // tclStubInit.c:1101:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 960)) = XTcl_DStringAppendElement                                                                         // tclStubInit.c:1102:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 968)) = XTcl_DStringEndSublist                                                                                             // tclStubInit.c:1103:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 976)) = XTcl_DStringFree                                                                                                   // tclStubInit.c:1104:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 984)) = XTcl_DStringGetResult                                                                                     // tclStubInit.c:1105:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 992)) = XTcl_DStringInit                                                                                                   // tclStubInit.c:1106:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1000)) = XTcl_DStringResult                                                                                       // tclStubInit.c:1107:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1008)) = XTcl_DStringSetLength                                                                                      // tclStubInit.c:1108:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1016)) = XTcl_DStringStartSublist                                                                                          // tclStubInit.c:1109:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1024)) = XTcl_Eof                                                                                                // tclStubInit.c:1110:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1032)) = XTcl_ErrnoId                                                                                                       // tclStubInit.c:1111:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1040)) = XTcl_ErrnoMsg                                                                                               // tclStubInit.c:1112:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1048)) = XTcl_Eval                                                                                          // tclStubInit.c:1113:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1056)) = XTcl_EvalFile                                                                                      // tclStubInit.c:1114:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1064)) = XTcl_EvalObj                                                                                       // tclStubInit.c:1115:5:
	*(*func(*libc.TLS, ClientData, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1072)) = XTcl_EventuallyFree                                                                                   // tclStubInit.c:1116:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1080)) = XTcl_Exit                                                                                                           // tclStubInit.c:1117:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1088)) = XTcl_ExposeCommand                                                                        // tclStubInit.c:1118:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1096)) = XTcl_ExprBoolean                                                                          // tclStubInit.c:1119:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1104)) = XTcl_ExprBooleanObj                                                                       // tclStubInit.c:1120:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1112)) = XTcl_ExprDouble                                                                           // tclStubInit.c:1121:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1120)) = XTcl_ExprDoubleObj                                                                        // tclStubInit.c:1122:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1128)) = XTcl_ExprLong                                                                             // tclStubInit.c:1123:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1136)) = XTcl_ExprLongObj                                                                          // tclStubInit.c:1124:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1144)) = XTcl_ExprObj                                                                              // tclStubInit.c:1125:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1152)) = XTcl_ExprString                                                                                    // tclStubInit.c:1126:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1160)) = XTcl_Finalize                                                                                                              // tclStubInit.c:1127:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1168)) = XTcl_FindExecutable                                                                                               // tclStubInit.c:1128:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1176)) = XTcl_FirstHashEntry                                                                              // tclStubInit.c:1129:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1184)) = XTcl_Flush                                                                                              // tclStubInit.c:1130:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1192)) = XTcl_FreeResult                                                                                                   // tclStubInit.c:1131:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1200)) = XTcl_GetAlias                                                  // tclStubInit.c:1132:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1208)) = XTcl_GetAliasObj                                               // tclStubInit.c:1133:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1216)) = XTcl_GetAssocData                                                                    // tclStubInit.c:1134:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1224)) = XTcl_GetChannel                                                                     // tclStubInit.c:1135:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1232)) = XTcl_GetChannelBufferSize                                                                               // tclStubInit.c:1136:5:
	*(*func(*libc.TLS, Tcl_Channel, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1240)) = XTcl_GetChannelHandle                                                                   // tclStubInit.c:1137:5:
	*(*func(*libc.TLS, Tcl_Channel) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1248)) = XTcl_GetChannelInstanceData                                                                        // tclStubInit.c:1138:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1256)) = XTcl_GetChannelMode                                                                                     // tclStubInit.c:1139:5:
	*(*func(*libc.TLS, Tcl_Channel) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1264)) = XTcl_GetChannelName                                                                                   // tclStubInit.c:1140:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1272)) = XTcl_GetChannelOption                                                        // tclStubInit.c:1141:5:
	*(*func(*libc.TLS, Tcl_Channel) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1280)) = XTcl_GetChannelType                                                                                   // tclStubInit.c:1142:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1288)) = XTcl_GetCommandInfo                                                                       // tclStubInit.c:1143:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1296)) = XTcl_GetCommandName                                                                          // tclStubInit.c:1144:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1304)) = XTcl_GetErrno                                                                                                        // tclStubInit.c:1145:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1312)) = XTcl_GetHostName                                                                                                   // tclStubInit.c:1146:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1320)) = XTcl_GetInterpPath                                                                                 // tclStubInit.c:1147:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1328)) = XTcl_GetMaster                                                                                            // tclStubInit.c:1148:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1336)) = XTcl_GetNameOfExecutable                                                                                           // tclStubInit.c:1149:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1344)) = XTcl_GetObjResult                                                                                         // tclStubInit.c:1150:5:
	*(*func(*libc.TLS, uintptr) Tcl_PathType)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1360)) = XTcl_GetPathType                                                                                     // tclStubInit.c:1160:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1368)) = XTcl_Gets                                                                                      // tclStubInit.c:1161:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1376)) = XTcl_GetsObj                                                                                   // tclStubInit.c:1162:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1384)) = XTcl_GetServiceMode                                                                                                  // tclStubInit.c:1163:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1392)) = XTcl_GetSlave                                                                                    // tclStubInit.c:1164:5:
	*(*func(*libc.TLS, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1400)) = XTcl_GetStdChannel                                                                                      // tclStubInit.c:1165:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1408)) = XTcl_GetStringResult                                                                                      // tclStubInit.c:1166:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1416)) = XTcl_GetVar                                                                               // tclStubInit.c:1167:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1424)) = XTcl_GetVar2                                                                     // tclStubInit.c:1168:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1432)) = XTcl_GlobalEval                                                                                    // tclStubInit.c:1169:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1440)) = XTcl_GlobalEvalObj                                                                                 // tclStubInit.c:1170:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1448)) = XTcl_HideCommand                                                                          // tclStubInit.c:1171:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1456)) = XTcl_Init                                                                                                   // tclStubInit.c:1172:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1464)) = XTcl_InitHashTable                                                                                         // tclStubInit.c:1173:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1472)) = XTcl_InputBlocked                                                                                       // tclStubInit.c:1174:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1480)) = XTcl_InputBuffered                                                                                      // tclStubInit.c:1175:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1488)) = XTcl_InterpDeleted                                                                                          // tclStubInit.c:1176:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1496)) = XTcl_IsSafe                                                                                                 // tclStubInit.c:1177:5:
	*(*func(*libc.TLS, int32, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1504)) = XTcl_JoinPath                                                                             // tclStubInit.c:1178:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1512)) = XTcl_LinkVar                                                                       // tclStubInit.c:1179:5:
	*(*func(*libc.TLS, ClientData, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1528)) = XTcl_MakeFileChannel                                                                        // tclStubInit.c:1181:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1536)) = XTcl_MakeSafe                                                                                               // tclStubInit.c:1182:5:
	*(*func(*libc.TLS, ClientData) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1544)) = XTcl_MakeTcpClientChannel                                                                          // tclStubInit.c:1183:5:
	*(*func(*libc.TLS, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1552)) = XTcl_Merge                                                                                         // tclStubInit.c:1184:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1560)) = XTcl_NextHashEntry                                                                                        // tclStubInit.c:1185:5:
	*(*func(*libc.TLS, Tcl_Channel, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1568)) = XTcl_NotifyChannel                                                                                     // tclStubInit.c:1186:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1576)) = XTcl_ObjGetVar2                                                                  // tclStubInit.c:1187:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1584)) = XTcl_ObjSetVar2                                                         // tclStubInit.c:1188:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1592)) = XTcl_OpenCommandChannel                                                        // tclStubInit.c:1189:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1600)) = XTcl_OpenFileChannel                                                         // tclStubInit.c:1190:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1608)) = XTcl_OpenTcpClient                                             // tclStubInit.c:1191:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, ClientData) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1616)) = XTcl_OpenTcpServer                                               // tclStubInit.c:1192:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1624)) = XTcl_Preserve                                                                                                  // tclStubInit.c:1193:5:
	*(*func(*libc.TLS, uintptr, float64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1632)) = XTcl_PrintDouble                                                                                // tclStubInit.c:1194:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1640)) = XTcl_PutEnv                                                                                                 // tclStubInit.c:1195:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1648)) = XTcl_PosixError                                                                                           // tclStubInit.c:1196:5:
	*(*func(*libc.TLS, uintptr, Tcl_QueuePosition))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1656)) = XTcl_QueueEvent                                                                                // tclStubInit.c:1197:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1664)) = XTcl_Read                                                                               // tclStubInit.c:1198:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1672)) = XTcl_ReapDetachedProcs                                                                                                     // tclStubInit.c:1199:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1680)) = XTcl_RecordAndEval                                                                          // tclStubInit.c:1200:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1688)) = XTcl_RecordAndEvalObj                                                                       // tclStubInit.c:1201:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1696)) = XTcl_RegisterChannel                                                                                 // tclStubInit.c:1202:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1704)) = XTcl_RegisterObjType                                                                                              // tclStubInit.c:1203:5:
	*(*func(*libc.TLS, uintptr, uintptr) Tcl_RegExp)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1712)) = XTcl_RegExpCompile                                                                            // tclStubInit.c:1204:5:
	*(*func(*libc.TLS, uintptr, Tcl_RegExp, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1720)) = XTcl_RegExpExec                                                               // tclStubInit.c:1205:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1728)) = XTcl_RegExpMatch                                                                          // tclStubInit.c:1206:5:
	*(*func(*libc.TLS, Tcl_RegExp, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1736)) = XTcl_RegExpRange                                                                      // tclStubInit.c:1207:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1744)) = XTcl_Release                                                                                                   // tclStubInit.c:1208:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1752)) = XTcl_ResetResult                                                                                                  // tclStubInit.c:1209:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1760)) = XTcl_ScanElement                                                                                   // tclStubInit.c:1210:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1768)) = XTcl_ScanCountedElement                                                                     // tclStubInit.c:1211:5:
	*(*func(*libc.TLS, Tcl_Channel, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1776)) = XTcl_SeekOld                                                                              // tclStubInit.c:1212:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1784)) = XTcl_ServiceAll                                                                                                      // tclStubInit.c:1213:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1792)) = XTcl_ServiceEvent                                                                                             // tclStubInit.c:1214:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1800)) = XTcl_SetAssocData                                                                   // tclStubInit.c:1215:5:
	*(*func(*libc.TLS, Tcl_Channel, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1808)) = XTcl_SetChannelBufferSize                                                                              // tclStubInit.c:1216:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1816)) = XTcl_SetChannelOption                                                        // tclStubInit.c:1217:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1824)) = XTcl_SetCommandInfo                                                                       // tclStubInit.c:1218:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1832)) = XTcl_SetErrno                                                                                                       // tclStubInit.c:1219:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1840)) = XTcl_SetErrorCode                                                                                        // tclStubInit.c:1220:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1848)) = XTcl_SetMaxBlockTime                                                                                              // tclStubInit.c:1221:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1856)) = XTcl_SetPanicProc                                                                                                 // tclStubInit.c:1222:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1864)) = XTcl_SetRecursionLimit                                                                               // tclStubInit.c:1223:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1872)) = XTcl_SetResult                                                                                  // tclStubInit.c:1224:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1880)) = XTcl_SetServiceMode                                                                                           // tclStubInit.c:1225:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1888)) = XTcl_SetObjErrorCode                                                                                     // tclStubInit.c:1226:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1896)) = XTcl_SetObjResult                                                                                        // tclStubInit.c:1227:5:
	*(*func(*libc.TLS, Tcl_Channel, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1904)) = XTcl_SetStdChannel                                                                                     // tclStubInit.c:1228:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1912)) = XTcl_SetVar                                                                      // tclStubInit.c:1229:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1920)) = XTcl_SetVar2                                                            // tclStubInit.c:1230:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1928)) = XTcl_SignalId                                                                                               // tclStubInit.c:1231:5:
	*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1936)) = XTcl_SignalMsg                                                                                              // tclStubInit.c:1232:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1944)) = XTcl_SourceRCFile                                                                                                 // tclStubInit.c:1233:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1952)) = XTcl_SplitList                                                                   // tclStubInit.c:1234:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1960)) = XTcl_SplitPath                                                                                  // tclStubInit.c:1235:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1968)) = XTcl_StaticPackage                                                                     // tclStubInit.c:1236:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1976)) = XTcl_StringMatch                                                                                   // tclStubInit.c:1237:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1984)) = XTcl_TellOld                                                                                            // tclStubInit.c:1238:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 1992)) = XTcl_TraceVar                                                          // tclStubInit.c:1239:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, ClientData) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2000)) = XTcl_TraceVar2                                                // tclStubInit.c:1240:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2008)) = XTcl_TranslateFileName                                                                  // tclStubInit.c:1241:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2016)) = XTcl_Ungets                                                                      // tclStubInit.c:1242:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2024)) = XTcl_UnlinkVar                                                                                           // tclStubInit.c:1243:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2032)) = XTcl_UnregisterChannel                                                                         // tclStubInit.c:1244:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2040)) = XTcl_UnsetVar                                                                               // tclStubInit.c:1245:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2048)) = XTcl_UnsetVar2                                                                     // tclStubInit.c:1246:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2056)) = XTcl_UntraceVar                                                              // tclStubInit.c:1247:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2064)) = XTcl_UntraceVar2                                                    // tclStubInit.c:1248:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2072)) = XTcl_UpdateLinkedVar                                                                                     // tclStubInit.c:1249:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2080)) = XTcl_UpVar                                                                // tclStubInit.c:1250:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2088)) = XTcl_UpVar2                                                      // tclStubInit.c:1251:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2096)) = XTcl_VarEval                                                                                       // tclStubInit.c:1252:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2104)) = XTcl_VarTraceInfo                                                 // tclStubInit.c:1253:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2112)) = XTcl_VarTraceInfo2                                       // tclStubInit.c:1254:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2120)) = XTcl_Write                                                                              // tclStubInit.c:1255:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2128)) = XTcl_WrongNumArgs                                                                        // tclStubInit.c:1256:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2136)) = XTcl_DumpActiveMemory                                                                                       // tclStubInit.c:1257:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2144)) = XTcl_ValidateAllMemory                                                                                     // tclStubInit.c:1258:5:
	*(*func(*libc.TLS, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2152)) = XTcl_AppendResultVA                                                                                      // tclStubInit.c:1259:5:
	*(*func(*libc.TLS, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2160)) = XTcl_AppendStringsToObjVA                                                                                // tclStubInit.c:1260:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2168)) = XTcl_HashStats                                                                                            // tclStubInit.c:1261:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2176)) = XTcl_ParseVar                                                                           // tclStubInit.c:1262:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2184)) = XTcl_PkgPresent                                                                  // tclStubInit.c:1263:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2192)) = XTcl_PkgPresentEx                                                       // tclStubInit.c:1264:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2200)) = XTcl_PkgProvide                                                                           // tclStubInit.c:1265:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2208)) = XTcl_PkgRequire                                                                  // tclStubInit.c:1266:5:
	*(*func(*libc.TLS, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2216)) = XTcl_SetErrorCodeVA                                                                                      // tclStubInit.c:1267:5:
	*(*func(*libc.TLS, uintptr, Va_list) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2224)) = XTcl_VarEvalVA                                                                                     // tclStubInit.c:1268:5:
	*(*func(*libc.TLS, Tcl_Pid, uintptr, int32) Tcl_Pid)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2232)) = XTcl_WaitPid                                                                              // tclStubInit.c:1269:5:
	*(*func(*libc.TLS, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2240)) = XTcl_PanicVA                                                                                             // tclStubInit.c:1270:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2248)) = XTcl_GetVersion                                                                        // tclStubInit.c:1271:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2256)) = XTcl_InitMemory                                                                                                   // tclStubInit.c:1272:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32, Tcl_Channel) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2264)) = XTcl_StackChannel                                            // tclStubInit.c:1273:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2272)) = XTcl_UnstackChannel                                                                            // tclStubInit.c:1274:5:
	*(*func(*libc.TLS, Tcl_Channel) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2280)) = XTcl_GetStackedChannel                                                                            // tclStubInit.c:1275:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2288)) = XTcl_SetMainLoop                                                                                                  // tclStubInit.c:1276:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2304)) = XTcl_AppendObjToObj                                                                                      // tclStubInit.c:1278:5:
	*(*func(*libc.TLS, uintptr) Tcl_Encoding)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2312)) = XTcl_CreateEncoding                                                                                  // tclStubInit.c:1279:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2320)) = XTcl_CreateThreadExitHandler                                                                          // tclStubInit.c:1280:5:
	*(*func(*libc.TLS, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2328)) = XTcl_DeleteThreadExitHandler                                                                          // tclStubInit.c:1281:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2336)) = XTcl_DiscardResult                                                                                                // tclStubInit.c:1282:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2344)) = XTcl_EvalEx                                                                          // tclStubInit.c:1283:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2352)) = XTcl_EvalObjv                                                                        // tclStubInit.c:1284:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2360)) = XTcl_EvalObjEx                                                                              // tclStubInit.c:1285:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2368)) = XTcl_ExitThread                                                                                                     // tclStubInit.c:1286:5:
	*(*func(*libc.TLS, uintptr, Tcl_Encoding, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2376)) = XTcl_ExternalToUtf // tclStubInit.c:1287:5:
	*(*func(*libc.TLS, Tcl_Encoding, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2384)) = XTcl_ExternalToUtfDString                                                   // tclStubInit.c:1288:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2392)) = XTcl_FinalizeThread                                                                                                        // tclStubInit.c:1289:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2400)) = XTcl_FinalizeNotifier                                                                                          // tclStubInit.c:1290:5:
	*(*func(*libc.TLS, Tcl_Encoding))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2408)) = XTcl_FreeEncoding                                                                                            // tclStubInit.c:1291:5:
	*(*func(*libc.TLS) Tcl_ThreadId)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2416)) = XTcl_GetCurrentThread                                                                                         // tclStubInit.c:1292:5:
	*(*func(*libc.TLS, uintptr, uintptr) Tcl_Encoding)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2424)) = XTcl_GetEncoding                                                                            // tclStubInit.c:1293:5:
	*(*func(*libc.TLS, Tcl_Encoding) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2432)) = XTcl_GetEncodingName                                                                                 // tclStubInit.c:1294:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2440)) = XTcl_GetEncodingNames                                                                                             // tclStubInit.c:1295:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2448)) = XTcl_GetIndexFromObjStruct                                // tclStubInit.c:1296:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2456)) = XTcl_GetThreadData                                                                                 // tclStubInit.c:1297:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2464)) = XTcl_GetVar2Ex                                                                   // tclStubInit.c:1298:5:
	*(*func(*libc.TLS) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2472)) = XTcl_InitNotifier                                                                                               // tclStubInit.c:1299:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2480)) = XTcl_MutexLock                                                                                                    // tclStubInit.c:1300:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2488)) = XTcl_MutexUnlock                                                                                                  // tclStubInit.c:1301:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2496)) = XTcl_ConditionNotify                                                                                              // tclStubInit.c:1302:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2504)) = XTcl_ConditionWait                                                                              // tclStubInit.c:1303:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2512)) = XTcl_NumUtfChars                                                                                     // tclStubInit.c:1304:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2520)) = XTcl_ReadChars                                                                   // tclStubInit.c:1305:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2528)) = XTcl_RestoreResult                                                                                       // tclStubInit.c:1306:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2536)) = XTcl_SaveResult                                                                                          // tclStubInit.c:1307:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2544)) = XTcl_SetSystemEncoding                                                                             // tclStubInit.c:1308:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2552)) = XTcl_SetVar2Ex                                                          // tclStubInit.c:1309:5:
	*(*func(*libc.TLS, Tcl_ThreadId))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2560)) = XTcl_ThreadAlert                                                                                             // tclStubInit.c:1310:5:
	*(*func(*libc.TLS, Tcl_ThreadId, uintptr, Tcl_QueuePosition))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2568)) = XTcl_ThreadQueueEvent                                                            // tclStubInit.c:1311:5:
	*(*func(*libc.TLS, uintptr, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2576)) = XTcl_UniCharAtIndex                                                                            // tclStubInit.c:1312:5:
	*(*func(*libc.TLS, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2584)) = XTcl_UniCharToLower                                                                                     // tclStubInit.c:1313:5:
	*(*func(*libc.TLS, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2592)) = XTcl_UniCharToTitle                                                                                     // tclStubInit.c:1314:5:
	*(*func(*libc.TLS, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2600)) = XTcl_UniCharToUpper                                                                                     // tclStubInit.c:1315:5:
	*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2608)) = XTcl_UniCharToUtf                                                                                    // tclStubInit.c:1316:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2616)) = XTcl_UtfAtIndex                                                                                    // tclStubInit.c:1317:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2624)) = XTcl_UtfCharComplete                                                                                 // tclStubInit.c:1318:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2632)) = XTcl_UtfBackslash                                                                         // tclStubInit.c:1319:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2640)) = XTcl_UtfFindFirst                                                                                  // tclStubInit.c:1320:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2648)) = XTcl_UtfFindLast                                                                                   // tclStubInit.c:1321:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2656)) = XTcl_UtfNext                                                                                              // tclStubInit.c:1322:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2664)) = XTcl_UtfPrev                                                                                     // tclStubInit.c:1323:5:
	*(*func(*libc.TLS, uintptr, Tcl_Encoding, uintptr, int32, int32, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2672)) = XTcl_UtfToExternal // tclStubInit.c:1324:5:
	*(*func(*libc.TLS, Tcl_Encoding, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2680)) = XTcl_UtfToExternalDString                                                   // tclStubInit.c:1325:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2688)) = XTcl_UtfToLower                                                                                             // tclStubInit.c:1326:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2696)) = XTcl_UtfToTitle                                                                                             // tclStubInit.c:1327:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2704)) = XTcl_UtfToUniChar                                                                                  // tclStubInit.c:1328:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2712)) = XTcl_UtfToUpper                                                                                             // tclStubInit.c:1329:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2720)) = XTcl_WriteChars                                                                         // tclStubInit.c:1330:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2728)) = XTcl_WriteObj                                                                                  // tclStubInit.c:1331:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2736)) = XTcl_GetString                                                                                            // tclStubInit.c:1332:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2744)) = XTcl_GetDefaultEncodingDir                                                                                         // tclStubInit.c:1333:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2752)) = XTcl_SetDefaultEncodingDir                                                                                        // tclStubInit.c:1334:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2760)) = XTcl_AlertNotifier                                                                                             // tclStubInit.c:1335:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2768)) = XTcl_ServiceModeHook                                                                                                // tclStubInit.c:1336:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2776)) = XTcl_UniCharIsAlnum                                                                                           // tclStubInit.c:1337:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2784)) = XTcl_UniCharIsAlpha                                                                                           // tclStubInit.c:1338:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2792)) = XTcl_UniCharIsDigit                                                                                           // tclStubInit.c:1339:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2800)) = XTcl_UniCharIsLower                                                                                           // tclStubInit.c:1340:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2808)) = XTcl_UniCharIsSpace                                                                                           // tclStubInit.c:1341:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2816)) = XTcl_UniCharIsUpper                                                                                           // tclStubInit.c:1342:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2824)) = XTcl_UniCharIsWordChar                                                                                        // tclStubInit.c:1343:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2832)) = XTcl_UniCharLen                                                                                             // tclStubInit.c:1344:5:
	*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2840)) = XTcl_UniCharNcmp                                                                           // tclStubInit.c:1345:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2848)) = XTcl_UniCharToUtfDString                                                                  // tclStubInit.c:1346:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2856)) = XTcl_UtfToUniCharDString                                                                  // tclStubInit.c:1347:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) Tcl_RegExp)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2864)) = XTcl_GetRegExpFromObj                                                                  // tclStubInit.c:1348:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2872)) = XTcl_EvalTokens                                                                           // tclStubInit.c:1349:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2880)) = XTcl_FreeParse                                                                                                    // tclStubInit.c:1350:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2888)) = XTcl_LogCommandInfo                                                                      // tclStubInit.c:1351:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2896)) = XTcl_ParseBraces                                                   // tclStubInit.c:1352:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2904)) = XTcl_ParseCommand                                                           // tclStubInit.c:1353:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2912)) = XTcl_ParseExpr                                                                     // tclStubInit.c:1354:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2920)) = XTcl_ParseQuotedString                                             // tclStubInit.c:1355:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2928)) = XTcl_ParseVarName                                                           // tclStubInit.c:1356:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2936)) = XTcl_GetCwd                                                                                      // tclStubInit.c:1357:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2944)) = XTcl_Chdir                                                                                                  // tclStubInit.c:1358:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2952)) = XTcl_Access                                                                                          // tclStubInit.c:1359:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2960)) = XTcl_Stat                                                                                          // tclStubInit.c:1360:5:
	*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2968)) = XTcl_UtfNcmp                                                                               // tclStubInit.c:1361:5:
	*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2976)) = XTcl_UtfNcasecmp                                                                           // tclStubInit.c:1362:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2984)) = XTcl_StringCaseMatch                                                                        // tclStubInit.c:1363:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 2992)) = XTcl_UniCharIsControl                                                                                         // tclStubInit.c:1364:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3000)) = XTcl_UniCharIsGraph                                                                                           // tclStubInit.c:1365:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3008)) = XTcl_UniCharIsPrint                                                                                           // tclStubInit.c:1366:5:
	*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3016)) = XTcl_UniCharIsPunct                                                                                           // tclStubInit.c:1367:5:
	*(*func(*libc.TLS, uintptr, Tcl_RegExp, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3024)) = XTcl_RegExpExecObj                                                // tclStubInit.c:1368:5:
	*(*func(*libc.TLS, Tcl_RegExp, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3032)) = XTcl_RegExpGetInfo                                                                                    // tclStubInit.c:1369:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3040)) = XTcl_NewUnicodeObj                                                                                 // tclStubInit.c:1370:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3048)) = XTcl_SetUnicodeObj                                                                                // tclStubInit.c:1371:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3056)) = XTcl_GetCharLength                                                                                          // tclStubInit.c:1372:5:
	*(*func(*libc.TLS, uintptr, int32) Tcl_UniChar)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3064)) = XTcl_GetUniChar                                                                                // tclStubInit.c:1373:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3072)) = XTcl_GetUnicode                                                                                           // tclStubInit.c:1374:5:
	*(*func(*libc.TLS, uintptr, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3080)) = XTcl_GetRange                                                                               // tclStubInit.c:1375:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3088)) = XTcl_AppendUnicodeToObj                                                                           // tclStubInit.c:1376:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3096)) = XTcl_RegExpMatchObj                                                                       // tclStubInit.c:1377:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3104)) = XTcl_SetNotifier                                                                                                  // tclStubInit.c:1378:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3112)) = XTcl_GetAllocMutex                                                                                                 // tclStubInit.c:1379:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3120)) = XTcl_GetChannelNames                                                                                        // tclStubInit.c:1380:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3128)) = XTcl_GetChannelNamesEx                                                                             // tclStubInit.c:1381:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3136)) = XTcl_ProcObjCmd                                                                 // tclStubInit.c:1382:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3144)) = XTcl_ConditionFinalize                                                                                            // tclStubInit.c:1383:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3152)) = XTcl_MutexFinalize                                                                                                // tclStubInit.c:1384:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3160)) = XTcl_CreateThread                                                        // tclStubInit.c:1385:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3168)) = XTcl_ReadRaw                                                                            // tclStubInit.c:1386:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3176)) = XTcl_WriteRaw                                                                           // tclStubInit.c:1387:5:
	*(*func(*libc.TLS, Tcl_Channel) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3184)) = XTcl_GetTopChannel                                                                                // tclStubInit.c:1388:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3192)) = XTcl_ChannelBuffered                                                                                    // tclStubInit.c:1389:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3200)) = XTcl_ChannelName                                                                                          // tclStubInit.c:1390:5:
	*(*func(*libc.TLS, uintptr) Tcl_ChannelTypeVersion)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3208)) = XTcl_ChannelVersion                                                                        // tclStubInit.c:1391:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3216)) = XTcl_ChannelBlockModeProc                                                                                 // tclStubInit.c:1392:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3224)) = XTcl_ChannelCloseProc                                                                                     // tclStubInit.c:1393:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3232)) = XTcl_ChannelClose2Proc                                                                                    // tclStubInit.c:1394:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3240)) = XTcl_ChannelInputProc                                                                                     // tclStubInit.c:1395:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3248)) = XTcl_ChannelOutputProc                                                                                    // tclStubInit.c:1396:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3256)) = XTcl_ChannelSeekProc                                                                                      // tclStubInit.c:1397:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3264)) = XTcl_ChannelSetOptionProc                                                                                 // tclStubInit.c:1398:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3272)) = XTcl_ChannelGetOptionProc                                                                                 // tclStubInit.c:1399:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3280)) = XTcl_ChannelWatchProc                                                                                     // tclStubInit.c:1400:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3288)) = XTcl_ChannelGetHandleProc                                                                                 // tclStubInit.c:1401:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3296)) = XTcl_ChannelFlushProc                                                                                     // tclStubInit.c:1402:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3304)) = XTcl_ChannelHandlerProc                                                                                   // tclStubInit.c:1403:5:
	*(*func(*libc.TLS, Tcl_ThreadId, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3312)) = XTcl_JoinThread                                                                               // tclStubInit.c:1404:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3320)) = XTcl_IsChannelShared                                                                                    // tclStubInit.c:1405:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3328)) = XTcl_IsChannelRegistered                                                                       // tclStubInit.c:1406:5:
	*(*func(*libc.TLS, Tcl_Channel))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3336)) = XTcl_CutChannel                                                                                               // tclStubInit.c:1407:5:
	*(*func(*libc.TLS, Tcl_Channel))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3344)) = XTcl_SpliceChannel                                                                                            // tclStubInit.c:1408:5:
	*(*func(*libc.TLS, Tcl_Channel))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3352)) = XTcl_ClearChannelHandlers                                                                                     // tclStubInit.c:1409:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3360)) = XTcl_IsChannelExisting                                                                                      // tclStubInit.c:1410:5:
	*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3368)) = XTcl_UniCharNcasecmp                                                                       // tclStubInit.c:1411:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3376)) = XTcl_UniCharCaseMatch                                                                       // tclStubInit.c:1412:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3384)) = XTcl_FindHashEntry                                                                               // tclStubInit.c:1413:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3392)) = XTcl_CreateHashEntry                                                                    // tclStubInit.c:1414:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3400)) = XTcl_InitCustomHashTable                                                                          // tclStubInit.c:1415:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3408)) = XTcl_InitObjHashTable                                                                                             // tclStubInit.c:1416:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3416)) = XTcl_CommandTraceInfo                                             // tclStubInit.c:1417:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3424)) = XTcl_TraceCommand                                                      // tclStubInit.c:1418:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3432)) = XTcl_UntraceCommand                                                          // tclStubInit.c:1419:5:
	*(*func(*libc.TLS, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3440)) = XTcl_AttemptAlloc                                                                                          // tclStubInit.c:1420:5:
	*(*func(*libc.TLS, uint32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3448)) = XTcl_AttemptDbCkalloc                                                                      // tclStubInit.c:1421:5:
	*(*func(*libc.TLS, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3456)) = XTcl_AttemptRealloc                                                                               // tclStubInit.c:1422:5:
	*(*func(*libc.TLS, uintptr, uint32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3464)) = XTcl_AttemptDbCkrealloc                                                           // tclStubInit.c:1423:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3472)) = XTcl_AttemptSetObjLength                                                                             // tclStubInit.c:1424:5:
	*(*func(*libc.TLS, Tcl_Channel) Tcl_ThreadId)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3480)) = XTcl_GetChannelThread                                                                            // tclStubInit.c:1425:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3488)) = XTcl_GetUnicodeFromObj                                                                           // tclStubInit.c:1426:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3496)) = XTcl_GetMathFuncInfo                                           // tclStubInit.c:1427:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3504)) = XTcl_ListMathFuncs                                                                               // tclStubInit.c:1428:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3512)) = XTcl_SubstObj                                                                             // tclStubInit.c:1429:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3520)) = XTcl_DetachChannel                                                                             // tclStubInit.c:1430:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3528)) = XTcl_IsStandardChannel                                                                                  // tclStubInit.c:1431:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3536)) = XTcl_FSCopyFile                                                                                    // tclStubInit.c:1432:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3544)) = XTcl_FSCopyDirectory                                                                      // tclStubInit.c:1433:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3552)) = XTcl_FSCreateDirectory                                                                                      // tclStubInit.c:1434:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3560)) = XTcl_FSDeleteFile                                                                                           // tclStubInit.c:1435:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3568)) = XTcl_FSLoadFile                              // tclStubInit.c:1436:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3576)) = XTcl_FSMatchInDirectory                                                 // tclStubInit.c:1437:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3584)) = XTcl_FSLink                                                                               // tclStubInit.c:1438:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3592)) = XTcl_FSRemoveDirectory                                                                      // tclStubInit.c:1439:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3600)) = XTcl_FSRenameFile                                                                                  // tclStubInit.c:1440:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3608)) = XTcl_FSLstat                                                                                       // tclStubInit.c:1441:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3616)) = XTcl_FSUtime                                                                                       // tclStubInit.c:1442:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3624)) = XTcl_FSFileAttrsGet                                                                // tclStubInit.c:1443:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3632)) = XTcl_FSFileAttrsSet                                                                // tclStubInit.c:1444:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3640)) = XTcl_FSFileAttrStrings                                                                           // tclStubInit.c:1445:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3648)) = XTcl_FSStat                                                                                        // tclStubInit.c:1446:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3656)) = XTcl_FSAccess                                                                                        // tclStubInit.c:1447:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3664)) = XTcl_FSOpenFileChannel                                                       // tclStubInit.c:1448:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3672)) = XTcl_FSGetCwd                                                                                             // tclStubInit.c:1449:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3680)) = XTcl_FSChdir                                                                                                // tclStubInit.c:1450:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3688)) = XTcl_FSConvertToPathType                                                                           // tclStubInit.c:1451:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3696)) = XTcl_FSJoinPath                                                                                    // tclStubInit.c:1452:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3704)) = XTcl_FSSplitPath                                                                                 // tclStubInit.c:1453:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3712)) = XTcl_FSEqualPaths                                                                                  // tclStubInit.c:1454:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3720)) = XTcl_FSGetNormalizedPath                                                                         // tclStubInit.c:1455:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3728)) = XTcl_FSJoinToPath                                                                         // tclStubInit.c:1456:5:
	*(*func(*libc.TLS, uintptr, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3736)) = XTcl_FSGetInternalRep                                                                         // tclStubInit.c:1457:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3744)) = XTcl_FSGetTranslatedPath                                                                         // tclStubInit.c:1458:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3752)) = XTcl_FSEvalFile                                                                                    // tclStubInit.c:1459:5:
	*(*func(*libc.TLS, uintptr, ClientData) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3760)) = XTcl_FSNewNativePath                                                                          // tclStubInit.c:1460:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3768)) = XTcl_FSGetNativePath                                                                                      // tclStubInit.c:1461:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3776)) = XTcl_FSFileSystemInfo                                                                                     // tclStubInit.c:1462:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3784)) = XTcl_FSPathSeparator                                                                                      // tclStubInit.c:1463:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3792)) = XTcl_FSListVolumes                                                                                                 // tclStubInit.c:1464:5:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3800)) = XTcl_FSRegister                                                                                 // tclStubInit.c:1465:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3808)) = XTcl_FSUnregister                                                                                           // tclStubInit.c:1466:5:
	*(*func(*libc.TLS, uintptr) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3816)) = XTcl_FSData                                                                                            // tclStubInit.c:1467:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3824)) = XTcl_FSGetTranslatedStringPath                                                                   // tclStubInit.c:1468:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3832)) = XTcl_FSGetFileSystemForPath                                                                               // tclStubInit.c:1469:5:
	*(*func(*libc.TLS, uintptr) Tcl_PathType)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3840)) = XTcl_FSGetPathType                                                                                   // tclStubInit.c:1470:5:
	*(*func(*libc.TLS, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3848)) = XTcl_OutputBuffered                                                                                     // tclStubInit.c:1471:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3856)) = XTcl_FSMountsChanged                                                                                              // tclStubInit.c:1472:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3864)) = XTcl_EvalTokensStandard                                                                     // tclStubInit.c:1473:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3872)) = XTcl_GetTime                                                                                                      // tclStubInit.c:1474:5:
	*(*func(*libc.TLS, uintptr, int32, int32, uintptr, ClientData, uintptr) Tcl_Trace)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3880)) = XTcl_CreateObjTrace                                         // tclStubInit.c:1475:5:
	*(*func(*libc.TLS, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3888)) = XTcl_GetCommandInfoFromToken                                                                   // tclStubInit.c:1476:5:
	*(*func(*libc.TLS, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3896)) = XTcl_SetCommandInfoFromToken                                                                   // tclStubInit.c:1477:5:
	*(*func(*libc.TLS, Tcl_WideInt, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3904)) = XTcl_DbNewWideIntObj                                                                  // tclStubInit.c:1478:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3912)) = XTcl_GetWideIntFromObj                                                                    // tclStubInit.c:1479:5:
	*(*func(*libc.TLS, Tcl_WideInt) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3920)) = XTcl_NewWideIntObj                                                                                    // tclStubInit.c:1480:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideInt))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3928)) = XTcl_SetWideIntObj                                                                                   // tclStubInit.c:1481:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3936)) = XTcl_AllocStatBuf                                                                                                  // tclStubInit.c:1482:5:
	*(*func(*libc.TLS, Tcl_Channel, Tcl_WideInt, int32) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3944)) = XTcl_Seek                                                                     // tclStubInit.c:1483:5:
	*(*func(*libc.TLS, Tcl_Channel) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3952)) = XTcl_Tell                                                                                         // tclStubInit.c:1484:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3960)) = XTcl_ChannelWideSeekProc                                                                                  // tclStubInit.c:1485:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3968)) = XTcl_DictObjPut                                                                  // tclStubInit.c:1486:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3976)) = XTcl_DictObjGet                                                                  // tclStubInit.c:1487:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3984)) = XTcl_DictObjRemove                                                                        // tclStubInit.c:1488:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 3992)) = XTcl_DictObjSize                                                                          // tclStubInit.c:1489:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4000)) = XTcl_DictObjFirst                                              // tclStubInit.c:1490:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4008)) = XTcl_DictObjNext                                                                       // tclStubInit.c:1491:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4016)) = XTcl_DictObjDone                                                                                                  // tclStubInit.c:1492:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4024)) = XTcl_DictObjPutKeyList                                                    // tclStubInit.c:1493:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4032)) = XTcl_DictObjRemoveKeyList                                                          // tclStubInit.c:1494:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4040)) = XTcl_NewDictObj                                                                                                    // tclStubInit.c:1495:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4048)) = XTcl_DbNewDictObj                                                                                  // tclStubInit.c:1496:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4056)) = XTcl_RegisterConfig                                                                    // tclStubInit.c:1497:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4064)) = XTcl_CreateNamespace                                                        // tclStubInit.c:1498:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4072)) = XTcl_DeleteNamespace                                                                                              // tclStubInit.c:1499:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4080)) = XTcl_AppendExportList                                                                     // tclStubInit.c:1500:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4088)) = XTcl_Export                                                                        // tclStubInit.c:1501:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4096)) = XTcl_Import                                                                        // tclStubInit.c:1502:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4104)) = XTcl_ForgetImport                                                                         // tclStubInit.c:1503:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4112)) = XTcl_GetCurrentNamespace                                                                                  // tclStubInit.c:1504:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4120)) = XTcl_GetGlobalNamespace                                                                                   // tclStubInit.c:1505:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4128)) = XTcl_FindNamespace                                                               // tclStubInit.c:1506:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4136)) = XTcl_FindCommand                                                             // tclStubInit.c:1507:5:
	*(*func(*libc.TLS, uintptr, uintptr) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4144)) = XTcl_GetCommandFromObj                                                                       // tclStubInit.c:1508:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4152)) = XTcl_GetCommandFullName                                                                     // tclStubInit.c:1509:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4160)) = XTcl_FSEvalFileEx                                                                         // tclStubInit.c:1510:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4168)) = XTcl_SetExitProc                                                                                          // tclStubInit.c:1511:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, ClientData, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4176)) = XTcl_LimitAddHandler                                                         // tclStubInit.c:1512:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4184)) = XTcl_LimitRemoveHandler                                                               // tclStubInit.c:1513:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4192)) = XTcl_LimitReady                                                                                             // tclStubInit.c:1514:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4200)) = XTcl_LimitCheck                                                                                             // tclStubInit.c:1515:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4208)) = XTcl_LimitExceeded                                                                                          // tclStubInit.c:1516:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4216)) = XTcl_LimitSetCommands                                                                                      // tclStubInit.c:1517:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4224)) = XTcl_LimitSetTime                                                                                        // tclStubInit.c:1518:5:
	*(*func(*libc.TLS, uintptr, int32, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4232)) = XTcl_LimitSetGranularity                                                                            // tclStubInit.c:1519:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4240)) = XTcl_LimitTypeEnabled                                                                                // tclStubInit.c:1520:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4248)) = XTcl_LimitTypeExceeded                                                                               // tclStubInit.c:1521:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4256)) = XTcl_LimitTypeSet                                                                                          // tclStubInit.c:1522:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4264)) = XTcl_LimitTypeReset                                                                                        // tclStubInit.c:1523:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4272)) = XTcl_LimitGetCommands                                                                                       // tclStubInit.c:1524:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4280)) = XTcl_LimitGetTime                                                                                        // tclStubInit.c:1525:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4288)) = XTcl_LimitGetGranularity                                                                             // tclStubInit.c:1526:5:
	*(*func(*libc.TLS, uintptr, int32) Tcl_InterpState)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4296)) = XTcl_SaveInterpState                                                                       // tclStubInit.c:1527:5:
	*(*func(*libc.TLS, uintptr, Tcl_InterpState) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4304)) = XTcl_RestoreInterpState                                                                    // tclStubInit.c:1528:5:
	*(*func(*libc.TLS, Tcl_InterpState))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4312)) = XTcl_DiscardInterpState                                                                                   // tclStubInit.c:1529:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4320)) = XTcl_SetReturnOptions                                                                              // tclStubInit.c:1530:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4328)) = XTcl_GetReturnOptions                                                                              // tclStubInit.c:1531:5:
	*(*func(*libc.TLS, Tcl_Command) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4336)) = XTcl_IsEnsemble                                                                                         // tclStubInit.c:1532:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4344)) = XTcl_CreateEnsemble                                                          // tclStubInit.c:1533:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4352)) = XTcl_FindEnsemble                                                                     // tclStubInit.c:1534:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4360)) = XTcl_SetEnsembleSubcommandList                                                        // tclStubInit.c:1535:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4368)) = XTcl_SetEnsembleMappingDict                                                           // tclStubInit.c:1536:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4376)) = XTcl_SetEnsembleUnknownHandler                                                        // tclStubInit.c:1537:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4384)) = XTcl_SetEnsembleFlags                                                                   // tclStubInit.c:1538:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4392)) = XTcl_GetEnsembleSubcommandList                                                        // tclStubInit.c:1539:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4400)) = XTcl_GetEnsembleMappingDict                                                           // tclStubInit.c:1540:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4408)) = XTcl_GetEnsembleUnknownHandler                                                        // tclStubInit.c:1541:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4416)) = XTcl_GetEnsembleFlags                                                                 // tclStubInit.c:1542:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4424)) = XTcl_GetEnsembleNamespace                                                             // tclStubInit.c:1543:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4432)) = XTcl_SetTimeProc                                                                             // tclStubInit.c:1544:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4440)) = XTcl_QueryTimeProc                                                                              // tclStubInit.c:1545:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4448)) = XTcl_ChannelThreadActionProc                                                                              // tclStubInit.c:1546:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4456)) = XTcl_NewBignumObj                                                                                         // tclStubInit.c:1547:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4464)) = XTcl_DbNewBignumObj                                                                       // tclStubInit.c:1548:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4472)) = XTcl_SetBignumObj                                                                                        // tclStubInit.c:1549:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4480)) = XTcl_GetBignumFromObj                                                                     // tclStubInit.c:1550:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4488)) = XTcl_TakeBignumFromObj                                                                    // tclStubInit.c:1551:5:
	*(*func(*libc.TLS, Tcl_Channel, Tcl_WideInt) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4496)) = XTcl_TruncateChannel                                                                       // tclStubInit.c:1552:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4504)) = XTcl_ChannelTruncateProc                                                                                  // tclStubInit.c:1553:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4512)) = XTcl_SetChannelErrorInterp                                                                               // tclStubInit.c:1554:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4520)) = XTcl_GetChannelErrorInterp                                                                               // tclStubInit.c:1555:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4528)) = XTcl_SetChannelError                                                                                 // tclStubInit.c:1556:5:
	*(*func(*libc.TLS, Tcl_Channel, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4536)) = XTcl_GetChannelError                                                                                 // tclStubInit.c:1557:5:
	*(*func(*libc.TLS, uintptr, float64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4544)) = XTcl_InitBignumFromDouble                                                                 // tclStubInit.c:1558:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4552)) = XTcl_GetNamespaceUnknownHandler                                                                  // tclStubInit.c:1559:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4560)) = XTcl_SetNamespaceUnknownHandler                                                           // tclStubInit.c:1560:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4568)) = XTcl_GetEncodingFromObj                                                                   // tclStubInit.c:1561:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4576)) = XTcl_GetEncodingSearchPath                                                                                         // tclStubInit.c:1562:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4584)) = XTcl_SetEncodingSearchPath                                                                                  // tclStubInit.c:1563:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4592)) = XTcl_GetEncodingNameFromEnvironment                                                                       // tclStubInit.c:1564:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4600)) = XTcl_PkgRequireProc                                                       // tclStubInit.c:1565:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4608)) = XTcl_AppendObjToErrorInfo                                                                                // tclStubInit.c:1566:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4616)) = XTcl_AppendLimitedToObj                                                           // tclStubInit.c:1567:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4624)) = XTcl_Format                                                                      // tclStubInit.c:1568:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4632)) = XTcl_AppendFormatToObj                                                    // tclStubInit.c:1569:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4640)) = XTcl_ObjPrintf                                                                                   // tclStubInit.c:1570:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4648)) = XTcl_AppendPrintfToObj                                                                          // tclStubInit.c:1571:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4656)) = XTcl_CancelEval                                                                 // tclStubInit.c:1572:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4664)) = XTcl_Canceled                                                                                        // tclStubInit.c:1573:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4672)) = XTcl_CreatePipe                                                                    // tclStubInit.c:1574:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4680)) = XTcl_NRCreateCommand                                  // tclStubInit.c:1575:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4688)) = XTcl_NREvalObj                                                                              // tclStubInit.c:1576:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4696)) = XTcl_NREvalObjv                                                                      // tclStubInit.c:1577:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4704)) = XTcl_NRCmdSwap                                                          // tclStubInit.c:1578:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, ClientData, ClientData, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4712)) = XTcl_NRAddCallback                                       // tclStubInit.c:1579:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4720)) = XTcl_NRCallObjProc                                                     // tclStubInit.c:1580:5:
	*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4728)) = XTcl_GetFSDeviceFromStat                                                                                   // tclStubInit.c:1581:5:
	*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4736)) = XTcl_GetFSInodeFromStat                                                                                    // tclStubInit.c:1582:5:
	*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4744)) = XTcl_GetModeFromStat                                                                                       // tclStubInit.c:1583:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4752)) = XTcl_GetLinkCountFromStat                                                                                   // tclStubInit.c:1584:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4760)) = XTcl_GetUserIdFromStat                                                                                      // tclStubInit.c:1585:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4768)) = XTcl_GetGroupIdFromStat                                                                                     // tclStubInit.c:1586:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4776)) = XTcl_GetDeviceTypeFromStat                                                                                  // tclStubInit.c:1587:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4784)) = XTcl_GetAccessTimeFromStat                                                                            // tclStubInit.c:1588:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4792)) = XTcl_GetModificationTimeFromStat                                                                      // tclStubInit.c:1589:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4800)) = XTcl_GetChangeTimeFromStat                                                                            // tclStubInit.c:1590:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4808)) = XTcl_GetSizeFromStat                                                                                 // tclStubInit.c:1591:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4816)) = XTcl_GetBlocksFromStat                                                                               // tclStubInit.c:1592:5:
	*(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4824)) = XTcl_GetBlockSizeFromStat                                                                                  // tclStubInit.c:1593:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4832)) = XTcl_SetEnsembleParameterList                                                         // tclStubInit.c:1594:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4840)) = XTcl_GetEnsembleParameterList                                                         // tclStubInit.c:1595:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4848)) = XTcl_ParseArgsObjv                                                      // tclStubInit.c:1596:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4856)) = XTcl_GetErrorLine                                                                                           // tclStubInit.c:1597:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4864)) = XTcl_SetErrorLine                                                                                          // tclStubInit.c:1598:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4872)) = XTcl_TransferResult                                                                               // tclStubInit.c:1599:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4880)) = XTcl_InterpActive                                                                                           // tclStubInit.c:1600:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4888)) = XTcl_BackgroundException                                                                                   // tclStubInit.c:1601:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4896)) = XTcl_ZlibDeflate                                                            // tclStubInit.c:1602:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4904)) = XTcl_ZlibInflate                                                            // tclStubInit.c:1603:5:
	*(*func(*libc.TLS, uint32, uintptr, int32) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4912)) = XTcl_ZlibCRC32                                                                              // tclStubInit.c:1604:5:
	*(*func(*libc.TLS, uint32, uintptr, int32) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4920)) = XTcl_ZlibAdler32                                                                            // tclStubInit.c:1605:5:
	*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4928)) = XTcl_ZlibStreamInit                                                  // tclStubInit.c:1606:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4936)) = XTcl_ZlibStreamGetCommandName                                                                      // tclStubInit.c:1607:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4944)) = XTcl_ZlibStreamEof                                                                                   // tclStubInit.c:1608:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4952)) = XTcl_ZlibStreamChecksum                                                                              // tclStubInit.c:1609:5:
	*(*func(*libc.TLS, Tcl_ZlibStream, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4960)) = XTcl_ZlibStreamPut                                                                   // tclStubInit.c:1610:5:
	*(*func(*libc.TLS, Tcl_ZlibStream, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4968)) = XTcl_ZlibStreamGet                                                                   // tclStubInit.c:1611:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4976)) = XTcl_ZlibStreamClose                                                                                 // tclStubInit.c:1612:5:
	*(*func(*libc.TLS, Tcl_ZlibStream) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4984)) = XTcl_ZlibStreamReset                                                                                 // tclStubInit.c:1613:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 4992)) = XTcl_SetStartupScript                                                                                    // tclStubInit.c:1614:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5000)) = XTcl_GetStartupScript                                                                                     // tclStubInit.c:1615:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5008)) = XTcl_CloseEx                                                                            // tclStubInit.c:1616:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5016)) = XTcl_NRExprObj                                                                            // tclStubInit.c:1617:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5024)) = XTcl_NRSubstObj                                                                             // tclStubInit.c:1618:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5032)) = XTcl_LoadFile                                                    // tclStubInit.c:1619:5:
	*(*func(*libc.TLS, uintptr, Tcl_LoadHandle, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5040)) = XTcl_FindSymbol                                                                  // tclStubInit.c:1620:5:
	*(*func(*libc.TLS, uintptr, Tcl_LoadHandle) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5048)) = XTcl_FSUnloadFile                                                                           // tclStubInit.c:1621:5:
	*(*func(*libc.TLS, Tcl_ZlibStream, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclStubs)) + 5056)) = XTcl_ZlibStreamSetCompressionDictionary                                                           // tclStubInit.c:1622:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 16)) = XTclBN_epoch                                                                                                    // tclStubInit.c:876:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 24)) = XTclBN_revision                                                                                                 // tclStubInit.c:877:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 32)) = XTclBN_mp_add                                                                       // tclStubInit.c:878:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 40)) = XTclBN_mp_add_d                                                                    // tclStubInit.c:879:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 48)) = XTclBN_mp_and                                                                       // tclStubInit.c:880:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 56)) = XTclBN_mp_clamp                                                                                              // tclStubInit.c:881:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 64)) = XTclBN_mp_clear                                                                                              // tclStubInit.c:882:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 72)) = XTclBN_mp_clear_multi                                                                               // tclStubInit.c:883:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_ord)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 80)) = XTclBN_mp_cmp                                                                                // tclStubInit.c:884:5:
	*(*func(*libc.TLS, uintptr, Mp_digit) Mp_ord)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 88)) = XTclBN_mp_cmp_d                                                                             // tclStubInit.c:885:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_ord)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 96)) = XTclBN_mp_cmp_mag                                                                            // tclStubInit.c:886:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 104)) = XTclBN_mp_copy                                                                              // tclStubInit.c:887:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 112)) = XTclBN_mp_count_bits                                                                                  // tclStubInit.c:888:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 120)) = XTclBN_mp_div                                                             // tclStubInit.c:889:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 128)) = XTclBN_mp_div_d                                                          // tclStubInit.c:890:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 136)) = XTclBN_mp_div_2                                                                             // tclStubInit.c:891:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 144)) = XTclBN_mp_div_2d                                                            // tclStubInit.c:892:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 152)) = XTclBN_mp_div_3                                                                    // tclStubInit.c:893:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 160)) = XTclBN_mp_exch                                                                                     // tclStubInit.c:894:5:
	*(*func(*libc.TLS, uintptr, uint32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 168)) = XTclBN_mp_expt_d                                                                    // tclStubInit.c:895:5:
	*(*func(*libc.TLS, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 176)) = XTclBN_mp_grow                                                                                // tclStubInit.c:896:5:
	*(*func(*libc.TLS, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 184)) = XTclBN_mp_init                                                                                       // tclStubInit.c:897:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 192)) = XTclBN_mp_init_copy                                                                         // tclStubInit.c:898:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 200)) = XTclBN_mp_init_multi                                                                        // tclStubInit.c:899:5:
	*(*func(*libc.TLS, uintptr, Mp_digit) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 208)) = XTclBN_mp_init_set                                                                         // tclStubInit.c:900:5:
	*(*func(*libc.TLS, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 216)) = XTclBN_mp_init_size                                                                           // tclStubInit.c:901:5:
	*(*func(*libc.TLS, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 224)) = XTclBN_mp_lshd                                                                                // tclStubInit.c:902:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 232)) = XTclBN_mp_mod                                                                      // tclStubInit.c:903:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 240)) = XTclBN_mp_mod_2d                                                                     // tclStubInit.c:904:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 248)) = XTclBN_mp_mul                                                                      // tclStubInit.c:905:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 256)) = XTclBN_mp_mul_d                                                                   // tclStubInit.c:906:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 264)) = XTclBN_mp_mul_2                                                                             // tclStubInit.c:907:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 272)) = XTclBN_mp_mul_2d                                                                     // tclStubInit.c:908:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 280)) = XTclBN_mp_neg                                                                               // tclStubInit.c:909:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 288)) = XTclBN_mp_or                                                                       // tclStubInit.c:910:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 296)) = XTclBN_mp_radix_size                                                                 // tclStubInit.c:911:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 304)) = XTclBN_mp_read_radix                                                                 // tclStubInit.c:912:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 312)) = XTclBN_mp_rshd                                                                                       // tclStubInit.c:913:5:
	*(*func(*libc.TLS, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 320)) = XTclBN_mp_shrink                                                                                     // tclStubInit.c:914:5:
	*(*func(*libc.TLS, uintptr, Mp_digit))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 328)) = XTclBN_mp_set                                                                                     // tclStubInit.c:915:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 336)) = XTclBN_mp_sqr                                                                               // tclStubInit.c:916:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 344)) = XTclBN_mp_sqrt                                                                              // tclStubInit.c:917:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 352)) = XTclBN_mp_sub                                                                      // tclStubInit.c:918:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 360)) = XTclBN_mp_sub_d                                                                   // tclStubInit.c:919:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 368)) = XTclBN_mp_to_unsigned_bin                                                                   // tclStubInit.c:920:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 376)) = XTclBN_mp_to_unsigned_bin_n                                                        // tclStubInit.c:921:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 384)) = XTclBN_mp_toradix_n                                                           // tclStubInit.c:922:5:
	*(*func(*libc.TLS, uintptr) Size_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 392)) = XTclBN_mp_unsigned_bin_size                                                                          // tclStubInit.c:923:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 400)) = XTclBN_mp_xor                                                                      // tclStubInit.c:924:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 408)) = XTclBN_mp_zero                                                                                              // tclStubInit.c:925:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 416)) = XTclBN_reverse                                                                                       // tclStubInit.c:926:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 424)) = XTclBN_fast_s_mp_mul_digs                                                   // tclStubInit.c:927:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 432)) = XTclBN_fast_s_mp_sqr                                                                        // tclStubInit.c:928:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 440)) = XTclBN_mp_karatsuba_mul                                                            // tclStubInit.c:929:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 448)) = XTclBN_mp_karatsuba_sqr                                                                     // tclStubInit.c:930:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 456)) = XTclBN_mp_toom_mul                                                                 // tclStubInit.c:931:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 464)) = XTclBN_mp_toom_sqr                                                                          // tclStubInit.c:932:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 472)) = XTclBN_s_mp_add                                                                    // tclStubInit.c:933:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 480)) = XTclBN_s_mp_mul_digs                                                        // tclStubInit.c:934:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 488)) = XTclBN_s_mp_sqr                                                                             // tclStubInit.c:935:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 496)) = XTclBN_s_mp_sub                                                                    // tclStubInit.c:936:5:
	*(*func(*libc.TLS, uintptr, uint32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 504)) = XTclBN_mp_init_set_int                                                                       // tclStubInit.c:937:5:
	*(*func(*libc.TLS, uintptr, uint32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 512)) = XTclBN_mp_set_int                                                                            // tclStubInit.c:938:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 520)) = XTclBN_mp_cnt_lsb                                                                                     // tclStubInit.c:939:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 528)) = XTclBNInitBignumFromLong                                                                       // tclStubInit.c:940:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideInt) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 536)) = XTclBNInitBignumFromWideInt                                                              // tclStubInit.c:941:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideUInt) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 544)) = XTclBNInitBignumFromWideUInt                                                            // tclStubInit.c:942:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 552)) = XTclBN_mp_expt_d_ex                                                         // tclStubInit.c:943:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideUInt))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 560)) = XTclBN_mp_set_ull                                                                             // tclStubInit.c:944:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 568)) = XTclBN_mp_get_mag_ull                                                                          // tclStubInit.c:945:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideInt))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 576)) = XTclBN_mp_set_ll                                                                               // tclStubInit.c:946:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 600)) = XTclBN_mp_and                                                                      // tclStubInit.c:949:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 608)) = XTclBN_mp_or                                                                       // tclStubInit.c:950:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 616)) = XTclBN_mp_xor                                                                      // tclStubInit.c:951:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 624)) = XTclBN_mp_signed_rsh                                                                 // tclStubInit.c:952:5:
	*(*func(*libc.TLS, uintptr, uintptr, Size_t, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 640)) = XTclBN_mp_to_ubin                                                           // tclStubInit.c:954:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideUInt, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 648)) = sTclBNMpDivLd                                                        // tclStubInit.c:955:5:
	*(*func(*libc.TLS, uintptr, uintptr, Size_t, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 656)) = XTclBN_mp_to_radix                                                   // tclStubInit.c:956:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 16)) = XTclBN_epoch                                                                                                    // tclStubInit.c:876:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 24)) = XTclBN_revision                                                                                                 // tclStubInit.c:877:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 32)) = XTclBN_mp_add                                                                       // tclStubInit.c:878:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 40)) = XTclBN_mp_add_d                                                                    // tclStubInit.c:879:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 48)) = XTclBN_mp_and                                                                       // tclStubInit.c:880:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 56)) = XTclBN_mp_clamp                                                                                              // tclStubInit.c:881:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 64)) = XTclBN_mp_clear                                                                                              // tclStubInit.c:882:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 72)) = XTclBN_mp_clear_multi                                                                               // tclStubInit.c:883:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_ord)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 80)) = XTclBN_mp_cmp                                                                                // tclStubInit.c:884:5:
	*(*func(*libc.TLS, uintptr, Mp_digit) Mp_ord)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 88)) = XTclBN_mp_cmp_d                                                                             // tclStubInit.c:885:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_ord)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 96)) = XTclBN_mp_cmp_mag                                                                            // tclStubInit.c:886:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 104)) = XTclBN_mp_copy                                                                              // tclStubInit.c:887:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 112)) = XTclBN_mp_count_bits                                                                                  // tclStubInit.c:888:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 120)) = XTclBN_mp_div                                                             // tclStubInit.c:889:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 128)) = XTclBN_mp_div_d                                                          // tclStubInit.c:890:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 136)) = XTclBN_mp_div_2                                                                             // tclStubInit.c:891:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 144)) = XTclBN_mp_div_2d                                                            // tclStubInit.c:892:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 152)) = XTclBN_mp_div_3                                                                    // tclStubInit.c:893:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 160)) = XTclBN_mp_exch                                                                                     // tclStubInit.c:894:5:
	*(*func(*libc.TLS, uintptr, uint32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 168)) = XTclBN_mp_expt_d                                                                    // tclStubInit.c:895:5:
	*(*func(*libc.TLS, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 176)) = XTclBN_mp_grow                                                                                // tclStubInit.c:896:5:
	*(*func(*libc.TLS, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 184)) = XTclBN_mp_init                                                                                       // tclStubInit.c:897:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 192)) = XTclBN_mp_init_copy                                                                         // tclStubInit.c:898:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 200)) = XTclBN_mp_init_multi                                                                        // tclStubInit.c:899:5:
	*(*func(*libc.TLS, uintptr, Mp_digit) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 208)) = XTclBN_mp_init_set                                                                         // tclStubInit.c:900:5:
	*(*func(*libc.TLS, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 216)) = XTclBN_mp_init_size                                                                           // tclStubInit.c:901:5:
	*(*func(*libc.TLS, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 224)) = XTclBN_mp_lshd                                                                                // tclStubInit.c:902:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 232)) = XTclBN_mp_mod                                                                      // tclStubInit.c:903:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 240)) = XTclBN_mp_mod_2d                                                                     // tclStubInit.c:904:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 248)) = XTclBN_mp_mul                                                                      // tclStubInit.c:905:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 256)) = XTclBN_mp_mul_d                                                                   // tclStubInit.c:906:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 264)) = XTclBN_mp_mul_2                                                                             // tclStubInit.c:907:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 272)) = XTclBN_mp_mul_2d                                                                     // tclStubInit.c:908:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 280)) = XTclBN_mp_neg                                                                               // tclStubInit.c:909:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 288)) = XTclBN_mp_or                                                                       // tclStubInit.c:910:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 296)) = XTclBN_mp_radix_size                                                                 // tclStubInit.c:911:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 304)) = XTclBN_mp_read_radix                                                                 // tclStubInit.c:912:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 312)) = XTclBN_mp_rshd                                                                                       // tclStubInit.c:913:5:
	*(*func(*libc.TLS, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 320)) = XTclBN_mp_shrink                                                                                     // tclStubInit.c:914:5:
	*(*func(*libc.TLS, uintptr, Mp_digit))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 328)) = XTclBN_mp_set                                                                                     // tclStubInit.c:915:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 336)) = XTclBN_mp_sqr                                                                               // tclStubInit.c:916:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 344)) = XTclBN_mp_sqrt                                                                              // tclStubInit.c:917:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 352)) = XTclBN_mp_sub                                                                      // tclStubInit.c:918:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 360)) = XTclBN_mp_sub_d                                                                   // tclStubInit.c:919:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 368)) = XTclBN_mp_to_unsigned_bin                                                                   // tclStubInit.c:920:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 376)) = XTclBN_mp_to_unsigned_bin_n                                                        // tclStubInit.c:921:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 384)) = XTclBN_mp_toradix_n                                                           // tclStubInit.c:922:5:
	*(*func(*libc.TLS, uintptr) Size_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 392)) = XTclBN_mp_unsigned_bin_size                                                                          // tclStubInit.c:923:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 400)) = XTclBN_mp_xor                                                                      // tclStubInit.c:924:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 408)) = XTclBN_mp_zero                                                                                              // tclStubInit.c:925:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 416)) = XTclBN_reverse                                                                                       // tclStubInit.c:926:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 424)) = XTclBN_fast_s_mp_mul_digs                                                   // tclStubInit.c:927:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 432)) = XTclBN_fast_s_mp_sqr                                                                        // tclStubInit.c:928:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 440)) = XTclBN_mp_karatsuba_mul                                                            // tclStubInit.c:929:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 448)) = XTclBN_mp_karatsuba_sqr                                                                     // tclStubInit.c:930:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 456)) = XTclBN_mp_toom_mul                                                                 // tclStubInit.c:931:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 464)) = XTclBN_mp_toom_sqr                                                                          // tclStubInit.c:932:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 472)) = XTclBN_s_mp_add                                                                    // tclStubInit.c:933:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 480)) = XTclBN_s_mp_mul_digs                                                        // tclStubInit.c:934:5:
	*(*func(*libc.TLS, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 488)) = XTclBN_s_mp_sqr                                                                             // tclStubInit.c:935:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 496)) = XTclBN_s_mp_sub                                                                    // tclStubInit.c:936:5:
	*(*func(*libc.TLS, uintptr, uint32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 504)) = XTclBN_mp_init_set_int                                                                       // tclStubInit.c:937:5:
	*(*func(*libc.TLS, uintptr, uint32) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 512)) = XTclBN_mp_set_int                                                                            // tclStubInit.c:938:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 520)) = XTclBN_mp_cnt_lsb                                                                                     // tclStubInit.c:939:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 528)) = XTclBNInitBignumFromLong                                                                       // tclStubInit.c:940:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideInt) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 536)) = XTclBNInitBignumFromWideInt                                                              // tclStubInit.c:941:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideUInt) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 544)) = XTclBNInitBignumFromWideUInt                                                            // tclStubInit.c:942:5:
	*(*func(*libc.TLS, uintptr, Mp_digit, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 552)) = XTclBN_mp_expt_d_ex                                                         // tclStubInit.c:943:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideUInt))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 560)) = XTclBN_mp_set_ull                                                                             // tclStubInit.c:944:5:
	*(*func(*libc.TLS, uintptr) Tcl_WideUInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 568)) = XTclBN_mp_get_mag_ull                                                                          // tclStubInit.c:945:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideInt))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 576)) = XTclBN_mp_set_ll                                                                               // tclStubInit.c:946:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 600)) = XTclBN_mp_and                                                                      // tclStubInit.c:949:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 608)) = XTclBN_mp_or                                                                       // tclStubInit.c:950:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 616)) = XTclBN_mp_xor                                                                      // tclStubInit.c:951:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 624)) = XTclBN_mp_signed_rsh                                                                 // tclStubInit.c:952:5:
	*(*func(*libc.TLS, uintptr, uintptr, Size_t, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 640)) = XTclBN_mp_to_ubin                                                           // tclStubInit.c:954:5:
	*(*func(*libc.TLS, uintptr, Tcl_WideUInt, uintptr, uintptr) Mp_err)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 648)) = sTclBNMpDivLd                                                        // tclStubInit.c:955:5:
	*(*func(*libc.TLS, uintptr, uintptr, Size_t, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclTomMathStubs)) + 656)) = XTclBN_mp_to_radix                                                   // tclStubInit.c:956:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclWideIntType)) + 24)) = sUpdateStringOfWideInt                                                                                        // tclObj.c:279:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclWideIntType)) + 32)) = sSetWideIntFromAny                                                                             // tclObj.c:280:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclWideIntType)) + 24)) = sUpdateStringOfWideInt                                                                                        // tclObj.c:279:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclWideIntType)) + 32)) = sSetWideIntFromAny                                                                             // tclObj.c:280:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 0)) = sGetWinFileAttributes                                                        // tclWinFCmd.c:63:3:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 8)) = sSetWinFileAttributes                                                        // tclWinFCmd.c:63:25:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 16)) = sGetWinFileAttributes                                                       // tclWinFCmd.c:64:3:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 24)) = sSetWinFileAttributes                                                       // tclWinFCmd.c:64:25:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 32)) = sGetWinFileLongName                                                         // tclWinFCmd.c:65:3:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 40)) = sCannotSetAttribute                                                         // tclWinFCmd.c:65:23:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 48)) = sGetWinFileAttributes                                                       // tclWinFCmd.c:66:3:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 56)) = sSetWinFileAttributes                                                       // tclWinFCmd.c:66:25:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 64)) = sGetWinFileShortName                                                        // tclWinFCmd.c:67:3:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 72)) = sCannotSetAttribute                                                         // tclWinFCmd.c:67:24:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 80)) = sGetWinFileAttributes                                                       // tclWinFCmd.c:68:3:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&XtclpFileAttrProcs)) + 88)) = sSetWinFileAttributes                                                       // tclWinFCmd.c:68:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 8)) = sArrayAnyMoreCmd                                                                // tclVar.c:4104:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 16)) = XTclCompileBasic2ArgCmd                                                         // tclVar.c:4104:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 56)) = sArrayDoneSearchCmd                                                            // tclVar.c:4105:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 64)) = XTclCompileBasic2ArgCmd                                                         // tclVar.c:4105:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 104)) = sArrayExistsCmd                                                               // tclVar.c:4106:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 112)) = XTclCompileArrayExistsCmd                                                      // tclVar.c:4106:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 152)) = sArrayGetCmd                                                                  // tclVar.c:4107:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 160)) = XTclCompileBasic1Or2ArgCmd                                                     // tclVar.c:4107:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 200)) = sArrayNamesCmd                                                                // tclVar.c:4108:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 208)) = XTclCompileBasic1To3ArgCmd                                                     // tclVar.c:4108:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 248)) = sArrayNextElementCmd                                                          // tclVar.c:4109:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 256)) = XTclCompileBasic2ArgCmd                                                        // tclVar.c:4109:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 296)) = sArraySetCmd                                                                  // tclVar.c:4110:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 304)) = XTclCompileArraySetCmd                                                         // tclVar.c:4110:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 344)) = sArraySizeCmd                                                                 // tclVar.c:4111:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 352)) = XTclCompileBasic1ArgCmd                                                        // tclVar.c:4111:26:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 392)) = sArrayStartSearchCmd                                                          // tclVar.c:4112:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 400)) = XTclCompileBasic1ArgCmd                                                        // tclVar.c:4112:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 440)) = sArrayStatsCmd                                                                // tclVar.c:4113:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 448)) = XTclCompileBasic1ArgCmd                                                        // tclVar.c:4113:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 488)) = sArrayUnsetCmd                                                                // tclVar.c:4114:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&arrayImplMap)) + 496)) = XTclCompileArrayUnsetCmd                                                       // tclVar.c:4114:28:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&assembleCodeType)) + 8)) = sFreeAssembleCodeInternalRep                                                                                  // tclAssembly.c:322:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&assembleCodeType)) + 16)) = sDupAssembleCodeInternalRep                                                                         // tclAssembly.c:323:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&binaryMap)) + 8)) = sBinaryFormatCmd                                                                   // tclBinary.c:138:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&binaryMap)) + 16)) = XTclCompileBasicMin1ArgCmd                                                         // tclBinary.c:138:34:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&binaryMap)) + 56)) = XBinaryScanCmd                                                                    // tclBinary.c:139:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&binaryMap)) + 64)) = XTclCompileBasicMin2ArgCmd                                                         // tclBinary.c:139:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 8)) = XTcl_AppendObjCmd                                                                // tclBasic.c:204:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 16)) = XTclCompileAppendCmd                                                             // tclBasic.c:204:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 48)) = XTcl_ApplyObjCmd                                                                // tclBasic.c:205:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 64)) = XTclNRApplyObjCmd                                                               // tclBasic.c:205:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 88)) = XTcl_BreakObjCmd                                                                // tclBasic.c:206:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 96)) = XTclCompileBreakCmd                                                              // tclBasic.c:206:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 128)) = XTcl_CaseObjCmd                                                                // tclBasic.c:208:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 168)) = XTcl_CatchObjCmd                                                               // tclBasic.c:210:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 176)) = XTclCompileCatchCmd                                                             // tclBasic.c:210:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 184)) = XTclNRCatchObjCmd                                                              // tclBasic.c:210:53:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 208)) = XTcl_ConcatObjCmd                                                              // tclBasic.c:211:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 216)) = XTclCompileConcatCmd                                                            // tclBasic.c:211:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 248)) = XTcl_ContinueObjCmd                                                            // tclBasic.c:212:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 256)) = XTclCompileContinueCmd                                                          // tclBasic.c:212:38:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 304)) = XTclNRCoroutineObjCmd                                                          // tclBasic.c:213:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 328)) = XTcl_ErrorObjCmd                                                               // tclBasic.c:214:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 336)) = XTclCompileErrorCmd                                                             // tclBasic.c:214:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 368)) = XTcl_EvalObjCmd                                                                // tclBasic.c:215:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 384)) = XTclNREvalObjCmd                                                               // tclBasic.c:215:40:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 408)) = XTcl_ExprObjCmd                                                                // tclBasic.c:216:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 416)) = XTclCompileExprCmd                                                              // tclBasic.c:216:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 424)) = XTclNRExprObjCmd                                                               // tclBasic.c:216:51:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 448)) = XTcl_ForObjCmd                                                                 // tclBasic.c:217:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 456)) = XTclCompileForCmd                                                               // tclBasic.c:217:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 464)) = XTclNRForObjCmd                                                                // tclBasic.c:217:48:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 488)) = XTcl_ForeachObjCmd                                                             // tclBasic.c:218:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 496)) = XTclCompileForeachCmd                                                           // tclBasic.c:218:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 504)) = XTclNRForeachCmd                                                               // tclBasic.c:218:59:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 528)) = XTcl_FormatObjCmd                                                              // tclBasic.c:219:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 536)) = XTclCompileFormatCmd                                                            // tclBasic.c:219:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 568)) = XTcl_GlobalObjCmd                                                              // tclBasic.c:220:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 576)) = XTclCompileGlobalCmd                                                            // tclBasic.c:220:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 608)) = XTcl_IfObjCmd                                                                  // tclBasic.c:221:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 616)) = XTclCompileIfCmd                                                                // tclBasic.c:221:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 624)) = XTclNRIfObjCmd                                                                 // tclBasic.c:221:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 648)) = XTcl_IncrObjCmd                                                                // tclBasic.c:222:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 656)) = XTclCompileIncrCmd                                                              // tclBasic.c:222:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 688)) = XTcl_JoinObjCmd                                                                // tclBasic.c:223:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 728)) = XTcl_LappendObjCmd                                                             // tclBasic.c:224:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 736)) = XTclCompileLappendCmd                                                           // tclBasic.c:224:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 768)) = XTcl_LassignObjCmd                                                             // tclBasic.c:225:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 776)) = XTclCompileLassignCmd                                                           // tclBasic.c:225:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 808)) = XTcl_LindexObjCmd                                                              // tclBasic.c:226:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 816)) = XTclCompileLindexCmd                                                            // tclBasic.c:226:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 848)) = XTcl_LinsertObjCmd                                                             // tclBasic.c:227:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 856)) = XTclCompileLinsertCmd                                                           // tclBasic.c:227:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 888)) = XTcl_ListObjCmd                                                                // tclBasic.c:228:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 896)) = XTclCompileListCmd                                                              // tclBasic.c:228:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 928)) = XTcl_LlengthObjCmd                                                             // tclBasic.c:229:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 936)) = XTclCompileLlengthCmd                                                           // tclBasic.c:229:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 968)) = XTcl_LmapObjCmd                                                                // tclBasic.c:230:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 976)) = XTclCompileLmapCmd                                                              // tclBasic.c:230:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 984)) = XTclNRLmapCmd                                                                  // tclBasic.c:230:51:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1008)) = XTcl_LrangeObjCmd                                                             // tclBasic.c:231:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1016)) = XTclCompileLrangeCmd                                                           // tclBasic.c:231:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1048)) = XTcl_LrepeatObjCmd                                                            // tclBasic.c:232:18:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1088)) = XTcl_LreplaceObjCmd                                                           // tclBasic.c:233:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1096)) = XTclCompileLreplaceCmd                                                         // tclBasic.c:233:38:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1128)) = XTcl_LreverseObjCmd                                                           // tclBasic.c:234:18:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1168)) = XTcl_LsearchObjCmd                                                            // tclBasic.c:235:18:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1208)) = XTcl_LsetObjCmd                                                               // tclBasic.c:236:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1216)) = XTclCompileLsetCmd                                                             // tclBasic.c:236:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1248)) = XTcl_LsortObjCmd                                                              // tclBasic.c:237:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1288)) = XTcl_PackageObjCmd                                                            // tclBasic.c:238:18:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1304)) = XTclNRPackageObjCmd                                                           // tclBasic.c:238:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1328)) = XTcl_ProcObjCmd                                                               // tclBasic.c:239:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1368)) = XTcl_RegexpObjCmd                                                             // tclBasic.c:240:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1376)) = XTclCompileRegexpCmd                                                           // tclBasic.c:240:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1408)) = XTcl_RegsubObjCmd                                                             // tclBasic.c:241:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1416)) = XTclCompileRegsubCmd                                                           // tclBasic.c:241:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1448)) = XTcl_RenameObjCmd                                                             // tclBasic.c:242:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1488)) = XTcl_ReturnObjCmd                                                             // tclBasic.c:243:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1496)) = XTclCompileReturnCmd                                                           // tclBasic.c:243:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1528)) = XTcl_ScanObjCmd                                                               // tclBasic.c:244:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1568)) = XTcl_SetObjCmd                                                                // tclBasic.c:245:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1576)) = XTclCompileSetCmd                                                              // tclBasic.c:245:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1608)) = XTcl_SplitObjCmd                                                              // tclBasic.c:246:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1648)) = XTcl_SubstObjCmd                                                              // tclBasic.c:247:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1656)) = XTclCompileSubstCmd                                                            // tclBasic.c:247:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1664)) = XTclNRSubstObjCmd                                                             // tclBasic.c:247:53:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1688)) = XTcl_SwitchObjCmd                                                             // tclBasic.c:248:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1696)) = XTclCompileSwitchCmd                                                           // tclBasic.c:248:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1704)) = XTclNRSwitchObjCmd                                                            // tclBasic.c:248:56:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1736)) = XTclCompileTailcallCmd                                                         // tclBasic.c:249:26:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1744)) = XTclNRTailcallObjCmd                                                          // tclBasic.c:249:49:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1768)) = XTcl_ThrowObjCmd                                                              // tclBasic.c:250:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1776)) = XTclCompileThrowCmd                                                            // tclBasic.c:250:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1808)) = XTcl_TraceObjCmd                                                              // tclBasic.c:251:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1848)) = XTcl_TryObjCmd                                                                // tclBasic.c:252:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1856)) = XTclCompileTryCmd                                                              // tclBasic.c:252:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1864)) = XTclNRTryObjCmd                                                               // tclBasic.c:252:48:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1888)) = XTcl_UnsetObjCmd                                                              // tclBasic.c:253:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1896)) = XTclCompileUnsetCmd                                                            // tclBasic.c:253:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1928)) = XTcl_UplevelObjCmd                                                            // tclBasic.c:254:18:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1944)) = XTclNRUplevelObjCmd                                                           // tclBasic.c:254:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1968)) = XTcl_UpvarObjCmd                                                              // tclBasic.c:255:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 1976)) = XTclCompileUpvarCmd                                                            // tclBasic.c:255:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2008)) = XTcl_VariableObjCmd                                                           // tclBasic.c:256:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2016)) = XTclCompileVariableCmd                                                         // tclBasic.c:256:38:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2048)) = XTcl_WhileObjCmd                                                              // tclBasic.c:257:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2056)) = XTclCompileWhileCmd                                                            // tclBasic.c:257:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2064)) = XTclNRWhileObjCmd                                                             // tclBasic.c:257:53:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2096)) = XTclCompileYieldCmd                                                            // tclBasic.c:258:24:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2104)) = XTclNRYieldObjCmd                                                             // tclBasic.c:258:44:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2136)) = XTclCompileYieldToCmd                                                          // tclBasic.c:259:26:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2144)) = XTclNRYieldToObjCmd                                                           // tclBasic.c:259:48:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2168)) = XTcl_AfterObjCmd                                                              // tclBasic.c:265:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2208)) = XTcl_CdObjCmd                                                                 // tclBasic.c:266:13:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2248)) = XTcl_CloseObjCmd                                                              // tclBasic.c:267:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2288)) = XTcl_EofObjCmd                                                                // tclBasic.c:268:14:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2328)) = XTcl_ExecObjCmd                                                               // tclBasic.c:269:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2368)) = XTcl_ExitObjCmd                                                               // tclBasic.c:270:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2408)) = XTcl_FblockedObjCmd                                                           // tclBasic.c:271:18:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2448)) = XTcl_FconfigureObjCmd                                                         // tclBasic.c:272:20:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2488)) = XTcl_FcopyObjCmd                                                              // tclBasic.c:273:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2528)) = XTcl_FileEventObjCmd                                                          // tclBasic.c:274:19:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2568)) = XTcl_FlushObjCmd                                                              // tclBasic.c:275:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2608)) = XTcl_GetsObjCmd                                                               // tclBasic.c:276:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2648)) = XTcl_GlobObjCmd                                                               // tclBasic.c:277:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2688)) = XTcl_LoadObjCmd                                                               // tclBasic.c:278:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2728)) = XTcl_OpenObjCmd                                                               // tclBasic.c:279:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2768)) = XTcl_PidObjCmd                                                                // tclBasic.c:280:14:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2808)) = XTcl_PutsObjCmd                                                               // tclBasic.c:281:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2848)) = XTcl_PwdObjCmd                                                                // tclBasic.c:282:14:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2888)) = XTcl_ReadObjCmd                                                               // tclBasic.c:283:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2928)) = XTcl_SeekObjCmd                                                               // tclBasic.c:284:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 2968)) = XTcl_SocketObjCmd                                                             // tclBasic.c:285:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 3008)) = XTcl_SourceObjCmd                                                             // tclBasic.c:286:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 3024)) = XTclNRSourceObjCmd                                                            // tclBasic.c:286:43:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 3048)) = XTcl_TellObjCmd                                                               // tclBasic.c:287:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 3088)) = XTcl_TimeObjCmd                                                               // tclBasic.c:288:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 3128)) = XTcl_UnloadObjCmd                                                             // tclBasic.c:292:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 3168)) = XTcl_UpdateObjCmd                                                             // tclBasic.c:293:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&builtInCmds)) + 3208)) = XTcl_VwaitObjCmd                                                              // tclBasic.c:294:16:
	*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&chainHashType)) + 8)) = XTclHashObjKey                                                                                   // tclDictObj.c:184:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&chainHashType)) + 16)) = XTclCompareObjKeys                                                                               // tclDictObj.c:185:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&chainHashType)) + 24)) = sAllocChainEntry                                                                               // tclDictObj.c:186:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&chainHashType)) + 32)) = XTclFreeObjEntry                                                                                                // tclDictObj.c:187:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&chanObjType)) + 8)) = sFreeChannelInternalRep                                                                                            // tclIO.c:332:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&chanObjType)) + 16)) = sDupChannelInternalRep                                                                                   // tclIO.c:333:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&classConstructor)) + 16)) = XTclOO_Class_Constructor                                // tclOO.c:131:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockCommands)) + 8)) = XClockGetenvObjCmd                                                             // tclClock.c:211:19:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockCommands)) + 24)) = XTclClockOldscanObjCmd                                                        // tclClock.c:212:19:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockCommands)) + 40)) = sClockConvertlocaltoutcObjCmd                                                 // tclClock.c:213:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockCommands)) + 56)) = XClockGetdatefieldsObjCmd                                                     // tclClock.c:214:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockCommands)) + 72)) = sClockGetjuliandayfromerayearmonthdayObjCmd                                   // tclClock.c:216:3:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockCommands)) + 88)) = sClockGetjuliandayfromerayearweekdayObjCmd                                    // tclClock.c:218:3:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockCommands)) + 104)) = sClockParseformatargsObjCmd                                                  // tclClock.c:219:26:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 16)) = XTclCompileBasicMin1ArgCmd                                                      // tclClock.c:255:44:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 56)) = XClockClicksObjCmd                                                             // tclClock.c:256:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 64)) = XTclCompileClockClicksCmd                                                       // tclClock.c:256:44:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 112)) = XTclCompileBasicMin1ArgCmd                                                     // tclClock.c:257:44:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 152)) = XClockMicrosecondsObjCmd                                                      // tclClock.c:258:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 160)) = XTclCompileClockReadingCmd                                                     // tclClock.c:258:44:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 200)) = XClockMillisecondsObjCmd                                                      // tclClock.c:259:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 208)) = XTclCompileClockReadingCmd                                                     // tclClock.c:259:44:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 256)) = XTclCompileBasicMin1ArgCmd                                                     // tclClock.c:260:44:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 296)) = XClockSecondsObjCmd                                                           // tclClock.c:261:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clockImplMap)) + 304)) = XTclCompileClockReadingCmd                                                     // tclClock.c:261:44:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clsMethods)) + 32)) = XTclOO_Class_Create                                           // tclOO.c:118:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clsMethods)) + 88)) = XTclOO_Class_New                                              // tclOO.c:119:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&clsMethods)) + 144)) = XTclOO_Class_CreateNs                                        // tclOO.c:120:5:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8)) = deflate_stored                                                                          // deflate.c:136:29:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 24)) = deflate_fast                                                                           // deflate.c:137:29:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 40)) = deflate_fast                                                                           // deflate.c:138:29:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56)) = deflate_fast                                                                           // deflate.c:139:29:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 72)) = deflate_slow                                                                           // deflate.c:141:29:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 88)) = deflate_slow                                                                           // deflate.c:142:29:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104)) = deflate_slow                                                                          // deflate.c:143:29:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 120)) = deflate_slow                                                                          // deflate.c:144:29:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 136)) = deflate_slow                                                                          // deflate.c:145:30:
	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 152)) = deflate_slow                                                                          // deflate.c:146:30:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&consoleChannelType)) + 16)) = sConsoleCloseProc                                                                        // tclWinConsole.c:176:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&consoleChannelType)) + 24)) = sConsoleInputProc                                                        // tclWinConsole.c:177:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&consoleChannelType)) + 32)) = sConsoleOutputProc                                                       // tclWinConsole.c:178:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&consoleChannelType)) + 64)) = sConsoleWatchProc                                                                                // tclWinConsole.c:182:5:
	*(*func(*libc.TLS, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&consoleChannelType)) + 72)) = sConsoleGetHandleProc                                                             // tclWinConsole.c:183:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&consoleChannelType)) + 80)) = sConsoleClose2Proc                                                                // tclWinConsole.c:184:2:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&consoleChannelType)) + 88)) = sConsoleBlockModeProc                                                                      // tclWinConsole.c:185:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&consoleChannelType)) + 120)) = sConsoleThreadActionProc                                                                        // tclWinConsole.c:189:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&decodeMap)) + 8)) = sBinaryDecodeHex                                                                   // tclBinary.c:151:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&decodeMap)) + 16)) = XTclCompileBasic1Or2ArgCmd                                                         // tclBinary.c:151:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&decodeMap)) + 56)) = sBinaryDecodeUu                                                                   // tclBinary.c:152:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&decodeMap)) + 64)) = XTclCompileBasic1Or2ArgCmd                                                         // tclBinary.c:152:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&decodeMap)) + 104)) = sBinaryDecode64                                                                  // tclBinary.c:153:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&decodeMap)) + 112)) = XTclCompileBasic1Or2ArgCmd                                                        // tclBinary.c:153:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 8)) = sInfoArgsCmd                                                                  // tclCmdIL.c:156:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 16)) = XTclCompileBasic1ArgCmd                                                       // tclCmdIL.c:156:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 56)) = sInfoBodyCmd                                                                 // tclCmdIL.c:157:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 64)) = XTclCompileBasic1ArgCmd                                                       // tclCmdIL.c:157:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 104)) = sInfoCmdCountCmd                                                            // tclCmdIL.c:158:21:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 112)) = XTclCompileBasic0ArgCmd                                                      // tclCmdIL.c:158:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 152)) = sInfoCommandsCmd                                                            // tclCmdIL.c:159:21:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 160)) = XTclCompileInfoCommandsCmd                                                   // tclCmdIL.c:159:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 200)) = sInfoCompleteCmd                                                            // tclCmdIL.c:160:21:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 208)) = XTclCompileBasic1ArgCmd                                                      // tclCmdIL.c:160:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 248)) = XTclInfoCoroutineCmd                                                        // tclCmdIL.c:161:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 256)) = XTclCompileInfoCoroutineCmd                                                  // tclCmdIL.c:161:47:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 296)) = sInfoDefaultCmd                                                             // tclCmdIL.c:162:21:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 304)) = XTclCompileBasic3ArgCmd                                                      // tclCmdIL.c:162:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 344)) = sInfoErrorStackCmd                                                          // tclCmdIL.c:163:23:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 352)) = XTclCompileBasic0Or1ArgCmd                                                   // tclCmdIL.c:163:46:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 392)) = XTclInfoExistsCmd                                                           // tclCmdIL.c:164:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 400)) = XTclCompileInfoExistsCmd                                                     // tclCmdIL.c:164:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 440)) = sInfoFrameCmd                                                               // tclCmdIL.c:165:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 448)) = XTclCompileBasic0Or1ArgCmd                                                   // tclCmdIL.c:165:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 488)) = sInfoFunctionsCmd                                                           // tclCmdIL.c:166:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 496)) = XTclCompileBasic0Or1ArgCmd                                                   // tclCmdIL.c:166:44:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 536)) = XTclInfoGlobalsCmd                                                          // tclCmdIL.c:167:21:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 544)) = XTclCompileBasic0Or1ArgCmd                                                   // tclCmdIL.c:167:44:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 584)) = sInfoHostnameCmd                                                            // tclCmdIL.c:168:21:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 592)) = XTclCompileBasic0ArgCmd                                                      // tclCmdIL.c:168:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 632)) = sInfoLevelCmd                                                               // tclCmdIL.c:169:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 640)) = XTclCompileInfoLevelCmd                                                      // tclCmdIL.c:169:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 680)) = sInfoLibraryCmd                                                             // tclCmdIL.c:170:21:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 688)) = XTclCompileBasic0ArgCmd                                                      // tclCmdIL.c:170:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 728)) = sInfoLoadedCmd                                                              // tclCmdIL.c:171:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 736)) = XTclCompileBasic0Or1ArgCmd                                                   // tclCmdIL.c:171:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 776)) = XTclInfoLocalsCmd                                                           // tclCmdIL.c:172:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 784)) = XTclCompileBasic0Or1ArgCmd                                                   // tclCmdIL.c:172:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 824)) = sInfoNameOfExecutableCmd                                                    // tclCmdIL.c:173:28:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 832)) = XTclCompileBasic0ArgCmd                                                      // tclCmdIL.c:173:53:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 872)) = sInfoPatchLevelCmd                                                          // tclCmdIL.c:174:23:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 880)) = XTclCompileBasic0ArgCmd                                                      // tclCmdIL.c:174:46:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 920)) = sInfoProcsCmd                                                               // tclCmdIL.c:175:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 928)) = XTclCompileBasic0Or1ArgCmd                                                   // tclCmdIL.c:175:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 968)) = sInfoScriptCmd                                                              // tclCmdIL.c:176:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 976)) = XTclCompileBasic0Or1ArgCmd                                                   // tclCmdIL.c:176:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 1016)) = sInfoSharedlibCmd                                                          // tclCmdIL.c:177:28:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 1024)) = XTclCompileBasic0ArgCmd                                                     // tclCmdIL.c:177:50:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 1064)) = sInfoTclVersionCmd                                                         // tclCmdIL.c:178:23:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 1072)) = XTclCompileBasic0ArgCmd                                                     // tclCmdIL.c:178:46:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 1112)) = XTclInfoVarsCmd                                                            // tclCmdIL.c:179:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultInfoMap)) + 1120)) = XTclCompileBasic0Or1ArgCmd                                                  // tclCmdIL.c:179:38:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultLibraryDir)) + 24)) = sInitializeDefaultLibraryDir                                                              // tclWinInit.c:102:21:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 8)) = sNamespaceChildrenCmd                                                    // tclNamesp.c:163:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 16)) = XTclCompileBasic0To2ArgCmd                                               // tclNamesp.c:163:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 56)) = sNamespaceCodeCmd                                                       // tclNamesp.c:164:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 64)) = XTclCompileNamespaceCodeCmd                                              // tclNamesp.c:164:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 104)) = sNamespaceCurrentCmd                                                   // tclNamesp.c:165:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 112)) = XTclCompileNamespaceCurrentCmd                                          // tclNamesp.c:165:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 152)) = sNamespaceDeleteCmd                                                    // tclNamesp.c:166:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 160)) = XTclCompileBasicMin0ArgCmd                                              // tclNamesp.c:166:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 200)) = XTclNamespaceEnsembleCmd                                               // tclNamesp.c:167:20:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 248)) = sNamespaceEvalCmd                                                      // tclNamesp.c:168:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 264)) = sNRNamespaceEvalCmd                                                    // tclNamesp.c:168:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 296)) = sNamespaceExistsCmd                                                    // tclNamesp.c:169:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 304)) = XTclCompileBasic1ArgCmd                                                 // tclNamesp.c:169:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 344)) = sNamespaceExportCmd                                                    // tclNamesp.c:170:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 352)) = XTclCompileBasicMin0ArgCmd                                              // tclNamesp.c:170:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 392)) = sNamespaceForgetCmd                                                    // tclNamesp.c:171:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 400)) = XTclCompileBasicMin0ArgCmd                                              // tclNamesp.c:171:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 440)) = sNamespaceImportCmd                                                    // tclNamesp.c:172:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 448)) = XTclCompileBasicMin0ArgCmd                                              // tclNamesp.c:172:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 488)) = sNamespaceInscopeCmd                                                   // tclNamesp.c:173:20:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 504)) = sNRNamespaceInscopeCmd                                                 // tclNamesp.c:173:47:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 536)) = sNamespaceOriginCmd                                                    // tclNamesp.c:174:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 544)) = XTclCompileNamespaceOriginCmd                                           // tclNamesp.c:174:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 584)) = sNamespaceParentCmd                                                    // tclNamesp.c:175:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 592)) = XTclCompileBasic0Or1ArgCmd                                              // tclNamesp.c:175:39:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 632)) = sNamespacePathCmd                                                      // tclNamesp.c:176:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 640)) = XTclCompileBasic0Or1ArgCmd                                              // tclNamesp.c:176:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 680)) = sNamespaceQualifiersCmd                                                // tclNamesp.c:177:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 688)) = XTclCompileNamespaceQualifiersCmd                                       // tclNamesp.c:177:44:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 728)) = sNamespaceTailCmd                                                      // tclNamesp.c:178:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 736)) = XTclCompileNamespaceTailCmd                                             // tclNamesp.c:178:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 776)) = sNamespaceUnknownCmd                                                   // tclNamesp.c:179:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 784)) = XTclCompileBasic0Or1ArgCmd                                              // tclNamesp.c:179:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 824)) = sNamespaceUpvarCmd                                                     // tclNamesp.c:180:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 832)) = XTclCompileNamespaceUpvarCmd                                            // tclNamesp.c:180:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 872)) = sNamespaceWhichCmd                                                     // tclNamesp.c:181:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultNamespaceMap)) + 880)) = XTclCompileNamespaceWhichCmd                                            // tclNamesp.c:181:37:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defineCmds)) + 8)) = XTclOODefineConstructorObjCmd                                                     // tclOO.c:28:21:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defineCmds)) + 32)) = XTclOODefineDeleteMethodObjCmd                                                   // tclOO.c:29:22:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defineCmds)) + 56)) = XTclOODefineDestructorObjCmd                                                     // tclOO.c:30:20:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defineCmds)) + 80)) = XTclOODefineExportObjCmd                                                         // tclOO.c:31:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defineCmds)) + 104)) = XTclOODefineForwardObjCmd                                                       // tclOO.c:32:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defineCmds)) + 128)) = XTclOODefineMethodObjCmd                                                        // tclOO.c:33:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defineCmds)) + 152)) = XTclOODefineRenameMethodObjCmd                                                  // tclOO.c:34:22:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defineCmds)) + 176)) = XTclOODefineSelfObjCmd                                                          // tclOO.c:35:14:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defineCmds)) + 200)) = XTclOODefineUnexportObjCmd                                                      // tclOO.c:36:18:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dictIteratorType)) + 8)) = sReleaseDictIterator                                                                                          // tclExecute.c:806:5:
	*(*func(*libc.TLS, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&dictUpdateInfoType)) + 8)) = sDupDictUpdateInfo                                                                            // tclCompCmds.c:75:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&dictUpdateInfoType)) + 16)) = sFreeDictUpdateInfo                                                                                     // tclCompCmds.c:76:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&dictUpdateInfoType)) + 24)) = sPrintDictUpdateInfo                                                          // tclCompCmds.c:77:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&dictUpdateInfoType)) + 32)) = sDisassembleDictUpdateInfo                                                    // tclCompCmds.c:78:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodeMap)) + 8)) = sBinaryEncodeHex                                                                   // tclBinary.c:145:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodeMap)) + 16)) = XTclCompileBasic1ArgCmd                                                            // tclBinary.c:145:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodeMap)) + 56)) = sBinaryEncodeUu                                                                   // tclBinary.c:146:19:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodeMap)) + 104)) = sBinaryEncode64                                                                  // tclBinary.c:147:19:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 8)) = XEncodingConvertfromObjCmd                                                   // tclCmdAH.c:536:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 16)) = XTclCompileBasic1Or2ArgCmd                                                   // tclCmdAH.c:536:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 56)) = XEncodingConverttoObjCmd                                                    // tclCmdAH.c:537:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 64)) = XTclCompileBasic1Or2ArgCmd                                                   // tclCmdAH.c:537:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 104)) = XEncodingDirsObjCmd                                                        // tclCmdAH.c:538:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 112)) = XTclCompileBasic0Or1ArgCmd                                                  // tclCmdAH.c:538:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 152)) = XEncodingNamesObjCmd                                                       // tclCmdAH.c:539:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 160)) = XTclCompileBasic0ArgCmd                                                     // tclCmdAH.c:539:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 200)) = XEncodingSystemObjCmd                                                      // tclCmdAH.c:540:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingImplMap)) + 208)) = XTclCompileBasic0Or1ArgCmd                                                  // tclCmdAH.c:540:45:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingSearchPath)) + 24)) = sInitializeEncodingSearchPath                                                            // tclEncoding.c:142:23:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingType)) + 8)) = sFreeEncodingInternalRep                                                                                          // tclEncoding.c:270:17:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&encodingType)) + 16)) = sDupEncodingInternalRep                                                                                 // tclEncoding.c:270:42:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&ensembleCmdType)) + 8)) = sFreeEnsembleCmdRep                                                                                            // tclEnsemble.c:83:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&ensembleCmdType)) + 16)) = sDupEnsembleCmdRep                                                                                   // tclEnsemble.c:84:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&exprCodeType)) + 8)) = sFreeExprCodeInternalRep                                                                                          // tclExecute.c:793:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&exprCodeType)) + 16)) = sDupExprCodeInternalRep                                                                                 // tclExecute.c:794:5:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 16)) = sFileCloseProc                                                                              // tclWinChan.c:108:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 24)) = sFileInputProc                                                              // tclWinChan.c:109:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 32)) = sFileOutputProc                                                             // tclWinChan.c:110:5:
	*(*func(*libc.TLS, ClientData, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 40)) = sFileSeekProc                                                                 // tclWinChan.c:111:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 64)) = sFileWatchProc                                                                                      // tclWinChan.c:114:5:
	*(*func(*libc.TLS, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 72)) = sFileGetHandleProc                                                                   // tclWinChan.c:115:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 80)) = sFileClose2Proc                                                                      // tclWinChan.c:116:2:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 88)) = sFileBlockProc                                                                                // tclWinChan.c:117:5:
	*(*func(*libc.TLS, ClientData, Tcl_WideInt, int32, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 112)) = sFileWideSeekProc                                                // tclWinChan.c:120:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 120)) = sFileThreadActionProc                                                                              // tclWinChan.c:121:5:
	*(*func(*libc.TLS, ClientData, Tcl_WideInt) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fileChannelType)) + 128)) = sFileTruncateProc                                                                      // tclWinChan.c:122:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&filesystemList)) + 0)) = uintptr(unsafe.Pointer(&nativeFilesystemRecord))                                                                                 // tclIOUtil.c:224:43:
	*(*func(*libc.TLS, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&foreachInfoType)) + 8)) = sDupForeachInfo                                                                                  // tclCompCmds.c:59:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&foreachInfoType)) + 16)) = sFreeForeachInfo                                                                                           // tclCompCmds.c:60:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&foreachInfoType)) + 24)) = sPrintForeachInfo                                                                // tclCompCmds.c:61:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&foreachInfoType)) + 32)) = sDisassembleForeachInfo                                                          // tclCompCmds.c:62:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&functions)) + 0)) = rfree                                                                                                                // regcomp.c:272:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fwdMethodType)) + 16)) = sInvokeForwardMethod                                       // tclOOMethod.c:114:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&fwdMethodType)) + 24)) = sDeleteForwardMethod                                                                                         // tclOOMethod.c:114:26:
	*(*func(*libc.TLS, uintptr, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fwdMethodType)) + 32)) = sCloneForwardMethod                                                                  // tclOOMethod.c:114:47:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&hostName)) + 24)) = XInitializeHostName                                                                                // tclWinSock.c:303:21:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 8)) = sDictAppendCmd                                                             // tclDictObj.c:85:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 16)) = XTclCompileDictAppendCmd                                                   // tclDictObj.c:85:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 56)) = sDictCreateCmd                                                            // tclDictObj.c:86:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 64)) = XTclCompileDictCreateCmd                                                   // tclDictObj.c:86:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 104)) = sDictExistsCmd                                                           // tclDictObj.c:87:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 112)) = XTclCompileDictExistsCmd                                                  // tclDictObj.c:87:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 152)) = sDictFilterCmd                                                           // tclDictObj.c:88:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 208)) = XTclCompileDictForCmd                                                     // tclDictObj.c:89:20:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 216)) = sDictForNRCmd                                                            // tclDictObj.c:89:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 248)) = sDictGetCmd                                                              // tclDictObj.c:90:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 256)) = XTclCompileDictGetCmd                                                     // tclDictObj.c:90:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 296)) = sDictIncrCmd                                                             // tclDictObj.c:91:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 304)) = XTclCompileDictIncrCmd                                                    // tclDictObj.c:91:27:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 344)) = sDictInfoCmd                                                             // tclDictObj.c:92:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 352)) = XTclCompileBasic1ArgCmd                                                   // tclDictObj.c:92:27:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 392)) = sDictKeysCmd                                                             // tclDictObj.c:93:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 400)) = XTclCompileBasic1Or2ArgCmd                                                // tclDictObj.c:93:27:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 440)) = sDictLappendCmd                                                          // tclDictObj.c:94:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 448)) = XTclCompileDictLappendCmd                                                 // tclDictObj.c:94:33:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 496)) = XTclCompileDictMapCmd                                                     // tclDictObj.c:95:27:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 504)) = sDictMapNRCmd                                                            // tclDictObj.c:95:49:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 536)) = sDictMergeCmd                                                            // tclDictObj.c:96:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 544)) = XTclCompileDictMergeCmd                                                   // tclDictObj.c:96:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 584)) = sDictRemoveCmd                                                           // tclDictObj.c:97:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 592)) = XTclCompileBasicMin1ArgCmd                                                // tclDictObj.c:97:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 632)) = sDictReplaceCmd                                                          // tclDictObj.c:98:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 680)) = sDictSetCmd                                                              // tclDictObj.c:99:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 688)) = XTclCompileDictSetCmd                                                     // tclDictObj.c:99:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 728)) = sDictSizeCmd                                                             // tclDictObj.c:100:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 736)) = XTclCompileBasic1ArgCmd                                                   // tclDictObj.c:100:27:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 776)) = sDictUnsetCmd                                                            // tclDictObj.c:101:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 784)) = XTclCompileDictUnsetCmd                                                   // tclDictObj.c:101:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 824)) = sDictUpdateCmd                                                           // tclDictObj.c:102:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 832)) = XTclCompileDictUpdateCmd                                                  // tclDictObj.c:102:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 872)) = sDictValuesCmd                                                           // tclDictObj.c:103:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 880)) = XTclCompileBasic1Or2ArgCmd                                                // tclDictObj.c:103:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 920)) = sDictWithCmd                                                             // tclDictObj.c:104:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&implementationMap)) + 928)) = XTclCompileDictWithCmd                                                    // tclDictObj.c:104:27:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&indexType)) + 8)) = sFreeIndex                                                                                                           // tclIndexObj.c:47:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&indexType)) + 16)) = sDupIndex                                                                                                  // tclIndexObj.c:48:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&indexType)) + 24)) = sUpdateStringOfIndex                                                                                                // tclIndexObj.c:49:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 8)) = sInfoClassCallCmd                                                              // tclOOInfo.c:71:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 16)) = XTclCompileBasic2ArgCmd                                                        // tclOOInfo.c:71:38:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 56)) = sInfoClassConstrCmd                                                           // tclOOInfo.c:72:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 64)) = XTclCompileBasic1ArgCmd                                                        // tclOOInfo.c:72:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 104)) = sInfoClassDefnCmd                                                            // tclOOInfo.c:73:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 112)) = XTclCompileBasic2ArgCmd                                                       // tclOOInfo.c:73:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 152)) = sInfoClassDestrCmd                                                           // tclOOInfo.c:74:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 160)) = XTclCompileBasic1ArgCmd                                                       // tclOOInfo.c:74:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 200)) = sInfoClassFiltersCmd                                                         // tclOOInfo.c:75:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 208)) = XTclCompileBasic1ArgCmd                                                       // tclOOInfo.c:75:43:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 248)) = sInfoClassForwardCmd                                                         // tclOOInfo.c:76:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 256)) = XTclCompileBasic2ArgCmd                                                       // tclOOInfo.c:76:43:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 296)) = sInfoClassInstancesCmd                                                       // tclOOInfo.c:77:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 304)) = XTclCompileBasic1Or2ArgCmd                                                    // tclOOInfo.c:77:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 344)) = sInfoClassMethodsCmd                                                         // tclOOInfo.c:78:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 352)) = XTclCompileBasicMin1ArgCmd                                                    // tclOOInfo.c:78:43:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 392)) = sInfoClassMethodTypeCmd                                                      // tclOOInfo.c:79:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 400)) = XTclCompileBasic2ArgCmd                                                       // tclOOInfo.c:79:46:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 440)) = sInfoClassMixinsCmd                                                          // tclOOInfo.c:80:21:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 448)) = XTclCompileBasic1ArgCmd                                                       // tclOOInfo.c:80:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 488)) = sInfoClassSubsCmd                                                            // tclOOInfo.c:81:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 496)) = XTclCompileBasic1Or2ArgCmd                                                    // tclOOInfo.c:81:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 536)) = sInfoClassSupersCmd                                                          // tclOOInfo.c:82:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 544)) = XTclCompileBasic1ArgCmd                                                       // tclOOInfo.c:82:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 584)) = sInfoClassVariablesCmd                                                       // tclOOInfo.c:83:22:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoClassCmds)) + 592)) = XTclCompileBasic1ArgCmd                                                       // tclOOInfo.c:83:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 8)) = sInfoObjectCallCmd                                                            // tclOOInfo.c:51:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 16)) = XTclCompileBasic2ArgCmd                                                       // tclOOInfo.c:51:40:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 56)) = sInfoObjectClassCmd                                                          // tclOOInfo.c:52:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 64)) = XTclCompileInfoObjectClassCmd                                                 // tclOOInfo.c:52:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 104)) = sInfoObjectDefnCmd                                                          // tclOOInfo.c:53:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 112)) = XTclCompileBasic2ArgCmd                                                      // tclOOInfo.c:53:43:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 152)) = sInfoObjectFiltersCmd                                                       // tclOOInfo.c:54:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 160)) = XTclCompileBasic1ArgCmd                                                      // tclOOInfo.c:54:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 200)) = sInfoObjectForwardCmd                                                       // tclOOInfo.c:55:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 208)) = XTclCompileBasic2ArgCmd                                                      // tclOOInfo.c:55:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 248)) = sInfoObjectIsACmd                                                           // tclOOInfo.c:56:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 256)) = XTclCompileInfoObjectIsACmd                                                  // tclOOInfo.c:56:38:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 296)) = sInfoObjectMethodsCmd                                                       // tclOOInfo.c:57:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 304)) = XTclCompileBasicMin1ArgCmd                                                   // tclOOInfo.c:57:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 344)) = sInfoObjectMethodTypeCmd                                                    // tclOOInfo.c:58:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 352)) = XTclCompileBasic2ArgCmd                                                      // tclOOInfo.c:58:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 392)) = sInfoObjectMixinsCmd                                                        // tclOOInfo.c:59:19:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 400)) = XTclCompileBasic1ArgCmd                                                      // tclOOInfo.c:59:44:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 440)) = sInfoObjectNsCmd                                                            // tclOOInfo.c:60:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 448)) = XTclCompileInfoObjectNamespaceCmd                                            // tclOOInfo.c:60:41:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 488)) = sInfoObjectVariablesCmd                                                     // tclOOInfo.c:61:20:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 496)) = XTclCompileBasic1ArgCmd                                                      // tclOOInfo.c:61:45:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 536)) = sInfoObjectVarsCmd                                                          // tclOOInfo.c:62:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&infoObjectCmds)) + 544)) = XTclCompileBasic1Or2ArgCmd                                                   // tclOOInfo.c:62:40:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 8)) = sFileAttrAccessTimeCmd                                                               // tclCmdAH.c:1174:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 16)) = XTclCompileBasic1Or2ArgCmd                                                           // tclCmdAH.c:1174:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 56)) = XTclFileAttrsCmd                                                                    // tclCmdAH.c:1175:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 104)) = XTclChannelNamesCmd                                                                // tclCmdAH.c:1176:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 112)) = XTclCompileBasic0Or1ArgCmd                                                          // tclCmdAH.c:1176:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 152)) = XTclFileCopyCmd                                                                    // tclCmdAH.c:1177:11:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 200)) = XTclFileDeleteCmd                                                                  // tclCmdAH.c:1178:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 208)) = XTclCompileBasicMin0ArgCmd                                                          // tclCmdAH.c:1178:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 248)) = sPathDirNameCmd                                                                    // tclCmdAH.c:1179:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 256)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1179:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 296)) = sFileAttrIsExecutableCmd                                                           // tclCmdAH.c:1180:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 304)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1180:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 344)) = sFileAttrIsExistingCmd                                                             // tclCmdAH.c:1181:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 352)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1181:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 392)) = sPathExtensionCmd                                                                  // tclCmdAH.c:1182:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 400)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1182:34:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 440)) = sFileAttrIsDirectoryCmd                                                            // tclCmdAH.c:1183:18:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 448)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1183:42:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 488)) = sFileAttrIsFileCmd                                                                 // tclCmdAH.c:1184:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 496)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1184:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 536)) = sPathJoinCmd                                                                       // tclCmdAH.c:1185:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 544)) = XTclCompileBasicMin1ArgCmd                                                          // tclCmdAH.c:1185:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 584)) = XTclFileLinkCmd                                                                    // tclCmdAH.c:1186:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 592)) = XTclCompileBasic1To3ArgCmd                                                          // tclCmdAH.c:1186:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 632)) = sFileAttrLinkStatCmd                                                               // tclCmdAH.c:1187:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 640)) = XTclCompileBasic2ArgCmd                                                             // tclCmdAH.c:1187:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 680)) = sFileAttrModifyTimeCmd                                                             // tclCmdAH.c:1188:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 688)) = XTclCompileBasic1Or2ArgCmd                                                          // tclCmdAH.c:1188:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 728)) = XTclFileMakeDirsCmd                                                                // tclCmdAH.c:1189:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 736)) = XTclCompileBasicMin0ArgCmd                                                          // tclCmdAH.c:1189:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 776)) = sPathNativeNameCmd                                                                 // tclCmdAH.c:1190:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 784)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1190:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 824)) = sPathNormalizeCmd                                                                  // tclCmdAH.c:1191:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 832)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1191:34:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 872)) = sFileAttrIsOwnedCmd                                                                // tclCmdAH.c:1192:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 880)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1192:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 920)) = sPathTypeCmd                                                                       // tclCmdAH.c:1193:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 928)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1193:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 968)) = sFileAttrIsReadableCmd                                                             // tclCmdAH.c:1194:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 976)) = XTclCompileBasic1ArgCmd                                                             // tclCmdAH.c:1194:38:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1016)) = XTclFileReadLinkCmd                                                               // tclCmdAH.c:1195:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1024)) = XTclCompileBasic1ArgCmd                                                            // tclCmdAH.c:1195:35:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1064)) = XTclFileRenameCmd                                                                 // tclCmdAH.c:1196:13:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1112)) = sPathRootNameCmd                                                                  // tclCmdAH.c:1197:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1120)) = XTclCompileBasic1ArgCmd                                                            // tclCmdAH.c:1197:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1160)) = sFilesystemSeparatorCmd                                                           // tclCmdAH.c:1198:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1168)) = XTclCompileBasic0Or1ArgCmd                                                         // tclCmdAH.c:1198:40:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1208)) = sFileAttrSizeCmd                                                                  // tclCmdAH.c:1199:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1216)) = XTclCompileBasic1ArgCmd                                                            // tclCmdAH.c:1199:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1256)) = sPathSplitCmd                                                                     // tclCmdAH.c:1200:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1264)) = XTclCompileBasic1ArgCmd                                                            // tclCmdAH.c:1200:27:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1304)) = sFileAttrStatCmd                                                                  // tclCmdAH.c:1201:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1312)) = XTclCompileBasic2ArgCmd                                                            // tclCmdAH.c:1201:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1352)) = sPathFilesystemCmd                                                                // tclCmdAH.c:1202:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1360)) = XTclCompileBasic0Or1ArgCmd                                                         // tclCmdAH.c:1202:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1400)) = sPathTailCmd                                                                      // tclCmdAH.c:1203:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1408)) = XTclCompileBasic1ArgCmd                                                            // tclCmdAH.c:1203:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1448)) = XTclFileTemporaryCmd                                                              // tclCmdAH.c:1204:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1456)) = XTclCompileBasic0To2ArgCmd                                                         // tclCmdAH.c:1204:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1496)) = sFileAttrTypeCmd                                                                  // tclCmdAH.c:1205:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1504)) = XTclCompileBasic1ArgCmd                                                            // tclCmdAH.c:1205:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1544)) = sFilesystemVolumesCmd                                                             // tclCmdAH.c:1206:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1552)) = XTclCompileBasic0ArgCmd                                                            // tclCmdAH.c:1206:36:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1592)) = sFileAttrIsWritableCmd                                                            // tclCmdAH.c:1207:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap)) + 1600)) = XTclCompileBasic1ArgCmd                                                            // tclCmdAH.c:1207:38:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 8)) = XTcl_FblockedObjCmd                                                                 // tclIOCmd.c:1978:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 16)) = XTclCompileBasic1ArgCmd                                                             // tclIOCmd.c:1978:34:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 56)) = XTcl_CloseObjCmd                                                                   // tclIOCmd.c:1979:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 64)) = XTclCompileBasic1Or2ArgCmd                                                          // tclIOCmd.c:1979:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 104)) = XTcl_FcopyObjCmd                                                                  // tclIOCmd.c:1980:11:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 152)) = XTclChanCreateObjCmd                                                              // tclIOCmd.c:1981:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 160)) = XTclCompileBasic2ArgCmd                                                            // tclIOCmd.c:1981:34:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 200)) = XTcl_EofObjCmd                                                                    // tclIOCmd.c:1982:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 208)) = XTclCompileBasic1ArgCmd                                                            // tclIOCmd.c:1982:27:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 248)) = XTcl_FileEventObjCmd                                                              // tclIOCmd.c:1983:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 256)) = XTclCompileBasic2Or3ArgCmd                                                         // tclIOCmd.c:1983:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 296)) = XTcl_FlushObjCmd                                                                  // tclIOCmd.c:1984:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 304)) = XTclCompileBasic1ArgCmd                                                            // tclIOCmd.c:1984:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 344)) = XTcl_GetsObjCmd                                                                   // tclIOCmd.c:1985:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 352)) = XTclCompileBasic1Or2ArgCmd                                                         // tclIOCmd.c:1985:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 392)) = XTclChannelNamesCmd                                                               // tclIOCmd.c:1986:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 400)) = XTclCompileBasic0Or1ArgCmd                                                         // tclIOCmd.c:1986:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 440)) = sChanPendingObjCmd                                                                // tclIOCmd.c:1987:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 448)) = XTclCompileBasic2ArgCmd                                                            // tclIOCmd.c:1987:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 488)) = sChanPipeObjCmd                                                                   // tclIOCmd.c:1988:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 496)) = XTclCompileBasic0ArgCmd                                                            // tclIOCmd.c:1988:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 536)) = XTclChanPopObjCmd                                                                 // tclIOCmd.c:1989:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 544)) = XTclCompileBasic1ArgCmd                                                            // tclIOCmd.c:1989:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 584)) = XTclChanPostEventObjCmd                                                           // tclIOCmd.c:1990:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 592)) = XTclCompileBasic2ArgCmd                                                            // tclIOCmd.c:1990:40:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 632)) = XTclChanPushObjCmd                                                                // tclIOCmd.c:1991:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 640)) = XTclCompileBasic2ArgCmd                                                            // tclIOCmd.c:1991:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 680)) = XTcl_PutsObjCmd                                                                   // tclIOCmd.c:1992:11:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 728)) = XTcl_ReadObjCmd                                                                   // tclIOCmd.c:1993:11:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 776)) = XTcl_SeekObjCmd                                                                   // tclIOCmd.c:1994:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 784)) = XTclCompileBasic2Or3ArgCmd                                                         // tclIOCmd.c:1994:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 824)) = XTcl_TellObjCmd                                                                   // tclIOCmd.c:1995:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 832)) = XTclCompileBasic1ArgCmd                                                            // tclIOCmd.c:1995:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 872)) = sChanTruncateObjCmd                                                               // tclIOCmd.c:1996:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&initMap1)) + 880)) = XTclCompileBasic1Or2ArgCmd                                                         // tclIOCmd.c:1996:35:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&libraryPath)) + 24)) = XTclpInitLibraryPath                                                                            // tclEncoding.c:164:23:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&localVarNameType)) + 8)) = sFreeLocalVarName                                                                                             // tclVar.c:234:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&localVarNameType)) + 16)) = sDupLocalVarName                                                                                    // tclVar.c:234:23:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&localVarNameType)) + 24)) = sPanicOnUpdateVarName                                                                                        // tclVar.c:234:40:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&localVarNameType)) + 32)) = sPanicOnSetVarName                                                                            // tclVar.c:234:62:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 8)) = XTclSingleOpCmd                                                                   // tclBasic.c:357:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 16)) = XTclCompileInvertOpCmd                                                            // tclBasic.c:357:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 48)) = XTclSingleOpCmd                                                                  // tclBasic.c:359:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 56)) = XTclCompileNotOpCmd                                                               // tclBasic.c:359:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 88)) = XTclVariadicOpCmd                                                                // tclBasic.c:361:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 96)) = XTclCompileAddOpCmd                                                               // tclBasic.c:361:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 128)) = XTclVariadicOpCmd                                                               // tclBasic.c:363:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 136)) = XTclCompileMulOpCmd                                                              // tclBasic.c:363:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 168)) = XTclVariadicOpCmd                                                               // tclBasic.c:365:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 176)) = XTclCompileAndOpCmd                                                              // tclBasic.c:365:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 208)) = XTclVariadicOpCmd                                                               // tclBasic.c:367:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 216)) = XTclCompileOrOpCmd                                                               // tclBasic.c:367:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 248)) = XTclVariadicOpCmd                                                               // tclBasic.c:369:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 256)) = XTclCompileXorOpCmd                                                              // tclBasic.c:369:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 288)) = XTclVariadicOpCmd                                                               // tclBasic.c:371:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 296)) = XTclCompilePowOpCmd                                                              // tclBasic.c:371:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 328)) = XTclSingleOpCmd                                                                 // tclBasic.c:373:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 336)) = XTclCompileLshiftOpCmd                                                           // tclBasic.c:373:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 368)) = XTclSingleOpCmd                                                                 // tclBasic.c:375:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 376)) = XTclCompileRshiftOpCmd                                                           // tclBasic.c:375:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 408)) = XTclSingleOpCmd                                                                 // tclBasic.c:377:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 416)) = XTclCompileModOpCmd                                                              // tclBasic.c:377:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 448)) = XTclSingleOpCmd                                                                 // tclBasic.c:379:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 456)) = XTclCompileNeqOpCmd                                                              // tclBasic.c:379:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 488)) = XTclSingleOpCmd                                                                 // tclBasic.c:381:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 496)) = XTclCompileStrneqOpCmd                                                           // tclBasic.c:381:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 528)) = XTclSingleOpCmd                                                                 // tclBasic.c:383:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 536)) = XTclCompileInOpCmd                                                               // tclBasic.c:383:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 568)) = XTclSingleOpCmd                                                                 // tclBasic.c:385:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 576)) = XTclCompileNiOpCmd                                                               // tclBasic.c:385:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 608)) = XTclNoIdentOpCmd                                                                // tclBasic.c:387:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 616)) = XTclCompileMinusOpCmd                                                            // tclBasic.c:387:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 648)) = XTclNoIdentOpCmd                                                                // tclBasic.c:389:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 656)) = XTclCompileDivOpCmd                                                              // tclBasic.c:389:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 688)) = XTclSortingOpCmd                                                                // tclBasic.c:391:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 696)) = XTclCompileLessOpCmd                                                             // tclBasic.c:391:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 728)) = XTclSortingOpCmd                                                                // tclBasic.c:393:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 736)) = XTclCompileLeqOpCmd                                                              // tclBasic.c:393:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 768)) = XTclSortingOpCmd                                                                // tclBasic.c:395:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 776)) = XTclCompileGreaterOpCmd                                                          // tclBasic.c:395:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 808)) = XTclSortingOpCmd                                                                // tclBasic.c:397:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 816)) = XTclCompileGeqOpCmd                                                              // tclBasic.c:397:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 848)) = XTclSortingOpCmd                                                                // tclBasic.c:399:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 856)) = XTclCompileEqOpCmd                                                               // tclBasic.c:399:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 888)) = XTclSortingOpCmd                                                                // tclBasic.c:401:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&mathOpCmds)) + 896)) = XTclCompileStreqOpCmd                                                            // tclBasic.c:401:30:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&methodNameType)) + 8)) = sFreeMethodNameRep                                                                                              // tclOOCall.c:88:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&methodNameType)) + 16)) = sDupMethodNameRep                                                                                     // tclOOCall.c:89:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nativeFilesystemRecord)) + 8 /* .fsPtr */)) = uintptr(unsafe.Pointer(&XtclNativeFilesystem))                                                              // tclIOUtil.c:204:5:
	*(*func(*libc.TLS, ClientData) ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&newForeachInfoType)) + 8)) = sDupForeachInfo                                                                               // tclCompCmds.c:67:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&newForeachInfoType)) + 16)) = sFreeForeachInfo                                                                                        // tclCompCmds.c:68:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&newForeachInfoType)) + 24)) = sPrintNewForeachInfo                                                          // tclCompCmds.c:69:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&newForeachInfoType)) + 32)) = sDisassembleNewForeachInfo                                                    // tclCompCmds.c:70:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nsNameType)) + 8)) = sFreeNsNameInternalRep                                                                                              // tclNamesp.c:151:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nsNameType)) + 16)) = sDupNsNameInternalRep                                                                                     // tclNamesp.c:152:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nsNameType)) + 32)) = sSetNsNameFromAny                                                                                   // tclNamesp.c:154:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objMethods)) + 32)) = XTclOO_Object_Destroy                                         // tclOO.c:111:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objMethods)) + 88)) = XTclOO_Object_Eval                                            // tclOO.c:112:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objMethods)) + 144)) = XTclOO_Object_Unknown                                        // tclOO.c:113:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objMethods)) + 200)) = XTclOO_Object_LinkVar                                        // tclOO.c:114:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objMethods)) + 256)) = XTclOO_Object_VarName                                        // tclOO.c:115:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objdefCmds)) + 8)) = XTclOODefineClassObjCmd                                                           // tclOO.c:39:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objdefCmds)) + 32)) = XTclOODefineDeleteMethodObjCmd                                                   // tclOO.c:40:22:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objdefCmds)) + 56)) = XTclOODefineExportObjCmd                                                         // tclOO.c:41:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objdefCmds)) + 80)) = XTclOODefineForwardObjCmd                                                        // tclOO.c:42:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objdefCmds)) + 104)) = XTclOODefineMethodObjCmd                                                        // tclOO.c:43:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objdefCmds)) + 128)) = XTclOODefineRenameMethodObjCmd                                                  // tclOO.c:44:22:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&objdefCmds)) + 152)) = XTclOODefineUnexportObjCmd                                                      // tclOO.c:45:18:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&oldBooleanType)) + 32)) = XTclSetBooleanFromAny                                                                           // tclObj.c:251:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pipeChannelType)) + 24)) = sPipeInputProc                                                              // tclWinPipe.c:207:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pipeChannelType)) + 32)) = sPipeOutputProc                                                             // tclWinPipe.c:208:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&pipeChannelType)) + 64)) = sPipeWatchProc                                                                                      // tclWinPipe.c:212:5:
	*(*func(*libc.TLS, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pipeChannelType)) + 72)) = sPipeGetHandleProc                                                                   // tclWinPipe.c:213:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pipeChannelType)) + 80)) = sPipeClose2Proc                                                                      // tclWinPipe.c:214:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pipeChannelType)) + 88)) = sPipeBlockModeProc                                                                            // tclWinPipe.c:215:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&pipeChannelType)) + 120)) = sPipeThreadActionProc                                                                              // tclWinPipe.c:219:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixImplMap)) + 8)) = sPrefixAllObjCmd                                                               // tclIndexObj.c:507:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixImplMap)) + 16)) = XTclCompileBasic2ArgCmd                                                        // tclIndexObj.c:507:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixImplMap)) + 56)) = sPrefixLongestObjCmd                                                          // tclIndexObj.c:508:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixImplMap)) + 64)) = XTclCompileBasic2ArgCmd                                                        // tclIndexObj.c:508:34:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixImplMap)) + 104)) = sPrefixMatchObjCmd                                                           // tclIndexObj.c:509:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixImplMap)) + 112)) = XTclCompileBasicMin2ArgCmd                                                    // tclIndexObj.c:509:33:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&procMethodType)) + 16)) = sInvokeProcedureMethod                                    // tclOOMethod.c:110:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&procMethodType)) + 24)) = sDeleteProcedureMethod                                                                                      // tclOOMethod.c:110:28:
	*(*func(*libc.TLS, uintptr, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&procMethodType)) + 32)) = sCloneProcedureMethod                                                               // tclOOMethod.c:110:51:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 8)) = sExprAbsFunc                                                               // tclBasic.c:309:14:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 32)) = sExprUnaryFunc                                                            // tclBasic.c:310:15:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 40 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xacos})) // tclBasic.c:310:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 56)) = sExprUnaryFunc // tclBasic.c:311:15:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 64 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xasin})) // tclBasic.c:311:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 80)) = sExprUnaryFunc // tclBasic.c:312:15:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 88 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xatan})) // tclBasic.c:312:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 104)) = sExprBinaryFunc // tclBasic.c:313:16:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 112 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64, float64) float64
	}{libc.Xatan2})) // tclBasic.c:313:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 128)) = sExprBoolFunc  // tclBasic.c:314:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 152)) = sExprCeilFunc  // tclBasic.c:315:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 176)) = sExprUnaryFunc // tclBasic.c:316:14:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 184 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xcos})) // tclBasic.c:316:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 200)) = sExprUnaryFunc // tclBasic.c:317:15:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 208 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xcosh})) // tclBasic.c:317:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 224)) = sExprDoubleFunc // tclBasic.c:318:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 248)) = sExprEntierFunc // tclBasic.c:319:17:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 272)) = sExprUnaryFunc  // tclBasic.c:320:14:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 280 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xexp})) // tclBasic.c:320:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 296)) = sExprFloorFunc  // tclBasic.c:321:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 320)) = sExprBinaryFunc // tclBasic.c:322:15:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 328 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64, float64) float64
	}{libc.Xfmod})) // tclBasic.c:322:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 344)) = sExprBinaryFunc // tclBasic.c:323:16:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 352 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64, float64) float64
	}{libc.Xhypot})) // tclBasic.c:323:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 368)) = sExprIntFunc   // tclBasic.c:324:14:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 392)) = sExprIsqrtFunc // tclBasic.c:325:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 416)) = sExprUnaryFunc // tclBasic.c:326:14:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 424 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xlog})) // tclBasic.c:326:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 440)) = sExprUnaryFunc // tclBasic.c:327:16:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 448 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xlog10})) // tclBasic.c:327:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 464)) = sExprBinaryFunc // tclBasic.c:328:14:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 472 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64, float64) float64
	}{libc.Xpow})) // tclBasic.c:328:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 488)) = sExprRandFunc  // tclBasic.c:329:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 512)) = sExprRoundFunc // tclBasic.c:330:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 536)) = sExprUnaryFunc // tclBasic.c:331:14:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 544 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xsin})) // tclBasic.c:331:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 560)) = sExprUnaryFunc // tclBasic.c:332:15:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 568 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xsinh})) // tclBasic.c:332:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 584)) = sExprSqrtFunc  // tclBasic.c:333:15:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 608)) = sExprSrandFunc // tclBasic.c:334:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 632)) = sExprUnaryFunc // tclBasic.c:335:14:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 640 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xtan})) // tclBasic.c:335:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 656)) = sExprUnaryFunc // tclBasic.c:336:15:
	*(*ClientData)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 664 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct {
		f func(*libc.TLS, float64) float64
	}{libc.Xtanh})) // tclBasic.c:336:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sBuiltinFuncTable)) + 680)) = sExprWideFunc                                                                                   // tclBasic.c:337:15:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 16)) = sSerialCloseProc                                                                                                 // tclWinSerial.c:200:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 24)) = sSerialInputProc                                                                                 // tclWinSerial.c:201:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 32)) = sSerialOutputProc                                                                                // tclWinSerial.c:202:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 48)) = sSerialSetOptionProc                                                                           // tclWinSerial.c:204:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 56)) = sSerialGetOptionProc                                                                           // tclWinSerial.c:205:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 64)) = sSerialWatchProc                                                                                                         // tclWinSerial.c:206:5:
	*(*func(*libc.TLS, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 72)) = sSerialGetHandleProc                                                                                      // tclWinSerial.c:207:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 80)) = sSerialClose2Proc                                                                                         // tclWinSerial.c:208:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 88)) = sSerialBlockProc                                                                                                   // tclWinSerial.c:209:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&serialChannelType)) + 120)) = sSerialThreadActionProc                                                                                                 // tclWinSerial.c:213:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 24)) = sClassFilterGet                                                                           // tclOODefineCmds.c:118:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 64)) = sClassFilterSet                                                                           // tclOODefineCmds.c:118:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 112)) = sClassMixinGet                                                                           // tclOODefineCmds.c:119:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 152)) = sClassMixinSet                                                                           // tclOODefineCmds.c:119:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 200)) = sClassSuperGet                                                                           // tclOODefineCmds.c:120:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 240)) = sClassSuperSet                                                                           // tclOODefineCmds.c:120:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 288)) = sClassVarsGet                                                                            // tclOODefineCmds.c:121:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 328)) = sClassVarsSet                                                                            // tclOODefineCmds.c:121:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 376)) = sObjFilterGet                                                                            // tclOODefineCmds.c:122:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 416)) = sObjFilterSet                                                                            // tclOODefineCmds.c:122:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 464)) = sObjMixinGet                                                                             // tclOODefineCmds.c:123:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 504)) = sObjMixinSet                                                                             // tclOODefineCmds.c:123:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 552)) = sObjVarsGet                                                                              // tclOODefineCmds.c:124:5:
	*(*func(*libc.TLS, ClientData, uintptr, Tcl_ObjectContext, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&slots)) + 592)) = sObjVarsSet                                                                              // tclOODefineCmds.c:124:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sourceLibraryDir)) + 24)) = sInitializeSourceLibraryDir                                                                                       // tclWinInit.c:106:21:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits))                                                                                                // trees.c:132:22:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree))                                                                                                // trees.c:129:2:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits))                                                                                                  // trees.c:129:16:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree))                                                                                                // trees.c:126:2:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits))                                                                                                  // trees.c:126:16:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 8)) = sStringBytesCmd                                                                                       // tclCmdMZ.c:3451:17:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 16)) = XTclCompileBasic1ArgCmd                                                                               // tclCmdMZ.c:3451:33:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 56)) = sStringCatCmd                                                                                        // tclCmdMZ.c:3452:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 64)) = XTclCompileStringCatCmd                                                                               // tclCmdMZ.c:3452:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 104)) = sStringCmpCmd                                                                                       // tclCmdMZ.c:3453:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 112)) = XTclCompileStringCmpCmd                                                                              // tclCmdMZ.c:3453:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 152)) = sStringEqualCmd                                                                                     // tclCmdMZ.c:3454:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 160)) = XTclCompileStringEqualCmd                                                                            // tclCmdMZ.c:3454:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 200)) = sStringFirstCmd                                                                                     // tclCmdMZ.c:3455:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 208)) = XTclCompileStringFirstCmd                                                                            // tclCmdMZ.c:3455:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 248)) = sStringIndexCmd                                                                                     // tclCmdMZ.c:3456:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 256)) = XTclCompileStringIndexCmd                                                                            // tclCmdMZ.c:3456:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 296)) = sStringIsCmd                                                                                        // tclCmdMZ.c:3457:10:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 304)) = XTclCompileStringIsCmd                                                                               // tclCmdMZ.c:3457:23:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 344)) = sStringLastCmd                                                                                      // tclCmdMZ.c:3458:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 352)) = XTclCompileStringLastCmd                                                                             // tclCmdMZ.c:3458:26:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 392)) = sStringLenCmd                                                                                       // tclCmdMZ.c:3459:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 400)) = XTclCompileStringLenCmd                                                                              // tclCmdMZ.c:3459:27:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 440)) = sStringMapCmd                                                                                       // tclCmdMZ.c:3460:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 448)) = XTclCompileStringMapCmd                                                                              // tclCmdMZ.c:3460:25:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 488)) = sStringMatchCmd                                                                                     // tclCmdMZ.c:3461:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 496)) = XTclCompileStringMatchCmd                                                                            // tclCmdMZ.c:3461:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 536)) = sStringRangeCmd                                                                                     // tclCmdMZ.c:3462:12:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 544)) = XTclCompileStringRangeCmd                                                                            // tclCmdMZ.c:3462:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 584)) = sStringReptCmd                                                                                      // tclCmdMZ.c:3463:13:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 592)) = XTclCompileBasic2ArgCmd                                                                              // tclCmdMZ.c:3463:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 632)) = sStringRplcCmd                                                                                      // tclCmdMZ.c:3464:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 640)) = XTclCompileStringReplaceCmd                                                                          // tclCmdMZ.c:3464:29:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 680)) = sStringRevCmd                                                                                       // tclCmdMZ.c:3465:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 688)) = XTclCompileBasic1ArgCmd                                                                              // tclCmdMZ.c:3465:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 728)) = sStringLowerCmd                                                                                     // tclCmdMZ.c:3466:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 736)) = XTclCompileStringToLowerCmd                                                                          // tclCmdMZ.c:3466:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 776)) = sStringUpperCmd                                                                                     // tclCmdMZ.c:3467:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 784)) = XTclCompileStringToUpperCmd                                                                          // tclCmdMZ.c:3467:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 824)) = sStringTitleCmd                                                                                     // tclCmdMZ.c:3468:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 832)) = XTclCompileStringToTitleCmd                                                                          // tclCmdMZ.c:3468:30:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 872)) = sStringTrimCmd                                                                                      // tclCmdMZ.c:3469:11:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 880)) = XTclCompileStringTrimCmd                                                                             // tclCmdMZ.c:3469:26:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 920)) = sStringTrimLCmd                                                                                     // tclCmdMZ.c:3470:15:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 928)) = XTclCompileStringTrimLCmd                                                                            // tclCmdMZ.c:3470:31:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 968)) = sStringTrimRCmd                                                                                     // tclCmdMZ.c:3471:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 976)) = XTclCompileStringTrimRCmd                                                                            // tclCmdMZ.c:3471:32:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 1016)) = sStringEndCmd                                                                                      // tclCmdMZ.c:3472:14:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 1024)) = XTclCompileBasic2ArgCmd                                                                             // tclCmdMZ.c:3472:28:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 1064)) = sStringStartCmd                                                                                    // tclCmdMZ.c:3473:16:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&stringImplMap)) + 1072)) = XTclCompileBasic2ArgCmd                                                                             // tclCmdMZ.c:3473:32:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&substCodeType)) + 8)) = sFreeSubstCodeInternalRep                                                                                                               // tclCompile.c:721:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&substCodeType)) + 16)) = sDupByteCodeInternalRep                                                                                                       // tclCompile.c:722:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclFsPathType)) + 8)) = sFreeFsPathInternalRep                                                                                                                  // tclPathObj.c:41:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclFsPathType)) + 16)) = sDupFsPathInternalRep                                                                                                         // tclPathObj.c:42:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclFsPathType)) + 24)) = sUpdateStringOfFsPath                                                                                                                  // tclPathObj.c:43:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclFsPathType)) + 32)) = sSetFsPathFromAny                                                                                                       // tclPathObj.c:44:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclInstNameType)) + 24)) = sUpdateStringOfInstName                                                                                                              // tclDisassemble.c:45:5:
	*(*func(*libc.TLS, DWORD))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 16)) = XTclWinConvertError                                                                                                                    // tclStubInit.c:792:5:
	*(*func(*libc.TLS, DWORD))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 24)) = XTclWinConvertError                                                                                                                    // tclStubInit.c:793:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 32)) = XTclWinGetServByName                                                                                                // tclStubInit.c:794:5:
	*(*func(*libc.TLS, SOCKET, int32, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 40)) = XTclWinGetSockOpt                                                                               // tclStubInit.c:795:5:
	*(*func(*libc.TLS) HINSTANCE)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 48)) = XTclWinGetTclInstance                                                                                                               // tclStubInit.c:796:5:
	*(*func(*libc.TLS, uint16) uint16)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 64)) = winNToHS                                                                                                                       // tclStubInit.c:798:5:
	*(*func(*libc.TLS, SOCKET, int32, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 72)) = XTclWinSetSockOpt                                                                                 // tclStubInit.c:799:5:
	*(*func(*libc.TLS, Tcl_Pid) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 80)) = XTclpGetPid                                                                                                                    // tclStubInit.c:800:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 88)) = XTclWinGetPlatformId                                                                                                                    // tclStubInit.c:801:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 104)) = XTclGetAndDetachPids                                                                                                   // tclStubInit.c:803:5:
	*(*func(*libc.TLS, TclFile) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 112)) = XTclpCloseFile                                                                                                                // tclStubInit.c:804:5:
	*(*func(*libc.TLS, TclFile, TclFile, TclFile, int32, uintptr) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 120)) = XTclpCreateCommandChannel                                                             // tclStubInit.c:805:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 128)) = XTclpCreatePipe                                                                                                      // tclStubInit.c:806:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, TclFile, TclFile, TclFile, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 136)) = XTclpCreateProcess                                                        // tclStubInit.c:807:5:
	*(*func(*libc.TLS, Tcl_Channel, int32) TclFile)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 160)) = XTclpMakeFile                                                                                                    // tclStubInit.c:810:5:
	*(*func(*libc.TLS, uintptr, int32) TclFile)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 168)) = XTclpOpenFile                                                                                                        // tclStubInit.c:811:5:
	*(*func(*libc.TLS, HANDLE, DWORD))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 176)) = XTclWinAddProcess                                                                                                             // tclStubInit.c:812:5:
	*(*func(*libc.TLS, In_addr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 184)) = XTclpInetNtoa                                                                                                               // tclStubInit.c:813:5:
	*(*func(*libc.TLS, uintptr) TclFile)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 192)) = XTclpCreateTempFile                                                                                                         // tclStubInit.c:814:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 208)) = XTclWinNoBackslash                                                                                                          // tclStubInit.c:816:5:
	*(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 224)) = XTclWinSetInterfaces                                                                                                                  // tclStubInit.c:818:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 232)) = XTclWinFlushDirtyChannels                                                                                                                    // tclStubInit.c:819:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 240)) = XTclWinResetInterfaces                                                                                                                       // tclStubInit.c:820:5:
	*(*func(*libc.TLS, uint32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntPlatStubs)) + 248)) = XTclWinCPUID                                                                                                          // tclStubInit.c:821:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 40)) = XTclAllocateFreeObjects                                                                                                                           // tclStubInit.c:495:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, Tcl_Channel) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 56)) = XTclCleanupChildren                                                                                   // tclStubInit.c:497:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 64)) = XTclCleanupCommand                                                                                                                       // tclStubInit.c:498:5:
	*(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 72)) = XTclCopyAndCollapse                                                                                                // tclStubInit.c:499:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel, Tcl_Channel, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 80)) = XTclCopyChannelOld                                                                       // tclStubInit.c:500:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 88)) = XTclCreatePipeline                                                             // tclStubInit.c:501:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 96)) = XTclCreateProc                                                                        // tclStubInit.c:502:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 104)) = XTclDeleteCompiledLocalVars                                                                                                    // tclStubInit.c:503:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 112)) = XTclDeleteVars                                                                                                                 // tclStubInit.c:504:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 128)) = XTclDumpMemoryInfo                                                                                                      // tclStubInit.c:506:5:
	*(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 144)) = XTclExprFloatError                                                                                                             // tclStubInit.c:508:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 192)) = XTclFindElement                                                               // tclStubInit.c:514:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 200)) = XTclFindProc                                                                                                           // tclStubInit.c:515:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 208)) = XTclFormatInt                                                                                                              // tclStubInit.c:516:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 216)) = XTclFreePackageInfo                                                                                                                     // tclStubInit.c:517:5:
	*(*func(*libc.TLS, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 240)) = XTclpGetDefaultStdChannel                                                                                                     // tclStubInit.c:520:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 264)) = XTclGetExtension                                                                                                                // tclStubInit.c:523:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 272)) = XTclGetFrame                                                                                                    // tclStubInit.c:524:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 288)) = XTclGetIntForIndex                                                                                       // tclStubInit.c:526:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 312)) = XTclGetLoadedPackages                                                                                                    // tclStubInit.c:529:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 320)) = XTclGetNamespaceForQualName                                          // tclStubInit.c:530:5:
	*(*func(*libc.TLS) TclObjCmdProcType)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 328)) = XTclGetObjInterpProc                                                                                                           // tclStubInit.c:531:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 336)) = XTclGetOpenMode                                                                                                 // tclStubInit.c:532:5:
	*(*func(*libc.TLS, Tcl_Command) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 344)) = XTclGetOriginalCommand                                                                                                  // tclStubInit.c:533:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 352)) = XTclpGetUserHome                                                                                                       // tclStubInit.c:534:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 368)) = XTclGuessPackageName                                                                                                     // tclStubInit.c:536:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 376)) = XTclHideUnsafeCommands                                                                                                            // tclStubInit.c:537:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 384)) = XTclInExit                                                                                                                                 // tclStubInit.c:538:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 416)) = XTclInitCompiledLocals                                                                                                // tclStubInit.c:542:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 424)) = XTclInterpInit                                                                                                                    // tclStubInit.c:543:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 440)) = XTclInvokeObjectCommand                                                                               // tclStubInit.c:545:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 448)) = XTclInvokeStringCommand                                                                               // tclStubInit.c:546:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 456)) = XTclIsProc                                                                                                                      // tclStubInit.c:547:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 480)) = XTclLookupVar                                                          // tclStubInit.c:550:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 496)) = XTclNeedSpace                                                                                                            // tclStubInit.c:552:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 504)) = XTclNewProcBodyObj                                                                                                              // tclStubInit.c:553:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 512)) = XTclObjCommandComplete                                                                                                            // tclStubInit.c:554:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 520)) = XTclObjInterpProc                                                                                     // tclStubInit.c:555:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 528)) = XTclObjInvoke                                                                                              // tclStubInit.c:556:5:
	*(*func(*libc.TLS, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 568)) = XTclpAlloc                                                                                                                       // tclStubInit.c:561:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 608)) = XTclpFree                                                                                                                               // tclStubInit.c:566:5:
	*(*func(*libc.TLS) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 616)) = XTclpGetClicks                                                                                                                            // tclStubInit.c:567:5:
	*(*func(*libc.TLS) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 624)) = XTclpGetSeconds                                                                                                                           // tclStubInit.c:568:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 632)) = XTclpGetTime                                                                                                                            // tclStubInit.c:569:5:
	*(*func(*libc.TLS, uintptr, uint32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 664)) = XTclpRealloc                                                                                                            // tclStubInit.c:573:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 720)) = XTclPrecTraceProc                                                                          // tclStubInit.c:580:5:
	*(*func(*libc.TLS, uintptr, uintptr, Tcl_Command) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 728)) = XTclPreventAliasLoop                                                                                        // tclStubInit.c:581:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 744)) = XTclProcCleanupProc                                                                                                                     // tclStubInit.c:583:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 752)) = XTclProcCompileProc                                                                  // tclStubInit.c:584:5:
	*(*func(*libc.TLS, ClientData))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 760)) = XTclProcDeleteProc                                                                                                                   // tclStubInit.c:585:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 784)) = XTclRenameCommand                                                                                               // tclStubInit.c:588:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 792)) = XTclResetShadowedCmdRefs                                                                                                       // tclStubInit.c:589:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 800)) = XTclServiceIdle                                                                                                                            // tclStubInit.c:590:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 824)) = XTclSetPreInitScript                                                                                                            // tclStubInit.c:593:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 832)) = XTclSetupEnv                                                                                                                            // tclStubInit.c:594:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 840)) = XTclSockGetPort                                                                                        // tclStubInit.c:595:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 880)) = XTclTeardownNamespace                                                                                                                   // tclStubInit.c:600:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 888)) = XTclUpdateReturnInfo                                                                                                              // tclStubInit.c:601:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 896)) = XTclSockMinimumBuffers                                                                                                     // tclStubInit.c:602:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 904)) = XTcl_AddInterpResolvers                                                                             // tclStubInit.c:603:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 912)) = XTcl_AppendExportList                                                                                           // tclStubInit.c:604:5:
	*(*func(*libc.TLS, uintptr, uintptr, ClientData, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 920)) = XTcl_CreateNamespace                                                                              // tclStubInit.c:605:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 928)) = XTcl_DeleteNamespace                                                                                                                    // tclStubInit.c:606:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 936)) = XTcl_Export                                                                                              // tclStubInit.c:607:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 944)) = XTcl_FindCommand                                                                                   // tclStubInit.c:608:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 952)) = XTcl_FindNamespace                                                                                     // tclStubInit.c:609:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 960)) = XTcl_GetInterpResolvers                                                                                         // tclStubInit.c:610:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 968)) = XTcl_GetNamespaceResolvers                                                                                               // tclStubInit.c:611:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) Tcl_Var)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 976)) = XTcl_FindNamespaceVar                                                                                  // tclStubInit.c:612:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 984)) = XTcl_ForgetImport                                                                                               // tclStubInit.c:613:5:
	*(*func(*libc.TLS, uintptr, uintptr) Tcl_Command)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 992)) = XTcl_GetCommandFromObj                                                                                             // tclStubInit.c:614:5:
	*(*func(*libc.TLS, uintptr, Tcl_Command, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1000)) = XTcl_GetCommandFullName                                                                                          // tclStubInit.c:615:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1008)) = XTcl_GetCurrentNamespace                                                                                                       // tclStubInit.c:616:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1016)) = XTcl_GetGlobalNamespace                                                                                                        // tclStubInit.c:617:5:
	*(*func(*libc.TLS, uintptr, Tcl_Var, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1024)) = XTcl_GetVariableFullName                                                                                             // tclStubInit.c:618:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1032)) = XTcl_Import                                                                                             // tclStubInit.c:619:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1040)) = XTcl_PopCallFrame                                                                                                                      // tclStubInit.c:620:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1048)) = XTcl_PushCallFrame                                                                                      // tclStubInit.c:621:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1056)) = XTcl_RemoveInterpResolvers                                                                                              // tclStubInit.c:622:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1064)) = XTcl_SetNamespaceResolvers                                                                                  // tclStubInit.c:623:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1072)) = XTclpHasSockets                                                                                                                  // tclStubInit.c:624:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1080)) = XTclpGetDate                                                                                                            // tclStubInit.c:625:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1120)) = XTclGetEnv                                                                                                            // tclStubInit.c:630:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1144)) = XTclpGetCwd                                                                                                           // tclStubInit.c:633:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, ClientData) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1152)) = XTclSetByteCodeFromAny                                                                             // tclStubInit.c:634:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1160)) = XTclAddLiteralObj                                                                                              // tclStubInit.c:635:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1168)) = XTclHideLiteral                                                                                                        // tclStubInit.c:636:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1176)) = XTclGetAuxDataType                                                                                                             // tclStubInit.c:637:5:
	*(*func(*libc.TLS, uintptr) TclHandle)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1184)) = XTclHandleCreate                                                                                                             // tclStubInit.c:638:5:
	*(*func(*libc.TLS, TclHandle))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1192)) = XTclHandleFree                                                                                                                       // tclStubInit.c:639:5:
	*(*func(*libc.TLS, TclHandle) TclHandle)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1200)) = XTclHandlePreserve                                                                                                         // tclStubInit.c:640:5:
	*(*func(*libc.TLS, TclHandle))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1208)) = XTclHandleRelease                                                                                                                    // tclStubInit.c:641:5:
	*(*func(*libc.TLS, uintptr, Tcl_RegExp) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1216)) = XTclRegAbout                                                                                                         // tclStubInit.c:642:5:
	*(*func(*libc.TLS, Tcl_RegExp, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1224)) = XTclRegExpRangeUniChar                                                                                     // tclStubInit.c:643:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1232)) = XTclSetLibraryPath                                                                                                                     // tclStubInit.c:644:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1240)) = XTclGetLibraryPath                                                                                                                      // tclStubInit.c:645:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1264)) = XTclRegError                                                                                                           // tclStubInit.c:648:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1272)) = XTclVarTraceExists                                                                                                    // tclStubInit.c:649:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1280)) = setStartupScriptFileName                                                                                                               // tclStubInit.c:650:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1288)) = getStartupScriptFileName                                                                                                                // tclStubInit.c:651:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1304)) = XTclChannelTransform                                                                                       // tclStubInit.c:653:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1312)) = XTclChannelEventScriptInvoker                                                                                                // tclStubInit.c:654:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1320)) = XTclGetInstructionTable                                                                                                                 // tclStubInit.c:655:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1328)) = XTclExpandCodeArray                                                                                                                    // tclStubInit.c:656:5:
	*(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1336)) = XTclpSetInitialEncodings                                                                                                                        // tclStubInit.c:657:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1344)) = XTclListObjSetElement                                                                                   // tclStubInit.c:658:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1352)) = setStartupScriptPath                                                                                                                   // tclStubInit.c:659:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1360)) = getStartupScriptPath                                                                                                                    // tclStubInit.c:660:5:
	*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1368)) = XTclpUtfNcmp2                                                                                                   // tclStubInit.c:661:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1376)) = XTclCheckInterpTraces                                                     // tclStubInit.c:662:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1384)) = XTclCheckExecutionTraces                                                  // tclStubInit.c:663:5:
	*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1392)) = XTclInThreadExit                                                                                                                          // tclStubInit.c:664:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1400)) = XTclUniCharMatch                                                                                   // tclStubInit.c:665:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1416)) = XTclCallVarTraces                                                              // tclStubInit.c:667:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1424)) = XTclCleanupVar                                                                                                                // tclStubInit.c:668:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1432)) = XTclVarErrMsg                                                                                      // tclStubInit.c:669:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1440)) = XTcl_SetStartupScript                                                                                                         // tclStubInit.c:670:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1448)) = XTcl_GetStartupScript                                                                                                          // tclStubInit.c:671:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1472)) = XTclpLocaltime                                                                                                                 // tclStubInit.c:674:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1480)) = XTclpGmtime                                                                                                                    // tclStubInit.c:675:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1600)) = XTclObjGetFrame                                                                                                // tclStubInit.c:690:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1616)) = XTclpObjRemoveDirectory                                                                                          // tclStubInit.c:692:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1624)) = XTclpObjCopyDirectory                                                                                          // tclStubInit.c:693:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1632)) = XTclpObjCreateDirectory                                                                                                          // tclStubInit.c:694:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1640)) = XTclpObjDeleteFile                                                                                                               // tclStubInit.c:695:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1648)) = XTclpObjCopyFile                                                                                                        // tclStubInit.c:696:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1656)) = XTclpObjRenameFile                                                                                                      // tclStubInit.c:697:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1664)) = XTclpObjStat                                                                                                            // tclStubInit.c:698:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1672)) = XTclpObjAccess                                                                                                            // tclStubInit.c:699:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32) Tcl_Channel)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1680)) = XTclpOpenFileChannel                                                                                // tclStubInit.c:700:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1712)) = XTclpFindExecutable                                                                                                                    // tclStubInit.c:704:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1720)) = XTclGetObjNameOfExecutable                                                                                                              // tclStubInit.c:705:5:
	*(*func(*libc.TLS, uintptr, Tcl_Encoding))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1728)) = XTclSetObjNameOfExecutable                                                                                               // tclStubInit.c:706:5:
	*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1736)) = XTclStackAlloc                                                                                                          // tclStubInit.c:707:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1744)) = XTclStackFree                                                                                                                 // tclStubInit.c:708:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1752)) = XTclPushStackFrame                                                                                      // tclStubInit.c:709:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1760)) = XTclPopStackFrame                                                                                                                      // tclStubInit.c:710:5:
	*(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1808)) = XTclGetPlatform                                                                                                                         // tclStubInit.c:716:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1816)) = XTclTraceDictPath                                                                              // tclStubInit.c:717:5:
	*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1824)) = XTclObjBeingDeleted                                                                                                              // tclStubInit.c:718:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1832)) = XTclSetNsPath                                                                                                          // tclStubInit.c:719:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1848)) = XTclPtrMakeUpvar                                                                                 // tclStubInit.c:721:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1856)) = XTclObjLookupVar                                                      // tclStubInit.c:722:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1864)) = XTclGetNamespaceFromObj                                                                                        // tclStubInit.c:723:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1872)) = XTclEvalObjEx                                                                                    // tclStubInit.c:724:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1880)) = XTclGetSrcInfoForPc                                                                                                                    // tclStubInit.c:725:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1888)) = XTclVarHashCreateVar                                                                                         // tclStubInit.c:726:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1896)) = XTclInitVarHashTable                                                                                                          // tclStubInit.c:727:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1904)) = XTcl_BackgroundException                                                                                                        // tclStubInit.c:728:5:
	*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1912)) = XTclResetCancellation                                                                                                     // tclStubInit.c:729:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1920)) = XTclNRInterpProc                                                                                     // tclStubInit.c:730:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1928)) = XTclNRInterpProcCore                                                                                    // tclStubInit.c:731:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1936)) = XTclNRRunCallbacks                                                                                               // tclStubInit.c:732:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1944)) = XTclNREvalObjEx                                                                                  // tclStubInit.c:733:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1952)) = XTclNREvalObjv                                                                                   // tclStubInit.c:734:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1960)) = XTclDbDumpActiveObjects                                                                                                                // tclStubInit.c:735:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1968)) = XTclGetNamespaceChildTable                                                                                                     // tclStubInit.c:736:5:
	*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1976)) = XTclGetNamespaceCommandTable                                                                                                   // tclStubInit.c:737:5:
	*(*func(*libc.TLS, uintptr, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1984)) = XTclInitRewriteEnsemble                                                                                   // tclStubInit.c:738:5:
	*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 1992)) = XTclResetRewriteEnsemble                                                                                                        // tclStubInit.c:739:5:
	*(*func(*libc.TLS, uintptr, Tcl_Channel, Tcl_Channel, Tcl_WideInt, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2000)) = XTclCopyChannel                                                                  // tclStubInit.c:740:5:
	*(*func(*libc.TLS, float64, int32, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2008)) = XTclDoubleDigits                                                                      // tclStubInit.c:741:5:
	*(*func(*libc.TLS, uintptr, int32, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2016)) = XTclSetSlaveCancelFlags                                                                                                  // tclStubInit.c:742:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2024)) = XTclRegisterLiteral                                                                                       // tclStubInit.c:743:5:
	*(*func(*libc.TLS, uintptr, Tcl_Var, Tcl_Var, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2032)) = XTclPtrGetVar                                                                       // tclStubInit.c:744:5:
	*(*func(*libc.TLS, uintptr, Tcl_Var, Tcl_Var, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2040)) = XTclPtrSetVar                                                              // tclStubInit.c:745:5:
	*(*func(*libc.TLS, uintptr, Tcl_Var, Tcl_Var, uintptr, uintptr, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2048)) = XTclPtrIncrObjVar                                                          // tclStubInit.c:746:5:
	*(*func(*libc.TLS, uintptr, Tcl_Var, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2056)) = XTclPtrObjMakeUpvar                                                                                     // tclStubInit.c:747:5:
	*(*func(*libc.TLS, uintptr, Tcl_Var, Tcl_Var, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2064)) = XTclPtrUnsetVar                                                                       // tclStubInit.c:748:5:
	*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclIntStubs)) + 2072)) = XTcl_StaticPackage                                                                                          // tclStubInit.c:749:5:
	*(*func(*libc.TLS, uintptr) Tcl_Object)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 16)) = XTclOOGetDefineCmdContext                                                                                                   // tclOOStubInit.c:24:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 24)) = XTclOOMakeProcInstanceMethod                       // tclOOStubInit.c:25:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr, uintptr, uintptr, ClientData, uintptr) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 32)) = XTclOOMakeProcMethod                      // tclOOStubInit.c:26:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 40)) = XTclOONewProcInstanceMethod                                                // tclOOStubInit.c:27:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 48)) = XTclOONewProcMethod                                                        // tclOOStubInit.c:28:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 56)) = XTclOOObjectCmdCore                                                                     // tclOOStubInit.c:29:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 64)) = XTclOOIsReachable                                                                                                       // tclOOStubInit.c:30:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 72)) = XTclOONewForwardMethod                                                                       // tclOOStubInit.c:31:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 80)) = XTclOONewForwardInstanceMethod                                                               // tclOOStubInit.c:32:5:
	*(*func(*libc.TLS, uintptr, Tcl_Object, uintptr, uintptr, uintptr, ClientData, uintptr, uintptr, uintptr, int32, uintptr) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 88)) = XTclOONewProcInstanceMethodEx // tclOOStubInit.c:33:5:
	*(*func(*libc.TLS, uintptr, Tcl_Class, uintptr, uintptr, uintptr, ClientData, uintptr, uintptr, uintptr, int32, uintptr) Tcl_Method)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 96)) = XTclOONewProcMethodEx          // tclOOStubInit.c:34:5:
	*(*func(*libc.TLS, uintptr, Tcl_Object, Tcl_Class, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 104)) = XTclOOInvokeObject                                                                // tclOOStubInit.c:35:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 112)) = XTclOOObjectSetFilters                                                                                                // tclOOStubInit.c:36:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 120)) = XTclOOClassSetFilters                                                                                        // tclOOStubInit.c:37:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 128)) = XTclOOObjectSetMixins                                                                                                 // tclOOStubInit.c:38:5:
	*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOIntStubs)) + 136)) = XTclOOClassSetMixins                                                                                         // tclOOStubInit.c:39:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclOOStubHooks)) + 0 /* .tclOOIntStubs */)) = uintptr(unsafe.Pointer(&tclOOIntStubs))                                                                                            // tclOOStubInit.c:43:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclParsedVarNameType)) + 8)) = sFreeParsedVarName                                                                                                               // tclVar.c:239:5:
	*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclParsedVarNameType)) + 16)) = sDupParsedVarName                                                                                                      // tclVar.c:239:24:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclParsedVarNameType)) + 24)) = sUpdateParsedVarName                                                                                                            // tclVar.c:239:42:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclParsedVarNameType)) + 32)) = sPanicOnSetVarName                                                                                               // tclVar.c:239:63:
	*(*func(*libc.TLS, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclPlatStubs)) + 16)) = XTcl_WinUtfToTChar                                                                                              // tclStubInit.c:863:5:
	*(*func(*libc.TLS, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclPlatStubs)) + 24)) = XTcl_WinTCharToUtf                                                                                              // tclStubInit.c:864:5:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 16)) = sReflectClose                                                                                                      // tclIORChan.c:67:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 24)) = sReflectInput                                                                                      // tclIORChan.c:68:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 32)) = sReflectOutput                                                                                     // tclIORChan.c:69:5:
	*(*func(*libc.TLS, ClientData, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 40)) = sReflectSeek                                                                                         // tclIORChan.c:70:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 48)) = sReflectSetOption                                                                                // tclIORChan.c:71:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 56)) = sReflectGetOption                                                                                // tclIORChan.c:72:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 64)) = sReflectWatch                                                                                                              // tclIORChan.c:73:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 80)) = sReflectClose2                                                                                              // tclIORChan.c:75:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 88)) = sReflectBlock                                                                                                        // tclIORChan.c:76:5:
	*(*func(*libc.TLS, ClientData, Tcl_WideInt, int32, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRChannelType)) + 112)) = sReflectSeekWide                                                                        // tclIORChan.c:79:5:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 16)) = sReflectClose1                                                                                                   // tclIORTrans.c:65:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 24)) = sReflectInput1                                                                                   // tclIORTrans.c:66:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 32)) = sReflectOutput1                                                                                  // tclIORTrans.c:67:5:
	*(*func(*libc.TLS, ClientData, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 40)) = sReflectSeek1                                                                                      // tclIORTrans.c:68:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 48)) = sReflectSetOption1                                                                             // tclIORTrans.c:69:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 56)) = sReflectGetOption1                                                                             // tclIORTrans.c:70:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 64)) = sReflectWatch1                                                                                                           // tclIORTrans.c:71:5:
	*(*func(*libc.TLS, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 72)) = sReflectHandle                                                                                            // tclIORTrans.c:72:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 80)) = sReflectClose21                                                                                           // tclIORTrans.c:73:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 88)) = sReflectBlock1                                                                                                     // tclIORTrans.c:74:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 104)) = sReflectNotify                                                                                                    // tclIORTrans.c:77:5:
	*(*func(*libc.TLS, ClientData, Tcl_WideInt, int32, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclRTransformType)) + 112)) = sReflectSeekWide1                                                                     // tclIORTrans.c:78:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclStubHooks)) + 0 /* .tclPlatStubs */)) = uintptr(unsafe.Pointer(&tclPlatStubs))                                                                                                // tclStubInit.c:960:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclStubHooks)) + 8 /* .tclIntStubs */)) = uintptr(unsafe.Pointer(&tclIntStubs))                                                                                                  // tclStubInit.c:961:5:
	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclStubHooks)) + 16 /* .tclIntPlatStubs */)) = uintptr(unsafe.Pointer(&tclIntPlatStubs))                                                                                         // tclStubInit.c:962:5:
	*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclVarHashKeyType)) + 8)) = XTclHashObjKey                                                                                                      // tclVar.c:34:5:
	*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclVarHashKeyType)) + 16)) = sCompareVarKeys                                                                                                     // tclVar.c:35:5:
	*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&tclVarHashKeyType)) + 24)) = sAllocVarEntry                                                                                                    // tclVar.c:36:5:
	*(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&tclVarHashKeyType)) + 32)) = sFreeVarEntry                                                                                                                      // tclVar.c:37:5:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 16)) = sTcpCloseProc                                                                                                       // tclWinSock.c:280:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 24)) = sTcpInputProc                                                                                       // tclWinSock.c:281:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 32)) = sTcpOutputProc                                                                                      // tclWinSock.c:282:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 48)) = sTcpSetOptionProc                                                                                 // tclWinSock.c:284:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 56)) = sTcpGetOptionProc                                                                                 // tclWinSock.c:285:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 64)) = sTcpWatchProc                                                                                                               // tclWinSock.c:286:5:
	*(*func(*libc.TLS, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 72)) = sTcpGetHandleProc                                                                                            // tclWinSock.c:287:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 80)) = sTcpClose2Proc                                                                                               // tclWinSock.c:288:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 88)) = sTcpBlockModeProc                                                                                                     // tclWinSock.c:289:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&tcpChannelType)) + 120)) = sTcpThreadActionProc                                                                                                       // tclWinSock.c:293:5:
	*(*func(*libc.TLS, uintptr, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&traceSubCmds)) + 0)) = sTraceExecutionObjCmd                                                                                       // tclTrace.c:114:5:
	*(*func(*libc.TLS, uintptr, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&traceSubCmds)) + 8)) = sTraceCommandObjCmd                                                                                         // tclTrace.c:115:5:
	*(*func(*libc.TLS, uintptr, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&traceSubCmds)) + 16)) = sTraceVariableObjCmd                                                                                       // tclTrace.c:116:5:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 16)) = sTransformCloseProc                                                                                           // tclIOGT.c:124:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 24)) = sTransformInputProc                                                                           // tclIOGT.c:125:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 32)) = sTransformOutputProc                                                                          // tclIOGT.c:126:5:
	*(*func(*libc.TLS, ClientData, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 40)) = sTransformSeekProc                                                                              // tclIOGT.c:127:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 48)) = sTransformSetOptionProc                                                                     // tclIOGT.c:128:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 56)) = sTransformGetOptionProc                                                                     // tclIOGT.c:129:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 64)) = sTransformWatchProc                                                                                                   // tclIOGT.c:130:5:
	*(*func(*libc.TLS, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 72)) = sTransformGetFileHandleProc                                                                            // tclIOGT.c:131:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 80)) = sTransformClose2Proc                                                                                   // tclIOGT.c:132:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 88)) = sTransformBlockModeProc                                                                                         // tclIOGT.c:133:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 104)) = sTransformNotifyProc                                                                                           // tclIOGT.c:135:5:
	*(*func(*libc.TLS, ClientData, Tcl_WideInt, int32, uintptr) Tcl_WideInt)(unsafe.Pointer(uintptr(unsafe.Pointer(&transformChannelType)) + 112)) = sTransformWideSeekProc                                                             // tclIOGT.c:136:5:
	*(*func(*libc.TLS, ClientData, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zlibChannelType)) + 16)) = sZlibTransformClose                                                                                                // tclZlib.c:209:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zlibChannelType)) + 24)) = sZlibTransformInput                                                                                // tclZlib.c:210:5:
	*(*func(*libc.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zlibChannelType)) + 32)) = sZlibTransformOutput                                                                               // tclZlib.c:211:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zlibChannelType)) + 48)) = sZlibTransformSetOption                                                                          // tclZlib.c:213:5:
	*(*func(*libc.TLS, ClientData, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zlibChannelType)) + 56)) = sZlibTransformGetOption                                                                          // tclZlib.c:214:5:
	*(*func(*libc.TLS, ClientData, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&zlibChannelType)) + 64)) = sZlibTransformWatch                                                                                                        // tclZlib.c:215:5:
	*(*func(*libc.TLS, ClientData, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zlibChannelType)) + 72)) = sZlibTransformGetHandle                                                                                     // tclZlib.c:216:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zlibChannelType)) + 88)) = sZlibTransformBlockMode                                                                                              // tclZlib.c:218:5:
	*(*func(*libc.TLS, ClientData, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zlibChannelType)) + 104)) = sZlibTransformEventHandler                                                                                          // tclZlib.c:220:5:
}

var ts1 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/\x001.2.11\x00 deflate 1.2.11 Copyright 1995-2017 Jean-loup Gailly and Mark Adler \x00invalid block type\x00invalid stored block lengths\x00too many length or distance symbols\x00invalid code lengths set\x00invalid bit length repeat\x00invalid code -- missing end-of-block\x00invalid literal/lengths set\x00invalid distances set\x00invalid literal/length code\x00invalid distance code\x00invalid distance too far back\x00incorrect header check\x00unknown compression method\x00invalid window size\x00unknown header flags set\x00header crc mismatch\x00incorrect data check\x00incorrect length check\x00 inflate 1.2.11 Copyright 1995-2017 Mark Adler \x00\n\n\n========= RAW ==========\n\x00\n\n\n========= TREE FIXED ==========\n\x00\n\n\n========= LA%d ==========\n\x00\n\n\n========= SEARCH ==========\n\x00\n\n\n========= TREE NODE %s ==========\n\x00null tree\n\x00%s. `%c'\x00 longest\x00 shortest\x00 hasmixed\x00 hascapture\x00 hasbackref\x00 UNUSED\x00 (#%d)\x00 {%d,\x00%d\x00}\x00 %ld-%ld\x00 L:%s\x00 R:%s\x00\n\x00unable\x00%p\x00\ninitial cleanup:\n\x00\nempties:\n\x00\nconstraints:\n\x00\nfinal cleanup:\n\x00NUL\x00SOH\x00STX\x00ETX\x00EOT\x00ENQ\x00ACK\x00BEL\x00alert\x00BS\x00backspace\x00HT\x00tab\x00LF\x00newline\x00VT\x00vertical-tab\x00FF\x00form-feed\x00CR\x00carriage-return\x00SO\x00SI\x00DLE\x00DC1\x00DC2\x00DC3\x00DC4\x00NAK\x00SYN\x00ETB\x00CAN\x00EM\x00SUB\x00ESC\x00IS4\x00FS\x00IS3\x00GS\x00IS2\x00RS\x00IS1\x00US\x00space\x00exclamation-mark\x00quotation-mark\x00number-sign\x00dollar-sign\x00percent-sign\x00ampersand\x00apostrophe\x00left-parenthesis\x00right-parenthesis\x00asterisk\x00plus-sign\x00comma\x00hyphen\x00hyphen-minus\x00period\x00full-stop\x00slash\x00solidus\x00zero\x00one\x00two\x00three\x00four\x00five\x00six\x00seven\x00eight\x00nine\x00colon\x00semicolon\x00less-than-sign\x00equals-sign\x00greater-than-sign\x00question-mark\x00commercial-at\x00left-square-bracket\x00backslash\x00reverse-solidus\x00right-square-bracket\x00circumflex\x00circumflex-accent\x00underscore\x00low-line\x00grave-accent\x00left-brace\x00left-curly-bracket\x00vertical-line\x00right-brace\x00right-curly-bracket\x00tilde\x00DEL\x00alnum\x00alpha\x00ascii\x00blank\x00cntrl\x00digit\x00graph\x00lower\x00print\x00punct\x00upper\x00xdigit\x00*** unknown regex error code 0x%x ***\x00REG_OKAY\x00no errors detected\x00REG_NOMATCH\x00failed to match\x00REG_BADPAT\x00invalid regexp (reg version 0.8)\x00REG_ECOLLATE\x00invalid collating element\x00REG_ECTYPE\x00invalid character class\x00REG_EESCAPE\x00invalid escape \\ sequence\x00REG_ESUBREG\x00invalid backreference number\x00REG_EBRACK\x00brackets [] not balanced\x00REG_EPAREN\x00parentheses () not balanced\x00REG_EBRACE\x00braces {} not balanced\x00REG_BADBR\x00invalid repetition count(s)\x00REG_ERANGE\x00invalid character range\x00REG_ESPACE\x00out of memory\x00REG_BADRPT\x00quantifier operand invalid\x00REG_ASSERT\x00\"can't happen\" -- you found a bug\x00REG_INVARG\x00invalid argument to regex function\x00REG_MIXED\x00character widths of regex and string differ\x00REG_BADOPT\x00invalid embedded option\x00REG_ETOOBIG\x00regular expression is too complex\x00REG_ECOLORS\x00too many colors\x00\x00oops\x00REG_%u\x00assemblecode\x00push\x00add\x00append\x00appendArray\x00appendArrayStk\x00appendStk\x00arrayExistsImm\x00arrayExistsStk\x00arrayMakeImm\x00arrayMakeStk\x00beginCatch\x00bitand\x00bitnot\x00bitor\x00bitxor\x00clockRead\x00concat\x00concatStk\x00coroName\x00currentNamespace\x00dictAppend\x00dictExists\x00dictExpand\x00dictGet\x00dictIncrImm\x00dictLappend\x00dictRecombineStk\x00dictRecombineImm\x00dictSet\x00dictUnset\x00div\x00dup\x00endCatch\x00eq\x00eval\x00evalStk\x00exist\x00existArray\x00existArrayStk\x00existStk\x00expon\x00expr\x00exprStk\x00ge\x00gt\x00incr\x00incrArray\x00incrArrayImm\x00incrArrayStk\x00incrArrayStkImm\x00incrImm\x00incrStk\x00incrStkImm\x00infoLevelArgs\x00infoLevelNumber\x00invokeStk\x00jump\x00jump4\x00jumpFalse\x00jumpFalse4\x00jumpTable\x00jumpTrue\x00jumpTrue4\x00label\x00land\x00lappend\x00lappendArray\x00lappendArrayStk\x00lappendList\x00lappendListArray\x00lappendListArrayStk\x00lappendListStk\x00lappendStk\x00le\x00lindexMulti\x00list\x00listConcat\x00listIn\x00listIndex\x00listIndexImm\x00listLength\x00listNotIn\x00load\x00loadArray\x00loadArrayStk\x00loadStk\x00lor\x00lsetFlat\x00lsetList\x00lshift\x00lt\x00mod\x00mult\x00neq\x00nop\x00not\x00nsupvar\x00numericType\x00originCmd\x00over\x00pop\x00pushReturnCode\x00pushReturnOpts\x00pushResult\x00regexp\x00resolveCmd\x00reverse\x00rshift\x00store\x00storeArray\x00storeArrayStk\x00storeStk\x00strcaseLower\x00strcaseTitle\x00strcaseUpper\x00strcmp\x00strcat\x00streq\x00strfind\x00strindex\x00strlen\x00strmap\x00strmatch\x00strneq\x00strrange\x00strreplace\x00strrfind\x00strtrim\x00strtrimLeft\x00strtrimRight\x00sub\x00tclooClass\x00tclooIsObject\x00tclooNamespace\x00tclooSelf\x00tryCvtToBoolean\x00tryCvtToNumeric\x00uminus\x00unset\x00unsetArray\x00unsetArrayStk\x00unsetStk\x00uplus\x00upvar\x00variable\x00verifyDict\x00yield\x00bytecodeList\x00\n    (\"\x00\" body, line \x00)\x00\n    (\"%.*s\" body, line %d)\x00instruction\x00value\x00boolean\x00boolean varName\x00imm8\x00operand must be [0..3]\x00TCL\x00ASSEM\x00OPERAND<0,>3\x00count\x00count varName\x00script\x00expression\x00table\x00name\x00operand must be >=2\x00OPERAND>=2\x00varname\x00varName imm8\x00Instruction \"%s\" could not be found, can't happen\n\x00no ASSEM_EVAL case for %s (%d), can't happen\x00jump table must have an even number of list elements\x00BADJUMPTABLE\x00duplicate entry in jump table for \"%s\"\x00DUPJUMPTABLEENTRY\x00assembly code may not contain substitutions\x00NOSUBST\x00cannot use this instruction to create a variable in a non-proc context\x00LVT\x00variable \"%s\" is not local\x00NONLOCAL\x00operand does not fit in one byte\x001BYTE\x00operand must be nonnegative\x00NONNEGATIVE\x00operand must be positive\x00POSITIVE\x00duplicate definition of label \"%s\"\x00DUPLABEL\x00undefined label \"%s\"\x00NOLABEL\x00\"%s\" instruction may not appear in a context where an exception has been caught and not disposed of.\x00BADTHROW\x00inconsistent stack depths on two execution paths\x00BADSTACK\x00stack underflow\x00code pops stack below level of enclosing catch\x00BADSTACKINCATCH\x00stack is unbalanced on exit from the code (depth=%d)\x00execution reaches an instruction in inconsistent exception contexts\x00BADCATCH\x00endCatch without a corresponding beginCatch\x00BADENDCATCH\x00catch still active on exit from assembly code\x00UNCLOSEDCATCH\x00unclosed catch at end of code in tclAssembly.c:BuildExceptionRanges, can't happen\x00undefined label in tclAssembly.c:BuildExceptionRanges, can't happen\x00\n    in assembly code between lines \x00 and \x00end of assembly code\x00Tcl_AsyncDelete: async handler deleted by the wrong thread\x00Tcl_AsyncDelete: cannot find async handler\x00apply\x00break\x00case\x00catch\x00continue\x00coroutine\x00error\x00for\x00foreach\x00format\x00global\x00if\x00join\x00lassign\x00lindex\x00linsert\x00llength\x00lmap\x00lrange\x00lrepeat\x00lreplace\x00lreverse\x00lsearch\x00lset\x00lsort\x00package\x00proc\x00regsub\x00rename\x00return\x00scan\x00set\x00split\x00subst\x00switch\x00tailcall\x00throw\x00trace\x00try\x00uplevel\x00while\x00yieldto\x00after\x00cd\x00close\x00eof\x00exec\x00exit\x00fblocked\x00fconfigure\x00fcopy\x00fileevent\x00flush\x00gets\x00glob\x00open\x00pid\x00puts\x00pwd\x00read\x00seek\x00socket\x00source\x00tell\x00time\x00unload\x00update\x00vwait\x00abs\x00acos\x00asin\x00atan\x00atan2\x00bool\x00ceil\x00cos\x00cosh\x00double\x00entier\x00exp\x00floor\x00fmod\x00hypot\x00int\x00isqrt\x00log\x00log10\x00pow\x00rand\x00round\x00sin\x00sinh\x00sqrt\x00srand\x00tan\x00tanh\x00wide\x00~\x00integer\x00!\x00+\x00*\x00&\x00|\x00^\x00**\x00<<\x00integer shift\x00>>\x00%\x00integer integer\x00!=\x00value value\x00ne\x00in\x00value list\x00ni\x00-\x00value ?value ...?\x00/\x00<\x00<=\x00>\x00>=\x00==\x00Tcl_CallFrame must not be smaller than CallFrame\x00::errorInfo\x00UP\x00CALL\x00INNER\x00::errorCode\x00Tcl_CreateInterp: can't create global namespace\x00builtin command with NULL object command proc and a NULL compile proc\x00::tcl::Bgerror\x00::tcl::unsupported::disassemble\x00::tcl::unsupported::getbytecode\x00::tcl::unsupported::representation\x00::tcl::unsupported::assemble\x00::tcl::unsupported::inject\x00::tcl::unsupported::corotype\x00::tcl::unsupported::timerate\x00::tcl::unsupported\x00::tcl::mathfunc\x00Can't create math function namespace\x00::tcl::mathfunc::\x00::tcl::mathop\x00can't create math operator namespace\x00::tcl::mathop::\x00failed to create math operator %s\x00tcl_platform\x00engine\x00Tcl\x00byteOrder\x00littleEndian\x00bigEndian\x00wordSize\x00pointerSize\x00tcl_patchLevel\x008.6.12\x00tcl_version\x008.6\x00tcl_precision\x00%s\x00Assoc Data Key #%d\x00DeleteInterpProc called with active evals\x00DeleteInterpProc called on interpreter not marked deleted\x00DeleteInterpProc: popping rootCallFrame with other frames on top\x00Argument location tracking table not empty\x00::\x00cannot use namespace qualifiers in hidden command token (rename)\x00VALUE\x00HIDDENTOKEN\x00can only hide global namespace commands (use rename then hide)\x00HIDE\x00NON_GLOBAL\x00hidden command named \"%s\" already exists\x00ALREADY_HIDDEN\x00cannot expose to a namespace (use expose to toplevel, then rename)\x00EXPOSE\x00unknown hidden command \"%s\"\x00LOOKUP\x00trying to expose a non-global command namespace command\x00exposed command \"%s\" already exists\x00COMMAND_EXISTS\x00can't %s \"%s\": command doesn't exist\x00delete\x00COMMAND\x00can't rename to \"%s\": bad command name\x00can't rename to \"%s\": command already exists\x00OPERATION\x00RENAME\x00TARGET_EXISTS\x00argument to math function didn't have numeric value\x00tcl::mathfunc::\x00unknown math function \"%s\"\x00MATHFUNC\x00::info functions \x00attempt to call eval in deleted interpreter\x00IDELETE\x00too many nested evaluations (infinite loop?)\x00LIMIT\x00STACK\x00IUNWIND\x00eval unwound\x00ICANCEL\x00eval canceled\x00CANCEL\x00attempt to invoke a deleted command\x00EVAL\x00DELETEDCOMMAND\x00Tcl_EvalObjv: NULL global namespace pointer\x00::unknown\x00invalid command name \"%s\"\x00\n    (enter trace on \"\x00...\x00\")\x00\n    (leave trace on \"\x00\n    (expanding word %d)\x00TclArgumentBC Enter/Release Mismatch\x00invoked \"break\" outside of a loop\x00invoked \"continue\" outside of a loop\x00command returned bad code: %d\x00UNEXPECTED_RESULT_CODE\x00illegal argument vector\x00TclObjInvoke: called without TCL_INVOKE_HIDDEN\x00invalid hidden command name \"%s\"\x00NONE\x00square root of negative argument\x00ARITH\x00DOMAIN\x00domain error: argument not in valid range\x00%s arguments for math function \"%s\"\x00not enough\x00too many\x00WRONGARGS\x00tailcall cannot find the right splicing spot: should not happen!\x00?command? ?arg ...?\x00tailcall can only be called from a proc, lambda or method\x00TAILCALL\x00ILLEGAL\x00Adding a callback without an objProc?!\x00?returnValue?\x00yield can only be called in a coroutine\x00COROUTINE\x00ILLEGAL_YIELD\x00command ?arg ...?\x00yieldto can only be called in a coroutine\x00yieldto called in deleted namespace\x00YIELDTO_IN_DELETED\x00cannot yield: C stack busy\x00CANT_YIELD\x00Yield received an option which is not implemented\x00can only get coroutine type of a coroutine\x00active\x00unknown coroutine type\x00BAD_TYPE\x00coroName cmd ?arg1 arg2 ...?\x00can only inject a command into a coroutine\x00can only inject a command into a suspended coroutine\x00ACTIVE\x00coroutine \"%s\" is already running\x00BUSY\x00?arg?\x00wrong coro nargs; how did we get here? not implemented!\x00name cmd ?arg ...?\x00can't create procedure \"%s\": unknown namespace\x00NAMESPACE\x00can't create procedure \"%s\": bad procedure name\x00encode\x00decode\x00hex\x00uuencode\x00base64\x00bytearray\x00%s called with shared object\x00Tcl_SetByteArrayObj\x00Tcl_SetByteArrayLength\x00max size for a Tcl value (%d bytes) exceeded\x00TclAppendBytesToByteArray\x00%s must be called with definite number of bytes to append\x00binary\x00binary encode\x00binary decode\x00formatString ?arg ...?\x00number of elements in list does not match count\x00cannot use \"*\" in format string with \"x\"\x00hexadecimal\x00expected %s string but got \"%s\" instead\x00missing count for \"@\" field specifier\x00not enough arguments for all format specifiers\x00\x00\x00\x00\x00\x00\x00\x00\x00bad field specifier \"%s\"\x00value formatString ?varName ...?\x000123456789abcdef\x00unexpected fallthrough\x00data\x00?options? data\x00option\x00invalid hexadecimal digit \"%c\" at position %d\x00BINARY\x00DECODE\x00INVALID\x00-strict\x00?-maxlen len? ?-wrapchar char? data\x00line length out of range\x00ENCODE\x00LINE_LENGTH\x00limit hit\x00-maxlen\x00-wrapchar\x00invalid wrapchar; will defeat decoding\x00WRAPCHAR\x00short uuencode data\x00SHORT\x00invalid uuencode character \"%c\" at position %d\x00invalid base64 character \"%c\" at position %d\x00unable to alloc %u bytes\x00unable to alloc %u bytes, %s line %d\x00unable to realloc %u bytes\x00unable to realloc %u bytes, %s line %d\x00%a %b %d %H:%M:%S %Z %Y\x00BCE\x00C\x00cannot use -gmt and -timezone in same call\x00CE\x00dayOfMonth\x00dayOfWeek\x00dayOfYear\x00era\x00:GMT\x00gregorian\x00integer value too large to represent\x00iso8601Week\x00iso8601Year\x00julianDay\x00localSeconds\x00month\x00seconds\x00tzName\x00tzOffset\x00year\x00getenv\x00Oldscan\x00ConvertLocalToUTC\x00GetDateFields\x00GetJulianDayFromEraYearMonthDay\x00GetJulianDayFromEraYearWeekDay\x00ParseFormatArgs\x00::tcl::clock::\x00clock\x00clicks\x00microseconds\x00milliseconds\x00dict tzdata changeover\x00key \"localseconds\" not found in dictionary\x00seconds tzdata changeover\x00expected key(s) not found in dictionary\x00dict changeover\x00loop in ConvertLocalToUTCUsingTable\x00time value too large/small to represent\x00number too large to represent as a Posix time\x00CLOCK\x00argTooLarge\x00localtime failed (clock value may be too large/small to represent)\x00localtimeFailed\x00%02d\x00?-switch?\x00-milliseconds\x00-microseconds\x00clock format clockval ?-format string? ?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?\x00wrongNumArgs\x00badOption\x00gmtWithTimezone\x00-format\x00-gmt\x00-locale\x00-timezone\x00string ?in? ?pattern body ...? ?default body?\x00extra case pattern with no body\x00default\x00\n    (\"%.50s\" arm line %d)\x00script ?resultVarName? ?optionVarName?\x00\n    (\"catch\" body line %d)\x00?dirName?\x00couldn't change working directory to \"%s\": %s\x00encoding\x00convertfrom\x00convertto\x00dirs\x00names\x00system\x00::tcl::encoding::\x00tcl:encoding:\x00___tmp\x00problem making 'encoding %s' safe: %s\x00problem making 'encoding' safe: %s\x00not allowed to invoke subcommand %s of encoding\x00SAFE\x00SUBCOMMAND\x00?encoding? data\x00?dirList?\x00expected directory list but got \"%s\"\x00ENCODING\x00BADPATH\x00?encoding?\x00message ?errorInfo? ?errorCode?\x00-code error -level 0\x00-errorinfo\x00-errorcode\x00\n    (\"eval\" body line %d)\x00arg ?arg ...?\x00?returnCode?\x00file\x00atime\x00attributes\x00channels\x00copy\x00dirname\x00executable\x00exists\x00extension\x00isdirectory\x00isfile\x00link\x00lstat\x00mtime\x00mkdir\x00nativename\x00normalize\x00owned\x00pathtype\x00readable\x00readlink\x00rootname\x00separator\x00size\x00stat\x00tail\x00tempfile\x00type\x00volumes\x00writable\x00::tcl::file::\x00tcl:file:\x00problem making 'file %s' safe: %s\x00problem making 'file' safe: %s\x00not allowed to invoke subcommand %s of file\x00name ?time?\x00could not get access time for file \"%s\"\x00could not set access time for file \"%s\": %s\x00could not get modification time for file \"%s\"\x00could not set modification time for file \"%s\": %s\x00name varName\x00unrecognised path\x00FILESYSTEM\x00name ?name ...?\x00could not read \"%s\": no such file or directory\x00PATHSPLIT\x00NONESUCH\x00absolute\x00relative\x00volumerelative\x00?name?\x00\\\x00could not read \"%s\": %s\x00dev\x00ino\x00nlink\x00uid\x00gid\x00ctime\x00mode\x00directory\x00characterSpecial\x00blockSpecial\x00fifo\x00unknown\x00start test next command\x00\n    (\"for\" body line %d)\x00\n    (\"for\" initial command)\x00\n    (\"for\" loop-end command)\x00varList list ?varList list ...? command\x00%s varlist is empty\x00LMAP\x00FOREACH\x00NEEDVARS\x00\n    (\"%s\" body line %d)\x00\n    (setting %s loop variable \"%s\")\x00args\x00body\x00cmdcount\x00commands\x00complete\x00errorstack\x00frame\x00functions\x00globals\x00hostname\x00level\x00library\x00loaded\x00locals\x00nameofexecutable\x00patchlevel\x00procs\x00sharedlibextension\x00tclversion\x00vars\x00wrong # args: no expression after \"%s\" argument\x00then\x00elseif\x00else\x00wrong # args: extra words after \"else\" clause in \"if\" command\x00wrong # args: no script following \"%s\" argument\x00varName ?increment?\x00info\x00procname\x00\"%s\" isn't a procedure\x00PROCEDURE\x00?pattern?\x00*[?\\\x00command\x00procname arg varname\x00procedure \"%s\" doesn't have an argument \"%s\"\x00ARGUMENT\x00?interp?\x00varName\x00?number?\x00Broken frame level calculation\x00bad level \"%s\"\x00LEVEL\x00line\x00cmd\x00TCL_LOCATION_PROC found in standard frame\x00precompiled\x00\t    ::apply [::list {{pattern *}} {\n\t\t::set cmds {}\n\t\t::foreach cmd [::info commands ::tcl::mathfunc::$pattern] {\n\t\t    ::lappend cmds [::namespace tail $cmd]\n\t\t}\n\t\t::foreach cmd [::info commands tcl::mathfunc::$pattern] {\n\t\t    ::set cmd [::namespace tail $cmd]\n\t\t    ::if {$cmd ni $cmds} {\n\t\t\t::lappend cmds $cmd\n\t\t    }\n\t\t}\n\t\t::return $cmds\n\t    } [::namespace current]] \x00unable to determine name of host\x00HOSTNAME\x00UNKNOWN\x00tcl_library\x00no library has been specified for Tcl\x00VARIABLE\x00?filename?\x00.dll\x00list ?joinString?\x00 \x00list ?varName ...?\x00list ?index ...?\x00list index ?element ...?\x00list first last\x00count ?value ...?\x00bad count \"%d\": must be integer >= 0\x00LREPEAT\x00NEGARG\x00max length of a Tcl list (%d elements) exceeded\x00MEMORY\x00list first last ?element ...?\x00?-option value ...? list pattern\x00missing starting index\x00MISSING\x00\"-index\" option must be followed by list index\x00index \"%s\" cannot select an element from any list\x00INDEXOUTOFRANGE\x00\n    (-index option item number %d)\x00-subindices cannot be used without -index option\x00LSEARCH\x00BAD_OPTION_MIX\x00-bisect is not compatible with -all or -not\x00-all\x00-ascii\x00-bisect\x00-decreasing\x00-dictionary\x00-exact\x00-glob\x00-increasing\x00-index\x00-inline\x00-integer\x00-nocase\x00-not\x00-real\x00-regexp\x00-sorted\x00-start\x00-subindices\x00listVar ?index? ?index ...? value\x00?-option value ...? list\x00\"-command\" option must be followed by comparison command\x00\"-stride\" option must be followed by stride length\x00stride length must be at least 2\x00LSORT\x00BADSTRIDE\x00list size must be a multiple of the stride length\x00when used with \"-stride\", the leading \"-index\" value must be within the group\x00BADINDEX\x00no enough memory to proccess sort of %d items\x00-command\x00-indices\x00-stride\x00-unique\x00\n    (-compare command)\x00-compare command returned non-integer result\x00COMPARISONFAILED\x00element %d missing from sublist \"%s\"\x00INDEXFAILED\x00\t\n\v\f\r \xc0\x80\u0085\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u202f\u205f\u2060\u3000\ufeff\x00?-option ...? exp string ?matchVar? ?subMatchVar ...?\x00regexp match variables not allowed when using -inline\x00REGEXP\x00MIX_VAR_INLINE\x00-about\x00-expanded\x00-line\x00-linestop\x00-lineanchor\x00--\x00?-option ...? exp string subSpec ?varName?\x00&\\\x00*+?{}()[].\\|^$\x00oldName newName\x00?-encoding name? fileName\x00-encoding\x00 \n\t\r\x00string ?splitChars?\x00needleString haystackString ?startIndex?\x00string charIndex\x00class ?-strict? ?-failindex var? str\x00class\x00?-strict? ?-failindex var? str\x00control\x00false\x00true\x00wideinteger\x00wordchar\x00-failindex\x00?-nocase? charMap string\x00bad option \"%s\": must be -nocase\x00INDEX\x00char map list unbalanced\x00MAP\x00UNBALANCED\x00?-nocase? pattern string\x00string first last\x00string count\x00result exceeds max size for a Tcl value (%d bytes)\x00string size overflow, out of memory allocating %u bytes\x00string first last ?string?\x00string\x00string index\x00?-nocase? ?-length int? string1 string2\x00-length\x00bad option \"%s\": must be -nocase or -length\x00string ?first? ?last?\x00string ?chars?\x00bytelength\x00cat\x00compare\x00equal\x00first\x00index\x00is\x00last\x00length\x00map\x00match\x00range\x00repeat\x00replace\x00tolower\x00toupper\x00totitle\x00trim\x00trimleft\x00trimright\x00wordend\x00wordstart\x00Tcl_SubstObjCmd: bad option index to SubstOptions\x00-nobackslashes\x00-nocommands\x00-novariables\x00?-nobackslashes? ?-nocommands? ?-novariables? string\x00bad option \"%s\": %s option already found\x00SWITCH\x00DOUBLEOPT\x00missing variable name argument to %s option\x00-indexvar\x00NOVAR\x00-matchvar\x00?-option ...? string ?pattern body ...? ?default body?\x00%s option requires -regexp option\x00MODERESTRICTION\x00?-option ...? string {?pattern body ...? ?default body?}\x00extra switch pattern with no body\x00BADARM\x00, this may be due to a comment incorrectly placed outside of a switch body - see the \"switch\" documentation\x00COMMENT?\x00no body specified for pattern \"%s\"\x00FALLTHROUGH\x00fall-out when searching for body to match pattern\x00\n    (\"%.*s%s\" arm line %d)\x00type message\x00type must be non-empty list\x00THROW\x00BADEXCEPTION\x00-code error -level 0 -errorcode\x00command ?count?\x00per\x00iteration\x00?-direct? ?-calibrate? ?-overhead double? command ?time ?max-count??\x00µs/#-overhead\x00%.*f\x00%.3f\x00net-ms\x00µs/#\x00#\x00#/sec\x00-direct\x00-overhead\x00-calibrate\x00body ?handler ...? ?finally script?\x00handler type\x00finally clause must be last\x00TRY\x00FINALLY\x00NONTERMINAL\x00wrong # args to finally clause: must be \"... finally script\"\x00wrong # args to on clause: must be \"... on code variableList script\"\x00ON\x00wrong # args to trap clause: must be \"... trap pattern variableList script\"\x00TRAP\x00bad prefix '%s': must be a list\x00EXNFORMAT\x00last non-finally clause must not have a body of \"-\"\x00BADFALLTHROUGH\x00finally\x00on\x00trap\x00-during\x00\n    (\"%s ... %s\" handler line %d)\x00\n    (\"%s ... finally\" body line %d)\x00test command\x00\n    (\"while\" body line %d)\x00ForeachInfo\x00NewForeachInfo\x00DictUpdateInfo\x000\x001\x00list must have an even number of elements\x00-errorcode {TCL ARGUMENT FORMAT}\x00bad stack depth computations: is %i, should be %i\x00TclCompileCatchCmd: bad jump distance %d\x00TclCompileDictCmd(update): bad jump distance %d\x00, \x00%%v%u\x00variables\x00data=[\x00], loop=%%v%u\x00,\x00\n\t\t it%%v%u\t[\x00]\x00jumpOffset=%+d, vars=\x00[\x00loop\x00assign\x00jumpOffset\x00TclCompileIfCmd: unexpected opcode \"%d\" updating ifFalse jump\x00object\x00::namespace inscope \x00::namespace\x00inscope\x00:\x002\x00end\x00-options\x00namespace\x00JumptableInfo\x003\x00word\x00\x00\x00\x00TclCompileSubstCmd: bad start jump distance %d\x00unexpected token type in TclCompileSubstCmd: %d\x00TclCompileSubstCmd: bad break jump distance %d\x00TclCompileSubstCmd: bad continue jump distance %d\x00TclCompileSubstCmd: bad return jump distance %d\x00TclCompileSubstCmd: bad other jump distance %d\x00TclCompileSubstCmd: bad ok jump distance %d\x00TclCompileSubstCmd: bad end jump distance %d\x00unknown switch mode: %d\x00\n\t\t\x00\"%s\"->pc %d\x00mapping\x00-errorcode {TCL OPERATION THROW BADEXCEPTION}\x00-level 0 -code 0\x00-nocomplain\x00-1\x001.0\x00_@_\x00not enough memory to parse expression\x00NOMEM\x00invalid character \"%.*s\"\x00BADCHAR\x00incomplete operator \"%.*s\"\x00PARTOP\x00invalid bareword \"%.*s%s\"\x00should be \"$%.*s%s\" or \"{%.*s%s}\"\x00 or \"%.*s%s(...)\" or ...\x00BAREWORD\x00 (invalid binary number?)\x00BADNUMBER\x00 (invalid octal number?)\x00OCTAL\x00missing operator at %s\x00max # of tokens for a Tcl parse (%d) exceeded\x00invalid character \"$\"\x00missing close-bracket\x00empty subexpression at %s\x00EMPTY\x00unbalanced open paren\x00missing function argument at %s\x00empty expression\x00unbalanced close paren\x00missing operand at %s\x00missing operator \":\" at %s\x00unexpected operator \":\" without preceding \"?\"\x00SURPRISE\x00unexpected \",\" outside function argument list\x00\nin expression \"%s%.*s%.*s%s%s%.*s%s\"\x00;\n\x00\n    (parsing expression \"%.*s%s\")\x00PARSE\x00EXPR\x00done\x00push1\x00push4\x00invokeStk1\x00invokeStk4\x00loadScalar1\x00loadScalar4\x00loadScalarStk\x00loadArray1\x00loadArray4\x00storeScalar1\x00storeScalar4\x00storeScalarStk\x00storeArray1\x00storeArray4\x00incrScalar1\x00incrScalarStk\x00incrArray1\x00incrScalar1Imm\x00incrScalarStkImm\x00incrArray1Imm\x00jump1\x00jumpTrue1\x00jumpFalse1\x00callBuiltinFunc1\x00callFunc1\x00foreach_start4\x00foreach_step4\x00beginCatch4\x00appendScalar1\x00appendScalar4\x00appendArray1\x00appendArray4\x00lappendScalar1\x00lappendScalar4\x00lappendArray1\x00lappendArray4\x00returnImm\x00expandStart\x00expandStkTop\x00invokeExpanded\x00listRangeImm\x00startCommand\x00returnStk\x00dictFirst\x00dictNext\x00dictDone\x00dictUpdateStart\x00dictUpdateEnd\x00syntax\x00existScalar\x00returnCodeBranch\x00unsetScalar\x00strrangeImm\x00invokeReplace\x00expandDrop\x00foreach_start\x00foreach_step\x00foreach_end\x00lmap_collect\x00tclooNext\x00tclooNextClass\x00yieldToInvoke\x00strclass\x00bytecode\x00substcode\x00::tcl\x00::tcl::\x00TclCompileScript() called on uninitialized CompileEnv\x00too many nested compilations (infinite loop?)\x00Unexpected token type in TclCompileTokens: %d; %.*s\x00TclInitByteCodeObj() called on uninitialized CompileEnv\x00EnterCmdStartData: bad command index %d\x00EnterCmdStartData: cmd map not sorted by code offset\x00EnterCmdExtentData: bad command index %d\x00EnterCmdExtentData: missing start data for command %d\x00trying to add 'break' fixup to full exception range\x00trying to add 'continue' fixup to full exception range\x00trying to finalize a loop exception range\x00TclFixupForwardJump: bad ExceptionRange type %d\x00unexpected opcode\x00GetCmdLocEncodingSize: bad code offset\x00GetCmdLocEncodingSize: bad code length\x00GetCmdLocEncodingSize: bad source length\x00EncodeCmdLocMap: bad code offset\x00EncodeCmdLocMap: bad code length\x00EncodeCmdLocMap: bad source length\x00%s.\n%s: %s\x00Tcl_RegisterConfig\x00Unable to create namespace for package configuration.\x00::pkgconfig\x00%s: %s\x00Unable to create query command for package configuration\x00subcommand ?arg?\x00subcommand\x00package not known\x00FATAL\x00PKGCFG_BASE\x00key\x00key not known\x00CONFIG\x00insufficient memory to create list\x00QueryConfigObjCmd: Unknown subcommand to 'pkgconfig'. This can't happen\x00get\x00tclPackageAboutDict\x00Deleting\x00syntax error\x00Error: discarding\x00Error: popping\x00memory exhausted\x00Cleanup: discarding lookahead\x00Cleanup: popping\x00january\x00february\x00march\x00april\x00may\x00june\x00july\x00august\x00september\x00sept\x00october\x00november\x00december\x00sunday\x00monday\x00tuesday\x00tues\x00wednesday\x00wednes\x00thursday\x00thur\x00thurs\x00friday\x00saturday\x00fortnight\x00week\x00day\x00hour\x00minute\x00min\x00second\x00sec\x00tomorrow\x00yesterday\x00today\x00now\x00this\x00next\x00ago\x00epoch\x00stardate\x00gmt\x00ut\x00utc\x00uct\x00wet\x00bst\x00wat\x00at\x00nft\x00nst\x00ndt\x00ast\x00adt\x00est\x00edt\x00cst\x00cdt\x00mst\x00mdt\x00pst\x00pdt\x00yst\x00ydt\x00hst\x00hdt\x00ahst\x00nt\x00idlw\x00cet\x00cest\x00met\x00mewt\x00mest\x00swt\x00sst\x00fwt\x00fst\x00eet\x00bt\x00it\x00zp4\x00zp5\x00ist\x00zp6\x00wast\x00wadt\x00jt\x00cct\x00jst\x00jdt\x00kst\x00kdt\x00cast\x00cadt\x00east\x00eadt\x00gst\x00nzt\x00nzst\x00nzdt\x00idle\x00dst\x00a\x00b\x00c\x00d\x00e\x00f\x00g\x00h\x00i\x00k\x00l\x00m\x00n\x00o\x00p\x00q\x00r\x00s\x00t\x00u\x00v\x00w\x00x\x00y\x00z\x00 (characters \x00am\x00a.m.\x00pm\x00p.m.\x00stringToParse baseYear baseMonth baseDay\x00DATE\x00Unknown status returned from date parser. Please report this error as a bug in Tcl.\x00BUG\x00more than one date in string\x00MULTIPLE\x00more than one time of day in string\x00more than one time zone in string\x00more than one weekday in string\x00more than one ordinal month in string\x00create\x00filter\x00keys\x00merge\x00remove\x00values\x00with\x00dict\x00missing value to go with key\x00DICTIONARY\x00key \"%s\" not known in dictionary\x00DICT\x00Tcl_DictObjPut\x00Tcl_DictObjRemove\x00concurrent dictionary modification and search\x00Tcl_DictObjPutKeyList\x00%s called with empty key list\x00Tcl_DictObjRemoveKeyList\x00?key value ...?\x00dictionary ?key ...?\x00dictionary ?key value ...?\x00dictionary ?pattern?\x00dictionary\x00dictionary key ?key ...?\x00dictVarName key ?increment?\x00\n    (reading increment)\x00dictVarName key ?value ...?\x00{keyVarName valueVarName} dictionary script\x00must have exactly two variable names\x00SYNTAX\x00\n    (\"dict for\" body line %d)\x00\n    (\"dict map\" body line %d)\x00dictVarName key ?key ...? value\x00dictVarName key ?key ...?\x00dictionary filterType ?arg ...?\x00filterType\x00dictionary script {keyVarName valueVarName} filterScript\x00\n    (\"dict filter\" filter script key variable)\x00\n    (\"dict filter\" filter script value variable)\x00\n    (\"dict filter\" script line %d)\x00dictVarName key varName ?key varName ...? script\x00\n    (body of \"dict update\")\x00dictVarName ?key ...? script\x00\n    (body of \"dict with\")\x00instname\x00ByteCode 0x%s, refCt %u, epoch %u, interp 0x%s (epoch %u)\n\x00  Source \x00\n  File \"%s\" Line %d\x00\n  Cmds %d, src %d, inst %d, litObjs %u, aux %d, stkDepth %u, code/src %.2f\n\x00  Proc 0x%s, refCt %d, args %d, compiled locals %d\n\x00      slot %d%s%s%s%s%s%s\x00, scalar\x00, array\x00, link\x00, arg\x00, temp\x00, resolved\x00, \"%s\"\n\x00  Exception ranges %d, depth %d:\n\x00      %d: level %d, %s, pc %d-%d, \x00continue %d, break %d\n\x00catch %d\n\x00DisassembleByteCodeObj: bad ExceptionRange type %d\x00    \x00  Commands %d:\x00%s%4d: pc %d-%d, src %d-%d\x00     \x00\n   \x00  Command %d: \x00(%u) %s \x00%+d \x00%u \x00, %u cmds start here\x00pc %u\x00next cmd at pc %u\x00%d \x00end \x00end-%d \x00FormatInstruction: bad local var index %u (%u locals)\x00temp var %u\x00var \x00%%v%u \x00%s \x00\t# \x00\t# %s\x00\t\t[\x00]\n\x00InnerContext: bad tos -- appending null object\x00InnerContext: bad tos -- appending freed object %p\x00inst_%d\x00\"\"\x00\"\x00\\\"\x00\\f\x00\\n\x00\\r\x00\\t\x00\\v\x00\\U%08x\x00\\u%04x\x00%c\x00scalar\x00array\x00arg\x00temp\x00resolved\x00pc %d\x00@%d\x00%%%d\x00.%d\x00.end\x00.end-%d\x00?%d\x00=%s\x00opcode %d with more than zero 'no' operands\x00type %s level %d from %d to %d break %d continue %d\x00type %s level %d from %d to %d catch %d\x00codefrom\x00codeto\x00scriptfrom\x00scriptto\x00literals\x00exception\x00instructions\x00auxiliary\x00stackdepth\x00exceptdepth\x00initiallinenumber\x00sourcefile\x00type ...\x00lambdaTerm\x00procName\x00PROC\x00className\x00\"%s\" is not a class\x00CLASS\x00\"%s\" has no defined constructor\x00DISASSEMBLE\x00CONSRUCTOR\x00body not available for this kind of constructor\x00METHODTYPE\x00body of constructor\x00\"%s\" has no defined destructor\x00DESRUCTOR\x00body not available for this kind of destructor\x00body of destructor\x00className methodName\x00objectName methodName\x00unknown method \"%s\"\x00METHOD\x00body not available for this kind of method\x00body of method\x00may not disassemble prebuilt bytecode\x00BYTECODE\x00constructor\x00destructor\x00lambda\x00method\x00objmethod\x00*.enc\x00identity\x00utf-8\x00unicode\x00iso8859-1\x00FreeEncoding: refcount problem !!!\x00.enc\x00unknown encoding \"%s\"\x00invalid encoding file \"%s\"\x00init\x00final\x00EscapeToUtfProc: invalid sub table\x00configure\x00-map\x00-parameters\x00-prefixes\x00-subcommands\x00-unknown\x00-namespace\x00ensembleCommand\x00tried to manipulate ensemble of deleted namespace\x00ENSEMBLE\x00DEAD\x00subcommand ?arg ...?\x00?option value ...?\x00ensemble subcommand implementations must be non-empty lists\x00EMPTY_TARGET\x00cmdname\x00cmdname ?-option value ...? ?arg ...?\x00option -namespace is read-only\x00READ_ONLY\x00unexpected ensemble command\x00command is not an ensemble\x00NOT_ENSEMBLE\x00ensemble target is not a fully-qualified command\x00UNQUALIFIED_TARGET\x00\"%s\" is not an ensemble command\x00tcl:\x00invalid ensemble name '%s'\x00unable to find or create %s namespace!\x00ensemble activated for deleted namespace\x00full name %s not found in supposedly synchronized hash\x00unknown subcommand \"%s\": namespace %s does not export any commands\x00unknown%s subcommand \"%s\": must be \x00 or ambiguous\x00or %s\x00SpellFix: programming error\x00unknown subcommand handler deleted its ensemble\x00UNKNOWN_DELETED\x00\n    while parsing result of ensemble unknown subcommand handler\x00unknown subcommand handler returned bad code: \x00\n    result of ensemble unknown subcommand handler: \x00UNKNOWN_RESULT\x00\n    (ensemble unknown subcommand handler)\x00env\x00PATH\x00COMSPEC\x00HOME\x00no such variable\x00tclBgError\x00error in background error handler:\n\x00msg options\x00-level\x00missing return option \"-level\"\x00-code\x00missing return option \"-code\"\x00bgerror\x00errorInfo\x00bgerror failed to handle background error.\n\x00    Original error: \x00    Error in bgerror: \x00TclSetBgErrorHandler: NULL cmdPrefix argument\x00OS exit failed!\x00TclInitSubsystems called while exiting\x00exit handlers were created during Tcl_Finalize\x00limit exceeded\x00can't wait for variable \"%s\": would wait forever\x00EVENT\x00NO_SOURCES\x00Tcl_UpdateObjCmd: bad option index to UpdateOptions\x00?idletasks?\x00idletasks\x00||\x00&&\x00exprcode\x00dictIterator\x00freeing an execStack which is still in use\x00Deleting execEnv with pending TEOV callbacks!\x00Deleting execEnv with existing coroutine\x00STACK: Reallocating with no previous alloc\x00STACK: Stack after current is in use\x00STACK: Stack after current is not last\x00TclStackFree: incorrect freePtr (%p != %p). Call out of sequence?\x00TclStackRealloc: incorrect ptr. Call out of sequence?\x00Tcl_EvalObj: compiled script jumped interps\x00TclIncrObj\x00tailcall can only be called from a proc or lambda\x00TclNRExecuteByteCode: unrecognized builtin function code %d\x00\n    (reading value of variable to increment)\x00access\x00array set\x00variable isn't array\x00WRITE\x00ARRAY\x00STACK_LEVEL\x00self may only be called from inside a method\x00OO\x00CONTEXT_REQUIRED\x00nextto may only be called from inside a method\x00CLASS_REQUIRED\x00%s implementation by \"%s\" not reachable from here\x00CLASS_NOT_REACHABLE\x00%s has no non-filter implementation by \"%s\"\x00CLASS_NOT_THERE\x00next may only be called from inside a method\x00no next %s implementation\x00NOTHING_NEXT\x00negative shift argument\x00INST_RETURN_CODE_BRANCH: TOS not a return code!\x00INST_RETURN_CODE_BRANCH: TOS is TCL_OK!\x00Should not happen!\x00mis-issued dictFirst!\x00mis-issued dictNext!\x00dictUpdateStart argument length mismatch\x00clockRead instruction with unknown clock#\x00TclNRExecuteByteCode: unrecognized opCode %u\x00divide by zero\x00DIVZERO\x00exponentiation of zero by negative power\x00\nTclNRExecuteByteCode: abnormal return at pc %u: stack top %d < entry stack top %d\n\x00TclNRExecuteByteCode execution failure: end stack top < start stack top\x00exponent too large\x00unexpected number type\x00empty string\x00invalid octal number\x00non-numeric string\x00non-numeric floating-point value\x00floating-point value\x00(big) integer\x00can't use %s as operand of \"%s\"\x00LocSearch failure\x00floating-point value too small to represent\x00UNDERFLOW\x00floating-point value too large to represent\x00OVERFLOW\x00unknown floating-point error, errno = %d\x00?-option value ...? source ?source ...? target\x00error %s: target \"%s\" is not a directory\x00copying\x00renaming\x00can't create directory \"%s\": %s\x00error deleting \"%s\": directory not empty\x00error deleting unknown file: %s\x00error deleting \"%s\": %s\x00can't overwrite file \"%s\" with directory \"%s\"\x00can't overwrite directory \"%s\" with file \"%s\"\x00u+w\x00-permissions\x00error renaming \"%s\" to \"%s\": trying to rename a volume or move a directory into itself\x00::tcl::CopyDirectory\x00can't unlink \"%s\": %s\x00error %s \"%s\"\x00 to \"%s\"\x00: \"%s\"\x00: %s\x00-force\x00name ?-option value ...?\x00must not update objPtrRef's variable and return non-NULL\x00bad option \"%s\", there are no file attributes in this filesystem\x00FATTR\x00value for \"%s\" missing\x00NOVALUE\x00?-linktype? linkname ?target?\x00could not create new link \"%s\": that path already exists\x00could not create new link \"%s\": no such file or directory\x00could not create new link \"%s\": target \"%s\" doesn't exist\x00could not create new link \"%s\" pointing to \"%s\": %s\x00could not read link \"%s\": %s\x00-symbolic\x00-hard\x00?nameVar? ?template?\x00can't create temporary file: %s\x00//?/UNC/\x00//?/\x00//\x00./\x00/\\:\x00couldn't find HOME environment variable to expand path\x00FILENAME\x00NO_HOME\x00user \"%s\" doesn't exist\x00USER\x00missing argument to \"-directory\"\x00\"-directory\" may only be used once\x00\"-directory\" cannot be used with \"-path\"\x00GLOB\x00BADOPTIONCOMBINATION\x00missing argument to \"-path\"\x00\"-path\" may only be used once\x00\"-path\" cannot be used with \"-dictionary\"\x00missing argument to \"-types\"\x00\"-tails\" must be used with either \"-directory\" or \"-path\"\x00\\/\x00\\[]*?{}\x00readonly\x00hidden\x00macintosh\x00creator\x00bad argument to \"-types\": %s\x00BAD\x00only one MacOS type or creator argument to \"-types\" allowed\x00no files matched glob pattern%s \"\x00%s%s\x00NOMATCH\x00-directory\x00-join\x00-path\x00-tails\x00-types\x00/\\\x00Called TclGlob with TCL_GLOBMODE_TAILS and pathPrefix==NULL\x00.\x00unmatched open-brace in file name\x00BALANCE\x00unmatched close-brace in file name\x00*[]?\\\x00invalid sharing of Tcl_Obj on C stack\x00malformed bucket chain in Tcl_DeleteHashEntry\x00%d entries in table, %d buckets\n\x00number of buckets with %d entries: %d\n\x00number of buckets with %d or more entries: %d\n\x00average search distance for entry: %.1f\x00called %s on deleted table\x00Tcl_FindHashEntry\x00Tcl_CreateHashEntry\x00::tcl::HistoryObjs\x00::history\x00channel\x00TCL_FLUSH_NONBLOCKING_ON_EXIT\x00-blocking\x00tclIO\x00Tcl_RegisterChannel: channel without name\x00Tcl_RegisterChannel: duplicate channel names\x00illegal recursive call to close through close-handler of channel\x00stdin\x00stdout\x00stderr\x00can not find channel named \"%s\"\x00CHANNEL\x00channel type %s must define closeProc\x00channel type %s must define inputProc when used for reader channel\x00channel type %s must define outputProc when used for writer channel\x00channel type %s must define watchProc\x00channel type %s must define seekProc if defining wideSeekProc\x00couldn't find state for channel \"%s\"\x00reading and writing both disallowed for channel \"%s\"\x00could not flush channel \"%s\"\x00Channel released more than preserved\x00channel \"%s\" does not support OS handles\x00Reuse of ChannelBuffer! %p\x00unable to access channel: invalid channel\x00TclFlush, closed channel: queued output left\x00FlushChannel: damaged channel list\x00SpliceChannel: trying to add channel used in different list\x00called Tcl_Close on channel with refCount > 0\x00double-close of channels not supported by %ss\x00half-close of channels not supported by %ss\x00half-close not applicable to stack of transformations\x00write\x00Half-close of %s-side not possible, side not opened or already closed\x00ClosechanHalf, closed write-side of channel: queued output left\x00unknown output translation requested\x00\r\n\x00Tcl_GetsObj: gotEOL reached with bufPtr==NULL\x00TclGetsObjBinary: gotEOL reached with bufPtr==NULL\x00binary encoding is not available\x00Buffer Underflow, BUFFER_PADDING not enough\x00unknown input translation %d\x00blocking buffering buffersize encoding eofchar translation\x00malformed option list in channel driver\x00bad option \"%s\": should be one of \x00-%s, \x00or -%s\x00-buffering\x00none\x00full\x00-buffersize\x00-eofchar\x00-translation\x00auto\x00cr\x00crlf\x00lf\x00unable to set channel options: background copy in progress\x00bad value for -buffering: must be one of full, line, or none\x00bad value for -eofchar: must be non-NUL ASCII character\x00bad value for -eofchar: should be a list of zero, one, or two elements\x00bad value for -translation: must be a one or two element list\x00platform\x00bad value for -translation: must be one of auto, binary, cr, lf, crlf, or platform\x00tcp\x00channelId event ?script?\x00event name\x00channel is not %s\x00channel \"%s\" is busy\x00error %sing \"%s\": %s\x00writ\x00error reading \"\x00\": \x00error writing \"\x00error setting blocking mode: %s\x00Tcl_SetChannelError: bad syntax of message\x00Defined newlevel not used in rewrite\x00Defined newcode not used in rewrite\x00-nonewline\x00nonewline\x00?-nonewline? ?channelId? string\x00channel \"%s\" wasn't opened for writing\x00error writing \"%s\": %s\x00channelId\x00error flushing \"%s\": %s\x00channelId ?varName?\x00channel \"%s\" wasn't opened for reading\x00error reading \"%s\": %s\x00channelId ?numChars?\x00?-nonewline? channelId\x00expected non-negative integer but got \"%s\"\x00NUMBER\x00channelId offset ?origin?\x00origin\x00error during seek on \"%s\": %s\x00start\x00current\x00channelId ?direction?\x00direction\x00channelId ?-option value ...?\x00?-option ...? arg ?arg ...?\x00error reading output from command: %s\x00-ignorestderr\x00-keepnewline\x00fileName ?access? ?permissions?\x000o\x00Tcl_OpenCmd: invalid mode value\x00tclTCPAcceptCallbacks\x00RegisterTcpServerCleanup: damaged accept record table\x00cannot set -async option for server sockets\x00no argument given for -myaddr option\x00no argument given for -myport option\x00no argument given for -server option\x00Tcl_SocketObjCmd: bad option index to SocketOptions\x00option -myport is not valid for servers\x00?-myaddr addr? ?-myport myport? ?-async? host port\x00-server command ?-myaddr addr? port\x00-async\x00-myaddr\x00-myport\x00-server\x00input output ?-size size? ?-command callback?\x00-size\x00mode channelId\x00input\x00output\x00channelId ?length?\x00cannot truncate to negative length of file\x00could not determine current location in \"%s\": %s\x00error during truncate on \"%s\": %s\x00chan\x00blocked\x00event\x00pending\x00pipe\x00postevent\x00truncate\x00::fconfigure\x00transform\x00-command value is not a list\x00\nfailed to stack channel \"%s\"\x00create/write\x00create/read\x00delete/write\x00flush/write\x00flush/read\x00delete/read\x00query/maxRead\x00clear/read\x00tclrchannel\x00blocking\x00cget\x00cgetall\x00finalize\x00initialize\x00watch\x00{read delivered more than requested}\x00{write wrote more than requested}\x00{write wrote nothing}\x00{Tried to seek before origin}\x00{Owner lost}\x00-code 1 -level 0 -errorcode NONE -errorinfo {} -errorline 1 {Owner lost}\x00mode cmdprefix\x00chan handler \"%s initialize\" returned non-list: %s\x00chan handler \"\x00 initialize\" returned \x00chan handler \"%s\" does not support all required methods\x00chan handler \"%s\" lacks a \"read\" method\x00chan handler \"%s\" lacks a \"write\" method\x00chan handler \"%s\" supports \"cget\" but not \"cgetall\"\x00chan handler \"%s\" supports \"cgetall\" but not \"cget\"\x00TclChanCreateObjCmd: duplicate channel names\x00channel eventspec\x00can not find reflected channel named \"%s\"\x00TclChanPostEventObjCmd: channel is not a reflected channel\x00TclChanPostEventObjCmd: postevent accepted for call from outside interpreter\x00tried to post events channel \"%s\" is not interested in\x00TclChanCaughtErrorBypass: Bad syntax of caught result\x00Expected list with even number of elements, got %d element%s instead\x00bad %s list: is empty\x00read write\x00rc%lu\x00chan handler returned bad code: %d\x00\n    (chan handler subcommand \"%s\")\x00EAGAIN\x00ReflectedChannelMap\x00tclrtransform\x00clear\x00drain\x00limit?\x00{read not supported by Tcl driver}\x00{write not supported by Tcl driver}\x00channel cmdprefix\x00chan handler \"%s initialize\" returned %s\x00chan handler \"%s\" makes the channel inaccessible\x00chan handler \"%s\" supports \"drain\" but not \"read\"\x00chan handler \"%s\" supports \"flush\" but not \"write\"\x00TclChanPushObjCmd: duplicate transformation handle\x00rt%lu\x00ReflectedTransformMap\x00couldn't open socket: port number too high\x00::tcl::unsupported::socketAF\x00inet\x00inet6\x00native\x00glob couldn't determine the current working directory\x00illegal access mode \"%s\"\x00\n    while processing open access modes \"\x00RDONLY\x00WRONLY\x00RDWR\x00APPEND\x00CREAT\x00EXCL\x00NOCTTY\x00access mode \"%s\" not supported by this system\x00NONBLOCK\x00TRUNC\x00invalid access mode \"%s\": must be RDONLY, WRONLY, RDWR, APPEND, BINARY, CREAT, EXCL, NOCTTY, NONBLOCK, or TRUNC\x00access mode must include either RDONLY, WRONLY, or RDWR\x00couldn't read file \"%s\": %s\x00\x1a {}\x00\ufeff\x00\n    (file \"%.*s%s\" line %d)\x00POSIX\x00could not seek to end of file while opening \"%s\": %s\x00couldn't open \"%s\": %s\x00error getting working directory name: %s\x00couldn't load library \"%s\": %s\x00couldn't load from current filesystem\x00cannot unload: filesystem does not support unloading\x00wb\x00rb\x00Tcl_FSGetFileSystemForPath called with NULL object\x00Tcl_FSGetFileSystemForPath called with object with refCount == 0\x00ambiguous \x00bad \x00 \"\x00\": no valid options\x00\": must be \x00 or \x00::tcl::prefix\x00prefix\x00all\x00longest\x00?options? table string\x00missing value for -message\x00NOARG\x00missing value for -error\x00error options must have an even number of elements\x00-error\x00-message\x00table string\x00 or \"\x00wrong # args: should be \"\x00ambiguous option \"%s\"\x00unrecognized argument \"%s\"\x00expected integer argument for \"%s\" but got \"%s\"\x00expected floating-point argument for \"%s\" but got \"%s\"\x00bad argument type %d in Tcl_ArgvInfo\x00\"%s\" option requires an additional argument\x00Command-specific options:\x00\n%s\x00\n %s:\x00\n\t\tDefault value: %d\x00\n\t\tDefault value: %g\x00\n\t\tDefault value: \"%s\"\x00                    \x00bad completion code \"%s\": must be ok, error, return, break, continue, or an integer\x00RESULT\x00ILLEGAL_CODE\x00ok\x00if {[namespace which -command tclInit] eq \"\"} {\n  proc tclInit {} {\n    global tcl_libPath tcl_library env tclDefaultLibrary\n    rename tclInit {}\n    if {[info exists tcl_library]} {\n\tset scripts {{set tcl_library}}\n    } else {\n\tset scripts {}\n\tif {[info exists env(TCL_LIBRARY)] && ($env(TCL_LIBRARY) ne {})} {\n\t    lappend scripts {set env(TCL_LIBRARY)}\n\t    lappend scripts {\nif {[regexp ^tcl(.*)$ [file tail $env(TCL_LIBRARY)] -> tail] == 0} continue\nif {$tail eq [info tclversion]} continue\nfile join [file dirname $env(TCL_LIBRARY)] tcl[info tclversion]}\n\t}\n\tif {[info exists tclDefaultLibrary]} {\n\t    lappend scripts {set tclDefaultLibrary}\n\t} else {\n\t    lappend scripts {::tcl::pkgconfig get scriptdir,runtime}\n\t}\n\tlappend scripts {\nset parentDir [file dirname [file dirname [info nameofexecutable]]]\nset grandParentDir [file dirname $parentDir]\nfile join $parentDir lib tcl[info tclversion]} \\\n\t{file join $grandParentDir lib tcl[info tclversion]} \\\n\t{file join $parentDir library} \\\n\t{file join $grandParentDir library} \\\n\t{file join $grandParentDir tcl[info patchlevel] library} \\\n\t{\nfile join [file dirname $grandParentDir] tcl[info patchlevel] library}\n\tif {[info exists tcl_libPath]\n\t\t&& [catch {llength $tcl_libPath} len] == 0} {\n\t    for {set i 0} {$i < $len} {incr i} {\n\t\tlappend scripts [list lindex \\$tcl_libPath $i]\n\t    }\n\t}\n    }\n    set dirs {}\n    set errors {}\n    foreach script $scripts {\n\tlappend dirs [eval $script]\n\tset tcl_library [lindex $dirs end]\n\tset tclfile [file join $tcl_library init.tcl]\n\tif {[file exists $tclfile]} {\n\t    if {[catch {uplevel #0 [list source $tclfile]} msg opts]} {\n\t\tappend errors \"$tclfile: $msg\n\"\n\t\tappend errors \"[dict get $opts -errorinfo]\n\"\n\t\tcontinue\n\t    }\n\t    unset -nocomplain tclDefaultLibrary\n\t    return\n\t}\n    }\n    unset -nocomplain tclDefaultLibrary\n    set msg \"Can't find a usable init.tcl in the following directories: \n\"\n    append msg \"    $dirs\n\n\"\n    append msg \"$errors\n\n\"\n    append msg \"This probably means that Tcl wasn't installed properly.\n\"\n    error $msg\n  }\n}\ntclInit\x00interp\x00InterpInfoDeleteProc: still exist commands\x00InterpInfoDeleteProc: still exist aliases\x00cmd ?arg ...?\x00slavePath slaveCmd ?masterPath masterCmd? ?arg ...?\x00path ?cmdPrefix?\x00?-unwind? ?--? ?path? ?result?\x00?-safe? ?--? ?path?\x00interp%d\x00path ?-frame ?bool??\x00cannot delete the current interpreter\x00INTERP\x00DELETESELF\x00path arg ?arg ...?\x00path hiddenCmdName ?cmdName?\x00path cmdName ?hiddenCmdName?\x00path ?-namespace ns? ?-global? ?--? cmd ?arg ..?\x00path limitType ?-option value ...?\x00limit type\x00path\x00path ?newlimit?\x00srcPath channelId destPath\x00path alias\x00alias \"%s\" in path \"%s\" not found\x00ALIAS\x00target interpreter for alias \"%s\" in path \"%s\" is not my descendant\x00TARGETSHROUDED\x00alias\x00aliases\x00cancel\x00children\x00debug\x00expose\x00hide\x00issafe\x00invokehidden\x00limit\x00marktrusted\x00recursionlimit\x00slaves\x00share\x00target\x00transfer\x00-unwind\x00-safe\x00-global\x00?path?\x00alias \"%s\" not found\x00cannot define or rename alias \"%s\": interpreter deleted\x00cannot define or rename alias \"%s\": would create a loop\x00ALIASLOOP\x00could not find interpreter \"%s\"\x00cmdPrefix must be list of length >= 1\x00BGERRORFORMAT\x00interpreter named \"%s\" already exists, cannot create\x00tcl_interactive\x00ChildObjCmd: interpreter has been deleted\x00aliasName ?targetName? ?arg ...?\x00?cmdPrefix?\x00?-frame ?bool??\x00hiddenCmdName ?cmdName?\x00cmdName ?hiddenCmdName?\x00?-namespace ns? ?-global? ?--? cmd ?arg ..?\x00limitType ?-option value ...?\x00?newlimit?\x00-frame\x00debug option\x00permission denied: safe interpreter cannot expose commands\x00UNSAFE\x00permission denied: safe interpreters cannot change recursion limit\x00recursion limit must be > 0\x00BADLIMIT\x00falling back due to new recursion limit\x00RECURSION\x00permission denied: safe interpreter cannot hide commands\x00not allowed to invoke hidden commands from safe interpreter\x00permission denied: safe interpreter cannot mark trusted\x00namespace eval ::tcl {namespace eval mathfunc {}}\x00::tcl::mathfunc::min\x00::tcl::mathfunc::max\x00os\x00osVersion\x00machine\x00user\x00tclDefaultLibrary\x00tcl_pkgPath\x00command count limit exceeded\x00COMMANDS\x00time limit exceeded\x00TIME\x00unknown type of resource limit\x00\n    (while waiting for event)\x00limit granularity must be positive\x00installing limit callback to the limited interpreter\x00limits on current interpreter inaccessible\x00SELF\x00?-option value ...?\x00granularity must be at least 1\x00BADVALUE\x00command limit value must be at least 0\x00-granularity\x00-value\x00milliseconds must be at least 0\x00seconds must be at least 0\x00may only set -milliseconds if -seconds is not also being reset\x00BADUSAGE\x00may only reset -milliseconds if -seconds is also being reset\x00-seconds\x00variable '%s' is already linked\x00internal error: bad linked variable type\x00linked variable is read-only\x00internal error: linked variable couldn't be read\x00variable must have integer value\x00variable must have real value\x00variable must have boolean value\x00variable must have char value\x00variable must have unsigned char value\x00variable must have short value\x00variable must have unsigned short value\x00variable must have unsigned int value\x00variable must have long value\x00variable must have unsigned long value\x00variable must have unsigned wide int value\x00variable must have float value\x00NULL\x00??\x00invalidReal\x00xXbBoO\x00+-\x00NewListInternalRep: expects postive element count\x00list creation failed: unable to alloc %u bytes\x00Tcl_SetListObj\x00Tcl_ListObjAppendList\x00Tcl_ListObjAppendElement\x00Tcl_ListObjReplace\x00list index out of range\x00LSET\x00TclListObjSetElement\x00max size of Tcl literal array (%d literals) exceeded\x00?-global? ?-lazy? ?--? fileName ?packageName? ?interp?\x00must specify either file name or package name\x00LOAD\x00NOLIBRARY\x00file \"%s\" is already loaded for package \"%s\"\x00SPLITPERSONALITY\x00tclLoad\x00package \"%s\" isn't loaded statically\x00NOTSTATIC\x00couldn't figure out package name for %s\x00WHATPACKAGE\x00_Init\x00_SafeInit\x00_Unload\x00_SafeUnload\x00can't use package in a safe interpreter: no %s_SafeInit procedure\x00can't attach package to interpreter: no %s_Init procedure\x00ENTRYPOINT\x00-lazy\x00?-switch ...? fileName ?packageName? ?interp?\x00UNLOAD\x00package \"%s\" is loaded statically and cannot be unloaded\x00STATIC\x00file \"%s\" has never been loaded\x00NEVERLOADED\x00file \"%s\" has never been loaded in this interpreter\x00file \"%s\" cannot be unloaded under a safe interpreter\x00CANNOT\x00file \"%s\" cannot be unloaded under a trusted interpreter\x00-keeplibrary\x00argv0\x00argc\x00argv\x00application-specific initialization failed: \x00exit %d\x00tcl_prompt2\x00tcl_prompt1\x00% \x00\n    (script that generates prompt)\x00tcl_rcFileName\x00TCL_FINALIZE_ON_EXIT\x00nsName\x00code\x00ensemble\x00export\x00forget\x00import\x00parent\x00qualifiers\x00which\x00Trying to push call frame for dead namespace\x00errorCode\x00can't create namespace \"\": only global namespace can have empty name\x00CREATEGLOBAL\x00can't create namespace \"%s\": already exists\x00CREATEEXISTING\x00invalid export pattern \"%s\": pattern can't specify a namespace\x00EXPORT\x00auto_import\x00empty import pattern\x00IMPORT\x00unknown namespace in import pattern \"%s\"\x00no namespace specified in import pattern \"%s\"\x00ORIGIN\x00import pattern \"%s\" tries to import from namespace \"%s\" into itself\x00import pattern \"%s\" would create a loop containing command \"%s\"\x00LOOP\x00can't import command \"%s\": already exists\x00OVERWRITE\x00unknown namespace in namespace forget pattern \"%s\"\x00DeleteImportedCmd: did not find cmd in real cmd's list of import references\x00Could not create namespace '%s'\x00unknown namespace \"%s\"\x00unknown command \"%s\"\x00namespace \"%s\" not found\x00namespace \"%s\" not found in \"%s\"\x00?name? ?pattern?\x00?name name...?\x00unknown namespace \"%s\" in namespace delete command\x00name arg ?arg...?\x00\n    (in namespace %s \"%.*s%s\" script line %d)\x00?-clear? ?pattern pattern...?\x00-clear\x00?pattern pattern...?\x00?-force? ?pattern pattern...?\x00?pathList?\x00?script?\x00ns ?otherVar myVar ...?\x00?-command? ?-variable? name\x00-variable\x00\n    %s\n\"%.*s%s\"\x00while executing\x00invoked from within\x00deletemethod\x00forward\x00renamemethod\x00self\x00unexport\x00destroy\x00core method: \"destroy\"\x00core method: \"eval\"\x00core method: \"unknown\"\x00core method: \"variable\"\x00core method: \"varname\"\x00core method: \"create\"\x00new\x00core method: \"new\"\x00createWithNamespace\x00core method: \"createWithNamespace\"\x00oo::class constructor\x00package ifneeded TclOO 1.1.0 {# Already present, OK?};namespace eval ::oo { variable version 1.1.0 };namespace eval ::oo { variable patchlevel 1.1.0 };\x00::oo::define ::oo::Slot {\n    method Get {} {error unimplemented}\n    method Set list {error unimplemented}\n    method -set args {\n        uplevel 1 [list [namespace which my] Set $args]\n    }\n    method -append args {\n        uplevel 1 [list [namespace which my] Set [list                {*}[uplevel 1 [list [namespace which my] Get]] {*}$args]]\n    }\n    method -clear {} {uplevel 1 [list [namespace which my] Set {}]}\n    forward --default-operation my -append\n    method unknown {args} {\n        set def --default-operation\n        if {[llength $args] == 0} {\n            return [uplevel 1 [list [namespace which my] $def]]\n        } elseif {![string match -* [lindex $args 0]]} {\n            return [uplevel 1 [list [namespace which my] $def {*}$args]]\n        }\n        next {*}$args\n    }\n    export -set -append -clear\n    unexport unknown destroy\n}\n::oo::objdefine ::oo::define::superclass forward --default-operation my -set\n::oo::objdefine ::oo::define::mixin forward --default-operation my -set\n::oo::objdefine ::oo::objdefine::mixin forward --default-operation my -set\n\x00foreach p [info procs [info object namespace $originObject]::*] {    set args [info args $p];    set idx -1;    foreach a $args {        lset args [incr idx]             [if {[info default $p $a d]} {list $a $d} {list $a}]    };    set b [info body $p];    set p [namespace tail $p];    proc $p $args $b;};foreach v [info vars [info object namespace $originObject]::*] {    upvar 0 $v vOrigin;    namespace upvar [namespace current] [namespace tail $v] vNew;    if {[info exists vOrigin]} {        if {[array exists vOrigin]} {            array set vNew [array get vOrigin];        } else {            set vNew $vOrigin;        }    }}\x00TclOO\x001.1.0\x00::oo\x00[a-z]*\x00::oo::define\x00::oo::objdefine\x00::oo::Helpers\x00<constructor>\x00<destructor>\x00<cloned>\x00::oo::UnknownDefinition\x00::oo::define::\x00::oo::objdefine::\x00originObject\x00::oo::Helpers::next\x00::oo::Helpers::nextto\x00::oo::Helpers::self\x00::oo::copy\x00::oo::Obj%d\x00my\x00deleting class structure for non-deleted %s\x00::oo::class\x00::oo::object\x00can't create object \"%s\": command already exists with that name\x00OVERWRITE_OBJECT\x00object deleted in constructor\x00STILLBORN\x00may not clone the class of classes\x00CLONING_CLASS\x00\n    (while performing post-copy callback)\x00\n    (while mapping method name)\x00impossible to invoke method \"%s\": no defined method or unknown method\x00METHOD_MAPPED\x00no valid method implementation\x00%s does not refer to an object\x00OBJECT\x00?definitionScript?\x00object \"%s\" is not a class\x00INSTANTIATE_NONCLASS\x00objectName ?arg ...?\x00object name must not be empty\x00EMPTY_NAME\x00objectName namespaceName ?arg ...?\x00namespace name must not be empty\x00\n    (in \"%s eval\" script line %d)\x00method ?arg ...?\x00visible methods\x00methods\x00object \"%s\" has no %s\x00unknown method \"%s\": must be \x00?varName ...?\x00variable name \"%s\" illegal: must not contain namespace separator\x00UPVAR\x00INVERTED\x00define\x00name refers to an element in an array\x00LOCAL_ELEMENT\x00refer to\x00(\x00%s may only be called from inside a method\x00class ?arg...?\x00method not defined by a class\x00UNMATCHED_CONTEXT\x00not inside a filtering context\x00caller is not an object\x00method without declarer!\x00filtering call chain without terminal non-filter\x00call\x00caller\x00sourceName ?targetName? ?targetNamespace?\x00%s refers to an existing namespace\x00TclOO method name\x00::oo::define::filter\x00core method: define::filter Getter\x00core method: define::filter Setter\x00::oo::define::mixin\x00core method: define::mixin Getter\x00core method: define::mixin Setter\x00::oo::define::superclass\x00core method: define::superclass Getter\x00core method: define::superclass Setter\x00::oo::define::variable\x00core method: define::variable Getter\x00core method: define::variable Setter\x00::oo::objdefine::filter\x00core method: objdefine::filter Getter\x00core method: objdefine::filter Setter\x00::oo::objdefine::mixin\x00core method: objdefine::mixin Getter\x00core method: objdefine::mixin Setter\x00::oo::objdefine::variable\x00core method: objdefine::variable Getter\x00core method: objdefine::variable Setter\x00method %s does not exist\x00cannot rename method to itself\x00RENAME_TO_SELF\x00method called %s already exists\x00RENAME_OVER\x00bad call of unknown handler\x00BAD_UNKNOWN\x00cannot process definitions; support namespace deleted\x00MONKEY_BUSINESS\x00this command may only be called from within the context of an ::oo::define or ::oo::objdefine command\x00this command cannot be called when the object has been deleted\x00getting outer context when already in global context\x00\n    (in definition script for %s \"%.*s%s\" line %d)\x00className arg ?arg ...?\x00%s does not refer to a class\x00objectName arg ?arg ...?\x00class object\x00may not modify the class of the root object class\x00may not modify the class of the class of classes\x00the class of an object must be a class\x00may not change classes into an instance of themselves\x00arguments body\x00attempt to misuse API\x00name cmdName ?arg ...?\x00name args body\x00Get\x00Set\x00::oo::Slot\x00filterList\x00mixinList\x00may only mix in classes\x00may not mix a class into itself\x00SELF_MIXIN\x00superclassList\x00may not modify the superclass of the root object\x00only a class can be a superclass\x00class should only be a direct superclass once\x00REPETITIOUS\x00attempt to form circular dependency graph\x00CIRCULARITY\x00invalid declared variable name \"%s\": must not %s\x00contain namespace separators\x00BAD_DECLVAR\x00*(*)\x00refer to an array element\x00variableList\x00definition\x00filters\x00isa\x00methodtype\x00mixins\x00instances\x00subclasses\x00superclasses\x00::oo::InfoObject\x00::oo::InfoClass\x00objName ?className?\x00objName methodName\x00definition not available for this kind of method\x00objName\x00prefix argument list not available for this kind of method\x00category objName ?arg ...?\x00category\x00objName className\x00metaclass\x00mixin\x00typeof\x00objName ?-option value ...?\x00-localprivate\x00-private\x00objName ?pattern?\x00METHOD_TYPE\x00className ?pattern?\x00className ?-option value ...?\x00cannot construct any call chain\x00method not declared in class or object\x00\n    (%s \"%.*s%s\" method \"%.*s%s\" line %d)\x00\n    (%s \"%.*s%s\" constructor line %d)\x00\n    (%s \"%.*s%s\" destructor line %d)\x00method forward prefix must be non-empty\x00BAD_FORWARD\x00missing stub table pointer\x00Error loading \x00 (requested version \x00, actual version \x00): \x00booleanString\x00wideInt\x00bignum\x00cmdName\x00Derived ICL data for object using offsets from before the script\x00can't convert value to type %s\x00API_ABUSE\x00TclSetDuplicateObj\x00UpdateStringProc should not be invoked for type %s\x00UpdateStringProc for type '%s' failed to create a valid string rep\x00Tcl_SetBooleanObj\x00boolean value\x00expected boolean value but got \"\x00BOOLEAN\x00yes\x00no\x00off\x00Tcl_SetDoubleObj\x00floating point value is Not a Number\x00DOUBLE\x00NAN\x00floating-point number\x00Tcl_SetIntObj\x00Tcl_SetLongObj\x00expected integer but got \"%s\"\x00INTEGER\x00IOVERFLOW\x00%I64d\x00Tcl_SetWideIntObj\x00initialization failure in DupBignum\x00radix size failure in UpdateStringOfBignum\x00UpdateStringOfBignum: string length limit exceeded\x00conversion failure in UpdateStringOfBignum\x00insufficient memory to unpack bignum\x00Tcl_SetBignumObj\x00number\x00value is a %s with a refcount of %d, object pointer at %s\x00pure string\x00%p:%p\x00, internal representation %s\x00, string representation \"\x00, no string representation\x00can't parse a NULL pointer\x00extra characters after close-quote\x00extra characters after close-brace\x00ParseTokens encountered unknown character\x00missing close-brace for variable name\x00missing )\x00$\x00missing close-brace\x00: possible unbalanced brace in comment\x00missing \"\x00TclSubstParse: programming error\x00bad parse in TclSubstParse: %c\x00unexpected token type in TclSubstTokens: %d\x00Bad portion to TclPathPart\x00can't find object string representation\x00WTF\x00HOMELESS\x00NOUSER\x00Called UpdateStringOfFsPath with invalid object\x00channel \"%s\" wasn't opened for %s\x00writing\x00reading\x00EXEC\x00BADCHAN\x00couldn't %s file \"%s\": %s\x00can't specify \"%s\" as last word in command\x00child process lost (is SIGCHLD ignored or trapped?)\x00error waiting for process to exit: %s\x00%lu\x00%u\x00CHILDSTATUS\x00CHILDKILLED\x00child killed: %s\n\x00CHILDSUSP\x00child suspended: %s\n\x00child wait status didn't make sense\n\x00ODDWAITRESULT\x00error reading stderr output file: %s\x00child process exited abnormally\x00illegal use of | or |& in command\x00PIPESYNTAX\x00must specify \"%s\" as last word in command\x00couldn't create input file for command: %s\x00couldn't create input pipe for command: %s\x00couldn't create output pipe for command: %s\x00couldn't create error file for command: %s\x00couldn't create pipe: %s\x00can't read output from command: standard output was redirected\x00BADREDIRECT\x00can't write input to command: standard input was redirected\x00pipe for command could not be created\x00NOPIPE\x00conflicting versions provided for package \"%s\": %s, then %s\x00PACKAGE\x00VERSIONCONFLICT\x00Cannot load package \"%s\" in standalone executable: This package is not compiled with stub support\x00UNSTUBBED\x00bad return code: %d\x00BADRESULT\x00\n    (\"package unknown\" script)\x00can't find package %s\x00UNFOUND\x00version conflict for package \"%s\": have %s, need\x00circular package dependency: attempt to provide %s %s requires %s\x00attempt to provide package %s %s failed: no version of package %s provided\x00UNPROVIDED\x00attempt to provide package %s %s failed: package %s %s provided instead\x00WRONGPROVIDE\x00attempt to provide package %s %s failed: bad return code: %s\x00\n    (\"package ifneeded %s %s\" script)\x00package %s %s is not present\x00package %s is not present\x00option ?arg ...?\x00package version ?script?\x00package ?version?\x00?-exact? package ?requirement ...?\x00?command?\x00?latest|stable?\x00preference\x00version1 version2\x00version ?requirement ...?\x00Tcl_PackageObjCmd: bad option index to pkgOptions\x00ifneeded\x00prefer\x00present\x00provide\x00require\x00vcompare\x00versions\x00vsatisfies\x00latest\x00stable\x00expected version number but got \"%s\"\x00VERSION\x00expected versionMin-versionMax but got \"%s\"\x00VERSIONRANGE\x00 exactly %s\x00 %s\x00 0-\x00 -2\x00threaded\x00profiled\x0064bit\x00optimized\x00mem_debug\x00compile_debug\x00compile_stats\x00libdir,runtime\x00/usr/local/lib\x00bindir,runtime\x00/usr/local/bin\x00scriptdir,runtime\x00/usr/local/lib/tcl8.6\x00includedir,runtime\x00/usr/local/include\x00docdir,runtime\x00/usr/local/man\x00libdir,install\x00bindir,install\x00scriptdir,install\x00includedir,install\x00docdir,install\x00tcl\x00cp1252\x00E2BIG\x00EACCES\x00EADDRINUSE\x00EADDRNOTAVAIL\x00EAFNOSUPPORT\x00EALREADY\x00EBADF\x00EBADMSG\x00ECANCELED\x00EBUSY\x00ECHILD\x00ECONNABORTED\x00ECONNREFUSED\x00ECONNRESET\x00EDEADLK\x00EDESTADDRREQ\x00EDOM\x00EDQUOT\x00EEXIST\x00EFAULT\x00EFBIG\x00EHOSTDOWN\x00EHOSTUNREACH\x00EIDRM\x00EILSEQ\x00EINPROGRESS\x00EINTR\x00EINVAL\x00EIO\x00EISCONN\x00EISDIR\x00ELOOP\x00EMFILE\x00EMLINK\x00EMSGSIZE\x00ENAMETOOLONG\x00ENETDOWN\x00ENETRESET\x00ENETUNREACH\x00ENFILE\x00ENOBUFS\x00ENODATA\x00ENODEV\x00ENOENT\x00ENOEXEC\x00ENOLCK\x00ENOLINK\x00ENOMEM\x00ENOMSG\x00ENOPROTOOPT\x00ENOSPC\x00ENOSR\x00ENOSTR\x00ENOSYS\x00ENOTCONN\x00ENOTRECOVERABLE\x00ENOTDIR\x00ENOTEMPTY\x00ENOTSOCK\x00ENOTSUP\x00ENOTTY\x00ENXIO\x00EOPNOTSUPP\x00EOTHER\x00EOVERFLOW\x00EOWNERDEAD\x00EPERM\x00EPFNOSUPPORT\x00EPIPE\x00EPROTO\x00EPROTONOSUPPORT\x00EPROTOTYPE\x00ERANGE\x00EREMOTE\x00EROFS\x00ESHUTDOWN\x00ESOCKTNOSUPPORT\x00ESPIPE\x00ESRCH\x00ESTALE\x00ETIME\x00ETIMEDOUT\x00ETOOMANYREFS\x00ETXTBSY\x00EUSERS\x00EWOULDBLOCK\x00EXDEV\x00unknown error\x00argument list too long\x00permission denied\x00address already in use\x00cannot assign requested address\x00address family not supported by protocol\x00resource temporarily unavailable\x00operation already in progress\x00bad file number\x00not a data message\x00operation canceled\x00file busy\x00no children\x00software caused connection abort\x00connection refused\x00connection reset by peer\x00resource deadlock avoided\x00destination address required\x00math argument out of range\x00disk quota exceeded\x00file already exists\x00bad address in system call argument\x00file too large\x00host is down\x00host is unreachable\x00identifier removed\x00illegal byte sequence\x00operation now in progress\x00interrupted system call\x00invalid argument\x00I/O error\x00socket is already connected\x00illegal operation on a directory\x00too many levels of symbolic links\x00too many open files\x00too many links\x00message too long\x00file name too long\x00network is down\x00network dropped connection on reset\x00network is unreachable\x00file table overflow\x00no buffer space available\x00no data available\x00no such device\x00no such file or directory\x00exec format error\x00no locks available\x00link has been severed\x00not enough memory\x00no message of desired type\x00bad protocol option\x00no space left on device\x00out of stream resources\x00not a stream device\x00function not implemented\x00socket is not connected\x00state not recoverable\x00not a directory\x00directory not empty\x00socket operation on non-socket\x00operation not supported\x00inappropriate device for ioctl\x00no such device or address\x00operation not supported on socket\x00other error\x00file too big\x00owner died\x00not owner\x00protocol family not supported\x00broken pipe\x00protocol error\x00protocol not supported\x00protocol wrong type for socket\x00math result unrepresentable\x00pathname hit remote file system\x00read-only file system\x00cannot send after socket shutdown\x00socket type not supported\x00invalid seek\x00no such process\x00stale remote file handle\x00timer expired\x00connection timed out\x00too many references: cannot splice\x00text file or pseudo-device busy\x00too many users\x00operation would block\x00cross-domain link\x00SIGABRT\x00SIGBUS\x00SIGFPE\x00SIGILL\x00SIGINT\x00SIGSEGV\x00SIGTERM\x00SIGTRAP\x00unknown signal\x00bus error\x00floating-point exception\x00illegal instruction\x00interrupt\x00segmentation violation\x00software termination signal\x00trace trap\x00Tcl_Release couldn't find reference for %p\x00Tcl_EventuallyFree called twice for %p\x00procbody\x00levelReference\x00lambdaExpr\x00\n    (creating proc \"\x00procedure \"%s\": arg list contains %d entries, precompiled header expects %d\x00BYTECODELIES\x00too many fields in argument specifier \"\x00FORMALARGUMENTFORMAT\x00argument with no name\x00formal parameter \"%s\" is an array element\x00formal parameter \"\x00\" is not a simple name\x00procedure \"%s\": formal parameter %d is inconsistent with precompiled body\x00procedure \"%s\": formal parameter \"\x00\" has default value inconsistent with precompiled body\x00STACKLEVEL\x00\n    (\"uplevel\" body line %d)\x00?level? command ?arg ...?\x00?\x00?arg ...?\x00body object for proc attached to frame is not a byte code type\x00body of lambda term\x00body of proc\x00invoked \"%s\" outside of a loop\x00UNEXPECTED\x00a precompiled script jumped interps\x00CROSSINTERPBYTECODE\x00\n    (procedure \"%.*s%s\" line %d)\x00TclUpdateReturnInfo: negative return level\x00can't interpret \"%s\" as a lambda expression\x00LAMBDA\x00\n    (parsing lambda expression \"%s\")\x00lambdaExpr ?arg ...?\x00\n    (lambda term \"%.*s%s\" line %d)\x00error while matching regular expression: \x00REG_UBACKREF\x00REG_ULOOKAHEAD\x00REG_UBOUNDS\x00REG_UBRACES\x00REG_UBSALNUM\x00REG_UPBOTCH\x00REG_UBBS\x00REG_UNONPOSIX\x00REG_UUNSPEC\x00REG_UUNPORT\x00REG_ULOCALE\x00REG_UEMPTYMATCH\x00REG_UIMPOSSIBLE\x00REG_USHORTEST\x00%s%s%s\x00couldn't compile regular expression pattern: \x00-errorline\x00-errorstack\x00bad %s value: expected dictionary but got \"%s\"\x00ILLEGAL_OPTIONS\x00bad -level value: expected non-negative integer but got \"%s\"\x00ILLEGAL_LEVEL\x00bad -errorcode value: expected a list but got \"%s\"\x00ILLEGAL_ERRORCODE\x00bad -errorstack value: expected a list but got \"%s\"\x00NONLIST_ERRORSTACK\x00forbidden odd-sized list for -errorstack: \"%s\"\x00ODDSIZEDLIST_ERRORSTACK\x00expected dict but got \"%s\"\x00\x00\x00\x00\x00cannot mix \"%\" and \"%n$\" conversion specifiers\x00FORMAT\x00MIXEDSPECTYPES\x00field width may not be specified in %c conversion\x00BADWIDTH\x00field size modifier may not be specified in %\x00 conversion\x00BADSIZE\x00unsigned bignum scans are invalid\x00BADUNSIGNED\x00unmatched [ in format string\x00BRACKET\x00bad scan conversion character \"\x00BADTYPE\x00variable is assigned by multiple \"%n$\" conversion specifiers\x00POLYASSIGNED\x00variable is not assigned by any conversion specifiers\x00UNASSIGNED\x00\"%n$\" argument index out of range\x00INDEXRANGE\x00different numbers of variable names and field specifiers\x00FIELDVARMISMATCH\x00string format ?varName ...?\x00TclParseNumber: bad acceptState %d parsing '%s'\x00TclParseNumber: state INITIAL can't happen here\x00expected %s but got \"\x00 (looks like invalid octal number)\x00Infinity\x00NaN\x00impossible conversion type in TclDoubleDigits\x00wrong digit!\x00in ShouldBankerRoundUp, trichotomy fails!\x00in ShouldBankerRoundUpToNext, trichotomy fails!\x00This code doesn't work on a decimal machine!\x00unknown floating point word order on this machine\x00(%I64x)\x00Tcl_SetStringObj\x00Tcl_SetObjLength: negative length requested: %d (integer overflow?)\x00Tcl_SetObjLength\x00max length for a Tcl unicode value (%d chars) exceeded\x00Tcl_AttemptSetObjLength\x00Tcl_SetUnicodeObj\x00Tcl_AppendLimitedToObj\x00Tcl_AppendUnicodeToObj\x00Tcl_AppendStringsToObj\x00Tcl_AppendFormatToObj\x00format string ended in middle of field specifier\x00INCOMPLETE\x00unsigned bignum format is invalid\x000X\x000x\x000b\x00bad field specifier \"%c\"\x00max size for a Tcl value exceeded\x00Unable to format \"%s\" with supplied arguments: %s\x00interpreter uses an incompatible stubs mechanism\x00Tcl_GetMemoryInfo called when threaded memory allocator not in use\x00TclFinalizeThreadAlloc called when threaded memory allocator not in use\x00tclAfter\x00bad argument \"%s\": must be cancel, idle, info, or an integer\x00argument\x00after#%d\x00id|command\x00script ?script ...?\x00?id?\x00event \"%s\" doesn't exist\x00timer\x00Tcl_AfterObjCmd: bad subcommand index to afterSubCmds\x00after#\x00\n    (\"after\" script)\x00tcl::tommath\x00initialization failure in TclBNInitBignumFromLong\x00initialization failure in TclBNInitBignumFromWideUInt\x00epoch number mismatch\x00requires a later revision\x00execution\x00type ?arg ...?\x00type name\x00name ops command\x00bad operations \"%s\": should be one or more of rwua\x00TRACE\x00BADOPS\x00vdelete\x00vinfo\x00name opList command\x00bad operation list \"\": must be one or more of enter, leave, enterstep, or leavestep\x00NOOPS\x00operation\x00enter\x00leave\x00enterstep\x00leavestep\x00bad operation list \"\": must be one or more of delete or rename\x00bad operation list \"\": must be one or more of array, read, unset, or write\x00 rename\x00 delete\x00TraceExecutionProc: bad flag combination\x00 a\x00 r\x00 w\x00 u\x00 array\x00 read\x00 write\x00 unset\x00Cannot trace a variable with no name\x00trace array\x00\n    (%s trace on \"%s%s%s%s\")\x00bad result flag combination\x00end-offset\x00LIST\x00%s element in braces followed by \"%.*s\" instead of space\x00JUNK\x00%s element in quotes followed by \"%.*s\" instead of space\x00unmatched open brace in %s\x00BRACE\x00unmatched open quote in %s\x00QUOTE\x00internal error in Tcl_SplitList\x00INTERNAL\x00Tcl_SplitList\x00TclScanElement: string length overflow\x00Tcl_Concat: max size of Tcl value exceeded\x00 \f\v\r\t\n\x00 {\x00{\x00-Inf\x00Inf\x00e%+d\x00e%+03d\x00can't modify precision from a safe interpreter\x00improper value for precision\x000123456789\x00bad index \"%s\": must be integer?[+-]integer? or end?[+-]integer?\x00end-\x00bad index \"%s\": must be end?[+-]integer?\x00PGV Initializer did not initialize\x00***=\x00invalid escape sequence\x00BADESCAPE\x00$ not anchor\x00NONANCHOR\x00unhandled RE special char\x00UNHANDLED\x00excessive recursive glob backtrack potential\x00OVERCOMPLEX\x00RE2GLOB\x00variable is array\x00no such element in array\x00upvar refers to element in deleted array\x00upvar refers to variable in deleted namespace\x00parent namespace doesn't exist\x00missing variable name\x00localVarName\x00parsedVarName\x00array search\x00\"%s\" isn't an array\x00VARNAME\x00ELEMENT\x00varPtr must not be NULL\x00part1Ptr must not be NULL\x00READ\x00varName ?newValue?\x00newValuePtr must not be NULL\x00UNSET\x00varName ?value ...?\x00arrayName\x00s-%d-%s\x00arrayName searchId\x00arrayName ?pattern?\x00arrayName ?mode? ?pattern?\x00exact matching shouldn't get here\x00arrayName list\x00error reading array statistics\x00anymore\x00donesearch\x00nextelement\x00startsearch\x00statistics\x00bad variable name \"%s\": can't create namespace variable that refers to procedure variable\x00ObjMakeUpvar called with an index outside from a proc\x00bad variable name \"%s\": can't create a scalar variable that looks like an array element\x00can't upvar from variable to itself\x00variable \"%s\" has traces: can't use for upvar\x00TRACED\x00variable \"%s\" already exists\x00EXISTS\x00?level? otherVar localVar ?otherVar localVar ...?\x00illegal search identifier \"%s\"\x00ARRAYSEARCH\x00search identifier \"%s\" isn't for variable \"%s\"\x00couldn't find search \"%s\"\x00invalid part1Ptr and invalid index together\x00can't %s \"%s%s%s%s\": %s\x00%s of type %s should not be called\x00updateStringProc\x00setFromAnyProc\x00scalar parsedVarName without a string rep\x00unknown variable \"%s\"\x00Windows NT is the only supported platform\x00couldn't open \"\x00\": filename is invalid on this platform\x00TclpOpenFileChannel: invalid mode value\x00couldn't open serial \"\x00couldn't reopen serial \"%s\": %s\x00couldn't open \"%s\": bad file type\x00TclGetDefaultStdChannel: Unexpected channel type\x00file%Ix\x00file info ptr not on thread channel list\x00console\x00cp%d\x008.5\x00dde\x001.4.4\x00permission denied: a handler procedure must be defined for use in a safe interp\x00DDE\x00SECURITY_CHECK\x00no registered server named \"%s\"\x00NO_SERVER\x00remote interpreter did not respond\x00TIMEOUT\x00remote server is busy\x00remote server cannot handle this command\x00NOCANDO\x00dde command failed\x00FAILED\x00?-force? ?-handler proc? ?--? ?serverName?\x00?-async? ?-binary? serviceName topicName value\x00?-binary? serviceName topicName item value\x00?-binary? serviceName topicName value\x00serviceName topicName\x00?-async? serviceName args\x00cannot execute null data\x00cannot request value of null data\x00cannot have a null item\x00invalid service name \"\"\x00invalid data returned from server\x00BAD_RESPONSE\x00servername\x00execute\x00poke\x00request\x00services\x00-handler\x00-binary\x00-archive\x00-hidden\x00-longname\x00-readonly\x00-shortname\x00-system\x00..\x00cannot set attribute \"%s\" for file \"%s\": attribute is readonly\x00[]\\\x00*.*\x00couldn't read directory \"%s\": %s\x00prn\x00nul\x00aux\x00Password Lists\x00system.ini\x00\\??\\\x00\\\\?\\\x00intel\x00mips\x00ppc\x00shx\x00arm\x00ia64\x00alpha64\x00msil\x00amd64\x00ia32_on_win64\x00neutral\x00arm64\x00arm32_on_win64\x00ia32_on_arm64\x00CancelSynchronousIo\x00CreateSymbolicLinkW\x00lib/tcl%s\x00last character in lib cannot be '/'\x00no '/' character found in lib\x00TCL_LIBRARY\x00../library\x00USERNAME\x00RtlGetVersion\x00windows\x00Windows NT\x00%d.%d\x00HOMEDRIVE\x00HOMEPATH\x00c:\\\x00pathSeparator\x00;\x00couldn't load library \"%s\": \x00WIN_LOAD\x00MOD_NOT_FOUND\x00DLL_NOT_FOUND\x00this library or a dependent library could not be found in library path\x00PROC_NOT_FOUND\x00A function specified in the import table could not be resolved by the system. Windows is not telling which one, I'm sorry.\x00INVALID_DLL\x00this library or a dependent library is damaged\x00DLL_INIT_FAILED\x00the library initialization routine failed\x00BAD_EXE_FORMAT\x00Bad exe format. Possibly a 32/64-bit mismatch.\x00_\x00cannot find symbol \"%s\"\x00LOAD_SYMBOL\x00couldn't create temporary directory: %s\x00Unable to register TclNotifier window class\x00TclpCloseFile: unexpected file type\x00couldn't duplicate input handle: %s\x00couldn't duplicate output handle: %s\x00couldn't duplicate error handle: %s\x00cmd.exe /c\x00DOS application process not supported on this platform\x00DOS_APP\x00couldn't execute \"%s\": %s\x00.cmd\x00.bat\x00.com\x00\x00\x00\x00\x00\x00.exe\x00\\\\\x00&|^<>!()%\x00pipe creation failed: %s\x00?channelId?\x00%d.TMP\x00HKEY_LOCAL_MACHINE\x00HKEY_USERS\x00HKEY_CLASSES_ROOT\x00HKEY_CURRENT_USER\x00HKEY_CURRENT_CONFIG\x00HKEY_PERFORMANCE_DATA\x00HKEY_DYN_DATA\x00registry::command\x00sz\x00expand_sz\x00dword\x00dword_big_endian\x00multi_sz\x00resource_list\x00registry\x001.3.5\x00?-32bit|-64bit? option ?arg ...?\x00keyName ?-timeout milliseconds?\x00keyName ?valueName?\x00keyName valueName\x00keyName ?pattern?\x00keyName ?valueName data ?type??\x00broadcast\x00-32bit\x00-64bit\x00bad key: cannot delete root keys\x00WIN_REG\x00DEL_ROOT_KEY\x00unable to delete key: \x00unable to delete value \"%s\" from key \"%s\": \x00unable to enumerate subkeys of \"%s\": \x00unable to get type of value \"%s\" from key \"%s\": \x00unable to get value \"%s\" from key \"%s\": \x00unable to open key: \x00bad key \"%s\": must start with a valid root\x00NO_ROOT_KEY\x00root name\x00RegDeleteKeyExW\x00unable to set value: \x00-timeout\x00unknown error: %ld\x00%ld\x00WINDOWS\x00serial\x00RXOVER\x00OVERRUN\x00RXPARITY\x00FRAME\x00BREAK\x00TXFULL\x00CTS\x00DSR\x00RING\x00DCD\x00-mode\x00bad value \"%s\" for -mode: should be baud,parity,data,stop\x00SERIALMODE\x00-handshake\x00XONXOFF\x00RTSCTS\x00DTRDSR\x00bad value \"%s\" for -handshake: must be one of xonxoff, rtscts, dtrdsr or none\x00HANDSHAKE\x00-xchar\x00bad value for -xchar: should be a list of two elements with each a single character\x00XCHAR\x00-ttycontrol\x00bad value \"%s\" for -ttycontrol: should be a list of signal,value pairs\x00TTYCONTROL\x00DTR\x00can't set DTR signal\x00FCONFIGURE\x00TTY_SIGNAL\x00RTS\x00can't set RTS signal\x00can't set BREAK signal\x00bad signal name \"%s\" for -ttycontrol: must be DTR, RTS or BREAK\x00-sysbuffer\x00bad value \"%s\" for -sysbuffer: should be a list of one or two integers > 0\x00SYS_BUFFER\x00can't setup comm buffers: %s\x00-pollinterval\x00can't set comm timeouts: %s\x00mode handshake pollinterval sysbuffer timeout ttycontrol xchar\x00can't get comm state: %s\x00can't set comm state: %s\x00noems\x001.5\x00%d,%c,%d,%s\x00-lasterror\x00-queue\x00-ttystatus\x00can't get tty status: %s\x00mode pollinterval lasterror queue sysbuffer ttystatus xchar\x00sockets are not available on this system\x00winsock is not initialized\x00-connecting\x00::tcl::unsupported::noReverseDNS\x00-peername\x00can't get peername: %s\x00-sockname\x00can't get sockname: %s\x00connecting peername sockname\x00couldn't open socket: %s\x00sock%p\x00auto crlf\x00zlib\x00STREAM\x00DATA\x00MEM\x00BUF\x00NEED_DICT\x00unexpected zlib result in error handler: Z_OK\x00unexpected zlib result in error handler: Z_STREAM_END\x00ZLIB\x00no latin-1 encoding\x00comment\x00crc\x00filename\x00text\x00incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, TCL_ZLIB_FORMAT_GZIP or TCL_ZLIB_FORMAT_RAW\x00compression level should be between 0 (no compression) and 9 (best compression) or -1 for default compression level\x00incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, TCL_ZLIB_FORMAT_GZIP, TCL_ZLIB_FORMAT_RAW or TCL_ZLIB_FORMAT_AUTO\x00bad mode, must be TCL_ZLIB_STREAM_DEFLATE or TCL_ZLIB_STREAM_INFLATE\x00::incr ::tcl::zlib::cmdcounter\x00::tcl::zlib::streamcmd_\x00BUG: Stream command name already exists\x00EXISTING_CMD\x00already past compressed stream end\x00ZIP\x00CLOSED\x00unexpected zlib internal state during decompression\x00STATE\x00incorrect zlib data format, must be TCL_ZLIB_FORMAT_ZLIB, TCL_ZLIB_FORMAT_GZIP or TCL_ZLIB_FORMAT_ZLIB\x00compression level should be between 0 (uncompressed) and 9 (best compression) or -1 for default compression level\x00command arg ?...?\x00data ?startValue?\x00data ?level?\x00\n    (in -level option)\x00data ?-level level? ?-header header?\x00data ?bufferSize?\x00data ?-headerVar varName?\x00level must be 0 to 9\x00COMPRESSIONLEVEL\x00buffer size must be %d to %d\x00BUFFERSIZE\x00adler32\x00compress\x00crc32\x00decompress\x00deflate\x00gunzip\x00gzip\x00inflate\x00stream\x00-header\x00-headerVar\x00mode ?-option value...?\x00should be unreachable\x00mode channel ?options...?\x00compression may only be applied to writable channels\x00UNWRITABLE\x00decompression may only be applied to readable channels\x00UNREADABLE\x00value missing for %s option\x00NOVAL\x00read ahead limit must be 1 to %d\x00a compression dictionary may not be set in the gzip format\x00BADOPT\x00\n    (in \x00 option)\x00-limit\x00option data ?...?\x00?count?\x00checksum\x00fullflush\x00header\x00put\x00reset\x00\"-buffer\" option must be followed by integer decompression buffersize\x00buffer size must be 1 to %d\x00\"-dictionary\" option must be followed by compression dictionary bytes\x00\"-flush\", \"-fullflush\" and \"-finalize\" options are mutually exclusive\x00EXCLUSIVE\x00-buffer\x00-finalize\x00-flush\x00-fullflush\x00only gunzip streams can produce header information\x00BADOP\x00error while finalizing file: %s\x00problem flushing channel: %s\x00sync\x00unknown -flush type \"%s\": must be full or sync\x00FLUSH\x00-limit must be between 1 and 65536\x00READLIMIT\x00dictionary flush\x00dictionary limit\x00flush limit\x00-checksum\x00checksum dictionary\x00checksum dictionary limit\x00checksum header limit\x00unknown mode: %d\x00bad format: %d\x00namespace eval ::tcl::zlib {variable cmdcounter 0}\x00zlibVersion\x002.0.1\x00need dictionary\x00stream end\x00file error\x00stream error\x00data error\x00insufficient memory\x00buffer error\x00incompatible version\x00"
var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data
var wtext1 = [...]uint16{84, 67, 76, 95, 80, 75, 71, 95, 80, 82, 69, 70, 69, 82, 95, 76, 65, 84, 69, 83, 84, 0, 84, 67, 76, 95, 73, 78, 84, 69, 82, 80, 95, 68, 69, 66, 85, 71, 95, 70, 82, 65, 77, 69, 0, 0, 84, 90, 0, 87, 73, 78, 68, 73, 82, 0, 84, 67, 76, 95, 84, 69, 77, 80, 76, 79, 65, 68, 95, 78, 79, 95, 85, 78, 76, 73, 78, 75, 0, 45, 101, 110, 99, 111, 100, 105, 110, 103, 0, 65, 58, 92, 0, 99, 111, 109, 0, 92, 92, 46, 92, 99, 111, 109, 0, 84, 99, 108, 69, 118, 97, 108, 0, 32, 35, 0, 37, 100, 0, 36, 84, 67, 76, 69, 86, 65, 76, 36, 69, 88, 69, 67, 85, 84, 69, 36, 82, 69, 83, 85, 76, 84, 0, 84, 99, 108, 69, 118, 97, 108, 32, 99, 108, 105, 101, 110, 116, 32, 99, 108, 97, 115, 115, 0, 84, 99, 108, 69, 118, 97, 108, 32, 99, 108, 105, 101, 110, 116, 32, 119, 105, 110, 100, 111, 119, 0, 116, 99, 108, 114, 0, 92, 42, 46, 42, 0, 92, 0, 92, 63, 63, 92, 0, 92, 63, 63, 92, 86, 111, 108, 117, 109, 101, 123, 0, 92, 92, 63, 92, 0, 32, 46, 46, 46, 0, 70, 97, 116, 97, 108, 32, 69, 114, 114, 111, 114, 0, 101, 120, 101, 0, 99, 109, 100, 0, 98, 97, 116, 0, 47, 0, 92, 92, 63, 92, 85, 78, 67, 0, 34, 42, 58, 60, 62, 63, 124, 0, 75, 69, 82, 78, 69, 76, 51, 50, 0, 84, 67, 76, 95, 76, 73, 66, 82, 65, 82, 89, 0, 78, 84, 68, 76, 76, 0, 84, 67, 76, 88, 88, 88, 88, 88, 88, 88, 88, 0, 37, 48, 56, 120, 0, 84, 99, 108, 78, 111, 116, 105, 102, 105, 101, 114, 0, 84, 67, 76, 0, 78, 85, 76, 58, 0, 67, 79, 78, 79, 85, 84, 36, 0, 65, 68, 86, 65, 80, 73, 51, 50, 0, 84, 99, 108, 83, 111, 99, 107, 101, 116, 0}
var wtext = uintptr(unsafe.Pointer(&wtext1[0]))
